astropy-1.1.1/0000755001134200020070000000000012644022135014116 5ustar embrayscience00000000000000astropy-1.1.1/setup.py0000755001134200020070000001005112644020675015637 0ustar embrayscience00000000000000#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst import glob import os import sys import ah_bootstrap from setuptools import setup from astropy_helpers.setup_helpers import ( register_commands, get_package_info, get_debug_option) try: from astropy_helpers.distutils_helpers import is_distutils_display_option except: # For astropy-helpers v0.4.x from astropy_helpers.setup_helpers import is_distutils_display_option from astropy_helpers.git_helpers import get_git_devstr from astropy_helpers.version_helpers import generate_version_py import astropy NAME = 'astropy' # VERSION should be PEP386 compatible (http://www.python.org/dev/peps/pep-0386) VERSION = '1.1.1' # Indicates if this version is a release version RELEASE = 'dev' not in VERSION if not RELEASE: VERSION += get_git_devstr(False) DOWNLOAD_BASE_URL = 'http://pypi.python.org/packages/source/a/astropy' # Populate the dict of setup command overrides; this should be done before # invoking any other functionality from distutils since it can potentially # modify distutils' behavior. cmdclassd = register_commands(NAME, VERSION, RELEASE) # Freeze build information in version.py generate_version_py(NAME, VERSION, RELEASE, get_debug_option(NAME), uses_git=not RELEASE) # Get configuration information from all of the various subpackages. # See the docstring for setup_helpers.update_package_files for more # details. package_info = get_package_info() # Add the project-global data package_info['package_data'].setdefault('astropy', []).append('data/*') # Currently the only entry points installed by Astropy are hooks to # zest.releaser for doing Astropy's releases entry_points = {} for hook in [('prereleaser', 'middle'), ('releaser', 'middle'), ('postreleaser', 'before'), ('postreleaser', 'middle')]: hook_ep = 'zest.releaser.' + '.'.join(hook) hook_name = 'astropy.release.' + '.'.join(hook) hook_func = 'astropy.utils.release:' + '_'.join(hook) entry_points[hook_ep] = ['%s = %s' % (hook_name, hook_func)] # Command-line scripts entry_points['console_scripts'] = [ 'fits2bitmap = astropy.visualization.scripts.fits2bitmap:main', 'fitscheck = astropy.io.fits.scripts.fitscheck:main', 'fitsdiff = astropy.io.fits.scripts.fitsdiff:main', 'fitsheader = astropy.io.fits.scripts.fitsheader:main', 'fitsinfo = astropy.io.fits.scripts.fitsinfo:main', 'samp_hub = astropy.vo.samp.hub_script:hub_script', 'volint = astropy.io.votable.volint:main', 'wcslint = astropy.wcs.wcslint:main', ] setup_requires = ['numpy>=' + astropy.__minimum_numpy_version__] install_requires = ['numpy>=' + astropy.__minimum_numpy_version__] # Avoid installing setup_requires dependencies if the user just # queries for information if is_distutils_display_option(): setup_requires = [] setup(name=NAME, version=VERSION, description='Community-developed python astronomy tools', requires=['numpy'], # scipy not required, but strongly recommended setup_requires=setup_requires, install_requires=install_requires, provides=[NAME], author='The Astropy Developers', author_email='astropy.team@gmail.com', license='BSD', url='http://astropy.org', long_description=astropy.__doc__, download_url='%s/astropy-%s.tar.gz' % (DOWNLOAD_BASE_URL, VERSION), classifiers=[ 'Intended Audience :: Science/Research', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: C', 'Programming Language :: Cython', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: Implementation :: CPython', 'Topic :: Scientific/Engineering :: Astronomy', 'Topic :: Scientific/Engineering :: Physics' ], cmdclass=cmdclassd, zip_safe=False, use_2to3=False, entry_points=entry_points, **package_info ) astropy-1.1.1/.astropy-root0000644001134200020070000000000012640262015016566 0ustar embrayscience00000000000000astropy-1.1.1/README.rst0000644001134200020070000000310412644017723015612 0ustar embrayscience00000000000000======= Astropy ======= .. image:: https://img.shields.io/pypi/v/astropy.svg :target: https://pypi.python.org/pypi/astropy .. image:: https://img.shields.io/pypi/dm/astropy.svg :target: https://pypi.python.org/pypi/astropy Astropy (http://astropy.org/) is a package intended to contain much of the core functionality and some common tools needed for performing astronomy and astrophysics with Python. Releases are `registered on PyPI `_, and development is occurring at the `project's github page `_. For installation instructions, see the `online documentation `_ or ``docs/install.rst`` in this source distribution. For system packagers: Please install Astropy with the command:: $ python setup.py --offline install This will prevent the astropy_helpers bootstrap script from attempting to reach out to PyPI. Project Status -------------- .. image:: https://travis-ci.org/astropy/astropy.svg :target: https://travis-ci.org/astropy/astropy .. image:: https://coveralls.io/repos/astropy/astropy/badge.svg :target: https://coveralls.io/r/astropy/astropy .. image:: https://ci.appveyor.com/api/projects/status/ym7lxajcs5qwm31e/branch/master?svg=true :target: https://ci.appveyor.com/project/Astropy/astropy/branch/master For an overview of the testing and build status of all packages associated with the Astropy Project, see http://dashboard.astropy.org. License ------- Astropy is licensed under a 3-clause BSD style license - see the ``licenses/LICENSE.rst`` file. astropy-1.1.1/cextern/0000755001134200020070000000000012644022135015566 5ustar embrayscience00000000000000astropy-1.1.1/cextern/README.rst0000644001134200020070000000047112602615516017264 0ustar embrayscience00000000000000External Packages/Libraries =========================== This directory contains C libraries included with Astropy. Note that only C libraries without python-specific code should be included in this directory. Cython or C code intended for use with Astropy or wrapper code should be in the Astropy source tree. astropy-1.1.1/cextern/.gitignore0000644001134200020070000000000512602615515017555 0ustar embrayscience00000000000000!*.c astropy-1.1.1/cextern/wcslib/0000755001134200020070000000000012644022135017051 5ustar embrayscience00000000000000astropy-1.1.1/cextern/wcslib/makedefs.in0000644001134200020070000002035712644017723021176 0ustar embrayscience00000000000000#----------------------------------------------------------------------------- # GNU makefile definitions for building WCSLIB 5.10 # # makedefs is generated from makedefs.in by configure. It contains variable # definitions and some general-purpose rules for building WCSLIB. # # Targets defined here # -------------------- # printenv: Print the environment as seen within makefile rules. # show: Print the values of all makefile variables used. # # Notes: # 1) If you need to make changes then it may be preferable to modify # makedefs.in (not makedefs). The makefile will detect this and # automatically re-run config.status to regenerate makedefs. # # 2) There are three choices for trigd functions - cosd(), sind(), tand(), # acosd(), asind(), atand(), and atan2d(), made by setting WCSTRIG: # # 1: Use the wrapper functions supplied with WCSLIB (default): # WCSTRIG := WRAPPER # # 2: Use native trigd functions supplied in a mathematics library such # as libsunmath (you will also need to add the library to the LIBS # variable below): # WCSTRIG := NATIVE # # 3: Use C preprocessor macro implementations of the trigd functions # (this method is typically 20% faster but may lead to rounding # errors near the poles): # WCSTRIG := MACRO # # 3) Variables for creating the shared (dynamic) library are currently # only set by 'configure' if the GNU C compiler is used. However, # you can set these variables by hand, preferably in makedefs.in. # # Shared libraries require position-independent code (PIC) which imposes # a performance overhead. Consequently the static libraries are # compiled separately without this option. # # The shared library will be installed with version number, e.g. as # libwcs.so.5.10 or libwcs.5.10.dylib with or without the symlink # required to make it visible to the linker (controlled by the SHRLN # variable). On Macs it is deliberately not created because its very # existence precludes static linking with the cctools linker. You can # still link dynamically by using -lwcs.5.10. # # 4) PGPLOT is Tim Pearson's Fortran graphics library with separate C # interface available from astro.caltech.edu. It is only required by # one utility, wcsgrid, and the test programs that plot test grids # (tprj2, tcel1, tcel2, tspc, ttab2, ttab3, twcsmix, and tpih2). You can # skip these by setting PGPLOTLIB to blank. # # It is difficult for configure to deduce what auxiliary graphics # libraries may be needed for PGPLOT since it depends on which of many # possible graphics drivers were selected when PGPLOT was installed. # Therefore it is quite likely that you will need to add additional # libraries to PGPLOTLIB. # # 5) CFITSIO is Bill Pence's FITS I/O library written in C with Fortran # wrappers, available from http://heasarc.gsfc.nasa.gov/fitsio. # # CFITSIO is required by three utilities, HPXcvt, wcsgrid, and wcsware, # and also by the test programs twcstab and twcshdr. wcsware and the # test programs use fits_read_wcstab() which is implemented by # getwcstab.c. However, this implementation is included in CFITSIO post # 3.004beta, so getwcstab.c is required here only for older releases # (controlled by variable GETWCSTAB). getwcstab.o itself is not inserted # into the WCSLIB object library. # # If available, CFITSIO is also optionally used for test programs # tfitshdr, tbth1, tpih1 and tpih2 by setting preprocessor macro # -DDO_CFITSIO. # # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. # http://www.atnf.csiro.au/people/Mark.Calabretta # $Id: makedefs.in,v 5.10 2015/10/09 08:19:17 mcalabre Exp $ #----------------------------------------------------------------------------- # Version. LIBVER := @LIBVER@ WCSLIBPKG := wcslib-@PACKAGE_VERSION@ # System architecture. ARCH := @ARCH@ # Flex and options. FLEX := @FLEX@ FLFLAGS := # C preprocessor and options. CPP := @CPP@ CPPFLAGS := @CPPFLAGS@ @DEFS@ WCSTRIG := WRAPPER # C compiler and options. CC := @CC@ CFLAGS := @CFLAGS@ # Fortran compiler and options. FC := @F77@ FFLAGS := @FFLAGS@ # Static object library. WCSLIB := libwcs-$(LIBVER).a RANLIB := @RANLIB@ # Shared (dynamic) library (see note 3 above). SHRLIB := @SHRLIB@ SONAME := @SONAME@ SHRFLAGS := @SHRFLAGS@ SHRLD := @SHRLD@ SHRLN := @SHRLN@ # What subdirectories to build. SUBDIRS := @SUBDIRS@ TSTDIRS := @TSTDIRS@ # Top of the 'make install' hierarchy: pgsbox -> Fortran -> C. INSTDIR := @INSTDIR@ # Installation utilities and locations. LN_S := @LN_S@ INSTALL := @INSTALL@ # Needed for the definitions provided by autoconf. prefix := @prefix@ exec_prefix := @exec_prefix@ datarootdir := @datarootdir@ PACKAGE_TARNAME := @PACKAGE_TARNAME@ docdir := @docdir@ LIBDIR := $(DESTDIR)@libdir@ BINDIR := $(DESTDIR)@bindir@ INCDIR := $(DESTDIR)@includedir@/wcslib-$(LIBVER) INCLINK := $(DESTDIR)@includedir@/wcslib DOCDIR := $(DESTDIR)@docdir@ DOCLINK := $(dir $(DESTDIR)@docdir@)wcslib HTMLDIR := $(DESTDIR)@htmldir@ PDFDIR := $(DESTDIR)@pdfdir@ MANDIR := $(DESTDIR)@mandir@ # For putting timestamps in the build log. TIMER := date +"%a %Y/%m/%d %X %z, executing on $$HOST" # The remaining options are for building utilities and test programs. # ------------------------------------------------------------------- # Linker options (use CC for linking). LD = $(CC) LDFLAGS := @LDFLAGS@ # PGPLOT (see note 4 above). PGPLOTINC := @PGPLOTINC@ PGPLOTLIB := @PGPLOTLIB@ # CFITSIO (see note 5 above). CFITSIOINC := @CFITSIOINC@ CFITSIOLIB := @CFITSIOLIB@ GETWCSTAB := @GETWCSTAB@ # Libraries required by the above Fortran compiler. FLIBS := @FLIBS@ # Libraries required by WCSLIB itself. LIBS := @LIBS@ #----------------------------------------------------------------------------- # You shouldn't need to change anything below here. #----------------------------------------------------------------------------- SHELL := /bin/sh VPATH := .. # Common targets. .PHONY : all build printenv show all : show build # Print the environment as seen by makefile rules. printenv : -@ printenv | sort # Print variable definitions. show :: wcsconfig.h -@ echo '' -@ uname -a -@ echo '' -@ $(MAKE) --version | head -1 -@ echo ' MAKEFLAGS := $(MAKEFLAGS)' -@ echo '' -@ echo 'For building and installing $(WCSLIBPKG)...' -@ echo ' ARCH := $(ARCH)' -@ echo ' FLEX := $(FLEX)' -@ echo ' FLFLAGS := $(FLFLAGS)' -@ echo ' CPP := $(CPP)' -@ echo ' CPPFLAGS := $(CPPFLAGS)' -@ echo ' WCSTRIG := $(WCSTRIG)' -@ echo ' CC := $(CC)' -@ echo ' CFLAGS := $(CFLAGS)' -@ echo ' FC := $(FC)' -@ echo ' FFLAGS := $(FFLAGS)' -@ echo ' WCSLIB := $(WCSLIB)' -@ echo ' RANLIB := $(RANLIB)' -@ echo ' SHRLIB := $(SHRLIB)' -@ echo ' SONAME := $(SONAME)' -@ echo ' SHRFLAGS := $(SHRFLAGS)' -@ echo ' SHRLD := $(SHRLD)' -@ echo ' SHRLN := $(SHRLN)' -@ echo ' LN_S := $(LN_S)' -@ echo ' INSTALL := $(INSTALL)' -@ echo ' LIBDIR := $(LIBDIR)' -@ echo ' BINDIR := $(BINDIR)' -@ echo ' INCDIR := $(INCDIR)' -@ echo ' INCLINK := $(INCLINK)' -@ echo ' DOCDIR := $(DOCDIR)' -@ echo ' DOCLINK := $(DOCLINK)' -@ echo ' HTMLDIR := $(HTMLDIR)' -@ echo ' PDFDIR := $(PDFDIR)' -@ echo ' MANDIR := $(MANDIR)' -@ echo ' TIMER := $(TIMER)' -@ echo '' -@ echo 'Important wcsconfig.h defines...' -@ echo " `grep HAVE_SINCOS $<`" -@ echo " `grep WCSLIB_INT64 $<`" -@ echo '' -@ echo 'To build utilities and test programs...' -@ echo ' LD := $(LD)' -@ echo ' LDFLAGS := $(LDFLAGS)' -@ echo ' PGPLOTINC := $(PGPLOTINC)' -@ echo ' PGPLOTLIB := $(PGPLOTLIB)' -@ echo ' CFITSIOINC := $(CFITSIOINC)' -@ echo ' CFITSIOLIB := $(CFITSIOLIB)' -@ echo ' GETWCSTAB := $(GETWCSTAB)' -@ echo ' FLIBS := $(FLIBS)' -@ echo ' LIBS := $(LIBS)' -@ echo '' # Code development overrides, for use in the code subdirectories. -include ../flavours astropy-1.1.1/cextern/wcslib/wcslib.pc.in0000644001134200020070000000041412602615515021270 0ustar embrayscience00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@/wcslib Name: WCSLIB Description: An implementation of the FITS World Coordinate System standard Version: @PACKAGE_VERSION@ Requires: Libs: -L${libdir} -lwcs -lm Cflags: -I${includedir} astropy-1.1.1/cextern/wcslib/wcsconfig_utils.h.in0000644001134200020070000000250012644017723023035 0ustar embrayscience00000000000000/*============================================================================ * * wcsconfig_utils.h is generated from wcsconfig_utils.h.in by 'configure'. * It contains C preprocessor macro definitions for compiling the WCSLIB 5.10 * utilities. * * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. * http://www.atnf.csiro.au/people/Mark.Calabretta * $Id: wcsconfig_utils.h.in,v 5.10 2015/10/09 08:19:17 mcalabre Exp $ *===========================================================================*/ #include /* Definitions for Large File Support (LFS), i.e. files larger than 2GiB, for * the fitshdr utility. */ /* Define to 1 if fseeko() is available (for small or large files). */ #undef HAVE_FSEEKO /* Define _LARGEFILE_SOURCE to get prototypes from stdio.h for the LFS * functions fseeko() and ftello() which use an off_t argument in place of a * long. */ #undef _LARGEFILE_SOURCE /* There seems to be a bug in autoconf that causes _LARGEFILE_SOURCE not to be * set in Linux. This dreadful kludge gets around it for now. */ #if (defined HAVE_FSEEKO && !defined _LARGEFILE_SOURCE) #define _LARGEFILE_SOURCE #endif /* Number of bits in a file offset (off_t) on systems where it can be set. */ #undef _FILE_OFFSET_BITS /* Define for large files needed on AIX-type systems. */ #undef _LARGE_FILES astropy-1.1.1/cextern/wcslib/configure0000755001134200020070000102561612644017723021002 0ustar embrayscience00000000000000#! /bin/sh # From configure.ac Revision: 5.10 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for WCSLIB 5.10. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: mark@calabretta.id.au about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='WCSLIB' PACKAGE_TARNAME='wcslib-5.10' PACKAGE_VERSION='5.10' PACKAGE_STRING='WCSLIB 5.10' PACKAGE_BUGREPORT='mark@calabretta.id.au' PACKAGE_URL='' ac_unique_file="C/wcs.h" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS INSTDIR TSTDIRS SUBDIRS PGPLOTLIB PGPLOTINC GETWCSTAB CFITSIOLIB CFITSIOINC XMKMF INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM LN_S SHRLN SHRSFX SHRLD SHRFLAGS SONAME SHRLIB RANLIB FLIBS host_os host_vendor host_cpu host ac_ct_F77 FFLAGS F77 LIBOBJS EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC FLEX ARCH build_os build_vendor build_cpu build LIBVER target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_fortran enable_largefile with_cfitsio with_cfitsiolib with_cfitsioinc with_pgplot with_pgplotlib with_pgplotinc with_x enable_utils ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP F77 FFLAGS XMKMF' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures WCSLIB 5.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/wcslib-5.10] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of WCSLIB 5.10:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-fortran=ARG Fortran compiler to use --disable-fortran don't build the Fortran wrappers or PGSBOX --disable-largefile omit support for large files --disable-utils don't build the WCS utilities Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-cfitsio eschew CFITSIO --with-cfitsiolib=DIR directory containing cfitsio library --with-cfitsioinc=DIR directory containing cfitsio header files --without-pgplot eschew PGPLOT --with-pgplotlib=DIR directory containing pgplot library --with-pgplotinc=DIR directory containing pgplot header files --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF WCSLIB configure 5.10 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_find_intX_t LINENO BITS VAR # ----------------------------------- # Finds a signed integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_intX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 $as_echo_n "checking for int$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in int$2_t 'int' 'long int' \ 'long long int' 'short int' 'signed char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_intX_t # ac_fn_c_find_uintX_t LINENO BITS VAR # ------------------------------------ # Finds an unsigned integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_uintX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 $as_echo_n "checking for uint$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : case $ac_type in #( uint$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_uintX_t # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------ ## ## Report this to mark@calabretta.id.au ## ## ------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_f77_try_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by WCSLIB $as_me 5.10, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >>confdefs.h <<_ACEOF #define WCSLIB_VERSION $PACKAGE_VERSION _ACEOF # Library version number, same as package version. LIBVER="$PACKAGE_VERSION" ac_aux_dir= for ac_dir in config "$srcdir"/config; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Get the system type. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac ARCH="${build_cpu}-$build_os" # Look for Flex. # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_FLEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$FLEX"; then ac_cv_prog_FLEX="$FLEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_FLEX="flex" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi FLEX=$ac_cv_prog_FLEX if test -n "$FLEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5 $as_echo "$FLEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$FLEX" = xflex ; then # Version 2.5.9 or later is required. V=`flex --version | awk '{print $2}'` W=`echo $V | awk -F. '{if ((($1*100 + $2)*100 + $3) < 20509) print "no"}'` if test "x$W" != x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: Flex version $V is too old, ignored." >&5 $as_echo "$as_me: Flex version $V is too old, ignored." >&6;} FLEX= else { $as_echo "$as_me:${as_lineno-$LINENO}: Using Flex version $V." >&5 $as_echo "$as_me: Using Flex version $V." >&6;} fi fi if test "x$FLEX" = x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Flex version 2.5.9 or later does not appear to be available, will use pre-generated sources." >&5 $as_echo "$as_me: WARNING: Flex version 2.5.9 or later does not appear to be available, will use pre-generated sources." >&2;} fi # Look for an ANSI C compiler. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu case $ac_cv_prog_cc_stdc in #( no) : ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 else ac_cv_prog_cc_stdc=no fi fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } if ${ac_cv_prog_cc_stdc+:} false; then : $as_echo_n "(cached) " >&6 fi case $ac_cv_prog_cc_stdc in #( no) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; #( '') : { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi if test "x$ac_cv_prog_cc_stdc" = xno -o \ "x$ac_cv_c_const" = xno -o \ "x$ac_cv_type_size_t" = xno; then as_fn_error 1 " ------------------------------------------------------- An ANSI standard C library is required to build WCSLIB. ERROR: WCSLIB configuration failure. -------------------------------------------------------" "$LINENO" 5 fi # Check for data types (suggested by autoscan - off_t is only required by # fitshdr). ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" case $ac_cv_c_int8_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int8_t $ac_cv_c_int8_t _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" case $ac_cv_c_int16_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int16_t $ac_cv_c_int16_t _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" case $ac_cv_c_int32_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int32_t $ac_cv_c_int32_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" case $ac_cv_c_uint8_t in #( no|yes) ;; #( *) $as_echo "#define _UINT8_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint8_t $ac_cv_c_uint8_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" case $ac_cv_c_uint16_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define uint16_t $ac_cv_c_uint16_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" case $ac_cv_c_uint32_t in #( no|yes) ;; #( *) $as_echo "#define _UINT32_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint32_t $ac_cv_c_uint32_t _ACEOF ;; esac # Check for ANSI C headers. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in ctype.h errno.h limits.h locale.h math.h setjmp.h stdarg.h \ stdio.h stdlib.h string.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_header_stdc" = xno; then as_fn_error 1 " ------------------------------------------------------------------- An ANSI standard C library is required to build WCSLIB. One of the ANSI C header files it requires is missing or unusable. ERROR: WCSLIB configuration failure. -------------------------------------------------------------------" "$LINENO" 5 fi # Checks for ANSI C library functions (suggested by autoscan - fseeko and # stat are only required by fitshdr). { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5 $as_echo_n "checking for floor in -lm... " >&6; } if ${ac_cv_lib_m_floor+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char floor (); int main () { return floor (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_floor=yes else ac_cv_lib_m_floor=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_floor" >&5 $as_echo "$ac_cv_lib_m_floor" >&6; } if test "x$ac_cv_lib_m_floor" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } if ${ac_cv_sys_largefile_source+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_largefile_source=no; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGEFILE_SOURCE 1 #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_largefile_source=1; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_cv_sys_largefile_source=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 $as_echo "$ac_cv_sys_largefile_source" >&6; } case $ac_cv_sys_largefile_source in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source _ACEOF ;; esac rm -rf conftest* # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug # in glibc 2.1.3, but that breaks too many other things. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. if test $ac_cv_sys_largefile_source != unknown; then $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "#define HAVE_MALLOC 1" >>confdefs.h else $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac $as_echo "#define malloc rpl_malloc" >>confdefs.h fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if ${ac_cv_func_realloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_realloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then : $as_echo "#define HAVE_REALLOC 1" >>confdefs.h else $as_echo "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac $as_echo "#define realloc rpl_realloc" >>confdefs.h fi if ${ac_cv_func_setvbuf_reversed+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_func_setvbuf_reversed=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h fi fi done for ac_func in floor memset pow setlocale sqrt strchr strstr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # System libraries that may be required by WCSLIB itself. # SunOS, extra maths functions. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cosd in -lsunmath" >&5 $as_echo_n "checking for cosd in -lsunmath... " >&6; } if ${ac_cv_lib_sunmath_cosd+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cosd (); int main () { return cosd (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sunmath_cosd=yes else ac_cv_lib_sunmath_cosd=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_cosd" >&5 $as_echo "$ac_cv_lib_sunmath_cosd" >&6; } if test "x$ac_cv_lib_sunmath_cosd" = xyes; then : LIBS="-lsunmath $LIBS" fi # See if we can find sincos(). for ac_func in sincos do : ac_fn_c_check_func "$LINENO" "sincos" "ac_cv_func_sincos" if test "x$ac_cv_func_sincos" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SINCOS 1 _ACEOF fi done # Check the size and availability of integer data types. # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5 $as_echo_n "checking size of long int... " >&6; } if ${ac_cv_sizeof_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then : else if test "$ac_cv_type_long_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5 $as_echo "$ac_cv_sizeof_long_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5 $as_echo_n "checking size of long long int... " >&6; } if ${ac_cv_sizeof_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then : else if test "$ac_cv_type_long_long_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5 $as_echo "$ac_cv_sizeof_long_long_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int _ACEOF # 64-bit integer data type; use long long int preferentially since that # accords with "%lld" formatting used in fitshdr.l, e.g. # int size_t long int long long int # --- ------ -------- ------------- # gcc x86: 32 32 32 64 # gcc x86_64: 32 64 64 64 if test "x$ac_cv_sizeof_long_long_int" = x8; then $as_echo "#define WCSLIB_INT64 long long int" >>confdefs.h elif test "x$ac_cv_sizeof_long_int" = x8; then $as_echo "#define WCSLIB_INT64 long int" >>confdefs.h elif test "x$ac_cv_sizeof_int" = x8; then $as_echo "#define WCSLIB_INT64 int" >>confdefs.h fi # Does printf() have the z modifier for size_t type? Important for 64-bit. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf z format modifier for size_t type" >&5 $as_echo_n "checking for printf z format modifier for size_t type... " >&6; } if test "$cross_compiling" = yes; then : $as_echo "#define MODZ \"\"" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: assumed not" >&5 $as_echo "assumed not" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { char buf[64]; if (sprintf(buf, "%zu", (size_t)1) != 1) return 1; else if (strcmp(buf, "1")) return 2; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : $as_echo "#define MODZ \"z\"" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else $as_echo "#define MODZ \"\"" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Starting values, may be augmented later. SUBDIRS="C" TSTDIRS="C" INSTDIR="C" # Ways of specifying the Fortran compiler, in order of precedence: # configure --enable-fortran= # F77= configure ...bash # # Ways of disabling Fortran: # configure --disable-fortran # configure --enable-fortran=no # F77=no configure ...bash # Check whether --enable-fortran was given. if test "${enable_fortran+set}" = set; then : enableval=$enable_fortran; fi # Check whether --enable-fortran was given. if test "${enable_fortran+set}" = set; then : enableval=$enable_fortran; fi if test "x$enable_fortran" != x -a "x$enable_fortran" != xyes ; then F77="$enable_fortran" fi if test "x$F77" = xno ; then F77= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compilation of Fortran wrappers and PGSBOX disabled" >&5 $as_echo "$as_me: WARNING: Compilation of Fortran wrappers and PGSBOX disabled" >&2;} else if test "x$F77" = x ; then # Look for a Fortran compiler. ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in gfortran g77 f77 ifort xlf frt pgf77 fl32 af77 fort77 f90 \ xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_F77+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 $as_echo "$F77" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in gfortran g77 f77 ifort xlf frt pgf77 fl32 af77 fort77 f90 \ xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_F77+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 $as_echo "$ac_ct_F77" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } if ${ac_cv_f77_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 $as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 $as_echo_n "checking whether $F77 accepts -g... " >&6; } if ${ac_cv_prog_f77_g+:} false; then : $as_echo_n "(cached) " >&6 else FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_g=yes else ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 $as_echo "$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi if test $ac_compiler_gnu = yes; then G77=yes else G77= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi if test "x$F77" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ------------------------------------------------------------------ Fortran compiler not found, will skip Fortran wrappers and PGSBOX. ------------------------------------------------------------------" >&5 $as_echo "$as_me: WARNING: ------------------------------------------------------------------ Fortran compiler not found, will skip Fortran wrappers and PGSBOX. ------------------------------------------------------------------" >&2;} # Best guess at Fortran name mangling for use if a compiler does ever # become available. $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h else if test "x$ac_cv_f77_compiler_gnu" = xyes ; then if test "x$F77" = xg77 -o "x$F77" = xf77 ; then # Not recognized by gfortran. FFLAGS="$FFLAGS -Wno-globals" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -I" >&5 $as_echo_n "checking whether $F77 accepts -I... " >&6; } ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu FFLAGS_save=$FFLAGS FFLAGS=-I. cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : FFLAGS="$FFLAGS_save -I."; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else FFLAGS="$FFLAGS_save"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Libraries required by the Fortran compiler itself (sets FLIBS). # Required by utilities and test programs written in C that link to # Fortran object modules such as pgsbox. { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 $as_echo_n "checking how to get verbose linking output from $F77... " >&6; } if ${ac_cv_prog_f77_v+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF # Compile and link our simple test program by passing a flag (argument # 1 to this macro) to the Fortran compiler in order to get # "verbose" output that we can then parse for the Fortran linker # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" eval "set x $ac_link" shift $as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` $as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where # /foo, /bar, and /baz are search directories for the Fortran linker. # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_f77_v_output="`echo $ac_f77_v_output | grep 'LPATH is:' | sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output" # FIXME: we keep getting bitten by quoted arguments; a more general fix # that detects unbalanced quotes in FLIBS should be implemented # and (ugh) tested at some point. case $ac_f77_v_output in # With xlf replace commas with spaces, # and remove "-link" and closing parenthesis. *xlfentry*) ac_f77_v_output=`echo $ac_f77_v_output | sed ' s/,/ /g s/ -link / /g s/) *$// ' ` ;; # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted # $LIBS confuse us, and the libraries appear later in the output anyway). *mGLOB_options_string*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; # Portland Group compiler has singly- or doubly-quoted -cmdline argument # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". *-cmdline\ * | *-ignore\ * | *-def\ *) ac_f77_v_output=`echo $ac_f77_v_output | sed "\ s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. *fort77*f2c*gcc*) ac_f77_v_output=`echo "$ac_f77_v_output" | sed -n ' /:[ ]\+Running[ ]\{1,\}"gcc"/{ /"-c"/d /[.]c"*/d s/^.*"gcc"/"gcc"/ s/"//gp }'` ;; # If we are using Cray Fortran then delete quotes. *cft90*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;; esac # look for -l* and *.a constructs in the output for ac_arg in $ac_f77_v_output; do case $ac_arg in [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) ac_cv_prog_f77_v=$ac_verb break 2 ;; esac done done if test -z "$ac_cv_prog_f77_v"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 $as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 $as_echo "$as_me: WARNING: compilation failed" >&2;} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 $as_echo "$ac_cv_prog_f77_v" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 $as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; } if ${ac_cv_f77_libs+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$FLIBS" != "x"; then ac_cv_f77_libs="$FLIBS" # Let the user override the test. else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF # Compile and link our simple test program by passing a flag (argument # 1 to this macro) to the Fortran compiler in order to get # "verbose" output that we can then parse for the Fortran linker # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" eval "set x $ac_link" shift $as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` $as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where # /foo, /bar, and /baz are search directories for the Fortran linker. # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_f77_v_output="`echo $ac_f77_v_output | grep 'LPATH is:' | sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output" # FIXME: we keep getting bitten by quoted arguments; a more general fix # that detects unbalanced quotes in FLIBS should be implemented # and (ugh) tested at some point. case $ac_f77_v_output in # With xlf replace commas with spaces, # and remove "-link" and closing parenthesis. *xlfentry*) ac_f77_v_output=`echo $ac_f77_v_output | sed ' s/,/ /g s/ -link / /g s/) *$// ' ` ;; # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted # $LIBS confuse us, and the libraries appear later in the output anyway). *mGLOB_options_string*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; # Portland Group compiler has singly- or doubly-quoted -cmdline argument # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". *-cmdline\ * | *-ignore\ * | *-def\ *) ac_f77_v_output=`echo $ac_f77_v_output | sed "\ s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. *fort77*f2c*gcc*) ac_f77_v_output=`echo "$ac_f77_v_output" | sed -n ' /:[ ]\+Running[ ]\{1,\}"gcc"/{ /"-c"/d /[.]c"*/d s/^.*"gcc"/"gcc"/ s/"//gp }'` ;; # If we are using Cray Fortran then delete quotes. *cft90*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;; esac ac_cv_f77_libs= # Save positional arguments (if any) ac_save_positional="$@" set X $ac_f77_v_output while test $# != 1; do shift ac_arg=$1 case $ac_arg in [\\/]*.a | ?:[\\/]*.a) ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -bI:*) ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" done else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi fi ;; # Ignore these flags. -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) case $host_os in *cygwin*) ;; *) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; esac ;; -[LRuYz]) # These flags, when seen by themselves, take an argument. # We remove the space between option and argument and re-iterate # unless we find an empty arg or a new option (starting with -) case $2 in "" | -*);; *) ac_arg="$ac_arg$2" shift; shift set X $ac_arg "$@" ;; esac ;; -YP,*) for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_j" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_arg="$ac_arg $ac_j" ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" fi done ;; -[lLR]*) ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; # Ignore everything else. esac done # restore positional arguments set X $ac_save_positional; shift # We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, # then we insist that the "run path" must be an absolute path (i.e. it # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) ac_ld_run_path=`$as_echo "$ac_f77_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_ld_run_path; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" done else ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path" fi ;; esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 $as_echo "$ac_cv_f77_libs" >&6; } FLIBS="$ac_cv_f77_libs" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # F77 name mangling (defines the F77_FUNC preprocessor macro). ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 $as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; } if ${ac_cv_f77_dummy_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" ac_fortran_dm_var=F77_DUMMY_MAIN ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # First, try linking without a dummy main: cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=none else ac_cv_fortran_dummy_main=unknown fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define $ac_fortran_dm_var $ac_func #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=$ac_func; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu ac_cv_f77_dummy_main=$ac_cv_fortran_dummy_main rm -rf conftest* LIBS=$ac_f77_dm_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 $as_echo "$ac_cv_f77_dummy_main" >&6; } F77_DUMMY_MAIN=$ac_cv_f77_dummy_main if test "$F77_DUMMY_MAIN" != unknown; then : if test $F77_DUMMY_MAIN != none; then cat >>confdefs.h <<_ACEOF #define F77_DUMMY_MAIN $F77_DUMMY_MAIN _ACEOF if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then $as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 $as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; } if ${ac_cv_f77_mangling+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return end subroutine foo_bar() return end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS LIBS="cfortran_test.$ac_objext $LIBS $FLIBS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_success=no for ac_foobar in foobar FOOBAR; do for ac_underscore in "" "_"; do ac_func="$ac_foobar$ac_underscore" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_success=yes; break 2 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done done ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test "$ac_success" = "yes"; then case $ac_foobar in foobar) ac_case=lower ac_foo_bar=foo_bar ;; FOOBAR) ac_case=upper ac_foo_bar=FOO_BAR ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_success_extra=no for ac_extra in "" "_"; do ac_func="$ac_foo_bar$ac_underscore$ac_extra" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_success_extra=yes; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test "$ac_success_extra" = "yes"; then ac_cv_f77_mangling="$ac_case case" if test -z "$ac_underscore"; then ac_cv_f77_mangling="$ac_cv_f77_mangling, no underscore" else ac_cv_f77_mangling="$ac_cv_f77_mangling, underscore" fi if test -z "$ac_extra"; then ac_cv_f77_mangling="$ac_cv_f77_mangling, no extra underscore" else ac_cv_f77_mangling="$ac_cv_f77_mangling, extra underscore" fi else ac_cv_f77_mangling="unknown" fi else ac_cv_f77_mangling="unknown" fi LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 $as_echo "$ac_cv_f77_mangling" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in "lower case, no underscore, no extra underscore") $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h $as_echo "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 $as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu SUBDIRS="C Fortran" TSTDIRS="C Fortran" INSTDIR="Fortran" fi fi # System-dependent system libraries (for building the sharable library). #----------------------------------------------------------------------- # Darwin (contains stubs for long double). as_ac_Lib=`$as_echo "ac_cv_lib_SystemStubs_printf\\$LDBLStub" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf\$LDBLStub in -lSystemStubs" >&5 $as_echo_n "checking for printf\$LDBLStub in -lSystemStubs... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lSystemStubs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char printf\$LDBLStub (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return printf\$LDBLStub (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : LIBS="$LIBS -lSystemStubs" fi # Library and installation utilities. #------------------------------------ # Static library generation. if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi # Shared library generation. if test "x$ac_cv_c_compiler_gnu" = xyes ; then SHVER=`echo "$LIBVER" | sed -e 's/\..*$//'` # Note that -fPIC is on by default for Macs, this just makes it obvious. SHRFLAGS="-fPIC" SHRLD="\$(CC) \$(SHRFLAGS)" case "$build_os" in darwin*) SHRLIB="libwcs.$LIBVER.dylib" SONAME="libwcs.$SHVER.dylib" SHRLD="$SHRLD -dynamiclib -single_module" SHRLD="$SHRLD -compatibility_version $SHVER -current_version $LIBVER" SHRLN= case "$build_cpu" in powerpc*) # Switch off -fPIC (not applicable for PowerPC Macs). CFLAGS="$CFLAGS -mdynamic-no-pic" ;; esac ;; *) # Covers Linux and Solaris at least. SHRLIB="libwcs.so.$LIBVER" SONAME="libwcs.so.$SHVER" SHRLD="$SHRLD -shared -Wl,-h\$(SONAME)" SHRLN="libwcs.so" ;; esac else SHRLIB= SONAME= SHRFLAGS= SHRLD= SHRSFX= SHRLN= fi # Installation utilities. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: End of primary configuration. " >&5 $as_echo "$as_me: End of primary configuration. " >&6;} # The following are required to build utilities and test programs. # ---------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: Looking for libraries etc. for utilities and test suite..." >&5 $as_echo "$as_me: Looking for libraries etc. for utilities and test suite..." >&6;} # Check for other quasi-standard header files. for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done # Large file support. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } if ${ac_cv_sys_largefile_source+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* for off_t */ #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_largefile_source=no; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGEFILE_SOURCE 1 #include /* for off_t */ #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_largefile_source=1; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_cv_sys_largefile_source=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 $as_echo "$ac_cv_sys_largefile_source" >&6; } case $ac_cv_sys_largefile_source in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source _ACEOF ;; esac rm -rf conftest* # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug # in glibc 2.1.3, but that breaks too many other things. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. if test $ac_cv_sys_largefile_source != unknown; then $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h fi # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi # Extra places to look for third-party libraries and header files. LIBDIRS= # Check whether --with-cfitsio was given. if test "${with_cfitsio+set}" = set; then : withval=$with_cfitsio; fi if test "x$with_cfitsio" = xno ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: CFITSIO disabled" >&5 $as_echo "$as_me: WARNING: CFITSIO disabled" >&2;} else # Check whether --with-cfitsiolib was given. if test "${with_cfitsiolib+set}" = set; then : withval=$with_cfitsiolib; fi if test "x$with_cfitsiolib" != x ; then LIBDIRS="$LIBDIRS $with_cfitsiolib" fi # Check whether --with-cfitsioinc was given. if test "${with_cfitsioinc+set}" = set; then : withval=$with_cfitsioinc; fi if test "x$with_cfitsioinc" != x ; then CFITSIO_INCDIRS="$with_cfitsioinc" fi CFITSIO_INCDIRS="$CFITSIO_INCDIRS \ /usr/local/cfitsio/include \ /local/cfitsio/include" LIBDIRS="$LIBDIRS \ /usr/local/cfitsio/lib \ /local/cfitsio/lib" fi # Check whether --with-pgplot was given. if test "${with_pgplot+set}" = set; then : withval=$with_pgplot; fi if test "x$with_pgplot" = xno ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PGPLOT disabled" >&5 $as_echo "$as_me: WARNING: PGPLOT disabled" >&2;} else # Check whether --with-pgplotlib was given. if test "${with_pgplotlib+set}" = set; then : withval=$with_pgplotlib; fi if test "x$with_pgplotlib" != x ; then LIBDIRS="$LIBDIRS $with_pgplotlib" fi # Check whether --with-pgplotinc was given. if test "${with_pgplotinc+set}" = set; then : withval=$with_pgplotinc; fi if test "x$with_pgplotinc" != x ; then PGPLOT_INCDIRS="$with_pgplotinc" fi PGPLOT_INCDIRS="$PGPLOT_INCDIRS \ /usr/local/pgplot/include \ /local/pgplot/include" LIBDIRS="$LIBDIRS \ /usr/local/pgplot/lib \ /local/pgplot/lib" fi if test "x$with_cfitsio" != xno -o \ "x$with_pgplot" != xno ; then LIBDIRS="$LIBDIRS \ /usr/local/lib \ /local/lib \ /opt/local/lib \ /opt/SUNWspro/lib \ /sw/lib" for LIBDIR in $LIBDIRS ; do as_ac_File=`$as_echo "ac_cv_file_$LIBDIR" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBDIR" >&5 $as_echo_n "checking for $LIBDIR... " >&6; } if eval \${$as_ac_File+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBDIR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi eval ac_res=\$$as_ac_File { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : LDFLAGS="$LDFLAGS -L$LIBDIR" else continue fi done # Generic include directories. INCDIRS="/usr/local/include \ /local/include \ /opt/local/include \ /sw/include \ /local \ /usr/include" # CFITSIO. if test "x$with_cfitsio" != xno ; then # Search for CFITSIO. for INCDIR in $CFITSIO_INCDIRS $INCDIRS ; do as_ac_File=`$as_echo "ac_cv_file_$INCDIR/cfitsio/fitsio.h" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $INCDIR/cfitsio/fitsio.h" >&5 $as_echo_n "checking for $INCDIR/cfitsio/fitsio.h... " >&6; } if eval \${$as_ac_File+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$INCDIR/cfitsio/fitsio.h"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi eval ac_res=\$$as_ac_File { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : CFITSIOINC="-I$INCDIR/cfitsio"; break fi as_ac_File=`$as_echo "ac_cv_file_$INCDIR/fitsio.h" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $INCDIR/fitsio.h" >&5 $as_echo_n "checking for $INCDIR/fitsio.h... " >&6; } if eval \${$as_ac_File+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$INCDIR/fitsio.h"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi eval ac_res=\$$as_ac_File { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : CFITSIOINC="-I$INCDIR"; break fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recv in -lsocket" >&5 $as_echo_n "checking for recv in -lsocket... " >&6; } if ${ac_cv_lib_socket_recv+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char recv (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return recv (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_recv=yes else ac_cv_lib_socket_recv=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_recv" >&5 $as_echo "$ac_cv_lib_socket_recv" >&6; } if test "x$ac_cv_lib_socket_recv" = xyes; then : CFITSIOLIB="-lsocket" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffopen in -lcfitsio" >&5 $as_echo_n "checking for ffopen in -lcfitsio... " >&6; } if ${ac_cv_lib_cfitsio_ffopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfitsio $CFITSIOLIB $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ffopen (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return ffopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfitsio_ffopen=yes else ac_cv_lib_cfitsio_ffopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfitsio_ffopen" >&5 $as_echo "$ac_cv_lib_cfitsio_ffopen" >&6; } if test "x$ac_cv_lib_cfitsio_ffopen" = xyes; then : CFITSIOLIB="-lcfitsio $CFITSIOLIB" fi if test "x$CFITSIOINC" = x -o "x$CFITSIOLIB" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: CFITSIO not found, skipping CFITSIO-dependent tests." >&5 $as_echo "$as_me: WARNING: CFITSIO not found, skipping CFITSIO-dependent tests." >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: CFITSIO appears to be available." >&5 $as_echo "$as_me: CFITSIO appears to be available." >&6;} $as_echo "#define HAVE_CFITSIO 1" >>confdefs.h # Check for fits_read_wcstab, present in CFITSIO 3.004beta and later. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fits_read_wcstab in -lcfitsio" >&5 $as_echo_n "checking for fits_read_wcstab in -lcfitsio... " >&6; } if ${ac_cv_lib_cfitsio_fits_read_wcstab+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfitsio $CFITSIOLIB $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fits_read_wcstab (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return fits_read_wcstab (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfitsio_fits_read_wcstab=yes else ac_cv_lib_cfitsio_fits_read_wcstab=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfitsio_fits_read_wcstab" >&5 $as_echo "$ac_cv_lib_cfitsio_fits_read_wcstab" >&6; } if test "x$ac_cv_lib_cfitsio_fits_read_wcstab" = xyes; then : GETWCSTAB= else GETWCSTAB=getwcstab.o fi if test "x$GETWCSTAB" != x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fits_read_wcstab not found in CFITSIO, will use getwcstab.c to compile test programs." >&5 $as_echo "$as_me: WARNING: fits_read_wcstab not found in CFITSIO, will use getwcstab.c to compile test programs." >&2;} fi fi fi # PGPLOT. if test "x$F77" != x -a "x$with_pgplot" != xno ; then # Search for PGPLOT. for INCDIR in $PGPLOT_INCDIRS $INCDIRS ; do as_ac_File=`$as_echo "ac_cv_file_$INCDIR/pgplot/cpgplot.h" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $INCDIR/pgplot/cpgplot.h" >&5 $as_echo_n "checking for $INCDIR/pgplot/cpgplot.h... " >&6; } if eval \${$as_ac_File+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$INCDIR/pgplot/cpgplot.h"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi eval ac_res=\$$as_ac_File { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : PGPLOTINC="-I$INCDIR/pgplot"; break fi as_ac_File=`$as_echo "ac_cv_file_$INCDIR/cpgplot.h" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $INCDIR/cpgplot.h" >&5 $as_echo_n "checking for $INCDIR/cpgplot.h... " >&6; } if eval \${$as_ac_File+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$INCDIR/cpgplot.h"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi eval ac_res=\$$as_ac_File { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : PGPLOTINC="-I$INCDIR"; break fi done # FLIBS (found above via AC_F77_LIBRARY_LDFLAGS) only helps if PGPLOT was # built using the same Fortran compiler that we are using here. # PGPLOT compiled by the SUN Fortran compiler but linked with something # else. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iand_ in -lM77" >&5 $as_echo_n "checking for iand_ in -lM77... " >&6; } if ${ac_cv_lib_M77_iand_+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lM77 $PGPLOTLIB $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char iand_ (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return iand_ (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_M77_iand_=yes else ac_cv_lib_M77_iand_=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_M77_iand_" >&5 $as_echo "$ac_cv_lib_M77_iand_" >&6; } if test "x$ac_cv_lib_M77_iand_" = xyes; then : PGPLOTLIB="-lM77 $PGPLOTLIB" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for f77_init in -lF77" >&5 $as_echo_n "checking for f77_init in -lF77... " >&6; } if ${ac_cv_lib_F77_f77_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lF77 $PGPLOTLIB $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char f77_init (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return f77_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_F77_f77_init=yes else ac_cv_lib_F77_f77_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_F77_f77_init" >&5 $as_echo "$ac_cv_lib_F77_f77_init" >&6; } if test "x$ac_cv_lib_F77_f77_init" = xyes; then : PGPLOTLIB="-lF77 $PGPLOTLIB" fi if test "x$F77" != xg77; then # For PGPLOT compiled with g77 but linked with something else. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lfrtbegin" >&5 $as_echo_n "checking for main in -lfrtbegin... " >&6; } if ${ac_cv_lib_frtbegin_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfrtbegin $PGPLOTLIB $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_frtbegin_main=yes else ac_cv_lib_frtbegin_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_frtbegin_main" >&5 $as_echo "$ac_cv_lib_frtbegin_main" >&6; } if test "x$ac_cv_lib_frtbegin_main" = xyes; then : PGPLOTLIB="-lfrtbegin $PGPLOTLIB" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gerror_ in -lg2c" >&5 $as_echo_n "checking for gerror_ in -lg2c... " >&6; } if ${ac_cv_lib_g2c_gerror_+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lg2c $PGPLOTLIB $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gerror_ (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return gerror_ (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_g2c_gerror_=yes else ac_cv_lib_g2c_gerror_=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_g2c_gerror_" >&5 $as_echo "$ac_cv_lib_g2c_gerror_" >&6; } if test "x$ac_cv_lib_g2c_gerror_" = xyes; then : PGPLOTLIB="-lg2c $PGPLOTLIB" fi fi if test "x$F77" != xgfortran; then # For PGPLOT compiled with gfortran but linked with something else. # Note that if gfortran itself is driving the linker it can be harmful # to add -lgfortran to the link list without also adding -lgfortranbegin. # Doing so stops gfortran from adding -lgfortranbegin which is needed to # resolve "main". { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _gfortran_abort in -lgfortran" >&5 $as_echo_n "checking for _gfortran_abort in -lgfortran... " >&6; } if ${ac_cv_lib_gfortran__gfortran_abort+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgfortran $PGPLOTLIB $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _gfortran_abort (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return _gfortran_abort (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gfortran__gfortran_abort=yes else ac_cv_lib_gfortran__gfortran_abort=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gfortran__gfortran_abort" >&5 $as_echo "$ac_cv_lib_gfortran__gfortran_abort" >&6; } if test "x$ac_cv_lib_gfortran__gfortran_abort" = xyes; then : PGPLOTLIB="-lgfortran $PGPLOTLIB" fi fi # Search for X11 includes and libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "x$no_x" = x; then if test "x$ac_x_libraries" != x ; then # Not needed for systems that keep the X11 libraries in /usr/lib. LDFLAGS="$LDFLAGS -L$ac_x_libraries" fi PGPLOTLIB="-lX11 $PGPLOTLIB" fi # It is possible that other libraries may be required depending on what # graphics drivers were installed with PGPLOT. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5 $as_echo_n "checking for deflate in -lz... " >&6; } if ${ac_cv_lib_z_deflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $PGPLOTLIB $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char deflate (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return deflate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_deflate=yes else ac_cv_lib_z_deflate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5 $as_echo "$ac_cv_lib_z_deflate" >&6; } if test "x$ac_cv_lib_z_deflate" = xyes; then : PGPLOTLIB="-lz $PGPLOTLIB" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_error in -lpng" >&5 $as_echo_n "checking for png_error in -lpng... " >&6; } if ${ac_cv_lib_png_png_error+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpng $PGPLOTLIB $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char png_error (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return png_error (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_png_png_error=yes else ac_cv_lib_png_png_error=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_error" >&5 $as_echo "$ac_cv_lib_png_png_error" >&6; } if test "x$ac_cv_lib_png_png_error" = xyes; then : PGPLOTLIB="-lpng $PGPLOTLIB" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pgbeg_ in -lpgplot" >&5 $as_echo_n "checking for pgbeg_ in -lpgplot... " >&6; } if ${ac_cv_lib_pgplot_pgbeg_+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpgplot $PGPLOTLIB $FLIBS $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pgbeg_ (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return pgbeg_ (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pgplot_pgbeg_=yes else ac_cv_lib_pgplot_pgbeg_=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pgplot_pgbeg_" >&5 $as_echo "$ac_cv_lib_pgplot_pgbeg_" >&6; } if test "x$ac_cv_lib_pgplot_pgbeg_" = xyes; then : PGPLOTLIB="-lpgplot $PGPLOTLIB" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpgbeg in -lcpgplot" >&5 $as_echo_n "checking for cpgbeg in -lcpgplot... " >&6; } if ${ac_cv_lib_cpgplot_cpgbeg+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpgplot $PGPLOTLIB $FLIBS $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cpgbeg (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return cpgbeg (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpgplot_cpgbeg=yes else ac_cv_lib_cpgplot_cpgbeg=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpgplot_cpgbeg" >&5 $as_echo "$ac_cv_lib_cpgplot_cpgbeg" >&6; } if test "x$ac_cv_lib_cpgplot_cpgbeg" = xyes; then : PGPLOTLIB="-lcpgplot $PGPLOTLIB" else PGPLOTLIB= fi # Only need the PGPLOT include file to build PGSBOX. if test "x$PGPLOTINC" != x; then SUBDIRS="$SUBDIRS pgsbox" INSTDIR="pgsbox" fi # Also need the PGPLOT library to build pgtest and cpgtest. if test "x$PGPLOTLIB" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PGPLOT not found, skipping PGPLOT-dependent tests." >&5 $as_echo "$as_me: WARNING: PGPLOT not found, skipping PGPLOT-dependent tests." >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: PGPLOT appears to be available." >&5 $as_echo "$as_me: PGPLOT appears to be available." >&6;} TSTDIRS="$TSTDIRS pgsbox" fi fi fi # Utilities are compiled last since they need the libraries. # Ways of disabling them: # configure --disable-utils # configure --enable-utils=no # Check whether --enable-utils was given. if test "${enable_utils+set}" = set; then : enableval=$enable_utils; fi if test "x$enable_utils" != xno ; then SUBDIRS="$SUBDIRS utils" INSTDIR="$INSTDIR utils" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compilation of WCS utilities disabled" >&5 $as_echo "$as_me: WARNING: Compilation of WCS utilities disabled" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: End of auxiliary configuration. " >&5 $as_echo "$as_me: End of auxiliary configuration. " >&6;} # Do it. { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring files..." >&5 $as_echo "$as_me: Configuring files..." >&6;} ac_config_files="$ac_config_files makedefs wcslib.pc" ac_config_headers="$ac_config_headers wcsconfig.h wcsconfig_f77.h wcsconfig_tests.h wcsconfig_utils.h" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by WCSLIB $as_me 5.10, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ WCSLIB config.status 5.10 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "makedefs") CONFIG_FILES="$CONFIG_FILES makedefs" ;; "wcslib.pc") CONFIG_FILES="$CONFIG_FILES wcslib.pc" ;; "wcsconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS wcsconfig.h" ;; "wcsconfig_f77.h") CONFIG_HEADERS="$CONFIG_HEADERS wcsconfig_f77.h" ;; "wcsconfig_tests.h") CONFIG_HEADERS="$CONFIG_HEADERS wcsconfig_tests.h" ;; "wcsconfig_utils.h") CONFIG_HEADERS="$CONFIG_HEADERS wcsconfig_utils.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi astropy-1.1.1/cextern/wcslib/VALIDATION0000644001134200020070000003635612644017723020452 0ustar embrayscience00000000000000Platforms on which the installation procedures and test suite were exercised WCSLIB version 5.10 (2015/10/09) -------------------------------- * Dell Latitude D620 (Intel Centrino T2300, 2 processors, i686) Debian linux 8.0 (jessie) uname -r (kernel version): 3.16.0-4-686-pae gcc --version: gcc (Debian 4.9.2-10) 4.9.2 gfortran --version: GNU Fortran (Debian 4.9.2-10) 4.9.2 WCSLIB version 5.9 (2015/07/21) ------------------------------- * Dell Latitude D620 (Intel Centrino T2300, 2 processors, i686) Debian linux 8.0 (jessie) uname -r (kernel version): 3.16.0-4-686-pae gcc --version: gcc (Debian 4.9.2-10) 4.9.2 gfortran --version: GNU Fortran (Debian 4.9.2-10) 4.9.2 WCSLIB version 5.8 (2015/07/08) ------------------------------- * Dell Latitude D620 (Intel Centrino T2300, 2 processors, i686) Debian linux 8.0 (jessie) uname -r (kernel version): 3.16.0-4-686-pae gcc --version: gcc (Debian 4.9.2-10) 4.9.2 gfortran --version: GNU Fortran (Debian 4.9.2-10) 4.9.2 WCSLIB version 5.7 (2015/06/29) ------------------------------- * Dell Latitude D620 (Intel Centrino T2300, 2 processors, i686) Debian linux 8.0 (jessie) uname -r (kernel version): 3.16.0-4-686-pae gcc --version: gcc (Debian 4.9.2-10) 4.9.2 gfortran --version: GNU Fortran (Debian 4.9.2-10) 4.9.2 WCSLIB version 5.6 (2015/06/14) ------------------------------- * Dell Latitude D620 (Intel Centrino T2300, 2 processors, i686) Debian linux 8.0 (jessie) uname -r (kernel version): 3.16.0-4-686-pae gcc --version: gcc (Debian 4.9.2-10) 4.9.2 gfortran --version: GNU Fortran (Debian 4.9.2-10) 4.9.2 WCSLIB version 5.5 (2015/05/05) ------------------------------- * Dell Latitude D620 (Intel Centrino T2300, 2 processors, i686) Debian linux 7.8 (wheezy) uname -r (kernel version): 3.2.0-4-686-pae gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 WCSLIB version 5.4 (2015/04/21) ------------------------------- * Dell Latitude D620 (Intel Centrino T2300, 2 processors, i686) Debian linux 7.8 (wheezy) uname -r (kernel version): 3.2.0-4-686-pae gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 WCSLIB version 5.3 (2015/04/21) ------------------------------- * Dell Latitude D620 (Intel Centrino T2300, 2 processors, i686) Debian linux 7.8 (wheezy) uname -r (kernel version): 3.2.0-4-686-pae gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 WCSLIB version 5.2 beta release (2015/04/15) -------------------------------------------- * Dell Latitude D620 (Intel Centrino T2300, 2 processors, i686) Debian linux 7.8 (wheezy) uname -r (kernel version): 3.2.0-4-686-pae gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 * Dell PowerEdge R710 (Intel Xeon E5530, 8 processors, amd64) Debian linux 7.8 (wheezy) uname -r (kernel version): 3.2.0-4-amd64 gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 (Non-graphical tests only.) * Mac Mini (Intel Core i7, 4 cores, x86_64) MacOSX 10.9.5 (13F1066) uname -r (kernel version): Darwin 13.4.0 gcc --version: gcc (GCC) 4.8.3 gfortran --version: GNU Fortran (GCC) 4.8.3 (Non-graphical tests only.) WCSLIB version 5.1 beta release (2015/04/07) -------------------------------------------- * Dell Latitude D620 (Intel Centrino T2300, 2 processors, i686) Debian linux 7.8 (wheezy) uname -r (kernel version): 3.2.0-4-686-pae gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 WCSLIB version 5.0 beta release (2015/04/05) -------------------------------------------- * Dell Latitude D620 (Intel Centrino T2300, 2 processors, i686) Debian linux 7.8 (wheezy) uname -r (kernel version): 3.2.0-4-686-pae gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 * Dell PowerEdge R710 (Intel Xeon E5530, 8 processors, amd64) Debian linux 7.8 (wheezy) uname -r (kernel version): 3.2.0-4-amd64 gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 (Non-graphical tests only.) * Dell PowerEdge R820 (Intel Xeon E5-4620, 32 processors, amd64) Debian linux 6.0.10 (squeeze) uname -r (kernel version): 3.2.0-0.bpo.4-amd64 gcc --version: gcc (Debian 4.4.5-8) 4.4.5 gfortran --version: GNU Fortran (Debian 4.4.5-8) 4.4.5 (Non-graphical tests only.) * Mac Mini (Intel Core i7, 4 cores, x86_64) MacOSX 10.9.5 (13F1066) uname -r (kernel version): Darwin 13.4.0 gcc --version: gcc (GCC) 4.8.3 gfortran --version: GNU Fortran (GCC) 4.8.3 (Non-graphical tests only.) WCSLIB version 4.23 (2014/05/11) -------------------------------- * Dell Latitude D620 (Intel Centrino, i686) running Debian linux 7.0 (wheezy) uname -r (kernel version): 3.2.0-4-686-pae gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 WCSLIB version 4.22 (2014/04/13) -------------------------------- * Dell Latitude D620 (Intel Centrino, i686) running Debian linux 7.0 (wheezy) uname -r (kernel version): 3.2.0-4-686-pae gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 * Dell PowerEdge R710 (Intel Xeon, x86_64) running Debian linux 6.0.9 (squeeze) uname -r (kernel version): 2.6.32-5-amd64 gcc --version: gcc (Debian 4.4.5-8) 4.4.5 gfortran --version: GNU Fortran (Debian 4.4.5-8) 4.4.5 * Mac Mini (Intel Core 2 Duo) running MacOSX 10.6.8 (10K549) uname -r (kernel version): 10.8.0 gcc --version: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) gfortran --version: GNU Fortran (GCC) 4.5.0 20100107 (experimental) (Non-graphics tests only.) WCSLIB version 4.21 (2014/03/24) -------------------------------- * Dell Latitude D620 (Intel Centrino, i686) running Debian linux 7.0 (wheezy) uname -r (kernel version): 3.2.0-4-686-pae gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 WCSLIB version 4.20 (2013/12/18) -------------------------------- * Dell Latitude D620 (Intel Centrino, i686) running Debian linux 7.0 (wheezy) uname -r (kernel version): 3.2.0-4-686-pae gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 WCSLIB version 4.19 (2013/09/30) -------------------------------- * Dell Latitude D620 (Intel Centrino, i686) running Debian linux 7.0 (wheezy) uname -r (kernel version): 3.2.0-4-686-pae gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 WCSLIB version 4.18 (2013/07/12) -------------------------------- * Dell Latitude D620 (Intel Centrino, i686) running Debian linux 7.0 (wheezy) uname -r (kernel version): 3.2.0-4-686-pae gcc --version: gcc (Debian 4.7.2-5) 4.7.2 gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2 WCSLIB version 4.17 (2013/01/29) -------------------------------- * Dell Latitude D620 (Intel Centrino, i686) running Debian linux 5.0.9 (lenny) uname -r (kernel version): 2.6.26-2-686 gcc --version: gcc (Debian 4.3.2-1.1) 4.3.2 gfortran --version: GNU Fortran (Debian 4.3.2-1.1) 4.3.2 WCSLIB version 4.15 (2012/09/26) -------------------------------- * Dell Latitude D620 (Intel Centrino, i686) running Debian linux 5.0.9 (lenny) uname -r (kernel version): 2.6.26-2-686 gcc --version: gcc (Debian 4.3.2-1.1) 4.3.2 gfortran --version: GNU Fortran (Debian 4.3.2-1.1) 4.3.2 WCSLIB version 4.14 (2012/07/13) -------------------------------- * Dell Latitude D620 (Intel Centrino, i686) running Debian linux 5.0.9 (lenny) uname -r (kernel version): 2.6.26-2-686 gcc --version: gcc (Debian 4.3.2-1.1) 4.3.2 gfortran --version: GNU Fortran (Debian 4.3.2-1.1) 4.3.2 * MacBook Pro (Intel Core 2 Duo) running MacOSX 10.7.3 (11D50) uname -r (Darwin kernel version): 11.3.0 gcc --version: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Apple Inc. build 5658) (LLVM build 2336.1.00) gfortran --version: GNU Fortran (GCC) 4.6.1 (Non-graphics tests only.) WCSLIB version 4.13.1 (2012/03/15) ---------------------------------- * Dell Latitude D630 (Intel Centrino, i686) running Debian linux 5.0.9 (lenny) uname -r (kernel version): 2.6.32-bpo.5-686 gcc --version: gcc (Debian 4.3.2-1.1) 4.3.2 gfortran --version: GNU Fortran (Debian 4.3.2-1.1) 4.3.2 * MacBook Pro (Intel Core 2 Duo) running MacOSX 10.7.3 (11D50) uname -r (Darwin kernel version): 11.3.0 gcc --version: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Apple Inc. build 5658) (LLVM build 2336.1.00) gfortran --version: GNU Fortran (GCC) 4.6.1 (Non-graphics tests only.) WCSLIB version 4.10 (2012/02/06) -------------------------------- * Dell Latitude D630 (Intel Centrino, i686) running Debian linux 5.0.9 (lenny) uname -r (kernel version): 2.6.32-bpo.5-686 gcc --version: gcc (Debian 4.3.2-1.1) 4.3.2 gfortran --version: GNU Fortran (Debian 4.3.2-1.1) 4.3.2 WCSLIB version 4.8 (2011/08/15) ------------------------------- * Dell Latitude D620 (Intel Centrino Duo, i686), Debian linux 4.0 (etch) uname -r (kernel version): 2.6.24-1-686 (32-bit) gcc --version: gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) g77 --version: GNU Fortran (GCC) 3.4.6 (Debian 3.4.6-5) * Dell PowerEdge 2950 (Intel Xeon, 8 x X5460), Debian linux 5.0.8 (lenny) uname -r (kernel version): 2.6.26-2-amd64 (64-bit) gcc --version: gcc (Debian 4.3.2-1.1) 4.3.2 gfortran --version: GNU Fortran (Debian 4.3.2-1.1) 4.3.2 * Marvell SheevaPlug (Feroceon 88FR131 rev 1 ARM v5L), Debian linux 6.0 (squeeze) uname -r (kernel version): 2.6.32-5-kirkwood gcc --version: gcc (Debian 4.4.5-8) 4.4.5 gfortran --version: GNU Fortran (Debian 4.4.5-8) 4.4.5 * Mac mini (Intel Core 2 Duo) running MacOSX 10.6.2 (10C540) uname -r (Darwin kernel version): 10.2.0 gcc --version: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) gfortran --version: GNU Fortran (GCC) 4.5.0 20100107 (experimental) * Enterprise 450 Model 2250 (Sparc, sun4u 64-bit), SunOS 5.9 (Solaris 9) uname -r (SunOS version): 5.9 gcc --version: gcc (GCC) 4.5.1 gfortran --version: GNU Fortran (GCC) 4.5.1 WCSLIB version 4.7 (2011/02/07) ------------------------------- * Dell Latitude D630 (Intel Centrino, i686) running Debian linux 4.0 (etch) uname -r (kernel version): 2.6.24-1-686 gcc --version: gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) g77 --version: GNU Fortran (GCC) 3.4.6 (Debian 3.4.6-5) * Sun SunFire V20z (AMD Opteron, x86_64) running Debian linux 4.0 (etch) uname -r (kernel version): 2.6.18-6-amd64 gcc --version: gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) g77 --version: GNU Fortran (GCC) 3.4.6 (Debian 3.4.6-5) * Enterprise 450 Model 2250 (Sparc, sun4u 64-bit), SunOS 5.9 (Solaris 9) uname -r (SunOS version): 5.9 gcc --version: gcc (GCC) 4.5.1 gfortran --version: GNU Fortran (GCC) 4.5.1 and cc -V: cc: Sun WorkShop 6 update 2 C 5.3 Patch 111679-14 2004/02/20 f77 -V: f77: Sun WorkShop 6 update 2 FORTRAN 77 5.3 Patch 111691-07 2004/04/23 * Mac Xserve (Quad-Core Intel Xeon) running MacOSX 10.6.5 (10H575) uname -r (Darwin kernel version): 10.5.0 gcc --version: 4.2.1 (Apple Inc. build 5664) gfortran --version: GNU Fortran (GCC) 4.5.0 20100107 (experimental) * Mac mini (Intel Core 2 Duo) running MacOSX 10.6.2 (10C540) uname -r (Darwin kernel version): 10.2.0 gcc --version: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) gfortran --version: GNU Fortran (GCC) 4.5.0 20100107 (experimental) * Mac mini (Intel Core Duo) running MacOSX 10.4.9 (8P2137) uname -r (Darwin kernel version): 8.9.1 gcc --version: gcc (GCC) 4.3.0 20070316 (experimental) g77 --version: GNU Fortran (GCC) 3.4.0 WCSLIB version 4.5 (2010/07/16) ------------------------------- * Dell Latitude D630 (Intel Centrino, i686) running Debian linux 4.0 (etch) uname -r (kernel version): 2.6.24-1-686 gcc --version: gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) g77 --version: GNU Fortran (GCC) 3.4.6 (Debian 3.4.6-5) and gcc --version: gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) ifort -V: Intel(R) Fortran Compiler for 32-bit applications, Version 8.1 Build 20041118Z Package ID: l_fc_pc_8.1.023 * Mac mini (Intel Core 2 Duo, i386) running MacOSX 10.6.2 (10C540) uname -r (Darwin kernel version): 10.2.0 gcc --version: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) gfortran --version: GNU Fortran (GCC) 4.5.0 20100107 (experimental) * Mac mini (Intel Core Duo, i386) running MacOSX 10.4.9 (8P2137) uname -r (Darwin kernel version): 8.9.1 gcc --version: gcc (GCC) 4.3.0 20070316 (experimental) g77 --version: GNU Fortran (GCC) 3.4.0 and gcc --version: gcc (GCC) 4.3.0 20070316 (experimental) gfortran --version: GNU Fortran (GCC) 4.3.0 20070316 (experimental) * Sun SunFire V20z (AMD Opteron, x86_64) running Debian linux 4.0 (etch) uname -r (kernel version): 2.6.18-6-amd64 gcc --version: gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) g77 --version: GNU Fortran (GCC) 3.4.6 (Debian 3.4.6-5) and gcc --version: gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) gfortran --version: GNU Fortran 95 (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) * Sun Ultra-60 (Sparc, sun4u) running SunOS 5.6 (Solaris 2.6) uname -r (SunOS version): 5.6 gcc --version: 2.95.3 g77 --version: GNU Fortran 0.5.25 20010315 (release) and cc -V: cc: Sun WorkShop 6 update 2 C 5.3 Patch 111679-14 2004/02/20 f77 -V: f77: Sun WorkShop 6 update 2 FORTRAN 77 5.3 Patch 111691-07 2004/04/23 WCSLIB version 4.4 (2009/08/06) ------------------------------- * Dell Latitude D630 (Intel Centrino, i686) running Debian linux 4.0 (etch) uname -r (kernel version): 2.6.24-1-686 gcc --version: gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) g77 --version: GNU Fortran (GCC) 3.4.6 (Debian 3.4.6-5) * Mac mini (Intel Core Duo, i386) running MacOSX 10.4.9 (8P2137) uname -r (Darwin kernel version): 8.9.1 gcc --version: gcc (GCC) 4.3.0 20070316 (experimental) g77 --version: GNU Fortran (GCC) 3.4.0 and gcc --version: gcc (GCC) 4.3.0 20070316 (experimental) gfortran --version: GNU Fortran (GCC) 4.3.0 20070316 (experimental) * Sun SunFire V20z (AMD Opteron, x86_64) running Debian linux 4.0 (etch) uname -r (kernel version): 2.6.18-6-amd64 gcc --version: gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) g77 --version: GNU Fortran (GCC) 3.4.6 (Debian 3.4.6-5) and gcc --version: gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) gfortran --version: GNU Fortran 95 (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) * Sun SunBlade 1000 (Sparc, sun4u) running SunOS 5.8 (Solaris 2.8) uname -r (SunOS version): 5.8 gcc --version: 2.95.3 g77 --version: GNU Fortran 0.5.25 20010315 (release) and cc -V: cc: Sun WorkShop 6 update 2 C 5.3 Patch 111679-14 2004/02/20 f77 -V: f77: Sun WorkShop 6 update 2 FORTRAN 77 5.3 Patch 111691-07 2004/04/23 ------------------------------------------------------------------------------ $Id: VALIDATION,v 5.10 2015/10/09 08:19:17 mcalabre Exp $ astropy-1.1.1/cextern/wcslib/THANKS0000644001134200020070000000453012644017723017775 0ustar embrayscience00000000000000I would like to acknowledge the following people who have contributed to WCSLIB and/or PGSBOX in some way since 1995 - via bug reports, patches, suggestions for improvements, positive feedback, etc. James M. Anderson (MPIfR) Robbie Auld (Cardiff U.) Klaus Banse (ESO) David Barnes (ATNF/CSIRO) David Berry (STARLINK & JAC) Emmanuel Bertin (IAP) David Binderman Jeremy Brewer (U. Pittsburgh) Wim Brouw (ATNF/CSIRO) Peter Bunclark (IoA, U. Cambridge) Pan Chai (GSFC/NASA) Charles Copley Neil Crighton Cesar Enrique Garcia Dabo (ESO) Lindsey Davis (NOAO) Ger van Diepen (ASTRON) Patrick Dowler (CADC/NRC) Michael Droettboom (STScI) Rick Ebert (IPAC/NASA) Ken Ebisawa (GSFC/NASA) Sébastien Fabbro (Gentoo linux maintainer) Octavi Fors (U. North Carolina) Bob Garwood (NRAO) Brian Glendenning (NRAO) Eric Greisen (NRAO) Michael Halle (AM/Harvard) Booth Hartley (IPAC/NASA) Phil Hodge (STScI) Bryan Irby (GSFC/NASA) Justin Jonas (Rhodes U.) Yves Jung (ESO) David Kaplan (KITP/UCSB) Daniel S. Katz (JPL/NASA) Neil Killeen (ATNF/CSIRO) David King (NRAO) Martin Kuemmel (U.-Sternwarte Muenchen) Paul F. Kunz (SLAC/Stanford U.) Jonas Møller Larsen (ESO) Paddy Leahy (U. Manchester) Jim Lewis (IoA, U. Cambridge) Marco Lombardi (ESO) Lars Kristian Lundin (ESO) Robert Lupton (Princeton U.) Craig Markwardt (GSFC/NASA) Malte Marquarding (ATNF/CSIRO) Jean-Baptiste Marquette (IAP) Tom Marsh (U. Warwick) Sean Mattingly (IPAC/NASA) Dave McConnell (ATNF/CSIRO) Thomas A. McGlynn (GSFC/NASA) Michelle Miller (NOAO) Jessica Mink (CfA) August Muench (CfA) Fergal Mullally (Princeton U.) Clive Page (U. Leicester) Sergio Pascual (U. Complutense de Madrid) Bill Pence (NASA/GSFC) Olivier Perdereau (LAL/IN2P3) Dirk Petry (ESO) Ray Plante (NCSA/UIUC) Paul Price (Princeton U.) Niruj Mohan Ramanujam (Leiden Obs) Harold Ravlin (U. Illinois) Thomas Robitaille (MPIA) Boud Roukema (TCfA) Keith A. Scollick (GSFC/NASA) Arno Schoenmakers (ASTRON) Colin Slater (LSST) Hanno Spreeuw (ASTRON) Ole Streicher (Debian maintainer) Hans Terlouw (Kapteyn, Groningen) Peter Teuben (U. Maryland) Harro Verkouter (JIVE) John C. Vernaleo (GSFC/NASA) Martin Vogelaar (Kapteyn, Groningen) Stephen Walton (CSUN) Boyd Waters NRAO) Randall Wayth (Curtin U.) Peter Weilbacher (AIP) Matthew Whiting (ATNF/CSIRO) Peter Williams (UCB) Daren Scot Wilson (NRAO) Tony Wong (ATNF/CSIRO) $Id: THANKS,v 5.10 2015/10/09 08:19:17 mcalabre Exp $ astropy-1.1.1/cextern/wcslib/wcsconfig_tests.h.in0000644001134200020070000000126712644017723023050 0ustar embrayscience00000000000000/*============================================================================ * * wcsconfig_test.h is generated from wcsconfig_test.h.in by 'configure'. It * contains C preprocessor definitions for compiling the WCSLIB 5.10 test/demo * programs. * * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. * http://www.atnf.csiro.au/people/Mark.Calabretta * $Id: wcsconfig_tests.h.in,v 5.10 2015/10/09 08:19:17 mcalabre Exp $ *===========================================================================*/ #include /* Define to 1 if the CFITSIO library is available. */ #undef HAVE_CFITSIO /* Define to the printf format modifier for size_t type. */ #undef MODZ astropy-1.1.1/cextern/wcslib/config/0000755001134200020070000000000012644022135020316 5ustar embrayscience00000000000000astropy-1.1.1/cextern/wcslib/config/mkinstalldirs0000755001134200020070000000530012602615515023126 0ustar embrayscience00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. scriptversion=2003-09-26.19 errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. " # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit 0 ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./-- && rmdir ./-- fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./-- "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: astropy-1.1.1/cextern/wcslib/config/config.guess0000755001134200020070000012675512602615515022662 0ustar embrayscience00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. timestamp='2011-10-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; hexagon:Linux:*:*) echo hexagon-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: astropy-1.1.1/cextern/wcslib/config/mdate-sh0000755001134200020070000001013012602615515021745 0ustar embrayscience00000000000000#!/bin/sh # Get modification time of a file or directory and pretty-print it. # Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME save_arg1="$1" # Find out how to get the extended ls output of a file or directory. if ls -L /dev/null 1>/dev/null 2>&1; then ls_command='ls -L -l -d' else ls_command='ls -l -d' fi # A `ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a # user named `Jan', or `Feb', etc. However, it's unlikely that `/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. set - x`$ls_command /` # Find which argument is the month. month= command= until test $month do shift # Add another shift to the command. command="$command shift;" case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac done # Get the extended ls output of the file or directory. set - x`eval "$ls_command \"\$save_arg1\""` # Remove all preceding arguments eval $command # Get the month. Next argument is day, followed by the year or time. case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac day=$2 # Here we have to deal with the problem that the ls output gives either # the time of day or the year. case $3 in *:*) set `date`; eval year=\$$# case $2 in Jan) nummonthtod=1;; Feb) nummonthtod=2;; Mar) nummonthtod=3;; Apr) nummonthtod=4;; May) nummonthtod=5;; Jun) nummonthtod=6;; Jul) nummonthtod=7;; Aug) nummonthtod=8;; Sep) nummonthtod=9;; Oct) nummonthtod=10;; Nov) nummonthtod=11;; Dec) nummonthtod=12;; esac # For the first six month of the year the time notation can also # be used for files modified in the last year. if (expr $nummonth \> $nummonthtod) > /dev/null; then year=`expr $year - 1` fi;; *) year=$3;; esac # The result. echo $day $month $year astropy-1.1.1/cextern/wcslib/config/config.sub0000755001134200020070000010503412602615515022310 0ustar embrayscience00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. timestamp='2011-09-09' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: astropy-1.1.1/cextern/wcslib/config/move-if-change0000755001134200020070000000037312602615515023040 0ustar embrayscience00000000000000#!/bin/sh # Like mv $1 $2, but if the files are the same, just delete $1. # Status is 0 if $2 is changed, 1 otherwise. if test -r $2; then if cmp -s $1 $2; then echo $2 is unchanged rm -f $1 else mv -f $1 $2 fi else mv -f $1 $2 fi astropy-1.1.1/cextern/wcslib/config/missing0000755001134200020070000002466612602615515021737 0ustar embrayscience00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2003-09-02.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: astropy-1.1.1/cextern/wcslib/config/install-sh0000755001134200020070000002017412602615515022332 0ustar embrayscience00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2003-09-24.23 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename= transform_arg= instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= usage="Usage: $0 [OPTION]... SRCFILE DSTFILE or: $0 -d DIR1 DIR2... In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. In the second, create the directory path DIR. Options: -b=TRANSFORMBASENAME -c copy source (using $cpprog) instead of moving (using $mvprog). -d create directories instead of installing files. -g GROUP $chgrp installed files to GROUP. -m MODE $chmod installed files to MODE. -o USER $chown installed files to USER. -s strip installed files (using $stripprog). -t=TRANSFORM --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) if test -z "$src"; then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if test -z "$src"; then echo "$0: no input file specified." >&2 exit 1 fi # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then instcmd=: chmodcmd= else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst"; then echo "$0: no destination specified." >&2 exit 1 fi # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift test -d "$pathcomp" || $mkdirprog "$pathcomp" pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $instcmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else # If we're going to rename the final executable, determine the name now. if test -z "$transformarg"; then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename \ | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename. test -z "$dstfile" && dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now remove or move aside any old file at destination location. We # try this two ways since rm can't unlink itself on some systems and # the destination file might be busy for other reasons. In this case, # the final cleanup might fail but the new file should still install # successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: astropy-1.1.1/cextern/wcslib/config/elisp-comp0000755001134200020070000000405612602615515022325 0ustar embrayscience00000000000000#!/bin/sh # Copyright (C) 1995, 2000, 2003 Free Software Foundation, Inc. # Franc,ois Pinard , 1995. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This script byte-compiles all `.el' files which are part of its # arguments, using GNU Emacs, and put the resulting `.elc' files into # the current directory, so disregarding the original directories used # in `.el' arguments. # # This script manages in such a way that all Emacs LISP files to # be compiled are made visible between themselves, in the event # they require or load-library one another. if test $# = 0; then echo 1>&2 "No files given to $0" exit 1 fi if test -z "$EMACS" || test "$EMACS" = "t"; then # Value of "t" means we are running in a shell under Emacs. # Just assume Emacs is called "emacs". EMACS=emacs fi tempdir=elc.$$ # Cleanup the temporary directory on exit. trap 'status=$?; rm -rf "$tempdir" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 mkdir $tempdir cp "$@" $tempdir ( cd $tempdir echo "(setq load-path (cons nil load-path))" > script $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $? mv *.elc .. ) || exit $? (exit 0); exit astropy-1.1.1/cextern/wcslib/flavours0000644001134200020070000001153112644017723020645 0ustar embrayscience00000000000000#----------------------------------------------------------------------------- # Makefile overrides for various combinations of architecture, operating # system and compiler. Used for development and testing only, not required # for building WCSLIB. # # Variables like CC and CFLAGS are exported into the environment so that they # will be seen by 'configure'. Thus, normal usage is as follows: # # make distclean # make FLAVOUR=Linux configure # make # # Reminder: add '-d' to FLFLAGS for debugging. # # $Id: flavours,v 5.10 2015/10/09 08:19:17 mcalabre Exp $ #----------------------------------------------------------------------------- # The list of FLAVOURs can be set on the command line. F := $(shell echo $(FLAVOURS) | tr a-z A-Z) ifeq "$F" "" F := FLAVOURS := "" endif ifeq "$F" "LINUX" override FLAVOURS := "" Linux Linuxp endif ifeq "$F" "SUN" override FLAVOURS := "" SUN/GNU SUN/GNU3 SUN/GNUp SUN/ANSI endif ifeq "$F" "PURE" override FLAVOURS := SUN/Pure SUN/Quant endif F := # Various C standards handled by features.h in Linux. FEATURES := ifeq "$(notdir $(shell pwd))" "utils" # To get off_t for fseeko() usage in fitshdr when gcc is invoked with the # -std=c89 (same as -ansi) or the -std=c99 options. FEATURES := -D_XOPEN_SOURCE endif # Linux with gcc/gfortran (also works for Darwin). ifeq "$(FLAVOUR)" "Linux" F := $(FLAVOUR) export CC := gcc -std=c89 -pedantic export CPPFLAGS := $(FEATURES) export CFLAGS := -g -O0 -Wall -Wpadded -Wno-long-long -fsanitize=address export F77 := gfortran export FFLAGS := -g -O0 -fimplicit-none -Wall -I. export LDFLAGS := -lasan VALGRIND := valgrind -v --leak-check=yes --track-origins=yes endif ifeq "$(FLAVOUR)" "Linuxp" F := $(FLAVOUR) export CC := gcc -std=c89 -pedantic export CPPFLAGS := $(FEATURES) export CFLAGS := -pg -g -O -Wall -Wpadded -Wno-long-long export FFLAGS := -pg -a -g -O -fimplicit-none -Wall -I. export LDFLAGS := -pg -g $(filter -L%, $(LDFLAGS)) override EXTRA_CLEAN := gmon.out bb.out endif # Solaris with gcc/gfortran 4.x (lynx). ifeq "$(FLAVOUR)" "SUN/GNU" F := $(FLAVOUR) export CC := gcc -std=c89 export CPPFLAGS := $(FEATURES) export CFLAGS := -g -Wall -Wpadded -Wno-long-long export F77 := gfortran export FFLAGS := -g -fimplicit-none -Wall -I. LD := gcc endif ifeq "$(FLAVOUR)" "SUN/GNU3" F := $(FLAVOUR) export CC := gcc-3.1.1 -std=c89 export CPPFLAGS := $(FEATURES) export CFLAGS := -g -Wall -Wpadded -Wno-long-long export F77 := g77-3.1.1 export FFLAGS := -g -Wimplicit -Wunused -Wno-globals -I. LD := gcc-3.1.1 endif ifeq "$(FLAVOUR)" "SUN/GNUp" F := $(FLAVOUR) export CC := gcc -std=c89 -pedantic export CPPFLAGS := $(FEATURES) export CFLAGS := -pg -a -g -O -Wall -Wpadded -Wno-long-long export FFLAGS := -pg -a -g -O -fimplicit-none -Wall -I. export LDFLAGS := -pg -a -g $(filter -L%, $(LDFLAGS)) override EXTRA_CLEAN := gmon.out bb.out endif # Solaris with SUN cc/f77. ifeq "$(FLAVOUR)" "SUN/ANSI" F := $(FLAVOUR) WCSTRIG := NATIVE export CC := cc export CFLAGS := -g -I/usr/local/include export F77 := f77 export FFLAGS := -g -erroff=WDECL_LOCAL_NOTUSED LD := f77 endif # Purify and quantify in Solaris. ifeq "$(FLAVOUR)" "SUN/Pure" F := $(FLAVOUR) WCSTRIG := NATIVE export CC := purify gcc export CFLAGS := -g export F77 := purify gcc export FFLAGS := -g -Wimplicit -Wno-globals -I. export LDFLAGS := $(filter -L%, $(LDFLAGS)) override EXTRA_CLEAN := *_pure_p*.[ao] *.pcv .pure ../C/*_pure_p*.[ao] endif ifeq "$(FLAVOUR)" "SUN/Quant" F := $(FLAVOUR) WCSTRIG := NATIVE export CC := quantify gcc export CFLAGS := -g export F77 := quantify gcc export FFLAGS := -g -Wimplicit -Wno-globals -I. export LDFLAGS := $(filter -L%, $(LDFLAGS)) override EXTRA_CLEAN := *_pure_q*.[ao] .pure endif ifneq "$F" "$(FLAVOUR)" override FLAVOUR := unrecognised endif # gmake uses FC in place of configure's F77. ifdef F77 FC := $(F77) endif ifndef TIMER TIMER := date +"%a %Y/%m/%d %X %z, executing on $$HOST" endif ifdef FLAVOUR TIMER := $(TIMER) ; echo " with $(FLAVOUR) FLAVOUR." endif # Experimental (see http://upstream-tracker.org/versions/wcslib.html). api-sanity-check : -@ $(RM) -r $@/ @ mkdir $@/ @ cp C/*.h C/$(SHRLIB) $@/ @ echo "$(LIBVER)" > $@/opts.xml @ echo "." >> $@/opts.xml @ echo "." >> $@/opts.xml @ echo "-Dwtbarr=wtbarr_s" >> $@/opts.xml cd $@ && api-sanity-checker -lib WCSLIB -d opts.xml \ -show-retval -gen -build -run show :: -@ echo 'For code development...' -@ echo ' FLAVOURS := $(FLAVOURS)' -@ echo ' FLAVOUR := $(FLAVOUR)' -@ echo ' VALGRIND := $(VALGRIND)' -@ echo ' EXTRA_CLEAN := $(EXTRA_CLEAN)' -@ echo '' astropy-1.1.1/cextern/wcslib/C/0000755001134200020070000000000012644022135017233 5ustar embrayscience00000000000000astropy-1.1.1/cextern/wcslib/C/wcspih.l0000644001134200020070000015116012644017723020720 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcspih.l,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * wcspih.l is a Flex description file containing the definition of a lexical * scanner for parsing the WCS keyrecords from a FITS primary image or image * extension header. * * wcspih.l requires Flex v2.5.4 or later. Refer to wcshdr.h for a description * of the user interface and operating notes. * * Implementation notes * -------------------- * Use of the WCSAXESa keyword is not mandatory. Its default value is "the * larger of NAXIS and the largest index of these keywords [i.e. CRPIXj, PCi_j * or CDi_j, CDELTi, CTYPEi, CRVALi, and CUNITi] found in the FITS header". * Consequently the definition of WCSAXESa effectively invalidates the use of * NAXIS for determining the number of coordinate axes and forces a preliminary * pass through the header to determine the "largest index" in headers where * WCSAXESa was omitted. * * Furthermore, since the use of WCSAXESa is optional, there is no way to * determine the number of coordinate representations (the "a" value) other * than by parsing all of the WCS keywords in the header; even if WCSAXESa was * specified for some representations it cannot be known in advance whether it * was specified for all of those present in the header. * * Hence the definition of WCSAXESa forces the scanner to be implemented in two * passes. The first pass is used to determine the number of coordinate * representations (up to 27) and the number of coordinate axes in each. * Effectively WCSAXESa is ignored unless it exceeds the "largest index" in * which case the keywords for the extra axes assume their default values. The * number of PVi_ma and PSi_ma keywords in each representation is also counted * in the first pass. * * On completion of the first pass, memory is allocated for an array of the * required number of wcsprm structs and each of these is initialized * appropriately. These structs are filled in the second pass. * * The parser does not check for duplicated keywords, it accepts the last * encountered. * *===========================================================================*/ /* Options. */ %option full %option never-interactive %option noyywrap %option outfile="wcspih.c" %option prefix="wcspih" /* Indices for parameterized keywords. */ Z1 [0-9] Z2 [0-9]{2} Z3 [0-9]{3} Z4 [0-9]{4} Z5 [0-9]{5} Z6 [0-9]{6} I1 [1-9] I2 [1-9][0-9] I3 [1-9][0-9]{2} I4 [1-9][0-9]{3} /* Alternate coordinate system identifier. */ ALT [ A-Z] /* Keyvalue data types. */ INTEGER [+-]?[0-9]+ FLOAT [+-]?([0-9]+\.?[0-9]*|\.[0-9]+)([eEdD][+-]?[0-9]+)? STRING '([^']|'')*' RECORD '[^']*' FIELD [a-zA-Z_][a-zA-Z_0-9.]* /* Inline comment syntax. */ INLINE " "*(\/.*)? /* Exclusive start states. */ %x CCia CCi_ja CCCCCia CCi_ma CCCCCCCa CCCCCCCC %x CROTAi PROJPn SIP2 SIP3 DSSAMDXY PLTDECSN %x VALUE INTEGER_VAL FLOAT_VAL STRING_VAL %x RECORD_VAL RECFIELD RECCOLON RECVALUE RECEND %x COMMENT %x DISCARD ERROR FLUSH %{ #include #include #include #include #include #include "wcsmath.h" #include "wcsprintf.h" #include "wcsutil.h" #include "dis.h" #include "wcs.h" #include "wcshdr.h" #define INTEGER 0 #define FLOAT 1 #define STRING 2 #define RECORD 3 #define PRIOR 1 #define SEQUENT 2 #define SIP 1 #define DSS 2 #define WAT 3 #define YY_DECL int wcspih(char *header, int nkeyrec, int relax, int ctrl, \ int *nreject, int *nwcs, struct wcsprm **wcs) #define YY_INPUT(inbuff, count, bufsize) \ { \ if (wcspih_nkeyrec) { \ strncpy(inbuff, wcspih_hdr, 80); \ inbuff[80] = '\n'; \ wcspih_hdr += 80; \ wcspih_nkeyrec--; \ count = 81; \ } else { \ count = YY_NULL; \ } \ } /* These global variables are required by YY_INPUT. */ char *wcspih_hdr; int wcspih_nkeyrec; int wcspih_final(int alts[], int ndp[], int ndq[], int distran, double dsstmp[], char *wat[], int *nwcs, struct wcsprm **wcs); int wcspih_inits(int naxis, int alts[], int dpq[], int npv[], int nps[], int ndp[], int ndq[], int distran, int *nwcs, struct wcsprm **wcs); void wcspih_naxes(int naxis, int i, int j, char a, int distype, int alts[], int dpq[], int *npptr); int wcspih_epoch(double *wptr, double epoch); int wcspih_vsource(double *wptr, double vsource); /* Used in preempting the call to exit() by yy_fatal_error(). */ jmp_buf wcspih_abort_jmp_env; #define exit(status) longjmp(wcspih_abort_jmp_env, status) %} %% /* Keyword indices, as used in the WCS papers, e.g. PCi_ja, PVi_ma. */ char a; int i, j, m, p, q; char *cptr, *errmsg, errtxt[80], *hptr, *keep, *keyname, *keyrec, keyword[16], strtmp[80], *wat[2], *watstr; int altlin, alts[27], distran, distype, dpq[27], dssflag, gotone, ialt, inttmp, ipass, ipx, ix, jx, naxis, ndp[27], ndq[27], nother, *npptr, nps[27], npass, npv[27], nvalid, rectype, sipflag, status, valtype, voff, watflag, watn; double dbltmp, dsstmp[20]; void *vptr, *wptr; struct disprm *disp, distem; struct wcsprm *wcsp, wcstem; int (*special)(double *, double); int yylex_destroy(void); naxis = 0; for (ialt = 0; ialt < 27; ialt++) { alts[ialt] = 0; dpq[ialt] = 0; npv[ialt] = 0; nps[ialt] = 0; ndp[ialt] = 0; ndq[ialt] = 0; } /* Parameters used to implement YY_INPUT. */ wcspih_hdr = header; wcspih_nkeyrec = nkeyrec; /* Our handle on the input stream. */ keyrec = header; hptr = header; keep = 0x0; /* For keeping tallies of keywords found. */ *nreject = 0; nvalid = 0; nother = 0; /* If strict, then also reject. */ if (relax & WCSHDR_strict) relax |= WCSHDR_reject; /* Keyword parameters. */ i = j = 0; m = 0; a = ' '; /* For decoding the keyvalue. */ valtype = -1; distype = 0; vptr = 0x0; /* For keywords that require special handling. */ altlin = 0; npptr = 0x0; special = 0x0; distran = 0; sipflag = 0; dssflag = 0; watflag = 0; watn = 0; /* The data structures produced. */ *nwcs = 0; *wcs = 0x0; /* Control variables. */ ipass = 1; npass = 2; /* Return here via longjmp() invoked by yy_fatal_error(). */ if (setjmp(wcspih_abort_jmp_env)) { return 3; } BEGIN(INITIAL); ^NAXIS" = "" "*{INTEGER}{INLINE} { keyname = "NAXISn"; if (ipass == 1) { sscanf(yytext, "NAXIS = %d", &naxis); if (naxis < 0) naxis = 0; BEGIN(FLUSH); } else { sscanf(yytext, "NAXIS = %d", &i); if (i < 0) { errmsg = "negative value of NAXIS ignored"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } } ^WCSAXES{ALT}=" "" "*{INTEGER} { sscanf(yytext, "WCSAXES%c= %d", &a, &i); if (i < 0) { errmsg = "negative value of WCSAXESa ignored"; BEGIN(ERROR); } else { valtype = INTEGER; vptr = 0x0; keyname = "WCSAXESa"; BEGIN(COMMENT); } } ^CRPIX { valtype = FLOAT; vptr = &(wcstem.crpix); keyname = "CRPIXja"; BEGIN(CCCCCia); } ^PC { valtype = FLOAT; vptr = &(wcstem.pc); altlin = 1; keyname = "PCi_ja"; BEGIN(CCi_ja); } ^CD { valtype = FLOAT; vptr = &(wcstem.cd); altlin = 2; keyname = "CDi_ja"; BEGIN(CCi_ja); } ^CDELT { valtype = FLOAT; vptr = &(wcstem.cdelt); keyname = "CDELTia"; BEGIN(CCCCCia); } ^CROTA { valtype = FLOAT; vptr = &(wcstem.crota); altlin = 4; keyname = "CROTAn"; BEGIN(CROTAi); } ^CUNIT { valtype = STRING; vptr = &(wcstem.cunit); keyname = "CUNITia"; BEGIN(CCCCCia); } ^CTYPE { valtype = STRING; vptr = &(wcstem.ctype); keyname = "CTYPEia"; BEGIN(CCCCCia); } ^CRVAL { valtype = FLOAT; vptr = &(wcstem.crval); keyname = "CRVALia"; BEGIN(CCCCCia); } ^LONPOLE { valtype = FLOAT; vptr = &(wcstem.lonpole); keyname = "LONPOLEa"; BEGIN(CCCCCCCa); } ^LATPOLE { valtype = FLOAT; vptr = &(wcstem.latpole); keyname = "LATPOLEa"; BEGIN(CCCCCCCa); } ^RESTFRQ { valtype = FLOAT; vptr = &(wcstem.restfrq); keyname = "RESTFRQa"; BEGIN(CCCCCCCa); } ^RESTFREQ { if (relax & WCSHDR_strict) { errmsg = "the RESTFREQ keyword is deprecated, use RESTFRQa"; BEGIN(ERROR); } else { valtype = FLOAT; vptr = &(wcstem.restfrq); unput(' '); keyname = "RESTFREQ"; BEGIN(CCCCCCCa); } } ^RESTWAV { valtype = FLOAT; vptr = &(wcstem.restwav); keyname = "RESTWAVa"; BEGIN(CCCCCCCa); } ^PV { valtype = FLOAT; vptr = &(wcstem.pv); npptr = npv; keyname = "PVi_ma"; BEGIN(CCi_ma); } ^PROJP { valtype = FLOAT; vptr = &(wcstem.pv); npptr = npv; keyname = "PROJPn"; BEGIN(PROJPn); } ^PS { valtype = STRING; vptr = &(wcstem.ps); npptr = nps; keyname = "PSi_ma"; BEGIN(CCi_ma); } ^CNAME { valtype = STRING; vptr = &(wcstem.cname); keyname = "CNAMEia"; BEGIN(CCCCCia); } ^CRDER { valtype = FLOAT; vptr = &(wcstem.crder); keyname = "CRDERia"; BEGIN(CCCCCia); } ^CSYER { valtype = FLOAT; vptr = &(wcstem.csyer); keyname = "CSYERia"; BEGIN(CCCCCia); } ^DATE-AVG { valtype = STRING; vptr = wcstem.dateavg; if (ctrl < -10) keep = keyrec; keyname = "DATE-AVG"; BEGIN(CCCCCCCC); } ^DATE-OBS { valtype = STRING; vptr = wcstem.dateobs; if (ctrl < -10) keep = keyrec; keyname = "DATE-OBS"; BEGIN(CCCCCCCC); } ^EPOCH{ALT}" " { sscanf(yytext, "EPOCH%c", &a); if (relax & WCSHDR_strict) { errmsg = "the EPOCH keyword is deprecated, use EQUINOXa"; BEGIN(ERROR); } else if (a == ' ' || relax & WCSHDR_EPOCHa) { valtype = FLOAT; vptr = &(wcstem.equinox); special = wcspih_epoch; unput(a); keyname = "EPOCH"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "EPOCH keyword may not have an alternate version code"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } ^EQUINOX { valtype = FLOAT; vptr = &(wcstem.equinox); keyname = "EQUINOXa"; BEGIN(CCCCCCCa); } ^MJD-AVG" " { valtype = FLOAT; vptr = &(wcstem.mjdavg); if (ctrl < -10) keep = keyrec; keyname = "MJD-AVG"; BEGIN(CCCCCCCC); } ^MJD-OBS" " { valtype = FLOAT; vptr = &(wcstem.mjdobs); if (ctrl < -10) keep = keyrec; keyname = "MJD-OBS"; BEGIN(CCCCCCCC); } ^OBSGEO-X { valtype = FLOAT; vptr = wcstem.obsgeo; if (ctrl < -10) keep = keyrec; keyname = "OBSGEO-X"; BEGIN(CCCCCCCC); } ^OBSGEO-Y { valtype = FLOAT; vptr = wcstem.obsgeo + 1; if (ctrl < -10) keep = keyrec; keyname = "OBSGEO-Y"; BEGIN(CCCCCCCC); } ^OBSGEO-Z { valtype = FLOAT; vptr = wcstem.obsgeo + 2; if (ctrl < -10) keep = keyrec; keyname = "OBSGEO-Z"; BEGIN(CCCCCCCC); } ^RADESYS { valtype = STRING; vptr = wcstem.radesys; keyname = "RADESYSa"; BEGIN(CCCCCCCa); } ^RADECSYS { if (relax & WCSHDR_RADECSYS) { valtype = STRING; vptr = wcstem.radesys; unput(' '); keyname = "RADECSYS"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "the RADECSYS keyword is deprecated, use RADESYSa"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } ^SPECSYS { valtype = STRING; vptr = wcstem.specsys; keyname = "SPECSYSa"; BEGIN(CCCCCCCa); } ^SSYSOBS { valtype = STRING; vptr = wcstem.ssysobs; keyname = "SSYSOBSa"; BEGIN(CCCCCCCa); } ^SSYSSRC { valtype = STRING; vptr = wcstem.ssyssrc; keyname = "SSYSSRCa"; BEGIN(CCCCCCCa); } ^VELANGL { valtype = FLOAT; vptr = &(wcstem.velangl); keyname = "VELANGLa"; BEGIN(CCCCCCCa); } ^VELOSYS { valtype = FLOAT; vptr = &(wcstem.velosys); keyname = "VELOSYSa"; BEGIN(CCCCCCCa); } ^VELREF{ALT}" " { sscanf(yytext, "VELREF%c", &a); if (relax & WCSHDR_strict) { errmsg = "the VELREF keyword is deprecated, use SPECSYSa"; BEGIN(ERROR); } else if (a == ' ' || relax & WCSHDR_VELREFa) { valtype = INTEGER; vptr = &(wcstem.velref); unput(a); keyname = "VELREF"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "VELREF keyword may not have an alternate version code"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } ^VSOURCE{ALT} { if (relax & WCSHDR_VSOURCE) { valtype = FLOAT; vptr = &(wcstem.zsource); special = wcspih_vsource; yyless(7); keyname = "VSOURCEa"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "the VSOURCEa keyword is deprecated, use ZSOURCEa"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } ^WCSNAME { valtype = STRING; vptr = wcstem.wcsname; keyname = "WCSNAMEa"; BEGIN(CCCCCCCa); } ^ZSOURCE { valtype = FLOAT; vptr = &(wcstem.zsource); keyname = "ZSOURCEa"; BEGIN(CCCCCCCa); } ^CPDIS { valtype = STRING; distype = PRIOR; vptr = &(distem.dtype); keyname = "CPDISja"; BEGIN(CCCCCia); } ^CQDIS { valtype = STRING; distype = SEQUENT; vptr = &(distem.dtype); keyname = "CQDISia"; BEGIN(CCCCCia); } ^DP { valtype = RECORD; distype = PRIOR; vptr = &(distem.dp); npptr = ndp; keyname = "DPja"; BEGIN(CCia); } ^DQ { valtype = RECORD; distype = SEQUENT; vptr = &(distem.dp); npptr = ndq; keyname = "DQia"; BEGIN(CCia); } ^CPERR { valtype = FLOAT; distype = PRIOR; vptr = &(distem.maxdis); keyname = "CPERRja"; BEGIN(CCCCCia); } ^CQERR { valtype = FLOAT; distype = SEQUENT; vptr = &(distem.maxdis); keyname = "CQERRia"; BEGIN(CCCCCia); } ^DVERR { valtype = FLOAT; distype = PRIOR; vptr = &(distem.totdis); keyname = "DVERRa"; BEGIN(CCCCCCCa); } ^A_ORDER" " { /* SIP: axis 1 polynomial degree (not stored). */ valtype = INTEGER; distype = PRIOR; vptr = 0x0; i = 1; a = ' '; keyname = "A_ORDER"; BEGIN(VALUE); } ^B_ORDER" " { /* SIP: axis 2 polynomial degree (not stored). */ valtype = INTEGER; distype = PRIOR; vptr = 0x0; i = 2; a = ' '; keyname = "B_ORDER"; BEGIN(VALUE); } ^AP_ORDER { /* SIP: axis 1 inverse polynomial degree (not stored). */ valtype = INTEGER; distype = PRIOR; vptr = 0x0; i = 1; a = ' '; keyname = "AP_ORDER"; BEGIN(VALUE); } ^BP_ORDER { /* SIP: axis 2 inverse polynomial degree (not stored). */ valtype = INTEGER; distype = PRIOR; vptr = 0x0; i = 2; a = ' '; keyname = "BP_ORDER"; BEGIN(VALUE); } ^A_DMAX" " { /* SIP: axis 1 maximum distortion. */ valtype = FLOAT; distype = PRIOR; vptr = &(distem.maxdis); i = 1; a = ' '; keyname = "A_DMAX"; BEGIN(VALUE); } ^B_DMAX" " { /* SIP: axis 2 maximum distortion. */ valtype = FLOAT; distype = PRIOR; vptr = &(distem.maxdis); i = 2; a = ' '; keyname = "B_DMAX"; BEGIN(VALUE); } ^A_ { /* SIP: axis 1 polynomial coefficient. */ i = 1; sipflag = 2; keyname = "A_p_q"; BEGIN(SIP2); } ^B_ { /* SIP: axis 2 polynomial coefficient. */ i = 2; sipflag = 2; keyname = "B_p_q"; BEGIN(SIP2); } ^AP_ { /* SIP: axis 1 inverse polynomial coefficient. */ i = 1; sipflag = 3; keyname = "AP_p_q"; BEGIN(SIP3); } ^BP_ { /* SIP: axis 2 inverse polynomial coefficient. */ i = 2; sipflag = 3; keyname = "BP_p_q"; BEGIN(SIP3); } ^CNPIX1" " { /* DSS: LLH corner pixel coordinate 1. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp; dssflag = 1; distran = DSS; keyname = "CNPIX1"; BEGIN(VALUE); } ^CNPIX2" " { /* DSS: LLH corner pixel coordinate 2. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+1; dssflag = 1; distran = DSS; keyname = "CNPIX1"; BEGIN(VALUE); } ^PPO3" " { /* DSS: plate centre x-coordinate in micron. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+2; dssflag = 1; distran = DSS; keyname = "PPO3"; BEGIN(VALUE); } ^PPO6" " { /* DSS: plate centre y-coordinate in micron. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+3; dssflag = 1; distran = DSS; keyname = "PPO6"; BEGIN(VALUE); } ^XPIXELSZ { /* DSS: pixel x-dimension in micron. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+4; dssflag = 1; distran = DSS; keyname = "XPIXELSZ"; BEGIN(VALUE); } ^YPIXELSZ { /* DSS: pixel y-dimension in micron. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+5; dssflag = 1; distran = DSS; keyname = "YPIXELSZ"; BEGIN(VALUE); } ^PLTRAH" " { /* DSS: plate centre, right ascension - hours. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+6; dssflag = 1; distran = DSS; keyname = "PLTRAH"; BEGIN(VALUE); } ^PLTRAM" " { /* DSS: plate centre, right ascension - minutes. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+7; dssflag = 1; distran = DSS; keyname = "PLTRAM"; BEGIN(VALUE); } ^PLTRAS" " { /* DSS: plate centre, right ascension - seconds. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+8; dssflag = 1; distran = DSS; keyname = "PLTRAS"; BEGIN(VALUE); } ^PLTDECSN { /* DSS: plate centre, declination - sign. */ valtype = STRING; distype = SEQUENT; vptr = dsstmp+9; dssflag = 1; distran = DSS; keyname = "PLTDECSN"; BEGIN(PLTDECSN); } ^PLTDECD" " { /* DSS: plate centre, declination - degrees. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+10; dssflag = 1; distran = DSS; keyname = "PLTDECD"; BEGIN(VALUE); } ^PLTDECM" " { /* DSS: plate centre, declination - arcmin. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+11; dssflag = 1; distran = DSS; keyname = "PLTDECM"; BEGIN(VALUE); } ^PLTDECS" " { /* DSS: plate centre, declination - arcsec. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+12; dssflag = 1; distran = DSS; keyname = "PLTDECS"; BEGIN(VALUE); } ^PLATEID" " { /* DSS: plate identification. */ valtype = STRING; distype = SEQUENT; vptr = dsstmp+13; dssflag = 2; distran = DSS; keyname = "PLATEID"; BEGIN(VALUE); } ^AMDX { /* DSS: axis 1 polynomial coefficient. */ i = 1; dssflag = 3; keyname = "AMDXm"; BEGIN(DSSAMDXY); } ^AMDY { /* DSS: axis 2 polynomial coefficient. */ i = 2; dssflag = 3; keyname = "AMDYm"; BEGIN(DSSAMDXY); } ^WAT[12]_{Z3} { /* TNX or ZPX: string-encoded data array. */ sscanf(yytext, "WAT%d_%d", &i, &m); if (watn < m) watn = m; watflag = 1; valtype = STRING; distype = SEQUENT; vptr = wat[i-1] + 68*(m-1); a = ' '; distran = WAT; keyname = "WATi_m"; BEGIN(VALUE); } ^END" "{77} { if (wcspih_nkeyrec) { wcspih_nkeyrec = 0; errmsg = "keyrecords following the END keyrecord were ignored"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } ^. { BEGIN(DISCARD); } {I1}{ALT}" " | {I2}{ALT}" " | {I1}{ALT}" " | {I2}{ALT} { sscanf(yytext, "%d%c", &i, &a); BEGIN(VALUE); } 0{I1}{ALT}" " | 0{Z1}{I1}{ALT}" " | 0{Z2}{I1}{ALT}" " | 0{Z3}{I1}{ALT} | 0{Z4}{I1} | 0{I1}{ALT} | 0{Z1}{I1} { if (relax & WCSHDR_reject) { /* Violates the basic FITS standard. */ errmsg = "indices in parameterized keywords must not have " "leading zeroes"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } {Z1}{ALT}" " | {Z2}{ALT}" " | {Z3}{ALT}" " | {Z4}{ALT}" " | {Z5}{ALT} | {Z6} | {Z1}{ALT}" " | {Z2}{ALT} | {Z3} { /* Anything that has fallen through to this point must contain */ /* an invalid axis number. */ errmsg = "axis number must exceed 0"; BEGIN(ERROR); } . { /* Let it go. */ BEGIN(DISCARD); } . { if (relax & WCSHDR_reject) { /* Looks too much like a FITS WCS keyword not to flag it. */ errmsg = errtxt; sprintf(errmsg, "keyword looks very much like %s but isn't", keyname); BEGIN(ERROR); } else { /* Let it go. */ BEGIN(DISCARD); } } {I1}_{I1}{ALT}" " | {I1}_{I2}{ALT}" " | {I2}_{I1}{ALT}" " | {I2}_{I2}{ALT} { sscanf(yytext, "%d_%d%c", &i, &j, &a); BEGIN(VALUE); } 0{I1}_{I1}{ALT}" " | {I1}_0{I1}{ALT}" " | 00{I1}_{I1}{ALT} | 0{I1}_0{I1}{ALT} | {I1}_00{I1}{ALT} | 000{I1}_{I1} | 00{I1}_0{I1} | 0{I1}_00{I1} | {I1}_000{I1} | 0{I1}_{I2}{ALT} | {I1}_0{I2}{ALT} | 00{I1}_{I2} | 0{I1}_0{I2} | {I1}_00{I2} | 0{I2}_{I1}{ALT} | {I2}_0{I1}{ALT} | 00{I2}_{I1} | 0{I2}_0{I1} | {I2}_00{I1} | 0{I2}_{I2} | {I2}_0{I2} { if (((altlin == 1) && (relax & WCSHDR_PC0i_0ja)) || ((altlin == 2) && (relax & WCSHDR_CD0i_0ja))) { sscanf(yytext, "%d_%d%c", &i, &j, &a); BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = "indices in parameterized keywords must not have " "leading zeroes"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } {Z1}_{Z1}{ALT}" " | {Z2}_{Z1}{ALT}" " | {Z1}_{Z2}{ALT}" " | {Z3}_{Z1}{ALT} | {Z2}_{Z2}{ALT} | {Z1}_{Z3}{ALT} | {Z4}_{Z1} | {Z3}_{Z2} | {Z2}_{Z3} | {Z1}_{Z4} { /* Anything that has fallen through to this point must contain */ /* an invalid axis number. */ errmsg = "axis number must exceed 0"; BEGIN(ERROR); } {Z1}-{Z1}{ALT}" " | {Z2}-{Z1}{ALT}" " | {Z1}-{Z2}{ALT}" " | {Z3}-{Z1}{ALT} | {Z2}-{Z2}{ALT} | {Z1}-{Z3}{ALT} | {Z4}-{Z1} | {Z3}-{Z2} | {Z2}-{Z3} | {Z1}-{Z4} { errmsg = errtxt; sprintf(errmsg, "%s keyword must use an underscore, not a dash", keyname); BEGIN(ERROR); } {Z2}{I1}{Z2}{I1} { /* This covers the defunct forms CD00i00j and PC00i00j. */ if (((altlin == 1) && (relax & WCSHDR_PC00i00j)) || ((altlin == 2) && (relax & WCSHDR_CD00i00j))) { sscanf(yytext, "%3d%3d", &i, &j); a = ' '; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "this form of the %s keyword is deprecated, use %s", keyname, keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } . { BEGIN(DISCARD); } {ALT} | . { if (YY_START == CCCCCCCa) { sscanf(yytext, "%c", &a); } else { unput(yytext[0]); a = 0; } BEGIN(VALUE); } . { if (relax & WCSHDR_reject) { /* Looks too much like a FITS WCS keyword not to flag it. */ errmsg = errtxt; sprintf(errmsg, "invalid alternate code, keyword resembles %s " "but isn't", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } {I1}_{Z1}{ALT}" " | {I1}_{I2}{ALT}" " | {I2}_{Z1}{ALT}" " | {I2}_{I2}{ALT} { sscanf(yytext, "%d_%d%c", &i, &m, &a); BEGIN(VALUE); } 0{I1}_{Z1}{ALT}" " | {I1}_0{Z1}{ALT}" " | 00{I1}_{Z1}{ALT} | 0{I1}_0{Z1}{ALT} | {I1}_00{Z1}{ALT} | 000{I1}_{Z1} | 00{I1}_0{Z1} | 0{I1}_00{Z1} | {I1}_000{Z1} | 0{I1}_{I2}{ALT} | {I1}_0{I2}{ALT} | 00{I1}_{I2} | 0{I1}_0{I2} | {I1}_00{I2} | 0{I2}_{Z1}{ALT} | {I2}_0{Z1}{ALT} | 00{I2}_{Z1} | 0{I2}_0{Z1} | {I2}_00{Z1} | 0{I2}_{I2} | {I2}_0{I2} { if (((valtype == FLOAT) && (relax & WCSHDR_PV0i_0ma)) || ((valtype == STRING) && (relax & WCSHDR_PS0i_0ma))) { sscanf(yytext, "%d_%d%c", &i, &m, &a); BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = "indices in parameterized keywords must not have " "leading zeroes"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } {Z1}_{Z1}{ALT}" " | {Z2}_{Z1}{ALT}" " | {Z1}_{Z2}{ALT}" " | {Z3}_{Z1}{ALT} | {Z2}_{Z2}{ALT} | {Z1}_{Z3}{ALT} | {Z4}_{Z1} | {Z3}_{Z2} | {Z2}_{Z3} | {Z1}_{Z4} { /* Anything that has fallen through to this point must contain */ /* an invalid axis number. */ errmsg = "axis number must exceed 0"; BEGIN(ERROR); } {Z1}-{Z1}{ALT}" " | {Z2}-{Z1}{ALT}" " | {Z1}-{Z2}{ALT}" " | {Z3}-{Z1}{ALT} | {Z2}-{Z2}{ALT} | {Z1}-{Z3}{ALT} | {Z4}-{Z1} | {Z3}-{Z2} | {Z2}-{Z3} | {Z1}-{Z4} { errmsg = errtxt; sprintf(errmsg, "%s keyword must use an underscore, not a dash", keyname); BEGIN(ERROR); } . { BEGIN(DISCARD); } {Z1}{ALT}" " | {Z2}{ALT} | {Z3} { a = ' '; sscanf(yytext, "%d%c", &i, &a); if (relax & WCSHDR_strict) { errmsg = "the CROTAn keyword is deprecated, use PCi_ja"; BEGIN(ERROR); } else if (a == ' ' || relax & WCSHDR_CROTAia) { yyless(0); BEGIN(CCCCCia); } else if (relax & WCSHDR_reject) { errmsg = "CROTAn keyword may not have an alternate version code"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } . { yyless(0); BEGIN(CCCCCia); } {Z1}" " { if (relax & WCSHDR_PROJPn) { sscanf(yytext, "%d", &m); i = 0; a = ' '; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = "the PROJPn keyword is deprecated, use PVi_ma"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } {Z2}" " | {Z3} { if (relax & (WCSHDR_PROJPn | WCSHDR_reject)) { errmsg = "invalid PROJPn keyword"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } . { BEGIN(DISCARD); } {Z1}_{Z1}" " | {Z1}_{Z1}" " { /* SIP keywords. */ valtype = FLOAT; distype = PRIOR; vptr = &(distem.dp); npptr = ndp; a = ' '; distran = SIP; sscanf(yytext, "%d_%d", &p, &q); BEGIN(VALUE); } . | . { BEGIN(DISCARD); } {I1}" " | {I2}" " { /* DSS keywords. */ valtype = FLOAT; distype = SEQUENT; vptr = &(distem.dp); npptr = ndq; a = ' '; distran = DSS; sscanf(yytext, "%d", &m); BEGIN(VALUE); } . { BEGIN(DISCARD); } =" "+{STRING} { /* Special handling for this iconic DSS keyword. */ if (1 < ipass) { /* Look for a minus sign. */ sscanf(yytext, "= '%s", strtmp); dbltmp = strcmp(strtmp, "-") ? 1.0 : -1.0; } BEGIN(COMMENT); } . { BEGIN(DISCARD); } =" "+ { /* Do checks on i, j & m. */ if (99 < i || 99 < j || 99 < m) { if (relax & WCSHDR_reject) { if (99 < i || 99 < j) { errmsg = "axis number exceeds 99"; } else if (m > 99) { errmsg = "parameter number exceeds 99"; } BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else { if (valtype == INTEGER) { BEGIN(INTEGER_VAL); } else if (valtype == FLOAT) { BEGIN(FLOAT_VAL); } else if (valtype == STRING) { BEGIN(STRING_VAL); } else if (valtype == RECORD) { BEGIN(RECORD_VAL); } else { errmsg = errtxt; sprintf(errmsg, "internal parser ERROR, bad data type: %d", valtype); BEGIN(ERROR); } } } . { errmsg = "invalid KEYWORD = VALUE syntax"; BEGIN(ERROR); } {INTEGER} { if (ipass == 1) { BEGIN(COMMENT); } else { /* Read the keyvalue. */ sscanf(yytext, "%d", &inttmp); BEGIN(COMMENT); } } . { errmsg = "an integer value was expected"; BEGIN(ERROR); } {FLOAT} { if (ipass == 1) { BEGIN(COMMENT); } else { /* Read the keyvalue. */ wcsutil_str2double(yytext, "%lf", &dbltmp); BEGIN(COMMENT); } } . { errmsg = "a floating-point value was expected"; BEGIN(ERROR); } {STRING} { if (ipass == 1) { BEGIN(COMMENT); } else { /* Read the keyvalue. */ strcpy(strtmp, yytext+1); /* Squeeze out repeated quotes. */ ix = 0; for (jx = 0; jx < 72; jx++) { if (ix < jx) { strtmp[ix] = strtmp[jx]; } if (strtmp[jx] == '\0') { if (ix) strtmp[ix-1] = '\0'; break; } else if (strtmp[jx] == '\'' && strtmp[jx+1] == '\'') { jx++; } ix++; } BEGIN(COMMENT); } } . { errmsg = "a string value was expected"; BEGIN(ERROR); } {RECORD} { if (ipass == 1) { BEGIN(COMMENT); } else { yyless(1); BEGIN(RECFIELD); } } . { errmsg = "a record was expected"; BEGIN(ERROR); } {FIELD} { strcpy(strtmp, yytext); BEGIN(RECCOLON); } . { errmsg = "invalid record field"; BEGIN(ERROR); } :" "+ { BEGIN(RECVALUE); } . { errmsg = "invalid record syntax"; BEGIN(ERROR); } {INTEGER} { rectype = 0; sscanf(yytext, "%d", &inttmp); BEGIN(RECEND); } {FLOAT} { rectype = 1; wcsutil_str2double(yytext, "%lf", &dbltmp); BEGIN(RECEND); } . { errmsg = "invalid record value"; BEGIN(ERROR); } ' { BEGIN(COMMENT); } {INLINE}$ { if (ipass == 1) { /* Do first-pass bookkeeping. */ wcspih_naxes(naxis, i, j, a, distype, alts, dpq, npptr); BEGIN(FLUSH); } else if (*wcs) { /* Store the value now that the keyrecord has been validated. */ gotone = 0; for (ialt = 0; ialt < *nwcs; ialt++) { /* The loop here is for keywords that apply */ /* to every alternate; these have a == 0. */ if (a >= 'A') { ialt = alts[a-'A'+1]; if (ialt < 0) break; } gotone = 1; if (vptr) { if (sipflag) { /* Translate a SIP keyword into DPja. */ disp = (*wcs)->lin.dispre; ipx = (disp->ndp)++; /* SIP doesn't have alternates. */ sprintf(keyword, "DP%d", i); sprintf(strtmp, "SIP.%s.%d_%d", (sipflag==2)?"FWD":"REV", p, q); if (valtype == INTEGER) { dpfill(disp->dp+ipx, keyword, strtmp, i, 0, inttmp, 0.0); } else { dpfill(disp->dp+ipx, keyword, strtmp, i, 1, 0, dbltmp); } } else if (dssflag) { /* All DSS keywords require special handling. */ if (dssflag == 1) { /* Temporary parameter for DSS used by wcspih_final(). */ *((double *)vptr) = dbltmp; } else if (dssflag == 2) { /* Temporary parameter for DSS used by wcspih_final(). */ strcpy((char *)vptr, strtmp); } else { /* Translate a DSS keyword into DQia. */ if (m <= 13 || dbltmp != 0.0) { disp = (*wcs)->lin.disseq; ipx = (disp->ndp)++; /* DSS doesn't have alternates. */ sprintf(keyword, "DQ%d", i); sprintf(strtmp, "DSS.AMD.%d", m); dpfill(disp->dp+ipx, keyword, strtmp, i, 1, 0, dbltmp); /* Also required by wcspih_final(). */ if (m <= 3) { dsstmp[13+(i-1)*3+m] = dbltmp; } } } } else if (watflag) { /* String array for TNX and ZPX used by wcspih_final(). */ strcpy((char *)vptr, strtmp); } else { /* An ordinary keyword. */ wcsp = *wcs + ialt; if (distype == 0) { voff = (char *)vptr - (char *)(&wcstem); wptr = (void *)((char *)wcsp + voff); } else { voff = (char *)vptr - (char *)(&distem); if (distype == PRIOR) { /* Prior distortion. */ disp = wcsp->lin.dispre; } else { /* Sequent distortion. */ disp = wcsp->lin.disseq; } wptr = (void *)((char *)disp + voff); } if (valtype == INTEGER) { *((int *)wptr) = inttmp; } else if (valtype == FLOAT) { /* Apply keyword parameterization. */ if (npptr == npv) { ipx = (wcsp->npv)++; wcsp->pv[ipx].i = i; wcsp->pv[ipx].m = m; wptr = &(wcsp->pv[ipx].value); } else if (j) { wptr = *((double **)wptr) + (i - 1)*(wcsp->naxis) + (j - 1); } else if (i) { wptr = *((double **)wptr) + (i - 1); } if (special) { special(wptr, dbltmp); } else { *((double *)wptr) = dbltmp; } /* Flag presence of PCi_ja, or CDi_ja and/or CROTAia. */ if (altlin) { wcsp->altlin |= altlin; altlin = 0; } } else if (valtype == STRING) { /* Apply keyword parameterization. */ if (npptr == nps) { ipx = (wcsp->nps)++; wcsp->ps[ipx].i = i; wcsp->ps[ipx].m = m; wptr = wcsp->ps[ipx].value; } else if (j) { wptr = *((char (**)[72])wptr) + (i - 1)*(wcsp->naxis) + (j - 1); } else if (i) { wptr = *((char (**)[72])wptr) + (i - 1); } cptr = (char *)wptr; strcpy(cptr, strtmp); } else if (valtype == RECORD) { ipx = (disp->ndp)++; if (a == ' ') { sprintf(keyword, "%.2s%d", keyname, i); } else { sprintf(keyword, "%.2s%d%c", keyname, i, a); } dpfill(disp->dp+ipx, keyword, strtmp, i, rectype, inttmp, dbltmp); } } } if (a) break; } if (gotone) { nvalid++; if (ctrl == 4) { if (distran == 0) { wcsfprintf(stderr, "%.80s\n Accepted (%d) as a " "valid WCS keyrecord.\n", keyrec, nvalid); } else { wcsfprintf(stderr, "%.80s\n Accepted (%d) as a " "recognised WCS convention.\n", keyrec, nvalid); } } BEGIN(FLUSH); } else { errmsg = "syntactically valid WCS keyrecord has no effect"; BEGIN(ERROR); } } else { BEGIN(FLUSH); } } .*" "*\/.*$ { errmsg = "invalid keyvalue"; BEGIN(ERROR); } [^ \/\n]*{INLINE}$ { errmsg = "invalid keyvalue"; BEGIN(ERROR); } " "+[^\/\n].*{INLINE}$ { errmsg = "invalid keyvalue or malformed keycomment"; BEGIN(ERROR); } .*$ { errmsg = "malformed keycomment"; BEGIN(ERROR); } .*$ { if (ipass == npass) { if (ctrl < 0) { /* Preserve discards. */ keep = keyrec; } else if (2 < ctrl) { nother++; wcsfprintf(stderr, "%.80s\n Not a recognized WCS keyword.\n", keyrec); } } BEGIN(FLUSH); } .*$ { if (ipass == npass) { (*nreject)++; if (ctrl%10 == -1) { /* Preserve rejects. */ keep = keyrec; } if (1 < abs(ctrl%10)) { wcsfprintf(stderr, "%.80s\n Rejected (%d), %s.\n", keyrec, *nreject, errmsg); } } BEGIN(FLUSH); } .*\n { if (ipass == npass && keep) { if (hptr < keep) { strncpy(hptr, keep, 80); } hptr += 80; } /* Throw away the rest of the line and reset for the next one. */ i = j = 0; m = 0; a = ' '; keyrec += 80; valtype = -1; distype = 0; vptr = 0x0; keep = 0x0; altlin = 0; npptr = 0x0; special = 0x0; sipflag = 0; dssflag = 0; watflag = 0; BEGIN(INITIAL); } <> { /* End-of-input. */ if (ipass == 1) { if ((status = wcspih_inits(naxis, alts, dpq, npv, nps, ndp, ndq, distran, nwcs, wcs)) || (*nwcs == 0 && ctrl == 0)) { yylex_destroy(); return status; } if (2 < abs(ctrl%10)) { if (*nwcs == 1) { if (strcmp(wcs[0]->wcsname, "DEFAULTS") != 0) { wcsfprintf(stderr, "Found one coordinate representation.\n"); } } else { wcsfprintf(stderr, "Found %d coordinate representations.\n", *nwcs); } } watstr = calloc(2*(watn*68 + 1), sizeof(char)); wat[0] = watstr; wat[1] = watstr + watn*68 + 1; } if (ipass++ < npass) { wcspih_hdr = header; wcspih_nkeyrec = nkeyrec; keyrec = header; *nreject = 0; i = j = 0; m = 0; a = ' '; valtype = -1; distype = 0; vptr = 0x0; altlin = 0; npptr = 0x0; special = 0x0; sipflag = 0; dssflag = 0; watflag = 0; yyrestart(yyin); } else { yylex_destroy(); if (ctrl < 0) { *hptr = '\0'; } else if (ctrl == 1) { wcsfprintf(stderr, "%d WCS keyrecord%s rejected.\n", *nreject, (*nreject==1)?" was":"s were"); } else if (ctrl == 4) { wcsfprintf(stderr, "\n"); wcsfprintf(stderr, "%5d keyrecord%s rejected for syntax or " "other errors,\n", *nreject, (*nreject==1)?" was":"s were"); wcsfprintf(stderr, "%5d %s recognized as syntactically valid, " "and\n", nvalid, (nvalid==1)?"was":"were"); wcsfprintf(stderr, "%5d other%s were not recognized as WCS " "keyrecords.\n", nother, (nother==1)?"":"s"); } return wcspih_final(alts, ndp, ndq, distran, dsstmp, wat, nwcs, wcs); } } %% /*---------------------------------------------------------------------------- * Determine the number of coordinate representations (up to 27) and the * number of coordinate axes in each, which distortions are present, and the * number of PVi_ma, PSi_ma, DPja, and DQia keywords in each representation. *---------------------------------------------------------------------------*/ void wcspih_naxes( int naxis, int i, int j, char a, int distype, int alts[], int dpq[], int *npptr) { /* On the first pass alts[] is used to determine the number of axes */ /* for each of the 27 possible alternate coordinate descriptions. */ int ialt, *ip; if (a == 0) { return; } ialt = 0; if (a != ' ') { ialt = a - 'A' + 1; } ip = alts + ialt; if (*ip < naxis) { *ip = naxis; } /* i or j can be greater than naxis. */ if (*ip < i) { *ip = i; } if (*ip < j) { *ip = j; } /* Type of distortions present. */ dpq[ialt] |= distype; /* Count PVi_ma, PSi_ma, DPja, or DQia keywords. */ if (npptr) { npptr[ialt]++; } } /*---------------------------------------------------------------------------- * Allocate memory for an array of the required number of wcsprm structs and * initialize each of them. *---------------------------------------------------------------------------*/ int wcspih_inits( int naxis, int alts[], int dpq[], int npv[], int nps[], int ndp[], int ndq[], int distran, int *nwcs, struct wcsprm **wcs) { int ialt, defaults, ndis, ndpmax, npsmax, npvmax, status = 0; struct wcsprm *wcsp; struct disprm *dis; /* Find the number of coordinate descriptions. */ *nwcs = 0; for (ialt = 0; ialt < 27; ialt++) { if (alts[ialt]) (*nwcs)++; } if ((defaults = !(*nwcs) && naxis)) { /* NAXIS is non-zero but there were no WCS keywords with an alternate version code; create a default WCS with blank alternate version. */ wcspih_naxes(naxis, 0, 0, ' ', 0, alts, dpq, 0x0); *nwcs = 1; } if (*nwcs) { /* Allocate memory for the required number of wcsprm structs. */ if ((*wcs = calloc(*nwcs, sizeof(struct wcsprm))) == 0x0) { return WCSHDRERR_MEMORY; } /* Record the current values of NPVMAX, NPSMAX, and NDPMAX. */ npvmax = wcsnpv(-1); npsmax = wcsnps(-1); ndpmax = disndp(-1); ndis = 0; if (distran == SIP) { /* DPja.NAXES and DPja.OFFSET.j to be added for SIP (see below and wcspih_final()). */ ndp[0] += 6; } else if (distran == DSS) { /* DPja.NAXES to be added for DSS (see below and wcspih_final()). */ ndq[0] += 2; } /* Initialize each wcsprm struct. */ wcsp = *wcs; *nwcs = 0; for (ialt = 0; ialt < 27; ialt++) { if (alts[ialt]) { wcsp->flag = -1; wcsnpv(npv[ialt]); wcsnps(nps[ialt]); if ((status = wcsini(1, alts[ialt], wcsp))) { wcsvfree(nwcs, wcs); break; } /* Record the alternate version code. */ if (ialt) { wcsp->alt[0] = 'A' + ialt - 1; } /* Record in wcsname whether this is a default description. */ if (defaults) { strcpy(wcsp->wcsname, "DEFAULTS"); } /* Any distortions present? */ if (dpq[ialt] & 1) { if ((dis = calloc(1, sizeof(struct disprm))) == 0x0) { return WCSHDRERR_MEMORY; } /* Attach it to linprm. Also inits it. */ ndis++; disndp(ndp[ialt]); dis->flag = -1; lindis(1, &(wcsp->lin), dis); } if (dpq[ialt] & 2) { if ((dis = calloc(1, sizeof(struct disprm))) == 0x0) { return WCSHDRERR_MEMORY; } /* Attach it to linprm. Also inits it. */ ndis++; disndp(ndq[ialt]); dis->flag = -1; lindis(2, &(wcsp->lin), dis); } /* On the second pass alts[] indexes the array of wcsprm structs. */ alts[ialt] = (*nwcs)++; wcsp++; } else { /* Signal that there is no wcsprm for this alt. */ alts[ialt] = -1; } } /* Restore the original values of NPVMAX, NPSMAX, and NDPMAX. */ wcsnpv(npvmax); wcsnps(npsmax); if (ndis) disndp(ndpmax); /* Translated distortion? Neither SIP nor DSS have alternates, so the */ /* presence of keywords for either (not both together), as flagged by */ /* distran, necessarily refers to the primary representation. */ if (distran == SIP) { strcpy((*wcs)->lin.dispre->dtype[0], "SIP"); strcpy((*wcs)->lin.dispre->dtype[1], "SIP"); /* SIP doesn't have axis mapping. */ (*wcs)->lin.dispre->ndp = 6; dpfill((*wcs)->lin.dispre->dp, "DP1", "NAXES", 0, 0, 2, 0.0); dpfill((*wcs)->lin.dispre->dp+3, "DP2", "NAXES", 0, 0, 2, 0.0); } else if (distran == DSS) { strcpy((*wcs)->lin.disseq->dtype[0], "DSS"); strcpy((*wcs)->lin.disseq->dtype[1], "DSS"); /* The Paper IV translation of DSS doesn't require an axis mapping. */ (*wcs)->lin.disseq->ndp = 2; dpfill((*wcs)->lin.disseq->dp, "DQ1", "NAXES", 0, 0, 2, 0.0); dpfill((*wcs)->lin.disseq->dp+1, "DQ2", "NAXES", 0, 0, 2, 0.0); } } return status; } /*---------------------------------------------------------------------------- * Interpret EPOCHa keywords. *---------------------------------------------------------------------------*/ int wcspih_epoch(double *equinox, double epoch) { /* If EQUINOXa is currently undefined then set it from EPOCHa. */ if (undefined(*equinox)) { *equinox = epoch; } return 0; } /*---------------------------------------------------------------------------- * Interpret VSOURCEa keywords. *---------------------------------------------------------------------------*/ int wcspih_vsource(double *zsource, double vsource) { double beta, c = 299792458.0; /* If ZSOURCEa is currently undefined then set it from VSOURCEa. */ if (undefined(*zsource)) { /* Convert relativistic Doppler velocity to redshift. */ beta = vsource/c; *zsource = (1.0 + beta)/sqrt(1.0 - beta*beta) - 1.0; } return 0; } /*---------------------------------------------------------------------------- * Interpret special keywords encountered for each coordinate representation. *---------------------------------------------------------------------------*/ int wcspih_final( int alts[], int ndp[], int ndq[], int distran, double dsstmp[], char *wat[], int *nwcs, struct wcsprm **wcs) { char field[8], *wp, wpoly[12], wtype[8]; int i, ialt, idp, ipv, m, npv, n, nterms, omax, omin, status, wctrl[4]; double A1, A2, A3, B1, B2, B3, CNPIX1, CNPIX2, *crval, Rx, Ry, S, wval, X0, Y0, Xc, Yc; struct disprm *disp; struct wcsprm *wcsp; for (ialt = 0; ialt < *nwcs; ialt++) { /* Interpret -TAB header keywords. */ if ((status = wcstab(*wcs+ialt))) { wcsvfree(nwcs, wcs); return status; } if (ndp[ialt] && ndq[ialt]) { /* Prior and sequent distortions co-exist in this representation; ensure the latter gets DVERRa. */ (*wcs+ialt)->lin.disseq->totdis = (*wcs+ialt)->lin.dispre->totdis; } } /* Translated distortion functions; apply only to the primary WCS. */ wcsp = *wcs; if (distran == SIP) { /* SIP doesn't have alternates, nor axis mapping. */ disp = wcsp->lin.dispre; dpfill(disp->dp+1, "DP1", "OFFSET.1", 0, 1, 0, wcsp->crpix[0]); dpfill(disp->dp+2, "DP1", "OFFSET.2", 0, 1, 0, wcsp->crpix[1]); dpfill(disp->dp+4, "DP2", "OFFSET.1", 0, 1, 0, wcsp->crpix[0]); dpfill(disp->dp+5, "DP2", "OFFSET.2", 0, 1, 0, wcsp->crpix[1]); } else if (distran == DSS) { /* DSS doesn't have alternates, nor axis mapping. This translation */ /* follows Paper IV, Sect. 5.2 using the same variable names. */ CNPIX1 = dsstmp[0]; CNPIX2 = dsstmp[1]; Xc = dsstmp[2]/1000.0; Yc = dsstmp[3]/1000.0; Rx = dsstmp[4]/1000.0; Ry = dsstmp[5]/1000.0; A1 = dsstmp[14]; A2 = dsstmp[15]; A3 = dsstmp[16]; B1 = dsstmp[17]; B2 = dsstmp[18]; B3 = dsstmp[19]; S = sqrt(fabs(A1*B1 - A2*B2)); X0 = (A2*B3 - A3*B1) / (A1*B1 - A2*B2); Y0 = (A3*B2 - A1*B3) / (A1*B1 - A2*B2); wcsp->crpix[0] = (Xc - X0)/Rx - (CNPIX1 - 0.5); wcsp->crpix[1] = (Yc + Y0)/Ry - (CNPIX2 - 0.5); wcsp->pc[0] = A1*Rx/S; wcsp->pc[1] = -A2*Ry/S; wcsp->pc[2] = -B2*Rx/S; wcsp->pc[3] = B1*Ry/S; wcsp->altlin = 1; wcsp->cdelt[0] = -S/3600.0; wcsp->cdelt[1] = S/3600.0; crval = wcsp->crval; crval[0] = (dsstmp[6] + (dsstmp[7] + dsstmp[8] /60.0)/60.0)*15.0; crval[1] = dsstmp[10] + (dsstmp[11] + dsstmp[12]/60.0)/60.0; if (dsstmp[9] == -1.0) crval[1] *= -1.0; strcpy(wcsp->ctype[0], "RA---TAN"); strcpy(wcsp->ctype[1], "DEC--TAN"); sprintf(wcsp->wcsname, "DSS PLATEID %.4s", (char *)(dsstmp+13)); /* Erase the approximate WCS provided in modern DSS headers. */ wcsp->cd[0] = 0.0; wcsp->cd[1] = 0.0; wcsp->cd[2] = 0.0; wcsp->cd[3] = 0.0; } else if (distran == WAT) { /* TNX and ZPX don't have alternates, nor axis mapping. */ disp = wcsp->lin.disseq; /* Decipher the core dump stored in the WATi_m strings. */ nterms = 0; for (i = 0; i < 2; i++) { sscanf(wat[i], "wtype=%s", wtype); if (strcmp(wtype, "tnx") == 0) { strcpy(disp->dtype[i], "WAT-TNX"); } else if (strcmp(wtype, "zpx") == 0) { strcpy(disp->dtype[i], "WAT-ZPX"); } else { /* Could contain "tan" or something else to be ignored. */ lindis(2, &(wcsp->lin), 0x0); return 0; } /* The PROJPn parameters are duplicated on each ZPX axis. */ if (i == 1 && strcmp(wtype, "zpx") == 0) { /* Take those on the second (latitude) axis ignoring the other. */ /* First we have to count them and allocate space in wcsprm. */ wp = wat[i]; for (npv = 0; npv < 30; npv++) { if ((wp = strstr(wp, "projp")) == 0x0) break; wp += 5; } /* Allocate space. */ if (npv) { wcsp->npvmax += npv; wcsp->pv = realloc(wcsp->pv, wcsp->npvmax*sizeof(struct pvcard)); if (wcsp->pv == 0x0) { return WCSHDRERR_MEMORY; } wcsp->m_pv = wcsp->pv; } /* Copy the values. */ wp = wat[i]; for (ipv = wcsp->npv; ipv < wcsp->npvmax; ipv++) { if ((wp = strstr(wp, "projp")) == 0x0) break; sscanf(wp, "projp%d=%lf", &m, &wval); wcsp->pv[ipv].i = 2; wcsp->pv[ipv].m = m; wcsp->pv[ipv].value = wval; wp += 5; } wcsp->npv += npv; } /* Read the control parameters. */ if ((wp = strchr(wat[i], '"')) == 0x0) { return WCSHDRERR_PARSER; } wp++; for (m = 0; m < 4; m++) { sscanf(wp, "%d", wctrl+m); if ((wp = strchr(wp, ' ')) == 0x0) { return WCSHDRERR_PARSER; } wp++; } /* How many coefficients are we expecting? */ omin = (wctrl[1] < wctrl[2]) ? wctrl[1] : wctrl[2]; omax = (wctrl[1] < wctrl[2]) ? wctrl[2] : wctrl[1]; if (wctrl[3] == 0) { /* No cross terms. */ nterms += omin + omax; } else if (wctrl[3] == 1) { /* Full cross terms. */ nterms += omin*omax; } else if (wctrl[3] == 2) { /* Half cross terms. */ nterms += omin*omax - omin*(omin-1)/2; } } /* Allocate memory for dpkeys. */ ndq[0] += 2*(1 + 1 + 4) + nterms; disp->ndpmax += ndq[0]; disp->dp = realloc(disp->dp, disp->ndpmax*sizeof(struct dpkey)); if (disp->dp == 0x0) { return WCSHDRERR_MEMORY; } disp->m_dp = disp->dp; /* Populate dpkeys. */ idp = disp->ndp; for (i = 0; i < 2; i++) { dpfill(disp->dp+(idp++), "DQ", "NAXES", i+1, 0, 2, 0.0); /* Read the control parameters. */ if ((wp = strchr(wat[i], '"')) == 0x0) { return WCSHDRERR_PARSER; } wp++; for (m = 0; m < 4; m++) { sscanf(wp, "%d", wctrl+m); if ((wp = strchr(wp, ' ')) == 0x0) { return WCSHDRERR_PARSER; } wp++; } /* Polynomial type. */ dpfill(disp->dp+(idp++), "DQ", "WAT.POLY", i+1, 0, wctrl[0], 0.0); if (wctrl[0] == 1) { /* Chebyshev polynomial. */ strcpy(wpoly, "CHBY"); } else if (wctrl[0] == 2) { /* Legendre polynomial. */ strcpy(wpoly, "LEGR"); } else if (wctrl[0] == 3) { /* Polynomial is the sum of monomials. */ strcpy(wpoly, "MONO"); } else { /* Unknown code. */ strcpy(wpoly, "UNKN"); } /* Read the scaling parameters. */ for (m = 0; m < 4; m++) { sscanf(wp, "%lf", &wval); sprintf(field, "WAT.%c%s", (m<2)?'X':'Y', (m%2)?"MAX":"MIN"); dpfill(disp->dp+(idp++), "DQ", field, i+1, 1, 0, wval); if ((wp = strchr(wp, ' ')) == 0x0) { return WCSHDRERR_PARSER; } wp++; } /* Read the coefficients. */ for (n = 0; n < wctrl[2]; n++) { for (m = 0; m < wctrl[1]; m++) { if (wctrl[3] == 0) { if (m && n) continue; } else if (wctrl[3] == 2) { if (m+n > omax-1) continue; } sscanf(wp, "%lf", &wval); if (wval == 0.0) continue; sprintf(field, "WAT.%s.%d_%d", wpoly, m, n); dpfill(disp->dp+(idp++), "DQ", field, i+1, 1, 0, wval); if ((wp = strchr(wp, ' ')) == 0x0) { return WCSHDRERR_PARSER; } wp++; } } } disp->ndp = idp; free(wat[0]); } return 0; } astropy-1.1.1/cextern/wcslib/C/wcstrig.h0000644001134200020070000001420112644017723021073 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcstrig.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the wcstrig routines * ------------------------------- * When dealing with celestial coordinate systems and spherical projections * (some moreso than others) it is often desirable to use an angular measure * that provides an exact representation of the latitude of the north or south * pole. The WCSLIB routines use the following trigonometric functions that * take or return angles in degrees: * * - cosd() * - sind() * - tand() * - acosd() * - asind() * - atand() * - atan2d() * - sincosd() * * These "trigd" routines are expected to handle angles that are a multiple of * 90 degrees returning an exact result. Some C implementations provide these * as part of a system library and in such cases it may (or may not!) be * preferable to use them. WCSLIB provides wrappers on the standard trig * functions based on radian measure, adding tests for multiples of 90 degrees. * * However, wcstrig.h also provides the choice of using preprocessor macro * implementations of the trigd functions that don't test for multiples of * 90 degrees (compile with -DWCSTRIG_MACRO). These are typically 20% faster * but may lead to problems near the poles. * * * cosd() - Cosine of an angle in degrees * -------------------------------------- * cosd() returns the cosine of an angle given in degrees. * * Given: * angle double [deg]. * * Function return value: * double Cosine of the angle. * * * sind() - Sine of an angle in degrees * ------------------------------------ * sind() returns the sine of an angle given in degrees. * * Given: * angle double [deg]. * * Function return value: * double Sine of the angle. * * * sincosd() - Sine and cosine of an angle in degrees * -------------------------------------------------- * sincosd() returns the sine and cosine of an angle given in degrees. * * Given: * angle double [deg]. * * Returned: * sin *double Sine of the angle. * * cos *double Cosine of the angle. * * Function return value: * void * * * tand() - Tangent of an angle in degrees * --------------------------------------- * tand() returns the tangent of an angle given in degrees. * * Given: * angle double [deg]. * * Function return value: * double Tangent of the angle. * * * acosd() - Inverse cosine, returning angle in degrees * ---------------------------------------------------- * acosd() returns the inverse cosine in degrees. * * Given: * x double in the range [-1,1]. * * Function return value: * double Inverse cosine of x [deg]. * * * asind() - Inverse sine, returning angle in degrees * -------------------------------------------------- * asind() returns the inverse sine in degrees. * * Given: * y double in the range [-1,1]. * * Function return value: * double Inverse sine of y [deg]. * * * atand() - Inverse tangent, returning angle in degrees * ----------------------------------------------------- * atand() returns the inverse tangent in degrees. * * Given: * s double * * Function return value: * double Inverse tangent of s [deg]. * * * atan2d() - Polar angle of (x,y), in degrees * ------------------------------------------- * atan2d() returns the polar angle, beta, in degrees, of polar coordinates * (rho,beta) corresponding to Cartesian coordinates (x,y). It is equivalent * to the arg(x,y) function of WCS Paper II, though with transposed arguments. * * Given: * y double Cartesian y-coordinate. * * x double Cartesian x-coordinate. * * Function return value: * double Polar angle of (x,y) [deg]. * *===========================================================================*/ #ifndef WCSLIB_WCSTRIG #define WCSLIB_WCSTRIG #include #include "wcsconfig.h" #ifdef HAVE_SINCOS void sincos(double angle, double *sin, double *cos); #endif #ifdef __cplusplus extern "C" { #endif #ifdef WCSTRIG_MACRO /* Macro implementation of the trigd functions. */ #include "wcsmath.h" #define cosd(X) cos((X)*D2R) #define sind(X) sin((X)*D2R) #define tand(X) tan((X)*D2R) #define acosd(X) acos(X)*R2D #define asind(X) asin(X)*R2D #define atand(X) atan(X)*R2D #define atan2d(Y,X) atan2(Y,X)*R2D #ifdef HAVE_SINCOS #define sincosd(X,S,C) sincos((X)*D2R,(S),(C)) #else #define sincosd(X,S,C) *(S) = sin((X)*D2R); *(C) = cos((X)*D2R); #endif #else /* Use WCSLIB wrappers or native trigd functions. */ double cosd(double angle); double sind(double angle); void sincosd(double angle, double *sin, double *cos); double tand(double angle); double acosd(double x); double asind(double y); double atand(double s); double atan2d(double y, double x); /* Domain tolerance for asin() and acos() functions. */ #define WCSTRIG_TOL 1e-10 #endif /* WCSTRIG_MACRO */ #ifdef __cplusplus } #endif #endif /* WCSLIB_WCSTRIG */ astropy-1.1.1/cextern/wcslib/C/prj.c0000644001134200020070000056555412644017723020225 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: prj.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include #include "wcserr.h" #include "wcsmath.h" #include "wcsprintf.h" #include "wcstrig.h" #include "wcsutil.h" #include "prj.h" /* Projection categories. */ const int ZENITHAL = 1; const int CYLINDRICAL = 2; const int PSEUDOCYLINDRICAL = 3; const int CONVENTIONAL = 4; const int CONIC = 5; const int POLYCONIC = 6; const int QUADCUBE = 7; const int HEALPIX = 8; const char prj_categories[9][32] = {"undefined", "zenithal", "cylindrical", "pseudocylindrical", "conventional", "conic", "polyconic", "quadcube", "HEALPix"}; /* Projection codes. */ const int prj_ncode = 28; const char prj_codes[28][4] = {"AZP", "SZP", "TAN", "STG", "SIN", "ARC", "ZPN", "ZEA", "AIR", "CYP", "CEA", "CAR", "MER", "COP", "COE", "COD", "COO", "SFL", "PAR", "MOL", "AIT", "BON", "PCO", "TSC", "CSC", "QSC", "HPX", "XPH"}; const int AZP = 101; const int SZP = 102; const int TAN = 103; const int STG = 104; const int SIN = 105; const int ARC = 106; const int ZPN = 107; const int ZEA = 108; const int AIR = 109; const int CYP = 201; const int CEA = 202; const int CAR = 203; const int MER = 204; const int SFL = 301; const int PAR = 302; const int MOL = 303; const int AIT = 401; const int COP = 501; const int COE = 502; const int COD = 503; const int COO = 504; const int BON = 601; const int PCO = 602; const int TSC = 701; const int CSC = 702; const int QSC = 703; const int HPX = 801; const int XPH = 802; /* Map status return value to message. */ const char *prj_errmsg[] = { "Success", "Null prjprm pointer passed", "Invalid projection parameters", "One or more of the (x,y) coordinates were invalid", "One or more of the (phi,theta) coordinates were invalid"}; /* Convenience macros for generating common error messages. */ #define PRJERR_BAD_PARAM_SET(function) \ wcserr_set(&(prj->err), PRJERR_BAD_PARAM, function, __FILE__, __LINE__, \ "Invalid parameters for %s projection", prj->name); #define PRJERR_BAD_PIX_SET(function) \ wcserr_set(&(prj->err), PRJERR_BAD_PIX, function, __FILE__, __LINE__, \ "One or more of the (x, y) coordinates were invalid for %s projection", \ prj->name); #define PRJERR_BAD_WORLD_SET(function) \ wcserr_set(&(prj->err), PRJERR_BAD_WORLD, function, __FILE__, __LINE__, \ "One or more of the (lat, lng) coordinates were invalid for " \ "%s projection", prj->name); #define copysign(X, Y) ((Y) < 0.0 ? -fabs(X) : fabs(X)) /*============================================================================ * Generic routines: * * prjini initializes a prjprm struct to default values. * * prjfree frees any memory that may have been allocated to store an error * message in the prjprm struct. * * prjprt prints the contents of a prjprm struct. * * prjbchk performs bounds checking on the native coordinates returned by the * *x2s() routines. * * prjset invokes the specific initialization routine based on the projection * code in the prjprm struct. * * prjx2s invokes the specific deprojection routine based on the pointer-to- * function stored in the prjprm struct. * * prjs2x invokes the specific projection routine based on the pointer-to- * function stored in the prjprm struct. * *---------------------------------------------------------------------------*/ int prjini(prj) struct prjprm *prj; { register int k; if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = 0; strcpy(prj->code, " "); prj->pv[0] = 0.0; prj->pv[1] = UNDEFINED; prj->pv[2] = UNDEFINED; prj->pv[3] = UNDEFINED; for (k = 4; k < PVN; prj->pv[k++] = 0.0); prj->r0 = 0.0; prj->phi0 = UNDEFINED; prj->theta0 = UNDEFINED; prj->bounds = 7; strcpy(prj->name, "undefined"); for (k = 9; k < 40; prj->name[k++] = '\0'); prj->category = 0; prj->pvrange = 0; prj->simplezen = 0; prj->equiareal = 0; prj->conformal = 0; prj->global = 0; prj->divergent = 0; prj->x0 = 0.0; prj->y0 = 0.0; prj->err = 0x0; prj->padding = 0x0; for (k = 0; k < 10; prj->w[k++] = 0.0); prj->m = 0; prj->n = 0; prj->prjx2s = 0x0; prj->prjs2x = 0x0; return 0; } /*--------------------------------------------------------------------------*/ int prjfree(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->err) { free(prj->err); prj->err = 0x0; } return 0; } /*--------------------------------------------------------------------------*/ int prjprt(prj) const struct prjprm *prj; { char hext[32]; int i, n; if (prj == 0x0) return PRJERR_NULL_POINTER; wcsprintf(" flag: %d\n", prj->flag); wcsprintf(" code: \"%s\"\n", prj->code); wcsprintf(" r0: %9f\n", prj->r0); wcsprintf(" pv:"); if (prj->pvrange) { n = (prj->pvrange)%100; if (prj->pvrange/100) { wcsprintf(" (0)"); } else { wcsprintf(" %#- 11.5g", prj->pv[0]); n--; } for (i = 1; i <= n; i++) { if (i%5 == 1) { wcsprintf("\n "); } if (undefined(prj->pv[i])) { wcsprintf(" UNDEFINED "); } else { wcsprintf(" %#- 11.5g", prj->pv[i]); } } wcsprintf("\n"); } else { wcsprintf(" (not used)\n"); } if (undefined(prj->phi0)) { wcsprintf(" phi0: UNDEFINED\n"); } else { wcsprintf(" phi0: %9f\n", prj->phi0); } if (undefined(prj->theta0)) { wcsprintf(" theta0: UNDEFINED\n"); } else { wcsprintf(" theta0: %9f\n", prj->theta0); } wcsprintf(" bounds: %d\n", prj->bounds); wcsprintf("\n"); wcsprintf(" name: \"%s\"\n", prj->name); wcsprintf(" category: %d (%s)\n", prj->category, prj_categories[prj->category]); wcsprintf(" pvrange: %d\n", prj->pvrange); wcsprintf(" simplezen: %d\n", prj->simplezen); wcsprintf(" equiareal: %d\n", prj->equiareal); wcsprintf(" conformal: %d\n", prj->conformal); wcsprintf(" global: %d\n", prj->global); wcsprintf(" divergent: %d\n", prj->divergent); wcsprintf(" x0: %f\n", prj->x0); wcsprintf(" y0: %f\n", prj->y0); WCSPRINTF_PTR(" err: ", prj->err, "\n"); if (prj->err) { wcserr_prt(prj->err, " "); } wcsprintf(" w[]:"); for (i = 0; i < 5; i++) { wcsprintf(" %#- 11.5g", prj->w[i]); } wcsprintf("\n "); for (i = 5; i < 10; i++) { wcsprintf(" %#- 11.5g", prj->w[i]); } wcsprintf("\n"); wcsprintf(" m: %d\n", prj->m); wcsprintf(" n: %d\n", prj->n); wcsprintf(" prjx2s: %s\n", wcsutil_fptr2str((int (*)(void))prj->prjx2s, hext)); wcsprintf(" prjs2x: %s\n", wcsutil_fptr2str((int (*)(void))prj->prjs2x, hext)); return 0; } /*--------------------------------------------------------------------------*/ int prjperr(const struct prjprm *prj, const char *prefix) { if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->err) { wcserr_prt(prj->err, prefix); } return 0; } /*--------------------------------------------------------------------------*/ int prjbchk(tol, nphi, ntheta, spt, phi, theta, stat) double tol; int nphi, ntheta, spt; double phi[], theta[]; int stat[]; { int status = 0; register int iphi, itheta, *statp; register double *phip, *thetap; phip = phi; thetap = theta; statp = stat; for (itheta = 0; itheta < ntheta; itheta++) { for (iphi = 0; iphi < nphi; iphi++, phip += spt, thetap += spt, statp++) { /* Skip values already marked as illegal. */ if (*statp == 0) { if (*phip < -180.0) { if (*phip < -180.0-tol) { *statp = 1; status = 1; } else { *phip = -180.0; } } else if (180.0 < *phip) { if (180.0+tol < *phip) { *statp = 1; status = 1; } else { *phip = 180.0; } } if (*thetap < -90.0) { if (*thetap < -90.0-tol) { *statp = 1; status = 1; } else { *thetap = -90.0; } } else if (90.0 < *thetap) { if (90.0+tol < *thetap) { *statp = 1; status = 1; } else { *thetap = 90.0; } } } } } return status; } /*--------------------------------------------------------------------------*/ int prjset(prj) struct prjprm *prj; { static const char *function = "prjset"; int status; struct wcserr **err; if (prj == 0x0) return PRJERR_NULL_POINTER; err = &(prj->err); /* Invoke the relevant initialization routine. */ prj->code[3] = '\0'; if (strcmp(prj->code, "AZP") == 0) { status = azpset(prj); } else if (strcmp(prj->code, "SZP") == 0) { status = szpset(prj); } else if (strcmp(prj->code, "TAN") == 0) { status = tanset(prj); } else if (strcmp(prj->code, "STG") == 0) { status = stgset(prj); } else if (strcmp(prj->code, "SIN") == 0) { status = sinset(prj); } else if (strcmp(prj->code, "ARC") == 0) { status = arcset(prj); } else if (strcmp(prj->code, "ZPN") == 0) { status = zpnset(prj); } else if (strcmp(prj->code, "ZEA") == 0) { status = zeaset(prj); } else if (strcmp(prj->code, "AIR") == 0) { status = airset(prj); } else if (strcmp(prj->code, "CYP") == 0) { status = cypset(prj); } else if (strcmp(prj->code, "CEA") == 0) { status = ceaset(prj); } else if (strcmp(prj->code, "CAR") == 0) { status = carset(prj); } else if (strcmp(prj->code, "MER") == 0) { status = merset(prj); } else if (strcmp(prj->code, "SFL") == 0) { status = sflset(prj); } else if (strcmp(prj->code, "PAR") == 0) { status = parset(prj); } else if (strcmp(prj->code, "MOL") == 0) { status = molset(prj); } else if (strcmp(prj->code, "AIT") == 0) { status = aitset(prj); } else if (strcmp(prj->code, "COP") == 0) { status = copset(prj); } else if (strcmp(prj->code, "COE") == 0) { status = coeset(prj); } else if (strcmp(prj->code, "COD") == 0) { status = codset(prj); } else if (strcmp(prj->code, "COO") == 0) { status = cooset(prj); } else if (strcmp(prj->code, "BON") == 0) { status = bonset(prj); } else if (strcmp(prj->code, "PCO") == 0) { status = pcoset(prj); } else if (strcmp(prj->code, "TSC") == 0) { status = tscset(prj); } else if (strcmp(prj->code, "CSC") == 0) { status = cscset(prj); } else if (strcmp(prj->code, "QSC") == 0) { status = qscset(prj); } else if (strcmp(prj->code, "HPX") == 0) { status = hpxset(prj); } else if (strcmp(prj->code, "XPH") == 0) { status = xphset(prj); } else { /* Unrecognized projection code. */ status = wcserr_set(WCSERR_SET(PRJERR_BAD_PARAM), "Unrecognized projection code '%s'", prj->code); } return status; } /*--------------------------------------------------------------------------*/ int prjx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int status; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag == 0) { if ((status = prjset(prj))) return status; } return prj->prjx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat); } /*--------------------------------------------------------------------------*/ int prjs2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int status; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag == 0) { if ((status = prjset(prj))) return status; } return prj->prjs2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat); } /*============================================================================ * Internal helper routine used by the *set() routines - not intended for * outside use. It forces (x,y) = (0,0) at (phi0,theta0). *---------------------------------------------------------------------------*/ int prjoff(prj, phi0, theta0) struct prjprm *prj; const double phi0, theta0; { int stat; double x0, y0; if (prj == 0x0) return PRJERR_NULL_POINTER; prj->x0 = 0.0; prj->y0 = 0.0; if (undefined(prj->phi0) || undefined(prj->theta0)) { /* Set both to the projection-specific default if either undefined. */ prj->phi0 = phi0; prj->theta0 = theta0; } else { if (prj->prjs2x(prj, 1, 1, 1, 1, &(prj->phi0), &(prj->theta0), &x0, &y0, &stat)) { return PRJERR_BAD_PARAM_SET("prjoff"); } prj->x0 = x0; prj->y0 = y0; } return 0; } /*============================================================================ * AZP: zenithal/azimuthal perspective projection. * * Given: * prj->pv[1] Distance parameter, mu in units of r0. * prj->pv[2] Tilt angle, gamma in degrees. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 90.0 if undefined. * * Returned: * prj->flag AZP * prj->code "AZP" * prj->x0 Offset in x. * prj->y0 Offset in y. * prj->w[0] r0*(mu+1) * prj->w[1] tan(gamma) * prj->w[2] sec(gamma) * prj->w[3] cos(gamma) * prj->w[4] sin(gamma) * prj->w[5] asin(-1/mu) for |mu| >= 1, -90 otherwise * prj->w[6] mu*cos(gamma) * prj->w[7] 1 if |mu*cos(gamma)| < 1, 0 otherwise * prj->prjx2s Pointer to azpx2s(). * prj->prjs2x Pointer to azps2x(). *===========================================================================*/ int azpset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = AZP; strcpy(prj->code, "AZP"); if (undefined(prj->pv[1])) prj->pv[1] = 0.0; if (undefined(prj->pv[2])) prj->pv[2] = 0.0; if (prj->r0 == 0.0) prj->r0 = R2D; strcpy(prj->name, "zenithal/azimuthal perspective"); prj->category = ZENITHAL; prj->pvrange = 102; prj->simplezen = prj->pv[2] == 0.0; prj->equiareal = 0; prj->conformal = 0; prj->global = 0; prj->divergent = prj->pv[1] <= 1.0; prj->w[0] = prj->r0*(prj->pv[1] + 1.0); if (prj->w[0] == 0.0) { return PRJERR_BAD_PARAM_SET("azpset"); } prj->w[3] = cosd(prj->pv[2]); if (prj->w[3] == 0.0) { return PRJERR_BAD_PARAM_SET("azpset"); } prj->w[2] = 1.0/prj->w[3]; prj->w[4] = sind(prj->pv[2]); prj->w[1] = prj->w[4] / prj->w[3]; if (fabs(prj->pv[1]) > 1.0) { prj->w[5] = asind(-1.0/prj->pv[1]); } else { prj->w[5] = -90.0; } prj->w[6] = prj->pv[1] * prj->w[3]; prj->w[7] = (fabs(prj->w[6]) < 1.0) ? 1.0 : 0.0; prj->prjx2s = azpx2s; prj->prjs2x = azps2x; return prjoff(prj, 0.0, 90.0); } /*--------------------------------------------------------------------------*/ int azpx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double a, b, q, r, s, t, xj, yj, yc, yc2; const double tol = 1.0e-13; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != AZP) { if ((status = azpset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xj; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yj = *yp + prj->y0; yc = yj*prj->w[3]; yc2 = yc*yc; q = prj->w[0] + yj*prj->w[4]; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xj = *phip; r = sqrt(xj*xj + yc2); if (r == 0.0) { *phip = 0.0; *thetap = 90.0; *(statp++) = 0; } else { *phip = atan2d(xj, -yc); s = r / q; t = s*prj->pv[1]/sqrt(s*s + 1.0); s = atan2d(1.0, s); if (fabs(t) > 1.0) { if (fabs(t) > 1.0+tol) { *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("azpx2s"); continue; } t = copysign(90.0, t); } else { t = asind(t); } a = s - t; b = s + t + 180.0; if (a > 90.0) a -= 360.0; if (b > 90.0) b -= 360.0; *thetap = (a > b) ? a : b; *(statp++) = 0; } } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("azpx2s"); } return status; } /*--------------------------------------------------------------------------*/ int azps2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double a, b, cosphi, costhe, r, s, sinphi, sinthe, t; register int iphi, itheta, istat, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != AZP) { if ((status = azpset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { sincosd(*phip, &sinphi, &cosphi); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinphi; *yp = cosphi; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { sincosd(*thetap, &sinthe, &costhe); for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { s = prj->w[1]*(*yp); t = (prj->pv[1] + sinthe) + costhe*s; if (t == 0.0) { *xp = 0.0; *yp = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_WORLD_SET("azps2x"); } else { r = prj->w[0]*costhe/t; /* Bounds checking. */ istat = 0; if (prj->bounds&1) { if (*thetap < prj->w[5]) { /* Overlap. */ istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("azps2x"); } else if (prj->w[7] > 0.0) { /* Divergence. */ t = prj->pv[1] / sqrt(1.0 + s*s); if (fabs(t) <= 1.0) { s = atand(-s); t = asind(t); a = s - t; b = s + t + 180.0; if (a > 90.0) a -= 360.0; if (b > 90.0) b -= 360.0; if (*thetap < ((a > b) ? a : b)) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("azps2x"); } } } } *xp = r*(*xp) - prj->x0; *yp = -r*(*yp)*prj->w[2] - prj->y0; *(statp++) = istat; } } } return status; } /*============================================================================ * SZP: slant zenithal perspective projection. * * Given: * prj->pv[1] Distance of the point of projection from the centre of the * generating sphere, mu in units of r0. * prj->pv[2] Native longitude, phi_c, and ... * prj->pv[3] Native latitude, theta_c, on the planewards side of the * intersection of the line through the point of projection * and the centre of the generating sphere, phi_c in degrees. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 90.0 if undefined. * * Returned: * prj->flag SZP * prj->code "SZP" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] 1/r0 * prj->w[1] xp = -mu*cos(theta_c)*sin(phi_c) * prj->w[2] yp = mu*cos(theta_c)*cos(phi_c) * prj->w[3] zp = mu*sin(theta_c) + 1 * prj->w[4] r0*xp * prj->w[5] r0*yp * prj->w[6] r0*zp * prj->w[7] (zp - 1)^2 * prj->w[8] asin(1-zp) if |1 - zp| < 1, -90 otherwise * prj->prjx2s Pointer to szpx2s(). * prj->prjs2x Pointer to szps2x(). *===========================================================================*/ int szpset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = SZP; strcpy(prj->code, "SZP"); if (undefined(prj->pv[1])) prj->pv[1] = 0.0; if (undefined(prj->pv[2])) prj->pv[2] = 0.0; if (undefined(prj->pv[3])) prj->pv[3] = 90.0; if (prj->r0 == 0.0) prj->r0 = R2D; strcpy(prj->name, "slant zenithal perspective"); prj->category = ZENITHAL; prj->pvrange = 103; prj->simplezen = prj->pv[3] == 90.0; prj->equiareal = 0; prj->conformal = 0; prj->global = 0; prj->divergent = prj->pv[1] <= 1.0; prj->w[0] = 1.0/prj->r0; prj->w[3] = prj->pv[1] * sind(prj->pv[3]) + 1.0; if (prj->w[3] == 0.0) { return PRJERR_BAD_PARAM_SET("szpset"); } prj->w[1] = -prj->pv[1] * cosd(prj->pv[3]) * sind(prj->pv[2]); prj->w[2] = prj->pv[1] * cosd(prj->pv[3]) * cosd(prj->pv[2]); prj->w[4] = prj->r0 * prj->w[1]; prj->w[5] = prj->r0 * prj->w[2]; prj->w[6] = prj->r0 * prj->w[3]; prj->w[7] = (prj->w[3] - 1.0) * prj->w[3] - 1.0; if (fabs(prj->w[3] - 1.0) < 1.0) { prj->w[8] = asind(1.0 - prj->w[3]); } else { prj->w[8] = -90.0; } prj->prjx2s = szpx2s; prj->prjs2x = szps2x; return prjoff(prj, 0.0, 90.0); } /*--------------------------------------------------------------------------*/ int szpx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double a, b, c, d, r2, sinth1, sinth2, sinthe, t, x1, xr, xy, y1, yr, z; const double tol = 1.0e-13; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != SZP) { if ((status = szpset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xr = (*xp + prj->x0)*prj->w[0]; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xr; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yr = (*yp + prj->y0)*prj->w[0]; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xr = *phip; r2 = xr*xr + yr*yr; x1 = (xr - prj->w[1])/prj->w[3]; y1 = (yr - prj->w[2])/prj->w[3]; xy = xr*x1 + yr*y1; if (r2 < 1.0e-10) { /* Use small angle formula. */ z = r2/2.0; *thetap = 90.0 - R2D*sqrt(r2/(1.0 + xy)); } else { t = x1*x1 + y1*y1; a = t + 1.0; b = xy - t; c = r2 - xy - xy + t - 1.0; d = b*b - a*c; /* Check for a solution. */ if (d < 0.0) { *phip = 0.0; *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("szpx2s"); continue; } d = sqrt(d); /* Choose solution closest to pole. */ sinth1 = (-b + d)/a; sinth2 = (-b - d)/a; sinthe = (sinth1 > sinth2) ? sinth1 : sinth2; if (sinthe > 1.0) { if (sinthe-1.0 < tol) { sinthe = 1.0; } else { sinthe = (sinth1 < sinth2) ? sinth1 : sinth2; } } if (sinthe < -1.0) { if (sinthe+1.0 > -tol) { sinthe = -1.0; } } if (sinthe > 1.0 || sinthe < -1.0) { *phip = 0.0; *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("szpx2s"); continue; } *thetap = asind(sinthe); z = 1.0 - sinthe; } *phip = atan2d(xr - x1*z, -(yr - y1*z)); *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("szpx2s"); } return status; } /*--------------------------------------------------------------------------*/ int szps2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double a, b, cosphi, r, s, sinphi, t, u, v; register int iphi, itheta, istat, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != SZP) { if ((status = szpset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { sincosd(*phip, &sinphi, &cosphi); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinphi; *yp = cosphi; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { s = 1.0 - sind(*thetap); t = prj->w[3] - s; if (t == 0.0) { for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = 0.0; *yp = 0.0; *(statp++) = 1; } if (!status) status = PRJERR_BAD_WORLD_SET("szps2x"); } else { r = prj->w[6]*cosd(*thetap)/t; u = prj->w[4]*s/t + prj->x0; v = prj->w[5]*s/t + prj->y0; for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { /* Bounds checking. */ istat = 0; if (prj->bounds&1) { if (*thetap < prj->w[8]) { /* Divergence. */ istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("szps2x"); } else if (fabs(prj->pv[1]) > 1.0) { /* Overlap. */ s = prj->w[1]*(*xp) - prj->w[2]*(*yp); t = 1.0/sqrt(prj->w[7] + s*s); if (fabs(t) <= 1.0) { s = atan2d(s, prj->w[3] - 1.0); t = asind(t); a = s - t; b = s + t + 180.0; if (a > 90.0) a -= 360.0; if (b > 90.0) b -= 360.0; if (*thetap < ((a > b) ? a : b)) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("szps2x"); } } } } *xp = r*(*xp) - u; *yp = -r*(*yp) - v; *(statp++) = istat; } } } return status; } /*============================================================================ * TAN: gnomonic projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 90.0 if undefined. * * Returned: * prj->flag TAN * prj->code "TAN" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->prjx2s Pointer to tanx2s(). * prj->prjs2x Pointer to tans2x(). *===========================================================================*/ int tanset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = TAN; strcpy(prj->code, "TAN"); if (prj->r0 == 0.0) prj->r0 = R2D; strcpy(prj->name, "gnomonic"); prj->category = ZENITHAL; prj->pvrange = 0; prj->simplezen = 1; prj->equiareal = 0; prj->conformal = 0; prj->global = 0; prj->divergent = 1; prj->prjx2s = tanx2s; prj->prjs2x = tans2x; return prjoff(prj, 0.0, 90.0); } /*--------------------------------------------------------------------------*/ int tanx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double r, xj, yj, yj2; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != TAN) { if ((status = tanset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xj; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yj = *yp + prj->y0; yj2 = yj*yj; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xj = *phip; r = sqrt(xj*xj + yj2); if (r == 0.0) { *phip = 0.0; } else { *phip = atan2d(xj, -yj); } *thetap = atan2d(prj->r0, r); *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("tanx2s"); } return status; } /*--------------------------------------------------------------------------*/ int tans2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double cosphi, r, s, sinphi; register int iphi, itheta, istat, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != TAN) { if ((status = tanset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { sincosd(*phip, &sinphi, &cosphi); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinphi; *yp = cosphi; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { s = sind(*thetap); if (s == 0.0) { for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = 0.0; *yp = 0.0; *(statp++) = 1; } if (!status) status = PRJERR_BAD_WORLD_SET("tans2x"); } else { r = prj->r0*cosd(*thetap)/s; /* Bounds checking. */ istat = 0; if (prj->bounds&1) { if (s < 0.0) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("tans2x"); } } for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = r*(*xp) - prj->x0; *yp = -r*(*yp) - prj->y0; *(statp++) = istat; } } } return status; } /*============================================================================ * STG: stereographic projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 90.0 if undefined. * * Returned: * prj->flag STG * prj->code "STG" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] 2*r0 * prj->w[1] 1/(2*r0) * prj->prjx2s Pointer to stgx2s(). * prj->prjs2x Pointer to stgs2x(). *===========================================================================*/ int stgset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = STG; strcpy(prj->code, "STG"); strcpy(prj->name, "stereographic"); prj->category = ZENITHAL; prj->pvrange = 0; prj->simplezen = 1; prj->equiareal = 0; prj->conformal = 1; prj->global = 0; prj->divergent = 1; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 360.0/PI; prj->w[1] = PI/360.0; } else { prj->w[0] = 2.0*prj->r0; prj->w[1] = 1.0/prj->w[0]; } prj->prjx2s = stgx2s; prj->prjs2x = stgs2x; return prjoff(prj, 0.0, 90.0); } /*--------------------------------------------------------------------------*/ int stgx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double r, xj, yj, yj2; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != STG) { if ((status = stgset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xj; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yj = *yp + prj->y0; yj2 = yj*yj; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xj = *phip; r = sqrt(xj*xj + yj2); if (r == 0.0) { *phip = 0.0; } else { *phip = atan2d(xj, -yj); } *thetap = 90.0 - 2.0*atand(r*prj->w[1]); *(statp++) = 0; } } return 0; } /*--------------------------------------------------------------------------*/ int stgs2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double cosphi, r, s, sinphi; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != STG) { if ((status = stgset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { sincosd(*phip, &sinphi, &cosphi); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinphi; *yp = cosphi; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { s = 1.0 + sind(*thetap); if (s == 0.0) { for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = 0.0; *yp = 0.0; *(statp++) = 1; } if (!status) status = PRJERR_BAD_WORLD_SET("stgs2x"); } else { r = prj->w[0]*cosd(*thetap)/s; for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = r*(*xp) - prj->x0; *yp = -r*(*yp) - prj->y0; *(statp++) = 0; } } } return status; } /*============================================================================ * SIN: orthographic/synthesis projection. * * Given: * prj->pv[1:2] Obliqueness parameters, xi and eta. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 90.0 if undefined. * * Returned: * prj->flag SIN * prj->code "SIN" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] 1/r0 * prj->w[1] xi**2 + eta**2 * prj->w[2] xi**2 + eta**2 + 1 * prj->w[3] xi**2 + eta**2 - 1 * prj->prjx2s Pointer to sinx2s(). * prj->prjs2x Pointer to sins2x(). *===========================================================================*/ int sinset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = SIN; strcpy(prj->code, "SIN"); if (undefined(prj->pv[1])) prj->pv[1] = 0.0; if (undefined(prj->pv[2])) prj->pv[2] = 0.0; if (prj->r0 == 0.0) prj->r0 = R2D; strcpy(prj->name, "orthographic/synthesis"); prj->category = ZENITHAL; prj->pvrange = 102; prj->simplezen = (prj->pv[1] == 0.0 && prj->pv[2] == 0.0); prj->equiareal = 0; prj->conformal = 0; prj->global = 0; prj->divergent = 0; prj->w[0] = 1.0/prj->r0; prj->w[1] = prj->pv[1]*prj->pv[1] + prj->pv[2]*prj->pv[2]; prj->w[2] = prj->w[1] + 1.0; prj->w[3] = prj->w[1] - 1.0; prj->prjx2s = sinx2s; prj->prjs2x = sins2x; return prjoff(prj, 0.0, 90.0); } /*--------------------------------------------------------------------------*/ int sinx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; const double tol = 1.0e-13; double a, b, c, d, eta, r2, sinth1, sinth2, sinthe, x0, xi, x1, xy, y0, y02, y1, z; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != SIN) { if ((status = sinset(prj))) return status; } xi = prj->pv[1]; eta = prj->pv[2]; if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { x0 = (*xp + prj->x0)*prj->w[0]; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = x0; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { y0 = (*yp + prj->y0)*prj->w[0]; y02 = y0*y0; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { /* Compute intermediaries. */ x0 = *phip; r2 = x0*x0 + y02; if (prj->w[1] == 0.0) { /* Orthographic projection. */ if (r2 != 0.0) { *phip = atan2d(x0, -y0); } else { *phip = 0.0; } if (r2 < 0.5) { *thetap = acosd(sqrt(r2)); } else if (r2 <= 1.0) { *thetap = asind(sqrt(1.0 - r2)); } else { *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("sinx2s") continue; } } else { /* "Synthesis" projection. */ xy = x0*xi + y0*eta; if (r2 < 1.0e-10) { /* Use small angle formula. */ z = r2/2.0; *thetap = 90.0 - R2D*sqrt(r2/(1.0 + xy)); } else { a = prj->w[2]; b = xy - prj->w[1]; c = r2 - xy - xy + prj->w[3]; d = b*b - a*c; /* Check for a solution. */ if (d < 0.0) { *phip = 0.0; *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("sinx2s") continue; } d = sqrt(d); /* Choose solution closest to pole. */ sinth1 = (-b + d)/a; sinth2 = (-b - d)/a; sinthe = (sinth1 > sinth2) ? sinth1 : sinth2; if (sinthe > 1.0) { if (sinthe-1.0 < tol) { sinthe = 1.0; } else { sinthe = (sinth1 < sinth2) ? sinth1 : sinth2; } } if (sinthe < -1.0) { if (sinthe+1.0 > -tol) { sinthe = -1.0; } } if (sinthe > 1.0 || sinthe < -1.0) { *phip = 0.0; *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("sinx2s") continue; } *thetap = asind(sinthe); z = 1.0 - sinthe; } x1 = -y0 + eta*z; y1 = x0 - xi*z; if (x1 == 0.0 && y1 == 0.0) { *phip = 0.0; } else { *phip = atan2d(y1,x1); } } *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("sinx2s"); } return status; } /*--------------------------------------------------------------------------*/ int sins2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double cosphi, costhe, sinphi, r, t, z, z1, z2; register int iphi, itheta, istat, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != SIN) { if ((status = sinset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { sincosd(*phip, &sinphi, &cosphi); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinphi; *yp = cosphi; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { t = (90.0 - fabs(*thetap))*D2R; if (t < 1.0e-5) { if (*thetap > 0.0) { z = t*t/2.0; } else { z = 2.0 - t*t/2.0; } costhe = t; } else { z = 1.0 - sind(*thetap); costhe = cosd(*thetap); } r = prj->r0*costhe; if (prj->w[1] == 0.0) { /* Orthographic projection. */ istat = 0; if (prj->bounds&1) { if (*thetap < 0.0) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("sins2x"); } } for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = r*(*xp) - prj->x0; *yp = -r*(*yp) - prj->y0; *(statp++) = istat; } } else { /* "Synthesis" projection. */ z *= prj->r0; z1 = prj->pv[1]*z - prj->x0; z2 = prj->pv[2]*z - prj->y0; for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { istat = 0; if (prj->bounds&1) { t = -atand(prj->pv[1]*(*xp) - prj->pv[2]*(*yp)); if (*thetap < t) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("sins2x"); } } *xp = r*(*xp) + z1; *yp = -r*(*yp) + z2; *(statp++) = istat; } } } return status; } /*============================================================================ * ARC: zenithal/azimuthal equidistant projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 90.0 if undefined. * * Returned: * prj->flag ARC * prj->code "ARC" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] r0*(pi/180) * prj->w[1] (180/pi)/r0 * prj->prjx2s Pointer to arcx2s(). * prj->prjs2x Pointer to arcs2x(). *===========================================================================*/ int arcset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = ARC; strcpy(prj->code, "ARC"); strcpy(prj->name, "zenithal/azimuthal equidistant"); prj->category = ZENITHAL; prj->pvrange = 0; prj->simplezen = 1; prj->equiareal = 0; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 1.0; prj->w[1] = 1.0; } else { prj->w[0] = prj->r0*D2R; prj->w[1] = 1.0/prj->w[0]; } prj->prjx2s = arcx2s; prj->prjs2x = arcs2x; return prjoff(prj, 0.0, 90.0); } /*--------------------------------------------------------------------------*/ int arcx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double r, xj, yj, yj2; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != ARC) { if ((status = arcset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xj; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yj = *yp + prj->y0; yj2 = yj*yj; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xj = *phip; r = sqrt(xj*xj + yj2); if (r == 0.0) { *phip = 0.0; *thetap = 90.0; } else { *phip = atan2d(xj, -yj); *thetap = 90.0 - r*prj->w[1]; } *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("arcx2s"); } return status; } /*--------------------------------------------------------------------------*/ int arcs2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double cosphi, r, sinphi; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != ARC) { if ((status = arcset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { sincosd(*phip, &sinphi, &cosphi); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinphi; *yp = cosphi; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { r = prj->w[0]*(90.0 - *thetap); for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = r*(*xp) - prj->x0; *yp = -r*(*yp) - prj->y0; *(statp++) = 0; } } return 0; } /*============================================================================ * ZPN: zenithal/azimuthal polynomial projection. * * Given: * prj->pv[] Polynomial coefficients. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 90.0 if undefined. * * Returned: * prj->flag ZPN * prj->code "ZPN" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->n Degree of the polynomial, N. * prj->w[0] Co-latitude of the first point of inflection, radian. * prj->w[1] Radius of the first point of inflection (N > 1), radian. * prj->prjx2s Pointer to zpnx2s(). * prj->prjs2x Pointer to zpns2x(). *===========================================================================*/ int zpnset(prj) struct prjprm *prj; { int j, k, m; double d, d1, d2, r, zd, zd1, zd2; const double tol = 1.0e-13; if (prj == 0x0) return PRJERR_NULL_POINTER; strcpy(prj->code, "ZPN"); prj->flag = ZPN; if (undefined(prj->pv[1])) prj->pv[1] = 0.0; if (undefined(prj->pv[2])) prj->pv[2] = 0.0; if (undefined(prj->pv[3])) prj->pv[3] = 0.0; if (prj->r0 == 0.0) prj->r0 = R2D; strcpy(prj->name, "zenithal/azimuthal polynomial"); prj->category = ZENITHAL; prj->pvrange = 30; prj->simplezen = 1; prj->equiareal = 0; prj->conformal = 0; prj->global = 0; prj->divergent = 0; /* Find the highest non-zero coefficient. */ for (k = PVN-1; k >= 0 && prj->pv[k] == 0.0; k--); if (k < 0) { return PRJERR_BAD_PARAM_SET("zpnset"); } prj->n = k; if (k < 2) { /* No point of inflection. */ prj->w[0] = PI; } else { /* Find the point of inflection closest to the pole. */ zd1 = 0.0; d1 = prj->pv[1]; if (d1 <= 0.0) { return PRJERR_BAD_PARAM_SET("zpnset"); } /* Find the point where the derivative first goes negative. */ for (j = 0; j < 180; j++) { zd2 = j*D2R; d2 = 0.0; for (m = k; m > 0; m--) { d2 = d2*zd2 + m*prj->pv[m]; } if (d2 <= 0.0) break; zd1 = zd2; d1 = d2; } if (j == 180) { /* No negative derivative -> no point of inflection. */ zd = PI; prj->global = 1; } else { /* Find where the derivative is zero. */ for (j = 1; j <= 10; j++) { zd = zd1 - d1*(zd2-zd1)/(d2-d1); d = 0.0; for (m = k; m > 0; m--) { d = d*zd + m*prj->pv[m]; } if (fabs(d) < tol) break; if (d < 0.0) { zd2 = zd; d2 = d; } else { zd1 = zd; d1 = d; } } } r = 0.0; for (m = k; m >= 0; m--) { r = r*zd + prj->pv[m]; } prj->w[0] = zd; prj->w[1] = r; } prj->prjx2s = zpnx2s; prj->prjs2x = zpns2x; return prjoff(prj, 0.0, 90.0); } /*--------------------------------------------------------------------------*/ int zpnx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int j, k, m, mx, my, rowlen, rowoff, status; double a, b, c, d, lambda, r, r1, r2, rt, xj, yj, yj2, zd, zd1, zd2; const double tol = 1.0e-13; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != ZPN) { if ((status = zpnset(prj))) return status; } k = prj->n; if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xj; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yj = *yp + prj->y0; yj2 = yj*yj; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xj = *phip; r = sqrt(xj*xj + yj2)/prj->r0; if (r == 0.0) { *phip = 0.0; } else { *phip = atan2d(xj, -yj); } if (k < 1) { /* Constant - no solution. */ return PRJERR_BAD_PARAM_SET("zpnx2s"); } else if (k == 1) { /* Linear. */ zd = (r - prj->pv[0])/prj->pv[1]; } else if (k == 2) { /* Quadratic. */ a = prj->pv[2]; b = prj->pv[1]; c = prj->pv[0] - r; d = b*b - 4.0*a*c; if (d < 0.0) { *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("zpnx2s"); continue; } d = sqrt(d); /* Choose solution closest to pole. */ zd1 = (-b + d)/(2.0*a); zd2 = (-b - d)/(2.0*a); zd = (zd1zd2) ? zd1 : zd2; if (zd < 0.0) { if (zd < -tol) { *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("zpnx2s"); continue; } zd = 0.0; } else if (zd > PI) { if (zd > PI+tol) { *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("zpnx2s"); continue; } zd = PI; } } else { /* Higher order - solve iteratively. */ zd1 = 0.0; r1 = prj->pv[0]; zd2 = prj->w[0]; r2 = prj->w[1]; if (r < r1) { if (r < r1-tol) { *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("zpnx2s"); continue; } zd = zd1; } else if (r > r2) { if (r > r2+tol) { *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("zpnx2s"); continue; } zd = zd2; } else { /* Dissect the interval. */ for (j = 0; j < 100; j++) { lambda = (r2 - r)/(r2 - r1); if (lambda < 0.1) { lambda = 0.1; } else if (lambda > 0.9) { lambda = 0.9; } zd = zd2 - lambda*(zd2 - zd1); rt = 0.0; for (m = k; m >= 0; m--) { rt = (rt * zd) + prj->pv[m]; } if (rt < r) { if (r-rt < tol) break; r1 = rt; zd1 = zd; } else { if (rt-r < tol) break; r2 = rt; zd2 = zd; } if (fabs(zd2-zd1) < tol) break; } } } *thetap = 90.0 - zd*R2D; *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("zpnx2s"); } return status; } /*--------------------------------------------------------------------------*/ int zpns2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int m, mphi, mtheta, rowlen, rowoff, status; double cosphi, r, s, sinphi; register int iphi, itheta, istat, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != ZPN) { if ((status = zpnset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { sincosd(*phip, &sinphi, &cosphi); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinphi; *yp = cosphi; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { s = (90.0 - *thetap)*D2R; r = 0.0; for (m = prj->n; m >= 0; m--) { r = r*s + prj->pv[m]; } r *= prj->r0; /* Bounds checking. */ istat = 0; if (prj->bounds&1) { if (s > prj->w[0]) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("zpns2x"); } } for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = r*(*xp) - prj->x0; *yp = -r*(*yp) - prj->y0; *(statp++) = istat; } } return status; } /*============================================================================ * ZEA: zenithal/azimuthal equal area projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 90.0 if undefined. * * Returned: * prj->flag ZEA * prj->code "ZEA" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] 2*r0 * prj->w[1] 1/(2*r0) * prj->prjx2s Pointer to zeax2s(). * prj->prjs2x Pointer to zeas2x(). *===========================================================================*/ int zeaset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = ZEA; strcpy(prj->code, "ZEA"); strcpy(prj->name, "zenithal/azimuthal equal area"); prj->category = ZENITHAL; prj->pvrange = 0; prj->simplezen = 1; prj->equiareal = 1; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 360.0/PI; prj->w[1] = PI/360.0; } else { prj->w[0] = 2.0*prj->r0; prj->w[1] = 1.0/prj->w[0]; } prj->prjx2s = zeax2s; prj->prjs2x = zeas2x; return prjoff(prj, 0.0, 90.0); } /*--------------------------------------------------------------------------*/ int zeax2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double r, s, xj, yj, yj2; const double tol = 1.0e-12; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != ZEA) { if ((status = zeaset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xj; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yj = *yp + prj->y0; yj2 = yj*yj; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xj = *phip; r = sqrt(xj*xj + yj2); if (r == 0.0) { *phip = 0.0; } else { *phip = atan2d(xj, -yj); } s = r*prj->w[1]; if (fabs(s) > 1.0) { if (fabs(r - prj->w[0]) < tol) { *thetap = -90.0; } else { *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("zeax2s"); continue; } } else { *thetap = 90.0 - 2.0*asind(s); } *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("zeax2s"); } return status; } /*--------------------------------------------------------------------------*/ int zeas2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double cosphi, r, sinphi; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != ZEA) { if ((status = zeaset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { sincosd(*phip, &sinphi, &cosphi); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinphi; *yp = cosphi; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { r = prj->w[0]*sind((90.0 - *thetap)/2.0); for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = r*(*xp) - prj->x0; *yp = -r*(*yp) - prj->y0; *(statp++) = 0; } } return 0; } /*============================================================================ * AIR: Airy's projection. * * Given: * prj->pv[1] Latitude theta_b within which the error is minimized, in * degrees. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 90.0 if undefined. * * Returned: * prj->flag AIR * prj->code "AIR" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] 2*r0 * prj->w[1] ln(cos(xi_b))/tan(xi_b)**2, where xi_b = (90-theta_b)/2 * prj->w[2] 1/2 - prj->w[1] * prj->w[3] 2*r0*prj->w[2] * prj->w[4] tol, cutoff for using small angle approximation, in * radians. * prj->w[5] prj->w[2]*tol * prj->w[6] (180/pi)/prj->w[2] * prj->prjx2s Pointer to airx2s(). * prj->prjs2x Pointer to airs2x(). *===========================================================================*/ int airset(prj) struct prjprm *prj; { const double tol = 1.0e-4; double cosxi; if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = AIR; strcpy(prj->code, "AIR"); if (undefined(prj->pv[1])) prj->pv[1] = 90.0; if (prj->r0 == 0.0) prj->r0 = R2D; strcpy(prj->name, "Airy's zenithal"); prj->category = ZENITHAL; prj->pvrange = 101; prj->simplezen = 1; prj->equiareal = 0; prj->conformal = 0; prj->global = 0; prj->divergent = 1; prj->w[0] = 2.0*prj->r0; if (prj->pv[1] == 90.0) { prj->w[1] = -0.5; prj->w[2] = 1.0; } else if (prj->pv[1] > -90.0) { cosxi = cosd((90.0 - prj->pv[1])/2.0); prj->w[1] = log(cosxi)*(cosxi*cosxi)/(1.0-cosxi*cosxi); prj->w[2] = 0.5 - prj->w[1]; } else { return PRJERR_BAD_PARAM_SET("airset"); } prj->w[3] = prj->w[0] * prj->w[2]; prj->w[4] = tol; prj->w[5] = prj->w[2]*tol; prj->w[6] = R2D/prj->w[2]; prj->prjx2s = airx2s; prj->prjs2x = airs2x; return prjoff(prj, 0.0, 90.0); } /*--------------------------------------------------------------------------*/ int airx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int k, mx, my, rowlen, rowoff, status; double cosxi, lambda, r, r1, r2, rt, tanxi, x1, x2, xi, xj, yj, yj2; const double tol = 1.0e-12; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != AIR) { if ((status = airset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xj; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yj = *yp + prj->y0; yj2 = yj*yj; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xj = *phip; r = sqrt(xj*xj + yj2)/prj->w[0]; if (r == 0.0) { *phip = 0.0; } else { *phip = atan2d(xj, -yj); } if (r == 0.0) { xi = 0.0; } else if (r < prj->w[5]) { xi = r*prj->w[6]; } else { /* Find a solution interval. */ x1 = x2 = 1.0; r1 = r2 = 0.0; for (k = 0; k < 30; k++) { x2 = x1/2.0; tanxi = sqrt(1.0-x2*x2)/x2; r2 = -(log(x2)/tanxi + prj->w[1]*tanxi); if (r2 >= r) break; x1 = x2; r1 = r2; } if (k == 30) { *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("airx2s"); continue; } for (k = 0; k < 100; k++) { /* Weighted division of the interval. */ lambda = (r2-r)/(r2-r1); if (lambda < 0.1) { lambda = 0.1; } else if (lambda > 0.9) { lambda = 0.9; } cosxi = x2 - lambda*(x2-x1); tanxi = sqrt(1.0-cosxi*cosxi)/cosxi; rt = -(log(cosxi)/tanxi + prj->w[1]*tanxi); if (rt < r) { if (r-rt < tol) break; r1 = rt; x1 = cosxi; } else { if (rt-r < tol) break; r2 = rt; x2 = cosxi; } } if (k == 100) { *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("airx2s"); continue; } xi = acosd(cosxi); } *thetap = 90.0 - 2.0*xi; *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("airx2s"); } return status; } /*--------------------------------------------------------------------------*/ int airs2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double cosphi, cosxi, r, tanxi, xi, sinphi; register int iphi, itheta, istat, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != AIR) { if ((status = airset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { sincosd(*phip, &sinphi, &cosphi); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinphi; *yp = cosphi; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { istat = 0; if (*thetap == 90.0) { r = 0.0; } else if (*thetap > -90.0) { xi = D2R*(90.0 - *thetap)/2.0; if (xi < prj->w[4]) { r = xi*prj->w[3]; } else { cosxi = cosd((90.0 - *thetap)/2.0); tanxi = sqrt(1.0 - cosxi*cosxi)/cosxi; r = -prj->w[0]*(log(cosxi)/tanxi + prj->w[1]*tanxi); } } else { r = 0.0; istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("airs2x"); } for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = r*(*xp) - prj->x0; *yp = -r*(*yp) - prj->y0; *(statp++) = istat; } } return status; } /*============================================================================ * CYP: cylindrical perspective projection. * * Given: * prj->pv[1] Distance of point of projection from the centre of the * generating sphere, mu, in units of r0. * prj->pv[2] Radius of the cylinder of projection, lambda, in units of * r0. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag CYP * prj->code "CYP" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] r0*lambda*(pi/180) * prj->w[1] (180/pi)/(r0*lambda) * prj->w[2] r0*(mu + lambda) * prj->w[3] 1/(r0*(mu + lambda)) * prj->prjx2s Pointer to cypx2s(). * prj->prjs2x Pointer to cyps2x(). *===========================================================================*/ int cypset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = CYP; strcpy(prj->code, "CYP"); if (undefined(prj->pv[1])) prj->pv[1] = 1.0; if (undefined(prj->pv[2])) prj->pv[2] = 1.0; strcpy(prj->name, "cylindrical perspective"); prj->category = CYLINDRICAL; prj->pvrange = 102; prj->simplezen = 0; prj->equiareal = 0; prj->conformal = 0; prj->global = prj->pv[1] < -1.0 || 0.0 < prj->pv[1]; prj->divergent = !prj->global; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = prj->pv[2]; if (prj->w[0] == 0.0) { return PRJERR_BAD_PARAM_SET("cypset"); } prj->w[1] = 1.0/prj->w[0]; prj->w[2] = R2D*(prj->pv[1] + prj->pv[2]); if (prj->w[2] == 0.0) { return PRJERR_BAD_PARAM_SET("cypset"); } prj->w[3] = 1.0/prj->w[2]; } else { prj->w[0] = prj->r0*prj->pv[2]*D2R; if (prj->w[0] == 0.0) { return PRJERR_BAD_PARAM_SET("cypset"); } prj->w[1] = 1.0/prj->w[0]; prj->w[2] = prj->r0*(prj->pv[1] + prj->pv[2]); if (prj->w[2] == 0.0) { return PRJERR_BAD_PARAM_SET("cypset"); } prj->w[3] = 1.0/prj->w[2]; } prj->prjx2s = cypx2s; prj->prjs2x = cyps2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int cypx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double eta, s, t; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != CYP) { if ((status = cypset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { s = prj->w[1]*(*xp + prj->x0); phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = s; phip += rowlen; } } /* Do y dependence. */ yp = y; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { eta = prj->w[3]*(*yp + prj->y0); t = atan2d(eta,1.0) + asind(eta*prj->pv[1]/sqrt(eta*eta+1.0)); for (ix = 0; ix < mx; ix++, thetap += spt) { *thetap = t; *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("cypx2s"); } return status; } /*--------------------------------------------------------------------------*/ int cyps2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double eta, xi; register int iphi, itheta, istat, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != CYP) { if ((status = cypset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { xi = prj->w[0]*(*phip) - prj->x0; xp = x + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = xi; xp += rowlen; } } /* Do theta dependence. */ thetap = theta; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { eta = prj->pv[1] + cosd(*thetap); istat = 0; if (eta == 0.0) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("cyps2x"); } else { eta = prj->w[2]*sind(*thetap)/eta; } eta -= prj->y0; for (iphi = 0; iphi < mphi; iphi++, yp += sxy) { *yp = eta; *(statp++) = istat; } } return status; } /*============================================================================ * CEA: cylindrical equal area projection. * * Given: * prj->pv[1] Square of the cosine of the latitude at which the * projection is conformal, lambda. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag CEA * prj->code "CEA" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] r0*(pi/180) * prj->w[1] (180/pi)/r0 * prj->w[2] r0/lambda * prj->w[3] lambda/r0 * prj->prjx2s Pointer to ceax2s(). * prj->prjs2x Pointer to ceas2x(). *===========================================================================*/ int ceaset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = CEA; strcpy(prj->code, "CEA"); if (undefined(prj->pv[1])) prj->pv[1] = 1.0; strcpy(prj->name, "cylindrical equal area"); prj->category = CYLINDRICAL; prj->pvrange = 101; prj->simplezen = 0; prj->equiareal = 1; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 1.0; prj->w[1] = 1.0; if (prj->pv[1] <= 0.0 || prj->pv[1] > 1.0) { return PRJERR_BAD_PARAM_SET("ceaset"); } prj->w[2] = prj->r0/prj->pv[1]; prj->w[3] = prj->pv[1]/prj->r0; } else { prj->w[0] = prj->r0*D2R; prj->w[1] = R2D/prj->r0; if (prj->pv[1] <= 0.0 || prj->pv[1] > 1.0) { return PRJERR_BAD_PARAM_SET("ceaset"); } prj->w[2] = prj->r0/prj->pv[1]; prj->w[3] = prj->pv[1]/prj->r0; } prj->prjx2s = ceax2s; prj->prjs2x = ceas2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int ceax2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double s; const double tol = 1.0e-13; register int istat, ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != CEA) { if ((status = ceaset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { s = prj->w[1]*(*xp + prj->x0); phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = s; phip += rowlen; } } /* Do y dependence. */ yp = y; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { s = prj->w[3]*(*yp + prj->y0); istat = 0; if (fabs(s) > 1.0) { if (fabs(s) > 1.0+tol) { s = 0.0; istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("ceax2s"); } else { s = copysign(90.0, s); } } else { s = asind(s); } for (ix = 0; ix < mx; ix++, thetap += spt) { *thetap = s; *(statp++) = istat; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("ceax2s"); } return status; } /*--------------------------------------------------------------------------*/ int ceas2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double eta, xi; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != CEA) { if ((status = ceaset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { xi = prj->w[0]*(*phip) - prj->x0; xp = x + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = xi; xp += rowlen; } } /* Do theta dependence. */ thetap = theta; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { eta = prj->w[2]*sind(*thetap) - prj->y0; for (iphi = 0; iphi < mphi; iphi++, yp += sxy) { *yp = eta; *(statp++) = 0; } } return 0; } /*============================================================================ * CAR: Plate carree projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag CAR * prj->code "CAR" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] r0*(pi/180) * prj->w[1] (180/pi)/r0 * prj->prjx2s Pointer to carx2s(). * prj->prjs2x Pointer to cars2x(). *===========================================================================*/ int carset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = CAR; strcpy(prj->code, "CAR"); strcpy(prj->name, "plate caree"); prj->category = CYLINDRICAL; prj->pvrange = 0; prj->simplezen = 0; prj->equiareal = 0; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 1.0; prj->w[1] = 1.0; } else { prj->w[0] = prj->r0*D2R; prj->w[1] = 1.0/prj->w[0]; } prj->prjx2s = carx2s; prj->prjs2x = cars2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int carx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double s, t; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != CAR) { if ((status = carset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { s = prj->w[1]*(*xp + prj->x0); phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = s; phip += rowlen; } } /* Do y dependence. */ yp = y; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { t = prj->w[1]*(*yp + prj->y0); for (ix = 0; ix < mx; ix++, thetap += spt) { *thetap = t; *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("carx2s"); } return status; } /*--------------------------------------------------------------------------*/ int cars2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double eta, xi; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != CAR) { if ((status = carset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { xi = prj->w[0]*(*phip) - prj->x0; xp = x + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = xi; xp += rowlen; } } /* Do theta dependence. */ thetap = theta; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { eta = prj->w[0]*(*thetap) - prj->y0; for (iphi = 0; iphi < mphi; iphi++, yp += sxy) { *yp = eta; *(statp++) = 0; } } return 0; } /*============================================================================ * MER: Mercator's projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag MER * prj->code "MER" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] r0*(pi/180) * prj->w[1] (180/pi)/r0 * prj->prjx2s Pointer to merx2s(). * prj->prjs2x Pointer to mers2x(). *===========================================================================*/ int merset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = MER; strcpy(prj->code, "MER"); strcpy(prj->name, "Mercator's"); prj->category = CYLINDRICAL; prj->pvrange = 0; prj->simplezen = 0; prj->equiareal = 0; prj->conformal = 1; prj->global = 0; prj->divergent = 1; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 1.0; prj->w[1] = 1.0; } else { prj->w[0] = prj->r0*D2R; prj->w[1] = 1.0/prj->w[0]; } prj->prjx2s = merx2s; prj->prjs2x = mers2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int merx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double s, t; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != MER) { if ((status = merset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { s = prj->w[1]*(*xp + prj->x0); phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = s; phip += rowlen; } } /* Do y dependence. */ yp = y; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { t = 2.0*atand(exp((*yp + prj->y0)/prj->r0)) - 90.0; for (ix = 0; ix < mx; ix++, thetap += spt) { *thetap = t; *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("merx2s"); } return status; } /*--------------------------------------------------------------------------*/ int mers2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double eta, xi; register int iphi, itheta, istat, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != MER) { if ((status = merset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { xi = prj->w[0]*(*phip) - prj->x0; xp = x + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = xi; xp += rowlen; } } /* Do theta dependence. */ thetap = theta; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { istat = 0; if (*thetap <= -90.0 || *thetap >= 90.0) { eta = 0.0; istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("mers2x"); } else { eta = prj->r0*log(tand((*thetap+90.0)/2.0)) - prj->y0; } for (iphi = 0; iphi < mphi; iphi++, yp += sxy) { *yp = eta; *(statp++) = istat; } } return status; } /*============================================================================ * SFL: Sanson-Flamsteed ("global sinusoid") projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag SFL * prj->code "SFL" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] r0*(pi/180) * prj->w[1] (180/pi)/r0 * prj->prjx2s Pointer to sflx2s(). * prj->prjs2x Pointer to sfls2x(). *===========================================================================*/ int sflset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = SFL; strcpy(prj->code, "SFL"); strcpy(prj->name, "Sanson-Flamsteed"); prj->category = PSEUDOCYLINDRICAL; prj->pvrange = 0; prj->simplezen = 0; prj->equiareal = 1; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 1.0; prj->w[1] = 1.0; } else { prj->w[0] = prj->r0*D2R; prj->w[1] = 1.0/prj->w[0]; } prj->prjx2s = sflx2s; prj->prjs2x = sfls2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int sflx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double s, t, yj; register int istat, ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != SFL) { if ((status = sflset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { s = prj->w[1]*(*xp + prj->x0); phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = s; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yj = *yp + prj->y0; s = cos(yj/prj->r0); istat = 0; if (s == 0.0) { istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("sflx2s"); } else { s = 1.0/s; } t = prj->w[1]*yj; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { *phip *= s; *thetap = t; *(statp++) = istat; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-12, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("sflx2s"); } return status; } /*--------------------------------------------------------------------------*/ int sfls2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double eta, xi; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != SFL) { if ((status = sflset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { xi = prj->w[0]*(*phip); xp = x + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = xi; xp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { xi = cosd(*thetap); eta = prj->w[0]*(*thetap) - prj->y0; for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = xi*(*xp) - prj->x0; *yp = eta; *(statp++) = 0; } } return 0; } /*============================================================================ * PAR: parabolic projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag PAR * prj->code "PAR" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] r0*(pi/180) * prj->w[1] (180/pi)/r0 * prj->w[2] pi*r0 * prj->w[3] 1/(pi*r0) * prj->prjx2s Pointer to parx2s(). * prj->prjs2x Pointer to pars2x(). *===========================================================================*/ int parset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = PAR; strcpy(prj->code, "PAR"); strcpy(prj->name, "parabolic"); prj->category = PSEUDOCYLINDRICAL; prj->pvrange = 0; prj->simplezen = 0; prj->equiareal = 1; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 1.0; prj->w[1] = 1.0; prj->w[2] = 180.0; prj->w[3] = 1.0/prj->w[2]; } else { prj->w[0] = prj->r0*D2R; prj->w[1] = 1.0/prj->w[0]; prj->w[2] = PI*prj->r0; prj->w[3] = 1.0/prj->w[2]; } prj->prjx2s = parx2s; prj->prjs2x = pars2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int parx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double r, s, t, xj; const double tol = 1.0e-13; register int istat, ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != PAR) { if ((status = parset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; s = prj->w[1]*xj; t = fabs(xj) - tol; phip = phi + rowoff; thetap = theta + rowoff; for (iy = 0; iy < my; iy++) { *phip = s; *thetap = t; phip += rowlen; thetap += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { r = prj->w[3]*(*yp + prj->y0); istat = 0; if (r > 1.0 || r < -1.0) { s = 0.0; t = 0.0; istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("parx2s"); } else { s = 1.0 - 4.0*r*r; if (s == 0.0) { /* Deferred test. */ istat = -1; } else { s = 1.0/s; } t = 3.0*asind(r); } for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { if (istat < 0) { if (*thetap < 0.0) { *(statp++) = 0; } else { *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("parx2s"); } } else { *(statp++) = istat; } *phip *= s; *thetap = t; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-12, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("parx2s"); } return status; } /*--------------------------------------------------------------------------*/ int pars2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double eta, s, xi; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != PAR) { if ((status = parset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { xi = prj->w[0]*(*phip); xp = x + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = xi; xp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { s = sind((*thetap)/3.0); xi = (1.0 - 4.0*s*s); eta = prj->w[2]*s - prj->y0; for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = xi*(*xp) - prj->x0; *yp = eta; *(statp++) = 0; } } return 0; } /*============================================================================ * MOL: Mollweide's projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag MOL * prj->code "MOL" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] sqrt(2)*r0 * prj->w[1] sqrt(2)*r0/90 * prj->w[2] 1/(sqrt(2)*r0) * prj->w[3] 90/r0 * prj->prjx2s Pointer to molx2s(). * prj->prjs2x Pointer to mols2x(). *===========================================================================*/ int molset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = MOL; strcpy(prj->code, "MOL"); if (prj->r0 == 0.0) prj->r0 = R2D; strcpy(prj->name, "Mollweide's"); prj->category = PSEUDOCYLINDRICAL; prj->pvrange = 0; prj->simplezen = 0; prj->equiareal = 1; prj->conformal = 0; prj->global = 1; prj->divergent = 0; prj->w[0] = SQRT2*prj->r0; prj->w[1] = prj->w[0]/90.0; prj->w[2] = 1.0/prj->w[0]; prj->w[3] = 90.0/prj->r0; prj->w[4] = 2.0/PI; prj->prjx2s = molx2s; prj->prjs2x = mols2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int molx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double r, s, t, xj, y0, yj, z; const double tol = 1.0e-12; register int istat, ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != MOL) { if ((status = molset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; s = prj->w[3]*xj; t = fabs(xj) - tol; phip = phi + rowoff; thetap = theta + rowoff; for (iy = 0; iy < my; iy++) { *phip = s; *thetap = t; phip += rowlen; thetap += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yj = *yp + prj->y0; y0 = yj/prj->r0; r = 2.0 - y0*y0; istat = 0; if (r <= tol) { if (r < -tol) { istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("molx2s"); } else { /* OK if fabs(x) < tol whence phi = 0.0. */ istat = -1; } r = 0.0; s = 0.0; } else { r = sqrt(r); s = 1.0/r; } z = yj*prj->w[2]; if (fabs(z) > 1.0) { if (fabs(z) > 1.0+tol) { z = 0.0; istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("molx2s"); } else { z = copysign(1.0, z) + y0*r/PI; } } else { z = asin(z)*prj->w[4] + y0*r/PI; } if (fabs(z) > 1.0) { if (fabs(z) > 1.0+tol) { z = 0.0; istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("molx2s"); } else { z = copysign(1.0, z); } } t = asind(z); for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { if (istat < 0) { if (*thetap < 0.0) { *(statp++) = 0; } else { *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("molx2s"); } } else { *(statp++) = istat; } *phip *= s; *thetap = t; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-11, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("molx2s"); } return status; } /*--------------------------------------------------------------------------*/ int mols2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int k, mphi, mtheta, rowlen, rowoff, status; double eta, gamma, resid, u, v, v0, v1, xi; const double tol = 1.0e-13; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != MOL) { if ((status = molset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { xi = prj->w[1]*(*phip); xp = x + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = xi; xp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { if (fabs(*thetap) == 90.0) { xi = 0.0; eta = copysign(prj->w[0], *thetap); } else if (*thetap == 0.0) { xi = 1.0; eta = 0.0; } else { u = PI*sind(*thetap); v0 = -PI; v1 = PI; v = u; for (k = 0; k < 100; k++) { resid = (v - u) + sin(v); if (resid < 0.0) { if (resid > -tol) break; v0 = v; } else { if (resid < tol) break; v1 = v; } v = (v0 + v1)/2.0; } gamma = v/2.0; xi = cos(gamma); eta = prj->w[0]*sin(gamma); } eta -= prj->y0; for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = xi*(*xp) - prj->x0; *yp = eta; *(statp++) = 0; } } return 0; } /*============================================================================ * AIT: Hammer-Aitoff projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag AIT * prj->code "AIT" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] 2*r0**2 * prj->w[1] 1/(2*r0)**2 * prj->w[2] 1/(4*r0)**2 * prj->w[3] 1/(2*r0) * prj->prjx2s Pointer to aitx2s(). * prj->prjs2x Pointer to aits2x(). *===========================================================================*/ int aitset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = AIT; strcpy(prj->code, "AIT"); if (prj->r0 == 0.0) prj->r0 = R2D; strcpy(prj->name, "Hammer-Aitoff"); prj->category = CONVENTIONAL; prj->pvrange = 0; prj->simplezen = 0; prj->equiareal = 1; prj->conformal = 0; prj->global = 1; prj->divergent = 0; prj->w[0] = 2.0*prj->r0*prj->r0; prj->w[1] = 1.0/(2.0*prj->w[0]); prj->w[2] = prj->w[1]/4.0; prj->w[3] = 1.0/(2.0*prj->r0); prj->prjx2s = aitx2s; prj->prjs2x = aits2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int aitx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double s, t, x0, xj, y0, yj, yj2, z; const double tol = 1.0e-13; register int ix, iy, istat, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != AIT) { if ((status = aitset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; s = 1.0 - xj*xj*prj->w[2]; t = xj*prj->w[3]; phip = phi + rowoff; thetap = theta + rowoff; for (iy = 0; iy < my; iy++) { *phip = s; *thetap = t; phip += rowlen; thetap += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yj = *yp + prj->y0; yj2 = yj*yj*prj->w[1]; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { s = *phip - yj2; istat = 0; if (s < 0.5) { if (s < 0.5-tol) { istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("aitx2s"); } s = 0.5; } z = sqrt(s); x0 = 2.0*z*z - 1.0; y0 = z*(*thetap); if (x0 == 0.0 && y0 == 0.0) { *phip = 0.0; } else { *phip = 2.0*atan2d(y0, x0); } t = z*yj/prj->r0; if (fabs(t) > 1.0) { if (fabs(t) > 1.0+tol) { istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("aitx2s"); } t = copysign(90.0, t); } else { t = asind(t); } *thetap = t; *(statp++) = istat; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("aitx2s"); } return status; } /*--------------------------------------------------------------------------*/ int aits2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double cosphi, costhe, sinphi, sinthe, w; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != AIT) { if ((status = aitset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { w = (*phip)/2.0; sincosd(w, &sinphi, &cosphi); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinphi; *yp = cosphi; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { sincosd(*thetap, &sinthe, &costhe); for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { w = sqrt(prj->w[0]/(1.0 + costhe*(*yp))); *xp = 2.0*w*costhe*(*xp) - prj->x0; *yp = w*sinthe - prj->y0; *(statp++) = 0; } } return 0; } /*============================================================================ * COP: conic perspective projection. * * Given: * prj->pv[1] sigma = (theta2+theta1)/2 * prj->pv[2] delta = (theta2-theta1)/2, where theta1 and theta2 are the * latitudes of the standard parallels, in degrees. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to sigma if undefined. * prj->theta0 Reset to sigma if undefined. * * Returned: * prj->flag COP * prj->code "COP" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] C = sin(sigma) * prj->w[1] 1/C * prj->w[2] Y0 = r0*cos(delta)*cot(sigma) * prj->w[3] r0*cos(delta) * prj->w[4] 1/(r0*cos(delta) * prj->w[5] cot(sigma) * prj->prjx2s Pointer to copx2s(). * prj->prjs2x Pointer to cops2x(). *===========================================================================*/ int copset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = COP; strcpy(prj->code, "COP"); strcpy(prj->name, "conic perspective"); if (undefined(prj->pv[1])) { return PRJERR_BAD_PARAM_SET("copset"); } if (undefined(prj->pv[2])) prj->pv[2] = 0.0; if (prj->r0 == 0.0) prj->r0 = R2D; prj->category = CONIC; prj->pvrange = 102; prj->simplezen = 0; prj->equiareal = 0; prj->conformal = 0; prj->global = 0; prj->divergent = 1; prj->w[0] = sind(prj->pv[1]); if (prj->w[0] == 0.0) { return PRJERR_BAD_PARAM_SET("copset"); } prj->w[1] = 1.0/prj->w[0]; prj->w[3] = prj->r0*cosd(prj->pv[2]); if (prj->w[3] == 0.0) { return PRJERR_BAD_PARAM_SET("copset"); } prj->w[4] = 1.0/prj->w[3]; prj->w[5] = 1.0/tand(prj->pv[1]); prj->w[2] = prj->w[3]*prj->w[5]; prj->prjx2s = copx2s; prj->prjs2x = cops2x; return prjoff(prj, 0.0, prj->pv[1]); } /*--------------------------------------------------------------------------*/ int copx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double alpha, dy, dy2, r, xj; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != COP) { if ((status = copset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xj; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { dy = prj->w[2] - (*yp + prj->y0); dy2 = dy*dy; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xj = *phip; r = sqrt(xj*xj + dy2); if (prj->pv[1] < 0.0) r = -r; if (r == 0.0) { alpha = 0.0; } else { alpha = atan2d(xj/r, dy/r); } *phip = alpha*prj->w[1]; *thetap = prj->pv[1] + atand(prj->w[5] - r*prj->w[4]); *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("copx2s"); } return status; } /*--------------------------------------------------------------------------*/ int cops2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double alpha, cosalpha, r, s, t, sinalpha, y0; register int iphi, itheta, istat, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != COP) { if ((status = copset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { alpha = prj->w[0]*(*phip); sincosd(alpha, &sinalpha, &cosalpha); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinalpha; *yp = cosalpha; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; y0 = prj->y0 - prj->w[2]; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { t = *thetap - prj->pv[1]; s = cosd(t); istat = 0; if (s == 0.0) { /* Latitude of divergence. */ r = 0.0; istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("cops2x"); } else if (fabs(*thetap) == 90.0) { /* Return an exact value at the poles. */ r = 0.0; /* Bounds checking. */ if (prj->bounds&1) { if ((*thetap < 0.0) != (prj->pv[1] < 0.0)) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("cops2x"); } } } else { r = prj->w[2] - prj->w[3]*sind(t)/s; /* Bounds checking. */ if (prj->bounds&1) { if (r*prj->w[0] < 0.0) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("cops2x"); } } } for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = r*(*xp) - prj->x0; *yp = -r*(*yp) - y0; *(statp++) = istat; } } return status; } /*============================================================================ * COE: conic equal area projection. * * Given: * prj->pv[1] sigma = (theta2+theta1)/2 * prj->pv[2] delta = (theta2-theta1)/2, where theta1 and theta2 are the * latitudes of the standard parallels, in degrees. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to sigma if undefined. * prj->theta0 Reset to sigma if undefined. * * Returned: * prj->flag COE * prj->code "COE" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] C = (sin(theta1) + sin(theta2))/2 * prj->w[1] 1/C * prj->w[2] Y0 = chi*sqrt(psi - 2C*sind(sigma)) * prj->w[3] chi = r0/C * prj->w[4] psi = 1 + sin(theta1)*sin(theta2) * prj->w[5] 2C * prj->w[6] (1 + sin(theta1)*sin(theta2))*(r0/C)**2 * prj->w[7] C/(2*r0**2) * prj->w[8] chi*sqrt(psi + 2C) * prj->prjx2s Pointer to coex2s(). * prj->prjs2x Pointer to coes2x(). *===========================================================================*/ int coeset(prj) struct prjprm *prj; { double theta1, theta2; if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = COE; strcpy(prj->code, "COE"); strcpy(prj->name, "conic equal area"); if (undefined(prj->pv[1])) { return PRJERR_BAD_PARAM_SET("coeset"); } if (undefined(prj->pv[2])) prj->pv[2] = 0.0; if (prj->r0 == 0.0) prj->r0 = R2D; prj->category = CONIC; prj->pvrange = 102; prj->simplezen = 0; prj->equiareal = 1; prj->conformal = 0; prj->global = 1; prj->divergent = 0; theta1 = prj->pv[1] - prj->pv[2]; theta2 = prj->pv[1] + prj->pv[2]; prj->w[0] = (sind(theta1) + sind(theta2))/2.0; if (prj->w[0] == 0.0) { return PRJERR_BAD_PARAM_SET("coeset"); } prj->w[1] = 1.0/prj->w[0]; prj->w[3] = prj->r0/prj->w[0]; prj->w[4] = 1.0 + sind(theta1)*sind(theta2); prj->w[5] = 2.0*prj->w[0]; prj->w[6] = prj->w[3]*prj->w[3]*prj->w[4]; prj->w[7] = 1.0/(2.0*prj->r0*prj->w[3]); prj->w[8] = prj->w[3]*sqrt(prj->w[4] + prj->w[5]); prj->w[2] = prj->w[3]*sqrt(prj->w[4] - prj->w[5]*sind(prj->pv[1])); prj->prjx2s = coex2s; prj->prjs2x = coes2x; return prjoff(prj, 0.0, prj->pv[1]); } /*--------------------------------------------------------------------------*/ int coex2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double alpha, dy, dy2, r, t, w, xj; const double tol = 1.0e-12; register int ix, iy, istat, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != COE) { if ((status = coeset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xj; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { dy = prj->w[2] - (*yp + prj->y0); dy2 = dy*dy; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xj = *phip; r = sqrt(xj*xj + dy2); if (prj->pv[1] < 0.0) r = -r; if (r == 0.0) { alpha = 0.0; } else { alpha = atan2d(xj/r, dy/r); } istat = 0; if (fabs(r - prj->w[8]) < tol) { t = -90.0; } else { w = (prj->w[6] - r*r)*prj->w[7]; if (fabs(w) > 1.0) { if (fabs(w-1.0) < tol) { t = 90.0; } else if (fabs(w+1.0) < tol) { t = -90.0; } else { t = 0.0; istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("coex2s"); } } else { t = asind(w); } } *phip = alpha*prj->w[1]; *thetap = t; *(statp++) = istat; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("coex2s"); } return status; } /*--------------------------------------------------------------------------*/ int coes2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double alpha, cosalpha, r, sinalpha, y0; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != COE) { if ((status = coeset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { alpha = prj->w[0]*(*phip); sincosd(alpha, &sinalpha, &cosalpha); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinalpha; *yp = cosalpha; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; y0 = prj->y0 - prj->w[2]; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { if (*thetap == -90.0) { r = prj->w[8]; } else { r = prj->w[3]*sqrt(prj->w[4] - prj->w[5]*sind(*thetap)); } for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = r*(*xp) - prj->x0; *yp = -r*(*yp) - y0; *(statp++) = 0; } } return 0; } /*============================================================================ * COD: conic equidistant projection. * * Given: * prj->pv[1] sigma = (theta2+theta1)/2 * prj->pv[2] delta = (theta2-theta1)/2, where theta1 and theta2 are the * latitudes of the standard parallels, in degrees. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to sigma if undefined. * prj->theta0 Reset to sigma if undefined. * * Returned: * prj->flag COD * prj->code "COD" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] C = r0*sin(sigma)*sin(delta)/delta * prj->w[1] 1/C * prj->w[2] Y0 = delta*cot(delta)*cot(sigma) * prj->w[3] Y0 + sigma * prj->prjx2s Pointer to codx2s(). * prj->prjs2x Pointer to cods2x(). *===========================================================================*/ int codset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = COD; strcpy(prj->code, "COD"); strcpy(prj->name, "conic equidistant"); if (undefined(prj->pv[1])) { return PRJERR_BAD_PARAM_SET("codset"); } if (undefined(prj->pv[2])) prj->pv[2] = 0.0; if (prj->r0 == 0.0) prj->r0 = R2D; prj->category = CONIC; prj->pvrange = 102; prj->simplezen = 0; prj->equiareal = 0; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->pv[2] == 0.0) { prj->w[0] = prj->r0*sind(prj->pv[1])*D2R; } else { prj->w[0] = prj->r0*sind(prj->pv[1])*sind(prj->pv[2])/prj->pv[2]; } if (prj->w[0] == 0.0) { return PRJERR_BAD_PARAM_SET("codset"); } prj->w[1] = 1.0/prj->w[0]; prj->w[2] = prj->r0*cosd(prj->pv[2])*cosd(prj->pv[1])/prj->w[0]; prj->w[3] = prj->w[2] + prj->pv[1]; prj->prjx2s = codx2s; prj->prjs2x = cods2x; return prjoff(prj, 0.0, prj->pv[1]); } /*--------------------------------------------------------------------------*/ int codx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double alpha, dy, dy2, r, xj; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != COD) { if ((status = codset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xj; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { dy = prj->w[2] - (*yp + prj->y0); dy2 = dy*dy; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xj = *phip; r = sqrt(xj*xj + dy2); if (prj->pv[1] < 0.0) r = -r; if (r == 0.0) { alpha = 0.0; } else { alpha = atan2d(xj/r, dy/r); } *phip = alpha*prj->w[1]; *thetap = prj->w[3] - r; *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("codx2s"); } return status; } /*--------------------------------------------------------------------------*/ int cods2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double alpha, cosalpha, r, sinalpha, y0; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != COD) { if ((status = codset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { alpha = prj->w[0]*(*phip); sincosd(alpha, &sinalpha, &cosalpha); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinalpha; *yp = cosalpha; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; y0 = prj->y0 - prj->w[2]; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { r = prj->w[3] - *thetap; for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = r*(*xp) - prj->x0; *yp = -r*(*yp) - y0; *(statp++) = 0; } } return 0; } /*============================================================================ * COO: conic orthomorphic projection. * * Given: * prj->pv[1] sigma = (theta2+theta1)/2 * prj->pv[2] delta = (theta2-theta1)/2, where theta1 and theta2 are the * latitudes of the standard parallels, in degrees. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to sigma if undefined. * prj->theta0 Reset to sigma if undefined. * * Returned: * prj->flag COO * prj->code "COO" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] C = ln(cos(theta2)/cos(theta1))/ln(tan(tau2)/tan(tau1)) * where tau1 = (90 - theta1)/2 * tau2 = (90 - theta2)/2 * prj->w[1] 1/C * prj->w[2] Y0 = psi*tan((90-sigma)/2)**C * prj->w[3] psi = (r0*cos(theta1)/C)/tan(tau1)**C * prj->w[4] 1/psi * prj->prjx2s Pointer to coox2s(). * prj->prjs2x Pointer to coos2x(). *===========================================================================*/ int cooset(prj) struct prjprm *prj; { double cos1, cos2, tan1, tan2, theta1, theta2; if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = COO; strcpy(prj->code, "COO"); strcpy(prj->name, "conic orthomorphic"); if (undefined(prj->pv[1])) { return PRJERR_BAD_PARAM_SET("cooset"); } if (undefined(prj->pv[2])) prj->pv[2] = 0.0; if (prj->r0 == 0.0) prj->r0 = R2D; prj->category = CONIC; prj->pvrange = 102; prj->simplezen = 0; prj->equiareal = 0; prj->conformal = 1; prj->global = 0; prj->divergent = 1; theta1 = prj->pv[1] - prj->pv[2]; theta2 = prj->pv[1] + prj->pv[2]; tan1 = tand((90.0 - theta1)/2.0); cos1 = cosd(theta1); if (theta1 == theta2) { prj->w[0] = sind(theta1); } else { tan2 = tand((90.0 - theta2)/2.0); cos2 = cosd(theta2); prj->w[0] = log(cos2/cos1)/log(tan2/tan1); } if (prj->w[0] == 0.0) { return PRJERR_BAD_PARAM_SET("cooset"); } prj->w[1] = 1.0/prj->w[0]; prj->w[3] = prj->r0*(cos1/prj->w[0])/pow(tan1,prj->w[0]); if (prj->w[3] == 0.0) { return PRJERR_BAD_PARAM_SET("cooset"); } prj->w[2] = prj->w[3]*pow(tand((90.0 - prj->pv[1])/2.0),prj->w[0]); prj->w[4] = 1.0/prj->w[3]; prj->prjx2s = coox2s; prj->prjs2x = coos2x; return prjoff(prj, 0.0, prj->pv[1]); } /*--------------------------------------------------------------------------*/ int coox2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double alpha, dy, dy2, r, t, xj; register int ix, iy, istat, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != COO) { if ((status = cooset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xj; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { dy = prj->w[2] - (*yp + prj->y0); dy2 = dy*dy; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xj = *phip; r = sqrt(xj*xj + dy2); if (prj->pv[1] < 0.0) r = -r; if (r == 0.0) { alpha = 0.0; } else { alpha = atan2d(xj/r, dy/r); } istat = 0; if (r == 0.0) { if (prj->w[0] < 0.0) { t = -90.0; } else { t = 0.0; istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("coox2s"); } } else { t = 90.0 - 2.0*atand(pow(r*prj->w[4],prj->w[1])); } *phip = alpha*prj->w[1]; *thetap = t; *(statp++) = istat; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("coox2s"); } return status; } /*--------------------------------------------------------------------------*/ int coos2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double alpha, cosalpha, r, sinalpha, y0; register int iphi, itheta, istat, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != COO) { if ((status = cooset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { alpha = prj->w[0]*(*phip); sincosd(alpha, &sinalpha, &cosalpha); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = sinalpha; *yp = cosalpha; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; y0 = prj->y0 - prj->w[2]; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { istat = 0; if (*thetap == -90.0) { r = 0.0; if (prj->w[0] >= 0.0) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("coos2x"); } } else { r = prj->w[3]*pow(tand((90.0 - *thetap)/2.0),prj->w[0]); } for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = r*(*xp) - prj->x0; *yp = -r*(*yp) - y0; *(statp++) = istat; } } return status; } /*============================================================================ * BON: Bonne's projection. * * Given: * prj->pv[1] Bonne conformal latitude, theta1, in degrees. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag BON * prj->code "BON" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[1] r0*pi/180 * prj->w[2] Y0 = r0*(cot(theta1) + theta1*pi/180) * prj->prjx2s Pointer to bonx2s(). * prj->prjs2x Pointer to bons2x(). *===========================================================================*/ int bonset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = BON; strcpy(prj->code, "BON"); strcpy(prj->name, "Bonne's"); if (undefined(prj->pv[1])) { return PRJERR_BAD_PARAM_SET("bonset"); } if (prj->pv[1] == 0.0) { /* Sanson-Flamsteed. */ return sflset(prj); } prj->category = POLYCONIC; prj->pvrange = 101; prj->simplezen = 0; prj->equiareal = 1; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[1] = 1.0; prj->w[2] = prj->r0*cosd(prj->pv[1])/sind(prj->pv[1]) + prj->pv[1]; } else { prj->w[1] = prj->r0*D2R; prj->w[2] = prj->r0*(cosd(prj->pv[1])/sind(prj->pv[1]) + prj->pv[1]*D2R); } prj->prjx2s = bonx2s; prj->prjs2x = bons2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int bonx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double alpha, dy, dy2, costhe, r, s, t, xj; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->pv[1] == 0.0) { /* Sanson-Flamsteed. */ return sflx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat); } if (prj->flag != BON) { if ((status = bonset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xj; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { dy = prj->w[2] - (*yp + prj->y0); dy2 = dy*dy; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xj = *phip; r = sqrt(xj*xj + dy2); if (prj->pv[1] < 0.0) r = -r; if (r == 0.0) { alpha = 0.0; } else { alpha = atan2d(xj/r, dy/r); } t = (prj->w[2] - r)/prj->w[1]; costhe = cosd(t); if (costhe == 0.0) { s = 0.0; } else { s = alpha*(r/prj->r0)/costhe; } *phip = s; *thetap = t; *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-11, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("bonx2s"); } return status; } /*--------------------------------------------------------------------------*/ int bons2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double alpha, cosalpha, r, s, sinalpha, y0; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->pv[1] == 0.0) { /* Sanson-Flamsteed. */ return sfls2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat); } if (prj->flag != BON) { if ((status = bonset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } y0 = prj->y0 - prj->w[2]; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { s = prj->r0*(*phip); xp = x + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = s; xp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { r = prj->w[2] - prj->w[1]*(*thetap); s = cosd(*thetap)/r; for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { alpha = s*(*xp); sincosd(alpha, &sinalpha, &cosalpha); *xp = r*sinalpha - prj->x0; *yp = -r*cosalpha - y0; *(statp++) = 0; } } return 0; } /*============================================================================ * PCO: polyconic projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag PCO * prj->code "PCO" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] r0*(pi/180) * prj->w[1] (180/pi)/r0 * prj->w[2] 2*r0 * prj->w[3] (pi/180)/(2*r0) * prj->prjx2s Pointer to pcox2s(). * prj->prjs2x Pointer to pcos2x(). *===========================================================================*/ int pcoset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = PCO; strcpy(prj->code, "PCO"); strcpy(prj->name, "polyconic"); prj->category = POLYCONIC; prj->pvrange = 0; prj->simplezen = 0; prj->equiareal = 0; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 1.0; prj->w[1] = 1.0; prj->w[2] = 360.0/PI; } else { prj->w[0] = prj->r0*D2R; prj->w[1] = 1.0/prj->w[0]; prj->w[2] = 2.0*prj->r0; } prj->w[3] = D2R/prj->w[2]; prj->prjx2s = pcox2s; prj->prjs2x = pcos2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int pcox2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double f, fneg, fpos, lambda, tanthe, the, theneg, thepos, w, x1, xj, xx, yj, ymthe, y1; const double tol = 1.0e-12; register int ix, iy, k, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != PCO) { if ((status = pcoset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xj = *xp + prj->x0; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xj; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yj = *yp + prj->y0; w = fabs(yj*prj->w[1]); for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xj = *phip; if (w < tol) { *phip = xj*prj->w[1]; *thetap = 0.0; } else if (fabs(w-90.0) < tol) { *phip = 0.0; *thetap = copysign(90.0, yj); } else { if (w < 1.0e-4) { /* To avoid cot(theta) blowing up near theta == 0. */ the = yj / (prj->w[0] + prj->w[3]*xj*xj); ymthe = yj - prj->w[0]*the; tanthe = tand(the); } else { /* Iterative solution using weighted division of the interval. */ thepos = yj / prj->w[0]; theneg = 0.0; /* Setting fneg = -fpos halves the interval in the first iter. */ xx = xj*xj; fpos = xx; fneg = -xx; for (k = 0; k < 64; k++) { /* Weighted division of the interval. */ lambda = fpos/(fpos-fneg); if (lambda < 0.1) { lambda = 0.1; } else if (lambda > 0.9) { lambda = 0.9; } the = thepos - lambda*(thepos-theneg); /* Compute the residue. */ ymthe = yj - prj->w[0]*the; tanthe = tand(the); f = xx + ymthe*(ymthe - prj->w[2]/tanthe); /* Check for convergence. */ if (fabs(f) < tol) break; if (fabs(thepos-theneg) < tol) break; /* Redefine the interval. */ if (f > 0.0) { thepos = the; fpos = f; } else { theneg = the; fneg = f; } } } x1 = prj->r0 - ymthe*tanthe; y1 = xj*tanthe; if (x1 == 0.0 && y1 == 0.0) { *phip = 0.0; } else { *phip = atan2d(y1, x1)/sind(the); } *thetap = the; } *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-12, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("pcox2s"); } return status; } /*--------------------------------------------------------------------------*/ int pcos2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double cospsi, costhe, cotthe, sinpsi, sinthe, therad; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != PCO) { if ((status = pcoset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { xp = x + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = *phip; xp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { if (*thetap == 0.0) { for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = prj->w[0]*(*xp) - prj->x0; *yp = -prj->y0; *(statp++) = 0; } } else if (fabs(*thetap) < 1.0e-4) { /* To avoid cot(theta) blowing up near theta == 0. */ for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *xp = prj->w[0]*(*xp)*cosd(*thetap) - prj->x0; *yp = (prj->w[0] + prj->w[3]*(*xp)*(*xp))*(*thetap) - prj->y0; *(statp++) = 0; } } else { therad = (*thetap)*D2R; sincosd(*thetap, &sinthe, &costhe); for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { sincosd((*xp)*sinthe, &sinpsi, &cospsi); cotthe = costhe/sinthe; *xp = prj->r0*cotthe*sinpsi - prj->x0; *yp = prj->r0*(cotthe*(1.0 - cospsi) + therad) - prj->y0; *(statp++) = 0; } } } return 0; } /*============================================================================ * TSC: tangential spherical cube projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag TSC * prj->code "TSC" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] r0*(pi/4) * prj->w[1] (4/pi)/r0 * prj->prjx2s Pointer to tscx2s(). * prj->prjs2x Pointer to tscs2x(). *===========================================================================*/ int tscset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = TSC; strcpy(prj->code, "TSC"); strcpy(prj->name, "tangential spherical cube"); prj->category = QUADCUBE; prj->pvrange = 0; prj->simplezen = 0; prj->equiareal = 0; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 45.0; prj->w[1] = 1.0/45.0; } else { prj->w[0] = prj->r0*PI/4.0; prj->w[1] = 1.0/prj->w[0]; } prj->prjx2s = tscx2s; prj->prjs2x = tscs2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int tscx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double l, m, n, xf, yf; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != TSC) { if ((status = tscset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xf = (*xp + prj->x0)*prj->w[1]; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xf; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yf = (*yp + prj->y0)*prj->w[1]; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xf = *phip; /* Bounds checking. */ if (fabs(xf) <= 1.0) { if (fabs(yf) > 3.0) { *phip = 0.0; *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("tscx2s"); continue; } } else { if (fabs(xf) > 7.0 || fabs(yf) > 1.0) { *phip = 0.0; *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("tscx2s"); continue; } } /* Map negative faces to the other side. */ if (xf < -1.0) xf += 8.0; /* Determine the face. */ if (xf > 5.0) { /* face = 4 */ xf = xf - 6.0; m = -1.0/sqrt(1.0 + xf*xf + yf*yf); l = -m*xf; n = -m*yf; } else if (xf > 3.0) { /* face = 3 */ xf = xf - 4.0; l = -1.0/sqrt(1.0 + xf*xf + yf*yf); m = l*xf; n = -l*yf; } else if (xf > 1.0) { /* face = 2 */ xf = xf - 2.0; m = 1.0/sqrt(1.0 + xf*xf + yf*yf); l = -m*xf; n = m*yf; } else if (yf > 1.0) { /* face = 0 */ yf = yf - 2.0; n = 1.0/sqrt(1.0 + xf*xf + yf*yf); l = -n*yf; m = n*xf; } else if (yf < -1.0) { /* face = 5 */ yf = yf + 2.0; n = -1.0/sqrt(1.0 + xf*xf + yf*yf); l = -n*yf; m = -n*xf; } else { /* face = 1 */ l = 1.0/sqrt(1.0 + xf*xf + yf*yf); m = l*xf; n = l*yf; } if (l == 0.0 && m == 0.0) { *phip = 0.0; } else { *phip = atan2d(m, l); } *thetap = asind(n); *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("tscx2s"); } return status; } /*--------------------------------------------------------------------------*/ int tscs2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int face, mphi, mtheta, rowlen, rowoff, status; double cosphi, costhe, l, m, n, sinphi, sinthe, x0, xf, y0, yf, zeta; const double tol = 1.0e-12; register int iphi, istat, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != TSC) { if ((status = tscset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { sincosd(*phip, &sinphi, &cosphi); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = cosphi; *yp = sinphi; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { sincosd(*thetap, &sinthe, &costhe); for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { l = costhe*(*xp); m = costhe*(*yp); n = sinthe; face = 0; zeta = n; if (l > zeta) { face = 1; zeta = l; } if (m > zeta) { face = 2; zeta = m; } if (-l > zeta) { face = 3; zeta = -l; } if (-m > zeta) { face = 4; zeta = -m; } if (-n > zeta) { face = 5; zeta = -n; } switch (face) { case 1: xf = m/zeta; yf = n/zeta; x0 = 0.0; y0 = 0.0; break; case 2: xf = -l/zeta; yf = n/zeta; x0 = 2.0; y0 = 0.0; break; case 3: xf = -m/zeta; yf = n/zeta; x0 = 4.0; y0 = 0.0; break; case 4: xf = l/zeta; yf = n/zeta; x0 = 6.0; y0 = 0.0; break; case 5: xf = m/zeta; yf = l/zeta; x0 = 0.0; y0 = -2.0; break; default: /* face == 0 */ xf = m/zeta; yf = -l/zeta; x0 = 0.0; y0 = 2.0; break; } istat = 0; if (fabs(xf) > 1.0) { if (fabs(xf) > 1.0+tol) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("tscs2x"); } xf = copysign(1.0, xf); } if (fabs(yf) > 1.0) { if (fabs(yf) > 1.0+tol) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("tscs2x"); } yf = copysign(1.0, yf); } *xp = prj->w[0]*(xf + x0) - prj->x0; *yp = prj->w[0]*(yf + y0) - prj->y0; *(statp++) = istat; } } return status; } /*============================================================================ * CSC: COBE quadrilateralized spherical cube projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag CSC * prj->code "CSC" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] r0*(pi/4) * prj->w[1] (4/pi)/r0 * prj->prjx2s Pointer to cscx2s(). * prj->prjs2x Pointer to cscs2x(). *===========================================================================*/ int cscset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = CSC; strcpy(prj->code, "CSC"); strcpy(prj->name, "COBE quadrilateralized spherical cube"); prj->category = QUADCUBE; prj->pvrange = 0; prj->simplezen = 0; prj->equiareal = 0; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 45.0; prj->w[1] = 1.0/45.0; } else { prj->w[0] = prj->r0*PI/4.0; prj->w[1] = 1.0/prj->w[0]; } prj->prjx2s = cscx2s; prj->prjs2x = cscs2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int cscx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int face, mx, my, rowlen, rowoff, status; double l, m, n, t; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; float chi, psi, xf, xx, yf, yy, z0, z1, z2, z3, z4, z5, z6; const float p00 = -0.27292696f; const float p10 = -0.07629969f; const float p20 = -0.22797056f; const float p30 = 0.54852384f; const float p40 = -0.62930065f; const float p50 = 0.25795794f; const float p60 = 0.02584375f; const float p01 = -0.02819452f; const float p11 = -0.01471565f; const float p21 = 0.48051509f; const float p31 = -1.74114454f; const float p41 = 1.71547508f; const float p51 = -0.53022337f; const float p02 = 0.27058160f; const float p12 = -0.56800938f; const float p22 = 0.30803317f; const float p32 = 0.98938102f; const float p42 = -0.83180469f; const float p03 = -0.60441560f; const float p13 = 1.50880086f; const float p23 = -0.93678576f; const float p33 = 0.08693841f; const float p04 = 0.93412077f; const float p14 = -1.41601920f; const float p24 = 0.33887446f; const float p05 = -0.63915306f; const float p15 = 0.52032238f; const float p06 = 0.14381585f; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != CSC) { if ((status = cscset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xf = (float)((*xp + prj->x0)*prj->w[1]); phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xf; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yf = (float)((*yp + prj->y0)*prj->w[1]); for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xf = (float)(*phip); /* Bounds checking. */ if (fabs((double)xf) <= 1.0) { if (fabs((double)yf) > 3.0) { *phip = 0.0; *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("cscx2s"); continue; } } else { if (fabs((double)xf) > 7.0 || fabs((double)yf) > 1.0) { *phip = 0.0; *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("cscx2s"); continue; } } /* Map negative faces to the other side. */ if (xf < -1.0f) xf += 8.0f; /* Determine the face. */ if (xf > 5.0f) { face = 4; xf = xf - 6.0f; } else if (xf > 3.0f) { face = 3; xf = xf - 4.0f; } else if (xf > 1.0f) { face = 2; xf = xf - 2.0f; } else if (yf > 1.0f) { face = 0; yf = yf - 2.0f; } else if (yf < -1.0f) { face = 5; yf = yf + 2.0f; } else { face = 1; } xx = xf*xf; yy = yf*yf; z0 = p00 + xx*(p10 + xx*(p20 + xx*(p30 + xx*(p40 + xx*(p50 + xx*(p60)))))); z1 = p01 + xx*(p11 + xx*(p21 + xx*(p31 + xx*(p41 + xx*(p51))))); z2 = p02 + xx*(p12 + xx*(p22 + xx*(p32 + xx*(p42)))); z3 = p03 + xx*(p13 + xx*(p23 + xx*(p33))); z4 = p04 + xx*(p14 + xx*(p24)); z5 = p05 + xx*(p15); z6 = p06; chi = z0 + yy*(z1 + yy*(z2 + yy*(z3 + yy*(z4 + yy*(z5 + yy*z6))))); chi = xf + xf*(1.0f - xx)*chi; z0 = p00 + yy*(p10 + yy*(p20 + yy*(p30 + yy*(p40 + yy*(p50 + yy*(p60)))))); z1 = p01 + yy*(p11 + yy*(p21 + yy*(p31 + yy*(p41 + yy*(p51))))); z2 = p02 + yy*(p12 + yy*(p22 + yy*(p32 + yy*(p42)))); z3 = p03 + yy*(p13 + yy*(p23 + yy*(p33))); z4 = p04 + yy*(p14 + yy*(p24)); z5 = p05 + yy*(p15); z6 = p06; psi = z0 + xx*(z1 + xx*(z2 + xx*(z3 + xx*(z4 + xx*(z5 + xx*z6))))); psi = yf + yf*(1.0f - yy)*psi; t = 1.0/sqrt((double)(chi*chi + psi*psi) + 1.0); switch (face) { case 1: l = t; m = chi*l; n = psi*l; break; case 2: m = t; l = -chi*m; n = psi*m; break; case 3: l = -t; m = chi*l; n = -psi*l; break; case 4: m = -t; l = -chi*m; n = -psi*m; break; case 5: n = -t; l = -psi*n; m = -chi*n; break; default: /* face == 0 */ n = t; l = -psi*n; m = chi*n; break; } if (l == 0.0 && m == 0.0) { *phip = 0.0; } else { *phip = atan2d(m, l); } *thetap = asind(n); *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("cscx2s"); } return status; } /*--------------------------------------------------------------------------*/ int cscs2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int face, mphi, mtheta, rowlen, rowoff, status; double cosphi, costhe, eta, l, m, n, sinphi, sinthe, xi, zeta; const float tol = 1.0e-7; register int iphi, istat, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; float chi, chi2, chi2psi2, chi4, chipsi, psi, psi2, psi4, chi2co, psi2co, x0, xf, y0, yf; const float gstar = 1.37484847732f; const float mm = 0.004869491981f; const float gamma = -0.13161671474f; const float omega1 = -0.159596235474f; const float d0 = 0.0759196200467f; const float d1 = -0.0217762490699f; const float c00 = 0.141189631152f; const float c10 = 0.0809701286525f; const float c01 = -0.281528535557f; const float c11 = 0.15384112876f; const float c20 = -0.178251207466f; const float c02 = 0.106959469314f; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != CSC) { if ((status = cscset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { sincosd(*phip, &sinphi, &cosphi); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = cosphi; *yp = sinphi; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { sincosd(*thetap, &sinthe, &costhe); for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { l = costhe*(*xp); m = costhe*(*yp); n = sinthe; face = 0; zeta = n; if (l > zeta) { face = 1; zeta = l; } if (m > zeta) { face = 2; zeta = m; } if (-l > zeta) { face = 3; zeta = -l; } if (-m > zeta) { face = 4; zeta = -m; } if (-n > zeta) { face = 5; zeta = -n; } switch (face) { case 1: xi = m; eta = n; x0 = 0.0; y0 = 0.0; break; case 2: xi = -l; eta = n; x0 = 2.0; y0 = 0.0; break; case 3: xi = -m; eta = n; x0 = 4.0; y0 = 0.0; break; case 4: xi = l; eta = n; x0 = 6.0; y0 = 0.0; break; case 5: xi = m; eta = l; x0 = 0.0; y0 = -2.0; break; default: /* face == 0 */ xi = m; eta = -l; x0 = 0.0; y0 = 2.0; break; } chi = (float)( xi/zeta); psi = (float)(eta/zeta); chi2 = chi*chi; psi2 = psi*psi; chi2co = 1.0f - chi2; psi2co = 1.0f - psi2; /* Avoid floating underflows. */ chipsi = (float)fabs((double)(chi*psi)); chi4 = (chi2 > 1.0e-16f) ? chi2*chi2 : 0.0f; psi4 = (psi2 > 1.0e-16f) ? psi2*psi2 : 0.0f; chi2psi2 = (chipsi > 1.0e-16f) ? chi2*psi2 : 0.0f; xf = chi*(chi2 + chi2co*(gstar + psi2*(gamma*chi2co + mm*chi2 + psi2co*(c00 + c10*chi2 + c01*psi2 + c11*chi2psi2 + c20*chi4 + c02*psi4)) + chi2*(omega1 - chi2co*(d0 + d1*chi2)))); yf = psi*(psi2 + psi2co*(gstar + chi2*(gamma*psi2co + mm*psi2 + chi2co*(c00 + c10*psi2 + c01*chi2 + c11*chi2psi2 + c20*psi4 + c02*chi4)) + psi2*(omega1 - psi2co*(d0 + d1*psi2)))); istat = 0; if (fabs((double)xf) > 1.0) { if (fabs((double)xf) > 1.0+tol) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("cscs2x"); } xf = (float)copysign(1.0, (double)xf); } if (fabs((double)yf) > 1.0) { if (fabs((double)yf) > 1.0+tol) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("cscs2x"); } yf = (float)copysign(1.0, (double)yf); } *xp = prj->w[0]*(xf + x0) - prj->x0; *yp = prj->w[0]*(yf + y0) - prj->y0; *(statp++) = istat; } } return status; } /*============================================================================ * QSC: quadrilaterilized spherical cube projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag QSC * prj->code "QSC" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] r0*(pi/4) * prj->w[1] (4/pi)/r0 * prj->prjx2s Pointer to qscx2s(). * prj->prjs2x Pointer to qscs2x(). *===========================================================================*/ int qscset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = QSC; strcpy(prj->code, "QSC"); strcpy(prj->name, "quadrilateralized spherical cube"); prj->category = QUADCUBE; prj->pvrange = 0; prj->simplezen = 0; prj->equiareal = 1; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 45.0; prj->w[1] = 1.0/45.0; } else { prj->w[0] = prj->r0*PI/4.0; prj->w[1] = 1.0/prj->w[0]; } prj->prjx2s = qscx2s; prj->prjs2x = qscs2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int qscx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int direct, face, mx, my, rowlen, rowoff, status; double cosw, l, m, n, omega, sinw, tau, xf, yf, w, zeco, zeta; const double tol = 1.0e-12; register int ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != QSC) { if ((status = qscset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xf = (*xp + prj->x0)*prj->w[1]; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xf; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yf = (*yp + prj->y0)*prj->w[1]; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xf = *phip; /* Bounds checking. */ if (fabs(xf) <= 1.0) { if (fabs(yf) > 3.0) { *phip = 0.0; *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("qscx2s"); continue; } } else { if (fabs(xf) > 7.0 || fabs(yf) > 1.0) { *phip = 0.0; *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("qscx2s"); continue; } } /* Map negative faces to the other side. */ if (xf < -1.0) xf += 8.0; /* Determine the face. */ if (xf > 5.0) { face = 4; xf -= 6.0; } else if (xf > 3.0) { face = 3; xf -= 4.0; } else if (xf > 1.0) { face = 2; xf -= 2.0; } else if (yf > 1.0) { face = 0; yf -= 2.0; } else if (yf < -1.0) { face = 5; yf += 2.0; } else { face = 1; } direct = (fabs(xf) > fabs(yf)); if (direct) { if (xf == 0.0) { omega = 0.0; tau = 1.0; zeta = 1.0; zeco = 0.0; } else { w = 15.0*yf/xf; omega = sind(w)/(cosd(w) - SQRT2INV); tau = 1.0 + omega*omega; zeco = xf*xf*(1.0 - 1.0/sqrt(1.0 + tau)); zeta = 1.0 - zeco; } } else { if (yf == 0.0) { omega = 0.0; tau = 1.0; zeta = 1.0; zeco = 0.0; } else { w = 15.0*xf/yf; sincosd(w, &sinw, &cosw); omega = sinw/(cosw - SQRT2INV); tau = 1.0 + omega*omega; zeco = yf*yf*(1.0 - 1.0/sqrt(1.0 + tau)); zeta = 1.0 - zeco; } } if (zeta < -1.0) { if (zeta < -1.0-tol) { *phip = 0.0; *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("qscx2s"); continue; } zeta = -1.0; zeco = 2.0; w = 0.0; } else { w = sqrt(zeco*(2.0-zeco)/tau); } switch (face) { case 1: l = zeta; if (direct) { m = w; if (xf < 0.0) m = -m; n = m*omega; } else { n = w; if (yf < 0.0) n = -n; m = n*omega; } break; case 2: m = zeta; if (direct) { l = w; if (xf > 0.0) l = -l; n = -l*omega; } else { n = w; if (yf < 0.0) n = -n; l = -n*omega; } break; case 3: l = -zeta; if (direct) { m = w; if (xf > 0.0) m = -m; n = -m*omega; } else { n = w; if (yf < 0.0) n = -n; m = -n*omega; } break; case 4: m = -zeta; if (direct) { l = w; if (xf < 0.0) l = -l; n = l*omega; } else { n = w; if (yf < 0.0) n = -n; l = n*omega; } break; case 5: n = -zeta; if (direct) { m = w; if (xf < 0.0) m = -m; l = m*omega; } else { l = w; if (yf < 0.0) l = -l; m = l*omega; } break; default: /* face == 0 */ n = zeta; if (direct) { m = w; if (xf < 0.0) m = -m; l = -m*omega; } else { l = w; if (yf > 0.0) l = -l; m = -l*omega; } break; } if (l == 0.0 && m == 0.0) { *phip = 0.0; } else { *phip = atan2d(m, l); } *thetap = asind(n); *(statp++) = 0; } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-13, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("qscx2s"); } return status; } /*--------------------------------------------------------------------------*/ int qscs2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int face, mphi, mtheta, rowlen, rowoff, status; double cosphi, costhe, eta, l, m, n, omega, p, sinphi, sinthe, t, tau, x0, xf, xi, y0, yf, zeco, zeta; const double tol = 1.0e-12; register int iphi, istat, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != QSC) { if ((status = qscset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } status = 0; /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { sincosd(*phip, &sinphi, &cosphi); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *xp = cosphi; *yp = sinphi; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { sincosd(*thetap, &sinthe, &costhe); for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { if (fabs(*thetap) == 90.0) { *xp = -prj->x0; *yp = copysign(2.0*prj->w[0], *thetap) - prj->y0; *(statp++) = 0; continue; } l = costhe*(*xp); m = costhe*(*yp); n = sinthe; face = 0; zeta = n; if (l > zeta) { face = 1; zeta = l; } if (m > zeta) { face = 2; zeta = m; } if (-l > zeta) { face = 3; zeta = -l; } if (-m > zeta) { face = 4; zeta = -m; } if (-n > zeta) { face = 5; zeta = -n; } zeco = 1.0 - zeta; switch (face) { case 1: xi = m; eta = n; if (zeco < 1.0e-8) { /* Small angle formula. */ t = (*thetap)*D2R; p = atan2(*yp, *xp); zeco = (p*p + t*t)/2.0; } x0 = 0.0; y0 = 0.0; break; case 2: xi = -l; eta = n; if (zeco < 1.0e-8) { /* Small angle formula. */ t = (*thetap)*D2R; p = atan2(*yp, *xp) - PI/2.0; zeco = (p*p + t*t)/2.0; } x0 = 2.0; y0 = 0.0; break; case 3: xi = -m; eta = n; if (zeco < 1.0e-8) { /* Small angle formula. */ t = (*thetap)*D2R; p = atan2(*yp, *xp); p -= copysign(PI, p); zeco = (p*p + t*t)/2.0; } x0 = 4.0; y0 = 0.0; break; case 4: xi = l; eta = n; if (zeco < 1.0e-8) { /* Small angle formula. */ t = (*thetap)*D2R; p = atan2(*yp, *xp) + PI/2.0; zeco = (p*p + t*t)/2.0; } x0 = 6; y0 = 0.0; break; case 5: xi = m; eta = l; if (zeco < 1.0e-8) { /* Small angle formula. */ t = (*thetap + 90.0)*D2R; zeco = t*t/2.0; } x0 = 0.0; y0 = -2; break; default: /* face == 0 */ xi = m; eta = -l; if (zeco < 1.0e-8) { /* Small angle formula. */ t = (90.0 - *thetap)*D2R; zeco = t*t/2.0; } x0 = 0.0; y0 = 2.0; break; } xf = 0.0; yf = 0.0; if (xi != 0.0 || eta != 0.0) { if (-xi > fabs(eta)) { omega = eta/xi; tau = 1.0 + omega*omega; xf = -sqrt(zeco/(1.0 - 1.0/sqrt(1.0+tau))); yf = (xf/15.0)*(atand(omega) - asind(omega/sqrt(tau+tau))); } else if (xi > fabs(eta)) { omega = eta/xi; tau = 1.0 + omega*omega; xf = sqrt(zeco/(1.0 - 1.0/sqrt(1.0+tau))); yf = (xf/15.0)*(atand(omega) - asind(omega/sqrt(tau+tau))); } else if (-eta >= fabs(xi)) { omega = xi/eta; tau = 1.0 + omega*omega; yf = -sqrt(zeco/(1.0 - 1.0/sqrt(1.0+tau))); xf = (yf/15.0)*(atand(omega) - asind(omega/sqrt(tau+tau))); } else if (eta >= fabs(xi)) { omega = xi/eta; tau = 1.0 + omega*omega; yf = sqrt(zeco/(1.0 - 1.0/sqrt(1.0+tau))); xf = (yf/15.0)*(atand(omega) - asind(omega/sqrt(tau+tau))); } } istat = 0; if (fabs(xf) > 1.0) { if (fabs(xf) > 1.0+tol) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("qscs2x"); } xf = copysign(1.0, xf); } if (fabs(yf) > 1.0) { if (fabs(yf) > 1.0+tol) { istat = 1; if (!status) status = PRJERR_BAD_WORLD_SET("qscs2x"); } yf = copysign(1.0, yf); } *xp = prj->w[0]*(xf + x0) - prj->x0; *yp = prj->w[0]*(yf + y0) - prj->y0; *(statp++) = istat; } } return status; } /*============================================================================ * HPX: HEALPix projection. * * Given: * prj->pv[1] H - the number of facets in longitude. * prj->pv[2] K - the number of facets in latitude * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag HPX * prj->code "HPX" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->m True if H is odd. * prj->n True if K is odd. * prj->w[0] r0*(pi/180) * prj->w[1] (180/pi)/r0 * prj->w[2] (K-1)/K * prj->w[3] 90*K/H * prj->w[4] (K+1)/2 * prj->w[5] 90*(K-1)/H * prj->w[6] 180/H * prj->w[7] H/360 * prj->w[8] r0*(pi/180)*(90*K/H) * prj->w[9] r0*(pi/180)*(180/H) * prj->prjx2s Pointer to hpxx2s(). * prj->prjs2x Pointer to hpxs2x(). *===========================================================================*/ int hpxset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = HPX; strcpy(prj->code, "HPX"); if (undefined(prj->pv[1])) prj->pv[1] = 4.0; if (undefined(prj->pv[2])) prj->pv[2] = 3.0; strcpy(prj->name, "HEALPix"); prj->category = HEALPIX; prj->pvrange = 102; prj->simplezen = 0; prj->equiareal = 1; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->pv[1] <= 0.0 || prj->pv[2] <= 0.0) { return PRJERR_BAD_PARAM_SET("hpxset"); } prj->m = ((int)(prj->pv[1]+0.5))%2; prj->n = ((int)(prj->pv[2]+0.5))%2; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 1.0; prj->w[1] = 1.0; } else { prj->w[0] = prj->r0*D2R; prj->w[1] = R2D/prj->r0; } prj->w[2] = (prj->pv[2] - 1.0) / prj->pv[2]; prj->w[3] = 90.0 * prj->pv[2] / prj->pv[1]; prj->w[4] = (prj->pv[2] + 1.0) / 2.0; prj->w[5] = 90.0 * (prj->pv[2] - 1.0) / prj->pv[1]; prj->w[6] = 180.0 / prj->pv[1]; prj->w[7] = prj->pv[1] / 360.0; prj->w[8] = prj->w[3] * prj->w[0]; prj->w[9] = prj->w[6] * prj->w[0]; prj->prjx2s = hpxx2s; prj->prjs2x = hpxs2x; return prjoff(prj, 0.0, 0.0); } /*--------------------------------------------------------------------------*/ int hpxx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int h, mx, my, offset, rowlen, rowoff, status; double absy, r, s, sigma, slim, t, ylim, yr; register int istat, ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != HPX) { if ((status = hpxset(prj))) return status; } slim = prj->w[6] + 1e-12; ylim = prj->w[9] * prj->w[4]; if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { s = prj->w[1] * (*xp + prj->x0); /* x_c for K odd or theta > 0. */ t = -180.0 + (2.0 * floor((*xp + 180.0) * prj->w[7]) + 1.0) * prj->w[6]; t = prj->w[1] * (*xp - t); phip = phi + rowoff; thetap = theta + rowoff; for (iy = 0; iy < my; iy++) { /* theta[] is used to hold (x - x_c). */ *phip = s; *thetap = t; phip += rowlen; thetap += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yr = prj->w[1]*(*yp + prj->y0); absy = fabs(yr); istat = 0; if (absy <= prj->w[5]) { /* Equatorial regime. */ t = asind(yr/prj->w[3]); for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { *thetap = t; *(statp++) = 0; } } else if (absy <= ylim) { /* Polar regime. */ offset = (prj->n || *yp > 0.0) ? 0 : 1; sigma = prj->w[4] - absy / prj->w[6]; if (sigma == 0.0) { s = 1e9; t = 90.0; } else { t = 1.0 - sigma*sigma/prj->pv[2]; if (t < -1.0) { s = 0.0; t = 0.0; istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("hpxx2s"); } else { s = 1.0/sigma; t = asind(t); } } if (*yp < 0.0) t = -t; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { if (offset) { /* Offset the southern polar half-facets for even K. */ h = (int)floor(*phip / prj->w[6]) + prj->m; if (h%2) { *thetap -= prj->w[6]; } else { *thetap += prj->w[6]; } } /* Recall that theta[] holds (x - x_c). */ r = s * *thetap; /* Bounds checking. */ if (prj->bounds&2) { if (slim <= fabs(r)) { istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("hpxx2s"); } } if (r != 0.0) r -= *thetap; *phip += r; *thetap = t; *(statp++) = istat; } } else { /* Beyond latitude range. */ for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { *phip = 0.0; *thetap = 0.0; *(statp++) = 1; } if (!status) status = PRJERR_BAD_PIX_SET("hpxx2s"); } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-12, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("hpxx2s"); } return status; } /*--------------------------------------------------------------------------*/ int hpxs2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int h, mphi, mtheta, offset, rowlen, rowoff, status; double abssin, eta, sigma, sinthe, t, xi; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != HPX) { if ((status = hpxset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { xi = prj->w[0] * (*phip) - prj->x0; /* phi_c for K odd or theta > 0. */ t = -180.0 + (2.0*floor((*phip+180.0) * prj->w[7]) + 1.0) * prj->w[6]; t = prj->w[0] * (*phip - t); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { /* y[] is used to hold (phi - phi_c). */ *xp = xi; *yp = t; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { sinthe = sind(*thetap); abssin = fabs(sinthe); if (abssin <= prj->w[2]) { /* Equatorial regime. */ eta = prj->w[8] * sinthe - prj->y0; for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { *yp = eta; *(statp++) = 0; } } else { /* Polar regime. */ offset = (prj->n || *thetap > 0.0) ? 0 : 1; sigma = sqrt(prj->pv[2]*(1.0 - abssin)); xi = sigma - 1.0; eta = prj->w[9] * (prj->w[4] - sigma); if (*thetap < 0) eta = -eta; eta -= prj->y0; for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { if (offset) { /* Offset the southern polar half-facets for even K. */ h = (int)floor((*xp + prj->x0) / prj->w[9]) + prj->m; if (h%2) { *yp -= prj->w[9]; } else { *yp += prj->w[9]; } } /* Recall that y[] holds (phi - phi_c). */ *xp += *yp * xi; *yp = eta; *(statp++) = 0; /* Put the phi = 180 meridian in the expected place. */ if (180.0 < *xp) *xp = 360.0 - *xp; } } } return 0; } /*============================================================================ * XPH: HEALPix polar, aka "butterfly" projection. * * Given and/or returned: * prj->r0 Reset to 180/pi if 0. * prj->phi0 Reset to 0.0 if undefined. * prj->theta0 Reset to 0.0 if undefined. * * Returned: * prj->flag XPH * prj->code "XPH" * prj->x0 Fiducial offset in x. * prj->y0 Fiducial offset in y. * prj->w[0] r0*(pi/180)/sqrt(2) * prj->w[1] (180/pi)/r0/sqrt(2) * prj->w[2] 2/3 * prj->w[3] tol (= 1e-4) * prj->w[4] sqrt(2/3)*(180/pi) * prj->w[5] 90 - tol*sqrt(2/3)*(180/pi) * prj->w[6] sqrt(3/2)*(pi/180) * prj->prjx2s Pointer to xphx2s(). * prj->prjs2x Pointer to xphs2x(). *===========================================================================*/ int xphset(prj) struct prjprm *prj; { if (prj == 0x0) return PRJERR_NULL_POINTER; prj->flag = XPH; strcpy(prj->code, "XPH"); strcpy(prj->name, "butterfly"); prj->category = HEALPIX; prj->pvrange = 0; prj->simplezen = 0; prj->equiareal = 1; prj->conformal = 0; prj->global = 1; prj->divergent = 0; if (prj->r0 == 0.0) { prj->r0 = R2D; prj->w[0] = 1.0; prj->w[1] = 1.0; } else { prj->w[0] = prj->r0*D2R; prj->w[1] = R2D/prj->r0; } prj->w[0] /= sqrt(2.0); prj->w[1] /= sqrt(2.0); prj->w[2] = 2.0/3.0; prj->w[3] = 1e-4; prj->w[4] = sqrt(prj->w[2])*R2D; prj->w[5] = 90.0 - prj->w[3]*prj->w[4]; prj->w[6] = sqrt(1.5)*D2R; prj->prjx2s = xphx2s; prj->prjs2x = xphs2x; return prjoff(prj, 0.0, 90.0); } /*--------------------------------------------------------------------------*/ int xphx2s(prj, nx, ny, sxy, spt, x, y, phi, theta, stat) struct prjprm *prj; int nx, ny, sxy, spt; const double x[], y[]; double phi[], theta[]; int stat[]; { int mx, my, rowlen, rowoff, status; double abseta, eta, eta1, sigma, xi, xi1, xr, yr; const double tol = 1.0e-12; register int istat, ix, iy, *statp; register const double *xp, *yp; register double *phip, *thetap; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != XPH) { if ((status = xphset(prj))) return status; } if (ny > 0) { mx = nx; my = ny; } else { mx = 1; my = 1; ny = nx; } status = 0; /* Do x dependence. */ xp = x; rowoff = 0; rowlen = nx*spt; for (ix = 0; ix < nx; ix++, rowoff += spt, xp += sxy) { xr = (*xp + prj->x0)*prj->w[1]; phip = phi + rowoff; for (iy = 0; iy < my; iy++) { *phip = xr; phip += rowlen; } } /* Do y dependence. */ yp = y; phip = phi; thetap = theta; statp = stat; for (iy = 0; iy < ny; iy++, yp += sxy) { yr = (*yp + prj->y0)*prj->w[1]; for (ix = 0; ix < mx; ix++, phip += spt, thetap += spt) { xr = *phip; if (xr <= 0.0 && 0.0 < yr) { xi1 = -xr - yr; eta1 = xr - yr; *phip = -180.0; } else if (xr < 0.0 && yr <= 0.0) { xi1 = xr - yr; eta1 = xr + yr; *phip = -90.0; } else if (0.0 <= xr && yr < 0.0) { xi1 = xr + yr; eta1 = -xr + yr; *phip = 0.0; } else { xi1 = -xr + yr; eta1 = -xr - yr; *phip = 90.0; } xi = xi1 + 45.0; eta = eta1 + 90.0; abseta = fabs(eta); if (abseta <= 90.0) { if (abseta <= 45.0) { /* Equatorial regime. */ *phip += xi; *thetap = asind(eta/67.5); istat = 0; /* Bounds checking. */ if (prj->bounds&2) { if (45.0+tol < fabs(xi1)) { istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("xphx2s"); } } *(statp++) = istat; } else { /* Polar regime. */ sigma = (90.0 - abseta) / 45.0; /* Ensure an exact result for points on the boundary. */ if (xr == 0.0) { if (yr <= 0.0) { *phip = 0.0; } else { *phip = 180.0; } } else if (yr == 0.0) { if (xr < 0.0) { *phip = -90.0; } else { *phip = 90.0; } } else { *phip += 45.0 + xi1/sigma; } if (sigma < prj->w[3]) { *thetap = 90.0 - sigma*prj->w[4]; } else { *thetap = asind(1.0 - sigma*sigma/3.0); } if (eta < 0.0) *thetap = -(*thetap); /* Bounds checking. */ istat = 0; if (prj->bounds&2) { if (eta < -45.0 && eta+90.0+tol < fabs(xi1)) { istat = 1; if (!status) status = PRJERR_BAD_PIX_SET("xphx2s"); } } *(statp++) = istat; } } else { /* Beyond latitude range. */ *phip = 0.0; *thetap = 0.0; *(statp++) = 1; if (!status) status = PRJERR_BAD_PIX_SET("xphx2s"); } } } /* Do bounds checking on the native coordinates. */ if (prj->bounds&4 && prjbchk(1.0e-12, nx, my, spt, phi, theta, stat)) { if (!status) status = PRJERR_BAD_PIX_SET("xphx2s"); } return status; } /*--------------------------------------------------------------------------*/ int xphs2x(prj, nphi, ntheta, spt, sxy, phi, theta, x, y, stat) struct prjprm *prj; int nphi, ntheta, spt, sxy; const double phi[], theta[]; double x[], y[]; int stat[]; { int mphi, mtheta, rowlen, rowoff, status; double abssin, chi, eta, psi, sigma, sinthe, xi; register int iphi, itheta, *statp; register const double *phip, *thetap; register double *xp, *yp; /* Initialize. */ if (prj == 0x0) return PRJERR_NULL_POINTER; if (prj->flag != XPH) { if ((status = xphset(prj))) return status; } if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Do phi dependence. */ phip = phi; rowoff = 0; rowlen = nphi*sxy; for (iphi = 0; iphi < nphi; iphi++, rowoff += sxy, phip += spt) { chi = *phip; if (180.0 <= fabs(chi)) { chi = fmod(chi, 360.0); if (chi < -180.0) { chi += 360.0; } else if (180.0 <= chi) { chi -= 360.0; } } /* phi is also recomputed from chi to avoid rounding problems. */ chi += 180.0; psi = fmod(chi, 90.0); xp = x + rowoff; yp = y + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { /* y[] is used to hold phi (rounded). */ *xp = psi; *yp = chi - 180.0; xp += rowlen; yp += rowlen; } } /* Do theta dependence. */ thetap = theta; xp = x; yp = y; statp = stat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { sinthe = sind(*thetap); abssin = fabs(sinthe); for (iphi = 0; iphi < mphi; iphi++, xp += sxy, yp += sxy) { if (abssin <= prj->w[2]) { /* Equatorial regime. */ xi = *xp; eta = 67.5 * sinthe; } else { /* Polar regime. */ if (*thetap < prj->w[5]) { sigma = sqrt(3.0*(1.0 - abssin)); } else { sigma = (90.0 - *thetap)*prj->w[6]; } xi = 45.0 + (*xp - 45.0)*sigma; eta = 45.0 * (2.0 - sigma); if (*thetap < 0.0) eta = -eta; } xi -= 45.0; eta -= 90.0; /* Recall that y[] holds phi. */ if (*yp < -90.0) { *xp = prj->w[0]*(-xi + eta) - prj->x0; *yp = prj->w[0]*(-xi - eta) - prj->y0; } else if (*yp < 0.0) { *xp = prj->w[0]*(+xi + eta) - prj->x0; *yp = prj->w[0]*(-xi + eta) - prj->y0; } else if (*yp < 90.0) { *xp = prj->w[0]*( xi - eta) - prj->x0; *yp = prj->w[0]*( xi + eta) - prj->y0; } else { *xp = prj->w[0]*(-xi - eta) - prj->x0; *yp = prj->w[0]*( xi - eta) - prj->y0; } *(statp++) = 0; } } return 0; } astropy-1.1.1/cextern/wcslib/C/wcshdr.h0000644001134200020070000015570312644017723020720 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcshdr.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the wcshdr routines * ------------------------------ * Routines in this suite are aimed at extracting WCS information from a FITS * file. The information is encoded via keywords defined in * = "Representations of world coordinates in FITS", = Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I) = = "Representations of celestial coordinates in FITS", = Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (WCS Paper II) = = "Representations of spectral coordinates in FITS", = Greisen, E.W., Calabretta, M.R., Valdes, F.G., & Allen, S.L. = 2006, A&A, 446, 747 (WCS Paper III) = = "Representations of distortions in FITS world coordinate systems", = Calabretta, M.R. et al. (WCS Paper IV, draft dated 2004/04/22), = available from http://www.atnf.csiro.au/people/Mark.Calabretta * * These routines provide the high-level interface between the FITS file and * the WCS coordinate transformation routines. * * Additionally, function wcshdo() is provided to write out the contents of a * wcsprm struct as a FITS header. * * Briefly, the anticipated sequence of operations is as follows: * * - 1: Open the FITS file and read the image or binary table header, e.g. * using CFITSIO routine fits_hdr2str(). * * - 2: Parse the header using wcspih() or wcsbth(); they will automatically * interpret 'TAB' header keywords using wcstab(). * * - 3: Allocate memory for, and read 'TAB' arrays from the binary table * extension, e.g. using CFITSIO routine fits_read_wcstab() - refer to * the prologue of getwcstab.h. wcsset() will automatically take * control of this allocated memory, in particular causing it to be * free'd by wcsfree(). * * - 4: Translate non-standard WCS usage using wcsfix(), see wcsfix.h. * * - 5: Initialize wcsprm struct(s) using wcsset() and calculate coordinates * using wcsp2s() and/or wcss2p(). Refer to the prologue of wcs.h for a * description of these and other high-level WCS coordinate * transformation routines. * * - 6: Clean up by freeing memory with wcsvfree(). * * In detail: * * - wcspih() is a high-level FITS WCS routine that parses an image header. It * returns an array of up to 27 wcsprm structs on each of which it invokes * wcstab(). * * - wcsbth() is the analogue of wcspih() for use with binary tables; it * handles image array and pixel list keywords. As an extension of the FITS * WCS standard, it also recognizes image header keywords which may be used * to provide default values via an inheritance mechanism. * * - wcstab() assists in filling in members of the wcsprm struct associated * with coordinate lookup tables ('TAB'). These are based on arrays stored * in a FITS binary table extension (BINTABLE) that are located by PVi_ma * keywords in the image header. * * - wcsidx() and wcsbdx() are utility routines that return the index for a * specified alternate coordinate descriptor in the array of wcsprm structs * returned by wcspih() or wcsbth(). * * - wcsvfree() deallocates memory for an array of wcsprm structs, such as * returned by wcspih() or wcsbth(). * * - wcshdo() writes out a wcsprm struct as a FITS header. * * * wcspih() - FITS WCS parser routine for image headers * ---------------------------------------------------- * wcspih() is a high-level FITS WCS routine that parses an image header, * either that of a primary HDU or of an image extension. All WCS keywords * defined in Papers I, II, and III are recognized, and also those used by the * AIPS convention and certain other keywords that existed in early drafts of * the WCS papers as explained in wcsbth() note 5. * * Given a character array containing a FITS image header, wcspih() identifies * and reads all WCS keywords for the primary coordinate representation and up * to 26 alternate representations. It returns this information as an array of * wcsprm structs. * * wcspih() invokes wcstab() on each of the wcsprm structs that it returns. * * Use wcsbth() in preference to wcspih() for FITS headers of unknown type; * wcsbth() can parse image headers as well as binary table and pixel list * headers. * * Given and returned: * header char[] Character array containing the (entire) FITS image * header from which to identify and construct the * coordinate representations, for example, as might be * obtained conveniently via the CFITSIO routine * fits_hdr2str(). * * Each header "keyrecord" (formerly "card image") * consists of exactly 80 7-bit ASCII printing characters * in the range 0x20 to 0x7e (which excludes NUL, BS, * TAB, LF, FF and CR) especially noting that the * keyrecords are NOT null-terminated. * * For negative values of ctrl (see below), header[] is * modified so that WCS keyrecords processed by wcspih() * are removed from it. * * Given: * nkeyrec int Number of keyrecords in header[]. * * relax int Degree of permissiveness: * 0: Recognize only FITS keywords defined by the * published WCS standard. * WCSHDR_all: Admit all recognized informal * extensions of the WCS standard. * Fine-grained control of the degree of permissiveness * is also possible as explained in wcsbth() note 5. * * ctrl int Error reporting and other control options for invalid * WCS and other header keyrecords: * 0: Do not report any rejected header keyrecords. * 1: Produce a one-line message stating the number * of WCS keyrecords rejected (nreject). * 2: Report each rejected keyrecord and the reason * why it was rejected. * 3: As above, but also report all non-WCS * keyrecords that were discarded, and the number * of coordinate representations (nwcs) found. * 4: As above, but also report the accepted WCS * keyrecords, with a summary of the number * accepted as well as rejected. * The report is written to stderr by default, or the * stream set by wcsprintf_set(). * * For ctrl < 0, WCS keyrecords processed by wcspih() * are removed from header[]: * -1: Remove only valid WCS keyrecords whose values * were successfully extracted, nothing is * reported. * -2: As above, but also remove WCS keyrecords that * were rejected, reporting each one and the * reason that it was rejected. * -3: As above, and also report the number of * coordinate representations (nwcs) found. * -11: Same as -1 but preserving the basic keywords * '{DATE,MJD}-{OBS,AVG}' and 'OBSGEO-{X,Y,Z}'. * If any keyrecords are removed from header[] it will * be null-terminated (NUL not being a legal FITS header * character), otherwise it will contain its original * complement of nkeyrec keyrecords and possibly not be * null-terminated. * * Returned: * nreject int* Number of WCS keywords rejected for syntax errors, * illegal values, etc. Keywords not recognized as WCS * keywords are simply ignored. Refer also to wcsbth() * note 5. * * nwcs int* Number of coordinate representations found. * * wcs struct wcsprm** * Pointer to an array of wcsprm structs containing up to * 27 coordinate representations. * * Memory for the array is allocated by wcspih() which * also invokes wcsini() for each struct to allocate * memory for internal arrays and initialize their * members to default values. Refer also to wcsbth() * note 8. Note that wcsset() is not invoked on these * structs. * * This allocated memory must be freed by the user, first * by invoking wcsfree() for each struct, and then by * freeing the array itself. A routine, wcsvfree(), is * provided to do this (see below). * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * 4: Fatal error returned by Flex parser. * * Notes: * Refer to wcsbth() notes 1, 2, 3, 5, 7, and 8. * * * wcsbth() - FITS WCS parser routine for binary table and image headers * --------------------------------------------------------------------- * wcsbth() is a high-level FITS WCS routine that parses a binary table header. * It handles image array and pixel list WCS keywords which may be present * together in one header. * * As an extension of the FITS WCS standard, wcsbth() also recognizes image * header keywords in a binary table header. These may be used to provide * default values via an inheritance mechanism discussed in note 5 (c.f. * WCSHDR_AUXIMG and WCSHDR_ALLIMG), or may instead result in wcsprm structs * that are not associated with any particular column. Thus wcsbth() can * handle primary image and image extension headers in addition to binary table * headers (it ignores NAXIS and does not rely on the presence of the TFIELDS * keyword). * * All WCS keywords defined in Papers I, II, and III are recognized, and also * those used by the AIPS convention and certain other keywords that existed in * early drafts of the WCS papers as explained in note 5 below. * * wcsbth() sets the colnum or colax[] members of the wcsprm structs that it * returns with the column number of an image array or the column numbers * associated with each pixel coordinate element in a pixel list. wcsprm * structs that are not associated with any particular column, as may be * derived from image header keywords, have colnum == 0. * * Note 6 below discusses the number of wcsprm structs returned by wcsbth(), * and the circumstances in which image header keywords cause a struct to be * created. See also note 9 concerning the number of separate images that may * be stored in a pixel list. * * The API to wcsbth() is similar to that of wcspih() except for the addition * of extra arguments that may be used to restrict its operation. Like * wcspih(), wcsbth() invokes wcstab() on each of the wcsprm structs that it * returns. * * Given and returned: * header char[] Character array containing the (entire) FITS binary * table, primary image, or image extension header from * which to identify and construct the coordinate * representations, for example, as might be obtained * conveniently via the CFITSIO routine fits_hdr2str(). * * Each header "keyrecord" (formerly "card image") * consists of exactly 80 7-bit ASCII printing * characters in the range 0x20 to 0x7e (which excludes * NUL, BS, TAB, LF, FF and CR) especially noting that * the keyrecords are NOT null-terminated. * * For negative values of ctrl (see below), header[] is * modified so that WCS keyrecords processed by wcsbth() * are removed from it. * * Given: * nkeyrec int Number of keyrecords in header[]. * * relax int Degree of permissiveness: * 0: Recognize only FITS keywords defined by the * published WCS standard. * WCSHDR_all: Admit all recognized informal * extensions of the WCS standard. * Fine-grained control of the degree of permissiveness * is also possible, as explained in note 5 below. * * ctrl int Error reporting and other control options for invalid * WCS and other header keyrecords: * 0: Do not report any rejected header keyrecords. * 1: Produce a one-line message stating the number * of WCS keyrecords rejected (nreject). * 2: Report each rejected keyrecord and the reason * why it was rejected. * 3: As above, but also report all non-WCS * keyrecords that were discarded, and the number * of coordinate representations (nwcs) found. * 4: As above, but also report the accepted WCS * keyrecords, with a summary of the number * accepted as well as rejected. * The report is written to stderr by default, or the * stream set by wcsprintf_set(). * * For ctrl < 0, WCS keyrecords processed by wcsbth() * are removed from header[]: * -1: Remove only valid WCS keyrecords whose values * were successfully extracted, nothing is * reported. * -2: Also remove WCS keyrecords that were rejected, * reporting each one and the reason that it was * rejected. * -3: As above, and also report the number of * coordinate representations (nwcs) found. * -11: Same as -1 but preserving the basic keywords * '{DATE,MJD}-{OBS,AVG}' and 'OBSGEO-{X,Y,Z}'. * If any keyrecords are removed from header[] it will * be null-terminated (NUL not being a legal FITS header * character), otherwise it will contain its original * complement of nkeyrec keyrecords and possibly not be * null-terminated. * * keysel int Vector of flag bits that may be used to restrict the * keyword types considered: * WCSHDR_IMGHEAD: Image header keywords. * WCSHDR_BIMGARR: Binary table image array. * WCSHDR_PIXLIST: Pixel list keywords. * If zero, there is no restriction. * * Keywords such as EQUIna or RFRQna that are common to * binary table image arrays and pixel lists (including * WCSNna and TWCSna, as explained in note 4 below) are * selected by both WCSHDR_BIMGARR and WCSHDR_PIXLIST. * Thus if inheritance via WCSHDR_ALLIMG is enabled as * discussed in note 5 and one of these shared keywords * is present, then WCSHDR_IMGHEAD and WCSHDR_PIXLIST * alone may be sufficient to cause the construction of * coordinate descriptions for binary table image arrays. * * colsel int* Pointer to an array of table column numbers used to * restrict the keywords considered by wcsbth(). * * A null pointer may be specified to indicate that there * is no restriction. Otherwise, the magnitude of * cols[0] specifies the length of the array: * cols[0] > 0: the columns are included, * cols[0] < 0: the columns are excluded. * * For the pixel list keywords TPn_ka and TCn_ka (and * TPCn_ka and TCDn_ka if WCSHDR_LONGKEY is enabled), it * is an error for one column to be selected but not the * other. This is unlike the situation with invalid * keyrecords, which are simply rejected, because the * error is not intrinsic to the header itself but * arises in the way that it is processed. * * Returned: * nreject int* Number of WCS keywords rejected for syntax errors, * illegal values, etc. Keywords not recognized as WCS * keywords are simply ignored, refer also to note 5 * below. * * nwcs int* Number of coordinate representations found. * * wcs struct wcsprm** * Pointer to an array of wcsprm structs containing up * to 27027 coordinate representations, refer to note 6 * below. * * Memory for the array is allocated by wcsbth() which * also invokes wcsini() for each struct to allocate * memory for internal arrays and initialize their * members to default values. Refer also to note 8 * below. Note that wcsset() is not invoked on these * structs. * * This allocated memory must be freed by the user, first * by invoking wcsfree() for each struct, and then by * freeing the array itself. A routine, wcsvfree(), is * provided to do this (see below). * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * 3: Invalid column selection. * 4: Fatal error returned by Flex parser. * * Notes: * 1: wcspih() determines the number of coordinate axes independently for * each alternate coordinate representation (denoted by the "a" value in * keywords like CTYPEia) from the higher of * * a: NAXIS, * b: WCSAXESa, * c: The highest axis number in any parameterized WCS keyword. The * keyvalue, as well as the keyword, must be syntactically valid * otherwise it will not be considered. * * If none of these keyword types is present, i.e. if the header only * contains auxiliary WCS keywords for a particular coordinate * representation, then no coordinate description is constructed for it. * * wcsbth() is similar except that it ignores the NAXIS keyword if given * an image header to process. * * The number of axes, which is returned as a member of the wcsprm * struct, may differ for different coordinate representations of the * same image. * * 2: wcspih() and wcsbth() enforce correct FITS "keyword = value" syntax * with regard to "= " occurring in columns 9 and 10. * * However, they do recognize free-format character (NOST 100-2.0, * Sect. 5.2.1), integer (Sect. 5.2.3), and floating-point values * (Sect. 5.2.4) for all keywords. * * 3: Where CROTAn, CDi_ja, and PCi_ja occur together in one header wcspih() * and wcsbth() treat them as described in the prologue to wcs.h. * * 4: WCS Paper I mistakenly defined the pixel list form of WCSNAMEa as * TWCSna instead of WCSNna; the 'T' is meant to substitute for the axis * number in the binary table form of the keyword - note that keywords * defined in WCS Papers II and III that are not parameterized by axis * number have identical forms for binary tables and pixel lists. * Consequently wcsbth() always treats WCSNna and TWCSna as equivalent. * * 5: wcspih() and wcsbth() interpret the "relax" argument as a vector of * flag bits to provide fine-grained control over what non-standard WCS * keywords to accept. The flag bits are subject to change in future and * should be set by using the preprocessor macros (see below) for the * purpose. * * - WCSHDR_none: Don't accept any extensions (not even those in the * errata). Treat non-conformant keywords in the same way as * non-WCS keywords in the header, i.e. simply ignore them. * * - WCSHDR_all: Accept all extensions recognized by the parser. * * - WCSHDR_reject: Reject non-standard keyrecords (that are not otherwise * explicitly accepted by one of the flags below). A message will * optionally be printed on stderr by default, or the stream set * by wcsprintf_set(), as determined by the ctrl argument, and * nreject will be incremented. * * This flag may be used to signal the presence of non-standard * keywords, otherwise they are simply passed over as though they * did not exist in the header. It is mainly intended for testing * conformance of a FITS header to the WCS standard. * * Keyrecords may be non-standard in several ways: * * - The keyword may be syntactically valid but with keyvalue of * incorrect type or invalid syntax, or the keycomment may be * malformed. * * - The keyword may strongly resemble a WCS keyword but not, in * fact, be one because it does not conform to the standard. * For example, "CRPIX01" looks like a CRPIXja keyword, but in * fact the leading zero on the axis number violates the basic * FITS standard. Likewise, "LONPOLE2" is not a valid * LONPOLEa keyword in the WCS standard, and indeed there is * nothing the parser can sensibly do with it. * * - Use of the keyword may be deprecated by the standard. Such * will be rejected if not explicitly accepted via one of the * flags below. * * - WCSHDR_strict: As for WCSHDR_reject, but also reject AIPS-convention * keywords and all other deprecated usage that is not explicitly * accepted. * * - WCSHDR_CROTAia: Accept CROTAia (wcspih()), * iCROTna (wcsbth()), * TCROTna (wcsbth()). * - WCSHDR_EPOCHa: Accept EPOCHa. * - WCSHDR_VELREFa: Accept VELREFa. * wcspih() always recognizes the AIPS-convention keywords, * CROTAn, EPOCH, and VELREF for the primary representation * (a = ' ') but alternates are non-standard. * * wcsbth() accepts EPOCHa and VELREFa only if WCSHDR_AUXIMG is * also enabled. * * - WCSHDR_CD00i00j: Accept CD00i00j (wcspih()). * - WCSHDR_PC00i00j: Accept PC00i00j (wcspih()). * - WCSHDR_PROJPn: Accept PROJPn (wcspih()). * These appeared in early drafts of WCS Paper I+II (before they * were split) and are equivalent to CDi_ja, PCi_ja, and PVi_ma * for the primary representation (a = ' '). PROJPn is * equivalent to PVi_ma with m = n <= 9, and is associated * exclusively with the latitude axis. * * - WCSHDR_CD0i_0ja: Accept CD0i_0ja (wcspih()). * - WCSHDR_PC0i_0ja: Accept PC0i_0ja (wcspih()). * - WCSHDR_PV0i_0ma: Accept PV0i_0ja (wcspih()). * - WCSHDR_PS0i_0ma: Accept PS0i_0ja (wcspih()). * Allow the numerical index to have a leading zero in doubly- * parameterized keywords, for example, PC01_01. WCS Paper I * (Sects 2.1.2 & 2.1.4) explicitly disallows leading zeroes. * The FITS 3.0 standard document (Sect. 4.1.2.1) states that the * index in singly-parameterized keywords (e.g. CTYPEia) "shall * not have leading zeroes", and later in Sect. 8.1 that "leading * zeroes must not be used" on PVi_ma and PSi_ma. However, by an * oversight, it is silent on PCi_ja and CDi_ja. * * - WCSHDR_RADECSYS: Accept RADECSYS. This appeared in early drafts of * WCS Paper I+II and was subsequently replaced by RADESYSa. * * wcsbth() accepts RADECSYS only if WCSHDR_AUXIMG is also * enabled. * * - WCSHDR_VSOURCE: Accept VSOURCEa or VSOUna (wcsbth()). This appeared * in early drafts of WCS Paper III and was subsequently dropped * in favour of ZSOURCEa and ZSOUna. * * wcsbth() accepts VSOURCEa only if WCSHDR_AUXIMG is also * enabled. * * - WCSHDR_DOBSn (wcsbth() only): Allow DOBSn, the column-specific * analogue of DATE-OBS. By an oversight this was never formally * defined in the standard. * * - WCSHDR_LONGKEY (wcsbth() only): Accept long forms of the alternate * binary table and pixel list WCS keywords, i.e. with "a" non- * blank. Specifically * # jCRPXna TCRPXna : jCRPXn jCRPna TCRPXn TCRPna CRPIXja # - TPCn_ka : - ijPCna - TPn_ka PCi_ja # - TCDn_ka : - ijCDna - TCn_ka CDi_ja # iCDLTna TCDLTna : iCDLTn iCDEna TCDLTn TCDEna CDELTia # iCUNIna TCUNIna : iCUNIn iCUNna TCUNIn TCUNna CUNITia # iCTYPna TCTYPna : iCTYPn iCTYna TCTYPn TCTYna CTYPEia # iCRVLna TCRVLna : iCRVLn iCRVna TCRVLn TCRVna CRVALia # iPVn_ma TPVn_ma : - iVn_ma - TVn_ma PVi_ma # iPSn_ma TPSn_ma : - iSn_ma - TSn_ma PSi_ma * * where the primary and standard alternate forms together with * the image-header equivalent are shown rightwards of the colon. * * The long form of these keywords could be described as quasi- * standard. TPCn_ka, iPVn_ma, and TPVn_ma appeared by mistake * in the examples in WCS Paper II and subsequently these and * also TCDn_ka, iPSn_ma and TPSn_ma were legitimized by the * errata to the WCS papers. * * Strictly speaking, the other long forms are non-standard and * in fact have never appeared in any draft of the WCS papers nor * in the errata. However, as natural extensions of the primary * form they are unlikely to be written with any other intention. * Thus it should be safe to accept them provided, of course, * that the resulting keyword does not exceed the 8-character * limit. * * If WCSHDR_CNAMn is enabled then also accept * # iCNAMna TCNAMna : --- iCNAna --- TCNAna CNAMEia # iCRDEna TCRDEna : --- iCRDna --- TCRDna CRDERia # iCSYEna TCSYEna : --- iCSYna --- TCSYna CSYERia * * Note that CNAMEia, CRDERia, CSYERia, and their variants are * not used by WCSLIB but are stored in the wcsprm struct as * auxiliary information. * * - WCSHDR_CNAMn (wcsbth() only): Accept iCNAMn, iCRDEn, iCSYEn, TCNAMn, * TCRDEn, and TCSYEn, i.e. with "a" blank. While non-standard, * these are the obvious analogues of iCTYPn, TCTYPn, etc. * * - WCSHDR_AUXIMG (wcsbth() only): Allow the image-header form of an * auxiliary WCS keyword with representation-wide scope to * provide a default value for all images. This default may be * overridden by the column-specific form of the keyword. * * For example, a keyword like EQUINOXa would apply to all image * arrays in a binary table, or all pixel list columns with * alternate representation "a" unless overridden by EQUIna. * * Specifically the keywords are: * # LATPOLEa for LATPna # LONPOLEa for LONPna # RESTFREQ for RFRQna # RESTFRQa for RFRQna # RESTWAVa for RWAVna * * whose keyvalues are actually used by WCSLIB, and also keywords * that provide auxiliary information that is simply stored in * the wcsprm struct: * # EPOCH - ... (No column-specific form.) # EPOCHa - ... Only if WCSHDR_EPOCHa is set. # EQUINOXa for EQUIna # RADESYSa for RADEna # RADECSYS for RADEna ... Only if WCSHDR_RADECSYS is set. # SPECSYSa for SPECna # SSYSOBSa for SOBSna # SSYSSRCa for SSRCna # VELOSYSa for VSYSna # VELANGLa for VANGna # VELREF - ... (No column-specific form.) # VELREFa - ... Only if WCSHDR_VELREFa is set. # VSOURCEa for VSOUna ... Only if WCSHDR_VSOURCE is set. # WCSNAMEa for WCSNna ... Or TWCSna (see below). # ZSOURCEa for ZSOUna * # DATE-AVG for DAVGn # DATE-OBS for DOBSn # MJD-AVG for MJDAn # MJD-OBS for MJDOBn # OBSGEO-X for OBSGXn # OBSGEO-Y for OBSGYn # OBSGEO-Z for OBSGZn * * where the image-header keywords on the left provide default * values for the column specific keywords on the right. * * Keywords in the last group, such as MJD-OBS, apply to all * alternate representations, so MJD-OBS would provide a default * value for all images in the header. * * This auxiliary inheritance mechanism applies to binary table * image arrays and pixel lists alike. Most of these keywords * have no default value, the exceptions being LONPOLEa and * LATPOLEa, and also RADESYSa and EQUINOXa which provide * defaults for each other. Thus the only potential difficulty * in using WCSHDR_AUXIMG is that of erroneously inheriting one * of these four keywords. * * Unlike WCSHDR_ALLIMG, the existence of one (or all) of these * auxiliary WCS image header keywords will not by itself cause a * wcsprm struct to be created for alternate representation "a". * This is because they do not provide sufficient information to * create a non-trivial coordinate representation when used in * conjunction with the default values of those keywords, such as * CTYPEia, that are parameterized by axis number. * * - WCSHDR_ALLIMG (wcsbth() only): Allow the image-header form of *all* * image header WCS keywords to provide a default value for all * image arrays in a binary table (n.b. not pixel list). This * default may be overridden by the column-specific form of the * keyword. * * For example, a keyword like CRPIXja would apply to all image * arrays in a binary table with alternate representation "a" * unless overridden by jCRPna. * * Specifically the keywords are those listed above for * WCSHDR_AUXIMG plus * # WCSAXESa for WCAXna * * which defines the coordinate dimensionality, and the following * keywords which are parameterized by axis number: * # CRPIXja for jCRPna # PCi_ja for ijPCna # CDi_ja for ijCDna # CDELTia for iCDEna # CROTAi for iCROTn # CROTAia - ... Only if WCSHDR_CROTAia is set. # CUNITia for iCUNna # CTYPEia for iCTYna # CRVALia for iCRVna # PVi_ma for iVn_ma # PSi_ma for iSn_ma * # CNAMEia for iCNAna # CRDERia for iCRDna # CSYERia for iCSYna * * where the image-header keywords on the left provide default * values for the column specific keywords on the right. * * This full inheritance mechanism only applies to binary table * image arrays, not pixel lists, because in the latter case * there is no well-defined association between coordinate axis * number and column number. * * Note that CNAMEia, CRDERia, CSYERia, and their variants are * not used by WCSLIB but are stored in the wcsprm struct as * auxiliary information. * * Note especially that at least one wcsprm struct will be * returned for each "a" found in one of the image header * keywords listed above: * * - If the image header keywords for "a" ARE NOT inherited by a * binary table, then the struct will not be associated with * any particular table column number and it is up to the user * to provide an association. * * - If the image header keywords for "a" ARE inherited by a * binary table image array, then those keywords are considered * to be "exhausted" and do not result in a separate wcsprm * struct. * * For example, to accept CD00i00j and PC00i00j and reject all other * extensions, use * = relax = WCSHDR_reject | WCSHDR_CD00i00j | WCSHDR_PC00i00j; * * The parser always treats EPOCH as subordinate to EQUINOXa if both are * present, and VSOURCEa is always subordinate to ZSOURCEa. * * Likewise, VELREF is subordinate to the formalism of WCS Paper III, see * spcaips(). * * Neither wcspih() nor wcsbth() currently recognize the AIPS-convention * keywords ALTRPIX or ALTRVAL which effectively define an alternative * representation for a spectral axis. * * 6: Depending on what flags have been set in its "relax" argument, * wcsbth() could return as many as 27027 wcsprm structs: * * - Up to 27 unattached representations derived from image header * keywords. * * - Up to 27 structs for each of up to 999 columns containing an image * arrays. * * - Up to 27 structs for a pixel list. * * Note that it is considered legitimate for a column to contain an image * array and also form part of a pixel list, and in particular that * wcsbth() does not check the TFORM keyword for a pixel list column to * check that it is scalar. * * In practice, of course, a realistic binary table header is unlikely to * contain more than a handful of images. * * In order for wcsbth() to create a wcsprm struct for a particular * coordinate representation, at least one WCS keyword that defines an * axis number must be present, either directly or by inheritance if * WCSHDR_ALLIMG is set. * * When the image header keywords for an alternate representation are * inherited by a binary table image array via WCSHDR_ALLIMG, those * keywords are considered to be "exhausted" and do not result in a * separate wcsprm struct. Otherwise they do. * * 7: Neither wcspih() nor wcsbth() check for duplicated keywords, in most * cases they accept the last encountered. * * 8: wcspih() and wcsbth() use wcsnpv() and wcsnps() (refer to the prologue * of wcs.h) to match the size of the pv[] and ps[] arrays in the wcsprm * structs to the number in the header. Consequently there are no unused * elements in the pv[] and ps[] arrays, indeed they will often be of * zero length. * * 9: The FITS WCS standard for pixel lists assumes that a pixel list * defines one and only one image, i.e. that each row of the binary table * refers to just one event, e.g. the detection of a single photon or * neutrino. * * In the absence of a formal mechanism for identifying the columns * containing pixel coordinates (as opposed to pixel values or ancillary * data recorded at the time the photon or neutrino was detected), * Paper I discusses how the WCS keywords themselves may be used to * identify them. * * In practice, however, pixel lists have been used to store multiple * images. Besides not specifying how to identify columns, the pixel * list convention is also silent on the method to be used to associate * table columns with image axes. * * wcsbth() simply collects all WCS keywords for a particular coordinate * representation (i.e. the "a" value in TCTYna) into one wcsprm struct. * However, these alternates need not be associated with the same table * columns and this allows a pixel list to contain up to 27 separate * images. As usual, if one of these representations happened to contain * more than two celestial axes, for example, then an error would result * when wcsset() is invoked on it. In this case the "colsel" argument * could be used to restrict the columns used to construct the * representation so that it only contained one pair of celestial axes. * * * wcstab() - Tabular construction routine * --------------------------------------- * wcstab() assists in filling in the information in the wcsprm struct relating * to coordinate lookup tables. * * Tabular coordinates ('TAB') present certain difficulties in that the main * components of the lookup table - the multidimensional coordinate array plus * an index vector for each dimension - are stored in a FITS binary table * extension (BINTABLE). Information required to locate these arrays is stored * in PVi_ma and PSi_ma keywords in the image header. * * wcstab() parses the PVi_ma and PSi_ma keywords associated with each 'TAB' * axis and allocates memory in the wcsprm struct for the required number of * tabprm structs. It sets as much of the tabprm struct as can be gleaned from * the image header, and also sets up an array of wtbarr structs (described in * the prologue of wcs.h) to assist in extracting the required arrays from the * BINTABLE extension(s). * * It is then up to the user to allocate memory for, and copy arrays from the * BINTABLE extension(s) into the tabprm structs. A CFITSIO routine, * fits_read_wcstab(), has been provided for this purpose, see getwcstab.h. * wcsset() will automatically take control of this allocated memory, in * particular causing it to be free'd by wcsfree(); the user must not attempt * to free it after wcsset() has been called. * * Note that wcspih() and wcsbth() automatically invoke wcstab() on each of the * wcsprm structs that they return. * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters (see below). * * wcstab() sets ntab, tab, nwtb and wtb, allocating * memory for the tab and wtb arrays. This allocated * memory will be free'd automatically by wcsfree(). * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * 3: Invalid tabular parameters. * * For returns > 1, a detailed error message is set in * wcsprm::err if enabled, see wcserr_enable(). * * * wcsidx() - Index alternate coordinate representations * ----------------------------------------------------- * wcsidx() returns an array of 27 indices for the alternate coordinate * representations in the array of wcsprm structs returned by wcspih(). For * the array returned by wcsbth() it returns indices for the unattached * (colnum == 0) representations derived from image header keywords - use * wcsbdx() for those derived from binary table image arrays or pixel lists * keywords. * * Given: * nwcs int Number of coordinate representations in the array. * * wcs const struct wcsprm** * Pointer to an array of wcsprm structs returned by * wcspih() or wcsbth(). * * Returned: * alts int[27] Index of each alternate coordinate representation in * the array: alts[0] for the primary, alts[1] for 'A', * etc., set to -1 if not present. * * For example, if there was no 'P' representation then * = alts['P'-'A'+1] == -1; * * Otherwise, the address of its wcsprm struct would be * = wcs + alts['P'-'A'+1]; * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * * * wcsbdx() - Index alternate coordinate representions * --------------------------------------------------- * wcsbdx() returns an array of 999 x 27 indices for the alternate coordinate * representions for binary table image arrays xor pixel lists in the array of * wcsprm structs returned by wcsbth(). Use wcsidx() for the unattached * representations derived from image header keywords. * * Given: * nwcs int Number of coordinate representations in the array. * * wcs const struct wcsprm** * Pointer to an array of wcsprm structs returned by * wcsbth(). * * type int Select the type of coordinate representation: * 0: binary table image arrays, * 1: pixel lists. * * Returned: * alts short[1000][28] * Index of each alternate coordinate represention in the * array: alts[col][0] for the primary, alts[col][1] for * 'A', to alts[col][26] for 'Z', where col is the * 1-relative column number, and col == 0 is used for * unattached image headers. Set to -1 if not present. * * alts[col][27] counts the number of coordinate * representations of the chosen type for each column. * * For example, if there was no 'P' represention for * column 13 then * = alts[13]['P'-'A'+1] == -1; * * Otherwise, the address of its wcsprm struct would be * = wcs + alts[13]['P'-'A'+1]; * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * * * wcsvfree() - Free the array of wcsprm structs * --------------------------------------------- * wcsvfree() frees the memory allocated by wcspih() or wcsbth() for the array * of wcsprm structs, first invoking wcsfree() on each of the array members. * * Given and returned: * nwcs int* Number of coordinate representations found; set to 0 * on return. * * wcs struct wcsprm** * Pointer to the array of wcsprm structs; set to 0x0 on * return. * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * * * wcshdo() - Write out a wcsprm struct as a FITS header * ----------------------------------------------------- * wcshdo() translates a wcsprm struct into a FITS header. If the colnum * member of the struct is non-zero then a binary table image array header will * be produced. Otherwise, if the colax[] member of the struct is set non-zero * then a pixel list header will be produced. Otherwise, a primary image or * image extension header will be produced. * * If the struct was originally constructed from a header, e.g. by wcspih(), * the output header will almost certainly differ in a number of respects: * * - The output header only contains WCS-related keywords. In particular, it * does not contain syntactically-required keywords such as SIMPLE, NAXIS, * BITPIX, or END. * * - Deprecated (e.g. CROTAn) or non-standard usage will be translated to * standard (this is partially dependent on whether wcsfix() was applied). * * - Quantities will be converted to the units used internally, basically SI * with the addition of degrees. * * - Floating-point quantities may be given to a different decimal precision. * * - Elements of the PCi_ja matrix will be written if and only if they differ * from the unit matrix. Thus, if the matrix is unity then no elements * will be written. * * - Additional keywords such as WCSAXESa, CUNITia, LONPOLEa and LATPOLEa may * appear. * * - The original keycomments will be lost, although wcshdo() tries hard to * write meaningful comments. * * - Keyword order may be changed. * * Keywords can be translated between the image array, binary table, and pixel * lists forms by manipulating the colnum or colax[] members of the wcsprm * struct. * * Given: * relax int Degree of permissiveness: * 0: Recognize only FITS keywords defined by the * published WCS standard. * -1: Admit all informal extensions of the WCS * standard. * Fine-grained control of the degree of permissiveness * is also possible as explained in the notes below. * * Given and returned: * wcs struct wcsprm* * Pointer to a wcsprm struct containing coordinate * transformation parameters. Will be initialized if * necessary. * * Returned: * nkeyrec int* Number of FITS header keyrecords returned in the * "header" array. * * header char** Pointer to an array of char holding the header. * Storage for the array is allocated by wcshdo() in * blocks of 2880 bytes (32 x 80-character keyrecords) * and must be free'd by the user to avoid memory leaks. * * Each keyrecord is 80 characters long and is *NOT* * null-terminated, so the first keyrecord starts at * (*header)[0], the second at (*header)[80], etc. * * Function return value: * int Status return value (associated with wcs_errmsg[]): * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * 3: Linear transformation matrix is singular. * 4: Inconsistent or unrecognized coordinate axis * types. * 5: Invalid parameter value. * 6: Invalid coordinate transformation parameters. * 7: Ill-conditioned coordinate transformation * parameters. * * For returns > 1, a detailed error message is set in * wcsprm::err if enabled, see wcserr_enable(). * * Notes: * wcshdo() interprets the "relax" argument as a vector of flag bits to * provide fine-grained control over what non-standard WCS keywords to write. * The flag bits are subject to change in future and should be set by using * the preprocessor macros (see below) for the purpose. * * - WCSHDO_none: Don't use any extensions. * * - WCSHDO_all: Write all recognized extensions, equivalent to setting each * flag bit. * * - WCSHDO_safe: Write all extensions that are considered to be safe and * recommended. * * - WCSHDO_DOBSn: Write DOBSn, the column-specific analogue of DATE-OBS for * use in binary tables and pixel lists. WCS Paper III introduced * DATE-AVG and DAVGn but by an oversight DOBSn (the obvious analogy) * was never formally defined by the standard. The alternative to * using DOBSn is to write DATE-OBS which applies to the whole table. * This usage is considered to be safe and is recommended. * * - WCSHDO_TPCn_ka: WCS Paper I defined * * - TPn_ka and TCn_ka for pixel lists * * but WCS Paper II uses TPCn_ka in one example and subsequently the * errata for the WCS papers legitimized the use of * * - TPCn_ka and TCDn_ka for pixel lists * * provided that the keyword does not exceed eight characters. This * usage is considered to be safe and is recommended because of the * non-mnemonic terseness of the shorter forms. * * - WCSHDO_PVn_ma: WCS Paper I defined * * - iVn_ma and iSn_ma for bintables and * - TVn_ma and TSn_ma for pixel lists * * but WCS Paper II uses iPVn_ma and TPVn_ma in the examples and * subsequently the errata for the WCS papers legitimized the use of * * - iPVn_ma and iPSn_ma for bintables and * - TPVn_ma and TPSn_ma for pixel lists * * provided that the keyword does not exceed eight characters. This * usage is considered to be safe and is recommended because of the * non-mnemonic terseness of the shorter forms. * * - WCSHDO_CRPXna: For historical reasons WCS Paper I defined * * - jCRPXn, iCDLTn, iCUNIn, iCTYPn, and iCRVLn for bintables and * - TCRPXn, TCDLTn, TCUNIn, TCTYPn, and TCRVLn for pixel lists * * for use without an alternate version specifier. However, because * of the eight-character keyword constraint, in order to accommodate * column numbers greater than 99 WCS Paper I also defined * * - jCRPna, iCDEna, iCUNna, iCTYna and iCRVna for bintables and * - TCRPna, TCDEna, TCUNna, TCTYna and TCRVna for pixel lists * * for use with an alternate version specifier (the "a"). Like the * PC, CD, PV, and PS keywords there is an obvious tendency to * confuse these two forms for column numbers up to 99. It is very * unlikely that any parser would reject keywords in the first set * with a non-blank alternate version specifier so this usage is * considered to be safe and is recommended. * * - WCSHDO_CNAMna: WCS Papers I and III defined * * - iCNAna, iCRDna, and iCSYna for bintables and * - TCNAna, TCRDna, and TCSYna for pixel lists * * By analogy with the above, the long forms would be * * - iCNAMna, iCRDEna, and iCSYEna for bintables and * - TCNAMna, TCRDEna, and TCSYEna for pixel lists * * Note that these keywords provide auxiliary information only, none * of them are needed to compute world coordinates. This usage is * potentially unsafe and is not recommended at this time. * * - WCSHDO_WCSNna: In light of wcsbth() note 4, write WCSNna instead of * TWCSna for pixel lists. While wcsbth() treats WCSNna and TWCSna * as equivalent, other parsers may not. Consequently, this usage * is potentially unsafe and is not recommended at this time. * * * Global variable: const char *wcshdr_errmsg[] - Status return messages * --------------------------------------------------------------------- * Error messages to match the status value returned from each function. * Use wcs_errmsg[] for status returns from wcshdo(). * *===========================================================================*/ #ifndef WCSLIB_WCSHDR #define WCSLIB_WCSHDR #include "wcs.h" #ifdef __cplusplus extern "C" { #endif #define WCSHDR_none 0x00000000 #define WCSHDR_all 0x000FFFFF #define WCSHDR_reject 0x10000000 #define WCSHDR_strict 0x20000000 #define WCSHDR_CROTAia 0x00000001 #define WCSHDR_EPOCHa 0x00000002 #define WCSHDR_VELREFa 0x00000004 #define WCSHDR_CD00i00j 0x00000008 #define WCSHDR_PC00i00j 0x00000010 #define WCSHDR_PROJPn 0x00000020 #define WCSHDR_CD0i_0ja 0x00000040 #define WCSHDR_PC0i_0ja 0x00000080 #define WCSHDR_PV0i_0ma 0x00000100 #define WCSHDR_PS0i_0ma 0x00000200 #define WCSHDR_RADECSYS 0x00000400 #define WCSHDR_VSOURCE 0x00000800 #define WCSHDR_DOBSn 0x00001000 #define WCSHDR_LONGKEY 0x00002000 #define WCSHDR_CNAMn 0x00004000 #define WCSHDR_AUXIMG 0x00008000 #define WCSHDR_ALLIMG 0x00010000 #define WCSHDR_IMGHEAD 0x00100000 #define WCSHDR_BIMGARR 0x00200000 #define WCSHDR_PIXLIST 0x00400000 #define WCSHDO_none 0x00 #define WCSHDO_all 0xFF #define WCSHDO_safe 0x0F #define WCSHDO_DOBSn 0x01 #define WCSHDO_TPCn_ka 0x02 #define WCSHDO_PVn_ma 0x04 #define WCSHDO_CRPXna 0x08 #define WCSHDO_CNAMna 0x10 #define WCSHDO_WCSNna 0x20 extern const char *wcshdr_errmsg[]; enum wcshdr_errmsg_enum { WCSHDRERR_SUCCESS = 0, /* Success. */ WCSHDRERR_NULL_POINTER = 1, /* Null wcsprm pointer passed. */ WCSHDRERR_MEMORY = 2, /* Memory allocation failed. */ WCSHDRERR_BAD_COLUMN = 3, /* Invalid column selection. */ WCSHDRERR_PARSER = 4, /* Fatal error returned by Flex parser. */ WCSHDRERR_BAD_TABULAR_PARAMS = 5 /* Invalid tabular parameters. */ }; int wcspih(char *header, int nkeyrec, int relax, int ctrl, int *nreject, int *nwcs, struct wcsprm **wcs); int wcsbth(char *header, int nkeyrec, int relax, int ctrl, int keysel, int *colsel, int *nreject, int *nwcs, struct wcsprm **wcs); int wcstab(struct wcsprm *wcs); int wcsidx(int nwcs, struct wcsprm **wcs, int alts[27]); int wcsbdx(int nwcs, struct wcsprm **wcs, int type, short alts[1000][28]); int wcsvfree(int *nwcs, struct wcsprm **wcs); int wcshdo(int relax, struct wcsprm *wcs, int *nkeyrec, char **header); #ifdef __cplusplus } #endif #endif /* WCSLIB_WCSHDR */ astropy-1.1.1/cextern/wcslib/C/wcs.h0000644001134200020070000021605512644017723020220 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcs.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the wcs routines * --------------------------- * Routines in this suite implement the FITS World Coordinate System (WCS) * standard which defines methods to be used for computing world coordinates * from image pixel coordinates, and vice versa. The standard, and proposed * extensions for handling distortions, are described in * = "Representations of world coordinates in FITS", = Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I) = = "Representations of celestial coordinates in FITS", = Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (WCS Paper II) = = "Representations of spectral coordinates in FITS", = Greisen, E.W., Calabretta, M.R., Valdes, F.G., & Allen, S.L. = 2006, A&A, 446, 747 (WCS Paper III) = = "Representations of distortions in FITS world coordinate systems", = Calabretta, M.R. et al. (WCS Paper IV, draft dated 2004/04/22), = available from http://www.atnf.csiro.au/people/Mark.Calabretta = = "Mapping on the HEALPix grid", = Calabretta, M.R., & Roukema, B.F. 2007, MNRAS, 381, 865 (WCS Paper V) = = "Representing the 'Butterfly' Projection in FITS -- Projection Code XPH", = Calabretta, M.R., & Lowe, S.R. 2013, PASA, 30, e050 (WCS Paper VI) * * These routines are based on the wcsprm struct which contains all information * needed for the computations. The struct contains some members that must be * set by the user, and others that are maintained by these routines, somewhat * like a C++ class but with no encapsulation. * * wcsnpv(), wcsnps(), wcsini(), wcssub(), and wcsfree() are provided to manage * the wcsprm struct and another, wcsprt(), prints its contents. Refer to the * description of the wcsprm struct for an explanation of the anticipated usage * of these routines. wcscopy(), which does a deep copy of one wcsprm struct * to another, is defined as a preprocessor macro function that invokes * wcssub(). * * wcsperr() prints the error message(s) (if any) stored in a wcsprm struct, * and the linprm, celprm, prjprm, spcprm, and tabprm structs that it contains. * * A setup routine, wcsset(), computes intermediate values in the wcsprm struct * from parameters in it that were supplied by the user. The struct always * needs to be set up by wcsset() but this need not be called explicitly - * refer to the explanation of wcsprm::flag. * * wcsp2s() and wcss2p() implement the WCS world coordinate transformations. * In fact, they are high level driver routines for the WCS linear, * logarithmic, celestial, spectral and tabular transformation routines * described in lin.h, log.h, cel.h, spc.h and tab.h. * * Given either the celestial longitude or latitude plus an element of the * pixel coordinate a hybrid routine, wcsmix(), iteratively solves for the * unknown elements. * * wcssptr() translates the spectral axis in a wcsprm struct. For example, a * 'FREQ' axis may be translated into 'ZOPT-F2W' and vice versa. * * wcslib_version() returns the WCSLIB version number. * * Quadcube projections: * --------------------- * The quadcube projections (TSC, CSC, QSC) may be represented in FITS in * either of two ways: * * a: The six faces may be laid out in one plane and numbered as follows: * = 0 = = 4 3 2 1 4 3 2 = = 5 * * Faces 2, 3 and 4 may appear on one side or the other (or both). The * world-to-pixel routines map faces 2, 3 and 4 to the left but the * pixel-to-world routines accept them on either side. * * b: The "COBE" convention in which the six faces are stored in a * three-dimensional structure using a CUBEFACE axis indexed from * 0 to 5 as above. * * These routines support both methods; wcsset() determines which is being * used by the presence or absence of a CUBEFACE axis in ctype[]. wcsp2s() * and wcss2p() translate the CUBEFACE axis representation to the single * plane representation understood by the lower-level WCSLIB projection * routines. * * * wcsnpv() - Memory allocation for PVi_ma * --------------------------------------- * wcsnpv() changes the value of NPVMAX (default 64). This global variable * controls the number of pvcard structs, for holding PVi_ma keyvalues, that * wcsini() should allocate space for. * * PLEASE NOTE: This function is not thread-safe. * * Given: * n int Value of NPVMAX; ignored if < 0. * * Function return value: * int Current value of NPVMAX. * * * wcsnps() - Memory allocation for PSi_ma * --------------------------------------- * wcsnps() changes the values of NPSMAX (default 8). This global variable * controls the number of pscard structs, for holding PSi_ma keyvalues, that * wcsini() should allocate space for. * * PLEASE NOTE: This function is not thread-safe. * * Given: * n int Value of NPSMAX; ignored if < 0. * * Function return value: * int Current value of NPSMAX. * * * wcsini() - Default constructor for the wcsprm struct * ---------------------------------------------------- * wcsini() optionally allocates memory for arrays in a wcsprm struct and sets * all members of the struct to default values. Memory is allocated for up to * NPVMAX PVi_ma keywords or NPSMAX PSi_ma keywords per WCS representation. * These may be changed via wcsnpv() and wcsnps() before wcsini() is called. * * PLEASE NOTE: every wcsprm struct should be initialized by wcsini(), possibly * repeatedly. On the first invokation, and only the first invokation, * wcsprm::flag must be set to -1 to initialize memory management, regardless * of whether wcsini() will actually be used to allocate memory. * * Given: * alloc int If true, allocate memory unconditionally for the * crpix, etc. arrays. * * If false, it is assumed that pointers to these arrays * have been set by the user except if they are null * pointers in which case memory will be allocated for * them regardless. (In other words, setting alloc true * saves having to initalize these pointers to zero.) * * naxis int The number of world coordinate axes. This is used to * determine the length of the various wcsprm vectors and * matrices and therefore the amount of memory to * allocate for them. * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters. * * Note that, in order to initialize memory management, * wcsprm::flag should be set to -1 when wcs is * initialized for the first time (memory leaks may * result if it had already been initialized). * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * * For returns > 1, a detailed error message is set in * wcsprm::err if enabled, see wcserr_enable(). * * * wcssub() - Subimage extraction routine for the wcsprm struct * ------------------------------------------------------------ * wcssub() extracts the coordinate description for a subimage from a wcsprm * struct. It does a deep copy, using wcsini() to allocate memory for its * arrays if required. Only the "information to be provided" part of the * struct is extracted. Consequently, wcsset() need not have been, and won't * be invoked on the struct from which the subimage is extracted. A call to * wcsset() is required to set up the subimage struct. * * The world coordinate system of the subimage must be separable in the sense * that the world coordinates at any point in the subimage must depend only on * the pixel coordinates of the axes extracted. In practice, this means that * the linear transformation matrix of the original image must not contain * non-zero off-diagonal terms that associate any of the subimage axes with any * of the non-subimage axes. Likewise, if any distortions are associated with * the subimage axes, they must not depend on any of the axes that are not * being extracted. * * Note that while the required elements of the tabprm array are extracted, the * wtbarr array is not. (Thus it is not appropriate to call wcssub() after * wcstab() but before filling the tabprm structs - refer to wcshdr.h.) * * wcssub() can also add axes to a wcsprm struct. The new axes will be created * using the defaults set by wcsini() which produce a simple, unnamed, linear * axis with world coordinate equal to the pixel coordinate. These default * values can be changed afterwards, before invoking wcsset(). * * Given: * alloc int If true, allocate memory for the crpix, etc. arrays in * the destination. Otherwise, it is assumed that * pointers to these arrays have been set by the user * except if they are null pointers in which case memory * will be allocated for them regardless. * * wcssrc const struct wcsprm* * Struct to extract from. * * Given and returned: * nsub int* * axes int[] Vector of length *nsub containing the image axis * numbers (1-relative) to extract. Order is * significant; axes[0] is the axis number of the input * image that corresponds to the first axis in the * subimage, etc. * * Use an axis number of 0 to create a new axis using * the defaults set by wcsini(). They can be changed * later. * * nsub (the pointer) may be set to zero, and so also may * *nsub, which is interpreted to mean all axes in the * input image; the number of axes will be returned if * nsub != 0x0. axes itself (the pointer) may be set to * zero to indicate the first *nsub axes in their * original order. * * Set both nsub (or *nsub) and axes to zero to do a deep * copy of one wcsprm struct to another. * * Subimage extraction by coordinate axis type may be * done by setting the elements of axes[] to the * following special preprocessor macro values: * * WCSSUB_LONGITUDE: Celestial longitude. * WCSSUB_LATITUDE: Celestial latitude. * WCSSUB_CUBEFACE: Quadcube CUBEFACE axis. * WCSSUB_SPECTRAL: Spectral axis. * WCSSUB_STOKES: Stokes axis. * * Refer to the notes (below) for further usage examples. * * On return, *nsub will be set to the number of axes in * the subimage; this may be zero if there were no axes * of the required type(s) (in which case no memory will * be allocated). axes[] will contain the axis numbers * that were extracted, or 0 for newly created axes. The * vector length must be sufficient to contain all axis * numbers. No checks are performed to verify that the * coordinate axes are consistent, this is done by * wcsset(). * * wcsdst struct wcsprm* * Struct describing the subimage. wcsprm::flag should * be set to -1 if wcsdst was not previously initialized * (memory leaks may result if it was previously * initialized). * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * 12: Invalid subimage specification. * 13: Non-separable subimage coordinate system. * * For returns > 1, a detailed error message is set in * wcsprm::err if enabled, see wcserr_enable(). * * Notes: * Combinations of subimage axes of particular types may be extracted in the * same order as they occur in the input image by combining preprocessor * codes, for example * = *nsub = 1; = axes[0] = WCSSUB_LONGITUDE | WCSSUB_LATITUDE | WCSSUB_SPECTRAL; * * would extract the longitude, latitude, and spectral axes in the same order * as the input image. If one of each were present, *nsub = 3 would be * returned. * * For convenience, WCSSUB_CELESTIAL is defined as the combination * WCSSUB_LONGITUDE | WCSSUB_LATITUDE | WCSSUB_CUBEFACE. * * The codes may also be negated to extract all but the types specified, for * example * = *nsub = 4; = axes[0] = WCSSUB_LONGITUDE; = axes[1] = WCSSUB_LATITUDE; = axes[2] = WCSSUB_CUBEFACE; = axes[3] = -(WCSSUB_SPECTRAL | WCSSUB_STOKES); * * The last of these specifies all axis types other than spectral or Stokes. * Extraction is done in the order specified by axes[] a longitude axis (if * present) would be extracted first (via axes[0]) and not subsequently (via * axes[3]). Likewise for the latitude and cubeface axes in this example. * * From the foregoing, it is apparent that the value of *nsub returned may be * less than or greater than that given. However, it will never exceed the * number of axes in the input image (plus the number of newly-created axes * if any were specified on input). * * * wcscompare() - Compare two wcsprm structs for equality * ------------------------------------------------------ * wcscompare() compares two wcsprm structs for equality. * * Given: * cmp int A bit field controlling the strictness of the * comparison. When 0, all fields must be identical. * * The following constants may be or'ed together to * relax the comparison: * WCSCOMPARE_ANCILLARY: Ignore ancillary keywords * that don't change the WCS transformation, such * as DATE-OBS or EQUINOX. * WCSCOMPARE_TILING: Ignore integral differences in * CRPIXja. This is the 'tiling' condition, where * two WCSes cover different regions of the same * map projection and align on the same map grid. * WCSCOMPARE_CRPIX: Ignore any differences at all in * CRPIXja. The two WCSes cover different regions * of the same map projection but may not align on * the same grid map. Overrides WCSCOMPARE_TILING. * * tol double Tolerance for comparison of floating-point values. * For example, for tol == 1e-6, all floating-point * values in the structs must be equal to the first 6 * decimal places. A value of 0 implies exact equality. * * wcs1 const struct wcsprm* * The first wcsprm struct to compare. * * wcs2 const struct wcsprm* * The second wcsprm struct to compare. * * Returned: * equal int* Non-zero when the given structs are equal. * * Function return value: * int Status return value: * 0: Success. * 1: Null pointer passed. * * * wcscopy() macro - Copy routine for the wcsprm struct * ---------------------------------------------------- * wcscopy() does a deep copy of one wcsprm struct to another. As of * WCSLIB 3.6, it is implemented as a preprocessor macro that invokes * wcssub() with the nsub and axes pointers both set to zero. * * * wcsfree() - Destructor for the wcsprm struct * -------------------------------------------- * wcsfree() frees memory allocated for the wcsprm arrays by wcsini() and/or * wcsset(). wcsini() records the memory it allocates and wcsfree() will only * attempt to free this. * * PLEASE NOTE: wcsfree() must not be invoked on a wcsprm struct that was not * initialized by wcsini(). * * Returned: * wcs struct wcsprm* * Coordinate transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * * * wcsprt() - Print routine for the wcsprm struct * ---------------------------------------------- * wcsprt() prints the contents of a wcsprm struct using wcsprintf(). Mainly * intended for diagnostic purposes. * * Given: * wcs const struct wcsprm* * Coordinate transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * * * wcsperr() - Print error messages from a wcsprm struct * ----------------------------------------------------- * wcsperr() prints the error message(s), if any, stored in a wcsprm struct, * and the linprm, celprm, prjprm, spcprm, and tabprm structs that it contains. * If there are no errors then nothing is printed. It uses wcserr_prt(), q.v. * * Given: * wcs const struct wcsprm* * Coordinate transformation parameters. * * prefix const char * * If non-NULL, each output line will be prefixed with * this string. * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * * * wcsbchk() - Enable/disable bounds checking * ------------------------------------------ * wcsbchk() is used to control bounds checking in the projection routines. * Note that wcsset() always enables bounds checking. wcsbchk() will invoke * wcsset() on the wcsprm struct beforehand if necessary. * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters. * * Given: * bounds int If bounds&1 then enable strict bounds checking for the * spherical-to-Cartesian (s2x) transformation for the * AZP, SZP, TAN, SIN, ZPN, and COP projections. * * If bounds&2 then enable strict bounds checking for the * Cartesian-to-spherical (x2s) transformation for the * HPX and XPH projections. * * If bounds&4 then enable bounds checking on the native * coordinates returned by the Cartesian-to-spherical * (x2s) transformations using prjchk(). * * Zero it to disable all checking. * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * * * wcsset() - Setup routine for the wcsprm struct * ---------------------------------------------- * wcsset() sets up a wcsprm struct according to information supplied within * it (refer to the description of the wcsprm struct). * * wcsset() recognizes the NCP projection and converts it to the equivalent SIN * projection and likewise translates GLS into SFL. It also translates the * AIPS spectral types ('FREQ-LSR', 'FELO-HEL', etc.), possibly changing the * input header keywords wcsprm::ctype and/or wcsprm::specsys if necessary. * * Note that this routine need not be called directly; it will be invoked by * wcsp2s() and wcss2p() if the wcsprm::flag is anything other than a * predefined magic value. * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * 3: Linear transformation matrix is singular. * 4: Inconsistent or unrecognized coordinate axis * types. * 5: Invalid parameter value. * 6: Invalid coordinate transformation parameters. * 7: Ill-conditioned coordinate transformation * parameters. * * For returns > 1, a detailed error message is set in * wcsprm::err if enabled, see wcserr_enable(). * * Notes: * wcsset() always enables strict bounds checking in the projection routines * (via a call to prjini()). Use wcsbchk() to modify bounds-checking after * wcsset() is invoked. * * * wcsp2s() - Pixel-to-world transformation * ---------------------------------------- * wcsp2s() transforms pixel coordinates to world coordinates. * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters. * * Given: * ncoord, * nelem int The number of coordinates, each of vector length * nelem but containing wcs.naxis coordinate elements. * Thus nelem must equal or exceed the value of the * NAXIS keyword unless ncoord == 1, in which case nelem * is not used. * * pixcrd const double[ncoord][nelem] * Array of pixel coordinates. * * Returned: * imgcrd double[ncoord][nelem] * Array of intermediate world coordinates. For * celestial axes, imgcrd[][wcs.lng] and * imgcrd[][wcs.lat] are the projected x-, and * y-coordinates in pseudo "degrees". For spectral * axes, imgcrd[][wcs.spec] is the intermediate spectral * coordinate, in SI units. * * phi,theta double[ncoord] * Longitude and latitude in the native coordinate system * of the projection [deg]. * * world double[ncoord][nelem] * Array of world coordinates. For celestial axes, * world[][wcs.lng] and world[][wcs.lat] are the * celestial longitude and latitude [deg]. For * spectral axes, imgcrd[][wcs.spec] is the intermediate * spectral coordinate, in SI units. * * stat int[ncoord] * Status return value for each coordinate: * 0: Success. * 1+: A bit mask indicating invalid pixel coordinate * element(s). * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * 3: Linear transformation matrix is singular. * 4: Inconsistent or unrecognized coordinate axis * types. * 5: Invalid parameter value. * 6: Invalid coordinate transformation parameters. * 7: Ill-conditioned coordinate transformation * parameters. * 8: One or more of the pixel coordinates were * invalid, as indicated by the stat vector. * * For returns > 1, a detailed error message is set in * wcsprm::err if enabled, see wcserr_enable(). * * * wcss2p() - World-to-pixel transformation * ---------------------------------------- * wcss2p() transforms world coordinates to pixel coordinates. * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters. * * Given: * ncoord, * nelem int The number of coordinates, each of vector length nelem * but containing wcs.naxis coordinate elements. Thus * nelem must equal or exceed the value of the NAXIS * keyword unless ncoord == 1, in which case nelem is not * used. * * world const double[ncoord][nelem] * Array of world coordinates. For celestial axes, * world[][wcs.lng] and world[][wcs.lat] are the * celestial longitude and latitude [deg]. For spectral * axes, world[][wcs.spec] is the spectral coordinate, in * SI units. * * Returned: * phi,theta double[ncoord] * Longitude and latitude in the native coordinate * system of the projection [deg]. * * imgcrd double[ncoord][nelem] * Array of intermediate world coordinates. For * celestial axes, imgcrd[][wcs.lng] and * imgcrd[][wcs.lat] are the projected x-, and * y-coordinates in pseudo "degrees". For quadcube * projections with a CUBEFACE axis the face number is * also returned in imgcrd[][wcs.cubeface]. For * spectral axes, imgcrd[][wcs.spec] is the intermediate * spectral coordinate, in SI units. * * pixcrd double[ncoord][nelem] * Array of pixel coordinates. * * stat int[ncoord] * Status return value for each coordinate: * 0: Success. * 1+: A bit mask indicating invalid world coordinate * element(s). * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * 3: Linear transformation matrix is singular. * 4: Inconsistent or unrecognized coordinate axis * types. * 5: Invalid parameter value. * 6: Invalid coordinate transformation parameters. * 7: Ill-conditioned coordinate transformation * parameters. * 9: One or more of the world coordinates were * invalid, as indicated by the stat vector. * * For returns > 1, a detailed error message is set in * wcsprm::err if enabled, see wcserr_enable(). * * * wcsmix() - Hybrid coordinate transformation * ------------------------------------------- * wcsmix(), given either the celestial longitude or latitude plus an element * of the pixel coordinate, solves for the remaining elements by iterating on * the unknown celestial coordinate element using wcss2p(). Refer also to the * notes below. * * Given and returned: * wcs struct wcsprm* * Indices for the celestial coordinates obtained * by parsing the wcsprm::ctype[]. * * Given: * mixpix int Which element of the pixel coordinate is given. * * mixcel int Which element of the celestial coordinate is given: * 1: Celestial longitude is given in * world[wcs.lng], latitude returned in * world[wcs.lat]. * 2: Celestial latitude is given in * world[wcs.lat], longitude returned in * world[wcs.lng]. * * vspan const double[2] * Solution interval for the celestial coordinate [deg]. * The ordering of the two limits is irrelevant. * Longitude ranges may be specified with any convenient * normalization, for example [-120,+120] is the same as * [240,480], except that the solution will be returned * with the same normalization, i.e. lie within the * interval specified. * * vstep const double * Step size for solution search [deg]. If zero, a * sensible, although perhaps non-optimal default will be * used. * * viter int If a solution is not found then the step size will be * halved and the search recommenced. viter controls how * many times the step size is halved. The allowed range * is 5 - 10. * * Given and returned: * world double[naxis] * World coordinate elements. world[wcs.lng] and * world[wcs.lat] are the celestial longitude and * latitude [deg]. Which is given and which returned * depends on the value of mixcel. All other elements * are given. * * Returned: * phi,theta double[naxis] * Longitude and latitude in the native coordinate * system of the projection [deg]. * * imgcrd double[naxis] * Image coordinate elements. imgcrd[wcs.lng] and * imgcrd[wcs.lat] are the projected x-, and * y-coordinates in pseudo "degrees". * * Given and returned: * pixcrd double[naxis] * Pixel coordinate. The element indicated by mixpix is * given and the remaining elements are returned. * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * 3: Linear transformation matrix is singular. * 4: Inconsistent or unrecognized coordinate axis * types. * 5: Invalid parameter value. * 6: Invalid coordinate transformation parameters. * 7: Ill-conditioned coordinate transformation * parameters. * 10: Invalid world coordinate. * 11: No solution found in the specified interval. * * For returns > 1, a detailed error message is set in * wcsprm::err if enabled, see wcserr_enable(). * * Notes: * Initially the specified solution interval is checked to see if it's a * "crossing" interval. If it isn't, a search is made for a crossing * solution by iterating on the unknown celestial coordinate starting at the * upper limit of the solution interval and decrementing by the specified * step size. A crossing is indicated if the trial value of the pixel * coordinate steps through the value specified. If a crossing interval is * found then the solution is determined by a modified form of "regula falsi" * division of the crossing interval. If no crossing interval was found * within the specified solution interval then a search is made for a * "non-crossing" solution as may arise from a point of tangency. The * process is complicated by having to make allowance for the discontinuities * that occur in all map projections. * * Once one solution has been determined others may be found by subsequent * invokations of wcsmix() with suitably restricted solution intervals. * * Note the circumstance that arises when the solution point lies at a native * pole of a projection in which the pole is represented as a finite curve, * for example the zenithals and conics. In such cases two or more valid * solutions may exist but wcsmix() only ever returns one. * * Because of its generality wcsmix() is very compute-intensive. For * compute-limited applications more efficient special-case solvers could be * written for simple projections, for example non-oblique cylindrical * projections. * * * wcssptr() - Spectral axis translation * ------------------------------------- * wcssptr() translates the spectral axis in a wcsprm struct. For example, a * 'FREQ' axis may be translated into 'ZOPT-F2W' and vice versa. * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters. * * i int* Index of the spectral axis (0-relative). If given < 0 * it will be set to the first spectral axis identified * from the ctype[] keyvalues in the wcsprm struct. * * ctype char[9] Desired spectral CTYPEia. Wildcarding may be used as * for the ctypeS2 argument to spctrn() as described in * the prologue of spc.h, i.e. if the final three * characters are specified as "???", or if just the * eighth character is specified as '?', the correct * algorithm code will be substituted and returned. * * Function return value: * int Status return value: * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * 3: Linear transformation matrix is singular. * 4: Inconsistent or unrecognized coordinate axis * types. * 5: Invalid parameter value. * 6: Invalid coordinate transformation parameters. * 7: Ill-conditioned coordinate transformation * parameters. * 12: Invalid subimage specification (no spectral * axis). * * For returns > 1, a detailed error message is set in * wcsprm::err if enabled, see wcserr_enable(). * * * wcslib_version() - WCSLIB version number * ---------------------------------------- * wcslib_version() returns the WCSLIB version number. * * The major version number changes when the ABI changes or when the license * conditions change. ABI changes typically result from a change to the * contents of one of the structs. The major version number is used to * distinguish between incompatible versions of the sharable library. * * The minor version number changes with new functionality or bug fixes that do * not involve a change in the ABI. * * The auxiliary version number (which is often absent) signals changes to the * documentation, test suite, build procedures, or any other change that does * not affect the compiled library. * * Returned: * vers[3] int[3] The broken-down version number: * 0: Major version number. * 1: Minor version number. * 2: Auxiliary version number (zero if absent). * May be given as a null pointer if not required. * * Function return value: * char* A null-terminated, statically allocated string * containing the version number in the usual form, i.e. * "..". * * * wcsprm struct - Coordinate transformation parameters * ---------------------------------------------------- * The wcsprm struct contains information required to transform world * coordinates. It consists of certain members that must be set by the user * ("given") and others that are set by the WCSLIB routines ("returned"). * While the addresses of the arrays themselves may be set by wcsini() if it * (optionally) allocates memory, their contents must be set by the user. * * Some parameters that are given are not actually required for transforming * coordinates. These are described as "auxiliary"; the struct simply provides * a place to store them, though they may be used by wcshdo() in constructing a * FITS header from a wcsprm struct. Some of the returned values are supplied * for informational purposes and others are for internal use only as * indicated. * * In practice, it is expected that a WCS parser would scan the FITS header to * determine the number of coordinate axes. It would then use wcsini() to * allocate memory for arrays in the wcsprm struct and set default values. * Then as it reread the header and identified each WCS keyrecord it would load * the value into the relevant wcsprm array element. This is essentially what * wcspih() does - refer to the prologue of wcshdr.h. As the final step, * wcsset() is invoked, either directly or indirectly, to set the derived * members of the wcsprm struct. wcsset() strips off trailing blanks in all * string members and null-fills the character array. * * int flag * (Given and returned) This flag must be set to zero whenever any of the * following wcsprm struct members are set or changed: * * - wcsprm::naxis (q.v., not normally set by the user), * - wcsprm::crpix, * - wcsprm::pc, * - wcsprm::cdelt, * - wcsprm::crval, * - wcsprm::cunit, * - wcsprm::ctype, * - wcsprm::lonpole, * - wcsprm::latpole, * - wcsprm::restfrq, * - wcsprm::restwav, * - wcsprm::npv, * - wcsprm::pv, * - wcsprm::nps, * - wcsprm::ps, * - wcsprm::cd, * - wcsprm::crota, * - wcsprm::altlin, * - wcsprm::ntab, * - wcsprm::nwtb, * - wcsprm::tab, * - wcsprm::wtb. * * This signals the initialization routine, wcsset(), to recompute the * returned members of the celprm struct. celset() will reset flag to * indicate that this has been done. * * PLEASE NOTE: flag should be set to -1 when wcsini() is called for the * first time for a particular wcsprm struct in order to initialize memory * management. It must ONLY be used on the first initialization otherwise * memory leaks may result. * * int naxis * (Given or returned) Number of pixel and world coordinate elements. * * If wcsini() is used to initialize the linprm struct (as would normally * be the case) then it will set naxis from the value passed to it as a * function argument. The user should not subsequently modify it. * * double *crpix * (Given) Address of the first element of an array of double containing * the coordinate reference pixel, CRPIXja. * * double *pc * (Given) Address of the first element of the PCi_ja (pixel coordinate) * transformation matrix. The expected order is * = struct wcsprm wcs; = wcs.pc = {PC1_1, PC1_2, PC2_1, PC2_2}; * * This may be constructed conveniently from a 2-D array via * = double m[2][2] = {{PC1_1, PC1_2}, = {PC2_1, PC2_2}}; * * which is equivalent to * = double m[2][2]; = m[0][0] = PC1_1; = m[0][1] = PC1_2; = m[1][0] = PC2_1; = m[1][1] = PC2_2; * * The storage order for this 2-D array is the same as for the 1-D array, * whence * = wcs.pc = *m; * * would be legitimate. * * double *cdelt * (Given) Address of the first element of an array of double containing * the coordinate increments, CDELTia. * * double *crval * (Given) Address of the first element of an array of double containing * the coordinate reference values, CRVALia. * * char (*cunit)[72] * (Given) Address of the first element of an array of char[72] containing * the CUNITia keyvalues which define the units of measurement of the * CRVALia, CDELTia, and CDi_ja keywords. * * As CUNITia is an optional header keyword, cunit[][72] may be left blank * but otherwise is expected to contain a standard units specification as * defined by WCS Paper I. Utility function wcsutrn(), described in * wcsunits.h, is available to translate commonly used non-standard units * specifications but this must be done as a separate step before invoking * wcsset(). * * For celestial axes, if cunit[][72] is not blank, wcsset() uses * wcsunits() to parse it and scale cdelt[], crval[], and cd[][*] to * degrees. It then resets cunit[][72] to "deg". * * For spectral axes, if cunit[][72] is not blank, wcsset() uses wcsunits() * to parse it and scale cdelt[], crval[], and cd[][*] to SI units. It * then resets cunit[][72] accordingly. * * wcsset() ignores cunit[][72] for other coordinate types; cunit[][72] may * be used to label coordinate values. * * These variables accomodate the longest allowed string-valued FITS * keyword, being limited to 68 characters, plus the null-terminating * character. * * char (*ctype)[72] * (Given) Address of the first element of an array of char[72] containing * the coordinate axis types, CTYPEia. * * The ctype[][72] keyword values must be in upper case and there must be * zero or one pair of matched celestial axis types, and zero or one * spectral axis. The ctype[][72] strings should be padded with blanks on * the right and null-terminated so that they are at least eight characters * in length. * * These variables accomodate the longest allowed string-valued FITS * keyword, being limited to 68 characters, plus the null-terminating * character. * * double lonpole * (Given and returned) The native longitude of the celestial pole, phi_p, * given by LONPOLEa [deg] or by PVi_2a [deg] attached to the longitude * axis which takes precedence if defined, and ... * double latpole * (Given and returned) ... the native latitude of the celestial pole, * theta_p, given by LATPOLEa [deg] or by PVi_3a [deg] attached to the * longitude axis which takes precedence if defined. * * lonpole and latpole may be left to default to values set by wcsini() * (see celprm::ref), but in any case they will be reset by wcsset() to * the values actually used. Note therefore that if the wcsprm struct is * reused without resetting them, whether directly or via wcsini(), they * will no longer have their default values. * * double restfrq * (Given) The rest frequency [Hz], and/or ... * double restwav * (Given) ... the rest wavelength in vacuo [m], only one of which need be * given, the other should be set to zero. * * int npv * (Given) The number of entries in the wcsprm::pv[] array. * * int npvmax * (Given or returned) The length of the wcsprm::pv[] array. * * npvmax will be set by wcsini() if it allocates memory for wcsprm::pv[], * otherwise it must be set by the user. See also wcsnpv(). * * struct pvcard *pv * (Given) Address of the first element of an array of length npvmax of * pvcard structs. * * As a FITS header parser encounters each PVi_ma keyword it should load it * into a pvcard struct in the array and increment npv. wcsset() * interprets these as required. * * Note that, if they were not given, wcsset() resets the entries for * PVi_1a, PVi_2a, PVi_3a, and PVi_4a for longitude axis i to match * phi_0 and theta_0 (the native longitude and latitude of the reference * point), LONPOLEa and LATPOLEa respectively. * * int nps * (Given) The number of entries in the wcsprm::ps[] array. * * int npsmax * (Given or returned) The length of the wcsprm::ps[] array. * * npsmax will be set by wcsini() if it allocates memory for wcsprm::ps[], * otherwise it must be set by the user. See also wcsnps(). * * struct pscard *ps * (Given) Address of the first element of an array of length npsmax of * pscard structs. * * As a FITS header parser encounters each PSi_ma keyword it should load it * into a pscard struct in the array and increment nps. wcsset() * interprets these as required (currently no PSi_ma keyvalues are * recognized). * * double *cd * (Given) For historical compatibility, the wcsprm struct supports two * alternate specifications of the linear transformation matrix, those * associated with the CDi_ja keywords, and ... * double *crota * (Given) ... those associated with the CROTAia keywords. Although these * may not formally co-exist with PCi_ja, the approach taken here is simply * to ignore them if given in conjunction with PCi_ja. * * int altlin * (Given) altlin is a bit flag that denotes which of the PCi_ja, CDi_ja * and CROTAia keywords are present in the header: * * - Bit 0: PCi_ja is present. * * - Bit 1: CDi_ja is present. * * Matrix elements in the IRAF convention are * equivalent to the product CDi_ja = CDELTia * PCi_ja, but the * defaults differ from that of the PCi_ja matrix. If one or more * CDi_ja keywords are present then all unspecified CDi_ja default to * zero. If no CDi_ja (or CROTAia) keywords are present, then the * header is assumed to be in PCi_ja form whether or not any PCi_ja * keywords are present since this results in an interpretation of * CDELTia consistent with the original FITS specification. * * While CDi_ja may not formally co-exist with PCi_ja, it may co-exist * with CDELTia and CROTAia which are to be ignored. * * - Bit 2: CROTAia is present. * * In the AIPS convention, CROTAia may only be * associated with the latitude axis of a celestial axis pair. It * specifies a rotation in the image plane that is applied AFTER the * CDELTia; any other CROTAia keywords are ignored. * * CROTAia may not formally co-exist with PCi_ja. * * CROTAia and CDELTia may formally co-exist with CDi_ja but if so are to * be ignored. * * CDi_ja and CROTAia keywords, if found, are to be stored in the * wcsprm::cd and wcsprm::crota arrays which are dimensioned similarly to * wcsprm::pc and wcsprm::cdelt. FITS * header parsers should use the following procedure: * * - Whenever a PCi_ja keyword is encountered: altlin |= 1; * * - Whenever a CDi_ja keyword is encountered: altlin |= 2; * * - Whenever a CROTAia keyword is encountered: altlin |= 4; * * If none of these bits are set the PCi_ja representation results, i.e. * wcsprm::pc and wcsprm::cdelt will be used as given. * * These alternate specifications of the linear transformation matrix are * translated immediately to PCi_ja by wcsset() and are invisible to the * lower-level WCSLIB routines. In particular, wcsset() resets * wcsprm::cdelt to unity if CDi_ja is present (and no PCi_ja). * * If CROTAia are present but none is associated with the latitude axis * (and no PCi_ja or CDi_ja), then wcsset() reverts to a unity PCi_ja * matrix. * * int velref * (Given) AIPS velocity code VELREF, refer to spcaips(). * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::velref is changed. * * char alt[4] * (Given, auxiliary) Character code for alternate coordinate descriptions * (i.e. the 'a' in keyword names such as CTYPEia). This is blank for the * primary coordinate description, or one of the 26 upper-case letters, * A-Z. * * An array of four characters is provided for alignment purposes, only the * first is used. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::alt is changed. * * int colnum * (Given, auxiliary) Where the coordinate representation is associated * with an image-array column in a FITS binary table, this variable may be * used to record the relevant column number. * * It should be set to zero for an image header or pixel list. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::colnum is changed. * * int *colax * (Given, auxiliary) Address of the first element of an array of int * recording the column numbers for each axis in a pixel list. * * The array elements should be set to zero for an image header or image * array in a binary table. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::colax is changed. * * char (*cname)[72] * (Given, auxiliary) The address of the first element of an array of * char[72] containing the coordinate axis names, CNAMEia. * * These variables accomodate the longest allowed string-valued FITS * keyword, being limited to 68 characters, plus the null-terminating * character. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::cname is changed. * * double *crder * (Given, auxiliary) Address of the first element of an array of double * recording the random error in the coordinate value, CRDERia. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::crder is changed. * * double *csyer * (Given, auxiliary) Address of the first element of an array of double * recording the systematic error in the coordinate value, CSYERia. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::csyer is changed. * * char dateavg[72] * (Given, auxiliary) The date of a representative mid-point of the * observation in ISO format, yyyy-mm-ddThh:mm:ss. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::dateavg is changed. * * char dateobs[72] * (Given, auxiliary) The date of the start of the observation unless * otherwise explained in the comment field of the DATE-OBS keyword, in * ISO format, yyyy-mm-ddThh:mm:ss. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::dateobs is changed. * * double equinox * (Given, auxiliary) The equinox associated with dynamical equatorial or * ecliptic coordinate systems, EQUINOXa (or EPOCH in older headers). Not * applicable to ICRS equatorial or ecliptic coordinates. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::equinox is changed. * * double mjdavg * (Given, auxiliary) Modified Julian Date (MJD = JD - 2400000.5), MJD-AVG, * corresponding to DATE-AVG. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::mjdavg is changed. * * double mjdobs * (Given, auxiliary) Modified Julian Date (MJD = JD - 2400000.5), MJD-OBS, * corresponding to DATE-OBS. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::mjdobs is changed. * * double obsgeo[3] * (Given, auxiliary) Location of the observer in a standard terrestrial * reference frame, OBSGEO-X, OBSGEO-Y, OBSGEO-Z [m]. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::obsgeo is changed. * * char radesys[72] * (Given, auxiliary) The equatorial or ecliptic coordinate system type, * RADESYSa. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::radesys is changed. * * char specsys[72] * (Given, auxiliary) Spectral reference frame (standard of rest), * SPECSYSa. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::specsys is changed. * * char ssysobs[72] * (Given, auxiliary) The spectral reference frame in which there is no * differential variation in the spectral coordinate across the * field-of-view, SSYSOBSa. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::ssysobs is changed. * * double velosys * (Given, auxiliary) The relative radial velocity [m/s] between the * observer and the selected standard of rest in the direction of the * celestial reference coordinate, VELOSYSa. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::velosys is changed. * * double zsource * (Given, auxiliary) The redshift, ZSOURCEa, of the source. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::zsource is changed. * * char ssyssrc[72] * (Given, auxiliary) The spectral reference frame (standard of rest), * SSYSSRCa, in which wcsprm::zsource was measured. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::ssyssrc is changed. * * double velangl * (Given, auxiliary) The angle [deg] that should be used to decompose an * observed velocity into radial and transverse components. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::velangl is changed. * * char wcsname[72] * (Given, auxiliary) The name given to the coordinate representation, * WCSNAMEa. This variable accomodates the longest allowed string-valued * FITS keyword, being limited to 68 characters, plus the null-terminating * character. * * It is not necessary to reset the wcsprm struct (via wcsset()) when * wcsprm::wcsname is changed. * * int ntab * (Given) See wcsprm::tab. * * int nwtb * (Given) See wcsprm::wtb. * * struct tabprm *tab * (Given) Address of the first element of an array of ntab tabprm structs * for which memory has been allocated. These are used to store tabular * transformation parameters. * * Although technically wcsprm::ntab and tab are "given", they will * normally be set by invoking wcstab(), whether directly or indirectly. * * The tabprm structs contain some members that must be supplied and others * that are derived. The information to be supplied comes primarily from * arrays stored in one or more FITS binary table extensions. These * arrays, referred to here as "wcstab arrays", are themselves located by * parameters stored in the FITS image header. * * struct wtbarr *wtb * (Given) Address of the first element of an array of nwtb wtbarr structs * for which memory has been allocated. These are used in extracting * wcstab arrays from a FITS binary table. * * Although technically wcsprm::nwtb and wtb are "given", they will * normally be set by invoking wcstab(), whether directly or indirectly. * * char lngtyp[8] * (Returned) Four-character WCS celestial longitude and ... * char lattyp[8] * (Returned) ... latitude axis types. e.g. "RA", "DEC", "GLON", "GLAT", * etc. extracted from 'RA--', 'DEC-', 'GLON', 'GLAT', etc. in the first * four characters of CTYPEia but with trailing dashes removed. (Declared * as char[8] for alignment reasons.) * * int lng * (Returned) Index for the longitude coordinate, and ... * int lat * (Returned) ... index for the latitude coordinate, and ... * int spec * (Returned) ... index for the spectral coordinate in the imgcrd[][] and * world[][] arrays in the API of wcsp2s(), wcss2p() and wcsmix(). * * These may also serve as indices into the pixcrd[][] array provided that * the PCi_ja matrix does not transpose axes. * * int cubeface * (Returned) Index into the pixcrd[][] array for the CUBEFACE axis. This * is used for quadcube projections where the cube faces are stored on a * separate axis (see wcs.h). * * int *types * (Returned) Address of the first element of an array of int containing a * four-digit type code for each axis. * * - First digit (i.e. 1000s): * - 0: Non-specific coordinate type. * - 1: Stokes coordinate. * - 2: Celestial coordinate (including CUBEFACE). * - 3: Spectral coordinate. * * - Second digit (i.e. 100s): * - 0: Linear axis. * - 1: Quantized axis (STOKES, CUBEFACE). * - 2: Non-linear celestial axis. * - 3: Non-linear spectral axis. * - 4: Logarithmic axis. * - 5: Tabular axis. * * - Third digit (i.e. 10s): * - 0: Group number, e.g. lookup table number, being an index into the * tabprm array (see above). * * - The fourth digit is used as a qualifier depending on the axis type. * * - For celestial axes: * - 0: Longitude coordinate. * - 1: Latitude coordinate. * - 2: CUBEFACE number. * * - For lookup tables: the axis number in a multidimensional table. * * CTYPEia in "4-3" form with unrecognized algorithm code will have its * type set to -1 and generate an error. * * void *padding * (An unused variable inserted for alignment purposes only.) * * struct linprm lin * (Returned) Linear transformation parameters (usage is described in the * prologue to lin.h). * * struct celprm cel * (Returned) Celestial transformation parameters (usage is described in * the prologue to cel.h). * * struct spcprm spc * (Returned) Spectral transformation parameters (usage is described in the * prologue to spc.h). * * struct wcserr *err * (Returned) If enabled, when an error status is returned, this struct * contains detailed information about the error, see wcserr_enable(). * * void *m_padding * (For internal use only.) * int m_flag * (For internal use only.) * int m_naxis * (For internal use only.) * double *m_crpix * (For internal use only.) * double *m_pc * (For internal use only.) * double *m_cdelt * (For internal use only.) * double *m_crval * (For internal use only.) * char (*m_cunit)[72] * (For internal use only.) * char (*m_ctype)[72] * (For internal use only.) * struct pvcard *m_pv * (For internal use only.) * struct pscard *m_ps * (For internal use only.) * double *m_cd * (For internal use only.) * double *m_crota * (For internal use only.) * int *m_colax * (For internal use only.) * char (*m_cname)[72] * (For internal use only.) * double *m_crder * (For internal use only.) * double *m_csyer * (For internal use only.) * struct tabprm *m_tab * (For internal use only.) * struct wtbarr *m_wtb * (For internal use only.) * * * pvcard struct - Store for PVi_ma keyrecords * ------------------------------------------- * The pvcard struct is used to pass the parsed contents of PVi_ma keyrecords * to wcsset() via the wcsprm struct. * * All members of this struct are to be set by the user. * * int i * (Given) Axis number (1-relative), as in the FITS PVi_ma keyword. If * i == 0, wcsset() will replace it with the latitude axis number. * * int m * (Given) Parameter number (non-negative), as in the FITS PVi_ma keyword. * * double value * (Given) Parameter value. * * * pscard struct - Store for PSi_ma keyrecords * ------------------------------------------- * The pscard struct is used to pass the parsed contents of PSi_ma keyrecords * to wcsset() via the wcsprm struct. * * All members of this struct are to be set by the user. * * int i * (Given) Axis number (1-relative), as in the FITS PSi_ma keyword. * * int m * (Given) Parameter number (non-negative), as in the FITS PSi_ma keyword. * * char value[72] * (Given) Parameter value. * * * wtbarr struct - Extraction of coordinate lookup tables from BINTABLE * -------------------------------------------------------------------- * Function wcstab(), which is invoked automatically by wcspih(), sets up an * array of wtbarr structs to assist in extracting coordinate lookup tables * from a binary table extension (BINTABLE) and copying them into the tabprm * structs stored in wcsprm. Refer to the usage notes for wcspih() and * wcstab() in wcshdr.h, and also the prologue to tab.h. * * For C++ usage, because of a name space conflict with the wtbarr typedef * defined in CFITSIO header fitsio.h, the wtbarr struct is renamed to wtbarr_s * by preprocessor macro substitution with scope limited to wcs.h itself. * * int i * (Given) Image axis number. * * int m * (Given) wcstab array axis number for index vectors. * * int kind * (Given) Character identifying the wcstab array type: * - c: coordinate array, * - i: index vector. * * char extnam[72] * (Given) EXTNAME identifying the binary table extension. * * int extver * (Given) EXTVER identifying the binary table extension. * * int extlev * (Given) EXTLEV identifying the binary table extension. * * char ttype[72] * (Given) TTYPEn identifying the column of the binary table that contains * the wcstab array. * * long row * (Given) Table row number. * * int ndim * (Given) Expected dimensionality of the wcstab array. * * int *dimlen * (Given) Address of the first element of an array of int of length ndim * into which the wcstab array axis lengths are to be written. * * double **arrayp * (Given) Pointer to an array of double which is to be allocated by the * user and into which the wcstab array is to be written. * * * Global variable: const char *wcs_errmsg[] - Status return messages * ------------------------------------------------------------------ * Error messages to match the status value returned from each function. * *===========================================================================*/ #ifndef WCSLIB_WCS #define WCSLIB_WCS #include "lin.h" #include "cel.h" #include "spc.h" #ifdef __cplusplus extern "C" { #endif #define WCSSUB_LONGITUDE 0x1001 #define WCSSUB_LATITUDE 0x1002 #define WCSSUB_CUBEFACE 0x1004 #define WCSSUB_CELESTIAL 0x1007 #define WCSSUB_SPECTRAL 0x1008 #define WCSSUB_STOKES 0x1010 #define WCSCOMPARE_ANCILLARY 0x0001 #define WCSCOMPARE_TILING 0x0002 #define WCSCOMPARE_CRPIX 0x0004 extern const char *wcs_errmsg[]; enum wcs_errmsg_enum { WCSERR_SUCCESS = 0, /* Success. */ WCSERR_NULL_POINTER = 1, /* Null wcsprm pointer passed. */ WCSERR_MEMORY = 2, /* Memory allocation failed. */ WCSERR_SINGULAR_MTX = 3, /* Linear transformation matrix is singular. */ WCSERR_BAD_CTYPE = 4, /* Inconsistent or unrecognized coordinate axis type. */ WCSERR_BAD_PARAM = 5, /* Invalid parameter value. */ WCSERR_BAD_COORD_TRANS = 6, /* Unrecognized coordinate transformation parameter. */ WCSERR_ILL_COORD_TRANS = 7, /* Ill-conditioned coordinate transformation parameter. */ WCSERR_BAD_PIX = 8, /* One or more of the pixel coordinates were invalid. */ WCSERR_BAD_WORLD = 9, /* One or more of the world coordinates were invalid. */ WCSERR_BAD_WORLD_COORD = 10, /* Invalid world coordinate. */ WCSERR_NO_SOLUTION = 11, /* No solution found in the specified interval. */ WCSERR_BAD_SUBIMAGE = 12, /* Invalid subimage specification. */ WCSERR_NON_SEPARABLE = 13 /* Non-separable subimage coordinate system. */ }; /* Struct used for storing PVi_ma keywords. */ struct pvcard { int i; /* Axis number, as in PVi_ma (1-relative). */ int m; /* Parameter number, ditto (0-relative). */ double value; /* Parameter value. */ }; /* Size of the pvcard struct in int units, used by the Fortran wrappers. */ #define PVLEN (sizeof(struct pvcard)/sizeof(int)) /* Struct used for storing PSi_ma keywords. */ struct pscard { int i; /* Axis number, as in PSi_ma (1-relative). */ int m; /* Parameter number, ditto (0-relative). */ char value[72]; /* Parameter value. */ }; /* Size of the pscard struct in int units, used by the Fortran wrappers. */ #define PSLEN (sizeof(struct pscard)/sizeof(int)) /* For extracting wcstab arrays. Matches */ /* the wtbarr typedef defined in CFITSIO */ /* header fitsio.h. */ #ifdef __cplusplus #define wtbarr wtbarr_s /* See prologue above. */ #endif struct wtbarr { int i; /* Image axis number. */ int m; /* Array axis number for index vectors. */ int kind; /* wcstab array type. */ char extnam[72]; /* EXTNAME of binary table extension. */ int extver; /* EXTVER of binary table extension. */ int extlev; /* EXTLEV of binary table extension. */ char ttype[72]; /* TTYPEn of column containing the array. */ long row; /* Table row number. */ int ndim; /* Expected wcstab array dimensionality. */ int *dimlen; /* Where to write the array axis lengths. */ double **arrayp; /* Where to write the address of the array */ /* allocated to store the wcstab array. */ }; struct wcsprm { /* Initialization flag (see the prologue above). */ /*------------------------------------------------------------------------*/ int flag; /* Set to zero to force initialization. */ /* FITS header keyvalues to be provided (see the prologue above). */ /*------------------------------------------------------------------------*/ int naxis; /* Number of axes (pixel and coordinate). */ double *crpix; /* CRPIXja keyvalues for each pixel axis. */ double *pc; /* PCi_ja linear transformation matrix. */ double *cdelt; /* CDELTia keyvalues for each coord axis. */ double *crval; /* CRVALia keyvalues for each coord axis. */ char (*cunit)[72]; /* CUNITia keyvalues for each coord axis. */ char (*ctype)[72]; /* CTYPEia keyvalues for each coord axis. */ double lonpole; /* LONPOLEa keyvalue. */ double latpole; /* LATPOLEa keyvalue. */ double restfrq; /* RESTFRQa keyvalue. */ double restwav; /* RESTWAVa keyvalue. */ int npv; /* Number of PVi_ma keywords, and the */ int npvmax; /* number for which space was allocated. */ struct pvcard *pv; /* PVi_ma keywords for each i and m. */ int nps; /* Number of PSi_ma keywords, and the */ int npsmax; /* number for which space was allocated. */ struct pscard *ps; /* PSi_ma keywords for each i and m. */ /* Alternative header keyvalues (see the prologue above). */ /*------------------------------------------------------------------------*/ double *cd; /* CDi_ja linear transformation matrix. */ double *crota; /* CROTAia keyvalues for each coord axis. */ int altlin; /* Alternative representations */ /* Bit 0: PCi_ja is present, */ /* Bit 1: CDi_ja is present, */ /* Bit 2: CROTAia is present. */ int velref; /* AIPS velocity code, VELREF. */ /* Auxiliary coordinate system information, not used by WCSLIB. */ char alt[4]; int colnum; int *colax; char (*cname)[72]; double *crder; double *csyer; char dateavg[72]; char dateobs[72]; double equinox; double mjdavg; double mjdobs; double obsgeo[3]; char radesys[72]; char specsys[72]; char ssysobs[72]; double velosys; double zsource; char ssyssrc[72]; double velangl; char wcsname[72]; /* Coordinate lookup tables (see the prologue above). */ /*------------------------------------------------------------------------*/ int ntab; /* Number of separate tables. */ int nwtb; /* Number of wtbarr structs. */ struct tabprm *tab; /* Tabular transformation parameters. */ struct wtbarr *wtb; /* Array of wtbarr structs. */ /* Information derived from the FITS header keyvalues by wcsset(). */ /*------------------------------------------------------------------------*/ char lngtyp[8], lattyp[8]; /* Celestial axis types, e.g. RA, DEC. */ int lng, lat, spec; /* Longitude, latitude and spectral axis */ /* indices (0-relative). */ int cubeface; /* True if there is a CUBEFACE axis. */ int *types; /* Coordinate type codes for each axis. */ void *padding; /* (Dummy inserted for alignment purposes.) */ struct linprm lin; /* Linear transformation parameters. */ struct celprm cel; /* Celestial transformation parameters. */ struct spcprm spc; /* Spectral transformation parameters. */ /* Error handling, if enabled. */ /*------------------------------------------------------------------------*/ struct wcserr *err; /* Private - the remainder are for memory management. */ /*------------------------------------------------------------------------*/ void *m_padding; int m_flag, m_naxis; double *m_crpix, *m_pc, *m_cdelt, *m_crval; char (*m_cunit)[72], (*m_ctype)[72]; struct pvcard *m_pv; struct pscard *m_ps; double *m_cd, *m_crota; int *m_colax; char (*m_cname)[72]; double *m_crder, *m_csyer; struct tabprm *m_tab; struct wtbarr *m_wtb; }; /* Size of the wcsprm struct in int units, used by the Fortran wrappers. */ #define WCSLEN (sizeof(struct wcsprm)/sizeof(int)) int wcsnpv(int n); int wcsnps(int n); int wcsini(int alloc, int naxis, struct wcsprm *wcs); int wcssub(int alloc, const struct wcsprm *wcssrc, int *nsub, int axes[], struct wcsprm *wcsdst); int wcscompare(int cmp, double tol, const struct wcsprm *wcs1, const struct wcsprm *wcs2, int *equal); int wcsfree(struct wcsprm *wcs); int wcsprt(const struct wcsprm *wcs); int wcsperr(const struct wcsprm *wcs, const char *prefix); int wcsbchk(struct wcsprm *wcs, int bounds); int wcsset(struct wcsprm *wcs); int wcsp2s(struct wcsprm *wcs, int ncoord, int nelem, const double pixcrd[], double imgcrd[], double phi[], double theta[], double world[], int stat[]); int wcss2p(struct wcsprm *wcs, int ncoord, int nelem, const double world[], double phi[], double theta[], double imgcrd[], double pixcrd[], int stat[]); int wcsmix(struct wcsprm *wcs, int mixpix, int mixcel, const double vspan[], double vstep, int viter, double world[], double phi[], double theta[], double imgcrd[], double pixcrd[]); int wcssptr(struct wcsprm *wcs, int *i, char ctype[9]); const char* wcslib_version(int vers[3]); /* Defined mainly for backwards compatibility, use wcssub() instead. */ #define wcscopy(alloc, wcssrc, wcsdst) wcssub(alloc, wcssrc, 0x0, 0x0, wcsdst) /* Deprecated. */ #define wcsini_errmsg wcs_errmsg #define wcssub_errmsg wcs_errmsg #define wcscopy_errmsg wcs_errmsg #define wcsfree_errmsg wcs_errmsg #define wcsprt_errmsg wcs_errmsg #define wcsset_errmsg wcs_errmsg #define wcsp2s_errmsg wcs_errmsg #define wcss2p_errmsg wcs_errmsg #define wcsmix_errmsg wcs_errmsg #ifdef __cplusplus #undef wtbarr } #endif #endif /* WCSLIB_WCS */ astropy-1.1.1/cextern/wcslib/C/dis.c0000644001134200020070000026663112644017723020203 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: dis.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include #include "wcserr.h" #include "wcsprintf.h" #include "wcsutil.h" #include "dis.h" const int DISSET = 137; const int DIS_TPD = 1; const int DIS_POLYNOMIAL = 2; const int DIS_DOTPD = 1024; /* Maximum number of DPja or DQia keywords. */ int NDPMAX = 256; /* Map status return value to message. */ const char *dis_errmsg[] = { "Success", "Null disprm pointer passed", "Memory allocation failed", "Invalid parameter value", "Distort error", "De-distort error"}; /* Convenience macro for invoking wcserr_set(). */ #define DIS_ERRMSG(status) WCSERR_SET(status), dis_errmsg[status] /* Internal helper functions, not for general use. */ static int polyset(int j, struct disprm *dis); static int tpdset(int j, struct disprm *dis); static int pol2tpd(int j, struct disprm *dis); static int tpvset(int j, struct disprm *dis); static int sipset(int j, struct disprm *dis); static int dssset(int j, struct disprm *dis); static int watset(int j, struct disprm *dis); static int cheleg(int type, int m, int n, double coeffm[], double coeffn[]); static int dispoly(DISP2X_ARGS); static int tpd1(DISP2X_ARGS); static int tpd2(DISP2X_ARGS); static int tpd3(DISP2X_ARGS); static int tpd4(DISP2X_ARGS); static int tpd5(DISP2X_ARGS); static int tpd6(DISP2X_ARGS); static int tpd7(DISP2X_ARGS); static int tpd8(DISP2X_ARGS); static int tpd9(DISP2X_ARGS); /* The first four iparm indices have meanings common to all distortion */ /* functions. They are used by disp2x(), disx2p(), disprt(), and dishdo(). */ #define I_DTYPE 0 /* Distortion type code. */ #define I_NIPARM 1 /* Full (allocated) length of iparm[]. */ #define I_NDPARM 2 /* No. of parameters in dparm[], excl. work space. */ #define I_DOCORR 3 /* True if distortion func computes a correction. */ /*--------------------------------------------------------------------------*/ int disndp(int ndpmax) { if (ndpmax >= 0) NDPMAX = ndpmax; return NDPMAX; } /*--------------------------------------------------------------------------*/ int dpfill( struct dpkey *dp, const char *keyword, const char *field, int j, int type, int i, double f) { char axno[8], *cp; if (keyword) { if (field) { if (j && 2 <= strlen(keyword)) { /* Fill in the axis number from the value given. */ if (keyword[2] == '\0') { sprintf(dp->field, "%s%d.%s", keyword, j, field); } else { /* Take care not to overwrite any alternate code. */ sprintf(dp->field, "%s.%s", keyword, field); sprintf(axno, "%d", j); dp->field[2] = axno[0]; } } else { sprintf(dp->field, "%s.%s", keyword, field); } } else { strcpy(dp->field, keyword); } } else if (field) { strcpy(dp->field, field); } if (j) { dp->j = j; } else { /* The field name must either be given or preset. */ if ((cp = strpbrk(dp->field, "0123456789")) != 0x0) { sscanf(cp, "%d.", &(dp->j)); } } if ((dp->type = type)) { dp->value.f = f; } else { dp->value.i = i; } return 0; } /*--------------------------------------------------------------------------*/ int disini(int alloc, int naxis, struct disprm *dis) { static const char *function = "disini"; struct wcserr **err; if (dis == 0x0) return DISERR_NULL_POINTER; /* Initialize error message handling. */ err = &(dis->err); if (dis->flag != -1) { if (dis->err) free(dis->err); } dis->err = 0x0; /* Initialize pointers. */ if (dis->flag == -1 || dis->m_flag != DISSET) { if (dis->flag == -1) { dis->axmap = 0x0; dis->Nhat = 0x0; dis->offset = 0x0; dis->scale = 0x0; dis->iparm = 0x0; dis->dparm = 0x0; dis->disp2x = 0x0; dis->disx2p = 0x0; dis->tmpmem = 0x0; dis->i_naxis = 0; } /* Initialize memory management. */ dis->m_flag = 0; dis->m_naxis = 0; dis->m_dtype = 0x0; dis->m_dp = 0x0; dis->m_maxdis = 0x0; } if (naxis < 0) { return wcserr_set(WCSERR_SET(DISERR_MEMORY), "naxis must not be negative (got %d)", naxis); } /* Allocate memory for arrays if required. */ if (alloc || dis->dtype == 0x0 || (NDPMAX && dis->dp == 0x0) || dis->maxdis == 0x0) { /* Was sufficient allocated previously? */ if (dis->m_flag == DISSET && (dis->m_naxis < naxis || dis->ndpmax < NDPMAX)) { /* No, free it. */ disfree(dis); } if (alloc || dis->dtype == 0x0) { if (dis->m_dtype) { /* In case the caller fiddled with it. */ dis->dtype = dis->m_dtype; } else { if ((dis->dtype = calloc(naxis, sizeof(char [72]))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } dis->m_flag = DISSET; dis->m_naxis = naxis; dis->m_dtype = dis->dtype; } } if (alloc || dis->dp == 0x0) { if (dis->m_dp) { /* In case the caller fiddled with it. */ dis->dp = dis->m_dp; } else { if (NDPMAX) { if ((dis->dp = calloc(NDPMAX, sizeof(struct dpkey))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } } else { dis->dp = 0x0; } dis->ndpmax = NDPMAX; dis->m_flag = DISSET; dis->m_naxis = naxis; dis->m_dp = dis->dp; } } if (alloc || dis->maxdis == 0x0) { if (dis->m_maxdis) { /* In case the caller fiddled with it. */ dis->maxdis = dis->m_maxdis; } else { if ((dis->maxdis = calloc(naxis, sizeof(double))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } dis->m_flag = DISSET; dis->m_naxis = naxis; dis->m_maxdis = dis->maxdis; } } } /* Set defaults. */ dis->flag = 0; dis->naxis = naxis; memset(dis->dtype, 0, naxis*sizeof(char [72])); dis->ndp = 0; memset(dis->dp, 0, NDPMAX*sizeof(struct dpkey)); memset(dis->maxdis, 0, naxis*sizeof(double)); dis->totdis = 0.0; return 0; } /*--------------------------------------------------------------------------*/ int discpy(int alloc, const struct disprm *dissrc, struct disprm *disdst) { static const char *function = "discpy"; int naxis, ndp, status; struct wcserr **err; if (dissrc == 0x0) return DISERR_NULL_POINTER; if (disdst == 0x0) return DISERR_NULL_POINTER; err = &(disdst->err); naxis = dissrc->naxis; if (naxis < 1) { return wcserr_set(WCSERR_SET(DISERR_MEMORY), "naxis must be positive (got %d)", naxis); } ndp = NDPMAX; NDPMAX = dissrc->ndpmax; if ((status = disini(alloc, naxis, disdst))) { return status; } NDPMAX = ndp; memcpy(disdst->dtype, dissrc->dtype, naxis*sizeof(char [72])); disdst->ndp = dissrc->ndp; memcpy(disdst->dp, dissrc->dp, dissrc->ndpmax*sizeof(struct dpkey)); memcpy(disdst->maxdis, dissrc->maxdis, naxis*sizeof(double)); disdst->totdis = dissrc->totdis; return 0; } /*--------------------------------------------------------------------------*/ int disfree(struct disprm *dis) { int j; if (dis == 0x0) return DISERR_NULL_POINTER; if (dis->flag != -1) { /* Optionally allocated by disini() for given parameters. */ if (dis->m_flag == DISSET) { if (dis->dtype == dis->m_dtype) dis->dtype = 0x0; if (dis->dp == dis->m_dp) dis->dp = 0x0; if (dis->maxdis == dis->m_maxdis) dis->maxdis = 0x0; if (dis->m_dtype) free(dis->m_dtype); if (dis->m_dp) free(dis->m_dp); if (dis->m_maxdis) free(dis->m_maxdis); } /* Recall that these were allocated in bulk by disset(). */ if (dis->axmap && dis->axmap[0]) free(dis->axmap[0]); if (dis->offset && dis->offset[0]) free(dis->offset[0]); if (dis->scale && dis->scale[0]) free(dis->scale[0]); if (dis->axmap) free(dis->axmap); if (dis->Nhat) free(dis->Nhat); if (dis->offset) free(dis->offset); if (dis->scale) free(dis->scale); for (j = 0; j < dis->i_naxis; j++) { if (dis->iparm[j]) free(dis->iparm[j]); if (dis->dparm[j]) free(dis->dparm[j]); } if (dis->iparm) free(dis->iparm); if (dis->dparm) free(dis->dparm); if (dis->disp2x) free(dis->disp2x); if (dis->disx2p) free(dis->disx2p); if (dis->tmpmem) free(dis->tmpmem); if (dis->err) free(dis->err); } dis->m_flag = 0; dis->m_naxis = 0; dis->m_dtype = 0x0; dis->m_dp = 0x0; dis->m_maxdis = 0x0; dis->axmap = 0x0; dis->Nhat = 0x0; dis->offset = 0x0; dis->scale = 0x0; dis->iparm = 0x0; dis->dparm = 0x0; dis->disp2x = 0x0; dis->disx2p = 0x0; dis->tmpmem = 0x0; dis->err = 0x0; dis->flag = 0; return 0; } /*--------------------------------------------------------------------------*/ int disprt(const struct disprm *dis) { char hext[32]; int i, j, jhat, k, naxis; if (dis == 0x0) return DISERR_NULL_POINTER; if (dis->flag != DISSET) { wcsprintf("The disprm struct is UNINITIALIZED.\n"); return 0; } naxis = dis->naxis; wcsprintf(" flag: %d\n", dis->flag); /* Parameters supplied. */ wcsprintf(" naxis: %d\n", naxis); WCSPRINTF_PTR(" dtype: ", dis->dtype, "\n"); for (j = 0; j < naxis; j++) { wcsprintf(" \"%s\"\n", dis->dtype[j]); } wcsprintf(" ndp: %d\n", dis->ndp); wcsprintf(" ndpmax: %d\n", dis->ndpmax); WCSPRINTF_PTR(" dp: ", dis->dp, "\n"); for (i = 0; i < dis->ndp; i++) { if (dis->dp[i].type) { wcsprintf(" %3d%3d %#- 11.5g %.32s\n", dis->dp[i].j, dis->dp[i].type, dis->dp[i].value.f, dis->dp[i].field); } else { wcsprintf(" %3d%3d %11d %.32s\n", dis->dp[i].j, dis->dp[i].type, dis->dp[i].value.i, dis->dp[i].field); } } WCSPRINTF_PTR(" maxdis: ", dis->maxdis, "\n"); wcsprintf(" "); for (j = 0; j < naxis; j++) { wcsprintf(" %#- 11.5g", dis->maxdis[j]); } wcsprintf("\n"); wcsprintf(" totdis: %#- 11.5g\n", dis->totdis); /* Derived values. */ WCSPRINTF_PTR(" axmap: ", dis->axmap, "\n"); for (j = 0; j < naxis; j++) { wcsprintf(" axmap[%d][]:", j); for (jhat = 0; jhat < naxis; jhat++) { wcsprintf("%6d", dis->axmap[j][jhat]); } wcsprintf("\n "); for (jhat = naxis; jhat < 2*naxis; jhat++) { wcsprintf("%6d", dis->axmap[j][jhat]); } wcsprintf("\n"); } WCSPRINTF_PTR(" Nhat: ", dis->Nhat, "\n"); wcsprintf(" "); for (j = 0; j < naxis; j++) { wcsprintf("%6d", dis->Nhat[j]); } wcsprintf("\n"); WCSPRINTF_PTR(" offset: ", dis->offset, "\n"); for (j = 0; j < naxis; j++) { wcsprintf("offset[%d][]:", j); for (jhat = 0; jhat < naxis; jhat++) { wcsprintf(" %#- 11.5g", dis->offset[j][jhat]); } wcsprintf("\n"); } WCSPRINTF_PTR(" scale: ", dis->scale, "\n"); for (j = 0; j < naxis; j++) { wcsprintf(" scale[%d][]:", j); for (jhat = 0; jhat < naxis; jhat++) { wcsprintf(" %#- 11.5g", dis->scale[j][jhat]); } wcsprintf("\n"); } WCSPRINTF_PTR(" iparm: ", dis->iparm, "\n"); for (j = 0; j < naxis; j++) { wcsprintf(" iparm[%d] : ", j); WCSPRINTF_PTR("", dis->iparm[j], "\n"); if (dis->iparm[j]) { wcsprintf(" iparm[%d][]:", j); for (k = 0; k < dis->iparm[j][I_NIPARM]; k++) { if (k && k%5 == 0) { wcsprintf("\n "); } wcsprintf(" %11d", dis->iparm[j][k]); } wcsprintf("\n"); } } WCSPRINTF_PTR(" dparm: ", dis->dparm, "\n"); for (j = 0; j < naxis; j++) { wcsprintf(" dparm[%d] : ", j); WCSPRINTF_PTR("", dis->dparm[j], "\n"); if (dis->dparm[j]) { wcsprintf(" dparm[%d][]:", j); for (k = 0; k < dis->iparm[j][I_NDPARM]; k++) { if (k && k%5 == 0) { wcsprintf("\n "); } wcsprintf(" %#- 11.5g", dis->dparm[j][k]); } wcsprintf("\n"); } } wcsprintf(" i_naxis: %d\n", dis->i_naxis); wcsprintf(" ndis: %d\n", dis->ndis); /* Error handling. */ WCSPRINTF_PTR(" err: ", dis->err, "\n"); if (dis->err) { wcserr_prt(dis->err, " "); } /* Work arrays. */ WCSPRINTF_PTR(" disp2x: ", dis->disp2x, "\n"); for (j = 0; j < naxis; j++) { wcsprintf(" disp2x[%d]: %s", j, wcsutil_fptr2str((int (*)(void))dis->disp2x[j], hext)); if (dis->disp2x[j] == dispoly) { wcsprintf(" (= dispoly)\n"); } else if (dis->disp2x[j] == tpd1) { wcsprintf(" (= tpd1)\n"); } else if (dis->disp2x[j] == tpd2) { wcsprintf(" (= tpd2)\n"); } else if (dis->disp2x[j] == tpd3) { wcsprintf(" (= tpd3)\n"); } else if (dis->disp2x[j] == tpd4) { wcsprintf(" (= tpd4)\n"); } else if (dis->disp2x[j] == tpd5) { wcsprintf(" (= tpd5)\n"); } else if (dis->disp2x[j] == tpd6) { wcsprintf(" (= tpd6)\n"); } else if (dis->disp2x[j] == tpd7) { wcsprintf(" (= tpd7)\n"); } else if (dis->disp2x[j] == tpd8) { wcsprintf(" (= tpd8)\n"); } else if (dis->disp2x[j] == tpd9) { wcsprintf(" (= tpd9)\n"); } else { wcsprintf("\n"); } } WCSPRINTF_PTR(" disx2p: ", dis->disx2p, "\n"); for (j = 0; j < naxis; j++) { wcsprintf(" disx2p[%d]: %s\n", j, wcsutil_fptr2str((int (*)(void))dis->disx2p[j], hext)); } WCSPRINTF_PTR(" tmpmem: ", dis->tmpmem, "\n"); /* Memory management. */ wcsprintf(" m_flag: %d\n", dis->m_flag); wcsprintf(" m_naxis: %d\n", dis->m_naxis); WCSPRINTF_PTR(" m_dtype: ", dis->m_dtype, ""); if (dis->m_dtype == dis->dtype) wcsprintf(" (= dtype)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_dp: ", dis->m_dp, ""); if (dis->m_dp == dis->dp) wcsprintf(" (= dp)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_maxdis: ", dis->m_maxdis, ""); if (dis->m_maxdis == dis->maxdis) wcsprintf(" (= maxdis)"); wcsprintf("\n"); return 0; } /*--------------------------------------------------------------------------*/ int disperr(const struct disprm *dis, const char *prefix) { if (dis == 0x0) return DISERR_NULL_POINTER; if (dis->err) { wcserr_prt(dis->err, prefix); } return 0; } /*--------------------------------------------------------------------------*/ int dishdo(struct disprm *dis) { static const char *function = "dishdo"; int j, status; struct wcserr **err; if (dis == 0x0) return DISERR_NULL_POINTER; err = &(dis->err); status = 0; for (j = 0; j < dis->naxis; j++) { if (dis->iparm[j][I_DTYPE]) { if (dis->iparm[j][I_DTYPE] == DIS_TPD) { /* Implemented as TPD... */ if (strcmp(dis->dtype[j], "TPD") != 0) { /* ... but isn't TPD. */ dis->iparm[j][I_DTYPE] |= DIS_DOTPD; } } else { /* Must be a Polynomial that can't be implemented as TPD. */ status = wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Translation of %s to TPD is not possible", dis->dtype[j]); } } } return status; } /*--------------------------------------------------------------------------*/ int disset(struct disprm *dis) { static const char *function = "disset"; char *dpq, *fp; int idp, j, jhat, k, naxis, ndis, Nhat, status; struct dpkey *keyp; struct wcserr **err; if (dis == 0x0) return DISERR_NULL_POINTER; err = &(dis->err); naxis = dis->naxis; /* Do basic checks. */ if (dis->ndp < 0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "disprm::ndp is negative (%d)", dis->ndp); } ndis = 0; for (j = 0; j < naxis; j++) { if (strlen(dis->dtype[j])) { ndis++; break; } } if (dis->ndp) { /* Is it prior or sequent? */ if (dis->dp[0].field[1] == 'P') { dpq = "DPja"; } else if (dis->dp[0].field[1] == 'Q') { dpq = "DQia"; } else { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "disprm::dp[0].field (%s) is invalid", dis->dp[0].field); } } else { if (ndis) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "No DPja or DQia keywords, NAXES at least is required for each " "distortion"); } } /* Allocate memory for derived parameters and work arrays. */ if (dis->i_naxis < naxis) { if (dis->i_naxis) { /* Recall that axmap, offset, and scale are allocated in bulk. */ free(dis->axmap[0]); free(dis->axmap); free(dis->Nhat); free(dis->offset[0]); free(dis->offset); free(dis->scale[0]); free(dis->scale); for (j = 0; j < dis->i_naxis; j++) { /* Memory allocated separately for each axis. */ if (dis->iparm[j]) free(dis->iparm[j]); if (dis->dparm[j]) free(dis->dparm[j]); } free(dis->iparm); free(dis->dparm); free(dis->disp2x); free(dis->disx2p); free(dis->tmpmem); } if ((dis->axmap = calloc(naxis, sizeof(int *))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } /* Allocate axmap[][] in bulk and then carve it up. */ if ((dis->axmap[0] = calloc(2*naxis*naxis, sizeof(int))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } for (j = 1; j < naxis; j++) { dis->axmap[j] = dis->axmap[j-1] + 2*naxis; } if ((dis->Nhat = calloc(naxis, sizeof(int *))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } if ((dis->offset = calloc(naxis, sizeof(double *))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } /* Allocate offset[][] in bulk and then carve it up. */ if ((dis->offset[0] = calloc(naxis*naxis, sizeof(double))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } for (j = 1; j < naxis; j++) { dis->offset[j] = dis->offset[j-1] + naxis; } if ((dis->scale = calloc(naxis, sizeof(double *))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } /* Allocate scale[][] in bulk and then carve it up. */ if ((dis->scale[0] = calloc(naxis*naxis, sizeof(double))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } for (j = 1; j < naxis; j++) { dis->scale[j] = dis->scale[j-1] + naxis; } if ((dis->iparm = calloc(naxis, sizeof(int *))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } if ((dis->dparm = calloc(naxis, sizeof(double *))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } if ((dis->disp2x = calloc(naxis, sizeof(int (*)(DISP2X_ARGS)))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } if ((dis->disx2p = calloc(naxis, sizeof(int (*)(DISX2P_ARGS)))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } if ((dis->tmpmem = calloc(5*naxis, sizeof(double))) == 0x0) { disfree(dis); return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } dis->i_naxis = naxis; } /* Start with a clean slate. */ for (jhat = 0; jhat < 2*naxis*naxis; jhat++) { dis->axmap[0][jhat] = -1; } memset(dis->Nhat, 0, naxis*sizeof(int)); memset(dis->offset[0], 0, naxis*naxis*sizeof(double)); for (jhat = 0; jhat < naxis*naxis; jhat++) { dis->scale[0][jhat] = 1.0; } /* polyset() etc. must look after iparm[][] and dparm[][]. */ dis->i_naxis = naxis; dis->ndis = 0; memset(dis->disp2x, 0, naxis*sizeof(int (*)(DISP2X_ARGS))); memset(dis->disx2p, 0, naxis*sizeof(int (*)(DISX2P_ARGS))); memset(dis->tmpmem, 0, naxis*sizeof(double)); /* Handle DPja or DQia keywords common to all distortions. */ keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { /* Check that they're all one kind or the other. */ if (keyp->field[1] != dpq[1]) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "disprm::dp appears to contain a mix of DPja and DQia keys"); } j = keyp->j; if (j < 1 || naxis < j) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid axis number (%d) in %s", j, keyp->field); } if ((fp = strchr(keyp->field, '.')) == 0x0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid record field name: %s", j, keyp->field); } fp++; j--; if (strncmp(fp, "NAXES", 6) == 0) { Nhat = wcsutil_dpkey_int(keyp); if (Nhat < 0 || naxis < Nhat) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid value of Nhat for %s distortion in %s: %d", dis->dtype[j], keyp->field, Nhat); } dis->Nhat[j] = Nhat; } else if (strncmp(fp, "AXIS.", 5) == 0) { sscanf(fp+5, "%d", &jhat); if (jhat < 1 || naxis < jhat) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid axis in axis map for %s distortion in %s: %d", dis->dtype[j], keyp->field, jhat); } /* N.B. axis numbers in the map are 0-relative. */ dis->axmap[j][jhat-1] = wcsutil_dpkey_int(keyp) - 1; } else if (strncmp(fp, "OFFSET.", 7) == 0) { sscanf(fp+7, "%d", &jhat); dis->offset[j][jhat-1] = wcsutil_dpkey_double(keyp); } else if (strncmp(fp, "SCALE.", 6) == 0) { sscanf(fp+6, "%d", &jhat); dis->scale[j][jhat-1] = wcsutil_dpkey_double(keyp); } /* DOCORR should also be handled here but no space was provided for it in disprm. */ } /* Set defaults and do sanity checks on axmap[][]. */ for (j = 0; j < naxis; j++) { if (strlen(dis->dtype[j]) == 0) { /* No distortion on this axis, check that there are no parameters. */ keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j == j+1) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "No distortion type, yet %s keyvalues are present for axis %d", dpq, j+1); } } continue; } /* N.B. NAXES (Nhat) has no default value. */ if (dis->Nhat[j] <= 0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "%s.NAXES was not set (or bad) for %s distortion on axis %d", dpq, dis->dtype[j], j+1); } /* Set defaults for axmap[][]. */ Nhat = dis->Nhat[j]; for (jhat = 0; jhat < Nhat; jhat++) { if (dis->axmap[j][jhat] == -1) { dis->axmap[j][jhat] = jhat; } } /* Sanity check on the length of the axis map. */ Nhat = 0; for (jhat = 0; jhat < naxis; jhat++) { if (dis->axmap[j][jhat] != -1) Nhat = jhat+1; } if (Nhat != dis->Nhat[j]) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Mismatch in length of axis map for %s distortion on axis %d", dis->dtype[j], j+1); } /* Check uniqueness of entries in the axis map. */ for (jhat = 0; jhat < Nhat; jhat++) { for (k = 0; k < jhat; k++) { if (dis->axmap[j][jhat] == dis->axmap[j][k]) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Duplicated entry in axis map for %s distortion on axis %d", dis->dtype[j], j+1); } } } /* Construct the inverse axis map. */ for (jhat = 0; jhat < Nhat; jhat++) { k = naxis + dis->axmap[j][jhat]; dis->axmap[j][k] = jhat; } } /* Identify the distortion functions. */ ndis = 0; for (j = 0; j < naxis; j++) { if (strlen(dis->dtype[j]) == 0) { /* No distortion on this axis. */ continue; } if (dis->Nhat[j] == 0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Empty axis map for %s distortion on axis %d", dis->dtype[j], j+1); } /* Invoke the specific setup functions for each distortion. */ if (strcmp(dis->dtype[j], "TPD") == 0) { /* Template Polynomial Distortion. */ if ((status = tpdset(j, dis))) { /* (Preserve the error message set by tpdset().) */ return status; } } else if (strcmp(dis->dtype[j], "TPV") == 0) { /* TPV "projection". */ if ((status = tpvset(j, dis))) { /* (Preserve the error message set by tpvset().) */ return status; } } else if (strcmp(dis->dtype[j], "SIP") == 0) { /* Simple Imaging Polynomial (SIP). */ if ((status = sipset(j, dis))) { /* (Preserve the error message set by sipset().) */ return status; } } else if (strcmp(dis->dtype[j], "DSS") == 0) { /* Digitized Sky Survey (DSS). */ if ((status = dssset(j, dis))) { /* (Preserve the error message set by dssset().) */ return status; } } else if (strncmp(dis->dtype[j], "WAT", 3) == 0) { /* WAT (TNX or ZPX "projections"). */ if ((status = watset(j, dis))) { /* (Preserve the error message set by watset().) */ return status; } } else if (strcmp(dis->dtype[j], "Polynomial") == 0 || strcmp(dis->dtype[j], "Polynomial*") == 0) { /* General polynomial distortion. */ if ((status = polyset(j, dis))) { /* (Preserve the error message set by polyset().) */ return status; } } else { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Unrecognized/unimplemented distortion function: %s", dis->dtype[j]); } ndis++; } dis->ndis = ndis; dis->flag = DISSET; return 0; } /*--------------------------------------------------------------------------*/ int disp2x( struct disprm *dis, const double rawcrd[], double discrd[]) { static const char *function = "disp2x"; int axisj, j, jhat, naxis, Nhat, status; double dtmp, *offset, *scale, *tmpcrd; struct wcserr **err; /* Initialize. */ if (dis == 0x0) return DISERR_NULL_POINTER; err = &(dis->err); if (dis->flag != DISSET) { if ((status = disset(dis))) return status; } naxis = dis->naxis; /* Invoke the distortion functions for each axis. */ tmpcrd = dis->tmpmem; for (j = 0; j < naxis; j++) { if (dis->disp2x[j]) { offset = dis->offset[j]; scale = dis->scale[j]; Nhat = dis->Nhat[j]; for (jhat = 0; jhat < Nhat; jhat++) { axisj = dis->axmap[j][jhat]; tmpcrd[jhat] = (rawcrd[axisj] - offset[jhat])*scale[jhat]; } if ((status = (dis->disp2x[j])(0, dis->iparm[j], dis->dparm[j], Nhat, tmpcrd, &dtmp))) { return wcserr_set(DIS_ERRMSG(DISERR_DISTORT)); } if (dis->iparm[j][I_DOCORR]) { /* Distortion function computes a correction. */ discrd[j] = rawcrd[j] + dtmp; } else { discrd[j] = dtmp; } } else { discrd[j] = rawcrd[j]; } } return 0; } /*--------------------------------------------------------------------------*/ /* This function is intended for debugging purposes only. */ /* No documentation or prototype is provided in dis.h. */ int disitermax(int itermax) { static int ITERMAX = 30; if (itermax >= 0) { ITERMAX = itermax; } return ITERMAX; } /*--------------------------------------------------------------------------*/ int disx2p( struct disprm *dis, const double discrd[], double rawcrd[]) { static const char *function = "disx2p"; const double TOL = 1.0e-13; int axisj, convergence, iter, itermax, j, jhat, naxis, Nhat, status; double dd, *dcrd0, *dcrd1, *delta, *offset, residual, *rcrd1, rtmp, *scale, *tmpcrd; struct wcserr **err; /* Initialize. */ if (dis == 0x0) return DISERR_NULL_POINTER; err = &(dis->err); naxis = dis->naxis; /* Carve up working memory, noting that disp2x() gets to it first. */ dcrd0 = dis->tmpmem + naxis; dcrd1 = dcrd0 + naxis; rcrd1 = dcrd1 + naxis; delta = rcrd1 + naxis; /* Zeroth approximation. The assumption here and below is that the */ /* distortion is small so that, to first order in the neighbourhood of */ /* the solution, discrd[j] ~= a + b*rawcrd[j], i.e. independent of */ /* rawcrd[i], where i != j. This is effectively equivalent to assuming */ /* that the distortion functions are separable to first order. */ /* Furthermore, a is assumed to be small, and b close to unity. */ memcpy(rawcrd, discrd, naxis*sizeof(double)); /* If available, use disprm::disx2p to improve the zeroth approximation. */ for (j = 0; j < naxis; j++) { if (dis->disx2p[j]) { offset = dis->offset[j]; scale = dis->scale[j]; tmpcrd = dis->tmpmem; Nhat = dis->Nhat[j]; for (jhat = 0; jhat < Nhat; jhat++) { axisj = dis->axmap[j][jhat]; tmpcrd[jhat] = (discrd[axisj] - offset[jhat])*scale[jhat]; } if ((status = (dis->disx2p[j])(1, dis->iparm[j], dis->dparm[j], Nhat, tmpcrd, &rtmp))) { return wcserr_set(DIS_ERRMSG(DISERR_DEDISTORT)); } if (dis->iparm[j][I_DOCORR]) { /* Inverse distortion function computes a correction. */ rawcrd[j] = discrd[j] + rtmp; } else { rawcrd[j] = rtmp; } } } /* Quick return debugging hook, assumes inverse functions were defined. */ if ((itermax = disitermax(-1)) == 0) { return 0; } /* Iteratively invert the (well-behaved!) distortion function. */ for (iter = 0; iter < itermax; iter++) { if ((status = disp2x(dis, rawcrd, dcrd0))) { return wcserr_set(DIS_ERRMSG(status)); } /* Check for convergence. */ convergence = 1; for (j = 0; j < naxis; j++) { delta[j] = discrd[j] - dcrd0[j]; if (fabs(discrd[j]) < 1.0) { dd = delta[j]; } else { /* TOL may be below the precision achievable from floating point */ /* subtraction, so switch to a fractional tolerance. */ dd = delta[j] / discrd[j]; } if (TOL < fabs(dd)) { /* No convergence yet on this axis. */ convergence = 0; } } if (convergence) break; /* Determine a suitable test point for computing the gradient. */ for (j = 0; j < naxis; j++) { /* Constrain the displacement. */ delta[j] /= 2.0; if (fabs(delta[j]) < 1.0e-6) { if (delta[j] < 0.0) { delta[j] = -1.0e-6; } else { delta[j] = 1.0e-6; } } else if (1.0 < fabs(delta[j])) { if (delta[j] < 0.0) { delta[j] = -1.0; } else { delta[j] = 1.0; } } } if (iter < itermax/2) { /* With the assumption of small distortions (as above), the gradient */ /* of discrd[j] should be dominated by the partial derivative with */ /* respect to rawcrd[j], and we can neglect partials with respect */ /* to rawcrd[i], where i != j. Thus only one test point is needed, */ /* not one for each axis. */ for (j = 0; j < naxis; j++) { rcrd1[j] = rawcrd[j] + delta[j]; } /* Compute discrd[] at the test point. */ if ((status = disp2x(dis, rcrd1, dcrd1))) { return wcserr_set(DIS_ERRMSG(status)); } /* Compute the next approximation. */ for (j = 0; j < naxis; j++) { rawcrd[j] += (discrd[j] - dcrd0[j]) * (delta[j]/(dcrd1[j] - dcrd0[j])); } } else { /* Convergence should not take more than seven or so iterations. As */ /* it is slow, try computing the gradient in full. */ memcpy(rcrd1, rawcrd, naxis*sizeof(double)); for (j = 0; j < naxis; j++) { rcrd1[j] += delta[j]; /* Compute discrd[] at the test point. */ if ((status = disp2x(dis, rcrd1, dcrd1))) { return wcserr_set(DIS_ERRMSG(status)); } /* Compute the next approximation. */ rawcrd[j] += (discrd[j] - dcrd0[j]) * (delta[j]/(dcrd1[j] - dcrd0[j])); rcrd1[j] -= delta[j]; } } } if (!convergence) { residual = 0.0; for (j = 0; j < naxis; j++) { dd = discrd[j] - dcrd0[j] ; residual += dd*dd; } residual = sqrt(residual); return wcserr_set(WCSERR_SET(DISERR_DEDISTORT), "Convergence not achieved after %d iterations, residual %#7.2g", iter, residual); } return 0; } /*--------------------------------------------------------------------------*/ int diswarp( struct disprm *dis, const double pixblc[], const double pixtrc[], const double pixsamp[], int *nsamp, double maxdis[], double *maxtot, double avgdis[], double *avgtot, double rmsdis[], double *rmstot) { static const char *function = "diswarp"; int carry, j, naxis, status = 0; double dpix, dpx2, dssq, *pix0, *pix1, *pixend, *pixinc, pixspan, *ssqdis, ssqtot, *sumdis, sumtot, totdis; struct wcserr **err; /* Initialize. */ if (dis == 0x0) return DISERR_NULL_POINTER; err = &(dis->err); naxis = dis->naxis; if (nsamp) *nsamp = 0; for (j = 0; j < naxis; j++) { if (maxdis) maxdis[j] = 0.0; if (avgdis) avgdis[j] = 0.0; if (rmsdis) rmsdis[j] = 0.0; } if (maxtot) *maxtot = 0.0; if (avgtot) *avgtot = 0.0; if (rmstot) *rmstot = 0.0; /* Quick return if no distortions. */ if (dis->ndis == 0) return 0; /* Carve up working memory, noting that disp2x() gets to it first. */ pixinc = dis->tmpmem + naxis; pixend = pixinc + naxis; sumdis = pixend + naxis; ssqdis = sumdis + naxis; /* Work out increments on each axis. */ for (j = 0; j < naxis; j++) { pixspan = pixtrc[j] - (pixblc ? pixblc[j] : 1.0); if (pixsamp == 0x0) { pixinc[j] = 1.0; } else if (pixsamp[j] == 0.0) { pixinc[j] = 1.0; } else if (pixsamp[j] > 0.0) { pixinc[j] = pixsamp[j]; } else if (pixsamp[j] > -1.5) { pixinc[j] = 2.0*pixspan; } else { pixinc[j] = pixspan / ((int)(-pixsamp[j] - 0.5)); } } /* Get some more memory for coordinate vectors. */ if ((pix0 = calloc(2*naxis, sizeof(double))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } pix1 = pix0 + naxis; /* Set up the array of pixel coordinates. */ for (j = 0; j < naxis; j++) { pix0[j] = pixblc ? pixblc[j] : 1.0; pixend[j] = pixtrc[j] + 0.5*pixinc[j]; } /* Initialize accumulators. */ for (j = 0; j < naxis; j++) { sumdis[j] = 0.0; ssqdis[j] = 0.0; } sumtot = 0.0; ssqtot = 0.0; /* Loop over N dimensions. */ carry = 0; while (carry == 0) { if ((status = disp2x(dis, pix0, pix1))) { /* (Preserve the error message set by disp2x().) */ goto cleanup; } /* Accumulate statistics. */ (*nsamp)++; dssq = 0.0; for (j = 0; j < naxis; j++) { dpix = pix1[j] - pix0[j]; dpx2 = dpix*dpix; sumdis[j] += dpix; ssqdis[j] += dpx2; if (maxdis && (dpix = fabs(dpix)) > maxdis[j]) { maxdis[j] = dpix; } dssq += dpx2; } totdis = sqrt(dssq); sumtot += totdis; ssqtot += totdis*totdis; if (maxtot && *maxtot < totdis) { *maxtot = totdis; } /* Next pixel. */ for (j = 0; j < naxis; j++) { pix0[j] += pixinc[j]; if (pix0[j] < pixend[j]) { carry = 0; break; } pix0[j] = pixblc ? pixblc[j] : 1.0; carry = 1; } } /* Compute the means and RMSs. */ for (j = 0; j < naxis; j++) { ssqdis[j] /= *nsamp; sumdis[j] /= *nsamp; if (avgdis) avgdis[j] = sumdis[j]; if (rmsdis) rmsdis[j] = sqrt(ssqdis[j] - sumdis[j]*sumdis[j]); } ssqtot /= *nsamp; sumtot /= *nsamp; if (avgtot) *avgtot = sumtot; if (rmstot) *rmstot = sqrt(ssqtot - sumtot*sumtot); cleanup: free(pix0); return status; } /*--------------------------------------------------------------------------*/ int polyset(int j, struct disprm *dis) { static const char *function = "polyset"; char *fp, id[32]; int i, idp, *iparm, ipow, ivar, jhat, k, K, lendp, m, M, naxis, ndparm, Nhat, niparm, nKparm, npow, nTparm, nVar, offset; double *dparm, *dptr, power; struct dpkey *keyp; struct wcserr **err; /* Initialize. */ if (dis == 0x0) return DISERR_NULL_POINTER; err = &(dis->err); naxis = dis->naxis; sprintf(id, "Polynomial on axis %d", j+1); /* Find the number of auxiliary variables and terms. */ K = 0; M = 0; keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j-1 != j) continue; if ((fp = strchr(keyp->field, '.')) == 0x0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid field name for %s: %s", id, keyp->field); } fp++; if (strcmp(fp, "NAUX") == 0) { K = wcsutil_dpkey_int(keyp); } else if (strcmp(fp, "NTERMS") == 0) { M = wcsutil_dpkey_int(keyp); } } if (K < 0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid number of auxiliaries (%d) for %s", K, id); } if (M <= 0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid number of terms (%d) for %s", M, id); } Nhat = dis->Nhat[j]; nKparm = 2*(Nhat + 1); nVar = Nhat + K; nTparm = 1 + nVar; ndparm = K*nKparm + M*nTparm; /* These iparm indices are specific to Polynomial. */ #define I_NIDX 4 /* No. of indexes in iparm[]. */ #define I_LENDP 5 /* Full (allocated) length of dparm[]. */ #define I_K 6 /* No. of auxiliary variables. */ #define I_M 7 /* No. of terms in the polynomial. */ #define I_NKPARM 8 /* No. of parameters used to define each auxiliary. */ #define I_NTPARM 9 /* No. of parameters used to define each term. */ #define I_NVAR 10 /* No. of independent + auxiliary variables. */ #define I_MNVAR 11 /* No. of powers (exponents) in the polynomial. */ #define I_DPOLY 12 /* dparm offset for polynomial coefficients. */ #define I_DAUX 13 /* dparm offset for auxiliary coefficients. */ #define I_DVPOW 14 /* dparm offset for integral powers of variables. */ #define I_MAXPOW 15 /* iparm offset for max powers. */ #define I_DPOFF 16 /* iparm offset for dparm offsets. */ #define I_FLAGS 17 /* iparm offset for flags. */ #define I_IPOW 18 /* iparm offset for integral powers. */ #define I_NPOLY 19 /* Add extra for handling integer exponents. See "Optimization" below. */ niparm = I_NPOLY + (2 + 2*M)*nVar; /* Add extra memory for temporaries. */ lendp = ndparm + K; /* Allocate memory for the indexes and parameter array. */ if ((dis->iparm[j] = calloc(niparm, sizeof(int))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } if ((dis->dparm[j] = calloc(lendp, sizeof(double))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } /* These help a bit to stop the code from turning into hieroglyphics. */ iparm = dis->iparm[j]; dparm = dis->dparm[j]; /* Record the indexing parameters. The first four are more widely used. */ iparm[I_DTYPE] = DIS_POLYNOMIAL; iparm[I_NIPARM] = niparm; iparm[I_NDPARM] = ndparm; iparm[I_DOCORR] = 0; iparm[I_NIDX] = I_NPOLY; iparm[I_LENDP] = lendp; iparm[I_K] = K; iparm[I_M] = M; iparm[I_NKPARM] = nKparm; iparm[I_NTPARM] = nTparm; iparm[I_NVAR] = nVar; iparm[I_MNVAR] = M*nVar; iparm[I_DPOLY] = K*nKparm; iparm[I_DAUX] = ndparm; iparm[I_DVPOW] = ndparm + K; iparm[I_MAXPOW] = iparm[I_NIDX]; iparm[I_DPOFF] = iparm[I_MAXPOW] + nVar; iparm[I_FLAGS] = iparm[I_DPOFF] + nVar; iparm[I_IPOW] = iparm[I_FLAGS] + M*nVar; /* Set default values of POWER for the auxiliary variables. */ dptr = dparm + (1 + Nhat); for (k = 0; k < K; k++) { for (jhat = 0; jhat <= Nhat; jhat++) { dptr[jhat] = 1.0; } dptr += nKparm; } /* Set default values of COEFF for the independent variables. */ dptr = dparm + iparm[I_DPOLY]; for (m = 0; m < M; m++) { *dptr = 1.0; dptr += nTparm; } /* Extract parameter values from DPja or DQia. */ k = m = 0; keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { /* N.B. keyp->j is 1-relative, but j is 0-relative. */ if (keyp->j-1 != j) continue; fp = strchr(keyp->field, '.') + 1; if (strncmp(fp, "DOCORR:", 7) == 0) { fp += 7; sscanf(fp, "%d", &k); if (k) iparm[I_DOCORR] = 1; } else if (strncmp(fp, "AUX.", 4) == 0) { /* N.B. k here is 1-relative. */ fp += 4; sscanf(fp, "%d", &k); if (k < 1 || K < k) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Bad auxiliary variable (%d) for %s: %s", k, id, keyp->field); } if ((fp = strchr(fp, '.')) == 0x0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid field name for %s: %s", id, keyp->field); } fp++; if (strncmp(fp, "COEFF.", 6) == 0) { offset = 0; } else if (strncmp(fp, "POWER.", 6) == 0) { offset = 1 + Nhat; } else { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Unrecognized field name for %s: %s", id, keyp->field); } fp += 6; sscanf(fp, "%d", &jhat); if (jhat < 0 || naxis < jhat) { /* N.B. jhat == 0 is ok. */ return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid axis number (%d) for %s: %s", jhat, id, keyp->field); } i = (k-1)*nKparm + offset + jhat; dparm[i] = wcsutil_dpkey_double(keyp); } else if (strncmp(fp, "TERM.", 5) == 0) { /* N.B. m here is 1-relative. */ fp += 5; sscanf(fp, "%d", &m); if (m < 1 || M < m) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Bad term (%d) for %s: %s", m, id, keyp->field); } if ((fp = strchr(fp, '.')) == 0x0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid field name for %s: %s", id, keyp->field); } fp++; if (strcmp(fp, "COEFF") == 0) { i = iparm[I_DPOLY] + (m-1)*nTparm; dparm[i] = wcsutil_dpkey_double(keyp); } else if (strncmp(fp, "VAR.", 4) == 0) { /* N.B. jhat here is 1-relative. */ fp += 4; sscanf(fp, "%d", &jhat); if (jhat < 1 || naxis < jhat) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid axis number (%d) for %s: %s", jhat, id, keyp->field); } i = iparm[I_DPOLY] + (m-1)*nTparm + 1 + (jhat-1); power = wcsutil_dpkey_double(keyp); dparm[i] = power; } else if (strncmp(fp, "AUX.", 4) == 0) { /* N.B. k here is 1-relative. */ fp += 4; sscanf(fp, "%d", &k); if (k < 1 || K < k) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Bad auxiliary variable (%d) for %s: %s", k, id, keyp->field); } i = iparm[I_DPOLY] + (m-1)*nTparm + 1 + Nhat + (k-1); power = wcsutil_dpkey_double(keyp); dparm[i] = power; } else { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Unrecognized field name for %s: %s", id, keyp->field); } } else if (strcmp(fp, "NAXES") && strncmp(fp, "AXIS.", 5) && strncmp(fp, "OFFSET.", 7) && strncmp(fp, "SCALE.", 6) && strcmp(fp, "NAUX") && strcmp(fp, "NTERMS")) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Unrecognized field name for %s: %s", id, keyp->field); } } /* Optimization: when the power is integral, it is faster to multiply */ /* ------------ repeatedly than call pow(). iparm[] is constructed as */ /* follows: */ /* I_NPOLY indexing parameters, as above, */ /* nVar elements record the largest integral power for each variable, */ /* nVar elements record offsets into dparm for each variable, */ /* M*nVar flags to signal whether the power is integral, */ /* M*nVar integral powers. */ for (ivar = 0; ivar < nVar; ivar++) { /* Want at least the first degree power for all variables. */ i = iparm[I_MAXPOW] + ivar; iparm[i] = 1; } for (ivar = 0; ivar < nVar; ivar++) { for (m = 0; m < M; m++) { i = iparm[I_DPOLY] + m*nTparm + 1 + ivar; power = dparm[i]; /* Is it integral? (Positive, negative, or zero.) */ ipow = (int)power; if (power == (double)ipow) { /* Signal that the power is integral. */ i = iparm[I_FLAGS] + m*nVar + ivar; if (ipow == 0) { iparm[i] = 3; } else { iparm[i] = 1; } /* The integral power itself. */ i = iparm[I_IPOW] + m*nVar + ivar; iparm[i] = ipow; } /* Record the largest integral power for each variable. */ i = iparm[I_MAXPOW] + ivar; if (iparm[i] < abs(ipow)) { iparm[i] = abs(ipow); } } } /* How many of all powers of each variable will there be? */ npow = 0; for (ivar = 0; ivar < nVar; ivar++) { /* Offset into dparm. */ i = iparm[I_DPOFF] + ivar; iparm[i] = lendp + npow; i = iparm[I_MAXPOW] + ivar; npow += iparm[i]; } /* Expand dparm to store the extra powers. */ if (npow) { lendp += npow; iparm[I_LENDP] = lendp; if ((dis->dparm[j] = realloc(dparm, lendp*sizeof(double))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } } /* No specialist de-distortions. */ dis->disp2x[j] = dispoly; dis->disx2p[j] = 0x0; /* Translate Polynomial to TPD if possible, it's much faster. */ /* However don't do it if the name was given as "Polynomial*". */ if (strcmp(dis->dtype[j], "Polynomial") == 0) { pol2tpd(j, dis); } return 0; } /*--------------------------------------------------------------------------*/ int tpdset(int j, struct disprm *dis) { static const char *function = "tpdset"; char *fp, id[16]; int doaux, docorr, doradial, idis, idp, k, m, ncoeff[2], ndparm, niparm; struct dpkey *keyp; struct wcserr **err; int (*(distpd[2]))(DISP2X_ARGS); if (dis == 0x0) return DISERR_NULL_POINTER; err = &(dis->err); sprintf(id, "TPD on axis %d", j+1); /* TPD distortion. */ if (dis->Nhat[j] < 1 || 2 < dis->Nhat[j]) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Axis map for %s must contain 1 or 2 entries, not %d", id, dis->Nhat[j]); } /* Find the number of parameters. */ ncoeff[0] = 0; ncoeff[1] = 0; doaux = 0; doradial = 0; docorr = 0; keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j-1 != j) continue; fp = strchr(keyp->field, '.') + 1; if (strncmp(fp, "TPD.", 4) == 0) { fp += 4; if (strncmp(fp, "FWD.", 4) == 0) { idis = 0; } else if (strncmp(fp, "REV.", 4) == 0) { /* TPD may provide a polynomial approximation for the inverse. */ idis = 1; } else { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Unrecognized field name for %s: %s", id, keyp->field); } sscanf(fp+4, "%d", &k); if (0 <= k && k <= 59) { if (ncoeff[idis] < k+1) ncoeff[idis] = k+1; /* Any radial terms? */ if (k == 3 || k == 11 || k == 23 || k == 39 || k == 59) { doradial = 1; } } else { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid parameter number (%d) for %s: %s", k, id, keyp->field); } } else if (strncmp(fp, "AUX.", 4) == 0) { /* Flag usage of auxiliary variables. */ doaux = 1; } else if (strncmp(fp, "DOCORR:", 7) == 0) { fp += 7; sscanf(fp, "%d", &k); if (k) docorr = 1; } else if (strcmp(fp, "NAXES") && strncmp(fp, "AXIS.", 5) && strncmp(fp, "OFFSET.", 7) && strncmp(fp, "SCALE.", 6)) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Unrecognized field name for %s: %s", id, keyp->field); } } distpd[0] = 0x0; distpd[1] = 0x0; for (idis = 0; idis < 2; idis++) { if (ncoeff[idis] <= 4) { if (idis) { /* No inverse polynomial. */ break; } /* First degree. */ ncoeff[idis] = 4; distpd[idis] = tpd1; } else if (ncoeff[idis] <= 7) { /* Second degree. */ ncoeff[idis] = 7; distpd[idis] = tpd2; } else if (ncoeff[idis] <= 12) { /* Third degree. */ ncoeff[idis] = 12; distpd[idis] = tpd3; } else if (ncoeff[idis] <= 17) { /* Fourth degree. */ ncoeff[idis] = 17; distpd[idis] = tpd4; } else if (ncoeff[idis] <= 24) { /* Fifth degree. */ ncoeff[idis] = 24; distpd[idis] = tpd5; } else if (ncoeff[idis] <= 31) { /* Sixth degree. */ ncoeff[idis] = 31; distpd[idis] = tpd6; } else if (ncoeff[idis] <= 40) { /* Seventh degree. */ ncoeff[idis] = 40; distpd[idis] = tpd7; } else if (ncoeff[idis] <= 49) { /* Eighth degree. */ ncoeff[idis] = 49; distpd[idis] = tpd8; } else if (ncoeff[idis] <= 60) { /* Ninth degree. */ ncoeff[idis] = 60; distpd[idis] = tpd9; } else { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid number of parameters (%d) for %s", ncoeff[idis], id); } } /* disx2p() only uses the inverse TPD, if present, to provide a better */ /* zeroth approximation. */ dis->disp2x[j] = distpd[0]; dis->disx2p[j] = distpd[1]; /* These iparm indices are specific to TPD. */ #define I_TPDNCO 4 /* No. of TPD coefficients, forward... */ #define I_TPDINV 5 /* ...and inverse. */ #define I_TPDAUX 6 /* True if auxiliary variables are used. */ #define I_TPDRAD 7 /* True if the radial variable is used. */ #define I_NTPD 8 /* Record indexing parameters. */ niparm = I_NTPD; if ((dis->iparm[j] = calloc(niparm, sizeof(int))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } ndparm = (doaux?6:0) + ncoeff[0] + ncoeff[1]; /* The first four are more widely used. */ dis->iparm[j][I_DTYPE] = DIS_TPD; dis->iparm[j][I_NIPARM] = niparm; dis->iparm[j][I_NDPARM] = ndparm; dis->iparm[j][I_DOCORR] = docorr; /* Number of TPD coefficients. */ dis->iparm[j][I_TPDNCO] = ncoeff[0]; dis->iparm[j][I_TPDINV] = ncoeff[1]; /* Flag for presence of auxiliary variables. */ dis->iparm[j][I_TPDAUX] = doaux; /* Flag for presence of radial terms. */ dis->iparm[j][I_TPDRAD] = doradial; /* Allocate memory for the polynomial coefficients and fill it. */ if ((dis->dparm[j] = calloc(ndparm, sizeof(double))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } /* Set default auxiliary coefficients. */ if (doaux) { dis->dparm[j][1] = 1.0; dis->dparm[j][5] = 1.0; } keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j-1 != j) continue; fp = strchr(keyp->field, '.') + 1; if (strncmp(fp, "AUX.", 4) == 0) { /* Auxiliary variables. */ fp += 4; sscanf(fp, "%d", &k); if (k < 1 || 2 < k) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Bad auxiliary variable (%d) for %s: %s", k, id, keyp->field); } if ((fp = strchr(fp, '.')) == 0x0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid field name for %s: %s", id, keyp->field); } fp++; if (strncmp(fp, "COEFF.", 6) != 0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Unrecognized field name for %s: %s", id, keyp->field); } fp += 6; sscanf(fp, "%d", &m); if (m < 0 || 2 < m) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid coefficient number (%d) for %s: %s", m, id, keyp->field); } idis = 3*(k-1) + m; dis->dparm[j][idis] = wcsutil_dpkey_double(keyp); } else if (strncmp(fp, "TPD.", 4) == 0) { fp += 4; idis = (doaux?6:0); if (strncmp(fp, "REV.", 4) == 0) { idis += ncoeff[0]; } sscanf(fp+4, "%d", &k); dis->dparm[j][idis+k] = wcsutil_dpkey_double(keyp); } } return 0; } /*--------------------------------------------------------------------------*/ int pol2tpd(int j, struct disprm *dis) { static const char *function = "pol2tpd"; static const int map[][10] = {{ 0, 2, 6, 10, 16, 22, 30, 38, 48, 58}, { 1, 5, 9, 15, 21, 29, 37, 47, 57, -1}, { 4, 8, 14, 20, 28, 36, 46, 56, -1, -1}, { 7, 13, 19, 27, 35, 45, 55, -1, -1, -1}, {12, 18, 26, 34, 44, 54, -1, -1, -1, -1}, {17, 25, 33, 43, 53, -1, -1, -1, -1, -1}, {24, 32, 42, 52, -1, -1, -1, -1, -1, -1}, {31, 41, 51, -1, -1, -1, -1, -1, -1, -1}, {40, 50, -1, -1, -1, -1, -1, -1, -1, -1}, {49, -1, -1, -1, -1, -1, -1, -1, -1, -1}}; int deg, degree, *iflgp, *iparm, *ipowp, jhat, K, m, n, ndparm, Nhat, niparm, p[2], *tpd_iparm; double *dparm, *dpolp, *tpd_dparm; struct wcserr **err; /* Initialize. */ if (dis == 0x0) return DISERR_NULL_POINTER; err = &(dis->err); iparm = dis->iparm[j]; dparm = dis->dparm[j]; /* Check the number of independent variables, no more than two. */ Nhat = dis->Nhat[j]; if (2 < Nhat) return -1; /* Check auxiliaries: only one is allowed... */ K = iparm[I_K]; if (1 < K) return -1; if (K) { /* ...and it must be radial. */ if (dparm[0] != 0.0) return -1; if (dparm[1] != 1.0) return -1; if (dparm[2] != 1.0) return -1; if (dparm[3] != 0.5) return -1; if (dparm[4] != 2.0) return -1; if (dparm[5] != 2.0) return -1; } /* Check powers... */ iflgp = iparm + iparm[I_FLAGS]; ipowp = iparm + iparm[I_IPOW]; degree = 0; for (m = 0; m < iparm[I_M]; m++) { deg = 0; for (jhat = 0; jhat < Nhat; jhat++) { /* ...they must be positive integral. */ if (*iflgp == 0) return -1; if (*ipowp < 0) return -1; deg += *ipowp; iflgp++; ipowp++; } /* The polynomial degree can't be greater than 9. */ if (9 < deg) return -1; if (K) { /* Likewise for the radial variable. */ if (*iflgp == 0) return -1; if (*ipowp) { if (*ipowp < 0) return -1; if (9 < *ipowp) return -1; /* Can't mix the radial and other terms. */ if (deg) return -1; /* Can't have even powers of the radial variable. */ deg = *ipowp; if (!(deg%2)) return -1; } iflgp++; ipowp++; } if (degree < deg) degree = deg; } /* OK, it ticks all the boxes. Now translate it. */ ndparm = 0; if (degree == 1) { ndparm = 4; dis->disp2x[j] = tpd1; } else if (degree == 2) { ndparm = 7; dis->disp2x[j] = tpd2; } else if (degree == 3) { ndparm = 12; dis->disp2x[j] = tpd3; } else if (degree == 4) { ndparm = 17; dis->disp2x[j] = tpd4; } else if (degree == 5) { ndparm = 24; dis->disp2x[j] = tpd5; } else if (degree == 6) { ndparm = 31; dis->disp2x[j] = tpd6; } else if (degree == 7) { ndparm = 40; dis->disp2x[j] = tpd7; } else if (degree == 8) { ndparm = 49; dis->disp2x[j] = tpd8; } else if (degree == 9) { ndparm = 60; dis->disp2x[j] = tpd9; } /* No specialist de-distortions. */ dis->disx2p[j] = 0x0; /* Record indexing parameters. */ niparm = I_NTPD; if ((tpd_iparm = calloc(niparm, sizeof(int))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } /* The first four are more widely used. */ tpd_iparm[I_DTYPE] = DIS_TPD; tpd_iparm[I_NIPARM] = niparm; tpd_iparm[I_NDPARM] = ndparm; tpd_iparm[I_DOCORR] = iparm[I_DOCORR]; /* Number of TPD coefficients. */ tpd_iparm[I_TPDNCO] = ndparm; tpd_iparm[I_TPDINV] = 0; /* No auxiliary variables yet. */ tpd_iparm[I_TPDAUX] = 0; /* Flag for presence of radial terms. */ tpd_iparm[I_TPDRAD] = K; /* Allocate memory for the polynomial coefficients and fill it. */ if ((tpd_dparm = calloc(ndparm, sizeof(double))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } ipowp = iparm + iparm[I_IPOW]; dpolp = dparm + iparm[I_DPOLY]; for (m = 0; m < iparm[I_M]; m++) { if (K && ipowp[Nhat]) { /* The radial variable. */ switch (ipowp[Nhat]) { case 1: tpd_dparm[3] = *dpolp; break; case 3: tpd_dparm[11] = *dpolp; break; case 5: tpd_dparm[23] = *dpolp; break; case 7: tpd_dparm[39] = *dpolp; break; case 9: tpd_dparm[59] = *dpolp; break; } } else { /* The independent variables. */ p[0] = p[1] = 0; for (jhat = 0; jhat < Nhat; jhat++) { p[jhat] = ipowp[jhat]; } n = map[p[0]][p[1]]; tpd_dparm[n] = *dpolp; } ipowp += iparm[I_NVAR]; dpolp += iparm[I_NVAR] + 1; } /* Switch from Polynomial to TPD. */ free(iparm); free(dparm); dis->iparm[j] = tpd_iparm; dis->dparm[j] = tpd_dparm; return 0; } /*--------------------------------------------------------------------------*/ int tpvset(int j, struct disprm *dis) { static const char *function = "tpvset"; char *fp, id[16]; int doradial, idp, k, ndparm, niparm; struct dpkey *keyp; struct wcserr **err; /* Initialize. */ if (dis == 0x0) return DISERR_NULL_POINTER; err = &(dis->err); /* TPV "projection". */ sprintf(id, "TPV on axis %d", j+1); if (dis->Nhat[j] != 2) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Axis map for %s must contain 2 entries, not %d", id, dis->Nhat[j]); } /* Find the number of parameters. */ ndparm = 0; doradial = 0; keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j-1 != j) continue; fp = strchr(keyp->field, '.') + 1; if (strncmp(fp, "TPV.", 4) == 0) { sscanf(fp+4, "%d", &k); if (0 <= k && k <= 39) { if (ndparm < k+1) ndparm = k+1; /* Any radial terms? */ if (k == 3 || k == 11 || k == 23 || k == 39 || k == 59) { doradial = 1; } } else { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid parameter number (%d) for %s: %s", k, id, keyp->field); } } else if (strcmp(fp, "NAXES") && strncmp(fp, "AXIS.", 5) && strncmp(fp, "OFFSET.", 7) && strncmp(fp, "SCALE.", 6)) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Unrecognized field name for %s: %s", id, keyp->field); } } /* TPD is going to do the dirty work. */ if (ndparm <= 4) { /* First degree. */ ndparm = 4; dis->disp2x[j] = tpd1; } else if (ndparm <= 7) { /* Second degree. */ ndparm = 7; dis->disp2x[j] = tpd2; } else if (ndparm <= 12) { /* Third degree. */ ndparm = 12; dis->disp2x[j] = tpd3; } else if (ndparm <= 17) { /* Fourth degree. */ ndparm = 17; dis->disp2x[j] = tpd4; } else if (ndparm <= 24) { /* Fifth degree. */ ndparm = 24; dis->disp2x[j] = tpd5; } else if (ndparm <= 31) { /* Sixth degree. */ ndparm = 31; dis->disp2x[j] = tpd6; } else if (ndparm <= 40) { /* Seventh degree. */ ndparm = 40; dis->disp2x[j] = tpd7; } else { /* Could go to ninth degree, but that wouldn't be legit. */ return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid number of parameters (%d) for %s", ndparm, id); } /* No specialist de-distortions. */ dis->disx2p[j] = 0x0; /* Record indexing parameters. */ niparm = I_NTPD; if ((dis->iparm[j] = calloc(niparm, sizeof(int))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } /* The first four are more widely used. */ dis->iparm[j][I_DTYPE] = DIS_TPD; dis->iparm[j][I_NIPARM] = niparm; dis->iparm[j][I_NDPARM] = ndparm; dis->iparm[j][I_DOCORR] = 0; /* Number of TPD coefficients. */ dis->iparm[j][I_TPDNCO] = ndparm; dis->iparm[j][I_TPDINV] = 0; /* TPV never needs auxiliary variables. */ dis->iparm[j][I_TPDAUX] = 0; /* Flag for presence of radial terms. */ dis->iparm[j][I_TPDRAD] = doradial; /* Allocate memory for the polynomial coefficients and fill it. */ if ((dis->dparm[j] = calloc(ndparm, sizeof(double))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j-1 != j) continue; fp = strchr(keyp->field, '.') + 1; /* One-to-one correspondence between TPV and TPD coefficients. */ if (strncmp(fp, "TPV.", 4) == 0) { sscanf(fp+4, "%d", &k); dis->dparm[j][k] = wcsutil_dpkey_double(keyp); } } return 0; } /*--------------------------------------------------------------------------*/ int sipset(int j, struct disprm *dis) { static const char *function = "sipset"; static const int map[][10] = {{ 0, 2, 6, 10, 16, 22, 30, 38, 48, 58}, { 1, 5, 9, 15, 21, 29, 37, 47, 57, -1}, { 4, 8, 14, 20, 28, 36, 46, 56, -1, -1}, { 7, 13, 19, 27, 35, 45, 55, -1, -1, -1}, {12, 18, 26, 34, 44, 54, -1, -1, -1, -1}, {17, 25, 33, 43, 53, -1, -1, -1, -1, -1}, {24, 32, 42, 52, -1, -1, -1, -1, -1, -1}, {31, 41, 51, -1, -1, -1, -1, -1, -1, -1}, {40, 50, -1, -1, -1, -1, -1, -1, -1, -1}, {49, -1, -1, -1, -1, -1, -1, -1, -1, -1}}; char *fp, id[16]; int deg, degree[2], idis, idp, jhat, naxis, ncoeff[2], ndparm, niparm, p, q; struct dpkey *keyp; struct wcserr **err; int (*(distpd[2]))(DISP2X_ARGS); /* Initialize. */ if (dis == 0x0) return DISERR_NULL_POINTER; err = &(dis->err); /* Simple Imaging Polynomial. */ sprintf(id, "SIP on axis %d", j+1); if (dis->Nhat[j] != 2) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Axis map for %s must contain 2 entries, not %d", id, dis->Nhat[j]); } /* Find the polynomial degree, at least 1 for the forward function. */ degree[0] = 1; degree[1] = -1; keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j-1 != j) continue; fp = strchr(keyp->field, '.') + 1; if (strncmp(fp, "SIP.", 4) == 0) { fp += 4; if (strncmp(fp, "FWD.", 4) == 0) { idis = 0; } else if (strncmp(fp, "REV.", 4) == 0) { /* SIP uses a polynomial approximation for the inverse. */ idis = 1; } else { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Unrecognized field name for %s: %s", id, keyp->field); } fp += 4; sscanf(fp, "%d_%d", &p, &q); deg = p + q; if (p < 0 || 9 < p || q < 0 || 9 < q || 9 < deg) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid powers (%d, %d) for %s: %s", p, q, id, keyp->field); } if (degree[idis] < deg) degree[idis] = deg; } else if (strcmp(fp, "NAXES") && strncmp(fp, "AXIS.", 5) && strncmp(fp, "OFFSET.", 7) && strncmp(fp, "SCALE.", 6)) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Unrecognized field name for %s: %s", id, keyp->field); } } if (degree[1] == 0 ) degree[1] = 1; /* TPD is going to do the dirty work. */ distpd[0] = 0x0; distpd[1] = 0x0; for (idis = 0; idis < 2; idis++) { ncoeff[idis] = 0; if (degree[idis] == 1) { ncoeff[idis] = 4; distpd[idis] = tpd1; } else if (degree[idis] == 2) { ncoeff[idis] = 7; distpd[idis] = tpd2; } else if (degree[idis] == 3) { ncoeff[idis] = 12; distpd[idis] = tpd3; } else if (degree[idis] == 4) { ncoeff[idis] = 17; distpd[idis] = tpd4; } else if (degree[idis] == 5) { ncoeff[idis] = 24; distpd[idis] = tpd5; } else if (degree[idis] == 6) { ncoeff[idis] = 31; distpd[idis] = tpd6; } else if (degree[idis] == 7) { ncoeff[idis] = 40; distpd[idis] = tpd7; } else if (degree[idis] == 8) { ncoeff[idis] = 49; distpd[idis] = tpd8; } else if (degree[idis] == 9) { ncoeff[idis] = 60; distpd[idis] = tpd9; } } /* SIP uses a polynomial approximation to the inverse. It's not very */ /* accurate but may provide disx2p() with a better zeroth approximation. */ dis->disp2x[j] = distpd[0]; dis->disx2p[j] = distpd[1]; /* Record indexing parameters. */ niparm = I_NTPD; if ((dis->iparm[j] = calloc(niparm, sizeof(int))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } ndparm = ncoeff[0] + ncoeff[1]; /* The first four are more widely used. */ dis->iparm[j][I_DTYPE] = DIS_TPD; dis->iparm[j][I_NIPARM] = niparm; dis->iparm[j][I_NDPARM] = ndparm; dis->iparm[j][I_DOCORR] = 0; /* Number of TPD coefficients. */ dis->iparm[j][I_TPDNCO] = ncoeff[0]; dis->iparm[j][I_TPDINV] = ncoeff[1]; /* SIP never needs auxiliary variables. */ dis->iparm[j][I_TPDAUX] = 0; /* SIP never needs the radial terms. */ dis->iparm[j][I_TPDRAD] = 0; /* Allocate memory for the polynomial coefficients and fill it. */ if ((dis->dparm[j] = calloc(ndparm, sizeof(double))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j-1 != j) continue; fp = strchr(keyp->field, '.') + 1; if (strncmp(fp, "SIP.", 4) == 0) { fp += 4; if (strncmp(fp, "FWD.", 4) == 0) { idis = 0; } else { idis = ncoeff[0]; } sscanf(fp+4, "%d_%d", &p, &q); /* Map to TPD coefficient number. */ idis += map[p][q]; dis->dparm[j][idis] = wcsutil_dpkey_double(keyp); } } /* Account for the fact that the SIP distortion provides an additive */ /* correction to the offset of the pixel coordinate from CRPIX, whereas */ /* we expect the distortion function to provide the actual value of the */ /* distorted pixel coordinate. */ naxis = dis->naxis; jhat = dis->axmap[j][naxis+j]; idis = jhat + 1; dis->dparm[j][0] = dis->offset[j][jhat]; dis->dparm[j][idis] += 1.0; if (degree[1] > 0) { dis->dparm[j][ncoeff[0]] = dis->offset[j][jhat]; dis->dparm[j][ncoeff[0]+idis] += 1.0; } return 0; } /*--------------------------------------------------------------------------*/ int dssset(int j, struct disprm *dis) { static const char *function = "dssset"; char *fp, id[16]; int degree, idp, m, ncoeff, ndparm, niparm; double A1, A2, A3, B1, B2, B3, coeff, *dparm, S, X0, Y0; struct dpkey *keyp; struct wcserr **err; /* Initialize. */ if (dis == 0x0) return DISERR_NULL_POINTER; err = &(dis->err); /* Digitized Sky Survey. */ sprintf(id, "DSS on axis %d", j+1); if (dis->Nhat[j] != 2) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Axis map for %s must contain 2 entries, not %d", id, dis->Nhat[j]); } /* Safe to assume the polynomial degree is 5 (or less). */ ncoeff = 24; dis->disp2x[j] = tpd5; /* No specialist de-distortions. */ dis->disx2p[j] = 0x0; /* Record indexing parameters. */ niparm = I_NTPD; if ((dis->iparm[j] = calloc(niparm, sizeof(int))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } ndparm = 6 + ncoeff; /* The first four are more widely used. */ dis->iparm[j][I_DTYPE] = DIS_TPD; dis->iparm[j][I_NIPARM] = niparm; dis->iparm[j][I_NDPARM] = ndparm; dis->iparm[j][I_DOCORR] = 0; /* Number of TPD coefficients. */ dis->iparm[j][I_TPDNCO] = ncoeff; dis->iparm[j][I_TPDINV] = 0; /* DSS always needs auxiliary variables. */ dis->iparm[j][I_TPDAUX] = 1; /* DSS never needs the radial terms. */ dis->iparm[j][I_TPDRAD] = 0; /* Allocate memory for the polynomial coefficients and fill it. */ if ((dis->dparm[j] = calloc(ndparm, sizeof(double))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } /* This translation follows WCS Paper IV, Sect. 5.2 using the same */ /* variable names. Find A1, A2, A3, B1, B2, and B3. */ A1 = A2 = A3 = 0.0; B1 = B2 = B3 = 0.0; keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { fp = strchr(keyp->field, '.') + 1; if (strncmp(fp, "DSS.AMD.", 8) == 0) { fp += 8; sscanf(fp, "%d", &m); if (m == 1) { if (keyp->j == 1) { A1 = wcsutil_dpkey_double(keyp); } else { B1 = wcsutil_dpkey_double(keyp); } } else if (m == 2) { if (keyp->j == 1) { A2 = wcsutil_dpkey_double(keyp); } else { B2 = wcsutil_dpkey_double(keyp); } } else if (m == 3) { if (keyp->j == 1) { A3 = wcsutil_dpkey_double(keyp); } else { B3 = wcsutil_dpkey_double(keyp); } } } } X0 = (A2*B3 - A3*B1) / (A1*B1 - A2*B2); Y0 = (A3*B2 - A1*B3) / (A1*B1 - A2*B2); S = sqrt(fabs(A1*B1 - A2*B2)); if (S == 0.0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Coefficient scale for %s is zero.", id); } /* Coefficients for the auxiliary variables. */ dparm = dis->dparm[j]; if (j == 0) { dparm[0] = X0; dparm[1] = -B1/S; dparm[2] = -A2/S; dparm[3] = Y0; dparm[4] = B2/S; dparm[5] = A1/S; /* Change the sign of S for scaling the A coefficients. */ S *= -1.0; } else { dparm[0] = Y0; dparm[1] = B2/S; dparm[2] = A1/S; dparm[3] = X0; dparm[4] = -B1/S; dparm[5] = -A2/S; } /* Translate DSS coefficients to TPD. */ dparm += 6; degree = 3; keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j-1 != j) continue; fp = strchr(keyp->field, '.') + 1; if (strncmp(fp, "DSS.AMD.", 8) == 0) { /* Skip zero coefficients. */ if ((coeff = wcsutil_dpkey_double(keyp)) == 0.0) continue; fp += 8; sscanf(fp, "%d", &m); /* Apply the coefficient scale factor. */ coeff /= S; if (m == 1) { dparm[1] = coeff; } else if (m == 2) { dparm[2] = coeff; } else if (m == 3) { dparm[0] = coeff; } else if (m == 4) { dparm[4] += coeff; } else if (m == 5) { dparm[5] = coeff; } else if (m == 6) { dparm[6] += coeff; } else if (m == 7) { dparm[4] += coeff; dparm[6] += coeff; } else if (m == 8) { dparm[7] += coeff; } else if (m == 9) { dparm[8] = coeff; } else if (m == 10) { dparm[9] += coeff; } else if (m == 11) { dparm[10] = coeff; } else if (m == 12) { dparm[7] += coeff; dparm[9] += coeff; } else if (m == 13) { dparm[17] = coeff; dparm[19] = coeff * 2.0; dparm[21] = coeff; degree = 5; } else if (coeff != 0.0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid parameter for %s: %s", m, id, keyp->field); } } else if (strcmp(fp, "NAXES") && strncmp(fp, "AXIS.", 5) && strncmp(fp, "OFFSET.", 7) && strncmp(fp, "SCALE.", 6)) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Unrecognized field name for %s: %s", id, keyp->field); } } /* The DSS polynomial doesn't have 4th degree terms, and the 5th degree coefficient is often zero. */ if (degree == 3) { dis->iparm[j][I_TPDNCO] = 12; dis->disp2x[j] = tpd3; } return 0; } /*--------------------------------------------------------------------------*/ #define CHEBYSHEV 1 #define LEGENDRE 2 #define MONOMIAL 3 int watset(int j, struct disprm *dis) { static const char *function = "watset"; static const int map[][10] = {{ 0, 2, 6, 10, 16, 22, 30, 38, 48, 58}, { 1, 5, 9, 15, 21, 29, 37, 47, 57, -1}, { 4, 8, 14, 20, 28, 36, 46, 56, -1, -1}, { 7, 13, 19, 27, 35, 45, 55, -1, -1, -1}, {12, 18, 26, 34, 44, 54, -1, -1, -1, -1}, {17, 25, 33, 43, 53, -1, -1, -1, -1, -1}, {24, 32, 42, 52, -1, -1, -1, -1, -1, -1}, {31, 41, 51, -1, -1, -1, -1, -1, -1, -1}, {40, 50, -1, -1, -1, -1, -1, -1, -1, -1}, {49, -1, -1, -1, -1, -1, -1, -1, -1, -1}}; char *fp, id[16]; int deg, degree, doaux, idis, idp, im, in, *iparm, kind, m, n, ncoeff, ndparm, niparm; double coeff, coeffm[10], coeffn[10], *dparm, dx, dy, x0, xmax, xmin, y0, ymax, ymin; struct dpkey *keyp; struct wcserr **err; /* Initialize. */ if (dis == 0x0) return DISERR_NULL_POINTER; err = &(dis->err); /* WAT (TNX or ZPX) Polynomial. */ sprintf(id, "WAT (%s) on axis %d", dis->dtype[0]+4, j+1); if (dis->Nhat[j] != 2) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Axis map for %s must contain 2 entries, not %d", id, dis->Nhat[j]); } /* Find the polynomial degree (at least 1), kind, and domain. */ degree = 1; kind = 0; xmin = xmax = 0.0; ymin = ymax = 0.0; keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j-1 != j) continue; fp = strchr(keyp->field, '.') + 1; if (strncmp(fp, "WAT.", 4) == 0) { fp += 4; if (strncmp(fp, "CHBY.", 5) == 0 || strncmp(fp, "LEGR.", 5) == 0 || strncmp(fp, "MONO.", 5) == 0) { fp += 5; sscanf(fp, "%d_%d", &m, &n); deg = m + n; if (m < 0 || 9 < m || n < 0 || 9 < n || 9 < deg) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Invalid powers (%d, %d) for %s: %s", m, n, id, keyp->field); } if (degree < deg) degree = deg; } else if (strcmp(fp, "POLY") == 0) { kind = wcsutil_dpkey_int(keyp); } else if (strcmp(fp, "XMIN") == 0) { xmin = wcsutil_dpkey_double(keyp); } else if (strcmp(fp, "XMAX") == 0) { xmax = wcsutil_dpkey_double(keyp); } else if (strcmp(fp, "YMIN") == 0) { ymin = wcsutil_dpkey_double(keyp); } else if (strcmp(fp, "YMAX") == 0) { ymax = wcsutil_dpkey_double(keyp); } } else if (strcmp(fp, "NAXES") && strncmp(fp, "AXIS.", 5) && strncmp(fp, "OFFSET.", 7) && strncmp(fp, "SCALE.", 6)) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Unrecognized field name for %s: %s", id, keyp->field); } } doaux = (kind == 1 || kind == 2); /* TPD is going to do the dirty work. */ ncoeff = 0; if (degree == 1) { /* First degree. */ ncoeff = 4; dis->disp2x[j] = tpd1; } else if (degree == 2) { /* Second degree. */ ncoeff = 7; dis->disp2x[j] = tpd2; } else if (degree == 3) { /* Third degree. */ ncoeff = 12; dis->disp2x[j] = tpd3; } else if (degree == 4) { /* Fourth degree. */ ncoeff = 17; dis->disp2x[j] = tpd4; } else if (degree == 5) { /* Fifth degree. */ ncoeff = 24; dis->disp2x[j] = tpd5; } else if (degree == 6) { /* Sixth degree. */ ncoeff = 31; dis->disp2x[j] = tpd6; } else if (degree == 7) { /* Seventh degree. */ ncoeff = 40; dis->disp2x[j] = tpd7; } else if (degree == 8) { /* Eighth degree. */ ncoeff = 49; dis->disp2x[j] = tpd8; } else if (degree == 9) { /* Ninth degree. */ ncoeff = 60; dis->disp2x[j] = tpd9; } /* No specialist de-distortions. */ dis->disx2p[j] = 0x0; /* Record indexing parameters. */ niparm = I_NTPD; if ((dis->iparm[j] = calloc(niparm, sizeof(int))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } iparm = dis->iparm[j]; ndparm = 6 + ncoeff; /* The first four are more widely used. */ iparm[I_DTYPE] = DIS_TPD; iparm[I_NIPARM] = niparm; iparm[I_NDPARM] = ndparm; iparm[I_DOCORR] = 1; /* Number of TPD coefficients. */ iparm[I_TPDNCO] = ncoeff; iparm[I_TPDINV] = 0; /* The Chebyshev and Legendre polynomials use auxiliary variables. */ iparm[I_TPDAUX] = doaux; /* WAT never needs the radial terms. */ iparm[I_TPDRAD] = 0; /* Allocate memory for the polynomial coefficients and fill it. */ if ((dis->dparm[j] = calloc(ndparm, sizeof(double))) == 0x0) { return wcserr_set(DIS_ERRMSG(DISERR_MEMORY)); } dparm = dis->dparm[j]; /* Coefficients for the auxiliary variables. */ if (doaux) { x0 = (xmax + xmin)/2.0; dx = (xmax - xmin)/2.0; if (dx == 0.0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "X-span for %s is zero", id); } dparm[0] = -x0/dx; dparm[1] = 1.0/dx; dparm[2] = 0.0; y0 = (ymax + ymin)/2.0; dy = (ymax - ymin)/2.0; if (dy == 0.0) { return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM), "Y-span for %s is zero", id); } dparm[3] = -y0/dy; dparm[4] = 0.0; dparm[5] = 1.0/dy; dparm += 6; } /* Unpack the polynomial coefficients. */ keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j-1 != j) continue; fp = strchr(keyp->field, '.') + 1; if ((kind == CHEBYSHEV && strncmp(fp, "WAT.CHBY.", 9) == 0) || (kind == LEGENDRE && strncmp(fp, "WAT.LEGR.", 9) == 0) || (kind == MONOMIAL && strncmp(fp, "WAT.MONO.", 9) == 0)) { fp += 9; sscanf(fp, "%d_%d", &m, &n); if (kind == MONOMIAL) { /* Monomial coefficient, maps simply to TPD coefficient number. */ idis = map[m][n]; dparm[idis] = wcsutil_dpkey_double(keyp); } else { /* Coefficient of the product of two Chebyshev or two Legendre */ /* polynomials. Find the corresponding monomial coefficients. */ coeff = wcsutil_dpkey_double(keyp); cheleg(kind, m, n, coeffm, coeffn); for (im = 0; im <= m; im++) { if (coeffm[im] == 0.0) continue; for (in = 0; in <= n; in++) { if (coeffn[in] == 0.0) continue; idis = map[im][in]; dparm[idis] += coeff*coeffm[im]*coeffn[in]; } } } } } return 0; } /*--------------------------------------------------------------------------*/ /* Compute the coefficients of Chebyshev or Legendre polynomials of degree */ /* m and n. */ int cheleg(int kind, int m, int n, double coeffm[], double coeffn[]) { int j, j0, j1, j2, k, N; double *coeff[3], d; N = (m > n) ? m : n; /* Allocate work arrays. */ coeff[0] = calloc(3*(N+1), sizeof(double)); coeff[1] = coeff[0] + (N+1); coeff[2] = coeff[1] + (N+1); for (j = 0; j <= N; j++) { j0 = j%3; if (j == 0) { coeff[0][0] = 1.0; } else if (j == 1) { coeff[1][1] = 1.0; } else { /* Cyclic buffer indices. */ j1 = (j-1)%3; j2 = (j-2)%3; memset(coeff[j0], 0, (N+1)*sizeof(double)); d = (double)j; for (k = 0; k < N; k++) { if (kind == CHEBYSHEV) { coeff[j0][k+1] = 2.0 * coeff[j1][k]; coeff[j0][k] -= coeff[j2][k]; } else if (kind == LEGENDRE) { coeff[j0][k+1] = ((2.0*d - 1.0) * coeff[j1][k]) / d; coeff[j0][k] -= ((d - 1.0) * coeff[j2][k]) / d; } } } if (j == m) memcpy(coeffm, coeff[j0], (m+1)*sizeof(double)); if (j == n) memcpy(coeffn, coeff[j0], (n+1)*sizeof(double)); } free(coeff[0]); return 0; } /*--------------------------------------------------------------------------*/ int dispoly( int inverse, const int iparm[], const double dparm[], int Nhat, const double rawcrd[], double *discrd) { const int *iflgp, *imaxp, *imaxpow, *ipowp; int ip, ivar, jhat, k, m; const double *cptr, *dpolp, *pptr; double *aux, auxp0, *dvarpow, *dpowp, term, var; /* Check for zeroes. */ for (jhat = 0; jhat < Nhat; jhat++) { if (rawcrd[jhat] == 0.0) { *discrd = 0.0; return 0; } } /* Working memory for auxiliaries &c. was allocated at the end of p[]. */ aux = (double *)(dparm + iparm[I_DAUX]); /* Compute the auxiliary variables. */ for (k = 0; k < iparm[I_K]; k++) { cptr = dparm + k*iparm[I_NKPARM]; pptr = cptr + (1+Nhat); aux[k] = *(cptr++); auxp0 = *(pptr++); for (jhat = 0; jhat < Nhat; jhat++) { aux[k] += *(cptr++)*pow(rawcrd[jhat], *(pptr++)); } aux[k] = pow(aux[k], auxp0); /* Check for zeroes. */ if (aux[k] == 0.0) { *discrd = 0.0; return 0; } } /* Compute all required integral powers of the variables. */ imaxpow = iparm + iparm[I_MAXPOW]; dvarpow = (double *)(dparm + iparm[I_DVPOW]); imaxp = imaxpow; dpowp = dvarpow; for (jhat = 0; jhat < Nhat; jhat++, imaxp++) { var = 1.0; for (ip = 0; ip < *imaxp; ip++, dpowp++) { var *= rawcrd[jhat]; *dpowp = var; } } for (k = 0; k < iparm[I_K]; k++, imaxp++) { var = 1.0; for (ip = 0; ip < *imaxp; ip++, dpowp++) { var *= aux[k]; *dpowp = var; } } /* Loop for each term of the polynomial. */ *discrd = 0.0; iflgp = iparm + iparm[I_FLAGS]; ipowp = iparm + iparm[I_IPOW]; dpolp = dparm + iparm[I_DPOLY]; for (m = 0; m < iparm[I_M]; m++) { term = *(dpolp++); /* Loop over all variables. */ imaxp = imaxpow; dpowp = dvarpow - 1; for (ivar = 0; ivar < iparm[I_NVAR]; ivar++) { if (*iflgp & 2) { /* Nothing (zero power). */ } else if (*iflgp) { /* Integral power. */ if (*ipowp < 0) { /* Negative. */ term /= dpowp[*ipowp]; } else { /* Positive. */ term *= dpowp[*ipowp]; } } else { /* Fractional power. */ term *= pow(dpowp[0], *dpolp); } iflgp++; ipowp++; dpolp++; dpowp += *imaxp; imaxp++; } *discrd += term; } return 0; } /*--------------------------------------------------------------------------*/ int tpd1( int inverse, const int i[], const double p[], int Nhat, const double rawcrd[], double *discrd) { double r, s, u, v; if (i[I_TPDNCO+inverse] != 4 || 2 < Nhat) { return 1; } u = rawcrd[0]; v = rawcrd[1]; /* Auxiliary variables? */ if (i[I_TPDAUX]) { r = p[0] + p[1]*u + p[2]*v; v = p[3] + p[4]*u + p[5]*v; u = r; p += 6; } if (inverse) p += i[I_TPDNCO]; /* First degree. */ *discrd = p[0] + u*p[1]; if (Nhat == 1) return 0; *discrd += v*p[2]; /* Radial terms? */ if (i[I_TPDRAD]) { s = u*u + v*v; r = sqrt(s); *discrd += r*p[3]; } return 0; } /*--------------------------------------------------------------------------*/ int tpd2( int inverse, const int i[], const double p[], int Nhat, const double rawcrd[], double *discrd) { double r, s, u, v; if (i[I_TPDNCO+inverse] != 7 || 2 < Nhat) { return 1; } u = rawcrd[0]; v = rawcrd[1]; /* Auxiliary variables? */ if (i[I_TPDAUX]) { r = p[0] + p[1]*u + p[2]*v; v = p[3] + p[4]*u + p[5]*v; u = r; p += 6; } if (inverse) p += i[I_TPDNCO]; /* Second degree. */ *discrd = p[0] + u*(p[1] + u*(p[4])); if (Nhat == 1) return 0; *discrd += v*(p[2] + v*(p[6])) + u*(p[5])*v; /* Radial terms? */ if (i[I_TPDRAD]) { s = u*u + v*v; r = sqrt(s); *discrd += r*p[3]; } return 0; } /*--------------------------------------------------------------------------*/ int tpd3( int inverse, const int i[], const double p[], int Nhat, const double rawcrd[], double *discrd) { double r, s, u, v; if (i[I_TPDNCO+inverse] != 12 || 2 < Nhat) { return 1; } u = rawcrd[0]; v = rawcrd[1]; /* Auxiliary variables? */ if (i[I_TPDAUX]) { r = p[0] + p[1]*u + p[2]*v; v = p[3] + p[4]*u + p[5]*v; u = r; p += 6; } if (inverse) p += i[I_TPDNCO]; /* Third degree. */ *discrd = p[0] + u*(p[1] + u*(p[4] + u*(p[7]))); if (Nhat == 1) return 0; *discrd += v*(p[2] + v*(p[6] + v*(p[10]))) + u*(p[5] + v*(p[9]) + u*(p[8]))*v; /* Radial terms? */ if (i[I_TPDRAD]) { s = u*u + v*v; r = sqrt(s); *discrd += r*(p[3] + s*(p[11])); } return 0; } /*--------------------------------------------------------------------------*/ int tpd4( int inverse, const int i[], const double p[], int Nhat, const double rawcrd[], double *discrd) { double r, s, u, v; if (i[I_TPDNCO+inverse] != 17 || 2 < Nhat) { return 1; } u = rawcrd[0]; v = rawcrd[1]; /* Auxiliary variables? */ if (i[I_TPDAUX]) { r = p[0] + p[1]*u + p[2]*v; v = p[3] + p[4]*u + p[5]*v; u = r; p += 6; } if (inverse) p += i[I_TPDNCO]; /* Fourth degree. */ *discrd = p[0] + u*(p[1] + u*(p[4] + u*(p[7] + u*(p[12])))); if (Nhat == 1) return 0; *discrd += v*(p[2] + v*(p[6] + v*(p[10] + v*(p[16])))) + u*(p[5] + v*(p[9] + v*(p[15])) + u*(p[8] + v*(p[14]) + u*(p[13])))*v; /* Radial terms? */ if (i[I_TPDRAD]) { s = u*u + v*v; r = sqrt(s); *discrd += r*(p[3] + s*(p[11])); } return 0; } /*--------------------------------------------------------------------------*/ int tpd5( int inverse, const int i[], const double p[], int Nhat, const double rawcrd[], double *discrd) { double r, s, u, v; if (i[I_TPDNCO+inverse] != 24 || 2 < Nhat) { return 1; } u = rawcrd[0]; v = rawcrd[1]; /* Auxiliary variables? */ if (i[I_TPDAUX]) { r = p[0] + p[1]*u + p[2]*v; v = p[3] + p[4]*u + p[5]*v; u = r; p += 6; } if (inverse) p += i[I_TPDNCO]; /* Fifth degree. */ *discrd = p[0] + u*(p[1] + u*(p[4] + u*(p[7] + u*(p[12] + u*(p[17]))))); if (Nhat == 1) return 0; *discrd += v*(p[2] + v*(p[6] + v*(p[10] + v*(p[16] + v*(p[22]))))) + u*(p[5] + v*(p[9] + v*(p[15] + v*(p[21]))) + u*(p[8] + v*(p[14] + v*(p[20])) + u*(p[13] + v*(p[19]) + u*(p[18]))))*v; /* Radial terms? */ if (i[I_TPDRAD]) { s = u*u + v*v; r = sqrt(s); *discrd += r*(p[3] + s*(p[11] + s*(p[23]))); } return 0; } /*--------------------------------------------------------------------------*/ int tpd6( int inverse, const int i[], const double p[], int Nhat, const double rawcrd[], double *discrd) { double r, s, u, v; if (i[I_TPDNCO+inverse] != 31 || 2 < Nhat) { return 1; } u = rawcrd[0]; v = rawcrd[1]; /* Auxiliary variables? */ if (i[I_TPDAUX]) { r = p[0] + p[1]*u + p[2]*v; v = p[3] + p[4]*u + p[5]*v; u = r; p += 6; } if (inverse) p += i[I_TPDNCO]; /* Sixth degree. */ *discrd = p[0] + u*(p[1] + u*(p[4] + u*(p[7] + u*(p[12] + u*(p[17] + u*(p[24])))))); if (Nhat == 1) return 0; *discrd += v*(p[2] + v*(p[6] + v*(p[10] + v*(p[16] + v*(p[22] + v*(p[30])))))) + u*(p[5] + v*(p[9] + v*(p[15] + v*(p[21] + v*(p[29])))) + u*(p[8] + v*(p[14] + v*(p[20] + v*(p[28]))) + u*(p[13] + v*(p[19] + v*(p[27])) + u*(p[18] + v*(p[26]) + u*(p[25])))))*v; /* Radial terms? */ if (i[I_TPDRAD]) { s = u*u + v*v; r = sqrt(s); *discrd += r*(p[3] + s*(p[11] + s*(p[23]))); } return 0; } /*--------------------------------------------------------------------------*/ int tpd7( int inverse, const int i[], const double p[], int Nhat, const double rawcrd[], double *discrd) { double r, s, u, v; if (i[I_TPDNCO+inverse] != 40 || 2 < Nhat) { return 1; } u = rawcrd[0]; v = rawcrd[1]; /* Auxiliary variables? */ if (i[I_TPDAUX]) { r = p[0] + p[1]*u + p[2]*v; v = p[3] + p[4]*u + p[5]*v; u = r; p += 6; } if (inverse) p += i[I_TPDNCO]; /* Seventh degree. */ *discrd = p[0] + u*(p[1] + u*(p[4] + u*(p[7] + u*(p[12] + u*(p[17] + u*(p[24] + u*(p[31]))))))); if (Nhat == 1) return 0; *discrd += v*(p[2] + v*(p[6] + v*(p[10] + v*(p[16] + v*(p[22] + v*(p[30] + v*(p[38]))))))) + u*(p[5] + v*(p[9] + v*(p[15] + v*(p[21] + v*(p[29] + v*(p[37]))))) + u*(p[8] + v*(p[14] + v*(p[20] + v*(p[28] + v*(p[36])))) + u*(p[13] + v*(p[19] + v*(p[27] + v*(p[35]))) + u*(p[18] + v*(p[26] + v*(p[34])) + u*(p[25] + v*(p[33]) + u*(p[32]))))))*v; /* Radial terms? */ if (i[I_TPDRAD]) { s = u*u + v*v; r = sqrt(s); *discrd += r*(p[3] + s*(p[11] + s*(p[23] + s*(p[39])))); } return 0; } /*--------------------------------------------------------------------------*/ int tpd8( int inverse, const int i[], const double p[], int Nhat, const double rawcrd[], double *discrd) { double r, s, u, v; if (i[I_TPDNCO+inverse] != 49 || 2 < Nhat) { return 1; } u = rawcrd[0]; v = rawcrd[1]; /* Auxiliary variables? */ if (i[I_TPDAUX]) { r = p[0] + p[1]*u + p[2]*v; v = p[3] + p[4]*u + p[5]*v; u = r; p += 6; } if (inverse) p += i[I_TPDNCO]; /* Eighth degree. */ *discrd = p[0] + u*(p[1] + u*(p[4] + u*(p[7] + u*(p[12] + u*(p[17] + u*(p[24] + u*(p[31] + u*(p[40])))))))); if (Nhat == 1) return 0; *discrd += v*(p[2] + v*(p[6] + v*(p[10] + v*(p[16] + v*(p[22] + v*(p[30] + v*(p[38] + v*(p[48])))))))) + u*(p[5] + v*(p[9] + v*(p[15] + v*(p[21] + v*(p[29] + v*(p[37] + v*(p[47])))))) + u*(p[8] + v*(p[14] + v*(p[20] + v*(p[28] + v*(p[36] + v*(p[46]))))) + u*(p[13] + v*(p[19] + v*(p[27] + v*(p[35] + v*(p[45])))) + u*(p[18] + v*(p[26] + v*(p[34] + v*(p[44]))) + u*(p[25] + v*(p[33] + v*(p[43])) + u*(p[32] + v*(p[42]) + u*(p[41])))))))*v; /* Radial terms? */ if (i[I_TPDRAD]) { s = u*u + v*v; r = sqrt(s); *discrd += r*(p[3] + s*(p[11] + s*(p[23] + s*(p[39])))); } return 0; } /*--------------------------------------------------------------------------*/ int tpd9( int inverse, const int i[], const double p[], int Nhat, const double rawcrd[], double *discrd) { double r, s, u, v; if (i[I_TPDNCO+inverse] != 60 || 2 < Nhat) { return 1; } u = rawcrd[0]; v = rawcrd[1]; /* Auxiliary variables? */ if (i[I_TPDAUX]) { r = p[0] + p[1]*u + p[2]*v; v = p[3] + p[4]*u + p[5]*v; u = r; p += 6; } if (inverse) p += i[I_TPDNCO]; /* Ninth degree. */ *discrd = p[0] + u*(p[1] + u*(p[4] + u*(p[7] + u*(p[12] + u*(p[17] + u*(p[24] + u*(p[31] + u*(p[40] + u*(p[49]))))))))); if (Nhat == 1) return 0; *discrd += v*(p[2] + v*(p[6] + v*(p[10] + v*(p[16] + v*(p[22] + v*(p[30] + v*(p[38] + v*(p[48] + v*(p[58]))))))))) + u*(p[5] + v*(p[9] + v*(p[15] + v*(p[21] + v*(p[29] + v*(p[37] + v*(p[47] + v*(p[57]))))))) + u*(p[8] + v*(p[14] + v*(p[20] + v*(p[28] + v*(p[36] + v*(p[46] + v*(p[56])))))) + u*(p[13] + v*(p[19] + v*(p[27] + v*(p[35] + v*(p[45] + v*(p[55]))))) + u*(p[18] + v*(p[26] + v*(p[34] + v*(p[44] + v*(p[54])))) + u*(p[25] + v*(p[33] + v*(p[43] + v*(p[53]))) + u*(p[32] + v*(p[42] + v*(p[52])) + u*(p[41] + v*(p[51]) + u*(p[50]))))))))*v; /* Radial terms? */ if (i[I_TPDRAD]) { s = u*u + v*v; r = sqrt(s); *discrd += r*(p[3] + s*(p[11] + s*(p[23] + s*(p[39] + s*(p[59]))))); } return 0; } astropy-1.1.1/cextern/wcslib/C/wcshdr.c0000644001134200020070000016330712644017723020712 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcshdr.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include #include #include "wcserr.h" #include "wcsmath.h" #include "wcsutil.h" #include "wcshdr.h" #include "tab.h" #include "dis.h" #include "wcs.h" extern const int WCSSET; extern const int DIS_DOTPD; /* Map status return value to message. */ const char *wcshdr_errmsg[] = { "Success", "Null wcsprm pointer passed", "Memory allocation failed", "Invalid column selection", "Fatal error returned by Flex parser", "Invalid tabular parameters"}; /* Map error returns for lower-level routines. */ const int wcshdr_taberr[] = { WCSHDRERR_SUCCESS, /* 0: TABERR_SUCCESS */ WCSHDRERR_NULL_POINTER, /* 1: TABERR_NULL_POINTER */ WCSHDRERR_MEMORY, /* 2: TABERR_MEMORY */ WCSHDRERR_BAD_TABULAR_PARAMS /* 3: TABERR_BAD_PARAMS */ /* 4: TABERR_BAD_X */ /* 5: TABERR_BAD_WORLD */ }; /* Convenience macro for invoking wcserr_set(). */ #define WCSHDR_ERRMSG(status) WCSERR_SET(status), wcshdr_errmsg[status] /* Internal helper functions, not for general use. */ static void wcshdo_format(int, int, const double [], char *); static void wcshdo_tpdterm(int, int, char *); static void wcshdo_util(int, const char [], const char [], int, const char [], int, int, int, char, int, int [], char [], const char [], int *, char **, int *); /*--------------------------------------------------------------------------*/ int wcstab(struct wcsprm *wcs) { static const char *function = "wcstab"; char (*PSi_0a)[72] = 0x0, (*PSi_1a)[72] = 0x0, (*PSi_2a)[72] = 0x0; int *PVi_1a = 0x0, *PVi_2a = 0x0, *PVi_3a = 0x0, *tabax, *tabidx = 0x0; int getcrd, i, ip, itab, itabax, j, jtabax, m, naxis, ntabax, status; struct wtbarr *wtbp; struct tabprm *tabp; struct wcserr **err; if (wcs == 0x0) return WCSHDRERR_NULL_POINTER; err = &(wcs->err); /* Free memory previously allocated by wcstab(). */ if (wcs->flag != -1 && wcs->m_flag == WCSSET) { if (wcs->wtb == wcs->m_wtb) wcs->wtb = 0x0; if (wcs->tab == wcs->m_tab) wcs->tab = 0x0; if (wcs->m_wtb) free(wcs->m_wtb); if (wcs->m_tab) { for (j = 0; j < wcs->ntab; j++) { tabfree(wcs->m_tab + j); } free(wcs->m_tab); } } wcs->ntab = 0; wcs->nwtb = 0; wcs->wtb = 0x0; wcs->tab = 0x0; /* Determine the number of -TAB axes. */ naxis = wcs->naxis; if (!(tabax = calloc(naxis, sizeof(int)))) { return wcserr_set(WCSHDR_ERRMSG(WCSHDRERR_MEMORY)); } ntabax = 0; for (i = 0; i < naxis; i++) { /* Null fill. */ wcsutil_null_fill(72, wcs->ctype[i]); if (!strcmp(wcs->ctype[i]+4, "-TAB")) { tabax[i] = ntabax++; } else { tabax[i] = -1; } } if (ntabax == 0) { /* No lookup tables. */ status = 0; goto cleanup; } /* Collect information from the PSi_ma and PVi_ma keyvalues. */ if (!((PSi_0a = calloc(ntabax, sizeof(char[72]))) && (PVi_1a = calloc(ntabax, sizeof(int))) && (PVi_2a = calloc(ntabax, sizeof(int))) && (PSi_1a = calloc(ntabax, sizeof(char[72]))) && (PSi_2a = calloc(ntabax, sizeof(char[72]))) && (PVi_3a = calloc(ntabax, sizeof(int))) && (tabidx = calloc(ntabax, sizeof(int))))) { status = wcserr_set(WCSHDR_ERRMSG(WCSHDRERR_MEMORY)); goto cleanup; } for (itabax = 0; itabax < ntabax; itabax++) { /* Remember that calloc() zeroes allocated memory. */ PVi_1a[itabax] = 1; PVi_2a[itabax] = 1; PVi_3a[itabax] = 1; } for (ip = 0; ip < wcs->nps; ip++) { itabax = tabax[wcs->ps[ip].i - 1]; if (itabax >= 0) { switch (wcs->ps[ip].m) { case 0: /* EXTNAME. */ strcpy(PSi_0a[itabax], wcs->ps[ip].value); wcsutil_null_fill(72, PSi_0a[itabax]); break; case 1: /* TTYPEn for coordinate array. */ strcpy(PSi_1a[itabax], wcs->ps[ip].value); wcsutil_null_fill(72, PSi_1a[itabax]); break; case 2: /* TTYPEn for index vector. */ strcpy(PSi_2a[itabax], wcs->ps[ip].value); wcsutil_null_fill(72, PSi_2a[itabax]); break; } } } for (ip = 0; ip < wcs->npv; ip++) { itabax = tabax[wcs->pv[ip].i - 1]; if (itabax >= 0) { switch (wcs->pv[ip].m) { case 1: /* EXTVER. */ PVi_1a[itabax] = (int)(wcs->pv[ip].value + 0.5); break; case 2: /* EXTLEVEL. */ PVi_2a[itabax] = (int)(wcs->pv[ip].value + 0.5); break; case 3: /* Table axis number. */ PVi_3a[itabax] = (int)(wcs->pv[ip].value + 0.5); break; } } } /* Determine the number of independent tables. */ for (itabax = 0; itabax < ntabax; itabax++) { /* These have no defaults. */ if (!PSi_0a[itabax][0] || !PSi_1a[itabax][0]) { status = wcserr_set(WCSERR_SET(WCSHDRERR_BAD_TABULAR_PARAMS), "Invalid tabular parameters: PSi_0a and PSi_1a must be specified"); goto cleanup; } tabidx[itabax] = -1; for (jtabax = 0; jtabax < i; jtabax++) { /* EXTNAME, EXTVER, EXTLEVEL, and TTYPEn for the coordinate array */ /* must match for each axis of a multi-dimensional lookup table. */ if (strcmp(PSi_0a[itabax], PSi_0a[jtabax]) == 0 && strcmp(PSi_1a[itabax], PSi_1a[jtabax]) == 0 && PVi_1a[itabax] == PVi_1a[jtabax] && PVi_2a[itabax] == PVi_2a[jtabax]) { tabidx[itabax] = tabidx[jtabax]; break; } } if (jtabax == itabax) { tabidx[itabax] = wcs->ntab; wcs->ntab++; } } if (!(wcs->tab = calloc(wcs->ntab, sizeof(struct tabprm)))) { status = wcserr_set(WCSHDR_ERRMSG(WCSHDRERR_MEMORY)); goto cleanup; } wcs->m_tab = wcs->tab; /* Table dimensionality; find the largest axis number. */ for (itabax = 0; itabax < ntabax; itabax++) { tabp = wcs->tab + tabidx[itabax]; /* PVi_3a records the 1-relative table axis number. */ if (PVi_3a[itabax] > tabp->M) { tabp->M = PVi_3a[itabax]; } } for (itab = 0; itab < wcs->ntab; itab++) { if ((status = tabini(1, wcs->tab[itab].M, 0, wcs->tab + itab))) { status = wcserr_set(WCSHDR_ERRMSG(wcshdr_taberr[status])); goto cleanup; } } /* Copy parameters into the tabprm structs. */ for (i = 0; i < naxis; i++) { if ((itabax = tabax[i]) < 0) { /* Not a -TAB axis. */ continue; } /* PVi_3a records the 1-relative table axis number. */ m = PVi_3a[itabax] - 1; tabp = wcs->tab + tabidx[itabax]; tabp->map[m] = i; tabp->crval[m] = wcs->crval[i]; } /* Check for completeness. */ for (itab = 0; itab < wcs->ntab; itab++) { for (m = 0; m < wcs->tab[itab].M; m++) { if (wcs->tab[itab].map[m] < 0) { status = wcserr_set(WCSERR_SET(WCSHDRERR_BAD_TABULAR_PARAMS), "Invalid tabular parameters: the axis mapping is undefined"); goto cleanup; } } } /* Set up for reading the arrays; how many arrays are there? */ for (itabax = 0; itabax < ntabax; itabax++) { /* Does this -TAB axis have a non-degenerate index array? */ if (PSi_2a[itabax][0]) { wcs->nwtb++; } } /* Add one coordinate array for each table. */ wcs->nwtb += wcs->ntab; /* Allocate memory for structs to be returned. */ if (!(wcs->wtb = calloc(wcs->nwtb, sizeof(struct wtbarr)))) { wcs->nwtb = 0; status = wcserr_set(WCSHDR_ERRMSG(WCSHDRERR_MEMORY)); goto cleanup; } wcs->m_wtb = wcs->wtb; /* Set pointers for the index and coordinate arrays. */ wtbp = wcs->wtb; for (itab = 0; itab < wcs->ntab; itab++) { getcrd = 1; for (itabax = 0; itabax < ntabax; itabax++) { if (tabidx[itabax] != itab) continue; if (getcrd) { /* Coordinate array. */ wtbp->i = itabax + 1; wtbp->m = PVi_3a[itabax]; wtbp->kind = 'c'; strcpy(wtbp->extnam, PSi_0a[itabax]); wtbp->extver = PVi_1a[itabax]; wtbp->extlev = PVi_2a[itabax]; strcpy(wtbp->ttype, PSi_1a[itabax]); wtbp->row = 1L; wtbp->ndim = wcs->tab[itab].M + 1; wtbp->dimlen = wcs->tab[itab].K; wtbp->arrayp = &(wcs->tab[itab].coord); /* Signal for tabset() to take this memory. */ wcs->tab[itab].m_coord = (double *)0x1; wtbp++; getcrd = 0; } if (PSi_2a[itabax][0]) { /* Index array. */ wtbp->i = itabax + 1; wtbp->m = PVi_3a[itabax]; wtbp->kind = 'i'; m = wtbp->m - 1; strcpy(wtbp->extnam, PSi_0a[itabax]); wtbp->extver = PVi_1a[itabax]; wtbp->extlev = PVi_2a[itabax]; strcpy(wtbp->ttype, PSi_2a[itabax]); wtbp->row = 1L; wtbp->ndim = 1; wtbp->dimlen = wcs->tab[itab].K + m; wtbp->arrayp = wcs->tab[itab].index + m; /* Signal for tabset() to take this memory. */ wcs->tab[itab].m_indxs[m] = (double *)0x1; wtbp++; } } } status = 0; cleanup: if (tabax) free(tabax); if (tabidx) free(tabidx); if (PSi_0a) free(PSi_0a); if (PVi_1a) free(PVi_1a); if (PVi_2a) free(PVi_2a); if (PSi_1a) free(PSi_1a); if (PSi_2a) free(PSi_2a); if (PVi_3a) free(PVi_3a); if (status) { if (wcs->tab) free(wcs->tab); if (wcs->wtb) free(wcs->wtb); } return status; } /*--------------------------------------------------------------------------*/ int wcsidx(int nwcs, struct wcsprm **wcs, int alts[27]) { int a, iwcs; struct wcsprm *wcsp; for (a = 0; a < 27; a++) { alts[a] = -1; } if (wcs == 0x0) { return WCSHDRERR_NULL_POINTER; } wcsp = *wcs; for (iwcs = 0; iwcs < nwcs; iwcs++, wcsp++) { if (wcsp->colnum || wcsp->colax[0]) continue; if (wcsp->alt[0] == ' ') { a = 0; } else { a = wcsp->alt[0] - 'A' + 1; } alts[a] = iwcs; } return 0; } /*--------------------------------------------------------------------------*/ int wcsbdx(int nwcs, struct wcsprm **wcs, int type, short alts[1000][28]) { short *ip; int a, i, icol, iwcs; struct wcsprm *wcsp; for (ip = alts[0]; ip < alts[0] + 28*1000; ip++) { *ip = -1; } for (icol = 0; icol < 1000; icol++) { alts[icol][27] = 0; } if (wcs == 0x0) { return WCSHDRERR_NULL_POINTER; } wcsp = *wcs; for (iwcs = 0; iwcs < nwcs; iwcs++, wcsp++) { if (wcsp->alt[0] == ' ') { a = 0; } else { a = wcsp->alt[0] - 'A' + 1; } if (type) { /* Pixel list. */ if (wcsp->colax[0]) { for (i = 0; i < wcsp->naxis; i++) { alts[wcsp->colax[i]][a] = iwcs; alts[wcsp->colax[i]][27]++; } } else if (!wcsp->colnum) { alts[0][a] = iwcs; alts[0][27]++; } } else { /* Binary table image array. */ if (wcsp->colnum) { alts[wcsp->colnum][a] = iwcs; alts[wcsp->colnum][27]++; } else if (!wcsp->colax[0]) { alts[0][a] = iwcs; alts[0][27]++; } } } return 0; } /*--------------------------------------------------------------------------*/ int wcsvfree(int *nwcs, struct wcsprm **wcs) { int a, status = 0; struct wcsprm *wcsp; if (wcs == 0x0) { return WCSHDRERR_NULL_POINTER; } wcsp = *wcs; for (a = 0; a < *nwcs; a++, wcsp++) { status |= wcsfree(wcsp); } free(*wcs); *nwcs = 0; *wcs = 0x0; return status; } /*--------------------------------------------------------------------------*/ #define I_DTYPE 0 /* Distortion type code. */ #define I_NIPARM 1 /* Full (allocated) length of iparm[]. */ #define I_NDPARM 2 /* No. of parameters in dparm[], excl. work space. */ #define I_DOCORR 3 /* True if distortion func computes a correction. */ #define I_TPDNCO 4 /* No. of TPD coefficients, forward... */ #define I_TPDINV 5 /* ...and inverse. */ #define I_TPDAUX 6 /* True if auxiliary variables are used. */ #define I_TPDRAD 7 /* True if the radial variable is used. */ int wcshdo(int relax, struct wcsprm *wcs, int *nkeyrec, char **header) /* ::: CUBEFACE and STOKES handling? */ { static const char *function = "wcshdo"; const char axid[] = "xyxuvu", *cp; const int nTPD[] = {1, 4, 7, 12, 17, 24, 31, 40, 49, 60}; char alt, comment[72], ctemp[32], *ctypei, format[8], fmt01[8], keyvalue[72], keyword[16], *kp, *kp0, obsg[8] = "OBSG?", obsgeo[8] = "OBSGEO-?", pq, ptype, xtype, term[16], tpdsrc[24], xyz[] = "XYZ"; int *axmap, bintab, col0, *colax, colnum, degree, direct, doaux, dosip, dotpd, dotpv, i, idis, idp, *iparm, j, jhat, k, m, naxis, ncoeff, Nhat, p, pixlist, precision, primage, q, status = 0; double *dparm, keyval; struct disprm *dis; struct dpkey *keyp; struct wcserr **err; *nkeyrec = 0; *header = 0x0; if (wcs == 0x0) return WCSHDRERR_NULL_POINTER; err = &(wcs->err); if (wcs->flag != WCSSET) { if ((status = wcsset(wcs))) return status; } if ((naxis = wcs->naxis) == 0) { return 0; } /* These are mainly for convenience. */ alt = wcs->alt[0]; if (alt == ' ') alt = '\0'; colnum = wcs->colnum; colax = wcs->colax; primage = 0; bintab = 0; pixlist = 0; if (colnum) { bintab = 1; col0 = colnum; } else if (colax[0]) { pixlist = 1; col0 = colax[0]; } else { primage = 1; } /* WCS dimension. */ if (!pixlist) { sprintf(keyvalue, "%20d", naxis); wcshdo_util(relax, "WCSAXES", "WCAX", 0, 0x0, 0, 0, 0, alt, colnum, colax, keyvalue, "Number of coordinate axes", nkeyrec, header, &status); } /* Reference pixel coordinates. */ wcshdo_format('G', naxis, wcs->crpix, format); for (j = 0; j < naxis; j++) { wcsutil_double2str(keyvalue, format, wcs->crpix[j]); wcshdo_util(relax, "CRPIX", "CRP", WCSHDO_CRPXna, "CRPX", 0, j+1, 0, alt, colnum, colax, keyvalue, "Pixel coordinate of reference point", nkeyrec, header, &status); } /* Linear transformation matrix. */ wcshdo_format('G', naxis*naxis, wcs->pc, format); k = 0; for (i = 0; i < naxis; i++) { for (j = 0; j < naxis; j++, k++) { if (i == j) { if (wcs->pc[k] == 1.0) continue; } else { if (wcs->pc[k] == 0.0) continue; } wcsutil_double2str(keyvalue, format, wcs->pc[k]); wcshdo_util(relax, "PC", bintab ? "PC" : "P", WCSHDO_TPCn_ka, bintab ? 0x0 : "PC", i+1, j+1, 0, alt, colnum, colax, keyvalue, "Coordinate transformation matrix element", nkeyrec, header, &status); } } /* Coordinate increment at reference point. */ wcshdo_format('G', naxis, wcs->cdelt, format); for (i = 0; i < naxis; i++) { wcsutil_double2str(keyvalue, format, wcs->cdelt[i]); comment[0] = '\0'; if (wcs->cunit[i][0]) sprintf(comment, "[%s] ", wcs->cunit[i]); strcat(comment, "Coordinate increment at reference point"); wcshdo_util(relax, "CDELT", "CDE", WCSHDO_CRPXna, "CDLT", i+1, 0, 0, alt, colnum, colax, keyvalue, comment, nkeyrec, header, &status); } /* Units of coordinate increment and reference value. */ for (i = 0; i < naxis; i++) { if (wcs->cunit[i][0] == '\0') continue; sprintf(keyvalue, "'%s'", wcs->cunit[i]); wcshdo_util(relax, "CUNIT", "CUN", WCSHDO_CRPXna, "CUNI", i+1, 0, 0, alt, colnum, colax, keyvalue, "Units of coordinate increment and value", nkeyrec, header, &status); } /* May need to alter ctype for particular distortions so do basic checks */ /* now. Note that SIP, TPV, DSS, TNX, and ZPX are restricted to exactly */ /* two axes and cannot coexist with other distortion types. */ dosip = 0; dotpv = 0; dotpd = 0; if ((dis = wcs->lin.dispre)) { for (i = 0; i < naxis; i++) { if (strcmp(dis->dtype[i], "SIP") == 0) { /* Simple Imaging Polynomial (SIP). Write it in its native form */ /* if possible, unless specifically requested to write it as TPD. */ dotpd = (dis->iparm[i][I_DTYPE] & DIS_DOTPD); if (!dotpd) {; if (alt || dis->Nhat[0] != 2 || dis->Nhat[1] != 2 || dis->axmap[0][0] != 0 || dis->axmap[0][1] != 1 || dis->axmap[1][0] != 0 || dis->axmap[1][1] != 1 || dis->offset[0][0] != wcs->crpix[0] || dis->offset[0][1] != wcs->crpix[1] || dis->offset[1][0] != wcs->crpix[0] || dis->offset[1][1] != wcs->crpix[1] || dis->scale[0][0] != 1.0 || dis->scale[0][1] != 1.0 || dis->scale[1][0] != 1.0 || dis->scale[1][1] != 1.0) { /* Must have been read as a 'SIP' distortion, CPDISja = 'SIP'. */ /* Cannot be written as native SIP so write it as TPD. */ dotpd = DIS_DOTPD; } else if (strncmp(wcs->ctype[0], "RA---TAN", 8) || strncmp(wcs->ctype[1], "DEC--TAN", 8)) { /* Must have been permuted by wcssub(). */ /* Native SIP doesn't have axis mapping so write it as TPD. */ dotpd = DIS_DOTPD; } if (dotpd) { strcpy(tpdsrc, "SIP coordinates"); } else { dosip = 1; } } break; } } } if ((dis = wcs->lin.disseq)) { for (i = 0; i < naxis; i++) { if (strcmp(dis->dtype[i], "TPV") == 0) { /* TPV "projection". Write it in its native form if possible, */ /* unless specifically requested to write it as TPD. */ dotpd = (dis->iparm[i][I_DTYPE] & DIS_DOTPD); if (!dotpd) {; if (dis->axmap[wcs->lng][0] != wcs->lng || dis->axmap[wcs->lng][1] != wcs->lat || dis->axmap[wcs->lat][0] != wcs->lat || dis->axmap[wcs->lat][1] != wcs->lng || dis->offset[wcs->lng][wcs->lng] != 0.0 || dis->offset[wcs->lng][wcs->lat] != 0.0 || dis->offset[wcs->lat][wcs->lng] != 0.0 || dis->offset[wcs->lat][wcs->lat] != 0.0 || dis->scale[wcs->lng][wcs->lng] != 1.0 || dis->scale[wcs->lng][wcs->lat] != 1.0 || dis->scale[wcs->lat][wcs->lng] != 1.0 || dis->scale[wcs->lat][wcs->lat] != 1.0) { /* Must have been read as a 'TPV' distortion, CPDISja = 'TPV'. */ /* Cannot be written as native TPV so write it as TPD. */ dotpd = DIS_DOTPD; } if (dotpd) { strcpy(tpdsrc, "TPV \"projection\""); } else { dotpv = 1; } } break; } else if (strcmp(dis->dtype[i], "DSS") == 0) { /* Always written as TPD. */ dotpd = DIS_DOTPD; strcpy(tpdsrc, dis->dtype[i]); } else if (strncmp(dis->dtype[i], "WAT", 3) == 0) { /* Always written as TPD. */ dotpd = DIS_DOTPD; strcpy(tpdsrc, dis->dtype[i]+4); if (strcmp(dis->dtype[i], "DSS") == 0) { strcpy(tpdsrc, wcs->wcsname); } else { strcat(tpdsrc, " \"projection\""); } break; } } } /* Coordinate type. */ for (i = 0; i < naxis; i++) { if (wcs->ctype[i][0] == '\0') continue; sprintf(keyvalue, "'%s'", wcs->ctype[i]); strcpy(comment, "Coordinate type code"); ctypei = keyvalue + 1; if (i == wcs->lng || i == wcs->lat) { /* Alter ctype for particular distortions. */ if (dosip) { /* It could have come in as CPDISja = 'SIP'. */ strcpy(ctypei+8, "-SIP'"); } else if (dotpv) { /* Reinstate projection code edited by wcsset(). */ strcpy(ctypei+4, "-TPV'"); } if (strncmp(ctypei+8, "-SIP", 4) == 0) { strcpy(comment, "TAN (gnomonic) projection + SIP distortions"); } else if (strncmp(ctypei+4, "-TPV", 4) == 0) { strcpy(comment, "TAN (gnomonic) projection + distortions"); } else { if (strncmp(ctypei, "RA--", 4) == 0) { strcpy(comment, "Right ascension, "); } else if (strncmp(ctypei, "DEC-", 4) == 0) { strcpy(comment, "Declination, "); } else if (strncmp(ctypei+1, "LON", 3) == 0 || strncmp(ctypei+1, "LAT", 3) == 0) { ctypei[0] = toupper(ctypei[0]); switch (ctypei[0]) { case 'G': strcpy(comment, "galactic "); break; case 'E': strcpy(comment, "ecliptic "); break; case 'H': strcpy(comment, "helioecliptic "); break; case 'S': strcpy(comment, "supergalactic "); break; } if (i == wcs->lng) { strcat(comment, "longitude, "); } else { strcat(comment, "latitude, "); } } strcat(comment, wcs->cel.prj.name); strcat(comment, " projection"); } } else if (i == wcs->spec) { spctyp(wcs->ctype[i], 0x0, 0x0, comment, 0x0, &ptype, &xtype, 0x0); if (ptype == xtype) { strcat(comment, " (linear)"); } else { switch (xtype) { case 'F': strcat(comment, " (linear in frequency)"); break; case 'V': strcat(comment, " (linear in velocity)"); break; case 'W': strcat(comment, " (linear in wavelength)"); break; } } } wcshdo_util(relax, "CTYPE", "CTY", WCSHDO_CRPXna, "CTYP", i+1, 0, 0, alt, colnum, colax, keyvalue, comment, nkeyrec, header, &status); } /* Coordinate value at reference point. */ wcshdo_format('G', naxis, wcs->crval, format); for (i = 0; i < naxis; i++) { wcsutil_double2str(keyvalue, format, wcs->crval[i]); comment[0] = '\0'; if (wcs->cunit[i][0]) sprintf(comment, "[%s] ", wcs->cunit[i]); strcat(comment, "Coordinate value at reference point"); wcshdo_util(relax, "CRVAL", "CRV", WCSHDO_CRPXna, "CRVL", i+1, 0, 0, alt, colnum, colax, keyvalue, comment, nkeyrec, header, &status); } /* Parameter values. */ for (k = 0; k < wcs->npv; k++) { wcsutil_double2str(keyvalue, "%20.12G", (wcs->pv[k]).value); if ((wcs->pv[k]).i == (wcs->lng + 1)) { switch ((wcs->pv[k]).m) { case 1: strcpy(comment, "[deg] Native longitude of the reference point"); break; case 2: strcpy(comment, "[deg] Native latitude of the reference point"); break; case 3: if (primage) { sprintf(keyword, "LONPOLE%c", alt); } else if (bintab) { sprintf(keyword, "LONP%d%c", colnum, alt); } else { sprintf(keyword, "LONP%d%c", colax[(wcs->pv[k]).i - 1], alt); } sprintf(comment, "[deg] alias for %s (has precedence)", keyword); break; case 4: if (primage) { sprintf(keyword, "LATPOLE%c", alt); } else if (bintab) { sprintf(keyword, "LATP%d%c", colnum, alt); } else { sprintf(keyword, "LATP%d%c", colax[(wcs->pv[k]).i - 1], alt); } sprintf(comment, "[deg] alias for %s (has precedence)", keyword); break; } } else if ((wcs->pv[k]).i == (wcs->lat + 1)) { sprintf(comment, "%s projection parameter", wcs->cel.prj.code); } else { strcpy(comment, "Coordinate transformation parameter"); } wcshdo_util(relax, "PV", "V", WCSHDO_PVn_ma, "PV", wcs->pv[k].i, -1, wcs->pv[k].m, alt, colnum, colax, keyvalue, comment, nkeyrec, header, &status); } for (k = 0; k < wcs->nps; k++) { sprintf(keyvalue, "'%s'", (wcs->ps[k]).value); wcshdo_util(relax, "PS", "S", WCSHDO_PVn_ma, "PS", wcs->ps[k].i, -1, wcs->ps[k].m, alt, colnum, colax, keyvalue, "Coordinate transformation parameter", nkeyrec, header, &status); } /* Celestial and spectral transformation parameters. */ if (!undefined(wcs->lonpole)) { wcsutil_double2str(keyvalue, "%20.12G", wcs->lonpole); wcshdo_util(relax, "LONPOLE", "LONP", 0, 0x0, 0, 0, 0, alt, colnum, colax, keyvalue, "[deg] Native longitude of celestial pole", nkeyrec, header, &status); } if (!undefined(wcs->latpole)) { wcsutil_double2str(keyvalue, "%20.12G", wcs->latpole); wcshdo_util(relax, "LATPOLE", "LATP", 0, 0x0, 0, 0, 0, alt, colnum, colax, keyvalue, "[deg] Native latitude of celestial pole", nkeyrec, header, &status); } if (wcs->restfrq != 0.0) { wcsutil_double2str(keyvalue, "%20.12G", wcs->restfrq); wcshdo_util(relax, "RESTFRQ", "RFRQ", 0, 0x0, 0, 0, 0, alt, colnum, colax, keyvalue, "[Hz] Line rest frequency", nkeyrec, header, &status); } if (wcs->restwav != 0.0) { wcsutil_double2str(keyvalue, "%20.12G", wcs->restwav); wcshdo_util(relax, "RESTWAV", "RWAV", 0, 0x0, 0, 0, 0, alt, colnum, colax, keyvalue, "[Hz] Line rest wavelength", nkeyrec, header, &status); } /* Coordinate system title. */ if (wcs->wcsname[0]) { sprintf(keyvalue, "'%s'", wcs->wcsname); if (bintab) { wcshdo_util(relax, "WCSNAME", "WCSN", 0, 0x0, 0, 0, 0, alt, colnum, colax, keyvalue, "Coordinate system title", nkeyrec, header, &status); } else { /* TWCS was a mistake. */ wcshdo_util(relax, "WCSNAME", "TWCS", WCSHDO_WCSNna, "WCSN", 0, 0, 0, alt, colnum, colax, keyvalue, "Coordinate system title", nkeyrec, header, &status); } } /* Coordinate axis title. */ if (wcs->cname) { for (i = 0; i < naxis; i++) { if (wcs->cname[i][0] == '\0') continue; sprintf(keyvalue, "'%s'", wcs->cname[i]); wcshdo_util(relax, "CNAME", "CNA", WCSHDO_CNAMna, "CNAM", i+1, 0, 0, alt, colnum, colax, keyvalue, "Axis name for labelling purposes", nkeyrec, header, &status); } } /* Random error in coordinate. */ if (wcs->crder) { for (i = 0; i < naxis; i++) { if (undefined(wcs->crder[i])) continue; wcsutil_double2str(keyvalue, "%20.12G", wcs->crder[i]); comment[0] = '\0'; if (wcs->cunit[i][0]) sprintf(comment, "[%s] ", wcs->cunit[i]); strcat(comment, "Random error in coordinate"); wcshdo_util(relax, "CRDER", "CRD", WCSHDO_CNAMna, "CRDE", i+1, 0, 0, alt, colnum, colax, keyvalue, comment, nkeyrec, header, &status); } } /* Systematic error in coordinate. */ if (wcs->csyer) { for (i = 0; i < naxis; i++) { if (undefined(wcs->csyer[i])) continue; wcsutil_double2str(keyvalue, "%20.12G", wcs->csyer[i]); comment[0] = '\0'; if (wcs->cunit[i][0]) sprintf(comment, "[%s] ", wcs->cunit[i]); strcat(comment, "Systematic error in coordinate"); wcshdo_util(relax, "CSYER", "CSY", WCSHDO_CNAMna, "CSYE", i+1, 0, 0, alt, colnum, colax, keyvalue, comment, nkeyrec, header, &status); } } /* Equatorial coordinate system type. */ if (wcs->radesys[0]) { sprintf(keyvalue, "'%s'", wcs->radesys); wcshdo_util(relax, "RADESYS", "RADE", 0, 0x0, 0, 0, 0, alt, colnum, colax, keyvalue, "Equatorial coordinate system", nkeyrec, header, &status); } /* Equinox of equatorial coordinate system. */ if (!undefined(wcs->equinox)) { wcsutil_double2str(keyvalue, "%20.12G", wcs->equinox); wcshdo_util(relax, "EQUINOX", "EQUI", 0, 0x0, 0, 0, 0, alt, colnum, colax, keyvalue, "[yr] Equinox of equatorial coordinates", nkeyrec, header, &status); } /* Reference frame of spectral coordinates. */ if (wcs->specsys[0]) { sprintf(keyvalue, "'%s'", wcs->specsys); wcshdo_util(relax, "SPECSYS", "SPEC", 0, 0x0, 0, 0, 0, alt, colnum, colax, keyvalue, "Reference frame of spectral coordinates", nkeyrec, header, &status); } /* Reference frame of spectral observation. */ if (wcs->ssysobs[0]) { sprintf(keyvalue, "'%s'", wcs->ssysobs); wcshdo_util(relax, "SSYSOBS", "SOBS", 0, 0x0, 0, 0, 0, alt, colnum, colax, keyvalue, "Reference frame of spectral observation", nkeyrec, header, &status); } /* Observer's velocity towards source. */ if (!undefined(wcs->velosys)) { wcsutil_double2str(keyvalue, "%20.12G", wcs->velosys); wcshdo_util(relax, "VELOSYS", "VSYS", 0, 0x0, 0, 0, 0, alt, colnum, colax, keyvalue, "[m/s] Velocity towards source", nkeyrec, header, &status); } /* Reference frame of source redshift. */ if (wcs->ssyssrc[0]) { sprintf(keyvalue, "'%s'", wcs->ssyssrc); wcshdo_util(relax, "SSYSSRC", "SSRC", 0, 0x0, 0, 0, 0, alt, colnum, colax, keyvalue, "Reference frame of source redshift", nkeyrec, header, &status); } /* Redshift of the source. */ if (!undefined(wcs->zsource)) { wcsutil_double2str(keyvalue, "%20.12G", wcs->zsource); wcshdo_util(relax, "ZSOURCE", "ZSOU", 0, 0x0, 0, 0, 0, alt, colnum, colax, keyvalue, "Redshift of the source", nkeyrec, header, &status); } /* Observatory coordinates. */ for (k = 0; k < 3; k++) { if (undefined(wcs->obsgeo[k])) continue; wcsutil_double2str(keyvalue, "%20.12G", wcs->obsgeo[k]); sprintf(comment, "[m] ITRF observatory %c-coordinate", xyz[k]); obsgeo[7] = xyz[k]; obsg[4] = xyz[k]; wcshdo_util(relax, obsgeo, obsg, 0, 0x0, 0, 0, 0, ' ', colnum, colax, keyvalue, comment, nkeyrec, header, &status); } /* MJD of observation. */ if (!undefined(wcs->mjdobs)) { wcsutil_double2str(keyvalue, "%20.12G", wcs->mjdobs); strcpy(comment, "[d] MJD of observation"); if (wcs->dateobs[0]) { if (primage || (relax & 1) == 0) { sprintf(comment+22, " matching DATE-OBS"); } else { sprintf(comment+22, " matching DOBS%d", col0); } } wcshdo_util(relax, "MJD-OBS", "MJDOB", 0, 0x0, 0, 0, 0, ' ', colnum, colax, keyvalue, comment, nkeyrec, header, &status); } /* MJD mid-observation time. */ if (!undefined(wcs->mjdavg)) { wcsutil_double2str(keyvalue, "%20.12G", wcs->mjdavg); strcpy(comment, "[d] MJD mid-observation"); if (wcs->dateavg[0]) { if (primage) { sprintf(comment+23, " matching DATE-AVG"); } else { sprintf(comment+23, " matching DAVG%d", col0); } } wcshdo_util(relax, "MJD-AVG", "MJDA", 0, 0x0, 0, 0, 0, ' ', colnum, colax, keyvalue, comment, nkeyrec, header, &status); } /* ISO-8601 date corresponding to MJD-OBS. */ if (wcs->dateobs[0]) { sprintf(keyvalue, "'%s'", wcs->dateobs); strcpy(comment, "ISO-8601 observation date"); if (!undefined(wcs->mjdobs)) { if (primage) { sprintf(comment+25, " matching MJD-OBS"); } else { sprintf(comment+25, " matching MJDOB%d", col0); } } if (relax & 1) { /* Allow DOBSn. */ wcshdo_util(relax, "DATE-OBS", "DOBS", WCSHDO_DOBSn, 0x0, 0, 0, 0, ' ', colnum, colax, keyvalue, comment, nkeyrec, header, &status); } else { /* Force DATE-OBS. */ wcshdo_util(relax, "DATE-OBS", 0x0, 0, 0x0, 0, 0, 0, ' ', 0, 0x0, keyvalue, comment, nkeyrec, header, &status); } } /* ISO-8601 date corresponding to MJD-OBS. */ if (wcs->dateavg[0]) { sprintf(keyvalue, "'%s'", wcs->dateavg); strcpy(comment, "ISO-8601 mid-observation date"); if (!undefined(wcs->mjdavg)) { if (primage) { sprintf(comment+29, " matching MJD-AVG"); } else { sprintf(comment+29, " matching MJDA%d", col0); } } wcshdo_util(relax, "DATE-AVG", "DAVG", 0, 0x0, 0, 0, 0, ' ', colnum, colax, keyvalue, comment, nkeyrec, header, &status); } /* Write distortion function parameters. */ if (dosip) { /* Simple Imaging Polynomial (SIP) is handled by translating its dpkey */ /* records. Determine a suitable numerical precision for the */ /* polynomial coefficients to avoid trailing zeroes common to all of */ /* them. */ dis = wcs->lin.dispre; keyp = dis->dp; kp0 = keyvalue + 2; for (idp = 0; idp < dis->ndp; idp++, keyp++) { cp = strchr(keyp->field, '.') + 1; if (strncmp(cp, "SIP.", 4) != 0) continue; wcsutil_double2str(keyvalue, "%20.13E", wcsutil_dpkey_double(keyp)); kp = keyvalue + 15; while (kp0 < kp && *kp == '0') kp--; kp0 = kp; } precision = kp - (keyvalue + 2); if (precision < 1) precision = 1; if (13 < precision) precision = 13; sprintf(format, "%%20.%dE", precision); /* Ensure the coefficients are written in a human-readable sequence. */ for (j = 0; j <= 1; j++) { /* Distortion function polynomial coefficients. */ wcshdo_util(relax, "", "", 0, 0x0, 0, 0, 0, ' ', 0, 0, "", "", nkeyrec, header, &status); if (j == 0) { strcpy(keyword, "A_"); } else { strcpy(keyword, "B_"); } ncoeff = dis->iparm[j][I_TPDNCO]; for (degree = 0; degree <= 9; degree++) { if (ncoeff <= nTPD[degree]) break; } strcpy(keyword+2, "ORDER"); sprintf(keyvalue, "%20d", degree); sprintf(comment, "SIP polynomial degree, axis %d, pixel-to-sky", j+1); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, ' ', 0, 0, keyvalue, comment, nkeyrec, header, &status); keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j != j+1) continue; if ((keyval = wcsutil_dpkey_double(keyp)) == 0.0) continue; cp = strchr(keyp->field, '.') + 1; if (strncmp(cp, "SIP.FWD.", 8) != 0) continue; cp += 8; strcpy(keyword+2, cp); sscanf(cp, "%d_%d", &p, &q); strncpy(term, "xxxxxxxxx", p); strncpy(term+p, "yyyyyyyyy", q); term[p+q] = '\0'; wcsutil_double2str(keyvalue, format, keyval); sprintf(comment, "SIP distortion coefficient: %s", term); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, ' ', 0, 0, keyvalue, comment, nkeyrec, header, &status); } if (dis->maxdis[j] != 0.0) { strcpy(keyword+2, "DMAX"); wcsutil_double2str(keyvalue, "%20.3f", dis->maxdis[j]); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, ' ', 0, 0, keyvalue, "Maximum value of distortion function", nkeyrec, header, &status); } /* Inverse distortion function polynomial coefficients. */ if (dis->disx2p == 0x0) continue; wcshdo_util(relax, "", "", 0, 0x0, 0, 0, 0, ' ', 0, 0, "", "", nkeyrec, header, &status); if (j == 0) { strcpy(keyword, "AP_"); } else { strcpy(keyword, "BP_"); } ncoeff = dis->iparm[j][I_NDPARM] - dis->iparm[j][I_TPDNCO]; for (degree = 0; degree <= 9; degree++) { if (ncoeff <= nTPD[degree]) break; } strcpy(keyword+3, "ORDER"); sprintf(keyvalue, "%20d", degree); sprintf(comment, "SIP polynomial degree, axis %d, sky-to-pixel", j+1); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, ' ', 0, 0, keyvalue, comment, nkeyrec, header, &status); keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j != j+1) continue; if ((keyval = wcsutil_dpkey_double(keyp)) == 0.0) continue; cp = strchr(keyp->field, '.') + 1; if (strncmp(cp, "SIP.REV.", 8) != 0) continue; cp += 8; strcpy(keyword+3, cp); sscanf(cp, "%d_%d", &p, &q); strncpy(term, "xxxxxxxxx", p); strncpy(term+p, "yyyyyyyyy", q); term[p+q] = '\0'; wcsutil_double2str(keyvalue, format, keyval); sprintf(comment, "SIP inverse coefficient: %s", term); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, ' ', 0, 0, keyvalue, comment, nkeyrec, header, &status); } } } for (idis = 0; idis < 2; idis++) { if (idis == 0 && (dis = wcs->lin.dispre) == 0x0) continue; if (idis == 1 && (dis = wcs->lin.disseq) == 0x0) continue; for (j = 0; j < naxis; j++) { if (dis->disp2x[j] == 0x0) continue; iparm = dis->iparm[j]; dparm = dis->dparm[j]; /* Identify the distortion type. */ if (dotpv) { /* TPV "projection" is handled by translating its dpkey records, */ /* which were originally translated from PVi_ma by wcsset(), or */ /* possibly input directly as a CQDISia = 'TPV' distortion type. */ /* Determine a suitable numerical precision for the polynomial */ /* coefficients to avoid trailing zeroes common to all of them. */ wcshdo_format('E', iparm[I_NDPARM], dparm, format); sprintf(fmt01, "%.3ss", format); wcshdo_util(relax, "", "", 0, 0x0, 0, 0, 0, ' ', 0, 0, "", "", nkeyrec, header, &status); /* Distortion function polynomial coefficients. */ sprintf(keyword, "PV%d_", j+1); kp = keyword + strlen(keyword); keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j != j+1) continue; if ((keyval = wcsutil_dpkey_double(keyp)) == 0.0) continue; cp = strchr(keyp->field, '.') + 1; if (strncmp(cp, "TPV.", 4) != 0) continue; strcpy(kp, cp+4); /* Identify the term of the TPV polynomial for human readers. */ sscanf(cp+4, "%d", &m); wcshdo_tpdterm(m, j == wcs->lng, term); sprintf(comment, "TPV coefficient: %s", term); if (keyval == 1.0) { sprintf(keyvalue, fmt01, "1.0"); } else { wcsutil_double2str(keyvalue, format, keyval); } wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); } } else if (strcmp(dis->dtype[j], "TPD") == 0 || dotpd || strcmp(dis->dtype[j], "Polynomial") == 0 || strcmp(dis->dtype[j], "Polynomial*") == 0) { /* One of the Paper IV type polynomial distortions. */ wcshdo_util(relax, "", "", 0, 0x0, 0, 0, 0, ' ', 0, 0, "", "", nkeyrec, header, &status); if (strcmp(dis->dtype[j], "TPD") == 0) { /* Pure TPD. */ dotpd = 1; } else if (strncmp(dis->dtype[j], "Polynomial", 10) == 0) { /* Polynomial distortion. Write it as TPD by request? */ dotpd = (iparm[I_DTYPE] & DIS_DOTPD); strcpy(tpdsrc, "Polynomial distortion"); } pq = idis ? 'Q' : 'P'; Nhat = dis->Nhat[j]; /* CPDISja/CQDISia */ sprintf(keyword, "C%cDIS%d", pq, j+1); if (idis == 0) { strcpy(comment, "P = prior, "); } else { strcpy(comment, "Q = sequent, "); } if (dotpd) { strcpy(keyvalue, "'TPD'"); strcat(comment, "Template Polynomial Distortion"); /* For identifying terms of the TPD polynomial. */ axmap = dis->axmap[j]; direct = 1; doaux = iparm[I_TPDAUX]; if (Nhat == 2) { /* Associate x with longitude, y with latitude. */ if (axmap[0] == wcs->lng && axmap[1] == wcs->lat) { direct = 1; } else if (axmap[0] == wcs->lat && axmap[1] == wcs->lng) { direct = 0; } else { /* Non-celestial. */ direct = (axmap[0] < axmap[1]); } } } else { strcpy(keyvalue, "'Polynomial'"); strcat(comment, "general Polynomial distortion"); } wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); /* NAXES. */ sprintf(keyword, "D%c%d", pq, j+1); sprintf(keyvalue, "'NAXES: %d'", Nhat); if (Nhat == 1) { strcpy(comment, "One independent variable"); } else if (Nhat == 2) { strcpy(comment, "Two independent variables"); } else { strcpy(comment, "Number of independent variables"); } wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); /* AXIS.jhat */ for (jhat = 0; jhat < Nhat; jhat++) { axmap = dis->axmap[j]; sprintf(keyvalue, "'AXIS.%d: %d'", jhat+1, axmap[jhat]+1); if (jhat == 0) { strcpy(comment, "1st"); } else if (jhat == 1) { strcpy(comment, "2nd"); } else if (jhat == 2) { strcpy(comment, "3rd"); } else { sprintf(comment, "%dth", jhat+1); } sprintf(comment+strlen(comment), " independent variable: axis %d", axmap[jhat]+1); if (dotpd) { /* axid is "xyxuvu". */ cp = axid; if (!direct) cp++; if (doaux) cp += 3; sprintf(comment+strlen(comment), " (= %c)", cp[jhat]); } wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); } /* OFFSET.jhat */ wcshdo_format('f', Nhat, dis->offset[j], format); for (jhat = 0; jhat < Nhat; jhat++) { if (dis->offset[j][jhat] == 0.0) continue; wcsutil_double2str(ctemp, format, dis->offset[j][jhat]); sprintf(keyvalue, "'OFFSET.%d: %s'", jhat+1, ctemp); sprintf(comment, "Variable %d renormalization offset", jhat+1); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); } /* SCALE.jhat */ wcshdo_format('f', Nhat, dis->scale[j], format); for (jhat = 0; jhat < Nhat; jhat++) { if (dis->scale[j][jhat] == 1.0) continue; wcsutil_double2str(ctemp, format, dis->scale[j][jhat]); sprintf(keyvalue, "'SCALE.%d: %s'", jhat+1, ctemp); sprintf(comment, "Variable %d renormalization scale", jhat+1); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); } /* Does the distortion function compute a correction? */ if (iparm[I_DOCORR]) { wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, "'DOCORR: 1'", "Distortion function computes a correction", nkeyrec, header, &status); } if (dotpd) { /* Template Polynomial Distortion (TPD). As it may have been */ /* translated from SIP, TPV, DSS, TNX, ZPX, or perhaps */ /* Polynomial, the dpkey records may not relate to TPD. */ /* Output is therefore handled via dparm. */ wcshdo_format('E', iparm[I_NDPARM], dparm, format); sprintf(fmt01, "%.3ss", format); /* AUX.jhat.COEFF.m */ if (doaux) { for (idp = 0; idp < 6; idp++) { if (dparm[idp] == 0.0) { sprintf(ctemp, fmt01, "0.0"); } else if (dparm[idp] == 1.0) { sprintf(ctemp, fmt01, "1.0"); } else { wcsutil_double2str(ctemp, format, dparm[idp]); } if (idp < 3) { sprintf(keyvalue, "'AUX.1.COEFF.%d: %s'", idp%3, ctemp); sprintf(comment, "TPD: x = c0 + c1*u + c2*v"); } else { sprintf(keyvalue, "'AUX.2.COEFF.%d: %s'", idp%3, ctemp); sprintf(comment, "TPD: y = d0 + d1*u + d2*v"); } wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); } dparm += 6; } /* TPD.FWD.m */ for (idp = 0; idp < iparm[I_TPDNCO]; idp++) { if (dparm[idp] == 0.0) continue; if (dparm[idp] == 1.0) { sprintf(ctemp, fmt01, "1.0"); } else { wcsutil_double2str(ctemp, format, dparm[idp]); } m = idp; sprintf(keyvalue, "'TPD.FWD.%d:%s %s'", m, (m<10)?" ":"", ctemp); wcshdo_tpdterm(m, direct, term); sprintf(comment, "TPD coefficient: %s", term); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); } /* CPERRja/CQERRia */ if (dis->maxdis[j] != 0.0) { sprintf(keyword, "C%cERR%d", pq, j+1); sprintf(keyvalue, "%20.2f", dis->maxdis[j]); sprintf(comment, "%sMaximum absolute value of distortion", idis?"":"[pix] "); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); } /* Inverse distortion function polynomial coefficients. */ if (dis->disx2p[j] == 0x0) continue; wcshdo_util(relax, "", "", 0, 0x0, 0, 0, 0, ' ', 0, 0, "", "", nkeyrec, header, &status); /* TPD.REV.m */ sprintf(keyword, "D%c%d", pq, j+1); for (idp = iparm[I_TPDNCO]; idp < iparm[I_NDPARM]; idp++) { if (dparm[idp] == 0.0) continue; wcsutil_double2str(ctemp, format, dparm[idp]); m = idp - iparm[I_TPDNCO]; sprintf(keyvalue, "'TPD.REV.%d:%s %s'", m, (m<10)?" ":"", ctemp); wcshdo_tpdterm(m, direct, term); sprintf(comment, "TPD coefficient: %s", term); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); } } else { /* General polynomial distortion, handled via its dpkey records */ /* since iparm and dparm may hold a translation to TPD. */ /* Do auxiliary variables first. */ keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j != j+1) continue; cp = strchr(keyp->field, '.') + 1; if (strncmp(cp, "NAUX", 4) != 0) continue; sprintf(keyvalue, "'%s: %d'", cp, wcsutil_dpkey_int(keyp)); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, "Number of auxiliary variables", nkeyrec, header, &status); keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j != j+1) continue; keyval = wcsutil_dpkey_double(keyp); cp = strchr(keyp->field, '.') + 1; if (strncmp(cp, "AUX.", 4) != 0) continue; sscanf(cp+4, "%d", &m); sprintf(keyvalue, "'%s:", cp); cp = strchr(cp+4, '.') + 1; kp = keyvalue + strlen(keyvalue); if ((double)((int)keyval) == keyval) { sprintf(kp, "%4d'", (int)keyval); } else if (keyval == 0.5) { strcat(kp, " 0.5'"); } else { wcsutil_double2str(kp, "%21.13E", keyval); strcat(keyvalue, "'"); } sscanf(cp+6, "%d", &p); if (strncmp(cp, "POWER.", 4) == 0) { if (p) { sprintf(comment, "Aux %d: var %d power", m, p); } else { sprintf(comment, "Aux %d: power of sum of terms", m); } } else { if (p) { sprintf(comment, "Aux %d: var %d coefficient", m, p); } else { sprintf(comment, "Aux %d: offset term", m); } } wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); } break; } /* Do polynomial terms. */ keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j != j+1) continue; cp = strchr(keyp->field, '.') + 1; if (strncmp(cp, "NTERMS", 6) != 0) continue; sprintf(keyvalue, "'%s: %d'", cp, wcsutil_dpkey_int(keyp)); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, "Number of terms in the polynomial", nkeyrec, header, &status); } keyp = dis->dp; for (idp = 0; idp < dis->ndp; idp++, keyp++) { if (keyp->j != j+1) continue; if ((keyval = wcsutil_dpkey_double(keyp)) == 0.0) continue; cp = strchr(keyp->field, '.') + 1; if (strncmp(cp, "TERM.", 5) != 0) continue; sscanf(cp+5, "%d", &m); sprintf(keyvalue, "'%s:%s ", cp, (m<10)?" ":""); cp = strchr(cp+5, '.') + 1; kp = keyvalue + strlen(keyvalue); if (strncmp(cp, "VAR.", 4) == 0) { if ((double)((int)keyval) == keyval) { sprintf(kp, "%20d", (int)keyval); } else { wcsutil_double2str(kp, "%20.13f", keyval); } sscanf(cp+4, "%d", &p); if (p <= Nhat) { sprintf(comment, "Poly term %d: var %d power", m, p); } else { sprintf(comment, "Poly term %d: aux %d power", m, p-Nhat); } } else { wcsutil_double2str(kp, "%20.13E", keyval); sprintf(comment, "Poly term %d: coefficient", m); } strcat(keyvalue, "'"); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); } /* CPERRja/CQERRia */ if (dis->maxdis[j] != 0.0) { sprintf(keyword, "C%cERR%d", pq, j+1); sprintf(keyvalue, "%20.2f", dis->maxdis[j]); sprintf(comment, "%sMaximum absolute value of distortion", idis?"":"[pix] "); wcshdo_util(relax, keyword, "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); } } } } /* DVERRa */ if (dis->totdis != 0.0) { sprintf(keyvalue, "%20.2f", dis->totdis); sprintf(comment, "Maximum combined distortion"); wcshdo_util(relax, "DVERR", "", 0, 0x0, 0, 0, 0, alt, 0, 0, keyvalue, comment, nkeyrec, header, &status); } } /* Add identification. */ wcshdo_util(relax, "", "", 0, 0x0, 0, 0, 0, ' ', 0, 0, "", "", nkeyrec, header, &status); if (dotpd == DIS_DOTPD) { /* TPD by translation. */ sprintf(comment, "Translated from %s to TPD by WCSLIB %s", tpdsrc, wcslib_version(0x0)); } else { sprintf(comment, "WCS header keyrecords produced by WCSLIB %s", wcslib_version(0x0)); } wcshdo_util(relax, "COMMENT", "", 0, 0x0, 0, 0, 0, ' ', 0, 0, "", comment, nkeyrec, header, &status); if (status == WCSHDRERR_MEMORY) { wcserr_set(WCSHDR_ERRMSG(status)); } return status; } /*--------------------------------------------------------------------------*/ /* Determine a suitable floating point format for a set of parameters. */ void wcshdo_format( int fmt, int nval, const double val[], char *format) { char *cp, *cp0, cval[24]; int i, expmax, expon, nsig, precision; if (fmt == 'G') { fmt = 'f'; for (i = 0; i < nval; i++) { if (fabs(val[i]) < 1e-4 || 1e12 < val[i]) { fmt = 'E'; break; } } } cp0 = cval + 2; expmax = -999; for (i = 0; i < nval; i++) { /* Double precision has at least 15 significant digits, and up to 17: */ /* http://en.wikipedia.org/wiki/Double-precision_floating-point_format */ wcsutil_double2str(cval, "%21.14E", val[i]); cp = cval + 16; while (cp0 < cp && *cp == '0') cp--; cp0 = cp; sscanf(cval+18, "%d", &expon); if (expmax < expon) expmax = expon; } nsig = cp0 - (cval + 2) + 1; if (fmt == 'f') { precision = nsig - (expmax + 1); if (precision < 1) precision = 1; if (17 < precision) precision = 17; sprintf(format, "%%20.%df", precision); } else { precision = nsig - 1; if (precision < 1) precision = 1; if (14 < precision) precision = 14; if (precision < 14) { sprintf(format, "%%20.%dE", precision); } else { sprintf(format, "%%21.%dE", precision); } } } /*--------------------------------------------------------------------------*/ /* Construct a string that identifies the term of a TPD or TPV polynomial. */ void wcshdo_tpdterm( int m, int direct, char *term) { const int nTPD[] = {1, 4, 7, 12, 17, 24, 31, 40, 49, 60}; int degree, k; for (degree = 0; degree <= 9; degree++) { if (m < nTPD[degree]) break; } if (degree == 0) { strcpy(term, "1"); } else { k = degree - (m - nTPD[degree-1]); if (k < 0) { strncpy(term, "rrrrrrrrr", degree); } else if (direct) { strncpy(term, "xxxxxxxxx", k); strncpy(term+k, "yyyyyyyyy", degree-k); } else { strncpy(term, "yyyyyyyyy", k); strncpy(term+k, "xxxxxxxxx", degree-k); } term[degree] = '\0'; } } /*--------------------------------------------------------------------------*/ /* Construct a keyrecord from the components given. */ void wcshdo_util( int relax, const char pikey[], const char tbkey[], int level, const char tlkey[], int i, int j, int m, char alt, int btcol, int plcol[], char keyvalue[], const char keycomment[], int *nkeyrec, char **header, int *status) { char ch0, ch1, *hptr, keyword[16], *kptr; int nbyte, nc = 47, nv; if (*status) return; /* Reallocate memory in blocks of 2880 bytes. */ if ((*nkeyrec)%32 == 0) { nbyte = ((*nkeyrec)/32 + 1) * 2880; if (!(hptr = realloc(*header, nbyte))) { *status = WCSHDRERR_MEMORY; return; } *header = hptr; } /* Construct the keyword. */ if (alt == ' ') alt = '\0'; if (btcol) { /* Binary table image array. */ if (i > 0 && j) { if (j > 0) { sprintf(keyword, "%d%d%s%d%c", i, j, tbkey, btcol, alt); } else { sprintf(keyword, "%d%s%d_%d%c", i, tbkey, btcol, m, alt); } } else if (i > 0) { sprintf(keyword, "%d%s%d%c", i, tbkey, btcol, alt); } else if (j > 0) { sprintf(keyword, "%d%s%d%c", j, tbkey, btcol, alt); } else { sprintf(keyword, "%s%d%c", tbkey, btcol, alt); } if ((strlen(keyword) < 8) && tlkey && (relax & level)) { /* Use the long form. */ if (i > 0 && j) { if (j > 0) { sprintf(keyword, "%d%d%s%d%c", i, j, tlkey, btcol, alt); } else { sprintf(keyword, "%d%s%d_%d%c", i, tlkey, btcol, m, alt); } } else if (i > 0) { sprintf(keyword, "%d%s%d%c", i, tlkey, btcol, alt); } else if (j > 0) { sprintf(keyword, "%d%s%d%c", j, tlkey, btcol, alt); } else { sprintf(keyword, "%s%d%c", tlkey, btcol, alt); } } } else if (plcol && plcol[0]) { /* Pixel list. */ if (i > 0 && j) { if (j > 0) { sprintf(keyword, "T%s%d_%d%c", tbkey, plcol[i-1], plcol[j-1], alt); } else { sprintf(keyword, "T%s%d_%d%c", tbkey, plcol[i-1], m, alt); } } else if (i > 0) { sprintf(keyword, "T%s%d%c", tbkey, plcol[i-1], alt); } else if (j > 0) { sprintf(keyword, "T%s%d%c", tbkey, plcol[j-1], alt); } else { sprintf(keyword, "%s%d%c", tbkey, plcol[0], alt); } if ((strlen(keyword) < 8) && tlkey && (relax & level)) { /* Use the long form. */ if (i > 0 && j) { if (j > 0) { sprintf(keyword, "T%s%d_%d%c", tlkey, plcol[i-1], plcol[j-1], alt); } else { sprintf(keyword, "T%s%d_%d%c", tlkey, plcol[i-1], m, alt); } } else if (i > 0) { sprintf(keyword, "T%s%d%c", tlkey, plcol[i-1], alt); } else if (j > 0) { sprintf(keyword, "T%s%d%c", tlkey, plcol[j-1], alt); } else { sprintf(keyword, "%s%d%c", tlkey, plcol[0], alt); } } } else { if (i > 0 && j) { if (j > 0) { sprintf(keyword, "%s%d_%d%c", pikey, i, j, alt); } else { sprintf(keyword, "%s%d_%d%c", pikey, i, m, alt); } } else if (i > 0) { sprintf(keyword, "%s%d%c", pikey, i, alt); } else if (j > 0) { sprintf(keyword, "%s%d%c", pikey, j, alt); } else { sprintf(keyword, "%s%c", pikey, alt); } } /* Double-up single-quotes in string keyvalues. */ if (*keyvalue == '\'') { hptr = keyvalue + 1; while (*hptr) { if (*hptr == '\'') { kptr = hptr++; if (*hptr) { ch0 = *kptr; while (*kptr) { ch1 = *(++kptr); *kptr = ch0; ch0 = ch1; } } else { break; } } hptr++; } /* Check length. */ if (strlen(keyvalue) > 70) { /* Truncate. */ keyvalue[69] = '\''; keyvalue[70] = '\0'; } } else { /* Check length. */ if (strlen(keyvalue) > 70) { /* Truncate. */ keyvalue[70] = '\0'; } } if ((nv = strlen(keyvalue) > 20)) { /* Rob the keycomment to make space for the keyvalue. */ nc -= (nv - 20); } hptr = *header + (80 * ((*nkeyrec)++)); if (*keyword == '\0') { sprintf(hptr, "%80.80s", " "); } else if (strcmp(keyword, "COMMENT") == 0) { sprintf(hptr, "%-8.8s %-71.71s", keyword, keycomment); } else { sprintf(hptr, "%-8.8s= %-20s / %-*.*s", keyword, keyvalue, nc, nc, keycomment); } } astropy-1.1.1/cextern/wcslib/C/wcs.c0000644001134200020070000031242112644017723020205 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcs.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include #include "wcserr.h" #include "wcsmath.h" #include "wcsprintf.h" #include "wcstrig.h" #include "wcsunits.h" #include "wcsutil.h" #include "lin.h" #include "dis.h" #include "log.h" #include "spc.h" #include "prj.h" #include "sph.h" #include "cel.h" #include "tab.h" #include "wcs.h" const int WCSSET = 137; /* Maximum number of PVi_ma and PSi_ma keywords. */ int NPVMAX = 64; int NPSMAX = 8; /* Map status return value to message. */ const char *wcs_errmsg[] = { "Success", "Null wcsprm pointer passed", "Memory allocation failed", "Linear transformation matrix is singular", "Inconsistent or unrecognized coordinate axis type", "Invalid parameter value", "Unrecognized coordinate transformation parameter", "Ill-conditioned coordinate transformation parameter", "One or more of the pixel coordinates were invalid", "One or more of the world coordinates were invalid", "Invalid world coordinate", "No solution found in the specified interval", "Invalid subimage specification", "Non-separable subimage coordinate system"}; /* Map error returns for lower-level routines. */ const int wcs_linerr[] = { WCSERR_SUCCESS, /* 0: LINERR_SUCCESS */ WCSERR_NULL_POINTER, /* 1: LINERR_NULL_POINTER */ WCSERR_MEMORY, /* 2: LINERR_MEMORY */ WCSERR_SINGULAR_MTX, /* 3: LINERR_SINGULAR_MTX */ WCSERR_BAD_PARAM, /* 4: LINERR_DISTORT_INIT */ WCSERR_BAD_PIX, /* 5: LINERR_DISTORT */ WCSERR_BAD_WORLD /* 6: LINERR_DEDISTORT */ }; const int wcs_logerr[] = { WCSERR_SUCCESS, /* 0: LOGERR_SUCCESS */ WCSERR_NULL_POINTER, /* 1: LOGERR_NULL_POINTER */ WCSERR_BAD_PARAM, /* 2: LOGERR_BAD_LOG_REF_VAL */ WCSERR_BAD_PIX, /* 3: LOGERR_BAD_X */ WCSERR_BAD_WORLD /* 4: LOGERR_BAD_WORLD */ }; const int wcs_spcerr[] = { /* -1: SPCERR_NO_CHANGE */ WCSERR_SUCCESS, /* 0: SPCERR_SUCCESS */ WCSERR_NULL_POINTER, /* 1: SPCERR_NULL_POINTER */ WCSERR_BAD_PARAM, /* 2: SPCERR_BAD_SPEC_PARAMS */ WCSERR_BAD_PIX, /* 3: SPCERR_BAD_X */ WCSERR_BAD_WORLD /* 4: SPCERR_BAD_SPEC */ }; const int wcs_celerr[] = { WCSERR_SUCCESS, /* 0: CELERR_SUCCESS */ WCSERR_NULL_POINTER, /* 1: CELERR_NULL_POINTER */ WCSERR_BAD_PARAM, /* 2: CELERR_BAD_PARAM */ WCSERR_BAD_COORD_TRANS, /* 3: CELERR_BAD_COORD_TRANS */ WCSERR_ILL_COORD_TRANS, /* 4: CELERR_ILL_COORD_TRANS */ WCSERR_BAD_PIX, /* 5: CELERR_BAD_PIX */ WCSERR_BAD_WORLD /* 6: CELERR_BAD_WORLD */ }; const int wcs_taberr[] = { WCSERR_SUCCESS, /* 0: TABERR_SUCCESS */ WCSERR_NULL_POINTER, /* 1: TABERR_NULL_POINTER */ WCSERR_MEMORY, /* 2: TABERR_MEMORY */ WCSERR_BAD_PARAM, /* 3: TABERR_BAD_PARAMS */ WCSERR_BAD_PIX, /* 4: TABERR_BAD_X */ WCSERR_BAD_WORLD /* 5: TABERR_BAD_WORLD */ }; /* Convenience macro for invoking wcserr_set(). */ #define WCS_ERRMSG(status) WCSERR_SET(status), wcs_errmsg[status] #ifndef signbit #define signbit(X) ((X) < 0.0 ? 1 : 0) #endif /* Internal helper functions, not for general use. */ static int wcs_types(struct wcsprm *); static int wcs_units(struct wcsprm *); /*--------------------------------------------------------------------------*/ int wcsnpv(int npvmax) { if (npvmax >= 0) NPVMAX = npvmax; return NPVMAX; } int wcsnps(int npsmax) { if (npsmax >= 0) NPSMAX = npsmax; return NPSMAX; } /*--------------------------------------------------------------------------*/ int wcsini(int alloc, int naxis, struct wcsprm *wcs) { static const char *function = "wcsini"; int i, j, k, status; double *cd; struct wcserr **err; if (wcs == 0x0) return WCSERR_NULL_POINTER; /* Initialize error message handling. */ err = &(wcs->err); if (wcs->flag != -1) { if (wcs->err) free(wcs->err); if (wcs->lin.err) free(wcs->lin.err); if (wcs->cel.err) free(wcs->cel.err); if (wcs->spc.err) free(wcs->spc.err); } wcs->err = 0x0; wcs->lin.err = 0x0; wcs->cel.err = 0x0; wcs->spc.err = 0x0; /* Initialize pointers. */ if (wcs->flag == -1 || wcs->m_flag != WCSSET) { if (wcs->flag == -1) { wcs->tab = 0x0; wcs->types = 0x0; wcs->lin.flag = -1; } /* Initialize memory management. */ wcs->m_flag = 0; wcs->m_naxis = 0; wcs->m_crpix = 0x0; wcs->m_pc = 0x0; wcs->m_cdelt = 0x0; wcs->m_crval = 0x0; wcs->m_cunit = 0x0; wcs->m_ctype = 0x0; wcs->m_pv = 0x0; wcs->m_ps = 0x0; wcs->m_cd = 0x0; wcs->m_crota = 0x0; wcs->m_colax = 0x0; wcs->m_cname = 0x0; wcs->m_crder = 0x0; wcs->m_csyer = 0x0; wcs->m_tab = 0x0; wcs->m_wtb = 0x0; } if (naxis < 0) { return wcserr_set(WCSERR_SET(WCSERR_MEMORY), "naxis must not be negative (got %d)", naxis); } /* Allocate memory for arrays if required. */ if (alloc || wcs->crpix == 0x0 || wcs->pc == 0x0 || wcs->cdelt == 0x0 || wcs->crval == 0x0 || wcs->cunit == 0x0 || wcs->ctype == 0x0 || (NPVMAX && wcs->pv == 0x0) || (NPSMAX && wcs->ps == 0x0) || wcs->cd == 0x0 || wcs->crota == 0x0 || wcs->colax == 0x0 || wcs->cname == 0x0 || wcs->crder == 0x0 || wcs->csyer == 0x0) { /* Was sufficient allocated previously? */ if (wcs->m_flag == WCSSET && (wcs->m_naxis < naxis || wcs->npvmax < NPVMAX || wcs->npsmax < NPSMAX)) { /* No, free it. */ wcsfree(wcs); } if (alloc || wcs->crpix == 0x0) { if (wcs->m_crpix) { /* In case the caller fiddled with it. */ wcs->crpix = wcs->m_crpix; } else { if ((wcs->crpix = calloc(naxis, sizeof(double))) == 0x0) { return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_crpix = wcs->crpix; } } if (alloc || wcs->pc == 0x0) { if (wcs->m_pc) { /* In case the caller fiddled with it. */ wcs->pc = wcs->m_pc; } else { if ((wcs->pc = calloc(naxis*naxis, sizeof(double))) == 0x0) { wcsfree(wcs); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_pc = wcs->pc; } } if (alloc || wcs->cdelt == 0x0) { if (wcs->m_cdelt) { /* In case the caller fiddled with it. */ wcs->cdelt = wcs->m_cdelt; } else { if ((wcs->cdelt = calloc(naxis, sizeof(double))) == 0x0) { wcsfree(wcs); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_cdelt = wcs->cdelt; } } if (alloc || wcs->crval == 0x0) { if (wcs->m_crval) { /* In case the caller fiddled with it. */ wcs->crval = wcs->m_crval; } else { if ((wcs->crval = calloc(naxis, sizeof(double))) == 0x0) { wcsfree(wcs); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_crval = wcs->crval; } } if (alloc || wcs->cunit == 0x0) { if (wcs->m_cunit) { /* In case the caller fiddled with it. */ wcs->cunit = wcs->m_cunit; } else { if ((wcs->cunit = calloc(naxis, sizeof(char [72]))) == 0x0) { wcsfree(wcs); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_cunit = wcs->cunit; } } if (alloc || wcs->ctype == 0x0) { if (wcs->m_ctype) { /* In case the caller fiddled with it. */ wcs->ctype = wcs->m_ctype; } else { if ((wcs->ctype = calloc(naxis, sizeof(char [72]))) == 0x0) { wcsfree(wcs); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_ctype = wcs->ctype; } } if (alloc || wcs->pv == 0x0) { if (wcs->m_pv) { /* In case the caller fiddled with it. */ wcs->pv = wcs->m_pv; } else { if (NPVMAX) { if ((wcs->pv = calloc(NPVMAX, sizeof(struct pvcard))) == 0x0) { wcsfree(wcs); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } } else { wcs->pv = 0x0; } wcs->npvmax = NPVMAX; wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_pv = wcs->pv; } } if (alloc || wcs->ps == 0x0) { if (wcs->m_ps) { /* In case the caller fiddled with it. */ wcs->ps = wcs->m_ps; } else { if (NPSMAX) { if ((wcs->ps = calloc(NPSMAX, sizeof(struct pscard))) == 0x0) { wcsfree(wcs); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } } else { wcs->ps = 0x0; } wcs->npsmax = NPSMAX; wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_ps = wcs->ps; } } if (alloc || wcs->cd == 0x0) { if (wcs->m_cd) { /* In case the caller fiddled with it. */ wcs->cd = wcs->m_cd; } else { if ((wcs->cd = calloc(naxis*naxis, sizeof(double))) == 0x0) { wcsfree(wcs); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_cd = wcs->cd; } } if (alloc || wcs->crota == 0x0) { if (wcs->m_crota) { /* In case the caller fiddled with it. */ wcs->crota = wcs->m_crota; } else { if ((wcs->crota = calloc(naxis, sizeof(double))) == 0x0) { wcsfree(wcs); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_crota = wcs->crota; } } if (alloc || wcs->colax == 0x0) { if (wcs->m_colax) { /* In case the caller fiddled with it. */ wcs->colax = wcs->m_colax; } else { if ((wcs->colax = calloc(naxis, sizeof(int))) == 0x0) { wcsfree(wcs); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_colax = wcs->colax; } } if (alloc || wcs->cname == 0x0) { if (wcs->m_cname) { /* In case the caller fiddled with it. */ wcs->cname = wcs->m_cname; } else { if ((wcs->cname = calloc(naxis, sizeof(char [72]))) == 0x0) { wcsfree(wcs); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_cname = wcs->cname; } } if (alloc || wcs->crder == 0x0) { if (wcs->m_crder) { /* In case the caller fiddled with it. */ wcs->crder = wcs->m_crder; } else { if ((wcs->crder = calloc(naxis, sizeof(double))) == 0x0) { wcsfree(wcs); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_crder = wcs->crder; } } if (alloc || wcs->csyer == 0x0) { if (wcs->m_csyer) { /* In case the caller fiddled with it. */ wcs->csyer = wcs->m_csyer; } else { if ((wcs->csyer = calloc(naxis, sizeof(double))) == 0x0) { wcsfree(wcs); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } wcs->m_flag = WCSSET; wcs->m_naxis = naxis; wcs->m_csyer = wcs->csyer; } } } wcs->flag = 0; wcs->naxis = naxis; /* Set defaults for the linear transformation. */ wcs->lin.crpix = wcs->crpix; wcs->lin.pc = wcs->pc; wcs->lin.cdelt = wcs->cdelt; if ((status = linini(0, naxis, &(wcs->lin)))) { return wcserr_set(WCS_ERRMSG(wcs_linerr[status])); } /* CRVALia defaults to 0.0. */ for (i = 0; i < naxis; i++) { wcs->crval[i] = 0.0; } /* CUNITia and CTYPEia are blank by default. */ for (i = 0; i < naxis; i++) { memset(wcs->cunit[i], 0, 72); memset(wcs->ctype[i], 0, 72); } /* Set defaults for the celestial transformation parameters. */ wcs->lonpole = UNDEFINED; wcs->latpole = +90.0; /* Set defaults for the spectral transformation parameters. */ wcs->restfrq = 0.0; wcs->restwav = 0.0; /* Default parameter values. */ wcs->npv = 0; for (k = 0; k < wcs->npvmax; k++) { wcs->pv[k].i = 0; wcs->pv[k].m = 0; wcs->pv[k].value = 0.0; } wcs->nps = 0; for (k = 0; k < wcs->npsmax; k++) { wcs->ps[k].i = 0; wcs->ps[k].m = 0; memset(wcs->ps[k].value, 0, 72); } /* Defaults for alternate linear transformations. */ cd = wcs->cd; for (i = 0; i < naxis; i++) { for (j = 0; j < naxis; j++) { *(cd++) = 0.0; } } for (i = 0; i < naxis; i++) { wcs->crota[i] = 0.0; } wcs->altlin = 0; wcs->velref = 0; /* Defaults for auxiliary coordinate system information. */ memset(wcs->alt, 0, 4); wcs->alt[0] = ' '; wcs->colnum = 0; for (i = 0; i < naxis; i++) { wcs->colax[i] = 0; memset(wcs->cname[i], 0, 72); wcs->crder[i] = UNDEFINED; wcs->csyer[i] = UNDEFINED; } memset(wcs->dateavg, 0, 72); memset(wcs->dateobs, 0, 72); wcs->equinox = UNDEFINED; wcs->mjdavg = UNDEFINED; wcs->mjdobs = UNDEFINED; wcs->obsgeo[0] = UNDEFINED; wcs->obsgeo[1] = UNDEFINED; wcs->obsgeo[2] = UNDEFINED; memset(wcs->radesys, 0, 72); memset(wcs->specsys, 0, 72); memset(wcs->ssysobs, 0, 72); wcs->velosys = UNDEFINED; wcs->zsource = UNDEFINED; memset(wcs->ssyssrc, 0, 72); wcs->velangl = UNDEFINED; memset(wcs->wcsname, 0, 72); wcs->ntab = 0; wcs->tab = 0x0; wcs->nwtb = 0; wcs->wtb = 0x0; /* Reset derived values. */ strcpy(wcs->lngtyp, " "); strcpy(wcs->lattyp, " "); wcs->lng = -1; wcs->lat = -1; wcs->spec = -1; wcs->cubeface = -1; celini(&(wcs->cel)); spcini(&(wcs->spc)); return 0; } /*--------------------------------------------------------------------------*/ int wcssub( int alloc, const struct wcsprm *wcssrc, int *nsub, int axes[], struct wcsprm *wcsdst) { static const char *function = "wcssub"; const char *pq = "PQ"; char *c, ctypei[16], ctmp[8], *fp; int axis, axmap[10], cubeface, dealloc, dummy, i, idp, itab, *itmp = 0x0, j, jhat, k, latitude, longitude, m, *map, msub, naxis, ndp, ndpmax, Nhat, npv, npvmax, nps, npsmax, ntmp, other, spectral, status, stokes; const double *srcp; double *dstp; struct tabprm *tab; struct disprm *dissrc, *disdst; struct dpkey *dpsrc, *dpdst; struct wcserr **err; if (wcssrc == 0x0) return WCSERR_NULL_POINTER; if (wcsdst == 0x0) return WCSERR_NULL_POINTER; err = &(wcsdst->err); /* N.B. we do not rely on the wcsprm struct having been set up. */ if ((naxis = wcssrc->naxis) <= 0) { return wcserr_set(WCSERR_SET(WCSERR_MEMORY), "naxis must be positive (got %d)", naxis); } if (nsub == 0x0) { nsub = &dummy; *nsub = naxis; } else if (*nsub == 0) { *nsub = naxis; } /* Allocate enough temporary storage to hold either axes[] xor map[].*/ ntmp = (*nsub <= naxis) ? naxis : *nsub; if ((itmp = calloc(ntmp, sizeof(int))) == 0x0) { return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } if ((dealloc = (axes == 0x0))) { /* Construct an index array. */ if ((axes = calloc(naxis, sizeof(int))) == 0x0) { free(itmp); return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } for (i = 0; i < naxis; i++) { axes[i] = i+1; } } /* So that we don't try to free an uninitialized pointer on cleanup. */ wcsdst->m_tab = 0x0; msub = 0; for (j = 0; j < *nsub; j++) { axis = axes[j]; if (abs(axis) > 0x1000) { /* Subimage extraction by type. */ k = abs(axis) & 0xFF; longitude = k & WCSSUB_LONGITUDE; latitude = k & WCSSUB_LATITUDE; cubeface = k & WCSSUB_CUBEFACE; spectral = k & WCSSUB_SPECTRAL; stokes = k & WCSSUB_STOKES; if ((other = (axis < 0))) { longitude = !longitude; latitude = !latitude; cubeface = !cubeface; spectral = !spectral; stokes = !stokes; } for (i = 0; i < naxis; i++) { strncpy (ctypei, (char *)(wcssrc->ctype + i), 8); ctypei[8] = '\0'; /* Find the last non-blank character. */ c = ctypei + 8; while (c-- > ctypei) { if (*c == ' ') *c = '\0'; if (*c != '\0') break; } if ( strcmp(ctypei, "RA") == 0 || strcmp(ctypei+1, "LON") == 0 || strcmp(ctypei+2, "LN") == 0 || strncmp(ctypei, "RA---", 5) == 0 || strncmp(ctypei+1, "LON-", 4) == 0 || strncmp(ctypei+2, "LN-", 3) == 0) { if (!longitude) { continue; } } else if ( strcmp(ctypei, "DEC") == 0 || strcmp(ctypei+1, "LAT") == 0 || strcmp(ctypei+2, "LT") == 0 || strncmp(ctypei, "DEC--", 5) == 0 || strncmp(ctypei+1, "LAT-", 4) == 0 || strncmp(ctypei+2, "LT-", 3) == 0) { if (!latitude) { continue; } } else if (strcmp(ctypei, "CUBEFACE") == 0) { if (!cubeface) { continue; } } else if (( strncmp(ctypei, "FREQ", 4) == 0 || strncmp(ctypei, "ENER", 4) == 0 || strncmp(ctypei, "WAVN", 4) == 0 || strncmp(ctypei, "VRAD", 4) == 0 || strncmp(ctypei, "WAVE", 4) == 0 || strncmp(ctypei, "VOPT", 4) == 0 || strncmp(ctypei, "ZOPT", 4) == 0 || strncmp(ctypei, "AWAV", 4) == 0 || strncmp(ctypei, "VELO", 4) == 0 || strncmp(ctypei, "BETA", 4) == 0) && (ctypei[4] == '\0' || ctypei[4] == '-')) { if (!spectral) { continue; } } else if (strcmp(ctypei, "STOKES") == 0) { if (!stokes) { continue; } } else if (!other) { continue; } /* This axis is wanted, but has it already been added? */ for (k = 0; k < msub; k++) { if (itmp[k] == i+1) { break; } } if (k == msub) itmp[msub++] = i+1; } } else if (0 < axis && axis <= naxis) { /* Check that the requested axis has not already been added. */ for (k = 0; k < msub; k++) { if (itmp[k] == axis) { break; } } if (k == msub) itmp[msub++] = axis; } else if (axis == 0) { /* Graft on a new axis. */ itmp[msub++] = 0; } else { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_SUBIMAGE)); goto cleanup; } } if ((*nsub = msub) == 0) { status = wcsini(alloc, 0, wcsdst); goto cleanup; } for (i = 0; i < *nsub; i++) { axes[i] = itmp[i]; } /* Construct the inverse axis map (i is 0-relative, j is 1-relative): axes[i] == j means that output axis i+1 comes from input axis j, axes[i] == 0 means to create a new axis, map[i] == j means that input axis i+1 goes to output axis j, map[i] == 0 means that input axis i+1 is not used. */ map = itmp; for (i = 0; i < naxis; i++) { map[i] = 0; } for (i = 0; i < *nsub; i++) { if (axes[i] > 0) { map[axes[i]-1] = i+1; } } /* Check that the subimage coordinate system is separable. First check */ /* non-zero, off-diagonal elements of the linear transformation matrix. */ srcp = wcssrc->pc; for (i = 0; i < naxis; i++) { for (j = 0; j < naxis; j++) { if (*(srcp++) == 0.0 || j == i) continue; if ((map[i] == 0) != (map[j] == 0)) { status = wcserr_set(WCS_ERRMSG(WCSERR_NON_SEPARABLE)); goto cleanup; } } } /* Now check for distortions that depend on other axes. As the disprm */ /* struct may not have been initialized, we must parse the dpkey entries. */ ndpmax = 0; for (m = 0; m < 2; m++) { if (m == 0) { dissrc = wcssrc->lin.dispre; } else { dissrc = wcssrc->lin.disseq; } ndp = 0; if (dissrc != 0x0) { for (j = 0; j < naxis; j++) { if (map[j] == 0) continue; for (jhat = 0; jhat < 10; jhat++) { axmap[jhat] = -1; } Nhat = 0; dpsrc = dissrc->dp; for (idp = 0; idp < dissrc->ndp; idp++, dpsrc++) { /* Thorough error checking will be done later by disset(). */ if (dpsrc->j != j+1) continue; if (dpsrc->field[1] != pq[m]) continue; if ((fp = strchr(dpsrc->field, '.')) == 0x0) continue; fp++; ndp++; if (strncmp(fp, "NAXES", 6) == 0) { Nhat = wcsutil_dpkey_int(dpsrc); } else if (strncmp(fp, "AXIS.", 5) == 0) { sscanf(fp+5, "%d", &jhat); axmap[jhat-1] = wcsutil_dpkey_int(dpsrc) - 1; } } if (Nhat < 0 || (Nhat == 0 && 1 < ndp) || naxis < Nhat) { status = wcserr_set(WCSERR_SET(WCSERR_BAD_PARAM), "NAXES was not set (or bad) for %s distortion on axis %d", dissrc->dtype[j], j+1); goto cleanup; } for (jhat = 0; jhat < Nhat; jhat++) { if (axmap[jhat] < 0) { axmap[jhat] = jhat; } /* Make room for an additional DPja.AXIS.j record. */ ndp++; if (map[axmap[jhat]] == 0) { /* Distortion depends on an axis excluded from the subimage. */ status = wcserr_set(WCS_ERRMSG(WCSERR_NON_SEPARABLE)); goto cleanup; } } } } if (ndpmax < ndp) ndpmax = ndp; } /* Number of PVi_ma records in the subimage. */ npvmax = 0; for (m = 0; m < wcssrc->npv; m++) { i = wcssrc->pv[m].i; if (i == 0 || (i > 0 && map[i-1])) { npvmax++; } } npv = wcsnpv(-1); wcsnpv(npvmax); /* Number of PSi_ma records in the subimage. */ npsmax = 0; for (m = 0; m < wcssrc->nps; m++) { i = wcssrc->ps[m].i; if (i > 0 && map[i-1]) { npsmax++; } } nps = wcsnps(-1); wcsnps(npsmax); /* Number of distortion parameters, if any. */ ndp = disndp(-1); disndp(ndpmax); /* Initialize the destination. */ status = wcsini(alloc, *nsub, wcsdst); for (m = 0; m < 2; m++) { if (m == 0) { dissrc = wcssrc->lin.dispre; disdst = wcsdst->lin.dispre; } else { dissrc = wcssrc->lin.disseq; disdst = wcsdst->lin.disseq; } if (dissrc && !disdst) { if ((disdst = calloc(1, sizeof(struct disprm))) == 0x0) { return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } /* Also inits disdst. */ disdst->flag = -1; lindis(m+1, &(wcsdst->lin), disdst); } } /* Reset WCSNPV, WCSNPS, and DISNDP. */ wcsnpv(npv); wcsnps(nps); disndp(ndp); if (status) { goto cleanup; } /* Linear transformation. */ srcp = wcssrc->crpix; dstp = wcsdst->crpix; for (j = 0; j < *nsub; j++, dstp++) { if (axes[j] > 0) { k = axes[j] - 1; *dstp = *(srcp+k); } } srcp = wcssrc->pc; dstp = wcsdst->pc; for (i = 0; i < *nsub; i++) { for (j = 0; j < *nsub; j++, dstp++) { if (axes[i] > 0 && axes[j] > 0) { k = (axes[i]-1)*naxis + (axes[j]-1); *dstp = *(srcp+k); } } } srcp = wcssrc->cdelt; dstp = wcsdst->cdelt; for (i = 0; i < *nsub; i++, dstp++) { if (axes[i] > 0) { k = axes[i] - 1; *dstp = *(srcp+k); } } /* Coordinate reference value. */ srcp = wcssrc->crval; dstp = wcsdst->crval; for (i = 0; i < *nsub; i++, dstp++) { if (axes[i] > 0) { k = axes[i] - 1; *dstp = *(srcp+k); } } /* Coordinate units and type. */ for (i = 0; i < *nsub; i++) { if (axes[i] > 0) { k = axes[i] - 1; strncpy(wcsdst->cunit[i], wcssrc->cunit[k], 72); strncpy(wcsdst->ctype[i], wcssrc->ctype[k], 72); } } /* Celestial and spectral transformation parameters. */ wcsdst->lonpole = wcssrc->lonpole; wcsdst->latpole = wcssrc->latpole; wcsdst->restfrq = wcssrc->restfrq; wcsdst->restwav = wcssrc->restwav; /* Parameter values. */ npv = 0; for (m = 0; m < wcssrc->npv; m++) { i = wcssrc->pv[m].i; if (i == 0) { /* i == 0 is a special code that means "the latitude axis". */ wcsdst->pv[npv] = wcssrc->pv[m]; wcsdst->pv[npv].i = 0; npv++; } else if (i > 0 && map[i-1]) { wcsdst->pv[npv] = wcssrc->pv[m]; wcsdst->pv[npv].i = map[i-1]; npv++; } } wcsdst->npv = npv; nps = 0; for (m = 0; m < wcssrc->nps; m++) { i = wcssrc->ps[m].i; if (i > 0 && map[i-1]) { wcsdst->ps[nps] = wcssrc->ps[m]; wcsdst->ps[nps].i = map[i-1]; nps++; } } wcsdst->nps = nps; /* Alternate linear transformations. */ srcp = wcssrc->cd; dstp = wcsdst->cd; for (i = 0; i < *nsub; i++) { for (j = 0; j < *nsub; j++, dstp++) { if (axes[i] > 0 && axes[j] > 0) { k = (axes[i]-1)*naxis + (axes[j]-1); *dstp = *(srcp+k); } else if (i == j && wcssrc->altlin & 2) { /* A new axis is being created where CDi_ja was present in the input header, so override the default value of 0 set by wcsini(). */ *dstp = 1.0; } } } srcp = wcssrc->crota; dstp = wcsdst->crota; for (i = 0; i < *nsub; i++, dstp++) { if (axes[i] > 0) { k = axes[i] - 1; *dstp = *(srcp+k); } } wcsdst->altlin = wcssrc->altlin; wcsdst->velref = wcssrc->velref; /* Auxiliary coordinate system information. */ strncpy(wcsdst->alt, wcssrc->alt, 4); wcsdst->colnum = wcssrc->colnum; for (i = 0; i < *nsub; i++) { if (axes[i] > 0) { k = axes[i] - 1; wcsdst->colax[i] = wcssrc->colax[k]; strncpy(wcsdst->cname[i], wcssrc->cname[k], 72); wcsdst->crder[i] = wcssrc->crder[k]; wcsdst->csyer[i] = wcssrc->csyer[k]; } } strncpy(wcsdst->dateavg, wcssrc->dateavg, 72); strncpy(wcsdst->dateobs, wcssrc->dateobs, 72); wcsdst->equinox = wcssrc->equinox; wcsdst->mjdavg = wcssrc->mjdavg; wcsdst->mjdobs = wcssrc->mjdobs; wcsdst->obsgeo[0] = wcssrc->obsgeo[0]; wcsdst->obsgeo[1] = wcssrc->obsgeo[1]; wcsdst->obsgeo[2] = wcssrc->obsgeo[2]; strncpy(wcsdst->radesys, wcssrc->radesys, 72); strncpy(wcsdst->specsys, wcssrc->specsys, 72); strncpy(wcsdst->ssysobs, wcssrc->ssysobs, 72); wcsdst->velosys = wcssrc->velosys; wcsdst->zsource = wcssrc->zsource; strncpy(wcsdst->ssyssrc, wcssrc->ssyssrc, 72); wcsdst->velangl = wcssrc->velangl; strncpy(wcsdst->wcsname, wcssrc->wcsname, 72); /* Distortion parameters. */ for (m = 0; m < 2; m++) { if (m == 0) { dissrc = wcssrc->lin.dispre; disdst = wcsdst->lin.dispre; } else { dissrc = wcssrc->lin.disseq; disdst = wcsdst->lin.disseq; } if (dissrc) { disdst->naxis = *nsub; /* Distortion type and maximum distortion (but not total distortion). */ for (j = 0; j < *nsub; j++) { if (axes[j] > 0) { k = axes[j] - 1; strncpy(disdst->dtype[j], dissrc->dtype[k], 72); disdst->maxdis[j] = dissrc->maxdis[k]; } } /* DPja or DQia keyvalues. */ ndp = 0; dpdst = disdst->dp; for (j = 0; j < *nsub; j++) { if (axes[j] == 0) continue; /* Determine the axis mapping. */ for (jhat = 0; jhat < 10; jhat++) { axmap[jhat] = -1; } dpsrc = dissrc->dp; for (idp = 0; idp < dissrc->ndp; idp++, dpsrc++) { if (dpsrc->j != j+1) continue; if (dpsrc->field[1] != pq[m]) continue; if ((fp = strchr(dpsrc->field, '.')) == 0x0) continue; fp++; if (strncmp(fp, "NAXES", 6) == 0) { Nhat = wcsutil_dpkey_int(dpsrc); } else if (strncmp(fp, "AXIS.", 5) == 0) { sscanf(fp+5, "%d", &jhat); axmap[jhat-1] = wcsutil_dpkey_int(dpsrc) - 1; } } for (jhat = 0; jhat < Nhat; jhat++) { if (axmap[jhat] < 0) { axmap[jhat] = jhat; } } /* Copy the DPja or DQia keyvalues. */ dpsrc = dissrc->dp; for (idp = 0; idp < dissrc->ndp; idp++, dpsrc++) { if (dpsrc->j != axes[j]) continue; if (dpsrc->field[1] != pq[m]) continue; if ((fp = strchr(dpsrc->field, '.')) == 0x0) continue; fp++; if (strncmp(fp, "AXIS.", 5) == 0) { /* Skip it, we will create our own later. */ continue; } *dpdst = *dpsrc; sprintf(ctmp, "%d", j+1); dpdst->field[2] = ctmp[0]; dpdst->j = j+1; ndp++; dpdst++; if (strncmp(fp, "NAXES", 6) == 0) { for (jhat = 0; jhat < Nhat; jhat++) { strcpy(dpdst->field, dpsrc->field); dpdst->field[2] = ctmp[0]; fp = strchr(dpdst->field, '.') + 1; sprintf(fp, "AXIS.%d", jhat+1); dpdst->j = j+1; dpdst->type = 0; dpdst->value.i = map[axmap[jhat]]; ndp++; dpdst++; } } } } disdst->ndp = ndp; } } /* Coordinate lookup tables; only copy what's needed. */ wcsdst->ntab = 0; for (itab = 0; itab < wcssrc->ntab; itab++) { /* Is this table wanted? */ for (m = 0; m < wcssrc->tab[itab].M; m++) { i = wcssrc->tab[itab].map[m]; if (map[i-1]) { wcsdst->ntab++; break; } } } if (wcsdst->ntab) { /* Allocate memory for tabprm structs. */ if ((wcsdst->tab = calloc(wcsdst->ntab, sizeof(struct tabprm))) == 0x0) { wcsdst->ntab = 0; status = wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); goto cleanup; } wcsdst->m_tab = wcsdst->tab; } tab = wcsdst->tab; for (itab = 0; itab < wcssrc->ntab; itab++) { for (m = 0; m < wcssrc->tab[itab].M; m++) { i = wcssrc->tab[itab].map[m]; if (map[i-1]) { if ((status = tabcpy(1, wcssrc->tab + itab, tab))) { wcserr_set(WCS_ERRMSG(wcs_taberr[status])); goto cleanup; } tab++; break; } } } cleanup: if (itmp) free(itmp); if (dealloc) { free(axes); } if (status && wcsdst->m_tab) { free(wcsdst->m_tab); wcsdst->tab = 0x0; wcsdst->m_tab = 0x0; } return status; } /*--------------------------------------------------------------------------*/ int wcscompare( int cmp, double tol, const struct wcsprm *wcs1, const struct wcsprm *wcs2, int *equal) { int i, j, naxis, naxis2; double diff; int tab_equal; int status; if (wcs1 == 0x0) return WCSERR_NULL_POINTER; if (wcs2 == 0x0) return WCSERR_NULL_POINTER; if (equal == 0x0) return WCSERR_NULL_POINTER; *equal = 0; if (wcs1->naxis != wcs2->naxis) { return 0; } naxis = wcs1->naxis; naxis2 = wcs1->naxis*wcs1->naxis; if (cmp & WCSCOMPARE_CRPIX) { /* Don't compare crpix. */ } else if (cmp & WCSCOMPARE_TILING) { for (i = 0; i < naxis; ++i) { diff = wcs1->crpix[i] - wcs2->crpix[i]; if ((double)(int)(diff) != diff) { return 0; } } } else { if (!wcsutil_Eq(naxis, tol, wcs1->crpix, wcs2->crpix)) { return 0; } } if (!wcsutil_Eq(naxis2, tol, wcs1->pc, wcs2->pc) || !wcsutil_Eq(naxis, tol, wcs1->cdelt, wcs2->cdelt) || !wcsutil_Eq(naxis, tol, wcs1->crval, wcs2->crval) || !wcsutil_strEq(naxis, wcs1->cunit, wcs2->cunit) || !wcsutil_strEq(naxis, wcs1->ctype, wcs2->ctype) || !wcsutil_Eq(1, tol, &wcs1->lonpole, &wcs2->lonpole) || !wcsutil_Eq(1, tol, &wcs1->latpole, &wcs2->latpole) || !wcsutil_Eq(1, tol, &wcs1->restfrq, &wcs2->restfrq) || !wcsutil_Eq(1, tol, &wcs1->restwav, &wcs2->restwav) || wcs1->npv != wcs2->npv || wcs1->nps != wcs2->nps) { return 0; } /* Compare pv cards, which may not be in the same order */ for (i = 0; i < wcs1->npv; ++i) { for (j = 0; j < wcs2->npv; ++j) { if (wcs1->pv[i].i == wcs2->pv[j].i && wcs1->pv[i].m == wcs2->pv[j].m) { if (!wcsutil_Eq(1, tol, &wcs1->pv[i].value, &wcs2->pv[j].value)) { return 0; } break; } } /* We didn't find a match, so they are not equal */ if (j == wcs2->npv) { return 0; } } /* Compare ps cards, which may not be in the same order */ for (i = 0; i < wcs1->nps; ++i) { for (j = 0; j < wcs2->nps; ++j) { if (wcs1->ps[i].i == wcs2->ps[j].i && wcs1->ps[i].m == wcs2->ps[j].m) { if (strncmp(wcs1->ps[i].value, wcs2->ps[j].value, 72)) { return 0; } break; } } /* We didn't find a match, so they are not equal */ if (j == wcs2->nps) { return 0; } } if (wcs1->flag != WCSSET || wcs2->flag != WCSSET) { if (!wcsutil_Eq(naxis2, tol, wcs1->cd, wcs2->cd) || !wcsutil_Eq(naxis, tol, wcs1->crota, wcs2->crota) || wcs1->altlin != wcs2->altlin || wcs1->velref != wcs2->velref) { return 0; } } if (!(cmp & WCSCOMPARE_ANCILLARY)) { if (strncmp(wcs1->alt, wcs2->alt, 4) || wcs1->colnum != wcs2->colnum || !wcsutil_intEq(naxis, wcs1->colax, wcs2->colax) || !wcsutil_strEq(naxis, wcs1->cname, wcs2->cname) || !wcsutil_Eq(naxis, tol, wcs1->crder, wcs2->crder) || !wcsutil_Eq(naxis, tol, wcs1->csyer, wcs2->csyer) || strncmp(wcs1->dateavg, wcs2->dateavg, 72) || strncmp(wcs1->dateobs, wcs2->dateobs, 72) || !wcsutil_Eq(1, tol, &wcs1->equinox, &wcs2->equinox) || !wcsutil_Eq(1, tol, &wcs1->mjdavg, &wcs2->mjdavg) || !wcsutil_Eq(1, tol, &wcs1->mjdobs, &wcs2->mjdobs) || !wcsutil_Eq(3, tol, wcs1->obsgeo, wcs2->obsgeo) || strncmp(wcs1->radesys, wcs2->radesys, 72) || strncmp(wcs1->specsys, wcs2->specsys, 72) || strncmp(wcs1->ssysobs, wcs2->ssysobs, 72) || !wcsutil_Eq(1, tol, &wcs1->velosys, &wcs2->velosys) || !wcsutil_Eq(1, tol, &wcs1->zsource, &wcs2->zsource) || strncmp(wcs1->ssyssrc, wcs2->ssyssrc, 72) || !wcsutil_Eq(1, tol, &wcs1->velangl, &wcs2->velangl) || strncmp(wcs1->wcsname, wcs2->wcsname, 72)) { return 0; } } /* Compare tabular parameters */ if (wcs1->ntab != wcs2->ntab) { return 0; } for (i = 0; i < wcs1->ntab; ++i) { if ((status = tabcmp(0, tol, &wcs1->tab[i], &wcs2->tab[i], &tab_equal))) { return status; } if (!tab_equal) { return 0; } } *equal = 1; return 0; } /*--------------------------------------------------------------------------*/ int wcsfree(struct wcsprm *wcs) { int j; if (wcs == 0x0) return WCSERR_NULL_POINTER; if (wcs->flag == -1) { wcs->lin.flag = -1; } else { /* Optionally allocated by wcsini() for given parameters. */ if (wcs->m_flag == WCSSET) { if (wcs->crpix == wcs->m_crpix) wcs->crpix = 0x0; if (wcs->pc == wcs->m_pc) wcs->pc = 0x0; if (wcs->cdelt == wcs->m_cdelt) wcs->cdelt = 0x0; if (wcs->crval == wcs->m_crval) wcs->crval = 0x0; if (wcs->cunit == wcs->m_cunit) wcs->cunit = 0x0; if (wcs->ctype == wcs->m_ctype) wcs->ctype = 0x0; if (wcs->pv == wcs->m_pv) wcs->pv = 0x0; if (wcs->ps == wcs->m_ps) wcs->ps = 0x0; if (wcs->cd == wcs->m_cd) wcs->cd = 0x0; if (wcs->crota == wcs->m_crota) wcs->crota = 0x0; if (wcs->colax == wcs->m_colax) wcs->colax = 0x0; if (wcs->cname == wcs->m_cname) wcs->cname = 0x0; if (wcs->crder == wcs->m_crder) wcs->crder = 0x0; if (wcs->csyer == wcs->m_csyer) wcs->csyer = 0x0; if (wcs->tab == wcs->m_tab) wcs->tab = 0x0; if (wcs->wtb == wcs->m_wtb) wcs->wtb = 0x0; if (wcs->m_crpix) free(wcs->m_crpix); if (wcs->m_pc) free(wcs->m_pc); if (wcs->m_cdelt) free(wcs->m_cdelt); if (wcs->m_crval) free(wcs->m_crval); if (wcs->m_cunit) free(wcs->m_cunit); if (wcs->m_ctype) free(wcs->m_ctype); if (wcs->m_pv) free(wcs->m_pv); if (wcs->m_ps) free(wcs->m_ps); if (wcs->m_cd) free(wcs->m_cd); if (wcs->m_crota) free(wcs->m_crota); if (wcs->m_colax) free(wcs->m_colax); if (wcs->m_cname) free(wcs->m_cname); if (wcs->m_crder) free(wcs->m_crder); if (wcs->m_csyer) free(wcs->m_csyer); /* Allocated unconditionally by wcstab(). */ if (wcs->m_tab) { for (j = 0; j < wcs->ntab; j++) { tabfree(wcs->m_tab + j); } free(wcs->m_tab); } if (wcs->m_wtb) free(wcs->m_wtb); } if (wcs->err) free(wcs->err); /* Allocated unconditionally by wcsset(). */ if (wcs->types) free(wcs->types); if (wcs->lin.crpix == wcs->m_crpix) wcs->lin.crpix = 0x0; if (wcs->lin.pc == wcs->m_pc) wcs->lin.pc = 0x0; if (wcs->lin.cdelt == wcs->m_cdelt) wcs->lin.cdelt = 0x0; } wcs->m_flag = 0; wcs->m_naxis = 0x0; wcs->m_crpix = 0x0; wcs->m_pc = 0x0; wcs->m_cdelt = 0x0; wcs->m_crval = 0x0; wcs->m_cunit = 0x0; wcs->m_ctype = 0x0; wcs->m_pv = 0x0; wcs->m_ps = 0x0; wcs->m_cd = 0x0; wcs->m_crota = 0x0; wcs->m_colax = 0x0; wcs->m_cname = 0x0; wcs->m_crder = 0x0; wcs->m_csyer = 0x0; wcs->ntab = 0; wcs->m_tab = 0x0; wcs->nwtb = 0; wcs->m_wtb = 0x0; wcs->types = 0x0; wcs->err = 0x0; wcs->flag = 0; linfree(&(wcs->lin)); celfree(&(wcs->cel)); spcfree(&(wcs->spc)); return 0; } /*--------------------------------------------------------------------------*/ int wcsprt(const struct wcsprm *wcs) { int i, j, k; struct wtbarr *wtbp; if (wcs == 0x0) return WCSERR_NULL_POINTER; if (wcs->flag != WCSSET) { wcsprintf("The wcsprm struct is UNINITIALIZED.\n"); return 0; } wcsprintf(" flag: %d\n", wcs->flag); wcsprintf(" naxis: %d\n", wcs->naxis); WCSPRINTF_PTR(" crpix: ", wcs->crpix, "\n"); wcsprintf(" "); for (i = 0; i < wcs->naxis; i++) { wcsprintf(" %#- 11.5g", wcs->crpix[i]); } wcsprintf("\n"); /* Linear transformation. */ k = 0; WCSPRINTF_PTR(" pc: ", wcs->pc, "\n"); for (i = 0; i < wcs->naxis; i++) { wcsprintf(" pc[%d][]:", i); for (j = 0; j < wcs->naxis; j++) { wcsprintf(" %#- 11.5g", wcs->pc[k++]); } wcsprintf("\n"); } /* Coordinate increment at reference point. */ WCSPRINTF_PTR(" cdelt: ", wcs->cdelt, "\n"); wcsprintf(" "); for (i = 0; i < wcs->naxis; i++) { wcsprintf(" %#- 11.5g", wcs->cdelt[i]); } wcsprintf("\n"); /* Coordinate value at reference point. */ WCSPRINTF_PTR(" crval: ", wcs->crval, "\n"); wcsprintf(" "); for (i = 0; i < wcs->naxis; i++) { wcsprintf(" %#- 11.5g", wcs->crval[i]); } wcsprintf("\n"); /* Coordinate units and type. */ WCSPRINTF_PTR(" cunit: ", wcs->cunit, "\n"); for (i = 0; i < wcs->naxis; i++) { wcsprintf(" \"%s\"\n", wcs->cunit[i]); } WCSPRINTF_PTR(" ctype: ", wcs->ctype, "\n"); for (i = 0; i < wcs->naxis; i++) { wcsprintf(" \"%s\"\n", wcs->ctype[i]); } /* Celestial and spectral transformation parameters. */ if (undefined(wcs->lonpole)) { wcsprintf(" lonpole: UNDEFINED\n"); } else { wcsprintf(" lonpole: %9f\n", wcs->lonpole); } wcsprintf(" latpole: %9f\n", wcs->latpole); wcsprintf(" restfrq: %f\n", wcs->restfrq); wcsprintf(" restwav: %f\n", wcs->restwav); /* Parameter values. */ wcsprintf(" npv: %d\n", wcs->npv); wcsprintf(" npvmax: %d\n", wcs->npvmax); WCSPRINTF_PTR(" pv: ", wcs->pv, "\n"); for (i = 0; i < wcs->npv; i++) { wcsprintf(" %3d%4d %#- 11.5g\n", (wcs->pv[i]).i, (wcs->pv[i]).m, (wcs->pv[i]).value); } wcsprintf(" nps: %d\n", wcs->nps); wcsprintf(" npsmax: %d\n", wcs->npsmax); WCSPRINTF_PTR(" ps: ", wcs->ps, "\n"); for (i = 0; i < wcs->nps; i++) { wcsprintf(" %3d%4d %s\n", (wcs->ps[i]).i, (wcs->ps[i]).m, (wcs->ps[i]).value); } /* Alternate linear transformations. */ k = 0; WCSPRINTF_PTR(" cd: ", wcs->cd, "\n"); if (wcs->cd) { for (i = 0; i < wcs->naxis; i++) { wcsprintf(" cd[%d][]:", i); for (j = 0; j < wcs->naxis; j++) { wcsprintf(" %#- 11.5g", wcs->cd[k++]); } wcsprintf("\n"); } } WCSPRINTF_PTR(" crota: ", wcs->crota, "\n"); if (wcs->crota) { wcsprintf(" "); for (i = 0; i < wcs->naxis; i++) { wcsprintf(" %#- 11.5g", wcs->crota[i]); } wcsprintf("\n"); } wcsprintf(" altlin: %d\n", wcs->altlin); wcsprintf(" velref: %d\n", wcs->velref); /* Auxiliary coordinate system information. */ wcsprintf(" alt: '%c'\n", wcs->alt[0]); wcsprintf(" colnum: %d\n", wcs->colnum); WCSPRINTF_PTR(" colax: ", wcs->colax, "\n"); if (wcs->colax) { wcsprintf(" "); for (i = 0; i < wcs->naxis; i++) { wcsprintf(" %5d", wcs->colax[i]); } wcsprintf("\n"); } if (wcs->wcsname[0] == '\0') { wcsprintf(" wcsname: UNDEFINED\n"); } else { wcsprintf(" wcsname: \"%s\"\n", wcs->wcsname); } WCSPRINTF_PTR(" cname: ", wcs->cname, "\n"); if (wcs->cname) { for (i = 0; i < wcs->naxis; i++) { if (wcs->cname[i][0] == '\0') { wcsprintf(" UNDEFINED\n"); } else { wcsprintf(" \"%s\"\n", wcs->cname[i]); } } } WCSPRINTF_PTR(" crder: ", wcs->crder, "\n"); if (wcs->crder) { wcsprintf(" "); for (i = 0; i < wcs->naxis; i++) { if (undefined(wcs->crder[i])) { wcsprintf(" UNDEFINED "); } else { wcsprintf(" %#- 11.5g", wcs->crder[i]); } } wcsprintf("\n"); } WCSPRINTF_PTR(" csyer: ", wcs->csyer, "\n"); if (wcs->csyer) { wcsprintf(" "); for (i = 0; i < wcs->naxis; i++) { if (undefined(wcs->csyer[i])) { wcsprintf(" UNDEFINED "); } else { wcsprintf(" %#- 11.5g", wcs->csyer[i]); } } wcsprintf("\n"); } if (wcs->radesys[0] == '\0') { wcsprintf(" radesys: UNDEFINED\n"); } else { wcsprintf(" radesys: \"%s\"\n", wcs->radesys); } if (undefined(wcs->equinox)) { wcsprintf(" equinox: UNDEFINED\n"); } else { wcsprintf(" equinox: %9f\n", wcs->equinox); } if (wcs->specsys[0] == '\0') { wcsprintf(" specsys: UNDEFINED\n"); } else { wcsprintf(" specsys: \"%s\"\n", wcs->specsys); } if (wcs->ssysobs[0] == '\0') { wcsprintf(" ssysobs: UNDEFINED\n"); } else { wcsprintf(" ssysobs: \"%s\"\n", wcs->ssysobs); } if (undefined(wcs->velosys)) { wcsprintf(" velosys: UNDEFINED\n"); } else { wcsprintf(" velosys: %9f\n", wcs->velosys); } if (wcs->ssyssrc[0] == '\0') { wcsprintf(" ssyssrc: UNDEFINED\n"); } else { wcsprintf(" ssyssrc: \"%s\"\n", wcs->ssyssrc); } if (undefined(wcs->zsource)) { wcsprintf(" zsource: UNDEFINED\n"); } else { wcsprintf(" zsource: %9f\n", wcs->zsource); } wcsprintf(" obsgeo: "); for (i = 0; i < 3; i++) { if (undefined(wcs->obsgeo[i])) { wcsprintf("UNDEFINED "); } else { wcsprintf(" %#- 11.5g", wcs->obsgeo[i]); } } wcsprintf("\n"); if (wcs->dateobs[0] == '\0') { wcsprintf(" dateobs: UNDEFINED\n"); } else { wcsprintf(" dateobs: \"%s\"\n", wcs->dateobs); } if (wcs->dateavg[0] == '\0') { wcsprintf(" dateavg: UNDEFINED\n"); } else { wcsprintf(" dateavg: \"%s\"\n", wcs->dateavg); } if (undefined(wcs->mjdobs)) { wcsprintf(" mjdobs: UNDEFINED\n"); } else { wcsprintf(" mjdobs: %9f\n", wcs->mjdobs); } if (undefined(wcs->mjdavg)) { wcsprintf(" mjdavg: UNDEFINED\n"); } else { wcsprintf(" mjdavg: %9f\n", wcs->mjdavg); } wcsprintf(" ntab: %d\n", wcs->ntab); WCSPRINTF_PTR(" tab: ", wcs->tab, ""); if (wcs->tab != 0x0) wcsprintf(" (see below)"); wcsprintf("\n"); wcsprintf(" nwtb: %d\n", wcs->nwtb); WCSPRINTF_PTR(" wtb: ", wcs->wtb, ""); if (wcs->wtb != 0x0) wcsprintf(" (see below)"); wcsprintf("\n"); /* Derived values. */ WCSPRINTF_PTR(" types: ", wcs->types, "\n "); for (i = 0; i < wcs->naxis; i++) { wcsprintf("%5d", wcs->types[i]); } wcsprintf("\n"); wcsprintf(" lngtyp: \"%s\"\n", wcs->lngtyp); wcsprintf(" lattyp: \"%s\"\n", wcs->lattyp); wcsprintf(" lng: %d\n", wcs->lng); wcsprintf(" lat: %d\n", wcs->lat); wcsprintf(" spec: %d\n", wcs->spec); wcsprintf(" cubeface: %d\n", wcs->cubeface); WCSPRINTF_PTR(" err: ", wcs->err, "\n"); if (wcs->err) { wcserr_prt(wcs->err, " "); } wcsprintf(" lin: (see below)\n"); wcsprintf(" cel: (see below)\n"); wcsprintf(" spc: (see below)\n"); /* Memory management. */ wcsprintf(" m_flag: %d\n", wcs->m_flag); wcsprintf(" m_naxis: %d\n", wcs->m_naxis); WCSPRINTF_PTR(" m_crpix: ", wcs->m_crpix, ""); if (wcs->m_crpix == wcs->crpix) wcsprintf(" (= crpix)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_pc: ", wcs->m_pc, ""); if (wcs->m_pc == wcs->pc) wcsprintf(" (= pc)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_cdelt: ", wcs->m_cdelt, ""); if (wcs->m_cdelt == wcs->cdelt) wcsprintf(" (= cdelt)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_crval: ", wcs->m_crval, ""); if (wcs->m_crval == wcs->crval) wcsprintf(" (= crval)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_cunit: ", wcs->m_cunit, ""); if (wcs->m_cunit == wcs->cunit) wcsprintf(" (= cunit)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_ctype: ", wcs->m_ctype, ""); if (wcs->m_ctype == wcs->ctype) wcsprintf(" (= ctype)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_pv: ", wcs->m_pv, ""); if (wcs->m_pv == wcs->pv) wcsprintf(" (= pv)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_ps: ", wcs->m_ps, ""); if (wcs->m_ps == wcs->ps) wcsprintf(" (= ps)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_cd: ", wcs->m_cd, ""); if (wcs->m_cd == wcs->cd) wcsprintf(" (= cd)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_crota: ", wcs->m_crota, ""); if (wcs->m_crota == wcs->crota) wcsprintf(" (= crota)"); wcsprintf("\n"); wcsprintf("\n"); WCSPRINTF_PTR(" m_colax: ", wcs->m_colax, ""); if (wcs->m_colax == wcs->colax) wcsprintf(" (= colax)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_cname: ", wcs->m_cname, ""); if (wcs->m_cname == wcs->cname) wcsprintf(" (= cname)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_crder: ", wcs->m_crder, ""); if (wcs->m_crder == wcs->crder) wcsprintf(" (= crder)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_csyer: ", wcs->m_csyer, ""); if (wcs->m_csyer == wcs->csyer) wcsprintf(" (= csyer)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_tab: ", wcs->m_tab, ""); if (wcs->m_tab == wcs->tab) wcsprintf(" (= tab)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_wtb: ", wcs->m_wtb, ""); if (wcs->m_wtb == wcs->wtb) wcsprintf(" (= wtb)"); wcsprintf("\n"); /* Tabular transformation parameters. */ if ((wtbp = wcs->wtb)) { for (j = 0; j < wcs->nwtb; j++, wtbp++) { wcsprintf("\n"); wcsprintf("wtb[%d].*\n", j); wcsprintf(" i: %d\n", wtbp->i); wcsprintf(" m: %d\n", wtbp->m); wcsprintf(" kind: %c\n", wtbp->kind); wcsprintf(" extnam: %s\n", wtbp->extnam); wcsprintf(" extver: %d\n", wtbp->extver); wcsprintf(" extlev: %d\n", wtbp->extlev); wcsprintf(" ttype: %s\n", wtbp->ttype); wcsprintf(" row: %ld\n", wtbp->row); wcsprintf(" ndim: %d\n", wtbp->ndim); WCSPRINTF_PTR(" dimlen: ", wtbp->dimlen, "\n"); WCSPRINTF_PTR(" arrayp: ", wtbp->arrayp, " -> "); WCSPRINTF_PTR("", *(wtbp->arrayp), "\n"); } } if (wcs->tab) { for (j = 0; j < wcs->ntab; j++) { wcsprintf("\n"); wcsprintf("tab[%d].*\n", j); tabprt(wcs->tab + j); } } /* Linear transformation parameters. */ wcsprintf("\n"); wcsprintf(" lin.*\n"); linprt(&(wcs->lin)); /* Celestial transformation parameters. */ wcsprintf("\n"); wcsprintf(" cel.*\n"); celprt(&(wcs->cel)); /* Spectral transformation parameters. */ wcsprintf("\n"); wcsprintf(" spc.*\n"); spcprt(&(wcs->spc)); return 0; } /*--------------------------------------------------------------------------*/ int wcsperr(const struct wcsprm *wcs, const char *prefix) { int j; if (wcs == 0x0) return WCSERR_NULL_POINTER; if (wcs->err && wcserr_prt(wcs->err, prefix) == 0) { linperr(&(wcs->lin), prefix); celperr(&(wcs->cel), prefix); wcserr_prt(wcs->spc.err, prefix); if (wcs->tab) { for (j = 0; j < wcs->ntab; j++) { wcserr_prt((wcs->tab + j)->err, prefix); } } } return 0; } /*--------------------------------------------------------------------------*/ int wcsbchk(struct wcsprm *wcs, int bounds) { int status; if (wcs == 0x0) return WCSERR_NULL_POINTER; if (wcs->flag != WCSSET) { if ((status = wcsset(wcs))) return status; } wcs->cel.prj.bounds = bounds; return 0; } /*--------------------------------------------------------------------------*/ int wcsset(struct wcsprm *wcs) { static const char *function = "wcsset"; char dpq[8], scode[4], stype[5]; int i, j, k, m, n, naxis, ndpmax, status; double lambda, rho; double *cd, *pc; struct disprm *dis; struct dpkey *keyp; struct linprm *wcslin = &(wcs->lin); struct celprm *wcscel = &(wcs->cel); struct prjprm *wcsprj = &(wcscel->prj); struct spcprm *wcsspc = &(wcs->spc); struct wcserr **err; if (wcs == 0x0) return WCSERR_NULL_POINTER; err = &(wcs->err); /* Determine axis types from CTYPEia. */ if ((status = wcs_types(wcs))) { return status; } /* Convert to canonical units. */ if ((status = wcs_units(wcs))) { return status; } naxis = wcs->naxis; /* Non-linear celestial axes present? */ if (wcs->lng >= 0 && wcs->types[wcs->lng] == 2200) { celini(wcscel); /* CRVALia, LONPOLEa, and LATPOLEa keyvalues. */ wcscel->ref[0] = wcs->crval[wcs->lng]; wcscel->ref[1] = wcs->crval[wcs->lat]; wcscel->ref[2] = wcs->lonpole; wcscel->ref[3] = wcs->latpole; /* Do alias translation for TPU/TPV before dealing with PVi_ma. */ strncpy(wcsprj->code, wcs->ctype[wcs->lng]+5, 3); wcsprj->code[3] = '\0'; if (strncmp(wcsprj->code, "TPU", 3) == 0 || strncmp(wcsprj->code, "TPV", 3) == 0) { /* Translate the PV parameters. */ if ((dis = calloc(1, sizeof(struct disprm))) == 0x0) { return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } ndpmax = disndp(-1); disndp(6+wcs->npv); /* Attach it to linprm. Also inits it. */ dis->flag = -1; if (strncmp(wcsprj->code, "TPU", 3) == 0) { /* Prior distortion. */ lindis(1, wcslin, dis); strcpy(dpq, "DP"); } else { /* Sequent distortion. */ lindis(2, wcslin, dis); strcpy(dpq, "DQ"); } disndp(ndpmax); /* Yes, the distortion type is "TPV" even for TPU. */ strcpy(dis->dtype[wcs->lng], "TPV"); strcpy(dis->dtype[wcs->lat], "TPV"); /* Keep the keywords in axis-order to aid debugging. */ keyp = dis->dp; sprintf(dpq+2, "%d", wcs->lng+1); dpfill(keyp++, dpq, "NAXES", 0, 0, 2, 0.0); dpfill(keyp++, dpq, "AXIS.1", 0, 0, 1, 0.0); dpfill(keyp++, dpq, "AXIS.2", 0, 0, 2, 0.0); /* Copy distortion parameters for the longitude axis. */ for (k = 0; k < wcs->npv; k++) { if (wcs->pv[k].i != wcs->lng+1) continue; sprintf(keyp->field, "%s.TPV.%d", dpq, wcs->pv[k].m); dpfill(keyp++, 0x0, 0x0, 0, 1, 0, wcs->pv[k].value); } /* Now the latitude axis. */ sprintf(dpq+2, "%d", wcs->lat+1); dpfill(keyp++, dpq, "NAXES", 0, 0, 2, 0.0); dpfill(keyp++, dpq, "AXIS.1", 0, 0, 2, 0.0); dpfill(keyp++, dpq, "AXIS.2", 0, 0, 1, 0.0); for (k = 0; k < wcs->npv; k++) { if (wcs->pv[k].i != wcs->lat+1) continue; sprintf(keyp->field, "%s.TPV.%d", dpq, wcs->pv[k].m); dpfill(keyp++, 0x0, 0x0, 0, 1, 0, wcs->pv[k].value); } dis->ndp = keyp - dis->dp; /* Erase PVi_ma associated with the celestial axes. */ n = 0; for (k = 0; k < wcs->npv; k++) { i = wcs->pv[k].i - 1; if (i == wcs->lng || i == wcs->lat) continue; wcs->pv[n].i = wcs->pv[k].i; wcs->pv[n].m = wcs->pv[k].m; wcs->pv[n].value = wcs->pv[k].value; n++; } wcs->npv = n; strcpy(wcsprj->code, "TAN"); /* As the PVi_ma have now been erased, ctype must be reset to prevent this translation from re-occurring if wcsset() is called again. */ strcpy(wcs->ctype[wcs->lng]+5, "TAN"); strcpy(wcs->ctype[wcs->lat]+5, "TAN"); } else if (strncmp(wcsprj->code, "TNX", 3) == 0) { /* The WAT distortion should already have been encoded in disseq. */ strcpy(wcsprj->code, "TAN"); strcpy(wcs->ctype[wcs->lng]+5, "TAN"); strcpy(wcs->ctype[wcs->lat]+5, "TAN"); } else if (strncmp(wcsprj->code, "ZPX", 3) == 0) { /* The WAT distortion should already have been encoded in disseq. */ strcpy(wcsprj->code, "ZPN"); strcpy(wcs->ctype[wcs->lng]+5, "ZPN"); strcpy(wcs->ctype[wcs->lat]+5, "ZPN"); } /* PVi_ma keyvalues. */ for (k = 0; k < wcs->npv; k++) { i = wcs->pv[k].i - 1; m = wcs->pv[k].m; if (i == -1) { /* From a PROJPn keyword. */ i = wcs->lat; } if (i == wcs->lat) { /* PVi_ma associated with latitude axis. */ if (m < 30) { wcsprj->pv[m] = wcs->pv[k].value; } } else if (i == wcs->lng) { /* PVi_ma associated with longitude axis. */ switch (m) { case 0: wcscel->offset = (wcs->pv[k].value != 0.0); break; case 1: wcscel->phi0 = wcs->pv[k].value; break; case 2: wcscel->theta0 = wcs->pv[k].value; break; case 3: /* If present, overrides LONPOLEa. */ wcscel->ref[2] = wcs->pv[k].value; break; case 4: /* If present, overrides LATPOLEa. */ wcscel->ref[3] = wcs->pv[k].value; break; default: return wcserr_set(WCSERR_SET(WCSERR_BAD_COORD_TRANS), "PV%i_%i%s: Unrecognized coordinate transformation parameter", i+1, m, wcs->alt); break; } } } /* Do simple alias translations. */ if (strncmp(wcs->ctype[wcs->lng]+5, "GLS", 3) == 0) { wcscel->offset = 1; wcscel->phi0 = 0.0; wcscel->theta0 = wcs->crval[wcs->lat]; strcpy(wcsprj->code, "SFL"); } else if (strncmp(wcs->ctype[wcs->lng]+5, "NCP", 3) == 0) { /* Convert NCP to SIN. */ if (wcscel->ref[1] == 0.0) { return wcserr_set(WCSERR_SET(WCSERR_BAD_PARAM), "Invalid projection: NCP blows up on the equator"); } strcpy(wcsprj->code, "SIN"); wcsprj->pv[1] = 0.0; wcsprj->pv[2] = cosd(wcscel->ref[1])/sind(wcscel->ref[1]); } /* Initialize the celestial transformation routines. */ wcsprj->r0 = 0.0; if ((status = celset(wcscel))) { return wcserr_set(WCS_ERRMSG(wcs_celerr[status])); } /* Update LONPOLE, LATPOLE, and PVi_ma keyvalues. */ wcs->lonpole = wcscel->ref[2]; wcs->latpole = wcscel->ref[3]; for (k = 0; k < wcs->npv; k++) { i = wcs->pv[k].i - 1; m = wcs->pv[k].m; if (i == wcs->lng) { switch (m) { case 1: wcs->pv[k].value = wcscel->phi0; break; case 2: wcs->pv[k].value = wcscel->theta0; break; case 3: wcs->pv[k].value = wcscel->ref[2]; break; case 4: wcs->pv[k].value = wcscel->ref[3]; break; } } } } /* Non-linear spectral axis present? */ if (wcs->spec >= 0 && wcs->types[wcs->spec] == 3300) { spcini(wcsspc); if ((status = spctype(wcs->ctype[wcs->spec], stype, scode, 0x0, 0x0, 0x0, 0x0, 0x0, err))) { return status; } strcpy(wcsspc->type, stype); strcpy(wcsspc->code, scode); /* CRVALia, RESTFRQa, and RESTWAVa keyvalues. */ wcsspc->crval = wcs->crval[wcs->spec]; wcsspc->restfrq = wcs->restfrq; wcsspc->restwav = wcs->restwav; /* PVi_ma keyvalues. */ for (k = 0; k < wcs->npv; k++) { i = wcs->pv[k].i - 1; m = wcs->pv[k].m; if (i == wcs->spec) { /* PVi_ma associated with grism axis. */ if (m < 7) { wcsspc->pv[m] = wcs->pv[k].value; } } } /* Initialize the spectral transformation routines. */ if ((status = spcset(wcsspc))) { return wcserr_set(WCS_ERRMSG(wcs_spcerr[status])); } } /* Tabular axes present? */ for (j = 0; j < wcs->ntab; j++) { if ((status = tabset(wcs->tab + j))) { return wcserr_set(WCS_ERRMSG(wcs_taberr[status])); } } /* Initialize the linear transformation. */ wcs->altlin &= 7; if (wcs->altlin > 1 && !(wcs->altlin & 1)) { pc = wcs->pc; if (wcs->altlin & 2) { /* Copy CDi_ja to PCi_ja and reset CDELTia. */ cd = wcs->cd; for (i = 0; i < naxis; i++) { for (j = 0; j < naxis; j++) { *(pc++) = *(cd++); } wcs->cdelt[i] = 1.0; } } else if (wcs->altlin & 4) { /* Construct PCi_ja from CROTAia. */ if ((i = wcs->lng) >= 0 && (j = wcs->lat) >= 0) { rho = wcs->crota[j]; if (wcs->cdelt[i] == 0.0) { return wcserr_set(WCSERR_SET(WCSERR_SINGULAR_MTX), "Singular transformation matrix, CDELT%d is zero", i+1); } lambda = wcs->cdelt[j]/wcs->cdelt[i]; *(pc + i*naxis + i) = *(pc + j*naxis + j) = cosd(rho); *(pc + i*naxis + j) = *(pc + j*naxis + i) = sind(rho); *(pc + i*naxis + j) *= -lambda; *(pc + j*naxis + i) /= lambda; } } } wcs->lin.crpix = wcs->crpix; wcs->lin.pc = wcs->pc; wcs->lin.cdelt = wcs->cdelt; if ((status = linset(&(wcs->lin)))) { return wcserr_set(WCS_ERRMSG(wcs_linerr[status])); } /* Set defaults for radesys and equinox for equatorial or ecliptic. */ if (strcmp(wcs->lngtyp, "RA") == 0 || strcmp(wcs->lngtyp, "ELON") == 0 || strcmp(wcs->lngtyp, "HLON") == 0) { if (wcs->radesys[0] == '\0') { if (undefined(wcs->equinox)) { strcpy(wcs->radesys, "ICRS"); } else if (wcs->equinox < 1984.0) { strcpy(wcs->radesys, "FK4"); } else { strcpy(wcs->radesys, "FK5"); } } else if (strcmp(wcs->radesys, "ICRS") == 0 || strcmp(wcs->radesys, "GAPPT") == 0) { /* Equinox is not applicable for these coordinate systems. */ wcs->equinox = UNDEFINED; } else if (undefined(wcs->equinox)) { if (strcmp(wcs->radesys, "FK5") == 0) { wcs->equinox = 2000.0; } else if (strcmp(wcs->radesys, "FK4") == 0 || strcmp(wcs->radesys, "FK4-NO-E") == 0) { wcs->equinox = 1950.0; } } } else { /* No celestial axes, ensure that radesys and equinox are unset. */ memset(wcs->radesys, 0, 72); wcs->equinox = UNDEFINED; } /* Strip off trailing blanks and null-fill auxiliary string members. */ wcsutil_null_fill(4, wcs->alt); wcsutil_null_fill(72, wcs->wcsname); for (i = 0; i < naxis; i++) { wcsutil_null_fill(72, wcs->cname[i]); } wcsutil_null_fill(72, wcs->radesys); wcsutil_null_fill(72, wcs->specsys); wcsutil_null_fill(72, wcs->ssysobs); wcsutil_null_fill(72, wcs->ssyssrc); wcsutil_null_fill(72, wcs->dateobs); wcsutil_null_fill(72, wcs->dateavg); wcs->flag = WCSSET; return 0; } /* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : */ int wcs_types(struct wcsprm *wcs) { static const char *function = "wcs_types"; const int nalias = 6; const char aliases [6][4] = {"NCP", "GLS", "TPU", "TPV", "TNX", "ZPX"}; const char *alt = ""; char ctypei[16], pcode[4], requir[9], scode[4], specsys[9]; int i, j, m, naxis, *ndx = 0x0, type; struct wcserr **err; if (wcs == 0x0) return WCSERR_NULL_POINTER; err = &(wcs->err); /* Parse the CTYPEia keyvalues. */ pcode[0] = '\0'; requir[0] = '\0'; wcs->lng = -1; wcs->lat = -1; wcs->spec = -1; wcs->cubeface = -1; if (*(wcs->alt) != ' ') alt = wcs->alt; naxis = wcs->naxis; if (wcs->types) free(wcs->types); if ((wcs->types = calloc(naxis, sizeof(int))) == 0x0) { return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } for (i = 0; i < naxis; i++) { /* Null fill. */ wcsutil_null_fill(72, wcs->ctype[i]); strncpy(ctypei, wcs->ctype[i], 15); ctypei[15] = '\0'; /* Check for early Paper IV syntax (e.g. '-SIP' used by Spitzer). */ if (strlen(ctypei) == 12 && ctypei[8] == '-') { /* Excise the "4-3-3" or "8-3"-form distortion code. */ ctypei[8] = '\0'; /* Remove trailing dashes from "8-3"-form codes. */ for (j = 7; j > 0; j--) { if (ctypei[j] != '-') break; ctypei[j] = '\0'; } } /* Logarithmic or tabular axis? */ wcs->types[i] = 0; if (strcmp(ctypei+4, "-LOG") == 0) { /* Logarithmic axis. */ wcs->types[i] = 400; } else if (strcmp(ctypei+4, "-TAB") == 0) { /* Tabular axis. */ wcs->types[i] = 500; } if (wcs->types[i]) { /* Could have -LOG or -TAB with celestial or spectral types. */ ctypei[4] = '\0'; /* Take care of things like 'FREQ-LOG' or 'RA---TAB'. */ for (j = 3; j >= 0; j--) { if (ctypei[j] != '-') break; ctypei[j] = '\0'; } } /* Translate AIPS spectral types for spctyp(). */ if (spcaips(ctypei, wcs->velref, ctypei, specsys) == 0) { strcpy(wcs->ctype[i], ctypei); if (wcs->specsys[0] == '\0') strcpy(wcs->specsys, specsys); } /* Process linear axes. */ if (!(strlen(ctypei) == 8 && ctypei[4] == '-')) { /* Identify Stokes, celestial and spectral types. */ if (strcmp(ctypei, "STOKES") == 0) { /* STOKES axis. */ wcs->types[i] = 1100; } else if (strcmp(ctypei, "RA") == 0 || strcmp(ctypei+1, "LON") == 0 || strcmp(ctypei+2, "LN") == 0) { /* Longitude axis. */ wcs->types[i] += 2000; if (wcs->lng < 0) { wcs->lng = i; strcpy(wcs->lngtyp, ctypei); } } else if (strcmp(ctypei, "DEC") == 0 || strcmp(ctypei+1, "LAT") == 0 || strcmp(ctypei+2, "LT") == 0) { /* Latitude axis. */ wcs->types[i] += 2001; if (wcs->lat < 0) { wcs->lat = i; strcpy(wcs->lattyp, ctypei); } } else if (strcmp(ctypei, "CUBEFACE") == 0) { /* CUBEFACE axis. */ if (wcs->cubeface == -1) { wcs->types[i] = 2102; wcs->cubeface = i; } else { /* Multiple CUBEFACE axes! */ return wcserr_set(WCSERR_SET(WCSERR_BAD_CTYPE), "Multiple CUBEFACE axes (in CTYPE%d%.1s and CTYPE%d%.1s)", wcs->cubeface+1, alt, i+1, alt); } } else if (spctyp(ctypei, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) == 0) { /* Spectral axis. */ if (wcs->spec < 0) wcs->spec = i; wcs->types[i] += 3000; } continue; } /* CTYPEia is in "4-3" form; is it a recognized spectral type? */ if (spctyp(ctypei, 0x0, scode, 0x0, 0x0, 0x0, 0x0, 0x0) == 0) { /* Non-linear spectral axis found. */ wcs->types[i] = 3300; /* Check uniqueness. */ if (wcs->spec >= 0) { return wcserr_set(WCSERR_SET(WCSERR_BAD_CTYPE), "Multiple spectral axes (in CTYPE%d%.1s and CTYPE%d%.1s)", wcs->spec+1, alt, i+1, alt); } wcs->spec = i; continue; } /* Is it a recognized celestial projection? */ for (j = 0; j < prj_ncode; j++) { if (strncmp(ctypei+5, prj_codes[j], 3) == 0) break; } if (j == prj_ncode) { /* Not a standard projection code, maybe it's an alias. */ for (j = 0; j < nalias; j++) { if (strncmp(ctypei+5, aliases[j], 3) == 0) break; } if (j == nalias) { /* Not a recognized algorithm code of any type. */ wcs->types[i] = -1; return wcserr_set(WCSERR_SET(WCSERR_BAD_CTYPE), "Unrecognized projection code (%s in CTYPE%d%.1s)", ctypei+5, i+1, alt); } } /* Parse the celestial axis type. */ wcs->types[i] = 2200; if (*pcode == '\0') { /* The first of the two celestial axes. */ sprintf(pcode, "%.3s", ctypei+5); if (strncmp(ctypei, "RA--", 4) == 0) { wcs->lng = i; strcpy(wcs->lngtyp, "RA"); strcpy(wcs->lattyp, "DEC"); ndx = &wcs->lat; sprintf(requir, "DEC--%s", pcode); } else if (strncmp(ctypei, "DEC-", 4) == 0) { wcs->lat = i; strcpy(wcs->lngtyp, "RA"); strcpy(wcs->lattyp, "DEC"); ndx = &wcs->lng; sprintf(requir, "RA---%s", pcode); } else if (strncmp(ctypei+1, "LON", 3) == 0) { wcs->lng = i; sprintf(wcs->lngtyp, "%cLON", ctypei[0]); sprintf(wcs->lattyp, "%cLAT", ctypei[0]); ndx = &wcs->lat; sprintf(requir, "%s-%s", wcs->lattyp, pcode); } else if (strncmp(ctypei+1, "LAT", 3) == 0) { wcs->lat = i; sprintf(wcs->lngtyp, "%cLON", ctypei[0]); sprintf(wcs->lattyp, "%cLAT", ctypei[0]); ndx = &wcs->lng; sprintf(requir, "%s-%s", wcs->lngtyp, pcode); } else if (strncmp(ctypei+2, "LN", 2) == 0) { wcs->lng = i; sprintf(wcs->lngtyp, "%c%cLN", ctypei[0], ctypei[1]); sprintf(wcs->lattyp, "%c%cLT", ctypei[0], ctypei[1]); ndx = &wcs->lat; sprintf(requir, "%s-%s", wcs->lattyp, pcode); } else if (strncmp(ctypei+2, "LT", 2) == 0) { wcs->lat = i; sprintf(wcs->lngtyp, "%c%cLN", ctypei[0], ctypei[1]); sprintf(wcs->lattyp, "%c%cLT", ctypei[0], ctypei[1]); ndx = &wcs->lng; sprintf(requir, "%s-%s", wcs->lngtyp, pcode); } else { /* Unrecognized celestial type. */ wcs->types[i] = -1; wcs->lng = -1; wcs->lat = -1; return wcserr_set(WCSERR_SET(WCSERR_BAD_CTYPE), "Unrecognized celestial type (%5s in CTYPE%d%.1s)", ctypei, i+1, alt); } if (wcs->lat >= 0) wcs->types[i]++; } else { /* Looking for the complementary celestial axis. */ if (wcs->lat < 0) wcs->types[i]++; if (strncmp(ctypei, requir, 8) != 0) { /* Inconsistent projection types. */ wcs->lng = -1; wcs->lat = -1; return wcserr_set(WCSERR_SET(WCSERR_BAD_CTYPE), "Inconsistent " "projection types (expected %s, got %s in CTYPE%d%.1s)", requir, ctypei, i+1, alt); } *ndx = i; requir[0] = '\0'; } } /* Do we have a complementary pair of celestial axes? */ if (strcmp(requir, "")) { /* Unmatched celestial axis. */ wcs->lng = -1; wcs->lat = -1; return wcserr_set(WCSERR_SET(WCSERR_BAD_CTYPE), "Unmatched celestial axes"); } /* Table group numbers. */ for (j = 0; j < wcs->ntab; j++) { for (m = 0; m < wcs->tab[j].M; m++) { /* Get image axis number. */ i = wcs->tab[j].map[m]; type = (wcs->types[i] / 100) % 10; if (type != 5) { return wcserr_set(WCSERR_SET(WCSERR_BAD_CTYPE), "Table parameters set for non-table axis type"); } wcs->types[i] += 10 * j; } } return 0; } /* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : */ int wcs_units(struct wcsprm *wcs) { static const char *function = "wcs_units"; char ctype[9], units[16]; int i, j, naxis; double scale, offset, power; struct wcserr *uniterr = 0x0, **err; if (wcs == 0x0) return WCSERR_NULL_POINTER; err = &(wcs->err); naxis = wcs->naxis; for (i = 0; i < naxis; i++) { /* Use types set by wcs_types(). */ switch (wcs->types[i]/1000) { case 2: /* Celestial axis. */ strcpy(units, "deg"); break; case 3: /* Spectral axis. */ strncpy(ctype, wcs->ctype[i], 8); ctype[8] = '\0'; spctyp(ctype, 0x0, 0x0, 0x0, units, 0x0, 0x0, 0x0); break; default: continue; } /* Tabular axis, CDELTia and CRVALia relate to indices. */ if ((wcs->types[i]/100)%10 == 5) { continue; } wcsutil_null_fill(72, wcs->cunit[i]); if (wcs->cunit[i][0]) { if (wcsunitse(wcs->cunit[i], units, &scale, &offset, &power, &uniterr)) { wcserr_set(WCSERR_SET(WCSERR_BAD_COORD_TRANS), "In CUNIT%d%.1s: %s", i+1, (*wcs->alt)?wcs->alt:"", uniterr->msg); free(uniterr); return WCSERR_BAD_COORD_TRANS; } if (scale != 1.0) { wcs->cdelt[i] *= scale; wcs->crval[i] *= scale; for (j = 0; j < naxis; j++) { *(wcs->cd + i*naxis + j) *= scale; } strcpy(wcs->cunit[i], units); } } else { strcpy(wcs->cunit[i], units); } } return 0; } /*--------------------------------------------------------------------------*/ int wcsp2s( struct wcsprm *wcs, int ncoord, int nelem, const double pixcrd[], double imgcrd[], double phi[], double theta[], double world[], int stat[]) { static const char *function = "wcsp2s"; int bits, face, i, iso_x, iso_y, istat, *istatp, itab, k, m, nx, ny, *statp, status, type; double crvali, offset; register double *img, *wrl; struct celprm *wcscel = &(wcs->cel); struct prjprm *wcsprj = &(wcscel->prj); struct wcserr **err; /* Initialize if required. */ if (wcs == 0x0) return WCSERR_NULL_POINTER; err = &(wcs->err); if (wcs->flag != WCSSET) { if ((status = wcsset(wcs))) return status; } /* Sanity check. */ if (ncoord < 1 || (ncoord > 1 && nelem < wcs->naxis)) { return wcserr_set(WCSERR_SET(WCSERR_BAD_CTYPE), "ncoord and/or nelem inconsistent with the wcsprm"); } /* Apply pixel-to-world linear transformation. */ if ((status = linp2x(&(wcs->lin), ncoord, nelem, pixcrd, imgcrd))) { return wcserr_set(WCS_ERRMSG(wcs_linerr[status])); } /* Initialize status vectors. */ if ((istatp = calloc(ncoord, sizeof(int))) == 0x0) { return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } stat[0] = 0; wcsutil_setAli(ncoord, 1, stat); /* Convert intermediate world coordinates to world coordinates. */ for (i = 0; i < wcs->naxis; i++) { /* Extract the second digit of the axis type code. */ type = (wcs->types[i] / 100) % 10; if (type <= 1) { /* Linear or quantized coordinate axis. */ img = imgcrd + i; wrl = world + i; crvali = wcs->crval[i]; for (k = 0; k < ncoord; k++) { *wrl = *img + crvali; img += nelem; wrl += nelem; } } else if (wcs->types[i] == 2200) { /* Convert celestial coordinates; do we have a CUBEFACE axis? */ if (wcs->cubeface != -1) { /* Separation between faces. */ if (wcsprj->r0 == 0.0) { offset = 90.0; } else { offset = wcsprj->r0*PI/2.0; } /* Lay out faces in a plane. */ img = imgcrd; statp = stat; bits = (1 << i) | (1 << wcs->lat); for (k = 0; k < ncoord; k++, statp++) { face = (int)(*(img+wcs->cubeface) + 0.5); if (fabs(*(img+wcs->cubeface) - face) > 1e-10) { *statp |= bits; status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_PIX)); } else { *statp = 0; switch (face) { case 0: *(img+wcs->lat) += offset; break; case 1: break; case 2: *(img+i) += offset; break; case 3: *(img+i) += offset*2; break; case 4: *(img+i) += offset*3; break; case 5: *(img+wcs->lat) -= offset; break; default: *statp |= bits; status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_PIX)); } } img += nelem; } } /* Check for constant x and/or y. */ nx = ncoord; ny = 0; if ((iso_x = wcsutil_allEq(ncoord, nelem, imgcrd+i))) { nx = 1; ny = ncoord; } if ((iso_y = wcsutil_allEq(ncoord, nelem, imgcrd+wcs->lat))) { ny = 1; } /* Transform projection plane coordinates to celestial coordinates. */ if ((istat = celx2s(wcscel, nx, ny, nelem, nelem, imgcrd+i, imgcrd+wcs->lat, phi, theta, world+i, world+wcs->lat, istatp))) { if (istat) { status = wcserr_set(WCS_ERRMSG(wcs_celerr[istat])); if (status != WCSERR_BAD_PIX) { goto cleanup; } } } /* If x and y were both constant, replicate values. */ if (iso_x && iso_y) { wcsutil_setAll(ncoord, nelem, world+i); wcsutil_setAll(ncoord, nelem, world+wcs->lat); wcsutil_setAll(ncoord, 1, phi); wcsutil_setAll(ncoord, 1, theta); wcsutil_setAli(ncoord, 1, istatp); } if (istat == 5) { bits = (1 << i) | (1 << wcs->lat); wcsutil_setBit(ncoord, istatp, bits, stat); } } else if (type == 3 || type == 4) { /* Check for constant x. */ nx = ncoord; if ((iso_x = wcsutil_allEq(ncoord, nelem, imgcrd+i))) { nx = 1; } istat = 0; if (wcs->types[i] == 3300) { /* Spectral coordinates. */ istat = spcx2s(&(wcs->spc), nx, nelem, nelem, imgcrd+i, world+i, istatp); if (istat) { status = wcserr_set(WCS_ERRMSG(wcs_spcerr[istat])); if (status != WCSERR_BAD_PIX) { goto cleanup; } } } else if (type == 4) { /* Logarithmic coordinates. */ istat = logx2s(wcs->crval[i], nx, nelem, nelem, imgcrd+i, world+i, istatp); if (istat) { status = wcserr_set(WCS_ERRMSG(wcs_logerr[istat])); if (status != WCSERR_BAD_PIX) { goto cleanup; } } } /* If x was constant, replicate values. */ if (iso_x) { wcsutil_setAll(ncoord, nelem, world+i); wcsutil_setAli(ncoord, 1, istatp); } if (istat == 3) { wcsutil_setBit(ncoord, istatp, 1 << i, stat); } } } /* Do tabular coordinates. */ for (itab = 0; itab < wcs->ntab; itab++) { istat = tabx2s(wcs->tab + itab, ncoord, nelem, imgcrd, world, istatp); if (istat) { status = wcserr_set(WCS_ERRMSG(wcs_taberr[istat])); if (status != WCSERR_BAD_PIX) { goto cleanup; } else { bits = 0; for (m = 0; m < wcs->tab[itab].M; m++) { bits |= 1 << wcs->tab[itab].map[m]; } wcsutil_setBit(ncoord, istatp, bits, stat); } } } /* Zero the unused world coordinate elements. */ for (i = wcs->naxis; i < nelem; i++) { world[i] = 0.0; wcsutil_setAll(ncoord, nelem, world+i); } cleanup: free(istatp); return status; } /*--------------------------------------------------------------------------*/ int wcss2p( struct wcsprm* wcs, int ncoord, int nelem, const double world[], double phi[], double theta[], double imgcrd[], double pixcrd[], int stat[]) { static const char *function = "wcss2p"; int bits, i, isolat, isolng, isospec, istat, *istatp, itab, k, m, nlat, nlng, nwrld, status, type; double crvali, offset; register const double *wrl; register double *img; struct celprm *wcscel = &(wcs->cel); struct prjprm *wcsprj = &(wcscel->prj); struct wcserr **err; /* Initialize if required. */ if (wcs == 0x0) return WCSERR_NULL_POINTER; err = &(wcs->err); if (wcs->flag != WCSSET) { if ((status = wcsset(wcs))) return status; } /* Sanity check. */ if (ncoord < 1 || (ncoord > 1 && nelem < wcs->naxis)) { return wcserr_set(WCSERR_SET(WCSERR_BAD_CTYPE), "ncoord and/or nelem inconsistent with the wcsprm"); } /* Initialize status vectors. */ if ((istatp = calloc(ncoord, sizeof(int))) == 0x0) { return wcserr_set(WCS_ERRMSG(WCSERR_MEMORY)); } status = 0; stat[0] = 0; wcsutil_setAli(ncoord, 1, stat); /* Convert world coordinates to intermediate world coordinates. */ for (i = 0; i < wcs->naxis; i++) { /* Extract the second digit of the axis type code. */ type = (wcs->types[i] / 100) % 10; if (type <= 1) { /* Linear or quantized coordinate axis. */ wrl = world + i; img = imgcrd + i; crvali = wcs->crval[i]; for (k = 0; k < ncoord; k++) { *img = *wrl - crvali; wrl += nelem; img += nelem; } } else if (wcs->types[i] == 2200) { /* Celestial coordinates; check for constant lng and/or lat. */ nlng = ncoord; nlat = 0; if ((isolng = wcsutil_allEq(ncoord, nelem, world+i))) { nlng = 1; nlat = ncoord; } if ((isolat = wcsutil_allEq(ncoord, nelem, world+wcs->lat))) { nlat = 1; } /* Transform celestial coordinates to projection plane coordinates. */ if ((istat = cels2x(wcscel, nlng, nlat, nelem, nelem, world+i, world+wcs->lat, phi, theta, imgcrd+i, imgcrd+wcs->lat, istatp))) { if (istat) { status = wcserr_set(WCS_ERRMSG(wcs_celerr[istat])); if (status != WCSERR_BAD_WORLD) { goto cleanup; } } } /* If lng and lat were both constant, replicate values. */ if (isolng && isolat) { wcsutil_setAll(ncoord, nelem, imgcrd+i); wcsutil_setAll(ncoord, nelem, imgcrd+wcs->lat); wcsutil_setAll(ncoord, 1, phi); wcsutil_setAll(ncoord, 1, theta); wcsutil_setAli(ncoord, 1, istatp); } if (istat == CELERR_BAD_WORLD) { bits = (1 << i) | (1 << wcs->lat); wcsutil_setBit(ncoord, istatp, bits, stat); } /* Do we have a CUBEFACE axis? */ if (wcs->cubeface != -1) { /* Separation between faces. */ if (wcsprj->r0 == 0.0) { offset = 90.0; } else { offset = wcsprj->r0*PI/2.0; } /* Stack faces in a cube. */ img = imgcrd; for (k = 0; k < ncoord; k++) { if (*(img+wcs->lat) < -0.5*offset) { *(img+wcs->lat) += offset; *(img+wcs->cubeface) = 5.0; } else if (*(img+wcs->lat) > 0.5*offset) { *(img+wcs->lat) -= offset; *(img+wcs->cubeface) = 0.0; } else if (*(img+i) > 2.5*offset) { *(img+i) -= 3.0*offset; *(img+wcs->cubeface) = 4.0; } else if (*(img+i) > 1.5*offset) { *(img+i) -= 2.0*offset; *(img+wcs->cubeface) = 3.0; } else if (*(img+i) > 0.5*offset) { *(img+i) -= offset; *(img+wcs->cubeface) = 2.0; } else { *(img+wcs->cubeface) = 1.0; } img += nelem; } } } else if (type == 3 || type == 4) { /* Check for constancy. */ nwrld = ncoord; if ((isospec = wcsutil_allEq(ncoord, nelem, world+i))) { nwrld = 1; } istat = 0; if (wcs->types[i] == 3300) { /* Spectral coordinates. */ istat = spcs2x(&(wcs->spc), nwrld, nelem, nelem, world+i, imgcrd+i, istatp); if (istat) { status = wcserr_set(WCS_ERRMSG(wcs_spcerr[istat])); if (status != WCSERR_BAD_WORLD) { goto cleanup; } } } else if (type == 4) { /* Logarithmic coordinates. */ istat = logs2x(wcs->crval[i], nwrld, nelem, nelem, world+i, imgcrd+i, istatp); if (istat) { status = wcserr_set(WCS_ERRMSG(wcs_logerr[istat])); if (status != WCSERR_BAD_WORLD) { goto cleanup; } } } /* If constant, replicate values. */ if (isospec) { wcsutil_setAll(ncoord, nelem, imgcrd+i); wcsutil_setAli(ncoord, 1, istatp); } if (istat == 4) { wcsutil_setBit(ncoord, istatp, 1 << i, stat); } } } /* Do tabular coordinates. */ for (itab = 0; itab < wcs->ntab; itab++) { istat = tabs2x(wcs->tab + itab, ncoord, nelem, world, imgcrd, istatp); if (istat) { status = wcserr_set(WCS_ERRMSG(wcs_taberr[istat])); if (status == WCSERR_BAD_WORLD) { bits = 0; for (m = 0; m < wcs->tab[itab].M; m++) { bits |= 1 << wcs->tab[itab].map[m]; } wcsutil_setBit(ncoord, istatp, bits, stat); } else { goto cleanup; } } } /* Zero the unused intermediate world coordinate elements. */ for (i = wcs->naxis; i < nelem; i++) { imgcrd[i] = 0.0; wcsutil_setAll(ncoord, nelem, imgcrd+i); } /* Apply world-to-pixel linear transformation. */ if ((istat = linx2p(&(wcs->lin), ncoord, nelem, imgcrd, pixcrd))) { status = wcserr_set(WCS_ERRMSG(wcs_linerr[istat])); goto cleanup; } cleanup: free(istatp); return status; } /*--------------------------------------------------------------------------*/ int wcsmix( struct wcsprm *wcs, int mixpix, int mixcel, const double vspan[2], double vstep, int viter, double world[], double phi[], double theta[], double imgcrd[], double pixcrd[]) { static const char *function = "wcsmix"; const int niter = 60; int crossed, istep, iter, j, k, nstep, retry, stat[1], status; const double tol = 1.0e-10; const double tol2 = 100.0*tol; double *worldlat, *worldlng; double lambda, span[2], step; double pixmix; double dlng, lng, lng0, lng0m, lng1, lng1m; double dlat, lat, lat0, lat0m, lat1, lat1m; double d, d0, d0m, d1, d1m, dx = 0.0; double dabs, dmin, lmin; double dphi, phi0, phi1; struct celprm *wcscel = &(wcs->cel); struct wcsprm wcs0; struct wcserr **err; /* Initialize if required. */ if (wcs == 0x0) return WCSERR_NULL_POINTER; err = &(wcs->err); if (wcs->flag != WCSSET) { if ((status = wcsset(wcs))) return status; } worldlng = world + wcs->lng; worldlat = world + wcs->lat; /* Check vspan. */ if (vspan[0] <= vspan[1]) { span[0] = vspan[0]; span[1] = vspan[1]; } else { /* Swap them. */ span[0] = vspan[1]; span[1] = vspan[0]; } /* Check vstep. */ step = fabs(vstep); if (step == 0.0) { step = (span[1] - span[0])/10.0; if (step > 1.0 || step == 0.0) step = 1.0; } /* Check viter. */ nstep = viter; if (nstep < 5) { nstep = 5; } else if (nstep > 10) { nstep = 10; } /* Given pixel element. */ pixmix = pixcrd[mixpix]; /* Iterate on the step size. */ for (istep = 0; istep <= nstep; istep++) { if (istep) step /= 2.0; /* Iterate on the sky coordinate between the specified range. */ if (mixcel == 1) { /* Celestial longitude is given. */ /* Check whether the solution interval is a crossing interval. */ lat0 = span[0]; *worldlat = lat0; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d0 = pixcrd[mixpix] - pixmix; dabs = fabs(d0); if (dabs < tol) return 0; lat1 = span[1]; *worldlat = lat1; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d1 = pixcrd[mixpix] - pixmix; dabs = fabs(d1); if (dabs < tol) return 0; lmin = lat1; dmin = dabs; /* Check for a crossing point. */ if (signbit(d0) != signbit(d1)) { crossed = 1; dx = d1; } else { crossed = 0; lat0 = span[1]; } for (retry = 0; retry < 4; retry++) { /* Refine the solution interval. */ while (lat0 > span[0]) { lat0 -= step; if (lat0 < span[0]) lat0 = span[0]; *worldlat = lat0; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d0 = pixcrd[mixpix] - pixmix; /* Check for a solution. */ dabs = fabs(d0); if (dabs < tol) return 0; /* Record the point of closest approach. */ if (dabs < dmin) { lmin = lat0; dmin = dabs; } /* Check for a crossing point. */ if (signbit(d0) != signbit(d1)) { crossed = 2; dx = d0; break; } /* Advance to the next subinterval. */ lat1 = lat0; d1 = d0; } if (crossed) { /* A crossing point was found. */ for (iter = 0; iter < niter; iter++) { /* Use regula falsi division of the interval. */ lambda = d0/(d0-d1); if (lambda < 0.1) { lambda = 0.1; } else if (lambda > 0.9) { lambda = 0.9; } dlat = lat1 - lat0; lat = lat0 + lambda*dlat; *worldlat = lat; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } /* Check for a solution. */ d = pixcrd[mixpix] - pixmix; dabs = fabs(d); if (dabs < tol) return 0; if (dlat < tol) { /* An artifact of numerical imprecision. */ if (dabs < tol2) return 0; /* Must be a discontinuity. */ break; } /* Record the point of closest approach. */ if (dabs < dmin) { lmin = lat; dmin = dabs; } if (signbit(d0) == signbit(d)) { lat0 = lat; d0 = d; } else { lat1 = lat; d1 = d; } } /* No convergence, must have been a discontinuity. */ if (crossed == 1) lat0 = span[1]; lat1 = lat0; d1 = dx; crossed = 0; } else { /* No crossing point; look for a tangent point. */ if (lmin == span[0]) break; if (lmin == span[1]) break; lat = lmin; lat0 = lat - step; if (lat0 < span[0]) lat0 = span[0]; lat1 = lat + step; if (lat1 > span[1]) lat1 = span[1]; *worldlat = lat0; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d0 = fabs(pixcrd[mixpix] - pixmix); d = dmin; *worldlat = lat1; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d1 = fabs(pixcrd[mixpix] - pixmix); for (iter = 0; iter < niter; iter++) { lat0m = (lat0 + lat)/2.0; *worldlat = lat0m; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d0m = fabs(pixcrd[mixpix] - pixmix); if (d0m < tol) return 0; lat1m = (lat1 + lat)/2.0; *worldlat = lat1m; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d1m = fabs(pixcrd[mixpix] - pixmix); if (d1m < tol) return 0; if (d0m < d && d0m <= d1m) { lat1 = lat; d1 = d; lat = lat0m; d = d0m; } else if (d1m < d) { lat0 = lat; d0 = d; lat = lat1m; d = d1m; } else { lat0 = lat0m; d0 = d0m; lat1 = lat1m; d1 = d1m; } } } } } else { /* Celestial latitude is given. */ /* Check whether the solution interval is a crossing interval. */ lng0 = span[0]; *worldlng = lng0; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d0 = pixcrd[mixpix] - pixmix; dabs = fabs(d0); if (dabs < tol) return 0; lng1 = span[1]; *worldlng = lng1; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d1 = pixcrd[mixpix] - pixmix; dabs = fabs(d1); if (dabs < tol) return 0; lmin = lng1; dmin = dabs; /* Check for a crossing point. */ if (signbit(d0) != signbit(d1)) { crossed = 1; dx = d1; } else { crossed = 0; lng0 = span[1]; } for (retry = 0; retry < 4; retry++) { /* Refine the solution interval. */ while (lng0 > span[0]) { lng0 -= step; if (lng0 < span[0]) lng0 = span[0]; *worldlng = lng0; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d0 = pixcrd[mixpix] - pixmix; /* Check for a solution. */ dabs = fabs(d0); if (dabs < tol) return 0; /* Record the point of closest approach. */ if (dabs < dmin) { lmin = lng0; dmin = dabs; } /* Check for a crossing point. */ if (signbit(d0) != signbit(d1)) { crossed = 2; dx = d0; break; } /* Advance to the next subinterval. */ lng1 = lng0; d1 = d0; } if (crossed) { /* A crossing point was found. */ for (iter = 0; iter < niter; iter++) { /* Use regula falsi division of the interval. */ lambda = d0/(d0-d1); if (lambda < 0.1) { lambda = 0.1; } else if (lambda > 0.9) { lambda = 0.9; } dlng = lng1 - lng0; lng = lng0 + lambda*dlng; *worldlng = lng; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } /* Check for a solution. */ d = pixcrd[mixpix] - pixmix; dabs = fabs(d); if (dabs < tol) return 0; if (dlng < tol) { /* An artifact of numerical imprecision. */ if (dabs < tol2) return 0; /* Must be a discontinuity. */ break; } /* Record the point of closest approach. */ if (dabs < dmin) { lmin = lng; dmin = dabs; } if (signbit(d0) == signbit(d)) { lng0 = lng; d0 = d; } else { lng1 = lng; d1 = d; } } /* No convergence, must have been a discontinuity. */ if (crossed == 1) lng0 = span[1]; lng1 = lng0; d1 = dx; crossed = 0; } else { /* No crossing point; look for a tangent point. */ if (lmin == span[0]) break; if (lmin == span[1]) break; lng = lmin; lng0 = lng - step; if (lng0 < span[0]) lng0 = span[0]; lng1 = lng + step; if (lng1 > span[1]) lng1 = span[1]; *worldlng = lng0; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d0 = fabs(pixcrd[mixpix] - pixmix); d = dmin; *worldlng = lng1; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d1 = fabs(pixcrd[mixpix] - pixmix); for (iter = 0; iter < niter; iter++) { lng0m = (lng0 + lng)/2.0; *worldlng = lng0m; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d0m = fabs(pixcrd[mixpix] - pixmix); if (d0m < tol) return 0; lng1m = (lng1 + lng)/2.0; *worldlng = lng1m; if ((status = wcss2p(wcs, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d1m = fabs(pixcrd[mixpix] - pixmix); if (d1m < tol) return 0; if (d0m < d && d0m <= d1m) { lng1 = lng; d1 = d; lng = lng0m; d = d0m; } else if (d1m < d) { lng0 = lng; d0 = d; lng = lng1m; d = d1m; } else { lng0 = lng0m; d0 = d0m; lng1 = lng1m; d1 = d1m; } } } } } } /* Set cel0 to the unity transformation. */ wcs0 = *wcs; wcs0.cel.euler[0] = -90.0; wcs0.cel.euler[1] = 0.0; wcs0.cel.euler[2] = 90.0; wcs0.cel.euler[3] = 1.0; wcs0.cel.euler[4] = 0.0; /* No convergence, check for aberrant behaviour at a native pole. */ *theta = -90.0; for (j = 1; j <= 2; j++) { /* Could the celestial coordinate element map to a native pole? */ *phi = 0.0; *theta = -*theta; sphx2s(wcscel->euler, 1, 1, 1, 1, phi, theta, &lng, &lat); if (mixcel == 1) { if (fabs(fmod(*worldlng-lng, 360.0)) > tol) continue; if (lat < span[0]) continue; if (lat > span[1]) continue; *worldlat = lat; } else { if (fabs(*worldlat-lat) > tol) continue; if (lng < span[0]) lng += 360.0; if (lng > span[1]) lng -= 360.0; if (lng < span[0]) continue; if (lng > span[1]) continue; *worldlng = lng; } /* Is there a solution for the given pixel coordinate element? */ lng = *worldlng; lat = *worldlat; /* Feed native coordinates to wcss2p() with cel0 set to unity. */ *worldlng = -180.0; *worldlat = *theta; if ((status = wcss2p(&wcs0, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (wcs->err) free(wcs->err); wcs->err = wcs0.err; if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d0 = pixcrd[mixpix] - pixmix; /* Check for a solution. */ if (fabs(d0) < tol) { /* Recall saved world coordinates. */ *worldlng = lng; *worldlat = lat; return 0; } /* Search for a crossing interval. */ phi0 = -180.0; for (k = -179; k <= 180; k++) { phi1 = (double) k; *worldlng = phi1; if ((status = wcss2p(&wcs0, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (wcs->err) free(wcs->err); wcs->err = wcs0.err; if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } d1 = pixcrd[mixpix] - pixmix; /* Check for a solution. */ dabs = fabs(d1); if (dabs < tol) { /* Recall saved world coordinates. */ *worldlng = lng; *worldlat = lat; return 0; } /* Is it a crossing interval? */ if (signbit(d0) != signbit(d1)) break; phi0 = phi1; d0 = d1; } for (iter = 1; iter <= niter; iter++) { /* Use regula falsi division of the interval. */ lambda = d0/(d0-d1); if (lambda < 0.1) { lambda = 0.1; } else if (lambda > 0.9) { lambda = 0.9; } dphi = phi1 - phi0; *worldlng = phi0 + lambda*dphi; if ((status = wcss2p(&wcs0, 1, 0, world, phi, theta, imgcrd, pixcrd, stat))) { if (wcs->err) free(wcs->err); wcs->err = wcs0.err; if (status == WCSERR_BAD_WORLD) { status = wcserr_set(WCS_ERRMSG(WCSERR_BAD_WORLD_COORD)); } return status; } /* Check for a solution. */ d = pixcrd[mixpix] - pixmix; dabs = fabs(d); if (dabs < tol || (dphi < tol && dabs < tol2)) { /* Recall saved world coordinates. */ *worldlng = lng; *worldlat = lat; return 0; } if (signbit(d0) == signbit(d)) { phi0 = *worldlng; d0 = d; } else { phi1 = *worldlng; d1 = d; } } } /* No solution. */ return wcserr_set(WCS_ERRMSG(WCSERR_NO_SOLUTION)); } /*--------------------------------------------------------------------------*/ int wcssptr( struct wcsprm *wcs, int *i, char ctype[9]) { static const char *function = "wcssptr"; int j, status; double cdelt, crval; struct wcserr **err; /* Initialize if required. */ if (wcs == 0x0) return WCSERR_NULL_POINTER; err = &(wcs->err); if (wcs->flag != WCSSET) { if ((status = wcsset(wcs))) return status; } if ((j = *i) < 0) { if ((j = wcs->spec) < 0) { /* Look for a linear spectral axis. */ for (j = 0; j < wcs->naxis; j++) { if (wcs->types[j]/100 == 30) { break; } } if (j >= wcs->naxis) { /* No spectral axis. */ return wcserr_set(WCSERR_SET(WCSERR_BAD_SUBIMAGE), "No spectral axis found."); } } *i = j; } /* Translate the spectral axis. */ if ((status = spctrne(wcs->ctype[j], wcs->crval[j], wcs->cdelt[j], wcs->restfrq, wcs->restwav, ctype, &crval, &cdelt, &(wcs->spc.err)))) { return wcserr_set(WCS_ERRMSG(wcs_spcerr[status])); } /* Translate keyvalues. */ wcs->flag = 0; wcs->cdelt[j] = cdelt; wcs->crval[j] = crval; spctyp(ctype, 0x0, 0x0, 0x0, wcs->cunit[j], 0x0, 0x0, 0x0); strcpy(wcs->ctype[j], ctype); /* This keeps things tidy if the spectral axis is linear. */ spcfree(&(wcs->spc)); spcini(&(wcs->spc)); return 0; } /*--------------------------------------------------------------------------*/ #define STRINGIZE(s) STRINGIFY(s) #define STRINGIFY(s) #s const char *wcslib_version( int vers[3]) { static const char *wcsver = STRINGIZE(WCSLIB_VERSION); if (vers != 0x0) { vers[2] = 0; sscanf(wcsver, "%d.%d.%d", vers, vers+1, vers+2); } return wcsver; } astropy-1.1.1/cextern/wcslib/C/spc.c0000644001134200020070000010766512644017723020212 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: spc.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include #include "wcserr.h" #include "wcsmath.h" #include "wcsprintf.h" #include "wcstrig.h" #include "wcsutil.h" #include "spc.h" #include "spx.h" /* Spectral algorithm codes. */ #define F2S 100; /* Axis linear in frequency. */ #define W2S 200; /* Axis linear in vacuum wavelengths. */ #define A2S 300; /* Axis linear in air wavelengths. */ #define V2S 400; /* Axis linear in velocity. */ #define GRI 500; /* Grism in vacuum. */ #define GRA 600; /* Grism in air. */ /* S-type spectral variables. */ #define FREQ 0; /* Frequency-like. */ #define AFRQ 1; /* Frequency-like. */ #define ENER 2; /* Frequency-like. */ #define WAVN 3; /* Frequency-like. */ #define VRAD 4; /* Frequency-like. */ #define WAVE 10; /* Vacuum wavelength-like. */ #define VOPT 11; /* Vacuum wavelength-like. */ #define ZOPT 12; /* Vacuum wavelength-like. */ #define AWAV 20; /* Air wavelength-like. */ #define VELO 30; /* Velocity-like. */ #define BETA 31; /* Velocity-like. */ /* Map status return value to message. */ const char *spc_errmsg[] = { "Success", "Null spcprm pointer passed", "Invalid spectral parameters", "One or more of x coordinates were invalid", "One or more of the spec coordinates were invalid"}; /* Map error returns for lower-level routines. SPXERR_BAD_INSPEC_COORD */ /* maps to either SPCERR_BAD_X or SPCERR_BAD_SPEC depending on context. */ const int spc_spxerr[] = { SPCERR_SUCCESS, /* 0: SPXERR_SUCCESS */ SPCERR_NULL_POINTER, /* 1: SPXERR_NULL_POINTER */ SPCERR_BAD_SPEC_PARAMS, /* 2: SPXERR_BAD_SPEC_PARAMS */ SPCERR_BAD_SPEC_PARAMS /* 3: SPXERR_BAD_SPEC_VAR */ /* 4: SPXERR_BAD_INSPEC_COORD */ }; /* Convenience macro for invoking wcserr_set(). */ #define SPC_ERRMSG(status) WCSERR_SET(status), spc_errmsg[status] #define C 2.99792458e8 /*--------------------------------------------------------------------------*/ int spcini(struct spcprm *spc) { register int k; if (spc == 0x0) return SPCERR_NULL_POINTER; spc->flag = 0; memset(spc->type, 0, 8); strcpy(spc->type, " "); strcpy(spc->code, " "); spc->crval = UNDEFINED; spc->restfrq = 0.0; spc->restwav = 0.0; for (k = 0; k < 7; k++) { spc->pv[k] = UNDEFINED; } for (k = 0; k < 6; k++) { spc->w[k] = 0.0; } spc->isGrism = 0; spc->padding1 = 0; spc->err = 0x0; spc->padding2 = 0x0; spc->spxX2P = 0x0; spc->spxP2S = 0x0; spc->spxS2P = 0x0; spc->spxP2X = 0x0; return 0; } /*--------------------------------------------------------------------------*/ int spcfree(struct spcprm *spc) { if (spc == 0x0) return SPCERR_NULL_POINTER; if (spc->err) { free(spc->err); spc->err = 0x0; } return 0; } /*--------------------------------------------------------------------------*/ int spcprt(const struct spcprm *spc) { char hext[32]; int i; if (spc == 0x0) return SPCERR_NULL_POINTER; wcsprintf(" flag: %d\n", spc->flag); wcsprintf(" type: \"%s\"\n", spc->type); wcsprintf(" code: \"%s\"\n", spc->code); if (undefined(spc->crval)) { wcsprintf(" crval: UNDEFINED\n"); } else { wcsprintf(" crval: %#- 11.5g\n", spc->crval); } wcsprintf(" restfrq: %f\n", spc->restfrq); wcsprintf(" restwav: %f\n", spc->restwav); wcsprintf(" pv:"); if (spc->isGrism) { for (i = 0; i < 5; i++) { if (undefined(spc->pv[i])) { wcsprintf(" UNDEFINED "); } else { wcsprintf(" %#- 11.5g", spc->pv[i]); } } wcsprintf("\n "); for (i = 5; i < 7; i++) { if (undefined(spc->pv[i])) { wcsprintf(" UNDEFINED "); } else { wcsprintf(" %#- 11.5g", spc->pv[i]); } } wcsprintf("\n"); } else { wcsprintf(" (not used)\n"); } wcsprintf(" w:"); for (i = 0; i < 3; i++) { wcsprintf(" %#- 11.5g", spc->w[i]); } if (spc->isGrism) { wcsprintf("\n "); for (i = 3; i < 6; i++) { wcsprintf(" %#- 11.5g", spc->w[i]); } wcsprintf("\n"); } else { wcsprintf(" (remainder unused)\n"); } wcsprintf(" isGrism: %d\n", spc->isGrism); WCSPRINTF_PTR(" err: ", spc->err, "\n"); if (spc->err) { wcserr_prt(spc->err, " "); } wcsprintf(" spxX2P: %s\n", wcsutil_fptr2str((int (*)(void))spc->spxX2P, hext)); wcsprintf(" spxP2S: %s\n", wcsutil_fptr2str((int (*)(void))spc->spxP2S, hext)); wcsprintf(" spxS2P: %s\n", wcsutil_fptr2str((int (*)(void))spc->spxS2P, hext)); wcsprintf(" spxP2X: %s\n", wcsutil_fptr2str((int (*)(void))spc->spxP2X, hext)); return 0; } /*--------------------------------------------------------------------------*/ int spcperr(const struct spcprm *spc, const char *prefix) { if (spc == 0x0) return SPCERR_NULL_POINTER; if (spc->err) { wcserr_prt(spc->err, prefix); } return 0; } /*--------------------------------------------------------------------------*/ int spcset(struct spcprm *spc) { static const char *function = "spcset"; char ctype[9], ptype, xtype; int restreq, status; double alpha, beta_r, crvalX, dn_r, dXdS, epsilon, G, m, lambda_r, n_r, t, restfrq, restwav, theta; struct wcserr **err; if (spc == 0x0) return SPCERR_NULL_POINTER; err = &(spc->err); if (undefined(spc->crval)) { return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Spectral crval is undefined"); } memset((spc->type)+4, 0, 4); spc->code[3] = '\0'; wcsutil_blank_fill(4, spc->type); wcsutil_blank_fill(3, spc->code); spc->w[0] = 0.0; /* Analyse the spectral axis type. */ memset(ctype, 0, 9); strncpy(ctype, spc->type, 4); if (*(spc->code) != ' ') { sprintf(ctype+4, "-%s", spc->code); } restfrq = spc->restfrq; restwav = spc->restwav; if ((status = spcspxe(ctype, spc->crval, restfrq, restwav, &ptype, &xtype, &restreq, &crvalX, &dXdS, &(spc->err)))) { return status; } /* Satisfy rest frequency/wavelength requirements. */ if (restreq) { if (restreq == 3 && restfrq == 0.0 && restwav == 0.0) { /* VRAD-V2F, VOPT-V2W, and ZOPT-V2W require the rest frequency or */ /* wavelength for the S-P and P-X transformations but not for S-X */ /* so supply a phoney value. */ restwav = 1.0; } if (restfrq == 0.0) { restfrq = C/restwav; } else { restwav = C/restfrq; } if (ptype == 'F') { spc->w[0] = restfrq; } else if (ptype != 'V') { spc->w[0] = restwav; } else { if (xtype == 'F') { spc->w[0] = restfrq; } else { spc->w[0] = restwav; } } } spc->w[1] = crvalX; spc->w[2] = dXdS; /* Set pointers-to-functions for the linear part of the transformation. */ if (ptype == 'F') { if (strcmp(spc->type, "FREQ") == 0) { /* Frequency. */ spc->flag = FREQ; spc->spxP2S = 0x0; spc->spxS2P = 0x0; } else if (strcmp(spc->type, "AFRQ") == 0) { /* Angular frequency. */ spc->flag = AFRQ; spc->spxP2S = freqafrq; spc->spxS2P = afrqfreq; } else if (strcmp(spc->type, "ENER") == 0) { /* Photon energy. */ spc->flag = ENER; spc->spxP2S = freqener; spc->spxS2P = enerfreq; } else if (strcmp(spc->type, "WAVN") == 0) { /* Wave number. */ spc->flag = WAVN; spc->spxP2S = freqwavn; spc->spxS2P = wavnfreq; } else if (strcmp(spc->type, "VRAD") == 0) { /* Radio velocity. */ spc->flag = VRAD; spc->spxP2S = freqvrad; spc->spxS2P = vradfreq; } } else if (ptype == 'W') { if (strcmp(spc->type, "WAVE") == 0) { /* Vacuum wavelengths. */ spc->flag = WAVE; spc->spxP2S = 0x0; spc->spxS2P = 0x0; } else if (strcmp(spc->type, "VOPT") == 0) { /* Optical velocity. */ spc->flag = VOPT; spc->spxP2S = wavevopt; spc->spxS2P = voptwave; } else if (strcmp(spc->type, "ZOPT") == 0) { /* Redshift. */ spc->flag = ZOPT; spc->spxP2S = wavezopt; spc->spxS2P = zoptwave; } } else if (ptype == 'A') { if (strcmp(spc->type, "AWAV") == 0) { /* Air wavelengths. */ spc->flag = AWAV; spc->spxP2S = 0x0; spc->spxS2P = 0x0; } } else if (ptype == 'V') { if (strcmp(spc->type, "VELO") == 0) { /* Relativistic velocity. */ spc->flag = VELO; spc->spxP2S = 0x0; spc->spxS2P = 0x0; } else if (strcmp(spc->type, "BETA") == 0) { /* Velocity ratio (v/c). */ spc->flag = BETA; spc->spxP2S = velobeta; spc->spxS2P = betavelo; } } /* Set pointers-to-functions for the non-linear part of the spectral */ /* transformation. */ spc->isGrism = 0; if (xtype == 'F') { /* Axis is linear in frequency. */ if (ptype == 'F') { spc->spxX2P = 0x0; spc->spxP2X = 0x0; } else if (ptype == 'W') { spc->spxX2P = freqwave; spc->spxP2X = wavefreq; } else if (ptype == 'A') { spc->spxX2P = freqawav; spc->spxP2X = awavfreq; } else if (ptype == 'V') { spc->spxX2P = freqvelo; spc->spxP2X = velofreq; } spc->flag += F2S; } else if (xtype == 'W' || xtype == 'w') { /* Axis is linear in vacuum wavelengths. */ if (ptype == 'F') { spc->spxX2P = wavefreq; spc->spxP2X = freqwave; } else if (ptype == 'W') { spc->spxX2P = 0x0; spc->spxP2X = 0x0; } else if (ptype == 'A') { spc->spxX2P = waveawav; spc->spxP2X = awavwave; } else if (ptype == 'V') { spc->spxX2P = wavevelo; spc->spxP2X = velowave; } if (xtype == 'W') { spc->flag += W2S; } else { /* Grism in vacuum. */ spc->isGrism = 1; spc->flag += GRI; } } else if (xtype == 'A' || xtype == 'a') { /* Axis is linear in air wavelengths. */ if (ptype == 'F') { spc->spxX2P = awavfreq; spc->spxP2X = freqawav; } else if (ptype == 'W') { spc->spxX2P = awavwave; spc->spxP2X = waveawav; } else if (ptype == 'A') { spc->spxX2P = 0x0; spc->spxP2X = 0x0; } else if (ptype == 'V') { spc->spxX2P = awavvelo; spc->spxP2X = veloawav; } if (xtype == 'A') { spc->flag += A2S; } else { /* Grism in air. */ spc->isGrism = 2; spc->flag += GRA; } } else if (xtype == 'V') { /* Axis is linear in relativistic velocity. */ if (ptype == 'F') { spc->spxX2P = velofreq; spc->spxP2X = freqvelo; } else if (ptype == 'W') { spc->spxX2P = velowave; spc->spxP2X = wavevelo; } else if (ptype == 'A') { spc->spxX2P = veloawav; spc->spxP2X = awavvelo; } else if (ptype == 'V') { spc->spxX2P = 0x0; spc->spxP2X = 0x0; } spc->flag += V2S; } /* Check for grism axes. */ if (spc->isGrism) { /* Axis is linear in "grism parameter"; work in wavelength. */ lambda_r = crvalX; /* Set defaults. */ if (undefined(spc->pv[0])) spc->pv[0] = 0.0; if (undefined(spc->pv[1])) spc->pv[1] = 0.0; if (undefined(spc->pv[2])) spc->pv[2] = 0.0; if (undefined(spc->pv[3])) spc->pv[3] = 1.0; if (undefined(spc->pv[4])) spc->pv[4] = 0.0; if (undefined(spc->pv[5])) spc->pv[5] = 0.0; if (undefined(spc->pv[6])) spc->pv[6] = 0.0; /* Compute intermediaries. */ G = spc->pv[0]; m = spc->pv[1]; alpha = spc->pv[2]; n_r = spc->pv[3]; dn_r = spc->pv[4]; epsilon = spc->pv[5]; theta = spc->pv[6]; t = G*m/cosd(epsilon); beta_r = asind(t*lambda_r - n_r*sind(alpha)); t -= dn_r*sind(alpha); spc->w[1] = -tand(theta); spc->w[2] *= t / (cosd(beta_r)*cosd(theta)*cosd(theta)); spc->w[3] = beta_r + theta; spc->w[4] = (n_r - dn_r*lambda_r)*sind(alpha); spc->w[5] = 1.0 / t; } return 0; } /*--------------------------------------------------------------------------*/ int spcx2s( struct spcprm *spc, int nx, int sx, int sspec, const double x[], double spec[], int stat[]) { static const char *function = "spcx2s"; int statP2S, status = 0, statX2P; double beta; register int ix; register int *statp; register const double *xp; register double *specp; struct wcserr **err; /* Initialize. */ if (spc == 0x0) return SPCERR_NULL_POINTER; err = &(spc->err); if (spc->flag == 0) { if ((status = spcset(spc))) return status; } /* Convert intermediate world coordinate x to X. */ xp = x; specp = spec; statp = stat; for (ix = 0; ix < nx; ix++, xp += sx, specp += sspec) { *specp = spc->w[1] + (*xp)*spc->w[2]; *(statp++) = 0; } /* If X is the grism parameter then convert it to wavelength. */ if (spc->isGrism) { specp = spec; for (ix = 0; ix < nx; ix++, specp += sspec) { beta = atand(*specp) + spc->w[3]; *specp = (sind(beta) + spc->w[4]) * spc->w[5]; } } /* Apply the non-linear step of the algorithm chain to convert the */ /* X-type spectral variable to P-type intermediate spectral variable. */ if (spc->spxX2P) { if ((statX2P = spc->spxX2P(spc->w[0], nx, sspec, sspec, spec, spec, stat))) { if (statX2P == SPXERR_BAD_INSPEC_COORD) { status = SPCERR_BAD_X; } else if (statX2P == SPXERR_BAD_SPEC_PARAMS) { return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Invalid spectral parameters: Frequency or wavelength is 0"); } else { return wcserr_set(SPC_ERRMSG(spc_spxerr[statX2P])); } } } /* Apply the linear step of the algorithm chain to convert P-type */ /* intermediate spectral variable to the required S-type variable. */ if (spc->spxP2S) { if ((statP2S = spc->spxP2S(spc->w[0], nx, sspec, sspec, spec, spec, stat))) { if (statP2S == SPXERR_BAD_INSPEC_COORD) { status = SPCERR_BAD_X; } else if (statP2S == SPXERR_BAD_SPEC_PARAMS) { return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Invalid spectral parameters: Frequency or wavelength is 0"); } else { return wcserr_set(SPC_ERRMSG(spc_spxerr[statP2S])); } } } if (status) { wcserr_set(SPC_ERRMSG(status)); } return status; } /*--------------------------------------------------------------------------*/ int spcs2x( struct spcprm *spc, int nspec, int sspec, int sx, const double spec[], double x[], int stat[]) { static const char *function = "spcs2x"; int statP2X, status = 0, statS2P; double beta, s; register int ispec; register int *statp; register const double *specp; register double *xp; struct wcserr **err; /* Initialize. */ if (spc == 0x0) return SPCERR_NULL_POINTER; err = &(spc->err); if (spc->flag == 0) { if ((status = spcset(spc))) return status; } /* Apply the linear step of the algorithm chain to convert the S-type */ /* spectral variable to P-type intermediate spectral variable. */ if (spc->spxS2P) { if ((statS2P = spc->spxS2P(spc->w[0], nspec, sspec, sx, spec, x, stat))) { if (statS2P == SPXERR_BAD_INSPEC_COORD) { status = SPCERR_BAD_SPEC; } else if (statS2P == SPXERR_BAD_SPEC_PARAMS) { return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Invalid spectral parameters: Frequency or wavelength is 0"); } else { return wcserr_set(SPC_ERRMSG(spc_spxerr[statS2P])); } } } else { /* Just a copy. */ xp = x; specp = spec; statp = stat; for (ispec = 0; ispec < nspec; ispec++, specp += sspec, xp += sx) { *xp = *specp; *(statp++) = 0; } } /* Apply the non-linear step of the algorithm chain to convert P-type */ /* intermediate spectral variable to X-type spectral variable. */ if (spc->spxP2X) { if ((statP2X = spc->spxP2X(spc->w[0], nspec, sx, sx, x, x, stat))) { if (statP2X == SPCERR_BAD_SPEC) { status = SPCERR_BAD_SPEC; } else if (statP2X == SPXERR_BAD_SPEC_PARAMS) { return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Invalid spectral parameters: Frequency or wavelength is 0"); } else { return wcserr_set(SPC_ERRMSG(spc_spxerr[statP2X])); } } } if (spc->isGrism) { /* Convert X-type spectral variable (wavelength) to grism parameter. */ xp = x; statp = stat; for (ispec = 0; ispec < nspec; ispec++, xp += sx, statp++) { if (*statp) continue; s = *xp/spc->w[5] - spc->w[4]; if (fabs(s) <= 1.0) { beta = asind(s); *xp = tand(beta - spc->w[3]); } else { *statp = 1; } } } /* Convert X-type spectral variable to intermediate world coordinate x. */ xp = x; statp = stat; for (ispec = 0; ispec < nspec; ispec++, xp += sx) { if (*(statp++)) continue; *xp -= spc->w[1]; *xp /= spc->w[2]; } if (status) { wcserr_set(SPC_ERRMSG(status)); } return status; } /*--------------------------------------------------------------------------*/ int spctyp( const char ctypei[9], char stype[], char scode[], char sname[], char units[], char *ptype, char *xtype, int *restreq) { return spctype( ctypei, stype, scode, sname, units, ptype, xtype, restreq, NULL); } /* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : */ int spctype( const char ctypei[9], char stype[], char scode[], char sname[], char units[], char *ptype, char *xtype, int *restreq, struct wcserr **err) { static const char *function = "spctype"; char ctype[9], ptype_t, sname_t[32], units_t[8], xtype_t; int restreq_t = 0; if (err) *err = 0x0; /* Copy with blank padding. */ sprintf(ctype, "%-8.8s", ctypei); ctype[8] = '\0'; /* Validate the S-type spectral variable. */ if (strncmp(ctype, "FREQ", 4) == 0) { strcpy(sname_t, "Frequency"); strcpy(units_t, "Hz"); ptype_t = 'F'; } else if (strncmp(ctype, "AFRQ", 4) == 0) { strcpy(sname_t, "Angular frequency"); strcpy(units_t, "rad/s"); ptype_t = 'F'; } else if (strncmp(ctype, "ENER", 4) == 0) { strcpy(sname_t, "Photon energy"); strcpy(units_t, "J"); ptype_t = 'F'; } else if (strncmp(ctype, "WAVN", 4) == 0) { strcpy(sname_t, "Wavenumber"); strcpy(units_t, "/m"); ptype_t = 'F'; } else if (strncmp(ctype, "VRAD", 4) == 0) { strcpy(sname_t, "Radio velocity"); strcpy(units_t, "m/s"); ptype_t = 'F'; restreq_t = 1; } else if (strncmp(ctype, "WAVE", 4) == 0) { strcpy(sname_t, "Vacuum wavelength"); strcpy(units_t, "m"); ptype_t = 'W'; } else if (strncmp(ctype, "VOPT", 4) == 0) { strcpy(sname_t, "Optical velocity"); strcpy(units_t, "m/s"); ptype_t = 'W'; restreq_t = 1; } else if (strncmp(ctype, "ZOPT", 4) == 0) { strcpy(sname_t, "Redshift"); strcpy(units_t, ""); ptype_t = 'W'; restreq_t = 1; } else if (strncmp(ctype, "AWAV", 4) == 0) { strcpy(sname_t, "Air wavelength"); strcpy(units_t, "m"); ptype_t = 'A'; } else if (strncmp(ctype, "VELO", 4) == 0) { strcpy(sname_t, "Relativistic velocity"); strcpy(units_t, "m/s"); ptype_t = 'V'; } else if (strncmp(ctype, "BETA", 4) == 0) { strcpy(sname_t, "Velocity ratio (v/c)"); strcpy(units_t, ""); ptype_t = 'V'; } else { return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Unknown spectral type '%s'", ctype); } /* Determine X-type and validate the spectral algorithm code. */ if ((xtype_t = ctype[5]) == ' ') { /* The algorithm code must be completely blank. */ if (strcmp(ctype+4, " ") != 0) { return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Invalid spectral algorithm '%s'", ctype+4); } xtype_t = ptype_t; } else if (ctype[4] != '-') { return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Invalid spectral type '%s'", ctype); } else if (strcmp(ctype+5, "LOG") == 0 || strcmp(ctype+5, "TAB") == 0) { /* Logarithmic or tabular axis, not linear in any spectral type. */ } else if (xtype_t == 'G') { /* Validate the algorithm code. */ if (ctype[6] != 'R') { return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Invalid spectral algorithm '%s'", xtype_t); } /* Grism coordinates... */ if (ctype[7] == 'I') { /* ...in vacuum. */ xtype_t = 'w'; } else if (ctype[7] == 'A') { /* ...in air. */ xtype_t = 'a'; } else { return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Invalid spectral algorithm '%s'", xtype_t); } } else if (ctype[6] != '2') { /* Algorithm code has invalid syntax. */ return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Invalid spectral algorithm syntax '%s'", xtype_t); } else if (ctype[7] != ptype_t && ctype[7] != '?') { /* The P-, and S-type variables are inconsistent. */ return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "In spectral type '%s', P- and S-type variables are inconsistent", ctype); } else if (ctype[7] == ctype[5]) { /* Degenerate algorithm code. */ sprintf(ctype+4, " "); } /* Rest freq/wavelength required for transformation between P and X? */ if (strchr("FWAwa", (int)xtype_t)) { if (ptype_t == 'V') { restreq_t += 2; } } else if (xtype_t == 'V') { if (strchr("FWAwa", (int)ptype_t)) { restreq_t += 2; } } else if (strchr("LT", (int)xtype_t) == 0) { /* Invalid X-type variable code. */ return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "In spectral type '%s', invalid X-type variable code", ctype); } /* Copy results. */ if (stype) { strncpy(stype, ctype, 4); stype[4] = '\0'; } if (scode) strcpy(scode, ctype+5); if (sname) strcpy(sname, sname_t); if (units) strcpy(units, units_t); if (ptype) *ptype = ptype_t; if (xtype) *xtype = xtype_t; if (restreq) *restreq = restreq_t; return 0; } /*--------------------------------------------------------------------------*/ int spcspx( const char ctypeS[9], double crvalS, double restfrq, double restwav, char *ptype, char *xtype, int *restreq, double *crvalX, double *dXdS) { return spcspxe(ctypeS, crvalS, restfrq, restwav, ptype, xtype, restreq, crvalX, dXdS, 0x0); } /* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : */ int spcspxe( const char ctypeS[9], double crvalS, double restfrq, double restwav, char *ptype, char *xtype, int *restreq, double *crvalX, double *dXdS, struct wcserr **err) { static const char *function = "spcspxe"; char scode[4], stype[5], type[8]; int status; double dPdS, dXdP; struct spxprm spx; /* Analyse the spectral axis code. */ if ((status = spctype(ctypeS, stype, scode, 0x0, 0x0, ptype, xtype, restreq, err))) { return status; } if (strchr("LT", (int)(*xtype))) { /* Can't handle logarithmic or tabular coordinates. */ return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Can't handle logarithmic or tabular coordinates"); } /* Do we have rest frequency and/or wavelength as required? */ if ((*restreq)%3 && restfrq == 0.0 && restwav == 0.0) { return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Missing required rest frequency or wavelength"); } /* Compute all spectral parameters and their derivatives. */ strcpy(type, stype); spx.err = (err ? *err : 0x0); if ((status = specx(type, crvalS, restfrq, restwav, &spx))) { status = spc_spxerr[status]; if (err) { if ((*err = spx.err)) { (*err)->status = status; } } else { free(spx.err); } return status; } /* Transform S-P (linear) and P-X (non-linear). */ dPdS = 0.0; dXdP = 0.0; if (*ptype == 'F') { if (strcmp(stype, "FREQ") == 0) { dPdS = 1.0; } else if (strcmp(stype, "AFRQ") == 0) { dPdS = spx.dfreqafrq; } else if (strcmp(stype, "ENER") == 0) { dPdS = spx.dfreqener; } else if (strcmp(stype, "WAVN") == 0) { dPdS = spx.dfreqwavn; } else if (strcmp(stype, "VRAD") == 0) { dPdS = spx.dfreqvrad; } if (*xtype == 'F') { *crvalX = spx.freq; dXdP = 1.0; } else if (*xtype == 'W' || *xtype == 'w') { *crvalX = spx.wave; dXdP = spx.dwavefreq; } else if (*xtype == 'A' || *xtype == 'a') { *crvalX = spx.awav; dXdP = spx.dawavfreq; } else if (*xtype == 'V') { *crvalX = spx.velo; dXdP = spx.dvelofreq; } } else if (*ptype == 'W' || *ptype == 'w') { if (strcmp(stype, "WAVE") == 0) { dPdS = 1.0; } else if (strcmp(stype, "VOPT") == 0) { dPdS = spx.dwavevopt; } else if (strcmp(stype, "ZOPT") == 0) { dPdS = spx.dwavezopt; } if (*xtype == 'F') { *crvalX = spx.freq; dXdP = spx.dfreqwave; } else if (*xtype == 'W' || *xtype == 'w') { *crvalX = spx.wave; dXdP = 1.0; } else if (*xtype == 'A' || *xtype == 'a') { *crvalX = spx.awav; dXdP = spx.dawavwave; } else if (*xtype == 'V') { *crvalX = spx.velo; dXdP = spx.dvelowave; } } else if (*ptype == 'A' || *ptype == 'a') { if (strcmp(stype, "AWAV") == 0) { dPdS = 1.0; } if (*xtype == 'F') { *crvalX = spx.freq; dXdP = spx.dfreqawav; } else if (*xtype == 'W' || *xtype == 'w') { *crvalX = spx.wave; dXdP = spx.dwaveawav; } else if (*xtype == 'A' || *xtype == 'a') { *crvalX = spx.awav; dXdP = 1.0; } else if (*xtype == 'V') { *crvalX = spx.velo; dXdP = spx.dveloawav; } } else if (*ptype == 'V') { if (strcmp(stype, "VELO") == 0) { dPdS = 1.0; } else if (strcmp(stype, "BETA") == 0) { dPdS = spx.dvelobeta; } if (*xtype == 'F') { *crvalX = spx.freq; dXdP = spx.dfreqvelo; } else if (*xtype == 'W' || *xtype == 'w') { *crvalX = spx.wave; dXdP = spx.dwavevelo; } else if (*xtype == 'A' || *xtype == 'a') { *crvalX = spx.awav; dXdP = spx.dawavvelo; } else if (*xtype == 'V') { *crvalX = spx.velo; dXdP = 1.0; } } *dXdS = dXdP * dPdS; return 0; } /*--------------------------------------------------------------------------*/ int spcxps( const char ctypeS[9], double crvalX, double restfrq, double restwav, char *ptype, char *xtype, int *restreq, double *crvalS, double *dSdX) { return spcxpse(ctypeS, crvalX, restfrq, restwav, ptype, xtype, restreq, crvalS, dSdX, NULL); } /* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : */ int spcxpse( const char ctypeS[9], double crvalX, double restfrq, double restwav, char *ptype, char *xtype, int *restreq, double *crvalS, double *dSdX, struct wcserr **err) { static const char *function = "spcxpse"; char scode[4], stype[5], type[8]; int status; double dPdX, dSdP; struct spxprm spx; /* Analyse the spectral axis type. */ if ((status = spctype(ctypeS, stype, scode, 0x0, 0x0, ptype, xtype, restreq, err))) { return status; } if (strchr("LT", (int)(*xtype))) { /* Can't handle logarithmic or tabular coordinates. */ return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Can't handle logarithmic or tabular coordinates"); } /* Do we have rest frequency and/or wavelength as required? */ if ((*restreq)%3 && restfrq == 0.0 && restwav == 0.0) { return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Missing required rest frequency or wavelength"); } /* Compute all spectral parameters and their derivatives. */ if (*xtype == 'F') { strcpy(type, "FREQ"); } else if (*xtype == 'W' || *xtype == 'w') { strcpy(type, "WAVE"); } else if (*xtype == 'A' || *xtype == 'a') { strcpy(type, "AWAV"); } else if (*xtype == 'V') { strcpy(type, "VELO"); } spx.err = (err ? *err : 0x0); if (specx(type, crvalX, restfrq, restwav, &spx)) { status = spc_spxerr[status]; if (err) { if ((*err = spx.err)) { (*err)->status = status; } } else { free(spx.err); } return status; } /* Transform X-P (non-linear) and P-S (linear). */ dPdX = 0.0; dSdP = 0.0; if (*ptype == 'F') { if (*xtype == 'F') { dPdX = 1.0; } else if (*xtype == 'W' || *xtype == 'w') { dPdX = spx.dfreqwave; } else if (*xtype == 'A' || *xtype == 'a') { dPdX = spx.dfreqawav; } else if (*xtype == 'V') { dPdX = spx.dfreqvelo; } if (strcmp(stype, "FREQ") == 0) { *crvalS = spx.freq; dSdP = 1.0; } else if (strcmp(stype, "AFRQ") == 0) { *crvalS = spx.afrq; dSdP = spx.dafrqfreq; } else if (strcmp(stype, "ENER") == 0) { *crvalS = spx.ener; dSdP = spx.denerfreq; } else if (strcmp(stype, "WAVN") == 0) { *crvalS = spx.wavn; dSdP = spx.dwavnfreq; } else if (strcmp(stype, "VRAD") == 0) { *crvalS = spx.vrad; dSdP = spx.dvradfreq; } } else if (*ptype == 'W') { if (*xtype == 'F') { dPdX = spx.dwavefreq; } else if (*xtype == 'W' || *xtype == 'w') { dPdX = 1.0; } else if (*xtype == 'A' || *xtype == 'a') { dPdX = spx.dwaveawav; } else if (*xtype == 'V') { dPdX = spx.dwavevelo; } if (strcmp(stype, "WAVE") == 0) { *crvalS = spx.wave; dSdP = 1.0; } else if (strcmp(stype, "VOPT") == 0) { *crvalS = spx.vopt; dSdP = spx.dvoptwave; } else if (strcmp(stype, "ZOPT") == 0) { *crvalS = spx.zopt; dSdP = spx.dzoptwave; } } else if (*ptype == 'A') { if (*xtype == 'F') { dPdX = spx.dawavfreq; } else if (*xtype == 'W' || *xtype == 'w') { dPdX = spx.dawavwave; } else if (*xtype == 'A' || *xtype == 'a') { dPdX = 1.0; } else if (*xtype == 'V') { dPdX = spx.dawavvelo; } if (strcmp(stype, "AWAV") == 0) { *crvalS = spx.awav; dSdP = 1.0; } } else if (*ptype == 'V') { if (*xtype == 'F') { dPdX = spx.dvelofreq; } else if (*xtype == 'W' || *xtype == 'w') { dPdX = spx.dvelowave; } else if (*xtype == 'A' || *xtype == 'a') { dPdX = spx.dveloawav; } else if (*xtype == 'V') { dPdX = 1.0; } if (strcmp(stype, "VELO") == 0) { *crvalS = spx.velo; dSdP = 1.0; } else if (strcmp(stype, "BETA") == 0) { *crvalS = spx.beta; dSdP = spx.dbetavelo; } } *dSdX = dSdP * dPdX; return 0; } /*--------------------------------------------------------------------------*/ int spctrn( const char ctypeS1[9], double crvalS1, double cdeltS1, double restfrq, double restwav, char ctypeS2[9], double *crvalS2, double *cdeltS2) { return spctrne(ctypeS1, crvalS1, cdeltS1, restfrq, restwav, ctypeS2, crvalS2, cdeltS2, NULL); } /* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : */ int spctrne( const char ctypeS1[9], double crvalS1, double cdeltS1, double restfrq, double restwav, char ctypeS2[9], double *crvalS2, double *cdeltS2, struct wcserr **err) { static const char *function = "spctrne"; char *cp, ptype1, ptype2, stype1[5], stype2[5], xtype1, xtype2; int restreq, status; double crvalX, dS2dX, dXdS1; if (restfrq == 0.0 && restwav == 0.0) { /* If translating between two velocity-characteristic types, or between two wave-characteristic types, then we may need to set a dummy rest frequency or wavelength to perform the calculations. */ strncpy(stype1, ctypeS1, 4); strncpy(stype2, ctypeS2, 4); stype1[4] = stype2[4] = '\0'; if ((strstr("VRAD VOPT ZOPT VELO BETA", stype1) != 0x0) == (strstr("VRAD VOPT ZOPT VELO BETA", stype2) != 0x0)) { restwav = 1.0; } } if ((status = spcspxe(ctypeS1, crvalS1, restfrq, restwav, &ptype1, &xtype1, &restreq, &crvalX, &dXdS1, err))) { return status; } /* Pad with blanks. */ ctypeS2[8] = '\0'; for (cp = ctypeS2; *cp; cp++); while (cp < ctypeS2+8) *(cp++) = ' '; if (strncmp(ctypeS2+5, "???", 3) == 0) { /* Set the algorithm code if required. */ if (xtype1 == 'w') { strcpy(ctypeS2+5, "GRI"); } else if (xtype1 == 'a') { strcpy(ctypeS2+5, "GRA"); } else { ctypeS2[5] = xtype1; ctypeS2[6] = '2'; } } if ((status = spcxpse(ctypeS2, crvalX, restfrq, restwav, &ptype2, &xtype2, &restreq, crvalS2, &dS2dX, err))) { return status; } /* Are the X-types compatible? */ if (xtype2 != xtype1) { return wcserr_set(WCSERR_SET(SPCERR_BAD_SPEC_PARAMS), "Incompatible X-types '%c' and '%c'", xtype1, xtype2); } if (ctypeS2[7] == '?') { if (ptype2 == xtype2) { strcpy(ctypeS2+4, " "); } else { ctypeS2[7] = ptype2; } } *cdeltS2 = dS2dX * dXdS1 * cdeltS1; return 0; } /*--------------------------------------------------------------------------*/ int spcaips( const char ctypeA[9], int velref, char ctype[9], char specsys[9]) { const char *frames[] = {"LSRK", "BARYCENT", "TOPOCENT", "LSRD", "GEOCENTR", "SOURCE", "GALACTOC"}; char *fcode; int ivf, status; /* Make a null-filled copy of ctypeA. */ if (ctype != ctypeA) strncpy(ctype, ctypeA, 8); ctype[8] = '\0'; wcsutil_null_fill(9, ctype); *specsys = '\0'; /* Is it a recognized AIPS-convention type? */ status = SPCERR_NO_CHANGE; if (strncmp(ctype, "FREQ", 4) == 0 || strncmp(ctype, "VELO", 4) == 0 || strncmp(ctype, "FELO", 4) == 0) { /* Look for the Doppler frame. */ if (*(fcode = ctype+4)) { if (strcmp(fcode, "-LSR") == 0) { strcpy(specsys, "LSRK"); } else if (strcmp(fcode, "-HEL") == 0) { strcpy(specsys, "BARYCENT"); } else if (strcmp(fcode, "-OBS") == 0) { strcpy(specsys, "TOPOCENT"); } else { /* Not a recognized AIPS spectral type. */ return SPCERR_NO_CHANGE; } *fcode = '\0'; status = 0; } /* VELREF takes precedence if present. */ ivf = velref%256; if (0 < ivf && ivf <= 7) { strcpy(specsys, frames[ivf-1]); status = 0; } else if (ivf) { status = SPCERR_BAD_SPEC_PARAMS; } if (strcmp(ctype, "VELO") == 0) { /* Check that we found an AIPS-convention Doppler frame. */ if (*specsys) { /* 'VELO' in AIPS means radio or optical depending on VELREF. */ ivf = velref/256; if (ivf == 0) { strcpy(ctype, "VOPT"); } else if (ivf == 1) { strcpy(ctype, "VRAD"); } else { status = SPCERR_BAD_SPEC_PARAMS; } } } else if (strcmp(ctype, "FELO") == 0) { /* Uniform in frequency but expressed as an optical velocity (strictly we should also have found an AIPS-convention Doppler frame). */ strcpy(ctype, "VOPT-F2W"); if (status < 0) status = 0; } } return status; } astropy-1.1.1/cextern/wcslib/C/wcsprintf.c0000644001134200020070000001051612644017723021430 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsprintf.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include "wcsprintf.h" static FILE *wcsprintf_file = 0x0; static char *wcsprintf_buff = 0x0; static char *wcsprintf_bufp = 0x0; static size_t wcsprintf_size = 0; /*--------------------------------------------------------------------------*/ int wcsprintf_set(FILE *wcsout) { if (wcsout != 0x0) { /* Output to file. */ wcsprintf_file = wcsout; if (wcsprintf_buff != 0x0) { /* Release the buffer. */ free(wcsprintf_buff); wcsprintf_buff = 0x0; } } else { /* Output to buffer. */ if (wcsprintf_buff == 0x0) { /* Allocate a buffer. */ wcsprintf_buff = malloc(1024); if (wcsprintf_buff == NULL) { return 1; } wcsprintf_size = 1024; } /* Reset pointer to the start of the buffer. */ wcsprintf_bufp = wcsprintf_buff; *wcsprintf_bufp = '\0'; } return 0; } /*--------------------------------------------------------------------------*/ const char *wcsprintf_buf(void) { return wcsprintf_buff; } /*--------------------------------------------------------------------------*/ int wcsprintf(const char *format, ...) { char *realloc_buff; int nbytes; size_t used; va_list arg_list; if (wcsprintf_buff == 0x0 && wcsprintf_file == 0x0) { /* Send output to stdout if wcsprintf_set() hasn't been called. */ wcsprintf_file = stdout; } va_start(arg_list, format); if (wcsprintf_file) { /* Output to file. */ nbytes = vfprintf(wcsprintf_file, format, arg_list); } else { /* Output to buffer. */ used = wcsprintf_bufp - wcsprintf_buff; if (wcsprintf_size - used < 128) { /* Expand the buffer. */ wcsprintf_size += 1024; realloc_buff = realloc(wcsprintf_buff, wcsprintf_size); if (realloc_buff == NULL) { free(wcsprintf_buff); wcsprintf_buff = 0x0; return 1; } wcsprintf_buff = realloc_buff; wcsprintf_bufp = wcsprintf_buff + used; } nbytes = vsprintf(wcsprintf_bufp, format, arg_list); wcsprintf_bufp += nbytes; } va_end(arg_list); return nbytes; } /*--------------------------------------------------------------------------*/ int wcsfprintf(FILE *stream, const char *format, ...) { char *realloc_buff; int nbytes; size_t used; va_list arg_list; if (wcsprintf_buff == 0x0 && wcsprintf_file == 0x0) { /* Send output to stream if wcsprintf_set() hasn't been called. */ wcsprintf_file = stream; } va_start(arg_list, format); if (wcsprintf_file) { /* Output to file. */ nbytes = vfprintf(wcsprintf_file, format, arg_list); } else { /* Output to buffer. */ used = wcsprintf_bufp - wcsprintf_buff; if (wcsprintf_size - used < 128) { /* Expand the buffer. */ wcsprintf_size += 1024; realloc_buff = realloc(wcsprintf_buff, wcsprintf_size); if (realloc_buff == NULL) { free(wcsprintf_buff); wcsprintf_buff = 0x0; return 1; } wcsprintf_buff = realloc_buff; wcsprintf_bufp = wcsprintf_buff + used; } nbytes = vsprintf(wcsprintf_bufp, format, arg_list); wcsprintf_bufp += nbytes; } va_end(arg_list); return nbytes; } astropy-1.1.1/cextern/wcslib/C/getwcstab.h0000644001134200020070000001632612644017723021406 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: getwcstab.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * Summary of the getwcstab routines * --------------------------------- * fits_read_wcstab(), an implementation of a FITS table reading routine for * 'TAB' coordinates, is provided for CFITSIO programmers. It has been * incorporated into CFITSIO as of v3.006 with the definitions in this file, * getwcstab.h, moved into fitsio.h. * * fits_read_wcstab() is not included in the WCSLIB object library but the * source code is presented here as it may be useful for programmers using an * older version of CFITSIO than 3.006, or as a programming template for * non-CFITSIO programmers. * * * fits_read_wcstab() - FITS 'TAB' table reading routine * ---------------------------------------------------- * fits_read_wcstab() extracts arrays from a binary table required in * constructing 'TAB' coordinates. * * Given: * fptr fitsfile * * Pointer to the file handle returned, for example, by * the fits_open_file() routine in CFITSIO. * * nwtb int Number of arrays to be read from the binary table(s). * * Given and returned: * wtb wtbarr * Address of the first element of an array of wtbarr * typedefs. This wtbarr typedef is defined to match the * wtbarr struct defined in WCSLIB. An array of such * structs returned by the WCSLIB function wcstab() as * discussed in the notes below. * * Returned: * status int * CFITSIO status value. * * Function return value: * int CFITSIO status value. * * Notes: * In order to maintain WCSLIB and CFITSIO as independent libraries it is not * permissible for any CFITSIO library code to include WCSLIB header files, * or vice versa. However, the CFITSIO function fits_read_wcstab() accepts * an array of wtbarr structs defined in wcs.h within WCSLIB. * * The problem therefore is to define the wtbarr struct within fitsio.h * without including wcs.h, especially noting that wcs.h will often (but not * always) be included together with fitsio.h in an applications program that * uses fits_read_wcstab(). * * The solution adopted is for WCSLIB to define "struct wtbarr" while * fitsio.h defines "typedef wtbarr" as an untagged struct with identical * members. This allows both wcs.h and fitsio.h to define a wtbarr data type * without conflict by virtue of the fact that structure tags and typedef * names share different name spaces in C; Appendix A, Sect. A11.1 (p227) of * the K&R ANSI edition states that: * * Identifiers fall into several name spaces that do not interfere with one * another; the same identifier may be used for different purposes, even in * the same scope, if the uses are in different name spaces. These classes * are: objects, functions, typedef names, and enum constants; labels; tags * of structures, unions, and enumerations; and members of each structure * or union individually. * * Therefore, declarations within WCSLIB look like * = struct wtbarr *w; * * while within CFITSIO they are simply * = wtbarr *w; * * As suggested by the commonality of the names, these are really the same * aggregate data type. However, in passing a (struct wtbarr *) to * fits_read_wcstab() a cast to (wtbarr *) is formally required. * * When using WCSLIB and CFITSIO together in C++ the situation is complicated * by the fact that typedefs and structs share the same namespace; C++ * Annotated Reference Manual, Sect. 7.1.3 (p105). In that case the wtbarr * struct in wcs.h is renamed by preprocessor macro substitution to wtbarr_s * to distinguish it from the typedef defined in fitsio.h. However, the * scope of this macro substitution is limited to wcs.h itself and CFITSIO * programmer code, whether in C++ or C, should always use the wtbarr * typedef. * * * wtbarr typedef * -------------- * The wtbarr typedef is defined as a struct containing the following members: * * int i * Image axis number. * * int m * Array axis number for index vectors. * * int kind * Character identifying the array type: * - c: coordinate array, * - i: index vector. * * char extnam[72] * EXTNAME identifying the binary table extension. * * int extver * EXTVER identifying the binary table extension. * * int extlev * EXTLEV identifying the binary table extension. * * char ttype[72] * TTYPEn identifying the column of the binary table that contains the * array. * * long row * Table row number. * * int ndim * Expected dimensionality of the array. * * int *dimlen * Address of the first element of an array of int of length ndim into * which the array axis lengths are to be written. * * double **arrayp * Pointer to an array of double which is to be allocated by the user * and into which the array is to be written. * *===========================================================================*/ #ifndef WCSLIB_GETWCSTAB #define WCSLIB_GETWCSTAB #ifdef __cplusplus extern "C" { #endif #include typedef struct { int i; /* Image axis number. */ int m; /* Array axis number for index vectors. */ int kind; /* Array type, 'c' (coord) or 'i' (index). */ char extnam[72]; /* EXTNAME of binary table extension. */ int extver; /* EXTVER of binary table extension. */ int extlev; /* EXTLEV of binary table extension. */ char ttype[72]; /* TTYPEn of column containing the array. */ long row; /* Table row number. */ int ndim; /* Expected array dimensionality. */ int *dimlen; /* Where to write the array axis lengths. */ double **arrayp; /* Where to write the address of the array */ /* allocated to store the array. */ } wtbarr; int fits_read_wcstab(fitsfile *fptr, int nwtb, wtbarr *wtb, int *status); #ifdef __cplusplus } #endif #endif /* WCSLIB_GETWCSTAB */ astropy-1.1.1/cextern/wcslib/C/wcsutil.c0000644001134200020070000002015312644017723021101 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsutil.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include #include #include "wcsutil.h" #include "wcsmath.h" #include "dis.h" /*--------------------------------------------------------------------------*/ void wcsutil_blank_fill(int n, char c[]) { int k; for (k = strlen(c); k < n; k++) { c[k] = ' '; } return; } /*--------------------------------------------------------------------------*/ void wcsutil_null_fill(int n, char c[]) { int j, k; if (n <= 0) return; /* Null-fill the string. */ *(c+n-1) = '\0'; for (j = 0; j < n; j++) { if (c[j] == '\0') { for (k = j+1; k < n; k++) { c[k] = '\0'; } break; } } for (k = j-1; k > 0; k--) { if (c[k] != ' ') break; c[k] = '\0'; } return; } /*--------------------------------------------------------------------------*/ int wcsutil_allEq(int nvec, int nelem, const double *first) { double v0; const double *vp; if (nvec <= 0 || nelem <= 0) return 0; v0 = *first; for (vp = first+nelem; vp < first + nvec*nelem; vp += nelem) { if (*vp != v0) return 0; } return 1; } /*--------------------------------------------------------------------------*/ int wcsutil_Eq(int nelem, double tol, const double *arr1, const double *arr2) { int i; if (nelem == 0) return 1; if (nelem < 0) return 0; if (arr1 == 0x0 && arr2 == 0x0) return 1; if (arr1 == 0x0 || arr2 == 0x0) return 0; if (tol == 0.0) { /* Handled separately for speed of execution. */ for (i = 0; i < nelem; i++, arr1++, arr2++) { if (*arr1 != *arr2) return 0; } } else { for (i = 0; i < nelem; i++, arr1++, arr2++) { /* Undefined values must match exactly. */ if (*arr1 == UNDEFINED && *arr2 != UNDEFINED) return 0; if (*arr1 != UNDEFINED && *arr2 == UNDEFINED) return 0; /* Otherwise, compare within the specified tolerance. */ if (fabs(*arr1 - *arr2) > 0.5*tol) return 0; } } return 1; } /*--------------------------------------------------------------------------*/ int wcsutil_intEq(int nelem, const int *arr1, const int *arr2) { int i; if (nelem == 0) return 1; if (nelem < 0) return 0; if (arr1 == 0x0 && arr2 == 0x0) return 1; if (arr1 == 0x0 || arr2 == 0x0) return 0; for (i = 0; i < nelem; i++, arr1++, arr2++) { if (*arr1 != *arr2) return 0; } return 1; } /*--------------------------------------------------------------------------*/ int wcsutil_strEq(int nelem, char (*arr1)[72], char (*arr2)[72]) { int i; if (nelem == 0) return 1; if (nelem < 0) return 0; if (arr1 == 0x0 && arr2 == 0x0) return 1; if (arr1 == 0x0 || arr2 == 0x0) return 0; for (i = 0; i < nelem; i++, arr1++, arr2++) { if (strncmp(*arr1, *arr2, 72)) return 0; } return 1; } /*--------------------------------------------------------------------------*/ void wcsutil_setAll(int nvec, int nelem, double *first) { double v0, *vp; if (nvec <= 0 || nelem <= 0) return; v0 = *first; for (vp = first+nelem; vp < first + nvec*nelem; vp += nelem) { *vp = v0; } } /*--------------------------------------------------------------------------*/ void wcsutil_setAli(int nvec, int nelem, int *first) { int v0, *vp; if (nvec <= 0 || nelem <= 0) return; v0 = *first; for (vp = first+nelem; vp < first + nvec*nelem; vp += nelem) { *vp = v0; } } /*--------------------------------------------------------------------------*/ void wcsutil_setBit(int nelem, const int *sel, int bits, int *array) { int *arrp; if (bits == 0 || nelem <= 0) return; if (sel == 0x0) { /* All elements selected. */ for (arrp = array; arrp < array + nelem; arrp++) { *arrp |= bits; } } else { /* Some elements selected. */ for (arrp = array; arrp < array + nelem; arrp++) { if (*(sel++)) *arrp |= bits; } } } /*--------------------------------------------------------------------------*/ char *wcsutil_fptr2str(int (*func)(void), char hext[19]) { unsigned char *p = (unsigned char *)(&func); char *t = hext; int i, *(ip[2]), j[2], le = 1, gotone = 0; /* Test for little-endian addresses. */ ip[0] = j; ip[1] = j + 1; if ((unsigned char *)ip[0] < (unsigned char *)ip[1]) { /* Little-endian, reverse it. */ p += sizeof(func) - 1; le = -1; } sprintf(t, "0x0"); t += 2; for (i = 0; i < sizeof(func); i++) { /* Skip leading zeroes. */ if (*p) gotone = 1; if (gotone) { sprintf(t, "%02x", *p); t += 2; } p += le; } return hext; } /*--------------------------------------------------------------------------*/ static void wcsutil_locale_to_dot(char *buf) { struct lconv *locale_data = localeconv(); const char *decimal_point = locale_data->decimal_point; if (decimal_point[0] != '.' || decimal_point[1] != 0) { size_t decimal_point_len = strlen(decimal_point); char *inbuf = buf; char *outbuf = buf; for ( ; *inbuf; inbuf++) { if (strncmp(inbuf, decimal_point, decimal_point_len) == 0) { *outbuf++ = '.'; inbuf += decimal_point_len - 1; } else { *outbuf++ = *inbuf; } } *outbuf = '\0'; } } void wcsutil_double2str(char *buf, const char *format, double value) { char *bp, *cp; sprintf(buf, format, value); wcsutil_locale_to_dot(buf); /* Look for a decimal point or exponent. */ bp = buf; while (*bp) { if (*bp != ' ') { if (*bp == '.') return; if (*bp == 'e') return; if (*bp == 'E') return; } bp++; } /* Not found, add a fractional part. */ bp = buf; if (*bp == ' ') { cp = buf + 1; if (*cp == ' ') cp++; while (*cp) { *bp = *cp; bp++; cp++; } *bp = '.'; bp++; if (bp < cp) *bp = '0'; } } /*--------------------------------------------------------------------------*/ static const char *wcsutil_dot_to_locale(const char *inbuf, char *outbuf) { struct lconv *locale_data = localeconv(); const char *decimal_point = locale_data->decimal_point; if (decimal_point[0] != '.' || decimal_point[1] != 0) { char *out = outbuf; size_t decimal_point_len = strlen(decimal_point); for ( ; *inbuf; inbuf++) { if (*inbuf == '.') { strncpy(out, decimal_point, decimal_point_len); out += decimal_point_len; } else { *out++ = *inbuf; } } *out = '\0'; return outbuf; } else { return inbuf; } } int wcsutil_str2double(const char *buf, const char *format, double *value) { char ctmp[72]; return sscanf(wcsutil_dot_to_locale(buf, ctmp), "%lf", value) < 1; } /*--------------------------------------------------------------------------*/ int wcsutil_dpkey_int(const struct dpkey *dp) { if (dp->type != 0) { return (int)dp->value.f; } return dp->value.i; } /*--------------------------------------------------------------------------*/ double wcsutil_dpkey_double(const struct dpkey *dp) { if (dp->type == 0) { return (double)dp->value.i; } return dp->value.f; } astropy-1.1.1/cextern/wcslib/C/wcsutil.h0000644001134200020070000003120012644017723021101 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsutil.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the wcsutil routines * ------------------------------- * Simple utility functions for internal use only by WCSLIB. They are * documented here solely as an aid to understanding the code. They are not * intended for external use - the API may change without notice! * * * wcsutil_blank_fill() - Fill a character string with blanks * ---------------------------------------------------------- * INTERNAL USE ONLY. * * wcsutil_blank_fill() pads a character string with blanks starting with the * terminating NULL character. * * Used by the Fortran wrapper functions in translating C character strings * into Fortran CHARACTER variables. * * Given: * n int Length of the character array, c[]. * * Given and returned: * c char[] The character string. It will not be null-terminated * on return. * * Function return value: * void * * * wcsutil_null_fill() - Fill a character string with NULLs * -------------------------------------------------------- * INTERNAL USE ONLY. * * wcsutil_null_fill() strips off trailing blanks and pads the character array * holding the string with NULL characters. * * Used mainly to make character strings intelligible in the GNU debugger which * prints the rubbish following the terminating NULL, obscuring the valid part * of the string. * * Given: * n int Number of characters. * * Given and returned: * c char[] The character string. * * Function return value: * void * * * wcsutil_allEq() - Test for equality of a particular vector element * ------------------------------------------------------------------ * INTERNAL USE ONLY. * * wcsutil_allEq() tests for equality of a particular element in a set of * vectors. * * Given: * nvec int The number of vectors. * * nelem int The length of each vector. * * first const double* * Pointer to the first element to test in the array. * The elements tested for equality are * = *first == *(first + nelem) = == *(first + nelem*2) = : = == *(first + nelem*(nvec-1)); * * The array might be dimensioned as * = double v[nvec][nelem]; * * Function return value: * int Status return value: * 0: Not all equal. * 1: All equal. * * * wcsutil_Eq() - Test for equality of two double arrays * ----------------------------------------------------- * INTERNAL USE ONLY. * * wcsutil_Eq() tests for equality of two double-precision arrays. * * Given: * nelem int The number of elements in each array. * * tol double Tolerance for comparison of the floating-point values. * For example, for tol == 1e-6, all floating-point * values in the arrays must be equal to the first 6 * decimal places. A value of 0 implies exact equality. * * arr1 const double* * The first array. * * arr2 const double* * The second array * * Function return value: * int Status return value: * 0: Not equal. * 1: Equal. * * * wcsutil_intEq() - Test for equality of two int arrays * ----------------------------------------------------- * INTERNAL USE ONLY. * * wcsutil_intEq() tests for equality of two int arrays. * * Given: * nelem int The number of elements in each array. * * arr1 const int* * The first array. * * arr2 const int* * The second array * * Function return value: * int Status return value: * 0: Not equal. * 1: Equal. * * * wcsutil_strEq() - Test for equality of two string arrays * -------------------------------------------------------- * INTERNAL USE ONLY. * * wcsutil_strEq() tests for equality of two string arrays. * * Given: * nelem int The number of elements in each array. * * arr1 const char** * The first array. * * arr2 const char** * The second array * * Function return value: * int Status return value: * 0: Not equal. * 1: Equal. * * * wcsutil_setAll() - Set a particular vector element * -------------------------------------------------- * INTERNAL USE ONLY. * * wcsutil_setAll() sets the value of a particular element in a set of vectors. * * Given: * nvec int The number of vectors. * * nelem int The length of each vector. * * Given and returned: * first double* Pointer to the first element in the array, the value * of which is used to set the others * = *(first + nelem) = *first; = *(first + nelem*2) = *first; = : = *(first + nelem*(nvec-1)) = *first; * * The array might be dimensioned as * = double v[nvec][nelem]; * * Function return value: * void * * * wcsutil_setAli() - Set a particular vector element * -------------------------------------------------- * INTERNAL USE ONLY. * * wcsutil_setAli() sets the value of a particular element in a set of vectors. * * Given: * nvec int The number of vectors. * * nelem int The length of each vector. * * Given and returned: * first int* Pointer to the first element in the array, the value * of which is used to set the others * = *(first + nelem) = *first; = *(first + nelem*2) = *first; = : = *(first + nelem*(nvec-1)) = *first; * * The array might be dimensioned as * = int v[nvec][nelem]; * * Function return value: * void * * * wcsutil_setBit() - Set bits in selected elements of an array * ------------------------------------------------------------ * INTERNAL USE ONLY. * * wcsutil_setBit() sets bits in selected elements of an array. * * Given: * nelem int Number of elements in the array. * * sel const int* * Address of a selection array of length nelem. May * be specified as the null pointer in which case all * elements are selected. * * bits int Bit mask. * * Given and returned: * array int* Address of the array of length nelem. * * Function return value: * void * * * wcsutil_fptr2str() - Translate pointer-to-function to string * ------------------------------------------------------------ * INTERNAL USE ONLY. * * wcsutil_fptr2str() translates a pointer-to-function to hexadecimal string * representation for output. It is used by the various routines that print * the contents of WCSLIB structs, noting that it is not strictly legal to * type-pun a function pointer to void*. See * http://stackoverflow.com/questions/2741683/how-to-format-a-function-pointer * * Given: * fptr int(*)() Pointer to function. * * Returned: * hext char[19] Null-terminated string. Should be at least 19 bytes * in size to accomodate a 64-bit address (16 bytes in * hex), plus the leading "0x" and trailing '\0'. * * Function return value: * char * The address of hext. * * * wcsutil_double2str() - Translate double to string ignoring the locale * --------------------------------------------------------------------- * INTERNAL USE ONLY. * * wcsutil_double2str() converts a double to a string, but unlike sprintf() it * ignores the locale and always uses a '.' as the decimal separator. Also, * unless it includes an exponent, the formatted value will always have a * fractional part, ".0" being appended if necessary. * * Returned: * buf char * The buffer to write the string into. * * Given: * format char * The formatting directive, such as "%f". This * may be any of the forms accepted by sprintf(), but * should only include a formatting directive and * nothing else. For "%g" and "%G" formats, unless it * includes an exponent, the formatted value will always * have a fractional part, ".0" being appended if * necessary. * * value double The value to convert to a string. * * * wcsutil_str2double() - Translate string to a double, ignoring the locale * ------------------------------------------------------------------------ * INTERNAL USE ONLY. * * wcsutil_str2double() converts a string to a double, but unlike sscanf() it * ignores the locale and always expects a '.' as the decimal separator. * * Given: * buf char * The string containing the value * * format char * The formatting directive, such as "%lf". This * may be any of the forms accepted by sscanf(), but * should only include a single formatting directive. * * Returned: * value double * The double value parsed from the string. * * * wcsutil_dpkey_int() - Get the data value in a dpkey struct as int * ----------------------------------------------------------------- * INTERNAL USE ONLY. * * wcsutil_dpkey_int() returns the data value in a dpkey struct as an integer * value. * * Given and returned: * dp const struct dpkey * * Parsed contents of a DPja or DQia keyrecords. * * Function return value: * int The record's value as int. * * * wcsutil_dpkey_double() - Get the data value in a dpkey struct as double * ----------------------------------------------------------------------- * INTERNAL USE ONLY. * * wcsutil_dpkey_double() returns the data value in a dpkey struct as a * floating point value. * * Given and returned: * dp const struct dpkey * * Parsed contents of a DPja or DQia keyrecords. * * Function return value: * double The record's value as double. * *===========================================================================*/ #ifndef WCSLIB_WCSUTIL #define WCSLIB_WCSUTIL #include "dis.h" #ifdef __cplusplus extern "C" { #endif void wcsutil_blank_fill(int n, char c[]); void wcsutil_null_fill (int n, char c[]); int wcsutil_allEq (int nvec, int nelem, const double *first); int wcsutil_Eq(int nelem, double tol, const double *arr1, const double *arr2); int wcsutil_intEq(int nelem, const int *arr1, const int *arr2); int wcsutil_strEq(int nelem, char (*arr1)[72], char (*arr2)[72]); void wcsutil_setAll(int nvec, int nelem, double *first); void wcsutil_setAli(int nvec, int nelem, int *first); void wcsutil_setBit(int nelem, const int *sel, int bits, int *array); char *wcsutil_fptr2str(int (*func)(void), char hext[19]); int wcsutil_str2double(const char *buf, const char *format, double *value); void wcsutil_double2str(char *buf, const char *format, double value); int wcsutil_dpkey_int(const struct dpkey *dp); double wcsutil_dpkey_double(const struct dpkey *dp); #ifdef __cplusplus } #endif #endif /* WCSLIB_WCSUTIL */ astropy-1.1.1/cextern/wcslib/C/sph.h0000644001134200020070000002307012644017723020207 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: sph.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the sph routines * --------------------------- * Routines in this suite implement the spherical coordinate transformations * defined by the FITS World Coordinate System (WCS) standard * = "Representations of world coordinates in FITS", = Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I) = = "Representations of celestial coordinates in FITS", = Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (WCS Paper II) * * The transformations are implemented via separate functions, sphx2s() and * sphs2x(), for the spherical rotation in each direction. * * A utility function, sphdpa(), computes the angular distances and position * angles from a given point on the sky to a number of other points. sphpad() * does the complementary operation - computes the coordinates of points offset * by the given angular distances and position angles from a given point on the * sky. * * * sphx2s() - Rotation in the pixel-to-world direction * --------------------------------------------------- * sphx2s() transforms native coordinates of a projection to celestial * coordinates. * * Given: * eul const double[5] * Euler angles for the transformation: * 0: Celestial longitude of the native pole [deg]. * 1: Celestial colatitude of the native pole, or * native colatitude of the celestial pole [deg]. * 2: Native longitude of the celestial pole [deg]. * 3: cos(eul[1]) * 4: sin(eul[1]) * * nphi, * ntheta int Vector lengths. * * spt,sxy int Vector strides. * * phi,theta const double[] * Longitude and latitude in the native coordinate * system of the projection [deg]. * * Returned: * lng,lat double[] Celestial longitude and latitude [deg]. These may * refer to the same storage as phi and theta * respectively. * * Function return value: * int Status return value: * 0: Success. * * * sphs2x() - Rotation in the world-to-pixel direction * --------------------------------------------------- * sphs2x() transforms celestial coordinates to the native coordinates of a * projection. * * Given: * eul const double[5] * Euler angles for the transformation: * 0: Celestial longitude of the native pole [deg]. * 1: Celestial colatitude of the native pole, or * native colatitude of the celestial pole [deg]. * 2: Native longitude of the celestial pole [deg]. * 3: cos(eul[1]) * 4: sin(eul[1]) * * nlng,nlat int Vector lengths. * * sll,spt int Vector strides. * * lng,lat const double[] * Celestial longitude and latitude [deg]. * * Returned: * phi,theta double[] Longitude and latitude in the native coordinate system * of the projection [deg]. These may refer to the same * storage as lng and lat respectively. * * Function return value: * int Status return value: * 0: Success. * * * sphdpa() - Compute angular distance and position angle * ------------------------------------------------------ * sphdpa() computes the angular distance and generalized position angle (see * notes) from a "reference" point to a number of "field" points on the sphere. * The points must be specified consistently in any spherical coordinate * system. * * sphdpa() is complementary to sphpad(). * * Given: * nfield int The number of field points. * * lng0,lat0 double Spherical coordinates of the reference point [deg]. * * lng,lat const double[] * Spherical coordinates of the field points [deg]. * * Returned: * dist,pa double[] Angular distances and position angles [deg]. These * may refer to the same storage as lng and lat * respectively. * * Function return value: * int Status return value: * 0: Success. * * Notes: * sphdpa() uses sphs2x() to rotate coordinates so that the reference point * is at the north pole of the new system with the north pole of the old * system at zero longitude in the new. The Euler angles required by * sphs2x() for this rotation are * = eul[0] = lng0; = eul[1] = 90.0 - lat0; = eul[2] = 0.0; * * The angular distance and generalized position angle are readily obtained * from the longitude and latitude of the field point in the new system. * This applies even if the reference point is at one of the poles, in which * case the "position angle" returned is as would be computed for a reference * point at (lng0,+90-epsilon) or (lng0,-90+epsilon), in the limit as epsilon * goes to zero. * * It is evident that the coordinate system in which the two points are * expressed is irrelevant to the determination of the angular separation * between the points. However, this is not true of the generalized position * angle. * * The generalized position angle is here defined as the angle of * intersection of the great circle containing the reference and field points * with that containing the reference point and the pole. It has its normal * meaning when the the reference and field points are specified in * equatorial coordinates (right ascension and declination). * * Interchanging the reference and field points changes the position angle in * a non-intuitive way (because the sum of the angles of a spherical triangle * normally exceeds 180 degrees). * * The position angle is undefined if the reference and field points are * coincident or antipodal. This may be detected by checking for a distance * of 0 or 180 degrees (within rounding tolerance). sphdpa() will return an * arbitrary position angle in such circumstances. * * * sphpad() - Compute field points offset from a given point * --------------------------------------------------------- * sphpad() computes the coordinates of a set of points that are offset by the * specified angular distances and position angles from a given "reference" * point on the sky. The distances and position angles must be specified * consistently in any spherical coordinate system. * * sphpad() is complementary to sphdpa(). * * Given: * nfield int The number of field points. * * lng0,lat0 double Spherical coordinates of the reference point [deg]. * * dist,pa const double[] * Angular distances and position angles [deg]. * * Returned: * lng,lat double[] Spherical coordinates of the field points [deg]. * These may refer to the same storage as dist and pa * respectively. * * Function return value: * int Status return value: * 0: Success. * * Notes: * sphpad() is implemented analogously to sphdpa() although using sphx2s() * for the inverse transformation. In particular, when the reference point * is at one of the poles, "position angle" is interpreted as though the * reference point was at (lng0,+90-epsilon) or (lng0,-90+epsilon), in the * limit as epsilon goes to zero. * * Applying sphpad() with the distances and position angles computed by * sphdpa() should return the original field points. * *===========================================================================*/ #ifndef WCSLIB_SPH #define WCSLIB_SPH #ifdef __cplusplus extern "C" { #endif int sphx2s(const double eul[5], int nphi, int ntheta, int spt, int sxy, const double phi[], const double theta[], double lng[], double lat[]); int sphs2x(const double eul[5], int nlng, int nlat, int sll , int spt, const double lng[], const double lat[], double phi[], double theta[]); int sphdpa(int nfield, double lng0, double lat0, const double lng[], const double lat[], double dist[], double pa[]); int sphpad(int nfield, double lng0, double lat0, const double dist[], const double pa[], double lng[], double lat[]); #ifdef __cplusplus } #endif #endif /* WCSLIB_SPH */ astropy-1.1.1/cextern/wcslib/C/wcsbth.l0000644001134200020070000017701612644017723020725 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsbth.l,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * wcsbth.l is a Flex description file containing the definition of a lexical * scanner for parsing the WCS keyrecords for one or more image arrays and/or * pixel lists in a FITS binary table header. It can also handle primary image * and image extension headers. * * wcsbth.l requires Flex v2.5.4 or later. Refer to wcshdr.h for a description * of the user interface and operating notes. * * Implementation notes * -------------------- * wcsbth() may be invoked with an option that causes it to recognize the * image-header form of WCS keywords as defaults for each alternate coordinate * representation (up to 27). By design, with this option enabled wcsbth() can * also handle primary image and image extension headers, effectively treating * them as a single-column binary table though with WCS keywords of a different * form. * * NAXIS is always 2 for binary tables, it refers to the two-dimensional nature * of the table. Thus NAXIS does not count the number of image axes in either * image arrays or pixels lists and for the latter there is not even a formal * equivalent of WCSAXESa. Hence NAXIS is always ignored and a first pass * through the header is required to determine the number of images, the number * of alternate coordinate representations for each image (up to 27), and the * number of coordinate axes in each representation; this pass also counts the * number of iPVn_ma and iPSn_ma or TVk_ma and TSk_ma keywords in each * representation. * * On completion of the first pass, the association between column number and * axis number is defined for each representation of a pixel list. Memory is * allocated for an array of the required number of wcsprm structs and each of * these is initialized appropriately. These structs are filled in the second * pass. * * It is permissible for a scalar table column to contain degenerate (single- * point) image arrays and simultaneously form one axis of a pixel list. * * The parser does not check for duplicated keywords, for most keywords it * accepts the last encountered. * * wcsbth() does not currently handle the Green Bank convention. * *===========================================================================*/ /* Options. */ %option full %option never-interactive %option noyywrap %option outfile="wcsbth.c" %option prefix="wcsbth" /* Indices for parameterized keywords. */ Z1 [0-9] Z2 [0-9]{2} Z3 [0-9]{3} Z4 [0-9]{4} I1 [1-9] I2 [1-9][0-9] I3 [1-9][0-9]{2} I4 [1-9][0-9]{3} /* Alternate coordinate system identifier. */ ALT [ A-Z] /* Keyvalue data types. */ INTEGER [+-]?[0-9]+ FLOAT [+-]?([0-9]+\.?[0-9]*|\.[0-9]+)([eEdD][+-]?[0-9]+)? STRING '([^']|'')*' /* Inline comment syntax. */ INLINE " "*(\/.*)? /* Exclusive start states. */ %x CCCCCia iCCCna iCCCCn TCCCna TCCCCn %x CCi_ja ijCCna TCn_ka TCCn_ka %x CROTAi iCROTn TCROTn %x CCi_ma iCn_ma iCCn_ma TCn_ma TCCn_ma %x PROJPm %x CCCCCCCC CCCCCCCa %x CCCCna CCCCCna %x CCCCn CCCCCn %x VALUE INTEGER_VAL FLOAT_VAL STRING_VAL %x COMMENT DISCARD ERROR FLUSH %{ #include #include #include #include #include #include "wcs.h" #include "wcshdr.h" #include "wcsmath.h" #include "wcsprintf.h" #include "wcsutil.h" /* Codes used for keyvalue data types. */ #define INTEGER 0 #define FLOAT 1 #define STRING 2 /* Bit masks used for keyword types: */ #define IMGAUX 0x1 /* Auxiliary image header, e.g. LONPOLEa or */ /* DATE-OBS. */ #define IMGAXIS 0x2 /* Image header with axis number, e.g. */ /* CTYPEia. */ #define IMGHEAD 0x3 /* Image header of either type. */ #define BIMGARR 0x4 /* Binary table image array with axis */ /* number, e.g. iCTYna. */ #define PIXLIST 0x8 /* Pixel list, e.g. TCTYna. */ #define BINTAB 0xC /* Shared binary table image array (without */ /* axis number) or pixel list, e.g. LONPna */ /* or OBSGXn. */ #define YY_DECL int wcsbth(char *header, int nkeyrec, int relax, int ctrl, \ int keysel, int *colsel, int *nreject, int *nwcs, \ struct wcsprm **wcs) #define YY_INPUT(inbuff, count, bufsize) \ { \ if (wcsbth_nkeyrec) { \ strncpy(inbuff, wcsbth_hdr, 80); \ inbuff[80] = '\n'; \ wcsbth_hdr += 80; \ wcsbth_nkeyrec--; \ count = 81; \ } else { \ count = YY_NULL; \ } \ } /* A convenience macro to get around incompatibilities between unput() and yyless(): put yytext followed by a blank back onto the input stream. */ #define WCSBTH_PUTBACK \ sprintf(strtmp, "%s ", yytext); \ itmp = strlen(strtmp); \ while (itmp) unput(strtmp[--itmp]); /* These global variables are required by YY_INPUT. */ char *wcsbth_hdr; int wcsbth_nkeyrec; /* Used in preempting the call to exit() by yy_fatal_error(). */ jmp_buf wcsbth_abort_jmp_env; #define exit(status) longjmp(wcsbth_abort_jmp_env, status) /* Struct used internally for header bookkeeping. */ struct wcsbth_alts { int ncol, ialt, icol, imgherit; short int (*arridx)[27]; short int pixidx[27]; short int pad1; unsigned int *pixlist; unsigned char (*npv)[27]; unsigned char (*nps)[27]; unsigned char pixnpv[27]; unsigned char pixnps[27]; unsigned char pad2[2]; }; int wcsbth_pass1(int keytype, int i, int j, int n, int k, char a, char ptype, struct wcsbth_alts *alts); int wcsbth_init1(struct wcsbth_alts *alts, int *nwcs, struct wcsprm **wcs); struct wcsprm *wcsbth_idx(struct wcsprm *wcs, struct wcsbth_alts *alts, int keytype, int n, char a); int wcsbth_colax(struct wcsprm *wcs, struct wcsbth_alts *alts, int k, char a); int wcsbth_epoch(double *wptr, double epoch); int wcsbth_vsource(double *wptr, double vsource); int wcsbth_final(struct wcsbth_alts *alts, int *nwcs, struct wcsprm **wcs); %} %% /* Keyword indices, as used in the WCS papers, e.g. iVn_ma, TPn_ka. */ char a; int i, j, k, m, n; char *cptr, *errmsg, errtxt[80], exclude[1000], gotone, *hptr, *keep, *keyname, *keyrec, ptype, strtmp[80]; int altlin, ialt, icol, incl, inttmp, ipass, ipx, itmp, ix, jx, keytype, nother, nsel, npass, nvalid, status, valtype, voff; double dbltmp; void *vptr, *wptr; struct wcsbth_alts alts; struct wcsprm *wcsp, wcstem; int (*special)(double *, double); int yylex_destroy(void); /* The data structures produced. */ *nwcs = 0; *wcs = 0x0; /* Parameters used to implement YY_INPUT. */ wcsbth_hdr = header; wcsbth_nkeyrec = nkeyrec; /* Our handle on the input stream. */ keyrec = header; hptr = header; keep = 0x0; /* For keeping tallies of keywords found. */ *nreject = 0; nvalid = 0; nother = 0; /* If strict, then also reject. */ if (relax & WCSHDR_strict) relax |= WCSHDR_reject; /* Keyword parameters. */ i = j = 0; n = k = 0; m = 0; a = ' '; /* Header bookkeeping. */ alts.ncol = 0; alts.arridx = 0x0; alts.pixlist = 0x0; alts.npv = 0x0; alts.nps = 0x0; for (ialt = 0; ialt < 27; ialt++) { alts.pixidx[ialt] = 0; alts.pixnpv[ialt] = 0; alts.pixnps[ialt] = 0; } /* For decoding the keyvalue. */ keytype = 0; valtype = -1; vptr = 0x0; /* For keywords that require special handling. */ altlin = 0; ptype = ' '; special = 0x0; /* Selection by column number. */ nsel = colsel ? colsel[0] : 0; incl = (nsel > 0); for (icol = 0; icol < 1000; icol++) { exclude[icol] = incl; } for (icol = 1; icol <= abs(nsel); icol++) { itmp = colsel[icol]; if (0 < itmp && itmp < 1000) { exclude[itmp] = !incl; } } exclude[0] = 0; /* Selection by keyword type. */ itmp = keysel; keysel = 0; if (itmp) { if (itmp & WCSHDR_IMGHEAD) keysel |= IMGHEAD; if (itmp & WCSHDR_BIMGARR) keysel |= BIMGARR; if (itmp & WCSHDR_PIXLIST) keysel |= PIXLIST; } if (keysel == 0) { keysel = IMGHEAD | BINTAB; } /* Control variables. */ ipass = 1; npass = 2; /* Return here via longjmp() invoked by yy_fatal_error(). */ if (setjmp(wcsbth_abort_jmp_env)) { return 4; } BEGIN(INITIAL); ^TFIELDS" = "" "*{INTEGER} { if (ipass == 1) { if (alts.ncol == 0) { sscanf(yytext, "TFIELDS = %d", &(alts.ncol)); BEGIN(FLUSH); } else { errmsg = "duplicate or out-of-sequence TFIELDS keyword"; BEGIN(ERROR); } } else { BEGIN(FLUSH); } } ^WCSAXES{ALT}=" "" "*{INTEGER} { if (!(keysel & IMGAXIS)) { /* Ignore this key type. */ BEGIN(DISCARD); } else { if (relax & WCSHDR_ALLIMG) { sscanf(yytext, "WCSAXES%c= %d", &a, &i); if (i < 0) { errmsg = "negative value of WCSAXESa ignored"; BEGIN(ERROR); } else { valtype = INTEGER; vptr = 0x0; keyname = "WCSAXESa"; keytype = IMGAXIS; BEGIN(COMMENT); } } else if (relax & WCSHDR_reject) { errmsg = "image-header keyword WCSAXESa in binary table"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } } ^WCAX{I1}{ALT}" = "" "*{INTEGER} | ^WCAX{I2}{ALT}" = "" "*{INTEGER} | ^WCAX{I3}{ALT}"= "" "*{INTEGER} { keyname = "WCAXna"; /* Note that a blank in the sscanf() format string matches zero or more of them in the input. */ sscanf(yytext, "WCAX%d%c = %d", &n, &a, &i); if (!(keysel & BIMGARR) || exclude[n]) { /* Ignore this key type or column. */ BEGIN(DISCARD); } else if (i < 0) { errmsg = "negative value of WCSAXESa ignored"; BEGIN(ERROR); } else { valtype = INTEGER; vptr = 0x0; keyname = "WCAXna"; keytype = IMGAXIS; BEGIN(COMMENT); } } ^WCST{I1}{ALT}" = "" "*{STRING} | ^WCST{I2}{ALT}" = "" "*{STRING} | ^WCST{I3}{ALT}"= "" "*{STRING} { /* Cross-reference supplier. */ keyname = "WCSTna"; errmsg = "cross-references are not implemented"; BEGIN(ERROR); } ^WCSX{I1}{ALT}" = "" "*{STRING} | ^WCSX{I2}{ALT}" = "" "*{STRING} | ^WCSX{I3}{ALT}"= "" "*{STRING} { /* Cross-reference consumer. */ keyname = "WCSXna"; errmsg = "cross-references are not implemented"; BEGIN(ERROR); } ^CRPIX { valtype = FLOAT; vptr = &(wcstem.crpix); keyname = "CRPIXja"; BEGIN(CCCCCia); } ^{I1}CRP | ^{I1}CRPX { valtype = FLOAT; vptr = &(wcstem.crpix); sscanf(yytext, "%d", &i); if (yyleng == 4) { keyname = "jCRPna"; BEGIN(iCCCna); } else { keyname = "jCRPXn"; BEGIN(iCCCCn); } } ^TCRP | ^TCRPX { valtype = FLOAT; vptr = &(wcstem.crpix); if (yyleng == 4) { keyname = "TCRPna"; BEGIN(TCCCna); } else { keyname = "TCRPXn"; BEGIN(TCCCCn); } } ^PC { valtype = FLOAT; vptr = &(wcstem.pc); altlin = 1; keyname = "PCi_ja"; BEGIN(CCi_ja); } ^{I2}PC { valtype = FLOAT; vptr = &(wcstem.pc); altlin = 1; sscanf(yytext, "%1d%1d", &i, &j); keyname = "ijPCna"; BEGIN(ijCCna); } ^TP | ^TPC { valtype = FLOAT; vptr = &(wcstem.pc); altlin = 1; if (yyleng == 2) { keyname = "TPn_ka"; BEGIN(TCn_ka); } else { keyname = "TPCn_ka"; BEGIN(TCCn_ka); } } ^CD { valtype = FLOAT; vptr = &(wcstem.cd); altlin = 2; keyname = "CDi_ja"; BEGIN(CCi_ja); } ^{I2}CD { valtype = FLOAT; vptr = &(wcstem.cd); altlin = 2; sscanf(yytext, "%1d%1d", &i, &j); keyname = "ijCDna"; BEGIN(ijCCna); } ^TC | ^TCD { valtype = FLOAT; vptr = &(wcstem.cd); altlin = 2; if (yyleng == 2) { keyname = "TCn_ka"; BEGIN(TCn_ka); } else { keyname = "TCDn_ka"; BEGIN(TCCn_ka); } } ^CDELT { valtype = FLOAT; vptr = &(wcstem.cdelt); keyname = "CDELTia"; BEGIN(CCCCCia); } ^{I1}CDE | ^{I1}CDLT { valtype = FLOAT; vptr = &(wcstem.cdelt); sscanf(yytext, "%d", &i); if (yyleng == 4) { keyname = "iCDEna"; BEGIN(iCCCna); } else { keyname = "iCDLTn"; BEGIN(iCCCCn); } } ^TCDE | ^TCDLT { valtype = FLOAT; vptr = &(wcstem.cdelt); if (yyleng == 4) { keyname = "TCDEna"; BEGIN(TCCCna); } else { keyname = "TCDLTn"; BEGIN(TCCCCn); } } ^CROTA { valtype = FLOAT; vptr = &(wcstem.crota); altlin = 4; keyname = "CROTAi"; BEGIN(CROTAi); } ^{I1}CROT { valtype = FLOAT; vptr = &(wcstem.crota); altlin = 4; sscanf(yytext, "%d", &i); keyname = "iCROTn"; BEGIN(iCROTn); } ^TCROT { valtype = FLOAT; vptr = &(wcstem.crota); altlin = 4; keyname = "TCROTn"; BEGIN(TCROTn); } ^CUNIT { valtype = STRING; vptr = &(wcstem.cunit); keyname = "CUNITia"; BEGIN(CCCCCia); } ^{I1}CUN | ^{I1}CUNI { valtype = STRING; vptr = &(wcstem.cunit); sscanf(yytext, "%d", &i); if (yyleng == 4) { keyname = "iCUNna"; BEGIN(iCCCna); } else { keyname = "iCUNIn"; BEGIN(iCCCCn); } } ^TCUN | ^TCUNI { valtype = STRING; vptr = &(wcstem.cunit); if (yyleng == 4) { keyname = "TCUNna"; BEGIN(TCCCna); } else { keyname = "TCUNIn"; BEGIN(TCCCCn); } } ^CTYPE { valtype = STRING; vptr = &(wcstem.ctype); keyname = "CTYPEia"; BEGIN(CCCCCia); } ^{I1}CTY | ^{I1}CTYP { valtype = STRING; vptr = &(wcstem.ctype); sscanf(yytext, "%d", &i); if (yyleng == 4) { keyname = "iCTYna"; BEGIN(iCCCna); } else { keyname = "iCTYPn"; BEGIN(iCCCCn); } } ^TCTY | ^TCTYP { valtype = STRING; vptr = &(wcstem.ctype); if (yyleng == 4) { keyname = "TCTYna"; BEGIN(TCCCna); } else { keyname = "TCTYPn"; BEGIN(TCCCCn); } } ^CRVAL { valtype = FLOAT; vptr = &(wcstem.crval); keyname = "CRVALia"; BEGIN(CCCCCia); } ^{I1}CRV | ^{I1}CRVL { valtype = FLOAT; vptr = &(wcstem.crval); sscanf(yytext, "%d", &i); if (yyleng == 4) { keyname = "iCRVna"; BEGIN(iCCCna); } else { keyname = "iCRVLn"; BEGIN(iCCCCn); } } ^TCRV | ^TCRVL { valtype = FLOAT; vptr = &(wcstem.crval); if (yyleng == 4) { keyname = "TCRVna"; BEGIN(TCCCna); } else { keyname = "TCRVLn"; BEGIN(TCCCCn); } } ^LONPOLE | ^LONP { valtype = FLOAT; vptr = &(wcstem.lonpole); if (yyleng == 7) { keyname = "LONPOLEa"; BEGIN(CCCCCCCa); } else { keyname = "LONPna"; BEGIN(CCCCna); } } ^LATPOLE | ^LATP { valtype = FLOAT; vptr = &(wcstem.latpole); if (yyleng == 7) { keyname = "LATPOLEa"; BEGIN(CCCCCCCa); } else { keyname = "LATPna"; BEGIN(CCCCna); } } ^RESTFREQ | ^RESTFRQ | ^RFRQ { valtype = FLOAT; vptr = &(wcstem.restfrq); if (yyleng == 8) { if (relax & WCSHDR_strict) { errmsg = "the RESTFREQ keyword is deprecated, use RESTFRQa"; BEGIN(ERROR); } else { unput(' '); keyname = "RESTFREQ"; BEGIN(CCCCCCCa); } } else if (yyleng == 7) { keyname = "RESTFRQa"; BEGIN(CCCCCCCa); } else { keyname = "RFRQna"; BEGIN(CCCCna); } } ^RESTWAV | ^RWAV { valtype = FLOAT; vptr = &(wcstem.restwav); if (yyleng == 7) { keyname = "RESTWAVa"; BEGIN(CCCCCCCa); } else { keyname = "RWAVna"; BEGIN(CCCCna); } } ^PV { valtype = FLOAT; vptr = &(wcstem.pv); ptype = 'v'; keyname = "PVi_ma"; BEGIN(CCi_ma); } ^{I1}V | ^{I1}PV { valtype = FLOAT; vptr = &(wcstem.pv); ptype = 'v'; sscanf(yytext, "%d", &i); if (yyleng == 2) { keyname = "iVn_ma"; BEGIN(iCn_ma); } else { keyname = "iPVn_ma"; BEGIN(iCCn_ma); } } ^TV | ^TPV { valtype = FLOAT; vptr = &(wcstem.pv); ptype = 'v'; if (yyleng == 2) { keyname = "TVn_ma"; BEGIN(TCn_ma); } else { keyname = "TPVn_ma"; BEGIN(TCCn_ma); } } ^PROJP { valtype = FLOAT; vptr = &(wcstem.pv); ptype = 'v'; keyname = "PROJPm"; BEGIN(PROJPm); } ^PS { valtype = STRING; vptr = &(wcstem.ps); ptype = 's'; keyname = "PSi_ma"; BEGIN(CCi_ma); } ^{I1}S | ^{I1}PS { valtype = STRING; vptr = &(wcstem.ps); ptype = 's'; sscanf(yytext, "%d", &i); if (yyleng == 2) { keyname = "iSn_ma"; BEGIN(iCn_ma); } else { keyname = "iPSn_ma"; BEGIN(iCCn_ma); } } ^TS | ^TPS { valtype = STRING; vptr = &(wcstem.ps); ptype = 's'; if (yyleng == 2) { keyname = "TSn_ma"; BEGIN(TCn_ma); } else { keyname = "TPSn_ma"; BEGIN(TCCn_ma); } } ^CNAME { valtype = STRING; vptr = &(wcstem.cname); keyname = "CNAMEia"; BEGIN(CCCCCia); } ^{I1}CNA | ^{I1}CNAM { valtype = STRING; vptr = &(wcstem.cname); sscanf(yytext, "%d", &i); if (yyleng == 4) { keyname = "iCNAna"; BEGIN(iCCCna); } else { if (!(relax & WCSHDR_CNAMn)) vptr = 0x0; keyname = "iCNAMn"; BEGIN(iCCCCn); } } ^TCNA | ^TCNAM { valtype = STRING; vptr = &(wcstem.cname); if (yyleng == 4) { keyname = "TCNAna"; BEGIN(TCCCna); } else { if (!(relax & WCSHDR_CNAMn)) vptr = 0x0; keyname = "TCNAMn"; BEGIN(TCCCCn); } } ^CRDER { valtype = FLOAT; vptr = &(wcstem.crder); keyname = "CRDERia"; BEGIN(CCCCCia); } ^{I1}CRD | ^{I1}CRDE { valtype = FLOAT; vptr = &(wcstem.crder); sscanf(yytext, "%d", &i); if (yyleng == 4) { keyname = "iCRDna"; BEGIN(iCCCna); } else { if (!(relax & WCSHDR_CNAMn)) vptr = 0x0; keyname = "iCRDEn"; BEGIN(iCCCCn); } } ^TCRD | ^TCRDE { valtype = FLOAT; vptr = &(wcstem.crder); if (yyleng == 4) { keyname = "TCRDna"; BEGIN(TCCCna); } else { if (!(relax & WCSHDR_CNAMn)) vptr = 0x0; keyname = "TCRDEn"; BEGIN(TCCCCn); } } ^CSYER { valtype = FLOAT; vptr = &(wcstem.csyer); keyname = "CSYERia"; BEGIN(CCCCCia); } ^{I1}CSY | ^{I1}CSYE { valtype = FLOAT; vptr = &(wcstem.csyer); sscanf(yytext, "%d", &i); if (yyleng == 4) { keyname = "iCSYna"; BEGIN(iCCCna); } else { if (!(relax & WCSHDR_CNAMn)) vptr = 0x0; keyname = "iCSYEn"; BEGIN(iCCCCn); } } ^TCSY | ^TCSYE { valtype = FLOAT; vptr = &(wcstem.csyer); if (yyleng == 4) { keyname = "TCSYna"; BEGIN(TCCCna); } else { if (!(relax & WCSHDR_CNAMn)) vptr = 0x0; keyname = "TCSYEn"; BEGIN(TCCCCn); } } ^DATE-AVG | ^DAVG { valtype = STRING; vptr = wcstem.dateavg; if (yyleng == 8) { if (ctrl < -10) keep = keyrec; keyname = "DATE-AVG"; BEGIN(CCCCCCCC); } else { keyname = "DAVGna"; BEGIN(CCCCn); } } ^DATE-OBS { valtype = STRING; vptr = wcstem.dateobs; if (ctrl < -10) keep = keyrec; keyname = "DATE-OBS"; BEGIN(CCCCCCCC); } ^DOBS{I1}" " | ^DOBS{I2}" " | ^DOBS{I3}" " { valtype = STRING; vptr = wcstem.dateobs; if (relax & WCSHDR_DOBSn) { yyless(4); keyname = "DOBSna"; BEGIN(CCCCn); } else if (relax & WCSHDR_reject) { errmsg = "DOBSna keyword is non-standard"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } ^EPOCH{ALT}" " { sscanf(yytext, "EPOCH%c", &a); if (relax & WCSHDR_strict) { errmsg = "the EPOCH keyword is deprecated, use EQUINOXa"; BEGIN(ERROR); } else if (a == ' ' || (relax & WCSHDR_EPOCHa)) { valtype = FLOAT; vptr = &(wcstem.equinox); special = wcsbth_epoch; unput(a); keyname = "EPOCH"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "EPOCH keyword may not have an alternate version code"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } ^EQUINOX | ^EQUI { valtype = FLOAT; vptr = &(wcstem.equinox); if (yyleng == 7) { keyname = "EQUINOXa"; BEGIN(CCCCCCCa); } else { keyname = "EQUIna"; BEGIN(CCCCna); } } ^MJD-AVG" " | ^MJDA { valtype = FLOAT; vptr = &(wcstem.mjdavg); if (yyleng == 8) { if (ctrl < -10) keep = keyrec; keyname = "MJD-AVG"; BEGIN(CCCCCCCC); } else { keyname = "MJDAn"; BEGIN(CCCCn); } } ^MJD-OBS" " | ^MJDOB { valtype = FLOAT; vptr = &(wcstem.mjdobs); if (yyleng == 8) { if (ctrl < -10) keep = keyrec; keyname = "MJD-OBS"; BEGIN(CCCCCCCC); } else { keyname = "MJDOn"; BEGIN(CCCCCn); } } ^OBSGEO-X | ^OBSGX { valtype = FLOAT; vptr = wcstem.obsgeo; if (yyleng == 8) { if (ctrl < -10) keep = keyrec; keyname = "OBSGEO-X"; BEGIN(CCCCCCCC); } else { keyname = "OBSGXn"; BEGIN(CCCCCn); } } ^OBSGEO-Y | ^OBSGY { valtype = FLOAT; vptr = wcstem.obsgeo + 1; if (yyleng == 8) { if (ctrl < -10) keep = keyrec; keyname = "OBSGEO-Y"; BEGIN(CCCCCCCC); } else { keyname = "OBSGYn"; BEGIN(CCCCCn); } } ^OBSGEO-Z | ^OBSGZ { valtype = FLOAT; vptr = wcstem.obsgeo + 2; if (yyleng == 8) { if (ctrl < -10) keep = keyrec; keyname = "OBSGEO-Z"; BEGIN(CCCCCCCC); } else { keyname = "OBSGZn"; BEGIN(CCCCCn); } } ^RADESYS | ^RADE { valtype = STRING; vptr = wcstem.radesys; if (yyleng == 7) { keyname = "RADESYSa"; BEGIN(CCCCCCCa); } else { keyname = "RADEna"; BEGIN(CCCCna); } } ^RADECSYS { if (relax & WCSHDR_RADECSYS) { valtype = STRING; vptr = wcstem.radesys; unput(' '); keyname = "RADECSYS"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "the RADECSYS keyword is deprecated, use RADESYSa"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } ^SPECSYS | ^SPEC { valtype = STRING; vptr = wcstem.specsys; if (yyleng == 7) { keyname = "SPECSYSa"; BEGIN(CCCCCCCa); } else { keyname = "SPECna"; BEGIN(CCCCna); } } ^SSYSOBS | ^SOBS { valtype = STRING; vptr = wcstem.ssysobs; if (yyleng == 7) { keyname = "SSYSOBSa"; BEGIN(CCCCCCCa); } else { keyname = "SOBSna"; BEGIN(CCCCna); } } ^SSYSSRC | ^SSRC { valtype = STRING; vptr = wcstem.ssyssrc; if (yyleng == 7) { keyname = "SSYSSRCa"; BEGIN(CCCCCCCa); } else { keyname = "SSRCna"; BEGIN(CCCCna); } } ^VELANGL | ^VANG { valtype = FLOAT; vptr = &(wcstem.velangl); if (yyleng == 7) { keyname = "VELANGLa"; BEGIN(CCCCCCCa); } else { keyname = "VANGna"; BEGIN(CCCCna); } } ^VELOSYS | ^VSYS { valtype = FLOAT; vptr = &(wcstem.velosys); if (yyleng == 7) { keyname = "VELOSYSa"; BEGIN(CCCCCCCa); } else { keyname = "VSYSna"; BEGIN(CCCCna); } } ^VELREF{ALT}" " { sscanf(yytext, "VELREF%c", &a); if (relax & WCSHDR_strict) { errmsg = "the VELREF keyword is deprecated, use SPECSYSa"; BEGIN(ERROR); } else if (a == ' ' || (relax & WCSHDR_VELREFa)) { valtype = INTEGER; vptr = &(wcstem.velref); unput(a); keyname = "VELREF"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "VELREF keyword may not have an alternate version code"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } ^VSOURCE{ALT} { if (relax & WCSHDR_VSOURCE) { valtype = FLOAT; vptr = &(wcstem.zsource); special = wcsbth_vsource; yyless(7); keyname = "VSOURCEa"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "the VSOURCEa keyword is deprecated, use ZSOURCEa"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } ^VSOU{I1}{ALT}" " | ^VSOU{I2}{ALT}" " | ^VSOU{I3}{ALT} { if (relax & WCSHDR_VSOURCE) { valtype = FLOAT; vptr = &(wcstem.zsource); special = wcsbth_vsource; yyless(4); keyname = "VSOUna"; BEGIN(CCCCna); } else if (relax & WCSHDR_reject) { errmsg = "VSOUna keyword is deprecated, use ZSOUna"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } ^WCSNAME | ^WCSN | ^TWCS { valtype = STRING; vptr = wcstem.wcsname; if (yyleng == 7) { keyname = "WCSNAMEa"; BEGIN(CCCCCCCa); } else { if (*yytext == 'W') { keyname = "WCSNna"; } else { keyname = "TWCSna"; } BEGIN(CCCCna); } } ^ZSOURCE | ^ZSOU { valtype = FLOAT; vptr = &(wcstem.zsource); if (yyleng == 7) { keyname = "ZSOURCEa"; BEGIN(CCCCCCCa); } else { keyname = "ZSOUna"; BEGIN(CCCCna); } } ^END" "{77} { if (wcsbth_nkeyrec) { wcsbth_nkeyrec = 0; errmsg = "keyrecords following the END keyrecord were ignored"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } ^. { BEGIN(DISCARD); } {I1}{ALT}" " | {I2}{ALT} { if (relax & WCSHDR_ALLIMG) { sscanf(yytext, "%d%c", &i, &a); keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } 0{I1}{ALT} | 00{I1} { if (relax & WCSHDR_ALLIMG) { if (relax & WCSHDR_reject) { /* Violates the basic FITS standard. */ errmsg = "indices in parameterized keywords must not have " "leading zeroes"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } 0{ALT}" " | 00{ALT} | {Z3} { /* Anything that has fallen through to this point must contain */ /* an invalid axis number. */ if (relax & WCSHDR_ALLIMG) { errmsg = "axis number must exceed 0"; BEGIN(ERROR); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } . { if (relax & WCSHDR_reject) { /* Looks too much like a FITS WCS keyword not to flag it. */ errmsg = errtxt; sprintf(errmsg, "keyword looks very much like %s but isn't", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } {I1}" " | {I2}" " | {I3} | {I1}" " | {I2}" " | {I3} { if (vptr) { WCSBTH_PUTBACK; BEGIN((YY_START == iCCCCn) ? iCCCna : TCCCna); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "%s keyword is non-standard", keyname); BEGIN(ERROR); } else { BEGIN(DISCARD); } } {I1}[A-Z]" " | {I2}[A-Z] | {I1}[A-Z]" " | {I2}[A-Z] { if (vptr && (relax & WCSHDR_LONGKEY)) { WCSBTH_PUTBACK; BEGIN((YY_START == iCCCCn) ? iCCCna : TCCCna); } else if (relax & WCSHDR_reject) { errmsg = errtxt; if (!vptr) { sprintf(errmsg, "%s keyword is non-standard", keyname); } else { sprintf(errmsg, "%s keyword may not have an alternate version code", keyname); } BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } . | . { BEGIN(DISCARD); } {I1}{ALT}" " | {I2}{ALT}" " | {I3}{ALT} | {I1}{ALT}" " | {I2}{ALT}" " | {I3}{ALT} { sscanf(yytext, "%d%c", &n, &a); if (YY_START == TCCCna) i = wcsbth_colax(*wcs, &alts, n, a); keytype = (YY_START == iCCCna) ? BIMGARR : PIXLIST; BEGIN(VALUE); } . | . { BEGIN(DISCARD); } {I1}_{I1}{ALT}" " | {I1}_{I2}{ALT}" " | {I2}_{I1}{ALT}" " | {I2}_{I2}{ALT} { if (relax & WCSHDR_ALLIMG) { sscanf(yytext, "%d_%d%c", &i, &j, &a); keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } 0{I1}_{I1}{ALT}" " | {I1}_0{I1}{ALT}" " | 00{I1}_{I1}{ALT} | 0{I1}_0{I1}{ALT} | {I1}_00{I1}{ALT} | 000{I1}_{I1} | 00{I1}_0{I1} | 0{I1}_00{I1} | {I1}_000{I1} | 0{I1}_{I2}{ALT} | {I1}_0{I2}{ALT} | 00{I1}_{I2} | 0{I1}_0{I2} | {I1}_00{I2} | 0{I2}_{I1}{ALT} | {I2}_0{I1}{ALT} | 00{I2}_{I1} | 0{I2}_0{I1} | {I2}_00{I1} | 0{I2}_{I2} | {I2}_0{I2} { if (relax & WCSHDR_ALLIMG) { if (((altlin == 1) && (relax & WCSHDR_PC0i_0ja)) || ((altlin == 2) && (relax & WCSHDR_CD0i_0ja))) { sscanf(yytext, "%d_%d%c", &i, &j, &a); keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = "indices in parameterized keywords must not have " "leading zeroes"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } {Z1}_{Z1}{ALT}" " | {Z2}_{Z1}{ALT}" " | {Z1}_{Z2}{ALT}" " | {Z3}_{Z1}{ALT} | {Z2}_{Z2}{ALT} | {Z1}_{Z3}{ALT} | {Z4}_{Z1} | {Z3}_{Z2} | {Z2}_{Z3} | {Z1}_{Z4} { /* Anything that has fallen through to this point must contain */ /* an invalid axis number. */ if (relax & WCSHDR_ALLIMG) { errmsg = "axis number must exceed 0"; BEGIN(ERROR); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } {Z1}-{Z1}{ALT}" " | {Z2}-{Z1}{ALT}" " | {Z1}-{Z2}{ALT}" " | {Z3}-{Z1}{ALT} | {Z2}-{Z2}{ALT} | {Z1}-{Z3}{ALT} | {Z4}-{Z1} | {Z3}-{Z2} | {Z2}-{Z3} | {Z1}-{Z4} { if (relax & WCSHDR_ALLIMG) { errmsg = errtxt; sprintf(errmsg, "%s keyword must use an underscore, not a dash", keyname); BEGIN(ERROR); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } {Z1}{6} { /* This covers the defunct forms CD00i00j and PC00i00j. */ if (relax & WCSHDR_ALLIMG) { if (((altlin == 1) && (relax & WCSHDR_PC00i00j)) || ((altlin == 2) && (relax & WCSHDR_CD00i00j))) { sscanf(yytext, "%3d%3d", &i, &j); a = ' '; keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "this form of the %s keyword is deprecated, use %s", keyname, keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "deprecated image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } . { BEGIN(DISCARD); } {I1}{ALT}" " | {I2}{ALT}" " | {I3}{ALT} { sscanf(yytext, "%d%c", &n, &a); keytype = BIMGARR; BEGIN(VALUE); } {I1}_{I1}{ALT}" " | {I1}_{I2}{ALT} | {I2}_{I1}{ALT} | {I1}_{I3} | {I2}_{I2} | {I3}_{I1} { if (relax & WCSHDR_LONGKEY) { WCSBTH_PUTBACK; BEGIN(TCn_ka); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "%s keyword is non-standard", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } . { BEGIN(DISCARD); } {I1}_{I1}{ALT}" " | {I1}_{I2}{ALT}" " | {I2}_{I1}{ALT}" " | {I1}_{I3}{ALT} | {I2}_{I2}{ALT} | {I3}_{I1}{ALT} { sscanf(yytext, "%d_%d%c", &n, &k, &a); i = wcsbth_colax(*wcs, &alts, n, a); j = wcsbth_colax(*wcs, &alts, k, a); keytype = PIXLIST; BEGIN(VALUE); } {I1}_{I4} | {I2}_{I3} | {I3}_{I2} | {I4}_{I1} { sscanf(yytext, "%d_%d", &n, &k); a = ' '; i = wcsbth_colax(*wcs, &alts, n, a); j = wcsbth_colax(*wcs, &alts, k, a); keytype = PIXLIST; BEGIN(VALUE); } . { BEGIN(DISCARD); } {Z1}{ALT}" " | {Z2}{ALT} | {Z3} { if (relax & WCSHDR_ALLIMG) { a = ' '; sscanf(yytext, "%d%c", &i, &a); if (relax & WCSHDR_strict) { errmsg = "the CROTAn keyword is deprecated, use PCi_ja"; BEGIN(ERROR); } else if (a == ' ' || relax & WCSHDR_CROTAia) { yyless(0); BEGIN(CCCCCia); } else if (relax & WCSHDR_reject) { errmsg = "CROTAn keyword may not have an alternate version code"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "deprecated image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } . { if (relax & WCSHDR_ALLIMG) { yyless(0); BEGIN(CCCCCia); } else { /* Let it go. */ BEGIN(DISCARD); } } {I1}" " | {I2}" " | {I3} | {I1}" " | {I2}" " | {I3} { WCSBTH_PUTBACK; BEGIN((YY_START == iCROTn) ? iCCCna : TCCCna); } {I1}[A-Z]" " | {I2}[A-Z] | {I1}[A-Z]" " | {I2}[A-Z] { if (relax & WCSHDR_CROTAia) { WCSBTH_PUTBACK; BEGIN((YY_START == iCROTn) ? iCCCna : TCCCna); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "%s keyword may not have an alternate version code", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } . | . { BEGIN(DISCARD); } {ALT} | . { /* Image-header keyword. */ if (relax & (WCSHDR_AUXIMG | WCSHDR_ALLIMG)) { if (YY_START == CCCCCCCa) { sscanf(yytext, "%c", &a); } else { a = 0; unput(yytext[0]); } keytype = IMGAUX; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } . { if (relax & WCSHDR_reject) { /* Looks too much like a FITS WCS keyword not to flag it. */ errmsg = errtxt; sprintf(errmsg, "invalid alternate code, keyword resembles %s " "but isn't", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } {I1}{ALT}" " | {I2}{ALT}" " | {I3}{ALT} | {I1}{ALT}" " | {I2}{ALT} { sscanf(yytext, "%d%c", &n, &a); keytype = BINTAB; BEGIN(VALUE); } {I3} { sscanf(yytext, "%d", &n); a = ' '; keytype = BINTAB; BEGIN(VALUE); } . | . { BEGIN(DISCARD); } {I1}" " | {I2}" " | {I3}" " | {I4} | {I1}" " | {I2}" " | {I3} { sscanf(yytext, "%d", &n); a = 0; keytype = BINTAB; BEGIN(VALUE); } . | . { BEGIN(DISCARD); } {I1}_{Z1}{ALT}" " | {I1}_{I2}{ALT}" " | {I2}_{Z1}{ALT}" " | {I2}_{I2}{ALT} { /* Image-header keyword. */ if (relax & WCSHDR_ALLIMG) { sscanf(yytext, "%d_%d%c", &i, &m, &a); keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } 0{I1}_{Z1}{ALT}" " | {I1}_0{Z1}{ALT}" " | 00{I1}_{Z1}{ALT} | 0{I1}_0{Z1}{ALT} | {I1}_00{Z1}{ALT} | 000{I1}_{Z1} | 00{I1}_0{Z1} | 0{I1}_00{Z1} | {I1}_000{Z1} | 0{I1}_{I2}{ALT} | {I1}_0{I2}{ALT} | 00{I1}_{I2} | 0{I1}_0{I2} | {I1}_00{I2} | 0{I2}_{Z1}{ALT} | {I2}_0{Z1}{ALT} | 00{I2}_{Z1} | 0{I2}_0{Z1} | {I2}_00{Z1} | 0{I2}_{I2} | {I2}_0{I2} { if (relax & WCSHDR_ALLIMG) { if (((valtype == FLOAT) && (relax & WCSHDR_PV0i_0ma)) || ((valtype == STRING) && (relax & WCSHDR_PS0i_0ma))) { sscanf(yytext, "%d_%d%c", &i, &m, &a); keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = "indices in parameterized keywords must not have " "leading zeroes"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } {Z1}_{Z1}{ALT}" " | {Z2}_{Z1}{ALT}" " | {Z1}_{Z2}{ALT}" " | {Z3}_{Z1}{ALT} | {Z2}_{Z2}{ALT} | {Z1}_{Z3}{ALT} | {Z4}_{Z1} | {Z3}_{Z2} | {Z2}_{Z3} | {Z1}_{Z4} { if (relax & WCSHDR_ALLIMG) { /* Anything that has fallen through to this point must contain */ /* an invalid parameter. */ errmsg = "axis number must exceed 0"; BEGIN(ERROR); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } {Z1}-{Z1}{ALT}" " | {Z2}-{Z1}{ALT}" " | {Z1}-{Z2}{ALT}" " | {Z3}-{Z1}{ALT} | {Z2}-{Z2}{ALT} | {Z1}-{Z3}{ALT} | {Z4}-{Z1} | {Z3}-{Z2} | {Z2}-{Z3} | {Z1}-{Z4} { errmsg = errtxt; sprintf(errmsg, "%s keyword must use an underscore, not a dash", keyname); BEGIN(ERROR); } . { BEGIN(DISCARD); } {I1}_{Z1}{ALT}" " | {I1}_{I2}{ALT} | {I1}_{I3} | {I2}_{Z1}{ALT} | {I2}_{I2} | {I3}_{Z1} | {I1}_{Z1}{ALT}" " | {I1}_{I2}{ALT} | {I1}_{I3} | {I2}_{Z1}{ALT} | {I2}_{I2} | {I3}_{Z1} { if (relax & WCSHDR_LONGKEY) { WCSBTH_PUTBACK; BEGIN((YY_START == iCCn_ma) ? iCn_ma : TCn_ma); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "the %s keyword is non-standard", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } . | . { BEGIN(DISCARD); } {I1}_{Z1}{ALT}" " | {I1}_{I2}{ALT}" " | {I1}_{I3}{ALT} | {I2}_{Z1}{ALT}" " | {I2}_{I2}{ALT} | {I3}_{Z1}{ALT} | {I1}_{Z1}{ALT}" " | {I1}_{I2}{ALT}" " | {I1}_{I3}{ALT} | {I2}_{Z1}{ALT}" " | {I2}_{I2}{ALT} | {I3}_{Z1}{ALT} { sscanf(yytext, "%d_%d%c", &n, &m, &a); if (YY_START == TCn_ma) i = wcsbth_colax(*wcs, &alts, n, a); keytype = (YY_START == iCn_ma) ? BIMGARR : PIXLIST; BEGIN(VALUE); } {I1}_{I4} | {I2}_{I3} | {I3}_{I2} | {I4}_{Z1} | {I1}_{I4} | {I2}_{I3} | {I3}_{I2} | {I4}_{Z1} { /* Invalid combinations will be flagged by . */ sscanf(yytext, "%d_%d", &n, &m); a = ' '; if (YY_START == TCn_ma) i = wcsbth_colax(*wcs, &alts, n, a); keytype = (YY_START == iCn_ma) ? BIMGARR : PIXLIST; BEGIN(VALUE); } . | . { BEGIN(DISCARD); } {Z1}" " { if (relax & WCSHDR_PROJPn) { sscanf(yytext, "%d", &m); i = 0; a = ' '; keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = "the PROJPn keyword is deprecated, use PVi_ma"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } {Z2}" " | {Z3} { if (relax & (WCSHDR_PROJPn | WCSHDR_reject)) { errmsg = "invalid PROJPn keyword"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } . { BEGIN(DISCARD); } =" "+ { /* Do checks on i, j, m, n, k. */ if (!(keytype & keysel)) { /* Selection by keyword type. */ BEGIN(DISCARD); } else if (exclude[n] || exclude[k]) { /* One or other column is not selected. */ if (k && (exclude[n] != exclude[k])) { /* For keywords such as TCn_ka, both columns must be excluded. User error, so return immediately. */ yylex_destroy(); return 3; } else { BEGIN(DISCARD); } } else if (i > 99 || j > 99 || m > 99 || n > 999 || k > 999) { if (relax & WCSHDR_reject) { errmsg = errtxt; if (i > 99 || j > 99) { sprintf(errmsg, "axis number exceeds 99"); } else if (m > 99) { sprintf(errmsg, "parameter number exceeds 99"); } else if (n > 999 || k > 999) { sprintf(errmsg, "column number exceeds 999"); } BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else if (ipass == 2 && npass == 3 && (keytype & BINTAB)) { /* Skip keyvalues that won't be inherited. */ BEGIN(FLUSH); } else { if (ipass == 3 && (keytype & IMGHEAD)) { /* IMGHEAD keytypes are always dealt with on the second pass. */ /* However, they must be re-parsed in order to report errors. */ vptr = 0x0; } if (valtype == INTEGER) { BEGIN(INTEGER_VAL); } else if (valtype == FLOAT) { BEGIN(FLOAT_VAL); } else if (valtype == STRING) { BEGIN(STRING_VAL); } else { errmsg = errtxt; sprintf(errmsg, "internal parser ERROR, bad data type: %d", valtype); BEGIN(ERROR); } } } . { errmsg = "invalid KEYWORD = VALUE syntax"; BEGIN(ERROR); } {INTEGER} { if (ipass == 1) { BEGIN(COMMENT); } else { /* Read the keyvalue. */ sscanf(yytext, "%d", &inttmp); BEGIN(COMMENT); } } . { errmsg = "an integer value was expected"; BEGIN(ERROR); } {FLOAT} { if (ipass == 1) { BEGIN(COMMENT); } else { /* Read the keyvalue. */ wcsutil_str2double(yytext, "%lf", &dbltmp); BEGIN(COMMENT); } } . { errmsg = "a floating-point value was expected"; BEGIN(ERROR); } {STRING} { if (ipass == 1) { BEGIN(COMMENT); } else { /* Read the keyvalue. */ strcpy(strtmp, yytext+1); /* Squeeze out repeated quotes. */ ix = 0; for (jx = 0; jx < 72; jx++) { if (ix < jx) { strtmp[ix] = strtmp[jx]; } if (strtmp[jx] == '\0') { if (ix) strtmp[ix-1] = '\0'; break; } else if (strtmp[jx] == '\'' && strtmp[jx+1] == '\'') { jx++; } ix++; } BEGIN(COMMENT); } } . { errmsg = "a string value was expected"; BEGIN(ERROR); } {INLINE}$ { if (ipass == 1) { /* Do first-pass bookkeeping. */ wcsbth_pass1(keytype, i, j, n, k, a, ptype, &alts); BEGIN(FLUSH); } else if (*wcs) { /* Store the value now that the keyrecord has been validated. */ alts.icol = 0; alts.ialt = 0; /* Update each coordinate representation. */ gotone = 0; while ((wcsp = wcsbth_idx(*wcs, &alts, keytype, n, a))) { gotone = 1; if (vptr) { voff = (char *)vptr - (char *)(&wcstem); wptr = (void *)((char *)wcsp + voff); if (valtype == INTEGER) { *((int *)wptr) = inttmp; } else if (valtype == FLOAT) { /* Apply keyword parameterization. */ if (ptype == 'v') { ipx = (wcsp->npv)++; wcsp->pv[ipx].i = i; wcsp->pv[ipx].m = m; wptr = &(wcsp->pv[ipx].value); } else if (j) { wptr = *((double **)wptr) + (i - 1)*(wcsp->naxis) + (j - 1); } else if (i) { wptr = *((double **)wptr) + (i - 1); } if (special) { special(wptr, dbltmp); } else { *((double *)wptr) = dbltmp; } /* Flag the presence of PCi_ja, or CDi_ja and/or CROTAia. */ if (altlin) { wcsp->altlin |= altlin; altlin = 0; } } else if (valtype == STRING) { /* Apply keyword parameterization. */ if (ptype == 's') { ipx = wcsp->nps++; wcsp->ps[ipx].i = i; wcsp->ps[ipx].m = m; wptr = wcsp->ps[ipx].value; } else if (j) { wptr = *((char (**)[72])wptr) + (i - 1)*(wcsp->naxis) + (j - 1); } else if (i) { wptr = *((char (**)[72])wptr) + (i - 1); } cptr = (char *)wptr; strcpy(cptr, strtmp); } } } if (ipass == npass) { if (gotone) { nvalid++; if (ctrl == 4) { wcsfprintf(stderr, "%.80s\n Accepted (%d) as a valid WCS keyrecord.\n", keyrec, nvalid); } BEGIN(FLUSH); } else { errmsg = "syntactically valid WCS keyrecord has no effect"; BEGIN(ERROR); } } else { BEGIN(FLUSH); } } else { BEGIN(FLUSH); } } .*" "*\/.*$ { errmsg = "invalid keyvalue"; BEGIN(ERROR); } [^ \/\n]*{INLINE}$ { errmsg = "invalid keyvalue"; BEGIN(ERROR); } " "+[^\/\n].*{INLINE}$ { errmsg = "invalid keyvalue or malformed keycomment"; BEGIN(ERROR); } .*$ { errmsg = "malformed keycomment"; BEGIN(ERROR); } .*$ { if (ipass == npass) { if (ctrl < 0) { /* Preserve discards. */ keep = keyrec; } else if (2 < ctrl) { nother++; wcsfprintf(stderr, "%.80s\n Not a recognized WCS keyword.\n", keyrec); } } BEGIN(FLUSH); } .*$ { if (ipass == npass) { (*nreject)++; if (ctrl%10 == -1) { keep = keyrec; } if (1 < abs(ctrl%10)) { wcsfprintf(stderr, "%.80s\n Rejected (%d), %s.\n", keyrec, *nreject, errmsg); } } BEGIN(FLUSH); } .*\n { if (ipass == npass && keep) { if (hptr < keep) { strncpy(hptr, keep, 80); } hptr += 80; } /* Throw away the rest of the line and reset for the next one. */ i = j = 0; n = k = 0; m = 0; a = ' '; keyrec += 80; keytype = 0; valtype = -1; vptr = 0x0; keep = 0x0; altlin = 0; ptype = ' '; special = 0x0; BEGIN(INITIAL); } <> { /* End-of-input. */ if (ipass == 1) { if ((status = wcsbth_init1(&alts, nwcs, wcs)) || (*nwcs == 0 && ctrl == 0)) { yylex_destroy(); return status; } if (2 < abs(ctrl%10)) { if (*nwcs == 1) { if (strcmp(wcs[0]->wcsname, "DEFAULTS") != 0) { wcsfprintf(stderr, "Found one coordinate representation.\n"); } } else { wcsfprintf(stderr, "Found %d coordinate representations.\n", *nwcs); } } if (alts.imgherit) npass = 3; } if (ipass++ < npass) { wcsbth_hdr = header; wcsbth_nkeyrec = nkeyrec; keyrec = header; *nreject = 0; i = j = 0; k = n = 0; m = 0; a = ' '; keytype = 0; valtype = -1; vptr = 0x0; altlin = 0; ptype = ' '; special = 0x0; yyrestart(yyin); } else { yylex_destroy(); if (ctrl < 0) { *hptr = '\0'; } else if (ctrl == 1) { wcsfprintf(stderr, "%d WCS keyrecord%s rejected.\n", *nreject, (*nreject==1)?" was":"s were"); } else if (ctrl == 4) { wcsfprintf(stderr, "\n"); wcsfprintf(stderr, "%5d keyrecord%s rejected for syntax or " "other errors,\n", *nreject, (*nreject==1)?" was":"s were"); wcsfprintf(stderr, "%5d %s recognized as syntactically valid, " "and\n", nvalid, (nvalid==1)?"was":"were"); wcsfprintf(stderr, "%5d other%s were not recognized as WCS " "keyrecords.\n", nother, (nother==1)?"":"s"); } return wcsbth_final(&alts, nwcs, wcs); } } %% /*---------------------------------------------------------------------------- * Perform first-pass tasks: * * 1) Count the number of coordinate axes in each of the 27 possible alternate * image-header coordinate representations. Also count the number of PVi_ma * and PSi_ma keywords in each representation. * * 2) Determine the number of binary table columns that have an image array * with a coordinate representation (up to 999), and count the number of * coordinate axes in each of the 27 possible alternates. Also count the * number of iVn_ma and iSn_ma keywords in each representation. * * 3) Determine the number of alternate pixel list coordinate representations * (up to 27) and the table columns associated with each. Also count the * number of TVn_ma and TSn_ma keywords in each representation. * * In the first pass alts->arridx[icol][27] is used to determine the number of * axes in each of 27 possible image-header coordinate descriptions (icol == 0) * and each of the 27 possible coordinate representations for an image array in * each column. * * The elements of alts->pixlist[icol] are used as bit arrays to flag which of * the 27 possible pixel list coordinate representations are associated with * each table column. *---------------------------------------------------------------------------*/ int wcsbth_pass1( int keytype, int i, int j, int n, int k, char a, char ptype, struct wcsbth_alts *alts) { int ialt, icol, mask, ncol; if (a == 0) { /* Keywords such as DATE-OBS go along for the ride. */ return 0; } ncol = alts->ncol; /* Do we need to allocate memory for alts? */ if (alts->arridx == 0x0) { if (ncol == 0) { /* Can only happen if TFIELDS is missing or out-of-sequence. If n and k are both zero then we may be processing an image header so leave ncol alone - the array will be realloc'd later if required. */ if (n || k) { /* The header is mangled, assume the worst. */ ncol = 999; } } if (!(alts->arridx = calloc((1 + ncol)*27, sizeof(short int))) || !(alts->npv = calloc((1 + ncol)*27, sizeof(unsigned char))) || !(alts->nps = calloc((1 + ncol)*27, sizeof(unsigned char))) || !(alts->pixlist = calloc((1 + ncol), sizeof(unsigned int)))) { if (alts->arridx) free(alts->arridx); if (alts->npv) free(alts->npv); if (alts->nps) free(alts->nps); if (alts->pixlist) free(alts->pixlist); return 2; } alts->ncol = ncol; } else if (n > ncol || k > ncol) { /* Can only happen if TFIELDS or the WCS keyword is wrong; carry on. */ ncol = 999; if (!(alts->arridx = realloc(alts->arridx, 27*(1 + ncol)*sizeof(short int))) || !(alts->npv = realloc(alts->npv, 27*(1 + ncol)*sizeof(unsigned char))) || !(alts->nps = realloc(alts->nps, 27*(1 + ncol)*sizeof(unsigned char))) || !(alts->pixlist = realloc(alts->pixlist, (1 + ncol)*sizeof(unsigned int)))) { if (alts->arridx) free(alts->arridx); if (alts->npv) free(alts->npv); if (alts->nps) free(alts->nps); if (alts->pixlist) free(alts->pixlist); return 2; } /* Since realloc() doesn't initialize the extra memory. */ for (icol = (1 + alts->ncol); icol < (1 + ncol); icol++) { for (ialt = 0; ialt < 27; ialt++) { alts->arridx[icol][ialt] = 0; alts->npv[icol][ialt] = 0; alts->nps[icol][ialt] = 0; alts->pixlist[icol] = 0; } } alts->ncol = ncol; } ialt = 0; if (a != ' ') { ialt = a - 'A' + 1; } /* A BINTAB keytype such as LONPna, in conjunction with an IMGAXIS keytype causes a table column to be recognized as an image array. */ if (keytype & IMGHEAD || keytype & BIMGARR) { /* n == 0 is expected for IMGHEAD keywords. */ if (i == 0 && j == 0) { if (alts->arridx[n][ialt] == 0) { /* Flag that an auxiliary keyword was seen. */ alts->arridx[n][ialt] = -1; } } else { /* Record the maximum axis number found. */ if (alts->arridx[n][ialt] < i) { alts->arridx[n][ialt] = i; } if (alts->arridx[n][ialt] < j) { alts->arridx[n][ialt] = j; } } if (ptype == 'v') { alts->npv[n][ialt]++; } else if (ptype == 's') { alts->nps[n][ialt]++; } } /* BINTAB keytypes, which apply both to pixel lists as well as binary table image arrays, never contribute to recognizing a table column as a pixel list axis. A PIXLIST keytype is required for that. */ if (keytype == PIXLIST) { mask = 1 << ialt; /* n > 0 for PIXLIST keytypes. */ alts->pixlist[n] |= mask; if (k) alts->pixlist[k] |= mask; /* Used as a flag over all columns. */ alts->pixlist[0] |= mask; if (ptype == 'v') { alts->pixnpv[ialt]++; } else if (ptype == 's') { alts->pixnps[ialt]++; } } return 0; } /*---------------------------------------------------------------------------- * Perform initializations at the end of the first pass: * * 1) Determine the required number of wcsprm structs, allocate memory for * an array of them and initialize each one. *---------------------------------------------------------------------------*/ int wcsbth_init1( struct wcsbth_alts *alts, int *nwcs, struct wcsprm **wcs) { int ialt, icol, inherit[27], ix, mask, ncol, npsmax, npvmax, status = 0; struct wcsprm *wcsp; if (alts->arridx == 0x0) { *nwcs = 0; return 0; } /* Determine the number of axes in each pixel list representation. */ ncol = alts->ncol; for (ialt = 0, mask = 1; ialt < 27; ialt++, mask <<= 1) { alts->pixidx[ialt] = 0; if (alts->pixlist[0] | mask) { for (icol = 1; icol <= ncol; icol++) { if (alts->pixlist[icol] & mask) { alts->pixidx[ialt]++; } } } } /* Find the total number of coordinate representations. */ *nwcs = 0; alts->imgherit = 0; for (ialt = 0; ialt < 27; ialt++) { inherit[ialt] = 0; for (icol = 1; icol <= ncol; icol++) { if (alts->arridx[icol][ialt] < 0) { /* No BIMGARR keytype but there's at least one BINTAB. */ if (alts->arridx[0][ialt] > 0) { /* There is an IMGAXIS keytype that we will inherit, so count this representation. */ alts->arridx[icol][ialt] = alts->arridx[0][ialt]; } else { alts->arridx[icol][ialt] = 0; } } if (alts->arridx[icol][ialt]) { if (alts->arridx[0][ialt]) { /* All IMGHEAD keywords are inherited for this ialt. */ inherit[ialt] = 1; if (alts->arridx[icol][ialt] < alts->arridx[0][ialt]) { /* The extra axes are also inherited. */ alts->arridx[icol][ialt] = alts->arridx[0][ialt]; } } (*nwcs)++; } } /* Count every "a" found in any IMGHEAD keyword... */ if (alts->arridx[0][ialt]) { if (inherit[ialt]) { /* ...but not if the IMGHEAD keywords will be inherited. */ alts->arridx[0][ialt] = 0; alts->imgherit = 1; } else if (alts->arridx[0][ialt] > 0) { (*nwcs)++; } } /* We need a struct for every "a" found in a PIXLIST keyword. */ if (alts->pixidx[ialt]) { (*nwcs)++; } } if (*nwcs) { /* Allocate memory for the required number of wcsprm structs. */ if (!(*wcs = calloc(*nwcs, sizeof(struct wcsprm)))) { return 2; } /* Record the current values of NPVMAX and NPSMAX. */ npvmax = wcsnpv(-1); npsmax = wcsnps(-1); /* Initialize each wcsprm struct. */ wcsp = *wcs; *nwcs = 0; for (icol = 0; icol <= ncol; icol++) { for (ialt = 0; ialt < 27; ialt++) { if (alts->arridx[icol][ialt] > 0) { /* Image-header representations that are not for inheritance (icol == 0) or binary table image array representations. */ wcsp->flag = -1; wcsnpv(alts->npv[icol][ialt]); wcsnps(alts->nps[icol][ialt]); if ((status = wcsini(1, (int)(alts->arridx[icol][ialt]), wcsp))) { wcsvfree(nwcs, wcs); break; } /* Record the alternate version code. */ if (ialt) { wcsp->alt[0] = 'A' + ialt - 1; } /* Record the table column number. */ wcsp->colnum = icol; /* On the second pass alts->arridx[icol][27] indexes the array of wcsprm structs. */ alts->arridx[icol][ialt] = (*nwcs)++; wcsp++; } else { /* Signal that this column has no WCS for this "a". */ alts->arridx[icol][ialt] = -1; } } } for (ialt = 0; ialt < 27; ialt++) { if (alts->pixidx[ialt]) { /* Pixel lists representations. */ wcsp->flag = -1; wcsnpv(alts->pixnpv[ialt]); wcsnps(alts->pixnps[ialt]); if ((status = wcsini(1, (int)(alts->pixidx[ialt]), wcsp))) { wcsvfree(nwcs, wcs); break; } /* Record the alternate version code. */ if (ialt) { wcsp->alt[0] = 'A' + ialt - 1; } /* Record the pixel list column numbers. */ mask = (1 << ialt); for (icol = 1, ix = 0; icol <= ncol; icol++) { if (alts->pixlist[icol] & mask) { wcsp->colax[ix++] = icol; } } /* alts->pixidx[] indexes the array of wcsprm structs. */ alts->pixidx[ialt] = (*nwcs)++; wcsp++; } else { /* Signal that this column is not a pixel list axis for this "a". */ alts->pixidx[ialt] = -1; } } /* Restore the original values of NPVMAX and NPSMAX. */ wcsnpv(npvmax); wcsnps(npsmax); } return status; } /*---------------------------------------------------------------------------- * Return a pointer to the next wcsprm struct for a particular column number * and alternate. *---------------------------------------------------------------------------*/ struct wcsprm *wcsbth_idx( struct wcsprm *wcs, struct wcsbth_alts *alts, int keytype, int n, char a) { const char as[] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int iwcs; if (!wcs) return 0x0; iwcs = -1; for (; iwcs < 0 && alts->ialt < 27; alts->ialt++) { /* Note that a == 0 applies to every alternate, otherwise this loop simply determines the appropriate value of alts->ialt. */ if (a && a != as[alts->ialt]) continue; if (keytype & (IMGHEAD | BIMGARR)) { for (; iwcs < 0 && alts->icol <= alts->ncol; alts->icol++) { /* Image header keywords, n == 0, apply to all columns, otherwise this loop simply determines the appropriate value of alts->icol. */ if (n && n != alts->icol) continue; iwcs = alts->arridx[alts->icol][alts->ialt]; } /* Break out of the loop to stop alts->ialt from being incremented. */ if (iwcs >= 0) break; /* Start from scratch for the next alts->ialt. */ alts->icol = 0; } if (keytype & (IMGAUX | PIXLIST)) { iwcs = alts->pixidx[alts->ialt]; } } return (iwcs >= 0) ? (wcs + iwcs) : 0x0; } /*---------------------------------------------------------------------------- * Return the axis number associated with the specified column number in a * particular pixel list coordinate representation. *---------------------------------------------------------------------------*/ int wcsbth_colax( struct wcsprm *wcs, struct wcsbth_alts *alts, int n, char a) { int ix; struct wcsprm *wcsp; if (!wcs) return 0; wcsp = wcs; if (a != ' ') { wcsp += alts->pixidx[a-'A'+1]; } for (ix = 0; ix < wcsp->naxis; ix++) { if (wcsp->colax[ix] == n) { return ++ix; } } return 0; } /*---------------------------------------------------------------------------- * Interpret EPOCHa keywords. *---------------------------------------------------------------------------*/ int wcsbth_epoch(double *equinox, double epoch) { /* If EQUINOXa is currently undefined then set it from EPOCHa. */ if (undefined(*equinox)) { *equinox = epoch; } return 0; } /*---------------------------------------------------------------------------- * Interpret VSOURCEa keywords. *---------------------------------------------------------------------------*/ int wcsbth_vsource(double *zsource, double vsource) { double beta, c = 299792458.0; /* If ZSOURCEa is currently undefined then set it from VSOURCEa. */ if (undefined(*zsource)) { /* Convert relativistic Doppler velocity to redshift. */ beta = vsource/c; *zsource = (1.0 + beta)/sqrt(1.0 - beta*beta) - 1.0; } return 0; } /*---------------------------------------------------------------------------- * Tie up loose ends. *---------------------------------------------------------------------------*/ int wcsbth_final( struct wcsbth_alts *alts, int *nwcs, struct wcsprm **wcs) { int ialt, status; if (alts->arridx) free(alts->arridx); if (alts->npv) free(alts->npv); if (alts->nps) free(alts->nps); if (alts->pixlist) free(alts->pixlist); for (ialt = 0; ialt < *nwcs; ialt++) { /* Interpret -TAB header keywords. */ if ((status = wcstab(*wcs+ialt))) { wcsvfree(nwcs, wcs); return status; } } return 0; } astropy-1.1.1/cextern/wcslib/C/wcsfix.h0000644001134200020070000004076312644017723020730 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsfix.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the wcsfix routines * ------------------------------ * Routines in this suite identify and translate various forms of construct * known to occur in FITS headers that violate the FITS World Coordinate System * (WCS) standard described in * = "Representations of world coordinates in FITS", = Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I) = = "Representations of celestial coordinates in FITS", = Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (WCS Paper II) = = "Representations of spectral coordinates in FITS", = Greisen, E.W., Calabretta, M.R., Valdes, F.G., & Allen, S.L. = 2006, A&A, 446, 747 (WCS Paper III) * * Repairs effected by these routines range from the translation of * non-standard values for standard WCS keywords, to the repair of malformed * coordinate representations. * * Non-standard keyvalues: * ----------------------- * AIPS-convention celestial projection types, NCP and GLS, and spectral * types, 'FREQ-LSR', 'FELO-HEL', etc., set in CTYPEia are translated * on-the-fly by wcsset() but without modifying the relevant ctype[], pv[] or * specsys members of the wcsprm struct. That is, only the information * extracted from ctype[] is translated when wcsset() fills in wcsprm::cel * (celprm struct) or wcsprm::spc (spcprm struct). * * On the other hand, these routines do change the values of wcsprm::ctype[], * wcsprm::pv[], wcsprm::specsys and other wcsprm struct members as * appropriate to produce the same result as if the FITS header itself had * been translated. * * Auxiliary WCS header information not used directly by WCSLIB may also be * translated. For example, the older DATE-OBS date format (wcsprm::dateobs) * is recast to year-2000 standard form, and MJD-OBS (wcsprm::mjdobs) will be * deduced from it if not already set. * * Certain combinations of keyvalues that result in malformed coordinate * systems, as described in Sect. 7.3.4 of Paper I, may also be repaired. * These are handled by cylfix(). * * Non-standard keywords: * ---------------------- * The AIPS-convention CROTAn keywords are recognized as quasi-standard and * as such are accomodated by the wcsprm::crota[] and translated to * wcsprm::pc[][] by wcsset(). These are not dealt with here, nor are any * other non-standard keywords since these routines work only on the contents * of a wcsprm struct and do not deal with FITS headers per se. In * particular, they do not identify or translate CD00i00j, PC00i00j, PROJPn, * EPOCH, VELREF or VSOURCEa keywords; this may be done by the FITS WCS * header parser supplied with WCSLIB, refer to wcshdr.h. * * wcsfix() and wcsfixi() apply all of the corrections handled by the following * specific functions which may also be invoked separately: * * - cdfix(): Sets the diagonal element of the CDi_ja matrix to 1.0 if all * CDi_ja keywords associated with a particular axis are omitted. * * - datfix(): recast an older DATE-OBS date format in dateobs to year-2000 * standard form and derive mjdobs from it if not already set. * Alternatively, if mjdobs is set and dateobs isn't, then derive dateobs * from it. * * - unitfix(): translate some commonly used but non-standard unit strings in * the CUNITia keyvalues, e.g. 'DEG' -> 'deg'. * * - spcfix(): translate AIPS-convention spectral types, 'FREQ-LSR', * 'FELO-HEL', etc., in ctype[] as set from CTYPEia. * * - celfix(): translate AIPS-convention celestial projection types, NCP and * GLS, in ctype[] as set from CTYPEia. * * - cylfix(): fixes WCS keyvalues for malformed cylindrical projections that * suffer from the problem described in Sect. 7.3.4 of Paper I. * * * wcsfix() - Translate a non-standard WCS struct * ---------------------------------------------- * wcsfix() is identical to wcsfixi(), but lacks the info argument. * * * wcsfixi() - Translate a non-standard WCS struct * ----------------------------------------------- * wcsfix() applies all of the corrections handled separately by cdfix(), * datfix(), unitfix(), spcfix(), celfix(), and cylfix(). * * Given: * ctrl int Do potentially unsafe translations of non-standard * unit strings as described in the usage notes to * wcsutrn(). * * naxis const int [] * Image axis lengths. If this array pointer is set to * zero then cylfix() will not be invoked. * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters. * * Returned: * stat int [NWCSFIX] * Status returns from each of the functions. Use the * preprocessor macros NWCSFIX to dimension this vector * and CDFIX, DATFIX, UNITFIX, SPCFIX, CELFIX, and CYLFIX * to access its elements. A status value of -2 is set * for functions that were not invoked. * * info struct wcserr [NWCSFIX] * Status messages from each of the functions. Use the * preprocessor macros NWCSFIX to dimension this vector * and CDFIX, DATFIX, UNITFIX, SPCFIX, CELFIX, and CYLFIX * to access its elements. * * Function return value: * int Status return value: * 0: Success. * 1: One or more of the translation functions * returned an error. * * * cdfix() - Fix erroneously omitted CDi_ja keywords * ------------------------------------------------- * cdfix() sets the diagonal element of the CDi_ja matrix to unity if all * CDi_ja keywords associated with a given axis were omitted. According to * Paper I, if any CDi_ja keywords at all are given in a FITS header then those * not given default to zero. This results in a singular matrix with an * intersecting row and column of zeros. * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters. * * Function return value: * int Status return value: * -1: No change required (not an error). * 0: Success. * 1: Null wcsprm pointer passed. * * * datfix() - Translate DATE-OBS and derive MJD-OBS or vice versa * -------------------------------------------------------------- * datfix() translates the old DATE-OBS date format set in wcsprm::dateobs to * year-2000 standard form (yyyy-mm-ddThh:mm:ss) and derives MJD-OBS from it if * not already set. Alternatively, if wcsprm::mjdobs is set and * wcsprm::dateobs isn't, then datfix() derives wcsprm::dateobs from it. If * both are set but disagree by more than half a day then status 5 is returned. * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters. wcsprm::dateobs * and/or wcsprm::mjdobs may be changed. * * Function return value: * int Status return value: * -1: No change required (not an error). * 0: Success. * 1: Null wcsprm pointer passed. * 5: Invalid parameter value. * * For returns > 1, a detailed error message is set in * wcsprm::err if enabled, see wcserr_enable(). * * Notes: * The MJD algorithms used by datfix() are from D.A. Hatcher, 1984, QJRAS, * 25, 53-55, as modified by P.T. Wallace for use in SLALIB subroutines CLDJ * and DJCL. * * * unitfix() - Correct aberrant CUNITia keyvalues * ---------------------------------------------- * unitfix() applies wcsutrn() to translate non-standard CUNITia keyvalues, * e.g. 'DEG' -> 'deg', also stripping off unnecessary whitespace. * * Given: * ctrl int Do potentially unsafe translations described in the * usage notes to wcsutrn(). * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters. * * Function return value: * int Status return value: * -1: No change required (not an error). * 0: Success (an alias was applied). * 1: Null wcsprm pointer passed. * * When units are translated (i.e. status 0), status -2 * is set in the wcserr struct to allow an informative * message to be returned. * * * spcfix() - Translate AIPS-convention spectral types * --------------------------------------------------- * spcfix() translates AIPS-convention spectral coordinate types, * '{FREQ,FELO,VELO}-{LSR,HEL,OBS}' (e.g. 'FREQ-OBS', 'FELO-HEL', 'VELO-LSR') * set in wcsprm::ctype[], subject to VELREF set in wcsprm::velref. * * Note that if wcs::specsys is already set then it will not be overridden. * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters. wcsprm::ctype[] * and/or wcsprm::specsys may be changed. * * Function return value: * int Status return value: * -1: No change required (not an error). * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * 3: Linear transformation matrix is singular. * 4: Inconsistent or unrecognized coordinate axis * types. * 5: Invalid parameter value. * 6: Invalid coordinate transformation parameters. * 7: Ill-conditioned coordinate transformation * parameters. * * For returns > 1, a detailed error message is set in * wcsprm::err if enabled, see wcserr_enable(). * * * celfix() - Translate AIPS-convention celestial projection types * --------------------------------------------------------------- * celfix() translates AIPS-convention celestial projection types, NCP and * GLS, set in the ctype[] member of the wcsprm struct. * * Two additional pv[] keyvalues are created when translating NCP, and three * are created when translating GLS with non-zero reference point. If the pv[] * array was initially allocated by wcsini() then the array will be expanded if * necessary. Otherwise, error 2 will be returned if sufficient empty slots * are not already available for use. * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters. wcsprm::ctype[] * and/or wcsprm::pv[] may be changed. * * Function return value: * int Status return value: * -1: No change required (not an error). * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * 3: Linear transformation matrix is singular. * 4: Inconsistent or unrecognized coordinate axis * types. * 5: Invalid parameter value. * 6: Invalid coordinate transformation parameters. * 7: Ill-conditioned coordinate transformation * parameters. * * For returns > 1, a detailed error message is set in * wcsprm::err if enabled, see wcserr_enable(). * * * cylfix() - Fix malformed cylindrical projections * ------------------------------------------------ * cylfix() fixes WCS keyvalues for malformed cylindrical projections that * suffer from the problem described in Sect. 7.3.4 of Paper I. * * Given: * naxis const int [] * Image axis lengths. * * Given and returned: * wcs struct wcsprm* * Coordinate transformation parameters. * * Function return value: * int Status return value: * -1: No change required (not an error). * 0: Success. * 1: Null wcsprm pointer passed. * 2: Memory allocation failed. * 3: Linear transformation matrix is singular. * 4: Inconsistent or unrecognized coordinate axis * types. * 5: Invalid parameter value. * 6: Invalid coordinate transformation parameters. * 7: Ill-conditioned coordinate transformation * parameters. * 8: All of the corner pixel coordinates are invalid. * 9: Could not determine reference pixel coordinate. * 10: Could not determine reference pixel value. * * For returns > 1, a detailed error message is set in * wcsprm::err if enabled, see wcserr_enable(). * * * Global variable: const char *wcsfix_errmsg[] - Status return messages * --------------------------------------------------------------------- * Error messages to match the status value returned from each function. * *===========================================================================*/ #ifndef WCSLIB_WCSFIX #define WCSLIB_WCSFIX #include "wcs.h" #include "wcserr.h" #ifdef __cplusplus extern "C" { #endif #define CDFIX 0 #define DATFIX 1 #define UNITFIX 2 #define SPCFIX 3 #define CELFIX 4 #define CYLFIX 5 #define NWCSFIX 6 extern const char *wcsfix_errmsg[]; #define cylfix_errmsg wcsfix_errmsg enum wcsfix_errmsg_enum { FIXERR_DATE_FIX = -4, /* The date formatting has been fixed up. */ FIXERR_SPC_UPDATE = -3, /* Spectral axis type modified. */ FIXERR_UNITS_ALIAS = -2, /* Units alias translation. */ FIXERR_NO_CHANGE = -1, /* No change. */ FIXERR_SUCCESS = 0, /* Success. */ FIXERR_NULL_POINTER = 1, /* Null wcsprm pointer passed. */ FIXERR_MEMORY = 2, /* Memory allocation failed. */ FIXERR_SINGULAR_MTX = 3, /* Linear transformation matrix is singular. */ FIXERR_BAD_CTYPE = 4, /* Inconsistent or unrecognized coordinate axis types. */ FIXERR_BAD_PARAM = 5, /* Invalid parameter value. */ FIXERR_BAD_COORD_TRANS = 6, /* Invalid coordinate transformation parameters. */ FIXERR_ILL_COORD_TRANS = 7, /* Ill-conditioned coordinate transformation parameters. */ FIXERR_BAD_CORNER_PIX = 8, /* All of the corner pixel coordinates are invalid. */ FIXERR_NO_REF_PIX_COORD = 9, /* Could not determine reference pixel coordinate. */ FIXERR_NO_REF_PIX_VAL = 10 /* Could not determine reference pixel value. */ }; int wcsfix(int ctrl, const int naxis[], struct wcsprm *wcs, int stat[]); int wcsfixi(int ctrl, const int naxis[], struct wcsprm *wcs, int stat[], struct wcserr info[]); int cdfix(struct wcsprm *wcs); int datfix(struct wcsprm *wcs); int unitfix(int ctrl, struct wcsprm *wcs); int spcfix(struct wcsprm *wcs); int celfix(struct wcsprm *wcs); int cylfix(const int naxis[], struct wcsprm *wcs); #ifdef __cplusplus } #endif #endif /* WCSLIB_WCSFIX */ astropy-1.1.1/cextern/wcslib/C/wcstrig.c0000644001134200020070000001021712644017723021071 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcstrig.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include "wcsmath.h" #include "wcstrig.h" double cosd(angle) double angle; { int i; if (fmod(angle,90.0) == 0.0) { i = abs((int)floor(angle/90.0 + 0.5))%4; switch (i) { case 0: return 1.0; case 1: return 0.0; case 2: return -1.0; case 3: return 0.0; } } return cos(angle*D2R); } /*--------------------------------------------------------------------------*/ double sind(angle) double angle; { int i; if (fmod(angle,90.0) == 0.0) { i = abs((int)floor(angle/90.0 - 0.5))%4; switch (i) { case 0: return 1.0; case 1: return 0.0; case 2: return -1.0; case 3: return 0.0; } } return sin(angle*D2R); } /*--------------------------------------------------------------------------*/ void sincosd(double angle, double *s, double *c) { int i; if (fmod(angle,90.0) == 0.0) { i = abs((int)floor(angle/90.0 + 0.5))%4; switch (i) { case 0: *s = 0.0; *c = 1.0; return; case 1: *s = (angle > 0.0) ? 1.0 : -1.0; *c = 0.0; return; case 2: *s = 0.0; *c = -1.0; return; case 3: *s = (angle > 0.0) ? -1.0 : 1.0; *c = 0.0; return; } } #ifdef HAVE_SINCOS sincos(angle*D2R, s, c); #else *s = sin(angle*D2R); *c = cos(angle*D2R); #endif return; } /*--------------------------------------------------------------------------*/ double tand(angle) double angle; { double resid; resid = fmod(angle,360.0); if (resid == 0.0 || fabs(resid) == 180.0) { return 0.0; } else if (resid == 45.0 || resid == 225.0) { return 1.0; } else if (resid == -135.0 || resid == -315.0) { return -1.0; } return tan(angle*D2R); } /*--------------------------------------------------------------------------*/ double acosd(v) double v; { if (v >= 1.0) { if (v-1.0 < WCSTRIG_TOL) return 0.0; } else if (v == 0.0) { return 90.0; } else if (v <= -1.0) { if (v+1.0 > -WCSTRIG_TOL) return 180.0; } return acos(v)*R2D; } /*--------------------------------------------------------------------------*/ double asind(v) double v; { if (v <= -1.0) { if (v+1.0 > -WCSTRIG_TOL) return -90.0; } else if (v == 0.0) { return 0.0; } else if (v >= 1.0) { if (v-1.0 < WCSTRIG_TOL) return 90.0; } return asin(v)*R2D; } /*--------------------------------------------------------------------------*/ double atand(v) double v; { if (v == -1.0) { return -45.0; } else if (v == 0.0) { return 0.0; } else if (v == 1.0) { return 45.0; } return atan(v)*R2D; } /*--------------------------------------------------------------------------*/ double atan2d(y, x) double x, y; { if (y == 0.0) { if (x >= 0.0) { return 0.0; } else if (x < 0.0) { return 180.0; } } else if (x == 0.0) { if (y > 0.0) { return 90.0; } else if (y < 0.0) { return -90.0; } } return atan2(y,x)*R2D; } astropy-1.1.1/cextern/wcslib/C/tab.h0000644001134200020070000006176012644017723020173 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: tab.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the tab routines * --------------------------- * Routines in this suite implement the part of the FITS World Coordinate * System (WCS) standard that deals with tabular coordinates, i.e. coordinates * that are defined via a lookup table, as described in * = "Representations of world coordinates in FITS", = Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I) = = "Representations of spectral coordinates in FITS", = Greisen, E.W., Calabretta, M.R., Valdes, F.G., & Allen, S.L. = 2006, A&A, 446, 747 (WCS Paper III) * * These routines define methods to be used for computing tabular world * coordinates from intermediate world coordinates (a linear transformation * of image pixel coordinates), and vice versa. They are based on the tabprm * struct which contains all information needed for the computations. The * struct contains some members that must be set by the user, and others that * are maintained by these routines, somewhat like a C++ class but with no * encapsulation. * * tabini(), tabmem(), tabcpy(), and tabfree() are provided to manage the * tabprm struct, and another, tabprt(), to print its contents. * * tabperr() prints the error message(s) (if any) stored in a tabprm struct. * * A setup routine, tabset(), computes intermediate values in the tabprm struct * from parameters in it that were supplied by the user. The struct always * needs to be set up by tabset() but it need not be called explicitly - refer * to the explanation of tabprm::flag. * * tabx2s() and tabs2x() implement the WCS tabular coordinate transformations. * * Accuracy: * --------- * No warranty is given for the accuracy of these routines (refer to the * copyright notice); intending users must satisfy for themselves their * adequacy for the intended purpose. However, closure effectively to within * double precision rounding error was demonstrated by test routine ttab.c * which accompanies this software. * * * tabini() - Default constructor for the tabprm struct * ---------------------------------------------------- * tabini() allocates memory for arrays in a tabprm struct and sets all members * of the struct to default values. * * PLEASE NOTE: every tabprm struct should be initialized by tabini(), possibly * repeatedly. On the first invokation, and only the first invokation, the * flag member of the tabprm struct must be set to -1 to initialize memory * management, regardless of whether tabini() will actually be used to allocate * memory. * * Given: * alloc int If true, allocate memory unconditionally for arrays in * the tabprm struct. * * If false, it is assumed that pointers to these arrays * have been set by the user except if they are null * pointers in which case memory will be allocated for * them regardless. (In other words, setting alloc true * saves having to initalize these pointers to zero.) * * M int The number of tabular coordinate axes. * * K const int[] * Vector of length M whose elements (K_1, K_2,... K_M) * record the lengths of the axes of the coordinate array * and of each indexing vector. M and K[] are used to * determine the length of the various tabprm arrays and * therefore the amount of memory to allocate for them. * Their values are copied into the tabprm struct. * * It is permissible to set K (i.e. the address of the * array) to zero which has the same effect as setting * each element of K[] to zero. In this case no memory * will be allocated for the index vectors or coordinate * array in the tabprm struct. These together with the * K vector must be set separately before calling * tabset(). * * Given and returned: * tab struct tabprm* * Tabular transformation parameters. Note that, in * order to initialize memory management tabprm::flag * should be set to -1 when tab is initialized for the * first time (memory leaks may result if it had already * been initialized). * * Function return value: * int Status return value: * 0: Success. * 1: Null tabprm pointer passed. * 2: Memory allocation failed. * 3: Invalid tabular parameters. * * For returns > 1, a detailed error message is set in * tabprm::err if enabled, see wcserr_enable(). * * * tabmem() - Acquire tabular memory * --------------------------------- * tabmem() takes control of memory allocated by the user for arrays in the * tabprm struct. * * Given and returned: * tab struct tabprm* * Tabular transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null tabprm pointer passed. * 2: Memory allocation failed. * * For returns > 1, a detailed error message is set in * tabprm::err if enabled, see wcserr_enable(). * * * tabcpy() - Copy routine for the tabprm struct * --------------------------------------------- * tabcpy() does a deep copy of one tabprm struct to another, using tabini() to * allocate memory for its arrays if required. Only the "information to be * provided" part of the struct is copied; a call to tabset() is required to * set up the remainder. * * Given: * alloc int If true, allocate memory unconditionally for arrays in * the tabprm struct. * * If false, it is assumed that pointers to these arrays * have been set by the user except if they are null * pointers in which case memory will be allocated for * them regardless. (In other words, setting alloc true * saves having to initalize these pointers to zero.) * * tabsrc const struct tabprm* * Struct to copy from. * * Given and returned: * tabdst struct tabprm* * Struct to copy to. tabprm::flag should be set to -1 * if tabdst was not previously initialized (memory leaks * may result if it was previously initialized). * * Function return value: * int Status return value: * 0: Success. * 1: Null tabprm pointer passed. * 2: Memory allocation failed. * * For returns > 1, a detailed error message is set in * tabprm::err (associated with tabdst) if enabled, see * wcserr_enable(). * * * tabcmp() - Compare two tabprm structs for equality * -------------------------------------------------- * tabcmp() compares two tabprm structs for equality. * * Given: * cmp int A bit field controlling the strictness of the * comparison. At present, this value must always be 0, * indicating a strict comparison. In the future, other * options may be added. * * tol double Tolerance for comparison of floating-point values. * For example, for tol == 1e-6, all floating-point * values in the structs must be equal to the first 6 * decimal places. A value of 0 implies exact equality. * * tab1 const struct tabprm* * The first tabprm struct to compare. * * tab2 const struct tabprm* * The second tabprm struct to compare. * * Returned: * equal int* Non-zero when the given structs are equal. * * Function return value: * int Status return value: * 0: Success. * 1: Null pointer passed. * * * tabfree() - Destructor for the tabprm struct * -------------------------------------------- * tabfree() frees memory allocated for the tabprm arrays by tabini(). * tabini() records the memory it allocates and tabfree() will only attempt to * free this. * * PLEASE NOTE: tabfree() must not be invoked on a tabprm struct that was not * initialized by tabini(). * * Returned: * tab struct tabprm* * Coordinate transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null tabprm pointer passed. * * * tabprt() - Print routine for the tabprm struct * ---------------------------------------------- * tabprt() prints the contents of a tabprm struct using wcsprintf(). Mainly * intended for diagnostic purposes. * * Given: * tab const struct tabprm* * Tabular transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null tabprm pointer passed. * * * tabperr() - Print error messages from a tabprm struct * ----------------------------------------------------- * tabperr() prints the error message(s) (if any) stored in a tabprm struct. * If there are no errors then nothing is printed. It uses wcserr_prt(), q.v. * * Given: * tab const struct tabprm* * Tabular transformation parameters. * * prefix const char * * If non-NULL, each output line will be prefixed with * this string. * * Function return value: * int Status return value: * 0: Success. * 1: Null tabprm pointer passed. * * * tabset() - Setup routine for the tabprm struct * ----------------------------------------------- * tabset() allocates memory for work arrays in the tabprm struct and sets up * the struct according to information supplied within it. * * Note that this routine need not be called directly; it will be invoked by * tabx2s() and tabs2x() if tabprm::flag is anything other than a predefined * magic value. * * Given and returned: * tab struct tabprm* * Tabular transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null tabprm pointer passed. * 3: Invalid tabular parameters. * * For returns > 1, a detailed error message is set in * tabprm::err if enabled, see wcserr_enable(). * * * tabx2s() - Pixel-to-world transformation * ---------------------------------------- * tabx2s() transforms intermediate world coordinates to world coordinates * using coordinate lookup. * * Given and returned: * tab struct tabprm* * Tabular transformation parameters. * * Given: * ncoord, * nelem int The number of coordinates, each of vector length * nelem. * * x const double[ncoord][nelem] * Array of intermediate world coordinates, SI units. * * Returned: * world double[ncoord][nelem] * Array of world coordinates, in SI units. * * stat int[ncoord] * Status return value status for each coordinate: * 0: Success. * 1: Invalid intermediate world coordinate. * * Function return value: * int Status return value: * 0: Success. * 1: Null tabprm pointer passed. * 3: Invalid tabular parameters. * 4: One or more of the x coordinates were invalid, * as indicated by the stat vector. * * For returns > 1, a detailed error message is set in * tabprm::err if enabled, see wcserr_enable(). * * * tabs2x() - World-to-pixel transformation * ---------------------------------------- * tabs2x() transforms world coordinates to intermediate world coordinates. * * Given and returned: * tab struct tabprm* * Tabular transformation parameters. * * Given: * ncoord, * nelem int The number of coordinates, each of vector length * nelem. * world const double[ncoord][nelem] * Array of world coordinates, in SI units. * * Returned: * x double[ncoord][nelem] * Array of intermediate world coordinates, SI units. * stat int[ncoord] * Status return value status for each vector element: * 0: Success. * 1: Invalid world coordinate. * * Function return value: * int Status return value: * 0: Success. * 1: Null tabprm pointer passed. * 3: Invalid tabular parameters. * 5: One or more of the world coordinates were * invalid, as indicated by the stat vector. * * For returns > 1, a detailed error message is set in * tabprm::err if enabled, see wcserr_enable(). * * * tabprm struct - Tabular transformation parameters * ------------------------------------------------- * The tabprm struct contains information required to transform tabular * coordinates. It consists of certain members that must be set by the user * ("given") and others that are set by the WCSLIB routines ("returned"). Some * of the latter are supplied for informational purposes while others are for * internal use only. * * int flag * (Given and returned) This flag must be set to zero whenever any of the * following tabprm structure members are set or changed: * * - tabprm::M (q.v., not normally set by the user), * - tabprm::K (q.v., not normally set by the user), * - tabprm::map, * - tabprm::crval, * - tabprm::index, * - tabprm::coord. * * This signals the initialization routine, tabset(), to recompute the * returned members of the tabprm struct. tabset() will reset flag to * indicate that this has been done. * * PLEASE NOTE: flag should be set to -1 when tabini() is called for the * first time for a particular tabprm struct in order to initialize memory * management. It must ONLY be used on the first initialization otherwise * memory leaks may result. * * int M * (Given or returned) Number of tabular coordinate axes. * * If tabini() is used to initialize the tabprm struct (as would normally * be the case) then it will set M from the value passed to it as a * function argument. The user should not subsequently modify it. * * int *K * (Given or returned) Pointer to the first element of a vector of length * tabprm::M whose elements (K_1, K_2,... K_M) record the lengths of the * axes of the coordinate array and of each indexing vector. * * If tabini() is used to initialize the tabprm struct (as would normally * be the case) then it will set K from the array passed to it as a * function argument. The user should not subsequently modify it. * * int *map * (Given) Pointer to the first element of a vector of length tabprm::M * that defines the association between axis m in the M-dimensional * coordinate array (1 <= m <= M) and the indices of the intermediate world * coordinate and world coordinate arrays, x[] and world[], in the argument * lists for tabx2s() and tabs2x(). * * When x[] and world[] contain the full complement of coordinate elements * in image-order, as will usually be the case, then map[m-1] == i-1 for * axis i in the N-dimensional image (1 <= i <= N). In terms of the FITS * keywords * * map[PVi_3a - 1] == i - 1. * * However, a different association may result if x[], for example, only * contains a (relevant) subset of intermediate world coordinate elements. * For example, if M == 1 for an image with N > 1, it is possible to fill * x[] with the relevant coordinate element with nelem set to 1. In this * case map[0] = 0 regardless of the value of i. * * double *crval * (Given) Pointer to the first element of a vector of length tabprm::M * whose elements contain the index value for the reference pixel for each * of the tabular coordinate axes. * * double **index * (Given) Pointer to the first element of a vector of length tabprm::M of * pointers to vectors of lengths (K_1, K_2,... K_M) of 0-relative indexes * (see tabprm::K). * * The address of any or all of these index vectors may be set to zero, * i.e. * = index[m] == 0; * * this is interpreted as default indexing, i.e. * = index[m][k] = k; * * double *coord * (Given) Pointer to the first element of the tabular coordinate array, * treated as though it were defined as * = double coord[K_M]...[K_2][K_1][M]; * * (see tabprm::K) i.e. with the M dimension varying fastest so that the * M elements of a coordinate vector are stored contiguously in memory. * * int nc * (Returned) Total number of coordinate vectors in the coordinate array * being the product K_1 * K_2 * ... * K_M (see tabprm::K). * * int padding * (An unused variable inserted for alignment purposes only.) * * int *sense * (Returned) Pointer to the first element of a vector of length tabprm::M * whose elements indicate whether the corresponding indexing vector is * monotonic increasing (+1), or decreasing (-1). * * int *p0 * (Returned) Pointer to the first element of a vector of length tabprm::M * of interpolated indices into the coordinate array such that Upsilon_m, * as defined in Paper III, is equal to (p0[m] + 1) + tabprm::delta[m]. * * double *delta * (Returned) Pointer to the first element of a vector of length tabprm::M * of interpolated indices into the coordinate array such that Upsilon_m, * as defined in Paper III, is equal to (tabprm::p0[m] + 1) + delta[m]. * * double *extrema * (Returned) Pointer to the first element of an array that records the * minimum and maximum value of each element of the coordinate vector in * each row of the coordinate array, treated as though it were defined as * = double extrema[K_M]...[K_2][2][M] * * (see tabprm::K). The minimum is recorded in the first element of the * compressed K_1 dimension, then the maximum. This array is used by the * inverse table lookup function, tabs2x(), to speed up table searches. * * struct wcserr *err * (Returned) If enabled, when an error status is returned, this struct * contains detailed information about the error, see wcserr_enable(). * * int m_flag * (For internal use only.) * int m_M * (For internal use only.) * int m_N * (For internal use only.) * int set_M * (For internal use only.) * int m_K * (For internal use only.) * int m_map * (For internal use only.) * int m_crval * (For internal use only.) * int m_index * (For internal use only.) * int m_indxs * (For internal use only.) * int m_coord * (For internal use only.) * * * Global variable: const char *tab_errmsg[] - Status return messages * ------------------------------------------------------------------ * Error messages to match the status value returned from each function. * *===========================================================================*/ #ifndef WCSLIB_TAB #define WCSLIB_TAB #ifdef __cplusplus extern "C" { #endif extern const char *tab_errmsg[]; enum tab_errmsg_enum { TABERR_SUCCESS = 0, /* Success. */ TABERR_NULL_POINTER = 1, /* Null tabprm pointer passed. */ TABERR_MEMORY = 2, /* Memory allocation failed. */ TABERR_BAD_PARAMS = 3, /* Invalid tabular parameters. */ TABERR_BAD_X = 4, /* One or more of the x coordinates were invalid. */ TABERR_BAD_WORLD = 5 /* One or more of the world coordinates were invalid. */ }; struct tabprm { /* Initialization flag (see the prologue above). */ /*------------------------------------------------------------------------*/ int flag; /* Set to zero to force initialization. */ /* Parameters to be provided (see the prologue above). */ /*------------------------------------------------------------------------*/ int M; /* Number of tabular coordinate axes. */ int *K; /* Vector of length M whose elements */ /* (K_1, K_2,... K_M) record the lengths of */ /* the axes of the coordinate array and of */ /* each indexing vector. */ int *map; /* Vector of length M usually such that */ /* map[m-1] == i-1 for coordinate array */ /* axis m and image axis i (see above). */ double *crval; /* Vector of length M containing the index */ /* value for the reference pixel for each */ /* of the tabular coordinate axes. */ double **index; /* Vector of pointers to M indexing vectors */ /* of lengths (K_1, K_2,... K_M). */ double *coord; /* (1+M)-dimensional tabular coordinate */ /* array (see above). */ /* Information derived from the parameters supplied. */ /*------------------------------------------------------------------------*/ int nc; /* Number of coordinate vectors (of length */ /* M) in the coordinate array. */ int padding; /* (Dummy inserted for alignment purposes.) */ int *sense; /* Vector of M flags that indicate whether */ /* the Mth indexing vector is monotonic */ /* increasing, or else decreasing. */ int *p0; /* Vector of M indices. */ double *delta; /* Vector of M increments. */ double *extrema; /* (1+M)-dimensional array of coordinate */ /* extrema. */ /* Error handling */ /*------------------------------------------------------------------------*/ struct wcserr *err; /* Private - the remainder are for memory management. */ /*------------------------------------------------------------------------*/ int m_flag, m_M, m_N; int set_M; int *m_K, *m_map; double *m_crval, **m_index, **m_indxs, *m_coord; }; /* Size of the tabprm struct in int units, used by the Fortran wrappers. */ #define TABLEN (sizeof(struct tabprm)/sizeof(int)) int tabini(int alloc, int M, const int K[], struct tabprm *tab); int tabmem(struct tabprm *tab); int tabcpy(int alloc, const struct tabprm *tabsrc, struct tabprm *tabdst); int tabcmp(int cmp, double tol, const struct tabprm *tab1, const struct tabprm *tab2, int *equal); int tabfree(struct tabprm *tab); int tabprt(const struct tabprm *tab); int tabperr(const struct tabprm *tab, const char *prefix); int tabset(struct tabprm *tab); int tabx2s(struct tabprm *tab, int ncoord, int nelem, const double x[], double world[], int stat[]); int tabs2x(struct tabprm *tab, int ncoord, int nelem, const double world[], double x[], int stat[]); /* Deprecated. */ #define tabini_errmsg tab_errmsg #define tabcpy_errmsg tab_errmsg #define tabfree_errmsg tab_errmsg #define tabprt_errmsg tab_errmsg #define tabset_errmsg tab_errmsg #define tabx2s_errmsg tab_errmsg #define tabs2x_errmsg tab_errmsg #ifdef __cplusplus } #endif #endif /* WCSLIB_TAB */ astropy-1.1.1/cextern/wcslib/C/lin.c0000644001134200020070000007334212644017723020201 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: lin.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include #include "wcserr.h" #include "wcsprintf.h" #include "lin.h" #include "dis.h" const int LINSET = 137; /* Map status return value to message. */ const char *lin_errmsg[] = { "Success", "Null linprm pointer passed", "Memory allocation failed", "PCi_ja matrix is singular", "Failed to initialize distortion functions", "Distort error", "De-distort error"}; /* Map error returns for lower-level routines. */ const int lin_diserr[] = { LINERR_SUCCESS, /* 0: DISERR_SUCCESS */ LINERR_NULL_POINTER, /* 1: DISERR_NULL_POINTER */ LINERR_MEMORY, /* 2: DISERR_MEMORY */ LINERR_DISTORT_INIT, /* 3: DISERR_BAD_PARAM */ LINERR_DISTORT, /* 4: DISERR_DISTORT */ LINERR_DEDISTORT /* 5: DISERR_DEDISTORT */ }; /* Convenience macro for invoking wcserr_set(). */ #define LIN_ERRMSG(status) WCSERR_SET(status), lin_errmsg[status] /*--------------------------------------------------------------------------*/ int linini(int alloc, int naxis, struct linprm *lin) { static const char *function = "linini"; int i, j; double *pc; struct wcserr **err; if (lin == 0x0) return LINERR_NULL_POINTER; /* Initialize error message handling. */ err = &(lin->err); if (lin->flag != -1) { if (lin->err) free(lin->err); } lin->err = 0x0; /* Initialize memory management. */ if (lin->flag == -1 || lin->m_flag != LINSET) { if (lin->flag == -1) { lin->dispre = 0x0; lin->disseq = 0x0; lin->tmpcrd = 0x0; } lin->m_flag = 0; lin->m_naxis = 0; lin->m_crpix = 0x0; lin->m_pc = 0x0; lin->m_cdelt = 0x0; lin->m_dispre = 0x0; lin->m_disseq = 0x0; } if (naxis < 0) { return wcserr_set(WCSERR_SET(LINERR_MEMORY), "naxis must not be negative (got %d)", naxis); } /* Allocate memory for arrays if required. */ if (alloc || lin->crpix == 0x0 || lin->pc == 0x0 || lin->cdelt == 0x0) { /* Was sufficient allocated previously? */ if (lin->m_flag == LINSET && lin->m_naxis < naxis) { /* No, free it. */ linfree(lin); } if (alloc || lin->crpix == 0x0) { if (lin->m_crpix) { /* In case the caller fiddled with it. */ lin->crpix = lin->m_crpix; } else { if ((lin->crpix = calloc(naxis, sizeof(double))) == 0x0) { return wcserr_set(LIN_ERRMSG(LINERR_MEMORY)); } lin->m_flag = LINSET; lin->m_naxis = naxis; lin->m_crpix = lin->crpix; } } if (alloc || lin->pc == 0x0) { if (lin->m_pc) { /* In case the caller fiddled with it. */ lin->pc = lin->m_pc; } else { if ((lin->pc = calloc(naxis*naxis, sizeof(double))) == 0x0) { linfree(lin); return wcserr_set(LIN_ERRMSG(LINERR_MEMORY)); } lin->m_flag = LINSET; lin->m_naxis = naxis; lin->m_pc = lin->pc; } } if (alloc || lin->cdelt == 0x0) { if (lin->m_cdelt) { /* In case the caller fiddled with it. */ lin->cdelt = lin->m_cdelt; } else { if ((lin->cdelt = calloc(naxis, sizeof(double))) == 0x0) { linfree(lin); return wcserr_set(LIN_ERRMSG(LINERR_MEMORY)); } lin->m_flag = LINSET; lin->m_naxis = naxis; lin->m_cdelt = lin->cdelt; } } } /* Reinitialize disprm structs if we are managing them. */ if (lin->m_dispre) { disini(1, naxis, lin->dispre); } if (lin->m_disseq) { disini(1, naxis, lin->disseq); } /* Free memory allocated by linset(). */ if (lin->flag == LINSET) { if (lin->piximg) free(lin->piximg); if (lin->imgpix) free(lin->imgpix); if (lin->tmpcrd) free(lin->tmpcrd); } lin->piximg = 0x0; lin->imgpix = 0x0; lin->i_naxis = 0; lin->unity = 0; lin->affine = 0; lin->simple = 0; lin->tmpcrd = 0x0; lin->flag = 0; lin->naxis = naxis; /* CRPIXja defaults to 0.0. */ for (j = 0; j < naxis; j++) { lin->crpix[j] = 0.0; } /* PCi_ja defaults to the unit matrix. */ pc = lin->pc; for (i = 0; i < naxis; i++) { for (j = 0; j < naxis; j++) { if (j == i) { *pc = 1.0; } else { *pc = 0.0; } pc++; } } /* CDELTia defaults to 1.0. */ for (i = 0; i < naxis; i++) { lin->cdelt[i] = 1.0; } return 0; } /*--------------------------------------------------------------------------*/ int lindis(int sequence, struct linprm *lin, struct disprm *dis) { static const char *function = "lindis"; int status; struct wcserr **err; if (lin == 0x0) return LINERR_NULL_POINTER; err = &(lin->err); if (sequence == 1) { if (lin->m_dispre) free(lin->m_dispre); lin->dispre = dis; lin->m_flag = LINSET; lin->m_dispre = dis; } else if (sequence == 2) { if (lin->m_disseq) free(lin->m_disseq); lin->disseq = dis; lin->m_flag = LINSET; lin->m_disseq = dis; } else { return wcserr_set(WCSERR_SET(LINERR_DISTORT_INIT), "Invalid sequence (%d)", sequence); } if (dis) { if ((status = disini(1, lin->naxis, dis))) { return wcserr_set(LIN_ERRMSG(lin_diserr[status])); } } return 0; } /*--------------------------------------------------------------------------*/ int lincpy(int alloc, const struct linprm *linsrc, struct linprm *lindst) { static const char *function = "lincpy"; int i, j, naxis, status; const double *srcp; double *dstp; struct wcserr **err; if (linsrc == 0x0) return LINERR_NULL_POINTER; if (lindst == 0x0) return LINERR_NULL_POINTER; err = &(lindst->err); naxis = linsrc->naxis; if (naxis < 1) { return wcserr_set(WCSERR_SET(LINERR_MEMORY), "naxis must be positive (got %d)", naxis); } if ((status = linini(alloc, naxis, lindst))) { return status; } srcp = linsrc->crpix; dstp = lindst->crpix; for (j = 0; j < naxis; j++) { *(dstp++) = *(srcp++); } srcp = linsrc->pc; dstp = lindst->pc; for (i = 0; i < naxis; i++) { for (j = 0; j < naxis; j++) { *(dstp++) = *(srcp++); } } srcp = linsrc->cdelt; dstp = lindst->cdelt; for (i = 0; i < naxis; i++) { *(dstp++) = *(srcp++); } if (linsrc->dispre) { if (!lindst->dispre) { if ((lindst->dispre = calloc(1, sizeof(struct disprm))) == 0x0) { return wcserr_set(LIN_ERRMSG(LINERR_MEMORY)); } lindst->m_dispre = lindst->dispre; } if ((status = discpy(alloc, linsrc->dispre, lindst->dispre))) { status = wcserr_set(LIN_ERRMSG(lin_diserr[status])); goto cleanup; } } if (linsrc->disseq) { if (!lindst->disseq) { if ((lindst->disseq = calloc(1, sizeof(struct disprm))) == 0x0) { return wcserr_set(LIN_ERRMSG(LINERR_MEMORY)); } lindst->m_disseq = lindst->disseq; } if ((status = discpy(alloc, linsrc->disseq, lindst->disseq))) { status = wcserr_set(LIN_ERRMSG(lin_diserr[status])); goto cleanup; } } cleanup: if (status && (lindst->m_dispre || lindst->m_disseq)) { if (lindst->dispre) free(lindst->dispre); if (lindst->disseq) free(lindst->disseq); lindst->dispre = 0x0; lindst->disseq = 0x0; } return status; } /*--------------------------------------------------------------------------*/ int linfree(struct linprm *lin) { if (lin == 0x0) return LINERR_NULL_POINTER; if (lin->flag != -1) { /* Optionally allocated by linini() for given parameters. */ if (lin->m_flag == LINSET) { if (lin->crpix == lin->m_crpix) lin->crpix = 0x0; if (lin->pc == lin->m_pc) lin->pc = 0x0; if (lin->cdelt == lin->m_cdelt) lin->cdelt = 0x0; if (lin->dispre == lin->m_dispre) lin->dispre = 0x0; if (lin->disseq == lin->m_disseq) lin->disseq = 0x0; if (lin->m_crpix) free(lin->m_crpix); if (lin->m_pc) free(lin->m_pc); if (lin->m_cdelt) free(lin->m_cdelt); if (lin->m_dispre) { disfree(lin->m_dispre); free(lin->m_dispre); } if (lin->m_disseq) { disfree(lin->m_disseq); free(lin->m_disseq); } } /* Allocated unconditionally by linset(). */ if (lin->piximg) free(lin->piximg); if (lin->imgpix) free(lin->imgpix); if (lin->tmpcrd) free(lin->tmpcrd); if (lin->err) free(lin->err); } lin->m_flag = 0; lin->m_naxis = 0; lin->m_crpix = 0x0; lin->m_pc = 0x0; lin->m_cdelt = 0x0; lin->m_dispre = 0x0; lin->m_disseq = 0x0; lin->piximg = 0x0; lin->imgpix = 0x0; lin->i_naxis = 0; lin->tmpcrd = 0x0; lin->err = 0x0; lin->flag = 0; return 0; } /*--------------------------------------------------------------------------*/ int linprt(const struct linprm *lin) { int i, j, k; if (lin == 0x0) return LINERR_NULL_POINTER; if (lin->flag != LINSET) { wcsprintf("The linprm struct is UNINITIALIZED.\n"); return 0; } wcsprintf(" flag: %d\n", lin->flag); /* Parameters supplied. */ wcsprintf(" naxis: %d\n", lin->naxis); WCSPRINTF_PTR(" crpix: ", lin->crpix, "\n"); wcsprintf(" "); for (j = 0; j < lin->naxis; j++) { wcsprintf(" %#- 11.5g", lin->crpix[j]); } wcsprintf("\n"); k = 0; WCSPRINTF_PTR(" pc: ", lin->pc, "\n"); for (i = 0; i < lin->naxis; i++) { wcsprintf(" pc[%d][]:", i); for (j = 0; j < lin->naxis; j++) { wcsprintf(" %#- 11.5g", lin->pc[k++]); } wcsprintf("\n"); } WCSPRINTF_PTR(" cdelt: ", lin->cdelt, "\n"); wcsprintf(" "); for (i = 0; i < lin->naxis; i++) { wcsprintf(" %#- 11.5g", lin->cdelt[i]); } wcsprintf("\n"); WCSPRINTF_PTR(" dispre: ", lin->dispre, ""); if (lin->dispre != 0x0) wcsprintf(" (see below)"); wcsprintf("\n"); WCSPRINTF_PTR(" disseq: ", lin->disseq, ""); if (lin->disseq != 0x0) wcsprintf(" (see below)"); wcsprintf("\n"); /* Derived values. */ if (lin->piximg == 0x0) { wcsprintf(" piximg: (nil)\n"); } else { k = 0; for (i = 0; i < lin->naxis; i++) { wcsprintf("piximg[%d][]:", i); for (j = 0; j < lin->naxis; j++) { wcsprintf(" %#- 11.5g", lin->piximg[k++]); } wcsprintf("\n"); } } if (lin->imgpix == 0x0) { wcsprintf(" imgpix: (nil)\n"); } else { k = 0; for (i = 0; i < lin->naxis; i++) { wcsprintf("imgpix[%d][]:", i); for (j = 0; j < lin->naxis; j++) { wcsprintf(" %#- 11.5g", lin->imgpix[k++]); } wcsprintf("\n"); } } wcsprintf(" i_naxis: %d\n", lin->i_naxis); wcsprintf(" unity: %d\n", lin->unity); wcsprintf(" affine: %d\n", lin->affine); wcsprintf(" simple: %d\n", lin->simple); /* Error handling. */ WCSPRINTF_PTR(" err: ", lin->err, "\n"); if (lin->err) { wcserr_prt(lin->err, " "); } /* Work arrays. */ WCSPRINTF_PTR(" tmpcrd: ", lin->tmpcrd, "\n"); /* Memory management. */ wcsprintf(" m_flag: %d\n", lin->m_flag); wcsprintf(" m_naxis: %d\n", lin->m_naxis); WCSPRINTF_PTR(" m_crpix: ", lin->m_crpix, ""); if (lin->m_crpix == lin->crpix) wcsprintf(" (= crpix)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_pc: ", lin->m_pc, ""); if (lin->m_pc == lin->pc) wcsprintf(" (= pc)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_cdelt: ", lin->m_cdelt, ""); if (lin->m_cdelt == lin->cdelt) wcsprintf(" (= cdelt)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_dispre: ", lin->m_dispre, ""); if (lin->dispre && lin->m_dispre == lin->dispre) wcsprintf(" (= dispre)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_disseq: ", lin->m_disseq, ""); if (lin->disseq && lin->m_disseq == lin->disseq) wcsprintf(" (= disseq)"); wcsprintf("\n"); /* Distortion parameters (from above). */ if (lin->dispre) { wcsprintf("\n"); wcsprintf("dispre.*\n"); disprt(lin->dispre); } if (lin->disseq) { wcsprintf("\n"); wcsprintf("disseq.*\n"); disprt(lin->disseq); } return 0; } /*--------------------------------------------------------------------------*/ int linperr(const struct linprm *lin, const char *prefix) { if (lin == 0x0) return LINERR_NULL_POINTER; if (lin->err && wcserr_prt(lin->err, prefix) == 0) { if (lin->dispre) wcserr_prt(lin->dispre->err, prefix); if (lin->disseq) wcserr_prt(lin->disseq->err, prefix); } return 0; } /*--------------------------------------------------------------------------*/ int linset(struct linprm *lin) { static const char *function = "linset"; int i, j, naxis, status; double *pc, *piximg; struct wcserr **err; if (lin == 0x0) return LINERR_NULL_POINTER; err = &(lin->err); naxis = lin->naxis; /* Check for a unit matrix. */ lin->unity = 1; pc = lin->pc; for (i = 0; i < naxis; i++) { for (j = 0; j < naxis; j++) { if (j == i) { if (*(pc++) != 1.0) { lin->unity = 0; break; } } else { if (*(pc++) != 0.0) { lin->unity = 0; break; } } } } if (lin->unity) { if (lin->flag == LINSET) { /* Free memory that may have been allocated previously. */ if (lin->piximg) free(lin->piximg); if (lin->imgpix) free(lin->imgpix); } lin->piximg = 0x0; lin->imgpix = 0x0; lin->i_naxis = 0; /* Check cdelt. */ for (i = 0; i < naxis; i++) { if (lin->cdelt[i] == 0.0) { return wcserr_set(LIN_ERRMSG(LINERR_SINGULAR_MTX)); } } } else { if (lin->flag != LINSET || lin->i_naxis < naxis) { if (lin->flag == LINSET) { /* Free memory that may have been allocated previously. */ if (lin->piximg) free(lin->piximg); if (lin->imgpix) free(lin->imgpix); } /* Allocate memory for internal arrays. */ if ((lin->piximg = calloc(naxis*naxis, sizeof(double))) == 0x0) { return wcserr_set(LIN_ERRMSG(LINERR_MEMORY)); } if ((lin->imgpix = calloc(naxis*naxis, sizeof(double))) == 0x0) { free(lin->piximg); return wcserr_set(LIN_ERRMSG(LINERR_MEMORY)); } lin->i_naxis = naxis; } /* Compute the pixel-to-image transformation matrix. */ pc = lin->pc; piximg = lin->piximg; for (i = 0; i < naxis; i++) { for (j = 0; j < naxis; j++) { if (lin->disseq == 0x0) { /* No sequent distortions, incorporate cdelt into piximg. */ *(piximg++) = lin->cdelt[i] * (*(pc++)); } else { *(piximg++) = *(pc++); } } } /* Compute the image-to-pixel transformation matrix. */ if ((status = matinv(naxis, lin->piximg, lin->imgpix))) { return wcserr_set(LIN_ERRMSG(status)); } } /* Set up the distortion functions. */ lin->affine = 1; if (lin->dispre) { if ((status = disset(lin->dispre))) { return wcserr_set(LIN_ERRMSG(lin_diserr[status])); } lin->affine = 0; } if (lin->disseq) { if ((status = disset(lin->disseq))) { return wcserr_set(LIN_ERRMSG(lin_diserr[status])); } lin->affine = 0; } lin->simple = lin->unity && lin->affine; /* Create work arrays. */ if (lin->tmpcrd) free(lin->tmpcrd); if ((lin->tmpcrd = calloc(naxis, sizeof(double))) == 0x0) { linfree(lin); return wcserr_set(LIN_ERRMSG(LINERR_MEMORY)); } lin->flag = LINSET; return 0; } /*--------------------------------------------------------------------------*/ int linp2x( struct linprm *lin, int ncoord, int nelem, const double pixcrd[], double imgcrd[]) { static const char *function = "linp2x"; int i, j, k, n, ndbl, nelemn, status; double temp; register const double *pix; register double *img, *piximg, *tmp; struct wcserr **err; /* Initialize. */ if (lin == 0x0) return LINERR_NULL_POINTER; err = &(lin->err); if (lin->flag != LINSET) { if ((status = linset(lin))) return status; } n = lin->naxis; /* Convert pixel coordinates to intermediate world coordinates. */ pix = pixcrd; img = imgcrd; if (lin->simple) { /* Handle the simplest and most common case with maximum efficiency. */ nelemn = nelem - n; for (k = 0; k < ncoord; k++) { for (i = 0; i < n; i++) { *(img++) = lin->cdelt[i] * (*(pix++) - lin->crpix[i]); } pix += nelemn; img += nelemn; } } else if (lin->affine) { /* No distortions. */ ndbl = n * sizeof(double); nelemn = nelem - n; for (k = 0; k < ncoord; k++) { memset(img, 0, ndbl); for (j = 0; j < n; j++) { /* cdelt will have been incorporated into piximg. */ piximg = lin->piximg + j; /* Column-wise multiplication allows this to be cached. */ temp = *(pix++) - lin->crpix[j]; for (i = 0; i < n; i++, piximg += n) { img[i] += *piximg * temp; } } pix += nelemn; img += nelem; } } else { /* Distortions are present. */ ndbl = n * sizeof(double); tmp = lin->tmpcrd; for (k = 0; k < ncoord; k++) { if (lin->dispre) { if ((status = disp2x(lin->dispre, pix, tmp))) { return wcserr_set(LIN_ERRMSG(lin_diserr[status])); } } else { memcpy(tmp, pix, ndbl); } if (lin->unity) { for (i = 0; i < n; i++) { img[i] = tmp[i] - lin->crpix[i]; } } else { for (j = 0; j < n; j++) { tmp[j] -= lin->crpix[j]; } piximg = lin->piximg; for (i = 0; i < n; i++) { img[i] = 0.0; for (j = 0; j < n; j++) { img[i] += *(piximg++) * tmp[j]; } } } if (lin->disseq) { if ((status = disp2x(lin->disseq, img, tmp))) { return wcserr_set(LIN_ERRMSG(lin_diserr[status])); } /* With sequent distortions, cdelt is not incorporated into piximg. */ for (i = 0; i < n; i++) { img[i] = lin->cdelt[i] * tmp[i]; } } else if (lin->unity) { /* ...nor if the matrix is unity. */ for (i = 0; i < n; i++) { img[i] *= lin->cdelt[i]; } } pix += nelem; img += nelem; } } return 0; } /*--------------------------------------------------------------------------*/ int linx2p( struct linprm *lin, int ncoord, int nelem, const double imgcrd[], double pixcrd[]) { static const char *function = "linx2p"; int i, j, k, n, ndbl, nelemn, status; register const double *img; register double *imgpix, *pix, *tmp; struct wcserr **err; /* Initialize. */ if (lin == 0x0) return LINERR_NULL_POINTER; err = &(lin->err); if (lin->flag != LINSET) { if ((status = linset(lin))) return status; } n = lin->naxis; /* Convert intermediate world coordinates to pixel coordinates. */ img = imgcrd; pix = pixcrd; if (lin->simple) { /* Handle the simplest and most common case with maximum efficiency. */ nelemn = nelem - n; for (k = 0; k < ncoord; k++) { for (j = 0; j < n; j++) { *(pix++) = (*(img++) / lin->cdelt[j]) + lin->crpix[j]; } img += nelemn; pix += nelemn; } } else if (lin->affine) { /* No distortions. */ nelemn = nelem - n; for (k = 0; k < ncoord; k++) { /* cdelt will have been incorporated into imgpix. */ imgpix = lin->imgpix; for (j = 0; j < n; j++) { *pix = 0.0; for (i = 0; i < n; i++) { *pix += *imgpix * img[i]; imgpix++; } *(pix++) += lin->crpix[j]; } img += nelem; pix += nelemn; } } else { /* Distortions are present. */ ndbl = n * sizeof(double); tmp = lin->tmpcrd; for (k = 0; k < ncoord; k++) { if (lin->disseq) { /* With sequent distortions, cdelt is not incorporated into imgpix. */ for (i = 0; i < n; i++) { tmp[i] = img[i] / lin->cdelt[i]; } if ((status = disx2p(lin->disseq, tmp, pix))) { return wcserr_set(LIN_ERRMSG(lin_diserr[status])); } memcpy(tmp, pix, ndbl); } else if (lin->unity) { /* ...nor if the matrix is unity. */ for (i = 0; i < n; i++) { tmp[i] = img[i] / lin->cdelt[i]; } } else { /* cdelt will have been incorporated into imgpix. */ memcpy(tmp, img, ndbl); } if (lin->unity) { for (j = 0; j < n; j++) { pix[j] = tmp[j] + lin->crpix[j]; } } else { imgpix = lin->imgpix; for (j = 0; j < n; j++) { pix[j] = lin->crpix[j]; for (i = 0; i < n; i++) { pix[j] += *(imgpix++) * tmp[i]; } } } if (lin->dispre) { memcpy(tmp, pix, ndbl); if ((status = disx2p(lin->dispre, tmp, pix))) { return wcserr_set(LIN_ERRMSG(lin_diserr[status])); } } img += nelem; pix += nelem; } } return 0; } /*--------------------------------------------------------------------------*/ int linwarp( struct linprm *lin, const double pixblc[], const double pixtrc[], const double pixsamp[], int *nsamp, double maxdis[], double *maxtot, double avgdis[], double *avgtot, double rmsdis[], double *rmstot) { static const char *function = "linwarp"; int carry, i, j, naxis, ncoord, status = 0; double dpix, dpx2, dssq, *img, *pix0, *pix0p, *pix1, *pix1p, *pixend, *pixinc, pixspan, *ssqdis, ssqtot, *sumdis, sumtot, totdis; struct linprm affine; struct wcserr **err; /* Initialize. */ if (lin == 0x0) return LINERR_NULL_POINTER; err = &(lin->err); naxis = lin->naxis; if (nsamp) *nsamp = 0; for (j = 0; j < naxis; j++) { if (maxdis) maxdis[j] = 0.0; if (avgdis) avgdis[j] = 0.0; if (rmsdis) rmsdis[j] = 0.0; } if (maxtot) *maxtot = 0.0; if (avgtot) *avgtot = 0.0; if (rmstot) *rmstot = 0.0; /* Quick return if no distortions. */ if (lin->affine) return 0; /* It's easier if there are no sequent distortions! */ if (lin->disseq == 0x0) { status = diswarp(lin->dispre, pixblc, pixtrc, pixsamp, nsamp, maxdis, maxtot, avgdis, avgtot, rmsdis, rmstot); return wcserr_set(LIN_ERRMSG(lin_diserr[status])); } /* Make a reference copy of lin without distortions. */ affine.flag = -1; if ((status = (lincpy(1, lin, &affine) || lindis(1, &affine, 0x0) || lindis(2, &affine, 0x0) || linset(&affine)))) { return wcserr_set(LIN_ERRMSG(status)); } /* Work out increments on each axis. */ pixinc = lin->tmpcrd; for (j = 0; j < naxis; j++) { pixspan = pixtrc[j] - (pixblc ? pixblc[j] : 1.0); if (pixsamp == 0x0) { pixinc[j] = 1.0; } else if (pixsamp[j] == 0.0) { pixinc[j] = 1.0; } else if (pixsamp[j] > 0.0) { pixinc[j] = pixsamp[j]; } else if (pixsamp[j] > -1.5) { pixinc[j] = 2.0*pixspan; } else { pixinc[j] = pixspan / ((int)(-pixsamp[j] - 0.5)); } if (j == 0) { /* Number of samples on axis 1. */ ncoord = 1 + (int)((pixspan/pixinc[0]) + 0.5); } } /* Get memory for processing the image row by row. */ if ((pix0 = calloc((3*ncoord+4)*naxis, sizeof(double))) == 0x0) { return wcserr_set(LIN_ERRMSG(LINERR_MEMORY)); } img = pix0 + naxis*ncoord; pix1 = img + naxis*ncoord; pixinc = pix1 + naxis*ncoord; pixend = pixinc + naxis; sumdis = pixend + naxis; ssqdis = sumdis + naxis; /* Copy tmpcrd since linp2x() will overwrite it. */ memcpy(pixinc, lin->tmpcrd, naxis*sizeof(double)); /* Set up the array of pixel coordinates. */ for (j = 0; j < naxis; j++) { pix0[j] = pixblc ? pixblc[j] : 1.0; pixend[j] = pixtrc[j] + 0.5*pixinc[j]; } pix0p = pix0 + naxis; for (i = 1; i < ncoord; i++) { *(pix0p++) = pix0[0] + i*pixinc[0]; for (j = 1; j < naxis; j++) { *(pix0p++) = pix0[j]; } } /* Initialize accumulators. */ for (j = 0; j < naxis; j++) { sumdis[j] = 0.0; ssqdis[j] = 0.0; } sumtot = 0.0; ssqtot = 0.0; /* Loop over N dimensions. */ carry = 0; while (carry == 0) { if ((status = linp2x(lin, ncoord, naxis, pix0, img))) { /* (Preserve the error message set by linp2x().) */ goto cleanup; } if ((status = linx2p(&affine, ncoord, naxis, img, pix1))) { /* (Preserve the error message set by linx2p().) */ goto cleanup; } /* Accumulate statistics. */ pix0p = pix0; pix1p = pix1; for (i = 0; i < ncoord; i++) { (*nsamp)++; dssq = 0.0; for (j = 0; j < naxis; j++) { dpix = *(pix1p++) - *(pix0p++); dpx2 = dpix*dpix; sumdis[j] += dpix; ssqdis[j] += dpx2; if (maxdis && (dpix = fabs(dpix)) > maxdis[j]) maxdis[j] = dpix; dssq += dpx2; } totdis = sqrt(dssq); sumtot += totdis; ssqtot += totdis*totdis; if (maxtot && *maxtot < totdis) *maxtot = totdis; } /* Next array of pixel coordinates. */ for (j = 1; j < naxis; j++) { pix0[j] += pixinc[j]; if ((carry = (pix0[j] > pixend[j]))) { pix0[j] = pixblc ? pixblc[j] : 1.0; } pix0p = pix0 + naxis + j; for (i = 1; i < ncoord; i++) { *pix0p = pix0[j]; pix0p += naxis; } if (carry == 0) break; } } /* Compute the means and RMSs. */ for (j = 0; j < naxis; j++) { ssqdis[j] /= *nsamp; sumdis[j] /= *nsamp; if (avgdis) avgdis[j] = sumdis[j]; if (rmsdis) rmsdis[j] = sqrt(ssqdis[j] - sumdis[j]*sumdis[j]); } ssqtot /= *nsamp; sumtot /= *nsamp; if (avgtot) *avgtot = sumtot; if (rmstot) *rmstot = sqrt(ssqtot - sumtot*sumtot); cleanup: free(pix0); return status; } /*--------------------------------------------------------------------------*/ int matinv(int n, const double mat[], double inv[]) { register int i, ij, ik, j, k, kj, pj; int itemp, *mxl, *lxm, pivot; double colmax, *lu, *rowmax, dtemp; /* Allocate memory for internal arrays. */ if ((mxl = calloc(n, sizeof(int))) == 0x0) { return LINERR_MEMORY; } if ((lxm = calloc(n, sizeof(int))) == 0x0) { free(mxl); return LINERR_MEMORY; } if ((rowmax = calloc(n, sizeof(double))) == 0x0) { free(mxl); free(lxm); return LINERR_MEMORY; } if ((lu = calloc(n*n, sizeof(double))) == 0x0) { free(mxl); free(lxm); free(rowmax); return LINERR_MEMORY; } /* Initialize arrays. */ for (i = 0, ij = 0; i < n; i++) { /* Vector that records row interchanges. */ mxl[i] = i; rowmax[i] = 0.0; for (j = 0; j < n; j++, ij++) { dtemp = fabs(mat[ij]); if (dtemp > rowmax[i]) rowmax[i] = dtemp; lu[ij] = mat[ij]; } /* A row of zeroes indicates a singular matrix. */ if (rowmax[i] == 0.0) { free(mxl); free(lxm); free(rowmax); free(lu); return LINERR_SINGULAR_MTX; } } /* Form the LU triangular factorization using scaled partial pivoting. */ for (k = 0; k < n; k++) { /* Decide whether to pivot. */ colmax = fabs(lu[k*n+k]) / rowmax[k]; pivot = k; for (i = k+1; i < n; i++) { ik = i*n + k; dtemp = fabs(lu[ik]) / rowmax[i]; if (dtemp > colmax) { colmax = dtemp; pivot = i; } } if (pivot > k) { /* We must pivot, interchange the rows of the design matrix. */ for (j = 0, pj = pivot*n, kj = k*n; j < n; j++, pj++, kj++) { dtemp = lu[pj]; lu[pj] = lu[kj]; lu[kj] = dtemp; } /* Amend the vector of row maxima. */ dtemp = rowmax[pivot]; rowmax[pivot] = rowmax[k]; rowmax[k] = dtemp; /* Record the interchange for later use. */ itemp = mxl[pivot]; mxl[pivot] = mxl[k]; mxl[k] = itemp; } /* Gaussian elimination. */ for (i = k+1; i < n; i++) { ik = i*n + k; /* Nothing to do if lu[ik] is zero. */ if (lu[ik] != 0.0) { /* Save the scaling factor. */ lu[ik] /= lu[k*n+k]; /* Subtract rows. */ for (j = k+1; j < n; j++) { lu[i*n+j] -= lu[ik]*lu[k*n+j]; } } } } /* mxl[i] records which row of mat corresponds to row i of lu. */ /* lxm[i] records which row of lu corresponds to row i of mat. */ for (i = 0; i < n; i++) { lxm[mxl[i]] = i; } /* Determine the inverse matrix. */ for (i = 0, ij = 0; i < n; i++) { for (j = 0; j < n; j++, ij++) { inv[ij] = 0.0; } } for (k = 0; k < n; k++) { inv[lxm[k]*n+k] = 1.0; /* Forward substitution. */ for (i = lxm[k]+1; i < n; i++) { for (j = lxm[k]; j < i; j++) { inv[i*n+k] -= lu[i*n+j]*inv[j*n+k]; } } /* Backward substitution. */ for (i = n-1; i >= 0; i--) { for (j = i+1; j < n; j++) { inv[i*n+k] -= lu[i*n+j]*inv[j*n+k]; } inv[i*n+k] /= lu[i*n+i]; } } free(mxl); free(lxm); free(rowmax); free(lu); return 0; } astropy-1.1.1/cextern/wcslib/C/spx.c0000644001134200020070000006130312644017723020223 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: spx.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include "wcserr.h" #include "wcsmath.h" #include "spx.h" /* Map status return value to message. */ const char *spx_errmsg[] = { "Success", "Null spxprm pointer passed", "Invalid spectral parameters", "Invalid spectral variable", "One or more of the inspec coordinates were invalid"}; /* Convenience macro for invoking wcserr_set(). */ #define SPX_ERRMSG(status) WCSERR_SET(status), spx_errmsg[status] #define C 2.99792458e8 #define h 6.6260755e-34 /*============================================================================ * Spectral cross conversions; given one spectral coordinate it computes all * the others, plus the required derivatives of each with respect to the * others. *===========================================================================*/ int specx(type, spec, restfrq, restwav, spx) const char *type; double spec, restfrq, restwav; struct spxprm *spx; { static const char *function = "specx"; register int k; int haverest; double beta, dwaveawav, gamma, n, s, t, u; struct wcserr **err; if (spx == 0x0) return SPXERR_NULL_POINTER; err = &(spx->err); haverest = 1; if (restfrq == 0.0) { if (restwav == 0.0) { /* No line rest frequency supplied. */ haverest = 0; /* Temporarily set a dummy value for conversions. */ spx->restwav = 1.0; } else { spx->restwav = restwav; } spx->restfrq = C/spx->restwav; } else { spx->restfrq = restfrq; spx->restwav = C/restfrq; } spx->err = 0x0; /* Convert to frequency. */ spx->wavetype = 0; spx->velotype = 0; if (strcmp(type, "FREQ") == 0) { if (spec == 0.0) { return wcserr_set(WCSERR_SET(SPXERR_BAD_SPEC_VAR), "Invalid spectral variable: frequency == 0"); } spx->freq = spec; spx->wavetype = 1; } else if (strcmp(type, "AFRQ") == 0) { if (spec == 0.0) { return wcserr_set(WCSERR_SET(SPXERR_BAD_SPEC_VAR), "Invalid spectral variable: frequency == 0"); } spx->freq = spec/(2.0*PI); spx->wavetype = 1; } else if (strcmp(type, "ENER") == 0) { if (spec == 0.0) { return wcserr_set(WCSERR_SET(SPXERR_BAD_SPEC_VAR), "Invalid spectral variable: frequency == 0"); } spx->freq = spec/h; spx->wavetype = 1; } else if (strcmp(type, "WAVN") == 0) { if (spec == 0.0) { return wcserr_set(WCSERR_SET(SPXERR_BAD_SPEC_VAR), "Invalid spectral variable: frequency == 0"); } spx->freq = spec*C; spx->wavetype = 1; } else if (strcmp(type, "VRAD") == 0) { spx->freq = spx->restfrq*(1.0 - spec/C); spx->velotype = 1; } else if (strcmp(type, "WAVE") == 0) { if (spec == 0.0) { return wcserr_set(WCSERR_SET(SPXERR_BAD_SPEC_VAR), "Invalid spectral variable: frequency == 0"); } spx->freq = C/spec; spx->wavetype = 1; } else if (strcmp(type, "VOPT") == 0) { s = 1.0 + spec/C; if (s == 0.0) { return wcserr_set(WCSERR_SET(SPXERR_BAD_SPEC_VAR), "Invalid spectral variable"); } spx->freq = spx->restfrq/s; spx->velotype = 1; } else if (strcmp(type, "ZOPT") == 0) { s = 1.0 + spec; if (s == 0.0) { return wcserr_set(WCSERR_SET(SPXERR_BAD_SPEC_VAR), "Invalid spectral variable"); } spx->freq = spx->restfrq/s; spx->velotype = 1; } else if (strcmp(type, "AWAV") == 0) { if (spec == 0.0) { return wcserr_set(WCSERR_SET(SPXERR_BAD_SPEC_VAR), "Invalid spectral variable"); } s = 1.0/spec; s *= s; n = 2.554e8 / (0.41e14 - s); n += 294.981e8 / (1.46e14 - s); n += 1.000064328; spx->freq = C/(spec*n); spx->wavetype = 1; } else if (strcmp(type, "VELO") == 0) { beta = spec/C; if (fabs(beta) == 1.0) { return wcserr_set(WCSERR_SET(SPXERR_BAD_SPEC_VAR), "Invalid spectral variable"); } spx->freq = spx->restfrq*(1.0 - beta)/sqrt(1.0 - beta*beta); spx->velotype = 1; } else if (strcmp(type, "BETA") == 0) { if (fabs(spec) == 1.0) { return wcserr_set(WCSERR_SET(SPXERR_BAD_SPEC_VAR), "Invalid spectral variable"); } spx->freq = spx->restfrq*(1.0 - spec)/sqrt(1.0 - spec*spec); spx->velotype = 1; } else { /* Unrecognized type. */ return wcserr_set(WCSERR_SET(SPXERR_BAD_SPEC_PARAMS), "Unrecognized spectral type '%s'", type); } /* Convert frequency to the other spectral types. */ n = 1.0; for (k = 0; k < 4; k++) { s = n*spx->freq/C; s *= s; t = 0.41e14 - s; u = 1.46e14 - s; n = 1.000064328 + (2.554e8/t + 294.981e8/u); } dwaveawav = n - 2.0*s*(2.554e8/(t*t) + 294.981e8/(u*u)); s = spx->freq/spx->restfrq; spx->ener = spx->freq*h; spx->afrq = spx->freq*(2.0*PI); spx->wavn = spx->freq/C; spx->vrad = C*(1.0 - s); spx->wave = C/spx->freq; spx->awav = spx->wave/n; spx->vopt = C*(1.0/s - 1.0); spx->zopt = spx->vopt/C; spx->velo = C*(1.0 - s*s)/(1.0 + s*s); spx->beta = spx->velo/C; /* Compute the required derivatives. */ gamma = 1.0/sqrt(1.0 - spx->beta*spx->beta); spx->dfreqafrq = 1.0/(2.0*PI); spx->dafrqfreq = 1.0/spx->dfreqafrq; spx->dfreqener = 1.0/h; spx->denerfreq = 1.0/spx->dfreqener; spx->dfreqwavn = C; spx->dwavnfreq = 1.0/spx->dfreqwavn; spx->dfreqvrad = -spx->restfrq/C; spx->dvradfreq = 1.0/spx->dfreqvrad; spx->dfreqwave = -spx->freq/spx->wave; spx->dwavefreq = 1.0/spx->dfreqwave; spx->dfreqawav = spx->dfreqwave * dwaveawav; spx->dawavfreq = 1.0/spx->dfreqawav; spx->dfreqvelo = -gamma*spx->restfrq/(C + spx->velo); spx->dvelofreq = 1.0/spx->dfreqvelo; spx->dwavevopt = spx->restwav/C; spx->dvoptwave = 1.0/spx->dwavevopt; spx->dwavezopt = spx->restwav; spx->dzoptwave = 1.0/spx->dwavezopt; spx->dwaveawav = dwaveawav; spx->dawavwave = 1.0/spx->dwaveawav; spx->dwavevelo = gamma*spx->restwav/(C - spx->velo); spx->dvelowave = 1.0/spx->dwavevelo; spx->dawavvelo = spx->dwavevelo/dwaveawav; spx->dveloawav = 1.0/spx->dawavvelo; spx->dvelobeta = C; spx->dbetavelo = 1.0/spx->dvelobeta; /* Reset values if no line rest frequency was supplied. */ if (haverest) { spx->wavetype = 1; spx->velotype = 1; } else { spx->restfrq = 0.0; spx->restwav = 0.0; if (!spx->wavetype) { /* Don't have wave characteristic types. */ spx->freq = 0.0; spx->afrq = 0.0; spx->ener = 0.0; spx->wavn = 0.0; spx->wave = 0.0; spx->awav = 0.0; spx->dfreqwave = 0.0; spx->dwavefreq = 0.0; spx->dfreqawav = 0.0; spx->dawavfreq = 0.0; spx->dwaveawav = 0.0; spx->dawavwave = 0.0; } else { /* Don't have velocity types. */ spx->vrad = 0.0; spx->vopt = 0.0; spx->zopt = 0.0; spx->velo = 0.0; spx->beta = 0.0; } spx->dfreqvrad = 0.0; spx->dvradfreq = 0.0; spx->dfreqvelo = 0.0; spx->dvelofreq = 0.0; spx->dwavevopt = 0.0; spx->dvoptwave = 0.0; spx->dwavezopt = 0.0; spx->dzoptwave = 0.0; spx->dwavevelo = 0.0; spx->dvelowave = 0.0; spx->dawavvelo = 0.0; spx->dveloawav = 0.0; } return 0; } /*--------------------------------------------------------------------------*/ int spxperr(const struct spxprm *spx, const char *prefix) { if (spx == 0x0) return SPXERR_NULL_POINTER; if (spx->err) { wcserr_prt(spx->err, prefix); } return 0; } /*============================================================================ * Conversions between frequency and vacuum wavelength. *===========================================================================*/ int freqwave(dummy, nfreq, sfreq, swave, freq, wave, stat) double dummy; int nfreq, sfreq, swave; const double freq[]; double wave[]; int stat[]; { int status = 0; register int ifreq, *statp; register const double *freqp; register double *wavep; freqp = freq; wavep = wave; statp = stat; for (ifreq = 0; ifreq < nfreq; ifreq++) { if (*freqp != 0.0) { *wavep = C/(*freqp); *(statp++) = 0; } else { *(statp++) = 1; status = SPXERR_BAD_INSPEC_COORD; } freqp += sfreq; wavep += swave; } return status; } /*--------------------------------------------------------------------------*/ int wavefreq(dummy, nwave, swave, sfreq, wave, freq, stat) double dummy; int nwave, swave, sfreq; const double wave[]; double freq[]; int stat[]; { int status = 0; register int iwave, *statp; register const double *wavep; register double *freqp; wavep = wave; freqp = freq; statp = stat; for (iwave = 0; iwave < nwave; iwave++) { if (*wavep != 0.0) { *freqp = C/(*wavep); *(statp++) = 0; } else { *(statp++) = 1; status = SPXERR_BAD_INSPEC_COORD; } wavep += swave; freqp += sfreq; } return status; } /*============================================================================ * Conversions between frequency and air wavelength. *===========================================================================*/ int freqawav(dummy, nfreq, sfreq, sawav, freq, awav, stat) double dummy; int nfreq, sfreq, sawav; const double freq[]; double awav[]; int stat[]; { int status; if ((status = freqwave(dummy, nfreq, sfreq, sawav, freq, awav, stat))) { return status; } return waveawav(dummy, nfreq, sawav, sawav, awav, awav, stat); } /*--------------------------------------------------------------------------*/ int awavfreq(dummy, nawav, sawav, sfreq, awav, freq, stat) double dummy; int nawav, sawav, sfreq; const double awav[]; double freq[]; int stat[]; { int status; if ((status = awavwave(dummy, nawav, sawav, sfreq, awav, freq, stat))) { return status; } return wavefreq(dummy, nawav, sfreq, sfreq, freq, freq, stat); } /*============================================================================ * Conversions between frequency and relativistic velocity. *===========================================================================*/ int freqvelo(restfrq, nfreq, sfreq, svelo, freq, velo, stat) double restfrq; int nfreq, sfreq, svelo; const double freq[]; double velo[]; int stat[]; { double r, s; register int ifreq, *statp; register const double *freqp; register double *velop; r = restfrq*restfrq; freqp = freq; velop = velo; statp = stat; for (ifreq = 0; ifreq < nfreq; ifreq++) { s = *freqp * *freqp; *velop = C*(r - s)/(r + s); *(statp++) = 0; freqp += sfreq; velop += svelo; } return 0; } /*--------------------------------------------------------------------------*/ int velofreq(restfrq, nvelo, svelo, sfreq, velo, freq, stat) double restfrq; int nvelo, svelo, sfreq; const double velo[]; double freq[]; int stat[]; { int status = 0; double s; register int ivelo, *statp; register const double *velop; register double *freqp; velop = velo; freqp = freq; statp = stat; for (ivelo = 0; ivelo < nvelo; ivelo++) { s = C + *velop; if (s != 0.0) { *freqp = restfrq*sqrt((C - *velop)/s); *(statp++) = 0; } else { *(statp++) = 1; status = SPXERR_BAD_INSPEC_COORD; } velop += svelo; freqp += sfreq; } return status; } /*============================================================================ * Conversions between vacuum wavelength and air wavelength. *===========================================================================*/ int waveawav(dummy, nwave, swave, sawav, wave, awav, stat) double dummy; int nwave, swave, sawav; const double wave[]; double awav[]; int stat[]; { int status = 0; double n, s; register int iwave, k, *statp; register const double *wavep; register double *awavp; wavep = wave; awavp = awav; statp = stat; for (iwave = 0; iwave < nwave; iwave++) { if (*wavep != 0.0) { n = 1.0; for (k = 0; k < 4; k++) { s = n/(*wavep); s *= s; n = 2.554e8 / (0.41e14 - s); n += 294.981e8 / (1.46e14 - s); n += 1.000064328; } *awavp = (*wavep)/n; *(statp++) = 0; } else { *(statp++) = 1; status = SPXERR_BAD_INSPEC_COORD; } wavep += swave; awavp += sawav; } return status; } /*--------------------------------------------------------------------------*/ int awavwave(dummy, nawav, sawav, swave, awav, wave, stat) double dummy; int nawav, sawav, swave; const double awav[]; double wave[]; int stat[]; { int status = 0; double n, s; register int iawav, *statp; register const double *awavp; register double *wavep; awavp = awav; wavep = wave; statp = stat; for (iawav = 0; iawav < nawav; iawav++) { if (*awavp != 0.0) { s = 1.0/(*awavp); s *= s; n = 2.554e8 / (0.41e14 - s); n += 294.981e8 / (1.46e14 - s); n += 1.000064328; *wavep = (*awavp)*n; *(statp++) = 0; } else { *(statp++) = 1; status = SPXERR_BAD_INSPEC_COORD; } awavp += sawav; wavep += swave; } return status; } /*============================================================================ * Conversions between vacuum wavelength and relativistic velocity. *===========================================================================*/ int wavevelo(restwav, nwave, swave, svelo, wave, velo, stat) double restwav; int nwave, swave, svelo; const double wave[]; double velo[]; int stat[]; { double r, s; register int iwave, *statp; register const double *wavep; register double *velop; r = restwav*restwav; wavep = wave; velop = velo; statp = stat; for (iwave = 0; iwave < nwave; iwave++) { s = *wavep * *wavep; *velop = C*(s - r)/(s + r); *(statp++) = 0; wavep += swave; velop += svelo; } return 0; } /*--------------------------------------------------------------------------*/ int velowave(restwav, nvelo, svelo, swave, velo, wave, stat) double restwav; int nvelo, svelo, swave; const double velo[]; double wave[]; int stat[]; { int status = 0; double s; register int ivelo, *statp; register const double *velop; register double *wavep; velop = velo; wavep = wave; statp = stat; for (ivelo = 0; ivelo < nvelo; ivelo++) { s = C - *velop; if (s != 0.0) { *wavep = restwav*sqrt((C + *velop)/s); *(statp++) = 0; } else { *(statp++) = 1; status = SPXERR_BAD_INSPEC_COORD; } velop += svelo; wavep += swave; } return status; } /*============================================================================ * Conversions between air wavelength and relativistic velocity. *===========================================================================*/ int awavvelo(dummy, nawav, sawav, svelo, awav, velo, stat) double dummy; int nawav, sawav, svelo; const double awav[]; double velo[]; int stat[]; { int status; if ((status = awavwave(dummy, nawav, sawav, svelo, awav, velo, stat))) { return status; } return wavevelo(dummy, nawav, svelo, svelo, velo, velo, stat); } /*--------------------------------------------------------------------------*/ int veloawav(dummy, nvelo, svelo, sawav, velo, awav, stat) double dummy; int nvelo, svelo, sawav; const double velo[]; double awav[]; int stat[]; { int status; if ((status = velowave(dummy, nvelo, svelo, sawav, velo, awav, stat))) { return status; } return waveawav(dummy, nvelo, sawav, sawav, awav, awav, stat); } /*============================================================================ * Conversions between frequency and angular frequency. *===========================================================================*/ int freqafrq(dummy, nfreq, sfreq, safrq, freq, afrq, stat) double dummy; int nfreq, sfreq, safrq; const double freq[]; double afrq[]; int stat[]; { register int ifreq, *statp; register const double *freqp; register double *afrqp; freqp = freq; afrqp = afrq; statp = stat; for (ifreq = 0; ifreq < nfreq; ifreq++) { *afrqp = (*freqp)*(2.0*PI); *(statp++) = 0; freqp += sfreq; afrqp += safrq; } return 0; } /*--------------------------------------------------------------------------*/ int afrqfreq(dummy, nafrq, safrq, sfreq, afrq, freq, stat) double dummy; int nafrq, safrq, sfreq; const double afrq[]; double freq[]; int stat[]; { register int iafrq, *statp; register const double *afrqp; register double *freqp; afrqp = afrq; freqp = freq; statp = stat; for (iafrq = 0; iafrq < nafrq; iafrq++) { *freqp = (*afrqp)/(2.0*PI); *(statp++) = 0; afrqp += safrq; freqp += sfreq; } return 0; } /*============================================================================ * Conversions between frequency and energy. *===========================================================================*/ int freqener(dummy, nfreq, sfreq, sener, freq, ener, stat) double dummy; int nfreq, sfreq, sener; const double freq[]; double ener[]; int stat[]; { register int ifreq, *statp; register const double *freqp; register double *enerp; freqp = freq; enerp = ener; statp = stat; for (ifreq = 0; ifreq < nfreq; ifreq++) { *enerp = (*freqp)*h; *(statp++) = 0; freqp += sfreq; enerp += sener; } return 0; } /*--------------------------------------------------------------------------*/ int enerfreq(dummy, nener, sener, sfreq, ener, freq, stat) double dummy; int nener, sener, sfreq; const double ener[]; double freq[]; int stat[]; { register int iener, *statp; register const double *enerp; register double *freqp; enerp = ener; freqp = freq; statp = stat; for (iener = 0; iener < nener; iener++) { *freqp = (*enerp)/h; *(statp++) = 0; enerp += sener; freqp += sfreq; } return 0; } /*============================================================================ * Conversions between frequency and wave number. *===========================================================================*/ int freqwavn(dummy, nfreq, sfreq, swavn, freq, wavn, stat) double dummy; int nfreq, sfreq, swavn; const double freq[]; double wavn[]; int stat[]; { register int ifreq, *statp; register const double *freqp; register double *wavnp; freqp = freq; wavnp = wavn; statp = stat; for (ifreq = 0; ifreq < nfreq; ifreq++) { *wavnp = (*freqp)/C; *(statp++) = 0; freqp += sfreq; wavnp += swavn; } return 0; } /*--------------------------------------------------------------------------*/ int wavnfreq(dummy, nwavn, swavn, sfreq, wavn, freq, stat) double dummy; int nwavn, swavn, sfreq; const double wavn[]; double freq[]; int stat[]; { register int iwavn, *statp; register const double *wavnp; register double *freqp; wavnp = wavn; freqp = freq; statp = stat; for (iwavn = 0; iwavn < nwavn; iwavn++) { *freqp = (*wavnp)*C; *(statp++) = 0; wavnp += swavn; freqp += sfreq; } return 0; } /*============================================================================ * Conversions between frequency and radio velocity. *===========================================================================*/ int freqvrad(restfrq, nfreq, sfreq, svrad, freq, vrad, stat) double restfrq; int nfreq, sfreq, svrad; const double freq[]; double vrad[]; int stat[]; { double r; register int ifreq, *statp; register const double *freqp; register double *vradp; if (restfrq == 0.0) { return SPXERR_BAD_SPEC_PARAMS; } r = C/restfrq; freqp = freq; vradp = vrad; statp = stat; for (ifreq = 0; ifreq < nfreq; ifreq++) { *vradp = r*(restfrq - *freqp); *(statp++) = 0; freqp += sfreq; vradp += svrad; } return 0; } /*--------------------------------------------------------------------------*/ int vradfreq(restfrq, nvrad, svrad, sfreq, vrad, freq, stat) double restfrq; int nvrad, svrad, sfreq; const double vrad[]; double freq[]; int stat[]; { double r; register int ivrad, *statp; register const double *vradp; register double *freqp; r = restfrq/C; vradp = vrad; freqp = freq; statp = stat; for (ivrad = 0; ivrad < nvrad; ivrad++) { *freqp = r*(C - *vradp); *(statp++) = 0; vradp += svrad; freqp += sfreq; } return 0; } /*============================================================================ * Conversions between vacuum wavelength and optical velocity. *===========================================================================*/ int wavevopt(restwav, nwave, swave, svopt, wave, vopt, stat) double restwav; int nwave, swave, svopt; const double wave[]; double vopt[]; int stat[]; { double r; register int iwave, *statp; register const double *wavep; register double *voptp; if (restwav == 0.0) { return SPXERR_BAD_SPEC_PARAMS; } r = C/restwav; wavep = wave; voptp = vopt; statp = stat; for (iwave = 0; iwave < nwave; iwave++) { *voptp = r*(*wavep) - C; *(statp++) = 0; wavep += swave; voptp += svopt; } return 0; } /*--------------------------------------------------------------------------*/ int voptwave(restwav, nvopt, svopt, swave, vopt, wave, stat) double restwav; int nvopt, svopt, swave; const double vopt[]; double wave[]; int stat[]; { double r; register int ivopt, *statp; register const double *voptp; register double *wavep; r = restwav/C; voptp = vopt; wavep = wave; statp = stat; for (ivopt = 0; ivopt < nvopt; ivopt++) { *wavep = r*(C + *voptp); *(statp++) = 0; voptp += svopt; wavep += swave; } return 0; } /*============================================================================ * Conversions between vacuum wavelength and redshift. *===========================================================================*/ int wavezopt(restwav, nwave, swave, szopt, wave, zopt, stat) double restwav; int nwave, swave, szopt; const double wave[]; double zopt[]; int stat[]; { double r; register int iwave, *statp; register const double *wavep; register double *zoptp; if (restwav == 0.0) { return SPXERR_BAD_SPEC_PARAMS; } r = 1.0/restwav; wavep = wave; zoptp = zopt; statp = stat; for (iwave = 0; iwave < nwave; iwave++) { *zoptp = r*(*wavep) - 1.0; *(statp++) = 0; wavep += swave; zoptp += szopt; } return 0; } /*--------------------------------------------------------------------------*/ int zoptwave(restwav, nzopt, szopt, swave, zopt, wave, stat) double restwav; int nzopt, szopt, swave; const double zopt[]; double wave[]; int stat[]; { register int izopt, *statp; register const double *zoptp; register double *wavep; zoptp = zopt; wavep = wave; statp = stat; for (izopt = 0; izopt < nzopt; izopt++) { *wavep = restwav*(1.0 + *zoptp); *(statp++) = 0; zoptp += szopt; wavep += swave; } return 0; } /*============================================================================ * Conversions between relativistic velocity and beta (= v/c). *===========================================================================*/ int velobeta(dummy, nvelo, svelo, sbeta, velo, beta, stat) double dummy; int nvelo, svelo, sbeta; const double velo[]; double beta[]; int stat[]; { register int ivelo, *statp; register const double *velop; register double *betap; velop = velo; betap = beta; statp = stat; for (ivelo = 0; ivelo < nvelo; ivelo++) { *betap = (*velop)/C; *(statp++) = 0; velop += svelo; betap += sbeta; } return 0; } /*--------------------------------------------------------------------------*/ int betavelo(dummy, nbeta, sbeta, svelo, beta, velo, stat) double dummy; int nbeta, sbeta, svelo; const double beta[]; double velo[]; int stat[]; { register int ibeta, *statp; register const double *betap; register double *velop; betap = beta; velop = velo; statp = stat; for (ibeta = 0; ibeta < nbeta; ibeta++) { *velop = (*betap)*C; *(statp++) = 0; betap += sbeta; velop += svelo; } return 0; } astropy-1.1.1/cextern/wcslib/C/wcsmath.h0000644001134200020070000000377412644017723021074 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsmath.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of wcsmath.h * -------------------- * Definition of mathematical constants used by WCSLIB. * *===========================================================================*/ #ifndef WCSLIB_WCSMATH #define WCSLIB_WCSMATH #ifdef PI #undef PI #endif #ifdef D2R #undef D2R #endif #ifdef R2D #undef R2D #endif #ifdef SQRT2 #undef SQRT2 #endif #ifdef SQRT2INV #undef SQRT2INV #endif #define PI 3.141592653589793238462643 #define D2R PI/180.0 #define R2D 180.0/PI #define SQRT2 1.4142135623730950488 #define SQRT2INV 1.0/SQRT2 #ifdef UNDEFINED #undef UNDEFINED #endif #define UNDEFINED 987654321.0e99 #define undefined(value) (value == UNDEFINED) #endif /* WCSLIB_WCSMATH */ astropy-1.1.1/cextern/wcslib/C/cel.c0000644001134200020070000003135112644017723020154 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: cel.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include "wcserr.h" #include "wcsmath.h" #include "wcsprintf.h" #include "wcstrig.h" #include "sph.h" #include "cel.h" const int CELSET = 137; /* Map status return value to message. */ const char *cel_errmsg[] = { "Success", "Null celprm pointer passed", "Invalid projection parameters", "Invalid coordinate transformation parameters", "Ill-conditioned coordinate transformation parameters", "One or more of the (x,y) coordinates were invalid", "One or more of the (lng,lat) coordinates were invalid"}; /* Map error returns for lower-level routines. */ const int cel_prjerr[] = { CELERR_SUCCESS, /* 0: PRJERR_SUCCESS */ CELERR_NULL_POINTER, /* 1: PRJERR_NULL_POINTER */ CELERR_BAD_PARAM, /* 2: PRJERR_BAD_PARAM */ CELERR_BAD_PIX, /* 3: PRJERR_BAD_PIX */ CELERR_BAD_WORLD /* 4: PRJERR_BAD_WORLD */ }; /* Convenience macro for invoking wcserr_set(). */ #define CEL_ERRMSG(status) WCSERR_SET(status), cel_errmsg[status] /*--------------------------------------------------------------------------*/ int celini(cel) struct celprm *cel; { register int k; if (cel == 0x0) return CELERR_NULL_POINTER; cel->flag = 0; cel->offset = 0; cel->phi0 = UNDEFINED; cel->theta0 = UNDEFINED; cel->ref[0] = 0.0; cel->ref[1] = 0.0; cel->ref[2] = UNDEFINED; cel->ref[3] = +90.0; for (k = 0; k < 5; cel->euler[k++] = 0.0); cel->latpreq = -1; cel->err = 0x0; return cel_prjerr[prjini(&(cel->prj))]; } /*--------------------------------------------------------------------------*/ int celfree(cel) struct celprm *cel; { if (cel == 0x0) return CELERR_NULL_POINTER; if (cel->err) { free(cel->err); cel->err = 0x0; } return cel_prjerr[prjfree(&(cel->prj))]; } /*--------------------------------------------------------------------------*/ int celprt(cel) const struct celprm *cel; { int i; if (cel == 0x0) return CELERR_NULL_POINTER; wcsprintf(" flag: %d\n", cel->flag); wcsprintf(" offset: %d\n", cel->offset); if (undefined(cel->phi0)) { wcsprintf(" phi0: UNDEFINED\n"); } else { wcsprintf(" phi0: %9f\n", cel->phi0); } if (undefined(cel->theta0)) { wcsprintf(" theta0: UNDEFINED\n"); } else { wcsprintf(" theta0: %9f\n", cel->theta0); } wcsprintf(" ref:"); for (i = 0; i < 4; i++) { wcsprintf(" %#- 11.5g", cel->ref[i]); } wcsprintf("\n"); wcsprintf(" prj: (see below)\n"); wcsprintf(" euler:"); for (i = 0; i < 5; i++) { wcsprintf(" %#- 11.5g", cel->euler[i]); } wcsprintf("\n"); wcsprintf(" latpreq: %d", cel->latpreq); if (cel->latpreq == 0) { wcsprintf(" (not required)\n"); } else if (cel->latpreq == 1) { wcsprintf(" (disambiguation)\n"); } else if (cel->latpreq == 2) { wcsprintf(" (specification)\n"); } else { wcsprintf(" (UNDEFINED)\n"); } wcsprintf(" isolat: %d\n", cel->isolat); WCSPRINTF_PTR(" err: ", cel->err, "\n"); if (cel->err) { wcserr_prt(cel->err, " "); } wcsprintf("\n"); wcsprintf(" prj.*\n"); prjprt(&(cel->prj)); return 0; } /*--------------------------------------------------------------------------*/ int celperr(const struct celprm *cel, const char *prefix) { if (cel == 0x0) return CELERR_NULL_POINTER; if (cel->err && wcserr_prt(cel->err, prefix) == 0) { wcserr_prt(cel->prj.err, prefix); } return 0; } /*--------------------------------------------------------------------------*/ int celset(cel) struct celprm *cel; { static const char *function = "celset"; int status; const double tol = 1.0e-10; double clat0, cphip, cthe0, lat0, lng0, phip, slat0, slz, sphip, sthe0; double latp, latp1, latp2, lngp; double u, v, x, y, z; struct prjprm *celprj; struct wcserr **err; if (cel == 0x0) return CELERR_NULL_POINTER; err = &(cel->err); /* Initialize the projection driver routines. */ celprj = &(cel->prj); if (cel->offset) { celprj->phi0 = cel->phi0; celprj->theta0 = cel->theta0; } else { /* Ensure that these are undefined - no fiducial offset. */ celprj->phi0 = UNDEFINED; celprj->theta0 = UNDEFINED; } if ((status = prjset(celprj))) { return wcserr_set(CEL_ERRMSG(cel_prjerr[status])); } /* Defaults set by the projection routines. */ if (undefined(cel->phi0)) { cel->phi0 = celprj->phi0; } if (undefined(cel->theta0)) { cel->theta0 = celprj->theta0; } else if (fabs(cel->theta0) > 90.0) { if (fabs(cel->theta0) > 90.0 + tol) { return wcserr_set(WCSERR_SET(CELERR_BAD_COORD_TRANS), "Invalid coordinate transformation parameters: theta0 > 90"); } if (cel->theta0 > 90.0) { cel->theta0 = 90.0; } else { cel->theta0 = -90.0; } } lng0 = cel->ref[0]; lat0 = cel->ref[1]; phip = cel->ref[2]; latp = cel->ref[3]; /* Set default for native longitude of the celestial pole? */ if (undefined(phip) || phip == 999.0) { phip = (lat0 < cel->theta0) ? 180.0 : 0.0; phip += cel->phi0; if (phip < -180.0) { phip += 360.0; } else if (phip > 180.0) { phip -= 360.0; } cel->ref[2] = phip; } /* Compute celestial coordinates of the native pole. */ cel->latpreq = 0; if (cel->theta0 == 90.0) { /* Fiducial point at the native pole. */ lngp = lng0; latp = lat0; } else { /* Fiducial point away from the native pole. */ sincosd(lat0, &slat0, &clat0); sincosd(cel->theta0, &sthe0, &cthe0); if (phip == cel->phi0) { sphip = 0.0; cphip = 1.0; u = cel->theta0; v = 90.0 - lat0; } else { sincosd(phip - cel->phi0, &sphip, &cphip); x = cthe0*cphip; y = sthe0; z = sqrt(x*x + y*y); if (z == 0.0) { if (slat0 != 0.0) { return wcserr_set(WCSERR_SET(CELERR_BAD_COORD_TRANS), "Invalid coordinate description:\n" "lat0 == 0 is required for |phip - phi0| = 90 and theta0 == 0"); } /* latp determined solely by LATPOLEa in this case. */ cel->latpreq = 2; if (latp > 90.0) { latp = 90.0; } else if (latp < -90.0) { latp = -90.0; } } else { slz = slat0/z; if (fabs(slz) > 1.0) { if ((fabs(slz) - 1.0) < tol) { if (slz > 0.0) { slz = 1.0; } else { slz = -1.0; } } else { return wcserr_set(WCSERR_SET(CELERR_BAD_COORD_TRANS), "Invalid coordinate description:\n|lat0| <= %.3f is required " "for these values of phip, phi0, and theta0", asind(z)); } } u = atan2d(y,x); v = acosd(slz); } } if (cel->latpreq == 0) { latp1 = u + v; if (latp1 > 180.0) { latp1 -= 360.0; } else if (latp1 < -180.0) { latp1 += 360.0; } latp2 = u - v; if (latp2 > 180.0) { latp2 -= 360.0; } else if (latp2 < -180.0) { latp2 += 360.0; } if (fabs(latp1) < 90.0+tol && fabs(latp2) < 90.0+tol) { /* There are two valid solutions for latp. */ cel->latpreq = 1; } if (fabs(latp-latp1) < fabs(latp-latp2)) { if (fabs(latp1) < 90.0+tol) { latp = latp1; } else { latp = latp2; } } else { if (fabs(latp2) < 90.0+tol) { latp = latp2; } else { latp = latp1; } } /* Account for rounding error. */ if (fabs(latp) < 90.0+tol) { if (latp > 90.0) { latp = 90.0; } else if (latp < -90.0) { latp = -90.0; } } } z = cosd(latp)*clat0; if (fabs(z) < tol) { if (fabs(clat0) < tol) { /* Celestial pole at the fiducial point. */ lngp = lng0; } else if (latp > 0.0) { /* Celestial north pole at the native pole.*/ lngp = lng0 + phip - cel->phi0 - 180.0; } else { /* Celestial south pole at the native pole. */ lngp = lng0 - phip + cel->phi0; } } else { x = (sthe0 - sind(latp)*slat0)/z; y = sphip*cthe0/clat0; if (x == 0.0 && y == 0.0) { /* Sanity check (shouldn't be possible). */ return wcserr_set(WCSERR_SET(CELERR_BAD_COORD_TRANS), "Invalid coordinate transformation parameters, internal error"); } lngp = lng0 - atan2d(y,x); } /* Make celestial longitude of the native pole the same sign as at the fiducial point. */ if (lng0 >= 0.0) { if (lngp < 0.0) { lngp += 360.0; } else if (lngp > 360.0) { lngp -= 360.0; } } else { if (lngp > 0.0) { lngp -= 360.0; } else if (lngp < -360.0) { lngp += 360.0; } } } /* Reset LATPOLEa. */ cel->ref[3] = latp; /* Set the Euler angles. */ cel->euler[0] = lngp; cel->euler[1] = 90.0 - latp; cel->euler[2] = phip; sincosd(cel->euler[1], &cel->euler[4], &cel->euler[3]); cel->isolat = (cel->euler[4] == 0.0); cel->flag = CELSET; /* Check for ill-conditioned parameters. */ if (fabs(latp) > 90.0+tol) { return wcserr_set(WCSERR_SET(CELERR_ILL_COORD_TRANS), "Ill-conditioned coordinate transformation parameters\nNo valid " "solution for latp for these values of phip, phi0, and theta0"); } return 0; } /*--------------------------------------------------------------------------*/ int celx2s(cel, nx, ny, sxy, sll, x, y, phi, theta, lng, lat, stat) struct celprm *cel; int nx, ny, sxy, sll; const double x[], y[]; double phi[], theta[]; double lng[], lat[]; int stat[]; { static const char *function = "celx2s"; int istat, nphi, status = 0; struct prjprm *celprj; struct wcserr **err; /* Initialize. */ if (cel == 0x0) return CELERR_NULL_POINTER; err = &(cel->err); if (cel->flag != CELSET) { if ((status = celset(cel))) return status; } /* Apply spherical deprojection. */ celprj = &(cel->prj); if ((istat = celprj->prjx2s(celprj, nx, ny, sxy, 1, x, y, phi, theta, stat))) { if (istat) { status = wcserr_set(CEL_ERRMSG(cel_prjerr[istat])); if (status != CELERR_BAD_PIX) { return status; } } } nphi = (ny > 0) ? (nx*ny) : nx; /* Compute celestial coordinates. */ sphx2s(cel->euler, nphi, 0, 1, sll, phi, theta, lng, lat); return status; } /*--------------------------------------------------------------------------*/ int cels2x(cel, nlng, nlat, sll, sxy, lng, lat, phi, theta, x, y, stat) struct celprm *cel; int nlng, nlat, sll, sxy; const double lng[], lat[]; double phi[], theta[]; double x[], y[]; int stat[]; { static const char *function = "cels2x"; int istat, nphi, ntheta, status = 0; struct prjprm *celprj; struct wcserr **err; /* Initialize. */ if (cel == 0x0) return CELERR_NULL_POINTER; err = &(cel->err); if (cel->flag != CELSET) { if ((status = celset(cel))) return status; } /* Compute native coordinates. */ sphs2x(cel->euler, nlng, nlat, sll, 1, lng, lat, phi, theta); if (cel->isolat) { /* Constant celestial latitude -> constant native latitude. */ nphi = nlng; ntheta = nlat; } else { nphi = (nlat > 0) ? (nlng*nlat) : nlng; ntheta = 0; } /* Apply the spherical projection. */ celprj = &(cel->prj); if ((istat = celprj->prjs2x(celprj, nphi, ntheta, 1, sxy, phi, theta, x, y, stat))) { if (istat) { status = wcserr_set(CEL_ERRMSG(cel_prjerr[istat])); if (status != CELERR_BAD_WORLD) { return status; } } } return status; } astropy-1.1.1/cextern/wcslib/C/wcsunits.h0000644001134200020070000004147212644017723021302 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsunits.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the wcsunits routines * -------------------------------- * Routines in this suite deal with units specifications and conversions, as * described in * = "Representations of world coordinates in FITS", = Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I) * * The Flexible Image Transport System (FITS), a data format widely used in * astronomy for data interchange and archive, is described in * = "Definition of the Flexible Image Transport System (FITS), version 3.0", = Pence, W.D., Chiappetti, L., Page, C.G., Shaw, R.A., & Stobie, E. 2010, = A&A, 524, A42 - http://dx.doi.org/10.1051/0004-6361/201015362 * * See also http://fits.gsfc.nasa.gov * * These routines perform basic units-related operations: * * - wcsunitse(): given two unit specifications, derive the conversion from * one to the other. * * - wcsutrne(): translates certain commonly used but non-standard unit * strings. It is intended to be called before wcsulexe() which only * handles standard FITS units specifications. * * - wcsulexe(): parses a standard FITS units specification of arbitrary * complexity, deriving the conversion to canonical units. * * * wcsunitse() - FITS units specification conversion * ------------------------------------------------- * wcsunitse() derives the conversion from one system of units to another. * * A deprecated form of this function, wcsunits(), lacks the wcserr** * parameter. * * Given: * have const char [] * FITS units specification to convert from (null- * terminated), with or without surrounding square * brackets (for inline specifications); text following * the closing bracket is ignored. * * want const char [] * FITS units specification to convert to (null- * terminated), with or without surrounding square * brackets (for inline specifications); text following * the closing bracket is ignored. * * Returned: * scale, * offset, * power double* Convert units using * = pow(scale*value + offset, power); * * Normally offset is zero except for log() or ln() * conversions, e.g. "log(MHz)" to "ln(Hz)". Likewise, * power is normally unity except for exp() conversions, * e.g. "exp(ms)" to "exp(/Hz)". Thus conversions * ordinarily consist of * = value *= scale; * * err struct wcserr ** * If enabled, for function return values > 1, this * struct will contain a detailed error message, see * wcserr_enable(). May be NULL if an error message is * not desired. Otherwise, the user is responsible for * deleting the memory allocated for the wcserr struct. * * Function return value: * int Status return value: * 0: Success. * 1-9: Status return from wcsulexe(). * 10: Non-conformant unit specifications. * 11: Non-conformant functions. * * scale is zeroed on return if an error occurs. * * * wcsutrne() - Translation of non-standard unit specifications * ------------------------------------------------------------ * wcsutrne() translates certain commonly used but non-standard unit strings, * e.g. "DEG", "MHZ", "KELVIN", that are not recognized by wcsulexe(), refer to * the notes below for a full list. Compounds are also recognized, e.g. * "JY/BEAM" and "KM/SEC/SEC". Extraneous embedded blanks are removed. * * A deprecated form of this function, wcsutrn(), lacks the wcserr** parameter. * * Given: * ctrl int Although "S" is commonly used to represent seconds, * its translation to "s" is potentially unsafe since the * standard recognizes "S" formally as Siemens, however * rarely that may be used. The same applies to "H" for * hours (Henry), and "D" for days (Debye). This * bit-flag controls what to do in such cases: * 1: Translate "S" to "s". * 2: Translate "H" to "h". * 4: Translate "D" to "d". * Thus ctrl == 0 doesn't do any unsafe translations, * whereas ctrl == 7 does all of them. * * Given and returned: * unitstr char [] Null-terminated character array containing the units * specification to be translated. * * Inline units specifications in the a FITS header * keycomment are also handled. If the first non-blank * character in unitstr is '[' then the unit string is * delimited by its matching ']'. Blanks preceding '[' * will be stripped off, but text following the closing * bracket will be preserved without modification. * * err struct wcserr ** * If enabled, for function return values > 1, this * struct will contain a detailed error message, see * wcserr_enable(). May be NULL if an error message is * not desired. Otherwise, the user is responsible for * deleting the memory allocated for the wcserr struct. * * Function return value: * int Status return value: * -1: No change was made, other than stripping blanks * (not an error). * 0: Success. * 9: Internal parser error. * 12: Potentially unsafe translation, whether applied * or not (see notes). * * Notes: * Translation of non-standard unit specifications: apart from leading and * trailing blanks, a case-sensitive match is required for the aliases listed * below, in particular the only recognized aliases with metric prefixes are * "KM", "KHZ", "MHZ", and "GHZ". Potentially unsafe translations of "D", * "H", and "S", shown in parentheses, are optional. * = Unit Recognized aliases = ---- ------------------------------------------------------------- = Angstrom angstrom = arcmin arcmins, ARCMIN, ARCMINS = arcsec arcsecs, ARCSEC, ARCSECS = beam BEAM = byte Byte = d day, days, (D), DAY, DAYS = deg degree, degrees, DEG, DEGREE, DEGREES = GHz GHZ = h hr, (H), HR = Hz hz, HZ = kHz KHZ = Jy JY = K kelvin, kelvins, Kelvin, Kelvins, KELVIN, KELVINS = km KM = m metre, meter, metres, meters, M, METRE, METER, METRES, METERS = min MIN = MHz MHZ = Ohm ohm = Pa pascal, pascals, Pascal, Pascals, PASCAL, PASCALS = pixel pixels, PIXEL, PIXELS = rad radian, radians, RAD, RADIAN, RADIANS = s sec, second, seconds, (S), SEC, SECOND, SECONDS = V volt, volts, Volt, Volts, VOLT, VOLTS = yr year, years, YR, YEAR, YEARS * * The aliases "angstrom", "ohm", and "Byte" for (Angstrom, Ohm, and byte) * are recognized by wcsulexe() itself as an unofficial extension of the * standard, but they are converted to the standard form here. * * * wcsulexe() - FITS units specification parser * -------------------------------------------- * wcsulexe() parses a standard FITS units specification of arbitrary * complexity, deriving the scale factor required to convert to canonical * units - basically SI with degrees and "dimensionless" additions such as * byte, pixel and count. * * A deprecated form of this function, wcsulex(), lacks the wcserr** parameter. * * Given: * unitstr const char [] * Null-terminated character array containing the units * specification, with or without surrounding square * brackets (for inline specifications); text following * the closing bracket is ignored. * * Returned: * func int* Special function type, see note 4: * 0: None * 1: log() ...base 10 * 2: ln() ...base e * 3: exp() * * scale double* Scale factor for the unit specification; multiply a * value expressed in the given units by this factor to * convert it to canonical units. * * units double[WCSUNITS_NTYPE] * A units specification is decomposed into powers of 16 * fundamental unit types: angle, mass, length, time, * count, pixel, etc. Preprocessor macro WCSUNITS_NTYPE * is defined to dimension this vector, and others such * WCSUNITS_PLANE_ANGLE, WCSUNITS_LENGTH, etc. to access * its elements. * * Corresponding character strings, wcsunits_types[] and * wcsunits_units[], are predefined to describe each * quantity and its canonical units. * * err struct wcserr ** * If enabled, for function return values > 1, this * struct will contain a detailed error message, see * wcserr_enable(). May be NULL if an error message is * not desired. Otherwise, the user is responsible for * deleting the memory allocated for the wcserr struct. * * Function return value: * int Status return value: * 0: Success. * 1: Invalid numeric multiplier. * 2: Dangling binary operator. * 3: Invalid symbol in INITIAL context. * 4: Function in invalid context. * 5: Invalid symbol in EXPON context. * 6: Unbalanced bracket. * 7: Unbalanced parenthesis. * 8: Consecutive binary operators. * 9: Internal parser error. * * scale and units[] are zeroed on return if an error * occurs. * * Notes: * 1: wcsulexe() is permissive in accepting whitespace in all contexts in a * units specification where it does not create ambiguity (e.g. not * between a metric prefix and a basic unit string), including in strings * like "log (m ** 2)" which is formally disallowed. * * 2: Supported extensions: * - "angstrom" (OGIP usage) is allowed in addition to "Angstrom". * - "ohm" (OGIP usage) is allowed in addition to "Ohm". * - "Byte" (common usage) is allowed in addition to "byte". * * 3: Table 6 of WCS Paper I lists eleven units for which metric prefixes are * allowed. However, in this implementation only prefixes greater than * unity are allowed for "a" (annum), "yr" (year), "pc" (parsec), "bit", * and "byte", and only prefixes less than unity are allowed for "mag" * (stellar magnitude). * * Metric prefix "P" (peta) is specifically forbidden for "a" (annum) to * avoid confusion with "Pa" (Pascal, not peta-annum). Note that metric * prefixes are specifically disallowed for "h" (hour) and "d" (day) so * that "ph" (photons) cannot be interpreted as pico-hours, nor "cd" * (candela) as centi-days. * * 4: Function types log(), ln() and exp() may only occur at the start of the * units specification. The scale and units[] returned for these refers * to the string inside the function "argument", e.g. to "MHz" in log(MHz) * for which a scale of 1e6 will be returned. * * * Global variable: const char *wcsunits_errmsg[] - Status return messages * ----------------------------------------------------------------------- * Error messages to match the status value returned from each function. * * * Global variable: const char *wcsunits_types[] - Names of physical quantities * ---------------------------------------------------------------------------- * Names for physical quantities to match the units vector returned by * wcsulexe(): * - 0: plane angle * - 1: solid angle * - 2: charge * - 3: mole * - 4: temperature * - 5: luminous intensity * - 6: mass * - 7: length * - 8: time * - 9: beam * - 10: bin * - 11: bit * - 12: count * - 13: stellar magnitude * - 14: pixel * - 15: solar ratio * - 16: voxel * * * Global variable: const char *wcsunits_units[] - Names of units * -------------------------------------------------------------- * Names for the units (SI) to match the units vector returned by wcsulexe(): * - 0: degree * - 1: steradian * - 2: Coulomb * - 3: mole * - 4: Kelvin * - 5: candela * - 6: kilogram * - 7: metre * - 8: second * * The remainder are dimensionless. *===========================================================================*/ #ifndef WCSLIB_WCSUNITS #define WCSLIB_WCSUNITS #include "wcserr.h" #ifdef __cplusplus extern "C" { #endif extern const char *wcsunits_errmsg[]; enum wcsunits_errmsg_enum { UNITSERR_SUCCESS = 0, /* Success. */ UNITSERR_BAD_NUM_MULTIPLIER = 1, /* Invalid numeric multiplier. */ UNITSERR_DANGLING_BINOP = 2, /* Dangling binary operator. */ UNITSERR_BAD_INITIAL_SYMBOL = 3, /* Invalid symbol in INITIAL context. */ UNITSERR_FUNCTION_CONTEXT = 4, /* Function in invalid context. */ UNITSERR_BAD_EXPON_SYMBOL = 5, /* Invalid symbol in EXPON context. */ UNITSERR_UNBAL_BRACKET = 6, /* Unbalanced bracket. */ UNITSERR_UNBAL_PAREN = 7, /* Unbalanced parenthesis. */ UNITSERR_CONSEC_BINOPS = 8, /* Consecutive binary operators. */ UNITSERR_PARSER_ERROR = 9, /* Internal parser error. */ UNITSERR_BAD_UNIT_SPEC = 10, /* Non-conformant unit specifications. */ UNITSERR_BAD_FUNCS = 11, /* Non-conformant functions. */ UNITSERR_UNSAFE_TRANS = 12 /* Potentially unsafe translation. */ }; extern const char *wcsunits_types[]; extern const char *wcsunits_units[]; #define WCSUNITS_PLANE_ANGLE 0 #define WCSUNITS_SOLID_ANGLE 1 #define WCSUNITS_CHARGE 2 #define WCSUNITS_MOLE 3 #define WCSUNITS_TEMPERATURE 4 #define WCSUNITS_LUMINTEN 5 #define WCSUNITS_MASS 6 #define WCSUNITS_LENGTH 7 #define WCSUNITS_TIME 8 #define WCSUNITS_BEAM 9 #define WCSUNITS_BIN 10 #define WCSUNITS_BIT 11 #define WCSUNITS_COUNT 12 #define WCSUNITS_MAGNITUDE 13 #define WCSUNITS_PIXEL 14 #define WCSUNITS_SOLRATIO 15 #define WCSUNITS_VOXEL 16 #define WCSUNITS_NTYPE 17 int wcsunitse(const char have[], const char want[], double *scale, double *offset, double *power, struct wcserr **err); int wcsutrne(int ctrl, char unitstr[], struct wcserr **err); int wcsulexe(const char unitstr[], int *func, double *scale, double units[WCSUNITS_NTYPE], struct wcserr **err); /* Deprecated. */ int wcsunits(const char have[], const char want[], double *scale, double *offset, double *power); int wcsutrn(int ctrl, char unitstr[]); int wcsulex(const char unitstr[], int *func, double *scale, double units[WCSUNITS_NTYPE]); #ifdef __cplusplus } #endif #endif /* WCSLIB_WCSUNITS */ astropy-1.1.1/cextern/wcslib/C/sph.c0000644001134200020070000002617112644017723020207 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: sph.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include "wcstrig.h" #include "sph.h" #define copysign(X, Y) ((Y) < 0.0 ? -fabs(X) : fabs(X)) #define tol 1.0e-5 /*--------------------------------------------------------------------------*/ int sphx2s( const double eul[5], int nphi, int ntheta, int spt, int sll, const double phi[], const double theta[], double lng[], double lat[]) { int jphi, mphi, mtheta, rowlen, rowoff; double cosphi, costhe, costhe3, costhe4, dlng, dphi, sinphi, sinthe, sinthe3, sinthe4, x, y, z; register int iphi, itheta; register const double *phip, *thetap; register double *latp, *lngp; if (ntheta > 0) { mphi = nphi; mtheta = ntheta; } else { mphi = 1; mtheta = 1; ntheta = nphi; } /* Check for special-case rotations. */ if (eul[4] == 0.0) { if (eul[1] == 0.0) { /* Simple change in origin of longitude. */ dlng = fmod(eul[0] + 180.0 - eul[2], 360.0); jphi = 0; thetap = theta; lngp = lng; latp = lat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { phip = phi + (jphi%nphi)*spt; for (iphi = 0; iphi < mphi; iphi++, phip += spt, jphi++) { *lngp = *phip + dlng; *latp = *thetap; /* Normalize the celestial longitude. */ if (eul[0] >= 0.0) { if (*lngp < 0.0) *lngp += 360.0; } else { if (*lngp > 0.0) *lngp -= 360.0; } if (*lngp > 360.0) { *lngp -= 360.0; } else if (*lngp < -360.0) { *lngp += 360.0; } lngp += sll; latp += sll; } } } else { /* Pole-flip with change in origin of longitude. */ dlng = fmod(eul[0] + eul[2], 360.0); jphi = 0; thetap = theta; lngp = lng; latp = lat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { phip = phi + (jphi%nphi)*spt; for (iphi = 0; iphi < mphi; iphi++, phip += spt, jphi++) { *lngp = dlng - *phip; *latp = -(*thetap); /* Normalize the celestial longitude. */ if (eul[0] >= 0.0) { if (*lngp < 0.0) *lngp += 360.0; } else { if (*lngp > 0.0) *lngp -= 360.0; } if (*lngp > 360.0) { *lngp -= 360.0; } else if (*lngp < -360.0) { *lngp += 360.0; } lngp += sll; latp += sll; } } } return 0; } /* Do phi dependency. */ phip = phi; rowoff = 0; rowlen = nphi*sll; for (iphi = 0; iphi < nphi; iphi++, rowoff += sll, phip += spt) { dphi = *phip - eul[2]; lngp = lng + rowoff; for (itheta = 0; itheta < mtheta; itheta++) { *lngp = dphi; lngp += rowlen; } } /* Do theta dependency. */ thetap = theta; lngp = lng; latp = lat; for (itheta = 0; itheta < ntheta; itheta++, thetap += spt) { sincosd(*thetap, &sinthe, &costhe); costhe3 = costhe*eul[3]; costhe4 = costhe*eul[4]; sinthe3 = sinthe*eul[3]; sinthe4 = sinthe*eul[4]; for (iphi = 0; iphi < mphi; iphi++, lngp += sll, latp += sll) { dphi = *lngp; sincosd(dphi, &sinphi, &cosphi); /* Compute the celestial longitude. */ x = sinthe4 - costhe3*cosphi; if (fabs(x) < tol) { /* Rearrange formula to reduce roundoff errors. */ x = -cosd(*thetap + eul[1]) + costhe3*(1.0 - cosphi); } y = -costhe*sinphi; if (x != 0.0 || y != 0.0) { dlng = atan2d(y, x); } else { /* Change of origin of longitude. */ if (eul[1] < 90.0) { dlng = dphi + 180.0; } else { dlng = -dphi; } } *lngp = eul[0] + dlng; /* Normalize the celestial longitude. */ if (eul[0] >= 0.0) { if (*lngp < 0.0) *lngp += 360.0; } else { if (*lngp > 0.0) *lngp -= 360.0; } if (*lngp > 360.0) { *lngp -= 360.0; } else if (*lngp < -360.0) { *lngp += 360.0; } /* Compute the celestial latitude. */ if (fmod(dphi,180.0) == 0.0) { *latp = *thetap + cosphi*eul[1]; if (*latp > 90.0) *latp = 180.0 - *latp; if (*latp < -90.0) *latp = -180.0 - *latp; } else { z = sinthe3 + costhe4*cosphi; if (fabs(z) > 0.99) { /* Use an alternative formula for greater accuracy. */ *latp = copysign(acosd(sqrt(x*x+y*y)), z); } else { *latp = asind(z); } } } } return 0; } /*--------------------------------------------------------------------------*/ int sphs2x( const double eul[5], int nlng, int nlat, int sll, int spt, const double lng[], const double lat[], double phi[], double theta[]) { int jlng, mlat, mlng, rowlen, rowoff; double coslat, coslat3, coslat4, coslng, dlng, dphi, sinlat, sinlat3, sinlat4, sinlng, x, y, z; register int ilat, ilng; register const double *latp, *lngp; register double *phip, *thetap; if (nlat > 0) { mlng = nlng; mlat = nlat; } else { mlng = 1; mlat = 1; nlat = nlng; } /* Check for special-case rotations. */ if (eul[4] == 0.0) { if (eul[1] == 0.0) { /* Simple change in origin of longitude. */ dphi = fmod(eul[2] - 180.0 - eul[0], 360.0); jlng = 0; latp = lat; phip = phi; thetap = theta; for (ilat = 0; ilat < nlat; ilat++, latp += sll) { lngp = lng + (jlng%nlng)*sll; for (ilng = 0; ilng < mlng; ilng++, lngp += sll, jlng++) { *phip = fmod(*lngp + dphi, 360.0); *thetap = *latp; /* Normalize the native longitude. */ if (*phip > 180.0) { *phip -= 360.0; } else if (*phip < -180.0) { *phip += 360.0; } phip += spt; thetap += spt; } } } else { /* Pole-flip with change in origin of longitude. */ dphi = fmod(eul[2] + eul[0], 360.0); jlng = 0; latp = lat; phip = phi; thetap = theta; for (ilat = 0; ilat < nlat; ilat++, latp += sll) { lngp = lng + (jlng%nlng)*sll; for (ilng = 0; ilng < mlng; ilng++, lngp += sll, jlng++) { *phip = fmod(dphi - *lngp, 360.0); *thetap = -(*latp); /* Normalize the native longitude. */ if (*phip > 180.0) { *phip -= 360.0; } else if (*phip < -180.0) { *phip += 360.0; } phip += spt; thetap += spt; } } } return 0; } /* Do lng dependency. */ lngp = lng; rowoff = 0; rowlen = nlng*spt; for (ilng = 0; ilng < nlng; ilng++, rowoff += spt, lngp += sll) { dlng = *lngp - eul[0]; phip = phi + rowoff; thetap = theta; for (ilat = 0; ilat < mlat; ilat++) { *phip = dlng; phip += rowlen; } } /* Do lat dependency. */ latp = lat; phip = phi; thetap = theta; for (ilat = 0; ilat < nlat; ilat++, latp += sll) { sincosd(*latp, &sinlat, &coslat); coslat3 = coslat*eul[3]; coslat4 = coslat*eul[4]; sinlat3 = sinlat*eul[3]; sinlat4 = sinlat*eul[4]; for (ilng = 0; ilng < mlng; ilng++, phip += spt, thetap += spt) { dlng = *phip; sincosd(dlng, &sinlng, &coslng); /* Compute the native longitude. */ x = sinlat4 - coslat3*coslng; if (fabs(x) < tol) { /* Rearrange formula to reduce roundoff errors. */ x = -cosd(*latp+eul[1]) + coslat3*(1.0 - coslng); } y = -coslat*sinlng; if (x != 0.0 || y != 0.0) { dphi = atan2d(y, x); } else { /* Change of origin of longitude. */ if (eul[1] < 90.0) { dphi = dlng - 180.0; } else { dphi = -dlng; } } *phip = fmod(eul[2] + dphi, 360.0); /* Normalize the native longitude. */ if (*phip > 180.0) { *phip -= 360.0; } else if (*phip < -180.0) { *phip += 360.0; } /* Compute the native latitude. */ if (fmod(dlng,180.0) == 0.0) { *thetap = *latp + coslng*eul[1]; if (*thetap > 90.0) *thetap = 180.0 - *thetap; if (*thetap < -90.0) *thetap = -180.0 - *thetap; } else { z = sinlat3 + coslat4*coslng; if (fabs(z) > 0.99) { /* Use an alternative formula for greater accuracy. */ *thetap = copysign(acosd(sqrt(x*x+y*y)), z); } else { *thetap = asind(z); } } } } return 0; } /*--------------------------------------------------------------------------*/ int sphdpa( int nfield, double lng0, double lat0, const double lng[], const double lat[], double dist[], double pa[]) { int i; double eul[5]; /* Set the Euler angles for the coordinate transformation. */ eul[0] = lng0; eul[1] = 90.0 - lat0; eul[2] = 0.0; eul[3] = cosd(eul[1]); eul[4] = sind(eul[1]); /* Transform field points to the new system. */ sphs2x(eul, nfield, 0, 1, 1, lng, lat, pa, dist); for (i = 0; i < nfield; i++) { /* Angular distance is obtained from latitude in the new frame. */ dist[i] = 90.0 - dist[i]; /* Position angle is obtained from longitude in the new frame. */ pa[i] = -pa[i]; if (pa[i] < -180.0) pa[i] += 360.0; } return 0; } /*--------------------------------------------------------------------------*/ int sphpad( int nfield, double lng0, double lat0, const double dist[], const double pa[], double lng[], double lat[]) { int i; double eul[5]; /* Set the Euler angles for the coordinate transformation. */ eul[0] = lng0; eul[1] = 90.0 - lat0; eul[2] = 0.0; eul[3] = cosd(eul[1]); eul[4] = sind(eul[1]); for (i = 0; i < nfield; i++) { /* Latitude in the new frame is obtained from angular distance. */ lat[i] = 90.0 - dist[i]; /* Longitude in the new frame is obtained from position angle. */ lng[i] = -pa[i]; } /* Transform field points to the old system. */ sphx2s(eul, nfield, 0, 1, 1, lng, lat, lng, lat); return 0; } astropy-1.1.1/cextern/wcslib/C/wcsulex.l0000644001134200020070000004426312644017723021122 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsulex.l,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * wcsulex.l is a Flex description file containing the definition of a * recursive, multi-buffered lexical scanner that parses FITS units * specifications. * * It requires Flex v2.5.4 or later. * * Refer to wcsunits.h for a description of the user interface and operating * notes. * *===========================================================================*/ /* Options. */ %option full %option never-interactive %option noyywrap %option outfile="wcsulex.c" %option prefix="wcsulex" /* Exponents. */ INTEGER [+-]?[1-9][0-9]* FRAC {INTEGER}"/"[1-9][0-9]* FLOAT [+-]?([0-9]+\.?[0-9]*|\.[0-9]+) /* Metric prefixes. */ SUB3 [munpfazy] SUBPREFIX [dc]|{SUB3} SUP3 [kMGTPEZY] SUPPREFIX da|h|{SUP3} PREFIX {SUBPREFIX}|{SUPPREFIX} /* Basic and derived SI units. */ BASIC m|s|g|rad|sr|K|A|mol|cd DERIVED Hz|J|W|V|N|Pa|C|[Oo]hm|S|F|Wb|T|H|lm|lx SI_UNIT {BASIC}|{DERIVED} /* Additional recognized units: all metric prefixes allowed. */ ADD_ALL eV|Jy|R|G|barn /* Additional recognized units: only super-metric prefixes allowed. */ ADD_SUP a|yr|pc|bit|[bB]yte /* Additional recognized units: only sub-metric prefixes allowed. */ ADD_SUB mag /* Additional recognized units for which NO metric prefixes are allowed. */ GENERAL deg|arcmin|arcsec|mas|d|h|min|erg|Ry|u|D ASTRO [Aa]ngstrom|AU|lyr|beam|solRad|solMass|solLum|Sun DEVICE adu|bin|chan|count|ct|photon|ph|pixel|pix|voxel ADD_NONE {GENERAL}|{ASTRO}|{DEVICE} /* All additional recognized units. */ ADD_UNIT {ADD_ALL}|{ADD_SUP}|{ADD_SUB}|{ADD_NONE} /* Exclusive start states. */ %x PAREN PREFIX UNITS EXPON FLUSH %{ /* To get the prototype for fileno() from stdio.h when gcc is invoked with * -std=c89 (same as -ansi) or -std=c99 since we do not define YY_INPUT. */ #define _POSIX_SOURCE 1 #include #include #include #include #include "wcserr.h" #include "wcsmath.h" #include "wcsunits.h" #include "wcsutil.h" #define YY_DECL int wcsulexe(const char unitstr[], int *func, double *scale, \ double units[WCSUNITS_NTYPE], struct wcserr **err) /* Used in preempting the call to exit() by yy_fatal_error(). */ jmp_buf wcsulex_abort_jmp_env; #define exit(status) longjmp(wcsulex_abort_jmp_env, status) %} %% static const char *function = "wcsulexe"; char ctmp[72]; int bracket = 0; int operator = 0; int paren = 0; int status = 0; int func_r, i, j; double dexp, expon, factor, factor_r, types[WCSUNITS_NTYPE]; YY_BUFFER_STATE buf; void add(double *factor, double types[], double *expon, double *scale, double units[]); int yylex_destroy(void); if (err) *err = 0x0; *func = 0; for (i = 0; i < WCSUNITS_NTYPE; i++) { units[i] = 0.0; types[i] = 0.0; } expon = 1.0; factor = 1.0; *scale = 1.0; yy_scan_string(unitstr); /* Return here via longjmp() invoked by yy_fatal_error(). */ if (setjmp(wcsulex_abort_jmp_env)) { return wcserr_set(WCSERR_SET(UNITSERR_PARSER_ERROR), "Internal units parser error parsing '%s'", unitstr); } BEGIN(INITIAL); #ifdef DEBUG fprintf(stderr, "\n%s ->\n", unitstr); #endif ^" "+ { /* Pretend initial whitespace doesn't exist. */ yy_set_bol(1); } ^"[" { if (bracket++) { BEGIN(FLUSH); } else { yy_set_bol(1); } } ^10[0-9] { status = wcserr_set(WCSERR_SET(UNITSERR_BAD_NUM_MULTIPLIER), "Invalid exponent in '%s'", unitstr); BEGIN(FLUSH); } ^10 { factor = 10.0; BEGIN(EXPON); } ^log" "*"(" { *func = 1; unput('('); BEGIN(PAREN); } ^ln" "*"(" { *func = 2; unput('('); BEGIN(PAREN); } ^exp" "*"(" { *func = 3; unput('('); BEGIN(PAREN); } ^[*.] { /* Leading binary multiply. */ status = wcserr_set(WCSERR_SET(UNITSERR_DANGLING_BINOP), "Dangling binary operator in '%s'", unitstr); BEGIN(FLUSH); } " "+ /* Discard whitespace in INITIAL context. */ sqrt" "*"(" { expon /= 2.0; unput('('); BEGIN(PAREN); } "(" { /* Gather terms in parentheses. */ yyless(0); BEGIN(PAREN); } [*.] { if (operator++) { BEGIN(FLUSH); } } ^1"/" | "/" { if (operator++) { BEGIN(FLUSH); } else { expon *= -1.0; } } {SI_UNIT}|{ADD_UNIT} { operator = 0; yyless(0); BEGIN(UNITS); } {PREFIX}({SI_UNIT}|{ADD_ALL}) | {SUPPREFIX}{ADD_SUP} | {SUBPREFIX}{ADD_SUB} { operator = 0; yyless(0); BEGIN(PREFIX); } "]" { bracket = !bracket; BEGIN(FLUSH); } . { status = wcserr_set(WCSERR_SET(UNITSERR_BAD_INITIAL_SYMBOL), "Invalid symbol in INITIAL context in '%s'", unitstr); BEGIN(FLUSH); } "(" { paren++; operator = 0; yymore(); } ")" { paren--; if (paren) { /* Not balanced yet. */ yymore(); } else { /* Balanced; strip off the outer parentheses and recurse. */ yytext[yyleng-1] = '\0'; buf = YY_CURRENT_BUFFER; status = wcsulexe(yytext+1, &func_r, &factor_r, types, err); yy_switch_to_buffer(buf); if (func_r) { status = wcserr_set(WCSERR_SET(UNITSERR_FUNCTION_CONTEXT), "Function in invalid context in '%s'", unitstr); } if (status) { BEGIN(FLUSH); } else { factor *= factor_r; BEGIN(EXPON); } } } [^()]+ { yymore(); } d { factor = 1e-1; BEGIN(UNITS); } c { factor = 1e-2; BEGIN(UNITS); } m { factor = 1e-3; BEGIN(UNITS); } u { factor = 1e-6; BEGIN(UNITS); } n { factor = 1e-9; BEGIN(UNITS); } p { factor = 1e-12; BEGIN(UNITS); } f { factor = 1e-15; BEGIN(UNITS); } a { factor = 1e-18; BEGIN(UNITS); } z { factor = 1e-21; BEGIN(UNITS); } y { factor = 1e-24; BEGIN(UNITS); } da { factor = 1e+1; BEGIN(UNITS); } h { factor = 1e+2; BEGIN(UNITS); } k { factor = 1e+3; BEGIN(UNITS); } M { factor = 1e+6; BEGIN(UNITS); } G { factor = 1e+9; BEGIN(UNITS); } T { factor = 1e+12; BEGIN(UNITS); } P { factor = 1e+15; BEGIN(UNITS); } E { factor = 1e+18; BEGIN(UNITS); } Z { factor = 1e+21; BEGIN(UNITS); } Y { factor = 1e+24; BEGIN(UNITS); } . { /* Internal parser error. */ status = wcserr_set(WCSERR_SET(UNITSERR_PARSER_ERROR), "Internal units parser error parsing '%s'", unitstr); BEGIN(FLUSH); } A { /* Ampere. */ types[WCSUNITS_CHARGE] += 1.0; types[WCSUNITS_TIME] -= 1.0; BEGIN(EXPON); } a|yr { /* Year (annum). */ factor *= 31557600.0; types[WCSUNITS_TIME] += 1.0; BEGIN(EXPON); } adu { /* Analogue-to-digital converter units. */ types[WCSUNITS_COUNT] += 1.0; BEGIN(EXPON); } [Aa]ngstrom { /* Angstrom. */ factor *= 1e-10; types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } arcmin { /* Minute of arc. */ factor /= 60.0; types[WCSUNITS_PLANE_ANGLE] += 1.0; BEGIN(EXPON); } arcsec { /* Second of arc. */ factor /= 3600.0; types[WCSUNITS_PLANE_ANGLE] += 1.0; BEGIN(EXPON); } AU { /* Astronomical unit. */ factor *= 1.49598e+11; types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } barn { /* Barn. */ factor *= 1e-28; types[WCSUNITS_LENGTH] += 2.0; BEGIN(EXPON); } beam { /* Beam, as in Jy/beam. */ types[WCSUNITS_BEAM] += 1.0; BEGIN(EXPON); } bin { /* Bin (e.g. histogram). */ types[WCSUNITS_BIN] += 1.0; BEGIN(EXPON); } bit { /* Bit. */ types[WCSUNITS_BIT] += 1.0; BEGIN(EXPON); } [bB]yte { /* Byte. */ factor *= 8.0; types[WCSUNITS_BIT] += 1.0; BEGIN(EXPON); } C { /* Coulomb. */ types[WCSUNITS_CHARGE] += 1.0; BEGIN(EXPON); } cd { /* Candela. */ types[WCSUNITS_LUMINTEN] += 1.0; BEGIN(EXPON); } chan { /* Channel. */ types[WCSUNITS_BIN] += 1.0; BEGIN(EXPON); } count|ct { /* Count. */ types[WCSUNITS_COUNT] += 1.0; BEGIN(EXPON); } D { /* Debye. */ factor *= 1e-29 / 3.0; types[WCSUNITS_CHARGE] += 1.0; types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } d { /* Day. */ factor *= 86400.0; types[WCSUNITS_TIME] += 1.0; BEGIN(EXPON); } deg { /* Degree. */ types[WCSUNITS_PLANE_ANGLE] += 1.0; BEGIN(EXPON); } erg { /* Erg. */ factor *= 1e-7; types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } eV { /* Electron volt. */ factor *= 1.6021765e-19; types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } F { /* Farad. */ types[WCSUNITS_MASS] -= 1.0; types[WCSUNITS_LENGTH] -= 2.0; types[WCSUNITS_TIME] += 3.0; types[WCSUNITS_CHARGE] += 2.0; BEGIN(EXPON); } G { /* Gauss. */ factor *= 1e-4; types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_TIME] += 1.0; types[WCSUNITS_CHARGE] -= 1.0; BEGIN(EXPON); } g { /* Gram. */ factor *= 1e-3; types[WCSUNITS_MASS] += 1.0; BEGIN(EXPON); } H { /* Henry. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] += 2.0; types[WCSUNITS_CHARGE] -= 2.0; BEGIN(EXPON); } h { /* Hour. */ factor *= 3600.0; types[WCSUNITS_TIME] += 1.0; BEGIN(EXPON); } Hz { /* Hertz. */ types[WCSUNITS_TIME] -= 1.0; BEGIN(EXPON); } J { /* Joule. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } Jy { /* Jansky. */ factor *= 1e-26; types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } K { /* Kelvin. */ types[WCSUNITS_TEMPERATURE] += 1.0; BEGIN(EXPON); } lm { /* Lumen. */ types[WCSUNITS_LUMINTEN] += 1.0; types[WCSUNITS_SOLID_ANGLE] += 1.0; BEGIN(EXPON); } lx { /* Lux. */ types[WCSUNITS_LUMINTEN] += 1.0; types[WCSUNITS_SOLID_ANGLE] += 1.0; types[WCSUNITS_LENGTH] -= 2.0; BEGIN(EXPON); } lyr { /* Light year. */ factor *= 2.99792458e8 * 31557600.0; types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } m { /* Metre. */ types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } mag { /* Stellar magnitude. */ types[WCSUNITS_MAGNITUDE] += 1.0; BEGIN(EXPON); } mas { /* Milli-arcsec. */ factor /= 3600e+3; types[WCSUNITS_PLANE_ANGLE] += 1.0; BEGIN(EXPON); } min { /* Minute. */ factor *= 60.0; types[WCSUNITS_TIME] += 1.0; BEGIN(EXPON); } mol { /* Mole. */ types[WCSUNITS_MOLE] += 1.0; BEGIN(EXPON); } N { /* Newton. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 1.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } [Oo]hm { /* Ohm. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 1.0; types[WCSUNITS_CHARGE] -= 2.0; BEGIN(EXPON); } Pa { /* Pascal. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] -= 1.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } pc { /* Parsec. */ factor *= 3.0857e16; types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } photon|ph { /* Photon. */ types[WCSUNITS_COUNT] += 1.0; BEGIN(EXPON); } pixel|pix { /* Pixel. */ types[WCSUNITS_PIXEL] += 1.0; BEGIN(EXPON); } R { /* Rayleigh. */ factor *= 1e10 / (4.0 * PI); types[WCSUNITS_LENGTH] -= 2.0; types[WCSUNITS_TIME] -= 1.0; types[WCSUNITS_SOLID_ANGLE] -= 1.0; BEGIN(EXPON); } rad { /* Radian. */ factor *= 180.0 / PI; types[WCSUNITS_PLANE_ANGLE] += 1.0; BEGIN(EXPON); } Ry { /* Rydberg. */ factor *= 13.605692 * 1.6021765e-19; types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } S { /* Siemen. */ types[WCSUNITS_MASS] -= 1.0; types[WCSUNITS_LENGTH] -= 2.0; types[WCSUNITS_TIME] += 1.0; types[WCSUNITS_CHARGE] += 2.0; BEGIN(EXPON); } s { /* Second. */ types[WCSUNITS_TIME] += 1.0; BEGIN(EXPON); } solLum { /* Solar luminosity. */ factor *= 3.8268e26; types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 3.0; BEGIN(EXPON); } solMass { /* Solar mass. */ factor *= 1.9891e30; types[WCSUNITS_MASS] += 1.0; BEGIN(EXPON); } solRad { /* Solar radius. */ factor *= 6.9599e8; types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } sr { /* Steradian. */ types[WCSUNITS_SOLID_ANGLE] += 1.0; BEGIN(EXPON); } Sun { /* Sun (with respect to). */ types[WCSUNITS_SOLRATIO] += 1.0; BEGIN(EXPON); } T { /* Tesla. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_TIME] += 1.0; types[WCSUNITS_CHARGE] -= 1.0; BEGIN(EXPON); } u { /* Unified atomic mass unit. */ factor *= 1.6605387e-27; types[WCSUNITS_MASS] += 1.0; BEGIN(EXPON); } V { /* Volt. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 1.0; types[WCSUNITS_TIME] -= 2.0; types[WCSUNITS_CHARGE] -= 1.0; BEGIN(EXPON); } voxel { /* Voxel. */ types[WCSUNITS_VOXEL] += 1.0; BEGIN(EXPON); } W { /* Watt. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 3.0; BEGIN(EXPON); } Wb { /* Weber. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] += 1.0; types[WCSUNITS_CHARGE] -= 1.0; BEGIN(EXPON); } . { /* Internal parser error. */ status = wcserr_set(WCSERR_SET(UNITSERR_PARSER_ERROR), "Internal units parser error parsing '%s'", unitstr); BEGIN(FLUSH); } " "*("**"|^) { /* Exponentiation. */ if (operator++) { BEGIN(FLUSH); } } " "*{INTEGER} { sscanf(yytext, " %d", &i); expon *= (double)i; add(&factor, types, &expon, scale, units); operator = 0; BEGIN(INITIAL); } " "*"("" "*{INTEGER}" "*")" { sscanf(yytext, " (%d)", &i); expon *= (double)i; add(&factor, types, &expon, scale, units); operator = 0; BEGIN(INITIAL); } " "*"("" "*{FRAC}" "*")" { sscanf(yytext, " (%d/%d)", &i, &j); expon *= (double)i / (double)j; add(&factor, types, &expon, scale, units); operator = 0; BEGIN(INITIAL); } " "*"("" "*{FLOAT}" "*")" { sscanf(yytext, " (%s)", ctmp); wcsutil_str2double(ctmp, "%lf", &dexp); expon *= dexp; add(&factor, types, &expon, scale, units); operator = 0; BEGIN(INITIAL); } " "*[.*]" "* { /* Multiply. */ if (operator++) { BEGIN(FLUSH); } else { add(&factor, types, &expon, scale, units); BEGIN(INITIAL); } } " "*"(" { /* Multiply. */ if (operator) { BEGIN(FLUSH); } else { add(&factor, types, &expon, scale, units); unput('('); BEGIN(INITIAL); } } " "+ { /* Multiply. */ if (operator) { BEGIN(FLUSH); } else { add(&factor, types, &expon, scale, units); BEGIN(INITIAL); } } " "*"/"" "* { /* Divide. */ if (operator++) { BEGIN(FLUSH); } else { add(&factor, types, &expon, scale, units); expon = -1.0; BEGIN(INITIAL); } } " "*"]" { add(&factor, types, &expon, scale, units); bracket = !bracket; BEGIN(FLUSH); } . { status = wcserr_set(WCSERR_SET(UNITSERR_BAD_EXPON_SYMBOL), "Invalid symbol in EXPON context in '%s'", unitstr); BEGIN(FLUSH); } .* { /* Discard any remaining input. */ } <> { /* End-of-string. */ if (YY_START == EXPON) { add(&factor, types, &expon, scale, units); } yylex_destroy(); if (bracket) { status = wcserr_set(WCSERR_SET(UNITSERR_UNBAL_BRACKET), "Unbalanced bracket in '%s'", unitstr); } else if (paren) { status = wcserr_set(WCSERR_SET(UNITSERR_UNBAL_PAREN), "Unbalanced parenthesis in '%s'", unitstr); } else if (operator == 1) { status = wcserr_set(WCSERR_SET(UNITSERR_DANGLING_BINOP), "Dangling binary operator in '%s'", unitstr); } else if (operator) { status = wcserr_set(WCSERR_SET(UNITSERR_CONSEC_BINOPS), "Consecutive binary operators in '%s'", unitstr); #ifdef DEBUG } else { fprintf(stderr, "EOS\n"); #endif } if (status) { for (i = 0; i < WCSUNITS_NTYPE; i++) { units[i] = 0.0; *scale = 0.0; } } return status; } %% /*---------------------------------------------------------------------------- * Accumulate a term in a units specification and reset work variables. *---------------------------------------------------------------------------*/ void add( double *factor, double types[], double *expon, double *scale, double units[]) { int i; *scale *= pow(*factor, *expon); for (i = 0; i < WCSUNITS_NTYPE; i++) { units[i] += *expon * types[i]; types[i] = 0.0; } *expon = 1.0; *factor = 1.0; return; } astropy-1.1.1/cextern/wcslib/C/spc.h0000644001134200020070000011426312644017723020207 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: spc.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the spc routines * --------------------------- * Routines in this suite implement the part of the FITS World Coordinate * System (WCS) standard that deals with spectral coordinates, as described in * = "Representations of world coordinates in FITS", = Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I) = = "Representations of spectral coordinates in FITS", = Greisen, E.W., Calabretta, M.R., Valdes, F.G., & Allen, S.L. = 2006, A&A, 446, 747 (WCS Paper III) * * These routines define methods to be used for computing spectral world * coordinates from intermediate world coordinates (a linear transformation * of image pixel coordinates), and vice versa. They are based on the spcprm * struct which contains all information needed for the computations. The * struct contains some members that must be set by the user, and others that * are maintained by these routines, somewhat like a C++ class but with no * encapsulation. * * Routine spcini() is provided to initialize the spcprm struct with default * values, spcfree() reclaims any memory that may have been allocated to store * an error message, and spcprt() prints its contents. * * spcperr() prints the error message(s) (if any) stored in a spcprm struct. * * A setup routine, spcset(), computes intermediate values in the spcprm struct * from parameters in it that were supplied by the user. The struct always * needs to be set up by spcset() but it need not be called explicitly - refer * to the explanation of spcprm::flag. * * spcx2s() and spcs2x() implement the WCS spectral coordinate transformations. * In fact, they are high level driver routines for the lower level spectral * coordinate transformation routines described in spx.h. * * A number of routines are provided to aid in analysing or synthesising sets * of FITS spectral axis keywords: * * - spctype() checks a spectral CTYPEia keyword for validity and returns * information derived from it. * * - Spectral keyword analysis routine spcspxe() computes the values of the * X-type spectral variables for the S-type variables supplied. * * - Spectral keyword synthesis routine, spcxpse(), computes the S-type * variables for the X-types supplied. * * - Given a set of spectral keywords, a translation routine, spctrne(), * produces the corresponding set for the specified spectral CTYPEia. * * - spcaips() translates AIPS-convention spectral CTYPEia and VELREF * keyvalues. * * Spectral variable types - S, P, and X: * -------------------------------------- * A few words of explanation are necessary regarding spectral variable types * in FITS. * * Every FITS spectral axis has three associated spectral variables: * * S-type: the spectral variable in which coordinates are to be * expressed. Each S-type is encoded as four characters and is * linearly related to one of four basic types as follows: * * F: frequency * 'FREQ': frequency * 'AFRQ': angular frequency * 'ENER': photon energy * 'WAVN': wave number * 'VRAD': radio velocity * * W: wavelength in vacuo * 'WAVE': wavelength * 'VOPT': optical velocity * 'ZOPT': redshift * * A: wavelength in air * 'AWAV': wavelength in air * * V: velocity * 'VELO': relativistic velocity * 'BETA': relativistic beta factor * * The S-type forms the first four characters of the CTYPEia keyvalue, * and CRVALia and CDELTia are expressed as S-type quantities so that * they provide a first-order approximation to the S-type variable at * the reference point. * * Note that 'AFRQ', angular frequency, is additional to the variables * defined in WCS Paper III. * * P-type: the basic spectral variable (F, W, A, or V) with which the * S-type variable is associated (see list above). * * For non-grism axes, the P-type is encoded as the eighth character of * CTYPEia. * * X-type: the basic spectral variable (F, W, A, or V) for which the * spectral axis is linear, grisms excluded (see below). * * For non-grism axes, the X-type is encoded as the sixth character of * CTYPEia. * * Grisms: Grism axes have normal S-, and P-types but the axis is linear, * not in any spectral variable, but in a special "grism parameter". * The X-type spectral variable is either W or A for grisms in vacuo or * air respectively, but is encoded as 'w' or 'a' to indicate that an * additional transformation is required to convert to or from the * grism parameter. The spectral algorithm code for grisms also has a * special encoding in CTYPEia, either 'GRI' (in vacuo) or 'GRA' (in air). * * In the algorithm chain, the non-linear transformation occurs between the * X-type and the P-type variables; the transformation between P-type and * S-type variables is always linear. * * When the P-type and X-type variables are the same, the spectral axis is * linear in the S-type variable and the second four characters of CTYPEia * are blank. This can never happen for grism axes. * * As an example, correlating radio spectrometers always produce spectra that * are regularly gridded in frequency; a redshift scale on such a spectrum is * non-linear. The required value of CTYPEia would be 'ZOPT-F2W', where the * desired S-type is 'ZOPT' (redshift), the P-type is necessarily 'W' * (wavelength), and the X-type is 'F' (frequency) by the nature of the * instrument. * * Argument checking: * ------------------ * The input spectral values are only checked for values that would result in * floating point exceptions. In particular, negative frequencies and * wavelengths are allowed, as are velocities greater than the speed of * light. The same is true for the spectral parameters - rest frequency and * wavelength. * * Accuracy: * --------- * No warranty is given for the accuracy of these routines (refer to the * copyright notice); intending users must satisfy for themselves their * adequacy for the intended purpose. However, closure effectively to within * double precision rounding error was demonstrated by test routine tspc.c * which accompanies this software. * * * spcini() - Default constructor for the spcprm struct * ---------------------------------------------------- * spcini() sets all members of a spcprm struct to default values. It should * be used to initialize every spcprm struct. * * Given and returned: * spc struct spcprm* * Spectral transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null spcprm pointer passed. * * * spcfree() - Destructor for the spcprm struct * -------------------------------------------- * spcfree() frees any memory that may have been allocated to store an error * message in the spcprm struct. * * Given: * spc struct spcprm* * Spectral transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null spcprm pointer passed. * * * spcprt() - Print routine for the spcprm struct * ---------------------------------------------- * spcprt() prints the contents of a spcprm struct using wcsprintf(). Mainly * intended for diagnostic purposes. * * Given: * spc const struct spcprm* * Spectral transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null spcprm pointer passed. * * * spcperr() - Print error messages from a spcprm struct * ----------------------------------------------------- * spcperr() prints the error message(s) (if any) stored in a spcprm struct. * If there are no errors then nothing is printed. It uses wcserr_prt(), q.v. * * Given: * spc const struct spcprm* * Spectral transformation parameters. * * prefix const char * * If non-NULL, each output line will be prefixed with * this string. * * Function return value: * int Status return value: * 0: Success. * 1: Null spcprm pointer passed. * * * spcset() - Setup routine for the spcprm struct * ---------------------------------------------- * spcset() sets up a spcprm struct according to information supplied within * it. * * Note that this routine need not be called directly; it will be invoked by * spcx2s() and spcs2x() if spcprm::flag is anything other than a predefined * magic value. * * Given and returned: * spc struct spcprm* * Spectral transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null spcprm pointer passed. * 2: Invalid spectral parameters. * * For returns > 1, a detailed error message is set in * spcprm::err if enabled, see wcserr_enable(). * * * spcx2s() - Transform to spectral coordinates * -------------------------------------------- * spcx2s() transforms intermediate world coordinates to spectral coordinates. * * Given and returned: * spc struct spcprm* * Spectral transformation parameters. * * Given: * nx int Vector length. * * sx int Vector stride. * * sspec int Vector stride. * * x const double[] * Intermediate world coordinates, in SI units. * * Returned: * spec double[] Spectral coordinates, in SI units. * * stat int[] Status return value status for each vector element: * 0: Success. * 1: Invalid value of x. * * Function return value: * int Status return value: * 0: Success. * 1: Null spcprm pointer passed. * 2: Invalid spectral parameters. * 3: One or more of the x coordinates were invalid, * as indicated by the stat vector. * * For returns > 1, a detailed error message is set in * spcprm::err if enabled, see wcserr_enable(). * * * spcs2x() - Transform spectral coordinates * ----------------------------------------- * spcs2x() transforms spectral world coordinates to intermediate world * coordinates. * * Given and returned: * spc struct spcprm* * Spectral transformation parameters. * * Given: * nspec int Vector length. * * sspec int Vector stride. * * sx int Vector stride. * * spec const double[] * Spectral coordinates, in SI units. * * Returned: * x double[] Intermediate world coordinates, in SI units. * * stat int[] Status return value status for each vector element: * 0: Success. * 1: Invalid value of spec. * * Function return value: * int Status return value: * 0: Success. * 1: Null spcprm pointer passed. * 2: Invalid spectral parameters. * 4: One or more of the spec coordinates were * invalid, as indicated by the stat vector. * * For returns > 1, a detailed error message is set in * spcprm::err if enabled, see wcserr_enable(). * * * spctype() - Spectral CTYPEia keyword analysis * --------------------------------------------- * spctype() checks whether a CTYPEia keyvalue is a valid spectral axis type * and if so returns information derived from it relating to the associated S-, * P-, and X-type spectral variables (see explanation above). * * The return arguments are guaranteed not be modified if CTYPEia is not a * valid spectral type; zero-pointers may be specified for any that are not of * interest. * * A deprecated form of this function, spctyp(), lacks the wcserr** parameter. * * Given: * ctype const char[9] * The CTYPEia keyvalue, (eight characters with null * termination). * * Returned: * stype char[] The four-letter name of the S-type spectral variable * copied or translated from ctype. If a non-zero * pointer is given, the array must accomodate a null- * terminated string of length 5. * * scode char[] The three-letter spectral algorithm code copied or * translated from ctype. Logarithmic ('LOG') and * tabular ('TAB') codes are also recognized. If a * non-zero pointer is given, the array must accomodate a * null-terminated string of length 4. * * sname char[] Descriptive name of the S-type spectral variable. * If a non-zero pointer is given, the array must * accomodate a null-terminated string of length 22. * * units char[] SI units of the S-type spectral variable. If a * non-zero pointer is given, the array must accomodate a * null-terminated string of length 8. * * ptype char* Character code for the P-type spectral variable * derived from ctype, one of 'F', 'W', 'A', or 'V'. * * xtype char* Character code for the X-type spectral variable * derived from ctype, one of 'F', 'W', 'A', or 'V'. * Also, 'w' and 'a' are synonymous to 'W' and 'A' for * grisms in vacuo and air respectively. Set to 'L' or * 'T' for logarithmic ('LOG') and tabular ('TAB') axes. * * restreq int* Multivalued flag that indicates whether rest * frequency or wavelength is required to compute * spectral variables for this CTYPEia: * 0: Not required. * 1: Required for the conversion between S- and * P-types (e.g. 'ZOPT-F2W'). * 2: Required for the conversion between P- and * X-types (e.g. 'BETA-W2V'). * 3: Required for the conversion between S- and * P-types, and between P- and X-types, but not * between S- and X-types (this applies only for * 'VRAD-V2F', 'VOPT-V2W', and 'ZOPT-V2W'). * Thus the rest frequency or wavelength is required for * spectral coordinate computations (i.e. between S- and * X-types) only if restreq%3 != 0. * * err struct wcserr ** * If enabled, for function return values > 1, this * struct will contain a detailed error message, see * wcserr_enable(). May be NULL if an error message is * not desired. Otherwise, the user is responsible for * deleting the memory allocated for the wcserr struct. * * Function return value: * int Status return value: * 0: Success. * 2: Invalid spectral parameters (not a spectral * CTYPEia). * * * spcspxe() - Spectral keyword analysis * ------------------------------------ * spcspxe() analyses the CTYPEia and CRVALia FITS spectral axis keyword values * and returns information about the associated X-type spectral variable. * * A deprecated form of this function, spcspx(), lacks the wcserr** parameter. * * Given: * ctypeS const char[9] * Spectral axis type, i.e. the CTYPEia keyvalue, (eight * characters with null termination). For non-grism * axes, the character code for the P-type spectral * variable in the algorithm code (i.e. the eighth * character of CTYPEia) may be set to '?' (it will not * be reset). * * crvalS double Value of the S-type spectral variable at the reference * point, i.e. the CRVALia keyvalue, SI units. * * restfrq, * restwav double Rest frequency [Hz] and rest wavelength in vacuo [m], * only one of which need be given, the other should be * set to zero. * * Returned: * ptype char* Character code for the P-type spectral variable * derived from ctypeS, one of 'F', 'W', 'A', or 'V'. * * xtype char* Character code for the X-type spectral variable * derived from ctypeS, one of 'F', 'W', 'A', or 'V'. * Also, 'w' and 'a' are synonymous to 'W' and 'A' for * grisms in vacuo and air respectively; crvalX and dXdS * (see below) will conform to these. * * restreq int* Multivalued flag that indicates whether rest frequency * or wavelength is required to compute spectral * variables for this CTYPEia, as for spctype(). * * crvalX double* Value of the X-type spectral variable at the reference * point, SI units. * * dXdS double* The derivative, dX/dS, evaluated at the reference * point, SI units. Multiply the CDELTia keyvalue by * this to get the pixel spacing in the X-type spectral * coordinate. * * err struct wcserr ** * If enabled, for function return values > 1, this * struct will contain a detailed error message, see * wcserr_enable(). May be NULL if an error message is * not desired. Otherwise, the user is responsible for * deleting the memory allocated for the wcserr struct. * * Function return value: * int Status return value: * 0: Success. * 2: Invalid spectral parameters. * * * spcxpse() - Spectral keyword synthesis * ------------------------------------- * spcxpse(), for the spectral axis type specified and the value provided for * the X-type spectral variable at the reference point, deduces the value of * the FITS spectral axis keyword CRVALia and also the derivative dS/dX which * may be used to compute CDELTia. See above for an explanation of the S-, * P-, and X-type spectral variables. * * A deprecated form of this function, spcxps(), lacks the wcserr** parameter. * * Given: * ctypeS const char[9] * The required spectral axis type, i.e. the CTYPEia * keyvalue, (eight characters with null termination). * For non-grism axes, the character code for the P-type * spectral variable in the algorithm code (i.e. the * eighth character of CTYPEia) may be set to '?' (it * will not be reset). * * crvalX double Value of the X-type spectral variable at the reference * point (N.B. NOT the CRVALia keyvalue), SI units. * * restfrq, * restwav double Rest frequency [Hz] and rest wavelength in vacuo [m], * only one of which need be given, the other should be * set to zero. * * Returned: * ptype char* Character code for the P-type spectral variable * derived from ctypeS, one of 'F', 'W', 'A', or 'V'. * * xtype char* Character code for the X-type spectral variable * derived from ctypeS, one of 'F', 'W', 'A', or 'V'. * Also, 'w' and 'a' are synonymous to 'W' and 'A' for * grisms; crvalX and cdeltX must conform to these. * * restreq int* Multivalued flag that indicates whether rest frequency * or wavelength is required to compute spectral * variables for this CTYPEia, as for spctype(). * * crvalS double* Value of the S-type spectral variable at the reference * point (i.e. the appropriate CRVALia keyvalue), SI * units. * * dSdX double* The derivative, dS/dX, evaluated at the reference * point, SI units. Multiply this by the pixel spacing * in the X-type spectral coordinate to get the CDELTia * keyvalue. * * err struct wcserr ** * If enabled, for function return values > 1, this * struct will contain a detailed error message, see * wcserr_enable(). May be NULL if an error message is * not desired. Otherwise, the user is responsible for * deleting the memory allocated for the wcserr struct. * * Function return value: * int Status return value: * 0: Success. * 2: Invalid spectral parameters. * * * spctrne() - Spectral keyword translation * --------------------------------------- * spctrne() translates a set of FITS spectral axis keywords into the * corresponding set for the specified spectral axis type. For example, a * 'FREQ' axis may be translated into 'ZOPT-F2W' and vice versa. * * A deprecated form of this function, spctrn(), lacks the wcserr** parameter. * * Given: * ctypeS1 const char[9] * Spectral axis type, i.e. the CTYPEia keyvalue, (eight * characters with null termination). For non-grism * axes, the character code for the P-type spectral * variable in the algorithm code (i.e. the eighth * character of CTYPEia) may be set to '?' (it will not * be reset). * * crvalS1 double Value of the S-type spectral variable at the reference * point, i.e. the CRVALia keyvalue, SI units. * * cdeltS1 double Increment of the S-type spectral variable at the * reference point, SI units. * * restfrq, * restwav double Rest frequency [Hz] and rest wavelength in vacuo [m], * only one of which need be given, the other should be * set to zero. Neither are required if the translation * is between wave-characteristic types, or between * velocity-characteristic types. E.g., required for * 'FREQ' -> 'ZOPT-F2W', but not required for * 'VELO-F2V' -> 'ZOPT-F2W'. * * Given and returned: * ctypeS2 char[9] Required spectral axis type (eight characters with * null termination). The first four characters are * required to be given and are never modified. The * remaining four, the algorithm code, are completely * determined by, and must be consistent with, ctypeS1 * and the first four characters of ctypeS2. A non-zero * status value will be returned if they are inconsistent * (see below). However, if the final three characters * are specified as "???", or if just the eighth * character is specified as '?', the correct algorithm * code will be substituted (applies for grism axes as * well as non-grism). * * Returned: * crvalS2 double* Value of the new S-type spectral variable at the * reference point, i.e. the new CRVALia keyvalue, SI * units. * * cdeltS2 double* Increment of the new S-type spectral variable at the * reference point, i.e. the new CDELTia keyvalue, SI * units. * * err struct wcserr ** * If enabled, for function return values > 1, this * struct will contain a detailed error message, see * wcserr_enable(). May be NULL if an error message is * not desired. Otherwise, the user is responsible for * deleting the memory allocated for the wcserr struct. * * Function return value: * int Status return value: * 0: Success. * 2: Invalid spectral parameters. * * A status value of 2 will be returned if restfrq or * restwav are not specified when required, or if ctypeS1 * or ctypeS2 are self-inconsistent, or have different * spectral X-type variables. * * * spcaips() - Translate AIPS-convention spectral keywords * ------------------------------------------------------- * spcaips() translates AIPS-convention spectral CTYPEia and VELREF keyvalues. * * Given: * ctypeA const char[9] * CTYPEia keyvalue possibly containing an * AIPS-convention spectral code (eight characters, need * not be null-terminated). * * velref int AIPS-convention VELREF code. It has the following * integer values: * 1: LSR kinematic, originally described simply as * "LSR" without distinction between the kinematic * and dynamic definitions. * 2: Barycentric, originally described as "HEL" * meaning heliocentric. * 3: Topocentric, originally described as "OBS" * meaning geocentric but widely interpreted as * topocentric. * AIPS++ extensions to VELREF are also recognized: * 4: LSR dynamic. * 5: Geocentric. * 6: Source rest frame. * 7: Galactocentric. * * For an AIPS 'VELO' axis, a radio convention velocity * (VRAD) is denoted by adding 256 to VELREF, otherwise * an optical velocity (VOPT) is indicated (this is not * applicable to 'FREQ' or 'FELO' axes). Setting velref * to 0 or 256 chooses between optical and radio velocity * without specifying a Doppler frame, provided that a * frame is encoded in ctypeA. If not, i.e. for * ctypeA = 'VELO', ctype will be returned as 'VELO'. * * VELREF takes precedence over CTYPEia in defining the * Doppler frame, e.g. * = ctypeA = 'VELO-HEL' = velref = 1 * * returns ctype = 'VOPT' with specsys set to 'LSRK'. * * Returned: * ctype char[9] Translated CTYPEia keyvalue, or a copy of ctypeA if no * translation was performed (in which case any trailing * blanks in ctypeA will be replaced with nulls). * * specsys char[9] Doppler reference frame indicated by VELREF or else * by CTYPEia with value corresponding to the SPECSYS * keyvalue in the FITS WCS standard. May be returned * blank if neither specifies a Doppler frame, e.g. * ctypeA = 'FELO' and velref%256 == 0. * * Function return value: * int Status return value: * -1: No translation required (not an error). * 0: Success. * 2: Invalid value of VELREF. * * * spcprm struct - Spectral transformation parameters * -------------------------------------------------- * The spcprm struct contains information required to transform spectral * coordinates. It consists of certain members that must be set by the user * ("given") and others that are set by the WCSLIB routines ("returned"). Some * of the latter are supplied for informational purposes while others are for * internal use only. * * int flag * (Given and returned) This flag must be set to zero whenever any of the * following spcprm structure members are set or changed: * * - spcprm::type, * - spcprm::code, * - spcprm::crval, * - spcprm::restfrq, * - spcprm::restwav, * - spcprm::pv[]. * * This signals the initialization routine, spcset(), to recompute the * returned members of the spcprm struct. spcset() will reset flag to * indicate that this has been done. * * char type[8] * (Given) Four-letter spectral variable type, e.g "ZOPT" for * CTYPEia = 'ZOPT-F2W'. (Declared as char[8] for alignment reasons.) * * char code[4] * (Given) Three-letter spectral algorithm code, e.g "F2W" for * CTYPEia = 'ZOPT-F2W'. * * double crval * (Given) Reference value (CRVALia), SI units. * * double restfrq * (Given) The rest frequency [Hz], and ... * * double restwav * (Given) ... the rest wavelength in vacuo [m], only one of which need be * given, the other should be set to zero. Neither are required if the * X and S spectral variables are both wave-characteristic, or both * velocity-characteristic, types. * * double pv[7] * (Given) Grism parameters for 'GRI' and 'GRA' algorithm codes: * - 0: G, grating ruling density. * - 1: m, interference order. * - 2: alpha, angle of incidence [deg]. * - 3: n_r, refractive index at the reference wavelength, lambda_r. * - 4: n'_r, dn/dlambda at the reference wavelength, lambda_r (/m). * - 5: epsilon, grating tilt angle [deg]. * - 6: theta, detector tilt angle [deg]. * * The remaining members of the spcprm struct are maintained by spcset() and * must not be modified elsewhere: * * double w[6] * (Returned) Intermediate values: * - 0: Rest frequency or wavelength (SI). * - 1: The value of the X-type spectral variable at the reference point * (SI units). * - 2: dX/dS at the reference point (SI units). * The remainder are grism intermediates. * * int isGrism * (Returned) Grism coordinates? * - 0: no, * - 1: in vacuum, * - 2: in air. * * int padding1 * (An unused variable inserted for alignment purposes only.) * * struct wcserr *err * (Returned) If enabled, when an error status is returned, this struct * contains detailed information about the error, see wcserr_enable(). * * void *padding2 * (An unused variable inserted for alignment purposes only.) * int (*spxX2P)(SPX_ARGS) * (Returned) The first and ... * int (*spxP2S)(SPX_ARGS) * (Returned) ... the second of the pointers to the transformation * functions in the two-step algorithm chain X -> P -> S in the * pixel-to-spectral direction where the non-linear transformation is from * X to P. The argument list, SPX_ARGS, is defined in spx.h. * * int (*spxS2P)(SPX_ARGS) * (Returned) The first and ... * int (*spxP2X)(SPX_ARGS) * (Returned) ... the second of the pointers to the transformation * functions in the two-step algorithm chain S -> P -> X in the * spectral-to-pixel direction where the non-linear transformation is from * P to X. The argument list, SPX_ARGS, is defined in spx.h. * * * Global variable: const char *spc_errmsg[] - Status return messages * ------------------------------------------------------------------ * Error messages to match the status value returned from each function. * *===========================================================================*/ #ifndef WCSLIB_SPC #define WCSLIB_SPC #include "spx.h" #ifdef __cplusplus extern "C" { #endif extern const char *spc_errmsg[]; enum spc_errmsg_enum { SPCERR_NO_CHANGE = -1, /* No change. */ SPCERR_SUCCESS = 0, /* Success. */ SPCERR_NULL_POINTER = 1, /* Null spcprm pointer passed. */ SPCERR_BAD_SPEC_PARAMS = 2, /* Invalid spectral parameters. */ SPCERR_BAD_X = 3, /* One or more of x coordinates were invalid. */ SPCERR_BAD_SPEC = 4 /* One or more of the spec coordinates were invalid. */ }; struct spcprm { /* Initialization flag (see the prologue above). */ /*------------------------------------------------------------------------*/ int flag; /* Set to zero to force initialization. */ /* Parameters to be provided (see the prologue above). */ /*------------------------------------------------------------------------*/ char type[8]; /* Four-letter spectral variable type. */ char code[4]; /* Three-letter spectral algorithm code. */ double crval; /* Reference value (CRVALia), SI units. */ double restfrq; /* Rest frequency, Hz. */ double restwav; /* Rest wavelength, m. */ double pv[7]; /* Grism parameters: */ /* 0: G, grating ruling density. */ /* 1: m, interference order. */ /* 2: alpha, angle of incidence. */ /* 3: n_r, refractive index at lambda_r. */ /* 4: n'_r, dn/dlambda at lambda_r. */ /* 5: epsilon, grating tilt angle. */ /* 6: theta, detector tilt angle. */ /* Information derived from the parameters supplied. */ /*------------------------------------------------------------------------*/ double w[6]; /* Intermediate values. */ /* 0: Rest frequency or wavelength (SI). */ /* 1: CRVALX (SI units). */ /* 2: CDELTX/CDELTia = dX/dS (SI units). */ /* The remainder are grism intermediates. */ int isGrism; /* Grism coordinates? 1: vacuum, 2: air. */ int padding1; /* (Dummy inserted for alignment purposes.) */ /* Error handling */ /*------------------------------------------------------------------------*/ struct wcserr *err; /* Private */ /*------------------------------------------------------------------------*/ void *padding2; /* (Dummy inserted for alignment purposes.) */ int (*spxX2P)(SPX_ARGS); /* Pointers to the transformation functions */ int (*spxP2S)(SPX_ARGS); /* in the two-step algorithm chain in the */ /* pixel-to-spectral direction. */ int (*spxS2P)(SPX_ARGS); /* Pointers to the transformation functions */ int (*spxP2X)(SPX_ARGS); /* in the two-step algorithm chain in the */ /* spectral-to-pixel direction. */ }; /* Size of the spcprm struct in int units, used by the Fortran wrappers. */ #define SPCLEN (sizeof(struct spcprm)/sizeof(int)) int spcini(struct spcprm *spc); int spcfree(struct spcprm *spc); int spcprt(const struct spcprm *spc); int spcperr(const struct spcprm *spc, const char *prefix); int spcset(struct spcprm *spc); int spcx2s(struct spcprm *spc, int nx, int sx, int sspec, const double x[], double spec[], int stat[]); int spcs2x(struct spcprm *spc, int nspec, int sspec, int sx, const double spec[], double x[], int stat[]); int spctype(const char ctype[9], char stype[], char scode[], char sname[], char units[], char *ptype, char *xtype, int *restreq, struct wcserr **err); int spcspxe(const char ctypeS[9], double crvalS, double restfrq, double restwav, char *ptype, char *xtype, int *restreq, double *crvalX, double *dXdS, struct wcserr **err); int spcxpse(const char ctypeS[9], double crvalX, double restfrq, double restwav, char *ptype, char *xtype, int *restreq, double *crvalS, double *dSdX, struct wcserr **err); int spctrne(const char ctypeS1[9], double crvalS1, double cdeltS1, double restfrq, double restwav, char ctypeS2[9], double *crvalS2, double *cdeltS2, struct wcserr **err); int spcaips(const char ctypeA[9], int velref, char ctype[9], char specsys[9]); /* Deprecated. */ #define spcini_errmsg spc_errmsg #define spcprt_errmsg spc_errmsg #define spcset_errmsg spc_errmsg #define spcx2s_errmsg spc_errmsg #define spcs2x_errmsg spc_errmsg int spctyp(const char ctype[9], char stype[], char scode[], char sname[], char units[], char *ptype, char *xtype, int *restreq); int spcspx(const char ctypeS[9], double crvalS, double restfrq, double restwav, char *ptype, char *xtype, int *restreq, double *crvalX, double *dXdS); int spcxps(const char ctypeS[9], double crvalX, double restfrq, double restwav, char *ptype, char *xtype, int *restreq, double *crvalS, double *dSdX); int spctrn(const char ctypeS1[9], double crvalS1, double cdeltS1, double restfrq, double restwav, char ctypeS2[9], double *crvalS2, double *cdeltS2); #ifdef __cplusplus } #endif #endif /* WCSLIB_SPC */ astropy-1.1.1/cextern/wcslib/C/tab.c0000644001134200020070000012273312644017723020164 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: tab.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include #include "wcserr.h" #include "wcsmath.h" #include "wcsprintf.h" #include "wcsutil.h" #include "tab.h" const int TABSET = 137; /* Map status return value to message. */ const char *tab_errmsg[] = { "Success", "Null tabprm pointer passed", "Memory allocation failed", "Invalid tabular parameters", "One or more of the x coordinates were invalid", "One or more of the world coordinates were invalid"}; /* Convenience macro for invoking wcserr_set(). */ #define TAB_ERRMSG(status) WCSERR_SET(status), tab_errmsg[status] /*--------------------------------------------------------------------------*/ int tabini(int alloc, int M, const int K[], struct tabprm *tab) { static const char *function = "tabini"; int k, m, N; double *dp; struct wcserr **err; if (tab == 0x0) return TABERR_NULL_POINTER; /* Initialize error message handling. */ err = &(tab->err); if (tab->flag != -1) { if (tab->err) free(tab->err); } tab->err = 0x0; if (M <= 0) { return wcserr_set(WCSERR_SET(TABERR_BAD_PARAMS), "M must be positive, got %d", M); } /* Determine the total number of elements in the coordinate array. */ if (K) { N = M; for (m = 0; m < M; m++) { if (K[m] < 0) { return wcserr_set(WCSERR_SET(TABERR_BAD_PARAMS), "Invalid tabular parameters: Each element of K must be " "non-negative, got %d", K[m]); } N *= K[m]; } } else { /* Axis lengths as yet unknown. */ N = 0; } /* Initialize memory management. */ if (tab->flag == -1 || tab->m_flag != TABSET) { if (tab->flag == -1) { tab->sense = 0x0; tab->p0 = 0x0; tab->delta = 0x0; tab->extrema = 0x0; tab->set_M = 0; } tab->m_flag = 0; tab->m_M = 0; tab->m_N = 0; tab->m_K = 0x0; tab->m_map = 0x0; tab->m_crval = 0x0; tab->m_index = 0x0; tab->m_indxs = 0x0; tab->m_coord = 0x0; } else { /* Clear any outstanding signals set by wcstab(). */ for (m = 0; m < tab->m_M; m++) { if (tab->m_indxs[m] == (double *)0x1) tab->m_indxs[m] = 0x0; } if (tab->m_coord == (double *)0x1) tab->m_coord = 0x0; } /* Allocate memory for arrays if required. */ if (alloc || tab->K == 0x0 || tab->map == 0x0 || tab->crval == 0x0 || tab->index == 0x0 || tab->coord == 0x0) { /* Was sufficient allocated previously? */ if (tab->m_flag == TABSET && (tab->m_M < M || tab->m_N < N)) { /* No, free it. */ tabfree(tab); } if (alloc || tab->K == 0x0) { if (tab->m_K) { /* In case the caller fiddled with it. */ tab->K = tab->m_K; } else { if (!(tab->K = calloc(M, sizeof(int)))) { return wcserr_set(TAB_ERRMSG(TABERR_MEMORY)); } tab->m_flag = TABSET; tab->m_M = M; tab->m_K = tab->K; } } if (alloc || tab->map == 0x0) { if (tab->m_map) { /* In case the caller fiddled with it. */ tab->map = tab->m_map; } else { if (!(tab->map = calloc(M, sizeof(int)))) { return wcserr_set(TAB_ERRMSG(TABERR_MEMORY)); } tab->m_flag = TABSET; tab->m_M = M; tab->m_map = tab->map; } } if (alloc || tab->crval == 0x0) { if (tab->m_crval) { /* In case the caller fiddled with it. */ tab->crval = tab->m_crval; } else { if (!(tab->crval = calloc(M, sizeof(double)))) { return wcserr_set(TAB_ERRMSG(TABERR_MEMORY)); } tab->m_flag = TABSET; tab->m_M = M; tab->m_crval = tab->crval; } } if (alloc || tab->index == 0x0) { if (tab->m_index) { /* In case the caller fiddled with it. */ tab->index = tab->m_index; } else { if (!(tab->index = calloc(M, sizeof(double *)))) { return wcserr_set(TAB_ERRMSG(TABERR_MEMORY)); } tab->m_flag = TABSET; tab->m_M = M; tab->m_N = N; tab->m_index = tab->index; if (!(tab->m_indxs = calloc(M, sizeof(double *)))) { return wcserr_set(TAB_ERRMSG(TABERR_MEMORY)); } /* Recall that calloc() initializes these pointers to zero. */ if (K) { for (m = 0; m < M; m++) { if (K[m]) { if (!(tab->index[m] = calloc(K[m], sizeof(double)))) { return wcserr_set(TAB_ERRMSG(TABERR_MEMORY)); } tab->m_indxs[m] = tab->index[m]; } } } } } if (alloc || tab->coord == 0x0) { if (tab->m_coord) { /* In case the caller fiddled with it. */ tab->coord = tab->m_coord; } else if (N) { if (!(tab->coord = calloc(N, sizeof(double)))) { return wcserr_set(TAB_ERRMSG(TABERR_MEMORY)); } tab->m_flag = TABSET; tab->m_M = M; tab->m_N = N; tab->m_coord = tab->coord; } } } tab->flag = 0; tab->M = M; /* Set defaults. */ for (m = 0; m < M; m++) { tab->map[m] = -1; tab->crval[m] = 0.0; if (K) { tab->K[m] = K[m]; if ((dp = tab->index[m])) { for (k = 0; k < K[m]; k++) { *(dp++) = k; } } } else { tab->K[m] = 0; } } /* Initialize the coordinate array. */ for (dp = tab->coord; dp < tab->coord + N; dp++) { *dp = UNDEFINED; } return 0; } /*--------------------------------------------------------------------------*/ int tabmem(struct tabprm *tab) { static const char *function = "tabmem"; int m, M, N; struct wcserr **err; if (tab == 0x0) return TABERR_NULL_POINTER; err = &(tab->err); if (tab->M == 0 || tab->K == 0x0) { /* Should have been set by this time. */ return wcserr_set(WCSERR_SET(TABERR_MEMORY), "Null pointers in tabprm struct"); } N = M = tab->M; for (m = 0; m < M; m++) { if (tab->K[m] < 0) { return wcserr_set(WCSERR_SET(TABERR_BAD_PARAMS), "Invalid tabular parameters: Each element of K must be " "non-negative, got %d", M); } N *= tab->K[m]; } if (tab->m_M == 0) { tab->m_M = M; } else if (tab->m_M < M) { /* Only possible if the user changed M. */ return wcserr_set(WCSERR_SET(TABERR_MEMORY), "tabprm struct inconsistent"); } if (tab->m_N == 0) { tab->m_N = N; } else if (tab->m_N < N) { /* Only possible if the user changed K[]. */ return wcserr_set(WCSERR_SET(TABERR_MEMORY), "tabprm struct inconsistent"); } if (tab->m_K == 0x0) { if ((tab->m_K = tab->K)) { tab->m_flag = TABSET; } } if (tab->m_map == 0x0) { if ((tab->m_map = tab->map)) { tab->m_flag = TABSET; } } if (tab->m_crval == 0x0) { if ((tab->m_crval = tab->crval)) { tab->m_flag = TABSET; } } if (tab->m_index == 0x0) { if ((tab->m_index = tab->index)) { tab->m_flag = TABSET; } } for (m = 0; m < tab->m_M; m++) { if (tab->m_indxs[m] == 0x0 || tab->m_indxs[m] == (double *)0x1) { if ((tab->m_indxs[m] = tab->index[m])) { tab->m_flag = TABSET; } } } if (tab->m_coord == 0x0 || tab->m_coord == (double *)0x1) { if ((tab->m_coord = tab->coord)) { tab->m_flag = TABSET; } } tab->flag = 0; return 0; } /*--------------------------------------------------------------------------*/ int tabcpy(int alloc, const struct tabprm *tabsrc, struct tabprm *tabdst) { static const char *function = "tabcpy"; int k, m, M, n, N, status; double *dstp, *srcp; struct wcserr **err; if (tabsrc == 0x0) return TABERR_NULL_POINTER; if (tabdst == 0x0) return TABERR_NULL_POINTER; err = &(tabdst->err); M = tabsrc->M; if (M <= 0) { return wcserr_set(WCSERR_SET(TABERR_BAD_PARAMS), "M must be positive, got %d", M); } if ((status = tabini(alloc, M, tabsrc->K, tabdst))) { return status; } N = M; for (m = 0; m < M; m++) { tabdst->map[m] = tabsrc->map[m]; tabdst->crval[m] = tabsrc->crval[m]; N *= tabsrc->K[m]; } for (m = 0; m < M; m++) { if ((srcp = tabsrc->index[m])) { dstp = tabdst->index[m]; for (k = 0; k < tabsrc->K[m]; k++) { *(dstp++) = *(srcp++); } } } srcp = tabsrc->coord; dstp = tabdst->coord; for (n = 0; n < N; n++) { *(dstp++) = *(srcp++); } return 0; } /*--------------------------------------------------------------------------*/ int tabcmp(int cmp, double tol, const struct tabprm *tab1, const struct tabprm *tab2, int *equal) { int m, M, N; if (tab1 == 0x0) return TABERR_NULL_POINTER; if (tab2 == 0x0) return TABERR_NULL_POINTER; if (equal == 0x0) return TABERR_NULL_POINTER; *equal = 0; if (tab1->M != tab2->M) { return 0; } M = tab1->M; if (!wcsutil_intEq(M, tab1->K, tab2->K) || !wcsutil_intEq(M, tab1->map, tab2->map) || !wcsutil_Eq(M, tol, tab1->crval, tab2->crval)) { return 0; } N = M; for (m = 0; m < M; m++) { if (!wcsutil_Eq(tab1->K[m], tol, tab1->index[m], tab2->index[m])) { return 0; } N *= tab1->K[m]; } if (!wcsutil_Eq(N, tol, tab1->coord, tab2->coord)) { return 0; } *equal = 1; return 0; } /*--------------------------------------------------------------------------*/ int tabfree(struct tabprm *tab) { int m; if (tab == 0x0) return TABERR_NULL_POINTER; if (tab->flag != -1) { /* Clear any outstanding signals set by wcstab(). */ for (m = 0; m < tab->m_M; m++) { if (tab->m_indxs[m] == (double *)0x1) tab->m_indxs[m] = 0x0; } if (tab->m_coord == (double *)0x1) tab->m_coord = 0x0; /* Free memory allocated by tabini(). */ if (tab->m_flag == TABSET) { if (tab->K == tab->m_K) tab->K = 0x0; if (tab->map == tab->m_map) tab->map = 0x0; if (tab->crval == tab->m_crval) tab->crval = 0x0; if (tab->index == tab->m_index) tab->index = 0x0; if (tab->coord == tab->m_coord) tab->coord = 0x0; if (tab->m_K) free(tab->m_K); if (tab->m_map) free(tab->m_map); if (tab->m_crval) free(tab->m_crval); if (tab->m_index) { for (m = 0; m < tab->m_M; m++) { if (tab->m_indxs[m]) free(tab->m_indxs[m]); } free(tab->m_index); free(tab->m_indxs); } if (tab->m_coord) free(tab->m_coord); } /* Free memory allocated by tabset(). */ if (tab->sense) free(tab->sense); if (tab->p0) free(tab->p0); if (tab->delta) free(tab->delta); if (tab->extrema) free(tab->extrema); } tab->m_flag = 0; tab->m_M = 0; tab->m_N = 0; tab->m_K = 0x0; tab->m_map = 0x0; tab->m_crval = 0x0; tab->m_index = 0x0; tab->m_indxs = 0x0; tab->m_coord = 0x0; tab->sense = 0x0; tab->p0 = 0x0; tab->delta = 0x0; tab->extrema = 0x0; tab->set_M = 0; if (tab->err) { free(tab->err); tab->err = 0x0; } tab->flag = 0; return 0; } /*--------------------------------------------------------------------------*/ int tabprt(const struct tabprm *tab) { char *cp, text[128]; int j, k, m, n, nd; double *dp; if (tab == 0x0) return TABERR_NULL_POINTER; if (tab->flag != TABSET) { wcsprintf("The tabprm struct is UNINITIALIZED.\n"); return 0; } wcsprintf(" flag: %d\n", tab->flag); wcsprintf(" M: %d\n", tab->M); /* Array dimensions. */ WCSPRINTF_PTR(" K: ", tab->K, "\n"); wcsprintf(" "); for (m = 0; m < tab->M; m++) { wcsprintf("%6d", tab->K[m]); } wcsprintf("\n"); /* Map vector. */ WCSPRINTF_PTR(" map: ", tab->map, "\n"); wcsprintf(" "); for (m = 0; m < tab->M; m++) { wcsprintf("%6d", tab->map[m]); } wcsprintf("\n"); /* Reference index value. */ WCSPRINTF_PTR(" crval: ", tab->crval, "\n"); wcsprintf(" "); for (m = 0; m < tab->M; m++) { wcsprintf(" %#- 11.5g", tab->crval[m]); } wcsprintf("\n"); /* Index vectors. */ WCSPRINTF_PTR(" index: ", tab->index, "\n"); for (m = 0; m < tab->M; m++) { wcsprintf(" index[%d]: ", m); WCSPRINTF_PTR("", tab->index[m], ""); if (tab->index[m]) { for (k = 0; k < tab->K[m]; k++) { if (k%5 == 0) { wcsprintf("\n "); } wcsprintf(" %#- 11.5g", tab->index[m][k]); } wcsprintf("\n"); } } /* Coordinate array. */ WCSPRINTF_PTR(" coord: ", tab->coord, "\n"); dp = tab->coord; for (n = 0; n < tab->nc; n++) { /* Array index. */ j = n; cp = text; for (m = 0; m < tab->M; m++) { nd = (tab->K[m] < 10) ? 1 : 2; sprintf(cp, ",%*d", nd, j % tab->K[m] + 1); j /= tab->K[m]; cp += strlen(cp); } wcsprintf(" (*%s)", text); for (m = 0; m < tab->M; m++) { wcsprintf(" %#- 11.5g", *(dp++)); } wcsprintf("\n"); } wcsprintf(" nc: %d\n", tab->nc); WCSPRINTF_PTR(" sense: ", tab->sense, "\n"); if (tab->sense) { wcsprintf(" "); for (m = 0; m < tab->M; m++) { wcsprintf("%6d", tab->sense[m]); } wcsprintf("\n"); } WCSPRINTF_PTR(" p0: ", tab->p0, "\n"); if (tab->p0) { wcsprintf(" "); for (m = 0; m < tab->M; m++) { wcsprintf("%6d", tab->p0[m]); } wcsprintf("\n"); } WCSPRINTF_PTR(" delta: ", tab->delta, "\n"); if (tab->delta) { wcsprintf(" "); for (m = 0; m < tab->M; m++) { wcsprintf(" %#- 11.5g", tab->delta[m]); } wcsprintf("\n"); } WCSPRINTF_PTR(" extrema: ", tab->extrema, "\n"); dp = tab->extrema; for (n = 0; n < tab->nc/tab->K[0]; n++) { /* Array index. */ j = n; cp = text; *cp = '\0'; for (m = 1; m < tab->M; m++) { nd = (tab->K[m] < 10) ? 1 : 2; sprintf(cp, ",%*d", nd, j % tab->K[m] + 1); j /= tab->K[m]; cp += strlen(cp); } wcsprintf(" (*,*%s)", text); for (m = 0; m < 2*tab->M; m++) { if (m == tab->M) wcsprintf("-> "); wcsprintf(" %#- 11.5g", *(dp++)); } wcsprintf("\n"); } WCSPRINTF_PTR(" err: ", tab->err, "\n"); if (tab->err) { wcserr_prt(tab->err, " "); } /* Memory management. */ wcsprintf(" m_flag: %d\n", tab->m_flag); wcsprintf(" m_M: %d\n", tab->m_M); wcsprintf(" m_N: %d\n", tab->m_N); WCSPRINTF_PTR(" m_K: ", tab->m_K, ""); if (tab->m_K == tab->K) wcsprintf(" (= K)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_map: ", tab->m_map, ""); if (tab->m_map == tab->map) wcsprintf(" (= map)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_crval: ", tab->m_crval, ""); if (tab->m_crval == tab->crval) wcsprintf(" (= crval)"); wcsprintf("\n"); WCSPRINTF_PTR(" m_index: ", tab->m_index, ""); if (tab->m_index == tab->index) wcsprintf(" (= index)"); wcsprintf("\n"); for (m = 0; m < tab->M; m++) { wcsprintf(" m_indxs[%d]: ", m); WCSPRINTF_PTR("", tab->m_indxs[m], ""); if (tab->m_indxs[m] == tab->index[m]) wcsprintf(" (= index[%d])", m); wcsprintf("\n"); } WCSPRINTF_PTR(" m_coord: ", tab->m_coord, ""); if (tab->m_coord == tab->coord) wcsprintf(" (= coord)"); wcsprintf("\n"); return 0; } /*--------------------------------------------------------------------------*/ int tabperr(const struct tabprm *tab, const char *prefix) { if (tab == 0x0) return TABERR_NULL_POINTER; if (tab->err) { wcserr_prt(tab->err, prefix); } return 0; } /*--------------------------------------------------------------------------*/ int tabset(struct tabprm *tab) { static const char *function = "tabset"; int i, ic, k, *Km, m, M, ne; double *dcrd, *dmax, *dmin, dPsi, dval, *Psi; struct wcserr **err; if (tab == 0x0) return TABERR_NULL_POINTER; err = &(tab->err); /* Check the number of tabular coordinate axes. */ if ((M = tab->M) < 1) { return wcserr_set(WCSERR_SET(TABERR_BAD_PARAMS), "Invalid tabular parameters: M must be positive, got %d", M); } /* Check the axis lengths. */ if (!tab->K) { return wcserr_set(WCSERR_SET(TABERR_MEMORY), "Null pointers in tabprm struct"); } tab->nc = 1; for (m = 0; m < M; m++) { if (tab->K[m] < 1) { return wcserr_set(WCSERR_SET(TABERR_BAD_PARAMS), "Invalid tabular parameters: Each element of K must be positive, " "got %d", tab->K[m]); } /* Number of coordinate vectors in the coordinate array. */ tab->nc *= tab->K[m]; } /* Check that the map vector is sensible. */ if (!tab->map) { return wcserr_set(WCSERR_SET(TABERR_MEMORY), "Null pointers in tabprm struct"); } for (m = 0; m < M; m++) { i = tab->map[m]; if (i < 0) { return wcserr_set(WCSERR_SET(TABERR_BAD_PARAMS), "Invalid tabular parameters: Each element of map must be " "non-negative, got %d", i); } } /* Check memory allocation for the remaining vectors. */ if (!tab->crval || !tab->index || !tab->coord) { return wcserr_set(WCSERR_SET(TABERR_MEMORY), "Null pointers in tabprm struct"); } /* Take memory if signalled to by wcstab(). */ for (m = 0; m < tab->m_M; m++) { if (tab->m_indxs[m] == (double *)0x1 && (tab->m_indxs[m] = tab->index[m])) { tab->m_flag = TABSET; } } if (tab->m_coord == (double *)0x1 && (tab->m_coord = tab->coord)) { tab->m_flag = TABSET; } /* Allocate memory for work vectors. */ if (tab->flag != TABSET || tab->set_M < M) { /* Free memory that may have been allocated previously. */ if (tab->sense) free(tab->sense); if (tab->p0) free(tab->p0); if (tab->delta) free(tab->delta); if (tab->extrema) free(tab->extrema); /* Allocate memory for internal arrays. */ if (!(tab->sense = calloc(M, sizeof(int)))) { return wcserr_set(TAB_ERRMSG(TABERR_MEMORY)); } if (!(tab->p0 = calloc(M, sizeof(int)))) { free(tab->sense); return wcserr_set(TAB_ERRMSG(TABERR_MEMORY)); } if (!(tab->delta = calloc(M, sizeof(double)))) { free(tab->sense); free(tab->p0); return wcserr_set(TAB_ERRMSG(TABERR_MEMORY)); } ne = M * tab->nc * 2 / tab->K[0]; if (!(tab->extrema = calloc(ne, sizeof(double)))) { free(tab->sense); free(tab->p0); free(tab->delta); return wcserr_set(TAB_ERRMSG(TABERR_MEMORY)); } tab->set_M = M; } /* Check that the index vectors are monotonic. */ Km = tab->K; for (m = 0; m < M; m++, Km++) { tab->sense[m] = 0; if (*Km > 1) { if ((Psi = tab->index[m]) == 0x0) { /* Default indexing. */ tab->sense[m] = 1; } else { for (k = 0; k < *Km-1; k++) { switch (tab->sense[m]) { case 0: if (Psi[k] < Psi[k+1]) { /* Monotonic increasing. */ tab->sense[m] = 1; } else if (Psi[k] > Psi[k+1]) { /* Monotonic decreasing. */ tab->sense[m] = -1; } break; case 1: if (Psi[k] > Psi[k+1]) { /* Should be monotonic increasing. */ free(tab->sense); free(tab->p0); free(tab->delta); free(tab->extrema); return wcserr_set(WCSERR_SET(TABERR_BAD_PARAMS), "Invalid tabular parameters: Index vectors are not " "monotonically increasing"); } break; case -1: if (Psi[k] < Psi[k+1]) { /* Should be monotonic decreasing. */ free(tab->sense); free(tab->p0); free(tab->delta); free(tab->extrema); return wcserr_set(WCSERR_SET(TABERR_BAD_PARAMS), "Invalid tabular parameters: Index vectors are not " "monotonically decreasing"); } break; } } } if (tab->sense[m] == 0) { free(tab->sense); free(tab->p0); free(tab->delta); free(tab->extrema); return wcserr_set(WCSERR_SET(TABERR_BAD_PARAMS), "Invalid tabular parameters: Index vectors are not monotonic"); } } } /* Find the extremal values of the coordinate elements in each row. */ dcrd = tab->coord; dmin = tab->extrema; dmax = tab->extrema + M; for (ic = 0; ic < tab->nc; ic += tab->K[0]) { for (m = 0; m < M; m++, dcrd++) { if (tab->K[0] > 1) { /* Extrapolate a little before the start of the row. */ Psi = tab->index[0]; if (Psi == 0x0) { dPsi = 1.0; } else { dPsi = Psi[1] - Psi[0]; } dval = *dcrd; if (dPsi != 0.0) { dval -= 0.5 * (*(dcrd+M) - *dcrd)/dPsi; } *(dmax+m) = *(dmin+m) = dval; } else { *(dmax+m) = *(dmin+m) = *dcrd; } } dcrd -= M; for (i = 0; i < tab->K[0]; i++) { for (m = 0; m < M; m++, dcrd++) { if (*(dmax+m) < *dcrd) *(dmax+m) = *dcrd; if (*(dmin+m) > *dcrd) *(dmin+m) = *dcrd; if (tab->K[0] > 1 && i == tab->K[0]-1) { /* Extrapolate a little beyond the end of the row. */ Psi = tab->index[0]; if (Psi == 0x0) { dPsi = 1.0; } else { dPsi = Psi[i] - Psi[i-1]; } dval = *dcrd; if (dPsi != 0.0) { dval += 0.5 * (*dcrd - *(dcrd-M))/dPsi; } if (*(dmax+m) < dval) *(dmax+m) = dval; if (*(dmin+m) > dval) *(dmin+m) = dval; } } } dmin += 2*M; dmax += 2*M; } tab->flag = TABSET; return 0; } /*--------------------------------------------------------------------------*/ int tabx2s( struct tabprm *tab, int ncoord, int nelem, const double x[], double world[], int stat[]) { static const char *function = "tabx2s"; int i, iv, k, *Km, m, M, n, nv, offset, p1, status; double *coord, *Psi, psi_m, upsilon, wgt; register int *statp; register const double *xp; register double *wp; struct wcserr **err; if (tab == 0x0) return TABERR_NULL_POINTER; err = &(tab->err); /* Initialize if required. */ if (tab->flag != TABSET) { if ((status = tabset(tab))) return status; } /* This is used a lot. */ M = tab->M; status = 0; xp = x; wp = world; statp = stat; for (n = 0; n < ncoord; n++) { /* Determine the indexes. */ Km = tab->K; for (m = 0; m < M; m++, Km++) { /* N.B. psi_m and Upsilon_m are 1-relative FITS indexes. */ i = tab->map[m]; psi_m = *(xp+i) + tab->crval[m]; Psi = tab->index[m]; if (Psi == 0x0) { /* Default indexing is simple. */ upsilon = psi_m; } else { /* To ease confusion, decrement Psi so that we can use 1-relative C array indexing to match the 1-relative FITS indexing. */ Psi--; if (*Km == 1) { /* Index vector is degenerate. */ if (Psi[1]-0.5 <= psi_m && psi_m <= Psi[1]+0.5) { upsilon = psi_m; } else { *statp = 1; status = wcserr_set(TAB_ERRMSG(TABERR_BAD_X)); goto next; } } else { /* Interpolate in the indexing vector. */ if (tab->sense[m] == 1) { /* Monotonic increasing index values. */ if (psi_m < Psi[1]) { if (Psi[1] - 0.5*(Psi[2]-Psi[1]) <= psi_m) { /* Allow minor extrapolation. */ k = 1; } else { /* Index is out of range. */ *statp = 1; status = wcserr_set(TAB_ERRMSG(TABERR_BAD_X)); goto next; } } else if (Psi[*Km] < psi_m) { if (psi_m <= Psi[*Km] + 0.5*(Psi[*Km]-Psi[*Km-1])) { /* Allow minor extrapolation. */ k = *Km - 1; } else { /* Index is out of range. */ *statp = 1; status = wcserr_set(TAB_ERRMSG(TABERR_BAD_X)); goto next; } } else { for (k = 1; k < *Km; k++) { if (psi_m < Psi[k]) { continue; } if (Psi[k] == psi_m && psi_m < Psi[k+1]) { break; } if (Psi[k] < psi_m && psi_m <= Psi[k+1]) { break; } } } } else { /* Monotonic decreasing index values. */ if (psi_m > Psi[1]) { if (Psi[1] + 0.5*(Psi[1]-Psi[2]) >= psi_m) { /* Allow minor extrapolation. */ k = 1; } else { /* Index is out of range. */ *statp = 1; status = wcserr_set(TAB_ERRMSG(TABERR_BAD_X)); goto next; } } else if (psi_m < Psi[*Km]) { if (Psi[*Km] - 0.5*(Psi[*Km-1]-Psi[*Km]) <= psi_m) { /* Allow minor extrapolation. */ k = *Km - 1; } else { /* Index is out of range. */ *statp = 1; status = wcserr_set(TAB_ERRMSG(TABERR_BAD_X)); goto next; } } else { for (k = 1; k < *Km; k++) { if (psi_m > Psi[k]) { continue; } if (Psi[k] == psi_m && psi_m > Psi[k+1]) { break; } if (Psi[k] > psi_m && psi_m >= Psi[k+1]) { break; } } } } upsilon = k + (psi_m - Psi[k]) / (Psi[k+1] - Psi[k]); } } if (upsilon < 0.5 || upsilon > *Km + 0.5) { /* Index out of range. */ *statp = 1; status = wcserr_set(TAB_ERRMSG(TABERR_BAD_X)); goto next; } /* Fiducial array indices and fractional offset. p1 is 1-relative while tab::p0 is 0-relative. */ p1 = (int)floor(upsilon); tab->p0[m] = p1 - 1; tab->delta[m] = upsilon - p1; if (p1 == 0) { tab->p0[m] += 1; tab->delta[m] -= 1.0; } else if (p1 == *Km && *Km > 1) { tab->p0[m] -= 1; tab->delta[m] += 1.0; } } /* Now interpolate in the coordinate array; the M-dimensional linear */ /* interpolation algorithm is described in Sect. 3.4 of WCS Paper IV. */ for (m = 0; m < M; m++) { i = tab->map[m]; *(wp+i) = 0.0; } /* Loop over the 2^M vertices surrounding P. */ nv = 1 << M; for (iv = 0; iv < nv; iv++) { /* Locate vertex in the coordinate array and compute its weight. */ offset = 0; wgt = 1.0; for (m = M-1; m >= 0; m--) { offset *= tab->K[m]; offset += tab->p0[m]; if (iv & (1 << m)) { if (tab->K[m] > 1) offset++; wgt *= tab->delta[m]; } else { wgt *= 1.0 - tab->delta[m]; } } if (wgt == 0.0) continue; /* Add the contribution from this vertex to each element. */ coord = tab->coord + offset*M; for (m = 0; m < M; m++) { i = tab->map[m]; *(wp+i) += *(coord++) * wgt; } if (wgt == 1.0) break; } *statp = 0; next: xp += nelem; wp += nelem; statp++; } return status; } /*--------------------------------------------------------------------------*/ int tabs2x( struct tabprm* tab, int ncoord, int nelem, const double world[], double x[], int stat[]) { static const char *function = "tabs2x"; int tabedge(struct tabprm *); int tabrow(struct tabprm *, const double *); int tabvox(struct tabprm *, const double *, int, double **, unsigned int *); int edge, i, ic, iv, k, *Km, M, m, n, nv, offset, status; double *dcrd, delta, *Psi, psi_m, **tabcoord, upsilon; register int *statp; register const double *wp; register double *xp; struct wcserr **err; if (tab == 0x0) return TABERR_NULL_POINTER; err = &(tab->err); /* Initialize if required. */ if (tab->flag != TABSET) { if ((status = tabset(tab))) return status; } /* This is used a lot. */ M = tab->M; tabcoord = 0x0; nv = 0; if (M > 1) { nv = 1 << M; tabcoord = calloc(nv, sizeof(double *)); } status = 0; wp = world; xp = x; statp = stat; for (n = 0; n < ncoord; n++) { /* Locate this coordinate in the coordinate array. */ edge = 0; for (m = 0; m < M; m++) { tab->p0[m] = 0; } for (ic = 0; ic < tab->nc; ic++) { if (tab->p0[0] == 0) { /* New row, could it contain a solution? */ if (edge || tabrow(tab, wp)) { /* No, skip it. */ ic += tab->K[0]; tab->p0[1]++; edge = tabedge(tab); /* Because ic will be incremented when the loop is reentered. */ ic--; continue; } } if (M == 1) { /* Deal with the one-dimensional case separately for efficiency. */ if (*wp == tab->coord[0]) { tab->p0[0] = 0; tab->delta[0] = 0.0; break; } else if (ic < tab->nc - 1) { if (((tab->coord[ic] <= *wp && *wp <= tab->coord[ic+1]) || (tab->coord[ic] >= *wp && *wp >= tab->coord[ic+1])) && (tab->index[0] == 0x0 || tab->index[0][ic] != tab->index[0][ic+1])) { tab->p0[0] = ic; tab->delta[0] = (*wp - tab->coord[ic]) / (tab->coord[ic+1] - tab->coord[ic]); break; } } } else { /* Multi-dimensional tables are harder. */ if (!edge) { /* Addresses of the coordinates for each corner of the "voxel". */ for (iv = 0; iv < nv; iv++) { offset = 0; for (m = M-1; m >= 0; m--) { offset *= tab->K[m]; offset += tab->p0[m]; if ((iv & (1 << m)) && (tab->K[m] > 1)) offset++; } tabcoord[iv] = tab->coord + offset*M; } if (tabvox(tab, wp, 0, tabcoord, 0x0) == 0) { /* Found a solution. */ break; } } /* Next voxel. */ tab->p0[0]++; edge = tabedge(tab); } } if (ic == tab->nc) { /* Coordinate not found; allow minor extrapolation. */ if (M == 1) { /* Should there be a solution? */ if (tab->extrema[0] <= *wp && *wp <= tab->extrema[1]) { dcrd = tab->coord; for (i = 0; i < 2; i++) { if (i) dcrd += tab->K[0] - 2; delta = (*wp - *dcrd) / (*(dcrd+1) - *dcrd); if (i == 0) { if (-0.5 <= delta && delta <= 0.0) { tab->p0[0] = 0; tab->delta[0] = delta; ic = 0; break; } } else { if (1.0 <= delta && delta <= 1.5) { tab->p0[0] = tab->K[0] - 1; tab->delta[0] = delta - 1.0; ic = 0; } } } } } else { /* Multi-dimensional tables. */ /* >>> TBD <<< */ } } if (ic == tab->nc) { /* Coordinate not found. */ *statp = 1; status = wcserr_set(TAB_ERRMSG(TABERR_BAD_WORLD)); } else { /* Determine the intermediate world coordinates. */ Km = tab->K; for (m = 0; m < M; m++, Km++) { /* N.B. Upsilon_m and psi_m are 1-relative FITS indexes. */ upsilon = (tab->p0[m] + 1) + tab->delta[m]; if (upsilon < 0.5 || upsilon > *Km + 0.5) { /* Index out of range. */ *statp = 1; status = wcserr_set(TAB_ERRMSG(TABERR_BAD_WORLD)); } else { /* Do inverse lookup of the index vector. */ Psi = tab->index[m]; if (Psi == 0x0) { /* Default indexing. */ psi_m = upsilon; } else { /* Decrement Psi and use 1-relative C array indexing to match the 1-relative FITS indexing. */ Psi--; if (*Km == 1) { /* Degenerate index vector. */ psi_m = Psi[1]; } else { k = (int)(upsilon); psi_m = Psi[k]; if (k < *Km) { psi_m += (upsilon - k) * (Psi[k+1] - Psi[k]); } } } i = tab->map[m]; xp[i] = psi_m - tab->crval[m]; } } *statp = 0; } wp += nelem; xp += nelem; statp++; } if (tabcoord) free(tabcoord); return status; } /*---------------------------------------------------------------------------- * Convenience routine to deal with of edge effects in tabprm::p0. *---------------------------------------------------------------------------*/ int tabedge(struct tabprm* tab) { int edge, *Km, m; edge = 0; Km = tab->K; for (m = 0; m < tab->M; m++, Km++) { if (tab->p0[m] == *Km) { /* p0 has been incremented beyond the end of the row, point it to the next one. */ tab->p0[m] = 0; tab->p0[m+1]++; } else if (tab->p0[m] == *Km - 1 && *Km > 1) { /* p0 is sitting at the end of a non-degenerate row. */ edge = 1; } } return edge; } /*---------------------------------------------------------------------------- * Quick test to see whether the world coordinate indicated by wp could lie * somewhere along (or near) the row of the image indexed by tabprm::p0. * Return 0 if so, 1 otherwise. * * tabprm::p0 selects a particular row of the image, p0[0] being ignored (i.e. * treated as zero). Adjacent rows that delimit a row of "voxels" are formed * by incrementing elements other than p0[0] in all binary combinations. N.B. * these are not the same as the voxels (pixels) that are indexed by, and * centred on, integral pixel coordinates in FITS. * * To see why it is necessary to examine the adjacent rows, consider the 2-D * case where the first world coordinate element is constant along each row. * If the first element of wp has value 0.5, and its value in the row indexed * by p0 has value 0, and in the next row it has value 1, then it is clear that * the solution lies in neither row but somewhere between them. Thus both rows * will be involved in finding the solution. * * tabprm::extrema is the address of the first element of a 1-D array that * records the minimum and maximum value of each element of the coordinate * vector in each row of the coordinate array, treated as though it were * defined as * * double extrema[K_M]...[K_2][2][M] * * The minimum is recorded in the first element of the compressed K_1 * dimension, then the maximum. *---------------------------------------------------------------------------*/ int tabrow(struct tabprm* tab, const double *wp) { int iv, M, m, nv, offset; unsigned int eq, gt, lt; const double tol = 1e-10; double *cp, w; M = tab->M; /* The number of corners in a "voxel". We need examine only half this number of rows. The extra factor of two will be used to select between the minimal and maximal values in each row. */ nv = 1 << M; eq = 0; lt = 0; gt = 0; for (iv = 0; iv < nv; iv++) { /* Find the index into tabprm::extrema for this row. */ offset = 0; for (m = M-1; m > 0; m--) { offset *= tab->K[m]; offset += tab->p0[m]; /* Select the row. */ if (iv & (1 << m)) { if (tab->K[m] > 1) offset++; } } /* The K_1 dimension has length 2 (see prologue). */ offset *= 2; /* Select the minimum on even numbered iterations, else the maximum. */ if (iv & 1) offset++; /* The last dimension has length M (see prologue). */ offset *= M; /* Address of the extremal elements (min or max) for this row. */ cp = tab->extrema + offset; /* For each coordinate element, we only need to find one row where its minimum value is less than that of wp, and one row where the maximum value is greater. That doesn't mean that there is a solution, only that there might be. */ for (m = 0; m < M; m++, cp++) { /* Apply the axis mapping. */ w = wp[tab->map[m]]; /* Finally the test itself; set bits in the bitmask. */ if (fabs(*cp - w) < tol) { eq |= (1 << m); } else if (*cp < w) { lt |= (1 << m); } else if (*cp > w) { gt |= (1 << m); } } /* Have all bits been switched on? */ if ((lt | eq) == nv-1 && (gt | eq) == nv-1) { /* A solution could lie within this row of voxels. */ return 0; } } /* No solution in this row. */ return 1; } /*---------------------------------------------------------------------------- * Does the world coordinate indicated by wp lie within the voxel indexed by * tabprm::p0? If so, do a binary chop of the interior of the voxel to find * it and return 0, with tabprm::delta set to the solution. Else return 1. * * As in tabrow(), a "voxel" is formed by incrementing the elements of * tabprm::p0 in all binary combinations. Note that these are not the same as * the voxels (pixels) that are indexed by, and centred on, integral pixel * coordinates in FITS. * * tabvox() calls itself recursively. When called from outside, level, being * the level of recursion, should be given as zero. tabcoord is an array * holding the addresses of the coordinates for each corner of the voxel. * vox is the address of a work array (vox2) used during recursive calls to * dissect the voxel. It is ignored when tabvox() is called from outside * (level == 0). * * It is assumed that the image dimensions are no greater than 16. ----------------------------------------------------------------------------*/ int tabvox( struct tabprm* tab, const double *wp, int level, double **tabcoord, unsigned int *vox) { int i, iv, jv, M, m, nv; unsigned int eq, et, gt, lt, vox2[16]; const double tol = 1e-10; double coord[16], *cp, dv, w, wgt; M = tab->M; /* The number of corners in a voxel. */ nv = 1 << M; dv = 1.0; for (i = 0; i < level; i++) { dv /= 2.0; } /* Could the coordinate lie within this voxel (level == 0) or sub-voxel (level > 0)? We use the fact that with linear interpolation the coordinate elements are extremal in a corner and test each one. */ lt = 0; gt = 0; eq = 0; for (iv = 0; iv < nv; iv++) { /* Select a corner of the sub-voxel. */ for (m = 0; m < M; m++) { coord[m] = 0.0; tab->delta[m] = level ? dv*vox[m] : 0.0; if (iv & (1 << m)) { tab->delta[m] += dv; } } /* Compute the coordinates of this corner of the sub-voxel by linear interpolation using the weighting algorithm described in Sect. 3.4 of WCS Paper IV. */ for (jv = 0; jv < nv; jv++) { /* Find the weight for this corner of the parent voxel. */ wgt = 1.0; for (m = 0; m < M; m++) { if (jv & (1 << m)) { wgt *= tab->delta[m]; } else { wgt *= 1.0 - tab->delta[m]; } } if (wgt == 0.0) continue; /* Add its contribution to each coordinate element. */ cp = tabcoord[jv]; for (m = 0; m < M; m++) { coord[m] += *(cp++) * wgt; } if (wgt == 1.0) break; } /* Coordinate elements are minimal or maximal in a corner. */ et = 0; for (m = 0; m < M; m++) { /* Apply the axis mapping. */ w = wp[tab->map[m]]; /* Finally the test itself; set bits in the bitmask. */ if (fabs(coord[m] - w) < tol) { et |= (1 << m); } else if (coord[m] < w) { lt |= (1 << m); } else if (coord[m] > w) { gt |= (1 << m); } } if (et == nv-1) { /* We've stumbled across a solution in this corner of the sub-voxel. */ return 0; } eq |= et; } /* Could the coordinate lie within this sub-voxel? */ if ((lt | eq) == nv-1 && (gt | eq) == nv-1) { /* Yes it could, but does it? */ /* Is it time to stop the recursion? */ if (level == 31) { /* We have a solution, squeeze out the last bit of juice. */ dv /= 2.0; for (m = 0; m < M; m++) { tab->delta[m] = dv * (2.0*vox[m] + 1.0); } return 0; } /* Subdivide the sub-voxel and try again for each subdivision. */ for (iv = 0; iv < nv; iv++) { /* Select the subdivision. */ for (m = 0; m < M; m++) { vox2[m] = level ? 2*vox[m] : 0; if (iv & (1 << m)) { vox2[m]++; } } /* Recurse. */ if (tabvox(tab, wp, level+1, tabcoord, vox2) == 0) { return 0; } } } /* No solution in this sub-voxel. */ return 1; } astropy-1.1.1/cextern/wcslib/C/GNUmakefile0000644001134200020070000003556312644017723021330 0ustar embrayscience00000000000000#----------------------------------------------------------------------------- # GNU makefile for building WCSLIB 5.10 and its test suite. # # Summary of the main targets # --------------------------- # build: Build the library. # # clean: Delete intermediate object files. # # cleaner: clean, and also delete the test executables. # # cleanest (distclean or realclean): cleaner, and also delete the object # library and the C source files generated by 'flex'. # # check (or test): Compile and run the test programs. By default they are # executed in batch mode, and non-graphical tests only report # "PASS" on success. Use # # make MODE=interactive check # # to run them interactively with full diagnostic output. To skip # graphical tests even if PGPLOT is available, use # # make CHECK=nopgplot check # # tests: Compile the test programs (but don't run them). # # Notes: # 1) If you need to make changes then preferably modify ../makedefs.in # instead and re-run configure. # # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. # http://www.atnf.csiro.au/people/Mark.Calabretta # $Id: GNUmakefile,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ #----------------------------------------------------------------------------- # Get configure settings. include ../makedefs FLEXMODS := $(patsubst %.l,%.c,$(wildcard *.l)) MODULES := $(sort \ $(patsubst %.c,%.o, \ $(filter-out getwcstab.c,$(wildcard *.c)) $(FLEXMODS))) ifeq "$(WCSTRIG)" "MACRO" CPPFLAGS += -DWCSTRIG_MACRO MODULES := $(filter-out wcstrig.o, $(MODULES)) else ifeq "$(WCSTRIG)" "NATIVE" MODULES := $(filter-out wcstrig.o, $(MODULES)) endif endif # For building the sharable library. PICLIB := libwcs-PIC.a CPPFLAGS += -I. -I.. vpath %.c test vpath %.h .. vpath %.in .. # For building and exercising the test suite # ------------------------------------------ # Test programs that don't require CFITSIO or PGPLOT... TEST_N := tlin tdis1 tdis2 tlog tprj1 tsph tsphdpa tspx ttab1 twcs twcssub \ tpih1 tbth1 tfitshdr tunits twcsfix twcscompare # ...and unofficial test programs. TEST_n := tdisiter tspcaips tspcspxe tspctrne twcs_locale # Test programs that require CFITSIO (they don't need PGPLOT). TEST_C := twcstab twcshdr tdis3 twcslint # Test programs that require PGPLOT but not PGSBOX. TEST_P := tspc tprj2 tcel1 tcel2 ttab2 ttab3 twcsmix # Test programs that require PGPLOT and PGSBOX. TEST_B := tpih2 # Test programs that aren't automatically exercised. TEST_X := tsphdpa twcshdr TESTS := $(TEST_N) # Add test programs that require CFITSIO if we have it. ifneq "$(CFITSIOINC)" "" ifneq "$(CFITSIOLIB)" "" TESTS += $(TEST_C) endif endif # Add test programs that require PGPLOT if we have it. ifneq "$(CHECK)" "nopgplot" ifneq "$(PGPLOTINC)" "" ifneq "$(PGPLOTLIB)" "" TESTS += $(TEST_P) $(TEST_B) endif endif endif # Remove tests that aren't automatically exercised. TESTS := $(filter-out $(TEST_X), $(TESTS)) PGSBOXLIB := ../pgsbox/libpgsbox-$(LIBVER).a ADDRE := 0x[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]* # Pattern rules #-------------- ifeq "$(FLEX)" "flex" %.c : %.l -@ echo '' -@ $(RM) $@ $(FLEX) $(FLFLAGS) -t $< | sed -e 's/^[ ]*#/#/' > $@ else %.c : %.l -@ echo '' -@ $(RM) $@ cp flexed/$@ . endif $(WCSLIB)(%.o) : %.c -@ echo '' $(CC) $(CPPFLAGS) $(CFLAGS) -c $< $(AR) r $(WCSLIB) $% -@ $(RM) $% $(PICLIB)(%.o) : %.c -@ echo '' $(CC) $(CPPFLAGS) $(CFLAGS) $(SHRFLAGS) -c $< $(AR) r $(PICLIB) $% -@ $(RM) $% %.i : %.c -@ echo '' -@ $(RM) $@ $(CPP) $(CPPFLAGS) $(CFLAGS) $< > $@ %.fits : test/%.keyrec tofits ./tofits < $< > $@ # Print out include file dependencies. %.d : %.c -@ echo '' -@ $(CPP) $(CPPFLAGS) $(CFLAGS) $< | \ sed -n -e 's|^# 1 "\([^/].*\.h\)".*|\1|p' | \ sort -u # Use 'make FLAVOUR=Linux run_%' to have VALGRIND defined (from flavours). run_% : % -@ echo '' -@ $(TIMER) @ if [ '$(MODE)' = interactive -o '$(VALGRIND)' ] ; then \ printf 'Press to run $<: ' ; \ read DUMMY ; \ fi ; \ if [ '$(VALGRIND)' ] ; then \ if [ '$<' = tunits ] ; then \ $(VALGRIND) ./$< < test/units_test ; \ else \ $(VALGRIND) ./$< ; \ fi ; \ else \ if [ '$(filter $<, $(TEST_N) $(TEST_C))' ] ; then \ if [ '$<' = tunits ] ; then \ if [ '$(MODE)' = interactive ] ; then \ ./$< < test/units_test 2>&1 | tee $<.out ; \ else \ ./$< < test/units_test > $<.out 2>&1 ; \ fi ; \ else \ if [ '$(MODE)' = interactive ] ; then \ ./$< < /dev/null 2>&1 | tee $<.out ; \ else \ ./$< < /dev/null > $<.out 2>&1 ; \ fi ; \ fi ; \ if grep 'FAIL:' $<.out > /dev/null ; then \ if [ '$(MODE)' != interactive ] ; then \ head -2 $<.out ; \ grep 'FAIL:' $<.out ; \ fi ; \ echo 'FAIL: C/$<' >> test_results ; \ elif grep 'PASS:' $<.out > /dev/null ; then \ if [ '$(MODE)' != interactive ] ; then \ head -2 $<.out ; \ grep 'PASS:' $<.out ; \ fi ; \ echo 'PASS: C/$<' >> test_results ; \ elif [ -f 'test/$<.out' ] ; then \ trap 'rm -f run_test.tmp' 0 1 2 3 15 ; \ sed -e 's/$(ADDRE)/0x
/g' $<.out > \ run_test.tmp ; \ mv -f run_test.tmp $<.out ; \ if cmp -s $<.out test/$<.out ; then \ if [ '$(MODE)' != interactive ] ; then \ head -2 $<.out ; \ fi ; \ echo 'PASS: Output agrees with C/test/$<.out' ; \ echo 'PASS: C/$<' >> test_results ; \ else \ if [ '$(MODE)' != interactive ] ; then \ cat $<.out ; \ fi ; \ echo '' ; \ echo 'FAIL: Output disagrees with C/test/$<.out' ; \ echo 'FAIL: C/$<' >> test_results ; \ fi ; \ elif [ '$(MODE)' != interactive ] ; then \ cat $<.out ; \ echo 'FAIL: C/$<' >> test_results ; \ fi ; \ elif [ '$(MODE)' = interactive ] ; then \ ./$< ; \ else \ if [ '$<' = tcel2 ] ; then \ echo N | ./$< ; \ else \ ./$< < /dev/null 2>&1 ; \ fi ; \ fi ; \ fi -@ echo '' # Static and static pattern rules #-------------------------------- .PHONY : build check clean cleaner cleanest distclean install lib realclean \ run_% test tests build : lib lib : $(FLEXMODS) $(WCSLIB) $(SHRLIB) $(WCSLIB) : $(MODULES:%=$(WCSLIB)(%)) -@ echo '' $(RANLIB) $@ $(SHRLIB) : $(PICLIB) -@ echo '' -@ $(RM) -r tmp mkdir tmp && \ cd tmp && \ trap 'cd .. ; $(RM) -r tmp' 0 1 2 3 15 ; \ $(AR) x ../$(PICLIB) && \ $(SHRLD) -o $@ *.o $(LDFLAGS) $(LIBS) && \ mv $@ .. $(PICLIB) : $(MODULES:%.o=$(PICLIB)(%.o)) ; install : build - if [ ! -d "$(LIBDIR)" ] ; then \ $(INSTALL) -d -m 2775 $(LIBDIR) ; \ fi $(INSTALL) -m 644 $(WCSLIB) $(LIBDIR) $(RANLIB) $(LIBDIR)/$(WCSLIB) - if [ -h "$(LIBDIR)/libwcs.a" ] ; then \ $(RM) $(LIBDIR)/libwcs.a ; \ fi - $(LN_S) $(WCSLIB) $(LIBDIR)/libwcs.a - if [ "$(SHRLIB)" != "" ] ; then \ $(INSTALL) -m 755 $(SHRLIB) $(LIBDIR) ; \ if [ -h "$(LIBDIR)/$(SONAME)" ] ; then \ $(RM) $(LIBDIR)/$(SONAME) ; \ fi ; \ $(LN_S) $(SHRLIB) $(LIBDIR)/$(SONAME) ; \ if [ "$(SHRLN)" != "" ] ; then \ if [ -h "$(LIBDIR)/$(SHRLN)" ] ; then \ $(RM) $(LIBDIR)/$(SHRLN) ; \ fi ; \ $(LN_S) $(SONAME) $(LIBDIR)/$(SHRLN) ; \ fi ; \ fi - if [ ! -d "$(INCDIR)" ] ; then \ $(INSTALL) -d -m 2775 $(INCDIR) ; \ fi $(INSTALL) -m 444 *.h $(INCDIR) $(RM) $(INCLINK) $(LN_S) $(notdir $(INCDIR)) $(INCLINK) clean : - $(RM) -r *.o *.i a.out t*.out core *.dSYM $(EXTRA_CLEAN) cleaner : clean - $(RM) .gdb_history - $(RM) $(TEST_N) $(TEST_n) $(TEST_X) - $(RM) $(TEST_P) tdis3 tpih2 twcshdr twcslint twcstab - $(RM) tofits - $(RM) bth.fits fitshdr.fits pih.fits wcslint.fits wcstab.fits - $(RM) SIP.fits SIPTPV.fits TPV3.fits TPV5.fits TPV7.fits - $(RM) DSS.fits TNX.fits ZPX.fits - $(RM) t*_cfitsio test_results cleanest distclean realclean : cleaner - $(RM) ../wcsconfig.h ../wcsconfig_tests.h - $(RM) fitshdr.c wcsbth.c wcspih.c wcsulex.c wcsutrn.c - $(RM) $(PICLIB) libwcs-*.a libwcs.so.* libwcs.*.dylib check test : tests $(TESTS:%=run_%) tests : $(TESTS) $(TEST_X) $(TEST_N) $(TEST_n) : % : test/%.c $(WCSLIB) -@ echo '' $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS) $(WCSLIB) $(LIBS) -@ $(RM) $@.o $(TEST_P) : % : test/%.c $(WCSLIB) -@ echo '' $(CC) $(CPPFLAGS) $(PGPLOTINC) $(CFLAGS) -c -o $@.o $< $(LD) -o $@ $@.o $(LDFLAGS) $(PGPLOTLIB) $(WCSLIB) $(FLIBS) $(LIBS) -@ $(RM) $@.o tpih2 : test/tpih2.c $(PGSBOXLIB) $(WCSLIB) -@ echo '' $(CC) $(CPPFLAGS) -I../pgsbox $(PGPLOTINC) $(CFLAGS) -c -o $@.o $< $(LD) -o $@ $@.o $(LDFLAGS) $(PGSBOXLIB) $(PGPLOTLIB) $(WCSLIB) \ $(FLIBS) $(LIBS) -@ $(RM) $@.o tfitshdr_cfitsio tpih1_cfitsio tbth1_cfitsio : %_cfitsio : test/%.c $(WCSLIB) -@ echo '' $(CC) -DDO_CFITSIO $(CPPFLAGS) $(CFITSIOINC) $(CFLAGS) \ -o $@ $< $(LDFLAGS) $(CFITSIOLIB) $(WCSLIB) $(LIBS) -@ $(RM) $@.o tpih2_cfitsio : test/tpih2.c $(PGSBOXLIB) $(WCSLIB) -@ echo '' $(CC) -DDO_CFITSIO $(CPPFLAGS) -I../pgsbox $(PGPLOTINC) \ $(CFITSIOINC) $(CFLAGS) -c -o $@.o $< $(LD) -o $@ $@.o $(LDFLAGS) $(PGSBOXLIB) $(PGPLOTLIB) \ $(CFITSIOLIB) $(WCSLIB) $(FLIBS) $(LIBS) -@ $(RM) $@.o twcstab : test/twcstab.c $(GETWCSTAB) $(WCSLIB) -@ echo '' $(CC) $(CPPFLAGS) $(CFITSIOINC) $(CFLAGS) -o $@ $< $(GETWCSTAB) \ $(LDFLAGS) $(CFITSIOLIB) $(WCSLIB) $(LIBS) -@ $(RM) $@.o twcshdr : test/twcshdr.c $(GETWCSTAB) $(WCSLIB) -@ echo '' $(CC) $(CPPFLAGS) $(CFITSIOINC) $(CFLAGS) -o $@ $< $(GETWCSTAB) \ $(LDFLAGS) $(CFITSIOLIB) $(WCSLIB) $(LIBS) -@ $(RM) $@.o tdis3 : test/tdis3 -@ echo '' cp $< . -@ chmod a+x $@ twcslint : test/twcslint -@ echo '' cp $< . -@ chmod a+x $@ getwcstab.o : getwcstab.c getwcstab.h -@ echo '' $(CC) $(CPPFLAGS) $(CFLAGS) $(CFITSIOINC) -c $< $(PGSBOXLIB) : -@ echo '' $(MAKE) -C ../pgsbox $(notdir $@) tofits : test/tofits.c $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< GNUmakefile : ../makedefs ; ../makedefs ../wcsconfig.h ../wcsconfig_tests.h : makedefs.in wcsconfig.h.in \ wcsconfig_tests.h.in ../config.status -@ $(RM) ../wcsconfig.h ../wcsconfig_tests.h cd .. && ./config.status show :: -@ -@ echo ' FLEXMODS := $(FLEXMODS)' -@ -@ echo ' MODULES := $(MODULES)' # Dependencies (use the %.d pattern rule to list them) #----------------------------------------------------- $(WCSLIB)(cel.o) : cel.h prj.h sph.h wcsconfig.h wcserr.h wcsmath.h \ wcsprintf.h wcstrig.h $(WCSLIB)(fitshdr.o) : wcsconfig.h fitshdr.h wcsutil.h $(WCSLIB)(dis.o) : dis.h wcserr.h wcsprintf.h wcsutil.h $(WCSLIB)(lin.o) : dis.h lin.h wcserr.h wcsprintf.h $(WCSLIB)(log.o) : log.h $(WCSLIB)(prj.o) : prj.h wcsconfig.h wcserr.h wcsmath.h wcsprintf.h \ wcstrig.h wcsutil.h $(WCSLIB)(spc.o) : spc.h spx.h wcsconfig.h wcserr.h wcsmath.h \ wcsprintf.h wcstrig.h wcsutil.h $(WCSLIB)(sph.o) : sph.h wcsconfig.h wcstrig.h $(WCSLIB)(spx.o) : spx.h wcserr.h wcsmath.h $(WCSLIB)(tab.o) : tab.h wcserr.h wcsmath.h wcsprintf.h wcsutil.h $(WCSLIB)(wcs.o) : cel.h dis.h lin.h log.h prj.h spc.h sph.h spx.h \ tab.h wcs.h wcsconfig.h wcserr.h wcsmath.h \ wcsprintf.h wcstrig.h wcsunits.h wcsutil.h $(WCSLIB)(wcsbth.o) : cel.h lin.h prj.h spc.h spx.h wcs.h wcshdr.h \ wcsmath.h wcsprintf.h wcsutil.h $(WCSLIB)(wcserr.o) : wcserr.h wcsprintf.h $(WCSLIB)(wcsfix.o) : cel.h lin.h prj.h spc.h sph.h spx.h wcs.h wcserr.h \ wcsfix.h wcsmath.h wcsunits.h wcsutil.h $(WCSLIB)(wcshdr.o) : cel.h lin.h prj.h spc.h spx.h tab.h wcs.h wcserr.h \ wcshdr.h wcsmath.h wcsutil.h $(WCSLIB)(wcspih.o) : cel.h lin.h prj.h spc.h spx.h wcs.h wcshdr.h \ wcsmath.h wcsprintf.h wcsutil.h $(WCSLIB)(wcsprintf.o): wcsprintf.h $(WCSLIB)(wcstrig.o) : wcsconfig.h wcsmath.h wcstrig.h $(WCSLIB)(wcsulex.o) : wcserr.h wcsmath.h wcsunits.h wcsutil.h $(WCSLIB)(wcsunits.o) : wcserr.h wcsunits.h $(WCSLIB)(wcsutil.o) : wcsmath.h wcsutil.h $(WCSLIB)(wcsutrn.o) : wcserr.h wcsunits.h tbth1 tbth1_cfitsio : cel.h lin.h prj.h spc.h spx.h tab.h wcs.h wcsconfig.h \ wcsconfig_tests.h wcserr.h wcsfix.h wcshdr.h tcel1 : cel.h prj.h tcel2 : cel.h prj.h tfitshdr tfitshdr_cfitsio : fitshdr.h wcsconfig.h wcsconfig_tests.h tlin : lin.h tdis1 : cel.h dis.h lin.h prj.h spc.h spx.h wcs.h wcserr.h wcshdr.h \ wcsprintf.h tdis2 : cel.h dis.h lin.h prj.h spc.h spx.h wcs.h wcserr.h wcshdr.h \ wcsprintf.h tdisiter: cel.h dis.h lin.h prj.h spc.h spx.h wcs.h wcserr.h wcshdr.h \ wcsprintf.h tlog : log.h tpih1 tpih1_cfitsio : cel.h lin.h prj.h spc.h spx.h wcs.h wcsconfig.h \ wcsconfig_tests.h wcserr.h wcsfix.h wcshdr.h wcsprintf.h tpih2 tpih2_cfitsio : cel.h lin.h prj.h spc.h spx.h wcs.h wcsconfig.h \ wcsconfig_tests.h wcshdr.h tprj1 : prj.h wcsconfig.h wcstrig.h tprj2 : prj.h tspc : spc.h spx.h wcsconfig.h wcstrig.h tspcaips: spc.h spx.h tspctrne: spc.h spx.h wcserr.h tsph : sph.h wcsconfig.h wcstrig.h tsphdpa : sph.h tspx : spx.h ttab1 : tab.h ttab2 : tab.h ttab3 : prj.h tab.h tunits : wcserr.h wcsunits.h twcs : cel.h fitshdr.h lin.h log.h prj.h spc.h sph.h spx.h tab.h wcs.h \ wcsconfig.h wcsconfig_tests.h wcserr.h wcsfix.h wcshdr.h wcslib.h \ wcsmath.h wcsprintf.h wcstrig.h wcsunits.h wcsutil.h twcs_locale : cel.h lin.h prj.h spc.h spx.h wcs.h wcserr.h wcshdr.h \ wcsprintf.h twcsfix : cel.h lin.h prj.h spc.h spx.h wcs.h wcserr.h wcsfix.h wcsprintf.h \ wcsunits.h twcshdr : cel.h fitshdr.h getwcstab.h lin.h log.h prj.h spc.h sph.h spx.h \ tab.h wcs.h wcsconfig.h wcserr.h wcsfix.h wcshdr.h wcslib.h \ wcsmath.h wcsprintf.h wcstrig.h wcsunits.h wcsutil.h twcsmix : cel.h lin.h prj.h spc.h sph.h spx.h wcs.h twcssub : cel.h lin.h prj.h spc.h spx.h wcs.h wcserr.h twcstab : cel.h fitshdr.h getwcstab.h lin.h log.h prj.h spc.h sph.h spx.h \ tab.h wcs.h wcsconfig.h wcserr.h wcsfix.h wcshdr.h wcslib.h \ wcsmath.h wcsprintf.h wcstrig.h wcsunits.h wcsutil.h run_tdis1 : TPV3.fits TPV5.fits TPV7.fits run_tdis2 : SIP.fits run_tdis3 : DSS.fits SIPTPV.fits TNX.fits ZPX.fits run_tbth1 run_tbth1_cfitsio : bth.fits run_tfitshdr run_tfitshdr_cfitsio : fitshdr.fits run_tpih1 run_tpih1_cfitsio : pih.fits run_tpih2 run_tpih2_cfitsio : pih.fits run_twcslint : wcslint.fits run_twcs_locale : pih.fits astropy-1.1.1/cextern/wcslib/C/log.c0000644001134200020070000000516712644017723020200 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: log.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include "log.h" /* Map status return value to message. */ const char *log_errmsg[] = { "Success", "", "Invalid log-coordinate reference value", "One or more of the x coordinates were invalid", "One or more of the world coordinates were invalid"}; /*--------------------------------------------------------------------------*/ int logx2s( double crval, int nx, int sx, int slogc, const double x[], double logc[], int stat[]) { register int ix; register int *statp; register const double *xp; register double *logcp; if (crval <= 0.0) { return LOGERR_BAD_LOG_REF_VAL; } xp = x; logcp = logc; statp = stat; for (ix = 0; ix < nx; ix++, xp += sx, logcp += slogc) { *logcp = crval * exp((*xp) / crval); *(statp++) = 0; } return 0; } /*--------------------------------------------------------------------------*/ int logs2x( double crval, int nlogc, int slogc, int sx, const double logc[], double x[], int stat[]) { int status; register int ilogc; register int *statp; register const double *logcp; register double *xp; if (crval <= 0.0) { return LOGERR_BAD_LOG_REF_VAL; } xp = x; logcp = logc; statp = stat; status = 0; for (ilogc = 0; ilogc < nlogc; ilogc++, logcp += slogc, xp += sx) { if (*logcp > 0.0) { *xp = crval * log(*logcp / crval); *(statp++) = 0; } else { *(statp++) = 1; status = LOGERR_BAD_WORLD; } } return status; } astropy-1.1.1/cextern/wcslib/C/getwcstab.c0000644001134200020070000001002412644017723021366 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: getwcstab.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include "getwcstab.h" /*--------------------------------------------------------------------------*/ int fits_read_wcstab( fitsfile *fptr, int nwtb, wtbarr *wtb, int *status) { int anynul, colnum, hdunum, iwtb, m, naxis, nostat; long *naxes = 0, nelem; wtbarr *wtbp; if (*status) return *status; if (fptr == 0) { return (*status = NULL_INPUT_PTR); } if (nwtb == 0) return 0; /* Zero the array pointers. */ wtbp = wtb; for (iwtb = 0; iwtb < nwtb; iwtb++, wtbp++) { *wtbp->arrayp = 0x0; } /* Save HDU number so that we can move back to it later. */ fits_get_hdu_num(fptr, &hdunum); wtbp = wtb; for (iwtb = 0; iwtb < nwtb; iwtb++, wtbp++) { /* Move to the required binary table extension. */ if (fits_movnam_hdu(fptr, BINARY_TBL, (char *)(wtbp->extnam), wtbp->extver, status)) { goto cleanup; } /* Locate the table column. */ if (fits_get_colnum(fptr, CASEINSEN, (char *)(wtbp->ttype), &colnum, status)) { goto cleanup; } /* Get the array dimensions and check for consistency. */ if (wtbp->ndim < 1) { *status = NEG_AXIS; goto cleanup; } if (!(naxes = calloc(wtbp->ndim, sizeof(long)))) { *status = MEMORY_ALLOCATION; goto cleanup; } if (fits_read_tdim(fptr, colnum, wtbp->ndim, &naxis, naxes, status)) { goto cleanup; } if (naxis != wtbp->ndim) { if (wtbp->kind == 'c' && wtbp->ndim == 2) { /* Allow TDIMn to be omitted for degenerate coordinate arrays. */ naxis = 2; naxes[1] = naxes[0]; naxes[0] = 1; } else { *status = BAD_TDIM; goto cleanup; } } if (wtbp->kind == 'c') { /* Coordinate array; calculate the array size. */ nelem = naxes[0]; for (m = 0; m < naxis-1; m++) { *(wtbp->dimlen + m) = naxes[m+1]; nelem *= naxes[m+1]; } } else { /* Index vector; check length. */ if ((nelem = naxes[0]) != *(wtbp->dimlen)) { /* N.B. coordinate array precedes the index vectors. */ *status = BAD_TDIM; goto cleanup; } } free(naxes); naxes = 0; /* Allocate memory for the array. */ if (!(*wtbp->arrayp = calloc((size_t)nelem, sizeof(double)))) { *status = MEMORY_ALLOCATION; goto cleanup; } /* Read the array from the table. */ if (fits_read_col_dbl(fptr, colnum, wtbp->row, 1L, nelem, 0.0, *wtbp->arrayp, &anynul, status)) { goto cleanup; } } cleanup: /* Move back to the starting HDU. */ nostat = 0; fits_movabs_hdu(fptr, hdunum, 0, &nostat); /* Release allocated memory. */ if (naxes) free(naxes); if (*status) { wtbp = wtb; for (iwtb = 0; iwtb < nwtb; iwtb++, wtbp++) { if (*wtbp->arrayp) free(*wtbp->arrayp); } } return *status; } astropy-1.1.1/cextern/wcslib/C/wcsprintf.h0000644001134200020070000001372612644017723021443 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsprintf.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the wcsprintf routines * --------------------------------- * Routines in this suite allow diagnostic output from celprt(), linprt(), * prjprt(), spcprt(), tabprt(), wcsprt(), and wcserr_prt() to be redirected to * a file or captured in a string buffer. Those routines all use wcsprintf() * for output. Likewise wcsfprintf() is used by wcsbth() and wcspih(). Both * functions may be used by application programmers to have other output go to * the same place. * * * wcsprintf() - Print function used by WCSLIB diagnostic routines * --------------------------------------------------------------- * wcsprintf() is used by celprt(), linprt(), prjprt(), spcprt(), tabprt(), * wcsprt(), and wcserr_prt() for diagnostic output which by default goes to * stdout. However, it may be redirected to a file or string buffer via * wcsprintf_set(). * * Given: * format char* Format string, passed to one of the printf(3) family * of stdio library functions. * * ... mixed Argument list matching format, as per printf(3). * * Function return value: * int Number of bytes written. * * * wcsfprintf() - Print function used by WCSLIB diagnostic routines * ---------------------------------------------------------------- * wcsfprintf() is used by wcsbth(), and wcspih() for diagnostic output which * they send to stderr. However, it may be redirected to a file or string * buffer via wcsprintf_set(). * * Given: * stream FILE* The output stream if not overridden by a call to * wcsprintf_set(). * * format char* Format string, passed to one of the printf(3) family * of stdio library functions. * * ... mixed Argument list matching format, as per printf(3). * * Function return value: * int Number of bytes written. * * * wcsprintf_set() - Set output disposition for wcsprintf() and wcsfprintf() * ------------------------------------------------------------------------- * wcsprintf_set() sets the output disposition for wcsprintf() which is used by * the celprt(), linprt(), prjprt(), spcprt(), tabprt(), wcsprt(), and * wcserr_prt() routines, and for wcsfprintf() which is used by wcsbth() and * wcspih(). * * Given: * wcsout FILE* Pointer to an output stream that has been opened for * writing, e.g. by the fopen() stdio library function, * or one of the predefined stdio output streams - stdout * and stderr. If zero (NULL), output is written to an * internally-allocated string buffer, the address of * which may be obtained by wcsprintf_buf(). * * Function return value: * int Status return value: * 0: Success. * * * wcsprintf_buf() - Get the address of the internal string buffer * --------------------------------------------------------------- * wcsprintf_buf() returns the address of the internal string buffer created * when wcsprintf_set() is invoked with its FILE* argument set to zero. * * Function return value: * const char * * Address of the internal string buffer. The user may * free this buffer by calling wcsprintf_set() with a * valid FILE*, e.g. stdout. The free() stdlib library * function must NOT be invoked on this const pointer. * * * WCSPRINTF_PTR() macro - Print addresses in a consistent way * ----------------------------------------------------------- * WCSPRINTF_PTR() is a preprocessor macro used to print addresses in a * consistent way. * * On some systems the "%p" format descriptor renders a NULL pointer as the * string "0x0". On others, however, it produces "0" or even "(nil)". On * some systems a non-zero address is prefixed with "0x", on others, not. * * The WCSPRINTF_PTR() macro ensures that a NULL pointer is always rendered as * "0x0" and that non-zero addresses are prefixed with "0x" thus providing * consistency, for example, for comparing the output of test programs. * *===========================================================================*/ #ifndef WCSLIB_WCSPRINTF #define WCSLIB_WCSPRINTF #include #ifdef __cplusplus extern "C" { #endif #define WCSPRINTF_PTR(str1, ptr, str2) \ if (ptr) { \ wcsprintf("%s%#lx%s", (str1), (unsigned long)(ptr), (str2)); \ } else { \ wcsprintf("%s0x0%s", (str1), (str2)); \ } int wcsprintf_set(FILE *wcsout); int wcsprintf(const char *format, ...); int wcsfprintf(FILE *stream, const char *format, ...); const char *wcsprintf_buf(void); #ifdef __cplusplus } #endif #endif /* WCSLIB_WCSPRINTF */ astropy-1.1.1/cextern/wcslib/C/dis.h0000644001134200020070000012602212644017723020175 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: dis.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the dis routines * --------------------------- * Routines in this suite implement extensions to the FITS World Coordinate * System (WCS) standard proposed by * = "Representations of distortions in FITS world coordinate systems", = Calabretta, M.R. et al. (WCS Paper IV, draft dated 2004/04/22), = available from http://www.atnf.csiro.au/people/Mark.Calabretta * * In brief, a distortion function may occupy one of two positions in the WCS * algorithm chain. Prior distortions precede the linear transformation * matrix, whether it be PCi_ja or CDi_ja, and sequent distortions follow it. * WCS Paper IV defines FITS keywords used to specify parameters for predefined * distortion functions. The following are used for prior distortions: * = CPDISja ...(string-valued, identifies the distortion function) = DPja ...(record-valued, parameters) = CPERRja ...(floating-valued, maximum value) * * Their counterparts for sequent distortions are CQDISia, DQia, and CQERRia. * An additional floating-valued keyword, DVERRa, records the maximum value of * the combined distortions. * * DPja and DQia are "record-valued". Syntactically, the keyvalues are * standard FITS strings, but they are to be interpreted in a special way. * The general form is * = DPja = ': ' * * where the field-specifier consists of a sequence of fields separated by * periods, and the ': ' between the field-specifier and the floating-point * value is part of the record syntax. For example: * = DP1 = 'AXIS.1: 1' * * Certain field-specifiers are defined for all distortion functions, while * others are defined only for particular distortions. Refer to WCS Paper IV * for further details. wcspih() parses all distortion keywords and loads them * into a disprm struct for analysis by disset() which knows (or possibly does * not know) how to interpret them. Of the Paper IV distortion functions, only * the general Polynomial distortion is currently implemented here. * * TPV - the TPV "projection": * --------------------------- * The distortion function component of the TPV celestial "projection" is also * supported. The TPV projection, originally proposed in a draft of WCS Paper * II, consists of a TAN projection with sequent polynomial distortion, the * coefficients of which are encoded in PVi_ma keyrecords. Full details may be * found at the registry of FITS conventions: * = http://fits.gsfc.nasa.gov/registry/tpvwcs/tpv.html * * Internally, wcsset() changes TPV to a TAN projection, translates the PVi_ma * keywords to DQia and loads them into a disprm struct. These DQia keyrecords * have the form * = DQia = 'TPV.m: ' * * where i, a, m, and the value for each DQia match each PVi_ma. Consequently, * WCSLIB would handle a FITS header containing these keywords, along with * CQDISia = 'TPV' and the required DQia.NAXES and DQia.AXIS.ihat keywords. * * SIP - Simple Imaging Polynomial: * -------------------------------- * These routines also support the Simple Imaging Polynomial (SIP), whose * design was influenced by early drafts of WCS Paper IV. It is described in * detail in * = http://fits.gsfc.nasa.gov/registry/sip.html * * SIP, which is defined only as a prior distortion for 2-D celestial images, * has the interesting feature that it records an approximation to the inverse * polynomial distortion function. This is used by disx2p() to provide an * initial estimate for its more precise iterative inversion. The * special-purpose keywords used by SIP are parsed and translated by wcspih() * as follows: * = A_p_q = -> DP1 = 'SIP.FWD.p_q: ' = AP_p_q = -> DP1 = 'SIP.REV.p_q: ' = B_p_q = -> DP2 = 'SIP.FWD.p_q: ' = BP_p_q = -> DP2 = 'SIP.REV.p_q: ' = A_DMAX = -> DPERR1 = = B_DMAX = -> DPERR2 = * * SIP's A_ORDER and B_ORDER keywords are not used. WCSLIB would recognise a * FITS header containing the above keywords, along with CPDISja = 'SIP' and * the required DPja.NAXES keywords. * * DSS - Digitized Sky Survey: * --------------------------- * The Digitized Sky Survey resulted from the production of the Guide Star * Catalogue for the Hubble Space Telescope. Plate solutions based on a * polynomial distortion function were encoded in FITS using non-standard * keywords. Sect. 5.2 of WCS Paper IV describes how DSS coordinates may be * translated to a sequent Polynomial distortion using two auxiliary variables. * That translation is based on optimising the non-distortion component of the * plate solution. * * Following Paper IV, wcspih() translates the non-distortion component of DSS * coordinates to standard WCS keywords (CRPIXja, PCi_ja, CRVALia, etc), and * fills a wcsprm struct with their values. It encodes the DSS polynomial * coefficients as * = AMDXm = -> DQ1 = 'AMD.m: ' = AMDYm = -> DQ2 = 'AMD.m: ' * * WCSLIB would recognise a FITS header containing the above keywords, along * with CQDISia = 'DSS' and the required DQia.NAXES keywords. * * WAT - the TNX and ZPX "projections": * ------------------------------------ * The TNX and ZPX "projections" add a polynomial distortion function to the * standard TAN and ZPN projections respectively. Unusually, the polynomial * may be expressed as the sum of Chebyshev or Legendre polynomials, or as a * simple sum of monomials, as described in * = http://fits.gsfc.nasa.gov/registry/tnx/tnx-doc.html = http://fits.gsfc.nasa.gov/registry/zpxwcs/zpx.html * * The polynomial coefficients are encoded in special-purpose WATi_n keywords * as a set of continued strings, thus providing the name for this distortion * type. WATi_n are parsed and translated by wcspih() into the following set: * = DQi = 'WAT.POLY: ' = DQi = 'WAT.XMIN: ' = DQi = 'WAT.XMAX: ' = DQi = 'WAT.YMIN: ' = DQi = 'WAT.YMAX: ' = DQi = 'WAT.CHBY.m_n: ' or = DQi = 'WAT.LEGR.m_n: ' or = DQi = 'WAT.MONO.m_n: ' * * along with CQDISia = 'WAT' and the required DPja.NAXES keywords. For ZPX, * the ZPN projection parameters are also encoded in WATi_n, and wcspih() * translates these to standard PVi_ma. * * TPD - Template Polynomial Distortion: * ------------------------------------- * The "Template Polynomial Distortion" (TPD) is a superset of the TPV, SIP, * DSS, and WAT (TNX & ZPX) polynomial distortions that also supports 1-D usage * and inversions. Like TPV, SIP, and DSS, the form of the polynomial is fixed * (the "template") and only the coefficients for the required terms are set * non-zero. TPD generalizes TPV in going to 9th degree, SIP by accomodating * TPV's linear and radial terms, and DSS in both respects. While in theory * the degree of the WAT polynomial distortion in unconstrained, in practice it * is limited to values that can be handled by TPD. * * Within WCSLIB, TPV, SIP, DSS, and WAT are all implemented as special cases * of TPD. Indeed, TPD was developed precisely for that purpose. WAT * distortions expressed as the sum of Chebyshev or Legendre polynomials are * expanded for TPD as a simple sum of monomials. Moreover, the general * Polynomial distortion is translated and implemented internally as TPD * whenever possible. * * However, WCSLIB also recognizes 'TPD' as a distortion function in its own * right (i.e. a recognized value of CPDISja or CQDISia), for use as both prior * and sequent distortions. Its DPja and DQia keyrecords have the form * = DPja = 'TPD.FWD.m: ' = DPja = 'TPD.REV.m: ' * * for the forward and reverse distortion functions. Moreover, like the * general Polynomial distortion, TPD supports auxiliary variables, though only * as a linear transformation of pixel coordinates (p1,p2): * = x = a0 + a1*p1 + a2*p2 = y = b0 + b1*p1 + b2*p2 * * where the coefficients of the auxiliary variables (x,y) are recorded as * = DPja = 'AUX.1.COEFF.0: a0' ...default 0.0 = DPja = 'AUX.1.COEFF.1: a1' ...default 1.0 = DPja = 'AUX.1.COEFF.2: a2' ...default 0.0 = DPja = 'AUX.2.COEFF.0: b0' ...default 0.0 = DPja = 'AUX.2.COEFF.1: b1' ...default 0.0 = DPja = 'AUX.2.COEFF.2: b2' ...default 1.0 * * Though nowhere near as powerful, in typical applications TPD is considerably * faster than the general Polynomial distortion. As TPD has a finite and not * too large number of possible terms (60), the coefficients for each can be * stored (by disset()) in a fixed location in the disprm::dparm[] array. A * large part of the speedup then arises from evaluating the polynomial using * Horner's scheme. * * Separate implementations for polynomials of each degree, and conditionals * for 1-D polynomials and 2-D polynomials with and without the radial * variable, ensure that unused terms mostly do not impose a significant * computational overhead. * * The TPD terms are as follows * = 0: 1 4: xx 12: xxxx 24: xxxxxx 40: xxxxxxxx = 5: xy 13: xxxy 25: xxxxxy 41: xxxxxxxy = 1: x 6: yy 14: xxyy 26: xxxxyy 42: xxxxxxyy = 2: y 15: xyyy 27: xxxyyy 43: xxxxxyyy = 3: r 7: xxx 16: yyyy 28: xxyyyy 44: xxxxyyyy = 8: xxy 29: xyyyyy 45: xxxyyyyy = 9: xyy 17: xxxxx 30: yyyyyy 46: xxyyyyyy = 10: yyy 18: xxxxy 47: xyyyyyyy = 11: rrr 19: xxxyy 31: xxxxxxx 48: yyyyyyyy = 20: xxyyy 32: xxxxxxy = 21: xyyyy 33: xxxxxyy 49: xxxxxxxxx = 22: yyyyy 34: xxxxyyy 50: xxxxxxxxy = 23: rrrrr 35: xxxyyyy 51: xxxxxxxyy = 36: xxyyyyy 52: xxxxxxyyy = 37: xyyyyyy 53: xxxxxyyyy = 38: yyyyyyy 54: xxxxyyyyy = 39: rrrrrrr 55: xxxyyyyyy = 56: xxyyyyyyy = 57: xyyyyyyyy = 58: yyyyyyyyy = 59: rrrrrrrrr * * where r = sqrt(xx + yy). Note that even powers of r are excluded since they * can be accomodated by powers of (xx + yy). * * TPV uses all terms up to 39. The m in its PVi_ma keywords translates * directly to the TPD coefficient number. * * SIP uses all terms except for 0, 3, 11, 23, 39, and 59, with terms 1 and 2 * only used for the inverse. Its A_p_q, etc. keywords must be translated * using a map. * * DSS uses terms 0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 17, 19, and 21. The presence * of a non-zero constant term arises through the use of auxiliary variables * with origin offset from the reference point of the TAN projection. However, * in the translation given by WCS Paper IV, the distortion polynomial is zero, * or very close to zero, at the reference pixel itself. The mapping between * DSS's AMDXm (or AMDYm) keyvalues and TPD coefficients, while still simple, * is not quite as straightforward as for TPV and SIP. * * WAT uses all but the radial terms: 3, 11, 23, 39, and 59. While the mapping * between WAT's monomial coefficients and TPD is fairly simple, for its * expression in terms of a sum of Chebyshev or Legendre polynomials it is much * less so. * * Summary of the dis routines * --------------------------- * These routines apply the distortion functions defined by the extension to * the FITS WCS standard proposed in Paper IV. They are based on the disprm * struct which contains all information needed for the computations. The * struct contains some members that must be set by the user, and others that * are maintained by these routines, somewhat like a C++ class but with no * encapsulation. * * disndp(), dpfill(), disini(), discpy(), and disfree() are provided to manage * the disprm struct, and another, disprt(), prints its contents. * * disperr() prints the error message(s) (if any) stored in a disprm struct. * * wcshdo() normally writes SIP and TPV headers in their native form if at all * possible. However, dishdo() may be used to set a flag that tells it to * write the header in the form of the TPD translation used internally. * * A setup routine, disset(), computes intermediate values in the disprm struct * from parameters in it that were supplied by the user. The struct always * needs to be set up by disset(), though disset() need not be called * explicitly - refer to the explanation of disprm::flag. * * disp2x() and disx2p() implement the WCS distortion functions, disp2x() using * separate functions, such as dispoly() and tpd7(), to do the computation. * * An auxiliary routine, diswarp(), computes various measures of the distortion * over a specified range of coordinates. * * PLEASE NOTE: Distortions are not yet handled by wcsbth(), or wcscompare(). * * * disndp() - Memory allocation for DPja and DQia * ---------------------------------------------- * disndp() changes the value of NDPMAX (default 256). This global variable * controls the number of dpkey structs, for holding DPja or DQia keyvalues, * that disini() should allocate space for. * * PLEASE NOTE: This function is not thread-safe. * * Given: * n int Value of NDPMAX; ignored if < 0. * * Function return value: * int Current value of NDPMAX. * * * dpfill() - Fill the contents of a dpkey struct * ---------------------------------------------- * dpfill() is a utility routine to aid in filling the contents of the dpkey * struct. No checks are done on the validity of the inputs. * * WCS Paper IV specifies the syntax of a record-valued keyword as * = keyword = ': ' * * However, some DPja and DQia record values, such as those of DPja.NAXES and * DPja.AXIS.j, are intrinsically integer-valued. While FITS header parsers * are not expected to know in advance which of DPja and DQia are integral and * which are floating point, if the record's value parses as an integer (i.e. * without decimal point or exponent), then preferably enter it into the dpkey * struct as an integer. Either way, it doesn't matter as disset() accepts * either data type for all record values. * * Given and returned: * dp struct dpkey* * Store for DPja and DQia keyvalues. * * Given: * keyword const char * * field const char * * These arguments are concatenated with an intervening * "." to construct the full record field name, i.e. * including the keyword name, DPja or DQia (but * excluding the colon delimiter which is NOT part of the * name). Either may be given as a NULL pointer. Set * both NULL to omit setting this component of the * struct. * * j int Axis number (1-relative), i.e. the j in DPja or * i in DQia. Can be given as 0, in which case the axis * number will be obtained from the keyword component of * the field name which must either have been given or * preset. * * If j is non-zero, and keyword was given, then the * value of j will be used to fill in the axis number. * * type int Data type of the record's value * 0: Integer, * 1: Floating point. * * i int For type == 0, the integer value of the record. * * f double For type == 1, the floating point value of the record. * * Function return value: * int Status return value: * 0: Success. * * * disini() - Default constructor for the disprm struct * ---------------------------------------------------- * disini() allocates memory for arrays in a disprm struct and sets all members * of the struct to default values. Memory is allocated for up to NDPMAX DPja * or DQia keywords per WCS representation. This may be changed via disndp() * before disini() is called. * * PLEASE NOTE: every disprm struct must be initialized by disini(), possibly * repeatedly. On the first invokation, and only the first invokation, * disprm::flag must be set to -1 to initialize memory management, regardless * of whether disini() will actually be used to allocate memory. * * Given: * alloc int If true, allocate memory unconditionally for arrays in * the disprm struct. * * If false, it is assumed that pointers to these arrays * have been set by the user except if they are null * pointers in which case memory will be allocated for * them regardless. (In other words, setting alloc true * saves having to initalize these pointers to zero.) * * naxis int The number of world coordinate axes, used to determine * array sizes. * * Given and returned: * dis struct disprm* * Distortion function parameters. Note that, in order * to initialize memory management disprm::flag must be * set to -1 when dis is initialized for the first time * (memory leaks may result if it had already been * initialized). * * Function return value: * int Status return value: * 0: Success. * 1: Null disprm pointer passed. * 2: Memory allocation failed. * * For returns > 1, a detailed error message is set in * disprm::err if enabled, see wcserr_enable(). * * * discpy() - Copy routine for the disprm struct * --------------------------------------------- * discpy() does a deep copy of one disprm struct to another, using disini() to * allocate memory unconditionally for its arrays if required. Only the * "information to be provided" part of the struct is copied; a call to * disset() is required to initialize the remainder. * * Given: * alloc int If true, allocate memory unconditionally for arrays in * the destination. Otherwise, it is assumed that * pointers to these arrays have been set by the user * except if they are null pointers in which case memory * will be allocated for them regardless. * * dissrc const struct disprm* * Struct to copy from. * * Given and returned: * disdst struct disprm* * Struct to copy to. disprm::flag should be set to -1 * if disdst was not previously initialized (memory leaks * may result if it was previously initialized). * * Function return value: * int Status return value: * 0: Success. * 1: Null disprm pointer passed. * 2: Memory allocation failed. * * For returns > 1, a detailed error message is set in * disprm::err if enabled, see wcserr_enable(). * * * disfree() - Destructor for the disprm struct * -------------------------------------------- * disfree() frees memory allocated for the disprm arrays by disini(). * disini() keeps a record of the memory it allocates and disfree() will only * attempt to free this. * * PLEASE NOTE: disfree() must not be invoked on a disprm struct that was not * initialized by disini(). * * Given: * dis struct disprm* * Distortion function parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null disprm pointer passed. * * * disprt() - Print routine for the disprm struct * ---------------------------------------------- * disprt() prints the contents of a disprm struct using wcsprintf(). Mainly * intended for diagnostic purposes. * * Given: * dis const struct disprm* * Distortion function parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null disprm pointer passed. * * * disperr() - Print error messages from a disprm struct * ----------------------------------------------------- * disperr() prints the error message(s) (if any) stored in a disprm struct. * If there are no errors then nothing is printed. It uses wcserr_prt(), q.v. * * Given: * dis const struct disprm* * Distortion function parameters. * * prefix const char * * If non-NULL, each output line will be prefixed with * this string. * * Function return value: * int Status return value: * 0: Success. * 1: Null disprm pointer passed. * * * dishdo() - write FITS headers using TPD * --------------------------------------- * dishdo() sets a flag that tells wcshdo() to write FITS headers in the form * of the TPD translation used internally. Normally SIP and TPV would be * written in their native form if at all possible. * * Given and returned: * dis struct disprm* * Distortion function parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null disprm pointer passed. * 3: No TPD translation. * * * disset() - Setup routine for the disprm struct * ---------------------------------------------- * disset(), sets up the disprm struct according to information supplied within * it - refer to the explanation of disprm::flag. * * Note that this routine need not be called directly; it will be invoked by * disp2x() and disx2p() if the disprm::flag is anything other than a * predefined magic value. * * Given and returned: * dis struct disprm* * Distortion function parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null disprm pointer passed. * 2: Memory allocation failed. * 3: Invalid parameter. * * For returns > 1, a detailed error message is set in * disprm::err if enabled, see wcserr_enable(). * * * disp2x() - Apply distortion function * ------------------------------------ * disp2x() applies the distortion functions. By definition, the distortion * is in the pixel-to-world direction. * * Depending on the point in the algorithm chain at which it is invoked, * disp2x() may transform pixel coordinates to corrected pixel coordinates, or * intermediate pixel coordinates to corrected intermediate pixel coordinates, * or image coordinates to corrected image coordinates. * * * Given and returned: * dis struct disprm* * Distortion function parameters. * * Given: * rawcrd const double[naxis] * Array of coordinates. * * Returned: * discrd double[naxis] * Array of coordinates to which the distortion functions * have been applied. * * Function return value: * int Status return value: * 0: Success. * 1: Null disprm pointer passed. * 2: Memory allocation failed. * 3: Invalid parameter. * 4: Distort error. * * For returns > 1, a detailed error message is set in * disprm::err if enabled, see wcserr_enable(). * * * disx2p() - Apply de-distortion function * --------------------------------------- * disx2p() applies the inverse of the distortion functions. By definition, * the de-distortion is in the world-to-pixel direction. * * Depending on the point in the algorithm chain at which it is invoked, * disx2p() may transform corrected pixel coordinates to pixel coordinates, or * corrected intermediate pixel coordinates to intermediate pixel coordinates, * or corrected image coordinates to image coordinates. * * disx2p() iteratively solves for the inverse using disp2x(). It assumes * that the distortion is small and the functions are well-behaved, being * continuous and with continuous derivatives. Also that, to first order * in the neighbourhood of the solution, discrd[j] ~= a + b*rawcrd[j], i.e. * independent of rawcrd[i], where i != j. This is effectively equivalent to * assuming that the distortion functions are separable to first order. * Furthermore, a is assumed to be small, and b close to unity. * * If disprm::disx2p() is defined, then disx2p() uses it to provide an initial * estimate for its more precise iterative inversion. * * Given and returned: * dis struct disprm* * Distortion function parameters. * * Given: * discrd const double[naxis] * Array of coordinates. * * Returned: * rawcrd double[naxis] * Array of coordinates to which the inverse distortion * functions have been applied. * * Function return value: * int Status return value: * 0: Success. * 1: Null disprm pointer passed. * 2: Memory allocation failed. * 3: Invalid parameter. * 5: De-distort error. * * For returns > 1, a detailed error message is set in * disprm::err if enabled, see wcserr_enable(). * * * diswarp() - Compute measures of distortion * ------------------------------------------ * diswarp() computes various measures of the distortion over a specified range * of coordinates. * * For prior distortions, the measures may be interpreted simply as an offset * in pixel coordinates. For sequent distortions, the interpretation depends * on the nature of the linear transformation matrix (PCi_ja or CDi_ja). If * the latter introduces a scaling, then the measures will also be scaled. * Note also that the image domain, which is rectangular in pixel coordinates, * may be rotated, skewed, and/or stretched in intermediate pixel coordinates, * and in general cannot be defined using pixblc[] and pixtrc[]. * * PLEASE NOTE: the measures of total distortion may be essentially meaningless * if there are multiple sequent distortions with different scaling. * * See also linwarp(). * * Given and returned: * dis struct disprm* * Distortion function parameters. * * Given: * pixblc const double[naxis] * Start of the range of pixel coordinates (for prior * distortions), or intermediate pixel coordinates (for * sequent distortions). May be specified as a NULL * pointer which is interpreted as (1,1,...). * * pixtrc const double[naxis] * End of the range of pixel coordinates (prior) or * intermediate pixel coordinates (sequent). * * pixsamp const double[naxis] * If positive or zero, the increment on the particular * axis, starting at pixblc[]. Zero is interpreted as a * unit increment. pixsamp may also be specified as a * NULL pointer which is interpreted as all zeroes, i.e. * unit increments on all axes. * * If negative, the grid size on the particular axis (the * absolute value being rounded to the nearest integer). * For example, if pixsamp is (-128.0,-128.0,...) then * each axis will be sampled at 128 points between * pixblc[] and pixtrc[] inclusive. Use caution when * using this option on non-square images. * * Returned: * nsamp int* The number of pixel coordinates sampled. * * Can be specified as a NULL pointer if not required. * * maxdis double[naxis] * For each individual distortion function, the * maximum absolute value of the distortion. * * Can be specified as a NULL pointer if not required. * * maxtot double* For the combination of all distortion functions, the * maximum absolute value of the distortion. * * Can be specified as a NULL pointer if not required. * * avgdis double[naxis] * For each individual distortion function, the * mean value of the distortion. * * Can be specified as a NULL pointer if not required. * * avgtot double* For the combination of all distortion functions, the * mean value of the distortion. * * Can be specified as a NULL pointer if not required. * * rmsdis double[naxis] * For each individual distortion function, the * root mean square deviation of the distortion. * * Can be specified as a NULL pointer if not required. * * rmstot double* For the combination of all distortion functions, the * root mean square deviation of the distortion. * * Can be specified as a NULL pointer if not required. * * Function return value: * int Status return value: * 0: Success. * 1: Null disprm pointer passed. * 2: Memory allocation failed. * 3: Invalid parameter. * 4: Distort error. * * * disprm struct - Distortion parameters * ------------------------------------- * The disprm struct contains all of the information required to apply a set of * distortion functions. It consists of certain members that must be set by * the user ("given") and others that are set by the WCSLIB routines * ("returned"). While the addresses of the arrays themselves may be set by * disini() if it (optionally) allocates memory, their contents must be set by * the user. * * int flag * (Given and returned) This flag must be set to zero whenever any of the * following members of the disprm struct are set or modified: * * - disprm::naxis, * - disprm::dtype, * - disprm::ndp, * - disprm::dp. * * This signals the initialization routine, disset(), to recompute the * returned members of the disprm struct. disset() will reset flag to * indicate that this has been done. * * PLEASE NOTE: flag must be set to -1 when disini() is called for the * first time for a particular disprm struct in order to initialize memory * management. It must ONLY be used on the first initialization otherwise * memory leaks may result. * * int naxis * (Given or returned) Number of pixel and world coordinate elements. * * If disini() is used to initialize the disprm struct (as would normally * be the case) then it will set naxis from the value passed to it as a * function argument. The user should not subsequently modify it. * * char (*dtype)[72] * (Given) Pointer to the first element of an array of char[72] containing * the name of the distortion function for each axis. * * int ndp * (Given) The number of entries in the disprm::dp[] array. * * int ndpmax * (Given) The length of the disprm::dp[] array. * * ndpmax will be set by disini() if it allocates memory for disprm::dp[], * otherwise it must be set by the user. See also disndp(). * * struct dpkey dp * (Given) Address of the first element of an array of length ndpmax of * dpkey structs. * * As a FITS header parser encounters each DPja or DQia keyword it should * load it into a dpkey struct in the array and increment ndp. However, * note that a single disprm struct must hold only DPja or DQia keyvalues, * not both. disset() interprets them as required by the particular * distortion function. * * double *maxdis * (Given) Pointer to the first element of an array of double specifying * the maximum absolute value of the distortion for each axis computed over * the whole image. * * It is not necessary to reset the disprm struct (via disset()) when * disprm::maxdis is changed. * * double totdis * (Given) The maximum absolute value of the combination of all distortion * functions specified as an offset in pixel coordinates computed over the * whole image. * * It is not necessary to reset the disprm struct (via disset()) when * disprm::totdis is changed. * * int **axmap * (Returned) Pointer to the first element of an array of int* containing * pointers to the first elements of the axis mapping arrays for each axis. * * An axis mapping associates the independent variables of a distortion * function with the 0-relative image axis number. For example, consider * an image with a spectrum on the first axis (axis 0), followed by RA * (axis 1), Dec (axis2), and time (axis 3) axes. For a distortion in * (RA,Dec) and no distortion on the spectral or time axes, the axis * mapping arrays, axmap[j][], would be * = j=0: [-1, -1, -1, -1] ...no distortion on spectral axis, = 1: [ 1, 2, -1, -1] ...RA distortion depends on RA and Dec, = 2: [ 2, 1, -1, -1] ...Dec distortion depends on Dec and RA, = 3: [-1, -1, -1, -1] ...no distortion on time axis, * * where -1 indicates that there is no corresponding independent * variable. * * int *Nhat * (Returned) Pointer to the first element of an array of int* containing * the number of coordinate axes that form the independent variables of the * distortion function. * * double **offset * (Returned) Pointer to the first element of an array of double* * containing an offset used to renormalize the independent variables of * the distortion function for each axis. * * The offsets are subtracted from the independent variables before * scaling. * * double **scale * (Returned) Pointer to the first element of an array of double* * containing a scale used to renormalize the independent variables of the * distortion function for each axis. * * The scale is applied to the independent variables after the offsets are * subtracted. * * int **iparm * (Returned) Pointer to the first element of an array of int* * containing pointers to the first elements of the arrays of integer * distortion parameters for each axis. * * double **dparm * (Returned) Pointer to the first element of an array of double* * containing pointers to the first elements of the arrays of floating * point distortion parameters for each axis. * * int i_naxis * (Returned) Dimension of the internal arrays (normally equal to naxis). * * int ndis * (Returned) The number of distortion functions. * * struct wcserr *err * (Returned) If enabled, when an error status is returned, this struct * contains detailed information about the error, see wcserr_enable(). * * int (**disp2x)(DISP2X_ARGS) * (For internal use only.) * int (**disx2p)(DISX2P_ARGS) * (For internal use only.) * double *tmpmem * (For internal use only.) * int m_flag * (For internal use only.) * int m_naxis * (For internal use only.) * char (*m_dtype)[72] * (For internal use only.) * double **m_dp * (For internal use only.) * double *m_maxdis * (For internal use only.) * * * dpkey struct - Store for DPja and DQia keyvalues * ------------------------------------------------ * The dpkey struct is used to pass the parsed contents of DPja or DQia * keyrecords to disset() via the disprm struct. A disprm struct must hold * only DPja or DQia keyvalues, not both. * * All members of this struct are to be set by the user. * * char field[72] * (Given) The full field name of the record, including the keyword name. * Note that the colon delimiter separating the field name and the value in * record-valued keyvalues is not part of the field name. For example, in * the following: * = DP3A = 'AXIS.1: 2' * * the full record field name is "DP3A.AXIS.1", and the record's value * is 2. * * int j * (Given) Axis number (1-relative), i.e. the j in DPja or i in DQia. * * int type * (Given) The data type of the record's value * - 0: Integer (stored as an int), * - 1: Floating point (stored as a double). * * union value * (Given) A union comprised of * - dpkey::i, * - dpkey::f, * * the record's value. * * * Global variable: const char *dis_errmsg[] - Status return messages * ------------------------------------------------------------------ * Error messages to match the status value returned from each function. * *===========================================================================*/ #ifndef WCSLIB_DIS #define WCSLIB_DIS #ifdef __cplusplus extern "C" { #endif extern const char *dis_errmsg[]; enum dis_errmsg_enum { DISERR_SUCCESS = 0, /* Success. */ DISERR_NULL_POINTER = 1, /* Null disprm pointer passed. */ DISERR_MEMORY = 2, /* Memory allocation failed. */ DISERR_BAD_PARAM = 3, /* Invalid parameter value. */ DISERR_DISTORT = 4, /* Distortion error. */ DISERR_DEDISTORT = 5 /* De-distortion error. */ }; /* For use in declaring distortion function prototypes (= DISX2P_ARGS). */ #define DISP2X_ARGS int inverse, const int iparm[], const double dparm[], \ int ncrd, const double rawcrd[], double *discrd /* For use in declaring de-distortion function prototypes (= DISP2X_ARGS). */ #define DISX2P_ARGS int inverse, const int iparm[], const double dparm[], \ int ncrd, const double discrd[], double *rawcrd /* Struct used for storing DPja and DQia keyvalues. */ struct dpkey { char field[72]; /* Full record field name (no colon). */ int j; /* Axis number, as in DPja (1-relative). */ int type; /* Data type of value. */ union { int i; /* Integer record value. */ double f; /* Floating point record value. */ } value; /* Record value. */ }; /* Size of the dpkey struct in int units, used by the Fortran wrappers. */ #define DPLEN (sizeof(struct dpkey)/sizeof(int)) struct disprm { /* Initialization flag (see the prologue above). */ /*------------------------------------------------------------------------*/ int flag; /* Set to zero to force initialization. */ /* Parameters to be provided (see the prologue above). */ /*------------------------------------------------------------------------*/ int naxis; /* The number of pixel coordinate elements, */ /* given by NAXIS. */ char (*dtype)[72]; /* For each axis, the distortion type. */ int ndp; /* Number of DPja or DQia keywords, and the */ int ndpmax; /* number for which space was allocated. */ struct dpkey *dp; /* DPja or DQia keyvalues (not both). */ double *maxdis; /* For each axis, the maximum distortion. */ double totdis; /* The maximum combined distortion. */ /* Information derived from the parameters supplied. */ /*------------------------------------------------------------------------*/ int **axmap; /* For each axis, the axis mapping array. */ int *Nhat; /* For each axis, the number of coordinate */ /* axes that form the independent variables */ /* of the distortion function. */ double **offset; /* For each axis, renormalization offsets. */ double **scale; /* For each axis, renormalization scales. */ int **iparm; /* For each axis, the array of integer */ /* distortion parameters. */ double **dparm; /* For each axis, the array of floating */ /* point distortion parameters. */ int i_naxis; /* Dimension of the internal arrays. */ int ndis; /* The number of distortion functions. */ /* Error handling, if enabled. */ /*------------------------------------------------------------------------*/ struct wcserr *err; /* Private - the remainder are for internal use. */ /*------------------------------------------------------------------------*/ int (**disp2x)(DISP2X_ARGS); /* For each axis, pointers to the */ int (**disx2p)(DISX2P_ARGS); /* distortion function and its inverse. */ double *tmpmem; int m_flag, m_naxis; /* The remainder are for memory management. */ char (*m_dtype)[72]; struct dpkey *m_dp; double *m_maxdis; }; /* Size of the disprm struct in int units, used by the Fortran wrappers. */ #define DISLEN (sizeof(struct disprm)/sizeof(int)) int disndp(int n); int dpfill(struct dpkey *dp, const char *keyword, const char *field, int j, int type, int i, double f); int disini(int alloc, int naxis, struct disprm *dis); int discpy(int alloc, const struct disprm *dissrc, struct disprm *disdst); int disfree(struct disprm *dis); int disprt(const struct disprm *dis); int disperr(const struct disprm *dis, const char *prefix); int dishdo(struct disprm *dis); int disset(struct disprm *dis); int disp2x(struct disprm *dis, const double rawcrd[], double discrd[]); int disx2p(struct disprm *dis, const double discrd[], double rawcrd[]); int diswarp(struct disprm *dis, const double pixblc[], const double pixtrc[], const double pixsamp[], int *nsamp, double maxdis[], double *maxtot, double avgdis[], double *avgtot, double rmsdis[], double *rmstot); #ifdef __cplusplus } #endif #endif /* WCSLIB_DIS */ astropy-1.1.1/cextern/wcslib/C/wcsunits.c0000644001134200020070000001252412644017723021271 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsunits.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include "wcsunits.h" /* Map status return value to message. */ const char *wcsunits_errmsg[] = { "Success", "Invalid numeric multiplier", "Dangling binary operator", "Invalid symbol in INITIAL context", "Function in invalid context", "Invalid symbol in EXPON context", "Unbalanced bracket", "Unbalanced parenthesis", "Consecutive binary operators", "Internal parser error", "Non-conformant unit specifications", "Non-conformant functions", "Potentially unsafe translation"}; /* Unit types. */ const char *wcsunits_types[] = { "plane angle", "solid angle", "charge", "mole", "temperature", "luminous intensity", "mass", "length", "time", "beam", "bin", "bit", "count", "stellar magnitude", "pixel", "solar ratio", "voxel"}; const char *wcsunits_units[] = { "degree", "steradian", "Coulomb", "mole", "Kelvin", "candela", "kilogram", "metre", "second", "", "", "", "", "", "", "", ""}; const char *wcsunits_funcs[] = { "none", "log", "ln", "exp"}; /*--------------------------------------------------------------------------*/ int wcsunits( const char have[], const char want[], double *scale, double *offset, double *power) { return wcsunitse( have, want, scale, offset, power, 0x0); } /* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : */ int wcsunitse( const char have[], const char want[], double *scale, double *offset, double *power, struct wcserr **err) { static const char *function = "wcsunitse"; int func1, func2, i, status; double scale1, scale2, units1[WCSUNITS_NTYPE], units2[WCSUNITS_NTYPE]; if ((status = wcsulexe(have, &func1, &scale1, units1, err))) { return status; } if ((status = wcsulexe(want, &func2, &scale2, units2, err))) { return status; } /* Check conformance. */ for (i = 0; i < WCSUNITS_NTYPE; i++) { if (units1[i] != units2[i]) { return wcserr_set(WCSERR_SET(UNITSERR_BAD_UNIT_SPEC), "Mismatched units type '%s': have '%s', want '%s'", wcsunits_types[i], have, want); } } *scale = 0.0; *offset = 0.0; *power = 1.0; switch (func1) { case 0: /* No function. */ if (func2) { return wcserr_set(WCSERR_SET(UNITSERR_BAD_FUNCS), "Mismatched unit functions: have '%s' (%s), want '%s' (%s)", have, wcsunits_funcs[func1], want, wcsunits_funcs[func2]); } *scale = scale1 / scale2; break; case 1: /* log(). */ if (func2 == 1) { /* log(). */ *scale = 1.0; *offset = log10(scale1 / scale2); } else if (func2 == 2) { /* ln(). */ *scale = log(10.0); *offset = log(scale1 / scale2); } else { return wcserr_set(WCSERR_SET(UNITSERR_BAD_FUNCS), "Mismatched unit functions: have '%s' (%s), want '%s' (%s)", have, wcsunits_funcs[func1], want, wcsunits_funcs[func2]); } break; case 2: /* ln(). */ if (func2 == 1) { /* log(). */ *scale = 1.0 / log(10.0); *offset = log(scale1 / scale2); } else if (func2 == 2) { /* ln(). */ *scale = 1.0; *offset = log(scale1 / scale2); } else { return wcserr_set(WCSERR_SET(UNITSERR_BAD_FUNCS), "Mismatched unit functions: have '%s' (%s), want '%s' (%s)", have, wcsunits_funcs[func1], want, wcsunits_funcs[func2]); } break; case 3: /* exp(). */ if (func2 != 3) { return wcserr_set(WCSERR_SET(UNITSERR_BAD_FUNCS), "Mismatched unit functions: have '%s' (%s), want '%s' (%s)", have, wcsunits_funcs[func1], want, wcsunits_funcs[func2]); } *scale = 1.0; *power = scale1 / scale2; break; default: /* Internal parser error. */ return wcserr_set(WCSERR_SET(UNITSERR_PARSER_ERROR), "Internal units parser error"); } return 0; } /*--------------------------------------------------------------------------*/ int wcsutrn(int ctrl, char unitstr[]) { return wcsutrne(ctrl, unitstr, 0x0); } /*--------------------------------------------------------------------------*/ int wcsulex(const char unitstr[], int *func, double *scale, double units[]) { return wcsulexe(unitstr, func, scale, units, 0x0); } astropy-1.1.1/cextern/wcslib/C/wcserr.c0000644001134200020070000000722712644017723020723 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. Module author: Michael Droettboom http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcserr.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include #include "wcserr.h" #include "wcsprintf.h" static int wcserr_enabled = 0; /*--------------------------------------------------------------------------*/ int wcserr_enable(int enable) { return wcserr_enabled = (enable ? 1 : 0); } /*--------------------------------------------------------------------------*/ int wcserr_prt( const struct wcserr *err, const char *prefix) { if (!wcserr_enabled) { wcsprintf("Error messaging is not enabled, use wcserr_enable().\n"); return 2; } if (err == 0x0) { return 0; } if (err->status) { if (prefix == 0x0) prefix = ""; if (err->status > 0) { wcsprintf("%sERROR %d in %s() at line %d of file %s:\n%s%s.\n", prefix, err->status, err->function, err->line_no, err->file, prefix, err->msg); } else { /* An informative message only. */ wcsprintf("%sINFORMATIVE message from %s() at line %d of file " "%s:\n%s%s.\n", prefix, err->function, err->line_no, err->file, prefix, err->msg); } } return 0; } /*--------------------------------------------------------------------------*/ int wcserr_clear( struct wcserr **errp) { if (*errp) free(*errp); *errp = 0x0; return 0; } /*--------------------------------------------------------------------------*/ int wcserr_set( struct wcserr **errp, int status, const char *function, const char *file, int line_no, const char *format, ...) { char fmt[128]; struct wcserr *err; va_list argp; if (!wcserr_enabled) return status; if (errp == 0x0) { return status; } err = *errp; if (status) { if (err == 0x0) { *errp = err = calloc(1, sizeof(struct wcserr)); } err->status = status; err->function = function; err->file = file; err->line_no = line_no; /* Workaround for a compiler segv from gcc 4.2.1 in MacOSX 10.7. */ strncpy(fmt, format, 128); va_start(argp, format); vsnprintf(err->msg, WCSERR_MSG_LENGTH, fmt, argp); va_end(argp); } else if (err) { free(err); *errp = 0x0; } return status; } /*--------------------------------------------------------------------------*/ int wcserr_copy( const struct wcserr *src, struct wcserr *dst) { if (src == 0x0) { if (dst) { memset(dst, 0, sizeof(struct wcserr)); } return 0; } if (dst) { memcpy(dst, src, sizeof(struct wcserr)); } return src->status; } astropy-1.1.1/cextern/wcslib/C/wcserr.h0000644001134200020070000002177012644017723020727 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. Module author: Michael Droettboom http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcserr.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * Summary of the wcserr routines * ------------------------------ * Most of the structs in WCSLIB contain a pointer to a wcserr struct as a * member. Functions in WCSLIB that return an error status code can also * allocate and set a detailed error message in this struct which also * identifies the function, source file, and line number where the error * occurred. * * For example: * = struct prjprm prj; = wcserr_enable(1); = if (prjini(&prj)) { = // Print the error message to stderr. = wcsprintf_set(stderr); = wcserr_prt(prj.err, 0x0); = } * * A number of utility functions used in managing the wcserr struct are for * internal use only. They are documented here solely as an aid to * understanding the code. They are not intended for external use - the API * may change without notice! * * * wcserr struct - Error message handling * -------------------------------------- * The wcserr struct contains the numeric error code, a textual description of * the error, and information about the function, source file, and line number * where the error was generated. * * int status * Numeric status code associated with the error, the meaning of which * depends on the function that generated it. See the documentation for * the particular function. * * int line_no * Line number where the error occurred as given by the __LINE__ * preprocessor macro. * * const char *function * Name of the function where the error occurred. * * const char *file * Name of the source file where the error occurred as given by the * __FILE__ preprocessor macro. * * char msg[WCSERR_MSG_LENGTH] * Informative error message. * * * wcserr_enable() - Enable/disable error messaging * ------------------------------------------------ * wcserr_enable() enables or disables wcserr error messaging. By default it * is disabled. * * PLEASE NOTE: This function is not thread-safe. * * Given: * enable int If true (non-zero), enable error messaging, else * disable it. * * Function return value: * int Status return value: * 0: Error messaging is disabled. * 1: Error messaging is enabled. * * * wcserr_prt() - Print a wcserr struct * ------------------------------------ * wcserr_prt() prints the error message (if any) contained in a wcserr struct. * It uses the wcsprintf() functions. * * Given: * err const struct wcserr* * The error object. If NULL, nothing is printed. * * prefix const char * * If non-NULL, each output line will be prefixed with * this string. * * Function return value: * int Status return value: * 0: Success. * 2: Error messaging is not enabled. * * * wcserr_clear() - Clear a wcserr struct * -------------------------------------- * wcserr_clear() clears the error (if any) contained in a wcserr struct. * * Given and returned: * err struct wcserr** * The error object. If NULL, nothing is done. Set to * NULL on return. * * Function return value: * int Status return value: * 0: Success. * * * wcserr_set() - Fill in the contents of an error object * ------------------------------------------------------ * INTERNAL USE ONLY. * * wcserr_set() fills a wcserr struct with information about an error. * * A convenience macro, WCSERR_SET, provides the source file and line number * information automatically. * * Given and returned: * err struct wcserr** * Error object. * * If err is NULL, returns the status code given without * setting an error message. * * If *err is NULL, allocates memory for a wcserr struct * (provided that status is non-zero). * * Given: * status int Numeric status code to set. If 0, then *err will be * deleted and *err will be returned as NULL. * * function const char * * Name of the function generating the error. This * must point to a constant string, i.e. in the * initialized read-only data section ("data") of the * executable. * * file const char * * Name of the source file generating the error. This * must point to a constant string, i.e. in the * initialized read-only data section ("data") of the * executable such as given by the __FILE__ preprocessor * macro. * * line_no int Line number in the source file generating the error * such as given by the __LINE__ preprocessor macro. * * format const char * * Format string of the error message. May contain * printf-style %-formatting codes. * * ... mixed The remaining variable arguments are applied (like * printf) to the format string to generate the error * message. * * Function return value: * int The status return code passed in. * * * wcserr_copy() - Copy an error object * ------------------------------------ * INTERNAL USE ONLY. * * wcserr_copy() copies one error object to another. Use of this function * should be avoided in general since the function, source file, and line * number information copied to the destination may lose its context. * * Given: * src const struct wcserr* * Source error object. If src is NULL, dst is cleared. * * Returned: * dst struct wcserr* * Destination error object. If NULL, no copy is made. * * Function return value: * int Numeric status code of the source error object. * * * WCSERR_SET() macro - Fill in the contents of an error object * ------------------------------------------------------------ * INTERNAL USE ONLY. * * WCSERR_SET() is a preprocessor macro that helps to fill in the argument list * of wcserr_set(). It takes status as an argument of its own and provides the * name of the source file and the line number at the point where invoked. It * assumes that the err and function arguments of wcserr_set() will be provided * by variables of the same names. * *===========================================================================*/ #ifndef WCSLIB_WCSERR #define WCSLIB_WCSERR #ifdef __cplusplus extern "C" { #endif #define WCSERR_MSG_LENGTH 160 struct wcserr { int status; /* Status code for the error. */ int line_no; /* Line number where the error occurred. */ const char *function; /* Function name. */ const char *file; /* Source file name. */ char msg[WCSERR_MSG_LENGTH]; /* Informative error message. */ }; /* Size of the wcserr struct in int units, used by the Fortran wrappers. */ #define ERRLEN (sizeof(struct wcserr)/sizeof(int)) int wcserr_enable(int enable); int wcserr_prt(const struct wcserr *err, const char *prefix); int wcserr_clear(struct wcserr **err); /* INTERNAL USE ONLY -------------------------------------------------------*/ int wcserr_set(struct wcserr **err, int status, const char *function, const char *file, int line_no, const char *format, ...); int wcserr_copy(const struct wcserr *src, struct wcserr *dst); /* Convenience macro for invoking wcserr_set(). */ #define WCSERR_SET(status) err, status, function, __FILE__, __LINE__ #ifdef __cplusplus } #endif #endif /* WSCLIB_WCSERR */ astropy-1.1.1/cextern/wcslib/C/wcsfix.c0000644001134200020070000005345312644017723020723 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsfix.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *===========================================================================*/ #include #include #include #include #include "wcserr.h" #include "wcsmath.h" #include "wcsutil.h" #include "lin.h" #include "sph.h" #include "wcs.h" #include "wcsunits.h" #include "wcsfix.h" extern const int WCSSET; /* Maximum number of coordinate axes that can be handled. */ #define NMAX 16 /* Map status return value to message. */ const char *wcsfix_errmsg[] = { "Success", "Null wcsprm pointer passed", "Memory allocation failed", "Linear transformation matrix is singular", "Inconsistent or unrecognized coordinate axis types", "Invalid parameter value", "Invalid coordinate transformation parameters", "Ill-conditioned coordinate transformation parameters", "All of the corner pixel coordinates are invalid", "Could not determine reference pixel coordinate", "Could not determine reference pixel value"}; /* Map error returns for lower-level routines. */ const int fix_linerr[] = { FIXERR_SUCCESS, /* 0: LINERR_SUCCESS */ FIXERR_NULL_POINTER, /* 1: LINERR_NULL_POINTER */ FIXERR_MEMORY, /* 2: LINERR_MEMORY */ FIXERR_SINGULAR_MTX, /* 3: LINERR_SINGULAR_MTX */ FIXERR_BAD_PARAM, /* 4: LINERR_DISTORT_INIT */ FIXERR_NO_REF_PIX_COORD, /* 5: LINERR_DISTORT */ FIXERR_NO_REF_PIX_VAL /* 6: LINERR_DEDISTORT */ }; const int fix_wcserr[] = { FIXERR_SUCCESS, /* 0: WCSERR_SUCCESS */ FIXERR_NULL_POINTER, /* 1: WCSERR_NULL_POINTER */ FIXERR_MEMORY, /* 2: WCSERR_MEMORY */ FIXERR_SINGULAR_MTX, /* 3: WCSERR_SINGULAR_MTX */ FIXERR_BAD_CTYPE, /* 4: WCSERR_BAD_CTYPE */ FIXERR_BAD_PARAM, /* 5: WCSERR_BAD_PARAM */ FIXERR_BAD_COORD_TRANS, /* 6: WCSERR_BAD_COORD_TRANS */ FIXERR_ILL_COORD_TRANS, /* 7: WCSERR_ILL_COORD_TRANS */ FIXERR_BAD_CORNER_PIX, /* 8: WCSERR_BAD_PIX */ FIXERR_NO_REF_PIX_VAL, /* 9: WCSERR_BAD_WORLD */ FIXERR_NO_REF_PIX_VAL /* 10: WCSERR_BAD_WORLD_COORD */ /* ...others not used */ }; /* Convenience macro for invoking wcserr_set(). */ #define WCSFIX_ERRMSG(status) WCSERR_SET(status), wcsfix_errmsg[status] /*--------------------------------------------------------------------------*/ int wcsfix(int ctrl, const int naxis[], struct wcsprm *wcs, int stat[]) { int status = 0; if ((stat[CDFIX] = cdfix(wcs)) > 0) { status = 1; } if ((stat[DATFIX] = datfix(wcs)) > 0) { status = 1; } if ((stat[UNITFIX] = unitfix(ctrl, wcs)) > 0) { status = 1; } if ((stat[SPCFIX] = spcfix(wcs)) > 0) { status = 1; } if ((stat[CELFIX] = celfix(wcs)) > 0) { status = 1; } if ((stat[CYLFIX] = cylfix(naxis, wcs)) > 0) { status = 1; } return status; } /*--------------------------------------------------------------------------*/ int wcsfixi(int ctrl, const int naxis[], struct wcsprm *wcs, int stat[], struct wcserr info[]) { int ifix, status = 0; struct wcserr err; /* Handling the status values returned from the sub-fixers is trickier than it might seem, especially considering that wcs->err may contain an error status on input which should be preserved if no translation errors occur. The simplest way seems to be to save a copy of wcs->err and clear it before each sub-fixer. The last real error to occur, excluding informative messages, is the one returned. To get informative messages from spcfix() it must precede celfix() and cylfix(). The latter call wcsset() which also translates AIPS-convention spectral axes. */ wcserr_copy(wcs->err, &err); for (ifix = CDFIX; ifix < NWCSFIX; ifix++) { /* Clear (delete) wcs->err. */ wcserr_clear(&(wcs->err)); switch (ifix) { case CDFIX: stat[ifix] = cdfix(wcs); break; case DATFIX: stat[ifix] = datfix(wcs); break; case UNITFIX: stat[ifix] = unitfix(ctrl, wcs); break; case SPCFIX: stat[ifix] = spcfix(wcs); break; case CELFIX: stat[ifix] = celfix(wcs); break; case CYLFIX: stat[ifix] = cylfix(naxis, wcs); break; default: continue; } if (stat[ifix] == FIXERR_NO_CHANGE) { /* No change => no message. */ wcserr_copy(0x0, info+ifix); } else if (stat[ifix] == 0) { /* Successful translation, but there may be an informative message. */ if (wcs->err && wcs->err->status < 0) { wcserr_copy(wcs->err, info+ifix); } else { wcserr_copy(0x0, info+ifix); } } else { /* An informative message or error message. */ wcserr_copy(wcs->err, info+ifix); if ((status = (stat[ifix] > 0))) { /* It was an error, replace the previous one. */ wcserr_copy(wcs->err, &err); } } } /* Restore the last error to occur. */ if (err.status) { wcserr_copy(&err, wcs->err); } else { wcserr_clear(&(wcs->err)); } return status; } /*--------------------------------------------------------------------------*/ int cdfix(struct wcsprm *wcs) { int i, k, naxis, status = FIXERR_NO_CHANGE; double *cd; if (wcs == 0x0) return FIXERR_NULL_POINTER; if ((wcs->altlin & 1) || !(wcs->altlin & 2)) { /* Either we have PCi_ja or there are no CDi_ja. */ return FIXERR_NO_CHANGE; } naxis = wcs->naxis; status = FIXERR_NO_CHANGE; for (i = 0; i < naxis; i++) { /* Row of zeros? */ cd = wcs->cd + i * naxis; for (k = 0; k < naxis; k++, cd++) { if (*cd != 0.0) goto next; } /* Column of zeros? */ cd = wcs->cd + i; for (k = 0; k < naxis; k++, cd += naxis) { if (*cd != 0.0) goto next; } cd = wcs->cd + i * (naxis + 1); *cd = 1.0; status = 0; next: ; } return status; } /*--------------------------------------------------------------------------*/ static int parse_date(const char *buf, int *hour, int *minute, double *sec) { char ctmp[72]; if (sscanf(buf, "%2d:%2d:%s", hour, minute, ctmp) < 3 || wcsutil_str2double(ctmp, "%lf", sec)) { return 1; } return 0; } static void write_date(char *buf, int hour, int minute, double sec) { char ctmp[72]; wcsutil_double2str(ctmp, "%04.1f", sec); sprintf(buf, "T%.2d:%.2d:%s", hour, minute, ctmp); } int datfix(struct wcsprm *wcs) { static const char *function = "datfix"; char orig_dateobs[72]; char *dateobs; int day, dd, hour = 0, jd, minute = 0, month, msec, n4, year; double mjdobs, sec = 0.0, t; struct wcserr **err; if (wcs == 0x0) return FIXERR_NULL_POINTER; err = &(wcs->err); dateobs = wcs->dateobs; strncpy(orig_dateobs, dateobs, 72); if (dateobs[0] == '\0') { if (undefined(wcs->mjdobs)) { /* No date information was provided. */ return FIXERR_NO_CHANGE; } else { /* Calendar date from MJD. */ jd = 2400001 + (int)wcs->mjdobs; n4 = 4*(jd + ((2*((4*jd - 17918)/146097)*3)/4 + 1)/2 - 37); dd = 10*(((n4-237)%1461)/4) + 5; year = n4/1461 - 4712; month = (2 + dd/306)%12 + 1; day = (dd%306)/10 + 1; sprintf(dateobs, "%.4d-%.2d-%.2d", year, month, day); /* Write time part only if non-zero. */ if ((t = wcs->mjdobs - (int)wcs->mjdobs) > 0.0) { t *= 24.0; hour = (int)t; t = 60.0 * (t - hour); minute = (int)t; sec = 60.0 * (t - minute); /* Round to 1ms. */ dd = 60000*(60*hour + minute) + (int)(1000*(sec+0.0005)); hour = dd / 3600000; dd -= 3600000 * hour; minute = dd / 60000; msec = dd - 60000 * minute; sprintf(dateobs+10, "T%.2d:%.2d:%.2d", hour, minute, msec/1000); /* Write fractions of a second only if non-zero. */ if (msec%1000) { sprintf(dateobs+19, ".%.3d", msec%1000); } } } } else { if (strlen(dateobs) < 8) { /* Can't be a valid date. */ return wcserr_set(WCSERR_SET(FIXERR_BAD_PARAM), "Invalid parameter value: date string too short '%s'", dateobs); } /* Identify the date format. */ if (dateobs[4] == '-' && dateobs[7] == '-') { /* Standard year-2000 form: CCYY-MM-DD[Thh:mm:ss[.sss...]] */ if (sscanf(dateobs, "%4d-%2d-%2d", &year, &month, &day) < 3) { return wcserr_set(WCSERR_SET(FIXERR_BAD_PARAM), "Invalid parameter value: invalid date '%s'", dateobs); } if (dateobs[10] == 'T') { if (parse_date(dateobs+11, &hour, &minute, &sec)) { return wcserr_set(WCSERR_SET(FIXERR_BAD_PARAM), "Invalid parameter value: invalid time '%s'", dateobs+11); } } else if (dateobs[10] == ' ') { hour = 0; minute = 0; sec = 0.0; if (parse_date(dateobs+11, &hour, &minute, &sec)) { write_date(dateobs+10, hour, minute, sec); } else { dateobs[10] = 'T'; } } } else if (dateobs[4] == '/' && dateobs[7] == '/') { /* Also allow CCYY/MM/DD[Thh:mm:ss[.sss...]] */ if (sscanf(dateobs, "%4d/%2d/%2d", &year, &month, &day) < 3) { return wcserr_set(WCSERR_SET(FIXERR_BAD_PARAM), "Invalid parameter value: invalid date '%s'", dateobs); } if (dateobs[10] == 'T') { if (parse_date(dateobs+11, &hour, &minute, &sec)) { return wcserr_set(WCSERR_SET(FIXERR_BAD_PARAM), "Invalid parameter value: invalid time '%s'", dateobs+11); } } else if (dateobs[10] == ' ') { hour = 0; minute = 0; sec = 0.0; if (parse_date(dateobs+11, &hour, &minute, &sec)) { write_date(dateobs+10, hour, minute, sec); } else { dateobs[10] = 'T'; } } /* Looks ok, fix it up. */ dateobs[4] = '-'; dateobs[7] = '-'; } else { if (dateobs[2] == '/' && dateobs[5] == '/') { /* Old format date: DD/MM/YY, also allowing DD/MM/CCYY. */ if (sscanf(dateobs, "%2d/%2d/%4d", &day, &month, &year) < 3) { return wcserr_set(WCSERR_SET(FIXERR_BAD_PARAM), "Invalid parameter value: invalid date '%s'", dateobs); } } else if (dateobs[2] == '-' && dateobs[5] == '-') { /* Also recognize DD-MM-YY and DD-MM-CCYY */ if (sscanf(dateobs, "%2d-%2d-%4d", &day, &month, &year) < 3) { return wcserr_set(WCSERR_SET(FIXERR_BAD_PARAM), "Invalid parameter value: invalid date '%s'", dateobs); } } else { /* Not a valid date format. */ return wcserr_set(WCSERR_SET(FIXERR_BAD_PARAM), "Invalid parameter value: invalid date '%s'", dateobs); } if (year < 100) year += 1900; /* Doesn't have a time. */ sprintf(dateobs, "%.4d-%.2d-%.2d", year, month, day); } /* Compute MJD. */ mjdobs = (double)((1461*(year - (12-month)/10 + 4712))/4 + (306*((month+9)%12) + 5)/10 - (3*((year - (12-month)/10 + 4900)/100))/4 + day - 2399904) + (hour + (minute + sec/60.0)/60.0)/24.0; if (undefined(wcs->mjdobs)) { wcs->mjdobs = mjdobs; } else { /* Check for consistency. */ if (fabs(mjdobs - wcs->mjdobs) > 0.5) { return wcserr_set(WCSERR_SET(FIXERR_BAD_PARAM), "Invalid parameter value: inconsistent date '%s'", dateobs); } } } if (strncmp(orig_dateobs, dateobs, 72)) { wcserr_set(WCSERR_SET(FIXERR_DATE_FIX), "Changed '%s' to '%s'", orig_dateobs, dateobs); return 0; } return FIXERR_NO_CHANGE; } /*--------------------------------------------------------------------------*/ int unitfix(int ctrl, struct wcsprm *wcs) { int i, k, result, status = FIXERR_NO_CHANGE; char orig_unit[80], msg[WCSERR_MSG_LENGTH]; const char *function = "unitfix"; struct wcserr **err; if (wcs == 0x0) return FIXERR_NULL_POINTER; err = &(wcs->err); strcpy(msg, "Changed units: "); for (i = 0; i < wcs->naxis; i++) { strncpy(orig_unit, wcs->cunit[i], 80); result = wcsutrne(ctrl, wcs->cunit[i], &(wcs->err)); if (result == 0 || result == 12) { k = strlen(msg); sprintf(msg+k, "'%s' -> '%s', ", orig_unit, wcs->cunit[i]); status = FIXERR_UNITS_ALIAS; } } if (status == FIXERR_UNITS_ALIAS) { k = strlen(msg) - 2; msg[k] = '\0'; wcserr_set(WCSERR_SET(FIXERR_UNITS_ALIAS), msg); status = 0; } return status; } /*--------------------------------------------------------------------------*/ int spcfix(struct wcsprm *wcs) { static const char *function = "spcfix"; char ctype[9], specsys[9]; int i, status; struct wcserr **err; if (wcs == 0x0) return FIXERR_NULL_POINTER; err = &(wcs->err); for (i = 0; i < wcs->naxis; i++) { /* Translate an AIPS-convention spectral type if present. */ status = spcaips(wcs->ctype[i], wcs->velref, ctype, specsys); if (status == 0) { /* An AIPS type was found but it may match what we already have. */ status = FIXERR_NO_CHANGE; /* Was specsys translated? */ if (wcs->specsys[0] == '\0' && *specsys) { strncpy(wcs->specsys, specsys, 9); wcserr_set(WCSERR_SET(FIXERR_SPC_UPDATE), "Changed SPECSYS to '%s'", specsys); status = 0; } /* Was ctype translated? Have to null-fill for comparing them. */ wcsutil_null_fill(9, wcs->ctype[i]); if (strncmp(wcs->ctype[i], ctype, 9)) { /* ctype was translated... */ if (status == 0) { /* ...and specsys was also. */ wcserr_set(WCSERR_SET(FIXERR_SPC_UPDATE), "Changed CTYPE%d from '%s' to '%s', and SPECSYS to '%s'", i+1, wcs->ctype[i], ctype, wcs->specsys); } else { wcserr_set(WCSERR_SET(FIXERR_SPC_UPDATE), "Changed CTYPE%d from '%s' to '%s'", i+1, wcs->ctype[i], ctype); status = 0; } strncpy(wcs->ctype[i], ctype, 9); } /* Tidy up. */ if (status == 0) { wcsutil_null_fill(72, wcs->ctype[i]); wcsutil_null_fill(72, wcs->specsys); } /* No need to check for others, wcsset() will fail if so. */ return status; } else if (status == SPCERR_BAD_SPEC_PARAMS) { /* An AIPS spectral type was found but with invalid velref. */ return wcserr_set(WCSERR_SET(FIXERR_BAD_PARAM), "Invalid parameter value: velref = %d", wcs->velref); } } return FIXERR_NO_CHANGE; } /*--------------------------------------------------------------------------*/ int celfix(struct wcsprm *wcs) { static const char *function = "celfix"; int k, status; struct celprm *wcscel = &(wcs->cel); struct prjprm *wcsprj = &(wcscel->prj); struct wcserr **err; if (wcs == 0x0) return FIXERR_NULL_POINTER; err = &(wcs->err); /* Initialize if required. */ if (wcs->flag != WCSSET) { if ((status = wcsset(wcs))) return fix_wcserr[status]; } /* Was an NCP or GLS projection code translated? */ if (wcs->lat >= 0) { /* Check ctype. */ if (strcmp(wcs->ctype[wcs->lat]+5, "NCP") == 0) { strcpy(wcs->ctype[wcs->lng]+5, "SIN"); strcpy(wcs->ctype[wcs->lat]+5, "SIN"); if (wcs->npvmax < wcs->npv + 2) { /* Allocate space for two more PVi_ma keyvalues. */ if (wcs->m_flag == WCSSET && wcs->pv == wcs->m_pv) { if (!(wcs->pv = calloc(wcs->npv+2, sizeof(struct pvcard)))) { wcs->pv = wcs->m_pv; return wcserr_set(WCSFIX_ERRMSG(FIXERR_MEMORY)); } wcs->npvmax = wcs->npv + 2; wcs->m_flag = WCSSET; for (k = 0; k < wcs->npv; k++) { wcs->pv[k] = wcs->m_pv[k]; } if (wcs->m_pv) free(wcs->m_pv); wcs->m_pv = wcs->pv; } else { return wcserr_set(WCSFIX_ERRMSG(FIXERR_MEMORY)); } } wcs->pv[wcs->npv].i = wcs->lat + 1; wcs->pv[wcs->npv].m = 1; wcs->pv[wcs->npv].value = wcsprj->pv[1]; (wcs->npv)++; wcs->pv[wcs->npv].i = wcs->lat + 1; wcs->pv[wcs->npv].m = 2; wcs->pv[wcs->npv].value = wcsprj->pv[2]; (wcs->npv)++; return 0; } else if (strcmp(wcs->ctype[wcs->lat]+5, "GLS") == 0) { strcpy(wcs->ctype[wcs->lng]+5, "SFL"); strcpy(wcs->ctype[wcs->lat]+5, "SFL"); if (wcs->crval[wcs->lng] != 0.0 || wcs->crval[wcs->lat] != 0.0) { /* In the AIPS convention, setting the reference longitude and * latitude for GLS does not create an oblique graticule. A non-zero * reference longitude introduces an offset in longitude in the normal * way, whereas a non-zero reference latitude simply translates the * reference point (i.e. the map as a whole) to that latitude. This * might be effected by adjusting CRPIXja but that is complicated by * the linear transformation and instead is accomplished here by * setting theta_0. */ if (wcs->npvmax < wcs->npv + 3) { /* Allocate space for three more PVi_ma keyvalues. */ if (wcs->m_flag == WCSSET && wcs->pv == wcs->m_pv) { if (!(wcs->pv = calloc(wcs->npv+3, sizeof(struct pvcard)))) { wcs->pv = wcs->m_pv; return wcserr_set(WCSFIX_ERRMSG(FIXERR_MEMORY)); } wcs->npvmax = wcs->npv + 3; wcs->m_flag = WCSSET; for (k = 0; k < wcs->npv; k++) { wcs->pv[k] = wcs->m_pv[k]; } if (wcs->m_pv) free(wcs->m_pv); wcs->m_pv = wcs->pv; } else { return wcserr_set(WCSFIX_ERRMSG(FIXERR_MEMORY)); } } wcs->pv[wcs->npv].i = wcs->lng + 1; wcs->pv[wcs->npv].m = 0; wcs->pv[wcs->npv].value = 1.0; (wcs->npv)++; /* Note that the reference longitude is still zero. */ wcs->pv[wcs->npv].i = wcs->lng + 1; wcs->pv[wcs->npv].m = 1; wcs->pv[wcs->npv].value = 0.0; (wcs->npv)++; wcs->pv[wcs->npv].i = wcs->lng + 1; wcs->pv[wcs->npv].m = 2; wcs->pv[wcs->npv].value = wcs->crval[wcs->lat]; (wcs->npv)++; } return 0; } } return FIXERR_NO_CHANGE; } /*--------------------------------------------------------------------------*/ int cylfix(const int naxis[], struct wcsprm *wcs) { static const char *function = "cylfix"; unsigned short icnr, indx[NMAX], ncnr; int j, k, stat[4], status; double img[4][NMAX], lat, lng, phi[4], phi0, phimax, phimin, pix[4][NMAX], *pixj, theta[4], theta0, world[4][NMAX], x, y; struct wcserr **err; if (naxis == 0x0) return FIXERR_NO_CHANGE; if (wcs == 0x0) return FIXERR_NULL_POINTER; err = &(wcs->err); /* Initialize if required. */ if (wcs->flag != WCSSET) { if ((status = wcsset(wcs))) return fix_wcserr[status]; } /* Check that we have a cylindrical projection. */ if (wcs->cel.prj.category != CYLINDRICAL) return FIXERR_NO_CHANGE; if (wcs->naxis < 2) return FIXERR_NO_CHANGE; /* Compute the native longitude in each corner of the image. */ ncnr = 1 << wcs->naxis; for (k = 0; k < NMAX; k++) { indx[k] = 1 << k; } phimin = 1.0e99; phimax = -1.0e99; for (icnr = 0; icnr < ncnr;) { /* Do four corners at a time. */ for (j = 0; j < 4; j++, icnr++) { pixj = pix[j]; for (k = 0; k < wcs->naxis; k++) { if (icnr & indx[k]) { *(pixj++) = naxis[k] + 0.5; } else { *(pixj++) = 0.5; } } } if (!(status = wcsp2s(wcs, 4, NMAX, pix[0], img[0], phi, theta, world[0], stat))) { for (j = 0; j < 4; j++) { if (phi[j] < phimin) phimin = phi[j]; if (phi[j] > phimax) phimax = phi[j]; } } } if (phimin > phimax) return fix_wcserr[status]; /* Any changes needed? */ if (phimin >= -180.0 && phimax <= 180.0) return FIXERR_NO_CHANGE; /* Compute the new reference pixel coordinates. */ phi0 = (phimin + phimax) / 2.0; theta0 = 0.0; if ((status = prjs2x(&(wcs->cel.prj), 1, 1, 1, 1, &phi0, &theta0, &x, &y, stat))) { if (status == PRJERR_BAD_PARAM) { status = FIXERR_BAD_PARAM; } else { status = FIXERR_NO_REF_PIX_COORD; } return wcserr_set(WCSFIX_ERRMSG(status)); } for (k = 0; k < wcs->naxis; k++) { img[0][k] = 0.0; } img[0][wcs->lng] = x; img[0][wcs->lat] = y; if ((status = linx2p(&(wcs->lin), 1, 0, img[0], pix[0]))) { return wcserr_set(WCSFIX_ERRMSG(fix_linerr[status])); } /* Compute celestial coordinates at the new reference pixel. */ if ((status = wcsp2s(wcs, 1, 0, pix[0], img[0], phi, theta, world[0], stat))) { return fix_wcserr[status]; } /* Compute native coordinates of the celestial pole. */ lng = 0.0; lat = 90.0; (void)sphs2x(wcs->cel.euler, 1, 1, 1, 1, &lng, &lat, phi, theta); wcs->crpix[wcs->lng] = pix[0][wcs->lng]; wcs->crpix[wcs->lat] = pix[0][wcs->lat]; wcs->crval[wcs->lng] = world[0][wcs->lng]; wcs->crval[wcs->lat] = world[0][wcs->lat]; wcs->lonpole = phi[0] - phi0; return wcsset(wcs); } astropy-1.1.1/cextern/wcslib/C/fitshdr.h0000644001134200020070000004305512644017723021065 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: fitshdr.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the fitshdr routines * ------------------------------- * The Flexible Image Transport System (FITS), is a data format widely used in * astronomy for data interchange and archive. It is described in * = "Definition of the Flexible Image Transport System (FITS), version 3.0", = Pence, W.D., Chiappetti, L., Page, C.G., Shaw, R.A., & Stobie, E. 2010, = A&A, 524, A42 - http://dx.doi.org/10.1051/0004-6361/201015362 * * See also http://fits.gsfc.nasa.gov * * fitshdr() is a generic FITS header parser provided to handle keyrecords that * are ignored by the WCS header parsers, wcspih() and wcsbth(). Typically the * latter may be set to remove WCS keyrecords from a header leaving fitshdr() * to handle the remainder. * * * fitshdr() - FITS header parser routine * -------------------------------------- * fitshdr() parses a character array containing a FITS header, extracting * all keywords and their values into an array of fitskey structs. * * Given: * header const char [] * Character array containing the (entire) FITS header, * for example, as might be obtained conveniently via the * CFITSIO routine fits_hdr2str(). * * Each header "keyrecord" (formerly "card image") * consists of exactly 80 7-bit ASCII printing characters * in the range 0x20 to 0x7e (which excludes NUL, BS, * TAB, LF, FF and CR) especially noting that the * keyrecords are NOT null-terminated. * * nkeyrec int Number of keyrecords in header[]. * * nkeyids int Number of entries in keyids[]. * * Given and returned: * keyids struct fitskeyid [] * While all keywords are extracted from the header, * keyids[] provides a convienient way of indexing them. * The fitskeyid struct contains three members; * fitskeyid::name must be set by the user while * fitskeyid::count and fitskeyid::idx are returned by * fitshdr(). All matched keywords will have their * fitskey::keyno member negated. * * Returned: * nreject int* Number of header keyrecords rejected for syntax * errors. * * keys struct fitskey** * Pointer to an array of nkeyrec fitskey structs * containing all keywords and keyvalues extracted from * the header. * * Memory for the array is allocated by fitshdr() and * this must be freed by the user by invoking free() on * the array. * * Function return value: * int Status return value: * 0: Success. * 1: Null fitskey pointer passed. * 2: Memory allocation failed. * 3: Fatal error returned by Flex parser. * * Notes: * 1: Keyword parsing is done in accordance with the syntax defined by * NOST 100-2.0, noting the following points in particular: * * a: Sect. 5.1.2.1 specifies that keywords be left-justified in columns * 1-8, blank-filled with no embedded spaces, composed only of the * ASCII characters ABCDEFGHJKLMNOPQRSTUVWXYZ0123456789-_ * * fitshdr() accepts any characters in columns 1-8 but flags keywords * that do not conform to standard syntax. * * b: Sect. 5.1.2.2 defines the "value indicator" as the characters "= " * occurring in columns 9 and 10. If these are absent then the * keyword has no value and columns 9-80 may contain any ASCII text * (but see note 2 for CONTINUE keyrecords). This is copied to the * comment member of the fitskey struct. * * c: Sect. 5.1.2.3 states that a keyword may have a null (undefined) * value if the value/comment field, columns 11-80, consists entirely * of spaces, possibly followed by a comment. * * d: Sect. 5.1.1 states that trailing blanks in a string keyvalue are * not significant and the parser always removes them. A string * containing nothing but blanks will be replaced with a single * blank. * * Sect. 5.2.1 also states that a quote character (') in a string * value is to be represented by two successive quote characters and * the parser removes the repeated quote. * * e: The parser recognizes free-format character (NOST 100-2.0, * Sect. 5.2.1), integer (Sect. 5.2.3), and floating-point values * (Sect. 5.2.4) for all keywords. * * f: Sect. 5.2.3 offers no comment on the size of an integer keyvalue * except indirectly in limiting it to 70 digits. The parser will * translate an integer keyvalue to a 32-bit signed integer if it * lies in the range -2147483648 to +2147483647, otherwise it * interprets it as a 64-bit signed integer if possible, or else a * "very long" integer (see fitskey::type). * * g: END not followed by 77 blanks is not considered to be a legitimate * end keyrecord. * * 2: The parser supports a generalization of the OGIP Long String Keyvalue * Convention (v1.0) whereby strings may be continued onto successive * header keyrecords. A keyrecord contains a segment of a continued * string if and only if * * a: it contains the pseudo-keyword CONTINUE, * * b: columns 9 and 10 are both blank, * * c: columns 11 to 80 contain what would be considered a valid string * keyvalue, including optional keycomment, if column 9 had contained * '=', * * d: the previous keyrecord contained either a valid string keyvalue or * a valid CONTINUE keyrecord. * * If any of these conditions is violated, the keyrecord is considered in * isolation. * * Syntax errors in keycomments in a continued string are treated more * permissively than usual; the '/' delimiter may be omitted provided that * parsing of the string keyvalue is not compromised. However, the * FITSHDR_COMMENT status bit will be set for the keyrecord (see * fitskey::status). * * As for normal strings, trailing blanks in a continued string are not * significant. * * In the OGIP convention "the '&' character is used as the last non-blank * character of the string to indicate that the string is (probably) * continued on the following keyword". This additional syntax is not * required by fitshdr(), but if '&' does occur as the last non-blank * character of a continued string keyvalue then it will be removed, along * with any trailing blanks. However, blanks that occur before the '&' * will be preserved. * * * fitskeyid struct - Keyword indexing * ----------------------------------- * fitshdr() uses the fitskeyid struct to return indexing information for * specified keywords. The struct contains three members, the first of which, * fitskeyid::name, must be set by the user with the remainder returned by * fitshdr(). * * char name[12]: * (Given) Name of the required keyword. This is to be set by the user; * the '.' character may be used for wildcarding. Trailing blanks will be * replaced with nulls. * * int count: * (Returned) The number of matches found for the keyword. * * int idx[2]: * (Returned) Indices into keys[], the array of fitskey structs returned by * fitshdr(). Note that these are 0-relative array indices, not keyrecord * numbers. * * If the keyword is found in the header the first index will be set to the * array index of its first occurrence, otherwise it will be set to -1. * * If multiples of the keyword are found, the second index will be set to * the array index of its last occurrence, otherwise it will be set to -1. * * * fitskey struct - Keyword/value information * ------------------------------------------ * fitshdr() returns an array of fitskey structs, each of which contains the * result of parsing one FITS header keyrecord. All members of the fitskey * struct are returned by fitshdr(), none are given by the user. * * int keyno * (Returned) Keyrecord number (1-relative) in the array passed as input to * fitshdr(). This will be negated if the keyword matched any specified in * the keyids[] index. * * int keyid * (Returned) Index into the first entry in keyids[] with which the * keyrecord matches, else -1. * * int status * (Returned) Status flag bit-vector for the header keyrecord employing the * following bit masks defined as preprocessor macros: * * - FITSHDR_KEYWORD: Illegal keyword syntax. * - FITSHDR_KEYVALUE: Illegal keyvalue syntax. * - FITSHDR_COMMENT: Illegal keycomment syntax. * - FITSHDR_KEYREC: Illegal keyrecord, e.g. an END keyrecord with * trailing text. * - FITSHDR_TRAILER: Keyrecord following a valid END keyrecord. * * The header keyrecord is syntactically correct if no bits are set. * * char keyword[12] * (Returned) Keyword name, null-filled for keywords of less than eight * characters (trailing blanks replaced by nulls). * * Use * = sprintf(dst, "%.8s", keyword) * * to copy it to a character array with null-termination, or * = sprintf(dst, "%8.8s", keyword) * * to blank-fill to eight characters followed by null-termination. * * int type * (Returned) Keyvalue data type: * - 0: No keyvalue (both the value and type are undefined). * - 1: Logical, represented as int. * - 2: 32-bit signed integer. * - 3: 64-bit signed integer (see below). * - 4: Very long integer (see below). * - 5: Floating point (stored as double). * - 6: Integer complex (stored as double[2]). * - 7: Floating point complex (stored as double[2]). * - 8: String. * - 8+10*n: Continued string (described below and in fitshdr() note 2). * * A negative type indicates that a syntax error was encountered when * attempting to parse a keyvalue of the particular type. * * Comments on particular data types: * - 64-bit signed integers lie in the range * = (-9223372036854775808 <= int64 < -2147483648) || = (+2147483647 < int64 <= +9223372036854775807) * * A native 64-bit data type may be defined via preprocessor macro * WCSLIB_INT64 defined in wcsconfig.h, e.g. as 'long long int'; this * will be typedef'd to 'int64' here. If WCSLIB_INT64 is not set, then * int64 is typedef'd to int[3] instead and fitskey::keyvalue is to be * computed as * = ((keyvalue.k[2]) * 1000000000 + = keyvalue.k[1]) * 1000000000 + = keyvalue.k[0] * * and may reported via * = if (keyvalue.k[2]) { = printf("%d%09d%09d", keyvalue.k[2], abs(keyvalue.k[1]), = abs(keyvalue.k[0])); = } else { = printf("%d%09d", keyvalue.k[1], abs(keyvalue.k[0])); = } * * where keyvalue.k[0] and keyvalue.k[1] range from -999999999 to * +999999999. * * - Very long integers, up to 70 decimal digits in length, are encoded * in keyvalue.l as an array of int[8], each of which stores 9 decimal * digits. fitskey::keyvalue is to be computed as * = (((((((keyvalue.l[7]) * 1000000000 + = keyvalue.l[6]) * 1000000000 + = keyvalue.l[5]) * 1000000000 + = keyvalue.l[4]) * 1000000000 + = keyvalue.l[3]) * 1000000000 + = keyvalue.l[2]) * 1000000000 + = keyvalue.l[1]) * 1000000000 + = keyvalue.l[0] * * - Continued strings are not reconstructed, they remain split over * successive fitskey structs in the keys[] array returned by * fitshdr(). fitskey::keyvalue data type, 8 + 10n, indicates the * segment number, n, in the continuation. * * int padding * (An unused variable inserted for alignment purposes only.) * * union keyvalue * (Returned) A union comprised of * * - fitskey::i, * - fitskey::k, * - fitskey::l, * - fitskey::f, * - fitskey::c, * - fitskey::s, * * used by the fitskey struct to contain the value associated with a * keyword. * * int i * (Returned) Logical (fitskey::type == 1) and 32-bit signed integer * (fitskey::type == 2) data types in the fitskey::keyvalue union. * * int64 k * (Returned) 64-bit signed integer (fitskey::type == 3) data type in the * fitskey::keyvalue union. * * int l[8] * (Returned) Very long integer (fitskey::type == 4) data type in the * fitskey::keyvalue union. * * double f * (Returned) Floating point (fitskey::type == 5) data type in the * fitskey::keyvalue union. * * double c[2] * (Returned) Integer and floating point complex (fitskey::type == 6 || 7) * data types in the fitskey::keyvalue union. * * char s[72] * (Returned) Null-terminated string (fitskey::type == 8) data type in the * fitskey::keyvalue union. * * int ulen * (Returned) Where a keycomment contains a units string in the standard * form, e.g. [m/s], the ulen member indicates its length, inclusive of * square brackets. Otherwise ulen is zero. * * char comment[84] * (Returned) Keycomment, i.e. comment associated with the keyword or, for * keyrecords rejected because of syntax errors, the compete keyrecord * itself with null-termination. * * Comments are null-terminated with trailing spaces removed. Leading * spaces are also removed from keycomments (i.e. those immediately * following the '/' character), but not from COMMENT or HISTORY keyrecords * or keyrecords without a value indicator ("= " in columns 9-80). * * * Global variable: const char *fitshdr_errmsg[] - Status return messages * ---------------------------------------------------------------------- * Error messages to match the status value returned from each function. * *===========================================================================*/ #ifndef WCSLIB_FITSHDR #define WCSLIB_FITSHDR #include "wcsconfig.h" #ifdef __cplusplus extern "C" { #endif #define FITSHDR_KEYWORD 0x01 #define FITSHDR_KEYVALUE 0x02 #define FITSHDR_COMMENT 0x04 #define FITSHDR_KEYREC 0x08 #define FITSHDR_CARD 0x08 /* Alias for backwards compatibility. */ #define FITSHDR_TRAILER 0x10 extern const char *fitshdr_errmsg[]; #ifdef WCSLIB_INT64 typedef WCSLIB_INT64 int64; #else typedef int int64[3]; #endif /* Struct used for indexing the keywords. */ struct fitskeyid { char name[12]; /* Keyword name, null-terminated. */ int count; /* Number of occurrences of keyword. */ int idx[2]; /* Indices into fitskey array. */ }; /* Size of the fitskeyid struct in int units, used by the Fortran wrappers. */ #define KEYIDLEN (sizeof(struct fitskeyid)/sizeof(int)) /* Struct used for storing FITS keywords. */ struct fitskey { int keyno; /* Header keyrecord sequence number (1-rel).*/ int keyid; /* Index into fitskeyid[]. */ int status; /* Header keyrecord status bit flags. */ char keyword[12]; /* Keyword name, null-filled. */ int type; /* Keyvalue type (see above). */ int padding; /* (Dummy inserted for alignment purposes.) */ union { int i; /* 32-bit integer and logical values. */ int64 k; /* 64-bit integer values. */ int l[8]; /* Very long signed integer values. */ double f; /* Floating point values. */ double c[2]; /* Complex values. */ char s[72]; /* String values, null-terminated. */ } keyvalue; /* Keyvalue. */ int ulen; /* Length of units string. */ char comment[84]; /* Comment (or keyrecord), null-terminated. */ }; /* Size of the fitskey struct in int units, used by the Fortran wrappers. */ #define KEYLEN (sizeof(struct fitskey)/sizeof(int)) int fitshdr(const char header[], int nkeyrec, int nkeyids, struct fitskeyid keyids[], int *nreject, struct fitskey **keys); #ifdef __cplusplus } #endif #endif /* WCSLIB_FITSHDR */ astropy-1.1.1/cextern/wcslib/C/wcslib.h0000644001134200020070000000375112644017723020704 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcslib.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * Summary of wcslib.h * ------------------- * This header file is provided purely for convenience. Use it to include all * of the separate WCSLIB headers. * *===========================================================================*/ #ifndef WCSLIB_WCSLIB #define WCSLIB_WCSLIB #include "cel.h" #include "dis.h" #include "fitshdr.h" #include "lin.h" #include "log.h" #include "prj.h" #include "spc.h" #include "sph.h" #include "spx.h" #include "tab.h" #include "wcs.h" #include "wcserr.h" #include "wcsfix.h" #include "wcshdr.h" #include "wcsmath.h" #include "wcsprintf.h" #include "wcstrig.h" #include "wcsunits.h" #include "wcsutil.h" #endif /* WCSLIB_WCSLIB */ astropy-1.1.1/cextern/wcslib/C/log.h0000644001134200020070000001317112644017723020177 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: log.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the log routines * --------------------------- * Routines in this suite implement the part of the FITS World Coordinate * System (WCS) standard that deals with logarithmic coordinates, as described * in * * "Representations of world coordinates in FITS", * Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I) * * "Representations of spectral coordinates in FITS", * Greisen, E.W., Calabretta, M.R., Valdes, F.G., & Allen, S.L. * 2006, A&A, 446, 747 (WCS Paper III) * * These routines define methods to be used for computing logarithmic world * coordinates from intermediate world coordinates (a linear transformation of * image pixel coordinates), and vice versa. * * logx2s() and logs2x() implement the WCS logarithmic coordinate * transformations. * * Argument checking: * ------------------ * The input log-coordinate values are only checked for values that would * result in floating point exceptions and the same is true for the * log-coordinate reference value. * * Accuracy: * --------- * No warranty is given for the accuracy of these routines (refer to the * copyright notice); intending users must satisfy for themselves their * adequacy for the intended purpose. However, closure effectively to within * double precision rounding error was demonstrated by test routine tlog.c * which accompanies this software. * * * logx2s() - Transform to logarithmic coordinates * ----------------------------------------------- * logx2s() transforms intermediate world coordinates to logarithmic * coordinates. * * Given and returned: * crval double Log-coordinate reference value (CRVALia). * * Given: * nx int Vector length. * * sx int Vector stride. * * slogc int Vector stride. * * x const double[] * Intermediate world coordinates, in SI units. * * Returned: * logc double[] Logarithmic coordinates, in SI units. * * stat int[] Status return value status for each vector element: * 0: Success. * * Function return value: * int Status return value: * 0: Success. * 2: Invalid log-coordinate reference value. * * * logs2x() - Transform logarithmic coordinates * -------------------------------------------- * logs2x() transforms logarithmic world coordinates to intermediate world * coordinates. * * Given and returned: * crval double Log-coordinate reference value (CRVALia). * * Given: * nlogc int Vector length. * * slogc int Vector stride. * * sx int Vector stride. * * logc const double[] * Logarithmic coordinates, in SI units. * * Returned: * x double[] Intermediate world coordinates, in SI units. * * stat int[] Status return value status for each vector element: * 0: Success. * 1: Invalid value of logc. * * Function return value: * int Status return value: * 0: Success. * 2: Invalid log-coordinate reference value. * 4: One or more of the world-coordinate values * are incorrect, as indicated by the stat vector. * * * Global variable: const char *log_errmsg[] - Status return messages * ------------------------------------------------------------------ * Error messages to match the status value returned from each function. * *===========================================================================*/ #ifndef WCSLIB_LOG #define WCSLIB_LOG #ifdef __cplusplus extern "C" { #endif extern const char *log_errmsg[]; enum log_errmsg_enum { LOGERR_SUCCESS = 0, /* Success. */ LOGERR_NULL_POINTER = 1, /* Null pointer passed. */ LOGERR_BAD_LOG_REF_VAL = 2, /* Invalid log-coordinate reference value. */ LOGERR_BAD_X = 3, /* One or more of the x coordinates were invalid. */ LOGERR_BAD_WORLD = 4 /* One or more of the world coordinates were invalid. */ }; int logx2s(double crval, int nx, int sx, int slogc, const double x[], double logc[], int stat[]); int logs2x(double crval, int nlogc, int slogc, int sx, const double logc[], double x[], int stat[]); #ifdef __cplusplus } #endif #endif /* WCSLIB_LOG */ astropy-1.1.1/cextern/wcslib/C/fitshdr.l0000644001134200020070000003073012644017723021065 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: fitshdr.l,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * fitshdr.l is a Flex description file containing a lexical scanner * definition for extracting keywords and keyvalues from a FITS header. * * It requires Flex v2.5.4 or later. * * Refer to fitshdr.h for a description of the user interface and operating * notes. * *===========================================================================*/ /* Options. */ %option full %option never-interactive %option nounput %option noyywrap %option outfile="fitshdr.c" %option prefix="fitshdr" /* Keywords. */ KEYCHR [-_A-Z0-9] KW1 {KEYCHR}{1}" "{7} KW2 {KEYCHR}{2}" "{6} KW3 {KEYCHR}{3}" "{5} KW4 {KEYCHR}{4}" "{4} KW5 {KEYCHR}{5}" "{3} KW6 {KEYCHR}{6}" "{2} KW7 {KEYCHR}{7}" "{1} KW8 {KEYCHR}{8} KEYWORD ({KW1}|{KW2}|{KW3}|{KW4}|{KW5}|{KW6}|{KW7}|{KW8}) /* Keyvalue data types. */ LOGICAL [TF] INT32 [+-]?0*[0-9]{1,9} INT64 [+-]?0*[0-9]{10,18} INTVL [+-]?0*[0-9]{19,} INTEGER [+-]?[0-9]+ FLOAT [+-]?([0-9]+\.?[0-9]*|\.[0-9]+)([eEdD][+-]?[0-9]+)? ICOMPLX \(" "*{INTEGER}" "*," "*{INTEGER}" "*\) FCOMPLX \(" "*{FLOAT}" "*," "*{FLOAT}" "*\) STRING '([^']|'')*' /* Characters forming standard unit strings (jwBIQX are not used). */ UNITSTR \[[-+*/^(). 0-9a-zA-Z]+\] /* Exclusive start states. */ %x VALUE INLINE UNITS COMMENT ERROR FLUSH %{ #include #include #include #include #include #include "fitshdr.h" #include "wcsutil.h" #define YY_DECL int fitshdr(const char header[], int nkeyrec, int nkeyids, \ struct fitskeyid keyids[], int *nreject, \ struct fitskey **keys) #define YY_INPUT(inbuff, count, bufsize) \ { \ if (fitshdr_nkeyrec) { \ strncpy(inbuff, fitshdr_hdr, 80); \ inbuff[80] = '\n'; \ fitshdr_hdr += 80; \ fitshdr_nkeyrec--; \ count = 81; \ } else { \ count = YY_NULL; \ } \ } /* These global variables are required by YY_INPUT. */ const char *fitshdr_hdr; int fitshdr_nkeyrec; /* Used in preempting the call to exit() by yy_fatal_error(). */ jmp_buf fitshdr_abort_jmp_env; #define exit(status) longjmp(fitshdr_abort_jmp_env, status) /* Map status return value to message. */ const char *fitshdr_errmsg[] = { "Success", "Null fitskey pointer-pointer passed", "Memory allocation failed", "Fatal error returned by Flex parser"}; %} %% char *cptr, ctmp[72]; int blank, continuation, end, j, k, keyno; double dtmp; struct fitskey *kptr; struct fitskeyid *iptr; void nullfill(char cptr[], int len); int yylex_destroy(void); fitshdr_hdr = header; fitshdr_nkeyrec = nkeyrec; *nreject = 0; keyno = 0; if (keys == 0x0) { return 1; } /* Allocate memory for the required number of fitskey structs. */ /* Recall that calloc() initializes allocated memory to zero. */ if (!(kptr = *keys = calloc(nkeyrec, sizeof(struct fitskey)))) { return 2; } /* Initialize keyids[]. */ iptr = keyids; for (j = 0; j < nkeyids; j++, iptr++) { iptr->count = 0; iptr->idx[0] = -1; iptr->idx[1] = -1; } blank = 0; continuation = 0; end = 0; /* Return here via longjmp() invoked by yy_fatal_error(). */ if (setjmp(fitshdr_abort_jmp_env)) { return 3; } BEGIN(INITIAL); ^" "{80} { /* A completely blank keyrecord. */ strncpy(kptr->keyword, yytext, 8); yyless(0); blank = 1; BEGIN(COMMENT); } ^(COMMENT|HISTORY|" "{8}) { strncpy(kptr->keyword, yytext, 8); BEGIN(COMMENT); } ^END" "{77} { strncpy(kptr->keyword, yytext, 8); end = 1; BEGIN(FLUSH); } ^END" "{5}=" "+ { /* Illegal END keyrecord. */ strncpy(kptr->keyword, yytext, 8); kptr->status |= FITSHDR_KEYREC; BEGIN(VALUE); } ^END" "{5} { /* Illegal END keyrecord. */ strncpy(kptr->keyword, yytext, 8); kptr->status |= FITSHDR_KEYREC; BEGIN(COMMENT); } ^{KEYWORD}=" "+ { strncpy(kptr->keyword, yytext, 8); BEGIN(VALUE); } ^CONTINUE" "+{STRING} { /* Continued string keyvalue. */ strncpy(kptr->keyword, yytext, 8); if (keyno > 0 && (kptr-1)->type%10 == 8) { /* Put back the string keyvalue. */ for (k = 10; yytext[k] != '\''; k++); yyless(k); continuation = 1; BEGIN(VALUE); } else { /* Not a valid continuation. */ yyless(8); BEGIN(COMMENT); } } ^{KEYWORD} { /* Keyword without value. */ strncpy(kptr->keyword, yytext, 8); BEGIN(COMMENT); } ^.{8}=" "+ { /* Illegal keyword, carry on regardless. */ strncpy(kptr->keyword, yytext, 8); kptr->status |= FITSHDR_KEYWORD; BEGIN(VALUE); } ^.{8} { /* Illegal keyword, carry on regardless. */ strncpy(kptr->keyword, yytext, 8); kptr->status |= FITSHDR_KEYWORD; BEGIN(COMMENT); } " "*/\/ { /* Null keyvalue. */ BEGIN(INLINE); } {LOGICAL} { /* Logical keyvalue. */ kptr->type = 1; kptr->keyvalue.i = (*yytext == 'T'); BEGIN(INLINE); } {INT32} { /* 32-bit signed integer keyvalue. */ kptr->type = 2; if (sscanf(yytext, "%d", &(kptr->keyvalue.i)) < 1) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } BEGIN(INLINE); } {INT64} { /* 64-bit signed integer keyvalue (up to 18 digits). */ if (wcsutil_str2double(yytext, "%lf", &dtmp)) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } else if (INT_MIN <= dtmp && dtmp <= INT_MAX) { /* Can be accomodated as a 32-bit signed integer. */ kptr->type = 2; if (sscanf(yytext, "%d", &(kptr->keyvalue.i)) < 1) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } } else { /* 64-bit signed integer. */ kptr->type = 3; #ifdef WCSLIB_INT64 /* Native 64-bit integer is available. */ if (sscanf(yytext, "%lld", &(kptr->keyvalue.k)) < 1) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } #else /* 64-bit integer (up to 18 digits) implemented as int[3]. */ kptr->keyvalue.k[2] = 0; sprintf(ctmp, "%%%dd%%9d", yyleng-9); if (sscanf(yytext, ctmp, kptr->keyvalue.k+1, kptr->keyvalue.k) < 1) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } else if (*yytext == '-') { kptr->keyvalue.k[0] *= -1; } #endif } BEGIN(INLINE); } {INTVL} { /* Very long integer keyvalue (and 19-digit int64). */ kptr->type = 4; strcpy(ctmp, yytext); k = yyleng; for (j = 0; j < 8; j++) { /* Read it backwards. */ k -= 9; if (k < 0) k = 0; if (sscanf(ctmp+k, "%d", kptr->keyvalue.l+j) < 1) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } if (*yytext == '-') { kptr->keyvalue.l[j] = -abs(kptr->keyvalue.l[j]); } if (k == 0) break; ctmp[k] = '\0'; } /* Can it be accomodated as a 64-bit signed integer? */ if (j == 2 && abs(kptr->keyvalue.l[2]) <= 9 && abs(kptr->keyvalue.l[1]) <= 223372036 && kptr->keyvalue.l[0] <= 854775807 && kptr->keyvalue.l[0] >= -854775808) { kptr->type = 3; #ifdef WCSLIB_INT64 /* Native 64-bit integer is available. */ kptr->keyvalue.l[2] = 0; if (sscanf(yytext, "%lld", &(kptr->keyvalue.k)) < 1) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } #endif } BEGIN(INLINE); } {FLOAT} { /* Float keyvalue. */ kptr->type = 5; if (wcsutil_str2double(yytext, "%lf", &(kptr->keyvalue.f))) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } BEGIN(INLINE); } {ICOMPLX} { /* Integer complex keyvalue. */ kptr->type = 6; if (sscanf(yytext, "(%lf,%lf)", kptr->keyvalue.c, kptr->keyvalue.c+1) < 2) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } BEGIN(INLINE); } {FCOMPLX} { /* Floating point complex keyvalue. */ kptr->type = 7; for (cptr = ctmp, k = 1; yytext[k] != ','; cptr++, k++) { *cptr = yytext[k]; } *cptr = '\0'; if (wcsutil_str2double(ctmp, "%lf", kptr->keyvalue.c)) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } for (cptr = ctmp, k++; yytext[k] != ')'; cptr++, k++) { *cptr = yytext[k]; } *cptr = '\0'; if (wcsutil_str2double(ctmp, "%lf", kptr->keyvalue.c+1)) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } BEGIN(INLINE); } {STRING} { /* String keyvalue. */ kptr->type = 8; cptr = kptr->keyvalue.s; strcpy(cptr, yytext+1); /* Squeeze out repeated quotes. */ k = 0; for (j = 0; j < 72; j++) { if (k < j) { cptr[k] = cptr[j]; } if (cptr[j] == '\0') { if (k) cptr[k-1] = '\0'; break; } else if (cptr[j] == '\'' && cptr[j+1] == '\'') { j++; } k++; } if (*cptr) { /* Retain the initial blank in all-blank strings. */ nullfill(cptr+1, 71); } else { nullfill(cptr, 72); } BEGIN(INLINE); } . { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } " "*$ { BEGIN(FLUSH); } " "*\/" "*$ { BEGIN(FLUSH); } " "*\/" "* { BEGIN(UNITS); } " " { kptr->status |= FITSHDR_COMMENT; BEGIN(ERROR); } . { /* Keyvalue parsing must now also be suspect. */ kptr->status |= FITSHDR_COMMENT; kptr->type = 0; BEGIN(ERROR); } {UNITSTR} { kptr->ulen = yyleng; yymore(); BEGIN(COMMENT); } . { yymore(); BEGIN(COMMENT); } .* { strcpy(kptr->comment, yytext); nullfill(kptr->comment, 84); BEGIN(FLUSH); } .* { if (!continuation) kptr->type = -abs(kptr->type); sprintf(kptr->comment, "%.80s", fitshdr_hdr-80); kptr->comment[80] = '\0'; nullfill(kptr->comment+80, 4); BEGIN(FLUSH); } .*\n { /* Discard the rest of the input line. */ kptr->keyno = ++keyno; /* Null-fill the keyword. */ kptr->keyword[8] = '\0'; nullfill(kptr->keyword, 12); /* Do indexing. */ iptr = keyids; kptr->keyid = -1; for (j = 0; j < nkeyids; j++, iptr++) { cptr = iptr->name; cptr[8] = '\0'; nullfill(cptr, 12); for (k = 0; k < 8; k++, cptr++) { if (*cptr != '.' && *cptr != kptr->keyword[k]) break; } if (k == 8) { /* Found a match. */ iptr->count++; if (iptr->idx[0] == -1) { iptr->idx[0] = keyno-1; } else { iptr->idx[1] = keyno-1; } kptr->keyno = -abs(kptr->keyno); if (kptr->keyid < 0) kptr->keyid = j; } } /* Deal with continued strings. */ if (continuation) { /* Tidy up the previous string keyvalue. */ if ((kptr-1)->type == 8) (kptr-1)->type += 10; cptr = (kptr-1)->keyvalue.s; if (cptr[strlen(cptr)-1] == '&') cptr[strlen(cptr)-1] = '\0'; kptr->type = (kptr-1)->type + 10; } /* Check for keyrecords following the END keyrecord. */ if (end && (end++ > 1) && !blank) { kptr->status |= FITSHDR_TRAILER; } if (kptr->status) (*nreject)++; kptr++; blank = 0; continuation = 0; BEGIN(INITIAL); } <> { /* End-of-input. */ yylex_destroy(); return 0; } %% /*--------------------------------------------------------------------------*/ void nullfill(char cptr[], int len) { int j, k; /* Null-fill the string. */ for (j = 0; j < len; j++) { if (cptr[j] == '\0') { for (k = j+1; k < len; k++) { cptr[k] = '\0'; } break; } } for (k = j-1; k >= 0; k--) { if (cptr[k] != ' ') break; cptr[k] = '\0'; } return; } astropy-1.1.1/cextern/wcslib/C/cel.h0000644001134200020070000004410212644017723020157 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: cel.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the cel routines * --------------------------- * Routines in this suite implement the part of the FITS World Coordinate * System (WCS) standard that deals with celestial coordinates, as described in * = "Representations of world coordinates in FITS", = Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I) = = "Representations of celestial coordinates in FITS", = Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (WCS Paper II) * * These routines define methods to be used for computing celestial world * coordinates from intermediate world coordinates (a linear transformation * of image pixel coordinates), and vice versa. They are based on the celprm * struct which contains all information needed for the computations. This * struct contains some elements that must be set by the user, and others that * are maintained by these routines, somewhat like a C++ class but with no * encapsulation. * * Routine celini() is provided to initialize the celprm struct with default * values, celfree() reclaims any memory that may have been allocated to store * an error message, and celprt() prints its contents. * * celperr() prints the error message(s), if any, stored in a celprm struct and * the prjprm struct that it contains. * * A setup routine, celset(), computes intermediate values in the celprm struct * from parameters in it that were supplied by the user. The struct always * needs to be set up by celset() but it need not be called explicitly - refer * to the explanation of celprm::flag. * * celx2s() and cels2x() implement the WCS celestial coordinate * transformations. In fact, they are high level driver routines for the lower * level spherical coordinate rotation and projection routines described in * sph.h and prj.h. * * * celini() - Default constructor for the celprm struct * ---------------------------------------------------- * celini() sets all members of a celprm struct to default values. It should * be used to initialize every celprm struct. * * Returned: * cel struct celprm* * Celestial transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null celprm pointer passed. * * * celfree() - Destructor for the celprm struct * -------------------------------------------- * celfree() frees any memory that may have been allocated to store an error * message in the celprm struct. * * Given: * cel struct celprm* * Celestial transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null celprm pointer passed. * * * celprt() - Print routine for the celprm struct * ---------------------------------------------- * celprt() prints the contents of a celprm struct using wcsprintf(). Mainly * intended for diagnostic purposes. * * Given: * cel const struct celprm* * Celestial transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null celprm pointer passed. * * celperr() - Print error messages from a celprm struct * ----------------------------------------------------- * celperr() prints the error message(s), if any, stored in a celprm struct and * the prjprm struct that it contains. If there are no errors then nothing is * printed. It uses wcserr_prt(), q.v. * * Given: * cel const struct celprm* * Coordinate transformation parameters. * * prefix const char * * If non-NULL, each output line will be prefixed with * this string. * * Function return value: * int Status return value: * 0: Success. * 1: Null celprm pointer passed. * * * celset() - Setup routine for the celprm struct * ---------------------------------------------- * celset() sets up a celprm struct according to information supplied within * it. * * Note that this routine need not be called directly; it will be invoked by * celx2s() and cels2x() if celprm::flag is anything other than a predefined * magic value. * * Given and returned: * cel struct celprm* * Celestial transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null celprm pointer passed. * 2: Invalid projection parameters. * 3: Invalid coordinate transformation parameters. * 4: Ill-conditioned coordinate transformation * parameters. * * For returns > 1, a detailed error message is set in * celprm::err if enabled, see wcserr_enable(). * * * celx2s() - Pixel-to-world celestial transformation * -------------------------------------------------- * celx2s() transforms (x,y) coordinates in the plane of projection to * celestial coordinates (lng,lat). * * Given and returned: * cel struct celprm* * Celestial transformation parameters. * * Given: * nx,ny int Vector lengths. * * sxy,sll int Vector strides. * * x,y const double[] * Projected coordinates in pseudo "degrees". * * Returned: * phi,theta double[] Longitude and latitude (phi,theta) in the native * coordinate system of the projection [deg]. * * lng,lat double[] Celestial longitude and latitude (lng,lat) of the * projected point [deg]. * * stat int[] Status return value for each vector element: * 0: Success. * 1: Invalid value of (x,y). * * Function return value: * int Status return value: * 0: Success. * 1: Null celprm pointer passed. * 2: Invalid projection parameters. * 3: Invalid coordinate transformation parameters. * 4: Ill-conditioned coordinate transformation * parameters. * 5: One or more of the (x,y) coordinates were * invalid, as indicated by the stat vector. * * For returns > 1, a detailed error message is set in * celprm::err if enabled, see wcserr_enable(). * * * cels2x() - World-to-pixel celestial transformation * -------------------------------------------------- * cels2x() transforms celestial coordinates (lng,lat) to (x,y) coordinates in * the plane of projection. * * Given and returned: * cel struct celprm* * Celestial transformation parameters. * * Given: * nlng,nlat int Vector lengths. * * sll,sxy int Vector strides. * * lng,lat const double[] * Celestial longitude and latitude (lng,lat) of the * projected point [deg]. * * Returned: * phi,theta double[] Longitude and latitude (phi,theta) in the native * coordinate system of the projection [deg]. * * x,y double[] Projected coordinates in pseudo "degrees". * * stat int[] Status return value for each vector element: * 0: Success. * 1: Invalid value of (lng,lat). * * Function return value: * int Status return value: * 0: Success. * 1: Null celprm pointer passed. * 2: Invalid projection parameters. * 3: Invalid coordinate transformation parameters. * 4: Ill-conditioned coordinate transformation * parameters. * 6: One or more of the (lng,lat) coordinates were * invalid, as indicated by the stat vector. * * For returns > 1, a detailed error message is set in * celprm::err if enabled, see wcserr_enable(). * * * celprm struct - Celestial transformation parameters * --------------------------------------------------- * The celprm struct contains information required to transform celestial * coordinates. It consists of certain members that must be set by the user * ("given") and others that are set by the WCSLIB routines ("returned"). Some * of the latter are supplied for informational purposes and others are for * internal use only. * * Returned celprm struct members must not be modified by the user. * * int flag * (Given and returned) This flag must be set to zero whenever any of the * following celprm struct members are set or changed: * * - celprm::offset, * - celprm::phi0, * - celprm::theta0, * - celprm::ref[4], * - celprm::prj: * - prjprm::code, * - prjprm::r0, * - prjprm::pv[], * - prjprm::phi0, * - prjprm::theta0. * * This signals the initialization routine, celset(), to recompute the * returned members of the celprm struct. celset() will reset flag to * indicate that this has been done. * * int offset * (Given) If true (non-zero), an offset will be applied to (x,y) to * force (x,y) = (0,0) at the fiducial point, (phi_0,theta_0). * Default is 0 (false). * * double phi0 * (Given) The native longitude, phi_0 [deg], and ... * * double theta0 * (Given) ... the native latitude, theta_0 [deg], of the fiducial point, * i.e. the point whose celestial coordinates are given in * celprm::ref[1:2]. If undefined (set to a magic value by prjini()) the * initialization routine, celset(), will set this to a projection-specific * default. * * double ref[4] * (Given) The first pair of values should be set to the celestial * longitude and latitude of the fiducial point [deg] - typically right * ascension and declination. These are given by the CRVALia keywords in * FITS. * * (Given and returned) The second pair of values are the native longitude, * phi_p [deg], and latitude, theta_p [deg], of the celestial pole (the * latter is the same as the celestial latitude of the native pole, * delta_p) and these are given by the FITS keywords LONPOLEa and LATPOLEa * (or by PVi_2a and PVi_3a attached to the longitude axis which take * precedence if defined). * * LONPOLEa defaults to phi_0 (see above) if the celestial latitude of the * fiducial point of the projection is greater than or equal to the native * latitude, otherwise phi_0 + 180 [deg]. (This is the condition for the * celestial latitude to increase in the same direction as the native * latitude at the fiducial point.) ref[2] may be set to UNDEFINED (from * wcsmath.h) or 999.0 to indicate that the correct default should be * substituted. * * theta_p, the native latitude of the celestial pole (or equally the * celestial latitude of the native pole, delta_p) is often determined * uniquely by CRVALia and LONPOLEa in which case LATPOLEa is ignored. * However, in some circumstances there are two valid solutions for theta_p * and LATPOLEa is used to choose between them. LATPOLEa is set in ref[3] * and the solution closest to this value is used to reset ref[3]. It is * therefore legitimate, for example, to set ref[3] to +90.0 to choose the * more northerly solution - the default if the LATPOLEa keyword is omitted * from the FITS header. For the special case where the fiducial point of * the projection is at native latitude zero, its celestial latitude is * zero, and LONPOLEa = +/- 90.0 then the celestial latitude of the native * pole is not determined by the first three reference values and LATPOLEa * specifies it completely. * * The returned value, celprm::latpreq, specifies how LATPOLEa was actually * used. * * struct prjprm prj * (Given and returned) Projection parameters described in the prologue to * prj.h. * * double euler[5] * (Returned) Euler angles and associated intermediaries derived from the * coordinate reference values. The first three values are the Z-, X-, and * Z'-Euler angles [deg], and the remaining two are the cosine and sine of * the X-Euler angle. * * int latpreq * (Returned) For informational purposes, this indicates how the LATPOLEa * keyword was used * - 0: Not required, theta_p (== delta_p) was determined uniquely by the * CRVALia and LONPOLEa keywords. * - 1: Required to select between two valid solutions of theta_p. * - 2: theta_p was specified solely by LATPOLEa. * * int isolat * (Returned) True if the spherical rotation preserves the magnitude of the * latitude, which occurs iff the axes of the native and celestial * coordinates are coincident. It signals an opportunity to cache * intermediate calculations common to all elements in a vector * computation. * * struct wcserr *err * (Returned) If enabled, when an error status is returned, this struct * contains detailed information about the error, see wcserr_enable(). * * void *padding * (An unused variable inserted for alignment purposes only.) * * Global variable: const char *cel_errmsg[] - Status return messages * ------------------------------------------------------------------ * Status messages to match the status value returned from each function. * *===========================================================================*/ #ifndef WCSLIB_CEL #define WCSLIB_CEL #include "prj.h" #ifdef __cplusplus extern "C" { #endif extern const char *cel_errmsg[]; enum cel_errmsg_enum { CELERR_SUCCESS = 0, /* Success. */ CELERR_NULL_POINTER = 1, /* Null celprm pointer passed. */ CELERR_BAD_PARAM = 2, /* Invalid projection parameters. */ CELERR_BAD_COORD_TRANS = 3, /* Invalid coordinate transformation parameters. */ CELERR_ILL_COORD_TRANS = 4, /* Ill-conditioned coordinated transformation parameters. */ CELERR_BAD_PIX = 5, /* One or more of the (x,y) coordinates were invalid. */ CELERR_BAD_WORLD = 6 /* One or more of the (lng,lat) coordinates were invalid. */ }; struct celprm { /* Initialization flag (see the prologue above). */ /*------------------------------------------------------------------------*/ int flag; /* Set to zero to force initialization. */ /* Parameters to be provided (see the prologue above). */ /*------------------------------------------------------------------------*/ int offset; /* Force (x,y) = (0,0) at (phi_0,theta_0). */ double phi0, theta0; /* Native coordinates of fiducial point. */ double ref[4]; /* Celestial coordinates of fiducial */ /* point and native coordinates of */ /* celestial pole. */ struct prjprm prj; /* Projection parameters (see prj.h). */ /* Information derived from the parameters supplied. */ /*------------------------------------------------------------------------*/ double euler[5]; /* Euler angles and functions thereof. */ int latpreq; /* LATPOLEa requirement. */ int isolat; /* True if |latitude| is preserved. */ /* Error handling */ /*------------------------------------------------------------------------*/ struct wcserr *err; /* Private */ /*------------------------------------------------------------------------*/ void *padding; /* (Dummy inserted for alignment purposes.) */ }; /* Size of the celprm struct in int units, used by the Fortran wrappers. */ #define CELLEN (sizeof(struct celprm)/sizeof(int)) int celini(struct celprm *cel); int celfree(struct celprm *cel); int celprt(const struct celprm *cel); int celperr(const struct celprm *cel, const char *prefix); int celset(struct celprm *cel); int celx2s(struct celprm *cel, int nx, int ny, int sxy, int sll, const double x[], const double y[], double phi[], double theta[], double lng[], double lat[], int stat[]); int cels2x(struct celprm *cel, int nlng, int nlat, int sll, int sxy, const double lng[], const double lat[], double phi[], double theta[], double x[], double y[], int stat[]); /* Deprecated. */ #define celini_errmsg cel_errmsg #define celprt_errmsg cel_errmsg #define celset_errmsg cel_errmsg #define celx2s_errmsg cel_errmsg #define cels2x_errmsg cel_errmsg #ifdef __cplusplus } #endif #endif /* WCSLIB_CEL */ astropy-1.1.1/cextern/wcslib/C/wcsutrn.l0000644001134200020070000001455712644017723021140 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsutrn.l,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * wcsutrn.l is a Flex description file containing the definition of a lexical * scanner that translates non-standard FITS units specifications. * * It requires Flex v2.5.4 or later. * * Refer to wcsunits.h for a description of the user interface and operating * notes. * *===========================================================================*/ /* Options. */ %option full %option never-interactive %option noyywrap %option outfile="wcsutrn.c" %option prefix="wcsutrn" /* Exclusive start states. */ %x NEXT FLUSH %{ /* To get the prototype for fileno() from stdio.h when gcc is invoked with * -std=c89 (same as -ansi) or -std=c99 since we do not define YY_INPUT. */ #define _POSIX_SOURCE 1 #include #include #include #include #include "wcserr.h" #include "wcsunits.h" #define YY_DECL int wcsutrne(int ctrl, char unitstr[], struct wcserr **err) /* Used in preempting the call to exit() by yy_fatal_error(). */ jmp_buf wcsutrn_abort_jmp_env; #define exit(status) longjmp(wcsutrn_abort_jmp_env, status) %} %% static const char *function = "wcsutrne"; char orig[80], subs[80]; int bracket = 0; int unsafe = 0; int status = -1; YY_BUFFER_STATE inbuff; int yylex_destroy(void); if (err) *err = 0x0; *orig = '\0'; *subs = '\0'; inbuff = yy_scan_string(unitstr); *unitstr = '\0'; /* Return here via longjmp() invoked by yy_fatal_error(). */ if (setjmp(wcsutrn_abort_jmp_env)) { return wcserr_set(WCSERR_SET(UNITSERR_PARSER_ERROR), "Internal units translator error parsing '%s'", unitstr); } BEGIN(INITIAL); #ifdef DEBUG fprintf(stderr, "\n%s ->\n", unitstr); #endif ^" "*"[" { /* Looks like a keycomment. */ strcat(unitstr, "["); bracket = 1; } " "+ /* Discard leading whitespace. */ [^A-Za-z] { /* Non-alphabetic character. */ strcat(unitstr, yytext); if (bracket && *yytext == ']') { BEGIN(FLUSH); } } angstrom { strcpy(orig, yytext); strcpy(subs, "Angstrom"); BEGIN(NEXT); } arcmins|ARCMINS? { strcpy(orig, yytext); strcpy(subs, "arcmin"); BEGIN(NEXT); } arcsecs|ARCSECS? { strcpy(orig, yytext); strcpy(subs, "arcsec"); BEGIN(NEXT); } BEAM { strcpy(orig, yytext); strcpy(subs, "beam"); BEGIN(NEXT); } Byte { strcpy(orig, yytext); strcpy(subs, "byte"); BEGIN(NEXT); } days?|DAYS? { strcpy(orig, yytext); strcpy(subs, "d"); BEGIN(NEXT); } D { unsafe = 1; strcpy(orig, yytext); strcpy(subs, (ctrl & 4) ? "d" : "D"); BEGIN(NEXT); } degrees?|DEG|DEGREES? { strcpy(orig, yytext); strcpy(subs, "deg"); BEGIN(NEXT); } GHZ { strcpy(orig, yytext); strcpy(subs, "GHz"); BEGIN(NEXT); } hr|HR { strcpy(orig, yytext); strcpy(subs, "h"); BEGIN(NEXT); } H { unsafe = 1; strcpy(orig, yytext); strcpy(subs, (ctrl & 2) ? "h" : "H"); BEGIN(NEXT); } hz|HZ { strcpy(orig, yytext); strcpy(subs, "Hz"); BEGIN(NEXT); } KHZ { strcpy(orig, yytext); strcpy(subs, "kHz"); BEGIN(NEXT); } JY { strcpy(orig, yytext); strcpy(subs, "Jy"); BEGIN(NEXT); } [kK]elvins?|KELVINS? { strcpy(orig, yytext); strcpy(subs, "K"); BEGIN(NEXT); } KM { strcpy(orig, yytext); strcpy(subs, "km"); BEGIN(NEXT); } metres?|meters?|M|METRES?|METERS? { strcpy(orig, yytext); strcpy(subs, "m"); BEGIN(NEXT); } MIN { strcpy(orig, yytext); strcpy(subs, "min"); BEGIN(NEXT); } MHZ { strcpy(orig, yytext); strcpy(subs, "MHz"); BEGIN(NEXT); } Ohm { strcpy(orig, yytext); strcpy(subs, "ohm"); BEGIN(NEXT); } [pP]ascals?|PASCALS? { strcpy(orig, yytext); strcpy(subs, "Pa"); BEGIN(NEXT); } pixels|PIXELS? { strcpy(orig, yytext); strcpy(subs, "pixel"); BEGIN(NEXT); } radians?|RAD|RADIANS? { strcpy(orig, yytext); strcpy(subs, "rad"); BEGIN(NEXT); } sec|seconds?|SEC|SECONDS? { strcpy(orig, yytext); strcpy(subs, "s"); BEGIN(NEXT); } S { unsafe = 1; strcpy(orig, yytext); strcpy(subs, (ctrl & 1) ? "s" : "S"); BEGIN(NEXT); } [vV]olts?|VOLTS? { strcpy(orig, yytext); strcpy(subs, "V"); BEGIN(NEXT); } years?|YR|YEARS? { strcpy(orig, yytext); strcpy(subs, "yr"); BEGIN(NEXT); } [A-Za-z]+ { /* Not a recognized alias. */ strcpy(orig, yytext); strcpy(subs, orig); BEGIN(NEXT); } [A-Za-z]+ { /* Reject the alias match. */ strcat(orig, yytext); strcpy(subs, orig); } " "+[^A-Za-z] { /* Discard separating whitespace. */ unput(yytext[yyleng-1]); } " "+[A-Za-z] { /* Compress separating whitespace. */ strcat(unitstr, subs); strcat(unitstr, " "); if (strcmp(orig, subs)) status = 0; unput(yytext[yyleng-1]); *subs = '\0'; BEGIN(INITIAL); } . { /* Copy anything else unchanged. */ strcat(unitstr, subs); if (strcmp(orig, subs)) status = 0; unput(*yytext); *subs = '\0'; BEGIN(INITIAL); } .* { /* Copy out remaining input. */ strcat(unitstr, yytext); } <> { /* End-of-string. */ if (*subs) { strcat(unitstr, subs); if (strcmp(orig, subs)) status = 0; } yylex_destroy(); if (unsafe) { return wcserr_set(WCSERR_SET(UNITSERR_UNSAFE_TRANS), "Unsafe unit translation in '%s'", unitstr); } return status; } %% astropy-1.1.1/cextern/wcslib/C/lin.h0000644001134200020070000006322512644017723020205 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: lin.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the lin routines * --------------------------- * Routines in this suite apply the linear transformation defined by the FITS * World Coordinate System (WCS) standard, as described in * = "Representations of world coordinates in FITS", = Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I) * * These routines are based on the linprm struct which contains all information * needed for the computations. The struct contains some members that must be * set by the user, and others that are maintained by these routines, somewhat * like a C++ class but with no encapsulation. * * Four routines, linini(), lindis(), lincpy(), and linfree() are provided to * manage the linprm struct, and another, linprt(), prints its contents. * * linperr() prints the error message(s) (if any) stored in a linprm struct, * and the disprm structs that it may contain. * * A setup routine, linset(), computes intermediate values in the linprm struct * from parameters in it that were supplied by the user. The struct always * needs to be set up by linset() but need not be called explicitly - refer to * the explanation of linprm::flag. * * linp2x() and linx2p() implement the WCS linear transformations. * * An auxiliary routine, linwarp(), computes various measures of the distortion * over a specified range of pixel coordinates. * * An auxiliary matrix inversion routine, matinv(), is included. It uses * LU-triangular factorization with scaled partial pivoting. * * * linini() - Default constructor for the linprm struct * ---------------------------------------------------- * linini() allocates memory for arrays in a linprm struct and sets all members * of the struct to default values. * * PLEASE NOTE: every linprm struct must be initialized by linini(), possibly * repeatedly. On the first invokation, and only the first invokation, * linprm::flag must be set to -1 to initialize memory management, regardless * of whether linini() will actually be used to allocate memory. * * Given: * alloc int If true, allocate memory unconditionally for arrays in * the linprm struct. * * If false, it is assumed that pointers to these arrays * have been set by the user except if they are null * pointers in which case memory will be allocated for * them regardless. (In other words, setting alloc true * saves having to initalize these pointers to zero.) * * naxis int The number of world coordinate axes, used to determine * array sizes. * * Given and returned: * lin struct linprm* * Linear transformation parameters. Note that, in order * to initialize memory management linprm::flag should be * set to -1 when lin is initialized for the first time * (memory leaks may result if it had already been * initialized). * * Function return value: * int Status return value: * 0: Success. * 1: Null linprm pointer passed. * 2: Memory allocation failed. * * For returns > 1, a detailed error message is set in * linprm::err if enabled, see wcserr_enable(). * * * lindis() - Assign a distortion to a linprm struct * ------------------------------------------------- * lindis() may be used to assign the address of a disprm struct to * linprm::dispre or linprm::disseq. The linprm struct must already have been * initialized by linini(). * * The disprm struct must have been allocated from the heap (e.g. using * malloc(), calloc(), etc.). lindis() will immediately initialize it via a * call to disini() using the value of linprm::naxis. Subsequently, it will be * reinitialized by calls to linini(), and freed by linfree(), neither of which * would happen if the disprm struct was assigned directly. * * If the disprm struct had previously been assigned via lindis(), it will be * freed before reassignment. It is also permissable for a null disprm pointer * to be assigned to disable the distortion correction. * * Given: * sequence int Is it a prior or sequent distortion? * 1: Prior, the assignment is to linprm::dispre. * 2: Sequent, the assignment is to linprm::disseq. * * Anything else is an error. * * Given and returned: * lin struct linprm* * Linear transformation parameters. * * dis struct disprm* * Distortion function parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null linprm pointer passed. * 4: Invalid sequence. * * * lincpy() - Copy routine for the linprm struct * --------------------------------------------- * lincpy() does a deep copy of one linprm struct to another, using linini() to * allocate memory for its arrays if required. Only the "information to be * provided" part of the struct is copied; a call to linset() is required to * initialize the remainder. * * Given: * alloc int If true, allocate memory for the crpix, pc, and cdelt * arrays in the destination. Otherwise, it is assumed * that pointers to these arrays have been set by the * user except if they are null pointers in which case * memory will be allocated for them regardless. * * linsrc const struct linprm* * Struct to copy from. * * Given and returned: * lindst struct linprm* * Struct to copy to. linprm::flag should be set to -1 * if lindst was not previously initialized (memory leaks * may result if it was previously initialized). * * Function return value: * int Status return value: * 0: Success. * 1: Null linprm pointer passed. * 2: Memory allocation failed. * * For returns > 1, a detailed error message is set in * linprm::err if enabled, see wcserr_enable(). * * * linfree() - Destructor for the linprm struct * -------------------------------------------- * linfree() frees memory allocated for the linprm arrays by linini() and/or * linset(). linini() keeps a record of the memory it allocates and linfree() * will only attempt to free this. * * PLEASE NOTE: linfree() must not be invoked on a linprm struct that was not * initialized by linini(). * * Given: * lin struct linprm* * Linear transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null linprm pointer passed. * * * linprt() - Print routine for the linprm struct * ---------------------------------------------- * linprt() prints the contents of a linprm struct using wcsprintf(). Mainly * intended for diagnostic purposes. * * Given: * lin const struct linprm* * Linear transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null linprm pointer passed. * * * linperr() - Print error messages from a linprm struct * ----------------------------------------------------- * linperr() prints the error message(s) (if any) stored in a linprm struct, * and the disprm structs that it may contain. If there are no errors then * nothing is printed. It uses wcserr_prt(), q.v. * * Given: * lin const struct linprm* * Coordinate transformation parameters. * * prefix const char * * If non-NULL, each output line will be prefixed with * this string. * * Function return value: * int Status return value: * 0: Success. * 1: Null linprm pointer passed. * * * linset() - Setup routine for the linprm struct * ---------------------------------------------- * linset(), if necessary, allocates memory for the linprm::piximg and * linprm::imgpix arrays and sets up the linprm struct according to information * supplied within it - refer to the explanation of linprm::flag. * * Note that this routine need not be called directly; it will be invoked by * linp2x() and linx2p() if the linprm::flag is anything other than a * predefined magic value. * * Given and returned: * lin struct linprm* * Linear transformation parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null linprm pointer passed. * 2: Memory allocation failed. * 3: PCi_ja matrix is singular. * * For returns > 1, a detailed error message is set in * linprm::err if enabled, see wcserr_enable(). * * * linp2x() - Pixel-to-world linear transformation * ----------------------------------------------- * linp2x() transforms pixel coordinates to intermediate world coordinates. * * Given and returned: * lin struct linprm* * Linear transformation parameters. * * Given: * ncoord, * nelem int The number of coordinates, each of vector length nelem * but containing lin.naxis coordinate elements. * * pixcrd const double[ncoord][nelem] * Array of pixel coordinates. * * Returned: * imgcrd double[ncoord][nelem] * Array of intermediate world coordinates. * * Function return value: * int Status return value: * 0: Success. * 1: Null linprm pointer passed. * 2: Memory allocation failed. * 3: PCi_ja matrix is singular. * * For returns > 1, a detailed error message is set in * linprm::err if enabled, see wcserr_enable(). * * * linx2p() - World-to-pixel linear transformation * ----------------------------------------------- * linx2p() transforms intermediate world coordinates to pixel coordinates. * * Given and returned: * lin struct linprm* * Linear transformation parameters. * * Given: * ncoord, * nelem int The number of coordinates, each of vector length nelem * but containing lin.naxis coordinate elements. * * imgcrd const double[ncoord][nelem] * Array of intermediate world coordinates. * * Returned: * pixcrd double[ncoord][nelem] * Array of pixel coordinates. * * int Status return value: * 0: Success. * 1: Null linprm pointer passed. * 2: Memory allocation failed. * 3: PCi_ja matrix is singular. * * For returns > 1, a detailed error message is set in * linprm::err if enabled, see wcserr_enable(). * * * linwarp() - Compute measures of distortion * ------------------------------------------ * linwarp() computes various measures of the distortion over a specified range * of pixel coordinates. * * All distortion measures are specified as an offset in pixel coordinates, * as given directly by prior distortions. The offset in intermediate pixel * coordinates given by sequent distortions is translated back to pixel * coordinates by applying the inverse of the linear transformation matrix * (PCi_ja or CDi_ja). The difference may be significant if the matrix * introduced a scaling. * * If all distortions are prior, then linwarp() uses diswarp(), q.v. * * Given and returned: * lin struct linprm* * Linear transformation parameters plus distortions. * * Given: * pixblc const double[naxis] * Start of the range of pixel coordinates (i.e. "bottom * left-hand corner" in the conventional FITS image * display orientation). May be specified as a NULL * pointer which is interpreted as (1,1,...). * * pixtrc const double[naxis] * End of the range of pixel coordinates (i.e. "top * right-hand corner" in the conventional FITS image * display orientation). * * pixsamp const double[naxis] * If positive or zero, the increment on the particular * axis, starting at pixblc[]. Zero is interpreted as a * unit increment. pixsamp may also be specified as a * NULL pointer which is interpreted as all zeroes, i.e. * unit increments on all axes. * * If negative, the grid size on the particular axis (the * absolute value being rounded to the nearest integer). * For example, if pixsamp is (-128.0,-128.0,...) then * each axis will be sampled at 128 points between * pixblc[] and pixtrc[] inclusive. Use caution when * using this option on non-square images. * * Returned: * nsamp int* The number of pixel coordinates sampled. * * Can be specified as a NULL pointer if not required. * * maxdis double[naxis] * For each individual distortion function, the * maximum absolute value of the distortion. * * Can be specified as a NULL pointer if not required. * * maxtot double* For the combination of all distortion functions, the * maximum absolute value of the distortion. * * Can be specified as a NULL pointer if not required. * * avgdis double[naxis] * For each individual distortion function, the * mean value of the distortion. * * Can be specified as a NULL pointer if not required. * * avgtot double* For the combination of all distortion functions, the * mean value of the distortion. * * Can be specified as a NULL pointer if not required. * * rmsdis double[naxis] * For each individual distortion function, the * root mean square deviation of the distortion. * * Can be specified as a NULL pointer if not required. * * rmstot double* For the combination of all distortion functions, the * root mean square deviation of the distortion. * * Can be specified as a NULL pointer if not required. * * Function return value: * int Status return value: * 0: Success. * 1: Null linprm pointer passed. * 2: Memory allocation failed. * 3: Invalid parameter. * 4: Distort error. * * * linprm struct - Linear transformation parameters * ------------------------------------------------ * The linprm struct contains all of the information required to perform a * linear transformation. It consists of certain members that must be set by * the user ("given") and others that are set by the WCSLIB routines * ("returned"). * * int flag * (Given and returned) This flag must be set to zero whenever any of the * following members of the linprm struct are set or modified: * * - linprm::naxis (q.v., not normally set by the user), * - linprm::pc, * - linprm::cdelt, * - linprm::dispre. * - linprm::disseq. * * This signals the initialization routine, linset(), to recompute the * returned members of the linprm struct. linset() will reset flag to * indicate that this has been done. * * PLEASE NOTE: flag should be set to -1 when linini() is called for the * first time for a particular linprm struct in order to initialize memory * management. It must ONLY be used on the first initialization otherwise * memory leaks may result. * * int naxis * (Given or returned) Number of pixel and world coordinate elements. * * If linini() is used to initialize the linprm struct (as would normally * be the case) then it will set naxis from the value passed to it as a * function argument. The user should not subsequently modify it. * * double *crpix * (Given) Pointer to the first element of an array of double containing * the coordinate reference pixel, CRPIXja. * * It is not necessary to reset the linprm struct (via linset()) when * linprm::crpix is changed. * * double *pc * (Given) Pointer to the first element of the PCi_ja (pixel coordinate) * transformation matrix. The expected order is * = struct linprm lin; = lin.pc = {PC1_1, PC1_2, PC2_1, PC2_2}; * * This may be constructed conveniently from a 2-D array via * = double m[2][2] = {{PC1_1, PC1_2}, = {PC2_1, PC2_2}}; * * which is equivalent to * = double m[2][2]; = m[0][0] = PC1_1; = m[0][1] = PC1_2; = m[1][0] = PC2_1; = m[1][1] = PC2_2; * * The storage order for this 2-D array is the same as for the 1-D array, * whence * = lin.pc = *m; * * would be legitimate. * * double *cdelt * (Given) Pointer to the first element of an array of double containing * the coordinate increments, CDELTia. * * struct disprm *dispre * (Given) Pointer to a disprm struct holding parameters for prior * distortion functions, or a null (0x0) pointer if there are none. * * Function lindis() may be used to assign a disprm pointer to a linprm * struct, allowing it to take control of any memory allocated for it, as * in the following example: * = void add_distortion(struct linprm *lin) = { = struct disprm *dispre; = = dispre = malloc(sizeof(struct disprm); = dispre->flag = -1; = lindis(1, lin, dispre); = : = (Set up dispre.) = : = = return; = } * * Here, after the distortion function parameters etc. are copied into * dispre, dispre is assigned using lindis() which takes control of the * allocated memory. It will be free'd later when linfree() is invoked on * the linprm struct. * * Consider also the following erroneous code: * = void bad_code(struct linprm *lin) = { = struct disprm dispre; = = dispre.flag = -1; = lindis(1, lin, &dispre); // WRONG. = : = = return; = } * * Here, dispre is declared as a struct, rather than a pointer. When the * function returns, dispre will go out of scope and its memory will most * likely be reused, thereby trashing its contents. Later, a segfault will * occur when linfree() tries to free dispre's stale address. * * struct disprm *disseq * (Given) Pointer to a disprm struct holding parameters for sequent * distortion functions, or a null (0x0) pointer if there are none. * * Refer to the comments and examples given for disprm::dispre. * * double *piximg * (Returned) Pointer to the first element of the matrix containing the * product of the CDELTia diagonal matrix and the PCi_ja matrix. * * double *imgpix * (Returned) Pointer to the first element of the inverse of the * linprm::piximg matrix. * * int i_naxis * (Returned) The dimension of linprm::piximg and linprm::imgpix (normally * equal to naxis). * * int unity * (Returned) True if the linear transformation matrix is unity. * * int affine * (Returned) True if there are no distortions. * * int simple * (Returned) True if unity and no distortions. * * struct wcserr *err * (Returned) If enabled, when an error status is returned, this struct * contains detailed information about the error, see wcserr_enable(). * * double *tmpcrd * (For internal use only.) * int m_flag * (For internal use only.) * int m_naxis * (For internal use only.) * double *m_crpix * (For internal use only.) * double *m_pc * (For internal use only.) * double *m_cdelt * (For internal use only.) * struct disprm *m_dispre * (For internal use only.) * struct disprm *m_disseq * (For internal use only.) * * * Global variable: const char *lin_errmsg[] - Status return messages * ------------------------------------------------------------------ * Error messages to match the status value returned from each function. * *===========================================================================*/ #ifndef WCSLIB_LIN #define WCSLIB_LIN #ifdef __cplusplus extern "C" { #endif extern const char *lin_errmsg[]; enum lin_errmsg_enum { LINERR_SUCCESS = 0, /* Success. */ LINERR_NULL_POINTER = 1, /* Null linprm pointer passed. */ LINERR_MEMORY = 2, /* Memory allocation failed. */ LINERR_SINGULAR_MTX = 3, /* PCi_ja matrix is singular. */ LINERR_DISTORT_INIT = 4, /* Failed to initialise distortions. */ LINERR_DISTORT = 5, /* Distort error. */ LINERR_DEDISTORT = 6 /* De-distort error. */ }; struct linprm { /* Initialization flag (see the prologue above). */ /*------------------------------------------------------------------------*/ int flag; /* Set to zero to force initialization. */ /* Parameters to be provided (see the prologue above). */ /*------------------------------------------------------------------------*/ int naxis; /* The number of axes, given by NAXIS. */ double *crpix; /* CRPIXja keywords for each pixel axis. */ double *pc; /* PCi_ja linear transformation matrix. */ double *cdelt; /* CDELTia keywords for each coord axis. */ struct disprm *dispre; /* Prior distortion parameters, if any. */ struct disprm *disseq; /* Sequent distortion parameters, if any. */ /* Information derived from the parameters supplied. */ /*------------------------------------------------------------------------*/ double *piximg; /* Product of CDELTia and PCi_ja matrices. */ double *imgpix; /* Inverse of the piximg matrix. */ int i_naxis; /* Dimension of piximg and imgpix. */ int unity; /* True if the PCi_ja matrix is unity. */ int affine; /* True if there are no distortions. */ int simple; /* True if unity and no distortions. */ /* Error handling, if enabled. */ /*------------------------------------------------------------------------*/ struct wcserr *err; /* Private - the remainder are for internal use. */ /*------------------------------------------------------------------------*/ double *tmpcrd; int m_flag, m_naxis; double *m_crpix, *m_pc, *m_cdelt; struct disprm *m_dispre, *m_disseq; }; /* Size of the linprm struct in int units, used by the Fortran wrappers. */ #define LINLEN (sizeof(struct linprm)/sizeof(int)) int linini(int alloc, int naxis, struct linprm *lin); int lindis(int sequence, struct linprm *lin, struct disprm *dis); int lincpy(int alloc, const struct linprm *linsrc, struct linprm *lindst); int linfree(struct linprm *lin); int linprt(const struct linprm *lin); int linperr(const struct linprm *lin, const char *prefix); int linset(struct linprm *lin); int linp2x(struct linprm *lin, int ncoord, int nelem, const double pixcrd[], double imgcrd[]); int linx2p(struct linprm *lin, int ncoord, int nelem, const double imgcrd[], double pixcrd[]); int linwarp(struct linprm *lin, const double pixblc[], const double pixtrc[], const double pixsamp[], int *nsamp, double maxdis[], double *maxtot, double avgdis[], double *avgtot, double rmsdis[], double *rmstot); int matinv(int n, const double mat[], double inv[]); /* Deprecated. */ #define linini_errmsg lin_errmsg #define lincpy_errmsg lin_errmsg #define linfree_errmsg lin_errmsg #define linprt_errmsg lin_errmsg #define linset_errmsg lin_errmsg #define linp2x_errmsg lin_errmsg #define linx2p_errmsg lin_errmsg #ifdef __cplusplus } #endif #endif /* WCSLIB_LIN */ astropy-1.1.1/cextern/wcslib/C/spx.h0000644001134200020070000005037412644017723020236 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: spx.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the spx routines * --------------------------- * Routines in this suite implement the spectral coordinate systems recognized * by the FITS World Coordinate System (WCS) standard, as described in * = "Representations of world coordinates in FITS", = Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I) = = "Representations of spectral coordinates in FITS", = Greisen, E.W., Calabretta, M.R., Valdes, F.G., & Allen, S.L. = 2006, A&A, 446, 747 (WCS Paper III) * * specx() is a scalar routine that, given one spectral variable (e.g. * frequency), computes all the others (e.g. wavelength, velocity, etc.) plus * the required derivatives of each with respect to the others. The results * are returned in the spxprm struct. * * spxperr() prints the error message(s) (if any) stored in a spxprm struct. * * The remaining routines are all vector conversions from one spectral * variable to another. The API of these functions only differ in whether the * rest frequency or wavelength need be supplied. * * Non-linear: * - freqwave() frequency -> vacuum wavelength * - wavefreq() vacuum wavelength -> frequency * * - freqawav() frequency -> air wavelength * - awavfreq() air wavelength -> frequency * * - freqvelo() frequency -> relativistic velocity * - velofreq() relativistic velocity -> frequency * * - waveawav() vacuum wavelength -> air wavelength * - awavwave() air wavelength -> vacuum wavelength * * - wavevelo() vacuum wavelength -> relativistic velocity * - velowave() relativistic velocity -> vacuum wavelength * * - awavvelo() air wavelength -> relativistic velocity * - veloawav() relativistic velocity -> air wavelength * * Linear: * - freqafrq() frequency -> angular frequency * - afrqfreq() angular frequency -> frequency * * - freqener() frequency -> energy * - enerfreq() energy -> frequency * * - freqwavn() frequency -> wave number * - wavnfreq() wave number -> frequency * * - freqvrad() frequency -> radio velocity * - vradfreq() radio velocity -> frequency * * - wavevopt() vacuum wavelength -> optical velocity * - voptwave() optical velocity -> vacuum wavelength * * - wavezopt() vacuum wavelength -> redshift * - zoptwave() redshift -> vacuum wavelength * * - velobeta() relativistic velocity -> beta (= v/c) * - betavelo() beta (= v/c) -> relativistic velocity * * These are the workhorse routines, to be used for fast transformations. * Conversions may be done "in place" by calling the routine with the output * vector set to the input. * * Argument checking: * ------------------ * The input spectral values are only checked for values that would result * in floating point exceptions. In particular, negative frequencies and * wavelengths are allowed, as are velocities greater than the speed of * light. The same is true for the spectral parameters - rest frequency and * wavelength. * * Accuracy: * --------- * No warranty is given for the accuracy of these routines (refer to the * copyright notice); intending users must satisfy for themselves their * adequacy for the intended purpose. However, closure effectively to within * double precision rounding error was demonstrated by test routine tspec.c * which accompanies this software. * * * specx() - Spectral cross conversions (scalar) * --------------------------------------------- * Given one spectral variable specx() computes all the others, plus the * required derivatives of each with respect to the others. * * Given: * type const char* * The type of spectral variable given by spec, FREQ, * AFRQ, ENER, WAVN, VRAD, WAVE, VOPT, ZOPT, AWAV, VELO, * or BETA (case sensitive). * * spec double The spectral variable given, in SI units. * * restfrq, * restwav double Rest frequency [Hz] or rest wavelength in vacuo [m], * only one of which need be given. The other should be * set to zero. If both are zero, only a subset of the * spectral variables can be computed, the remainder are * set to zero. Specifically, given one of FREQ, AFRQ, * ENER, WAVN, WAVE, or AWAV the others can be computed * without knowledge of the rest frequency. Likewise, * VRAD, VOPT, ZOPT, VELO, and BETA. * * Given and returned: * specs struct spxprm* * Data structure containing all spectral variables and * their derivatives, in SI units. * * Function return value: * int Status return value: * 0: Success. * 1: Null spxprm pointer passed. * 2: Invalid spectral parameters. * 3: Invalid spectral variable. * * For returns > 1, a detailed error message is set in * spxprm::err if enabled, see wcserr_enable(). * * freqafrq(), afrqfreq(), freqener(), enerfreq(), freqwavn(), wavnfreq(), * freqwave(), wavefreq(), freqawav(), awavfreq(), waveawav(), awavwave(), * velobeta(), and betavelo() implement vector conversions between wave-like * or velocity-like spectral types (i.e. conversions that do not need the rest * frequency or wavelength). They all have the same API. * * * spxperr() - Print error messages from a spxprm struct * ----------------------------------------------------- * spxperr() prints the error message(s) (if any) stored in a spxprm struct. * If there are no errors then nothing is printed. It uses wcserr_prt(), q.v. * * Given: * spx const struct spxprm* * Spectral variables and their derivatives. * * prefix const char * * If non-NULL, each output line will be prefixed with * this string. * * Function return value: * int Status return value: * 0: Success. * 1: Null spxprm pointer passed. * * * freqafrq() - Convert frequency to angular frequency (vector) * ------------------------------------------------------------ * freqafrq() converts frequency to angular frequency. * * Given: * param double Ignored. * * nspec int Vector length. * * instep, * outstep int Vector strides. * * inspec const double[] * Input spectral variables, in SI units. * * Returned: * outspec double[] Output spectral variables, in SI units. * * stat int[] Status return value for each vector element: * 0: Success. * 1: Invalid value of inspec. * * Function return value: * int Status return value: * 0: Success. * 2: Invalid spectral parameters. * 4: One or more of the inspec coordinates were * invalid, as indicated by the stat vector. * * * freqvelo(), velofreq(), freqvrad(), and vradfreq() implement vector * conversions between frequency and velocity spectral types. They all have * the same API. * * * freqvelo() - Convert frequency to relativistic velocity (vector) * ---------------------------------------------------------------- * freqvelo() converts frequency to relativistic velocity. * * Given: * param double Rest frequency [Hz]. * * nspec int Vector length. * * instep, * outstep int Vector strides. * * inspec const double[] * Input spectral variables, in SI units. * * Returned: * outspec double[] Output spectral variables, in SI units. * * stat int[] Status return value for each vector element: * 0: Success. * 1: Invalid value of inspec. * * Function return value: * int Status return value: * 0: Success. * 2: Invalid spectral parameters. * 4: One or more of the inspec coordinates were * invalid, as indicated by the stat vector. * * * wavevelo(), velowave(), awavvelo(), veloawav(), wavevopt(), voptwave(), * wavezopt(), and zoptwave() implement vector conversions between wavelength * and velocity spectral types. They all have the same API. * * * wavevelo() - Conversions between wavelength and velocity types (vector) * ----------------------------------------------------------------------- * wavevelo() converts vacuum wavelength to relativistic velocity. * * Given: * param double Rest wavelength in vacuo [m]. * * nspec int Vector length. * * instep, * outstep int Vector strides. * * inspec const double[] * Input spectral variables, in SI units. * * Returned: * outspec double[] Output spectral variables, in SI units. * * stat int[] Status return value for each vector element: * 0: Success. * 1: Invalid value of inspec. * * Function return value: * int Status return value: * 0: Success. * 2: Invalid spectral parameters. * 4: One or more of the inspec coordinates were * invalid, as indicated by the stat vector. * * * spxprm struct - Spectral variables and their derivatives * -------------------------------------------------------- * The spxprm struct contains the value of all spectral variables and their * derivatives. It is used solely by specx() which constructs it from * information provided via its function arguments. * * This struct should be considered read-only, no members need ever be set nor * should ever be modified by the user. * * double restfrq * (Returned) Rest frequency [Hz]. * * double restwav * (Returned) Rest wavelength [m]. * * int wavetype * (Returned) True if wave types have been computed, and ... * * int velotype * (Returned) ... true if velocity types have been computed; types are * defined below. * * If one or other of spxprm::restfrq and spxprm::restwav is given * (non-zero) then all spectral variables may be computed. If both are * given, restfrq is used. If restfrq and restwav are both zero, only wave * characteristic xor velocity type spectral variables may be computed * depending on the variable given. These flags indicate what is * available. * * double freq * (Returned) Frequency [Hz] (wavetype). * * double afrq * (Returned) Angular frequency [rad/s] (wavetype). * * double ener * (Returned) Photon energy [J] (wavetype). * * double wavn * (Returned) Wave number [/m] (wavetype). * * double vrad * (Returned) Radio velocity [m/s] (velotype). * * double wave * (Returned) Vacuum wavelength [m] (wavetype). * * double vopt * (Returned) Optical velocity [m/s] (velotype). * * double zopt * (Returned) Redshift [dimensionless] (velotype). * * double awav * (Returned) Air wavelength [m] (wavetype). * * double velo * (Returned) Relativistic velocity [m/s] (velotype). * * double beta * (Returned) Relativistic beta [dimensionless] (velotype). * * double dfreqafrq * (Returned) Derivative of frequency with respect to angular frequency * [/rad] (constant, = 1 / 2*pi), and ... * double dafrqfreq * (Returned) ... vice versa [rad] (constant, = 2*pi, always available). * * double dfreqener * (Returned) Derivative of frequency with respect to photon energy * [/J/s] (constant, = 1/h), and ... * double denerfreq * (Returned) ... vice versa [Js] (constant, = h, Planck's constant, * always available). * * double dfreqwavn * (Returned) Derivative of frequency with respect to wave number [m/s] * (constant, = c, the speed of light in vacuo), and ... * double dwavnfreq * (Returned) ... vice versa [s/m] (constant, = 1/c, always available). * * double dfreqvrad * (Returned) Derivative of frequency with respect to radio velocity [/m], * and ... * double dvradfreq * (Returned) ... vice versa [m] (wavetype && velotype). * * double dfreqwave * (Returned) Derivative of frequency with respect to vacuum wavelength * [/m/s], and ... * double dwavefreq * (Returned) ... vice versa [m s] (wavetype). * * double dfreqawav * (Returned) Derivative of frequency with respect to air wavelength, * [/m/s], and ... * double dawavfreq * (Returned) ... vice versa [m s] (wavetype). * * double dfreqvelo * (Returned) Derivative of frequency with respect to relativistic * velocity [/m], and ... * double dvelofreq * (Returned) ... vice versa [m] (wavetype && velotype). * * double dwavevopt * (Returned) Derivative of vacuum wavelength with respect to optical * velocity [s], and ... * double dvoptwave * (Returned) ... vice versa [/s] (wavetype && velotype). * * double dwavezopt * (Returned) Derivative of vacuum wavelength with respect to redshift [m], * and ... * double dzoptwave * (Returned) ... vice versa [/m] (wavetype && velotype). * * double dwaveawav * (Returned) Derivative of vacuum wavelength with respect to air * wavelength [dimensionless], and ... * double dawavwave * (Returned) ... vice versa [dimensionless] (wavetype). * * double dwavevelo * (Returned) Derivative of vacuum wavelength with respect to relativistic * velocity [s], and ... * double dvelowave * (Returned) ... vice versa [/s] (wavetype && velotype). * * double dawavvelo * (Returned) Derivative of air wavelength with respect to relativistic * velocity [s], and ... * double dveloawav * (Returned) ... vice versa [/s] (wavetype && velotype). * * double dvelobeta * (Returned) Derivative of relativistic velocity with respect to * relativistic beta [m/s] (constant, = c, the speed of light in vacuo), * and ... * double dbetavelo * (Returned) ... vice versa [s/m] (constant, = 1/c, always available). * * struct wcserr *err * (Returned) If enabled, when an error status is returned, this struct * contains detailed information about the error, see wcserr_enable(). * * void *padding * (An unused variable inserted for alignment purposes only.) * * Global variable: const char *spx_errmsg[] - Status return messages * ------------------------------------------------------------------ * Error messages to match the status value returned from each function. * *===========================================================================*/ #ifndef WCSLIB_SPEC #define WCSLIB_SPEC #ifdef __cplusplus extern "C" { #endif extern const char *spx_errmsg[]; enum spx_errmsg { SPXERR_SUCCESS = 0, /* Success. */ SPXERR_NULL_POINTER = 1, /* Null spxprm pointer passed. */ SPXERR_BAD_SPEC_PARAMS = 2, /* Invalid spectral parameters. */ SPXERR_BAD_SPEC_VAR = 3, /* Invalid spectral variable. */ SPXERR_BAD_INSPEC_COORD = 4 /* One or more of the inspec coordinates were invalid. */ }; struct spxprm { double restfrq, restwav; /* Rest frequency [Hz] and wavelength [m]. */ int wavetype, velotype; /* True if wave/velocity types have been */ /* computed; types are defined below. */ /* Spectral variables computed by specx(). */ /*------------------------------------------------------------------------*/ double freq, /* wavetype: Frequency [Hz]. */ afrq, /* wavetype: Angular frequency [rad/s]. */ ener, /* wavetype: Photon energy [J]. */ wavn, /* wavetype: Wave number [/m]. */ vrad, /* velotype: Radio velocity [m/s]. */ wave, /* wavetype: Vacuum wavelength [m]. */ vopt, /* velotype: Optical velocity [m/s]. */ zopt, /* velotype: Redshift. */ awav, /* wavetype: Air wavelength [m]. */ velo, /* velotype: Relativistic velocity [m/s]. */ beta; /* velotype: Relativistic beta. */ /* Derivatives of spectral variables computed by specx(). */ /*------------------------------------------------------------------------*/ double dfreqafrq, dafrqfreq, /* Constant, always available. */ dfreqener, denerfreq, /* Constant, always available. */ dfreqwavn, dwavnfreq, /* Constant, always available. */ dfreqvrad, dvradfreq, /* wavetype && velotype. */ dfreqwave, dwavefreq, /* wavetype. */ dfreqawav, dawavfreq, /* wavetype. */ dfreqvelo, dvelofreq, /* wavetype && velotype. */ dwavevopt, dvoptwave, /* wavetype && velotype. */ dwavezopt, dzoptwave, /* wavetype && velotype. */ dwaveawav, dawavwave, /* wavetype. */ dwavevelo, dvelowave, /* wavetype && velotype. */ dawavvelo, dveloawav, /* wavetype && velotype. */ dvelobeta, dbetavelo; /* Constant, always available. */ /* Error handling */ /*------------------------------------------------------------------------*/ struct wcserr *err; /* Private */ /*------------------------------------------------------------------------*/ void *padding; /* (Dummy inserted for alignment purposes.) */ }; /* Size of the spxprm struct in int units, used by the Fortran wrappers. */ #define SPXLEN (sizeof(struct spxprm)/sizeof(int)) int specx(const char *type, double spec, double restfrq, double restwav, struct spxprm *specs); int spxperr(const struct spxprm *spx, const char *prefix); /* For use in declaring function prototypes, e.g. in spcprm. */ #define SPX_ARGS double param, int nspec, int instep, int outstep, \ const double inspec[], double outspec[], int stat[] int freqafrq(SPX_ARGS); int afrqfreq(SPX_ARGS); int freqener(SPX_ARGS); int enerfreq(SPX_ARGS); int freqwavn(SPX_ARGS); int wavnfreq(SPX_ARGS); int freqwave(SPX_ARGS); int wavefreq(SPX_ARGS); int freqawav(SPX_ARGS); int awavfreq(SPX_ARGS); int waveawav(SPX_ARGS); int awavwave(SPX_ARGS); int velobeta(SPX_ARGS); int betavelo(SPX_ARGS); int freqvelo(SPX_ARGS); int velofreq(SPX_ARGS); int freqvrad(SPX_ARGS); int vradfreq(SPX_ARGS); int wavevelo(SPX_ARGS); int velowave(SPX_ARGS); int awavvelo(SPX_ARGS); int veloawav(SPX_ARGS); int wavevopt(SPX_ARGS); int voptwave(SPX_ARGS); int wavezopt(SPX_ARGS); int zoptwave(SPX_ARGS); #ifdef __cplusplus } #endif #endif /* WCSLIB_SPEC */ astropy-1.1.1/cextern/wcslib/C/flexed/0000755001134200020070000000000012644022135020502 5ustar embrayscience00000000000000astropy-1.1.1/cextern/wcslib/C/flexed/fitshdr.c0000644001134200020070000201260512644017723022326 0ustar embrayscience00000000000000#line 2 "fitshdr.c" #line 4 "fitshdr.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer fitshdr_create_buffer #define yy_delete_buffer fitshdr_delete_buffer #define yy_flex_debug fitshdr_flex_debug #define yy_init_buffer fitshdr_init_buffer #define yy_flush_buffer fitshdr_flush_buffer #define yy_load_buffer_state fitshdr_load_buffer_state #define yy_switch_to_buffer fitshdr_switch_to_buffer #define yyin fitshdrin #define yyleng fitshdrleng #define yylex fitshdrlex #define yylineno fitshdrlineno #define yyout fitshdrout #define yyrestart fitshdrrestart #define yytext fitshdrtext #define yywrap fitshdrwrap #define yyalloc fitshdralloc #define yyrealloc fitshdrrealloc #define yyfree fitshdrfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE fitshdrrestart(fitshdrin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif extern yy_size_t fitshdrleng; extern FILE *fitshdrin, *fitshdrout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up fitshdrtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up fitshdrtext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via fitshdrrestart()), so that the user can continue scanning by * just pointing fitshdrin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when fitshdrtext is formed. */ static char yy_hold_char; static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ yy_size_t fitshdrleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow fitshdrwrap()'s to do buffer switches * instead of setting up a fresh fitshdrin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void fitshdrrestart (FILE *input_file ); void fitshdr_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE fitshdr_create_buffer (FILE *file,int size ); void fitshdr_delete_buffer (YY_BUFFER_STATE b ); void fitshdr_flush_buffer (YY_BUFFER_STATE b ); void fitshdrpush_buffer_state (YY_BUFFER_STATE new_buffer ); void fitshdrpop_buffer_state (void ); static void fitshdrensure_buffer_stack (void ); static void fitshdr_load_buffer_state (void ); static void fitshdr_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER fitshdr_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE fitshdr_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE fitshdr_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE fitshdr_scan_bytes (yyconst char *bytes,yy_size_t len ); void *fitshdralloc (yy_size_t ); void *fitshdrrealloc (void *,yy_size_t ); void fitshdrfree (void * ); #define yy_new_buffer fitshdr_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ fitshdrensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ fitshdr_create_buffer(fitshdrin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ fitshdrensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ fitshdr_create_buffer(fitshdrin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define fitshdrwrap() 1 #define YY_SKIP_YYWRAP typedef char YY_CHAR; FILE *fitshdrin = (FILE *) 0, *fitshdrout = (FILE *) 0; typedef int yy_state_type; extern int fitshdrlineno; int fitshdrlineno = 1; extern char *fitshdrtext; #define yytext_ptr fitshdrtext static yyconst flex_int16_t yy_nxt[][128] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 }, { 15, 17, 17, 17, 17, 17, 17, 17, 17, 17, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 19, 17, 17, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 17, 17, 17, 17, 17, 17, 17, 19, 19, 20, 19, 21, 19, 19, 22, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 17, 17, 17, 17, 19, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17 }, { 15, 23, 23, 23, 23, 23, 23, 23, 23, 23, 16, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 23, 23, 23, 23, 23, 23, 25, 26, 23, 23, 27, 23, 27, 28, 29, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 32, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 32, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23 }, { 15, 23, 23, 23, 23, 23, 23, 23, 23, 23, 16, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 23, 23, 23, 23, 23, 23, 25, 26, 23, 23, 27, 23, 27, 28, 29, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 32, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 32, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23 }, { 15, 33, 33, 33, 33, 33, 33, 33, 33, 33, 34, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 35, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 36, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33 }, { 15, 33, 33, 33, 33, 33, 33, 33, 33, 33, 34, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 35, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 36, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33 }, { 15, 37, 37, 37, 37, 37, 37, 37, 37, 37, 16, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 38, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37 }, { 15, 37, 37, 37, 37, 37, 37, 37, 37, 37, 16, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 38, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37 }, { 15, 39, 39, 39, 39, 39, 39, 39, 39, 39, 16, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39 }, { 15, 39, 39, 39, 39, 39, 39, 39, 39, 39, 16, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39 }, { 15, 40, 40, 40, 40, 40, 40, 40, 40, 40, 16, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40 }, { 15, 40, 40, 40, 40, 40, 40, 40, 40, 40, 16, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40 }, { 15, 41, 41, 41, 41, 41, 41, 41, 41, 41, 42, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41 }, { 15, 41, 41, 41, 41, 41, 41, 41, 41, 41, 42, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41 }, { -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15 }, { 15, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16 }, { 15, 43, 43, 43, 43, 43, 43, 43, 43, 43, -17, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43 }, { 15, 43, 43, 43, 43, 43, 43, 43, 43, 43, -18, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43 }, { 15, 43, 43, 43, 43, 43, 43, 43, 43, 43, -19, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 45, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 46, 43, 43, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 43, 43, 43, 43, 43, 43, 43, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 43, 43, 43, 43, 46, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43 }, { 15, 43, 43, 43, 43, 43, 43, 43, 43, 43, -20, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 45, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 46, 43, 43, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 43, 43, 43, 43, 43, 43, 43, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 47, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 43, 43, 43, 43, 46, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43 }, { 15, 43, 43, 43, 43, 43, 43, 43, 43, 43, -21, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 45, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 46, 43, 43, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 43, 43, 43, 43, 43, 43, 43, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 48, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 43, 43, 43, 43, 46, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43 }, { 15, 43, 43, 43, 43, 43, 43, 43, 43, 43, -22, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 45, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 46, 43, 43, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 43, 43, 43, 43, 43, 43, 43, 46, 46, 46, 46, 46, 46, 46, 46, 49, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 43, 43, 43, 43, 46, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43 }, { 15, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23 }, { 15, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, 50, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, 51, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24 }, { 15, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52 }, { 15, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, 54, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, 55, -26, 55, 56, -26, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26 }, { 15, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, 58, -27, 59, 60, 60, 60, 60, 60, 60, 60, 60, 60, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27 }, { 15, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28 }, { 15, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29 }, { 15, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, 62, -30, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, 65, 65, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, 65, 65, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30 }, { 15, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, 62, -31, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, 65, 65, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, 65, 65, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31 }, { 15, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32 }, { 15, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33 }, { 15, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34 }, { 15, -35, -35, -35, -35, -35, -35, -35, -35, -35, 67, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, 68, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, 69, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35 }, { 15, -36, -36, -36, -36, -36, -36, -36, -36, -36, 70, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, 71, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36 }, { 15, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37 }, { 15, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, 72, -38, -38, -38, -38, -38, -38, -38, 72, 72, 72, 72, -38, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, -38, -38, -38, -38, -38, -38, -38, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, -38, -38, -38, 72, -38, -38, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, -38, -38, -38, -38, -38 }, { 15, 73, 73, 73, 73, 73, 73, 73, 73, 73, -39, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73 }, { 15, 74, 74, 74, 74, 74, 74, 74, 74, 74, -40, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74 }, { 15, 75, 75, 75, 75, 75, 75, 75, 75, 75, 76, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75 }, { 15, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42 }, { 15, 77, 77, 77, 77, 77, 77, 77, 77, 77, -43, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77 }, { 15, 77, 77, 77, 77, 77, 77, 77, 77, 77, -44, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 78, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77 }, { 15, 77, 77, 77, 77, 77, 77, 77, 77, 77, -45, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 79, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77 }, { 15, 77, 77, 77, 77, 77, 77, 77, 77, 77, -46, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 80, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 81, 77, 77, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 77, 77, 77, 77, 77, 77, 77, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 77, 77, 77, 77, 81, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77 }, { 15, 77, 77, 77, 77, 77, 77, 77, 77, 77, -47, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 80, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 81, 77, 77, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 77, 77, 77, 77, 77, 77, 77, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 82, 83, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 77, 77, 77, 77, 81, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77 }, { 15, 77, 77, 77, 77, 77, 77, 77, 77, 77, -48, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 80, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 81, 77, 77, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 77, 77, 77, 77, 77, 77, 77, 81, 81, 81, 84, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 77, 77, 77, 77, 81, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77 }, { 15, 77, 77, 77, 77, 77, 77, 77, 77, 77, -49, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 80, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 81, 77, 77, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 77, 77, 77, 77, 77, 77, 77, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 85, 81, 81, 81, 81, 81, 81, 81, 77, 77, 77, 77, 81, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77 }, { 15, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, 50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, 51, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50 }, { 15, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51 }, { 15, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52 }, { 15, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, 52, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53 }, { 15, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, 54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, 55, -54, 55, 56, -54, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54 }, { 15, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, 56, -55, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55 }, { 15, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56 }, { 15, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, 87, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, 88, -57, 89, -57, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, 91, 91, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, 91, 91, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57 }, { 15, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58 }, { 15, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, 62, -59, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, 65, 65, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, 65, 65, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59 }, { 15, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, 62, -60, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, 65, 65, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, 65, 65, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60 }, { 15, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, 65, 65, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, 65, 65, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61 }, { 15, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, 65, 65, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, 65, 65, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62 }, { 15, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, 62, -63, 93, 94, 94, 94, 94, 94, 94, 94, 94, 94, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, 65, 65, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, 65, 65, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63 }, { 15, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, 62, -64, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, 65, 65, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, 65, 65, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64 }, { 15, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, 96, -65, 96, -65, -65, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65 }, { 15, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, 62, -66, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, 65, 65, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, 65, 65, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66 }, { 15, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67 }, { 15, -68, -68, -68, -68, -68, -68, -68, -68, -68, 67, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, 68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, 69, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68 }, { 15, -69, -69, -69, -69, -69, -69, -69, -69, -69, 70, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, 71, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69 }, { 15, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70 }, { 15, -71, -71, -71, -71, -71, -71, -71, -71, -71, 70, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, 71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71 }, { 15, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, 72, -72, -72, -72, -72, -72, -72, -72, 72, 72, 72, 72, -72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, -72, -72, -72, -72, -72, -72, -72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, -72, -72, 99, 72, -72, -72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, -72, -72, -72, -72, -72 }, { 15, 73, 73, 73, 73, 73, 73, 73, 73, 73, -73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73 }, { 15, 74, 74, 74, 74, 74, 74, 74, 74, 74, -74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74 }, { 15, 75, 75, 75, 75, 75, 75, 75, 75, 75, 76, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75 }, { 15, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76 }, { 15, 100, 100, 100, 100, 100, 100, 100, 100, 100, -77, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }, { 15, 100, 100, 100, 100, 100, 100, 100, 100, 100, -78, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 101, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }, { 15, 100, 100, 100, 100, 100, 100, 100, 100, 100, -79, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 102, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }, { 15, 100, 100, 100, 100, 100, 100, 100, 100, 100, -80, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 103, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }, { 15, 100, 100, 100, 100, 100, 100, 100, 100, 100, -81, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 104, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 105, 100, 100, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 100, 100, 100, 100, 100, 100, 100, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 100, 100, 100, 100, 105, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }, { 15, 100, 100, 100, 100, 100, 100, 100, 100, 100, -82, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 104, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 105, 100, 100, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 100, 100, 100, 100, 100, 100, 100, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 106, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 100, 100, 100, 100, 105, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }, { 15, 100, 100, 100, 100, 100, 100, 100, 100, 100, -83, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 104, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 105, 100, 100, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 100, 100, 100, 100, 100, 100, 100, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 107, 105, 105, 105, 105, 105, 105, 100, 100, 100, 100, 105, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }, { 15, 100, 100, 100, 100, 100, 100, 100, 100, 100, -84, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 108, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 105, 100, 100, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 100, 100, 100, 100, 100, 100, 100, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 100, 100, 100, 100, 105, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }, { 15, 100, 100, 100, 100, 100, 100, 100, 100, 100, -85, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 104, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 105, 100, 100, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 100, 100, 100, 100, 100, 100, 100, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 109, 105, 105, 105, 105, 105, 105, 100, 100, 100, 100, 105, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }, { 15, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, 110, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, 111, -86, -86, -86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, 91, 91, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, 91, 91, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86 }, { 15, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, 87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, 88, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87 }, { 15, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, 112, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, 113, -88, 113, 114, -88, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88 }, { 15, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, 110, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, 111, -89, -89, -89, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, 91, 91, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, 91, 91, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89 }, { 15, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, 87, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, 88, -90, 89, -90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, 91, 91, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, 91, 91, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90 }, { 15, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, 117, -91, 117, -91, -91, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91 }, { 15, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, 65, 65, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, 65, 65, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92 }, { 15, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, 62, -93, 119, 120, 120, 120, 120, 120, 120, 120, 120, 120, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, 65, 65, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, 65, 65, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93 }, { 15, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, 62, -94, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, 65, 65, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, 65, 65, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94 }, { 15, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, 62, -95, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, 65, 65, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, 65, 65, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95 }, { 15, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96 }, { 15, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97 }, { 15, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, 62, -98, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, 65, 65, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, 65, 65, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98 }, { 15, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99 }, { 15, 124, 124, 124, 124, 124, 124, 124, 124, 124, -100, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124 }, { 15, 124, 124, 124, 124, 124, 124, 124, 124, 124, -101, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 125, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124 }, { 15, 124, 124, 124, 124, 124, 124, 124, 124, 124, -102, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 126, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124 }, { 15, 124, 124, 124, 124, 124, 124, 124, 124, 124, -103, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 127, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124 }, { 15, 124, 124, 124, 124, 124, 124, 124, 124, 124, -104, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 128, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124 }, { 15, 124, 124, 124, 124, 124, 124, 124, 124, 124, -105, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 129, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 130, 124, 124, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 124, 124, 124, 124, 124, 124, 124, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 124, 124, 124, 124, 130, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124 }, { 15, 124, 124, 124, 124, 124, 124, 124, 124, 124, -106, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 129, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 130, 124, 124, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 124, 124, 124, 124, 124, 124, 124, 130, 130, 130, 130, 131, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 124, 124, 124, 124, 130, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124 }, { 15, 124, 124, 124, 124, 124, 124, 124, 124, 124, -107, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 129, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 130, 124, 124, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 124, 124, 124, 124, 124, 124, 124, 130, 130, 130, 130, 130, 130, 130, 130, 132, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 124, 124, 124, 124, 130, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124 }, { 15, 124, 124, 124, 124, 124, 124, 124, 124, 124, -108, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 133, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124 }, { 15, 124, 124, 124, 124, 124, 124, 124, 124, 124, -109, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 129, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 130, 124, 124, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 124, 124, 124, 124, 124, 124, 124, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 134, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 124, 124, 124, 124, 130, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124 }, { 15, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, 110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, 111, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110 }, { 15, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, 135, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, 136, -111, 136, 114, -111, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111 }, { 15, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, 112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, 113, -112, 113, 114, -112, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112 }, { 15, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, 114, -113, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113 }, { 15, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114 }, { 15, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, 139, -115, -115, -115, -115, -115, -115, -115, -115, 140, -115, -115, -115, -115, 141, -115, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, 143, 143, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, 143, 143, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115 }, { 15, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, 110, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, 111, -116, -116, -116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, 91, 91, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, 91, 91, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116 }, { 15, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117 }, { 15, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, 110, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, 111, -118, -118, -118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118 }, { 15, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 62, -119, 144, 145, 145, 145, 145, 145, 145, 145, 145, 145, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 65, 65, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 65, 65, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119 }, { 15, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, 62, -120, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, 65, 65, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, 65, 65, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120 }, { 15, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, 62, -121, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, 65, 65, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, 65, 65, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121 }, { 15, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, 62, -122, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, 65, 65, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, 65, 65, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122 }, { 15, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, 62, -123, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, 65, 65, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, 65, 65, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123 }, { 15, 150, 150, 150, 150, 150, 150, 150, 150, 150, -124, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 }, { 15, 150, 150, 150, 150, 150, 150, 150, 150, 150, -125, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 }, { 15, 150, 150, 150, 150, 150, 150, 150, 150, 150, -126, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 152, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 }, { 15, 150, 150, 150, 150, 150, 150, 150, 150, 150, -127, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 153, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 }, { 15, 150, 150, 150, 150, 150, 150, 150, 150, 150, -128, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 154, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 }, { 15, 150, 150, 150, 150, 150, 150, 150, 150, 150, -129, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 155, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 }, { 15, 150, 150, 150, 150, 150, 150, 150, 150, 150, -130, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 156, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 157, 150, 150, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 150, 150, 150, 150, 150, 150, 150, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 150, 150, 150, 150, 157, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 }, { 15, 150, 150, 150, 150, 150, 150, 150, 150, 150, -131, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 156, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 157, 150, 150, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 150, 150, 150, 150, 150, 150, 150, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 150, 150, 150, 150, 157, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 }, { 15, 150, 150, 150, 150, 150, 150, 150, 150, 150, -132, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 156, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 157, 150, 150, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 150, 150, 150, 150, 150, 150, 150, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 159, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 150, 150, 150, 150, 157, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 }, { 15, 150, 150, 150, 150, 150, 150, 150, 150, 150, -133, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 160, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 }, { 15, 150, 150, 150, 150, 150, 150, 150, 150, 150, -134, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 156, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 157, 150, 150, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 150, 150, 150, 150, 150, 150, 150, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 161, 157, 157, 157, 157, 157, 157, 157, 157, 150, 150, 150, 150, 157, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 }, { 15, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 136, -135, 136, 114, -135, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135 }, { 15, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, 114, -136, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136 }, { 15, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, 162, -137, -137, -137, -137, -137, -137, -137, -137, 163, -137, -137, -137, -137, 141, -137, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, 143, 143, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, 143, 143, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137 }, { 15, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, 162, -138, -138, -138, -138, -138, -138, -138, -138, 163, -138, -138, -138, -138, -138, -138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, 143, 143, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, 143, 143, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138 }, { 15, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, 139, -139, -139, -139, -139, -139, -139, -139, -139, 140, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139 }, { 15, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140 }, { 15, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, 162, -141, -141, -141, -141, -141, -141, -141, -141, 163, -141, -141, -141, -141, -141, -141, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, 143, 143, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, 143, 143, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141 }, { 15, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, 139, -142, -142, -142, -142, -142, -142, -142, -142, 140, -142, -142, -142, -142, 141, -142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, 143, 143, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, 143, 143, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142 }, { 15, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, 166, -143, 166, -143, -143, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143 }, { 15, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, 62, -144, 168, 169, 169, 169, 169, 169, 169, 169, 169, 169, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, 65, 65, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, 65, 65, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144 }, { 15, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, 62, -145, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, 65, 65, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, 65, 65, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145 }, { 15, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, 62, -146, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, 65, 65, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, 65, 65, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146 }, { 15, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, 62, -147, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, 65, 65, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, 65, 65, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147 }, { 15, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, 62, -148, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, 65, 65, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, 65, 65, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148 }, { 15, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, 62, -149, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, 65, 65, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, 65, 65, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149 }, { 15, 175, 175, 175, 175, 175, 175, 175, 175, 175, -150, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175 }, { 15, 175, 175, 175, 175, 175, 175, 175, 175, 175, -151, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 176, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175 }, { 15, 175, 175, 175, 175, 175, 175, 175, 175, 175, -152, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 177, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175 }, { 15, 175, 175, 175, 175, 175, 175, 175, 175, 175, -153, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 178, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175 }, { 15, 175, 175, 175, 175, 175, 175, 175, 175, 175, -154, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 179, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175 }, { 15, 175, 175, 175, 175, 175, 175, 175, 175, 175, -155, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 180, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175 }, { 15, 175, 175, 175, 175, 175, 175, 175, 175, 175, -156, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 181, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175 }, { 15, 175, 175, 175, 175, 175, 175, 175, 175, 175, -157, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 182, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 183, 175, 175, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 175, 175, 175, 175, 175, 175, 175, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 175, 175, 175, 175, 183, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175 }, { 15, 175, 175, 175, 175, 175, 175, 175, 175, 175, -158, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 182, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 183, 175, 175, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 175, 175, 175, 175, 175, 175, 175, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 184, 183, 183, 183, 183, 183, 183, 175, 175, 175, 175, 183, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175 }, { 15, 175, 175, 175, 175, 175, 175, 175, 175, 175, -159, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 182, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 183, 175, 175, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 175, 175, 175, 175, 175, 175, 175, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 185, 183, 183, 183, 183, 183, 175, 175, 175, 175, 183, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175 }, { 15, 175, 175, 175, 175, 175, 175, 175, 175, 175, -160, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 186, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175 }, { 15, 175, 175, 175, 175, 175, 175, 175, 175, 175, -161, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 182, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 183, 175, 175, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 175, 175, 175, 175, 175, 175, 175, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 184, 183, 175, 175, 175, 175, 183, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175 }, { 15, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, 162, -162, -162, -162, -162, -162, -162, -162, -162, 163, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162 }, { 15, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163 }, { 15, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, 162, -164, -164, -164, -164, -164, -164, -164, -164, 163, -164, -164, -164, -164, 141, -164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, 143, 143, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, 143, 143, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164 }, { 15, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, 162, -165, -165, -165, -165, -165, -165, -165, -165, 163, -165, -165, -165, -165, -165, -165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, 143, 143, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, 143, 143, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165 }, { 15, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166 }, { 15, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, 162, -167, -167, -167, -167, -167, -167, -167, -167, 163, -167, -167, -167, -167, -167, -167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167 }, { 15, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, 62, -168, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, 65, 65, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, 65, 65, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168 }, { 15, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, 62, -169, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, 65, 65, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, 65, 65, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169 }, { 15, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, 62, -170, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, 65, 65, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, 65, 65, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170 }, { 15, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, 62, -171, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, 65, 65, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, 65, 65, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171 }, { 15, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, 62, -172, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, 65, 65, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, 65, 65, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172 }, { 15, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, 62, -173, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, 65, 65, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, 65, 65, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173 }, { 15, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, 62, -174, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, 65, 65, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, 65, 65, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174 }, { 15, 195, 195, 195, 195, 195, 195, 195, 195, 195, -175, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195 }, { 15, 195, 195, 195, 195, 195, 195, 195, 195, 195, -176, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 196, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195 }, { 15, 195, 195, 195, 195, 195, 195, 195, 195, 195, -177, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 197, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195 }, { 15, 195, 195, 195, 195, 195, 195, 195, 195, 195, -178, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 197, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195 }, { 15, 195, 195, 195, 195, 195, 195, 195, 195, 195, -179, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 197, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195 }, { 15, 195, 195, 195, 195, 195, 195, 195, 195, 195, -180, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 197, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195 }, { 15, 195, 195, 195, 195, 195, 195, 195, 195, 195, -181, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 197, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195 }, { 15, 195, 195, 195, 195, 195, 195, 195, 195, 195, -182, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 197, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195 }, { 15, 195, 195, 195, 195, 195, 195, 195, 195, 195, -183, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 198, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 197, 195, 195, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 195, 195, 195, 195, 195, 195, 195, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 195, 195, 195, 195, 197, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195 }, { 15, 195, 195, 195, 195, 195, 195, 195, 195, 195, -184, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 198, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 197, 195, 195, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 195, 195, 195, 195, 195, 195, 195, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 195, 195, 195, 195, 197, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195 }, { 15, 195, 195, 195, 195, 195, 195, 195, 195, 195, -185, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 198, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 197, 195, 195, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 195, 195, 195, 195, 195, 195, 195, 197, 197, 197, 197, 199, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 195, 195, 195, 195, 197, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195 }, { 15, 195, 195, 195, 195, 195, 195, 195, 195, 195, -186, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 200, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195 }, { 15, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, 62, -187, 201, 202, 202, 202, 202, 202, 202, 202, 202, 202, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, 65, 65, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, 65, 65, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187 }, { 15, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, 62, -188, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, 65, 65, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, 65, 65, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188 }, { 15, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, 62, -189, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, 65, 65, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, 65, 65, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189 }, { 15, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, 62, -190, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, 65, 65, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, 65, 65, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190 }, { 15, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, 62, -191, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, 65, 65, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, 65, 65, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191 }, { 15, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, 62, -192, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, 65, 65, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, 65, 65, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192 }, { 15, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, 62, -193, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, 65, 65, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, 65, 65, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193 }, { 15, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, 62, -194, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, 65, 65, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, 65, 65, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194 }, { 15, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, 210, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195 }, { 15, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, 211, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, 210, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196 }, { 15, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, 212, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197 }, { 15, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, 212, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198 }, { 15, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, 213, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, 212, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199 }, { 15, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, 214, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, 215, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200 }, { 15, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, 62, -201, 216, 217, 217, 217, 217, 217, 217, 217, 217, 217, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, 65, 65, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, 65, 65, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201 }, { 15, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, 62, -202, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, 65, 65, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, 65, 65, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202 }, { 15, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, 62, -203, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, 65, 65, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, 65, 65, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203 }, { 15, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, 62, -204, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, 65, 65, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, 65, 65, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204 }, { 15, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, 62, -205, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, 65, 65, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, 65, 65, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205 }, { 15, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, 62, -206, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, 65, 65, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, 65, 65, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206 }, { 15, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, 62, -207, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, 65, 65, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, 65, 65, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207 }, { 15, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, 62, -208, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, 65, 65, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, 65, 65, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208 }, { 15, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, 62, -209, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, 65, 65, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, 65, 65, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209 }, { 15, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, 226, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210 }, { 15, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, 227, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211 }, { 15, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, 228, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212 }, { 15, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, 229, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213 }, { 15, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, 230, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214 }, { 15, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 231, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215 }, { 15, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, 62, -216, 232, 233, 233, 233, 233, 233, 233, 233, 233, 233, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, 65, 65, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, 65, 65, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216 }, { 15, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, 62, -217, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, 65, 65, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, 65, 65, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217 }, { 15, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, 62, -218, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, 65, 65, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, 65, 65, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218 }, { 15, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, 62, -219, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, 65, 65, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, 65, 65, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219 }, { 15, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, 62, -220, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, 65, 65, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, 65, 65, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220 }, { 15, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, 62, -221, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, 65, 65, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, 65, 65, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221 }, { 15, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, 62, -222, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, 65, 65, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, 65, 65, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222 }, { 15, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, 62, -223, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, 65, 65, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, 65, 65, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223 }, { 15, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, 62, -224, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, 65, 65, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, 65, 65, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224 }, { 15, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, 62, -225, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, 65, 65, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, 65, 65, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225 }, { 15, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, 226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226 }, { 15, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, 243, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227 }, { 15, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, 228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228 }, { 15, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, 213, -229, -229, -229, -229, -229, -229, 244, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229 }, { 15, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, 245, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230 }, { 15, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, 231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231 }, { 15, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, 62, -232, 246, 247, 247, 247, 247, 247, 247, 247, 247, 247, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, 65, 65, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, 65, 65, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232 }, { 15, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, 62, -233, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, 65, 65, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, 65, 65, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233 }, { 15, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, 62, -234, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, 65, 65, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, 65, 65, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234 }, { 15, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, 62, -235, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, 65, 65, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, 65, 65, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235 }, { 15, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, 62, -236, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, 65, 65, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, 65, 65, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236 }, { 15, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, 62, -237, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, 65, 65, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, 65, 65, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237 }, { 15, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, 62, -238, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, 65, 65, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, 65, 65, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238 }, { 15, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, 62, -239, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, 65, 65, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, 65, 65, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239 }, { 15, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, 62, -240, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, 65, 65, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, 65, 65, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240 }, { 15, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, 62, -241, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, 65, 65, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, 65, 65, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241 }, { 15, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, 62, -242, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, 65, 65, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, 65, 65, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242 }, { 15, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, 258, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243 }, { 15, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 260, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259 }, { 15, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, 261, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245 }, { 15, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, 62, -246, 262, 263, 263, 263, 263, 263, 263, 263, 263, 263, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, 65, 65, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, 65, 65, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246 }, { 15, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, 62, -247, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, 65, 65, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, 65, 65, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247 }, { 15, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, 62, -248, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, 65, 65, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, 65, 65, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248 }, { 15, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, 62, -249, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, 65, 65, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, 65, 65, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249 }, { 15, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, 62, -250, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, 65, 65, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, 65, 65, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250 }, { 15, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, 62, -251, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, 65, 65, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, 65, 65, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251 }, { 15, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, 62, -252, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, 65, 65, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, 65, 65, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252 }, { 15, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, 62, -253, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, 65, 65, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, 65, 65, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253 }, { 15, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, 62, -254, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, 65, 65, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, 65, 65, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254 }, { 15, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, 62, -255, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, 65, 65, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, 65, 65, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255 }, { 15, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, 62, -256, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, 65, 65, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, 65, 65, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256 }, { 15, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, 62, -257, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, 65, 65, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, 65, 65, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257 }, { 15, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, 275, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258 }, { 15, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 260, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259 }, { 15, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, 259, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260 }, { 15, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, 276, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261 }, { 15, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, 62, -262, 277, 278, 278, 278, 278, 278, 278, 278, 278, 278, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, 65, 65, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, 65, 65, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262 }, { 15, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, 62, -263, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, 65, 65, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, 65, 65, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263 }, { 15, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, 62, -264, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, 65, 65, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, 65, 65, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264 }, { 15, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, 62, -265, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, 65, 65, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, 65, 65, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265 }, { 15, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, 62, -266, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, 65, 65, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, 65, 65, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266 }, { 15, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, 62, -267, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, 65, 65, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, 65, 65, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267 }, { 15, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, 62, -268, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, 65, 65, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, 65, 65, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268 }, { 15, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, 62, -269, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, 65, 65, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, 65, 65, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269 }, { 15, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, 62, -270, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, 65, 65, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, 65, 65, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270 }, { 15, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, 62, -271, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, 65, 65, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, 65, 65, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271 }, { 15, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, 62, -272, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, 65, 65, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, 65, 65, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272 }, { 15, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, 62, -273, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, 65, 65, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, 65, 65, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273 }, { 15, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, 62, -274, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, 65, 65, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, 65, 65, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274 }, { 15, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, 291, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275 }, { 15, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, 292, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276 }, { 15, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, 62, -277, 293, 294, 294, 294, 294, 294, 294, 294, 294, 294, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, 65, 65, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, 65, 65, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277 }, { 15, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, 62, -278, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, 65, 65, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, 65, 65, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278 }, { 15, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, 62, -279, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, 65, 65, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, 65, 65, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279 }, { 15, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, 62, -280, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, 65, 65, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, 65, 65, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280 }, { 15, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, 62, -281, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, 65, 65, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, 65, 65, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281 }, { 15, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, 62, -282, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, 65, 65, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, 65, 65, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282 }, { 15, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, 62, -283, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, 65, 65, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, 65, 65, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283 }, { 15, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, 62, -284, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, 65, 65, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, 65, 65, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284 }, { 15, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, 62, -285, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, 65, 65, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, 65, 65, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285 }, { 15, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, 62, -286, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, 65, 65, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, 65, 65, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286 }, { 15, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, 62, -287, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, 65, 65, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, 65, 65, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287 }, { 15, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, 62, -288, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, 65, 65, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, 65, 65, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288 }, { 15, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, 62, -289, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, 65, 65, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, 65, 65, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289 }, { 15, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, 62, -290, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, 65, 65, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, 65, 65, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290 }, { 15, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, 308, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291 }, { 15, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, 309, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292 }, { 15, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, 62, -293, 310, 311, 311, 311, 311, 311, 311, 311, 311, 311, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, 65, 65, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, 65, 65, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293 }, { 15, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, 62, -294, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, 65, 65, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, 65, 65, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294 }, { 15, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, 62, -295, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, 65, 65, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, 65, 65, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295 }, { 15, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, 62, -296, 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, 65, 65, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, 65, 65, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296 }, { 15, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, 62, -297, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, 65, 65, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, 65, 65, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297 }, { 15, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, 62, -298, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, 65, 65, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, 65, 65, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298 }, { 15, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, 62, -299, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, 65, 65, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, 65, 65, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299 }, { 15, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, 62, -300, 318, 318, 318, 318, 318, 318, 318, 318, 318, 318, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, 65, 65, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, 65, 65, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300 }, { 15, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, 62, -301, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, 65, 65, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, 65, 65, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301 }, { 15, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, 62, -302, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, 65, 65, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, 65, 65, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302 }, { 15, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, 62, -303, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, 65, 65, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, 65, 65, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303 }, { 15, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, 62, -304, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, 65, 65, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, 65, 65, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304 }, { 15, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, 62, -305, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, 65, 65, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, 65, 65, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305 }, { 15, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, 62, -306, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, 65, 65, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, 65, 65, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306 }, { 15, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, 62, -307, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, 65, 65, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, 65, 65, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307 }, { 15, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, 326, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308 }, { 15, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, 327, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309 }, { 15, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, 62, -310, 328, 329, 329, 329, 329, 329, 329, 329, 329, 329, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, 65, 65, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, 65, 65, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310 }, { 15, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, 62, -311, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, 65, 65, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, 65, 65, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311 }, { 15, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, 62, -312, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, 65, 65, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, 65, 65, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312 }, { 15, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, 62, -313, 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, 65, 65, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, 65, 65, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313 }, { 15, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, 62, -314, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, 65, 65, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, 65, 65, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314 }, { 15, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, 62, -315, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, 65, 65, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, 65, 65, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315 }, { 15, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, 62, -316, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, 65, 65, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, 65, 65, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316 }, { 15, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, 62, -317, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, 65, 65, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, 65, 65, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317 }, { 15, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, 62, -318, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, 65, 65, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, 65, 65, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318 }, { 15, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, 62, -319, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, 65, 65, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, 65, 65, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319 }, { 15, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, 62, -320, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, 65, 65, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, 65, 65, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320 }, { 15, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, 62, -321, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, 65, 65, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, 65, 65, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321 }, { 15, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, 62, -322, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, 65, 65, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, 65, 65, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322 }, { 15, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, 62, -323, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, 65, 65, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, 65, 65, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323 }, { 15, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, 62, -324, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, 65, 65, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, 65, 65, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324 }, { 15, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, 62, -325, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, 65, 65, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, 65, 65, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325 }, { 15, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, 345, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326 }, { 15, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, 346, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327 }, { 15, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, 62, -328, 347, 348, 348, 348, 348, 348, 348, 348, 348, 348, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, 65, 65, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, 65, 65, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328 }, { 15, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, 62, -329, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, 65, 65, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, 65, 65, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329 }, { 15, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, 62, -330, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, 65, 65, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, 65, 65, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330 }, { 15, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, 62, -331, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, 65, 65, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, 65, 65, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331 }, { 15, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, 62, -332, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, 65, 65, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, 65, 65, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332 }, { 15, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, 62, -333, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, 65, 65, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, 65, 65, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333 }, { 15, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, 62, -334, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, 65, 65, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, 65, 65, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334 }, { 15, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, 62, -335, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, 65, 65, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, 65, 65, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335 }, { 15, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, 62, -336, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, 65, 65, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, 65, 65, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336 }, { 15, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, 62, -337, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, 65, 65, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, 65, 65, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337 }, { 15, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, 62, -338, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, 65, 65, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, 65, 65, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338 }, { 15, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, 62, -339, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, 65, 65, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, 65, 65, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339 }, { 15, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, 62, -340, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, 65, 65, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, 65, 65, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340 }, { 15, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, 62, -341, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, 65, 65, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, 65, 65, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341 }, { 15, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, 62, -342, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, 65, 65, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, 65, 65, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342 }, { 15, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, 62, -343, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, 65, 65, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, 65, 65, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343 }, { 15, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, 62, -344, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, 65, 65, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, 65, 65, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344 }, { 15, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, 365, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345 }, { 15, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, 366, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346 }, { 15, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, 62, -347, 367, 368, 368, 368, 368, 368, 368, 368, 368, 368, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, 65, 65, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, 65, 65, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347 }, { 15, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, 62, -348, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, 65, 65, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, 65, 65, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348 }, { 15, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, 62, -349, 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, 65, 65, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, 65, 65, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349 }, { 15, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, 62, -350, 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, 65, 65, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, 65, 65, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350 }, { 15, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, 62, -351, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, 65, 65, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, 65, 65, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351 }, { 15, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, 62, -352, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, 65, 65, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, 65, 65, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352 }, { 15, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, 62, -353, 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, 65, 65, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, 65, 65, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353 }, { 15, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, 62, -354, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, 65, 65, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, 65, 65, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354 }, { 15, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, 62, -355, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, 65, 65, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, 65, 65, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355 }, { 15, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, 62, -356, 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, 65, 65, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, 65, 65, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356 }, { 15, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, 62, -357, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, 65, 65, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, 65, 65, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357 }, { 15, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, 62, -358, 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, 65, 65, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, 65, 65, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358 }, { 15, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, 62, -359, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, 65, 65, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, 65, 65, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359 }, { 15, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, 62, -360, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, 65, 65, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, 65, 65, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360 }, { 15, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, 62, -361, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, 65, 65, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, 65, 65, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361 }, { 15, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, 62, -362, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, 65, 65, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, 65, 65, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362 }, { 15, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, 62, -363, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, 65, 65, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, 65, 65, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363 }, { 15, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, 62, -364, 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, 65, 65, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, 65, 65, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364 }, { 15, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, 386, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365 }, { 15, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, 387, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366 }, { 15, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, 62, -367, 388, 389, 389, 389, 389, 389, 389, 389, 389, 389, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, 65, 65, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, 65, 65, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367 }, { 15, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, 62, -368, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, 65, 65, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, 65, 65, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368 }, { 15, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, 62, -369, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, 65, 65, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, 65, 65, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369 }, { 15, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, 62, -370, 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, 65, 65, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, 65, 65, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370 }, { 15, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, 62, -371, 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, 65, 65, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, 65, 65, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371 }, { 15, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, 62, -372, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, 65, 65, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, 65, 65, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372 }, { 15, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, 62, -373, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, 65, 65, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, 65, 65, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373 }, { 15, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, 62, -374, 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, 65, 65, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, 65, 65, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374 }, { 15, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, 62, -375, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, 65, 65, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, 65, 65, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375 }, { 15, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, 62, -376, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, 65, 65, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, 65, 65, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376 }, { 15, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, 62, -377, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, 65, 65, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, 65, 65, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377 }, { 15, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, 62, -378, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, 65, 65, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, 65, 65, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378 }, { 15, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, 62, -379, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, 65, 65, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, 65, 65, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379 }, { 15, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, 62, -380, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, 65, 65, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, 65, 65, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380 }, { 15, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, 62, -381, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, 65, 65, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, 65, 65, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381 }, { 15, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, 62, -382, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, 65, 65, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, 65, 65, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382 }, { 15, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, 62, -383, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, 65, 65, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, 65, 65, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383 }, { 15, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, 62, -384, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, 65, 65, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, 65, 65, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384 }, { 15, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, 62, -385, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, 65, 65, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, 65, 65, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385 }, { 15, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, 408, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386 }, { 15, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, 409, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387 }, { 15, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, 62, -388, 410, 411, 411, 411, 411, 411, 411, 411, 411, 411, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, 65, 65, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, 65, 65, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388 }, { 15, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, 62, -389, 412, 412, 412, 412, 412, 412, 412, 412, 412, 412, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, 65, 65, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, 65, 65, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389 }, { 15, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, 62, -390, 413, 413, 413, 413, 413, 413, 413, 413, 413, 413, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, 65, 65, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, 65, 65, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390 }, { 15, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, 62, -391, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, 65, 65, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, 65, 65, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391 }, { 15, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, 62, -392, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, 65, 65, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, 65, 65, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392 }, { 15, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, 62, -393, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, 65, 65, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, 65, 65, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393 }, { 15, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, 62, -394, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, 65, 65, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, 65, 65, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394 }, { 15, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, 62, -395, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, 65, 65, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, 65, 65, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395 }, { 15, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, 62, -396, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, 65, 65, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, 65, 65, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396 }, { 15, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, 62, -397, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, 65, 65, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, 65, 65, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397 }, { 15, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, 62, -398, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, 65, 65, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, 65, 65, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398 }, { 15, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, 62, -399, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, 65, 65, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, 65, 65, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399 }, { 15, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, 62, -400, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, 65, 65, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, 65, 65, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400 }, { 15, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, 62, -401, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, 65, 65, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, 65, 65, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401 }, { 15, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, 62, -402, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, 65, 65, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, 65, 65, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402 }, { 15, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, 62, -403, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, 65, 65, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, 65, 65, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403 }, { 15, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, 62, -404, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, 65, 65, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, 65, 65, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404 }, { 15, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, 62, -405, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, 65, 65, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, 65, 65, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405 }, { 15, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, 62, -406, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, 65, 65, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, 65, 65, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406 }, { 15, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, 62, -407, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, 65, 65, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, 65, 65, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407 }, { 15, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, 431, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408 }, { 15, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, 432, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409 }, { 15, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, 62, -410, 410, 411, 411, 411, 411, 411, 411, 411, 411, 411, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, 65, 65, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, 65, 65, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410 }, { 15, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, 62, -411, 412, 412, 412, 412, 412, 412, 412, 412, 412, 412, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, 65, 65, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, 65, 65, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411 }, { 15, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, 62, -412, 413, 413, 413, 413, 413, 413, 413, 413, 413, 413, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, 65, 65, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, 65, 65, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412 }, { 15, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 62, -413, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 65, 65, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 65, 65, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413 }, { 15, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, 62, -414, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, 65, 65, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, 65, 65, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414 }, { 15, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, 62, -415, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, 65, 65, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, 65, 65, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415 }, { 15, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, 62, -416, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, 65, 65, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, 65, 65, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416 }, { 15, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, 62, -417, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, 65, 65, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, 65, 65, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417 }, { 15, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, 62, -418, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, 65, 65, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, 65, 65, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418 }, { 15, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, 62, -419, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, 65, 65, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, 65, 65, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419 }, { 15, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, 62, -420, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, 65, 65, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, 65, 65, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420 }, { 15, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, 62, -421, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, 65, 65, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, 65, 65, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421 }, { 15, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, 62, -422, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, 65, 65, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, 65, 65, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422 }, { 15, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, 62, -423, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, 65, 65, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, 65, 65, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423 }, { 15, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, 62, -424, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, 65, 65, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, 65, 65, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424 }, { 15, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, 62, -425, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, 65, 65, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, 65, 65, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425 }, { 15, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, 62, -426, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, 65, 65, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, 65, 65, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426 }, { 15, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, 62, -427, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, 65, 65, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, 65, 65, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427 }, { 15, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, 62, -428, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, 65, 65, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, 65, 65, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428 }, { 15, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, 62, -429, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, 65, 65, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, 65, 65, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429 }, { 15, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, 62, -430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, 65, 65, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, 65, 65, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430 }, { 15, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, 433, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431 }, { 15, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, 434, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432 }, { 15, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, 435, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433 }, { 15, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, 436, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434 }, { 15, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, 437, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435 }, { 15, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, 438, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436 }, { 15, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, 439, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437 }, { 15, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, 440, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438 }, { 15, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, 441, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439 }, { 15, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, 442, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440 }, { 15, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, 443, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441 }, { 15, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, 444, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442 }, { 15, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, 445, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443 }, { 15, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, 446, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444 }, { 15, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, 447, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445 }, { 15, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, 448, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446 }, { 15, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, 449, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447 }, { 15, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, 450, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448 }, { 15, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, 451, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449 }, { 15, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, 452, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450 }, { 15, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, 453, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451 }, { 15, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, 454, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452 }, { 15, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, 455, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453 }, { 15, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, 456, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454 }, { 15, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, 457, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455 }, { 15, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, 458, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456 }, { 15, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, 459, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457 }, { 15, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, 460, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458 }, { 15, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, 461, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459 }, { 15, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, 462, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460 }, { 15, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, 463, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461 }, { 15, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, 464, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462 }, { 15, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, 465, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463 }, { 15, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, 466, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464 }, { 15, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, 467, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465 }, { 15, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, 468, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466 }, { 15, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, 469, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467 }, { 15, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, 470, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468 }, { 15, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, 471, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469 }, { 15, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, 472, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470 }, { 15, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, 473, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471 }, { 15, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, 474, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472 }, { 15, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, 475, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473 }, { 15, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, 476, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474 }, { 15, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, 477, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475 }, { 15, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, 478, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476 }, { 15, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, 479, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477 }, { 15, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, 480, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478 }, { 15, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, 481, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479 }, { 15, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, 482, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480 }, { 15, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, 483, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481 }, { 15, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, 484, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482 }, { 15, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, 485, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483 }, { 15, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, 486, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484 }, { 15, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, 487, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485 }, { 15, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, 488, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486 }, { 15, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, 489, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487 }, { 15, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, 490, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488 }, { 15, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, 491, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489 }, { 15, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, 492, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490 }, { 15, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, 493, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491 }, { 15, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, 494, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492 }, { 15, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, 495, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493 }, { 15, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, 496, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494 }, { 15, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, 497, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495 }, { 15, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, 498, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496 }, { 15, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, 499, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497 }, { 15, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, 500, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498 }, { 15, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, 501, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499 }, { 15, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, 502, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500 }, { 15, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, 503, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501 }, { 15, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, 504, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502 }, { 15, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, 505, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503 }, { 15, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, 506, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504 }, { 15, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, 507, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505 }, { 15, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, 508, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506 }, { 15, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, 509, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507 }, { 15, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, 510, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508 }, { 15, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, 511, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509 }, { 15, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, 512, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510 }, { 15, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, 513, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511 }, { 15, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, 514, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512 }, { 15, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, 515, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513 }, { 15, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, 516, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514 }, { 15, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, 517, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515 }, { 15, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, 518, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516 }, { 15, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, 519, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517 }, { 15, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, 520, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518 }, { 15, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, 521, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519 }, { 15, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, 522, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520 }, { 15, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, 523, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521 }, { 15, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, 524, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522 }, { 15, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, 525, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523 }, { 15, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, 526, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524 }, { 15, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, 527, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525 }, { 15, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, 528, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526 }, { 15, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, 529, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527 }, { 15, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, 530, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528 }, { 15, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, 531, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529 }, { 15, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, 532, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530 }, { 15, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, 533, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531 }, { 15, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, 534, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532 }, { 15, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, 535, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533 }, { 15, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, 536, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534 }, { 15, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, 537, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535 }, { 15, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, 538, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536 }, { 15, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, 539, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537 }, { 15, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, 540, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538 }, { 15, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, 541, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539 }, { 15, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, 542, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540 }, { 15, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, 543, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541 }, { 15, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, 544, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542 }, { 15, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, 545, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543 }, { 15, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, 546, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544 }, { 15, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, 547, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545 }, { 15, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, 548, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546 }, { 15, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, 549, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547 }, { 15, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, 550, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548 }, { 15, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549 }, { 15, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550 }, } ; static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up fitshdrtext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ (yytext_ptr) -= (yy_more_len); \ fitshdrleng = (size_t) (yy_cp - (yytext_ptr)); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 31 #define YY_END_OF_BUFFER 32 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[551] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 29, 29, 0, 0, 32, 31, 31, 31, 31, 31, 31, 31, 20, 20, 20, 20, 20, 20, 11, 13, 13, 12, 25, 21, 24, 23, 27, 27, 28, 29, 31, 30, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 19, 0, 0, 0, 0, 0, 13, 13, 16, 16, 13, 13, 0, 13, 21, 0, 23, 22, 23, 0, 28, 29, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 13, 13, 13, 0, 16, 13, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 13, 13, 13, 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 13, 13, 13, 13, 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 10, 2, 8, 8, 8, 5, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 0, 0, 0, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 9, 0, 6, 0, 0, 4, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 0, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 0, 0, 7, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; static yyconst yy_state_type yy_NUL_trans[551] = { 0, 16, 17, 23, 23, 33, 33, 37, 37, 39, 39, 40, 40, 41, 41, 0, 0, 43, 43, 43, 43, 43, 43, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 74, 75, 0, 77, 77, 77, 77, 77, 77, 77, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 74, 75, 0, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ; extern int fitshdr_flex_debug; int fitshdr_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected static int yy_more_flag = 0; static int yy_more_len = 0; #define yymore() ((yy_more_flag) = 1) #define YY_MORE_ADJ (yy_more_len) #define YY_RESTORE_YY_MORE_OFFSET char *fitshdrtext; #line 1 "fitshdr.l" /*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: fitshdr.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * fitshdr.l is a Flex description file containing a lexical scanner * definition for extracting keywords and keyvalues from a FITS header. * * It requires Flex v2.5.4 or later. * * Refer to fitshdr.h for a description of the user interface and operating * notes. * *===========================================================================*/ /* Options. */ /* Keywords. */ /* Keyvalue data types. */ /* Characters forming standard unit strings (jwBIQX are not used). */ /* Exclusive start states. */ #line 76 "fitshdr.l" #include #include #include #include #include #include "fitshdr.h" #include "wcsutil.h" #define YY_DECL int fitshdr(const char header[], int nkeyrec, int nkeyids, \ struct fitskeyid keyids[], int *nreject, \ struct fitskey **keys) #define YY_INPUT(inbuff, count, bufsize) \ { \ if (fitshdr_nkeyrec) { \ strncpy(inbuff, fitshdr_hdr, 80); \ inbuff[80] = '\n'; \ fitshdr_hdr += 80; \ fitshdr_nkeyrec--; \ count = 81; \ } else { \ count = YY_NULL; \ } \ } /* These global variables are required by YY_INPUT. */ const char *fitshdr_hdr; int fitshdr_nkeyrec; /* Used in preempting the call to exit() by yy_fatal_error(). */ jmp_buf fitshdr_abort_jmp_env; #define exit(status) longjmp(fitshdr_abort_jmp_env, status) /* Map status return value to message. */ const char *fitshdr_errmsg[] = { "Success", "Null fitskey pointer-pointer passed", "Memory allocation failed", "Fatal error returned by Flex parser"}; #line 10171 "fitshdr.c" #define INITIAL 0 #define VALUE 1 #define INLINE 2 #define UNITS 3 #define COMMENT 4 #define ERROR 5 #define FLUSH 6 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int fitshdrlex_destroy (void ); int fitshdrget_debug (void ); void fitshdrset_debug (int debug_flag ); YY_EXTRA_TYPE fitshdrget_extra (void ); void fitshdrset_extra (YY_EXTRA_TYPE user_defined ); FILE *fitshdrget_in (void ); void fitshdrset_in (FILE * in_str ); FILE *fitshdrget_out (void ); void fitshdrset_out (FILE * out_str ); yy_size_t fitshdrget_leng (void ); char *fitshdrget_text (void ); int fitshdrget_lineno (void ); void fitshdrset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int fitshdrwrap (void ); #else extern int fitshdrwrap (void ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( fitshdrtext, fitshdrleng, 1, fitshdrout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ errno=0; \ while ( (result = read( fileno(fitshdrin), (char *) buf, max_size )) < 0 ) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(fitshdrin); \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int fitshdrlex (void); #define YY_DECL int fitshdrlex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after fitshdrtext and fitshdrleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ if ( fitshdrleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (fitshdrtext[fitshdrleng - 1] == '\n'); \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! fitshdrin ) fitshdrin = stdin; if ( ! fitshdrout ) fitshdrout = stdout; if ( ! YY_CURRENT_BUFFER ) { fitshdrensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = fitshdr_create_buffer(fitshdrin,YY_BUF_SIZE ); } fitshdr_load_buffer_state( ); } { #line 119 "fitshdr.l" char *cptr, ctmp[72]; int blank, continuation, end, j, k, keyno; double dtmp; struct fitskey *kptr; struct fitskeyid *iptr; void nullfill(char cptr[], int len); int fitshdrlex_destroy(void); fitshdr_hdr = header; fitshdr_nkeyrec = nkeyrec; *nreject = 0; keyno = 0; if (keys == 0x0) { return 1; } /* Allocate memory for the required number of fitskey structs. */ /* Recall that calloc() initializes allocated memory to zero. */ if (!(kptr = *keys = calloc(nkeyrec, sizeof(struct fitskey)))) { return 2; } /* Initialize keyids[]. */ iptr = keyids; for (j = 0; j < nkeyids; j++, iptr++) { iptr->count = 0; iptr->idx[0] = -1; iptr->idx[1] = -1; } blank = 0; continuation = 0; end = 0; /* Return here via longjmp() invoked by yy_fatal_error(). */ if (setjmp(fitshdr_abort_jmp_env)) { return 3; } BEGIN(INITIAL); #line 10421 "fitshdr.c" while ( 1 ) /* loops until end-of-file is reached */ { (yy_more_len) = 0; if ( (yy_more_flag) ) { (yy_more_len) = (yy_c_buf_p) - (yytext_ptr); (yy_more_flag) = 0; } yy_cp = (yy_c_buf_p); /* Support of fitshdrtext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); yy_match: while ( (yy_current_state = yy_nxt[yy_current_state][ YY_SC_TO_UI(*yy_cp) ]) > 0 ) { if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } ++yy_cp; } yy_current_state = -yy_current_state; yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos) + 1; yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 163 "fitshdr.l" { /* A completely blank keyrecord. */ strncpy(kptr->keyword, fitshdrtext, 8); yyless(0); blank = 1; BEGIN(COMMENT); } YY_BREAK case 2: YY_RULE_SETUP #line 171 "fitshdr.l" { strncpy(kptr->keyword, fitshdrtext, 8); BEGIN(COMMENT); } YY_BREAK case 3: YY_RULE_SETUP #line 176 "fitshdr.l" { strncpy(kptr->keyword, fitshdrtext, 8); end = 1; BEGIN(FLUSH); } YY_BREAK case 4: YY_RULE_SETUP #line 182 "fitshdr.l" { /* Illegal END keyrecord. */ strncpy(kptr->keyword, fitshdrtext, 8); kptr->status |= FITSHDR_KEYREC; BEGIN(VALUE); } YY_BREAK case 5: YY_RULE_SETUP #line 189 "fitshdr.l" { /* Illegal END keyrecord. */ strncpy(kptr->keyword, fitshdrtext, 8); kptr->status |= FITSHDR_KEYREC; BEGIN(COMMENT); } YY_BREAK case 6: YY_RULE_SETUP #line 196 "fitshdr.l" { strncpy(kptr->keyword, fitshdrtext, 8); BEGIN(VALUE); } YY_BREAK case 7: /* rule 7 can match eol */ YY_RULE_SETUP #line 201 "fitshdr.l" { /* Continued string keyvalue. */ strncpy(kptr->keyword, fitshdrtext, 8); if (keyno > 0 && (kptr-1)->type%10 == 8) { /* Put back the string keyvalue. */ for (k = 10; fitshdrtext[k] != '\''; k++); yyless(k); continuation = 1; BEGIN(VALUE); } else { /* Not a valid continuation. */ yyless(8); BEGIN(COMMENT); } } YY_BREAK case 8: YY_RULE_SETUP #line 219 "fitshdr.l" { /* Keyword without value. */ strncpy(kptr->keyword, fitshdrtext, 8); BEGIN(COMMENT); } YY_BREAK case 9: YY_RULE_SETUP #line 225 "fitshdr.l" { /* Illegal keyword, carry on regardless. */ strncpy(kptr->keyword, fitshdrtext, 8); kptr->status |= FITSHDR_KEYWORD; BEGIN(VALUE); } YY_BREAK case 10: YY_RULE_SETUP #line 232 "fitshdr.l" { /* Illegal keyword, carry on regardless. */ strncpy(kptr->keyword, fitshdrtext, 8); kptr->status |= FITSHDR_KEYWORD; BEGIN(COMMENT); } YY_BREAK case 11: *yy_cp = (yy_hold_char); /* undo effects of setting up fitshdrtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up fitshdrtext again */ YY_RULE_SETUP #line 239 "fitshdr.l" { /* Null keyvalue. */ BEGIN(INLINE); } YY_BREAK case 12: YY_RULE_SETUP #line 244 "fitshdr.l" { /* Logical keyvalue. */ kptr->type = 1; kptr->keyvalue.i = (*fitshdrtext == 'T'); BEGIN(INLINE); } YY_BREAK case 13: YY_RULE_SETUP #line 251 "fitshdr.l" { /* 32-bit signed integer keyvalue. */ kptr->type = 2; if (sscanf(fitshdrtext, "%d", &(kptr->keyvalue.i)) < 1) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } BEGIN(INLINE); } YY_BREAK case 14: YY_RULE_SETUP #line 262 "fitshdr.l" { /* 64-bit signed integer keyvalue (up to 18 digits). */ if (wcsutil_str2double(fitshdrtext, "%lf", &dtmp)) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } else if (INT_MIN <= dtmp && dtmp <= INT_MAX) { /* Can be accomodated as a 32-bit signed integer. */ kptr->type = 2; if (sscanf(fitshdrtext, "%d", &(kptr->keyvalue.i)) < 1) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } } else { /* 64-bit signed integer. */ kptr->type = 3; #ifdef WCSLIB_INT64 /* Native 64-bit integer is available. */ if (sscanf(fitshdrtext, "%lld", &(kptr->keyvalue.k)) < 1) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } #else /* 64-bit integer (up to 18 digits) implemented as int[3]. */ kptr->keyvalue.k[2] = 0; sprintf(ctmp, "%%%dd%%9d", fitshdrleng-9); if (sscanf(fitshdrtext, ctmp, kptr->keyvalue.k+1, kptr->keyvalue.k) < 1) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } else if (*fitshdrtext == '-') { kptr->keyvalue.k[0] *= -1; } #endif } BEGIN(INLINE); } YY_BREAK case 15: YY_RULE_SETUP #line 303 "fitshdr.l" { /* Very long integer keyvalue (and 19-digit int64). */ kptr->type = 4; strcpy(ctmp, fitshdrtext); k = fitshdrleng; for (j = 0; j < 8; j++) { /* Read it backwards. */ k -= 9; if (k < 0) k = 0; if (sscanf(ctmp+k, "%d", kptr->keyvalue.l+j) < 1) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } if (*fitshdrtext == '-') { kptr->keyvalue.l[j] = -abs(kptr->keyvalue.l[j]); } if (k == 0) break; ctmp[k] = '\0'; } /* Can it be accomodated as a 64-bit signed integer? */ if (j == 2 && abs(kptr->keyvalue.l[2]) <= 9 && abs(kptr->keyvalue.l[1]) <= 223372036 && kptr->keyvalue.l[0] <= 854775807 && kptr->keyvalue.l[0] >= -854775808) { kptr->type = 3; #ifdef WCSLIB_INT64 /* Native 64-bit integer is available. */ kptr->keyvalue.l[2] = 0; if (sscanf(fitshdrtext, "%lld", &(kptr->keyvalue.k)) < 1) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } #endif } BEGIN(INLINE); } YY_BREAK case 16: YY_RULE_SETUP #line 344 "fitshdr.l" { /* Float keyvalue. */ kptr->type = 5; if (wcsutil_str2double(fitshdrtext, "%lf", &(kptr->keyvalue.f))) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } BEGIN(INLINE); } YY_BREAK case 17: YY_RULE_SETUP #line 355 "fitshdr.l" { /* Integer complex keyvalue. */ kptr->type = 6; if (sscanf(fitshdrtext, "(%lf,%lf)", kptr->keyvalue.c, kptr->keyvalue.c+1) < 2) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } BEGIN(INLINE); } YY_BREAK case 18: YY_RULE_SETUP #line 367 "fitshdr.l" { /* Floating point complex keyvalue. */ kptr->type = 7; for (cptr = ctmp, k = 1; fitshdrtext[k] != ','; cptr++, k++) { *cptr = fitshdrtext[k]; } *cptr = '\0'; if (wcsutil_str2double(ctmp, "%lf", kptr->keyvalue.c)) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } for (cptr = ctmp, k++; fitshdrtext[k] != ')'; cptr++, k++) { *cptr = fitshdrtext[k]; } *cptr = '\0'; if (wcsutil_str2double(ctmp, "%lf", kptr->keyvalue.c+1)) { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } BEGIN(INLINE); } YY_BREAK case 19: /* rule 19 can match eol */ YY_RULE_SETUP #line 394 "fitshdr.l" { /* String keyvalue. */ kptr->type = 8; cptr = kptr->keyvalue.s; strcpy(cptr, fitshdrtext+1); /* Squeeze out repeated quotes. */ k = 0; for (j = 0; j < 72; j++) { if (k < j) { cptr[k] = cptr[j]; } if (cptr[j] == '\0') { if (k) cptr[k-1] = '\0'; break; } else if (cptr[j] == '\'' && cptr[j+1] == '\'') { j++; } k++; } if (*cptr) { /* Retain the initial blank in all-blank strings. */ nullfill(cptr+1, 71); } else { nullfill(cptr, 72); } BEGIN(INLINE); } YY_BREAK case 20: YY_RULE_SETUP #line 427 "fitshdr.l" { kptr->status |= FITSHDR_KEYVALUE; BEGIN(ERROR); } YY_BREAK case 21: *yy_cp = (yy_hold_char); /* undo effects of setting up fitshdrtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up fitshdrtext again */ YY_RULE_SETUP #line 432 "fitshdr.l" { BEGIN(FLUSH); } YY_BREAK case 22: *yy_cp = (yy_hold_char); /* undo effects of setting up fitshdrtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up fitshdrtext again */ YY_RULE_SETUP #line 436 "fitshdr.l" { BEGIN(FLUSH); } YY_BREAK case 23: YY_RULE_SETUP #line 440 "fitshdr.l" { BEGIN(UNITS); } YY_BREAK case 24: YY_RULE_SETUP #line 444 "fitshdr.l" { kptr->status |= FITSHDR_COMMENT; BEGIN(ERROR); } YY_BREAK case 25: YY_RULE_SETUP #line 449 "fitshdr.l" { /* Keyvalue parsing must now also be suspect. */ kptr->status |= FITSHDR_COMMENT; kptr->type = 0; BEGIN(ERROR); } YY_BREAK case 26: YY_RULE_SETUP #line 456 "fitshdr.l" { kptr->ulen = fitshdrleng; yymore(); BEGIN(COMMENT); } YY_BREAK case 27: YY_RULE_SETUP #line 462 "fitshdr.l" { yymore(); BEGIN(COMMENT); } YY_BREAK case 28: YY_RULE_SETUP #line 467 "fitshdr.l" { strcpy(kptr->comment, fitshdrtext); nullfill(kptr->comment, 84); BEGIN(FLUSH); } YY_BREAK case 29: YY_RULE_SETUP #line 473 "fitshdr.l" { if (!continuation) kptr->type = -abs(kptr->type); sprintf(kptr->comment, "%.80s", fitshdr_hdr-80); kptr->comment[80] = '\0'; nullfill(kptr->comment+80, 4); BEGIN(FLUSH); } YY_BREAK case 30: /* rule 30 can match eol */ YY_RULE_SETUP #line 483 "fitshdr.l" { /* Discard the rest of the input line. */ kptr->keyno = ++keyno; /* Null-fill the keyword. */ kptr->keyword[8] = '\0'; nullfill(kptr->keyword, 12); /* Do indexing. */ iptr = keyids; kptr->keyid = -1; for (j = 0; j < nkeyids; j++, iptr++) { cptr = iptr->name; cptr[8] = '\0'; nullfill(cptr, 12); for (k = 0; k < 8; k++, cptr++) { if (*cptr != '.' && *cptr != kptr->keyword[k]) break; } if (k == 8) { /* Found a match. */ iptr->count++; if (iptr->idx[0] == -1) { iptr->idx[0] = keyno-1; } else { iptr->idx[1] = keyno-1; } kptr->keyno = -abs(kptr->keyno); if (kptr->keyid < 0) kptr->keyid = j; } } /* Deal with continued strings. */ if (continuation) { /* Tidy up the previous string keyvalue. */ if ((kptr-1)->type == 8) (kptr-1)->type += 10; cptr = (kptr-1)->keyvalue.s; if (cptr[strlen(cptr)-1] == '&') cptr[strlen(cptr)-1] = '\0'; kptr->type = (kptr-1)->type + 10; } /* Check for keyrecords following the END keyrecord. */ if (end && (end++ > 1) && !blank) { kptr->status |= FITSHDR_TRAILER; } if (kptr->status) (*nreject)++; kptr++; blank = 0; continuation = 0; BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(VALUE): case YY_STATE_EOF(INLINE): case YY_STATE_EOF(UNITS): case YY_STATE_EOF(COMMENT): case YY_STATE_EOF(ERROR): case YY_STATE_EOF(FLUSH): #line 539 "fitshdr.l" { /* End-of-input. */ fitshdrlex_destroy(); return 0; } YY_BREAK case 31: YY_RULE_SETUP #line 545 "fitshdr.l" ECHO; YY_BREAK #line 10970 "fitshdr.c" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed fitshdrin at a new source and called * fitshdrlex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = fitshdrin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( fitshdrwrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * fitshdrtext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ } /* end of fitshdrlex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ fitshdrrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; fitshdrrestart(fitshdrin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) fitshdrrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { if ( *yy_cp ) { yy_current_state = yy_nxt[yy_current_state][YY_SC_TO_UI(*yy_cp)]; } else yy_current_state = yy_NUL_trans[yy_current_state]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); yy_current_state = yy_NUL_trans[yy_current_state]; yy_is_jam = (yy_current_state == 0); if ( ! yy_is_jam ) { if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } } return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ fitshdrrestart(fitshdrin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( fitshdrwrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve fitshdrtext */ (yy_hold_char) = *++(yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void fitshdrrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ fitshdrensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = fitshdr_create_buffer(fitshdrin,YY_BUF_SIZE ); } fitshdr_init_buffer(YY_CURRENT_BUFFER,input_file ); fitshdr_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void fitshdr_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * fitshdrpop_buffer_state(); * fitshdrpush_buffer_state(new_buffer); */ fitshdrensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; fitshdr_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (fitshdrwrap()) processing, but the only time this flag * is looked at is after fitshdrwrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void fitshdr_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; fitshdrin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE fitshdr_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) fitshdralloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in fitshdr_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) fitshdralloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in fitshdr_create_buffer()" ); b->yy_is_our_buffer = 1; fitshdr_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with fitshdr_create_buffer() * */ void fitshdr_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) fitshdrfree((void *) b->yy_ch_buf ); fitshdrfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a fitshdrrestart() or at EOF. */ static void fitshdr_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; fitshdr_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then fitshdr_init_buffer was _probably_ * called from fitshdrrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void fitshdr_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) fitshdr_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void fitshdrpush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; fitshdrensure_buffer_stack(); /* This block is copied from fitshdr_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from fitshdr_switch_to_buffer. */ fitshdr_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void fitshdrpop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; fitshdr_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { fitshdr_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void fitshdrensure_buffer_stack (void) { yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)fitshdralloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in fitshdrensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)fitshdrrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in fitshdrensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE fitshdr_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) fitshdralloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in fitshdr_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; fitshdr_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to fitshdrlex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * fitshdr_scan_bytes() instead. */ YY_BUFFER_STATE fitshdr_scan_string (yyconst char * yystr ) { return fitshdr_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to fitshdrlex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE fitshdr_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) fitshdralloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in fitshdr_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = fitshdr_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in fitshdr_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up fitshdrtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ fitshdrtext[fitshdrleng] = (yy_hold_char); \ (yy_c_buf_p) = fitshdrtext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ fitshdrleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int fitshdrget_lineno (void) { return fitshdrlineno; } /** Get the input stream. * */ FILE *fitshdrget_in (void) { return fitshdrin; } /** Get the output stream. * */ FILE *fitshdrget_out (void) { return fitshdrout; } /** Get the length of the current token. * */ yy_size_t fitshdrget_leng (void) { return fitshdrleng; } /** Get the current token. * */ char *fitshdrget_text (void) { return fitshdrtext; } /** Set the current line number. * @param line_number * */ void fitshdrset_lineno (int line_number ) { fitshdrlineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see fitshdr_switch_to_buffer */ void fitshdrset_in (FILE * in_str ) { fitshdrin = in_str ; } void fitshdrset_out (FILE * out_str ) { fitshdrout = out_str ; } int fitshdrget_debug (void) { return fitshdr_flex_debug; } void fitshdrset_debug (int bdebug ) { fitshdr_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from fitshdrlex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT fitshdrin = stdin; fitshdrout = stdout; #else fitshdrin = (FILE *) 0; fitshdrout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * fitshdrlex_init() */ return 0; } /* fitshdrlex_destroy is for both reentrant and non-reentrant scanners. */ int fitshdrlex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ fitshdr_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; fitshdrpop_buffer_state(); } /* Destroy the stack itself. */ fitshdrfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * fitshdrlex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *fitshdralloc (yy_size_t size ) { return (void *) malloc( size ); } void *fitshdrrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void fitshdrfree (void * ptr ) { free( (char *) ptr ); /* see fitshdrrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 544 "fitshdr.l" /*--------------------------------------------------------------------------*/ void nullfill(char cptr[], int len) { int j, k; /* Null-fill the string. */ for (j = 0; j < len; j++) { if (cptr[j] == '\0') { for (k = j+1; k < len; k++) { cptr[k] = '\0'; } break; } } for (k = j-1; k >= 0; k--) { if (cptr[k] != ' ') break; cptr[k] = '\0'; } return; } astropy-1.1.1/cextern/wcslib/C/flexed/wcsutrn.c0000644001134200020070000066647612644017723022413 0ustar embrayscience00000000000000#line 2 "wcsutrn.c" #line 4 "wcsutrn.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer wcsutrn_create_buffer #define yy_delete_buffer wcsutrn_delete_buffer #define yy_flex_debug wcsutrn_flex_debug #define yy_init_buffer wcsutrn_init_buffer #define yy_flush_buffer wcsutrn_flush_buffer #define yy_load_buffer_state wcsutrn_load_buffer_state #define yy_switch_to_buffer wcsutrn_switch_to_buffer #define yyin wcsutrnin #define yyleng wcsutrnleng #define yylex wcsutrnlex #define yylineno wcsutrnlineno #define yyout wcsutrnout #define yyrestart wcsutrnrestart #define yytext wcsutrntext #define yywrap wcsutrnwrap #define yyalloc wcsutrnalloc #define yyrealloc wcsutrnrealloc #define yyfree wcsutrnfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE wcsutrnrestart(wcsutrnin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif extern yy_size_t wcsutrnleng; extern FILE *wcsutrnin, *wcsutrnout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up wcsutrntext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up wcsutrntext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via wcsutrnrestart()), so that the user can continue scanning by * just pointing wcsutrnin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when wcsutrntext is formed. */ static char yy_hold_char; static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ yy_size_t wcsutrnleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow wcsutrnwrap()'s to do buffer switches * instead of setting up a fresh wcsutrnin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void wcsutrnrestart (FILE *input_file ); void wcsutrn_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE wcsutrn_create_buffer (FILE *file,int size ); void wcsutrn_delete_buffer (YY_BUFFER_STATE b ); void wcsutrn_flush_buffer (YY_BUFFER_STATE b ); void wcsutrnpush_buffer_state (YY_BUFFER_STATE new_buffer ); void wcsutrnpop_buffer_state (void ); static void wcsutrnensure_buffer_stack (void ); static void wcsutrn_load_buffer_state (void ); static void wcsutrn_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER wcsutrn_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE wcsutrn_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE wcsutrn_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE wcsutrn_scan_bytes (yyconst char *bytes,yy_size_t len ); void *wcsutrnalloc (yy_size_t ); void *wcsutrnrealloc (void *,yy_size_t ); void wcsutrnfree (void * ); #define yy_new_buffer wcsutrn_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ wcsutrnensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ wcsutrn_create_buffer(wcsutrnin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ wcsutrnensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ wcsutrn_create_buffer(wcsutrnin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define wcsutrnwrap() 1 #define YY_SKIP_YYWRAP typedef char YY_CHAR; FILE *wcsutrnin = (FILE *) 0, *wcsutrnout = (FILE *) 0; typedef int yy_state_type; extern int wcsutrnlineno; int wcsutrnlineno = 1; extern char *wcsutrntext; #define yytext_ptr wcsutrntext static yyconst flex_int16_t yy_nxt[][128] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 11, 12, 13, 12, 12, 14, 15, 12, 16, 17, 12, 18, 12, 19, 20, 12, 21, 22, 12, 12, 23, 12, 12, 24, 12, 8, 8, 8, 8, 8, 8, 25, 12, 12, 26, 12, 12, 12, 27, 12, 12, 28, 12, 29, 12, 12, 30, 12, 31, 32, 12, 12, 33, 12, 12, 34, 12, 8, 8, 8, 8, 8 }, { 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 35, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 11, 12, 13, 12, 12, 14, 15, 12, 16, 17, 12, 18, 12, 19, 20, 12, 21, 22, 12, 12, 23, 12, 12, 24, 12, 36, 8, 8, 8, 8, 8, 25, 12, 12, 26, 12, 12, 12, 27, 12, 12, 28, 12, 29, 12, 12, 30, 12, 31, 32, 12, 12, 33, 12, 12, 34, 12, 8, 8, 8, 8, 8 }, { 7, 37, 37, 37, 37, 37, 37, 37, 37, 37, 38, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 39, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 37, 37, 37, 37, 37, 37, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 37, 37, 37, 37, 37 }, { 7, 37, 37, 37, 37, 37, 37, 37, 37, 37, 38, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 39, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 37, 37, 37, 37, 37, 37, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 37, 37, 37, 37, 37 }, { 7, 41, 41, 41, 41, 41, 41, 41, 41, 41, 38, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41 }, { 7, 41, 41, 41, 41, 41, 41, 41, 41, 41, 38, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41 }, { -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7 }, { 7, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8 }, { 7, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 42, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9 }, { 7, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 44, 43, 43, 43, 43, 43, 43, 43, 43, -10, -10, -10, -10, -10, -10, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -10, -10, -10, -10, -10 }, { 7, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, 43, 43, 43, 43, 45, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -11, -11, -11, -11, -11, -11, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 46, 43, -11, -11, -11, -11, -11 }, { 7, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -12, -12, -12, -12, -12, -12, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -12, -12, -12, -12, -12 }, { 7, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, 47, 43, 43, 43, 48, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -13, -13, -13, -13, -13, -13, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -13, -13, -13, -13, -13 }, { 7, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, 43, 43, 43, 43, 43, 43, 43, 49, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -14, -14, -14, -14, -14, -14, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -14, -14, -14, -14, -14 }, { 7, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 50, 43, 43, 43, 43, 43, 43, 43, 51, -15, -15, -15, -15, -15, -15, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -15, -15, -15, -15, -15 }, { 7, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 52, 43, -16, -16, -16, -16, -16, -16, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -16, -16, -16, -16, -16 }, { 7, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, 43, 43, 43, 43, 53, 43, 43, 54, 43, 43, 43, 43, 55, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -17, -17, -17, -17, -17, -17, 43, 43, 43, 43, 56, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -17, -17, -17, -17, -17 }, { 7, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, 43, 43, 43, 43, 57, 43, 43, 58, 59, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -18, -18, -18, -18, -18, -18, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -18, -18, -18, -18, -18 }, { 7, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -19, -19, -19, -19, -19, -19, 43, 43, 43, 43, 43, 43, 43, 60, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -19, -19, -19, -19, -19 }, { 7, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, 61, 43, 43, 43, 43, 43, 43, 43, 62, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -20, -20, -20, -20, -20, -20, 63, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -20, -20, -20, -20, -20 }, { 7, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, 64, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -21, -21, -21, -21, -21, -21, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -21, -21, -21, -21, -21 }, { 7, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, 43, 43, 43, 43, 65, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -22, -22, -22, -22, -22, -22, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -22, -22, -22, -22, -22 }, { 7, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 66, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -23, -23, -23, -23, -23, -23, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 67, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -23, -23, -23, -23, -23 }, { 7, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, 43, 43, 43, 43, 68, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 69, 43, 43, 43, 43, 43, 43, 43, 43, -24, -24, -24, -24, -24, -24, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -24, -24, -24, -24, -24 }, { 7, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -25, -25, -25, -25, -25, -25, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 70, 43, 43, 43, 71, 43, 43, 43, 43, 43, 43, 43, 43, -25, -25, -25, -25, -25 }, { 7, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -26, -26, -26, -26, -26, -26, 72, 43, 43, 43, 73, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -26, -26, -26, -26, -26 }, { 7, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -27, -27, -27, -27, -27, -27, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 50, 43, 43, 43, 43, 43, 43, 43, 51, -27, -27, -27, -27, -27 }, { 7, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -28, -28, -28, -28, -28, -28, 43, 43, 43, 43, 56, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -28, -28, -28, -28, -28 }, { 7, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -29, -29, -29, -29, -29, -29, 43, 43, 43, 43, 74, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -29, -29, -29, -29, -29 }, { 7, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -30, -30, -30, -30, -30, -30, 63, 43, 43, 43, 43, 43, 43, 43, 75, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -30, -30, -30, -30, -30 }, { 7, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -31, -31, -31, -31, -31, -31, 76, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -31, -31, -31, -31, -31 }, { 7, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -32, -32, -32, -32, -32, -32, 43, 43, 43, 43, 77, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -32, -32, -32, -32, -32 }, { 7, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -33, -33, -33, -33, -33, -33, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 67, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -33, -33, -33, -33, -33 }, { 7, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -34, -34, -34, -34, -34, -34, 43, 43, 43, 43, 78, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -34, -34, -34, -34, -34 }, { 7, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, 79, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, 80, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35 }, { 7, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36 }, { 7, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37 }, { 7, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38 }, { 7, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 82, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 81, 81, 81, 81, 81, 81, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 81, 81, 81, 81, 81 }, { 7, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, -40, -40, -40, -40, -40, -40, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, -40, -40, -40, -40, -40 }, { 7, 85, 85, 85, 85, 85, 85, 85, 85, 85, -41, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85 }, { 7, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, 42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42 }, { 7, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -43, -43, -43, -43, -43, -43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -43, -43, -43, -43, -43 }, { 7, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, 43, 43, 86, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -44, -44, -44, -44, -44, -44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -44, -44, -44, -44, -44 }, { 7, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, 87, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -45, -45, -45, -45, -45, -45, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -45, -45, -45, -45, -45 }, { 7, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -46, -46, -46, -46, -46, -46, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 88, 43, 43, 43, 43, 43, 43, -46, -46, -46, -46, -46 }, { 7, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 89, 43, -47, -47, -47, -47, -47, -47, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -47, -47, -47, -47, -47 }, { 7, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, 43, 43, 43, 43, 43, 43, 90, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -48, -48, -48, -48, -48, -48, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -48, -48, -48, -48, -48 }, { 7, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 91, -49, -49, -49, -49, -49, -49, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -49, -49, -49, -49, -49 }, { 7, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -50, -50, -50, -50, -50, -50, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -50, -50, -50, -50, -50 }, { 7, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -51, -51, -51, -51, -51, -51, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -51, -51, -51, -51, -51 }, { 7, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -52, -52, -52, -52, -52, -52, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -52, -52, -52, -52, -52 }, { 7, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 92, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -53, -53, -53, -53, -53, -53, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -53, -53, -53, -53, -53 }, { 7, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 93, -54, -54, -54, -54, -54, -54, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -54, -54, -54, -54, -54 }, { 7, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -55, -55, -55, -55, -55, -55, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -55, -55, -55, -55, -55 }, { 7, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -56, -56, -56, -56, -56, -56, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 94, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -56, -56, -56, -56, -56 }, { 7, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 95, 43, 43, 43, 43, 43, 43, -57, -57, -57, -57, -57, -57, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -57, -57, -57, -57, -57 }, { 7, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 96, -58, -58, -58, -58, -58, -58, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -58, -58, -58, -58, -58 }, { 7, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 97, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -59, -59, -59, -59, -59, -59, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -59, -59, -59, -59, -59 }, { 7, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -60, -60, -60, -60, -60, -60, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 98, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -60, -60, -60, -60, -60 }, { 7, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 99, 43, 43, 43, 43, 43, 43, 43, -61, -61, -61, -61, -61, -61, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -61, -61, -61, -61, -61 }, { 7, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 100, 43, 43, -62, -62, -62, -62, -62, -62, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -62, -62, -62, -62, -62 }, { 7, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -63, -63, -63, -63, -63, -63, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 101, 43, 43, 43, 43, 43, 43, 43, -63, -63, -63, -63, -63 }, { 7, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, 43, 43, 43, 102, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -64, -64, -64, -64, -64, -64, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -64, -64, -64, -64, -64 }, { 7, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, 43, 43, 103, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -65, -65, -65, -65, -65, -65, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -65, -65, -65, -65, -65 }, { 7, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 104, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -66, -66, -66, -66, -66, -66, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -66, -66, -66, -66, -66 }, { 7, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -67, -67, -67, -67, -67, -67, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 105, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -67, -67, -67, -67, -67 }, { 7, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, 106, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -68, -68, -68, -68, -68, -68, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -68, -68, -68, -68, -68 }, { 7, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -69, -69, -69, -69, -69, -69, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -69, -69, -69, -69, -69 }, { 7, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -70, -70, -70, -70, -70, -70, 43, 43, 43, 43, 43, 43, 107, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -70, -70, -70, -70, -70 }, { 7, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -71, -71, -71, -71, -71, -71, 43, 43, 108, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -71, -71, -71, -71, -71 }, { 7, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -72, -72, -72, -72, -72, -72, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 109, 43, -72, -72, -72, -72, -72 }, { 7, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -73, -73, -73, -73, -73, -73, 43, 43, 43, 43, 43, 43, 110, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -73, -73, -73, -73, -73 }, { 7, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -74, -74, -74, -74, -74, -74, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 111, 43, 43, 43, 43, 43, 43, -74, -74, -74, -74, -74 }, { 7, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -75, -75, -75, -75, -75, -75, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 112, 43, 43, -75, -75, -75, -75, -75 }, { 7, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -76, -76, -76, -76, -76, -76, 43, 43, 43, 113, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -76, -76, -76, -76, -76 }, { 7, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -77, -77, -77, -77, -77, -77, 43, 43, 114, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -77, -77, -77, -77, -77 }, { 7, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -78, -78, -78, -78, -78, -78, 115, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -78, -78, -78, -78, -78 }, { 7, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, 79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, 80, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79 }, { 7, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80 }, { 7, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81 }, { 7, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 82, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 81, 81, 81, 81, 81, 81, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 81, 81, 81, 81, 81 }, { 7, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83 }, { 7, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, -84, -84, -84, -84, -84, -84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, -84, -84, -84, -84, -84 }, { 7, 85, 85, 85, 85, 85, 85, 85, 85, 85, -85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85 }, { 7, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 116, 43, 43, 43, 43, 43, 117, 43, 43, 43, 43, 43, 43, 43, -86, -86, -86, -86, -86, -86, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -86, -86, -86, -86, -86 }, { 7, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 118, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -87, -87, -87, -87, -87, -87, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -87, -87, -87, -87, -87 }, { 7, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -88, -88, -88, -88, -88, -88, 43, 43, 43, 43, 119, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -88, -88, -88, -88, -88 }, { 7, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 120, 43, 43, 43, 43, 43, 43, 43, -89, -89, -89, -89, -89, -89, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -89, -89, -89, -89, -89 }, { 7, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 121, 43, 43, 43, 43, 43, 43, 43, 43, -90, -90, -90, -90, -90, -90, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -90, -90, -90, -90, -90 }, { 7, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -91, -91, -91, -91, -91, -91, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -91, -91, -91, -91, -91 }, { 7, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 122, 43, 43, 43, 43, -92, -92, -92, -92, -92, -92, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -92, -92, -92, -92, -92 }, { 7, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -93, -93, -93, -93, -93, -93, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -93, -93, -93, -93, -93 }, { 7, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -94, -94, -94, -94, -94, -94, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 123, 43, 43, 43, 43, -94, -94, -94, -94, -94 }, { 7, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, 43, 43, 43, 43, 124, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 125, 43, 43, 43, 43, 43, 43, 43, 43, -95, -95, -95, -95, -95, -95, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -95, -95, -95, -95, -95 }, { 7, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -96, -96, -96, -96, -96, -96, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -96, -96, -96, -96, -96 }, { 7, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -97, -97, -97, -97, -97, -97, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -97, -97, -97, -97, -97 }, { 7, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -98, -98, -98, -98, -98, -98, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -98, -98, -98, -98, -98 }, { 7, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, 43, 43, 126, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -99, -99, -99, -99, -99, -99, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -99, -99, -99, -99, -99 }, { 7, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 43, 43, 43, 43, 127, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -100, -100, -100, -100, -100, -100, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -100, -100, -100, -100, -100 }, { 7, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -101, -101, -101, -101, -101, -101, 43, 43, 128, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -101, -101, -101, -101, -101 }, { 7, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, 43, 43, 43, 43, 43, 43, 43, 43, 129, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -102, -102, -102, -102, -102, -102, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -102, -102, -102, -102, -102 }, { 7, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 130, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -103, -103, -103, -103, -103, -103, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -103, -103, -103, -103, -103 }, { 7, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 131, 43, 43, 43, 43, 43, 43, -104, -104, -104, -104, -104, -104, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -104, -104, -104, -104, -104 }, { 7, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -105, -105, -105, -105, -105, -105, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 132, 43, 43, 43, 43, 43, 43, -105, -105, -105, -105, -105 }, { 7, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 133, 43, 43, 43, 43, 43, 43, 43, 43, -106, -106, -106, -106, -106, -106, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -106, -106, -106, -106, -106 }, { 7, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -107, -107, -107, -107, -107, -107, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 134, 43, 43, 43, 43, 43, 43, 43, -107, -107, -107, -107, -107 }, { 7, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -108, -108, -108, -108, -108, -108, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 135, 43, 43, 43, 43, 43, 136, 43, 43, 43, 43, 43, 43, 43, -108, -108, -108, -108, -108 }, { 7, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -109, -109, -109, -109, -109, -109, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 137, 43, 43, 43, 43, 43, 43, 43, -109, -109, -109, -109, -109 }, { 7, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -110, -110, -110, -110, -110, -110, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 138, 43, 43, 43, 43, 43, 43, 43, 43, -110, -110, -110, -110, -110 }, { 7, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -111, -111, -111, -111, -111, -111, 43, 43, 43, 43, 139, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 140, 43, 43, 43, 43, 43, 43, 43, 43, -111, -111, -111, -111, -111 }, { 7, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -112, -112, -112, -112, -112, -112, 43, 43, 43, 43, 141, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -112, -112, -112, -112, -112 }, { 7, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -113, -113, -113, -113, -113, -113, 43, 43, 43, 43, 43, 43, 43, 43, 142, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -113, -113, -113, -113, -113 }, { 7, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -114, -114, -114, -114, -114, -114, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 143, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -114, -114, -114, -114, -114 }, { 7, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -115, -115, -115, -115, -115, -115, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 144, 43, 43, 43, 43, 43, 43, 43, 43, -115, -115, -115, -115, -115 }, { 7, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, 43, 43, 43, 43, 43, 43, 43, 43, 145, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -116, -116, -116, -116, -116, -116, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -116, -116, -116, -116, -116 }, { 7, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, 43, 43, 43, 43, 146, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -117, -117, -117, -117, -117, -117, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -117, -117, -117, -117, -117 }, { 7, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -118, -118, -118, -118, -118, -118, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -118, -118, -118, -118, -118 }, { 7, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -119, -119, -119, -119, -119, -119, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -119, -119, -119, -119, -119 }, { 7, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -120, -120, -120, -120, -120, -120, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -120, -120, -120, -120, -120 }, { 7, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, 43, 43, 43, 43, 147, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -121, -121, -121, -121, -121, -121, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -121, -121, -121, -121, -121 }, { 7, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, 43, 43, 43, 43, 43, 43, 43, 43, 148, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -122, -122, -122, -122, -122, -122, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -122, -122, -122, -122, -122 }, { 7, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -123, -123, -123, -123, -123, -123, 43, 43, 43, 43, 43, 43, 43, 43, 149, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -123, -123, -123, -123, -123 }, { 7, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 150, 43, 43, 43, 43, 43, 43, 43, 43, -124, -124, -124, -124, -124, -124, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -124, -124, -124, -124, -124 }, { 7, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, 43, 43, 43, 43, 151, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -125, -125, -125, -125, -125, -125, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -125, -125, -125, -125, -125 }, { 7, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, 152, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -126, -126, -126, -126, -126, -126, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -126, -126, -126, -126, -126 }, { 7, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 153, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -127, -127, -127, -127, -127, -127, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -127, -127, -127, -127, -127 }, { 7, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -128, -128, -128, -128, -128, -128, 154, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -128, -128, -128, -128, -128 }, { 7, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, 155, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -129, -129, -129, -129, -129, -129, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -129, -129, -129, -129, -129 }, { 7, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 156, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -130, -130, -130, -130, -130, -130, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -130, -130, -130, -130, -130 }, { 7, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 157, 43, 43, 43, 43, 43, 43, 43, -131, -131, -131, -131, -131, -131, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -131, -131, -131, -131, -131 }, { 7, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -132, -132, -132, -132, -132, -132, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 158, 43, 43, 43, 43, 43, 43, 43, -132, -132, -132, -132, -132 }, { 7, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 159, 43, 43, 43, 43, 43, 43, 43, -133, -133, -133, -133, -133, -133, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -133, -133, -133, -133, -133 }, { 7, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -134, -134, -134, -134, -134, -134, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 160, 43, 43, 43, 43, 43, 43, -134, -134, -134, -134, -134 }, { 7, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -135, -135, -135, -135, -135, -135, 43, 43, 43, 43, 43, 43, 43, 43, 161, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -135, -135, -135, -135, -135 }, { 7, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -136, -136, -136, -136, -136, -136, 43, 43, 43, 43, 162, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -136, -136, -136, -136, -136 }, { 7, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -137, -137, -137, -137, -137, -137, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -137, -137, -137, -137, -137 }, { 7, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -138, -138, -138, -138, -138, -138, 43, 43, 43, 43, 163, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -138, -138, -138, -138, -138 }, { 7, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -139, -139, -139, -139, -139, -139, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 164, 43, 43, 43, 43, 43, 43, 43, 43, -139, -139, -139, -139, -139 }, { 7, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -140, -140, -140, -140, -140, -140, 43, 43, 43, 43, 165, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -140, -140, -140, -140, -140 }, { 7, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -141, -141, -141, -141, -141, -141, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 166, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -141, -141, -141, -141, -141 }, { 7, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -142, -142, -142, -142, -142, -142, 167, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -142, -142, -142, -142, -142 }, { 7, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -143, -143, -143, -143, -143, -143, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 168, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -143, -143, -143, -143, -143 }, { 7, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -144, -144, -144, -144, -144, -144, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 69, 43, 43, 43, 43, 43, 43, 43, -144, -144, -144, -144, -144 }, { 7, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 169, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -145, -145, -145, -145, -145, -145, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -145, -145, -145, -145, -145 }, { 7, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, 43, 43, 170, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -146, -146, -146, -146, -146, -146, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -146, -146, -146, -146, -146 }, { 7, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, 43, 43, 43, 43, 171, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -147, -147, -147, -147, -147, -147, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -147, -147, -147, -147, -147 }, { 7, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 172, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -148, -148, -148, -148, -148, -148, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -148, -148, -148, -148, -148 }, { 7, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -149, -149, -149, -149, -149, -149, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 173, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -149, -149, -149, -149, -149 }, { 7, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 174, 43, 43, 43, 43, 43, 43, 43, -150, -150, -150, -150, -150, -150, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -150, -150, -150, -150, -150 }, { 7, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 175, 43, 43, 43, 43, 43, 43, 43, -151, -151, -151, -151, -151, -151, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -151, -151, -151, -151, -151 }, { 7, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 176, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -152, -152, -152, -152, -152, -152, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -152, -152, -152, -152, -152 }, { 7, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 177, 43, 43, 43, 43, 43, 43, 43, -153, -153, -153, -153, -153, -153, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -153, -153, -153, -153, -153 }, { 7, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -154, -154, -154, -154, -154, -154, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 178, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -154, -154, -154, -154, -154 }, { 7, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 179, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -155, -155, -155, -155, -155, -155, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -155, -155, -155, -155, -155 }, { 7, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, 43, 43, 43, 180, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -156, -156, -156, -156, -156, -156, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -156, -156, -156, -156, -156 }, { 7, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -157, -157, -157, -157, -157, -157, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -157, -157, -157, -157, -157 }, { 7, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -158, -158, -158, -158, -158, -158, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -158, -158, -158, -158, -158 }, { 7, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -159, -159, -159, -159, -159, -159, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -159, -159, -159, -159, -159 }, { 7, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -160, -160, -160, -160, -160, -160, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 181, 43, 43, 43, 43, 43, 43, 43, 43, -160, -160, -160, -160, -160 }, { 7, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -161, -161, -161, -161, -161, -161, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 182, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -161, -161, -161, -161, -161 }, { 7, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -162, -162, -162, -162, -162, -162, 43, 43, 183, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -162, -162, -162, -162, -162 }, { 7, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -163, -163, -163, -163, -163, -163, 43, 43, 43, 43, 184, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -163, -163, -163, -163, -163 }, { 7, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -164, -164, -164, -164, -164, -164, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 185, 43, 43, 43, 43, 43, 43, 43, -164, -164, -164, -164, -164 }, { 7, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -165, -165, -165, -165, -165, -165, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 186, 43, 43, 43, 43, 43, 43, 43, -165, -165, -165, -165, -165 }, { 7, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -166, -166, -166, -166, -166, -166, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 177, 43, 43, 43, 43, 43, 43, 43, -166, -166, -166, -166, -166 }, { 7, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -167, -167, -167, -167, -167, -167, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 187, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -167, -167, -167, -167, -167 }, { 7, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -168, -168, -168, -168, -168, -168, 43, 43, 43, 188, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -168, -168, -168, -168, -168 }, { 7, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 189, 43, 43, 43, 43, 43, 43, 43, -169, -169, -169, -169, -169, -169, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -169, -169, -169, -169, -169 }, { 7, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 190, 43, 43, 43, 43, 43, 43, 43, -170, -170, -170, -170, -170, -170, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -170, -170, -170, -170, -170 }, { 7, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 191, 43, 43, 43, 43, 43, 43, 43, -171, -171, -171, -171, -171, -171, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -171, -171, -171, -171, -171 }, { 7, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 192, 43, 43, 43, 43, 43, 43, 43, -172, -172, -172, -172, -172, -172, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -172, -172, -172, -172, -172 }, { 7, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -173, -173, -173, -173, -173, -173, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 193, 43, 43, 43, 43, 43, 43, 43, -173, -173, -173, -173, -173 }, { 7, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -174, -174, -174, -174, -174, -174, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -174, -174, -174, -174, -174 }, { 7, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -175, -175, -175, -175, -175, -175, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -175, -175, -175, -175, -175 }, { 7, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 194, 43, 43, 43, 43, 43, 43, 43, -176, -176, -176, -176, -176, -176, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -176, -176, -176, -176, -176 }, { 7, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -177, -177, -177, -177, -177, -177, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -177, -177, -177, -177, -177 }, { 7, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -178, -178, -178, -178, -178, -178, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 195, 43, 43, 43, 43, 43, 43, 43, -178, -178, -178, -178, -178 }, { 7, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 196, 43, 43, 43, 43, 43, 43, 43, -179, -179, -179, -179, -179, -179, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -179, -179, -179, -179, -179 }, { 7, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 197, 43, 43, 43, 43, 43, 43, 43, -180, -180, -180, -180, -180, -180, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -180, -180, -180, -180, -180 }, { 7, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -181, -181, -181, -181, -181, -181, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 198, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -181, -181, -181, -181, -181 }, { 7, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -182, -182, -182, -182, -182, -182, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 189, 43, 43, 43, 43, 43, 43, 43, -182, -182, -182, -182, -182 }, { 7, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -183, -183, -183, -183, -183, -183, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 190, 43, 43, 43, 43, 43, 43, 43, -183, -183, -183, -183, -183 }, { 7, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -184, -184, -184, -184, -184, -184, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 199, 43, 43, 43, 43, 43, 43, 43, -184, -184, -184, -184, -184 }, { 7, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -185, -185, -185, -185, -185, -185, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -185, -185, -185, -185, -185 }, { 7, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -186, -186, -186, -186, -186, -186, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -186, -186, -186, -186, -186 }, { 7, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -187, -187, -187, -187, -187, -187, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 200, 43, 43, 43, 43, 43, 43, 43, -187, -187, -187, -187, -187 }, { 7, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -188, -188, -188, -188, -188, -188, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 201, 43, 43, 43, 43, 43, 43, 43, -188, -188, -188, -188, -188 }, { 7, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -189, -189, -189, -189, -189, -189, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -189, -189, -189, -189, -189 }, { 7, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -190, -190, -190, -190, -190, -190, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -190, -190, -190, -190, -190 }, { 7, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -191, -191, -191, -191, -191, -191, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -191, -191, -191, -191, -191 }, { 7, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -192, -192, -192, -192, -192, -192, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -192, -192, -192, -192, -192 }, { 7, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -193, -193, -193, -193, -193, -193, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -193, -193, -193, -193, -193 }, { 7, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -194, -194, -194, -194, -194, -194, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -194, -194, -194, -194, -194 }, { 7, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -195, -195, -195, -195, -195, -195, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -195, -195, -195, -195, -195 }, { 7, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -196, -196, -196, -196, -196, -196, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -196, -196, -196, -196, -196 }, { 7, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -197, -197, -197, -197, -197, -197, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -197, -197, -197, -197, -197 }, { 7, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -198, -198, -198, -198, -198, -198, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 202, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -198, -198, -198, -198, -198 }, { 7, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -199, -199, -199, -199, -199, -199, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -199, -199, -199, -199, -199 }, { 7, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -200, -200, -200, -200, -200, -200, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -200, -200, -200, -200, -200 }, { 7, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -201, -201, -201, -201, -201, -201, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -201, -201, -201, -201, -201 }, { 7, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -202, -202, -202, -202, -202, -202, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, -202, -202, -202, -202, -202 }, } ; static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up wcsutrntext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ wcsutrnleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 37 #define YY_END_OF_BUFFER 38 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[203] = { 0, 0, 0, 0, 0, 36, 36, 38, 3, 2, 31, 31, 31, 10, 31, 14, 31, 31, 20, 31, 31, 31, 28, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 2, 1, 35, 37, 35, 32, 36, 2, 31, 31, 31, 31, 31, 31, 31, 13, 15, 17, 31, 31, 19, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 2, 1, 33, 33, 34, 32, 36, 31, 31, 31, 9, 11, 12, 31, 16, 31, 31, 22, 21, 23, 31, 31, 31, 26, 27, 31, 31, 31, 31, 31, 9, 31, 31, 31, 31, 27, 31, 31, 31, 7, 8, 9, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 29, 29, 30, 31, 31, 31, 9, 31, 31, 31, 31, 31, 31, 30, 31, 31, 31, 31, 31, 20, 20, 31, 25, 31, 31, 31, 29, 29, 30, 31, 31, 31, 31, 20, 20, 31, 31, 31, 5, 6, 11, 18, 18, 20, 20, 24, 25, 24, 26, 27, 31, 31, 31, 11, 20, 20, 26, 27, 5, 6, 11, 18, 18, 24, 24, 26, 27, 31, 11, 26, 27, 4 } ; static yyconst yy_state_type yy_NUL_trans[203] = { 0, 8, 8, 37, 37, 41, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ; extern int wcsutrn_flex_debug; int wcsutrn_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *wcsutrntext; #line 1 "wcsutrn.l" /*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsutrn.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * wcsutrn.l is a Flex description file containing the definition of a lexical * scanner that translates non-standard FITS units specifications. * * It requires Flex v2.5.4 or later. * * Refer to wcsunits.h for a description of the user interface and operating * notes. * *===========================================================================*/ /* Options. */ /* Exclusive start states. */ #line 49 "wcsutrn.l" /* To get the prototype for fileno() from stdio.h when gcc is invoked with * -std=c89 (same as -ansi) or -std=c99 since we do not define YY_INPUT. */ #define _POSIX_SOURCE 1 #include #include #include #include #include "wcserr.h" #include "wcsunits.h" #define YY_DECL int wcsutrne(int ctrl, char unitstr[], struct wcserr **err) /* Used in preempting the call to exit() by yy_fatal_error(). */ jmp_buf wcsutrn_abort_jmp_env; #define exit(status) longjmp(wcsutrn_abort_jmp_env, status) #line 4044 "wcsutrn.c" #define INITIAL 0 #define NEXT 1 #define FLUSH 2 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int wcsutrnlex_destroy (void ); int wcsutrnget_debug (void ); void wcsutrnset_debug (int debug_flag ); YY_EXTRA_TYPE wcsutrnget_extra (void ); void wcsutrnset_extra (YY_EXTRA_TYPE user_defined ); FILE *wcsutrnget_in (void ); void wcsutrnset_in (FILE * in_str ); FILE *wcsutrnget_out (void ); void wcsutrnset_out (FILE * out_str ); yy_size_t wcsutrnget_leng (void ); char *wcsutrnget_text (void ); int wcsutrnget_lineno (void ); void wcsutrnset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int wcsutrnwrap (void ); #else extern int wcsutrnwrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( wcsutrntext, wcsutrnleng, 1, wcsutrnout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ errno=0; \ while ( (result = read( fileno(wcsutrnin), (char *) buf, max_size )) < 0 ) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(wcsutrnin); \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int wcsutrnlex (void); #define YY_DECL int wcsutrnlex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after wcsutrntext and wcsutrnleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ if ( wcsutrnleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (wcsutrntext[wcsutrnleng - 1] == '\n'); \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! wcsutrnin ) wcsutrnin = stdin; if ( ! wcsutrnout ) wcsutrnout = stdout; if ( ! YY_CURRENT_BUFFER ) { wcsutrnensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = wcsutrn_create_buffer(wcsutrnin,YY_BUF_SIZE ); } wcsutrn_load_buffer_state( ); } { #line 69 "wcsutrn.l" static const char *function = "wcsutrne"; char orig[80], subs[80]; int bracket = 0; int unsafe = 0; int status = -1; YY_BUFFER_STATE inbuff; int wcsutrnlex_destroy(void); if (err) *err = 0x0; *orig = '\0'; *subs = '\0'; inbuff = wcsutrn_scan_string(unitstr); *unitstr = '\0'; /* Return here via longjmp() invoked by yy_fatal_error(). */ if (setjmp(wcsutrn_abort_jmp_env)) { return wcserr_set(WCSERR_SET(UNITSERR_PARSER_ERROR), "Internal units translator error parsing '%s'", unitstr); } BEGIN(INITIAL); #ifdef DEBUG fprintf(stderr, "\n%s ->\n", unitstr); #endif #line 4278 "wcsutrn.c" while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of wcsutrntext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); yy_match: while ( (yy_current_state = yy_nxt[yy_current_state][ YY_SC_TO_UI(*yy_cp) ]) > 0 ) ++yy_cp; yy_current_state = -yy_current_state; yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 1: YY_RULE_SETUP #line 99 "wcsutrn.l" { /* Looks like a keycomment. */ strcat(unitstr, "["); bracket = 1; } YY_BREAK case 2: YY_RULE_SETUP #line 105 "wcsutrn.l" /* Discard leading whitespace. */ YY_BREAK case 3: /* rule 3 can match eol */ YY_RULE_SETUP #line 107 "wcsutrn.l" { /* Non-alphabetic character. */ strcat(unitstr, wcsutrntext); if (bracket && *wcsutrntext == ']') { BEGIN(FLUSH); } } YY_BREAK case 4: YY_RULE_SETUP #line 115 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "Angstrom"); BEGIN(NEXT); } YY_BREAK case 5: YY_RULE_SETUP #line 121 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "arcmin"); BEGIN(NEXT); } YY_BREAK case 6: YY_RULE_SETUP #line 127 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "arcsec"); BEGIN(NEXT); } YY_BREAK case 7: YY_RULE_SETUP #line 133 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "beam"); BEGIN(NEXT); } YY_BREAK case 8: YY_RULE_SETUP #line 139 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "byte"); BEGIN(NEXT); } YY_BREAK case 9: YY_RULE_SETUP #line 145 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "d"); BEGIN(NEXT); } YY_BREAK case 10: YY_RULE_SETUP #line 151 "wcsutrn.l" { unsafe = 1; strcpy(orig, wcsutrntext); strcpy(subs, (ctrl & 4) ? "d" : "D"); BEGIN(NEXT); } YY_BREAK case 11: YY_RULE_SETUP #line 158 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "deg"); BEGIN(NEXT); } YY_BREAK case 12: YY_RULE_SETUP #line 164 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "GHz"); BEGIN(NEXT); } YY_BREAK case 13: YY_RULE_SETUP #line 170 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "h"); BEGIN(NEXT); } YY_BREAK case 14: YY_RULE_SETUP #line 176 "wcsutrn.l" { unsafe = 1; strcpy(orig, wcsutrntext); strcpy(subs, (ctrl & 2) ? "h" : "H"); BEGIN(NEXT); } YY_BREAK case 15: YY_RULE_SETUP #line 183 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "Hz"); BEGIN(NEXT); } YY_BREAK case 16: YY_RULE_SETUP #line 189 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "kHz"); BEGIN(NEXT); } YY_BREAK case 17: YY_RULE_SETUP #line 195 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "Jy"); BEGIN(NEXT); } YY_BREAK case 18: YY_RULE_SETUP #line 201 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "K"); BEGIN(NEXT); } YY_BREAK case 19: YY_RULE_SETUP #line 207 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "km"); BEGIN(NEXT); } YY_BREAK case 20: YY_RULE_SETUP #line 213 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "m"); BEGIN(NEXT); } YY_BREAK case 21: YY_RULE_SETUP #line 219 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "min"); BEGIN(NEXT); } YY_BREAK case 22: YY_RULE_SETUP #line 225 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "MHz"); BEGIN(NEXT); } YY_BREAK case 23: YY_RULE_SETUP #line 231 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "ohm"); BEGIN(NEXT); } YY_BREAK case 24: YY_RULE_SETUP #line 237 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "Pa"); BEGIN(NEXT); } YY_BREAK case 25: YY_RULE_SETUP #line 243 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "pixel"); BEGIN(NEXT); } YY_BREAK case 26: YY_RULE_SETUP #line 249 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "rad"); BEGIN(NEXT); } YY_BREAK case 27: YY_RULE_SETUP #line 255 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "s"); BEGIN(NEXT); } YY_BREAK case 28: YY_RULE_SETUP #line 261 "wcsutrn.l" { unsafe = 1; strcpy(orig, wcsutrntext); strcpy(subs, (ctrl & 1) ? "s" : "S"); BEGIN(NEXT); } YY_BREAK case 29: YY_RULE_SETUP #line 268 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "V"); BEGIN(NEXT); } YY_BREAK case 30: YY_RULE_SETUP #line 274 "wcsutrn.l" { strcpy(orig, wcsutrntext); strcpy(subs, "yr"); BEGIN(NEXT); } YY_BREAK case 31: YY_RULE_SETUP #line 280 "wcsutrn.l" { /* Not a recognized alias. */ strcpy(orig, wcsutrntext); strcpy(subs, orig); BEGIN(NEXT); } YY_BREAK case 32: YY_RULE_SETUP #line 287 "wcsutrn.l" { /* Reject the alias match. */ strcat(orig, wcsutrntext); strcpy(subs, orig); } YY_BREAK case 33: /* rule 33 can match eol */ YY_RULE_SETUP #line 293 "wcsutrn.l" { /* Discard separating whitespace. */ unput(wcsutrntext[wcsutrnleng-1]); } YY_BREAK case 34: YY_RULE_SETUP #line 298 "wcsutrn.l" { /* Compress separating whitespace. */ strcat(unitstr, subs); strcat(unitstr, " "); if (strcmp(orig, subs)) status = 0; unput(wcsutrntext[wcsutrnleng-1]); *subs = '\0'; BEGIN(INITIAL); } YY_BREAK case 35: YY_RULE_SETUP #line 308 "wcsutrn.l" { /* Copy anything else unchanged. */ strcat(unitstr, subs); if (strcmp(orig, subs)) status = 0; unput(*wcsutrntext); *subs = '\0'; BEGIN(INITIAL); } YY_BREAK case 36: YY_RULE_SETUP #line 317 "wcsutrn.l" { /* Copy out remaining input. */ strcat(unitstr, wcsutrntext); } YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(NEXT): case YY_STATE_EOF(FLUSH): #line 322 "wcsutrn.l" { /* End-of-string. */ if (*subs) { strcat(unitstr, subs); if (strcmp(orig, subs)) status = 0; } wcsutrnlex_destroy(); if (unsafe) { return wcserr_set(WCSERR_SET(UNITSERR_UNSAFE_TRANS), "Unsafe unit translation in '%s'", unitstr); } return status; } YY_BREAK case 37: YY_RULE_SETUP #line 337 "wcsutrn.l" ECHO; YY_BREAK #line 4666 "wcsutrn.c" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed wcsutrnin at a new source and called * wcsutrnlex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = wcsutrnin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( wcsutrnwrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * wcsutrntext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ } /* end of wcsutrnlex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ wcsutrnrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; wcsutrnrestart(wcsutrnin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) wcsutrnrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { if ( *yy_cp ) { yy_current_state = yy_nxt[yy_current_state][YY_SC_TO_UI(*yy_cp)]; } else yy_current_state = yy_NUL_trans[yy_current_state]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; yy_current_state = yy_NUL_trans[yy_current_state]; yy_is_jam = (yy_current_state == 0); return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up wcsutrntext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register yy_size_t number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ wcsutrnrestart(wcsutrnin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( wcsutrnwrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve wcsutrntext */ (yy_hold_char) = *++(yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void wcsutrnrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ wcsutrnensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = wcsutrn_create_buffer(wcsutrnin,YY_BUF_SIZE ); } wcsutrn_init_buffer(YY_CURRENT_BUFFER,input_file ); wcsutrn_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void wcsutrn_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * wcsutrnpop_buffer_state(); * wcsutrnpush_buffer_state(new_buffer); */ wcsutrnensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; wcsutrn_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (wcsutrnwrap()) processing, but the only time this flag * is looked at is after wcsutrnwrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void wcsutrn_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; wcsutrnin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE wcsutrn_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) wcsutrnalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in wcsutrn_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) wcsutrnalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in wcsutrn_create_buffer()" ); b->yy_is_our_buffer = 1; wcsutrn_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with wcsutrn_create_buffer() * */ void wcsutrn_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) wcsutrnfree((void *) b->yy_ch_buf ); wcsutrnfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a wcsutrnrestart() or at EOF. */ static void wcsutrn_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; wcsutrn_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then wcsutrn_init_buffer was _probably_ * called from wcsutrnrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void wcsutrn_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) wcsutrn_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void wcsutrnpush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; wcsutrnensure_buffer_stack(); /* This block is copied from wcsutrn_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from wcsutrn_switch_to_buffer. */ wcsutrn_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void wcsutrnpop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; wcsutrn_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { wcsutrn_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void wcsutrnensure_buffer_stack (void) { yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)wcsutrnalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in wcsutrnensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)wcsutrnrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in wcsutrnensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE wcsutrn_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) wcsutrnalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in wcsutrn_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; wcsutrn_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to wcsutrnlex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * wcsutrn_scan_bytes() instead. */ YY_BUFFER_STATE wcsutrn_scan_string (yyconst char * yystr ) { return wcsutrn_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to wcsutrnlex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE wcsutrn_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) wcsutrnalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in wcsutrn_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = wcsutrn_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in wcsutrn_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up wcsutrntext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ wcsutrntext[wcsutrnleng] = (yy_hold_char); \ (yy_c_buf_p) = wcsutrntext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ wcsutrnleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int wcsutrnget_lineno (void) { return wcsutrnlineno; } /** Get the input stream. * */ FILE *wcsutrnget_in (void) { return wcsutrnin; } /** Get the output stream. * */ FILE *wcsutrnget_out (void) { return wcsutrnout; } /** Get the length of the current token. * */ yy_size_t wcsutrnget_leng (void) { return wcsutrnleng; } /** Get the current token. * */ char *wcsutrnget_text (void) { return wcsutrntext; } /** Set the current line number. * @param line_number * */ void wcsutrnset_lineno (int line_number ) { wcsutrnlineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see wcsutrn_switch_to_buffer */ void wcsutrnset_in (FILE * in_str ) { wcsutrnin = in_str ; } void wcsutrnset_out (FILE * out_str ) { wcsutrnout = out_str ; } int wcsutrnget_debug (void) { return wcsutrn_flex_debug; } void wcsutrnset_debug (int bdebug ) { wcsutrn_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from wcsutrnlex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT wcsutrnin = stdin; wcsutrnout = stdout; #else wcsutrnin = (FILE *) 0; wcsutrnout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * wcsutrnlex_init() */ return 0; } /* wcsutrnlex_destroy is for both reentrant and non-reentrant scanners. */ int wcsutrnlex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ wcsutrn_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; wcsutrnpop_buffer_state(); } /* Destroy the stack itself. */ wcsutrnfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * wcsutrnlex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *wcsutrnalloc (yy_size_t size ) { return (void *) malloc( size ); } void *wcsutrnrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void wcsutrnfree (void * ptr ) { free( (char *) ptr ); /* see wcsutrnrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 336 "wcsutrn.l" astropy-1.1.1/cextern/wcslib/C/flexed/wcspih.c0000644001134200020070000336350112644017723022165 0ustar embrayscience00000000000000#line 2 "wcspih.c" #line 4 "wcspih.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer wcspih_create_buffer #define yy_delete_buffer wcspih_delete_buffer #define yy_flex_debug wcspih_flex_debug #define yy_init_buffer wcspih_init_buffer #define yy_flush_buffer wcspih_flush_buffer #define yy_load_buffer_state wcspih_load_buffer_state #define yy_switch_to_buffer wcspih_switch_to_buffer #define yyin wcspihin #define yyleng wcspihleng #define yylex wcspihlex #define yylineno wcspihlineno #define yyout wcspihout #define yyrestart wcspihrestart #define yytext wcspihtext #define yywrap wcspihwrap #define yyalloc wcspihalloc #define yyrealloc wcspihrealloc #define yyfree wcspihfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE wcspihrestart(wcspihin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif extern yy_size_t wcspihleng; extern FILE *wcspihin, *wcspihout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up wcspihtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up wcspihtext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via wcspihrestart()), so that the user can continue scanning by * just pointing wcspihin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when wcspihtext is formed. */ static char yy_hold_char; static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ yy_size_t wcspihleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow wcspihwrap()'s to do buffer switches * instead of setting up a fresh wcspihin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void wcspihrestart (FILE *input_file ); void wcspih_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE wcspih_create_buffer (FILE *file,int size ); void wcspih_delete_buffer (YY_BUFFER_STATE b ); void wcspih_flush_buffer (YY_BUFFER_STATE b ); void wcspihpush_buffer_state (YY_BUFFER_STATE new_buffer ); void wcspihpop_buffer_state (void ); static void wcspihensure_buffer_stack (void ); static void wcspih_load_buffer_state (void ); static void wcspih_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER wcspih_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE wcspih_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE wcspih_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE wcspih_scan_bytes (yyconst char *bytes,yy_size_t len ); void *wcspihalloc (yy_size_t ); void *wcspihrealloc (void *,yy_size_t ); void wcspihfree (void * ); #define yy_new_buffer wcspih_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ wcspihensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ wcspih_create_buffer(wcspihin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ wcspihensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ wcspih_create_buffer(wcspihin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define wcspihwrap() 1 #define YY_SKIP_YYWRAP typedef char YY_CHAR; FILE *wcspihin = (FILE *) 0, *wcspihout = (FILE *) 0; typedef int yy_state_type; extern int wcspihlineno; int wcspihlineno = 1; extern char *wcspihtext; #define yytext_ptr wcspihtext static yyconst flex_int16_t yy_nxt[][128] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 53, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54 }, { 53, 55, 55, 55, 55, 55, 55, 55, 55, 55, 54, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 56, 57, 58, 59, 60, 55, 55, 55, 55, 55, 55, 61, 62, 63, 64, 65, 55, 66, 67, 55, 55, 68, 69, 70, 71, 72, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55 }, { 53, 73, 73, 73, 73, 73, 73, 73, 73, 73, 54, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 74, 75, 75, 75, 75, 75, 75, 75, 75, 75, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73 }, { 53, 73, 73, 73, 73, 73, 73, 73, 73, 73, 54, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 74, 75, 75, 75, 75, 75, 75, 75, 75, 75, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73 }, { 53, 76, 76, 76, 76, 76, 76, 76, 76, 76, 54, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 77, 78, 78, 78, 78, 78, 78, 78, 78, 78, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76 }, { 53, 76, 76, 76, 76, 76, 76, 76, 76, 76, 54, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 77, 78, 78, 78, 78, 78, 78, 78, 78, 78, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76 }, { 53, 79, 79, 79, 79, 79, 79, 79, 79, 79, 54, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79 }, { 53, 79, 79, 79, 79, 79, 79, 79, 79, 79, 54, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79 }, { 53, 82, 82, 82, 82, 82, 82, 82, 82, 82, 54, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82 }, { 53, 82, 82, 82, 82, 82, 82, 82, 82, 82, 54, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82 }, { 53, 85, 85, 85, 85, 85, 85, 85, 85, 85, 54, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 86, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85 }, { 53, 85, 85, 85, 85, 85, 85, 85, 85, 85, 54, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 86, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85 }, { 53, 87, 87, 87, 87, 87, 87, 87, 87, 87, 54, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87 }, { 53, 87, 87, 87, 87, 87, 87, 87, 87, 87, 54, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87 }, { 53, 88, 88, 88, 88, 88, 88, 88, 88, 88, 54, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88 }, { 53, 88, 88, 88, 88, 88, 88, 88, 88, 88, 54, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88 }, { 53, 90, 90, 90, 90, 90, 90, 90, 90, 90, 54, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90 }, { 53, 90, 90, 90, 90, 90, 90, 90, 90, 90, 54, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90 }, { 53, 92, 92, 92, 92, 92, 92, 92, 92, 92, 54, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92 }, { 53, 92, 92, 92, 92, 92, 92, 92, 92, 92, 54, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92 }, { 53, 94, 94, 94, 94, 94, 94, 94, 94, 94, 54, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94 }, { 53, 94, 94, 94, 94, 94, 94, 94, 94, 94, 54, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94 }, { 53, 96, 96, 96, 96, 96, 96, 96, 96, 96, 54, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, 97, 97, 97, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96 }, { 53, 96, 96, 96, 96, 96, 96, 96, 96, 96, 54, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, 97, 97, 97, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96 }, { 53, 98, 98, 98, 98, 98, 98, 98, 98, 98, 54, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 99, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98 }, { 53, 98, 98, 98, 98, 98, 98, 98, 98, 98, 54, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 99, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98 }, { 53, 100, 100, 100, 100, 100, 100, 100, 100, 100, 54, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 101, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }, { 53, 100, 100, 100, 100, 100, 100, 100, 100, 100, 54, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 101, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }, { 53, 102, 102, 102, 102, 102, 102, 102, 102, 102, 54, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 103, 102, 103, 102, 102, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102 }, { 53, 102, 102, 102, 102, 102, 102, 102, 102, 102, 54, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 103, 102, 103, 102, 102, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102 }, { 53, 105, 105, 105, 105, 105, 105, 105, 105, 105, 54, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 106, 105, 106, 107, 105, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105 }, { 53, 105, 105, 105, 105, 105, 105, 105, 105, 105, 54, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 106, 105, 106, 107, 105, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105 }, { 53, 109, 109, 109, 109, 109, 109, 109, 109, 109, 54, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 110, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109 }, { 53, 109, 109, 109, 109, 109, 109, 109, 109, 109, 54, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 110, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109 }, { 53, 111, 111, 111, 111, 111, 111, 111, 111, 111, 54, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 112, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111 }, { 53, 111, 111, 111, 111, 111, 111, 111, 111, 111, 54, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 112, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111 }, { 53, 113, 113, 113, 113, 113, 113, 113, 113, 113, 54, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 113, 113, 113, 113, 114, 113, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 113, 113, 113, 113, 113 }, { 53, 113, 113, 113, 113, 113, 113, 113, 113, 113, 54, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 113, 113, 113, 113, 114, 113, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 113, 113, 113, 113, 113 }, { 53, 115, 115, 115, 115, 115, 115, 115, 115, 115, 54, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115 }, { 53, 115, 115, 115, 115, 115, 115, 115, 115, 115, 54, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115 }, { 53, 117, 117, 117, 117, 117, 117, 117, 117, 117, 54, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 118, 117, 118, 119, 117, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117 }, { 53, 117, 117, 117, 117, 117, 117, 117, 117, 117, 54, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 118, 117, 118, 119, 117, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117 }, { 53, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 121, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54 }, { 53, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 121, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54 }, { 53, 122, 122, 122, 122, 122, 122, 122, 122, 122, 123, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 124, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 125, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122 }, { 53, 122, 122, 122, 122, 122, 122, 122, 122, 122, 123, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 124, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 125, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122 }, { 53, 126, 126, 126, 126, 126, 126, 126, 126, 126, 127, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126 }, { 53, 126, 126, 126, 126, 126, 126, 126, 126, 126, 127, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126 }, { 53, 128, 128, 128, 128, 128, 128, 128, 128, 128, 129, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, { 53, 128, 128, 128, 128, 128, 128, 128, 128, 128, 129, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, { 53, 130, 130, 130, 130, 130, 130, 130, 130, 130, 131, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130 }, { 53, 130, 130, 130, 130, 130, 130, 130, 130, 130, 131, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130 }, { -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53 }, { 53, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54 }, { 53, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55 }, { 53, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, 132, -56, -56, 133, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, 134, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56 }, { 53, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, 135, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, 136, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57 }, { 53, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, 137, -58, -58, -58, -58, -58, -58, -58, -58, -58, 138, -58, 139, 140, 141, 142, 143, 144, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58 }, { 53, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, 145, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, 146, 147, -59, -59, -59, -59, 148, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59 }, { 53, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, 149, -60, 150, 151, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60 }, { 53, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, 152, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, 153, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61 }, { 53, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, 154, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62 }, { 53, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, 155, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63 }, { 53, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, 156, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64 }, { 53, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, 157, -65, -65, -65, -65, -65, -65, -65, -65, 158, -65, -65, -65, 159, -65, 160, 161, -65, -65, 162, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65 }, { 53, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, 163, -66, -66, -66, 164, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66 }, { 53, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, 165, -67, -67, 166, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67 }, { 53, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, 167, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, 168, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68 }, { 53, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, 169, -69, 170, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69 }, { 53, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, 171, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70 }, { 53, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, 172, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71 }, { 53, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, 173, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72 }, { 53, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73 }, { 53, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, 174, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, 175, 176, 176, 176, 176, 176, 176, 176, 176, 176, -74, -74, -74, -74, -74, -74, -74, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74 }, { 53, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, 177, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, -75, -75, -75, -75, -75, -75, -75, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75 }, { 53, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76 }, { 53, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, 179, -77, -77, 180, 181, 181, 181, 181, 181, 181, 181, 181, 181, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, 182, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77 }, { 53, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, 179, -78, -78, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, 184, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78 }, { 53, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79 }, { 53, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, 185, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, 186, 187, 187, 187, 187, 187, 187, 187, 187, 187, -80, -80, -80, -80, -80, -80, -80, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80 }, { 53, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, 188, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, -81, -81, -81, -81, -81, -81, -81, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81 }, { 53, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82 }, { 53, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, 190, -83, -83, 191, 192, 192, 192, 192, 192, 192, 192, 192, 192, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, 193, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83 }, { 53, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, 190, -84, -84, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, 195, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84 }, { 53, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85 }, { 53, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86 }, { 53, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87 }, { 53, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88 }, { 53, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, 196, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, -89, -89, -89, -89, -89, -89, -89, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89 }, { 53, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90 }, { 53, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, 198, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91 }, { 53, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92 }, { 53, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, 200, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93 }, { 53, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94 }, { 53, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, 201, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95 }, { 53, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96 }, { 53, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, 202, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97 }, { 53, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98 }, { 53, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, 204, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99 }, { 53, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 }, { 53, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, 205, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101 }, { 53, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102 }, { 53, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103 }, { 53, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104 }, { 53, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105 }, { 53, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, 207, -106, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106 }, { 53, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107 }, { 53, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, 210, -108, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, 212, 212, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, 212, 212, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108 }, { 53, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109 }, { 53, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 214, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213 }, { 53, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111 }, { 53, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 216, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215 }, { 53, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113 }, { 53, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, 217, -114, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, -114, -114, -114, -114, -114, -114, -114, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, -114, -114, -114, -114, 217, -114, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, -114, -114, -114, -114, -114 }, { 53, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115 }, { 53, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, 218, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116 }, { 53, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117 }, { 53, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, 219, -118, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118 }, { 53, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119 }, { 53, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, 222, -120, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, 224, 224, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, 224, 224, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120 }, { 53, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121 }, { 53, 225, 225, 225, 225, 225, 225, 225, 225, 225, 226, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 227, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 228, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225 }, { 53, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123 }, { 53, 229, 229, 229, 229, 229, 229, 229, 229, 229, 230, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 231, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 232, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229 }, { 53, 233, 233, 233, 233, 233, 233, 233, 233, 233, 234, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 235, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 236, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233 }, { 53, 237, 237, 237, 237, 237, 237, 237, 237, 237, 238, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237 }, { 53, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127 }, { 53, 239, 239, 239, 239, 239, 239, 239, 239, 239, 240, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239 }, { 53, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129 }, { 53, 241, 241, 241, 241, 241, 241, 241, 241, 241, 242, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241 }, { 53, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131 }, { 53, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, 243, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132 }, { 53, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, 244, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133 }, { 53, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, 245, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, 246, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134 }, { 53, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 247, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135 }, { 53, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, 248, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, 249, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136 }, { 53, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, 250, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137 }, { 53, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, 251, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, 252, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138 }, { 53, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, 253, 254, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139 }, { 53, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, 255, 256, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140 }, { 53, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, 257, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, 258, 259, -141, -141, -141, -141, -141, 260, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141 }, { 53, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, 261, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142 }, { 53, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, 262, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143 }, { 53, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, 263, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144 }, { 53, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, 264, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145 }, { 53, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146 }, { 53, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147 }, { 53, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, 265, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148 }, { 53, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, 266, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149 }, { 53, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, 267, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150 }, { 53, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, 268, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151 }, { 53, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, 269, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152 }, { 53, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, 270, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153 }, { 53, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, 271, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154 }, { 53, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, 272, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155 }, { 53, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, 273, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156 }, { 53, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157 }, { 53, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, 274, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, 275, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158 }, { 53, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, 276, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159 }, { 53, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, 277, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160 }, { 53, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161 }, { 53, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162 }, { 53, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, 278, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163 }, { 53, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, 279, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164 }, { 53, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, 280, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165 }, { 53, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, 281, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166 }, { 53, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, 282, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167 }, { 53, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, 283, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168 }, { 53, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, 284, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169 }, { 53, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, 285, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170 }, { 53, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, 286, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171 }, { 53, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, 287, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172 }, { 53, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, 288, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173 }, { 53, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, 289, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174 }, { 53, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, 290, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, 291, 292, 292, 292, 292, 292, 292, 292, 292, 292, -175, -175, -175, -175, -175, -175, -175, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175 }, { 53, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, 293, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, 291, 292, 292, 292, 292, 292, 292, 292, 292, 292, -176, -176, -176, -176, -176, -176, -176, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176 }, { 53, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, 294, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177 }, { 53, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, 295, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, -178, -178, -178, -178, -178, -178, -178, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178 }, { 53, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179 }, { 53, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, 298, -180, -180, 299, 300, 300, 300, 300, 300, 300, 300, 300, 300, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, 301, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180 }, { 53, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, 298, -181, -181, 302, 303, 303, 303, 303, 303, 303, 303, 303, 303, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, 304, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181 }, { 53, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182 }, { 53, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, 298, -183, -183, 306, 307, 307, 307, 307, 307, 307, 307, 307, 307, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, 308, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183 }, { 53, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, 309, 310, 310, 310, 310, 310, 310, 310, 310, 310, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184 }, { 53, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, 311, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185 }, { 53, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, 312, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, 313, 314, 314, 314, 314, 314, 314, 314, 314, 314, -186, -186, -186, -186, -186, -186, -186, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186 }, { 53, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, 315, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, 313, 314, 314, 314, 314, 314, 314, 314, 314, 314, -187, -187, -187, -187, -187, -187, -187, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187 }, { 53, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, 316, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188 }, { 53, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, 317, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, -189, -189, -189, -189, -189, -189, -189, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189 }, { 53, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, 318, 318, 318, 318, 318, 318, 318, 318, 318, 318, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190 }, { 53, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, 319, -191, -191, 320, 321, 321, 321, 321, 321, 321, 321, 321, 321, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, 322, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191 }, { 53, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, 319, -192, -192, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, 324, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192 }, { 53, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193 }, { 53, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, 319, -194, -194, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, 327, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194 }, { 53, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, 328, 329, 329, 329, 329, 329, 329, 329, 329, 329, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195 }, { 53, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, 330, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196 }, { 53, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, 331, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, -197, -197, -197, -197, -197, -197, -197, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197 }, { 53, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, 333, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198 }, { 53, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, 334, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199 }, { 53, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200 }, { 53, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201 }, { 53, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, 338, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202 }, { 53, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, 339, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203 }, { 53, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, 204, -204, -204, -204, -204, -204, -204, 340, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204 }, { 53, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, 205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205 }, { 53, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206 }, { 53, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207 }, { 53, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, 210, -208, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, 212, 212, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, 212, 212, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208 }, { 53, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, 212, 212, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, 212, 212, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209 }, { 53, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, 212, 212, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, 212, 212, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210 }, { 53, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, 210, -211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, 212, 212, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, 212, 212, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211 }, { 53, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, 342, -212, 342, -212, -212, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212 }, { 53, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 214, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213 }, { 53, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, 213, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214 }, { 53, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 216, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215 }, { 53, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216 }, { 53, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, 217, -217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, -217, -217, -217, -217, -217, -217, -217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, -217, -217, -217, -217, 217, -217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, -217, -217, -217, -217, -217 }, { 53, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, 218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218 }, { 53, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219 }, { 53, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, 222, -220, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, 224, 224, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, 224, 224, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220 }, { 53, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, 224, 224, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, 224, 224, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221 }, { 53, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, 224, 224, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, 224, 224, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222 }, { 53, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, 222, -223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, 224, 224, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, 224, 224, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223 }, { 53, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, 345, -224, 345, -224, -224, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224 }, { 53, 225, 225, 225, 225, 225, 225, 225, 225, 225, 226, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 227, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 228, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225 }, { 53, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226 }, { 53, 347, 347, 347, 347, 347, 347, 347, 347, 347, 226, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 227, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 228, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347 }, { 53, 348, 348, 348, 348, 348, 348, 348, 348, 348, 349, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 350, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 351, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348 }, { 53, 352, 352, 352, 352, 352, 352, 352, 352, 352, 353, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 354, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 355, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352 }, { 53, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230 }, { 53, 356, 356, 356, 356, 356, 356, 356, 356, 356, 357, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 358, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 359, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356 }, { 53, 233, 233, 233, 233, 233, 233, 233, 233, 233, 234, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 235, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 236, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233 }, { 53, 233, 233, 233, 233, 233, 233, 233, 233, 233, 234, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 235, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 236, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233 }, { 53, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234 }, { 53, 233, 233, 233, 233, 233, 233, 233, 233, 233, 234, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 235, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 236, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233 }, { 53, 233, 233, 233, 233, 233, 233, 233, 233, 233, 234, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 235, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 236, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233 }, { 53, 237, 237, 237, 237, 237, 237, 237, 237, 237, 238, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237 }, { 53, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238 }, { 53, 239, 239, 239, 239, 239, 239, 239, 239, 239, 240, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239 }, { 53, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240 }, { 53, 241, 241, 241, 241, 241, 241, 241, 241, 241, 242, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241 }, { 53, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242 }, { 53, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, 360, 361, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243 }, { 53, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, 362, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244 }, { 53, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, 363, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245 }, { 53, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, 364, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246 }, { 53, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, 365, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247 }, { 53, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, 366, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248 }, { 53, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, 367, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249 }, { 53, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, 368, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250 }, { 53, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, 369, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251 }, { 53, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, 370, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252 }, { 53, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, 371, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253 }, { 53, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, 372, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254 }, { 53, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, 373, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255 }, { 53, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, 374, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256 }, { 53, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, 375, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257 }, { 53, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, 376, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258 }, { 53, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, 377, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259 }, { 53, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, 378, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260 }, { 53, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, 379, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261 }, { 53, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, 380, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262 }, { 53, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, 381, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263 }, { 53, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, 382, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264 }, { 53, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, 383, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265 }, { 53, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, 384, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266 }, { 53, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, 385, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267 }, { 53, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, 386, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268 }, { 53, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, 387, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269 }, { 53, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, 388, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270 }, { 53, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, 389, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271 }, { 53, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, 390, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272 }, { 53, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, 391, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273 }, { 53, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, 392, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274 }, { 53, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, 393, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, 394, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275 }, { 53, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, 395, -276, -276, 396, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276 }, { 53, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, 397, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277 }, { 53, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, 398, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278 }, { 53, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, 399, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279 }, { 53, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, 400, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280 }, { 53, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, 401, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281 }, { 53, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, 402, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, 403, -282, -282, 404, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282 }, { 53, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, 405, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283 }, { 53, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, 406, 406, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284 }, { 53, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, 407, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, 408, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285 }, { 53, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, 409, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286 }, { 53, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, 410, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287 }, { 53, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, 411, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288 }, { 53, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, 412, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289 }, { 53, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, 413, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290 }, { 53, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, 414, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, 415, 416, 416, 416, 416, 416, 416, 416, 416, 416, -291, -291, -291, -291, -291, -291, -291, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291 }, { 53, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, 417, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, 415, 416, 416, 416, 416, 416, 416, 416, 416, 416, -292, -292, -292, -292, -292, -292, -292, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292 }, { 53, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, 418, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293 }, { 53, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, 419, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294 }, { 53, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, 420, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295 }, { 53, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, 414, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, -296, -296, -296, -296, -296, -296, -296, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296 }, { 53, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, 422, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, -297, -297, -297, -297, -297, -297, -297, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297 }, { 53, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298 }, { 53, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, 425, -299, -299, 426, 427, 427, 427, 427, 427, 427, 427, 427, 427, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, 428, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299 }, { 53, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, 425, -300, -300, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, 430, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300 }, { 53, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301 }, { 53, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, 425, -302, -302, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, 432, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302 }, { 53, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, 425, -303, -303, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, 432, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303 }, { 53, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, 434, 435, 435, 435, 435, 435, 435, 435, 435, 435, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304 }, { 53, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, 436, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, -305, -305, -305, -305, -305, -305, -305, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305 }, { 53, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, 425, -306, -306, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, 428, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306 }, { 53, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, 425, -307, -307, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, 428, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307 }, { 53, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, 438, 439, 439, 439, 439, 439, 439, 439, 439, 439, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308 }, { 53, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, 436, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, 440, 441, 441, 441, 441, 441, 441, 441, 441, 441, -309, -309, -309, -309, -309, -309, -309, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309 }, { 53, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, 442, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, -310, -310, -310, -310, -310, -310, -310, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310 }, { 53, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311 }, { 53, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312 }, { 53, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313 }, { 53, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314 }, { 53, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315 }, { 53, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316 }, { 53, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317 }, { 53, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, 444, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, -318, -318, -318, -318, -318, -318, -318, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318 }, { 53, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319 }, { 53, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, 447, -320, -320, 448, 449, 449, 449, 449, 449, 449, 449, 449, 449, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, 450, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320 }, { 53, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, 447, -321, -321, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, 452, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321 }, { 53, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322 }, { 53, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, 447, -323, -323, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, 454, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323 }, { 53, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, 455, 456, 456, 456, 456, 456, 456, 456, 456, 456, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324 }, { 53, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, 457, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, -325, -325, -325, -325, -325, -325, -325, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325 }, { 53, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, 447, -326, -326, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, 450, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326 }, { 53, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, 459, 460, 460, 460, 460, 460, 460, 460, 460, 460, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327 }, { 53, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, 461, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, 462, 463, 463, 463, 463, 463, 463, 463, 463, 463, -328, -328, -328, -328, -328, -328, -328, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328 }, { 53, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, 461, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, -329, -329, -329, -329, -329, -329, -329, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329 }, { 53, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330 }, { 53, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331 }, { 53, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332 }, { 53, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333 }, { 53, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334 }, { 53, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335 }, { 53, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, 465, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336 }, { 53, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, 466, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337 }, { 53, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, 467, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338 }, { 53, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, 468, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339 }, { 53, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 470, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469 }, { 53, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, 212, 212, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, 212, 212, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341 }, { 53, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342 }, { 53, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343 }, { 53, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, 224, 224, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, 224, 224, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344 }, { 53, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345 }, { 53, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346 }, { 53, 347, 347, 347, 347, 347, 347, 347, 347, 347, 471, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 472, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 473, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347 }, { 53, 348, 348, 348, 348, 348, 348, 348, 348, 348, 349, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 350, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 351, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348 }, { 53, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349 }, { 53, 348, 348, 348, 348, 348, 348, 348, 348, 348, 349, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 350, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 351, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348 }, { 53, 348, 348, 348, 348, 348, 348, 348, 348, 348, 349, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 350, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 351, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348 }, { 53, 352, 352, 352, 352, 352, 352, 352, 352, 352, 353, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 354, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 355, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352 }, { 53, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353 }, { 53, 352, 352, 352, 352, 352, 352, 352, 352, 352, 353, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 354, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 355, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352 }, { 53, 474, 474, 474, 474, 474, 474, 474, 474, 474, 475, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 476, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 477, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474 }, { 53, 352, 352, 352, 352, 352, 352, 352, 352, 352, 353, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 354, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 355, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352 }, { 53, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357 }, { 53, 356, 356, 356, 356, 356, 356, 356, 356, 356, 357, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 358, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 359, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356 }, { 53, 478, 478, 478, 478, 478, 478, 478, 478, 478, 479, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 480, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 481, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478 }, { 53, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360 }, { 53, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361 }, { 53, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, 482, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362 }, { 53, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, 483, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363 }, { 53, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, 484, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364 }, { 53, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, 485, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365 }, { 53, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, 486, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366 }, { 53, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, 487, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367 }, { 53, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, 488, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368 }, { 53, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, 489, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369 }, { 53, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, 490, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370 }, { 53, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, 491, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371 }, { 53, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, 492, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372 }, { 53, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, 493, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373 }, { 53, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, 494, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374 }, { 53, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, 495, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375 }, { 53, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, 496, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376 }, { 53, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, 497, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377 }, { 53, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, 498, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378 }, { 53, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, 499, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379 }, { 53, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, 500, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380 }, { 53, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, 501, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381 }, { 53, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, 502, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382 }, { 53, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, 503, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383 }, { 53, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, 504, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384 }, { 53, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, 505, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385 }, { 53, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, 506, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386 }, { 53, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, 507, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387 }, { 53, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, 508, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388 }, { 53, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, 509, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, 510, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389 }, { 53, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, 511, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390 }, { 53, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, 512, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391 }, { 53, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, 513, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392 }, { 53, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, 514, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393 }, { 53, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, 515, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394 }, { 53, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, 516, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395 }, { 53, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, 517, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396 }, { 53, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, 518, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397 }, { 53, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, 519, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, 520, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398 }, { 53, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, 521, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, 522, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399 }, { 53, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, 523, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400 }, { 53, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, 524, -401, -401, -401, 525, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401 }, { 53, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, 526, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402 }, { 53, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, 527, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403 }, { 53, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, 528, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404 }, { 53, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, 529, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405 }, { 53, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, 530, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406 }, { 53, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, 531, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407 }, { 53, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, 532, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408 }, { 53, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, 533, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409 }, { 53, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, 534, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410 }, { 53, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, 535, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411 }, { 53, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, 536, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412 }, { 53, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 537, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413 }, { 53, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, 538, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414 }, { 53, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, 539, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, 540, 541, 541, 541, 541, 541, 541, 541, 541, 541, -415, -415, -415, -415, -415, -415, -415, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415 }, { 53, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, 542, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, 540, 541, 541, 541, 541, 541, 541, 541, 541, 541, -416, -416, -416, -416, -416, -416, -416, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416 }, { 53, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, 543, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417 }, { 53, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, 544, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418 }, { 53, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, 545, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419 }, { 53, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, 546, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420 }, { 53, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, 539, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, -421, -421, -421, -421, -421, -421, -421, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421 }, { 53, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, 548, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422 }, { 53, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, 549, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, -423, -423, -423, -423, -423, -423, -423, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423 }, { 53, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, 551, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, -424, -424, -424, -424, -424, -424, -424, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424 }, { 53, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425 }, { 53, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, 554, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, 555, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426 }, { 53, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, 554, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, 556, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427 }, { 53, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428 }, { 53, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, 554, -429, -429, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, 559, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429 }, { 53, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, 560, 561, 561, 561, 561, 561, 561, 561, 561, 561, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430 }, { 53, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, 562, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, -431, -431, -431, -431, -431, -431, -431, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431 }, { 53, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, 564, 565, 565, 565, 565, 565, 565, 565, 565, 565, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432 }, { 53, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, 554, -433, -433, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, 555, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433 }, { 53, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, 562, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, 566, 567, 567, 567, 567, 567, 567, 567, 567, 567, -434, -434, -434, -434, -434, -434, -434, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434 }, { 53, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, 568, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, -435, -435, -435, -435, -435, -435, -435, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435 }, { 53, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, 570, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436 }, { 53, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, 571, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, -437, -437, -437, -437, -437, -437, -437, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437 }, { 53, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, 562, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, 573, 574, 574, 574, 574, 574, 574, 574, 574, 574, -438, -438, -438, -438, -438, -438, -438, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438 }, { 53, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, 575, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, -439, -439, -439, -439, -439, -439, -439, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439 }, { 53, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, 571, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, 577, 578, 578, 578, 578, 578, 578, 578, 578, 578, -440, -440, -440, -440, -440, -440, -440, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440 }, { 53, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, 579, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, -441, -441, -441, -441, -441, -441, -441, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441 }, { 53, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, 581, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, -442 }, { 53, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, 582, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, -443, -443, -443, -443, -443, -443, -443, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, -443 }, { 53, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, 583, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444 }, { 53, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, 584, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, -445, -445, -445, -445, -445, -445, -445, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445, -445 }, { 53, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, 586, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, -446, -446, -446, -446, -446, -446, -446, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446, -446 }, { 53, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447 }, { 53, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, 589, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, 590, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448 }, { 53, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, 589, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, 591, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449, -449 }, { 53, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450, -450 }, { 53, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, 589, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, 593, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451, -451 }, { 53, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, 594, 595, 595, 595, 595, 595, 595, 595, 595, 595, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452 }, { 53, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, 596, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, -453, -453, -453, -453, -453, -453, -453, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453, -453 }, { 53, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, 598, 599, 599, 599, 599, 599, 599, 599, 599, 599, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454, -454 }, { 53, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, 600, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, 601, 602, 602, 602, 602, 602, 602, 602, 602, 602, -455, -455, -455, -455, -455, -455, -455, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455 }, { 53, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, 600, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, -456, -456, -456, -456, -456, -456, -456, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456 }, { 53, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, 604, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457 }, { 53, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, 605, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, -458, -458, -458, -458, -458, -458, -458, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458 }, { 53, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, 607, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, 608, 609, 609, 609, 609, 609, 609, 609, 609, 609, -459, -459, -459, -459, -459, -459, -459, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459 }, { 53, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, 607, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, -460, -460, -460, -460, -460, -460, -460, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460 }, { 53, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, 611, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461 }, { 53, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, 612, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, 613, 614, 614, 614, 614, 614, 614, 614, 614, 614, -462, -462, -462, -462, -462, -462, -462, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462 }, { 53, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, 612, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, -463, -463, -463, -463, -463, -463, -463, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463 }, { 53, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, 616, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, -464, -464, -464, -464, -464, -464, -464, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464 }, { 53, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, 617, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465 }, { 53, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, 618, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466 }, { 53, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467 }, { 53, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468 }, { 53, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 470, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469 }, { 53, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, 469, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470 }, { 53, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471 }, { 53, 347, 347, 347, 347, 347, 347, 347, 347, 347, 471, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 472, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 473, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347 }, { 53, 619, 619, 619, 619, 619, 619, 619, 619, 619, 620, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 621, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 622, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619 }, { 53, 474, 474, 474, 474, 474, 474, 474, 474, 474, 475, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 476, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 477, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474 }, { 53, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475 }, { 53, 474, 474, 474, 474, 474, 474, 474, 474, 474, 475, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 476, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 477, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474 }, { 53, 474, 474, 474, 474, 474, 474, 474, 474, 474, 475, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 476, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 477, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474 }, { 53, 478, 478, 478, 478, 478, 478, 478, 478, 478, 479, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 480, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 481, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478 }, { 53, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479 }, { 53, 478, 478, 478, 478, 478, 478, 478, 478, 478, 479, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 480, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 481, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478 }, { 53, 478, 478, 478, 478, 478, 478, 478, 478, 478, 479, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 480, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 481, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478 }, { 53, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, 623, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482 }, { 53, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, 624, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483 }, { 53, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, 625, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484 }, { 53, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, 626, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485 }, { 53, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, 627, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486 }, { 53, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, 628, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487 }, { 53, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488 }, { 53, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489 }, { 53, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, 629, 630, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490 }, { 53, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491 }, { 53, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492 }, { 53, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493 }, { 53, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494 }, { 53, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495 }, { 53, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496 }, { 53, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497 }, { 53, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498 }, { 53, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499 }, { 53, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500 }, { 53, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501 }, { 53, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, 631, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, 632, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502 }, { 53, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503 }, { 53, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, 633, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504 }, { 53, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, 634, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505 }, { 53, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, 635, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506 }, { 53, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, 636, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507 }, { 53, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, 637, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508 }, { 53, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, 638, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509 }, { 53, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, 639, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510 }, { 53, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, 640, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511 }, { 53, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, 641, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512 }, { 53, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, 642, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513 }, { 53, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, 643, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514 }, { 53, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, 644, -515, -515, -515, -515, 645, -515, -515, -515, -515, -515, 646, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515 }, { 53, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, 647, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516 }, { 53, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, 648, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517 }, { 53, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518 }, { 53, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, 649, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519 }, { 53, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, 650, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520 }, { 53, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, 651, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521 }, { 53, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, 652, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522 }, { 53, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, 653, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523 }, { 53, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, 654, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524 }, { 53, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, 655, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525 }, { 53, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, 656, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526 }, { 53, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, 657, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527 }, { 53, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, 658, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528 }, { 53, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, 659, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529 }, { 53, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530 }, { 53, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, 661, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531 }, { 53, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, 662, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532 }, { 53, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, 663, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533 }, { 53, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, 664, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534 }, { 53, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, 665, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535 }, { 53, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, 666, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536 }, { 53, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, 667, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537 }, { 53, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, 668, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538 }, { 53, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, 669, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539 }, { 53, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, 670, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, 671, 672, 672, 672, 672, 672, 672, 672, 672, 672, -540, -540, -540, -540, -540, -540, -540, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540 }, { 53, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, 673, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, 671, 672, 672, 672, 672, 672, 672, 672, 672, 672, -541, -541, -541, -541, -541, -541, -541, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541 }, { 53, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, 674, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542 }, { 53, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, 675, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543 }, { 53, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, 676, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544 }, { 53, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, 677, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545 }, { 53, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, 678, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546 }, { 53, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, 670, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, -547, -547, -547, -547, -547, -547, -547, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547 }, { 53, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, 679, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548 }, { 53, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, 680, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549 }, { 53, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, 681, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, -550, -550, -550, -550, -550, -550, -550, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550 }, { 53, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, 683, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551 }, { 53, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, 684, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, -552, -552, -552, -552, -552, -552, -552, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552 }, { 53, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, 686, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, 687, 687, 687, 687, 687, 687, 687, 687, 687, 687, -553, -553, -553, -553, -553, -553, -553, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553 }, { 53, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554 }, { 53, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555 }, { 53, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, 689, 690, 690, 690, 690, 690, 690, 690, 690, 690, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556 }, { 53, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, 691, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, 692, 692, 692, 692, 692, 692, 692, 692, 692, 692, -557, -557, -557, -557, -557, -557, -557, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557 }, { 53, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, 693, 693, 693, 693, 693, 693, 693, 693, 693, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558 }, { 53, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, 689, 694, 694, 694, 694, 694, 694, 694, 694, 694, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559 }, { 53, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, 691, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, 692, 695, 695, 695, 695, 695, 695, 695, 695, 695, -560, -560, -560, -560, -560, -560, -560, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560 }, { 53, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, 696, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, -561, -561, -561, -561, -561, -561, -561, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561 }, { 53, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, 698, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562 }, { 53, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, 699, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, -563, -563, -563, -563, -563, -563, -563, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563 }, { 53, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, 691, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, 692, 701, 701, 701, 701, 701, 701, 701, 701, 701, -564, -564, -564, -564, -564, -564, -564, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564 }, { 53, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, 702, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, 703, 703, 703, 703, 703, 703, 703, 703, 703, 703, -565, -565, -565, -565, -565, -565, -565, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565 }, { 53, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, 699, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, 700, 704, 704, 704, 704, 704, 704, 704, 704, 704, -566, -566, -566, -566, -566, -566, -566, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566 }, { 53, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, 705, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, -567, -567, -567, -567, -567, -567, -567, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567 }, { 53, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, 707, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568 }, { 53, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, 708, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, -569, -569, -569, -569, -569, -569, -569, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569 }, { 53, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, 709, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570 }, { 53, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, 710, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571 }, { 53, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, 711, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, -572, -572, -572, -572, -572, -572, -572, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572 }, { 53, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, 699, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, 700, 713, 713, 713, 713, 713, 713, 713, 713, 713, -573, -573, -573, -573, -573, -573, -573, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573 }, { 53, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, 714, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, -574, -574, -574, -574, -574, -574, -574, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574 }, { 53, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, 716, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575 }, { 53, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, 717, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, -576, -576, -576, -576, -576, -576, -576, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576 }, { 53, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, 711, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, 712, 718, 718, 718, 718, 718, 718, 718, 718, 718, -577, -577, -577, -577, -577, -577, -577, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577 }, { 53, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, 719, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, -578, -578, -578, -578, -578, -578, -578, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578 }, { 53, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, 721, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579 }, { 53, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, 722, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, -580, -580, -580, -580, -580, -580, -580, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580 }, { 53, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, 723, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581 }, { 53, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, 724, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582 }, { 53, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, 725, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583 }, { 53, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, 726, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584 }, { 53, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, 727, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, -585, -585, -585, -585, -585, -585, -585, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585 }, { 53, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, 729, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586 }, { 53, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, 730, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, -587, -587, -587, -587, -587, -587, -587, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587 }, { 53, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, 732, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, -588, -588, -588, -588, -588, -588, -588, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588 }, { 53, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589 }, { 53, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590 }, { 53, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591 }, { 53, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, 737, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, -592, -592, -592, -592, -592, -592, -592, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592 }, { 53, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593 }, { 53, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, 740, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, -594, -594, -594, -594, -594, -594, -594, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594 }, { 53, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, 740, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, 742, 742, 742, 742, 742, 742, 742, 742, 742, 742, -595, -595, -595, -595, -595, -595, -595, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595 }, { 53, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, 743, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596 }, { 53, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, 744, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, 745, 745, 745, 745, 745, 745, 745, 745, 745, 745, -597, -597, -597, -597, -597, -597, -597, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597 }, { 53, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, 746, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, -598, -598, -598, -598, -598, -598, -598, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598 }, { 53, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, 746, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, -599, -599, -599, -599, -599, -599, -599, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599 }, { 53, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, 749, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600 }, { 53, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, 750, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, -601, -601, -601, -601, -601, -601, -601, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601 }, { 53, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, 750, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, -602, -602, -602, -602, -602, -602, -602, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602 }, { 53, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, 753, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, 745, 745, 745, 745, 745, 745, 745, 745, 745, 745, -603, -603, -603, -603, -603, -603, -603, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603 }, { 53, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, 754, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604 }, { 53, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, 755, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605 }, { 53, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, 756, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, -606, -606, -606, -606, -606, -606, -606, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606 }, { 53, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, 758, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607 }, { 53, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, 759, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, 760, 760, 760, 760, 760, 760, 760, 760, 760, 760, -608, -608, -608, -608, -608, -608, -608, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608 }, { 53, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, 759, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, 761, 761, 761, 761, 761, 761, 761, 761, 761, 761, -609, -609, -609, -609, -609, -609, -609, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609 }, { 53, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, 762, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, 745, 745, 745, 745, 745, 745, 745, 745, 745, 745, -610, -610, -610, -610, -610, -610, -610, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610 }, { 53, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, 763, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611, -611 }, { 53, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, 764, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612, -612 }, { 53, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, 765, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, 766, 766, 766, 766, 766, 766, 766, 766, 766, 766, -613, -613, -613, -613, -613, -613, -613, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, -613 }, { 53, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, 765, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, -614, -614, -614, -614, -614, -614, -614, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614 }, { 53, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, 768, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, -615, -615, -615, -615, -615, -615, -615, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615, -615 }, { 53, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, 769, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616, -616 }, { 53, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, 770, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617, -617 }, { 53, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618 }, { 53, 619, 619, 619, 619, 619, 619, 619, 619, 619, 620, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 621, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 622, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619 }, { 53, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, -620 }, { 53, 619, 619, 619, 619, 619, 619, 619, 619, 619, 620, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 621, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 622, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619 }, { 53, 619, 619, 619, 619, 619, 619, 619, 619, 619, 620, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 621, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 622, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619 }, { 53, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, 771, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623 }, { 53, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, 772, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624 }, { 53, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, 773, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625 }, { 53, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, 774, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626 }, { 53, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, 775, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627 }, { 53, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, 776, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628 }, { 53, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, 777, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629 }, { 53, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, 778, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630 }, { 53, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, 779, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631 }, { 53, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, 780, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632 }, { 53, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, 781, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633 }, { 53, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, 782, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634 }, { 53, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, 783, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635 }, { 53, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, 784, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636 }, { 53, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, 785, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637 }, { 53, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, 786, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638 }, { 53, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, 787, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639 }, { 53, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, 788, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640 }, { 53, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, 789, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641 }, { 53, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, 790, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642 }, { 53, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, 791, -643, -643, -643, -643, -643, -643, -643, -643, 792, -643, -643, -643, -643, -643, 793, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643 }, { 53, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, 794, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644 }, { 53, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, 795, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645 }, { 53, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, 796, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646 }, { 53, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, 797, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647 }, { 53, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, 798, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648 }, { 53, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, 799, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649 }, { 53, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, 800, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650 }, { 53, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, 801, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, 802, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651 }, { 53, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, 803, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652 }, { 53, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, 804, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653 }, { 53, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, 805, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654 }, { 53, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, 806, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655 }, { 53, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, 807, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656 }, { 53, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, 808, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657 }, { 53, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, 809, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658 }, { 53, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, 810, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659 }, { 53, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660 }, { 53, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, 812, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661 }, { 53, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, 813, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662 }, { 53, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, 814, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663 }, { 53, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, 815, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664 }, { 53, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, 816, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665 }, { 53, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666 }, { 53, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667 }, { 53, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668 }, { 53, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669 }, { 53, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670 }, { 53, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671 }, { 53, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672 }, { 53, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673 }, { 53, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674 }, { 53, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675 }, { 53, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676 }, { 53, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677 }, { 53, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678 }, { 53, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679 }, { 53, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680 }, { 53, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681 }, { 53, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682 }, { 53, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683 }, { 53, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684 }, { 53, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685 }, { 53, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686 }, { 53, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687 }, { 53, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688 }, { 53, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689 }, { 53, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690 }, { 53, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691 }, { 53, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692 }, { 53, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693 }, { 53, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694 }, { 53, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695 }, { 53, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696 }, { 53, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697 }, { 53, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698 }, { 53, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699 }, { 53, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700 }, { 53, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701 }, { 53, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702 }, { 53, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703 }, { 53, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704 }, { 53, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705 }, { 53, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706 }, { 53, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707 }, { 53, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708 }, { 53, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709 }, { 53, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710 }, { 53, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711 }, { 53, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712 }, { 53, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713 }, { 53, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714 }, { 53, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715 }, { 53, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716 }, { 53, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717 }, { 53, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718 }, { 53, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719 }, { 53, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720 }, { 53, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721 }, { 53, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722 }, { 53, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723 }, { 53, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724 }, { 53, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725 }, { 53, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726 }, { 53, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727 }, { 53, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728 }, { 53, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729 }, { 53, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730 }, { 53, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731 }, { 53, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732 }, { 53, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733 }, { 53, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734 }, { 53, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735 }, { 53, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736 }, { 53, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737 }, { 53, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738 }, { 53, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739 }, { 53, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740 }, { 53, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741 }, { 53, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742 }, { 53, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743 }, { 53, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744 }, { 53, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745 }, { 53, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746 }, { 53, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747 }, { 53, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748 }, { 53, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749 }, { 53, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750 }, { 53, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751 }, { 53, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752 }, { 53, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753 }, { 53, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754 }, { 53, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755 }, { 53, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756 }, { 53, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757 }, { 53, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758 }, { 53, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759 }, { 53, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760 }, { 53, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761 }, { 53, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762 }, { 53, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763 }, { 53, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764 }, { 53, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765 }, { 53, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766 }, { 53, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767 }, { 53, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768 }, { 53, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769 }, { 53, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770 }, { 53, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, 817, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771 }, { 53, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, 818, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772 }, { 53, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, 819, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773 }, { 53, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, 820, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774 }, { 53, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, 821, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775 }, { 53, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, 822, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776 }, { 53, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, 823, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777 }, { 53, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, 824, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778 }, { 53, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, 825, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779 }, { 53, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, 826, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780 }, { 53, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, 827, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781 }, { 53, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, 828, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782 }, { 53, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783 }, { 53, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784 }, { 53, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785 }, { 53, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, 829, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786 }, { 53, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, 830, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787 }, { 53, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, 831, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788 }, { 53, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, 832, 833, 834, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789 }, { 53, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, 835, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790 }, { 53, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, 836, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791 }, { 53, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, 837, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792, -792 }, { 53, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, 838, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, 839, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793 }, { 53, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, 840, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794, -794 }, { 53, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, 841, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795, -795 }, { 53, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, 842, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796 }, { 53, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, 843, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797 }, { 53, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, 844, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798 }, { 53, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, 845, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799 }, { 53, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800 }, { 53, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, 846, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801 }, { 53, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802 }, { 53, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803 }, { 53, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804 }, { 53, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805 }, { 53, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806 }, { 53, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807 }, { 53, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808 }, { 53, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, 847, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809 }, { 53, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 848, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810 }, { 53, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811 }, { 53, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, 850, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812 }, { 53, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813 }, { 53, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, 851, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814 }, { 53, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, 852, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815 }, { 53, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816 }, { 53, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817 }, { 53, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818 }, { 53, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819 }, { 53, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820 }, { 53, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821 }, { 53, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822 }, { 53, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823 }, { 53, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824 }, { 53, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825 }, { 53, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826 }, { 53, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, 853, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827 }, { 53, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828 }, { 53, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829 }, { 53, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830 }, { 53, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, 854, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831 }, { 53, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832 }, { 53, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833 }, { 53, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834 }, { 53, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835 }, { 53, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836 }, { 53, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837 }, { 53, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838 }, { 53, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839 }, { 53, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840 }, { 53, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841 }, { 53, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842 }, { 53, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843 }, { 53, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844 }, { 53, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845 }, { 53, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846 }, { 53, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847 }, { 53, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848 }, { 53, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849 }, { 53, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, 855, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850 }, { 53, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851 }, { 53, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852 }, { 53, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, 856, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853 }, { 53, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, 857, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854 }, { 53, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, 858, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855 }, { 53, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, 859, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856 }, { 53, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, 860, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, 861, -857, 861, -857, -857, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857 }, { 53, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, 863, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, 864, -858, 864, -858, -858, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858 }, { 53, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, 866, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859 }, { 53, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, 860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, 861, -860, 861, -860, -860, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860 }, { 53, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861 }, { 53, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, 867, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, 868, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862 }, { 53, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, 863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, 864, -863, 864, -863, -863, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863 }, { 53, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864 }, { 53, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865 }, { 53, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, 869, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866 }, { 53, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, 867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, 868, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867 }, { 53, 870, 870, 870, 870, 870, 870, 870, 870, 870, -868, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870 }, { 53, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, 871, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869 }, { 53, 870, 870, 870, 870, 870, 870, 870, 870, 870, -870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870 }, { 53, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, 872, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871 }, { 53, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, 873, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872 }, { 53, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, 874, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873 }, { 53, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, 875, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874 }, { 53, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, 876, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875 }, { 53, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, 877, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876 }, { 53, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, 878, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877 }, { 53, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, 879, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878 }, { 53, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, 880, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879 }, { 53, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, 881, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880 }, { 53, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, 882, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881 }, { 53, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, 883, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882 }, { 53, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, 884, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883 }, { 53, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, 885, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884 }, { 53, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, 886, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885 }, { 53, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, 887, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886 }, { 53, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, 888, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887 }, { 53, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, 889, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888 }, { 53, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, 890, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889 }, { 53, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, 891, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890 }, { 53, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, 892, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891 }, { 53, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, 893, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892 }, { 53, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, 894, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893 }, { 53, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, 895, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894 }, { 53, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, 896, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895 }, { 53, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, 897, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896 }, { 53, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, 898, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897 }, { 53, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, 899, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898 }, { 53, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, 900, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899 }, { 53, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, 901, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900 }, { 53, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, 902, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901 }, { 53, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, 903, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902 }, { 53, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, 904, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903 }, { 53, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, 905, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904 }, { 53, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, 906, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905 }, { 53, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, 907, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906 }, { 53, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, 908, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907 }, { 53, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, 909, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908 }, { 53, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, 910, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909 }, { 53, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, 911, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910 }, { 53, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, 912, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911 }, { 53, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, 913, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912 }, { 53, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, 914, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913 }, { 53, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, 915, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914 }, { 53, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, 916, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915 }, { 53, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, 917, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916 }, { 53, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, 918, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917 }, { 53, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, 919, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918 }, { 53, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, 920, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919 }, { 53, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, 921, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920 }, { 53, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, 922, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921 }, { 53, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, 923, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922 }, { 53, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, 924, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923 }, { 53, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, 925, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924 }, { 53, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, 926, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925 }, { 53, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, 927, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926 }, { 53, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, 928, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927 }, { 53, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, 929, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928 }, { 53, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, 930, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929 }, { 53, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, 931, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930 }, { 53, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, 932, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931 }, { 53, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, 933, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932 }, { 53, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, 934, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933 }, { 53, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, 935, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934 }, { 53, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, 936, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935 }, { 53, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, 937, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936 }, { 53, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937 }, } ; static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up wcspihtext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ wcspihleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 239 #define YY_END_OF_BUFFER 240 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[938] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 239, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 98, 98, 98, 146, 146, 146, 99, 99, 99, 195, 195, 195, 149, 147, 148, 199, 199, 203, 203, 206, 206, 207, 207, 210, 210, 212, 212, 214, 214, 216, 216, 215, 218, 218, 218, 217, 220, 220, 222, 222, 224, 223, 226, 226, 229, 229, 229, 227, 230, 239, 231, 239, 239, 239, 236, 239, 237, 239, 238, 0, 0, 55, 0, 56, 5, 0, 0, 0, 0, 0, 0, 0, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 18, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 213, 215, 0, 217, 217, 217, 217, 0, 0, 219, 0, 221, 223, 225, 0, 227, 228, 228, 227, 0, 0, 233, 0, 0, 0, 231, 0, 0, 0, 231, 0, 0, 0, 236, 0, 237, 0, 238, 0, 57, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 96, 97, 88, 87, 80, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, 198, 200, 201, 202, 0, 0, 0, 0, 0, 217, 0, 217, 228, 0, 228, 0, 0, 232, 0, 0, 0, 234, 0, 0, 0, 231, 0, 0, 73, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 208, 209, 0, 211, 235, 0, 0, 0, 232, 0, 0, 0, 231, 0, 0, 0, 0, 0, 0, 0, 0, 6, 19, 0, 42, 46, 43, 47, 20, 7, 3, 10, 21, 9, 8, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 205, 0, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 90, 91, 92, 93, 94, 86, 85, 84, 83, 82, 78, 79, 135, 137, 140, 144, 136, 139, 143, 138, 142, 141, 131, 109, 128, 132, 145, 120, 110, 106, 115, 126, 129, 133, 121, 118, 123, 111, 107, 116, 104, 113, 125, 127, 130, 134, 122, 119, 124, 102, 103, 112, 108, 117, 105, 114, 100, 101, 185, 187, 190, 194, 186, 189, 193, 188, 192, 191, 181, 159, 178, 182, 170, 156, 160, 165, 176, 179, 183, 168, 171, 173, 154, 157, 161, 166, 163, 175, 177, 180, 184, 152, 169, 172, 174, 153, 150, 155, 158, 162, 167, 164, 151, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 12, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 13, 15, 33, 34, 35, 36, 37, 0, 0, 0, 0, 40, 0, 0, 41, 51, 53, 49, 52, 54, 50, 59, 60, 22, 23, 0, 24, 26, 27, 0, 28, 29, 30, 72, 69, 70, 71, 68, 65, 66, 67, 61, 62, 32, 14, 38, 39, 75, 0, 63, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; static yyconst yy_state_type yy_NUL_trans[938] = { 0, 54, 55, 73, 73, 76, 76, 79, 79, 82, 82, 85, 85, 87, 87, 88, 88, 90, 90, 92, 92, 94, 94, 96, 96, 98, 98, 100, 100, 102, 102, 105, 105, 109, 109, 111, 111, 113, 113, 115, 115, 117, 117, 54, 54, 122, 122, 126, 126, 128, 128, 130, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 213, 0, 215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 0, 229, 233, 237, 0, 239, 0, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 213, 0, 215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 0, 347, 348, 352, 0, 356, 233, 233, 0, 233, 233, 237, 0, 239, 0, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 469, 0, 0, 0, 0, 0, 0, 347, 348, 0, 348, 348, 352, 0, 352, 474, 352, 0, 356, 478, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 469, 0, 0, 347, 619, 474, 0, 474, 474, 478, 0, 478, 478, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 619, 0, 619, 619, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 870, 0, 870, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ; extern int wcspih_flex_debug; int wcspih_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *wcspihtext; #line 1 "wcspih.l" /*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcspih.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * wcspih.l is a Flex description file containing the definition of a lexical * scanner for parsing the WCS keyrecords from a FITS primary image or image * extension header. * * wcspih.l requires Flex v2.5.4 or later. Refer to wcshdr.h for a description * of the user interface and operating notes. * * Implementation notes * -------------------- * Use of the WCSAXESa keyword is not mandatory. Its default value is "the * larger of NAXIS and the largest index of these keywords [i.e. CRPIXj, PCi_j * or CDi_j, CDELTi, CTYPEi, CRVALi, and CUNITi] found in the FITS header". * Consequently the definition of WCSAXESa effectively invalidates the use of * NAXIS for determining the number of coordinate axes and forces a preliminary * pass through the header to determine the "largest index" in headers where * WCSAXESa was omitted. * * Furthermore, since the use of WCSAXESa is optional, there is no way to * determine the number of coordinate representations (the "a" value) other * than by parsing all of the WCS keywords in the header; even if WCSAXESa was * specified for some representations it cannot be known in advance whether it * was specified for all of those present in the header. * * Hence the definition of WCSAXESa forces the scanner to be implemented in two * passes. The first pass is used to determine the number of coordinate * representations (up to 27) and the number of coordinate axes in each. * Effectively WCSAXESa is ignored unless it exceeds the "largest index" in * which case the keywords for the extra axes assume their default values. The * number of PVi_ma and PSi_ma keywords in each representation is also counted * in the first pass. * * On completion of the first pass, memory is allocated for an array of the * required number of wcsprm structs and each of these is initialized * appropriately. These structs are filled in the second pass. * * The parser does not check for duplicated keywords, it accepts the last * encountered. * *===========================================================================*/ /* Options. */ /* Indices for parameterized keywords. */ /* Alternate coordinate system identifier. */ /* Keyvalue data types. */ /* Inline comment syntax. */ /* Exclusive start states. */ #line 110 "wcspih.l" #include #include #include #include #include #include "wcsmath.h" #include "wcsprintf.h" #include "wcsutil.h" #include "dis.h" #include "wcs.h" #include "wcshdr.h" #define INTEGER 0 #define FLOAT 1 #define STRING 2 #define RECORD 3 #define PRIOR 1 #define SEQUENT 2 #define SIP 1 #define DSS 2 #define WAT 3 #define YY_DECL int wcspih(char *header, int nkeyrec, int relax, int ctrl, \ int *nreject, int *nwcs, struct wcsprm **wcs) #define YY_INPUT(inbuff, count, bufsize) \ { \ if (wcspih_nkeyrec) { \ strncpy(inbuff, wcspih_hdr, 80); \ inbuff[80] = '\n'; \ wcspih_hdr += 80; \ wcspih_nkeyrec--; \ count = 81; \ } else { \ count = YY_NULL; \ } \ } /* These global variables are required by YY_INPUT. */ char *wcspih_hdr; int wcspih_nkeyrec; int wcspih_final(int alts[], int ndp[], int ndq[], int distran, double dsstmp[], char *wat[], int *nwcs, struct wcsprm **wcs); int wcspih_inits(int naxis, int alts[], int dpq[], int npv[], int nps[], int ndp[], int ndq[], int distran, int *nwcs, struct wcsprm **wcs); void wcspih_naxes(int naxis, int i, int j, char a, int distype, int alts[], int dpq[], int *npptr); int wcspih_epoch(double *wptr, double epoch); int wcspih_vsource(double *wptr, double vsource); /* Used in preempting the call to exit() by yy_fatal_error(). */ jmp_buf wcspih_abort_jmp_env; #define exit(status) longjmp(wcspih_abort_jmp_env, status) #line 17004 "wcspih.c" #define INITIAL 0 #define CCia 1 #define CCi_ja 2 #define CCCCCia 3 #define CCi_ma 4 #define CCCCCCCa 5 #define CCCCCCCC 6 #define CROTAi 7 #define PROJPn 8 #define SIP2 9 #define SIP3 10 #define DSSAMDXY 11 #define PLTDECSN 12 #define VALUE 13 #define INTEGER_VAL 14 #define FLOAT_VAL 15 #define STRING_VAL 16 #define RECORD_VAL 17 #define RECFIELD 18 #define RECCOLON 19 #define RECVALUE 20 #define RECEND 21 #define COMMENT 22 #define DISCARD 23 #define ERROR 24 #define FLUSH 25 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int wcspihlex_destroy (void ); int wcspihget_debug (void ); void wcspihset_debug (int debug_flag ); YY_EXTRA_TYPE wcspihget_extra (void ); void wcspihset_extra (YY_EXTRA_TYPE user_defined ); FILE *wcspihget_in (void ); void wcspihset_in (FILE * in_str ); FILE *wcspihget_out (void ); void wcspihset_out (FILE * out_str ); yy_size_t wcspihget_leng (void ); char *wcspihget_text (void ); int wcspihget_lineno (void ); void wcspihset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int wcspihwrap (void ); #else extern int wcspihwrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( wcspihtext, wcspihleng, 1, wcspihout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ errno=0; \ while ( (result = read( fileno(wcspihin), (char *) buf, max_size )) < 0 ) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(wcspihin); \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int wcspihlex (void); #define YY_DECL int wcspihlex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after wcspihtext and wcspihleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ if ( wcspihleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (wcspihtext[wcspihleng - 1] == '\n'); \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! wcspihin ) wcspihin = stdin; if ( ! wcspihout ) wcspihout = stdout; if ( ! YY_CURRENT_BUFFER ) { wcspihensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = wcspih_create_buffer(wcspihin,YY_BUF_SIZE ); } wcspih_load_buffer_state( ); } { #line 172 "wcspih.l" /* Keyword indices, as used in the WCS papers, e.g. PCi_ja, PVi_ma. */ char a; int i, j, m, p, q; char *cptr, *errmsg, errtxt[80], *hptr, *keep, *keyname, *keyrec, keyword[16], strtmp[80], *wat[2], *watstr; int altlin, alts[27], distran, distype, dpq[27], dssflag, gotone, ialt, inttmp, ipass, ipx, ix, jx, naxis, ndp[27], ndq[27], nother, *npptr, nps[27], npass, npv[27], nvalid, rectype, sipflag, status, valtype, voff, watflag, watn; double dbltmp, dsstmp[20]; void *vptr, *wptr; struct disprm *disp, distem; struct wcsprm *wcsp, wcstem; int (*special)(double *, double); int wcspihlex_destroy(void); naxis = 0; for (ialt = 0; ialt < 27; ialt++) { alts[ialt] = 0; dpq[ialt] = 0; npv[ialt] = 0; nps[ialt] = 0; ndp[ialt] = 0; ndq[ialt] = 0; } /* Parameters used to implement YY_INPUT. */ wcspih_hdr = header; wcspih_nkeyrec = nkeyrec; /* Our handle on the input stream. */ keyrec = header; hptr = header; keep = 0x0; /* For keeping tallies of keywords found. */ *nreject = 0; nvalid = 0; nother = 0; /* If strict, then also reject. */ if (relax & WCSHDR_strict) relax |= WCSHDR_reject; /* Keyword parameters. */ i = j = 0; m = 0; a = ' '; /* For decoding the keyvalue. */ valtype = -1; distype = 0; vptr = 0x0; /* For keywords that require special handling. */ altlin = 0; npptr = 0x0; special = 0x0; distran = 0; sipflag = 0; dssflag = 0; watflag = 0; watn = 0; /* The data structures produced. */ *nwcs = 0; *wcs = 0x0; /* Control variables. */ ipass = 1; npass = 2; /* Return here via longjmp() invoked by yy_fatal_error(). */ if (setjmp(wcspih_abort_jmp_env)) { return 3; } BEGIN(INITIAL); #line 17312 "wcspih.c" while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of wcspihtext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); yy_match: while ( (yy_current_state = yy_nxt[yy_current_state][ YY_SC_TO_UI(*yy_cp) ]) > 0 ) { if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } ++yy_cp; } yy_current_state = -yy_current_state; yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos) + 1; yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 253 "wcspih.l" { keyname = "NAXISn"; if (ipass == 1) { sscanf(wcspihtext, "NAXIS = %d", &naxis); if (naxis < 0) naxis = 0; BEGIN(FLUSH); } else { sscanf(wcspihtext, "NAXIS = %d", &i); if (i < 0) { errmsg = "negative value of NAXIS ignored"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } } YY_BREAK case 2: YY_RULE_SETUP #line 273 "wcspih.l" { sscanf(wcspihtext, "WCSAXES%c= %d", &a, &i); if (i < 0) { errmsg = "negative value of WCSAXESa ignored"; BEGIN(ERROR); } else { valtype = INTEGER; vptr = 0x0; keyname = "WCSAXESa"; BEGIN(COMMENT); } } YY_BREAK case 3: YY_RULE_SETUP #line 289 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.crpix); keyname = "CRPIXja"; BEGIN(CCCCCia); } YY_BREAK case 4: YY_RULE_SETUP #line 297 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.pc); altlin = 1; keyname = "PCi_ja"; BEGIN(CCi_ja); } YY_BREAK case 5: YY_RULE_SETUP #line 306 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.cd); altlin = 2; keyname = "CDi_ja"; BEGIN(CCi_ja); } YY_BREAK case 6: YY_RULE_SETUP #line 315 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.cdelt); keyname = "CDELTia"; BEGIN(CCCCCia); } YY_BREAK case 7: YY_RULE_SETUP #line 323 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.crota); altlin = 4; keyname = "CROTAn"; BEGIN(CROTAi); } YY_BREAK case 8: YY_RULE_SETUP #line 332 "wcspih.l" { valtype = STRING; vptr = &(wcstem.cunit); keyname = "CUNITia"; BEGIN(CCCCCia); } YY_BREAK case 9: YY_RULE_SETUP #line 340 "wcspih.l" { valtype = STRING; vptr = &(wcstem.ctype); keyname = "CTYPEia"; BEGIN(CCCCCia); } YY_BREAK case 10: YY_RULE_SETUP #line 348 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.crval); keyname = "CRVALia"; BEGIN(CCCCCia); } YY_BREAK case 11: YY_RULE_SETUP #line 356 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.lonpole); keyname = "LONPOLEa"; BEGIN(CCCCCCCa); } YY_BREAK case 12: YY_RULE_SETUP #line 364 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.latpole); keyname = "LATPOLEa"; BEGIN(CCCCCCCa); } YY_BREAK case 13: YY_RULE_SETUP #line 372 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.restfrq); keyname = "RESTFRQa"; BEGIN(CCCCCCCa); } YY_BREAK case 14: YY_RULE_SETUP #line 380 "wcspih.l" { if (relax & WCSHDR_strict) { errmsg = "the RESTFREQ keyword is deprecated, use RESTFRQa"; BEGIN(ERROR); } else { valtype = FLOAT; vptr = &(wcstem.restfrq); unput(' '); keyname = "RESTFREQ"; BEGIN(CCCCCCCa); } } YY_BREAK case 15: YY_RULE_SETUP #line 396 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.restwav); keyname = "RESTWAVa"; BEGIN(CCCCCCCa); } YY_BREAK case 16: YY_RULE_SETUP #line 404 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.pv); npptr = npv; keyname = "PVi_ma"; BEGIN(CCi_ma); } YY_BREAK case 17: YY_RULE_SETUP #line 413 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.pv); npptr = npv; keyname = "PROJPn"; BEGIN(PROJPn); } YY_BREAK case 18: YY_RULE_SETUP #line 422 "wcspih.l" { valtype = STRING; vptr = &(wcstem.ps); npptr = nps; keyname = "PSi_ma"; BEGIN(CCi_ma); } YY_BREAK case 19: YY_RULE_SETUP #line 431 "wcspih.l" { valtype = STRING; vptr = &(wcstem.cname); keyname = "CNAMEia"; BEGIN(CCCCCia); } YY_BREAK case 20: YY_RULE_SETUP #line 439 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.crder); keyname = "CRDERia"; BEGIN(CCCCCia); } YY_BREAK case 21: YY_RULE_SETUP #line 447 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.csyer); keyname = "CSYERia"; BEGIN(CCCCCia); } YY_BREAK case 22: YY_RULE_SETUP #line 455 "wcspih.l" { valtype = STRING; vptr = wcstem.dateavg; if (ctrl < -10) keep = keyrec; keyname = "DATE-AVG"; BEGIN(CCCCCCCC); } YY_BREAK case 23: YY_RULE_SETUP #line 464 "wcspih.l" { valtype = STRING; vptr = wcstem.dateobs; if (ctrl < -10) keep = keyrec; keyname = "DATE-OBS"; BEGIN(CCCCCCCC); } YY_BREAK case 24: YY_RULE_SETUP #line 473 "wcspih.l" { sscanf(wcspihtext, "EPOCH%c", &a); if (relax & WCSHDR_strict) { errmsg = "the EPOCH keyword is deprecated, use EQUINOXa"; BEGIN(ERROR); } else if (a == ' ' || relax & WCSHDR_EPOCHa) { valtype = FLOAT; vptr = &(wcstem.equinox); special = wcspih_epoch; unput(a); keyname = "EPOCH"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "EPOCH keyword may not have an alternate version code"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 25: YY_RULE_SETUP #line 499 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.equinox); keyname = "EQUINOXa"; BEGIN(CCCCCCCa); } YY_BREAK case 26: YY_RULE_SETUP #line 507 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.mjdavg); if (ctrl < -10) keep = keyrec; keyname = "MJD-AVG"; BEGIN(CCCCCCCC); } YY_BREAK case 27: YY_RULE_SETUP #line 517 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.mjdobs); if (ctrl < -10) keep = keyrec; keyname = "MJD-OBS"; BEGIN(CCCCCCCC); } YY_BREAK case 28: YY_RULE_SETUP #line 527 "wcspih.l" { valtype = FLOAT; vptr = wcstem.obsgeo; if (ctrl < -10) keep = keyrec; keyname = "OBSGEO-X"; BEGIN(CCCCCCCC); } YY_BREAK case 29: YY_RULE_SETUP #line 537 "wcspih.l" { valtype = FLOAT; vptr = wcstem.obsgeo + 1; if (ctrl < -10) keep = keyrec; keyname = "OBSGEO-Y"; BEGIN(CCCCCCCC); } YY_BREAK case 30: YY_RULE_SETUP #line 547 "wcspih.l" { valtype = FLOAT; vptr = wcstem.obsgeo + 2; if (ctrl < -10) keep = keyrec; keyname = "OBSGEO-Z"; BEGIN(CCCCCCCC); } YY_BREAK case 31: YY_RULE_SETUP #line 557 "wcspih.l" { valtype = STRING; vptr = wcstem.radesys; keyname = "RADESYSa"; BEGIN(CCCCCCCa); } YY_BREAK case 32: YY_RULE_SETUP #line 565 "wcspih.l" { if (relax & WCSHDR_RADECSYS) { valtype = STRING; vptr = wcstem.radesys; unput(' '); keyname = "RADECSYS"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "the RADECSYS keyword is deprecated, use RADESYSa"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 33: YY_RULE_SETUP #line 584 "wcspih.l" { valtype = STRING; vptr = wcstem.specsys; keyname = "SPECSYSa"; BEGIN(CCCCCCCa); } YY_BREAK case 34: YY_RULE_SETUP #line 592 "wcspih.l" { valtype = STRING; vptr = wcstem.ssysobs; keyname = "SSYSOBSa"; BEGIN(CCCCCCCa); } YY_BREAK case 35: YY_RULE_SETUP #line 600 "wcspih.l" { valtype = STRING; vptr = wcstem.ssyssrc; keyname = "SSYSSRCa"; BEGIN(CCCCCCCa); } YY_BREAK case 36: YY_RULE_SETUP #line 608 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.velangl); keyname = "VELANGLa"; BEGIN(CCCCCCCa); } YY_BREAK case 37: YY_RULE_SETUP #line 616 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.velosys); keyname = "VELOSYSa"; BEGIN(CCCCCCCa); } YY_BREAK case 38: YY_RULE_SETUP #line 624 "wcspih.l" { sscanf(wcspihtext, "VELREF%c", &a); if (relax & WCSHDR_strict) { errmsg = "the VELREF keyword is deprecated, use SPECSYSa"; BEGIN(ERROR); } else if (a == ' ' || relax & WCSHDR_VELREFa) { valtype = INTEGER; vptr = &(wcstem.velref); unput(a); keyname = "VELREF"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "VELREF keyword may not have an alternate version code"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 39: YY_RULE_SETUP #line 649 "wcspih.l" { if (relax & WCSHDR_VSOURCE) { valtype = FLOAT; vptr = &(wcstem.zsource); special = wcspih_vsource; yyless(7); keyname = "VSOURCEa"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "the VSOURCEa keyword is deprecated, use ZSOURCEa"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 40: YY_RULE_SETUP #line 669 "wcspih.l" { valtype = STRING; vptr = wcstem.wcsname; keyname = "WCSNAMEa"; BEGIN(CCCCCCCa); } YY_BREAK case 41: YY_RULE_SETUP #line 677 "wcspih.l" { valtype = FLOAT; vptr = &(wcstem.zsource); keyname = "ZSOURCEa"; BEGIN(CCCCCCCa); } YY_BREAK case 42: YY_RULE_SETUP #line 685 "wcspih.l" { valtype = STRING; distype = PRIOR; vptr = &(distem.dtype); keyname = "CPDISja"; BEGIN(CCCCCia); } YY_BREAK case 43: YY_RULE_SETUP #line 694 "wcspih.l" { valtype = STRING; distype = SEQUENT; vptr = &(distem.dtype); keyname = "CQDISia"; BEGIN(CCCCCia); } YY_BREAK case 44: YY_RULE_SETUP #line 703 "wcspih.l" { valtype = RECORD; distype = PRIOR; vptr = &(distem.dp); npptr = ndp; keyname = "DPja"; BEGIN(CCia); } YY_BREAK case 45: YY_RULE_SETUP #line 713 "wcspih.l" { valtype = RECORD; distype = SEQUENT; vptr = &(distem.dp); npptr = ndq; keyname = "DQia"; BEGIN(CCia); } YY_BREAK case 46: YY_RULE_SETUP #line 723 "wcspih.l" { valtype = FLOAT; distype = PRIOR; vptr = &(distem.maxdis); keyname = "CPERRja"; BEGIN(CCCCCia); } YY_BREAK case 47: YY_RULE_SETUP #line 732 "wcspih.l" { valtype = FLOAT; distype = SEQUENT; vptr = &(distem.maxdis); keyname = "CQERRia"; BEGIN(CCCCCia); } YY_BREAK case 48: YY_RULE_SETUP #line 741 "wcspih.l" { valtype = FLOAT; distype = PRIOR; vptr = &(distem.totdis); keyname = "DVERRa"; BEGIN(CCCCCCCa); } YY_BREAK case 49: YY_RULE_SETUP #line 750 "wcspih.l" { /* SIP: axis 1 polynomial degree (not stored). */ valtype = INTEGER; distype = PRIOR; vptr = 0x0; i = 1; a = ' '; keyname = "A_ORDER"; BEGIN(VALUE); } YY_BREAK case 50: YY_RULE_SETUP #line 763 "wcspih.l" { /* SIP: axis 2 polynomial degree (not stored). */ valtype = INTEGER; distype = PRIOR; vptr = 0x0; i = 2; a = ' '; keyname = "B_ORDER"; BEGIN(VALUE); } YY_BREAK case 51: YY_RULE_SETUP #line 776 "wcspih.l" { /* SIP: axis 1 inverse polynomial degree (not stored). */ valtype = INTEGER; distype = PRIOR; vptr = 0x0; i = 1; a = ' '; keyname = "AP_ORDER"; BEGIN(VALUE); } YY_BREAK case 52: YY_RULE_SETUP #line 789 "wcspih.l" { /* SIP: axis 2 inverse polynomial degree (not stored). */ valtype = INTEGER; distype = PRIOR; vptr = 0x0; i = 2; a = ' '; keyname = "BP_ORDER"; BEGIN(VALUE); } YY_BREAK case 53: YY_RULE_SETUP #line 802 "wcspih.l" { /* SIP: axis 1 maximum distortion. */ valtype = FLOAT; distype = PRIOR; vptr = &(distem.maxdis); i = 1; a = ' '; keyname = "A_DMAX"; BEGIN(VALUE); } YY_BREAK case 54: YY_RULE_SETUP #line 815 "wcspih.l" { /* SIP: axis 2 maximum distortion. */ valtype = FLOAT; distype = PRIOR; vptr = &(distem.maxdis); i = 2; a = ' '; keyname = "B_DMAX"; BEGIN(VALUE); } YY_BREAK case 55: YY_RULE_SETUP #line 828 "wcspih.l" { /* SIP: axis 1 polynomial coefficient. */ i = 1; sipflag = 2; keyname = "A_p_q"; BEGIN(SIP2); } YY_BREAK case 56: YY_RULE_SETUP #line 837 "wcspih.l" { /* SIP: axis 2 polynomial coefficient. */ i = 2; sipflag = 2; keyname = "B_p_q"; BEGIN(SIP2); } YY_BREAK case 57: YY_RULE_SETUP #line 846 "wcspih.l" { /* SIP: axis 1 inverse polynomial coefficient. */ i = 1; sipflag = 3; keyname = "AP_p_q"; BEGIN(SIP3); } YY_BREAK case 58: YY_RULE_SETUP #line 855 "wcspih.l" { /* SIP: axis 2 inverse polynomial coefficient. */ i = 2; sipflag = 3; keyname = "BP_p_q"; BEGIN(SIP3); } YY_BREAK case 59: YY_RULE_SETUP #line 864 "wcspih.l" { /* DSS: LLH corner pixel coordinate 1. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp; dssflag = 1; distran = DSS; keyname = "CNPIX1"; BEGIN(VALUE); } YY_BREAK case 60: YY_RULE_SETUP #line 876 "wcspih.l" { /* DSS: LLH corner pixel coordinate 2. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+1; dssflag = 1; distran = DSS; keyname = "CNPIX1"; BEGIN(VALUE); } YY_BREAK case 61: YY_RULE_SETUP #line 888 "wcspih.l" { /* DSS: plate centre x-coordinate in micron. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+2; dssflag = 1; distran = DSS; keyname = "PPO3"; BEGIN(VALUE); } YY_BREAK case 62: YY_RULE_SETUP #line 900 "wcspih.l" { /* DSS: plate centre y-coordinate in micron. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+3; dssflag = 1; distran = DSS; keyname = "PPO6"; BEGIN(VALUE); } YY_BREAK case 63: YY_RULE_SETUP #line 912 "wcspih.l" { /* DSS: pixel x-dimension in micron. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+4; dssflag = 1; distran = DSS; keyname = "XPIXELSZ"; BEGIN(VALUE); } YY_BREAK case 64: YY_RULE_SETUP #line 924 "wcspih.l" { /* DSS: pixel y-dimension in micron. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+5; dssflag = 1; distran = DSS; keyname = "YPIXELSZ"; BEGIN(VALUE); } YY_BREAK case 65: YY_RULE_SETUP #line 936 "wcspih.l" { /* DSS: plate centre, right ascension - hours. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+6; dssflag = 1; distran = DSS; keyname = "PLTRAH"; BEGIN(VALUE); } YY_BREAK case 66: YY_RULE_SETUP #line 948 "wcspih.l" { /* DSS: plate centre, right ascension - minutes. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+7; dssflag = 1; distran = DSS; keyname = "PLTRAM"; BEGIN(VALUE); } YY_BREAK case 67: YY_RULE_SETUP #line 960 "wcspih.l" { /* DSS: plate centre, right ascension - seconds. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+8; dssflag = 1; distran = DSS; keyname = "PLTRAS"; BEGIN(VALUE); } YY_BREAK case 68: YY_RULE_SETUP #line 972 "wcspih.l" { /* DSS: plate centre, declination - sign. */ valtype = STRING; distype = SEQUENT; vptr = dsstmp+9; dssflag = 1; distran = DSS; keyname = "PLTDECSN"; BEGIN(PLTDECSN); } YY_BREAK case 69: YY_RULE_SETUP #line 984 "wcspih.l" { /* DSS: plate centre, declination - degrees. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+10; dssflag = 1; distran = DSS; keyname = "PLTDECD"; BEGIN(VALUE); } YY_BREAK case 70: YY_RULE_SETUP #line 996 "wcspih.l" { /* DSS: plate centre, declination - arcmin. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+11; dssflag = 1; distran = DSS; keyname = "PLTDECM"; BEGIN(VALUE); } YY_BREAK case 71: YY_RULE_SETUP #line 1008 "wcspih.l" { /* DSS: plate centre, declination - arcsec. */ valtype = FLOAT; distype = SEQUENT; vptr = dsstmp+12; dssflag = 1; distran = DSS; keyname = "PLTDECS"; BEGIN(VALUE); } YY_BREAK case 72: YY_RULE_SETUP #line 1020 "wcspih.l" { /* DSS: plate identification. */ valtype = STRING; distype = SEQUENT; vptr = dsstmp+13; dssflag = 2; distran = DSS; keyname = "PLATEID"; BEGIN(VALUE); } YY_BREAK case 73: YY_RULE_SETUP #line 1032 "wcspih.l" { /* DSS: axis 1 polynomial coefficient. */ i = 1; dssflag = 3; keyname = "AMDXm"; BEGIN(DSSAMDXY); } YY_BREAK case 74: YY_RULE_SETUP #line 1041 "wcspih.l" { /* DSS: axis 2 polynomial coefficient. */ i = 2; dssflag = 3; keyname = "AMDYm"; BEGIN(DSSAMDXY); } YY_BREAK case 75: YY_RULE_SETUP #line 1050 "wcspih.l" { /* TNX or ZPX: string-encoded data array. */ sscanf(wcspihtext, "WAT%d_%d", &i, &m); if (watn < m) watn = m; watflag = 1; valtype = STRING; distype = SEQUENT; vptr = wat[i-1] + 68*(m-1); a = ' '; distran = WAT; keyname = "WATi_m"; BEGIN(VALUE); } YY_BREAK case 76: YY_RULE_SETUP #line 1067 "wcspih.l" { if (wcspih_nkeyrec) { wcspih_nkeyrec = 0; errmsg = "keyrecords following the END keyrecord were ignored"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 77: YY_RULE_SETUP #line 1077 "wcspih.l" { BEGIN(DISCARD); } YY_BREAK case 78: #line 1082 "wcspih.l" case 79: #line 1083 "wcspih.l" case 80: #line 1084 "wcspih.l" case 81: YY_RULE_SETUP #line 1084 "wcspih.l" { sscanf(wcspihtext, "%d%c", &i, &a); BEGIN(VALUE); } YY_BREAK case 82: #line 1090 "wcspih.l" case 83: #line 1091 "wcspih.l" case 84: #line 1092 "wcspih.l" case 85: #line 1093 "wcspih.l" case 86: #line 1094 "wcspih.l" case 87: #line 1095 "wcspih.l" case 88: YY_RULE_SETUP #line 1095 "wcspih.l" { if (relax & WCSHDR_reject) { /* Violates the basic FITS standard. */ errmsg = "indices in parameterized keywords must not have " "leading zeroes"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 89: #line 1109 "wcspih.l" case 90: #line 1110 "wcspih.l" case 91: #line 1111 "wcspih.l" case 92: #line 1112 "wcspih.l" case 93: #line 1113 "wcspih.l" case 94: #line 1114 "wcspih.l" case 95: #line 1115 "wcspih.l" case 96: #line 1116 "wcspih.l" case 97: YY_RULE_SETUP #line 1116 "wcspih.l" { /* Anything that has fallen through to this point must contain */ /* an invalid axis number. */ errmsg = "axis number must exceed 0"; BEGIN(ERROR); } YY_BREAK case 98: YY_RULE_SETUP #line 1123 "wcspih.l" { /* Let it go. */ BEGIN(DISCARD); } YY_BREAK case 99: YY_RULE_SETUP #line 1128 "wcspih.l" { if (relax & WCSHDR_reject) { /* Looks too much like a FITS WCS keyword not to flag it. */ errmsg = errtxt; sprintf(errmsg, "keyword looks very much like %s but isn't", keyname); BEGIN(ERROR); } else { /* Let it go. */ BEGIN(DISCARD); } } YY_BREAK case 100: #line 1143 "wcspih.l" case 101: #line 1144 "wcspih.l" case 102: #line 1145 "wcspih.l" case 103: YY_RULE_SETUP #line 1145 "wcspih.l" { sscanf(wcspihtext, "%d_%d%c", &i, &j, &a); BEGIN(VALUE); } YY_BREAK case 104: #line 1152 "wcspih.l" case 105: #line 1153 "wcspih.l" case 106: #line 1154 "wcspih.l" case 107: #line 1155 "wcspih.l" case 108: #line 1156 "wcspih.l" case 109: #line 1157 "wcspih.l" case 110: #line 1158 "wcspih.l" case 111: #line 1159 "wcspih.l" case 112: #line 1160 "wcspih.l" case 113: #line 1161 "wcspih.l" case 114: #line 1162 "wcspih.l" case 115: #line 1163 "wcspih.l" case 116: #line 1164 "wcspih.l" case 117: #line 1165 "wcspih.l" case 118: #line 1166 "wcspih.l" case 119: #line 1167 "wcspih.l" case 120: #line 1168 "wcspih.l" case 121: #line 1169 "wcspih.l" case 122: #line 1170 "wcspih.l" case 123: #line 1171 "wcspih.l" case 124: YY_RULE_SETUP #line 1171 "wcspih.l" { if (((altlin == 1) && (relax & WCSHDR_PC0i_0ja)) || ((altlin == 2) && (relax & WCSHDR_CD0i_0ja))) { sscanf(wcspihtext, "%d_%d%c", &i, &j, &a); BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = "indices in parameterized keywords must not have " "leading zeroes"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 125: #line 1189 "wcspih.l" case 126: #line 1190 "wcspih.l" case 127: #line 1191 "wcspih.l" case 128: #line 1192 "wcspih.l" case 129: #line 1193 "wcspih.l" case 130: #line 1194 "wcspih.l" case 131: #line 1195 "wcspih.l" case 132: #line 1196 "wcspih.l" case 133: #line 1197 "wcspih.l" case 134: YY_RULE_SETUP #line 1197 "wcspih.l" { /* Anything that has fallen through to this point must contain */ /* an invalid axis number. */ errmsg = "axis number must exceed 0"; BEGIN(ERROR); } YY_BREAK case 135: #line 1205 "wcspih.l" case 136: #line 1206 "wcspih.l" case 137: #line 1207 "wcspih.l" case 138: #line 1208 "wcspih.l" case 139: #line 1209 "wcspih.l" case 140: #line 1210 "wcspih.l" case 141: #line 1211 "wcspih.l" case 142: #line 1212 "wcspih.l" case 143: #line 1213 "wcspih.l" case 144: YY_RULE_SETUP #line 1213 "wcspih.l" { errmsg = errtxt; sprintf(errmsg, "%s keyword must use an underscore, not a dash", keyname); BEGIN(ERROR); } YY_BREAK case 145: YY_RULE_SETUP #line 1220 "wcspih.l" { /* This covers the defunct forms CD00i00j and PC00i00j. */ if (((altlin == 1) && (relax & WCSHDR_PC00i00j)) || ((altlin == 2) && (relax & WCSHDR_CD00i00j))) { sscanf(wcspihtext, "%3d%3d", &i, &j); a = ' '; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "this form of the %s keyword is deprecated, use %s", keyname, keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 146: YY_RULE_SETUP #line 1241 "wcspih.l" { BEGIN(DISCARD); } YY_BREAK case 147: #line 1246 "wcspih.l" case 148: YY_RULE_SETUP #line 1246 "wcspih.l" { if (YY_START == CCCCCCCa) { sscanf(wcspihtext, "%c", &a); } else { unput(wcspihtext[0]); a = 0; } BEGIN(VALUE); } YY_BREAK case 149: YY_RULE_SETUP #line 1257 "wcspih.l" { if (relax & WCSHDR_reject) { /* Looks too much like a FITS WCS keyword not to flag it. */ errmsg = errtxt; sprintf(errmsg, "invalid alternate code, keyword resembles %s " "but isn't", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 150: #line 1272 "wcspih.l" case 151: #line 1273 "wcspih.l" case 152: #line 1274 "wcspih.l" case 153: YY_RULE_SETUP #line 1274 "wcspih.l" { sscanf(wcspihtext, "%d_%d%c", &i, &m, &a); BEGIN(VALUE); } YY_BREAK case 154: #line 1280 "wcspih.l" case 155: #line 1281 "wcspih.l" case 156: #line 1282 "wcspih.l" case 157: #line 1283 "wcspih.l" case 158: #line 1284 "wcspih.l" case 159: #line 1285 "wcspih.l" case 160: #line 1286 "wcspih.l" case 161: #line 1287 "wcspih.l" case 162: #line 1288 "wcspih.l" case 163: #line 1289 "wcspih.l" case 164: #line 1290 "wcspih.l" case 165: #line 1291 "wcspih.l" case 166: #line 1292 "wcspih.l" case 167: #line 1293 "wcspih.l" case 168: #line 1294 "wcspih.l" case 169: #line 1295 "wcspih.l" case 170: #line 1296 "wcspih.l" case 171: #line 1297 "wcspih.l" case 172: #line 1298 "wcspih.l" case 173: #line 1299 "wcspih.l" case 174: YY_RULE_SETUP #line 1299 "wcspih.l" { if (((valtype == FLOAT) && (relax & WCSHDR_PV0i_0ma)) || ((valtype == STRING) && (relax & WCSHDR_PS0i_0ma))) { sscanf(wcspihtext, "%d_%d%c", &i, &m, &a); BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = "indices in parameterized keywords must not have " "leading zeroes"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 175: #line 1317 "wcspih.l" case 176: #line 1318 "wcspih.l" case 177: #line 1319 "wcspih.l" case 178: #line 1320 "wcspih.l" case 179: #line 1321 "wcspih.l" case 180: #line 1322 "wcspih.l" case 181: #line 1323 "wcspih.l" case 182: #line 1324 "wcspih.l" case 183: #line 1325 "wcspih.l" case 184: YY_RULE_SETUP #line 1325 "wcspih.l" { /* Anything that has fallen through to this point must contain */ /* an invalid axis number. */ errmsg = "axis number must exceed 0"; BEGIN(ERROR); } YY_BREAK case 185: #line 1333 "wcspih.l" case 186: #line 1334 "wcspih.l" case 187: #line 1335 "wcspih.l" case 188: #line 1336 "wcspih.l" case 189: #line 1337 "wcspih.l" case 190: #line 1338 "wcspih.l" case 191: #line 1339 "wcspih.l" case 192: #line 1340 "wcspih.l" case 193: #line 1341 "wcspih.l" case 194: YY_RULE_SETUP #line 1341 "wcspih.l" { errmsg = errtxt; sprintf(errmsg, "%s keyword must use an underscore, not a dash", keyname); BEGIN(ERROR); } YY_BREAK case 195: YY_RULE_SETUP #line 1348 "wcspih.l" { BEGIN(DISCARD); } YY_BREAK case 196: #line 1353 "wcspih.l" case 197: #line 1354 "wcspih.l" case 198: YY_RULE_SETUP #line 1354 "wcspih.l" { a = ' '; sscanf(wcspihtext, "%d%c", &i, &a); if (relax & WCSHDR_strict) { errmsg = "the CROTAn keyword is deprecated, use PCi_ja"; BEGIN(ERROR); } else if (a == ' ' || relax & WCSHDR_CROTAia) { yyless(0); BEGIN(CCCCCia); } else if (relax & WCSHDR_reject) { errmsg = "CROTAn keyword may not have an alternate version code"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 199: YY_RULE_SETUP #line 1376 "wcspih.l" { yyless(0); BEGIN(CCCCCia); } YY_BREAK case 200: YY_RULE_SETUP #line 1381 "wcspih.l" { if (relax & WCSHDR_PROJPn) { sscanf(wcspihtext, "%d", &m); i = 0; a = ' '; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = "the PROJPn keyword is deprecated, use PVi_ma"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 201: #line 1398 "wcspih.l" case 202: YY_RULE_SETUP #line 1398 "wcspih.l" { if (relax & (WCSHDR_PROJPn | WCSHDR_reject)) { errmsg = "invalid PROJPn keyword"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 203: YY_RULE_SETUP #line 1408 "wcspih.l" { BEGIN(DISCARD); } YY_BREAK case 204: #line 1413 "wcspih.l" case 205: YY_RULE_SETUP #line 1413 "wcspih.l" { /* SIP keywords. */ valtype = FLOAT; distype = PRIOR; vptr = &(distem.dp); npptr = ndp; a = ' '; distran = SIP; sscanf(wcspihtext, "%d_%d", &p, &q); BEGIN(VALUE); } YY_BREAK case 206: #line 1428 "wcspih.l" case 207: YY_RULE_SETUP #line 1428 "wcspih.l" { BEGIN(DISCARD); } YY_BREAK case 208: #line 1433 "wcspih.l" case 209: YY_RULE_SETUP #line 1433 "wcspih.l" { /* DSS keywords. */ valtype = FLOAT; distype = SEQUENT; vptr = &(distem.dp); npptr = ndq; a = ' '; distran = DSS; sscanf(wcspihtext, "%d", &m); BEGIN(VALUE); } YY_BREAK case 210: YY_RULE_SETUP #line 1447 "wcspih.l" { BEGIN(DISCARD); } YY_BREAK case 211: /* rule 211 can match eol */ YY_RULE_SETUP #line 1451 "wcspih.l" { /* Special handling for this iconic DSS keyword. */ if (1 < ipass) { /* Look for a minus sign. */ sscanf(wcspihtext, "= '%s", strtmp); dbltmp = strcmp(strtmp, "-") ? 1.0 : -1.0; } BEGIN(COMMENT); } YY_BREAK case 212: YY_RULE_SETUP #line 1462 "wcspih.l" { BEGIN(DISCARD); } YY_BREAK case 213: YY_RULE_SETUP #line 1466 "wcspih.l" { /* Do checks on i, j & m. */ if (99 < i || 99 < j || 99 < m) { if (relax & WCSHDR_reject) { if (99 < i || 99 < j) { errmsg = "axis number exceeds 99"; } else if (m > 99) { errmsg = "parameter number exceeds 99"; } BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else { if (valtype == INTEGER) { BEGIN(INTEGER_VAL); } else if (valtype == FLOAT) { BEGIN(FLOAT_VAL); } else if (valtype == STRING) { BEGIN(STRING_VAL); } else if (valtype == RECORD) { BEGIN(RECORD_VAL); } else { errmsg = errtxt; sprintf(errmsg, "internal parser ERROR, bad data type: %d", valtype); BEGIN(ERROR); } } } YY_BREAK case 214: YY_RULE_SETUP #line 1500 "wcspih.l" { errmsg = "invalid KEYWORD = VALUE syntax"; BEGIN(ERROR); } YY_BREAK case 215: YY_RULE_SETUP #line 1505 "wcspih.l" { if (ipass == 1) { BEGIN(COMMENT); } else { /* Read the keyvalue. */ sscanf(wcspihtext, "%d", &inttmp); BEGIN(COMMENT); } } YY_BREAK case 216: YY_RULE_SETUP #line 1517 "wcspih.l" { errmsg = "an integer value was expected"; BEGIN(ERROR); } YY_BREAK case 217: YY_RULE_SETUP #line 1522 "wcspih.l" { if (ipass == 1) { BEGIN(COMMENT); } else { /* Read the keyvalue. */ wcsutil_str2double(wcspihtext, "%lf", &dbltmp); BEGIN(COMMENT); } } YY_BREAK case 218: YY_RULE_SETUP #line 1534 "wcspih.l" { errmsg = "a floating-point value was expected"; BEGIN(ERROR); } YY_BREAK case 219: /* rule 219 can match eol */ YY_RULE_SETUP #line 1539 "wcspih.l" { if (ipass == 1) { BEGIN(COMMENT); } else { /* Read the keyvalue. */ strcpy(strtmp, wcspihtext+1); /* Squeeze out repeated quotes. */ ix = 0; for (jx = 0; jx < 72; jx++) { if (ix < jx) { strtmp[ix] = strtmp[jx]; } if (strtmp[jx] == '\0') { if (ix) strtmp[ix-1] = '\0'; break; } else if (strtmp[jx] == '\'' && strtmp[jx+1] == '\'') { jx++; } ix++; } BEGIN(COMMENT); } } YY_BREAK case 220: YY_RULE_SETUP #line 1568 "wcspih.l" { errmsg = "a string value was expected"; BEGIN(ERROR); } YY_BREAK case 221: /* rule 221 can match eol */ YY_RULE_SETUP #line 1573 "wcspih.l" { if (ipass == 1) { BEGIN(COMMENT); } else { yyless(1); BEGIN(RECFIELD); } } YY_BREAK case 222: YY_RULE_SETUP #line 1584 "wcspih.l" { errmsg = "a record was expected"; BEGIN(ERROR); } YY_BREAK case 223: YY_RULE_SETUP #line 1589 "wcspih.l" { strcpy(strtmp, wcspihtext); BEGIN(RECCOLON); } YY_BREAK case 224: YY_RULE_SETUP #line 1594 "wcspih.l" { errmsg = "invalid record field"; BEGIN(ERROR); } YY_BREAK case 225: YY_RULE_SETUP #line 1599 "wcspih.l" { BEGIN(RECVALUE); } YY_BREAK case 226: YY_RULE_SETUP #line 1603 "wcspih.l" { errmsg = "invalid record syntax"; BEGIN(ERROR); } YY_BREAK case 227: YY_RULE_SETUP #line 1608 "wcspih.l" { rectype = 0; sscanf(wcspihtext, "%d", &inttmp); BEGIN(RECEND); } YY_BREAK case 228: YY_RULE_SETUP #line 1614 "wcspih.l" { rectype = 1; wcsutil_str2double(wcspihtext, "%lf", &dbltmp); BEGIN(RECEND); } YY_BREAK case 229: YY_RULE_SETUP #line 1620 "wcspih.l" { errmsg = "invalid record value"; BEGIN(ERROR); } YY_BREAK case 230: YY_RULE_SETUP #line 1625 "wcspih.l" { BEGIN(COMMENT); } YY_BREAK case 231: *yy_cp = (yy_hold_char); /* undo effects of setting up wcspihtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcspihtext again */ YY_RULE_SETUP #line 1629 "wcspih.l" { if (ipass == 1) { /* Do first-pass bookkeeping. */ wcspih_naxes(naxis, i, j, a, distype, alts, dpq, npptr); BEGIN(FLUSH); } else if (*wcs) { /* Store the value now that the keyrecord has been validated. */ gotone = 0; for (ialt = 0; ialt < *nwcs; ialt++) { /* The loop here is for keywords that apply */ /* to every alternate; these have a == 0. */ if (a >= 'A') { ialt = alts[a-'A'+1]; if (ialt < 0) break; } gotone = 1; if (vptr) { if (sipflag) { /* Translate a SIP keyword into DPja. */ disp = (*wcs)->lin.dispre; ipx = (disp->ndp)++; /* SIP doesn't have alternates. */ sprintf(keyword, "DP%d", i); sprintf(strtmp, "SIP.%s.%d_%d", (sipflag==2)?"FWD":"REV", p, q); if (valtype == INTEGER) { dpfill(disp->dp+ipx, keyword, strtmp, i, 0, inttmp, 0.0); } else { dpfill(disp->dp+ipx, keyword, strtmp, i, 1, 0, dbltmp); } } else if (dssflag) { /* All DSS keywords require special handling. */ if (dssflag == 1) { /* Temporary parameter for DSS used by wcspih_final(). */ *((double *)vptr) = dbltmp; } else if (dssflag == 2) { /* Temporary parameter for DSS used by wcspih_final(). */ strcpy((char *)vptr, strtmp); } else { /* Translate a DSS keyword into DQia. */ if (m <= 13 || dbltmp != 0.0) { disp = (*wcs)->lin.disseq; ipx = (disp->ndp)++; /* DSS doesn't have alternates. */ sprintf(keyword, "DQ%d", i); sprintf(strtmp, "DSS.AMD.%d", m); dpfill(disp->dp+ipx, keyword, strtmp, i, 1, 0, dbltmp); /* Also required by wcspih_final(). */ if (m <= 3) { dsstmp[13+(i-1)*3+m] = dbltmp; } } } } else if (watflag) { /* String array for TNX and ZPX used by wcspih_final(). */ strcpy((char *)vptr, strtmp); } else { /* An ordinary keyword. */ wcsp = *wcs + ialt; if (distype == 0) { voff = (char *)vptr - (char *)(&wcstem); wptr = (void *)((char *)wcsp + voff); } else { voff = (char *)vptr - (char *)(&distem); if (distype == PRIOR) { /* Prior distortion. */ disp = wcsp->lin.dispre; } else { /* Sequent distortion. */ disp = wcsp->lin.disseq; } wptr = (void *)((char *)disp + voff); } if (valtype == INTEGER) { *((int *)wptr) = inttmp; } else if (valtype == FLOAT) { /* Apply keyword parameterization. */ if (npptr == npv) { ipx = (wcsp->npv)++; wcsp->pv[ipx].i = i; wcsp->pv[ipx].m = m; wptr = &(wcsp->pv[ipx].value); } else if (j) { wptr = *((double **)wptr) + (i - 1)*(wcsp->naxis) + (j - 1); } else if (i) { wptr = *((double **)wptr) + (i - 1); } if (special) { special(wptr, dbltmp); } else { *((double *)wptr) = dbltmp; } /* Flag presence of PCi_ja, or CDi_ja and/or CROTAia. */ if (altlin) { wcsp->altlin |= altlin; altlin = 0; } } else if (valtype == STRING) { /* Apply keyword parameterization. */ if (npptr == nps) { ipx = (wcsp->nps)++; wcsp->ps[ipx].i = i; wcsp->ps[ipx].m = m; wptr = wcsp->ps[ipx].value; } else if (j) { wptr = *((char (**)[72])wptr) + (i - 1)*(wcsp->naxis) + (j - 1); } else if (i) { wptr = *((char (**)[72])wptr) + (i - 1); } cptr = (char *)wptr; strcpy(cptr, strtmp); } else if (valtype == RECORD) { ipx = (disp->ndp)++; if (a == ' ') { sprintf(keyword, "%.2s%d", keyname, i); } else { sprintf(keyword, "%.2s%d%c", keyname, i, a); } dpfill(disp->dp+ipx, keyword, strtmp, i, rectype, inttmp, dbltmp); } } } if (a) break; } if (gotone) { nvalid++; if (ctrl == 4) { if (distran == 0) { wcsfprintf(stderr, "%.80s\n Accepted (%d) as a " "valid WCS keyrecord.\n", keyrec, nvalid); } else { wcsfprintf(stderr, "%.80s\n Accepted (%d) as a " "recognised WCS convention.\n", keyrec, nvalid); } } BEGIN(FLUSH); } else { errmsg = "syntactically valid WCS keyrecord has no effect"; BEGIN(ERROR); } } else { BEGIN(FLUSH); } } YY_BREAK case 232: *yy_cp = (yy_hold_char); /* undo effects of setting up wcspihtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcspihtext again */ YY_RULE_SETUP #line 1806 "wcspih.l" { errmsg = "invalid keyvalue"; BEGIN(ERROR); } YY_BREAK case 233: *yy_cp = (yy_hold_char); /* undo effects of setting up wcspihtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcspihtext again */ YY_RULE_SETUP #line 1811 "wcspih.l" { errmsg = "invalid keyvalue"; BEGIN(ERROR); } YY_BREAK case 234: *yy_cp = (yy_hold_char); /* undo effects of setting up wcspihtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcspihtext again */ YY_RULE_SETUP #line 1816 "wcspih.l" { errmsg = "invalid keyvalue or malformed keycomment"; BEGIN(ERROR); } YY_BREAK case 235: *yy_cp = (yy_hold_char); /* undo effects of setting up wcspihtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcspihtext again */ YY_RULE_SETUP #line 1821 "wcspih.l" { errmsg = "malformed keycomment"; BEGIN(ERROR); } YY_BREAK case 236: *yy_cp = (yy_hold_char); /* undo effects of setting up wcspihtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcspihtext again */ YY_RULE_SETUP #line 1826 "wcspih.l" { if (ipass == npass) { if (ctrl < 0) { /* Preserve discards. */ keep = keyrec; } else if (2 < ctrl) { nother++; wcsfprintf(stderr, "%.80s\n Not a recognized WCS keyword.\n", keyrec); } } BEGIN(FLUSH); } YY_BREAK case 237: *yy_cp = (yy_hold_char); /* undo effects of setting up wcspihtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcspihtext again */ YY_RULE_SETUP #line 1841 "wcspih.l" { if (ipass == npass) { (*nreject)++; if (ctrl%10 == -1) { /* Preserve rejects. */ keep = keyrec; } if (1 < abs(ctrl%10)) { wcsfprintf(stderr, "%.80s\n Rejected (%d), %s.\n", keyrec, *nreject, errmsg); } } BEGIN(FLUSH); } YY_BREAK case 238: /* rule 238 can match eol */ YY_RULE_SETUP #line 1858 "wcspih.l" { if (ipass == npass && keep) { if (hptr < keep) { strncpy(hptr, keep, 80); } hptr += 80; } /* Throw away the rest of the line and reset for the next one. */ i = j = 0; m = 0; a = ' '; keyrec += 80; valtype = -1; distype = 0; vptr = 0x0; keep = 0x0; altlin = 0; npptr = 0x0; special = 0x0; sipflag = 0; dssflag = 0; watflag = 0; BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(CCia): case YY_STATE_EOF(CCi_ja): case YY_STATE_EOF(CCCCCia): case YY_STATE_EOF(CCi_ma): case YY_STATE_EOF(CCCCCCCa): case YY_STATE_EOF(CCCCCCCC): case YY_STATE_EOF(CROTAi): case YY_STATE_EOF(PROJPn): case YY_STATE_EOF(SIP2): case YY_STATE_EOF(SIP3): case YY_STATE_EOF(DSSAMDXY): case YY_STATE_EOF(PLTDECSN): case YY_STATE_EOF(VALUE): case YY_STATE_EOF(INTEGER_VAL): case YY_STATE_EOF(FLOAT_VAL): case YY_STATE_EOF(STRING_VAL): case YY_STATE_EOF(RECORD_VAL): case YY_STATE_EOF(RECFIELD): case YY_STATE_EOF(RECCOLON): case YY_STATE_EOF(RECVALUE): case YY_STATE_EOF(RECEND): case YY_STATE_EOF(COMMENT): case YY_STATE_EOF(DISCARD): case YY_STATE_EOF(ERROR): case YY_STATE_EOF(FLUSH): #line 1888 "wcspih.l" { /* End-of-input. */ if (ipass == 1) { if ((status = wcspih_inits(naxis, alts, dpq, npv, nps, ndp, ndq, distran, nwcs, wcs)) || (*nwcs == 0 && ctrl == 0)) { wcspihlex_destroy(); return status; } if (2 < abs(ctrl%10)) { if (*nwcs == 1) { if (strcmp(wcs[0]->wcsname, "DEFAULTS") != 0) { wcsfprintf(stderr, "Found one coordinate representation.\n"); } } else { wcsfprintf(stderr, "Found %d coordinate representations.\n", *nwcs); } } watstr = calloc(2*(watn*68 + 1), sizeof(char)); wat[0] = watstr; wat[1] = watstr + watn*68 + 1; } if (ipass++ < npass) { wcspih_hdr = header; wcspih_nkeyrec = nkeyrec; keyrec = header; *nreject = 0; i = j = 0; m = 0; a = ' '; valtype = -1; distype = 0; vptr = 0x0; altlin = 0; npptr = 0x0; special = 0x0; sipflag = 0; dssflag = 0; watflag = 0; wcspihrestart(wcspihin); } else { wcspihlex_destroy(); if (ctrl < 0) { *hptr = '\0'; } else if (ctrl == 1) { wcsfprintf(stderr, "%d WCS keyrecord%s rejected.\n", *nreject, (*nreject==1)?" was":"s were"); } else if (ctrl == 4) { wcsfprintf(stderr, "\n"); wcsfprintf(stderr, "%5d keyrecord%s rejected for syntax or " "other errors,\n", *nreject, (*nreject==1)?" was":"s were"); wcsfprintf(stderr, "%5d %s recognized as syntactically valid, " "and\n", nvalid, (nvalid==1)?"was":"were"); wcsfprintf(stderr, "%5d other%s were not recognized as WCS " "keyrecords.\n", nother, (nother==1)?"":"s"); } return wcspih_final(alts, ndp, ndq, distran, dsstmp, wat, nwcs, wcs); } } YY_BREAK case 239: YY_RULE_SETUP #line 1960 "wcspih.l" ECHO; YY_BREAK #line 19623 "wcspih.c" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed wcspihin at a new source and called * wcspihlex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = wcspihin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( wcspihwrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * wcspihtext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ } /* end of wcspihlex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ wcspihrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; wcspihrestart(wcspihin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) wcspihrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { if ( *yy_cp ) { yy_current_state = yy_nxt[yy_current_state][YY_SC_TO_UI(*yy_cp)]; } else yy_current_state = yy_NUL_trans[yy_current_state]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); yy_current_state = yy_NUL_trans[yy_current_state]; yy_is_jam = (yy_current_state == 0); if ( ! yy_is_jam ) { if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } } return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up wcspihtext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register yy_size_t number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ wcspihrestart(wcspihin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( wcspihwrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve wcspihtext */ (yy_hold_char) = *++(yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void wcspihrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ wcspihensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = wcspih_create_buffer(wcspihin,YY_BUF_SIZE ); } wcspih_init_buffer(YY_CURRENT_BUFFER,input_file ); wcspih_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void wcspih_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * wcspihpop_buffer_state(); * wcspihpush_buffer_state(new_buffer); */ wcspihensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; wcspih_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (wcspihwrap()) processing, but the only time this flag * is looked at is after wcspihwrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void wcspih_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; wcspihin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE wcspih_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) wcspihalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in wcspih_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) wcspihalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in wcspih_create_buffer()" ); b->yy_is_our_buffer = 1; wcspih_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with wcspih_create_buffer() * */ void wcspih_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) wcspihfree((void *) b->yy_ch_buf ); wcspihfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a wcspihrestart() or at EOF. */ static void wcspih_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; wcspih_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then wcspih_init_buffer was _probably_ * called from wcspihrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void wcspih_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) wcspih_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void wcspihpush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; wcspihensure_buffer_stack(); /* This block is copied from wcspih_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from wcspih_switch_to_buffer. */ wcspih_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void wcspihpop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; wcspih_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { wcspih_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void wcspihensure_buffer_stack (void) { yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)wcspihalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in wcspihensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)wcspihrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in wcspihensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE wcspih_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) wcspihalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in wcspih_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; wcspih_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to wcspihlex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * wcspih_scan_bytes() instead. */ YY_BUFFER_STATE wcspih_scan_string (yyconst char * yystr ) { return wcspih_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to wcspihlex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE wcspih_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) wcspihalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in wcspih_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = wcspih_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in wcspih_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up wcspihtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ wcspihtext[wcspihleng] = (yy_hold_char); \ (yy_c_buf_p) = wcspihtext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ wcspihleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int wcspihget_lineno (void) { return wcspihlineno; } /** Get the input stream. * */ FILE *wcspihget_in (void) { return wcspihin; } /** Get the output stream. * */ FILE *wcspihget_out (void) { return wcspihout; } /** Get the length of the current token. * */ yy_size_t wcspihget_leng (void) { return wcspihleng; } /** Get the current token. * */ char *wcspihget_text (void) { return wcspihtext; } /** Set the current line number. * @param line_number * */ void wcspihset_lineno (int line_number ) { wcspihlineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see wcspih_switch_to_buffer */ void wcspihset_in (FILE * in_str ) { wcspihin = in_str ; } void wcspihset_out (FILE * out_str ) { wcspihout = out_str ; } int wcspihget_debug (void) { return wcspih_flex_debug; } void wcspihset_debug (int bdebug ) { wcspih_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from wcspihlex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT wcspihin = stdin; wcspihout = stdout; #else wcspihin = (FILE *) 0; wcspihout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * wcspihlex_init() */ return 0; } /* wcspihlex_destroy is for both reentrant and non-reentrant scanners. */ int wcspihlex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ wcspih_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; wcspihpop_buffer_state(); } /* Destroy the stack itself. */ wcspihfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * wcspihlex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *wcspihalloc (yy_size_t size ) { return (void *) malloc( size ); } void *wcspihrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void wcspihfree (void * ptr ) { free( (char *) ptr ); /* see wcspihrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 1959 "wcspih.l" /*---------------------------------------------------------------------------- * Determine the number of coordinate representations (up to 27) and the * number of coordinate axes in each, which distortions are present, and the * number of PVi_ma, PSi_ma, DPja, and DQia keywords in each representation. *---------------------------------------------------------------------------*/ void wcspih_naxes( int naxis, int i, int j, char a, int distype, int alts[], int dpq[], int *npptr) { /* On the first pass alts[] is used to determine the number of axes */ /* for each of the 27 possible alternate coordinate descriptions. */ int ialt, *ip; if (a == 0) { return; } ialt = 0; if (a != ' ') { ialt = a - 'A' + 1; } ip = alts + ialt; if (*ip < naxis) { *ip = naxis; } /* i or j can be greater than naxis. */ if (*ip < i) { *ip = i; } if (*ip < j) { *ip = j; } /* Type of distortions present. */ dpq[ialt] |= distype; /* Count PVi_ma, PSi_ma, DPja, or DQia keywords. */ if (npptr) { npptr[ialt]++; } } /*---------------------------------------------------------------------------- * Allocate memory for an array of the required number of wcsprm structs and * initialize each of them. *---------------------------------------------------------------------------*/ int wcspih_inits( int naxis, int alts[], int dpq[], int npv[], int nps[], int ndp[], int ndq[], int distran, int *nwcs, struct wcsprm **wcs) { int ialt, defaults, ndis, ndpmax, npsmax, npvmax, status = 0; struct wcsprm *wcsp; struct disprm *dis; /* Find the number of coordinate descriptions. */ *nwcs = 0; for (ialt = 0; ialt < 27; ialt++) { if (alts[ialt]) (*nwcs)++; } if ((defaults = !(*nwcs) && naxis)) { /* NAXIS is non-zero but there were no WCS keywords with an alternate version code; create a default WCS with blank alternate version. */ wcspih_naxes(naxis, 0, 0, ' ', 0, alts, dpq, 0x0); *nwcs = 1; } if (*nwcs) { /* Allocate memory for the required number of wcsprm structs. */ if ((*wcs = calloc(*nwcs, sizeof(struct wcsprm))) == 0x0) { return WCSHDRERR_MEMORY; } /* Record the current values of NPVMAX, NPSMAX, and NDPMAX. */ npvmax = wcsnpv(-1); npsmax = wcsnps(-1); ndpmax = disndp(-1); ndis = 0; if (distran == SIP) { /* DPja.NAXES and DPja.OFFSET.j to be added for SIP (see below and wcspih_final()). */ ndp[0] += 6; } else if (distran == DSS) { /* DPja.NAXES to be added for DSS (see below and wcspih_final()). */ ndq[0] += 2; } /* Initialize each wcsprm struct. */ wcsp = *wcs; *nwcs = 0; for (ialt = 0; ialt < 27; ialt++) { if (alts[ialt]) { wcsp->flag = -1; wcsnpv(npv[ialt]); wcsnps(nps[ialt]); if ((status = wcsini(1, alts[ialt], wcsp))) { wcsvfree(nwcs, wcs); break; } /* Record the alternate version code. */ if (ialt) { wcsp->alt[0] = 'A' + ialt - 1; } /* Record in wcsname whether this is a default description. */ if (defaults) { strcpy(wcsp->wcsname, "DEFAULTS"); } /* Any distortions present? */ if (dpq[ialt] & 1) { if ((dis = calloc(1, sizeof(struct disprm))) == 0x0) { return WCSHDRERR_MEMORY; } /* Attach it to linprm. Also inits it. */ ndis++; disndp(ndp[ialt]); dis->flag = -1; lindis(1, &(wcsp->lin), dis); } if (dpq[ialt] & 2) { if ((dis = calloc(1, sizeof(struct disprm))) == 0x0) { return WCSHDRERR_MEMORY; } /* Attach it to linprm. Also inits it. */ ndis++; disndp(ndq[ialt]); dis->flag = -1; lindis(2, &(wcsp->lin), dis); } /* On the second pass alts[] indexes the array of wcsprm structs. */ alts[ialt] = (*nwcs)++; wcsp++; } else { /* Signal that there is no wcsprm for this alt. */ alts[ialt] = -1; } } /* Restore the original values of NPVMAX, NPSMAX, and NDPMAX. */ wcsnpv(npvmax); wcsnps(npsmax); if (ndis) disndp(ndpmax); /* Translated distortion? Neither SIP nor DSS have alternates, so the */ /* presence of keywords for either (not both together), as flagged by */ /* distran, necessarily refers to the primary representation. */ if (distran == SIP) { strcpy((*wcs)->lin.dispre->dtype[0], "SIP"); strcpy((*wcs)->lin.dispre->dtype[1], "SIP"); /* SIP doesn't have axis mapping. */ (*wcs)->lin.dispre->ndp = 6; dpfill((*wcs)->lin.dispre->dp, "DP1", "NAXES", 0, 0, 2, 0.0); dpfill((*wcs)->lin.dispre->dp+3, "DP2", "NAXES", 0, 0, 2, 0.0); } else if (distran == DSS) { strcpy((*wcs)->lin.disseq->dtype[0], "DSS"); strcpy((*wcs)->lin.disseq->dtype[1], "DSS"); /* The Paper IV translation of DSS doesn't require an axis mapping. */ (*wcs)->lin.disseq->ndp = 2; dpfill((*wcs)->lin.disseq->dp, "DQ1", "NAXES", 0, 0, 2, 0.0); dpfill((*wcs)->lin.disseq->dp+1, "DQ2", "NAXES", 0, 0, 2, 0.0); } } return status; } /*---------------------------------------------------------------------------- * Interpret EPOCHa keywords. *---------------------------------------------------------------------------*/ int wcspih_epoch(double *equinox, double epoch) { /* If EQUINOXa is currently undefined then set it from EPOCHa. */ if (undefined(*equinox)) { *equinox = epoch; } return 0; } /*---------------------------------------------------------------------------- * Interpret VSOURCEa keywords. *---------------------------------------------------------------------------*/ int wcspih_vsource(double *zsource, double vsource) { double beta, c = 299792458.0; /* If ZSOURCEa is currently undefined then set it from VSOURCEa. */ if (undefined(*zsource)) { /* Convert relativistic Doppler velocity to redshift. */ beta = vsource/c; *zsource = (1.0 + beta)/sqrt(1.0 - beta*beta) - 1.0; } return 0; } /*---------------------------------------------------------------------------- * Interpret special keywords encountered for each coordinate representation. *---------------------------------------------------------------------------*/ int wcspih_final( int alts[], int ndp[], int ndq[], int distran, double dsstmp[], char *wat[], int *nwcs, struct wcsprm **wcs) { char field[8], *wp, wpoly[12], wtype[8]; int i, ialt, idp, ipv, m, npv, n, nterms, omax, omin, status, wctrl[4]; double A1, A2, A3, B1, B2, B3, CNPIX1, CNPIX2, *crval, Rx, Ry, S, wval, X0, Y0, Xc, Yc; struct disprm *disp; struct wcsprm *wcsp; for (ialt = 0; ialt < *nwcs; ialt++) { /* Interpret -TAB header keywords. */ if ((status = wcstab(*wcs+ialt))) { wcsvfree(nwcs, wcs); return status; } if (ndp[ialt] && ndq[ialt]) { /* Prior and sequent distortions co-exist in this representation; ensure the latter gets DVERRa. */ (*wcs+ialt)->lin.disseq->totdis = (*wcs+ialt)->lin.dispre->totdis; } } /* Translated distortion functions; apply only to the primary WCS. */ wcsp = *wcs; if (distran == SIP) { /* SIP doesn't have alternates, nor axis mapping. */ disp = wcsp->lin.dispre; dpfill(disp->dp+1, "DP1", "OFFSET.1", 0, 1, 0, wcsp->crpix[0]); dpfill(disp->dp+2, "DP1", "OFFSET.2", 0, 1, 0, wcsp->crpix[1]); dpfill(disp->dp+4, "DP2", "OFFSET.1", 0, 1, 0, wcsp->crpix[0]); dpfill(disp->dp+5, "DP2", "OFFSET.2", 0, 1, 0, wcsp->crpix[1]); } else if (distran == DSS) { /* DSS doesn't have alternates, nor axis mapping. This translation */ /* follows Paper IV, Sect. 5.2 using the same variable names. */ CNPIX1 = dsstmp[0]; CNPIX2 = dsstmp[1]; Xc = dsstmp[2]/1000.0; Yc = dsstmp[3]/1000.0; Rx = dsstmp[4]/1000.0; Ry = dsstmp[5]/1000.0; A1 = dsstmp[14]; A2 = dsstmp[15]; A3 = dsstmp[16]; B1 = dsstmp[17]; B2 = dsstmp[18]; B3 = dsstmp[19]; S = sqrt(fabs(A1*B1 - A2*B2)); X0 = (A2*B3 - A3*B1) / (A1*B1 - A2*B2); Y0 = (A3*B2 - A1*B3) / (A1*B1 - A2*B2); wcsp->crpix[0] = (Xc - X0)/Rx - (CNPIX1 - 0.5); wcsp->crpix[1] = (Yc + Y0)/Ry - (CNPIX2 - 0.5); wcsp->pc[0] = A1*Rx/S; wcsp->pc[1] = -A2*Ry/S; wcsp->pc[2] = -B2*Rx/S; wcsp->pc[3] = B1*Ry/S; wcsp->altlin = 1; wcsp->cdelt[0] = -S/3600.0; wcsp->cdelt[1] = S/3600.0; crval = wcsp->crval; crval[0] = (dsstmp[6] + (dsstmp[7] + dsstmp[8] /60.0)/60.0)*15.0; crval[1] = dsstmp[10] + (dsstmp[11] + dsstmp[12]/60.0)/60.0; if (dsstmp[9] == -1.0) crval[1] *= -1.0; strcpy(wcsp->ctype[0], "RA---TAN"); strcpy(wcsp->ctype[1], "DEC--TAN"); sprintf(wcsp->wcsname, "DSS PLATEID %.4s", (char *)(dsstmp+13)); /* Erase the approximate WCS provided in modern DSS headers. */ wcsp->cd[0] = 0.0; wcsp->cd[1] = 0.0; wcsp->cd[2] = 0.0; wcsp->cd[3] = 0.0; } else if (distran == WAT) { /* TNX and ZPX don't have alternates, nor axis mapping. */ disp = wcsp->lin.disseq; /* Decipher the core dump stored in the WATi_m strings. */ nterms = 0; for (i = 0; i < 2; i++) { sscanf(wat[i], "wtype=%s", wtype); if (strcmp(wtype, "tnx") == 0) { strcpy(disp->dtype[i], "WAT-TNX"); } else if (strcmp(wtype, "zpx") == 0) { strcpy(disp->dtype[i], "WAT-ZPX"); } else { /* Could contain "tan" or something else to be ignored. */ lindis(2, &(wcsp->lin), 0x0); return 0; } /* The PROJPn parameters are duplicated on each ZPX axis. */ if (i == 1 && strcmp(wtype, "zpx") == 0) { /* Take those on the second (latitude) axis ignoring the other. */ /* First we have to count them and allocate space in wcsprm. */ wp = wat[i]; for (npv = 0; npv < 30; npv++) { if ((wp = strstr(wp, "projp")) == 0x0) break; wp += 5; } /* Allocate space. */ if (npv) { wcsp->npvmax += npv; wcsp->pv = realloc(wcsp->pv, wcsp->npvmax*sizeof(struct pvcard)); if (wcsp->pv == 0x0) { return WCSHDRERR_MEMORY; } wcsp->m_pv = wcsp->pv; } /* Copy the values. */ wp = wat[i]; for (ipv = wcsp->npv; ipv < wcsp->npvmax; ipv++) { if ((wp = strstr(wp, "projp")) == 0x0) break; sscanf(wp, "projp%d=%lf", &m, &wval); wcsp->pv[ipv].i = 2; wcsp->pv[ipv].m = m; wcsp->pv[ipv].value = wval; wp += 5; } wcsp->npv += npv; } /* Read the control parameters. */ if ((wp = strchr(wat[i], '"')) == 0x0) { return WCSHDRERR_PARSER; } wp++; for (m = 0; m < 4; m++) { sscanf(wp, "%d", wctrl+m); if ((wp = strchr(wp, ' ')) == 0x0) { return WCSHDRERR_PARSER; } wp++; } /* How many coefficients are we expecting? */ omin = (wctrl[1] < wctrl[2]) ? wctrl[1] : wctrl[2]; omax = (wctrl[1] < wctrl[2]) ? wctrl[2] : wctrl[1]; if (wctrl[3] == 0) { /* No cross terms. */ nterms += omin + omax; } else if (wctrl[3] == 1) { /* Full cross terms. */ nterms += omin*omax; } else if (wctrl[3] == 2) { /* Half cross terms. */ nterms += omin*omax - omin*(omin-1)/2; } } /* Allocate memory for dpkeys. */ ndq[0] += 2*(1 + 1 + 4) + nterms; disp->ndpmax += ndq[0]; disp->dp = realloc(disp->dp, disp->ndpmax*sizeof(struct dpkey)); if (disp->dp == 0x0) { return WCSHDRERR_MEMORY; } disp->m_dp = disp->dp; /* Populate dpkeys. */ idp = disp->ndp; for (i = 0; i < 2; i++) { dpfill(disp->dp+(idp++), "DQ", "NAXES", i+1, 0, 2, 0.0); /* Read the control parameters. */ if ((wp = strchr(wat[i], '"')) == 0x0) { return WCSHDRERR_PARSER; } wp++; for (m = 0; m < 4; m++) { sscanf(wp, "%d", wctrl+m); if ((wp = strchr(wp, ' ')) == 0x0) { return WCSHDRERR_PARSER; } wp++; } /* Polynomial type. */ dpfill(disp->dp+(idp++), "DQ", "WAT.POLY", i+1, 0, wctrl[0], 0.0); if (wctrl[0] == 1) { /* Chebyshev polynomial. */ strcpy(wpoly, "CHBY"); } else if (wctrl[0] == 2) { /* Legendre polynomial. */ strcpy(wpoly, "LEGR"); } else if (wctrl[0] == 3) { /* Polynomial is the sum of monomials. */ strcpy(wpoly, "MONO"); } else { /* Unknown code. */ strcpy(wpoly, "UNKN"); } /* Read the scaling parameters. */ for (m = 0; m < 4; m++) { sscanf(wp, "%lf", &wval); sprintf(field, "WAT.%c%s", (m<2)?'X':'Y', (m%2)?"MAX":"MIN"); dpfill(disp->dp+(idp++), "DQ", field, i+1, 1, 0, wval); if ((wp = strchr(wp, ' ')) == 0x0) { return WCSHDRERR_PARSER; } wp++; } /* Read the coefficients. */ for (n = 0; n < wctrl[2]; n++) { for (m = 0; m < wctrl[1]; m++) { if (wctrl[3] == 0) { if (m && n) continue; } else if (wctrl[3] == 2) { if (m+n > omax-1) continue; } sscanf(wp, "%lf", &wval); if (wval == 0.0) continue; sprintf(field, "WAT.%s.%d_%d", wpoly, m, n); dpfill(disp->dp+(idp++), "DQ", field, i+1, 1, 0, wval); if ((wp = strchr(wp, ' ')) == 0x0) { return WCSHDRERR_PARSER; } wp++; } } } disp->ndp = idp; free(wat[0]); } return 0; } astropy-1.1.1/cextern/wcslib/C/flexed/wcsulex.c0000644001134200020070000135077012644017723022364 0ustar embrayscience00000000000000#line 2 "wcsulex.c" #line 4 "wcsulex.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer wcsulex_create_buffer #define yy_delete_buffer wcsulex_delete_buffer #define yy_flex_debug wcsulex_flex_debug #define yy_init_buffer wcsulex_init_buffer #define yy_flush_buffer wcsulex_flush_buffer #define yy_load_buffer_state wcsulex_load_buffer_state #define yy_switch_to_buffer wcsulex_switch_to_buffer #define yyin wcsulexin #define yyleng wcsulexleng #define yylex wcsulexlex #define yylineno wcsulexlineno #define yyout wcsulexout #define yyrestart wcsulexrestart #define yytext wcsulextext #define yywrap wcsulexwrap #define yyalloc wcsulexalloc #define yyrealloc wcsulexrealloc #define yyfree wcsulexfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE wcsulexrestart(wcsulexin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif extern yy_size_t wcsulexleng; extern FILE *wcsulexin, *wcsulexout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up wcsulextext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up wcsulextext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via wcsulexrestart()), so that the user can continue scanning by * just pointing wcsulexin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when wcsulextext is formed. */ static char yy_hold_char; static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ yy_size_t wcsulexleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow wcsulexwrap()'s to do buffer switches * instead of setting up a fresh wcsulexin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void wcsulexrestart (FILE *input_file ); void wcsulex_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE wcsulex_create_buffer (FILE *file,int size ); void wcsulex_delete_buffer (YY_BUFFER_STATE b ); void wcsulex_flush_buffer (YY_BUFFER_STATE b ); void wcsulexpush_buffer_state (YY_BUFFER_STATE new_buffer ); void wcsulexpop_buffer_state (void ); static void wcsulexensure_buffer_stack (void ); static void wcsulex_load_buffer_state (void ); static void wcsulex_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER wcsulex_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE wcsulex_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE wcsulex_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE wcsulex_scan_bytes (yyconst char *bytes,yy_size_t len ); void *wcsulexalloc (yy_size_t ); void *wcsulexrealloc (void *,yy_size_t ); void wcsulexfree (void * ); #define yy_new_buffer wcsulex_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ wcsulexensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ wcsulex_create_buffer(wcsulexin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ wcsulexensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ wcsulex_create_buffer(wcsulexin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define wcsulexwrap() 1 #define YY_SKIP_YYWRAP typedef char YY_CHAR; FILE *wcsulexin = (FILE *) 0, *wcsulexout = (FILE *) 0; typedef int yy_state_type; extern int wcsulexlineno; int wcsulexlineno = 1; extern char *wcsulextext; #define yytext_ptr wcsulextext static yyconst flex_int16_t yy_nxt[][128] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 16, 14, 14, 14, 14, 14, 14, 14, 17, 14, 18, 14, 14, 14, 18, 19, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 20, 21, 22, 23, 24, 22, 25, 26, 14, 27, 28, 14, 24, 22, 29, 30, 14, 31, 32, 33, 14, 22, 34, 14, 24, 24, 14, 14, 35, 14, 14, 14, 36, 37, 38, 39, 40, 41, 28, 42, 14, 14, 24, 43, 44, 41, 29, 45, 14, 46, 47, 14, 48, 49, 14, 14, 50, 41, 14, 14, 14, 14, 14 }, { 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 51, 14, 14, 14, 14, 14, 14, 14, 17, 14, 52, 14, 14, 14, 52, 19, 14, 53, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 20, 21, 22, 23, 24, 22, 25, 26, 14, 27, 28, 14, 24, 22, 29, 30, 14, 31, 32, 33, 14, 22, 34, 14, 24, 24, 54, 14, 35, 14, 14, 14, 36, 37, 38, 39, 55, 41, 28, 42, 14, 14, 24, 56, 44, 41, 29, 45, 14, 46, 47, 14, 48, 49, 14, 14, 50, 41, 14, 14, 14, 14, 14 }, { 13, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 58, 59, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57 }, { 13, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 58, 59, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57 }, { 13, 60, 60, 60, 60, 60, 60, 60, 60, 60, 15, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 61, 60, 62, 60, 60, 60, 60, 60, 63, 60, 60, 64, 60, 60, 60, 65, 60, 60, 60, 60, 66, 67, 60, 60, 60, 60, 60, 60, 68, 60, 69, 70, 60, 71, 60, 72, 60, 60, 73, 60, 74, 75, 60, 76, 60, 60, 60, 60, 77, 60, 60, 60, 78, 79, 60, 60, 60, 60, 60 }, { 13, 60, 60, 60, 60, 60, 60, 60, 60, 60, 15, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 61, 60, 62, 60, 60, 60, 60, 60, 63, 60, 60, 64, 60, 60, 60, 65, 60, 60, 60, 60, 66, 67, 60, 60, 60, 60, 60, 60, 68, 60, 69, 70, 60, 71, 60, 72, 60, 60, 73, 60, 74, 75, 60, 76, 60, 60, 60, 60, 77, 60, 60, 60, 78, 79, 60, 60, 60, 60, 60 }, { 13, 80, 80, 80, 80, 80, 80, 80, 80, 80, 15, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 82, 83, 84, 80, 85, 86, 87, 80, 88, 89, 80, 80, 90, 91, 92, 80, 93, 94, 95, 80, 96, 97, 80, 80, 80, 80, 80, 80, 80, 80, 80, 98, 99, 100, 101, 102, 80, 103, 104, 80, 80, 80, 105, 106, 80, 91, 107, 80, 108, 109, 80, 110, 111, 80, 80, 112, 80, 80, 80, 80, 80, 80 }, { 13, 80, 80, 80, 80, 80, 80, 80, 80, 80, 15, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 82, 83, 84, 80, 85, 86, 87, 80, 88, 89, 80, 80, 90, 91, 92, 80, 93, 94, 95, 80, 96, 97, 80, 80, 80, 80, 80, 80, 80, 80, 80, 98, 99, 100, 101, 102, 80, 103, 104, 80, 80, 80, 105, 106, 80, 91, 107, 80, 108, 109, 80, 110, 111, 80, 80, 112, 80, 80, 80, 80, 80, 80 }, { 13, 113, 113, 113, 113, 113, 113, 113, 113, 113, 15, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 114, 113, 113, 113, 113, 113, 113, 113, 115, 113, 116, 117, 113, 117, 118, 119, 113, 120, 120, 120, 120, 120, 120, 120, 120, 120, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 121, 122, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113 }, { 13, 113, 113, 113, 113, 113, 113, 113, 113, 113, 15, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 114, 113, 113, 113, 113, 113, 113, 113, 115, 113, 116, 117, 113, 117, 118, 119, 113, 120, 120, 120, 120, 120, 120, 120, 120, 120, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 121, 122, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113 }, { 13, 123, 123, 123, 123, 123, 123, 123, 123, 123, 15, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123 }, { 13, 123, 123, 123, 123, 123, 123, 123, 123, 123, 15, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123 }, { -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13 }, { 13, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14 }, { 13, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15 }, { 13, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, 124, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16 }, { 13, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17 }, { 13, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18 }, { 13, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19 }, { 13, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, 125, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, 126, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20 }, { 13, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, 127, -21, -21, -21, -21, -21, -21 }, { 13, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22 }, { 13, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23 }, { 13, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, 128, 129, 130, -24, -24, 130, 131, 132, -24, 133, 128, -24, -24, 130, 134, 135, -24, 131, 130, 130, -24, 130, 136, -24, -24, -24, -24, -24, -24, -24, -24, -24, 137, 138, 139, -24, 140, -24, 128, -24, -24, -24, -24, 141, 142, -24, 134, 143, -24, 144, 145, -24, -24, -24, -24, -24, 146, -24, -24, -24, -24, -24, -24 }, { 13, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, 128, 129, 130, -25, -25, 130, 131, 132, -25, 133, 128, -25, -25, 130, 134, 135, -25, 131, 130, 130, -25, 130, 136, -25, -25, -25, -25, -25, -25, -25, -25, -25, 137, 138, 139, -25, 140, -25, 128, -25, -25, -25, -25, 141, 142, -25, 134, 143, -25, 144, 145, -25, -25, -25, -25, -25, 146, -25, -25, -25, -25, -25, -25 }, { 13, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, 147, -26, -26, -26, -26, -26 }, { 13, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, 148, -27, -27, -27, -27, -27, -27 }, { 13, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, -28 }, { 13, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, 149, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, -29 }, { 13, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, 128, 129, 130, -30, -30, 130, 131, 132, -30, 133, 128, -30, -30, 130, 134, 135, -30, 131, 130, 130, -30, 130, 136, -30, -30, -30, -30, -30, -30, -30, -30, -30, 150, 138, 139, -30, 140, -30, 128, -30, -30, -30, -30, 141, 142, -30, 134, 143, -30, 144, 145, -30, -30, -30, -30, -30, 146, -30, -30, -30, -30, -30, -30 }, { 13, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, 151, -31, -31, -31, -31, -31, -31 }, { 13, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, 152, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32 }, { 13, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, 128, 129, 130, -33, -33, 130, 131, 132, -33, 133, 128, -33, -33, 130, 134, 135, -33, 131, 130, 130, -33, 130, 136, -33, -33, -33, -33, -33, -33, -33, -33, -33, 137, 138, 139, -33, 140, -33, 128, -33, -33, -33, -33, 141, 142, -33, 134, 143, -33, 144, 145, -33, -33, -33, -33, -33, 146, -33, -33, -33, -33, -33, -33 }, { 13, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, 147, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, -34 }, { 13, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, -35 }, { 13, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, 128, -36, 130, -36, -36, 130, 131, 132, -36, 133, 128, -36, -36, 130, 134, 135, -36, 131, 130, 130, -36, 130, 136, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, 153, 139, 154, 140, -36, 128, -36, -36, -36, -36, 141, 155, 126, 134, -36, -36, 156, 145, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36 }, { 13, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, 157, -37, -37, -37, 158, -37, -37, -37, 159, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, 127, -37, -37, -37, -37, -37, -37 }, { 13, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, 128, -38, 130, -38, -38, 130, 131, 132, -38, 133, 128, -38, -38, 130, 134, 135, -38, 131, 130, 130, -38, 130, 136, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, 153, 139, 160, 140, -38, 128, 161, -38, -38, -38, 141, 155, -38, 162, -38, -38, 144, 145, 163, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38 }, { 13, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, 128, -39, 130, -39, -39, 130, 131, 132, -39, 133, 128, -39, -39, 130, 134, 135, -39, 131, 130, 130, -39, 130, 136, -39, -39, -39, -39, -39, -39, -39, -39, -39, 164, 153, 139, -39, 165, -39, 128, -39, -39, -39, -39, 141, 155, -39, 134, -39, -39, 144, 145, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39 }, { 13, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, 148, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, 166, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40 }, { 13, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, 128, -41, 130, -41, -41, 130, 131, 132, -41, 133, 128, -41, -41, 130, 134, 135, -41, 131, 130, 130, -41, 130, 136, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, 153, 139, -41, 140, -41, 128, -41, -41, -41, -41, 141, 155, -41, 134, -41, -41, 144, 145, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41 }, { 13, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, 128, 129, 130, -42, -42, 130, 131, 132, -42, 133, 128, -42, -42, 130, 134, 135, -42, 131, 130, 130, -42, 130, 136, -42, -42, -42, -42, -42, -42, -42, -42, -42, 137, 138, 139, -42, 140, -42, 128, -42, -42, -42, -42, 141, 142, -42, 134, 143, -42, 144, 145, -42, -42, -42, -42, -42, 146, -42, -42, -42, -42, -42, -42 }, { 13, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, 147, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, 147, 167, -43, -43, -43, -43, -43, -43 }, { 13, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, 128, -44, 130, -44, -44, 130, 131, 132, -44, 133, 128, -44, -44, 130, 134, 135, -44, 131, 130, 130, -44, 130, 136, -44, -44, -44, -44, -44, -44, -44, -44, -44, 168, 153, 139, -44, 140, -44, 128, -44, 169, -44, -44, 141, 155, -44, 170, -44, -44, 144, 145, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44 }, { 13, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, 128, -45, 130, -45, -45, 130, 131, 132, -45, 133, 128, -45, -45, 130, 134, 135, -45, 131, 130, 130, -45, 130, 136, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, 153, 171, -45, 140, -45, 128, 172, 173, -45, -45, 141, 155, -45, 134, -45, -45, 144, 145, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45 }, { 13, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, 174, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -46 }, { 13, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, 175, -47, 176, 160, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47 }, { 13, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, 128, -48, 130, -48, -48, 130, 131, 132, -48, 133, 128, -48, -48, 130, 134, 135, -48, 131, 130, 130, -48, 130, 136, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, 153, 139, -48, 140, -48, 128, -48, -48, -48, -48, 141, 155, -48, 134, -48, -48, 144, 145, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48 }, { 13, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, 177, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -49 }, { 13, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, 128, -50, 130, -50, -50, 130, 131, 132, -50, 133, 128, -50, -50, 130, 134, 135, -50, 131, 130, 130, -50, 130, 136, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, 153, 139, -50, 140, -50, 128, -50, -50, -50, -50, 141, 155, -50, 134, -50, -50, 178, 145, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, -50 }, { 13, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, 179, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51 }, { 13, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52 }, { 13, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, 180, 181, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53 }, { 13, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54 }, { 13, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, 148, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, 166, -55, -55, -55, -55, -55, 182, -55, -55, -55, -55, -55, -55, -55 }, { 13, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, 147, 183, 184, -56, -56, -56, -56, -56, -56, -56, -56, 147, 167, -56, -56, -56, -56, -56, -56 }, { 13, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, -57, -57, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185 }, { 13, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58 }, { 13, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59 }, { 13, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60 }, { 13, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -61 }, { 13, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62 }, { 13, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63 }, { 13, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64 }, { 13, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65 }, { 13, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66 }, { 13, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67 }, { 13, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68 }, { 13, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69 }, { 13, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, 186, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70 }, { 13, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71 }, { 13, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72 }, { 13, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73 }, { 13, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74 }, { 13, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75 }, { 13, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76 }, { 13, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77 }, { 13, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78 }, { 13, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79 }, { 13, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80 }, { 13, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, 187, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, 188, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81 }, { 13, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, 189, -82, -82, -82, -82, -82, -82 }, { 13, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83 }, { 13, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84 }, { 13, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85 }, { 13, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86 }, { 13, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, 190, -87, -87, -87, -87, -87 }, { 13, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, 191, -88, -88, -88, -88, -88, -88 }, { 13, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89 }, { 13, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90 }, { 13, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, 192, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91 }, { 13, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, 193, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92 }, { 13, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, 194, -93, -93, -93, -93, -93, -93 }, { 13, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, 195, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94 }, { 13, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95 }, { 13, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96 }, { 13, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, 196, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97 }, { 13, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, 197, -98, -98, -98, -98, -98, -98, -98, -98, -98, 188, -98, -98, -98, 198, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98 }, { 13, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, 199, -99, -99, -99, 200, -99, -99, -99, 201, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, 189, -99, -99, -99, -99, -99, -99 }, { 13, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 202, -100, -100, -100, 203, -100, -100, -100, -100, -100, -100, 204, -100, -100, -100, -100, 205, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 }, { 13, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, 206, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101 }, { 13, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, 207, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, 208, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102 }, { 13, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103 }, { 13, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104 }, { 13, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, 209, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, 210, 211, -105, -105, -105, -105, -105, -105 }, { 13, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, 212, -106, -106, -106, -106, -106, -106, -106, 213, -106, -106, -106, -106, -106, 214, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106 }, { 13, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, 215, -107, -107, -107, -107, 216, 217, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107 }, { 13, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, 218, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108 }, { 13, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, 219, -109, -109, 220, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109 }, { 13, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110 }, { 13, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, 221, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111 }, { 13, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, 222, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112 }, { 13, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113 }, { 13, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, 223, -114, -114, -114, -114, -114, -114, -114, 224, -114, 225, 226, -114, 226, 227, 228, -114, 229, 229, 229, 229, 229, 229, 229, 229, 229, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, 230, 231, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114 }, { 13, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, 232, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, 233, -115, 233, 234, -115, 235, 236, 236, 236, 236, 236, 236, 236, 236, 236, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115 }, { 13, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, 237, -116, -116, -116, -116, -116, -116, -116, -116, -116, 231, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116 }, { 13, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, 229, 229, 229, 229, 229, 229, 229, 229, 229, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117 }, { 13, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, 237, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118 }, { 13, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 238, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119 }, { 13, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120 }, { 13, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121 }, { 13, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122 }, { 13, 240, 240, 240, 240, 240, 240, 240, 240, 240, -123, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240 }, { 13, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, 124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124 }, { 13, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125 }, { 13, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, 241, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126 }, { 13, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, 242, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127 }, { 13, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128 }, { 13, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, 243, -129, -129, -129, -129, -129, -129 }, { 13, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130 }, { 13, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131 }, { 13, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, 130, -132, -132, -132, -132, -132 }, { 13, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, 131, -133, -133, -133, -133, -133, -133 }, { 13, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, 244, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134 }, { 13, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 130, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135 }, { 13, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, 130, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136 }, { 13, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137 }, { 13, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, 245, -138, -138, -138, -138, -138, -138, -138, 246, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, 243, -138, -138, -138, -138, -138, -138 }, { 13, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, 128, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139 }, { 13, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, 131, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140 }, { 13, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, 130, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, 130, -141, -141, -141, -141, -141, -141, -141 }, { 13, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, 247, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142 }, { 13, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, 137, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143 }, { 13, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, 248, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, -144 }, { 13, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, 128, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145 }, { 13, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, 137, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, -146 }, { 13, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, -147 }, { 13, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, -148 }, { 13, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, 147, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149 }, { 13, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, -150 }, { 13, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151 }, { 13, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, 125, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, -152 }, { 13, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, 245, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153 }, { 13, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, 163, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154 }, { 13, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, 249, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, 247, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155 }, { 13, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, 248, -156, 250, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156 }, { 13, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, 251, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157 }, { 13, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, 252, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158 }, { 13, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, 163, -159, -159, -159, -159, -159, 253, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159 }, { 13, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160 }, { 13, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, 254, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161 }, { 13, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, 244, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, 255, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162 }, { 13, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163 }, { 13, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, 128, 129, 130, -164, -164, 130, 131, 132, -164, 133, 128, -164, -164, 130, 134, 135, -164, 131, 130, 130, -164, 130, 136, -164, -164, -164, -164, -164, -164, -164, -164, -164, 137, 138, 139, -164, 140, -164, 128, -164, -164, -164, -164, 141, 142, -164, 134, 143, -164, 144, 145, -164, -164, -164, -164, -164, 146, -164, -164, -164, -164, -164, -164 }, { 13, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, 131, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, 151, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165 }, { 13, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, 151, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166 }, { 13, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, 125, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167 }, { 13, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, 148, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, 151, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168 }, { 13, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, 151, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169 }, { 13, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, 244, -170, -170, -170, 160, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170 }, { 13, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, 128, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171 }, { 13, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, 256, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172 }, { 13, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, 257, -173, -173, -173, -173, -173, -173, -173 }, { 13, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, 160, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174 }, { 13, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, 258, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175 }, { 13, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, 259, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176 }, { 13, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, 260, -177, -177, -177, -177, -177, -177, -177 }, { 13, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, 248, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178 }, { 13, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, 179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179 }, { 13, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180 }, { 13, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181 }, { 13, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, 262, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182 }, { 13, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, 263, -183, -183, -183, -183, -183, -183, -183, 264, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183 }, { 13, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, 265, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184 }, { 13, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, -185, -185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185 }, { 13, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186 }, { 13, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187 }, { 13, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, 266, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188 }, { 13, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, 267, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189 }, { 13, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190 }, { 13, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191 }, { 13, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, 268, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192 }, { 13, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193 }, { 13, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194 }, { 13, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, 269, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195 }, { 13, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196 }, { 13, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, 270, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197 }, { 13, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, 271, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198 }, { 13, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, 272, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199 }, { 13, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, 273, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200 }, { 13, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, 274, -201, -201, -201, -201, -201, 275, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201 }, { 13, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202 }, { 13, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, 276, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203 }, { 13, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, 277, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204 }, { 13, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205 }, { 13, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, 278, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206 }, { 13, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207 }, { 13, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, 279, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208 }, { 13, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209 }, { 13, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210 }, { 13, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, 280, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211 }, { 13, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, 281, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, 282, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212 }, { 13, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, 283, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213 }, { 13, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, 284, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214 }, { 13, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215 }, { 13, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, 285, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216 }, { 13, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, 286, -217, -217, -217, -217, -217, -217, -217 }, { 13, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, 287, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218 }, { 13, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, 288, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219 }, { 13, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220 }, { 13, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, 289, -221, -221, -221, -221, -221, -221, -221 }, { 13, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222 }, { 13, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, 223, -223, -223, -223, -223, -223, -223, -223, 224, -223, 225, 226, -223, 226, 227, 228, -223, 229, 229, 229, 229, 229, 229, 229, 229, 229, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, 230, 231, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223 }, { 13, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, 232, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, 233, -224, 233, 234, -224, 235, 236, 236, 236, 236, 236, 236, 236, 236, 236, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224 }, { 13, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, 237, -225, -225, -225, -225, -225, -225, -225, -225, -225, 231, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225 }, { 13, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, 229, 229, 229, 229, 229, 229, 229, 229, 229, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226 }, { 13, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, 237, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227 }, { 13, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, 238, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228 }, { 13, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229 }, { 13, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230 }, { 13, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231 }, { 13, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, 232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, 233, -232, 233, 234, -232, 235, 236, 236, 236, 236, 236, 236, 236, 236, 236, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232 }, { 13, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, 234, -233, 235, 236, 236, 236, 236, 236, 236, 236, 236, 236, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233 }, { 13, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234 }, { 13, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, 291, -235, -235, -235, -235, -235, -235, -235, -235, 292, -235, -235, -235, -235, 293, -235, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235 }, { 13, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, 295, -236, -236, -236, -236, -236, -236, -236, -236, 296, -236, -236, -236, -236, 293, 297, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236 }, { 13, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, 237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237 }, { 13, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, 238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238 }, { 13, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239 }, { 13, 240, 240, 240, 240, 240, 240, 240, 240, 240, -240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240 }, { 13, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, 299, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241 }, { 13, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, 253, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242 }, { 13, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, 300, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243 }, { 13, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, 130, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244 }, { 13, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, 301, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245 }, { 13, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, 137, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246 }, { 13, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, 128, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247 }, { 13, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, 128, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248 }, { 13, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, 302, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249 }, { 13, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, 303, -250, -250, -250, -250, -250, 304, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250 }, { 13, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, 148, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251 }, { 13, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, 125, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252 }, { 13, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253 }, { 13, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, 163, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254 }, { 13, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, 305, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255 }, { 13, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, 306, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256 }, { 13, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, 307, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257 }, { 13, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, 308, 309, -258, -258, -258, -258, 310, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258 }, { 13, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, 311, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259 }, { 13, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, 312, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260 }, { 13, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261 }, { 13, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, 313, -262, -262, -262, -262, -262, -262, -262, 314, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262 }, { 13, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, 263, -263, -263, -263, -263, -263, -263, -263, 264, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, -263 }, { 13, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264 }, { 13, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, 315, -265, -265, -265, -265, -265, -265, -265, 316, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265 }, { 13, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, 317, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266 }, { 13, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, 318, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267 }, { 13, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268, -268 }, { 13, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, -269 }, { 13, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270 }, { 13, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, 319, -271, -271, -271, -271, -271, 320, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271, -271 }, { 13, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, 321, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272 }, { 13, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, 322, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273 }, { 13, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274 }, { 13, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275, -275 }, { 13, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, 323, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, -276 }, { 13, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, 324, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277 }, { 13, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278 }, { 13, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, -279 }, { 13, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280 }, { 13, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, -281 }, { 13, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282 }, { 13, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283 }, { 13, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284 }, { 13, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, 325, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285 }, { 13, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, 326, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286 }, { 13, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287 }, { 13, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, 327, 328, -288, -288, -288, -288, 329, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288 }, { 13, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, 330, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289 }, { 13, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, 291, -290, -290, -290, -290, -290, -290, -290, -290, 292, -290, -290, -290, -290, -290, -290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290 }, { 13, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, 291, -291, -291, -291, -291, -291, -291, -291, -291, 292, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291 }, { 13, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292 }, { 13, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, 291, -293, -293, -293, -293, -293, -293, -293, -293, 292, -293, -293, -293, -293, -293, -293, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293 }, { 13, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, 291, -294, -294, -294, -294, -294, -294, -294, -294, 292, -294, -294, -294, -294, 293, -294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294 }, { 13, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, 295, -295, -295, -295, -295, -295, -295, -295, -295, 296, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295 }, { 13, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296 }, { 13, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, 332, 332, 332, 332, 332, 332, 332, 332, 332, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297 }, { 13, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, 295, -298, -298, -298, -298, -298, -298, -298, -298, 296, -298, -298, -298, -298, 293, 297, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298 }, { 13, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, 333, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299 }, { 13, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, 137, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300 }, { 13, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, 131, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301 }, { 13, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302 }, { 13, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, 334, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303 }, { 13, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, 335, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304 }, { 13, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, 163, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305 }, { 13, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, 336, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306 }, { 13, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, 163, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307 }, { 13, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, 337, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308 }, { 13, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, 338, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309 }, { 13, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, 339, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310 }, { 13, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, 340, -311, -311, -311, -311, -311, -311, -311, 341, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311 }, { 13, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, 163, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312 }, { 13, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, 313, -313, -313, -313, -313, -313, -313, -313, 314, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313 }, { 13, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314 }, { 13, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, 315, -315, -315, -315, -315, -315, -315, -315, 316, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315 }, { 13, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316 }, { 13, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, 342, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317 }, { 13, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318 }, { 13, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, 343, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319 }, { 13, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, 344, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320 }, { 13, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321 }, { 13, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322 }, { 13, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323 }, { 13, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, 205, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324 }, { 13, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, 345, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325 }, { 13, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, 346, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326 }, { 13, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, 347, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327 }, { 13, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, 348, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328 }, { 13, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, 349, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329 }, { 13, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, 350, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330 }, { 13, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, 291, -331, -331, -331, -331, -331, -331, -331, -331, 292, -331, -331, -331, -331, -331, -331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331 }, { 13, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, 351, -332, -332, -332, -332, -332, -332, -332, -332, 352, -332, -332, -332, -332, -332, -332, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332 }, { 13, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, 354, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333 }, { 13, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, 151, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334 }, { 13, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, 151, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335 }, { 13, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, 163, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336 }, { 13, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, 125, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337 }, { 13, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, 355, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338 }, { 13, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, 125, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339 }, { 13, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, 340, -340, -340, -340, -340, -340, -340, -340, 341, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340 }, { 13, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341 }, { 13, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, 356, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342 }, { 13, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, 357, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343 }, { 13, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, 358, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344 }, { 13, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, 359, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345 }, { 13, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346 }, { 13, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, 360, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347 }, { 13, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, 361, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348 }, { 13, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, 362, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349 }, { 13, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350 }, { 13, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, 351, -351, -351, -351, -351, -351, -351, -351, -351, 352, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351 }, { 13, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352 }, { 13, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, 351, -353, -353, -353, -353, -353, -353, -353, -353, 352, -353, -353, -353, -353, -353, -353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353 }, { 13, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, 363, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354 }, { 13, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, 125, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355 }, { 13, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, 364, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356 }, { 13, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357 }, { 13, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358 }, { 13, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359 }, { 13, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360 }, { 13, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, 365, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361 }, { 13, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362 }, { 13, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, 125, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363 }, { 13, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, 366, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364 }, { 13, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365 }, { 13, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366 }, } ; static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up wcsulextext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ (yytext_ptr) -= (yy_more_len); \ wcsulexleng = (size_t) (yy_cp - (yytext_ptr)); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 118 #define YY_END_OF_BUFFER 119 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[367] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 117, 119, 20, 118, 9, 11, 12, 14, 15, 20, 15, 15, 20, 15, 15, 15, 15, 20, 20, 15, 15, 15, 15, 19, 15, 20, 20, 15, 20, 20, 15, 20, 15, 20, 20, 15, 15, 20, 20, 1, 8, 20, 2, 20, 20, 23, 21, 22, 44, 41, 38, 37, 40, 39, 43, 42, 31, 25, 24, 30, 35, 36, 26, 28, 29, 27, 33, 32, 105, 45, 105, 57, 61, 66, 67, 69, 72, 74, 83, 105, 105, 89, 92, 99, 101, 103, 46, 105, 105, 62, 105, 68, 70, 105, 78, 105, 105, 93, 100, 105, 105, 116, 113, 112, 111, 116, 111, 114, 107, 115, 106, 117, 9, 15, 0, 0, 16, 0, 16, 16, 16, 16, 0, 0, 16, 17, 0, 0, 0, 0, 16, 0, 0, 16, 0, 15, 15, 0, 15, 15, 0, 0, 0, 16, 0, 0, 0, 0, 15, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 0, 15, 1, 13, 4, 0, 0, 0, 23, 34, 51, 0, 0, 71, 73, 0, 85, 91, 0, 104, 0, 0, 0, 0, 0, 58, 0, 0, 60, 0, 65, 0, 75, 76, 0, 0, 0, 0, 86, 87, 0, 0, 0, 97, 0, 46, 113, 112, 111, 0, 111, 114, 107, 115, 106, 0, 0, 0, 0, 0, 111, 114, 107, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 3, 0, 0, 6, 0, 0, 0, 84, 98, 47, 0, 0, 0, 54, 55, 0, 0, 63, 64, 77, 79, 80, 81, 82, 0, 88, 90, 0, 0, 0, 0, 110, 0, 0, 0, 108, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 5, 0, 56, 0, 0, 52, 53, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 88, 0, 0, 0, 102, 0, 109, 0, 0, 0, 0, 49, 50, 87, 94, 0, 96, 0, 0, 95, 48 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; static yyconst yy_state_type yy_NUL_trans[367] = { 0, 14, 14, 57, 57, 60, 60, 80, 80, 113, 113, 123, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ; extern int wcsulex_flex_debug; int wcsulex_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected static int yy_more_flag = 0; static int yy_more_len = 0; #define yymore() ((yy_more_flag) = 1) #define YY_MORE_ADJ (yy_more_len) #define YY_RESTORE_YY_MORE_OFFSET char *wcsulextext; #line 1 "wcsulex.l" /*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsulex.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * wcsulex.l is a Flex description file containing the definition of a * recursive, multi-buffered lexical scanner that parses FITS units * specifications. * * It requires Flex v2.5.4 or later. * * Refer to wcsunits.h for a description of the user interface and operating * notes. * *===========================================================================*/ /* Options. */ /* Exponents. */ /* Metric prefixes. */ /* Basic and derived SI units. */ /* Additional recognized units: all metric prefixes allowed. */ /* Additional recognized units: only super-metric prefixes allowed. */ /* Additional recognized units: only sub-metric prefixes allowed. */ /* Additional recognized units for which NO metric prefixes are allowed. */ /* All additional recognized units. */ /* Exclusive start states. */ #line 85 "wcsulex.l" /* To get the prototype for fileno() from stdio.h when gcc is invoked with * -std=c89 (same as -ansi) or -std=c99 since we do not define YY_INPUT. */ #define _POSIX_SOURCE 1 #include #include #include #include #include "wcserr.h" #include "wcsmath.h" #include "wcsunits.h" #include "wcsutil.h" #define YY_DECL int wcsulexe(const char unitstr[], int *func, double *scale, \ double units[WCSUNITS_NTYPE], struct wcserr **err) /* Used in preempting the call to exit() by yy_fatal_error(). */ jmp_buf wcsulex_abort_jmp_env; #define exit(status) longjmp(wcsulex_abort_jmp_env, status) #line 6934 "wcsulex.c" #define INITIAL 0 #define PAREN 1 #define PREFIX 2 #define UNITS 3 #define EXPON 4 #define FLUSH 5 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int wcsulexlex_destroy (void ); int wcsulexget_debug (void ); void wcsulexset_debug (int debug_flag ); YY_EXTRA_TYPE wcsulexget_extra (void ); void wcsulexset_extra (YY_EXTRA_TYPE user_defined ); FILE *wcsulexget_in (void ); void wcsulexset_in (FILE * in_str ); FILE *wcsulexget_out (void ); void wcsulexset_out (FILE * out_str ); yy_size_t wcsulexget_leng (void ); char *wcsulexget_text (void ); int wcsulexget_lineno (void ); void wcsulexset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int wcsulexwrap (void ); #else extern int wcsulexwrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( wcsulextext, wcsulexleng, 1, wcsulexout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ errno=0; \ while ( (result = read( fileno(wcsulexin), (char *) buf, max_size )) < 0 ) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(wcsulexin); \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int wcsulexlex (void); #define YY_DECL int wcsulexlex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after wcsulextext and wcsulexleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ if ( wcsulexleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (wcsulextext[wcsulexleng - 1] == '\n'); \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! wcsulexin ) wcsulexin = stdin; if ( ! wcsulexout ) wcsulexout = stdout; if ( ! YY_CURRENT_BUFFER ) { wcsulexensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = wcsulex_create_buffer(wcsulexin,YY_BUF_SIZE ); } wcsulex_load_buffer_state( ); } { #line 108 "wcsulex.l" static const char *function = "wcsulexe"; char ctmp[72]; int bracket = 0; int operator = 0; int paren = 0; int status = 0; int func_r, i, j; double dexp, expon, factor, factor_r, types[WCSUNITS_NTYPE]; YY_BUFFER_STATE buf; void add(double *factor, double types[], double *expon, double *scale, double units[]); int wcsulexlex_destroy(void); if (err) *err = 0x0; *func = 0; for (i = 0; i < WCSUNITS_NTYPE; i++) { units[i] = 0.0; types[i] = 0.0; } expon = 1.0; factor = 1.0; *scale = 1.0; wcsulex_scan_string(unitstr); /* Return here via longjmp() invoked by yy_fatal_error(). */ if (setjmp(wcsulex_abort_jmp_env)) { return wcserr_set(WCSERR_SET(UNITSERR_PARSER_ERROR), "Internal units parser error parsing '%s'", unitstr); } BEGIN(INITIAL); #ifdef DEBUG fprintf(stderr, "\n%s ->\n", unitstr); #endif #line 7181 "wcsulex.c" while ( 1 ) /* loops until end-of-file is reached */ { (yy_more_len) = 0; if ( (yy_more_flag) ) { (yy_more_len) = (yy_c_buf_p) - (yytext_ptr); (yy_more_flag) = 0; } yy_cp = (yy_c_buf_p); /* Support of wcsulextext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); yy_match: while ( (yy_current_state = yy_nxt[yy_current_state][ YY_SC_TO_UI(*yy_cp) ]) > 0 ) { if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } ++yy_cp; } yy_current_state = -yy_current_state; yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos) + 1; yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 148 "wcsulex.l" { /* Pretend initial whitespace doesn't exist. */ yy_set_bol(1); } YY_BREAK case 2: YY_RULE_SETUP #line 153 "wcsulex.l" { if (bracket++) { BEGIN(FLUSH); } else { yy_set_bol(1); } } YY_BREAK case 3: YY_RULE_SETUP #line 161 "wcsulex.l" { status = wcserr_set(WCSERR_SET(UNITSERR_BAD_NUM_MULTIPLIER), "Invalid exponent in '%s'", unitstr); BEGIN(FLUSH); } YY_BREAK case 4: YY_RULE_SETUP #line 167 "wcsulex.l" { factor = 10.0; BEGIN(EXPON); } YY_BREAK case 5: YY_RULE_SETUP #line 172 "wcsulex.l" { *func = 1; unput('('); BEGIN(PAREN); } YY_BREAK case 6: YY_RULE_SETUP #line 178 "wcsulex.l" { *func = 2; unput('('); BEGIN(PAREN); } YY_BREAK case 7: YY_RULE_SETUP #line 184 "wcsulex.l" { *func = 3; unput('('); BEGIN(PAREN); } YY_BREAK case 8: YY_RULE_SETUP #line 190 "wcsulex.l" { /* Leading binary multiply. */ status = wcserr_set(WCSERR_SET(UNITSERR_DANGLING_BINOP), "Dangling binary operator in '%s'", unitstr); BEGIN(FLUSH); } YY_BREAK case 9: YY_RULE_SETUP #line 197 "wcsulex.l" /* Discard whitespace in INITIAL context. */ YY_BREAK case 10: YY_RULE_SETUP #line 199 "wcsulex.l" { expon /= 2.0; unput('('); BEGIN(PAREN); } YY_BREAK case 11: YY_RULE_SETUP #line 205 "wcsulex.l" { /* Gather terms in parentheses. */ yyless(0); BEGIN(PAREN); } YY_BREAK case 12: YY_RULE_SETUP #line 211 "wcsulex.l" { if (operator++) { BEGIN(FLUSH); } } YY_BREAK case 13: #line 218 "wcsulex.l" case 14: YY_RULE_SETUP #line 218 "wcsulex.l" { if (operator++) { BEGIN(FLUSH); } else { expon *= -1.0; } } YY_BREAK case 15: YY_RULE_SETUP #line 226 "wcsulex.l" { operator = 0; yyless(0); BEGIN(UNITS); } YY_BREAK case 16: #line 233 "wcsulex.l" case 17: #line 234 "wcsulex.l" case 18: YY_RULE_SETUP #line 234 "wcsulex.l" { operator = 0; yyless(0); BEGIN(PREFIX); } YY_BREAK case 19: YY_RULE_SETUP #line 240 "wcsulex.l" { bracket = !bracket; BEGIN(FLUSH); } YY_BREAK case 20: YY_RULE_SETUP #line 245 "wcsulex.l" { status = wcserr_set(WCSERR_SET(UNITSERR_BAD_INITIAL_SYMBOL), "Invalid symbol in INITIAL context in '%s'", unitstr); BEGIN(FLUSH); } YY_BREAK case 21: YY_RULE_SETUP #line 251 "wcsulex.l" { paren++; operator = 0; yymore(); } YY_BREAK case 22: YY_RULE_SETUP #line 257 "wcsulex.l" { paren--; if (paren) { /* Not balanced yet. */ yymore(); } else { /* Balanced; strip off the outer parentheses and recurse. */ wcsulextext[wcsulexleng-1] = '\0'; buf = YY_CURRENT_BUFFER; status = wcsulexe(wcsulextext+1, &func_r, &factor_r, types, err); wcsulex_switch_to_buffer(buf); if (func_r) { status = wcserr_set(WCSERR_SET(UNITSERR_FUNCTION_CONTEXT), "Function in invalid context in '%s'", unitstr); } if (status) { BEGIN(FLUSH); } else { factor *= factor_r; BEGIN(EXPON); } } } YY_BREAK case 23: /* rule 23 can match eol */ YY_RULE_SETUP #line 285 "wcsulex.l" { yymore(); } YY_BREAK case 24: YY_RULE_SETUP #line 289 "wcsulex.l" { factor = 1e-1; BEGIN(UNITS); } YY_BREAK case 25: YY_RULE_SETUP #line 294 "wcsulex.l" { factor = 1e-2; BEGIN(UNITS); } YY_BREAK case 26: YY_RULE_SETUP #line 299 "wcsulex.l" { factor = 1e-3; BEGIN(UNITS); } YY_BREAK case 27: YY_RULE_SETUP #line 304 "wcsulex.l" { factor = 1e-6; BEGIN(UNITS); } YY_BREAK case 28: YY_RULE_SETUP #line 309 "wcsulex.l" { factor = 1e-9; BEGIN(UNITS); } YY_BREAK case 29: YY_RULE_SETUP #line 314 "wcsulex.l" { factor = 1e-12; BEGIN(UNITS); } YY_BREAK case 30: YY_RULE_SETUP #line 319 "wcsulex.l" { factor = 1e-15; BEGIN(UNITS); } YY_BREAK case 31: YY_RULE_SETUP #line 324 "wcsulex.l" { factor = 1e-18; BEGIN(UNITS); } YY_BREAK case 32: YY_RULE_SETUP #line 329 "wcsulex.l" { factor = 1e-21; BEGIN(UNITS); } YY_BREAK case 33: YY_RULE_SETUP #line 334 "wcsulex.l" { factor = 1e-24; BEGIN(UNITS); } YY_BREAK case 34: YY_RULE_SETUP #line 339 "wcsulex.l" { factor = 1e+1; BEGIN(UNITS); } YY_BREAK case 35: YY_RULE_SETUP #line 344 "wcsulex.l" { factor = 1e+2; BEGIN(UNITS); } YY_BREAK case 36: YY_RULE_SETUP #line 349 "wcsulex.l" { factor = 1e+3; BEGIN(UNITS); } YY_BREAK case 37: YY_RULE_SETUP #line 354 "wcsulex.l" { factor = 1e+6; BEGIN(UNITS); } YY_BREAK case 38: YY_RULE_SETUP #line 359 "wcsulex.l" { factor = 1e+9; BEGIN(UNITS); } YY_BREAK case 39: YY_RULE_SETUP #line 364 "wcsulex.l" { factor = 1e+12; BEGIN(UNITS); } YY_BREAK case 40: YY_RULE_SETUP #line 369 "wcsulex.l" { factor = 1e+15; BEGIN(UNITS); } YY_BREAK case 41: YY_RULE_SETUP #line 374 "wcsulex.l" { factor = 1e+18; BEGIN(UNITS); } YY_BREAK case 42: YY_RULE_SETUP #line 379 "wcsulex.l" { factor = 1e+21; BEGIN(UNITS); } YY_BREAK case 43: YY_RULE_SETUP #line 384 "wcsulex.l" { factor = 1e+24; BEGIN(UNITS); } YY_BREAK case 44: YY_RULE_SETUP #line 389 "wcsulex.l" { /* Internal parser error. */ status = wcserr_set(WCSERR_SET(UNITSERR_PARSER_ERROR), "Internal units parser error parsing '%s'", unitstr); BEGIN(FLUSH); } YY_BREAK case 45: YY_RULE_SETUP #line 396 "wcsulex.l" { /* Ampere. */ types[WCSUNITS_CHARGE] += 1.0; types[WCSUNITS_TIME] -= 1.0; BEGIN(EXPON); } YY_BREAK case 46: YY_RULE_SETUP #line 403 "wcsulex.l" { /* Year (annum). */ factor *= 31557600.0; types[WCSUNITS_TIME] += 1.0; BEGIN(EXPON); } YY_BREAK case 47: YY_RULE_SETUP #line 410 "wcsulex.l" { /* Analogue-to-digital converter units. */ types[WCSUNITS_COUNT] += 1.0; BEGIN(EXPON); } YY_BREAK case 48: YY_RULE_SETUP #line 416 "wcsulex.l" { /* Angstrom. */ factor *= 1e-10; types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } YY_BREAK case 49: YY_RULE_SETUP #line 423 "wcsulex.l" { /* Minute of arc. */ factor /= 60.0; types[WCSUNITS_PLANE_ANGLE] += 1.0; BEGIN(EXPON); } YY_BREAK case 50: YY_RULE_SETUP #line 430 "wcsulex.l" { /* Second of arc. */ factor /= 3600.0; types[WCSUNITS_PLANE_ANGLE] += 1.0; BEGIN(EXPON); } YY_BREAK case 51: YY_RULE_SETUP #line 437 "wcsulex.l" { /* Astronomical unit. */ factor *= 1.49598e+11; types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } YY_BREAK case 52: YY_RULE_SETUP #line 444 "wcsulex.l" { /* Barn. */ factor *= 1e-28; types[WCSUNITS_LENGTH] += 2.0; BEGIN(EXPON); } YY_BREAK case 53: YY_RULE_SETUP #line 451 "wcsulex.l" { /* Beam, as in Jy/beam. */ types[WCSUNITS_BEAM] += 1.0; BEGIN(EXPON); } YY_BREAK case 54: YY_RULE_SETUP #line 457 "wcsulex.l" { /* Bin (e.g. histogram). */ types[WCSUNITS_BIN] += 1.0; BEGIN(EXPON); } YY_BREAK case 55: YY_RULE_SETUP #line 463 "wcsulex.l" { /* Bit. */ types[WCSUNITS_BIT] += 1.0; BEGIN(EXPON); } YY_BREAK case 56: YY_RULE_SETUP #line 469 "wcsulex.l" { /* Byte. */ factor *= 8.0; types[WCSUNITS_BIT] += 1.0; BEGIN(EXPON); } YY_BREAK case 57: YY_RULE_SETUP #line 476 "wcsulex.l" { /* Coulomb. */ types[WCSUNITS_CHARGE] += 1.0; BEGIN(EXPON); } YY_BREAK case 58: YY_RULE_SETUP #line 482 "wcsulex.l" { /* Candela. */ types[WCSUNITS_LUMINTEN] += 1.0; BEGIN(EXPON); } YY_BREAK case 59: YY_RULE_SETUP #line 488 "wcsulex.l" { /* Channel. */ types[WCSUNITS_BIN] += 1.0; BEGIN(EXPON); } YY_BREAK case 60: YY_RULE_SETUP #line 494 "wcsulex.l" { /* Count. */ types[WCSUNITS_COUNT] += 1.0; BEGIN(EXPON); } YY_BREAK case 61: YY_RULE_SETUP #line 500 "wcsulex.l" { /* Debye. */ factor *= 1e-29 / 3.0; types[WCSUNITS_CHARGE] += 1.0; types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } YY_BREAK case 62: YY_RULE_SETUP #line 508 "wcsulex.l" { /* Day. */ factor *= 86400.0; types[WCSUNITS_TIME] += 1.0; BEGIN(EXPON); } YY_BREAK case 63: YY_RULE_SETUP #line 515 "wcsulex.l" { /* Degree. */ types[WCSUNITS_PLANE_ANGLE] += 1.0; BEGIN(EXPON); } YY_BREAK case 64: YY_RULE_SETUP #line 521 "wcsulex.l" { /* Erg. */ factor *= 1e-7; types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } YY_BREAK case 65: YY_RULE_SETUP #line 530 "wcsulex.l" { /* Electron volt. */ factor *= 1.6021765e-19; types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } YY_BREAK case 66: YY_RULE_SETUP #line 539 "wcsulex.l" { /* Farad. */ types[WCSUNITS_MASS] -= 1.0; types[WCSUNITS_LENGTH] -= 2.0; types[WCSUNITS_TIME] += 3.0; types[WCSUNITS_CHARGE] += 2.0; BEGIN(EXPON); } YY_BREAK case 67: YY_RULE_SETUP #line 548 "wcsulex.l" { /* Gauss. */ factor *= 1e-4; types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_TIME] += 1.0; types[WCSUNITS_CHARGE] -= 1.0; BEGIN(EXPON); } YY_BREAK case 68: YY_RULE_SETUP #line 557 "wcsulex.l" { /* Gram. */ factor *= 1e-3; types[WCSUNITS_MASS] += 1.0; BEGIN(EXPON); } YY_BREAK case 69: YY_RULE_SETUP #line 564 "wcsulex.l" { /* Henry. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] += 2.0; types[WCSUNITS_CHARGE] -= 2.0; BEGIN(EXPON); } YY_BREAK case 70: YY_RULE_SETUP #line 573 "wcsulex.l" { /* Hour. */ factor *= 3600.0; types[WCSUNITS_TIME] += 1.0; BEGIN(EXPON); } YY_BREAK case 71: YY_RULE_SETUP #line 580 "wcsulex.l" { /* Hertz. */ types[WCSUNITS_TIME] -= 1.0; BEGIN(EXPON); } YY_BREAK case 72: YY_RULE_SETUP #line 586 "wcsulex.l" { /* Joule. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } YY_BREAK case 73: YY_RULE_SETUP #line 594 "wcsulex.l" { /* Jansky. */ factor *= 1e-26; types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } YY_BREAK case 74: YY_RULE_SETUP #line 602 "wcsulex.l" { /* Kelvin. */ types[WCSUNITS_TEMPERATURE] += 1.0; BEGIN(EXPON); } YY_BREAK case 75: YY_RULE_SETUP #line 608 "wcsulex.l" { /* Lumen. */ types[WCSUNITS_LUMINTEN] += 1.0; types[WCSUNITS_SOLID_ANGLE] += 1.0; BEGIN(EXPON); } YY_BREAK case 76: YY_RULE_SETUP #line 615 "wcsulex.l" { /* Lux. */ types[WCSUNITS_LUMINTEN] += 1.0; types[WCSUNITS_SOLID_ANGLE] += 1.0; types[WCSUNITS_LENGTH] -= 2.0; BEGIN(EXPON); } YY_BREAK case 77: YY_RULE_SETUP #line 623 "wcsulex.l" { /* Light year. */ factor *= 2.99792458e8 * 31557600.0; types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } YY_BREAK case 78: YY_RULE_SETUP #line 630 "wcsulex.l" { /* Metre. */ types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } YY_BREAK case 79: YY_RULE_SETUP #line 636 "wcsulex.l" { /* Stellar magnitude. */ types[WCSUNITS_MAGNITUDE] += 1.0; BEGIN(EXPON); } YY_BREAK case 80: YY_RULE_SETUP #line 642 "wcsulex.l" { /* Milli-arcsec. */ factor /= 3600e+3; types[WCSUNITS_PLANE_ANGLE] += 1.0; BEGIN(EXPON); } YY_BREAK case 81: YY_RULE_SETUP #line 649 "wcsulex.l" { /* Minute. */ factor *= 60.0; types[WCSUNITS_TIME] += 1.0; BEGIN(EXPON); } YY_BREAK case 82: YY_RULE_SETUP #line 656 "wcsulex.l" { /* Mole. */ types[WCSUNITS_MOLE] += 1.0; BEGIN(EXPON); } YY_BREAK case 83: YY_RULE_SETUP #line 662 "wcsulex.l" { /* Newton. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 1.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } YY_BREAK case 84: YY_RULE_SETUP #line 670 "wcsulex.l" { /* Ohm. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 1.0; types[WCSUNITS_CHARGE] -= 2.0; BEGIN(EXPON); } YY_BREAK case 85: YY_RULE_SETUP #line 679 "wcsulex.l" { /* Pascal. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] -= 1.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } YY_BREAK case 86: YY_RULE_SETUP #line 687 "wcsulex.l" { /* Parsec. */ factor *= 3.0857e16; types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } YY_BREAK case 87: YY_RULE_SETUP #line 694 "wcsulex.l" { /* Photon. */ types[WCSUNITS_COUNT] += 1.0; BEGIN(EXPON); } YY_BREAK case 88: YY_RULE_SETUP #line 700 "wcsulex.l" { /* Pixel. */ types[WCSUNITS_PIXEL] += 1.0; BEGIN(EXPON); } YY_BREAK case 89: YY_RULE_SETUP #line 706 "wcsulex.l" { /* Rayleigh. */ factor *= 1e10 / (4.0 * PI); types[WCSUNITS_LENGTH] -= 2.0; types[WCSUNITS_TIME] -= 1.0; types[WCSUNITS_SOLID_ANGLE] -= 1.0; BEGIN(EXPON); } YY_BREAK case 90: YY_RULE_SETUP #line 715 "wcsulex.l" { /* Radian. */ factor *= 180.0 / PI; types[WCSUNITS_PLANE_ANGLE] += 1.0; BEGIN(EXPON); } YY_BREAK case 91: YY_RULE_SETUP #line 722 "wcsulex.l" { /* Rydberg. */ factor *= 13.605692 * 1.6021765e-19; types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 2.0; BEGIN(EXPON); } YY_BREAK case 92: YY_RULE_SETUP #line 731 "wcsulex.l" { /* Siemen. */ types[WCSUNITS_MASS] -= 1.0; types[WCSUNITS_LENGTH] -= 2.0; types[WCSUNITS_TIME] += 1.0; types[WCSUNITS_CHARGE] += 2.0; BEGIN(EXPON); } YY_BREAK case 93: YY_RULE_SETUP #line 740 "wcsulex.l" { /* Second. */ types[WCSUNITS_TIME] += 1.0; BEGIN(EXPON); } YY_BREAK case 94: YY_RULE_SETUP #line 746 "wcsulex.l" { /* Solar luminosity. */ factor *= 3.8268e26; types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 3.0; BEGIN(EXPON); } YY_BREAK case 95: YY_RULE_SETUP #line 755 "wcsulex.l" { /* Solar mass. */ factor *= 1.9891e30; types[WCSUNITS_MASS] += 1.0; BEGIN(EXPON); } YY_BREAK case 96: YY_RULE_SETUP #line 762 "wcsulex.l" { /* Solar radius. */ factor *= 6.9599e8; types[WCSUNITS_LENGTH] += 1.0; BEGIN(EXPON); } YY_BREAK case 97: YY_RULE_SETUP #line 769 "wcsulex.l" { /* Steradian. */ types[WCSUNITS_SOLID_ANGLE] += 1.0; BEGIN(EXPON); } YY_BREAK case 98: YY_RULE_SETUP #line 775 "wcsulex.l" { /* Sun (with respect to). */ types[WCSUNITS_SOLRATIO] += 1.0; BEGIN(EXPON); } YY_BREAK case 99: YY_RULE_SETUP #line 781 "wcsulex.l" { /* Tesla. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_TIME] += 1.0; types[WCSUNITS_CHARGE] -= 1.0; BEGIN(EXPON); } YY_BREAK case 100: YY_RULE_SETUP #line 789 "wcsulex.l" { /* Unified atomic mass unit. */ factor *= 1.6605387e-27; types[WCSUNITS_MASS] += 1.0; BEGIN(EXPON); } YY_BREAK case 101: YY_RULE_SETUP #line 796 "wcsulex.l" { /* Volt. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 1.0; types[WCSUNITS_TIME] -= 2.0; types[WCSUNITS_CHARGE] -= 1.0; BEGIN(EXPON); } YY_BREAK case 102: YY_RULE_SETUP #line 805 "wcsulex.l" { /* Voxel. */ types[WCSUNITS_VOXEL] += 1.0; BEGIN(EXPON); } YY_BREAK case 103: YY_RULE_SETUP #line 811 "wcsulex.l" { /* Watt. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] -= 3.0; BEGIN(EXPON); } YY_BREAK case 104: YY_RULE_SETUP #line 819 "wcsulex.l" { /* Weber. */ types[WCSUNITS_MASS] += 1.0; types[WCSUNITS_LENGTH] += 2.0; types[WCSUNITS_TIME] += 1.0; types[WCSUNITS_CHARGE] -= 1.0; BEGIN(EXPON); } YY_BREAK case 105: YY_RULE_SETUP #line 828 "wcsulex.l" { /* Internal parser error. */ status = wcserr_set(WCSERR_SET(UNITSERR_PARSER_ERROR), "Internal units parser error parsing '%s'", unitstr); BEGIN(FLUSH); } YY_BREAK case 106: YY_RULE_SETUP #line 835 "wcsulex.l" { /* Exponentiation. */ if (operator++) { BEGIN(FLUSH); } } YY_BREAK case 107: YY_RULE_SETUP #line 842 "wcsulex.l" { sscanf(wcsulextext, " %d", &i); expon *= (double)i; add(&factor, types, &expon, scale, units); operator = 0; BEGIN(INITIAL); } YY_BREAK case 108: YY_RULE_SETUP #line 850 "wcsulex.l" { sscanf(wcsulextext, " (%d)", &i); expon *= (double)i; add(&factor, types, &expon, scale, units); operator = 0; BEGIN(INITIAL); } YY_BREAK case 109: YY_RULE_SETUP #line 858 "wcsulex.l" { sscanf(wcsulextext, " (%d/%d)", &i, &j); expon *= (double)i / (double)j; add(&factor, types, &expon, scale, units); operator = 0; BEGIN(INITIAL); } YY_BREAK case 110: YY_RULE_SETUP #line 866 "wcsulex.l" { sscanf(wcsulextext, " (%s)", ctmp); wcsutil_str2double(ctmp, "%lf", &dexp); expon *= dexp; add(&factor, types, &expon, scale, units); operator = 0; BEGIN(INITIAL); } YY_BREAK case 111: YY_RULE_SETUP #line 875 "wcsulex.l" { /* Multiply. */ if (operator++) { BEGIN(FLUSH); } else { add(&factor, types, &expon, scale, units); BEGIN(INITIAL); } } YY_BREAK case 112: YY_RULE_SETUP #line 885 "wcsulex.l" { /* Multiply. */ if (operator) { BEGIN(FLUSH); } else { add(&factor, types, &expon, scale, units); unput('('); BEGIN(INITIAL); } } YY_BREAK case 113: YY_RULE_SETUP #line 896 "wcsulex.l" { /* Multiply. */ if (operator) { BEGIN(FLUSH); } else { add(&factor, types, &expon, scale, units); BEGIN(INITIAL); } } YY_BREAK case 114: YY_RULE_SETUP #line 906 "wcsulex.l" { /* Divide. */ if (operator++) { BEGIN(FLUSH); } else { add(&factor, types, &expon, scale, units); expon = -1.0; BEGIN(INITIAL); } } YY_BREAK case 115: YY_RULE_SETUP #line 917 "wcsulex.l" { add(&factor, types, &expon, scale, units); bracket = !bracket; BEGIN(FLUSH); } YY_BREAK case 116: YY_RULE_SETUP #line 923 "wcsulex.l" { status = wcserr_set(WCSERR_SET(UNITSERR_BAD_EXPON_SYMBOL), "Invalid symbol in EXPON context in '%s'", unitstr); BEGIN(FLUSH); } YY_BREAK case 117: YY_RULE_SETUP #line 929 "wcsulex.l" { /* Discard any remaining input. */ } YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(PAREN): case YY_STATE_EOF(PREFIX): case YY_STATE_EOF(UNITS): case YY_STATE_EOF(EXPON): case YY_STATE_EOF(FLUSH): #line 933 "wcsulex.l" { /* End-of-string. */ if (YY_START == EXPON) { add(&factor, types, &expon, scale, units); } wcsulexlex_destroy(); if (bracket) { status = wcserr_set(WCSERR_SET(UNITSERR_UNBAL_BRACKET), "Unbalanced bracket in '%s'", unitstr); } else if (paren) { status = wcserr_set(WCSERR_SET(UNITSERR_UNBAL_PAREN), "Unbalanced parenthesis in '%s'", unitstr); } else if (operator == 1) { status = wcserr_set(WCSERR_SET(UNITSERR_DANGLING_BINOP), "Dangling binary operator in '%s'", unitstr); } else if (operator) { status = wcserr_set(WCSERR_SET(UNITSERR_CONSEC_BINOPS), "Consecutive binary operators in '%s'", unitstr); #ifdef DEBUG } else { fprintf(stderr, "EOS\n"); #endif } if (status) { for (i = 0; i < WCSUNITS_NTYPE; i++) { units[i] = 0.0; *scale = 0.0; } } return status; } YY_BREAK case 118: YY_RULE_SETUP #line 969 "wcsulex.l" ECHO; YY_BREAK #line 8412 "wcsulex.c" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed wcsulexin at a new source and called * wcsulexlex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = wcsulexin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( wcsulexwrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * wcsulextext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ } /* end of wcsulexlex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ wcsulexrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; wcsulexrestart(wcsulexin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) wcsulexrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { if ( *yy_cp ) { yy_current_state = yy_nxt[yy_current_state][YY_SC_TO_UI(*yy_cp)]; } else yy_current_state = yy_NUL_trans[yy_current_state]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); yy_current_state = yy_NUL_trans[yy_current_state]; yy_is_jam = (yy_current_state == 0); if ( ! yy_is_jam ) { if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } } return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up wcsulextext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register yy_size_t number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ wcsulexrestart(wcsulexin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( wcsulexwrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve wcsulextext */ (yy_hold_char) = *++(yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void wcsulexrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ wcsulexensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = wcsulex_create_buffer(wcsulexin,YY_BUF_SIZE ); } wcsulex_init_buffer(YY_CURRENT_BUFFER,input_file ); wcsulex_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void wcsulex_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * wcsulexpop_buffer_state(); * wcsulexpush_buffer_state(new_buffer); */ wcsulexensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; wcsulex_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (wcsulexwrap()) processing, but the only time this flag * is looked at is after wcsulexwrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void wcsulex_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; wcsulexin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE wcsulex_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) wcsulexalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in wcsulex_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) wcsulexalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in wcsulex_create_buffer()" ); b->yy_is_our_buffer = 1; wcsulex_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with wcsulex_create_buffer() * */ void wcsulex_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) wcsulexfree((void *) b->yy_ch_buf ); wcsulexfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a wcsulexrestart() or at EOF. */ static void wcsulex_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; wcsulex_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then wcsulex_init_buffer was _probably_ * called from wcsulexrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void wcsulex_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) wcsulex_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void wcsulexpush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; wcsulexensure_buffer_stack(); /* This block is copied from wcsulex_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from wcsulex_switch_to_buffer. */ wcsulex_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void wcsulexpop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; wcsulex_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { wcsulex_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void wcsulexensure_buffer_stack (void) { yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)wcsulexalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in wcsulexensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)wcsulexrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in wcsulexensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE wcsulex_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) wcsulexalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in wcsulex_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; wcsulex_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to wcsulexlex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * wcsulex_scan_bytes() instead. */ YY_BUFFER_STATE wcsulex_scan_string (yyconst char * yystr ) { return wcsulex_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to wcsulexlex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE wcsulex_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) wcsulexalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in wcsulex_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = wcsulex_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in wcsulex_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up wcsulextext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ wcsulextext[wcsulexleng] = (yy_hold_char); \ (yy_c_buf_p) = wcsulextext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ wcsulexleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int wcsulexget_lineno (void) { return wcsulexlineno; } /** Get the input stream. * */ FILE *wcsulexget_in (void) { return wcsulexin; } /** Get the output stream. * */ FILE *wcsulexget_out (void) { return wcsulexout; } /** Get the length of the current token. * */ yy_size_t wcsulexget_leng (void) { return wcsulexleng; } /** Get the current token. * */ char *wcsulexget_text (void) { return wcsulextext; } /** Set the current line number. * @param line_number * */ void wcsulexset_lineno (int line_number ) { wcsulexlineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see wcsulex_switch_to_buffer */ void wcsulexset_in (FILE * in_str ) { wcsulexin = in_str ; } void wcsulexset_out (FILE * out_str ) { wcsulexout = out_str ; } int wcsulexget_debug (void) { return wcsulex_flex_debug; } void wcsulexset_debug (int bdebug ) { wcsulex_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from wcsulexlex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT wcsulexin = stdin; wcsulexout = stdout; #else wcsulexin = (FILE *) 0; wcsulexout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * wcsulexlex_init() */ return 0; } /* wcsulexlex_destroy is for both reentrant and non-reentrant scanners. */ int wcsulexlex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ wcsulex_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; wcsulexpop_buffer_state(); } /* Destroy the stack itself. */ wcsulexfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * wcsulexlex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *wcsulexalloc (yy_size_t size ) { return (void *) malloc( size ); } void *wcsulexrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void wcsulexfree (void * ptr ) { free( (char *) ptr ); /* see wcsulexrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 968 "wcsulex.l" /*---------------------------------------------------------------------------- * Accumulate a term in a units specification and reset work variables. *---------------------------------------------------------------------------*/ void add( double *factor, double types[], double *expon, double *scale, double units[]) { int i; *scale *= pow(*factor, *expon); for (i = 0; i < WCSUNITS_NTYPE; i++) { units[i] += *expon * types[i]; types[i] = 0.0; } *expon = 1.0; *factor = 1.0; return; } astropy-1.1.1/cextern/wcslib/C/flexed/README0000644001134200020070000000040612602615515021366 0ustar embrayscience00000000000000This directory contains C code generated by flex 2.5.35 under Debian lenny from the Flex description files (*.l) in the parent directory. These pre-generated source files may be used during installation if Flex 2.5.9 or later is not available on the build host. astropy-1.1.1/cextern/wcslib/C/flexed/wcsbth.c0000644001134200020070000417424512644017723022170 0ustar embrayscience00000000000000#line 2 "wcsbth.c" #line 4 "wcsbth.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer wcsbth_create_buffer #define yy_delete_buffer wcsbth_delete_buffer #define yy_flex_debug wcsbth_flex_debug #define yy_init_buffer wcsbth_init_buffer #define yy_flush_buffer wcsbth_flush_buffer #define yy_load_buffer_state wcsbth_load_buffer_state #define yy_switch_to_buffer wcsbth_switch_to_buffer #define yyin wcsbthin #define yyleng wcsbthleng #define yylex wcsbthlex #define yylineno wcsbthlineno #define yyout wcsbthout #define yyrestart wcsbthrestart #define yytext wcsbthtext #define yywrap wcsbthwrap #define yyalloc wcsbthalloc #define yyrealloc wcsbthrealloc #define yyfree wcsbthfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE wcsbthrestart(wcsbthin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif extern yy_size_t wcsbthleng; extern FILE *wcsbthin, *wcsbthout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up wcsbthtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up wcsbthtext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via wcsbthrestart()), so that the user can continue scanning by * just pointing wcsbthin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when wcsbthtext is formed. */ static char yy_hold_char; static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ yy_size_t wcsbthleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow wcsbthwrap()'s to do buffer switches * instead of setting up a fresh wcsbthin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void wcsbthrestart (FILE *input_file ); void wcsbth_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE wcsbth_create_buffer (FILE *file,int size ); void wcsbth_delete_buffer (YY_BUFFER_STATE b ); void wcsbth_flush_buffer (YY_BUFFER_STATE b ); void wcsbthpush_buffer_state (YY_BUFFER_STATE new_buffer ); void wcsbthpop_buffer_state (void ); static void wcsbthensure_buffer_stack (void ); static void wcsbth_load_buffer_state (void ); static void wcsbth_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER wcsbth_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE wcsbth_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE wcsbth_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE wcsbth_scan_bytes (yyconst char *bytes,yy_size_t len ); void *wcsbthalloc (yy_size_t ); void *wcsbthrealloc (void *,yy_size_t ); void wcsbthfree (void * ); #define yy_new_buffer wcsbth_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ wcsbthensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ wcsbth_create_buffer(wcsbthin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ wcsbthensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ wcsbth_create_buffer(wcsbthin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define wcsbthwrap() 1 #define YY_SKIP_YYWRAP typedef char YY_CHAR; FILE *wcsbthin = (FILE *) 0, *wcsbthout = (FILE *) 0; typedef int yy_state_type; extern int wcsbthlineno; int wcsbthlineno = 1; extern char *wcsbthtext; #define yytext_ptr wcsbthtext static yyconst flex_int16_t yy_nxt[][128] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68 }, { 67, 69, 69, 69, 69, 69, 69, 69, 69, 69, 68, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70, 70, 70, 69, 69, 69, 69, 69, 69, 69, 69, 69, 71, 72, 73, 69, 69, 69, 69, 69, 69, 74, 75, 69, 76, 77, 69, 78, 79, 80, 69, 81, 82, 69, 69, 83, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69 }, { 67, 84, 84, 84, 84, 84, 84, 84, 84, 84, 68, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 85, 86, 86, 86, 86, 86, 86, 86, 86, 86, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84 }, { 67, 84, 84, 84, 84, 84, 84, 84, 84, 84, 68, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 85, 86, 86, 86, 86, 86, 86, 86, 86, 86, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84 }, { 67, 87, 87, 87, 87, 87, 87, 87, 87, 87, 68, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 88, 88, 88, 88, 88, 88, 88, 88, 88, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87 }, { 67, 87, 87, 87, 87, 87, 87, 87, 87, 87, 68, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 88, 88, 88, 88, 88, 88, 88, 88, 88, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87 }, { 67, 89, 89, 89, 89, 89, 89, 89, 89, 89, 68, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 90, 90, 90, 90, 90, 90, 90, 90, 90, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89 }, { 67, 89, 89, 89, 89, 89, 89, 89, 89, 89, 68, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 90, 90, 90, 90, 90, 90, 90, 90, 90, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89 }, { 67, 91, 91, 91, 91, 91, 91, 91, 91, 91, 68, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 92, 92, 92, 92, 92, 92, 92, 92, 92, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91 }, { 67, 91, 91, 91, 91, 91, 91, 91, 91, 91, 68, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 92, 92, 92, 92, 92, 92, 92, 92, 92, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91 }, { 67, 93, 93, 93, 93, 93, 93, 93, 93, 93, 68, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, 94, 94, 94, 94, 94, 94, 94, 94, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93 }, { 67, 93, 93, 93, 93, 93, 93, 93, 93, 93, 68, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, 94, 94, 94, 94, 94, 94, 94, 94, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93 }, { 67, 95, 95, 95, 95, 95, 95, 95, 95, 95, 68, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 96, 97, 97, 97, 97, 97, 97, 97, 97, 97, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95 }, { 67, 95, 95, 95, 95, 95, 95, 95, 95, 95, 68, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 96, 97, 97, 97, 97, 97, 97, 97, 97, 97, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95 }, { 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 98, 98, 98, 98, 98, 98, 98, 98, 98, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68 }, { 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 98, 98, 98, 98, 98, 98, 98, 98, 98, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68 }, { 67, 99, 99, 99, 99, 99, 99, 99, 99, 99, 68, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 100, 100, 100, 100, 100, 100, 100, 100, 100, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99 }, { 67, 99, 99, 99, 99, 99, 99, 99, 99, 99, 68, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 100, 100, 100, 100, 100, 100, 100, 100, 100, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99 }, { 67, 101, 101, 101, 101, 101, 101, 101, 101, 101, 68, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 102, 102, 102, 102, 102, 102, 102, 102, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101 }, { 67, 101, 101, 101, 101, 101, 101, 101, 101, 101, 68, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 102, 102, 102, 102, 102, 102, 102, 102, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101 }, { 67, 103, 103, 103, 103, 103, 103, 103, 103, 103, 68, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103 }, { 67, 103, 103, 103, 103, 103, 103, 103, 103, 103, 68, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103 }, { 67, 105, 105, 105, 105, 105, 105, 105, 105, 105, 68, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 106, 106, 106, 106, 106, 106, 106, 106, 106, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105 }, { 67, 105, 105, 105, 105, 105, 105, 105, 105, 105, 68, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 106, 106, 106, 106, 106, 106, 106, 106, 106, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105 }, { 67, 107, 107, 107, 107, 107, 107, 107, 107, 107, 68, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 108, 108, 108, 108, 108, 108, 108, 108, 108, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107 }, { 67, 107, 107, 107, 107, 107, 107, 107, 107, 107, 68, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 108, 108, 108, 108, 108, 108, 108, 108, 108, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107 }, { 67, 109, 109, 109, 109, 109, 109, 109, 109, 109, 68, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 110, 111, 111, 111, 111, 111, 111, 111, 111, 111, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109 }, { 67, 109, 109, 109, 109, 109, 109, 109, 109, 109, 68, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 110, 111, 111, 111, 111, 111, 111, 111, 111, 111, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109 }, { 67, 112, 112, 112, 112, 112, 112, 112, 112, 112, 68, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 113, 113, 113, 113, 113, 113, 113, 113, 113, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112 }, { 67, 112, 112, 112, 112, 112, 112, 112, 112, 112, 68, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 113, 113, 113, 113, 113, 113, 113, 113, 113, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112 }, { 67, 114, 114, 114, 114, 114, 114, 114, 114, 114, 68, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 115, 115, 115, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114 }, { 67, 114, 114, 114, 114, 114, 114, 114, 114, 114, 68, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 115, 115, 115, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114 }, { 67, 116, 116, 116, 116, 116, 116, 116, 116, 116, 68, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116 }, { 67, 116, 116, 116, 116, 116, 116, 116, 116, 116, 68, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116 }, { 67, 118, 118, 118, 118, 118, 118, 118, 118, 118, 68, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118 }, { 67, 118, 118, 118, 118, 118, 118, 118, 118, 118, 68, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118 }, { 67, 120, 120, 120, 120, 120, 120, 120, 120, 120, 68, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120 }, { 67, 120, 120, 120, 120, 120, 120, 120, 120, 120, 68, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120 }, { 67, 122, 122, 122, 122, 122, 122, 122, 122, 122, 68, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122 }, { 67, 122, 122, 122, 122, 122, 122, 122, 122, 122, 68, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122 }, { 67, 123, 123, 123, 123, 123, 123, 123, 123, 123, 68, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 124, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123 }, { 67, 123, 123, 123, 123, 123, 123, 123, 123, 123, 68, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 124, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123 }, { 67, 125, 125, 125, 125, 125, 125, 125, 125, 125, 68, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 126, 126, 126, 126, 126, 126, 126, 126, 126, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125 }, { 67, 125, 125, 125, 125, 125, 125, 125, 125, 125, 68, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 126, 126, 126, 126, 126, 126, 126, 126, 126, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125 }, { 67, 127, 127, 127, 127, 127, 127, 127, 127, 127, 68, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127 }, { 67, 127, 127, 127, 127, 127, 127, 127, 127, 127, 68, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127 }, { 67, 129, 129, 129, 129, 129, 129, 129, 129, 129, 68, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 130, 130, 130, 130, 130, 130, 130, 130, 130, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129 }, { 67, 129, 129, 129, 129, 129, 129, 129, 129, 129, 68, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 130, 130, 130, 130, 130, 130, 130, 130, 130, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129 }, { 67, 131, 131, 131, 131, 131, 131, 131, 131, 131, 68, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 132, 132, 132, 132, 132, 132, 132, 132, 132, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131 }, { 67, 131, 131, 131, 131, 131, 131, 131, 131, 131, 68, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 132, 132, 132, 132, 132, 132, 132, 132, 132, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131 }, { 67, 133, 133, 133, 133, 133, 133, 133, 133, 133, 68, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 134, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133 }, { 67, 133, 133, 133, 133, 133, 133, 133, 133, 133, 68, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 134, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133 }, { 67, 135, 135, 135, 135, 135, 135, 135, 135, 135, 68, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 136, 135, 136, 135, 135, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135 }, { 67, 135, 135, 135, 135, 135, 135, 135, 135, 135, 68, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 136, 135, 136, 135, 135, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135 }, { 67, 138, 138, 138, 138, 138, 138, 138, 138, 138, 68, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 139, 138, 139, 140, 138, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138 }, { 67, 138, 138, 138, 138, 138, 138, 138, 138, 138, 68, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 139, 138, 139, 140, 138, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138 }, { 67, 142, 142, 142, 142, 142, 142, 142, 142, 142, 68, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 143, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142 }, { 67, 142, 142, 142, 142, 142, 142, 142, 142, 142, 68, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 143, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142 }, { 67, 144, 144, 144, 144, 144, 144, 144, 144, 144, 145, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 146, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 147, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144 }, { 67, 144, 144, 144, 144, 144, 144, 144, 144, 144, 145, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 146, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 147, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144 }, { 67, 148, 148, 148, 148, 148, 148, 148, 148, 148, 149, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148 }, { 67, 148, 148, 148, 148, 148, 148, 148, 148, 148, 149, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148 }, { 67, 150, 150, 150, 150, 150, 150, 150, 150, 150, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 }, { 67, 150, 150, 150, 150, 150, 150, 150, 150, 150, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 }, { 67, 152, 152, 152, 152, 152, 152, 152, 152, 152, 153, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152 }, { 67, 152, 152, 152, 152, 152, 152, 152, 152, 152, 153, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152 }, { -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, -67 }, { 67, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, -68 }, { 67, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69 }, { 67, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, -70, -70, -70, -70, -70, -70, -70, -70, -70, 155, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, 156, -70, -70, 157, -70, -70, 158, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70 }, { 67, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, 159, -71, -71, -71, -71, -71, -71, -71, -71, -71, 160, -71, -71, -71, 161, 162, 163, 164, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, -71 }, { 67, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, 165, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, 166, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, -72 }, { 67, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, 167, -73, 168, 169, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73 }, { 67, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, 170, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, 171, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, -74 }, { 67, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, 172, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, -75 }, { 67, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, 173, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, -76 }, { 67, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, 174, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, 175, 176, -77, -77, 177, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, -77 }, { 67, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, 178, -78, -78, -78, 179, 180, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, 181, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -78 }, { 67, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, 182, 183, -79, -79, 184, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, -79 }, { 67, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, 185, -80, -80, 186, -80, -80, -80, -80, -80, -80, -80, -80, -80, 187, -80, -80, 188, -80, -80, 189, 190, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80 }, { 67, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, 191, -81, -81, -81, 192, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, 193, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, -81 }, { 67, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, 194, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, -82 }, { 67, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, 195, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -83 }, { 67, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84 }, { 67, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, 196, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, 197, 198, 198, 198, 198, 198, 198, 198, 198, 198, -85, -85, -85, -85, -85, -85, -85, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, -85 }, { 67, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, 199, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, -86, -86, -86, -86, -86, -86, -86, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, -86 }, { 67, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87 }, { 67, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, 201, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, -88, -88, -88, -88, -88, -88, -88, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88 }, { 67, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89 }, { 67, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, 203, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, -90, -90, -90, -90, -90, -90, -90, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90 }, { 67, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91 }, { 67, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, 206, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, -92, -92, -92, -92, -92, -92, -92, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -92 }, { 67, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, -93 }, { 67, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, 208, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, -94, -94, -94, -94, -94, -94, -94, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, -94 }, { 67, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, -95 }, { 67, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, 211, -96, -96, 212, 213, 213, 213, 213, 213, 213, 213, 213, 213, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, 214, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, -96 }, { 67, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, 211, -97, -97, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, 216, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97 }, { 67, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, 217, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, -98, -98, -98, -98, -98, -98, -98, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98 }, { 67, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, -99 }, { 67, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 220, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 }, { 67, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101 }, { 67, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, 222, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102 }, { 67, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, -103 }, { 67, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, 223, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, -104, -104, -104, -104, -104, -104, -104, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, -104 }, { 67, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105 }, { 67, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, 225, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, -106, -106, -106, -106, -106, -106, -106, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106 }, { 67, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, -107 }, { 67, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, 228, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, -108, -108, -108, -108, -108, -108, -108, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, -108 }, { 67, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, -109 }, { 67, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, 231, -110, -110, 232, 233, 233, 233, 233, 233, 233, 233, 233, 233, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, 234, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110 }, { 67, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, 231, -111, -111, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, 236, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111 }, { 67, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, -112 }, { 67, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, 238, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, -113 }, { 67, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, -114 }, { 67, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, 240, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, -115 }, { 67, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116 }, { 67, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, 242, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, -117 }, { 67, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, -118 }, { 67, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, 244, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, -119 }, { 67, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, -120 }, { 67, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, 245, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, -121 }, { 67, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, -122 }, { 67, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123 }, { 67, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124 }, { 67, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, -125 }, { 67, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, 247, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, -126, -126, -126, -126, -126, -126, -126, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, -126 }, { 67, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127 }, { 67, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, 249, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, -128, -128, -128, -128, -128, -128, -128, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128 }, { 67, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, -129 }, { 67, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, 251, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, -130 }, { 67, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131 }, { 67, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, 253, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, -132 }, { 67, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133 }, { 67, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, 255, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134 }, { 67, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, -135 }, { 67, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, -136 }, { 67, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, -137 }, { 67, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, -138 }, { 67, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, 257, -139, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, -139 }, { 67, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140 }, { 67, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, 260, -141, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, 262, 262, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, 262, 262, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, -141 }, { 67, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, -142 }, { 67, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 264, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263 }, { 67, 265, 265, 265, 265, 265, 265, 265, 265, 265, 266, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 267, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 268, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265 }, { 67, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, -145 }, { 67, 269, 269, 269, 269, 269, 269, 269, 269, 269, 270, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 271, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 272, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269 }, { 67, 273, 273, 273, 273, 273, 273, 273, 273, 273, 274, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 275, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 276, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273 }, { 67, 277, 277, 277, 277, 277, 277, 277, 277, 277, 278, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277 }, { 67, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, -149 }, { 67, 279, 279, 279, 279, 279, 279, 279, 279, 279, 280, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279 }, { 67, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, -151 }, { 67, 281, 281, 281, 281, 281, 281, 281, 281, 281, 282, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281 }, { 67, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, -153 }, { 67, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, 283, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, 284, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, -154 }, { 67, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, 285, -155, -155, -155, -155, -155, -155, -155, -155, -155, 286, -155, -155, -155, 287, 288, 289, 290, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, -155 }, { 67, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, 291, -156, -156, 292, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156 }, { 67, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, -157 }, { 67, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, -158 }, { 67, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, 293, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, -159 }, { 67, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, 294, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, -160 }, { 67, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, 295, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, 296, 297, -161, -161, -161, -161, -161, 298, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, -161 }, { 67, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, 299, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, -162 }, { 67, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, 300, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163 }, { 67, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, 301, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, -164 }, { 67, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, 302, -165, 303, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, -165 }, { 67, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, 304, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, -166 }, { 67, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, 305, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, -167 }, { 67, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, 306, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168, -168 }, { 67, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, 307, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169, -169 }, { 67, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, 308, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170, -170 }, { 67, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, 309, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171 }, { 67, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, 310, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172 }, { 67, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, 311, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173, -173 }, { 67, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174, -174 }, { 67, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, 312, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175, -175 }, { 67, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, -176 }, { 67, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177, -177 }, { 67, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, 313, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, -178 }, { 67, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, 314, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179, -179 }, { 67, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, 315, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180, -180 }, { 67, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, 316, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181, -181 }, { 67, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, 317, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182, -182 }, { 67, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, 318, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, -183 }, { 67, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, 319, -184, -184, -184, -184, -184, -184, 320, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184, -184 }, { 67, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, 321, -185, -185, -185, -185, -185, -185, -185, -185, -185, 322, -185, -185, -185, 323, 324, 325, 326, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185, -185 }, { 67, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, 327, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186, -186 }, { 67, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, 328, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, 329, -187, -187, 330, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187, -187 }, { 67, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, -188 }, { 67, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189, -189 }, { 67, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, 331, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190, -190 }, { 67, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, 332, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191, -191 }, { 67, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, 333, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192, -192 }, { 67, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, 334, -193, -193, -193, -193, -193, -193, -193, -193, -193, 335, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193 }, { 67, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, 336, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, 337, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194, -194 }, { 67, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, 338, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195, -195 }, { 67, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, 339, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, -196 }, { 67, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, 340, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, 341, 342, 342, 342, 342, 342, 342, 342, 342, 342, -197, -197, -197, -197, -197, -197, -197, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -197 }, { 67, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, 343, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, -198, -198, -198, -198, -198, -198, -198, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198, -198 }, { 67, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, 344, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199, -199 }, { 67, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, 345, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, -200, -200, -200, -200, -200, -200, -200, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200, -200 }, { 67, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, 346, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201, -201 }, { 67, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, 347, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, -202, -202, -202, -202, -202, -202, -202, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202, -202 }, { 67, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, 349, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203, -203 }, { 67, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, 350, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, -204, -204, -204, -204, -204, -204, -204, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204 }, { 67, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, 353, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205 }, { 67, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, 354, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, -206 }, { 67, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, 355, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, -207, -207, -207, -207, -207, -207, -207, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207, -207 }, { 67, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, 357, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208, -208 }, { 67, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, 358, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, -209, -209, -209, -209, -209, -209, -209, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, -209 }, { 67, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, 361, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210, -210 }, { 67, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211, -211 }, { 67, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, 363, -212, -212, 364, 365, 365, 365, 365, 365, 365, 365, 365, 365, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, 366, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212, -212 }, { 67, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, 363, -213, -213, 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, 368, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213, -213 }, { 67, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214, -214 }, { 67, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 363, -215, -215, 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 371, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, -215 }, { 67, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, 372, 373, 373, 373, 373, 373, 373, 373, 373, 373, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216 }, { 67, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, 374, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217, -217 }, { 67, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, 375, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, -218, -218, -218, -218, -218, -218, -218, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218, -218 }, { 67, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, 378, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219, -219 }, { 67, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, 379, 379, 379, 379, 379, 379, 379, 379, 379, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220, -220 }, { 67, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, 381, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221, -221 }, { 67, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, 382, 382, 382, 382, 382, 382, 382, 382, 382, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222, -222 }, { 67, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, 383, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, -223 }, { 67, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, 384, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, -224, -224, -224, -224, -224, -224, -224, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224, -224 }, { 67, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, 386, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225, -225 }, { 67, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, 387, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, 388, 388, 388, 388, 388, 388, 388, 388, 388, 388, -226, -226, -226, -226, -226, -226, -226, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226, -226 }, { 67, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, 390, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227, -227 }, { 67, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, 391, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, -228 }, { 67, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, 392, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, -229, -229, -229, -229, -229, -229, -229, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229 }, { 67, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, 395, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, -230 }, { 67, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, -231 }, { 67, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, 397, -232, -232, 398, 399, 399, 399, 399, 399, 399, 399, 399, 399, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, 400, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232, -232 }, { 67, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, 397, -233, -233, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, 402, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233, -233 }, { 67, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234, -234 }, { 67, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, 397, -235, -235, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, 405, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235, -235 }, { 67, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, 406, 407, 407, 407, 407, 407, 407, 407, 407, 407, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236, -236 }, { 67, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, 409, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237, -237 }, { 67, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, 410, 411, 411, 411, 411, 411, 411, 411, 411, 411, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238 }, { 67, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, 412, 412, 412, 412, 412, 412, 412, 412, 412, 412, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, 413, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239, -239 }, { 67, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, 414, 415, 415, 415, 415, 415, 415, 415, 415, 415, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240, -240 }, { 67, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, 417, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, -241 }, { 67, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, 418, 419, 419, 419, 419, 419, 419, 419, 419, 419, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242, -242 }, { 67, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, 421, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243, -243 }, { 67, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, 422, 423, 423, 423, 423, 423, 423, 423, 423, 423, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244, -244 }, { 67, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, 424, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245, -245 }, { 67, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, 425, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246 }, { 67, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, 427, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, -247 }, { 67, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, 428, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, -248, -248, -248, -248, -248, -248, -248, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248, -248 }, { 67, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, 430, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249 }, { 67, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, 431, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, -250, -250, -250, -250, -250, -250, -250, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250, -250 }, { 67, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, 433, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251, -251 }, { 67, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, 434, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252, -252 }, { 67, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, 436, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253, -253 }, { 67, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, 437, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254, -254 }, { 67, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, 255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255, -255 }, { 67, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256, -256 }, { 67, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257, -257 }, { 67, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, 260, -258, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, 262, 262, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, 262, 262, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258, -258 }, { 67, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, 262, 262, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, 262, 262, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, -259 }, { 67, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, 262, 262, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, 262, 262, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260 }, { 67, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, 260, -261, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, 262, 262, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, 262, 262, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, -261 }, { 67, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, 440, -262, 440, -262, -262, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, -262 }, { 67, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 264, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263 }, { 67, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, 263, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264, -264 }, { 67, 265, 265, 265, 265, 265, 265, 265, 265, 265, 266, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 267, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 268, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265 }, { 67, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266, -266 }, { 67, 442, 442, 442, 442, 442, 442, 442, 442, 442, 266, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 267, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 268, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442 }, { 67, 443, 443, 443, 443, 443, 443, 443, 443, 443, 444, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 445, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 446, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443 }, { 67, 447, 447, 447, 447, 447, 447, 447, 447, 447, 448, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 449, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 450, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447 }, { 67, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270, -270 }, { 67, 451, 451, 451, 451, 451, 451, 451, 451, 451, 452, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 453, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 454, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451 }, { 67, 273, 273, 273, 273, 273, 273, 273, 273, 273, 274, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 275, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 276, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273 }, { 67, 273, 273, 273, 273, 273, 273, 273, 273, 273, 274, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 275, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 276, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273 }, { 67, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274, -274 }, { 67, 273, 273, 273, 273, 273, 273, 273, 273, 273, 274, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 275, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 276, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273 }, { 67, 273, 273, 273, 273, 273, 273, 273, 273, 273, 274, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 275, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 276, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273 }, { 67, 277, 277, 277, 277, 277, 277, 277, 277, 277, 278, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277 }, { 67, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278 }, { 67, 279, 279, 279, 279, 279, 279, 279, 279, 279, 280, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279 }, { 67, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, -280 }, { 67, 281, 281, 281, 281, 281, 281, 281, 281, 281, 282, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281 }, { 67, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282 }, { 67, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, 455, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283 }, { 67, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, 456, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284, -284 }, { 67, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, 457, -285, -285, -285, -285, -285, -285, 458, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, -285 }, { 67, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, 459, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286, -286 }, { 67, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, 460, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, 461, 462, -287, -287, -287, -287, -287, 463, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287 }, { 67, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, 464, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288, -288 }, { 67, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, 465, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289, -289 }, { 67, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, 466, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290, -290 }, { 67, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291 }, { 67, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292 }, { 67, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, 467, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, -293 }, { 67, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, 468, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294, -294 }, { 67, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, 469, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, -295 }, { 67, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, 470, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, -296 }, { 67, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, 471, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, -297 }, { 67, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, 472, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298 }, { 67, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, 473, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299, -299 }, { 67, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, 474, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, -300 }, { 67, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, 475, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, -301 }, { 67, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, 476, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302, -302 }, { 67, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, 477, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303, -303 }, { 67, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, 478, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304, -304 }, { 67, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, 479, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305, -305 }, { 67, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, 480, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306, -306 }, { 67, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, 481, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307, -307 }, { 67, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, 482, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308, -308 }, { 67, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, 483, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309, -309 }, { 67, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, 484, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, 485, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, 486, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, -310 }, { 67, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, 487, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, -311 }, { 67, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, 488, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312, -312 }, { 67, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, 489, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313, -313 }, { 67, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, 490, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314, -314 }, { 67, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, 491, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315, -315 }, { 67, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, 492, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, -316 }, { 67, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, 493, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317, -317 }, { 67, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, 494, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318, -318 }, { 67, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, 495, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319, -319 }, { 67, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, 496, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320, -320 }, { 67, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, 497, -321, -321, -321, -321, -321, -321, 498, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, -321 }, { 67, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, 499, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322, -322 }, { 67, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, 500, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, 501, 502, -323, -323, -323, -323, -323, 503, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, -323 }, { 67, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, 504, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, -324 }, { 67, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, 505, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325 }, { 67, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, 506, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326, -326 }, { 67, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, 507, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, -327 }, { 67, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328, -328 }, { 67, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329, -329 }, { 67, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330, -330 }, { 67, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, 508, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, -331 }, { 67, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, 509, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332 }, { 67, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, 510, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, 511, -333, -333, 512, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333 }, { 67, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, 513, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334 }, { 67, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, 514, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335 }, { 67, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, 515, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336, -336 }, { 67, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, 516, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, 517, -337, -337, -337, -337, -337, 518, -337, -337, -337, 519, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337 }, { 67, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, 520, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338 }, { 67, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339, -339 }, { 67, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340, -340 }, { 67, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341 }, { 67, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342, -342 }, { 67, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343, -343 }, { 67, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344 }, { 67, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345, -345 }, { 67, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, 521, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346, -346 }, { 67, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, 522, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347 }, { 67, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, 523, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, -348 }, { 67, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349, -349 }, { 67, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350, -350 }, { 67, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351, -351 }, { 67, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352, -352 }, { 67, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353, -353 }, { 67, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, 524, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354, -354 }, { 67, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, 525, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, -355 }, { 67, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, 526, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356, -356 }, { 67, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357, -357 }, { 67, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, -358 }, { 67, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, -359 }, { 67, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360, -360 }, { 67, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361 }, { 67, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, 527, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, -362, -362, -362, -362, -362, -362, -362, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, -362 }, { 67, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363 }, { 67, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, 530, -364, -364, 531, 532, 532, 532, 532, 532, 532, 532, 532, 532, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, 533, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, -364 }, { 67, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, 530, -365, -365, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, 535, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, -365 }, { 67, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366, -366 }, { 67, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, 530, -367, -367, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, 537, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, -367 }, { 67, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, 538, 539, 539, 539, 539, 539, 539, 539, 539, 539, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368 }, { 67, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, 540, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, -369, -369, -369, -369, -369, -369, -369, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, -369 }, { 67, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, 530, -370, -370, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, 533, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370, -370 }, { 67, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, 542, 543, 543, 543, 543, 543, 543, 543, 543, 543, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371, -371 }, { 67, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, 540, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, 544, 545, 545, 545, 545, 545, 545, 545, 545, 545, -372, -372, -372, -372, -372, -372, -372, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, -372 }, { 67, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, 546, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, -373, -373, -373, -373, -373, -373, -373, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373, -373 }, { 67, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, 548, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374, -374 }, { 67, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, 549, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375, -375 }, { 67, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, 550, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, -376 }, { 67, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, 552, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377, -377 }, { 67, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, 553, 553, 553, 553, 553, 553, 553, 553, 553, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378, -378 }, { 67, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, 554, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, -379, -379, -379, -379, -379, -379, -379, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, -379 }, { 67, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, 556, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380, -380 }, { 67, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, 557, 557, 557, 557, 557, 557, 557, 557, 557, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381, -381 }, { 67, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, 558, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, -382, -382, -382, -382, -382, -382, -382, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382, -382 }, { 67, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383, -383 }, { 67, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, -384 }, { 67, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385, -385 }, { 67, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, -386 }, { 67, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, -387 }, { 67, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388, -388 }, { 67, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389, -389 }, { 67, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390, -390 }, { 67, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391, -391 }, { 67, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, -392 }, { 67, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393, -393 }, { 67, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394 }, { 67, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395, -395 }, { 67, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, 560, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, -396, -396, -396, -396, -396, -396, -396, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, -396 }, { 67, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397 }, { 67, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, 563, -398, -398, 564, 565, 565, 565, 565, 565, 565, 565, 565, 565, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, 566, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, -398 }, { 67, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, 563, -399, -399, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, 568, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, -399 }, { 67, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, -400 }, { 67, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, 563, -401, -401, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, 570, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, -401 }, { 67, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, 571, 572, 572, 572, 572, 572, 572, 572, 572, 572, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402, -402 }, { 67, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, 573, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, -403, -403, -403, -403, -403, -403, -403, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, -403 }, { 67, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, 563, -404, -404, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, 566, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, -404 }, { 67, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, 575, 576, 576, 576, 576, 576, 576, 576, 576, 576, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, -405 }, { 67, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, 577, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, 578, 579, 579, 579, 579, 579, 579, 579, 579, 579, -406, -406, -406, -406, -406, -406, -406, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406, -406 }, { 67, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, 577, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, -407, -407, -407, -407, -407, -407, -407, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407, -407 }, { 67, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, 582, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408, -408 }, { 67, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, 583, 584, 584, 584, 584, 584, 584, 584, 584, 584, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, -409 }, { 67, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, 585, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, -410 }, { 67, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, 585, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, -411, -411, -411, -411, -411, -411, -411, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411 }, { 67, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, 587, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412, -412 }, { 67, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 588, 589, 589, 589, 589, 589, 589, 589, 589, 589, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413 }, { 67, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, 590, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414, -414 }, { 67, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, 590, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, -415, -415, -415, -415, -415, -415, -415, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, -415 }, { 67, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, 593, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416, -416 }, { 67, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, 594, 595, 595, 595, 595, 595, 595, 595, 595, 595, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, -417 }, { 67, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, 596, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, -418 }, { 67, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, 596, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, -419, -419, -419, -419, -419, -419, -419, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419, -419 }, { 67, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, 598, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420, -420 }, { 67, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, 599, 600, 600, 600, 600, 600, 600, 600, 600, 600, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421, -421 }, { 67, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, 601, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, -422 }, { 67, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, 601, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, -423, -423, -423, -423, -423, -423, -423, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, -423 }, { 67, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424, -424 }, { 67, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, -425 }, { 67, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426, -426 }, { 67, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, 603, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427, -427 }, { 67, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, 604, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428 }, { 67, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, 605, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, -429 }, { 67, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430, -430 }, { 67, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431, -431 }, { 67, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, -432 }, { 67, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, 606, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433, -433 }, { 67, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, 607, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434, -434 }, { 67, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, 608, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, -435 }, { 67, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, -436 }, { 67, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, -437 }, { 67, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, -438 }, { 67, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, 262, 262, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, 262, 262, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, -439 }, { 67, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440, -440 }, { 67, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441, -441 }, { 67, 442, 442, 442, 442, 442, 442, 442, 442, 442, 610, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 611, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 612, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442 }, { 67, 443, 443, 443, 443, 443, 443, 443, 443, 443, 444, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 445, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 446, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443 }, { 67, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, -444 }, { 67, 443, 443, 443, 443, 443, 443, 443, 443, 443, 444, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 445, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 446, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443 }, { 67, 443, 443, 443, 443, 443, 443, 443, 443, 443, 444, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 445, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 446, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443 }, { 67, 447, 447, 447, 447, 447, 447, 447, 447, 447, 448, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 449, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 450, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447 }, { 67, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448, -448 }, { 67, 447, 447, 447, 447, 447, 447, 447, 447, 447, 448, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 449, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 450, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447 }, { 67, 613, 613, 613, 613, 613, 613, 613, 613, 613, 614, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 615, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 616, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613 }, { 67, 447, 447, 447, 447, 447, 447, 447, 447, 447, 448, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 449, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 450, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447 }, { 67, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452, -452 }, { 67, 451, 451, 451, 451, 451, 451, 451, 451, 451, 452, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 453, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 454, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451 }, { 67, 617, 617, 617, 617, 617, 617, 617, 617, 617, 618, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 619, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 620, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617 }, { 67, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455, -455 }, { 67, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456, -456 }, { 67, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457, -457 }, { 67, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, 621, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, -458 }, { 67, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, 622, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459, -459 }, { 67, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, 623, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460, -460 }, { 67, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, 624, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, -461 }, { 67, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, 625, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, -462 }, { 67, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, 626, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463, -463 }, { 67, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, 627, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464 }, { 67, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, 628, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465, -465 }, { 67, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, 629, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, -466 }, { 67, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, 630, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467, -467 }, { 67, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, 631, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468, -468 }, { 67, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, 632, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469, -469 }, { 67, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, 633, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, -470 }, { 67, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, 634, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471, -471 }, { 67, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, 635, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472, -472 }, { 67, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, 636, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473 }, { 67, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, 637, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474 }, { 67, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, 638, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475, -475 }, { 67, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, 639, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476 }, { 67, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477 }, { 67, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, 640, 640, 640, 640, 640, 640, 640, 640, 640, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478 }, { 67, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, 641, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479 }, { 67, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, 642, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480 }, { 67, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, 643, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481, -481 }, { 67, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, 644, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482, -482 }, { 67, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, 645, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483, -483 }, { 67, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, 646, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, 647, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484, -484 }, { 67, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485, -485 }, { 67, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, 648, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, -486 }, { 67, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, 649, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, 650, 651, 652, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487, -487 }, { 67, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, 653, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, -488 }, { 67, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, 654, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, 655, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489, -489 }, { 67, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, 656, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, 657, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490, -490 }, { 67, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491, -491 }, { 67, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492, -492 }, { 67, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, -493 }, { 67, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, 658, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494, -494 }, { 67, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495, -495 }, { 67, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, 659, -496, -496, -496, 660, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496, -496 }, { 67, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497 }, { 67, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, 661, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498, -498 }, { 67, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, 662, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499, -499 }, { 67, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, 663, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500, -500 }, { 67, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, 664, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501, -501 }, { 67, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, 665, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502, -502 }, { 67, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, 666, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, -503 }, { 67, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, 667, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, -504 }, { 67, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, 668, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505, -505 }, { 67, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, 669, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506, -506 }, { 67, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, 670, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, -507 }, { 67, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508, -508 }, { 67, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509, -509 }, { 67, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, 671, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510 }, { 67, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, 672, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511, -511 }, { 67, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, 673, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, -512 }, { 67, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, 674, 674, 674, 674, 674, 674, 674, 674, 674, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, 675, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513, -513 }, { 67, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514, -514 }, { 67, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, 676, 676, 676, 676, 676, 676, 676, 676, 676, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515, -515 }, { 67, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, 677, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516, -516 }, { 67, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, 678, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517, -517 }, { 67, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, 679, 679, 679, 679, 679, 679, 679, 679, 679, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518, -518 }, { 67, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, 680, 680, 680, 680, 680, 680, 680, 680, 680, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519, -519 }, { 67, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, 681, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, -520 }, { 67, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521, -521 }, { 67, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522, -522 }, { 67, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523, -523 }, { 67, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524, -524 }, { 67, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, -525 }, { 67, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, -526 }, { 67, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, 682, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, -527 }, { 67, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, 683, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, -528, -528, -528, -528, -528, -528, -528, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528, -528 }, { 67, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, 685, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, -529, -529, -529, -529, -529, -529, -529, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529, -529 }, { 67, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, 687, 687, 687, 687, 687, 687, 687, 687, 687, 687, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530, -530 }, { 67, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, 688, -531, -531, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, 690, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531, -531 }, { 67, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, 688, -532, -532, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, 691, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532, -532 }, { 67, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, 692, 692, 692, 692, 692, 692, 692, 692, 692, 692, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533, -533 }, { 67, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, 688, -534, -534, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, 693, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534, -534 }, { 67, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, 694, 695, 695, 695, 695, 695, 695, 695, 695, 695, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, -535 }, { 67, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, 696, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, -536, -536, -536, -536, -536, -536, -536, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, -536 }, { 67, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, 698, 699, 699, 699, 699, 699, 699, 699, 699, 699, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537, -537 }, { 67, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, 696, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, 700, 701, 701, 701, 701, 701, 701, 701, 701, 701, -538, -538, -538, -538, -538, -538, -538, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538 }, { 67, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, 702, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, 703, 703, 703, 703, 703, 703, 703, 703, 703, 703, -539, -539, -539, -539, -539, -539, -539, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539, -539 }, { 67, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, 704, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540, -540 }, { 67, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, 705, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, -541, -541, -541, -541, -541, -541, -541, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, -541 }, { 67, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, 696, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, 707, 708, 708, 708, 708, 708, 708, 708, 708, 708, -542, -542, -542, -542, -542, -542, -542, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542 }, { 67, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, 709, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, 710, 710, 710, 710, 710, 710, 710, 710, 710, 710, -543, -543, -543, -543, -543, -543, -543, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, 709, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543, -543 }, { 67, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, 705, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, 711, 712, 712, 712, 712, 712, 712, 712, 712, 712, -544, -544, -544, -544, -544, -544, -544, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544, -544 }, { 67, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, 713, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, -545, -545, -545, -545, -545, -545, -545, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, -545 }, { 67, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, 715, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546, -546 }, { 67, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, 716, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, -547, -547, -547, -547, -547, -547, -547, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547 }, { 67, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548, -548 }, { 67, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, -549 }, { 67, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550, -550 }, { 67, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, 717, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, -551 }, { 67, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, 718, 718, 718, 718, 718, 718, 718, 718, 718, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552, -552 }, { 67, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, 719, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, -553, -553, -553, -553, -553, -553, -553, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553 }, { 67, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, 721, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554, -554 }, { 67, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, 722, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, -555, -555, -555, -555, -555, -555, -555, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555 }, { 67, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, 724, 724, 724, 724, 724, 724, 724, 724, 724, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556, -556 }, { 67, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, 725, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, 726, 726, 726, 726, 726, 726, 726, 726, 726, 726, -557, -557, -557, -557, -557, -557, -557, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557, -557 }, { 67, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, 727, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558, -558 }, { 67, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, 728, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, -559, -559, -559, -559, -559, -559, -559, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559, -559 }, { 67, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, 730, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, -560 }, { 67, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, 731, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, -561, -561, -561, -561, -561, -561, -561, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561, -561 }, { 67, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, 733, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, -562, -562, -562, -562, -562, -562, -562, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562, -562 }, { 67, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563, -563 }, { 67, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, 736, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, 737, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564, -564 }, { 67, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, 736, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, 738, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565, -565 }, { 67, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566, -566 }, { 67, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, 736, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, 740, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567, -567 }, { 67, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, 741, 742, 742, 742, 742, 742, 742, 742, 742, 742, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568, -568 }, { 67, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, 743, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, 744, 744, 744, 744, 744, 744, 744, 744, 744, 744, -569, -569, -569, -569, -569, -569, -569, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569, -569 }, { 67, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, 745, 746, 746, 746, 746, 746, 746, 746, 746, 746, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570, -570 }, { 67, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, 747, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, 748, 749, 749, 749, 749, 749, 749, 749, 749, 749, -571, -571, -571, -571, -571, -571, -571, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571, -571 }, { 67, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, 747, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, -572, -572, -572, -572, -572, -572, -572, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572, -572 }, { 67, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, 751, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573, -573 }, { 67, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, 752, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, -574, -574, -574, -574, -574, -574, -574, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574, -574 }, { 67, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, 754, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, 755, 756, 756, 756, 756, 756, 756, 756, 756, 756, -575, -575, -575, -575, -575, -575, -575, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, -575 }, { 67, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, 754, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, -576, -576, -576, -576, -576, -576, -576, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576, -576 }, { 67, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, 758, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577, -577 }, { 67, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, 759, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, 760, 761, 761, 761, 761, 761, 761, 761, 761, 761, -578, -578, -578, -578, -578, -578, -578, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578 }, { 67, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, 759, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, -579, -579, -579, -579, -579, -579, -579, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579 }, { 67, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, 763, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, -580, -580, -580, -580, -580, -580, -580, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580 }, { 67, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, 764, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581, -581 }, { 67, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, 765, 766, 766, 766, 766, 766, 766, 766, 766, 766, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582, -582 }, { 67, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, 767, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583, -583 }, { 67, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, 767, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, -584, -584, -584, -584, -584, -584, -584, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, -584 }, { 67, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, 769, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585, -585 }, { 67, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, 770, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, 771, 771, 771, 771, 771, 771, 771, 771, 771, 771, -586, -586, -586, -586, -586, -586, -586, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586, -586 }, { 67, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587, -587 }, { 67, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, 773, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588, -588 }, { 67, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, 773, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, -589, -589, -589, -589, -589, -589, -589, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589, -589 }, { 67, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, 775, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590, -590 }, { 67, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, 776, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, -591, -591, -591, -591, -591, -591, -591, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591, -591 }, { 67, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, 778, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592, -592 }, { 67, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, 779, 780, 780, 780, 780, 780, 780, 780, 780, 780, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593, -593 }, { 67, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, 781, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594, -594 }, { 67, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, 781, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, 782, 782, 782, 782, 782, 782, 782, 782, 782, 782, -595, -595, -595, -595, -595, -595, -595, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, -595 }, { 67, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, 783, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596, -596 }, { 67, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, 784, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, 785, 785, 785, 785, 785, 785, 785, 785, 785, 785, -597, -597, -597, -597, -597, -597, -597, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597 }, { 67, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, 786, 786, 786, 786, 786, 786, 786, 786, 786, 786, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598, -598 }, { 67, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, 787, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599, -599 }, { 67, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, 787, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, -600, -600, -600, -600, -600, -600, -600, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600, -600 }, { 67, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, 789, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, -601 }, { 67, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, 790, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, 791, 791, 791, 791, 791, 791, 791, 791, 791, 791, -602, -602, -602, -602, -602, -602, -602, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, -602 }, { 67, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, -603 }, { 67, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604, -604 }, { 67, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605, -605 }, { 67, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606, -606 }, { 67, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607, -607 }, { 67, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608, -608 }, { 67, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, -609 }, { 67, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610, -610 }, { 67, 442, 442, 442, 442, 442, 442, 442, 442, 442, 610, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 611, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 612, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442 }, { 67, 792, 792, 792, 792, 792, 792, 792, 792, 792, 793, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 794, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 795, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792 }, { 67, 613, 613, 613, 613, 613, 613, 613, 613, 613, 614, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 615, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 616, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613 }, { 67, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614, -614 }, { 67, 613, 613, 613, 613, 613, 613, 613, 613, 613, 614, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 615, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 616, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613 }, { 67, 613, 613, 613, 613, 613, 613, 613, 613, 613, 614, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 615, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 616, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613 }, { 67, 617, 617, 617, 617, 617, 617, 617, 617, 617, 618, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 619, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 620, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617 }, { 67, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618, -618 }, { 67, 617, 617, 617, 617, 617, 617, 617, 617, 617, 618, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 619, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 620, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617 }, { 67, 617, 617, 617, 617, 617, 617, 617, 617, 617, 618, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 619, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 620, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617 }, { 67, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621, -621 }, { 67, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622, -622 }, { 67, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623, -623 }, { 67, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, -624 }, { 67, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625, -625 }, { 67, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626, -626 }, { 67, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627 }, { 67, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628, -628 }, { 67, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629, -629 }, { 67, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630, -630 }, { 67, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631, -631 }, { 67, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632, -632 }, { 67, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633, -633 }, { 67, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, -634 }, { 67, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635, -635 }, { 67, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636, -636 }, { 67, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637, -637 }, { 67, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638, -638 }, { 67, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, 796, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, 797, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639, -639 }, { 67, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, 798, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, 799, 799, 799, 799, 799, 799, 799, 799, 799, 799, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640, -640 }, { 67, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, 800, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641, -641 }, { 67, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, 801, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642, -642 }, { 67, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, 802, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643, -643 }, { 67, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, 803, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644, -644 }, { 67, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, 804, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645, -645 }, { 67, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, 805, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646, -646 }, { 67, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, 806, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647, -647 }, { 67, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648, -648 }, { 67, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, 807, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649, -649 }, { 67, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650, -650 }, { 67, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651, -651 }, { 67, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652, -652 }, { 67, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653, -653 }, { 67, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, 808, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654, -654 }, { 67, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, 809, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655, -655 }, { 67, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, 810, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656, -656 }, { 67, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, 811, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657, -657 }, { 67, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, 812, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658, -658 }, { 67, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, 813, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659, -659 }, { 67, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, 814, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660, -660 }, { 67, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661, -661 }, { 67, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662, -662 }, { 67, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663, -663 }, { 67, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664, -664 }, { 67, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665, -665 }, { 67, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666 }, { 67, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667, -667 }, { 67, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668, -668 }, { 67, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669, -669 }, { 67, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, 815, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670, -670 }, { 67, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, 816, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671, -671 }, { 67, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, 817, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672, -672 }, { 67, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, 818, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673, -673 }, { 67, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, 819, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, -674, -674, -674, -674, -674, -674, -674, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, 819, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674, -674 }, { 67, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, 821, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675, -675 }, { 67, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, 822, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, 823, 823, 823, 823, 823, 823, 823, 823, 823, 823, -676, -676, -676, -676, -676, -676, -676, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676, -676 }, { 67, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, 824, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677, -677 }, { 67, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, 825, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678, -678 }, { 67, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, 826, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, 827, 827, 827, 827, 827, 827, 827, 827, 827, 827, -679, -679, -679, -679, -679, -679, -679, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679, -679 }, { 67, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, 828, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, 829, 829, 829, 829, 829, 829, 829, 829, 829, 829, -680, -680, -680, -680, -680, -680, -680, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680, -680 }, { 67, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, 830, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681, -681 }, { 67, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, 831, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682, -682 }, { 67, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, 832, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683, -683 }, { 67, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, 833, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, -684, -684, -684, -684, -684, -684, -684, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684, -684 }, { 67, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, 835, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685, -685 }, { 67, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, 836, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, -686, -686, -686, -686, -686, -686, -686, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686, -686 }, { 67, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, 838, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, 839, 839, 839, 839, 839, 839, 839, 839, 839, 839, -687, -687, -687, -687, -687, -687, -687, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687, -687 }, { 67, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688, -688 }, { 67, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689, -689 }, { 67, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690, -690 }, { 67, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, 842, 843, 843, 843, 843, 843, 843, 843, 843, 843, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691, -691 }, { 67, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, 844, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, -692, -692, -692, -692, -692, -692, -692, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692, -692 }, { 67, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, 842, 846, 846, 846, 846, 846, 846, 846, 846, 846, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693, -693 }, { 67, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, 844, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, 845, 847, 847, 847, 847, 847, 847, 847, 847, 847, -694, -694, -694, -694, -694, -694, -694, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694, -694 }, { 67, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, 848, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, -695, -695, -695, -695, -695, -695, -695, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695, -695 }, { 67, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, 850, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696, -696 }, { 67, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, 851, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, -697, -697, -697, -697, -697, -697, -697, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697, -697 }, { 67, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, 844, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, 845, 853, 853, 853, 853, 853, 853, 853, 853, 853, -698, -698, -698, -698, -698, -698, -698, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698, -698 }, { 67, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, 854, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, 855, 855, 855, 855, 855, 855, 855, 855, 855, 855, -699, -699, -699, -699, -699, -699, -699, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699, -699 }, { 67, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, 851, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, 852, 856, 856, 856, 856, 856, 856, 856, 856, 856, -700, -700, -700, -700, -700, -700, -700, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700, -700 }, { 67, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, 857, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, -701, -701, -701, -701, -701, -701, -701, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701, -701 }, { 67, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, 859, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702, -702 }, { 67, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, 860, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, -703, -703, -703, -703, -703, -703, -703, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703, -703 }, { 67, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, 861, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704, -704 }, { 67, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, 862, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705, -705 }, { 67, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, 863, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, -706, -706, -706, -706, -706, -706, -706, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706, -706 }, { 67, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, 851, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, 852, 865, 865, 865, 865, 865, 865, 865, 865, 865, -707, -707, -707, -707, -707, -707, -707, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707, -707 }, { 67, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, 866, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, -708, -708, -708, -708, -708, -708, -708, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708, -708 }, { 67, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, 868, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709, -709 }, { 67, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, 869, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, -710, -710, -710, -710, -710, -710, -710, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710, -710 }, { 67, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, 863, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, 864, 870, 870, 870, 870, 870, 870, 870, 870, 870, -711, -711, -711, -711, -711, -711, -711, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711, -711 }, { 67, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, 871, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, -712, -712, -712, -712, -712, -712, -712, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712, -712 }, { 67, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, 873, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713, -713 }, { 67, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, 874, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, -714, -714, -714, -714, -714, -714, -714, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, 874, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, -714 }, { 67, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, 875, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715, -715 }, { 67, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, 876, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716, -716 }, { 67, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, 877, 877, 877, 877, 877, 877, 877, 877, 877, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717, -717 }, { 67, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, 878, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, 879, 879, 879, 879, 879, 879, 879, 879, 879, 879, -718, -718, -718, -718, -718, -718, -718, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, 878, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718, -718 }, { 67, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, 880, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719, -719 }, { 67, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, 881, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, 882, 882, 882, 882, 882, 882, 882, 882, 882, 882, -720, -720, -720, -720, -720, -720, -720, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720, -720 }, { 67, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, 883, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721, -721 }, { 67, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, 884, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722, -722 }, { 67, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, 885, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, 886, 886, 886, 886, 886, 886, 886, 886, 886, 886, -723, -723, -723, -723, -723, -723, -723, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723, -723 }, { 67, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724, -724 }, { 67, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725, -725 }, { 67, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726, -726 }, { 67, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727, -727 }, { 67, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728, -728 }, { 67, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729, -729 }, { 67, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, 887, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730, -730 }, { 67, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, 888, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731, -731 }, { 67, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, 889, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, 890, 890, 890, 890, 890, 890, 890, 890, 890, 890, -732, -732, -732, -732, -732, -732, -732, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732, -732 }, { 67, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, 891, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733, -733 }, { 67, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, 892, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, 893, 893, 893, 893, 893, 893, 893, 893, 893, 893, -734, -734, -734, -734, -734, -734, -734, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734, -734 }, { 67, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, 894, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, -735, -735, -735, -735, -735, -735, -735, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735, -735 }, { 67, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, 896, 896, 896, 896, 896, 896, 896, 896, 896, 896, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736, -736 }, { 67, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, 897, 897, 897, 897, 897, 897, 897, 897, 897, 897, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737, -737 }, { 67, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, 898, 898, 898, 898, 898, 898, 898, 898, 898, 898, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738, -738 }, { 67, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, 899, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, -739, -739, -739, -739, -739, -739, -739, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, 899, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739, -739 }, { 67, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, 901, 901, 901, 901, 901, 901, 901, 901, 901, 901, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740, -740 }, { 67, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, 902, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, 903, 903, 903, 903, 903, 903, 903, 903, 903, 903, -741, -741, -741, -741, -741, -741, -741, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741, -741 }, { 67, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, 902, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, -742, -742, -742, -742, -742, -742, -742, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742, -742 }, { 67, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, 905, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743, -743 }, { 67, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, 906, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, 907, 907, 907, 907, 907, 907, 907, 907, 907, 907, -744, -744, -744, -744, -744, -744, -744, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, 906, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744, -744 }, { 67, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, 908, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, 909, 909, 909, 909, 909, 909, 909, 909, 909, 909, -745, -745, -745, -745, -745, -745, -745, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745, -745 }, { 67, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, 908, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, 910, 910, 910, 910, 910, 910, 910, 910, 910, 910, -746, -746, -746, -746, -746, -746, -746, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, 908, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746, -746 }, { 67, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 911, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, -747 }, { 67, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, 912, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, -748, -748, -748, -748, -748, -748, -748, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748, -748 }, { 67, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, 912, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, -749, -749, -749, -749, -749, -749, -749, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749, -749 }, { 67, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, 915, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, 907, 907, 907, 907, 907, 907, 907, 907, 907, 907, -750, -750, -750, -750, -750, -750, -750, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750, -750 }, { 67, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, 916, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751, -751 }, { 67, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, 917, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752, -752 }, { 67, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, 918, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, 919, 919, 919, 919, 919, 919, 919, 919, 919, 919, -753, -753, -753, -753, -753, -753, -753, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753, -753 }, { 67, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, 920, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754, -754 }, { 67, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, 921, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, 922, 922, 922, 922, 922, 922, 922, 922, 922, 922, -755, -755, -755, -755, -755, -755, -755, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755, -755 }, { 67, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, 921, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, 923, 923, 923, 923, 923, 923, 923, 923, 923, 923, -756, -756, -756, -756, -756, -756, -756, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756, -756 }, { 67, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, 924, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, 907, 907, 907, 907, 907, 907, 907, 907, 907, 907, -757, -757, -757, -757, -757, -757, -757, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, 924, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757, -757 }, { 67, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, 925, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758, -758 }, { 67, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, 926, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759, -759 }, { 67, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, 927, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, 928, 928, 928, 928, 928, 928, 928, 928, 928, 928, -760, -760, -760, -760, -760, -760, -760, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760, -760 }, { 67, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, 927, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, -761, -761, -761, -761, -761, -761, -761, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761, -761 }, { 67, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, 930, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, 919, 919, 919, 919, 919, 919, 919, 919, 919, 919, -762, -762, -762, -762, -762, -762, -762, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, 930, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762, -762 }, { 67, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, 931, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763, -763 }, { 67, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764, -764 }, { 67, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, 933, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765, -765 }, { 67, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, 933, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, -766, -766, -766, -766, -766, -766, -766, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, 933, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766, -766 }, { 67, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, 935, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767, -767 }, { 67, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, 936, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, 937, 937, 937, 937, 937, 937, 937, 937, 937, 937, -768, -768, -768, -768, -768, -768, -768, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768, -768 }, { 67, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, 938, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769, -769 }, { 67, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, 939, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770, -770 }, { 67, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, 940, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, 941, 941, 941, 941, 941, 941, 941, 941, 941, 941, -771, -771, -771, -771, -771, -771, -771, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, 940, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771, -771 }, { 67, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772, -772 }, { 67, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773, -773 }, { 67, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774, -774 }, { 67, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775, -775 }, { 67, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776, -776 }, { 67, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777, -777 }, { 67, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, 942, 942, 942, 942, 942, 942, 942, 942, 942, 942, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778 }, { 67, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, 943, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779, -779 }, { 67, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, 943, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, 944, 944, 944, 944, 944, 944, 944, 944, 944, 944, -780, -780, -780, -780, -780, -780, -780, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780, -780 }, { 67, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, 945, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781, -781 }, { 67, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, 946, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, 947, 947, 947, 947, 947, 947, 947, 947, 947, 947, -782, -782, -782, -782, -782, -782, -782, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782, -782 }, { 67, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, 948, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783, -783 }, { 67, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, 949, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784, -784 }, { 67, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, 950, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, 951, 951, 951, 951, 951, 951, 951, 951, 951, 951, -785, -785, -785, -785, -785, -785, -785, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785, -785 }, { 67, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786, -786 }, { 67, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787, -787 }, { 67, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788, -788 }, { 67, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789, -789 }, { 67, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790, -790 }, { 67, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791, -791 }, { 67, 792, 792, 792, 792, 792, 792, 792, 792, 792, 793, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 794, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 795, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792 }, { 67, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793, -793 }, { 67, 792, 792, 792, 792, 792, 792, 792, 792, 792, 793, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 794, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 795, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792 }, { 67, 792, 792, 792, 792, 792, 792, 792, 792, 792, 793, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 794, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 795, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792 }, { 67, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, 952, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796, -796 }, { 67, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, 953, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797, -797 }, { 67, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, 954, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798, -798 }, { 67, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, 955, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, 956, 956, 956, 956, 956, 956, 956, 956, 956, 956, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799, -799 }, { 67, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, 957, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800, -800 }, { 67, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, 958, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801, -801 }, { 67, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, 959, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802, -802 }, { 67, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, 960, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803, -803 }, { 67, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, 961, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, -804 }, { 67, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, 962, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805, -805 }, { 67, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, 963, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806, -806 }, { 67, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, 964, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807, -807 }, { 67, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, 965, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808, -808 }, { 67, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, 966, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809, -809 }, { 67, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 967, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 968, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, -810 }, { 67, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, 969, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811, -811 }, { 67, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, 970, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812, -812 }, { 67, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, 971, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, -813 }, { 67, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, 972, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814, -814 }, { 67, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, 973, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815, -815 }, { 67, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, 974, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816, -816 }, { 67, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, 975, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817, -817 }, { 67, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, 976, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818, -818 }, { 67, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, 977, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819, -819 }, { 67, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, 978, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, 979, 979, 979, 979, 979, 979, 979, 979, 979, 979, -820, -820, -820, -820, -820, -820, -820, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820, -820 }, { 67, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, 980, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821, -821 }, { 67, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, 981, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822, -822 }, { 67, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, 982, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, 983, 983, 983, 983, 983, 983, 983, 983, 983, 983, -823, -823, -823, -823, -823, -823, -823, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823, -823 }, { 67, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, 984, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824, -824 }, { 67, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, 985, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825, -825 }, { 67, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, 986, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826, -826 }, { 67, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, 987, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, 988, 988, 988, 988, 988, 988, 988, 988, 988, 988, -827, -827, -827, -827, -827, -827, -827, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827, -827 }, { 67, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, 989, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828, -828 }, { 67, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, 990, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, 991, 991, 991, 991, 991, 991, 991, 991, 991, 991, -829, -829, -829, -829, -829, -829, -829, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, 990, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829, -829 }, { 67, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, 992, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830, -830 }, { 67, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831, -831 }, { 67, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832, -832 }, { 67, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833, -833 }, { 67, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834, -834 }, { 67, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835, -835 }, { 67, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836, -836 }, { 67, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837, -837 }, { 67, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, -838 }, { 67, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839, -839 }, { 67, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840, -840 }, { 67, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841, -841 }, { 67, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842, -842 }, { 67, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843, -843 }, { 67, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844, -844 }, { 67, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845, -845 }, { 67, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846, -846 }, { 67, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847, -847 }, { 67, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848, -848 }, { 67, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849, -849 }, { 67, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850, -850 }, { 67, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851, -851 }, { 67, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852, -852 }, { 67, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853, -853 }, { 67, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854, -854 }, { 67, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855, -855 }, { 67, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856, -856 }, { 67, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857, -857 }, { 67, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858, -858 }, { 67, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859, -859 }, { 67, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860, -860 }, { 67, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861, -861 }, { 67, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862, -862 }, { 67, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, -863 }, { 67, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864, -864 }, { 67, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, -865 }, { 67, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866, -866 }, { 67, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867, -867 }, { 67, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868, -868 }, { 67, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869, -869 }, { 67, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870, -870 }, { 67, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871, -871 }, { 67, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, -872 }, { 67, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873, -873 }, { 67, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874, -874 }, { 67, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875, -875 }, { 67, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876, -876 }, { 67, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877, -877 }, { 67, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878, -878 }, { 67, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879, -879 }, { 67, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880, -880 }, { 67, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881, -881 }, { 67, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882, -882 }, { 67, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883, -883 }, { 67, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884, -884 }, { 67, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885, -885 }, { 67, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886, -886 }, { 67, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887, -887 }, { 67, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888, -888 }, { 67, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889, -889 }, { 67, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890, -890 }, { 67, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891, -891 }, { 67, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892, -892 }, { 67, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893, -893 }, { 67, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894 }, { 67, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895, -895 }, { 67, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896, -896 }, { 67, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897, -897 }, { 67, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898, -898 }, { 67, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, -899 }, { 67, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900, -900 }, { 67, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901, -901 }, { 67, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902, -902 }, { 67, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903, -903 }, { 67, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904, -904 }, { 67, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905, -905 }, { 67, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906, -906 }, { 67, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907, -907 }, { 67, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908, -908 }, { 67, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909, -909 }, { 67, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910, -910 }, { 67, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911, -911 }, { 67, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912, -912 }, { 67, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, -913 }, { 67, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914, -914 }, { 67, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915, -915 }, { 67, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916, -916 }, { 67, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917, -917 }, { 67, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, -918 }, { 67, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919, -919 }, { 67, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920, -920 }, { 67, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921, -921 }, { 67, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922, -922 }, { 67, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923, -923 }, { 67, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924, -924 }, { 67, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925, -925 }, { 67, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926, -926 }, { 67, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927, -927 }, { 67, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928, -928 }, { 67, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929, -929 }, { 67, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930, -930 }, { 67, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931, -931 }, { 67, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932, -932 }, { 67, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933, -933 }, { 67, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934, -934 }, { 67, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935, -935 }, { 67, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936, -936 }, { 67, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937, -937 }, { 67, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938, -938 }, { 67, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939, -939 }, { 67, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940, -940 }, { 67, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941, -941 }, { 67, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942, -942 }, { 67, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943, -943 }, { 67, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944, -944 }, { 67, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945, -945 }, { 67, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946, -946 }, { 67, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947, -947 }, { 67, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948, -948 }, { 67, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949, -949 }, { 67, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950, -950 }, { 67, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951, -951 }, { 67, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, 993, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952, -952 }, { 67, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, 994, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953, -953 }, { 67, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, 995, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954, -954 }, { 67, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, 996, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955, -955 }, { 67, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, 997, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956, -956 }, { 67, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, 998, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957, -957 }, { 67, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, 999, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958, -958 }, { 67, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959, -959 }, { 67, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960, -960 }, { 67, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961, -961 }, { 67, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, 1000, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962, -962 }, { 67, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, 1001, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963, -963 }, { 67, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, 1002, 1003, 1004, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964, -964 }, { 67, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, 1005, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965, -965 }, { 67, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966, -966 }, { 67, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, 1006, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967, -967 }, { 67, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968, -968 }, { 67, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969, -969 }, { 67, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970, -970 }, { 67, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971, -971 }, { 67, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, -972 }, { 67, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, 1007, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973, -973 }, { 67, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974, -974 }, { 67, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975, -975 }, { 67, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, 1008, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976, -976 }, { 67, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, 1009, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977, -977 }, { 67, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, 1010, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978, -978 }, { 67, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, 1011, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979, -979 }, { 67, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, 1012, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980, -980 }, { 67, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, 1013, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981, -981 }, { 67, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, 1014, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982, -982 }, { 67, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, 1015, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983, -983 }, { 67, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, 1016, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984, -984 }, { 67, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985, -985 }, { 67, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, 1017, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986, -986 }, { 67, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, 1018, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987, -987 }, { 67, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, 1019, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988, -988 }, { 67, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, 1020, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989, -989 }, { 67, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, 1021, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990, -990 }, { 67, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, 1022, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991, -991 }, { 67, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992 }, { 67, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993, -993 }, { 67, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994, -994 }, { 67, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995, -995 }, { 67, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996, -996 }, { 67, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997, -997 }, { 67, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, 1023, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998, -998 }, { 67, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999 }, { 67,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000 }, { 67,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001, -1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001, -1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001, -1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001, -1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001, -1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001, -1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001, -1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001, -1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001, -1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001, -1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001, -1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001, -1001,-1001,-1001,-1001,-1001,-1001,-1001,-1001 }, { 67,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002, -1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002, -1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002, -1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002, -1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002, -1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002, -1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002, -1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002, -1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002, -1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002, -1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002, -1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002, -1002,-1002,-1002,-1002,-1002,-1002,-1002,-1002 }, { 67,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003, -1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003, -1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003, -1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003, -1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003, -1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003, -1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003, -1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003, -1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003, -1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003, -1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003, -1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003, -1003,-1003,-1003,-1003,-1003,-1003,-1003,-1003 }, { 67,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004, -1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004, -1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004, -1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004, -1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004, -1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004, -1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004, -1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004, -1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004, -1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004, -1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004, -1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004, -1004,-1004,-1004,-1004,-1004,-1004,-1004,-1004 }, { 67,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005, -1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005, -1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005, -1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005, -1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005, -1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005, -1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005, -1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005, -1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005, -1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005, -1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005, -1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005, -1005,-1005,-1005,-1005,-1005,-1005,-1005,-1005 }, { 67,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006, -1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006, -1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006, -1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006, -1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006, -1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006, -1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006, -1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006, -1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006, -1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006, -1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006, -1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006, -1006,-1006,-1006,-1006,-1006,-1006,-1006,-1006 }, { 67,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007, -1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007, -1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007, -1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007, -1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007, -1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007, -1007, 1024,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007, -1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007, -1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007, -1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007, -1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007, -1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007, -1007,-1007,-1007,-1007,-1007,-1007,-1007,-1007 }, { 67,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008, -1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008, -1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008, -1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008, -1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008, -1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008, -1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008, -1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008, -1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008, -1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008, -1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008, -1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008, -1008,-1008,-1008,-1008,-1008,-1008,-1008,-1008 }, { 67,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009, -1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009, -1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009, -1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009, -1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009, -1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009, -1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009, -1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009, -1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009, -1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009, -1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009, -1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009, -1009,-1009,-1009,-1009,-1009,-1009,-1009,-1009 }, { 67,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010, -1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010, -1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010, -1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010, -1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010, -1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010, -1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010, -1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010, -1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010, -1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010, -1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010, -1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010, -1010,-1010,-1010,-1010,-1010,-1010,-1010,-1010 }, { 67,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011, -1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011, -1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011, -1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011, -1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011, -1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011, -1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011, -1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011, -1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011, -1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011, -1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011, -1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011, -1011,-1011,-1011,-1011,-1011,-1011,-1011,-1011 }, { 67,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012, -1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012, -1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012, -1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012, -1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012, -1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012, -1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012, -1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012, -1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012, -1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012, -1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012, -1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012, -1012,-1012,-1012,-1012,-1012,-1012,-1012,-1012 }, { 67,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013, -1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013, -1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013, -1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013, -1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013, -1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013, -1013, 1025,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013, -1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013, -1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013, -1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013, -1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013, -1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013, -1013,-1013,-1013,-1013,-1013,-1013,-1013,-1013 }, { 67,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014, -1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014, -1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014, -1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014, -1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014, -1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014, -1014, 1026,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014, -1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014, -1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014, -1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014, -1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014, -1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014, -1014,-1014,-1014,-1014,-1014,-1014,-1014,-1014 }, { 67,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015, -1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015, -1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015, -1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015, -1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015, -1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015, -1015, 1027,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015, -1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015, -1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015, -1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015, -1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015, -1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015, -1015,-1015,-1015,-1015,-1015,-1015,-1015,-1015 }, { 67,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016, -1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016, -1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016, -1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016, -1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016, -1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016, -1016, 1028,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016, -1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016, -1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016, -1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016, -1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016, -1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016, -1016,-1016,-1016,-1016,-1016,-1016,-1016,-1016 }, { 67,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017, -1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017, -1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017, -1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017, -1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017, -1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017, -1017, 1029,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017, -1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017, -1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017, -1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017, -1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017, -1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017, -1017,-1017,-1017,-1017,-1017,-1017,-1017,-1017 }, { 67,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018, -1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018, -1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018, -1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018, -1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018, -1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018, -1018, 1030,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018, -1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018, -1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018, -1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018, -1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018, -1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018, -1018,-1018,-1018,-1018,-1018,-1018,-1018,-1018 }, { 67,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019, -1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019, -1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019, -1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019, -1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019, -1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019, -1019, 1031,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019, -1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019, -1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019, -1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019, -1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019, -1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019, -1019,-1019,-1019,-1019,-1019,-1019,-1019,-1019 }, { 67,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020, -1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020, -1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020, -1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020, -1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020, -1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020, -1020, 1032,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020, -1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020, -1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020, -1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020, -1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020, -1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020, -1020,-1020,-1020,-1020,-1020,-1020,-1020,-1020 }, { 67,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021, -1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021, -1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021, -1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021, -1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021, -1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021, -1021, 1033,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021, -1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021, -1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021, -1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021, -1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021, -1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021, -1021,-1021,-1021,-1021,-1021,-1021,-1021,-1021 }, { 67,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022, -1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022, -1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022, -1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022, -1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022, -1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022, -1022, 1034,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022, -1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022, -1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022, -1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022, -1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022, -1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022, -1022,-1022,-1022,-1022,-1022,-1022,-1022,-1022 }, { 67,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023, -1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023, -1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023, -1023,-1023, 1035,-1023,-1023,-1023,-1023,-1023,-1023,-1023, -1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023, -1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023, -1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023, -1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023, -1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023, -1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023, -1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023, -1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023, -1023,-1023,-1023,-1023,-1023,-1023,-1023,-1023 }, { 67,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024, -1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024, -1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024, -1024,-1024, 1036,-1024,-1024,-1024,-1024,-1024,-1024,-1024, -1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024, -1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024, -1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024, -1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024, -1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024, -1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024, -1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024, -1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024, -1024,-1024,-1024,-1024,-1024,-1024,-1024,-1024 }, { 67,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025, -1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025, -1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025, -1025,-1025, 1037,-1025,-1025,-1025,-1025,-1025,-1025,-1025, -1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025, -1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025, -1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025, -1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025, -1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025, -1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025, -1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025, -1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025, -1025,-1025,-1025,-1025,-1025,-1025,-1025,-1025 }, { 67,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026, -1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026, -1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026, -1026,-1026, 1038,-1026,-1026,-1026,-1026,-1026,-1026,-1026, -1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026, -1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026, -1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026, -1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026, -1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026, -1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026, -1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026, -1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026, -1026,-1026,-1026,-1026,-1026,-1026,-1026,-1026 }, { 67,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027, -1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027, -1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027, -1027,-1027, 1039,-1027,-1027,-1027,-1027,-1027,-1027,-1027, -1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027, -1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027, -1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027, -1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027, -1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027, -1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027, -1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027, -1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027, -1027,-1027,-1027,-1027,-1027,-1027,-1027,-1027 }, { 67,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028, -1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028, -1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028, -1028,-1028, 1040,-1028,-1028,-1028,-1028,-1028,-1028,-1028, -1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028, -1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028, -1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028, -1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028, -1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028, -1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028, -1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028, -1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028, -1028,-1028,-1028,-1028,-1028,-1028,-1028,-1028 }, { 67,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029, -1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029, -1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029, -1029,-1029, 1041,-1029,-1029,-1029,-1029,-1029,-1029,-1029, -1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029, -1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029, -1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029, -1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029, -1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029, -1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029, -1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029, -1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029, -1029,-1029,-1029,-1029,-1029,-1029,-1029,-1029 }, { 67,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030, -1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030, -1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030, -1030,-1030, 1042,-1030,-1030,-1030,-1030,-1030,-1030,-1030, -1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030, -1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030, -1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030, -1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030, -1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030, -1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030, -1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030, -1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030, -1030,-1030,-1030,-1030,-1030,-1030,-1030,-1030 }, { 67,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031, -1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031, -1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031, -1031,-1031, 1043,-1031,-1031,-1031,-1031,-1031,-1031,-1031, -1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031, -1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031, -1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031, -1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031, -1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031, -1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031, -1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031, -1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031, -1031,-1031,-1031,-1031,-1031,-1031,-1031,-1031 }, { 67,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032, -1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032, -1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032, -1032,-1032, 1044,-1032,-1032,-1032,-1032,-1032,-1032,-1032, -1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032, -1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032, -1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032, -1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032, -1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032, -1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032, -1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032, -1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032, -1032,-1032,-1032,-1032,-1032,-1032,-1032,-1032 }, { 67,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033, -1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033, -1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033, -1033,-1033, 1045,-1033,-1033,-1033,-1033,-1033,-1033,-1033, -1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033, -1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033, -1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033, -1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033, -1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033, -1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033, -1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033, -1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033, -1033,-1033,-1033,-1033,-1033,-1033,-1033,-1033 }, { 67,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034, -1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034, -1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034, -1034,-1034, 1046,-1034,-1034,-1034,-1034,-1034,-1034,-1034, -1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034, -1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034, -1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034, -1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034, -1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034, -1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034, -1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034, -1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034, -1034,-1034,-1034,-1034,-1034,-1034,-1034,-1034 }, { 67,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035, -1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035, -1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035, -1035,-1035, 1047,-1035,-1035,-1035,-1035,-1035,-1035,-1035, -1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035, -1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035, -1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035, -1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035, -1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035, -1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035, -1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035, -1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035, -1035,-1035,-1035,-1035,-1035,-1035,-1035,-1035 }, { 67,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036, -1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036, -1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036, -1036,-1036, 1048,-1036,-1036,-1036,-1036,-1036,-1036,-1036, -1036,-1036,-1036, 1049,-1036, 1049,-1036,-1036, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,-1036,-1036, -1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036, -1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036, -1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036, -1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036, -1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036, -1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036, -1036,-1036,-1036,-1036,-1036,-1036,-1036,-1036 }, { 67,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037, -1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037, -1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037, -1037,-1037, 1051,-1037,-1037,-1037,-1037,-1037,-1037,-1037, -1037,-1037,-1037, 1052,-1037, 1052,-1037,-1037, 1053, 1053, 1053, 1053, 1053, 1053, 1053, 1053, 1053, 1053,-1037,-1037, -1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037, -1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037, -1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037, -1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037, -1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037, -1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037, -1037,-1037,-1037,-1037,-1037,-1037,-1037,-1037 }, { 67,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038, -1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038, -1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038, -1038,-1038, 1054,-1038,-1038,-1038,-1038,-1038,-1038,-1038, -1038,-1038,-1038, 1055,-1038, 1055,-1038,-1038, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,-1038,-1038, -1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038, -1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038, -1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038, -1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038, -1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038, -1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038, -1038,-1038,-1038,-1038,-1038,-1038,-1038,-1038 }, { 67,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039, -1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039, -1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039, -1039,-1039, 1057,-1039,-1039,-1039,-1039,-1039,-1039,-1039, -1039,-1039,-1039, 1058,-1039, 1058,-1039,-1039, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059,-1039,-1039, -1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039, -1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039, -1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039, -1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039, -1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039, -1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039, -1039,-1039,-1039,-1039,-1039,-1039,-1039,-1039 }, { 67,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040, -1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040, -1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040, -1040,-1040, 1060,-1040,-1040,-1040,-1040,-1040,-1040,-1040, -1040,-1040,-1040, 1061,-1040, 1061,-1040,-1040, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062,-1040,-1040, -1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040, -1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040, -1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040, -1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040, -1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040, -1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040, -1040,-1040,-1040,-1040,-1040,-1040,-1040,-1040 }, { 67,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041, -1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041, -1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041, -1041,-1041, 1063,-1041,-1041,-1041,-1041,-1041,-1041, 1064, -1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041, -1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041, -1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041, -1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041, -1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041, -1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041, -1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041, -1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041, -1041,-1041,-1041,-1041,-1041,-1041,-1041,-1041 }, { 67,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042, -1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042, -1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042, -1042,-1042, 1065,-1042,-1042,-1042,-1042,-1042,-1042, 1066, -1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042, -1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042, -1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042, -1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042, -1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042, -1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042, -1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042, -1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042, -1042,-1042,-1042,-1042,-1042,-1042,-1042,-1042 }, { 67,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043, -1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043, -1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043, -1043,-1043, 1067,-1043,-1043,-1043,-1043,-1043,-1043, 1068, -1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043, -1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043, -1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043, -1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043, -1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043, -1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043, -1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043, -1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043, -1043,-1043,-1043,-1043,-1043,-1043,-1043,-1043 }, { 67,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044, -1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044, -1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044, -1044,-1044, 1069,-1044,-1044,-1044,-1044,-1044,-1044, 1070, -1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044, -1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044, -1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044, -1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044, -1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044, -1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044, -1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044, -1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044, -1044,-1044,-1044,-1044,-1044,-1044,-1044,-1044 }, { 67,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045, -1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045, -1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045, -1045,-1045, 1071,-1045,-1045,-1045,-1045,-1045,-1045, 1072, -1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045, -1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045, -1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045, -1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045, -1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045, -1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045, -1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045, -1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045, -1045,-1045,-1045,-1045,-1045,-1045,-1045,-1045 }, { 67,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046, -1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046, -1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046, -1046,-1046, 1073,-1046,-1046,-1046,-1046,-1046,-1046, 1074, -1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046, -1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046, -1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046, -1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046, -1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046, -1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046, -1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046, -1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046, -1046,-1046,-1046,-1046,-1046,-1046,-1046,-1046 }, { 67,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047, -1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047, -1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047, -1047,-1047, 1075,-1047,-1047,-1047,-1047,-1047,-1047,-1047, -1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047, -1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047, -1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047, -1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047, -1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047, -1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047, -1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047, -1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047, -1047,-1047,-1047,-1047,-1047,-1047,-1047,-1047 }, { 67,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048, -1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048, -1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048, -1048,-1048, 1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048, -1048,-1048,-1048, 1049,-1048, 1049,-1048,-1048, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,-1048,-1048, -1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048, -1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048, -1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048, -1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048, -1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048, -1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048, -1048,-1048,-1048,-1048,-1048,-1048,-1048,-1048 }, { 67,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049, -1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049, -1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049, -1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049, -1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,-1049,-1049, -1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049, -1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049, -1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049, -1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049, -1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049, -1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049, -1049,-1049,-1049,-1049,-1049,-1049,-1049,-1049 }, { 67,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050, -1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050, -1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050, -1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050, -1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050,-1050,-1050, -1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050, -1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050, -1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050, -1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050, -1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050, -1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050, -1050,-1050,-1050,-1050,-1050,-1050,-1050,-1050 }, { 67,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051, -1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051, -1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051, -1051,-1051, 1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051, -1051,-1051,-1051, 1052,-1051, 1052,-1051,-1051, 1053, 1053, 1053, 1053, 1053, 1053, 1053, 1053, 1053, 1053,-1051,-1051, -1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051, -1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051, -1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051, -1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051, -1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051, -1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051, -1051,-1051,-1051,-1051,-1051,-1051,-1051,-1051 }, { 67,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052, -1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052, -1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052, -1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052, -1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052, 1053, 1053, 1053, 1053, 1053, 1053, 1053, 1053, 1053, 1053,-1052,-1052, -1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052, -1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052, -1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052, -1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052, -1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052, -1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052, -1052,-1052,-1052,-1052,-1052,-1052,-1052,-1052 }, { 67,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053, -1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053, -1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053, -1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053, -1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053, 1053, 1053, 1053, 1053, 1053, 1053, 1053, 1053, 1053, 1053,-1053,-1053, -1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053, -1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053, -1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053, -1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053, -1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053, -1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053, -1053,-1053,-1053,-1053,-1053,-1053,-1053,-1053 }, { 67,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054, -1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054, -1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054, -1054,-1054, 1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054, -1054,-1054,-1054, 1055,-1054, 1055,-1054,-1054, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,-1054,-1054, -1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054, -1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054, -1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054, -1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054, -1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054, -1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054, -1054,-1054,-1054,-1054,-1054,-1054,-1054,-1054 }, { 67,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055, -1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055, -1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055, -1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055, -1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,-1055,-1055, -1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055, -1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055, -1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055, -1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055, -1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055, -1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055, -1055,-1055,-1055,-1055,-1055,-1055,-1055,-1055 }, { 67,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056, -1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056, -1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056, -1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056, -1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,-1056,-1056, -1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056, -1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056, -1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056, -1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056, -1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056, -1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056, -1056,-1056,-1056,-1056,-1056,-1056,-1056,-1056 }, { 67,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057, -1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057, -1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057, -1057,-1057, 1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057, -1057,-1057,-1057, 1058,-1057, 1058,-1057,-1057, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059,-1057,-1057, -1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057, -1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057, -1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057, -1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057, -1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057, -1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057, -1057,-1057,-1057,-1057,-1057,-1057,-1057,-1057 }, { 67,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058, -1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058, -1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058, -1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058, -1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059,-1058,-1058, -1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058, -1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058, -1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058, -1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058, -1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058, -1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058, -1058,-1058,-1058,-1058,-1058,-1058,-1058,-1058 }, { 67,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059, -1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059, -1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059, -1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059, -1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059,-1059,-1059, -1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059, -1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059, -1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059, -1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059, -1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059, -1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059, -1059,-1059,-1059,-1059,-1059,-1059,-1059,-1059 }, { 67,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060, -1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060, -1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060, -1060,-1060, 1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060, -1060,-1060,-1060, 1061,-1060, 1061,-1060,-1060, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062,-1060,-1060, -1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060, -1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060, -1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060, -1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060, -1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060, -1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060, -1060,-1060,-1060,-1060,-1060,-1060,-1060,-1060 }, { 67,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061, -1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061, -1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061, -1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061, -1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062,-1061,-1061, -1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061, -1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061, -1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061, -1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061, -1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061, -1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061, -1061,-1061,-1061,-1061,-1061,-1061,-1061,-1061 }, { 67,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062, -1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062, -1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062, -1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062, -1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062,-1062,-1062, -1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062, -1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062, -1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062, -1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062, -1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062, -1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062, -1062,-1062,-1062,-1062,-1062,-1062,-1062,-1062 }, { 67,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063, -1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063, -1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063, -1063,-1063, 1063,-1063,-1063,-1063,-1063,-1063,-1063, 1064, -1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063, -1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063, -1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063, -1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063, -1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063, -1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063, -1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063, -1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063, -1063,-1063,-1063,-1063,-1063,-1063,-1063,-1063 }, { 67, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1077, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076 }, { 67,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065, -1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065, -1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065, -1065,-1065, 1065,-1065,-1065,-1065,-1065,-1065,-1065, 1066, -1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065, -1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065, -1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065, -1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065, -1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065, -1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065, -1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065, -1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065, -1065,-1065,-1065,-1065,-1065,-1065,-1065,-1065 }, { 67, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1079, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078 }, { 67,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067, -1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067, -1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067, -1067,-1067, 1067,-1067,-1067,-1067,-1067,-1067,-1067, 1068, -1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067, -1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067, -1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067, -1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067, -1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067, -1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067, -1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067, -1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067, -1067,-1067,-1067,-1067,-1067,-1067,-1067,-1067 }, { 67, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1081, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080 }, { 67,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069, -1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069, -1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069, -1069,-1069, 1069,-1069,-1069,-1069,-1069,-1069,-1069, 1070, -1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069, -1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069, -1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069, -1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069, -1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069, -1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069, -1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069, -1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069, -1069,-1069,-1069,-1069,-1069,-1069,-1069,-1069 }, { 67, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1083, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082 }, { 67,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071, -1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071, -1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071, -1071,-1071, 1071,-1071,-1071,-1071,-1071,-1071,-1071, 1072, -1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071, -1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071, -1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071, -1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071, -1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071, -1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071, -1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071, -1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071, -1071,-1071,-1071,-1071,-1071,-1071,-1071,-1071 }, { 67, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1085, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084 }, { 67,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073, -1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073, -1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073, -1073,-1073, 1073,-1073,-1073,-1073,-1073,-1073,-1073, 1074, -1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073, -1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073, -1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073, -1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073, -1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073, -1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073, -1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073, -1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073, -1073,-1073,-1073,-1073,-1073,-1073,-1073,-1073 }, { 67, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1087, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086 }, { 67,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075, -1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075, -1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075, -1075,-1075, 1088,-1075,-1075,-1075,-1075,-1075,-1075,-1075, -1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075, -1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075, -1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075, -1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075, -1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075, -1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075, -1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075, -1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075, -1075,-1075,-1075,-1075,-1075,-1075,-1075,-1075 }, { 67, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1077, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076 }, { 67,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077, -1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077, -1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077, -1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077, 1076, -1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077, -1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077, -1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077, -1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077, -1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077, -1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077, -1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077, -1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077, -1077,-1077,-1077,-1077,-1077,-1077,-1077,-1077 }, { 67, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1079, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078 }, { 67,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079, -1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079, -1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079, -1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079, 1078, -1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079, -1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079, -1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079, -1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079, -1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079, -1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079, -1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079, -1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079, -1079,-1079,-1079,-1079,-1079,-1079,-1079,-1079 }, { 67, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1081, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080 }, { 67,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081, -1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081, -1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081, -1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081, 1080, -1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081, -1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081, -1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081, -1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081, -1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081, -1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081, -1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081, -1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081, -1081,-1081,-1081,-1081,-1081,-1081,-1081,-1081 }, { 67, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1083, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082 }, { 67,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083, -1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083, -1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083, -1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083, 1082, -1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083, -1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083, -1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083, -1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083, -1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083, -1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083, -1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083, -1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083, -1083,-1083,-1083,-1083,-1083,-1083,-1083,-1083 }, { 67, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1085, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084 }, { 67,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085, -1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085, -1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085, -1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085, 1084, -1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085, -1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085, -1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085, -1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085, -1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085, -1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085, -1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085, -1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085, -1085,-1085,-1085,-1085,-1085,-1085,-1085,-1085 }, { 67, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1087, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086 }, { 67,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087, -1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087, -1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087, -1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087, 1086, -1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087, -1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087, -1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087, -1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087, -1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087, -1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087, -1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087, -1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087, -1087,-1087,-1087,-1087,-1087,-1087,-1087,-1087 }, { 67,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088, -1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088, -1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088, -1088,-1088, 1089,-1088,-1088,-1088,-1088,-1088,-1088,-1088, -1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088, -1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088, -1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088, -1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088, -1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088, -1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088, -1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088, -1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088, -1088,-1088,-1088,-1088,-1088,-1088,-1088,-1088 }, { 67,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089, -1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089, -1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089, -1089,-1089, 1090,-1089,-1089,-1089,-1089,-1089,-1089,-1089, -1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089, -1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089, -1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089, -1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089, -1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089, -1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089, -1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089, -1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089, -1089,-1089,-1089,-1089,-1089,-1089,-1089,-1089 }, { 67,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090, -1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090, -1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090, -1090,-1090, 1091,-1090,-1090,-1090,-1090,-1090,-1090,-1090, -1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090, -1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090, -1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090, -1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090, -1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090, -1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090, -1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090, -1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090, -1090,-1090,-1090,-1090,-1090,-1090,-1090,-1090 }, { 67,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091, -1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091, -1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091, -1091,-1091, 1092,-1091,-1091,-1091,-1091,-1091,-1091,-1091, -1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091, -1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091, -1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091, -1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091, -1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091, -1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091, -1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091, -1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091, -1091,-1091,-1091,-1091,-1091,-1091,-1091,-1091 }, { 67,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092, -1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092, -1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092, -1092,-1092, 1093,-1092,-1092,-1092,-1092,-1092,-1092,-1092, -1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092, -1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092, -1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092, -1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092, -1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092, -1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092, -1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092, -1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092, -1092,-1092,-1092,-1092,-1092,-1092,-1092,-1092 }, { 67,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093, -1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093, -1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093, -1093,-1093, 1094,-1093,-1093,-1093,-1093,-1093,-1093,-1093, -1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093, -1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093, -1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093, -1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093, -1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093, -1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093, -1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093, -1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093, -1093,-1093,-1093,-1093,-1093,-1093,-1093,-1093 }, { 67,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094, -1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094, -1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094, -1094,-1094, 1095,-1094,-1094,-1094,-1094,-1094,-1094,-1094, -1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094, -1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094, -1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094, -1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094, -1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094, -1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094, -1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094, -1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094, -1094,-1094,-1094,-1094,-1094,-1094,-1094,-1094 }, { 67,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095, -1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095, -1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095, -1095,-1095, 1096,-1095,-1095,-1095,-1095,-1095,-1095,-1095, -1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095, -1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095, -1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095, -1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095, -1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095, -1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095, -1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095, -1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095, -1095,-1095,-1095,-1095,-1095,-1095,-1095,-1095 }, { 67,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096, -1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096, -1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096, -1096,-1096, 1097,-1096,-1096,-1096,-1096,-1096,-1096,-1096, -1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096, -1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096, -1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096, -1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096, -1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096, -1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096, -1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096, -1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096, -1096,-1096,-1096,-1096,-1096,-1096,-1096,-1096 }, { 67,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097, -1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097, -1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097, -1097,-1097, 1098,-1097,-1097,-1097,-1097,-1097,-1097,-1097, -1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097, -1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097, -1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097, -1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097, -1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097, -1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097, -1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097, -1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097, -1097,-1097,-1097,-1097,-1097,-1097,-1097,-1097 }, { 67,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098, -1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098, -1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098, -1098,-1098, 1099,-1098,-1098,-1098,-1098,-1098,-1098,-1098, -1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098, -1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098, -1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098, -1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098, -1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098, -1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098, -1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098, -1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098, -1098,-1098,-1098,-1098,-1098,-1098,-1098,-1098 }, { 67,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099, -1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099, -1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099, -1099,-1099, 1100,-1099,-1099,-1099,-1099,-1099,-1099,-1099, -1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099, -1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099, -1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099, -1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099, -1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099, -1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099, -1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099, -1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099, -1099,-1099,-1099,-1099,-1099,-1099,-1099,-1099 }, { 67,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100, -1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100, -1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100, -1100,-1100, 1101,-1100,-1100,-1100,-1100,-1100,-1100,-1100, -1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100, -1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100, -1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100, -1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100, -1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100, -1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100, -1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100, -1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100, -1100,-1100,-1100,-1100,-1100,-1100,-1100,-1100 }, { 67,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101, -1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101, -1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101, -1101,-1101, 1102,-1101,-1101,-1101,-1101,-1101,-1101,-1101, -1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101, -1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101, -1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101, -1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101, -1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101, -1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101, -1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101, -1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101, -1101,-1101,-1101,-1101,-1101,-1101,-1101,-1101 }, { 67,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102, -1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102, -1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102, -1102,-1102, 1103,-1102,-1102,-1102,-1102,-1102,-1102,-1102, -1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102, -1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102, -1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102, -1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102, -1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102, -1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102, -1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102, -1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102, -1102,-1102,-1102,-1102,-1102,-1102,-1102,-1102 }, { 67,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103, -1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103, -1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103, -1103,-1103, 1104,-1103,-1103,-1103,-1103,-1103,-1103,-1103, -1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103, -1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103, -1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103, -1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103, -1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103, -1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103, -1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103, -1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103, -1103,-1103,-1103,-1103,-1103,-1103,-1103,-1103 }, { 67,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104, -1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104, -1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104, -1104,-1104, 1105,-1104,-1104,-1104,-1104,-1104,-1104,-1104, -1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104, -1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104, -1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104, -1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104, -1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104, -1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104, -1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104, -1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104, -1104,-1104,-1104,-1104,-1104,-1104,-1104,-1104 }, { 67,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105, -1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105, -1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105, -1105,-1105, 1106,-1105,-1105,-1105,-1105,-1105,-1105,-1105, -1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105, -1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105, -1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105, -1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105, -1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105, -1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105, -1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105, -1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105, -1105,-1105,-1105,-1105,-1105,-1105,-1105,-1105 }, { 67,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106, -1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106, -1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106, -1106,-1106, 1107,-1106,-1106,-1106,-1106,-1106,-1106,-1106, -1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106, -1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106, -1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106, -1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106, -1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106, -1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106, -1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106, -1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106, -1106,-1106,-1106,-1106,-1106,-1106,-1106,-1106 }, { 67,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107, -1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107, -1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107, -1107,-1107, 1108,-1107,-1107,-1107,-1107,-1107,-1107,-1107, -1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107, -1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107, -1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107, -1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107, -1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107, -1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107, -1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107, -1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107, -1107,-1107,-1107,-1107,-1107,-1107,-1107,-1107 }, { 67,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108, -1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108, -1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108, -1108,-1108, 1109,-1108,-1108,-1108,-1108,-1108,-1108,-1108, -1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108, -1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108, -1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108, -1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108, -1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108, -1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108, -1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108, -1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108, -1108,-1108,-1108,-1108,-1108,-1108,-1108,-1108 }, { 67,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109, -1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109, -1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109, -1109,-1109, 1110,-1109,-1109,-1109,-1109,-1109,-1109,-1109, -1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109, -1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109, -1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109, -1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109, -1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109, -1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109, -1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109, -1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109, -1109,-1109,-1109,-1109,-1109,-1109,-1109,-1109 }, { 67,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110, -1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110, -1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110, -1110,-1110, 1111,-1110,-1110,-1110,-1110,-1110,-1110,-1110, -1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110, -1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110, -1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110, -1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110, -1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110, -1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110, -1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110, -1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110, -1110,-1110,-1110,-1110,-1110,-1110,-1110,-1110 }, { 67,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111, -1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111, -1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111, -1111,-1111, 1112,-1111,-1111,-1111,-1111,-1111,-1111,-1111, -1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111, -1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111, -1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111, -1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111, -1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111, -1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111, -1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111, -1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111, -1111,-1111,-1111,-1111,-1111,-1111,-1111,-1111 }, { 67,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112, -1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112, -1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112, -1112,-1112, 1113,-1112,-1112,-1112,-1112,-1112,-1112,-1112, -1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112, -1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112, -1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112, -1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112, -1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112, -1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112, -1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112, -1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112, -1112,-1112,-1112,-1112,-1112,-1112,-1112,-1112 }, { 67,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113, -1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113, -1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113, -1113,-1113, 1114,-1113,-1113,-1113,-1113,-1113,-1113,-1113, -1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113, -1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113, -1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113, -1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113, -1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113, -1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113, -1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113, -1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113, -1113,-1113,-1113,-1113,-1113,-1113,-1113,-1113 }, { 67,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114, -1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114, -1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114, -1114,-1114, 1115,-1114,-1114,-1114,-1114,-1114,-1114,-1114, -1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114, -1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114, -1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114, -1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114, -1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114, -1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114, -1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114, -1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114, -1114,-1114,-1114,-1114,-1114,-1114,-1114,-1114 }, { 67,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115, -1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115, -1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115, -1115,-1115, 1116,-1115,-1115,-1115,-1115,-1115,-1115,-1115, -1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115, -1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115, -1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115, -1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115, -1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115, -1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115, -1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115, -1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115, -1115,-1115,-1115,-1115,-1115,-1115,-1115,-1115 }, { 67,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116, -1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116, -1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116, -1116,-1116, 1117,-1116,-1116,-1116,-1116,-1116,-1116,-1116, -1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116, -1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116, -1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116, -1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116, -1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116, -1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116, -1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116, -1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116, -1116,-1116,-1116,-1116,-1116,-1116,-1116,-1116 }, { 67,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117, -1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117, -1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117, -1117,-1117, 1118,-1117,-1117,-1117,-1117,-1117,-1117,-1117, -1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117, -1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117, -1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117, -1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117, -1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117, -1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117, -1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117, -1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117, -1117,-1117,-1117,-1117,-1117,-1117,-1117,-1117 }, { 67,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118, -1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118, -1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118, -1118,-1118, 1119,-1118,-1118,-1118,-1118,-1118,-1118,-1118, -1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118, -1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118, -1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118, -1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118, -1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118, -1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118, -1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118, -1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118, -1118,-1118,-1118,-1118,-1118,-1118,-1118,-1118 }, { 67,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119, -1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119, -1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119, -1119,-1119, 1120,-1119,-1119,-1119,-1119,-1119,-1119,-1119, -1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119, -1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119, -1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119, -1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119, -1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119, -1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119, -1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119, -1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119, -1119,-1119,-1119,-1119,-1119,-1119,-1119,-1119 }, { 67,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120, -1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120, -1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120, -1120,-1120, 1121,-1120,-1120,-1120,-1120,-1120,-1120,-1120, -1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120, -1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120, -1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120, -1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120, -1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120, -1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120, -1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120, -1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120, -1120,-1120,-1120,-1120,-1120,-1120,-1120,-1120 }, { 67,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121, -1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121, -1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121, -1121,-1121, 1122,-1121,-1121,-1121,-1121,-1121,-1121,-1121, -1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121, -1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121, -1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121, -1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121, -1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121, -1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121, -1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121, -1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121, -1121,-1121,-1121,-1121,-1121,-1121,-1121,-1121 }, { 67,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122, -1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122, -1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122, -1122,-1122, 1123,-1122,-1122,-1122,-1122,-1122,-1122,-1122, -1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122, -1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122, -1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122, -1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122, -1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122, -1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122, -1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122, -1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122, -1122,-1122,-1122,-1122,-1122,-1122,-1122,-1122 }, { 67,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123, -1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123, -1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123, -1123,-1123, 1124,-1123,-1123,-1123,-1123,-1123,-1123,-1123, -1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123, -1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123, -1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123, -1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123, -1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123, -1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123, -1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123, -1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123, -1123,-1123,-1123,-1123,-1123,-1123,-1123,-1123 }, { 67,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124, -1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124, -1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124, -1124,-1124, 1125,-1124,-1124,-1124,-1124,-1124,-1124,-1124, -1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124, -1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124, -1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124, -1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124, -1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124, -1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124, -1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124, -1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124, -1124,-1124,-1124,-1124,-1124,-1124,-1124,-1124 }, { 67,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125, -1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125, -1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125, -1125,-1125, 1126,-1125,-1125,-1125,-1125,-1125,-1125,-1125, -1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125, -1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125, -1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125, -1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125, -1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125, -1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125, -1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125, -1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125, -1125,-1125,-1125,-1125,-1125,-1125,-1125,-1125 }, { 67,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126, -1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126, -1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126, -1126,-1126, 1127,-1126,-1126,-1126,-1126,-1126,-1126,-1126, -1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126, -1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126, -1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126, -1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126, -1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126, -1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126, -1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126, -1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126, -1126,-1126,-1126,-1126,-1126,-1126,-1126,-1126 }, { 67,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127, -1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127, -1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127, -1127,-1127, 1128,-1127,-1127,-1127,-1127,-1127,-1127,-1127, -1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127, -1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127, -1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127, -1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127, -1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127, -1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127, -1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127, -1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127, -1127,-1127,-1127,-1127,-1127,-1127,-1127,-1127 }, { 67,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128, -1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128, -1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128, -1128,-1128, 1129,-1128,-1128,-1128,-1128,-1128,-1128,-1128, -1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128, -1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128, -1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128, -1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128, -1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128, -1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128, -1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128, -1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128, -1128,-1128,-1128,-1128,-1128,-1128,-1128,-1128 }, { 67,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129, -1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129, -1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129, -1129,-1129, 1130,-1129,-1129,-1129,-1129,-1129,-1129,-1129, -1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129, -1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129, -1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129, -1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129, -1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129, -1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129, -1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129, -1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129, -1129,-1129,-1129,-1129,-1129,-1129,-1129,-1129 }, { 67,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130, -1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130, -1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130, -1130,-1130, 1131,-1130,-1130,-1130,-1130,-1130,-1130,-1130, -1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130, -1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130, -1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130, -1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130, -1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130, -1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130, -1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130, -1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130, -1130,-1130,-1130,-1130,-1130,-1130,-1130,-1130 }, { 67,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131, -1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131, -1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131, -1131,-1131, 1132,-1131,-1131,-1131,-1131,-1131,-1131,-1131, -1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131, -1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131, -1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131, -1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131, -1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131, -1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131, -1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131, -1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131, -1131,-1131,-1131,-1131,-1131,-1131,-1131,-1131 }, { 67,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132, -1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132, -1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132, -1132,-1132, 1133,-1132,-1132,-1132,-1132,-1132,-1132,-1132, -1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132, -1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132, -1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132, -1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132, -1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132, -1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132, -1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132, -1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132, -1132,-1132,-1132,-1132,-1132,-1132,-1132,-1132 }, { 67,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133, -1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133, -1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133, -1133,-1133, 1134,-1133,-1133,-1133,-1133,-1133,-1133,-1133, -1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133, -1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133, -1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133, -1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133, -1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133, -1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133, -1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133, -1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133, -1133,-1133,-1133,-1133,-1133,-1133,-1133,-1133 }, { 67,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134, -1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134, -1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134, -1134,-1134, 1135,-1134,-1134,-1134,-1134,-1134,-1134,-1134, -1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134, -1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134, -1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134, -1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134, -1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134, -1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134, -1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134, -1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134, -1134,-1134,-1134,-1134,-1134,-1134,-1134,-1134 }, { 67,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135, -1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135, -1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135, -1135,-1135, 1136,-1135,-1135,-1135,-1135,-1135,-1135,-1135, -1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135, -1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135, -1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135, -1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135, -1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135, -1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135, -1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135, -1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135, -1135,-1135,-1135,-1135,-1135,-1135,-1135,-1135 }, { 67,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136, -1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136, -1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136, -1136,-1136, 1137,-1136,-1136,-1136,-1136,-1136,-1136,-1136, -1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136, -1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136, -1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136, -1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136, -1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136, -1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136, -1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136, -1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136, -1136,-1136,-1136,-1136,-1136,-1136,-1136,-1136 }, { 67,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137, -1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137, -1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137, -1137,-1137, 1138,-1137,-1137,-1137,-1137,-1137,-1137,-1137, -1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137, -1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137, -1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137, -1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137, -1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137, -1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137, -1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137, -1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137, -1137,-1137,-1137,-1137,-1137,-1137,-1137,-1137 }, { 67,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138, -1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138, -1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138, -1138,-1138, 1139,-1138,-1138,-1138,-1138,-1138,-1138,-1138, -1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138, -1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138, -1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138, -1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138, -1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138, -1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138, -1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138, -1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138, -1138,-1138,-1138,-1138,-1138,-1138,-1138,-1138 }, { 67,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139, -1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139, -1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139, -1139,-1139, 1140,-1139,-1139,-1139,-1139,-1139,-1139,-1139, -1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139, -1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139, -1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139, -1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139, -1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139, -1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139, -1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139, -1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139, -1139,-1139,-1139,-1139,-1139,-1139,-1139,-1139 }, { 67,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140, -1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140, -1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140, -1140,-1140, 1141,-1140,-1140,-1140,-1140,-1140,-1140,-1140, -1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140, -1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140, -1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140, -1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140, -1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140, -1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140, -1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140, -1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140, -1140,-1140,-1140,-1140,-1140,-1140,-1140,-1140 }, { 67,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141, -1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141, -1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141, -1141,-1141, 1142,-1141,-1141,-1141,-1141,-1141,-1141,-1141, -1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141, -1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141, -1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141, -1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141, -1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141, -1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141, -1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141, -1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141, -1141,-1141,-1141,-1141,-1141,-1141,-1141,-1141 }, { 67,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142, -1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142, -1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142, -1142,-1142, 1143,-1142,-1142,-1142,-1142,-1142,-1142,-1142, -1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142, -1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142, -1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142, -1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142, -1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142, -1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142, -1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142, -1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142, -1142,-1142,-1142,-1142,-1142,-1142,-1142,-1142 }, { 67,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143, -1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143, -1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143, -1143,-1143, 1144,-1143,-1143,-1143,-1143,-1143,-1143,-1143, -1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143, -1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143, -1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143, -1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143, -1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143, -1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143, -1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143, -1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143, -1143,-1143,-1143,-1143,-1143,-1143,-1143,-1143 }, { 67,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144, -1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144, -1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144, -1144,-1144, 1145,-1144,-1144,-1144,-1144,-1144,-1144,-1144, -1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144, -1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144, -1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144, -1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144, -1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144, -1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144, -1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144, -1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144, -1144,-1144,-1144,-1144,-1144,-1144,-1144,-1144 }, { 67,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145, -1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145, -1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145, -1145,-1145, 1146,-1145,-1145,-1145,-1145,-1145,-1145,-1145, -1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145, -1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145, -1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145, -1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145, -1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145, -1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145, -1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145, -1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145, -1145,-1145,-1145,-1145,-1145,-1145,-1145,-1145 }, { 67,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146, -1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146, -1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146, -1146,-1146, 1147,-1146,-1146,-1146,-1146,-1146,-1146,-1146, -1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146, -1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146, -1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146, -1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146, -1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146, -1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146, -1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146, -1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146, -1146,-1146,-1146,-1146,-1146,-1146,-1146,-1146 }, { 67,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147, -1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147, -1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147, -1147,-1147, 1148,-1147,-1147,-1147,-1147,-1147,-1147,-1147, -1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147, -1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147, -1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147, -1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147, -1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147, -1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147, -1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147, -1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147, -1147,-1147,-1147,-1147,-1147,-1147,-1147,-1147 }, { 67,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148, -1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148, -1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148, -1148,-1148, 1149,-1148,-1148,-1148,-1148,-1148,-1148,-1148, -1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148, -1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148, -1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148, -1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148, -1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148, -1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148, -1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148, -1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148, -1148,-1148,-1148,-1148,-1148,-1148,-1148,-1148 }, { 67,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149, -1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149, -1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149, -1149,-1149, 1150,-1149,-1149,-1149,-1149,-1149,-1149,-1149, -1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149, -1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149, -1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149, -1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149, -1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149, -1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149, -1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149, -1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149, -1149,-1149,-1149,-1149,-1149,-1149,-1149,-1149 }, { 67,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150, -1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150, -1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150, -1150,-1150, 1151,-1150,-1150,-1150,-1150,-1150,-1150,-1150, -1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150, -1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150, -1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150, -1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150, -1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150, -1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150, -1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150, -1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150, -1150,-1150,-1150,-1150,-1150,-1150,-1150,-1150 }, { 67,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151, -1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151, -1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151, -1151,-1151, 1152,-1151,-1151,-1151,-1151,-1151,-1151,-1151, -1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151, -1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151, -1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151, -1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151, -1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151, -1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151, -1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151, -1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151, -1151,-1151,-1151,-1151,-1151,-1151,-1151,-1151 }, { 67,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152, -1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152, -1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152, -1152,-1152, 1153,-1152,-1152,-1152,-1152,-1152,-1152,-1152, -1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152, -1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152, -1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152, -1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152, -1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152, -1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152, -1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152, -1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152, -1152,-1152,-1152,-1152,-1152,-1152,-1152,-1152 }, { 67,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153, -1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153, -1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153, -1153,-1153, 1154,-1153,-1153,-1153,-1153,-1153,-1153,-1153, -1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153, -1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153, -1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153, -1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153, -1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153, -1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153, -1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153, -1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153, -1153,-1153,-1153,-1153,-1153,-1153,-1153,-1153 }, { 67,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154, -1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154, -1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154, -1154,-1154, 1155,-1154,-1154,-1154,-1154,-1154,-1154,-1154, -1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154, -1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154, -1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154, -1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154, -1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154, -1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154, -1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154, -1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154, -1154,-1154,-1154,-1154,-1154,-1154,-1154,-1154 }, { 67,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155, -1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155, -1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155, -1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155, -1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155, -1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155, -1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155, -1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155, -1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155, -1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155, -1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155, -1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155, -1155,-1155,-1155,-1155,-1155,-1155,-1155,-1155 }, } ; static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up wcsbthtext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ wcsbthleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 361 #define YY_END_OF_BUFFER 362 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[1156] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 361, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 134, 134, 134, 153, 153, 145, 145, 154, 154, 146, 146, 201, 201, 201, 361, 222, 222, 211, 211, 226, 226, 237, 237, 238, 238, 304, 304, 304, 339, 339, 317, 317, 340, 340, 318, 318, 344, 344, 240, 241, 239, 248, 248, 249, 249, 257, 257, 258, 258, 346, 346, 348, 348, 347, 350, 350, 350, 349, 352, 352, 361, 353, 361, 361, 361, 358, 361, 359, 361, 360, 0, 0, 0, 64, 58, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 63, 57, 0, 0, 0, 0, 0, 0, 0, 23, 0, 19, 66, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 345, 347, 0, 349, 349, 349, 349, 0, 0, 351, 0, 355, 0, 0, 0, 353, 0, 0, 0, 353, 0, 0, 0, 358, 0, 359, 0, 360, 0, 0, 0, 0, 0, 0, 0, 0, 65, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 20, 67, 61, 0, 0, 0, 0, 0, 0, 0, 0, 131, 132, 133, 130, 129, 127, 128, 0, 0, 0, 135, 136, 137, 142, 141, 0, 0, 0, 138, 139, 140, 144, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 224, 225, 227, 228, 229, 234, 233, 230, 231, 232, 236, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, 342, 343, 0, 0, 0, 245, 246, 247, 0, 0, 0, 254, 255, 256, 349, 0, 349, 0, 0, 354, 0, 0, 0, 356, 0, 0, 0, 353, 0, 0, 22, 18, 26, 0, 69, 74, 0, 13, 44, 79, 39, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, 0, 91, 51, 49, 0, 93, 0, 0, 0, 103, 0, 54, 56, 108, 106, 110, 0, 28, 0, 71, 76, 0, 15, 46, 81, 41, 36, 0, 122, 112, 0, 0, 0, 0, 114, 0, 0, 121, 0, 0, 124, 147, 148, 149, 150, 151, 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 203, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 242, 243, 244, 250, 251, 252, 253, 357, 0, 0, 0, 354, 0, 0, 0, 353, 0, 0, 27, 70, 75, 31, 14, 45, 80, 40, 35, 25, 68, 73, 30, 12, 43, 78, 38, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, 97, 99, 101, 62, 0, 0, 0, 0, 0, 0, 0, 29, 72, 77, 32, 16, 47, 82, 42, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 207, 209, 205, 206, 208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 310, 308, 309, 305, 306, 307, 0, 0, 0, 0, 0, 0, 0, 0, 316, 314, 315, 311, 312, 313, 0, 354, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 190, 192, 195, 199, 191, 194, 198, 193, 197, 196, 200, 186, 164, 183, 187, 175, 165, 161, 170, 181, 184, 188, 176, 173, 178, 166, 162, 171, 159, 168, 180, 182, 185, 189, 177, 174, 179, 157, 158, 167, 163, 172, 160, 169, 155, 156, 221, 217, 220, 214, 216, 219, 212, 213, 215, 218, 294, 296, 299, 303, 295, 298, 302, 297, 301, 300, 290, 268, 287, 291, 279, 265, 269, 274, 285, 288, 292, 277, 280, 282, 263, 266, 270, 275, 272, 284, 286, 289, 293, 261, 278, 281, 283, 262, 259, 264, 267, 271, 276, 273, 260, 334, 324, 333, 322, 323, 332, 319, 320, 321, 331, 338, 330, 337, 328, 329, 336, 325, 326, 327, 335, 0, 0, 0, 0, 0, 0, 0, 90, 50, 48, 0, 0, 0, 0, 102, 0, 53, 55, 105, 107, 109, 0, 111, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 123, 83, 85, 86, 87, 88, 0, 89, 92, 94, 96, 98, 100, 104, 52, 0, 115, 117, 118, 119, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; static yyconst yy_state_type yy_NUL_trans[1156] = { 0, 68, 69, 84, 84, 87, 87, 89, 89, 91, 91, 93, 93, 95, 95, 68, 68, 99, 99, 101, 101, 103, 103, 105, 105, 107, 107, 109, 109, 112, 112, 114, 114, 116, 116, 118, 118, 120, 120, 122, 122, 123, 123, 125, 125, 127, 127, 129, 129, 131, 131, 133, 133, 135, 135, 138, 138, 142, 142, 144, 144, 148, 148, 150, 150, 152, 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 263, 265, 0, 269, 273, 277, 0, 279, 0, 281, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 263, 0, 265, 0, 442, 443, 447, 0, 451, 273, 273, 0, 273, 273, 277, 0, 279, 0, 281, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 442, 443, 0, 443, 443, 447, 0, 447, 613, 447, 0, 451, 617, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 442, 792, 613, 0, 613, 613, 617, 0, 617, 617, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 792, 0, 792, 792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1076, 0, 1078, 0, 1080, 0, 1082, 0, 1084, 0, 1086, 0, 1076, 0, 1078, 0, 1080, 0, 1082, 0, 1084, 0, 1086, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ; extern int wcsbth_flex_debug; int wcsbth_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *wcsbthtext; #line 1 "wcsbth.l" /*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: wcsbth.c,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * wcsbth.l is a Flex description file containing the definition of a lexical * scanner for parsing the WCS keyrecords for one or more image arrays and/or * pixel lists in a FITS binary table header. It can also handle primary image * and image extension headers. * * wcsbth.l requires Flex v2.5.4 or later. Refer to wcshdr.h for a description * of the user interface and operating notes. * * Implementation notes * -------------------- * wcsbth() may be invoked with an option that causes it to recognize the * image-header form of WCS keywords as defaults for each alternate coordinate * representation (up to 27). By design, with this option enabled wcsbth() can * also handle primary image and image extension headers, effectively treating * them as a single-column binary table though with WCS keywords of a different * form. * * NAXIS is always 2 for binary tables, it refers to the two-dimensional nature * of the table. Thus NAXIS does not count the number of image axes in either * image arrays or pixels lists and for the latter there is not even a formal * equivalent of WCSAXESa. Hence NAXIS is always ignored and a first pass * through the header is required to determine the number of images, the number * of alternate coordinate representations for each image (up to 27), and the * number of coordinate axes in each representation; this pass also counts the * number of iPVn_ma and iPSn_ma or TVk_ma and TSk_ma keywords in each * representation. * * On completion of the first pass, the association between column number and * axis number is defined for each representation of a pixel list. Memory is * allocated for an array of the required number of wcsprm structs and each of * these is initialized appropriately. These structs are filled in the second * pass. * * It is permissible for a scalar table column to contain degenerate (single- * point) image arrays and simultaneously form one axis of a pixel list. * * The parser does not check for duplicated keywords, for most keywords it * accepts the last encountered. * * wcsbth() does not currently handle the Green Bank convention. * *===========================================================================*/ /* Options. */ /* Indices for parameterized keywords. */ /* Alternate coordinate system identifier. */ /* Keyvalue data types. */ /* Inline comment syntax. */ /* Exclusive start states. */ #line 113 "wcsbth.l" #include #include #include #include #include #include "wcs.h" #include "wcshdr.h" #include "wcsmath.h" #include "wcsprintf.h" #include "wcsutil.h" /* Codes used for keyvalue data types. */ #define INTEGER 0 #define FLOAT 1 #define STRING 2 /* Bit masks used for keyword types: */ #define IMGAUX 0x1 /* Auxiliary image header, e.g. LONPOLEa or */ /* DATE-OBS. */ #define IMGAXIS 0x2 /* Image header with axis number, e.g. */ /* CTYPEia. */ #define IMGHEAD 0x3 /* Image header of either type. */ #define BIMGARR 0x4 /* Binary table image array with axis */ /* number, e.g. iCTYna. */ #define PIXLIST 0x8 /* Pixel list, e.g. TCTYna. */ #define BINTAB 0xC /* Shared binary table image array (without */ /* axis number) or pixel list, e.g. LONPna */ /* or OBSGXn. */ #define YY_DECL int wcsbth(char *header, int nkeyrec, int relax, int ctrl, \ int keysel, int *colsel, int *nreject, int *nwcs, \ struct wcsprm **wcs) #define YY_INPUT(inbuff, count, bufsize) \ { \ if (wcsbth_nkeyrec) { \ strncpy(inbuff, wcsbth_hdr, 80); \ inbuff[80] = '\n'; \ wcsbth_hdr += 80; \ wcsbth_nkeyrec--; \ count = 81; \ } else { \ count = YY_NULL; \ } \ } /* A convenience macro to get around incompatibilities between unput() and yyless(): put wcsbthtext followed by a blank back onto the input stream. */ #define WCSBTH_PUTBACK \ sprintf(strtmp, "%s ", wcsbthtext); \ itmp = strlen(strtmp); \ while (itmp) unput(strtmp[--itmp]); /* These global variables are required by YY_INPUT. */ char *wcsbth_hdr; int wcsbth_nkeyrec; /* Used in preempting the call to exit() by yy_fatal_error(). */ jmp_buf wcsbth_abort_jmp_env; #define exit(status) longjmp(wcsbth_abort_jmp_env, status) /* Struct used internally for header bookkeeping. */ struct wcsbth_alts { int ncol, ialt, icol, imgherit; short int (*arridx)[27]; short int pixidx[27]; short int pad1; unsigned int *pixlist; unsigned char (*npv)[27]; unsigned char (*nps)[27]; unsigned char pixnpv[27]; unsigned char pixnps[27]; unsigned char pad2[2]; }; int wcsbth_pass1(int keytype, int i, int j, int n, int k, char a, char ptype, struct wcsbth_alts *alts); int wcsbth_init1(struct wcsbth_alts *alts, int *nwcs, struct wcsprm **wcs); struct wcsprm *wcsbth_idx(struct wcsprm *wcs, struct wcsbth_alts *alts, int keytype, int n, char a); int wcsbth_colax(struct wcsprm *wcs, struct wcsbth_alts *alts, int k, char a); int wcsbth_epoch(double *wptr, double epoch); int wcsbth_vsource(double *wptr, double vsource); int wcsbth_final(struct wcsbth_alts *alts, int *nwcs, struct wcsprm **wcs); #line 20860 "wcsbth.c" #define INITIAL 0 #define CCCCCia 1 #define iCCCna 2 #define iCCCCn 3 #define TCCCna 4 #define TCCCCn 5 #define CCi_ja 6 #define ijCCna 7 #define TCn_ka 8 #define TCCn_ka 9 #define CROTAi 10 #define iCROTn 11 #define TCROTn 12 #define CCi_ma 13 #define iCn_ma 14 #define iCCn_ma 15 #define TCn_ma 16 #define TCCn_ma 17 #define PROJPm 18 #define CCCCCCCC 19 #define CCCCCCCa 20 #define CCCCna 21 #define CCCCCna 22 #define CCCCn 23 #define CCCCCn 24 #define VALUE 25 #define INTEGER_VAL 26 #define FLOAT_VAL 27 #define STRING_VAL 28 #define COMMENT 29 #define DISCARD 30 #define ERROR 31 #define FLUSH 32 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int wcsbthlex_destroy (void ); int wcsbthget_debug (void ); void wcsbthset_debug (int debug_flag ); YY_EXTRA_TYPE wcsbthget_extra (void ); void wcsbthset_extra (YY_EXTRA_TYPE user_defined ); FILE *wcsbthget_in (void ); void wcsbthset_in (FILE * in_str ); FILE *wcsbthget_out (void ); void wcsbthset_out (FILE * out_str ); yy_size_t wcsbthget_leng (void ); char *wcsbthget_text (void ); int wcsbthget_lineno (void ); void wcsbthset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int wcsbthwrap (void ); #else extern int wcsbthwrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( wcsbthtext, wcsbthleng, 1, wcsbthout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ errno=0; \ while ( (result = read( fileno(wcsbthin), (char *) buf, max_size )) < 0 ) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(wcsbthin); \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int wcsbthlex (void); #define YY_DECL int wcsbthlex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after wcsbthtext and wcsbthleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ if ( wcsbthleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (wcsbthtext[wcsbthleng - 1] == '\n'); \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! wcsbthin ) wcsbthin = stdin; if ( ! wcsbthout ) wcsbthout = stdout; if ( ! YY_CURRENT_BUFFER ) { wcsbthensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = wcsbth_create_buffer(wcsbthin,YY_BUF_SIZE ); } wcsbth_load_buffer_state( ); } { #line 205 "wcsbth.l" /* Keyword indices, as used in the WCS papers, e.g. iVn_ma, TPn_ka. */ char a; int i, j, k, m, n; char *cptr, *errmsg, errtxt[80], exclude[1000], gotone, *hptr, *keep, *keyname, *keyrec, ptype, strtmp[80]; int altlin, ialt, icol, incl, inttmp, ipass, ipx, itmp, ix, jx, keytype, nother, nsel, npass, nvalid, status, valtype, voff; double dbltmp; void *vptr, *wptr; struct wcsbth_alts alts; struct wcsprm *wcsp, wcstem; int (*special)(double *, double); int wcsbthlex_destroy(void); /* The data structures produced. */ *nwcs = 0; *wcs = 0x0; /* Parameters used to implement YY_INPUT. */ wcsbth_hdr = header; wcsbth_nkeyrec = nkeyrec; /* Our handle on the input stream. */ keyrec = header; hptr = header; keep = 0x0; /* For keeping tallies of keywords found. */ *nreject = 0; nvalid = 0; nother = 0; /* If strict, then also reject. */ if (relax & WCSHDR_strict) relax |= WCSHDR_reject; /* Keyword parameters. */ i = j = 0; n = k = 0; m = 0; a = ' '; /* Header bookkeeping. */ alts.ncol = 0; alts.arridx = 0x0; alts.pixlist = 0x0; alts.npv = 0x0; alts.nps = 0x0; for (ialt = 0; ialt < 27; ialt++) { alts.pixidx[ialt] = 0; alts.pixnpv[ialt] = 0; alts.pixnps[ialt] = 0; } /* For decoding the keyvalue. */ keytype = 0; valtype = -1; vptr = 0x0; /* For keywords that require special handling. */ altlin = 0; ptype = ' '; special = 0x0; /* Selection by column number. */ nsel = colsel ? colsel[0] : 0; incl = (nsel > 0); for (icol = 0; icol < 1000; icol++) { exclude[icol] = incl; } for (icol = 1; icol <= abs(nsel); icol++) { itmp = colsel[icol]; if (0 < itmp && itmp < 1000) { exclude[itmp] = !incl; } } exclude[0] = 0; /* Selection by keyword type. */ itmp = keysel; keysel = 0; if (itmp) { if (itmp & WCSHDR_IMGHEAD) keysel |= IMGHEAD; if (itmp & WCSHDR_BIMGARR) keysel |= BIMGARR; if (itmp & WCSHDR_PIXLIST) keysel |= PIXLIST; } if (keysel == 0) { keysel = IMGHEAD | BINTAB; } /* Control variables. */ ipass = 1; npass = 2; /* Return here via longjmp() invoked by yy_fatal_error(). */ if (setjmp(wcsbth_abort_jmp_env)) { return 4; } BEGIN(INITIAL); #line 21198 "wcsbth.c" while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of wcsbthtext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); yy_match: while ( (yy_current_state = yy_nxt[yy_current_state][ YY_SC_TO_UI(*yy_cp) ]) > 0 ) { if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } ++yy_cp; } yy_current_state = -yy_current_state; yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos) + 1; yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 309 "wcsbth.l" { if (ipass == 1) { if (alts.ncol == 0) { sscanf(wcsbthtext, "TFIELDS = %d", &(alts.ncol)); BEGIN(FLUSH); } else { errmsg = "duplicate or out-of-sequence TFIELDS keyword"; BEGIN(ERROR); } } else { BEGIN(FLUSH); } } YY_BREAK case 2: YY_RULE_SETUP #line 324 "wcsbth.l" { if (!(keysel & IMGAXIS)) { /* Ignore this key type. */ BEGIN(DISCARD); } else { if (relax & WCSHDR_ALLIMG) { sscanf(wcsbthtext, "WCSAXES%c= %d", &a, &i); if (i < 0) { errmsg = "negative value of WCSAXESa ignored"; BEGIN(ERROR); } else { valtype = INTEGER; vptr = 0x0; keyname = "WCSAXESa"; keytype = IMGAXIS; BEGIN(COMMENT); } } else if (relax & WCSHDR_reject) { errmsg = "image-header keyword WCSAXESa in binary table"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } } YY_BREAK case 3: #line 358 "wcsbth.l" case 4: #line 359 "wcsbth.l" case 5: YY_RULE_SETUP #line 359 "wcsbth.l" { keyname = "WCAXna"; /* Note that a blank in the sscanf() format string matches zero or more of them in the input. */ sscanf(wcsbthtext, "WCAX%d%c = %d", &n, &a, &i); if (!(keysel & BIMGARR) || exclude[n]) { /* Ignore this key type or column. */ BEGIN(DISCARD); } else if (i < 0) { errmsg = "negative value of WCSAXESa ignored"; BEGIN(ERROR); } else { valtype = INTEGER; vptr = 0x0; keyname = "WCAXna"; keytype = IMGAXIS; BEGIN(COMMENT); } } YY_BREAK case 6: /* rule 6 can match eol */ #line 385 "wcsbth.l" case 7: /* rule 7 can match eol */ #line 386 "wcsbth.l" case 8: /* rule 8 can match eol */ YY_RULE_SETUP #line 386 "wcsbth.l" { /* Cross-reference supplier. */ keyname = "WCSTna"; errmsg = "cross-references are not implemented"; BEGIN(ERROR); } YY_BREAK case 9: /* rule 9 can match eol */ #line 394 "wcsbth.l" case 10: /* rule 10 can match eol */ #line 395 "wcsbth.l" case 11: /* rule 11 can match eol */ YY_RULE_SETUP #line 395 "wcsbth.l" { /* Cross-reference consumer. */ keyname = "WCSXna"; errmsg = "cross-references are not implemented"; BEGIN(ERROR); } YY_BREAK case 12: YY_RULE_SETUP #line 402 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.crpix); keyname = "CRPIXja"; BEGIN(CCCCCia); } YY_BREAK case 13: #line 411 "wcsbth.l" case 14: YY_RULE_SETUP #line 411 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.crpix); sscanf(wcsbthtext, "%d", &i); if (wcsbthleng == 4) { keyname = "jCRPna"; BEGIN(iCCCna); } else { keyname = "jCRPXn"; BEGIN(iCCCCn); } } YY_BREAK case 15: #line 427 "wcsbth.l" case 16: YY_RULE_SETUP #line 427 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.crpix); if (wcsbthleng == 4) { keyname = "TCRPna"; BEGIN(TCCCna); } else { keyname = "TCRPXn"; BEGIN(TCCCCn); } } YY_BREAK case 17: YY_RULE_SETUP #line 440 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.pc); altlin = 1; keyname = "PCi_ja"; BEGIN(CCi_ja); } YY_BREAK case 18: YY_RULE_SETUP #line 449 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.pc); altlin = 1; sscanf(wcsbthtext, "%1d%1d", &i, &j); keyname = "ijPCna"; BEGIN(ijCCna); } YY_BREAK case 19: #line 461 "wcsbth.l" case 20: YY_RULE_SETUP #line 461 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.pc); altlin = 1; if (wcsbthleng == 2) { keyname = "TPn_ka"; BEGIN(TCn_ka); } else { keyname = "TPCn_ka"; BEGIN(TCCn_ka); } } YY_BREAK case 21: YY_RULE_SETUP #line 475 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.cd); altlin = 2; keyname = "CDi_ja"; BEGIN(CCi_ja); } YY_BREAK case 22: YY_RULE_SETUP #line 484 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.cd); altlin = 2; sscanf(wcsbthtext, "%1d%1d", &i, &j); keyname = "ijCDna"; BEGIN(ijCCna); } YY_BREAK case 23: #line 496 "wcsbth.l" case 24: YY_RULE_SETUP #line 496 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.cd); altlin = 2; if (wcsbthleng == 2) { keyname = "TCn_ka"; BEGIN(TCn_ka); } else { keyname = "TCDn_ka"; BEGIN(TCCn_ka); } } YY_BREAK case 25: YY_RULE_SETUP #line 510 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.cdelt); keyname = "CDELTia"; BEGIN(CCCCCia); } YY_BREAK case 26: #line 519 "wcsbth.l" case 27: YY_RULE_SETUP #line 519 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.cdelt); sscanf(wcsbthtext, "%d", &i); if (wcsbthleng == 4) { keyname = "iCDEna"; BEGIN(iCCCna); } else { keyname = "iCDLTn"; BEGIN(iCCCCn); } } YY_BREAK case 28: #line 535 "wcsbth.l" case 29: YY_RULE_SETUP #line 535 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.cdelt); if (wcsbthleng == 4) { keyname = "TCDEna"; BEGIN(TCCCna); } else { keyname = "TCDLTn"; BEGIN(TCCCCn); } } YY_BREAK case 30: YY_RULE_SETUP #line 548 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.crota); altlin = 4; keyname = "CROTAi"; BEGIN(CROTAi); } YY_BREAK case 31: YY_RULE_SETUP #line 557 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.crota); altlin = 4; sscanf(wcsbthtext, "%d", &i); keyname = "iCROTn"; BEGIN(iCROTn); } YY_BREAK case 32: YY_RULE_SETUP #line 568 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.crota); altlin = 4; keyname = "TCROTn"; BEGIN(TCROTn); } YY_BREAK case 33: YY_RULE_SETUP #line 577 "wcsbth.l" { valtype = STRING; vptr = &(wcstem.cunit); keyname = "CUNITia"; BEGIN(CCCCCia); } YY_BREAK case 34: #line 586 "wcsbth.l" case 35: YY_RULE_SETUP #line 586 "wcsbth.l" { valtype = STRING; vptr = &(wcstem.cunit); sscanf(wcsbthtext, "%d", &i); if (wcsbthleng == 4) { keyname = "iCUNna"; BEGIN(iCCCna); } else { keyname = "iCUNIn"; BEGIN(iCCCCn); } } YY_BREAK case 36: #line 602 "wcsbth.l" case 37: YY_RULE_SETUP #line 602 "wcsbth.l" { valtype = STRING; vptr = &(wcstem.cunit); if (wcsbthleng == 4) { keyname = "TCUNna"; BEGIN(TCCCna); } else { keyname = "TCUNIn"; BEGIN(TCCCCn); } } YY_BREAK case 38: YY_RULE_SETUP #line 615 "wcsbth.l" { valtype = STRING; vptr = &(wcstem.ctype); keyname = "CTYPEia"; BEGIN(CCCCCia); } YY_BREAK case 39: #line 624 "wcsbth.l" case 40: YY_RULE_SETUP #line 624 "wcsbth.l" { valtype = STRING; vptr = &(wcstem.ctype); sscanf(wcsbthtext, "%d", &i); if (wcsbthleng == 4) { keyname = "iCTYna"; BEGIN(iCCCna); } else { keyname = "iCTYPn"; BEGIN(iCCCCn); } } YY_BREAK case 41: #line 640 "wcsbth.l" case 42: YY_RULE_SETUP #line 640 "wcsbth.l" { valtype = STRING; vptr = &(wcstem.ctype); if (wcsbthleng == 4) { keyname = "TCTYna"; BEGIN(TCCCna); } else { keyname = "TCTYPn"; BEGIN(TCCCCn); } } YY_BREAK case 43: YY_RULE_SETUP #line 653 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.crval); keyname = "CRVALia"; BEGIN(CCCCCia); } YY_BREAK case 44: #line 662 "wcsbth.l" case 45: YY_RULE_SETUP #line 662 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.crval); sscanf(wcsbthtext, "%d", &i); if (wcsbthleng == 4) { keyname = "iCRVna"; BEGIN(iCCCna); } else { keyname = "iCRVLn"; BEGIN(iCCCCn); } } YY_BREAK case 46: #line 678 "wcsbth.l" case 47: YY_RULE_SETUP #line 678 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.crval); if (wcsbthleng == 4) { keyname = "TCRVna"; BEGIN(TCCCna); } else { keyname = "TCRVLn"; BEGIN(TCCCCn); } } YY_BREAK case 48: #line 692 "wcsbth.l" case 49: YY_RULE_SETUP #line 692 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.lonpole); if (wcsbthleng == 7) { keyname = "LONPOLEa"; BEGIN(CCCCCCCa); } else { keyname = "LONPna"; BEGIN(CCCCna); } } YY_BREAK case 50: #line 706 "wcsbth.l" case 51: YY_RULE_SETUP #line 706 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.latpole); if (wcsbthleng == 7) { keyname = "LATPOLEa"; BEGIN(CCCCCCCa); } else { keyname = "LATPna"; BEGIN(CCCCna); } } YY_BREAK case 52: #line 720 "wcsbth.l" case 53: #line 721 "wcsbth.l" case 54: YY_RULE_SETUP #line 721 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.restfrq); if (wcsbthleng == 8) { if (relax & WCSHDR_strict) { errmsg = "the RESTFREQ keyword is deprecated, use RESTFRQa"; BEGIN(ERROR); } else { unput(' '); keyname = "RESTFREQ"; BEGIN(CCCCCCCa); } } else if (wcsbthleng == 7) { keyname = "RESTFRQa"; BEGIN(CCCCCCCa); } else { keyname = "RFRQna"; BEGIN(CCCCna); } } YY_BREAK case 55: #line 748 "wcsbth.l" case 56: YY_RULE_SETUP #line 748 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.restwav); if (wcsbthleng == 7) { keyname = "RESTWAVa"; BEGIN(CCCCCCCa); } else { keyname = "RWAVna"; BEGIN(CCCCna); } } YY_BREAK case 57: YY_RULE_SETUP #line 761 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.pv); ptype = 'v'; keyname = "PVi_ma"; BEGIN(CCi_ma); } YY_BREAK case 58: #line 771 "wcsbth.l" case 59: YY_RULE_SETUP #line 771 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.pv); ptype = 'v'; sscanf(wcsbthtext, "%d", &i); if (wcsbthleng == 2) { keyname = "iVn_ma"; BEGIN(iCn_ma); } else { keyname = "iPVn_ma"; BEGIN(iCCn_ma); } } YY_BREAK case 60: #line 788 "wcsbth.l" case 61: YY_RULE_SETUP #line 788 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.pv); ptype = 'v'; if (wcsbthleng == 2) { keyname = "TVn_ma"; BEGIN(TCn_ma); } else { keyname = "TPVn_ma"; BEGIN(TCCn_ma); } } YY_BREAK case 62: YY_RULE_SETUP #line 802 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.pv); ptype = 'v'; keyname = "PROJPm"; BEGIN(PROJPm); } YY_BREAK case 63: YY_RULE_SETUP #line 811 "wcsbth.l" { valtype = STRING; vptr = &(wcstem.ps); ptype = 's'; keyname = "PSi_ma"; BEGIN(CCi_ma); } YY_BREAK case 64: #line 821 "wcsbth.l" case 65: YY_RULE_SETUP #line 821 "wcsbth.l" { valtype = STRING; vptr = &(wcstem.ps); ptype = 's'; sscanf(wcsbthtext, "%d", &i); if (wcsbthleng == 2) { keyname = "iSn_ma"; BEGIN(iCn_ma); } else { keyname = "iPSn_ma"; BEGIN(iCCn_ma); } } YY_BREAK case 66: #line 838 "wcsbth.l" case 67: YY_RULE_SETUP #line 838 "wcsbth.l" { valtype = STRING; vptr = &(wcstem.ps); ptype = 's'; if (wcsbthleng == 2) { keyname = "TSn_ma"; BEGIN(TCn_ma); } else { keyname = "TPSn_ma"; BEGIN(TCCn_ma); } } YY_BREAK case 68: YY_RULE_SETUP #line 852 "wcsbth.l" { valtype = STRING; vptr = &(wcstem.cname); keyname = "CNAMEia"; BEGIN(CCCCCia); } YY_BREAK case 69: #line 861 "wcsbth.l" case 70: YY_RULE_SETUP #line 861 "wcsbth.l" { valtype = STRING; vptr = &(wcstem.cname); sscanf(wcsbthtext, "%d", &i); if (wcsbthleng == 4) { keyname = "iCNAna"; BEGIN(iCCCna); } else { if (!(relax & WCSHDR_CNAMn)) vptr = 0x0; keyname = "iCNAMn"; BEGIN(iCCCCn); } } YY_BREAK case 71: #line 878 "wcsbth.l" case 72: YY_RULE_SETUP #line 878 "wcsbth.l" { valtype = STRING; vptr = &(wcstem.cname); if (wcsbthleng == 4) { keyname = "TCNAna"; BEGIN(TCCCna); } else { if (!(relax & WCSHDR_CNAMn)) vptr = 0x0; keyname = "TCNAMn"; BEGIN(TCCCCn); } } YY_BREAK case 73: YY_RULE_SETUP #line 892 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.crder); keyname = "CRDERia"; BEGIN(CCCCCia); } YY_BREAK case 74: #line 901 "wcsbth.l" case 75: YY_RULE_SETUP #line 901 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.crder); sscanf(wcsbthtext, "%d", &i); if (wcsbthleng == 4) { keyname = "iCRDna"; BEGIN(iCCCna); } else { if (!(relax & WCSHDR_CNAMn)) vptr = 0x0; keyname = "iCRDEn"; BEGIN(iCCCCn); } } YY_BREAK case 76: #line 918 "wcsbth.l" case 77: YY_RULE_SETUP #line 918 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.crder); if (wcsbthleng == 4) { keyname = "TCRDna"; BEGIN(TCCCna); } else { if (!(relax & WCSHDR_CNAMn)) vptr = 0x0; keyname = "TCRDEn"; BEGIN(TCCCCn); } } YY_BREAK case 78: YY_RULE_SETUP #line 932 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.csyer); keyname = "CSYERia"; BEGIN(CCCCCia); } YY_BREAK case 79: #line 941 "wcsbth.l" case 80: YY_RULE_SETUP #line 941 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.csyer); sscanf(wcsbthtext, "%d", &i); if (wcsbthleng == 4) { keyname = "iCSYna"; BEGIN(iCCCna); } else { if (!(relax & WCSHDR_CNAMn)) vptr = 0x0; keyname = "iCSYEn"; BEGIN(iCCCCn); } } YY_BREAK case 81: #line 958 "wcsbth.l" case 82: YY_RULE_SETUP #line 958 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.csyer); if (wcsbthleng == 4) { keyname = "TCSYna"; BEGIN(TCCCna); } else { if (!(relax & WCSHDR_CNAMn)) vptr = 0x0; keyname = "TCSYEn"; BEGIN(TCCCCn); } } YY_BREAK case 83: #line 973 "wcsbth.l" case 84: YY_RULE_SETUP #line 973 "wcsbth.l" { valtype = STRING; vptr = wcstem.dateavg; if (wcsbthleng == 8) { if (ctrl < -10) keep = keyrec; keyname = "DATE-AVG"; BEGIN(CCCCCCCC); } else { keyname = "DAVGna"; BEGIN(CCCCn); } } YY_BREAK case 85: YY_RULE_SETUP #line 987 "wcsbth.l" { valtype = STRING; vptr = wcstem.dateobs; if (ctrl < -10) keep = keyrec; keyname = "DATE-OBS"; BEGIN(CCCCCCCC); } YY_BREAK case 86: #line 998 "wcsbth.l" case 87: #line 999 "wcsbth.l" case 88: YY_RULE_SETUP #line 999 "wcsbth.l" { valtype = STRING; vptr = wcstem.dateobs; if (relax & WCSHDR_DOBSn) { yyless(4); keyname = "DOBSna"; BEGIN(CCCCn); } else if (relax & WCSHDR_reject) { errmsg = "DOBSna keyword is non-standard"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 89: YY_RULE_SETUP #line 1018 "wcsbth.l" { sscanf(wcsbthtext, "EPOCH%c", &a); if (relax & WCSHDR_strict) { errmsg = "the EPOCH keyword is deprecated, use EQUINOXa"; BEGIN(ERROR); } else if (a == ' ' || (relax & WCSHDR_EPOCHa)) { valtype = FLOAT; vptr = &(wcstem.equinox); special = wcsbth_epoch; unput(a); keyname = "EPOCH"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "EPOCH keyword may not have an alternate version code"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 90: #line 1045 "wcsbth.l" case 91: YY_RULE_SETUP #line 1045 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.equinox); if (wcsbthleng == 7) { keyname = "EQUINOXa"; BEGIN(CCCCCCCa); } else { keyname = "EQUIna"; BEGIN(CCCCna); } } YY_BREAK case 92: #line 1059 "wcsbth.l" case 93: YY_RULE_SETUP #line 1059 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.mjdavg); if (wcsbthleng == 8) { if (ctrl < -10) keep = keyrec; keyname = "MJD-AVG"; BEGIN(CCCCCCCC); } else { keyname = "MJDAn"; BEGIN(CCCCn); } } YY_BREAK case 94: #line 1074 "wcsbth.l" case 95: YY_RULE_SETUP #line 1074 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.mjdobs); if (wcsbthleng == 8) { if (ctrl < -10) keep = keyrec; keyname = "MJD-OBS"; BEGIN(CCCCCCCC); } else { keyname = "MJDOn"; BEGIN(CCCCCn); } } YY_BREAK case 96: #line 1089 "wcsbth.l" case 97: YY_RULE_SETUP #line 1089 "wcsbth.l" { valtype = FLOAT; vptr = wcstem.obsgeo; if (wcsbthleng == 8) { if (ctrl < -10) keep = keyrec; keyname = "OBSGEO-X"; BEGIN(CCCCCCCC); } else { keyname = "OBSGXn"; BEGIN(CCCCCn); } } YY_BREAK case 98: #line 1104 "wcsbth.l" case 99: YY_RULE_SETUP #line 1104 "wcsbth.l" { valtype = FLOAT; vptr = wcstem.obsgeo + 1; if (wcsbthleng == 8) { if (ctrl < -10) keep = keyrec; keyname = "OBSGEO-Y"; BEGIN(CCCCCCCC); } else { keyname = "OBSGYn"; BEGIN(CCCCCn); } } YY_BREAK case 100: #line 1119 "wcsbth.l" case 101: YY_RULE_SETUP #line 1119 "wcsbth.l" { valtype = FLOAT; vptr = wcstem.obsgeo + 2; if (wcsbthleng == 8) { if (ctrl < -10) keep = keyrec; keyname = "OBSGEO-Z"; BEGIN(CCCCCCCC); } else { keyname = "OBSGZn"; BEGIN(CCCCCn); } } YY_BREAK case 102: #line 1134 "wcsbth.l" case 103: YY_RULE_SETUP #line 1134 "wcsbth.l" { valtype = STRING; vptr = wcstem.radesys; if (wcsbthleng == 7) { keyname = "RADESYSa"; BEGIN(CCCCCCCa); } else { keyname = "RADEna"; BEGIN(CCCCna); } } YY_BREAK case 104: YY_RULE_SETUP #line 1147 "wcsbth.l" { if (relax & WCSHDR_RADECSYS) { valtype = STRING; vptr = wcstem.radesys; unput(' '); keyname = "RADECSYS"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "the RADECSYS keyword is deprecated, use RADESYSa"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 105: #line 1167 "wcsbth.l" case 106: YY_RULE_SETUP #line 1167 "wcsbth.l" { valtype = STRING; vptr = wcstem.specsys; if (wcsbthleng == 7) { keyname = "SPECSYSa"; BEGIN(CCCCCCCa); } else { keyname = "SPECna"; BEGIN(CCCCna); } } YY_BREAK case 107: #line 1181 "wcsbth.l" case 108: YY_RULE_SETUP #line 1181 "wcsbth.l" { valtype = STRING; vptr = wcstem.ssysobs; if (wcsbthleng == 7) { keyname = "SSYSOBSa"; BEGIN(CCCCCCCa); } else { keyname = "SOBSna"; BEGIN(CCCCna); } } YY_BREAK case 109: #line 1195 "wcsbth.l" case 110: YY_RULE_SETUP #line 1195 "wcsbth.l" { valtype = STRING; vptr = wcstem.ssyssrc; if (wcsbthleng == 7) { keyname = "SSYSSRCa"; BEGIN(CCCCCCCa); } else { keyname = "SSRCna"; BEGIN(CCCCna); } } YY_BREAK case 111: #line 1209 "wcsbth.l" case 112: YY_RULE_SETUP #line 1209 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.velangl); if (wcsbthleng == 7) { keyname = "VELANGLa"; BEGIN(CCCCCCCa); } else { keyname = "VANGna"; BEGIN(CCCCna); } } YY_BREAK case 113: #line 1223 "wcsbth.l" case 114: YY_RULE_SETUP #line 1223 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.velosys); if (wcsbthleng == 7) { keyname = "VELOSYSa"; BEGIN(CCCCCCCa); } else { keyname = "VSYSna"; BEGIN(CCCCna); } } YY_BREAK case 115: YY_RULE_SETUP #line 1236 "wcsbth.l" { sscanf(wcsbthtext, "VELREF%c", &a); if (relax & WCSHDR_strict) { errmsg = "the VELREF keyword is deprecated, use SPECSYSa"; BEGIN(ERROR); } else if (a == ' ' || (relax & WCSHDR_VELREFa)) { valtype = INTEGER; vptr = &(wcstem.velref); unput(a); keyname = "VELREF"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "VELREF keyword may not have an alternate version code"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 116: YY_RULE_SETUP #line 1261 "wcsbth.l" { if (relax & WCSHDR_VSOURCE) { valtype = FLOAT; vptr = &(wcstem.zsource); special = wcsbth_vsource; yyless(7); keyname = "VSOURCEa"; BEGIN(CCCCCCCa); } else if (relax & WCSHDR_reject) { errmsg = "the VSOURCEa keyword is deprecated, use ZSOURCEa"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 117: #line 1282 "wcsbth.l" case 118: #line 1283 "wcsbth.l" case 119: YY_RULE_SETUP #line 1283 "wcsbth.l" { if (relax & WCSHDR_VSOURCE) { valtype = FLOAT; vptr = &(wcstem.zsource); special = wcsbth_vsource; yyless(4); keyname = "VSOUna"; BEGIN(CCCCna); } else if (relax & WCSHDR_reject) { errmsg = "VSOUna keyword is deprecated, use ZSOUna"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 120: #line 1304 "wcsbth.l" case 121: #line 1305 "wcsbth.l" case 122: YY_RULE_SETUP #line 1305 "wcsbth.l" { valtype = STRING; vptr = wcstem.wcsname; if (wcsbthleng == 7) { keyname = "WCSNAMEa"; BEGIN(CCCCCCCa); } else { if (*wcsbthtext == 'W') { keyname = "WCSNna"; } else { keyname = "TWCSna"; } BEGIN(CCCCna); } } YY_BREAK case 123: #line 1324 "wcsbth.l" case 124: YY_RULE_SETUP #line 1324 "wcsbth.l" { valtype = FLOAT; vptr = &(wcstem.zsource); if (wcsbthleng == 7) { keyname = "ZSOURCEa"; BEGIN(CCCCCCCa); } else { keyname = "ZSOUna"; BEGIN(CCCCna); } } YY_BREAK case 125: YY_RULE_SETUP #line 1337 "wcsbth.l" { if (wcsbth_nkeyrec) { wcsbth_nkeyrec = 0; errmsg = "keyrecords following the END keyrecord were ignored"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 126: YY_RULE_SETUP #line 1347 "wcsbth.l" { BEGIN(DISCARD); } YY_BREAK case 127: #line 1352 "wcsbth.l" case 128: YY_RULE_SETUP #line 1352 "wcsbth.l" { if (relax & WCSHDR_ALLIMG) { sscanf(wcsbthtext, "%d%c", &i, &a); keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 129: #line 1371 "wcsbth.l" case 130: YY_RULE_SETUP #line 1371 "wcsbth.l" { if (relax & WCSHDR_ALLIMG) { if (relax & WCSHDR_reject) { /* Violates the basic FITS standard. */ errmsg = "indices in parameterized keywords must not have " "leading zeroes"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 131: #line 1397 "wcsbth.l" case 132: #line 1398 "wcsbth.l" case 133: YY_RULE_SETUP #line 1398 "wcsbth.l" { /* Anything that has fallen through to this point must contain */ /* an invalid axis number. */ if (relax & WCSHDR_ALLIMG) { errmsg = "axis number must exceed 0"; BEGIN(ERROR); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 134: YY_RULE_SETUP #line 1417 "wcsbth.l" { if (relax & WCSHDR_reject) { /* Looks too much like a FITS WCS keyword not to flag it. */ errmsg = errtxt; sprintf(errmsg, "keyword looks very much like %s but isn't", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 135: #line 1432 "wcsbth.l" case 136: #line 1433 "wcsbth.l" case 137: #line 1434 "wcsbth.l" case 138: #line 1435 "wcsbth.l" case 139: #line 1436 "wcsbth.l" case 140: YY_RULE_SETUP #line 1436 "wcsbth.l" { if (vptr) { WCSBTH_PUTBACK; BEGIN((YY_START == iCCCCn) ? iCCCna : TCCCna); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "%s keyword is non-standard", keyname); BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 141: #line 1452 "wcsbth.l" case 142: #line 1453 "wcsbth.l" case 143: #line 1454 "wcsbth.l" case 144: YY_RULE_SETUP #line 1454 "wcsbth.l" { if (vptr && (relax & WCSHDR_LONGKEY)) { WCSBTH_PUTBACK; BEGIN((YY_START == iCCCCn) ? iCCCna : TCCCna); } else if (relax & WCSHDR_reject) { errmsg = errtxt; if (!vptr) { sprintf(errmsg, "%s keyword is non-standard", keyname); } else { sprintf(errmsg, "%s keyword may not have an alternate version code", keyname); } BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 145: #line 1476 "wcsbth.l" case 146: YY_RULE_SETUP #line 1476 "wcsbth.l" { BEGIN(DISCARD); } YY_BREAK case 147: #line 1481 "wcsbth.l" case 148: #line 1482 "wcsbth.l" case 149: #line 1483 "wcsbth.l" case 150: #line 1484 "wcsbth.l" case 151: #line 1485 "wcsbth.l" case 152: YY_RULE_SETUP #line 1485 "wcsbth.l" { sscanf(wcsbthtext, "%d%c", &n, &a); if (YY_START == TCCCna) i = wcsbth_colax(*wcs, &alts, n, a); keytype = (YY_START == iCCCna) ? BIMGARR : PIXLIST; BEGIN(VALUE); } YY_BREAK case 153: #line 1493 "wcsbth.l" case 154: YY_RULE_SETUP #line 1493 "wcsbth.l" { BEGIN(DISCARD); } YY_BREAK case 155: #line 1498 "wcsbth.l" case 156: #line 1499 "wcsbth.l" case 157: #line 1500 "wcsbth.l" case 158: YY_RULE_SETUP #line 1500 "wcsbth.l" { if (relax & WCSHDR_ALLIMG) { sscanf(wcsbthtext, "%d_%d%c", &i, &j, &a); keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 159: #line 1519 "wcsbth.l" case 160: #line 1520 "wcsbth.l" case 161: #line 1521 "wcsbth.l" case 162: #line 1522 "wcsbth.l" case 163: #line 1523 "wcsbth.l" case 164: #line 1524 "wcsbth.l" case 165: #line 1525 "wcsbth.l" case 166: #line 1526 "wcsbth.l" case 167: #line 1527 "wcsbth.l" case 168: #line 1528 "wcsbth.l" case 169: #line 1529 "wcsbth.l" case 170: #line 1530 "wcsbth.l" case 171: #line 1531 "wcsbth.l" case 172: #line 1532 "wcsbth.l" case 173: #line 1533 "wcsbth.l" case 174: #line 1534 "wcsbth.l" case 175: #line 1535 "wcsbth.l" case 176: #line 1536 "wcsbth.l" case 177: #line 1537 "wcsbth.l" case 178: #line 1538 "wcsbth.l" case 179: YY_RULE_SETUP #line 1538 "wcsbth.l" { if (relax & WCSHDR_ALLIMG) { if (((altlin == 1) && (relax & WCSHDR_PC0i_0ja)) || ((altlin == 2) && (relax & WCSHDR_CD0i_0ja))) { sscanf(wcsbthtext, "%d_%d%c", &i, &j, &a); keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = "indices in parameterized keywords must not have " "leading zeroes"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 180: #line 1569 "wcsbth.l" case 181: #line 1570 "wcsbth.l" case 182: #line 1571 "wcsbth.l" case 183: #line 1572 "wcsbth.l" case 184: #line 1573 "wcsbth.l" case 185: #line 1574 "wcsbth.l" case 186: #line 1575 "wcsbth.l" case 187: #line 1576 "wcsbth.l" case 188: #line 1577 "wcsbth.l" case 189: YY_RULE_SETUP #line 1577 "wcsbth.l" { /* Anything that has fallen through to this point must contain */ /* an invalid axis number. */ if (relax & WCSHDR_ALLIMG) { errmsg = "axis number must exceed 0"; BEGIN(ERROR); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 190: #line 1597 "wcsbth.l" case 191: #line 1598 "wcsbth.l" case 192: #line 1599 "wcsbth.l" case 193: #line 1600 "wcsbth.l" case 194: #line 1601 "wcsbth.l" case 195: #line 1602 "wcsbth.l" case 196: #line 1603 "wcsbth.l" case 197: #line 1604 "wcsbth.l" case 198: #line 1605 "wcsbth.l" case 199: YY_RULE_SETUP #line 1605 "wcsbth.l" { if (relax & WCSHDR_ALLIMG) { errmsg = errtxt; sprintf(errmsg, "%s keyword must use an underscore, not a dash", keyname); BEGIN(ERROR); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 200: YY_RULE_SETUP #line 1624 "wcsbth.l" { /* This covers the defunct forms CD00i00j and PC00i00j. */ if (relax & WCSHDR_ALLIMG) { if (((altlin == 1) && (relax & WCSHDR_PC00i00j)) || ((altlin == 2) && (relax & WCSHDR_CD00i00j))) { sscanf(wcsbthtext, "%3d%3d", &i, &j); a = ' '; keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "this form of the %s keyword is deprecated, use %s", keyname, keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "deprecated image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 201: YY_RULE_SETUP #line 1658 "wcsbth.l" { BEGIN(DISCARD); } YY_BREAK case 202: #line 1663 "wcsbth.l" case 203: #line 1664 "wcsbth.l" case 204: YY_RULE_SETUP #line 1664 "wcsbth.l" { sscanf(wcsbthtext, "%d%c", &n, &a); keytype = BIMGARR; BEGIN(VALUE); } YY_BREAK case 205: #line 1671 "wcsbth.l" case 206: #line 1672 "wcsbth.l" case 207: #line 1673 "wcsbth.l" case 208: #line 1674 "wcsbth.l" case 209: #line 1675 "wcsbth.l" case 210: YY_RULE_SETUP #line 1675 "wcsbth.l" { if (relax & WCSHDR_LONGKEY) { WCSBTH_PUTBACK; BEGIN(TCn_ka); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "%s keyword is non-standard", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 211: YY_RULE_SETUP #line 1691 "wcsbth.l" { BEGIN(DISCARD); } YY_BREAK case 212: #line 1696 "wcsbth.l" case 213: #line 1697 "wcsbth.l" case 214: #line 1698 "wcsbth.l" case 215: #line 1699 "wcsbth.l" case 216: #line 1700 "wcsbth.l" case 217: YY_RULE_SETUP #line 1700 "wcsbth.l" { sscanf(wcsbthtext, "%d_%d%c", &n, &k, &a); i = wcsbth_colax(*wcs, &alts, n, a); j = wcsbth_colax(*wcs, &alts, k, a); keytype = PIXLIST; BEGIN(VALUE); } YY_BREAK case 218: #line 1709 "wcsbth.l" case 219: #line 1710 "wcsbth.l" case 220: #line 1711 "wcsbth.l" case 221: YY_RULE_SETUP #line 1711 "wcsbth.l" { sscanf(wcsbthtext, "%d_%d", &n, &k); a = ' '; i = wcsbth_colax(*wcs, &alts, n, a); j = wcsbth_colax(*wcs, &alts, k, a); keytype = PIXLIST; BEGIN(VALUE); } YY_BREAK case 222: YY_RULE_SETUP #line 1720 "wcsbth.l" { BEGIN(DISCARD); } YY_BREAK case 223: #line 1725 "wcsbth.l" case 224: #line 1726 "wcsbth.l" case 225: YY_RULE_SETUP #line 1726 "wcsbth.l" { if (relax & WCSHDR_ALLIMG) { a = ' '; sscanf(wcsbthtext, "%d%c", &i, &a); if (relax & WCSHDR_strict) { errmsg = "the CROTAn keyword is deprecated, use PCi_ja"; BEGIN(ERROR); } else if (a == ' ' || relax & WCSHDR_CROTAia) { yyless(0); BEGIN(CCCCCia); } else if (relax & WCSHDR_reject) { errmsg = "CROTAn keyword may not have an alternate version code"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "deprecated image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 226: YY_RULE_SETUP #line 1760 "wcsbth.l" { if (relax & WCSHDR_ALLIMG) { yyless(0); BEGIN(CCCCCia); } else { /* Let it go. */ BEGIN(DISCARD); } } YY_BREAK case 227: #line 1771 "wcsbth.l" case 228: #line 1772 "wcsbth.l" case 229: #line 1773 "wcsbth.l" case 230: #line 1774 "wcsbth.l" case 231: #line 1775 "wcsbth.l" case 232: YY_RULE_SETUP #line 1775 "wcsbth.l" { WCSBTH_PUTBACK; BEGIN((YY_START == iCROTn) ? iCCCna : TCCCna); } YY_BREAK case 233: #line 1781 "wcsbth.l" case 234: #line 1782 "wcsbth.l" case 235: #line 1783 "wcsbth.l" case 236: YY_RULE_SETUP #line 1783 "wcsbth.l" { if (relax & WCSHDR_CROTAia) { WCSBTH_PUTBACK; BEGIN((YY_START == iCROTn) ? iCCCna : TCCCna); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "%s keyword may not have an alternate version code", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 237: #line 1801 "wcsbth.l" case 238: YY_RULE_SETUP #line 1801 "wcsbth.l" { BEGIN(DISCARD); } YY_BREAK case 239: #line 1806 "wcsbth.l" case 240: YY_RULE_SETUP #line 1806 "wcsbth.l" { /* Image-header keyword. */ if (relax & (WCSHDR_AUXIMG | WCSHDR_ALLIMG)) { if (YY_START == CCCCCCCa) { sscanf(wcsbthtext, "%c", &a); } else { a = 0; unput(wcsbthtext[0]); } keytype = IMGAUX; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 241: YY_RULE_SETUP #line 1830 "wcsbth.l" { if (relax & WCSHDR_reject) { /* Looks too much like a FITS WCS keyword not to flag it. */ errmsg = errtxt; sprintf(errmsg, "invalid alternate code, keyword resembles %s " "but isn't", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 242: #line 1845 "wcsbth.l" case 243: #line 1846 "wcsbth.l" case 244: #line 1847 "wcsbth.l" case 245: #line 1848 "wcsbth.l" case 246: YY_RULE_SETUP #line 1848 "wcsbth.l" { sscanf(wcsbthtext, "%d%c", &n, &a); keytype = BINTAB; BEGIN(VALUE); } YY_BREAK case 247: YY_RULE_SETUP #line 1854 "wcsbth.l" { sscanf(wcsbthtext, "%d", &n); a = ' '; keytype = BINTAB; BEGIN(VALUE); } YY_BREAK case 248: #line 1862 "wcsbth.l" case 249: YY_RULE_SETUP #line 1862 "wcsbth.l" { BEGIN(DISCARD); } YY_BREAK case 250: #line 1867 "wcsbth.l" case 251: #line 1868 "wcsbth.l" case 252: #line 1869 "wcsbth.l" case 253: #line 1870 "wcsbth.l" case 254: #line 1871 "wcsbth.l" case 255: #line 1872 "wcsbth.l" case 256: YY_RULE_SETUP #line 1872 "wcsbth.l" { sscanf(wcsbthtext, "%d", &n); a = 0; keytype = BINTAB; BEGIN(VALUE); } YY_BREAK case 257: #line 1880 "wcsbth.l" case 258: YY_RULE_SETUP #line 1880 "wcsbth.l" { BEGIN(DISCARD); } YY_BREAK case 259: #line 1885 "wcsbth.l" case 260: #line 1886 "wcsbth.l" case 261: #line 1887 "wcsbth.l" case 262: YY_RULE_SETUP #line 1887 "wcsbth.l" { /* Image-header keyword. */ if (relax & WCSHDR_ALLIMG) { sscanf(wcsbthtext, "%d_%d%c", &i, &m, &a); keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 263: #line 1907 "wcsbth.l" case 264: #line 1908 "wcsbth.l" case 265: #line 1909 "wcsbth.l" case 266: #line 1910 "wcsbth.l" case 267: #line 1911 "wcsbth.l" case 268: #line 1912 "wcsbth.l" case 269: #line 1913 "wcsbth.l" case 270: #line 1914 "wcsbth.l" case 271: #line 1915 "wcsbth.l" case 272: #line 1916 "wcsbth.l" case 273: #line 1917 "wcsbth.l" case 274: #line 1918 "wcsbth.l" case 275: #line 1919 "wcsbth.l" case 276: #line 1920 "wcsbth.l" case 277: #line 1921 "wcsbth.l" case 278: #line 1922 "wcsbth.l" case 279: #line 1923 "wcsbth.l" case 280: #line 1924 "wcsbth.l" case 281: #line 1925 "wcsbth.l" case 282: #line 1926 "wcsbth.l" case 283: YY_RULE_SETUP #line 1926 "wcsbth.l" { if (relax & WCSHDR_ALLIMG) { if (((valtype == FLOAT) && (relax & WCSHDR_PV0i_0ma)) || ((valtype == STRING) && (relax & WCSHDR_PS0i_0ma))) { sscanf(wcsbthtext, "%d_%d%c", &i, &m, &a); keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = "indices in parameterized keywords must not have " "leading zeroes"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 284: #line 1957 "wcsbth.l" case 285: #line 1958 "wcsbth.l" case 286: #line 1959 "wcsbth.l" case 287: #line 1960 "wcsbth.l" case 288: #line 1961 "wcsbth.l" case 289: #line 1962 "wcsbth.l" case 290: #line 1963 "wcsbth.l" case 291: #line 1964 "wcsbth.l" case 292: #line 1965 "wcsbth.l" case 293: YY_RULE_SETUP #line 1965 "wcsbth.l" { if (relax & WCSHDR_ALLIMG) { /* Anything that has fallen through to this point must contain */ /* an invalid parameter. */ errmsg = "axis number must exceed 0"; BEGIN(ERROR); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "invalid image-header keyword %s in binary table", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 294: #line 1985 "wcsbth.l" case 295: #line 1986 "wcsbth.l" case 296: #line 1987 "wcsbth.l" case 297: #line 1988 "wcsbth.l" case 298: #line 1989 "wcsbth.l" case 299: #line 1990 "wcsbth.l" case 300: #line 1991 "wcsbth.l" case 301: #line 1992 "wcsbth.l" case 302: #line 1993 "wcsbth.l" case 303: YY_RULE_SETUP #line 1993 "wcsbth.l" { errmsg = errtxt; sprintf(errmsg, "%s keyword must use an underscore, not a dash", keyname); BEGIN(ERROR); } YY_BREAK case 304: YY_RULE_SETUP #line 2000 "wcsbth.l" { BEGIN(DISCARD); } YY_BREAK case 305: #line 2005 "wcsbth.l" case 306: #line 2006 "wcsbth.l" case 307: #line 2007 "wcsbth.l" case 308: #line 2008 "wcsbth.l" case 309: #line 2009 "wcsbth.l" case 310: #line 2010 "wcsbth.l" case 311: #line 2011 "wcsbth.l" case 312: #line 2012 "wcsbth.l" case 313: #line 2013 "wcsbth.l" case 314: #line 2014 "wcsbth.l" case 315: #line 2015 "wcsbth.l" case 316: YY_RULE_SETUP #line 2015 "wcsbth.l" { if (relax & WCSHDR_LONGKEY) { WCSBTH_PUTBACK; BEGIN((YY_START == iCCn_ma) ? iCn_ma : TCn_ma); } else if (relax & WCSHDR_reject) { errmsg = errtxt; sprintf(errmsg, "the %s keyword is non-standard", keyname); BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 317: #line 2032 "wcsbth.l" case 318: YY_RULE_SETUP #line 2032 "wcsbth.l" { BEGIN(DISCARD); } YY_BREAK case 319: #line 2037 "wcsbth.l" case 320: #line 2038 "wcsbth.l" case 321: #line 2039 "wcsbth.l" case 322: #line 2040 "wcsbth.l" case 323: #line 2041 "wcsbth.l" case 324: #line 2042 "wcsbth.l" case 325: #line 2043 "wcsbth.l" case 326: #line 2044 "wcsbth.l" case 327: #line 2045 "wcsbth.l" case 328: #line 2046 "wcsbth.l" case 329: #line 2047 "wcsbth.l" case 330: YY_RULE_SETUP #line 2047 "wcsbth.l" { sscanf(wcsbthtext, "%d_%d%c", &n, &m, &a); if (YY_START == TCn_ma) i = wcsbth_colax(*wcs, &alts, n, a); keytype = (YY_START == iCn_ma) ? BIMGARR : PIXLIST; BEGIN(VALUE); } YY_BREAK case 331: #line 2055 "wcsbth.l" case 332: #line 2056 "wcsbth.l" case 333: #line 2057 "wcsbth.l" case 334: #line 2058 "wcsbth.l" case 335: #line 2059 "wcsbth.l" case 336: #line 2060 "wcsbth.l" case 337: #line 2061 "wcsbth.l" case 338: YY_RULE_SETUP #line 2061 "wcsbth.l" { /* Invalid combinations will be flagged by . */ sscanf(wcsbthtext, "%d_%d", &n, &m); a = ' '; if (YY_START == TCn_ma) i = wcsbth_colax(*wcs, &alts, n, a); keytype = (YY_START == iCn_ma) ? BIMGARR : PIXLIST; BEGIN(VALUE); } YY_BREAK case 339: #line 2071 "wcsbth.l" case 340: YY_RULE_SETUP #line 2071 "wcsbth.l" { BEGIN(DISCARD); } YY_BREAK case 341: YY_RULE_SETUP #line 2075 "wcsbth.l" { if (relax & WCSHDR_PROJPn) { sscanf(wcsbthtext, "%d", &m); i = 0; a = ' '; keytype = IMGAXIS; BEGIN(VALUE); } else if (relax & WCSHDR_reject) { errmsg = "the PROJPn keyword is deprecated, use PVi_ma"; BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } YY_BREAK case 342: #line 2094 "wcsbth.l" case 343: YY_RULE_SETUP #line 2094 "wcsbth.l" { if (relax & (WCSHDR_PROJPn | WCSHDR_reject)) { errmsg = "invalid PROJPn keyword"; BEGIN(ERROR); } else { BEGIN(DISCARD); } } YY_BREAK case 344: YY_RULE_SETUP #line 2104 "wcsbth.l" { BEGIN(DISCARD); } YY_BREAK case 345: YY_RULE_SETUP #line 2108 "wcsbth.l" { /* Do checks on i, j, m, n, k. */ if (!(keytype & keysel)) { /* Selection by keyword type. */ BEGIN(DISCARD); } else if (exclude[n] || exclude[k]) { /* One or other column is not selected. */ if (k && (exclude[n] != exclude[k])) { /* For keywords such as TCn_ka, both columns must be excluded. User error, so return immediately. */ wcsbthlex_destroy(); return 3; } else { BEGIN(DISCARD); } } else if (i > 99 || j > 99 || m > 99 || n > 999 || k > 999) { if (relax & WCSHDR_reject) { errmsg = errtxt; if (i > 99 || j > 99) { sprintf(errmsg, "axis number exceeds 99"); } else if (m > 99) { sprintf(errmsg, "parameter number exceeds 99"); } else if (n > 999 || k > 999) { sprintf(errmsg, "column number exceeds 999"); } BEGIN(ERROR); } else { /* Pretend we don't recognize it. */ BEGIN(DISCARD); } } else if (ipass == 2 && npass == 3 && (keytype & BINTAB)) { /* Skip keyvalues that won't be inherited. */ BEGIN(FLUSH); } else { if (ipass == 3 && (keytype & IMGHEAD)) { /* IMGHEAD keytypes are always dealt with on the second pass. */ /* However, they must be re-parsed in order to report errors. */ vptr = 0x0; } if (valtype == INTEGER) { BEGIN(INTEGER_VAL); } else if (valtype == FLOAT) { BEGIN(FLOAT_VAL); } else if (valtype == STRING) { BEGIN(STRING_VAL); } else { errmsg = errtxt; sprintf(errmsg, "internal parser ERROR, bad data type: %d", valtype); BEGIN(ERROR); } } } YY_BREAK case 346: YY_RULE_SETUP #line 2169 "wcsbth.l" { errmsg = "invalid KEYWORD = VALUE syntax"; BEGIN(ERROR); } YY_BREAK case 347: YY_RULE_SETUP #line 2174 "wcsbth.l" { if (ipass == 1) { BEGIN(COMMENT); } else { /* Read the keyvalue. */ sscanf(wcsbthtext, "%d", &inttmp); BEGIN(COMMENT); } } YY_BREAK case 348: YY_RULE_SETUP #line 2186 "wcsbth.l" { errmsg = "an integer value was expected"; BEGIN(ERROR); } YY_BREAK case 349: YY_RULE_SETUP #line 2191 "wcsbth.l" { if (ipass == 1) { BEGIN(COMMENT); } else { /* Read the keyvalue. */ wcsutil_str2double(wcsbthtext, "%lf", &dbltmp); BEGIN(COMMENT); } } YY_BREAK case 350: YY_RULE_SETUP #line 2203 "wcsbth.l" { errmsg = "a floating-point value was expected"; BEGIN(ERROR); } YY_BREAK case 351: /* rule 351 can match eol */ YY_RULE_SETUP #line 2208 "wcsbth.l" { if (ipass == 1) { BEGIN(COMMENT); } else { /* Read the keyvalue. */ strcpy(strtmp, wcsbthtext+1); /* Squeeze out repeated quotes. */ ix = 0; for (jx = 0; jx < 72; jx++) { if (ix < jx) { strtmp[ix] = strtmp[jx]; } if (strtmp[jx] == '\0') { if (ix) strtmp[ix-1] = '\0'; break; } else if (strtmp[jx] == '\'' && strtmp[jx+1] == '\'') { jx++; } ix++; } BEGIN(COMMENT); } } YY_BREAK case 352: YY_RULE_SETUP #line 2237 "wcsbth.l" { errmsg = "a string value was expected"; BEGIN(ERROR); } YY_BREAK case 353: *yy_cp = (yy_hold_char); /* undo effects of setting up wcsbthtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcsbthtext again */ YY_RULE_SETUP #line 2242 "wcsbth.l" { if (ipass == 1) { /* Do first-pass bookkeeping. */ wcsbth_pass1(keytype, i, j, n, k, a, ptype, &alts); BEGIN(FLUSH); } else if (*wcs) { /* Store the value now that the keyrecord has been validated. */ alts.icol = 0; alts.ialt = 0; /* Update each coordinate representation. */ gotone = 0; while ((wcsp = wcsbth_idx(*wcs, &alts, keytype, n, a))) { gotone = 1; if (vptr) { voff = (char *)vptr - (char *)(&wcstem); wptr = (void *)((char *)wcsp + voff); if (valtype == INTEGER) { *((int *)wptr) = inttmp; } else if (valtype == FLOAT) { /* Apply keyword parameterization. */ if (ptype == 'v') { ipx = (wcsp->npv)++; wcsp->pv[ipx].i = i; wcsp->pv[ipx].m = m; wptr = &(wcsp->pv[ipx].value); } else if (j) { wptr = *((double **)wptr) + (i - 1)*(wcsp->naxis) + (j - 1); } else if (i) { wptr = *((double **)wptr) + (i - 1); } if (special) { special(wptr, dbltmp); } else { *((double *)wptr) = dbltmp; } /* Flag the presence of PCi_ja, or CDi_ja and/or CROTAia. */ if (altlin) { wcsp->altlin |= altlin; altlin = 0; } } else if (valtype == STRING) { /* Apply keyword parameterization. */ if (ptype == 's') { ipx = wcsp->nps++; wcsp->ps[ipx].i = i; wcsp->ps[ipx].m = m; wptr = wcsp->ps[ipx].value; } else if (j) { wptr = *((char (**)[72])wptr) + (i - 1)*(wcsp->naxis) + (j - 1); } else if (i) { wptr = *((char (**)[72])wptr) + (i - 1); } cptr = (char *)wptr; strcpy(cptr, strtmp); } } } if (ipass == npass) { if (gotone) { nvalid++; if (ctrl == 4) { wcsfprintf(stderr, "%.80s\n Accepted (%d) as a valid WCS keyrecord.\n", keyrec, nvalid); } BEGIN(FLUSH); } else { errmsg = "syntactically valid WCS keyrecord has no effect"; BEGIN(ERROR); } } else { BEGIN(FLUSH); } } else { BEGIN(FLUSH); } } YY_BREAK case 354: *yy_cp = (yy_hold_char); /* undo effects of setting up wcsbthtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcsbthtext again */ YY_RULE_SETUP #line 2340 "wcsbth.l" { errmsg = "invalid keyvalue"; BEGIN(ERROR); } YY_BREAK case 355: *yy_cp = (yy_hold_char); /* undo effects of setting up wcsbthtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcsbthtext again */ YY_RULE_SETUP #line 2345 "wcsbth.l" { errmsg = "invalid keyvalue"; BEGIN(ERROR); } YY_BREAK case 356: *yy_cp = (yy_hold_char); /* undo effects of setting up wcsbthtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcsbthtext again */ YY_RULE_SETUP #line 2350 "wcsbth.l" { errmsg = "invalid keyvalue or malformed keycomment"; BEGIN(ERROR); } YY_BREAK case 357: *yy_cp = (yy_hold_char); /* undo effects of setting up wcsbthtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcsbthtext again */ YY_RULE_SETUP #line 2355 "wcsbth.l" { errmsg = "malformed keycomment"; BEGIN(ERROR); } YY_BREAK case 358: *yy_cp = (yy_hold_char); /* undo effects of setting up wcsbthtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcsbthtext again */ YY_RULE_SETUP #line 2360 "wcsbth.l" { if (ipass == npass) { if (ctrl < 0) { /* Preserve discards. */ keep = keyrec; } else if (2 < ctrl) { nother++; wcsfprintf(stderr, "%.80s\n Not a recognized WCS keyword.\n", keyrec); } } BEGIN(FLUSH); } YY_BREAK case 359: *yy_cp = (yy_hold_char); /* undo effects of setting up wcsbthtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up wcsbthtext again */ YY_RULE_SETUP #line 2375 "wcsbth.l" { if (ipass == npass) { (*nreject)++; if (ctrl%10 == -1) { keep = keyrec; } if (1 < abs(ctrl%10)) { wcsfprintf(stderr, "%.80s\n Rejected (%d), %s.\n", keyrec, *nreject, errmsg); } } BEGIN(FLUSH); } YY_BREAK case 360: /* rule 360 can match eol */ YY_RULE_SETUP #line 2391 "wcsbth.l" { if (ipass == npass && keep) { if (hptr < keep) { strncpy(hptr, keep, 80); } hptr += 80; } /* Throw away the rest of the line and reset for the next one. */ i = j = 0; n = k = 0; m = 0; a = ' '; keyrec += 80; keytype = 0; valtype = -1; vptr = 0x0; keep = 0x0; altlin = 0; ptype = ' '; special = 0x0; BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(CCCCCia): case YY_STATE_EOF(iCCCna): case YY_STATE_EOF(iCCCCn): case YY_STATE_EOF(TCCCna): case YY_STATE_EOF(TCCCCn): case YY_STATE_EOF(CCi_ja): case YY_STATE_EOF(ijCCna): case YY_STATE_EOF(TCn_ka): case YY_STATE_EOF(TCCn_ka): case YY_STATE_EOF(CROTAi): case YY_STATE_EOF(iCROTn): case YY_STATE_EOF(TCROTn): case YY_STATE_EOF(CCi_ma): case YY_STATE_EOF(iCn_ma): case YY_STATE_EOF(iCCn_ma): case YY_STATE_EOF(TCn_ma): case YY_STATE_EOF(TCCn_ma): case YY_STATE_EOF(PROJPm): case YY_STATE_EOF(CCCCCCCC): case YY_STATE_EOF(CCCCCCCa): case YY_STATE_EOF(CCCCna): case YY_STATE_EOF(CCCCCna): case YY_STATE_EOF(CCCCn): case YY_STATE_EOF(CCCCCn): case YY_STATE_EOF(VALUE): case YY_STATE_EOF(INTEGER_VAL): case YY_STATE_EOF(FLOAT_VAL): case YY_STATE_EOF(STRING_VAL): case YY_STATE_EOF(COMMENT): case YY_STATE_EOF(DISCARD): case YY_STATE_EOF(ERROR): case YY_STATE_EOF(FLUSH): #line 2419 "wcsbth.l" { /* End-of-input. */ if (ipass == 1) { if ((status = wcsbth_init1(&alts, nwcs, wcs)) || (*nwcs == 0 && ctrl == 0)) { wcsbthlex_destroy(); return status; } if (2 < abs(ctrl%10)) { if (*nwcs == 1) { if (strcmp(wcs[0]->wcsname, "DEFAULTS") != 0) { wcsfprintf(stderr, "Found one coordinate representation.\n"); } } else { wcsfprintf(stderr, "Found %d coordinate representations.\n", *nwcs); } } if (alts.imgherit) npass = 3; } if (ipass++ < npass) { wcsbth_hdr = header; wcsbth_nkeyrec = nkeyrec; keyrec = header; *nreject = 0; i = j = 0; k = n = 0; m = 0; a = ' '; keytype = 0; valtype = -1; vptr = 0x0; altlin = 0; ptype = ' '; special = 0x0; wcsbthrestart(wcsbthin); } else { wcsbthlex_destroy(); if (ctrl < 0) { *hptr = '\0'; } else if (ctrl == 1) { wcsfprintf(stderr, "%d WCS keyrecord%s rejected.\n", *nreject, (*nreject==1)?" was":"s were"); } else if (ctrl == 4) { wcsfprintf(stderr, "\n"); wcsfprintf(stderr, "%5d keyrecord%s rejected for syntax or " "other errors,\n", *nreject, (*nreject==1)?" was":"s were"); wcsfprintf(stderr, "%5d %s recognized as syntactically valid, " "and\n", nvalid, (nvalid==1)?"was":"were"); wcsfprintf(stderr, "%5d other%s were not recognized as WCS " "keyrecords.\n", nother, (nother==1)?"":"s"); } return wcsbth_final(&alts, nwcs, wcs); } } YY_BREAK case 361: YY_RULE_SETUP #line 2485 "wcsbth.l" ECHO; YY_BREAK #line 24118 "wcsbth.c" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed wcsbthin at a new source and called * wcsbthlex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = wcsbthin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( wcsbthwrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * wcsbthtext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ } /* end of wcsbthlex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ wcsbthrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; wcsbthrestart(wcsbthin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) wcsbthrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { if ( *yy_cp ) { yy_current_state = yy_nxt[yy_current_state][YY_SC_TO_UI(*yy_cp)]; } else yy_current_state = yy_NUL_trans[yy_current_state]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); yy_current_state = yy_NUL_trans[yy_current_state]; yy_is_jam = (yy_current_state == 0); if ( ! yy_is_jam ) { if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } } return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up wcsbthtext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register yy_size_t number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ wcsbthrestart(wcsbthin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( wcsbthwrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve wcsbthtext */ (yy_hold_char) = *++(yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void wcsbthrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ wcsbthensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = wcsbth_create_buffer(wcsbthin,YY_BUF_SIZE ); } wcsbth_init_buffer(YY_CURRENT_BUFFER,input_file ); wcsbth_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void wcsbth_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * wcsbthpop_buffer_state(); * wcsbthpush_buffer_state(new_buffer); */ wcsbthensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; wcsbth_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (wcsbthwrap()) processing, but the only time this flag * is looked at is after wcsbthwrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void wcsbth_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; wcsbthin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE wcsbth_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) wcsbthalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in wcsbth_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) wcsbthalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in wcsbth_create_buffer()" ); b->yy_is_our_buffer = 1; wcsbth_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with wcsbth_create_buffer() * */ void wcsbth_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) wcsbthfree((void *) b->yy_ch_buf ); wcsbthfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a wcsbthrestart() or at EOF. */ static void wcsbth_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; wcsbth_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then wcsbth_init_buffer was _probably_ * called from wcsbthrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void wcsbth_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) wcsbth_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void wcsbthpush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; wcsbthensure_buffer_stack(); /* This block is copied from wcsbth_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from wcsbth_switch_to_buffer. */ wcsbth_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void wcsbthpop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; wcsbth_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { wcsbth_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void wcsbthensure_buffer_stack (void) { yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)wcsbthalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in wcsbthensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)wcsbthrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in wcsbthensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE wcsbth_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) wcsbthalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in wcsbth_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; wcsbth_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to wcsbthlex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * wcsbth_scan_bytes() instead. */ YY_BUFFER_STATE wcsbth_scan_string (yyconst char * yystr ) { return wcsbth_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to wcsbthlex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE wcsbth_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) wcsbthalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in wcsbth_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = wcsbth_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in wcsbth_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up wcsbthtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ wcsbthtext[wcsbthleng] = (yy_hold_char); \ (yy_c_buf_p) = wcsbthtext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ wcsbthleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int wcsbthget_lineno (void) { return wcsbthlineno; } /** Get the input stream. * */ FILE *wcsbthget_in (void) { return wcsbthin; } /** Get the output stream. * */ FILE *wcsbthget_out (void) { return wcsbthout; } /** Get the length of the current token. * */ yy_size_t wcsbthget_leng (void) { return wcsbthleng; } /** Get the current token. * */ char *wcsbthget_text (void) { return wcsbthtext; } /** Set the current line number. * @param line_number * */ void wcsbthset_lineno (int line_number ) { wcsbthlineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see wcsbth_switch_to_buffer */ void wcsbthset_in (FILE * in_str ) { wcsbthin = in_str ; } void wcsbthset_out (FILE * out_str ) { wcsbthout = out_str ; } int wcsbthget_debug (void) { return wcsbth_flex_debug; } void wcsbthset_debug (int bdebug ) { wcsbth_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from wcsbthlex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT wcsbthin = stdin; wcsbthout = stdout; #else wcsbthin = (FILE *) 0; wcsbthout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * wcsbthlex_init() */ return 0; } /* wcsbthlex_destroy is for both reentrant and non-reentrant scanners. */ int wcsbthlex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ wcsbth_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; wcsbthpop_buffer_state(); } /* Destroy the stack itself. */ wcsbthfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * wcsbthlex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *wcsbthalloc (yy_size_t size ) { return (void *) malloc( size ); } void *wcsbthrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void wcsbthfree (void * ptr ) { free( (char *) ptr ); /* see wcsbthrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 2484 "wcsbth.l" /*---------------------------------------------------------------------------- * Perform first-pass tasks: * * 1) Count the number of coordinate axes in each of the 27 possible alternate * image-header coordinate representations. Also count the number of PVi_ma * and PSi_ma keywords in each representation. * * 2) Determine the number of binary table columns that have an image array * with a coordinate representation (up to 999), and count the number of * coordinate axes in each of the 27 possible alternates. Also count the * number of iVn_ma and iSn_ma keywords in each representation. * * 3) Determine the number of alternate pixel list coordinate representations * (up to 27) and the table columns associated with each. Also count the * number of TVn_ma and TSn_ma keywords in each representation. * * In the first pass alts->arridx[icol][27] is used to determine the number of * axes in each of 27 possible image-header coordinate descriptions (icol == 0) * and each of the 27 possible coordinate representations for an image array in * each column. * * The elements of alts->pixlist[icol] are used as bit arrays to flag which of * the 27 possible pixel list coordinate representations are associated with * each table column. *---------------------------------------------------------------------------*/ int wcsbth_pass1( int keytype, int i, int j, int n, int k, char a, char ptype, struct wcsbth_alts *alts) { int ialt, icol, mask, ncol; if (a == 0) { /* Keywords such as DATE-OBS go along for the ride. */ return 0; } ncol = alts->ncol; /* Do we need to allocate memory for alts? */ if (alts->arridx == 0x0) { if (ncol == 0) { /* Can only happen if TFIELDS is missing or out-of-sequence. If n and k are both zero then we may be processing an image header so leave ncol alone - the array will be realloc'd later if required. */ if (n || k) { /* The header is mangled, assume the worst. */ ncol = 999; } } if (!(alts->arridx = calloc((1 + ncol)*27, sizeof(short int))) || !(alts->npv = calloc((1 + ncol)*27, sizeof(unsigned char))) || !(alts->nps = calloc((1 + ncol)*27, sizeof(unsigned char))) || !(alts->pixlist = calloc((1 + ncol), sizeof(unsigned int)))) { if (alts->arridx) free(alts->arridx); if (alts->npv) free(alts->npv); if (alts->nps) free(alts->nps); if (alts->pixlist) free(alts->pixlist); return 2; } alts->ncol = ncol; } else if (n > ncol || k > ncol) { /* Can only happen if TFIELDS or the WCS keyword is wrong; carry on. */ ncol = 999; if (!(alts->arridx = realloc(alts->arridx, 27*(1 + ncol)*sizeof(short int))) || !(alts->npv = realloc(alts->npv, 27*(1 + ncol)*sizeof(unsigned char))) || !(alts->nps = realloc(alts->nps, 27*(1 + ncol)*sizeof(unsigned char))) || !(alts->pixlist = realloc(alts->pixlist, (1 + ncol)*sizeof(unsigned int)))) { if (alts->arridx) free(alts->arridx); if (alts->npv) free(alts->npv); if (alts->nps) free(alts->nps); if (alts->pixlist) free(alts->pixlist); return 2; } /* Since realloc() doesn't initialize the extra memory. */ for (icol = (1 + alts->ncol); icol < (1 + ncol); icol++) { for (ialt = 0; ialt < 27; ialt++) { alts->arridx[icol][ialt] = 0; alts->npv[icol][ialt] = 0; alts->nps[icol][ialt] = 0; alts->pixlist[icol] = 0; } } alts->ncol = ncol; } ialt = 0; if (a != ' ') { ialt = a - 'A' + 1; } /* A BINTAB keytype such as LONPna, in conjunction with an IMGAXIS keytype causes a table column to be recognized as an image array. */ if (keytype & IMGHEAD || keytype & BIMGARR) { /* n == 0 is expected for IMGHEAD keywords. */ if (i == 0 && j == 0) { if (alts->arridx[n][ialt] == 0) { /* Flag that an auxiliary keyword was seen. */ alts->arridx[n][ialt] = -1; } } else { /* Record the maximum axis number found. */ if (alts->arridx[n][ialt] < i) { alts->arridx[n][ialt] = i; } if (alts->arridx[n][ialt] < j) { alts->arridx[n][ialt] = j; } } if (ptype == 'v') { alts->npv[n][ialt]++; } else if (ptype == 's') { alts->nps[n][ialt]++; } } /* BINTAB keytypes, which apply both to pixel lists as well as binary table image arrays, never contribute to recognizing a table column as a pixel list axis. A PIXLIST keytype is required for that. */ if (keytype == PIXLIST) { mask = 1 << ialt; /* n > 0 for PIXLIST keytypes. */ alts->pixlist[n] |= mask; if (k) alts->pixlist[k] |= mask; /* Used as a flag over all columns. */ alts->pixlist[0] |= mask; if (ptype == 'v') { alts->pixnpv[ialt]++; } else if (ptype == 's') { alts->pixnps[ialt]++; } } return 0; } /*---------------------------------------------------------------------------- * Perform initializations at the end of the first pass: * * 1) Determine the required number of wcsprm structs, allocate memory for * an array of them and initialize each one. *---------------------------------------------------------------------------*/ int wcsbth_init1( struct wcsbth_alts *alts, int *nwcs, struct wcsprm **wcs) { int ialt, icol, inherit[27], ix, mask, ncol, npsmax, npvmax, status = 0; struct wcsprm *wcsp; if (alts->arridx == 0x0) { *nwcs = 0; return 0; } /* Determine the number of axes in each pixel list representation. */ ncol = alts->ncol; for (ialt = 0, mask = 1; ialt < 27; ialt++, mask <<= 1) { alts->pixidx[ialt] = 0; if (alts->pixlist[0] | mask) { for (icol = 1; icol <= ncol; icol++) { if (alts->pixlist[icol] & mask) { alts->pixidx[ialt]++; } } } } /* Find the total number of coordinate representations. */ *nwcs = 0; alts->imgherit = 0; for (ialt = 0; ialt < 27; ialt++) { inherit[ialt] = 0; for (icol = 1; icol <= ncol; icol++) { if (alts->arridx[icol][ialt] < 0) { /* No BIMGARR keytype but there's at least one BINTAB. */ if (alts->arridx[0][ialt] > 0) { /* There is an IMGAXIS keytype that we will inherit, so count this representation. */ alts->arridx[icol][ialt] = alts->arridx[0][ialt]; } else { alts->arridx[icol][ialt] = 0; } } if (alts->arridx[icol][ialt]) { if (alts->arridx[0][ialt]) { /* All IMGHEAD keywords are inherited for this ialt. */ inherit[ialt] = 1; if (alts->arridx[icol][ialt] < alts->arridx[0][ialt]) { /* The extra axes are also inherited. */ alts->arridx[icol][ialt] = alts->arridx[0][ialt]; } } (*nwcs)++; } } /* Count every "a" found in any IMGHEAD keyword... */ if (alts->arridx[0][ialt]) { if (inherit[ialt]) { /* ...but not if the IMGHEAD keywords will be inherited. */ alts->arridx[0][ialt] = 0; alts->imgherit = 1; } else if (alts->arridx[0][ialt] > 0) { (*nwcs)++; } } /* We need a struct for every "a" found in a PIXLIST keyword. */ if (alts->pixidx[ialt]) { (*nwcs)++; } } if (*nwcs) { /* Allocate memory for the required number of wcsprm structs. */ if (!(*wcs = calloc(*nwcs, sizeof(struct wcsprm)))) { return 2; } /* Record the current values of NPVMAX and NPSMAX. */ npvmax = wcsnpv(-1); npsmax = wcsnps(-1); /* Initialize each wcsprm struct. */ wcsp = *wcs; *nwcs = 0; for (icol = 0; icol <= ncol; icol++) { for (ialt = 0; ialt < 27; ialt++) { if (alts->arridx[icol][ialt] > 0) { /* Image-header representations that are not for inheritance (icol == 0) or binary table image array representations. */ wcsp->flag = -1; wcsnpv(alts->npv[icol][ialt]); wcsnps(alts->nps[icol][ialt]); if ((status = wcsini(1, (int)(alts->arridx[icol][ialt]), wcsp))) { wcsvfree(nwcs, wcs); break; } /* Record the alternate version code. */ if (ialt) { wcsp->alt[0] = 'A' + ialt - 1; } /* Record the table column number. */ wcsp->colnum = icol; /* On the second pass alts->arridx[icol][27] indexes the array of wcsprm structs. */ alts->arridx[icol][ialt] = (*nwcs)++; wcsp++; } else { /* Signal that this column has no WCS for this "a". */ alts->arridx[icol][ialt] = -1; } } } for (ialt = 0; ialt < 27; ialt++) { if (alts->pixidx[ialt]) { /* Pixel lists representations. */ wcsp->flag = -1; wcsnpv(alts->pixnpv[ialt]); wcsnps(alts->pixnps[ialt]); if ((status = wcsini(1, (int)(alts->pixidx[ialt]), wcsp))) { wcsvfree(nwcs, wcs); break; } /* Record the alternate version code. */ if (ialt) { wcsp->alt[0] = 'A' + ialt - 1; } /* Record the pixel list column numbers. */ mask = (1 << ialt); for (icol = 1, ix = 0; icol <= ncol; icol++) { if (alts->pixlist[icol] & mask) { wcsp->colax[ix++] = icol; } } /* alts->pixidx[] indexes the array of wcsprm structs. */ alts->pixidx[ialt] = (*nwcs)++; wcsp++; } else { /* Signal that this column is not a pixel list axis for this "a". */ alts->pixidx[ialt] = -1; } } /* Restore the original values of NPVMAX and NPSMAX. */ wcsnpv(npvmax); wcsnps(npsmax); } return status; } /*---------------------------------------------------------------------------- * Return a pointer to the next wcsprm struct for a particular column number * and alternate. *---------------------------------------------------------------------------*/ struct wcsprm *wcsbth_idx( struct wcsprm *wcs, struct wcsbth_alts *alts, int keytype, int n, char a) { const char as[] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int iwcs; if (!wcs) return 0x0; iwcs = -1; for (; iwcs < 0 && alts->ialt < 27; alts->ialt++) { /* Note that a == 0 applies to every alternate, otherwise this loop simply determines the appropriate value of alts->ialt. */ if (a && a != as[alts->ialt]) continue; if (keytype & (IMGHEAD | BIMGARR)) { for (; iwcs < 0 && alts->icol <= alts->ncol; alts->icol++) { /* Image header keywords, n == 0, apply to all columns, otherwise this loop simply determines the appropriate value of alts->icol. */ if (n && n != alts->icol) continue; iwcs = alts->arridx[alts->icol][alts->ialt]; } /* Break out of the loop to stop alts->ialt from being incremented. */ if (iwcs >= 0) break; /* Start from scratch for the next alts->ialt. */ alts->icol = 0; } if (keytype & (IMGAUX | PIXLIST)) { iwcs = alts->pixidx[alts->ialt]; } } return (iwcs >= 0) ? (wcs + iwcs) : 0x0; } /*---------------------------------------------------------------------------- * Return the axis number associated with the specified column number in a * particular pixel list coordinate representation. *---------------------------------------------------------------------------*/ int wcsbth_colax( struct wcsprm *wcs, struct wcsbth_alts *alts, int n, char a) { int ix; struct wcsprm *wcsp; if (!wcs) return 0; wcsp = wcs; if (a != ' ') { wcsp += alts->pixidx[a-'A'+1]; } for (ix = 0; ix < wcsp->naxis; ix++) { if (wcsp->colax[ix] == n) { return ++ix; } } return 0; } /*---------------------------------------------------------------------------- * Interpret EPOCHa keywords. *---------------------------------------------------------------------------*/ int wcsbth_epoch(double *equinox, double epoch) { /* If EQUINOXa is currently undefined then set it from EPOCHa. */ if (undefined(*equinox)) { *equinox = epoch; } return 0; } /*---------------------------------------------------------------------------- * Interpret VSOURCEa keywords. *---------------------------------------------------------------------------*/ int wcsbth_vsource(double *zsource, double vsource) { double beta, c = 299792458.0; /* If ZSOURCEa is currently undefined then set it from VSOURCEa. */ if (undefined(*zsource)) { /* Convert relativistic Doppler velocity to redshift. */ beta = vsource/c; *zsource = (1.0 + beta)/sqrt(1.0 - beta*beta) - 1.0; } return 0; } /*---------------------------------------------------------------------------- * Tie up loose ends. *---------------------------------------------------------------------------*/ int wcsbth_final( struct wcsbth_alts *alts, int *nwcs, struct wcsprm **wcs) { int ialt, status; if (alts->arridx) free(alts->arridx); if (alts->npv) free(alts->npv); if (alts->nps) free(alts->nps); if (alts->pixlist) free(alts->pixlist); for (ialt = 0; ialt < *nwcs; ialt++) { /* Interpret -TAB header keywords. */ if ((status = wcstab(*wcs+ialt))) { wcsvfree(nwcs, wcs); return status; } } return 0; } astropy-1.1.1/cextern/wcslib/C/prj.h0000644001134200020070000007541712644017723020224 0ustar embrayscience00000000000000/*============================================================================ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: prj.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $ *============================================================================= * * WCSLIB 5.10 - C routines that implement the FITS World Coordinate System * (WCS) standard. Refer to the README file provided with WCSLIB for an * overview of the library. * * * Summary of the prj routines * --------------------------- * Routines in this suite implement the spherical map projections defined by * the FITS World Coordinate System (WCS) standard, as described in * = "Representations of world coordinates in FITS", = Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I) = = "Representations of celestial coordinates in FITS", = Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (WCS Paper II) = = "Mapping on the HEALPix grid", = Calabretta, M.R., & Roukema, B.F. 2007, MNRAS, 381, 865 (WCS Paper V) = = "Representing the 'Butterfly' Projection in FITS -- Projection Code XPH", = Calabretta, M.R., & Lowe, S.R. 2013, PASA, 30, e050 (WCS Paper VI) * * These routines are based on the prjprm struct which contains all information * needed for the computations. The struct contains some members that must be * set by the user, and others that are maintained by these routines, somewhat * like a C++ class but with no encapsulation. * * Routine prjini() is provided to initialize the prjprm struct with default * values, prjfree() reclaims any memory that may have been allocated to store * an error message, and prjprt() prints its contents. * * prjperr() prints the error message(s) (if any) stored in a prjprm struct. * prjbchk() performs bounds checking on native spherical coordinates. * * Setup routines for each projection with names of the form ???set(), where * "???" is the down-cased three-letter projection code, compute intermediate * values in the prjprm struct from parameters in it that were supplied by the * user. The struct always needs to be set by the projection's setup routine * but that need not be called explicitly - refer to the explanation of * prjprm::flag. * * Each map projection is implemented via separate functions for the spherical * projection, ???s2x(), and deprojection, ???x2s(). * * A set of driver routines, prjset(), prjx2s(), and prjs2x(), provides a * generic interface to the specific projection routines which they invoke * via pointers-to-functions stored in the prjprm struct. * * In summary, the routines are: * - prjini() Initialization routine for the prjprm struct. * - prjfree() Reclaim memory allocated for error messages. * - prjprt() Print the prjprm struct. * - prjperr() Print error message (if any). * - prjbchk() Bounds checking on native coordinates. * * - prjset(), prjx2s(), prjs2x(): Generic driver routines * * - azpset(), azpx2s(), azps2x(): AZP (zenithal/azimuthal perspective) * - szpset(), szpx2s(), szps2x(): SZP (slant zenithal perspective) * - tanset(), tanx2s(), tans2x(): TAN (gnomonic) * - stgset(), stgx2s(), stgs2x(): STG (stereographic) * - sinset(), sinx2s(), sins2x(): SIN (orthographic/synthesis) * - arcset(), arcx2s(), arcs2x(): ARC (zenithal/azimuthal equidistant) * - zpnset(), zpnx2s(), zpns2x(): ZPN (zenithal/azimuthal polynomial) * - zeaset(), zeax2s(), zeas2x(): ZEA (zenithal/azimuthal equal area) * - airset(), airx2s(), airs2x(): AIR (Airy) * - cypset(), cypx2s(), cyps2x(): CYP (cylindrical perspective) * - ceaset(), ceax2s(), ceas2x(): CEA (cylindrical equal area) * - carset(), carx2s(), cars2x(): CAR (Plate carree) * - merset(), merx2s(), mers2x(): MER (Mercator) * - sflset(), sflx2s(), sfls2x(): SFL (Sanson-Flamsteed) * - parset(), parx2s(), pars2x(): PAR (parabolic) * - molset(), molx2s(), mols2x(): MOL (Mollweide) * - aitset(), aitx2s(), aits2x(): AIT (Hammer-Aitoff) * - copset(), copx2s(), cops2x(): COP (conic perspective) * - coeset(), coex2s(), coes2x(): COE (conic equal area) * - codset(), codx2s(), cods2x(): COD (conic equidistant) * - cooset(), coox2s(), coos2x(): COO (conic orthomorphic) * - bonset(), bonx2s(), bons2x(): BON (Bonne) * - pcoset(), pcox2s(), pcos2x(): PCO (polyconic) * - tscset(), tscx2s(), tscs2x(): TSC (tangential spherical cube) * - cscset(), cscx2s(), cscs2x(): CSC (COBE spherical cube) * - qscset(), qscx2s(), qscs2x(): QSC (quadrilateralized spherical cube) * - hpxset(), hpxx2s(), hpxs2x(): HPX (HEALPix) * - xphset(), xphx2s(), xphs2x(): XPH (HEALPix polar, aka "butterfly") * * Argument checking (projection routines): * ---------------------------------------- * The values of phi and theta (the native longitude and latitude) normally lie * in the range [-180,180] for phi, and [-90,90] for theta. However, all * projection routines will accept any value of phi and will not normalize it. * * The projection routines do not explicitly check that theta lies within the * range [-90,90]. They do check for any value of theta that produces an * invalid argument to the projection equations (e.g. leading to division by * zero). The projection routines for AZP, SZP, TAN, SIN, ZPN, and COP also * return error 2 if (phi,theta) corresponds to the overlapped (far) side of * the projection but also return the corresponding value of (x,y). This * strict bounds checking may be relaxed at any time by setting * prjprm::bounds%2 to 0 (rather than 1); the projections need not be * reinitialized. * * Argument checking (deprojection routines): * ------------------------------------------ * Error checking on the projected coordinates (x,y) is limited to that * required to ascertain whether a solution exists. Where a solution does * exist, an optional check is made that the value of phi and theta obtained * lie within the ranges [-180,180] for phi, and [-90,90] for theta. This * check, performed by prjbchk(), is enabled by default. It may be disabled by * setting prjprm::bounds%4 to 0 (rather than 1); the projections need not be * reinitialized. * * Accuracy: * --------- * No warranty is given for the accuracy of these routines (refer to the * copyright notice); intending users must satisfy for themselves their * adequacy for the intended purpose. However, closure to a precision of at * least 1E-10 degree of longitude and latitude has been verified for typical * projection parameters on the 1 degree graticule of native longitude and * latitude (to within 5 degrees of any latitude where the projection may * diverge). Refer to the tprj1.c and tprj2.c test routines that accompany * this software. * * * prjini() - Default constructor for the prjprm struct * ---------------------------------------------------- * prjini() sets all members of a prjprm struct to default values. It should * be used to initialize every prjprm struct. * * Returned: * prj struct prjprm* * Projection parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null prjprm pointer passed. * * * prjfree() - Destructor for the prjprm struct * -------------------------------------------- * prjfree() frees any memory that may have been allocated to store an error * message in the prjprm struct. * * Given: * prj struct prjprm* * Projection parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null prjprm pointer passed. * * * prjprt() - Print routine for the prjprm struct * ---------------------------------------------- * prjprt() prints the contents of a prjprm struct using wcsprintf(). Mainly * intended for diagnostic purposes. * * Given: * prj const struct prjprm* * Projection parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null prjprm pointer passed. * * * prjperr() - Print error messages from a prjprm struct * ----------------------------------------------------- * prjperr() prints the error message(s) (if any) stored in a prjprm struct. * If there are no errors then nothing is printed. It uses wcserr_prt(), q.v. * * Given: * prj const struct prjprm* * Projection parameters. * * prefix const char * * If non-NULL, each output line will be prefixed with * this string. * * Function return value: * int Status return value: * 0: Success. * 1: Null prjprm pointer passed. * * * prjbchk() - Bounds checking on native coordinates * ------------------------------------------------- * prjbchk() performs bounds checking on native spherical coordinates. As * returned by the deprojection (x2s) routines, native longitude is expected * to lie in the closed interval [-180,180], with latitude in [-90,90]. * * A tolerance may be specified to provide a small allowance for numerical * imprecision. Values that lie outside the allowed range by not more than * the specified tolerance will be adjusted back into range. * * If prjprm::bounds&4 is set, as it is by prjini(), then prjbchk() will be * invoked automatically by the Cartesian-to-spherical deprojection (x2s) * routines with an appropriate tolerance set for each projection. * * Given: * tol double Tolerance for the bounds check [deg]. * * nphi, * ntheta int Vector lengths. * * spt int Vector stride. * * Given and returned: * phi,theta double[] Native longitude and latitude (phi,theta) [deg]. * * Returned: * stat int[] Status value for each vector element: * 0: Valid value of (phi,theta). * 1: Invalid value. * * Function return value: * int Status return value: * 0: Success. * 1: One or more of the (phi,theta) coordinates * were, invalid, as indicated by the stat vector. * * * prjset() - Generic setup routine for the prjprm struct * ------------------------------------------------------ * prjset() sets up a prjprm struct according to information supplied within * it. * * Note that this routine need not be called directly; it will be invoked by * prjx2s() and prjs2x() if prj.flag is anything other than a predefined magic * value. * * The one important distinction between prjset() and the setup routines for * the specific projections is that the projection code must be defined in the * prjprm struct in order for prjset() to identify the required projection. * Once prjset() has initialized the prjprm struct, prjx2s() and prjs2x() use * the pointers to the specific projection and deprojection routines contained * therein. * * Given and returned: * prj struct prjprm* * Projection parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null prjprm pointer passed. * 2: Invalid projection parameters. * * For returns > 1, a detailed error message is set in * prjprm::err if enabled, see wcserr_enable(). * * * prjx2s() - Generic Cartesian-to-spherical deprojection * ------------------------------------------------------ * Deproject Cartesian (x,y) coordinates in the plane of projection to native * spherical coordinates (phi,theta). * * The projection is that specified by prjprm::code. * * Given and returned: * prj struct prjprm* * Projection parameters. * * Given: * nx,ny int Vector lengths. * * sxy,spt int Vector strides. * * x,y const double[] * Projected coordinates. * * Returned: * phi,theta double[] Longitude and latitude (phi,theta) of the projected * point in native spherical coordinates [deg]. * * stat int[] Status value for each vector element: * 0: Success. * 1: Invalid value of (x,y). * * Function return value: * int Status return value: * 0: Success. * 1: Null prjprm pointer passed. * 2: Invalid projection parameters. * 3: One or more of the (x,y) coordinates were * invalid, as indicated by the stat vector. * * For returns > 1, a detailed error message is set in * prjprm::err if enabled, see wcserr_enable(). * * * prjs2x() - Generic spherical-to-Cartesian projection * ---------------------------------------------------- * Project native spherical coordinates (phi,theta) to Cartesian (x,y) * coordinates in the plane of projection. * * The projection is that specified by prjprm::code. * * Given and returned: * prj struct prjprm* * Projection parameters. * * Given: * nphi, * ntheta int Vector lengths. * * spt,sxy int Vector strides. * * phi,theta const double[] * Longitude and latitude (phi,theta) of the projected * point in native spherical coordinates [deg]. * * Returned: * x,y double[] Projected coordinates. * * stat int[] Status value for each vector element: * 0: Success. * 1: Invalid value of (phi,theta). * * Function return value: * int Status return value: * 0: Success. * 1: Null prjprm pointer passed. * 2: Invalid projection parameters. * 4: One or more of the (phi,theta) coordinates * were, invalid, as indicated by the stat vector. * * For returns > 1, a detailed error message is set in * prjprm::err if enabled, see wcserr_enable(). * * * ???set() - Specific setup routines for the prjprm struct * -------------------------------------------------------- * Set up a prjprm struct for a particular projection according to information * supplied within it. * * Given and returned: * prj struct prjprm* * Projection parameters. * * Function return value: * int Status return value: * 0: Success. * 1: Null prjprm pointer passed. * 2: Invalid projection parameters. * * For returns > 1, a detailed error message is set in * prjprm::err if enabled, see wcserr_enable(). * * * ???x2s() - Specific Cartesian-to-spherical deprojection routines * ---------------------------------------------------------------- * Transform (x,y) coordinates in the plane of projection to native spherical * coordinates (phi,theta). * * Given and returned: * prj struct prjprm* * Projection parameters. * * Given: * nx,ny int Vector lengths. * * sxy,spt int Vector strides. * * x,y const double[] * Projected coordinates. * * Returned: * phi,theta double[] Longitude and latitude of the projected point in * native spherical coordinates [deg]. * * stat int[] Status value for each vector element: * 0: Success. * 1: Invalid value of (x,y). * * Function return value: * int Status return value: * 0: Success. * 1: Null prjprm pointer passed. * 2: Invalid projection parameters. * 3: One or more of the (x,y) coordinates were * invalid, as indicated by the stat vector. * * For returns > 1, a detailed error message is set in * prjprm::err if enabled, see wcserr_enable(). * * * ???s2x() - Specific spherical-to-Cartesian projection routines *--------------------------------------------------------------- * Transform native spherical coordinates (phi,theta) to (x,y) coordinates in * the plane of projection. * * Given and returned: * prj struct prjprm* * Projection parameters. * * Given: * nphi, * ntheta int Vector lengths. * * spt,sxy int Vector strides. * * phi,theta const double[] * Longitude and latitude of the projected point in * native spherical coordinates [deg]. * * Returned: * x,y double[] Projected coordinates. * * stat int[] Status value for each vector element: * 0: Success. * 1: Invalid value of (phi,theta). * * Function return value: * int Status return value: * 0: Success. * 1: Null prjprm pointer passed. * 2: Invalid projection parameters. * 4: One or more of the (phi,theta) coordinates * were, invalid, as indicated by the stat vector. * * For returns > 1, a detailed error message is set in * prjprm::err if enabled, see wcserr_enable(). * * * prjprm struct - Projection parameters * ------------------------------------- * The prjprm struct contains all information needed to project or deproject * native spherical coordinates. It consists of certain members that must be * set by the user ("given") and others that are set by the WCSLIB routines * ("returned"). Some of the latter are supplied for informational purposes * while others are for internal use only. * * int flag * (Given and returned) This flag must be set to zero whenever any of the * following prjprm struct members are set or changed: * * - prjprm::code, * - prjprm::r0, * - prjprm::pv[], * - prjprm::phi0, * - prjprm::theta0. * * This signals the initialization routine (prjset() or ???set()) to * recompute the returned members of the prjprm struct. flag will then be * reset to indicate that this has been done. * * Note that flag need not be reset when prjprm::bounds is changed. * * char code[4] * (Given) Three-letter projection code defined by the FITS standard. * * double r0 * (Given) The radius of the generating sphere for the projection, a linear * scaling parameter. If this is zero, it will be reset to its default * value of 180/pi (the value for FITS WCS). * * double pv[30] * (Given) Projection parameters. These correspond to the PVi_ma keywords * in FITS, so pv[0] is PVi_0a, pv[1] is PVi_1a, etc., where i denotes the * latitude-like axis. Many projections use pv[1] (PVi_1a), some also use * pv[2] (PVi_2a) and SZP uses pv[3] (PVi_3a). ZPN is currently the only * projection that uses any of the others. * * Usage of the pv[] array as it applies to each projection is described in * the prologue to each trio of projection routines in prj.c. * * double phi0 * (Given) The native longitude, phi_0 [deg], and ... * double theta0 * (Given) ... the native latitude, theta_0 [deg], of the reference point, * i.e. the point (x,y) = (0,0). If undefined (set to a magic value by * prjini()) the initialization routine will set this to a * projection-specific default. * * int bounds * (Given) Controls bounds checking. If bounds&1 then enable strict bounds * checking for the spherical-to-Cartesian (s2x) transformation for the * AZP, SZP, TAN, SIN, ZPN, and COP projections. If bounds&2 then enable * strict bounds checking for the Cartesian-to-spherical transformation * (x2s) for the HPX and XPH projections. If bounds&4 then the Cartesian- * to-spherical transformations (x2s) will invoke prjbchk() to perform * bounds checking on the computed native coordinates, with a tolerance set * to suit each projection. bounds is set to 7 by prjini() by default * which enables all checks. Zero it to disable all checking. * * It is not necessary to reset the prjprm struct (via prjset() or * ???set()) when prjprm::bounds is changed. * * The remaining members of the prjprm struct are maintained by the setup * routines and must not be modified elsewhere: * * char name[40] * (Returned) Long name of the projection. * * Provided for information only, not used by the projection routines. * * int category * (Returned) Projection category matching the value of the relevant global * variable: * * - ZENITHAL, * - CYLINDRICAL, * - PSEUDOCYLINDRICAL, * - CONVENTIONAL, * - CONIC, * - POLYCONIC, * - QUADCUBE, and * - HEALPIX. * * The category name may be identified via the prj_categories character * array, e.g. * = struct prjprm prj; = ... = printf("%s\n", prj_categories[prj.category]); * * Provided for information only, not used by the projection routines. * * int pvrange * (Returned) Range of projection parameter indices: 100 times the first * allowed index plus the number of parameters, e.g. TAN is 0 (no * parameters), SZP is 103 (1 to 3), and ZPN is 30 (0 to 29). * * Provided for information only, not used by the projection routines. * * int simplezen * (Returned) True if the projection is a radially-symmetric zenithal * projection. * * Provided for information only, not used by the projection routines. * * int equiareal * (Returned) True if the projection is equal area. * * Provided for information only, not used by the projection routines. * * int conformal * (Returned) True if the projection is conformal. * * Provided for information only, not used by the projection routines. * * int global * (Returned) True if the projection can represent the whole sphere in a * finite, non-overlapped mapping. * * Provided for information only, not used by the projection routines. * * int divergent * (Returned) True if the projection diverges in latitude. * * Provided for information only, not used by the projection routines. * * double x0 * (Returned) The offset in x, and ... * double y0 * (Returned) ... the offset in y used to force (x,y) = (0,0) at * (phi_0,theta_0). * * struct wcserr *err * (Returned) If enabled, when an error status is returned, this struct * contains detailed information about the error, see wcserr_enable(). * * void *padding * (An unused variable inserted for alignment purposes only.) * * double w[10] * (Returned) Intermediate floating-point values derived from the * projection parameters, cached here to save recomputation. * * Usage of the w[] array as it applies to each projection is described in * the prologue to each trio of projection routines in prj.c. * * int n * (Returned) Intermediate integer value (used only for the ZPN and HPX * projections). * * int (*prjx2s)(PRJX2S_ARGS) * (Returned) Pointer to the spherical projection ... * int (*prjs2x)(PRJ_ARGS) * (Returned) ... and deprojection routines. * * * Global variable: const char *prj_errmsg[] - Status return messages * ------------------------------------------------------------------ * Error messages to match the status value returned from each function. * *===========================================================================*/ #ifndef WCSLIB_PROJ #define WCSLIB_PROJ #ifdef __cplusplus extern "C" { #endif /* Total number of projection parameters; 0 to PVN-1. */ #define PVN 30 extern const char *prj_errmsg[]; enum prj_errmsg_enum { PRJERR_SUCCESS = 0, /* Success. */ PRJERR_NULL_POINTER = 1, /* Null prjprm pointer passed. */ PRJERR_BAD_PARAM = 2, /* Invalid projection parameters. */ PRJERR_BAD_PIX = 3, /* One or more of the (x, y) coordinates were invalid. */ PRJERR_BAD_WORLD = 4 /* One or more of the (phi, theta) coordinates were invalid. */ }; extern const int CONIC, CONVENTIONAL, CYLINDRICAL, POLYCONIC, PSEUDOCYLINDRICAL, QUADCUBE, ZENITHAL, HEALPIX; extern const char prj_categories[9][32]; extern const int prj_ncode; extern const char prj_codes[28][4]; #ifdef PRJX2S_ARGS #undef PRJX2S_ARGS #endif #ifdef PRJS2X_ARGS #undef PRJS2X_ARGS #endif /* For use in declaring deprojection function prototypes. */ #define PRJX2S_ARGS struct prjprm *prj, int nx, int ny, int sxy, int spt, \ const double x[], const double y[], double phi[], double theta[], int stat[] /* For use in declaring projection function prototypes. */ #define PRJS2X_ARGS struct prjprm *prj, int nx, int ny, int sxy, int spt, \ const double phi[], const double theta[], double x[], double y[], int stat[] struct prjprm { /* Initialization flag (see the prologue above). */ /*------------------------------------------------------------------------*/ int flag; /* Set to zero to force initialization. */ /* Parameters to be provided (see the prologue above). */ /*------------------------------------------------------------------------*/ char code[4]; /* Three-letter projection code. */ double r0; /* Radius of the generating sphere. */ double pv[PVN]; /* Projection parameters. */ double phi0, theta0; /* Fiducial native coordinates. */ int bounds; /* Controls bounds checking. */ /* Information derived from the parameters supplied. */ /*------------------------------------------------------------------------*/ char name[40]; /* Projection name. */ int category; /* Projection category. */ int pvrange; /* Range of projection parameter indices. */ int simplezen; /* Is it a simple zenithal projection? */ int equiareal; /* Is it an equal area projection? */ int conformal; /* Is it a conformal projection? */ int global; /* Can it map the whole sphere? */ int divergent; /* Does the projection diverge in latitude? */ double x0, y0; /* Fiducial offsets. */ /* Error handling */ /*------------------------------------------------------------------------*/ struct wcserr *err; /* Private */ /*------------------------------------------------------------------------*/ void *padding; /* (Dummy inserted for alignment purposes.) */ double w[10]; /* Intermediate values. */ int m, n; /* Intermediate values. */ int (*prjx2s)(PRJX2S_ARGS); /* Pointers to the spherical projection and */ int (*prjs2x)(PRJS2X_ARGS); /* deprojection functions. */ }; /* Size of the prjprm struct in int units, used by the Fortran wrappers. */ #define PRJLEN (sizeof(struct prjprm)/sizeof(int)) /* Use the preprocessor to help declare function prototypes (see above). */ int prjini(struct prjprm *prj); int prjfree(struct prjprm *prj); int prjprt(const struct prjprm *prj); int prjperr(const struct prjprm *prj, const char *prefix); int prjbchk(double tol, int nx, int ny, int spt, double phi[], double theta[], int stat[]); int prjset(struct prjprm *prj); int prjx2s(PRJX2S_ARGS); int prjs2x(PRJS2X_ARGS); int azpset(struct prjprm *prj); int azpx2s(PRJX2S_ARGS); int azps2x(PRJS2X_ARGS); int szpset(struct prjprm *prj); int szpx2s(PRJX2S_ARGS); int szps2x(PRJS2X_ARGS); int tanset(struct prjprm *prj); int tanx2s(PRJX2S_ARGS); int tans2x(PRJS2X_ARGS); int stgset(struct prjprm *prj); int stgx2s(PRJX2S_ARGS); int stgs2x(PRJS2X_ARGS); int sinset(struct prjprm *prj); int sinx2s(PRJX2S_ARGS); int sins2x(PRJS2X_ARGS); int arcset(struct prjprm *prj); int arcx2s(PRJX2S_ARGS); int arcs2x(PRJS2X_ARGS); int zpnset(struct prjprm *prj); int zpnx2s(PRJX2S_ARGS); int zpns2x(PRJS2X_ARGS); int zeaset(struct prjprm *prj); int zeax2s(PRJX2S_ARGS); int zeas2x(PRJS2X_ARGS); int airset(struct prjprm *prj); int airx2s(PRJX2S_ARGS); int airs2x(PRJS2X_ARGS); int cypset(struct prjprm *prj); int cypx2s(PRJX2S_ARGS); int cyps2x(PRJS2X_ARGS); int ceaset(struct prjprm *prj); int ceax2s(PRJX2S_ARGS); int ceas2x(PRJS2X_ARGS); int carset(struct prjprm *prj); int carx2s(PRJX2S_ARGS); int cars2x(PRJS2X_ARGS); int merset(struct prjprm *prj); int merx2s(PRJX2S_ARGS); int mers2x(PRJS2X_ARGS); int sflset(struct prjprm *prj); int sflx2s(PRJX2S_ARGS); int sfls2x(PRJS2X_ARGS); int parset(struct prjprm *prj); int parx2s(PRJX2S_ARGS); int pars2x(PRJS2X_ARGS); int molset(struct prjprm *prj); int molx2s(PRJX2S_ARGS); int mols2x(PRJS2X_ARGS); int aitset(struct prjprm *prj); int aitx2s(PRJX2S_ARGS); int aits2x(PRJS2X_ARGS); int copset(struct prjprm *prj); int copx2s(PRJX2S_ARGS); int cops2x(PRJS2X_ARGS); int coeset(struct prjprm *prj); int coex2s(PRJX2S_ARGS); int coes2x(PRJS2X_ARGS); int codset(struct prjprm *prj); int codx2s(PRJX2S_ARGS); int cods2x(PRJS2X_ARGS); int cooset(struct prjprm *prj); int coox2s(PRJX2S_ARGS); int coos2x(PRJS2X_ARGS); int bonset(struct prjprm *prj); int bonx2s(PRJX2S_ARGS); int bons2x(PRJS2X_ARGS); int pcoset(struct prjprm *prj); int pcox2s(PRJX2S_ARGS); int pcos2x(PRJS2X_ARGS); int tscset(struct prjprm *prj); int tscx2s(PRJX2S_ARGS); int tscs2x(PRJS2X_ARGS); int cscset(struct prjprm *prj); int cscx2s(PRJX2S_ARGS); int cscs2x(PRJS2X_ARGS); int qscset(struct prjprm *prj); int qscx2s(PRJX2S_ARGS); int qscs2x(PRJS2X_ARGS); int hpxset(struct prjprm *prj); int hpxx2s(PRJX2S_ARGS); int hpxs2x(PRJS2X_ARGS); int xphset(struct prjprm *prj); int xphx2s(PRJX2S_ARGS); int xphs2x(PRJS2X_ARGS); /* Deprecated. */ #define prjini_errmsg prj_errmsg #define prjprt_errmsg prj_errmsg #define prjset_errmsg prj_errmsg #define prjx2s_errmsg prj_errmsg #define prjs2x_errmsg prj_errmsg #ifdef __cplusplus } #endif #endif /* WCSLIB_PROJ */ astropy-1.1.1/cextern/wcslib/wcsconfig.h.in0000644001134200020070000000134512644017723021623 0ustar embrayscience00000000000000/*============================================================================ * * wcsconfig.h is generated from wcsconfig.h.in by 'configure'. It contains * C preprocessor macro definitions for compiling WCSLIB 5.10 * * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. * http://www.atnf.csiro.au/people/Mark.Calabretta * $Id: wcsconfig.h.in,v 5.10 2015/10/09 08:19:17 mcalabre Exp $ *===========================================================================*/ /* wcslib_version() is available (as of 5.0). */ #define HAVE_WCSLIB_VERSION /* WCSLIB library version number. */ #undef WCSLIB_VERSION /* Define to 1 if sincos() is available. */ #undef HAVE_SINCOS /* 64-bit integer data type. */ #undef WCSLIB_INT64 astropy-1.1.1/cextern/wcslib/wcsconfig_f77.h.in0000644001134200020070000000207412644017723022306 0ustar embrayscience00000000000000/*============================================================================ * * wcsconfig_f77.h is generated from wcsconfig_f77.h.in by 'configure'. It * contains C preprocessor definitions for building the WCSLIB 5.10 Fortran * wrappers. * * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. * http://www.atnf.csiro.au/people/Mark.Calabretta * $Id: wcsconfig_f77.h.in,v 5.10 2015/10/09 08:19:17 mcalabre Exp $ *===========================================================================*/ /* Integer array type large enough to hold an address. Set here to int[2] for * 64-bit addresses, but could be defined as int* on 32-bit machines. */ typedef int iptr[2]; /* Macro for mangling Fortran subroutine names that do not contain * underscores. Typically a name like "WCSINI" (case-insensitive) will become * something like "wcsini_" (case-sensitive). The Fortran wrappers, which are * written in C, are preprocessed into names that match the latter. The macro * takes two arguments which specify the name in lower and upper case. */ #undef F77_FUNC astropy-1.1.1/cextern/wcslib/GNUmakefile0000644001134200020070000001501112644017723021130 0ustar embrayscience00000000000000#----------------------------------------------------------------------------- # GNU makefile for building WCSLIB 5.10 # # Summary of the main targets # --------------------------- # all: Do 'make all' in each subdirectory (excluding ./doxygen). # check: Do 'make check' in each subdirectory (compile and run tests). # tests: Do 'make tests' in each subdirectory (compile test programs but # don't run them). # install: Do 'make install' in each subdirectory. # clean: Recursively delete intermediate files produced as part of the # build, e.g. object modules, core dumps, etc. # cleaner: Recursively clean, and also delete test executables, test # input and output, and intermediates produced in compiling the # programmers' manual. # distclean (or realclean): Recursively delete all platform-dependent files # generated during the build, preserving only the programmers' # manual and man pages (which are normally provided pre-built). # It is the one to use between builds for multiple platforms. # cleanest: Like distclean, but deletes everything that can be regenerated # from the source files, including the programmers' manual and # man pages, but excluding 'configure'. # show: Print the values of important variables used in this and the # other makefiles. # writable: Run chmod recursively to make all sources writable. # # Notes: # 1) If you need to make changes then preferably modify makedefs.in instead. # # 2) Refer also to the makefiles in subdirectories, particularly # C/GNUmakefile. # # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. # http://www.atnf.csiro.au/people/Mark.Calabretta # $Id: GNUmakefile,v 5.10 2015/10/09 08:19:17 mcalabre Exp $ #----------------------------------------------------------------------------- # Get configure settings. include makedefs ifeq "$(CHECK)" "nopgplot" TSTDIRS := $(filter-out pgsbox,$(TSTDIRS)) endif .PHONY : build check chmod clean cleaner cleanest distclean install \ realclean show tests writable build : -@ for DIR in $(SUBDIRS) ; do \ echo '' ; \ $(TIMER) ; \ $(MAKE) -k -C $$DIR build ; \ done check tests :: show -@ echo '' -@ $(TIMER) @ for DIR in $(SUBDIRS) ; do \ echo '' ; \ $(MAKE) -i -C $$DIR cleaner ; \ done -@ echo '' @ for DIR in $(TSTDIRS) ; do \ echo '' ; \ $(TIMER) ; \ $(MAKE) -k -C $$DIR $@ ; \ done check :: -@ echo '' -@ echo 'Summary of results for non-graphical tests' -@ echo '------------------------------------------' -@ cat ./*/test_results @ if grep 'FAIL:' ./*/test_results > /dev/null ; then \ exit 1 ; \ else \ exit 0 ; \ fi install : @ for DIR in $(INSTDIR) ; do \ $(MAKE) -k -C $$DIR $@ ; \ done $(INSTALL) -m 444 wcsconfig.h wcsconfig_f77.h $(INCDIR) - if [ ! -d "$(DOCDIR)" ] ; then \ $(INSTALL) -d -m 2775 $(DOCDIR) ; \ fi $(INSTALL) -m 444 CHANGES COPYING* README $(DOCDIR) - if [ -h $(DOCLINK) ] ; then \ $(RM) $(DOCLINK) ; \ $(LN_S) $(notdir $(DOCDIR)) $(DOCLINK) ; \ fi - if [ ! -d "$(PDFDIR)" ] ; then \ $(INSTALL) -d -m 2775 $(PDFDIR) ; \ fi $(INSTALL) -m 444 wcslib.pdf $(PDFDIR) - if [ ! -d "$(HTMLDIR)/html" ] ; then \ $(INSTALL) -d -m 2775 $(HTMLDIR)/html ; \ fi $(INSTALL) -m 444 html/* $(HTMLDIR)/html if [ ! -d "$(LIBDIR)/pkgconfig" ] ; then \ $(INSTALL) -d -m 2775 $(LIBDIR)/pkgconfig ; \ fi $(INSTALL) -m 444 wcslib.pc $(LIBDIR)/pkgconfig/wcslib.pc clean cleaner : for DIR in $(SUBDIRS) doxygen ; do \ $(MAKE) -C $$DIR $@ ; \ done cleanest distclean realclean : for DIR in $(SUBDIRS) doxygen ; do \ $(MAKE) -C $$DIR $@ ; \ done - $(RM) *.log - $(RM) -r autom4te.cache autoscan.log - $(RM) -r api-sanity-check - $(RM) confdefs.h conftest.* - $(RM) config.log config.status configure.lineno - $(RM) makedefs wcslib.pc - $(RM) wcsconfig.h wcsconfig_*.h - $(RM) wcslib-*.tar.gz show :: -@ echo 'Subdirectories to be built...' -@ echo ' SUBDIRS := $(SUBDIRS)' -@ echo ' TSTDIRS := $(TSTDIRS)' -@ echo '' writable : chmod -R u+w . GNUmakefile : makedefs ; makedefs : makedefs.in config.status -@ echo '' -@ $(TIMER) ./config.status config.status : configure -@ echo '' -@ $(TIMER) -@ echo '' -@ echo "Environment variables that affect 'configure':" -@ echo " CC = $${CC-(undefined)}" -@ echo " CFLAGS = $${CFLAGS-(undefined)}" -@ echo " CPP = $${CPP-(undefined)}" -@ echo " CPPFLAGS = $${CPPFLAGS-(undefined)}" -@ echo " F77 = $${F77-(undefined)}" -@ echo " FFLAGS = $${FFLAGS-(undefined)}" -@ echo " LDFLAGS = $${LDFLAGS-(undefined)}" -@ echo '' ./configure --no-create #----------------------------------------------------------------------------- # These are for code management. .PHONY : dist dist : $(MAKE) -C doxygen cleanest build $(MAKE) -C utils man $(MAKE) distclean -@ echo $(WCSLIBPKG)/C/RCS > wcslib.X -@ echo $(WCSLIBPKG)/C/flexed/RCS >> wcslib.X -@ echo $(WCSLIBPKG)/C/test/RCS >> wcslib.X -@ echo $(WCSLIBPKG)/doxygen/RCS >> wcslib.X -@ echo $(WCSLIBPKG)/Fortran/RCS >> wcslib.X -@ echo $(WCSLIBPKG)/Fortran/test/RCS >> wcslib.X -@ echo $(WCSLIBPKG)/makedefs >> wcslib.X -@ echo $(WCSLIBPKG)/other >> wcslib.X -@ echo $(WCSLIBPKG)/pgsbox/RCS >> wcslib.X -@ echo $(WCSLIBPKG)/RCS >> wcslib.X -@ echo $(WCSLIBPKG)/TODO >> wcslib.X -@ echo $(WCSLIBPKG)/utils/RCS >> wcslib.X -@ echo $(WCSLIBPKG)/wcslib.T >> wcslib.X -@ echo $(WCSLIBPKG)/wcslib.X >> wcslib.X rm -f $(WCSLIBPKG).tar.bz2 tar cf - -C .. -X wcslib.X $(WCSLIBPKG) | \ tar t | \ grep -v '/$$' | \ sort > wcslib.T rm -f wcslib.X tar cvf $(WCSLIBPKG).tar -C .. -T wcslib.T rm -f wcslib.T bzip2 $(WCSLIBPKG).tar chmod 444 $(WCSLIBPKG).tar.bz2 install_dist : scp -p $(WCSLIBPKG).tar.bz2 cal103@venice:/nfs/ftp/software/wcslib/ mv -f $(WCSLIBPKG).tar.bz2 ../wcslib-releases/ ssh cal103@venice "cd /nfs/ftp/software/wcslib/ && \ rm -f wcslib.tar.bz2 && \ ln -s $(WCSLIBPKG).tar.bz2 wcslib.tar.bz2" cp -fp CHANGES wcslib.pdf ~/public_html/WCS/ rsync --archive --delete html/ ~/public_html/WCS/wcslib/ configure : configure.ac -@ echo '' -@ $(TIMER) autoconf # Code development overrides must be included specifically before 'configure' # generates makedefs. -include flavours astropy-1.1.1/cextern/wcslib/configure.ac0000644001134200020070000003776112644017723021364 0ustar embrayscience00000000000000#----------------------------------------------------------------------------- # Process this file with autoconf-2.53 or later to produce a configure script. #----------------------------------------------------------------------------- # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. # http://www.atnf.csiro.au/people/Mark.Calabretta # $Id: configure.ac,v 5.10 2015/10/09 08:19:17 mcalabre Exp $ #----------------------------------------------------------------------------- AC_INIT([WCSLIB], [5.10], [mark@calabretta.id.au], [wcslib-5.10]) AC_PREREQ([2.53]) AC_REVISION([$Revision: 5.10 $]) AC_SUBST([PACKAGE_VERSION]) AC_DEFINE_UNQUOTED([WCSLIB_VERSION], [$PACKAGE_VERSION], [Define wcslib version]) # Library version number, same as package version. LIBVER="$PACKAGE_VERSION" AC_SUBST([LIBVER]) AC_CONFIG_SRCDIR([C/wcs.h]) AC_CONFIG_AUX_DIR([config]) # Get the system type. AC_CANONICAL_BUILD ARCH="${build_cpu}-$build_os" AC_SUBST([ARCH]) # Look for Flex. AC_CHECK_PROG([FLEX], [flex], [flex], [], [], []) if test "x$FLEX" = xflex ; then # Version 2.5.9 or later is required. V=`flex --version | awk '{print $2}'` W=`echo $V | awk -F. '{if ((($1*100 + $2)*100 + $3) < 20509) print "no"}'` if test "x$W" != x ; then AC_MSG_NOTICE([Flex version $V is too old, ignored.]) FLEX= else AC_MSG_NOTICE([Using Flex version $V.]) fi fi if test "x$FLEX" = x ; then AC_MSG_WARN([Flex version 2.5.9 or later does not appear to be available, will use pre-generated sources.]) fi # Look for an ANSI C compiler. AC_PROG_CPP AC_PROG_CC AC_PROG_CC_STDC AC_C_CONST AC_TYPE_SIZE_T if test "x$ac_cv_prog_cc_stdc" = xno -o \ "x$ac_cv_c_const" = xno -o \ "x$ac_cv_type_size_t" = xno; then AC_MSG_ERROR([ ------------------------------------------------------- An ANSI standard C library is required to build WCSLIB. ERROR: WCSLIB configuration failure. -------------------------------------------------------], [1]) fi # Check for data types (suggested by autoscan - off_t is only required by # fitshdr). AC_TYPE_OFF_T AC_TYPE_INT8_T AC_TYPE_INT16_T AC_TYPE_INT32_T AC_TYPE_UINT8_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T # Check for ANSI C headers. AC_HEADER_STDC AC_CHECK_HEADERS([ctype.h errno.h limits.h locale.h math.h setjmp.h stdarg.h \ stdio.h stdlib.h string.h]) if test "x$ac_cv_header_stdc" = xno; then AC_MSG_ERROR([ ------------------------------------------------------------------- An ANSI standard C library is required to build WCSLIB. One of the ANSI C header files it requires is missing or unusable. ERROR: WCSLIB configuration failure. -------------------------------------------------------------------], [1]) fi # Checks for ANSI C library functions (suggested by autoscan - fseeko and # stat are only required by fitshdr). AC_CHECK_LIB([m], [floor]) AC_FUNC_FSEEKO AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_SETVBUF_REVERSED AC_FUNC_STAT AC_FUNC_VPRINTF AC_CHECK_FUNCS([floor memset pow setlocale sqrt strchr strstr]) # System libraries that may be required by WCSLIB itself. # SunOS, extra maths functions. AC_CHECK_LIB([sunmath], [cosd], [LIBS="-lsunmath $LIBS"], [], []) # See if we can find sincos(). AC_CHECK_FUNCS([sincos]) # Check the size and availability of integer data types. AC_CHECK_SIZEOF([int]) AC_CHECK_SIZEOF([long int]) AC_CHECK_SIZEOF([long long int]) # 64-bit integer data type; use long long int preferentially since that # accords with "%lld" formatting used in fitshdr.l, e.g. # int size_t long int long long int # --- ------ -------- ------------- # gcc x86: 32 32 32 64 # gcc x86_64: 32 64 64 64 if test "x$ac_cv_sizeof_long_long_int" = x8; then AC_DEFINE([WCSLIB_INT64], [long long int], [64-bit integer data type.]) elif test "x$ac_cv_sizeof_long_int" = x8; then AC_DEFINE([WCSLIB_INT64], [long int], [64-bit integer data type.]) elif test "x$ac_cv_sizeof_int" = x8; then AC_DEFINE([WCSLIB_INT64], [int], [64-bit integer data type.]) fi # Does printf() have the z modifier for size_t type? Important for 64-bit. AC_MSG_CHECKING([for printf z format modifier for size_t type]) AC_RUN_IFELSE( [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[char buf[64]; if (sprintf(buf, "%zu", (size_t)1) != 1) return 1; else if (strcmp(buf, "1")) return 2;]])], AC_DEFINE([MODZ], ["z"], [printf format modifier for size_t type.]) AC_MSG_RESULT(yes), AC_DEFINE([MODZ], [""], [printf format modifier for size_t type.]) AC_MSG_RESULT(no), AC_DEFINE([MODZ], [""], [printf format modifier for size_t type.]) AC_MSG_RESULT(assumed not) ) # Starting values, may be augmented later. SUBDIRS="C" TSTDIRS="C" INSTDIR="C" # Ways of specifying the Fortran compiler, in order of precedence: # configure --enable-fortran= # F77= configure ...bash # # Ways of disabling Fortran: # configure --disable-fortran # configure --enable-fortran=no # F77=no configure ...bash AC_ARG_ENABLE([fortran], [AS_HELP_STRING([--enable-fortran=ARG], [Fortran compiler to use])], []) AC_ARG_ENABLE([fortran], [AS_HELP_STRING([--disable-fortran], [don't build the Fortran wrappers or PGSBOX])], []) if test "x$enable_fortran" != x -a "x$enable_fortran" != xyes ; then F77="$enable_fortran" fi if test "x$F77" = xno ; then F77= AC_MSG_WARN([Compilation of Fortran wrappers and PGSBOX disabled]) else if test "x$F77" = x ; then # Look for a Fortran compiler. AC_PROG_F77([gfortran g77 f77 ifort xlf frt pgf77 fl32 af77 fort77 f90 \ xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95]) fi if test "x$F77" = x; then AC_MSG_WARN([ ------------------------------------------------------------------ Fortran compiler not found, will skip Fortran wrappers and PGSBOX. ------------------------------------------------------------------]) # Best guess at Fortran name mangling for use if a compiler does ever # become available. AC_DEFINE([F77_FUNC(name,NAME)], [name ## _]) else if test "x$ac_cv_f77_compiler_gnu" = xyes ; then if test "x$F77" = xg77 -o "x$F77" = xf77 ; then # Not recognized by gfortran. FFLAGS="$FFLAGS -Wno-globals" fi fi AC_MSG_CHECKING(whether $F77 accepts -I) AC_LANG_PUSH(Fortran 77) FFLAGS_save=$FFLAGS FFLAGS=-I. AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], []), [FFLAGS="$FFLAGS_save -I."; AC_MSG_RESULT(yes)], [FFLAGS="$FFLAGS_save"; AC_MSG_RESULT(no)]) AC_LANG_POP() # Libraries required by the Fortran compiler itself (sets FLIBS). # Required by utilities and test programs written in C that link to # Fortran object modules such as pgsbox. AC_F77_LIBRARY_LDFLAGS # F77 name mangling (defines the F77_FUNC preprocessor macro). AC_F77_WRAPPERS SUBDIRS="C Fortran" TSTDIRS="C Fortran" INSTDIR="Fortran" fi fi # System-dependent system libraries (for building the sharable library). #----------------------------------------------------------------------- # Darwin (contains stubs for long double). AC_CHECK_LIB([SystemStubs], [printf\$LDBLStub], [LIBS="$LIBS -lSystemStubs"], [], []) # Library and installation utilities. #------------------------------------ # Static library generation. AC_PROG_RANLIB # Shared library generation. if test "x$ac_cv_c_compiler_gnu" = xyes ; then SHVER=`echo "$LIBVER" | sed -e 's/\..*$//'` # Note that -fPIC is on by default for Macs, this just makes it obvious. SHRFLAGS="-fPIC" SHRLD="\$(CC) \$(SHRFLAGS)" case "$build_os" in darwin*) SHRLIB="libwcs.$LIBVER.dylib" SONAME="libwcs.$SHVER.dylib" SHRLD="$SHRLD -dynamiclib -single_module" SHRLD="$SHRLD -compatibility_version $SHVER -current_version $LIBVER" SHRLN= case "$build_cpu" in powerpc*) # Switch off -fPIC (not applicable for PowerPC Macs). CFLAGS="$CFLAGS -mdynamic-no-pic" ;; esac ;; *) # Covers Linux and Solaris at least. SHRLIB="libwcs.so.$LIBVER" SONAME="libwcs.so.$SHVER" SHRLD="$SHRLD -shared -Wl,-h\$(SONAME)" SHRLN="libwcs.so" ;; esac else SHRLIB= SONAME= SHRFLAGS= SHRLD= SHRSFX= SHRLN= fi AC_SUBST([SHRLIB]) AC_SUBST([SONAME]) AC_SUBST([SHRFLAGS]) AC_SUBST([SHRLD]) AC_SUBST([SHRSFX]) AC_SUBST([SHRLN]) # Installation utilities. AC_PROG_LN_S AC_PROG_INSTALL AC_MSG_NOTICE([End of primary configuration. ]) # The following are required to build utilities and test programs. # ---------------------------------------------------------------- AC_MSG_NOTICE([Looking for libraries etc. for utilities and test suite...]) # Check for other quasi-standard header files. AC_CHECK_HEADERS([unistd.h]) # Large file support. AC_FUNC_FSEEKO AC_SYS_LARGEFILE # Extra places to look for third-party libraries and header files. LIBDIRS= AC_ARG_WITH([cfitsio], [AS_HELP_STRING([--without-cfitsio], [eschew CFITSIO])], []) if test "x$with_cfitsio" = xno ; then AC_MSG_WARN([CFITSIO disabled]) else AC_ARG_WITH([cfitsiolib], [AS_HELP_STRING([--with-cfitsiolib=DIR], [directory containing cfitsio library])], []) if test "x$with_cfitsiolib" != x ; then LIBDIRS="$LIBDIRS $with_cfitsiolib" fi AC_ARG_WITH([cfitsioinc], [AS_HELP_STRING([--with-cfitsioinc=DIR], [directory containing cfitsio header files])], []) if test "x$with_cfitsioinc" != x ; then CFITSIO_INCDIRS="$with_cfitsioinc" fi CFITSIO_INCDIRS="$CFITSIO_INCDIRS \ /usr/local/cfitsio/include \ /local/cfitsio/include" LIBDIRS="$LIBDIRS \ /usr/local/cfitsio/lib \ /local/cfitsio/lib" fi AC_ARG_WITH([pgplot], [AS_HELP_STRING([--without-pgplot], [eschew PGPLOT])], []) if test "x$with_pgplot" = xno ; then AC_MSG_WARN([PGPLOT disabled]) else AC_ARG_WITH([pgplotlib], [AS_HELP_STRING([--with-pgplotlib=DIR], [directory containing pgplot library])], []) if test "x$with_pgplotlib" != x ; then LIBDIRS="$LIBDIRS $with_pgplotlib" fi AC_ARG_WITH([pgplotinc], [AS_HELP_STRING([--with-pgplotinc=DIR], [directory containing pgplot header files])], []) if test "x$with_pgplotinc" != x ; then PGPLOT_INCDIRS="$with_pgplotinc" fi PGPLOT_INCDIRS="$PGPLOT_INCDIRS \ /usr/local/pgplot/include \ /local/pgplot/include" LIBDIRS="$LIBDIRS \ /usr/local/pgplot/lib \ /local/pgplot/lib" fi if test "x$with_cfitsio" != xno -o \ "x$with_pgplot" != xno ; then LIBDIRS="$LIBDIRS \ /usr/local/lib \ /local/lib \ /opt/local/lib \ /opt/SUNWspro/lib \ /sw/lib" for LIBDIR in $LIBDIRS ; do AC_CHECK_FILE([$LIBDIR], [LDFLAGS="$LDFLAGS -L$LIBDIR"], [continue]) done # Generic include directories. INCDIRS="/usr/local/include \ /local/include \ /opt/local/include \ /sw/include \ /local \ /usr/include" # CFITSIO. if test "x$with_cfitsio" != xno ; then # Search for CFITSIO. for INCDIR in $CFITSIO_INCDIRS $INCDIRS ; do AC_CHECK_FILE([$INCDIR/cfitsio/fitsio.h], [CFITSIOINC="-I$INCDIR/cfitsio"; break]) AC_CHECK_FILE([$INCDIR/fitsio.h], [CFITSIOINC="-I$INCDIR"; break]) done AC_CHECK_LIB([socket], [recv], [CFITSIOLIB="-lsocket"], [], [$LIBS]) AC_CHECK_LIB([cfitsio], [ffopen], [CFITSIOLIB="-lcfitsio $CFITSIOLIB"], [], [$CFITSIOLIB $LIBS]) if test "x$CFITSIOINC" = x -o "x$CFITSIOLIB" = x; then AC_MSG_WARN([CFITSIO not found, skipping CFITSIO-dependent tests.]) else AC_MSG_NOTICE([CFITSIO appears to be available.]) AC_DEFINE([HAVE_CFITSIO], [1], [Define to 1 if CFITSIO is available.]) # Check for fits_read_wcstab, present in CFITSIO 3.004beta and later. AC_CHECK_LIB([cfitsio], [fits_read_wcstab], [GETWCSTAB=], [GETWCSTAB=getwcstab.o], [$CFITSIOLIB $LIBS]) if test "x$GETWCSTAB" != x ; then AC_MSG_WARN([fits_read_wcstab not found in CFITSIO, will use getwcstab.c to compile test programs.]) fi fi fi # PGPLOT. if test "x$F77" != x -a "x$with_pgplot" != xno ; then # Search for PGPLOT. for INCDIR in $PGPLOT_INCDIRS $INCDIRS ; do AC_CHECK_FILE([$INCDIR/pgplot/cpgplot.h], [PGPLOTINC="-I$INCDIR/pgplot"; break]) AC_CHECK_FILE([$INCDIR/cpgplot.h], [PGPLOTINC="-I$INCDIR"; break]) done # FLIBS (found above via AC_F77_LIBRARY_LDFLAGS) only helps if PGPLOT was # built using the same Fortran compiler that we are using here. # PGPLOT compiled by the SUN Fortran compiler but linked with something # else. AC_CHECK_LIB([M77], [iand_], [PGPLOTLIB="-lM77 $PGPLOTLIB"], [], [$PGPLOTLIB $LIBS]) AC_CHECK_LIB([F77], [f77_init], [PGPLOTLIB="-lF77 $PGPLOTLIB"], [], [$PGPLOTLIB $LIBS]) if test "x$F77" != xg77; then # For PGPLOT compiled with g77 but linked with something else. AC_CHECK_LIB([frtbegin], [main], [PGPLOTLIB="-lfrtbegin $PGPLOTLIB"], [], [$PGPLOTLIB $LIBS]) AC_CHECK_LIB([g2c], [gerror_], [PGPLOTLIB="-lg2c $PGPLOTLIB"], [], [$PGPLOTLIB $LIBS]) fi if test "x$F77" != xgfortran; then # For PGPLOT compiled with gfortran but linked with something else. # Note that if gfortran itself is driving the linker it can be harmful # to add -lgfortran to the link list without also adding -lgfortranbegin. # Doing so stops gfortran from adding -lgfortranbegin which is needed to # resolve "main". AC_CHECK_LIB([gfortran], [_gfortran_abort], [PGPLOTLIB="-lgfortran $PGPLOTLIB"], [], [$PGPLOTLIB $LIBS]) fi # Search for X11 includes and libraries. AC_PATH_X if test "x$no_x" = x; then if test "x$ac_x_libraries" != x ; then # Not needed for systems that keep the X11 libraries in /usr/lib. LDFLAGS="$LDFLAGS -L$ac_x_libraries" fi PGPLOTLIB="-lX11 $PGPLOTLIB" fi # It is possible that other libraries may be required depending on what # graphics drivers were installed with PGPLOT. AC_CHECK_LIB([z], [deflate], [PGPLOTLIB="-lz $PGPLOTLIB"], [], [$PGPLOTLIB $LIBS]) AC_CHECK_LIB([png], [png_error], [PGPLOTLIB="-lpng $PGPLOTLIB"], [], [$PGPLOTLIB $LIBS]) AC_CHECK_LIB([pgplot], [pgbeg_], [PGPLOTLIB="-lpgplot $PGPLOTLIB"], [], [$PGPLOTLIB $FLIBS $LIBS]) AC_CHECK_LIB([cpgplot], [cpgbeg], [PGPLOTLIB="-lcpgplot $PGPLOTLIB"], [PGPLOTLIB=], [$PGPLOTLIB $FLIBS $LIBS]) # Only need the PGPLOT include file to build PGSBOX. if test "x$PGPLOTINC" != x; then SUBDIRS="$SUBDIRS pgsbox" INSTDIR="pgsbox" fi # Also need the PGPLOT library to build pgtest and cpgtest. if test "x$PGPLOTLIB" = x; then AC_MSG_WARN([PGPLOT not found, skipping PGPLOT-dependent tests.]) else AC_MSG_NOTICE([PGPLOT appears to be available.]) TSTDIRS="$TSTDIRS pgsbox" fi fi fi # Utilities are compiled last since they need the libraries. # Ways of disabling them: # configure --disable-utils # configure --enable-utils=no AC_ARG_ENABLE([utils], [AS_HELP_STRING([--disable-utils], [don't build the WCS utilities])], []) if test "x$enable_utils" != xno ; then SUBDIRS="$SUBDIRS utils" INSTDIR="$INSTDIR utils" else AC_MSG_WARN([Compilation of WCS utilities disabled]) fi AC_SUBST([CFITSIOINC]) AC_SUBST([CFITSIOLIB]) AC_SUBST([GETWCSTAB]) AC_SUBST([PGPLOTINC]) AC_SUBST([PGPLOTLIB]) AC_SUBST([SUBDIRS]) AC_SUBST([TSTDIRS]) AC_SUBST([INSTDIR]) AC_MSG_NOTICE([End of auxiliary configuration. ]) # Do it. AC_MSG_NOTICE([Configuring files...]) AC_CONFIG_FILES([makedefs wcslib.pc]) AC_CONFIG_HEADERS([wcsconfig.h wcsconfig_f77.h wcsconfig_tests.h wcsconfig_utils.h]) AC_OUTPUT astropy-1.1.1/cextern/wcslib/README0000644001134200020070000000346712644017723017752 0ustar embrayscience00000000000000------------------------------------------------------------------------------ WCSLIB 5.10 and PGSBOX 5.10 ------------------------------------------------------------------------------ WCSLIB 5.10 - an implementation of the FITS WCS standard. Copyright (C) 1995-2015, Mark Calabretta This file is part of WCSLIB. WCSLIB is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with WCSLIB. If not, see http://www.gnu.org/licenses. Direct correspondence concerning WCSLIB to mark@calabretta.id.au Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: README,v 5.10 2015/10/09 08:19:17 mcalabre Exp $ ------------------------------------------------------------------------------ Please refer to ./INSTALL ...Installation instructions. ./html/index.html ...The WCSLIB programmer's manual in HTML format. ./wcslib.pdf ...The WCSLIB programmer's manual in PDF format. ./CHANGES ...Log of changes made to WCSLIB. ./THANKS ...List of contributors to WCSLIB. ./VALIDATION ...List of platforms on which the installation procedures and test suite were exercised. ./COPYING ...A copy of the GNU General Public License, v3.0. ./COPYING.LESSER ...A copy of the Lesser GNU General Public License. astropy-1.1.1/cextern/wcslib/COPYING.LESSER0000644001134200020070000001672512602615515021117 0ustar embrayscience00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. astropy-1.1.1/cextern/wcslib/CHANGES0000644001134200020070000025377212644017723020073 0ustar embrayscience00000000000000WCSLIB version 5.10 (2015/10/09) -------------------------------- * C library - In wcshdo(), allow output of floating point keyvalues to 15 significant digits (was 14), mainly for astropy. - In wcspih(), allow unrecognised WAT projection types (tan, etc.) to pass without returning an error. Reported by Michael Droettboom. Also fixed a bug triggered by SIP keywords in unconventional order, reported by Colin Slater, LSST. WCSLIB version 5.9 (2015/07/21) ------------------------------- * C library - In disx2p(), make proper allowance for the possibility that the TPD and SIP forward and inverse distortion polynomials may not be of the same degree, reported by Martin Kuemmel. - Fix-ups in wcshdo() reported by Michael Droettboom, and several tidy-ups as well. WCSLIB version 5.8 (2015/07/08) ------------------------------- * C library - DSS (Digitized Sky Survey) coordinates are now handled via TPD, as are the TNX and ZPX "projections". New test script tdis3 and headers DSS.keyrec, TNX.keyrec, and ZPX.keyrec. - New function dishdo() can be used to set a flag that causes wcshdo() to write headers in the form of the distortion function used internally (usually TPD). - Added the capability, via DPja.DOCORR, for a distortion function to to compute an additive correction to the undistorted coordinates (rather than computing the distorted coordinates themselves). - Added auxiliary variables to TPD via DPja.AUX.jhat.COEFF.m. - Bug fix in wcshdo() for TPV, diagnosed by Michael Droettboom. * Fortran wrappers - Wrapper for dishdo(). WCSLIB version 5.7 (2015/06/29) ------------------------------- * C library - Extended wcssub() to handle distortions (and thus wcscopy() also). This required axis mapping to be enabled for SIP distortions within WCSLIB. - wcshdo() now handles all distortions currently supported by WCSLIB: SIP, TPV, TPD, and Polynomial. - Bug fixes in sphx2s() and sphs2x() for non-unit vector strides for special-case rotations. - In wcsset(), modify wcsprm::ctype after translating TPV so that subsequent calls won't try to re-translate it, the PVi_ma records by then having been erased. Reported by Michael Droettboom. Also, restore NDPMAX after translating TPV. - Bug fixes in discpy(), disprt(), disset(), and disx2p(). - Added disperr(), prjperr(), spcperr(), spxperr(), and tabperr() to complete the set and make reporting errors slightly more convenient. * Utilities - wcsware has a new option, -o, to print the wcsprm struct in the form of a FITS header using wcshdo(). Also, the -a option has been extended to allow a 0-relative numeric index for selecting an alternate WCS, where the alternates are sequenced alphabetically (without gaps) following the primary representation. * User manual - Documentation generation moved to doxygen 1.8.10 (was 1.8.9.1). WCSLIB version 5.6 (2015/06/14) ------------------------------- * C library - Bug fixes in wcspih() and sipset() to account for the fact that the independent variables of the SIP polynomial are pixel coordinate offsets from CRPIXja, not pixel coordinates per se. Diagnosed by Michael Droettboom. Validated SIP and TPV handling by comparing the output of 'wcsware -x' with that of wcstools 'xy2sky -d -n6' using astropy's SIP test headers, and separate SIP and TPV headers originating from the Palomar Transient Factory provided by David Shupe. Changed SIP.keyrec so that CRPIX1 and CRPIX2 differ in value, thereby making tests sensitive to any confusion between the two. WCSLIB version 5.5 (2015/05/05) ------------------------------- * C library - Bug fixes in wcspih.l for headers with multiple distortions, and for distortion parameter look-alike keywords. - Bug fix in sipset() uncovered by valgrind. WCSLIB version 5.4.1 (2015/05/01) --------------------------------- * C library - Added a fairly lengthy section to the prologue of dis.h describing the Paper IV keywords and the distortion functions currently implemented. * User manual - Added a new section on WCSLIB version numbers. WCSLIB version 5.4 (2015/04/21) ------------------------------- * C library - Further work on distortions: wcspih() now parses Paper IV distortion keywords (CPDISja, CQDISia, DPja, DQia, etc.), thus handling record- valued keywords. SIP keywords are also parsed and translated into Paper IV keywords. - TPV, SIP, and whereever possible, the general Polynomial distortion function of Paper IV are now implemented by the Template Polynomial Distortion (TPD), that being a superset of TPV and SIP. TPD, which can also handle 1D distortions and be used for inversions, is also supported as a separate distortion type defined by Paper IV keywords. TPD efficiently handles 1D distortions and distortions without radial terms. - Specialized inverse distortions, such as defined by SIP, are implemented by TPD and recognized by disx2p(), which uses them to compute the initial approximation of its more precise iterative solution. - Generalized tdis1.c so that it can do closure tests for SIP headers, and added a SIP test header. WCSLIB version 5.3.1 (2015/04/21) --------------------------------- * C library - Bug fix in test program tdis1.c reported by Martin Kuemmel. WCSLIB version 5.3 (2015/04/21) ------------------------------- First public release of WCSLIB 5.x with distortions capability. * C library - Changed disprm::dtype from char[16] to char[72] for reasons relating to header parsing. - More armour plating for disset() and friends. They also use new utility functions wcsutil_dpkey_int() and wcsutil_dpkey_double() to extract numeric values from a dpkey struct. This ensures their independence of the data type, the appropriate reporting of dpkey values by disprt(), and (eventually) the appropriate writing of DPja and DQia keyvalues by wcshdo(). - Augmented the usage comments for dpfill() to explain how numeric values in a dpkey struct are handled. * Utilities - wcsware now uses wcserr to provide a backtrace on errors. Also fixed a couple of minor annoyances relating to alternate representations. WCSLIB version 5.2 beta release (2015/04/15) -------------------------------------------- * C library - Further development of disprm and related functions to implement the FITS keywords for distortions introduced in WCS Paper IV, thus changing disprm's ABI once again. disprm's model is now similar to wcsprm's handling of PVi_ma and PSi_ma, where the parsed keyrecords are loaded into a set of pvcard and pscard structs and wcsset() does the analysis. For disprm, the parsed DPja or DQia keyrecords are loaded into a set of dpkey structs for disset() to analyse. - New function dpfill() aids in filling a dpkey struct. Function disparms() has been removed. It was no longer needed as disprm::parms[][] is now a "returned" member of the struct. - Implementation of the general Polynomial distortion function defined in Sect. 3.1 of WCS Paper IV. The polynomial is defined in terms of Paper IV keywords. - Bug fixes in diswarp() and linwarp() reported by Michael Droettboom. - Test program tdis1 now tests a TPV header for closure in two ways: directly as a specialist TPV distortion (as before), then by translating it into a general polynomial distortion. It then also tests that the TPV and polynomial distortions produce the same results. * Fortran wrappers - Changes to the wrappers reflecting changes to disprm. - Bug fixes in fitshdr_f.c, and test programs tdis1.f, tfitshdr.f, twcsfix.f, and twcs.f. All reported and/or fixed by Ole Streicher. WCSLIB version 5.1 beta release (2015/04/07) -------------------------------------------- * C library - Distortions-related bug fixes to linset(), linp2x(), and linx2p(). - New functions diswarp() and linwarp() compute statistics of the distortion functions over a specified domain. Changed tdis1.c to test them. - Changes to disprm (so changed ABI). * Fortran wrappers - Wrappers for diswarp() and linwarp(). WCSLIB version 5.0 beta release (2015/04/05) -------------------------------------------- * C library - Implemented the framework of WCS Paper IV (the draft distortions proposal) based on a new struct, disprm, and suite of routines with header dis.h: disini(), disalloc(), discpy(), disfree(), disprt(), disset(), disp2x(), and disx2p(). New test program tdis1. Consequent changes to the linprm struct have altered its ABI, thus necessitating an increment in the WCSLIB major verion number. - wcsset() now recognises the "TPV" projection proposed in an early draft of WCS Paper II, and translates it into a disprm distortion - by request of Octavi Fors. Additionally, it recognises "TPU" as equivalent to "TPV" but using a prior distortion (coming before the linear transformation matrix) rather than sequent (coming after it). - In wcspih() and wcsbth(), added relaxation flags to allow PC0i_0ja, PV0j_0ma, and PS0j_0ma (i.e. with leading zeroes on the index). - Added wcslib_version() to return the WCSLIB version number, as suggested by Ole Streicher. - Fixed problems uncovered by valgrind in prjbchk() (reported by Ger van Diepen), sphx2s(), sphx2s(), spcspxe(), spcxpse(), tabini(), and wcshdo_util(). - Tidied up error reporting, particularly relating to translating status returns from lower-level functions. New functions linperr() and celperr() report error messages from the structs they contain in addition to their own. - Changed output formatting of floating point values in linprt(), celprt(), prjprt(), spcprt(), tabprt(), and wcsprt(). Updated the test output reference files for tbth1, tpih1, twcsfix, twcssub, and twcstab to suit. - Tidied up several of the test programs, mostly to free memory explicitly before exit so that valgrind doesn't report (non-)leaks. * Fortran wrappers - Wrappers for the new distortion functions. New test programs tdis1.f and tdis2.f. - Updates following changes to wcspih() and wcsbth(). - Added wrappers for linperr() and celperr(). Also added prjperr_(), spcperr_(), and tabperr_() as convenient wrappers on wcserr_prt(). - Wrapper for wcslib_version(). * Utilities - Added a "lint" function to wcsware to check a FITS header for conformance to the WCS standard. New test program twcslint. * PGSBOX - In PGCRLB, fixed an incorrect use of the MOD intrinsic reported by 'gfortran -std=f95' via Jean-Baptiste Marquette. WCSLIB version 4.25.1 (2015/01/05) ---------------------------------- * C library - Updated the test output reference files for tpih1, tbth1, twcsfix, and twcstab to account for the change to wcsset() in release 4.25. * Fortran wrappers - Updated the test output reference files for tpih1, twcsfix, and twcstab to account for the change to wcsset() in release 4.25. * User manual - Documentation generation moved to doxygen 1.8.9.1 (was 1.8.8). WCSLIB version 4.25 (2014/12/15) ---------------------------------- * C library - wcsset() now supplies default values for the auxiliary keywords EQUINOXa and RADESYSa if not present in the FITS header. WCSLIB version 4.24 (2014/09/19) ---------------------------------- * C library - Changed API to wcscompare() to allow a tolerance to be specified for floating-point comparisons. Contributed by Michael Droettboom. * Fortran wrappers Track the change to wcscompare(). * User manual - Documentation generation moved to doxygen 1.8.8 (was 1.8.4). - Added mention of WCSLIB in "homebrew-science" (MacOSX) in the section on other packages. WCSLIB version 4.23 (2014/05/11) -------------------------------- * C library - New function wcscompare() compares two wcsprm structs for equality with varying degrees of strictness. Test program twcscompare. Contributed by Michael Droettboom. - In wcssub(), fixed a bug uncovered by valgrind arising from allocation of insufficient memory for temporaries when a new axis is added. Reported by Michael Droettboom. - In wcshdo(), don't write RESTFRQ or RESTWAV if zero. Also, to distinguish them from integer keyvalues, floating- point values will now always be written with an exponent or fractional part, ".0" being appended if necessary to achieve this. Suggested by Peter Weilbacher. - Fixed the '-h' option in twcshdr. * Fortran wrappers - Wrapper for wcscompare(). WCSLIB version 4.22 (2014/04/13) -------------------------------- * C library - In pcox2s() and pcos2x(), use alternative projection equations for greater numerical precision near theta == 0. In cops2x(), return an exact result for theta at the poles. Relaxed the tolerance for bounds checking a little in sflx2s(). WCSLIB version 4.21 (2014/03/24) -------------------------------- * C library - New function prjbchk() performs bounds checking on native spherical coordinates. It is invoked automatically by the deprojection (x2s) routines if prjprm::bounds&4 is set. Documented the new bounds checking implemented by prjbchk() in the prologue entry for wcsbchk(). Improvements to tprj1 to test the vector API of prjx2s() and to deal better with out-of-bounds native coordinates returned by it. - Bug fixes in the projection routines: in hpxx2s() relating to bounds checking, bug introduced at 4.20, reported by Michael Droettboom; in parx2s() and molx2s() relating to setting the stat vector; in hpxx2s() relating to implementation of the vector API; and in xphx2s() relating to setting an out-of-bounds value of phi. * Fortran wrappers - Wrapper for prjbchk(). Modified tprj1.f to track changes to the C version. WCSLIB version 4.20 (2013/12/18) -------------------------------- * C library - New function, wcsbchk(), for controlling bounds checking in the projection routines. - Enable bounds checking in the pixel-to-sky (x2s) direction for HPX and XPH if prjprm::bounds&2. Tightened bounds checking in xphx2s(). prjini() now sets prjprm::bounds = 3 to enable all bounds checking by default. - Fixed an incorrect error message in wcs_units(). Also report potentially unsafe units translations in unitfix() - both contributed by Michael Droettboom. * Fortran wrappers - Wrapper for wcsbchk(). * PGSBOX - Fixed a few nuisance warnings from gfortran 4.7.2 relating to implicit type conversions in pgsbox.f. * User manual - Added mention of wcsjs (Javascript) in the section on other packages. WCSLIB version 4.19 (2013/09/30) -------------------------------- * C library - Bug fix in wcshdo(), uncovered by cppcheck and reported by David Binderman. Fixed additional minor inconsistencies in hpxx2s(), wcsprintf(), and wcsfprintf() reported by cppcheck. - Minor fix to twcstab reported by cppcheck. - Bug fix in wcssub() for handling (non-standard) PROJPn keywords (uncovered by valgrind, reported by Paul Price). WCSLIB version 4.18 (2013/07/13) -------------------------------- * C library - Implemented the butterfly projection (XPH), being the polar form of the HEALPix projection with (H,K) = (4,3). Augmented tprj1.c and tprj2.c to suit. - Bug fix in celfix() when translating GLS to SFL with non-zero reference point. * Fortran wrappers - Wrappers for the XPH projection functions and corresponding modifications to the test programs. - Fixed a few inconsequential warnings from gfortran 4.7.2 relating to implicit type conversions in the test programs. * Utilities - In HPXcvt, fixed incorrect axis scaling (CDELT1 and CDELT2) in the XPH header, and set the PCi_ja matrix in the HPX header to a pure 45 degree rotation with appropriate adjustment of CDELT1 and CDELT2 (matching XPH). Also set LONPOLE to 180 degree in the XPH header with adjustment of CRVAL1 as recommended in the errata. These changes prompted by Paddy Leahy. Also, modified the FITS header comment for XPH - it is no longer "experimental", and accept the '-x' option (i.e. without qualification) as equivalent to '-xn'. * User manual - Documentation generation moved to doxygen 1.8.4 (was 1.5.6). WCSLIB version 4.17 (2013/01/29) -------------------------------- * C library - Added wcsfprintf() to wcsprint.h. Now used in wcsbth() and wcspih() to allow diagnostic output to be redirected. Changes provided by Michael Droettboom. WCSLIB version 4.16 (2012/11/07) -------------------------------- * C library - When wcspih() constructs a default coordinate representation it will give it the special name "DEFAULTS", and will not report "Found one coordinate representation" (if reporting is enabled). * Utilities - wcsware has a new option, -P, which does the same as -p except that it won't print a wcsprm struct with the name "DEFAULTS". WCSLIB version 4.15 (2012/09/26) -------------------------------- * C library - Bug fixes in spctype(), spcspxe(), spcxpse, and spctrne() for propagating an error status correctly from lower-level routines. Amendments to the prologues of these routines. Reported by Hans Terlouw. - Similarly for wcsunitse(), wcsulexe(), and wcsutrne(). * PGSBOX - Bug fix in PGSBOX for handling cycles in angle when both world coordinate elements are angular. Reported by Thomas Robitaille. WCSLIB version 4.14 (2012/07/13) -------------------------------- * C library - Problems were caused for fitshdr(), wcsbth(), wcspih(), wcsulex(), datfix() and wcshdo(), by locales such as "fr_FR" in which commas are used to delimit the decimal part of floating point numbers. In particular, these locales adversely affect the behaviour of sscanf() and sprintf() when reading and writing FITS header keyvalues. Thread-safe fixes provided by Michael Droettboom. - Applied astropy patches from Michael Droettboom: attend to compiler warnings in prj.c, spc.c, tab.c, and wcsutil.c, including those for MS-Windows. WCSLIB version 4.13.4 (2012/04/02) ---------------------------------- * Installation - Relaxed the closure tolerance slightly in tlog.f as for tlog.c previously. WCSLIB version 4.13.3 (2012/03/26) ---------------------------------- * Installation - Relaxed the closure tolerance slightly in tlog.c for gcc 4.6.3 on Ubuntu 12.04 (reported by Ole Streicher). WCSLIB version 4.13.2 (2012/03/21) ---------------------------------- * Installation - Changes to configure.ac and the GNUmakefiles to put '-lm' strictly in the correct sequence when producing the sharable library (reported by Ole Streicher). WCSLIB version 4.13.1 (2012/03/15) ---------------------------------- * C library - Workaround in wcserr_set() for an unfortunate compiler segv from gcc 4.2.1 in MacOSX 10.7. WCSLIB version 4.13 (2012/03/14) -------------------------------- * C library - Allow naxis == 0 in wcsini() and linini() for a degenerate coordinate system as may be produced by wcssub(). In wcssub(), ensure that wcsini() is called for coordinate systems with naxis == 0. In wcssptr(), call spcfree() before spcini() to plug a memory leak. WCSLIB version 4.12 (2012/02/29) -------------------------------- * C library - In spctrne(), guard against restfrq == restwav == 0.0 when translating between two velocity-characteristic types, or between two wave-characteristic types (the translation is independent of restfrq and restwav, but a dummy value is needed for intermediate calculations). WCSLIB version 4.11 (2012/02/21) -------------------------------- * C library - Bug fix in spcset() for handling simple linear spectral axes. * Fortran wrappers - Bug fix in spctrne_() for handling ctypeS2. WCSLIB version 4.10 (2012/02/06) -------------------------------- * C library - datfix() and spcfix() now return informative messages when dates and AIPS-convention spectral axes are translated (changes contributed by Michael Droettboom). spcaips() now returns an error status for invalid values of VELREF. - wcssub() has been augmented with the ability to add new axes onto a wcsprm struct. WCSLIB version 4.9 (2012/01/24) ------------------------------- * C library - Fixes to wcsfixi() for collecting the messages properly in the info array (from Michael Droettboom). - Handle certain malformed date strings more gracefully in datfix(). - Make informative messages printed by wcserr_prt() a bit more informative. WCSLIB version 4.8.4 (2011/12/05) --------------------------------- * C library - Fixed the pseudo-random number generator in twcstab.c - gcc 4.6 with '-O2' baulked at testing for signed integer overflow. * Installation - In configure.ac, the Fortran compiler's libraries must be added to the link list when checking for the PGPLOT libraries since gcc is driving the linker. Likewise in C/GNUmakefile when linking test programs that use PGPLOT. - Use 'make CHECK=nopgplot check' to run only the non-graphical tests (even if PGPLOT is available). - After compiling and running the tests, 'make check' now summarizes the non-graphical test results and stops if any failed. WCSLIB version 4.8.3 (2011/11/17) --------------------------------- * C library - Minor generalization of the wcserr diagnostics to allow the return of informative messages, which are associated with negative status values. wcserr_prt() will now recognize and print them as such. Added wcserr_clear() to reset (clear) a wcserr struct. - Modified unitfix() to return an informative message if a units alias is applied, and wcsfixi() to allow such messages to be propagated through the info array (from Michael Droettboom). - Modified twcsfix.c to use wcserr diagnostics, in particular to report units alias translations. * Fortran wrappers - In wcsfix_(), interpret *naxis == 0 as meaning naxis == 0x0, thus causing cylfix() to be skipped. - Modified twcsfix.f to reflect changes made to twcsfix.c. WCSLIB version 4.8.2 (2011/10/04) --------------------------------- * Installation - Changes for Debian package generation contributed by Ole Streicher: - Corrections to 'configure' reported by 'lintian'. - Generate man pages for the utility programs and install them. WCSLIB version 4.8.1 (2011/09/19) --------------------------------- * Installation - Set SONAME in the sharable library in accordance with tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html (reported by Ole Streicher, Debian package maintainer). The sharable library will again be installed with full release number and with a symbolic link from SONAME pointing to it. If defined, SHRLN will point to SONAME. WCSLIB version 4.8 (2011/08/15) ------------------------------- * C library - New error diagnostics mechanism contributed by Michael Droettboom: Most functions that return a numeric status (error) code now also write a detailed error message to a wcserr struct attached to the passed-in *prm struct. See wcserr.h for more information. Functions that didn't have a *prm struct as an argument have no direct way to return an error message. Therefore, these functions now have duplicate versions with the suffix "e" that take an additional "struct wcserr *" parameter. These functions are: spcspx() -> spcspxe() spctrn() -> spctrne() spctyp() -> spctype() spcxps() -> spcxpse() wcsulex() -> wcsulexe() wcsunits() -> wcsunitse() wcsutrn() -> wcsutrne() A new function wcsfixi() was added which is identical to wcsfix() but in addition stores all of the detailed textual messages about the fixes that were performed. - In wcssub(), ensure that wcstab->m_tab has been initialized before trying to free it on status return 12 or 13 (reported by Hans Terlow). - Bug fixes: - In sphx2s() and sphs2x() for the case where |eul[1]| = 180.0. - For parsing AIPS-convention VELREF in wcsbth(). - In spcaips() for translating AIPS-convention CTYPEia without Doppler frame. - Non-graphical test programs now simply report "PASS" if they satisfy the reporting tolerance for closure residuals, etc. Their full output is reported otherwise. Run 'make MODE=interactive check' to revert to the previous behaviour of reporting the full output for tests that succeed. - Eliminated compiler warnings about type-punning of pointer-to- function. * Fortran wrappers Extensive modifications to track the new error handling mechanism in the C library. * Installation - configure now prefers gfortran over g77 if available. - Don't rely on "." being in the PATH if config.status needs to be run in the pgsbox and utils makefile (reported by Peter Teuben). WCSLIB version 4.7 (2011/02/07) ------------------------------- * C library - Bug fix in celset() for interpreting LATPOLEa when LONPOLEa = phi0. Crept in at version 4.4. - Fixed the bounds test on y in hpxx2s() (HEALPix projection) for unconventional values of H and K. In hpxx2s() and hpxs2x(), corrected the offset of the southern polar half-facets for even K. In hpxs2x(), put the phi = 180 meridian in the expected place. - Bug fixes in tabx2s() and tabs2x() for default indexes (reported by David Berry). In tabs2x(), if no solution is found then do minor extrapolation past the ends of each row (1-D case only). Sped up tabs2x() by about 50%. - New functions wcsprintf(), wcsprintf_set(), and wcsprintf_buf(), declared in wcsprintf.h, provide control over the disposition of output from celprt(), linprt(), prjprt(), spcprt(), tabprt(), and wcsprt() routines. Prompted by Michael Droettboom, with an initial implementation. * Fortran wrappers - In the various test programs, used EQUIVALENCEs to ensure that the CEL, LIN, PRJ, etc. arrays are aligned on a DOUBLE PRECISION boundary. * PGSBOX - Bug fix for the case where NG1 == 0 and GRID1(0) < 0, and likewise for NG2 and GRID2. * Utilities - In wcsware, added a '-w' option to convert world coordinates obtained from stdin to pixel coordinates using wcss2p(). Allow multiple sets of input coordinates with the '-x' and '-w' options and report the value of the intermediate world coordinates. * User manual - Fixed list formatting for function return values < 0 or > 9. - New section for wcsprintf() and related routines. * Installation - Changes prompted by Sébastien Fabbro for the Gentoo Linux package: a) autoconf updates, b) respect LDFLAGS when building the shared library, c) install documentation, d) recognise DESTDIR for doing a staged installation. - As of this release, the minor WCSLIB version number (second field) will be incremented if and only if a change is made that affects the library itself, not the documentation or utilities. The version number on the installed libraries and header files will omit the patch number (third field). WCSLIB version 4.6.3 (2010/11/24) --------------------------------- * C library - Bug fix in wcsbth() for handling the inheritance of image header keywords (uncovered by valgrind, reported by Jim Lewis). WCSLIB version 4.6.2 (2010/11/22) --------------------------------- * C library - Fixed a memory leak in wcsbth.l (reported by Jim Lewis). WCSLIB version 4.6.1 (2010/11/18) --------------------------------- * Fortran wrappers - Fixed typos in cel_f.c, celget[cdi] -> celgt[cdi]. WCSLIB version 4.6 (2010/11/16) ------------------------------- * C library - In wcsulex.l and wcsutrn.l, stdlib.h must be included explicitly before the redefinition of exit() - most versions of flex do include it upfront but some don't (reported by Peter Williams). * Fortran wrappers - Changes intended to avert nuisance compiler warnings that could potentially obscure warnings indicative of a genuine problem: - To stop messages about unused variables when the relevant compiler option is set, e.g. 'g77 -Wunused', the various *_ERRMSG arrays defined in the Fortran include files and (formerly) initialized therein via DATA statements, e.g. PRJ_ERRMSG in prj.inc, have now been placed into COMMON blocks with names such as PRJ_DATA, and are initialized via DATA statements in BLOCK DATA subprograms defined in separate files, e.g. prj_data.f. - To stop messages about subroutines being invoked with inconsistent argument lists if the relevant compiler option is not set, e.g. 'g77 -Wno-globals', the C wrapper functions that take 'void *' arguments now have separate forms for INTEGER, DOUBLE PRECISION, and CHARACTER arguments that simply invoke the generic function. Application code must be modified to take advantage of this. * User manual - In the section on the Fortran wrappers in the manual, warn about the need for the INTEGER array holding a data structure to be aligned on a DOUBLE PRECISION boundary. WCSLIB version 4.5.6 (2010/10/28) --------------------------------- * Installation - Fixed the search for CFITSIO and PGPLOT library and include directories. WCSLIB version 4.5.5 (2010/10/14) --------------------------------- * Installation - Build the PGSBOX sharable library. WCSLIB version 4.5.4 (2010/09/28) --------------------------------- * C library - In wcshdo(), according to the FITS standard, "Letters in the exponential form ('E' or 'D') shall be upper case" (reported by Michael Droettboom). WCSLIB version 4.5.3 (2010/09/23) --------------------------------- * Utilities - Various improvements to wcsgrid: correct the scaling set via cpgwnad(); label angles other than RA,Dec in decimal degrees; draw the projection boundary for projections other than zenithals. WCSLIB version 4.5.2 (2010/09/23) --------------------------------- * C library - Fixed the translation of GLS to SFL in wcsset() and celfix() when the reference longitude is non-zero - it introduces an offset in longitude in the normal way. (This undoes part of the change applied in version 4.4.) WCSLIB version 4.5.1 (2010/08/12) --------------------------------- * C library - New utility function, sphpad(), computes the coordinates of points offset by given angular distances and position angles from a given point on the sky (complementary to sphdpa()). * Fortran wrappers - New wrapper function: - SPHPAD for sphpad(). WCSLIB version 4.5 (2010/07/16) ------------------------------- * C library - Fixed the interpretation of VELREF when translating AIPS-convention spectral types. Such translation is now handled by a new special- purpose function, spcaips(). The wcsprm struct has been augmented with an entry for velref which is filled by wcspih() and wcsbth(). Previously, selection by VELREF of the radio or optical velocity convention for type VELO was not properly handled. * Fortran wrappers - New wrapper function: - SPCAIPS for spcaips(). - Changed spc.inc, spc_f.c, wcs.inc and wcs_f.c to track VELREF changes. - Declared functions external in the include files to avoid compiler warnings about unused variables (if the particular option is set). * Utilities - Added a '-q' option to fitshdr to quit after a specified number of HDUs. WCSLIB version 4.4.4 (2009/09/14) --------------------------------- * Installation - Added more configure options for controlling the build: --disable-fortran, --disable-utils, --without-cfitsio, and --without-pgplot. WCSLIB version 4.4.3 (2009/09/03) --------------------------------- * C library - Set wave number units to "/m" in spctyp(), was "1/m" which is not strictly legal and wasn't handled by wcsulex() (reported by Hans Terlow). Also fixed a number of units specifications in the prologue of spx.h to conform with Paper I usage. - In wcsulex(), allow unit strings like "1/m" in addition to "/m", provided that the superfluous "1" is the first non-blank character in the expression, or parenthesised sub-expression. - In wcssptr(), ensure that i is always reset if given < 0. * User manual - Augmented the list of FITS WCS and related software in the manual. WCSLIB version 4.4.2 (2009/08/13) --------------------------------- * C library - In sphx2s() and sphs2x(), handle the case where |eul[1]| = 180.0 separately for speed and accuracy. This change also fixes a rare and subtle bug in cels2x() that occurs when celprm::isolat is set and the magnitude of the first latitude in the lat[] vector exceeds 90 deg (reported by Hans Terlouw). * Installation - Fix relating to creation of symlinks when installing the libraries. WCSLIB version 4.4.1 (2009/08/11) --------------------------------- * Installation - Fixes for installation of the CHANGES file and for the creation of a symbolic link for the sharable library if one already exists. WCSLIB version 4.4 (2009/08/10) ------------------------------- * C library - Creation of WCSLIB user manual from the header file prologues using a special-purpose parser, doxextr, and sed scripts to generate input for doxygen. This required minor formatting changes to all prologues plus miscellaneous changes such as naming of arguments in function prototypes. - Bug fix in wcsset() that affected handling of PROJPn (deprecated) and PVi_ma attached to the longitude (not latitude) axis. Guard against long strings when copying the projection code. In wcs_types(), allow for early Paper IV distortion codes (e.g. "RA---TAN-SIP") when parsing CTYPEia. - Use sincos() whereever possible for a ~15% speedup (patches for cel.c, prj.c and sph.c supplied by Michael Droettboom). configure checks for, and uses it automatically if available. - Fixed the translation of GLS to SFL in wcsset() and celfix() when the reference longitude and latitude are non-zero. (In the AIPS convention, this simply translates the reference point, i.e. the map as a whole, to those coordinates without creating an oblique grid.) - Bug fix in prjoff(), a utility function used by the prj routines. It forces (x,y) = (0,0) at (phi_0,theta_0) when the latter are set by PVi_[012]a attached to the longitude (not latitude) axis. Rarely used in practice. - New utility function, sphdpa(), computes the distance and position angle from a point on the sphere to a set of field points. - In sphx2s() and sphx2s(), handle a simple change in origin of longitude using a short-cut calculation for speed and accuracy. Similarly in celset(), check whether phip == phi0 when computing latp and if so use a short-cut that ensures latp == 90.0 (exactly) if lat0 == theta0. The resulting spherical rotation then becomes a simple change in origin of longitude. In particular, these changes should assist PGSBOX in drawing grid lines of +/-180 longitude, to prevent flip-flopping between one and the other. - wcsbth() & wcspih(): resolved an inconsistency between the documentation and code by renamimg WCSHDR_VSOURCEa as WCSHDR_VSOURCE. - Flex code: moved declaration of helper functions out of global scope. - Fixed the call to wcss2p() in twcshdr (in a section of code not usually exercised). * Fortran wrappers - New wrapper functions: - WCSBTH for wcsbth(), - WCSBDX for wcsbdx(), - CDFIX for cdfix(), - SPHDPA for sphdpa(). - Updated WCSLEN (in wcs.inc) and added WCS_COLAX and WCS_VELANGL to match changes to wcsprm made in v4.3 with corresponding changes to the wrapper functions. Likewise updated TABLEN (in tab.inc) for changes to tabprm, and added CEL_LATPREQ for celprm. - Struct lengths (WCSLEN, PRJLEN, etc.) are now long enough to accomodate 64-bit machines. - Updated the flag bits for the RELAX argument in wcshdr.inc to reflect changes to wcshdr.h made in v4.3. Renamed WCSHDR_VSOURCEa to WCSHDR_VSOURCE for consistency with the C library. * PGSBOX - Improved grid labelling, particularly in minimizing the number of fields required in sexagesimal labels. * Utilities - New utility program: - wcsware extracts the WCS keywords for an image from the specified FITS file, constructs wcsprm structs for each coordinate representation found, and performs a variety of operations using them. - Old utility programs (first appeared in 4.3 but were not recorded): - HPXcvt reorganises HEALPix data into a 2-D FITS image with HPX coordinate system. - wcsgrid extracts the WCS keywords for an image from the specified FITS file and uses pgsbox() to plot a 2-D coordinate graticule for each alternate representation found. - fitshdr lists headers from a FITS file specified on the command line, or else on stdin, printing them as 80-character keyrecords without trailing blanks. * Installation - New configure options, --with-pgplotinc, --with-pgplotlib, --with-cfitsioinc and --with-cfitsiolib allow additional directories to be added to the library and include file search path. - Miscellaneous fixes and improvements to the installation process. - Generate a metadata file for pkg-config. - Added 'make MODE=interactive check' to run the test programs in interactive mode rather than batch. - Merged the separate CHANGES files for C, Fortran and PGSBOX into one (this), with a new section for utilities. WCSLIB version 4.3.3 (2009/04/30) --------------------------------- * C library - fitshdr.l, wcsbth.l, and wcspih.l: use setjmp/longjmp to preempt the call to exit() which is hard-coded in function yy_fatal_error() supplied by flex. - wcspih.l: if NAXIS is non-zero but there were no WCS keywords at all in the header then create a default WCS with blank alternate version. WCSLIB version 4.3.2 (2009/03/16) --------------------------------- * C library - utils/GNUmakefile: create BINDIR if necessary prior to installing utilities. WCSLIB version 4.3.1 (2008/09/08) --------------------------------- * Installation - Top-level GNUmakefile: install header files. WCSLIB version 4.3 (2007/12/27) ------------------------------- * C library - A new general WCS header parser wcsbth() handles binary table image arrays and pixel lists as well as image array headers. Added "colax" to the wcsprm struct to record the column numbers for each axis in a pixel list. - New function wcsbdx() is the analog of wcsidx() for the array of wcsprm structs returned by wcsbth(). - New function wcshdo() writes out a wcsprm struct as a FITS header. - Changes to wcspih(): - Bug fix, check for a == 0 (indication of a keyword that applies to all alternates) in internal helper function wcspih_naxes() (reported by Craig Markwardt). - Added a new ctrl option to remove valid WCS keyrecords except for those with a more general role, namely {DATE,MJD}-{OBS,AVG} and OBSGEO-{X,Y,Z} (suggested by Jim Lewis). - Added a rule for VELANGLa. Also added "velangl" to the wcsprm struct. - Do checks on the i, k & m keyword parameters in . - Fixed the test for repeated blanks in the NAXIS and WCSAXES patterns. - Fixed three rules to allow m == 0. - Reworked the implementation notes in the prologue. - The flex scanners, fitshdr.l, wcsbth.l, wcspih.l, wcsulex.l, and wcsutrn.l, invoke yylex_destroy() before returning to avoid a 16kiB memory leak. This was reported by several people, however it may be problematic depending on the version of flex used - version 2.5.9 or later is required. If this is not available, C sources pre- generated by flex 2.5.33 will be used. - In wcs.c, don't define the signbit macro if already defined (for MacOSX). - In wcs.h, documented wtbarr namespace issues in C++. - In wcsset(), always set wcsprm.cunit[i], if possible (primarily for use by wcshdo()). - In wcsfix.c, parenthesised a boolean expression that was otherwise incorrect. - Fixed an obscure floating point rounding error in celset() that appeared with -O2 optimization in gcc v3.3.5 (Linux). - prjset() now correctly propagates the status value returned by the specific projection-setting functions (reported by Bill Pence). - Bug fix in hpxx2s(), also added bounds checking. Minor efficiencies in carx2s() and merx2s(). - In the various functions that print the contents of the structs, use the "%p" printf conversion specifier to print addresses rather than casting the pointer to int and using "#x". The latter does not work on 64-bit machines where sizeof(int) != sizeof(void*). - Reorganized the various structs to get alignment on 64-bit machines. - All header file prologues now reference the README file for an overview of the library. - Miscellaneous portability fixes for 64-bit, MacOSX, OSF compiler, etc. - Elimination of compiler warnings, e.g. parenthesised assignments used as truth values (a favourite gcc gripe!), etc. - Process flex descriptions using a newer version of flex, primarily for MacOSX. However, the processed files are now only used when flex 2.5.9 or later is not available. - Removed WCSLIB 2.x backwards-compatibility measures from lin.h, prj.h, prj.c, and sph.h. * Fortran wrappers - (No substantive changes.) * PGSBOX - Miscellaneous improvements to PGSBOX. * General - Switched licensing to LGPL 3.0. - In comment text, replaced use of the obsolete term "card" with "keyrecord" which consists of a "keyword", "keyvalue", and "keycomment". * Installation - General improvements to the installation process: autoconf-related portability improvements, particularly relating to Fortran name mangling; makefile rules for building the shared library, for processing flex descriptions; don't rely on "." being in the PATH when running tests. WCSLIB version 4.2 (2005/09/23) ------------------------------- * C library - Brought the installation process under control of GNU autoconf, the top-level makefile now builds and tests everything, and the C library has a config.h in which WCS_INT64 is set. Added an INSTALL file. - Merged the FORTRAN, C and PGSBOX READMEs into one top-level README. - Extensions for -TAB coordinate handling: in tabx2s() and tabs2x(), allow extrapolation by half a cell at either end of the index and coordinate tables; fits_read_wcstab() (in getwcstab.{h,c}) allows TDIMn to be omitted for 1-D lookup tables for which it has the form '(1,K)', i.e. describing a degenerate 2-D array; wcsprt() now prints the wtbarr structs in wcsprm. - Bug fixes for -TAB coordinate handling: in tabx2s() and tabs2x() the incorrect indexing variable, m instead of i, was used for tab->crval[]; wcsp2s() and wcss2p() returned prematurely in the tabular coordinate loop; in wcstab(), removed an extraneous assignment to wtbp->kind for index arrays. - In wcsp2s() and wcss2p(), elements of the stat[] vector that had been set were being reset incorrectly to zero. The stat[] values are now set as flag bits for each coordinate element. - Added cdfix() to the wcsfix() suite to fix erroneously omitted CDi_ja cards. - PGSBOX is now compiled into a separate object library, and is installed alongside WCSLIB. - Eliminated several instances of non-ANSI C library functions and header files and some residual K&R C usage. The Sun C compiler complained about const int definitions of initializers used in variable declarations in some of the test programs; changed these to preprocessor macros. * Fortran wrappers - Fixed handling of 64-bit integer keyvalues in keyget_(). - Fixed output formatting of 64-bit integer keyvalues in tfitshdr.f. - Fixed minor syntax errors in twcsfix.f and tpih1.f reported by the Sun Fortran compiler. - The output of each test program now identifies the source file. * PGSBOX - (No substantive changes.) WCSLIB version 4.1 (2005/08/31) ------------------------------- * C library Summary of added functionality: - -TAB coordinate axes are now fully implemented in the WCSLIB driver functions (in wcs.{h,c}); multiple -TAB axes are supported. A new function, wcstab(), which is automatically invoked by wcspih(), parses -TAB-related header cards and sets up structs for a separate routine that reads the necessary arrays from a FITS binary table extension. An implementation of this routine in CFITSIO, fits_read_wcstab(), is provided. Note however that the interface of this function is experimental, and the code itself must be considered beta-release in WCSLIB 4.1. - Units specifications, either from CNAMEia or inline comments (with brackets), of arbitrary complexity are now fully implemented via a parser, wcsulex(), and converter, wcsunits(). This is invoked automatically by wcsset(). - Translators for non-standard WCS constructs are provided. These cover date formats, units specifications, defunct celestial projection types, AIPS spectral axis types, and the repair of malformed cylindrical coordinate systems. - wcspih() now has options to remove the WCS cards it has processed from the header and a new generic FITS header parser, fitshdr(), may be used to parse the remaining non-WCS cards. In addition to the more basic types, it handles 64-bit and 'very long' (70 digit) integer keyvalues, and also continued string keyvalues. It also does keyword matching and extracts units specifications in inline comments. - -LOG coordinates are now implemented independently of spectral coordinate types. Multiple -LOG axes are supported. - New function wcssptr() translates the spectral axis in a wcsprm struct to the required type. - The README file now gives an introduction to, and complete overview of, WCSLIB. It provides a point of entry to programming with WCSLIB. Complete descriptions and usage notes for all functions are contained in the header files. - The FORTRAN wrappers and test programs are now completely up-to-date with respect to the C implementation. - All code, including the FORTRAN wrappers, PGSBOX, and all test programs, now pass 'purify' without memory leaks, uninitialized memory reads, memory access violations, or other memory faults. Change notes: - Added options to wcspih() to remove WCS cards from the input header leaving only non-WCS cards behind. Modified test programs tpih1.c and tpih2.c to use CFITSIO optionally via preprocessor macro DO_CFITSIO. - New function wcstab() in wcshdr.{h,c} parses -TAB-related header cards and sets up structs for a separate routine that reads the necessary arrays from a FITS binary table extension. New test/demo program twcstab.c using header defined in wcstab.cards. - CFITSIO implementation, fits_read_wcstab() in getwcstab.{h,c}, of a function, independent of WCSLIB, for extracting arrays from a binary table as required in constructing -TAB coordinates. - New units specification parser, wcsulex() in wcsunits.h and wcsulex.l, and converter, wcsunits() in wcsunits.{h,c}. New test/demo program tunits.c. - New parser for non-standard units specifications, wcsutrn() in wcsunits.h and wcsutrn.l, also tested by tunits.c. - New functions datfix(), unitfix() (which applies wcsutrn()), celfix(), and spcfix() join cylfix() in wcsfix.{h,c} to translate various forms of non-standard or quasi-standard FITS WCS keyvalues in a wcsprm struct. wcsfix() applies all of these in sequence. New test/demo program twcsfix.c, with wcsfix() also now invoked by tpih1.c. - New generic FITS header parser, fitshdr() in fitshdr.{h,l}. New test/demo program tfitshdr.c uses wcs.cards with extra non-WCS cards added. - -LOG coordinates are now treated as a coordinate type separate from spectral coordinates, implemented via log.{h,c} and test program tlog.c. The logarithmic functions were removed from spx.{h,c}, and spc.c. - Extensive changes to wcs.{h,c} to support multiple -TAB and -LOG coordinate axes and units conversion. Substantially changed the test program, twcs.c, to test the more general functionality. - New function wcssptr() in wcs.{h,c} translates the spectral axis in a wcsprm struct. - Added DATE-AVG to wcsprm. Also ntab, tab, nwtb, and wtb required for -TAB implementation. Define struct wtbarr. - Added a types[] member to the wcsprm struct to identify axis coordinate types using a four-digit code. - Use memset() in wcsini() to null-fill character arrays in the wcsprm struct so that they don't appear to be padded with garbage when displayed by gdb. - Do alias translation for AIPS-convention spectral types in wcsset() using spctyp(). If wcsset() finds a CTYPEia in "4-3" form with an unrecognized algorithm code it now returns an error rather than assume that it's a linear axis. wcsset() now also resets lonpole and latpole to the values actually used. - Modified spctyp() to translate AIPS-convention spectral ctypes, and modified the argument list to return the parsed spectral type and algorithm code. The return arguments will not be modified if CTYPEia is not a valid spectral type; zero-pointers may be specified for any that are not of interest. Removed the external const variables, spc_codes and spc_ncode, as their function is now fulfilled by spctyp(). - Fixed a bug in spctrn() in resolving ctypeS2 wildcarding. - Added latpreq member to the celprm struct, set by celset() to indicate how LATPOLE is used. Augmented tcel2.c to report it. - New function tabmem() in tab.{h,c} takes control of user-allocated memory. - tabini() allows K == 0 and also K[m] == 0 to initialize partially the tabprm struct (for wcstab()). It now does fine-grained bookkeeping of memory allocation for the index arrays and allocates each individually. tabprm.index[] == 0x0 is recognized as default indexing in tabset(), tabx2s() and tabs2x(). - The *prt() functions report parameters to an extra decimal place. - tabprt() prints the array index for elements of the coordinate and index vectors. - Set the 0th element in all *_errmsg arrays to "Success". - Extracted string utility functions used by WCSLIB into wcsutil.{h,c}. - Removed support for K&R C. * Fortran wrappers - The FORTRAN wrappers and test programs are now completely up-to-date with respect to the C implementation. - New include files, wrappers, and test programs: fitshdr.inc, fitshdr_f.c, getwcstab.inc, getwcstab_f.c, log.inc, log_f.c, sph.inc, tab.inc, tab_f.c, tfitshdr.f, tlog.f, ttab1.f, ttab2.f, ttab3.f, tunits.f, twcsfix.f, twcstab.f, wcsfix.inc, wcsfix_f.c, wcsunits.inc, wcsunits_f.c. - Updates to reflect changes to the C library and test programs: cel.inc, cel_f.c, prj.inc, spc.inc, spc_f.c, spx.inc, spx_f.c, tlin.f, tpih1.f, tpih2.f, tprj1.f, tprj2.f, tspc.f, tsph.f, tspx.f, twcs.f, twcsmix.f, twcssub.f, wcs.inc, wcs_f.c, wcshdr.inc, wcshdr_f.c. - Added *_ERRMSG arrays containing status messages to all include files. - Removed support for K&R C. * PGSBOX - Fixed a subtle though benign memory fault identified by 'purify'. - Reset LATPOLE in the COE example in cpgtest.f when drawing the second (native) grid because it will have been set to a non-default value by wcsset() when the first grid was drawn; set wcs.flag to -1 before wcsinit() and call wcsfree() at the end. Similarly for pgtest.f. WCSLIB version 4.0 (2005/02/07) ------------------------------- * C library - Implemented tabular coordinates (-TAB). New files: tab.h and tab.c, and test programs ttab[123].c. These have not been incorporated into the higher-level (wcs.h) functions at this stage. - New spectral functions: spchek() checks a spectral algorithm code for legitimacy; from the spectral keywords given, spcspx() derives the corresponding CRVALi and CDELTi keywords for the underlying P-, and X-type spectral coordinates; spcxps() does the opposite; spctrn() combines spcspx() and spcxps() to translate one set of spectral keywords into another, e.g. 'FREQ' -> 'ZOPT-F2W'. - Implemented the HEALPix (HPX) projection in the prj functions. - Added a new function, wcsidx(), to return an array that indexes the alternate coordinate descriptions found by wcspih() (suggested by Bill Pence, NASA/Goddard). Modified tpih1.c to exercise it. - In wcsp2s() and wcss2p(), check that nelem equals or exceeds wcs.naxis; emphasised this in the usage notes for these functions in tab.h (suggested by Bill Pence, NASA/Goddard). - Moved the macros used for UNDEFINED values and the corresponding macro test function, undefined(), to wcsmath.h for general use. Previously, UNDEFINED values were only used internally, but they are now visible in some of the structs, particularly values of undefined auxiliary header cards in the wcsprm struct. - Remove const from the double args in the specx() prototype in spx.h to match the definition in spx.c (reported by Bryan Irby, NASA/Goddard). - Fixed the interaction between the FLAVOUR and PGPLOTLIB definitions in the C and FORTRAN Makefiles by introducing a separate variable, DO_PLOTS, to control whether to exercise test programs that require PGPLOT (reported by Bill Pence, NASA/Goddard). * Fortran wrappers - New wrapper defined in wcshdr_f.c: wcsidx_(). Modified test program tpih1.f to use it. * PGSBOX - (No substantive changes.) * General - Changed the copyright notice in all library routines from LGPL to GPL as recommended by the FSF (http://www.gnu.org/licenses/why-not- lgpl.html). * Installation - General improvements to the installation process: fixed the interaction between the FLAVOUR and PGPLOTLIB definitions in the Makefile by introducing a separate variable, DO_PLOTS, to control whether to exercise test programs that require PGPLOT (reported by Bill Pence, NASA/Goddard). Added an "install" target to the Makefile. WCSLIB version 3.6 (2004/08/25) ------------------------------- * C library - New service routine, wcssub() extracts the coordinate description for a subimage from a wcsprm struct. wcscopy() is now implemented as a preprocessor macro that invokes wcssub(). New test program, twcssub.c, tests wcssub(). - In wcspih(): 1) Fixed handling of string-valued keywords where the inline comment contains a single-quote character ('). 2) Fixed the address arithmetic for EPOCH and VELREF. 3) Translate VSOURCEa into ZSOURCEa if required. 4) Recognize SSYSSRCa. 5) Support free-format string keyvalues, as well as integer and floating-point keyvalues; documented this in the prologue of wcshdr.h. 6) Allow header cards without inline comments. 7) Fixed function prototyping in wcspih.l (i.e. ANSI and non-ANSI forms were potentially mixed). 8) Catch an unhandled newline character on the END card that was echoed to stdout. 9) In error messages, print "ERROR" (uppercase) - POSIX standard. - Modified wcs.cards to explain and test free-format keyvalues, and also augmented the inline comment on illegal WCS cards that are to be rejected, and WCS-like cards to be discarded. Added a header card with no inline comment. - Removed vsource from the wcsprm struct and added ssyssrc. - In wcsini(), fixed a problem with memory management for wcs.pv when NPVMAX is zero; likewise for wcs.ps and NPSMAX. - In wcsprt(), don't print auxiliary coordinate system information in arrays with zero address. - In wcss2p(), status == 9 (one or more invalid world coordinates) was not returned appropriately. - Renamed twcs1.c to twcs.c, and twcs2.c to twcsmix.c. - "Error status/code/number" is now referred to consistently as the "status return value". - Some vestiges of K&R C were removed: preprocessor definition of const, and K&R function prototypes. * Fortran wrappers - New wrapper defined in wcs_f.c: wcssub_(). New test program, twcssub.f. - Renamed twcs1.f to twcs.f, and twcs2.f to twcsmix.f. * PGSBOX - (No substantive changes.) * Installation - Worked over the C, FORTRAN, and PGSBOX makefiles, in particular to make them all consistent. WCSLIB version 3.5 (2004/06/28) ------------------------------- * C library - WCSLIB now provides a function, wcspih() implemented as a Flex description, that parses a FITS image header, either that of a primary HDU or an image extension. Given a character array containing the header it identifies and reads all WCS cards for the primary coordinate description and up to 26 alternate descriptions and returns this information as an array of wcsprm structs. A service routine, wcsvfree(), is provided to free the memory allocated by wcspih(). The relevant header file for these functions is wcshdr.h. Test programs, tpih1 and tpih2, are provided to verify wcspih. The first simply prints the contents of the structs using wcsprt(). The second uses cpgsbox() to draw coordinate graticules. A FITS WCS test header has been developed to provide input to these test programs. It is implemented as a list of card images, wcs.cards, one card per line, together with a program, tofits, that compiles these into a valid FITS file. tpih1 uses its own code to read this, whereas tpih2 uses the fits_hdr2str() function from CFITSIO. - Removed twcsprt, tpih exercises wcsprt() much more thoroughly than twcsprt ever did. Modified twcs1 to print the size of the various structs as twcsprt used to. - Although they are not used in any coordinate calculations, the wcsprm struct now provides data members for storing all of the auxiliary FITS WCS header cards defined in Papers I, II, and III, such as WCSNAMEa, EQUINOXa, and CNAMEia. Members are also provided for storing the alternate descriptor code (the "a" in CTYPEia), and the binary table column number. These are supported by the high level WCSLIB routines, wcsini(), wcscopy(), wcsfree(), and wcsprt(). Refer to wcs.h for details. - The number of PVi_ma cards for which wcsini() allocates memory is now set by a global variable, NPVMAX (previously a C-preprocessor macro). This defaults to 64 but may be changed by a new function, wcsnpv(). The wcsprm struct contains a new member, npvmax, that records the value of this number at the time the struct was initialized. This is in addition to npv which records the actual number of cards that were encountered. Similarly, NPSMAX (default 8) is used for the number of PSi_ma cards, and it may be changed via wcsnps(). The axis number, i, in the pvcard struct used for storing PVi_ma cards may now be set to 0 to indicate the latitude axis. - calloc() is now used in place of malloc() in allocating memory for arrays, and inclusion of malloc.h has been replaced with stdlib.h for all platforms. wcsfree() checks that wcs.flag != -1 before testing wcs.m_flag when freeing memory allocated by wcsini() in case the struct is uninitialized. Similarly for linfree(). - In prj.h, renamed C-preprocessor macros INI, PRT, SET, X2S and S2X to PRJINI, PRJPRT, PRJSET, PRJX2S and PRJS2X to reduce the likelihood of namespace clashes. Similarly in spc.h. Also, in prj.c, changed the name of helper routine offset() to prjoff() to reduce the likelihood of global namespace conflicts. - In line with bonx2s() and bons2x(), bonset() now recognizes the equatorial case of Bonne's projection as Sanson-Flamsteed, mainly so that the auxiliary information in the prjprm struct more accurately reflects the truth. Modified tcel2 to exercise this by using an equatorial Bonne projection in place of the Hammer-Aitov. - zpns2x() used prj.w[0] for bounds checking, though this had not been set by zpnset() for polynomials of degree N < 3. Consequently, bounds checking for N < 3 was unreliable (reported by David Berry, STARLINK). - Changed some variable names in tscs2x(), cscx2s(), cscs2x(), qscx2s(), and qscs2x() to match Paper II, and likewise changed some inequality tests in qscs2x() without changing the results. - Minor tidying up of output formatting in prjprt(). - Added the alternate version code to FITS WCS keywords mentioned in comments, e.g. CTYPEi changed to CTYPEia. * Fortran wrappers - New wrappers defined in wcshdr_f.c: wcspih_() and wcsvfree_(), and also a new service function, wcsvcopy_(). New test programs, TPIH1 and TPIH2, being analogues of tpih1 and tpih2. Removed TWCSPRT. - In wcs_f.c, new wrappers wcsnpv_() and wcsnps_(); modified wcsput_() and wcsget_() to handle new members of the wcsprm struct. Also modified wcsput_() to null-fill all char[] members of the wcsprm struct, and likewise wcsget_() to blank-fill them. - Modified wcs.inc to support changes to the wcsprm struct. * PGSBOX - In PGSBOX, increased the dimension of the WORLD and XY vectors from 2 to 9 to accomodate higher-dimensional coordinate representations of up to 9 elements. Similarly for pgwcsl(). The assumption (presently) is that the first two world, and pixel, coordinate elements are the relevant ones; the others are all set to zero when pgwcsl() initializes and otherwise ignored. Assigned some variables in DATA to stop compiler messages about uninitialized variables. - Generalized the Makefile, bringing it into line with the WCSLIB Makefile, and adding separate targets for compiling and running the test programs. The default target now simply compiles pgsbox.c and cpgsbox.c. A separate target compiles pgwcsl.c and inserts it into ../C/libwcs.a. WCSLIB version 3.4 (2004/02/11) ------------------------------- * C library - In aitx2s(), apply the boundary condition 0.5 <= Z^2 <= 1 given after Eq. (109) in WCS Paper II to detect outlying pixels. - Fixed several special-case bugs in celset(): 1) For theta_0 = 90, in substituting the default value for phi_p (LONPOLE), a) for the special case when delta_0 = 90, celset() provided the wrong value (180 instead of 0), b) celset() neglected to add phi_0 (normally 0). 2) For theta_0 != 90, a) for the special case when delta_0 = -90, celset() incorrectly computed delta_p (as theta_0 instead of -theta_0), b) for the special case when delta_p = +90 (or -90), celset() neglected to subtract (or add) phi_0 (normally 0). 3) For |delta_0| = 90, celset() incorrectly allowed the particular, invalid, value of phi_p (LONPOLE) that put the other pole at the fiducial point. 4) For theta_0 = 0, delta_0 = 0 LATPOLE determines delta_p completely. For LATPOLE > 90 celset() now sets delta_p to 90, and for LATPOLE < -90 it sets it to -90. - Additional refinements in celset(): 1) cel->ref[2] is normalized in the range [-180,180]. 2) Account for rounding error in the computation of delta_p. - sphx2s() and sphs2x() incorrectly handled the "change in the origin of longitude" special case that arises when delta_p = -90, in the even more restrictive case where |theta| = 90 also; it applied Eq. (3) instead of Eq. (4) of Paper II. - Added a new test program, tcel2.c, to exercise celset() more thoroughly. Renamed the original tcel.c to tcel1.c and modified the Makefile to suit. * Fortran wrappers - (No changes.) * PGSBOX - (No substantive changes.) WCSLIB version 3.3 (2003/10/21) ------------------------------- * C library - In celset(), the default value for phi_p (LONPOLE) is phi_p = phi_0 + ((delta_0 < theta_0) ? 180.0 : 0.0) Previously phi_0 (which is normally zero) was not added (reported by David Berry, STARLINK). - wcsprt() and linprt() now check that the structs have been initialized. - In wcsini(), when the wcsprm flag is -1 also set the linprm flag to -1 to force initialization of the memory managed by linset(). - wcsset() now explicitly initializes the celprm and spcprm structs via celini() and spcini(). - Fixed syntax errors in the macro definitions of linrev_errmsg and linfwd_errmsg. - In Makefile, added the -ansi option to gcc to force it to behave like a strict ANSI C compiler, specifically in setting the __STDC__ preprocessor macro. * Fortran wrappers - (No changes.) * PGSBOX - PGSBOX now recognizes status returns -1, -2, and -3 from NLFUNC for opcodes +2 and +1 which cause it to accept the returned (x,y) coordinates but not consider them as one end of a crossing segment for labelling world coordinate 1, 2, or both. - PGSBOX now takes care not to lose vertical tick marks (and hence labels) at the left or right edge of the frame. Likewise for horizontal tick marks at the top or bottom edge of the frame. - Tightened up the test in PGSBOX for cycles in angle to catch the case where the coordinate value spans a full 360 degrees. - PGSBOX will no longer accept frame crossings that are too oblique; floating point rounding errors may cause grid lines that should otherwise track along the frame to weave down it from side-to-side resulting in spurious crossing points. - Fixed a bug in pgwcsl_() for processing simple linear coordinates. - pgwcsl_() now returns error -2 if the latitude is outside -90 to +90 for opcodes +2 and +1. - Amended the translation of status return codes from WCSLIB in pgwcsl_(). - Provided a header file for pgwcsl_() (mainly for C++ usage). - Added extra test plots to PGTEST and cpgtest. - Added extra functionality to the Makefile. WCSLIB version 3.2 (2003/09/09) ------------------------------- * C library - Added the facility of setting the flag member of a wcsprm struct to -1 before calling wcsini() for the first time in order to initialize memory management. Likewise for linprm and linini(). - Renamed wcscpy() to wcscopy() to avoid a conflict with the Posix "wide character string" function of the same name (wchar.h). In particular, this is used by the GNU C++ string class. - The higher level functions (wcs, cel, spc) no longer return prematurely if some of the input coordinate values are invalid. - All functions now test whether a null pointer for the particular struct (wcsprm, celprm, etc.) has been passed to them. - Function return codes have been rationalized into a consistent set within each of the wcs, cel, lin, prj, spc, and spx suites of functions. Error messages to match these error codes are now encoded in a single character array, e.g. wcs_errmsg and prj_errmsg, instead of a separate array for each function. Macro definitions for the older character arrays (e.g. wcsini_errmsg) have been provided for backward compatibility. - Declared prj_stat as extern in prj.h. * Fortran wrappers - (No changes.) * PGSBOX - Added an ENTRY point, PGLBOX, that provides a simplified interface to PGSBOX for linear axes without having to specify an NLFUNC or the associated parameters. WCSLIB version 3.1 (2003/04/29) ------------------------------- * C library - Added "global" and "divergent" prjprm struct informational members to record whether the projection is capable of mapping the whole sphere, and whether it is divergent in latitude. - Function cylfix() provided to fix WCS FITS header cards for malformed cylindrical projections (c.f. Paper II, Sect. 7.3.4). - Added support for CUNITi cards to wcsprm (but not currently implemented). - Added macro implementations of the trigd functions to wcstrig.h, enabled if WCSTRIG_MACRO is defined. - Improved printing of the WCSLIB structs. - Added macro definitions for the lengths of the WCSLIB structs measured in sizeof(int) units (mainly for the FORTRAN wrappers). * Fortran wrappers - FORTRAN is now supported via a set of wrappers on the C library. Refer to the README file. * PGSBOX WCSLIB version 3.0 beta release (2003/04/01) -------------------------------------------- * C library - Fully vectorized function interfaces (C preprocessor macros are available to implement the scalar interfaces of the proj.c, sph.c, and lin.c routines from WCSLIB 2.x). - Implementation of Paper II, Sect. 2.5: User-specified (phi0, theta0). - Implementation of Paper III (excluding "-TAB"). - Memory management is now implemented in the upper-level (wcs.c) routines. - New extensible design should accomodate Paper IV (and any other) without further change to the function interfaces. * PGSBOX - Added a C wrapper function, cpgsbox(), and C test/demo program, cpgtest, that duplicates PGTEST and serves as a C coding template. - Added calendar date axes. - Sped up the max/min search - if only tickmarks are required there is no need to search the interior of the image. - Return margin widths in CACHE(,NC). - Fixed a buglet that caused ticks at the frame edges to be skipped. - Return error 3 if CACHE overflows. - Adapted PGWCSL for WCSLIB 3.x - it is now a C function (for interfacing to WCSLIB) with a FORTRAN-like interface (for PGSBOX). WCSLIB version 2.9 (2002/04/03) ------------------------------- * C library - Fixed a bug with alias translation in wcsset(). - Added a conditional compilation directive to lin.c for Apple's MacOS X. * Fortran library - Fixed CUBEFACE handling in WCSSET. WCSLIB version 2.8 (2001/11/16) ------------------------------- * C library - Added support for the SZP projection with szpset(), szpfwd() and szprev(), and generalized AZP with support for the tilt parameter, gamma. - Added phi0 to the prjprm struct, this is set by the projection initialization routines along with theta0. - Fixed a problem in wcsmix() caused by numerical imprecision that could cause it not to recognize when convergence was reached; break out of the loop early if a discontinuity is detected. - Clarified the usage of vspan in the prologue to wcsmix(). - Fixed comments relating to LATPOLE in the prologue to cel.c and tcel.c, and replaced references to LONGPOLE with LONPOLE. - Augmented the error reports in twcs2. - Modified projex() in tproj1 and prjplt() in tproj2 to make use of the information stored in the prjprm struct. * Fortran library - Added support for the SZP projection with SZPSET, SZPFWD and SZPREV, and generalized AZP with support for the tilt parameter, gamma. - Changed the call sequence to PRJSET to return PHI0 along with THETA0. - Fixed a problem in WCSMIX caused by numerical imprecision that could cause it not to recognize when convergence was reached; break out of the loop early if a discontinuity is detected. - Clarified the usage of VSPAN in the prologue to WCSMIX. - Fixed comments relating to LATPOLE in the prologue to CEL and TCEL, and replaced references to LONGPOLE with LONPOLE. - Augmented the error reports in TWCS2. - Modified PROJEX in TPROJ1 and PRJPLT in TPROJ2 to use the generic driver routines PRJSET, PRJFWD and PRJREV. PRJPLT also now uses the projection type encoded in PRJ(11). WCSLIB version 2.7 (2001/02/19) ------------------------------- * C library - Added generic driver routines prjset(), prjfwd() and prjrev(). These invoke specific projection routines via the pointer-to- function elements, prjfwd and prjrev, transferred to the prjprm struct from celprm. - Added code (3-letter projection code) and theta0 (reference latitude) elements to prjprm. - The projection code for the Sanson-Flamsteed projection is now SFL. The upper-level routines, wcsset(), wcsfwd(), and wcsrev(), recognize GLS as an alias for this. - wcsset() now recognizes 'xyLN/xyLT' axis pairs. - Two bugs in the translation from NCP to SIN in wcsfwd() and wcsrev() were fixed: (1) the projection parameter was computed incorrectly and (2) they did not honour prj->flag set to -1 to disable strict bounds checking. - A bug in wcsmix() was fixed - it was relying on the wcsprm struct to have been initialized beforehand. - The test programs now use the cpgplot interface to PGPLOT, the old tpgc.c and tpgf.f wrappers have been removed. * Fortran library - Added generic driver routines PRJSET, PRJFWD and PRJREV. These are keyed to specific projection routines via the value of PRJ(11) which now differs for each projection. - The projection code for the Sanson-Flamsteed projection is now SFL. The upper-level routines, WCSSET, WCSFWD, and WCSREV, recognize GLS as an alias for this. - WCSSET now recognizes 'xyLN/xyLT' axis pairs. - A bug in the translation from NCP to SIN in WCSFWD and WCSREV was fixed; they did not honour PRJ(11) set to -1 to disable strict bounds checking. - A bug in WCSMIX was fixed - it was relying on the WCS array to have been initialized beforehand. WCSLIB version 2.6 (2000/05/10) ------------------------------- * C library - Check for invalid (x,y) in zearev(). - In wcsmath.h, guard against prior definition of PI and other preprocessor variables. * Fortran library - Check for invalid (X,Y) in ZEAREV. - Declare COSD and SIND in WCSFWD and WCSREV, reported by Clive Page (cgp@star.le.ac.uk). WCSLIB version 2.5 (1999/12/14) ------------------------------- * C library - Added copyright notice to header files and prefixed include guard names with "WCSLIB_". - Fixed cube face handling in wcsfwd() and wcsrev() (reported by Doug Mink, CfA). Allow more general face layout in the inverse quadcube projections. - Fixed the problem in wcsmix() where it failed to find a valid solution when the solution point lay at a native pole of a projection in which the pole is represented as a finite interval. However, wcsmix() will only ever return one solution even when two or more valid solutions may exist. - wcsmix() now accepts viter in the range 5 - 10, the specified value will be pushed up or down into this range if necessary. - The projection routines for AZP, TAN, SIN, ZPN, and COP now return error 2 if (phi,theta) correspond to the overlapped (far) side of the projection. This strict bounds checking can be switched off by setting prj->flag to -1 (rather than 0) when the projections are initialized. - The upper level routines, wcsset(), wcsfwd(), wcsrev(), and wcsmix(), now recognize the NCP projection and convert it to the equivalent SIN projection. The lower level routines do not recognize NCP. - Extracted definitions of mathematical constants (PI etc.) from proj.h into wcsmath.h in order to avoid conflicts with their definition in math.h in some systems (such as Linux). - Describe the two alternate representations of the quadcube projections (i.e. faces laid out or stacked) in the prologue of wcs.c. * Fortran library - Fixed cube face handling in WCSFWD and WCSREV, reported by Doug Mink (dmink@cfa.harvard.edu). Allow more general face layout in the inverse quadcube projections. - Fixed the problem in WCSMIX where it failed to find a valid solution when the solution point lay at a native pole of a projection in which the pole is represented as a finite interval. However, WCSMIX will only ever return one solution even when two or more valid solutions may exist. - WCSMIX now accepts VITER in the range 5 - 10, the specified value will be pushed up or down into this range if necessary. - The projection routines for AZP, TAN, SIN, ZPN, and COP now return error 2 if (phi,theta) correspond to the overlapped (far) side of the projection. This strict bounds checking can be switched off by setting PRJ(11) to -1 (rather than 0) when the projections are initialized. - The upper level routines, WCSSET, WCSFWD, WCSREV, and WCSMIX, now recognize the NCP projection and convert it to the equivalent SIN projection. The lower level routines do not recognize NCP. - Describe the two alternate representations of the quadcube projections (i.e. faces laid out or stacked) in the prologue of wcs.f. WCSLIB version 2.4 (1996/09/23) ------------------------------- * C library - In sinrev(), cscrev(), qscrev(), and tscrev(), return error 2 if (x,y) do not lie within the perimeter of the projection. In sinrev(), stop the computation of phi for the "synthesis" projection being applied to the pure "orthographic" case (reported by David Berry, STARLINK). - (Internal change) Renamed variables l <-> m in the quadcube projections to accord with standard usage (and revised WCS draft paper). * Fortran library - In SINREV, CSCREV, QSCREV, and TSCREV, return error 2 if (X,Y) do not lie within the perimeter of the projection. In SINREV, stop the computation of PHI for the "synthesis" projection being applied to the pure "orthographic" case. Reported by David Berry (dsb@ast.man.ac.uk). - (Internal change) Renamed variables L <-> M in the quadcube projections to accord with standard usage (and revised WCS draft paper). - (Internal change) Stopped PRJ(11) doing double service in any projection. It is now set and tested for a specific magic value rather than simply being non-zero. WCSLIB version 2.3 (1996/06/24) ------------------------------- * C library - Fixed two bugs in zpnset(). The first led to an incorrect determination of the degree of the polynomial and would mainly have affected the efficiency of zpnrev(). The second affected the determination of the boundary of the projection but would only have been significant for projections with a point of inflection between 9 and 10 degrees of the pole. Reported by David Berry, STARLINK. - Replaced usage of alloca() in lin.c with malloc() and free() for portability as suggested by Klaus Banse, ESO (kbanse@eso.org). - Allow for C implementations that provide their own versions of cosd(), sind(), tand(), acosd(), asind(), atand(), and atan2d(). From Klaus Banse, ESO (kbanse@eso.org). - Implemented the CUBEFACE axis for quadcube projections. - Made all function prototypes const-correct. - Adapted the header files to C++ usage. - Added a new test program, twcs1, to verify closure of wcsfwd() and wcsrev(). The old twcs test program is now called twcs2. - Added external arrays of error messages indexed by function return value. For example, extern const char *wcsmix_errmsg[] for wcsmix(). Messages for the many proj.c functions are in prjfwd_errmsg[], etc. * Fortran library - Implemented the CUBEFACE axis for quadcube projections. - Added a new test program, TWCS1, to verify closure of WCSFWD and WCSREV. The old TWCS test program is now called TWCS2. WCSLIB version 2.2 (1996/01/18) ------------------------------- * C library - Amended the projection equations for the conics (COP, COD, COE, COO) and Bonne's projection (BON) to correctly handle southern hemisphere projections with PROJP1 < 0 (reported by Lindsay Davis, NOAO). Revised tproj1 and tproj2 to test such cases. * Fortran library - Amended the projection equations for the conics (COP, COD, COE, COO) and Bonne's projection (BON) to correctly handle southern hemisphere projections with PROJP1 < 0 (reported by Lindsay Davis, NOAO). Revised TPROJ1 and TPROJ2 to test such cases. - Increased the dimension of the WCS array from WCS(0:2) to WCS(0:3) to allow for future handling of the CUBEFACE keyword - WCS(3) will store an index to the CUBEFACE axis. This affects the call sequences of WCSSET, WCSFWD, WCSREV, and WCSMIX. WCSLIB version 2.1 (1995/11/17) ------------------------------- * C library The main change of interest to programmers is that of changed argument lists for wcsfwd() and wcsrev() as described below. - The WCS linear transformations are now implemented in WCSLIB, complete with matrix inverter. The new files are lin.c, lin.h, and test program tlin.c. - Given either the celestial longitude or latitude plus an element of the pixel coordinate a new routine, wcsmix(), solves for the remaining elements by iterating on the unknown celestial coordinate element using wcsfwd(). - The high level driver routines wcsfwd(), wcsrev(), and wcsmix() now apply the full WCS algorithm chain (except for pixel regularization table), including parsing the CTYPEn header cards and computing non- celestial elements of the world coordinate. This required a change to their argument lists which now more closely reflect the sequence of algorithms applied. A new routine, wcsset(), parses the CTYPEn. - The high level driver routines of WCSLIB 1.0 are available as intermediate level drivers celset(), celfwd(), and celrev(), but note that their argument lists have been extended to return native coordinates. The related struct is now called celprm instead of wcsprm. - The reference point for conic projections is now at the midpoint of the standard parallels. The FITS header cards PROJP1 and PROJP2 now give the half-sum (midpoint) and half-difference of the latitudes of the standard parallels; previously they gave the latitudes of the standard parallels themselves. The change is reflected in this release of WCSLIB. - A bug in celset() (formerly wcsset()) that misapplied WCS draft equations 7 has been fixed (thanks to Rick Ebert IPAC/JPL and Lindsey Davis, NOAO for reporting this). This affected the computation of Euler angles for the celestial coordinate transformation for those projections that have their reference point away from the native pole. In investigating this a deficiency with the formalism was discovered that led to the introduction of a LATPOLE FITS header card which may be used to disambiguate where CRVAL1, CRVAL2, and LONGPOLE do not uniquely determine the latitude of the native pole. The celprm struct (formerly wcsprm) has been extended to accomodate LATPOLE. - Default values of LONGPOLE and LATPOLE are now supported and their use is recommended where appropriate. - Numerical precision was being lost near the native poles in the SIN, AIR, and QSC projections and this has been recovered (reported by Lindsey Davis, NOAO). Floating underflows in CSC are now avoided. - Numerical precision was also lost in certain circumstances in the spherical coordinate transformation routines and this has been fixed. - The test programs have been enhanced in various ways and the library has been validated on an SGI machine using both 32-bit and 64-bit compilers. * Fortran library The main change of interest to programmers is that of changed call sequences for WCSFWD and WCSREV as described below. - The WCS linear transformations are now implemented in WCSLIB, complete with matrix inverter. The new files are lin.f and test program tlin.f. - Given either the celestial longitude or latitude plus an element of the pixel coordinate a new routine, WCSMIX, solves for the remaining elements by iterating on the unknown celestial coordinate element using WCSFWD. - The high level driver routines WCSFWD, WCSREV, and WCSMIX now apply the full WCS algorithm chain (except for pixel regularization table), including parsing the CTYPEn header cards and computing non- celestial elements of the world coordinate. This required a change to their call sequences which now more closely reflect the sequence of algorithms applied. A new routine, WCSSET, parses the CTYPEn. - The high level driver routines of WCSLIB 1.0 are available as intermediate level drivers CELSET, CELFWD, and CELREV, but note that their call sequences have been extended to return native coordinates. The related parameter array is now called CEL instead of WCS. - The reference point for conic projections is now at the midpoint of the standard parallels. The FITS header cards PROJP1 and PROJP2 now give the half-sum (midpoint) and half-difference of the latitudes of the standard parallels; previously they gave the latitudes of the standard parallels themselves. The change is reflected in this release of WCSLIB. - A bug in CELSET (formerly WCSSET) that misapplied WCS draft equations 7 has been fixed (thanks to Rick Ebert IPAC/JPL and Lindsey Davis, NOAO for reporting this). This affected the computation of Euler angles for the celestial coordinate transformation for those projections that have their reference point away from the native pole. In investigating this a deficiency with the formalism was discovered that led to the introduction of a LATPOLE FITS header card which may be used to disambiguate where CRVAL1, CRVAL2, and LONGPOLE do not uniquely determine the latitude of the native pole. The CEL parameter array (formerly WCS) has been extended to accomodate LATPOLE as CEL(4), and the flag variable is now CEL(5) (formerly WCS(4)). - Default values of LONGPOLE and LATPOLE are now supported and their use is recommended where appropriate. - Numerical precision was being lost near the native poles in the SIN, AIR, and QSC projections and this has been recovered (reported by Lindsey Davis, NOAO). Floating underflows in CSC are now avoided. - Numerical precision was also lost in certain circumstances in the spherical coordinate transformation routines and this has been fixed. - The test programs have been enhanced in various ways and the library has been validated on an SGI machine using both 32-bit and 64-bit compilers. WCSLIB version 1.0 (1995/01/31) ------------------------------- * C library Initial release. * Fortran library Initial release. ------------------------------------------------------------------------ $Id: CHANGES,v 5.10 2015/10/09 08:19:17 mcalabre Exp $ astropy-1.1.1/cextern/wcslib/COPYING0000644001134200020070000010451312602615515020114 0ustar embrayscience00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . astropy-1.1.1/cextern/wcslib/INSTALL0000644001134200020070000003144312644017723020116 0ustar embrayscience00000000000000------------------------------------------------------------------------------ WCSLIB 5.10 and PGSBOX 5.10 INSTALLATION -------------------------------------- WCSLIB requires an ANSI C compiler with standard ANSI C environment, that is, a standard C library and header files as defined in Appendix B of Kernigan & Ritchie, 2nd ed. If you are running a typical Linux distro and have installed WCSLIB before, then all you should need to do is tar pxvf wcslib-5.10.tar.bz2 cd wcslib-5.10 make install Otherwise, read on. Installation of WCSLIB is handled by GNU autoconf; GNU make (referred to here as 'gmake') must be used. The WCSLIB distribution also includes PGSBOX (refer to the README file). To unpack the tar file, type bzcat wcslib-5.10.tar.bz2 | tar pvxf - cd wcslib-5.10 then if you do not need to specify any configuration options, simply run gmake This will run 'configure' to generate "makedefs" which is included by the top- level GNUmakefile and those in each subdirectory, and then build 'libwcs.a', which includes both the C library and Fortran wrappers, and also libpgsbox.a. (WARNING: The build may fail with gmake 3.79, upgrade to 3.79.1 or later.) configure tries to determine the location of the PGPLOT and CFITSIO libraries required by some utilities (wcsware, wcsgrid) and programs in the test suite. If it fails to find them you can, if you wish, tailor the few variables found at the start of "makedefs". Of course you do not need to exercise the test suite in order to build and install the library - if configure fails to find anything required for that it will issue an explicit error message. To build and exercise the test suite use gmake check To install the object libraries and header files, do gmake install TWEAKING THE INSTALLATION DEFAULTS ---------------------------------- By default the library and header files are installed in the lib and include subdirectories of /usr/local/. To change this, or any other options, run configure separately before gmake: ./configure --prefix=/some/other/dir gmake Use ./configure --help to list configure's options. Useful options are --with-pgplotinc --with-pgplotlib --with-cfitsioinc --with-cfitsiolib Which allow additional directories to be added to the library and include file search path. Installation of WCSLIB differs a little from most packages in that all configurable makefile variables are defined in a single file, "makedefs", which configure generates from "makedefs.in". If you need to redefine any of the makefile variables you can modify makedefs, or preferably makedefs.in. The makefile will automatically detect this and re-run config.status to re-generate a new makedefs. configure also creates four header files: wcsconfig.h: Contains general purpose preprocessor definitions. It is included by the other wcsconfig header files. wcsconfig_f77.h: By common convention the WCSLIB Fortran wrappers have been written (in C) using function names in lower case with an underscore ("_") suffix. wcsconfig_f77.h defines a preprocessor macro, F77_FUNC(name,NAME), that may redefine these to suit different name mangling schemes used by some Fortran compilers. wcsconfig_tests.h: Contains C preprocessor definitions for compiling the test/demo programs. wcsconfig_utils.h: Contains C preprocessor macro definitions for compiling the utility programs provided with WCSLIB. If you do have trouble building the library please send me config.log. The INSTALL file provided with GNU autoconf 2.53 is appended without change. Author: Mark Calabretta, Australia Telescope National Facility, CSIRO. http://www.atnf.csiro.au/people/Mark.Calabretta $Id: INSTALL,v 5.10 2015/10/09 08:19:17 mcalabre Exp $ ============================================================================== Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for variables by setting them in the environment. You can do that on the command line like this: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. astropy-1.1.1/cextern/expat/0000755001134200020070000000000012644022135016707 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/expat_config.h.in0000755001134200020070000000525012602615516022145 0ustar embrayscience00000000000000/* expat_config.h.in. Generated from configure.in by autoheader. */ /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ #undef BYTEORDER /* Define to 1 if you have the `bcopy' function. */ #undef HAVE_BCOPY /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* whether byteorder is bigendian */ #undef WORDS_BIGENDIAN /* Define to specify how much context to retain around the current parse point. */ #undef XML_CONTEXT_BYTES /* Define to make parameter entity parsing functionality available. */ #undef XML_DTD /* Define to make XML Namespaces functionality available. */ #undef XML_NS /* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */ #undef __func__ /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `long int' if does not define. */ #undef off_t /* Define to `unsigned int' if does not define. */ #undef size_t astropy-1.1.1/cextern/expat/ConfigureChecks.cmake0000755001134200020070000000275012602615516022767 0ustar embrayscience00000000000000include(CheckIncludeFile) include(CheckIncludeFiles) include(CheckFunctionExists) include(CheckSymbolExists) include(TestBigEndian) check_include_file("dlfcn.h" HAVE_DLFCN_H) check_include_file("fcntl.h" HAVE_FCNTL_H) check_include_file("inttypes.h" HAVE_INTTYPES_H) check_include_file("memory.h" HAVE_MEMORY_H) check_include_file("stdint.h" HAVE_STDINT_H) check_include_file("stdlib.h" HAVE_STDLIB_H) check_include_file("strings.h" HAVE_STRINGS_H) check_include_file("string.h" HAVE_STRING_H) check_include_file("sys/stat.h" HAVE_SYS_STAT_H) check_include_file("sys/types.h" HAVE_SYS_TYPES_H) check_include_file("unistd.h" HAVE_UNISTD_H) check_function_exists("getpagesize" HAVE_GETPAGESIZE) check_function_exists("bcopy" HAVE_BCOPY) check_symbol_exists("memmove" "string.h" HAVE_MEMMOVE) check_function_exists("mmap" HAVE_MMAP) #/* Define to 1 if you have the ANSI C header files. */ check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS) test_big_endian(WORDS_BIGENDIAN) #/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ if(WORDS_BIGENDIAN) set(BYTEORDER 4321) else(WORDS_BIGENDIAN) set(BYTEORDER 1234) endif(WORDS_BIGENDIAN) if(HAVE_SYS_TYPES_H) check_symbol_exists("off_t" "sys/types.h" OFF_T) check_symbol_exists("size_t" "sys/types.h" SIZE_T) else(HAVE_SYS_TYPES_H) set(OFF_T "long") set(SIZE_T "unsigned") endif(HAVE_SYS_TYPES_H) configure_file(expat_config.h.cmake expat_config.h) add_definitions(-DHAVE_EXPAT_CONFIG_H) astropy-1.1.1/cextern/expat/bcb5/0000755001134200020070000000000012644022135017522 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/bcb5/elements.bpr0000755001134200020070000001074012602615516022055 0ustar embrayscience00000000000000 [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=1033 CodePage=1252 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [HistoryLists\hlIncludePath] Count=4 Item0=..\examples;$(BCB)\include Item1=$(BCB)\include Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; [HistoryLists\hlLibraryPath] Count=8 Item0=..\examples;$(BCB)\lib;$(RELEASELIBPATH) Item1=..\examples;$(BCB)\lib;..\examples\$(RELEASELIBPATH) Item2=$(BCB)\lib;$(RELEASELIBPATH) Item3=$(BCB)\lib;$(RELEASELIBPATH);..\lib\Release-w_static Item4=$(BCB)\lib;$(RELEASELIBPATH);..\lib\Release_static Item5=$(BCB)\lib;$(RELEASELIBPATH);C:\src\expat\lib\Release_static Item6=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk Item7=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; [HistoryLists\hlDebugSourcePath] Count=1 Item0=$(BCB)\source\vcl [HistoryLists\hlConditionals] Count=17 Item0=WIN32;NDEBUG;_CONSOLE;XML_STATIC Item1=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_STATIC Item2=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE;XML_STATIC Item3=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE Item4=WIN32;NDEBUG;_CONSOLE;_DEBUG Item5=WIN32;NDEBUG;_CONSOLE;XML_STATIC;_DEBUG Item6=WIN32;NDEBUG;_CONSOLE;XML_STATIC;_DEBUG;_UNICODE Item7=WIN32;NDEBUG;_CONSOLE;XML_STATIC;_DEBUG;XML_UNICODE_WCHAR_T Item8=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC;_DEBUG;XML_UNICODE_WCHAR_T Item9=WIN32;NDEBUG;_CONSOLE;_UNICODE;XML_STATIC;_DEBUG;XML_UNICODE_WCHAR_T Item10=WIN32;NDEBUG;_CONSOLE;_UNICODE;XML_STATIC;_DEBUG;XML_UNICODE Item11=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC;_DEBUG;XML_UNICODE_WCHAR_T;__WCHAR_T Item12=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE Item13=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC;_DEBUG;XML_UNICODE;_UNICODE Item14=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC;_DEBUG;XML_UNICODE Item15=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC;_DEBUG Item16=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC [HistoryLists\hlIntOutputDir] Count=5 Item0=Release\obj\examples Item1=Release\obj\elements Item2=Release\obj\mts Item3=..\examples\Release Item4=Release [HistoryLists\hlFinalOutputDir] Count=1 Item0=Release\ [Debugging] DebugSourceDirs= [Parameters] RunParams= HostApplication= RemoteHost= RemotePath= RemoteDebug=0 [Compiler] ShowInfoMsgs=0 LinkDebugVcl=0 LinkCGLIB=0 [Language] ActiveLang= ProjectLang= RootDir= astropy-1.1.1/cextern/expat/bcb5/expat_static.mak0000755001134200020070000001132612602615516022717 0ustar embrayscience00000000000000# --------------------------------------------------------------------------- !if !$d(BCB) BCB = $(MAKEDIR)\.. !endif # --------------------------------------------------------------------------- # IDE SECTION # --------------------------------------------------------------------------- # The following section of the project makefile is managed by the BCB IDE. # It is recommended to use the IDE to change any of the values in this # section. # --------------------------------------------------------------------------- VERSION = BCB.05.03 # --------------------------------------------------------------------------- PROJECT = Release\libexpats_mtd.lib OBJFILES = Release\obj\libexpat_static\xmlparse.obj \ Release\obj\libexpat_static\xmlrole.obj \ Release\obj\libexpat_static\xmltok.obj RESFILES = MAINSOURCE = expat_static.bpf RESDEPEN = $(RESFILES) LIBFILES = IDLFILES = IDLGENFILES = LIBRARIES = PACKAGES = SPARELIBS = DEFFILE = # --------------------------------------------------------------------------- PATHCPP = .;..\lib PATHASM = .; PATHPAS = .; PATHRC = .; LINKER = TLib DEBUGLIBPATH = $(BCB)\lib\debug RELEASELIBPATH = $(BCB)\lib\release USERDEFINES = _WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL INCLUDEPATH = ..\lib;$(BCB)\include LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH) WARNINGS = -w-rch -w-par -w-8027 -w-8026 -w-ccc LISTFILE = # --------------------------------------------------------------------------- CFLAG1 = -O2 -X- -a8 -b -k- -vi -q -tWM -c IDLCFLAGS = -I$(BCB)\include PFLAGS = -N2Release\obj\libexpat_static -N0Release\obj\libexpat_static -$Y- -$L- -$D- RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include AFLAGS = /mx /w2 /zn LFLAGS = # --------------------------------------------------------------------------- ALLOBJ = $(OBJFILES) ALLRES = $(RESFILES) ALLLIB = $(LIBFILES) $(LIBRARIES) # --------------------------------------------------------------------------- !ifdef IDEOPTIONS [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [Debugging] DebugSourceDirs=$(BCB)\source\vcl !endif # --------------------------------------------------------------------------- # MAKE SECTION # --------------------------------------------------------------------------- # This section of the project file is not used by the BCB IDE. It is for # the benefit of building from the command-line using the MAKE utility. # --------------------------------------------------------------------------- .autodepend # --------------------------------------------------------------------------- !if "$(USERDEFINES)" != "" AUSERDEFINES = -d$(USERDEFINES:;= -d) !else AUSERDEFINES = !endif !if !$d(BCC32) BCC32 = bcc32 !endif !if !$d(CPP32) CPP32 = cpp32 !endif !if !$d(DCC32) DCC32 = dcc32 !endif !if !$d(TASM32) TASM32 = tasm32 !endif !if !$d(LINKER) LINKER = TLib !endif !if !$d(BRCC32) BRCC32 = brcc32 !endif # --------------------------------------------------------------------------- !if $d(PATHCPP) .PATH.CPP = $(PATHCPP) .PATH.C = $(PATHCPP) !endif !if $d(PATHPAS) .PATH.PAS = $(PATHPAS) !endif !if $d(PATHASM) .PATH.ASM = $(PATHASM) !endif !if $d(PATHRC) .PATH.RC = $(PATHRC) !endif # --------------------------------------------------------------------------- !if "$(LISTFILE)" == "" COMMA = !else COMMA = , !endif $(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) $(BCB)\BIN\$(LINKER) /u $@ @&&! $(LFLAGS) $? $(COMMA) $(LISTFILE) ! # --------------------------------------------------------------------------- .pas.hpp: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .pas.obj: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .cpp.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .cpp.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .asm.obj: $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ .rc.res: $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< # --------------------------------------------------------------------------- astropy-1.1.1/cextern/expat/bcb5/expat_static.bpr0000755001134200020070000000702112602615516022727 0ustar embrayscience00000000000000 [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=1033 CodePage=1252 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [HistoryLists\hlIncludePath] Count=4 Item0=..\lib;$(BCB)\include Item1=$(BCB)\include Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; [HistoryLists\hlLibraryPath] Count=5 Item0=..\lib;$(BCB)\lib;$(RELEASELIBPATH) Item1=..\lib;$(BCB)\lib;..\lib\$(RELEASELIBPATH) Item2=$(BCB)\lib;$(RELEASELIBPATH) Item3=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk Item4=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; [HistoryLists\hlDebugSourcePath] Count=1 Item0=$(BCB)\source\vcl [HistoryLists\hlConditionals] Count=7 Item0=_WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC Item3=WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP;_DEBUG Item4=WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP Item5=WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP;_MBCS Item6=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP [HistoryLists\hlIntOutputDir] Count=6 Item0=Release\obj\libexpat_static Item1=Release\obj\mts Item2=Release\obj\mt Item3=Release Item4=..\lib\Release_static Item5=Release_static [HistoryLists\hlFinalOutputDir] Count=3 Item0=Release\ Item1=Release Item2=Release_static\ [HistoryLists\hlTlibPageSize] Count=1 Item0=0x0010 [Debugging] DebugSourceDirs= [Parameters] RunParams= HostApplication= RemoteHost= RemotePath= RemoteDebug=0 [Compiler] ShowInfoMsgs=0 LinkDebugVcl=0 LinkCGLIB=0 [Language] ActiveLang= ProjectLang= RootDir= astropy-1.1.1/cextern/expat/bcb5/expatw.mak0000755001134200020070000001206512602615516021540 0ustar embrayscience00000000000000# --------------------------------------------------------------------------- !if !$d(BCB) BCB = $(MAKEDIR)\.. !endif # --------------------------------------------------------------------------- # IDE SECTION # --------------------------------------------------------------------------- # The following section of the project makefile is managed by the BCB IDE. # It is recommended to use the IDE to change any of the values in this # section. # --------------------------------------------------------------------------- VERSION = BCB.05.03 # --------------------------------------------------------------------------- PROJECT = Release\libexpatw_mtd.dll OBJFILES = Release\obj\libexpatw\xmlparse.obj Release\obj\libexpatw\xmlrole.obj \ Release\obj\libexpatw\xmltok.obj RESFILES = MAINSOURCE = expatw.bpf RESDEPEN = $(RESFILES) LIBFILES = IDLFILES = IDLGENFILES = LIBRARIES = PACKAGES = VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi \ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi \ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi \ dclocx50.bpi bcb2kaxserver50.bpi dclusr50.bpi SPARELIBS = DEFFILE = libexpatw_mtd.def # --------------------------------------------------------------------------- PATHCPP = .;..\lib PATHASM = .; PATHPAS = .; PATHRC = .; DEBUGLIBPATH = $(BCB)\lib\debug RELEASELIBPATH = $(BCB)\lib\release USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL INCLUDEPATH = ..\lib;$(BCB)\include LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH) WARNINGS= -w-rch -w-par -w-8027 -w-8026 -w-ccc # --------------------------------------------------------------------------- CFLAG1 = -WD -O2 -X- -a8 -b -k- -vi -q -tWM -c -tWD IDLCFLAGS = -I$(BCB)\include PFLAGS = -N2Release\obj\libexpatw -N0Release\obj\libexpatw -$Y- -$L- -$D- RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include AFLAGS = /mx /w2 /zn LFLAGS = -IRelease\obj\libexpatw -D"" -aa -Tpd -x -Gn -Gi -w -q # --------------------------------------------------------------------------- ALLOBJ = c0d32w.obj $(OBJFILES) ALLRES = $(RESFILES) ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib # --------------------------------------------------------------------------- !ifdef IDEOPTIONS [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [Debugging] DebugSourceDirs=$(BCB)\source\vcl !endif # --------------------------------------------------------------------------- # MAKE SECTION # --------------------------------------------------------------------------- # This section of the project file is not used by the BCB IDE. It is for # the benefit of building from the command-line using the MAKE utility. # --------------------------------------------------------------------------- .autodepend # --------------------------------------------------------------------------- !if "$(USERDEFINES)" != "" AUSERDEFINES = -d$(USERDEFINES:;= -d) !else AUSERDEFINES = !endif !if !$d(BCC32) BCC32 = bcc32 !endif !if !$d(CPP32) CPP32 = cpp32 !endif !if !$d(DCC32) DCC32 = dcc32 !endif !if !$d(TASM32) TASM32 = tasm32 !endif !if !$d(LINKER) LINKER = ilink32 !endif !if !$d(BRCC32) BRCC32 = brcc32 !endif # --------------------------------------------------------------------------- !if $d(PATHCPP) .PATH.CPP = $(PATHCPP) .PATH.C = $(PATHCPP) !endif !if $d(PATHPAS) .PATH.PAS = $(PATHPAS) !endif !if $d(PATHASM) .PATH.ASM = $(PATHASM) !endif !if $d(PATHRC) .PATH.RC = $(PATHRC) !endif # --------------------------------------------------------------------------- $(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) $(BCB)\BIN\$(LINKER) @&&! $(LFLAGS) -L$(LIBPATH) + $(ALLOBJ), + $(PROJECT),, + $(ALLLIB), + $(DEFFILE), + $(ALLRES) ! # --------------------------------------------------------------------------- .pas.hpp: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .pas.obj: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .cpp.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .cpp.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .asm.obj: $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ .rc.res: $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< # --------------------------------------------------------------------------- astropy-1.1.1/cextern/expat/bcb5/libexpatw_mtd.def0000755001134200020070000001256712602615516023070 0ustar embrayscience00000000000000; DEF file for BCB5 LIBRARY LIBEXPATW_MTD DESCRIPTION "Implements an XML parser." EXPORTS _XML_DefaultCurrent @1 _XML_ErrorString @2 _XML_ExpatVersion @3 _XML_ExpatVersionInfo @4 _XML_ExternalEntityParserCreate @5 _XML_GetBase @6 _XML_GetBuffer @7 _XML_GetCurrentByteCount @8 _XML_GetCurrentByteIndex @9 _XML_GetCurrentColumnNumber @10 _XML_GetCurrentLineNumber @11 _XML_GetErrorCode @12 _XML_GetIdAttributeIndex @13 _XML_GetInputContext @14 _XML_GetSpecifiedAttributeCount @15 _XML_Parse @16 _XML_ParseBuffer @17 _XML_ParserCreate @18 _XML_ParserCreateNS @19 _XML_ParserCreate_MM @20 _XML_ParserFree @21 _XML_SetAttlistDeclHandler @22 _XML_SetBase @23 _XML_SetCdataSectionHandler @24 _XML_SetCharacterDataHandler @25 _XML_SetCommentHandler @26 _XML_SetDefaultHandler @27 _XML_SetDefaultHandlerExpand @28 _XML_SetDoctypeDeclHandler @29 _XML_SetElementDeclHandler @30 _XML_SetElementHandler @31 _XML_SetEncoding @32 _XML_SetEndCdataSectionHandler @33 _XML_SetEndDoctypeDeclHandler @34 _XML_SetEndElementHandler @35 _XML_SetEndNamespaceDeclHandler @36 _XML_SetEntityDeclHandler @37 _XML_SetExternalEntityRefHandler @38 _XML_SetExternalEntityRefHandlerArg @39 _XML_SetNamespaceDeclHandler @40 _XML_SetNotStandaloneHandler @41 _XML_SetNotationDeclHandler @42 _XML_SetParamEntityParsing @43 _XML_SetProcessingInstructionHandler @44 _XML_SetReturnNSTriplet @45 _XML_SetStartCdataSectionHandler @46 _XML_SetStartDoctypeDeclHandler @47 _XML_SetStartElementHandler @48 _XML_SetStartNamespaceDeclHandler @49 _XML_SetUnknownEncodingHandler @50 _XML_SetUnparsedEntityDeclHandler @51 _XML_SetUserData @52 _XML_SetXmlDeclHandler @53 _XML_UseParserAsHandlerArg @54 ; added with version 1.95.3 _XML_ParserReset @55 _XML_SetSkippedEntityHandler @56 ; added with version 1.95.5 _XML_GetFeatureList @57 _XML_UseForeignDTD @58 ; added with version 1.95.6 _XML_FreeContentModel @59 _XML_MemMalloc @60 _XML_MemRealloc @61 _XML_MemFree @62 ; added with version 1.95.8 _XML_StopParser @63 _XML_ResumeParser @64 _XML_GetParsingStatus @65 ; Aliases for MS compatible names XML_DefaultCurrent = _XML_DefaultCurrent XML_ErrorString = _XML_ErrorString XML_ExpatVersion = _XML_ExpatVersion XML_ExpatVersionInfo = _XML_ExpatVersionInfo XML_ExternalEntityParserCreate = _XML_ExternalEntityParserCreate XML_GetBase = _XML_GetBase XML_GetBuffer = _XML_GetBuffer XML_GetCurrentByteCount = _XML_GetCurrentByteCount XML_GetCurrentByteIndex = _XML_GetCurrentByteIndex XML_GetCurrentColumnNumber = _XML_GetCurrentColumnNumber XML_GetCurrentLineNumber = _XML_GetCurrentLineNumber XML_GetErrorCode = _XML_GetErrorCode XML_GetIdAttributeIndex = _XML_GetIdAttributeIndex XML_GetInputContext = _XML_GetInputContext XML_GetSpecifiedAttributeCount = _XML_GetSpecifiedAttributeCount XML_Parse = _XML_Parse XML_ParseBuffer = _XML_ParseBuffer XML_ParserCreate = _XML_ParserCreate XML_ParserCreateNS = _XML_ParserCreateNS XML_ParserCreate_MM = _XML_ParserCreate_MM XML_ParserFree = _XML_ParserFree XML_SetAttlistDeclHandler = _XML_SetAttlistDeclHandler XML_SetBase = _XML_SetBase XML_SetCdataSectionHandler = _XML_SetCdataSectionHandler XML_SetCharacterDataHandler = _XML_SetCharacterDataHandler XML_SetCommentHandler = _XML_SetCommentHandler XML_SetDefaultHandler = _XML_SetDefaultHandler XML_SetDefaultHandlerExpand = _XML_SetDefaultHandlerExpand XML_SetDoctypeDeclHandler = _XML_SetDoctypeDeclHandler XML_SetElementDeclHandler = _XML_SetElementDeclHandler XML_SetElementHandler = _XML_SetElementHandler XML_SetEncoding = _XML_SetEncoding XML_SetEndCdataSectionHandler = _XML_SetEndCdataSectionHandler XML_SetEndDoctypeDeclHandler = _XML_SetEndDoctypeDeclHandler XML_SetEndElementHandler = _XML_SetEndElementHandler XML_SetEndNamespaceDeclHandler = _XML_SetEndNamespaceDeclHandler XML_SetEntityDeclHandler = _XML_SetEntityDeclHandler XML_SetExternalEntityRefHandler = _XML_SetExternalEntityRefHandler XML_SetExternalEntityRefHandlerArg = _XML_SetExternalEntityRefHandlerArg XML_SetNamespaceDeclHandler = _XML_SetNamespaceDeclHandler XML_SetNotStandaloneHandler = _XML_SetNotStandaloneHandler XML_SetNotationDeclHandler = _XML_SetNotationDeclHandler XML_SetParamEntityParsing = _XML_SetParamEntityParsing XML_SetProcessingInstructionHandler = _XML_SetProcessingInstructionHandler XML_SetReturnNSTriplet = _XML_SetReturnNSTriplet XML_SetStartCdataSectionHandler = _XML_SetStartCdataSectionHandler XML_SetStartDoctypeDeclHandler = _XML_SetStartDoctypeDeclHandler XML_SetStartElementHandler = _XML_SetStartElementHandler XML_SetStartNamespaceDeclHandler = _XML_SetStartNamespaceDeclHandler XML_SetUnknownEncodingHandler = _XML_SetUnknownEncodingHandler XML_SetUnparsedEntityDeclHandler = _XML_SetUnparsedEntityDeclHandler XML_SetUserData = _XML_SetUserData XML_SetXmlDeclHandler = _XML_SetXmlDeclHandler XML_UseParserAsHandlerArg = _XML_UseParserAsHandlerArg XML_ParserReset = _XML_ParserReset XML_SetSkippedEntityHandler = _XML_SetSkippedEntityHandler XML_GetFeatureList = _XML_GetFeatureList XML_UseForeignDTD = _XML_UseForeignDTD XML_FreeContentModel = _XML_FreeContentModel XML_MemMalloc = _XML_MemMalloc XML_MemRealloc = _XML_MemRealloc XML_MemFree = _XML_MemFree XML_StopParser = _XML_StopParser XML_ResumeParser = _XML_ResumeParser XML_GetParsingStatus = _XML_GetParsingStatus astropy-1.1.1/cextern/expat/bcb5/xmlwf.bpr0000755001134200020070000000730712602615516021403 0ustar embrayscience00000000000000 [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=1033 CodePage=1252 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [HistoryLists\hlIncludePath] Count=4 Item0=..\xmlwf;$(BCB)\include Item1=$(BCB)\include Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; [HistoryLists\hlLibraryPath] Count=5 Item0=..\xmlwf;$(BCB)\lib;$(RELEASELIBPATH) Item1=..\xmlwf;$(BCB)\lib;..\xmlwf\$(RELEASELIBPATH) Item2=$(BCB)\lib;$(RELEASELIBPATH) Item3=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk Item4=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; [HistoryLists\hlDebugSourcePath] Count=1 Item0=$(BCB)\source\vcl [HistoryLists\hlConditionals] Count=6 Item0=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP Item1=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE Item2=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG;XML_UNICODE_WCHAR_T Item3=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG Item4=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG;_UNICODE;XML_UNICODE_WCHAR_T Item5=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG;_UNICODE [HistoryLists\hlIntOutputDir] Count=3 Item0=Release\obj\xmlwf Item1=..\xmlwf\Release Item2=Release [HistoryLists\hlFinalOutputDir] Count=3 Item0=Release\ Item1=Release Item2=.\Release\ [Debugging] DebugSourceDirs= [Parameters] RunParams=sample.xml HostApplication= RemoteHost= RemotePath= RemoteDebug=0 [Compiler] ShowInfoMsgs=0 LinkDebugVcl=0 LinkCGLIB=0 [Language] ActiveLang= ProjectLang= RootDir= astropy-1.1.1/cextern/expat/bcb5/xmlwf.bpf0000755001134200020070000000036712602615516021366 0ustar embrayscience00000000000000USEUNIT("..\xmlwf\codepage.c"); USEUNIT("..\xmlwf\win32filemap.c"); USEUNIT("..\xmlwf\xmlfile.c"); USEUNIT("..\xmlwf\xmlwf.c"); USELIB("Release\libexpat_mtd.lib"); //--------------------------------------------------------------------------- main astropy-1.1.1/cextern/expat/bcb5/makefile.mak0000755001134200020070000000102612602615516022000 0ustar embrayscience00000000000000all: setup expat expatw expat_static expatw_static elements outline xmlwf setup: setup expat: make -l -fexpat.mak expatw: make -l -fexpatw.mak expat_static: make -l -fexpat_static.mak expatw_static: make -l -fexpatw_static.mak elements: make -l -felements.mak outline: make -l -foutline.mak xmlwf: make -l -fxmlwf.mak clean: # works on Win98/ME # deltree /y release\obj # works on WinNT/2000 del /s/f/q release\obj distclean: # works on Win98/ME # deltree /y release\*.* # works on WinNT/2000 del /s/f/q release\* astropy-1.1.1/cextern/expat/bcb5/libexpat_mtd.def0000755001134200020070000001256712602615516022701 0ustar embrayscience00000000000000; DEF file for BCB5 LIBRARY LIBEXPAT_MTD DESCRIPTION "Implements an XML parser." EXPORTS _XML_DefaultCurrent @1 _XML_ErrorString @2 _XML_ExpatVersion @3 _XML_ExpatVersionInfo @4 _XML_ExternalEntityParserCreate @5 _XML_GetBase @6 _XML_GetBuffer @7 _XML_GetCurrentByteCount @8 _XML_GetCurrentByteIndex @9 _XML_GetCurrentColumnNumber @10 _XML_GetCurrentLineNumber @11 _XML_GetErrorCode @12 _XML_GetIdAttributeIndex @13 _XML_GetInputContext @14 _XML_GetSpecifiedAttributeCount @15 _XML_Parse @16 _XML_ParseBuffer @17 _XML_ParserCreate @18 _XML_ParserCreateNS @19 _XML_ParserCreate_MM @20 _XML_ParserFree @21 _XML_SetAttlistDeclHandler @22 _XML_SetBase @23 _XML_SetCdataSectionHandler @24 _XML_SetCharacterDataHandler @25 _XML_SetCommentHandler @26 _XML_SetDefaultHandler @27 _XML_SetDefaultHandlerExpand @28 _XML_SetDoctypeDeclHandler @29 _XML_SetElementDeclHandler @30 _XML_SetElementHandler @31 _XML_SetEncoding @32 _XML_SetEndCdataSectionHandler @33 _XML_SetEndDoctypeDeclHandler @34 _XML_SetEndElementHandler @35 _XML_SetEndNamespaceDeclHandler @36 _XML_SetEntityDeclHandler @37 _XML_SetExternalEntityRefHandler @38 _XML_SetExternalEntityRefHandlerArg @39 _XML_SetNamespaceDeclHandler @40 _XML_SetNotStandaloneHandler @41 _XML_SetNotationDeclHandler @42 _XML_SetParamEntityParsing @43 _XML_SetProcessingInstructionHandler @44 _XML_SetReturnNSTriplet @45 _XML_SetStartCdataSectionHandler @46 _XML_SetStartDoctypeDeclHandler @47 _XML_SetStartElementHandler @48 _XML_SetStartNamespaceDeclHandler @49 _XML_SetUnknownEncodingHandler @50 _XML_SetUnparsedEntityDeclHandler @51 _XML_SetUserData @52 _XML_SetXmlDeclHandler @53 _XML_UseParserAsHandlerArg @54 ; added with version 1.95.3 _XML_ParserReset @55 _XML_SetSkippedEntityHandler @56 ; added with version 1.95.5 _XML_GetFeatureList @57 _XML_UseForeignDTD @58 ; added with version 1.95.6 _XML_FreeContentModel @59 _XML_MemMalloc @60 _XML_MemRealloc @61 _XML_MemFree @62 ; added with version 1.95.8 _XML_StopParser @63 _XML_ResumeParser @64 _XML_GetParsingStatus @65 ; Aliases for MS compatible names XML_DefaultCurrent = _XML_DefaultCurrent XML_ErrorString = _XML_ErrorString XML_ExpatVersion = _XML_ExpatVersion XML_ExpatVersionInfo = _XML_ExpatVersionInfo XML_ExternalEntityParserCreate = _XML_ExternalEntityParserCreate XML_GetBase = _XML_GetBase XML_GetBuffer = _XML_GetBuffer XML_GetCurrentByteCount = _XML_GetCurrentByteCount XML_GetCurrentByteIndex = _XML_GetCurrentByteIndex XML_GetCurrentColumnNumber = _XML_GetCurrentColumnNumber XML_GetCurrentLineNumber = _XML_GetCurrentLineNumber XML_GetErrorCode = _XML_GetErrorCode XML_GetIdAttributeIndex = _XML_GetIdAttributeIndex XML_GetInputContext = _XML_GetInputContext XML_GetSpecifiedAttributeCount = _XML_GetSpecifiedAttributeCount XML_Parse = _XML_Parse XML_ParseBuffer = _XML_ParseBuffer XML_ParserCreate = _XML_ParserCreate XML_ParserCreateNS = _XML_ParserCreateNS XML_ParserCreate_MM = _XML_ParserCreate_MM XML_ParserFree = _XML_ParserFree XML_SetAttlistDeclHandler = _XML_SetAttlistDeclHandler XML_SetBase = _XML_SetBase XML_SetCdataSectionHandler = _XML_SetCdataSectionHandler XML_SetCharacterDataHandler = _XML_SetCharacterDataHandler XML_SetCommentHandler = _XML_SetCommentHandler XML_SetDefaultHandler = _XML_SetDefaultHandler XML_SetDefaultHandlerExpand = _XML_SetDefaultHandlerExpand XML_SetDoctypeDeclHandler = _XML_SetDoctypeDeclHandler XML_SetElementDeclHandler = _XML_SetElementDeclHandler XML_SetElementHandler = _XML_SetElementHandler XML_SetEncoding = _XML_SetEncoding XML_SetEndCdataSectionHandler = _XML_SetEndCdataSectionHandler XML_SetEndDoctypeDeclHandler = _XML_SetEndDoctypeDeclHandler XML_SetEndElementHandler = _XML_SetEndElementHandler XML_SetEndNamespaceDeclHandler = _XML_SetEndNamespaceDeclHandler XML_SetEntityDeclHandler = _XML_SetEntityDeclHandler XML_SetExternalEntityRefHandler = _XML_SetExternalEntityRefHandler XML_SetExternalEntityRefHandlerArg = _XML_SetExternalEntityRefHandlerArg XML_SetNamespaceDeclHandler = _XML_SetNamespaceDeclHandler XML_SetNotStandaloneHandler = _XML_SetNotStandaloneHandler XML_SetNotationDeclHandler = _XML_SetNotationDeclHandler XML_SetParamEntityParsing = _XML_SetParamEntityParsing XML_SetProcessingInstructionHandler = _XML_SetProcessingInstructionHandler XML_SetReturnNSTriplet = _XML_SetReturnNSTriplet XML_SetStartCdataSectionHandler = _XML_SetStartCdataSectionHandler XML_SetStartDoctypeDeclHandler = _XML_SetStartDoctypeDeclHandler XML_SetStartElementHandler = _XML_SetStartElementHandler XML_SetStartNamespaceDeclHandler = _XML_SetStartNamespaceDeclHandler XML_SetUnknownEncodingHandler = _XML_SetUnknownEncodingHandler XML_SetUnparsedEntityDeclHandler = _XML_SetUnparsedEntityDeclHandler XML_SetUserData = _XML_SetUserData XML_SetXmlDeclHandler = _XML_SetXmlDeclHandler XML_UseParserAsHandlerArg = _XML_UseParserAsHandlerArg XML_ParserReset = _XML_ParserReset XML_SetSkippedEntityHandler = _XML_SetSkippedEntityHandler XML_GetFeatureList = _XML_GetFeatureList XML_UseForeignDTD = _XML_UseForeignDTD XML_FreeContentModel = _XML_FreeContentModel XML_MemMalloc = _XML_MemMalloc XML_MemRealloc = _XML_MemRealloc XML_MemFree = _XML_MemFree XML_StopParser = _XML_StopParser XML_ResumeParser = _XML_ResumeParser XML_GetParsingStatus = _XML_GetParsingStatus astropy-1.1.1/cextern/expat/bcb5/outline.bpr0000755001134200020070000000660712602615516021727 0ustar embrayscience00000000000000 [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=1033 CodePage=1252 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [HistoryLists\hlIncludePath] Count=3 Item0=..\examples;$(BCB)\include Item1=$(BCB)\include Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; [HistoryLists\hlLibraryPath] Count=4 Item0=..\examples;$(BCB)\lib;$(RELEASELIBPATH) Item1=..\examples;$(BCB)\lib;..\examples\$(RELEASELIBPATH) Item2=$(BCB)\lib;$(RELEASELIBPATH) Item3=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; [HistoryLists\hlDebugSourcePath] Count=1 Item0=$(BCB)\source\vcl [HistoryLists\hlConditionals] Count=6 Item0=WIN32;NDEBUG;_CONSOLE Item1=WIN32;NDEBUG;_CONSOLE;XML_STATIC Item2=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_STATIC Item3=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE;XML_STATIC Item4=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE Item5=WIN32;NDEBUG;_CONSOLE;_DEBUG [HistoryLists\hlIntOutputDir] Count=4 Item0=Release\obj\examples Item1=Release\obj\outline Item2=..\examples\Release Item3=Release [HistoryLists\hlFinalOutputDir] Count=1 Item0=Release\ [Debugging] DebugSourceDirs= [Parameters] RunParams= HostApplication= RemoteHost= RemotePath= RemoteDebug=0 [Compiler] ShowInfoMsgs=0 LinkDebugVcl=0 LinkCGLIB=0 [Language] ActiveLang= ProjectLang= RootDir= astropy-1.1.1/cextern/expat/bcb5/elements.bpf0000755001134200020070000000023312602615516022035 0ustar embrayscience00000000000000USEUNIT("..\examples\elements.c"); USELIB("Release\libexpats_mtd.lib"); //--------------------------------------------------------------------------- main astropy-1.1.1/cextern/expat/bcb5/xmlwf.mak0000755001134200020070000001203112602615516021356 0ustar embrayscience00000000000000# --------------------------------------------------------------------------- !if !$d(BCB) BCB = $(MAKEDIR)\.. !endif # --------------------------------------------------------------------------- # IDE SECTION # --------------------------------------------------------------------------- # The following section of the project makefile is managed by the BCB IDE. # It is recommended to use the IDE to change any of the values in this # section. # --------------------------------------------------------------------------- VERSION = BCB.05.03 # --------------------------------------------------------------------------- PROJECT = Release\xmlwf.exe OBJFILES = Release\obj\xmlwf\codepage.obj Release\obj\xmlwf\win32filemap.obj \ Release\obj\xmlwf\xmlfile.obj Release\obj\xmlwf\xmlwf.obj RESFILES = MAINSOURCE = xmlwf.bpf RESDEPEN = $(RESFILES) LIBFILES = Release\libexpat_mtd.lib IDLFILES = IDLGENFILES = LIBRARIES = PACKAGES = VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi \ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi \ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi \ dclocx50.bpi bcb2kaxserver50.bpi dclusr50.bpi SPARELIBS = DEFFILE = # --------------------------------------------------------------------------- PATHCPP = .;..\xmlwf PATHASM = .; PATHPAS = .; PATHRC = .; DEBUGLIBPATH = $(BCB)\lib\debug RELEASELIBPATH = $(BCB)\lib\release USERDEFINES = NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL INCLUDEPATH = ..\xmlwf;$(BCB)\include LIBPATH = ..\xmlwf;$(BCB)\lib;$(RELEASELIBPATH) WARNINGS= -w-8065 -w-par -w-8027 -w-8026 # --------------------------------------------------------------------------- CFLAG1 = -O2 -X- -a8 -b -k- -vi -q -tWM -I..\lib -c IDLCFLAGS = -I$(BCB)\include PFLAGS = -N2Release\obj\xmlwf -N0Release\obj\xmlwf -$Y- -$L- -$D- RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include AFLAGS = /mx /w2 /zn LFLAGS = -IRelease\obj\xmlwf -D"" -ap -Tpe -x -Gn -q # --------------------------------------------------------------------------- ALLOBJ = c0x32.obj $(OBJFILES) ALLRES = $(RESFILES) ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib # --------------------------------------------------------------------------- !ifdef IDEOPTIONS [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [Debugging] DebugSourceDirs=$(BCB)\source\vcl !endif # --------------------------------------------------------------------------- # MAKE SECTION # --------------------------------------------------------------------------- # This section of the project file is not used by the BCB IDE. It is for # the benefit of building from the command-line using the MAKE utility. # --------------------------------------------------------------------------- .autodepend # --------------------------------------------------------------------------- !if "$(USERDEFINES)" != "" AUSERDEFINES = -d$(USERDEFINES:;= -d) !else AUSERDEFINES = !endif !if !$d(BCC32) BCC32 = bcc32 !endif !if !$d(CPP32) CPP32 = cpp32 !endif !if !$d(DCC32) DCC32 = dcc32 !endif !if !$d(TASM32) TASM32 = tasm32 !endif !if !$d(LINKER) LINKER = ilink32 !endif !if !$d(BRCC32) BRCC32 = brcc32 !endif # --------------------------------------------------------------------------- !if $d(PATHCPP) .PATH.CPP = $(PATHCPP) .PATH.C = $(PATHCPP) !endif !if $d(PATHPAS) .PATH.PAS = $(PATHPAS) !endif !if $d(PATHASM) .PATH.ASM = $(PATHASM) !endif !if $d(PATHRC) .PATH.RC = $(PATHRC) !endif # --------------------------------------------------------------------------- $(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) $(BCB)\BIN\$(LINKER) @&&! $(LFLAGS) -L$(LIBPATH) + $(ALLOBJ), + $(PROJECT),, + $(ALLLIB), + $(DEFFILE), + $(ALLRES) ! # --------------------------------------------------------------------------- .pas.hpp: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .pas.obj: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .cpp.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .cpp.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .asm.obj: $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ .rc.res: $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< # --------------------------------------------------------------------------- astropy-1.1.1/cextern/expat/bcb5/expat_static.bpf0000755001134200020070000000026512602615516022716 0ustar embrayscience00000000000000USEUNIT("..\lib\xmlparse.c"); USEUNIT("..\lib\xmlrole.c"); USEUNIT("..\lib\xmltok.c"); //--------------------------------------------------------------------------- #define Library astropy-1.1.1/cextern/expat/bcb5/expat.bpr0000755001134200020070000000770712602615516021373 0ustar embrayscience00000000000000 [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=1033 CodePage=1252 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [HistoryLists\hlIncludePath] Count=4 Item0=..\lib;$(BCB)\include Item1=$(BCB)\include Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; [HistoryLists\hlLibraryPath] Count=5 Item0=..\lib;$(BCB)\lib;$(RELEASELIBPATH) Item1=..\lib;$(BCB)\lib;..\lib\$(RELEASELIBPATH) Item2=$(BCB)\lib;$(RELEASELIBPATH) Item3=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk Item4=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; [HistoryLists\hlDebugSourcePath] Count=1 Item0=$(BCB)\source\vcl [HistoryLists\hlConditionals] Count=8 Item0=_WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS Item3=WIN32;_WINDOWS;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP Item4=NDEBUG;WIN32;_WINDOWS;_USRDLL;_DEBUG;EXPAT_EXPORTS;COMPILED_FROM_DSP Item5=NDEBUG;WIN32;_WINDOWS;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP;_DEBUG Item6=NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP;_DEBUG Item7=NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP [HistoryLists\hlIntOutputDir] Count=7 Item0=Release\obj\libexpat Item1=Release\obj\libexpat_static Item2=Release\obj\mtd Item3=Release\obj\mt Item4=Release\obj Item5=Release Item6=..\lib\Release [HistoryLists\hlFinalOutputDir] Count=1 Item0=Release\ [Debugging] DebugSourceDirs= [Parameters] RunParams= HostApplication= RemoteHost= RemotePath= RemoteDebug=0 [Compiler] ShowInfoMsgs=0 LinkDebugVcl=0 LinkCGLIB=0 [Language] ActiveLang= ProjectLang= RootDir= astropy-1.1.1/cextern/expat/bcb5/outline.bpf0000755001134200020070000000023112602615516021676 0ustar embrayscience00000000000000USEUNIT("..\examples\outline.c"); USELIB("Release\libexpat_mtd.lib"); //--------------------------------------------------------------------------- main astropy-1.1.1/cextern/expat/bcb5/expatw.bpf0000755001134200020070000000033012602615516021527 0ustar embrayscience00000000000000USEUNIT("..\lib\xmlparse.c"); USEUNIT("..\lib\xmlrole.c"); USEUNIT("..\lib\xmltok.c"); USEDEF("libexpatw_mtd.def"); //--------------------------------------------------------------------------- #define DllEntryPoint astropy-1.1.1/cextern/expat/bcb5/elements.mak0000755001134200020070000001172612602615516022047 0ustar embrayscience00000000000000# --------------------------------------------------------------------------- !if !$d(BCB) BCB = $(MAKEDIR)\.. !endif # --------------------------------------------------------------------------- # IDE SECTION # --------------------------------------------------------------------------- # The following section of the project makefile is managed by the BCB IDE. # It is recommended to use the IDE to change any of the values in this # section. # --------------------------------------------------------------------------- VERSION = BCB.05.03 # --------------------------------------------------------------------------- PROJECT = Release\elements.exe OBJFILES = Release\obj\examples\elements.obj RESFILES = MAINSOURCE = elements.bpf RESDEPEN = $(RESFILES) LIBFILES = Release\libexpats_mtd.lib IDLFILES = IDLGENFILES = LIBRARIES = PACKAGES = VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi \ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi \ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi \ dclocx50.bpi bcb2kaxserver50.bpi dclusr50.bpi SPARELIBS = DEFFILE = # --------------------------------------------------------------------------- PATHCPP = .;..\examples PATHASM = .; PATHPAS = .; PATHRC = .; DEBUGLIBPATH = $(BCB)\lib\debug RELEASELIBPATH = $(BCB)\lib\release USERDEFINES = WIN32;NDEBUG;_CONSOLE;XML_STATIC SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL INCLUDEPATH = ..\examples;$(BCB)\include LIBPATH = ..\examples;$(BCB)\lib;$(RELEASELIBPATH) WARNINGS= -w-par -w-8027 -w-8026 # --------------------------------------------------------------------------- CFLAG1 = -O2 -X- -a8 -b -k- -vi -q -I..\lib -c IDLCFLAGS = -I$(BCB)\include PFLAGS = -N2Release\obj\examples -N0Release\obj\examples -$Y- -$L- -$D- RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include AFLAGS = /mx /w2 /zn LFLAGS = -IRelease\obj\examples -D"" -ap -Tpe -x -Gn -q -L..\LIB\RELEASE_STATIC # --------------------------------------------------------------------------- ALLOBJ = c0x32.obj $(OBJFILES) ALLRES = $(RESFILES) ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib # --------------------------------------------------------------------------- !ifdef IDEOPTIONS [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [Debugging] DebugSourceDirs=$(BCB)\source\vcl !endif # --------------------------------------------------------------------------- # MAKE SECTION # --------------------------------------------------------------------------- # This section of the project file is not used by the BCB IDE. It is for # the benefit of building from the command-line using the MAKE utility. # --------------------------------------------------------------------------- .autodepend # --------------------------------------------------------------------------- !if "$(USERDEFINES)" != "" AUSERDEFINES = -d$(USERDEFINES:;= -d) !else AUSERDEFINES = !endif !if !$d(BCC32) BCC32 = bcc32 !endif !if !$d(CPP32) CPP32 = cpp32 !endif !if !$d(DCC32) DCC32 = dcc32 !endif !if !$d(TASM32) TASM32 = tasm32 !endif !if !$d(LINKER) LINKER = ilink32 !endif !if !$d(BRCC32) BRCC32 = brcc32 !endif # --------------------------------------------------------------------------- !if $d(PATHCPP) .PATH.CPP = $(PATHCPP) .PATH.C = $(PATHCPP) !endif !if $d(PATHPAS) .PATH.PAS = $(PATHPAS) !endif !if $d(PATHASM) .PATH.ASM = $(PATHASM) !endif !if $d(PATHRC) .PATH.RC = $(PATHRC) !endif # --------------------------------------------------------------------------- $(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) $(BCB)\BIN\$(LINKER) @&&! $(LFLAGS) -L$(LIBPATH) + $(ALLOBJ), + $(PROJECT),, + $(ALLLIB), + $(DEFFILE), + $(ALLRES) ! # --------------------------------------------------------------------------- .pas.hpp: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .pas.obj: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .cpp.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .cpp.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .asm.obj: $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ .rc.res: $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< # --------------------------------------------------------------------------- astropy-1.1.1/cextern/expat/bcb5/README.txt0000755001134200020070000001031512602615516021230 0ustar embrayscience00000000000000 Using a Borland compiler product The files in this directory support using both the free Borland command-line compiler tools and the Borland C++ Builder IDE. The project files have been tested with both versions 5 and 6 of the C++ Builder product. Using the free BCC32 command line compiler After downloading and installing the free C++ Builder commandline version, perform the following steps (assuming it was installed under C:\Borland\BCC55): 1) Add "C:\Borland\BCC55\BIN" to your path 2) Set the environment variable BCB to "C:\Borland\BCC55". 3) edit makefile.mak: enable or comment out the appropriate commands under clean & distclean, depending on whether your OS can use deltree /y or del /s/f/q. After that, you should simply cd to the bcb5 directory in your Expat directory tree (same structure as CVS) and run "make all" or just "make". Naming The libraries have the base name "libexpat" followed optionally by an "s" (static) or a "w" (unicode version), then an underscore and optionally "mt" (multi-threaded) and "d" (dynamic RTL). To change the name of the library a project file produces, edit the project option source (see step 1 under Unicode below) and change the name contained in the PROJECT tag. In a make file, change the value assigned to the PROJECT variable. Also, the LIBRARY entry in the .def file has to be changed to correspond to the new executable name. Unicode Considerations There are no facilities in the BCB 5 GUI to create a unicode-enabled application. Fortunately, it is not hard to do by hand. 1. The startup .obj system file must be changed to the unicode version. Go to Project|Edit Option Source, and scroll down to the ALLOBJ tag. Change c0x32.obj to c0x32w.obj. Editing this file can be quirky, but usually the following kludge will make the change stick. Close and save the file (CTRL-F4) then open the options dialog (CTRL-Shift-F11), then click OK on the dialog immediately without changing anything in it. If this doesn't work, you will have to close the project completely and edit the .bpr file by hand. If you are using a make file, just change the startup .obj file assigned to the ALLOBJ variable. 2. Add the macro define XML_UNICODE_WCHAR_T. In the GUI that goes in the options dialog, Directories/Conditionals tab, in the Conditional define box. In a make file, put it in the USERDEFINES variable. 3. Of course, your code has to be written for unicode. As a start, the "main" function is called "wmain". The tchar macros are an interesting way to write code that can easily switch between unicode and utf-8. If these macros are used, then simply adding the conditional define _UNICODE as well as XML_UNICODE_WCHAR_T will bring in the unicode versions of the tchar macros. Otherwise the utf-8 versions are used. xmlwf uses its own versions of the tchar macros which are switched on and off by the XML_UNICODE macro, which itself is set by the XML_UNICODE_WCHAR_T define. Threading The libexpat libraries are all built to link with the multi-threaded dynamic RTL's. That means they require CC32xxMT.DLL present on the installation target. To create single-threaded libs, do the following: 1. The compiler option for multi-threading must be turned off. Following the instructions above to edit the option source, remove the -tWM option from the CFLAG1 tag. In a make file, remove it from the CFLAG1 variable. 2. The single threaded RTL must be called. change the RTL in the ALLLIB tag or variable (GUI or makefile repectively) to the version without the "mt" in the name. For example, change cw32mti.lib to cw32i.lib. Static RTL's To build the libs with static RTL's do the following, 1. For the static expatlibs, in the Tlib tab on the options dialog, uncheck the "Use dynamic RTL" box. For the dynamic expatlibs, in the Linker tab on the options dialog, uncheck "Use dynamic RTL". If you are using a make file, remove the _RTLDLL assignment to the SYSDEFINES variable, and change the RTL to the version without an "i" in the ALLLIB variable. For example, cw32mti.lib would become cw32mt.lib. astropy-1.1.1/cextern/expat/bcb5/setup.bat0000755001134200020070000000105112602615516021357 0ustar embrayscience00000000000000REM CommandInterpreter: $(COMSPEC) if not exist .\release\nul mkdir release if not exist .\release\obj\nul mkdir release\obj if not exist .\release\obj\libexpat\nul mkdir release\obj\libexpat if not exist .\release\obj\libexpatw\nul mkdir release\obj\libexpatw if not exist .\release\obj\libexpat_static\nul mkdir release\obj\libexpat_static if not exist .\release\obj\libexpatw_static\nul mkdir release\obj\libexpatw_static if not exist .\release\obj\examples\nul mkdir release\obj\examples if not exist .\release\obj\xmlwf\nul mkdir release\obj\xmlwf astropy-1.1.1/cextern/expat/bcb5/expat.mak0000755001134200020070000001202412602615516021344 0ustar embrayscience00000000000000# --------------------------------------------------------------------------- !if !$d(BCB) BCB = $(MAKEDIR)\.. !endif # --------------------------------------------------------------------------- # IDE SECTION # --------------------------------------------------------------------------- # The following section of the project makefile is managed by the BCB IDE. # It is recommended to use the IDE to change any of the values in this # section. # --------------------------------------------------------------------------- VERSION = BCB.05.03 # --------------------------------------------------------------------------- PROJECT = Release\libexpat_mtd.dll OBJFILES = Release\obj\libexpat\xmlparse.obj Release\obj\libexpat\xmlrole.obj \ Release\obj\libexpat\xmltok.obj RESFILES = MAINSOURCE = expat.bpf RESDEPEN = $(RESFILES) LIBFILES = IDLFILES = IDLGENFILES = LIBRARIES = PACKAGES = VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi \ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi \ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi \ dclocx50.bpi bcb2kaxserver50.bpi dclusr50.bpi SPARELIBS = DEFFILE = libexpat_mtd.def # --------------------------------------------------------------------------- PATHCPP = .;..\lib PATHASM = .; PATHPAS = .; PATHRC = .; DEBUGLIBPATH = $(BCB)\lib\debug RELEASELIBPATH = $(BCB)\lib\release USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL INCLUDEPATH = ..\lib;$(BCB)\include LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH) WARNINGS= -w-rch -w-par -w-8027 -w-8026 -w-ccc # --------------------------------------------------------------------------- CFLAG1 = -WD -O2 -X- -a8 -b -k- -vi -q -tWM -c -tWD IDLCFLAGS = -I$(BCB)\include PFLAGS = -N2Release\obj\libexpat -N0Release\obj\libexpat -$Y- -$L- -$D- RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include AFLAGS = /mx /w2 /zn LFLAGS = -IRelease\obj\libexpat -D"" -aa -Tpd -x -Gn -Gi -q # --------------------------------------------------------------------------- ALLOBJ = c0d32.obj $(OBJFILES) ALLRES = $(RESFILES) ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib # --------------------------------------------------------------------------- !ifdef IDEOPTIONS [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [Debugging] DebugSourceDirs=$(BCB)\source\vcl !endif # --------------------------------------------------------------------------- # MAKE SECTION # --------------------------------------------------------------------------- # This section of the project file is not used by the BCB IDE. It is for # the benefit of building from the command-line using the MAKE utility. # --------------------------------------------------------------------------- .autodepend # --------------------------------------------------------------------------- !if "$(USERDEFINES)" != "" AUSERDEFINES = -d$(USERDEFINES:;= -d) !else AUSERDEFINES = !endif !if !$d(BCC32) BCC32 = bcc32 !endif !if !$d(CPP32) CPP32 = cpp32 !endif !if !$d(DCC32) DCC32 = dcc32 !endif !if !$d(TASM32) TASM32 = tasm32 !endif !if !$d(LINKER) LINKER = ilink32 !endif !if !$d(BRCC32) BRCC32 = brcc32 !endif # --------------------------------------------------------------------------- !if $d(PATHCPP) .PATH.CPP = $(PATHCPP) .PATH.C = $(PATHCPP) !endif !if $d(PATHPAS) .PATH.PAS = $(PATHPAS) !endif !if $d(PATHASM) .PATH.ASM = $(PATHASM) !endif !if $d(PATHRC) .PATH.RC = $(PATHRC) !endif # --------------------------------------------------------------------------- $(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) $(BCB)\BIN\$(LINKER) @&&! $(LFLAGS) -L$(LIBPATH) + $(ALLOBJ), + $(PROJECT),, + $(ALLLIB), + $(DEFFILE), + $(ALLRES) ! # --------------------------------------------------------------------------- .pas.hpp: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .pas.obj: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .cpp.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .cpp.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .asm.obj: $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ .rc.res: $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< # --------------------------------------------------------------------------- astropy-1.1.1/cextern/expat/bcb5/outline.mak0000755001134200020070000001166412602615516021713 0ustar embrayscience00000000000000# --------------------------------------------------------------------------- !if !$d(BCB) BCB = $(MAKEDIR)\.. !endif # --------------------------------------------------------------------------- # IDE SECTION # --------------------------------------------------------------------------- # The following section of the project makefile is managed by the BCB IDE. # It is recommended to use the IDE to change any of the values in this # section. # --------------------------------------------------------------------------- VERSION = BCB.05.03 # --------------------------------------------------------------------------- PROJECT = Release\outline.exe OBJFILES = Release\obj\examples\outline.obj RESFILES = MAINSOURCE = outline.bpf RESDEPEN = $(RESFILES) LIBFILES = Release\libexpat_mtd.lib IDLFILES = IDLGENFILES = LIBRARIES = PACKAGES = VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi \ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi \ VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi \ dclocx50.bpi bcb2kaxserver50.bpi dclusr50.bpi SPARELIBS = DEFFILE = # --------------------------------------------------------------------------- PATHCPP = .;..\examples PATHASM = .; PATHPAS = .; PATHRC = .; DEBUGLIBPATH = $(BCB)\lib\debug RELEASELIBPATH = $(BCB)\lib\release USERDEFINES = WIN32;NDEBUG;_CONSOLE SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL INCLUDEPATH = ..\examples;$(BCB)\include LIBPATH = ..\examples;$(BCB)\lib;$(RELEASELIBPATH) WARNINGS= -w-par -w-8027 -w-8026 # --------------------------------------------------------------------------- CFLAG1 = -O2 -X- -a8 -b -k- -vi -q -tWM -I..\lib -c IDLCFLAGS = -I$(BCB)\include PFLAGS = -N2Release\obj\examples -N0Release\obj\examples -$Y- -$L- -$D- RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include AFLAGS = /mx /w2 /zn LFLAGS = -IRelease\obj\examples -D"" -ap -Tpe -x -Gn -q # --------------------------------------------------------------------------- ALLOBJ = c0x32.obj $(OBJFILES) ALLRES = $(RESFILES) ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib # --------------------------------------------------------------------------- !ifdef IDEOPTIONS [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [Debugging] DebugSourceDirs=$(BCB)\source\vcl !endif # --------------------------------------------------------------------------- # MAKE SECTION # --------------------------------------------------------------------------- # This section of the project file is not used by the BCB IDE. It is for # the benefit of building from the command-line using the MAKE utility. # --------------------------------------------------------------------------- .autodepend # --------------------------------------------------------------------------- !if "$(USERDEFINES)" != "" AUSERDEFINES = -d$(USERDEFINES:;= -d) !else AUSERDEFINES = !endif !if !$d(BCC32) BCC32 = bcc32 !endif !if !$d(CPP32) CPP32 = cpp32 !endif !if !$d(DCC32) DCC32 = dcc32 !endif !if !$d(TASM32) TASM32 = tasm32 !endif !if !$d(LINKER) LINKER = ilink32 !endif !if !$d(BRCC32) BRCC32 = brcc32 !endif # --------------------------------------------------------------------------- !if $d(PATHCPP) .PATH.CPP = $(PATHCPP) .PATH.C = $(PATHCPP) !endif !if $d(PATHPAS) .PATH.PAS = $(PATHPAS) !endif !if $d(PATHASM) .PATH.ASM = $(PATHASM) !endif !if $d(PATHRC) .PATH.RC = $(PATHRC) !endif # --------------------------------------------------------------------------- $(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) $(BCB)\BIN\$(LINKER) @&&! $(LFLAGS) -L$(LIBPATH) + $(ALLOBJ), + $(PROJECT),, + $(ALLLIB), + $(DEFFILE), + $(ALLRES) ! # --------------------------------------------------------------------------- .pas.hpp: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .pas.obj: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .cpp.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .cpp.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .asm.obj: $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ .rc.res: $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< # --------------------------------------------------------------------------- astropy-1.1.1/cextern/expat/bcb5/all_projects.bpg0000755001134200020070000000310612602615516022705 0ustar embrayscience00000000000000#------------------------------------------------------------------------------ VERSION = BWS.01 #------------------------------------------------------------------------------ !ifndef ROOT ROOT = $(MAKEDIR)\.. !endif #------------------------------------------------------------------------------ MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** DCC = $(ROOT)\bin\dcc32.exe $** BRCC = $(ROOT)\bin\brcc32.exe $** #------------------------------------------------------------------------------ PROJECTS = setup libexpat_mtd.dll libexpats_mtd.lib libexpatw_mtd.dll \ libexpatws_mtd.lib elements.exe outline.exe xmlwf.exe #------------------------------------------------------------------------------ default: $(PROJECTS) #------------------------------------------------------------------------------ libexpat_mtd.dll: expat.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak libexpats_mtd.lib: expat_static.bpr $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak libexpatw_mtd.dll: expatw.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak libexpatws_mtd.lib: expatw_static.bpr $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak elements.exe: elements.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak outline.exe: outline.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak xmlwf.exe: xmlwf.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak setup: setup.bat call $** astropy-1.1.1/cextern/expat/bcb5/expatw_static.mak0000755001134200020070000001136712602615516023113 0ustar embrayscience00000000000000# --------------------------------------------------------------------------- !if !$d(BCB) BCB = $(MAKEDIR)\.. !endif # --------------------------------------------------------------------------- # IDE SECTION # --------------------------------------------------------------------------- # The following section of the project makefile is managed by the BCB IDE. # It is recommended to use the IDE to change any of the values in this # section. # --------------------------------------------------------------------------- VERSION = BCB.05.03 # --------------------------------------------------------------------------- PROJECT = Release\libexpatws_mtd.lib OBJFILES = Release\obj\libexpatw_static\xmlparse.obj \ Release\obj\libexpatw_static\xmlrole.obj \ Release\obj\libexpatw_static\xmltok.obj RESFILES = MAINSOURCE = expatw_static.bpf RESDEPEN = $(RESFILES) LIBFILES = IDLFILES = IDLGENFILES = LIBRARIES = PACKAGES = SPARELIBS = DEFFILE = # --------------------------------------------------------------------------- PATHCPP = .;..\lib PATHASM = .; PATHPAS = .; PATHRC = .; LINKER = TLib DEBUGLIBPATH = $(BCB)\lib\debug RELEASELIBPATH = $(BCB)\lib\release USERDEFINES = _WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC;XML_UNICODE_WCHAR_T SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL INCLUDEPATH = ..\lib;$(BCB)\include LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH) WARNINGS = -w-rch -w-par -w-8027 -w-8026 -w-ccc LISTFILE = # --------------------------------------------------------------------------- CFLAG1 = -O2 -X- -a8 -b -k- -vi -q -tWM -c IDLCFLAGS = -I$(BCB)\include PFLAGS = -N2Release\obj\libexpatw_static -N0Release\obj\libexpatw_static -$Y- -$L- \ -$D- RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include AFLAGS = /mx /w2 /zn LFLAGS = # --------------------------------------------------------------------------- ALLOBJ = $(OBJFILES) ALLRES = $(RESFILES) ALLLIB = $(LIBFILES) $(LIBRARIES) # --------------------------------------------------------------------------- !ifdef IDEOPTIONS [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [Debugging] DebugSourceDirs=$(BCB)\source\vcl !endif # --------------------------------------------------------------------------- # MAKE SECTION # --------------------------------------------------------------------------- # This section of the project file is not used by the BCB IDE. It is for # the benefit of building from the command-line using the MAKE utility. # --------------------------------------------------------------------------- .autodepend # --------------------------------------------------------------------------- !if "$(USERDEFINES)" != "" AUSERDEFINES = -d$(USERDEFINES:;= -d) !else AUSERDEFINES = !endif !if !$d(BCC32) BCC32 = bcc32 !endif !if !$d(CPP32) CPP32 = cpp32 !endif !if !$d(DCC32) DCC32 = dcc32 !endif !if !$d(TASM32) TASM32 = tasm32 !endif !if !$d(LINKER) LINKER = TLib !endif !if !$d(BRCC32) BRCC32 = brcc32 !endif # --------------------------------------------------------------------------- !if $d(PATHCPP) .PATH.CPP = $(PATHCPP) .PATH.C = $(PATHCPP) !endif !if $d(PATHPAS) .PATH.PAS = $(PATHPAS) !endif !if $d(PATHASM) .PATH.ASM = $(PATHASM) !endif !if $d(PATHRC) .PATH.RC = $(PATHRC) !endif # --------------------------------------------------------------------------- !if "$(LISTFILE)" == "" COMMA = !else COMMA = , !endif $(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) $(BCB)\BIN\$(LINKER) /u $@ @&&! $(LFLAGS) $? $(COMMA) $(LISTFILE) ! # --------------------------------------------------------------------------- .pas.hpp: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .pas.obj: $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } .cpp.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.obj: $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } .c.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .cpp.i: $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } .asm.obj: $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ .rc.res: $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< # --------------------------------------------------------------------------- astropy-1.1.1/cextern/expat/bcb5/expatw_static.bpf0000755001134200020070000000026512602615516023105 0ustar embrayscience00000000000000USEUNIT("..\lib\xmlparse.c"); USEUNIT("..\lib\xmlrole.c"); USEUNIT("..\lib\xmltok.c"); //--------------------------------------------------------------------------- #define Library astropy-1.1.1/cextern/expat/bcb5/expat.bpf0000755001134200020070000000032712602615516021346 0ustar embrayscience00000000000000USEUNIT("..\lib\xmlparse.c"); USEUNIT("..\lib\xmlrole.c"); USEUNIT("..\lib\xmltok.c"); USEDEF("libexpat_mtd.def"); //--------------------------------------------------------------------------- #define DllEntryPoint astropy-1.1.1/cextern/expat/bcb5/expatw_static.bpr0000755001134200020070000001066712602615516023130 0ustar embrayscience00000000000000 [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=1033 CodePage=1252 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [HistoryLists\hlIncludePath] Count=4 Item0=..\lib;$(BCB)\include Item1=$(BCB)\include Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; [HistoryLists\hlLibraryPath] Count=5 Item0=..\lib;$(BCB)\lib;$(RELEASELIBPATH) Item1=..\lib;$(BCB)\lib;..\lib\$(RELEASELIBPATH) Item2=$(BCB)\lib;$(RELEASELIBPATH) Item3=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk Item4=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; [HistoryLists\hlDebugSourcePath] Count=1 Item0=$(BCB)\source\vcl [HistoryLists\hlConditionals] Count=15 Item0=_WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC;XML_UNICODE_WCHAR_T Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC;XML_UNICODE_WCHAR_T Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC;XML_UNICODE_WCHAR_T Item3=WIN32;_WINDOWS;NDEBUG;_DEBUG;_LIB;XML_STATIC;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T Item4=WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP;_DEBUG;XML_UNICODE_WCHAR_T Item5=WIN32;_WINDOWS;NDEBUG;_UNICODE;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG Item6=WIN32;_WINDOWS;NDEBUG;_UNICODE;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG;__cplusplus Item7=WIN32;_WINDOWS;NDEBUG;_UNICODE;_LIB;COMPILED_FROM_DSP;XML_UNICODE;_DEBUG Item8=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE;_DEBUG Item9=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG;__WCHAR_T Item10=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG;_UNICODE Item11=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE;_DEBUG;_UNICODE Item12=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG Item13=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T Item14=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;XML_UNICODE [HistoryLists\hlIntOutputDir] Count=6 Item0=Release\obj\libexpatw_static Item1=Release\obj\libexpat_static Item2=Release\obj\mts Item3=Release\obj\mt Item4=..\lib\Release-w_static Item5=Release-w_static [HistoryLists\hlFinalOutputDir] Count=3 Item0=Release\ Item1=Release Item2=Release-w_static\ [HistoryLists\hlTlibPageSize] Count=1 Item0=0x0010 [Debugging] DebugSourceDirs= [Parameters] RunParams= HostApplication= RemoteHost= RemotePath= RemoteDebug=0 [Compiler] ShowInfoMsgs=0 LinkDebugVcl=0 LinkCGLIB=0 [Language] ActiveLang= ProjectLang= RootDir= astropy-1.1.1/cextern/expat/bcb5/expatw.bpr0000755001134200020070000001051312602615516021547 0ustar embrayscience00000000000000 [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=1033 CodePage=1252 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [HistoryLists\hlIncludePath] Count=4 Item0=..\lib;$(BCB)\include Item1=$(BCB)\include Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; [HistoryLists\hlLibraryPath] Count=5 Item0=..\lib;$(BCB)\lib;$(RELEASELIBPATH) Item1=..\lib;$(BCB)\lib;..\lib\$(RELEASELIBPATH) Item2=$(BCB)\lib;$(RELEASELIBPATH) Item3=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk Item4=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; [HistoryLists\hlDebugSourcePath] Count=1 Item0=$(BCB)\source\vcl [HistoryLists\hlConditionals] Count=9 Item0=_WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T Item2=_WINDOWS;WIN32;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T Item3=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_USRDLL;EXPAT_EXPORTS;_DEBUG;XML_UNICODE_WCHAR_T Item4=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T;_DEBUG Item5=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_UNICODE;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T;_DEBUG Item6=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_UNICODE;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T Item7=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T;XML_UNICODE Item8=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T [HistoryLists\hlIntOutputDir] Count=8 Item0=Release\obj\libexpatw Item1=Release\obj\libexpat Item2=Release\obj\mtd Item3=Release\obj\mt Item4=Release_w\obj Item5=Release-w\obj Item6=Release-w Item7=..\lib\Release-w [HistoryLists\hlFinalOutputDir] Count=5 Item0=Release\ Item1=Release Item2=Release_w\ Item3=Release-w\ Item4=Release-w [Debugging] DebugSourceDirs= [Parameters] RunParams= HostApplication= RemoteHost= RemotePath= RemoteDebug=0 [Compiler] ShowInfoMsgs=0 LinkDebugVcl=0 LinkCGLIB=0 [Language] ActiveLang= ProjectLang= RootDir= astropy-1.1.1/cextern/expat/configure0000755001134200020070000212051412602615516020630 0ustar embrayscience00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for expat 2.1.0. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: expat-bugs@libexpat.org about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script $0: under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='expat' PACKAGE_TARNAME='expat' PACKAGE_VERSION='2.1.0' PACKAGE_STRING='expat 2.1.0' PACKAGE_BUGREPORT='expat-bugs@libexpat.org' PACKAGE_URL='' ac_unique_file="Makefile.in" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_list= ac_subst_vars='LTLIBOBJS LIBOBJS FILEMAP INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM CXXCPP ac_ct_CXX CXXFLAGS CXX LIBAGE LIBREVISION LIBCURRENT CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL AWK RANLIB STRIP ac_ct_AR AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LIBTOOL OBJDUMP DLLTOOL AS host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures expat 2.1.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/expat] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of expat 2.1.0:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF expat configure 2.1.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## -------------------------------------- ## ## Report this to expat-bugs@libexpat.org ## ## -------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by expat $as_me 2.1.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in conftools "$srcdir"/conftools; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in conftools \"$srcdir\"/conftools" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. LIBCURRENT=7 LIBREVISION=0 LIBAGE=6 ac_config_headers="$ac_config_headers expat_config.h" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4' macro_revision='1.3293' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' lt_prog_compiler_pic='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' if test "$GCC" = yes ; then OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes" CFLAGS="$OLDCFLAGS -fexceptions" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fexceptions" >&5 $as_echo_n "checking whether $CC accepts -fexceptions... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; CFLAGS="$OLDCFLAGS" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'` fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then if test "$cross_compiling" = yes; then : echo $ac_n "cross-compiling... " 2>&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ main () { /* Are we little or big endian? From Harbison&Steele. */ union { long l; char c[sizeof (long)]; } u; u.l = 1; exit (u.c[sizeof (long) - 1] == 1); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } if test $ac_cv_c_bigendian = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking to probe for byte ordering" >&5 $as_echo_n "checking to probe for byte ordering... " >&6; } cat >conftest.c <&6 ac_cv_c_bigendian=yes fi if test `grep -l LiTTleEnDian conftest.o` ; then echo $ac_n ' little endian probe OK, ' 1>&6 if test $ac_cv_c_bigendian = yes ; then ac_cv_c_bigendian=unknown; else ac_cv_c_bigendian=no fi fi echo $ac_n 'guessing bigendian ... ' >&6 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } fi if test $ac_cv_c_bigendian = yes; then $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h BYTEORDER=4321 else BYTEORDER=1234 fi cat >>confdefs.h <<_ACEOF #define BYTEORDER $BYTEORDER _ACEOF if test $ac_cv_c_bigendian = unknown; then as_fn_error please pre-set ac_cv_c_bigendian "unknown endianess - sorry" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi for ac_func in memmove bcopy do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in fcntl.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi for ac_header in $ac_header_list do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_mmap_fixed_mapped=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; const char *cdata2; int i, pagesize; int fd, fd2; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 2; if (write (fd, data, pagesize) != pagesize) return 3; close (fd); /* Next, check that the tail of a page is zero-filled. File must have non-zero length, otherwise we risk SIGBUS for entire page. */ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; cdata2 = ""; if (write (fd2, cdata2, 1) != 1) return 5; data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) if (*(data2 + i)) return 7; close (fd2); if (munmap (data2, pagesize)) return 8; /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 9; if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 10; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 11; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 12; if (read (fd, data3, pagesize) != pagesize) return 13; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 14; close (fd); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_mmap_fixed_mapped=yes else ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then $as_echo "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap conftest.txt if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then FILEMAP=unixfilemap else FILEMAP=readfilemap fi # AC_CPP_FUNC # ------------------ # # Checks to see if ANSI C99 CPP variable __func__ works. # If not, perhaps __FUNCTION__ works instead. # If not, we'll just define __func__ to "". # AC_CPP_FUNC case $ac_cv_prog_cc_stdc in #( no) : ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 else ac_cv_prog_cc_stdc=no fi fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } if ${ac_cv_prog_cc_stdc+:} false; then : $as_echo_n "(cached) " >&6 fi case $ac_cv_prog_cc_stdc in #( no) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; #( '') : { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C99-conforming __func__" >&5 $as_echo_n "checking for an ANSI C99-conforming __func__... " >&6; } if ${ac_cv_cpp_func+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { char *foo = __func__; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_cpp_func=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { char *foo = __FUNCTION__; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_cpp_func=__FUNCTION__ else ac_cv_cpp_func=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cpp_func" >&5 $as_echo "$ac_cv_cpp_func" >&6; } if test $ac_cv_cpp_func = __FUNCTION__; then $as_echo "#define __func__ __FUNCTION__" >>confdefs.h elif test $ac_cv_cpp_func = no; then $as_echo "#define __func__ \"\"" >>confdefs.h fi $as_echo "#define XML_NS 1" >>confdefs.h $as_echo "#define XML_DTD 1" >>confdefs.h $as_echo "#define XML_CONTEXT_BYTES 1024" >>confdefs.h ac_config_files="$ac_config_files Makefile expat.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by expat $as_me 2.1.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ expat config.status 2.1.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in AS \ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "expat_config.h") CONFIG_HEADERS="$CONFIG_HEADERS expat_config.h" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "expat.pc") CONFIG_FILES="$CONFIG_FILES expat.pc" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi abs_srcdir="`cd $srcdir && pwd`" abs_builddir="`pwd`" if test "$abs_srcdir" != "$abs_builddir"; then make mkdir-init fi astropy-1.1.1/cextern/expat/m4/0000755001134200020070000000000012644022135017227 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/m4/lt~obsolete.m40000644001134200020070000001375612602615516022064 0ustar embrayscience00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) astropy-1.1.1/cextern/expat/m4/ltoptions.m40000644001134200020070000002725612602615516021545 0ustar embrayscience00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) astropy-1.1.1/cextern/expat/m4/libtool.m40000644001134200020070000104622012602615516021147 0ustar embrayscience00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS astropy-1.1.1/cextern/expat/m4/ltversion.m40000644001134200020070000000125612602615516021527 0ustar embrayscience00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3293 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4]) m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4' macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) astropy-1.1.1/cextern/expat/m4/ltsugar.m40000644001134200020070000001042412602615516021160 0ustar embrayscience00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) astropy-1.1.1/cextern/expat/tests/0000755001134200020070000000000012644022135020051 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/tests/chardata.c0000755001134200020070000000573612602615516022007 0ustar embrayscience00000000000000/* Copyright (c) 1998-2003 Thai Open Source Software Center Ltd See the file COPYING for copying permission. chardata.c */ #ifdef HAVE_EXPAT_CONFIG_H #include #endif #ifdef HAVE_CHECK_H #include #else #include "minicheck.h" #endif #include #include #include #include "chardata.h" static int xmlstrlen(const XML_Char *s) { int len = 0; assert(s != NULL); while (s[len] != 0) ++len; return len; } void CharData_Init(CharData *storage) { assert(storage != NULL); storage->count = -1; } void CharData_AppendString(CharData *storage, const char *s) { int maxchars = sizeof(storage->data) / sizeof(storage->data[0]); int len; assert(s != NULL); len = strlen(s); if (storage->count < 0) storage->count = 0; if ((len + storage->count) > maxchars) { len = (maxchars - storage->count); } if (len + storage->count < sizeof(storage->data)) { memcpy(storage->data + storage->count, s, len); storage->count += len; } } void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len) { int maxchars; assert(storage != NULL); assert(s != NULL); maxchars = sizeof(storage->data) / sizeof(storage->data[0]); if (storage->count < 0) storage->count = 0; if (len < 0) len = xmlstrlen(s); if ((len + storage->count) > maxchars) { len = (maxchars - storage->count); } if (len + storage->count < sizeof(storage->data)) { memcpy(storage->data + storage->count, s, len * sizeof(storage->data[0])); storage->count += len; } } int CharData_CheckString(CharData *storage, const char *expected) { char buffer[1280]; int len; int count; assert(storage != NULL); assert(expected != NULL); count = (storage->count < 0) ? 0 : storage->count; len = strlen(expected); if (len != count) { if (sizeof(XML_Char) == 1) sprintf(buffer, "wrong number of data characters:" " got %d, expected %d:\n%s", count, len, storage->data); else sprintf(buffer, "wrong number of data characters: got %d, expected %d", count, len); fail(buffer); return 0; } if (memcmp(expected, storage->data, len) != 0) { fail("got bad data bytes"); return 0; } return 1; } int CharData_CheckXMLChars(CharData *storage, const XML_Char *expected) { char buffer[1024]; int len = xmlstrlen(expected); int count; assert(storage != NULL); count = (storage->count < 0) ? 0 : storage->count; if (len != count) { sprintf(buffer, "wrong number of data characters: got %d, expected %d", count, len); fail(buffer); return 0; } if (memcmp(expected, storage->data, len * sizeof(storage->data[0])) != 0) { fail("got bad data bytes"); return 0; } return 1; } astropy-1.1.1/cextern/expat/tests/runtestspp.cpp0000755001134200020070000000027112602615516023014 0ustar embrayscience00000000000000// C++ compilation harness for the test suite. // // This is used to ensure the Expat headers can be included from C++ // and have everything work as expected. // #include "runtests.c" astropy-1.1.1/cextern/expat/tests/xmltest.sh0000755001134200020070000000674512602615516022131 0ustar embrayscience00000000000000#! /bin/sh # EXPAT TEST SCRIPT FOR W3C XML TEST SUITE # This script can be used to exercise Expat against the # w3c.org xml test suite, available from # http://www.w3.org/XML/Test/xmlts20020606.zip. # To run this script, first set XMLWF below so that xmlwf can be # found, then set the output directory with OUTPUT. # The script lists all test cases where Expat shows a discrepancy # from the expected result. Test cases where only the canonical # output differs are prefixed with "Output differs:", and a diff file # is generated in the appropriate subdirectory under $OUTPUT. # If there are output files provided, the script will use # output from xmlwf and compare the desired output against it. # However, one has to take into account that the canonical output # produced by xmlwf conforms to an older definition of canonical XML # and does not generate notation declarations. MYDIR="`dirname \"$0\"`" cd "$MYDIR" MYDIR="`pwd`" XMLWF="`dirname \"$MYDIR\"`/xmlwf/xmlwf" # XMLWF=/usr/local/bin/xmlwf TS="$MYDIR/XML-Test-Suite" # OUTPUT must terminate with the directory separator. OUTPUT="$TS/out/" # OUTPUT=/home/tmp/xml-testsuite-out/ # RunXmlwfNotWF file reldir # reldir includes trailing slash RunXmlwfNotWF() { file="$1" reldir="$2" $XMLWF -p "$file" > outfile || return $? read outdata < outfile if test "$outdata" = "" ; then echo "Expected not well-formed: $reldir$file" return 1 else return 0 fi } # RunXmlwfWF file reldir # reldir includes trailing slash RunXmlwfWF() { file="$1" reldir="$2" $XMLWF -p -d "$OUTPUT$reldir" "$file" > outfile || return $? read outdata < outfile if test "$outdata" = "" ; then if [ -f "out/$file" ] ; then diff -u "$OUTPUT$reldir$file" "out/$file" > outfile if [ -s outfile ] ; then cp outfile "$OUTPUT$reldir$file.diff" echo "Output differs: $reldir$file" return 1 fi fi return 0 else echo "In $reldir: $outdata" return 1 fi } SUCCESS=0 ERROR=0 UpdateStatus() { if [ "$1" -eq 0 ] ; then SUCCESS=`expr $SUCCESS + 1` else ERROR=`expr $ERROR + 1` fi } ########################## # well-formed test cases # ########################## cd "$TS/xmlconf" for xmldir in ibm/valid/P* \ ibm/invalid/P* \ xmltest/valid/ext-sa \ xmltest/valid/not-sa \ xmltest/invalid \ xmltest/invalid/not-sa \ xmltest/valid/sa \ sun/valid \ sun/invalid ; do cd "$TS/xmlconf/$xmldir" mkdir -p "$OUTPUT$xmldir" for xmlfile in *.xml ; do RunXmlwfWF "$xmlfile" "$xmldir/" UpdateStatus $? done rm outfile done cd "$TS/xmlconf/oasis" mkdir -p "$OUTPUT"oasis for xmlfile in *pass*.xml ; do RunXmlwfWF "$xmlfile" "oasis/" UpdateStatus $? done rm outfile ############################## # not well-formed test cases # ############################## cd "$TS/xmlconf" for xmldir in ibm/not-wf/P* \ ibm/not-wf/p28a \ ibm/not-wf/misc \ xmltest/not-wf/ext-sa \ xmltest/not-wf/not-sa \ xmltest/not-wf/sa \ sun/not-wf ; do cd "$TS/xmlconf/$xmldir" for xmlfile in *.xml ; do RunXmlwfNotWF "$xmlfile" "$xmldir/" UpdateStatus $? done rm outfile done cd "$TS/xmlconf/oasis" for xmlfile in *fail*.xml ; do RunXmlwfNotWF "$xmlfile" "oasis/" UpdateStatus $? done rm outfile echo "Passed: $SUCCESS" echo "Failed: $ERROR" astropy-1.1.1/cextern/expat/tests/chardata.h0000755001134200020070000000142712602615516022005 0ustar embrayscience00000000000000/* chardata.h Interface to some helper routines used to accumulate and check text and attribute content. */ #ifdef __cplusplus extern "C" { #endif #ifndef XML_CHARDATA_H #define XML_CHARDATA_H 1 #ifndef XML_VERSION #include "expat.h" /* need XML_Char */ #endif typedef struct { int count; /* # of chars, < 0 if not set */ XML_Char data[1024]; } CharData; void CharData_Init(CharData *storage); void CharData_AppendString(CharData *storage, const char *s); void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len); int CharData_CheckString(CharData *storage, const char *s); int CharData_CheckXMLChars(CharData *storage, const XML_Char *s); #endif /* XML_CHARDATA_H */ #ifdef __cplusplus } #endif astropy-1.1.1/cextern/expat/tests/README.txt0000755001134200020070000000107212602615516021557 0ustar embrayscience00000000000000This directory contains the (fledgling) test suite for Expat. The tests provide general unit testing and regression coverage. The tests are not expected to be useful examples of Expat usage; see the examples/ directory for that. The Expat tests use a partial internal implementation of the "Check" unit testing framework for C. More information on Check can be found at: http://check.sourceforge.net/ Expat must be built and, depending on platform, must be installed, before "make check" can be executed. This test suite can all change in a later version. astropy-1.1.1/cextern/expat/tests/benchmark/0000755001134200020070000000000012644022135022003 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/tests/benchmark/benchmark.dsp0000755001134200020070000000566712602615516024473 0ustar embrayscience00000000000000# Microsoft Developer Studio Project File - Name="benchmark" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=benchmark - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "benchmark.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "benchmark.mak" CFG="benchmark - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "benchmark - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "benchmark - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "benchmark - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /I "..\..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x1009 /d "NDEBUG" # ADD RSC /l 0x1009 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:console /machine:I386 # ADD LINK32 libexpat.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\win32\bin\Release" !ELSEIF "$(CFG)" == "benchmark - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD BASE RSC /l 0x1009 /d "_DEBUG" # ADD RSC /l 0x1009 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 libexpat.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\win32\bin\Debug" !ENDIF # Begin Target # Name "benchmark - Win32 Release" # Name "benchmark - Win32 Debug" # Begin Source File SOURCE=.\benchmark.c # End Source File # End Target # End Project astropy-1.1.1/cextern/expat/tests/benchmark/README.txt0000755001134200020070000000104212602615516023506 0ustar embrayscience00000000000000Use this benchmark command line utility as follows: benchmark [-n] <# iterations> The command line arguments are: -n ... optional; if supplied, namespace processing is turned on ... name/path of test xml file ... size of processing buffer; the file is parsed in chunks of this size <# iterations> ... how often will the file be parsed Returns: The time (in seconds) it takes to parse the test file, averaged over the number of iterations.astropy-1.1.1/cextern/expat/tests/benchmark/benchmark.c0000755001134200020070000000535612602615516024122 0ustar embrayscience00000000000000#include #include #include #include #include "expat.h" #if defined(__amigaos__) && defined(__USE_INLINE__) #include #endif #ifdef XML_LARGE_SIZE #define XML_FMT_INT_MOD "ll" #else #define XML_FMT_INT_MOD "l" #endif static void usage(const char *prog, int rc) { fprintf(stderr, "usage: %s [-n] filename bufferSize nr_of_loops\n", prog); exit(rc); } int main (int argc, char *argv[]) { XML_Parser parser; char *XMLBuf, *XMLBufEnd, *XMLBufPtr; FILE *fd; struct stat fileAttr; int nrOfLoops, bufferSize, fileSize, i, isFinal; int j = 0, ns = 0; clock_t tstart, tend; double cpuTime = 0.0; if (argc > 1) { if (argv[1][0] == '-') { if (argv[1][1] == 'n' && argv[1][2] == '\0') { ns = 1; j = 1; } else usage(argv[0], 1); } } if (argc != j + 4) usage(argv[0], 1); if (stat (argv[j + 1], &fileAttr) != 0) { fprintf (stderr, "could not access file '%s'\n", argv[j + 1]); return 2; } fd = fopen (argv[j + 1], "r"); if (!fd) { fprintf (stderr, "could not open file '%s'\n", argv[j + 1]); exit(2); } bufferSize = atoi (argv[j + 2]); nrOfLoops = atoi (argv[j + 3]); if (bufferSize <= 0 || nrOfLoops <= 0) { fprintf (stderr, "buffer size and nr of loops must be greater than zero.\n"); exit(3); } XMLBuf = malloc (fileAttr.st_size); fileSize = fread (XMLBuf, sizeof (char), fileAttr.st_size, fd); fclose (fd); if (ns) parser = XML_ParserCreateNS(NULL, '!'); else parser = XML_ParserCreate(NULL); i = 0; XMLBufEnd = XMLBuf + fileSize; while (i < nrOfLoops) { XMLBufPtr = XMLBuf; isFinal = 0; tstart = clock(); do { int parseBufferSize = XMLBufEnd - XMLBufPtr; if (parseBufferSize <= bufferSize) isFinal = 1; else parseBufferSize = bufferSize; if (!XML_Parse (parser, XMLBufPtr, parseBufferSize, isFinal)) { fprintf (stderr, "error '%s' at line %" XML_FMT_INT_MOD \ "u character %" XML_FMT_INT_MOD "u\n", XML_ErrorString (XML_GetErrorCode (parser)), XML_GetCurrentLineNumber (parser), XML_GetCurrentColumnNumber (parser)); free (XMLBuf); XML_ParserFree (parser); exit (4); } XMLBufPtr += bufferSize; } while (!isFinal); tend = clock(); cpuTime += ((double) (tend - tstart)) / CLOCKS_PER_SEC; XML_ParserReset(parser, NULL); i++; } XML_ParserFree (parser); free (XMLBuf); printf ("%d loops, with buffer size %d. Average time per loop: %f\n", nrOfLoops, bufferSize, cpuTime / (double) nrOfLoops); return 0; } astropy-1.1.1/cextern/expat/tests/benchmark/benchmark.dsw0000755001134200020070000000146412602615516024471 0ustar embrayscience00000000000000Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "benchmark"=.\benchmark.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name expat End Project Dependency }}} ############################################################################### Project: "expat"=..\..\lib\expat.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### astropy-1.1.1/cextern/expat/tests/minicheck.c0000755001134200020070000001017312602615516022161 0ustar embrayscience00000000000000/* Miniature re-implementation of the "check" library. * * This is intended to support just enough of check to run the Expat * tests. This interface is based entirely on the portion of the * check library being used. */ #include #include #include #include #include "minicheck.h" Suite * suite_create(char *name) { Suite *suite = (Suite *) calloc(1, sizeof(Suite)); if (suite != NULL) { suite->name = name; } return suite; } TCase * tcase_create(char *name) { TCase *tc = (TCase *) calloc(1, sizeof(TCase)); if (tc != NULL) { tc->name = name; } return tc; } void suite_add_tcase(Suite *suite, TCase *tc) { assert(suite != NULL); assert(tc != NULL); assert(tc->next_tcase == NULL); tc->next_tcase = suite->tests; suite->tests = tc; } void tcase_add_checked_fixture(TCase *tc, tcase_setup_function setup, tcase_teardown_function teardown) { assert(tc != NULL); tc->setup = setup; tc->teardown = teardown; } void tcase_add_test(TCase *tc, tcase_test_function test) { assert(tc != NULL); if (tc->allocated == tc->ntests) { int nalloc = tc->allocated + 100; size_t new_size = sizeof(tcase_test_function) * nalloc; tcase_test_function *new_tests = realloc(tc->tests, new_size); assert(new_tests != NULL); if (new_tests != tc->tests) { free(tc->tests); tc->tests = new_tests; } tc->allocated = nalloc; } tc->tests[tc->ntests] = test; tc->ntests++; } SRunner * srunner_create(Suite *suite) { SRunner *runner = calloc(1, sizeof(SRunner)); if (runner != NULL) { runner->suite = suite; } return runner; } static jmp_buf env; static char const *_check_current_function = NULL; static int _check_current_lineno = -1; static char const *_check_current_filename = NULL; void _check_set_test_info(char const *function, char const *filename, int lineno) { _check_current_function = function; _check_current_lineno = lineno; _check_current_filename = filename; } static void add_failure(SRunner *runner, int verbosity) { runner->nfailures++; if (verbosity >= CK_VERBOSE) { printf("%s:%d: %s\n", _check_current_filename, _check_current_lineno, _check_current_function); } } void srunner_run_all(SRunner *runner, int verbosity) { Suite *suite; TCase *tc; assert(runner != NULL); suite = runner->suite; tc = suite->tests; while (tc != NULL) { int i; for (i = 0; i < tc->ntests; ++i) { runner->nchecks++; if (tc->setup != NULL) { /* setup */ if (setjmp(env)) { add_failure(runner, verbosity); continue; } tc->setup(); } /* test */ if (setjmp(env)) { add_failure(runner, verbosity); continue; } (tc->tests[i])(); /* teardown */ if (tc->teardown != NULL) { if (setjmp(env)) { add_failure(runner, verbosity); continue; } tc->teardown(); } } tc = tc->next_tcase; } if (verbosity) { int passed = runner->nchecks - runner->nfailures; double percentage = ((double) passed) / runner->nchecks; int display = (int) (percentage * 100); printf("%d%%: Checks: %d, Failed: %d\n", display, runner->nchecks, runner->nfailures); } } void _fail_unless(int condition, const char *file, int line, char *msg) { /* Always print the error message so it isn't lost. In this case, we have a failure, so there's no reason to be quiet about what it is. */ if (msg != NULL) printf("%s", msg); longjmp(env, 1); } int srunner_ntests_failed(SRunner *runner) { assert(runner != NULL); return runner->nfailures; } void srunner_free(SRunner *runner) { free(runner->suite); free(runner); } astropy-1.1.1/cextern/expat/tests/minicheck.h0000755001134200020070000000444012602615516022166 0ustar embrayscience00000000000000/* Miniature re-implementation of the "check" library. * * This is intended to support just enough of check to run the Expat * tests. This interface is based entirely on the portion of the * check library being used. * * This is *source* compatible, but not necessary *link* compatible. */ #ifdef __cplusplus extern "C" { #endif #define CK_NOFORK 0 #define CK_FORK 1 #define CK_SILENT 0 #define CK_NORMAL 1 #define CK_VERBOSE 2 /* Workaround for Microsoft's compiler and Tru64 Unix systems where the C compiler has a working __func__, but the C++ compiler only has a working __FUNCTION__. This could be fixed in configure.in, but it's not worth it right now. */ #if defined (_MSC_VER) || (defined(__osf__) && defined(__cplusplus)) #define __func__ __FUNCTION__ #endif #define START_TEST(testname) static void testname(void) { \ _check_set_test_info(__func__, __FILE__, __LINE__); \ { #define END_TEST } } #define fail(msg) _fail_unless(0, __FILE__, __LINE__, msg) typedef void (*tcase_setup_function)(void); typedef void (*tcase_teardown_function)(void); typedef void (*tcase_test_function)(void); typedef struct SRunner SRunner; typedef struct Suite Suite; typedef struct TCase TCase; struct SRunner { Suite *suite; int nchecks; int nfailures; }; struct Suite { char *name; TCase *tests; }; struct TCase { char *name; tcase_setup_function setup; tcase_teardown_function teardown; tcase_test_function *tests; int ntests; int allocated; TCase *next_tcase; }; /* Internal helper. */ void _check_set_test_info(char const *function, char const *filename, int lineno); /* * Prototypes for the actual implementation. */ void _fail_unless(int condition, const char *file, int line, char *msg); Suite *suite_create(char *name); TCase *tcase_create(char *name); void suite_add_tcase(Suite *suite, TCase *tc); void tcase_add_checked_fixture(TCase *, tcase_setup_function, tcase_teardown_function); void tcase_add_test(TCase *tc, tcase_test_function test); SRunner *srunner_create(Suite *suite); void srunner_run_all(SRunner *runner, int verbosity); int srunner_ntests_failed(SRunner *runner); void srunner_free(SRunner *runner); #ifdef __cplusplus } #endif astropy-1.1.1/cextern/expat/tests/runtests.c0000755001134200020070000014001412602615516022114 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd See the file COPYING for copying permission. runtest.c : run the Expat test suite */ #ifdef HAVE_EXPAT_CONFIG_H #include #endif #include #include #include #include #include #include "expat.h" #include "chardata.h" #include "minicheck.h" #if defined(__amigaos__) && defined(__USE_INLINE__) #include #endif #ifdef XML_LARGE_SIZE #define XML_FMT_INT_MOD "ll" #else #define XML_FMT_INT_MOD "l" #endif static XML_Parser parser; static void basic_setup(void) { parser = XML_ParserCreate(NULL); if (parser == NULL) fail("Parser not created."); } static void basic_teardown(void) { if (parser != NULL) XML_ParserFree(parser); } /* Generate a failure using the parser state to create an error message; this should be used when the parser reports an error we weren't expecting. */ static void _xml_failure(XML_Parser parser, const char *file, int line) { char buffer[1024]; enum XML_Error err = XML_GetErrorCode(parser); sprintf(buffer, " %d: %s (line %" XML_FMT_INT_MOD "u, offset %"\ XML_FMT_INT_MOD "u)\n reported from %s, line %d\n", err, XML_ErrorString(err), XML_GetCurrentLineNumber(parser), XML_GetCurrentColumnNumber(parser), file, line); _fail_unless(0, file, line, buffer); } #define xml_failure(parser) _xml_failure((parser), __FILE__, __LINE__) static void _expect_failure(char *text, enum XML_Error errorCode, char *errorMessage, char *file, int lineno) { if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_OK) /* Hackish use of _fail_unless() macro, but let's us report the right filename and line number. */ _fail_unless(0, file, lineno, errorMessage); if (XML_GetErrorCode(parser) != errorCode) _xml_failure(parser, file, lineno); } #define expect_failure(text, errorCode, errorMessage) \ _expect_failure((text), (errorCode), (errorMessage), \ __FILE__, __LINE__) /* Dummy handlers for when we need to set a handler to tickle a bug, but it doesn't need to do anything. */ static void XMLCALL dummy_start_doctype_handler(void *userData, const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset) {} static void XMLCALL dummy_end_doctype_handler(void *userData) {} static void XMLCALL dummy_entity_decl_handler(void *userData, const XML_Char *entityName, int is_parameter_entity, const XML_Char *value, int value_length, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName) {} static void XMLCALL dummy_notation_decl_handler(void *userData, const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) {} static void XMLCALL dummy_element_decl_handler(void *userData, const XML_Char *name, XML_Content *model) {} static void XMLCALL dummy_attlist_decl_handler(void *userData, const XML_Char *elname, const XML_Char *attname, const XML_Char *att_type, const XML_Char *dflt, int isrequired) {} static void XMLCALL dummy_comment_handler(void *userData, const XML_Char *data) {} static void XMLCALL dummy_pi_handler(void *userData, const XML_Char *target, const XML_Char *data) {} static void XMLCALL dummy_start_element(void *userData, const XML_Char *name, const XML_Char **atts) {} /* * Character & encoding tests. */ START_TEST(test_nul_byte) { char text[] = "\0"; /* test that a NUL byte (in US-ASCII data) is an error */ if (XML_Parse(parser, text, sizeof(text) - 1, XML_TRUE) == XML_STATUS_OK) fail("Parser did not report error on NUL-byte."); if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) xml_failure(parser); } END_TEST START_TEST(test_u0000_char) { /* test that a NUL byte (in US-ASCII data) is an error */ expect_failure("", XML_ERROR_BAD_CHAR_REF, "Parser did not report error on NUL-byte."); } END_TEST START_TEST(test_bom_utf8) { /* This test is really just making sure we don't core on a UTF-8 BOM. */ char *text = "\357\273\277"; if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST START_TEST(test_bom_utf16_be) { char text[] = "\376\377\0<\0e\0/\0>"; if (XML_Parse(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST START_TEST(test_bom_utf16_le) { char text[] = "\377\376<\0e\0/\0>\0"; if (XML_Parse(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST static void XMLCALL accumulate_characters(void *userData, const XML_Char *s, int len) { CharData_AppendXMLChars((CharData *)userData, s, len); } static void XMLCALL accumulate_attribute(void *userData, const XML_Char *name, const XML_Char **atts) { CharData *storage = (CharData *)userData; if (storage->count < 0 && atts != NULL && atts[0] != NULL) { /* "accumulate" the value of the first attribute we see */ CharData_AppendXMLChars(storage, atts[1], -1); } } static void _run_character_check(XML_Char *text, XML_Char *expected, const char *file, int line) { CharData storage; CharData_Init(&storage); XML_SetUserData(parser, &storage); XML_SetCharacterDataHandler(parser, accumulate_characters); if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) _xml_failure(parser, file, line); CharData_CheckXMLChars(&storage, expected); } #define run_character_check(text, expected) \ _run_character_check(text, expected, __FILE__, __LINE__) static void _run_attribute_check(XML_Char *text, XML_Char *expected, const char *file, int line) { CharData storage; CharData_Init(&storage); XML_SetUserData(parser, &storage); XML_SetStartElementHandler(parser, accumulate_attribute); if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) _xml_failure(parser, file, line); CharData_CheckXMLChars(&storage, expected); } #define run_attribute_check(text, expected) \ _run_attribute_check(text, expected, __FILE__, __LINE__) /* Regression test for SF bug #491986. */ START_TEST(test_danish_latin1) { char *text = "\n" "J\xF8rgen \xE6\xF8\xE5\xC6\xD8\xC5"; run_character_check(text, "J\xC3\xB8rgen \xC3\xA6\xC3\xB8\xC3\xA5\xC3\x86\xC3\x98\xC3\x85"); } END_TEST /* Regression test for SF bug #514281. */ START_TEST(test_french_charref_hexidecimal) { char *text = "\n" "éèàçêÈ"; run_character_check(text, "\xC3\xA9\xC3\xA8\xC3\xA0\xC3\xA7\xC3\xAA\xC3\x88"); } END_TEST START_TEST(test_french_charref_decimal) { char *text = "\n" "éèàçêÈ"; run_character_check(text, "\xC3\xA9\xC3\xA8\xC3\xA0\xC3\xA7\xC3\xAA\xC3\x88"); } END_TEST START_TEST(test_french_latin1) { char *text = "\n" "\xE9\xE8\xE0\xE7\xEa\xC8"; run_character_check(text, "\xC3\xA9\xC3\xA8\xC3\xA0\xC3\xA7\xC3\xAA\xC3\x88"); } END_TEST START_TEST(test_french_utf8) { char *text = "\n" "\xC3\xA9"; run_character_check(text, "\xC3\xA9"); } END_TEST /* Regression test for SF bug #600479. XXX There should be a test that exercises all legal XML Unicode characters as PCDATA and attribute value content, and XML Name characters as part of element and attribute names. */ START_TEST(test_utf8_false_rejection) { char *text = "\xEF\xBA\xBF"; run_character_check(text, "\xEF\xBA\xBF"); } END_TEST /* Regression test for SF bug #477667. This test assures that any 8-bit character followed by a 7-bit character will not be mistakenly interpreted as a valid UTF-8 sequence. */ START_TEST(test_illegal_utf8) { char text[100]; int i; for (i = 128; i <= 255; ++i) { sprintf(text, "%ccd", i); if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_OK) { sprintf(text, "expected token error for '%c' (ordinal %d) in UTF-8 text", i, i); fail(text); } else if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) xml_failure(parser); /* Reset the parser since we use the same parser repeatedly. */ XML_ParserReset(parser, NULL); } } END_TEST START_TEST(test_utf16) { /* some text */ char text[] = "\000<\000?\000x\000m\000\154\000 \000v\000e\000r\000s\000i\000o" "\000n\000=\000'\0001\000.\000\060\000'\000 \000e\000n\000c\000o" "\000d\000i\000n\000g\000=\000'\000U\000T\000F\000-\0001\000\066" "\000'\000?\000>\000\n" "\000<\000d\000o\000c\000 \000a\000=\000'\0001\0002\0003\000'" "\000>\000s\000o\000m\000e\000 \000t\000e\000x\000t\000<\000/" "\000d\000o\000c\000>"; if (XML_Parse(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST START_TEST(test_utf16_le_epilog_newline) { unsigned int first_chunk_bytes = 17; char text[] = "\xFF\xFE" /* BOM */ "<\000e\000/\000>\000" /* document element */ "\r\000\n\000\r\000\n\000"; /* epilog */ if (first_chunk_bytes >= sizeof(text) - 1) fail("bad value of first_chunk_bytes"); if ( XML_Parse(parser, text, first_chunk_bytes, XML_FALSE) == XML_STATUS_ERROR) xml_failure(parser); else { enum XML_Status rc; rc = XML_Parse(parser, text + first_chunk_bytes, sizeof(text) - first_chunk_bytes - 1, XML_TRUE); if (rc == XML_STATUS_ERROR) xml_failure(parser); } } END_TEST /* Regression test for SF bug #481609, #774028. */ START_TEST(test_latin1_umlauts) { char *text = "\n" "\xE4 \xF6 \xFC ä ö ü ä ö ü >"; char *utf8 = "\xC3\xA4 \xC3\xB6 \xC3\xBC " "\xC3\xA4 \xC3\xB6 \xC3\xBC " "\xC3\xA4 \xC3\xB6 \xC3\xBC >"; run_character_check(text, utf8); XML_ParserReset(parser, NULL); run_attribute_check(text, utf8); } END_TEST /* Regression test #1 for SF bug #653180. */ START_TEST(test_line_number_after_parse) { char *text = "\n" "\n" "\n"; XML_Size lineno; if (XML_Parse(parser, text, strlen(text), XML_FALSE) == XML_STATUS_ERROR) xml_failure(parser); lineno = XML_GetCurrentLineNumber(parser); if (lineno != 4) { char buffer[100]; sprintf(buffer, "expected 4 lines, saw %" XML_FMT_INT_MOD "u", lineno); fail(buffer); } } END_TEST /* Regression test #2 for SF bug #653180. */ START_TEST(test_column_number_after_parse) { char *text = ""; XML_Size colno; if (XML_Parse(parser, text, strlen(text), XML_FALSE) == XML_STATUS_ERROR) xml_failure(parser); colno = XML_GetCurrentColumnNumber(parser); if (colno != 11) { char buffer[100]; sprintf(buffer, "expected 11 columns, saw %" XML_FMT_INT_MOD "u", colno); fail(buffer); } } END_TEST static void XMLCALL start_element_event_handler2(void *userData, const XML_Char *name, const XML_Char **attr) { CharData *storage = (CharData *) userData; char buffer[100]; sprintf(buffer, "<%s> at col:%" XML_FMT_INT_MOD "u line:%"\ XML_FMT_INT_MOD "u\n", name, XML_GetCurrentColumnNumber(parser), XML_GetCurrentLineNumber(parser)); CharData_AppendString(storage, buffer); } static void XMLCALL end_element_event_handler2(void *userData, const XML_Char *name) { CharData *storage = (CharData *) userData; char buffer[100]; sprintf(buffer, " at col:%" XML_FMT_INT_MOD "u line:%"\ XML_FMT_INT_MOD "u\n", name, XML_GetCurrentColumnNumber(parser), XML_GetCurrentLineNumber(parser)); CharData_AppendString(storage, buffer); } /* Regression test #3 for SF bug #653180. */ START_TEST(test_line_and_column_numbers_inside_handlers) { char *text = "\n" /* Unix end-of-line */ " \r\n" /* Windows end-of-line */ " \r" /* Mac OS end-of-line */ " \n" " \n" " \n" " \n" ""; char *expected = " at col:0 line:1\n" " at col:2 line:2\n" " at col:4 line:3\n" " at col:8 line:3\n" " at col:2 line:4\n" " at col:2 line:5\n" " at col:4 line:6\n" " at col:8 line:6\n" " at col:2 line:7\n" " at col:0 line:8\n"; CharData storage; CharData_Init(&storage); XML_SetUserData(parser, &storage); XML_SetStartElementHandler(parser, start_element_event_handler2); XML_SetEndElementHandler(parser, end_element_event_handler2); if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); CharData_CheckString(&storage, expected); } END_TEST /* Regression test #4 for SF bug #653180. */ START_TEST(test_line_number_after_error) { char *text = "\n" " \n" " "; /* missing */ XML_Size lineno; if (XML_Parse(parser, text, strlen(text), XML_FALSE) != XML_STATUS_ERROR) fail("Expected a parse error"); lineno = XML_GetCurrentLineNumber(parser); if (lineno != 3) { char buffer[100]; sprintf(buffer, "expected 3 lines, saw %" XML_FMT_INT_MOD "u", lineno); fail(buffer); } } END_TEST /* Regression test #5 for SF bug #653180. */ START_TEST(test_column_number_after_error) { char *text = "\n" " \n" " "; /* missing */ XML_Size colno; if (XML_Parse(parser, text, strlen(text), XML_FALSE) != XML_STATUS_ERROR) fail("Expected a parse error"); colno = XML_GetCurrentColumnNumber(parser); if (colno != 4) { char buffer[100]; sprintf(buffer, "expected 4 columns, saw %" XML_FMT_INT_MOD "u", colno); fail(buffer); } } END_TEST /* Regression test for SF bug #478332. */ START_TEST(test_really_long_lines) { /* This parses an input line longer than INIT_DATA_BUF_SIZE characters long (defined to be 1024 in xmlparse.c). We take a really cheesy approach to building the input buffer, because this avoids writing bugs in buffer-filling code. */ char *text = "" /* 64 chars */ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" /* until we have at least 1024 characters on the line: */ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" ""; if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST /* * Element event tests. */ static void XMLCALL end_element_event_handler(void *userData, const XML_Char *name) { CharData *storage = (CharData *) userData; CharData_AppendString(storage, "/"); CharData_AppendXMLChars(storage, name, -1); } START_TEST(test_end_element_events) { char *text = ""; char *expected = "/c/b/f/d/a"; CharData storage; CharData_Init(&storage); XML_SetUserData(parser, &storage); XML_SetEndElementHandler(parser, end_element_event_handler); if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); CharData_CheckString(&storage, expected); } END_TEST /* * Attribute tests. */ /* Helpers used by the following test; this checks any "attr" and "refs" attributes to make sure whitespace has been normalized. Return true if whitespace has been normalized in a string, using the rules for attribute value normalization. The 'is_cdata' flag is needed since CDATA attributes don't need to have multiple whitespace characters collapsed to a single space, while other attribute data types do. (Section 3.3.3 of the recommendation.) */ static int is_whitespace_normalized(const XML_Char *s, int is_cdata) { int blanks = 0; int at_start = 1; while (*s) { if (*s == ' ') ++blanks; else if (*s == '\t' || *s == '\n' || *s == '\r') return 0; else { if (at_start) { at_start = 0; if (blanks && !is_cdata) /* illegal leading blanks */ return 0; } else if (blanks > 1 && !is_cdata) return 0; blanks = 0; } ++s; } if (blanks && !is_cdata) return 0; return 1; } /* Check the attribute whitespace checker: */ static void testhelper_is_whitespace_normalized(void) { assert(is_whitespace_normalized("abc", 0)); assert(is_whitespace_normalized("abc", 1)); assert(is_whitespace_normalized("abc def ghi", 0)); assert(is_whitespace_normalized("abc def ghi", 1)); assert(!is_whitespace_normalized(" abc def ghi", 0)); assert(is_whitespace_normalized(" abc def ghi", 1)); assert(!is_whitespace_normalized("abc def ghi", 0)); assert(is_whitespace_normalized("abc def ghi", 1)); assert(!is_whitespace_normalized("abc def ghi ", 0)); assert(is_whitespace_normalized("abc def ghi ", 1)); assert(!is_whitespace_normalized(" ", 0)); assert(is_whitespace_normalized(" ", 1)); assert(!is_whitespace_normalized("\t", 0)); assert(!is_whitespace_normalized("\t", 1)); assert(!is_whitespace_normalized("\n", 0)); assert(!is_whitespace_normalized("\n", 1)); assert(!is_whitespace_normalized("\r", 0)); assert(!is_whitespace_normalized("\r", 1)); assert(!is_whitespace_normalized("abc\t def", 1)); } static void XMLCALL check_attr_contains_normalized_whitespace(void *userData, const XML_Char *name, const XML_Char **atts) { int i; for (i = 0; atts[i] != NULL; i += 2) { const XML_Char *attrname = atts[i]; const XML_Char *value = atts[i + 1]; if (strcmp("attr", attrname) == 0 || strcmp("ents", attrname) == 0 || strcmp("refs", attrname) == 0) { if (!is_whitespace_normalized(value, 0)) { char buffer[256]; sprintf(buffer, "attribute value not normalized: %s='%s'", attrname, value); fail(buffer); } } } } START_TEST(test_attr_whitespace_normalization) { char *text = "\n" "]>\n" "\n" " \n" " \n" ""; XML_SetStartElementHandler(parser, check_attr_contains_normalized_whitespace); if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST /* * XML declaration tests. */ START_TEST(test_xmldecl_misplaced) { expect_failure("\n" "\n" "", XML_ERROR_MISPLACED_XML_PI, "failed to report misplaced XML declaration"); } END_TEST /* Regression test for SF bug #584832. */ static int XMLCALL UnknownEncodingHandler(void *data,const XML_Char *encoding,XML_Encoding *info) { if (strcmp(encoding,"unsupported-encoding") == 0) { int i; for (i = 0; i < 256; ++i) info->map[i] = i; info->data = NULL; info->convert = NULL; info->release = NULL; return XML_STATUS_OK; } return XML_STATUS_ERROR; } START_TEST(test_unknown_encoding_internal_entity) { char *text = "\n" "]>\n" ""; XML_SetUnknownEncodingHandler(parser, UnknownEncodingHandler, NULL); if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST /* Regression test for SF bug #620106. */ static int XMLCALL external_entity_loader_set_encoding(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) { /* This text says it's an unsupported encoding, but it's really UTF-8, which we tell Expat using XML_SetEncoding(). */ char *text = "" "\xC3\xA9"; XML_Parser extparser; extparser = XML_ExternalEntityParserCreate(parser, context, NULL); if (extparser == NULL) fail("Could not create external entity parser."); if (!XML_SetEncoding(extparser, "utf-8")) fail("XML_SetEncoding() ignored for external entity"); if ( XML_Parse(extparser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) { xml_failure(parser); return 0; } return 1; } START_TEST(test_ext_entity_set_encoding) { char *text = "\n" "]>\n" "&en;"; XML_SetExternalEntityRefHandler(parser, external_entity_loader_set_encoding); run_character_check(text, "\xC3\xA9"); } END_TEST /* Test that no error is reported for unknown entities if we don't read an external subset. This was fixed in Expat 1.95.5. */ START_TEST(test_wfc_undeclared_entity_unread_external_subset) { char *text = "\n" "&entity;"; if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST /* Test that an error is reported for unknown entities if we don't have an external subset. */ START_TEST(test_wfc_undeclared_entity_no_external_subset) { expect_failure("&entity;", XML_ERROR_UNDEFINED_ENTITY, "Parser did not report undefined entity w/out a DTD."); } END_TEST /* Test that an error is reported for unknown entities if we don't read an external subset, but have been declared standalone. */ START_TEST(test_wfc_undeclared_entity_standalone) { char *text = "\n" "\n" "&entity;"; expect_failure(text, XML_ERROR_UNDEFINED_ENTITY, "Parser did not report undefined entity (standalone)."); } END_TEST static int XMLCALL external_entity_loader(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) { char *text = (char *)XML_GetUserData(parser); XML_Parser extparser; extparser = XML_ExternalEntityParserCreate(parser, context, NULL); if (extparser == NULL) fail("Could not create external entity parser."); if ( XML_Parse(extparser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) { xml_failure(parser); return XML_STATUS_ERROR; } return XML_STATUS_OK; } /* Test that an error is reported for unknown entities if we have read an external subset, and standalone is true. */ START_TEST(test_wfc_undeclared_entity_with_external_subset_standalone) { char *text = "\n" "\n" "&entity;"; char *foo_text = ""; XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); XML_SetUserData(parser, foo_text); XML_SetExternalEntityRefHandler(parser, external_entity_loader); expect_failure(text, XML_ERROR_UNDEFINED_ENTITY, "Parser did not report undefined entity (external DTD)."); } END_TEST /* Test that no error is reported for unknown entities if we have read an external subset, and standalone is false. */ START_TEST(test_wfc_undeclared_entity_with_external_subset) { char *text = "\n" "\n" "&entity;"; char *foo_text = ""; XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); XML_SetUserData(parser, foo_text); XML_SetExternalEntityRefHandler(parser, external_entity_loader); if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST START_TEST(test_wfc_no_recursive_entity_refs) { char *text = "\n" "]>\n" "&entity;"; expect_failure(text, XML_ERROR_RECURSIVE_ENTITY_REF, "Parser did not report recursive entity reference."); } END_TEST /* Regression test for SF bug #483514. */ START_TEST(test_dtd_default_handling) { char *text = "\n" "\n" "\n" "\n" "\n" "\n" "]>"; XML_SetDefaultHandler(parser, accumulate_characters); XML_SetDoctypeDeclHandler(parser, dummy_start_doctype_handler, dummy_end_doctype_handler); XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler); XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler); XML_SetElementDeclHandler(parser, dummy_element_decl_handler); XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler); XML_SetProcessingInstructionHandler(parser, dummy_pi_handler); XML_SetCommentHandler(parser, dummy_comment_handler); run_character_check(text, "\n\n\n\n\n\n\n"); } END_TEST /* See related SF bug #673791. When namespace processing is enabled, setting the namespace URI for a prefix is not allowed; this test ensures that it *is* allowed when namespace processing is not enabled. (See Namespaces in XML, section 2.) */ START_TEST(test_empty_ns_without_namespaces) { char *text = "\n" " \n" ""; if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST /* Regression test for SF bug #824420. Checks that an xmlns:prefix attribute set in an attribute's default value isn't misinterpreted. */ START_TEST(test_ns_in_attribute_default_without_namespaces) { char *text = "\n" " ]>\n" ""; if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST static char *long_character_data_text = "" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" "012345678901234567890123456789012345678901234567890123456789" ""; static XML_Bool resumable = XML_FALSE; static void clearing_aborting_character_handler(void *userData, const XML_Char *s, int len) { XML_StopParser(parser, resumable); XML_SetCharacterDataHandler(parser, NULL); } /* Regression test for SF bug #1515266: missing check of stopped parser in doContext() 'for' loop. */ START_TEST(test_stop_parser_between_char_data_calls) { /* The sample data must be big enough that there are two calls to the character data handler from within the inner "for" loop of the XML_TOK_DATA_CHARS case in doContent(), and the character handler must stop the parser and clear the character data handler. */ char *text = long_character_data_text; XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler); resumable = XML_FALSE; if (XML_Parse(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR) xml_failure(parser); if (XML_GetErrorCode(parser) != XML_ERROR_ABORTED) xml_failure(parser); } END_TEST /* Regression test for SF bug #1515266: missing check of stopped parser in doContext() 'for' loop. */ START_TEST(test_suspend_parser_between_char_data_calls) { /* The sample data must be big enough that there are two calls to the character data handler from within the inner "for" loop of the XML_TOK_DATA_CHARS case in doContent(), and the character handler must stop the parser and clear the character data handler. */ char *text = long_character_data_text; XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler); resumable = XML_TRUE; if (XML_Parse(parser, text, strlen(text), XML_TRUE) != XML_STATUS_SUSPENDED) xml_failure(parser); if (XML_GetErrorCode(parser) != XML_ERROR_NONE) xml_failure(parser); } END_TEST /* * Namespaces tests. */ static void namespace_setup(void) { parser = XML_ParserCreateNS(NULL, ' '); if (parser == NULL) fail("Parser not created."); } static void namespace_teardown(void) { basic_teardown(); } /* Check that an element name and attribute name match the expected values. The expected values are passed as an array reference of string pointers provided as the userData argument; the first is the expected element name, and the second is the expected attribute name. */ static void XMLCALL triplet_start_checker(void *userData, const XML_Char *name, const XML_Char **atts) { char **elemstr = (char **)userData; char buffer[1024]; if (strcmp(elemstr[0], name) != 0) { sprintf(buffer, "unexpected start string: '%s'", name); fail(buffer); } if (strcmp(elemstr[1], atts[0]) != 0) { sprintf(buffer, "unexpected attribute string: '%s'", atts[0]); fail(buffer); } } /* Check that the element name passed to the end-element handler matches the expected value. The expected value is passed as the first element in an array of strings passed as the userData argument. */ static void XMLCALL triplet_end_checker(void *userData, const XML_Char *name) { char **elemstr = (char **)userData; if (strcmp(elemstr[0], name) != 0) { char buffer[1024]; sprintf(buffer, "unexpected end string: '%s'", name); fail(buffer); } } START_TEST(test_return_ns_triplet) { char *text = ""; char *elemstr[] = { "http://expat.sf.net/ e foo", "http://expat.sf.net/ a bar" }; XML_SetReturnNSTriplet(parser, XML_TRUE); XML_SetUserData(parser, elemstr); XML_SetElementHandler(parser, triplet_start_checker, triplet_end_checker); if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST static void XMLCALL overwrite_start_checker(void *userData, const XML_Char *name, const XML_Char **atts) { CharData *storage = (CharData *) userData; CharData_AppendString(storage, "start "); CharData_AppendXMLChars(storage, name, -1); while (*atts != NULL) { CharData_AppendString(storage, "\nattribute "); CharData_AppendXMLChars(storage, *atts, -1); atts += 2; } CharData_AppendString(storage, "\n"); } static void XMLCALL overwrite_end_checker(void *userData, const XML_Char *name) { CharData *storage = (CharData *) userData; CharData_AppendString(storage, "end "); CharData_AppendXMLChars(storage, name, -1); CharData_AppendString(storage, "\n"); } static void run_ns_tagname_overwrite_test(char *text, char *result) { CharData storage; CharData_Init(&storage); XML_SetUserData(parser, &storage); XML_SetElementHandler(parser, overwrite_start_checker, overwrite_end_checker); if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); CharData_CheckString(&storage, result); } /* Regression test for SF bug #566334. */ START_TEST(test_ns_tagname_overwrite) { char *text = "\n" " \n" " \n" ""; char *result = "start http://xml.libexpat.org/ e\n" "start http://xml.libexpat.org/ f\n" "attribute http://xml.libexpat.org/ attr\n" "end http://xml.libexpat.org/ f\n" "start http://xml.libexpat.org/ g\n" "attribute http://xml.libexpat.org/ attr2\n" "end http://xml.libexpat.org/ g\n" "end http://xml.libexpat.org/ e\n"; run_ns_tagname_overwrite_test(text, result); } END_TEST /* Regression test for SF bug #566334. */ START_TEST(test_ns_tagname_overwrite_triplet) { char *text = "\n" " \n" " \n" ""; char *result = "start http://xml.libexpat.org/ e n\n" "start http://xml.libexpat.org/ f n\n" "attribute http://xml.libexpat.org/ attr n\n" "end http://xml.libexpat.org/ f n\n" "start http://xml.libexpat.org/ g n\n" "attribute http://xml.libexpat.org/ attr2 n\n" "end http://xml.libexpat.org/ g n\n" "end http://xml.libexpat.org/ e n\n"; XML_SetReturnNSTriplet(parser, XML_TRUE); run_ns_tagname_overwrite_test(text, result); } END_TEST /* Regression test for SF bug #620343. */ static void XMLCALL start_element_fail(void *userData, const XML_Char *name, const XML_Char **atts) { /* We should never get here. */ fail("should never reach start_element_fail()"); } static void XMLCALL start_ns_clearing_start_element(void *userData, const XML_Char *prefix, const XML_Char *uri) { XML_SetStartElementHandler((XML_Parser) userData, NULL); } START_TEST(test_start_ns_clears_start_element) { /* This needs to use separate start/end tags; using the empty tag syntax doesn't cause the problematic path through Expat to be taken. */ char *text = ""; XML_SetStartElementHandler(parser, start_element_fail); XML_SetStartNamespaceDeclHandler(parser, start_ns_clearing_start_element); XML_UseParserAsHandlerArg(parser); if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST /* Regression test for SF bug #616863. */ static int XMLCALL external_entity_handler(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) { intptr_t callno = 1 + (intptr_t)XML_GetUserData(parser); char *text; XML_Parser p2; if (callno == 1) text = ("\n" "\n" "\n"); else text = ("" ""); XML_SetUserData(parser, (void *) callno); p2 = XML_ExternalEntityParserCreate(parser, context, NULL); if (XML_Parse(p2, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) { xml_failure(p2); return 0; } XML_ParserFree(p2); return 1; } START_TEST(test_default_ns_from_ext_subset_and_ext_ge) { char *text = "\n" "\n" "]>\n" "\n" "&en;\n" ""; XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); XML_SetExternalEntityRefHandler(parser, external_entity_handler); /* We actually need to set this handler to tickle this bug. */ XML_SetStartElementHandler(parser, dummy_start_element); XML_SetUserData(parser, NULL); if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST /* Regression test #1 for SF bug #673791. */ START_TEST(test_ns_prefix_with_empty_uri_1) { char *text = "\n" " \n" ""; expect_failure(text, XML_ERROR_UNDECLARING_PREFIX, "Did not report re-setting namespace" " URI with prefix to ''."); } END_TEST /* Regression test #2 for SF bug #673791. */ START_TEST(test_ns_prefix_with_empty_uri_2) { char *text = "\n" ""; expect_failure(text, XML_ERROR_UNDECLARING_PREFIX, "Did not report setting namespace URI with prefix to ''."); } END_TEST /* Regression test #3 for SF bug #673791. */ START_TEST(test_ns_prefix_with_empty_uri_3) { char *text = "\n" " \n" "]>\n" ""; expect_failure(text, XML_ERROR_UNDECLARING_PREFIX, "Didn't report attr default setting NS w/ prefix to ''."); } END_TEST /* Regression test #4 for SF bug #673791. */ START_TEST(test_ns_prefix_with_empty_uri_4) { char *text = "\n" " \n" "]>\n" ""; /* Packaged info expected by the end element handler; the weird structuring lets us re-use the triplet_end_checker() function also used for another test. */ char *elemstr[] = { "http://xml.libexpat.org/ doc prefix" }; XML_SetReturnNSTriplet(parser, XML_TRUE); XML_SetUserData(parser, elemstr); XML_SetEndElementHandler(parser, triplet_end_checker); if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST START_TEST(test_ns_default_with_empty_uri) { char *text = "\n" " \n" ""; if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) xml_failure(parser); } END_TEST /* Regression test for SF bug #692964: two prefixes for one namespace. */ START_TEST(test_ns_duplicate_attrs_diff_prefixes) { char *text = ""; expect_failure(text, XML_ERROR_DUPLICATE_ATTRIBUTE, "did not report multiple attributes with same URI+name"); } END_TEST /* Regression test for SF bug #695401: unbound prefix. */ START_TEST(test_ns_unbound_prefix_on_attribute) { char *text = ""; expect_failure(text, XML_ERROR_UNBOUND_PREFIX, "did not report unbound prefix on attribute"); } END_TEST /* Regression test for SF bug #695401: unbound prefix. */ START_TEST(test_ns_unbound_prefix_on_element) { char *text = ""; expect_failure(text, XML_ERROR_UNBOUND_PREFIX, "did not report unbound prefix on element"); } END_TEST static Suite * make_suite(void) { Suite *s = suite_create("basic"); TCase *tc_basic = tcase_create("basic tests"); TCase *tc_namespace = tcase_create("XML namespaces"); suite_add_tcase(s, tc_basic); tcase_add_checked_fixture(tc_basic, basic_setup, basic_teardown); tcase_add_test(tc_basic, test_nul_byte); tcase_add_test(tc_basic, test_u0000_char); tcase_add_test(tc_basic, test_bom_utf8); tcase_add_test(tc_basic, test_bom_utf16_be); tcase_add_test(tc_basic, test_bom_utf16_le); tcase_add_test(tc_basic, test_illegal_utf8); tcase_add_test(tc_basic, test_utf16); tcase_add_test(tc_basic, test_utf16_le_epilog_newline); tcase_add_test(tc_basic, test_latin1_umlauts); /* Regression test for SF bug #491986. */ tcase_add_test(tc_basic, test_danish_latin1); /* Regression test for SF bug #514281. */ tcase_add_test(tc_basic, test_french_charref_hexidecimal); tcase_add_test(tc_basic, test_french_charref_decimal); tcase_add_test(tc_basic, test_french_latin1); tcase_add_test(tc_basic, test_french_utf8); tcase_add_test(tc_basic, test_utf8_false_rejection); tcase_add_test(tc_basic, test_line_number_after_parse); tcase_add_test(tc_basic, test_column_number_after_parse); tcase_add_test(tc_basic, test_line_and_column_numbers_inside_handlers); tcase_add_test(tc_basic, test_line_number_after_error); tcase_add_test(tc_basic, test_column_number_after_error); tcase_add_test(tc_basic, test_really_long_lines); tcase_add_test(tc_basic, test_end_element_events); tcase_add_test(tc_basic, test_attr_whitespace_normalization); tcase_add_test(tc_basic, test_xmldecl_misplaced); tcase_add_test(tc_basic, test_unknown_encoding_internal_entity); tcase_add_test(tc_basic, test_wfc_undeclared_entity_unread_external_subset); tcase_add_test(tc_basic, test_wfc_undeclared_entity_no_external_subset); tcase_add_test(tc_basic, test_wfc_undeclared_entity_standalone); tcase_add_test(tc_basic, test_wfc_undeclared_entity_with_external_subset); tcase_add_test(tc_basic, test_wfc_undeclared_entity_with_external_subset_standalone); tcase_add_test(tc_basic, test_wfc_no_recursive_entity_refs); tcase_add_test(tc_basic, test_ext_entity_set_encoding); tcase_add_test(tc_basic, test_dtd_default_handling); tcase_add_test(tc_basic, test_empty_ns_without_namespaces); tcase_add_test(tc_basic, test_ns_in_attribute_default_without_namespaces); tcase_add_test(tc_basic, test_stop_parser_between_char_data_calls); tcase_add_test(tc_basic, test_suspend_parser_between_char_data_calls); suite_add_tcase(s, tc_namespace); tcase_add_checked_fixture(tc_namespace, namespace_setup, namespace_teardown); tcase_add_test(tc_namespace, test_return_ns_triplet); tcase_add_test(tc_namespace, test_ns_tagname_overwrite); tcase_add_test(tc_namespace, test_ns_tagname_overwrite_triplet); tcase_add_test(tc_namespace, test_start_ns_clears_start_element); tcase_add_test(tc_namespace, test_default_ns_from_ext_subset_and_ext_ge); tcase_add_test(tc_namespace, test_ns_prefix_with_empty_uri_1); tcase_add_test(tc_namespace, test_ns_prefix_with_empty_uri_2); tcase_add_test(tc_namespace, test_ns_prefix_with_empty_uri_3); tcase_add_test(tc_namespace, test_ns_prefix_with_empty_uri_4); tcase_add_test(tc_namespace, test_ns_default_with_empty_uri); tcase_add_test(tc_namespace, test_ns_duplicate_attrs_diff_prefixes); tcase_add_test(tc_namespace, test_ns_unbound_prefix_on_attribute); tcase_add_test(tc_namespace, test_ns_unbound_prefix_on_element); return s; } int main(int argc, char *argv[]) { int i, nf; int verbosity = CK_NORMAL; Suite *s = make_suite(); SRunner *sr = srunner_create(s); /* run the tests for internal helper functions */ testhelper_is_whitespace_normalized(); for (i = 1; i < argc; ++i) { char *opt = argv[i]; if (strcmp(opt, "-v") == 0 || strcmp(opt, "--verbose") == 0) verbosity = CK_VERBOSE; else if (strcmp(opt, "-q") == 0 || strcmp(opt, "--quiet") == 0) verbosity = CK_SILENT; else { fprintf(stderr, "runtests: unknown option '%s'\n", opt); return 2; } } if (verbosity != CK_SILENT) printf("Expat version: %s\n", XML_ExpatVersion()); srunner_run_all(sr, verbosity); nf = srunner_ntests_failed(sr); srunner_free(sr); return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } astropy-1.1.1/cextern/expat/MANIFEST0000755001134200020070000000472612602615516020061 0ustar embrayscience00000000000000amiga/launch.c amiga/expat_68k.c amiga/expat_68k.h amiga/expat_68k_handler_stubs.c amiga/expat_base.h amiga/expat_vectors.c amiga/expat_lib.c amiga/expat.xml amiga/README.txt amiga/Makefile amiga/include/proto/expat.h amiga/include/libraries/expat.h amiga/include/interfaces/expat.h amiga/include/inline4/expat.h bcb5/README.txt bcb5/all_projects.bpg bcb5/elements.bpf bcb5/elements.bpr bcb5/elements.mak bcb5/expat.bpf bcb5/expat.bpr bcb5/expat.mak bcb5/expat_static.bpf bcb5/expat_static.bpr bcb5/expat_static.mak bcb5/expatw.bpf bcb5/expatw.bpr bcb5/expatw.mak bcb5/expatw_static.bpf bcb5/expatw_static.bpr bcb5/expatw_static.mak bcb5/libexpat_mtd.def bcb5/libexpatw_mtd.def bcb5/makefile.mak bcb5/outline.bpf bcb5/outline.bpr bcb5/outline.mak bcb5/setup.bat bcb5/xmlwf.bpf bcb5/xmlwf.bpr bcb5/xmlwf.mak doc/expat.png doc/reference.html doc/style.css doc/valid-xhtml10.png doc/xmlwf.1 doc/xmlwf.sgml CMakeLists.txt CMake.README COPYING Changes ConfigureChecks.cmake MANIFEST Makefile.in README configure configure.in expat_config.h.in expat_config.h.cmake expat.pc.in expat.dsw aclocal.m4 conftools/PrintPath conftools/ac_c_bigendian_cross.m4 conftools/expat.m4 conftools/get-version.sh conftools/mkinstalldirs conftools/config.guess conftools/config.sub conftools/install-sh conftools/ltmain.sh m4/libtool.m4 m4/ltversion.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/lt~obsolete.m4 examples/elements.c examples/elements.dsp examples/outline.c examples/outline.dsp lib/Makefile.MPW lib/amigaconfig.h lib/ascii.h lib/asciitab.h lib/expat.dsp lib/expat.h lib/expat_external.h lib/expat_static.dsp lib/expatw.dsp lib/expatw_static.dsp lib/iasciitab.h lib/internal.h lib/latin1tab.h lib/libexpat.def lib/libexpatw.def lib/macconfig.h lib/nametab.h lib/utf8tab.h lib/winconfig.h lib/xmlparse.c lib/xmlrole.c lib/xmlrole.h lib/xmltok.c lib/xmltok.h lib/xmltok_impl.c lib/xmltok_impl.h lib/xmltok_ns.c tests/benchmark/README.txt tests/benchmark/benchmark.c tests/benchmark/benchmark.dsp tests/benchmark/benchmark.dsw tests/README.txt tests/chardata.c tests/chardata.h tests/minicheck.c tests/minicheck.h tests/runtests.c tests/runtestspp.cpp tests/xmltest.sh vms/README.vms vms/descrip.mms vms/expat_config.h win32/MANIFEST.txt win32/README.txt win32/expat.iss xmlwf/codepage.c xmlwf/codepage.h xmlwf/ct.c xmlwf/filemap.h xmlwf/readfilemap.c xmlwf/unixfilemap.c xmlwf/win32filemap.c xmlwf/xmlfile.c xmlwf/xmlfile.h xmlwf/xmlmime.c xmlwf/xmlmime.h xmlwf/xmltchar.h xmlwf/xmlurl.h xmlwf/xmlwf.c xmlwf/xmlwf.dsp xmlwf/xmlwin32url.cxx astropy-1.1.1/cextern/expat/configure.in0000755001134200020070000001105412602615516021231 0ustar embrayscience00000000000000dnl configuration script for expat dnl Process this file with autoconf to produce a configure script. dnl dnl Copyright 2000 Clark Cooper dnl dnl This file is part of EXPAT. dnl dnl EXPAT is free software; you can redistribute it and/or modify it dnl under the terms of the License (based on the MIT/X license) contained dnl in the file COPYING that comes with this distribution. dnl dnl Ensure that Expat is configured with autoconf 2.58 or newer AC_PREREQ(2.58) dnl Get the version number of Expat, using m4's esyscmd() command to run dnl the command at m4-generation time. This allows us to create an m4 dnl symbol holding the correct version number. AC_INIT() requires the dnl version number at m4-time, rather than when ./configure is run, so dnl all this must happen as part of m4, not as part of the shell code dnl contained in ./configure. dnl dnl NOTE: esyscmd() is a GNU M4 extension. Thus, we wrap it in an appropriate dnl test. I believe this test will work, but I don't have a place with non- dnl GNU M4 to test it right now. define([expat_version], ifdef([__gnu__], [esyscmd(conftools/get-version.sh lib/expat.h)], [2.1.x])) AC_INIT(expat, expat_version, expat-bugs@libexpat.org) undefine([expat_version]) AC_CONFIG_SRCDIR(Makefile.in) AC_CONFIG_AUX_DIR(conftools) AC_CONFIG_MACRO_DIR([m4]) dnl dnl Increment LIBREVISION if source code has changed at all dnl dnl If the API has changed, increment LIBCURRENT and set LIBREVISION to 0 dnl dnl If the API changes compatibly (i.e. simply adding a new function dnl without changing or removing earlier interfaces), then increment LIBAGE. dnl dnl If the API changes incompatibly set LIBAGE back to 0 dnl LIBCURRENT=7 LIBREVISION=0 LIBAGE=6 AC_CONFIG_HEADER(expat_config.h) sinclude(conftools/ac_c_bigendian_cross.m4) AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_SUBST(LIBCURRENT) AC_SUBST(LIBREVISION) AC_SUBST(LIBAGE) dnl Checks for programs. AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL if test "$GCC" = yes ; then dnl dnl Be careful about adding the -fexceptions option; some versions of dnl GCC don't support it and it causes extra warnings that are only dnl distracting; avoid. dnl OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes" CFLAGS="$OLDCFLAGS -fexceptions" AC_MSG_CHECKING(whether $CC accepts -fexceptions) AC_TRY_LINK( , , AC_MSG_RESULT(yes), AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS") CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'` fi dnl Checks for header files. AC_HEADER_STDC dnl Checks for typedefs, structures, and compiler characteristics. dnl Note: Avoid using AC_C_BIGENDIAN because it does not dnl work in a cross compile. AC_C_BIGENDIAN_CROSS AC_C_CONST AC_TYPE_SIZE_T AC_CHECK_FUNCS(memmove bcopy) dnl Only needed for xmlwf: AC_CHECK_HEADERS(fcntl.h unistd.h) AC_TYPE_OFF_T AC_FUNC_MMAP if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then FILEMAP=unixfilemap else FILEMAP=readfilemap fi AC_SUBST(FILEMAP) dnl Needed for the test support code; this was found at dnl http://lists.gnu.org/archive/html/bug-autoconf/2002-07/msg00028.html # AC_CPP_FUNC # ------------------ # # Checks to see if ANSI C99 CPP variable __func__ works. # If not, perhaps __FUNCTION__ works instead. # If not, we'll just define __func__ to "". AC_DEFUN([AC_CPP_FUNC], [AC_REQUIRE([AC_PROG_CC_STDC])dnl AC_CACHE_CHECK([for an ANSI C99-conforming __func__], ac_cv_cpp_func, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[char *foo = __func__;]])], [ac_cv_cpp_func=yes], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[char *foo = __FUNCTION__;]])], [ac_cv_cpp_func=__FUNCTION__], [ac_cv_cpp_func=no])])]) if test $ac_cv_cpp_func = __FUNCTION__; then AC_DEFINE(__func__,__FUNCTION__, [Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C.]) elif test $ac_cv_cpp_func = no; then AC_DEFINE(__func__,"", [Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C.]) fi ])# AC_CPP_FUNC AC_CPP_FUNC dnl Some basic configuration: AC_DEFINE([XML_NS], 1, [Define to make XML Namespaces functionality available.]) AC_DEFINE([XML_DTD], 1, [Define to make parameter entity parsing functionality available.]) AC_DEFINE([XML_CONTEXT_BYTES], 1024, [Define to specify how much context to retain around the current parse point.]) AC_CONFIG_FILES([Makefile expat.pc]) AC_OUTPUT abs_srcdir="`cd $srcdir && pwd`" abs_builddir="`pwd`" if test "$abs_srcdir" != "$abs_builddir"; then make mkdir-init fi astropy-1.1.1/cextern/expat/Makefile.in0000755001134200020070000001557412602615516021000 0ustar embrayscience00000000000000################################################################ # Process this file with top-level configure script to produce Makefile # # Copyright 2000 Clark Cooper # # This file is part of EXPAT. # # EXPAT is free software; you can redistribute it and/or modify it # under the terms of the License (based on the MIT/X license) contained # in the file COPYING that comes with this distribution. # # EXPAT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN EXPAT. # SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ includedir = @includedir@ man1dir = @mandir@/man1 pkgconfigdir = $(libdir)/pkgconfig top_builddir = . INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs MANFILE = $(srcdir)/doc/xmlwf.1 APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h LIBRARY = libexpat.la DESTDIR = $(INSTALL_ROOT) default: buildlib xmlwf/xmlwf@EXEEXT@ buildlib: $(LIBRARY) expat.pc all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline clean: cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs cd xmlwf && rm -f xmlwf *.@OBJEXT@ *.lo && rm -rf .libs _libs cd examples && rm -f elements outline *.@OBJEXT@ *.lo && rm -rf .libs _libs cd tests && rm -rf .libs runtests runtests.@OBJEXT@ runtestspp runtestspp.@OBJEXT@ cd tests && rm -f chardata.@OBJEXT@ minicheck.@OBJEXT@ rm -rf .libs libexpat.la rm -f examples/core tests/core xmlwf/core clobber: clean distclean: clean rm -f expat_config.h config.status config.log config.cache libtool rm -f Makefile expat.pc extraclean: distclean rm -f expat_config.h.in configure rm -f aclocal.m4 m4/* rm -f conftools/ltmain.sh conftools/install-sh conftools/config.guess conftools/config.sub check: tests/runtests tests/runtestspp tests/runtests tests/runtestspp install: xmlwf/xmlwf@EXEEXT@ installlib $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir) installlib: $(LIBRARY) $(APIHEADER) expat.pc $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir) $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY) for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done $(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc uninstall: uninstalllib $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf@EXEEXT@ rm -f $(DESTDIR)$(man1dir)/xmlwf.1 uninstalllib: $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY) rm -f $(DESTDIR)$(includedir)/expat.h rm -f $(DESTDIR)$(includedir)/expat_external.h rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc # for VPATH builds (invoked by configure) mkdir-init: @for d in lib xmlwf examples tests ; do \ (mkdir $$d 2> /dev/null || test 1) ; \ done CC = @CC@ CXX = @CXX@ LIBTOOL = @LIBTOOL@ INCLUDES = -I$(srcdir)/lib -I. LDFLAGS = @LDFLAGS@ CPPFLAGS = @CPPFLAGS@ -DHAVE_EXPAT_CONFIG_H CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@ ### autoconf this? LTFLAGS = --silent COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS) CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS) LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@ LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@ LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@ LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo $(LIBRARY): $(LIB_OBJS) $(LINK_LIB) $(LIB_OBJS) expat.pc: $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $@ lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \ $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \ $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \ lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \ lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \ $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h XMLWF_OBJS = xmlwf/xmlwf.@OBJEXT@ xmlwf/xmlfile.@OBJEXT@ xmlwf/codepage.@OBJEXT@ xmlwf/@FILEMAP@.@OBJEXT@ xmlwf/xmlwf.@OBJEXT@: xmlwf/xmlwf.c xmlwf/xmlfile.@OBJEXT@: xmlwf/xmlfile.c xmlwf/codepage.@OBJEXT@: xmlwf/codepage.c xmlwf/@FILEMAP@.@OBJEXT@: xmlwf/@FILEMAP@.c xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIBRARY) $(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY) examples/elements.@OBJEXT@: examples/elements.c examples/elements: examples/elements.@OBJEXT@ $(LIBRARY) $(LINK_EXE) $< $(LIBRARY) examples/outline.@OBJEXT@: examples/outline.c examples/outline: examples/outline.@OBJEXT@ $(LIBRARY) $(LINK_EXE) $< $(LIBRARY) tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h tests/runtests.@OBJEXT@: tests/runtests.c tests/chardata.h tests/runtests: tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY) $(LINK_EXE) tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY) tests/runtestspp.@OBJEXT@: tests/runtestspp.cpp tests/runtests.c tests/chardata.h tests/runtestspp: tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY) $(LINK_CXX_EXE) tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY) tests/benchmark/benchmark.@OBJEXT@: tests/benchmark/benchmark.c tests/benchmark/benchmark: tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY) $(LINK_EXE) tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY) run-benchmark: tests/benchmark/benchmark tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3 tests/xmlts.zip: wget --output-document=tests/xmlts.zip \ http://www.w3.org/XML/Test/xmlts20080827.zip tests/XML-Test-Suite: tests/xmlts.zip cd tests && unzip -q xmlts.zip run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/XML-Test-Suite tests/xmltest.sh .SUFFIXES: .c .cpp .lo .@OBJEXT@ .cpp.@OBJEXT@: $(CXXCOMPILE) -o $@ -c $< .c.@OBJEXT@: $(COMPILE) -o $@ -c $< .c.lo: $(LTCOMPILE) -o $@ -c $< .PHONY: buildlib all \ clean distclean extraclean maintainer-clean \ dist distdir \ install uninstall astropy-1.1.1/cextern/expat/doc/0000755001134200020070000000000012644022135017454 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/doc/xmlwf.10000755001134200020070000001732712602615516020715 0ustar embrayscience00000000000000.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "XMLWF" "1" "24 January 2003" "" "" .SH NAME xmlwf \- Determines if an XML document is well-formed .SH SYNOPSIS \fBxmlwf\fR [ \fB-s\fR] [ \fB-n\fR] [ \fB-p\fR] [ \fB-x\fR] [ \fB-e \fIencoding\fB\fR] [ \fB-w\fR] [ \fB-d \fIoutput-dir\fB\fR] [ \fB-c\fR] [ \fB-m\fR] [ \fB-r\fR] [ \fB-t\fR] [ \fB-v\fR] [ \fBfile ...\fR] .SH "DESCRIPTION" .PP \fBxmlwf\fR uses the Expat library to determine if an XML document is well-formed. It is non-validating. .PP If you do not specify any files on the command-line, and you have a recent version of \fBxmlwf\fR, the input file will be read from standard input. .SH "WELL-FORMED DOCUMENTS" .PP A well-formed document must adhere to the following rules: .TP 0.2i \(bu The file begins with an XML declaration. For instance, . \fBNOTE:\fR \fBxmlwf\fR does not currently check for a valid XML declaration. .TP 0.2i \(bu Every start tag is either empty () or has a corresponding end tag. .TP 0.2i \(bu There is exactly one root element. This element must contain all other elements in the document. Only comments, white space, and processing instructions may come after the close of the root element. .TP 0.2i \(bu All elements nest properly. .TP 0.2i \(bu All attribute values are enclosed in quotes (either single or double). .PP If the document has a DTD, and it strictly complies with that DTD, then the document is also considered \fBvalid\fR. \fBxmlwf\fR is a non-validating parser -- it does not check the DTD. However, it does support external entities (see the \fB-x\fR option). .SH "OPTIONS" .PP When an option includes an argument, you may specify the argument either separately ("\fB-d\fR output") or concatenated with the option ("\fB-d\fRoutput"). \fBxmlwf\fR supports both. .TP \fB-c\fR If the input file is well-formed and \fBxmlwf\fR doesn't encounter any errors, the input file is simply copied to the output directory unchanged. This implies no namespaces (turns off \fB-n\fR) and requires \fB-d\fR to specify an output file. .TP \fB-d output-dir\fR Specifies a directory to contain transformed representations of the input files. By default, \fB-d\fR outputs a canonical representation (described below). You can select different output formats using \fB-c\fR and \fB-m\fR. The output filenames will be exactly the same as the input filenames or "STDIN" if the input is coming from standard input. Therefore, you must be careful that the output file does not go into the same directory as the input file. Otherwise, \fBxmlwf\fR will delete the input file before it generates the output file (just like running cat < file > file in most shells). Two structurally equivalent XML documents have a byte-for-byte identical canonical XML representation. Note that ignorable white space is considered significant and is treated equivalently to data. More on canonical XML can be found at http://www.jclark.com/xml/canonxml.html . .TP \fB-e encoding\fR Specifies the character encoding for the document, overriding any document encoding declaration. \fBxmlwf\fR supports four built-in encodings: US-ASCII, UTF-8, UTF-16, and ISO-8859-1. Also see the \fB-w\fR option. .TP \fB-m\fR Outputs some strange sort of XML file that completely describes the input file, including character positions. Requires \fB-d\fR to specify an output file. .TP \fB-n\fR Turns on namespace processing. (describe namespaces) \fB-c\fR disables namespaces. .TP \fB-p\fR Tells xmlwf to process external DTDs and parameter entities. Normally \fBxmlwf\fR never parses parameter entities. \fB-p\fR tells it to always parse them. \fB-p\fR implies \fB-x\fR. .TP \fB-r\fR Normally \fBxmlwf\fR memory-maps the XML file before parsing; this can result in faster parsing on many platforms. \fB-r\fR turns off memory-mapping and uses normal file IO calls instead. Of course, memory-mapping is automatically turned off when reading from standard input. Use of memory-mapping can cause some platforms to report substantially higher memory usage for \fBxmlwf\fR, but this appears to be a matter of the operating system reporting memory in a strange way; there is not a leak in \fBxmlwf\fR. .TP \fB-s\fR Prints an error if the document is not standalone. A document is standalone if it has no external subset and no references to parameter entities. .TP \fB-t\fR Turns on timings. This tells Expat to parse the entire file, but not perform any processing. This gives a fairly accurate idea of the raw speed of Expat itself without client overhead. \fB-t\fR turns off most of the output options (\fB-d\fR, \fB-m\fR, \fB-c\fR, \&...). .TP \fB-v\fR Prints the version of the Expat library being used, including some information on the compile-time configuration of the library, and then exits. .TP \fB-w\fR Enables support for Windows code pages. Normally, \fBxmlwf\fR will throw an error if it runs across an encoding that it is not equipped to handle itself. With \fB-w\fR, xmlwf will try to use a Windows code page. See also \fB-e\fR. .TP \fB-x\fR Turns on parsing external entities. Non-validating parsers are not required to resolve external entities, or even expand entities at all. Expat always expands internal entities (?), but external entity parsing must be enabled explicitly. External entities are simply entities that obtain their data from outside the XML file currently being parsed. This is an example of an internal entity: .nf .fi And here are some examples of external entities: .nf (parsed) (unparsed) .fi .TP \fB--\fR (Two hyphens.) Terminates the list of options. This is only needed if a filename starts with a hyphen. For example: .nf xmlwf -- -myfile.xml .fi will run \fBxmlwf\fR on the file \fI-myfile.xml\fR. .PP Older versions of \fBxmlwf\fR do not support reading from standard input. .SH "OUTPUT" .PP If an input file is not well-formed, \fBxmlwf\fR prints a single line describing the problem to standard output. If a file is well formed, \fBxmlwf\fR outputs nothing. Note that the result code is \fBnot\fR set. .SH "BUGS" .PP According to the W3C standard, an XML file without a declaration at the beginning is not considered well-formed. However, \fBxmlwf\fR allows this to pass. .PP \fBxmlwf\fR returns a 0 - noerr result, even if the file is not well-formed. There is no good way for a program to use \fBxmlwf\fR to quickly check a file -- it must parse \fBxmlwf\fR's standard output. .PP The errors should go to standard error, not standard output. .PP There should be a way to get \fB-d\fR to send its output to standard output rather than forcing the user to send it to a file. .PP I have no idea why anyone would want to use the \fB-d\fR, \fB-c\fR, and \fB-m\fR options. If someone could explain it to me, I'd like to add this information to this manpage. .SH "ALTERNATIVES" .PP Here are some XML validators on the web: .nf http://www.hcrc.ed.ac.uk/~richard/xml-check.html http://www.stg.brown.edu/service/xmlvalid/ http://www.scripting.com/frontier5/xml/code/xmlValidator.html http://www.xml.com/pub/a/tools/ruwf/check.html .fi .SH "SEE ALSO" .PP .nf The Expat home page: http://www.libexpat.org/ The W3 XML specification: http://www.w3.org/TR/REC-xml .fi .SH "AUTHOR" .PP This manual page was written by Scott Bronson for the Debian GNU/Linux system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1. astropy-1.1.1/cextern/expat/doc/valid-xhtml10.png0000755001134200020070000000450012602615516022563 0ustar embrayscience00000000000000‰PNG  IHDRX#ÊDˆPLTEÞççÎ{9­­­ÞŒB¥„Bï½c½ZZÞ„BÎ{{Þ¥¥œ”{ÞµRÆssÞ­Rœ÷½Z”Œs”{Rc”½19JcŒ½”½Ö猭Îï­R¥½ÖÖÞï„¥ÆÎÞçÎÖçZ”Œ)½J!{{{ZZJŒs9JŒZRJsssµ”J„k1!„c1kkk­ŒBÖs9ÆœJÿïïcccÎk1Îc1­kcR„µk”½99JœµÖœÆkkœÆ¥Z”µÎµ9999¥R)”{9{c1”s9111½œJ­!ÞÞÞ1{½”JŒk1){)))¥ŒZÖÖÖµŒBÎÎÎçï÷ÆÆÆ½¥Z„9))cœsœ½½µœZ„µÎ¥Zÿ÷ÖkcRÿïÖcR)cJ)9„ïÆc1„œ{9œ„Z”s1­”Z{sk­ŒZ”””­ÆÞ÷ÿÿ÷÷ÿB{­BJJ½ÆÆsœÆÖçïBs­ŒŒŒBBJï÷÷ïï÷ÎÎÆç”JÖŒŒÿÞkB9skR)!sZ1ÿÖkB1scRÿÎkç½ZRB!Î¥RkR)çµZ÷Îc„sR÷ÆcZZZµœZ9BJÆZ)µ”ZJ”RRRµÎÞ!ZœJŒÿÿÿÿÿÿ1k¥”k)BŒJ{­JJJ{œÆÖµcÞçïcZR÷÷÷÷÷÷Ö­cBBBÞ­­ç½cïïï91çµcÞµZ{sR1)””{J9{kR1!”Œ{ZJ!Ö­R)!sZ)ï½ZZB!ÿÖcÖ¥RŒ{RÿÎcÿÆckR!„­ÎÿïsÆÖçZ”ÿçs½œZR”µJ!½ÎÞ½½½9s¥JŒRRJ9k¥RJJ!R”µµµÞµcB„”€?¤ªtRNSÿÿÿÿÿÿÿˆÿlIÿÿtÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿyÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ]ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDdýè½IDATHÇ•V‹_EË»ìaFÚŠ QYˆ DT§rDiPP"ÞÉÃ|¡‡Òê94Bé"ñ:$½4Àó•G):[F‡‰œùèþ~3»w·öÑïÍÎîÎ~÷»¿ù=fsì@Å´{"ñÕ”€5àCÅY±e”°F$°›Wˆã¾õPªð¥ÈVìFt'¥Œ1|N¯cÄâÖÞDc>1ÜYÕ Ã•-{ý~B†I`è[þ%¥[vÐ[•ë³ã#˜I³$£H%aD|D cO«Ü(L¦Œ³µoÆðau„(¢ )y*ÊÉa‡Òº÷)}*`&l¯éÜÞfÿ§0üwví÷‚Ó¿ÉfX„¶mMÙ>Dز›n9küäZ2ps!aé’cfª&ƒIŒa:T²©à‹qsr=åÖ4OnÌ XþL†|ÖÔ¤j¹˜ÈÅarÜ|ºc9í‹Gî¤+@yuÒÇJÒÁ\#’—1tÐØwAÁ#G4H_¶5A =¿xÄb9°ÀÑ*¡t<¨Ûl>Ýî5·o{–»xé˜5IÒ,M™öóÖ*£ô:äÛ AºNŒä—¼(Y$IÒmžÂÀ9H˜bÖmi’ô –f¶eNBÛK~¿Ýn÷‹f‡k~²û[¾pòcªD1 Ôí6ÄÊ´)@¾¿™hi)²M?R&‹È…HY‹)m³¢4§Z­¹Ãd¨ÚTÍtòî#4~"ãñTÑ%¨ô.eøVvíÿÕ%_òÉÈ¥Xó«“Ãd^.Ъhùlz•fRJd„d×s*»tYFç\ÃÉÕù8LžhX:ÖUï Þ"Í _ë7e[íÃÍʆi…ÍgÈJË;œÜ½³¬®¯¬q¶g§7:AQOzrð‚øŸ`ƒ7žPa×aáÍü†aˆøLáž¼gÏ4è¼@>‘à ûn;¹‡±4¸Ëãšëúëhì[ÙÇl`óÝ`Æ'N ší¸æ !Ò¨ ÒóÝÏ WOËæ*oÊÑ…•›G`¸£ý¼fï3ï ;yƒß_+'H½6sáÖÝsGµAoѪhåáµ9‡AØ q>g­ manpage.1'. You may view the manual page with: `docbook-to-man manpage.sgml | nroff -man | less'. A typical entry in a Makefile or Makefile.am is: manpage.1: manpage.sgml docbook-to-man $< > $@ --> Scott"> Bronson"> December 5, 2001"> 1"> bronson@rinspin.com"> XMLWF"> Debian GNU/Linux"> GNU"> ]>
&dhemail;
&dhfirstname; &dhsurname; 2001 &dhusername; &dhdate;
&dhucpackage; &dhsection; &dhpackage; Determines if an XML document is well-formed &dhpackage; file ... DESCRIPTION &dhpackage; uses the Expat library to determine if an XML document is well-formed. It is non-validating. If you do not specify any files on the command-line, and you have a recent version of &dhpackage;, the input file will be read from standard input. WELL-FORMED DOCUMENTS A well-formed document must adhere to the following rules: The file begins with an XML declaration. For instance, <?xml version="1.0" standalone="yes"?>. NOTE: &dhpackage; does not currently check for a valid XML declaration. Every start tag is either empty (<tag/>) or has a corresponding end tag. There is exactly one root element. This element must contain all other elements in the document. Only comments, white space, and processing instructions may come after the close of the root element. All elements nest properly. All attribute values are enclosed in quotes (either single or double). If the document has a DTD, and it strictly complies with that DTD, then the document is also considered valid. &dhpackage; is a non-validating parser -- it does not check the DTD. However, it does support external entities (see the option). OPTIONS When an option includes an argument, you may specify the argument either separately (" output") or concatenated with the option ("output"). &dhpackage; supports both. If the input file is well-formed and &dhpackage; doesn't encounter any errors, the input file is simply copied to the output directory unchanged. This implies no namespaces (turns off ) and requires to specify an output file. Specifies a directory to contain transformed representations of the input files. By default, outputs a canonical representation (described below). You can select different output formats using and . The output filenames will be exactly the same as the input filenames or "STDIN" if the input is coming from standard input. Therefore, you must be careful that the output file does not go into the same directory as the input file. Otherwise, &dhpackage; will delete the input file before it generates the output file (just like running cat < file > file in most shells). Two structurally equivalent XML documents have a byte-for-byte identical canonical XML representation. Note that ignorable white space is considered significant and is treated equivalently to data. More on canonical XML can be found at http://www.jclark.com/xml/canonxml.html . Specifies the character encoding for the document, overriding any document encoding declaration. &dhpackage; supports four built-in encodings: US-ASCII, UTF-8, UTF-16, and ISO-8859-1. Also see the option. Outputs some strange sort of XML file that completely describes the the input file, including character postitions. Requires to specify an output file. Turns on namespace processing. (describe namespaces) disables namespaces. Tells xmlwf to process external DTDs and parameter entities. Normally &dhpackage; never parses parameter entities. tells it to always parse them. implies . Normally &dhpackage; memory-maps the XML file before parsing; this can result in faster parsing on many platforms. turns off memory-mapping and uses normal file IO calls instead. Of course, memory-mapping is automatically turned off when reading from standard input. Use of memory-mapping can cause some platforms to report substantially higher memory usage for &dhpackage;, but this appears to be a matter of the operating system reporting memory in a strange way; there is not a leak in &dhpackage;. Prints an error if the document is not standalone. A document is standalone if it has no external subset and no references to parameter entities. Turns on timings. This tells Expat to parse the entire file, but not perform any processing. This gives a fairly accurate idea of the raw speed of Expat itself without client overhead. turns off most of the output options (, , , ...). Prints the version of the Expat library being used, including some information on the compile-time configuration of the library, and then exits. Enables support for Windows code pages. Normally, &dhpackage; will throw an error if it runs across an encoding that it is not equipped to handle itself. With , &dhpackage; will try to use a Windows code page. See also . Turns on parsing external entities. Non-validating parsers are not required to resolve external entities, or even expand entities at all. Expat always expands internal entities (?), but external entity parsing must be enabled explicitly. External entities are simply entities that obtain their data from outside the XML file currently being parsed. This is an example of an internal entity: <!ENTITY vers '1.0.2'> And here are some examples of external entities: <!ENTITY header SYSTEM "header-&vers;.xml"> (parsed) <!ENTITY logo SYSTEM "logo.png" PNG> (unparsed) (Two hyphens.) Terminates the list of options. This is only needed if a filename starts with a hyphen. For example: &dhpackage; -- -myfile.xml will run &dhpackage; on the file -myfile.xml. Older versions of &dhpackage; do not support reading from standard input. OUTPUT If an input file is not well-formed, &dhpackage; prints a single line describing the problem to standard output. If a file is well formed, &dhpackage; outputs nothing. Note that the result code is not set. BUGS &dhpackage; returns a 0 - noerr result, even if the file is not well-formed. There is no good way for a program to use &dhpackage; to quickly check a file -- it must parse &dhpackage;'s standard output. The errors should go to standard error, not standard output. There should be a way to get to send its output to standard output rather than forcing the user to send it to a file. I have no idea why anyone would want to use the , , and options. If someone could explain it to me, I'd like to add this information to this manpage. ALTERNATIVES Here are some XML validators on the web: http://www.hcrc.ed.ac.uk/~richard/xml-check.html http://www.stg.brown.edu/service/xmlvalid/ http://www.scripting.com/frontier5/xml/code/xmlValidator.html http://www.xml.com/pub/a/tools/ruwf/check.html SEE ALSO The Expat home page: http://www.libexpat.org/ The W3 XML specification: http://www.w3.org/TR/REC-xml AUTHOR This manual page was written by &dhusername; &dhemail; for the &debian; system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1.
astropy-1.1.1/cextern/expat/doc/expat.png0000755001134200020070000000200312602615516021306 0ustar embrayscience00000000000000‰PNG  IHDR¾FWÞq5gAMA± üa pHYs  ÒÝ~ütIMEÒ 2 é_5bKGDÿ‡Ì¿„IDAThÞí˜Û•ë EÕ…Pˆ¡ Q#*D…p?xXâa;Î̬d]ü3N&Æ[âp$€ôÕlü¿ñ7þÆßøãoü¿ñ7þŸ^À1¾ˆß‹Ï ¿‚Iš“ÀÇ»Úy_2þ‘§ô` Ø³Â]í¼%žhÓÏv*nâ ƒ ÛÚyOûΤ߸‡)xª÷ðMúãýœYÔÿ¾vîàŸ0ù#ýòÂKÏñ_ÐÎ5>{%K|pRÌ3žâËQðÖø+íD?Oì+O}ʦ׶üTTU7Yºl XWŠü…vV wêû3Ÿò“¶¼Jg0OãMPžd5˲5ÓÎÜÉO«în0ê[s¯k—.[\]I-^âÚ9-Zëž§kĨ# 7cíÒMC‹›w+|1åãºe8ë8í£Ãq™ê7¥ºv›E ƒ]Ãe¦Ì^7ÚõuÙ°]ôûAéµ6ºˆmKN*Y¬jWkôQUîÁ)%¶%!ù'a(õñùnK±Û¾h‰étiÆ]=“¶Û)F•­¡‹£v.7+7öºÑaÛ‚Q¢3}¦Jqž2ymov4úù® š¯tÚI—[ÅWO„ˆ¸Ý'ÖÃS¾ŒqæÏæñ¬þGý¶ÓNºqÜðG´COzÿ`–_|æƒðÃSºÂwŽH?ÿ‰v>Ÿ_?¦û ñ<¹6þÆÿ(ü?¼6þÆßøãoü¿ñÿü®Ýåv—LCIEND®B`‚astropy-1.1.1/cextern/expat/doc/reference.html0000755001134200020070000027134312602615516022322 0ustar embrayscience00000000000000 Expat XML Parser
(Expat logo)
Release 2.0.1

Expat is a library, written in C, for parsing XML documents. It's the underlying XML parser for the open source Mozilla project, Perl's XML::Parser, Python's xml.parsers.expat, and other open-source XML parsers.

This library is the creation of James Clark, who's also given us groff (an nroff look-alike), Jade (an implemention of ISO's DSSSL stylesheet language for SGML), XP (a Java XML parser package), XT (a Java XSL engine). James was also the technical lead on the XML Working Group at W3C that produced the XML specification.

This is free software, licensed under the MIT/X Consortium license. You may download it from the Expat home page.

The bulk of this document was originally commissioned as an article by XML.com. They graciously allowed Clark Cooper to retain copyright and to distribute it with Expat. This version has been substantially extended to include documentation on features which have been added since the original article was published, and additional information on using the original interface.


Table of Contents


Overview

Expat is a stream-oriented parser. You register callback (or handler) functions with the parser and then start feeding it the document. As the parser recognizes parts of the document, it will call the appropriate handler for that part (if you've registered one.) The document is fed to the parser in pieces, so you can start parsing before you have all the document. This also allows you to parse really huge documents that won't fit into memory.

Expat can be intimidating due to the many kinds of handlers and options you can set. But you only need to learn four functions in order to do 90% of what you'll want to do with it:

XML_ParserCreate
Create a new parser object.
XML_SetElementHandler
Set handlers for start and end tags.
XML_SetCharacterDataHandler
Set handler for text.
XML_Parse
Pass a buffer full of document to the parser

These functions and others are described in the reference part of this document. The reference section also describes in detail the parameters passed to the different types of handlers.

Let's look at a very simple example program that only uses 3 of the above functions (it doesn't need to set a character handler.) The program outline.c prints an element outline, indenting child elements to distinguish them from the parent element that contains them. The start handler does all the work. It prints two indenting spaces for every level of ancestor elements, then it prints the element and attribute information. Finally it increments the global Depth variable.

int Depth;

void XMLCALL
start(void *data, const char *el, const char **attr) {
  int i;

  for (i = 0; i < Depth; i++)
    printf("  ");

  printf("%s", el);

  for (i = 0; attr[i]; i += 2) {
    printf(" %s='%s'", attr[i], attr[i + 1]);
  }

  printf("\n");
  Depth++;
}  /* End of start handler */

The end tag simply does the bookkeeping work of decrementing Depth.

void XMLCALL
end(void *data, const char *el) {
  Depth--;
}  /* End of end handler */

Note the XMLCALL annotation used for the callbacks. This is used to ensure that the Expat and the callbacks are using the same calling convention in case the compiler options used for Expat itself and the client code are different. Expat tries not to care what the default calling convention is, though it may require that it be compiled with a default convention of "cdecl" on some platforms. For code which uses Expat, however, the calling convention is specified by the XMLCALL annotation on most platforms; callbacks should be defined using this annotation.

The XMLCALL annotation was added in Expat 1.95.7, but existing working Expat applications don't need to add it (since they are already using the "cdecl" calling convention, or they wouldn't be working). The annotation is only needed if the default calling convention may be something other than "cdecl". To use the annotation safely with older versions of Expat, you can conditionally define it after including Expat's header file:

#include <expat.h>

#ifndef XMLCALL
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
#define XMLCALL __cdecl
#elif defined(__GNUC__)
#define XMLCALL __attribute__((cdecl))
#else
#define XMLCALL
#endif
#endif

After creating the parser, the main program just has the job of shoveling the document to the parser so that it can do its work.


Building and Installing Expat

The Expat distribution comes as a compressed (with GNU gzip) tar file. You may download the latest version from Source Forge. After unpacking this, cd into the directory. Then follow either the Win32 directions or Unix directions below.

Building under Win32

If you're using the GNU compiler under cygwin, follow the Unix directions in the next section. Otherwise if you have Microsoft's Developer Studio installed, then from Windows Explorer double-click on "expat.dsp" in the lib directory and build and install in the usual manner.

Alternatively, you may download the Win32 binary package that contains the "expat.h" include file and a pre-built DLL.

Building under Unix (or GNU)

First you'll need to run the configure shell script in order to configure the Makefiles and headers for your system.

If you're happy with all the defaults that configure picks for you, and you have permission on your system to install into /usr/local, you can install Expat with this sequence of commands:

./configure
make
make install

There are some options that you can provide to this script, but the only one we'll mention here is the --prefix option. You can find out all the options available by running configure with just the --help option.

By default, the configure script sets things up so that the library gets installed in /usr/local/lib and the associated header file in /usr/local/include. But if you were to give the option, --prefix=/home/me/mystuff, then the library and header would get installed in /home/me/mystuff/lib and /home/me/mystuff/include respectively.

Configuring Expat Using the Pre-Processor

Expat's feature set can be configured using a small number of pre-processor definitions. The definition of this symbols does not affect the set of entry points for Expat, only the behavior of the API and the definition of character types in the case of XML_UNICODE_WCHAR_T. The symbols are:

XML_DTD
Include support for using and reporting DTD-based content. If this is defined, default attribute values from an external DTD subset are reported and attribute value normalization occurs based on the type of attributes defined in the external subset. Without this, Expat has a smaller memory footprint and can be faster, but will not load external entities or process conditional sections. This does not affect the set of functions available in the API.
XML_NS
When defined, support for the Namespaces in XML specification is included.
XML_UNICODE
When defined, character data reported to the application is encoded in UTF-16 using wide characters of the type XML_Char. This is implied if XML_UNICODE_WCHAR_T is defined.
XML_UNICODE_WCHAR_T
If defined, causes the XML_Char character type to be defined using the wchar_t type; otherwise, unsigned short is used. Defining this implies XML_UNICODE.
XML_LARGE_SIZE
If defined, causes the XML_Size and XML_Index integer types to be at least 64 bits in size. This is intended to support processing of very large input streams, where the return values of XML_GetCurrentByteIndex, XML_GetCurrentLineNumber and XML_GetCurrentColumnNumber could overflow. It may not be supported by all compilers, and is turned off by default.
XML_CONTEXT_BYTES
The number of input bytes of markup context which the parser will ensure are available for reporting via XML_GetInputContext. This is normally set to 1024, and must be set to a positive interger. If this is not defined, the input context will not be available and XML_GetInputContext will always report NULL. Without this, Expat has a smaller memory footprint and can be faster.
XML_STATIC
On Windows, this should be set if Expat is going to be linked statically with the code that calls it; this is required to get all the right MSVC magic annotations correct. This is ignored on other platforms.
XML_ATTR_INFO
If defined, makes the the additional function XML_GetAttributeInfo available for reporting attribute byte offsets.

Using Expat

Compiling and Linking Against Expat

Unless you installed Expat in a location not expected by your compiler and linker, all you have to do to use Expat in your programs is to include the Expat header (#include <expat.h>) in your files that make calls to it and to tell the linker that it needs to link against the Expat library. On Unix systems, this would usually be done with the -lexpat argument. Otherwise, you'll need to tell the compiler where to look for the Expat header and the linker where to find the Expat library. You may also need to take steps to tell the operating system where to find this library at run time.

On a Unix-based system, here's what a Makefile might look like when Expat is installed in a standard location:

CC=cc
LDFLAGS=
LIBS= -lexpat
xmlapp: xmlapp.o
        $(CC) $(LDFLAGS) -o xmlapp xmlapp.o $(LIBS)

If you installed Expat in, say, /home/me/mystuff, then the Makefile would look like this:

CC=cc
CFLAGS= -I/home/me/mystuff/include
LDFLAGS=
LIBS= -L/home/me/mystuff/lib -lexpat
xmlapp: xmlapp.o
        $(CC) $(LDFLAGS) -o xmlapp xmlapp.o $(LIBS)

You'd also have to set the environment variable LD_LIBRARY_PATH to /home/me/mystuff/lib (or to ${LD_LIBRARY_PATH}:/home/me/mystuff/lib if LD_LIBRARY_PATH already has some directories in it) in order to run your application.

Expat Basics

As we saw in the example in the overview, the first step in parsing an XML document with Expat is to create a parser object. There are three functions in the Expat API for creating a parser object. However, only two of these (XML_ParserCreate and XML_ParserCreateNS) can be used for constructing a parser for a top-level document. The object returned by these functions is an opaque pointer (i.e. "expat.h" declares it as void *) to data with further internal structure. In order to free the memory associated with this object you must call XML_ParserFree. Note that if you have provided any user data that gets stored in the parser, then your application is responsible for freeing it prior to calling XML_ParserFree.

The objects returned by the parser creation functions are good for parsing only one XML document or external parsed entity. If your application needs to parse many XML documents, then it needs to create a parser object for each one. The best way to deal with this is to create a higher level object that contains all the default initialization you want for your parser objects.

Walking through a document hierarchy with a stream oriented parser will require a good stack mechanism in order to keep track of current context. For instance, to answer the simple question, "What element does this text belong to?" requires a stack, since the parser may have descended into other elements that are children of the current one and has encountered this text on the way out.

The things you're likely to want to keep on a stack are the currently opened element and it's attributes. You push this information onto the stack in the start handler and you pop it off in the end handler.

For some tasks, it is sufficient to just keep information on what the depth of the stack is (or would be if you had one.) The outline program shown above presents one example. Another such task would be skipping over a complete element. When you see the start tag for the element you want to skip, you set a skip flag and record the depth at which the element started. When the end tag handler encounters the same depth, the skipped element has ended and the flag may be cleared. If you follow the convention that the root element starts at 1, then you can use the same variable for skip flag and skip depth.

void
init_info(Parseinfo *info) {
  info->skip = 0;
  info->depth = 1;
  /* Other initializations here */
}  /* End of init_info */

void XMLCALL
rawstart(void *data, const char *el, const char **attr) {
  Parseinfo *inf = (Parseinfo *) data;

  if (! inf->skip) {
    if (should_skip(inf, el, attr)) {
      inf->skip = inf->depth;
    }
    else
      start(inf, el, attr);     /* This does rest of start handling */
  }

  inf->depth++;
}  /* End of rawstart */

void XMLCALL
rawend(void *data, const char *el) {
  Parseinfo *inf = (Parseinfo *) data;

  inf->depth--;

  if (! inf->skip)
    end(inf, el);              /* This does rest of end handling */

  if (inf->skip == inf->depth)
    inf->skip = 0;
}  /* End rawend */

Notice in the above example the difference in how depth is manipulated in the start and end handlers. The end tag handler should be the mirror image of the start tag handler. This is necessary to properly model containment. Since, in the start tag handler, we incremented depth after the main body of start tag code, then in the end handler, we need to manipulate it before the main body. If we'd decided to increment it first thing in the start handler, then we'd have had to decrement it last thing in the end handler.

Communicating between handlers

In order to be able to pass information between different handlers without using globals, you'll need to define a data structure to hold the shared variables. You can then tell Expat (with the XML_SetUserData function) to pass a pointer to this structure to the handlers. This is the first argument received by most handlers. In the reference section, an argument to a callback function is named userData and have type void * if the user data is passed; it will have the type XML_Parser if the parser itself is passed. When the parser is passed, the user data may be retrieved using XML_GetUserData.

One common case where multiple calls to a single handler may need to communicate using an application data structure is the case when content passed to the character data handler (set by XML_SetCharacterDataHandler) needs to be accumulated. A common first-time mistake with any of the event-oriented interfaces to an XML parser is to expect all the text contained in an element to be reported by a single call to the character data handler. Expat, like many other XML parsers, reports such data as a sequence of calls; there's no way to know when the end of the sequence is reached until a different callback is made. A buffer referenced by the user data structure proves both an effective and convenient place to accumulate character data.

XML Version

Expat is an XML 1.0 parser, and as such never complains based on the value of the version pseudo-attribute in the XML declaration, if present.

If an application needs to check the version number (to support alternate processing), it should use the XML_SetXmlDeclHandler function to set a handler that uses the information in the XML declaration to determine what to do. This example shows how to check that only a version number of "1.0" is accepted:

static int wrong_version;
static XML_Parser parser;

static void XMLCALL
xmldecl_handler(void            *userData,
                const XML_Char  *version,
                const XML_Char  *encoding,
                int              standalone)
{
  static const XML_Char Version_1_0[] = {'1', '.', '0', 0};

  int i;

  for (i = 0; i < (sizeof(Version_1_0) / sizeof(Version_1_0[0])); ++i) {
    if (version[i] != Version_1_0[i]) {
      wrong_version = 1;
      /* also clear all other handlers: */
      XML_SetCharacterDataHandler(parser, NULL);
      ...
      return;
    }
  }
  ...
}

Namespace Processing

When the parser is created using the XML_ParserCreateNS, function, Expat performs namespace processing. Under namespace processing, Expat consumes xmlns and xmlns:... attributes, which declare namespaces for the scope of the element in which they occur. This means that your start handler will not see these attributes. Your application can still be informed of these declarations by setting namespace declaration handlers with XML_SetNamespaceDeclHandler.

Element type and attribute names that belong to a given namespace are passed to the appropriate handler in expanded form. By default this expanded form is a concatenation of the namespace URI, the separator character (which is the 2nd argument to XML_ParserCreateNS), and the local name (i.e. the part after the colon). Names with undeclared prefixes are not well-formed when namespace processing is enabled, and will trigger an error. Unprefixed attribute names are never expanded, and unprefixed element names are only expanded when they are in the scope of a default namespace.

However if XML_SetReturnNSTriplet has been called with a non-zero do_nst parameter, then the expanded form for names with an explicit prefix is a concatenation of: URI, separator, local name, separator, prefix.

You can set handlers for the start of a namespace declaration and for the end of a scope of a declaration with the XML_SetNamespaceDeclHandler function. The StartNamespaceDeclHandler is called prior to the start tag handler and the EndNamespaceDeclHandler is called after the corresponding end tag that ends the namespace's scope. The namespace start handler gets passed the prefix and URI for the namespace. For a default namespace declaration (xmlns='...'), the prefix will be null. The URI will be null for the case where the default namespace is being unset. The namespace end handler just gets the prefix for the closing scope.

These handlers are called for each declaration. So if, for instance, a start tag had three namespace declarations, then the StartNamespaceDeclHandler would be called three times before the start tag handler is called, once for each declaration.

Character Encodings

While XML is based on Unicode, and every XML processor is required to recognized UTF-8 and UTF-16 (1 and 2 byte encodings of Unicode), other encodings may be declared in XML documents or entities. For the main document, an XML declaration may contain an encoding declaration:

<?xml version="1.0" encoding="ISO-8859-2"?>

External parsed entities may begin with a text declaration, which looks like an XML declaration with just an encoding declaration:

<?xml encoding="Big5"?>

With Expat, you may also specify an encoding at the time of creating a parser. This is useful when the encoding information may come from a source outside the document itself (like a higher level protocol.)

There are four built-in encodings in Expat:

  • UTF-8
  • UTF-16
  • ISO-8859-1
  • US-ASCII

Anything else discovered in an encoding declaration or in the protocol encoding specified in the parser constructor, triggers a call to the UnknownEncodingHandler. This handler gets passed the encoding name and a pointer to an XML_Encoding data structure. Your handler must fill in this structure and return XML_STATUS_OK if it knows how to deal with the encoding. Otherwise the handler should return XML_STATUS_ERROR. The handler also gets passed a pointer to an optional application data structure that you may indicate when you set the handler.

Expat places restrictions on character encodings that it can support by filling in the XML_Encoding structure. include file:

  1. Every ASCII character that can appear in a well-formed XML document must be represented by a single byte, and that byte must correspond to it's ASCII encoding (except for the characters $@\^'{}~)
  2. Characters must be encoded in 4 bytes or less.
  3. All characters encoded must have Unicode scalar values less than or equal to 65535 (0xFFFF)This does not apply to the built-in support for UTF-16 and UTF-8
  4. No character may be encoded by more that one distinct sequence of bytes

XML_Encoding contains an array of integers that correspond to the 1st byte of an encoding sequence. If the value in the array for a byte is zero or positive, then the byte is a single byte encoding that encodes the Unicode scalar value contained in the array. A -1 in this array indicates a malformed byte. If the value is -2, -3, or -4, then the byte is the beginning of a 2, 3, or 4 byte sequence respectively. Multi-byte sequences are sent to the convert function pointed at in the XML_Encoding structure. This function should return the Unicode scalar value for the sequence or -1 if the sequence is malformed.

One pitfall that novice Expat users are likely to fall into is that although Expat may accept input in various encodings, the strings that it passes to the handlers are always encoded in UTF-8 or UTF-16 (depending on how Expat was compiled). Your application is responsible for any translation of these strings into other encodings.

Handling External Entity References

Expat does not read or parse external entities directly. Note that any external DTD is a special case of an external entity. If you've set no ExternalEntityRefHandler, then external entity references are silently ignored. Otherwise, it calls your handler with the information needed to read and parse the external entity.

Your handler isn't actually responsible for parsing the entity, but it is responsible for creating a subsidiary parser with XML_ExternalEntityParserCreate that will do the job. This returns an instance of XML_Parser that has handlers and other data structures initialized from the parent parser. You may then use XML_Parse or XML_ParseBuffer calls against this parser. Since external entities my refer to other external entities, your handler should be prepared to be called recursively.

Parsing DTDs

In order to parse parameter entities, before starting the parse, you must call XML_SetParamEntityParsing with one of the following arguments:

XML_PARAM_ENTITY_PARSING_NEVER
Don't parse parameter entities or the external subset
XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE
Parse parameter entites and the external subset unless standalone was set to "yes" in the XML declaration.
XML_PARAM_ENTITY_PARSING_ALWAYS
Always parse parameter entities and the external subset

In order to read an external DTD, you also have to set an external entity reference handler as described above.

Temporarily Stopping Parsing

Expat 1.95.8 introduces a new feature: its now possible to stop parsing temporarily from within a handler function, even if more data has already been passed into the parser. Applications for this include

  • Supporting the XInclude specification.
  • Delaying further processing until additional information is available from some other source.
  • Adjusting processor load as task priorities shift within an application.
  • Stopping parsing completely (simply free or reset the parser instead of resuming in the outer parsing loop). This can be useful if a application-domain error is found in the XML being parsed or if the result of the parse is determined not to be useful after all.

To take advantage of this feature, the main parsing loop of an application needs to support this specifically. It cannot be supported with a parsing loop compatible with Expat 1.95.7 or earlier (though existing loops will continue to work without supporting the stop/resume feature).

An application that uses this feature for a single parser will have the rough structure (in pseudo-code):

fd = open_input()
p = create_parser()

if parse_xml(p, fd) {
  /* suspended */

  int suspended = 1;

  while (suspended) {
    do_something_else()
    if ready_to_resume() {
      suspended = continue_parsing(p, fd);
    }
  }
}

An application that may resume any of several parsers based on input (either from the XML being parsed or some other source) will certainly have more interesting control structures.

This C function could be used for the parse_xml function mentioned in the pseudo-code above:

#define BUFF_SIZE 10240

/* Parse a document from the open file descriptor 'fd' until the parse
   is complete (the document has been completely parsed, or there's
   been an error), or the parse is stopped.  Return non-zero when
   the parse is merely suspended.
*/
int
parse_xml(XML_Parser p, int fd)
{
  for (;;) {
    int last_chunk;
    int bytes_read;
    enum XML_Status status;

    void *buff = XML_GetBuffer(p, BUFF_SIZE);
    if (buff == NULL) {
      /* handle error... */
      return 0;
    }
    bytes_read = read(fd, buff, BUFF_SIZE);
    if (bytes_read < 0) {
      /* handle error... */
      return 0;
    }
    status = XML_ParseBuffer(p, bytes_read, bytes_read == 0);
    switch (status) {
      case XML_STATUS_ERROR:
        /* handle error... */
        return 0;
      case XML_STATUS_SUSPENDED:
        return 1;
    }
    if (bytes_read == 0)
      return 0;
  }
}

The corresponding continue_parsing function is somewhat simpler, since it only need deal with the return code from XML_ResumeParser; it can delegate the input handling to the parse_xml function:

/* Continue parsing a document which had been suspended.  The 'p' and
   'fd' arguments are the same as passed to parse_xml().  Return
   non-zero when the parse is suspended.
*/
int
continue_parsing(XML_Parser p, int fd)
{
  enum XML_Status status = XML_ResumeParser(p);
  switch (status) {
    case XML_STATUS_ERROR:
      /* handle error... */
      return 0;
    case XML_ERROR_NOT_SUSPENDED:
      /* handle error... */
      return 0;.
    case XML_STATUS_SUSPENDED:
      return 1;
  }
  return parse_xml(p, fd);
}

Now that we've seen what a mess the top-level parsing loop can become, what have we gained? Very simply, we can now use the XML_StopParser function to stop parsing, without having to go to great lengths to avoid additional processing that we're expecting to ignore. As a bonus, we get to stop parsing temporarily, and come back to it when we're ready.

To stop parsing from a handler function, use the XML_StopParser function. This function takes two arguments; the parser being stopped and a flag indicating whether the parse can be resumed in the future.


Expat Reference

Parser Creation

XML_Parser XMLCALL
XML_ParserCreate(const XML_Char *encoding);
Construct a new parser. If encoding is non-null, it specifies a character encoding to use for the document. This overrides the document encoding declaration. There are four built-in encodings:
  • US-ASCII
  • UTF-8
  • UTF-16
  • ISO-8859-1
Any other value will invoke a call to the UnknownEncodingHandler.
XML_Parser XMLCALL
XML_ParserCreateNS(const XML_Char *encoding,
                   XML_Char sep);
Constructs a new parser that has namespace processing in effect. Namespace expanded element names and attribute names are returned as a concatenation of the namespace URI, sep, and the local part of the name. This means that you should pick a character for sep that can't be part of an URI. Since Expat does not check namespace URIs for conformance, the only safe choice for a namespace separator is a character that is illegal in XML. For instance, '\xFF' is not legal in UTF-8, and '\xFFFF' is not legal in UTF-16. There is a special case when sep is the null character '\0': the namespace URI and the local part will be concatenated without any separator - this is intended to support RDF processors. It is a programming error to use the null separator with namespace triplets.
XML_Parser XMLCALL
XML_ParserCreate_MM(const XML_Char *encoding,
                    const XML_Memory_Handling_Suite *ms,
		    const XML_Char *sep);
typedef struct {
  void *(XMLCALL *malloc_fcn)(size_t size);
  void *(XMLCALL *realloc_fcn)(void *ptr, size_t size);
  void (XMLCALL *free_fcn)(void *ptr);
} XML_Memory_Handling_Suite;

Construct a new parser using the suite of memory handling functions specified in ms. If ms is NULL, then use the standard set of memory management functions. If sep is non NULL, then namespace processing is enabled in the created parser and the character pointed at by sep is used as the separator between the namespace URI and the local part of the name.

XML_Parser XMLCALL
XML_ExternalEntityParserCreate(XML_Parser p,
                               const XML_Char *context,
                               const XML_Char *encoding);
Construct a new XML_Parser object for parsing an external general entity. Context is the context argument passed in a call to a ExternalEntityRefHandler. Other state information such as handlers, user data, namespace processing is inherited from the parser passed as the 1st argument. So you shouldn't need to call any of the behavior changing functions on this parser (unless you want it to act differently than the parent parser).
void XMLCALL
XML_ParserFree(XML_Parser p);
Free memory used by the parser. Your application is responsible for freeing any memory associated with user data.
XML_Bool XMLCALL
XML_ParserReset(XML_Parser p,
                const XML_Char *encoding);
Clean up the memory structures maintained by the parser so that it may be used again. After this has been called, parser is ready to start parsing a new document. All handlers are cleared from the parser, except for the unknownEncodingHandler. The parser's external state is re-initialized except for the values of ns and ns_triplets. This function may not be used on a parser created using XML_ExternalEntityParserCreate; it will return XML_FALSE in that case. Returns XML_TRUE on success. Your application is responsible for dealing with any memory associated with user data.

Parsing

To state the obvious: the three parsing functions XML_Parse, XML_ParseBuffer and XML_GetBuffer must not be called from within a handler unless they operate on a separate parser instance, that is, one that did not call the handler. For example, it is OK to call the parsing functions from within an XML_ExternalEntityRefHandler, if they apply to the parser created by XML_ExternalEntityParserCreate.

Note: the len argument passed to these functions should be considerably less than the maximum value for an integer, as it could create an integer overflow situation if the added lengths of a buffer and the unprocessed portion of the previous buffer exceed the maximum integer value. Input data at the end of a buffer will remain unprocessed if it is part of an XML token for which the end is not part of that buffer.

enum XML_Status XMLCALL
XML_Parse(XML_Parser p,
          const char *s,
          int len,
          int isFinal);
enum XML_Status {
  XML_STATUS_ERROR = 0,
  XML_STATUS_OK = 1
};
Parse some more of the document. The string s is a buffer containing part (or perhaps all) of the document. The number of bytes of s that are part of the document is indicated by len. This means that s doesn't have to be null terminated. It also means that if len is larger than the number of bytes in the block of memory that s points at, then a memory fault is likely. The isFinal parameter informs the parser that this is the last piece of the document. Frequently, the last piece is empty (i.e. len is zero.) If a parse error occurred, it returns XML_STATUS_ERROR. Otherwise it returns XML_STATUS_OK value.
enum XML_Status XMLCALL
XML_ParseBuffer(XML_Parser p,
                int len,
                int isFinal);
This is just like XML_Parse, except in this case Expat provides the buffer. By obtaining the buffer from Expat with the XML_GetBuffer function, the application can avoid double copying of the input.
void * XMLCALL
XML_GetBuffer(XML_Parser p,
              int len);
Obtain a buffer of size len to read a piece of the document into. A NULL value is returned if Expat can't allocate enough memory for this buffer. This has to be called prior to every call to XML_ParseBuffer. A typical use would look like this:
for (;;) {
  int bytes_read;
  void *buff = XML_GetBuffer(p, BUFF_SIZE);
  if (buff == NULL) {
    /* handle error */
  }

  bytes_read = read(docfd, buff, BUFF_SIZE);
  if (bytes_read < 0) {
    /* handle error */
  }

  if (! XML_ParseBuffer(p, bytes_read, bytes_read == 0)) {
    /* handle parse error */
  }

  if (bytes_read == 0)
    break;
}
enum XML_Status XMLCALL
XML_StopParser(XML_Parser p,
               XML_Bool resumable);

Stops parsing, causing XML_Parse or XML_ParseBuffer to return. Must be called from within a call-back handler, except when aborting (when resumable is XML_FALSE) an already suspended parser. Some call-backs may still follow because they would otherwise get lost, including

  • the end element handler for empty elements when stopped in the start element handler,
  • the end namespace declaration handler when stopped in the end element handler,
  • the character data handler when stopped in the character data handler while making multiple call-backs on a contiguous chunk of characters,
and possibly others.

This can be called from most handlers, including DTD related call-backs, except when parsing an external parameter entity and resumable is XML_TRUE. Returns XML_STATUS_OK when successful, XML_STATUS_ERROR otherwise. The possible error codes are:

XML_ERROR_SUSPENDED
when suspending an already suspended parser.
XML_ERROR_FINISHED
when the parser has already finished.
XML_ERROR_SUSPEND_PE
when suspending while parsing an external PE.

Since the stop/resume feature requires application support in the outer parsing loop, it is an error to call this function for a parser not being handled appropriately; see Temporarily Stopping Parsing for more information.

When resumable is XML_TRUE then parsing is suspended, that is, XML_Parse and XML_ParseBuffer return XML_STATUS_SUSPENDED. Otherwise, parsing is aborted, that is, XML_Parse and XML_ParseBuffer return XML_STATUS_ERROR with error code XML_ERROR_ABORTED.

Note: This will be applied to the current parser instance only, that is, if there is a parent parser then it will continue parsing when the external entity reference handler returns. It is up to the implementation of that handler to call XML_StopParser on the parent parser (recursively), if one wants to stop parsing altogether.

When suspended, parsing can be resumed by calling XML_ResumeParser.

New in Expat 1.95.8.

enum XML_Status XMLCALL
XML_ResumeParser(XML_Parser p);

Resumes parsing after it has been suspended with XML_StopParser. Must not be called from within a handler call-back. Returns same status codes as XML_Parse or XML_ParseBuffer. An additional error code, XML_ERROR_NOT_SUSPENDED, will be returned if the parser was not currently suspended.

Note: This must be called on the most deeply nested child parser instance first, and on its parent parser only after the child parser has finished, to be applied recursively until the document entity's parser is restarted. That is, the parent parser will not resume by itself and it is up to the application to call XML_ResumeParser on it at the appropriate moment.

New in Expat 1.95.8.

void XMLCALL
XML_GetParsingStatus(XML_Parser p,
                     XML_ParsingStatus *status);
enum XML_Parsing {
  XML_INITIALIZED,
  XML_PARSING,
  XML_FINISHED,
  XML_SUSPENDED
};

typedef struct {
  enum XML_Parsing parsing;
  XML_Bool finalBuffer;
} XML_ParsingStatus;

Returns status of parser with respect to being initialized, parsing, finished, or suspended, and whether the final buffer is being processed. The status parameter must not be NULL.

New in Expat 1.95.8.

Handler Setting

Although handlers are typically set prior to parsing and left alone, an application may choose to set or change the handler for a parsing event while the parse is in progress. For instance, your application may choose to ignore all text not descended from a para element. One way it could do this is to set the character handler when a para start tag is seen, and unset it for the corresponding end tag.

A handler may be unset by providing a NULL pointer to the appropriate handler setter. None of the handler setting functions have a return value.

Your handlers will be receiving strings in arrays of type XML_Char. This type is conditionally defined in expat.h as either char, wchar_t or unsigned short. The former implies UTF-8 encoding, the latter two imply UTF-16 encoding. Note that you'll receive them in this form independent of the original encoding of the document.

void XMLCALL
XML_SetStartElementHandler(XML_Parser p,
                           XML_StartElementHandler start);
typedef void
(XMLCALL *XML_StartElementHandler)(void *userData,
                                   const XML_Char *name,
                                   const XML_Char **atts);

Set handler for start (and empty) tags. Attributes are passed to the start handler as a pointer to a vector of char pointers. Each attribute seen in a start (or empty) tag occupies 2 consecutive places in this vector: the attribute name followed by the attribute value. These pairs are terminated by a null pointer.

Note that an empty tag generates a call to both start and end handlers (in that order).

void XMLCALL
XML_SetEndElementHandler(XML_Parser p,
                         XML_EndElementHandler);
typedef void
(XMLCALL *XML_EndElementHandler)(void *userData,
                                 const XML_Char *name);

Set handler for end (and empty) tags. As noted above, an empty tag generates a call to both start and end handlers.

void XMLCALL
XML_SetElementHandler(XML_Parser p,
                      XML_StartElementHandler start,
                      XML_EndElementHandler end);

Set handlers for start and end tags with one call.

void XMLCALL
XML_SetCharacterDataHandler(XML_Parser p,
                            XML_CharacterDataHandler charhndl)
typedef void
(XMLCALL *XML_CharacterDataHandler)(void *userData,
                                    const XML_Char *s,
                                    int len);

Set a text handler. The string your handler receives is NOT nul-terminated. You have to use the length argument to deal with the end of the string. A single block of contiguous text free of markup may still result in a sequence of calls to this handler. In other words, if you're searching for a pattern in the text, it may be split across calls to this handler. Note: Setting this handler to NULL may NOT immediately terminate call-backs if the parser is currently processing such a single block of contiguous markup-free text, as the parser will continue calling back until the end of the block is reached.

void XMLCALL
XML_SetProcessingInstructionHandler(XML_Parser p,
                                    XML_ProcessingInstructionHandler proc)
typedef void
(XMLCALL *XML_ProcessingInstructionHandler)(void *userData,
                                            const XML_Char *target,
                                            const XML_Char *data);

Set a handler for processing instructions. The target is the first word in the processing instruction. The data is the rest of the characters in it after skipping all whitespace after the initial word.

void XMLCALL
XML_SetCommentHandler(XML_Parser p,
                      XML_CommentHandler cmnt)
typedef void
(XMLCALL *XML_CommentHandler)(void *userData,
                              const XML_Char *data);

Set a handler for comments. The data is all text inside the comment delimiters.

void XMLCALL
XML_SetStartCdataSectionHandler(XML_Parser p,
                                XML_StartCdataSectionHandler start);
typedef void
(XMLCALL *XML_StartCdataSectionHandler)(void *userData);

Set a handler that gets called at the beginning of a CDATA section.

void XMLCALL
XML_SetEndCdataSectionHandler(XML_Parser p,
                              XML_EndCdataSectionHandler end);
typedef void
(XMLCALL *XML_EndCdataSectionHandler)(void *userData);

Set a handler that gets called at the end of a CDATA section.

void XMLCALL
XML_SetCdataSectionHandler(XML_Parser p,
                           XML_StartCdataSectionHandler start,
                           XML_EndCdataSectionHandler end)

Sets both CDATA section handlers with one call.

void XMLCALL
XML_SetDefaultHandler(XML_Parser p,
                      XML_DefaultHandler hndl)
typedef void
(XMLCALL *XML_DefaultHandler)(void *userData,
                              const XML_Char *s,
                              int len);

Sets a handler for any characters in the document which wouldn't otherwise be handled. This includes both data for which no handlers can be set (like some kinds of DTD declarations) and data which could be reported but which currently has no handler set. The characters are passed exactly as they were present in the XML document except that they will be encoded in UTF-8 or UTF-16. Line boundaries are not normalized. Note that a byte order mark character is not passed to the default handler. There are no guarantees about how characters are divided between calls to the default handler: for example, a comment might be split between multiple calls. Setting the handler with this call has the side effect of turning off expansion of references to internally defined general entities. Instead these references are passed to the default handler.

See also XML_DefaultCurrent.

void XMLCALL
XML_SetDefaultHandlerExpand(XML_Parser p,
                            XML_DefaultHandler hndl)
typedef void
(XMLCALL *XML_DefaultHandler)(void *userData,
                              const XML_Char *s,
                              int len);

This sets a default handler, but doesn't inhibit the expansion of internal entity references. The entity reference will not be passed to the default handler.

See also XML_DefaultCurrent.

void XMLCALL
XML_SetExternalEntityRefHandler(XML_Parser p,
                                XML_ExternalEntityRefHandler hndl)
typedef int
(XMLCALL *XML_ExternalEntityRefHandler)(XML_Parser p,
                                        const XML_Char *context,
                                        const XML_Char *base,
                                        const XML_Char *systemId,
                                        const XML_Char *publicId);

Set an external entity reference handler. This handler is also called for processing an external DTD subset if parameter entity parsing is in effect. (See XML_SetParamEntityParsing.)

The context parameter specifies the parsing context in the format expected by the context argument to XML_ExternalEntityParserCreate. code is valid only until the handler returns, so if the referenced entity is to be parsed later, it must be copied. context is NULL only when the entity is a parameter entity, which is how one can differentiate between general and parameter entities.

The base parameter is the base to use for relative system identifiers. It is set by XML_SetBase and may be NULL. The publicId parameter is the public id given in the entity declaration and may be NULL. systemId is the system identifier specified in the entity declaration and is never NULL.

There are a couple of ways in which this handler differs from others. First, this handler returns a status indicator (an integer). XML_STATUS_OK should be returned for successful handling of the external entity reference. Returning XML_STATUS_ERROR indicates failure, and causes the calling parser to return an XML_ERROR_EXTERNAL_ENTITY_HANDLING error.

Second, instead of having the user data as its first argument, it receives the parser that encountered the entity reference. This, along with the context parameter, may be used as arguments to a call to XML_ExternalEntityParserCreate. Using the returned parser, the body of the external entity can be recursively parsed.

Since this handler may be called recursively, it should not be saving information into global or static variables.

void XMLCALL
XML_SetExternalEntityRefHandlerArg(XML_Parser p,
                                   void *arg)

Set the argument passed to the ExternalEntityRefHandler. If arg is not NULL, it is the new value passed to the handler set using XML_SetExternalEntityRefHandler; if arg is NULL, the argument passed to the handler function will be the parser object itself.

Note: The type of arg and the type of the first argument to the ExternalEntityRefHandler do not match. This function takes a void * to be passed to the handler, while the handler accepts an XML_Parser. This is a historical accident, but will not be corrected before Expat 2.0 (at the earliest) to avoid causing compiler warnings for code that's known to work with this API. It is the responsibility of the application code to know the actual type of the argument passed to the handler and to manage it properly.

void XMLCALL
XML_SetSkippedEntityHandler(XML_Parser p,
                            XML_SkippedEntityHandler handler)
typedef void
(XMLCALL *XML_SkippedEntityHandler)(void *userData,
                                    const XML_Char *entityName,
                                    int is_parameter_entity);

Set a skipped entity handler. This is called in two situations:

  1. An entity reference is encountered for which no declaration has been read and this is not an error.
  2. An internal entity reference is read, but not expanded, because XML_SetDefaultHandler has been called.

The is_parameter_entity argument will be non-zero for a parameter entity and zero for a general entity.

Note: skipped parameter entities in declarations and skipped general entities in attribute values cannot be reported, because the event would be out of sync with the reporting of the declarations or attribute values

void XMLCALL
XML_SetUnknownEncodingHandler(XML_Parser p,
                              XML_UnknownEncodingHandler enchandler,
			      void *encodingHandlerData)
typedef int
(XMLCALL *XML_UnknownEncodingHandler)(void *encodingHandlerData,
                                      const XML_Char *name,
                                      XML_Encoding *info);

typedef struct {
  int map[256];
  void *data;
  int (XMLCALL *convert)(void *data, const char *s);
  void (XMLCALL *release)(void *data);
} XML_Encoding;

Set a handler to deal with encodings other than the built in set. This should be done before XML_Parse or XML_ParseBuffer have been called on the given parser.

If the handler knows how to deal with an encoding with the given name, it should fill in the info data structure and return XML_STATUS_OK. Otherwise it should return XML_STATUS_ERROR. The handler will be called at most once per parsed (external) entity. The optional application data pointer encodingHandlerData will be passed back to the handler.

The map array contains information for every possible possible leading byte in a byte sequence. If the corresponding value is >= 0, then it's a single byte sequence and the byte encodes that Unicode value. If the value is -1, then that byte is invalid as the initial byte in a sequence. If the value is -n, where n is an integer > 1, then n is the number of bytes in the sequence and the actual conversion is accomplished by a call to the function pointed at by convert. This function may return -1 if the sequence itself is invalid. The convert pointer may be null if there are only single byte codes. The data parameter passed to the convert function is the data pointer from XML_Encoding. The string s is NOT nul-terminated and points at the sequence of bytes to be converted.

The function pointed at by release is called by the parser when it is finished with the encoding. It may be NULL.

void XMLCALL
XML_SetStartNamespaceDeclHandler(XML_Parser p,
			         XML_StartNamespaceDeclHandler start);
typedef void
(XMLCALL *XML_StartNamespaceDeclHandler)(void *userData,
                                         const XML_Char *prefix,
                                         const XML_Char *uri);

Set a handler to be called when a namespace is declared. Namespace declarations occur inside start tags. But the namespace declaration start handler is called before the start tag handler for each namespace declared in that start tag.

void XMLCALL
XML_SetEndNamespaceDeclHandler(XML_Parser p,
			       XML_EndNamespaceDeclHandler end);
typedef void
(XMLCALL *XML_EndNamespaceDeclHandler)(void *userData,
                                       const XML_Char *prefix);

Set a handler to be called when leaving the scope of a namespace declaration. This will be called, for each namespace declaration, after the handler for the end tag of the element in which the namespace was declared.

void XMLCALL
XML_SetNamespaceDeclHandler(XML_Parser p,
                            XML_StartNamespaceDeclHandler start,
                            XML_EndNamespaceDeclHandler end)

Sets both namespace declaration handlers with a single call.

void XMLCALL
XML_SetXmlDeclHandler(XML_Parser p,
		      XML_XmlDeclHandler xmldecl);
typedef void
(XMLCALL *XML_XmlDeclHandler)(void            *userData,
                              const XML_Char  *version,
                              const XML_Char  *encoding,
                              int             standalone);

Sets a handler that is called for XML declarations and also for text declarations discovered in external entities. The way to distinguish is that the version parameter will be NULL for text declarations. The encoding parameter may be NULL for an XML declaration. The standalone argument will contain -1, 0, or 1 indicating respectively that there was no standalone parameter in the declaration, that it was given as no, or that it was given as yes.

void XMLCALL
XML_SetStartDoctypeDeclHandler(XML_Parser p,
			       XML_StartDoctypeDeclHandler start);
typedef void
(XMLCALL *XML_StartDoctypeDeclHandler)(void           *userData,
                                       const XML_Char *doctypeName,
                                       const XML_Char *sysid,
                                       const XML_Char *pubid,
                                       int            has_internal_subset);

Set a handler that is called at the start of a DOCTYPE declaration, before any external or internal subset is parsed. Both sysid and pubid may be NULL. The has_internal_subset will be non-zero if the DOCTYPE declaration has an internal subset.

void XMLCALL
XML_SetEndDoctypeDeclHandler(XML_Parser p,
			     XML_EndDoctypeDeclHandler end);
typedef void
(XMLCALL *XML_EndDoctypeDeclHandler)(void *userData);

Set a handler that is called at the end of a DOCTYPE declaration, after parsing any external subset.

void XMLCALL
XML_SetDoctypeDeclHandler(XML_Parser p,
			  XML_StartDoctypeDeclHandler start,
			  XML_EndDoctypeDeclHandler end);

Set both doctype handlers with one call.

void XMLCALL
XML_SetElementDeclHandler(XML_Parser p,
			  XML_ElementDeclHandler eldecl);
typedef void
(XMLCALL *XML_ElementDeclHandler)(void *userData,
                                  const XML_Char *name,
                                  XML_Content *model);
enum XML_Content_Type {
  XML_CTYPE_EMPTY = 1,
  XML_CTYPE_ANY,
  XML_CTYPE_MIXED,
  XML_CTYPE_NAME,
  XML_CTYPE_CHOICE,
  XML_CTYPE_SEQ
};

enum XML_Content_Quant {
  XML_CQUANT_NONE,
  XML_CQUANT_OPT,
  XML_CQUANT_REP,
  XML_CQUANT_PLUS
};

typedef struct XML_cp XML_Content;

struct XML_cp {
  enum XML_Content_Type		type;
  enum XML_Content_Quant	quant;
  const XML_Char *		name;
  unsigned int			numchildren;
  XML_Content *			children;
};

Sets a handler for element declarations in a DTD. The handler gets called with the name of the element in the declaration and a pointer to a structure that contains the element model. It is the application's responsibility to free this data structure using XML_FreeContentModel.

The model argument is the root of a tree of XML_Content nodes. If type equals XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be XML_CQUANT_NONE, and the other fields will be zero or NULL. If type is XML_CTYPE_MIXED, then quant will be XML_CQUANT_NONE or XML_CQUANT_REP and numchildren will contain the number of elements that are allowed to be mixed in and children points to an array of XML_Content structures that will all have type XML_CTYPE_NAME with no quantification. Only the root node can be type XML_CTYPE_EMPTY, XML_CTYPE_ANY, or XML_CTYPE_MIXED.

For type XML_CTYPE_NAME, the name field points to the name and the numchildren and children fields will be zero and NULL. The quant field will indicate any quantifiers placed on the name.

Types XML_CTYPE_CHOICE and XML_CTYPE_SEQ indicate a choice or sequence respectively. The numchildren field indicates how many nodes in the choice or sequence and children points to the nodes.

void XMLCALL
XML_SetAttlistDeclHandler(XML_Parser p,
                          XML_AttlistDeclHandler attdecl);
typedef void
(XMLCALL *XML_AttlistDeclHandler)(void           *userData,
                                  const XML_Char *elname,
                                  const XML_Char *attname,
                                  const XML_Char *att_type,
                                  const XML_Char *dflt,
                                  int            isrequired);

Set a handler for attlist declarations in the DTD. This handler is called for each attribute. So a single attlist declaration with multiple attributes declared will generate multiple calls to this handler. The elname parameter returns the name of the element for which the attribute is being declared. The attribute name is in the attname parameter. The attribute type is in the att_type parameter. It is the string representing the type in the declaration with whitespace removed.

The dflt parameter holds the default value. It will be NULL in the case of "#IMPLIED" or "#REQUIRED" attributes. You can distinguish these two cases by checking the isrequired parameter, which will be true in the case of "#REQUIRED" attributes. Attributes which are "#FIXED" will have also have a true isrequired, but they will have the non-NULL fixed value in the dflt parameter.

void XMLCALL
XML_SetEntityDeclHandler(XML_Parser p,
			 XML_EntityDeclHandler handler);
typedef void
(XMLCALL *XML_EntityDeclHandler)(void           *userData,
                                 const XML_Char *entityName,
                                 int            is_parameter_entity,
                                 const XML_Char *value,
                                 int            value_length, 
                                 const XML_Char *base,
                                 const XML_Char *systemId,
                                 const XML_Char *publicId,
                                 const XML_Char *notationName);

Sets a handler that will be called for all entity declarations. The is_parameter_entity argument will be non-zero in the case of parameter entities and zero otherwise.

For internal entities (<!ENTITY foo "bar">), value will be non-NULL and systemId, publicId, and notationName will all be NULL. The value string is not NULL terminated; the length is provided in the value_length parameter. Do not use value_length to test for internal entities, since it is legal to have zero-length values. Instead check for whether or not value is NULL.

The notationName argument will have a non-NULL value only for unparsed entity declarations.

void XMLCALL
XML_SetUnparsedEntityDeclHandler(XML_Parser p,
                                 XML_UnparsedEntityDeclHandler h)
typedef void
(XMLCALL *XML_UnparsedEntityDeclHandler)(void *userData,
                                         const XML_Char *entityName, 
                                         const XML_Char *base,
                                         const XML_Char *systemId,
                                         const XML_Char *publicId,
                                         const XML_Char *notationName);

Set a handler that receives declarations of unparsed entities. These are entity declarations that have a notation (NDATA) field:

<!ENTITY logo SYSTEM "images/logo.gif" NDATA gif>

This handler is obsolete and is provided for backwards compatibility. Use instead XML_SetEntityDeclHandler.

void XMLCALL
XML_SetNotationDeclHandler(XML_Parser p,
                           XML_NotationDeclHandler h)
typedef void
(XMLCALL *XML_NotationDeclHandler)(void *userData, 
                                   const XML_Char *notationName,
                                   const XML_Char *base,
                                   const XML_Char *systemId,
                                   const XML_Char *publicId);

Set a handler that receives notation declarations.

void XMLCALL
XML_SetNotStandaloneHandler(XML_Parser p,
                            XML_NotStandaloneHandler h)
typedef int 
(XMLCALL *XML_NotStandaloneHandler)(void *userData);

Set a handler that is called if the document is not "standalone". This happens when there is an external subset or a reference to a parameter entity, but does not have standalone set to "yes" in an XML declaration. If this handler returns XML_STATUS_ERROR, then the parser will throw an XML_ERROR_NOT_STANDALONE error.

Parse position and error reporting functions

These are the functions you'll want to call when the parse functions return XML_STATUS_ERROR (a parse error has occurred), although the position reporting functions are useful outside of errors. The position reported is the byte position (in the original document or entity encoding) of the first of the sequence of characters that generated the current event (or the error that caused the parse functions to return XML_STATUS_ERROR.) The exceptions are callbacks trigged by declarations in the document prologue, in which case they exact position reported is somewhere in the relevant markup, but not necessarily as meaningful as for other events.

The position reporting functions are accurate only outside of the DTD. In other words, they usually return bogus information when called from within a DTD declaration handler.

enum XML_Error XMLCALL
XML_GetErrorCode(XML_Parser p);
Return what type of error has occurred.
const XML_LChar * XMLCALL
XML_ErrorString(enum XML_Error code);
Return a string describing the error corresponding to code. The code should be one of the enums that can be returned from XML_GetErrorCode.
XML_Index XMLCALL
XML_GetCurrentByteIndex(XML_Parser p);
Return the byte offset of the position. This always corresponds to the values returned by XML_GetCurrentLineNumber and XML_GetCurrentColumnNumber.
XML_Size XMLCALL
XML_GetCurrentLineNumber(XML_Parser p);
Return the line number of the position. The first line is reported as 1.
XML_Size XMLCALL
XML_GetCurrentColumnNumber(XML_Parser p);
Return the offset, from the beginning of the current line, of the position.
int XMLCALL
XML_GetCurrentByteCount(XML_Parser p);
Return the number of bytes in the current event. Returns 0 if the event is inside a reference to an internal entity and for the end-tag event for empty element tags (the later can be used to distinguish empty-element tags from empty elements using separate start and end tags).
const char * XMLCALL
XML_GetInputContext(XML_Parser p,
                    int *offset,
                    int *size);

Returns the parser's input buffer, sets the integer pointed at by offset to the offset within this buffer of the current parse position, and set the integer pointed at by size to the size of the returned buffer.

This should only be called from within a handler during an active parse and the returned buffer should only be referred to from within the handler that made the call. This input buffer contains the untranslated bytes of the input.

Only a limited amount of context is kept, so if the event triggering a call spans over a very large amount of input, the actual parse position may be before the beginning of the buffer.

If XML_CONTEXT_BYTES is not defined, this will always return NULL.

Miscellaneous functions

The functions in this section either obtain state information from the parser or can be used to dynamicly set parser options.

void XMLCALL
XML_SetUserData(XML_Parser p,
                void *userData);
This sets the user data pointer that gets passed to handlers. It overwrites any previous value for this pointer. Note that the application is responsible for freeing the memory associated with userData when it is finished with the parser. So if you call this when there's already a pointer there, and you haven't freed the memory associated with it, then you've probably just leaked memory.
void * XMLCALL
XML_GetUserData(XML_Parser p);
This returns the user data pointer that gets passed to handlers. It is actually implemented as a macro.
void XMLCALL
XML_UseParserAsHandlerArg(XML_Parser p);
After this is called, handlers receive the parser in their userData arguments. The user data can still be obtained using the XML_GetUserData function.
enum XML_Status XMLCALL
XML_SetBase(XML_Parser p,
            const XML_Char *base);
Set the base to be used for resolving relative URIs in system identifiers. The return value is XML_STATUS_ERROR if there's no memory to store base, otherwise it's XML_STATUS_OK.
const XML_Char * XMLCALL
XML_GetBase(XML_Parser p);
Return the base for resolving relative URIs.
int XMLCALL
XML_GetSpecifiedAttributeCount(XML_Parser p);
When attributes are reported to the start handler in the atts vector, attributes that were explicitly set in the element occur before any attributes that receive their value from default information in an ATTLIST declaration. This function returns the number of attributes that were explicitly set times two, thus giving the offset in the atts array passed to the start tag handler of the first attribute set due to defaults. It supplies information for the last call to a start handler. If called inside a start handler, then that means the current call.
int XMLCALL
XML_GetIdAttributeIndex(XML_Parser p);
Returns the index of the ID attribute passed in the atts array in the last call to XML_StartElementHandler, or -1 if there is no ID attribute. If called inside a start handler, then that means the current call.
const XML_AttrInfo * XMLCALL
XML_GetAttributeInfo(XML_Parser parser);
typedef struct {
  XML_Index  nameStart;  /* Offset to beginning of the attribute name. */
  XML_Index  nameEnd;    /* Offset after the attribute name's last byte. */
  XML_Index  valueStart; /* Offset to beginning of the attribute value. */
  XML_Index  valueEnd;   /* Offset after the attribute value's last byte. */
} XML_AttrInfo;
Returns an array of XML_AttrInfo structures for the attribute/value pairs passed in the last call to the XML_StartElementHandler that were specified in the start-tag rather than defaulted. Each attribute/value pair counts as 1; thus the number of entries in the array is XML_GetSpecifiedAttributeCount(parser) / 2.
enum XML_Status XMLCALL
XML_SetEncoding(XML_Parser p,
                const XML_Char *encoding);
Set the encoding to be used by the parser. It is equivalent to passing a non-null encoding argument to the parser creation functions. It must not be called after XML_Parse or XML_ParseBuffer have been called on the given parser. Returns XML_STATUS_OK on success or XML_STATUS_ERROR on error.
int XMLCALL
XML_SetParamEntityParsing(XML_Parser p,
                          enum XML_ParamEntityParsing code);
This enables parsing of parameter entities, including the external parameter entity that is the external DTD subset, according to code. The choices for code are:
  • XML_PARAM_ENTITY_PARSING_NEVER
  • XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE
  • XML_PARAM_ENTITY_PARSING_ALWAYS
Note: If XML_SetParamEntityParsing is called after XML_Parse or XML_ParseBuffer, then it has no effect and will always return 0.
int XMLCALL
XML_SetHashSalt(XML_Parser p,
                unsigned long hash_salt);
Sets the hash salt to use for internal hash calculations. Helps in preventing DoS attacks based on predicting hash function behavior. In order to have an effect this must be called before parsing has started. Returns 1 if successful, 0 when called after XML_Parse or XML_ParseBuffer.

Note: This call is optional, as the parser will auto-generate a new random salt value if no value has been set at the start of parsing.

enum XML_Error XMLCALL
XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD);

This function allows an application to provide an external subset for the document type declaration for documents which do not specify an external subset of their own. For documents which specify an external subset in their DOCTYPE declaration, the application-provided subset will be ignored. If the document does not contain a DOCTYPE declaration at all and useDTD is true, the application-provided subset will be parsed, but the startDoctypeDeclHandler and endDoctypeDeclHandler functions, if set, will not be called. The setting of parameter entity parsing, controlled using XML_SetParamEntityParsing, will be honored.

The application-provided external subset is read by calling the external entity reference handler set via XML_SetExternalEntityRefHandler with both publicId and systemId set to NULL.

If this function is called after parsing has begun, it returns XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING and ignores useDTD. If called when Expat has been compiled without DTD support, it returns XML_ERROR_FEATURE_REQUIRES_XML_DTD. Otherwise, it returns XML_ERROR_NONE.

Note: For the purpose of checking WFC: Entity Declared, passing useDTD == XML_TRUE will make the parser behave as if the document had a DTD with an external subset. This holds true even if the external entity reference handler returns without action.

void XMLCALL
XML_SetReturnNSTriplet(XML_Parser parser,
                       int        do_nst);

This function only has an effect when using a parser created with XML_ParserCreateNS, i.e. when namespace processing is in effect. The do_nst sets whether or not prefixes are returned with names qualified with a namespace prefix. If this function is called with do_nst non-zero, then afterwards namespace qualified names (that is qualified with a prefix as opposed to belonging to a default namespace) are returned as a triplet with the three parts separated by the namespace separator specified when the parser was created. The order of returned parts is URI, local name, and prefix.

If do_nst is zero, then namespaces are reported in the default manner, URI then local_name separated by the namespace separator.

void XMLCALL
XML_DefaultCurrent(XML_Parser parser);
This can be called within a handler for a start element, end element, processing instruction or character data. It causes the corresponding markup to be passed to the default handler set by XML_SetDefaultHandler or XML_SetDefaultHandlerExpand. It does nothing if there is not a default handler.
XML_LChar * XMLCALL
XML_ExpatVersion();
Return the library version as a string (e.g. "expat_1.95.1").
struct XML_Expat_Version XMLCALL
XML_ExpatVersionInfo();
typedef struct {
  int major;
  int minor;
  int micro;
} XML_Expat_Version;
Return the library version information as a structure. Some macros are also defined that support compile-time tests of the library version:
  • XML_MAJOR_VERSION
  • XML_MINOR_VERSION
  • XML_MICRO_VERSION
Testing these constants is currently the best way to determine if particular parts of the Expat API are available.
const XML_Feature * XMLCALL
XML_GetFeatureList();
enum XML_FeatureEnum {
  XML_FEATURE_END = 0,
  XML_FEATURE_UNICODE,
  XML_FEATURE_UNICODE_WCHAR_T,
  XML_FEATURE_DTD,
  XML_FEATURE_CONTEXT_BYTES,
  XML_FEATURE_MIN_SIZE,
  XML_FEATURE_SIZEOF_XML_CHAR,
  XML_FEATURE_SIZEOF_XML_LCHAR,
  XML_FEATURE_NS,
  XML_FEATURE_LARGE_SIZE
};

typedef struct {
  enum XML_FeatureEnum  feature;
  XML_LChar            *name;
  long int              value;
} XML_Feature;

Returns a list of "feature" records, providing details on how Expat was configured at compile time. Most applications should not need to worry about this, but this information is otherwise not available from Expat. This function allows code that does need to check these features to do so at runtime.

The return value is an array of XML_Feature, terminated by a record with a feature of XML_FEATURE_END and name of NULL, identifying the feature-test macros Expat was compiled with. Since an application that requires this kind of information needs to determine the type of character the name points to, records for the XML_FEATURE_SIZEOF_XML_CHAR and XML_FEATURE_SIZEOF_XML_LCHAR will be located at the beginning of the list, followed by XML_FEATURE_UNICODE and XML_FEATURE_UNICODE_WCHAR_T, if they are present at all.

Some features have an associated value. If there isn't an associated value, the value field is set to 0. At this time, the following features have been defined to have values:

XML_FEATURE_SIZEOF_XML_CHAR
The number of bytes occupied by one XML_Char character.
XML_FEATURE_SIZEOF_XML_LCHAR
The number of bytes occupied by one XML_LChar character.
XML_FEATURE_CONTEXT_BYTES
The maximum number of characters of context which can be reported by XML_GetInputContext.
void XMLCALL
XML_FreeContentModel(XML_Parser parser, XML_Content *model);
Function to deallocate the model argument passed to the XML_ElementDeclHandler callback set using XML_ElementDeclHandler. This function should not be used for any other purpose.

The following functions allow external code to share the memory allocator an XML_Parser has been configured to use. This is especially useful for third-party libraries that interact with a parser object created by application code, or heavily layered applications. This can be essential when using dynamically loaded libraries which use different C standard libraries (this can happen on Windows, at least).

void * XMLCALL
XML_MemMalloc(XML_Parser parser, size_t size);
Allocate size bytes of memory using the allocator the parser object has been configured to use. Returns a pointer to the memory or NULL on failure. Memory allocated in this way must be freed using XML_MemFree.
void * XMLCALL
XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);
Allocate size bytes of memory using the allocator the parser object has been configured to use. ptr must point to a block of memory allocated by XML_MemMalloc or XML_MemRealloc, or be NULL. This function tries to expand the block pointed to by ptr if possible. Returns a pointer to the memory or NULL on failure. On success, the original block has either been expanded or freed. On failure, the original block has not been freed; the caller is responsible for freeing the original block. Memory allocated in this way must be freed using XML_MemFree.
void XMLCALL
XML_MemFree(XML_Parser parser, void *ptr);
Free a block of memory pointed to by ptr. The block must have been allocated by XML_MemMalloc or XML_MemRealloc, or be NULL.

Valid XHTML 1.0!

astropy-1.1.1/cextern/expat/expat_config.h.cmake0000755001134200020070000000525712602615516022626 0ustar embrayscience00000000000000/* expat_config.h.in. Generated from configure.in by autoheader. */ /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ #cmakedefine BYTEORDER @BYTEORDER@ /* Define to 1 if you have the `bcopy' function. */ #cmakedefine HAVE_BCOPY /* Define to 1 if you have the header file. */ #cmakedefine HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #cmakedefine HAVE_FCNTL_H /* Define to 1 if you have the `getpagesize' function. */ #cmakedefine HAVE_GETPAGESIZE /* Define to 1 if you have the header file. */ #cmakedefine HAVE_INTTYPES_H /* Define to 1 if you have the `memmove' function. */ #cmakedefine HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #cmakedefine HAVE_MEMORY_H /* Define to 1 if you have a working `mmap' system call. */ #cmakedefine HAVE_MMAP /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STDINT_H /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STRING_H /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #cmakedefine HAVE_UNISTD_H /* Define to the address where bug reports for this package should be sent. */ #cmakedefine PACKAGE_BUGREPORT /* Define to the full name of this package. */ #cmakedefine PACKAGE_NAME /* Define to the full name and version of this package. */ #cmakedefine PACKAGE_STRING /* Define to the one symbol short name of this package. */ #cmakedefine PACKAGE_TARNAME /* Define to the version of this package. */ #cmakedefine PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #cmakedefine STDC_HEADERS /* whether byteorder is bigendian */ #cmakedefine WORDS_BIGENDIAN /* Define to specify how much context to retain around the current parse point. */ #cmakedefine XML_CONTEXT_BYTES @XML_CONTEXT_BYTES@ /* Define to make parameter entity parsing functionality available. */ #cmakedefine XML_DTD /* Define to make XML Namespaces functionality available. */ #cmakedefine XML_NS /* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */ #ifdef _MSC_VER # define __func__ __FUNCTION__ #endif /* Define to `long' if does not define. */ #cmakedefine off_t @OFF_T@ /* Define to `unsigned' if does not define. */ #cmakedefine size_t @SIZE_T@ astropy-1.1.1/cextern/expat/aclocal.m40000644001134200020070000112267112602615516020566 0ustar embrayscience00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3293 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4]) m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4' macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) astropy-1.1.1/cextern/expat/vms/0000755001134200020070000000000012644022135017514 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/vms/descrip.mms0000755001134200020070000000404012602615516021671 0ustar embrayscience00000000000000# Bare bones description file (Makefile) for OpenVMS PACKAGE = expat VERSION = 1.95.8 EXPAT_MAJOR_VERSION=1 EXPAT_MINOR_VERSION=95 EXPAT_EDIT=8 O = .obj OLB = .olb LIBRARY = expat$(OLB) LIBDIR = [.lib] SOURCES = $(LIBDIR)xmlparse.c $(LIBDIR)xmltok.c $(LIBDIR)xmlrole.c OBJECTS = xmlparse$(O) xmltok$(O) xmlrole$(O) TEMPLATES = xmltok_impl.c xmltok_ns.c APIHEADER = $(LIBDIR)expat.h HEADERS = $(LIBDIR)ascii.h $(LIBDIR)iasciitab.h $(LIBDIR)utf8tab.h $(LIBDIR)xmltok.h \ $(LIBDIR)asciitab.h $(LIBDIR)latin1tab.h \ $(LIBDIR)nametab.h $(LIBDIR)xmldef.h $(LIBDIR)xmlrole.h $(LIBDIR)xmltok_impl.h CONFIG_HEADER = expat_config.h INCLUDES = /INCLUDE=([],[.lib]) DEFS = /DEFINE=(PACKAGE="""$(PACKAGE)""",VERSION="""$(PACKAGE)_$(VERSION)""",HAVE_EXPAT_CONFIG_H) LIBREVISION = 0 LIBCURRENT = 1 LIBAGE = 0 # COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) # # DISTFILES = $(DIST_COMMON) $(SOURCES) $(TEMPLATES) $(APIHEADER) $(HEADERS) # # TAR = gtar # GZIP_ENV = --best # .FIRST : IF F$SEARCH("$(LIBRARY)") .EQS. "" THEN $(LIBR) /CREATE /OBJECT $(LIBRARY) all : $(LIBRARY) @ write sys$output "All made." .SUFFIXES : .SUFFIXES : $(OLB) $(O) .C .H .c$(O) : $(COMPILE) $(MMS$SOURCE) $(O)$(OLB) : @ IF F$SEARCH("$(MMS$TARGET)") .EQS. "" - THEN LIBRARY/CREATE/LOG $(MMS$TARGET) @ LIBRARY /REPLACE /LOG $(MMS$TARGET) $(MMS$SOURCE) clean : DELETE $(LIBRARY);*,*$(O);* $(LIBRARY) : $(LIBRARY)( $(OBJECTS) ) $(LIBR) /COMPRESS $(MMS$TARGET) $(CONFIG_HEADER) : [.vms]expat_config.h COPY/LOG $(MMS$SOURCE) $(MMS$TARGET) xmlparse$(O) : $(LIBDIR)xmlparse.c $(LIBDIR)expat.h $(LIBDIR)xmlrole.h $(LIBDIR)xmltok.h $(CONFIG_HEADER) xmlrole$(O) : $(LIBDIR)xmlrole.c $(LIBDIR)ascii.h $(LIBDIR)xmlrole.h $(CONFIG_HEADER) xmltok$(O) : $(LIBDIR)xmltok.c $(LIBDIR)xmltok_impl.c $(LIBDIR)xmltok_ns.c \ $(LIBDIR)ascii.h $(LIBDIR)asciitab.h $(LIBDIR)iasciitab.h $(LIBDIR)latin1tab.h \ $(LIBDIR)nametab.h $(LIBDIR)utf8tab.h $(LIBDIR)xmltok.h $(LIBDIR)xmltok_impl.h $(CONFIG_HEADER) astropy-1.1.1/cextern/expat/vms/expat_config.h0000755001134200020070000000225712602615516022351 0ustar embrayscience00000000000000/* Copyright 2000, Clark Cooper All rights reserved. This is free software. You are permitted to copy, distribute, or modify it under the terms of the MIT/X license (contained in the COPYING file with this distribution.) */ /* Define to empty if the keyword does not work. */ #undef const /* Define if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to `long' if doesn't define. */ #undef off_t /* Define to `unsigned' if doesn't define. */ #undef size_t /* Define if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN /* Define if you have the bcopy function. */ #undef HAVE_BCOPY /* Define if you have the memmove function. */ #define HAVE_MEMMOVE 1 /* Define if you have the header file. */ #define HAVE_UNISTD_H 1 #define XML_NS #define XML_DTD #ifdef WORDS_BIGENDIAN #define XML_BYTE_ORDER 21 #else #define XML_BYTE_ORDER 12 #endif #define XML_CONTEXT_BYTES 1024 #ifndef HAVE_MEMMOVE #ifdef HAVE_BCOPY #define memmove(d,s,l) bcopy((s),(d),(l)) #else #define memmove(d,s,l) ;punting on memmove; #endif #endif astropy-1.1.1/cextern/expat/vms/README.vms0000755001134200020070000000110012602615516021200 0ustar embrayscience000000000000004-jun-2002 Craig A. Berry Added rudimentary build procedures for OpenVMS based on work by Martin Vorlaender. You'll need MMS or its freeware equivalent MMK. Just go to the top-level directory and type $ MMS/DESCRIPTION=[.vms] or $ MMK/DESCRIPTION=[.vms] You'll end up with the object library expat.olb. For now, installation consists merely of copying the object library, include files, and documentation to a suitable location. To-do list: -- create a shareable image -- build and run the tests and build the xmlwf utility -- create an install target astropy-1.1.1/cextern/expat/amiga/0000755001134200020070000000000012644022135017765 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/amiga/launch.c0000755001134200020070000000332012602615516021411 0ustar embrayscience00000000000000/* ** Copyright (c) 2001-2009 Expat maintainers. ** ** Permission is hereby granted, free of charge, to any person obtaining ** a copy of this software and associated documentation files (the ** "Software"), to deal in the Software without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Software, and to ** permit persons to whom the Software is furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Software. ** ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef __USE_INLINE__ #undef __USE_INLINE__ #endif #include #include struct Library* ExpatBase = 0; struct ExpatIFace* IExpat = 0; void setup() __attribute__((constructor)); void cleanup() __attribute__((destructor)); void setup() { ExpatBase = IExec->OpenLibrary("expat.library", 53); IExpat = (struct ExpatIFace*)IExec->GetInterface(ExpatBase, "main", 1, NULL); if ( IExpat == 0 ) { IExec->DebugPrintF("Can't open expat.library\n"); } } void cleanup() { IExec->DropInterface((struct Interface*)IExpat); IExpat = 0; IExec->CloseLibrary(ExpatBase); ExpatBase = 0; } astropy-1.1.1/cextern/expat/amiga/expat_68k.h0000755001134200020070000001004512602615516021757 0ustar embrayscience00000000000000/* ** Copyright (c) 2001-2009 Expat maintainers. ** ** Permission is hereby granted, free of charge, to any person obtaining ** a copy of this software and associated documentation files (the ** "Software"), to deal in the Software without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Software, and to ** permit persons to whom the Software is furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Software. ** ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef EXPAT_68K_H #define EXPAT_68K_H #ifndef LIBRARIES_EXPAT_H #include #endif typedef struct M68kXML_ParserStruct { XML_Parser p; struct ExecIFace *IExec; void *handlerarg; void *extenthandlerarg; void *enchandlerarg; void *startelementhandler; void *endelementhandler; void *chardatahandler; void *procinsthandler; void *commenthandler; void *startcdatahandler; void *endcdatahandler; void *defaulthandler; void *defaulthandlerexp; void *extentrefhandler; void *unknownenchandler; void *startnamespacehandler; void *endnamespacehandler; void *xmldeclhandler; void *startdoctypehandler; void *enddoctypehandler; void *elementdeclhandler; void *attlistdeclhandler; void *entitydeclhandler; void *unparseddeclhandler; void *notationdeclhandler; void *notstandalonehandler; void *skippedentityhandler; } *M68kXML_Parser; /* expat_68k_handler_stubs.c */ void _68k_startelementhandler(void *userdata, const char *name, const char **attrs); void _68k_endelementhandler(void *userdata, const char *name); void _68k_chardatahandler(void *userdata, const char *s, int len); void _68k_procinsthandler(void *userdata, const char *target, const char *data); void _68k_commenthandler(void *userdata, const char *data); void _68k_startcdatahandler(void *userdata); void _68k_endcdatahandler(void *userdata); void _68k_defaulthandler(void *userdata, const char *s, int len); void _68k_defaulthandlerexp(void *userdata, const char *s, int len); int _68k_extentrefhandler(XML_Parser parser, const char *context, const char *base, const char *sysid, const char *pubid); int _68k_unknownenchandler(void *enchandlerdata, const char *name, XML_Encoding *info); void _68k_startnamespacehandler(void *userdata, const char *prefix, const char *uri); void _68k_endnamespacehandler(void *userdata, const char *prefix); void _68k_xmldeclhandler(void *userdata, const char *version, const char *encoding, int standalone); void _68k_startdoctypehandler(void *userdata, const char *doctypename, const char *sysid, const char *pubid, int has_internal_subset); void _68k_enddoctypehandler(void *userdata); void _68k_elementdeclhandler(void *userdata, const char *name, XML_Content *model); void _68k_attlistdeclhandler(void *userdata, const char *elname, const char *attname, const char *att_type, const char *dflt, int isrequired); void _68k_entitydeclhandler(void *userdata, const char *entityname, int is_param_entity, const char *value, int value_length, const char *base, const char *sysid, const char *pubid, const char *notationname); void _68k_unparseddeclhandler(void *userdata, const char *entityname, const char *base, const char *sysid, const char *pubid, const char *notationname); void _68k_notationdeclhandler(void *userdata, const char *notationname, const char *base, const char *sysid, const char *pubid); int _68k_notstandalonehandler(void *userdata); void _68k_skippedentityhandler(void *userdata, const char *entityname, int is_param_entity); #endif astropy-1.1.1/cextern/expat/amiga/expat_68k.c0000644001134200020070000012202012602615516021744 0ustar embrayscience00000000000000/* ** Copyright (c) 2001-2009 Expat maintainers. ** ** Permission is hereby granted, free of charge, to any person obtaining ** a copy of this software and associated documentation files (the ** "Software"), to deal in the Software without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Software, and to ** permit persons to whom the Software is furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Software. ** ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* ** Note: This file was originally automatically generated by fdtrans. */ #ifdef __USE_INLINE__ #undef __USE_INLINE__ #endif #include #include #include #include #include #include "expat_68k.h" #include "expat_base.h" STATIC ULONG stub_OpenPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct LibraryManagerInterface *Self = (struct LibraryManagerInterface *) ExtLib->ILibrary; return (ULONG) Self->Open(0); } struct EmuTrap stub_Open = { TRAPINST, TRAPTYPE, stub_OpenPPC }; STATIC ULONG stub_ClosePPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct LibraryManagerInterface *Self = (struct LibraryManagerInterface *) ExtLib->ILibrary; return (ULONG) Self->Close(); } struct EmuTrap stub_Close = { TRAPINST, TRAPTYPE, stub_ClosePPC }; STATIC ULONG stub_ExpungePPC(ULONG *regarray) { return 0UL; } struct EmuTrap stub_Expunge = { TRAPINST, TRAPTYPE, stub_ExpungePPC }; STATIC ULONG stub_ReservedPPC(ULONG *regarray) { return 0UL; } struct EmuTrap stub_Reserved = { TRAPINST, TRAPTYPE, stub_ReservedPPC }; static M68kXML_Parser stub_XML_ParserCreatePPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec; M68kXML_Parser p; p = IExec->AllocVec(sizeof(*p), MEMF_SHARED|MEMF_CLEAR); if (p) { p->p = Self->XML_ParserCreate((const XML_Char *)regarray[8]); if (p->p) { p->IExec = IExec; Self->XML_SetUserData(p->p, p); return p; } IExec->FreeVec(p); } return NULL; } struct EmuTrap stub_XML_ParserCreate = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserCreatePPC }; static M68kXML_Parser stub_XML_ParserCreateNSPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec; M68kXML_Parser p; p = IExec->AllocVec(sizeof(*p), MEMF_SHARED|MEMF_CLEAR); if (p) { p->p = Self->XML_ParserCreateNS((const XML_Char *)regarray[8], (XML_Char)regarray[0]); if (p->p) { p->IExec = IExec; Self->XML_SetUserData(p->p, p); return p; } IExec->FreeVec(p); } return NULL; } struct EmuTrap stub_XML_ParserCreateNS = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserCreateNSPPC }; static M68kXML_Parser stub_XML_ParserCreate_MMPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec; M68kXML_Parser p; p = IExec->AllocVec(sizeof(*p), MEMF_SHARED|MEMF_CLEAR); if (p) { p->p = Self->XML_ParserCreate_MM((const XML_Char *)regarray[8], (const XML_Memory_Handling_Suite *)regarray[9], (const XML_Char *)regarray[10]); if (p->p) { p->IExec = IExec; Self->XML_SetUserData(p->p, p); return p; } IExec->FreeVec(p); } return NULL; } struct EmuTrap stub_XML_ParserCreate_MM = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserCreate_MMPPC }; static M68kXML_Parser stub_XML_ExternalEntityParserCreatePPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec; M68kXML_Parser p; p = IExec->AllocVec(sizeof(*p), MEMF_SHARED|MEMF_CLEAR); if (p) { p->p = Self->XML_ExternalEntityParserCreate((XML_Parser)regarray[8], (const XML_Char *)regarray[9], (const XML_Char *)regarray[10]); if (p->p) { p->IExec = IExec; Self->XML_SetUserData(p->p, p); return p; } IExec->FreeVec(p); } return NULL; } struct EmuTrap stub_XML_ExternalEntityParserCreate = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ExternalEntityParserCreatePPC }; static void stub_XML_ParserFreePPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; if (p) { Self->XML_ParserFree(p->p); IExec->FreeVec(p); } } struct EmuTrap stub_XML_ParserFree = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserFreePPC }; static int stub_XML_ParsePPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; Self->XML_SetUserData(p->p, p); return Self->XML_Parse(p->p, (const char *)regarray[9], (int)regarray[0], (int)regarray[1]); } struct EmuTrap stub_XML_Parse = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParsePPC }; static int stub_XML_ParseBufferPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_ParseBuffer(p->p, (int)regarray[0], (int)regarray[1]); } struct EmuTrap stub_XML_ParseBuffer = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParseBufferPPC }; static void * stub_XML_GetBufferPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_GetBuffer(p->p, (int)regarray[0]); } struct EmuTrap stub_XML_GetBuffer = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetBufferPPC }; static void stub_XML_SetStartElementHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->startelementhandler = (void *)regarray[9]; Self->XML_SetStartElementHandler(p->p, _68k_startelementhandler); } struct EmuTrap stub_XML_SetStartElementHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetStartElementHandlerPPC }; static void stub_XML_SetEndElementHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->endelementhandler = (void *)regarray[9]; Self->XML_SetEndElementHandler(p->p, _68k_endelementhandler); } struct EmuTrap stub_XML_SetEndElementHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEndElementHandlerPPC }; static void stub_XML_SetElementHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->startelementhandler = (void *)regarray[9]; p->endelementhandler = (void *)regarray[10]; Self->XML_SetElementHandler(p->p, _68k_startelementhandler, _68k_endelementhandler); } struct EmuTrap stub_XML_SetElementHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetElementHandlerPPC }; static void stub_XML_SetCharacterDataHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->chardatahandler = (void *)regarray[9]; Self->XML_SetCharacterDataHandler(p->p, _68k_chardatahandler); } struct EmuTrap stub_XML_SetCharacterDataHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetCharacterDataHandlerPPC }; static void stub_XML_SetProcessingInstructionHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->procinsthandler = (void *)regarray[9]; Self->XML_SetProcessingInstructionHandler(p->p, _68k_procinsthandler); } struct EmuTrap stub_XML_SetProcessingInstructionHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetProcessingInstructionHandlerPPC }; static void stub_XML_SetCommentHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->commenthandler = (void *)regarray[9]; Self->XML_SetCommentHandler(p->p, _68k_commenthandler); } struct EmuTrap stub_XML_SetCommentHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetCommentHandlerPPC }; static void stub_XML_SetStartCdataSectionHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->startcdatahandler = (void *)regarray[9]; Self->XML_SetStartCdataSectionHandler(p->p, _68k_startcdatahandler); } struct EmuTrap stub_XML_SetStartCdataSectionHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetStartCdataSectionHandlerPPC }; static void stub_XML_SetEndCdataSectionHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->endcdatahandler = (void *)regarray[9]; Self->XML_SetEndCdataSectionHandler(p->p, _68k_endcdatahandler); } struct EmuTrap stub_XML_SetEndCdataSectionHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEndCdataSectionHandlerPPC }; static void stub_XML_SetCdataSectionHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->startcdatahandler = (void *)regarray[9]; p->endcdatahandler = (void *)regarray[10]; Self->XML_SetCdataSectionHandler(p->p, _68k_startcdatahandler, _68k_endcdatahandler); } struct EmuTrap stub_XML_SetCdataSectionHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetCdataSectionHandlerPPC }; static void stub_XML_SetDefaultHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->defaulthandler = (void *)regarray[9]; Self->XML_SetDefaultHandler(p->p, _68k_defaulthandler); } struct EmuTrap stub_XML_SetDefaultHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetDefaultHandlerPPC }; static void stub_XML_SetDefaultHandlerExpandPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->defaulthandlerexp = (void *)regarray[9]; Self->XML_SetDefaultHandlerExpand(p->p, _68k_defaulthandlerexp); } struct EmuTrap stub_XML_SetDefaultHandlerExpand = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetDefaultHandlerExpandPPC }; static void stub_XML_SetExternalEntityRefHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->extentrefhandler = (void *)regarray[9]; Self->XML_SetExternalEntityRefHandler(p->p, _68k_extentrefhandler); } struct EmuTrap stub_XML_SetExternalEntityRefHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetExternalEntityRefHandlerPPC }; static void stub_XML_SetExternalEntityRefHandlerArgPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->extenthandlerarg = (void *)regarray[9]; } struct EmuTrap stub_XML_SetExternalEntityRefHandlerArg = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetExternalEntityRefHandlerArgPPC }; static void stub_XML_SetUnknownEncodingHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->unknownenchandler = (void *)regarray[9]; p->enchandlerarg = (void *)regarray[10]; Self->XML_SetUnknownEncodingHandler(p->p, _68k_unknownenchandler, p); } struct EmuTrap stub_XML_SetUnknownEncodingHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetUnknownEncodingHandlerPPC }; static void stub_XML_SetStartNamespaceDeclHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->startnamespacehandler = (void *)regarray[9]; Self->XML_SetStartNamespaceDeclHandler(p->p, _68k_startnamespacehandler); } struct EmuTrap stub_XML_SetStartNamespaceDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetStartNamespaceDeclHandlerPPC }; static void stub_XML_SetEndNamespaceDeclHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->endnamespacehandler = (void *)regarray[9]; Self->XML_SetEndNamespaceDeclHandler(p->p, _68k_endnamespacehandler); } struct EmuTrap stub_XML_SetEndNamespaceDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEndNamespaceDeclHandlerPPC }; static void stub_XML_SetNamespaceDeclHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->startnamespacehandler = (void *)regarray[9]; p->endnamespacehandler = (void *)regarray[10]; Self->XML_SetNamespaceDeclHandler(p->p, _68k_startnamespacehandler, _68k_endnamespacehandler); } struct EmuTrap stub_XML_SetNamespaceDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetNamespaceDeclHandlerPPC }; static void stub_XML_SetXmlDeclHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->xmldeclhandler = (void *)regarray[9]; Self->XML_SetXmlDeclHandler(p->p, _68k_xmldeclhandler); } struct EmuTrap stub_XML_SetXmlDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetXmlDeclHandlerPPC }; static void stub_XML_SetStartDoctypeDeclHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->startdoctypehandler = (void *)regarray[9]; Self->XML_SetStartDoctypeDeclHandler(p->p, _68k_startdoctypehandler); } struct EmuTrap stub_XML_SetStartDoctypeDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetStartDoctypeDeclHandlerPPC }; static void stub_XML_SetEndDoctypeDeclHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->enddoctypehandler = (void *)regarray[9]; Self->XML_SetEndDoctypeDeclHandler(p->p, _68k_enddoctypehandler); } struct EmuTrap stub_XML_SetEndDoctypeDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEndDoctypeDeclHandlerPPC }; static void stub_XML_SetDoctypeDeclHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->startdoctypehandler = (void *)regarray[9]; p->enddoctypehandler = (void *)regarray[10]; Self->XML_SetDoctypeDeclHandler(p->p, _68k_startdoctypehandler, _68k_enddoctypehandler); } struct EmuTrap stub_XML_SetDoctypeDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetDoctypeDeclHandlerPPC }; static void stub_XML_SetElementDeclHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->elementdeclhandler = (void *)regarray[9]; Self->XML_SetElementDeclHandler(p->p, _68k_elementdeclhandler); } struct EmuTrap stub_XML_SetElementDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetElementDeclHandlerPPC }; static void stub_XML_SetAttlistDeclHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->attlistdeclhandler = (void *)regarray[9]; Self->XML_SetAttlistDeclHandler(p->p, _68k_attlistdeclhandler); } struct EmuTrap stub_XML_SetAttlistDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetAttlistDeclHandlerPPC }; static void stub_XML_SetEntityDeclHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->entitydeclhandler = (void *)regarray[9]; Self->XML_SetEntityDeclHandler(p->p, _68k_entitydeclhandler); } struct EmuTrap stub_XML_SetEntityDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEntityDeclHandlerPPC }; static void stub_XML_SetUnparsedEntityDeclHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->unparseddeclhandler = (void *)regarray[9]; Self->XML_SetUnparsedEntityDeclHandler(p->p, _68k_unparseddeclhandler); } struct EmuTrap stub_XML_SetUnparsedEntityDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetUnparsedEntityDeclHandlerPPC }; static void stub_XML_SetNotationDeclHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->notationdeclhandler = (void *)regarray[9]; Self->XML_SetNotationDeclHandler(p->p, _68k_notationdeclhandler); } struct EmuTrap stub_XML_SetNotationDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetNotationDeclHandlerPPC }; static void stub_XML_SetNotStandaloneHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->notstandalonehandler = (void *)regarray[9]; Self->XML_SetNotStandaloneHandler(p->p, _68k_notstandalonehandler); } struct EmuTrap stub_XML_SetNotStandaloneHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetNotStandaloneHandlerPPC }; static int stub_XML_GetErrorCodePPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_GetErrorCode(p->p); } struct EmuTrap stub_XML_GetErrorCode = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetErrorCodePPC }; static const XML_LChar * stub_XML_ErrorStringPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; return Self->XML_ErrorString((int)regarray[0]); } struct EmuTrap stub_XML_ErrorString = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ErrorStringPPC }; static long stub_XML_GetCurrentByteIndexPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_GetCurrentByteIndex(p->p); } struct EmuTrap stub_XML_GetCurrentByteIndex = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetCurrentByteIndexPPC }; static int stub_XML_GetCurrentLineNumberPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_GetCurrentLineNumber(p->p); } struct EmuTrap stub_XML_GetCurrentLineNumber = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetCurrentLineNumberPPC }; static int stub_XML_GetCurrentColumnNumberPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_GetCurrentColumnNumber(p->p); } struct EmuTrap stub_XML_GetCurrentColumnNumber = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetCurrentColumnNumberPPC }; static int stub_XML_GetCurrentByteCountPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_GetCurrentByteCount(p->p); } struct EmuTrap stub_XML_GetCurrentByteCount = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetCurrentByteCountPPC }; static const char * stub_XML_GetInputContextPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_GetInputContext(p->p, (int *)regarray[9], (int *)regarray[10]); } struct EmuTrap stub_XML_GetInputContext = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetInputContextPPC }; static void stub_XML_SetUserDataPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->handlerarg = (void *)regarray[9]; } struct EmuTrap stub_XML_SetUserData = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetUserDataPPC }; static void stub_XML_DefaultCurrentPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; Self->XML_DefaultCurrent(p->p); } struct EmuTrap stub_XML_DefaultCurrent = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_DefaultCurrentPPC }; static void stub_XML_UseParserAsHandlerArgPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->handlerarg = p; } struct EmuTrap stub_XML_UseParserAsHandlerArg = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_UseParserAsHandlerArgPPC }; static int stub_XML_SetBasePPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_SetBase(p->p, (const XML_Char *)regarray[9]); } struct EmuTrap stub_XML_SetBase = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetBasePPC }; static const XML_Char * stub_XML_GetBasePPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_GetBase(p->p); } struct EmuTrap stub_XML_GetBase = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetBasePPC }; static int stub_XML_GetSpecifiedAttributeCountPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_GetSpecifiedAttributeCount(p->p); } struct EmuTrap stub_XML_GetSpecifiedAttributeCount = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetSpecifiedAttributeCountPPC }; static int stub_XML_GetIdAttributeIndexPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_GetIdAttributeIndex(p->p); } struct EmuTrap stub_XML_GetIdAttributeIndex = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetIdAttributeIndexPPC }; static int stub_XML_SetEncodingPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_SetEncoding(p->p, (const XML_Char *)regarray[9]); } struct EmuTrap stub_XML_SetEncoding = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEncodingPPC }; static int stub_XML_SetParamEntityParsingPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_SetParamEntityParsing(p->p, (enum XML_ParamEntityParsing)regarray[9]); } struct EmuTrap stub_XML_SetParamEntityParsing = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetParamEntityParsingPPC }; static void stub_XML_SetReturnNSTripletPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; Self->XML_SetReturnNSTriplet(p->p, (int)regarray[0]); } struct EmuTrap stub_XML_SetReturnNSTriplet = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetReturnNSTripletPPC }; static const XML_LChar * stub_XML_ExpatVersionPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; return Self->XML_ExpatVersion(); } struct EmuTrap stub_XML_ExpatVersion = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ExpatVersionPPC }; static XML_Expat_Version stub_XML_ExpatVersionInfoPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; return Self->XML_ExpatVersionInfo(); } struct EmuTrap stub_XML_ExpatVersionInfo = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ExpatVersionInfoPPC }; static int stub_XML_ParserResetPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_ParserReset(p->p, (const XML_Char *)regarray[9]); } struct EmuTrap stub_XML_ParserReset = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserResetPPC }; static void stub_XML_SetSkippedEntityHandlerPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; p->skippedentityhandler = (void *)regarray[9]; Self->XML_SetSkippedEntityHandler(p->p, _68k_skippedentityhandler); } struct EmuTrap stub_XML_SetSkippedEntityHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetSkippedEntityHandlerPPC }; static int stub_XML_UseForeignDTDPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_UseForeignDTD(p->p, (XML_Bool)regarray[0]); } struct EmuTrap stub_XML_UseForeignDTD = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_UseForeignDTDPPC }; static const XML_Feature * stub_XML_GetFeatureListPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; return Self->XML_GetFeatureList(); } struct EmuTrap stub_XML_GetFeatureList = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetFeatureListPPC }; static int stub_XML_StopParserPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_StopParser(p->p, (XML_Bool)regarray[0]); } struct EmuTrap stub_XML_StopParser = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_StopParserPPC }; static int stub_XML_ResumeParserPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_ResumeParser(p->p); } struct EmuTrap stub_XML_ResumeParser = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ResumeParserPPC }; static void stub_XML_GetParsingStatusPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; Self->XML_GetParsingStatus(p->p, (XML_ParsingStatus *)regarray[9]); } struct EmuTrap stub_XML_GetParsingStatus = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetParsingStatusPPC }; static void stub_XML_FreeContentModelPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; Self->XML_FreeContentModel(p->p, (XML_Content *)regarray[9]); } struct EmuTrap stub_XML_FreeContentModel = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_FreeContentModelPPC }; static void *stub_XML_MemMallocPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_MemMalloc(p->p, (size_t)regarray[0]); } struct EmuTrap stub_XML_MemMalloc = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_MemMallocPPC }; static void *stub_XML_MemReallocPPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; return Self->XML_MemRealloc(p->p, (void *)regarray[9], (size_t)regarray[0]); } struct EmuTrap stub_XML_MemRealloc = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_MemReallocPPC }; static void stub_XML_MemFreePPC(ULONG *regarray) { struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace; M68kXML_Parser p = (M68kXML_Parser)regarray[8]; Self->XML_MemFree(p->p, (void *)regarray[9]); } struct EmuTrap stub_XML_MemFree = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_MemFreePPC }; ULONG VecTable68K[] = { (ULONG)&stub_Open, (ULONG)&stub_Close, (ULONG)&stub_Expunge, (ULONG)&stub_Reserved, (ULONG)&stub_XML_ParserCreate, (ULONG)&stub_XML_ParserCreateNS, (ULONG)&stub_XML_ParserCreate_MM, (ULONG)&stub_XML_ExternalEntityParserCreate, (ULONG)&stub_XML_ParserFree, (ULONG)&stub_XML_Parse, (ULONG)&stub_XML_ParseBuffer, (ULONG)&stub_XML_GetBuffer, (ULONG)&stub_XML_SetStartElementHandler, (ULONG)&stub_XML_SetEndElementHandler, (ULONG)&stub_XML_SetElementHandler, (ULONG)&stub_XML_SetCharacterDataHandler, (ULONG)&stub_XML_SetProcessingInstructionHandler, (ULONG)&stub_XML_SetCommentHandler, (ULONG)&stub_XML_SetStartCdataSectionHandler, (ULONG)&stub_XML_SetEndCdataSectionHandler, (ULONG)&stub_XML_SetCdataSectionHandler, (ULONG)&stub_XML_SetDefaultHandler, (ULONG)&stub_XML_SetDefaultHandlerExpand, (ULONG)&stub_XML_SetExternalEntityRefHandler, (ULONG)&stub_XML_SetExternalEntityRefHandlerArg, (ULONG)&stub_XML_SetUnknownEncodingHandler, (ULONG)&stub_XML_SetStartNamespaceDeclHandler, (ULONG)&stub_XML_SetEndNamespaceDeclHandler, (ULONG)&stub_XML_SetNamespaceDeclHandler, (ULONG)&stub_XML_SetXmlDeclHandler, (ULONG)&stub_XML_SetStartDoctypeDeclHandler, (ULONG)&stub_XML_SetEndDoctypeDeclHandler, (ULONG)&stub_XML_SetDoctypeDeclHandler, (ULONG)&stub_XML_SetElementDeclHandler, (ULONG)&stub_XML_SetAttlistDeclHandler, (ULONG)&stub_XML_SetEntityDeclHandler, (ULONG)&stub_XML_SetUnparsedEntityDeclHandler, (ULONG)&stub_XML_SetNotationDeclHandler, (ULONG)&stub_XML_SetNotStandaloneHandler, (ULONG)&stub_XML_GetErrorCode, (ULONG)&stub_XML_ErrorString, (ULONG)&stub_XML_GetCurrentByteIndex, (ULONG)&stub_XML_GetCurrentLineNumber, (ULONG)&stub_XML_GetCurrentColumnNumber, (ULONG)&stub_XML_GetCurrentByteCount, (ULONG)&stub_XML_GetInputContext, (ULONG)&stub_XML_SetUserData, (ULONG)&stub_XML_DefaultCurrent, (ULONG)&stub_XML_UseParserAsHandlerArg, (ULONG)&stub_XML_SetBase, (ULONG)&stub_XML_GetBase, (ULONG)&stub_XML_GetSpecifiedAttributeCount, (ULONG)&stub_XML_GetIdAttributeIndex, (ULONG)&stub_XML_SetEncoding, (ULONG)&stub_XML_SetParamEntityParsing, (ULONG)&stub_XML_SetReturnNSTriplet, (ULONG)&stub_XML_ExpatVersion, (ULONG)&stub_XML_ExpatVersionInfo, (ULONG)&stub_XML_ParserReset, (ULONG)&stub_XML_SetSkippedEntityHandler, (ULONG)&stub_XML_UseForeignDTD, (ULONG)&stub_XML_GetFeatureList, (ULONG)&stub_XML_StopParser, (ULONG)&stub_XML_ResumeParser, (ULONG)&stub_XML_GetParsingStatus, (ULONG)&stub_XML_FreeContentModel, (ULONG)&stub_XML_MemMalloc, (ULONG)&stub_XML_MemRealloc, (ULONG)&stub_XML_MemFree, (ULONG)-1 }; astropy-1.1.1/cextern/expat/amiga/expat_lib.c0000755001134200020070000001331712602615516022115 0ustar embrayscience00000000000000/* ** Copyright (c) 2001-2009 Expat maintainers. ** ** Permission is hereby granted, free of charge, to any person obtaining ** a copy of this software and associated documentation files (the ** "Software"), to deal in the Software without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Software, and to ** permit persons to whom the Software is furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Software. ** ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef __USE_INLINE__ #undef __USE_INLINE__ #endif #define __NOLIBBASE__ #define __NOGLOBALIFACE__ #include #include #include "expat_base.h" #define LIBNAME "expat.library" #define LIBPRI 0 #define VERSION 53 #define REVISION 1 #define VSTRING "expat.library 53.1 (7.8.2009)" /* dd.mm.yyyy */ static const char* __attribute__((used)) verstag = "\0$VER: " VSTRING; struct Interface *INewlib = 0; struct ExpatBase * libInit(struct ExpatBase *libBase, BPTR seglist, struct ExecIFace *ISys); uint32 libObtain (struct LibraryManagerInterface *Self); uint32 libRelease (struct LibraryManagerInterface *Self); struct ExpatBase *libOpen (struct LibraryManagerInterface *Self, uint32 version); BPTR libClose (struct LibraryManagerInterface *Self); BPTR libExpunge (struct LibraryManagerInterface *Self); struct Interface *openInterface(struct ExecIFace *IExec, CONST_STRPTR libName, uint32 libVer); void closeInterface(struct ExecIFace *IExec, struct Interface *iface); static APTR lib_manager_vectors[] = { libObtain, libRelease, NULL, NULL, libOpen, libClose, libExpunge, NULL, (APTR)-1, }; static struct TagItem lib_managerTags[] = { { MIT_Name, (uint32)"__library" }, { MIT_VectorTable, (uint32)lib_manager_vectors }, { MIT_Version, 1 }, { TAG_END, 0 } }; extern void *main_vectors[]; static struct TagItem lib_mainTags[] = { { MIT_Name, (uint32)"main" }, { MIT_VectorTable, (uint32)main_vectors }, { MIT_Version, 1 }, { TAG_END, 0 } }; static APTR libInterfaces[] = { lib_managerTags, lib_mainTags, NULL }; extern void *VecTable68K[]; static struct TagItem libCreateTags[] = { { CLT_DataSize, sizeof(struct ExpatBase) }, { CLT_InitFunc, (uint32)libInit }, { CLT_Interfaces, (uint32)libInterfaces }, { CLT_Vector68K, (uint32)VecTable68K }, { TAG_END, 0 } }; static struct Resident __attribute__((used)) lib_res = { RTC_MATCHWORD, // rt_MatchWord &lib_res, // rt_MatchTag &lib_res+1, // rt_EndSkip RTF_NATIVE | RTF_AUTOINIT, // rt_Flags VERSION, // rt_Version NT_LIBRARY, // rt_Type LIBPRI, // rt_Pri LIBNAME, // rt_Name VSTRING, // rt_IdString libCreateTags // rt_Init }; int32 _start() { return RETURN_FAIL; } struct ExpatBase *libInit(struct ExpatBase *libBase, BPTR seglist, struct ExecIFace *iexec) { libBase->libNode.lib_Node.ln_Type = NT_LIBRARY; libBase->libNode.lib_Node.ln_Pri = LIBPRI; libBase->libNode.lib_Node.ln_Name = LIBNAME; libBase->libNode.lib_Flags = LIBF_SUMUSED|LIBF_CHANGED; libBase->libNode.lib_Version = VERSION; libBase->libNode.lib_Revision = REVISION; libBase->libNode.lib_IdString = VSTRING; libBase->SegList = seglist; libBase->IExec = iexec; INewlib = openInterface(iexec, "newlib.library", 0); if ( INewlib != 0 ) { return libBase; } closeInterface(iexec, INewlib); INewlib = 0; iexec->DeleteLibrary(&libBase->libNode); return NULL; } uint32 libObtain( struct LibraryManagerInterface *Self ) { ++Self->Data.RefCount; return Self->Data.RefCount; } uint32 libRelease( struct LibraryManagerInterface *Self ) { --Self->Data.RefCount; return Self->Data.RefCount; } struct ExpatBase *libOpen( struct LibraryManagerInterface *Self, uint32 version ) { struct ExpatBase *libBase; libBase = (struct ExpatBase *)Self->Data.LibBase; ++libBase->libNode.lib_OpenCnt; libBase->libNode.lib_Flags &= ~LIBF_DELEXP; return libBase; } BPTR libClose( struct LibraryManagerInterface *Self ) { struct ExpatBase *libBase; libBase = (struct ExpatBase *)Self->Data.LibBase; --libBase->libNode.lib_OpenCnt; if ( libBase->libNode.lib_OpenCnt ) { return 0; } if ( libBase->libNode.lib_Flags & LIBF_DELEXP ) { return (BPTR)Self->LibExpunge(); } else { return ZERO; } } BPTR libExpunge( struct LibraryManagerInterface *Self ) { struct ExpatBase *libBase = (struct ExpatBase *)Self->Data.LibBase; BPTR result = ZERO; if (libBase->libNode.lib_OpenCnt == 0) { libBase->IExec->Remove(&libBase->libNode.lib_Node); result = libBase->SegList; closeInterface(libBase->IExec, INewlib); INewlib = 0; libBase->IExec->DeleteLibrary(&libBase->libNode); } else { libBase->libNode.lib_Flags |= LIBF_DELEXP; } return result; } struct Interface *openInterface(struct ExecIFace *IExec, CONST_STRPTR libName, uint32 libVer) { struct Library *base = IExec->OpenLibrary(libName, libVer); struct Interface *iface = IExec->GetInterface(base, "main", 1, 0); if (iface == 0) { IExec->CloseLibrary(base); } return iface; } void closeInterface(struct ExecIFace *IExec, struct Interface *iface) { if (iface != 0) { struct Library *base = iface->Data.LibBase; IExec->DropInterface(iface); IExec->CloseLibrary(base); } } astropy-1.1.1/cextern/expat/amiga/Makefile0000755001134200020070000002427312602615516021445 0ustar embrayscience00000000000000# # Makefile for AmigaOS # .PHONY: help all check clean package .PHONY: clib2 newlib library so vpath %.c ../lib ../examples ../xmlwf ../tests ../tests/benchmark vpath %.h ../lib ../tests ############################################################################# help: @echo "Requires:" @echo " AmigaOS 4.x" @echo " SDK 53.13" @echo "" @echo "Targets:" @echo " all - make libraries, xmlwf, examples and runs tests" @echo " install - install expat libraries and tools into SDK" @echo " clean - clean object files" @echo " check - run all the tests" @echo " package - prepare distribution archive" all: clib2 newlib library so check clib2: clib2/libexpat.a clib2/xmlwf clib2/elements clib2/outline clib2/runtests clib2/benchmark newlib: newlib/libexpat.a newlib/xmlwf newlib/elements newlib/outline newlib/runtests newlib/benchmark library: libs/expat.library libs/xmlwf libs/elements libs/outline libs/runtests libs/benchmark so: so/libexpat.so so/xmlwf so/elements so/outline so/runtests so/benchmark check: clib2/runtests newlib/runtests libs/runtests so/runtests clib2/runtests newlib/runtests libs/runtests so/runtests clean: -delete clib2/#?.o quiet -delete newlib/#?.o quiet -delete libs/#?.o quiet -delete so/#?.o quiet package: $(MAKE) all -delete T:expat all force quiet makedir all T:expat/Workbench/Libs copy clone libs/expat.library T:expat/Workbench/Libs makedir all T:expat/Workbench/SObjs copy clone so/libexpat.so T:expat/Workbench/SObjs makedir all T:expat/SDK/Local/C copy clone libs/xmlwf T:expat/SDK/Local/C makedir all T:expat/SDK/Local/clib2/lib copy clone clib2/libexpat.a T:expat/SDK/Local/clib2/lib makedir all T:expat/SDK/Local/newlib/lib copy clone newlib/libexpat.a T:expat/SDK/Local/newlib/lib makedir all T:expat/SDK/Local/common/include copy clone /lib/expat.h /lib/expat_external.h T:expat/SDK/Local/common/include makedir all T:expat/SDK/Include/include_h/inline4 copy clone include/inline4/expat.h T:expat/SDK/Include/include_h/inline4 makedir all T:expat/SDK/Include/include_h/interfaces copy clone include/interfaces/expat.h T:expat/SDK/Include/include_h/interfaces makedir all T:expat/SDK/Include/include_h/libraries copy clone include/libraries/expat.h T:expat/SDK/Include/include_h/libraries makedir all T:expat/SDK/Include/include_h/proto copy clone include/proto/expat.h T:expat/SDK/Include/include_h/proto makedir all T:expat/SDK/Documentation/Libs/Expat copy clone /COPYING T:expat/SDK/Documentation/Libs/Expat copy clone /README T:expat/SDK/Documentation/Libs/Expat copy clone README.txt T:expat/SDK/Documentation/Libs/Expat/README.AmigaOS -delete expat.lha lha -r a expat.lha T:expat ############################################################################# CC := gcc LIBTOOL := ar STRIP := strip CFLAGS := -DNDEBUG -O3 LTFLAGS := -crs STRIPFLAGS := -R.comment ############################################################################# clib2/libexpat.a: clib2/xmlparse.o clib2/xmltok.o clib2/xmlrole.o $(LIBTOOL) $(LTFLAGS) $@ $^ protect $@ -e clib2/xmlparse.o: xmlparse.c expat.h xmlrole.h xmltok.h \ expat_external.h internal.h amigaconfig.h clib2/xmlrole.o: xmlrole.c ascii.h xmlrole.h expat_external.h \ internal.h amigaconfig.h clib2/xmltok.o: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \ iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \ expat_external.h internal.h amigaconfig.h ############################################################################# clib2/xmlwf: clib2/xmlwf.o clib2/xmlfile.o clib2/codepage.o clib2/readfilemap.o $(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a $(STRIP) $(STRIPFLAGS) $@ clib2/xmlwf.o: xmlwf.c clib2/xmlfile.o: xmlfile.c clib2/codepage.o: codepage.c clib2/readfilemap.o: readfilemap.c ############################################################################# clib2/elements: clib2/elements.o $(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a $(STRIP) $(STRIPFLAGS) $@ clib2/elements.o: elements.c ############################################################################# clib2/outline: clib2/outline.o $(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a $(STRIP) $(STRIPFLAGS) $@ clib2/outline.o: outline.c ############################################################################# clib2/runtests: clib2/runtests.o clib2/chardata.o clib2/minicheck.o $(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a clib2/chardata.o: chardata.c chardata.h clib2/minicheck.o: minicheck.c minicheck.h clib2/runtests.o: runtests.c chardata.h ############################################################################# clib2/benchmark: clib2/benchmark.o $(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a -lm clib2/benchmark.o: benchmark.c ############################################################################# newlib/libexpat.a: newlib/xmlparse.o newlib/xmltok.o newlib/xmlrole.o $(LIBTOOL) $(LTFLAGS) $@ $^ protect $@ -e newlib/xmlparse.o: xmlparse.c expat.h xmlrole.h xmltok.h \ expat_external.h internal.h amigaconfig.h newlib/xmlrole.o: xmlrole.c ascii.h xmlrole.h expat_external.h \ internal.h amigaconfig.h newlib/xmltok.o: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \ iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \ expat_external.h internal.h amigaconfig.h ############################################################################# newlib/xmlwf: newlib/xmlwf.o newlib/xmlfile.o newlib/codepage.o newlib/readfilemap.o $(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a $(STRIP) $(STRIPFLAGS) $@ newlib/xmlwf.o: xmlwf.c newlib/xmlfile.o: xmlfile.c newlib/codepage.o: codepage.c newlib/readfilemap.o: readfilemap.c ############################################################################# newlib/elements: newlib/elements.o $(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a $(STRIP) $(STRIPFLAGS) $@ newlib/elements.o: elements.c ############################################################################# newlib/outline: newlib/outline.o $(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a $(STRIP) $(STRIPFLAGS) $@ newlib/outline.o: outline.c ############################################################################# newlib/runtests: newlib/runtests.o newlib/chardata.o newlib/minicheck.o $(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a newlib/chardata.o: chardata.c chardata.h newlib/minicheck.o: minicheck.c minicheck.h newlib/runtests.o: runtests.c chardata.h ############################################################################# newlib/benchmark: newlib/benchmark.o $(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a newlib/benchmark.o: benchmark.c ############################################################################# libs/expat.library: libs/expat_lib.o libs/expat_68k.o libs/expat_68k_handler_stubs.o libs/expat_vectors.o newlib/libexpat.a $(CC) -mcrt=newlib -nostartfiles $^ -o $@ newlib/libexpat.a -Wl,--cref,-M,-Map=$@.map protect $@ -e $(STRIP) $(STRIPFLAGS) $@ libs/expat_lib.o: expat_lib.c expat_base.h libs/expat_68k.o: expat_68k.c expat_68k.h expat_base.h libs/expat_68k_handler_stubs.o: expat_68k_handler_stubs.c expat_68k.h libs/expat_vectors.o: expat_vectors.c libs/launch.o: launch.c ############################################################################# libs/xmlwf: libs/xmlwf.o libs/xmlfile.o libs/codepage.o libs/readfilemap.o libs/launch.o $(CC) -mcrt=newlib $^ -o $@ $(STRIP) $(STRIPFLAGS) $@ libs/xmlwf.o: xmlwf.c libs/xmlfile.o: xmlfile.c libs/codepage.o: codepage.c libs/readfilemap.o: readfilemap.c ############################################################################# libs/elements: libs/elements.o libs/launch.o $(CC) -mcrt=newlib $^ -o $@ $(STRIP) $(STRIPFLAGS) $@ libs/elements.o: elements.c ############################################################################# libs/outline: libs/outline.o libs/launch.o $(CC) -mcrt=newlib $^ -o $@ $(STRIP) $(STRIPFLAGS) $@ libs/outline.o: outline.c ############################################################################# libs/runtests: libs/runtests.o libs/chardata.o libs/minicheck.o libs/launch.o $(CC) -mcrt=newlib $^ -o $@ libs/chardata.o: chardata.c chardata.h libs/minicheck.o: minicheck.c minicheck.h libs/runtests.o: runtests.c chardata.h ############################################################################# libs/benchmark: libs/benchmark.o libs/launch.o $(CC) -mcrt=newlib $^ -o $@ libs/benchmark.o: benchmark.c ############################################################################# so/libexpat.so: so/xmlparse.o so/xmltok.o so/xmlrole.o $(CC) -mcrt=newlib -shared -o $@ $^ protect $@ -e so/xmlparse.o: xmlparse.c expat.h xmlrole.h xmltok.h \ expat_external.h internal.h amigaconfig.h so/xmlrole.o: xmlrole.c ascii.h xmlrole.h expat_external.h \ internal.h amigaconfig.h so/xmltok.o: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \ iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \ expat_external.h internal.h amigaconfig.h ############################################################################# so/xmlwf: newlib/xmlwf.o newlib/xmlfile.o newlib/codepage.o newlib/readfilemap.o $(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat $(STRIP) $(STRIPFLAGS) $@ ############################################################################# so/elements: newlib/elements.o $(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat $(STRIP) $(STRIPFLAGS) $@ ############################################################################# so/outline: newlib/outline.o $(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat $(STRIP) $(STRIPFLAGS) $@ ############################################################################# so/runtests: newlib/runtests.o newlib/chardata.o newlib/minicheck.o $(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat ############################################################################# so/benchmark: newlib/benchmark.o $(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat ############################################################################# clib2/%.o: %.c $(CC) -mcrt=clib2 $(CFLAGS) -I../lib -c $< -o $@ newlib/%.o: %.c $(CC) -mcrt=newlib $(CFLAGS) -I../lib -c $< -o $@ libs/%.o: %.c $(CC) -mcrt=newlib $(CFLAGS) -D__USE_INLINE__ -I. -Iinclude -Iinclude/libraries -I../lib -c $< -o $@ so/%.o: %.c $(CC) -mcrt=newlib $(CFLAGS) -fPIC -I../lib -c $< -o $@ astropy-1.1.1/cextern/expat/amiga/expat_base.h0000644001134200020070000000256312602615516022264 0ustar embrayscience00000000000000/* ** Copyright (c) 2001-2009 Expat maintainers. ** ** Permission is hereby granted, free of charge, to any person obtaining ** a copy of this software and associated documentation files (the ** "Software"), to deal in the Software without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Software, and to ** permit persons to whom the Software is furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Software. ** ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef EXPAT_BASE_H #define EXPAT_BASE_H #include #include #include #include struct ExpatBase { struct Library libNode; uint16 pad; BPTR SegList; struct ExecIFace *IExec; }; #endif astropy-1.1.1/cextern/expat/amiga/expat.xml0000755001134200020070000002476612602615516021657 0ustar embrayscience00000000000000 libraries/expat.h astropy-1.1.1/cextern/expat/amiga/expat_vectors.c0000755001134200020070000005273312602615516023041 0ustar embrayscience00000000000000/* ** Copyright (c) 2001-2009 Expat maintainers. ** ** Permission is hereby granted, free of charge, to any person obtaining ** a copy of this software and associated documentation files (the ** "Software"), to deal in the Software without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Software, and to ** permit persons to whom the Software is furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Software. ** ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include extern uint32 _Expat_Obtain(struct ExpatIFace *); extern uint32 _Expat_Release(struct ExpatIFace *); extern XML_Parser _Expat_XML_ParserCreate(struct ExpatIFace *, const XML_Char * encodingName); extern XML_Parser _Expat_XML_ParserCreateNS(struct ExpatIFace *, const XML_Char * encodingName, XML_Char nsSep); extern XML_Parser _Expat_XML_ParserCreate_MM(struct ExpatIFace *, const XML_Char * encoding, const XML_Memory_Handling_Suite * memsuite, const XML_Char * namespaceSeparator); extern XML_Parser _Expat_XML_ExternalEntityParserCreate(struct ExpatIFace *, XML_Parser parser, const XML_Char * context, const XML_Char * encoding); extern void _Expat_XML_ParserFree(struct ExpatIFace *, XML_Parser parser); extern enum XML_Status _Expat_XML_Parse(struct ExpatIFace *, XML_Parser parser, const char * s, int len, int isFinal); extern enum XML_Status _Expat_XML_ParseBuffer(struct ExpatIFace *, XML_Parser parser, int len, int isFinal); extern void * _Expat_XML_GetBuffer(struct ExpatIFace *, XML_Parser parser, int len); extern void _Expat_XML_SetStartElementHandler(struct ExpatIFace *, XML_Parser parser, XML_StartElementHandler start); extern void _Expat_XML_SetEndElementHandler(struct ExpatIFace *, XML_Parser parser, XML_EndElementHandler end); extern void _Expat_XML_SetElementHandler(struct ExpatIFace *, XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end); extern void _Expat_XML_SetCharacterDataHandler(struct ExpatIFace *, XML_Parser parser, XML_CharacterDataHandler handler); extern void _Expat_XML_SetProcessingInstructionHandler(struct ExpatIFace *, XML_Parser parser, XML_ProcessingInstructionHandler handler); extern void _Expat_XML_SetCommentHandler(struct ExpatIFace *, XML_Parser parser, XML_CommentHandler handler); extern void _Expat_XML_SetStartCdataSectionHandler(struct ExpatIFace *, XML_Parser parser, XML_StartCdataSectionHandler start); extern void _Expat_XML_SetEndCdataSectionHandler(struct ExpatIFace *, XML_Parser parser, XML_EndCdataSectionHandler end); extern void _Expat_XML_SetCdataSectionHandler(struct ExpatIFace *, XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end); extern void _Expat_XML_SetDefaultHandler(struct ExpatIFace *, XML_Parser parser, XML_DefaultHandler handler); extern void _Expat_XML_SetDefaultHandlerExpand(struct ExpatIFace *, XML_Parser parser, XML_DefaultHandler handler); extern void _Expat_XML_SetExternalEntityRefHandler(struct ExpatIFace *, XML_Parser parser, XML_ExternalEntityRefHandler handler); extern void _Expat_XML_SetExternalEntityRefHandlerArg(struct ExpatIFace *, XML_Parser parser, void * arg); extern void _Expat_XML_SetUnknownEncodingHandler(struct ExpatIFace *, XML_Parser parser, XML_UnknownEncodingHandler handler, void * data); extern void _Expat_XML_SetStartNamespaceDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartNamespaceDeclHandler start); extern void _Expat_XML_SetEndNamespaceDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_EndNamespaceDeclHandler end); extern void _Expat_XML_SetNamespaceDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end); extern void _Expat_XML_SetXmlDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_XmlDeclHandler handler); extern void _Expat_XML_SetStartDoctypeDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartDoctypeDeclHandler start); extern void _Expat_XML_SetEndDoctypeDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_EndDoctypeDeclHandler end); extern void _Expat_XML_SetDoctypeDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end); extern void _Expat_XML_SetElementDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_ElementDeclHandler eldecl); extern void _Expat_XML_SetAttlistDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_AttlistDeclHandler attdecl); extern void _Expat_XML_SetEntityDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_EntityDeclHandler handler); extern void _Expat_XML_SetUnparsedEntityDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_UnparsedEntityDeclHandler handler); extern void _Expat_XML_SetNotationDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_NotationDeclHandler handler); extern void _Expat_XML_SetNotStandaloneHandler(struct ExpatIFace *, XML_Parser parser, XML_NotStandaloneHandler handler); extern enum XML_Error _Expat_XML_GetErrorCode(struct ExpatIFace *, XML_Parser parser); extern const XML_LChar * _Expat_XML_ErrorString(struct ExpatIFace *, enum XML_Error code); extern long _Expat_XML_GetCurrentByteIndex(struct ExpatIFace *, XML_Parser parser); extern int _Expat_XML_GetCurrentLineNumber(struct ExpatIFace *, XML_Parser parser); extern int _Expat_XML_GetCurrentColumnNumber(struct ExpatIFace *, XML_Parser parser); extern int _Expat_XML_GetCurrentByteCount(struct ExpatIFace *, XML_Parser parser); extern const char * _Expat_XML_GetInputContext(struct ExpatIFace *, XML_Parser parser, int * offset, int * size); extern void _Expat_XML_SetUserData(struct ExpatIFace *, XML_Parser parser, void * userData); extern void _Expat_XML_DefaultCurrent(struct ExpatIFace *, XML_Parser parser); extern void _Expat_XML_UseParserAsHandlerArg(struct ExpatIFace *, XML_Parser parser); extern enum XML_Status _Expat_XML_SetBase(struct ExpatIFace *, XML_Parser parser, const XML_Char * base); extern const XML_Char * _Expat_XML_GetBase(struct ExpatIFace *, XML_Parser parser); extern int _Expat_XML_GetSpecifiedAttributeCount(struct ExpatIFace *, XML_Parser parser); extern int _Expat_XML_GetIdAttributeIndex(struct ExpatIFace *, XML_Parser parser); extern enum XML_Status _Expat_XML_SetEncoding(struct ExpatIFace *, XML_Parser parser, const XML_Char * encoding); extern int _Expat_XML_SetParamEntityParsing(struct ExpatIFace *, XML_Parser parser, enum XML_ParamEntityParsing parsing); extern void _Expat_XML_SetReturnNSTriplet(struct ExpatIFace *, XML_Parser parser, int do_nst); extern const XML_LChar * _Expat_XML_ExpatVersion(struct ExpatIFace *); extern XML_Expat_Version _Expat_XML_ExpatVersionInfo(struct ExpatIFace *); extern XML_Bool _Expat_XML_ParserReset(struct ExpatIFace *, XML_Parser parser, const XML_Char * encoding); extern void _Expat_XML_SetSkippedEntityHandler(struct ExpatIFace *, XML_Parser parser, XML_SkippedEntityHandler handler); extern enum XML_Error _Expat_XML_UseForeignDTD(struct ExpatIFace *, XML_Parser parser, XML_Bool useDTD); extern const XML_Feature * _Expat_XML_GetFeatureList(struct ExpatIFace *); extern enum XML_Status _Expat_XML_StopParser(struct ExpatIFace *, XML_Parser parser, XML_Bool resumable); extern enum XML_Status _Expat_XML_ResumeParser(struct ExpatIFace *, XML_Parser parser); extern void _Expat_XML_GetParsingStatus(struct ExpatIFace *, XML_Parser parser, XML_ParsingStatus * status); extern void _Expat_XML_FreeContentModel(struct ExpatIFace *, XML_Parser parser, XML_Content * model); extern void * _Expat_XML_MemMalloc(struct ExpatIFace *, XML_Parser parser, size_t size); extern void * _Expat_XML_MemRealloc(struct ExpatIFace *, XML_Parser parser, void * ptr, size_t size); extern void _Expat_XML_MemFree(struct ExpatIFace *, XML_Parser parser, void * ptr); CONST APTR main_vectors[] = { _Expat_Obtain, _Expat_Release, NULL, NULL, _Expat_XML_ParserCreate, _Expat_XML_ParserCreateNS, _Expat_XML_ParserCreate_MM, _Expat_XML_ExternalEntityParserCreate, _Expat_XML_ParserFree, _Expat_XML_Parse, _Expat_XML_ParseBuffer, _Expat_XML_GetBuffer, _Expat_XML_SetStartElementHandler, _Expat_XML_SetEndElementHandler, _Expat_XML_SetElementHandler, _Expat_XML_SetCharacterDataHandler, _Expat_XML_SetProcessingInstructionHandler, _Expat_XML_SetCommentHandler, _Expat_XML_SetStartCdataSectionHandler, _Expat_XML_SetEndCdataSectionHandler, _Expat_XML_SetCdataSectionHandler, _Expat_XML_SetDefaultHandler, _Expat_XML_SetDefaultHandlerExpand, _Expat_XML_SetExternalEntityRefHandler, _Expat_XML_SetExternalEntityRefHandlerArg, _Expat_XML_SetUnknownEncodingHandler, _Expat_XML_SetStartNamespaceDeclHandler, _Expat_XML_SetEndNamespaceDeclHandler, _Expat_XML_SetNamespaceDeclHandler, _Expat_XML_SetXmlDeclHandler, _Expat_XML_SetStartDoctypeDeclHandler, _Expat_XML_SetEndDoctypeDeclHandler, _Expat_XML_SetDoctypeDeclHandler, _Expat_XML_SetElementDeclHandler, _Expat_XML_SetAttlistDeclHandler, _Expat_XML_SetEntityDeclHandler, _Expat_XML_SetUnparsedEntityDeclHandler, _Expat_XML_SetNotationDeclHandler, _Expat_XML_SetNotStandaloneHandler, _Expat_XML_GetErrorCode, _Expat_XML_ErrorString, _Expat_XML_GetCurrentByteIndex, _Expat_XML_GetCurrentLineNumber, _Expat_XML_GetCurrentColumnNumber, _Expat_XML_GetCurrentByteCount, _Expat_XML_GetInputContext, _Expat_XML_SetUserData, _Expat_XML_DefaultCurrent, _Expat_XML_UseParserAsHandlerArg, _Expat_XML_SetBase, _Expat_XML_GetBase, _Expat_XML_GetSpecifiedAttributeCount, _Expat_XML_GetIdAttributeIndex, _Expat_XML_SetEncoding, _Expat_XML_SetParamEntityParsing, _Expat_XML_SetReturnNSTriplet, _Expat_XML_ExpatVersion, _Expat_XML_ExpatVersionInfo, _Expat_XML_ParserReset, _Expat_XML_SetSkippedEntityHandler, _Expat_XML_UseForeignDTD, _Expat_XML_GetFeatureList, _Expat_XML_StopParser, _Expat_XML_ResumeParser, _Expat_XML_GetParsingStatus, _Expat_XML_FreeContentModel, _Expat_XML_MemMalloc, _Expat_XML_MemRealloc, _Expat_XML_MemFree, (APTR)-1 }; uint32 _Expat_Obtain(struct ExpatIFace *Self) { return ++Self->Data.RefCount; } uint32 _Expat_Release(struct ExpatIFace *Self) { return --Self->Data.RefCount; } XML_Parser _Expat_XML_ParserCreate(struct ExpatIFace * Self, const XML_Char *encoding) { return XML_ParserCreate(encoding); } XML_Parser _Expat_XML_ParserCreateNS(struct ExpatIFace * Self, const XML_Char *encoding, XML_Char nsSep) { return XML_ParserCreateNS(encoding, nsSep); } XML_Parser _Expat_XML_ParserCreate_MM(struct ExpatIFace * Self, const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite, const XML_Char *namespaceSeparator) { return XML_ParserCreate_MM(encoding, memsuite, namespaceSeparator); } XML_Parser _Expat_XML_ExternalEntityParserCreate(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *context, const XML_Char *encoding) { return XML_ExternalEntityParserCreate(parser, context, encoding); } void _Expat_XML_ParserFree(struct ExpatIFace *Self, XML_Parser parser) { XML_ParserFree(parser); } enum XML_Status _Expat_XML_Parse(struct ExpatIFace * Self, XML_Parser parser, const char * s, int len, int isFinal) { return XML_Parse(parser, s, len, isFinal); } enum XML_Status _Expat_XML_ParseBuffer(struct ExpatIFace * Self, XML_Parser parser, int len, int isFinal) { return XML_ParseBuffer(parser, len, isFinal); } void * _Expat_XML_GetBuffer(struct ExpatIFace * Self, XML_Parser parser, int len) { return XML_GetBuffer(parser, len); } void _Expat_XML_SetStartElementHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartElementHandler start) { XML_SetStartElementHandler(parser, start); } void _Expat_XML_SetEndElementHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndElementHandler end) { XML_SetEndElementHandler(parser, end); } void _Expat_XML_SetElementHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end) { XML_SetElementHandler(parser, start, end); } void _Expat_XML_SetCharacterDataHandler(struct ExpatIFace * Self, XML_Parser parser, XML_CharacterDataHandler handler) { XML_SetCharacterDataHandler(parser, handler); } void _Expat_XML_SetProcessingInstructionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_ProcessingInstructionHandler handler) { XML_SetProcessingInstructionHandler(parser, handler); } void _Expat_XML_SetCommentHandler(struct ExpatIFace * Self, XML_Parser parser, XML_CommentHandler handler) { XML_SetCommentHandler(parser, handler); } void _Expat_XML_SetStartCdataSectionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartCdataSectionHandler start) { XML_SetStartCdataSectionHandler(parser, start); } void _Expat_XML_SetEndCdataSectionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndCdataSectionHandler end) { XML_SetEndCdataSectionHandler(parser, end); } void _Expat_XML_SetCdataSectionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end) { XML_SetCdataSectionHandler(parser, start, end); } void _Expat_XML_SetDefaultHandler(struct ExpatIFace * Self, XML_Parser parser, XML_DefaultHandler handler) { XML_SetDefaultHandler(parser, handler); } void _Expat_XML_SetDefaultHandlerExpand(struct ExpatIFace * Self, XML_Parser parser, XML_DefaultHandler handler) { XML_SetDefaultHandlerExpand(parser, handler); } void _Expat_XML_SetExternalEntityRefHandler(struct ExpatIFace * Self, XML_Parser parser, XML_ExternalEntityRefHandler handler) { XML_SetExternalEntityRefHandler(parser, handler); } void _Expat_XML_SetExternalEntityRefHandlerArg(struct ExpatIFace * Self, XML_Parser parser, void * arg) { XML_SetExternalEntityRefHandlerArg(parser, arg); } void _Expat_XML_SetUnknownEncodingHandler(struct ExpatIFace * Self, XML_Parser parser, XML_UnknownEncodingHandler handler, void * data) { XML_SetUnknownEncodingHandler(parser, handler, data); } void _Expat_XML_SetStartNamespaceDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartNamespaceDeclHandler start) { XML_SetStartNamespaceDeclHandler(parser, start); } void _Expat_XML_SetEndNamespaceDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndNamespaceDeclHandler end) { XML_SetEndNamespaceDeclHandler(parser, end); } void _Expat_XML_SetNamespaceDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end) { XML_SetNamespaceDeclHandler(parser, start, end); } void _Expat_XML_SetXmlDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_XmlDeclHandler handler) { XML_SetXmlDeclHandler(parser, handler); } void _Expat_XML_SetStartDoctypeDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartDoctypeDeclHandler start) { XML_SetStartDoctypeDeclHandler(parser, start); } void _Expat_XML_SetEndDoctypeDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndDoctypeDeclHandler end) { XML_SetEndDoctypeDeclHandler(parser, end); } void _Expat_XML_SetDoctypeDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end) { XML_SetDoctypeDeclHandler(parser, start, end); } void _Expat_XML_SetElementDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_ElementDeclHandler eldecl) { XML_SetElementDeclHandler(parser, eldecl); } void _Expat_XML_SetAttlistDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_AttlistDeclHandler attdecl) { XML_SetAttlistDeclHandler(parser, attdecl); } void _Expat_XML_SetEntityDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EntityDeclHandler handler) { XML_SetEntityDeclHandler(parser, handler); } void _Expat_XML_SetUnparsedEntityDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_UnparsedEntityDeclHandler handler) { XML_SetUnparsedEntityDeclHandler(parser, handler); } void _Expat_XML_SetNotationDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_NotationDeclHandler handler) { XML_SetNotationDeclHandler(parser, handler); } void _Expat_XML_SetNotStandaloneHandler(struct ExpatIFace * Self, XML_Parser parser, XML_NotStandaloneHandler handler) { XML_SetNotStandaloneHandler(parser, handler); } enum XML_Error _Expat_XML_GetErrorCode(struct ExpatIFace * Self, XML_Parser parser) { return XML_GetErrorCode(parser); } const XML_LChar * _Expat_XML_ErrorString(struct ExpatIFace * Self, enum XML_Error code) { return XML_ErrorString(code); } long _Expat_XML_GetCurrentByteIndex(struct ExpatIFace * Self, XML_Parser parser) { return XML_GetCurrentByteIndex(parser); } int _Expat_XML_GetCurrentLineNumber(struct ExpatIFace * Self, XML_Parser parser) { return XML_GetCurrentLineNumber(parser); } int _Expat_XML_GetCurrentColumnNumber(struct ExpatIFace * Self, XML_Parser parser) { return XML_GetCurrentColumnNumber(parser); } int _Expat_XML_GetCurrentByteCount(struct ExpatIFace * Self, XML_Parser parser) { return XML_GetCurrentByteCount(parser); } const char * _Expat_XML_GetInputContext(struct ExpatIFace * Self, XML_Parser parser, int * offset, int * size) { return XML_GetInputContext(parser, offset, size); } void _Expat_XML_SetUserData(struct ExpatIFace * Self, XML_Parser parser, void * userData) { XML_SetUserData(parser, userData); } void _Expat_XML_DefaultCurrent(struct ExpatIFace * Self, XML_Parser parser) { XML_DefaultCurrent(parser); } void _Expat_XML_UseParserAsHandlerArg(struct ExpatIFace * Self, XML_Parser parser) { XML_UseParserAsHandlerArg(parser); } enum XML_Status _Expat_XML_SetBase(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *p) { return XML_SetBase(parser, p); } const XML_Char * _Expat_XML_GetBase(struct ExpatIFace * Self, XML_Parser parser) { return XML_GetBase(parser); } int _Expat_XML_GetSpecifiedAttributeCount(struct ExpatIFace * Self, XML_Parser parser) { return XML_GetSpecifiedAttributeCount(parser); } int _Expat_XML_GetIdAttributeIndex(struct ExpatIFace * Self, XML_Parser parser) { return XML_GetIdAttributeIndex(parser); } enum XML_Status _Expat_XML_SetEncoding(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *encoding) { return XML_SetEncoding(parser, encoding); } int _Expat_XML_SetParamEntityParsing(struct ExpatIFace * Self, XML_Parser parser, enum XML_ParamEntityParsing parsing) { return XML_SetParamEntityParsing(parser, parsing); } void _Expat_XML_SetReturnNSTriplet(struct ExpatIFace * Self, XML_Parser parser, int do_nst) { XML_SetReturnNSTriplet(parser, do_nst); } const XML_LChar * _Expat_XML_ExpatVersion(struct ExpatIFace * Self) { return XML_ExpatVersion(); } XML_Expat_Version _Expat_XML_ExpatVersionInfo(struct ExpatIFace * Self) { return XML_ExpatVersionInfo(); } XML_Bool _Expat_XML_ParserReset(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *encoding) { return XML_ParserReset(parser, encoding); } void _Expat_XML_SetSkippedEntityHandler(struct ExpatIFace * Self, XML_Parser parser, XML_SkippedEntityHandler handler) { XML_SetSkippedEntityHandler(parser, handler); } enum XML_Error _Expat_XML_UseForeignDTD(struct ExpatIFace * Self, XML_Parser parser, XML_Bool useDTD) { return XML_UseForeignDTD(parser, useDTD); } const XML_Feature * _Expat_XML_GetFeatureList(struct ExpatIFace * Self) { return XML_GetFeatureList(); } enum XML_Status _Expat_XML_StopParser(struct ExpatIFace * Self, XML_Parser parser, XML_Bool resumable) { return XML_StopParser(parser, resumable); } enum XML_Status _Expat_XML_ResumeParser(struct ExpatIFace * Self, XML_Parser parser) { return XML_ResumeParser(parser); } void _Expat_XML_GetParsingStatus(struct ExpatIFace * Self, XML_Parser parser, XML_ParsingStatus * status) { XML_GetParsingStatus(parser, status); } void _Expat_XML_FreeContentModel(struct ExpatIFace * Self, XML_Parser parser, XML_Content * model) { XML_FreeContentModel(parser, model); } void * _Expat_XML_MemMalloc(struct ExpatIFace * Self, XML_Parser parser, size_t size) { return XML_MemMalloc(parser, size); } void * _Expat_XML_MemRealloc(struct ExpatIFace * Self, XML_Parser parser, void * ptr, size_t size) { XML_MemRealloc(parser, ptr, size); } void _Expat_XML_MemFree(struct ExpatIFace * Self, XML_Parser parser, void * ptr) { XML_MemFree(parser, ptr); } astropy-1.1.1/cextern/expat/amiga/README.txt0000755001134200020070000000610012602615516021470 0ustar embrayscience00000000000000SUMMARY ======= This is a port of expat for AmigaOS 4.x which includes the SDK, some XML tools and the libraries. Four library flavours are supported: 1. static clib2 (libexpat.a) 2. static newlib (libexpat.a) 3. AmigaOS library (expat.library) 4. AmigaOS shared object library (libexpat.so) The AmigaOS library version is based on the work of Fredrik Wikstrom. BUILDING ======== To build all the library flavours, all the tools, examples and run the test suite, simply type 'make all' in the amiga subdirectory. INSTALLATION ============ To install expat into the standard AmigaOS SDK type 'make install' in the amiga subdirectory. CONFIGURATION ============= You may want to edit the lib/amigaconfig.h file to remove DTD and/or XML namespace support if they are not required by your specific application for a smaller and faster implementation. SOURCE CODE =========== The source code is actively maintained and merged with the official Expat repository available at http://expat.sourceforge.net/ HISTORY ======= 53.1 - bumped version to match AmigaOS streaming - modified to remove all global variables (except INewLib) - removed replacements for malloc(), etc. which are now handled by the respective C library - compiled with the latest binutils which bumps the AMIGAOS_DYNVERSION to 2 for the libexpat.so target - now strips the expat.library binary 5.2 - fixed XML_Parse 68k stub which enables xmlviewer to work without crashing - added some new functions to the 68k jump table available in the latest expat.library for AmigaOS 3.x - patches provided by Fredrik Wikstrom 5.1 - fixed package archive which was missing libexpat.so - fixed library protection bits - fixed up copyright notices 5.0 - integrated 68k patches from Fredrik Wikstrom which means expat.library is now callable from 68k code - bumped version for the addition of the 68k interface so executables can explicitly ask for version 5 and know it includes the 68k interface - refactored Makefile to avoid recursive make calls and build all the library flavours - added static newlib version - added shared objects version - added package target to Makefile - compiled with SDK 53.13 (GCC 4.2.4) at -O3 4.2 - updated to correspond to Expat 2.0.1 release - bumped copyright banners and versions - simplified amigaconfig.h - updated include/libraries/expat.h file - modified launch.c to use contructor/deconstructor - removed need for amiga_main() from expat utilities 4.1 - fixed memory freeing bug in shared library version - now allocates shared memory 4.0 - updated for corresponding Expat 2.0 release - some minor CVS related changes 3.1 - removed obsolete sfd file - added library description xml file - refactored Makefile - removed extraneous VARARGS68K keywords - reworked default memory handling functions in shared lib - updated amigaconfig.h 3.0 - initial release - based on expat 1.95.8 TO DO ===== - wide character support (UTF-16) astropy-1.1.1/cextern/expat/amiga/stdlib.c0000755001134200020070000000444612602615516021432 0ustar embrayscience00000000000000/* ** Copyright (c) 2001-2007 Expat maintainers. ** ** Permission is hereby granted, free of charge, to any person obtaining ** a copy of this software and associated documentation files (the ** "Software"), to deal in the Software without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Software, and to ** permit persons to whom the Software is furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Software. ** ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include void * malloc (size_t len) { uint32 size = sizeof(uint32) + len; uint32 *mem = AllocMem(size, MEMF_SHARED); if ( mem != 0 ) { *mem = size; ++mem; } return mem; } void * realloc (void * mem, size_t len2) { if ( mem == 0 ) { return malloc(len2); } if ( len2 == 0 ) { free(mem); return 0; } void * new_mem = malloc(len2); if ( new_mem == 0 ) { return 0; } uint32 mem_size = *(((uint32*)mem) - 1); CopyMem(mem, new_mem, mem_size); free(mem); return new_mem; } void free (void * mem) { if ( mem != 0 ) { uint32 * size_ptr = ((uint32*)mem) - 1; FreeMem(size_ptr, *size_ptr); } } int memcmp (const void * a, const void * b, size_t len) { size_t i; int diff; for ( i = 0; i < len; ++i ) { diff = *((uint8 *)a++) - *((uint8 *)b++); if ( diff ) { return diff; } } return 0; } void * memcpy (void * t, const void * a, size_t len) { CopyMem((APTR)a, t, len); return t; } void * memmove (void * t1, const void * t2, size_t len) { MoveMem((APTR)t2, t1, len); return t1; } void * memset (void * t, int c, size_t len) { return SetMem(t, c, len); } astropy-1.1.1/cextern/expat/amiga/expat_68k_handler_stubs.c0000755001134200020070000001512112602615516024667 0ustar embrayscience00000000000000/* ** Copyright (c) 2001-2009 Expat maintainers. ** ** Permission is hereby granted, free of charge, to any person obtaining ** a copy of this software and associated documentation files (the ** "Software"), to deal in the Software without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Software, and to ** permit persons to whom the Software is furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Software. ** ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef __USE_INLINE__ #undef __USE_INLINE__ #endif #include "expat_68k.h" #include #include #include static uint32 VARARGS68K call_68k_code (struct ExecIFace *IExec, void *code, int num_args, ...) { uint32 res = 0; va_list vargs; va_startlinear(vargs, num_args); uint32 *args = va_getlinearva(vargs, uint32 *); uint8 *stack = IExec->AllocVec(4096, MEMF_SHARED); if (stack) { uint32 *sp = (uint32 *)(stack + 4096); args += num_args; while (num_args--) { *--sp = *--args; } res = IExec->EmulateTags(code, ET_StackPtr, sp, TAG_END); IExec->FreeVec(stack); } va_end(vargs); return res; } void _68k_startelementhandler(void *userdata, const char *name, const char **attrs) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->startelementhandler, 3, p->handlerarg, name, attrs); } void _68k_endelementhandler(void *userdata, const char *name) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->endelementhandler, 2, p->handlerarg, name); } void _68k_chardatahandler(void *userdata, const char *s, int len) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->chardatahandler, 3, p->handlerarg, s, len); } void _68k_procinsthandler(void *userdata, const char *target, const char *data) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->procinsthandler, 3, p->handlerarg, target, data); } void _68k_commenthandler(void *userdata, const char *data) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->commenthandler, 2, p->handlerarg, data); } void _68k_startcdatahandler(void *userdata) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->startcdatahandler, 1, p->handlerarg); } void _68k_endcdatahandler(void *userdata) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->endcdatahandler, 1, p->handlerarg); } void _68k_defaulthandler(void *userdata, const char *s, int len) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->defaulthandler, 3, p->handlerarg, s, len); } void _68k_defaulthandlerexp(void *userdata, const char *s, int len) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->defaulthandlerexp, 3, p->handlerarg, s, len); } int _68k_extentrefhandler(XML_Parser parser, const char *context, const char *base, const char *sysid, const char *pubid) { M68kXML_Parser p = XML_GetUserData(parser); void *arg = p->extenthandlerarg; return (int)call_68k_code(p->IExec, p->extentrefhandler, 5, arg ? arg : p, context, base, sysid, pubid); } int _68k_unknownenchandler(void *enchandlerdata, const char *name, XML_Encoding *info) { M68kXML_Parser p = enchandlerdata; return (int)call_68k_code(p->IExec, p->unknownenchandler, 3, p->enchandlerarg, name, info); } void _68k_startnamespacehandler(void *userdata, const char *prefix, const char *uri) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->startnamespacehandler, 3, p->handlerarg, prefix, uri); } void _68k_endnamespacehandler(void *userdata, const char *prefix) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->endnamespacehandler, 2, p->handlerarg, prefix); } void _68k_xmldeclhandler(void *userdata, const char *version, const char *encoding, int standalone) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->xmldeclhandler, 4, p->handlerarg, version, encoding, standalone); } void _68k_startdoctypehandler(void *userdata, const char *doctypename, const char *sysid, const char *pubid, int has_internal_subset) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->startdoctypehandler, 5, p->handlerarg, doctypename, sysid, pubid, has_internal_subset); } void _68k_enddoctypehandler(void *userdata) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->enddoctypehandler, 1, p->handlerarg); } void _68k_elementdeclhandler(void *userdata, const char *name, XML_Content *model) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->elementdeclhandler, 3, p->handlerarg, name, model); } void _68k_attlistdeclhandler(void *userdata, const char *elname, const char *attname, const char *att_type, const char *dflt, int isrequired) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->attlistdeclhandler, 6, p->handlerarg, elname, attname, att_type, dflt, isrequired); } void _68k_entitydeclhandler(void *userdata, const char *entityname, int is_param_entity, const char *value, int value_length, const char *base, const char *sysid, const char *pubid, const char *notationname) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->entitydeclhandler, 9, p->handlerarg, entityname, is_param_entity, value, value_length, base, sysid, pubid, notationname); } void _68k_unparseddeclhandler(void *userdata, const char *entityname, const char *base, const char *sysid, const char *pubid, const char *notationname) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->unparseddeclhandler, 6, p->handlerarg, entityname, base, sysid, pubid, notationname); } void _68k_notationdeclhandler(void *userdata, const char *notationname, const char *base, const char *sysid, const char *pubid) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->notationdeclhandler, 5, p->handlerarg, notationname, base, sysid, pubid); } int _68k_notstandalonehandler(void *userdata) { M68kXML_Parser p = userdata; return (int)call_68k_code(p->IExec, p->notstandalonehandler, 1, p->handlerarg); } void _68k_skippedentityhandler(void *userdata, const char *entityname, int is_param_entity) { M68kXML_Parser p = userdata; call_68k_code(p->IExec, p->skippedentityhandler, 3, p->handlerarg, entityname, is_param_entity); } astropy-1.1.1/cextern/expat/amiga/include/0000755001134200020070000000000012644022135021410 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/amiga/include/proto/0000755001134200020070000000000012644022135022553 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/amiga/include/proto/expat.h0000755001134200020070000000246712602615516024066 0ustar embrayscience00000000000000#ifndef PROTO_EXPAT_H #define PROTO_EXPAT_H #ifndef LIBRARIES_EXPAT_H #include #endif /****************************************************************************/ #ifndef __NOLIBBASE__ #ifndef __USE_BASETYPE__ extern struct Library * ExpatBase; #else extern struct Library * ExpatBase; #endif /* __USE_BASETYPE__ */ #endif /* __NOLIBBASE__ */ /****************************************************************************/ #ifdef __amigaos4__ #include #ifdef __USE_INLINE__ #include #endif /* __USE_INLINE__ */ #ifndef CLIB_EXPAT_PROTOS_H #define CLIB_EXPAT_PROTOS_H 1 #endif /* CLIB_EXPAT_PROTOS_H */ #ifndef __NOGLOBALIFACE__ extern struct ExpatIFace *IExpat; #endif /* __NOGLOBALIFACE__ */ #else /* __amigaos4__ */ #ifndef CLIB_EXPAT_PROTOS_H #include #endif /* CLIB_EXPAT_PROTOS_H */ #if defined(__GNUC__) #ifndef __PPC__ #include #else #include #endif /* __PPC__ */ #elif defined(__VBCC__) #ifndef __PPC__ #include #endif /* __PPC__ */ #else #include #endif /* __GNUC__ */ #endif /* __amigaos4__ */ /****************************************************************************/ #endif /* PROTO_EXPAT_H */ astropy-1.1.1/cextern/expat/amiga/include/inline4/0000755001134200020070000000000012644022135022752 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/amiga/include/inline4/expat.h0000755001134200020070000001463512602615516024265 0ustar embrayscience00000000000000#ifndef INLINE4_EXPAT_H #define INLINE4_EXPAT_H /* ** This file was auto generated by idltool 51.6. ** ** It provides compatibility to OS3 style library ** calls by substituting functions. ** ** Do not edit manually. */ #ifndef EXEC_TYPES_H #include #endif #ifndef EXEC_EXEC_H #include #endif #ifndef EXEC_INTERFACES_H #include #endif #ifndef LIBRARIES_EXPAT_H #include #endif /* Inline macros for Interface "main" */ #define XML_ParserCreate(encodingName) IExpat->XML_ParserCreate(encodingName) #define XML_ParserCreateNS(encodingName, nsSep) IExpat->XML_ParserCreateNS(encodingName, nsSep) #define XML_ParserCreate_MM(encoding, memsuite, namespaceSeparator) IExpat->XML_ParserCreate_MM(encoding, memsuite, namespaceSeparator) #define XML_ExternalEntityParserCreate(parser, context, encoding) IExpat->XML_ExternalEntityParserCreate(parser, context, encoding) #define XML_ParserFree(parser) IExpat->XML_ParserFree(parser) #define XML_Parse(parser, s, len, isFinal) IExpat->XML_Parse(parser, s, len, isFinal) #define XML_ParseBuffer(parser, len, isFinal) IExpat->XML_ParseBuffer(parser, len, isFinal) #define XML_GetBuffer(parser, len) IExpat->XML_GetBuffer(parser, len) #define XML_SetStartElementHandler(parser, start) IExpat->XML_SetStartElementHandler(parser, start) #define XML_SetEndElementHandler(parser, end) IExpat->XML_SetEndElementHandler(parser, end) #define XML_SetElementHandler(parser, start, end) IExpat->XML_SetElementHandler(parser, start, end) #define XML_SetCharacterDataHandler(parser, handler) IExpat->XML_SetCharacterDataHandler(parser, handler) #define XML_SetProcessingInstructionHandler(parser, handler) IExpat->XML_SetProcessingInstructionHandler(parser, handler) #define XML_SetCommentHandler(parser, handler) IExpat->XML_SetCommentHandler(parser, handler) #define XML_SetStartCdataSectionHandler(parser, start) IExpat->XML_SetStartCdataSectionHandler(parser, start) #define XML_SetEndCdataSectionHandler(parser, end) IExpat->XML_SetEndCdataSectionHandler(parser, end) #define XML_SetCdataSectionHandler(parser, start, end) IExpat->XML_SetCdataSectionHandler(parser, start, end) #define XML_SetDefaultHandler(parser, handler) IExpat->XML_SetDefaultHandler(parser, handler) #define XML_SetDefaultHandlerExpand(parser, handler) IExpat->XML_SetDefaultHandlerExpand(parser, handler) #define XML_SetExternalEntityRefHandler(parser, handler) IExpat->XML_SetExternalEntityRefHandler(parser, handler) #define XML_SetExternalEntityRefHandlerArg(parser, arg) IExpat->XML_SetExternalEntityRefHandlerArg(parser, arg) #define XML_SetUnknownEncodingHandler(parser, handler, data) IExpat->XML_SetUnknownEncodingHandler(parser, handler, data) #define XML_SetStartNamespaceDeclHandler(parser, start) IExpat->XML_SetStartNamespaceDeclHandler(parser, start) #define XML_SetEndNamespaceDeclHandler(parser, end) IExpat->XML_SetEndNamespaceDeclHandler(parser, end) #define XML_SetNamespaceDeclHandler(parser, start, end) IExpat->XML_SetNamespaceDeclHandler(parser, start, end) #define XML_SetXmlDeclHandler(parser, handler) IExpat->XML_SetXmlDeclHandler(parser, handler) #define XML_SetStartDoctypeDeclHandler(parser, start) IExpat->XML_SetStartDoctypeDeclHandler(parser, start) #define XML_SetEndDoctypeDeclHandler(parser, end) IExpat->XML_SetEndDoctypeDeclHandler(parser, end) #define XML_SetDoctypeDeclHandler(parser, start, end) IExpat->XML_SetDoctypeDeclHandler(parser, start, end) #define XML_SetElementDeclHandler(parser, eldecl) IExpat->XML_SetElementDeclHandler(parser, eldecl) #define XML_SetAttlistDeclHandler(parser, attdecl) IExpat->XML_SetAttlistDeclHandler(parser, attdecl) #define XML_SetEntityDeclHandler(parser, handler) IExpat->XML_SetEntityDeclHandler(parser, handler) #define XML_SetUnparsedEntityDeclHandler(parser, handler) IExpat->XML_SetUnparsedEntityDeclHandler(parser, handler) #define XML_SetNotationDeclHandler(parser, handler) IExpat->XML_SetNotationDeclHandler(parser, handler) #define XML_SetNotStandaloneHandler(parser, handler) IExpat->XML_SetNotStandaloneHandler(parser, handler) #define XML_GetErrorCode(parser) IExpat->XML_GetErrorCode(parser) #define XML_ErrorString(code) IExpat->XML_ErrorString(code) #define XML_GetCurrentByteIndex(parser) IExpat->XML_GetCurrentByteIndex(parser) #define XML_GetCurrentLineNumber(parser) IExpat->XML_GetCurrentLineNumber(parser) #define XML_GetCurrentColumnNumber(parser) IExpat->XML_GetCurrentColumnNumber(parser) #define XML_GetCurrentByteCount(parser) IExpat->XML_GetCurrentByteCount(parser) #define XML_GetInputContext(parser, offset, size) IExpat->XML_GetInputContext(parser, offset, size) #define XML_SetUserData(parser, userData) IExpat->XML_SetUserData(parser, userData) #define XML_DefaultCurrent(parser) IExpat->XML_DefaultCurrent(parser) #define XML_UseParserAsHandlerArg(parser) IExpat->XML_UseParserAsHandlerArg(parser) #define XML_SetBase(parser, base) IExpat->XML_SetBase(parser, base) #define XML_GetBase(parser) IExpat->XML_GetBase(parser) #define XML_GetSpecifiedAttributeCount(parser) IExpat->XML_GetSpecifiedAttributeCount(parser) #define XML_GetIdAttributeIndex(parser) IExpat->XML_GetIdAttributeIndex(parser) #define XML_SetEncoding(parser, encoding) IExpat->XML_SetEncoding(parser, encoding) #define XML_SetParamEntityParsing(parser, parsing) IExpat->XML_SetParamEntityParsing(parser, parsing) #define XML_SetReturnNSTriplet(parser, do_nst) IExpat->XML_SetReturnNSTriplet(parser, do_nst) #define XML_ExpatVersion() IExpat->XML_ExpatVersion() #define XML_ExpatVersionInfo() IExpat->XML_ExpatVersionInfo() #define XML_ParserReset(parser, encoding) IExpat->XML_ParserReset(parser, encoding) #define XML_SetSkippedEntityHandler(parser, handler) IExpat->XML_SetSkippedEntityHandler(parser, handler) #define XML_UseForeignDTD(parser, useDTD) IExpat->XML_UseForeignDTD(parser, useDTD) #define XML_GetFeatureList() IExpat->XML_GetFeatureList() #define XML_StopParser(parser, resumable) IExpat->XML_StopParser(parser, resumable) #define XML_ResumeParser(parser) IExpat->XML_ResumeParser(parser) #define XML_GetParsingStatus(parser, status) IExpat->XML_GetParsingStatus(parser, status) #define XML_FreeContentModel(parser, model) IExpat->XML_FreeContentModel(parser, model) #define XML_MemMalloc(parser, size) IExpat->XML_MemMalloc(parser, size) #define XML_MemRealloc(parser, ptr, size) IExpat->XML_MemRealloc(parser, ptr, size) #define XML_MemFree(parser, ptr) IExpat->XML_MemFree(parser, ptr) #endif /* INLINE4_EXPAT_H */ astropy-1.1.1/cextern/expat/amiga/include/interfaces/0000755001134200020070000000000012644022135023533 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/amiga/include/interfaces/expat.h0000755001134200020070000001737212602615516025047 0ustar embrayscience00000000000000#ifndef EXPAT_INTERFACE_DEF_H #define EXPAT_INTERFACE_DEF_H /* ** This file was machine generated by idltool 51.6. ** Do not edit */ #ifndef EXEC_TYPES_H #include #endif #ifndef EXEC_EXEC_H #include #endif #ifndef EXEC_INTERFACES_H #include #endif #ifndef LIBRARIES_EXPAT_H #include #endif struct ExpatIFace { struct InterfaceData Data; uint32 APICALL (*Obtain)(struct ExpatIFace *Self); uint32 APICALL (*Release)(struct ExpatIFace *Self); void APICALL (*Expunge)(struct ExpatIFace *Self); struct Interface * APICALL (*Clone)(struct ExpatIFace *Self); XML_Parser APICALL (*XML_ParserCreate)(struct ExpatIFace *Self, const XML_Char * encodingName); XML_Parser APICALL (*XML_ParserCreateNS)(struct ExpatIFace *Self, const XML_Char * encodingName, XML_Char nsSep); XML_Parser APICALL (*XML_ParserCreate_MM)(struct ExpatIFace *Self, const XML_Char * encoding, const XML_Memory_Handling_Suite * memsuite, const XML_Char * namespaceSeparator); XML_Parser APICALL (*XML_ExternalEntityParserCreate)(struct ExpatIFace *Self, XML_Parser parser, const XML_Char * context, const XML_Char * encoding); void APICALL (*XML_ParserFree)(struct ExpatIFace *Self, XML_Parser parser); enum XML_Status APICALL (*XML_Parse)(struct ExpatIFace *Self, XML_Parser parser, const char * s, int len, int isFinal); enum XML_Status APICALL (*XML_ParseBuffer)(struct ExpatIFace *Self, XML_Parser parser, int len, int isFinal); void * APICALL (*XML_GetBuffer)(struct ExpatIFace *Self, XML_Parser parser, int len); void APICALL (*XML_SetStartElementHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartElementHandler start); void APICALL (*XML_SetEndElementHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EndElementHandler end); void APICALL (*XML_SetElementHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end); void APICALL (*XML_SetCharacterDataHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_CharacterDataHandler handler); void APICALL (*XML_SetProcessingInstructionHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_ProcessingInstructionHandler handler); void APICALL (*XML_SetCommentHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_CommentHandler handler); void APICALL (*XML_SetStartCdataSectionHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartCdataSectionHandler start); void APICALL (*XML_SetEndCdataSectionHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EndCdataSectionHandler end); void APICALL (*XML_SetCdataSectionHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end); void APICALL (*XML_SetDefaultHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_DefaultHandler handler); void APICALL (*XML_SetDefaultHandlerExpand)(struct ExpatIFace *Self, XML_Parser parser, XML_DefaultHandler handler); void APICALL (*XML_SetExternalEntityRefHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_ExternalEntityRefHandler handler); void APICALL (*XML_SetExternalEntityRefHandlerArg)(struct ExpatIFace *Self, XML_Parser parser, void * arg); void APICALL (*XML_SetUnknownEncodingHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_UnknownEncodingHandler handler, void * data); void APICALL (*XML_SetStartNamespaceDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartNamespaceDeclHandler start); void APICALL (*XML_SetEndNamespaceDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EndNamespaceDeclHandler end); void APICALL (*XML_SetNamespaceDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end); void APICALL (*XML_SetXmlDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_XmlDeclHandler handler); void APICALL (*XML_SetStartDoctypeDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartDoctypeDeclHandler start); void APICALL (*XML_SetEndDoctypeDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EndDoctypeDeclHandler end); void APICALL (*XML_SetDoctypeDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end); void APICALL (*XML_SetElementDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_ElementDeclHandler eldecl); void APICALL (*XML_SetAttlistDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_AttlistDeclHandler attdecl); void APICALL (*XML_SetEntityDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EntityDeclHandler handler); void APICALL (*XML_SetUnparsedEntityDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_UnparsedEntityDeclHandler handler); void APICALL (*XML_SetNotationDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_NotationDeclHandler handler); void APICALL (*XML_SetNotStandaloneHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_NotStandaloneHandler handler); enum XML_Error APICALL (*XML_GetErrorCode)(struct ExpatIFace *Self, XML_Parser parser); const XML_LChar * APICALL (*XML_ErrorString)(struct ExpatIFace *Self, enum XML_Error code); long APICALL (*XML_GetCurrentByteIndex)(struct ExpatIFace *Self, XML_Parser parser); int APICALL (*XML_GetCurrentLineNumber)(struct ExpatIFace *Self, XML_Parser parser); int APICALL (*XML_GetCurrentColumnNumber)(struct ExpatIFace *Self, XML_Parser parser); int APICALL (*XML_GetCurrentByteCount)(struct ExpatIFace *Self, XML_Parser parser); const char * APICALL (*XML_GetInputContext)(struct ExpatIFace *Self, XML_Parser parser, int * offset, int * size); void APICALL (*XML_SetUserData)(struct ExpatIFace *Self, XML_Parser parser, void * userData); void APICALL (*XML_DefaultCurrent)(struct ExpatIFace *Self, XML_Parser parser); void APICALL (*XML_UseParserAsHandlerArg)(struct ExpatIFace *Self, XML_Parser parser); enum XML_Status APICALL (*XML_SetBase)(struct ExpatIFace *Self, XML_Parser parser, const XML_Char * base); const XML_Char * APICALL (*XML_GetBase)(struct ExpatIFace *Self, XML_Parser parser); int APICALL (*XML_GetSpecifiedAttributeCount)(struct ExpatIFace *Self, XML_Parser parser); int APICALL (*XML_GetIdAttributeIndex)(struct ExpatIFace *Self, XML_Parser parser); enum XML_Status APICALL (*XML_SetEncoding)(struct ExpatIFace *Self, XML_Parser parser, const XML_Char * encoding); int APICALL (*XML_SetParamEntityParsing)(struct ExpatIFace *Self, XML_Parser parser, enum XML_ParamEntityParsing parsing); void APICALL (*XML_SetReturnNSTriplet)(struct ExpatIFace *Self, XML_Parser parser, int do_nst); const XML_LChar * APICALL (*XML_ExpatVersion)(struct ExpatIFace *Self); XML_Expat_Version APICALL (*XML_ExpatVersionInfo)(struct ExpatIFace *Self); XML_Bool APICALL (*XML_ParserReset)(struct ExpatIFace *Self, XML_Parser parser, const XML_Char * encoding); void APICALL (*XML_SetSkippedEntityHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_SkippedEntityHandler handler); enum XML_Error APICALL (*XML_UseForeignDTD)(struct ExpatIFace *Self, XML_Parser parser, XML_Bool useDTD); const XML_Feature * APICALL (*XML_GetFeatureList)(struct ExpatIFace *Self); enum XML_Status APICALL (*XML_StopParser)(struct ExpatIFace *Self, XML_Parser parser, XML_Bool resumable); enum XML_Status APICALL (*XML_ResumeParser)(struct ExpatIFace *Self, XML_Parser parser); void APICALL (*XML_GetParsingStatus)(struct ExpatIFace *Self, XML_Parser parser, XML_ParsingStatus * status); void APICALL (*XML_FreeContentModel)(struct ExpatIFace *Self, XML_Parser parser, XML_Content * model); void * APICALL (*XML_MemMalloc)(struct ExpatIFace *Self, XML_Parser parser, size_t size); void * APICALL (*XML_MemRealloc)(struct ExpatIFace *Self, XML_Parser parser, void * ptr, size_t size); void APICALL (*XML_MemFree)(struct ExpatIFace *Self, XML_Parser parser, void * ptr); }; #endif /* EXPAT_INTERFACE_DEF_H */ astropy-1.1.1/cextern/expat/amiga/include/libraries/0000755001134200020070000000000012644022135023364 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/amiga/include/libraries/expat.h0000755001134200020070000004020412602615516024666 0ustar embrayscience00000000000000#ifndef LIBRARIES_EXPAT_H #define LIBRARIES_EXPAT_H /* ** Copyright (c) 2001-2007 Expat maintainers. ** ** Permission is hereby granted, free of charge, to any person obtaining ** a copy of this software and associated documentation files (the ** "Software"), to deal in the Software without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Software, and to ** permit persons to whom the Software is furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Software. ** ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /****************************************************************************/ #ifdef __cplusplus extern "C" { #endif #ifdef __GNUC__ #ifdef __PPC__ #pragma pack(2) #endif #elif defined(__VBCC__) #pragma amiga-align #endif /****************************************************************************/ #include #ifndef XMLCALL #define XMLCALL #endif typedef char XML_Char; typedef char XML_LChar; typedef long XML_Index; typedef unsigned long XML_Size; struct XML_ParserStruct; typedef struct XML_ParserStruct *XML_Parser; typedef unsigned char XML_Bool; #define XML_TRUE ((XML_Bool) 1) #define XML_FALSE ((XML_Bool) 0) enum XML_Status { XML_STATUS_ERROR = 0, #define XML_STATUS_ERROR XML_STATUS_ERROR XML_STATUS_OK = 1, #define XML_STATUS_OK XML_STATUS_OK XML_STATUS_SUSPENDED = 2, #define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED }; enum XML_Error { XML_ERROR_NONE, XML_ERROR_NO_MEMORY, XML_ERROR_SYNTAX, XML_ERROR_NO_ELEMENTS, XML_ERROR_INVALID_TOKEN, XML_ERROR_UNCLOSED_TOKEN, XML_ERROR_PARTIAL_CHAR, XML_ERROR_TAG_MISMATCH, XML_ERROR_DUPLICATE_ATTRIBUTE, XML_ERROR_JUNK_AFTER_DOC_ELEMENT, XML_ERROR_PARAM_ENTITY_REF, XML_ERROR_UNDEFINED_ENTITY, XML_ERROR_RECURSIVE_ENTITY_REF, XML_ERROR_ASYNC_ENTITY, XML_ERROR_BAD_CHAR_REF, XML_ERROR_BINARY_ENTITY_REF, XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF, XML_ERROR_MISPLACED_XML_PI, XML_ERROR_UNKNOWN_ENCODING, XML_ERROR_INCORRECT_ENCODING, XML_ERROR_UNCLOSED_CDATA_SECTION, XML_ERROR_EXTERNAL_ENTITY_HANDLING, XML_ERROR_NOT_STANDALONE, XML_ERROR_UNEXPECTED_STATE, XML_ERROR_ENTITY_DECLARED_IN_PE, XML_ERROR_FEATURE_REQUIRES_XML_DTD, XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING, XML_ERROR_UNBOUND_PREFIX, XML_ERROR_UNDECLARING_PREFIX, XML_ERROR_INCOMPLETE_PE, XML_ERROR_XML_DECL, XML_ERROR_TEXT_DECL, XML_ERROR_PUBLICID, XML_ERROR_SUSPENDED, XML_ERROR_NOT_SUSPENDED, XML_ERROR_ABORTED, XML_ERROR_FINISHED, XML_ERROR_SUSPEND_PE, XML_ERROR_RESERVED_PREFIX_XML, XML_ERROR_RESERVED_PREFIX_XMLNS, XML_ERROR_RESERVED_NAMESPACE_URI }; enum XML_Content_Type { XML_CTYPE_EMPTY = 1, XML_CTYPE_ANY, XML_CTYPE_MIXED, XML_CTYPE_NAME, XML_CTYPE_CHOICE, XML_CTYPE_SEQ }; enum XML_Content_Quant { XML_CQUANT_NONE, XML_CQUANT_OPT, XML_CQUANT_REP, XML_CQUANT_PLUS }; typedef struct XML_cp XML_Content; struct XML_cp { enum XML_Content_Type type; enum XML_Content_Quant quant; XML_Char * name; unsigned int numchildren; XML_Content * children; }; typedef void (*XML_ElementDeclHandler) (void *userData, const XML_Char *name, XML_Content *model); void XML_SetElementDeclHandler(XML_Parser parser, XML_ElementDeclHandler eldecl); typedef void (*XML_AttlistDeclHandler) ( void *userData, const XML_Char *elname, const XML_Char *attname, const XML_Char *att_type, const XML_Char *dflt, int isrequired); void XML_SetAttlistDeclHandler(XML_Parser parser, XML_AttlistDeclHandler attdecl); typedef void (*XML_XmlDeclHandler) (void *userData, const XML_Char *version, const XML_Char *encoding, int standalone); void XML_SetXmlDeclHandler(XML_Parser parser, XML_XmlDeclHandler xmldecl); typedef struct { void *(*malloc_fcn)(size_t size); void *(*realloc_fcn)(void *ptr, size_t size); void (*free_fcn)(void *ptr); } XML_Memory_Handling_Suite; XML_Parser XML_ParserCreate(const XML_Char *encoding); XML_Parser XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator); XML_Parser XML_ParserCreate_MM(const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite, const XML_Char *namespaceSeparator); XML_Bool XML_ParserReset(XML_Parser parser, const XML_Char *encoding); typedef void (*XML_StartElementHandler) (void *userData, const XML_Char *name, const XML_Char **atts); typedef void (*XML_EndElementHandler) (void *userData, const XML_Char *name); typedef void (*XML_CharacterDataHandler) (void *userData, const XML_Char *s, int len); typedef void (*XML_ProcessingInstructionHandler) ( void *userData, const XML_Char *target, const XML_Char *data); typedef void (*XML_CommentHandler) (void *userData, const XML_Char *data); typedef void (*XML_StartCdataSectionHandler) (void *userData); typedef void (*XML_EndCdataSectionHandler) (void *userData); typedef void (*XML_DefaultHandler) (void *userData, const XML_Char *s, int len); typedef void (*XML_StartDoctypeDeclHandler) ( void *userData, const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset); typedef void (*XML_EndDoctypeDeclHandler)(void *userData); typedef void (*XML_EntityDeclHandler) ( void *userData, const XML_Char *entityName, int is_parameter_entity, const XML_Char *value, int value_length, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName); void XML_SetEntityDeclHandler(XML_Parser parser, XML_EntityDeclHandler handler); typedef void (*XML_UnparsedEntityDeclHandler) ( void *userData, const XML_Char *entityName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName); typedef void (*XML_NotationDeclHandler) ( void *userData, const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId); typedef void (*XML_StartNamespaceDeclHandler) ( void *userData, const XML_Char *prefix, const XML_Char *uri); typedef void (*XML_EndNamespaceDeclHandler) ( void *userData, const XML_Char *prefix); typedef int (*XML_NotStandaloneHandler) (void *userData); typedef int (*XML_ExternalEntityRefHandler) ( XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId); typedef void (*XML_SkippedEntityHandler) ( void *userData, const XML_Char *entityName, int is_parameter_entity); typedef struct { int map[256]; void *data; int (*convert)(void *data, const char *s); void (*release)(void *data); } XML_Encoding; typedef int (*XML_UnknownEncodingHandler) ( void *encodingHandlerData, const XML_Char *name, XML_Encoding *info); void XML_SetElementHandler(XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end); void XML_SetStartElementHandler(XML_Parser parser, XML_StartElementHandler handler); void XML_SetEndElementHandler(XML_Parser parser, XML_EndElementHandler handler); void XML_SetCharacterDataHandler(XML_Parser parser, XML_CharacterDataHandler handler); void XML_SetProcessingInstructionHandler(XML_Parser parser, XML_ProcessingInstructionHandler handler); void XML_SetCommentHandler(XML_Parser parser, XML_CommentHandler handler); void XML_SetCdataSectionHandler(XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end); void XML_SetStartCdataSectionHandler(XML_Parser parser, XML_StartCdataSectionHandler start); void XML_SetEndCdataSectionHandler(XML_Parser parser, XML_EndCdataSectionHandler end); void XML_SetDefaultHandler(XML_Parser parser, XML_DefaultHandler handler); void XML_SetDefaultHandlerExpand(XML_Parser parser, XML_DefaultHandler handler); void XML_SetDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end); void XML_SetStartDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start); void XML_SetEndDoctypeDeclHandler(XML_Parser parser, XML_EndDoctypeDeclHandler end); void XML_SetUnparsedEntityDeclHandler(XML_Parser parser, XML_UnparsedEntityDeclHandler handler); void XML_SetNotationDeclHandler(XML_Parser parser, XML_NotationDeclHandler handler); void XML_SetNamespaceDeclHandler(XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end); void XML_SetStartNamespaceDeclHandler(XML_Parser parser, XML_StartNamespaceDeclHandler start); void XML_SetEndNamespaceDeclHandler(XML_Parser parser, XML_EndNamespaceDeclHandler end); void XML_SetNotStandaloneHandler(XML_Parser parser, XML_NotStandaloneHandler handler); void XML_SetExternalEntityRefHandler(XML_Parser parser, XML_ExternalEntityRefHandler handler); void XML_SetExternalEntityRefHandlerArg(XML_Parser parser, void *arg); void XML_SetSkippedEntityHandler(XML_Parser parser, XML_SkippedEntityHandler handler); void XML_SetUnknownEncodingHandler(XML_Parser parser, XML_UnknownEncodingHandler handler, void *encodingHandlerData); void XML_DefaultCurrent(XML_Parser parser); void XML_SetReturnNSTriplet(XML_Parser parser, int do_nst); void XML_SetUserData(XML_Parser parser, void *userData); #define XML_GetUserData(parser) (*(void **)(parser)) enum XML_Status XML_SetEncoding(XML_Parser parser, const XML_Char *encoding); void XML_UseParserAsHandlerArg(XML_Parser parser); enum XML_Error XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD); enum XML_Status XML_SetBase(XML_Parser parser, const XML_Char *base); const XML_Char * XML_GetBase(XML_Parser parser); int XML_GetSpecifiedAttributeCount(XML_Parser parser); int XML_GetIdAttributeIndex(XML_Parser parser); enum XML_Status XML_Parse(XML_Parser parser, const char *s, int len, int isFinal); void * XML_GetBuffer(XML_Parser parser, int len); enum XML_Status XML_ParseBuffer(XML_Parser parser, int len, int isFinal); enum XML_Status XML_StopParser(XML_Parser parser, XML_Bool resumable); enum XML_Status XML_ResumeParser(XML_Parser parser); enum XML_Parsing { XML_INITIALIZED, XML_PARSING, XML_FINISHED, XML_SUSPENDED }; typedef struct { enum XML_Parsing parsing; XML_Bool finalBuffer; } XML_ParsingStatus; void XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status); XML_Parser XML_ExternalEntityParserCreate(XML_Parser parser, const XML_Char *context, const XML_Char *encoding); enum XML_ParamEntityParsing { XML_PARAM_ENTITY_PARSING_NEVER, XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE, XML_PARAM_ENTITY_PARSING_ALWAYS }; int XML_SetParamEntityParsing(XML_Parser parser, enum XML_ParamEntityParsing parsing); enum XML_Error XML_GetErrorCode(XML_Parser parser); int XML_GetCurrentLineNumber(XML_Parser parser); int XML_GetCurrentColumnNumber(XML_Parser parser); long XML_GetCurrentByteIndex(XML_Parser parser); int XML_GetCurrentByteCount(XML_Parser parser); const char * XML_GetInputContext(XML_Parser parser, int *offset, int *size); #define XML_GetErrorLineNumber XML_GetCurrentLineNumber #define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber #define XML_GetErrorByteIndex XML_GetCurrentByteIndex void XML_FreeContentModel(XML_Parser parser, XML_Content *model); void * XML_MemMalloc(XML_Parser parser, size_t size); void * XML_MemRealloc(XML_Parser parser, void *ptr, size_t size); void XML_MemFree(XML_Parser parser, void *ptr); void XML_ParserFree(XML_Parser parser); const XML_LChar * XML_ErrorString(enum XML_Error code); const XML_LChar * XML_ExpatVersion(void); typedef struct { int major; int minor; int micro; } XML_Expat_Version; XML_Expat_Version XML_ExpatVersionInfo(void); enum XML_FeatureEnum { XML_FEATURE_END = 0, XML_FEATURE_UNICODE, XML_FEATURE_UNICODE_WCHAR_T, XML_FEATURE_DTD, XML_FEATURE_CONTEXT_BYTES, XML_FEATURE_MIN_SIZE, XML_FEATURE_SIZEOF_XML_CHAR, XML_FEATURE_SIZEOF_XML_LCHAR, XML_FEATURE_NS, XML_FEATURE_LARGE_SIZE }; typedef struct { enum XML_FeatureEnum feature; const XML_LChar *name; long int value; } XML_Feature; const XML_Feature * XML_GetFeatureList(void); #define XML_MAJOR_VERSION 2 #define XML_MINOR_VERSION 0 #define XML_MICRO_VERSION 1 /****************************************************************************/ #ifdef __GNUC__ #ifdef __PPC__ #pragma pack() #endif #elif defined(__VBCC__) #pragma default-align #endif #ifdef __cplusplus } #endif /****************************************************************************/ #endif /* EXPAT_EXPAT_H */ astropy-1.1.1/cextern/expat/lib/0000755001134200020070000000000012644022135017455 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/lib/expat.dsp0000755001134200020070000001144512602615516021323 0ustar embrayscience00000000000000# Microsoft Developer Studio Project File - Name="expat" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=expat - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "expat.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "expat.mak" CFG="expat - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "expat - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "expat - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "expat - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\win32\bin\Release" # PROP Intermediate_Dir "..\win32\tmp\Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILED_FROM_DSP" /FD /c # SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /dll /machine:I386 # ADD LINK32 /nologo /dll /pdb:none /machine:I386 /out:"..\win32\bin\Release\libexpat.dll" !ELSEIF "$(CFG)" == "expat - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\win32\bin\Debug" # PROP Intermediate_Dir "..\win32\tmp\Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c # ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 /nologo /dll /pdb:none /debug /machine:I386 /out:"..\win32\bin\Debug\libexpat.dll" !ENDIF # Begin Target # Name "expat - Win32 Release" # Name "expat - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\libexpat.def # End Source File # Begin Source File SOURCE=.\xmlparse.c !IF "$(CFG)" == "expat - Win32 Release" !ELSEIF "$(CFG)" == "expat - Win32 Debug" # ADD CPP /GX- /Od !ENDIF # End Source File # Begin Source File SOURCE=.\xmlrole.c # End Source File # Begin Source File SOURCE=.\xmltok.c # End Source File # Begin Source File SOURCE=.\xmltok_impl.c # End Source File # Begin Source File SOURCE=.\xmltok_ns.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=.\ascii.h # End Source File # Begin Source File SOURCE=.\asciitab.h # End Source File # Begin Source File SOURCE=.\expat.h # End Source File # Begin Source File SOURCE=.\expat_external.h # End Source File # Begin Source File SOURCE=.\iasciitab.h # End Source File # Begin Source File SOURCE=.\internal.h # End Source File # Begin Source File SOURCE=.\latin1tab.h # End Source File # Begin Source File SOURCE=.\nametab.h # End Source File # Begin Source File SOURCE=.\utf8tab.h # End Source File # Begin Source File SOURCE=.\xmlrole.h # End Source File # Begin Source File SOURCE=.\xmltok.h # End Source File # Begin Source File SOURCE=.\xmltok_impl.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project astropy-1.1.1/cextern/expat/lib/latin1tab.h0000755001134200020070000000342512602615516021521 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ /* 0x80 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, /* 0x84 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, /* 0x88 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, /* 0x8C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, /* 0x90 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, /* 0x94 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, /* 0x98 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, /* 0x9C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, /* 0xA0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, /* 0xA4 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, /* 0xA8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER, /* 0xAC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, /* 0xB0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, /* 0xB4 */ BT_OTHER, BT_NMSTRT, BT_OTHER, BT_NAME, /* 0xB8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER, /* 0xBC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, /* 0xC0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0xC4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0xC8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0xCC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0xD0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0xD4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, /* 0xD8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0xDC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0xE0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0xE4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0xE8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0xEC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0xF0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0xF4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, /* 0xF8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0xFC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, astropy-1.1.1/cextern/expat/lib/ascii.h0000755001134200020070000000370112602615516020727 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #define ASCII_A 0x41 #define ASCII_B 0x42 #define ASCII_C 0x43 #define ASCII_D 0x44 #define ASCII_E 0x45 #define ASCII_F 0x46 #define ASCII_G 0x47 #define ASCII_H 0x48 #define ASCII_I 0x49 #define ASCII_J 0x4A #define ASCII_K 0x4B #define ASCII_L 0x4C #define ASCII_M 0x4D #define ASCII_N 0x4E #define ASCII_O 0x4F #define ASCII_P 0x50 #define ASCII_Q 0x51 #define ASCII_R 0x52 #define ASCII_S 0x53 #define ASCII_T 0x54 #define ASCII_U 0x55 #define ASCII_V 0x56 #define ASCII_W 0x57 #define ASCII_X 0x58 #define ASCII_Y 0x59 #define ASCII_Z 0x5A #define ASCII_a 0x61 #define ASCII_b 0x62 #define ASCII_c 0x63 #define ASCII_d 0x64 #define ASCII_e 0x65 #define ASCII_f 0x66 #define ASCII_g 0x67 #define ASCII_h 0x68 #define ASCII_i 0x69 #define ASCII_j 0x6A #define ASCII_k 0x6B #define ASCII_l 0x6C #define ASCII_m 0x6D #define ASCII_n 0x6E #define ASCII_o 0x6F #define ASCII_p 0x70 #define ASCII_q 0x71 #define ASCII_r 0x72 #define ASCII_s 0x73 #define ASCII_t 0x74 #define ASCII_u 0x75 #define ASCII_v 0x76 #define ASCII_w 0x77 #define ASCII_x 0x78 #define ASCII_y 0x79 #define ASCII_z 0x7A #define ASCII_0 0x30 #define ASCII_1 0x31 #define ASCII_2 0x32 #define ASCII_3 0x33 #define ASCII_4 0x34 #define ASCII_5 0x35 #define ASCII_6 0x36 #define ASCII_7 0x37 #define ASCII_8 0x38 #define ASCII_9 0x39 #define ASCII_TAB 0x09 #define ASCII_SPACE 0x20 #define ASCII_EXCL 0x21 #define ASCII_QUOT 0x22 #define ASCII_AMP 0x26 #define ASCII_APOS 0x27 #define ASCII_MINUS 0x2D #define ASCII_PERIOD 0x2E #define ASCII_COLON 0x3A #define ASCII_SEMI 0x3B #define ASCII_LT 0x3C #define ASCII_EQUALS 0x3D #define ASCII_GT 0x3E #define ASCII_LSQB 0x5B #define ASCII_RSQB 0x5D #define ASCII_UNDERSCORE 0x5F #define ASCII_LPAREN 0x28 #define ASCII_RPAREN 0x29 #define ASCII_FF 0x0C #define ASCII_SLASH 0x2F #define ASCII_HASH 0x23 #define ASCII_PIPE 0x7C #define ASCII_COMMA 0x2C astropy-1.1.1/cextern/expat/lib/xmlparse.c0000755001134200020070000060175512602615516021502 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #include #include /* memset(), memcpy() */ #include #include /* UINT_MAX */ #include /* time() */ #define XML_BUILDING_EXPAT 1 #ifdef COMPILED_FROM_DSP #include "winconfig.h" #elif defined(MACOS_CLASSIC) #include "macconfig.h" #elif defined(__amigaos__) #include "amigaconfig.h" #elif defined(__WATCOMC__) #include "watcomconfig.h" #elif defined(HAVE_EXPAT_CONFIG_H) #include #endif /* ndef COMPILED_FROM_DSP */ #include "ascii.h" #include "expat.h" #ifdef XML_UNICODE #define XML_ENCODE_MAX XML_UTF16_ENCODE_MAX #define XmlConvert XmlUtf16Convert #define XmlGetInternalEncoding XmlGetUtf16InternalEncoding #define XmlGetInternalEncodingNS XmlGetUtf16InternalEncodingNS #define XmlEncode XmlUtf16Encode /* Using pointer subtraction to convert to integer type. */ #define MUST_CONVERT(enc, s) (!(enc)->isUtf16 || (((char *)(s) - (char *)NULL) & 1)) typedef unsigned short ICHAR; #else #define XML_ENCODE_MAX XML_UTF8_ENCODE_MAX #define XmlConvert XmlUtf8Convert #define XmlGetInternalEncoding XmlGetUtf8InternalEncoding #define XmlGetInternalEncodingNS XmlGetUtf8InternalEncodingNS #define XmlEncode XmlUtf8Encode #define MUST_CONVERT(enc, s) (!(enc)->isUtf8) typedef char ICHAR; #endif #ifndef XML_NS #define XmlInitEncodingNS XmlInitEncoding #define XmlInitUnknownEncodingNS XmlInitUnknownEncoding #undef XmlGetInternalEncodingNS #define XmlGetInternalEncodingNS XmlGetInternalEncoding #define XmlParseXmlDeclNS XmlParseXmlDecl #endif #ifdef XML_UNICODE #ifdef XML_UNICODE_WCHAR_T #define XML_T(x) (const wchar_t)x #define XML_L(x) L ## x #else #define XML_T(x) (const unsigned short)x #define XML_L(x) x #endif #else #define XML_T(x) x #define XML_L(x) x #endif /* Round up n to be a multiple of sz, where sz is a power of 2. */ #define ROUND_UP(n, sz) (((n) + ((sz) - 1)) & ~((sz) - 1)) /* Handle the case where memmove() doesn't exist. */ #ifndef HAVE_MEMMOVE #ifdef HAVE_BCOPY #define memmove(d,s,l) bcopy((s),(d),(l)) #else #error memmove does not exist on this platform, nor is a substitute available #endif /* HAVE_BCOPY */ #endif /* HAVE_MEMMOVE */ #include "internal.h" #include "xmltok.h" #include "xmlrole.h" typedef const XML_Char *KEY; typedef struct { KEY name; } NAMED; typedef struct { NAMED **v; unsigned char power; size_t size; size_t used; const XML_Memory_Handling_Suite *mem; } HASH_TABLE; /* Basic character hash algorithm, taken from Python's string hash: h = h * 1000003 ^ character, the constant being a prime number. */ #ifdef XML_UNICODE #define CHAR_HASH(h, c) \ (((h) * 0xF4243) ^ (unsigned short)(c)) #else #define CHAR_HASH(h, c) \ (((h) * 0xF4243) ^ (unsigned char)(c)) #endif /* For probing (after a collision) we need a step size relative prime to the hash table size, which is a power of 2. We use double-hashing, since we can calculate a second hash value cheaply by taking those bits of the first hash value that were discarded (masked out) when the table index was calculated: index = hash & mask, where mask = table->size - 1. We limit the maximum step size to table->size / 4 (mask >> 2) and make it odd, since odd numbers are always relative prime to a power of 2. */ #define SECOND_HASH(hash, mask, power) \ ((((hash) & ~(mask)) >> ((power) - 1)) & ((mask) >> 2)) #define PROBE_STEP(hash, mask, power) \ ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1)) typedef struct { NAMED **p; NAMED **end; } HASH_TABLE_ITER; #define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */ #define INIT_DATA_BUF_SIZE 1024 #define INIT_ATTS_SIZE 16 #define INIT_ATTS_VERSION 0xFFFFFFFF #define INIT_BLOCK_SIZE 1024 #define INIT_BUFFER_SIZE 1024 #define EXPAND_SPARE 24 typedef struct binding { struct prefix *prefix; struct binding *nextTagBinding; struct binding *prevPrefixBinding; const struct attribute_id *attId; XML_Char *uri; int uriLen; int uriAlloc; } BINDING; typedef struct prefix { const XML_Char *name; BINDING *binding; } PREFIX; typedef struct { const XML_Char *str; const XML_Char *localPart; const XML_Char *prefix; int strLen; int uriLen; int prefixLen; } TAG_NAME; /* TAG represents an open element. The name of the element is stored in both the document and API encodings. The memory buffer 'buf' is a separately-allocated memory area which stores the name. During the XML_Parse()/ XMLParseBuffer() when the element is open, the memory for the 'raw' version of the name (in the document encoding) is shared with the document buffer. If the element is open across calls to XML_Parse()/XML_ParseBuffer(), the buffer is re-allocated to contain the 'raw' name as well. A parser re-uses these structures, maintaining a list of allocated TAG objects in a free list. */ typedef struct tag { struct tag *parent; /* parent of this element */ const char *rawName; /* tagName in the original encoding */ int rawNameLength; TAG_NAME name; /* tagName in the API encoding */ char *buf; /* buffer for name components */ char *bufEnd; /* end of the buffer */ BINDING *bindings; } TAG; typedef struct { const XML_Char *name; const XML_Char *textPtr; int textLen; /* length in XML_Chars */ int processed; /* # of processed bytes - when suspended */ const XML_Char *systemId; const XML_Char *base; const XML_Char *publicId; const XML_Char *notation; XML_Bool open; XML_Bool is_param; XML_Bool is_internal; /* true if declared in internal subset outside PE */ } ENTITY; typedef struct { enum XML_Content_Type type; enum XML_Content_Quant quant; const XML_Char * name; int firstchild; int lastchild; int childcnt; int nextsib; } CONTENT_SCAFFOLD; #define INIT_SCAFFOLD_ELEMENTS 32 typedef struct block { struct block *next; int size; XML_Char s[1]; } BLOCK; typedef struct { BLOCK *blocks; BLOCK *freeBlocks; const XML_Char *end; XML_Char *ptr; XML_Char *start; const XML_Memory_Handling_Suite *mem; } STRING_POOL; /* The XML_Char before the name is used to determine whether an attribute has been specified. */ typedef struct attribute_id { XML_Char *name; PREFIX *prefix; XML_Bool maybeTokenized; XML_Bool xmlns; } ATTRIBUTE_ID; typedef struct { const ATTRIBUTE_ID *id; XML_Bool isCdata; const XML_Char *value; } DEFAULT_ATTRIBUTE; typedef struct { unsigned long version; unsigned long hash; const XML_Char *uriName; } NS_ATT; typedef struct { const XML_Char *name; PREFIX *prefix; const ATTRIBUTE_ID *idAtt; int nDefaultAtts; int allocDefaultAtts; DEFAULT_ATTRIBUTE *defaultAtts; } ELEMENT_TYPE; typedef struct { HASH_TABLE generalEntities; HASH_TABLE elementTypes; HASH_TABLE attributeIds; HASH_TABLE prefixes; STRING_POOL pool; STRING_POOL entityValuePool; /* false once a parameter entity reference has been skipped */ XML_Bool keepProcessing; /* true once an internal or external PE reference has been encountered; this includes the reference to an external subset */ XML_Bool hasParamEntityRefs; XML_Bool standalone; #ifdef XML_DTD /* indicates if external PE has been read */ XML_Bool paramEntityRead; HASH_TABLE paramEntities; #endif /* XML_DTD */ PREFIX defaultPrefix; /* === scaffolding for building content model === */ XML_Bool in_eldecl; CONTENT_SCAFFOLD *scaffold; unsigned contentStringLen; unsigned scaffSize; unsigned scaffCount; int scaffLevel; int *scaffIndex; } DTD; typedef struct open_internal_entity { const char *internalEventPtr; const char *internalEventEndPtr; struct open_internal_entity *next; ENTITY *entity; int startTagLevel; XML_Bool betweenDecl; /* WFC: PE Between Declarations */ } OPEN_INTERNAL_ENTITY; typedef enum XML_Error PTRCALL Processor(XML_Parser parser, const char *start, const char *end, const char **endPtr); static Processor prologProcessor; static Processor prologInitProcessor; static Processor contentProcessor; static Processor cdataSectionProcessor; #ifdef XML_DTD static Processor ignoreSectionProcessor; static Processor externalParEntProcessor; static Processor externalParEntInitProcessor; static Processor entityValueProcessor; static Processor entityValueInitProcessor; #endif /* XML_DTD */ static Processor epilogProcessor; static Processor errorProcessor; static Processor externalEntityInitProcessor; static Processor externalEntityInitProcessor2; static Processor externalEntityInitProcessor3; static Processor externalEntityContentProcessor; static Processor internalEntityProcessor; static enum XML_Error handleUnknownEncoding(XML_Parser parser, const XML_Char *encodingName); static enum XML_Error processXmlDecl(XML_Parser parser, int isGeneralTextEntity, const char *s, const char *next); static enum XML_Error initializeEncoding(XML_Parser parser); static enum XML_Error doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end, int tok, const char *next, const char **nextPtr, XML_Bool haveMore); static enum XML_Error processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl); static enum XML_Error doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc, const char *start, const char *end, const char **endPtr, XML_Bool haveMore); static enum XML_Error doCdataSection(XML_Parser parser, const ENCODING *, const char **startPtr, const char *end, const char **nextPtr, XML_Bool haveMore); #ifdef XML_DTD static enum XML_Error doIgnoreSection(XML_Parser parser, const ENCODING *, const char **startPtr, const char *end, const char **nextPtr, XML_Bool haveMore); #endif /* XML_DTD */ static enum XML_Error storeAtts(XML_Parser parser, const ENCODING *, const char *s, TAG_NAME *tagNamePtr, BINDING **bindingsPtr); static enum XML_Error addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId, const XML_Char *uri, BINDING **bindingsPtr); static int defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *, XML_Bool isCdata, XML_Bool isId, const XML_Char *dfltValue, XML_Parser parser); static enum XML_Error storeAttributeValue(XML_Parser parser, const ENCODING *, XML_Bool isCdata, const char *, const char *, STRING_POOL *); static enum XML_Error appendAttributeValue(XML_Parser parser, const ENCODING *, XML_Bool isCdata, const char *, const char *, STRING_POOL *); static ATTRIBUTE_ID * getAttributeId(XML_Parser parser, const ENCODING *enc, const char *start, const char *end); static int setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *); static enum XML_Error storeEntityValue(XML_Parser parser, const ENCODING *enc, const char *start, const char *end); static int reportProcessingInstruction(XML_Parser parser, const ENCODING *enc, const char *start, const char *end); static int reportComment(XML_Parser parser, const ENCODING *enc, const char *start, const char *end); static void reportDefault(XML_Parser parser, const ENCODING *enc, const char *start, const char *end); static const XML_Char * getContext(XML_Parser parser); static XML_Bool setContext(XML_Parser parser, const XML_Char *context); static void FASTCALL normalizePublicId(XML_Char *s); static DTD * dtdCreate(const XML_Memory_Handling_Suite *ms); /* do not call if parentParser != NULL */ static void dtdReset(DTD *p, const XML_Memory_Handling_Suite *ms); static void dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms); static int dtdCopy(XML_Parser oldParser, DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms); static int copyEntityTable(XML_Parser oldParser, HASH_TABLE *, STRING_POOL *, const HASH_TABLE *); static NAMED * lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize); static void FASTCALL hashTableInit(HASH_TABLE *, const XML_Memory_Handling_Suite *ms); static void FASTCALL hashTableClear(HASH_TABLE *); static void FASTCALL hashTableDestroy(HASH_TABLE *); static void FASTCALL hashTableIterInit(HASH_TABLE_ITER *, const HASH_TABLE *); static NAMED * FASTCALL hashTableIterNext(HASH_TABLE_ITER *); static void FASTCALL poolInit(STRING_POOL *, const XML_Memory_Handling_Suite *ms); static void FASTCALL poolClear(STRING_POOL *); static void FASTCALL poolDestroy(STRING_POOL *); static XML_Char * poolAppend(STRING_POOL *pool, const ENCODING *enc, const char *ptr, const char *end); static XML_Char * poolStoreString(STRING_POOL *pool, const ENCODING *enc, const char *ptr, const char *end); static XML_Bool FASTCALL poolGrow(STRING_POOL *pool); static const XML_Char * FASTCALL poolCopyString(STRING_POOL *pool, const XML_Char *s); static const XML_Char * poolCopyStringN(STRING_POOL *pool, const XML_Char *s, int n); static const XML_Char * FASTCALL poolAppendString(STRING_POOL *pool, const XML_Char *s); static int FASTCALL nextScaffoldPart(XML_Parser parser); static XML_Content * build_model(XML_Parser parser); static ELEMENT_TYPE * getElementType(XML_Parser parser, const ENCODING *enc, const char *ptr, const char *end); static unsigned long generate_hash_secret_salt(void); static XML_Bool startParsing(XML_Parser parser); static XML_Parser parserCreate(const XML_Char *encodingName, const XML_Memory_Handling_Suite *memsuite, const XML_Char *nameSep, DTD *dtd); static void parserInit(XML_Parser parser, const XML_Char *encodingName); #define poolStart(pool) ((pool)->start) #define poolEnd(pool) ((pool)->ptr) #define poolLength(pool) ((pool)->ptr - (pool)->start) #define poolChop(pool) ((void)--(pool->ptr)) #define poolLastChar(pool) (((pool)->ptr)[-1]) #define poolDiscard(pool) ((pool)->ptr = (pool)->start) #define poolFinish(pool) ((pool)->start = (pool)->ptr) #define poolAppendChar(pool, c) \ (((pool)->ptr == (pool)->end && !poolGrow(pool)) \ ? 0 \ : ((*((pool)->ptr)++ = c), 1)) struct XML_ParserStruct { /* The first member must be userData so that the XML_GetUserData macro works. */ void *m_userData; void *m_handlerArg; char *m_buffer; const XML_Memory_Handling_Suite m_mem; /* first character to be parsed */ const char *m_bufferPtr; /* past last character to be parsed */ char *m_bufferEnd; /* allocated end of buffer */ const char *m_bufferLim; XML_Index m_parseEndByteIndex; const char *m_parseEndPtr; XML_Char *m_dataBuf; XML_Char *m_dataBufEnd; XML_StartElementHandler m_startElementHandler; XML_EndElementHandler m_endElementHandler; XML_CharacterDataHandler m_characterDataHandler; XML_ProcessingInstructionHandler m_processingInstructionHandler; XML_CommentHandler m_commentHandler; XML_StartCdataSectionHandler m_startCdataSectionHandler; XML_EndCdataSectionHandler m_endCdataSectionHandler; XML_DefaultHandler m_defaultHandler; XML_StartDoctypeDeclHandler m_startDoctypeDeclHandler; XML_EndDoctypeDeclHandler m_endDoctypeDeclHandler; XML_UnparsedEntityDeclHandler m_unparsedEntityDeclHandler; XML_NotationDeclHandler m_notationDeclHandler; XML_StartNamespaceDeclHandler m_startNamespaceDeclHandler; XML_EndNamespaceDeclHandler m_endNamespaceDeclHandler; XML_NotStandaloneHandler m_notStandaloneHandler; XML_ExternalEntityRefHandler m_externalEntityRefHandler; XML_Parser m_externalEntityRefHandlerArg; XML_SkippedEntityHandler m_skippedEntityHandler; XML_UnknownEncodingHandler m_unknownEncodingHandler; XML_ElementDeclHandler m_elementDeclHandler; XML_AttlistDeclHandler m_attlistDeclHandler; XML_EntityDeclHandler m_entityDeclHandler; XML_XmlDeclHandler m_xmlDeclHandler; const ENCODING *m_encoding; INIT_ENCODING m_initEncoding; const ENCODING *m_internalEncoding; const XML_Char *m_protocolEncodingName; XML_Bool m_ns; XML_Bool m_ns_triplets; void *m_unknownEncodingMem; void *m_unknownEncodingData; void *m_unknownEncodingHandlerData; void (XMLCALL *m_unknownEncodingRelease)(void *); PROLOG_STATE m_prologState; Processor *m_processor; enum XML_Error m_errorCode; const char *m_eventPtr; const char *m_eventEndPtr; const char *m_positionPtr; OPEN_INTERNAL_ENTITY *m_openInternalEntities; OPEN_INTERNAL_ENTITY *m_freeInternalEntities; XML_Bool m_defaultExpandInternalEntities; int m_tagLevel; ENTITY *m_declEntity; const XML_Char *m_doctypeName; const XML_Char *m_doctypeSysid; const XML_Char *m_doctypePubid; const XML_Char *m_declAttributeType; const XML_Char *m_declNotationName; const XML_Char *m_declNotationPublicId; ELEMENT_TYPE *m_declElementType; ATTRIBUTE_ID *m_declAttributeId; XML_Bool m_declAttributeIsCdata; XML_Bool m_declAttributeIsId; DTD *m_dtd; const XML_Char *m_curBase; TAG *m_tagStack; TAG *m_freeTagList; BINDING *m_inheritedBindings; BINDING *m_freeBindingList; int m_attsSize; int m_nSpecifiedAtts; int m_idAttIndex; ATTRIBUTE *m_atts; NS_ATT *m_nsAtts; unsigned long m_nsAttsVersion; unsigned char m_nsAttsPower; #ifdef XML_ATTR_INFO XML_AttrInfo *m_attInfo; #endif POSITION m_position; STRING_POOL m_tempPool; STRING_POOL m_temp2Pool; char *m_groupConnector; unsigned int m_groupSize; XML_Char m_namespaceSeparator; XML_Parser m_parentParser; XML_ParsingStatus m_parsingStatus; #ifdef XML_DTD XML_Bool m_isParamEntity; XML_Bool m_useForeignDTD; enum XML_ParamEntityParsing m_paramEntityParsing; #endif unsigned long m_hash_secret_salt; }; #define MALLOC(s) (parser->m_mem.malloc_fcn((s))) #define REALLOC(p,s) (parser->m_mem.realloc_fcn((p),(s))) #define FREE(p) (parser->m_mem.free_fcn((p))) #define userData (parser->m_userData) #define handlerArg (parser->m_handlerArg) #define startElementHandler (parser->m_startElementHandler) #define endElementHandler (parser->m_endElementHandler) #define characterDataHandler (parser->m_characterDataHandler) #define processingInstructionHandler \ (parser->m_processingInstructionHandler) #define commentHandler (parser->m_commentHandler) #define startCdataSectionHandler \ (parser->m_startCdataSectionHandler) #define endCdataSectionHandler (parser->m_endCdataSectionHandler) #define defaultHandler (parser->m_defaultHandler) #define startDoctypeDeclHandler (parser->m_startDoctypeDeclHandler) #define endDoctypeDeclHandler (parser->m_endDoctypeDeclHandler) #define unparsedEntityDeclHandler \ (parser->m_unparsedEntityDeclHandler) #define notationDeclHandler (parser->m_notationDeclHandler) #define startNamespaceDeclHandler \ (parser->m_startNamespaceDeclHandler) #define endNamespaceDeclHandler (parser->m_endNamespaceDeclHandler) #define notStandaloneHandler (parser->m_notStandaloneHandler) #define externalEntityRefHandler \ (parser->m_externalEntityRefHandler) #define externalEntityRefHandlerArg \ (parser->m_externalEntityRefHandlerArg) #define internalEntityRefHandler \ (parser->m_internalEntityRefHandler) #define skippedEntityHandler (parser->m_skippedEntityHandler) #define unknownEncodingHandler (parser->m_unknownEncodingHandler) #define elementDeclHandler (parser->m_elementDeclHandler) #define attlistDeclHandler (parser->m_attlistDeclHandler) #define entityDeclHandler (parser->m_entityDeclHandler) #define xmlDeclHandler (parser->m_xmlDeclHandler) #define encoding (parser->m_encoding) #define initEncoding (parser->m_initEncoding) #define internalEncoding (parser->m_internalEncoding) #define unknownEncodingMem (parser->m_unknownEncodingMem) #define unknownEncodingData (parser->m_unknownEncodingData) #define unknownEncodingHandlerData \ (parser->m_unknownEncodingHandlerData) #define unknownEncodingRelease (parser->m_unknownEncodingRelease) #define protocolEncodingName (parser->m_protocolEncodingName) #define ns (parser->m_ns) #define ns_triplets (parser->m_ns_triplets) #define prologState (parser->m_prologState) #define processor (parser->m_processor) #define errorCode (parser->m_errorCode) #define eventPtr (parser->m_eventPtr) #define eventEndPtr (parser->m_eventEndPtr) #define positionPtr (parser->m_positionPtr) #define position (parser->m_position) #define openInternalEntities (parser->m_openInternalEntities) #define freeInternalEntities (parser->m_freeInternalEntities) #define defaultExpandInternalEntities \ (parser->m_defaultExpandInternalEntities) #define tagLevel (parser->m_tagLevel) #define buffer (parser->m_buffer) #define bufferPtr (parser->m_bufferPtr) #define bufferEnd (parser->m_bufferEnd) #define parseEndByteIndex (parser->m_parseEndByteIndex) #define parseEndPtr (parser->m_parseEndPtr) #define bufferLim (parser->m_bufferLim) #define dataBuf (parser->m_dataBuf) #define dataBufEnd (parser->m_dataBufEnd) #define _dtd (parser->m_dtd) #define curBase (parser->m_curBase) #define declEntity (parser->m_declEntity) #define doctypeName (parser->m_doctypeName) #define doctypeSysid (parser->m_doctypeSysid) #define doctypePubid (parser->m_doctypePubid) #define declAttributeType (parser->m_declAttributeType) #define declNotationName (parser->m_declNotationName) #define declNotationPublicId (parser->m_declNotationPublicId) #define declElementType (parser->m_declElementType) #define declAttributeId (parser->m_declAttributeId) #define declAttributeIsCdata (parser->m_declAttributeIsCdata) #define declAttributeIsId (parser->m_declAttributeIsId) #define freeTagList (parser->m_freeTagList) #define freeBindingList (parser->m_freeBindingList) #define inheritedBindings (parser->m_inheritedBindings) #define tagStack (parser->m_tagStack) #define atts (parser->m_atts) #define attsSize (parser->m_attsSize) #define nSpecifiedAtts (parser->m_nSpecifiedAtts) #define idAttIndex (parser->m_idAttIndex) #define nsAtts (parser->m_nsAtts) #define nsAttsVersion (parser->m_nsAttsVersion) #define nsAttsPower (parser->m_nsAttsPower) #define attInfo (parser->m_attInfo) #define tempPool (parser->m_tempPool) #define temp2Pool (parser->m_temp2Pool) #define groupConnector (parser->m_groupConnector) #define groupSize (parser->m_groupSize) #define namespaceSeparator (parser->m_namespaceSeparator) #define parentParser (parser->m_parentParser) #define ps_parsing (parser->m_parsingStatus.parsing) #define ps_finalBuffer (parser->m_parsingStatus.finalBuffer) #ifdef XML_DTD #define isParamEntity (parser->m_isParamEntity) #define useForeignDTD (parser->m_useForeignDTD) #define paramEntityParsing (parser->m_paramEntityParsing) #endif /* XML_DTD */ #define hash_secret_salt (parser->m_hash_secret_salt) XML_Parser XMLCALL XML_ParserCreate(const XML_Char *encodingName) { return XML_ParserCreate_MM(encodingName, NULL, NULL); } XML_Parser XMLCALL XML_ParserCreateNS(const XML_Char *encodingName, XML_Char nsSep) { XML_Char tmp[2]; *tmp = nsSep; return XML_ParserCreate_MM(encodingName, NULL, tmp); } static const XML_Char implicitContext[] = { ASCII_x, ASCII_m, ASCII_l, ASCII_EQUALS, ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w, ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, ASCII_o, ASCII_r, ASCII_g, ASCII_SLASH, ASCII_X, ASCII_M, ASCII_L, ASCII_SLASH, ASCII_1, ASCII_9, ASCII_9, ASCII_8, ASCII_SLASH, ASCII_n, ASCII_a, ASCII_m, ASCII_e, ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0' }; static unsigned long generate_hash_secret_salt(void) { unsigned int seed = time(NULL) % UINT_MAX; srand(seed); return rand(); } static XML_Bool /* only valid for root parser */ startParsing(XML_Parser parser) { /* hash functions must be initialized before setContext() is called */ if (hash_secret_salt == 0) hash_secret_salt = generate_hash_secret_salt(); if (ns) { /* implicit context only set for root parser, since child parsers (i.e. external entity parsers) will inherit it */ return setContext(parser, implicitContext); } return XML_TRUE; } XML_Parser XMLCALL XML_ParserCreate_MM(const XML_Char *encodingName, const XML_Memory_Handling_Suite *memsuite, const XML_Char *nameSep) { return parserCreate(encodingName, memsuite, nameSep, NULL); } static XML_Parser parserCreate(const XML_Char *encodingName, const XML_Memory_Handling_Suite *memsuite, const XML_Char *nameSep, DTD *dtd) { XML_Parser parser; if (memsuite) { XML_Memory_Handling_Suite *mtemp; parser = (XML_Parser) memsuite->malloc_fcn(sizeof(struct XML_ParserStruct)); if (parser != NULL) { mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem); mtemp->malloc_fcn = memsuite->malloc_fcn; mtemp->realloc_fcn = memsuite->realloc_fcn; mtemp->free_fcn = memsuite->free_fcn; } } else { XML_Memory_Handling_Suite *mtemp; parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct)); if (parser != NULL) { mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem); mtemp->malloc_fcn = malloc; mtemp->realloc_fcn = realloc; mtemp->free_fcn = free; } } if (!parser) return parser; buffer = NULL; bufferLim = NULL; attsSize = INIT_ATTS_SIZE; atts = (ATTRIBUTE *)MALLOC(attsSize * sizeof(ATTRIBUTE)); if (atts == NULL) { FREE(parser); return NULL; } #ifdef XML_ATTR_INFO attInfo = (XML_AttrInfo*)MALLOC(attsSize * sizeof(XML_AttrInfo)); if (attInfo == NULL) { FREE(atts); FREE(parser); return NULL; } #endif dataBuf = (XML_Char *)MALLOC(INIT_DATA_BUF_SIZE * sizeof(XML_Char)); if (dataBuf == NULL) { FREE(atts); #ifdef XML_ATTR_INFO FREE(attInfo); #endif FREE(parser); return NULL; } dataBufEnd = dataBuf + INIT_DATA_BUF_SIZE; if (dtd) _dtd = dtd; else { _dtd = dtdCreate(&parser->m_mem); if (_dtd == NULL) { FREE(dataBuf); FREE(atts); #ifdef XML_ATTR_INFO FREE(attInfo); #endif FREE(parser); return NULL; } } freeBindingList = NULL; freeTagList = NULL; freeInternalEntities = NULL; groupSize = 0; groupConnector = NULL; unknownEncodingHandler = NULL; unknownEncodingHandlerData = NULL; namespaceSeparator = ASCII_EXCL; ns = XML_FALSE; ns_triplets = XML_FALSE; nsAtts = NULL; nsAttsVersion = 0; nsAttsPower = 0; poolInit(&tempPool, &(parser->m_mem)); poolInit(&temp2Pool, &(parser->m_mem)); parserInit(parser, encodingName); if (encodingName && !protocolEncodingName) { XML_ParserFree(parser); return NULL; } if (nameSep) { ns = XML_TRUE; internalEncoding = XmlGetInternalEncodingNS(); namespaceSeparator = *nameSep; } else { internalEncoding = XmlGetInternalEncoding(); } return parser; } static void parserInit(XML_Parser parser, const XML_Char *encodingName) { processor = prologInitProcessor; XmlPrologStateInit(&prologState); protocolEncodingName = (encodingName != NULL ? poolCopyString(&tempPool, encodingName) : NULL); curBase = NULL; XmlInitEncoding(&initEncoding, &encoding, 0); userData = NULL; handlerArg = NULL; startElementHandler = NULL; endElementHandler = NULL; characterDataHandler = NULL; processingInstructionHandler = NULL; commentHandler = NULL; startCdataSectionHandler = NULL; endCdataSectionHandler = NULL; defaultHandler = NULL; startDoctypeDeclHandler = NULL; endDoctypeDeclHandler = NULL; unparsedEntityDeclHandler = NULL; notationDeclHandler = NULL; startNamespaceDeclHandler = NULL; endNamespaceDeclHandler = NULL; notStandaloneHandler = NULL; externalEntityRefHandler = NULL; externalEntityRefHandlerArg = parser; skippedEntityHandler = NULL; elementDeclHandler = NULL; attlistDeclHandler = NULL; entityDeclHandler = NULL; xmlDeclHandler = NULL; bufferPtr = buffer; bufferEnd = buffer; parseEndByteIndex = 0; parseEndPtr = NULL; declElementType = NULL; declAttributeId = NULL; declEntity = NULL; doctypeName = NULL; doctypeSysid = NULL; doctypePubid = NULL; declAttributeType = NULL; declNotationName = NULL; declNotationPublicId = NULL; declAttributeIsCdata = XML_FALSE; declAttributeIsId = XML_FALSE; memset(&position, 0, sizeof(POSITION)); errorCode = XML_ERROR_NONE; eventPtr = NULL; eventEndPtr = NULL; positionPtr = NULL; openInternalEntities = NULL; defaultExpandInternalEntities = XML_TRUE; tagLevel = 0; tagStack = NULL; inheritedBindings = NULL; nSpecifiedAtts = 0; unknownEncodingMem = NULL; unknownEncodingRelease = NULL; unknownEncodingData = NULL; parentParser = NULL; ps_parsing = XML_INITIALIZED; #ifdef XML_DTD isParamEntity = XML_FALSE; useForeignDTD = XML_FALSE; paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER; #endif hash_secret_salt = 0; } /* moves list of bindings to freeBindingList */ static void FASTCALL moveToFreeBindingList(XML_Parser parser, BINDING *bindings) { while (bindings) { BINDING *b = bindings; bindings = bindings->nextTagBinding; b->nextTagBinding = freeBindingList; freeBindingList = b; } } XML_Bool XMLCALL XML_ParserReset(XML_Parser parser, const XML_Char *encodingName) { TAG *tStk; OPEN_INTERNAL_ENTITY *openEntityList; if (parentParser) return XML_FALSE; /* move tagStack to freeTagList */ tStk = tagStack; while (tStk) { TAG *tag = tStk; tStk = tStk->parent; tag->parent = freeTagList; moveToFreeBindingList(parser, tag->bindings); tag->bindings = NULL; freeTagList = tag; } /* move openInternalEntities to freeInternalEntities */ openEntityList = openInternalEntities; while (openEntityList) { OPEN_INTERNAL_ENTITY *openEntity = openEntityList; openEntityList = openEntity->next; openEntity->next = freeInternalEntities; freeInternalEntities = openEntity; } moveToFreeBindingList(parser, inheritedBindings); FREE(unknownEncodingMem); if (unknownEncodingRelease) unknownEncodingRelease(unknownEncodingData); poolClear(&tempPool); poolClear(&temp2Pool); parserInit(parser, encodingName); dtdReset(_dtd, &parser->m_mem); return XML_TRUE; } enum XML_Status XMLCALL XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName) { /* Block after XML_Parse()/XML_ParseBuffer() has been called. XXX There's no way for the caller to determine which of the XXX possible error cases caused the XML_STATUS_ERROR return. */ if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) return XML_STATUS_ERROR; if (encodingName == NULL) protocolEncodingName = NULL; else { protocolEncodingName = poolCopyString(&tempPool, encodingName); if (!protocolEncodingName) return XML_STATUS_ERROR; } return XML_STATUS_OK; } XML_Parser XMLCALL XML_ExternalEntityParserCreate(XML_Parser oldParser, const XML_Char *context, const XML_Char *encodingName) { XML_Parser parser = oldParser; DTD *newDtd = NULL; DTD *oldDtd = _dtd; XML_StartElementHandler oldStartElementHandler = startElementHandler; XML_EndElementHandler oldEndElementHandler = endElementHandler; XML_CharacterDataHandler oldCharacterDataHandler = characterDataHandler; XML_ProcessingInstructionHandler oldProcessingInstructionHandler = processingInstructionHandler; XML_CommentHandler oldCommentHandler = commentHandler; XML_StartCdataSectionHandler oldStartCdataSectionHandler = startCdataSectionHandler; XML_EndCdataSectionHandler oldEndCdataSectionHandler = endCdataSectionHandler; XML_DefaultHandler oldDefaultHandler = defaultHandler; XML_UnparsedEntityDeclHandler oldUnparsedEntityDeclHandler = unparsedEntityDeclHandler; XML_NotationDeclHandler oldNotationDeclHandler = notationDeclHandler; XML_StartNamespaceDeclHandler oldStartNamespaceDeclHandler = startNamespaceDeclHandler; XML_EndNamespaceDeclHandler oldEndNamespaceDeclHandler = endNamespaceDeclHandler; XML_NotStandaloneHandler oldNotStandaloneHandler = notStandaloneHandler; XML_ExternalEntityRefHandler oldExternalEntityRefHandler = externalEntityRefHandler; XML_SkippedEntityHandler oldSkippedEntityHandler = skippedEntityHandler; XML_UnknownEncodingHandler oldUnknownEncodingHandler = unknownEncodingHandler; XML_ElementDeclHandler oldElementDeclHandler = elementDeclHandler; XML_AttlistDeclHandler oldAttlistDeclHandler = attlistDeclHandler; XML_EntityDeclHandler oldEntityDeclHandler = entityDeclHandler; XML_XmlDeclHandler oldXmlDeclHandler = xmlDeclHandler; ELEMENT_TYPE * oldDeclElementType = declElementType; void *oldUserData = userData; void *oldHandlerArg = handlerArg; XML_Bool oldDefaultExpandInternalEntities = defaultExpandInternalEntities; XML_Parser oldExternalEntityRefHandlerArg = externalEntityRefHandlerArg; #ifdef XML_DTD enum XML_ParamEntityParsing oldParamEntityParsing = paramEntityParsing; int oldInEntityValue = prologState.inEntityValue; #endif XML_Bool oldns_triplets = ns_triplets; /* Note that the new parser shares the same hash secret as the old parser, so that dtdCopy and copyEntityTable can lookup values from hash tables associated with either parser without us having to worry which hash secrets each table has. */ unsigned long oldhash_secret_salt = hash_secret_salt; #ifdef XML_DTD if (!context) newDtd = oldDtd; #endif /* XML_DTD */ /* Note that the magical uses of the pre-processor to make field access look more like C++ require that `parser' be overwritten here. This makes this function more painful to follow than it would be otherwise. */ if (ns) { XML_Char tmp[2]; *tmp = namespaceSeparator; parser = parserCreate(encodingName, &parser->m_mem, tmp, newDtd); } else { parser = parserCreate(encodingName, &parser->m_mem, NULL, newDtd); } if (!parser) return NULL; startElementHandler = oldStartElementHandler; endElementHandler = oldEndElementHandler; characterDataHandler = oldCharacterDataHandler; processingInstructionHandler = oldProcessingInstructionHandler; commentHandler = oldCommentHandler; startCdataSectionHandler = oldStartCdataSectionHandler; endCdataSectionHandler = oldEndCdataSectionHandler; defaultHandler = oldDefaultHandler; unparsedEntityDeclHandler = oldUnparsedEntityDeclHandler; notationDeclHandler = oldNotationDeclHandler; startNamespaceDeclHandler = oldStartNamespaceDeclHandler; endNamespaceDeclHandler = oldEndNamespaceDeclHandler; notStandaloneHandler = oldNotStandaloneHandler; externalEntityRefHandler = oldExternalEntityRefHandler; skippedEntityHandler = oldSkippedEntityHandler; unknownEncodingHandler = oldUnknownEncodingHandler; elementDeclHandler = oldElementDeclHandler; attlistDeclHandler = oldAttlistDeclHandler; entityDeclHandler = oldEntityDeclHandler; xmlDeclHandler = oldXmlDeclHandler; declElementType = oldDeclElementType; userData = oldUserData; if (oldUserData == oldHandlerArg) handlerArg = userData; else handlerArg = parser; if (oldExternalEntityRefHandlerArg != oldParser) externalEntityRefHandlerArg = oldExternalEntityRefHandlerArg; defaultExpandInternalEntities = oldDefaultExpandInternalEntities; ns_triplets = oldns_triplets; hash_secret_salt = oldhash_secret_salt; parentParser = oldParser; #ifdef XML_DTD paramEntityParsing = oldParamEntityParsing; prologState.inEntityValue = oldInEntityValue; if (context) { #endif /* XML_DTD */ if (!dtdCopy(oldParser, _dtd, oldDtd, &parser->m_mem) || !setContext(parser, context)) { XML_ParserFree(parser); return NULL; } processor = externalEntityInitProcessor; #ifdef XML_DTD } else { /* The DTD instance referenced by _dtd is shared between the document's root parser and external PE parsers, therefore one does not need to call setContext. In addition, one also *must* not call setContext, because this would overwrite existing prefix->binding pointers in _dtd with ones that get destroyed with the external PE parser. This would leave those prefixes with dangling pointers. */ isParamEntity = XML_TRUE; XmlPrologStateInitExternalEntity(&prologState); processor = externalParEntInitProcessor; } #endif /* XML_DTD */ return parser; } static void FASTCALL destroyBindings(BINDING *bindings, XML_Parser parser) { for (;;) { BINDING *b = bindings; if (!b) break; bindings = b->nextTagBinding; FREE(b->uri); FREE(b); } } void XMLCALL XML_ParserFree(XML_Parser parser) { TAG *tagList; OPEN_INTERNAL_ENTITY *entityList; if (parser == NULL) return; /* free tagStack and freeTagList */ tagList = tagStack; for (;;) { TAG *p; if (tagList == NULL) { if (freeTagList == NULL) break; tagList = freeTagList; freeTagList = NULL; } p = tagList; tagList = tagList->parent; FREE(p->buf); destroyBindings(p->bindings, parser); FREE(p); } /* free openInternalEntities and freeInternalEntities */ entityList = openInternalEntities; for (;;) { OPEN_INTERNAL_ENTITY *openEntity; if (entityList == NULL) { if (freeInternalEntities == NULL) break; entityList = freeInternalEntities; freeInternalEntities = NULL; } openEntity = entityList; entityList = entityList->next; FREE(openEntity); } destroyBindings(freeBindingList, parser); destroyBindings(inheritedBindings, parser); poolDestroy(&tempPool); poolDestroy(&temp2Pool); #ifdef XML_DTD /* external parameter entity parsers share the DTD structure parser->m_dtd with the root parser, so we must not destroy it */ if (!isParamEntity && _dtd) #else if (_dtd) #endif /* XML_DTD */ dtdDestroy(_dtd, (XML_Bool)!parentParser, &parser->m_mem); FREE((void *)atts); #ifdef XML_ATTR_INFO FREE((void *)attInfo); #endif FREE(groupConnector); FREE(buffer); FREE(dataBuf); FREE(nsAtts); FREE(unknownEncodingMem); if (unknownEncodingRelease) unknownEncodingRelease(unknownEncodingData); FREE(parser); } void XMLCALL XML_UseParserAsHandlerArg(XML_Parser parser) { handlerArg = parser; } enum XML_Error XMLCALL XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD) { #ifdef XML_DTD /* block after XML_Parse()/XML_ParseBuffer() has been called */ if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) return XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING; useForeignDTD = useDTD; return XML_ERROR_NONE; #else return XML_ERROR_FEATURE_REQUIRES_XML_DTD; #endif } void XMLCALL XML_SetReturnNSTriplet(XML_Parser parser, int do_nst) { /* block after XML_Parse()/XML_ParseBuffer() has been called */ if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) return; ns_triplets = do_nst ? XML_TRUE : XML_FALSE; } void XMLCALL XML_SetUserData(XML_Parser parser, void *p) { if (handlerArg == userData) handlerArg = userData = p; else userData = p; } enum XML_Status XMLCALL XML_SetBase(XML_Parser parser, const XML_Char *p) { if (p) { p = poolCopyString(&_dtd->pool, p); if (!p) return XML_STATUS_ERROR; curBase = p; } else curBase = NULL; return XML_STATUS_OK; } const XML_Char * XMLCALL XML_GetBase(XML_Parser parser) { return curBase; } int XMLCALL XML_GetSpecifiedAttributeCount(XML_Parser parser) { return nSpecifiedAtts; } int XMLCALL XML_GetIdAttributeIndex(XML_Parser parser) { return idAttIndex; } #ifdef XML_ATTR_INFO const XML_AttrInfo * XMLCALL XML_GetAttributeInfo(XML_Parser parser) { return attInfo; } #endif void XMLCALL XML_SetElementHandler(XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end) { startElementHandler = start; endElementHandler = end; } void XMLCALL XML_SetStartElementHandler(XML_Parser parser, XML_StartElementHandler start) { startElementHandler = start; } void XMLCALL XML_SetEndElementHandler(XML_Parser parser, XML_EndElementHandler end) { endElementHandler = end; } void XMLCALL XML_SetCharacterDataHandler(XML_Parser parser, XML_CharacterDataHandler handler) { characterDataHandler = handler; } void XMLCALL XML_SetProcessingInstructionHandler(XML_Parser parser, XML_ProcessingInstructionHandler handler) { processingInstructionHandler = handler; } void XMLCALL XML_SetCommentHandler(XML_Parser parser, XML_CommentHandler handler) { commentHandler = handler; } void XMLCALL XML_SetCdataSectionHandler(XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end) { startCdataSectionHandler = start; endCdataSectionHandler = end; } void XMLCALL XML_SetStartCdataSectionHandler(XML_Parser parser, XML_StartCdataSectionHandler start) { startCdataSectionHandler = start; } void XMLCALL XML_SetEndCdataSectionHandler(XML_Parser parser, XML_EndCdataSectionHandler end) { endCdataSectionHandler = end; } void XMLCALL XML_SetDefaultHandler(XML_Parser parser, XML_DefaultHandler handler) { defaultHandler = handler; defaultExpandInternalEntities = XML_FALSE; } void XMLCALL XML_SetDefaultHandlerExpand(XML_Parser parser, XML_DefaultHandler handler) { defaultHandler = handler; defaultExpandInternalEntities = XML_TRUE; } void XMLCALL XML_SetDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end) { startDoctypeDeclHandler = start; endDoctypeDeclHandler = end; } void XMLCALL XML_SetStartDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start) { startDoctypeDeclHandler = start; } void XMLCALL XML_SetEndDoctypeDeclHandler(XML_Parser parser, XML_EndDoctypeDeclHandler end) { endDoctypeDeclHandler = end; } void XMLCALL XML_SetUnparsedEntityDeclHandler(XML_Parser parser, XML_UnparsedEntityDeclHandler handler) { unparsedEntityDeclHandler = handler; } void XMLCALL XML_SetNotationDeclHandler(XML_Parser parser, XML_NotationDeclHandler handler) { notationDeclHandler = handler; } void XMLCALL XML_SetNamespaceDeclHandler(XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end) { startNamespaceDeclHandler = start; endNamespaceDeclHandler = end; } void XMLCALL XML_SetStartNamespaceDeclHandler(XML_Parser parser, XML_StartNamespaceDeclHandler start) { startNamespaceDeclHandler = start; } void XMLCALL XML_SetEndNamespaceDeclHandler(XML_Parser parser, XML_EndNamespaceDeclHandler end) { endNamespaceDeclHandler = end; } void XMLCALL XML_SetNotStandaloneHandler(XML_Parser parser, XML_NotStandaloneHandler handler) { notStandaloneHandler = handler; } void XMLCALL XML_SetExternalEntityRefHandler(XML_Parser parser, XML_ExternalEntityRefHandler handler) { externalEntityRefHandler = handler; } void XMLCALL XML_SetExternalEntityRefHandlerArg(XML_Parser parser, void *arg) { if (arg) externalEntityRefHandlerArg = (XML_Parser)arg; else externalEntityRefHandlerArg = parser; } void XMLCALL XML_SetSkippedEntityHandler(XML_Parser parser, XML_SkippedEntityHandler handler) { skippedEntityHandler = handler; } void XMLCALL XML_SetUnknownEncodingHandler(XML_Parser parser, XML_UnknownEncodingHandler handler, void *data) { unknownEncodingHandler = handler; unknownEncodingHandlerData = data; } void XMLCALL XML_SetElementDeclHandler(XML_Parser parser, XML_ElementDeclHandler eldecl) { elementDeclHandler = eldecl; } void XMLCALL XML_SetAttlistDeclHandler(XML_Parser parser, XML_AttlistDeclHandler attdecl) { attlistDeclHandler = attdecl; } void XMLCALL XML_SetEntityDeclHandler(XML_Parser parser, XML_EntityDeclHandler handler) { entityDeclHandler = handler; } void XMLCALL XML_SetXmlDeclHandler(XML_Parser parser, XML_XmlDeclHandler handler) { xmlDeclHandler = handler; } int XMLCALL XML_SetParamEntityParsing(XML_Parser parser, enum XML_ParamEntityParsing peParsing) { /* block after XML_Parse()/XML_ParseBuffer() has been called */ if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) return 0; #ifdef XML_DTD paramEntityParsing = peParsing; return 1; #else return peParsing == XML_PARAM_ENTITY_PARSING_NEVER; #endif } int XMLCALL XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) { /* block after XML_Parse()/XML_ParseBuffer() has been called */ if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) return 0; hash_secret_salt = hash_salt; return 1; } enum XML_Status XMLCALL XML_Parse(XML_Parser parser, const char *s, int len, int isFinal) { switch (ps_parsing) { case XML_SUSPENDED: errorCode = XML_ERROR_SUSPENDED; return XML_STATUS_ERROR; case XML_FINISHED: errorCode = XML_ERROR_FINISHED; return XML_STATUS_ERROR; case XML_INITIALIZED: if (parentParser == NULL && !startParsing(parser)) { errorCode = XML_ERROR_NO_MEMORY; return XML_STATUS_ERROR; } default: ps_parsing = XML_PARSING; } if (len == 0) { ps_finalBuffer = (XML_Bool)isFinal; if (!isFinal) return XML_STATUS_OK; positionPtr = bufferPtr; parseEndPtr = bufferEnd; /* If data are left over from last buffer, and we now know that these data are the final chunk of input, then we have to check them again to detect errors based on that fact. */ errorCode = processor(parser, bufferPtr, parseEndPtr, &bufferPtr); if (errorCode == XML_ERROR_NONE) { switch (ps_parsing) { case XML_SUSPENDED: XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position); positionPtr = bufferPtr; return XML_STATUS_SUSPENDED; case XML_INITIALIZED: case XML_PARSING: ps_parsing = XML_FINISHED; /* fall through */ default: return XML_STATUS_OK; } } eventEndPtr = eventPtr; processor = errorProcessor; return XML_STATUS_ERROR; } #ifndef XML_CONTEXT_BYTES else if (bufferPtr == bufferEnd) { const char *end; int nLeftOver; enum XML_Error result; parseEndByteIndex += len; positionPtr = s; ps_finalBuffer = (XML_Bool)isFinal; errorCode = processor(parser, s, parseEndPtr = s + len, &end); if (errorCode != XML_ERROR_NONE) { eventEndPtr = eventPtr; processor = errorProcessor; return XML_STATUS_ERROR; } else { switch (ps_parsing) { case XML_SUSPENDED: result = XML_STATUS_SUSPENDED; break; case XML_INITIALIZED: case XML_PARSING: if (isFinal) { ps_parsing = XML_FINISHED; return XML_STATUS_OK; } /* fall through */ default: result = XML_STATUS_OK; } } XmlUpdatePosition(encoding, positionPtr, end, &position); nLeftOver = s + len - end; if (nLeftOver) { if (buffer == NULL || nLeftOver > bufferLim - buffer) { /* FIXME avoid integer overflow */ char *temp; temp = (buffer == NULL ? (char *)MALLOC(len * 2) : (char *)REALLOC(buffer, len * 2)); if (temp == NULL) { errorCode = XML_ERROR_NO_MEMORY; eventPtr = eventEndPtr = NULL; processor = errorProcessor; return XML_STATUS_ERROR; } buffer = temp; bufferLim = buffer + len * 2; } memcpy(buffer, end, nLeftOver); } bufferPtr = buffer; bufferEnd = buffer + nLeftOver; positionPtr = bufferPtr; parseEndPtr = bufferEnd; eventPtr = bufferPtr; eventEndPtr = bufferPtr; return result; } #endif /* not defined XML_CONTEXT_BYTES */ else { void *buff = XML_GetBuffer(parser, len); if (buff == NULL) return XML_STATUS_ERROR; else { memcpy(buff, s, len); return XML_ParseBuffer(parser, len, isFinal); } } } enum XML_Status XMLCALL XML_ParseBuffer(XML_Parser parser, int len, int isFinal) { const char *start; enum XML_Status result = XML_STATUS_OK; switch (ps_parsing) { case XML_SUSPENDED: errorCode = XML_ERROR_SUSPENDED; return XML_STATUS_ERROR; case XML_FINISHED: errorCode = XML_ERROR_FINISHED; return XML_STATUS_ERROR; case XML_INITIALIZED: if (parentParser == NULL && !startParsing(parser)) { errorCode = XML_ERROR_NO_MEMORY; return XML_STATUS_ERROR; } default: ps_parsing = XML_PARSING; } start = bufferPtr; positionPtr = start; bufferEnd += len; parseEndPtr = bufferEnd; parseEndByteIndex += len; ps_finalBuffer = (XML_Bool)isFinal; errorCode = processor(parser, start, parseEndPtr, &bufferPtr); if (errorCode != XML_ERROR_NONE) { eventEndPtr = eventPtr; processor = errorProcessor; return XML_STATUS_ERROR; } else { switch (ps_parsing) { case XML_SUSPENDED: result = XML_STATUS_SUSPENDED; break; case XML_INITIALIZED: case XML_PARSING: if (isFinal) { ps_parsing = XML_FINISHED; return result; } default: ; /* should not happen */ } } XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position); positionPtr = bufferPtr; return result; } void * XMLCALL XML_GetBuffer(XML_Parser parser, int len) { switch (ps_parsing) { case XML_SUSPENDED: errorCode = XML_ERROR_SUSPENDED; return NULL; case XML_FINISHED: errorCode = XML_ERROR_FINISHED; return NULL; default: ; } if (len > bufferLim - bufferEnd) { /* FIXME avoid integer overflow */ int neededSize = len + (int)(bufferEnd - bufferPtr); #ifdef XML_CONTEXT_BYTES int keep = (int)(bufferPtr - buffer); if (keep > XML_CONTEXT_BYTES) keep = XML_CONTEXT_BYTES; neededSize += keep; #endif /* defined XML_CONTEXT_BYTES */ if (neededSize <= bufferLim - buffer) { #ifdef XML_CONTEXT_BYTES if (keep < bufferPtr - buffer) { int offset = (int)(bufferPtr - buffer) - keep; memmove(buffer, &buffer[offset], bufferEnd - bufferPtr + keep); bufferEnd -= offset; bufferPtr -= offset; } #else memmove(buffer, bufferPtr, bufferEnd - bufferPtr); bufferEnd = buffer + (bufferEnd - bufferPtr); bufferPtr = buffer; #endif /* not defined XML_CONTEXT_BYTES */ } else { char *newBuf; int bufferSize = (int)(bufferLim - bufferPtr); if (bufferSize == 0) bufferSize = INIT_BUFFER_SIZE; do { bufferSize *= 2; } while (bufferSize < neededSize); newBuf = (char *)MALLOC(bufferSize); if (newBuf == 0) { errorCode = XML_ERROR_NO_MEMORY; return NULL; } bufferLim = newBuf + bufferSize; #ifdef XML_CONTEXT_BYTES if (bufferPtr) { int keep = (int)(bufferPtr - buffer); if (keep > XML_CONTEXT_BYTES) keep = XML_CONTEXT_BYTES; memcpy(newBuf, &bufferPtr[-keep], bufferEnd - bufferPtr + keep); FREE(buffer); buffer = newBuf; bufferEnd = buffer + (bufferEnd - bufferPtr) + keep; bufferPtr = buffer + keep; } else { bufferEnd = newBuf + (bufferEnd - bufferPtr); bufferPtr = buffer = newBuf; } #else if (bufferPtr) { memcpy(newBuf, bufferPtr, bufferEnd - bufferPtr); FREE(buffer); } bufferEnd = newBuf + (bufferEnd - bufferPtr); bufferPtr = buffer = newBuf; #endif /* not defined XML_CONTEXT_BYTES */ } eventPtr = eventEndPtr = NULL; positionPtr = NULL; } return bufferEnd; } enum XML_Status XMLCALL XML_StopParser(XML_Parser parser, XML_Bool resumable) { switch (ps_parsing) { case XML_SUSPENDED: if (resumable) { errorCode = XML_ERROR_SUSPENDED; return XML_STATUS_ERROR; } ps_parsing = XML_FINISHED; break; case XML_FINISHED: errorCode = XML_ERROR_FINISHED; return XML_STATUS_ERROR; default: if (resumable) { #ifdef XML_DTD if (isParamEntity) { errorCode = XML_ERROR_SUSPEND_PE; return XML_STATUS_ERROR; } #endif ps_parsing = XML_SUSPENDED; } else ps_parsing = XML_FINISHED; } return XML_STATUS_OK; } enum XML_Status XMLCALL XML_ResumeParser(XML_Parser parser) { enum XML_Status result = XML_STATUS_OK; if (ps_parsing != XML_SUSPENDED) { errorCode = XML_ERROR_NOT_SUSPENDED; return XML_STATUS_ERROR; } ps_parsing = XML_PARSING; errorCode = processor(parser, bufferPtr, parseEndPtr, &bufferPtr); if (errorCode != XML_ERROR_NONE) { eventEndPtr = eventPtr; processor = errorProcessor; return XML_STATUS_ERROR; } else { switch (ps_parsing) { case XML_SUSPENDED: result = XML_STATUS_SUSPENDED; break; case XML_INITIALIZED: case XML_PARSING: if (ps_finalBuffer) { ps_parsing = XML_FINISHED; return result; } default: ; } } XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position); positionPtr = bufferPtr; return result; } void XMLCALL XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status) { assert(status != NULL); *status = parser->m_parsingStatus; } enum XML_Error XMLCALL XML_GetErrorCode(XML_Parser parser) { return errorCode; } XML_Index XMLCALL XML_GetCurrentByteIndex(XML_Parser parser) { if (eventPtr) return parseEndByteIndex - (parseEndPtr - eventPtr); return -1; } int XMLCALL XML_GetCurrentByteCount(XML_Parser parser) { if (eventEndPtr && eventPtr) return (int)(eventEndPtr - eventPtr); return 0; } const char * XMLCALL XML_GetInputContext(XML_Parser parser, int *offset, int *size) { #ifdef XML_CONTEXT_BYTES if (eventPtr && buffer) { *offset = (int)(eventPtr - buffer); *size = (int)(bufferEnd - buffer); return buffer; } #endif /* defined XML_CONTEXT_BYTES */ return (char *) 0; } XML_Size XMLCALL XML_GetCurrentLineNumber(XML_Parser parser) { if (eventPtr && eventPtr >= positionPtr) { XmlUpdatePosition(encoding, positionPtr, eventPtr, &position); positionPtr = eventPtr; } return position.lineNumber + 1; } XML_Size XMLCALL XML_GetCurrentColumnNumber(XML_Parser parser) { if (eventPtr && eventPtr >= positionPtr) { XmlUpdatePosition(encoding, positionPtr, eventPtr, &position); positionPtr = eventPtr; } return position.columnNumber; } void XMLCALL XML_FreeContentModel(XML_Parser parser, XML_Content *model) { FREE(model); } void * XMLCALL XML_MemMalloc(XML_Parser parser, size_t size) { return MALLOC(size); } void * XMLCALL XML_MemRealloc(XML_Parser parser, void *ptr, size_t size) { return REALLOC(ptr, size); } void XMLCALL XML_MemFree(XML_Parser parser, void *ptr) { FREE(ptr); } void XMLCALL XML_DefaultCurrent(XML_Parser parser) { if (defaultHandler) { if (openInternalEntities) reportDefault(parser, internalEncoding, openInternalEntities->internalEventPtr, openInternalEntities->internalEventEndPtr); else reportDefault(parser, encoding, eventPtr, eventEndPtr); } } const XML_LChar * XMLCALL XML_ErrorString(enum XML_Error code) { static const XML_LChar* const message[] = { 0, XML_L("out of memory"), XML_L("syntax error"), XML_L("no element found"), XML_L("not well-formed (invalid token)"), XML_L("unclosed token"), XML_L("partial character"), XML_L("mismatched tag"), XML_L("duplicate attribute"), XML_L("junk after document element"), XML_L("illegal parameter entity reference"), XML_L("undefined entity"), XML_L("recursive entity reference"), XML_L("asynchronous entity"), XML_L("reference to invalid character number"), XML_L("reference to binary entity"), XML_L("reference to external entity in attribute"), XML_L("XML or text declaration not at start of entity"), XML_L("unknown encoding"), XML_L("encoding specified in XML declaration is incorrect"), XML_L("unclosed CDATA section"), XML_L("error in processing external entity reference"), XML_L("document is not standalone"), XML_L("unexpected parser state - please send a bug report"), XML_L("entity declared in parameter entity"), XML_L("requested feature requires XML_DTD support in Expat"), XML_L("cannot change setting once parsing has begun"), XML_L("unbound prefix"), XML_L("must not undeclare prefix"), XML_L("incomplete markup in parameter entity"), XML_L("XML declaration not well-formed"), XML_L("text declaration not well-formed"), XML_L("illegal character(s) in public id"), XML_L("parser suspended"), XML_L("parser not suspended"), XML_L("parsing aborted"), XML_L("parsing finished"), XML_L("cannot suspend in external parameter entity"), XML_L("reserved prefix (xml) must not be undeclared or bound to another namespace name"), XML_L("reserved prefix (xmlns) must not be declared or undeclared"), XML_L("prefix must not be bound to one of the reserved namespace names") }; if (code > 0 && code < sizeof(message)/sizeof(message[0])) return message[code]; return NULL; } const XML_LChar * XMLCALL XML_ExpatVersion(void) { /* V1 is used to string-ize the version number. However, it would string-ize the actual version macro *names* unless we get them substituted before being passed to V1. CPP is defined to expand a macro, then rescan for more expansions. Thus, we use V2 to expand the version macros, then CPP will expand the resulting V1() macro with the correct numerals. */ /* ### I'm assuming cpp is portable in this respect... */ #define V1(a,b,c) XML_L(#a)XML_L(".")XML_L(#b)XML_L(".")XML_L(#c) #define V2(a,b,c) XML_L("expat_")V1(a,b,c) return V2(XML_MAJOR_VERSION, XML_MINOR_VERSION, XML_MICRO_VERSION); #undef V1 #undef V2 } XML_Expat_Version XMLCALL XML_ExpatVersionInfo(void) { XML_Expat_Version version; version.major = XML_MAJOR_VERSION; version.minor = XML_MINOR_VERSION; version.micro = XML_MICRO_VERSION; return version; } const XML_Feature * XMLCALL XML_GetFeatureList(void) { static const XML_Feature features[] = { {XML_FEATURE_SIZEOF_XML_CHAR, XML_L("sizeof(XML_Char)"), sizeof(XML_Char)}, {XML_FEATURE_SIZEOF_XML_LCHAR, XML_L("sizeof(XML_LChar)"), sizeof(XML_LChar)}, #ifdef XML_UNICODE {XML_FEATURE_UNICODE, XML_L("XML_UNICODE"), 0}, #endif #ifdef XML_UNICODE_WCHAR_T {XML_FEATURE_UNICODE_WCHAR_T, XML_L("XML_UNICODE_WCHAR_T"), 0}, #endif #ifdef XML_DTD {XML_FEATURE_DTD, XML_L("XML_DTD"), 0}, #endif #ifdef XML_CONTEXT_BYTES {XML_FEATURE_CONTEXT_BYTES, XML_L("XML_CONTEXT_BYTES"), XML_CONTEXT_BYTES}, #endif #ifdef XML_MIN_SIZE {XML_FEATURE_MIN_SIZE, XML_L("XML_MIN_SIZE"), 0}, #endif #ifdef XML_NS {XML_FEATURE_NS, XML_L("XML_NS"), 0}, #endif #ifdef XML_LARGE_SIZE {XML_FEATURE_LARGE_SIZE, XML_L("XML_LARGE_SIZE"), 0}, #endif #ifdef XML_ATTR_INFO {XML_FEATURE_ATTR_INFO, XML_L("XML_ATTR_INFO"), 0}, #endif {XML_FEATURE_END, NULL, 0} }; return features; } /* Initially tag->rawName always points into the parse buffer; for those TAG instances opened while the current parse buffer was processed, and not yet closed, we need to store tag->rawName in a more permanent location, since the parse buffer is about to be discarded. */ static XML_Bool storeRawNames(XML_Parser parser) { TAG *tag = tagStack; while (tag) { int bufSize; int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1); char *rawNameBuf = tag->buf + nameLen; /* Stop if already stored. Since tagStack is a stack, we can stop at the first entry that has already been copied; everything below it in the stack is already been accounted for in a previous call to this function. */ if (tag->rawName == rawNameBuf) break; /* For re-use purposes we need to ensure that the size of tag->buf is a multiple of sizeof(XML_Char). */ bufSize = nameLen + ROUND_UP(tag->rawNameLength, sizeof(XML_Char)); if (bufSize > tag->bufEnd - tag->buf) { char *temp = (char *)REALLOC(tag->buf, bufSize); if (temp == NULL) return XML_FALSE; /* if tag->name.str points to tag->buf (only when namespace processing is off) then we have to update it */ if (tag->name.str == (XML_Char *)tag->buf) tag->name.str = (XML_Char *)temp; /* if tag->name.localPart is set (when namespace processing is on) then update it as well, since it will always point into tag->buf */ if (tag->name.localPart) tag->name.localPart = (XML_Char *)temp + (tag->name.localPart - (XML_Char *)tag->buf); tag->buf = temp; tag->bufEnd = temp + bufSize; rawNameBuf = temp + nameLen; } memcpy(rawNameBuf, tag->rawName, tag->rawNameLength); tag->rawName = rawNameBuf; tag = tag->parent; } return XML_TRUE; } static enum XML_Error PTRCALL contentProcessor(XML_Parser parser, const char *start, const char *end, const char **endPtr) { enum XML_Error result = doContent(parser, 0, encoding, start, end, endPtr, (XML_Bool)!ps_finalBuffer); if (result == XML_ERROR_NONE) { if (!storeRawNames(parser)) return XML_ERROR_NO_MEMORY; } return result; } static enum XML_Error PTRCALL externalEntityInitProcessor(XML_Parser parser, const char *start, const char *end, const char **endPtr) { enum XML_Error result = initializeEncoding(parser); if (result != XML_ERROR_NONE) return result; processor = externalEntityInitProcessor2; return externalEntityInitProcessor2(parser, start, end, endPtr); } static enum XML_Error PTRCALL externalEntityInitProcessor2(XML_Parser parser, const char *start, const char *end, const char **endPtr) { const char *next = start; /* XmlContentTok doesn't always set the last arg */ int tok = XmlContentTok(encoding, start, end, &next); switch (tok) { case XML_TOK_BOM: /* If we are at the end of the buffer, this would cause the next stage, i.e. externalEntityInitProcessor3, to pass control directly to doContent (by detecting XML_TOK_NONE) without processing any xml text declaration - causing the error XML_ERROR_MISPLACED_XML_PI in doContent. */ if (next == end && !ps_finalBuffer) { *endPtr = next; return XML_ERROR_NONE; } start = next; break; case XML_TOK_PARTIAL: if (!ps_finalBuffer) { *endPtr = start; return XML_ERROR_NONE; } eventPtr = start; return XML_ERROR_UNCLOSED_TOKEN; case XML_TOK_PARTIAL_CHAR: if (!ps_finalBuffer) { *endPtr = start; return XML_ERROR_NONE; } eventPtr = start; return XML_ERROR_PARTIAL_CHAR; } processor = externalEntityInitProcessor3; return externalEntityInitProcessor3(parser, start, end, endPtr); } static enum XML_Error PTRCALL externalEntityInitProcessor3(XML_Parser parser, const char *start, const char *end, const char **endPtr) { int tok; const char *next = start; /* XmlContentTok doesn't always set the last arg */ eventPtr = start; tok = XmlContentTok(encoding, start, end, &next); eventEndPtr = next; switch (tok) { case XML_TOK_XML_DECL: { enum XML_Error result; result = processXmlDecl(parser, 1, start, next); if (result != XML_ERROR_NONE) return result; switch (ps_parsing) { case XML_SUSPENDED: *endPtr = next; return XML_ERROR_NONE; case XML_FINISHED: return XML_ERROR_ABORTED; default: start = next; } } break; case XML_TOK_PARTIAL: if (!ps_finalBuffer) { *endPtr = start; return XML_ERROR_NONE; } return XML_ERROR_UNCLOSED_TOKEN; case XML_TOK_PARTIAL_CHAR: if (!ps_finalBuffer) { *endPtr = start; return XML_ERROR_NONE; } return XML_ERROR_PARTIAL_CHAR; } processor = externalEntityContentProcessor; tagLevel = 1; return externalEntityContentProcessor(parser, start, end, endPtr); } static enum XML_Error PTRCALL externalEntityContentProcessor(XML_Parser parser, const char *start, const char *end, const char **endPtr) { enum XML_Error result = doContent(parser, 1, encoding, start, end, endPtr, (XML_Bool)!ps_finalBuffer); if (result == XML_ERROR_NONE) { if (!storeRawNames(parser)) return XML_ERROR_NO_MEMORY; } return result; } static enum XML_Error doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc, const char *s, const char *end, const char **nextPtr, XML_Bool haveMore) { /* save one level of indirection */ DTD * const dtd = _dtd; const char **eventPP; const char **eventEndPP; if (enc == encoding) { eventPP = &eventPtr; eventEndPP = &eventEndPtr; } else { eventPP = &(openInternalEntities->internalEventPtr); eventEndPP = &(openInternalEntities->internalEventEndPtr); } *eventPP = s; for (;;) { const char *next = s; /* XmlContentTok doesn't always set the last arg */ int tok = XmlContentTok(enc, s, end, &next); *eventEndPP = next; switch (tok) { case XML_TOK_TRAILING_CR: if (haveMore) { *nextPtr = s; return XML_ERROR_NONE; } *eventEndPP = end; if (characterDataHandler) { XML_Char c = 0xA; characterDataHandler(handlerArg, &c, 1); } else if (defaultHandler) reportDefault(parser, enc, s, end); /* We are at the end of the final buffer, should we check for XML_SUSPENDED, XML_FINISHED? */ if (startTagLevel == 0) return XML_ERROR_NO_ELEMENTS; if (tagLevel != startTagLevel) return XML_ERROR_ASYNC_ENTITY; *nextPtr = end; return XML_ERROR_NONE; case XML_TOK_NONE: if (haveMore) { *nextPtr = s; return XML_ERROR_NONE; } if (startTagLevel > 0) { if (tagLevel != startTagLevel) return XML_ERROR_ASYNC_ENTITY; *nextPtr = s; return XML_ERROR_NONE; } return XML_ERROR_NO_ELEMENTS; case XML_TOK_INVALID: *eventPP = next; return XML_ERROR_INVALID_TOKEN; case XML_TOK_PARTIAL: if (haveMore) { *nextPtr = s; return XML_ERROR_NONE; } return XML_ERROR_UNCLOSED_TOKEN; case XML_TOK_PARTIAL_CHAR: if (haveMore) { *nextPtr = s; return XML_ERROR_NONE; } return XML_ERROR_PARTIAL_CHAR; case XML_TOK_ENTITY_REF: { const XML_Char *name; ENTITY *entity; XML_Char ch = (XML_Char) XmlPredefinedEntityName(enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); if (ch) { if (characterDataHandler) characterDataHandler(handlerArg, &ch, 1); else if (defaultHandler) reportDefault(parser, enc, s, next); break; } name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); if (!name) return XML_ERROR_NO_MEMORY; entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0); poolDiscard(&dtd->pool); /* First, determine if a check for an existing declaration is needed; if yes, check that the entity exists, and that it is internal, otherwise call the skipped entity or default handler. */ if (!dtd->hasParamEntityRefs || dtd->standalone) { if (!entity) return XML_ERROR_UNDEFINED_ENTITY; else if (!entity->is_internal) return XML_ERROR_ENTITY_DECLARED_IN_PE; } else if (!entity) { if (skippedEntityHandler) skippedEntityHandler(handlerArg, name, 0); else if (defaultHandler) reportDefault(parser, enc, s, next); break; } if (entity->open) return XML_ERROR_RECURSIVE_ENTITY_REF; if (entity->notation) return XML_ERROR_BINARY_ENTITY_REF; if (entity->textPtr) { enum XML_Error result; if (!defaultExpandInternalEntities) { if (skippedEntityHandler) skippedEntityHandler(handlerArg, entity->name, 0); else if (defaultHandler) reportDefault(parser, enc, s, next); break; } result = processInternalEntity(parser, entity, XML_FALSE); if (result != XML_ERROR_NONE) return result; } else if (externalEntityRefHandler) { const XML_Char *context; entity->open = XML_TRUE; context = getContext(parser); entity->open = XML_FALSE; if (!context) return XML_ERROR_NO_MEMORY; if (!externalEntityRefHandler(externalEntityRefHandlerArg, context, entity->base, entity->systemId, entity->publicId)) return XML_ERROR_EXTERNAL_ENTITY_HANDLING; poolDiscard(&tempPool); } else if (defaultHandler) reportDefault(parser, enc, s, next); break; } case XML_TOK_START_TAG_NO_ATTS: /* fall through */ case XML_TOK_START_TAG_WITH_ATTS: { TAG *tag; enum XML_Error result; XML_Char *toPtr; if (freeTagList) { tag = freeTagList; freeTagList = freeTagList->parent; } else { tag = (TAG *)MALLOC(sizeof(TAG)); if (!tag) return XML_ERROR_NO_MEMORY; tag->buf = (char *)MALLOC(INIT_TAG_BUF_SIZE); if (!tag->buf) { FREE(tag); return XML_ERROR_NO_MEMORY; } tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE; } tag->bindings = NULL; tag->parent = tagStack; tagStack = tag; tag->name.localPart = NULL; tag->name.prefix = NULL; tag->rawName = s + enc->minBytesPerChar; tag->rawNameLength = XmlNameLength(enc, tag->rawName); ++tagLevel; { const char *rawNameEnd = tag->rawName + tag->rawNameLength; const char *fromPtr = tag->rawName; toPtr = (XML_Char *)tag->buf; for (;;) { int bufSize; int convLen; XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr, (ICHAR *)tag->bufEnd - 1); convLen = (int)(toPtr - (XML_Char *)tag->buf); if (fromPtr == rawNameEnd) { tag->name.strLen = convLen; break; } bufSize = (int)(tag->bufEnd - tag->buf) << 1; { char *temp = (char *)REALLOC(tag->buf, bufSize); if (temp == NULL) return XML_ERROR_NO_MEMORY; tag->buf = temp; tag->bufEnd = temp + bufSize; toPtr = (XML_Char *)temp + convLen; } } } tag->name.str = (XML_Char *)tag->buf; *toPtr = XML_T('\0'); result = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings)); if (result) return result; if (startElementHandler) startElementHandler(handlerArg, tag->name.str, (const XML_Char **)atts); else if (defaultHandler) reportDefault(parser, enc, s, next); poolClear(&tempPool); break; } case XML_TOK_EMPTY_ELEMENT_NO_ATTS: /* fall through */ case XML_TOK_EMPTY_ELEMENT_WITH_ATTS: { const char *rawName = s + enc->minBytesPerChar; enum XML_Error result; BINDING *bindings = NULL; XML_Bool noElmHandlers = XML_TRUE; TAG_NAME name; name.str = poolStoreString(&tempPool, enc, rawName, rawName + XmlNameLength(enc, rawName)); if (!name.str) return XML_ERROR_NO_MEMORY; poolFinish(&tempPool); result = storeAtts(parser, enc, s, &name, &bindings); if (result) return result; poolFinish(&tempPool); if (startElementHandler) { startElementHandler(handlerArg, name.str, (const XML_Char **)atts); noElmHandlers = XML_FALSE; } if (endElementHandler) { if (startElementHandler) *eventPP = *eventEndPP; endElementHandler(handlerArg, name.str); noElmHandlers = XML_FALSE; } if (noElmHandlers && defaultHandler) reportDefault(parser, enc, s, next); poolClear(&tempPool); while (bindings) { BINDING *b = bindings; if (endNamespaceDeclHandler) endNamespaceDeclHandler(handlerArg, b->prefix->name); bindings = bindings->nextTagBinding; b->nextTagBinding = freeBindingList; freeBindingList = b; b->prefix->binding = b->prevPrefixBinding; } } if (tagLevel == 0) return epilogProcessor(parser, next, end, nextPtr); break; case XML_TOK_END_TAG: if (tagLevel == startTagLevel) return XML_ERROR_ASYNC_ENTITY; else { int len; const char *rawName; TAG *tag = tagStack; tagStack = tag->parent; tag->parent = freeTagList; freeTagList = tag; rawName = s + enc->minBytesPerChar*2; len = XmlNameLength(enc, rawName); if (len != tag->rawNameLength || memcmp(tag->rawName, rawName, len) != 0) { *eventPP = rawName; return XML_ERROR_TAG_MISMATCH; } --tagLevel; if (endElementHandler) { const XML_Char *localPart; const XML_Char *prefix; XML_Char *uri; localPart = tag->name.localPart; if (ns && localPart) { /* localPart and prefix may have been overwritten in tag->name.str, since this points to the binding->uri buffer which gets re-used; so we have to add them again */ uri = (XML_Char *)tag->name.str + tag->name.uriLen; /* don't need to check for space - already done in storeAtts() */ while (*localPart) *uri++ = *localPart++; prefix = (XML_Char *)tag->name.prefix; if (ns_triplets && prefix) { *uri++ = namespaceSeparator; while (*prefix) *uri++ = *prefix++; } *uri = XML_T('\0'); } endElementHandler(handlerArg, tag->name.str); } else if (defaultHandler) reportDefault(parser, enc, s, next); while (tag->bindings) { BINDING *b = tag->bindings; if (endNamespaceDeclHandler) endNamespaceDeclHandler(handlerArg, b->prefix->name); tag->bindings = tag->bindings->nextTagBinding; b->nextTagBinding = freeBindingList; freeBindingList = b; b->prefix->binding = b->prevPrefixBinding; } if (tagLevel == 0) return epilogProcessor(parser, next, end, nextPtr); } break; case XML_TOK_CHAR_REF: { int n = XmlCharRefNumber(enc, s); if (n < 0) return XML_ERROR_BAD_CHAR_REF; if (characterDataHandler) { XML_Char buf[XML_ENCODE_MAX]; characterDataHandler(handlerArg, buf, XmlEncode(n, (ICHAR *)buf)); } else if (defaultHandler) reportDefault(parser, enc, s, next); } break; case XML_TOK_XML_DECL: return XML_ERROR_MISPLACED_XML_PI; case XML_TOK_DATA_NEWLINE: if (characterDataHandler) { XML_Char c = 0xA; characterDataHandler(handlerArg, &c, 1); } else if (defaultHandler) reportDefault(parser, enc, s, next); break; case XML_TOK_CDATA_SECT_OPEN: { enum XML_Error result; if (startCdataSectionHandler) startCdataSectionHandler(handlerArg); #if 0 /* Suppose you doing a transformation on a document that involves changing only the character data. You set up a defaultHandler and a characterDataHandler. The defaultHandler simply copies characters through. The characterDataHandler does the transformation and writes the characters out escaping them as necessary. This case will fail to work if we leave out the following two lines (because & and < inside CDATA sections will be incorrectly escaped). However, now we have a start/endCdataSectionHandler, so it seems easier to let the user deal with this. */ else if (characterDataHandler) characterDataHandler(handlerArg, dataBuf, 0); #endif else if (defaultHandler) reportDefault(parser, enc, s, next); result = doCdataSection(parser, enc, &next, end, nextPtr, haveMore); if (result != XML_ERROR_NONE) return result; else if (!next) { processor = cdataSectionProcessor; return result; } } break; case XML_TOK_TRAILING_RSQB: if (haveMore) { *nextPtr = s; return XML_ERROR_NONE; } if (characterDataHandler) { if (MUST_CONVERT(enc, s)) { ICHAR *dataPtr = (ICHAR *)dataBuf; XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd); characterDataHandler(handlerArg, dataBuf, (int)(dataPtr - (ICHAR *)dataBuf)); } else characterDataHandler(handlerArg, (XML_Char *)s, (int)((XML_Char *)end - (XML_Char *)s)); } else if (defaultHandler) reportDefault(parser, enc, s, end); /* We are at the end of the final buffer, should we check for XML_SUSPENDED, XML_FINISHED? */ if (startTagLevel == 0) { *eventPP = end; return XML_ERROR_NO_ELEMENTS; } if (tagLevel != startTagLevel) { *eventPP = end; return XML_ERROR_ASYNC_ENTITY; } *nextPtr = end; return XML_ERROR_NONE; case XML_TOK_DATA_CHARS: { XML_CharacterDataHandler charDataHandler = characterDataHandler; if (charDataHandler) { if (MUST_CONVERT(enc, s)) { for (;;) { ICHAR *dataPtr = (ICHAR *)dataBuf; XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd); *eventEndPP = s; charDataHandler(handlerArg, dataBuf, (int)(dataPtr - (ICHAR *)dataBuf)); if (s == next) break; *eventPP = s; } } else charDataHandler(handlerArg, (XML_Char *)s, (int)((XML_Char *)next - (XML_Char *)s)); } else if (defaultHandler) reportDefault(parser, enc, s, next); } break; case XML_TOK_PI: if (!reportProcessingInstruction(parser, enc, s, next)) return XML_ERROR_NO_MEMORY; break; case XML_TOK_COMMENT: if (!reportComment(parser, enc, s, next)) return XML_ERROR_NO_MEMORY; break; default: if (defaultHandler) reportDefault(parser, enc, s, next); break; } *eventPP = s = next; switch (ps_parsing) { case XML_SUSPENDED: *nextPtr = next; return XML_ERROR_NONE; case XML_FINISHED: return XML_ERROR_ABORTED; default: ; } } /* not reached */ } /* Precondition: all arguments must be non-NULL; Purpose: - normalize attributes - check attributes for well-formedness - generate namespace aware attribute names (URI, prefix) - build list of attributes for startElementHandler - default attributes - process namespace declarations (check and report them) - generate namespace aware element name (URI, prefix) */ static enum XML_Error storeAtts(XML_Parser parser, const ENCODING *enc, const char *attStr, TAG_NAME *tagNamePtr, BINDING **bindingsPtr) { DTD * const dtd = _dtd; /* save one level of indirection */ ELEMENT_TYPE *elementType; int nDefaultAtts; const XML_Char **appAtts; /* the attribute list for the application */ int attIndex = 0; int prefixLen; int i; int n; XML_Char *uri; int nPrefixes = 0; BINDING *binding; const XML_Char *localPart; /* lookup the element type name */ elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str,0); if (!elementType) { const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str); if (!name) return XML_ERROR_NO_MEMORY; elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name, sizeof(ELEMENT_TYPE)); if (!elementType) return XML_ERROR_NO_MEMORY; if (ns && !setElementTypePrefix(parser, elementType)) return XML_ERROR_NO_MEMORY; } nDefaultAtts = elementType->nDefaultAtts; /* get the attributes from the tokenizer */ n = XmlGetAttributes(enc, attStr, attsSize, atts); if (n + nDefaultAtts > attsSize) { int oldAttsSize = attsSize; ATTRIBUTE *temp; #ifdef XML_ATTR_INFO XML_AttrInfo *temp2; #endif attsSize = n + nDefaultAtts + INIT_ATTS_SIZE; temp = (ATTRIBUTE *)REALLOC((void *)atts, attsSize * sizeof(ATTRIBUTE)); if (temp == NULL) return XML_ERROR_NO_MEMORY; atts = temp; #ifdef XML_ATTR_INFO temp2 = (XML_AttrInfo *)REALLOC((void *)attInfo, attsSize * sizeof(XML_AttrInfo)); if (temp2 == NULL) return XML_ERROR_NO_MEMORY; attInfo = temp2; #endif if (n > oldAttsSize) XmlGetAttributes(enc, attStr, n, atts); } appAtts = (const XML_Char **)atts; for (i = 0; i < n; i++) { ATTRIBUTE *currAtt = &atts[i]; #ifdef XML_ATTR_INFO XML_AttrInfo *currAttInfo = &attInfo[i]; #endif /* add the name and value to the attribute list */ ATTRIBUTE_ID *attId = getAttributeId(parser, enc, currAtt->name, currAtt->name + XmlNameLength(enc, currAtt->name)); if (!attId) return XML_ERROR_NO_MEMORY; #ifdef XML_ATTR_INFO currAttInfo->nameStart = parseEndByteIndex - (parseEndPtr - currAtt->name); currAttInfo->nameEnd = currAttInfo->nameStart + XmlNameLength(enc, currAtt->name); currAttInfo->valueStart = parseEndByteIndex - (parseEndPtr - currAtt->valuePtr); currAttInfo->valueEnd = parseEndByteIndex - (parseEndPtr - currAtt->valueEnd); #endif /* Detect duplicate attributes by their QNames. This does not work when namespace processing is turned on and different prefixes for the same namespace are used. For this case we have a check further down. */ if ((attId->name)[-1]) { if (enc == encoding) eventPtr = atts[i].name; return XML_ERROR_DUPLICATE_ATTRIBUTE; } (attId->name)[-1] = 1; appAtts[attIndex++] = attId->name; if (!atts[i].normalized) { enum XML_Error result; XML_Bool isCdata = XML_TRUE; /* figure out whether declared as other than CDATA */ if (attId->maybeTokenized) { int j; for (j = 0; j < nDefaultAtts; j++) { if (attId == elementType->defaultAtts[j].id) { isCdata = elementType->defaultAtts[j].isCdata; break; } } } /* normalize the attribute value */ result = storeAttributeValue(parser, enc, isCdata, atts[i].valuePtr, atts[i].valueEnd, &tempPool); if (result) return result; appAtts[attIndex] = poolStart(&tempPool); poolFinish(&tempPool); } else { /* the value did not need normalizing */ appAtts[attIndex] = poolStoreString(&tempPool, enc, atts[i].valuePtr, atts[i].valueEnd); if (appAtts[attIndex] == 0) return XML_ERROR_NO_MEMORY; poolFinish(&tempPool); } /* handle prefixed attribute names */ if (attId->prefix) { if (attId->xmlns) { /* deal with namespace declarations here */ enum XML_Error result = addBinding(parser, attId->prefix, attId, appAtts[attIndex], bindingsPtr); if (result) return result; --attIndex; } else { /* deal with other prefixed names later */ attIndex++; nPrefixes++; (attId->name)[-1] = 2; } } else attIndex++; } /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */ nSpecifiedAtts = attIndex; if (elementType->idAtt && (elementType->idAtt->name)[-1]) { for (i = 0; i < attIndex; i += 2) if (appAtts[i] == elementType->idAtt->name) { idAttIndex = i; break; } } else idAttIndex = -1; /* do attribute defaulting */ for (i = 0; i < nDefaultAtts; i++) { const DEFAULT_ATTRIBUTE *da = elementType->defaultAtts + i; if (!(da->id->name)[-1] && da->value) { if (da->id->prefix) { if (da->id->xmlns) { enum XML_Error result = addBinding(parser, da->id->prefix, da->id, da->value, bindingsPtr); if (result) return result; } else { (da->id->name)[-1] = 2; nPrefixes++; appAtts[attIndex++] = da->id->name; appAtts[attIndex++] = da->value; } } else { (da->id->name)[-1] = 1; appAtts[attIndex++] = da->id->name; appAtts[attIndex++] = da->value; } } } appAtts[attIndex] = 0; /* expand prefixed attribute names, check for duplicates, and clear flags that say whether attributes were specified */ i = 0; if (nPrefixes) { int j; /* hash table index */ unsigned long version = nsAttsVersion; int nsAttsSize = (int)1 << nsAttsPower; /* size of hash table must be at least 2 * (# of prefixed attributes) */ if ((nPrefixes << 1) >> nsAttsPower) { /* true for nsAttsPower = 0 */ NS_ATT *temp; /* hash table size must also be a power of 2 and >= 8 */ while (nPrefixes >> nsAttsPower++); if (nsAttsPower < 3) nsAttsPower = 3; nsAttsSize = (int)1 << nsAttsPower; temp = (NS_ATT *)REALLOC(nsAtts, nsAttsSize * sizeof(NS_ATT)); if (!temp) return XML_ERROR_NO_MEMORY; nsAtts = temp; version = 0; /* force re-initialization of nsAtts hash table */ } /* using a version flag saves us from initializing nsAtts every time */ if (!version) { /* initialize version flags when version wraps around */ version = INIT_ATTS_VERSION; for (j = nsAttsSize; j != 0; ) nsAtts[--j].version = version; } nsAttsVersion = --version; /* expand prefixed names and check for duplicates */ for (; i < attIndex; i += 2) { const XML_Char *s = appAtts[i]; if (s[-1] == 2) { /* prefixed */ ATTRIBUTE_ID *id; const BINDING *b; unsigned long uriHash = hash_secret_salt; ((XML_Char *)s)[-1] = 0; /* clear flag */ id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0); b = id->prefix->binding; if (!b) return XML_ERROR_UNBOUND_PREFIX; /* as we expand the name we also calculate its hash value */ for (j = 0; j < b->uriLen; j++) { const XML_Char c = b->uri[j]; if (!poolAppendChar(&tempPool, c)) return XML_ERROR_NO_MEMORY; uriHash = CHAR_HASH(uriHash, c); } while (*s++ != XML_T(ASCII_COLON)) ; do { /* copies null terminator */ const XML_Char c = *s; if (!poolAppendChar(&tempPool, *s)) return XML_ERROR_NO_MEMORY; uriHash = CHAR_HASH(uriHash, c); } while (*s++); { /* Check hash table for duplicate of expanded name (uriName). Derived from code in lookup(parser, HASH_TABLE *table, ...). */ unsigned char step = 0; unsigned long mask = nsAttsSize - 1; j = uriHash & mask; /* index into hash table */ while (nsAtts[j].version == version) { /* for speed we compare stored hash values first */ if (uriHash == nsAtts[j].hash) { const XML_Char *s1 = poolStart(&tempPool); const XML_Char *s2 = nsAtts[j].uriName; /* s1 is null terminated, but not s2 */ for (; *s1 == *s2 && *s1 != 0; s1++, s2++); if (*s1 == 0) return XML_ERROR_DUPLICATE_ATTRIBUTE; } if (!step) step = PROBE_STEP(uriHash, mask, nsAttsPower); j < step ? (j += nsAttsSize - step) : (j -= step); } } if (ns_triplets) { /* append namespace separator and prefix */ tempPool.ptr[-1] = namespaceSeparator; s = b->prefix->name; do { if (!poolAppendChar(&tempPool, *s)) return XML_ERROR_NO_MEMORY; } while (*s++); } /* store expanded name in attribute list */ s = poolStart(&tempPool); poolFinish(&tempPool); appAtts[i] = s; /* fill empty slot with new version, uriName and hash value */ nsAtts[j].version = version; nsAtts[j].hash = uriHash; nsAtts[j].uriName = s; if (!--nPrefixes) { i += 2; break; } } else /* not prefixed */ ((XML_Char *)s)[-1] = 0; /* clear flag */ } } /* clear flags for the remaining attributes */ for (; i < attIndex; i += 2) ((XML_Char *)(appAtts[i]))[-1] = 0; for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding) binding->attId->name[-1] = 0; if (!ns) return XML_ERROR_NONE; /* expand the element type name */ if (elementType->prefix) { binding = elementType->prefix->binding; if (!binding) return XML_ERROR_UNBOUND_PREFIX; localPart = tagNamePtr->str; while (*localPart++ != XML_T(ASCII_COLON)) ; } else if (dtd->defaultPrefix.binding) { binding = dtd->defaultPrefix.binding; localPart = tagNamePtr->str; } else return XML_ERROR_NONE; prefixLen = 0; if (ns_triplets && binding->prefix->name) { for (; binding->prefix->name[prefixLen++];) ; /* prefixLen includes null terminator */ } tagNamePtr->localPart = localPart; tagNamePtr->uriLen = binding->uriLen; tagNamePtr->prefix = binding->prefix->name; tagNamePtr->prefixLen = prefixLen; for (i = 0; localPart[i++];) ; /* i includes null terminator */ n = i + binding->uriLen + prefixLen; if (n > binding->uriAlloc) { TAG *p; uri = (XML_Char *)MALLOC((n + EXPAND_SPARE) * sizeof(XML_Char)); if (!uri) return XML_ERROR_NO_MEMORY; binding->uriAlloc = n + EXPAND_SPARE; memcpy(uri, binding->uri, binding->uriLen * sizeof(XML_Char)); for (p = tagStack; p; p = p->parent) if (p->name.str == binding->uri) p->name.str = uri; FREE(binding->uri); binding->uri = uri; } /* if namespaceSeparator != '\0' then uri includes it already */ uri = binding->uri + binding->uriLen; memcpy(uri, localPart, i * sizeof(XML_Char)); /* we always have a namespace separator between localPart and prefix */ if (prefixLen) { uri += i - 1; *uri = namespaceSeparator; /* replace null terminator */ memcpy(uri + 1, binding->prefix->name, prefixLen * sizeof(XML_Char)); } tagNamePtr->str = binding->uri; return XML_ERROR_NONE; } /* addBinding() overwrites the value of prefix->binding without checking. Therefore one must keep track of the old value outside of addBinding(). */ static enum XML_Error addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId, const XML_Char *uri, BINDING **bindingsPtr) { static const XML_Char xmlNamespace[] = { ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w, ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, ASCII_o, ASCII_r, ASCII_g, ASCII_SLASH, ASCII_X, ASCII_M, ASCII_L, ASCII_SLASH, ASCII_1, ASCII_9, ASCII_9, ASCII_8, ASCII_SLASH, ASCII_n, ASCII_a, ASCII_m, ASCII_e, ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0' }; static const int xmlLen = (int)sizeof(xmlNamespace)/sizeof(XML_Char) - 1; static const XML_Char xmlnsNamespace[] = { ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w, ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, ASCII_o, ASCII_r, ASCII_g, ASCII_SLASH, ASCII_2, ASCII_0, ASCII_0, ASCII_0, ASCII_SLASH, ASCII_x, ASCII_m, ASCII_l, ASCII_n, ASCII_s, ASCII_SLASH, '\0' }; static const int xmlnsLen = (int)sizeof(xmlnsNamespace)/sizeof(XML_Char) - 1; XML_Bool mustBeXML = XML_FALSE; XML_Bool isXML = XML_TRUE; XML_Bool isXMLNS = XML_TRUE; BINDING *b; int len; /* empty URI is only valid for default namespace per XML NS 1.0 (not 1.1) */ if (*uri == XML_T('\0') && prefix->name) return XML_ERROR_UNDECLARING_PREFIX; if (prefix->name && prefix->name[0] == XML_T(ASCII_x) && prefix->name[1] == XML_T(ASCII_m) && prefix->name[2] == XML_T(ASCII_l)) { /* Not allowed to bind xmlns */ if (prefix->name[3] == XML_T(ASCII_n) && prefix->name[4] == XML_T(ASCII_s) && prefix->name[5] == XML_T('\0')) return XML_ERROR_RESERVED_PREFIX_XMLNS; if (prefix->name[3] == XML_T('\0')) mustBeXML = XML_TRUE; } for (len = 0; uri[len]; len++) { if (isXML && (len > xmlLen || uri[len] != xmlNamespace[len])) isXML = XML_FALSE; if (!mustBeXML && isXMLNS && (len > xmlnsLen || uri[len] != xmlnsNamespace[len])) isXMLNS = XML_FALSE; } isXML = isXML && len == xmlLen; isXMLNS = isXMLNS && len == xmlnsLen; if (mustBeXML != isXML) return mustBeXML ? XML_ERROR_RESERVED_PREFIX_XML : XML_ERROR_RESERVED_NAMESPACE_URI; if (isXMLNS) return XML_ERROR_RESERVED_NAMESPACE_URI; if (namespaceSeparator) len++; if (freeBindingList) { b = freeBindingList; if (len > b->uriAlloc) { XML_Char *temp = (XML_Char *)REALLOC(b->uri, sizeof(XML_Char) * (len + EXPAND_SPARE)); if (temp == NULL) return XML_ERROR_NO_MEMORY; b->uri = temp; b->uriAlloc = len + EXPAND_SPARE; } freeBindingList = b->nextTagBinding; } else { b = (BINDING *)MALLOC(sizeof(BINDING)); if (!b) return XML_ERROR_NO_MEMORY; b->uri = (XML_Char *)MALLOC(sizeof(XML_Char) * (len + EXPAND_SPARE)); if (!b->uri) { FREE(b); return XML_ERROR_NO_MEMORY; } b->uriAlloc = len + EXPAND_SPARE; } b->uriLen = len; memcpy(b->uri, uri, len * sizeof(XML_Char)); if (namespaceSeparator) b->uri[len - 1] = namespaceSeparator; b->prefix = prefix; b->attId = attId; b->prevPrefixBinding = prefix->binding; /* NULL binding when default namespace undeclared */ if (*uri == XML_T('\0') && prefix == &_dtd->defaultPrefix) prefix->binding = NULL; else prefix->binding = b; b->nextTagBinding = *bindingsPtr; *bindingsPtr = b; /* if attId == NULL then we are not starting a namespace scope */ if (attId && startNamespaceDeclHandler) startNamespaceDeclHandler(handlerArg, prefix->name, prefix->binding ? uri : 0); return XML_ERROR_NONE; } /* The idea here is to avoid using stack for each CDATA section when the whole file is parsed with one call. */ static enum XML_Error PTRCALL cdataSectionProcessor(XML_Parser parser, const char *start, const char *end, const char **endPtr) { enum XML_Error result = doCdataSection(parser, encoding, &start, end, endPtr, (XML_Bool)!ps_finalBuffer); if (result != XML_ERROR_NONE) return result; if (start) { if (parentParser) { /* we are parsing an external entity */ processor = externalEntityContentProcessor; return externalEntityContentProcessor(parser, start, end, endPtr); } else { processor = contentProcessor; return contentProcessor(parser, start, end, endPtr); } } return result; } /* startPtr gets set to non-null if the section is closed, and to null if the section is not yet closed. */ static enum XML_Error doCdataSection(XML_Parser parser, const ENCODING *enc, const char **startPtr, const char *end, const char **nextPtr, XML_Bool haveMore) { const char *s = *startPtr; const char **eventPP; const char **eventEndPP; if (enc == encoding) { eventPP = &eventPtr; *eventPP = s; eventEndPP = &eventEndPtr; } else { eventPP = &(openInternalEntities->internalEventPtr); eventEndPP = &(openInternalEntities->internalEventEndPtr); } *eventPP = s; *startPtr = NULL; for (;;) { const char *next; int tok = XmlCdataSectionTok(enc, s, end, &next); *eventEndPP = next; switch (tok) { case XML_TOK_CDATA_SECT_CLOSE: if (endCdataSectionHandler) endCdataSectionHandler(handlerArg); #if 0 /* see comment under XML_TOK_CDATA_SECT_OPEN */ else if (characterDataHandler) characterDataHandler(handlerArg, dataBuf, 0); #endif else if (defaultHandler) reportDefault(parser, enc, s, next); *startPtr = next; *nextPtr = next; if (ps_parsing == XML_FINISHED) return XML_ERROR_ABORTED; else return XML_ERROR_NONE; case XML_TOK_DATA_NEWLINE: if (characterDataHandler) { XML_Char c = 0xA; characterDataHandler(handlerArg, &c, 1); } else if (defaultHandler) reportDefault(parser, enc, s, next); break; case XML_TOK_DATA_CHARS: { XML_CharacterDataHandler charDataHandler = characterDataHandler; if (charDataHandler) { if (MUST_CONVERT(enc, s)) { for (;;) { ICHAR *dataPtr = (ICHAR *)dataBuf; XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd); *eventEndPP = next; charDataHandler(handlerArg, dataBuf, (int)(dataPtr - (ICHAR *)dataBuf)); if (s == next) break; *eventPP = s; } } else charDataHandler(handlerArg, (XML_Char *)s, (int)((XML_Char *)next - (XML_Char *)s)); } else if (defaultHandler) reportDefault(parser, enc, s, next); } break; case XML_TOK_INVALID: *eventPP = next; return XML_ERROR_INVALID_TOKEN; case XML_TOK_PARTIAL_CHAR: if (haveMore) { *nextPtr = s; return XML_ERROR_NONE; } return XML_ERROR_PARTIAL_CHAR; case XML_TOK_PARTIAL: case XML_TOK_NONE: if (haveMore) { *nextPtr = s; return XML_ERROR_NONE; } return XML_ERROR_UNCLOSED_CDATA_SECTION; default: *eventPP = next; return XML_ERROR_UNEXPECTED_STATE; } *eventPP = s = next; switch (ps_parsing) { case XML_SUSPENDED: *nextPtr = next; return XML_ERROR_NONE; case XML_FINISHED: return XML_ERROR_ABORTED; default: ; } } /* not reached */ } #ifdef XML_DTD /* The idea here is to avoid using stack for each IGNORE section when the whole file is parsed with one call. */ static enum XML_Error PTRCALL ignoreSectionProcessor(XML_Parser parser, const char *start, const char *end, const char **endPtr) { enum XML_Error result = doIgnoreSection(parser, encoding, &start, end, endPtr, (XML_Bool)!ps_finalBuffer); if (result != XML_ERROR_NONE) return result; if (start) { processor = prologProcessor; return prologProcessor(parser, start, end, endPtr); } return result; } /* startPtr gets set to non-null is the section is closed, and to null if the section is not yet closed. */ static enum XML_Error doIgnoreSection(XML_Parser parser, const ENCODING *enc, const char **startPtr, const char *end, const char **nextPtr, XML_Bool haveMore) { const char *next; int tok; const char *s = *startPtr; const char **eventPP; const char **eventEndPP; if (enc == encoding) { eventPP = &eventPtr; *eventPP = s; eventEndPP = &eventEndPtr; } else { eventPP = &(openInternalEntities->internalEventPtr); eventEndPP = &(openInternalEntities->internalEventEndPtr); } *eventPP = s; *startPtr = NULL; tok = XmlIgnoreSectionTok(enc, s, end, &next); *eventEndPP = next; switch (tok) { case XML_TOK_IGNORE_SECT: if (defaultHandler) reportDefault(parser, enc, s, next); *startPtr = next; *nextPtr = next; if (ps_parsing == XML_FINISHED) return XML_ERROR_ABORTED; else return XML_ERROR_NONE; case XML_TOK_INVALID: *eventPP = next; return XML_ERROR_INVALID_TOKEN; case XML_TOK_PARTIAL_CHAR: if (haveMore) { *nextPtr = s; return XML_ERROR_NONE; } return XML_ERROR_PARTIAL_CHAR; case XML_TOK_PARTIAL: case XML_TOK_NONE: if (haveMore) { *nextPtr = s; return XML_ERROR_NONE; } return XML_ERROR_SYNTAX; /* XML_ERROR_UNCLOSED_IGNORE_SECTION */ default: *eventPP = next; return XML_ERROR_UNEXPECTED_STATE; } /* not reached */ } #endif /* XML_DTD */ static enum XML_Error initializeEncoding(XML_Parser parser) { const char *s; #ifdef XML_UNICODE char encodingBuf[128]; if (!protocolEncodingName) s = NULL; else { int i; for (i = 0; protocolEncodingName[i]; i++) { if (i == sizeof(encodingBuf) - 1 || (protocolEncodingName[i] & ~0x7f) != 0) { encodingBuf[0] = '\0'; break; } encodingBuf[i] = (char)protocolEncodingName[i]; } encodingBuf[i] = '\0'; s = encodingBuf; } #else s = protocolEncodingName; #endif if ((ns ? XmlInitEncodingNS : XmlInitEncoding)(&initEncoding, &encoding, s)) return XML_ERROR_NONE; return handleUnknownEncoding(parser, protocolEncodingName); } static enum XML_Error processXmlDecl(XML_Parser parser, int isGeneralTextEntity, const char *s, const char *next) { const char *encodingName = NULL; const XML_Char *storedEncName = NULL; const ENCODING *newEncoding = NULL; const char *version = NULL; const char *versionend; const XML_Char *storedversion = NULL; int standalone = -1; if (!(ns ? XmlParseXmlDeclNS : XmlParseXmlDecl)(isGeneralTextEntity, encoding, s, next, &eventPtr, &version, &versionend, &encodingName, &newEncoding, &standalone)) { if (isGeneralTextEntity) return XML_ERROR_TEXT_DECL; else return XML_ERROR_XML_DECL; } if (!isGeneralTextEntity && standalone == 1) { _dtd->standalone = XML_TRUE; #ifdef XML_DTD if (paramEntityParsing == XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE) paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER; #endif /* XML_DTD */ } if (xmlDeclHandler) { if (encodingName != NULL) { storedEncName = poolStoreString(&temp2Pool, encoding, encodingName, encodingName + XmlNameLength(encoding, encodingName)); if (!storedEncName) return XML_ERROR_NO_MEMORY; poolFinish(&temp2Pool); } if (version) { storedversion = poolStoreString(&temp2Pool, encoding, version, versionend - encoding->minBytesPerChar); if (!storedversion) return XML_ERROR_NO_MEMORY; } xmlDeclHandler(handlerArg, storedversion, storedEncName, standalone); } else if (defaultHandler) reportDefault(parser, encoding, s, next); if (protocolEncodingName == NULL) { if (newEncoding) { if (newEncoding->minBytesPerChar != encoding->minBytesPerChar) { eventPtr = encodingName; return XML_ERROR_INCORRECT_ENCODING; } encoding = newEncoding; } else if (encodingName) { enum XML_Error result; if (!storedEncName) { storedEncName = poolStoreString( &temp2Pool, encoding, encodingName, encodingName + XmlNameLength(encoding, encodingName)); if (!storedEncName) return XML_ERROR_NO_MEMORY; } result = handleUnknownEncoding(parser, storedEncName); poolClear(&temp2Pool); if (result == XML_ERROR_UNKNOWN_ENCODING) eventPtr = encodingName; return result; } } if (storedEncName || storedversion) poolClear(&temp2Pool); return XML_ERROR_NONE; } static enum XML_Error handleUnknownEncoding(XML_Parser parser, const XML_Char *encodingName) { if (unknownEncodingHandler) { XML_Encoding info; int i; for (i = 0; i < 256; i++) info.map[i] = -1; info.convert = NULL; info.data = NULL; info.release = NULL; if (unknownEncodingHandler(unknownEncodingHandlerData, encodingName, &info)) { ENCODING *enc; unknownEncodingMem = MALLOC(XmlSizeOfUnknownEncoding()); if (!unknownEncodingMem) { if (info.release) info.release(info.data); return XML_ERROR_NO_MEMORY; } enc = (ns ? XmlInitUnknownEncodingNS : XmlInitUnknownEncoding)(unknownEncodingMem, info.map, info.convert, info.data); if (enc) { unknownEncodingData = info.data; unknownEncodingRelease = info.release; encoding = enc; return XML_ERROR_NONE; } } if (info.release != NULL) info.release(info.data); } return XML_ERROR_UNKNOWN_ENCODING; } static enum XML_Error PTRCALL prologInitProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { enum XML_Error result = initializeEncoding(parser); if (result != XML_ERROR_NONE) return result; processor = prologProcessor; return prologProcessor(parser, s, end, nextPtr); } #ifdef XML_DTD static enum XML_Error PTRCALL externalParEntInitProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { enum XML_Error result = initializeEncoding(parser); if (result != XML_ERROR_NONE) return result; /* we know now that XML_Parse(Buffer) has been called, so we consider the external parameter entity read */ _dtd->paramEntityRead = XML_TRUE; if (prologState.inEntityValue) { processor = entityValueInitProcessor; return entityValueInitProcessor(parser, s, end, nextPtr); } else { processor = externalParEntProcessor; return externalParEntProcessor(parser, s, end, nextPtr); } } static enum XML_Error PTRCALL entityValueInitProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { int tok; const char *start = s; const char *next = start; eventPtr = start; for (;;) { tok = XmlPrologTok(encoding, start, end, &next); eventEndPtr = next; if (tok <= 0) { if (!ps_finalBuffer && tok != XML_TOK_INVALID) { *nextPtr = s; return XML_ERROR_NONE; } switch (tok) { case XML_TOK_INVALID: return XML_ERROR_INVALID_TOKEN; case XML_TOK_PARTIAL: return XML_ERROR_UNCLOSED_TOKEN; case XML_TOK_PARTIAL_CHAR: return XML_ERROR_PARTIAL_CHAR; case XML_TOK_NONE: /* start == end */ default: break; } /* found end of entity value - can store it now */ return storeEntityValue(parser, encoding, s, end); } else if (tok == XML_TOK_XML_DECL) { enum XML_Error result; result = processXmlDecl(parser, 0, start, next); if (result != XML_ERROR_NONE) return result; switch (ps_parsing) { case XML_SUSPENDED: *nextPtr = next; return XML_ERROR_NONE; case XML_FINISHED: return XML_ERROR_ABORTED; default: *nextPtr = next; } /* stop scanning for text declaration - we found one */ processor = entityValueProcessor; return entityValueProcessor(parser, next, end, nextPtr); } /* If we are at the end of the buffer, this would cause XmlPrologTok to return XML_TOK_NONE on the next call, which would then cause the function to exit with *nextPtr set to s - that is what we want for other tokens, but not for the BOM - we would rather like to skip it; then, when this routine is entered the next time, XmlPrologTok will return XML_TOK_INVALID, since the BOM is still in the buffer */ else if (tok == XML_TOK_BOM && next == end && !ps_finalBuffer) { *nextPtr = next; return XML_ERROR_NONE; } start = next; eventPtr = start; } } static enum XML_Error PTRCALL externalParEntProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { const char *next = s; int tok; tok = XmlPrologTok(encoding, s, end, &next); if (tok <= 0) { if (!ps_finalBuffer && tok != XML_TOK_INVALID) { *nextPtr = s; return XML_ERROR_NONE; } switch (tok) { case XML_TOK_INVALID: return XML_ERROR_INVALID_TOKEN; case XML_TOK_PARTIAL: return XML_ERROR_UNCLOSED_TOKEN; case XML_TOK_PARTIAL_CHAR: return XML_ERROR_PARTIAL_CHAR; case XML_TOK_NONE: /* start == end */ default: break; } } /* This would cause the next stage, i.e. doProlog to be passed XML_TOK_BOM. However, when parsing an external subset, doProlog will not accept a BOM as valid, and report a syntax error, so we have to skip the BOM */ else if (tok == XML_TOK_BOM) { s = next; tok = XmlPrologTok(encoding, s, end, &next); } processor = prologProcessor; return doProlog(parser, encoding, s, end, tok, next, nextPtr, (XML_Bool)!ps_finalBuffer); } static enum XML_Error PTRCALL entityValueProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { const char *start = s; const char *next = s; const ENCODING *enc = encoding; int tok; for (;;) { tok = XmlPrologTok(enc, start, end, &next); if (tok <= 0) { if (!ps_finalBuffer && tok != XML_TOK_INVALID) { *nextPtr = s; return XML_ERROR_NONE; } switch (tok) { case XML_TOK_INVALID: return XML_ERROR_INVALID_TOKEN; case XML_TOK_PARTIAL: return XML_ERROR_UNCLOSED_TOKEN; case XML_TOK_PARTIAL_CHAR: return XML_ERROR_PARTIAL_CHAR; case XML_TOK_NONE: /* start == end */ default: break; } /* found end of entity value - can store it now */ return storeEntityValue(parser, enc, s, end); } start = next; } } #endif /* XML_DTD */ static enum XML_Error PTRCALL prologProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { const char *next = s; int tok = XmlPrologTok(encoding, s, end, &next); return doProlog(parser, encoding, s, end, tok, next, nextPtr, (XML_Bool)!ps_finalBuffer); } static enum XML_Error doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end, int tok, const char *next, const char **nextPtr, XML_Bool haveMore) { #ifdef XML_DTD static const XML_Char externalSubsetName[] = { ASCII_HASH , '\0' }; #endif /* XML_DTD */ static const XML_Char atypeCDATA[] = { ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0' }; static const XML_Char atypeID[] = { ASCII_I, ASCII_D, '\0' }; static const XML_Char atypeIDREF[] = { ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0' }; static const XML_Char atypeIDREFS[] = { ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0' }; static const XML_Char atypeENTITY[] = { ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0' }; static const XML_Char atypeENTITIES[] = { ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_I, ASCII_E, ASCII_S, '\0' }; static const XML_Char atypeNMTOKEN[] = { ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0' }; static const XML_Char atypeNMTOKENS[] = { ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, ASCII_S, '\0' }; static const XML_Char notationPrefix[] = { ASCII_N, ASCII_O, ASCII_T, ASCII_A, ASCII_T, ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0' }; static const XML_Char enumValueSep[] = { ASCII_PIPE, '\0' }; static const XML_Char enumValueStart[] = { ASCII_LPAREN, '\0' }; /* save one level of indirection */ DTD * const dtd = _dtd; const char **eventPP; const char **eventEndPP; enum XML_Content_Quant quant; if (enc == encoding) { eventPP = &eventPtr; eventEndPP = &eventEndPtr; } else { eventPP = &(openInternalEntities->internalEventPtr); eventEndPP = &(openInternalEntities->internalEventEndPtr); } for (;;) { int role; XML_Bool handleDefault = XML_TRUE; *eventPP = s; *eventEndPP = next; if (tok <= 0) { if (haveMore && tok != XML_TOK_INVALID) { *nextPtr = s; return XML_ERROR_NONE; } switch (tok) { case XML_TOK_INVALID: *eventPP = next; return XML_ERROR_INVALID_TOKEN; case XML_TOK_PARTIAL: return XML_ERROR_UNCLOSED_TOKEN; case XML_TOK_PARTIAL_CHAR: return XML_ERROR_PARTIAL_CHAR; case -XML_TOK_PROLOG_S: tok = -tok; break; case XML_TOK_NONE: #ifdef XML_DTD /* for internal PE NOT referenced between declarations */ if (enc != encoding && !openInternalEntities->betweenDecl) { *nextPtr = s; return XML_ERROR_NONE; } /* WFC: PE Between Declarations - must check that PE contains complete markup, not only for external PEs, but also for internal PEs if the reference occurs between declarations. */ if (isParamEntity || enc != encoding) { if (XmlTokenRole(&prologState, XML_TOK_NONE, end, end, enc) == XML_ROLE_ERROR) return XML_ERROR_INCOMPLETE_PE; *nextPtr = s; return XML_ERROR_NONE; } #endif /* XML_DTD */ return XML_ERROR_NO_ELEMENTS; default: tok = -tok; next = end; break; } } role = XmlTokenRole(&prologState, tok, s, next, enc); switch (role) { case XML_ROLE_XML_DECL: { enum XML_Error result = processXmlDecl(parser, 0, s, next); if (result != XML_ERROR_NONE) return result; enc = encoding; handleDefault = XML_FALSE; } break; case XML_ROLE_DOCTYPE_NAME: if (startDoctypeDeclHandler) { doctypeName = poolStoreString(&tempPool, enc, s, next); if (!doctypeName) return XML_ERROR_NO_MEMORY; poolFinish(&tempPool); doctypePubid = NULL; handleDefault = XML_FALSE; } doctypeSysid = NULL; /* always initialize to NULL */ break; case XML_ROLE_DOCTYPE_INTERNAL_SUBSET: if (startDoctypeDeclHandler) { startDoctypeDeclHandler(handlerArg, doctypeName, doctypeSysid, doctypePubid, 1); doctypeName = NULL; poolClear(&tempPool); handleDefault = XML_FALSE; } break; #ifdef XML_DTD case XML_ROLE_TEXT_DECL: { enum XML_Error result = processXmlDecl(parser, 1, s, next); if (result != XML_ERROR_NONE) return result; enc = encoding; handleDefault = XML_FALSE; } break; #endif /* XML_DTD */ case XML_ROLE_DOCTYPE_PUBLIC_ID: #ifdef XML_DTD useForeignDTD = XML_FALSE; declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY)); if (!declEntity) return XML_ERROR_NO_MEMORY; #endif /* XML_DTD */ dtd->hasParamEntityRefs = XML_TRUE; if (startDoctypeDeclHandler) { XML_Char *pubId; if (!XmlIsPublicId(enc, s, next, eventPP)) return XML_ERROR_PUBLICID; pubId = poolStoreString(&tempPool, enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); if (!pubId) return XML_ERROR_NO_MEMORY; normalizePublicId(pubId); poolFinish(&tempPool); doctypePubid = pubId; handleDefault = XML_FALSE; goto alreadyChecked; } /* fall through */ case XML_ROLE_ENTITY_PUBLIC_ID: if (!XmlIsPublicId(enc, s, next, eventPP)) return XML_ERROR_PUBLICID; alreadyChecked: if (dtd->keepProcessing && declEntity) { XML_Char *tem = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); if (!tem) return XML_ERROR_NO_MEMORY; normalizePublicId(tem); declEntity->publicId = tem; poolFinish(&dtd->pool); if (entityDeclHandler) handleDefault = XML_FALSE; } break; case XML_ROLE_DOCTYPE_CLOSE: if (doctypeName) { startDoctypeDeclHandler(handlerArg, doctypeName, doctypeSysid, doctypePubid, 0); poolClear(&tempPool); handleDefault = XML_FALSE; } /* doctypeSysid will be non-NULL in the case of a previous XML_ROLE_DOCTYPE_SYSTEM_ID, even if startDoctypeDeclHandler was not set, indicating an external subset */ #ifdef XML_DTD if (doctypeSysid || useForeignDTD) { XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs; dtd->hasParamEntityRefs = XML_TRUE; if (paramEntityParsing && externalEntityRefHandler) { ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY)); if (!entity) return XML_ERROR_NO_MEMORY; if (useForeignDTD) entity->base = curBase; dtd->paramEntityRead = XML_FALSE; if (!externalEntityRefHandler(externalEntityRefHandlerArg, 0, entity->base, entity->systemId, entity->publicId)) return XML_ERROR_EXTERNAL_ENTITY_HANDLING; if (dtd->paramEntityRead) { if (!dtd->standalone && notStandaloneHandler && !notStandaloneHandler(handlerArg)) return XML_ERROR_NOT_STANDALONE; } /* if we didn't read the foreign DTD then this means that there is no external subset and we must reset dtd->hasParamEntityRefs */ else if (!doctypeSysid) dtd->hasParamEntityRefs = hadParamEntityRefs; /* end of DTD - no need to update dtd->keepProcessing */ } useForeignDTD = XML_FALSE; } #endif /* XML_DTD */ if (endDoctypeDeclHandler) { endDoctypeDeclHandler(handlerArg); handleDefault = XML_FALSE; } break; case XML_ROLE_INSTANCE_START: #ifdef XML_DTD /* if there is no DOCTYPE declaration then now is the last chance to read the foreign DTD */ if (useForeignDTD) { XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs; dtd->hasParamEntityRefs = XML_TRUE; if (paramEntityParsing && externalEntityRefHandler) { ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY)); if (!entity) return XML_ERROR_NO_MEMORY; entity->base = curBase; dtd->paramEntityRead = XML_FALSE; if (!externalEntityRefHandler(externalEntityRefHandlerArg, 0, entity->base, entity->systemId, entity->publicId)) return XML_ERROR_EXTERNAL_ENTITY_HANDLING; if (dtd->paramEntityRead) { if (!dtd->standalone && notStandaloneHandler && !notStandaloneHandler(handlerArg)) return XML_ERROR_NOT_STANDALONE; } /* if we didn't read the foreign DTD then this means that there is no external subset and we must reset dtd->hasParamEntityRefs */ else dtd->hasParamEntityRefs = hadParamEntityRefs; /* end of DTD - no need to update dtd->keepProcessing */ } } #endif /* XML_DTD */ processor = contentProcessor; return contentProcessor(parser, s, end, nextPtr); case XML_ROLE_ATTLIST_ELEMENT_NAME: declElementType = getElementType(parser, enc, s, next); if (!declElementType) return XML_ERROR_NO_MEMORY; goto checkAttListDeclHandler; case XML_ROLE_ATTRIBUTE_NAME: declAttributeId = getAttributeId(parser, enc, s, next); if (!declAttributeId) return XML_ERROR_NO_MEMORY; declAttributeIsCdata = XML_FALSE; declAttributeType = NULL; declAttributeIsId = XML_FALSE; goto checkAttListDeclHandler; case XML_ROLE_ATTRIBUTE_TYPE_CDATA: declAttributeIsCdata = XML_TRUE; declAttributeType = atypeCDATA; goto checkAttListDeclHandler; case XML_ROLE_ATTRIBUTE_TYPE_ID: declAttributeIsId = XML_TRUE; declAttributeType = atypeID; goto checkAttListDeclHandler; case XML_ROLE_ATTRIBUTE_TYPE_IDREF: declAttributeType = atypeIDREF; goto checkAttListDeclHandler; case XML_ROLE_ATTRIBUTE_TYPE_IDREFS: declAttributeType = atypeIDREFS; goto checkAttListDeclHandler; case XML_ROLE_ATTRIBUTE_TYPE_ENTITY: declAttributeType = atypeENTITY; goto checkAttListDeclHandler; case XML_ROLE_ATTRIBUTE_TYPE_ENTITIES: declAttributeType = atypeENTITIES; goto checkAttListDeclHandler; case XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN: declAttributeType = atypeNMTOKEN; goto checkAttListDeclHandler; case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS: declAttributeType = atypeNMTOKENS; checkAttListDeclHandler: if (dtd->keepProcessing && attlistDeclHandler) handleDefault = XML_FALSE; break; case XML_ROLE_ATTRIBUTE_ENUM_VALUE: case XML_ROLE_ATTRIBUTE_NOTATION_VALUE: if (dtd->keepProcessing && attlistDeclHandler) { const XML_Char *prefix; if (declAttributeType) { prefix = enumValueSep; } else { prefix = (role == XML_ROLE_ATTRIBUTE_NOTATION_VALUE ? notationPrefix : enumValueStart); } if (!poolAppendString(&tempPool, prefix)) return XML_ERROR_NO_MEMORY; if (!poolAppend(&tempPool, enc, s, next)) return XML_ERROR_NO_MEMORY; declAttributeType = tempPool.start; handleDefault = XML_FALSE; } break; case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE: case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE: if (dtd->keepProcessing) { if (!defineAttribute(declElementType, declAttributeId, declAttributeIsCdata, declAttributeIsId, 0, parser)) return XML_ERROR_NO_MEMORY; if (attlistDeclHandler && declAttributeType) { if (*declAttributeType == XML_T(ASCII_LPAREN) || (*declAttributeType == XML_T(ASCII_N) && declAttributeType[1] == XML_T(ASCII_O))) { /* Enumerated or Notation type */ if (!poolAppendChar(&tempPool, XML_T(ASCII_RPAREN)) || !poolAppendChar(&tempPool, XML_T('\0'))) return XML_ERROR_NO_MEMORY; declAttributeType = tempPool.start; poolFinish(&tempPool); } *eventEndPP = s; attlistDeclHandler(handlerArg, declElementType->name, declAttributeId->name, declAttributeType, 0, role == XML_ROLE_REQUIRED_ATTRIBUTE_VALUE); poolClear(&tempPool); handleDefault = XML_FALSE; } } break; case XML_ROLE_DEFAULT_ATTRIBUTE_VALUE: case XML_ROLE_FIXED_ATTRIBUTE_VALUE: if (dtd->keepProcessing) { const XML_Char *attVal; enum XML_Error result = storeAttributeValue(parser, enc, declAttributeIsCdata, s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool); if (result) return result; attVal = poolStart(&dtd->pool); poolFinish(&dtd->pool); /* ID attributes aren't allowed to have a default */ if (!defineAttribute(declElementType, declAttributeId, declAttributeIsCdata, XML_FALSE, attVal, parser)) return XML_ERROR_NO_MEMORY; if (attlistDeclHandler && declAttributeType) { if (*declAttributeType == XML_T(ASCII_LPAREN) || (*declAttributeType == XML_T(ASCII_N) && declAttributeType[1] == XML_T(ASCII_O))) { /* Enumerated or Notation type */ if (!poolAppendChar(&tempPool, XML_T(ASCII_RPAREN)) || !poolAppendChar(&tempPool, XML_T('\0'))) return XML_ERROR_NO_MEMORY; declAttributeType = tempPool.start; poolFinish(&tempPool); } *eventEndPP = s; attlistDeclHandler(handlerArg, declElementType->name, declAttributeId->name, declAttributeType, attVal, role == XML_ROLE_FIXED_ATTRIBUTE_VALUE); poolClear(&tempPool); handleDefault = XML_FALSE; } } break; case XML_ROLE_ENTITY_VALUE: if (dtd->keepProcessing) { enum XML_Error result = storeEntityValue(parser, enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); if (declEntity) { declEntity->textPtr = poolStart(&dtd->entityValuePool); declEntity->textLen = (int)(poolLength(&dtd->entityValuePool)); poolFinish(&dtd->entityValuePool); if (entityDeclHandler) { *eventEndPP = s; entityDeclHandler(handlerArg, declEntity->name, declEntity->is_param, declEntity->textPtr, declEntity->textLen, curBase, 0, 0, 0); handleDefault = XML_FALSE; } } else poolDiscard(&dtd->entityValuePool); if (result != XML_ERROR_NONE) return result; } break; case XML_ROLE_DOCTYPE_SYSTEM_ID: #ifdef XML_DTD useForeignDTD = XML_FALSE; #endif /* XML_DTD */ dtd->hasParamEntityRefs = XML_TRUE; if (startDoctypeDeclHandler) { doctypeSysid = poolStoreString(&tempPool, enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); if (doctypeSysid == NULL) return XML_ERROR_NO_MEMORY; poolFinish(&tempPool); handleDefault = XML_FALSE; } #ifdef XML_DTD else /* use externalSubsetName to make doctypeSysid non-NULL for the case where no startDoctypeDeclHandler is set */ doctypeSysid = externalSubsetName; #endif /* XML_DTD */ if (!dtd->standalone #ifdef XML_DTD && !paramEntityParsing #endif /* XML_DTD */ && notStandaloneHandler && !notStandaloneHandler(handlerArg)) return XML_ERROR_NOT_STANDALONE; #ifndef XML_DTD break; #else /* XML_DTD */ if (!declEntity) { declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY)); if (!declEntity) return XML_ERROR_NO_MEMORY; declEntity->publicId = NULL; } /* fall through */ #endif /* XML_DTD */ case XML_ROLE_ENTITY_SYSTEM_ID: if (dtd->keepProcessing && declEntity) { declEntity->systemId = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); if (!declEntity->systemId) return XML_ERROR_NO_MEMORY; declEntity->base = curBase; poolFinish(&dtd->pool); if (entityDeclHandler) handleDefault = XML_FALSE; } break; case XML_ROLE_ENTITY_COMPLETE: if (dtd->keepProcessing && declEntity && entityDeclHandler) { *eventEndPP = s; entityDeclHandler(handlerArg, declEntity->name, declEntity->is_param, 0,0, declEntity->base, declEntity->systemId, declEntity->publicId, 0); handleDefault = XML_FALSE; } break; case XML_ROLE_ENTITY_NOTATION_NAME: if (dtd->keepProcessing && declEntity) { declEntity->notation = poolStoreString(&dtd->pool, enc, s, next); if (!declEntity->notation) return XML_ERROR_NO_MEMORY; poolFinish(&dtd->pool); if (unparsedEntityDeclHandler) { *eventEndPP = s; unparsedEntityDeclHandler(handlerArg, declEntity->name, declEntity->base, declEntity->systemId, declEntity->publicId, declEntity->notation); handleDefault = XML_FALSE; } else if (entityDeclHandler) { *eventEndPP = s; entityDeclHandler(handlerArg, declEntity->name, 0,0,0, declEntity->base, declEntity->systemId, declEntity->publicId, declEntity->notation); handleDefault = XML_FALSE; } } break; case XML_ROLE_GENERAL_ENTITY_NAME: { if (XmlPredefinedEntityName(enc, s, next)) { declEntity = NULL; break; } if (dtd->keepProcessing) { const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next); if (!name) return XML_ERROR_NO_MEMORY; declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, sizeof(ENTITY)); if (!declEntity) return XML_ERROR_NO_MEMORY; if (declEntity->name != name) { poolDiscard(&dtd->pool); declEntity = NULL; } else { poolFinish(&dtd->pool); declEntity->publicId = NULL; declEntity->is_param = XML_FALSE; /* if we have a parent parser or are reading an internal parameter entity, then the entity declaration is not considered "internal" */ declEntity->is_internal = !(parentParser || openInternalEntities); if (entityDeclHandler) handleDefault = XML_FALSE; } } else { poolDiscard(&dtd->pool); declEntity = NULL; } } break; case XML_ROLE_PARAM_ENTITY_NAME: #ifdef XML_DTD if (dtd->keepProcessing) { const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next); if (!name) return XML_ERROR_NO_MEMORY; declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, sizeof(ENTITY)); if (!declEntity) return XML_ERROR_NO_MEMORY; if (declEntity->name != name) { poolDiscard(&dtd->pool); declEntity = NULL; } else { poolFinish(&dtd->pool); declEntity->publicId = NULL; declEntity->is_param = XML_TRUE; /* if we have a parent parser or are reading an internal parameter entity, then the entity declaration is not considered "internal" */ declEntity->is_internal = !(parentParser || openInternalEntities); if (entityDeclHandler) handleDefault = XML_FALSE; } } else { poolDiscard(&dtd->pool); declEntity = NULL; } #else /* not XML_DTD */ declEntity = NULL; #endif /* XML_DTD */ break; case XML_ROLE_NOTATION_NAME: declNotationPublicId = NULL; declNotationName = NULL; if (notationDeclHandler) { declNotationName = poolStoreString(&tempPool, enc, s, next); if (!declNotationName) return XML_ERROR_NO_MEMORY; poolFinish(&tempPool); handleDefault = XML_FALSE; } break; case XML_ROLE_NOTATION_PUBLIC_ID: if (!XmlIsPublicId(enc, s, next, eventPP)) return XML_ERROR_PUBLICID; if (declNotationName) { /* means notationDeclHandler != NULL */ XML_Char *tem = poolStoreString(&tempPool, enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); if (!tem) return XML_ERROR_NO_MEMORY; normalizePublicId(tem); declNotationPublicId = tem; poolFinish(&tempPool); handleDefault = XML_FALSE; } break; case XML_ROLE_NOTATION_SYSTEM_ID: if (declNotationName && notationDeclHandler) { const XML_Char *systemId = poolStoreString(&tempPool, enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); if (!systemId) return XML_ERROR_NO_MEMORY; *eventEndPP = s; notationDeclHandler(handlerArg, declNotationName, curBase, systemId, declNotationPublicId); handleDefault = XML_FALSE; } poolClear(&tempPool); break; case XML_ROLE_NOTATION_NO_SYSTEM_ID: if (declNotationPublicId && notationDeclHandler) { *eventEndPP = s; notationDeclHandler(handlerArg, declNotationName, curBase, 0, declNotationPublicId); handleDefault = XML_FALSE; } poolClear(&tempPool); break; case XML_ROLE_ERROR: switch (tok) { case XML_TOK_PARAM_ENTITY_REF: /* PE references in internal subset are not allowed within declarations. */ return XML_ERROR_PARAM_ENTITY_REF; case XML_TOK_XML_DECL: return XML_ERROR_MISPLACED_XML_PI; default: return XML_ERROR_SYNTAX; } #ifdef XML_DTD case XML_ROLE_IGNORE_SECT: { enum XML_Error result; if (defaultHandler) reportDefault(parser, enc, s, next); handleDefault = XML_FALSE; result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore); if (result != XML_ERROR_NONE) return result; else if (!next) { processor = ignoreSectionProcessor; return result; } } break; #endif /* XML_DTD */ case XML_ROLE_GROUP_OPEN: if (prologState.level >= groupSize) { if (groupSize) { char *temp = (char *)REALLOC(groupConnector, groupSize *= 2); if (temp == NULL) return XML_ERROR_NO_MEMORY; groupConnector = temp; if (dtd->scaffIndex) { int *temp = (int *)REALLOC(dtd->scaffIndex, groupSize * sizeof(int)); if (temp == NULL) return XML_ERROR_NO_MEMORY; dtd->scaffIndex = temp; } } else { groupConnector = (char *)MALLOC(groupSize = 32); if (!groupConnector) return XML_ERROR_NO_MEMORY; } } groupConnector[prologState.level] = 0; if (dtd->in_eldecl) { int myindex = nextScaffoldPart(parser); if (myindex < 0) return XML_ERROR_NO_MEMORY; dtd->scaffIndex[dtd->scaffLevel] = myindex; dtd->scaffLevel++; dtd->scaffold[myindex].type = XML_CTYPE_SEQ; if (elementDeclHandler) handleDefault = XML_FALSE; } break; case XML_ROLE_GROUP_SEQUENCE: if (groupConnector[prologState.level] == ASCII_PIPE) return XML_ERROR_SYNTAX; groupConnector[prologState.level] = ASCII_COMMA; if (dtd->in_eldecl && elementDeclHandler) handleDefault = XML_FALSE; break; case XML_ROLE_GROUP_CHOICE: if (groupConnector[prologState.level] == ASCII_COMMA) return XML_ERROR_SYNTAX; if (dtd->in_eldecl && !groupConnector[prologState.level] && (dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type != XML_CTYPE_MIXED) ) { dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type = XML_CTYPE_CHOICE; if (elementDeclHandler) handleDefault = XML_FALSE; } groupConnector[prologState.level] = ASCII_PIPE; break; case XML_ROLE_PARAM_ENTITY_REF: #ifdef XML_DTD case XML_ROLE_INNER_PARAM_ENTITY_REF: dtd->hasParamEntityRefs = XML_TRUE; if (!paramEntityParsing) dtd->keepProcessing = dtd->standalone; else { const XML_Char *name; ENTITY *entity; name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); if (!name) return XML_ERROR_NO_MEMORY; entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0); poolDiscard(&dtd->pool); /* first, determine if a check for an existing declaration is needed; if yes, check that the entity exists, and that it is internal, otherwise call the skipped entity handler */ if (prologState.documentEntity && (dtd->standalone ? !openInternalEntities : !dtd->hasParamEntityRefs)) { if (!entity) return XML_ERROR_UNDEFINED_ENTITY; else if (!entity->is_internal) return XML_ERROR_ENTITY_DECLARED_IN_PE; } else if (!entity) { dtd->keepProcessing = dtd->standalone; /* cannot report skipped entities in declarations */ if ((role == XML_ROLE_PARAM_ENTITY_REF) && skippedEntityHandler) { skippedEntityHandler(handlerArg, name, 1); handleDefault = XML_FALSE; } break; } if (entity->open) return XML_ERROR_RECURSIVE_ENTITY_REF; if (entity->textPtr) { enum XML_Error result; XML_Bool betweenDecl = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE); result = processInternalEntity(parser, entity, betweenDecl); if (result != XML_ERROR_NONE) return result; handleDefault = XML_FALSE; break; } if (externalEntityRefHandler) { dtd->paramEntityRead = XML_FALSE; entity->open = XML_TRUE; if (!externalEntityRefHandler(externalEntityRefHandlerArg, 0, entity->base, entity->systemId, entity->publicId)) { entity->open = XML_FALSE; return XML_ERROR_EXTERNAL_ENTITY_HANDLING; } entity->open = XML_FALSE; handleDefault = XML_FALSE; if (!dtd->paramEntityRead) { dtd->keepProcessing = dtd->standalone; break; } } else { dtd->keepProcessing = dtd->standalone; break; } } #endif /* XML_DTD */ if (!dtd->standalone && notStandaloneHandler && !notStandaloneHandler(handlerArg)) return XML_ERROR_NOT_STANDALONE; break; /* Element declaration stuff */ case XML_ROLE_ELEMENT_NAME: if (elementDeclHandler) { declElementType = getElementType(parser, enc, s, next); if (!declElementType) return XML_ERROR_NO_MEMORY; dtd->scaffLevel = 0; dtd->scaffCount = 0; dtd->in_eldecl = XML_TRUE; handleDefault = XML_FALSE; } break; case XML_ROLE_CONTENT_ANY: case XML_ROLE_CONTENT_EMPTY: if (dtd->in_eldecl) { if (elementDeclHandler) { XML_Content * content = (XML_Content *) MALLOC(sizeof(XML_Content)); if (!content) return XML_ERROR_NO_MEMORY; content->quant = XML_CQUANT_NONE; content->name = NULL; content->numchildren = 0; content->children = NULL; content->type = ((role == XML_ROLE_CONTENT_ANY) ? XML_CTYPE_ANY : XML_CTYPE_EMPTY); *eventEndPP = s; elementDeclHandler(handlerArg, declElementType->name, content); handleDefault = XML_FALSE; } dtd->in_eldecl = XML_FALSE; } break; case XML_ROLE_CONTENT_PCDATA: if (dtd->in_eldecl) { dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type = XML_CTYPE_MIXED; if (elementDeclHandler) handleDefault = XML_FALSE; } break; case XML_ROLE_CONTENT_ELEMENT: quant = XML_CQUANT_NONE; goto elementContent; case XML_ROLE_CONTENT_ELEMENT_OPT: quant = XML_CQUANT_OPT; goto elementContent; case XML_ROLE_CONTENT_ELEMENT_REP: quant = XML_CQUANT_REP; goto elementContent; case XML_ROLE_CONTENT_ELEMENT_PLUS: quant = XML_CQUANT_PLUS; elementContent: if (dtd->in_eldecl) { ELEMENT_TYPE *el; const XML_Char *name; int nameLen; const char *nxt = (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar); int myindex = nextScaffoldPart(parser); if (myindex < 0) return XML_ERROR_NO_MEMORY; dtd->scaffold[myindex].type = XML_CTYPE_NAME; dtd->scaffold[myindex].quant = quant; el = getElementType(parser, enc, s, nxt); if (!el) return XML_ERROR_NO_MEMORY; name = el->name; dtd->scaffold[myindex].name = name; nameLen = 0; for (; name[nameLen++]; ); dtd->contentStringLen += nameLen; if (elementDeclHandler) handleDefault = XML_FALSE; } break; case XML_ROLE_GROUP_CLOSE: quant = XML_CQUANT_NONE; goto closeGroup; case XML_ROLE_GROUP_CLOSE_OPT: quant = XML_CQUANT_OPT; goto closeGroup; case XML_ROLE_GROUP_CLOSE_REP: quant = XML_CQUANT_REP; goto closeGroup; case XML_ROLE_GROUP_CLOSE_PLUS: quant = XML_CQUANT_PLUS; closeGroup: if (dtd->in_eldecl) { if (elementDeclHandler) handleDefault = XML_FALSE; dtd->scaffLevel--; dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel]].quant = quant; if (dtd->scaffLevel == 0) { if (!handleDefault) { XML_Content *model = build_model(parser); if (!model) return XML_ERROR_NO_MEMORY; *eventEndPP = s; elementDeclHandler(handlerArg, declElementType->name, model); } dtd->in_eldecl = XML_FALSE; dtd->contentStringLen = 0; } } break; /* End element declaration stuff */ case XML_ROLE_PI: if (!reportProcessingInstruction(parser, enc, s, next)) return XML_ERROR_NO_MEMORY; handleDefault = XML_FALSE; break; case XML_ROLE_COMMENT: if (!reportComment(parser, enc, s, next)) return XML_ERROR_NO_MEMORY; handleDefault = XML_FALSE; break; case XML_ROLE_NONE: switch (tok) { case XML_TOK_BOM: handleDefault = XML_FALSE; break; } break; case XML_ROLE_DOCTYPE_NONE: if (startDoctypeDeclHandler) handleDefault = XML_FALSE; break; case XML_ROLE_ENTITY_NONE: if (dtd->keepProcessing && entityDeclHandler) handleDefault = XML_FALSE; break; case XML_ROLE_NOTATION_NONE: if (notationDeclHandler) handleDefault = XML_FALSE; break; case XML_ROLE_ATTLIST_NONE: if (dtd->keepProcessing && attlistDeclHandler) handleDefault = XML_FALSE; break; case XML_ROLE_ELEMENT_NONE: if (elementDeclHandler) handleDefault = XML_FALSE; break; } /* end of big switch */ if (handleDefault && defaultHandler) reportDefault(parser, enc, s, next); switch (ps_parsing) { case XML_SUSPENDED: *nextPtr = next; return XML_ERROR_NONE; case XML_FINISHED: return XML_ERROR_ABORTED; default: s = next; tok = XmlPrologTok(enc, s, end, &next); } } /* not reached */ } static enum XML_Error PTRCALL epilogProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { processor = epilogProcessor; eventPtr = s; for (;;) { const char *next = NULL; int tok = XmlPrologTok(encoding, s, end, &next); eventEndPtr = next; switch (tok) { /* report partial linebreak - it might be the last token */ case -XML_TOK_PROLOG_S: if (defaultHandler) { reportDefault(parser, encoding, s, next); if (ps_parsing == XML_FINISHED) return XML_ERROR_ABORTED; } *nextPtr = next; return XML_ERROR_NONE; case XML_TOK_NONE: *nextPtr = s; return XML_ERROR_NONE; case XML_TOK_PROLOG_S: if (defaultHandler) reportDefault(parser, encoding, s, next); break; case XML_TOK_PI: if (!reportProcessingInstruction(parser, encoding, s, next)) return XML_ERROR_NO_MEMORY; break; case XML_TOK_COMMENT: if (!reportComment(parser, encoding, s, next)) return XML_ERROR_NO_MEMORY; break; case XML_TOK_INVALID: eventPtr = next; return XML_ERROR_INVALID_TOKEN; case XML_TOK_PARTIAL: if (!ps_finalBuffer) { *nextPtr = s; return XML_ERROR_NONE; } return XML_ERROR_UNCLOSED_TOKEN; case XML_TOK_PARTIAL_CHAR: if (!ps_finalBuffer) { *nextPtr = s; return XML_ERROR_NONE; } return XML_ERROR_PARTIAL_CHAR; default: return XML_ERROR_JUNK_AFTER_DOC_ELEMENT; } eventPtr = s = next; switch (ps_parsing) { case XML_SUSPENDED: *nextPtr = next; return XML_ERROR_NONE; case XML_FINISHED: return XML_ERROR_ABORTED; default: ; } } } static enum XML_Error processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl) { const char *textStart, *textEnd; const char *next; enum XML_Error result; OPEN_INTERNAL_ENTITY *openEntity; if (freeInternalEntities) { openEntity = freeInternalEntities; freeInternalEntities = openEntity->next; } else { openEntity = (OPEN_INTERNAL_ENTITY *)MALLOC(sizeof(OPEN_INTERNAL_ENTITY)); if (!openEntity) return XML_ERROR_NO_MEMORY; } entity->open = XML_TRUE; entity->processed = 0; openEntity->next = openInternalEntities; openInternalEntities = openEntity; openEntity->entity = entity; openEntity->startTagLevel = tagLevel; openEntity->betweenDecl = betweenDecl; openEntity->internalEventPtr = NULL; openEntity->internalEventEndPtr = NULL; textStart = (char *)entity->textPtr; textEnd = (char *)(entity->textPtr + entity->textLen); #ifdef XML_DTD if (entity->is_param) { int tok = XmlPrologTok(internalEncoding, textStart, textEnd, &next); result = doProlog(parser, internalEncoding, textStart, textEnd, tok, next, &next, XML_FALSE); } else #endif /* XML_DTD */ result = doContent(parser, tagLevel, internalEncoding, textStart, textEnd, &next, XML_FALSE); if (result == XML_ERROR_NONE) { if (textEnd != next && ps_parsing == XML_SUSPENDED) { entity->processed = (int)(next - textStart); processor = internalEntityProcessor; } else { entity->open = XML_FALSE; openInternalEntities = openEntity->next; /* put openEntity back in list of free instances */ openEntity->next = freeInternalEntities; freeInternalEntities = openEntity; } } return result; } static enum XML_Error PTRCALL internalEntityProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { ENTITY *entity; const char *textStart, *textEnd; const char *next; enum XML_Error result; OPEN_INTERNAL_ENTITY *openEntity = openInternalEntities; if (!openEntity) return XML_ERROR_UNEXPECTED_STATE; entity = openEntity->entity; textStart = ((char *)entity->textPtr) + entity->processed; textEnd = (char *)(entity->textPtr + entity->textLen); #ifdef XML_DTD if (entity->is_param) { int tok = XmlPrologTok(internalEncoding, textStart, textEnd, &next); result = doProlog(parser, internalEncoding, textStart, textEnd, tok, next, &next, XML_FALSE); } else #endif /* XML_DTD */ result = doContent(parser, openEntity->startTagLevel, internalEncoding, textStart, textEnd, &next, XML_FALSE); if (result != XML_ERROR_NONE) return result; else if (textEnd != next && ps_parsing == XML_SUSPENDED) { entity->processed = (int)(next - (char *)entity->textPtr); return result; } else { entity->open = XML_FALSE; openInternalEntities = openEntity->next; /* put openEntity back in list of free instances */ openEntity->next = freeInternalEntities; freeInternalEntities = openEntity; } #ifdef XML_DTD if (entity->is_param) { int tok; processor = prologProcessor; tok = XmlPrologTok(encoding, s, end, &next); return doProlog(parser, encoding, s, end, tok, next, nextPtr, (XML_Bool)!ps_finalBuffer); } else #endif /* XML_DTD */ { processor = contentProcessor; /* see externalEntityContentProcessor vs contentProcessor */ return doContent(parser, parentParser ? 1 : 0, encoding, s, end, nextPtr, (XML_Bool)!ps_finalBuffer); } } static enum XML_Error PTRCALL errorProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { return errorCode; } static enum XML_Error storeAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata, const char *ptr, const char *end, STRING_POOL *pool) { enum XML_Error result = appendAttributeValue(parser, enc, isCdata, ptr, end, pool); if (result) return result; if (!isCdata && poolLength(pool) && poolLastChar(pool) == 0x20) poolChop(pool); if (!poolAppendChar(pool, XML_T('\0'))) return XML_ERROR_NO_MEMORY; return XML_ERROR_NONE; } static enum XML_Error appendAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata, const char *ptr, const char *end, STRING_POOL *pool) { DTD * const dtd = _dtd; /* save one level of indirection */ for (;;) { const char *next; int tok = XmlAttributeValueTok(enc, ptr, end, &next); switch (tok) { case XML_TOK_NONE: return XML_ERROR_NONE; case XML_TOK_INVALID: if (enc == encoding) eventPtr = next; return XML_ERROR_INVALID_TOKEN; case XML_TOK_PARTIAL: if (enc == encoding) eventPtr = ptr; return XML_ERROR_INVALID_TOKEN; case XML_TOK_CHAR_REF: { XML_Char buf[XML_ENCODE_MAX]; int i; int n = XmlCharRefNumber(enc, ptr); if (n < 0) { if (enc == encoding) eventPtr = ptr; return XML_ERROR_BAD_CHAR_REF; } if (!isCdata && n == 0x20 /* space */ && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20)) break; n = XmlEncode(n, (ICHAR *)buf); if (!n) { if (enc == encoding) eventPtr = ptr; return XML_ERROR_BAD_CHAR_REF; } for (i = 0; i < n; i++) { if (!poolAppendChar(pool, buf[i])) return XML_ERROR_NO_MEMORY; } } break; case XML_TOK_DATA_CHARS: if (!poolAppend(pool, enc, ptr, next)) return XML_ERROR_NO_MEMORY; break; case XML_TOK_TRAILING_CR: next = ptr + enc->minBytesPerChar; /* fall through */ case XML_TOK_ATTRIBUTE_VALUE_S: case XML_TOK_DATA_NEWLINE: if (!isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20)) break; if (!poolAppendChar(pool, 0x20)) return XML_ERROR_NO_MEMORY; break; case XML_TOK_ENTITY_REF: { const XML_Char *name; ENTITY *entity; char checkEntityDecl; XML_Char ch = (XML_Char) XmlPredefinedEntityName(enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar); if (ch) { if (!poolAppendChar(pool, ch)) return XML_ERROR_NO_MEMORY; break; } name = poolStoreString(&temp2Pool, enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar); if (!name) return XML_ERROR_NO_MEMORY; entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0); poolDiscard(&temp2Pool); /* First, determine if a check for an existing declaration is needed; if yes, check that the entity exists, and that it is internal. */ if (pool == &dtd->pool) /* are we called from prolog? */ checkEntityDecl = #ifdef XML_DTD prologState.documentEntity && #endif /* XML_DTD */ (dtd->standalone ? !openInternalEntities : !dtd->hasParamEntityRefs); else /* if (pool == &tempPool): we are called from content */ checkEntityDecl = !dtd->hasParamEntityRefs || dtd->standalone; if (checkEntityDecl) { if (!entity) return XML_ERROR_UNDEFINED_ENTITY; else if (!entity->is_internal) return XML_ERROR_ENTITY_DECLARED_IN_PE; } else if (!entity) { /* Cannot report skipped entity here - see comments on skippedEntityHandler. if (skippedEntityHandler) skippedEntityHandler(handlerArg, name, 0); */ /* Cannot call the default handler because this would be out of sync with the call to the startElementHandler. if ((pool == &tempPool) && defaultHandler) reportDefault(parser, enc, ptr, next); */ break; } if (entity->open) { if (enc == encoding) eventPtr = ptr; return XML_ERROR_RECURSIVE_ENTITY_REF; } if (entity->notation) { if (enc == encoding) eventPtr = ptr; return XML_ERROR_BINARY_ENTITY_REF; } if (!entity->textPtr) { if (enc == encoding) eventPtr = ptr; return XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF; } else { enum XML_Error result; const XML_Char *textEnd = entity->textPtr + entity->textLen; entity->open = XML_TRUE; result = appendAttributeValue(parser, internalEncoding, isCdata, (char *)entity->textPtr, (char *)textEnd, pool); entity->open = XML_FALSE; if (result) return result; } } break; default: if (enc == encoding) eventPtr = ptr; return XML_ERROR_UNEXPECTED_STATE; } ptr = next; } /* not reached */ } static enum XML_Error storeEntityValue(XML_Parser parser, const ENCODING *enc, const char *entityTextPtr, const char *entityTextEnd) { DTD * const dtd = _dtd; /* save one level of indirection */ STRING_POOL *pool = &(dtd->entityValuePool); enum XML_Error result = XML_ERROR_NONE; #ifdef XML_DTD int oldInEntityValue = prologState.inEntityValue; prologState.inEntityValue = 1; #endif /* XML_DTD */ /* never return Null for the value argument in EntityDeclHandler, since this would indicate an external entity; therefore we have to make sure that entityValuePool.start is not null */ if (!pool->blocks) { if (!poolGrow(pool)) return XML_ERROR_NO_MEMORY; } for (;;) { const char *next; int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next); switch (tok) { case XML_TOK_PARAM_ENTITY_REF: #ifdef XML_DTD if (isParamEntity || enc != encoding) { const XML_Char *name; ENTITY *entity; name = poolStoreString(&tempPool, enc, entityTextPtr + enc->minBytesPerChar, next - enc->minBytesPerChar); if (!name) { result = XML_ERROR_NO_MEMORY; goto endEntityValue; } entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0); poolDiscard(&tempPool); if (!entity) { /* not a well-formedness error - see XML 1.0: WFC Entity Declared */ /* cannot report skipped entity here - see comments on skippedEntityHandler if (skippedEntityHandler) skippedEntityHandler(handlerArg, name, 0); */ dtd->keepProcessing = dtd->standalone; goto endEntityValue; } if (entity->open) { if (enc == encoding) eventPtr = entityTextPtr; result = XML_ERROR_RECURSIVE_ENTITY_REF; goto endEntityValue; } if (entity->systemId) { if (externalEntityRefHandler) { dtd->paramEntityRead = XML_FALSE; entity->open = XML_TRUE; if (!externalEntityRefHandler(externalEntityRefHandlerArg, 0, entity->base, entity->systemId, entity->publicId)) { entity->open = XML_FALSE; result = XML_ERROR_EXTERNAL_ENTITY_HANDLING; goto endEntityValue; } entity->open = XML_FALSE; if (!dtd->paramEntityRead) dtd->keepProcessing = dtd->standalone; } else dtd->keepProcessing = dtd->standalone; } else { entity->open = XML_TRUE; result = storeEntityValue(parser, internalEncoding, (char *)entity->textPtr, (char *)(entity->textPtr + entity->textLen)); entity->open = XML_FALSE; if (result) goto endEntityValue; } break; } #endif /* XML_DTD */ /* In the internal subset, PE references are not legal within markup declarations, e.g entity values in this case. */ eventPtr = entityTextPtr; result = XML_ERROR_PARAM_ENTITY_REF; goto endEntityValue; case XML_TOK_NONE: result = XML_ERROR_NONE; goto endEntityValue; case XML_TOK_ENTITY_REF: case XML_TOK_DATA_CHARS: if (!poolAppend(pool, enc, entityTextPtr, next)) { result = XML_ERROR_NO_MEMORY; goto endEntityValue; } break; case XML_TOK_TRAILING_CR: next = entityTextPtr + enc->minBytesPerChar; /* fall through */ case XML_TOK_DATA_NEWLINE: if (pool->end == pool->ptr && !poolGrow(pool)) { result = XML_ERROR_NO_MEMORY; goto endEntityValue; } *(pool->ptr)++ = 0xA; break; case XML_TOK_CHAR_REF: { XML_Char buf[XML_ENCODE_MAX]; int i; int n = XmlCharRefNumber(enc, entityTextPtr); if (n < 0) { if (enc == encoding) eventPtr = entityTextPtr; result = XML_ERROR_BAD_CHAR_REF; goto endEntityValue; } n = XmlEncode(n, (ICHAR *)buf); if (!n) { if (enc == encoding) eventPtr = entityTextPtr; result = XML_ERROR_BAD_CHAR_REF; goto endEntityValue; } for (i = 0; i < n; i++) { if (pool->end == pool->ptr && !poolGrow(pool)) { result = XML_ERROR_NO_MEMORY; goto endEntityValue; } *(pool->ptr)++ = buf[i]; } } break; case XML_TOK_PARTIAL: if (enc == encoding) eventPtr = entityTextPtr; result = XML_ERROR_INVALID_TOKEN; goto endEntityValue; case XML_TOK_INVALID: if (enc == encoding) eventPtr = next; result = XML_ERROR_INVALID_TOKEN; goto endEntityValue; default: if (enc == encoding) eventPtr = entityTextPtr; result = XML_ERROR_UNEXPECTED_STATE; goto endEntityValue; } entityTextPtr = next; } endEntityValue: #ifdef XML_DTD prologState.inEntityValue = oldInEntityValue; #endif /* XML_DTD */ return result; } static void FASTCALL normalizeLines(XML_Char *s) { XML_Char *p; for (;; s++) { if (*s == XML_T('\0')) return; if (*s == 0xD) break; } p = s; do { if (*s == 0xD) { *p++ = 0xA; if (*++s == 0xA) s++; } else *p++ = *s++; } while (*s); *p = XML_T('\0'); } static int reportProcessingInstruction(XML_Parser parser, const ENCODING *enc, const char *start, const char *end) { const XML_Char *target; XML_Char *data; const char *tem; if (!processingInstructionHandler) { if (defaultHandler) reportDefault(parser, enc, start, end); return 1; } start += enc->minBytesPerChar * 2; tem = start + XmlNameLength(enc, start); target = poolStoreString(&tempPool, enc, start, tem); if (!target) return 0; poolFinish(&tempPool); data = poolStoreString(&tempPool, enc, XmlSkipS(enc, tem), end - enc->minBytesPerChar*2); if (!data) return 0; normalizeLines(data); processingInstructionHandler(handlerArg, target, data); poolClear(&tempPool); return 1; } static int reportComment(XML_Parser parser, const ENCODING *enc, const char *start, const char *end) { XML_Char *data; if (!commentHandler) { if (defaultHandler) reportDefault(parser, enc, start, end); return 1; } data = poolStoreString(&tempPool, enc, start + enc->minBytesPerChar * 4, end - enc->minBytesPerChar * 3); if (!data) return 0; normalizeLines(data); commentHandler(handlerArg, data); poolClear(&tempPool); return 1; } static void reportDefault(XML_Parser parser, const ENCODING *enc, const char *s, const char *end) { if (MUST_CONVERT(enc, s)) { const char **eventPP; const char **eventEndPP; if (enc == encoding) { eventPP = &eventPtr; eventEndPP = &eventEndPtr; } else { eventPP = &(openInternalEntities->internalEventPtr); eventEndPP = &(openInternalEntities->internalEventEndPtr); } do { ICHAR *dataPtr = (ICHAR *)dataBuf; XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd); *eventEndPP = s; defaultHandler(handlerArg, dataBuf, (int)(dataPtr - (ICHAR *)dataBuf)); *eventPP = s; } while (s != end); } else defaultHandler(handlerArg, (XML_Char *)s, (int)((XML_Char *)end - (XML_Char *)s)); } static int defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *attId, XML_Bool isCdata, XML_Bool isId, const XML_Char *value, XML_Parser parser) { DEFAULT_ATTRIBUTE *att; if (value || isId) { /* The handling of default attributes gets messed up if we have a default which duplicates a non-default. */ int i; for (i = 0; i < type->nDefaultAtts; i++) if (attId == type->defaultAtts[i].id) return 1; if (isId && !type->idAtt && !attId->xmlns) type->idAtt = attId; } if (type->nDefaultAtts == type->allocDefaultAtts) { if (type->allocDefaultAtts == 0) { type->allocDefaultAtts = 8; type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE)); if (!type->defaultAtts) return 0; } else { DEFAULT_ATTRIBUTE *temp; int count = type->allocDefaultAtts * 2; temp = (DEFAULT_ATTRIBUTE *) REALLOC(type->defaultAtts, (count * sizeof(DEFAULT_ATTRIBUTE))); if (temp == NULL) return 0; type->allocDefaultAtts = count; type->defaultAtts = temp; } } att = type->defaultAtts + type->nDefaultAtts; att->id = attId; att->value = value; att->isCdata = isCdata; if (!isCdata) attId->maybeTokenized = XML_TRUE; type->nDefaultAtts += 1; return 1; } static int setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) { DTD * const dtd = _dtd; /* save one level of indirection */ const XML_Char *name; for (name = elementType->name; *name; name++) { if (*name == XML_T(ASCII_COLON)) { PREFIX *prefix; const XML_Char *s; for (s = elementType->name; s != name; s++) { if (!poolAppendChar(&dtd->pool, *s)) return 0; } if (!poolAppendChar(&dtd->pool, XML_T('\0'))) return 0; prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool), sizeof(PREFIX)); if (!prefix) return 0; if (prefix->name == poolStart(&dtd->pool)) poolFinish(&dtd->pool); else poolDiscard(&dtd->pool); elementType->prefix = prefix; } } return 1; } static ATTRIBUTE_ID * getAttributeId(XML_Parser parser, const ENCODING *enc, const char *start, const char *end) { DTD * const dtd = _dtd; /* save one level of indirection */ ATTRIBUTE_ID *id; const XML_Char *name; if (!poolAppendChar(&dtd->pool, XML_T('\0'))) return NULL; name = poolStoreString(&dtd->pool, enc, start, end); if (!name) return NULL; /* skip quotation mark - its storage will be re-used (like in name[-1]) */ ++name; id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, name, sizeof(ATTRIBUTE_ID)); if (!id) return NULL; if (id->name != name) poolDiscard(&dtd->pool); else { poolFinish(&dtd->pool); if (!ns) ; else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m) && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n) && name[4] == XML_T(ASCII_s) && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) { if (name[5] == XML_T('\0')) id->prefix = &dtd->defaultPrefix; else id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, name + 6, sizeof(PREFIX)); id->xmlns = XML_TRUE; } else { int i; for (i = 0; name[i]; i++) { /* attributes without prefix are *not* in the default namespace */ if (name[i] == XML_T(ASCII_COLON)) { int j; for (j = 0; j < i; j++) { if (!poolAppendChar(&dtd->pool, name[j])) return NULL; } if (!poolAppendChar(&dtd->pool, XML_T('\0'))) return NULL; id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool), sizeof(PREFIX)); if (id->prefix->name == poolStart(&dtd->pool)) poolFinish(&dtd->pool); else poolDiscard(&dtd->pool); break; } } } } return id; } #define CONTEXT_SEP XML_T(ASCII_FF) static const XML_Char * getContext(XML_Parser parser) { DTD * const dtd = _dtd; /* save one level of indirection */ HASH_TABLE_ITER iter; XML_Bool needSep = XML_FALSE; if (dtd->defaultPrefix.binding) { int i; int len; if (!poolAppendChar(&tempPool, XML_T(ASCII_EQUALS))) return NULL; len = dtd->defaultPrefix.binding->uriLen; if (namespaceSeparator) len--; for (i = 0; i < len; i++) if (!poolAppendChar(&tempPool, dtd->defaultPrefix.binding->uri[i])) return NULL; needSep = XML_TRUE; } hashTableIterInit(&iter, &(dtd->prefixes)); for (;;) { int i; int len; const XML_Char *s; PREFIX *prefix = (PREFIX *)hashTableIterNext(&iter); if (!prefix) break; if (!prefix->binding) continue; if (needSep && !poolAppendChar(&tempPool, CONTEXT_SEP)) return NULL; for (s = prefix->name; *s; s++) if (!poolAppendChar(&tempPool, *s)) return NULL; if (!poolAppendChar(&tempPool, XML_T(ASCII_EQUALS))) return NULL; len = prefix->binding->uriLen; if (namespaceSeparator) len--; for (i = 0; i < len; i++) if (!poolAppendChar(&tempPool, prefix->binding->uri[i])) return NULL; needSep = XML_TRUE; } hashTableIterInit(&iter, &(dtd->generalEntities)); for (;;) { const XML_Char *s; ENTITY *e = (ENTITY *)hashTableIterNext(&iter); if (!e) break; if (!e->open) continue; if (needSep && !poolAppendChar(&tempPool, CONTEXT_SEP)) return NULL; for (s = e->name; *s; s++) if (!poolAppendChar(&tempPool, *s)) return 0; needSep = XML_TRUE; } if (!poolAppendChar(&tempPool, XML_T('\0'))) return NULL; return tempPool.start; } static XML_Bool setContext(XML_Parser parser, const XML_Char *context) { DTD * const dtd = _dtd; /* save one level of indirection */ const XML_Char *s = context; while (*context != XML_T('\0')) { if (*s == CONTEXT_SEP || *s == XML_T('\0')) { ENTITY *e; if (!poolAppendChar(&tempPool, XML_T('\0'))) return XML_FALSE; e = (ENTITY *)lookup(parser, &dtd->generalEntities, poolStart(&tempPool), 0); if (e) e->open = XML_TRUE; if (*s != XML_T('\0')) s++; context = s; poolDiscard(&tempPool); } else if (*s == XML_T(ASCII_EQUALS)) { PREFIX *prefix; if (poolLength(&tempPool) == 0) prefix = &dtd->defaultPrefix; else { if (!poolAppendChar(&tempPool, XML_T('\0'))) return XML_FALSE; prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&tempPool), sizeof(PREFIX)); if (!prefix) return XML_FALSE; if (prefix->name == poolStart(&tempPool)) { prefix->name = poolCopyString(&dtd->pool, prefix->name); if (!prefix->name) return XML_FALSE; } poolDiscard(&tempPool); } for (context = s + 1; *context != CONTEXT_SEP && *context != XML_T('\0'); context++) if (!poolAppendChar(&tempPool, *context)) return XML_FALSE; if (!poolAppendChar(&tempPool, XML_T('\0'))) return XML_FALSE; if (addBinding(parser, prefix, NULL, poolStart(&tempPool), &inheritedBindings) != XML_ERROR_NONE) return XML_FALSE; poolDiscard(&tempPool); if (*context != XML_T('\0')) ++context; s = context; } else { if (!poolAppendChar(&tempPool, *s)) return XML_FALSE; s++; } } return XML_TRUE; } static void FASTCALL normalizePublicId(XML_Char *publicId) { XML_Char *p = publicId; XML_Char *s; for (s = publicId; *s; s++) { switch (*s) { case 0x20: case 0xD: case 0xA: if (p != publicId && p[-1] != 0x20) *p++ = 0x20; break; default: *p++ = *s; } } if (p != publicId && p[-1] == 0x20) --p; *p = XML_T('\0'); } static DTD * dtdCreate(const XML_Memory_Handling_Suite *ms) { DTD *p = (DTD *)ms->malloc_fcn(sizeof(DTD)); if (p == NULL) return p; poolInit(&(p->pool), ms); poolInit(&(p->entityValuePool), ms); hashTableInit(&(p->generalEntities), ms); hashTableInit(&(p->elementTypes), ms); hashTableInit(&(p->attributeIds), ms); hashTableInit(&(p->prefixes), ms); #ifdef XML_DTD p->paramEntityRead = XML_FALSE; hashTableInit(&(p->paramEntities), ms); #endif /* XML_DTD */ p->defaultPrefix.name = NULL; p->defaultPrefix.binding = NULL; p->in_eldecl = XML_FALSE; p->scaffIndex = NULL; p->scaffold = NULL; p->scaffLevel = 0; p->scaffSize = 0; p->scaffCount = 0; p->contentStringLen = 0; p->keepProcessing = XML_TRUE; p->hasParamEntityRefs = XML_FALSE; p->standalone = XML_FALSE; return p; } static void dtdReset(DTD *p, const XML_Memory_Handling_Suite *ms) { HASH_TABLE_ITER iter; hashTableIterInit(&iter, &(p->elementTypes)); for (;;) { ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter); if (!e) break; if (e->allocDefaultAtts != 0) ms->free_fcn(e->defaultAtts); } hashTableClear(&(p->generalEntities)); #ifdef XML_DTD p->paramEntityRead = XML_FALSE; hashTableClear(&(p->paramEntities)); #endif /* XML_DTD */ hashTableClear(&(p->elementTypes)); hashTableClear(&(p->attributeIds)); hashTableClear(&(p->prefixes)); poolClear(&(p->pool)); poolClear(&(p->entityValuePool)); p->defaultPrefix.name = NULL; p->defaultPrefix.binding = NULL; p->in_eldecl = XML_FALSE; ms->free_fcn(p->scaffIndex); p->scaffIndex = NULL; ms->free_fcn(p->scaffold); p->scaffold = NULL; p->scaffLevel = 0; p->scaffSize = 0; p->scaffCount = 0; p->contentStringLen = 0; p->keepProcessing = XML_TRUE; p->hasParamEntityRefs = XML_FALSE; p->standalone = XML_FALSE; } static void dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms) { HASH_TABLE_ITER iter; hashTableIterInit(&iter, &(p->elementTypes)); for (;;) { ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter); if (!e) break; if (e->allocDefaultAtts != 0) ms->free_fcn(e->defaultAtts); } hashTableDestroy(&(p->generalEntities)); #ifdef XML_DTD hashTableDestroy(&(p->paramEntities)); #endif /* XML_DTD */ hashTableDestroy(&(p->elementTypes)); hashTableDestroy(&(p->attributeIds)); hashTableDestroy(&(p->prefixes)); poolDestroy(&(p->pool)); poolDestroy(&(p->entityValuePool)); if (isDocEntity) { ms->free_fcn(p->scaffIndex); ms->free_fcn(p->scaffold); } ms->free_fcn(p); } /* Do a deep copy of the DTD. Return 0 for out of memory, non-zero otherwise. The new DTD has already been initialized. */ static int dtdCopy(XML_Parser oldParser, DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms) { HASH_TABLE_ITER iter; /* Copy the prefix table. */ hashTableIterInit(&iter, &(oldDtd->prefixes)); for (;;) { const XML_Char *name; const PREFIX *oldP = (PREFIX *)hashTableIterNext(&iter); if (!oldP) break; name = poolCopyString(&(newDtd->pool), oldP->name); if (!name) return 0; if (!lookup(oldParser, &(newDtd->prefixes), name, sizeof(PREFIX))) return 0; } hashTableIterInit(&iter, &(oldDtd->attributeIds)); /* Copy the attribute id table. */ for (;;) { ATTRIBUTE_ID *newA; const XML_Char *name; const ATTRIBUTE_ID *oldA = (ATTRIBUTE_ID *)hashTableIterNext(&iter); if (!oldA) break; /* Remember to allocate the scratch byte before the name. */ if (!poolAppendChar(&(newDtd->pool), XML_T('\0'))) return 0; name = poolCopyString(&(newDtd->pool), oldA->name); if (!name) return 0; ++name; newA = (ATTRIBUTE_ID *)lookup(oldParser, &(newDtd->attributeIds), name, sizeof(ATTRIBUTE_ID)); if (!newA) return 0; newA->maybeTokenized = oldA->maybeTokenized; if (oldA->prefix) { newA->xmlns = oldA->xmlns; if (oldA->prefix == &oldDtd->defaultPrefix) newA->prefix = &newDtd->defaultPrefix; else newA->prefix = (PREFIX *)lookup(oldParser, &(newDtd->prefixes), oldA->prefix->name, 0); } } /* Copy the element type table. */ hashTableIterInit(&iter, &(oldDtd->elementTypes)); for (;;) { int i; ELEMENT_TYPE *newE; const XML_Char *name; const ELEMENT_TYPE *oldE = (ELEMENT_TYPE *)hashTableIterNext(&iter); if (!oldE) break; name = poolCopyString(&(newDtd->pool), oldE->name); if (!name) return 0; newE = (ELEMENT_TYPE *)lookup(oldParser, &(newDtd->elementTypes), name, sizeof(ELEMENT_TYPE)); if (!newE) return 0; if (oldE->nDefaultAtts) { newE->defaultAtts = (DEFAULT_ATTRIBUTE *) ms->malloc_fcn(oldE->nDefaultAtts * sizeof(DEFAULT_ATTRIBUTE)); if (!newE->defaultAtts) { ms->free_fcn(newE); return 0; } } if (oldE->idAtt) newE->idAtt = (ATTRIBUTE_ID *) lookup(oldParser, &(newDtd->attributeIds), oldE->idAtt->name, 0); newE->allocDefaultAtts = newE->nDefaultAtts = oldE->nDefaultAtts; if (oldE->prefix) newE->prefix = (PREFIX *)lookup(oldParser, &(newDtd->prefixes), oldE->prefix->name, 0); for (i = 0; i < newE->nDefaultAtts; i++) { newE->defaultAtts[i].id = (ATTRIBUTE_ID *) lookup(oldParser, &(newDtd->attributeIds), oldE->defaultAtts[i].id->name, 0); newE->defaultAtts[i].isCdata = oldE->defaultAtts[i].isCdata; if (oldE->defaultAtts[i].value) { newE->defaultAtts[i].value = poolCopyString(&(newDtd->pool), oldE->defaultAtts[i].value); if (!newE->defaultAtts[i].value) return 0; } else newE->defaultAtts[i].value = NULL; } } /* Copy the entity tables. */ if (!copyEntityTable(oldParser, &(newDtd->generalEntities), &(newDtd->pool), &(oldDtd->generalEntities))) return 0; #ifdef XML_DTD if (!copyEntityTable(oldParser, &(newDtd->paramEntities), &(newDtd->pool), &(oldDtd->paramEntities))) return 0; newDtd->paramEntityRead = oldDtd->paramEntityRead; #endif /* XML_DTD */ newDtd->keepProcessing = oldDtd->keepProcessing; newDtd->hasParamEntityRefs = oldDtd->hasParamEntityRefs; newDtd->standalone = oldDtd->standalone; /* Don't want deep copying for scaffolding */ newDtd->in_eldecl = oldDtd->in_eldecl; newDtd->scaffold = oldDtd->scaffold; newDtd->contentStringLen = oldDtd->contentStringLen; newDtd->scaffSize = oldDtd->scaffSize; newDtd->scaffLevel = oldDtd->scaffLevel; newDtd->scaffIndex = oldDtd->scaffIndex; return 1; } /* End dtdCopy */ static int copyEntityTable(XML_Parser oldParser, HASH_TABLE *newTable, STRING_POOL *newPool, const HASH_TABLE *oldTable) { HASH_TABLE_ITER iter; const XML_Char *cachedOldBase = NULL; const XML_Char *cachedNewBase = NULL; hashTableIterInit(&iter, oldTable); for (;;) { ENTITY *newE; const XML_Char *name; const ENTITY *oldE = (ENTITY *)hashTableIterNext(&iter); if (!oldE) break; name = poolCopyString(newPool, oldE->name); if (!name) return 0; newE = (ENTITY *)lookup(oldParser, newTable, name, sizeof(ENTITY)); if (!newE) return 0; if (oldE->systemId) { const XML_Char *tem = poolCopyString(newPool, oldE->systemId); if (!tem) return 0; newE->systemId = tem; if (oldE->base) { if (oldE->base == cachedOldBase) newE->base = cachedNewBase; else { cachedOldBase = oldE->base; tem = poolCopyString(newPool, cachedOldBase); if (!tem) return 0; cachedNewBase = newE->base = tem; } } if (oldE->publicId) { tem = poolCopyString(newPool, oldE->publicId); if (!tem) return 0; newE->publicId = tem; } } else { const XML_Char *tem = poolCopyStringN(newPool, oldE->textPtr, oldE->textLen); if (!tem) return 0; newE->textPtr = tem; newE->textLen = oldE->textLen; } if (oldE->notation) { const XML_Char *tem = poolCopyString(newPool, oldE->notation); if (!tem) return 0; newE->notation = tem; } newE->is_param = oldE->is_param; newE->is_internal = oldE->is_internal; } return 1; } #define INIT_POWER 6 static XML_Bool FASTCALL keyeq(KEY s1, KEY s2) { for (; *s1 == *s2; s1++, s2++) if (*s1 == 0) return XML_TRUE; return XML_FALSE; } static unsigned long FASTCALL hash(XML_Parser parser, KEY s) { unsigned long h = hash_secret_salt; while (*s) h = CHAR_HASH(h, *s++); return h; } static NAMED * lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) { size_t i; if (table->size == 0) { size_t tsize; if (!createSize) return NULL; table->power = INIT_POWER; /* table->size is a power of 2 */ table->size = (size_t)1 << INIT_POWER; tsize = table->size * sizeof(NAMED *); table->v = (NAMED **)table->mem->malloc_fcn(tsize); if (!table->v) { table->size = 0; return NULL; } memset(table->v, 0, tsize); i = hash(parser, name) & ((unsigned long)table->size - 1); } else { unsigned long h = hash(parser, name); unsigned long mask = (unsigned long)table->size - 1; unsigned char step = 0; i = h & mask; while (table->v[i]) { if (keyeq(name, table->v[i]->name)) return table->v[i]; if (!step) step = PROBE_STEP(h, mask, table->power); i < step ? (i += table->size - step) : (i -= step); } if (!createSize) return NULL; /* check for overflow (table is half full) */ if (table->used >> (table->power - 1)) { unsigned char newPower = table->power + 1; size_t newSize = (size_t)1 << newPower; unsigned long newMask = (unsigned long)newSize - 1; size_t tsize = newSize * sizeof(NAMED *); NAMED **newV = (NAMED **)table->mem->malloc_fcn(tsize); if (!newV) return NULL; memset(newV, 0, tsize); for (i = 0; i < table->size; i++) if (table->v[i]) { unsigned long newHash = hash(parser, table->v[i]->name); size_t j = newHash & newMask; step = 0; while (newV[j]) { if (!step) step = PROBE_STEP(newHash, newMask, newPower); j < step ? (j += newSize - step) : (j -= step); } newV[j] = table->v[i]; } table->mem->free_fcn(table->v); table->v = newV; table->power = newPower; table->size = newSize; i = h & newMask; step = 0; while (table->v[i]) { if (!step) step = PROBE_STEP(h, newMask, newPower); i < step ? (i += newSize - step) : (i -= step); } } } table->v[i] = (NAMED *)table->mem->malloc_fcn(createSize); if (!table->v[i]) return NULL; memset(table->v[i], 0, createSize); table->v[i]->name = name; (table->used)++; return table->v[i]; } static void FASTCALL hashTableClear(HASH_TABLE *table) { size_t i; for (i = 0; i < table->size; i++) { table->mem->free_fcn(table->v[i]); table->v[i] = NULL; } table->used = 0; } static void FASTCALL hashTableDestroy(HASH_TABLE *table) { size_t i; for (i = 0; i < table->size; i++) table->mem->free_fcn(table->v[i]); table->mem->free_fcn(table->v); } static void FASTCALL hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) { p->power = 0; p->size = 0; p->used = 0; p->v = NULL; p->mem = ms; } static void FASTCALL hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) { iter->p = table->v; iter->end = iter->p + table->size; } static NAMED * FASTCALL hashTableIterNext(HASH_TABLE_ITER *iter) { while (iter->p != iter->end) { NAMED *tem = *(iter->p)++; if (tem) return tem; } return NULL; } static void FASTCALL poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms) { pool->blocks = NULL; pool->freeBlocks = NULL; pool->start = NULL; pool->ptr = NULL; pool->end = NULL; pool->mem = ms; } static void FASTCALL poolClear(STRING_POOL *pool) { if (!pool->freeBlocks) pool->freeBlocks = pool->blocks; else { BLOCK *p = pool->blocks; while (p) { BLOCK *tem = p->next; p->next = pool->freeBlocks; pool->freeBlocks = p; p = tem; } } pool->blocks = NULL; pool->start = NULL; pool->ptr = NULL; pool->end = NULL; } static void FASTCALL poolDestroy(STRING_POOL *pool) { BLOCK *p = pool->blocks; while (p) { BLOCK *tem = p->next; pool->mem->free_fcn(p); p = tem; } p = pool->freeBlocks; while (p) { BLOCK *tem = p->next; pool->mem->free_fcn(p); p = tem; } } static XML_Char * poolAppend(STRING_POOL *pool, const ENCODING *enc, const char *ptr, const char *end) { if (!pool->ptr && !poolGrow(pool)) return NULL; for (;;) { XmlConvert(enc, &ptr, end, (ICHAR **)&(pool->ptr), (ICHAR *)pool->end); if (ptr == end) break; if (!poolGrow(pool)) return NULL; } return pool->start; } static const XML_Char * FASTCALL poolCopyString(STRING_POOL *pool, const XML_Char *s) { do { if (!poolAppendChar(pool, *s)) return NULL; } while (*s++); s = pool->start; poolFinish(pool); return s; } static const XML_Char * poolCopyStringN(STRING_POOL *pool, const XML_Char *s, int n) { if (!pool->ptr && !poolGrow(pool)) return NULL; for (; n > 0; --n, s++) { if (!poolAppendChar(pool, *s)) return NULL; } s = pool->start; poolFinish(pool); return s; } static const XML_Char * FASTCALL poolAppendString(STRING_POOL *pool, const XML_Char *s) { while (*s) { if (!poolAppendChar(pool, *s)) return NULL; s++; } return pool->start; } static XML_Char * poolStoreString(STRING_POOL *pool, const ENCODING *enc, const char *ptr, const char *end) { if (!poolAppend(pool, enc, ptr, end)) return NULL; if (pool->ptr == pool->end && !poolGrow(pool)) return NULL; *(pool->ptr)++ = 0; return pool->start; } static XML_Bool FASTCALL poolGrow(STRING_POOL *pool) { if (pool->freeBlocks) { if (pool->start == 0) { pool->blocks = pool->freeBlocks; pool->freeBlocks = pool->freeBlocks->next; pool->blocks->next = NULL; pool->start = pool->blocks->s; pool->end = pool->start + pool->blocks->size; pool->ptr = pool->start; return XML_TRUE; } if (pool->end - pool->start < pool->freeBlocks->size) { BLOCK *tem = pool->freeBlocks->next; pool->freeBlocks->next = pool->blocks; pool->blocks = pool->freeBlocks; pool->freeBlocks = tem; memcpy(pool->blocks->s, pool->start, (pool->end - pool->start) * sizeof(XML_Char)); pool->ptr = pool->blocks->s + (pool->ptr - pool->start); pool->start = pool->blocks->s; pool->end = pool->start + pool->blocks->size; return XML_TRUE; } } if (pool->blocks && pool->start == pool->blocks->s) { int blockSize = (int)(pool->end - pool->start)*2; BLOCK *temp = (BLOCK *) pool->mem->realloc_fcn(pool->blocks, (offsetof(BLOCK, s) + blockSize * sizeof(XML_Char))); if (temp == NULL) return XML_FALSE; pool->blocks = temp; pool->blocks->size = blockSize; pool->ptr = pool->blocks->s + (pool->ptr - pool->start); pool->start = pool->blocks->s; pool->end = pool->start + blockSize; } else { BLOCK *tem; int blockSize = (int)(pool->end - pool->start); if (blockSize < INIT_BLOCK_SIZE) blockSize = INIT_BLOCK_SIZE; else blockSize *= 2; tem = (BLOCK *)pool->mem->malloc_fcn(offsetof(BLOCK, s) + blockSize * sizeof(XML_Char)); if (!tem) return XML_FALSE; tem->size = blockSize; tem->next = pool->blocks; pool->blocks = tem; if (pool->ptr != pool->start) memcpy(tem->s, pool->start, (pool->ptr - pool->start) * sizeof(XML_Char)); pool->ptr = tem->s + (pool->ptr - pool->start); pool->start = tem->s; pool->end = tem->s + blockSize; } return XML_TRUE; } static int FASTCALL nextScaffoldPart(XML_Parser parser) { DTD * const dtd = _dtd; /* save one level of indirection */ CONTENT_SCAFFOLD * me; int next; if (!dtd->scaffIndex) { dtd->scaffIndex = (int *)MALLOC(groupSize * sizeof(int)); if (!dtd->scaffIndex) return -1; dtd->scaffIndex[0] = 0; } if (dtd->scaffCount >= dtd->scaffSize) { CONTENT_SCAFFOLD *temp; if (dtd->scaffold) { temp = (CONTENT_SCAFFOLD *) REALLOC(dtd->scaffold, dtd->scaffSize * 2 * sizeof(CONTENT_SCAFFOLD)); if (temp == NULL) return -1; dtd->scaffSize *= 2; } else { temp = (CONTENT_SCAFFOLD *)MALLOC(INIT_SCAFFOLD_ELEMENTS * sizeof(CONTENT_SCAFFOLD)); if (temp == NULL) return -1; dtd->scaffSize = INIT_SCAFFOLD_ELEMENTS; } dtd->scaffold = temp; } next = dtd->scaffCount++; me = &dtd->scaffold[next]; if (dtd->scaffLevel) { CONTENT_SCAFFOLD *parent = &dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel-1]]; if (parent->lastchild) { dtd->scaffold[parent->lastchild].nextsib = next; } if (!parent->childcnt) parent->firstchild = next; parent->lastchild = next; parent->childcnt++; } me->firstchild = me->lastchild = me->childcnt = me->nextsib = 0; return next; } static void build_node(XML_Parser parser, int src_node, XML_Content *dest, XML_Content **contpos, XML_Char **strpos) { DTD * const dtd = _dtd; /* save one level of indirection */ dest->type = dtd->scaffold[src_node].type; dest->quant = dtd->scaffold[src_node].quant; if (dest->type == XML_CTYPE_NAME) { const XML_Char *src; dest->name = *strpos; src = dtd->scaffold[src_node].name; for (;;) { *(*strpos)++ = *src; if (!*src) break; src++; } dest->numchildren = 0; dest->children = NULL; } else { unsigned int i; int cn; dest->numchildren = dtd->scaffold[src_node].childcnt; dest->children = *contpos; *contpos += dest->numchildren; for (i = 0, cn = dtd->scaffold[src_node].firstchild; i < dest->numchildren; i++, cn = dtd->scaffold[cn].nextsib) { build_node(parser, cn, &(dest->children[i]), contpos, strpos); } dest->name = NULL; } } static XML_Content * build_model (XML_Parser parser) { DTD * const dtd = _dtd; /* save one level of indirection */ XML_Content *ret; XML_Content *cpos; XML_Char * str; int allocsize = (dtd->scaffCount * sizeof(XML_Content) + (dtd->contentStringLen * sizeof(XML_Char))); ret = (XML_Content *)MALLOC(allocsize); if (!ret) return NULL; str = (XML_Char *) (&ret[dtd->scaffCount]); cpos = &ret[1]; build_node(parser, 0, ret, &cpos, &str); return ret; } static ELEMENT_TYPE * getElementType(XML_Parser parser, const ENCODING *enc, const char *ptr, const char *end) { DTD * const dtd = _dtd; /* save one level of indirection */ const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end); ELEMENT_TYPE *ret; if (!name) return NULL; ret = (ELEMENT_TYPE *) lookup(parser, &dtd->elementTypes, name, sizeof(ELEMENT_TYPE)); if (!ret) return NULL; if (ret->name != name) poolDiscard(&dtd->pool); else { poolFinish(&dtd->pool); if (!setElementTypePrefix(parser, ret)) return NULL; } return ret; } astropy-1.1.1/cextern/expat/lib/xmlrole.h0000755001134200020070000000571712602615516021332 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #ifndef XmlRole_INCLUDED #define XmlRole_INCLUDED 1 #ifdef __VMS /* 0 1 2 3 0 1 2 3 1234567890123456789012345678901 1234567890123456789012345678901 */ #define XmlPrologStateInitExternalEntity XmlPrologStateInitExternalEnt #endif #include "xmltok.h" #ifdef __cplusplus extern "C" { #endif enum { XML_ROLE_ERROR = -1, XML_ROLE_NONE = 0, XML_ROLE_XML_DECL, XML_ROLE_INSTANCE_START, XML_ROLE_DOCTYPE_NONE, XML_ROLE_DOCTYPE_NAME, XML_ROLE_DOCTYPE_SYSTEM_ID, XML_ROLE_DOCTYPE_PUBLIC_ID, XML_ROLE_DOCTYPE_INTERNAL_SUBSET, XML_ROLE_DOCTYPE_CLOSE, XML_ROLE_GENERAL_ENTITY_NAME, XML_ROLE_PARAM_ENTITY_NAME, XML_ROLE_ENTITY_NONE, XML_ROLE_ENTITY_VALUE, XML_ROLE_ENTITY_SYSTEM_ID, XML_ROLE_ENTITY_PUBLIC_ID, XML_ROLE_ENTITY_COMPLETE, XML_ROLE_ENTITY_NOTATION_NAME, XML_ROLE_NOTATION_NONE, XML_ROLE_NOTATION_NAME, XML_ROLE_NOTATION_SYSTEM_ID, XML_ROLE_NOTATION_NO_SYSTEM_ID, XML_ROLE_NOTATION_PUBLIC_ID, XML_ROLE_ATTRIBUTE_NAME, XML_ROLE_ATTRIBUTE_TYPE_CDATA, XML_ROLE_ATTRIBUTE_TYPE_ID, XML_ROLE_ATTRIBUTE_TYPE_IDREF, XML_ROLE_ATTRIBUTE_TYPE_IDREFS, XML_ROLE_ATTRIBUTE_TYPE_ENTITY, XML_ROLE_ATTRIBUTE_TYPE_ENTITIES, XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN, XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS, XML_ROLE_ATTRIBUTE_ENUM_VALUE, XML_ROLE_ATTRIBUTE_NOTATION_VALUE, XML_ROLE_ATTLIST_NONE, XML_ROLE_ATTLIST_ELEMENT_NAME, XML_ROLE_IMPLIED_ATTRIBUTE_VALUE, XML_ROLE_REQUIRED_ATTRIBUTE_VALUE, XML_ROLE_DEFAULT_ATTRIBUTE_VALUE, XML_ROLE_FIXED_ATTRIBUTE_VALUE, XML_ROLE_ELEMENT_NONE, XML_ROLE_ELEMENT_NAME, XML_ROLE_CONTENT_ANY, XML_ROLE_CONTENT_EMPTY, XML_ROLE_CONTENT_PCDATA, XML_ROLE_GROUP_OPEN, XML_ROLE_GROUP_CLOSE, XML_ROLE_GROUP_CLOSE_REP, XML_ROLE_GROUP_CLOSE_OPT, XML_ROLE_GROUP_CLOSE_PLUS, XML_ROLE_GROUP_CHOICE, XML_ROLE_GROUP_SEQUENCE, XML_ROLE_CONTENT_ELEMENT, XML_ROLE_CONTENT_ELEMENT_REP, XML_ROLE_CONTENT_ELEMENT_OPT, XML_ROLE_CONTENT_ELEMENT_PLUS, XML_ROLE_PI, XML_ROLE_COMMENT, #ifdef XML_DTD XML_ROLE_TEXT_DECL, XML_ROLE_IGNORE_SECT, XML_ROLE_INNER_PARAM_ENTITY_REF, #endif /* XML_DTD */ XML_ROLE_PARAM_ENTITY_REF }; typedef struct prolog_state { int (PTRCALL *handler) (struct prolog_state *state, int tok, const char *ptr, const char *end, const ENCODING *enc); unsigned level; int role_none; #ifdef XML_DTD unsigned includeLevel; int documentEntity; int inEntityValue; #endif /* XML_DTD */ } PROLOG_STATE; void XmlPrologStateInit(PROLOG_STATE *); #ifdef XML_DTD void XmlPrologStateInitExternalEntity(PROLOG_STATE *); #endif /* XML_DTD */ #define XmlTokenRole(state, tok, ptr, end, enc) \ (((state)->handler)(state, tok, ptr, end, enc)) #ifdef __cplusplus } #endif #endif /* not XmlRole_INCLUDED */ astropy-1.1.1/cextern/expat/lib/xmltok_impl.c0000755001134200020070000012701212602615516022173 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ /* This file is included! */ #ifdef XML_TOK_IMPL_C #ifndef IS_INVALID_CHAR #define IS_INVALID_CHAR(enc, ptr, n) (0) #endif #define INVALID_LEAD_CASE(n, ptr, nextTokPtr) \ case BT_LEAD ## n: \ if (end - ptr < n) \ return XML_TOK_PARTIAL_CHAR; \ if (IS_INVALID_CHAR(enc, ptr, n)) { \ *(nextTokPtr) = (ptr); \ return XML_TOK_INVALID; \ } \ ptr += n; \ break; #define INVALID_CASES(ptr, nextTokPtr) \ INVALID_LEAD_CASE(2, ptr, nextTokPtr) \ INVALID_LEAD_CASE(3, ptr, nextTokPtr) \ INVALID_LEAD_CASE(4, ptr, nextTokPtr) \ case BT_NONXML: \ case BT_MALFORM: \ case BT_TRAIL: \ *(nextTokPtr) = (ptr); \ return XML_TOK_INVALID; #define CHECK_NAME_CASE(n, enc, ptr, end, nextTokPtr) \ case BT_LEAD ## n: \ if (end - ptr < n) \ return XML_TOK_PARTIAL_CHAR; \ if (!IS_NAME_CHAR(enc, ptr, n)) { \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; \ } \ ptr += n; \ break; #define CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) \ case BT_NONASCII: \ if (!IS_NAME_CHAR_MINBPC(enc, ptr)) { \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; \ } \ case BT_NMSTRT: \ case BT_HEX: \ case BT_DIGIT: \ case BT_NAME: \ case BT_MINUS: \ ptr += MINBPC(enc); \ break; \ CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr) \ CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr) \ CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr) #define CHECK_NMSTRT_CASE(n, enc, ptr, end, nextTokPtr) \ case BT_LEAD ## n: \ if (end - ptr < n) \ return XML_TOK_PARTIAL_CHAR; \ if (!IS_NMSTRT_CHAR(enc, ptr, n)) { \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; \ } \ ptr += n; \ break; #define CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) \ case BT_NONASCII: \ if (!IS_NMSTRT_CHAR_MINBPC(enc, ptr)) { \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; \ } \ case BT_NMSTRT: \ case BT_HEX: \ ptr += MINBPC(enc); \ break; \ CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr) \ CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr) \ CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr) #ifndef PREFIX #define PREFIX(ident) ident #endif /* ptr points to character following " */ switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) { case BT_S: case BT_CR: case BT_LF: case BT_PERCNT: *nextTokPtr = ptr; return XML_TOK_INVALID; } /* fall through */ case BT_S: case BT_CR: case BT_LF: *nextTokPtr = ptr; return XML_TOK_DECL_OPEN; case BT_NMSTRT: case BT_HEX: ptr += MINBPC(enc); break; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return XML_TOK_PARTIAL; } static int PTRCALL PREFIX(checkPiTarget)(const ENCODING *enc, const char *ptr, const char *end, int *tokPtr) { int upper = 0; *tokPtr = XML_TOK_PI; if (end - ptr != MINBPC(enc)*3) return 1; switch (BYTE_TO_ASCII(enc, ptr)) { case ASCII_x: break; case ASCII_X: upper = 1; break; default: return 1; } ptr += MINBPC(enc); switch (BYTE_TO_ASCII(enc, ptr)) { case ASCII_m: break; case ASCII_M: upper = 1; break; default: return 1; } ptr += MINBPC(enc); switch (BYTE_TO_ASCII(enc, ptr)) { case ASCII_l: break; case ASCII_L: upper = 1; break; default: return 1; } if (upper) return 0; *tokPtr = XML_TOK_XML_DECL; return 1; } /* ptr points to character following " 1) { size_t n = end - ptr; if (n & (MINBPC(enc) - 1)) { n &= ~(MINBPC(enc) - 1); if (n == 0) return XML_TOK_PARTIAL; end = ptr + n; } } switch (BYTE_TYPE(enc, ptr)) { case BT_RSQB: ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; if (!CHAR_MATCHES(enc, ptr, ASCII_RSQB)) break; ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) { ptr -= MINBPC(enc); break; } *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_CDATA_SECT_CLOSE; case BT_CR: ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; if (BYTE_TYPE(enc, ptr) == BT_LF) ptr += MINBPC(enc); *nextTokPtr = ptr; return XML_TOK_DATA_NEWLINE; case BT_LF: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_DATA_NEWLINE; INVALID_CASES(ptr, nextTokPtr) default: ptr += MINBPC(enc); break; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: \ if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) { \ *nextTokPtr = ptr; \ return XML_TOK_DATA_CHARS; \ } \ ptr += n; \ break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_NONXML: case BT_MALFORM: case BT_TRAIL: case BT_CR: case BT_LF: case BT_RSQB: *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; default: ptr += MINBPC(enc); break; } } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; } /* ptr points to character following " 1) { size_t n = end - ptr; if (n & (MINBPC(enc) - 1)) { n &= ~(MINBPC(enc) - 1); if (n == 0) return XML_TOK_PARTIAL; end = ptr + n; } } switch (BYTE_TYPE(enc, ptr)) { case BT_LT: return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_AMP: return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_CR: ptr += MINBPC(enc); if (ptr == end) return XML_TOK_TRAILING_CR; if (BYTE_TYPE(enc, ptr) == BT_LF) ptr += MINBPC(enc); *nextTokPtr = ptr; return XML_TOK_DATA_NEWLINE; case BT_LF: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_DATA_NEWLINE; case BT_RSQB: ptr += MINBPC(enc); if (ptr == end) return XML_TOK_TRAILING_RSQB; if (!CHAR_MATCHES(enc, ptr, ASCII_RSQB)) break; ptr += MINBPC(enc); if (ptr == end) return XML_TOK_TRAILING_RSQB; if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) { ptr -= MINBPC(enc); break; } *nextTokPtr = ptr; return XML_TOK_INVALID; INVALID_CASES(ptr, nextTokPtr) default: ptr += MINBPC(enc); break; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: \ if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) { \ *nextTokPtr = ptr; \ return XML_TOK_DATA_CHARS; \ } \ ptr += n; \ break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_RSQB: if (ptr + MINBPC(enc) != end) { if (!CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) { ptr += MINBPC(enc); break; } if (ptr + 2*MINBPC(enc) != end) { if (!CHAR_MATCHES(enc, ptr + 2*MINBPC(enc), ASCII_GT)) { ptr += MINBPC(enc); break; } *nextTokPtr = ptr + 2*MINBPC(enc); return XML_TOK_INVALID; } } /* fall through */ case BT_AMP: case BT_LT: case BT_NONXML: case BT_MALFORM: case BT_TRAIL: case BT_CR: case BT_LF: *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; default: ptr += MINBPC(enc); break; } } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; } /* ptr points to character following "%" */ static int PTRCALL PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) case BT_S: case BT_LF: case BT_CR: case BT_PERCNT: *nextTokPtr = ptr; return XML_TOK_PERCENT; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) case BT_SEMI: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_PARAM_ENTITY_REF; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return XML_TOK_PARTIAL; } static int PTRCALL PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) default: *nextTokPtr = ptr; return XML_TOK_INVALID; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) case BT_CR: case BT_LF: case BT_S: case BT_RPAR: case BT_GT: case BT_PERCNT: case BT_VERBAR: *nextTokPtr = ptr; return XML_TOK_POUND_NAME; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return -XML_TOK_POUND_NAME; } static int PTRCALL PREFIX(scanLit)(int open, const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { while (ptr != end) { int t = BYTE_TYPE(enc, ptr); switch (t) { INVALID_CASES(ptr, nextTokPtr) case BT_QUOT: case BT_APOS: ptr += MINBPC(enc); if (t != open) break; if (ptr == end) return -XML_TOK_LITERAL; *nextTokPtr = ptr; switch (BYTE_TYPE(enc, ptr)) { case BT_S: case BT_CR: case BT_LF: case BT_GT: case BT_PERCNT: case BT_LSQB: return XML_TOK_LITERAL; default: return XML_TOK_INVALID; } default: ptr += MINBPC(enc); break; } } return XML_TOK_PARTIAL; } static int PTRCALL PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { int tok; if (ptr == end) return XML_TOK_NONE; if (MINBPC(enc) > 1) { size_t n = end - ptr; if (n & (MINBPC(enc) - 1)) { n &= ~(MINBPC(enc) - 1); if (n == 0) return XML_TOK_PARTIAL; end = ptr + n; } } switch (BYTE_TYPE(enc, ptr)) { case BT_QUOT: return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_APOS: return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_LT: { ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { case BT_EXCL: return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_QUEST: return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_NMSTRT: case BT_HEX: case BT_NONASCII: case BT_LEAD2: case BT_LEAD3: case BT_LEAD4: *nextTokPtr = ptr - MINBPC(enc); return XML_TOK_INSTANCE_START; } *nextTokPtr = ptr; return XML_TOK_INVALID; } case BT_CR: if (ptr + MINBPC(enc) == end) { *nextTokPtr = end; /* indicate that this might be part of a CR/LF pair */ return -XML_TOK_PROLOG_S; } /* fall through */ case BT_S: case BT_LF: for (;;) { ptr += MINBPC(enc); if (ptr == end) break; switch (BYTE_TYPE(enc, ptr)) { case BT_S: case BT_LF: break; case BT_CR: /* don't split CR/LF pair */ if (ptr + MINBPC(enc) != end) break; /* fall through */ default: *nextTokPtr = ptr; return XML_TOK_PROLOG_S; } } *nextTokPtr = ptr; return XML_TOK_PROLOG_S; case BT_PERCNT: return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_COMMA: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_COMMA; case BT_LSQB: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_OPEN_BRACKET; case BT_RSQB: ptr += MINBPC(enc); if (ptr == end) return -XML_TOK_CLOSE_BRACKET; if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) { if (ptr + MINBPC(enc) == end) return XML_TOK_PARTIAL; if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) { *nextTokPtr = ptr + 2*MINBPC(enc); return XML_TOK_COND_SECT_CLOSE; } } *nextTokPtr = ptr; return XML_TOK_CLOSE_BRACKET; case BT_LPAR: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_OPEN_PAREN; case BT_RPAR: ptr += MINBPC(enc); if (ptr == end) return -XML_TOK_CLOSE_PAREN; switch (BYTE_TYPE(enc, ptr)) { case BT_AST: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_CLOSE_PAREN_ASTERISK; case BT_QUEST: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_CLOSE_PAREN_QUESTION; case BT_PLUS: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_CLOSE_PAREN_PLUS; case BT_CR: case BT_LF: case BT_S: case BT_GT: case BT_COMMA: case BT_VERBAR: case BT_RPAR: *nextTokPtr = ptr; return XML_TOK_CLOSE_PAREN; } *nextTokPtr = ptr; return XML_TOK_INVALID; case BT_VERBAR: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_OR; case BT_GT: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_DECL_CLOSE; case BT_NUM: return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr); #define LEAD_CASE(n) \ case BT_LEAD ## n: \ if (end - ptr < n) \ return XML_TOK_PARTIAL_CHAR; \ if (IS_NMSTRT_CHAR(enc, ptr, n)) { \ ptr += n; \ tok = XML_TOK_NAME; \ break; \ } \ if (IS_NAME_CHAR(enc, ptr, n)) { \ ptr += n; \ tok = XML_TOK_NMTOKEN; \ break; \ } \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_NMSTRT: case BT_HEX: tok = XML_TOK_NAME; ptr += MINBPC(enc); break; case BT_DIGIT: case BT_NAME: case BT_MINUS: #ifdef XML_NS case BT_COLON: #endif tok = XML_TOK_NMTOKEN; ptr += MINBPC(enc); break; case BT_NONASCII: if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) { ptr += MINBPC(enc); tok = XML_TOK_NAME; break; } if (IS_NAME_CHAR_MINBPC(enc, ptr)) { ptr += MINBPC(enc); tok = XML_TOK_NMTOKEN; break; } /* fall through */ default: *nextTokPtr = ptr; return XML_TOK_INVALID; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) case BT_GT: case BT_RPAR: case BT_COMMA: case BT_VERBAR: case BT_LSQB: case BT_PERCNT: case BT_S: case BT_CR: case BT_LF: *nextTokPtr = ptr; return tok; #ifdef XML_NS case BT_COLON: ptr += MINBPC(enc); switch (tok) { case XML_TOK_NAME: if (ptr == end) return XML_TOK_PARTIAL; tok = XML_TOK_PREFIXED_NAME; switch (BYTE_TYPE(enc, ptr)) { CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) default: tok = XML_TOK_NMTOKEN; break; } break; case XML_TOK_PREFIXED_NAME: tok = XML_TOK_NMTOKEN; break; } break; #endif case BT_PLUS: if (tok == XML_TOK_NMTOKEN) { *nextTokPtr = ptr; return XML_TOK_INVALID; } *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_NAME_PLUS; case BT_AST: if (tok == XML_TOK_NMTOKEN) { *nextTokPtr = ptr; return XML_TOK_INVALID; } *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_NAME_ASTERISK; case BT_QUEST: if (tok == XML_TOK_NMTOKEN) { *nextTokPtr = ptr; return XML_TOK_INVALID; } *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_NAME_QUESTION; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return -tok; } static int PTRCALL PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { const char *start; if (ptr == end) return XML_TOK_NONE; start = ptr; while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: ptr += n; break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_AMP: if (ptr == start) return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_LT: /* this is for inside entity references */ *nextTokPtr = ptr; return XML_TOK_INVALID; case BT_LF: if (ptr == start) { *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_DATA_NEWLINE; } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_CR: if (ptr == start) { ptr += MINBPC(enc); if (ptr == end) return XML_TOK_TRAILING_CR; if (BYTE_TYPE(enc, ptr) == BT_LF) ptr += MINBPC(enc); *nextTokPtr = ptr; return XML_TOK_DATA_NEWLINE; } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_S: if (ptr == start) { *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_ATTRIBUTE_VALUE_S; } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; default: ptr += MINBPC(enc); break; } } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; } static int PTRCALL PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { const char *start; if (ptr == end) return XML_TOK_NONE; start = ptr; while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: ptr += n; break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_AMP: if (ptr == start) return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_PERCNT: if (ptr == start) { int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr); return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok; } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_LF: if (ptr == start) { *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_DATA_NEWLINE; } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_CR: if (ptr == start) { ptr += MINBPC(enc); if (ptr == end) return XML_TOK_TRAILING_CR; if (BYTE_TYPE(enc, ptr) == BT_LF) ptr += MINBPC(enc); *nextTokPtr = ptr; return XML_TOK_DATA_NEWLINE; } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; default: ptr += MINBPC(enc); break; } } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; } #ifdef XML_DTD static int PTRCALL PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { int level = 0; if (MINBPC(enc) > 1) { size_t n = end - ptr; if (n & (MINBPC(enc) - 1)) { n &= ~(MINBPC(enc) - 1); end = ptr + n; } } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { INVALID_CASES(ptr, nextTokPtr) case BT_LT: if ((ptr += MINBPC(enc)) == end) return XML_TOK_PARTIAL; if (CHAR_MATCHES(enc, ptr, ASCII_EXCL)) { if ((ptr += MINBPC(enc)) == end) return XML_TOK_PARTIAL; if (CHAR_MATCHES(enc, ptr, ASCII_LSQB)) { ++level; ptr += MINBPC(enc); } } break; case BT_RSQB: if ((ptr += MINBPC(enc)) == end) return XML_TOK_PARTIAL; if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) { if ((ptr += MINBPC(enc)) == end) return XML_TOK_PARTIAL; if (CHAR_MATCHES(enc, ptr, ASCII_GT)) { ptr += MINBPC(enc); if (level == 0) { *nextTokPtr = ptr; return XML_TOK_IGNORE_SECT; } --level; } } break; default: ptr += MINBPC(enc); break; } } return XML_TOK_PARTIAL; } #endif /* XML_DTD */ static int PTRCALL PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end, const char **badPtr) { ptr += MINBPC(enc); end -= MINBPC(enc); for (; ptr != end; ptr += MINBPC(enc)) { switch (BYTE_TYPE(enc, ptr)) { case BT_DIGIT: case BT_HEX: case BT_MINUS: case BT_APOS: case BT_LPAR: case BT_RPAR: case BT_PLUS: case BT_COMMA: case BT_SOL: case BT_EQUALS: case BT_QUEST: case BT_CR: case BT_LF: case BT_SEMI: case BT_EXCL: case BT_AST: case BT_PERCNT: case BT_NUM: #ifdef XML_NS case BT_COLON: #endif break; case BT_S: if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) { *badPtr = ptr; return 0; } break; case BT_NAME: case BT_NMSTRT: if (!(BYTE_TO_ASCII(enc, ptr) & ~0x7f)) break; default: switch (BYTE_TO_ASCII(enc, ptr)) { case 0x24: /* $ */ case 0x40: /* @ */ break; default: *badPtr = ptr; return 0; } break; } } return 1; } /* This must only be called for a well-formed start-tag or empty element tag. Returns the number of attributes. Pointers to the first attsMax attributes are stored in atts. */ static int PTRCALL PREFIX(getAtts)(const ENCODING *enc, const char *ptr, int attsMax, ATTRIBUTE *atts) { enum { other, inName, inValue } state = inName; int nAtts = 0; int open = 0; /* defined when state == inValue; initialization just to shut up compilers */ for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) { switch (BYTE_TYPE(enc, ptr)) { #define START_NAME \ if (state == other) { \ if (nAtts < attsMax) { \ atts[nAtts].name = ptr; \ atts[nAtts].normalized = 1; \ } \ state = inName; \ } #define LEAD_CASE(n) \ case BT_LEAD ## n: START_NAME ptr += (n - MINBPC(enc)); break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_NONASCII: case BT_NMSTRT: case BT_HEX: START_NAME break; #undef START_NAME case BT_QUOT: if (state != inValue) { if (nAtts < attsMax) atts[nAtts].valuePtr = ptr + MINBPC(enc); state = inValue; open = BT_QUOT; } else if (open == BT_QUOT) { state = other; if (nAtts < attsMax) atts[nAtts].valueEnd = ptr; nAtts++; } break; case BT_APOS: if (state != inValue) { if (nAtts < attsMax) atts[nAtts].valuePtr = ptr + MINBPC(enc); state = inValue; open = BT_APOS; } else if (open == BT_APOS) { state = other; if (nAtts < attsMax) atts[nAtts].valueEnd = ptr; nAtts++; } break; case BT_AMP: if (nAtts < attsMax) atts[nAtts].normalized = 0; break; case BT_S: if (state == inName) state = other; else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized && (ptr == atts[nAtts].valuePtr || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open)) atts[nAtts].normalized = 0; break; case BT_CR: case BT_LF: /* This case ensures that the first attribute name is counted Apart from that we could just change state on the quote. */ if (state == inName) state = other; else if (state == inValue && nAtts < attsMax) atts[nAtts].normalized = 0; break; case BT_GT: case BT_SOL: if (state != inValue) return nAtts; break; default: break; } } /* not reached */ } static int PTRFASTCALL PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) { int result = 0; /* skip &# */ ptr += 2*MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_x)) { for (ptr += MINBPC(enc); !CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) { int c = BYTE_TO_ASCII(enc, ptr); switch (c) { case ASCII_0: case ASCII_1: case ASCII_2: case ASCII_3: case ASCII_4: case ASCII_5: case ASCII_6: case ASCII_7: case ASCII_8: case ASCII_9: result <<= 4; result |= (c - ASCII_0); break; case ASCII_A: case ASCII_B: case ASCII_C: case ASCII_D: case ASCII_E: case ASCII_F: result <<= 4; result += 10 + (c - ASCII_A); break; case ASCII_a: case ASCII_b: case ASCII_c: case ASCII_d: case ASCII_e: case ASCII_f: result <<= 4; result += 10 + (c - ASCII_a); break; } if (result >= 0x110000) return -1; } } else { for (; !CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) { int c = BYTE_TO_ASCII(enc, ptr); result *= 10; result += (c - ASCII_0); if (result >= 0x110000) return -1; } } return checkCharRefNumber(result); } static int PTRCALL PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr, const char *end) { switch ((end - ptr)/MINBPC(enc)) { case 2: if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) { switch (BYTE_TO_ASCII(enc, ptr)) { case ASCII_l: return ASCII_LT; case ASCII_g: return ASCII_GT; } } break; case 3: if (CHAR_MATCHES(enc, ptr, ASCII_a)) { ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_m)) { ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_p)) return ASCII_AMP; } } break; case 4: switch (BYTE_TO_ASCII(enc, ptr)) { case ASCII_q: ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_u)) { ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_o)) { ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_t)) return ASCII_QUOT; } } break; case ASCII_a: ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_p)) { ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_o)) { ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_s)) return ASCII_APOS; } } break; } } return 0; } static int PTRCALL PREFIX(sameName)(const ENCODING *enc, const char *ptr1, const char *ptr2) { for (;;) { switch (BYTE_TYPE(enc, ptr1)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: \ if (*ptr1++ != *ptr2++) \ return 0; LEAD_CASE(4) LEAD_CASE(3) LEAD_CASE(2) #undef LEAD_CASE /* fall through */ if (*ptr1++ != *ptr2++) return 0; break; case BT_NONASCII: case BT_NMSTRT: #ifdef XML_NS case BT_COLON: #endif case BT_HEX: case BT_DIGIT: case BT_NAME: case BT_MINUS: if (*ptr2++ != *ptr1++) return 0; if (MINBPC(enc) > 1) { if (*ptr2++ != *ptr1++) return 0; if (MINBPC(enc) > 2) { if (*ptr2++ != *ptr1++) return 0; if (MINBPC(enc) > 3) { if (*ptr2++ != *ptr1++) return 0; } } } break; default: if (MINBPC(enc) == 1 && *ptr1 == *ptr2) return 1; switch (BYTE_TYPE(enc, ptr2)) { case BT_LEAD2: case BT_LEAD3: case BT_LEAD4: case BT_NONASCII: case BT_NMSTRT: #ifdef XML_NS case BT_COLON: #endif case BT_HEX: case BT_DIGIT: case BT_NAME: case BT_MINUS: return 0; default: return 1; } } } /* not reached */ } static int PTRCALL PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1, const char *end1, const char *ptr2) { for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) { if (ptr1 == end1) return 0; if (!CHAR_MATCHES(enc, ptr1, *ptr2)) return 0; } return ptr1 == end1; } static int PTRFASTCALL PREFIX(nameLength)(const ENCODING *enc, const char *ptr) { const char *start = ptr; for (;;) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: ptr += n; break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_NONASCII: case BT_NMSTRT: #ifdef XML_NS case BT_COLON: #endif case BT_HEX: case BT_DIGIT: case BT_NAME: case BT_MINUS: ptr += MINBPC(enc); break; default: return (int)(ptr - start); } } } static const char * PTRFASTCALL PREFIX(skipS)(const ENCODING *enc, const char *ptr) { for (;;) { switch (BYTE_TYPE(enc, ptr)) { case BT_LF: case BT_CR: case BT_S: ptr += MINBPC(enc); break; default: return ptr; } } } static void PTRCALL PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end, POSITION *pos) { while (ptr < end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: \ ptr += n; \ break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_LF: pos->columnNumber = (XML_Size)-1; pos->lineNumber++; ptr += MINBPC(enc); break; case BT_CR: pos->lineNumber++; ptr += MINBPC(enc); if (ptr != end && BYTE_TYPE(enc, ptr) == BT_LF) ptr += MINBPC(enc); pos->columnNumber = (XML_Size)-1; break; default: ptr += MINBPC(enc); break; } pos->columnNumber++; } } #undef DO_LEAD_CASE #undef MULTIBYTE_CASES #undef INVALID_CASES #undef CHECK_NAME_CASE #undef CHECK_NAME_CASES #undef CHECK_NMSTRT_CASE #undef CHECK_NMSTRT_CASES #endif /* XML_TOK_IMPL_C */ astropy-1.1.1/cextern/expat/lib/nametab.h0000755001134200020070000001561212602615516021252 0ustar embrayscience00000000000000static const unsigned namingBitmap[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x04000000, 0x87FFFFFE, 0x07FFFFFE, 0x00000000, 0x00000000, 0xFF7FFFFF, 0xFF7FFFFF, 0xFFFFFFFF, 0x7FF3FFFF, 0xFFFFFDFE, 0x7FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFE00F, 0xFC31FFFF, 0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF, 0xFFFFFFFF, 0xF80001FF, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFD740, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD, 0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF, 0xFFFF0003, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF, 0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE, 0x0000007F, 0x00000000, 0xFFFF0000, 0x000707FF, 0x00000000, 0x07FFFFFE, 0x000007FE, 0xFFFE0000, 0xFFFFFFFF, 0x7CFFFFFF, 0x002F7FFF, 0x00000060, 0xFFFFFFE0, 0x23FFFFFF, 0xFF000000, 0x00000003, 0xFFF99FE0, 0x03C5FDFF, 0xB0000000, 0x00030003, 0xFFF987E0, 0x036DFDFF, 0x5E000000, 0x001C0000, 0xFFFBAFE0, 0x23EDFDFF, 0x00000000, 0x00000001, 0xFFF99FE0, 0x23CDFDFF, 0xB0000000, 0x00000003, 0xD63DC7E0, 0x03BFC718, 0x00000000, 0x00000000, 0xFFFDDFE0, 0x03EFFDFF, 0x00000000, 0x00000003, 0xFFFDDFE0, 0x03EFFDFF, 0x40000000, 0x00000003, 0xFFFDDFE0, 0x03FFFDFF, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFE, 0x000D7FFF, 0x0000003F, 0x00000000, 0xFEF02596, 0x200D6CAE, 0x0000001F, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFEFF, 0x000003FF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFF003F, 0x007FFFFF, 0x0007DAED, 0x50000000, 0x82315001, 0x002C62AB, 0x40000000, 0xF580C900, 0x00000007, 0x02010800, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x03FFFFFF, 0x3F3FFFFF, 0xFFFFFFFF, 0xAAFF3F3F, 0x3FFFFFFF, 0xFFFFFFFF, 0x5FDFFFFF, 0x0FCF1FDC, 0x1FDC1FFF, 0x00000000, 0x00004C40, 0x00000000, 0x00000000, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000080, 0x000003FE, 0xFFFFFFFE, 0xFFFFFFFF, 0x001FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x07FFFFFF, 0xFFFFFFE0, 0x00001FFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000003F, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x07FF6000, 0x87FFFFFE, 0x07FFFFFE, 0x00000000, 0x00800000, 0xFF7FFFFF, 0xFF7FFFFF, 0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF, 0xFFFFFFFF, 0xF80001FF, 0x00030003, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000003F, 0x00000003, 0xFFFFD7C0, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD, 0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF, 0xFFFF007B, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF, 0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE, 0xFFFE007F, 0xBBFFFFFB, 0xFFFF0016, 0x000707FF, 0x00000000, 0x07FFFFFE, 0x0007FFFF, 0xFFFF03FF, 0xFFFFFFFF, 0x7CFFFFFF, 0xFFEF7FFF, 0x03FF3DFF, 0xFFFFFFEE, 0xF3FFFFFF, 0xFF1E3FFF, 0x0000FFCF, 0xFFF99FEE, 0xD3C5FDFF, 0xB080399F, 0x0003FFCF, 0xFFF987E4, 0xD36DFDFF, 0x5E003987, 0x001FFFC0, 0xFFFBAFEE, 0xF3EDFDFF, 0x00003BBF, 0x0000FFC1, 0xFFF99FEE, 0xF3CDFDFF, 0xB0C0398F, 0x0000FFC3, 0xD63DC7EC, 0xC3BFC718, 0x00803DC7, 0x0000FF80, 0xFFFDDFEE, 0xC3EFFDFF, 0x00603DDF, 0x0000FFC3, 0xFFFDDFEC, 0xC3EFFDFF, 0x40603DDF, 0x0000FFC3, 0xFFFDDFEC, 0xC3FFFDFF, 0x00803DCF, 0x0000FFC3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFE, 0x07FF7FFF, 0x03FF7FFF, 0x00000000, 0xFEF02596, 0x3BFF6CAE, 0x03FF3F5F, 0x00000000, 0x03000000, 0xC2A003FF, 0xFFFFFEFF, 0xFFFE03FF, 0xFEBF0FDF, 0x02FE3FFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x1FFF0000, 0x00000002, 0x000000A0, 0x003EFFFE, 0xFFFFFFFE, 0xFFFFFFFF, 0x661FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x77FFFFFF, }; static const unsigned char nmstrtPages[] = { 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; static const unsigned char namePages[] = { 0x19, 0x03, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x00, 0x00, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13, 0x26, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; astropy-1.1.1/cextern/expat/lib/amigaconfig.h0000755001134200020070000000143512602615516022105 0ustar embrayscience00000000000000#ifndef AMIGACONFIG_H #define AMIGACONFIG_H /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ #define BYTEORDER 4321 /* Define to 1 if you have the `bcopy' function. */ #define HAVE_BCOPY 1 /* Define to 1 if you have the header file. */ #undef HAVE_CHECK_H /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* whether byteorder is bigendian */ #define WORDS_BIGENDIAN /* Define to specify how much context to retain around the current parse point. */ #define XML_CONTEXT_BYTES 1024 /* Define to make parameter entity parsing functionality available. */ #define XML_DTD /* Define to make XML Namespaces functionality available. */ #define XML_NS #endif /* AMIGACONFIG_H */ astropy-1.1.1/cextern/expat/lib/libexpatw.def0000755001134200020070000000375412602615516022155 0ustar embrayscience00000000000000; DEF file for MS VC++ LIBRARY EXPORTS XML_DefaultCurrent @1 XML_ErrorString @2 XML_ExpatVersion @3 XML_ExpatVersionInfo @4 XML_ExternalEntityParserCreate @5 XML_GetBase @6 XML_GetBuffer @7 XML_GetCurrentByteCount @8 XML_GetCurrentByteIndex @9 XML_GetCurrentColumnNumber @10 XML_GetCurrentLineNumber @11 XML_GetErrorCode @12 XML_GetIdAttributeIndex @13 XML_GetInputContext @14 XML_GetSpecifiedAttributeCount @15 XML_Parse @16 XML_ParseBuffer @17 XML_ParserCreate @18 XML_ParserCreateNS @19 XML_ParserCreate_MM @20 XML_ParserFree @21 XML_SetAttlistDeclHandler @22 XML_SetBase @23 XML_SetCdataSectionHandler @24 XML_SetCharacterDataHandler @25 XML_SetCommentHandler @26 XML_SetDefaultHandler @27 XML_SetDefaultHandlerExpand @28 XML_SetDoctypeDeclHandler @29 XML_SetElementDeclHandler @30 XML_SetElementHandler @31 XML_SetEncoding @32 XML_SetEndCdataSectionHandler @33 XML_SetEndDoctypeDeclHandler @34 XML_SetEndElementHandler @35 XML_SetEndNamespaceDeclHandler @36 XML_SetEntityDeclHandler @37 XML_SetExternalEntityRefHandler @38 XML_SetExternalEntityRefHandlerArg @39 XML_SetNamespaceDeclHandler @40 XML_SetNotStandaloneHandler @41 XML_SetNotationDeclHandler @42 XML_SetParamEntityParsing @43 XML_SetProcessingInstructionHandler @44 XML_SetReturnNSTriplet @45 XML_SetStartCdataSectionHandler @46 XML_SetStartDoctypeDeclHandler @47 XML_SetStartElementHandler @48 XML_SetStartNamespaceDeclHandler @49 XML_SetUnknownEncodingHandler @50 XML_SetUnparsedEntityDeclHandler @51 XML_SetUserData @52 XML_SetXmlDeclHandler @53 XML_UseParserAsHandlerArg @54 ; added with version 1.95.3 XML_ParserReset @55 XML_SetSkippedEntityHandler @56 ; added with version 1.95.5 XML_GetFeatureList @57 XML_UseForeignDTD @58 ; added with version 1.95.6 XML_FreeContentModel @59 XML_MemMalloc @60 XML_MemRealloc @61 XML_MemFree @62 ; added with version 1.95.8 XML_StopParser @63 XML_ResumeParser @64 XML_GetParsingStatus @65 astropy-1.1.1/cextern/expat/lib/Makefile.MPW0000755001134200020070000001076712602615516021602 0ustar embrayscience00000000000000# File: Makefile.MPW # Targets: All, Dynamic, Static (and Clean, Clean-All) # Created: Tuesday, July 02, 2002 # # MPW Makefile for building expat under the "classic" (i.e. pre-X) Mac OS # Copyright © 2002 Daryle Walker # Portions Copyright © 2002 Thomas Wegner # See the COPYING file for distribution information # # Description: # This Makefile lets you build static, dynamic (i.e. shared) and stub # versions of the expat library as well as the elements.c and outline.c # examples (built as tools for MPW). This is for PPC only; it should be # no problem to build a 68K version of the expat library, though. # # Usage: # Buildprogram All # or Buildprogram Dynamic # or Buildprogram Static # # Note: You first have to rename this file to "Makefile", or the Buildprogram # commando will not recognize it. # MAKEFILE = Makefile ¥MondoBuild¥ = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified ObjDir = : SrcDir = : HdrDir = : ToolDir = ::examples: Includes = -i {HdrDir} Sym-PPC = -sym off Defines = -d MACOS_CLASSIC PPCCOptions = {Includes} {Sym-PPC} -w 35 {Defines} FragName = libexpat ### Source Files ### SrcFiles = ¶ "{SrcDir}xmlparse.c" ¶ "{SrcDir}xmlrole.c" ¶ "{SrcDir}xmltok.c" ToolSrcFiles = ¶ "{ToolDir}elements.c" ¶ "{ToolDir}outline.c" ### Object Files ### ObjFiles-PPC = ¶ "{ObjDir}xmlparse.c.o" ¶ "{ObjDir}xmlrole.c.o" ¶ "{ObjDir}xmltok.c.o" ElementToolObjFile = "{ObjDir}elements.c.o" OutlineToolObjFile = "{ObjDir}outline.c.o" ### Libraries ### StLibFiles-PPC = ¶ "{PPCLibraries}StdCRuntime.o" ¶ "{PPCLibraries}PPCCRuntime.o" ¶ "{PPCLibraries}PPCToolLibs.o" ShLibFiles-PPC = ¶ "{SharedLibraries}InterfaceLib" ¶ "{SharedLibraries}StdCLib" ¶ "{SharedLibraries}MathLib" LibFiles-PPC = ¶ {StLibFiles-PPC} ¶ {ShLibFiles-PPC} ### Special Files ### ExportFile = "{ObjDir}{FragName}.exp" StLibFile = "{ObjDir}{FragName}.MrC.o" ShLibFile = "{ObjDir}{FragName}" StubFile = "{ObjDir}{FragName}.stub" ElementsTool = "{ToolDir}elements" OutlineTool = "{ToolDir}outline" ### Default Rules ### .c.o Ä .c {¥MondoBuild¥} {PPCC} {depDir}{default}.c -o {targDir}{default}.c.o {PPCCOptions} ### Build Rules ### All Ä Dynamic {ElementsTool} {OutlineTool} Static Ä {StLibFile} Dynamic Ä Static {ShLibFile} {StubFile} {StLibFile} ÄÄ {ObjFiles-PPC} {StLibFiles-PPC} {¥MondoBuild¥} PPCLink ¶ -o {Targ} ¶ {ObjFiles-PPC} ¶ {StLibFiles-PPC} ¶ {Sym-PPC} ¶ -mf -d ¶ -t 'XCOF' ¶ -c 'MPS ' ¶ -xm l {ShLibFile} ÄÄ {StLibFile} {ShLibFiles-PPC} {ExportFile} {¥MondoBuild¥} PPCLink ¶ -o {Targ} ¶ {StLibFile} ¶ {ShLibFiles-PPC} ¶ {Sym-PPC} ¶ -@export {ExportFile} ¶ -fragname {FragName} ¶ -mf -d ¶ -t 'shlb' ¶ -c '????' ¶ -xm s {StubFile} ÄÄ {ShLibFile} {¥MondoBuild¥} shlb2stub -o {Targ} {ShLibFile} {ElementsTool} ÄÄ {ElementToolObjFile} {StubFile} {LibFiles-PPC} {¥MondoBuild¥} PPCLink ¶ -o {Targ} ¶ {ElementToolObjFile} ¶ {StLibFile} ¶ {LibFiles-PPC} ¶ {Sym-PPC} ¶ -mf -d ¶ -t 'MPST' ¶ -c 'MPS ' {OutlineTool} ÄÄ {OutlineToolObjFile} {StubFile} {LibFiles-PPC} {¥MondoBuild¥} PPCLink ¶ -o {Targ} ¶ {OutlineToolObjFile} ¶ {StLibFile} ¶ {LibFiles-PPC} ¶ {Sym-PPC} ¶ -mf -d ¶ -t 'MPST' ¶ -c 'MPS ' ### Special Rules ### {ExportFile} ÄÄ "{HdrDir}expat.h" {¥MondoBuild¥} StreamEdit -d ¶ -e "/¥('XMLPARSEAPI('Å') ')Ç0,1È'XML_'([A-Za-z0-9_]+)¨1'('/ Print 'XML_' ¨1" ¶ "{HdrDir}expat.h" > {Targ} ### Required Dependencies ### "{ObjDir}xmlparse.c.o" Ä "{SrcDir}xmlparse.c" "{ObjDir}xmlrole.c.o" Ä "{SrcDir}xmlrole.c" "{ObjDir}xmltok.c.o" Ä "{SrcDir}xmltok.c" "{ObjDir}elements.c.o" Ä "{ToolDir}elements.c" "{ObjDir}outline.c.o" Ä "{ToolDir}outline.c" ### Optional Dependencies ### ### Build this target to clean out generated intermediate files. ### Clean Ä Delete {ObjFiles-PPC} {ExportFile} {ElementToolObjFile} {OutlineToolObjFile} ### Build this target to clean out all generated files. ### Clean-All Ä Clean Delete {StLibFile} {ShLibFile} {StubFile} {ElementsTool} {OutlineTool} ### Build this target to generate "include file" dependencies. ### Dependencies Ä $OutOfDate MakeDepend ¶ -append {MAKEFILE} ¶ -ignore "{CIncludes}" ¶ -objdir "{ObjDir}" ¶ -objext .o ¶ {Defines} ¶ {Includes} ¶ {SrcFiles} astropy-1.1.1/cextern/expat/lib/expat.h0000755001134200020070000012143012602615516020760 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #ifndef Expat_INCLUDED #define Expat_INCLUDED 1 #ifdef __VMS /* 0 1 2 3 0 1 2 3 1234567890123456789012345678901 1234567890123456789012345678901 */ #define XML_SetProcessingInstructionHandler XML_SetProcessingInstrHandler #define XML_SetUnparsedEntityDeclHandler XML_SetUnparsedEntDeclHandler #define XML_SetStartNamespaceDeclHandler XML_SetStartNamespcDeclHandler #define XML_SetExternalEntityRefHandlerArg XML_SetExternalEntRefHandlerArg #endif #include #include "expat_external.h" #ifdef __cplusplus extern "C" { #endif struct XML_ParserStruct; typedef struct XML_ParserStruct *XML_Parser; /* Should this be defined using stdbool.h when C99 is available? */ typedef unsigned char XML_Bool; #define XML_TRUE ((XML_Bool) 1) #define XML_FALSE ((XML_Bool) 0) /* The XML_Status enum gives the possible return values for several API functions. The preprocessor #defines are included so this stanza can be added to code that still needs to support older versions of Expat 1.95.x: #ifndef XML_STATUS_OK #define XML_STATUS_OK 1 #define XML_STATUS_ERROR 0 #endif Otherwise, the #define hackery is quite ugly and would have been dropped. */ enum XML_Status { XML_STATUS_ERROR = 0, #define XML_STATUS_ERROR XML_STATUS_ERROR XML_STATUS_OK = 1, #define XML_STATUS_OK XML_STATUS_OK XML_STATUS_SUSPENDED = 2 #define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED }; enum XML_Error { XML_ERROR_NONE, XML_ERROR_NO_MEMORY, XML_ERROR_SYNTAX, XML_ERROR_NO_ELEMENTS, XML_ERROR_INVALID_TOKEN, XML_ERROR_UNCLOSED_TOKEN, XML_ERROR_PARTIAL_CHAR, XML_ERROR_TAG_MISMATCH, XML_ERROR_DUPLICATE_ATTRIBUTE, XML_ERROR_JUNK_AFTER_DOC_ELEMENT, XML_ERROR_PARAM_ENTITY_REF, XML_ERROR_UNDEFINED_ENTITY, XML_ERROR_RECURSIVE_ENTITY_REF, XML_ERROR_ASYNC_ENTITY, XML_ERROR_BAD_CHAR_REF, XML_ERROR_BINARY_ENTITY_REF, XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF, XML_ERROR_MISPLACED_XML_PI, XML_ERROR_UNKNOWN_ENCODING, XML_ERROR_INCORRECT_ENCODING, XML_ERROR_UNCLOSED_CDATA_SECTION, XML_ERROR_EXTERNAL_ENTITY_HANDLING, XML_ERROR_NOT_STANDALONE, XML_ERROR_UNEXPECTED_STATE, XML_ERROR_ENTITY_DECLARED_IN_PE, XML_ERROR_FEATURE_REQUIRES_XML_DTD, XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING, /* Added in 1.95.7. */ XML_ERROR_UNBOUND_PREFIX, /* Added in 1.95.8. */ XML_ERROR_UNDECLARING_PREFIX, XML_ERROR_INCOMPLETE_PE, XML_ERROR_XML_DECL, XML_ERROR_TEXT_DECL, XML_ERROR_PUBLICID, XML_ERROR_SUSPENDED, XML_ERROR_NOT_SUSPENDED, XML_ERROR_ABORTED, XML_ERROR_FINISHED, XML_ERROR_SUSPEND_PE, /* Added in 2.0. */ XML_ERROR_RESERVED_PREFIX_XML, XML_ERROR_RESERVED_PREFIX_XMLNS, XML_ERROR_RESERVED_NAMESPACE_URI }; enum XML_Content_Type { XML_CTYPE_EMPTY = 1, XML_CTYPE_ANY, XML_CTYPE_MIXED, XML_CTYPE_NAME, XML_CTYPE_CHOICE, XML_CTYPE_SEQ }; enum XML_Content_Quant { XML_CQUANT_NONE, XML_CQUANT_OPT, XML_CQUANT_REP, XML_CQUANT_PLUS }; /* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be XML_CQUANT_NONE, and the other fields will be zero or NULL. If type == XML_CTYPE_MIXED, then quant will be NONE or REP and numchildren will contain number of elements that may be mixed in and children point to an array of XML_Content cells that will be all of XML_CTYPE_NAME type with no quantification. If type == XML_CTYPE_NAME, then the name points to the name, and the numchildren field will be zero and children will be NULL. The quant fields indicates any quantifiers placed on the name. CHOICE and SEQ will have name NULL, the number of children in numchildren and children will point, recursively, to an array of XML_Content cells. The EMPTY, ANY, and MIXED types will only occur at top level. */ typedef struct XML_cp XML_Content; struct XML_cp { enum XML_Content_Type type; enum XML_Content_Quant quant; XML_Char * name; unsigned int numchildren; XML_Content * children; }; /* This is called for an element declaration. See above for description of the model argument. It's the caller's responsibility to free model when finished with it. */ typedef void (XMLCALL *XML_ElementDeclHandler) (void *userData, const XML_Char *name, XML_Content *model); XMLPARSEAPI(void) XML_SetElementDeclHandler(XML_Parser parser, XML_ElementDeclHandler eldecl); /* The Attlist declaration handler is called for *each* attribute. So a single Attlist declaration with multiple attributes declared will generate multiple calls to this handler. The "default" parameter may be NULL in the case of the "#IMPLIED" or "#REQUIRED" keyword. The "isrequired" parameter will be true and the default value will be NULL in the case of "#REQUIRED". If "isrequired" is true and default is non-NULL, then this is a "#FIXED" default. */ typedef void (XMLCALL *XML_AttlistDeclHandler) ( void *userData, const XML_Char *elname, const XML_Char *attname, const XML_Char *att_type, const XML_Char *dflt, int isrequired); XMLPARSEAPI(void) XML_SetAttlistDeclHandler(XML_Parser parser, XML_AttlistDeclHandler attdecl); /* The XML declaration handler is called for *both* XML declarations and text declarations. The way to distinguish is that the version parameter will be NULL for text declarations. The encoding parameter may be NULL for XML declarations. The standalone parameter will be -1, 0, or 1 indicating respectively that there was no standalone parameter in the declaration, that it was given as no, or that it was given as yes. */ typedef void (XMLCALL *XML_XmlDeclHandler) (void *userData, const XML_Char *version, const XML_Char *encoding, int standalone); XMLPARSEAPI(void) XML_SetXmlDeclHandler(XML_Parser parser, XML_XmlDeclHandler xmldecl); typedef struct { void *(*malloc_fcn)(size_t size); void *(*realloc_fcn)(void *ptr, size_t size); void (*free_fcn)(void *ptr); } XML_Memory_Handling_Suite; /* Constructs a new parser; encoding is the encoding specified by the external protocol or NULL if there is none specified. */ XMLPARSEAPI(XML_Parser) XML_ParserCreate(const XML_Char *encoding); /* Constructs a new parser and namespace processor. Element type names and attribute names that belong to a namespace will be expanded; unprefixed attribute names are never expanded; unprefixed element type names are expanded only if there is a default namespace. The expanded name is the concatenation of the namespace URI, the namespace separator character, and the local part of the name. If the namespace separator is '\0' then the namespace URI and the local part will be concatenated without any separator. It is a programming error to use the separator '\0' with namespace triplets (see XML_SetReturnNSTriplet). */ XMLPARSEAPI(XML_Parser) XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator); /* Constructs a new parser using the memory management suite referred to by memsuite. If memsuite is NULL, then use the standard library memory suite. If namespaceSeparator is non-NULL it creates a parser with namespace processing as described above. The character pointed at will serve as the namespace separator. All further memory operations used for the created parser will come from the given suite. */ XMLPARSEAPI(XML_Parser) XML_ParserCreate_MM(const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite, const XML_Char *namespaceSeparator); /* Prepare a parser object to be re-used. This is particularly valuable when memory allocation overhead is disproportionatly high, such as when a large number of small documnents need to be parsed. All handlers are cleared from the parser, except for the unknownEncodingHandler. The parser's external state is re-initialized except for the values of ns and ns_triplets. Added in Expat 1.95.3. */ XMLPARSEAPI(XML_Bool) XML_ParserReset(XML_Parser parser, const XML_Char *encoding); /* atts is array of name/value pairs, terminated by 0; names and values are 0 terminated. */ typedef void (XMLCALL *XML_StartElementHandler) (void *userData, const XML_Char *name, const XML_Char **atts); typedef void (XMLCALL *XML_EndElementHandler) (void *userData, const XML_Char *name); /* s is not 0 terminated. */ typedef void (XMLCALL *XML_CharacterDataHandler) (void *userData, const XML_Char *s, int len); /* target and data are 0 terminated */ typedef void (XMLCALL *XML_ProcessingInstructionHandler) ( void *userData, const XML_Char *target, const XML_Char *data); /* data is 0 terminated */ typedef void (XMLCALL *XML_CommentHandler) (void *userData, const XML_Char *data); typedef void (XMLCALL *XML_StartCdataSectionHandler) (void *userData); typedef void (XMLCALL *XML_EndCdataSectionHandler) (void *userData); /* This is called for any characters in the XML document for which there is no applicable handler. This includes both characters that are part of markup which is of a kind that is not reported (comments, markup declarations), or characters that are part of a construct which could be reported but for which no handler has been supplied. The characters are passed exactly as they were in the XML document except that they will be encoded in UTF-8 or UTF-16. Line boundaries are not normalized. Note that a byte order mark character is not passed to the default handler. There are no guarantees about how characters are divided between calls to the default handler: for example, a comment might be split between multiple calls. */ typedef void (XMLCALL *XML_DefaultHandler) (void *userData, const XML_Char *s, int len); /* This is called for the start of the DOCTYPE declaration, before any DTD or internal subset is parsed. */ typedef void (XMLCALL *XML_StartDoctypeDeclHandler) ( void *userData, const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset); /* This is called for the start of the DOCTYPE declaration when the closing > is encountered, but after processing any external subset. */ typedef void (XMLCALL *XML_EndDoctypeDeclHandler)(void *userData); /* This is called for entity declarations. The is_parameter_entity argument will be non-zero if the entity is a parameter entity, zero otherwise. For internal entities (), value will be non-NULL and systemId, publicID, and notationName will be NULL. The value string is NOT nul-terminated; the length is provided in the value_length argument. Since it is legal to have zero-length values, do not use this argument to test for internal entities. For external entities, value will be NULL and systemId will be non-NULL. The publicId argument will be NULL unless a public identifier was provided. The notationName argument will have a non-NULL value only for unparsed entity declarations. Note that is_parameter_entity can't be changed to XML_Bool, since that would break binary compatibility. */ typedef void (XMLCALL *XML_EntityDeclHandler) ( void *userData, const XML_Char *entityName, int is_parameter_entity, const XML_Char *value, int value_length, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName); XMLPARSEAPI(void) XML_SetEntityDeclHandler(XML_Parser parser, XML_EntityDeclHandler handler); /* OBSOLETE -- OBSOLETE -- OBSOLETE This handler has been superceded by the EntityDeclHandler above. It is provided here for backward compatibility. This is called for a declaration of an unparsed (NDATA) entity. The base argument is whatever was set by XML_SetBase. The entityName, systemId and notationName arguments will never be NULL. The other arguments may be. */ typedef void (XMLCALL *XML_UnparsedEntityDeclHandler) ( void *userData, const XML_Char *entityName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName); /* This is called for a declaration of notation. The base argument is whatever was set by XML_SetBase. The notationName will never be NULL. The other arguments can be. */ typedef void (XMLCALL *XML_NotationDeclHandler) ( void *userData, const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId); /* When namespace processing is enabled, these are called once for each namespace declaration. The call to the start and end element handlers occur between the calls to the start and end namespace declaration handlers. For an xmlns attribute, prefix will be NULL. For an xmlns="" attribute, uri will be NULL. */ typedef void (XMLCALL *XML_StartNamespaceDeclHandler) ( void *userData, const XML_Char *prefix, const XML_Char *uri); typedef void (XMLCALL *XML_EndNamespaceDeclHandler) ( void *userData, const XML_Char *prefix); /* This is called if the document is not standalone, that is, it has an external subset or a reference to a parameter entity, but does not have standalone="yes". If this handler returns XML_STATUS_ERROR, then processing will not continue, and the parser will return a XML_ERROR_NOT_STANDALONE error. If parameter entity parsing is enabled, then in addition to the conditions above this handler will only be called if the referenced entity was actually read. */ typedef int (XMLCALL *XML_NotStandaloneHandler) (void *userData); /* This is called for a reference to an external parsed general entity. The referenced entity is not automatically parsed. The application can parse it immediately or later using XML_ExternalEntityParserCreate. The parser argument is the parser parsing the entity containing the reference; it can be passed as the parser argument to XML_ExternalEntityParserCreate. The systemId argument is the system identifier as specified in the entity declaration; it will not be NULL. The base argument is the system identifier that should be used as the base for resolving systemId if systemId was relative; this is set by XML_SetBase; it may be NULL. The publicId argument is the public identifier as specified in the entity declaration, or NULL if none was specified; the whitespace in the public identifier will have been normalized as required by the XML spec. The context argument specifies the parsing context in the format expected by the context argument to XML_ExternalEntityParserCreate; context is valid only until the handler returns, so if the referenced entity is to be parsed later, it must be copied. context is NULL only when the entity is a parameter entity. The handler should return XML_STATUS_ERROR if processing should not continue because of a fatal error in the handling of the external entity. In this case the calling parser will return an XML_ERROR_EXTERNAL_ENTITY_HANDLING error. Note that unlike other handlers the first argument is the parser, not userData. */ typedef int (XMLCALL *XML_ExternalEntityRefHandler) ( XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId); /* This is called in two situations: 1) An entity reference is encountered for which no declaration has been read *and* this is not an error. 2) An internal entity reference is read, but not expanded, because XML_SetDefaultHandler has been called. Note: skipped parameter entities in declarations and skipped general entities in attribute values cannot be reported, because the event would be out of sync with the reporting of the declarations or attribute values */ typedef void (XMLCALL *XML_SkippedEntityHandler) ( void *userData, const XML_Char *entityName, int is_parameter_entity); /* This structure is filled in by the XML_UnknownEncodingHandler to provide information to the parser about encodings that are unknown to the parser. The map[b] member gives information about byte sequences whose first byte is b. If map[b] is c where c is >= 0, then b by itself encodes the Unicode scalar value c. If map[b] is -1, then the byte sequence is malformed. If map[b] is -n, where n >= 2, then b is the first byte of an n-byte sequence that encodes a single Unicode scalar value. The data member will be passed as the first argument to the convert function. The convert function is used to convert multibyte sequences; s will point to a n-byte sequence where map[(unsigned char)*s] == -n. The convert function must return the Unicode scalar value represented by this byte sequence or -1 if the byte sequence is malformed. The convert function may be NULL if the encoding is a single-byte encoding, that is if map[b] >= -1 for all bytes b. When the parser is finished with the encoding, then if release is not NULL, it will call release passing it the data member; once release has been called, the convert function will not be called again. Expat places certain restrictions on the encodings that are supported using this mechanism. 1. Every ASCII character that can appear in a well-formed XML document, other than the characters $@\^`{}~ must be represented by a single byte, and that byte must be the same byte that represents that character in ASCII. 2. No character may require more than 4 bytes to encode. 3. All characters encoded must have Unicode scalar values <= 0xFFFF, (i.e., characters that would be encoded by surrogates in UTF-16 are not allowed). Note that this restriction doesn't apply to the built-in support for UTF-8 and UTF-16. 4. No Unicode character may be encoded by more than one distinct sequence of bytes. */ typedef struct { int map[256]; void *data; int (XMLCALL *convert)(void *data, const char *s); void (XMLCALL *release)(void *data); } XML_Encoding; /* This is called for an encoding that is unknown to the parser. The encodingHandlerData argument is that which was passed as the second argument to XML_SetUnknownEncodingHandler. The name argument gives the name of the encoding as specified in the encoding declaration. If the callback can provide information about the encoding, it must fill in the XML_Encoding structure, and return XML_STATUS_OK. Otherwise it must return XML_STATUS_ERROR. If info does not describe a suitable encoding, then the parser will return an XML_UNKNOWN_ENCODING error. */ typedef int (XMLCALL *XML_UnknownEncodingHandler) ( void *encodingHandlerData, const XML_Char *name, XML_Encoding *info); XMLPARSEAPI(void) XML_SetElementHandler(XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end); XMLPARSEAPI(void) XML_SetStartElementHandler(XML_Parser parser, XML_StartElementHandler handler); XMLPARSEAPI(void) XML_SetEndElementHandler(XML_Parser parser, XML_EndElementHandler handler); XMLPARSEAPI(void) XML_SetCharacterDataHandler(XML_Parser parser, XML_CharacterDataHandler handler); XMLPARSEAPI(void) XML_SetProcessingInstructionHandler(XML_Parser parser, XML_ProcessingInstructionHandler handler); XMLPARSEAPI(void) XML_SetCommentHandler(XML_Parser parser, XML_CommentHandler handler); XMLPARSEAPI(void) XML_SetCdataSectionHandler(XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end); XMLPARSEAPI(void) XML_SetStartCdataSectionHandler(XML_Parser parser, XML_StartCdataSectionHandler start); XMLPARSEAPI(void) XML_SetEndCdataSectionHandler(XML_Parser parser, XML_EndCdataSectionHandler end); /* This sets the default handler and also inhibits expansion of internal entities. These entity references will be passed to the default handler, or to the skipped entity handler, if one is set. */ XMLPARSEAPI(void) XML_SetDefaultHandler(XML_Parser parser, XML_DefaultHandler handler); /* This sets the default handler but does not inhibit expansion of internal entities. The entity reference will not be passed to the default handler. */ XMLPARSEAPI(void) XML_SetDefaultHandlerExpand(XML_Parser parser, XML_DefaultHandler handler); XMLPARSEAPI(void) XML_SetDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end); XMLPARSEAPI(void) XML_SetStartDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start); XMLPARSEAPI(void) XML_SetEndDoctypeDeclHandler(XML_Parser parser, XML_EndDoctypeDeclHandler end); XMLPARSEAPI(void) XML_SetUnparsedEntityDeclHandler(XML_Parser parser, XML_UnparsedEntityDeclHandler handler); XMLPARSEAPI(void) XML_SetNotationDeclHandler(XML_Parser parser, XML_NotationDeclHandler handler); XMLPARSEAPI(void) XML_SetNamespaceDeclHandler(XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end); XMLPARSEAPI(void) XML_SetStartNamespaceDeclHandler(XML_Parser parser, XML_StartNamespaceDeclHandler start); XMLPARSEAPI(void) XML_SetEndNamespaceDeclHandler(XML_Parser parser, XML_EndNamespaceDeclHandler end); XMLPARSEAPI(void) XML_SetNotStandaloneHandler(XML_Parser parser, XML_NotStandaloneHandler handler); XMLPARSEAPI(void) XML_SetExternalEntityRefHandler(XML_Parser parser, XML_ExternalEntityRefHandler handler); /* If a non-NULL value for arg is specified here, then it will be passed as the first argument to the external entity ref handler instead of the parser object. */ XMLPARSEAPI(void) XML_SetExternalEntityRefHandlerArg(XML_Parser parser, void *arg); XMLPARSEAPI(void) XML_SetSkippedEntityHandler(XML_Parser parser, XML_SkippedEntityHandler handler); XMLPARSEAPI(void) XML_SetUnknownEncodingHandler(XML_Parser parser, XML_UnknownEncodingHandler handler, void *encodingHandlerData); /* This can be called within a handler for a start element, end element, processing instruction or character data. It causes the corresponding markup to be passed to the default handler. */ XMLPARSEAPI(void) XML_DefaultCurrent(XML_Parser parser); /* If do_nst is non-zero, and namespace processing is in effect, and a name has a prefix (i.e. an explicit namespace qualifier) then that name is returned as a triplet in a single string separated by the separator character specified when the parser was created: URI + sep + local_name + sep + prefix. If do_nst is zero, then namespace information is returned in the default manner (URI + sep + local_name) whether or not the name has a prefix. Note: Calling XML_SetReturnNSTriplet after XML_Parse or XML_ParseBuffer has no effect. */ XMLPARSEAPI(void) XML_SetReturnNSTriplet(XML_Parser parser, int do_nst); /* This value is passed as the userData argument to callbacks. */ XMLPARSEAPI(void) XML_SetUserData(XML_Parser parser, void *userData); /* Returns the last value set by XML_SetUserData or NULL. */ #define XML_GetUserData(parser) (*(void **)(parser)) /* This is equivalent to supplying an encoding argument to XML_ParserCreate. On success XML_SetEncoding returns non-zero, zero otherwise. Note: Calling XML_SetEncoding after XML_Parse or XML_ParseBuffer has no effect and returns XML_STATUS_ERROR. */ XMLPARSEAPI(enum XML_Status) XML_SetEncoding(XML_Parser parser, const XML_Char *encoding); /* If this function is called, then the parser will be passed as the first argument to callbacks instead of userData. The userData will still be accessible using XML_GetUserData. */ XMLPARSEAPI(void) XML_UseParserAsHandlerArg(XML_Parser parser); /* If useDTD == XML_TRUE is passed to this function, then the parser will assume that there is an external subset, even if none is specified in the document. In such a case the parser will call the externalEntityRefHandler with a value of NULL for the systemId argument (the publicId and context arguments will be NULL as well). Note: For the purpose of checking WFC: Entity Declared, passing useDTD == XML_TRUE will make the parser behave as if the document had a DTD with an external subset. Note: If this function is called, then this must be done before the first call to XML_Parse or XML_ParseBuffer, since it will have no effect after that. Returns XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING. Note: If the document does not have a DOCTYPE declaration at all, then startDoctypeDeclHandler and endDoctypeDeclHandler will not be called, despite an external subset being parsed. Note: If XML_DTD is not defined when Expat is compiled, returns XML_ERROR_FEATURE_REQUIRES_XML_DTD. */ XMLPARSEAPI(enum XML_Error) XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD); /* Sets the base to be used for resolving relative URIs in system identifiers in declarations. Resolving relative identifiers is left to the application: this value will be passed through as the base argument to the XML_ExternalEntityRefHandler, XML_NotationDeclHandler and XML_UnparsedEntityDeclHandler. The base argument will be copied. Returns XML_STATUS_ERROR if out of memory, XML_STATUS_OK otherwise. */ XMLPARSEAPI(enum XML_Status) XML_SetBase(XML_Parser parser, const XML_Char *base); XMLPARSEAPI(const XML_Char *) XML_GetBase(XML_Parser parser); /* Returns the number of the attribute/value pairs passed in last call to the XML_StartElementHandler that were specified in the start-tag rather than defaulted. Each attribute/value pair counts as 2; thus this correspondds to an index into the atts array passed to the XML_StartElementHandler. */ XMLPARSEAPI(int) XML_GetSpecifiedAttributeCount(XML_Parser parser); /* Returns the index of the ID attribute passed in the last call to XML_StartElementHandler, or -1 if there is no ID attribute. Each attribute/value pair counts as 2; thus this correspondds to an index into the atts array passed to the XML_StartElementHandler. */ XMLPARSEAPI(int) XML_GetIdAttributeIndex(XML_Parser parser); #ifdef XML_ATTR_INFO /* Source file byte offsets for the start and end of attribute names and values. The value indices are exclusive of surrounding quotes; thus in a UTF-8 source file an attribute value of "blah" will yield: info->valueEnd - info->valueStart = 4 bytes. */ typedef struct { XML_Index nameStart; /* Offset to beginning of the attribute name. */ XML_Index nameEnd; /* Offset after the attribute name's last byte. */ XML_Index valueStart; /* Offset to beginning of the attribute value. */ XML_Index valueEnd; /* Offset after the attribute value's last byte. */ } XML_AttrInfo; /* Returns an array of XML_AttrInfo structures for the attribute/value pairs passed in last call to the XML_StartElementHandler that were specified in the start-tag rather than defaulted. Each attribute/value pair counts as 1; thus the number of entries in the array is XML_GetSpecifiedAttributeCount(parser) / 2. */ XMLPARSEAPI(const XML_AttrInfo *) XML_GetAttributeInfo(XML_Parser parser); #endif /* Parses some input. Returns XML_STATUS_ERROR if a fatal error is detected. The last call to XML_Parse must have isFinal true; len may be zero for this call (or any other). Though the return values for these functions has always been described as a Boolean value, the implementation, at least for the 1.95.x series, has always returned exactly one of the XML_Status values. */ XMLPARSEAPI(enum XML_Status) XML_Parse(XML_Parser parser, const char *s, int len, int isFinal); XMLPARSEAPI(void *) XML_GetBuffer(XML_Parser parser, int len); XMLPARSEAPI(enum XML_Status) XML_ParseBuffer(XML_Parser parser, int len, int isFinal); /* Stops parsing, causing XML_Parse() or XML_ParseBuffer() to return. Must be called from within a call-back handler, except when aborting (resumable = 0) an already suspended parser. Some call-backs may still follow because they would otherwise get lost. Examples: - endElementHandler() for empty elements when stopped in startElementHandler(), - endNameSpaceDeclHandler() when stopped in endElementHandler(), and possibly others. Can be called from most handlers, including DTD related call-backs, except when parsing an external parameter entity and resumable != 0. Returns XML_STATUS_OK when successful, XML_STATUS_ERROR otherwise. Possible error codes: - XML_ERROR_SUSPENDED: when suspending an already suspended parser. - XML_ERROR_FINISHED: when the parser has already finished. - XML_ERROR_SUSPEND_PE: when suspending while parsing an external PE. When resumable != 0 (true) then parsing is suspended, that is, XML_Parse() and XML_ParseBuffer() return XML_STATUS_SUSPENDED. Otherwise, parsing is aborted, that is, XML_Parse() and XML_ParseBuffer() return XML_STATUS_ERROR with error code XML_ERROR_ABORTED. *Note*: This will be applied to the current parser instance only, that is, if there is a parent parser then it will continue parsing when the externalEntityRefHandler() returns. It is up to the implementation of the externalEntityRefHandler() to call XML_StopParser() on the parent parser (recursively), if one wants to stop parsing altogether. When suspended, parsing can be resumed by calling XML_ResumeParser(). */ XMLPARSEAPI(enum XML_Status) XML_StopParser(XML_Parser parser, XML_Bool resumable); /* Resumes parsing after it has been suspended with XML_StopParser(). Must not be called from within a handler call-back. Returns same status codes as XML_Parse() or XML_ParseBuffer(). Additional error code XML_ERROR_NOT_SUSPENDED possible. *Note*: This must be called on the most deeply nested child parser instance first, and on its parent parser only after the child parser has finished, to be applied recursively until the document entity's parser is restarted. That is, the parent parser will not resume by itself and it is up to the application to call XML_ResumeParser() on it at the appropriate moment. */ XMLPARSEAPI(enum XML_Status) XML_ResumeParser(XML_Parser parser); enum XML_Parsing { XML_INITIALIZED, XML_PARSING, XML_FINISHED, XML_SUSPENDED }; typedef struct { enum XML_Parsing parsing; XML_Bool finalBuffer; } XML_ParsingStatus; /* Returns status of parser with respect to being initialized, parsing, finished, or suspended and processing the final buffer. XXX XML_Parse() and XML_ParseBuffer() should return XML_ParsingStatus, XXX with XML_FINISHED_OK or XML_FINISHED_ERROR replacing XML_FINISHED */ XMLPARSEAPI(void) XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status); /* Creates an XML_Parser object that can parse an external general entity; context is a '\0'-terminated string specifying the parse context; encoding is a '\0'-terminated string giving the name of the externally specified encoding, or NULL if there is no externally specified encoding. The context string consists of a sequence of tokens separated by formfeeds (\f); a token consisting of a name specifies that the general entity of the name is open; a token of the form prefix=uri specifies the namespace for a particular prefix; a token of the form =uri specifies the default namespace. This can be called at any point after the first call to an ExternalEntityRefHandler so longer as the parser has not yet been freed. The new parser is completely independent and may safely be used in a separate thread. The handlers and userData are initialized from the parser argument. Returns NULL if out of memory. Otherwise returns a new XML_Parser object. */ XMLPARSEAPI(XML_Parser) XML_ExternalEntityParserCreate(XML_Parser parser, const XML_Char *context, const XML_Char *encoding); enum XML_ParamEntityParsing { XML_PARAM_ENTITY_PARSING_NEVER, XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE, XML_PARAM_ENTITY_PARSING_ALWAYS }; /* Controls parsing of parameter entities (including the external DTD subset). If parsing of parameter entities is enabled, then references to external parameter entities (including the external DTD subset) will be passed to the handler set with XML_SetExternalEntityRefHandler. The context passed will be 0. Unlike external general entities, external parameter entities can only be parsed synchronously. If the external parameter entity is to be parsed, it must be parsed during the call to the external entity ref handler: the complete sequence of XML_ExternalEntityParserCreate, XML_Parse/XML_ParseBuffer and XML_ParserFree calls must be made during this call. After XML_ExternalEntityParserCreate has been called to create the parser for the external parameter entity (context must be 0 for this call), it is illegal to make any calls on the old parser until XML_ParserFree has been called on the newly created parser. If the library has been compiled without support for parameter entity parsing (ie without XML_DTD being defined), then XML_SetParamEntityParsing will return 0 if parsing of parameter entities is requested; otherwise it will return non-zero. Note: If XML_SetParamEntityParsing is called after XML_Parse or XML_ParseBuffer, then it has no effect and will always return 0. */ XMLPARSEAPI(int) XML_SetParamEntityParsing(XML_Parser parser, enum XML_ParamEntityParsing parsing); /* Sets the hash salt to use for internal hash calculations. Helps in preventing DoS attacks based on predicting hash function behavior. This must be called before parsing is started. Returns 1 if successful, 0 when called after parsing has started. */ XMLPARSEAPI(int) XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt); /* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then XML_GetErrorCode returns information about the error. */ XMLPARSEAPI(enum XML_Error) XML_GetErrorCode(XML_Parser parser); /* These functions return information about the current parse location. They may be called from any callback called to report some parse event; in this case the location is the location of the first of the sequence of characters that generated the event. When called from callbacks generated by declarations in the document prologue, the location identified isn't as neatly defined, but will be within the relevant markup. When called outside of the callback functions, the position indicated will be just past the last parse event (regardless of whether there was an associated callback). They may also be called after returning from a call to XML_Parse or XML_ParseBuffer. If the return value is XML_STATUS_ERROR then the location is the location of the character at which the error was detected; otherwise the location is the location of the last parse event, as described above. */ XMLPARSEAPI(XML_Size) XML_GetCurrentLineNumber(XML_Parser parser); XMLPARSEAPI(XML_Size) XML_GetCurrentColumnNumber(XML_Parser parser); XMLPARSEAPI(XML_Index) XML_GetCurrentByteIndex(XML_Parser parser); /* Return the number of bytes in the current event. Returns 0 if the event is in an internal entity. */ XMLPARSEAPI(int) XML_GetCurrentByteCount(XML_Parser parser); /* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets the integer pointed to by offset to the offset within this buffer of the current parse position, and sets the integer pointed to by size to the size of this buffer (the number of input bytes). Otherwise returns a NULL pointer. Also returns a NULL pointer if a parse isn't active. NOTE: The character pointer returned should not be used outside the handler that makes the call. */ XMLPARSEAPI(const char *) XML_GetInputContext(XML_Parser parser, int *offset, int *size); /* For backwards compatibility with previous versions. */ #define XML_GetErrorLineNumber XML_GetCurrentLineNumber #define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber #define XML_GetErrorByteIndex XML_GetCurrentByteIndex /* Frees the content model passed to the element declaration handler */ XMLPARSEAPI(void) XML_FreeContentModel(XML_Parser parser, XML_Content *model); /* Exposing the memory handling functions used in Expat */ XMLPARSEAPI(void *) XML_MemMalloc(XML_Parser parser, size_t size); XMLPARSEAPI(void *) XML_MemRealloc(XML_Parser parser, void *ptr, size_t size); XMLPARSEAPI(void) XML_MemFree(XML_Parser parser, void *ptr); /* Frees memory used by the parser. */ XMLPARSEAPI(void) XML_ParserFree(XML_Parser parser); /* Returns a string describing the error. */ XMLPARSEAPI(const XML_LChar *) XML_ErrorString(enum XML_Error code); /* Return a string containing the version number of this expat */ XMLPARSEAPI(const XML_LChar *) XML_ExpatVersion(void); typedef struct { int major; int minor; int micro; } XML_Expat_Version; /* Return an XML_Expat_Version structure containing numeric version number information for this version of expat. */ XMLPARSEAPI(XML_Expat_Version) XML_ExpatVersionInfo(void); /* Added in Expat 1.95.5. */ enum XML_FeatureEnum { XML_FEATURE_END = 0, XML_FEATURE_UNICODE, XML_FEATURE_UNICODE_WCHAR_T, XML_FEATURE_DTD, XML_FEATURE_CONTEXT_BYTES, XML_FEATURE_MIN_SIZE, XML_FEATURE_SIZEOF_XML_CHAR, XML_FEATURE_SIZEOF_XML_LCHAR, XML_FEATURE_NS, XML_FEATURE_LARGE_SIZE, XML_FEATURE_ATTR_INFO /* Additional features must be added to the end of this enum. */ }; typedef struct { enum XML_FeatureEnum feature; const XML_LChar *name; long int value; } XML_Feature; XMLPARSEAPI(const XML_Feature *) XML_GetFeatureList(void); /* Expat follows the GNU/Linux convention of odd number minor version for beta/development releases and even number minor version for stable releases. Micro is bumped with each release, and set to 0 with each change to major or minor version. */ #define XML_MAJOR_VERSION 2 #define XML_MINOR_VERSION 1 #define XML_MICRO_VERSION 0 #ifdef __cplusplus } #endif #endif /* not Expat_INCLUDED */ astropy-1.1.1/cextern/expat/lib/xmltok_ns.c0000755001134200020070000000611012602615516021645 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ /* This file is included! */ #ifdef XML_TOK_NS_C const ENCODING * NS(XmlGetUtf8InternalEncoding)(void) { return &ns(internal_utf8_encoding).enc; } const ENCODING * NS(XmlGetUtf16InternalEncoding)(void) { #if BYTEORDER == 1234 return &ns(internal_little2_encoding).enc; #elif BYTEORDER == 4321 return &ns(internal_big2_encoding).enc; #else const short n = 1; return (*(const char *)&n ? &ns(internal_little2_encoding).enc : &ns(internal_big2_encoding).enc); #endif } static const ENCODING * const NS(encodings)[] = { &ns(latin1_encoding).enc, &ns(ascii_encoding).enc, &ns(utf8_encoding).enc, &ns(big2_encoding).enc, &ns(big2_encoding).enc, &ns(little2_encoding).enc, &ns(utf8_encoding).enc /* NO_ENC */ }; static int PTRCALL NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_PROLOG_STATE, ptr, end, nextTokPtr); } static int PTRCALL NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_CONTENT_STATE, ptr, end, nextTokPtr); } int NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr, const char *name) { int i = getEncodingIndex(name); if (i == UNKNOWN_ENC) return 0; SET_INIT_ENC_INDEX(p, i); p->initEnc.scanners[XML_PROLOG_STATE] = NS(initScanProlog); p->initEnc.scanners[XML_CONTENT_STATE] = NS(initScanContent); p->initEnc.updatePosition = initUpdatePosition; p->encPtr = encPtr; *encPtr = &(p->initEnc); return 1; } static const ENCODING * NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end) { #define ENCODING_MAX 128 char buf[ENCODING_MAX]; char *p = buf; int i; XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1); if (ptr != end) return 0; *p = 0; if (streqci(buf, KW_UTF_16) && enc->minBytesPerChar == 2) return enc; i = getEncodingIndex(buf); if (i == UNKNOWN_ENC) return 0; return NS(encodings)[i]; } int NS(XmlParseXmlDecl)(int isGeneralTextEntity, const ENCODING *enc, const char *ptr, const char *end, const char **badPtr, const char **versionPtr, const char **versionEndPtr, const char **encodingName, const ENCODING **encoding, int *standalone) { return doParseXmlDecl(NS(findEncoding), isGeneralTextEntity, enc, ptr, end, badPtr, versionPtr, versionEndPtr, encodingName, encoding, standalone); } #endif /* XML_TOK_NS_C */ astropy-1.1.1/cextern/expat/lib/asciitab.h0000755001134200020070000000334012602615516021415 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ /* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML, /* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML, /* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM, /* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS, /* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS, /* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL, /* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, /* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, /* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI, /* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST, /* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, /* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, /* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB, /* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT, /* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, /* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, /* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, /* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER, astropy-1.1.1/cextern/expat/lib/xmltok.c0000755001134200020070000012067512602615516021162 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #include #ifdef COMPILED_FROM_DSP #include "winconfig.h" #elif defined(MACOS_CLASSIC) #include "macconfig.h" #elif defined(__amigaos__) #include "amigaconfig.h" #elif defined(__WATCOMC__) #include "watcomconfig.h" #else #ifdef HAVE_EXPAT_CONFIG_H #include #endif #endif /* ndef COMPILED_FROM_DSP */ #include "expat_external.h" #include "internal.h" #include "xmltok.h" #include "nametab.h" #ifdef XML_DTD #define IGNORE_SECTION_TOK_VTABLE , PREFIX(ignoreSectionTok) #else #define IGNORE_SECTION_TOK_VTABLE /* as nothing */ #endif #define VTABLE1 \ { PREFIX(prologTok), PREFIX(contentTok), \ PREFIX(cdataSectionTok) IGNORE_SECTION_TOK_VTABLE }, \ { PREFIX(attributeValueTok), PREFIX(entityValueTok) }, \ PREFIX(sameName), \ PREFIX(nameMatchesAscii), \ PREFIX(nameLength), \ PREFIX(skipS), \ PREFIX(getAtts), \ PREFIX(charRefNumber), \ PREFIX(predefinedEntityName), \ PREFIX(updatePosition), \ PREFIX(isPublicId) #define VTABLE VTABLE1, PREFIX(toUtf8), PREFIX(toUtf16) #define UCS2_GET_NAMING(pages, hi, lo) \ (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1 << ((lo) & 0x1F))) /* A 2 byte UTF-8 representation splits the characters 11 bits between the bottom 5 and 6 bits of the bytes. We need 8 bits to index into pages, 3 bits to add to that index and 5 bits to generate the mask. */ #define UTF8_GET_NAMING2(pages, byte) \ (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3) \ + ((((byte)[0]) & 3) << 1) \ + ((((byte)[1]) >> 5) & 1)] \ & (1 << (((byte)[1]) & 0x1F))) /* A 3 byte UTF-8 representation splits the characters 16 bits between the bottom 4, 6 and 6 bits of the bytes. We need 8 bits to index into pages, 3 bits to add to that index and 5 bits to generate the mask. */ #define UTF8_GET_NAMING3(pages, byte) \ (namingBitmap[((pages)[((((byte)[0]) & 0xF) << 4) \ + ((((byte)[1]) >> 2) & 0xF)] \ << 3) \ + ((((byte)[1]) & 3) << 1) \ + ((((byte)[2]) >> 5) & 1)] \ & (1 << (((byte)[2]) & 0x1F))) #define UTF8_GET_NAMING(pages, p, n) \ ((n) == 2 \ ? UTF8_GET_NAMING2(pages, (const unsigned char *)(p)) \ : ((n) == 3 \ ? UTF8_GET_NAMING3(pages, (const unsigned char *)(p)) \ : 0)) /* Detection of invalid UTF-8 sequences is based on Table 3.1B of Unicode 3.2: http://www.unicode.org/unicode/reports/tr28/ with the additional restriction of not allowing the Unicode code points 0xFFFF and 0xFFFE (sequences EF,BF,BF and EF,BF,BE). Implementation details: (A & 0x80) == 0 means A < 0x80 and (A & 0xC0) == 0xC0 means A > 0xBF */ #define UTF8_INVALID2(p) \ ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0) #define UTF8_INVALID3(p) \ (((p)[2] & 0x80) == 0 \ || \ ((*p) == 0xEF && (p)[1] == 0xBF \ ? \ (p)[2] > 0xBD \ : \ ((p)[2] & 0xC0) == 0xC0) \ || \ ((*p) == 0xE0 \ ? \ (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0 \ : \ ((p)[1] & 0x80) == 0 \ || \ ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0))) #define UTF8_INVALID4(p) \ (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 \ || \ ((p)[2] & 0x80) == 0 || ((p)[2] & 0xC0) == 0xC0 \ || \ ((*p) == 0xF0 \ ? \ (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0 \ : \ ((p)[1] & 0x80) == 0 \ || \ ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0))) static int PTRFASTCALL isNever(const ENCODING *enc, const char *p) { return 0; } static int PTRFASTCALL utf8_isName2(const ENCODING *enc, const char *p) { return UTF8_GET_NAMING2(namePages, (const unsigned char *)p); } static int PTRFASTCALL utf8_isName3(const ENCODING *enc, const char *p) { return UTF8_GET_NAMING3(namePages, (const unsigned char *)p); } #define utf8_isName4 isNever static int PTRFASTCALL utf8_isNmstrt2(const ENCODING *enc, const char *p) { return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p); } static int PTRFASTCALL utf8_isNmstrt3(const ENCODING *enc, const char *p) { return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p); } #define utf8_isNmstrt4 isNever static int PTRFASTCALL utf8_isInvalid2(const ENCODING *enc, const char *p) { return UTF8_INVALID2((const unsigned char *)p); } static int PTRFASTCALL utf8_isInvalid3(const ENCODING *enc, const char *p) { return UTF8_INVALID3((const unsigned char *)p); } static int PTRFASTCALL utf8_isInvalid4(const ENCODING *enc, const char *p) { return UTF8_INVALID4((const unsigned char *)p); } struct normal_encoding { ENCODING enc; unsigned char type[256]; #ifdef XML_MIN_SIZE int (PTRFASTCALL *byteType)(const ENCODING *, const char *); int (PTRFASTCALL *isNameMin)(const ENCODING *, const char *); int (PTRFASTCALL *isNmstrtMin)(const ENCODING *, const char *); int (PTRFASTCALL *byteToAscii)(const ENCODING *, const char *); int (PTRCALL *charMatches)(const ENCODING *, const char *, int); #endif /* XML_MIN_SIZE */ int (PTRFASTCALL *isName2)(const ENCODING *, const char *); int (PTRFASTCALL *isName3)(const ENCODING *, const char *); int (PTRFASTCALL *isName4)(const ENCODING *, const char *); int (PTRFASTCALL *isNmstrt2)(const ENCODING *, const char *); int (PTRFASTCALL *isNmstrt3)(const ENCODING *, const char *); int (PTRFASTCALL *isNmstrt4)(const ENCODING *, const char *); int (PTRFASTCALL *isInvalid2)(const ENCODING *, const char *); int (PTRFASTCALL *isInvalid3)(const ENCODING *, const char *); int (PTRFASTCALL *isInvalid4)(const ENCODING *, const char *); }; #define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *) (enc)) #ifdef XML_MIN_SIZE #define STANDARD_VTABLE(E) \ E ## byteType, \ E ## isNameMin, \ E ## isNmstrtMin, \ E ## byteToAscii, \ E ## charMatches, #else #define STANDARD_VTABLE(E) /* as nothing */ #endif #define NORMAL_VTABLE(E) \ E ## isName2, \ E ## isName3, \ E ## isName4, \ E ## isNmstrt2, \ E ## isNmstrt3, \ E ## isNmstrt4, \ E ## isInvalid2, \ E ## isInvalid3, \ E ## isInvalid4 static int FASTCALL checkCharRefNumber(int); #include "xmltok_impl.h" #include "ascii.h" #ifdef XML_MIN_SIZE #define sb_isNameMin isNever #define sb_isNmstrtMin isNever #endif #ifdef XML_MIN_SIZE #define MINBPC(enc) ((enc)->minBytesPerChar) #else /* minimum bytes per character */ #define MINBPC(enc) 1 #endif #define SB_BYTE_TYPE(enc, p) \ (((struct normal_encoding *)(enc))->type[(unsigned char)*(p)]) #ifdef XML_MIN_SIZE static int PTRFASTCALL sb_byteType(const ENCODING *enc, const char *p) { return SB_BYTE_TYPE(enc, p); } #define BYTE_TYPE(enc, p) \ (AS_NORMAL_ENCODING(enc)->byteType(enc, p)) #else #define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p) #endif #ifdef XML_MIN_SIZE #define BYTE_TO_ASCII(enc, p) \ (AS_NORMAL_ENCODING(enc)->byteToAscii(enc, p)) static int PTRFASTCALL sb_byteToAscii(const ENCODING *enc, const char *p) { return *p; } #else #define BYTE_TO_ASCII(enc, p) (*(p)) #endif #define IS_NAME_CHAR(enc, p, n) \ (AS_NORMAL_ENCODING(enc)->isName ## n(enc, p)) #define IS_NMSTRT_CHAR(enc, p, n) \ (AS_NORMAL_ENCODING(enc)->isNmstrt ## n(enc, p)) #define IS_INVALID_CHAR(enc, p, n) \ (AS_NORMAL_ENCODING(enc)->isInvalid ## n(enc, p)) #ifdef XML_MIN_SIZE #define IS_NAME_CHAR_MINBPC(enc, p) \ (AS_NORMAL_ENCODING(enc)->isNameMin(enc, p)) #define IS_NMSTRT_CHAR_MINBPC(enc, p) \ (AS_NORMAL_ENCODING(enc)->isNmstrtMin(enc, p)) #else #define IS_NAME_CHAR_MINBPC(enc, p) (0) #define IS_NMSTRT_CHAR_MINBPC(enc, p) (0) #endif #ifdef XML_MIN_SIZE #define CHAR_MATCHES(enc, p, c) \ (AS_NORMAL_ENCODING(enc)->charMatches(enc, p, c)) static int PTRCALL sb_charMatches(const ENCODING *enc, const char *p, int c) { return *p == c; } #else /* c is an ASCII character */ #define CHAR_MATCHES(enc, p, c) (*(p) == c) #endif #define PREFIX(ident) normal_ ## ident #define XML_TOK_IMPL_C #include "xmltok_impl.c" #undef XML_TOK_IMPL_C #undef MINBPC #undef BYTE_TYPE #undef BYTE_TO_ASCII #undef CHAR_MATCHES #undef IS_NAME_CHAR #undef IS_NAME_CHAR_MINBPC #undef IS_NMSTRT_CHAR #undef IS_NMSTRT_CHAR_MINBPC #undef IS_INVALID_CHAR enum { /* UTF8_cvalN is value of masked first byte of N byte sequence */ UTF8_cval1 = 0x00, UTF8_cval2 = 0xc0, UTF8_cval3 = 0xe0, UTF8_cval4 = 0xf0 }; static void PTRCALL utf8_toUtf8(const ENCODING *enc, const char **fromP, const char *fromLim, char **toP, const char *toLim) { char *to; const char *from; if (fromLim - *fromP > toLim - *toP) { /* Avoid copying partial characters. */ for (fromLim = *fromP + (toLim - *toP); fromLim > *fromP; fromLim--) if (((unsigned char)fromLim[-1] & 0xc0) != 0x80) break; } for (to = *toP, from = *fromP; from != fromLim; from++, to++) *to = *from; *fromP = from; *toP = to; } static void PTRCALL utf8_toUtf16(const ENCODING *enc, const char **fromP, const char *fromLim, unsigned short **toP, const unsigned short *toLim) { unsigned short *to = *toP; const char *from = *fromP; while (from != fromLim && to != toLim) { switch (((struct normal_encoding *)enc)->type[(unsigned char)*from]) { case BT_LEAD2: *to++ = (unsigned short)(((from[0] & 0x1f) << 6) | (from[1] & 0x3f)); from += 2; break; case BT_LEAD3: *to++ = (unsigned short)(((from[0] & 0xf) << 12) | ((from[1] & 0x3f) << 6) | (from[2] & 0x3f)); from += 3; break; case BT_LEAD4: { unsigned long n; if (to + 1 == toLim) goto after; n = ((from[0] & 0x7) << 18) | ((from[1] & 0x3f) << 12) | ((from[2] & 0x3f) << 6) | (from[3] & 0x3f); n -= 0x10000; to[0] = (unsigned short)((n >> 10) | 0xD800); to[1] = (unsigned short)((n & 0x3FF) | 0xDC00); to += 2; from += 4; } break; default: *to++ = *from++; break; } } after: *fromP = from; *toP = to; } #ifdef XML_NS static const struct normal_encoding utf8_encoding_ns = { { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 }, { #include "asciitab.h" #include "utf8tab.h" }, STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_) }; #endif static const struct normal_encoding utf8_encoding = { { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 }, { #define BT_COLON BT_NMSTRT #include "asciitab.h" #undef BT_COLON #include "utf8tab.h" }, STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_) }; #ifdef XML_NS static const struct normal_encoding internal_utf8_encoding_ns = { { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 }, { #include "iasciitab.h" #include "utf8tab.h" }, STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_) }; #endif static const struct normal_encoding internal_utf8_encoding = { { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 }, { #define BT_COLON BT_NMSTRT #include "iasciitab.h" #undef BT_COLON #include "utf8tab.h" }, STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_) }; static void PTRCALL latin1_toUtf8(const ENCODING *enc, const char **fromP, const char *fromLim, char **toP, const char *toLim) { for (;;) { unsigned char c; if (*fromP == fromLim) break; c = (unsigned char)**fromP; if (c & 0x80) { if (toLim - *toP < 2) break; *(*toP)++ = (char)((c >> 6) | UTF8_cval2); *(*toP)++ = (char)((c & 0x3f) | 0x80); (*fromP)++; } else { if (*toP == toLim) break; *(*toP)++ = *(*fromP)++; } } } static void PTRCALL latin1_toUtf16(const ENCODING *enc, const char **fromP, const char *fromLim, unsigned short **toP, const unsigned short *toLim) { while (*fromP != fromLim && *toP != toLim) *(*toP)++ = (unsigned char)*(*fromP)++; } #ifdef XML_NS static const struct normal_encoding latin1_encoding_ns = { { VTABLE1, latin1_toUtf8, latin1_toUtf16, 1, 0, 0 }, { #include "asciitab.h" #include "latin1tab.h" }, STANDARD_VTABLE(sb_) }; #endif static const struct normal_encoding latin1_encoding = { { VTABLE1, latin1_toUtf8, latin1_toUtf16, 1, 0, 0 }, { #define BT_COLON BT_NMSTRT #include "asciitab.h" #undef BT_COLON #include "latin1tab.h" }, STANDARD_VTABLE(sb_) }; static void PTRCALL ascii_toUtf8(const ENCODING *enc, const char **fromP, const char *fromLim, char **toP, const char *toLim) { while (*fromP != fromLim && *toP != toLim) *(*toP)++ = *(*fromP)++; } #ifdef XML_NS static const struct normal_encoding ascii_encoding_ns = { { VTABLE1, ascii_toUtf8, latin1_toUtf16, 1, 1, 0 }, { #include "asciitab.h" /* BT_NONXML == 0 */ }, STANDARD_VTABLE(sb_) }; #endif static const struct normal_encoding ascii_encoding = { { VTABLE1, ascii_toUtf8, latin1_toUtf16, 1, 1, 0 }, { #define BT_COLON BT_NMSTRT #include "asciitab.h" #undef BT_COLON /* BT_NONXML == 0 */ }, STANDARD_VTABLE(sb_) }; static int PTRFASTCALL unicode_byte_type(char hi, char lo) { switch ((unsigned char)hi) { case 0xD8: case 0xD9: case 0xDA: case 0xDB: return BT_LEAD4; case 0xDC: case 0xDD: case 0xDE: case 0xDF: return BT_TRAIL; case 0xFF: switch ((unsigned char)lo) { case 0xFF: case 0xFE: return BT_NONXML; } break; } return BT_NONASCII; } #define DEFINE_UTF16_TO_UTF8(E) \ static void PTRCALL \ E ## toUtf8(const ENCODING *enc, \ const char **fromP, const char *fromLim, \ char **toP, const char *toLim) \ { \ const char *from; \ for (from = *fromP; from != fromLim; from += 2) { \ int plane; \ unsigned char lo2; \ unsigned char lo = GET_LO(from); \ unsigned char hi = GET_HI(from); \ switch (hi) { \ case 0: \ if (lo < 0x80) { \ if (*toP == toLim) { \ *fromP = from; \ return; \ } \ *(*toP)++ = lo; \ break; \ } \ /* fall through */ \ case 0x1: case 0x2: case 0x3: \ case 0x4: case 0x5: case 0x6: case 0x7: \ if (toLim - *toP < 2) { \ *fromP = from; \ return; \ } \ *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2); \ *(*toP)++ = ((lo & 0x3f) | 0x80); \ break; \ default: \ if (toLim - *toP < 3) { \ *fromP = from; \ return; \ } \ /* 16 bits divided 4, 6, 6 amongst 3 bytes */ \ *(*toP)++ = ((hi >> 4) | UTF8_cval3); \ *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80); \ *(*toP)++ = ((lo & 0x3f) | 0x80); \ break; \ case 0xD8: case 0xD9: case 0xDA: case 0xDB: \ if (toLim - *toP < 4) { \ *fromP = from; \ return; \ } \ plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1; \ *(*toP)++ = ((plane >> 2) | UTF8_cval4); \ *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80); \ from += 2; \ lo2 = GET_LO(from); \ *(*toP)++ = (((lo & 0x3) << 4) \ | ((GET_HI(from) & 0x3) << 2) \ | (lo2 >> 6) \ | 0x80); \ *(*toP)++ = ((lo2 & 0x3f) | 0x80); \ break; \ } \ } \ *fromP = from; \ } #define DEFINE_UTF16_TO_UTF16(E) \ static void PTRCALL \ E ## toUtf16(const ENCODING *enc, \ const char **fromP, const char *fromLim, \ unsigned short **toP, const unsigned short *toLim) \ { \ /* Avoid copying first half only of surrogate */ \ if (fromLim - *fromP > ((toLim - *toP) << 1) \ && (GET_HI(fromLim - 2) & 0xF8) == 0xD8) \ fromLim -= 2; \ for (; *fromP != fromLim && *toP != toLim; *fromP += 2) \ *(*toP)++ = (GET_HI(*fromP) << 8) | GET_LO(*fromP); \ } #define SET2(ptr, ch) \ (((ptr)[0] = ((ch) & 0xff)), ((ptr)[1] = ((ch) >> 8))) #define GET_LO(ptr) ((unsigned char)(ptr)[0]) #define GET_HI(ptr) ((unsigned char)(ptr)[1]) DEFINE_UTF16_TO_UTF8(little2_) DEFINE_UTF16_TO_UTF16(little2_) #undef SET2 #undef GET_LO #undef GET_HI #define SET2(ptr, ch) \ (((ptr)[0] = ((ch) >> 8)), ((ptr)[1] = ((ch) & 0xFF))) #define GET_LO(ptr) ((unsigned char)(ptr)[1]) #define GET_HI(ptr) ((unsigned char)(ptr)[0]) DEFINE_UTF16_TO_UTF8(big2_) DEFINE_UTF16_TO_UTF16(big2_) #undef SET2 #undef GET_LO #undef GET_HI #define LITTLE2_BYTE_TYPE(enc, p) \ ((p)[1] == 0 \ ? ((struct normal_encoding *)(enc))->type[(unsigned char)*(p)] \ : unicode_byte_type((p)[1], (p)[0])) #define LITTLE2_BYTE_TO_ASCII(enc, p) ((p)[1] == 0 ? (p)[0] : -1) #define LITTLE2_CHAR_MATCHES(enc, p, c) ((p)[1] == 0 && (p)[0] == c) #define LITTLE2_IS_NAME_CHAR_MINBPC(enc, p) \ UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0]) #define LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p) \ UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0]) #ifdef XML_MIN_SIZE static int PTRFASTCALL little2_byteType(const ENCODING *enc, const char *p) { return LITTLE2_BYTE_TYPE(enc, p); } static int PTRFASTCALL little2_byteToAscii(const ENCODING *enc, const char *p) { return LITTLE2_BYTE_TO_ASCII(enc, p); } static int PTRCALL little2_charMatches(const ENCODING *enc, const char *p, int c) { return LITTLE2_CHAR_MATCHES(enc, p, c); } static int PTRFASTCALL little2_isNameMin(const ENCODING *enc, const char *p) { return LITTLE2_IS_NAME_CHAR_MINBPC(enc, p); } static int PTRFASTCALL little2_isNmstrtMin(const ENCODING *enc, const char *p) { return LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p); } #undef VTABLE #define VTABLE VTABLE1, little2_toUtf8, little2_toUtf16 #else /* not XML_MIN_SIZE */ #undef PREFIX #define PREFIX(ident) little2_ ## ident #define MINBPC(enc) 2 /* CHAR_MATCHES is guaranteed to have MINBPC bytes available. */ #define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p) #define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(enc, p) #define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(enc, p, c) #define IS_NAME_CHAR(enc, p, n) 0 #define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(enc, p) #define IS_NMSTRT_CHAR(enc, p, n) (0) #define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p) #define XML_TOK_IMPL_C #include "xmltok_impl.c" #undef XML_TOK_IMPL_C #undef MINBPC #undef BYTE_TYPE #undef BYTE_TO_ASCII #undef CHAR_MATCHES #undef IS_NAME_CHAR #undef IS_NAME_CHAR_MINBPC #undef IS_NMSTRT_CHAR #undef IS_NMSTRT_CHAR_MINBPC #undef IS_INVALID_CHAR #endif /* not XML_MIN_SIZE */ #ifdef XML_NS static const struct normal_encoding little2_encoding_ns = { { VTABLE, 2, 0, #if BYTEORDER == 1234 1 #else 0 #endif }, { #include "asciitab.h" #include "latin1tab.h" }, STANDARD_VTABLE(little2_) }; #endif static const struct normal_encoding little2_encoding = { { VTABLE, 2, 0, #if BYTEORDER == 1234 1 #else 0 #endif }, { #define BT_COLON BT_NMSTRT #include "asciitab.h" #undef BT_COLON #include "latin1tab.h" }, STANDARD_VTABLE(little2_) }; #if BYTEORDER != 4321 #ifdef XML_NS static const struct normal_encoding internal_little2_encoding_ns = { { VTABLE, 2, 0, 1 }, { #include "iasciitab.h" #include "latin1tab.h" }, STANDARD_VTABLE(little2_) }; #endif static const struct normal_encoding internal_little2_encoding = { { VTABLE, 2, 0, 1 }, { #define BT_COLON BT_NMSTRT #include "iasciitab.h" #undef BT_COLON #include "latin1tab.h" }, STANDARD_VTABLE(little2_) }; #endif #define BIG2_BYTE_TYPE(enc, p) \ ((p)[0] == 0 \ ? ((struct normal_encoding *)(enc))->type[(unsigned char)(p)[1]] \ : unicode_byte_type((p)[0], (p)[1])) #define BIG2_BYTE_TO_ASCII(enc, p) ((p)[0] == 0 ? (p)[1] : -1) #define BIG2_CHAR_MATCHES(enc, p, c) ((p)[0] == 0 && (p)[1] == c) #define BIG2_IS_NAME_CHAR_MINBPC(enc, p) \ UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1]) #define BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p) \ UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1]) #ifdef XML_MIN_SIZE static int PTRFASTCALL big2_byteType(const ENCODING *enc, const char *p) { return BIG2_BYTE_TYPE(enc, p); } static int PTRFASTCALL big2_byteToAscii(const ENCODING *enc, const char *p) { return BIG2_BYTE_TO_ASCII(enc, p); } static int PTRCALL big2_charMatches(const ENCODING *enc, const char *p, int c) { return BIG2_CHAR_MATCHES(enc, p, c); } static int PTRFASTCALL big2_isNameMin(const ENCODING *enc, const char *p) { return BIG2_IS_NAME_CHAR_MINBPC(enc, p); } static int PTRFASTCALL big2_isNmstrtMin(const ENCODING *enc, const char *p) { return BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p); } #undef VTABLE #define VTABLE VTABLE1, big2_toUtf8, big2_toUtf16 #else /* not XML_MIN_SIZE */ #undef PREFIX #define PREFIX(ident) big2_ ## ident #define MINBPC(enc) 2 /* CHAR_MATCHES is guaranteed to have MINBPC bytes available. */ #define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p) #define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(enc, p) #define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(enc, p, c) #define IS_NAME_CHAR(enc, p, n) 0 #define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(enc, p) #define IS_NMSTRT_CHAR(enc, p, n) (0) #define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p) #define XML_TOK_IMPL_C #include "xmltok_impl.c" #undef XML_TOK_IMPL_C #undef MINBPC #undef BYTE_TYPE #undef BYTE_TO_ASCII #undef CHAR_MATCHES #undef IS_NAME_CHAR #undef IS_NAME_CHAR_MINBPC #undef IS_NMSTRT_CHAR #undef IS_NMSTRT_CHAR_MINBPC #undef IS_INVALID_CHAR #endif /* not XML_MIN_SIZE */ #ifdef XML_NS static const struct normal_encoding big2_encoding_ns = { { VTABLE, 2, 0, #if BYTEORDER == 4321 1 #else 0 #endif }, { #include "asciitab.h" #include "latin1tab.h" }, STANDARD_VTABLE(big2_) }; #endif static const struct normal_encoding big2_encoding = { { VTABLE, 2, 0, #if BYTEORDER == 4321 1 #else 0 #endif }, { #define BT_COLON BT_NMSTRT #include "asciitab.h" #undef BT_COLON #include "latin1tab.h" }, STANDARD_VTABLE(big2_) }; #if BYTEORDER != 1234 #ifdef XML_NS static const struct normal_encoding internal_big2_encoding_ns = { { VTABLE, 2, 0, 1 }, { #include "iasciitab.h" #include "latin1tab.h" }, STANDARD_VTABLE(big2_) }; #endif static const struct normal_encoding internal_big2_encoding = { { VTABLE, 2, 0, 1 }, { #define BT_COLON BT_NMSTRT #include "iasciitab.h" #undef BT_COLON #include "latin1tab.h" }, STANDARD_VTABLE(big2_) }; #endif #undef PREFIX static int FASTCALL streqci(const char *s1, const char *s2) { for (;;) { char c1 = *s1++; char c2 = *s2++; if (ASCII_a <= c1 && c1 <= ASCII_z) c1 += ASCII_A - ASCII_a; if (ASCII_a <= c2 && c2 <= ASCII_z) c2 += ASCII_A - ASCII_a; if (c1 != c2) return 0; if (!c1) break; } return 1; } static void PTRCALL initUpdatePosition(const ENCODING *enc, const char *ptr, const char *end, POSITION *pos) { normal_updatePosition(&utf8_encoding.enc, ptr, end, pos); } static int toAscii(const ENCODING *enc, const char *ptr, const char *end) { char buf[1]; char *p = buf; XmlUtf8Convert(enc, &ptr, end, &p, p + 1); if (p == buf) return -1; else return buf[0]; } static int FASTCALL isSpace(int c) { switch (c) { case 0x20: case 0xD: case 0xA: case 0x9: return 1; } return 0; } /* Return 1 if there's just optional white space or there's an S followed by name=val. */ static int parsePseudoAttribute(const ENCODING *enc, const char *ptr, const char *end, const char **namePtr, const char **nameEndPtr, const char **valPtr, const char **nextTokPtr) { int c; char open; if (ptr == end) { *namePtr = NULL; return 1; } if (!isSpace(toAscii(enc, ptr, end))) { *nextTokPtr = ptr; return 0; } do { ptr += enc->minBytesPerChar; } while (isSpace(toAscii(enc, ptr, end))); if (ptr == end) { *namePtr = NULL; return 1; } *namePtr = ptr; for (;;) { c = toAscii(enc, ptr, end); if (c == -1) { *nextTokPtr = ptr; return 0; } if (c == ASCII_EQUALS) { *nameEndPtr = ptr; break; } if (isSpace(c)) { *nameEndPtr = ptr; do { ptr += enc->minBytesPerChar; } while (isSpace(c = toAscii(enc, ptr, end))); if (c != ASCII_EQUALS) { *nextTokPtr = ptr; return 0; } break; } ptr += enc->minBytesPerChar; } if (ptr == *namePtr) { *nextTokPtr = ptr; return 0; } ptr += enc->minBytesPerChar; c = toAscii(enc, ptr, end); while (isSpace(c)) { ptr += enc->minBytesPerChar; c = toAscii(enc, ptr, end); } if (c != ASCII_QUOT && c != ASCII_APOS) { *nextTokPtr = ptr; return 0; } open = (char)c; ptr += enc->minBytesPerChar; *valPtr = ptr; for (;; ptr += enc->minBytesPerChar) { c = toAscii(enc, ptr, end); if (c == open) break; if (!(ASCII_a <= c && c <= ASCII_z) && !(ASCII_A <= c && c <= ASCII_Z) && !(ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD && c != ASCII_MINUS && c != ASCII_UNDERSCORE) { *nextTokPtr = ptr; return 0; } } *nextTokPtr = ptr + enc->minBytesPerChar; return 1; } static const char KW_version[] = { ASCII_v, ASCII_e, ASCII_r, ASCII_s, ASCII_i, ASCII_o, ASCII_n, '\0' }; static const char KW_encoding[] = { ASCII_e, ASCII_n, ASCII_c, ASCII_o, ASCII_d, ASCII_i, ASCII_n, ASCII_g, '\0' }; static const char KW_standalone[] = { ASCII_s, ASCII_t, ASCII_a, ASCII_n, ASCII_d, ASCII_a, ASCII_l, ASCII_o, ASCII_n, ASCII_e, '\0' }; static const char KW_yes[] = { ASCII_y, ASCII_e, ASCII_s, '\0' }; static const char KW_no[] = { ASCII_n, ASCII_o, '\0' }; static int doParseXmlDecl(const ENCODING *(*encodingFinder)(const ENCODING *, const char *, const char *), int isGeneralTextEntity, const ENCODING *enc, const char *ptr, const char *end, const char **badPtr, const char **versionPtr, const char **versionEndPtr, const char **encodingName, const ENCODING **encoding, int *standalone) { const char *val = NULL; const char *name = NULL; const char *nameEnd = NULL; ptr += 5 * enc->minBytesPerChar; end -= 2 * enc->minBytesPerChar; if (!parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr) || !name) { *badPtr = ptr; return 0; } if (!XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) { if (!isGeneralTextEntity) { *badPtr = name; return 0; } } else { if (versionPtr) *versionPtr = val; if (versionEndPtr) *versionEndPtr = ptr; if (!parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) { *badPtr = ptr; return 0; } if (!name) { if (isGeneralTextEntity) { /* a TextDecl must have an EncodingDecl */ *badPtr = ptr; return 0; } return 1; } } if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) { int c = toAscii(enc, val, end); if (!(ASCII_a <= c && c <= ASCII_z) && !(ASCII_A <= c && c <= ASCII_Z)) { *badPtr = val; return 0; } if (encodingName) *encodingName = val; if (encoding) *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar); if (!parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) { *badPtr = ptr; return 0; } if (!name) return 1; } if (!XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone) || isGeneralTextEntity) { *badPtr = name; return 0; } if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) { if (standalone) *standalone = 1; } else if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_no)) { if (standalone) *standalone = 0; } else { *badPtr = val; return 0; } while (isSpace(toAscii(enc, ptr, end))) ptr += enc->minBytesPerChar; if (ptr != end) { *badPtr = ptr; return 0; } return 1; } static int FASTCALL checkCharRefNumber(int result) { switch (result >> 8) { case 0xD8: case 0xD9: case 0xDA: case 0xDB: case 0xDC: case 0xDD: case 0xDE: case 0xDF: return -1; case 0: if (latin1_encoding.type[result] == BT_NONXML) return -1; break; case 0xFF: if (result == 0xFFFE || result == 0xFFFF) return -1; break; } return result; } int FASTCALL XmlUtf8Encode(int c, char *buf) { enum { /* minN is minimum legal resulting value for N byte sequence */ min2 = 0x80, min3 = 0x800, min4 = 0x10000 }; if (c < 0) return 0; if (c < min2) { buf[0] = (char)(c | UTF8_cval1); return 1; } if (c < min3) { buf[0] = (char)((c >> 6) | UTF8_cval2); buf[1] = (char)((c & 0x3f) | 0x80); return 2; } if (c < min4) { buf[0] = (char)((c >> 12) | UTF8_cval3); buf[1] = (char)(((c >> 6) & 0x3f) | 0x80); buf[2] = (char)((c & 0x3f) | 0x80); return 3; } if (c < 0x110000) { buf[0] = (char)((c >> 18) | UTF8_cval4); buf[1] = (char)(((c >> 12) & 0x3f) | 0x80); buf[2] = (char)(((c >> 6) & 0x3f) | 0x80); buf[3] = (char)((c & 0x3f) | 0x80); return 4; } return 0; } int FASTCALL XmlUtf16Encode(int charNum, unsigned short *buf) { if (charNum < 0) return 0; if (charNum < 0x10000) { buf[0] = (unsigned short)charNum; return 1; } if (charNum < 0x110000) { charNum -= 0x10000; buf[0] = (unsigned short)((charNum >> 10) + 0xD800); buf[1] = (unsigned short)((charNum & 0x3FF) + 0xDC00); return 2; } return 0; } struct unknown_encoding { struct normal_encoding normal; CONVERTER convert; void *userData; unsigned short utf16[256]; char utf8[256][4]; }; #define AS_UNKNOWN_ENCODING(enc) ((const struct unknown_encoding *) (enc)) int XmlSizeOfUnknownEncoding(void) { return sizeof(struct unknown_encoding); } static int PTRFASTCALL unknown_isName(const ENCODING *enc, const char *p) { const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); int c = uenc->convert(uenc->userData, p); if (c & ~0xFFFF) return 0; return UCS2_GET_NAMING(namePages, c >> 8, c & 0xFF); } static int PTRFASTCALL unknown_isNmstrt(const ENCODING *enc, const char *p) { const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); int c = uenc->convert(uenc->userData, p); if (c & ~0xFFFF) return 0; return UCS2_GET_NAMING(nmstrtPages, c >> 8, c & 0xFF); } static int PTRFASTCALL unknown_isInvalid(const ENCODING *enc, const char *p) { const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); int c = uenc->convert(uenc->userData, p); return (c & ~0xFFFF) || checkCharRefNumber(c) < 0; } static void PTRCALL unknown_toUtf8(const ENCODING *enc, const char **fromP, const char *fromLim, char **toP, const char *toLim) { const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); char buf[XML_UTF8_ENCODE_MAX]; for (;;) { const char *utf8; int n; if (*fromP == fromLim) break; utf8 = uenc->utf8[(unsigned char)**fromP]; n = *utf8++; if (n == 0) { int c = uenc->convert(uenc->userData, *fromP); n = XmlUtf8Encode(c, buf); if (n > toLim - *toP) break; utf8 = buf; *fromP += (AS_NORMAL_ENCODING(enc)->type[(unsigned char)**fromP] - (BT_LEAD2 - 2)); } else { if (n > toLim - *toP) break; (*fromP)++; } do { *(*toP)++ = *utf8++; } while (--n != 0); } } static void PTRCALL unknown_toUtf16(const ENCODING *enc, const char **fromP, const char *fromLim, unsigned short **toP, const unsigned short *toLim) { const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); while (*fromP != fromLim && *toP != toLim) { unsigned short c = uenc->utf16[(unsigned char)**fromP]; if (c == 0) { c = (unsigned short) uenc->convert(uenc->userData, *fromP); *fromP += (AS_NORMAL_ENCODING(enc)->type[(unsigned char)**fromP] - (BT_LEAD2 - 2)); } else (*fromP)++; *(*toP)++ = c; } } ENCODING * XmlInitUnknownEncoding(void *mem, int *table, CONVERTER convert, void *userData) { int i; struct unknown_encoding *e = (struct unknown_encoding *)mem; for (i = 0; i < (int)sizeof(struct normal_encoding); i++) ((char *)mem)[i] = ((char *)&latin1_encoding)[i]; for (i = 0; i < 128; i++) if (latin1_encoding.type[i] != BT_OTHER && latin1_encoding.type[i] != BT_NONXML && table[i] != i) return 0; for (i = 0; i < 256; i++) { int c = table[i]; if (c == -1) { e->normal.type[i] = BT_MALFORM; /* This shouldn't really get used. */ e->utf16[i] = 0xFFFF; e->utf8[i][0] = 1; e->utf8[i][1] = 0; } else if (c < 0) { if (c < -4) return 0; e->normal.type[i] = (unsigned char)(BT_LEAD2 - (c + 2)); e->utf8[i][0] = 0; e->utf16[i] = 0; } else if (c < 0x80) { if (latin1_encoding.type[c] != BT_OTHER && latin1_encoding.type[c] != BT_NONXML && c != i) return 0; e->normal.type[i] = latin1_encoding.type[c]; e->utf8[i][0] = 1; e->utf8[i][1] = (char)c; e->utf16[i] = (unsigned short)(c == 0 ? 0xFFFF : c); } else if (checkCharRefNumber(c) < 0) { e->normal.type[i] = BT_NONXML; /* This shouldn't really get used. */ e->utf16[i] = 0xFFFF; e->utf8[i][0] = 1; e->utf8[i][1] = 0; } else { if (c > 0xFFFF) return 0; if (UCS2_GET_NAMING(nmstrtPages, c >> 8, c & 0xff)) e->normal.type[i] = BT_NMSTRT; else if (UCS2_GET_NAMING(namePages, c >> 8, c & 0xff)) e->normal.type[i] = BT_NAME; else e->normal.type[i] = BT_OTHER; e->utf8[i][0] = (char)XmlUtf8Encode(c, e->utf8[i] + 1); e->utf16[i] = (unsigned short)c; } } e->userData = userData; e->convert = convert; if (convert) { e->normal.isName2 = unknown_isName; e->normal.isName3 = unknown_isName; e->normal.isName4 = unknown_isName; e->normal.isNmstrt2 = unknown_isNmstrt; e->normal.isNmstrt3 = unknown_isNmstrt; e->normal.isNmstrt4 = unknown_isNmstrt; e->normal.isInvalid2 = unknown_isInvalid; e->normal.isInvalid3 = unknown_isInvalid; e->normal.isInvalid4 = unknown_isInvalid; } e->normal.enc.utf8Convert = unknown_toUtf8; e->normal.enc.utf16Convert = unknown_toUtf16; return &(e->normal.enc); } /* If this enumeration is changed, getEncodingIndex and encodings must also be changed. */ enum { UNKNOWN_ENC = -1, ISO_8859_1_ENC = 0, US_ASCII_ENC, UTF_8_ENC, UTF_16_ENC, UTF_16BE_ENC, UTF_16LE_ENC, /* must match encodingNames up to here */ NO_ENC }; static const char KW_ISO_8859_1[] = { ASCII_I, ASCII_S, ASCII_O, ASCII_MINUS, ASCII_8, ASCII_8, ASCII_5, ASCII_9, ASCII_MINUS, ASCII_1, '\0' }; static const char KW_US_ASCII[] = { ASCII_U, ASCII_S, ASCII_MINUS, ASCII_A, ASCII_S, ASCII_C, ASCII_I, ASCII_I, '\0' }; static const char KW_UTF_8[] = { ASCII_U, ASCII_T, ASCII_F, ASCII_MINUS, ASCII_8, '\0' }; static const char KW_UTF_16[] = { ASCII_U, ASCII_T, ASCII_F, ASCII_MINUS, ASCII_1, ASCII_6, '\0' }; static const char KW_UTF_16BE[] = { ASCII_U, ASCII_T, ASCII_F, ASCII_MINUS, ASCII_1, ASCII_6, ASCII_B, ASCII_E, '\0' }; static const char KW_UTF_16LE[] = { ASCII_U, ASCII_T, ASCII_F, ASCII_MINUS, ASCII_1, ASCII_6, ASCII_L, ASCII_E, '\0' }; static int FASTCALL getEncodingIndex(const char *name) { static const char * const encodingNames[] = { KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, KW_UTF_16, KW_UTF_16BE, KW_UTF_16LE, }; int i; if (name == NULL) return NO_ENC; for (i = 0; i < (int)(sizeof(encodingNames)/sizeof(encodingNames[0])); i++) if (streqci(name, encodingNames[i])) return i; return UNKNOWN_ENC; } /* For binary compatibility, we store the index of the encoding specified at initialization in the isUtf16 member. */ #define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16) #define SET_INIT_ENC_INDEX(enc, i) ((enc)->initEnc.isUtf16 = (char)i) /* This is what detects the encoding. encodingTable maps from encoding indices to encodings; INIT_ENC_INDEX(enc) is the index of the external (protocol) specified encoding; state is XML_CONTENT_STATE if we're parsing an external text entity, and XML_PROLOG_STATE otherwise. */ static int initScan(const ENCODING * const *encodingTable, const INIT_ENCODING *enc, int state, const char *ptr, const char *end, const char **nextTokPtr) { const ENCODING **encPtr; if (ptr == end) return XML_TOK_NONE; encPtr = enc->encPtr; if (ptr + 1 == end) { /* only a single byte available for auto-detection */ #ifndef XML_DTD /* FIXME */ /* a well-formed document entity must have more than one byte */ if (state != XML_CONTENT_STATE) return XML_TOK_PARTIAL; #endif /* so we're parsing an external text entity... */ /* if UTF-16 was externally specified, then we need at least 2 bytes */ switch (INIT_ENC_INDEX(enc)) { case UTF_16_ENC: case UTF_16LE_ENC: case UTF_16BE_ENC: return XML_TOK_PARTIAL; } switch ((unsigned char)*ptr) { case 0xFE: case 0xFF: case 0xEF: /* possibly first byte of UTF-8 BOM */ if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE) break; /* fall through */ case 0x00: case 0x3C: return XML_TOK_PARTIAL; } } else { switch (((unsigned char)ptr[0] << 8) | (unsigned char)ptr[1]) { case 0xFEFF: if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE) break; *nextTokPtr = ptr + 2; *encPtr = encodingTable[UTF_16BE_ENC]; return XML_TOK_BOM; /* 00 3C is handled in the default case */ case 0x3C00: if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC || INIT_ENC_INDEX(enc) == UTF_16_ENC) && state == XML_CONTENT_STATE) break; *encPtr = encodingTable[UTF_16LE_ENC]; return XmlTok(*encPtr, state, ptr, end, nextTokPtr); case 0xFFFE: if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE) break; *nextTokPtr = ptr + 2; *encPtr = encodingTable[UTF_16LE_ENC]; return XML_TOK_BOM; case 0xEFBB: /* Maybe a UTF-8 BOM (EF BB BF) */ /* If there's an explicitly specified (external) encoding of ISO-8859-1 or some flavour of UTF-16 and this is an external text entity, don't look for the BOM, because it might be a legal data. */ if (state == XML_CONTENT_STATE) { int e = INIT_ENC_INDEX(enc); if (e == ISO_8859_1_ENC || e == UTF_16BE_ENC || e == UTF_16LE_ENC || e == UTF_16_ENC) break; } if (ptr + 2 == end) return XML_TOK_PARTIAL; if ((unsigned char)ptr[2] == 0xBF) { *nextTokPtr = ptr + 3; *encPtr = encodingTable[UTF_8_ENC]; return XML_TOK_BOM; } break; default: if (ptr[0] == '\0') { /* 0 isn't a legal data character. Furthermore a document entity can only start with ASCII characters. So the only way this can fail to be big-endian UTF-16 if it it's an external parsed general entity that's labelled as UTF-16LE. */ if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC) break; *encPtr = encodingTable[UTF_16BE_ENC]; return XmlTok(*encPtr, state, ptr, end, nextTokPtr); } else if (ptr[1] == '\0') { /* We could recover here in the case: - parsing an external entity - second byte is 0 - no externally specified encoding - no encoding declaration by assuming UTF-16LE. But we don't, because this would mean when presented just with a single byte, we couldn't reliably determine whether we needed further bytes. */ if (state == XML_CONTENT_STATE) break; *encPtr = encodingTable[UTF_16LE_ENC]; return XmlTok(*encPtr, state, ptr, end, nextTokPtr); } break; } } *encPtr = encodingTable[INIT_ENC_INDEX(enc)]; return XmlTok(*encPtr, state, ptr, end, nextTokPtr); } #define NS(x) x #define ns(x) x #define XML_TOK_NS_C #include "xmltok_ns.c" #undef XML_TOK_NS_C #undef NS #undef ns #ifdef XML_NS #define NS(x) x ## NS #define ns(x) x ## _ns #define XML_TOK_NS_C #include "xmltok_ns.c" #undef XML_TOK_NS_C #undef NS #undef ns ENCODING * XmlInitUnknownEncodingNS(void *mem, int *table, CONVERTER convert, void *userData) { ENCODING *enc = XmlInitUnknownEncoding(mem, table, convert, userData); if (enc) ((struct normal_encoding *)enc)->type[ASCII_COLON] = BT_COLON; return enc; } #endif /* XML_NS */ astropy-1.1.1/cextern/expat/lib/expatw_static.dsp0000755001134200020070000001034512602615516023057 0ustar embrayscience00000000000000# Microsoft Developer Studio Project File - Name="expatw_static" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Static Library" 0x0104 CFG=expatw_static - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "expatw_static.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "expatw_static.mak" CFG="expatw_static - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "expatw_static - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "expatw_static - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "expatw_static - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "expatw_static___Win32_Release" # PROP BASE Intermediate_Dir "expatw_static___Win32_Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\win32\bin\Release" # PROP Intermediate_Dir "..\win32\tmp\Release-w_static" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "COMPILED_FROM_DSP" /D "XML_UNICODE_WCHAR_T" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x1009 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\win32\bin\Release\libexpatwMT.lib" !ELSEIF "$(CFG)" == "expatw_static - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "expatw_static___Win32_Debug" # PROP BASE Intermediate_Dir "expatw_static___Win32_Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\win32\bin\Debug" # PROP Intermediate_Dir "..\win32\tmp\Debug-w_static" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c # ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_LIB" /D "COMPILED_FROM_DSP" /D "XML_UNICODE_WCHAR_T" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x1009 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\win32\bin\Debug\libexpatwMT.lib" !ENDIF # Begin Target # Name "expatw_static - Win32 Release" # Name "expatw_static - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\xmlparse.c # End Source File # Begin Source File SOURCE=.\xmlrole.c # End Source File # Begin Source File SOURCE=.\xmltok.c # End Source File # Begin Source File SOURCE=.\xmltok_impl.c # End Source File # Begin Source File SOURCE=.\xmltok_ns.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=.\ascii.h # End Source File # Begin Source File SOURCE=.\asciitab.h # End Source File # Begin Source File SOURCE=.\expat.h # End Source File # Begin Source File SOURCE=.\expat_external.h # End Source File # Begin Source File SOURCE=.\iasciitab.h # End Source File # Begin Source File SOURCE=.\internal.h # End Source File # Begin Source File SOURCE=.\latin1tab.h # End Source File # Begin Source File SOURCE=.\nametab.h # End Source File # Begin Source File SOURCE=.\utf8tab.h # End Source File # Begin Source File SOURCE=.\xmlrole.h # End Source File # Begin Source File SOURCE=.\xmltok.h # End Source File # Begin Source File SOURCE=.\xmltok_impl.h # End Source File # End Group # End Target # End Project astropy-1.1.1/cextern/expat/lib/xmlrole.c0000755001134200020070000007733312602615516021330 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #include #ifdef COMPILED_FROM_DSP #include "winconfig.h" #elif defined(MACOS_CLASSIC) #include "macconfig.h" #elif defined(__amigaos__) #include "amigaconfig.h" #elif defined(__WATCOMC__) #include "watcomconfig.h" #else #ifdef HAVE_EXPAT_CONFIG_H #include #endif #endif /* ndef COMPILED_FROM_DSP */ #include "expat_external.h" #include "internal.h" #include "xmlrole.h" #include "ascii.h" /* Doesn't check: that ,| are not mixed in a model group content of literals */ static const char KW_ANY[] = { ASCII_A, ASCII_N, ASCII_Y, '\0' }; static const char KW_ATTLIST[] = { ASCII_A, ASCII_T, ASCII_T, ASCII_L, ASCII_I, ASCII_S, ASCII_T, '\0' }; static const char KW_CDATA[] = { ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0' }; static const char KW_DOCTYPE[] = { ASCII_D, ASCII_O, ASCII_C, ASCII_T, ASCII_Y, ASCII_P, ASCII_E, '\0' }; static const char KW_ELEMENT[] = { ASCII_E, ASCII_L, ASCII_E, ASCII_M, ASCII_E, ASCII_N, ASCII_T, '\0' }; static const char KW_EMPTY[] = { ASCII_E, ASCII_M, ASCII_P, ASCII_T, ASCII_Y, '\0' }; static const char KW_ENTITIES[] = { ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_I, ASCII_E, ASCII_S, '\0' }; static const char KW_ENTITY[] = { ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0' }; static const char KW_FIXED[] = { ASCII_F, ASCII_I, ASCII_X, ASCII_E, ASCII_D, '\0' }; static const char KW_ID[] = { ASCII_I, ASCII_D, '\0' }; static const char KW_IDREF[] = { ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0' }; static const char KW_IDREFS[] = { ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0' }; #ifdef XML_DTD static const char KW_IGNORE[] = { ASCII_I, ASCII_G, ASCII_N, ASCII_O, ASCII_R, ASCII_E, '\0' }; #endif static const char KW_IMPLIED[] = { ASCII_I, ASCII_M, ASCII_P, ASCII_L, ASCII_I, ASCII_E, ASCII_D, '\0' }; #ifdef XML_DTD static const char KW_INCLUDE[] = { ASCII_I, ASCII_N, ASCII_C, ASCII_L, ASCII_U, ASCII_D, ASCII_E, '\0' }; #endif static const char KW_NDATA[] = { ASCII_N, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0' }; static const char KW_NMTOKEN[] = { ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0' }; static const char KW_NMTOKENS[] = { ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, ASCII_S, '\0' }; static const char KW_NOTATION[] = { ASCII_N, ASCII_O, ASCII_T, ASCII_A, ASCII_T, ASCII_I, ASCII_O, ASCII_N, '\0' }; static const char KW_PCDATA[] = { ASCII_P, ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0' }; static const char KW_PUBLIC[] = { ASCII_P, ASCII_U, ASCII_B, ASCII_L, ASCII_I, ASCII_C, '\0' }; static const char KW_REQUIRED[] = { ASCII_R, ASCII_E, ASCII_Q, ASCII_U, ASCII_I, ASCII_R, ASCII_E, ASCII_D, '\0' }; static const char KW_SYSTEM[] = { ASCII_S, ASCII_Y, ASCII_S, ASCII_T, ASCII_E, ASCII_M, '\0' }; #ifndef MIN_BYTES_PER_CHAR #define MIN_BYTES_PER_CHAR(enc) ((enc)->minBytesPerChar) #endif #ifdef XML_DTD #define setTopLevel(state) \ ((state)->handler = ((state)->documentEntity \ ? internalSubset \ : externalSubset1)) #else /* not XML_DTD */ #define setTopLevel(state) ((state)->handler = internalSubset) #endif /* not XML_DTD */ typedef int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc); static PROLOG_HANDLER prolog0, prolog1, prolog2, doctype0, doctype1, doctype2, doctype3, doctype4, doctype5, internalSubset, entity0, entity1, entity2, entity3, entity4, entity5, entity6, entity7, entity8, entity9, entity10, notation0, notation1, notation2, notation3, notation4, attlist0, attlist1, attlist2, attlist3, attlist4, attlist5, attlist6, attlist7, attlist8, attlist9, element0, element1, element2, element3, element4, element5, element6, element7, #ifdef XML_DTD externalSubset0, externalSubset1, condSect0, condSect1, condSect2, #endif /* XML_DTD */ declClose, error; static int FASTCALL common(PROLOG_STATE *state, int tok); static int PTRCALL prolog0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: state->handler = prolog1; return XML_ROLE_NONE; case XML_TOK_XML_DECL: state->handler = prolog1; return XML_ROLE_XML_DECL; case XML_TOK_PI: state->handler = prolog1; return XML_ROLE_PI; case XML_TOK_COMMENT: state->handler = prolog1; return XML_ROLE_COMMENT; case XML_TOK_BOM: return XML_ROLE_NONE; case XML_TOK_DECL_OPEN: if (!XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end, KW_DOCTYPE)) break; state->handler = doctype0; return XML_ROLE_DOCTYPE_NONE; case XML_TOK_INSTANCE_START: state->handler = error; return XML_ROLE_INSTANCE_START; } return common(state, tok); } static int PTRCALL prolog1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_NONE; case XML_TOK_PI: return XML_ROLE_PI; case XML_TOK_COMMENT: return XML_ROLE_COMMENT; case XML_TOK_BOM: return XML_ROLE_NONE; case XML_TOK_DECL_OPEN: if (!XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end, KW_DOCTYPE)) break; state->handler = doctype0; return XML_ROLE_DOCTYPE_NONE; case XML_TOK_INSTANCE_START: state->handler = error; return XML_ROLE_INSTANCE_START; } return common(state, tok); } static int PTRCALL prolog2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_NONE; case XML_TOK_PI: return XML_ROLE_PI; case XML_TOK_COMMENT: return XML_ROLE_COMMENT; case XML_TOK_INSTANCE_START: state->handler = error; return XML_ROLE_INSTANCE_START; } return common(state, tok); } static int PTRCALL doctype0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_DOCTYPE_NONE; case XML_TOK_NAME: case XML_TOK_PREFIXED_NAME: state->handler = doctype1; return XML_ROLE_DOCTYPE_NAME; } return common(state, tok); } static int PTRCALL doctype1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_DOCTYPE_NONE; case XML_TOK_OPEN_BRACKET: state->handler = internalSubset; return XML_ROLE_DOCTYPE_INTERNAL_SUBSET; case XML_TOK_DECL_CLOSE: state->handler = prolog2; return XML_ROLE_DOCTYPE_CLOSE; case XML_TOK_NAME: if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) { state->handler = doctype3; return XML_ROLE_DOCTYPE_NONE; } if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) { state->handler = doctype2; return XML_ROLE_DOCTYPE_NONE; } break; } return common(state, tok); } static int PTRCALL doctype2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_DOCTYPE_NONE; case XML_TOK_LITERAL: state->handler = doctype3; return XML_ROLE_DOCTYPE_PUBLIC_ID; } return common(state, tok); } static int PTRCALL doctype3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_DOCTYPE_NONE; case XML_TOK_LITERAL: state->handler = doctype4; return XML_ROLE_DOCTYPE_SYSTEM_ID; } return common(state, tok); } static int PTRCALL doctype4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_DOCTYPE_NONE; case XML_TOK_OPEN_BRACKET: state->handler = internalSubset; return XML_ROLE_DOCTYPE_INTERNAL_SUBSET; case XML_TOK_DECL_CLOSE: state->handler = prolog2; return XML_ROLE_DOCTYPE_CLOSE; } return common(state, tok); } static int PTRCALL doctype5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_DOCTYPE_NONE; case XML_TOK_DECL_CLOSE: state->handler = prolog2; return XML_ROLE_DOCTYPE_CLOSE; } return common(state, tok); } static int PTRCALL internalSubset(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_NONE; case XML_TOK_DECL_OPEN: if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end, KW_ENTITY)) { state->handler = entity0; return XML_ROLE_ENTITY_NONE; } if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end, KW_ATTLIST)) { state->handler = attlist0; return XML_ROLE_ATTLIST_NONE; } if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end, KW_ELEMENT)) { state->handler = element0; return XML_ROLE_ELEMENT_NONE; } if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end, KW_NOTATION)) { state->handler = notation0; return XML_ROLE_NOTATION_NONE; } break; case XML_TOK_PI: return XML_ROLE_PI; case XML_TOK_COMMENT: return XML_ROLE_COMMENT; case XML_TOK_PARAM_ENTITY_REF: return XML_ROLE_PARAM_ENTITY_REF; case XML_TOK_CLOSE_BRACKET: state->handler = doctype5; return XML_ROLE_DOCTYPE_NONE; case XML_TOK_NONE: return XML_ROLE_NONE; } return common(state, tok); } #ifdef XML_DTD static int PTRCALL externalSubset0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { state->handler = externalSubset1; if (tok == XML_TOK_XML_DECL) return XML_ROLE_TEXT_DECL; return externalSubset1(state, tok, ptr, end, enc); } static int PTRCALL externalSubset1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_COND_SECT_OPEN: state->handler = condSect0; return XML_ROLE_NONE; case XML_TOK_COND_SECT_CLOSE: if (state->includeLevel == 0) break; state->includeLevel -= 1; return XML_ROLE_NONE; case XML_TOK_PROLOG_S: return XML_ROLE_NONE; case XML_TOK_CLOSE_BRACKET: break; case XML_TOK_NONE: if (state->includeLevel) break; return XML_ROLE_NONE; default: return internalSubset(state, tok, ptr, end, enc); } return common(state, tok); } #endif /* XML_DTD */ static int PTRCALL entity0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ENTITY_NONE; case XML_TOK_PERCENT: state->handler = entity1; return XML_ROLE_ENTITY_NONE; case XML_TOK_NAME: state->handler = entity2; return XML_ROLE_GENERAL_ENTITY_NAME; } return common(state, tok); } static int PTRCALL entity1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ENTITY_NONE; case XML_TOK_NAME: state->handler = entity7; return XML_ROLE_PARAM_ENTITY_NAME; } return common(state, tok); } static int PTRCALL entity2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ENTITY_NONE; case XML_TOK_NAME: if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) { state->handler = entity4; return XML_ROLE_ENTITY_NONE; } if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) { state->handler = entity3; return XML_ROLE_ENTITY_NONE; } break; case XML_TOK_LITERAL: state->handler = declClose; state->role_none = XML_ROLE_ENTITY_NONE; return XML_ROLE_ENTITY_VALUE; } return common(state, tok); } static int PTRCALL entity3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ENTITY_NONE; case XML_TOK_LITERAL: state->handler = entity4; return XML_ROLE_ENTITY_PUBLIC_ID; } return common(state, tok); } static int PTRCALL entity4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ENTITY_NONE; case XML_TOK_LITERAL: state->handler = entity5; return XML_ROLE_ENTITY_SYSTEM_ID; } return common(state, tok); } static int PTRCALL entity5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ENTITY_NONE; case XML_TOK_DECL_CLOSE: setTopLevel(state); return XML_ROLE_ENTITY_COMPLETE; case XML_TOK_NAME: if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) { state->handler = entity6; return XML_ROLE_ENTITY_NONE; } break; } return common(state, tok); } static int PTRCALL entity6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ENTITY_NONE; case XML_TOK_NAME: state->handler = declClose; state->role_none = XML_ROLE_ENTITY_NONE; return XML_ROLE_ENTITY_NOTATION_NAME; } return common(state, tok); } static int PTRCALL entity7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ENTITY_NONE; case XML_TOK_NAME: if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) { state->handler = entity9; return XML_ROLE_ENTITY_NONE; } if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) { state->handler = entity8; return XML_ROLE_ENTITY_NONE; } break; case XML_TOK_LITERAL: state->handler = declClose; state->role_none = XML_ROLE_ENTITY_NONE; return XML_ROLE_ENTITY_VALUE; } return common(state, tok); } static int PTRCALL entity8(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ENTITY_NONE; case XML_TOK_LITERAL: state->handler = entity9; return XML_ROLE_ENTITY_PUBLIC_ID; } return common(state, tok); } static int PTRCALL entity9(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ENTITY_NONE; case XML_TOK_LITERAL: state->handler = entity10; return XML_ROLE_ENTITY_SYSTEM_ID; } return common(state, tok); } static int PTRCALL entity10(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ENTITY_NONE; case XML_TOK_DECL_CLOSE: setTopLevel(state); return XML_ROLE_ENTITY_COMPLETE; } return common(state, tok); } static int PTRCALL notation0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_NOTATION_NONE; case XML_TOK_NAME: state->handler = notation1; return XML_ROLE_NOTATION_NAME; } return common(state, tok); } static int PTRCALL notation1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_NOTATION_NONE; case XML_TOK_NAME: if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) { state->handler = notation3; return XML_ROLE_NOTATION_NONE; } if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) { state->handler = notation2; return XML_ROLE_NOTATION_NONE; } break; } return common(state, tok); } static int PTRCALL notation2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_NOTATION_NONE; case XML_TOK_LITERAL: state->handler = notation4; return XML_ROLE_NOTATION_PUBLIC_ID; } return common(state, tok); } static int PTRCALL notation3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_NOTATION_NONE; case XML_TOK_LITERAL: state->handler = declClose; state->role_none = XML_ROLE_NOTATION_NONE; return XML_ROLE_NOTATION_SYSTEM_ID; } return common(state, tok); } static int PTRCALL notation4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_NOTATION_NONE; case XML_TOK_LITERAL: state->handler = declClose; state->role_none = XML_ROLE_NOTATION_NONE; return XML_ROLE_NOTATION_SYSTEM_ID; case XML_TOK_DECL_CLOSE: setTopLevel(state); return XML_ROLE_NOTATION_NO_SYSTEM_ID; } return common(state, tok); } static int PTRCALL attlist0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ATTLIST_NONE; case XML_TOK_NAME: case XML_TOK_PREFIXED_NAME: state->handler = attlist1; return XML_ROLE_ATTLIST_ELEMENT_NAME; } return common(state, tok); } static int PTRCALL attlist1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ATTLIST_NONE; case XML_TOK_DECL_CLOSE: setTopLevel(state); return XML_ROLE_ATTLIST_NONE; case XML_TOK_NAME: case XML_TOK_PREFIXED_NAME: state->handler = attlist2; return XML_ROLE_ATTRIBUTE_NAME; } return common(state, tok); } static int PTRCALL attlist2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ATTLIST_NONE; case XML_TOK_NAME: { static const char * const types[] = { KW_CDATA, KW_ID, KW_IDREF, KW_IDREFS, KW_ENTITY, KW_ENTITIES, KW_NMTOKEN, KW_NMTOKENS, }; int i; for (i = 0; i < (int)(sizeof(types)/sizeof(types[0])); i++) if (XmlNameMatchesAscii(enc, ptr, end, types[i])) { state->handler = attlist8; return XML_ROLE_ATTRIBUTE_TYPE_CDATA + i; } } if (XmlNameMatchesAscii(enc, ptr, end, KW_NOTATION)) { state->handler = attlist5; return XML_ROLE_ATTLIST_NONE; } break; case XML_TOK_OPEN_PAREN: state->handler = attlist3; return XML_ROLE_ATTLIST_NONE; } return common(state, tok); } static int PTRCALL attlist3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ATTLIST_NONE; case XML_TOK_NMTOKEN: case XML_TOK_NAME: case XML_TOK_PREFIXED_NAME: state->handler = attlist4; return XML_ROLE_ATTRIBUTE_ENUM_VALUE; } return common(state, tok); } static int PTRCALL attlist4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ATTLIST_NONE; case XML_TOK_CLOSE_PAREN: state->handler = attlist8; return XML_ROLE_ATTLIST_NONE; case XML_TOK_OR: state->handler = attlist3; return XML_ROLE_ATTLIST_NONE; } return common(state, tok); } static int PTRCALL attlist5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ATTLIST_NONE; case XML_TOK_OPEN_PAREN: state->handler = attlist6; return XML_ROLE_ATTLIST_NONE; } return common(state, tok); } static int PTRCALL attlist6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ATTLIST_NONE; case XML_TOK_NAME: state->handler = attlist7; return XML_ROLE_ATTRIBUTE_NOTATION_VALUE; } return common(state, tok); } static int PTRCALL attlist7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ATTLIST_NONE; case XML_TOK_CLOSE_PAREN: state->handler = attlist8; return XML_ROLE_ATTLIST_NONE; case XML_TOK_OR: state->handler = attlist6; return XML_ROLE_ATTLIST_NONE; } return common(state, tok); } /* default value */ static int PTRCALL attlist8(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ATTLIST_NONE; case XML_TOK_POUND_NAME: if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end, KW_IMPLIED)) { state->handler = attlist1; return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE; } if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end, KW_REQUIRED)) { state->handler = attlist1; return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE; } if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end, KW_FIXED)) { state->handler = attlist9; return XML_ROLE_ATTLIST_NONE; } break; case XML_TOK_LITERAL: state->handler = attlist1; return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE; } return common(state, tok); } static int PTRCALL attlist9(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ATTLIST_NONE; case XML_TOK_LITERAL: state->handler = attlist1; return XML_ROLE_FIXED_ATTRIBUTE_VALUE; } return common(state, tok); } static int PTRCALL element0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ELEMENT_NONE; case XML_TOK_NAME: case XML_TOK_PREFIXED_NAME: state->handler = element1; return XML_ROLE_ELEMENT_NAME; } return common(state, tok); } static int PTRCALL element1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ELEMENT_NONE; case XML_TOK_NAME: if (XmlNameMatchesAscii(enc, ptr, end, KW_EMPTY)) { state->handler = declClose; state->role_none = XML_ROLE_ELEMENT_NONE; return XML_ROLE_CONTENT_EMPTY; } if (XmlNameMatchesAscii(enc, ptr, end, KW_ANY)) { state->handler = declClose; state->role_none = XML_ROLE_ELEMENT_NONE; return XML_ROLE_CONTENT_ANY; } break; case XML_TOK_OPEN_PAREN: state->handler = element2; state->level = 1; return XML_ROLE_GROUP_OPEN; } return common(state, tok); } static int PTRCALL element2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ELEMENT_NONE; case XML_TOK_POUND_NAME: if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end, KW_PCDATA)) { state->handler = element3; return XML_ROLE_CONTENT_PCDATA; } break; case XML_TOK_OPEN_PAREN: state->level = 2; state->handler = element6; return XML_ROLE_GROUP_OPEN; case XML_TOK_NAME: case XML_TOK_PREFIXED_NAME: state->handler = element7; return XML_ROLE_CONTENT_ELEMENT; case XML_TOK_NAME_QUESTION: state->handler = element7; return XML_ROLE_CONTENT_ELEMENT_OPT; case XML_TOK_NAME_ASTERISK: state->handler = element7; return XML_ROLE_CONTENT_ELEMENT_REP; case XML_TOK_NAME_PLUS: state->handler = element7; return XML_ROLE_CONTENT_ELEMENT_PLUS; } return common(state, tok); } static int PTRCALL element3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ELEMENT_NONE; case XML_TOK_CLOSE_PAREN: state->handler = declClose; state->role_none = XML_ROLE_ELEMENT_NONE; return XML_ROLE_GROUP_CLOSE; case XML_TOK_CLOSE_PAREN_ASTERISK: state->handler = declClose; state->role_none = XML_ROLE_ELEMENT_NONE; return XML_ROLE_GROUP_CLOSE_REP; case XML_TOK_OR: state->handler = element4; return XML_ROLE_ELEMENT_NONE; } return common(state, tok); } static int PTRCALL element4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ELEMENT_NONE; case XML_TOK_NAME: case XML_TOK_PREFIXED_NAME: state->handler = element5; return XML_ROLE_CONTENT_ELEMENT; } return common(state, tok); } static int PTRCALL element5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ELEMENT_NONE; case XML_TOK_CLOSE_PAREN_ASTERISK: state->handler = declClose; state->role_none = XML_ROLE_ELEMENT_NONE; return XML_ROLE_GROUP_CLOSE_REP; case XML_TOK_OR: state->handler = element4; return XML_ROLE_ELEMENT_NONE; } return common(state, tok); } static int PTRCALL element6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ELEMENT_NONE; case XML_TOK_OPEN_PAREN: state->level += 1; return XML_ROLE_GROUP_OPEN; case XML_TOK_NAME: case XML_TOK_PREFIXED_NAME: state->handler = element7; return XML_ROLE_CONTENT_ELEMENT; case XML_TOK_NAME_QUESTION: state->handler = element7; return XML_ROLE_CONTENT_ELEMENT_OPT; case XML_TOK_NAME_ASTERISK: state->handler = element7; return XML_ROLE_CONTENT_ELEMENT_REP; case XML_TOK_NAME_PLUS: state->handler = element7; return XML_ROLE_CONTENT_ELEMENT_PLUS; } return common(state, tok); } static int PTRCALL element7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_ELEMENT_NONE; case XML_TOK_CLOSE_PAREN: state->level -= 1; if (state->level == 0) { state->handler = declClose; state->role_none = XML_ROLE_ELEMENT_NONE; } return XML_ROLE_GROUP_CLOSE; case XML_TOK_CLOSE_PAREN_ASTERISK: state->level -= 1; if (state->level == 0) { state->handler = declClose; state->role_none = XML_ROLE_ELEMENT_NONE; } return XML_ROLE_GROUP_CLOSE_REP; case XML_TOK_CLOSE_PAREN_QUESTION: state->level -= 1; if (state->level == 0) { state->handler = declClose; state->role_none = XML_ROLE_ELEMENT_NONE; } return XML_ROLE_GROUP_CLOSE_OPT; case XML_TOK_CLOSE_PAREN_PLUS: state->level -= 1; if (state->level == 0) { state->handler = declClose; state->role_none = XML_ROLE_ELEMENT_NONE; } return XML_ROLE_GROUP_CLOSE_PLUS; case XML_TOK_COMMA: state->handler = element6; return XML_ROLE_GROUP_SEQUENCE; case XML_TOK_OR: state->handler = element6; return XML_ROLE_GROUP_CHOICE; } return common(state, tok); } #ifdef XML_DTD static int PTRCALL condSect0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_NONE; case XML_TOK_NAME: if (XmlNameMatchesAscii(enc, ptr, end, KW_INCLUDE)) { state->handler = condSect1; return XML_ROLE_NONE; } if (XmlNameMatchesAscii(enc, ptr, end, KW_IGNORE)) { state->handler = condSect2; return XML_ROLE_NONE; } break; } return common(state, tok); } static int PTRCALL condSect1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_NONE; case XML_TOK_OPEN_BRACKET: state->handler = externalSubset1; state->includeLevel += 1; return XML_ROLE_NONE; } return common(state, tok); } static int PTRCALL condSect2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return XML_ROLE_NONE; case XML_TOK_OPEN_BRACKET: state->handler = externalSubset1; return XML_ROLE_IGNORE_SECT; } return common(state, tok); } #endif /* XML_DTD */ static int PTRCALL declClose(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { case XML_TOK_PROLOG_S: return state->role_none; case XML_TOK_DECL_CLOSE: setTopLevel(state); return state->role_none; } return common(state, tok); } static int PTRCALL error(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { return XML_ROLE_NONE; } static int FASTCALL common(PROLOG_STATE *state, int tok) { #ifdef XML_DTD if (!state->documentEntity && tok == XML_TOK_PARAM_ENTITY_REF) return XML_ROLE_INNER_PARAM_ENTITY_REF; #endif state->handler = error; return XML_ROLE_ERROR; } void XmlPrologStateInit(PROLOG_STATE *state) { state->handler = prolog0; #ifdef XML_DTD state->documentEntity = 1; state->includeLevel = 0; state->inEntityValue = 0; #endif /* XML_DTD */ } #ifdef XML_DTD void XmlPrologStateInitExternalEntity(PROLOG_STATE *state) { state->handler = externalSubset0; state->documentEntity = 0; state->includeLevel = 0; } #endif /* XML_DTD */ astropy-1.1.1/cextern/expat/lib/internal.h0000755001134200020070000000375412602615516021463 0ustar embrayscience00000000000000/* internal.h Internal definitions used by Expat. This is not needed to compile client code. The following calling convention macros are defined for frequently called functions: FASTCALL - Used for those internal functions that have a simple body and a low number of arguments and local variables. PTRCALL - Used for functions called though function pointers. PTRFASTCALL - Like PTRCALL, but for low number of arguments. inline - Used for selected internal functions for which inlining may improve performance on some platforms. Note: Use of these macros is based on judgement, not hard rules, and therefore subject to change. */ #if defined(__GNUC__) && defined(__i386__) && !defined(__MINGW32__) /* We'll use this version by default only where we know it helps. regparm() generates warnings on Solaris boxes. See SF bug #692878. Instability reported with egcs on a RedHat Linux 7.3. Let's comment out: #define FASTCALL __attribute__((stdcall, regparm(3))) and let's try this: */ #define FASTCALL __attribute__((regparm(3))) #define PTRFASTCALL __attribute__((regparm(3))) #endif /* Using __fastcall seems to have an unexpected negative effect under MS VC++, especially for function pointers, so we won't use it for now on that platform. It may be reconsidered for a future release if it can be made more effective. Likely reason: __fastcall on Windows is like stdcall, therefore the compiler cannot perform stack optimizations for call clusters. */ /* Make sure all of these are defined if they aren't already. */ #ifndef FASTCALL #define FASTCALL #endif #ifndef PTRCALL #define PTRCALL #endif #ifndef PTRFASTCALL #define PTRFASTCALL #endif #ifndef XML_MIN_SIZE #if !defined(__cplusplus) && !defined(inline) #ifdef __GNUC__ #define inline __inline #endif /* __GNUC__ */ #endif #endif /* XML_MIN_SIZE */ #ifdef __cplusplus #define inline inline #else #ifndef inline #define inline #endif #endif astropy-1.1.1/cextern/expat/lib/expatw.dsp0000755001134200020070000001155312602615516021512 0ustar embrayscience00000000000000# Microsoft Developer Studio Project File - Name="expatw" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=expatw - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "expatw.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "expatw.mak" CFG="expatw - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "expatw - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "expatw - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "expatw - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\win32\bin\Release" # PROP Intermediate_Dir "..\win32\tmp\Release-w" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XML_UNICODE_WCHAR_T" /FD /c # SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /dll /machine:I386 # ADD LINK32 /nologo /dll /pdb:none /machine:I386 /out:"..\win32\bin\Release\libexpatw.dll" !ELSEIF "$(CFG)" == "expatw - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\win32\bin\Debug" # PROP Intermediate_Dir "..\win32\tmp\Debug-w" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c # ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XML_UNICODE_WCHAR_T" /FR /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 /nologo /dll /pdb:none /debug /machine:I386 /out:"..\win32\bin\Debug\libexpatw.dll" !ENDIF # Begin Target # Name "expatw - Win32 Release" # Name "expatw - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\libexpatw.def # End Source File # Begin Source File SOURCE=.\xmlparse.c !IF "$(CFG)" == "expatw - Win32 Release" !ELSEIF "$(CFG)" == "expatw - Win32 Debug" # ADD CPP /GX- /Od !ENDIF # End Source File # Begin Source File SOURCE=.\xmlrole.c # End Source File # Begin Source File SOURCE=.\xmltok.c # End Source File # Begin Source File SOURCE=.\xmltok_impl.c # End Source File # Begin Source File SOURCE=.\xmltok_ns.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=.\ascii.h # End Source File # Begin Source File SOURCE=.\asciitab.h # End Source File # Begin Source File SOURCE=.\expat.h # End Source File # Begin Source File SOURCE=.\expat_external.h # End Source File # Begin Source File SOURCE=.\iasciitab.h # End Source File # Begin Source File SOURCE=.\internal.h # End Source File # Begin Source File SOURCE=.\latin1tab.h # End Source File # Begin Source File SOURCE=.\nametab.h # End Source File # Begin Source File SOURCE=.\utf8tab.h # End Source File # Begin Source File SOURCE=.\xmlrole.h # End Source File # Begin Source File SOURCE=.\xmltok.h # End Source File # Begin Source File SOURCE=.\xmltok_impl.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project astropy-1.1.1/cextern/expat/lib/expat_static.dsp0000755001134200020070000001023612602615516022667 0ustar embrayscience00000000000000# Microsoft Developer Studio Project File - Name="expat_static" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Static Library" 0x0104 CFG=expat_static - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "expat_static.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "expat_static.mak" CFG="expat_static - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "expat_static - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "expat_static - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "expat_static - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "expat_static___Win32_Release" # PROP BASE Intermediate_Dir "expat_static___Win32_Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\win32\bin\Release" # PROP Intermediate_Dir "..\win32\tmp\Release_static" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "COMPILED_FROM_DSP" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x1009 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\win32\bin\Release\libexpatMT.lib" !ELSEIF "$(CFG)" == "expat_static - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "expat_static___Win32_Debug" # PROP BASE Intermediate_Dir "expat_static___Win32_Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\win32\bin\Debug" # PROP Intermediate_Dir "..\win32\tmp\Debug_static" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c # ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "COMPILED_FROM_DSP" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x1009 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\win32\bin\Debug\libexpatMT.lib" !ENDIF # Begin Target # Name "expat_static - Win32 Release" # Name "expat_static - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\xmlparse.c # End Source File # Begin Source File SOURCE=.\xmlrole.c # End Source File # Begin Source File SOURCE=.\xmltok.c # End Source File # Begin Source File SOURCE=.\xmltok_impl.c # End Source File # Begin Source File SOURCE=.\xmltok_ns.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=.\ascii.h # End Source File # Begin Source File SOURCE=.\asciitab.h # End Source File # Begin Source File SOURCE=.\expat.h # End Source File # Begin Source File SOURCE=.\expat_external.h # End Source File # Begin Source File SOURCE=.\iasciitab.h # End Source File # Begin Source File SOURCE=.\internal.h # End Source File # Begin Source File SOURCE=.\latin1tab.h # End Source File # Begin Source File SOURCE=.\nametab.h # End Source File # Begin Source File SOURCE=.\utf8tab.h # End Source File # Begin Source File SOURCE=.\xmlrole.h # End Source File # Begin Source File SOURCE=.\xmltok.h # End Source File # Begin Source File SOURCE=.\xmltok_impl.h # End Source File # End Group # End Target # End Project astropy-1.1.1/cextern/expat/lib/iasciitab.h0000755001134200020070000000344612602615516021575 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ /* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */ /* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML, /* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML, /* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM, /* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS, /* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS, /* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL, /* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, /* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, /* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI, /* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST, /* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, /* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, /* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB, /* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT, /* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, /* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, /* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, /* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER, astropy-1.1.1/cextern/expat/lib/macconfig.h0000755001134200020070000000245512602615516021572 0ustar embrayscience00000000000000/*================================================================ ** Copyright 2000, Clark Cooper ** All rights reserved. ** ** This is free software. You are permitted to copy, distribute, or modify ** it under the terms of the MIT/X license (contained in the COPYING file ** with this distribution.) ** */ #ifndef MACCONFIG_H #define MACCONFIG_H /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ #define BYTEORDER 4321 /* Define to 1 if you have the `bcopy' function. */ #undef HAVE_BCOPY /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* whether byteorder is bigendian */ #define WORDS_BIGENDIAN /* Define to specify how much context to retain around the current parse point. */ #undef XML_CONTEXT_BYTES /* Define to make parameter entity parsing functionality available. */ #define XML_DTD /* Define to make XML Namespaces functionality available. */ #define XML_NS /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `long' if does not define. */ #define off_t long /* Define to `unsigned' if does not define. */ #undef size_t #endif /* ifndef MACCONFIG_H */ astropy-1.1.1/cextern/expat/lib/utf8tab.h0000755001134200020070000000334312602615516021216 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ /* 0x80 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0x84 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0x88 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0x8C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0x90 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0x94 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0x98 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0x9C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0xA0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0xA4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0xA8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0xAC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0xB0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0xB4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0xB8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0xBC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, /* 0xC0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, /* 0xC4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, /* 0xC8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, /* 0xCC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, /* 0xD0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, /* 0xD4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, /* 0xD8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, /* 0xDC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, /* 0xE0 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3, /* 0xE4 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3, /* 0xE8 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3, /* 0xEC */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3, /* 0xF0 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4, /* 0xF4 */ BT_LEAD4, BT_NONXML, BT_NONXML, BT_NONXML, /* 0xF8 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0xFC */ BT_NONXML, BT_NONXML, BT_MALFORM, BT_MALFORM, astropy-1.1.1/cextern/expat/lib/winconfig.h0000755001134200020070000000130512602615516021620 0ustar embrayscience00000000000000/*================================================================ ** Copyright 2000, Clark Cooper ** All rights reserved. ** ** This is free software. You are permitted to copy, distribute, or modify ** it under the terms of the MIT/X license (contained in the COPYING file ** with this distribution.) */ #ifndef WINCONFIG_H #define WINCONFIG_H #define WIN32_LEAN_AND_MEAN #include #undef WIN32_LEAN_AND_MEAN #include #include #define XML_NS 1 #define XML_DTD 1 #define XML_CONTEXT_BYTES 1024 /* we will assume all Windows platforms are little endian */ #define BYTEORDER 1234 /* Windows has memmove() available. */ #define HAVE_MEMMOVE #endif /* ndef WINCONFIG_H */ astropy-1.1.1/cextern/expat/lib/expat_external.h0000755001134200020070000000644412602615516022671 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #ifndef Expat_External_INCLUDED #define Expat_External_INCLUDED 1 /* External API definitions */ #if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) #define XML_USE_MSC_EXTENSIONS 1 #endif /* Expat tries very hard to make the API boundary very specifically defined. There are two macros defined to control this boundary; each of these can be defined before including this header to achieve some different behavior, but doing so it not recommended or tested frequently. XMLCALL - The calling convention to use for all calls across the "library boundary." This will default to cdecl, and try really hard to tell the compiler that's what we want. XMLIMPORT - Whatever magic is needed to note that a function is to be imported from a dynamically loaded library (.dll, .so, or .sl, depending on your platform). The XMLCALL macro was added in Expat 1.95.7. The only one which is expected to be directly useful in client code is XMLCALL. Note that on at least some Unix versions, the Expat library must be compiled with the cdecl calling convention as the default since system headers may assume the cdecl convention. */ #ifndef XMLCALL #if defined(_MSC_VER) #define XMLCALL __cdecl #elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER) #define XMLCALL __attribute__((cdecl)) #else /* For any platform which uses this definition and supports more than one calling convention, we need to extend this definition to declare the convention used on that platform, if it's possible to do so. If this is the case for your platform, please file a bug report with information on how to identify your platform via the C pre-processor and how to specify the same calling convention as the platform's malloc() implementation. */ #define XMLCALL #endif #endif /* not defined XMLCALL */ #if !defined(XML_STATIC) && !defined(XMLIMPORT) #ifndef XML_BUILDING_EXPAT /* using Expat from an application */ #ifdef XML_USE_MSC_EXTENSIONS #define XMLIMPORT __declspec(dllimport) #endif #endif #endif /* not defined XML_STATIC */ /* If we didn't define it above, define it away: */ #ifndef XMLIMPORT #define XMLIMPORT #endif #define XMLPARSEAPI(type) XMLIMPORT type XMLCALL #ifdef __cplusplus extern "C" { #endif #ifdef XML_UNICODE_WCHAR_T #define XML_UNICODE #endif #ifdef XML_UNICODE /* Information is UTF-16 encoded. */ #ifdef XML_UNICODE_WCHAR_T typedef wchar_t XML_Char; typedef wchar_t XML_LChar; #else typedef unsigned short XML_Char; typedef char XML_LChar; #endif /* XML_UNICODE_WCHAR_T */ #else /* Information is UTF-8 encoded. */ typedef char XML_Char; typedef char XML_LChar; #endif /* XML_UNICODE */ #ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */ #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 typedef __int64 XML_Index; typedef unsigned __int64 XML_Size; #else typedef long long XML_Index; typedef unsigned long long XML_Size; #endif #else typedef long XML_Index; typedef unsigned long XML_Size; #endif /* XML_LARGE_SIZE */ #ifdef __cplusplus } #endif #endif /* not Expat_External_INCLUDED */ astropy-1.1.1/cextern/expat/lib/libexpat.def0000755001134200020070000000375412602615516021766 0ustar embrayscience00000000000000; DEF file for MS VC++ LIBRARY EXPORTS XML_DefaultCurrent @1 XML_ErrorString @2 XML_ExpatVersion @3 XML_ExpatVersionInfo @4 XML_ExternalEntityParserCreate @5 XML_GetBase @6 XML_GetBuffer @7 XML_GetCurrentByteCount @8 XML_GetCurrentByteIndex @9 XML_GetCurrentColumnNumber @10 XML_GetCurrentLineNumber @11 XML_GetErrorCode @12 XML_GetIdAttributeIndex @13 XML_GetInputContext @14 XML_GetSpecifiedAttributeCount @15 XML_Parse @16 XML_ParseBuffer @17 XML_ParserCreate @18 XML_ParserCreateNS @19 XML_ParserCreate_MM @20 XML_ParserFree @21 XML_SetAttlistDeclHandler @22 XML_SetBase @23 XML_SetCdataSectionHandler @24 XML_SetCharacterDataHandler @25 XML_SetCommentHandler @26 XML_SetDefaultHandler @27 XML_SetDefaultHandlerExpand @28 XML_SetDoctypeDeclHandler @29 XML_SetElementDeclHandler @30 XML_SetElementHandler @31 XML_SetEncoding @32 XML_SetEndCdataSectionHandler @33 XML_SetEndDoctypeDeclHandler @34 XML_SetEndElementHandler @35 XML_SetEndNamespaceDeclHandler @36 XML_SetEntityDeclHandler @37 XML_SetExternalEntityRefHandler @38 XML_SetExternalEntityRefHandlerArg @39 XML_SetNamespaceDeclHandler @40 XML_SetNotStandaloneHandler @41 XML_SetNotationDeclHandler @42 XML_SetParamEntityParsing @43 XML_SetProcessingInstructionHandler @44 XML_SetReturnNSTriplet @45 XML_SetStartCdataSectionHandler @46 XML_SetStartDoctypeDeclHandler @47 XML_SetStartElementHandler @48 XML_SetStartNamespaceDeclHandler @49 XML_SetUnknownEncodingHandler @50 XML_SetUnparsedEntityDeclHandler @51 XML_SetUserData @52 XML_SetXmlDeclHandler @53 XML_UseParserAsHandlerArg @54 ; added with version 1.95.3 XML_ParserReset @55 XML_SetSkippedEntityHandler @56 ; added with version 1.95.5 XML_GetFeatureList @57 XML_UseForeignDTD @58 ; added with version 1.95.6 XML_FreeContentModel @59 XML_MemMalloc @60 XML_MemRealloc @61 XML_MemFree @62 ; added with version 1.95.8 XML_StopParser @63 XML_ResumeParser @64 XML_GetParsingStatus @65 astropy-1.1.1/cextern/expat/lib/xmltok_impl.h0000755001134200020070000000122512602615516022175 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ enum { BT_NONXML, BT_MALFORM, BT_LT, BT_AMP, BT_RSQB, BT_LEAD2, BT_LEAD3, BT_LEAD4, BT_TRAIL, BT_CR, BT_LF, BT_GT, BT_QUOT, BT_APOS, BT_EQUALS, BT_QUEST, BT_EXCL, BT_SOL, BT_SEMI, BT_NUM, BT_LSQB, BT_S, BT_NMSTRT, BT_COLON, BT_HEX, BT_DIGIT, BT_NAME, BT_MINUS, BT_OTHER, /* known not to be a name or name start character */ BT_NONASCII, /* might be a name or name start character */ BT_PERCNT, BT_LPAR, BT_RPAR, BT_AST, BT_PLUS, BT_COMMA, BT_VERBAR }; #include astropy-1.1.1/cextern/expat/lib/xmltok.h0000755001134200020070000002566012602615516021165 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #ifndef XmlTok_INCLUDED #define XmlTok_INCLUDED 1 #ifdef __cplusplus extern "C" { #endif /* The following token may be returned by XmlContentTok */ #define XML_TOK_TRAILING_RSQB -5 /* ] or ]] at the end of the scan; might be start of illegal ]]> sequence */ /* The following tokens may be returned by both XmlPrologTok and XmlContentTok. */ #define XML_TOK_NONE -4 /* The string to be scanned is empty */ #define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan; might be part of CRLF sequence */ #define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */ #define XML_TOK_PARTIAL -1 /* only part of a token */ #define XML_TOK_INVALID 0 /* The following tokens are returned by XmlContentTok; some are also returned by XmlAttributeValueTok, XmlEntityTok, XmlCdataSectionTok. */ #define XML_TOK_START_TAG_WITH_ATTS 1 #define XML_TOK_START_TAG_NO_ATTS 2 #define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag */ #define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4 #define XML_TOK_END_TAG 5 #define XML_TOK_DATA_CHARS 6 #define XML_TOK_DATA_NEWLINE 7 #define XML_TOK_CDATA_SECT_OPEN 8 #define XML_TOK_ENTITY_REF 9 #define XML_TOK_CHAR_REF 10 /* numeric character reference */ /* The following tokens may be returned by both XmlPrologTok and XmlContentTok. */ #define XML_TOK_PI 11 /* processing instruction */ #define XML_TOK_XML_DECL 12 /* XML decl or text decl */ #define XML_TOK_COMMENT 13 #define XML_TOK_BOM 14 /* Byte order mark */ /* The following tokens are returned only by XmlPrologTok */ #define XML_TOK_PROLOG_S 15 #define XML_TOK_DECL_OPEN 16 /* */ #define XML_TOK_NAME 18 #define XML_TOK_NMTOKEN 19 #define XML_TOK_POUND_NAME 20 /* #name */ #define XML_TOK_OR 21 /* | */ #define XML_TOK_PERCENT 22 #define XML_TOK_OPEN_PAREN 23 #define XML_TOK_CLOSE_PAREN 24 #define XML_TOK_OPEN_BRACKET 25 #define XML_TOK_CLOSE_BRACKET 26 #define XML_TOK_LITERAL 27 #define XML_TOK_PARAM_ENTITY_REF 28 #define XML_TOK_INSTANCE_START 29 /* The following occur only in element type declarations */ #define XML_TOK_NAME_QUESTION 30 /* name? */ #define XML_TOK_NAME_ASTERISK 31 /* name* */ #define XML_TOK_NAME_PLUS 32 /* name+ */ #define XML_TOK_COND_SECT_OPEN 33 /* */ #define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */ #define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */ #define XML_TOK_CLOSE_PAREN_PLUS 37 /* )+ */ #define XML_TOK_COMMA 38 /* The following token is returned only by XmlAttributeValueTok */ #define XML_TOK_ATTRIBUTE_VALUE_S 39 /* The following token is returned only by XmlCdataSectionTok */ #define XML_TOK_CDATA_SECT_CLOSE 40 /* With namespace processing this is returned by XmlPrologTok for a name with a colon. */ #define XML_TOK_PREFIXED_NAME 41 #ifdef XML_DTD #define XML_TOK_IGNORE_SECT 42 #endif /* XML_DTD */ #ifdef XML_DTD #define XML_N_STATES 4 #else /* not XML_DTD */ #define XML_N_STATES 3 #endif /* not XML_DTD */ #define XML_PROLOG_STATE 0 #define XML_CONTENT_STATE 1 #define XML_CDATA_SECTION_STATE 2 #ifdef XML_DTD #define XML_IGNORE_SECTION_STATE 3 #endif /* XML_DTD */ #define XML_N_LITERAL_TYPES 2 #define XML_ATTRIBUTE_VALUE_LITERAL 0 #define XML_ENTITY_VALUE_LITERAL 1 /* The size of the buffer passed to XmlUtf8Encode must be at least this. */ #define XML_UTF8_ENCODE_MAX 4 /* The size of the buffer passed to XmlUtf16Encode must be at least this. */ #define XML_UTF16_ENCODE_MAX 2 typedef struct position { /* first line and first column are 0 not 1 */ XML_Size lineNumber; XML_Size columnNumber; } POSITION; typedef struct { const char *name; const char *valuePtr; const char *valueEnd; char normalized; } ATTRIBUTE; struct encoding; typedef struct encoding ENCODING; typedef int (PTRCALL *SCANNER)(const ENCODING *, const char *, const char *, const char **); struct encoding { SCANNER scanners[XML_N_STATES]; SCANNER literalScanners[XML_N_LITERAL_TYPES]; int (PTRCALL *sameName)(const ENCODING *, const char *, const char *); int (PTRCALL *nameMatchesAscii)(const ENCODING *, const char *, const char *, const char *); int (PTRFASTCALL *nameLength)(const ENCODING *, const char *); const char *(PTRFASTCALL *skipS)(const ENCODING *, const char *); int (PTRCALL *getAtts)(const ENCODING *enc, const char *ptr, int attsMax, ATTRIBUTE *atts); int (PTRFASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr); int (PTRCALL *predefinedEntityName)(const ENCODING *, const char *, const char *); void (PTRCALL *updatePosition)(const ENCODING *, const char *ptr, const char *end, POSITION *); int (PTRCALL *isPublicId)(const ENCODING *enc, const char *ptr, const char *end, const char **badPtr); void (PTRCALL *utf8Convert)(const ENCODING *enc, const char **fromP, const char *fromLim, char **toP, const char *toLim); void (PTRCALL *utf16Convert)(const ENCODING *enc, const char **fromP, const char *fromLim, unsigned short **toP, const unsigned short *toLim); int minBytesPerChar; char isUtf8; char isUtf16; }; /* Scan the string starting at ptr until the end of the next complete token, but do not scan past eptr. Return an integer giving the type of token. Return XML_TOK_NONE when ptr == eptr; nextTokPtr will not be set. Return XML_TOK_PARTIAL when the string does not contain a complete token; nextTokPtr will not be set. Return XML_TOK_INVALID when the string does not start a valid token; nextTokPtr will be set to point to the character which made the token invalid. Otherwise the string starts with a valid token; nextTokPtr will be set to point to the character following the end of that token. Each data character counts as a single token, but adjacent data characters may be returned together. Similarly for characters in the prolog outside literals, comments and processing instructions. */ #define XmlTok(enc, state, ptr, end, nextTokPtr) \ (((enc)->scanners[state])(enc, ptr, end, nextTokPtr)) #define XmlPrologTok(enc, ptr, end, nextTokPtr) \ XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr) #define XmlContentTok(enc, ptr, end, nextTokPtr) \ XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr) #define XmlCdataSectionTok(enc, ptr, end, nextTokPtr) \ XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr) #ifdef XML_DTD #define XmlIgnoreSectionTok(enc, ptr, end, nextTokPtr) \ XmlTok(enc, XML_IGNORE_SECTION_STATE, ptr, end, nextTokPtr) #endif /* XML_DTD */ /* This is used for performing a 2nd-level tokenization on the content of a literal that has already been returned by XmlTok. */ #define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \ (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr)) #define XmlAttributeValueTok(enc, ptr, end, nextTokPtr) \ XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr) #define XmlEntityValueTok(enc, ptr, end, nextTokPtr) \ XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr) #define XmlSameName(enc, ptr1, ptr2) (((enc)->sameName)(enc, ptr1, ptr2)) #define XmlNameMatchesAscii(enc, ptr1, end1, ptr2) \ (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2)) #define XmlNameLength(enc, ptr) \ (((enc)->nameLength)(enc, ptr)) #define XmlSkipS(enc, ptr) \ (((enc)->skipS)(enc, ptr)) #define XmlGetAttributes(enc, ptr, attsMax, atts) \ (((enc)->getAtts)(enc, ptr, attsMax, atts)) #define XmlCharRefNumber(enc, ptr) \ (((enc)->charRefNumber)(enc, ptr)) #define XmlPredefinedEntityName(enc, ptr, end) \ (((enc)->predefinedEntityName)(enc, ptr, end)) #define XmlUpdatePosition(enc, ptr, end, pos) \ (((enc)->updatePosition)(enc, ptr, end, pos)) #define XmlIsPublicId(enc, ptr, end, badPtr) \ (((enc)->isPublicId)(enc, ptr, end, badPtr)) #define XmlUtf8Convert(enc, fromP, fromLim, toP, toLim) \ (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim)) #define XmlUtf16Convert(enc, fromP, fromLim, toP, toLim) \ (((enc)->utf16Convert)(enc, fromP, fromLim, toP, toLim)) typedef struct { ENCODING initEnc; const ENCODING **encPtr; } INIT_ENCODING; int XmlParseXmlDecl(int isGeneralTextEntity, const ENCODING *enc, const char *ptr, const char *end, const char **badPtr, const char **versionPtr, const char **versionEndPtr, const char **encodingNamePtr, const ENCODING **namedEncodingPtr, int *standalonePtr); int XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name); const ENCODING *XmlGetUtf8InternalEncoding(void); const ENCODING *XmlGetUtf16InternalEncoding(void); int FASTCALL XmlUtf8Encode(int charNumber, char *buf); int FASTCALL XmlUtf16Encode(int charNumber, unsigned short *buf); int XmlSizeOfUnknownEncoding(void); typedef int (XMLCALL *CONVERTER) (void *userData, const char *p); ENCODING * XmlInitUnknownEncoding(void *mem, int *table, CONVERTER convert, void *userData); int XmlParseXmlDeclNS(int isGeneralTextEntity, const ENCODING *enc, const char *ptr, const char *end, const char **badPtr, const char **versionPtr, const char **versionEndPtr, const char **encodingNamePtr, const ENCODING **namedEncodingPtr, int *standalonePtr); int XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name); const ENCODING *XmlGetUtf8InternalEncodingNS(void); const ENCODING *XmlGetUtf16InternalEncodingNS(void); ENCODING * XmlInitUnknownEncodingNS(void *mem, int *table, CONVERTER convert, void *userData); #ifdef __cplusplus } #endif #endif /* not XmlTok_INCLUDED */ astropy-1.1.1/cextern/expat/expat.pc.in0000644001134200020070000000034712602615516020772 0ustar embrayscience00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: expat Version: @PACKAGE_VERSION@ Description: expat XML parser URL: http://www.libexpat.org Libs: -L${libdir} -lexpat Cflags: -I${includedir} astropy-1.1.1/cextern/expat/README0000755001134200020070000001323612602615516017604 0ustar embrayscience00000000000000 Expat, Release 2.1.0 This is Expat, a C library for parsing XML, written by James Clark. Expat is a stream-oriented XML parser. This means that you register handlers with the parser before starting the parse. These handlers are called when the parser discovers the associated structures in the document being parsed. A start tag is an example of the kind of structures for which you may register handlers. Windows users should use the expat_win32bin package, which includes both precompiled libraries and executables, and source code for developers. Expat is free software. You may copy, distribute, and modify it under the terms of the License contained in the file COPYING distributed with this package. This license is the same as the MIT/X Consortium license. Versions of Expat that have an odd minor version (the middle number in the release above), are development releases and should be considered as beta software. Releases with even minor version numbers are intended to be production grade software. If you are building Expat from a check-out from the CVS repository, you need to run a script that generates the configure script using the GNU autoconf and libtool tools. To do this, you need to have autoconf 2.58 or newer. Run the script like this: ./buildconf.sh Once this has been done, follow the same instructions as for building from a source distribution. To build Expat from a source distribution, you first run the configuration shell script in the top level distribution directory: ./configure There are many options which you may provide to configure (which you can discover by running configure with the --help option). But the one of most interest is the one that sets the installation directory. By default, the configure script will set things up to install libexpat into /usr/local/lib, expat.h into /usr/local/include, and xmlwf into /usr/local/bin. If, for example, you'd prefer to install into /home/me/mystuff/lib, /home/me/mystuff/include, and /home/me/mystuff/bin, you can tell configure about that with: ./configure --prefix=/home/me/mystuff Another interesting option is to enable 64-bit integer support for line and column numbers and the over-all byte index: ./configure CPPFLAGS=-DXML_LARGE_SIZE However, such a modification would be a breaking change to the ABI and is therefore not recommended for general use - e.g. as part of a Linux distribution - but rather for builds with special requirements. After running the configure script, the "make" command will build things and "make install" will install things into their proper location. Have a look at the "Makefile" to learn about additional "make" options. Note that you need to have write permission into the directories into which things will be installed. If you are interested in building Expat to provide document information in UTF-16 encoding rather than the default UTF-8, follow these instructions (after having run "make distclean"): 1. For UTF-16 output as unsigned short (and version/error strings as char), run: ./configure CPPFLAGS=-DXML_UNICODE For UTF-16 output as wchar_t (incl. version/error strings), run: ./configure CFLAGS="-g -O2 -fshort-wchar" \ CPPFLAGS=-DXML_UNICODE_WCHAR_T 2. Edit the MakeFile, changing: LIBRARY = libexpat.la to: LIBRARY = libexpatw.la (Note the additional "w" in the library name.) 3. Run "make buildlib" (which builds the library only). Or, to save step 2, run "make buildlib LIBRARY=libexpatw.la". 4. Run "make installlib" (which installs the library only). Or, if step 2 was omitted, run "make installlib LIBRARY=libexpatw.la". Using DESTDIR or INSTALL_ROOT is enabled, with INSTALL_ROOT being the default value for DESTDIR, and the rest of the make file using only DESTDIR. It works as follows: $ make install DESTDIR=/path/to/image overrides the in-makefile set DESTDIR, while both $ INSTALL_ROOT=/path/to/image make install $ make install INSTALL_ROOT=/path/to/image use DESTDIR=$(INSTALL_ROOT), even if DESTDIR eventually is defined in the environment, because variable-setting priority is 1) commandline 2) in-makefile 3) environment Note: This only applies to the Expat library itself, building UTF-16 versions of xmlwf and the tests is currently not supported. Note for Solaris users: The "ar" command is usually located in "/usr/ccs/bin", which is not in the default PATH. You will need to add this to your path for the "make" command, and probably also switch to GNU make (the "make" found in /usr/ccs/bin does not seem to work properly -- appearantly it does not understand .PHONY directives). If you're using ksh or bash, use this command to build: PATH=/usr/ccs/bin:$PATH make When using Expat with a project using autoconf for configuration, you can use the probing macro in conftools/expat.m4 to determine how to include Expat. See the comments at the top of that file for more information. A reference manual is available in the file doc/reference.html in this distribution. The homepage for this project is http://www.libexpat.org/. There are links there to connect you to the bug reports page. If you need to report a bug when you don't have access to a browser, you may also send a bug report by email to expat-bugs@mail.libexpat.org. Discussion related to the direction of future expat development takes place on expat-discuss@mail.libexpat.org. Archives of this list and other Expat-related lists may be found at: http://mail.libexpat.org/mailman/listinfo/ astropy-1.1.1/cextern/expat/examples/0000755001134200020070000000000012644022135020525 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/examples/elements.dsp0000755001134200020070000000674412602615516023074 0ustar embrayscience00000000000000# Microsoft Developer Studio Project File - Name="elements" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=elements - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "elements.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "elements.mak" CFG="elements - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "elements - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "elements - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "elements - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\win32\bin\Release" # PROP Intermediate_Dir "..\win32\tmp\Release-elements" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FD /c # SUBTRACT CPP /X /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:console /machine:I386 # ADD LINK32 libexpatMT.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\win32\bin\Release" /out:"..\win32\bin\Release\elements.exe" !ELSEIF "$(CFG)" == "elements - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\win32\bin\Debug" # PROP Intermediate_Dir "..\win32\tmp\Debug-elements" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FR /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 libexpatMT.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\win32\bin\Debug" /out:"..\win32\bin\Debug\elements.exe" !ENDIF # Begin Target # Name "elements - Win32 Release" # Name "elements - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\elements.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project astropy-1.1.1/cextern/expat/examples/elements.c0000755001134200020070000000312112602615516022512 0ustar embrayscience00000000000000/* This is simple demonstration of how to use expat. This program reads an XML document from standard input and writes a line with the name of each element to standard output indenting child elements by one tab stop more than their parent element. It must be used with Expat compiled for UTF-8 output. */ #include #include "expat.h" #if defined(__amigaos__) && defined(__USE_INLINE__) #include #endif #ifdef XML_LARGE_SIZE #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 #define XML_FMT_INT_MOD "I64" #else #define XML_FMT_INT_MOD "ll" #endif #else #define XML_FMT_INT_MOD "l" #endif static void XMLCALL startElement(void *userData, const char *name, const char **atts) { int i; int *depthPtr = (int *)userData; for (i = 0; i < *depthPtr; i++) putchar('\t'); puts(name); *depthPtr += 1; } static void XMLCALL endElement(void *userData, const char *name) { int *depthPtr = (int *)userData; *depthPtr -= 1; } int main(int argc, char *argv[]) { char buf[BUFSIZ]; XML_Parser parser = XML_ParserCreate(NULL); int done; int depth = 0; XML_SetUserData(parser, &depth); XML_SetElementHandler(parser, startElement, endElement); do { int len = (int)fread(buf, 1, sizeof(buf), stdin); done = len < sizeof(buf); if (XML_Parse(parser, buf, len, done) == XML_STATUS_ERROR) { fprintf(stderr, "%s at line %" XML_FMT_INT_MOD "u\n", XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser)); return 1; } } while (!done); XML_ParserFree(parser); return 0; } astropy-1.1.1/cextern/expat/examples/outline.dsp0000755001134200020070000000666012602615516022734 0ustar embrayscience00000000000000# Microsoft Developer Studio Project File - Name="outline" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=outline - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "outline.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "outline.mak" CFG="outline - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "outline - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "outline - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "outline - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\win32\bin\Release" # PROP Intermediate_Dir "..\win32\tmp\Release-outline" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c # SUBTRACT CPP /X /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:console /machine:I386 # ADD LINK32 libexpat.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\win32\bin\Release" /out:"..\win32\bin\Release\outline.exe" !ELSEIF "$(CFG)" == "outline - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\win32\bin\Debug" # PROP Intermediate_Dir "..\win32\tmp\Debug-outline" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 libexpat.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\win32\bin\Debug" /out:"..\win32\bin\Debug\outline.exe" !ENDIF # Begin Target # Name "outline - Win32 Release" # Name "outline - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\outline.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project astropy-1.1.1/cextern/expat/examples/outline.c0000755001134200020070000000455712602615516022373 0ustar embrayscience00000000000000/***************************************************************** * outline.c * * Copyright 1999, Clark Cooper * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the license contained in the * COPYING file that comes with the expat distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Read an XML document from standard input and print an element * outline on standard output. * Must be used with Expat compiled for UTF-8 output. */ #include #include #if defined(__amigaos__) && defined(__USE_INLINE__) #include #endif #ifdef XML_LARGE_SIZE #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 #define XML_FMT_INT_MOD "I64" #else #define XML_FMT_INT_MOD "ll" #endif #else #define XML_FMT_INT_MOD "l" #endif #define BUFFSIZE 8192 char Buff[BUFFSIZE]; int Depth; static void XMLCALL start(void *data, const char *el, const char **attr) { int i; for (i = 0; i < Depth; i++) printf(" "); printf("%s", el); for (i = 0; attr[i]; i += 2) { printf(" %s='%s'", attr[i], attr[i + 1]); } printf("\n"); Depth++; } static void XMLCALL end(void *data, const char *el) { Depth--; } int main(int argc, char *argv[]) { XML_Parser p = XML_ParserCreate(NULL); if (! p) { fprintf(stderr, "Couldn't allocate memory for parser\n"); exit(-1); } XML_SetElementHandler(p, start, end); for (;;) { int done; int len; len = (int)fread(Buff, 1, BUFFSIZE, stdin); if (ferror(stdin)) { fprintf(stderr, "Read error\n"); exit(-1); } done = feof(stdin); if (XML_Parse(p, Buff, len, done) == XML_STATUS_ERROR) { fprintf(stderr, "Parse error at line %" XML_FMT_INT_MOD "u:\n%s\n", XML_GetCurrentLineNumber(p), XML_ErrorString(XML_GetErrorCode(p))); exit(-1); } if (done) break; } XML_ParserFree(p); return 0; } astropy-1.1.1/cextern/expat/Changes0000755001134200020070000002616312602615516020222 0ustar embrayscience00000000000000Release 2.1.0 Sat March 24 2012 - Bug Fixes: #1742315: Harmful XML_ParserCreateNS suggestion. #2895533: CVE-2012-1147 - Resource leak in readfilemap.c. #1785430: Expat build fails on linux-amd64 with gcc version>=4.1 -O3. #1983953, 2517952, 2517962, 2649838: Build modifications using autoreconf instead of buildconf.sh. #2815947, #2884086: OBJEXT and EXEEXT support while building. #1990430: CVE-2009-3720 - Parser crash with special UTF-8 sequences. #2517938: xmlwf should return non-zero exit status if not well-formed. #2517946: Wrong statement about XMLDecl in xmlwf.1 and xmlwf.sgml. #2855609: Dangling positionPtr after error. #2894085: CVE-2009-3560 - Buffer over-read and crash in big2_toUtf8(). #2958794: CVE-2012-1148 - Memory leak in poolGrow. #2990652: CMake support. #3010819: UNEXPECTED_STATE with a trailing "%" in entity value. #3206497: Unitialized memory returned from XML_Parse. #3287849: make check fails on mingw-w64. #3496608: CVE-2012-0876 - Hash DOS attack. - Patches: #1749198: pkg-config support. #3010222: Fix for bug #3010819. #3312568: CMake support. #3446384: Report byte offsets for attr names and values. - New Features / API changes: Added new API member XML_SetHashSalt() that allows setting an intial value (salt) for hash calculations. This is part of the fix for bug #3496608 to randomize hash parameters. When compiled with XML_ATTR_INFO defined, adds new API member XML_GetAttributeInfo() that allows retrieving the byte offsets for attribute names and values (patch #3446384). Added CMake build system. See bug #2990652 and patch #3312568. Added run-benchmark target to Makefile.in - relies on testdata module present in the same relative location as in the repository. Release 2.0.1 Tue June 5 2007 - Fixed bugs #1515266, #1515600: The character data handler's calling of XML_StopParser() was not handled properly; if the parser was stopped and the handler set to NULL, the parser would segfault. - Fixed bug #1690883: Expat failed on EBCDIC systems as it assumed some character constants to be ASCII encoded. - Minor cleanups of the test harness. - Fixed xmlwf bug #1513566: "out of memory" error on file size zero. - Fixed outline.c bug #1543233: missing a final XML_ParserFree() call. - Fixes and improvements for Windows platform: bugs #1409451, #1476160, #1548182, #1602769, #1717322. - Build fixes for various platforms: HP-UX, Tru64, Solaris 9: patch #1437840, bug #1196180. All Unix: #1554618 (refreshed config.sub/config.guess). #1490371, #1613457: support both, DESTDIR and INSTALL_ROOT, without relying on GNU-Make specific features. #1647805: Patched configure.in to work better with Intel compiler. - Fixes to Makefile.in to have make check work correctly: bugs #1408143, #1535603, #1536684. - Added Open Watcom support: patch #1523242. Release 2.0.0 Wed Jan 11 2006 - We no longer use the "check" library for C unit testing; we always use the (partial) internal implementation of the API. - Report XML_NS setting via XML_GetFeatureList(). - Fixed headers for use from C++. - XML_GetCurrentLineNumber() and XML_GetCurrentColumnNumber() now return unsigned integers. - Added XML_LARGE_SIZE switch to enable 64-bit integers for byte indexes and line/column numbers. - Updated to use libtool 1.5.22 (the most recent). - Added support for AmigaOS. - Some mostly minor bug fixes. SF issues include: #1006708, #1021776, #1023646, #1114960, #1156398, #1221160, #1271642. Release 1.95.8 Fri Jul 23 2004 - Major new feature: suspend/resume. Handlers can now request that a parse be suspended for later resumption or aborted altogether. See "Temporarily Stopping Parsing" in the documentation for more details. - Some mostly minor bug fixes, but compilation should no longer generate warnings on most platforms. SF issues include: #827319, #840173, #846309, #888329, #896188, #923913, #928113, #961698, #985192. Release 1.95.7 Mon Oct 20 2003 - Fixed enum XML_Status issue (reported on SourceForge many times), so compilers that are properly picky will be happy. - Introduced an XMLCALL macro to control the calling convention used by the Expat API; this macro should be used to annotate prototypes and definitions of callback implementations in code compiled with a calling convention other than the default convention for the host platform. - Improved ability to build without the configure-generated expat_config.h header. This is useful for applications which embed Expat rather than linking in the library. - Fixed a variety of bugs: see SF issues #458907, #609603, #676844, #679754, #692878, #692964, #695401, #699323, #699487, #820946. - Improved hash table lookups. - Added more regression tests and improved documentation. Release 1.95.6 Tue Jan 28 2003 - Added XML_FreeContentModel(). - Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree(). - Fixed a variety of bugs: see SF issues #615606, #616863, #618199, #653180, #673791. - Enhanced the regression test suite. - Man page improvements: includes SF issue #632146. Release 1.95.5 Fri Sep 6 2002 - Added XML_UseForeignDTD() for improved SAX2 support. - Added XML_GetFeatureList(). - Defined XML_Bool type and the values XML_TRUE and XML_FALSE. - Use an incomplete struct instead of a void* for the parser (may not retain). - Fixed UTF-8 decoding bug that caused legal UTF-8 to be rejected. - Finally fixed bug where default handler would report DTD events that were already handled by another handler. Initial patch contributed by Darryl Miles. - Removed unnecessary DllMain() function that caused static linking into a DLL to be difficult. - Added VC++ projects for building static libraries. - Reduced line-length for all source code and headers to be no longer than 80 characters, to help with AS/400 support. - Reduced memory copying during parsing (SF patch #600964). - Fixed a variety of bugs: see SF issues #580793, #434664, #483514, #580503, #581069, #584041, #584183, #584832, #585537, #596555, #596678, #598352, #598944, #599715, #600479, #600971. Release 1.95.4 Fri Jul 12 2002 - Added support for VMS, contributed by Craig Berry. See vms/README.vms for more information. - Added Mac OS (classic) support, with a makefile for MPW, contributed by Thomas Wegner and Daryle Walker. - Added Borland C++ Builder 5 / BCC 5.5 support, contributed by Patrick McConnell (SF patch #538032). - Fixed a variety of bugs: see SF issues #441449, #563184, #564342, #566334, #566901, #569461, #570263, #575168, #579196. - Made skippedEntityHandler conform to SAX2 (see source comment) - Re-implemented WFC: Entity Declared from XML 1.0 spec and added a new error "entity declared in parameter entity": see SF bug report #569461 and SF patch #578161 - Re-implemented section 5.1 from XML 1.0 spec: see SF bug report #570263 and SF patch #578161 Release 1.95.3 Mon Jun 3 2002 - Added a project to the MSVC workspace to create a wchar_t version of the library; the DLLs are named libexpatw.dll. - Changed the name of the Windows DLLs from expat.dll to libexpat.dll; this fixes SF bug #432456. - Added the XML_ParserReset() API function. - Fixed XML_SetReturnNSTriplet() to work for element names. - Made the XML_UNICODE builds usable (thanks, Karl!). - Allow xmlwf to read from standard input. - Install a man page for xmlwf on Unix systems. - Fixed many bugs; see SF bug reports #231864, #461380, #464837, #466885, #469226, #477667, #484419, #487840, #494749, #496505, #547350. Other bugs which we can't test as easily may also have been fixed, especially in the area of build support. Release 1.95.2 Fri Jul 27 2001 - More changes to make MSVC happy with the build; add a single workspace to support both the library and xmlwf application. - Added a Windows installer for Windows users; includes xmlwf.exe. - Added compile-time constants that can be used to determine the Expat version - Removed a lot of GNU-specific dependencies to aide portability among the various Unix flavors. - Fix the UTF-8 BOM bug. - Cleaned up warning messages for several compilers. - Added the -Wall, -Wstrict-prototypes options for GCC. Release 1.95.1 Sun Oct 22 15:11:36 EDT 2000 - Changes to get expat to build under Microsoft compiler - Removed all aborts and instead return an UNEXPECTED_STATE error. - Fixed a bug where a stray '%' in an entity value would cause an abort. - Defined XML_SetEndNamespaceDeclHandler. Thanks to Darryl Miles for finding this oversight. - Changed default patterns in lib/Makefile.in to fit non-GNU makes Thanks to robin@unrated.net for reporting and providing an account to test on. - The reference had the wrong label for XML_SetStartNamespaceDecl. Reported by an anonymous user. Release 1.95.0 Fri Sep 29 2000 - XML_ParserCreate_MM Allows you to set a memory management suite to replace the standard malloc,realloc, and free. - XML_SetReturnNSTriplet If you turn this feature on when namespace processing is in effect, then qualified, prefixed element and attribute names are returned as "uri|name|prefix" where '|' is whatever separator character is used in namespace processing. - Merged in features from perl-expat o XML_SetElementDeclHandler o XML_SetAttlistDeclHandler o XML_SetXmlDeclHandler o XML_SetEntityDeclHandler o StartDoctypeDeclHandler takes 3 additional parameters: sysid, pubid, has_internal_subset o Many paired handler setters (like XML_SetElementHandler) now have corresponding individual handler setters o XML_GetInputContext for getting the input context of the current parse position. - Added reference material - Packaged into a distribution that builds a sharable library astropy-1.1.1/cextern/expat/COPYING0000755001134200020070000000227012602615516017753 0ustar embrayscience00000000000000Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. astropy-1.1.1/cextern/expat/conftools/0000755001134200020070000000000012644022135020715 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/conftools/PrintPath0000755001134200020070000000466012602615516022567 0ustar embrayscience00000000000000#!/bin/sh # Look for program[s] somewhere in $PATH. # # Options: # -s # Do not print out full pathname. (silent) # -pPATHNAME # Look in PATHNAME instead of $PATH # # Usage: # PrintPath [-s] [-pPATHNAME] program [program ...] # # Initially written by Jim Jagielski for the Apache configuration mechanism # (with kudos to Kernighan/Pike) # # This script falls under the Apache License. # See http://www.apache.org/licenses/LICENSE ## # Some "constants" ## pathname=$PATH echo="yes" ## # Find out what OS we are running for later on ## os=`(uname) 2>/dev/null` ## # Parse command line ## for args in $* do case $args in -s ) echo="no" ;; -p* ) pathname="`echo $args | sed 's/^..//'`" ;; * ) programs="$programs $args" ;; esac done ## # Now we make the adjustments required for OS/2 and everyone # else :) # # First of all, all OS/2 programs have the '.exe' extension. # Next, we adjust PATH (or what was given to us as PATH) to # be whitespace separated directories. # Finally, we try to determine the best flag to use for # test/[] to look for an executable file. OS/2 just has '-r' # but with other OSs, we do some funny stuff to check to see # if test/[] knows about -x, which is the preferred flag. ## if [ "x$os" = "xOS/2" ] then ext=".exe" pathname=`echo -E $pathname | sed 's/^;/.;/ s/;;/;.;/g s/;$/;./ s/;/ /g s/\\\\/\\//g' ` test_exec_flag="-r" else ext="" # No default extensions pathname=`echo $pathname | sed 's/^:/.:/ s/::/:.:/g s/:$/:./ s/:/ /g' ` # Here is how we test to see if test/[] can handle -x testfile="pp.t.$$" cat > $testfile </dev/null`; then test_exec_flag="-x" else test_exec_flag="-r" fi rm -f $testfile fi for program in $programs do for path in $pathname do if [ $test_exec_flag $path/${program}${ext} ] && \ [ ! -d $path/${program}${ext} ]; then if [ "x$echo" = "xyes" ]; then echo $path/${program}${ext} fi exit 0 fi # Next try without extension (if one was used above) if [ "x$ext" != "x" ]; then if [ $test_exec_flag $path/${program} ] && \ [ ! -d $path/${program} ]; then if [ "x$echo" = "xyes" ]; then echo $path/${program} fi exit 0 fi fi done done exit 1 astropy-1.1.1/cextern/expat/conftools/ac_c_bigendian_cross.m40000755001134200020070000000562412602615516025274 0ustar embrayscience00000000000000dnl @synopsis AC_C_BIGENDIAN_CROSS dnl dnl Check endianess even when crosscompiling dnl (partially based on the original AC_C_BIGENDIAN). dnl dnl The implementation will create a binary, and instead of running dnl the binary it will be grep'ed for some symbols that will look dnl different for different endianess of the binary. dnl dnl @version $Id: ac_c_bigendian_cross.m4,v 1.2 2001/10/01 20:03:13 fdrake Exp $ dnl @author Guido Draheim dnl AC_DEFUN([AC_C_BIGENDIAN_CROSS], [AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian, [ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. AC_TRY_COMPILE([#include #include ], [ #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif], [# It does; now see whether it defined to BIG_ENDIAN or not. AC_TRY_COMPILE([#include #include ], [ #if BYTE_ORDER != BIG_ENDIAN not big endian #endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)]) if test $ac_cv_c_bigendian = unknown; then AC_TRY_RUN([main () { /* Are we little or big endian? From Harbison&Steele. */ union { long l; char c[sizeof (long)]; } u; u.l = 1; exit (u.c[sizeof (long) - 1] == 1); }], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes, [ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ]) fi]) if test $ac_cv_c_bigendian = unknown; then AC_MSG_CHECKING(to probe for byte ordering) [ cat >conftest.c <&AC_FD_MSG ac_cv_c_bigendian=yes fi if test `grep -l LiTTleEnDian conftest.o` ; then echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG if test $ac_cv_c_bigendian = yes ; then ac_cv_c_bigendian=unknown; else ac_cv_c_bigendian=no fi fi echo $ac_n 'guessing bigendian ... ' >&AC_FD_MSG fi fi AC_MSG_RESULT($ac_cv_c_bigendian) fi if test $ac_cv_c_bigendian = yes; then AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian]) BYTEORDER=4321 else BYTEORDER=1234 fi AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN]) if test $ac_cv_c_bigendian = unknown; then AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian) fi ]) astropy-1.1.1/cextern/expat/conftools/get-version.sh0000755001134200020070000000236212602615516023526 0ustar embrayscience00000000000000#!/bin/sh # # USAGE: get-version.sh path/to/expat.h # # This script will print Expat's version number on stdout. For example: # # $ ./conftools/get-version.sh ./lib/expat.h # 1.95.3 # $ # if test $# = 0; then echo "ERROR: pathname for expat.h was not provided." echo "" echo "USAGE: $0 path/to/expat.h" exit 1 fi if test $# != 1; then echo "ERROR: too many arguments were provided." echo "" echo "USAGE: $0 path/to/expat.h" exit 1 fi hdr="$1" if test ! -r "$hdr"; then echo "ERROR: '$hdr' does not exist, or is not readable." exit 1 fi MAJOR_VERSION="`sed -n -e '/MAJOR_VERSION/s/[^0-9]*//gp' $hdr`" MINOR_VERSION="`sed -n -e '/MINOR_VERSION/s/[^0-9]*//gp' $hdr`" MICRO_VERSION="`sed -n -e '/MICRO_VERSION/s/[^0-9]*//gp' $hdr`" # Determine how to tell echo not to print the trailing \n. This is # similar to Autoconf's @ECHO_C@ and @ECHO_N@; however, we don't # generate this file via autoconf (in fact, get-version.sh is used # to *create* ./configure), so we just do something similar inline. case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ;; *) ECHO_N= ECHO_C='\c' ;; esac echo $ECHO_N "$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$ECHO_C" astropy-1.1.1/cextern/expat/conftools/ltmain.sh0000755001134200020070000105052712602615516022557 0ustar embrayscience00000000000000 # libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4 Debian-2.4-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4 Debian-2.4-2ubuntu1" TIMESTAMP="" package_revision=1.3293 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_apped perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 astropy-1.1.1/cextern/expat/conftools/install-sh0000755001134200020070000003253712602615516022740 0ustar embrayscience00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: astropy-1.1.1/cextern/expat/conftools/expat.m40000755001134200020070000000264212602615516022314 0ustar embrayscience00000000000000dnl Check if --with-expat[=PREFIX] is specified and dnl Expat >= 1.95.0 is installed in the system. dnl If yes, substitute EXPAT_CFLAGS, EXPAT_LIBS with regard to dnl the specified PREFIX and set with_expat to PREFIX, or 'yes' if PREFIX dnl has not been specified. Also HAVE_LIBEXPAT, HAVE_EXPAT_H are defined. dnl If --with-expat has not been specified, set with_expat to 'no'. dnl In addition, an Automake conditional EXPAT_INSTALLED is set accordingly. dnl This is necessary to adapt a whole lot of packages that have expat dnl bundled as a static library. AC_DEFUN([AM_WITH_EXPAT], [ AC_ARG_WITH(expat, [ --with-expat=PREFIX Use system Expat library], , with_expat=no) AM_CONDITIONAL(EXPAT_INSTALLED, test $with_expat != no) EXPAT_CFLAGS= EXPAT_LIBS= if test $with_expat != no; then if test $with_expat != yes; then EXPAT_CFLAGS="-I$with_expat/include" EXPAT_LIBS="-L$with_expat/lib" fi AC_CHECK_LIB(expat, XML_ParserCreate, [ EXPAT_LIBS="$EXPAT_LIBS -lexpat" expat_found=yes ], [ expat_found=no ], "$EXPAT_LIBS") if test $expat_found = no; then AC_MSG_ERROR([Could not find the Expat library]) fi expat_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $EXPAT_CFLAGS" AC_CHECK_HEADERS(expat.h, , expat_found=no) if test $expat_found = no; then AC_MSG_ERROR([Could not find expat.h]) fi CFLAGS="$expat_save_CFLAGS" fi AC_SUBST(EXPAT_CFLAGS) AC_SUBST(EXPAT_LIBS) ]) astropy-1.1.1/cextern/expat/win32/0000755001134200020070000000000012644022135017651 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/win32/expat.iss0000755001134200020070000001036112602615516021523 0ustar embrayscience00000000000000; Basic setup script for the Inno Setup installer builder. For more ; information on the free installer builder, see www.jrsoftware.org. ; ; This script was contributed by Tim Peters. ; It was designed for Inno Setup 2.0.19 but works with later versions as well. [Setup] AppName=Expat AppId=expat AppVersion=2.1.0 AppVerName=Expat 2.1.0 AppCopyright=Copyright © 1998-2012 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers AppPublisher=The Expat Developers AppPublisherURL=http://www.libexpat.org/ AppSupportURL=http://www.libexpat.org/ AppUpdatesURL=http://www.libexpat.org/ UninstallDisplayName=Expat XML Parser 2.1.0 VersionInfoVersion=2.1.0 DefaultDirName={pf}\Expat 2.1.0 UninstallFilesDir={app}\Uninstall Compression=lzma SolidCompression=yes SourceDir=.. OutputDir=win32 DisableStartupPrompt=yes AllowNoIcons=yes DisableProgramGroupPage=yes DisableReadyPage=yes [Files] Flags: ignoreversion; Source: win32\bin\Release\xmlwf.exe; DestDir: "{app}\Bin" Flags: ignoreversion; Source: win32\MANIFEST.txt; DestDir: "{app}" Flags: ignoreversion; Source: Changes; DestDir: "{app}"; DestName: Changes.txt Flags: ignoreversion; Source: COPYING; DestDir: "{app}"; DestName: COPYING.txt Flags: ignoreversion; Source: README; DestDir: "{app}"; DestName: README.txt Flags: ignoreversion; Source: doc\*.html; DestDir: "{app}\Doc" Flags: ignoreversion; Source: doc\*.css; DestDir: "{app}\Doc" Flags: ignoreversion; Source: doc\*.png; DestDir: "{app}\Doc" Flags: ignoreversion; Source: win32\bin\Release\*.dll; DestDir: "{app}\Bin" Flags: ignoreversion; Source: win32\bin\Release\*.lib; DestDir: "{app}\Bin" Flags: ignoreversion; Source: expat.dsw; DestDir: "{app}\Source" Flags: ignoreversion; Source: win32\README.txt; DestDir: "{app}\Source" Flags: ignoreversion; Source: bcb5\*.bp*; DestDir: "{app}\Source\bcb5" Flags: ignoreversion; Source: bcb5\*.mak; DestDir: "{app}\Source\bcb5" Flags: ignoreversion; Source: bcb5\*.def; DestDir: "{app}\Source\bcb5" Flags: ignoreversion; Source: bcb5\*.txt; DestDir: "{app}\Source\bcb5" Flags: ignoreversion; Source: bcb5\*.bat; DestDir: "{app}\Source\bcb5" Flags: ignoreversion; Source: lib\*.c; DestDir: "{app}\Source\lib" Flags: ignoreversion; Source: lib\*.h; DestDir: "{app}\Source\lib" Flags: ignoreversion; Source: lib\*.def; DestDir: "{app}\Source\lib" Flags: ignoreversion; Source: lib\*.dsp; DestDir: "{app}\Source\lib" Flags: ignoreversion; Source: examples\*.c; DestDir: "{app}\Source\examples" Flags: ignoreversion; Source: examples\*.dsp; DestDir: "{app}\Source\examples" Flags: ignoreversion; Source: tests\*.c; DestDir: "{app}\Source\tests" Flags: ignoreversion; Source: tests\*.cpp; DestDir: "{app}\Source\tests" Flags: ignoreversion; Source: tests\*.h; DestDir: "{app}\Source\tests" Flags: ignoreversion; Source: tests\README.txt; DestDir: "{app}\Source\tests" Flags: ignoreversion; Source: tests\benchmark\*.c; DestDir: "{app}\Source\tests\benchmark" Flags: ignoreversion; Source: tests\benchmark\*.ds*; DestDir: "{app}\Source\tests\benchmark" Flags: ignoreversion; Source: tests\benchmark\README.txt; DestDir: "{app}\Source\tests\benchmark" Flags: ignoreversion; Source: xmlwf\*.c*; DestDir: "{app}\Source\xmlwf" Flags: ignoreversion; Source: xmlwf\*.h; DestDir: "{app}\Source\xmlwf" Flags: ignoreversion; Source: xmlwf\*.dsp; DestDir: "{app}\Source\xmlwf" [Messages] WelcomeLabel1=Welcome to the Expat XML Parser Setup Wizard WelcomeLabel2=This will install [name/ver] on your computer.%n%nExpat is an XML parser with a C-language API, and is primarily made available to allow developers to build applications which use XML using a portable API and fast implementation.%n%nIt is strongly recommended that you close all other applications you have running before continuing. This will help prevent any conflicts during the installation process. astropy-1.1.1/cextern/expat/win32/README.txt0000755001134200020070000000536412602615516021367 0ustar embrayscience00000000000000 Expat can be built on Windows in three ways: using MS Visual C++ (6.0 or .NET), Borland C++ Builder 5 or Cygwin. * Cygwin: This follows the Unix build procedures. * C++ Builder 5: Possible with make files in the BCB5 subdirectory. Details can be found in the ReadMe file located there. * MS Visual C++ 6: Based on the workspace file expat.dsw. The related project files (.dsp) are located in the lib subdirectory. * MS Visual Studio .NET 2002, 2003, 2005, 2008, 2010: The VC++ 6 workspace file (expat.dsw) and project files (.dsp) can be opened and imported in VS.NET without problems. * All MS C/C++ compilers: The output for all projects will be generated in the win32\bin directory, intermediate files will be located in project-specific subdirectories of win32\tmp. * Creating MinGW dynamic libraries from MS VC++ DLLs: On the command line, execute these steps: pexports libexpat.dll > expat.def pexports libexpatw.dll > expatw.def dlltool -d expat.def -l libexpat.a dlltool -d expatw.def -l libexpatw.a The *.a files are mingw libraries. * Special note about MS VC++ and runtime libraries: There are three possible configurations: using the single threaded or multithreaded run-time library, or using the multi-threaded run-time Dll. That is, one can build three different Expat libraries depending on the needs of the application. Dynamic Linking: By default the Expat Dlls are built to link statically with the multi-threaded run-time library. The libraries are named - libexpat(w).dll - libexpat(w).lib (import library) The "w" indicates the UTF-16 version of the library. One rarely uses other versions of the Dll, but they can be built easily by specifying a different RTL linkage in the IDE on the C/C++ tab under the category Code Generation. Static Linking: The libraries should be named like this: Single-theaded: libexpat(w)ML.lib Multi-threaded: libexpat(w)MT.lib Multi-threaded Dll: libexpat(w)MD.lib The suffixes conform to the compiler switch settings /ML, /MT and /MD for MS VC++. Note: In Visual Studio 2005 (Visual C++ 8.0) and later, the single-threaded runtime library is not supported anymore. By default, the expat-static and expatw-static projects are set up to link statically against the multithreaded run-time library, so they will build libexpatMT.lib or libexpatwMT.lib files. To build the other versions of the static library, go to Project - Settings: - specify a different RTL linkage on the C/C++ tab under the category Code Generation. - then, on the Library tab, change the output file name accordingly, as described above An application linking to the static libraries must have the global macro XML_STATIC defined. astropy-1.1.1/cextern/expat/win32/MANIFEST.txt0000755001134200020070000000225312602615516021632 0ustar embrayscience00000000000000 Overview of the Expat distribution The Expat distribution creates several subdirectories on your system. Some of these directories contain components of interest to all Expat users, and some contain material of interest to developers who wish to use Expat in their applications. In the list below, is the directory you specified to the installer. Directory Contents --------------------------------------------------------------------- \ Some general information files. \Doc\ API documentation for developers. \Bin\ Pre-compiled dynamic libraries for developers. Pre-compiled static libraries for developers (*MT.lib). The XML well-formedness checker xmlwf. \Source\ Source code, which may interest some developers, including a workspace for Microsft Visual C++. The source code includes the parser, the well- formedness checker, and a couple of small sample applications. \Source\bcb5\ Project files for Borland C++ Builder 5 and BCC 5.5. astropy-1.1.1/cextern/expat/CMake.README0000755001134200020070000000335012602615516020557 0ustar embrayscience00000000000000== How to build expat with cmake (experimental) == The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual Studio) and should work on all other platform cmake supports. Assuming ~/expat-2.1.0 is the source directory of expat, add a subdirectory build and change into that directory: ~/expat-2.1.0$ mkdir build && cd build ~/expat-2.1.0/build$ From that directory, call cmake first, then call make, make test and make install in the usual way: ~/expat-2.1.0/build$ cmake .. -- The C compiler identification is GNU -- The CXX compiler identification is GNU .... -- Configuring done -- Generating done -- Build files have been written to: /home/patrick/expat-2.1.0/build If you want to specify the install location for your files, append -DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call. ~/expat-2.1.0/build$ make && make test && make install Scanning dependencies of target expat [ 5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o [ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o .... -- Installing: /usr/local/lib/pkgconfig/expat.pc -- Installing: /usr/local/bin/xmlwf -- Installing: /usr/local/share/man/man1/xmlwf.1 For Windows builds, you must make sure to call cmake from an environment where your compiler is reachable, that means either you call it from the Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and make sure that gcc can be called. On Windows, you also might want to specify a special Generator for CMake: for Visual Studio builds do: cmake .. -G "Visual Studio 10" && vcexpress expat.sln for mingw builds do: cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install && gmake && gmake install astropy-1.1.1/cextern/expat/expat.dsw0000755001134200020070000000370612602615516020565 0ustar embrayscience00000000000000Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "elements"=.\examples\elements.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name expat_static End Project Dependency }}} ############################################################################### Project: "expat"=.\lib\expat.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "expat_static"=.\lib\expat_static.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "expatw"=.\lib\expatw.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "expatw_static"=.\lib\expatw_static.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "outline"=.\examples\outline.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name expat End Project Dependency }}} ############################################################################### Project: "xmlwf"=.\xmlwf\xmlwf.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name expat End Project Dependency }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### astropy-1.1.1/cextern/expat/CMakeLists.txt0000755001134200020070000000634312602615516021465 0ustar embrayscience00000000000000# This file is copyrighted under the BSD-license for buildsystem files of KDE # copyright 2010, Patrick Spendrin project(expat) cmake_minimum_required(VERSION 2.6) set(PACKAGE_BUGREPORT "expat-bugs@libexpat.org") set(PACKAGE_NAME "expat") set(PACKAGE_VERSION "2.1.0") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_TARNAME "${PACKAGE_NAME}") option(BUILD_tools "build the xmlwf tool for expat library" ON) option(BUILD_examples "build the examples for expat library" ON) option(BUILD_tests "build the tests for expat library" ON) option(BUILD_shared "build a shared expat library" ON) # configuration options set(XML_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point") option(XML_DTD "Define to make parameter entity parsing functionality available" ON) option(XML_NS "Define to make XML Namespaces functionality available" ON) if(XML_DTD) set(XML_DTD 1) else(XML_DTD) set(XML_DTD 0) endif(XML_DTD) if(XML_NS) set(XML_NS 1) else(XML_NS) set(XML_NS 0) endif(XML_NS) if(BUILD_tests) enable_testing() endif(BUILD_tests) include(ConfigureChecks.cmake) include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib) if(MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996) endif(MSVC) set(expat_SRCS lib/xmlparse.c lib/xmlrole.c lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c ) if(WIN32 AND BUILD_shared) set(expat_SRCS ${expat_SRCS} lib/libexpat.def) endif(WIN32 AND BUILD_shared) if(BUILD_shared) set(_SHARED SHARED) else(BUILD_shared) set(_SHARED STATIC) endif(BUILD_shared) add_library(expat ${_SHARED} ${expat_SRCS}) install(TARGETS expat RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix "\${prefix}/bin") set(libdir "\${prefix}/lib") set(includedir "\${prefix}/include") configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc) install(FILES lib/expat.h lib/expat_external.h DESTINATION include) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION lib/pkgconfig) if(BUILD_tools AND NOT WINCE) set(xmlwf_SRCS xmlwf/xmlwf.c xmlwf/xmlfile.c xmlwf/codepage.c xmlwf/readfilemap.c ) add_executable(xmlwf ${xmlwf_SRCS}) target_link_libraries(xmlwf expat) install(TARGETS xmlwf DESTINATION bin) install(FILES doc/xmlwf.1 DESTINATION share/man/man1) endif(BUILD_tools AND NOT WINCE) if(BUILD_examples) add_executable(elements examples/elements.c) target_link_libraries(elements expat) add_executable(outline examples/outline.c) target_link_libraries(outline expat) endif(BUILD_examples) if(BUILD_tests) ## these are unittests that can be run on any platform add_executable(runtests tests/runtests.c tests/chardata.c tests/minicheck.c) target_link_libraries(runtests expat) add_test(runtests runtests) add_executable(runtestspp tests/runtestspp.cpp tests/chardata.c tests/minicheck.c) target_link_libraries(runtestspp expat) add_test(runtestspp runtestspp) endif(BUILD_tests) astropy-1.1.1/cextern/expat/xmlwf/0000755001134200020070000000000012644022135020044 5ustar embrayscience00000000000000astropy-1.1.1/cextern/expat/xmlwf/xmltchar.h0000755001134200020070000000147112602615516022052 0ustar embrayscience00000000000000#ifdef XML_UNICODE #ifndef XML_UNICODE_WCHAR_T #error xmlwf requires a 16-bit Unicode-compatible wchar_t #endif #define T(x) L ## x #define ftprintf fwprintf #define tfopen _wfopen #define fputts fputws #define puttc putwc #define tcscmp wcscmp #define tcscpy wcscpy #define tcscat wcscat #define tcschr wcschr #define tcsrchr wcsrchr #define tcslen wcslen #define tperror _wperror #define topen _wopen #define tmain wmain #define tremove _wremove #else /* not XML_UNICODE */ #define T(x) x #define ftprintf fprintf #define tfopen fopen #define fputts fputs #define puttc putc #define tcscmp strcmp #define tcscpy strcpy #define tcscat strcat #define tcschr strchr #define tcsrchr strrchr #define tcslen strlen #define tperror perror #define topen open #define tmain main #define tremove remove #endif /* not XML_UNICODE */ astropy-1.1.1/cextern/expat/xmlwf/xmlmime.h0000755001134200020070000000075512602615516021704 0ustar embrayscience00000000000000#ifdef __cplusplus extern "C" { #endif /* Registered charset names are at most 40 characters long. */ #define CHARSET_MAX 41 /* Figure out the charset to use from the ContentType. buf contains the body of the header field (the part after "Content-Type:"). charset gets the charset to use. It must be at least CHARSET_MAX chars long. charset will be empty if the default charset should be used. */ void getXMLCharset(const char *buf, char *charset); #ifdef __cplusplus } #endif astropy-1.1.1/cextern/expat/xmlwf/xmlfile.h0000755001134200020070000000077512602615516021676 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #define XML_MAP_FILE 01 #define XML_EXTERNAL_ENTITIES 02 #ifdef XML_LARGE_SIZE #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 #define XML_FMT_INT_MOD "I64" #else #define XML_FMT_INT_MOD "ll" #endif #else #define XML_FMT_INT_MOD "l" #endif extern int XML_ProcessFile(XML_Parser parser, const XML_Char *filename, unsigned flags); astropy-1.1.1/cextern/expat/xmlwf/xmlfile.c0000755001134200020070000001370212602615516021663 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #include #include #include #include #include #ifdef COMPILED_FROM_DSP #include "winconfig.h" #elif defined(MACOS_CLASSIC) #include "macconfig.h" #elif defined(__amigaos__) #include "amigaconfig.h" #elif defined(__WATCOMC__) #include "watcomconfig.h" #elif defined(HAVE_EXPAT_CONFIG_H) #include #endif /* ndef COMPILED_FROM_DSP */ #include "expat.h" #include "xmlfile.h" #include "xmltchar.h" #include "filemap.h" #if (defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__LINUX__))) #include #endif #if defined(__amigaos__) && defined(__USE_INLINE__) #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifndef O_BINARY #ifdef _O_BINARY #define O_BINARY _O_BINARY #else #define O_BINARY 0 #endif #endif #ifdef _DEBUG #define READ_SIZE 16 #else #define READ_SIZE (1024*8) #endif typedef struct { XML_Parser parser; int *retPtr; } PROCESS_ARGS; static void reportError(XML_Parser parser, const XML_Char *filename) { enum XML_Error code = XML_GetErrorCode(parser); const XML_Char *message = XML_ErrorString(code); if (message) ftprintf(stdout, T("%s:%" XML_FMT_INT_MOD "u:%" XML_FMT_INT_MOD "u: %s\n"), filename, XML_GetErrorLineNumber(parser), XML_GetErrorColumnNumber(parser), message); else ftprintf(stderr, T("%s: (unknown message %d)\n"), filename, code); } /* This implementation will give problems on files larger than INT_MAX. */ static void processFile(const void *data, size_t size, const XML_Char *filename, void *args) { XML_Parser parser = ((PROCESS_ARGS *)args)->parser; int *retPtr = ((PROCESS_ARGS *)args)->retPtr; if (XML_Parse(parser, (const char *)data, (int)size, 1) == XML_STATUS_ERROR) { reportError(parser, filename); *retPtr = 0; } else *retPtr = 1; } #if (defined(WIN32) || defined(__WATCOMC__)) static int isAsciiLetter(XML_Char c) { return (T('a') <= c && c <= T('z')) || (T('A') <= c && c <= T('Z')); } #endif /* WIN32 */ static const XML_Char * resolveSystemId(const XML_Char *base, const XML_Char *systemId, XML_Char **toFree) { XML_Char *s; *toFree = 0; if (!base || *systemId == T('/') #if (defined(WIN32) || defined(__WATCOMC__)) || *systemId == T('\\') || (isAsciiLetter(systemId[0]) && systemId[1] == T(':')) #endif ) return systemId; *toFree = (XML_Char *)malloc((tcslen(base) + tcslen(systemId) + 2) * sizeof(XML_Char)); if (!*toFree) return systemId; tcscpy(*toFree, base); s = *toFree; if (tcsrchr(s, T('/'))) s = tcsrchr(s, T('/')) + 1; #if (defined(WIN32) || defined(__WATCOMC__)) if (tcsrchr(s, T('\\'))) s = tcsrchr(s, T('\\')) + 1; #endif tcscpy(s, systemId); return *toFree; } static int externalEntityRefFilemap(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) { int result; XML_Char *s; const XML_Char *filename; XML_Parser entParser = XML_ExternalEntityParserCreate(parser, context, 0); PROCESS_ARGS args; args.retPtr = &result; args.parser = entParser; filename = resolveSystemId(base, systemId, &s); XML_SetBase(entParser, filename); if (!filemap(filename, processFile, &args)) result = 0; free(s); XML_ParserFree(entParser); return result; } static int processStream(const XML_Char *filename, XML_Parser parser) { /* passing NULL for filename means read intput from stdin */ int fd = 0; /* 0 is the fileno for stdin */ if (filename != NULL) { fd = topen(filename, O_BINARY|O_RDONLY); if (fd < 0) { tperror(filename); return 0; } } for (;;) { int nread; char *buf = (char *)XML_GetBuffer(parser, READ_SIZE); if (!buf) { if (filename != NULL) close(fd); ftprintf(stderr, T("%s: out of memory\n"), filename != NULL ? filename : "xmlwf"); return 0; } nread = read(fd, buf, READ_SIZE); if (nread < 0) { tperror(filename != NULL ? filename : "STDIN"); if (filename != NULL) close(fd); return 0; } if (XML_ParseBuffer(parser, nread, nread == 0) == XML_STATUS_ERROR) { reportError(parser, filename != NULL ? filename : "STDIN"); if (filename != NULL) close(fd); return 0; } if (nread == 0) { if (filename != NULL) close(fd); break;; } } return 1; } static int externalEntityRefStream(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) { XML_Char *s; const XML_Char *filename; int ret; XML_Parser entParser = XML_ExternalEntityParserCreate(parser, context, 0); filename = resolveSystemId(base, systemId, &s); XML_SetBase(entParser, filename); ret = processStream(filename, entParser); free(s); XML_ParserFree(entParser); return ret; } int XML_ProcessFile(XML_Parser parser, const XML_Char *filename, unsigned flags) { int result; if (!XML_SetBase(parser, filename)) { ftprintf(stderr, T("%s: out of memory"), filename); exit(1); } if (flags & XML_EXTERNAL_ENTITIES) XML_SetExternalEntityRefHandler(parser, (flags & XML_MAP_FILE) ? externalEntityRefFilemap : externalEntityRefStream); if (flags & XML_MAP_FILE) { PROCESS_ARGS args; args.retPtr = &result; args.parser = parser; if (!filemap(filename, processFile, &args)) result = 0; } else result = processStream(filename, parser); return result; } astropy-1.1.1/cextern/expat/xmlwf/unixfilemap.c0000755001134200020070000000237212602615516022545 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #include #include #include #include #include #include #include #include #ifndef MAP_FILE #define MAP_FILE 0 #endif #include "filemap.h" int filemap(const char *name, void (*processor)(const void *, size_t, const char *, void *arg), void *arg) { int fd; size_t nbytes; struct stat sb; void *p; fd = open(name, O_RDONLY); if (fd < 0) { perror(name); return 0; } if (fstat(fd, &sb) < 0) { perror(name); close(fd); return 0; } if (!S_ISREG(sb.st_mode)) { close(fd); fprintf(stderr, "%s: not a regular file\n", name); return 0; } nbytes = sb.st_size; /* mmap fails for zero length files */ if (nbytes == 0) { static const char c = '\0'; processor(&c, 0, name, arg); close(fd); return 1; } p = (void *)mmap((caddr_t)0, (size_t)nbytes, PROT_READ, MAP_FILE|MAP_PRIVATE, fd, (off_t)0); if (p == (void *)-1) { perror(name); close(fd); return 0; } processor(p, nbytes, name, arg); munmap((caddr_t)p, nbytes); close(fd); return 1; } astropy-1.1.1/cextern/expat/xmlwf/filemap.h0000755001134200020070000000076412602615516021651 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #include #ifdef XML_UNICODE int filemap(const wchar_t *name, void (*processor)(const void *, size_t, const wchar_t *, void *arg), void *arg); #else int filemap(const char *name, void (*processor)(const void *, size_t, const char *, void *arg), void *arg); #endif astropy-1.1.1/cextern/expat/xmlwf/readfilemap.c0000755001134200020070000000337612602615516022502 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #include #include #include #include #include #ifdef __WATCOMC__ #ifndef __LINUX__ #include #else #include #endif #endif #ifdef __BEOS__ #include #endif #ifndef S_ISREG #ifndef S_IFREG #define S_IFREG _S_IFREG #endif #ifndef S_IFMT #define S_IFMT _S_IFMT #endif #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif /* not S_ISREG */ #ifndef O_BINARY #ifdef _O_BINARY #define O_BINARY _O_BINARY #else #define O_BINARY 0 #endif #endif #include "filemap.h" int filemap(const char *name, void (*processor)(const void *, size_t, const char *, void *arg), void *arg) { size_t nbytes; int fd; int n; struct stat sb; void *p; fd = open(name, O_RDONLY|O_BINARY); if (fd < 0) { perror(name); return 0; } if (fstat(fd, &sb) < 0) { perror(name); close(fd); return 0; } if (!S_ISREG(sb.st_mode)) { fprintf(stderr, "%s: not a regular file\n", name); close(fd); return 0; } nbytes = sb.st_size; /* malloc will return NULL with nbytes == 0, handle files with size 0 */ if (nbytes == 0) { static const char c = '\0'; processor(&c, 0, name, arg); close(fd); return 1; } p = malloc(nbytes); if (!p) { fprintf(stderr, "%s: out of memory\n", name); close(fd); return 0; } n = read(fd, p, nbytes); if (n < 0) { perror(name); free(p); close(fd); return 0; } if (n != nbytes) { fprintf(stderr, "%s: read unexpected number of bytes\n", name); free(p); close(fd); return 0; } processor(p, nbytes, name, arg); free(p); close(fd); return 1; } astropy-1.1.1/cextern/expat/xmlwf/codepage.c0000755001134200020070000000251312602615516021770 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #include "codepage.h" #if (defined(WIN32) || (defined(__WATCOMC__) && defined(__NT__))) #define STRICT 1 #define WIN32_LEAN_AND_MEAN 1 #include int codepageMap(int cp, int *map) { int i; CPINFO info; if (!GetCPInfo(cp, &info) || info.MaxCharSize > 2) return 0; for (i = 0; i < 256; i++) map[i] = -1; if (info.MaxCharSize > 1) { for (i = 0; i < MAX_LEADBYTES; i+=2) { int j, lim; if (info.LeadByte[i] == 0 && info.LeadByte[i + 1] == 0) break; lim = info.LeadByte[i + 1]; for (j = info.LeadByte[i]; j <= lim; j++) map[j] = -2; } } for (i = 0; i < 256; i++) { if (map[i] == -1) { char c = (char)i; unsigned short n; if (MultiByteToWideChar(cp, MB_PRECOMPOSED|MB_ERR_INVALID_CHARS, &c, 1, &n, 1) == 1) map[i] = n; } } return 1; } int codepageConvert(int cp, const char *p) { unsigned short c; if (MultiByteToWideChar(cp, MB_PRECOMPOSED|MB_ERR_INVALID_CHARS, p, 2, &c, 1) == 1) return c; return -1; } #else /* not WIN32 */ int codepageMap(int cp, int *map) { return 0; } int codepageConvert(int cp, const char *p) { return -1; } #endif /* not WIN32 */ astropy-1.1.1/cextern/expat/xmlwf/xmlwf.dsp0000755001134200020070000001004212602615516021716 0ustar embrayscience00000000000000# Microsoft Developer Studio Project File - Name="xmlwf" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=xmlwf - Win32 Release !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "xmlwf.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "xmlwf.mak" CFG="xmlwf - Win32 Release" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "xmlwf - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "xmlwf - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "xmlwf - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir ".\Release" # PROP BASE Intermediate_Dir ".\Release" # PROP BASE Target_Dir "." # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\win32\bin\Release" # PROP Intermediate_Dir "..\win32\tmp\Release-xmlwf" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "." # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c # ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "COMPILED_FROM_DSP" /FD /c # SUBTRACT CPP /YX /Yc /Yu # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:console /machine:I386 # ADD LINK32 libexpat.lib setargv.obj /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\win32\bin\Release" /out:"..\win32\bin\Release\xmlwf.exe" # SUBTRACT LINK32 /nodefaultlib !ELSEIF "$(CFG)" == "xmlwf - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir ".\Debug" # PROP BASE Intermediate_Dir ".\Debug" # PROP BASE Target_Dir "." # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\win32\bin\Debug" # PROP Intermediate_Dir "..\win32\tmp\Debug-xmlwf" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "." # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c # ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\lib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "COMPILED_FROM_DSP" /FD /c # SUBTRACT CPP /Fr /YX # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 # ADD LINK32 libexpat.lib setargv.obj /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\win32\bin\Debug" /out:"..\win32\bin\Debug\xmlwf.exe" !ENDIF # Begin Target # Name "xmlwf - Win32 Release" # Name "xmlwf - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90" # Begin Source File SOURCE=.\codepage.c # End Source File # Begin Source File SOURCE=.\readfilemap.c # PROP Exclude_From_Build 1 # End Source File # Begin Source File SOURCE=.\unixfilemap.c # PROP Exclude_From_Build 1 # End Source File # Begin Source File SOURCE=.\win32filemap.c # End Source File # Begin Source File SOURCE=.\xmlfile.c # End Source File # Begin Source File SOURCE=.\xmlwf.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" # Begin Source File SOURCE=.\codepage.h # End Source File # Begin Source File SOURCE=.\xmlfile.h # End Source File # Begin Source File SOURCE=.\xmltchar.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" # End Group # End Target # End Project astropy-1.1.1/cextern/expat/xmlwf/xmlwin32url.cxx0000755001134200020070000002115512602615516023012 0ustar embrayscience00000000000000#include "expat.h" #ifdef XML_UNICODE #define UNICODE #endif #include #include #include #include #include #include "xmlurl.h" #include "xmlmime.h" static int processURL(XML_Parser parser, IMoniker *baseMoniker, const XML_Char *url); typedef void (*StopHandler)(void *, HRESULT); class Callback : public IBindStatusCallback { public: // IUnknown methods STDMETHODIMP QueryInterface(REFIID,void **); STDMETHODIMP_(ULONG) AddRef(); STDMETHODIMP_(ULONG) Release(); // IBindStatusCallback methods STDMETHODIMP OnStartBinding(DWORD, IBinding *); STDMETHODIMP GetPriority(LONG *); STDMETHODIMP OnLowResource(DWORD); STDMETHODIMP OnProgress(ULONG, ULONG, ULONG, LPCWSTR); STDMETHODIMP OnStopBinding(HRESULT, LPCWSTR); STDMETHODIMP GetBindInfo(DWORD *, BINDINFO *); STDMETHODIMP OnDataAvailable(DWORD, DWORD, FORMATETC *, STGMEDIUM *); STDMETHODIMP OnObjectAvailable(REFIID, IUnknown *); Callback(XML_Parser, IMoniker *, StopHandler, void *); ~Callback(); int externalEntityRef(const XML_Char *context, const XML_Char *systemId, const XML_Char *publicId); private: XML_Parser parser_; IMoniker *baseMoniker_; DWORD totalRead_; ULONG ref_; IBinding *pBinding_; StopHandler stopHandler_; void *stopArg_; }; STDMETHODIMP_(ULONG) Callback::AddRef() { return ref_++; } STDMETHODIMP_(ULONG) Callback::Release() { if (--ref_ == 0) { delete this; return 0; } return ref_; } STDMETHODIMP Callback::QueryInterface(REFIID riid, void** ppv) { if (IsEqualGUID(riid, IID_IUnknown)) *ppv = (IUnknown *)this; else if (IsEqualGUID(riid, IID_IBindStatusCallback)) *ppv = (IBindStatusCallback *)this; else return E_NOINTERFACE; ((LPUNKNOWN)*ppv)->AddRef(); return S_OK; } STDMETHODIMP Callback::OnStartBinding(DWORD, IBinding* pBinding) { pBinding_ = pBinding; pBinding->AddRef(); return S_OK; } STDMETHODIMP Callback::GetPriority(LONG *) { return E_NOTIMPL; } STDMETHODIMP Callback::OnLowResource(DWORD) { return E_NOTIMPL; } STDMETHODIMP Callback::OnProgress(ULONG, ULONG, ULONG, LPCWSTR) { return S_OK; } STDMETHODIMP Callback::OnStopBinding(HRESULT hr, LPCWSTR szError) { if (pBinding_) { pBinding_->Release(); pBinding_ = 0; } if (baseMoniker_) { baseMoniker_->Release(); baseMoniker_ = 0; } stopHandler_(stopArg_, hr); return S_OK; } STDMETHODIMP Callback::GetBindInfo(DWORD* pgrfBINDF, BINDINFO* pbindinfo) { *pgrfBINDF = BINDF_ASYNCHRONOUS; return S_OK; } static void reportError(XML_Parser parser) { int code = XML_GetErrorCode(parser); const XML_Char *message = XML_ErrorString(code); if (message) _ftprintf(stderr, _T("%s:%d:%ld: %s\n"), XML_GetBase(parser), XML_GetErrorLineNumber(parser), XML_GetErrorColumnNumber(parser), message); else _ftprintf(stderr, _T("%s: (unknown message %d)\n"), XML_GetBase(parser), code); } STDMETHODIMP Callback::OnDataAvailable(DWORD grfBSCF, DWORD dwSize, FORMATETC *pfmtetc, STGMEDIUM* pstgmed) { if (grfBSCF & BSCF_FIRSTDATANOTIFICATION) { IWinInetHttpInfo *hp; HRESULT hr = pBinding_->QueryInterface(IID_IWinInetHttpInfo, (void **)&hp); if (SUCCEEDED(hr)) { char contentType[1024]; DWORD bufSize = sizeof(contentType); DWORD flags = 0; contentType[0] = 0; hr = hp->QueryInfo(HTTP_QUERY_CONTENT_TYPE, contentType, &bufSize, 0, NULL); if (SUCCEEDED(hr)) { char charset[CHARSET_MAX]; getXMLCharset(contentType, charset); if (charset[0]) { #ifdef XML_UNICODE XML_Char wcharset[CHARSET_MAX]; XML_Char *p1 = wcharset; const char *p2 = charset; while ((*p1++ = (unsigned char)*p2++) != 0) ; XML_SetEncoding(parser_, wcharset); #else XML_SetEncoding(parser_, charset); #endif } } hp->Release(); } } if (!parser_) return E_ABORT; if (pstgmed->tymed == TYMED_ISTREAM) { while (totalRead_ < dwSize) { #define READ_MAX (64*1024) DWORD nToRead = dwSize - totalRead_; if (nToRead > READ_MAX) nToRead = READ_MAX; void *buf = XML_GetBuffer(parser_, nToRead); if (!buf) { _ftprintf(stderr, _T("out of memory\n")); return E_ABORT; } DWORD nRead; HRESULT hr = pstgmed->pstm->Read(buf, nToRead, &nRead); if (SUCCEEDED(hr)) { totalRead_ += nRead; if (!XML_ParseBuffer(parser_, nRead, (grfBSCF & BSCF_LASTDATANOTIFICATION) != 0 && totalRead_ == dwSize)) { reportError(parser_); return E_ABORT; } } } } return S_OK; } STDMETHODIMP Callback::OnObjectAvailable(REFIID, IUnknown *) { return S_OK; } int Callback::externalEntityRef(const XML_Char *context, const XML_Char *systemId, const XML_Char *publicId) { XML_Parser entParser = XML_ExternalEntityParserCreate(parser_, context, 0); XML_SetBase(entParser, systemId); int ret = processURL(entParser, baseMoniker_, systemId); XML_ParserFree(entParser); return ret; } Callback::Callback(XML_Parser parser, IMoniker *baseMoniker, StopHandler stopHandler, void *stopArg) : parser_(parser), baseMoniker_(baseMoniker), ref_(0), pBinding_(0), totalRead_(0), stopHandler_(stopHandler), stopArg_(stopArg) { if (baseMoniker_) baseMoniker_->AddRef(); } Callback::~Callback() { if (pBinding_) pBinding_->Release(); if (baseMoniker_) baseMoniker_->Release(); } static int externalEntityRef(void *arg, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) { return ((Callback *)arg)->externalEntityRef(context, systemId, publicId); } static HRESULT openStream(XML_Parser parser, IMoniker *baseMoniker, const XML_Char *uri, StopHandler stopHandler, void *stopArg) { if (!XML_SetBase(parser, uri)) return E_OUTOFMEMORY; HRESULT hr; IMoniker *m; #ifdef XML_UNICODE hr = CreateURLMoniker(0, uri, &m); #else LPWSTR uriw = new wchar_t[strlen(uri) + 1]; for (int i = 0;; i++) { uriw[i] = uri[i]; if (uriw[i] == 0) break; } hr = CreateURLMoniker(baseMoniker, uriw, &m); delete [] uriw; #endif if (FAILED(hr)) return hr; IBindStatusCallback *cb = new Callback(parser, m, stopHandler, stopArg); XML_SetExternalEntityRefHandler(parser, externalEntityRef); XML_SetExternalEntityRefHandlerArg(parser, cb); cb->AddRef(); IBindCtx *b; if (FAILED(hr = CreateAsyncBindCtx(0, cb, 0, &b))) { cb->Release(); m->Release(); return hr; } cb->Release(); IStream *pStream; hr = m->BindToStorage(b, 0, IID_IStream, (void **)&pStream); if (SUCCEEDED(hr)) { if (pStream) pStream->Release(); } if (hr == MK_S_ASYNCHRONOUS) hr = S_OK; m->Release(); b->Release(); return hr; } struct QuitInfo { const XML_Char *url; HRESULT hr; int stop; }; static void winPerror(const XML_Char *url, HRESULT hr) { LPVOID buf; if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_HMODULE, GetModuleHandleA("urlmon.dll"), hr, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &buf, 0, NULL) || FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, 0, hr, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &buf, 0, NULL)) { /* The system error messages seem to end with a newline. */ _ftprintf(stderr, _T("%s: %s"), url, buf); fflush(stderr); LocalFree(buf); } else _ftprintf(stderr, _T("%s: error %x\n"), url, hr); } static void threadQuit(void *p, HRESULT hr) { QuitInfo *qi = (QuitInfo *)p; qi->hr = hr; qi->stop = 1; } extern "C" int XML_URLInit(void) { return SUCCEEDED(CoInitialize(0)); } extern "C" void XML_URLUninit(void) { CoUninitialize(); } static int processURL(XML_Parser parser, IMoniker *baseMoniker, const XML_Char *url) { QuitInfo qi; qi.stop = 0; qi.url = url; XML_SetBase(parser, url); HRESULT hr = openStream(parser, baseMoniker, url, threadQuit, &qi); if (FAILED(hr)) { winPerror(url, hr); return 0; } else if (FAILED(qi.hr)) { winPerror(url, qi.hr); return 0; } MSG msg; while (!qi.stop && GetMessage (&msg, NULL, 0, 0)) { TranslateMessage (&msg); DispatchMessage (&msg); } return 1; } extern "C" int XML_ProcessURL(XML_Parser parser, const XML_Char *url, unsigned flags) { return processURL(parser, 0, url); } astropy-1.1.1/cextern/expat/xmlwf/codepage.h0000755001134200020070000000030412602615516021771 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ int codepageMap(int cp, int *map); int codepageConvert(int cp, const char *p); astropy-1.1.1/cextern/expat/xmlwf/xmlmime.c0000755001134200020070000000622212602615516021672 0ustar embrayscience00000000000000#include #include "xmlmime.h" static const char * getTok(const char **pp) { /* inComment means one level of nesting; inComment+1 means two levels etc */ enum { inAtom, inString, init, inComment }; int state = init; const char *tokStart = 0; for (;;) { switch (**pp) { case '\0': if (state == inAtom) return tokStart; return 0; case ' ': case '\r': case '\t': case '\n': if (state == inAtom) return tokStart; break; case '(': if (state == inAtom) return tokStart; if (state != inString) state++; break; case ')': if (state > init) --state; else if (state != inString) return 0; break; case ';': case '/': case '=': if (state == inAtom) return tokStart; if (state == init) return (*pp)++; break; case '\\': ++*pp; if (**pp == '\0') return 0; break; case '"': switch (state) { case inString: ++*pp; return tokStart; case inAtom: return tokStart; case init: tokStart = *pp; state = inString; break; } break; default: if (state == init) { tokStart = *pp; state = inAtom; } break; } ++*pp; } /* not reached */ } /* key must be lowercase ASCII */ static int matchkey(const char *start, const char *end, const char *key) { if (!start) return 0; for (; start != end; start++, key++) if (*start != *key && *start != 'A' + (*key - 'a')) return 0; return *key == '\0'; } void getXMLCharset(const char *buf, char *charset) { const char *next, *p; charset[0] = '\0'; next = buf; p = getTok(&next); if (matchkey(p, next, "text")) strcpy(charset, "us-ascii"); else if (!matchkey(p, next, "application")) return; p = getTok(&next); if (!p || *p != '/') return; p = getTok(&next); #if 0 if (!matchkey(p, next, "xml") && charset[0] == '\0') return; #endif p = getTok(&next); while (p) { if (*p == ';') { p = getTok(&next); if (matchkey(p, next, "charset")) { p = getTok(&next); if (p && *p == '=') { p = getTok(&next); if (p) { char *s = charset; if (*p == '"') { while (++p != next - 1) { if (*p == '\\') ++p; if (s == charset + CHARSET_MAX - 1) { charset[0] = '\0'; break; } *s++ = *p; } *s++ = '\0'; } else { if (next - p > CHARSET_MAX - 1) break; while (p != next) *s++ = *p++; *s = 0; break; } } } break; } } else p = getTok(&next); } } #ifdef TEST #include int main(int argc, char *argv[]) { char buf[CHARSET_MAX]; if (argc <= 1) return 1; printf("%s\n", argv[1]); getXMLCharset(argv[1], buf); printf("charset=\"%s\"\n", buf); return 0; } #endif /* TEST */ astropy-1.1.1/cextern/expat/xmlwf/xmlwf.c0000755001134200020070000005133412602615516021363 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #include #include #include #include #include "expat.h" #include "codepage.h" #include "xmlfile.h" #include "xmltchar.h" #ifdef _MSC_VER #include #endif #if defined(__amigaos__) && defined(__USE_INLINE__) #include #endif /* This ensures proper sorting. */ #define NSSEP T('\001') static void XMLCALL characterData(void *userData, const XML_Char *s, int len) { FILE *fp = (FILE *)userData; for (; len > 0; --len, ++s) { switch (*s) { case T('&'): fputts(T("&"), fp); break; case T('<'): fputts(T("<"), fp); break; case T('>'): fputts(T(">"), fp); break; #ifdef W3C14N case 13: fputts(T(" "), fp); break; #else case T('"'): fputts(T("""), fp); break; case 9: case 10: case 13: ftprintf(fp, T("&#%d;"), *s); break; #endif default: puttc(*s, fp); break; } } } static void attributeValue(FILE *fp, const XML_Char *s) { puttc(T('='), fp); puttc(T('"'), fp); for (;;) { switch (*s) { case 0: case NSSEP: puttc(T('"'), fp); return; case T('&'): fputts(T("&"), fp); break; case T('<'): fputts(T("<"), fp); break; case T('"'): fputts(T("""), fp); break; #ifdef W3C14N case 9: fputts(T(" "), fp); break; case 10: fputts(T(" "), fp); break; case 13: fputts(T(" "), fp); break; #else case T('>'): fputts(T(">"), fp); break; case 9: case 10: case 13: ftprintf(fp, T("&#%d;"), *s); break; #endif default: puttc(*s, fp); break; } s++; } } /* Lexicographically comparing UTF-8 encoded attribute values, is equivalent to lexicographically comparing based on the character number. */ static int attcmp(const void *att1, const void *att2) { return tcscmp(*(const XML_Char **)att1, *(const XML_Char **)att2); } static void XMLCALL startElement(void *userData, const XML_Char *name, const XML_Char **atts) { int nAtts; const XML_Char **p; FILE *fp = (FILE *)userData; puttc(T('<'), fp); fputts(name, fp); p = atts; while (*p) ++p; nAtts = (int)((p - atts) >> 1); if (nAtts > 1) qsort((void *)atts, nAtts, sizeof(XML_Char *) * 2, attcmp); while (*atts) { puttc(T(' '), fp); fputts(*atts++, fp); attributeValue(fp, *atts); atts++; } puttc(T('>'), fp); } static void XMLCALL endElement(void *userData, const XML_Char *name) { FILE *fp = (FILE *)userData; puttc(T('<'), fp); puttc(T('/'), fp); fputts(name, fp); puttc(T('>'), fp); } static int nsattcmp(const void *p1, const void *p2) { const XML_Char *att1 = *(const XML_Char **)p1; const XML_Char *att2 = *(const XML_Char **)p2; int sep1 = (tcsrchr(att1, NSSEP) != 0); int sep2 = (tcsrchr(att1, NSSEP) != 0); if (sep1 != sep2) return sep1 - sep2; return tcscmp(att1, att2); } static void XMLCALL startElementNS(void *userData, const XML_Char *name, const XML_Char **atts) { int nAtts; int nsi; const XML_Char **p; FILE *fp = (FILE *)userData; const XML_Char *sep; puttc(T('<'), fp); sep = tcsrchr(name, NSSEP); if (sep) { fputts(T("n1:"), fp); fputts(sep + 1, fp); fputts(T(" xmlns:n1"), fp); attributeValue(fp, name); nsi = 2; } else { fputts(name, fp); nsi = 1; } p = atts; while (*p) ++p; nAtts = (int)((p - atts) >> 1); if (nAtts > 1) qsort((void *)atts, nAtts, sizeof(XML_Char *) * 2, nsattcmp); while (*atts) { name = *atts++; sep = tcsrchr(name, NSSEP); puttc(T(' '), fp); if (sep) { ftprintf(fp, T("n%d:"), nsi); fputts(sep + 1, fp); } else fputts(name, fp); attributeValue(fp, *atts); if (sep) { ftprintf(fp, T(" xmlns:n%d"), nsi++); attributeValue(fp, name); } atts++; } puttc(T('>'), fp); } static void XMLCALL endElementNS(void *userData, const XML_Char *name) { FILE *fp = (FILE *)userData; const XML_Char *sep; puttc(T('<'), fp); puttc(T('/'), fp); sep = tcsrchr(name, NSSEP); if (sep) { fputts(T("n1:"), fp); fputts(sep + 1, fp); } else fputts(name, fp); puttc(T('>'), fp); } #ifndef W3C14N static void XMLCALL processingInstruction(void *userData, const XML_Char *target, const XML_Char *data) { FILE *fp = (FILE *)userData; puttc(T('<'), fp); puttc(T('?'), fp); fputts(target, fp); puttc(T(' '), fp); fputts(data, fp); puttc(T('?'), fp); puttc(T('>'), fp); } #endif /* not W3C14N */ static void XMLCALL defaultCharacterData(void *userData, const XML_Char *s, int len) { XML_DefaultCurrent((XML_Parser) userData); } static void XMLCALL defaultStartElement(void *userData, const XML_Char *name, const XML_Char **atts) { XML_DefaultCurrent((XML_Parser) userData); } static void XMLCALL defaultEndElement(void *userData, const XML_Char *name) { XML_DefaultCurrent((XML_Parser) userData); } static void XMLCALL defaultProcessingInstruction(void *userData, const XML_Char *target, const XML_Char *data) { XML_DefaultCurrent((XML_Parser) userData); } static void XMLCALL nopCharacterData(void *userData, const XML_Char *s, int len) { } static void XMLCALL nopStartElement(void *userData, const XML_Char *name, const XML_Char **atts) { } static void XMLCALL nopEndElement(void *userData, const XML_Char *name) { } static void XMLCALL nopProcessingInstruction(void *userData, const XML_Char *target, const XML_Char *data) { } static void XMLCALL markup(void *userData, const XML_Char *s, int len) { FILE *fp = (FILE *)XML_GetUserData((XML_Parser) userData); for (; len > 0; --len, ++s) puttc(*s, fp); } static void metaLocation(XML_Parser parser) { const XML_Char *uri = XML_GetBase(parser); if (uri) ftprintf((FILE *)XML_GetUserData(parser), T(" uri=\"%s\""), uri); ftprintf((FILE *)XML_GetUserData(parser), T(" byte=\"%" XML_FMT_INT_MOD "d\" nbytes=\"%d\" \ line=\"%" XML_FMT_INT_MOD "u\" col=\"%" XML_FMT_INT_MOD "u\""), XML_GetCurrentByteIndex(parser), XML_GetCurrentByteCount(parser), XML_GetCurrentLineNumber(parser), XML_GetCurrentColumnNumber(parser)); } static void metaStartDocument(void *userData) { fputts(T("\n"), (FILE *)XML_GetUserData((XML_Parser) userData)); } static void metaEndDocument(void *userData) { fputts(T("\n"), (FILE *)XML_GetUserData((XML_Parser) userData)); } static void XMLCALL metaStartElement(void *userData, const XML_Char *name, const XML_Char **atts) { XML_Parser parser = (XML_Parser) userData; FILE *fp = (FILE *)XML_GetUserData(parser); const XML_Char **specifiedAttsEnd = atts + XML_GetSpecifiedAttributeCount(parser); const XML_Char **idAttPtr; int idAttIndex = XML_GetIdAttributeIndex(parser); if (idAttIndex < 0) idAttPtr = 0; else idAttPtr = atts + idAttIndex; ftprintf(fp, T("\n"), fp); do { ftprintf(fp, T("= specifiedAttsEnd) fputts(T("\" defaulted=\"yes\"/>\n"), fp); else if (atts == idAttPtr) fputts(T("\" id=\"yes\"/>\n"), fp); else fputts(T("\"/>\n"), fp); } while (*(atts += 2)); fputts(T("\n"), fp); } else fputts(T("/>\n"), fp); } static void XMLCALL metaEndElement(void *userData, const XML_Char *name) { XML_Parser parser = (XML_Parser) userData; FILE *fp = (FILE *)XML_GetUserData(parser); ftprintf(fp, T("\n"), fp); } static void XMLCALL metaProcessingInstruction(void *userData, const XML_Char *target, const XML_Char *data) { XML_Parser parser = (XML_Parser) userData; FILE *fp = (FILE *)XML_GetUserData(parser); ftprintf(fp, T("\n"), fp); } static void XMLCALL metaComment(void *userData, const XML_Char *data) { XML_Parser parser = (XML_Parser) userData; FILE *fp = (FILE *)XML_GetUserData(parser); fputts(T("\n"), fp); } static void XMLCALL metaStartCdataSection(void *userData) { XML_Parser parser = (XML_Parser) userData; FILE *fp = (FILE *)XML_GetUserData(parser); fputts(T("\n"), fp); } static void XMLCALL metaEndCdataSection(void *userData) { XML_Parser parser = (XML_Parser) userData; FILE *fp = (FILE *)XML_GetUserData(parser); fputts(T("\n"), fp); } static void XMLCALL metaCharacterData(void *userData, const XML_Char *s, int len) { XML_Parser parser = (XML_Parser) userData; FILE *fp = (FILE *)XML_GetUserData(parser); fputts(T("\n"), fp); } static void XMLCALL metaStartDoctypeDecl(void *userData, const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset) { XML_Parser parser = (XML_Parser) userData; FILE *fp = (FILE *)XML_GetUserData(parser); ftprintf(fp, T("\n"), fp); } static void XMLCALL metaEndDoctypeDecl(void *userData) { XML_Parser parser = (XML_Parser) userData; FILE *fp = (FILE *)XML_GetUserData(parser); fputts(T("\n"), fp); } static void XMLCALL metaNotationDecl(void *userData, const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) { XML_Parser parser = (XML_Parser) userData; FILE *fp = (FILE *)XML_GetUserData(parser); ftprintf(fp, T("\n"), fp); } static void XMLCALL metaEntityDecl(void *userData, const XML_Char *entityName, int is_param, const XML_Char *value, int value_length, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName) { XML_Parser parser = (XML_Parser) userData; FILE *fp = (FILE *)XML_GetUserData(parser); if (value) { ftprintf(fp, T("'), fp); characterData(fp, value, value_length); fputts(T("\n"), fp); } else if (notationName) { ftprintf(fp, T("\n"), fp); } else { ftprintf(fp, T("\n"), fp); } } static void XMLCALL metaStartNamespaceDecl(void *userData, const XML_Char *prefix, const XML_Char *uri) { XML_Parser parser = (XML_Parser) userData; FILE *fp = (FILE *)XML_GetUserData(parser); fputts(T("\n"), fp); } else fputts(T("/>\n"), fp); } static void XMLCALL metaEndNamespaceDecl(void *userData, const XML_Char *prefix) { XML_Parser parser = (XML_Parser) userData; FILE *fp = (FILE *)XML_GetUserData(parser); if (!prefix) fputts(T("\n"), fp); else ftprintf(fp, T("\n"), prefix); } static int XMLCALL unknownEncodingConvert(void *data, const char *p) { return codepageConvert(*(int *)data, p); } static int XMLCALL unknownEncoding(void *userData, const XML_Char *name, XML_Encoding *info) { int cp; static const XML_Char prefixL[] = T("windows-"); static const XML_Char prefixU[] = T("WINDOWS-"); int i; for (i = 0; prefixU[i]; i++) if (name[i] != prefixU[i] && name[i] != prefixL[i]) return 0; cp = 0; for (; name[i]; i++) { static const XML_Char digits[] = T("0123456789"); const XML_Char *s = tcschr(digits, name[i]); if (!s) return 0; cp *= 10; cp += (int)(s - digits); if (cp >= 0x10000) return 0; } if (!codepageMap(cp, info->map)) return 0; info->convert = unknownEncodingConvert; /* We could just cast the code page integer to a void *, and avoid the use of release. */ info->release = free; info->data = malloc(sizeof(int)); if (!info->data) return 0; *(int *)info->data = cp; return 1; } static int XMLCALL notStandalone(void *userData) { return 0; } static void showVersion(XML_Char *prog) { XML_Char *s = prog; XML_Char ch; const XML_Feature *features = XML_GetFeatureList(); while ((ch = *s) != 0) { if (ch == '/' #if (defined(WIN32) || defined(__WATCOMC__)) || ch == '\\' #endif ) prog = s + 1; ++s; } ftprintf(stdout, T("%s using %s\n"), prog, XML_ExpatVersion()); if (features != NULL && features[0].feature != XML_FEATURE_END) { int i = 1; ftprintf(stdout, T("%s"), features[0].name); if (features[0].value) ftprintf(stdout, T("=%ld"), features[0].value); while (features[i].feature != XML_FEATURE_END) { ftprintf(stdout, T(", %s"), features[i].name); if (features[i].value) ftprintf(stdout, T("=%ld"), features[i].value); ++i; } ftprintf(stdout, T("\n")); } } static void usage(const XML_Char *prog, int rc) { ftprintf(stderr, T("usage: %s [-n] [-p] [-r] [-s] [-w] [-x] [-d output-dir] " "[-e encoding] file ...\n"), prog); exit(rc); } int tmain(int argc, XML_Char **argv) { int i, j; const XML_Char *outputDir = NULL; const XML_Char *encoding = NULL; unsigned processFlags = XML_MAP_FILE; int windowsCodePages = 0; int outputType = 0; int useNamespaces = 0; int requireStandalone = 0; enum XML_ParamEntityParsing paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER; int useStdin = 0; #ifdef _MSC_VER _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF); #endif i = 1; j = 0; while (i < argc) { if (j == 0) { if (argv[i][0] != T('-')) break; if (argv[i][1] == T('-') && argv[i][2] == T('\0')) { i++; break; } j++; } switch (argv[i][j]) { case T('r'): processFlags &= ~XML_MAP_FILE; j++; break; case T('s'): requireStandalone = 1; j++; break; case T('n'): useNamespaces = 1; j++; break; case T('p'): paramEntityParsing = XML_PARAM_ENTITY_PARSING_ALWAYS; /* fall through */ case T('x'): processFlags |= XML_EXTERNAL_ENTITIES; j++; break; case T('w'): windowsCodePages = 1; j++; break; case T('m'): outputType = 'm'; j++; break; case T('c'): outputType = 'c'; useNamespaces = 0; j++; break; case T('t'): outputType = 't'; j++; break; case T('d'): if (argv[i][j + 1] == T('\0')) { if (++i == argc) usage(argv[0], 2); outputDir = argv[i]; } else outputDir = argv[i] + j + 1; i++; j = 0; break; case T('e'): if (argv[i][j + 1] == T('\0')) { if (++i == argc) usage(argv[0], 2); encoding = argv[i]; } else encoding = argv[i] + j + 1; i++; j = 0; break; case T('h'): usage(argv[0], 0); return 0; case T('v'): showVersion(argv[0]); return 0; case T('\0'): if (j > 1) { i++; j = 0; break; } /* fall through */ default: usage(argv[0], 2); } } if (i == argc) { useStdin = 1; processFlags &= ~XML_MAP_FILE; i--; } for (; i < argc; i++) { FILE *fp = 0; XML_Char *outName = 0; int result; XML_Parser parser; if (useNamespaces) parser = XML_ParserCreateNS(encoding, NSSEP); else parser = XML_ParserCreate(encoding); if (requireStandalone) XML_SetNotStandaloneHandler(parser, notStandalone); XML_SetParamEntityParsing(parser, paramEntityParsing); if (outputType == 't') { /* This is for doing timings; this gives a more realistic estimate of the parsing time. */ outputDir = 0; XML_SetElementHandler(parser, nopStartElement, nopEndElement); XML_SetCharacterDataHandler(parser, nopCharacterData); XML_SetProcessingInstructionHandler(parser, nopProcessingInstruction); } else if (outputDir) { const XML_Char * delim = T("/"); const XML_Char *file = useStdin ? T("STDIN") : argv[i]; if (!useStdin) { /* Jump after last (back)slash */ const XML_Char * lastDelim = tcsrchr(file, delim[0]); if (lastDelim) file = lastDelim + 1; #if (defined(WIN32) || defined(__WATCOMC__)) else { const XML_Char * winDelim = T("\\"); lastDelim = tcsrchr(file, winDelim[0]); if (lastDelim) { file = lastDelim + 1; delim = winDelim; } } #endif } outName = (XML_Char *)malloc((tcslen(outputDir) + tcslen(file) + 2) * sizeof(XML_Char)); tcscpy(outName, outputDir); tcscat(outName, delim); tcscat(outName, file); fp = tfopen(outName, T("wb")); if (!fp) { tperror(outName); exit(1); } setvbuf(fp, NULL, _IOFBF, 16384); #ifdef XML_UNICODE puttc(0xFEFF, fp); #endif XML_SetUserData(parser, fp); switch (outputType) { case 'm': XML_UseParserAsHandlerArg(parser); XML_SetElementHandler(parser, metaStartElement, metaEndElement); XML_SetProcessingInstructionHandler(parser, metaProcessingInstruction); XML_SetCommentHandler(parser, metaComment); XML_SetCdataSectionHandler(parser, metaStartCdataSection, metaEndCdataSection); XML_SetCharacterDataHandler(parser, metaCharacterData); XML_SetDoctypeDeclHandler(parser, metaStartDoctypeDecl, metaEndDoctypeDecl); XML_SetEntityDeclHandler(parser, metaEntityDecl); XML_SetNotationDeclHandler(parser, metaNotationDecl); XML_SetNamespaceDeclHandler(parser, metaStartNamespaceDecl, metaEndNamespaceDecl); metaStartDocument(parser); break; case 'c': XML_UseParserAsHandlerArg(parser); XML_SetDefaultHandler(parser, markup); XML_SetElementHandler(parser, defaultStartElement, defaultEndElement); XML_SetCharacterDataHandler(parser, defaultCharacterData); XML_SetProcessingInstructionHandler(parser, defaultProcessingInstruction); break; default: if (useNamespaces) XML_SetElementHandler(parser, startElementNS, endElementNS); else XML_SetElementHandler(parser, startElement, endElement); XML_SetCharacterDataHandler(parser, characterData); #ifndef W3C14N XML_SetProcessingInstructionHandler(parser, processingInstruction); #endif /* not W3C14N */ break; } } if (windowsCodePages) XML_SetUnknownEncodingHandler(parser, unknownEncoding, 0); result = XML_ProcessFile(parser, useStdin ? NULL : argv[i], processFlags); if (outputDir) { if (outputType == 'm') metaEndDocument(parser); fclose(fp); if (!result) { tremove(outName); exit(2); } free(outName); } XML_ParserFree(parser); } return 0; } astropy-1.1.1/cextern/expat/xmlwf/ct.c0000755001134200020070000000554012602615516020632 0ustar embrayscience00000000000000#define CHARSET_MAX 41 static const char * getTok(const char **pp) { enum { inAtom, inString, init, inComment }; int state = init; const char *tokStart = 0; for (;;) { switch (**pp) { case '\0': return 0; case ' ': case '\r': case '\t': case '\n': if (state == inAtom) return tokStart; break; case '(': if (state == inAtom) return tokStart; if (state != inString) state++; break; case ')': if (state > init) --state; else if (state != inString) return 0; break; case ';': case '/': case '=': if (state == inAtom) return tokStart; if (state == init) return (*pp)++; break; case '\\': ++*pp; if (**pp == '\0') return 0; break; case '"': switch (state) { case inString: ++*pp; return tokStart; case inAtom: return tokStart; case init: tokStart = *pp; state = inString; break; } break; default: if (state == init) { tokStart = *pp; state = inAtom; } break; } ++*pp; } /* not reached */ } /* key must be lowercase ASCII */ static int matchkey(const char *start, const char *end, const char *key) { if (!start) return 0; for (; start != end; start++, key++) if (*start != *key && *start != 'A' + (*key - 'a')) return 0; return *key == '\0'; } void getXMLCharset(const char *buf, char *charset) { const char *next, *p; charset[0] = '\0'; next = buf; p = getTok(&next); if (matchkey(p, next, "text")) strcpy(charset, "us-ascii"); else if (!matchkey(p, next, "application")) return; p = getTok(&next); if (!p || *p != '/') return; p = getTok(&next); if (matchkey(p, next, "xml")) isXml = 1; p = getTok(&next); while (p) { if (*p == ';') { p = getTok(&next); if (matchkey(p, next, "charset")) { p = getTok(&next); if (p && *p == '=') { p = getTok(&next); if (p) { char *s = charset; if (*p == '"') { while (++p != next - 1) { if (*p == '\\') ++p; if (s == charset + CHARSET_MAX - 1) { charset[0] = '\0'; break; } *s++ = *p; } *s++ = '\0'; } else { if (next - p > CHARSET_MAX - 1) break; while (p != next) *s++ = *p++; *s = 0; break; } } } } } else p = getTok(&next); } } int main(int argc, char **argv) { char buf[CHARSET_MAX]; getXMLCharset(argv[1], buf); printf("charset = \"%s\"\n", buf); return 0; } astropy-1.1.1/cextern/expat/xmlwf/win32filemap.c0000755001134200020070000000413712602615516022525 0ustar embrayscience00000000000000/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #define STRICT 1 #define WIN32_LEAN_AND_MEAN 1 #ifdef XML_UNICODE_WCHAR_T #ifndef XML_UNICODE #define XML_UNICODE #endif #endif #ifdef XML_UNICODE #define UNICODE #define _UNICODE #endif /* XML_UNICODE */ #include #include #include #include "filemap.h" static void win32perror(const TCHAR *); int filemap(const TCHAR *name, void (*processor)(const void *, size_t, const TCHAR *, void *arg), void *arg) { HANDLE f; HANDLE m; DWORD size; DWORD sizeHi; void *p; f = CreateFile(name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL); if (f == INVALID_HANDLE_VALUE) { win32perror(name); return 0; } size = GetFileSize(f, &sizeHi); if (size == (DWORD)-1) { win32perror(name); return 0; } if (sizeHi) { _ftprintf(stderr, _T("%s: bigger than 2Gb\n"), name); return 0; } /* CreateFileMapping barfs on zero length files */ if (size == 0) { static const char c = '\0'; processor(&c, 0, name, arg); CloseHandle(f); return 1; } m = CreateFileMapping(f, NULL, PAGE_READONLY, 0, 0, NULL); if (m == NULL) { win32perror(name); CloseHandle(f); return 0; } p = MapViewOfFile(m, FILE_MAP_READ, 0, 0, 0); if (p == NULL) { win32perror(name); CloseHandle(m); CloseHandle(f); return 0; } processor(p, size, name, arg); UnmapViewOfFile(p); CloseHandle(m); CloseHandle(f); return 1; } static void win32perror(const TCHAR *s) { LPVOID buf; if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &buf, 0, NULL)) { _ftprintf(stderr, _T("%s: %s"), s, buf); fflush(stderr); LocalFree(buf); } else _ftprintf(stderr, _T("%s: unknown Windows error\n"), s); } astropy-1.1.1/cextern/expat/xmlwf/xmlurl.h0000755001134200020070000000034012602615516021545 0ustar embrayscience00000000000000#ifdef __cplusplus extern "C" { #endif int XML_URLInit(); void XML_URLUninit(); int XML_ProcessURL(XML_Parser parser, const XML_Char *url, unsigned flags); #ifdef __cplusplus } #endif astropy-1.1.1/cextern/cfitsio/0000755001134200020070000000000012644022135017226 5ustar embrayscience00000000000000astropy-1.1.1/cextern/cfitsio/drvrgsiftp.h0000644001134200020070000000142312602615520021571 0ustar embrayscience00000000000000#ifndef _GSIFTP_H #define _GSIFTP_H int gsiftp_init(void); int gsiftp_setoptions(int options); int gsiftp_getoptions(int *options); int gsiftp_getversion(int *version); int gsiftp_shutdown(void); int gsiftp_checkfile(char *urltype, char *infile, char *outfile); int gsiftp_open(char *filename, int rwmode, int *driverhandle); int gsiftp_create(char *filename, int *driverhandle); int gsiftp_truncate(int driverhandle, LONGLONG filesize); int gsiftp_size(int driverhandle, LONGLONG *filesize); int gsiftp_close(int driverhandle); int gsiftp_remove(char *filename); int gsiftp_flush(int driverhandle); int gsiftp_seek(int driverhandle, LONGLONG offset); int gsiftp_read (int driverhandle, void *buffer, long nbytes); int gsiftp_write(int driverhandle, void *buffer, long nbytes); #endif astropy-1.1.1/cextern/cfitsio/putcole.c0000644001134200020070000011305112602615520021046 0ustar embrayscience00000000000000/* This file, putcole.c, contains routines that write data elements to */ /* a FITS image or table, with float datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffppre( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ float *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). This routine cannot be called directly by users to write to large arrays with > 2**31 pixels (although CFITSIO can do so by passing the firstelem thru a LONGLONG sized global variable) */ { long row; float nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_pixels(fptr, TFLOAT, firstelem, nelem, 0, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcle(fptr, 2, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffppne( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ float *array, /* I - array of values that are written */ float nulval, /* I - undefined pixel value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). Any array values that are equal to the value of nulval will be replaced with the null pixel value that is appropriate for this column. This routine cannot be called directly by users to write to large arrays with > 2**31 pixels (although CFITSIO can do so by passing the firstelem thru a LONGLONG sized global variable) */ { long row; float nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_write_compressed_pixels(fptr, TFLOAT, firstelem, nelem, 1, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcne(fptr, 2, row, firstelem, nelem, array, nulval, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp2de(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ float *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). This routine does not support writing to large images with more than 2**31 pixels. */ { /* call the 3D writing routine, with the 3rd dimension = 1 */ ffp3de(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp3de(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ float *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 3-D cube of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). This routine does not support writing to large images with more than 2**31 pixels. */ { long tablerow, ii, jj; long fpixel[3]= {1,1,1}, lpixel[3]; LONGLONG nfits, narray; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = (long) ncols; lpixel[1] = (long) nrows; lpixel[2] = (long) naxis3; fits_write_compressed_img(fptr, TFLOAT, fpixel, lpixel, 0, array, NULL, status); return(*status); } tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so write all at once */ ffpcle(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to write to */ narray = 0; /* next pixel in input array to be written */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* writing naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffpcle(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpsse(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long naxis, /* I - number of data axes in array */ long *naxes, /* I - size of each FITS axis */ long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ long *lpixel, /* I - last pixel in each axis to write */ float *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write a subsection of pixels to the primary array or image. A subsection is defined to be any contiguous rectangular array of pixels within the n-dimensional FITS data file. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow; LONGLONG fpix[7], dimen[7], astart, pstart; LONGLONG off2, off3, off4, off5, off6, off7; LONGLONG st10, st20, st30, st40, st50, st60, st70; LONGLONG st1, st2, st3, st4, st5, st6, st7; long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; if (*status > 0) return(*status); if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_img(fptr, TFLOAT, fpixel, lpixel, 0, array, NULL, status); return(*status); } if (naxis < 1 || naxis > 7) return(*status = BAD_DIMEN); tablerow=maxvalue(1,group); /* calculate the size and number of loops to perform in each dimension */ for (ii = 0; ii < 7; ii++) { fpix[ii]=1; irange[ii]=1; dimen[ii]=1; } for (ii = 0; ii < naxis; ii++) { fpix[ii]=fpixel[ii]; irange[ii]=lpixel[ii]-fpixel[ii]+1; dimen[ii]=naxes[ii]; } i1=irange[0]; /* compute the pixel offset between each dimension */ off2 = dimen[0]; off3 = off2 * dimen[1]; off4 = off3 * dimen[2]; off5 = off4 * dimen[3]; off6 = off5 * dimen[4]; off7 = off6 * dimen[5]; st10 = fpix[0]; st20 = (fpix[1] - 1) * off2; st30 = (fpix[2] - 1) * off3; st40 = (fpix[3] - 1) * off4; st50 = (fpix[4] - 1) * off5; st60 = (fpix[5] - 1) * off6; st70 = (fpix[6] - 1) * off7; /* store the initial offset in each dimension */ st1 = st10; st2 = st20; st3 = st30; st4 = st40; st5 = st50; st6 = st60; st7 = st70; astart = 0; for (i7 = 0; i7 < irange[6]; i7++) { for (i6 = 0; i6 < irange[5]; i6++) { for (i5 = 0; i5 < irange[4]; i5++) { for (i4 = 0; i4 < irange[3]; i4++) { for (i3 = 0; i3 < irange[2]; i3++) { pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; for (i2 = 0; i2 < irange[1]; i2++) { if (ffpcle(fptr, 2, tablerow, pstart, i1, &array[astart], status) > 0) return(*status); astart += i1; pstart += off2; } st2 = st20; st3 = st3+off3; } st3 = st30; st4 = st4+off4; } st4 = st40; st5 = st5+off5; } st5 = st50; st6 = st6+off6; } st6 = st60; st7 = st7+off7; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpgpe( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long firstelem, /* I - first vector element to write(1 = 1st) */ long nelem, /* I - number of values to write */ float *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of group parameters to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffpcle(fptr, 1L, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpcle( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ float *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of values to a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. */ { int tcode, maxelem2, hdutype, writeraw; long twidth, incre; long ntodo; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull, maxelem; double scale, zero; char tform[20], cform[20]; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); maxelem = maxelem2; if (tcode == TSTRING) ffcfmt(tform, cform); /* derive C format for writing strings */ /* if there is no scaling and the native machine format is not byteswapped then we can simply write the raw data bytes into the FITS file if the datatype of the FITS column is the same as the input values. Otherwise, we must convert the raw values into the scaled and/or machine dependent format in a temporary buffer that has been allocated for this purpose. */ if (scale == 1. && zero == 0. && MACHINE == NATIVE && tcode == TFLOAT) { writeraw = 1; maxelem = nelem; /* we can write the entire array at one time */ } else writeraw = 0; /*---------------------------------------------------------------------*/ /* Now write the pixels to the FITS column. */ /* First call the ffXXfYY routine to (1) convert the datatype */ /* if necessary, and (2) scale the values by the FITS TSCALn and */ /* TZEROn linear scaling parameters into a temporary buffer. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to process a one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ switch (tcode) { case (TFLOAT): if (writeraw) { /* write raw input bytes without conversion */ ffpr4b(fptr, ntodo, incre, &array[next], status); } else { /* convert the raw data before writing to FITS file */ ffr4fr4(&array[next], ntodo, scale, zero, (float *) buffer, status); ffpr4b(fptr, ntodo, incre, (float *) buffer, status); } break; case (TLONGLONG): ffr4fi8(&array[next], ntodo, scale, zero, (LONGLONG *) buffer, status); ffpi8b(fptr, ntodo, incre, (long *) buffer, status); break; case (TBYTE): ffr4fi1(&array[next], ntodo, scale, zero, (unsigned char *) buffer, status); ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); break; case (TSHORT): ffr4fi2(&array[next], ntodo, scale, zero, (short *) buffer, status); ffpi2b(fptr, ntodo, incre, (short *) buffer, status); break; case (TLONG): ffr4fi4(&array[next], ntodo, scale, zero, (INT32BIT *) buffer, status); ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); break; case (TDOUBLE): ffr4fr8(&array[next], ntodo, scale, zero, (double *) buffer, status); ffpr8b(fptr, ntodo, incre, (double *) buffer, status); break; case (TSTRING): /* numerical column in an ASCII table */ if (cform[1] != 's') /* "%s" format is a string */ { ffr4fstr(&array[next], ntodo, scale, zero, cform, twidth, (char *) buffer, status); if (incre == twidth) /* contiguous bytes */ ffpbyt(fptr, ntodo * twidth, buffer, status); else ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); break; } /* can't write to string column, so fall thru to default: */ default: /* error trap */ sprintf(message, "Cannot write numbers to column %d which has format %s", colnum,tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing elements %.0f thru %.0f of input data array (ffpcle).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while writing FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpclc( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ float *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of complex values to a column in the current FITS HDU. Each complex number if interpreted as a pair of float values. The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The input array of values will be converted to the datatype of the column if necessary, but normally complex values should only be written to a binary table with TFORMn = 'rC' where r is an optional repeat count. The TSCALn and TZERO keywords should not be used with complex numbers because mathmatically the scaling should only be applied to the real (first) component of the complex value. */ { /* simply multiply the number of elements by 2, and call ffpcle */ ffpcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpcne( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ float *array, /* I - array of values to write */ float nulvalue, /* I - value used to flag undefined pixels */ int *status) /* IO - error status */ /* Write an array of elements to the specified column of a table. Any input pixels equal to the value of nulvalue will be replaced by the appropriate null value in the output FITS file. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary */ { tcolumn *colptr; long ngood = 0, nbad = 0, ii; LONGLONG repeat, first, fstelm, fstrow; int tcode, overflow = 0; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode > 0) repeat = colptr->trepeat; /* repeat count for this column */ else repeat = firstelem -1 + nelem; /* variable length arrays */ if (abs(tcode) >= TCOMPLEX) { /* treat complex columns as pairs of numbers */ repeat *= 2; } /* if variable length array, first write the whole input vector, then go back and fill in the nulls */ if (tcode < 0) { if (ffpcle(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { if (*status == NUM_OVERFLOW) { /* ignore overflows, which are possibly the null pixel values */ /* overflow = 1; */ *status = 0; } else { return(*status); } } } /* absolute element number in the column */ first = (firstrow - 1) * repeat + firstelem; for (ii = 0; ii < nelem; ii++) { if (array[ii] != nulvalue) /* is this a good pixel? */ { if (nbad) /* write previous string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ /* call ffpcluc, not ffpclu, in case we are writing to a complex ('C') binary table column */ if (ffpcluc(fptr, colnum, fstrow, fstelm, nbad, status) > 0) return(*status); nbad=0; } ngood = ngood +1; /* the consecutive number of good pixels */ } else { if (ngood) /* write previous string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ if (ffpcle(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status) > 0) { if (*status == NUM_OVERFLOW) { overflow = 1; *status = 0; } else { return(*status); } } } ngood=0; } nbad = nbad +1; /* the consecutive number of bad pixels */ } } /* finished loop; now just write the last set of pixels */ if (ngood) /* write last string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ ffpcle(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); } } else if (nbad) /* write last string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpcluc(fptr, colnum, fstrow, fstelm, nbad, status); } if (*status <= 0) { if (overflow) { *status = NUM_OVERFLOW; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffr4fi1(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ unsigned char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) (dvalue + .5); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffr4fi2(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ short *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (input[ii] > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else { if (dvalue >= 0) output[ii] = (short) (dvalue + .5); else output[ii] = (short) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffr4fi4(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ INT32BIT *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (input[ii] > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else output[ii] = (INT32BIT) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else { if (dvalue >= 0) output[ii] = (INT32BIT) (dvalue + .5); else output[ii] = (INT32BIT) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffr4fi8(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ LONGLONG *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (input[ii] > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (long) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else { if (dvalue >= 0) output[ii] = (LONGLONG) (dvalue + .5); else output[ii] = (LONGLONG) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffr4fr4(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ float *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { memcpy(output, input, ntodo * sizeof(float) ); /* copy input to output */ } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) ((input[ii] - zero) / scale); } return(*status); } /*--------------------------------------------------------------------------*/ int ffr4fr8(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ double *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (input[ii] - zero) / scale; } return(*status); } /*--------------------------------------------------------------------------*/ int ffr4fstr(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ char *cform, /* I - format for output string values */ long twidth, /* I - width of each field, in chars */ char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do scaling if required. */ { long ii; double dvalue; char *cptr; cptr = output; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { sprintf(output, cform, (double) input[ii]); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; sprintf(output, cform, dvalue); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } /* replace any commas with periods (e.g., in French locale) */ while ((cptr = strchr(cptr, ','))) *cptr = '.'; return(*status); } astropy-1.1.1/cextern/cfitsio/getcoluk.c0000644001134200020070000021727312602615517021231 0ustar embrayscience00000000000000/* This file, getcolk.c, contains routines that read data elements from */ /* a FITS image or table, with 'unsigned int' data type. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffgpvuk( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned int nulval, /* I - value for undefined pixels */ unsigned int *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; char cdummy; int nullcheck = 1; unsigned int nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_read_compressed_pixels(fptr, TUINT, firstelem, nelem, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcluk(fptr, 2, row, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgpfuk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned int *array, /* O - array of values that are returned */ char *nularray, /* O - array of null pixel flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any undefined pixels in the returned array will be set = 0 and the corresponding nularray value will be set = 1. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; int nullcheck = 2; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_read_compressed_pixels(fptr, TUINT, firstelem, nelem, nullcheck, NULL, array, nularray, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcluk(fptr, 2, row, firstelem, nelem, 1, 2, 0L, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg2duk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ unsigned int nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ unsigned int *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { /* call the 3D reading routine, with the 3rd dimension = 1 */ ffg3duk(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg3duk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ unsigned int nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ unsigned int *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 3-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { long tablerow, ii, jj; char cdummy; int nullcheck = 1; long inc[] = {1,1,1}; LONGLONG fpixel[] = {1,1,1}, nfits, narray; LONGLONG lpixel[3]; unsigned int nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = ncols; lpixel[1] = nrows; lpixel[2] = naxis3; nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TUINT, fpixel, lpixel, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so read all at once */ ffgcluk(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to read */ narray = 0; /* next pixel in output array to be filled */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* reading naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffgcluk(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, &array[narray], &cdummy, anynul, status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsvuk(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ unsigned int nulval, /* I - value to set undefined pixels */ unsigned int *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9]; long nelem, nultyp, ninc, numcol; LONGLONG felem, dsize[10], blcll[9], trcll[9]; int hdutype, anyf; char ldummy, msg[FLEN_ERRMSG]; int nullcheck = 1; unsigned int nullvalue; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvuk is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TUINT, blcll, trcll, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 1; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsvuk: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgcluk(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &ldummy, &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsfuk(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ unsigned int *array, /* O - array to be filled and returned */ char *flagval, /* O - set to 1 if corresponding value is null */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dsize[10]; LONGLONG blcll[9], trcll[9]; long felem, nelem, nultyp, ninc, numcol; long nulval = 0; int hdutype, anyf; char msg[FLEN_ERRMSG]; int nullcheck = 2; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } fits_read_compressed_img(fptr, TUINT, blcll, trcll, inc, nullcheck, NULL, array, flagval, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 2; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgcluk(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &flagval[i0], &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffggpuk( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ long firstelem, /* I - first vector element to read (1 = 1st) */ long nelem, /* I - number of values to read */ unsigned int *array, /* O - array of values that are returned */ int *status) /* IO - error status */ /* Read an array of group parameters from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). */ { long row; int idummy; char cdummy; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcluk(fptr, 1, row, firstelem, nelem, 1, 1, 0L, array, &cdummy, &idummy, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcvuk(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned int nulval, /* I - value for null pixels */ unsigned int *array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. */ { char cdummy; ffgcluk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfuk(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned int *array, /* O - array of values that are read */ char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. */ { int dummy = 0; ffgcluk(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcluk( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long elemincre, /* I - pixel increment; e.g., 2 = every other */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ unsigned int nulval, /* I - value for null pixels if nultyp = 1 */ unsigned int *array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer be a virtual column in a 1 or more grouped FITS primary array or image extension. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The output array of values will be converted from the datatype of the column and will be scaled by the FITS TSCALn and TZEROn values if necessary. */ { double scale, zero, power = 1., dtemp; int tcode, maxelem2, hdutype, xcode, decimals; long twidth, incre; long ii, xwidth, ntodo; int nulcheck; LONGLONG repeat, startpos, elemnum, readptr, tnull; LONGLONG rowlen, rownum, remain, next, rowincre, maxelem; char tform[20]; char message[81]; char snull[20]; /* the FITS null value if reading from ASCII table */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); /* call the 'short' or 'long' version of this routine, if possible */ if (sizeof(int) == sizeof(short)) ffgclui(fptr, colnum, firstrow, firstelem, nelem, elemincre, nultyp, (unsigned short) nulval, (unsigned short *) array, nularray, anynul, status); else if (sizeof(int) == sizeof(long)) ffgcluj(fptr, colnum, firstrow, firstelem, nelem, elemincre, nultyp, (unsigned long) nulval, (unsigned long *) array, nularray, anynul, status); else { /* This is a special case: sizeof(int) is not equal to sizeof(short) or sizeof(long). This occurs on Alpha OSF systems where short = 2 bytes, int = 4 bytes, and long = 8 bytes. */ buffer = cbuff; if (anynul) *anynul = 0; if (nultyp == 2) memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 0, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) return(*status); maxelem = maxelem2; incre *= elemincre; /* multiply incre to just get every nth pixel */ if (tcode == TSTRING) /* setup for ASCII tables */ { /* get the number of implied decimal places if no explicit decmal point */ ffasfm(tform, &xcode, &xwidth, &decimals, status); for(ii = 0; ii < decimals; ii++) power *= 10.; } /*------------------------------------------------------------------*/ /* Decide whether to check for null values in the input FITS file: */ /*------------------------------------------------------------------*/ nulcheck = nultyp; /* by default check for null values in the FITS file */ if (nultyp == 1 && nulval == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ else if (tcode%10 == 1 && /* if reading an integer column, and */ tnull == NULL_UNDEFINED) /* if a null value is not defined, */ nulcheck = 0; /* then do not check for null values. */ else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) nulcheck = 0; /*----------------------------------------------------------------------*/ /* If FITS column and output data array have same datatype, then we do */ /* not need to use a temporary buffer to store intermediate datatype. */ /*----------------------------------------------------------------------*/ if (tcode == TLONG) /* Special Case: */ { /* data are 4-bytes long, so read */ maxelem = nelem; /* data directly into output buffer. */ } /*---------------------------------------------------------------------*/ /* Now read the pixels from the FITS column. If the column does not */ /* have the same datatype as the output array, then we have to read */ /* the raw values into a temporary buffer (of limited size). In */ /* the case of a vector colum read only 1 vector of values at a time */ /* then skip to the next row if more values need to be read. */ /* After reading the raw values, then call the fffXXYY routine to (1) */ /* test for undefined values, (2) convert the datatype if necessary, */ /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ /* scaling parameters. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to read */ next = 0; /* next element in array to be read */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to read at one time to the number that will fit in the buffer or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); switch (tcode) { case (TLONG): ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) &array[next], status); fffi4uint((INT32BIT *) &array[next], ntodo, scale, zero, nulcheck, (INT32BIT) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONGLONG): ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); fffi8uint( (LONGLONG *) buffer, ntodo, scale, zero, nulcheck, tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TBYTE): ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, status); fffi1uint((unsigned char *) buffer, ntodo, scale, zero,nulcheck, (unsigned char) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TSHORT): ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); fffi2uint((short *) buffer, ntodo, scale, zero, nulcheck, (short) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TFLOAT): ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); fffr4uint((float *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TDOUBLE): ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); fffr8uint((double *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TSTRING): ffmbyt(fptr, readptr, REPORT_EOF, status); if (incre == twidth) /* contiguous bytes */ ffgbyt(fptr, ntodo * twidth, buffer, status); else ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); fffstruint((char *) buffer, ntodo, scale, zero, twidth, power, nulcheck, snull, nulval, &nularray[next], anynul, &array[next], status); break; default: /* error trap for invalid column format */ sprintf(message, "Cannot read numbers from column %d which has format %s", colnum, tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous read operation */ { dtemp = (double) next; if (hdutype > 0) sprintf(message, "Error reading elements %.0f thru %.0f from column %d (ffgcluk).", dtemp+1., dtemp+ntodo, colnum); else sprintf(message, "Error reading elements %.0f thru %.0f from image (ffgcluk).", dtemp+1., dtemp+ntodo); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum = elemnum + (ntodo * elemincre); if (elemnum >= repeat) /* completed a row; start on later row */ { rowincre = elemnum / repeat; rownum += rowincre; elemnum = elemnum - (rowincre * repeat); } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while reading FITS data."); *status = NUM_OVERFLOW; } } /* end of DEC Alpha special case */ return(*status); } /*--------------------------------------------------------------------------*/ int fffi1uint(unsigned char *input,/* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (unsigned int) input[ii]; /* copy input */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (unsigned int) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi2uint(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else output[ii] = (unsigned int) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else output[ii] = (unsigned int) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi4uint(INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 2147483648.) { /* Instead of adding 2147483648, it is more efficient */ /* to just flip the sign bit with the XOR operator */ for (ii = 0; ii < ntodo; ii++) output[ii] = ( *(unsigned int *) &input[ii] ) ^ 0x80000000; } else if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else output[ii] = (unsigned int) input[ii]; /* copy to output */ } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 2147483648.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = ( *(unsigned int *) &input[ii] ) ^ 0x80000000; } } else if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else output[ii] = (unsigned int) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi8uint(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > UINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > UINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr4uint(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr++; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (zero > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr8uint(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr += 3; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (zero > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (unsigned int) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffstruint(char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ long twidth, /* I - width of each substring of chars */ double implipower, /* I - power of 10 of implied decimal */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ char *snull, /* I - value of FITS null string, if any */ unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to snull. If nullcheck= 0, then no special checking for nulls is performed. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { int nullen; long ii; double dvalue; char *cstring, message[81]; char *cptr, *tpos; char tempstore, chrzero = '0'; double val, power; int exponent, sign, esign, decpt; nullen = strlen(snull); cptr = input; /* pointer to start of input string */ for (ii = 0; ii < ntodo; ii++) { cstring = cptr; /* temporarily insert a null terminator at end of the string */ tpos = cptr + twidth; tempstore = *tpos; *tpos = 0; /* check if null value is defined, and if the */ /* column string is identical to the null string */ if (snull[0] != ASCII_NULL_UNDEFINED && !strncmp(snull, cptr, nullen) ) { if (nullcheck) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } cptr += twidth; } else { /* value is not the null value, so decode it */ /* remove any embedded blank characters from the string */ decpt = 0; sign = 1; val = 0.; power = 1.; exponent = 0; esign = 1; while (*cptr == ' ') /* skip leading blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for leading sign */ { if (*cptr == '-') sign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and value */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } if (*cptr == '.' || *cptr == ',') /* check for decimal point */ { decpt = 1; /* set flag to show there was a decimal point */ cptr++; while (*cptr == ' ') /* skip any blanks */ cptr++; while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ power = power * 10.; cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } } if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ { cptr++; while (*cptr == ' ') /* skip blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ { if (*cptr == '-') esign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and exp */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ cptr++; while (*cptr == ' ') /* skip embedded blanks */ cptr++; } } if (*cptr != 0) /* should end up at the null terminator */ { sprintf(message, "Cannot read number from ASCII table"); ffpmsg(message); sprintf(message, "Column field = %s.", cstring); ffpmsg(message); /* restore the char that was overwritten by the null */ *tpos = tempstore; return(*status = BAD_C2D); } if (!decpt) /* if no explicit decimal, use implied */ power = implipower; dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); dvalue = dvalue * scale + zero; /* apply the scaling */ if (dvalue < DUINT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUINT_MAX) { *status = OVERFLOW_ERR; output[ii] = UINT_MAX; } else output[ii] = (long) dvalue; } /* restore the char that was overwritten by the null */ *tpos = tempstore; } return(*status); } astropy-1.1.1/cextern/cfitsio/inflate.c0000644001134200020070000014661712602615520021033 0ustar embrayscience00000000000000/* inflate.c -- zlib decompression * Copyright (C) 1995-2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* * Change history: * * 1.2.beta0 24 Nov 2002 * - First version -- complete rewrite of inflate to simplify code, avoid * creation of window when not needed, minimize use of window when it is * needed, make inffast.c even faster, implement gzip decoding, and to * improve code readability and style over the previous zlib inflate code * * 1.2.beta1 25 Nov 2002 * - Use pointers for available input and output checking in inffast.c * - Remove input and output counters in inffast.c * - Change inffast.c entry and loop from avail_in >= 7 to >= 6 * - Remove unnecessary second byte pull from length extra in inffast.c * - Unroll direct copy to three copies per loop in inffast.c * * 1.2.beta2 4 Dec 2002 * - Change external routine names to reduce potential conflicts * - Correct filename to inffixed.h for fixed tables in inflate.c * - Make hbuf[] unsigned char to match parameter type in inflate.c * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset) * to avoid negation problem on Alphas (64 bit) in inflate.c * * 1.2.beta3 22 Dec 2002 * - Add comments on state->bits assertion in inffast.c * - Add comments on op field in inftrees.h * - Fix bug in reuse of allocated window after inflateReset() * - Remove bit fields--back to byte structure for speed * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths * - Change post-increments to pre-increments in inflate_fast(), PPC biased? * - Add compile time option, POSTINC, to use post-increments instead (Intel?) * - Make MATCH copy in inflate() much faster for when inflate_fast() not used * - Use local copies of stream next and avail values, as well as local bit * buffer and bit count in inflate()--for speed when inflate_fast() not used * * 1.2.beta4 1 Jan 2003 * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings * - Move a comment on output buffer sizes from inffast.c to inflate.c * - Add comments in inffast.c to introduce the inflate_fast() routine * - Rearrange window copies in inflate_fast() for speed and simplification * - Unroll last copy for window match in inflate_fast() * - Use local copies of window variables in inflate_fast() for speed * - Pull out common wnext == 0 case for speed in inflate_fast() * - Make op and len in inflate_fast() unsigned for consistency * - Add FAR to lcode and dcode declarations in inflate_fast() * - Simplified bad distance check in inflate_fast() * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new * source file infback.c to provide a call-back interface to inflate for * programs like gzip and unzip -- uses window as output buffer to avoid * window copying * * 1.2.beta5 1 Jan 2003 * - Improved inflateBack() interface to allow the caller to provide initial * input in strm. * - Fixed stored blocks bug in inflateBack() * * 1.2.beta6 4 Jan 2003 * - Added comments in inffast.c on effectiveness of POSTINC * - Typecasting all around to reduce compiler warnings * - Changed loops from while (1) or do {} while (1) to for (;;), again to * make compilers happy * - Changed type of window in inflateBackInit() to unsigned char * * * 1.2.beta7 27 Jan 2003 * - Changed many types to unsigned or unsigned short to avoid warnings * - Added inflateCopy() function * * 1.2.0 9 Mar 2003 * - Changed inflateBack() interface to provide separate opaque descriptors * for the in() and out() functions * - Changed inflateBack() argument and in_func typedef to swap the length * and buffer address return values for the input function * - Check next_in and next_out for Z_NULL on entry to inflate() * * The history for versions after 1.2.0 are in ChangeLog in zlib distribution. */ #include "zutil.h" #include "inftrees.h" #include "inflate.h" #include "inffast.h" #ifdef MAKEFIXED # ifndef BUILDFIXED # define BUILDFIXED # endif #endif /* function prototypes */ local void fixedtables OF((struct inflate_state FAR *state)); local int updatewindow OF((z_streamp strm, unsigned out)); #ifdef BUILDFIXED void makefixed OF((void)); #endif local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf, unsigned len)); int ZEXPORT inflateReset(strm) z_streamp strm; { struct inflate_state FAR *state; if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; strm->total_in = strm->total_out = state->total = 0; strm->msg = Z_NULL; strm->adler = 1; /* to support ill-conceived Java test suite */ state->mode = HEAD; state->last = 0; state->havedict = 0; state->dmax = 32768U; state->head = Z_NULL; state->wsize = 0; state->whave = 0; state->wnext = 0; state->hold = 0; state->bits = 0; state->lencode = state->distcode = state->next = state->codes; state->sane = 1; state->back = -1; Tracev((stderr, "inflate: reset\n")); return Z_OK; } int ZEXPORT inflateReset2(strm, windowBits) z_streamp strm; int windowBits; { int wrap; struct inflate_state FAR *state; /* get the state */ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; /* extract wrap request from windowBits parameter */ if (windowBits < 0) { wrap = 0; windowBits = -windowBits; } else { wrap = (windowBits >> 4) + 1; #ifdef GUNZIP if (windowBits < 48) windowBits &= 15; #endif } /* set number of window bits, free window if different */ if (windowBits && (windowBits < 8 || windowBits > 15)) return Z_STREAM_ERROR; if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) { ZFREE(strm, state->window); state->window = Z_NULL; } /* update state and reset the rest of it */ state->wrap = wrap; state->wbits = (unsigned)windowBits; return inflateReset(strm); } int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) z_streamp strm; int windowBits; const char *version; int stream_size; { int ret; struct inflate_state FAR *state; if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || stream_size != (int)(sizeof(z_stream))) return Z_VERSION_ERROR; if (strm == Z_NULL) return Z_STREAM_ERROR; strm->msg = Z_NULL; /* in case we return an error */ if (strm->zalloc == (alloc_func)0) { strm->zalloc = zcalloc; strm->opaque = (voidpf)0; } if (strm->zfree == (free_func)0) strm->zfree = zcfree; state = (struct inflate_state FAR *) ZALLOC(strm, 1, sizeof(struct inflate_state)); if (state == Z_NULL) return Z_MEM_ERROR; Tracev((stderr, "inflate: allocated\n")); strm->state = (struct internal_state FAR *)state; state->window = Z_NULL; ret = inflateReset2(strm, windowBits); if (ret != Z_OK) { ZFREE(strm, state); strm->state = Z_NULL; } return ret; } int ZEXPORT inflateInit_(strm, version, stream_size) z_streamp strm; const char *version; int stream_size; { return inflateInit2_(strm, DEF_WBITS, version, stream_size); } int ZEXPORT inflatePrime(strm, bits, value) z_streamp strm; int bits; int value; { struct inflate_state FAR *state; if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; if (bits < 0) { state->hold = 0; state->bits = 0; return Z_OK; } if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR; value &= (1L << bits) - 1; state->hold += value << state->bits; state->bits += bits; return Z_OK; } /* Return state with length and distance decoding tables and index sizes set to fixed code decoding. Normally this returns fixed tables from inffixed.h. If BUILDFIXED is defined, then instead this routine builds the tables the first time it's called, and returns those tables the first time and thereafter. This reduces the size of the code by about 2K bytes, in exchange for a little execution time. However, BUILDFIXED should not be used for threaded applications, since the rewriting of the tables and virgin may not be thread-safe. */ local void fixedtables(state) struct inflate_state FAR *state; { #ifdef BUILDFIXED static int virgin = 1; static code *lenfix, *distfix; static code fixed[544]; /* build fixed huffman tables if first call (may not be thread safe) */ if (virgin) { unsigned sym, bits; static code *next; /* literal/length table */ sym = 0; while (sym < 144) state->lens[sym++] = 8; while (sym < 256) state->lens[sym++] = 9; while (sym < 280) state->lens[sym++] = 7; while (sym < 288) state->lens[sym++] = 8; next = fixed; lenfix = next; bits = 9; inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); /* distance table */ sym = 0; while (sym < 32) state->lens[sym++] = 5; distfix = next; bits = 5; inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); /* do this just once */ virgin = 0; } #else /* !BUILDFIXED */ # include "inffixed.h" #endif /* BUILDFIXED */ state->lencode = lenfix; state->lenbits = 9; state->distcode = distfix; state->distbits = 5; } #ifdef MAKEFIXED #include /* Write out the inffixed.h that is #include'd above. Defining MAKEFIXED also defines BUILDFIXED, so the tables are built on the fly. makefixed() writes those tables to stdout, which would be piped to inffixed.h. A small program can simply call makefixed to do this: void makefixed(void); int main(void) { makefixed(); return 0; } Then that can be linked with zlib built with MAKEFIXED defined and run: a.out > inffixed.h */ void makefixed() { unsigned low, size; struct inflate_state state; fixedtables(&state); puts(" /* inffixed.h -- table for decoding fixed codes"); puts(" * Generated automatically by makefixed()."); puts(" */"); puts(""); puts(" /* WARNING: this file should *not* be used by applications."); puts(" It is part of the implementation of this library and is"); puts(" subject to change. Applications should only use zlib.h."); puts(" */"); puts(""); size = 1U << 9; printf(" static const code lenfix[%u] = {", size); low = 0; for (;;) { if ((low % 7) == 0) printf("\n "); printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits, state.lencode[low].val); if (++low == size) break; putchar(','); } puts("\n };"); size = 1U << 5; printf("\n static const code distfix[%u] = {", size); low = 0; for (;;) { if ((low % 6) == 0) printf("\n "); printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits, state.distcode[low].val); if (++low == size) break; putchar(','); } puts("\n };"); } #endif /* MAKEFIXED */ /* Update the window with the last wsize (normally 32K) bytes written before returning. If window does not exist yet, create it. This is only called when a window is already in use, or when output has been written during this inflate call, but the end of the deflate stream has not been reached yet. It is also called to create a window for dictionary data when a dictionary is loaded. Providing output buffers larger than 32K to inflate() should provide a speed advantage, since only the last 32K of output is copied to the sliding window upon return from inflate(), and since all distances after the first 32K of output will fall in the output data, making match copies simpler and faster. The advantage may be dependent on the size of the processor's data caches. */ local int updatewindow(strm, out) z_streamp strm; unsigned out; { struct inflate_state FAR *state; unsigned copy, dist; state = (struct inflate_state FAR *)strm->state; /* if it hasn't been done already, allocate space for the window */ if (state->window == Z_NULL) { state->window = (unsigned char FAR *) ZALLOC(strm, 1U << state->wbits, sizeof(unsigned char)); if (state->window == Z_NULL) return 1; } /* if window not in use yet, initialize */ if (state->wsize == 0) { state->wsize = 1U << state->wbits; state->wnext = 0; state->whave = 0; } /* copy state->wsize or less output bytes into the circular window */ copy = out - strm->avail_out; if (copy >= state->wsize) { zmemcpy(state->window, strm->next_out - state->wsize, state->wsize); state->wnext = 0; state->whave = state->wsize; } else { dist = state->wsize - state->wnext; if (dist > copy) dist = copy; zmemcpy(state->window + state->wnext, strm->next_out - copy, dist); copy -= dist; if (copy) { zmemcpy(state->window, strm->next_out - copy, copy); state->wnext = copy; state->whave = state->wsize; } else { state->wnext += dist; if (state->wnext == state->wsize) state->wnext = 0; if (state->whave < state->wsize) state->whave += dist; } } return 0; } /* Macros for inflate(): */ /* check function to use adler32() for zlib or crc32() for gzip */ #ifdef GUNZIP # define UPDATE(check, buf, len) \ (state->flags ? crc32(check, buf, len) : adler32(check, buf, len)) #else # define UPDATE(check, buf, len) adler32(check, buf, len) #endif /* check macros for header crc */ #ifdef GUNZIP # define CRC2(check, word) \ do { \ hbuf[0] = (unsigned char)(word); \ hbuf[1] = (unsigned char)((word) >> 8); \ check = crc32(check, hbuf, 2); \ } while (0) # define CRC4(check, word) \ do { \ hbuf[0] = (unsigned char)(word); \ hbuf[1] = (unsigned char)((word) >> 8); \ hbuf[2] = (unsigned char)((word) >> 16); \ hbuf[3] = (unsigned char)((word) >> 24); \ check = crc32(check, hbuf, 4); \ } while (0) #endif /* Load registers with state in inflate() for speed */ #define LOAD() \ do { \ put = strm->next_out; \ left = strm->avail_out; \ next = strm->next_in; \ have = strm->avail_in; \ hold = state->hold; \ bits = state->bits; \ } while (0) /* Restore state from registers in inflate() */ #define RESTORE() \ do { \ strm->next_out = put; \ strm->avail_out = left; \ strm->next_in = next; \ strm->avail_in = have; \ state->hold = hold; \ state->bits = bits; \ } while (0) /* Clear the input bit accumulator */ #define INITBITS() \ do { \ hold = 0; \ bits = 0; \ } while (0) /* Get a byte of input into the bit accumulator, or return from inflate() if there is no input available. */ #define PULLBYTE() \ do { \ if (have == 0) goto inf_leave; \ have--; \ hold += (unsigned long)(*next++) << bits; \ bits += 8; \ } while (0) /* Assure that there are at least n bits in the bit accumulator. If there is not enough available input to do that, then return from inflate(). */ #define NEEDBITS(n) \ do { \ while (bits < (unsigned)(n)) \ PULLBYTE(); \ } while (0) /* Return the low n bits of the bit accumulator (n < 16) */ #define BITS(n) \ ((unsigned)hold & ((1U << (n)) - 1)) /* Remove n bits from the bit accumulator */ #define DROPBITS(n) \ do { \ hold >>= (n); \ bits -= (unsigned)(n); \ } while (0) /* Remove zero to seven bits as needed to go to a byte boundary */ #define BYTEBITS() \ do { \ hold >>= bits & 7; \ bits -= bits & 7; \ } while (0) /* Reverse the bytes in a 32-bit value */ #define REVERSE(q) \ ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \ (((q) & 0xff00) << 8) + (((q) & 0xff) << 24)) /* inflate() uses a state machine to process as much input data and generate as much output data as possible before returning. The state machine is structured roughly as follows: for (;;) switch (state) { ... case STATEn: if (not enough input data or output space to make progress) return; ... make progress ... state = STATEm; break; ... } so when inflate() is called again, the same case is attempted again, and if the appropriate resources are provided, the machine proceeds to the next state. The NEEDBITS() macro is usually the way the state evaluates whether it can proceed or should return. NEEDBITS() does the return if the requested bits are not available. The typical use of the BITS macros is: NEEDBITS(n); ... do something with BITS(n) ... DROPBITS(n); where NEEDBITS(n) either returns from inflate() if there isn't enough input left to load n bits into the accumulator, or it continues. BITS(n) gives the low n bits in the accumulator. When done, DROPBITS(n) drops the low n bits off the accumulator. INITBITS() clears the accumulator and sets the number of available bits to zero. BYTEBITS() discards just enough bits to put the accumulator on a byte boundary. After BYTEBITS() and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return if there is no input available. The decoding of variable length codes uses PULLBYTE() directly in order to pull just enough bytes to decode the next code, and no more. Some states loop until they get enough input, making sure that enough state information is maintained to continue the loop where it left off if NEEDBITS() returns in the loop. For example, want, need, and keep would all have to actually be part of the saved state in case NEEDBITS() returns: case STATEw: while (want < need) { NEEDBITS(n); keep[want++] = BITS(n); DROPBITS(n); } state = STATEx; case STATEx: As shown above, if the next state is also the next case, then the break is omitted. A state may also return if there is not enough output space available to complete that state. Those states are copying stored data, writing a literal byte, and copying a matching string. When returning, a "goto inf_leave" is used to update the total counters, update the check value, and determine whether any progress has been made during that inflate() call in order to return the proper return code. Progress is defined as a change in either strm->avail_in or strm->avail_out. When there is a window, goto inf_leave will update the window with the last output written. If a goto inf_leave occurs in the middle of decompression and there is no window currently, goto inf_leave will create one and copy output to the window for the next call of inflate(). In this implementation, the flush parameter of inflate() only affects the return code (per zlib.h). inflate() always writes as much as possible to strm->next_out, given the space available and the provided input--the effect documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers the allocation of and copying into a sliding window until necessary, which provides the effect documented in zlib.h for Z_FINISH when the entire input stream available. So the only thing the flush parameter actually does is: when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it will return Z_BUF_ERROR if it has not reached the end of the stream. */ int ZEXPORT inflate(strm, flush) z_streamp strm; int flush; { struct inflate_state FAR *state; unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ unsigned have, left; /* available input and output */ unsigned long hold; /* bit buffer */ unsigned bits; /* bits in bit buffer */ unsigned in, out; /* save starting available input and output */ unsigned copy; /* number of stored or match bytes to copy */ unsigned char FAR *from; /* where to copy match bytes from */ code here; /* current decoding table entry */ code last; /* parent table entry */ unsigned len; /* length to copy for repeats, bits to drop */ int ret; /* return code */ #ifdef GUNZIP unsigned char hbuf[4]; /* buffer for gzip header crc calculation */ #endif static const unsigned short order[19] = /* permutation of code lengths */ {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL || (strm->next_in == Z_NULL && strm->avail_in != 0)) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */ LOAD(); in = have; out = left; ret = Z_OK; for (;;) switch (state->mode) { case HEAD: if (state->wrap == 0) { state->mode = TYPEDO; break; } NEEDBITS(16); #ifdef GUNZIP if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */ state->check = crc32(0L, Z_NULL, 0); CRC2(state->check, hold); INITBITS(); state->mode = FLAGS; break; } state->flags = 0; /* expect zlib header */ if (state->head != Z_NULL) state->head->done = -1; if (!(state->wrap & 1) || /* check if zlib header allowed */ #else if ( #endif ((BITS(8) << 8) + (hold >> 8)) % 31) { strm->msg = (char *)"incorrect header check"; state->mode = BAD; break; } if (BITS(4) != Z_DEFLATED) { strm->msg = (char *)"unknown compression method"; state->mode = BAD; break; } DROPBITS(4); len = BITS(4) + 8; if (state->wbits == 0) state->wbits = len; else if (len > state->wbits) { strm->msg = (char *)"invalid window size"; state->mode = BAD; break; } state->dmax = 1U << len; Tracev((stderr, "inflate: zlib header ok\n")); strm->adler = state->check = adler32(0L, Z_NULL, 0); state->mode = hold & 0x200 ? DICTID : TYPE; INITBITS(); break; #ifdef GUNZIP case FLAGS: NEEDBITS(16); state->flags = (int)(hold); if ((state->flags & 0xff) != Z_DEFLATED) { strm->msg = (char *)"unknown compression method"; state->mode = BAD; break; } if (state->flags & 0xe000) { strm->msg = (char *)"unknown header flags set"; state->mode = BAD; break; } if (state->head != Z_NULL) state->head->text = (int)((hold >> 8) & 1); if (state->flags & 0x0200) CRC2(state->check, hold); INITBITS(); state->mode = TIME; case TIME: NEEDBITS(32); if (state->head != Z_NULL) state->head->time = hold; if (state->flags & 0x0200) CRC4(state->check, hold); INITBITS(); state->mode = OS; case OS: NEEDBITS(16); if (state->head != Z_NULL) { state->head->xflags = (int)(hold & 0xff); state->head->os = (int)(hold >> 8); } if (state->flags & 0x0200) CRC2(state->check, hold); INITBITS(); state->mode = EXLEN; case EXLEN: if (state->flags & 0x0400) { NEEDBITS(16); state->length = (unsigned)(hold); if (state->head != Z_NULL) state->head->extra_len = (unsigned)hold; if (state->flags & 0x0200) CRC2(state->check, hold); INITBITS(); } else if (state->head != Z_NULL) state->head->extra = Z_NULL; state->mode = EXTRA; case EXTRA: if (state->flags & 0x0400) { copy = state->length; if (copy > have) copy = have; if (copy) { if (state->head != Z_NULL && state->head->extra != Z_NULL) { len = state->head->extra_len - state->length; zmemcpy(state->head->extra + len, next, len + copy > state->head->extra_max ? state->head->extra_max - len : copy); } if (state->flags & 0x0200) state->check = crc32(state->check, next, copy); have -= copy; next += copy; state->length -= copy; } if (state->length) goto inf_leave; } state->length = 0; state->mode = NAME; case NAME: if (state->flags & 0x0800) { if (have == 0) goto inf_leave; copy = 0; do { len = (unsigned)(next[copy++]); if (state->head != Z_NULL && state->head->name != Z_NULL && state->length < state->head->name_max) state->head->name[state->length++] = len; } while (len && copy < have); if (state->flags & 0x0200) state->check = crc32(state->check, next, copy); have -= copy; next += copy; if (len) goto inf_leave; } else if (state->head != Z_NULL) state->head->name = Z_NULL; state->length = 0; state->mode = COMMENT; case COMMENT: if (state->flags & 0x1000) { if (have == 0) goto inf_leave; copy = 0; do { len = (unsigned)(next[copy++]); if (state->head != Z_NULL && state->head->comment != Z_NULL && state->length < state->head->comm_max) state->head->comment[state->length++] = len; } while (len && copy < have); if (state->flags & 0x0200) state->check = crc32(state->check, next, copy); have -= copy; next += copy; if (len) goto inf_leave; } else if (state->head != Z_NULL) state->head->comment = Z_NULL; state->mode = HCRC; case HCRC: if (state->flags & 0x0200) { NEEDBITS(16); if (hold != (state->check & 0xffff)) { strm->msg = (char *)"header crc mismatch"; state->mode = BAD; break; } INITBITS(); } if (state->head != Z_NULL) { state->head->hcrc = (int)((state->flags >> 9) & 1); state->head->done = 1; } strm->adler = state->check = crc32(0L, Z_NULL, 0); state->mode = TYPE; break; #endif case DICTID: NEEDBITS(32); strm->adler = state->check = REVERSE(hold); INITBITS(); state->mode = DICT; case DICT: if (state->havedict == 0) { RESTORE(); return Z_NEED_DICT; } strm->adler = state->check = adler32(0L, Z_NULL, 0); state->mode = TYPE; case TYPE: if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave; case TYPEDO: if (state->last) { BYTEBITS(); state->mode = CHECK; break; } NEEDBITS(3); state->last = BITS(1); DROPBITS(1); switch (BITS(2)) { case 0: /* stored block */ Tracev((stderr, "inflate: stored block%s\n", state->last ? " (last)" : "")); state->mode = STORED; break; case 1: /* fixed block */ fixedtables(state); Tracev((stderr, "inflate: fixed codes block%s\n", state->last ? " (last)" : "")); state->mode = LEN_; /* decode codes */ if (flush == Z_TREES) { DROPBITS(2); goto inf_leave; } break; case 2: /* dynamic block */ Tracev((stderr, "inflate: dynamic codes block%s\n", state->last ? " (last)" : "")); state->mode = TABLE; break; case 3: strm->msg = (char *)"invalid block type"; state->mode = BAD; } DROPBITS(2); break; case STORED: BYTEBITS(); /* go to byte boundary */ NEEDBITS(32); if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { strm->msg = (char *)"invalid stored block lengths"; state->mode = BAD; break; } state->length = (unsigned)hold & 0xffff; Tracev((stderr, "inflate: stored length %u\n", state->length)); INITBITS(); state->mode = COPY_; if (flush == Z_TREES) goto inf_leave; case COPY_: state->mode = COPY; case COPY: copy = state->length; if (copy) { if (copy > have) copy = have; if (copy > left) copy = left; if (copy == 0) goto inf_leave; zmemcpy(put, next, copy); have -= copy; next += copy; left -= copy; put += copy; state->length -= copy; break; } Tracev((stderr, "inflate: stored end\n")); state->mode = TYPE; break; case TABLE: NEEDBITS(14); state->nlen = BITS(5) + 257; DROPBITS(5); state->ndist = BITS(5) + 1; DROPBITS(5); state->ncode = BITS(4) + 4; DROPBITS(4); #ifndef PKZIP_BUG_WORKAROUND if (state->nlen > 286 || state->ndist > 30) { strm->msg = (char *)"too many length or distance symbols"; state->mode = BAD; break; } #endif Tracev((stderr, "inflate: table sizes ok\n")); state->have = 0; state->mode = LENLENS; case LENLENS: while (state->have < state->ncode) { NEEDBITS(3); state->lens[order[state->have++]] = (unsigned short)BITS(3); DROPBITS(3); } while (state->have < 19) state->lens[order[state->have++]] = 0; state->next = state->codes; state->lencode = (code const FAR *)(state->next); state->lenbits = 7; ret = inflate_table(CODES, state->lens, 19, &(state->next), &(state->lenbits), state->work); if (ret) { strm->msg = (char *)"invalid code lengths set"; state->mode = BAD; break; } Tracev((stderr, "inflate: code lengths ok\n")); state->have = 0; state->mode = CODELENS; case CODELENS: while (state->have < state->nlen + state->ndist) { for (;;) { here = state->lencode[BITS(state->lenbits)]; if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } if (here.val < 16) { NEEDBITS(here.bits); DROPBITS(here.bits); state->lens[state->have++] = here.val; } else { if (here.val == 16) { NEEDBITS(here.bits + 2); DROPBITS(here.bits); if (state->have == 0) { strm->msg = (char *)"invalid bit length repeat"; state->mode = BAD; break; } len = state->lens[state->have - 1]; copy = 3 + BITS(2); DROPBITS(2); } else if (here.val == 17) { NEEDBITS(here.bits + 3); DROPBITS(here.bits); len = 0; copy = 3 + BITS(3); DROPBITS(3); } else { NEEDBITS(here.bits + 7); DROPBITS(here.bits); len = 0; copy = 11 + BITS(7); DROPBITS(7); } if (state->have + copy > state->nlen + state->ndist) { strm->msg = (char *)"invalid bit length repeat"; state->mode = BAD; break; } while (copy--) state->lens[state->have++] = (unsigned short)len; } } /* handle error breaks in while */ if (state->mode == BAD) break; /* check for end-of-block code (better have one) */ if (state->lens[256] == 0) { strm->msg = (char *)"invalid code -- missing end-of-block"; state->mode = BAD; break; } /* build code tables -- note: do not change the lenbits or distbits values here (9 and 6) without reading the comments in inftrees.h concerning the ENOUGH constants, which depend on those values */ state->next = state->codes; state->lencode = (code const FAR *)(state->next); state->lenbits = 9; ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), &(state->lenbits), state->work); if (ret) { strm->msg = (char *)"invalid literal/lengths set"; state->mode = BAD; break; } state->distcode = (code const FAR *)(state->next); state->distbits = 6; ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, &(state->next), &(state->distbits), state->work); if (ret) { strm->msg = (char *)"invalid distances set"; state->mode = BAD; break; } Tracev((stderr, "inflate: codes ok\n")); state->mode = LEN_; if (flush == Z_TREES) goto inf_leave; case LEN_: state->mode = LEN; case LEN: if (have >= 6 && left >= 258) { RESTORE(); inflate_fast(strm, out); LOAD(); if (state->mode == TYPE) state->back = -1; break; } state->back = 0; for (;;) { here = state->lencode[BITS(state->lenbits)]; if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } if (here.op && (here.op & 0xf0) == 0) { last = here; for (;;) { here = state->lencode[last.val + (BITS(last.bits + last.op) >> last.bits)]; if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); state->back += last.bits; } DROPBITS(here.bits); state->back += here.bits; state->length = (unsigned)here.val; if ((int)(here.op) == 0) { Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? "inflate: literal '%c'\n" : "inflate: literal 0x%02x\n", here.val)); state->mode = LIT; break; } if (here.op & 32) { Tracevv((stderr, "inflate: end of block\n")); state->back = -1; state->mode = TYPE; break; } if (here.op & 64) { strm->msg = (char *)"invalid literal/length code"; state->mode = BAD; break; } state->extra = (unsigned)(here.op) & 15; state->mode = LENEXT; case LENEXT: if (state->extra) { NEEDBITS(state->extra); state->length += BITS(state->extra); DROPBITS(state->extra); state->back += state->extra; } Tracevv((stderr, "inflate: length %u\n", state->length)); state->was = state->length; state->mode = DIST; case DIST: for (;;) { here = state->distcode[BITS(state->distbits)]; if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } if ((here.op & 0xf0) == 0) { last = here; for (;;) { here = state->distcode[last.val + (BITS(last.bits + last.op) >> last.bits)]; if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); state->back += last.bits; } DROPBITS(here.bits); state->back += here.bits; if (here.op & 64) { strm->msg = (char *)"invalid distance code"; state->mode = BAD; break; } state->offset = (unsigned)here.val; state->extra = (unsigned)(here.op) & 15; state->mode = DISTEXT; case DISTEXT: if (state->extra) { NEEDBITS(state->extra); state->offset += BITS(state->extra); DROPBITS(state->extra); state->back += state->extra; } #ifdef INFLATE_STRICT if (state->offset > state->dmax) { strm->msg = (char *)"invalid distance too far back"; state->mode = BAD; break; } #endif Tracevv((stderr, "inflate: distance %u\n", state->offset)); state->mode = MATCH; case MATCH: if (left == 0) goto inf_leave; copy = out - left; if (state->offset > copy) { /* copy from window */ copy = state->offset - copy; if (copy > state->whave) { if (state->sane) { strm->msg = (char *)"invalid distance too far back"; state->mode = BAD; break; } #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR Trace((stderr, "inflate.c too far\n")); copy -= state->whave; if (copy > state->length) copy = state->length; if (copy > left) copy = left; left -= copy; state->length -= copy; do { *put++ = 0; } while (--copy); if (state->length == 0) state->mode = LEN; break; #endif } if (copy > state->wnext) { copy -= state->wnext; from = state->window + (state->wsize - copy); } else from = state->window + (state->wnext - copy); if (copy > state->length) copy = state->length; } else { /* copy from output */ from = put - state->offset; copy = state->length; } if (copy > left) copy = left; left -= copy; state->length -= copy; do { *put++ = *from++; } while (--copy); if (state->length == 0) state->mode = LEN; break; case LIT: if (left == 0) goto inf_leave; *put++ = (unsigned char)(state->length); left--; state->mode = LEN; break; case CHECK: if (state->wrap) { NEEDBITS(32); out -= left; strm->total_out += out; state->total += out; if (out) strm->adler = state->check = UPDATE(state->check, put - out, out); out = left; if (( #ifdef GUNZIP state->flags ? hold : #endif REVERSE(hold)) != state->check) { strm->msg = (char *)"incorrect data check"; state->mode = BAD; break; } INITBITS(); Tracev((stderr, "inflate: check matches trailer\n")); } #ifdef GUNZIP state->mode = LENGTH; case LENGTH: if (state->wrap && state->flags) { NEEDBITS(32); if (hold != (state->total & 0xffffffffUL)) { strm->msg = (char *)"incorrect length check"; state->mode = BAD; break; } INITBITS(); Tracev((stderr, "inflate: length matches trailer\n")); } #endif state->mode = DONE; case DONE: ret = Z_STREAM_END; goto inf_leave; case BAD: ret = Z_DATA_ERROR; goto inf_leave; case MEM: return Z_MEM_ERROR; case SYNC: default: return Z_STREAM_ERROR; } /* Return from inflate(), updating the total counts and the check value. If there was no progress during the inflate() call, return a buffer error. Call updatewindow() to create and/or update the window state. Note: a memory error from inflate() is non-recoverable. */ inf_leave: RESTORE(); if (state->wsize || (state->mode < CHECK && out != strm->avail_out)) if (updatewindow(strm, out)) { state->mode = MEM; return Z_MEM_ERROR; } in -= strm->avail_in; out -= strm->avail_out; strm->total_in += in; strm->total_out += out; state->total += out; if (state->wrap && out) strm->adler = state->check = UPDATE(state->check, strm->next_out - out, out); strm->data_type = state->bits + (state->last ? 64 : 0) + (state->mode == TYPE ? 128 : 0) + (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0); if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) ret = Z_BUF_ERROR; return ret; } int ZEXPORT inflateEnd(strm) z_streamp strm; { struct inflate_state FAR *state; if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; if (state->window != Z_NULL) ZFREE(strm, state->window); ZFREE(strm, strm->state); strm->state = Z_NULL; Tracev((stderr, "inflate: end\n")); return Z_OK; } int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) z_streamp strm; const Bytef *dictionary; uInt dictLength; { struct inflate_state FAR *state; unsigned long id; /* check state */ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; if (state->wrap != 0 && state->mode != DICT) return Z_STREAM_ERROR; /* check for correct dictionary id */ if (state->mode == DICT) { id = adler32(0L, Z_NULL, 0); id = adler32(id, dictionary, dictLength); if (id != state->check) return Z_DATA_ERROR; } /* copy dictionary to window */ if (updatewindow(strm, strm->avail_out)) { state->mode = MEM; return Z_MEM_ERROR; } if (dictLength > state->wsize) { zmemcpy(state->window, dictionary + dictLength - state->wsize, state->wsize); state->whave = state->wsize; } else { zmemcpy(state->window + state->wsize - dictLength, dictionary, dictLength); state->whave = dictLength; } state->havedict = 1; Tracev((stderr, "inflate: dictionary set\n")); return Z_OK; } int ZEXPORT inflateGetHeader(strm, head) z_streamp strm; gz_headerp head; { struct inflate_state FAR *state; /* check state */ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; if ((state->wrap & 2) == 0) return Z_STREAM_ERROR; /* save header structure */ state->head = head; head->done = 0; return Z_OK; } /* Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found or when out of input. When called, *have is the number of pattern bytes found in order so far, in 0..3. On return *have is updated to the new state. If on return *have equals four, then the pattern was found and the return value is how many bytes were read including the last byte of the pattern. If *have is less than four, then the pattern has not been found yet and the return value is len. In the latter case, syncsearch() can be called again with more data and the *have state. *have is initialized to zero for the first call. */ local unsigned syncsearch(have, buf, len) unsigned FAR *have; unsigned char FAR *buf; unsigned len; { unsigned got; unsigned next; got = *have; next = 0; while (next < len && got < 4) { if ((int)(buf[next]) == (got < 2 ? 0 : 0xff)) got++; else if (buf[next]) got = 0; else got = 4 - got; next++; } *have = got; return next; } int ZEXPORT inflateSync(strm) z_streamp strm; { unsigned len; /* number of bytes to look at or looked at */ unsigned long in, out; /* temporary to save total_in and total_out */ unsigned char buf[4]; /* to restore bit buffer to byte string */ struct inflate_state FAR *state; /* check parameters */ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR; /* if first time, start search in bit buffer */ if (state->mode != SYNC) { state->mode = SYNC; state->hold <<= state->bits & 7; state->bits -= state->bits & 7; len = 0; while (state->bits >= 8) { buf[len++] = (unsigned char)(state->hold); state->hold >>= 8; state->bits -= 8; } state->have = 0; syncsearch(&(state->have), buf, len); } /* search available input */ len = syncsearch(&(state->have), strm->next_in, strm->avail_in); strm->avail_in -= len; strm->next_in += len; strm->total_in += len; /* return no joy or set up to restart inflate() on a new block */ if (state->have != 4) return Z_DATA_ERROR; in = strm->total_in; out = strm->total_out; inflateReset(strm); strm->total_in = in; strm->total_out = out; state->mode = TYPE; return Z_OK; } /* Returns true if inflate is currently at the end of a block generated by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP implementation to provide an additional safety check. PPP uses Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored block. When decompressing, PPP checks that at the end of input packet, inflate is waiting for these length bytes. */ int ZEXPORT inflateSyncPoint(strm) z_streamp strm; { struct inflate_state FAR *state; if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; return state->mode == STORED && state->bits == 0; } int ZEXPORT inflateCopy(dest, source) z_streamp dest; z_streamp source; { struct inflate_state FAR *state; struct inflate_state FAR *copy; unsigned char FAR *window; unsigned wsize; /* check input */ if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL || source->zalloc == (alloc_func)0 || source->zfree == (free_func)0) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)source->state; /* allocate space */ copy = (struct inflate_state FAR *) ZALLOC(source, 1, sizeof(struct inflate_state)); if (copy == Z_NULL) return Z_MEM_ERROR; window = Z_NULL; if (state->window != Z_NULL) { window = (unsigned char FAR *) ZALLOC(source, 1U << state->wbits, sizeof(unsigned char)); if (window == Z_NULL) { ZFREE(source, copy); return Z_MEM_ERROR; } } /* copy state */ zmemcpy(dest, source, sizeof(z_stream)); zmemcpy(copy, state, sizeof(struct inflate_state)); if (state->lencode >= state->codes && state->lencode <= state->codes + ENOUGH - 1) { copy->lencode = copy->codes + (state->lencode - state->codes); copy->distcode = copy->codes + (state->distcode - state->codes); } copy->next = copy->codes + (state->next - state->codes); if (window != Z_NULL) { wsize = 1U << state->wbits; zmemcpy(window, state->window, wsize); } copy->window = window; dest->state = (struct internal_state FAR *)copy; return Z_OK; } int ZEXPORT inflateUndermine(strm, subvert) z_streamp strm; int subvert; { struct inflate_state FAR *state; if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; state->sane = !subvert; #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR return Z_OK; #else state->sane = 1; return Z_DATA_ERROR; #endif } long ZEXPORT inflateMark(strm) z_streamp strm; { struct inflate_state FAR *state; if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; state = (struct inflate_state FAR *)strm->state; return ((long)(state->back) << 16) + (state->mode == COPY ? state->length : (state->mode == MATCH ? state->was - state->length : 0)); } astropy-1.1.1/cextern/cfitsio/putcolsb.c0000644001134200020070000010403512602615520021230 0ustar embrayscience00000000000000/* This file, putcolsb.c, contains routines that write data elements to */ /* a FITS image or table with signed char (signed byte) datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffpprsb( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ signed char *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; signed char nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_pixels(fptr, TSBYTE, firstelem, nelem, 0, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpclsb(fptr, 2, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffppnsb( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ signed char *array, /* I - array of values that are written */ signed char nulval, /* I - undefined pixel value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). Any array values that are equal to the value of nulval will be replaced with the null pixel value that is appropriate for this column. */ { long row; signed char nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_write_compressed_pixels(fptr, TSBYTE, firstelem, nelem, 1, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcnsb(fptr, 2, row, firstelem, nelem, array, nulval, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp2dsb(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ signed char *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { /* call the 3D writing routine, with the 3rd dimension = 1 */ ffp3dsb(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp3dsb(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ signed char *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 3-D cube of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow, ii, jj; long fpixel[3]= {1,1,1}, lpixel[3]; LONGLONG nfits, narray; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = (long) ncols; lpixel[1] = (long) nrows; lpixel[2] = (long) naxis3; fits_write_compressed_img(fptr, TSBYTE, fpixel, lpixel, 0, array, NULL, status); return(*status); } tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so write all at once */ ffpclsb(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to write to */ narray = 0; /* next pixel in input array to be written */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* writing naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffpclsb(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpsssb(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long naxis, /* I - number of data axes in array */ long *naxes, /* I - size of each FITS axis */ long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ long *lpixel, /* I - last pixel in each axis to write */ signed char *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write a subsection of pixels to the primary array or image. A subsection is defined to be any contiguous rectangular array of pixels within the n-dimensional FITS data file. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow; LONGLONG fpix[7], dimen[7], astart, pstart; LONGLONG off2, off3, off4, off5, off6, off7; LONGLONG st10, st20, st30, st40, st50, st60, st70; LONGLONG st1, st2, st3, st4, st5, st6, st7; long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; if (*status > 0) return(*status); if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_img(fptr, TSBYTE, fpixel, lpixel, 0, array, NULL, status); return(*status); } if (naxis < 1 || naxis > 7) return(*status = BAD_DIMEN); tablerow=maxvalue(1,group); /* calculate the size and number of loops to perform in each dimension */ for (ii = 0; ii < 7; ii++) { fpix[ii]=1; irange[ii]=1; dimen[ii]=1; } for (ii = 0; ii < naxis; ii++) { fpix[ii]=fpixel[ii]; irange[ii]=lpixel[ii]-fpixel[ii]+1; dimen[ii]=naxes[ii]; } i1=irange[0]; /* compute the pixel offset between each dimension */ off2 = dimen[0]; off3 = off2 * dimen[1]; off4 = off3 * dimen[2]; off5 = off4 * dimen[3]; off6 = off5 * dimen[4]; off7 = off6 * dimen[5]; st10 = fpix[0]; st20 = (fpix[1] - 1) * off2; st30 = (fpix[2] - 1) * off3; st40 = (fpix[3] - 1) * off4; st50 = (fpix[4] - 1) * off5; st60 = (fpix[5] - 1) * off6; st70 = (fpix[6] - 1) * off7; /* store the initial offset in each dimension */ st1 = st10; st2 = st20; st3 = st30; st4 = st40; st5 = st50; st6 = st60; st7 = st70; astart = 0; for (i7 = 0; i7 < irange[6]; i7++) { for (i6 = 0; i6 < irange[5]; i6++) { for (i5 = 0; i5 < irange[4]; i5++) { for (i4 = 0; i4 < irange[3]; i4++) { for (i3 = 0; i3 < irange[2]; i3++) { pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; for (i2 = 0; i2 < irange[1]; i2++) { if (ffpclsb(fptr, 2, tablerow, pstart, i1, &array[astart], status) > 0) return(*status); astart += i1; pstart += off2; } st2 = st20; st3 = st3+off3; } st3 = st30; st4 = st4+off4; } st4 = st40; st5 = st5+off5; } st5 = st50; st6 = st6+off6; } st6 = st60; st7 = st7+off7; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpgpsb( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long firstelem, /* I - first vector element to write(1 = 1st) */ long nelem, /* I - number of values to write */ signed char *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of group parameters to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffpclsb(fptr, 1L, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpclsb( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ signed char *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of values to a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. */ { int tcode, maxelem, hdutype; long twidth, incre; long ntodo; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; double scale, zero; char tform[20], cform[20]; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); if (tcode == TSTRING) ffcfmt(tform, cform); /* derive C format for writing strings */ /*---------------------------------------------------------------------*/ /* Now write the pixels to the FITS column. */ /* First call the ffXXfYY routine to (1) convert the datatype */ /* if necessary, and (2) scale the values by the FITS TSCALn and */ /* TZEROn linear scaling parameters into a temporary buffer. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to process a one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ switch (tcode) { case (TBYTE): /* convert the raw data before writing to FITS file */ ffs1fi1(&array[next], ntodo, scale, zero, (unsigned char *) buffer, status); ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); break; case (TLONGLONG): ffs1fi8(&array[next], ntodo, scale, zero, (LONGLONG *) buffer, status); ffpi8b(fptr, ntodo, incre, (long *) buffer, status); break; case (TSHORT): ffs1fi2(&array[next], ntodo, scale, zero, (short *) buffer, status); ffpi2b(fptr, ntodo, incre, (short *) buffer, status); break; case (TLONG): ffs1fi4(&array[next], ntodo, scale, zero, (INT32BIT *) buffer, status); ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); break; case (TFLOAT): ffs1fr4(&array[next], ntodo, scale, zero, (float *) buffer, status); ffpr4b(fptr, ntodo, incre, (float *) buffer, status); break; case (TDOUBLE): ffs1fr8(&array[next], ntodo, scale, zero, (double *) buffer, status); ffpr8b(fptr, ntodo, incre, (double *) buffer, status); break; case (TSTRING): /* numerical column in an ASCII table */ if (strchr(tform,'A')) { /* write raw input bytes without conversion */ /* This case is a hack to let users write a stream */ /* of bytes directly to the 'A' format column */ if (incre == twidth) ffpbyt(fptr, ntodo, &array[next], status); else ffpbytoff(fptr, twidth, ntodo/twidth, incre - twidth, &array[next], status); break; } else if (cform[1] != 's') /* "%s" format is a string */ { ffs1fstr(&array[next], ntodo, scale, zero, cform, twidth, (char *) buffer, status); if (incre == twidth) /* contiguous bytes */ ffpbyt(fptr, ntodo * twidth, buffer, status); else ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); break; } /* can't write to string column, so fall thru to default: */ default: /* error trap */ sprintf(message, "Cannot write numbers to column %d which has format %s", colnum,tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing elements %.0f thru %.0f of input data array (ffpclsb).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while writing FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpcnsb( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ signed char *array, /* I - array of values to write */ signed char nulvalue, /* I - flag for undefined pixels */ int *status) /* IO - error status */ /* Write an array of elements to the specified column of a table. Any input pixels equal to the value of nulvalue will be replaced by the appropriate null value in the output FITS file. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary */ { tcolumn *colptr; long ngood = 0, nbad = 0, ii; LONGLONG repeat, first, fstelm, fstrow; int tcode, overflow = 0; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode > 0) repeat = colptr->trepeat; /* repeat count for this column */ else repeat = firstelem -1 + nelem; /* variable length arrays */ /* if variable length array, first write the whole input vector, then go back and fill in the nulls */ if (tcode < 0) { if (ffpclsb(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { if (*status == NUM_OVERFLOW) { /* ignore overflows, which are possibly the null pixel values */ /* overflow = 1; */ *status = 0; } else { return(*status); } } } /* absolute element number in the column */ first = (firstrow - 1) * repeat + firstelem; for (ii = 0; ii < nelem; ii++) { if (array[ii] != nulvalue) /* is this a good pixel? */ { if (nbad) /* write previous string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) return(*status); nbad=0; } ngood = ngood + 1; /* the consecutive number of good pixels */ } else { if (ngood) /* write previous string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ if (ffpclsb(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status) > 0) { if (*status == NUM_OVERFLOW) { overflow = 1; *status = 0; } else { return(*status); } } } ngood=0; } nbad = nbad + 1; /* the consecutive number of bad pixels */ } } /* finished loop; now just write the last set of pixels */ if (ngood) /* write last string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ ffpclsb(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); } } else if (nbad) /* write last string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); } if (*status <= 0) { if (overflow) { *status = NUM_OVERFLOW; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffs1fi1(signed char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ unsigned char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == -128.) { /* Instead of adding 128, it is more efficient */ /* to just flip the sign bit with the XOR operator */ for (ii = 0; ii < ntodo; ii++) output[ii] = ( *(unsigned char *) &input[ii] ) ^ 0x80; } else if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else output[ii] = (unsigned char) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = ( ((double) input[ii]) - zero) / scale; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) (dvalue + .5); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffs1fi2(signed char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ short *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = input[ii]; /* just copy input to output */ } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (((double) input[ii]) - zero) / scale; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else { if (dvalue >= 0) output[ii] = (short) (dvalue + .5); else output[ii] = (short) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffs1fi4(signed char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ INT32BIT *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (INT32BIT) input[ii]; /* copy input to output */ } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (((double) input[ii]) - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else { if (dvalue >= 0) output[ii] = (INT32BIT) (dvalue + .5); else output[ii] = (INT32BIT) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffs1fi8(signed char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ LONGLONG *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = input[ii]; } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else { if (dvalue >= 0) output[ii] = (LONGLONG) (dvalue + .5); else output[ii] = (LONGLONG) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffs1fr4(signed char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ float *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) (( ( (double) input[ii] ) - zero) / scale); } return(*status); } /*--------------------------------------------------------------------------*/ int ffs1fr8(signed char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ double *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = ( ( (double) input[ii] ) - zero) / scale; } return(*status); } /*--------------------------------------------------------------------------*/ int ffs1fstr(signed char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ char *cform, /* I - format for output string values */ long twidth, /* I - width of each field, in chars */ char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do scaling if required. */ { long ii; double dvalue; char *cptr; cptr = output; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { sprintf(output, cform, (double) input[ii]); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = ((double) input[ii] - zero) / scale; sprintf(output, cform, dvalue); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } /* replace any commas with periods (e.g., in French locale) */ while ((cptr = strchr(cptr, ','))) *cptr = '.'; return(*status); } astropy-1.1.1/cextern/cfitsio/eval_y.c0000644001134200020070000073314712602615517020676 0ustar embrayscience00000000000000 /* A Bison parser, made from eval.y by GNU Bison version 1.25 */ #define FFBISON 1 /* Identify Bison output. */ #define BOOLEAN 258 #define LONG 259 #define DOUBLE 260 #define STRING 261 #define BITSTR 262 #define FUNCTION 263 #define BFUNCTION 264 #define IFUNCTION 265 #define GTIFILTER 266 #define REGFILTER 267 #define COLUMN 268 #define BCOLUMN 269 #define SCOLUMN 270 #define BITCOL 271 #define ROWREF 272 #define NULLREF 273 #define SNULLREF 274 #define OR 275 #define AND 276 #define EQ 277 #define NE 278 #define GT 279 #define LT 280 #define LTE 281 #define GTE 282 #define POWER 283 #define NOT 284 #define INTCAST 285 #define FLTCAST 286 #define UMINUS 287 #define ACCUM 288 #define DIFF 289 #line 1 "eval.y" /************************************************************************/ /* */ /* CFITSIO Lexical Parser */ /* */ /* This file is one of 3 files containing code which parses an */ /* arithmetic expression and evaluates it in the context of an input */ /* FITS file table extension. The CFITSIO lexical parser is divided */ /* into the following 3 parts/files: the CFITSIO "front-end", */ /* eval_f.c, contains the interface between the user/CFITSIO and the */ /* real core of the parser; the FLEX interpreter, eval_l.c, takes the */ /* input string and parses it into tokens and identifies the FITS */ /* information required to evaluate the expression (ie, keywords and */ /* columns); and, the BISON grammar and evaluation routines, eval_y.c, */ /* receives the FLEX output and determines and performs the actual */ /* operations. The files eval_l.c and eval_y.c are produced from */ /* running flex and bison on the files eval.l and eval.y, respectively. */ /* (flex and bison are available from any GNU archive: see www.gnu.org) */ /* */ /* The grammar rules, rather than evaluating the expression in situ, */ /* builds a tree, or Nodal, structure mapping out the order of */ /* operations and expression dependencies. This "compilation" process */ /* allows for much faster processing of multiple rows. This technique */ /* was developed by Uwe Lammers of the XMM Science Analysis System, */ /* although the CFITSIO implementation is entirely code original. */ /* */ /* */ /* Modification History: */ /* */ /* Kent Blackburn c1992 Original parser code developed for the */ /* FTOOLS software package, in particular, */ /* the fselect task. */ /* Kent Blackburn c1995 BIT column support added */ /* Peter D Wilson Feb 1998 Vector column support added */ /* Peter D Wilson May 1998 Ported to CFITSIO library. User */ /* interface routines written, in essence */ /* making fselect, fcalc, and maketime */ /* capabilities available to all tools */ /* via single function calls. */ /* Peter D Wilson Jun 1998 Major rewrite of parser core, so as to */ /* create a run-time evaluation tree, */ /* inspired by the work of Uwe Lammers, */ /* resulting in a speed increase of */ /* 10-100 times. */ /* Peter D Wilson Jul 1998 gtifilter(a,b,c,d) function added */ /* Peter D Wilson Aug 1998 regfilter(a,b,c,d) function added */ /* Peter D Wilson Jul 1999 Make parser fitsfile-independent, */ /* allowing a purely vector-based usage */ /* Craig B Markwardt Jun 2004 Add MEDIAN() function */ /* Craig B Markwardt Jun 2004 Add SUM(), and MIN/MAX() for bit arrays */ /* Craig B Markwardt Jun 2004 Allow subscripting of nX bit arrays */ /* Craig B Markwardt Jun 2004 Implement statistical functions */ /* NVALID(), AVERAGE(), and STDDEV() */ /* for integer and floating point vectors */ /* Craig B Markwardt Jun 2004 Use NULL values for range errors instead*/ /* of throwing a parse error */ /* Craig B Markwardt Oct 2004 Add ACCUM() and SEQDIFF() functions */ /* Craig B Markwardt Feb 2005 Add ANGSEP() function */ /* Craig B Markwardt Aug 2005 CIRCLE, BOX, ELLIPSE, NEAR and REGFILTER*/ /* functions now accept vector arguments */ /* Craig B Markwardt Sum 2006 Add RANDOMN() and RANDOMP() functions */ /* Craig B Markwardt Mar 2007 Allow arguments to RANDOM and RANDOMN to*/ /* determine the output dimensions */ /* Craig B Markwardt Aug 2009 Add substring STRMID() and string search*/ /* STRSTR() functions; more overflow checks*/ /* */ /************************************************************************/ #define APPROX 1.0e-7 #include "eval_defs.h" #include "region.h" #include #include #ifndef alloca #define alloca malloc #endif /* Shrink the initial stack depth to keep local data <32K (mac limit) */ /* yacc will allocate more space if needed, though. */ #define FFINITDEPTH 100 /***************************************************************/ /* Replace Bison's BACKUP macro with one that fixes a bug -- */ /* must update state after popping the stack -- and allows */ /* popping multiple terms at one time. */ /***************************************************************/ #define FFNEWBACKUP(token, value) \ do \ if (ffchar == FFEMPTY ) \ { ffchar = (token); \ memcpy( &fflval, &(value), sizeof(value) ); \ ffchar1 = FFTRANSLATE (ffchar); \ while (fflen--) FFPOPSTACK; \ ffstate = *ffssp; \ goto ffbackup; \ } \ else \ { fferror ("syntax error: cannot back up"); FFERROR; } \ while (0) /***************************************************************/ /* Useful macros for accessing/testing Nodes */ /***************************************************************/ #define TEST(a) if( (a)<0 ) FFERROR #define SIZE(a) gParse.Nodes[ a ].value.nelem #define TYPE(a) gParse.Nodes[ a ].type #define OPER(a) gParse.Nodes[ a ].operation #define PROMOTE(a,b) if( TYPE(a) > TYPE(b) ) \ b = New_Unary( TYPE(a), 0, b ); \ else if( TYPE(a) < TYPE(b) ) \ a = New_Unary( TYPE(b), 0, a ); /***** Internal functions *****/ #ifdef __cplusplus extern "C" { #endif static int Alloc_Node ( void ); static void Free_Last_Node( void ); static void Evaluate_Node ( int thisNode ); static int New_Const ( int returnType, void *value, long len ); static int New_Column( int ColNum ); static int New_Offset( int ColNum, int offset ); static int New_Unary ( int returnType, int Op, int Node1 ); static int New_BinOp ( int returnType, int Node1, int Op, int Node2 ); static int New_Func ( int returnType, funcOp Op, int nNodes, int Node1, int Node2, int Node3, int Node4, int Node5, int Node6, int Node7 ); static int New_FuncSize( int returnType, funcOp Op, int nNodes, int Node1, int Node2, int Node3, int Node4, int Node5, int Node6, int Node7, int Size); static int New_Deref ( int Var, int nDim, int Dim1, int Dim2, int Dim3, int Dim4, int Dim5 ); static int New_GTI ( char *fname, int Node1, char *start, char *stop ); static int New_REG ( char *fname, int NodeX, int NodeY, char *colNames ); static int New_Vector( int subNode ); static int Close_Vec ( int vecNode ); static int Locate_Col( Node *this ); static int Test_Dims ( int Node1, int Node2 ); static void Copy_Dims ( int Node1, int Node2 ); static void Allocate_Ptrs( Node *this ); static void Do_Unary ( Node *this ); static void Do_Offset ( Node *this ); static void Do_BinOp_bit ( Node *this ); static void Do_BinOp_str ( Node *this ); static void Do_BinOp_log ( Node *this ); static void Do_BinOp_lng ( Node *this ); static void Do_BinOp_dbl ( Node *this ); static void Do_Func ( Node *this ); static void Do_Deref ( Node *this ); static void Do_GTI ( Node *this ); static void Do_REG ( Node *this ); static void Do_Vector ( Node *this ); static long Search_GTI ( double evtTime, long nGTI, double *start, double *stop, int ordered ); static char saobox (double xcen, double ycen, double xwid, double ywid, double rot, double xcol, double ycol); static char ellipse(double xcen, double ycen, double xrad, double yrad, double rot, double xcol, double ycol); static char circle (double xcen, double ycen, double rad, double xcol, double ycol); static char bnear (double x, double y, double tolerance); static char bitcmp (char *bitstrm1, char *bitstrm2); static char bitlgte(char *bits1, int oper, char *bits2); static void bitand(char *result, char *bitstrm1, char *bitstrm2); static void bitor (char *result, char *bitstrm1, char *bitstrm2); static void bitnot(char *result, char *bits); static int cstrmid(char *dest_str, int dest_len, char *src_str, int src_len, int pos); static void fferror(char *msg); #ifdef __cplusplus } #endif #line 189 "eval.y" typedef union { int Node; /* Index of Node */ double dbl; /* real value */ long lng; /* integer value */ char log; /* logical value */ char str[MAX_STRLEN]; /* string value */ } FFSTYPE; #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define FFFINAL 290 #define FFFLAG -32768 #define FFNTBASE 54 #define FFTRANSLATE(x) ((unsigned)(x) <= 289 ? fftranslate[x] : 62) static const char fftranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 50, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 37, 41, 2, 52, 53, 38, 35, 20, 36, 2, 39, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 22, 2, 2, 21, 2, 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 47, 2, 51, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 23, 40, 24, 30, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 26, 27, 28, 29, 31, 32, 33, 34, 42, 43, 44, 45, 46, 48, 49 }; #if FFDEBUG != 0 static const short ffprhs[] = { 0, 0, 1, 4, 6, 9, 12, 15, 18, 21, 24, 28, 31, 35, 39, 43, 46, 49, 51, 53, 58, 62, 66, 70, 75, 82, 91, 102, 115, 118, 122, 124, 126, 128, 133, 135, 137, 141, 145, 149, 153, 157, 161, 164, 167, 171, 175, 179, 185, 191, 197, 200, 204, 208, 212, 216, 222, 228, 238, 243, 250, 259, 270, 283, 286, 289, 292, 295, 297, 299, 304, 308, 312, 316, 320, 324, 328, 332, 336, 340, 344, 348, 352, 356, 360, 364, 368, 372, 376, 380, 384, 388, 392, 396, 402, 408, 412, 416, 420, 426, 434, 446, 462, 465, 469, 475, 485, 489, 497, 507, 512, 519, 528, 539, 552, 555, 559, 561, 563, 568, 570, 574, 578, 584, 590 }; static const short ffrhs[] = { -1, 54, 55, 0, 50, 0, 58, 50, 0, 59, 50, 0, 61, 50, 0, 60, 50, 0, 1, 50, 0, 23, 59, 0, 56, 20, 59, 0, 23, 58, 0, 57, 20, 58, 0, 57, 20, 59, 0, 56, 20, 58, 0, 57, 24, 0, 56, 24, 0, 7, 0, 16, 0, 16, 23, 58, 24, 0, 60, 41, 60, 0, 60, 40, 60, 0, 60, 35, 60, 0, 60, 47, 58, 51, 0, 60, 47, 58, 20, 58, 51, 0, 60, 47, 58, 20, 58, 20, 58, 51, 0, 60, 47, 58, 20, 58, 20, 58, 20, 58, 51, 0, 60, 47, 58, 20, 58, 20, 58, 20, 58, 20, 58, 51, 0, 43, 60, 0, 52, 60, 53, 0, 4, 0, 5, 0, 13, 0, 13, 23, 58, 24, 0, 17, 0, 18, 0, 58, 37, 58, 0, 58, 35, 58, 0, 58, 36, 58, 0, 58, 38, 58, 0, 58, 39, 58, 0, 58, 42, 58, 0, 35, 58, 0, 36, 58, 0, 52, 58, 53, 0, 58, 38, 59, 0, 59, 38, 58, 0, 59, 25, 58, 22, 58, 0, 59, 25, 59, 22, 58, 0, 59, 25, 58, 22, 59, 0, 8, 53, 0, 8, 59, 53, 0, 8, 61, 53, 0, 8, 60, 53, 0, 8, 58, 53, 0, 10, 61, 20, 61, 53, 0, 8, 58, 20, 58, 53, 0, 8, 58, 20, 58, 20, 58, 20, 58, 53, 0, 58, 47, 58, 51, 0, 58, 47, 58, 20, 58, 51, 0, 58, 47, 58, 20, 58, 20, 58, 51, 0, 58, 47, 58, 20, 58, 20, 58, 20, 58, 51, 0, 58, 47, 58, 20, 58, 20, 58, 20, 58, 20, 58, 51, 0, 44, 58, 0, 44, 59, 0, 45, 58, 0, 45, 59, 0, 3, 0, 14, 0, 14, 23, 58, 24, 0, 60, 28, 60, 0, 60, 29, 60, 0, 60, 32, 60, 0, 60, 33, 60, 0, 60, 31, 60, 0, 60, 34, 60, 0, 58, 31, 58, 0, 58, 32, 58, 0, 58, 34, 58, 0, 58, 33, 58, 0, 58, 30, 58, 0, 58, 28, 58, 0, 58, 29, 58, 0, 61, 28, 61, 0, 61, 29, 61, 0, 61, 31, 61, 0, 61, 34, 61, 0, 61, 32, 61, 0, 61, 33, 61, 0, 59, 27, 59, 0, 59, 26, 59, 0, 59, 28, 59, 0, 59, 29, 59, 0, 58, 21, 58, 22, 58, 0, 59, 25, 59, 22, 59, 0, 9, 58, 53, 0, 9, 59, 53, 0, 9, 61, 53, 0, 8, 59, 20, 59, 53, 0, 9, 58, 20, 58, 20, 58, 53, 0, 9, 58, 20, 58, 20, 58, 20, 58, 20, 58, 53, 0, 9, 58, 20, 58, 20, 58, 20, 58, 20, 58, 20, 58, 20, 58, 53, 0, 11, 53, 0, 11, 6, 53, 0, 11, 6, 20, 58, 53, 0, 11, 6, 20, 58, 20, 6, 20, 6, 53, 0, 12, 6, 53, 0, 12, 6, 20, 58, 20, 58, 53, 0, 12, 6, 20, 58, 20, 58, 20, 6, 53, 0, 59, 47, 58, 51, 0, 59, 47, 58, 20, 58, 51, 0, 59, 47, 58, 20, 58, 20, 58, 51, 0, 59, 47, 58, 20, 58, 20, 58, 20, 58, 51, 0, 59, 47, 58, 20, 58, 20, 58, 20, 58, 20, 58, 51, 0, 43, 59, 0, 52, 59, 53, 0, 6, 0, 15, 0, 15, 23, 58, 24, 0, 19, 0, 52, 61, 53, 0, 61, 35, 61, 0, 59, 25, 61, 22, 61, 0, 8, 61, 20, 61, 53, 0, 8, 61, 20, 58, 20, 58, 53, 0 }; #endif #if FFDEBUG != 0 static const short ffrline[] = { 0, 241, 242, 245, 246, 252, 258, 264, 270, 273, 275, 288, 290, 303, 314, 328, 332, 336, 340, 342, 351, 354, 357, 366, 368, 370, 372, 374, 376, 379, 383, 385, 387, 389, 398, 400, 402, 405, 408, 411, 414, 417, 420, 422, 424, 426, 430, 434, 453, 472, 491, 504, 518, 530, 561, 659, 667, 729, 753, 755, 757, 759, 761, 763, 765, 767, 769, 773, 775, 777, 786, 789, 792, 795, 798, 801, 804, 807, 810, 813, 816, 819, 822, 825, 828, 831, 834, 837, 840, 843, 845, 847, 849, 852, 859, 876, 889, 902, 913, 929, 953, 981, 1018, 1022, 1026, 1029, 1033, 1037, 1040, 1044, 1046, 1048, 1050, 1052, 1054, 1056, 1060, 1063, 1065, 1074, 1076, 1078, 1087, 1106, 1125 }; #endif #if FFDEBUG != 0 || defined (FFERROR_VERBOSE) static const char * const fftname[] = { "$","error","$undefined.","BOOLEAN", "LONG","DOUBLE","STRING","BITSTR","FUNCTION","BFUNCTION","IFUNCTION","GTIFILTER", "REGFILTER","COLUMN","BCOLUMN","SCOLUMN","BITCOL","ROWREF","NULLREF","SNULLREF", "','","'='","':'","'{'","'}'","'?'","OR","AND","EQ","NE","'~'","GT","LT","LTE", "GTE","'+'","'-'","'%'","'*'","'/'","'|'","'&'","POWER","NOT","INTCAST","FLTCAST", "UMINUS","'['","ACCUM","DIFF","'\\n'","']'","'('","')'","lines","line","bvector", "vector","expr","bexpr","bits","sexpr", NULL }; #endif static const short ffr1[] = { 0, 54, 54, 55, 55, 55, 55, 55, 55, 56, 56, 57, 57, 57, 57, 58, 59, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 61, 61, 61, 61, 61, 61, 61, 61, 61 }; static const short ffr2[] = { 0, 0, 2, 1, 2, 2, 2, 2, 2, 2, 3, 2, 3, 3, 3, 2, 2, 1, 1, 4, 3, 3, 3, 4, 6, 8, 10, 12, 2, 3, 1, 1, 1, 4, 1, 1, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 5, 5, 5, 2, 3, 3, 3, 3, 5, 5, 9, 4, 6, 8, 10, 12, 2, 2, 2, 2, 1, 1, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 3, 3, 3, 5, 7, 11, 15, 2, 3, 5, 9, 3, 7, 9, 4, 6, 8, 10, 12, 2, 3, 1, 1, 4, 1, 3, 3, 5, 5, 7 }; static const short ffdefact[] = { 1, 0, 0, 67, 30, 31, 116, 17, 0, 0, 0, 0, 0, 32, 68, 117, 18, 34, 35, 119, 0, 0, 0, 0, 0, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 8, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 11, 9, 0, 42, 43, 114, 28, 63, 64, 65, 66, 0, 0, 0, 0, 0, 16, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 6, 0, 54, 0, 51, 53, 0, 52, 0, 95, 96, 97, 0, 0, 103, 0, 106, 0, 0, 0, 0, 44, 115, 29, 120, 14, 10, 12, 13, 0, 81, 82, 80, 76, 77, 79, 78, 37, 38, 36, 39, 45, 40, 41, 0, 0, 0, 0, 90, 89, 91, 92, 46, 0, 0, 0, 70, 71, 74, 72, 73, 75, 22, 21, 20, 0, 83, 84, 85, 87, 88, 86, 121, 0, 0, 0, 0, 0, 0, 0, 0, 33, 69, 118, 19, 0, 0, 58, 0, 0, 0, 0, 109, 28, 0, 0, 23, 0, 56, 98, 0, 123, 0, 55, 0, 104, 0, 93, 0, 47, 49, 48, 94, 122, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, 110, 0, 24, 0, 124, 0, 99, 0, 0, 107, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 111, 0, 25, 57, 0, 105, 108, 0, 0, 0, 0, 0, 61, 0, 112, 0, 26, 0, 100, 0, 0, 0, 0, 62, 113, 27, 0, 0, 101, 0, 0 }; static const short ffdefgoto[] = { 1, 28, 29, 30, 45, 46, 43, 57 }; static const short ffpact[] = {-32768, 301, -41,-32768,-32768,-32768,-32768,-32768, 351, 402, 402, -5, 12, 8, 33, 34, 41,-32768,-32768,-32768, 402, 402, 402, 402, 402, 402,-32768, 402,-32768, -18, 9, 1092, 403, 1438, 79,-32768,-32768, 428, 143, 294, 10, 456, 224, 1478, 125, 1390, 1436, 1523, -6,-32768, 2, 402, 402, 402, 402, 1390, 1436, 1129, 19, 19, 20, 21, 19, 20, 19, 20, 623, 240, 344, 1120, 402, -32768, 402,-32768, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402,-32768, 402, 402, 402, 402, 402, 402, 402,-32768, -3, -3, -3, -3, -3, -3, -3, -3, -3, 402,-32768, 402, 402, 402, 402, 402, 402, 402,-32768, 402,-32768, 402,-32768, -32768, 402,-32768, 402,-32768,-32768,-32768, 402, 402,-32768, 402,-32768, 1266, 1286, 1306, 1326,-32768,-32768,-32768,-32768, 1390, 1436, 1390, 1436, 1348, 1503, 1503, 1503, 23, 23, 23, 23, 160, 160, 160, -15, 20, -15, -15, 732, 1370, 1413, 1531, 146, -13, -35, -35, -15, 756, -3, -3, -30, -30, -30, -30, -30, -30, 50, 21, 21, 780, 67, 67, 11, 11, 11, 11,-32768, 484, 1118, 1146, 1415, 1166, 1424, 512, 1186,-32768,-32768,-32768,-32768, 402, 402,-32768, 402, 402, 402, 402,-32768, 21, 1480, 402,-32768, 402,-32768,-32768, 402,-32768, 402,-32768, 66, -32768, 402, 1461, 804, 1461, 1436, 1461, 1436, 1129, 828, 852, 1206, 650, 540, 68, 568, 402,-32768, 402,-32768, 402,-32768, 402,-32768, 402,-32768, 86, 87,-32768, 876, 900, 924, 677, 1226, 52, 56, 402,-32768, 402,-32768, 402,-32768,-32768, 402,-32768,-32768, 948, 972, 996, 596, 402,-32768, 402,-32768, 402,-32768, 402,-32768, 1020, 1044, 1068, 1246,-32768,-32768,-32768, 402, 704,-32768, 126,-32768 }; static const short ffpgoto[] = {-32768, -32768,-32768,-32768, -1, 95, 124, 27 }; #define FFLAST 1566 static const short fftable[] = { 31, 48, 70, 95, 7, 104, 71, 37, 41, 35, 105, 106, 96, 16, 129, 93, 94, 107, 50, 55, 58, 59, 131, 62, 64, 95, 66, 87, 34, 72, 122, 51, 88, 73, 96, 40, 44, 47, 109, 110, 170, 111, 112, 113, 114, 115, 115, 130, 49, 171, 133, 134, 135, 136, 69, 132, 52, 53, 82, 83, 84, 85, 86, 123, 54, 87, 88, 96, 107, 141, 88, 143, 235, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 158, 159, 160, 247, 161, 105, 106, 255, 256, 168, 169, 32, 107, 111, 112, 113, 114, 115, 38, 42, 265, 181, 109, 110, 266, 111, 112, 113, 114, 115, 56, 189, 163, 60, 63, 65, 191, 67, 193, 0, 33, 290, 0, 195, 116, 196, 0, 39, 0, 0, 0, 182, 183, 184, 185, 186, 187, 188, 0, 0, 0, 0, 61, 0, 192, 0, 68, 0, 109, 110, 194, 111, 112, 113, 114, 115, 0, 0, 119, 0, 142, 0, 144, 90, 91, 92, 93, 94, 92, 93, 94, 0, 0, 127, 0, 157, 95, 0, 0, 95, 162, 164, 165, 166, 167, 96, 0, 0, 96, 0, 0, 120, 0, 85, 86, 223, 224, 87, 225, 227, 0, 230, 88, 0, 0, 231, 0, 232, 0, 190, 233, 0, 234, 0, 0, 0, 236, 172, 173, 174, 175, 176, 177, 178, 179, 180, 0, 0, 229, 0, 0, 250, 0, 251, 0, 252, 0, 253, 0, 254, 0, 0, 0, 0, 90, 91, 92, 93, 94, 0, 0, 267, 0, 268, 0, 269, 0, 95, 270, 0, 90, 91, 92, 93, 94, 279, 96, 280, 0, 281, 0, 282, 126, 95, 0, 0, 0, 0, 0, 0, 287, 0, 96, 0, 0, 0, 0, 0, 138, 209, 210, 0, 0, 0, 226, 228, 289, 2, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 98, 99, 20, 100, 101, 102, 103, 104, 0, 0, 0, 0, 105, 106, 21, 22, 0, 0, 0, 107, 0, 0, 23, 24, 25, 121, 0, 0, 0, 26, 0, 27, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 98, 99, 20, 100, 101, 102, 103, 104, 0, 0, 0, 0, 105, 106, 21, 22, 0, 0, 0, 107, 0, 0, 23, 24, 25, 139, 0, 0, 0, 0, 0, 27, 36, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 20, 0, 0, 90, 91, 92, 93, 94, 0, 0, 0, 0, 21, 22, 0, 0, 95, 0, 0, 0, 23, 24, 25, 117, 74, 96, 0, 0, 97, 27, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, 0, 88, 124, 74, 0, 0, 0, 118, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, 0, 88, 213, 74, 0, 0, 0, 125, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, 0, 88, 220, 74, 0, 0, 0, 214, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, 0, 88, 245, 74, 0, 0, 0, 221, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, 0, 88, 248, 74, 0, 0, 0, 246, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, 0, 88, 277, 74, 0, 0, 0, 249, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, 0, 88, 74, 0, 0, 0, 0, 278, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, 0, 88, 74, 0, 0, 0, 0, 137, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, 0, 88, 74, 0, 0, 0, 0, 244, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, 0, 88, 74, 0, 0, 0, 0, 263, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, 0, 88, 202, 74, 0, 0, 0, 288, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 207, 74, 0, 88, 0, 0, 0, 203, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 211, 74, 0, 88, 0, 0, 0, 208, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 237, 74, 0, 88, 0, 0, 0, 212, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 239, 74, 0, 88, 0, 0, 0, 238, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 241, 74, 0, 88, 0, 0, 0, 240, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 257, 74, 0, 88, 0, 0, 0, 242, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 259, 74, 0, 88, 0, 0, 0, 258, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 261, 74, 0, 88, 0, 0, 0, 260, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 271, 74, 0, 88, 0, 0, 0, 262, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 273, 74, 0, 88, 0, 0, 0, 272, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 275, 74, 0, 88, 0, 0, 0, 274, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 74, 0, 88, 0, 0, 0, 276, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 74, 0, 88, 0, 0, 0, 283, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 74, 0, 88, 0, 0, 0, 284, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 74, 0, 88, 0, 0, 0, 285, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 0, 0, 88, 0, 0, 89, 90, 91, 92, 93, 94, 109, 110, 0, 111, 112, 113, 114, 115, 95, 109, 110, 0, 111, 112, 113, 114, 115, 96, 216, 74, 0, 0, 0, 215, 0, 140, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 218, 74, 87, 0, 0, 0, 0, 88, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 222, 74, 87, 0, 0, 0, 0, 88, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 243, 74, 87, 0, 0, 0, 0, 88, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 264, 74, 87, 0, 0, 0, 0, 88, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 286, 74, 87, 0, 0, 0, 0, 88, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 74, 87, 0, 197, 0, 0, 88, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 74, 87, 0, 198, 0, 0, 88, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 74, 87, 0, 199, 0, 0, 88, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 74, 87, 0, 200, 0, 0, 88, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 74, 201, 0, 0, 88, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 74, 204, 0, 0, 88, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 74, 87, 0, 0, 0, 0, 88, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 205, 0, 88, 90, 91, 92, 93, 94, 109, 110, 0, 111, 112, 113, 114, 115, 95, 109, 110, 0, 111, 112, 113, 114, 115, 96, 90, 91, 92, 93, 94, 98, 99, 217, 100, 101, 102, 103, 104, 95, 0, 0, 219, 105, 106, 0, 0, 0, 96, 0, 107, 0, 0, 108, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 87, 0, 0, 98, 99, 88, 100, 101, 102, 103, 104, 0, 104, 0, 0, 105, 106, 105, 106, 0, 0, 0, 107, 0, 107, 0, 0, 0, 0, 0, 139, 78, 79, 80, 81, 82, 83, 84, 85, 86, 128, 0, 87, 0, 0, 0, 0, 88, 109, 110, 206, 111, 112, 113, 114, 115, 109, 110, 0, 111, 112, 113, 114, 115 }; static const short ffcheck[] = { 1, 6, 20, 38, 7, 35, 24, 8, 9, 50, 40, 41, 47, 16, 20, 28, 29, 47, 6, 20, 21, 22, 20, 24, 25, 38, 27, 42, 1, 20, 20, 23, 47, 24, 47, 8, 9, 10, 28, 29, 43, 31, 32, 33, 34, 35, 35, 53, 53, 52, 51, 52, 53, 54, 27, 53, 23, 23, 35, 36, 37, 38, 39, 53, 23, 42, 47, 47, 47, 70, 47, 72, 6, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 20, 90, 40, 41, 6, 6, 95, 96, 1, 47, 31, 32, 33, 34, 35, 8, 9, 53, 107, 28, 29, 53, 31, 32, 33, 34, 35, 20, 117, 90, 23, 24, 25, 122, 27, 124, -1, 1, 0, -1, 129, 50, 131, -1, 8, -1, -1, -1, 109, 110, 111, 112, 113, 114, 115, -1, -1, -1, -1, 23, -1, 122, -1, 27, -1, 28, 29, 128, 31, 32, 33, 34, 35, -1, -1, 20, -1, 70, -1, 72, 25, 26, 27, 28, 29, 27, 28, 29, -1, -1, 53, -1, 85, 38, -1, -1, 38, 90, 91, 92, 93, 94, 47, -1, -1, 47, -1, -1, 53, -1, 38, 39, 201, 202, 42, 204, 205, -1, 207, 47, -1, -1, 211, -1, 213, -1, 119, 216, -1, 218, -1, -1, -1, 222, 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 206, -1, -1, 237, -1, 239, -1, 241, -1, 243, -1, 245, -1, -1, -1, -1, 25, 26, 27, 28, 29, -1, -1, 257, -1, 259, -1, 261, -1, 38, 264, -1, 25, 26, 27, 28, 29, 271, 47, 273, -1, 275, -1, 277, 53, 38, -1, -1, -1, -1, -1, -1, 286, -1, 47, -1, -1, -1, -1, -1, 53, 170, 171, -1, -1, -1, 204, 205, 0, 1, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, -1, 28, 29, 23, 31, 32, 33, 34, 35, -1, -1, -1, -1, 40, 41, 35, 36, -1, -1, -1, 47, -1, -1, 43, 44, 45, 53, -1, -1, -1, 50, -1, 52, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, -1, 28, 29, 23, 31, 32, 33, 34, 35, -1, -1, -1, -1, 40, 41, 35, 36, -1, -1, -1, 47, -1, -1, 43, 44, 45, 53, -1, -1, -1, -1, -1, 52, 53, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, -1, -1, -1, 23, -1, -1, 25, 26, 27, 28, 29, -1, -1, -1, -1, 35, 36, -1, -1, 38, -1, -1, -1, 43, 44, 45, 20, 21, 47, -1, -1, 50, 52, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, -1, -1, 47, 20, 21, -1, -1, -1, 53, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, -1, -1, 47, 20, 21, -1, -1, -1, 53, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, -1, -1, 47, 20, 21, -1, -1, -1, 53, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, -1, -1, 47, 20, 21, -1, -1, -1, 53, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, -1, -1, 47, 20, 21, -1, -1, -1, 53, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, -1, -1, 47, 20, 21, -1, -1, -1, 53, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, -1, -1, 47, 21, -1, -1, -1, -1, 53, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, -1, -1, 47, 21, -1, -1, -1, -1, 53, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, -1, -1, 47, 21, -1, -1, -1, -1, 53, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, -1, -1, 47, 21, -1, -1, -1, -1, 53, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, -1, -1, 47, 20, 21, -1, -1, -1, 53, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, 20, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, 20, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, 20, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, 20, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, 20, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, 20, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, 20, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, 20, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, 20, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, 20, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, 20, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, 21, -1, 47, -1, -1, -1, 51, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, -1, -1, 47, -1, -1, 50, 25, 26, 27, 28, 29, 28, 29, -1, 31, 32, 33, 34, 35, 38, 28, 29, -1, 31, 32, 33, 34, 35, 47, 20, 21, -1, -1, -1, 53, -1, 53, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 20, 21, 42, -1, -1, -1, -1, 47, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 20, 21, 42, -1, -1, -1, -1, 47, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 20, 21, 42, -1, -1, -1, -1, 47, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 20, 21, 42, -1, -1, -1, -1, 47, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 20, 21, 42, -1, -1, -1, -1, 47, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, 21, 42, -1, 24, -1, -1, 47, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, 21, 42, -1, 24, -1, -1, 47, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, 21, 42, -1, 24, -1, -1, 47, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, 21, 42, -1, 24, -1, -1, 47, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, 21, 22, -1, -1, 47, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, 21, 22, -1, -1, 47, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, 21, 42, -1, -1, -1, -1, 47, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, 22, -1, 47, 25, 26, 27, 28, 29, 28, 29, -1, 31, 32, 33, 34, 35, 38, 28, 29, -1, 31, 32, 33, 34, 35, 47, 25, 26, 27, 28, 29, 28, 29, 53, 31, 32, 33, 34, 35, 38, -1, -1, 53, 40, 41, -1, -1, -1, 47, -1, 47, -1, -1, 50, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 42, -1, -1, 28, 29, 47, 31, 32, 33, 34, 35, -1, 35, -1, -1, 40, 41, 40, 41, -1, -1, -1, 47, -1, 47, -1, -1, -1, -1, -1, 53, 31, 32, 33, 34, 35, 36, 37, 38, 39, 20, -1, 42, -1, -1, -1, -1, 47, 28, 29, 22, 31, 32, 33, 34, 35, 28, 29, -1, 31, 32, 33, 34, 35 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr1/local/share/bison.simple" /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ #ifndef alloca #ifdef __GNUC__ #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) #include #else /* not sparc */ #if defined (MSDOS) && !defined (__TURBOC__) #include #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) #include #pragma alloca #else /* not MSDOS, __TURBOC__, or _AIX */ #ifdef __hpux #ifdef __cplusplus extern "C" { void *alloca (unsigned int); }; #else /* not __cplusplus */ void *alloca (); #endif /* not __cplusplus */ #endif /* __hpux */ #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc. */ #endif /* not GNU C. */ #endif /* alloca not defined. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define fferrok (fferrstatus = 0) #define ffclearin (ffchar = FFEMPTY) #define FFEMPTY -2 #define FFEOF 0 #define FFACCEPT return(0) #define FFABORT return(1) #define FFERROR goto fferrlab1 /* Like FFERROR except do call fferror. This remains here temporarily to ease the transition to the new meaning of FFERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define FFFAIL goto fferrlab #define FFRECOVERING() (!!fferrstatus) #define FFBACKUP(token, value) \ do \ if (ffchar == FFEMPTY && fflen == 1) \ { ffchar = (token), fflval = (value); \ ffchar1 = FFTRANSLATE (ffchar); \ FFPOPSTACK; \ goto ffbackup; \ } \ else \ { fferror ("syntax error: cannot back up"); FFERROR; } \ while (0) #define FFTERROR 1 #define FFERRCODE 256 #ifndef FFPURE #define FFLEX fflex() #endif #ifdef FFPURE #ifdef FFLSP_NEEDED #ifdef FFLEX_PARAM #define FFLEX fflex(&fflval, &fflloc, FFLEX_PARAM) #else #define FFLEX fflex(&fflval, &fflloc) #endif #else /* not FFLSP_NEEDED */ #ifdef FFLEX_PARAM #define FFLEX fflex(&fflval, FFLEX_PARAM) #else #define FFLEX fflex(&fflval) #endif #endif /* not FFLSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ #ifndef FFPURE int ffchar; /* the lookahead symbol */ FFSTYPE fflval; /* the semantic value of the */ /* lookahead symbol */ #ifdef FFLSP_NEEDED FFLTYPE fflloc; /* location data for the lookahead */ /* symbol */ #endif int ffnerrs; /* number of parse errors so far */ #endif /* not FFPURE */ #if FFDEBUG != 0 int ffdebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* FFINITDEPTH indicates the initial size of the parser's stacks */ #ifndef FFINITDEPTH #define FFINITDEPTH 200 #endif /* FFMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if FFMAXDEPTH == 0 #undef FFMAXDEPTH #endif #ifndef FFMAXDEPTH #define FFMAXDEPTH 10000 #endif /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ int ffparse (void); #endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __ff_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __ff_memcpy (to, from, count) char *to; char *from; int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __ff_memcpy (char *to, char *from, int count) { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif #line 196 "/usr1/local/share/bison.simple" /* The user can define FFPARSE_PARAM as the name of an argument to be passed into ffparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef FFPARSE_PARAM #ifdef __cplusplus #define FFPARSE_PARAM_ARG void *FFPARSE_PARAM #define FFPARSE_PARAM_DECL #else /* not __cplusplus */ #define FFPARSE_PARAM_ARG FFPARSE_PARAM #define FFPARSE_PARAM_DECL void *FFPARSE_PARAM; #endif /* not __cplusplus */ #else /* not FFPARSE_PARAM */ #define FFPARSE_PARAM_ARG #define FFPARSE_PARAM_DECL #endif /* not FFPARSE_PARAM */ int ffparse(FFPARSE_PARAM_ARG) FFPARSE_PARAM_DECL { register int ffstate; register int ffn; register short *ffssp; register FFSTYPE *ffvsp; int fferrstatus; /* number of tokens to shift before error messages enabled */ int ffchar1 = 0; /* lookahead token as an internal (translated) token number */ short ffssa[FFINITDEPTH]; /* the state stack */ FFSTYPE ffvsa[FFINITDEPTH]; /* the semantic value stack */ short *ffss = ffssa; /* refer to the stacks thru separate pointers */ FFSTYPE *ffvs = ffvsa; /* to allow ffoverflow to reallocate them elsewhere */ #ifdef FFLSP_NEEDED FFLTYPE fflsa[FFINITDEPTH]; /* the location stack */ FFLTYPE *ffls = fflsa; FFLTYPE *fflsp; #define FFPOPSTACK (ffvsp--, ffssp--, fflsp--) #else #define FFPOPSTACK (ffvsp--, ffssp--) #endif int ffstacksize = FFINITDEPTH; #ifdef FFPURE int ffchar; FFSTYPE fflval; int ffnerrs; #ifdef FFLSP_NEEDED FFLTYPE fflloc; #endif #endif FFSTYPE ffval; /* the variable used to return */ /* semantic values from the action */ /* routines */ int fflen; #if FFDEBUG != 0 if (ffdebug) fprintf(stderr, "Starting parse\n"); #endif ffstate = 0; fferrstatus = 0; ffnerrs = 0; ffchar = FFEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ ffssp = ffss - 1; ffvsp = ffvs; #ifdef FFLSP_NEEDED fflsp = ffls; #endif /* Push a new state, which is found in ffstate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ ffnewstate: *++ffssp = ffstate; if (ffssp >= ffss + ffstacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ FFSTYPE *ffvs1 = ffvs; short *ffss1 = ffss; #ifdef FFLSP_NEEDED FFLTYPE *ffls1 = ffls; #endif /* Get the current used size of the three stacks, in elements. */ int size = ffssp - ffss + 1; #ifdef ffoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef FFLSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if ffoverflow is a macro. */ ffoverflow("parser stack overflow", &ffss1, size * sizeof (*ffssp), &ffvs1, size * sizeof (*ffvsp), &ffls1, size * sizeof (*fflsp), &ffstacksize); #else ffoverflow("parser stack overflow", &ffss1, size * sizeof (*ffssp), &ffvs1, size * sizeof (*ffvsp), &ffstacksize); #endif ffss = ffss1; ffvs = ffvs1; #ifdef FFLSP_NEEDED ffls = ffls1; #endif #else /* no ffoverflow */ /* Extend the stack our own way. */ if (ffstacksize >= FFMAXDEPTH) { fferror("parser stack overflow"); return 2; } ffstacksize *= 2; if (ffstacksize > FFMAXDEPTH) ffstacksize = FFMAXDEPTH; ffss = (short *) alloca (ffstacksize * sizeof (*ffssp)); __ff_memcpy ((char *)ffss, (char *)ffss1, size * sizeof (*ffssp)); ffvs = (FFSTYPE *) alloca (ffstacksize * sizeof (*ffvsp)); __ff_memcpy ((char *)ffvs, (char *)ffvs1, size * sizeof (*ffvsp)); #ifdef FFLSP_NEEDED ffls = (FFLTYPE *) alloca (ffstacksize * sizeof (*fflsp)); __ff_memcpy ((char *)ffls, (char *)ffls1, size * sizeof (*fflsp)); #endif #endif /* no ffoverflow */ ffssp = ffss + size - 1; ffvsp = ffvs + size - 1; #ifdef FFLSP_NEEDED fflsp = ffls + size - 1; #endif #if FFDEBUG != 0 if (ffdebug) fprintf(stderr, "Stack size increased to %d\n", ffstacksize); #endif if (ffssp >= ffss + ffstacksize - 1) FFABORT; } #if FFDEBUG != 0 if (ffdebug) fprintf(stderr, "Entering state %d\n", ffstate); #endif goto ffbackup; ffbackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* ffresume: */ /* First try to decide what to do without reference to lookahead token. */ ffn = ffpact[ffstate]; if (ffn == FFFLAG) goto ffdefault; /* Not known => get a lookahead token if don't already have one. */ /* ffchar is either FFEMPTY or FFEOF or a valid token in external form. */ if (ffchar == FFEMPTY) { #if FFDEBUG != 0 if (ffdebug) fprintf(stderr, "Reading a token: "); #endif ffchar = FFLEX; } /* Convert token to internal form (in ffchar1) for indexing tables with */ if (ffchar <= 0) /* This means end of input. */ { ffchar1 = 0; ffchar = FFEOF; /* Don't call FFLEX any more */ #if FFDEBUG != 0 if (ffdebug) fprintf(stderr, "Now at end of input.\n"); #endif } else { ffchar1 = FFTRANSLATE(ffchar); #if FFDEBUG != 0 if (ffdebug) { fprintf (stderr, "Next token is %d (%s", ffchar, fftname[ffchar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef FFPRINT FFPRINT (stderr, ffchar, fflval); #endif fprintf (stderr, ")\n"); } #endif } ffn += ffchar1; if (ffn < 0 || ffn > FFLAST || ffcheck[ffn] != ffchar1) goto ffdefault; ffn = fftable[ffn]; /* ffn is what to do for this token type in this state. Negative => reduce, -ffn is rule number. Positive => shift, ffn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (ffn < 0) { if (ffn == FFFLAG) goto fferrlab; ffn = -ffn; goto ffreduce; } else if (ffn == 0) goto fferrlab; if (ffn == FFFINAL) FFACCEPT; /* Shift the lookahead token. */ #if FFDEBUG != 0 if (ffdebug) fprintf(stderr, "Shifting token %d (%s), ", ffchar, fftname[ffchar1]); #endif /* Discard the token being shifted unless it is eof. */ if (ffchar != FFEOF) ffchar = FFEMPTY; *++ffvsp = fflval; #ifdef FFLSP_NEEDED *++fflsp = fflloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (fferrstatus) fferrstatus--; ffstate = ffn; goto ffnewstate; /* Do the default action for the current state. */ ffdefault: ffn = ffdefact[ffstate]; if (ffn == 0) goto fferrlab; /* Do a reduction. ffn is the number of a rule to reduce with. */ ffreduce: fflen = ffr2[ffn]; if (fflen > 0) ffval = ffvsp[1-fflen]; /* implement default value of the action */ #if FFDEBUG != 0 if (ffdebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", ffn, ffrline[ffn]); /* Print the symbols being reduced, and their result. */ for (i = ffprhs[ffn]; ffrhs[i] > 0; i++) fprintf (stderr, "%s ", fftname[ffrhs[i]]); fprintf (stderr, " -> %s\n", fftname[ffr1[ffn]]); } #endif switch (ffn) { case 3: #line 245 "eval.y" {; break;} case 4: #line 247 "eval.y" { if( ffvsp[-1].Node<0 ) { fferror("Couldn't build node structure: out of memory?"); FFERROR; } gParse.resultNode = ffvsp[-1].Node; ; break;} case 5: #line 253 "eval.y" { if( ffvsp[-1].Node<0 ) { fferror("Couldn't build node structure: out of memory?"); FFERROR; } gParse.resultNode = ffvsp[-1].Node; ; break;} case 6: #line 259 "eval.y" { if( ffvsp[-1].Node<0 ) { fferror("Couldn't build node structure: out of memory?"); FFERROR; } gParse.resultNode = ffvsp[-1].Node; ; break;} case 7: #line 265 "eval.y" { if( ffvsp[-1].Node<0 ) { fferror("Couldn't build node structure: out of memory?"); FFERROR; } gParse.resultNode = ffvsp[-1].Node; ; break;} case 8: #line 270 "eval.y" { fferrok; ; break;} case 9: #line 274 "eval.y" { ffval.Node = New_Vector( ffvsp[0].Node ); TEST(ffval.Node); ; break;} case 10: #line 276 "eval.y" { if( gParse.Nodes[ffvsp[-2].Node].nSubNodes >= MAXSUBS ) { ffvsp[-2].Node = Close_Vec( ffvsp[-2].Node ); TEST(ffvsp[-2].Node); ffval.Node = New_Vector( ffvsp[-2].Node ); TEST(ffval.Node); } else { ffval.Node = ffvsp[-2].Node; } gParse.Nodes[ffval.Node].SubNodes[ gParse.Nodes[ffval.Node].nSubNodes++ ] = ffvsp[0].Node; ; break;} case 11: #line 289 "eval.y" { ffval.Node = New_Vector( ffvsp[0].Node ); TEST(ffval.Node); ; break;} case 12: #line 291 "eval.y" { if( TYPE(ffvsp[-2].Node) < TYPE(ffvsp[0].Node) ) TYPE(ffvsp[-2].Node) = TYPE(ffvsp[0].Node); if( gParse.Nodes[ffvsp[-2].Node].nSubNodes >= MAXSUBS ) { ffvsp[-2].Node = Close_Vec( ffvsp[-2].Node ); TEST(ffvsp[-2].Node); ffval.Node = New_Vector( ffvsp[-2].Node ); TEST(ffval.Node); } else { ffval.Node = ffvsp[-2].Node; } gParse.Nodes[ffval.Node].SubNodes[ gParse.Nodes[ffval.Node].nSubNodes++ ] = ffvsp[0].Node; ; break;} case 13: #line 304 "eval.y" { if( gParse.Nodes[ffvsp[-2].Node].nSubNodes >= MAXSUBS ) { ffvsp[-2].Node = Close_Vec( ffvsp[-2].Node ); TEST(ffvsp[-2].Node); ffval.Node = New_Vector( ffvsp[-2].Node ); TEST(ffval.Node); } else { ffval.Node = ffvsp[-2].Node; } gParse.Nodes[ffval.Node].SubNodes[ gParse.Nodes[ffval.Node].nSubNodes++ ] = ffvsp[0].Node; ; break;} case 14: #line 315 "eval.y" { TYPE(ffvsp[-2].Node) = TYPE(ffvsp[0].Node); if( gParse.Nodes[ffvsp[-2].Node].nSubNodes >= MAXSUBS ) { ffvsp[-2].Node = Close_Vec( ffvsp[-2].Node ); TEST(ffvsp[-2].Node); ffval.Node = New_Vector( ffvsp[-2].Node ); TEST(ffval.Node); } else { ffval.Node = ffvsp[-2].Node; } gParse.Nodes[ffval.Node].SubNodes[ gParse.Nodes[ffval.Node].nSubNodes++ ] = ffvsp[0].Node; ; break;} case 15: #line 329 "eval.y" { ffval.Node = Close_Vec( ffvsp[-1].Node ); TEST(ffval.Node); ; break;} case 16: #line 333 "eval.y" { ffval.Node = Close_Vec( ffvsp[-1].Node ); TEST(ffval.Node); ; break;} case 17: #line 337 "eval.y" { ffval.Node = New_Const( BITSTR, ffvsp[0].str, strlen(ffvsp[0].str)+1 ); TEST(ffval.Node); SIZE(ffval.Node) = strlen(ffvsp[0].str); ; break;} case 18: #line 341 "eval.y" { ffval.Node = New_Column( ffvsp[0].lng ); TEST(ffval.Node); ; break;} case 19: #line 343 "eval.y" { if( TYPE(ffvsp[-1].Node) != LONG || OPER(ffvsp[-1].Node) != CONST_OP ) { fferror("Offset argument must be a constant integer"); FFERROR; } ffval.Node = New_Offset( ffvsp[-3].lng, ffvsp[-1].Node ); TEST(ffval.Node); ; break;} case 20: #line 352 "eval.y" { ffval.Node = New_BinOp( BITSTR, ffvsp[-2].Node, '&', ffvsp[0].Node ); TEST(ffval.Node); SIZE(ffval.Node) = ( SIZE(ffvsp[-2].Node)>SIZE(ffvsp[0].Node) ? SIZE(ffvsp[-2].Node) : SIZE(ffvsp[0].Node) ); ; break;} case 21: #line 355 "eval.y" { ffval.Node = New_BinOp( BITSTR, ffvsp[-2].Node, '|', ffvsp[0].Node ); TEST(ffval.Node); SIZE(ffval.Node) = ( SIZE(ffvsp[-2].Node)>SIZE(ffvsp[0].Node) ? SIZE(ffvsp[-2].Node) : SIZE(ffvsp[0].Node) ); ; break;} case 22: #line 358 "eval.y" { if (SIZE(ffvsp[-2].Node)+SIZE(ffvsp[0].Node) >= MAX_STRLEN) { fferror("Combined bit string size exceeds " MAX_STRLEN_S " bits"); FFERROR; } ffval.Node = New_BinOp( BITSTR, ffvsp[-2].Node, '+', ffvsp[0].Node ); TEST(ffval.Node); SIZE(ffval.Node) = SIZE(ffvsp[-2].Node) + SIZE(ffvsp[0].Node); ; break;} case 23: #line 367 "eval.y" { ffval.Node = New_Deref( ffvsp[-3].Node, 1, ffvsp[-1].Node, 0, 0, 0, 0 ); TEST(ffval.Node); ; break;} case 24: #line 369 "eval.y" { ffval.Node = New_Deref( ffvsp[-5].Node, 2, ffvsp[-3].Node, ffvsp[-1].Node, 0, 0, 0 ); TEST(ffval.Node); ; break;} case 25: #line 371 "eval.y" { ffval.Node = New_Deref( ffvsp[-7].Node, 3, ffvsp[-5].Node, ffvsp[-3].Node, ffvsp[-1].Node, 0, 0 ); TEST(ffval.Node); ; break;} case 26: #line 373 "eval.y" { ffval.Node = New_Deref( ffvsp[-9].Node, 4, ffvsp[-7].Node, ffvsp[-5].Node, ffvsp[-3].Node, ffvsp[-1].Node, 0 ); TEST(ffval.Node); ; break;} case 27: #line 375 "eval.y" { ffval.Node = New_Deref( ffvsp[-11].Node, 5, ffvsp[-9].Node, ffvsp[-7].Node, ffvsp[-5].Node, ffvsp[-3].Node, ffvsp[-1].Node ); TEST(ffval.Node); ; break;} case 28: #line 377 "eval.y" { ffval.Node = New_Unary( BITSTR, NOT, ffvsp[0].Node ); TEST(ffval.Node); ; break;} case 29: #line 380 "eval.y" { ffval.Node = ffvsp[-1].Node; ; break;} case 30: #line 384 "eval.y" { ffval.Node = New_Const( LONG, &(ffvsp[0].lng), sizeof(long) ); TEST(ffval.Node); ; break;} case 31: #line 386 "eval.y" { ffval.Node = New_Const( DOUBLE, &(ffvsp[0].dbl), sizeof(double) ); TEST(ffval.Node); ; break;} case 32: #line 388 "eval.y" { ffval.Node = New_Column( ffvsp[0].lng ); TEST(ffval.Node); ; break;} case 33: #line 390 "eval.y" { if( TYPE(ffvsp[-1].Node) != LONG || OPER(ffvsp[-1].Node) != CONST_OP ) { fferror("Offset argument must be a constant integer"); FFERROR; } ffval.Node = New_Offset( ffvsp[-3].lng, ffvsp[-1].Node ); TEST(ffval.Node); ; break;} case 34: #line 399 "eval.y" { ffval.Node = New_Func( LONG, row_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); ; break;} case 35: #line 401 "eval.y" { ffval.Node = New_Func( LONG, null_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); ; break;} case 36: #line 403 "eval.y" { PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, '%', ffvsp[0].Node ); TEST(ffval.Node); ; break;} case 37: #line 406 "eval.y" { PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, '+', ffvsp[0].Node ); TEST(ffval.Node); ; break;} case 38: #line 409 "eval.y" { PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, '-', ffvsp[0].Node ); TEST(ffval.Node); ; break;} case 39: #line 412 "eval.y" { PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, '*', ffvsp[0].Node ); TEST(ffval.Node); ; break;} case 40: #line 415 "eval.y" { PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, '/', ffvsp[0].Node ); TEST(ffval.Node); ; break;} case 41: #line 418 "eval.y" { PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, POWER, ffvsp[0].Node ); TEST(ffval.Node); ; break;} case 42: #line 421 "eval.y" { ffval.Node = ffvsp[0].Node; ; break;} case 43: #line 423 "eval.y" { ffval.Node = New_Unary( TYPE(ffvsp[0].Node), UMINUS, ffvsp[0].Node ); TEST(ffval.Node); ; break;} case 44: #line 425 "eval.y" { ffval.Node = ffvsp[-1].Node; ; break;} case 45: #line 427 "eval.y" { ffvsp[0].Node = New_Unary( TYPE(ffvsp[-2].Node), 0, ffvsp[0].Node ); ffval.Node = New_BinOp( TYPE(ffvsp[-2].Node), ffvsp[-2].Node, '*', ffvsp[0].Node ); TEST(ffval.Node); ; break;} case 46: #line 431 "eval.y" { ffvsp[-2].Node = New_Unary( TYPE(ffvsp[0].Node), 0, ffvsp[-2].Node ); ffval.Node = New_BinOp( TYPE(ffvsp[0].Node), ffvsp[-2].Node, '*', ffvsp[0].Node ); TEST(ffval.Node); ; break;} case 47: #line 435 "eval.y" { PROMOTE(ffvsp[-2].Node,ffvsp[0].Node); if( ! Test_Dims(ffvsp[-2].Node,ffvsp[0].Node) ) { fferror("Incompatible dimensions in '?:' arguments"); FFERROR; } ffval.Node = New_Func( 0, ifthenelse_fct, 3, ffvsp[-2].Node, ffvsp[0].Node, ffvsp[-4].Node, 0, 0, 0, 0 ); TEST(ffval.Node); if( SIZE(ffvsp[-2].Node)=SIZE(ffvsp[-1].Node) && Test_Dims( ffvsp[-3].Node, ffvsp[-1].Node ) ) { PROMOTE(ffvsp[-3].Node,ffvsp[-1].Node); ffval.Node = New_Func( 0, defnull_fct, 2, ffvsp[-3].Node, ffvsp[-1].Node, 0, 0, 0, 0, 0 ); TEST(ffval.Node); } else { fferror("Dimensions of DEFNULL arguments " "are not compatible"); FFERROR; } } else if (FSTRCMP(ffvsp[-4].str,"ARCTAN2(") == 0) { if( TYPE(ffvsp[-3].Node) != DOUBLE ) ffvsp[-3].Node = New_Unary( DOUBLE, 0, ffvsp[-3].Node ); if( TYPE(ffvsp[-1].Node) != DOUBLE ) ffvsp[-1].Node = New_Unary( DOUBLE, 0, ffvsp[-1].Node ); if( Test_Dims( ffvsp[-3].Node, ffvsp[-1].Node ) ) { ffval.Node = New_Func( 0, atan2_fct, 2, ffvsp[-3].Node, ffvsp[-1].Node, 0, 0, 0, 0, 0 ); TEST(ffval.Node); if( SIZE(ffvsp[-3].Node)=SIZE(ffvsp[-1].Node) && Test_Dims( ffvsp[-3].Node, ffvsp[-1].Node ) ) { ffval.Node = New_Func( 0, defnull_fct, 2, ffvsp[-3].Node, ffvsp[-1].Node, 0, 0, 0, 0, 0 ); TEST(ffval.Node); } else { fferror("Dimensions of DEFNULL arguments are not compatible"); FFERROR; } } else { fferror("Boolean Function(expr,expr) not supported"); FFERROR; } ; break;} case 99: #line 930 "eval.y" { if( TYPE(ffvsp[-5].Node) != DOUBLE ) ffvsp[-5].Node = New_Unary( DOUBLE, 0, ffvsp[-5].Node ); if( TYPE(ffvsp[-3].Node) != DOUBLE ) ffvsp[-3].Node = New_Unary( DOUBLE, 0, ffvsp[-3].Node ); if( TYPE(ffvsp[-1].Node) != DOUBLE ) ffvsp[-1].Node = New_Unary( DOUBLE, 0, ffvsp[-1].Node ); if( ! (Test_Dims( ffvsp[-5].Node, ffvsp[-3].Node ) && Test_Dims( ffvsp[-3].Node, ffvsp[-1].Node ) ) ) { fferror("Dimensions of NEAR arguments " "are not compatible"); FFERROR; } else { if (FSTRCMP(ffvsp[-6].str,"NEAR(") == 0) { ffval.Node = New_Func( BOOLEAN, near_fct, 3, ffvsp[-5].Node, ffvsp[-3].Node, ffvsp[-1].Node, 0, 0, 0, 0 ); } else { fferror("Boolean Function not supported"); FFERROR; } TEST(ffval.Node); if( SIZE(ffval.Node)= MAX_STRLEN) { fferror("Combined string size exceeds " MAX_STRLEN_S " characters"); FFERROR; } ffval.Node = New_BinOp( STRING, ffvsp[-2].Node, '+', ffvsp[0].Node ); TEST(ffval.Node); SIZE(ffval.Node) = SIZE(ffvsp[-2].Node) + SIZE(ffvsp[0].Node); ; break;} case 122: #line 1088 "eval.y" { int outSize; if( SIZE(ffvsp[-4].Node)!=1 ) { fferror("Cannot have a vector string column"); FFERROR; } /* Since the output can be calculated now, as a constant scalar, we must precalculate the output size, in order to avoid an overflow. */ outSize = SIZE(ffvsp[-2].Node); if (SIZE(ffvsp[0].Node) > outSize) outSize = SIZE(ffvsp[0].Node); ffval.Node = New_FuncSize( 0, ifthenelse_fct, 3, ffvsp[-2].Node, ffvsp[0].Node, ffvsp[-4].Node, 0, 0, 0, 0, outSize); TEST(ffval.Node); if( SIZE(ffvsp[-2].Node) outSize) outSize = SIZE(ffvsp[-1].Node); ffval.Node = New_FuncSize( 0, defnull_fct, 2, ffvsp[-3].Node, ffvsp[-1].Node, 0, 0, 0, 0, 0, outSize ); TEST(ffval.Node); if( SIZE(ffvsp[-1].Node)>SIZE(ffvsp[-3].Node) ) SIZE(ffval.Node) = SIZE(ffvsp[-1].Node); } else { fferror("Function(string,string) not supported"); FFERROR; } ; break;} case 124: #line 1126 "eval.y" { if (FSTRCMP(ffvsp[-6].str,"STRMID(") == 0) { int len; if( TYPE(ffvsp[-3].Node) != LONG || SIZE(ffvsp[-3].Node) != 1 || TYPE(ffvsp[-1].Node) != LONG || SIZE(ffvsp[-1].Node) != 1) { fferror("When using STRMID(S,P,N), P and N must be integers (and not vector columns)"); FFERROR; } if (OPER(ffvsp[-1].Node) == CONST_OP) { /* Constant value: use that directly */ len = (gParse.Nodes[ffvsp[-1].Node].value.data.lng); } else { /* Variable value: use the maximum possible (from $2) */ len = SIZE(ffvsp[-5].Node); } if (len <= 0 || len >= MAX_STRLEN) { fferror("STRMID(S,P,N), N must be 1-" MAX_STRLEN_S); FFERROR; } ffval.Node = New_FuncSize( 0, strmid_fct, 3, ffvsp[-5].Node, ffvsp[-3].Node,ffvsp[-1].Node,0,0,0,0,len); TEST(ffval.Node); } else { fferror("Function(string,expr,expr) not supported"); FFERROR; } ; break;} } /* the action file gets copied in in place of this dollarsign */ #line 498 "/usr1/local/share/bison.simple" ffvsp -= fflen; ffssp -= fflen; #ifdef FFLSP_NEEDED fflsp -= fflen; #endif #if FFDEBUG != 0 if (ffdebug) { short *ssp1 = ffss - 1; fprintf (stderr, "state stack now"); while (ssp1 != ffssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++ffvsp = ffval; #ifdef FFLSP_NEEDED fflsp++; if (fflen == 0) { fflsp->first_line = fflloc.first_line; fflsp->first_column = fflloc.first_column; fflsp->last_line = (fflsp-1)->last_line; fflsp->last_column = (fflsp-1)->last_column; fflsp->text = 0; } else { fflsp->last_line = (fflsp+fflen-1)->last_line; fflsp->last_column = (fflsp+fflen-1)->last_column; } #endif /* Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ ffn = ffr1[ffn]; ffstate = ffpgoto[ffn - FFNTBASE] + *ffssp; if (ffstate >= 0 && ffstate <= FFLAST && ffcheck[ffstate] == *ffssp) ffstate = fftable[ffstate]; else ffstate = ffdefgoto[ffn - FFNTBASE]; goto ffnewstate; fferrlab: /* here on detecting error */ if (! fferrstatus) /* If not already recovering from an error, report this error. */ { ++ffnerrs; #ifdef FFERROR_VERBOSE ffn = ffpact[ffstate]; if (ffn > FFFLAG && ffn < FFLAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -ffn if nec to avoid negative indexes in ffcheck. */ for (x = (ffn < 0 ? -ffn : 0); x < (sizeof(fftname) / sizeof(char *)); x++) if (ffcheck[x + ffn] == x) size += strlen(fftname[x]) + 15, count++; msg = (char *) malloc(size + 15); if (msg != 0) { strcpy(msg, "parse error"); if (count < 5) { count = 0; for (x = (ffn < 0 ? -ffn : 0); x < (sizeof(fftname) / sizeof(char *)); x++) if (ffcheck[x + ffn] == x) { strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, fftname[x]); strcat(msg, "'"); count++; } } fferror(msg); free(msg); } else fferror ("parse error; also virtual memory exceeded"); } else #endif /* FFERROR_VERBOSE */ fferror("parse error"); } goto fferrlab1; fferrlab1: /* here on error raised explicitly by an action */ if (fferrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (ffchar == FFEOF) FFABORT; #if FFDEBUG != 0 if (ffdebug) fprintf(stderr, "Discarding token %d (%s).\n", ffchar, fftname[ffchar1]); #endif ffchar = FFEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ fferrstatus = 3; /* Each real token shifted decrements this */ goto fferrhandle; fferrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ ffn = ffdefact[ffstate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (ffn) goto ffdefault; #endif fferrpop: /* pop the current state because it cannot handle the error token */ if (ffssp == ffss) FFABORT; ffvsp--; ffstate = *--ffssp; #ifdef FFLSP_NEEDED fflsp--; #endif #if FFDEBUG != 0 if (ffdebug) { short *ssp1 = ffss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != ffssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif fferrhandle: ffn = ffpact[ffstate]; if (ffn == FFFLAG) goto fferrdefault; ffn += FFTERROR; if (ffn < 0 || ffn > FFLAST || ffcheck[ffn] != FFTERROR) goto fferrdefault; ffn = fftable[ffn]; if (ffn < 0) { if (ffn == FFFLAG) goto fferrpop; ffn = -ffn; goto ffreduce; } else if (ffn == 0) goto fferrpop; if (ffn == FFFINAL) FFACCEPT; #if FFDEBUG != 0 if (ffdebug) fprintf(stderr, "Shifting error token, "); #endif *++ffvsp = fflval; #ifdef FFLSP_NEEDED *++fflsp = fflloc; #endif ffstate = ffn; goto ffnewstate; } #line 1155 "eval.y" /*************************************************************************/ /* Start of "New" routines which build the expression Nodal structure */ /*************************************************************************/ static int Alloc_Node( void ) { /* Use this for allocation to guarantee *Nodes */ Node *newNodePtr; /* survives on failure, making it still valid */ /* while working our way out of this error */ if( gParse.nNodes == gParse.nNodesAlloc ) { if( gParse.Nodes ) { gParse.nNodesAlloc += gParse.nNodesAlloc; newNodePtr = (Node *)realloc( gParse.Nodes, sizeof(Node)*gParse.nNodesAlloc ); } else { gParse.nNodesAlloc = 100; newNodePtr = (Node *)malloc ( sizeof(Node)*gParse.nNodesAlloc ); } if( newNodePtr ) { gParse.Nodes = newNodePtr; } else { gParse.status = MEMORY_ALLOCATION; return( -1 ); } } return ( gParse.nNodes++ ); } static void Free_Last_Node( void ) { if( gParse.nNodes ) gParse.nNodes--; } static int New_Const( int returnType, void *value, long len ) { Node *this; int n; n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->operation = CONST_OP; /* Flag a constant */ this->DoOp = NULL; this->nSubNodes = 0; this->type = returnType; memcpy( &(this->value.data), value, len ); this->value.undef = NULL; this->value.nelem = 1; this->value.naxis = 1; this->value.naxes[0] = 1; } return(n); } static int New_Column( int ColNum ) { Node *this; int n, i; n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->operation = -ColNum; this->DoOp = NULL; this->nSubNodes = 0; this->type = gParse.varData[ColNum].type; this->value.nelem = gParse.varData[ColNum].nelem; this->value.naxis = gParse.varData[ColNum].naxis; for( i=0; ivalue.naxes[i] = gParse.varData[ColNum].naxes[i]; } return(n); } static int New_Offset( int ColNum, int offsetNode ) { Node *this; int n, i, colNode; colNode = New_Column( ColNum ); if( colNode<0 ) return(-1); n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->operation = '{'; this->DoOp = Do_Offset; this->nSubNodes = 2; this->SubNodes[0] = colNode; this->SubNodes[1] = offsetNode; this->type = gParse.varData[ColNum].type; this->value.nelem = gParse.varData[ColNum].nelem; this->value.naxis = gParse.varData[ColNum].naxis; for( i=0; ivalue.naxes[i] = gParse.varData[ColNum].naxes[i]; } return(n); } static int New_Unary( int returnType, int Op, int Node1 ) { Node *this, *that; int i,n; if( Node1<0 ) return(-1); that = gParse.Nodes + Node1; if( !Op ) Op = returnType; if( (Op==DOUBLE || Op==FLTCAST) && that->type==DOUBLE ) return( Node1 ); if( (Op==LONG || Op==INTCAST) && that->type==LONG ) return( Node1 ); if( (Op==BOOLEAN ) && that->type==BOOLEAN ) return( Node1 ); n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->operation = Op; this->DoOp = Do_Unary; this->nSubNodes = 1; this->SubNodes[0] = Node1; this->type = returnType; that = gParse.Nodes + Node1; /* Reset in case .Nodes mv'd */ this->value.nelem = that->value.nelem; this->value.naxis = that->value.naxis; for( i=0; ivalue.naxis; i++ ) this->value.naxes[i] = that->value.naxes[i]; if( that->operation==CONST_OP ) this->DoOp( this ); } return( n ); } static int New_BinOp( int returnType, int Node1, int Op, int Node2 ) { Node *this,*that1,*that2; int n,i,constant; if( Node1<0 || Node2<0 ) return(-1); n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->operation = Op; this->nSubNodes = 2; this->SubNodes[0]= Node1; this->SubNodes[1]= Node2; this->type = returnType; that1 = gParse.Nodes + Node1; that2 = gParse.Nodes + Node2; constant = (that1->operation==CONST_OP && that2->operation==CONST_OP); if( that1->type!=STRING && that1->type!=BITSTR ) if( !Test_Dims( Node1, Node2 ) ) { Free_Last_Node(); fferror("Array sizes/dims do not match for binary operator"); return(-1); } if( that1->value.nelem == 1 ) that1 = that2; this->value.nelem = that1->value.nelem; this->value.naxis = that1->value.naxis; for( i=0; ivalue.naxis; i++ ) this->value.naxes[i] = that1->value.naxes[i]; if ( Op == ACCUM && that1->type == BITSTR ) { /* ACCUM is rank-reducing on bit strings */ this->value.nelem = 1; this->value.naxis = 1; this->value.naxes[0] = 1; } /* Both subnodes should be of same time */ switch( that1->type ) { case BITSTR: this->DoOp = Do_BinOp_bit; break; case STRING: this->DoOp = Do_BinOp_str; break; case BOOLEAN: this->DoOp = Do_BinOp_log; break; case LONG: this->DoOp = Do_BinOp_lng; break; case DOUBLE: this->DoOp = Do_BinOp_dbl; break; } if( constant ) this->DoOp( this ); } return( n ); } static int New_Func( int returnType, funcOp Op, int nNodes, int Node1, int Node2, int Node3, int Node4, int Node5, int Node6, int Node7 ) { return New_FuncSize(returnType, Op, nNodes, Node1, Node2, Node3, Node4, Node5, Node6, Node7, 0); } static int New_FuncSize( int returnType, funcOp Op, int nNodes, int Node1, int Node2, int Node3, int Node4, int Node5, int Node6, int Node7, int Size ) /* If returnType==0 , use Node1's type and vector sizes as returnType, */ /* else return a single value of type returnType */ { Node *this, *that; int i,n,constant; if( Node1<0 || Node2<0 || Node3<0 || Node4<0 || Node5<0 || Node6<0 || Node7<0 ) return(-1); n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->operation = (int)Op; this->DoOp = Do_Func; this->nSubNodes = nNodes; this->SubNodes[0] = Node1; this->SubNodes[1] = Node2; this->SubNodes[2] = Node3; this->SubNodes[3] = Node4; this->SubNodes[4] = Node5; this->SubNodes[5] = Node6; this->SubNodes[6] = Node7; i = constant = nNodes; /* Functions with zero params are not const */ if (Op == poirnd_fct) constant = 0; /* Nor is Poisson deviate */ while( i-- ) constant = ( constant && OPER(this->SubNodes[i]) == CONST_OP ); if( returnType ) { this->type = returnType; this->value.nelem = 1; this->value.naxis = 1; this->value.naxes[0] = 1; } else { that = gParse.Nodes + Node1; this->type = that->type; this->value.nelem = that->value.nelem; this->value.naxis = that->value.naxis; for( i=0; ivalue.naxis; i++ ) this->value.naxes[i] = that->value.naxes[i]; } /* Force explicit size before evaluating */ if (Size > 0) this->value.nelem = Size; if( constant ) this->DoOp( this ); } return( n ); } static int New_Deref( int Var, int nDim, int Dim1, int Dim2, int Dim3, int Dim4, int Dim5 ) { int n, idx, constant; long elem=0; Node *this, *theVar, *theDim[MAXDIMS]; if( Var<0 || Dim1<0 || Dim2<0 || Dim3<0 || Dim4<0 || Dim5<0 ) return(-1); theVar = gParse.Nodes + Var; if( theVar->operation==CONST_OP || theVar->value.nelem==1 ) { fferror("Cannot index a scalar value"); return(-1); } n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->nSubNodes = nDim+1; theVar = gParse.Nodes + (this->SubNodes[0]=Var); theDim[0] = gParse.Nodes + (this->SubNodes[1]=Dim1); theDim[1] = gParse.Nodes + (this->SubNodes[2]=Dim2); theDim[2] = gParse.Nodes + (this->SubNodes[3]=Dim3); theDim[3] = gParse.Nodes + (this->SubNodes[4]=Dim4); theDim[4] = gParse.Nodes + (this->SubNodes[5]=Dim5); constant = theVar->operation==CONST_OP; for( idx=0; idxoperation==CONST_OP); for( idx=0; idxvalue.nelem>1 ) { Free_Last_Node(); fferror("Cannot use an array as an index value"); return(-1); } else if( theDim[idx]->type!=LONG ) { Free_Last_Node(); fferror("Index value must be an integer type"); return(-1); } this->operation = '['; this->DoOp = Do_Deref; this->type = theVar->type; if( theVar->value.naxis == nDim ) { /* All dimensions specified */ this->value.nelem = 1; this->value.naxis = 1; this->value.naxes[0] = 1; } else if( nDim==1 ) { /* Dereference only one dimension */ elem=1; this->value.naxis = theVar->value.naxis-1; for( idx=0; idxvalue.naxis; idx++ ) { elem *= ( this->value.naxes[idx] = theVar->value.naxes[idx] ); } this->value.nelem = elem; } else { Free_Last_Node(); fferror("Must specify just one or all indices for vector"); return(-1); } if( constant ) this->DoOp( this ); } return(n); } extern int ffGetVariable( char *varName, FFSTYPE *varVal ); static int New_GTI( char *fname, int Node1, char *start, char *stop ) { fitsfile *fptr; Node *this, *that0, *that1; int type,i,n, startCol, stopCol, Node0; int hdutype, hdunum, evthdu, samefile, extvers, movetotype, tstat; char extname[100]; long nrows; double timeZeroI[2], timeZeroF[2], dt, timeSpan; char xcol[20], xexpr[20]; FFSTYPE colVal; if( Node1==-99 ) { type = ffGetVariable( "TIME", &colVal ); if( type==COLUMN ) { Node1 = New_Column( (int)colVal.lng ); } else { fferror("Could not build TIME column for GTIFILTER"); return(-1); } } Node1 = New_Unary( DOUBLE, 0, Node1 ); Node0 = Alloc_Node(); /* This will hold the START/STOP times */ if( Node1<0 || Node0<0 ) return(-1); /* Record current HDU number in case we need to move within this file */ fptr = gParse.def_fptr; ffghdn( fptr, &evthdu ); /* Look for TIMEZERO keywords in current extension */ tstat = 0; if( ffgkyd( fptr, "TIMEZERO", timeZeroI, NULL, &tstat ) ) { tstat = 0; if( ffgkyd( fptr, "TIMEZERI", timeZeroI, NULL, &tstat ) ) { timeZeroI[0] = timeZeroF[0] = 0.0; } else if( ffgkyd( fptr, "TIMEZERF", timeZeroF, NULL, &tstat ) ) { timeZeroF[0] = 0.0; } } else { timeZeroF[0] = 0.0; } /* Resolve filename parameter */ switch( fname[0] ) { case '\0': samefile = 1; hdunum = 1; break; case '[': samefile = 1; i = 1; while( fname[i] != '\0' && fname[i] != ']' ) i++; if( fname[i] ) { fname[i] = '\0'; fname++; ffexts( fname, &hdunum, extname, &extvers, &movetotype, xcol, xexpr, &gParse.status ); if( *extname ) { ffmnhd( fptr, movetotype, extname, extvers, &gParse.status ); ffghdn( fptr, &hdunum ); } else if( hdunum ) { ffmahd( fptr, ++hdunum, &hdutype, &gParse.status ); } else if( !gParse.status ) { fferror("Cannot use primary array for GTI filter"); return( -1 ); } } else { fferror("File extension specifier lacks closing ']'"); return( -1 ); } break; case '+': samefile = 1; hdunum = atoi( fname ) + 1; if( hdunum>1 ) ffmahd( fptr, hdunum, &hdutype, &gParse.status ); else { fferror("Cannot use primary array for GTI filter"); return( -1 ); } break; default: samefile = 0; if( ! ffopen( &fptr, fname, READONLY, &gParse.status ) ) ffghdn( fptr, &hdunum ); break; } if( gParse.status ) return(-1); /* If at primary, search for GTI extension */ if( hdunum==1 ) { while( 1 ) { hdunum++; if( ffmahd( fptr, hdunum, &hdutype, &gParse.status ) ) break; if( hdutype==IMAGE_HDU ) continue; tstat = 0; if( ffgkys( fptr, "EXTNAME", extname, NULL, &tstat ) ) continue; ffupch( extname ); if( strstr( extname, "GTI" ) ) break; } if( gParse.status ) { if( gParse.status==END_OF_FILE ) fferror("GTI extension not found in this file"); return(-1); } } /* Locate START/STOP Columns */ ffgcno( fptr, CASEINSEN, start, &startCol, &gParse.status ); ffgcno( fptr, CASEINSEN, stop, &stopCol, &gParse.status ); if( gParse.status ) return(-1); /* Look for TIMEZERO keywords in GTI extension */ tstat = 0; if( ffgkyd( fptr, "TIMEZERO", timeZeroI+1, NULL, &tstat ) ) { tstat = 0; if( ffgkyd( fptr, "TIMEZERI", timeZeroI+1, NULL, &tstat ) ) { timeZeroI[1] = timeZeroF[1] = 0.0; } else if( ffgkyd( fptr, "TIMEZERF", timeZeroF+1, NULL, &tstat ) ) { timeZeroF[1] = 0.0; } } else { timeZeroF[1] = 0.0; } n = Alloc_Node(); if( n >= 0 ) { this = gParse.Nodes + n; this->nSubNodes = 2; this->SubNodes[1] = Node1; this->operation = (int)gtifilt_fct; this->DoOp = Do_GTI; this->type = BOOLEAN; that1 = gParse.Nodes + Node1; this->value.nelem = that1->value.nelem; this->value.naxis = that1->value.naxis; for( i=0; i < that1->value.naxis; i++ ) this->value.naxes[i] = that1->value.naxes[i]; /* Init START/STOP node to be treated as a "constant" */ this->SubNodes[0] = Node0; that0 = gParse.Nodes + Node0; that0->operation = CONST_OP; that0->DoOp = NULL; that0->value.data.ptr= NULL; /* Read in START/STOP times */ if( ffgkyj( fptr, "NAXIS2", &nrows, NULL, &gParse.status ) ) return(-1); that0->value.nelem = nrows; if( nrows ) { that0->value.data.dblptr = (double*)malloc( 2*nrows*sizeof(double) ); if( !that0->value.data.dblptr ) { gParse.status = MEMORY_ALLOCATION; return(-1); } ffgcvd( fptr, startCol, 1L, 1L, nrows, 0.0, that0->value.data.dblptr, &i, &gParse.status ); ffgcvd( fptr, stopCol, 1L, 1L, nrows, 0.0, that0->value.data.dblptr+nrows, &i, &gParse.status ); if( gParse.status ) { free( that0->value.data.dblptr ); return(-1); } /* Test for fully time-ordered GTI... both START && STOP */ that0->type = 1; /* Assume yes */ i = nrows; while( --i ) if( that0->value.data.dblptr[i-1] >= that0->value.data.dblptr[i] || that0->value.data.dblptr[i-1+nrows] >= that0->value.data.dblptr[i+nrows] ) { that0->type = 0; break; } /* Handle TIMEZERO offset, if any */ dt = (timeZeroI[1] - timeZeroI[0]) + (timeZeroF[1] - timeZeroF[0]); timeSpan = that0->value.data.dblptr[nrows+nrows-1] - that0->value.data.dblptr[0]; if( fabs( dt / timeSpan ) > 1e-12 ) { for( i=0; i<(nrows+nrows); i++ ) that0->value.data.dblptr[i] += dt; } } if( OPER(Node1)==CONST_OP ) this->DoOp( this ); } if( samefile ) ffmahd( fptr, evthdu, &hdutype, &gParse.status ); else ffclos( fptr, &gParse.status ); return( n ); } static int New_REG( char *fname, int NodeX, int NodeY, char *colNames ) { Node *this, *that0; int type, n, Node0; int Xcol, Ycol, tstat; WCSdata wcs; SAORegion *Rgn; char *cX, *cY; FFSTYPE colVal; if( NodeX==-99 ) { type = ffGetVariable( "X", &colVal ); if( type==COLUMN ) { NodeX = New_Column( (int)colVal.lng ); } else { fferror("Could not build X column for REGFILTER"); return(-1); } } if( NodeY==-99 ) { type = ffGetVariable( "Y", &colVal ); if( type==COLUMN ) { NodeY = New_Column( (int)colVal.lng ); } else { fferror("Could not build Y column for REGFILTER"); return(-1); } } NodeX = New_Unary( DOUBLE, 0, NodeX ); NodeY = New_Unary( DOUBLE, 0, NodeY ); Node0 = Alloc_Node(); /* This will hold the Region Data */ if( NodeX<0 || NodeY<0 || Node0<0 ) return(-1); if( ! (Test_Dims( NodeX, NodeY ) ) ) { fferror("Dimensions of REGFILTER arguments are not compatible"); return (-1); } n = Alloc_Node(); if( n >= 0 ) { this = gParse.Nodes + n; this->nSubNodes = 3; this->SubNodes[0] = Node0; this->SubNodes[1] = NodeX; this->SubNodes[2] = NodeY; this->operation = (int)regfilt_fct; this->DoOp = Do_REG; this->type = BOOLEAN; this->value.nelem = 1; this->value.naxis = 1; this->value.naxes[0] = 1; Copy_Dims(n, NodeX); if( SIZE(NodeX)operation = CONST_OP; that0->DoOp = NULL; /* Identify what columns to use for WCS information */ Xcol = Ycol = 0; if( *colNames ) { /* Use the column names in this string for WCS info */ while( *colNames==' ' ) colNames++; cX = cY = colNames; while( *cY && *cY!=' ' && *cY!=',' ) cY++; if( *cY ) *(cY++) = '\0'; while( *cY==' ' ) cY++; if( !*cY ) { fferror("Could not extract valid pair of column names from REGFILTER"); Free_Last_Node(); return( -1 ); } fits_get_colnum( gParse.def_fptr, CASEINSEN, cX, &Xcol, &gParse.status ); fits_get_colnum( gParse.def_fptr, CASEINSEN, cY, &Ycol, &gParse.status ); if( gParse.status ) { fferror("Could not locate columns indicated for WCS info"); Free_Last_Node(); return( -1 ); } } else { /* Try to find columns used in X/Y expressions */ Xcol = Locate_Col( gParse.Nodes + NodeX ); Ycol = Locate_Col( gParse.Nodes + NodeY ); if( Xcol<0 || Ycol<0 ) { fferror("Found multiple X/Y column references in REGFILTER"); Free_Last_Node(); return( -1 ); } } /* Now, get the WCS info, if it exists, from the indicated columns */ wcs.exists = 0; if( Xcol>0 && Ycol>0 ) { tstat = 0; ffgtcs( gParse.def_fptr, Xcol, Ycol, &wcs.xrefval, &wcs.yrefval, &wcs.xrefpix, &wcs.yrefpix, &wcs.xinc, &wcs.yinc, &wcs.rot, wcs.type, &tstat ); if( tstat==NO_WCS_KEY ) { wcs.exists = 0; } else if( tstat ) { gParse.status = tstat; Free_Last_Node(); return( -1 ); } else { wcs.exists = 1; } } /* Read in Region file */ fits_read_rgnfile( fname, &wcs, &Rgn, &gParse.status ); if( gParse.status ) { Free_Last_Node(); return( -1 ); } that0->value.data.ptr = Rgn; if( OPER(NodeX)==CONST_OP && OPER(NodeY)==CONST_OP ) this->DoOp( this ); } return( n ); } static int New_Vector( int subNode ) { Node *this, *that; int n; n = Alloc_Node(); if( n >= 0 ) { this = gParse.Nodes + n; that = gParse.Nodes + subNode; this->type = that->type; this->nSubNodes = 1; this->SubNodes[0] = subNode; this->operation = '{'; this->DoOp = Do_Vector; } return( n ); } static int Close_Vec( int vecNode ) { Node *this; int n, nelem=0; this = gParse.Nodes + vecNode; for( n=0; n < this->nSubNodes; n++ ) { if( TYPE( this->SubNodes[n] ) != this->type ) { this->SubNodes[n] = New_Unary( this->type, 0, this->SubNodes[n] ); if( this->SubNodes[n]<0 ) return(-1); } nelem += SIZE(this->SubNodes[n]); } this->value.naxis = 1; this->value.nelem = nelem; this->value.naxes[0] = nelem; return( vecNode ); } static int Locate_Col( Node *this ) /* Locate the TABLE column number of any columns in "this" calculation. */ /* Return ZERO if none found, or negative if more than 1 found. */ { Node *that; int i, col=0, newCol, nfound=0; if( this->nSubNodes==0 && this->operation<=0 && this->operation!=CONST_OP ) return gParse.colData[ - this->operation].colnum; for( i=0; inSubNodes; i++ ) { that = gParse.Nodes + this->SubNodes[i]; if( that->operation>0 ) { newCol = Locate_Col( that ); if( newCol<=0 ) { nfound += -newCol; } else { if( !nfound ) { col = newCol; nfound++; } else if( col != newCol ) { nfound++; } } } else if( that->operation!=CONST_OP ) { /* Found a Column */ newCol = gParse.colData[- that->operation].colnum; if( !nfound ) { col = newCol; nfound++; } else if( col != newCol ) { nfound++; } } } if( nfound!=1 ) return( - nfound ); else return( col ); } static int Test_Dims( int Node1, int Node2 ) { Node *that1, *that2; int valid, i; if( Node1<0 || Node2<0 ) return(0); that1 = gParse.Nodes + Node1; that2 = gParse.Nodes + Node2; if( that1->value.nelem==1 || that2->value.nelem==1 ) valid = 1; else if( that1->type==that2->type && that1->value.nelem==that2->value.nelem && that1->value.naxis==that2->value.naxis ) { valid = 1; for( i=0; ivalue.naxis; i++ ) { if( that1->value.naxes[i]!=that2->value.naxes[i] ) valid = 0; } } else valid = 0; return( valid ); } static void Copy_Dims( int Node1, int Node2 ) { Node *that1, *that2; int i; if( Node1<0 || Node2<0 ) return; that1 = gParse.Nodes + Node1; that2 = gParse.Nodes + Node2; that1->value.nelem = that2->value.nelem; that1->value.naxis = that2->value.naxis; for( i=0; ivalue.naxis; i++ ) that1->value.naxes[i] = that2->value.naxes[i]; } /********************************************************************/ /* Routines for actually evaluating the expression start here */ /********************************************************************/ void Evaluate_Parser( long firstRow, long nRows ) /***********************************************************************/ /* Reset the parser for processing another batch of data... */ /* firstRow: Row number of the first element to evaluate */ /* nRows: Number of rows to be processed */ /* Initialize each COLUMN node so that its UNDEF and DATA pointers */ /* point to the appropriate column arrays. */ /* Finally, call Evaluate_Node for final node. */ /***********************************************************************/ { int i, column; long offset, rowOffset; gParse.firstRow = firstRow; gParse.nRows = nRows; /* Reset Column Nodes' pointers to point to right data and UNDEF arrays */ rowOffset = firstRow - gParse.firstDataRow; for( i=0; i 0 || OPER(i) == CONST_OP ) continue; column = -OPER(i); offset = gParse.varData[column].nelem * rowOffset; gParse.Nodes[i].value.undef = gParse.varData[column].undef + offset; switch( gParse.Nodes[i].type ) { case BITSTR: gParse.Nodes[i].value.data.strptr = (char**)gParse.varData[column].data + rowOffset; gParse.Nodes[i].value.undef = NULL; break; case STRING: gParse.Nodes[i].value.data.strptr = (char**)gParse.varData[column].data + rowOffset; gParse.Nodes[i].value.undef = gParse.varData[column].undef + rowOffset; break; case BOOLEAN: gParse.Nodes[i].value.data.logptr = (char*)gParse.varData[column].data + offset; break; case LONG: gParse.Nodes[i].value.data.lngptr = (long*)gParse.varData[column].data + offset; break; case DOUBLE: gParse.Nodes[i].value.data.dblptr = (double*)gParse.varData[column].data + offset; break; } } Evaluate_Node( gParse.resultNode ); } static void Evaluate_Node( int thisNode ) /**********************************************************************/ /* Recursively evaluate thisNode's subNodes, then call one of the */ /* Do_ functions pointed to by thisNode's DoOp element. */ /**********************************************************************/ { Node *this; int i; if( gParse.status ) return; this = gParse.Nodes + thisNode; if( this->operation>0 ) { /* <=0 indicate constants and columns */ i = this->nSubNodes; while( i-- ) { Evaluate_Node( this->SubNodes[i] ); if( gParse.status ) return; } this->DoOp( this ); } } static void Allocate_Ptrs( Node *this ) { long elem, row, size; if( this->type==BITSTR || this->type==STRING ) { this->value.data.strptr = (char**)malloc( gParse.nRows * sizeof(char*) ); if( this->value.data.strptr ) { this->value.data.strptr[0] = (char*)malloc( gParse.nRows * (this->value.nelem+2) * sizeof(char) ); if( this->value.data.strptr[0] ) { row = 0; while( (++row)value.data.strptr[row] = this->value.data.strptr[row-1] + this->value.nelem+1; } if( this->type==STRING ) { this->value.undef = this->value.data.strptr[row-1] + this->value.nelem+1; } else { this->value.undef = NULL; /* BITSTRs don't use undef array */ } } else { gParse.status = MEMORY_ALLOCATION; free( this->value.data.strptr ); } } else { gParse.status = MEMORY_ALLOCATION; } } else { elem = this->value.nelem * gParse.nRows; switch( this->type ) { case DOUBLE: size = sizeof( double ); break; case LONG: size = sizeof( long ); break; case BOOLEAN: size = sizeof( char ); break; default: size = 1; break; } this->value.data.ptr = calloc(size+1, elem); if( this->value.data.ptr==NULL ) { gParse.status = MEMORY_ALLOCATION; } else { this->value.undef = (char *)this->value.data.ptr + elem*size; } } } static void Do_Unary( Node *this ) { Node *that; long elem; that = gParse.Nodes + this->SubNodes[0]; if( that->operation==CONST_OP ) { /* Operating on a constant! */ switch( this->operation ) { case DOUBLE: case FLTCAST: if( that->type==LONG ) this->value.data.dbl = (double)that->value.data.lng; else if( that->type==BOOLEAN ) this->value.data.dbl = ( that->value.data.log ? 1.0 : 0.0 ); break; case LONG: case INTCAST: if( that->type==DOUBLE ) this->value.data.lng = (long)that->value.data.dbl; else if( that->type==BOOLEAN ) this->value.data.lng = ( that->value.data.log ? 1L : 0L ); break; case BOOLEAN: if( that->type==DOUBLE ) this->value.data.log = ( that->value.data.dbl != 0.0 ); else if( that->type==LONG ) this->value.data.log = ( that->value.data.lng != 0L ); break; case UMINUS: if( that->type==DOUBLE ) this->value.data.dbl = - that->value.data.dbl; else if( that->type==LONG ) this->value.data.lng = - that->value.data.lng; break; case NOT: if( that->type==BOOLEAN ) this->value.data.log = ( ! that->value.data.log ); else if( that->type==BITSTR ) bitnot( this->value.data.str, that->value.data.str ); break; } this->operation = CONST_OP; } else { Allocate_Ptrs( this ); if( !gParse.status ) { if( this->type!=BITSTR ) { elem = gParse.nRows; if( this->type!=STRING ) elem *= this->value.nelem; while( elem-- ) this->value.undef[elem] = that->value.undef[elem]; } elem = gParse.nRows * this->value.nelem; switch( this->operation ) { case BOOLEAN: if( that->type==DOUBLE ) while( elem-- ) this->value.data.logptr[elem] = ( that->value.data.dblptr[elem] != 0.0 ); else if( that->type==LONG ) while( elem-- ) this->value.data.logptr[elem] = ( that->value.data.lngptr[elem] != 0L ); break; case DOUBLE: case FLTCAST: if( that->type==LONG ) while( elem-- ) this->value.data.dblptr[elem] = (double)that->value.data.lngptr[elem]; else if( that->type==BOOLEAN ) while( elem-- ) this->value.data.dblptr[elem] = ( that->value.data.logptr[elem] ? 1.0 : 0.0 ); break; case LONG: case INTCAST: if( that->type==DOUBLE ) while( elem-- ) this->value.data.lngptr[elem] = (long)that->value.data.dblptr[elem]; else if( that->type==BOOLEAN ) while( elem-- ) this->value.data.lngptr[elem] = ( that->value.data.logptr[elem] ? 1L : 0L ); break; case UMINUS: if( that->type==DOUBLE ) { while( elem-- ) this->value.data.dblptr[elem] = - that->value.data.dblptr[elem]; } else if( that->type==LONG ) { while( elem-- ) this->value.data.lngptr[elem] = - that->value.data.lngptr[elem]; } break; case NOT: if( that->type==BOOLEAN ) { while( elem-- ) this->value.data.logptr[elem] = ( ! that->value.data.logptr[elem] ); } else if( that->type==BITSTR ) { elem = gParse.nRows; while( elem-- ) bitnot( this->value.data.strptr[elem], that->value.data.strptr[elem] ); } break; } } } if( that->operation>0 ) { free( that->value.data.ptr ); } } static void Do_Offset( Node *this ) { Node *col; long fRow, nRowOverlap, nRowReload, rowOffset; long nelem, elem, offset, nRealElem; int status; col = gParse.Nodes + this->SubNodes[0]; rowOffset = gParse.Nodes[ this->SubNodes[1] ].value.data.lng; Allocate_Ptrs( this ); fRow = gParse.firstRow + rowOffset; if( this->type==STRING || this->type==BITSTR ) nRealElem = 1; else nRealElem = this->value.nelem; nelem = nRealElem; if( fRow < gParse.firstDataRow ) { /* Must fill in data at start of array */ nRowReload = gParse.firstDataRow - fRow; if( nRowReload > gParse.nRows ) nRowReload = gParse.nRows; nRowOverlap = gParse.nRows - nRowReload; offset = 0; /* NULLify any values falling out of bounds */ while( fRow<1 && nRowReload>0 ) { if( this->type == BITSTR ) { nelem = this->value.nelem; this->value.data.strptr[offset][ nelem ] = '\0'; while( nelem-- ) this->value.data.strptr[offset][nelem] = '0'; offset++; } else { while( nelem-- ) this->value.undef[offset++] = 1; } nelem = nRealElem; fRow++; nRowReload--; } } else if( fRow + gParse.nRows > gParse.firstDataRow + gParse.nDataRows ) { /* Must fill in data at end of array */ nRowReload = (fRow+gParse.nRows) - (gParse.firstDataRow+gParse.nDataRows); if( nRowReload>gParse.nRows ) { nRowReload = gParse.nRows; } else { fRow = gParse.firstDataRow + gParse.nDataRows; } nRowOverlap = gParse.nRows - nRowReload; offset = nRowOverlap * nelem; /* NULLify any values falling out of bounds */ elem = gParse.nRows * nelem; while( fRow+nRowReload>gParse.totalRows && nRowReload>0 ) { if( this->type == BITSTR ) { nelem = this->value.nelem; elem--; this->value.data.strptr[elem][ nelem ] = '\0'; while( nelem-- ) this->value.data.strptr[elem][nelem] = '0'; } else { while( nelem-- ) this->value.undef[--elem] = 1; } nelem = nRealElem; nRowReload--; } } else { nRowReload = 0; nRowOverlap = gParse.nRows; offset = 0; } if( nRowReload>0 ) { switch( this->type ) { case BITSTR: case STRING: status = (*gParse.loadData)( -col->operation, fRow, nRowReload, this->value.data.strptr+offset, this->value.undef+offset ); break; case BOOLEAN: status = (*gParse.loadData)( -col->operation, fRow, nRowReload, this->value.data.logptr+offset, this->value.undef+offset ); break; case LONG: status = (*gParse.loadData)( -col->operation, fRow, nRowReload, this->value.data.lngptr+offset, this->value.undef+offset ); break; case DOUBLE: status = (*gParse.loadData)( -col->operation, fRow, nRowReload, this->value.data.dblptr+offset, this->value.undef+offset ); break; } } /* Now copy over the overlapping region, if any */ if( nRowOverlap <= 0 ) return; if( rowOffset>0 ) elem = nRowOverlap * nelem; else elem = gParse.nRows * nelem; offset = nelem * rowOffset; while( nRowOverlap-- && !gParse.status ) { while( nelem-- && !gParse.status ) { elem--; if( this->type != BITSTR ) this->value.undef[elem] = col->value.undef[elem+offset]; switch( this->type ) { case BITSTR: strcpy( this->value.data.strptr[elem ], col->value.data.strptr[elem+offset] ); break; case STRING: strcpy( this->value.data.strptr[elem ], col->value.data.strptr[elem+offset] ); break; case BOOLEAN: this->value.data.logptr[elem] = col->value.data.logptr[elem+offset]; break; case LONG: this->value.data.lngptr[elem] = col->value.data.lngptr[elem+offset]; break; case DOUBLE: this->value.data.dblptr[elem] = col->value.data.dblptr[elem+offset]; break; } } nelem = nRealElem; } } static void Do_BinOp_bit( Node *this ) { Node *that1, *that2; char *sptr1=NULL, *sptr2=NULL; int const1, const2; long rows; that1 = gParse.Nodes + this->SubNodes[0]; that2 = gParse.Nodes + this->SubNodes[1]; const1 = ( that1->operation==CONST_OP ); const2 = ( that2->operation==CONST_OP ); sptr1 = ( const1 ? that1->value.data.str : NULL ); sptr2 = ( const2 ? that2->value.data.str : NULL ); if( const1 && const2 ) { switch( this->operation ) { case NE: this->value.data.log = !bitcmp( sptr1, sptr2 ); break; case EQ: this->value.data.log = bitcmp( sptr1, sptr2 ); break; case GT: case LT: case LTE: case GTE: this->value.data.log = bitlgte( sptr1, this->operation, sptr2 ); break; case '|': bitor( this->value.data.str, sptr1, sptr2 ); break; case '&': bitand( this->value.data.str, sptr1, sptr2 ); break; case '+': strcpy( this->value.data.str, sptr1 ); strcat( this->value.data.str, sptr2 ); break; case ACCUM: this->value.data.lng = 0; while( *sptr1 ) { if ( *sptr1 == '1' ) this->value.data.lng ++; sptr1 ++; } break; } this->operation = CONST_OP; } else { Allocate_Ptrs( this ); if( !gParse.status ) { rows = gParse.nRows; switch( this->operation ) { /* BITSTR comparisons */ case NE: case EQ: case GT: case LT: case LTE: case GTE: while( rows-- ) { if( !const1 ) sptr1 = that1->value.data.strptr[rows]; if( !const2 ) sptr2 = that2->value.data.strptr[rows]; switch( this->operation ) { case NE: this->value.data.logptr[rows] = !bitcmp( sptr1, sptr2 ); break; case EQ: this->value.data.logptr[rows] = bitcmp( sptr1, sptr2 ); break; case GT: case LT: case LTE: case GTE: this->value.data.logptr[rows] = bitlgte( sptr1, this->operation, sptr2 ); break; } this->value.undef[rows] = 0; } break; /* BITSTR AND/ORs ... no UNDEFS in or out */ case '|': case '&': case '+': while( rows-- ) { if( !const1 ) sptr1 = that1->value.data.strptr[rows]; if( !const2 ) sptr2 = that2->value.data.strptr[rows]; if( this->operation=='|' ) bitor( this->value.data.strptr[rows], sptr1, sptr2 ); else if( this->operation=='&' ) bitand( this->value.data.strptr[rows], sptr1, sptr2 ); else { strcpy( this->value.data.strptr[rows], sptr1 ); strcat( this->value.data.strptr[rows], sptr2 ); } } break; /* Accumulate 1 bits */ case ACCUM: { long i, previous, curr; previous = that2->value.data.lng; /* Cumulative sum of this chunk */ for (i=0; ivalue.data.strptr[i]; for (curr = 0; *sptr1; sptr1 ++) { if ( *sptr1 == '1' ) curr ++; } previous += curr; this->value.data.lngptr[i] = previous; this->value.undef[i] = 0; } /* Store final cumulant for next pass */ that2->value.data.lng = previous; } } } } if( that1->operation>0 ) { free( that1->value.data.strptr[0] ); free( that1->value.data.strptr ); } if( that2->operation>0 ) { free( that2->value.data.strptr[0] ); free( that2->value.data.strptr ); } } static void Do_BinOp_str( Node *this ) { Node *that1, *that2; char *sptr1, *sptr2, null1=0, null2=0; int const1, const2, val; long rows; that1 = gParse.Nodes + this->SubNodes[0]; that2 = gParse.Nodes + this->SubNodes[1]; const1 = ( that1->operation==CONST_OP ); const2 = ( that2->operation==CONST_OP ); sptr1 = ( const1 ? that1->value.data.str : NULL ); sptr2 = ( const2 ? that2->value.data.str : NULL ); if( const1 && const2 ) { /* Result is a constant */ switch( this->operation ) { /* Compare Strings */ case NE: case EQ: val = ( FSTRCMP( sptr1, sptr2 ) == 0 ); this->value.data.log = ( this->operation==EQ ? val : !val ); break; case GT: this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) > 0 ); break; case LT: this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) < 0 ); break; case GTE: this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) >= 0 ); break; case LTE: this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) <= 0 ); break; /* Concat Strings */ case '+': strcpy( this->value.data.str, sptr1 ); strcat( this->value.data.str, sptr2 ); break; } this->operation = CONST_OP; } else { /* Not a constant */ Allocate_Ptrs( this ); if( !gParse.status ) { rows = gParse.nRows; switch( this->operation ) { /* Compare Strings */ case NE: case EQ: while( rows-- ) { if( !const1 ) null1 = that1->value.undef[rows]; if( !const2 ) null2 = that2->value.undef[rows]; this->value.undef[rows] = (null1 || null2); if( ! this->value.undef[rows] ) { if( !const1 ) sptr1 = that1->value.data.strptr[rows]; if( !const2 ) sptr2 = that2->value.data.strptr[rows]; val = ( FSTRCMP( sptr1, sptr2 ) == 0 ); this->value.data.logptr[rows] = ( this->operation==EQ ? val : !val ); } } break; case GT: case LT: while( rows-- ) { if( !const1 ) null1 = that1->value.undef[rows]; if( !const2 ) null2 = that2->value.undef[rows]; this->value.undef[rows] = (null1 || null2); if( ! this->value.undef[rows] ) { if( !const1 ) sptr1 = that1->value.data.strptr[rows]; if( !const2 ) sptr2 = that2->value.data.strptr[rows]; val = ( FSTRCMP( sptr1, sptr2 ) ); this->value.data.logptr[rows] = ( this->operation==GT ? val>0 : val<0 ); } } break; case GTE: case LTE: while( rows-- ) { if( !const1 ) null1 = that1->value.undef[rows]; if( !const2 ) null2 = that2->value.undef[rows]; this->value.undef[rows] = (null1 || null2); if( ! this->value.undef[rows] ) { if( !const1 ) sptr1 = that1->value.data.strptr[rows]; if( !const2 ) sptr2 = that2->value.data.strptr[rows]; val = ( FSTRCMP( sptr1, sptr2 ) ); this->value.data.logptr[rows] = ( this->operation==GTE ? val>=0 : val<=0 ); } } break; /* Concat Strings */ case '+': while( rows-- ) { if( !const1 ) null1 = that1->value.undef[rows]; if( !const2 ) null2 = that2->value.undef[rows]; this->value.undef[rows] = (null1 || null2); if( ! this->value.undef[rows] ) { if( !const1 ) sptr1 = that1->value.data.strptr[rows]; if( !const2 ) sptr2 = that2->value.data.strptr[rows]; strcpy( this->value.data.strptr[rows], sptr1 ); strcat( this->value.data.strptr[rows], sptr2 ); } } break; } } } if( that1->operation>0 ) { free( that1->value.data.strptr[0] ); free( that1->value.data.strptr ); } if( that2->operation>0 ) { free( that2->value.data.strptr[0] ); free( that2->value.data.strptr ); } } static void Do_BinOp_log( Node *this ) { Node *that1, *that2; int vector1, vector2; char val1=0, val2=0, null1=0, null2=0; long rows, nelem, elem; that1 = gParse.Nodes + this->SubNodes[0]; that2 = gParse.Nodes + this->SubNodes[1]; vector1 = ( that1->operation!=CONST_OP ); if( vector1 ) vector1 = that1->value.nelem; else { val1 = that1->value.data.log; } vector2 = ( that2->operation!=CONST_OP ); if( vector2 ) vector2 = that2->value.nelem; else { val2 = that2->value.data.log; } if( !vector1 && !vector2 ) { /* Result is a constant */ switch( this->operation ) { case OR: this->value.data.log = (val1 || val2); break; case AND: this->value.data.log = (val1 && val2); break; case EQ: this->value.data.log = ( (val1 && val2) || (!val1 && !val2) ); break; case NE: this->value.data.log = ( (val1 && !val2) || (!val1 && val2) ); break; case ACCUM: this->value.data.lng = val1; break; } this->operation=CONST_OP; } else if (this->operation == ACCUM) { long i, previous, curr; rows = gParse.nRows; nelem = this->value.nelem; elem = this->value.nelem * rows; Allocate_Ptrs( this ); if( !gParse.status ) { previous = that2->value.data.lng; /* Cumulative sum of this chunk */ for (i=0; ivalue.undef[i]) { curr = that1->value.data.logptr[i]; previous += curr; } this->value.data.lngptr[i] = previous; this->value.undef[i] = 0; } /* Store final cumulant for next pass */ that2->value.data.lng = previous; } } else { rows = gParse.nRows; nelem = this->value.nelem; elem = this->value.nelem * rows; Allocate_Ptrs( this ); if( !gParse.status ) { if (this->operation == ACCUM) { long i, previous, curr; previous = that2->value.data.lng; /* Cumulative sum of this chunk */ for (i=0; ivalue.undef[i]) { curr = that1->value.data.logptr[i]; previous += curr; } this->value.data.lngptr[i] = previous; this->value.undef[i] = 0; } /* Store final cumulant for next pass */ that2->value.data.lng = previous; } while( rows-- ) { while( nelem-- ) { elem--; if( vector1>1 ) { val1 = that1->value.data.logptr[elem]; null1 = that1->value.undef[elem]; } else if( vector1 ) { val1 = that1->value.data.logptr[rows]; null1 = that1->value.undef[rows]; } if( vector2>1 ) { val2 = that2->value.data.logptr[elem]; null2 = that2->value.undef[elem]; } else if( vector2 ) { val2 = that2->value.data.logptr[rows]; null2 = that2->value.undef[rows]; } this->value.undef[elem] = (null1 || null2); switch( this->operation ) { case OR: /* This is more complicated than others to suppress UNDEFs */ /* in those cases where the other argument is DEF && TRUE */ if( !null1 && !null2 ) { this->value.data.logptr[elem] = (val1 || val2); } else if( (null1 && !null2 && val2) || ( !null1 && null2 && val1 ) ) { this->value.data.logptr[elem] = 1; this->value.undef[elem] = 0; } break; case AND: /* This is more complicated than others to suppress UNDEFs */ /* in those cases where the other argument is DEF && FALSE */ if( !null1 && !null2 ) { this->value.data.logptr[elem] = (val1 && val2); } else if( (null1 && !null2 && !val2) || ( !null1 && null2 && !val1 ) ) { this->value.data.logptr[elem] = 0; this->value.undef[elem] = 0; } break; case EQ: this->value.data.logptr[elem] = ( (val1 && val2) || (!val1 && !val2) ); break; case NE: this->value.data.logptr[elem] = ( (val1 && !val2) || (!val1 && val2) ); break; } } nelem = this->value.nelem; } } } if( that1->operation>0 ) { free( that1->value.data.ptr ); } if( that2->operation>0 ) { free( that2->value.data.ptr ); } } static void Do_BinOp_lng( Node *this ) { Node *that1, *that2; int vector1, vector2; long val1=0, val2=0; char null1=0, null2=0; long rows, nelem, elem; that1 = gParse.Nodes + this->SubNodes[0]; that2 = gParse.Nodes + this->SubNodes[1]; vector1 = ( that1->operation!=CONST_OP ); if( vector1 ) vector1 = that1->value.nelem; else { val1 = that1->value.data.lng; } vector2 = ( that2->operation!=CONST_OP ); if( vector2 ) vector2 = that2->value.nelem; else { val2 = that2->value.data.lng; } if( !vector1 && !vector2 ) { /* Result is a constant */ switch( this->operation ) { case '~': /* Treat as == for LONGS */ case EQ: this->value.data.log = (val1 == val2); break; case NE: this->value.data.log = (val1 != val2); break; case GT: this->value.data.log = (val1 > val2); break; case LT: this->value.data.log = (val1 < val2); break; case LTE: this->value.data.log = (val1 <= val2); break; case GTE: this->value.data.log = (val1 >= val2); break; case '+': this->value.data.lng = (val1 + val2); break; case '-': this->value.data.lng = (val1 - val2); break; case '*': this->value.data.lng = (val1 * val2); break; case '%': if( val2 ) this->value.data.lng = (val1 % val2); else fferror("Divide by Zero"); break; case '/': if( val2 ) this->value.data.lng = (val1 / val2); else fferror("Divide by Zero"); break; case POWER: this->value.data.lng = (long)pow((double)val1,(double)val2); break; case ACCUM: this->value.data.lng = val1; break; case DIFF: this->value.data.lng = 0; break; } this->operation=CONST_OP; } else if ((this->operation == ACCUM) || (this->operation == DIFF)) { long i, previous, curr; long undef; rows = gParse.nRows; nelem = this->value.nelem; elem = this->value.nelem * rows; Allocate_Ptrs( this ); if( !gParse.status ) { previous = that2->value.data.lng; undef = (long) that2->value.undef; if (this->operation == ACCUM) { /* Cumulative sum of this chunk */ for (i=0; ivalue.undef[i]) { curr = that1->value.data.lngptr[i]; previous += curr; } this->value.data.lngptr[i] = previous; this->value.undef[i] = 0; } } else { /* Sequential difference for this chunk */ for (i=0; ivalue.data.lngptr[i]; if (that1->value.undef[i] || undef) { /* Either this, or previous, value was undefined */ this->value.data.lngptr[i] = 0; this->value.undef[i] = 1; } else { /* Both defined, we are okay! */ this->value.data.lngptr[i] = curr - previous; this->value.undef[i] = 0; } previous = curr; undef = that1->value.undef[i]; } } /* Store final cumulant for next pass */ that2->value.data.lng = previous; that2->value.undef = (char *) undef; /* XXX evil, but no harm here */ } } else { rows = gParse.nRows; nelem = this->value.nelem; elem = this->value.nelem * rows; Allocate_Ptrs( this ); while( rows-- && !gParse.status ) { while( nelem-- && !gParse.status ) { elem--; if( vector1>1 ) { val1 = that1->value.data.lngptr[elem]; null1 = that1->value.undef[elem]; } else if( vector1 ) { val1 = that1->value.data.lngptr[rows]; null1 = that1->value.undef[rows]; } if( vector2>1 ) { val2 = that2->value.data.lngptr[elem]; null2 = that2->value.undef[elem]; } else if( vector2 ) { val2 = that2->value.data.lngptr[rows]; null2 = that2->value.undef[rows]; } this->value.undef[elem] = (null1 || null2); switch( this->operation ) { case '~': /* Treat as == for LONGS */ case EQ: this->value.data.logptr[elem] = (val1 == val2); break; case NE: this->value.data.logptr[elem] = (val1 != val2); break; case GT: this->value.data.logptr[elem] = (val1 > val2); break; case LT: this->value.data.logptr[elem] = (val1 < val2); break; case LTE: this->value.data.logptr[elem] = (val1 <= val2); break; case GTE: this->value.data.logptr[elem] = (val1 >= val2); break; case '+': this->value.data.lngptr[elem] = (val1 + val2); break; case '-': this->value.data.lngptr[elem] = (val1 - val2); break; case '*': this->value.data.lngptr[elem] = (val1 * val2); break; case '%': if( val2 ) this->value.data.lngptr[elem] = (val1 % val2); else { this->value.data.lngptr[elem] = 0; this->value.undef[elem] = 1; } break; case '/': if( val2 ) this->value.data.lngptr[elem] = (val1 / val2); else { this->value.data.lngptr[elem] = 0; this->value.undef[elem] = 1; } break; case POWER: this->value.data.lngptr[elem] = (long)pow((double)val1,(double)val2); break; } } nelem = this->value.nelem; } } if( that1->operation>0 ) { free( that1->value.data.ptr ); } if( that2->operation>0 ) { free( that2->value.data.ptr ); } } static void Do_BinOp_dbl( Node *this ) { Node *that1, *that2; int vector1, vector2; double val1=0.0, val2=0.0; char null1=0, null2=0; long rows, nelem, elem; that1 = gParse.Nodes + this->SubNodes[0]; that2 = gParse.Nodes + this->SubNodes[1]; vector1 = ( that1->operation!=CONST_OP ); if( vector1 ) vector1 = that1->value.nelem; else { val1 = that1->value.data.dbl; } vector2 = ( that2->operation!=CONST_OP ); if( vector2 ) vector2 = that2->value.nelem; else { val2 = that2->value.data.dbl; } if( !vector1 && !vector2 ) { /* Result is a constant */ switch( this->operation ) { case '~': this->value.data.log = ( fabs(val1-val2) < APPROX ); break; case EQ: this->value.data.log = (val1 == val2); break; case NE: this->value.data.log = (val1 != val2); break; case GT: this->value.data.log = (val1 > val2); break; case LT: this->value.data.log = (val1 < val2); break; case LTE: this->value.data.log = (val1 <= val2); break; case GTE: this->value.data.log = (val1 >= val2); break; case '+': this->value.data.dbl = (val1 + val2); break; case '-': this->value.data.dbl = (val1 - val2); break; case '*': this->value.data.dbl = (val1 * val2); break; case '%': if( val2 ) this->value.data.dbl = val1 - val2*((int)(val1/val2)); else fferror("Divide by Zero"); break; case '/': if( val2 ) this->value.data.dbl = (val1 / val2); else fferror("Divide by Zero"); break; case POWER: this->value.data.dbl = (double)pow(val1,val2); break; case ACCUM: this->value.data.dbl = val1; break; case DIFF: this->value.data.dbl = 0; break; } this->operation=CONST_OP; } else if ((this->operation == ACCUM) || (this->operation == DIFF)) { long i; long undef; double previous, curr; rows = gParse.nRows; nelem = this->value.nelem; elem = this->value.nelem * rows; Allocate_Ptrs( this ); if( !gParse.status ) { previous = that2->value.data.dbl; undef = (long) that2->value.undef; if (this->operation == ACCUM) { /* Cumulative sum of this chunk */ for (i=0; ivalue.undef[i]) { curr = that1->value.data.dblptr[i]; previous += curr; } this->value.data.dblptr[i] = previous; this->value.undef[i] = 0; } } else { /* Sequential difference for this chunk */ for (i=0; ivalue.data.dblptr[i]; if (that1->value.undef[i] || undef) { /* Either this, or previous, value was undefined */ this->value.data.dblptr[i] = 0; this->value.undef[i] = 1; } else { /* Both defined, we are okay! */ this->value.data.dblptr[i] = curr - previous; this->value.undef[i] = 0; } previous = curr; undef = that1->value.undef[i]; } } /* Store final cumulant for next pass */ that2->value.data.dbl = previous; that2->value.undef = (char *) undef; /* XXX evil, but no harm here */ } } else { rows = gParse.nRows; nelem = this->value.nelem; elem = this->value.nelem * rows; Allocate_Ptrs( this ); while( rows-- && !gParse.status ) { while( nelem-- && !gParse.status ) { elem--; if( vector1>1 ) { val1 = that1->value.data.dblptr[elem]; null1 = that1->value.undef[elem]; } else if( vector1 ) { val1 = that1->value.data.dblptr[rows]; null1 = that1->value.undef[rows]; } if( vector2>1 ) { val2 = that2->value.data.dblptr[elem]; null2 = that2->value.undef[elem]; } else if( vector2 ) { val2 = that2->value.data.dblptr[rows]; null2 = that2->value.undef[rows]; } this->value.undef[elem] = (null1 || null2); switch( this->operation ) { case '~': this->value.data.logptr[elem] = ( fabs(val1-val2) < APPROX ); break; case EQ: this->value.data.logptr[elem] = (val1 == val2); break; case NE: this->value.data.logptr[elem] = (val1 != val2); break; case GT: this->value.data.logptr[elem] = (val1 > val2); break; case LT: this->value.data.logptr[elem] = (val1 < val2); break; case LTE: this->value.data.logptr[elem] = (val1 <= val2); break; case GTE: this->value.data.logptr[elem] = (val1 >= val2); break; case '+': this->value.data.dblptr[elem] = (val1 + val2); break; case '-': this->value.data.dblptr[elem] = (val1 - val2); break; case '*': this->value.data.dblptr[elem] = (val1 * val2); break; case '%': if( val2 ) this->value.data.dblptr[elem] = val1 - val2*((int)(val1/val2)); else { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } break; case '/': if( val2 ) this->value.data.dblptr[elem] = (val1 / val2); else { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } break; case POWER: this->value.data.dblptr[elem] = (double)pow(val1,val2); break; } } nelem = this->value.nelem; } } if( that1->operation>0 ) { free( that1->value.data.ptr ); } if( that2->operation>0 ) { free( that2->value.data.ptr ); } } /* * This Quickselect routine is based on the algorithm described in * "Numerical recipes in C", Second Edition, * Cambridge University Press, 1992, Section 8.5, ISBN 0-521-43108-5 * This code by Nicolas Devillard - 1998. Public domain. * http://ndevilla.free.fr/median/median/src/quickselect.c */ #define ELEM_SWAP(a,b) { register long t=(a);(a)=(b);(b)=t; } /* * qselect_median_lng - select the median value of a long array * * This routine selects the median value of the long integer array * arr[]. If there are an even number of elements, the "lower median" * is selected. * * The array arr[] is scrambled, so users must operate on a scratch * array if they wish the values to be preserved. * * long arr[] - array of values * int n - number of elements in arr * * RETURNS: the lower median value of arr[] * */ long qselect_median_lng(long arr[], int n) { int low, high ; int median; int middle, ll, hh; low = 0 ; high = n-1 ; median = (low + high) / 2; for (;;) { if (high <= low) { /* One element only */ return arr[median]; } if (high == low + 1) { /* Two elements only */ if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; return arr[median]; } /* Find median of low, middle and high items; swap into position low */ middle = (low + high) / 2; if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; /* Swap low item (now in position middle) into position (low+1) */ ELEM_SWAP(arr[middle], arr[low+1]) ; /* Nibble from each end towards middle, swapping items when stuck */ ll = low + 1; hh = high; for (;;) { do ll++; while (arr[low] > arr[ll]) ; do hh--; while (arr[hh] > arr[low]) ; if (hh < ll) break; ELEM_SWAP(arr[ll], arr[hh]) ; } /* Swap middle item (in position low) back into correct position */ ELEM_SWAP(arr[low], arr[hh]) ; /* Re-set active partition */ if (hh <= median) low = ll; if (hh >= median) high = hh - 1; } } #undef ELEM_SWAP #define ELEM_SWAP(a,b) { register double t=(a);(a)=(b);(b)=t; } /* * qselect_median_dbl - select the median value of a double array * * This routine selects the median value of the double array * arr[]. If there are an even number of elements, the "lower median" * is selected. * * The array arr[] is scrambled, so users must operate on a scratch * array if they wish the values to be preserved. * * double arr[] - array of values * int n - number of elements in arr * * RETURNS: the lower median value of arr[] * */ double qselect_median_dbl(double arr[], int n) { int low, high ; int median; int middle, ll, hh; low = 0 ; high = n-1 ; median = (low + high) / 2; for (;;) { if (high <= low) { /* One element only */ return arr[median] ; } if (high == low + 1) { /* Two elements only */ if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; return arr[median] ; } /* Find median of low, middle and high items; swap into position low */ middle = (low + high) / 2; if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; /* Swap low item (now in position middle) into position (low+1) */ ELEM_SWAP(arr[middle], arr[low+1]) ; /* Nibble from each end towards middle, swapping items when stuck */ ll = low + 1; hh = high; for (;;) { do ll++; while (arr[low] > arr[ll]) ; do hh--; while (arr[hh] > arr[low]) ; if (hh < ll) break; ELEM_SWAP(arr[ll], arr[hh]) ; } /* Swap middle item (in position low) back into correct position */ ELEM_SWAP(arr[low], arr[hh]) ; /* Re-set active partition */ if (hh <= median) low = ll; if (hh >= median) high = hh - 1; } } #undef ELEM_SWAP /* * angsep_calc - compute angular separation between celestial coordinates * * This routine computes the angular separation between to coordinates * on the celestial sphere (i.e. RA and Dec). Note that all units are * in DEGREES, unlike the other trig functions in the calculator. * * double ra1, dec1 - RA and Dec of the first position in degrees * double ra2, dec2 - RA and Dec of the second position in degrees * * RETURNS: (double) angular separation in degrees * */ double angsep_calc(double ra1, double dec1, double ra2, double dec2) { double cd; static double deg = 0; double a, sdec, sra; if (deg == 0) deg = ((double)4)*atan((double)1)/((double)180); /* deg = 1.0; **** UNCOMMENT IF YOU WANT RADIANS */ /* This (commented out) algorithm uses the Low of Cosines, which becomes unstable for angles less than 0.1 arcsec. cd = sin(dec1*deg)*sin(dec2*deg) + cos(dec1*deg)*cos(dec2*deg)*cos((ra1-ra2)*deg); if (cd < (-1)) cd = -1; if (cd > (+1)) cd = +1; return acos(cd)/deg; */ /* The algorithm is the law of Haversines. This algorithm is stable even when the points are close together. The normal Law of Cosines fails for angles around 0.1 arcsec. */ sra = sin( (ra2 - ra1)*deg / 2 ); sdec = sin( (dec2 - dec1)*deg / 2); a = sdec*sdec + cos(dec1*deg)*cos(dec2*deg)*sra*sra; /* Sanity checking to avoid a range error in the sqrt()'s below */ if (a < 0) { a = 0; } if (a > 1) { a = 1; } return 2.0*atan2(sqrt(a), sqrt(1.0 - a)) / deg; } static double ran1() { static double dval = 0.0; double rndVal; if (dval == 0.0) { if( rand()<32768 && rand()<32768 ) dval = 32768.0; else dval = 2147483648.0; } rndVal = (double)rand(); while( rndVal > dval ) dval *= 2.0; return rndVal/dval; } /* Gaussian deviate routine from Numerical Recipes */ static double gasdev() { static int iset = 0; static double gset; double fac, rsq, v1, v2; if (iset == 0) { do { v1 = 2.0*ran1()-1.0; v2 = 2.0*ran1()-1.0; rsq = v1*v1 + v2*v2; } while (rsq >= 1.0 || rsq == 0.0); fac = sqrt(-2.0*log(rsq)/rsq); gset = v1*fac; iset = 1; return v2*fac; } else { iset = 0; return gset; } } /* lgamma function - from Numerical Recipes */ float gammaln(float xx) /* Returns the value ln Gamma[(xx)] for xx > 0. */ { /* Internal arithmetic will be done in double precision, a nicety that you can omit if five-figure accuracy is good enough. */ double x,y,tmp,ser; static double cof[6]={76.18009172947146,-86.50532032941677, 24.01409824083091,-1.231739572450155, 0.1208650973866179e-2,-0.5395239384953e-5}; int j; y=x=xx; tmp=x+5.5; tmp -= (x+0.5)*log(tmp); ser=1.000000000190015; for (j=0;j<=5;j++) ser += cof[j]/++y; return (float) -tmp+log(2.5066282746310005*ser/x); } /* Poisson deviate - derived from Numerical Recipes */ static long poidev(double xm) { static double sq, alxm, g, oldm = -1.0; static double pi = 0; double em, t, y; if (pi == 0) pi = ((double)4)*atan((double)1); if (xm < 20.0) { if (xm != oldm) { oldm = xm; g = exp(-xm); } em = -1; t = 1.0; do { em += 1; t *= ran1(); } while (t > g); } else { if (xm != oldm) { oldm = xm; sq = sqrt(2.0*xm); alxm = log(xm); g = xm*alxm-gammaln( (float) (xm+1.0)); } do { do { y = tan(pi*ran1()); em = sq*y+xm; } while (em < 0.0); em = floor(em); t = 0.9*(1.0+y*y)*exp(em*alxm-gammaln( (float) (em+1.0) )-g); } while (ran1() > t); } /* Return integer version */ return (long int) floor(em+0.5); } static void Do_Func( Node *this ) { Node *theParams[MAXSUBS]; int vector[MAXSUBS], allConst; lval pVals[MAXSUBS]; char pNull[MAXSUBS]; long ival; double dval; int i, valInit; long row, elem, nelem; i = this->nSubNodes; allConst = 1; while( i-- ) { theParams[i] = gParse.Nodes + this->SubNodes[i]; vector[i] = ( theParams[i]->operation!=CONST_OP ); if( vector[i] ) { allConst = 0; vector[i] = theParams[i]->value.nelem; } else { if( theParams[i]->type==DOUBLE ) { pVals[i].data.dbl = theParams[i]->value.data.dbl; } else if( theParams[i]->type==LONG ) { pVals[i].data.lng = theParams[i]->value.data.lng; } else if( theParams[i]->type==BOOLEAN ) { pVals[i].data.log = theParams[i]->value.data.log; } else strcpy(pVals[i].data.str, theParams[i]->value.data.str); pNull[i] = 0; } } if( this->nSubNodes==0 ) allConst = 0; /* These do produce scalars */ /* Random numbers are *never* constant !! */ if( this->operation == poirnd_fct ) allConst = 0; if( this->operation == gasrnd_fct ) allConst = 0; if( this->operation == rnd_fct ) allConst = 0; if( allConst ) { switch( this->operation ) { /* Non-Trig single-argument functions */ case sum_fct: if( theParams[0]->type==BOOLEAN ) this->value.data.lng = ( pVals[0].data.log ? 1 : 0 ); else if( theParams[0]->type==LONG ) this->value.data.lng = pVals[0].data.lng; else if( theParams[0]->type==DOUBLE ) this->value.data.dbl = pVals[0].data.dbl; else if( theParams[0]->type==BITSTR ) strcpy(this->value.data.str, pVals[0].data.str); break; case average_fct: if( theParams[0]->type==LONG ) this->value.data.dbl = pVals[0].data.lng; else if( theParams[0]->type==DOUBLE ) this->value.data.dbl = pVals[0].data.dbl; break; case stddev_fct: this->value.data.dbl = 0; /* Standard deviation of a constant = 0 */ break; case median_fct: if( theParams[0]->type==BOOLEAN ) this->value.data.lng = ( pVals[0].data.log ? 1 : 0 ); else if( theParams[0]->type==LONG ) this->value.data.lng = pVals[0].data.lng; else this->value.data.dbl = pVals[0].data.dbl; break; case poirnd_fct: if( theParams[0]->type==DOUBLE ) this->value.data.lng = poidev(pVals[0].data.dbl); else this->value.data.lng = poidev(pVals[0].data.lng); break; case abs_fct: if( theParams[0]->type==DOUBLE ) { dval = pVals[0].data.dbl; this->value.data.dbl = (dval>0.0 ? dval : -dval); } else { ival = pVals[0].data.lng; this->value.data.lng = (ival> 0 ? ival : -ival); } break; /* Special Null-Handling Functions */ case nonnull_fct: this->value.data.lng = 1; /* Constants are always 1-element and defined */ break; case isnull_fct: /* Constants are always defined */ this->value.data.log = 0; break; case defnull_fct: if( this->type==BOOLEAN ) this->value.data.log = pVals[0].data.log; else if( this->type==LONG ) this->value.data.lng = pVals[0].data.lng; else if( this->type==DOUBLE ) this->value.data.dbl = pVals[0].data.dbl; else if( this->type==STRING ) strcpy(this->value.data.str,pVals[0].data.str); break; /* Math functions with 1 double argument */ case sin_fct: this->value.data.dbl = sin( pVals[0].data.dbl ); break; case cos_fct: this->value.data.dbl = cos( pVals[0].data.dbl ); break; case tan_fct: this->value.data.dbl = tan( pVals[0].data.dbl ); break; case asin_fct: dval = pVals[0].data.dbl; if( dval<-1.0 || dval>1.0 ) fferror("Out of range argument to arcsin"); else this->value.data.dbl = asin( dval ); break; case acos_fct: dval = pVals[0].data.dbl; if( dval<-1.0 || dval>1.0 ) fferror("Out of range argument to arccos"); else this->value.data.dbl = acos( dval ); break; case atan_fct: this->value.data.dbl = atan( pVals[0].data.dbl ); break; case sinh_fct: this->value.data.dbl = sinh( pVals[0].data.dbl ); break; case cosh_fct: this->value.data.dbl = cosh( pVals[0].data.dbl ); break; case tanh_fct: this->value.data.dbl = tanh( pVals[0].data.dbl ); break; case exp_fct: this->value.data.dbl = exp( pVals[0].data.dbl ); break; case log_fct: dval = pVals[0].data.dbl; if( dval<=0.0 ) fferror("Out of range argument to log"); else this->value.data.dbl = log( dval ); break; case log10_fct: dval = pVals[0].data.dbl; if( dval<=0.0 ) fferror("Out of range argument to log10"); else this->value.data.dbl = log10( dval ); break; case sqrt_fct: dval = pVals[0].data.dbl; if( dval<0.0 ) fferror("Out of range argument to sqrt"); else this->value.data.dbl = sqrt( dval ); break; case ceil_fct: this->value.data.dbl = ceil( pVals[0].data.dbl ); break; case floor_fct: this->value.data.dbl = floor( pVals[0].data.dbl ); break; case round_fct: this->value.data.dbl = floor( pVals[0].data.dbl + 0.5 ); break; /* Two-argument Trig Functions */ case atan2_fct: this->value.data.dbl = atan2( pVals[0].data.dbl, pVals[1].data.dbl ); break; /* Four-argument ANGSEP function */ case angsep_fct: this->value.data.dbl = angsep_calc(pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl); /* Min/Max functions taking 1 or 2 arguments */ case min1_fct: /* No constant vectors! */ if( this->type == DOUBLE ) this->value.data.dbl = pVals[0].data.dbl; else if( this->type == LONG ) this->value.data.lng = pVals[0].data.lng; else if( this->type == BITSTR ) strcpy(this->value.data.str, pVals[0].data.str); break; case min2_fct: if( this->type == DOUBLE ) this->value.data.dbl = minvalue( pVals[0].data.dbl, pVals[1].data.dbl ); else if( this->type == LONG ) this->value.data.lng = minvalue( pVals[0].data.lng, pVals[1].data.lng ); break; case max1_fct: /* No constant vectors! */ if( this->type == DOUBLE ) this->value.data.dbl = pVals[0].data.dbl; else if( this->type == LONG ) this->value.data.lng = pVals[0].data.lng; else if( this->type == BITSTR ) strcpy(this->value.data.str, pVals[0].data.str); break; case max2_fct: if( this->type == DOUBLE ) this->value.data.dbl = maxvalue( pVals[0].data.dbl, pVals[1].data.dbl ); else if( this->type == LONG ) this->value.data.lng = maxvalue( pVals[0].data.lng, pVals[1].data.lng ); break; /* Boolean SAO region Functions... scalar or vector dbls */ case near_fct: this->value.data.log = bnear( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl ); break; case circle_fct: this->value.data.log = circle( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl, pVals[4].data.dbl ); break; case box_fct: this->value.data.log = saobox( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl, pVals[4].data.dbl, pVals[5].data.dbl, pVals[6].data.dbl ); break; case elps_fct: this->value.data.log = ellipse( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl, pVals[4].data.dbl, pVals[5].data.dbl, pVals[6].data.dbl ); break; /* C Conditional expression: bool ? expr : expr */ case ifthenelse_fct: switch( this->type ) { case BOOLEAN: this->value.data.log = ( pVals[2].data.log ? pVals[0].data.log : pVals[1].data.log ); break; case LONG: this->value.data.lng = ( pVals[2].data.log ? pVals[0].data.lng : pVals[1].data.lng ); break; case DOUBLE: this->value.data.dbl = ( pVals[2].data.log ? pVals[0].data.dbl : pVals[1].data.dbl ); break; case STRING: strcpy(this->value.data.str, ( pVals[2].data.log ? pVals[0].data.str : pVals[1].data.str ) ); break; } break; /* String functions */ case strmid_fct: cstrmid(this->value.data.str, this->value.nelem, pVals[0].data.str, pVals[0].nelem, pVals[1].data.lng); break; case strpos_fct: { char *res = strstr(pVals[0].data.str, pVals[1].data.str); if (res == NULL) { this->value.data.lng = 0; } else { this->value.data.lng = (res - pVals[0].data.str) + 1; } break; } } this->operation = CONST_OP; } else { Allocate_Ptrs( this ); row = gParse.nRows; elem = row * this->value.nelem; if( !gParse.status ) { switch( this->operation ) { /* Special functions with no arguments */ case row_fct: while( row-- ) { this->value.data.lngptr[row] = gParse.firstRow + row; this->value.undef[row] = 0; } break; case null_fct: if( this->type==LONG ) { while( row-- ) { this->value.data.lngptr[row] = 0; this->value.undef[row] = 1; } } else if( this->type==STRING ) { while( row-- ) { this->value.data.strptr[row][0] = '\0'; this->value.undef[row] = 1; } } break; case rnd_fct: while( elem-- ) { this->value.data.dblptr[elem] = ran1(); this->value.undef[elem] = 0; } break; case gasrnd_fct: while( elem-- ) { this->value.data.dblptr[elem] = gasdev(); this->value.undef[elem] = 0; } break; case poirnd_fct: if( theParams[0]->type==DOUBLE ) { if (theParams[0]->operation == CONST_OP) { while( elem-- ) { this->value.undef[elem] = (pVals[0].data.dbl < 0); if (! this->value.undef[elem]) { this->value.data.lngptr[elem] = poidev(pVals[0].data.dbl); } } } else { while( elem-- ) { this->value.undef[elem] = theParams[0]->value.undef[elem]; if (theParams[0]->value.data.dblptr[elem] < 0) this->value.undef[elem] = 1; if (! this->value.undef[elem]) { this->value.data.lngptr[elem] = poidev(theParams[0]->value.data.dblptr[elem]); } } /* while */ } /* ! CONST_OP */ } else { /* LONG */ if (theParams[0]->operation == CONST_OP) { while( elem-- ) { this->value.undef[elem] = (pVals[0].data.lng < 0); if (! this->value.undef[elem]) { this->value.data.lngptr[elem] = poidev(pVals[0].data.lng); } } } else { while( elem-- ) { this->value.undef[elem] = theParams[0]->value.undef[elem]; if (theParams[0]->value.data.lngptr[elem] < 0) this->value.undef[elem] = 1; if (! this->value.undef[elem]) { this->value.data.lngptr[elem] = poidev(theParams[0]->value.data.lngptr[elem]); } } /* while */ } /* ! CONST_OP */ } /* END LONG */ break; /* Non-Trig single-argument functions */ case sum_fct: elem = row * theParams[0]->value.nelem; if( theParams[0]->type==BOOLEAN ) { while( row-- ) { this->value.data.lngptr[row] = 0; /* Default is UNDEF until a defined value is found */ this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( ! theParams[0]->value.undef[elem] ) { this->value.data.lngptr[row] += ( theParams[0]->value.data.logptr[elem] ? 1 : 0 ); this->value.undef[row] = 0; } } } } else if( theParams[0]->type==LONG ) { while( row-- ) { this->value.data.lngptr[row] = 0; /* Default is UNDEF until a defined value is found */ this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( ! theParams[0]->value.undef[elem] ) { this->value.data.lngptr[row] += theParams[0]->value.data.lngptr[elem]; this->value.undef[row] = 0; } } } } else if( theParams[0]->type==DOUBLE ){ while( row-- ) { this->value.data.dblptr[row] = 0.0; /* Default is UNDEF until a defined value is found */ this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( ! theParams[0]->value.undef[elem] ) { this->value.data.dblptr[row] += theParams[0]->value.data.dblptr[elem]; this->value.undef[row] = 0; } } } } else { /* BITSTR */ nelem = theParams[0]->value.nelem; while( row-- ) { char *sptr1 = theParams[0]->value.data.strptr[row]; this->value.data.lngptr[row] = 0; this->value.undef[row] = 0; while (*sptr1) { if (*sptr1 == '1') this->value.data.lngptr[row] ++; sptr1++; } } } break; case average_fct: elem = row * theParams[0]->value.nelem; if( theParams[0]->type==LONG ) { while( row-- ) { int count = 0; this->value.data.dblptr[row] = 0; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if (theParams[0]->value.undef[elem] == 0) { this->value.data.dblptr[row] += theParams[0]->value.data.lngptr[elem]; count ++; } } if (count == 0) { this->value.undef[row] = 1; } else { this->value.undef[row] = 0; this->value.data.dblptr[row] /= count; } } } else if( theParams[0]->type==DOUBLE ){ while( row-- ) { int count = 0; this->value.data.dblptr[row] = 0; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if (theParams[0]->value.undef[elem] == 0) { this->value.data.dblptr[row] += theParams[0]->value.data.dblptr[elem]; count ++; } } if (count == 0) { this->value.undef[row] = 1; } else { this->value.undef[row] = 0; this->value.data.dblptr[row] /= count; } } } break; case stddev_fct: elem = row * theParams[0]->value.nelem; if( theParams[0]->type==LONG ) { /* Compute the mean value */ while( row-- ) { int count = 0; double sum = 0, sum2 = 0; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if (theParams[0]->value.undef[elem] == 0) { sum += theParams[0]->value.data.lngptr[elem]; count ++; } } if (count > 1) { sum /= count; /* Compute the sum of squared deviations */ nelem = theParams[0]->value.nelem; elem += nelem; /* Reset elem for second pass */ while( nelem-- ) { elem--; if (theParams[0]->value.undef[elem] == 0) { double dx = (theParams[0]->value.data.lngptr[elem] - sum); sum2 += (dx*dx); } } sum2 /= (double)count-1; this->value.undef[row] = 0; this->value.data.dblptr[row] = sqrt(sum2); } else { this->value.undef[row] = 0; /* STDDEV => 0 */ this->value.data.dblptr[row] = 0; } } } else if( theParams[0]->type==DOUBLE ){ /* Compute the mean value */ while( row-- ) { int count = 0; double sum = 0, sum2 = 0; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if (theParams[0]->value.undef[elem] == 0) { sum += theParams[0]->value.data.dblptr[elem]; count ++; } } if (count > 1) { sum /= count; /* Compute the sum of squared deviations */ nelem = theParams[0]->value.nelem; elem += nelem; /* Reset elem for second pass */ while( nelem-- ) { elem--; if (theParams[0]->value.undef[elem] == 0) { double dx = (theParams[0]->value.data.dblptr[elem] - sum); sum2 += (dx*dx); } } sum2 /= (double)count-1; this->value.undef[row] = 0; this->value.data.dblptr[row] = sqrt(sum2); } else { this->value.undef[row] = 0; /* STDDEV => 0 */ this->value.data.dblptr[row] = 0; } } } break; case median_fct: elem = row * theParams[0]->value.nelem; nelem = theParams[0]->value.nelem; if( theParams[0]->type==LONG ) { long *dptr = theParams[0]->value.data.lngptr; char *uptr = theParams[0]->value.undef; long *mptr = (long *) malloc(sizeof(long)*nelem); int irow; /* Allocate temporary storage for this row, since the quickselect function will scramble the contents */ if (mptr == 0) { fferror("Could not allocate temporary memory in median function"); free( this->value.data.ptr ); break; } for (irow=0; irow 0) { this->value.undef[irow] = 0; this->value.data.lngptr[irow] = qselect_median_lng(mptr, nelem1); } else { this->value.undef[irow] = 1; this->value.data.lngptr[irow] = 0; } } free(mptr); } else { double *dptr = theParams[0]->value.data.dblptr; char *uptr = theParams[0]->value.undef; double *mptr = (double *) malloc(sizeof(double)*nelem); int irow; /* Allocate temporary storage for this row, since the quickselect function will scramble the contents */ if (mptr == 0) { fferror("Could not allocate temporary memory in median function"); free( this->value.data.ptr ); break; } for (irow=0; irow 0) { this->value.undef[irow] = 0; this->value.data.dblptr[irow] = qselect_median_dbl(mptr, nelem1); } else { this->value.undef[irow] = 1; this->value.data.dblptr[irow] = 0; } } free(mptr); } break; case abs_fct: if( theParams[0]->type==DOUBLE ) while( elem-- ) { dval = theParams[0]->value.data.dblptr[elem]; this->value.data.dblptr[elem] = (dval>0.0 ? dval : -dval); this->value.undef[elem] = theParams[0]->value.undef[elem]; } else while( elem-- ) { ival = theParams[0]->value.data.lngptr[elem]; this->value.data.lngptr[elem] = (ival> 0 ? ival : -ival); this->value.undef[elem] = theParams[0]->value.undef[elem]; } break; /* Special Null-Handling Functions */ case nonnull_fct: nelem = theParams[0]->value.nelem; if ( theParams[0]->type==STRING ) nelem = 1; elem = row * nelem; while( row-- ) { int nelem1 = nelem; this->value.undef[row] = 0; /* Initialize to 0 (defined) */ this->value.data.lngptr[row] = 0; while( nelem1-- ) { elem --; if ( theParams[0]->value.undef[elem] == 0 ) this->value.data.lngptr[row] ++; } } break; case isnull_fct: if( theParams[0]->type==STRING ) elem = row; while( elem-- ) { this->value.data.logptr[elem] = theParams[0]->value.undef[elem]; this->value.undef[elem] = 0; } break; case defnull_fct: switch( this->type ) { case BOOLEAN: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pNull[i] = theParams[i]->value.undef[elem]; pVals[i].data.log = theParams[i]->value.data.logptr[elem]; } else if( vector[i] ) { pNull[i] = theParams[i]->value.undef[row]; pVals[i].data.log = theParams[i]->value.data.logptr[row]; } if( pNull[0] ) { this->value.undef[elem] = pNull[1]; this->value.data.logptr[elem] = pVals[1].data.log; } else { this->value.undef[elem] = 0; this->value.data.logptr[elem] = pVals[0].data.log; } } } break; case LONG: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pNull[i] = theParams[i]->value.undef[elem]; pVals[i].data.lng = theParams[i]->value.data.lngptr[elem]; } else if( vector[i] ) { pNull[i] = theParams[i]->value.undef[row]; pVals[i].data.lng = theParams[i]->value.data.lngptr[row]; } if( pNull[0] ) { this->value.undef[elem] = pNull[1]; this->value.data.lngptr[elem] = pVals[1].data.lng; } else { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = pVals[0].data.lng; } } } break; case DOUBLE: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pNull[i] = theParams[i]->value.undef[elem]; pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; } else if( vector[i] ) { pNull[i] = theParams[i]->value.undef[row]; pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; } if( pNull[0] ) { this->value.undef[elem] = pNull[1]; this->value.data.dblptr[elem] = pVals[1].data.dbl; } else { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = pVals[0].data.dbl; } } } break; case STRING: while( row-- ) { i=2; while( i-- ) if( vector[i] ) { pNull[i] = theParams[i]->value.undef[row]; strcpy(pVals[i].data.str, theParams[i]->value.data.strptr[row]); } if( pNull[0] ) { this->value.undef[row] = pNull[1]; strcpy(this->value.data.strptr[row],pVals[1].data.str); } else { this->value.undef[elem] = 0; strcpy(this->value.data.strptr[row],pVals[0].data.str); } } } break; /* Math functions with 1 double argument */ case sin_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = sin( theParams[0]->value.data.dblptr[elem] ); } break; case cos_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = cos( theParams[0]->value.data.dblptr[elem] ); } break; case tan_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = tan( theParams[0]->value.data.dblptr[elem] ); } break; case asin_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; if( dval<-1.0 || dval>1.0 ) { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } else this->value.data.dblptr[elem] = asin( dval ); } break; case acos_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; if( dval<-1.0 || dval>1.0 ) { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } else this->value.data.dblptr[elem] = acos( dval ); } break; case atan_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; this->value.data.dblptr[elem] = atan( dval ); } break; case sinh_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = sinh( theParams[0]->value.data.dblptr[elem] ); } break; case cosh_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = cosh( theParams[0]->value.data.dblptr[elem] ); } break; case tanh_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = tanh( theParams[0]->value.data.dblptr[elem] ); } break; case exp_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; this->value.data.dblptr[elem] = exp( dval ); } break; case log_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; if( dval<=0.0 ) { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } else this->value.data.dblptr[elem] = log( dval ); } break; case log10_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; if( dval<=0.0 ) { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } else this->value.data.dblptr[elem] = log10( dval ); } break; case sqrt_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; if( dval<0.0 ) { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } else this->value.data.dblptr[elem] = sqrt( dval ); } break; case ceil_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = ceil( theParams[0]->value.data.dblptr[elem] ); } break; case floor_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = floor( theParams[0]->value.data.dblptr[elem] ); } break; case round_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = floor( theParams[0]->value.data.dblptr[elem] + 0.5); } break; /* Two-argument Trig Functions */ case atan2_fct: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = (pNull[0] || pNull[1]) ) ) this->value.data.dblptr[elem] = atan2( pVals[0].data.dbl, pVals[1].data.dbl ); } } break; /* Four-argument ANGSEP Function */ case angsep_fct: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=4; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || pNull[2] || pNull[3]) ) ) this->value.data.dblptr[elem] = angsep_calc(pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl); } } break; /* Min/Max functions taking 1 or 2 arguments */ case min1_fct: elem = row * theParams[0]->value.nelem; if( this->type==LONG ) { long minVal=0; while( row-- ) { valInit = 1; this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( !theParams[0]->value.undef[elem] ) { if ( valInit ) { valInit = 0; minVal = theParams[0]->value.data.lngptr[elem]; } else { minVal = minvalue( minVal, theParams[0]->value.data.lngptr[elem] ); } this->value.undef[row] = 0; } } this->value.data.lngptr[row] = minVal; } } else if( this->type==DOUBLE ) { double minVal=0.0; while( row-- ) { valInit = 1; this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( !theParams[0]->value.undef[elem] ) { if ( valInit ) { valInit = 0; minVal = theParams[0]->value.data.dblptr[elem]; } else { minVal = minvalue( minVal, theParams[0]->value.data.dblptr[elem] ); } this->value.undef[row] = 0; } } this->value.data.dblptr[row] = minVal; } } else if( this->type==BITSTR ) { char minVal; while( row-- ) { char *sptr1 = theParams[0]->value.data.strptr[row]; minVal = '1'; while (*sptr1) { if (*sptr1 == '0') minVal = '0'; sptr1++; } this->value.data.strptr[row][0] = minVal; this->value.data.strptr[row][1] = 0; /* Null terminate */ } } break; case min2_fct: if( this->type==LONG ) { while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.lng = theParams[i]->value.data.lngptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.lng = theParams[i]->value.data.lngptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( pNull[0] && pNull[1] ) { this->value.undef[elem] = 1; this->value.data.lngptr[elem] = 0; } else if (pNull[0]) { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = pVals[1].data.lng; } else if (pNull[1]) { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = pVals[0].data.lng; } else { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = minvalue( pVals[0].data.lng, pVals[1].data.lng ); } } } } else if( this->type==DOUBLE ) { while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( pNull[0] && pNull[1] ) { this->value.undef[elem] = 1; this->value.data.dblptr[elem] = 0; } else if (pNull[0]) { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = pVals[1].data.dbl; } else if (pNull[1]) { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = pVals[0].data.dbl; } else { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = minvalue( pVals[0].data.dbl, pVals[1].data.dbl ); } } } } break; case max1_fct: elem = row * theParams[0]->value.nelem; if( this->type==LONG ) { long maxVal=0; while( row-- ) { valInit = 1; this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( !theParams[0]->value.undef[elem] ) { if ( valInit ) { valInit = 0; maxVal = theParams[0]->value.data.lngptr[elem]; } else { maxVal = maxvalue( maxVal, theParams[0]->value.data.lngptr[elem] ); } this->value.undef[row] = 0; } } this->value.data.lngptr[row] = maxVal; } } else if( this->type==DOUBLE ) { double maxVal=0.0; while( row-- ) { valInit = 1; this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( !theParams[0]->value.undef[elem] ) { if ( valInit ) { valInit = 0; maxVal = theParams[0]->value.data.dblptr[elem]; } else { maxVal = maxvalue( maxVal, theParams[0]->value.data.dblptr[elem] ); } this->value.undef[row] = 0; } } this->value.data.dblptr[row] = maxVal; } } else if( this->type==BITSTR ) { char maxVal; while( row-- ) { char *sptr1 = theParams[0]->value.data.strptr[row]; maxVal = '0'; while (*sptr1) { if (*sptr1 == '1') maxVal = '1'; sptr1++; } this->value.data.strptr[row][0] = maxVal; this->value.data.strptr[row][1] = 0; /* Null terminate */ } } break; case max2_fct: if( this->type==LONG ) { while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.lng = theParams[i]->value.data.lngptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.lng = theParams[i]->value.data.lngptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( pNull[0] && pNull[1] ) { this->value.undef[elem] = 1; this->value.data.lngptr[elem] = 0; } else if (pNull[0]) { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = pVals[1].data.lng; } else if (pNull[1]) { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = pVals[0].data.lng; } else { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = maxvalue( pVals[0].data.lng, pVals[1].data.lng ); } } } } else if( this->type==DOUBLE ) { while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( pNull[0] && pNull[1] ) { this->value.undef[elem] = 1; this->value.data.dblptr[elem] = 0; } else if (pNull[0]) { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = pVals[1].data.dbl; } else if (pNull[1]) { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = pVals[0].data.dbl; } else { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = maxvalue( pVals[0].data.dbl, pVals[1].data.dbl ); } } } } break; /* Boolean SAO region Functions... scalar or vector dbls */ case near_fct: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=3; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || pNull[2]) ) ) this->value.data.logptr[elem] = bnear( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl ); } } break; case circle_fct: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=5; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || pNull[2] || pNull[3] || pNull[4]) ) ) this->value.data.logptr[elem] = circle( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl, pVals[4].data.dbl ); } } break; case box_fct: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=7; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || pNull[2] || pNull[3] || pNull[4] || pNull[5] || pNull[6] ) ) ) this->value.data.logptr[elem] = saobox( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl, pVals[4].data.dbl, pVals[5].data.dbl, pVals[6].data.dbl ); } } break; case elps_fct: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=7; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || pNull[2] || pNull[3] || pNull[4] || pNull[5] || pNull[6] ) ) ) this->value.data.logptr[elem] = ellipse( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl, pVals[4].data.dbl, pVals[5].data.dbl, pVals[6].data.dbl ); } } break; /* C Conditional expression: bool ? expr : expr */ case ifthenelse_fct: switch( this->type ) { case BOOLEAN: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; if( vector[2]>1 ) { pVals[2].data.log = theParams[2]->value.data.logptr[elem]; pNull[2] = theParams[2]->value.undef[elem]; } else if( vector[2] ) { pVals[2].data.log = theParams[2]->value.data.logptr[row]; pNull[2] = theParams[2]->value.undef[row]; } i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.log = theParams[i]->value.data.logptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.log = theParams[i]->value.data.logptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = pNull[2]) ) { if( pVals[2].data.log ) { this->value.data.logptr[elem] = pVals[0].data.log; this->value.undef[elem] = pNull[0]; } else { this->value.data.logptr[elem] = pVals[1].data.log; this->value.undef[elem] = pNull[1]; } } } } break; case LONG: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; if( vector[2]>1 ) { pVals[2].data.log = theParams[2]->value.data.logptr[elem]; pNull[2] = theParams[2]->value.undef[elem]; } else if( vector[2] ) { pVals[2].data.log = theParams[2]->value.data.logptr[row]; pNull[2] = theParams[2]->value.undef[row]; } i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.lng = theParams[i]->value.data.lngptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.lng = theParams[i]->value.data.lngptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = pNull[2]) ) { if( pVals[2].data.log ) { this->value.data.lngptr[elem] = pVals[0].data.lng; this->value.undef[elem] = pNull[0]; } else { this->value.data.lngptr[elem] = pVals[1].data.lng; this->value.undef[elem] = pNull[1]; } } } } break; case DOUBLE: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; if( vector[2]>1 ) { pVals[2].data.log = theParams[2]->value.data.logptr[elem]; pNull[2] = theParams[2]->value.undef[elem]; } else if( vector[2] ) { pVals[2].data.log = theParams[2]->value.data.logptr[row]; pNull[2] = theParams[2]->value.undef[row]; } i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = pNull[2]) ) { if( pVals[2].data.log ) { this->value.data.dblptr[elem] = pVals[0].data.dbl; this->value.undef[elem] = pNull[0]; } else { this->value.data.dblptr[elem] = pVals[1].data.dbl; this->value.undef[elem] = pNull[1]; } } } } break; case STRING: while( row-- ) { if( vector[2] ) { pVals[2].data.log = theParams[2]->value.data.logptr[row]; pNull[2] = theParams[2]->value.undef[row]; } i=2; while( i-- ) if( vector[i] ) { strcpy( pVals[i].data.str, theParams[i]->value.data.strptr[row] ); pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[row] = pNull[2]) ) { if( pVals[2].data.log ) { strcpy( this->value.data.strptr[row], pVals[0].data.str ); this->value.undef[row] = pNull[0]; } else { strcpy( this->value.data.strptr[row], pVals[1].data.str ); this->value.undef[row] = pNull[1]; } } else { this->value.data.strptr[row][0] = '\0'; } } break; } break; /* String functions */ case strmid_fct: { int strconst = theParams[0]->operation == CONST_OP; int posconst = theParams[1]->operation == CONST_OP; int lenconst = theParams[2]->operation == CONST_OP; int dest_len = this->value.nelem; int src_len = theParams[0]->value.nelem; while (row--) { int pos; int len; char *str; int undef = 0; if (posconst) { pos = theParams[1]->value.data.lng; } else { pos = theParams[1]->value.data.lngptr[row]; if (theParams[1]->value.undef[row]) undef = 1; } if (strconst) { str = theParams[0]->value.data.str; if (src_len == 0) src_len = strlen(str); } else { str = theParams[0]->value.data.strptr[row]; if (theParams[0]->value.undef[row]) undef = 1; } if (lenconst) { len = dest_len; } else { len = theParams[2]->value.data.lngptr[row]; if (theParams[2]->value.undef[row]) undef = 1; } this->value.data.strptr[row][0] = '\0'; if (pos == 0) undef = 1; if (! undef ) { if (cstrmid(this->value.data.strptr[row], len, str, src_len, pos) < 0) break; } this->value.undef[row] = undef; } } break; /* String functions */ case strpos_fct: { int const1 = theParams[0]->operation == CONST_OP; int const2 = theParams[1]->operation == CONST_OP; while (row--) { char *str1, *str2; int undef = 0; if (const1) { str1 = theParams[0]->value.data.str; } else { str1 = theParams[0]->value.data.strptr[row]; if (theParams[0]->value.undef[row]) undef = 1; } if (const2) { str2 = theParams[1]->value.data.str; } else { str2 = theParams[1]->value.data.strptr[row]; if (theParams[1]->value.undef[row]) undef = 1; } this->value.data.lngptr[row] = 0; if (! undef ) { char *res = strstr(str1, str2); if (res == NULL) { undef = 1; this->value.data.lngptr[row] = 0; } else { this->value.data.lngptr[row] = (res - str1) + 1; } } this->value.undef[row] = undef; } } break; } /* End switch(this->operation) */ } /* End if (!gParse.status) */ } /* End non-constant operations */ i = this->nSubNodes; while( i-- ) { if( theParams[i]->operation>0 ) { /* Currently only numeric params allowed */ free( theParams[i]->value.data.ptr ); } } } static void Do_Deref( Node *this ) { Node *theVar, *theDims[MAXDIMS]; int isConst[MAXDIMS], allConst; long dimVals[MAXDIMS]; int i, nDims; long row, elem, dsize; theVar = gParse.Nodes + this->SubNodes[0]; i = nDims = this->nSubNodes-1; allConst = 1; while( i-- ) { theDims[i] = gParse.Nodes + this->SubNodes[i+1]; isConst[i] = ( theDims[i]->operation==CONST_OP ); if( isConst[i] ) dimVals[i] = theDims[i]->value.data.lng; else allConst = 0; } if( this->type==DOUBLE ) { dsize = sizeof( double ); } else if( this->type==LONG ) { dsize = sizeof( long ); } else if( this->type==BOOLEAN ) { dsize = sizeof( char ); } else dsize = 0; Allocate_Ptrs( this ); if( !gParse.status ) { if( allConst && theVar->value.naxis==nDims ) { /* Dereference completely using constant indices */ elem = 0; i = nDims; while( i-- ) { if( dimVals[i]<1 || dimVals[i]>theVar->value.naxes[i] ) break; elem = theVar->value.naxes[i]*elem + dimVals[i]-1; } if( i<0 ) { for( row=0; rowtype==STRING ) this->value.undef[row] = theVar->value.undef[row]; else if( this->type==BITSTR ) this->value.undef; /* Dummy - BITSTRs do not have undefs */ else this->value.undef[row] = theVar->value.undef[elem]; if( this->type==DOUBLE ) this->value.data.dblptr[row] = theVar->value.data.dblptr[elem]; else if( this->type==LONG ) this->value.data.lngptr[row] = theVar->value.data.lngptr[elem]; else if( this->type==BOOLEAN ) this->value.data.logptr[row] = theVar->value.data.logptr[elem]; else { /* XXX Note, the below expression uses knowledge of the layout of the string format, namely (nelem+1) characters per string, followed by (nelem+1) "undef" values. */ this->value.data.strptr[row][0] = theVar->value.data.strptr[0][elem+row]; this->value.data.strptr[row][1] = 0; /* Null terminate */ } elem += theVar->value.nelem; } } else { fferror("Index out of range"); free( this->value.data.ptr ); } } else if( allConst && nDims==1 ) { /* Reduce dimensions by 1, using a constant index */ if( dimVals[0] < 1 || dimVals[0] > theVar->value.naxes[ theVar->value.naxis-1 ] ) { fferror("Index out of range"); free( this->value.data.ptr ); } else if ( this->type == BITSTR || this->type == STRING ) { elem = this->value.nelem * (dimVals[0]-1); for( row=0; rowvalue.undef) this->value.undef[row] = theVar->value.undef[row]; memcpy( (char*)this->value.data.strptr[0] + row*sizeof(char)*(this->value.nelem+1), (char*)theVar->value.data.strptr[0] + elem*sizeof(char), this->value.nelem * sizeof(char) ); /* Null terminate */ this->value.data.strptr[row][this->value.nelem] = 0; elem += theVar->value.nelem+1; } } else { elem = this->value.nelem * (dimVals[0]-1); for( row=0; rowvalue.undef + row*this->value.nelem, theVar->value.undef + elem, this->value.nelem * sizeof(char) ); memcpy( (char*)this->value.data.ptr + row*dsize*this->value.nelem, (char*)theVar->value.data.ptr + elem*dsize, this->value.nelem * dsize ); elem += theVar->value.nelem; } } } else if( theVar->value.naxis==nDims ) { /* Dereference completely using an expression for the indices */ for( row=0; rowvalue.undef[row] ) { fferror("Null encountered as vector index"); free( this->value.data.ptr ); break; } else dimVals[i] = theDims[i]->value.data.lngptr[row]; } } if( gParse.status ) break; elem = 0; i = nDims; while( i-- ) { if( dimVals[i]<1 || dimVals[i]>theVar->value.naxes[i] ) break; elem = theVar->value.naxes[i]*elem + dimVals[i]-1; } if( i<0 ) { elem += row*theVar->value.nelem; if( this->type==STRING ) this->value.undef[row] = theVar->value.undef[row]; else if( this->type==BITSTR ) this->value.undef; /* Dummy - BITSTRs do not have undefs */ else this->value.undef[row] = theVar->value.undef[elem]; if( this->type==DOUBLE ) this->value.data.dblptr[row] = theVar->value.data.dblptr[elem]; else if( this->type==LONG ) this->value.data.lngptr[row] = theVar->value.data.lngptr[elem]; else if( this->type==BOOLEAN ) this->value.data.logptr[row] = theVar->value.data.logptr[elem]; else { /* XXX Note, the below expression uses knowledge of the layout of the string format, namely (nelem+1) characters per string, followed by (nelem+1) "undef" values. */ this->value.data.strptr[row][0] = theVar->value.data.strptr[0][elem+row]; this->value.data.strptr[row][1] = 0; /* Null terminate */ } } else { fferror("Index out of range"); free( this->value.data.ptr ); } } } else { /* Reduce dimensions by 1, using a nonconstant expression */ for( row=0; rowvalue.undef[row] ) { fferror("Null encountered as vector index"); free( this->value.data.ptr ); break; } else dimVals[0] = theDims[0]->value.data.lngptr[row]; if( dimVals[0] < 1 || dimVals[0] > theVar->value.naxes[ theVar->value.naxis-1 ] ) { fferror("Index out of range"); free( this->value.data.ptr ); } else if ( this->type == BITSTR || this->type == STRING ) { elem = this->value.nelem * (dimVals[0]-1); elem += row*(theVar->value.nelem+1); if (this->value.undef) this->value.undef[row] = theVar->value.undef[row]; memcpy( (char*)this->value.data.strptr[0] + row*sizeof(char)*(this->value.nelem+1), (char*)theVar->value.data.strptr[0] + elem*sizeof(char), this->value.nelem * sizeof(char) ); /* Null terminate */ this->value.data.strptr[row][this->value.nelem] = 0; } else { elem = this->value.nelem * (dimVals[0]-1); elem += row*theVar->value.nelem; memcpy( this->value.undef + row*this->value.nelem, theVar->value.undef + elem, this->value.nelem * sizeof(char) ); memcpy( (char*)this->value.data.ptr + row*dsize*this->value.nelem, (char*)theVar->value.data.ptr + elem*dsize, this->value.nelem * dsize ); } } } } if( theVar->operation>0 ) { if (theVar->type == STRING || theVar->type == BITSTR) free(theVar->value.data.strptr[0] ); else free( theVar->value.data.ptr ); } for( i=0; ioperation>0 ) { free( theDims[i]->value.data.ptr ); } } static void Do_GTI( Node *this ) { Node *theExpr, *theTimes; double *start, *stop, *times; long elem, nGTI, gti; int ordered; theTimes = gParse.Nodes + this->SubNodes[0]; theExpr = gParse.Nodes + this->SubNodes[1]; nGTI = theTimes->value.nelem; start = theTimes->value.data.dblptr; stop = theTimes->value.data.dblptr + nGTI; ordered = theTimes->type; if( theExpr->operation==CONST_OP ) { this->value.data.log = (Search_GTI( theExpr->value.data.dbl, nGTI, start, stop, ordered )>=0); this->operation = CONST_OP; } else { Allocate_Ptrs( this ); times = theExpr->value.data.dblptr; if( !gParse.status ) { elem = gParse.nRows * this->value.nelem; if( nGTI ) { gti = -1; while( elem-- ) { if( (this->value.undef[elem] = theExpr->value.undef[elem]) ) continue; /* Before searching entire GTI, check the GTI found last time */ if( gti<0 || times[elem]stop[gti] ) { gti = Search_GTI( times[elem], nGTI, start, stop, ordered ); } this->value.data.logptr[elem] = ( gti>=0 ); } } else while( elem-- ) { this->value.data.logptr[elem] = 0; this->value.undef[elem] = 0; } } } if( theExpr->operation>0 ) free( theExpr->value.data.ptr ); } static long Search_GTI( double evtTime, long nGTI, double *start, double *stop, int ordered ) { long gti, step; if( ordered && nGTI>15 ) { /* If time-ordered and lots of GTIs, */ /* use "FAST" Binary search algorithm */ if( evtTime>=start[0] && evtTime<=stop[nGTI-1] ) { gti = step = (nGTI >> 1); while(1) { if( step>1L ) step >>= 1; if( evtTime>stop[gti] ) { if( evtTime>=start[gti+1] ) gti += step; else { gti = -1L; break; } } else if( evtTime=start[gti] && evtTime<=stop[gti] ) break; } return( gti ); } static void Do_REG( Node *this ) { Node *theRegion, *theX, *theY; double Xval=0.0, Yval=0.0; char Xnull=0, Ynull=0; int Xvector, Yvector; long nelem, elem, rows; theRegion = gParse.Nodes + this->SubNodes[0]; theX = gParse.Nodes + this->SubNodes[1]; theY = gParse.Nodes + this->SubNodes[2]; Xvector = ( theX->operation!=CONST_OP ); if( Xvector ) Xvector = theX->value.nelem; else { Xval = theX->value.data.dbl; } Yvector = ( theY->operation!=CONST_OP ); if( Yvector ) Yvector = theY->value.nelem; else { Yval = theY->value.data.dbl; } if( !Xvector && !Yvector ) { this->value.data.log = ( fits_in_region( Xval, Yval, (SAORegion *)theRegion->value.data.ptr ) != 0 ); this->operation = CONST_OP; } else { Allocate_Ptrs( this ); if( !gParse.status ) { rows = gParse.nRows; nelem = this->value.nelem; elem = rows*nelem; while( rows-- ) { while( nelem-- ) { elem--; if( Xvector>1 ) { Xval = theX->value.data.dblptr[elem]; Xnull = theX->value.undef[elem]; } else if( Xvector ) { Xval = theX->value.data.dblptr[rows]; Xnull = theX->value.undef[rows]; } if( Yvector>1 ) { Yval = theY->value.data.dblptr[elem]; Ynull = theY->value.undef[elem]; } else if( Yvector ) { Yval = theY->value.data.dblptr[rows]; Ynull = theY->value.undef[rows]; } this->value.undef[elem] = ( Xnull || Ynull ); if( this->value.undef[elem] ) continue; this->value.data.logptr[elem] = ( fits_in_region( Xval, Yval, (SAORegion *)theRegion->value.data.ptr ) != 0 ); } nelem = this->value.nelem; } } } if( theX->operation>0 ) free( theX->value.data.ptr ); if( theY->operation>0 ) free( theY->value.data.ptr ); } static void Do_Vector( Node *this ) { Node *that; long row, elem, idx, jdx, offset=0; int node; Allocate_Ptrs( this ); if( !gParse.status ) { for( node=0; nodenSubNodes; node++ ) { that = gParse.Nodes + this->SubNodes[node]; if( that->operation == CONST_OP ) { idx = gParse.nRows*this->value.nelem + offset; while( (idx-=this->value.nelem)>=0 ) { this->value.undef[idx] = 0; switch( this->type ) { case BOOLEAN: this->value.data.logptr[idx] = that->value.data.log; break; case LONG: this->value.data.lngptr[idx] = that->value.data.lng; break; case DOUBLE: this->value.data.dblptr[idx] = that->value.data.dbl; break; } } } else { row = gParse.nRows; idx = row * that->value.nelem; while( row-- ) { elem = that->value.nelem; jdx = row*this->value.nelem + offset; while( elem-- ) { this->value.undef[jdx+elem] = that->value.undef[--idx]; switch( this->type ) { case BOOLEAN: this->value.data.logptr[jdx+elem] = that->value.data.logptr[idx]; break; case LONG: this->value.data.lngptr[jdx+elem] = that->value.data.lngptr[idx]; break; case DOUBLE: this->value.data.dblptr[jdx+elem] = that->value.data.dblptr[idx]; break; } } } } offset += that->value.nelem; } } for( node=0; node < this->nSubNodes; node++ ) if( OPER(this->SubNodes[node])>0 ) free( gParse.Nodes[this->SubNodes[node]].value.data.ptr ); } /*****************************************************************************/ /* Utility routines which perform the calculations on bits and SAO regions */ /*****************************************************************************/ static char bitlgte(char *bits1, int oper, char *bits2) { int val1, val2, nextbit; char result; int i, l1, l2, length, ldiff; char stream[256]; char chr1, chr2; l1 = strlen(bits1); l2 = strlen(bits2); if (l1 < l2) { length = l2; ldiff = l2 - l1; i=0; while( ldiff-- ) stream[i++] = '0'; while( l1-- ) stream[i++] = *(bits1++); stream[i] = '\0'; bits1 = stream; } else if (l2 < l1) { length = l1; ldiff = l1 - l2; i=0; while( ldiff-- ) stream[i++] = '0'; while( l2-- ) stream[i++] = *(bits2++); stream[i] = '\0'; bits2 = stream; } else length = l1; val1 = val2 = 0; nextbit = 1; while( length-- ) { chr1 = bits1[length]; chr2 = bits2[length]; if ((chr1 != 'x')&&(chr1 != 'X')&&(chr2 != 'x')&&(chr2 != 'X')) { if (chr1 == '1') val1 += nextbit; if (chr2 == '1') val2 += nextbit; nextbit *= 2; } } result = 0; switch (oper) { case LT: if (val1 < val2) result = 1; break; case LTE: if (val1 <= val2) result = 1; break; case GT: if (val1 > val2) result = 1; break; case GTE: if (val1 >= val2) result = 1; break; } return (result); } static void bitand(char *result,char *bitstrm1,char *bitstrm2) { int i, l1, l2, ldiff; char stream[256]; char chr1, chr2; l1 = strlen(bitstrm1); l2 = strlen(bitstrm2); if (l1 < l2) { ldiff = l2 - l1; i=0; while( ldiff-- ) stream[i++] = '0'; while( l1-- ) stream[i++] = *(bitstrm1++); stream[i] = '\0'; bitstrm1 = stream; } else if (l2 < l1) { ldiff = l1 - l2; i=0; while( ldiff-- ) stream[i++] = '0'; while( l2-- ) stream[i++] = *(bitstrm2++); stream[i] = '\0'; bitstrm2 = stream; } while ( (chr1 = *(bitstrm1++)) ) { chr2 = *(bitstrm2++); if ((chr1 == 'x') || (chr2 == 'x')) *result = 'x'; else if ((chr1 == '1') && (chr2 == '1')) *result = '1'; else *result = '0'; result++; } *result = '\0'; } static void bitor(char *result,char *bitstrm1,char *bitstrm2) { int i, l1, l2, ldiff; char stream[256]; char chr1, chr2; l1 = strlen(bitstrm1); l2 = strlen(bitstrm2); if (l1 < l2) { ldiff = l2 - l1; i=0; while( ldiff-- ) stream[i++] = '0'; while( l1-- ) stream[i++] = *(bitstrm1++); stream[i] = '\0'; bitstrm1 = stream; } else if (l2 < l1) { ldiff = l1 - l2; i=0; while( ldiff-- ) stream[i++] = '0'; while( l2-- ) stream[i++] = *(bitstrm2++); stream[i] = '\0'; bitstrm2 = stream; } while ( (chr1 = *(bitstrm1++)) ) { chr2 = *(bitstrm2++); if ((chr1 == '1') || (chr2 == '1')) *result = '1'; else if ((chr1 == '0') || (chr2 == '0')) *result = '0'; else *result = 'x'; result++; } *result = '\0'; } static void bitnot(char *result,char *bits) { int length; char chr; length = strlen(bits); while( length-- ) { chr = *(bits++); *(result++) = ( chr=='1' ? '0' : ( chr=='0' ? '1' : chr ) ); } *result = '\0'; } static char bitcmp(char *bitstrm1, char *bitstrm2) { int i, l1, l2, ldiff; char stream[256]; char chr1, chr2; l1 = strlen(bitstrm1); l2 = strlen(bitstrm2); if (l1 < l2) { ldiff = l2 - l1; i=0; while( ldiff-- ) stream[i++] = '0'; while( l1-- ) stream[i++] = *(bitstrm1++); stream[i] = '\0'; bitstrm1 = stream; } else if (l2 < l1) { ldiff = l1 - l2; i=0; while( ldiff-- ) stream[i++] = '0'; while( l2-- ) stream[i++] = *(bitstrm2++); stream[i] = '\0'; bitstrm2 = stream; } while( (chr1 = *(bitstrm1++)) ) { chr2 = *(bitstrm2++); if ( ((chr1 == '0') && (chr2 == '1')) || ((chr1 == '1') && (chr2 == '0')) ) return( 0 ); } return( 1 ); } static char bnear(double x, double y, double tolerance) { if (fabs(x - y) < tolerance) return ( 1 ); else return ( 0 ); } static char saobox(double xcen, double ycen, double xwid, double ywid, double rot, double xcol, double ycol) { double x,y,xprime,yprime,xmin,xmax,ymin,ymax,theta; theta = (rot / 180.0) * myPI; xprime = xcol - xcen; yprime = ycol - ycen; x = xprime * cos(theta) + yprime * sin(theta); y = -xprime * sin(theta) + yprime * cos(theta); xmin = - 0.5 * xwid; xmax = 0.5 * xwid; ymin = - 0.5 * ywid; ymax = 0.5 * ywid; if ((x >= xmin) && (x <= xmax) && (y >= ymin) && (y <= ymax)) return ( 1 ); else return ( 0 ); } static char circle(double xcen, double ycen, double rad, double xcol, double ycol) { double r2,dx,dy,dlen; dx = xcol - xcen; dy = ycol - ycen; dx *= dx; dy *= dy; dlen = dx + dy; r2 = rad * rad; if (dlen <= r2) return ( 1 ); else return ( 0 ); } static char ellipse(double xcen, double ycen, double xrad, double yrad, double rot, double xcol, double ycol) { double x,y,xprime,yprime,dx,dy,dlen,theta; theta = (rot / 180.0) * myPI; xprime = xcol - xcen; yprime = ycol - ycen; x = xprime * cos(theta) + yprime * sin(theta); y = -xprime * sin(theta) + yprime * cos(theta); dx = x / xrad; dy = y / yrad; dx *= dx; dy *= dy; dlen = dx + dy; if (dlen <= 1.0) return ( 1 ); else return ( 0 ); } /* * Extract substring */ int cstrmid(char *dest_str, int dest_len, char *src_str, int src_len, int pos) { /* char fill_char = ' '; */ char fill_char = '\0'; if (src_len == 0) { src_len = strlen(src_str); } /* .. if constant */ /* Fill destination with blanks */ if (pos < 0) { fferror("STRMID(S,P,N) P must be 0 or greater"); return -1; } if (pos > src_len || pos == 0) { /* pos==0: blank string requested */ memset(dest_str, fill_char, dest_len); } else if (pos+dest_len > src_len) { /* Copy a subset */ int nsub = src_len-pos+1; int npad = dest_len - nsub; memcpy(dest_str, src_str+pos-1, nsub); /* Fill remaining string with blanks */ memset(dest_str+nsub, fill_char, npad); } else { /* Full string copy */ memcpy(dest_str, src_str+pos-1, dest_len); } dest_str[dest_len] = '\0'; /* Null-terminate */ return 0; } static void fferror(char *s) { char msg[80]; if( !gParse.status ) gParse.status = PARSE_SYNTAX_ERR; strncpy(msg, s, 80); msg[79] = '\0'; ffpmsg(msg); } astropy-1.1.1/cextern/cfitsio/region.c0000644001134200020070000015420612602615517020673 0ustar embrayscience00000000000000#include #include #include #include #include #include "fitsio2.h" #include "region.h" static int Pt_in_Poly( double x, double y, int nPts, double *Pts ); /*---------------------------------------------------------------------------*/ int fits_read_rgnfile( const char *filename, WCSdata *wcs, SAORegion **Rgn, int *status ) /* Read regions from either a FITS or ASCII region file and return the information */ /* in the "SAORegion" structure. If it is nonNULL, use wcs to convert the */ /* region coordinates to pixels. Return an error if region is in degrees */ /* but no WCS data is provided. */ /*---------------------------------------------------------------------------*/ { fitsfile *fptr; int tstatus = 0; if( *status ) return( *status ); /* try to open as a FITS file - if that doesn't work treat as an ASCII file */ fits_write_errmark(); if ( ffopen(&fptr, filename, READONLY, &tstatus) ) { fits_clear_errmark(); fits_read_ascii_region(filename, wcs, Rgn, status); } else { fits_read_fits_region(fptr, wcs, Rgn, status); } return(*status); } /*---------------------------------------------------------------------------*/ int fits_read_ascii_region( const char *filename, WCSdata *wcs, SAORegion **Rgn, int *status ) /* Read regions from a SAO-style region file and return the information */ /* in the "SAORegion" structure. If it is nonNULL, use wcs to convert the */ /* region coordinates to pixels. Return an error if region is in degrees */ /* but no WCS data is provided. */ /*---------------------------------------------------------------------------*/ { char *currLine; char *namePtr, *paramPtr, *currLoc; char *pX, *pY, *endp; long allocLen, lineLen, hh, mm, dd; double *coords, X, Y, x, y, ss, div, xsave= 0., ysave= 0.; int nParams, nCoords, negdec; int i, done; FILE *rgnFile; coordFmt cFmt; SAORegion *aRgn; RgnShape *newShape, *tmpShape; if( *status ) return( *status ); aRgn = (SAORegion *)malloc( sizeof(SAORegion) ); if( ! aRgn ) { ffpmsg("Couldn't allocate memory to hold Region file contents."); return(*status = MEMORY_ALLOCATION ); } aRgn->nShapes = 0; aRgn->Shapes = NULL; if( wcs && wcs->exists ) aRgn->wcs = *wcs; else aRgn->wcs.exists = 0; cFmt = pixel_fmt; /* set default format */ /* Allocate Line Buffer */ allocLen = 512; currLine = (char *)malloc( allocLen * sizeof(char) ); if( !currLine ) { free( aRgn ); ffpmsg("Couldn't allocate memory to hold Region file contents."); return(*status = MEMORY_ALLOCATION ); } /* Open Region File */ if( (rgnFile = fopen( filename, "r" ))==NULL ) { sprintf(currLine,"Could not open Region file %s.",filename); ffpmsg( currLine ); free( currLine ); free( aRgn ); return( *status = FILE_NOT_OPENED ); } /* Read in file, line by line */ /* First, set error status in case file is empty */ *status = FILE_NOT_OPENED; while( fgets(currLine,allocLen,rgnFile) != NULL ) { /* reset status if we got here */ *status = 0; /* Make sure we have a full line of text */ lineLen = strlen(currLine); while( lineLen==allocLen-1 && currLine[lineLen-1]!='\n' ) { currLoc = (char *)realloc( currLine, 2 * allocLen * sizeof(char) ); if( !currLoc ) { ffpmsg("Couldn't allocate memory to hold Region file contents."); *status = MEMORY_ALLOCATION; goto error; } else { currLine = currLoc; } fgets( currLine+lineLen, allocLen+1, rgnFile ); allocLen += allocLen; lineLen += strlen(currLine+lineLen); } currLoc = currLine; if( *currLoc == '#' ) { /* Look to see if it is followed by a format statement... */ /* if not skip line */ currLoc++; while( isspace(*currLoc) ) currLoc++; if( !strncasecmp( currLoc, "format:", 7 ) ) { if( aRgn->nShapes ) { ffpmsg("Format code encountered after reading 1 or more shapes."); *status = PARSE_SYNTAX_ERR; goto error; } currLoc += 7; while( isspace(*currLoc) ) currLoc++; if( !strncasecmp( currLoc, "pixel", 5 ) ) { cFmt = pixel_fmt; } else if( !strncasecmp( currLoc, "degree", 6 ) ) { cFmt = degree_fmt; } else if( !strncasecmp( currLoc, "hhmmss", 6 ) ) { cFmt = hhmmss_fmt; } else if( !strncasecmp( currLoc, "hms", 3 ) ) { cFmt = hhmmss_fmt; } else { ffpmsg("Unknown format code encountered in region file."); *status = PARSE_SYNTAX_ERR; goto error; } } } else if( !strncasecmp( currLoc, "glob", 4 ) ) { /* skip lines that begin with the word 'global' */ } else { while( *currLoc != '\0' ) { namePtr = currLoc; paramPtr = NULL; nParams = 1; /* Search for closing parenthesis */ done = 0; while( !done && !*status && *currLoc ) { switch (*currLoc) { case '(': *currLoc = '\0'; currLoc++; if( paramPtr ) /* Can't have two '(' in a region! */ *status = 1; else paramPtr = currLoc; break; case ')': *currLoc = '\0'; currLoc++; if( !paramPtr ) /* Can't have a ')' without a '(' first */ *status = 1; else done = 1; break; case '#': case '\n': *currLoc = '\0'; if( !paramPtr ) /* Allow for a blank line */ done = 1; break; case ':': currLoc++; if ( paramPtr ) cFmt = hhmmss_fmt; /* set format if parameter has : */ break; case 'd': currLoc++; if ( paramPtr ) cFmt = degree_fmt; /* set format if parameter has d */ break; case ',': nParams++; /* Fall through to default */ default: currLoc++; break; } } if( *status || !done ) { ffpmsg( "Error reading Region file" ); *status = PARSE_SYNTAX_ERR; goto error; } /* Skip white space in region name */ while( isspace(*namePtr) ) namePtr++; /* Was this a blank line? Or the end of the current one */ if( ! *namePtr && ! paramPtr ) continue; /* Check for format code at beginning of the line */ if( !strncasecmp( namePtr, "image;", 6 ) ) { namePtr += 6; cFmt = pixel_fmt; } else if( !strncasecmp( namePtr, "physical;", 9 ) ) { namePtr += 9; cFmt = pixel_fmt; } else if( !strncasecmp( namePtr, "linear;", 7 ) ) { namePtr += 7; cFmt = pixel_fmt; } else if( !strncasecmp( namePtr, "fk4;", 4 ) ) { namePtr += 4; cFmt = degree_fmt; } else if( !strncasecmp( namePtr, "fk5;", 4 ) ) { namePtr += 4; cFmt = degree_fmt; } else if( !strncasecmp( namePtr, "icrs;", 5 ) ) { namePtr += 5; cFmt = degree_fmt; /* the following 5 cases support region files created by POW (or ds9 Version 4.x) which may have lines containing only a format code, not followed by a ';' (and with no region specifier on the line). We use the 'continue' statement to jump to the end of the loop and then continue reading the next line of the region file. */ } else if( !strncasecmp( namePtr, "fk5", 3 ) ) { cFmt = degree_fmt; continue; /* supports POW region file format */ } else if( !strncasecmp( namePtr, "fk4", 3 ) ) { cFmt = degree_fmt; continue; /* supports POW region file format */ } else if( !strncasecmp( namePtr, "icrs", 4 ) ) { cFmt = degree_fmt; continue; /* supports POW region file format */ } else if( !strncasecmp( namePtr, "image", 5 ) ) { cFmt = pixel_fmt; continue; /* supports POW region file format */ } else if( !strncasecmp( namePtr, "physical", 8 ) ) { cFmt = pixel_fmt; continue; /* supports POW region file format */ } else if( !strncasecmp( namePtr, "galactic;", 9 ) ) { ffpmsg( "Galactic region coordinates not supported" ); ffpmsg( namePtr ); *status = PARSE_SYNTAX_ERR; goto error; } else if( !strncasecmp( namePtr, "ecliptic;", 9 ) ) { ffpmsg( "ecliptic region coordinates not supported" ); ffpmsg( namePtr ); *status = PARSE_SYNTAX_ERR; goto error; } /**************************************************/ /* We've apparently found a region... Set it up */ /**************************************************/ if( !(aRgn->nShapes % 10) ) { if( aRgn->Shapes ) tmpShape = (RgnShape *)realloc( aRgn->Shapes, (10+aRgn->nShapes) * sizeof(RgnShape) ); else tmpShape = (RgnShape *) malloc( 10 * sizeof(RgnShape) ); if( tmpShape ) { aRgn->Shapes = tmpShape; } else { ffpmsg( "Failed to allocate memory for Region data"); *status = MEMORY_ALLOCATION; goto error; } } newShape = &aRgn->Shapes[aRgn->nShapes++]; newShape->sign = 1; newShape->shape = point_rgn; for (i=0; i<8; i++) newShape->param.gen.p[i] = 0.0; newShape->param.gen.a = 0.0; newShape->param.gen.b = 0.0; newShape->param.gen.sinT = 0.0; newShape->param.gen.cosT = 0.0; while( isspace(*namePtr) ) namePtr++; /* Check for the shape's sign */ if( *namePtr=='+' ) { namePtr++; } else if( *namePtr=='-' ) { namePtr++; newShape->sign = 0; } /* Skip white space in region name */ while( isspace(*namePtr) ) namePtr++; if( *namePtr=='\0' ) { ffpmsg( "Error reading Region file" ); *status = PARSE_SYNTAX_ERR; goto error; } lineLen = strlen( namePtr ) - 1; while( isspace(namePtr[lineLen]) ) namePtr[lineLen--] = '\0'; /* Now identify the region */ if( !strcasecmp( namePtr, "circle" ) ) { newShape->shape = circle_rgn; if( nParams != 3 ) *status = PARSE_SYNTAX_ERR; nCoords = 2; } else if( !strcasecmp( namePtr, "annulus" ) ) { newShape->shape = annulus_rgn; if( nParams != 4 ) *status = PARSE_SYNTAX_ERR; nCoords = 2; } else if( !strcasecmp( namePtr, "ellipse" ) ) { if( nParams < 4 || nParams > 8 ) { *status = PARSE_SYNTAX_ERR; } else if ( nParams < 6 ) { newShape->shape = ellipse_rgn; newShape->param.gen.p[4] = 0.0; } else { newShape->shape = elliptannulus_rgn; newShape->param.gen.p[6] = 0.0; newShape->param.gen.p[7] = 0.0; } nCoords = 2; } else if( !strcasecmp( namePtr, "elliptannulus" ) ) { newShape->shape = elliptannulus_rgn; if( !( nParams==8 || nParams==6 ) ) *status = PARSE_SYNTAX_ERR; newShape->param.gen.p[6] = 0.0; newShape->param.gen.p[7] = 0.0; nCoords = 2; } else if( !strcasecmp( namePtr, "box" ) || !strcasecmp( namePtr, "rotbox" ) ) { if( nParams < 4 || nParams > 8 ) { *status = PARSE_SYNTAX_ERR; } else if ( nParams < 6 ) { newShape->shape = box_rgn; newShape->param.gen.p[4] = 0.0; } else { newShape->shape = boxannulus_rgn; newShape->param.gen.p[6] = 0.0; newShape->param.gen.p[7] = 0.0; } nCoords = 2; } else if( !strcasecmp( namePtr, "rectangle" ) || !strcasecmp( namePtr, "rotrectangle" ) ) { newShape->shape = rectangle_rgn; if( nParams < 4 || nParams > 5 ) *status = PARSE_SYNTAX_ERR; newShape->param.gen.p[4] = 0.0; nCoords = 4; } else if( !strcasecmp( namePtr, "diamond" ) || !strcasecmp( namePtr, "rotdiamond" ) || !strcasecmp( namePtr, "rhombus" ) || !strcasecmp( namePtr, "rotrhombus" ) ) { newShape->shape = diamond_rgn; if( nParams < 4 || nParams > 5 ) *status = PARSE_SYNTAX_ERR; newShape->param.gen.p[4] = 0.0; nCoords = 2; } else if( !strcasecmp( namePtr, "sector" ) || !strcasecmp( namePtr, "pie" ) ) { newShape->shape = sector_rgn; if( nParams != 4 ) *status = PARSE_SYNTAX_ERR; nCoords = 2; } else if( !strcasecmp( namePtr, "point" ) ) { newShape->shape = point_rgn; if( nParams != 2 ) *status = PARSE_SYNTAX_ERR; nCoords = 2; } else if( !strcasecmp( namePtr, "line" ) ) { newShape->shape = line_rgn; if( nParams != 4 ) *status = PARSE_SYNTAX_ERR; nCoords = 4; } else if( !strcasecmp( namePtr, "polygon" ) ) { newShape->shape = poly_rgn; if( nParams < 6 || (nParams&1) ) *status = PARSE_SYNTAX_ERR; nCoords = nParams; } else if( !strcasecmp( namePtr, "panda" ) ) { newShape->shape = panda_rgn; if( nParams != 8 ) *status = PARSE_SYNTAX_ERR; nCoords = 2; } else if( !strcasecmp( namePtr, "epanda" ) ) { newShape->shape = epanda_rgn; if( nParams < 10 || nParams > 11 ) *status = PARSE_SYNTAX_ERR; newShape->param.gen.p[10] = 0.0; nCoords = 2; } else if( !strcasecmp( namePtr, "bpanda" ) ) { newShape->shape = bpanda_rgn; if( nParams < 10 || nParams > 11 ) *status = PARSE_SYNTAX_ERR; newShape->param.gen.p[10] = 0.0; nCoords = 2; } else { ffpmsg( "Unrecognized region found in region file:" ); ffpmsg( namePtr ); *status = PARSE_SYNTAX_ERR; goto error; } if( *status ) { ffpmsg( "Wrong number of parameters found for region" ); ffpmsg( namePtr ); goto error; } /* Parse Parameter string... convert to pixels if necessary */ if( newShape->shape==poly_rgn ) { newShape->param.poly.Pts = (double *)malloc( nParams * sizeof(double) ); if( !newShape->param.poly.Pts ) { ffpmsg( "Could not allocate memory to hold polygon parameters" ); *status = MEMORY_ALLOCATION; goto error; } newShape->param.poly.nPts = nParams; coords = newShape->param.poly.Pts; } else coords = newShape->param.gen.p; /* Parse the initial "WCS?" coordinates */ for( i=0; iexists ) { ffpmsg("WCS information needed to convert region coordinates."); *status = NO_WCS_KEY; goto error; } if( ffxypx( X, Y, wcs->xrefval, wcs->yrefval, wcs->xrefpix, wcs->yrefpix, wcs->xinc, wcs->yinc, wcs->rot, wcs->type, &x, &y, status ) ) { ffpmsg("Error converting region to pixel coordinates."); goto error; } X = x; Y = y; } coords[i] = X; coords[i+1] = Y; } /* Read in remaining parameters... */ for( ; ixrefval, wcs->yrefval, wcs->xrefpix, wcs->yrefpix, wcs->xinc, wcs->yinc, wcs->rot, wcs->type, &x, &y, status ) ) { ffpmsg("Error converting region to pixel coordinates."); goto error; } coords[i] = sqrt( pow(x-coords[0],2) + pow(y-coords[1],2) ); } } /* special case for elliptannulus and boxannulus if only one angle was given */ if ( (newShape->shape == elliptannulus_rgn || newShape->shape == boxannulus_rgn ) && nParams == 7 ) { coords[7] = coords[6]; } /* Also, correct the position angle for any WCS rotation: */ /* If regions are specified in WCS coordintes, then the angles */ /* are relative to the WCS system, not the pixel X,Y system */ if( cFmt!=pixel_fmt ) { switch( newShape->shape ) { case sector_rgn: case panda_rgn: coords[2] += (wcs->rot); coords[3] += (wcs->rot); break; case box_rgn: case rectangle_rgn: case diamond_rgn: case ellipse_rgn: coords[4] += (wcs->rot); break; case boxannulus_rgn: case elliptannulus_rgn: coords[6] += (wcs->rot); coords[7] += (wcs->rot); break; case epanda_rgn: case bpanda_rgn: coords[2] += (wcs->rot); coords[3] += (wcs->rot); coords[10] += (wcs->rot); } } /* do some precalculations to speed up tests */ fits_setup_shape(newShape); } /* End of while( *currLoc ) */ /* if (coords)printf("%.8f %.8f %.8f %.8f %.8f\n", coords[0],coords[1],coords[2],coords[3],coords[4]); */ } /* End of if...else parse line */ } /* End of while( fgets(rgnFile) ) */ /* set up component numbers */ fits_set_region_components( aRgn ); error: if( *status ) { fits_free_region( aRgn ); } else { *Rgn = aRgn; } fclose( rgnFile ); free( currLine ); return( *status ); } /*---------------------------------------------------------------------------*/ int fits_in_region( double X, double Y, SAORegion *Rgn ) /* Test if the given point is within the region described by Rgn. X and */ /* Y are in pixel coordinates. */ /*---------------------------------------------------------------------------*/ { double x, y, dx, dy, xprime, yprime, r, th; RgnShape *Shapes; int i, cur_comp; int result, comp_result; Shapes = Rgn->Shapes; result = 0; comp_result = 0; cur_comp = Rgn->Shapes[0].comp; for( i=0; inShapes; i++, Shapes++ ) { /* if this region has a different component number to the last one */ /* then replace the accumulated selection logical with the union of */ /* the current logical and the total logical. Reinitialize the */ /* temporary logical. */ if ( i==0 || Shapes->comp != cur_comp ) { result = result || comp_result; cur_comp = Shapes->comp; /* if an excluded region is given first, then implicitly */ /* assume a previous shape that includes the entire image. */ comp_result = !Shapes->sign; } /* only need to test if */ /* the point is not already included and this is an include region, */ /* or the point is included and this is an excluded region */ if ( (!comp_result && Shapes->sign) || (comp_result && !Shapes->sign) ) { comp_result = 1; switch( Shapes->shape ) { case box_rgn: /* Shift origin to center of region */ xprime = X - Shapes->param.gen.p[0]; yprime = Y - Shapes->param.gen.p[1]; /* Rotate point to region's orientation */ x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; dx = 0.5 * Shapes->param.gen.p[2]; dy = 0.5 * Shapes->param.gen.p[3]; if( (x < -dx) || (x > dx) || (y < -dy) || (y > dy) ) comp_result = 0; break; case boxannulus_rgn: /* Shift origin to center of region */ xprime = X - Shapes->param.gen.p[0]; yprime = Y - Shapes->param.gen.p[1]; /* Rotate point to region's orientation */ x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; dx = 0.5 * Shapes->param.gen.p[4]; dy = 0.5 * Shapes->param.gen.p[5]; if( (x < -dx) || (x > dx) || (y < -dy) || (y > dy) ) { comp_result = 0; } else { /* Repeat test for inner box */ x = xprime * Shapes->param.gen.b + yprime * Shapes->param.gen.a; y = -xprime * Shapes->param.gen.a + yprime * Shapes->param.gen.b; dx = 0.5 * Shapes->param.gen.p[2]; dy = 0.5 * Shapes->param.gen.p[3]; if( (x >= -dx) && (x <= dx) && (y >= -dy) && (y <= dy) ) comp_result = 0; } break; case rectangle_rgn: /* Shift origin to center of region */ xprime = X - Shapes->param.gen.p[5]; yprime = Y - Shapes->param.gen.p[6]; /* Rotate point to region's orientation */ x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; dx = Shapes->param.gen.a; dy = Shapes->param.gen.b; if( (x < -dx) || (x > dx) || (y < -dy) || (y > dy) ) comp_result = 0; break; case diamond_rgn: /* Shift origin to center of region */ xprime = X - Shapes->param.gen.p[0]; yprime = Y - Shapes->param.gen.p[1]; /* Rotate point to region's orientation */ x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; dx = 0.5 * Shapes->param.gen.p[2]; dy = 0.5 * Shapes->param.gen.p[3]; r = fabs(x/dx) + fabs(y/dy); if( r > 1 ) comp_result = 0; break; case circle_rgn: /* Shift origin to center of region */ x = X - Shapes->param.gen.p[0]; y = Y - Shapes->param.gen.p[1]; r = x*x + y*y; if ( r > Shapes->param.gen.a ) comp_result = 0; break; case annulus_rgn: /* Shift origin to center of region */ x = X - Shapes->param.gen.p[0]; y = Y - Shapes->param.gen.p[1]; r = x*x + y*y; if ( r < Shapes->param.gen.a || r > Shapes->param.gen.b ) comp_result = 0; break; case sector_rgn: /* Shift origin to center of region */ x = X - Shapes->param.gen.p[0]; y = Y - Shapes->param.gen.p[1]; if( x || y ) { r = atan2( y, x ) * RadToDeg; if( Shapes->param.gen.p[2] <= Shapes->param.gen.p[3] ) { if( r < Shapes->param.gen.p[2] || r > Shapes->param.gen.p[3] ) comp_result = 0; } else { if( r < Shapes->param.gen.p[2] && r > Shapes->param.gen.p[3] ) comp_result = 0; } } break; case ellipse_rgn: /* Shift origin to center of region */ xprime = X - Shapes->param.gen.p[0]; yprime = Y - Shapes->param.gen.p[1]; /* Rotate point to region's orientation */ x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; x /= Shapes->param.gen.p[2]; y /= Shapes->param.gen.p[3]; r = x*x + y*y; if( r>1.0 ) comp_result = 0; break; case elliptannulus_rgn: /* Shift origin to center of region */ xprime = X - Shapes->param.gen.p[0]; yprime = Y - Shapes->param.gen.p[1]; /* Rotate point to outer ellipse's orientation */ x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; x /= Shapes->param.gen.p[4]; y /= Shapes->param.gen.p[5]; r = x*x + y*y; if( r>1.0 ) comp_result = 0; else { /* Repeat test for inner ellipse */ x = xprime * Shapes->param.gen.b + yprime * Shapes->param.gen.a; y = -xprime * Shapes->param.gen.a + yprime * Shapes->param.gen.b; x /= Shapes->param.gen.p[2]; y /= Shapes->param.gen.p[3]; r = x*x + y*y; if( r<1.0 ) comp_result = 0; } break; case line_rgn: /* Shift origin to first point of line */ xprime = X - Shapes->param.gen.p[0]; yprime = Y - Shapes->param.gen.p[1]; /* Rotate point to line's orientation */ x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; if( (y < -0.5) || (y >= 0.5) || (x < -0.5) || (x >= Shapes->param.gen.a) ) comp_result = 0; break; case point_rgn: /* Shift origin to center of region */ x = X - Shapes->param.gen.p[0]; y = Y - Shapes->param.gen.p[1]; if ( (x<-0.5) || (x>=0.5) || (y<-0.5) || (y>=0.5) ) comp_result = 0; break; case poly_rgn: if( Xxmin || X>Shapes->xmax || Yymin || Y>Shapes->ymax ) comp_result = 0; else comp_result = Pt_in_Poly( X, Y, Shapes->param.poly.nPts, Shapes->param.poly.Pts ); break; case panda_rgn: /* Shift origin to center of region */ x = X - Shapes->param.gen.p[0]; y = Y - Shapes->param.gen.p[1]; r = x*x + y*y; if ( r < Shapes->param.gen.a || r > Shapes->param.gen.b ) { comp_result = 0; } else { if( x || y ) { th = atan2( y, x ) * RadToDeg; if( Shapes->param.gen.p[2] <= Shapes->param.gen.p[3] ) { if( th < Shapes->param.gen.p[2] || th > Shapes->param.gen.p[3] ) comp_result = 0; } else { if( th < Shapes->param.gen.p[2] && th > Shapes->param.gen.p[3] ) comp_result = 0; } } } break; case epanda_rgn: /* Shift origin to center of region */ xprime = X - Shapes->param.gen.p[0]; yprime = Y - Shapes->param.gen.p[1]; /* Rotate point to region's orientation */ x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; xprime = x; yprime = y; /* outer region test */ x = xprime/Shapes->param.gen.p[7]; y = yprime/Shapes->param.gen.p[8]; r = x*x + y*y; if ( r>1.0 ) comp_result = 0; else { /* inner region test */ x = xprime/Shapes->param.gen.p[5]; y = yprime/Shapes->param.gen.p[6]; r = x*x + y*y; if ( r<1.0 ) comp_result = 0; else { /* angle test */ if( xprime || yprime ) { th = atan2( yprime, xprime ) * RadToDeg; if( Shapes->param.gen.p[2] <= Shapes->param.gen.p[3] ) { if( th < Shapes->param.gen.p[2] || th > Shapes->param.gen.p[3] ) comp_result = 0; } else { if( th < Shapes->param.gen.p[2] && th > Shapes->param.gen.p[3] ) comp_result = 0; } } } } break; case bpanda_rgn: /* Shift origin to center of region */ xprime = X - Shapes->param.gen.p[0]; yprime = Y - Shapes->param.gen.p[1]; /* Rotate point to region's orientation */ x = xprime * Shapes->param.gen.cosT + yprime * Shapes->param.gen.sinT; y = -xprime * Shapes->param.gen.sinT + yprime * Shapes->param.gen.cosT; /* outer box test */ dx = 0.5 * Shapes->param.gen.p[7]; dy = 0.5 * Shapes->param.gen.p[8]; if( (x < -dx) || (x > dx) || (y < -dy) || (y > dy) ) comp_result = 0; else { /* inner box test */ dx = 0.5 * Shapes->param.gen.p[5]; dy = 0.5 * Shapes->param.gen.p[6]; if( (x >= -dx) && (x <= dx) && (y >= -dy) && (y <= dy) ) comp_result = 0; else { /* angle test */ if( x || y ) { th = atan2( y, x ) * RadToDeg; if( Shapes->param.gen.p[2] <= Shapes->param.gen.p[3] ) { if( th < Shapes->param.gen.p[2] || th > Shapes->param.gen.p[3] ) comp_result = 0; } else { if( th < Shapes->param.gen.p[2] && th > Shapes->param.gen.p[3] ) comp_result = 0; } } } } break; } if( !Shapes->sign ) comp_result = !comp_result; } } result = result || comp_result; return( result ); } /*---------------------------------------------------------------------------*/ void fits_free_region( SAORegion *Rgn ) /* Free up memory allocated to hold the region data. */ /*---------------------------------------------------------------------------*/ { int i; for( i=0; inShapes; i++ ) if( Rgn->Shapes[i].shape == poly_rgn ) free( Rgn->Shapes[i].param.poly.Pts ); if( Rgn->Shapes ) free( Rgn->Shapes ); free( Rgn ); } /*---------------------------------------------------------------------------*/ static int Pt_in_Poly( double x, double y, int nPts, double *Pts ) /* Internal routine for testing whether the coordinate x,y is within the */ /* polygon region traced out by the array Pts. */ /*---------------------------------------------------------------------------*/ { int i, j, flag=0; double prevX, prevY; double nextX, nextY; double dx, dy, Dy; nextX = Pts[nPts-2]; nextY = Pts[nPts-1]; for( i=0; iprevY && y>=nextY) || (yprevX && x>=nextX) ) continue; /* Check to see if x,y lies right on the segment */ if( x>=prevX || x>nextX ) { dy = y - prevY; Dy = nextY - prevY; if( fabs(Dy)<1e-10 ) { if( fabs(dy)<1e-10 ) return( 1 ); else continue; } dx = prevX + ( (nextX-prevX)/(Dy) ) * dy - x; if( dx < -1e-10 ) continue; if( dx < 1e-10 ) return( 1 ); } /* There is an intersection! Make sure it isn't a V point. */ if( y != prevY ) { flag = 1 - flag; } else { j = i+1; /* Point to Y component */ do { if( j>1 ) j -= 2; else j = nPts-1; } while( y == Pts[j] ); if( (nextY-y)*(y-Pts[j]) > 0 ) flag = 1-flag; } } return( flag ); } /*---------------------------------------------------------------------------*/ void fits_set_region_components ( SAORegion *aRgn ) { /* Internal routine to turn a collection of regions read from an ascii file into the more complex structure that is allowed by the FITS REGION extension with multiple components. Regions are anded within components and ored between them ie for a pixel to be selected it must be selected by at least one component and to be selected by a component it must be selected by all that component's shapes. The algorithm is to replicate every exclude region after every include region before it in the list. eg reg1, reg2, -reg3, reg4, -reg5 becomes (reg1, -reg3, -reg5), (reg2, -reg5, -reg3), (reg4, -reg5) where the parentheses designate components. */ int i, j, k, icomp; /* loop round shapes */ i = 0; while ( inShapes ) { /* first do the case of an exclude region */ if ( !aRgn->Shapes[i].sign ) { /* we need to run back through the list copying the current shape as required. start by findin the first include shape before this exclude */ j = i-1; while ( j > 0 && !aRgn->Shapes[j].sign ) j--; /* then go back one more shape */ j--; /* and loop back through the regions */ while ( j >= 0 ) { /* if this is an include region then insert a copy of the exclude region immediately after it */ if ( aRgn->Shapes[j].sign ) { aRgn->Shapes = (RgnShape *) realloc (aRgn->Shapes,(1+aRgn->nShapes)*sizeof(RgnShape)); aRgn->nShapes++; for (k=aRgn->nShapes-1; k>j+1; k--) aRgn->Shapes[k] = aRgn->Shapes[k-1]; i++; aRgn->Shapes[j+1] = aRgn->Shapes[i]; } j--; } } i++; } /* now set the component numbers */ icomp = 0; for ( i=0; inShapes; i++ ) { if ( aRgn->Shapes[i].sign ) icomp++; aRgn->Shapes[i].comp = icomp; /* printf("i = %d, shape = %d, sign = %d, comp = %d\n", i, aRgn->Shapes[i].shape, aRgn->Shapes[i].sign, aRgn->Shapes[i].comp); */ } return; } /*---------------------------------------------------------------------------*/ void fits_setup_shape ( RgnShape *newShape) { /* Perform some useful calculations now to speed up filter later */ double X, Y, R; double *coords; int i; if ( newShape->shape == poly_rgn ) { coords = newShape->param.poly.Pts; } else { coords = newShape->param.gen.p; } switch( newShape->shape ) { case circle_rgn: newShape->param.gen.a = coords[2] * coords[2]; break; case annulus_rgn: newShape->param.gen.a = coords[2] * coords[2]; newShape->param.gen.b = coords[3] * coords[3]; break; case sector_rgn: while( coords[2]> 180.0 ) coords[2] -= 360.0; while( coords[2]<=-180.0 ) coords[2] += 360.0; while( coords[3]> 180.0 ) coords[3] -= 360.0; while( coords[3]<=-180.0 ) coords[3] += 360.0; break; case ellipse_rgn: newShape->param.gen.sinT = sin( myPI * (coords[4] / 180.0) ); newShape->param.gen.cosT = cos( myPI * (coords[4] / 180.0) ); break; case elliptannulus_rgn: newShape->param.gen.a = sin( myPI * (coords[6] / 180.0) ); newShape->param.gen.b = cos( myPI * (coords[6] / 180.0) ); newShape->param.gen.sinT = sin( myPI * (coords[7] / 180.0) ); newShape->param.gen.cosT = cos( myPI * (coords[7] / 180.0) ); break; case box_rgn: newShape->param.gen.sinT = sin( myPI * (coords[4] / 180.0) ); newShape->param.gen.cosT = cos( myPI * (coords[4] / 180.0) ); break; case boxannulus_rgn: newShape->param.gen.a = sin( myPI * (coords[6] / 180.0) ); newShape->param.gen.b = cos( myPI * (coords[6] / 180.0) ); newShape->param.gen.sinT = sin( myPI * (coords[7] / 180.0) ); newShape->param.gen.cosT = cos( myPI * (coords[7] / 180.0) ); break; case rectangle_rgn: newShape->param.gen.sinT = sin( myPI * (coords[4] / 180.0) ); newShape->param.gen.cosT = cos( myPI * (coords[4] / 180.0) ); X = 0.5 * ( coords[2]-coords[0] ); Y = 0.5 * ( coords[3]-coords[1] ); newShape->param.gen.a = fabs( X * newShape->param.gen.cosT + Y * newShape->param.gen.sinT ); newShape->param.gen.b = fabs( Y * newShape->param.gen.cosT - X * newShape->param.gen.sinT ); newShape->param.gen.p[5] = 0.5 * ( coords[2]+coords[0] ); newShape->param.gen.p[6] = 0.5 * ( coords[3]+coords[1] ); break; case diamond_rgn: newShape->param.gen.sinT = sin( myPI * (coords[4] / 180.0) ); newShape->param.gen.cosT = cos( myPI * (coords[4] / 180.0) ); break; case line_rgn: X = coords[2] - coords[0]; Y = coords[3] - coords[1]; R = sqrt( X*X + Y*Y ); newShape->param.gen.sinT = ( R ? Y/R : 0.0 ); newShape->param.gen.cosT = ( R ? X/R : 1.0 ); newShape->param.gen.a = R + 0.5; break; case panda_rgn: while( coords[2]> 180.0 ) coords[2] -= 360.0; while( coords[2]<=-180.0 ) coords[2] += 360.0; while( coords[3]> 180.0 ) coords[3] -= 360.0; while( coords[3]<=-180.0 ) coords[3] += 360.0; newShape->param.gen.a = newShape->param.gen.p[5]*newShape->param.gen.p[5]; newShape->param.gen.b = newShape->param.gen.p[6]*newShape->param.gen.p[6]; break; case epanda_rgn: case bpanda_rgn: while( coords[2]> 180.0 ) coords[2] -= 360.0; while( coords[2]<=-180.0 ) coords[2] += 360.0; while( coords[3]> 180.0 ) coords[3] -= 360.0; while( coords[3]<=-180.0 ) coords[3] += 360.0; newShape->param.gen.sinT = sin( myPI * (coords[10] / 180.0) ); newShape->param.gen.cosT = cos( myPI * (coords[10] / 180.0) ); break; } /* Set the xmin, xmax, ymin, ymax elements of the RgnShape structure */ /* For everything which has first two parameters as center position just */ /* find a circle that encompasses the region and use it to set the */ /* bounding box */ R = -1.0; switch ( newShape->shape ) { case circle_rgn: R = coords[2]; break; case annulus_rgn: R = coords[3]; break; case ellipse_rgn: if ( coords[2] > coords[3] ) { R = coords[2]; } else { R = coords[3]; } break; case elliptannulus_rgn: if ( coords[4] > coords[5] ) { R = coords[4]; } else { R = coords[5]; } break; case box_rgn: R = sqrt(coords[2]*coords[2]+ coords[3]*coords[3])/2.0; break; case boxannulus_rgn: R = sqrt(coords[4]*coords[5]+ coords[4]*coords[5])/2.0; break; case diamond_rgn: if ( coords[2] > coords[3] ) { R = coords[2]/2.0; } else { R = coords[3]/2.0; } break; case point_rgn: R = 1.0; break; case panda_rgn: R = coords[6]; break; case epanda_rgn: if ( coords[7] > coords[8] ) { R = coords[7]; } else { R = coords[8]; } break; case bpanda_rgn: R = sqrt(coords[7]*coords[8]+ coords[7]*coords[8])/2.0; break; } if ( R > 0.0 ) { newShape->xmin = coords[0] - R; newShape->xmax = coords[0] + R; newShape->ymin = coords[1] - R; newShape->ymax = coords[1] + R; return; } /* Now do the rest of the shapes that require individual methods */ switch ( newShape->shape ) { case rectangle_rgn: R = sqrt((coords[5]-coords[0])*(coords[5]-coords[0])+ (coords[6]-coords[1])*(coords[6]-coords[1])); newShape->xmin = coords[5] - R; newShape->xmax = coords[5] + R; newShape->ymin = coords[6] - R; newShape->ymax = coords[6] + R; break; case poly_rgn: newShape->xmin = coords[0]; newShape->xmax = coords[0]; newShape->ymin = coords[1]; newShape->ymax = coords[1]; for( i=2; i < newShape->param.poly.nPts; ) { if( newShape->xmin > coords[i] ) /* Min X */ newShape->xmin = coords[i]; if( newShape->xmax < coords[i] ) /* Max X */ newShape->xmax = coords[i]; i++; if( newShape->ymin > coords[i] ) /* Min Y */ newShape->ymin = coords[i]; if( newShape->ymax < coords[i] ) /* Max Y */ newShape->ymax = coords[i]; i++; } break; case line_rgn: if ( coords[0] > coords[2] ) { newShape->xmin = coords[2]; newShape->xmax = coords[0]; } else { newShape->xmin = coords[0]; newShape->xmax = coords[2]; } if ( coords[1] > coords[3] ) { newShape->ymin = coords[3]; newShape->ymax = coords[1]; } else { newShape->ymin = coords[1]; newShape->ymax = coords[3]; } break; /* sector doesn't have min and max so indicate by setting max < min */ case sector_rgn: newShape->xmin = 1.0; newShape->xmax = -1.0; newShape->ymin = 1.0; newShape->ymax = -1.0; break; } return; } /*---------------------------------------------------------------------------*/ int fits_read_fits_region ( fitsfile *fptr, WCSdata *wcs, SAORegion **Rgn, int *status) /* Read regions from a FITS region extension and return the information */ /* in the "SAORegion" structure. If it is nonNULL, use wcs to convert the */ /* region coordinates to pixels. Return an error if region is in degrees */ /* but no WCS data is provided. */ /*---------------------------------------------------------------------------*/ { int i, j, icol[6], idum, anynul, npos; int dotransform, got_component = 1, tstatus; long icsize[6]; double X, Y, Theta, Xsave, Ysave, Xpos, Ypos; double *coords; char *cvalue, *cvalue2; char comment[FLEN_COMMENT]; char colname[6][FLEN_VALUE] = {"X", "Y", "SHAPE", "R", "ROTANG", "COMPONENT"}; char shapename[17][FLEN_VALUE] = {"POINT","CIRCLE","ELLIPSE","ANNULUS", "ELLIPTANNULUS","BOX","ROTBOX","BOXANNULUS", "RECTANGLE","ROTRECTANGLE","POLYGON","PIE", "SECTOR","DIAMOND","RHOMBUS","ROTDIAMOND", "ROTRHOMBUS"}; int shapetype[17] = {point_rgn, circle_rgn, ellipse_rgn, annulus_rgn, elliptannulus_rgn, box_rgn, box_rgn, boxannulus_rgn, rectangle_rgn, rectangle_rgn, poly_rgn, sector_rgn, sector_rgn, diamond_rgn, diamond_rgn, diamond_rgn, diamond_rgn}; SAORegion *aRgn; RgnShape *newShape; WCSdata *regwcs; if ( *status ) return( *status ); aRgn = (SAORegion *)malloc( sizeof(SAORegion) ); if( ! aRgn ) { ffpmsg("Couldn't allocate memory to hold Region file contents."); return(*status = MEMORY_ALLOCATION ); } aRgn->nShapes = 0; aRgn->Shapes = NULL; if( wcs && wcs->exists ) aRgn->wcs = *wcs; else aRgn->wcs.exists = 0; /* See if we are already positioned to a region extension, else */ /* move to the REGION extension (file is already open). */ tstatus = 0; for (i=0; i<5; i++) { ffgcno(fptr, CASEINSEN, colname[i], &icol[i], &tstatus); } if (tstatus) { /* couldn't find the required columns, so search for "REGION" extension */ if ( ffmnhd(fptr, BINARY_TBL, "REGION", 1, status) ) { ffpmsg("Could not move to REGION extension."); goto error; } } /* get the number of shapes and allocate memory */ if ( ffgky(fptr, TINT, "NAXIS2", &aRgn->nShapes, comment, status) ) { ffpmsg("Could not read NAXIS2 keyword."); goto error; } aRgn->Shapes = (RgnShape *) malloc(aRgn->nShapes * sizeof(RgnShape)); if ( !aRgn->Shapes ) { ffpmsg( "Failed to allocate memory for Region data"); *status = MEMORY_ALLOCATION; goto error; } /* get the required column numbers */ for (i=0; i<5; i++) { if ( ffgcno(fptr, CASEINSEN, colname[i], &icol[i], status) ) { ffpmsg("Could not find column."); goto error; } } /* try to get the optional column numbers */ if ( ffgcno(fptr, CASEINSEN, colname[5], &icol[5], status) ) { got_component = 0; } /* if there was input WCS then read the WCS info for the region in case they */ /* are different and we have to transform */ dotransform = 0; if ( aRgn->wcs.exists ) { regwcs = (WCSdata *) malloc ( sizeof(WCSdata) ); if ( !regwcs ) { ffpmsg( "Failed to allocate memory for Region WCS data"); *status = MEMORY_ALLOCATION; goto error; } regwcs->exists = 1; if ( ffgtcs(fptr, icol[0], icol[1], ®wcs->xrefval, ®wcs->yrefval, ®wcs->xrefpix, ®wcs->yrefpix, ®wcs->xinc, ®wcs->yinc, ®wcs->rot, regwcs->type, status) ) { regwcs->exists = 0; *status = 0; } if ( regwcs->exists && wcs->exists ) { if ( fabs(regwcs->xrefval-wcs->xrefval) > 1.0e-6 || fabs(regwcs->yrefval-wcs->yrefval) > 1.0e-6 || fabs(regwcs->xrefpix-wcs->xrefpix) > 1.0e-6 || fabs(regwcs->yrefpix-wcs->yrefpix) > 1.0e-6 || fabs(regwcs->xinc-wcs->xinc) > 1.0e-6 || fabs(regwcs->yinc-wcs->yinc) > 1.0e-6 || fabs(regwcs->rot-wcs->rot) > 1.0e-6 || !strcmp(regwcs->type,wcs->type) ) dotransform = 1; } } /* get the sizes of the X, Y, R, and ROTANG vectors */ for (i=0; i<6; i++) { if ( ffgtdm(fptr, icol[i], 1, &idum, &icsize[i], status) ) { ffpmsg("Could not find vector size of column."); goto error; } } cvalue = (char *) malloc ((FLEN_VALUE+1)*sizeof(char)); /* loop over the shapes - note 1-based counting for rows in FITS files */ for (i=1; i<=aRgn->nShapes; i++) { newShape = &aRgn->Shapes[i-1]; for (j=0; j<8; j++) newShape->param.gen.p[j] = 0.0; newShape->param.gen.a = 0.0; newShape->param.gen.b = 0.0; newShape->param.gen.sinT = 0.0; newShape->param.gen.cosT = 0.0; /* get the shape */ if ( ffgcvs(fptr, icol[2], i, 1, 1, " ", &cvalue, &anynul, status) ) { ffpmsg("Could not read shape."); goto error; } /* set include or exclude */ newShape->sign = 1; cvalue2 = cvalue; if ( !strncmp(cvalue,"!",1) ) { newShape->sign = 0; cvalue2++; } /* set the shape type */ for (j=0; j<9; j++) { if ( !strcmp(cvalue2, shapename[j]) ) newShape->shape = shapetype[j]; } /* allocate memory for polygon case and set coords pointer */ if ( newShape->shape == poly_rgn ) { newShape->param.poly.Pts = (double *) calloc (2*icsize[0], sizeof(double)); if ( !newShape->param.poly.Pts ) { ffpmsg("Could not allocate memory to hold polygon parameters" ); *status = MEMORY_ALLOCATION; goto error; } newShape->param.poly.nPts = 2*icsize[0]; coords = newShape->param.poly.Pts; } else { coords = newShape->param.gen.p; } /* read X and Y. Polygon and Rectangle require special cases */ npos = 1; if ( newShape->shape == poly_rgn ) npos = newShape->param.poly.nPts/2; if ( newShape->shape == rectangle_rgn ) npos = 2; for (j=0; jparam.poly.nPts = npos * 2; break; } coords++; if ( ffgcvd(fptr, icol[1], i, j+1, 1, DOUBLENULLVALUE, coords, &anynul, status) ) { ffpmsg("Failed to read Y column for polygon region"); goto error; } if (*coords == DOUBLENULLVALUE) { /* check for null value end of array marker */ npos = j; newShape->param.poly.nPts = npos * 2; coords--; break; } coords++; if (j == 0) { /* save the first X and Y coordinate */ Xsave = *(coords - 2); Ysave = *(coords - 1); } else if ((Xsave == *(coords - 2)) && (Ysave == *(coords - 1)) ) { /* if point has same coordinate as first point, this marks the end of the array */ npos = j + 1; newShape->param.poly.nPts = npos * 2; break; } } /* transform positions if the region and input wcs differ */ if ( dotransform ) { coords -= npos*2; Xsave = coords[0]; Ysave = coords[1]; for (j=0; jxrefval, regwcs->yrefval, regwcs->xrefpix, regwcs->yrefpix, regwcs->xinc, regwcs->yinc, regwcs->rot, regwcs->type, &Xpos, &Ypos, status); ffxypx(Xpos, Ypos, wcs->xrefval, wcs->yrefval, wcs->xrefpix, wcs->yrefpix, wcs->xinc, wcs->yinc, wcs->rot, wcs->type, &coords[2*j], &coords[2*j+1], status); if ( *status ) { ffpmsg("Failed to transform coordinates"); goto error; } } coords += npos*2; } /* read R. Circle requires one number; Box, Diamond, Ellipse, Annulus, Sector and Panda two; Boxannulus and Elliptannulus four; Point, Rectangle and Polygon none. */ npos = 0; switch ( newShape->shape ) { case circle_rgn: npos = 1; break; case box_rgn: case diamond_rgn: case ellipse_rgn: case annulus_rgn: case sector_rgn: npos = 2; break; case boxannulus_rgn: case elliptannulus_rgn: npos = 4; break; } if ( npos > 0 ) { if ( ffgcvd(fptr, icol[3], i, 1, npos, 0.0, coords, &anynul, status) ) { ffpmsg("Failed to read R column for region"); goto error; } /* transform lengths if the region and input wcs differ */ if ( dotransform ) { for (j=0; jxrefval, regwcs->yrefval, regwcs->xrefpix, regwcs->yrefpix, regwcs->xinc, regwcs->yinc, regwcs->rot, regwcs->type, &Xpos, &Ypos, status); ffxypx(Xpos, Ypos, wcs->xrefval, wcs->yrefval, wcs->xrefpix, wcs->yrefpix, wcs->xinc, wcs->yinc, wcs->rot, wcs->type, &X, &Y, status); if ( *status ) { ffpmsg("Failed to transform coordinates"); goto error; } *(coords++) = sqrt(pow(X-newShape->param.gen.p[0],2)+pow(Y-newShape->param.gen.p[1],2)); } } else { coords += npos; } } /* read ROTANG. Requires two values for Boxannulus, Elliptannulus, Sector, Panda; one for Box, Diamond, Ellipse; and none for Circle, Point, Annulus, Rectangle, Polygon */ npos = 0; switch ( newShape->shape ) { case box_rgn: case diamond_rgn: case ellipse_rgn: npos = 1; break; case boxannulus_rgn: case elliptannulus_rgn: case sector_rgn: npos = 2; break; } if ( npos > 0 ) { if ( ffgcvd(fptr, icol[4], i, 1, npos, 0.0, coords, &anynul, status) ) { ffpmsg("Failed to read ROTANG column for region"); goto error; } /* transform angles if the region and input wcs differ */ if ( dotransform ) { Theta = (wcs->rot) - (regwcs->rot); for (j=0; jcomp, &anynul, status) ) { ffpmsg("Failed to read COMPONENT column for region"); goto error; } } else { newShape->comp = 1; } /* do some precalculations to speed up tests */ fits_setup_shape(newShape); /* end loop over shapes */ } error: if( *status ) fits_free_region( aRgn ); else *Rgn = aRgn; ffclos(fptr, status); return( *status ); } astropy-1.1.1/cextern/cfitsio/fits_hcompress.c0000644001134200020070000013365012602615517022440 0ustar embrayscience00000000000000/* ######################################################################### These routines to apply the H-compress compression algorithm to a 2-D Fits image were written by R. White at the STScI and were obtained from the STScI at http://www.stsci.edu/software/hcompress.html This source file is a concatination of the following sources files in the original distribution htrans.c digitize.c encode.c qwrite.c doencode.c bit_output.c qtree_encode.c The following modifications have been made to the original code: - commented out redundant "include" statements - added the noutchar global variable - changed all the 'extern' declarations to 'static', since all the routines are in the same source file - changed the first parameter in encode (and in lower level routines from a file stream to a char array - modifid the encode routine to return the size of the compressed array of bytes - changed calls to printf and perror to call the CFITSIO ffpmsg routine - modified the mywrite routine, and lower level byte writing routines, to copy the output bytes to a char array, instead of writing them to a file stream - replace "exit" statements with "return" statements - changed the function declarations to the more modern ANSI C style ############################################################################ */ #include #include #include #include #include "fitsio2.h" static long noutchar; static long noutmax; static int htrans(int a[],int nx,int ny); static void digitize(int a[], int nx, int ny, int scale); static int encode(char *outfile, long *nlen, int a[], int nx, int ny, int scale); static void shuffle(int a[], int n, int n2, int tmp[]); static int htrans64(LONGLONG a[],int nx,int ny); static void digitize64(LONGLONG a[], int nx, int ny, int scale); static int encode64(char *outfile, long *nlen, LONGLONG a[], int nx, int ny, int scale); static void shuffle64(LONGLONG a[], int n, int n2, LONGLONG tmp[]); static void writeint(char *outfile, int a); static void writelonglong(char *outfile, LONGLONG a); static int doencode(char *outfile, int a[], int nx, int ny, unsigned char nbitplanes[3]); static int doencode64(char *outfile, LONGLONG a[], int nx, int ny, unsigned char nbitplanes[3]); static int qwrite(char *file, char buffer[], int n); static int qtree_encode(char *outfile, int a[], int n, int nqx, int nqy, int nbitplanes); static int qtree_encode64(char *outfile, LONGLONG a[], int n, int nqx, int nqy, int nbitplanes); static void start_outputing_bits(void); static void done_outputing_bits(char *outfile); static void output_nbits(char *outfile, int bits, int n); static void qtree_onebit(int a[], int n, int nx, int ny, unsigned char b[], int bit); static void qtree_onebit64(LONGLONG a[], int n, int nx, int ny, unsigned char b[], int bit); static void qtree_reduce(unsigned char a[], int n, int nx, int ny, unsigned char b[]); static int bufcopy(unsigned char a[], int n, unsigned char buffer[], int *b, int bmax); static void write_bdirect(char *outfile, int a[], int n,int nqx, int nqy, unsigned char scratch[], int bit); static void write_bdirect64(char *outfile, LONGLONG a[], int n,int nqx, int nqy, unsigned char scratch[], int bit); /* #define output_nybble(outfile,c) output_nbits(outfile,c,4) */ static void output_nybble(char *outfile, int bits); static void output_nnybble(char *outfile, int n, unsigned char array[]); #define output_huffman(outfile,c) output_nbits(outfile,code[c],ncode[c]) /* ---------------------------------------------------------------------- */ int fits_hcompress(int *a, int ny, int nx, int scale, char *output, long *nbytes, int *status) { /* compress the input image using the H-compress algorithm a - input image array nx - size of X axis of image ny - size of Y axis of image scale - quantization scale factor. Larger values results in more (lossy) compression scale = 0 does lossless compression output - pre-allocated array to hold the output compressed stream of bytes nbyts - input value = size of the output buffer; returned value = size of the compressed byte stream, in bytes NOTE: the nx and ny dimensions as defined within this code are reversed from the usual FITS notation. ny is the fastest varying dimension, which is usually considered the X axis in the FITS image display */ int stat; if (*status > 0) return(*status); /* H-transform */ stat = htrans(a, nx, ny); if (stat) { *status = stat; return(*status); } /* digitize */ digitize(a, nx, ny, scale); /* encode and write to output array */ FFLOCK; noutmax = *nbytes; /* input value is the allocated size of the array */ *nbytes = 0; /* reset */ stat = encode(output, nbytes, a, nx, ny, scale); FFUNLOCK; *status = stat; return(*status); } /* ---------------------------------------------------------------------- */ int fits_hcompress64(LONGLONG *a, int ny, int nx, int scale, char *output, long *nbytes, int *status) { /* compress the input image using the H-compress algorithm a - input image array nx - size of X axis of image ny - size of Y axis of image scale - quantization scale factor. Larger values results in more (lossy) compression scale = 0 does lossless compression output - pre-allocated array to hold the output compressed stream of bytes nbyts - size of the compressed byte stream, in bytes NOTE: the nx and ny dimensions as defined within this code are reversed from the usual FITS notation. ny is the fastest varying dimension, which is usually considered the X axis in the FITS image display */ int stat; if (*status > 0) return(*status); /* H-transform */ stat = htrans64(a, nx, ny); if (stat) { *status = stat; return(*status); } /* digitize */ digitize64(a, nx, ny, scale); /* encode and write to output array */ FFLOCK; noutmax = *nbytes; /* input value is the allocated size of the array */ *nbytes = 0; /* reset */ stat = encode64(output, nbytes, a, nx, ny, scale); FFUNLOCK; *status = stat; return(*status); } /* Copyright (c) 1993 Association of Universities for Research * in Astronomy. All rights reserved. Produced under National * Aeronautics and Space Administration Contract No. NAS5-26555. */ /* htrans.c H-transform of NX x NY integer image * * Programmer: R. White Date: 11 May 1992 */ /* ######################################################################### */ static int htrans(int a[],int nx,int ny) { int nmax, log2n, h0, hx, hy, hc, nxtop, nytop, i, j, k; int oddx, oddy; int shift, mask, mask2, prnd, prnd2, nrnd2; int s10, s00; int *tmp; /* * log2n is log2 of max(nx,ny) rounded up to next power of 2 */ nmax = (nx>ny) ? nx : ny; log2n = (int) (log((float) nmax)/log(2.0)+0.5); if ( nmax > (1<> shift; hx = (a[s10+1] + a[s10] - a[s00+1] - a[s00]) >> shift; hy = (a[s10+1] - a[s10] + a[s00+1] - a[s00]) >> shift; hc = (a[s10+1] - a[s10] - a[s00+1] + a[s00]) >> shift; /* * Throw away the 2 bottom bits of h0, bottom bit of hx,hy. * To get rounding to be same for positive and negative * numbers, nrnd2 = prnd2 - 1. */ a[s10+1] = hc; a[s10 ] = ( (hx>=0) ? (hx+prnd) : hx ) & mask ; a[s00+1] = ( (hy>=0) ? (hy+prnd) : hy ) & mask ; a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; s00 += 2; s10 += 2; } if (oddy) { /* * do last element in row if row length is odd * s00+1, s10+1 are off edge */ h0 = (a[s10] + a[s00]) << (1-shift); hx = (a[s10] - a[s00]) << (1-shift); a[s10 ] = ( (hx>=0) ? (hx+prnd) : hx ) & mask ; a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; s00 += 1; s10 += 1; } } if (oddx) { /* * do last row if column length is odd * s10, s10+1 are off edge */ s00 = i*ny; for (j = 0; j=0) ? (hy+prnd) : hy ) & mask ; a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; s00 += 2; } if (oddy) { /* * do corner element if both row and column lengths are odd * s00+1, s10, s10+1 are off edge */ h0 = a[s00] << (2-shift); a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; } } /* * now shuffle in each dimension to group coefficients by order */ for (i = 0; i>1; nytop = (nytop+1)>>1; /* * divisor doubles after first reduction */ shift = 1; /* * masks, rounding values double after each iteration */ mask = mask2; prnd = prnd2; mask2 = mask2 << 1; prnd2 = prnd2 << 1; nrnd2 = prnd2 - 1; } free(tmp); return(0); } /* ######################################################################### */ static int htrans64(LONGLONG a[],int nx,int ny) { int nmax, log2n, nxtop, nytop, i, j, k; int oddx, oddy; int shift; int s10, s00; LONGLONG h0, hx, hy, hc, prnd, prnd2, nrnd2, mask, mask2; LONGLONG *tmp; /* * log2n is log2 of max(nx,ny) rounded up to next power of 2 */ nmax = (nx>ny) ? nx : ny; log2n = (int) (log((float) nmax)/log(2.0)+0.5); if ( nmax > (1<> shift; hx = (a[s10+1] + a[s10] - a[s00+1] - a[s00]) >> shift; hy = (a[s10+1] - a[s10] + a[s00+1] - a[s00]) >> shift; hc = (a[s10+1] - a[s10] - a[s00+1] + a[s00]) >> shift; /* * Throw away the 2 bottom bits of h0, bottom bit of hx,hy. * To get rounding to be same for positive and negative * numbers, nrnd2 = prnd2 - 1. */ a[s10+1] = hc; a[s10 ] = ( (hx>=0) ? (hx+prnd) : hx ) & mask ; a[s00+1] = ( (hy>=0) ? (hy+prnd) : hy ) & mask ; a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; s00 += 2; s10 += 2; } if (oddy) { /* * do last element in row if row length is odd * s00+1, s10+1 are off edge */ h0 = (a[s10] + a[s00]) << (1-shift); hx = (a[s10] - a[s00]) << (1-shift); a[s10 ] = ( (hx>=0) ? (hx+prnd) : hx ) & mask ; a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; s00 += 1; s10 += 1; } } if (oddx) { /* * do last row if column length is odd * s10, s10+1 are off edge */ s00 = i*ny; for (j = 0; j=0) ? (hy+prnd) : hy ) & mask ; a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; s00 += 2; } if (oddy) { /* * do corner element if both row and column lengths are odd * s00+1, s10, s10+1 are off edge */ h0 = a[s00] << (2-shift); a[s00 ] = ( (h0>=0) ? (h0+prnd2) : (h0+nrnd2) ) & mask2; } } /* * now shuffle in each dimension to group coefficients by order */ for (i = 0; i>1; nytop = (nytop+1)>>1; /* * divisor doubles after first reduction */ shift = 1; /* * masks, rounding values double after each iteration */ mask = mask2; prnd = prnd2; mask2 = mask2 << 1; prnd2 = prnd2 << 1; nrnd2 = prnd2 - 1; } free(tmp); return(0); } /* ######################################################################### */ static void shuffle(int a[], int n, int n2, int tmp[]) { /* int a[]; array to shuffle int n; number of elements to shuffle int n2; second dimension int tmp[]; scratch storage */ int i; int *p1, *p2, *pt; /* * copy odd elements to tmp */ pt = tmp; p1 = &a[n2]; for (i=1; i < n; i += 2) { *pt = *p1; pt += 1; p1 += (n2+n2); } /* * compress even elements into first half of A */ p1 = &a[n2]; p2 = &a[n2+n2]; for (i=2; i0) ? (*p+d) : (*p-d))/scale; } /* ######################################################################### */ static void digitize64(LONGLONG a[], int nx, int ny, int scale) { LONGLONG d, *p, scale64; /* * round to multiple of scale */ if (scale <= 1) return; d=(scale+1)/2-1; scale64 = scale; /* use a 64-bit int for efficiency in the big loop */ for (p=a; p <= &a[nx*ny-1]; p++) *p = ((*p>0) ? (*p+d) : (*p-d))/scale64; } /* ######################################################################### */ /* ######################################################################### */ /* Copyright (c) 1993 Association of Universities for Research * in Astronomy. All rights reserved. Produced under National * Aeronautics and Space Administration Contract No. NAS5-26555. */ /* encode.c encode H-transform and write to outfile * * Programmer: R. White Date: 2 February 1994 */ static char code_magic[2] = { (char)0xDD, (char)0x99 }; /* ######################################################################### */ static int encode(char *outfile, long *nlength, int a[], int nx, int ny, int scale) { /* FILE *outfile; - change outfile to a char array */ /* long * nlength returned length (in bytes) of the encoded array) int a[]; input H-transform array (nx,ny) int nx,ny; size of H-transform array int scale; scale factor for digitization */ int nel, nx2, ny2, i, j, k, q, vmax[3], nsign, bits_to_go; unsigned char nbitplanes[3]; unsigned char *signbits; int stat; noutchar = 0; /* initialize the number of compressed bytes that have been written */ nel = nx*ny; /* * write magic value */ qwrite(outfile, code_magic, sizeof(code_magic)); writeint(outfile, nx); /* size of image */ writeint(outfile, ny); writeint(outfile, scale); /* scale factor for digitization */ /* * write first value of A (sum of all pixels -- the only value * which does not compress well) */ writelonglong(outfile, (LONGLONG) a[0]); a[0] = 0; /* * allocate array for sign bits and save values, 8 per byte */ signbits = (unsigned char *) malloc((nel+7)/8); if (signbits == (unsigned char *) NULL) { ffpmsg("encode: insufficient memory"); return(DATA_COMPRESSION_ERR); } nsign = 0; bits_to_go = 8; signbits[0] = 0; for (i=0; i 0) { /* * positive element, put zero at end of buffer */ signbits[nsign] <<= 1; bits_to_go -= 1; } else if (a[i] < 0) { /* * negative element, shift in a one */ signbits[nsign] <<= 1; signbits[nsign] |= 1; bits_to_go -= 1; /* * replace a by absolute value */ a[i] = -a[i]; } if (bits_to_go == 0) { /* * filled up this byte, go to the next one */ bits_to_go = 8; nsign += 1; signbits[nsign] = 0; } } if (bits_to_go != 8) { /* * some bits in last element * move bits in last byte to bottom and increment nsign */ signbits[nsign] <<= bits_to_go; nsign += 1; } /* * calculate number of bit planes for 3 quadrants * * quadrant 0=bottom left, 1=bottom right or top left, 2=top right, */ for (q=0; q<3; q++) { vmax[q] = 0; } /* * get maximum absolute value in each quadrant */ nx2 = (nx+1)/2; ny2 = (ny+1)/2; j=0; /* column counter */ k=0; /* row counter */ for (i=0; i=ny2) + (k>=nx2); if (vmax[q] < a[i]) vmax[q] = a[i]; if (++j >= ny) { j = 0; k += 1; } } /* * now calculate number of bits for each quadrant */ /* this is a more efficient way to do this, */ for (q = 0; q < 3; q++) { for (nbitplanes[q] = 0; vmax[q]>0; vmax[q] = vmax[q]>>1, nbitplanes[q]++) ; } /* for (q = 0; q < 3; q++) { nbitplanes[q] = (int) (log((float) (vmax[q]+1))/log(2.0)+0.5); if ( (vmax[q]+1) > (1< 0) { if ( 0 == qwrite(outfile, (char *) signbits, nsign)) { free(signbits); *nlength = noutchar; ffpmsg("encode: output buffer too small"); return(DATA_COMPRESSION_ERR); } } free(signbits); *nlength = noutchar; if (noutchar >= noutmax) { ffpmsg("encode: output buffer too small"); return(DATA_COMPRESSION_ERR); } return(stat); } /* ######################################################################### */ static int encode64(char *outfile, long *nlength, LONGLONG a[], int nx, int ny, int scale) { /* FILE *outfile; - change outfile to a char array */ /* long * nlength returned length (in bytes) of the encoded array) LONGLONG a[]; input H-transform array (nx,ny) int nx,ny; size of H-transform array int scale; scale factor for digitization */ int nel, nx2, ny2, i, j, k, q, nsign, bits_to_go; LONGLONG vmax[3]; unsigned char nbitplanes[3]; unsigned char *signbits; int stat; noutchar = 0; /* initialize the number of compressed bytes that have been written */ nel = nx*ny; /* * write magic value */ qwrite(outfile, code_magic, sizeof(code_magic)); writeint(outfile, nx); /* size of image */ writeint(outfile, ny); writeint(outfile, scale); /* scale factor for digitization */ /* * write first value of A (sum of all pixels -- the only value * which does not compress well) */ writelonglong(outfile, a[0]); a[0] = 0; /* * allocate array for sign bits and save values, 8 per byte */ signbits = (unsigned char *) malloc((nel+7)/8); if (signbits == (unsigned char *) NULL) { ffpmsg("encode64: insufficient memory"); return(DATA_COMPRESSION_ERR); } nsign = 0; bits_to_go = 8; signbits[0] = 0; for (i=0; i 0) { /* * positive element, put zero at end of buffer */ signbits[nsign] <<= 1; bits_to_go -= 1; } else if (a[i] < 0) { /* * negative element, shift in a one */ signbits[nsign] <<= 1; signbits[nsign] |= 1; bits_to_go -= 1; /* * replace a by absolute value */ a[i] = -a[i]; } if (bits_to_go == 0) { /* * filled up this byte, go to the next one */ bits_to_go = 8; nsign += 1; signbits[nsign] = 0; } } if (bits_to_go != 8) { /* * some bits in last element * move bits in last byte to bottom and increment nsign */ signbits[nsign] <<= bits_to_go; nsign += 1; } /* * calculate number of bit planes for 3 quadrants * * quadrant 0=bottom left, 1=bottom right or top left, 2=top right, */ for (q=0; q<3; q++) { vmax[q] = 0; } /* * get maximum absolute value in each quadrant */ nx2 = (nx+1)/2; ny2 = (ny+1)/2; j=0; /* column counter */ k=0; /* row counter */ for (i=0; i=ny2) + (k>=nx2); if (vmax[q] < a[i]) vmax[q] = a[i]; if (++j >= ny) { j = 0; k += 1; } } /* * now calculate number of bits for each quadrant */ /* this is a more efficient way to do this, */ for (q = 0; q < 3; q++) { for (nbitplanes[q] = 0; vmax[q]>0; vmax[q] = vmax[q]>>1, nbitplanes[q]++) ; } /* for (q = 0; q < 3; q++) { nbitplanes[q] = log((float) (vmax[q]+1))/log(2.0)+0.5; if ( (vmax[q]+1) > (((LONGLONG) 1)< 0) { if ( 0 == qwrite(outfile, (char *) signbits, nsign)) { free(signbits); *nlength = noutchar; ffpmsg("encode: output buffer too small"); return(DATA_COMPRESSION_ERR); } } free(signbits); *nlength = noutchar; if (noutchar >= noutmax) { ffpmsg("encode64: output buffer too small"); return(DATA_COMPRESSION_ERR); } return(stat); } /* ######################################################################### */ /* ######################################################################### */ /* Copyright (c) 1993 Association of Universities for Research * in Astronomy. All rights reserved. Produced under National * Aeronautics and Space Administration Contract No. NAS5-26555. */ /* qwrite.c Write binary data * * Programmer: R. White Date: 11 March 1991 */ /* ######################################################################### */ static void writeint(char *outfile, int a) { int i; unsigned char b[4]; /* Write integer A one byte at a time to outfile. * * This is portable from Vax to Sun since it eliminates the * need for byte-swapping. */ for (i=3; i>=0; i--) { b[i] = a & 0x000000ff; a >>= 8; } for (i=0; i<4; i++) qwrite(outfile, (char *) &b[i],1); } /* ######################################################################### */ static void writelonglong(char *outfile, LONGLONG a) { int i; unsigned char b[8]; /* Write integer A one byte at a time to outfile. * * This is portable from Vax to Sun since it eliminates the * need for byte-swapping. */ for (i=7; i>=0; i--) { b[i] = (unsigned char) (a & 0x000000ff); a >>= 8; } for (i=0; i<8; i++) qwrite(outfile, (char *) &b[i],1); } /* ######################################################################### */ static int qwrite(char *file, char buffer[], int n){ /* * write n bytes from buffer into file * returns number of bytes read (=n) if successful, <=0 if not */ if (noutchar + n > noutmax) return(0); /* buffer overflow */ memcpy(&file[noutchar], buffer, n); noutchar += n; return(n); } /* ######################################################################### */ /* ######################################################################### */ /* Copyright (c) 1993 Association of Universities for Research * in Astronomy. All rights reserved. Produced under National * Aeronautics and Space Administration Contract No. NAS5-26555. */ /* doencode.c Encode 2-D array and write stream of characters on outfile * * This version assumes that A is positive. * * Programmer: R. White Date: 7 May 1991 */ /* ######################################################################### */ static int doencode(char *outfile, int a[], int nx, int ny, unsigned char nbitplanes[3]) { /* char *outfile; output data stream int a[]; Array of values to encode int nx,ny; Array dimensions [nx][ny] unsigned char nbitplanes[3]; Number of bit planes in quadrants */ int nx2, ny2, stat; nx2 = (nx+1)/2; ny2 = (ny+1)/2; /* * Initialize bit output */ start_outputing_bits(); /* * write out the bit planes for each quadrant */ stat = qtree_encode(outfile, &a[0], ny, nx2, ny2, nbitplanes[0]); if (!stat) stat = qtree_encode(outfile, &a[ny2], ny, nx2, ny/2, nbitplanes[1]); if (!stat) stat = qtree_encode(outfile, &a[ny*nx2], ny, nx/2, ny2, nbitplanes[1]); if (!stat) stat = qtree_encode(outfile, &a[ny*nx2+ny2], ny, nx/2, ny/2, nbitplanes[2]); /* * Add zero as an EOF symbol */ output_nybble(outfile, 0); done_outputing_bits(outfile); return(stat); } /* ######################################################################### */ static int doencode64(char *outfile, LONGLONG a[], int nx, int ny, unsigned char nbitplanes[3]) { /* char *outfile; output data stream LONGLONG a[]; Array of values to encode int nx,ny; Array dimensions [nx][ny] unsigned char nbitplanes[3]; Number of bit planes in quadrants */ int nx2, ny2, stat; nx2 = (nx+1)/2; ny2 = (ny+1)/2; /* * Initialize bit output */ start_outputing_bits(); /* * write out the bit planes for each quadrant */ stat = qtree_encode64(outfile, &a[0], ny, nx2, ny2, nbitplanes[0]); if (!stat) stat = qtree_encode64(outfile, &a[ny2], ny, nx2, ny/2, nbitplanes[1]); if (!stat) stat = qtree_encode64(outfile, &a[ny*nx2], ny, nx/2, ny2, nbitplanes[1]); if (!stat) stat = qtree_encode64(outfile, &a[ny*nx2+ny2], ny, nx/2, ny/2, nbitplanes[2]); /* * Add zero as an EOF symbol */ output_nybble(outfile, 0); done_outputing_bits(outfile); return(stat); } /* ######################################################################### */ /* ######################################################################### */ /* Copyright (c) 1993 Association of Universities for Research * in Astronomy. All rights reserved. Produced under National * Aeronautics and Space Administration Contract No. NAS5-26555. */ /* BIT OUTPUT ROUTINES */ static LONGLONG bitcount; /* THE BIT BUFFER */ static int buffer2; /* Bits buffered for output */ static int bits_to_go2; /* Number of bits free in buffer */ /* ######################################################################### */ /* INITIALIZE FOR BIT OUTPUT */ static void start_outputing_bits(void) { buffer2 = 0; /* Buffer is empty to start */ bits_to_go2 = 8; /* with */ bitcount = 0; } /* ######################################################################### */ /* OUTPUT N BITS (N must be <= 8) */ static void output_nbits(char *outfile, int bits, int n) { /* AND mask for the right-most n bits */ static int mask[9] = {0, 1, 3, 7, 15, 31, 63, 127, 255}; /* * insert bits at end of buffer */ buffer2 <<= n; /* buffer2 |= ( bits & ((1<>(-bits_to_go2)) & 0xff); if (noutchar < noutmax) noutchar++; bits_to_go2 += 8; } bitcount += n; } /* ######################################################################### */ /* OUTPUT a 4 bit nybble */ static void output_nybble(char *outfile, int bits) { /* * insert 4 bits at end of buffer */ buffer2 = (buffer2<<4) | ( bits & 15 ); bits_to_go2 -= 4; if (bits_to_go2 <= 0) { /* * buffer2 full, put out top 8 bits */ outfile[noutchar] = ((buffer2>>(-bits_to_go2)) & 0xff); if (noutchar < noutmax) noutchar++; bits_to_go2 += 8; } bitcount += 4; } /* ############################################################################ */ /* OUTPUT array of 4 BITS */ static void output_nnybble(char *outfile, int n, unsigned char array[]) { /* pack the 4 lower bits in each element of the array into the outfile array */ int ii, jj, kk = 0, shift; if (n == 1) { output_nybble(outfile, (int) array[0]); return; } /* forcing byte alignment doesn;t help, and even makes it go slightly slower if (bits_to_go2 != 8) output_nbits(outfile, kk, bits_to_go2); */ if (bits_to_go2 <= 4) { /* just room for 1 nybble; write it out separately */ output_nybble(outfile, array[0]); kk++; /* index to next array element */ if (n == 2) /* only 1 more nybble to write out */ { output_nybble(outfile, (int) array[1]); return; } } /* bits_to_go2 is now in the range 5 - 8 */ shift = 8 - bits_to_go2; /* now write out pairs of nybbles; this does not affect value of bits_to_go2 */ jj = (n - kk) / 2; if (bits_to_go2 == 8) { /* special case if nybbles are aligned on byte boundary */ /* this actually seems to make very little differnece in speed */ buffer2 = 0; for (ii = 0; ii < jj; ii++) { outfile[noutchar] = ((array[kk] & 15)<<4) | (array[kk+1] & 15); kk += 2; noutchar++; } } else { for (ii = 0; ii < jj; ii++) { buffer2 = (buffer2<<8) | ((array[kk] & 15)<<4) | (array[kk+1] & 15); kk += 2; /* buffer2 full, put out top 8 bits */ outfile[noutchar] = ((buffer2>>shift) & 0xff); noutchar++; } } bitcount += (8 * (ii - 1)); /* write out last odd nybble, if present */ if (kk != n) output_nybble(outfile, (int) array[n - 1]); return; } /* ######################################################################### */ /* FLUSH OUT THE LAST BITS */ static void done_outputing_bits(char *outfile) { if(bits_to_go2 < 8) { /* putc(buffer2<nqy) ? nqx : nqy; log2n = (int) (log((float) nqmax)/log(2.0)+0.5); if (nqmax > (1<= 0; bit--) { /* * initial bit buffer */ b = 0; bitbuffer = 0; bits_to_go3 = 0; /* * on first pass copy A to scratch array */ qtree_onebit(a,n,nqx,nqy,scratch,bit); nx = (nqx+1)>>1; ny = (nqy+1)>>1; /* * copy non-zero values to output buffer, which will be written * in reverse order */ if (bufcopy(scratch,nx*ny,buffer,&b,bmax)) { /* * quadtree is expanding data, * change warning code and just fill buffer with bit-map */ write_bdirect(outfile,a,n,nqx,nqy,scratch,bit); goto bitplane_done; } /* * do log2n reductions */ for (k = 1; k>1; ny = (ny+1)>>1; if (bufcopy(scratch,nx*ny,buffer,&b,bmax)) { write_bdirect(outfile,a,n,nqx,nqy,scratch,bit); goto bitplane_done; } } /* * OK, we've got the code in buffer * Write quadtree warning code, then write buffer in reverse order */ output_nybble(outfile,0xF); if (b==0) { if (bits_to_go3>0) { /* * put out the last few bits */ output_nbits(outfile, bitbuffer & ((1<0) { /* * put out the last few bits */ output_nbits(outfile, bitbuffer & ((1<=0; i--) { output_nbits(outfile,buffer[i],8); } } bitplane_done: ; } free(buffer); free(scratch); return(0); } /* ######################################################################### */ static int qtree_encode64(char *outfile, LONGLONG a[], int n, int nqx, int nqy, int nbitplanes) { /* LONGLONG a[]; int n; physical dimension of row in a int nqx; length of row int nqy; length of column (<=n) int nbitplanes; number of bit planes to output */ int log2n, i, k, bit, b, nqmax, nqx2, nqy2, nx, ny; int bmax; /* this potentially needs to be made a 64-bit int to support large arrays */ unsigned char *scratch, *buffer; /* * log2n is log2 of max(nqx,nqy) rounded up to next power of 2 */ nqmax = (nqx>nqy) ? nqx : nqy; log2n = (int) (log((float) nqmax)/log(2.0)+0.5); if (nqmax > (1<= 0; bit--) { /* * initial bit buffer */ b = 0; bitbuffer = 0; bits_to_go3 = 0; /* * on first pass copy A to scratch array */ qtree_onebit64(a,n,nqx,nqy,scratch,bit); nx = (nqx+1)>>1; ny = (nqy+1)>>1; /* * copy non-zero values to output buffer, which will be written * in reverse order */ if (bufcopy(scratch,nx*ny,buffer,&b,bmax)) { /* * quadtree is expanding data, * change warning code and just fill buffer with bit-map */ write_bdirect64(outfile,a,n,nqx,nqy,scratch,bit); goto bitplane_done; } /* * do log2n reductions */ for (k = 1; k>1; ny = (ny+1)>>1; if (bufcopy(scratch,nx*ny,buffer,&b,bmax)) { write_bdirect64(outfile,a,n,nqx,nqy,scratch,bit); goto bitplane_done; } } /* * OK, we've got the code in buffer * Write quadtree warning code, then write buffer in reverse order */ output_nybble(outfile,0xF); if (b==0) { if (bits_to_go3>0) { /* * put out the last few bits */ output_nbits(outfile, bitbuffer & ((1<0) { /* * put out the last few bits */ output_nbits(outfile, bitbuffer & ((1<=0; i--) { output_nbits(outfile,buffer[i],8); } } bitplane_done: ; } free(buffer); free(scratch); return(0); } /* ######################################################################### */ /* * copy non-zero codes from array to buffer */ static int bufcopy(unsigned char a[], int n, unsigned char buffer[], int *b, int bmax) { int i; for (i = 0; i < n; i++) { if (a[i] != 0) { /* * add Huffman code for a[i] to buffer */ bitbuffer |= code[a[i]] << bits_to_go3; bits_to_go3 += ncode[a[i]]; if (bits_to_go3 >= 8) { buffer[*b] = bitbuffer & 0xFF; *b += 1; /* * return warning code if we fill buffer */ if (*b >= bmax) return(1); bitbuffer >>= 8; bits_to_go3 -= 8; } } } return(0); } /* ######################################################################### */ /* * Do first quadtree reduction step on bit BIT of array A. * Results put into B. * */ static void qtree_onebit(int a[], int n, int nx, int ny, unsigned char b[], int bit) { int i, j, k; int b0, b1, b2, b3; int s10, s00; /* * use selected bit to get amount to shift */ b0 = 1<> bit; k += 1; s00 += 2; s10 += 2; } if (j < ny) { /* * row size is odd, do last element in row * s00+1,s10+1 are off edge */ b[k] = ( ((a[s10 ]<<1) & b1) | ((a[s00 ]<<3) & b3) ) >> bit; k += 1; } } if (i < nx) { /* * column size is odd, do last row * s10,s10+1 are off edge */ s00 = n*i; for (j = 0; j> bit; k += 1; s00 += 2; } if (j < ny) { /* * both row and column size are odd, do corner element * s00+1, s10, s10+1 are off edge */ b[k] = ( ((a[s00 ]<<3) & b3) ) >> bit; k += 1; } } } /* ######################################################################### */ /* * Do first quadtree reduction step on bit BIT of array A. * Results put into B. * */ static void qtree_onebit64(LONGLONG a[], int n, int nx, int ny, unsigned char b[], int bit) { int i, j, k; LONGLONG b0, b1, b2, b3; int s10, s00; /* * use selected bit to get amount to shift */ b0 = ((LONGLONG) 1)<> bit); k += 1; s00 += 2; s10 += 2; } if (j < ny) { /* * row size is odd, do last element in row * s00+1,s10+1 are off edge */ b[k] = (unsigned char) (( ((a[s10 ]<<1) & b1) | ((a[s00 ]<<3) & b3) ) >> bit); k += 1; } } if (i < nx) { /* * column size is odd, do last row * s10,s10+1 are off edge */ s00 = n*i; for (j = 0; j> bit); k += 1; s00 += 2; } if (j < ny) { /* * both row and column size are odd, do corner element * s00+1, s10, s10+1 are off edge */ b[k] = (unsigned char) (( ((a[s00 ]<<3) & b3) ) >> bit); k += 1; } } } /* ######################################################################### */ /* * do one quadtree reduction step on array a * results put into b (which may be the same as a) */ static void qtree_reduce(unsigned char a[], int n, int nx, int ny, unsigned char b[]) { int i, j, k; int s10, s00; k = 0; /* k is index of b[i/2,j/2] */ for (i = 0; i (gzip) or (zlib) or (raw) (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> HCRC -> TYPE (zlib) -> DICTID or TYPE DICTID -> DICT -> TYPE (raw) -> TYPEDO Read deflate blocks: TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK STORED -> COPY_ -> COPY -> TYPE TABLE -> LENLENS -> CODELENS -> LEN_ LEN_ -> LEN Read deflate codes in fixed or dynamic block: LEN -> LENEXT or LIT or TYPE LENEXT -> DIST -> DISTEXT -> MATCH -> LEN LIT -> LEN Process trailer: CHECK -> LENGTH -> DONE */ /* state maintained between inflate() calls. Approximately 10K bytes. */ struct inflate_state { inflate_mode mode; /* current inflate mode */ int last; /* true if processing last block */ int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ int havedict; /* true if dictionary provided */ int flags; /* gzip header method and flags (0 if zlib) */ unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ unsigned long check; /* protected copy of check value */ unsigned long total; /* protected copy of output count */ gz_headerp head; /* where to save gzip header information */ /* sliding window */ unsigned wbits; /* log base 2 of requested window size */ unsigned wsize; /* window size or zero if not using window */ unsigned whave; /* valid bytes in the window */ unsigned wnext; /* window write index */ unsigned char FAR *window; /* allocated sliding window, if needed */ /* bit accumulator */ unsigned long hold; /* input bit accumulator */ unsigned bits; /* number of bits in "in" */ /* for string and stored block copying */ unsigned length; /* literal or length of data to copy */ unsigned offset; /* distance back to copy string from */ /* for table and code decoding */ unsigned extra; /* extra bits needed */ /* fixed and dynamic code tables */ code const FAR *lencode; /* starting table for length/literal codes */ code const FAR *distcode; /* starting table for distance codes */ unsigned lenbits; /* index bits for lencode */ unsigned distbits; /* index bits for distcode */ /* dynamic table building */ unsigned ncode; /* number of code length code lengths */ unsigned nlen; /* number of length code lengths */ unsigned ndist; /* number of distance code lengths */ unsigned have; /* number of code lengths in lens[] */ code FAR *next; /* next available space in codes[] */ unsigned short lens[320]; /* temporary storage for code lengths */ unsigned short work[288]; /* work area for code table building */ code codes[ENOUGH]; /* space for code tables */ int sane; /* if false, allow invalid distance too far */ int back; /* bits back of last unprocessed length/lit */ unsigned was; /* initial length of match */ }; astropy-1.1.1/cextern/cfitsio/getcolj.c0000644001134200020070000043065212602615517021041 0ustar embrayscience00000000000000/* This file, getcolj.c, contains routines that read data elements from */ /* a FITS image or table, with long data type. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffgpvj( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long nulval, /* I - value for undefined pixels */ long *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; char cdummy; int nullcheck = 1; long nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_read_compressed_pixels(fptr, TLONG, firstelem, nelem, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclj(fptr, 2, row, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgpfj( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long *array, /* O - array of values that are returned */ char *nularray, /* O - array of null pixel flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any undefined pixels in the returned array will be set = 0 and the corresponding nularray value will be set = 1. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; int nullcheck = 2; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_read_compressed_pixels(fptr, TLONG, firstelem, nelem, nullcheck, NULL, array, nularray, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclj(fptr, 2, row, firstelem, nelem, 1, 2, 0L, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg2dj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ long nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ long *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { /* call the 3D reading routine, with the 3rd dimension = 1 */ ffg3dj(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg3dj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ long nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ long *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 3-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { long tablerow, ii, jj; char cdummy; int nullcheck = 1; long inc[] = {1,1,1}; LONGLONG fpixel[] = {1,1,1}, nfits, narray; LONGLONG lpixel[3], nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = ncols; lpixel[1] = nrows; lpixel[2] = naxis3; nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TLONG, fpixel, lpixel, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so read all at once */ ffgclj(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to read */ narray = 0; /* next pixel in output array to be filled */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* reading naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffgclj(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, &array[narray], &cdummy, anynul, status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsvj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ long nulval, /* I - value to set undefined pixels */ long *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dir[9]; long nelem, nultyp, ninc, numcol; LONGLONG felem, dsize[10], blcll[9], trcll[9]; int hdutype, anyf; char ldummy, msg[FLEN_ERRMSG]; int nullcheck = 1; long nullvalue; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TLONG, blcll, trcll, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 1; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; dir[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { if (hdutype == IMAGE_HDU) { dir[ii] = -1; } else { sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; dsize[ii] = dsize[ii] * dir[ii]; } dsize[naxis] = dsize[naxis] * dir[naxis]; if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; ninc = incr[0] * dir[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) { for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) { for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) { for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) { for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) { for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) { for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) { for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) { felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; if ( ffgclj(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &ldummy, &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsfj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ long *array, /* O - array to be filled and returned */ char *flagval, /* O - set to 1 if corresponding value is null */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dsize[10]; LONGLONG blcll[9], trcll[9]; long felem, nelem, nultyp, ninc, numcol; long nulval = 0; int hdutype, anyf; char msg[FLEN_ERRMSG]; int nullcheck = 2; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } fits_read_compressed_img(fptr, TLONG, blcll, trcll, inc, nullcheck, NULL, array, flagval, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 2; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgclj(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &flagval[i0], &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffggpj( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ long firstelem, /* I - first vector element to read (1 = 1st) */ long nelem, /* I - number of values to read */ long *array, /* O - array of values that are returned */ int *status) /* IO - error status */ /* Read an array of group parameters from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). */ { long row; int idummy; char cdummy; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclj(fptr, 1, row, firstelem, nelem, 1, 1, 0L, array, &cdummy, &idummy, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcvj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long nulval, /* I - value for null pixels */ long *array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. */ { char cdummy; ffgclj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long *array, /* O - array of values that are read */ char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. */ { long dummy = 0; ffgclj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgclj( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long elemincre, /* I - pixel increment; e.g., 2 = every other */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ long nulval, /* I - value for null pixels if nultyp = 1 */ long *array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer be a virtual column in a 1 or more grouped FITS primary array or image extension. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The output array of values will be converted from the datatype of the column and will be scaled by the FITS TSCALn and TZEROn values if necessary. */ { double scale, zero, power = 1., dtemp; int tcode, maxelem2, hdutype, xcode, decimals; long twidth, incre; long ii, xwidth, ntodo; int convert, nulcheck, readcheck = 0; LONGLONG repeat, startpos, elemnum, readptr, tnull; LONGLONG rowlen, rownum, remain, next, rowincre, maxelem; char tform[20]; char message[81]; char snull[20]; /* the FITS null value if reading from ASCII table */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; if (anynul) *anynul = 0; if (nultyp == 2) memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (elemincre < 0) readcheck = -1; /* don't do range checking in this case */ if (ffgcprll(fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) return(*status); maxelem = maxelem2; incre *= elemincre; /* multiply incre to just get every nth pixel */ if (tcode == TSTRING) /* setup for ASCII tables */ { /* get the number of implied decimal places if no explicit decmal point */ ffasfm(tform, &xcode, &xwidth, &decimals, status); for(ii = 0; ii < decimals; ii++) power *= 10.; } /*------------------------------------------------------------------*/ /* Decide whether to check for null values in the input FITS file: */ /*------------------------------------------------------------------*/ nulcheck = nultyp; /* by default check for null values in the FITS file */ if (nultyp == 1 && nulval == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ else if (tcode%10 == 1 && /* if reading an integer column, and */ tnull == NULL_UNDEFINED) /* if a null value is not defined, */ nulcheck = 0; /* then do not check for null values. */ else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) nulcheck = 0; /*----------------------------------------------------------------------*/ /* If FITS column and output data array have same datatype, then we do */ /* not need to use a temporary buffer to store intermediate datatype. */ /*----------------------------------------------------------------------*/ convert = 1; if (tcode == TLONG) /* Special Case: */ { /* no type convertion required, so read */ maxelem = nelem; /* data directly into output buffer. */ if (nulcheck == 0 && scale == 1. && zero == 0. && LONGSIZE == 32) convert = 0; /* no need to scale data or find nulls */ } /*---------------------------------------------------------------------*/ /* Now read the pixels from the FITS column. If the column does not */ /* have the same datatype as the output array, then we have to read */ /* the raw values into a temporary buffer (of limited size). In */ /* the case of a vector colum read only 1 vector of values at a time */ /* then skip to the next row if more values need to be read. */ /* After reading the raw values, then call the fffXXYY routine to (1) */ /* test for undefined values, (2) convert the datatype if necessary, */ /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ /* scaling parameters. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to read */ next = 0; /* next element in array to be read */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to read at one time to the number that will fit in the buffer or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); if (elemincre >= 0) { ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); } else { ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); } readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); switch (tcode) { case (TLONG): ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) &array[next], status); if (convert) fffi4i4((INT32BIT *) &array[next], ntodo, scale, zero, nulcheck, (INT32BIT) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONGLONG): ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); fffi8i4((LONGLONG *) buffer, ntodo, scale, zero, nulcheck, tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TBYTE): ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, status); fffi1i4((unsigned char *) buffer, ntodo, scale, zero, nulcheck, (unsigned char) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TSHORT): ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); fffi2i4((short *) buffer, ntodo, scale, zero, nulcheck, (short) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TFLOAT): ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); fffr4i4((float *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TDOUBLE): ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); fffr8i4((double *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TSTRING): ffmbyt(fptr, readptr, REPORT_EOF, status); if (incre == twidth) /* contiguous bytes */ ffgbyt(fptr, ntodo * twidth, buffer, status); else ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); fffstri4((char *) buffer, ntodo, scale, zero, twidth, power, nulcheck, snull, nulval, &nularray[next], anynul, &array[next], status); break; default: /* error trap for invalid column format */ sprintf(message, "Cannot read numbers from column %d which has format %s", colnum, tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous read operation */ { dtemp = (double) next; if (hdutype > 0) sprintf(message, "Error reading elements %.0f thru %.0f from column %d (ffgclj).", dtemp+1., dtemp+ntodo, colnum); else sprintf(message, "Error reading elements %.0f thru %.0f from image (ffgclj).", dtemp+1., dtemp+ntodo); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum = elemnum + (ntodo * elemincre); if (elemnum >= repeat) /* completed a row; start on later row */ { rowincre = elemnum / repeat; rownum += rowincre; elemnum = elemnum - (rowincre * repeat); } else if (elemnum < 0) /* completed a row; start on a previous row */ { rowincre = (-elemnum - 1) / repeat + 1; rownum -= rowincre; elemnum = (rowincre * repeat) + elemnum; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while reading FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int fffi1i4(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (long) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (dvalue > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (long) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (dvalue > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi2i4(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (long) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (dvalue > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (long) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (dvalue > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi4i4(INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; Process the array of data in reverse order, to handle the case where the input data is 4-bytes and the output is 8-bytes and the conversion is being done in place in the same array. */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = ntodo - 1; ii >= 0; ii--) output[ii] = (long) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = ntodo - 1; ii >= 0; ii--) { dvalue = input[ii] * scale + zero; if (dvalue < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (dvalue > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = ntodo - 1; ii >= 0; ii--) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = input[ii]; } } else /* must scale the data */ { for (ii = ntodo - 1; ii >= 0; ii--) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (dvalue > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi8i4(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < LONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (input[ii] > LONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (dvalue > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < LONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (input[ii] > LONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (dvalue > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr4i4(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (input[ii] > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (dvalue > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr++; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (input[ii] > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (zero > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (dvalue > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr8i4(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (input[ii] > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (dvalue > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr += 3; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (input[ii] > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (zero > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (dvalue > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffstri4(char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ long twidth, /* I - width of each substring of chars */ double implipower, /* I - power of 10 of implied decimal */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ char *snull, /* I - value of FITS null string, if any */ long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to snull. If nullcheck= 0, then no special checking for nulls is performed. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { int nullen; long ii; double dvalue; char *cstring, message[81]; char *cptr, *tpos; char tempstore, chrzero = '0'; double val, power; int exponent, sign, esign, decpt; nullen = strlen(snull); cptr = input; /* pointer to start of input string */ for (ii = 0; ii < ntodo; ii++) { cstring = cptr; /* temporarily insert a null terminator at end of the string */ tpos = cptr + twidth; tempstore = *tpos; *tpos = 0; /* check if null value is defined, and if the */ /* column string is identical to the null string */ if (snull[0] != ASCII_NULL_UNDEFINED && !strncmp(snull, cptr, nullen) ) { if (nullcheck) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } cptr += twidth; } else { /* value is not the null value, so decode it */ /* remove any embedded blank characters from the string */ decpt = 0; sign = 1; val = 0.; power = 1.; exponent = 0; esign = 1; while (*cptr == ' ') /* skip leading blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for leading sign */ { if (*cptr == '-') sign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and value */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } if (*cptr == '.' || *cptr == ',') /* check for decimal point */ { decpt = 1; /* set flag to show there was a decimal point */ cptr++; while (*cptr == ' ') /* skip any blanks */ cptr++; while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ power = power * 10.; cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } } if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ { cptr++; while (*cptr == ' ') /* skip blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ { if (*cptr == '-') esign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and exp */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ cptr++; while (*cptr == ' ') /* skip embedded blanks */ cptr++; } } if (*cptr != 0) /* should end up at the null terminator */ { sprintf(message, "Cannot read number from ASCII table"); ffpmsg(message); sprintf(message, "Column field = %s.", cstring); ffpmsg(message); /* restore the char that was overwritten by the null */ *tpos = tempstore; return(*status = BAD_C2D); } if (!decpt) /* if no explicit decimal, use implied */ power = implipower; dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); dvalue = dvalue * scale + zero; /* apply the scaling */ if (dvalue < DLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONG_MIN; } else if (dvalue > DLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONG_MAX; } else output[ii] = (long) dvalue; } /* restore the char that was overwritten by the null */ *tpos = tempstore; } return(*status); } /* ======================================================================== */ /* the following routines support the 'long long' data type */ /* ======================================================================== */ /*--------------------------------------------------------------------------*/ int ffgpvjj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ LONGLONG nulval, /* I - value for undefined pixels */ LONGLONG *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; char cdummy; int nullcheck = 1; LONGLONG nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_read_compressed_pixels(fptr, TLONGLONG, firstelem, nelem, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcljj(fptr, 2, row, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgpfjj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ LONGLONG *array, /* O - array of values that are returned */ char *nularray, /* O - array of null pixel flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any undefined pixels in the returned array will be set = 0 and the corresponding nularray value will be set = 1. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; int nullcheck = 2; LONGLONG dummy = 0; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_read_compressed_pixels(fptr, TLONGLONG, firstelem, nelem, nullcheck, NULL, array, nularray, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcljj(fptr, 2, row, firstelem, nelem, 1, 2, dummy, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg2djj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG nulval ,/* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG *array,/* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { /* call the 3D reading routine, with the 3rd dimension = 1 */ ffg3djj(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg3djj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ LONGLONG *array,/* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 3-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { long tablerow, ii, jj; char cdummy; int nullcheck = 1; long inc[] = {1,1,1}; LONGLONG fpixel[] = {1,1,1}, nfits, narray; LONGLONG lpixel[3]; LONGLONG nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = ncols; lpixel[1] = nrows; lpixel[2] = naxis3; nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TLONGLONG, fpixel, lpixel, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so read all at once */ ffgcljj(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to read */ narray = 0; /* next pixel in output array to be filled */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* reading naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffgcljj(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, &array[narray], &cdummy, anynul, status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsvjj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ LONGLONG nulval,/* I - value to set undefined pixels */ LONGLONG *array,/* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dir[9]; long nelem, nultyp, ninc, numcol; LONGLONG felem, dsize[10], blcll[9], trcll[9]; int hdutype, anyf; char ldummy, msg[FLEN_ERRMSG]; int nullcheck = 1; LONGLONG nullvalue; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TLONGLONG, blcll, trcll, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 1; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; dir[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { if (hdutype == IMAGE_HDU) { dir[ii] = -1; } else { sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; dsize[ii] = dsize[ii] * dir[ii]; } dsize[naxis] = dsize[naxis] * dir[naxis]; if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; ninc = incr[0] * dir[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) { for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) { for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) { for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) { for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) { for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) { for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) { for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) { felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; if ( ffgcljj(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &ldummy, &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsfjj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ LONGLONG *array,/* O - array to be filled and returned */ char *flagval, /* O - set to 1 if corresponding value is null */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dsize[10]; LONGLONG blcll[9], trcll[9]; long felem, nelem, nultyp, ninc, numcol; LONGLONG nulval = 0; int hdutype, anyf; char msg[FLEN_ERRMSG]; int nullcheck = 2; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } fits_read_compressed_img(fptr, TLONGLONG, blcll, trcll, inc, nullcheck, NULL, array, flagval, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 2; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgcljj(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &flagval[i0], &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffggpjj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ long firstelem, /* I - first vector element to read (1 = 1st) */ long nelem, /* I - number of values to read */ LONGLONG *array, /* O - array of values that are returned */ int *status) /* IO - error status */ /* Read an array of group parameters from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). */ { long row; int idummy; char cdummy; LONGLONG dummy = 0; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcljj(fptr, 1, row, firstelem, nelem, 1, 1, dummy, array, &cdummy, &idummy, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcvjj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ LONGLONG nulval, /* I - value for null pixels */ LONGLONG *array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. */ { char cdummy; ffgcljj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfjj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ LONGLONG *array, /* O - array of values that are read */ char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. */ { LONGLONG dummy = 0; ffgcljj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcljj( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long elemincre, /* I - pixel increment; e.g., 2 = every other */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ LONGLONG nulval, /* I - value for null pixels if nultyp = 1 */ LONGLONG *array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer be a virtual column in a 1 or more grouped FITS primary array or image extension. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The output array of values will be converted from the datatype of the column and will be scaled by the FITS TSCALn and TZEROn values if necessary. */ { double scale, zero, power = 1., dtemp; int tcode, maxelem2, hdutype, xcode, decimals; long twidth, incre; long ii, xwidth, ntodo; int convert, nulcheck, readcheck = 0; LONGLONG repeat, startpos, elemnum, readptr, tnull; LONGLONG rowlen, rownum, remain, next, rowincre, maxelem; char tform[20]; char message[81]; char snull[20]; /* the FITS null value if reading from ASCII table */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; if (anynul) *anynul = 0; if (nultyp == 2) memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (elemincre < 0) readcheck = -1; /* don't do range checking in this case */ if (ffgcprll(fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) return(*status); maxelem = maxelem2; incre *= elemincre; /* multiply incre to just get every nth pixel */ if (tcode == TSTRING) /* setup for ASCII tables */ { /* get the number of implied decimal places if no explicit decmal point */ ffasfm(tform, &xcode, &xwidth, &decimals, status); for(ii = 0; ii < decimals; ii++) power *= 10.; } /*------------------------------------------------------------------*/ /* Decide whether to check for null values in the input FITS file: */ /*------------------------------------------------------------------*/ nulcheck = nultyp; /* by default check for null values in the FITS file */ if (nultyp == 1 && nulval == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ else if (tcode%10 == 1 && /* if reading an integer column, and */ tnull == NULL_UNDEFINED) /* if a null value is not defined, */ nulcheck = 0; /* then do not check for null values. */ else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) nulcheck = 0; /*----------------------------------------------------------------------*/ /* If FITS column and output data array have same datatype, then we do */ /* not need to use a temporary buffer to store intermediate datatype. */ /*----------------------------------------------------------------------*/ convert = 1; if (tcode == TLONGLONG) /* Special Case: */ { /* no type convertion required, so read */ maxelem = nelem; /* data directly into output buffer. */ if (nulcheck == 0 && scale == 1. && zero == 0.) convert = 0; /* no need to scale data or find nulls */ } /*---------------------------------------------------------------------*/ /* Now read the pixels from the FITS column. If the column does not */ /* have the same datatype as the output array, then we have to read */ /* the raw values into a temporary buffer (of limited size). In */ /* the case of a vector colum read only 1 vector of values at a time */ /* then skip to the next row if more values need to be read. */ /* After reading the raw values, then call the fffXXYY routine to (1) */ /* test for undefined values, (2) convert the datatype if necessary, */ /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ /* scaling parameters. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to read */ next = 0; /* next element in array to be read */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to read at one time to the number that will fit in the buffer or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); if (elemincre >= 0) { ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); } else { ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); } readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); switch (tcode) { case (TLONGLONG): ffgi8b(fptr, readptr, ntodo, incre, (long *) &array[next], status); if (convert) fffi8i8((LONGLONG *) &array[next], ntodo, scale, zero, nulcheck, tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONG): ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, status); fffi4i8((INT32BIT *) buffer, ntodo, scale, zero, nulcheck, (INT32BIT) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TBYTE): ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, status); fffi1i8((unsigned char *) buffer, ntodo, scale, zero, nulcheck, (unsigned char) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TSHORT): ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); fffi2i8((short *) buffer, ntodo, scale, zero, nulcheck, (short) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TFLOAT): ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); fffr4i8((float *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TDOUBLE): ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); fffr8i8((double *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TSTRING): ffmbyt(fptr, readptr, REPORT_EOF, status); if (incre == twidth) /* contiguous bytes */ ffgbyt(fptr, ntodo * twidth, buffer, status); else ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); fffstri8((char *) buffer, ntodo, scale, zero, twidth, power, nulcheck, snull, nulval, &nularray[next], anynul, &array[next], status); break; default: /* error trap for invalid column format */ sprintf(message, "Cannot read numbers from column %d which has format %s", colnum, tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous read operation */ { dtemp = (double) next; if (hdutype > 0) sprintf(message, "Error reading elements %.0f thru %.0f from column %d (ffgclj).", dtemp+1., dtemp+ntodo, colnum); else sprintf(message, "Error reading elements %.0f thru %.0f from image (ffgclj).", dtemp+1., dtemp+ntodo); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum = elemnum + (ntodo * elemincre); if (elemnum >= repeat) /* completed a row; start on later row */ { rowincre = elemnum / repeat; rownum += rowincre; elemnum = elemnum - (rowincre * repeat); } else if (elemnum < 0) /* completed a row; start on a previous row */ { rowincre = (-elemnum - 1) / repeat + 1; rownum -= rowincre; elemnum = (rowincre * repeat) + elemnum; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while reading FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int fffi1i8(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ LONGLONG *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (LONGLONG) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (LONGLONG) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi2i8(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ LONGLONG *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (LONGLONG) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (LONGLONG) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi4i8(INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ LONGLONG *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (LONGLONG) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (LONGLONG) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi8i8(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ LONGLONG *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr4i8(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ LONGLONG *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (input[ii] > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr++; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (input[ii] > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (zero > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr8i8(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ LONGLONG *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (input[ii] > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr += 3; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (input[ii] > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (zero > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffstri8(char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ long twidth, /* I - width of each substring of chars */ double implipower, /* I - power of 10 of implied decimal */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ char *snull, /* I - value of FITS null string, if any */ LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ LONGLONG *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to snull. If nullcheck= 0, then no special checking for nulls is performed. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { int nullen; long ii; double dvalue; char *cstring, message[81]; char *cptr, *tpos; char tempstore, chrzero = '0'; double val, power; int exponent, sign, esign, decpt; nullen = strlen(snull); cptr = input; /* pointer to start of input string */ for (ii = 0; ii < ntodo; ii++) { cstring = cptr; /* temporarily insert a null terminator at end of the string */ tpos = cptr + twidth; tempstore = *tpos; *tpos = 0; /* check if null value is defined, and if the */ /* column string is identical to the null string */ if (snull[0] != ASCII_NULL_UNDEFINED && !strncmp(snull, cptr, nullen) ) { if (nullcheck) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } cptr += twidth; } else { /* value is not the null value, so decode it */ /* remove any embedded blank characters from the string */ decpt = 0; sign = 1; val = 0.; power = 1.; exponent = 0; esign = 1; while (*cptr == ' ') /* skip leading blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for leading sign */ { if (*cptr == '-') sign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and value */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } if (*cptr == '.' || *cptr == ',') /* check for decimal point */ { decpt = 1; /* set flag to show there was a decimal point */ cptr++; while (*cptr == ' ') /* skip any blanks */ cptr++; while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ power = power * 10.; cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } } if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ { cptr++; while (*cptr == ' ') /* skip blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ { if (*cptr == '-') esign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and exp */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ cptr++; while (*cptr == ' ') /* skip embedded blanks */ cptr++; } } if (*cptr != 0) /* should end up at the null terminator */ { sprintf(message, "Cannot read number from ASCII table"); ffpmsg(message); sprintf(message, "Column field = %s.", cstring); ffpmsg(message); /* restore the char that was overwritten by the null */ *tpos = tempstore; return(*status = BAD_C2D); } if (!decpt) /* if no explicit decimal, use implied */ power = implipower; dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); dvalue = dvalue * scale + zero; /* apply the scaling */ if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) dvalue; } /* restore the char that was overwritten by the null */ *tpos = tempstore; } return(*status); } astropy-1.1.1/cextern/cfitsio/getcolk.c0000644001134200020070000021575212602615517021044 0ustar embrayscience00000000000000/* This file, getcolk.c, contains routines that read data elements from */ /* a FITS image or table, with 'int' data type. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffgpvk( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ int nulval, /* I - value for undefined pixels */ int *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; char cdummy; int nullcheck = 1; int nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_read_compressed_pixels(fptr, TINT, firstelem, nelem, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclk(fptr, 2, row, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgpfk( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ int *array, /* O - array of values that are returned */ char *nularray, /* O - array of null pixel flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any undefined pixels in the returned array will be set = 0 and the corresponding nularray value will be set = 1. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; int nullcheck = 2; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_read_compressed_pixels(fptr, TINT, firstelem, nelem, nullcheck, NULL, array, nularray, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclk(fptr, 2, row, firstelem, nelem, 1, 2, 0L, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg2dk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ int nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ int *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { /* call the 3D reading routine, with the 3rd dimension = 1 */ ffg3dk(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg3dk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ int nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ int *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 3-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { long tablerow, ii, jj; char cdummy; int nullcheck = 1; long inc[] = {1,1,1}; LONGLONG fpixel[] = {1,1,1}, nfits, narray; LONGLONG lpixel[3]; int nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = ncols; lpixel[1] = nrows; lpixel[2] = naxis3; nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TINT, fpixel, lpixel, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so read all at once */ ffgclk(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to read */ narray = 0; /* next pixel in output array to be filled */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* reading naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffgclk(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, &array[narray], &cdummy, anynul, status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsvk(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ int nulval, /* I - value to set undefined pixels */ int *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dir[9]; long nelem, nultyp, ninc, numcol; LONGLONG felem, dsize[10], blcll[9], trcll[9]; int hdutype, anyf; char ldummy, msg[FLEN_ERRMSG]; int nullcheck = 1; int nullvalue; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TINT, blcll, trcll, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 1; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; dir[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { if (hdutype == IMAGE_HDU) { dir[ii] = -1; } else { sprintf(msg, "ffgsvk: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; dsize[ii] = dsize[ii] * dir[ii]; } dsize[naxis] = dsize[naxis] * dir[naxis]; if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; ninc = incr[0] * dir[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) { for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) { for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) { for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) { for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) { for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) { for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) { for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) { felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; if ( ffgclk(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &ldummy, &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsfk(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ int *array, /* O - array to be filled and returned */ char *flagval, /* O - set to 1 if corresponding value is null */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dsize[10]; LONGLONG blcll[9], trcll[9]; long felem, nelem, nultyp, ninc, numcol; long nulval = 0; int hdutype, anyf; char msg[FLEN_ERRMSG]; int nullcheck = 2; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } fits_read_compressed_img(fptr, TINT, blcll, trcll, inc, nullcheck, NULL, array, flagval, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 2; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgclk(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &flagval[i0], &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffggpk( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ long firstelem, /* I - first vector element to read (1 = 1st) */ long nelem, /* I - number of values to read */ int *array, /* O - array of values that are returned */ int *status) /* IO - error status */ /* Read an array of group parameters from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). */ { long row; int idummy; char cdummy; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclk(fptr, 1, row, firstelem, nelem, 1, 1, 0L, array, &cdummy, &idummy, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcvk(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ int nulval, /* I - value for null pixels */ int *array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. */ { char cdummy; ffgclk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfk(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ int *array, /* O - array of values that are read */ char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. */ { int dummy = 0; ffgclk(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgclk( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long elemincre, /* I - pixel increment; e.g., 2 = every other */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ int nulval, /* I - value for null pixels if nultyp = 1 */ int *array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer be a virtual column in a 1 or more grouped FITS primary array or image extension. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The output array of values will be converted from the datatype of the column and will be scaled by the FITS TSCALn and TZEROn values if necessary. */ { double scale, zero, power, dtemp; int tcode, maxelem2, hdutype, xcode, decimals; long twidth, incre; long ii, xwidth, ntodo; int convert, nulcheck, readcheck = 0; LONGLONG repeat, startpos, elemnum, readptr, tnull; LONGLONG rowlen, rownum, remain, next, rowincre, maxelem; char tform[20]; char message[81]; char snull[20]; /* the FITS null value if reading from ASCII table */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); /* call the 'short' or 'long' version of this routine, if possible */ if (sizeof(int) == sizeof(short)) ffgcli(fptr, colnum, firstrow, firstelem, nelem, elemincre, nultyp, (short) nulval, (short *) array, nularray, anynul, status); else if (sizeof(int) == sizeof(long)) ffgclj(fptr, colnum, firstrow, firstelem, nelem, elemincre, nultyp, (long) nulval, (long *) array, nularray, anynul, status); else { /* This is a special case: sizeof(int) is not equal to sizeof(short) or sizeof(long). This occurs on Alpha OSF systems where short = 2 bytes, int = 4 bytes, and long = 8 bytes. */ buffer = cbuff; power = 1.; if (anynul) *anynul = 0; if (nultyp == 2) memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (elemincre < 0) readcheck = -1; /* don't do range checking in this case */ if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) return(*status); maxelem = maxelem2; incre *= elemincre; /* multiply incre to just get every nth pixel */ if (tcode == TSTRING) /* setup for ASCII tables */ { /* get the number of implied decimal places if no explicit decmal point */ ffasfm(tform, &xcode, &xwidth, &decimals, status); for(ii = 0; ii < decimals; ii++) power *= 10.; } /*------------------------------------------------------------------*/ /* Decide whether to check for null values in the input FITS file: */ /*------------------------------------------------------------------*/ nulcheck = nultyp; /* by default check for null values in the FITS file */ if (nultyp == 1 && nulval == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ else if (tcode%10 == 1 && /* if reading an integer column, and */ tnull == NULL_UNDEFINED) /* if a null value is not defined, */ nulcheck = 0; /* then do not check for null values. */ else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) nulcheck = 0; /*----------------------------------------------------------------------*/ /* If FITS column and output data array have same datatype, then we do */ /* not need to use a temporary buffer to store intermediate datatype. */ /*----------------------------------------------------------------------*/ convert = 1; if (tcode == TLONG) /* Special Case: */ { /* no type convertion required, so read */ maxelem = nelem; /* data directly into output buffer. */ if (nulcheck == 0 && scale == 1. && zero == 0.) convert = 0; /* no need to scale data or find nulls */ } /*---------------------------------------------------------------------*/ /* Now read the pixels from the FITS column. If the column does not */ /* have the same datatype as the output array, then we have to read */ /* the raw values into a temporary buffer (of limited size). In */ /* the case of a vector colum read only 1 vector of values at a time */ /* then skip to the next row if more values need to be read. */ /* After reading the raw values, then call the fffXXYY routine to (1) */ /* test for undefined values, (2) convert the datatype if necessary, */ /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ /* scaling parameters. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to read */ next = 0; /* next element in array to be read */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to read at one time to the number that will fit in the buffer or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); if (elemincre >= 0) { ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); } else { ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); } readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); switch (tcode) { case (TLONG): ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) &array[next], status); if (convert) fffi4int((INT32BIT *) &array[next], ntodo, scale, zero, nulcheck, (INT32BIT) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONGLONG): ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); fffi8int( (LONGLONG *) buffer, ntodo, scale, zero, nulcheck, tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TBYTE): ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, status); fffi1int((unsigned char *) buffer, ntodo, scale, zero, nulcheck, (unsigned char) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TSHORT): ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); fffi2int((short *) buffer, ntodo, scale, zero, nulcheck, (short) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TFLOAT): ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); fffr4int((float *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TDOUBLE): ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); fffr8int((double *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TSTRING): ffmbyt(fptr, readptr, REPORT_EOF, status); if (incre == twidth) /* contiguous bytes */ ffgbyt(fptr, ntodo * twidth, buffer, status); else ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); fffstrint((char *) buffer, ntodo, scale, zero, twidth, power, nulcheck, snull, nulval, &nularray[next], anynul, &array[next], status); break; default: /* error trap for invalid column format */ sprintf(message, "Cannot read numbers from column %d which has format %s", colnum, tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous read operation */ { dtemp = (double) next; if (hdutype > 0) sprintf(message, "Error reading elements %.0f thru %.0f from column %d (ffgclk).", dtemp+1., dtemp+ntodo, colnum); else sprintf(message, "Error reading elements %.0f thru %.0f from image (ffgclk).", dtemp+1., dtemp+ntodo); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum = elemnum + (ntodo * elemincre); if (elemnum >= repeat) /* completed a row; start on later row */ { rowincre = elemnum / repeat; rownum += rowincre; elemnum = elemnum - (rowincre * repeat); } else if (elemnum < 0) /* completed a row; start on a previous row */ { rowincre = (-elemnum - 1) / repeat + 1; rownum -= rowincre; elemnum = (rowincre * repeat) + elemnum; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while reading FITS data."); *status = NUM_OVERFLOW; } } /* end of DEC Alpha special case */ return(*status); } /*--------------------------------------------------------------------------*/ int fffi1int(unsigned char *input,/* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (int) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (int) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi2int(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (int) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (int) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi4int(INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (int) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (int) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi8int(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < INT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (input[ii] > INT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < INT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (input[ii] > INT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr4int(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (input[ii] > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr++; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (input[ii] > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (zero > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr8int(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (input[ii] > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr += 3; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (input[ii] > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (zero > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (int) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffstrint(char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ long twidth, /* I - width of each substring of chars */ double implipower, /* I - power of 10 of implied decimal */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ char *snull, /* I - value of FITS null string, if any */ int nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ int *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to snull. If nullcheck= 0, then no special checking for nulls is performed. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { int nullen; long ii; double dvalue; char *cstring, message[81]; char *cptr, *tpos; char tempstore, chrzero = '0'; double val, power; int exponent, sign, esign, decpt; nullen = strlen(snull); cptr = input; /* pointer to start of input string */ for (ii = 0; ii < ntodo; ii++) { cstring = cptr; /* temporarily insert a null terminator at end of the string */ tpos = cptr + twidth; tempstore = *tpos; *tpos = 0; /* check if null value is defined, and if the */ /* column string is identical to the null string */ if (snull[0] != ASCII_NULL_UNDEFINED && !strncmp(snull, cptr, nullen) ) { if (nullcheck) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } cptr += twidth; } else { /* value is not the null value, so decode it */ /* remove any embedded blank characters from the string */ decpt = 0; sign = 1; val = 0.; power = 1.; exponent = 0; esign = 1; while (*cptr == ' ') /* skip leading blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for leading sign */ { if (*cptr == '-') sign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and value */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } if (*cptr == '.' || *cptr == ',') /* check for decimal point */ { decpt = 1; /* set flag to show there was a decimal point */ cptr++; while (*cptr == ' ') /* skip any blanks */ cptr++; while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ power = power * 10.; cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } } if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ { cptr++; while (*cptr == ' ') /* skip blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ { if (*cptr == '-') esign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and exp */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ cptr++; while (*cptr == ' ') /* skip embedded blanks */ cptr++; } } if (*cptr != 0) /* should end up at the null terminator */ { sprintf(message, "Cannot read number from ASCII table"); ffpmsg(message); sprintf(message, "Column field = %s.", cstring); ffpmsg(message); /* restore the char that was overwritten by the null */ *tpos = tempstore; return(*status = BAD_C2D); } if (!decpt) /* if no explicit decimal, use implied */ power = implipower; dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); dvalue = dvalue * scale + zero; /* apply the scaling */ if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT_MAX; } else output[ii] = (long) dvalue; } /* restore the char that was overwritten by the null */ *tpos = tempstore; } return(*status); } astropy-1.1.1/cextern/cfitsio/grparser.c0000644001134200020070000013315212602615517021232 0ustar embrayscience00000000000000/* T E M P L A T E P A R S E R ============================= by Jerzy.Borkowski@obs.unige.ch Integral Science Data Center ch. d'Ecogia 16 1290 Versoix Switzerland 14-Oct-98: initial release 16-Oct-98: code cleanup, #include included, now gcc -Wall prints no warnings during compilation. Bugfix: now one can specify additional columns in group HDU. Autoindexing also works in this situation (colunms are number from 7 however). 17-Oct-98: bugfix: complex keywords were incorrectly written (was TCOMPLEX should be TDBLCOMPLEX). 20-Oct-98: bugfix: parser was writing EXTNAME twice, when first HDU in template is defined with XTENSION IMAGE then parser creates now dummy PHDU, SIMPLE T is now allowed only at most once and in first HDU only. WARNING: one should not define EXTNAME keyword for GROUP HDUs, as they have them already defined by parser (EXTNAME = GROUPING). Parser accepts EXTNAME oin GROUP HDU definition, but in this case multiple EXTNAME keywords will present in HDU header. 23-Oct-98: bugfix: unnecessary space was written to FITS file for blank keywords. 24-Oct-98: syntax change: empty lines and lines with only whitespaces are written to FITS files as blank keywords (if inside group/hdu definition). Previously lines had to have at least 8 spaces. Please note, that due to pecularities of CFITSIO if the last keyword(s) defined for given HDU are blank keywords consisting of only 80 spaces, then (some of) those keywords may be silently deleted by CFITSIO. 13-Nov-98: bugfix: parser was writing GRPNAME twice. Parser still creates GRPNAME keywords for GROUP HDU's which do not specify them. However, values (of form DEFAULT_GROUP_XXX) are assigned not necessarily in order HDUs appear in template file, but rather in order parser completes their creation in FITS file. Also, when including files, if fopen fails, parser tries to open file with a name = directory_of_top_level file + name of file to be included, as long as name of file to be included does not specify absolute pathname. 16-Nov-98: bugfix to bugfix from 13-Nov-98 19-Nov-98: EXTVER keyword is now automatically assigned value by parser. 17-Dev-98: 2 new things added: 1st: CFITSIO_INCLUDE_FILES environment variable can contain a colon separated list of directories to look for when looking for template include files (and master template also). 2nd: it is now possible to append template to nonempty FITS. file. fitsfile *ff no longer needs to point to an empty FITS file with 0 HDUs in it. All data written by parser will simple be appended at the end of file. 22-Jan-99: changes to parser: when in append mode parser initially scans all existing HDUs to built a list of already used EXTNAME/EXTVERs 22-Jan-99: Bruce O'Neel, bugfix : TLONG should always reference long type variable on OSF/Alpha and on 64-bit archs in general 20-Jun-2002 Wm Pence, added support for the HIERARCH keyword convention in which keyword names can effectively be longer than 8 characters. Example: HIERARCH LongKeywordName = 'value' / comment 30-Jan-2003 Wm Pence, bugfix: ngp_read_xtension was testing for "ASCIITABLE" instead of "TABLE" as the XTENSION value of an ASCII table, and it did not allow for optional trailing spaces in the "IMAGE" or "TABLE" string. 16-Dec-2003 James Peachey: ngp_keyword_all_write was modified to apply comments from the template file to the output file in the case of reserved keywords (e.g. tform#, ttype# etcetera). */ #include #include #ifdef sparc #include #include #endif #include #include "fitsio2.h" #include "grparser.h" NGP_RAW_LINE ngp_curline = { NULL, NULL, NULL, NGP_TTYPE_UNKNOWN, NULL, NGP_FORMAT_OK, 0 }; NGP_RAW_LINE ngp_prevline = { NULL, NULL, NULL, NGP_TTYPE_UNKNOWN, NULL, NGP_FORMAT_OK, 0 }; int ngp_inclevel = 0; /* number of included files, 1 - means mean file */ int ngp_grplevel = 0; /* group nesting level, 0 - means no grouping */ FILE *ngp_fp[NGP_MAX_INCLUDE]; /* stack of included file handles */ int ngp_keyidx = NGP_TOKEN_UNKNOWN; /* index of token in current line */ NGP_TOKEN ngp_linkey; /* keyword after line analyze */ char ngp_master_dir[NGP_MAX_FNAME]; /* directory of top level include file */ NGP_TKDEF ngp_tkdef[] = /* tokens recognized by parser */ { { "\\INCLUDE", NGP_TOKEN_INCLUDE }, { "\\GROUP", NGP_TOKEN_GROUP }, { "\\END", NGP_TOKEN_END }, { "XTENSION", NGP_TOKEN_XTENSION }, { "SIMPLE", NGP_TOKEN_SIMPLE }, { NULL, NGP_TOKEN_UNKNOWN } }; int master_grp_idx = 1; /* current unnamed group in object */ int ngp_extver_tab_size = 0; NGP_EXTVER_TAB *ngp_extver_tab = NULL; int ngp_get_extver(char *extname, int *version) { NGP_EXTVER_TAB *p; char *p2; int i; if ((NULL == extname) || (NULL == version)) return(NGP_BAD_ARG); if ((NULL == ngp_extver_tab) && (ngp_extver_tab_size > 0)) return(NGP_BAD_ARG); if ((NULL != ngp_extver_tab) && (ngp_extver_tab_size <= 0)) return(NGP_BAD_ARG); for (i=0; i 0)) return(NGP_BAD_ARG); if ((NULL != ngp_extver_tab) && (ngp_extver_tab_size <= 0)) return(NGP_BAD_ARG); for (i=0; i ngp_extver_tab[i].version) ngp_extver_tab[i].version = version; return(NGP_OK); } } if (NULL == ngp_extver_tab) { p = (NGP_EXTVER_TAB *)ngp_alloc(sizeof(NGP_EXTVER_TAB)); } else { p = (NGP_EXTVER_TAB *)ngp_realloc(ngp_extver_tab, (ngp_extver_tab_size + 1) * sizeof(NGP_EXTVER_TAB)); } if (NULL == p) return(NGP_NO_MEMORY); p2 = ngp_alloc(strlen(extname) + 1); if (NULL == p2) { ngp_free(p); return(NGP_NO_MEMORY); } strcpy(p2, extname); ngp_extver_tab = p; ngp_extver_tab[ngp_extver_tab_size].extname = p2; ngp_extver_tab[ngp_extver_tab_size].version = version; ngp_extver_tab_size++; return(NGP_OK); } int ngp_delete_extver_tab(void) { int i; if ((NULL == ngp_extver_tab) && (ngp_extver_tab_size > 0)) return(NGP_BAD_ARG); if ((NULL != ngp_extver_tab) && (ngp_extver_tab_size <= 0)) return(NGP_BAD_ARG); if ((NULL == ngp_extver_tab) && (0 == ngp_extver_tab_size)) return(NGP_OK); for (i=0; i= 'a') && (c1 <= 'z')) c1 += ('A' - 'a'); c2 = *p2; if ((c2 >= 'a') && (c2 <= 'z')) c2 += ('A' - 'a'); if (c1 < c2) return(-1); if (c1 > c2) return(1); if (0 == c1) return(0); p1++; p2++; } } int ngp_strcasencmp(char *p1, char *p2, int n) { char c1, c2; int ii; for (ii=0;ii= 'a') && (c1 <= 'z')) c1 += ('A' - 'a'); c2 = *p2; if ((c2 >= 'a') && (c2 <= 'z')) c2 += ('A' - 'a'); if (c1 < c2) return(-1); if (c1 > c2) return(1); if (0 == c1) return(0); p1++; p2++; } return(0); } /* read one line from file */ int ngp_line_from_file(FILE *fp, char **p) { int c, r, llen, allocsize, alen; char *p2; if (NULL == fp) return(NGP_NUL_PTR); /* check for stupid args */ if (NULL == p) return(NGP_NUL_PTR); /* more foolproof checks */ r = NGP_OK; /* initialize stuff, reset err code */ llen = 0; /* 0 characters read so far */ *p = (char *)ngp_alloc(1); /* preallocate 1 byte */ allocsize = 1; /* signal that we have allocated 1 byte */ if (NULL == *p) return(NGP_NO_MEMORY); /* if this failed, system is in dire straits */ for (;;) { c = getc(fp); /* get next character */ if ('\r' == c) continue; /* carriage return character ? Just ignore it */ if (EOF == c) /* EOF signalled ? */ { if (ferror(fp)) r = NGP_READ_ERR; /* was it real error or simply EOF ? */ if (0 == llen) return(NGP_EOF); /* signal EOF only if 0 characters read so far */ break; } if ('\n' == c) break; /* end of line character ? */ llen++; /* we have new character, make room for it */ alen = ((llen + NGP_ALLOCCHUNK) / NGP_ALLOCCHUNK) * NGP_ALLOCCHUNK; if (alen > allocsize) { p2 = (char *)ngp_realloc(*p, alen); /* realloc buffer, if there is need */ if (NULL == p2) { r = NGP_NO_MEMORY; break; } *p = p2; allocsize = alen; } (*p)[llen - 1] = c; /* copy character to buffer */ } llen++; /* place for terminating \0 */ if (llen != allocsize) { p2 = (char *)ngp_realloc(*p, llen); if (NULL == p2) r = NGP_NO_MEMORY; else { *p = p2; (*p)[llen - 1] = 0; /* copy \0 to buffer */ } } else { (*p)[llen - 1] = 0; /* necessary when line read was empty */ } if ((NGP_EOF != r) && (NGP_OK != r)) /* in case of errors free resources */ { ngp_free(*p); *p = NULL; } return(r); /* return status code */ } /* free current line structure */ int ngp_free_line(void) { if (NULL != ngp_curline.line) { ngp_free(ngp_curline.line); ngp_curline.line = NULL; ngp_curline.name = NULL; ngp_curline.value = NULL; ngp_curline.comment = NULL; ngp_curline.type = NGP_TTYPE_UNKNOWN; ngp_curline.format = NGP_FORMAT_OK; ngp_curline.flags = 0; } return(NGP_OK); } /* free cached line structure */ int ngp_free_prevline(void) { if (NULL != ngp_prevline.line) { ngp_free(ngp_prevline.line); ngp_prevline.line = NULL; ngp_prevline.name = NULL; ngp_prevline.value = NULL; ngp_prevline.comment = NULL; ngp_prevline.type = NGP_TTYPE_UNKNOWN; ngp_prevline.format = NGP_FORMAT_OK; ngp_prevline.flags = 0; } return(NGP_OK); } /* read one line */ int ngp_read_line_buffered(FILE *fp) { ngp_free_line(); /* first free current line (if any) */ if (NULL != ngp_prevline.line) /* if cached, return cached line */ { ngp_curline = ngp_prevline; ngp_prevline.line = NULL; ngp_prevline.name = NULL; ngp_prevline.value = NULL; ngp_prevline.comment = NULL; ngp_prevline.type = NGP_TTYPE_UNKNOWN; ngp_prevline.format = NGP_FORMAT_OK; ngp_prevline.flags = 0; ngp_curline.flags = NGP_LINE_REREAD; return(NGP_OK); } ngp_curline.flags = 0; /* if not cached really read line from file */ return(ngp_line_from_file(fp, &(ngp_curline.line))); } /* unread line */ int ngp_unread_line(void) { if (NULL == ngp_curline.line) /* nothing to unread */ return(NGP_EMPTY_CURLINE); if (NULL != ngp_prevline.line) /* we cannot unread line twice */ return(NGP_UNREAD_QUEUE_FULL); ngp_prevline = ngp_curline; ngp_curline.line = NULL; return(NGP_OK); } /* a first guess line decomposition */ int ngp_extract_tokens(NGP_RAW_LINE *cl) { char *p, *s; int cl_flags, i; p = cl->line; /* start from beginning of line */ if (NULL == p) return(NGP_NUL_PTR); cl->name = cl->value = cl->comment = NULL; cl->type = NGP_TTYPE_UNKNOWN; cl->format = NGP_FORMAT_OK; cl_flags = 0; for (i=0;; i++) /* if 8 spaces at beginning then line is comment */ { if ((0 == *p) || ('\n' == *p)) { /* if line has only blanks -> write blank keyword */ cl->line[0] = 0; /* create empty name (0 length string) */ cl->comment = cl->name = cl->line; cl->type = NGP_TTYPE_RAW; /* signal write unformatted to FITS file */ return(NGP_OK); } if ((' ' != *p) && ('\t' != *p)) break; if (i >= 7) { cl->comment = p + 1; for (s = cl->comment;; s++) /* filter out any EOS characters in comment */ { if ('\n' == *s) *s = 0; if (0 == *s) break; } cl->line[0] = 0; /* create empty name (0 length string) */ cl->name = cl->line; cl->type = NGP_TTYPE_RAW; return(NGP_OK); } p++; } cl->name = p; for (;;) /* we need to find 1st whitespace */ { if ((0 == *p) || ('\n' == *p)) { *p = 0; break; } /* from Richard Mathar, 2002-05-03, add 10 lines: if upper/lowercase HIERARCH followed also by an equal sign... */ if( strncasecmp("HIERARCH",p,strlen("HIERARCH")) == 0 ) { char * const eqsi=strchr(p,'=') ; if( eqsi ) { cl_flags |= NGP_FOUND_EQUAL_SIGN ; p=eqsi ; break ; } } if ((' ' == *p) || ('\t' == *p)) break; if ('=' == *p) { cl_flags |= NGP_FOUND_EQUAL_SIGN; break; } p++; } if (*p) *(p++) = 0; /* found end of keyname so terminate string with zero */ if ((!ngp_strcasecmp("HISTORY", cl->name)) || (!ngp_strcasecmp("COMMENT", cl->name)) || (!ngp_strcasecmp("CONTINUE", cl->name))) { cl->comment = p; for (s = cl->comment;; s++) /* filter out any EOS characters in comment */ { if ('\n' == *s) *s = 0; if (0 == *s) break; } cl->type = NGP_TTYPE_RAW; return(NGP_OK); } if (!ngp_strcasecmp("\\INCLUDE", cl->name)) { for (;; p++) if ((' ' != *p) && ('\t' != *p)) break; /* skip whitespace */ cl->value = p; for (s = cl->value;; s++) /* filter out any EOS characters */ { if ('\n' == *s) *s = 0; if (0 == *s) break; } cl->type = NGP_TTYPE_UNKNOWN; return(NGP_OK); } for (;; p++) { if ((0 == *p) || ('\n' == *p)) return(NGP_OK); /* test if at end of string */ if ((' ' == *p) || ('\t' == *p)) continue; /* skip whitespace */ if (cl_flags & NGP_FOUND_EQUAL_SIGN) break; if ('=' != *p) break; /* ignore initial equal sign */ cl_flags |= NGP_FOUND_EQUAL_SIGN; } if ('/' == *p) /* no value specified, comment only */ { p++; if ((' ' == *p) || ('\t' == *p)) p++; cl->comment = p; for (s = cl->comment;; s++) /* filter out any EOS characters in comment */ { if ('\n' == *s) *s = 0; if (0 == *s) break; } return(NGP_OK); } if ('\'' == *p) /* we have found string within quotes */ { cl->value = s = ++p; /* set pointer to beginning of that string */ cl->type = NGP_TTYPE_STRING; /* signal that it is of string type */ for (;;) /* analyze it */ { if ((0 == *p) || ('\n' == *p)) /* end of line -> end of string */ { *s = 0; return(NGP_OK); } if ('\'' == *p) /* we have found doublequote */ { if ((0 == p[1]) || ('\n' == p[1]))/* doublequote is the last character in line */ { *s = 0; return(NGP_OK); } if (('\t' == p[1]) || (' ' == p[1])) /* duoblequote was string terminator */ { *s = 0; p++; break; } if ('\'' == p[1]) p++; /* doublequote is inside string, convert "" -> " */ } *(s++) = *(p++); /* compact string in place, necess. by "" -> " conversion */ } } else /* regular token */ { cl->value = p; /* set pointer to token */ cl->type = NGP_TTYPE_UNKNOWN; /* we dont know type at the moment */ for (;; p++) /* we need to find 1st whitespace */ { if ((0 == *p) || ('\n' == *p)) { *p = 0; return(NGP_OK); } if ((' ' == *p) || ('\t' == *p)) break; } if (*p) *(p++) = 0; /* found so terminate string with zero */ } for (;; p++) { if ((0 == *p) || ('\n' == *p)) return(NGP_OK); /* test if at end of string */ if ((' ' != *p) && ('\t' != *p)) break; /* skip whitespace */ } if ('/' == *p) /* no value specified, comment only */ { p++; if ((' ' == *p) || ('\t' == *p)) p++; cl->comment = p; for (s = cl->comment;; s++) /* filter out any EOS characters in comment */ { if ('\n' == *s) *s = 0; if (0 == *s) break; } return(NGP_OK); } cl->format = NGP_FORMAT_ERROR; return(NGP_OK); /* too many tokens ... */ } /* try to open include file. If open fails and fname does not specify absolute pathname, try to open fname in any directory specified in CFITSIO_INCLUDE_FILES environment variable. Finally try to open fname relative to ngp_master_dir, which is directory of top level include file */ int ngp_include_file(char *fname) /* try to open include file */ { char *p, *p2, *cp, *envar, envfiles[NGP_MAX_ENVFILES]; if (NULL == fname) return(NGP_NUL_PTR); if (ngp_inclevel >= NGP_MAX_INCLUDE) /* too many include files */ return(NGP_INC_NESTING); if (NULL == (ngp_fp[ngp_inclevel] = fopen(fname, "r"))) { /* if simple open failed .. */ envar = getenv("CFITSIO_INCLUDE_FILES"); /* scan env. variable, and retry to open */ if (NULL != envar) /* is env. variable defined ? */ { strncpy(envfiles, envar, NGP_MAX_ENVFILES - 1); envfiles[NGP_MAX_ENVFILES - 1] = 0; /* copy search path to local variable, env. is fragile */ for (p2 = strtok(envfiles, ":"); NULL != p2; p2 = strtok(NULL, ":")) { cp = (char *)ngp_alloc(strlen(fname) + strlen(p2) + 2); if (NULL == cp) return(NGP_NO_MEMORY); strcpy(cp, p2); #ifdef MSDOS strcat(cp, "\\"); /* abs. pathname for MSDOS */ #else strcat(cp, "/"); /* and for unix */ #endif strcat(cp, fname); ngp_fp[ngp_inclevel] = fopen(cp, "r"); ngp_free(cp); if (NULL != ngp_fp[ngp_inclevel]) break; } } if (NULL == ngp_fp[ngp_inclevel]) /* finally try to open relative to top level */ { #ifdef MSDOS if ('\\' == fname[0]) return(NGP_ERR_FOPEN); /* abs. pathname for MSDOS, does not support C:\\PATH */ #else if ('/' == fname[0]) return(NGP_ERR_FOPEN); /* and for unix */ #endif if (0 == ngp_master_dir[0]) return(NGP_ERR_FOPEN); p = ngp_alloc(strlen(fname) + strlen(ngp_master_dir) + 1); if (NULL == p) return(NGP_NO_MEMORY); strcpy(p, ngp_master_dir); /* construct composite pathname */ strcat(p, fname); /* comp = master + fname */ ngp_fp[ngp_inclevel] = fopen(p, "r");/* try to open composite */ ngp_free(p); /* we don't need buffer anymore */ if (NULL == ngp_fp[ngp_inclevel]) return(NGP_ERR_FOPEN); /* fail if error */ } } ngp_inclevel++; return(NGP_OK); } /* read line in the intelligent way. All \INCLUDE directives are handled, empty and comment line skipped. If this function returns NGP_OK, than decomposed line (name, type, value in proper type and comment) are stored in ngp_linkey structure. ignore_blank_lines parameter is zero when parser is inside GROUP or HDU definition. Nonzero otherwise. */ int ngp_read_line(int ignore_blank_lines) { int r, nc, savec; unsigned k; if (ngp_inclevel <= 0) /* do some sanity checking first */ { ngp_keyidx = NGP_TOKEN_EOF; /* no parents, so report error */ return(NGP_OK); } if (ngp_inclevel > NGP_MAX_INCLUDE) return(NGP_INC_NESTING); if (NULL == ngp_fp[ngp_inclevel - 1]) return(NGP_NUL_PTR); for (;;) { switch (r = ngp_read_line_buffered(ngp_fp[ngp_inclevel - 1])) { case NGP_EOF: ngp_inclevel--; /* end of file, revert to parent */ if (ngp_fp[ngp_inclevel]) /* we can close old file */ fclose(ngp_fp[ngp_inclevel]); ngp_fp[ngp_inclevel] = NULL; if (ngp_inclevel <= 0) { ngp_keyidx = NGP_TOKEN_EOF; /* no parents, so report error */ return(NGP_OK); } continue; case NGP_OK: if (ngp_curline.flags & NGP_LINE_REREAD) return(r); break; default: return(r); } switch (ngp_curline.line[0]) { case 0: if (0 == ignore_blank_lines) break; /* ignore empty lines if told so */ case '#': continue; /* ignore comment lines */ } r = ngp_extract_tokens(&ngp_curline); /* analyse line, extract tokens and comment */ if (NGP_OK != r) return(r); if (NULL == ngp_curline.name) continue; /* skip lines consisting only of whitespaces */ for (k = 0; k < strlen(ngp_curline.name); k++) { if ((ngp_curline.name[k] >= 'a') && (ngp_curline.name[k] <= 'z')) ngp_curline.name[k] += 'A' - 'a'; /* force keyword to be upper case */ if (k == 7) break; /* only first 8 chars are required to be upper case */ } for (k=0;; k++) /* find index of keyword in keyword table */ { if (NGP_TOKEN_UNKNOWN == ngp_tkdef[k].code) break; if (0 == strcmp(ngp_curline.name, ngp_tkdef[k].name)) break; } ngp_keyidx = ngp_tkdef[k].code; /* save this index, grammar parser will need this */ if (NGP_TOKEN_INCLUDE == ngp_keyidx) /* if this is \INCLUDE keyword, try to include file */ { if (NGP_OK != (r = ngp_include_file(ngp_curline.value))) return(r); continue; /* and read next line */ } ngp_linkey.type = NGP_TTYPE_UNKNOWN; /* now, get the keyword type, it's a long story ... */ if (NULL != ngp_curline.value) /* if no value given signal it */ { if (NGP_TTYPE_STRING == ngp_curline.type) /* string type test */ { ngp_linkey.type = NGP_TTYPE_STRING; ngp_linkey.value.s = ngp_curline.value; } if (NGP_TTYPE_UNKNOWN == ngp_linkey.type) /* bool type test */ { if ((!ngp_strcasecmp("T", ngp_curline.value)) || (!ngp_strcasecmp("F", ngp_curline.value))) { ngp_linkey.type = NGP_TTYPE_BOOL; ngp_linkey.value.b = (ngp_strcasecmp("T", ngp_curline.value) ? 0 : 1); } } if (NGP_TTYPE_UNKNOWN == ngp_linkey.type) /* complex type test */ { if (2 == sscanf(ngp_curline.value, "(%lg,%lg)%n", &(ngp_linkey.value.c.re), &(ngp_linkey.value.c.im), &nc)) { if ((' ' == ngp_curline.value[nc]) || ('\t' == ngp_curline.value[nc]) || ('\n' == ngp_curline.value[nc]) || (0 == ngp_curline.value[nc])) { ngp_linkey.type = NGP_TTYPE_COMPLEX; } } } if (NGP_TTYPE_UNKNOWN == ngp_linkey.type) /* real type test */ { if (strchr(ngp_curline.value, '.') && (1 == sscanf(ngp_curline.value, "%lg%n", &(ngp_linkey.value.d), &nc))) { if ('D' == ngp_curline.value[nc]) { /* test if template used a 'D' rather than an 'E' as the exponent character (added by WDP in 12/2010) */ savec = nc; ngp_curline.value[nc] = 'E'; sscanf(ngp_curline.value, "%lg%n", &(ngp_linkey.value.d), &nc); if ((' ' == ngp_curline.value[nc]) || ('\t' == ngp_curline.value[nc]) || ('\n' == ngp_curline.value[nc]) || (0 == ngp_curline.value[nc])) { ngp_linkey.type = NGP_TTYPE_REAL; } else { /* no, this is not a real value */ ngp_curline.value[savec] = 'D'; /* restore the original D character */ } } else { if ((' ' == ngp_curline.value[nc]) || ('\t' == ngp_curline.value[nc]) || ('\n' == ngp_curline.value[nc]) || (0 == ngp_curline.value[nc])) { ngp_linkey.type = NGP_TTYPE_REAL; } } } } if (NGP_TTYPE_UNKNOWN == ngp_linkey.type) /* integer type test */ { if (1 == sscanf(ngp_curline.value, "%d%n", &(ngp_linkey.value.i), &nc)) { if ((' ' == ngp_curline.value[nc]) || ('\t' == ngp_curline.value[nc]) || ('\n' == ngp_curline.value[nc]) || (0 == ngp_curline.value[nc])) { ngp_linkey.type = NGP_TTYPE_INT; } } } if (NGP_TTYPE_UNKNOWN == ngp_linkey.type) /* force string type */ { ngp_linkey.type = NGP_TTYPE_STRING; ngp_linkey.value.s = ngp_curline.value; } } else { if (NGP_TTYPE_RAW == ngp_curline.type) ngp_linkey.type = NGP_TTYPE_RAW; else ngp_linkey.type = NGP_TTYPE_NULL; } if (NULL != ngp_curline.comment) { strncpy(ngp_linkey.comment, ngp_curline.comment, NGP_MAX_COMMENT); /* store comment */ ngp_linkey.comment[NGP_MAX_COMMENT - 1] = 0; } else { ngp_linkey.comment[0] = 0; } strncpy(ngp_linkey.name, ngp_curline.name, NGP_MAX_NAME); /* and keyword's name */ ngp_linkey.name[NGP_MAX_NAME - 1] = 0; if (strlen(ngp_linkey.name) > FLEN_KEYWORD) /* WDP: 20-Jun-2002: mod to support HIERARCH */ { return(NGP_BAD_ARG); /* cfitsio does not allow names > 8 chars */ } return(NGP_OK); /* we have valid non empty line, so return success */ } } /* check whether keyword can be written as is */ int ngp_keyword_is_write(NGP_TOKEN *ngp_tok) { int i, j, l, spc; /* indexed variables not to write */ static char *nm[] = { "NAXIS", "TFORM", "TTYPE", NULL } ; /* non indexed variables not allowed to write */ static char *nmni[] = { "SIMPLE", "XTENSION", "BITPIX", "NAXIS", "PCOUNT", "GCOUNT", "TFIELDS", "THEAP", "EXTEND", "EXTVER", NULL } ; if (NULL == ngp_tok) return(NGP_NUL_PTR); for (j = 0; ; j++) /* first check non indexed */ { if (NULL == nmni[j]) break; if (0 == strcmp(nmni[j], ngp_tok->name)) return(NGP_BAD_ARG); } for (j = 0; ; j++) /* now check indexed */ { if (NULL == nm[j]) return(NGP_OK); l = strlen(nm[j]); if ((l < 1) || (l > 5)) continue; if (0 == strncmp(nm[j], ngp_tok->name, l)) break; } if ((ngp_tok->name[l] < '1') || (ngp_tok->name[l] > '9')) return(NGP_OK); spc = 0; for (i = l + 1; i < 8; i++) { if (spc) { if (' ' != ngp_tok->name[i]) return(NGP_OK); } else { if ((ngp_tok->name[i] >= '0') || (ngp_tok->name[i] <= '9')) continue; if (' ' == ngp_tok->name[i]) { spc = 1; continue; } if (0 == ngp_tok->name[i]) break; return(NGP_OK); } } return(NGP_BAD_ARG); } /* write (almost) all keywords from given HDU to disk */ int ngp_keyword_all_write(NGP_HDU *ngph, fitsfile *ffp, int mode) { int i, r, ib; char buf[200]; long l; if (NULL == ngph) return(NGP_NUL_PTR); if (NULL == ffp) return(NGP_NUL_PTR); r = NGP_OK; for (i=0; itokcnt; i++) { r = ngp_keyword_is_write(&(ngph->tok[i])); if ((NGP_REALLY_ALL & mode) || (NGP_OK == r)) { switch (ngph->tok[i].type) { case NGP_TTYPE_BOOL: ib = ngph->tok[i].value.b; fits_write_key(ffp, TLOGICAL, ngph->tok[i].name, &ib, ngph->tok[i].comment, &r); break; case NGP_TTYPE_STRING: fits_write_key_longstr(ffp, ngph->tok[i].name, ngph->tok[i].value.s, ngph->tok[i].comment, &r); break; case NGP_TTYPE_INT: l = ngph->tok[i].value.i; /* bugfix - 22-Jan-99, BO - nonalignment of OSF/Alpha */ fits_write_key(ffp, TLONG, ngph->tok[i].name, &l, ngph->tok[i].comment, &r); break; case NGP_TTYPE_REAL: fits_write_key(ffp, TDOUBLE, ngph->tok[i].name, &(ngph->tok[i].value.d), ngph->tok[i].comment, &r); break; case NGP_TTYPE_COMPLEX: fits_write_key(ffp, TDBLCOMPLEX, ngph->tok[i].name, &(ngph->tok[i].value.c), ngph->tok[i].comment, &r); break; case NGP_TTYPE_NULL: fits_write_key_null(ffp, ngph->tok[i].name, ngph->tok[i].comment, &r); break; case NGP_TTYPE_RAW: if (0 == strcmp("HISTORY", ngph->tok[i].name)) { fits_write_history(ffp, ngph->tok[i].comment, &r); break; } if (0 == strcmp("COMMENT", ngph->tok[i].name)) { fits_write_comment(ffp, ngph->tok[i].comment, &r); break; } sprintf(buf, "%-8.8s%s", ngph->tok[i].name, ngph->tok[i].comment); fits_write_record(ffp, buf, &r); break; } } else if (NGP_BAD_ARG == r) /* enhancement 10 dec 2003, James Peachey: template comments replace defaults */ { r = NGP_OK; /* update comments of special keywords like TFORM */ if (ngph->tok[i].comment && *ngph->tok[i].comment) /* do not update with a blank comment */ { fits_modify_comment(ffp, ngph->tok[i].name, ngph->tok[i].comment, &r); } } else /* other problem, typically a blank token */ { r = NGP_OK; /* skip this token, but continue */ } if (r) return(r); } fits_set_hdustruc(ffp, &r); /* resync cfitsio */ return(r); } /* init HDU structure */ int ngp_hdu_init(NGP_HDU *ngph) { if (NULL == ngph) return(NGP_NUL_PTR); ngph->tok = NULL; ngph->tokcnt = 0; return(NGP_OK); } /* clear HDU structure */ int ngp_hdu_clear(NGP_HDU *ngph) { int i; if (NULL == ngph) return(NGP_NUL_PTR); for (i=0; itokcnt; i++) { if (NGP_TTYPE_STRING == ngph->tok[i].type) if (NULL != ngph->tok[i].value.s) { ngp_free(ngph->tok[i].value.s); ngph->tok[i].value.s = NULL; } } if (NULL != ngph->tok) ngp_free(ngph->tok); ngph->tok = NULL; ngph->tokcnt = 0; return(NGP_OK); } /* insert new token to HDU structure */ int ngp_hdu_insert_token(NGP_HDU *ngph, NGP_TOKEN *newtok) { NGP_TOKEN *tkp; if (NULL == ngph) return(NGP_NUL_PTR); if (NULL == newtok) return(NGP_NUL_PTR); if (0 == ngph->tokcnt) tkp = (NGP_TOKEN *)ngp_alloc((ngph->tokcnt + 1) * sizeof(NGP_TOKEN)); else tkp = (NGP_TOKEN *)ngp_realloc(ngph->tok, (ngph->tokcnt + 1) * sizeof(NGP_TOKEN)); if (NULL == tkp) return(NGP_NO_MEMORY); ngph->tok = tkp; ngph->tok[ngph->tokcnt] = *newtok; if (NGP_TTYPE_STRING == newtok->type) { if (NULL != newtok->value.s) { ngph->tok[ngph->tokcnt].value.s = (char *)ngp_alloc(1 + strlen(newtok->value.s)); if (NULL == ngph->tok[ngph->tokcnt].value.s) return(NGP_NO_MEMORY); strcpy(ngph->tok[ngph->tokcnt].value.s, newtok->value.s); } } ngph->tokcnt++; return(NGP_OK); } int ngp_append_columns(fitsfile *ff, NGP_HDU *ngph, int aftercol) { int r, i, j, exitflg, ngph_i; char *my_tform, *my_ttype; char ngph_ctmp; if (NULL == ff) return(NGP_NUL_PTR); if (NULL == ngph) return(NGP_NUL_PTR); if (0 == ngph->tokcnt) return(NGP_OK); /* nothing to do ! */ r = NGP_OK; exitflg = 0; for (j=aftercol; jtok[i].name, "TFORM%d%c", &ngph_i, &ngph_ctmp)) { if ((NGP_TTYPE_STRING == ngph->tok[i].type) && (ngph_i == (j + 1))) { my_tform = ngph->tok[i].value.s; } } else if (1 == sscanf(ngph->tok[i].name, "TTYPE%d%c", &ngph_i, &ngph_ctmp)) { if ((NGP_TTYPE_STRING == ngph->tok[i].type) && (ngph_i == (j + 1))) { my_ttype = ngph->tok[i].value.s; } } if ((NULL != my_tform) && (my_ttype[0])) break; if (i < (ngph->tokcnt - 1)) continue; exitflg = 1; break; } if ((NGP_OK == r) && (NULL != my_tform)) fits_insert_col(ff, j + 1, my_ttype, my_tform, &r); if ((NGP_OK != r) || exitflg) break; } return(r); } /* read complete HDU */ int ngp_read_xtension(fitsfile *ff, int parent_hn, int simple_mode) { int r, exflg, l, my_hn, tmp0, incrementor_index, i, j; int ngph_dim, ngph_bitpix, ngph_node_type, my_version; char incrementor_name[NGP_MAX_STRING], ngph_ctmp; char *ngph_extname = 0; long ngph_size[NGP_MAX_ARRAY_DIM]; NGP_HDU ngph; long lv; incrementor_name[0] = 0; /* signal no keyword+'#' found yet */ incrementor_index = 0; if (NGP_OK != (r = ngp_hdu_init(&ngph))) return(r); if (NGP_OK != (r = ngp_read_line(0))) return(r); /* EOF always means error here */ switch (NGP_XTENSION_SIMPLE & simple_mode) { case 0: if (NGP_TOKEN_XTENSION != ngp_keyidx) return(NGP_TOKEN_NOT_EXPECT); break; default: if (NGP_TOKEN_SIMPLE != ngp_keyidx) return(NGP_TOKEN_NOT_EXPECT); break; } if (NGP_OK != (r = ngp_hdu_insert_token(&ngph, &ngp_linkey))) return(r); for (;;) { if (NGP_OK != (r = ngp_read_line(0))) return(r); /* EOF always means error here */ exflg = 0; switch (ngp_keyidx) { case NGP_TOKEN_SIMPLE: r = NGP_TOKEN_NOT_EXPECT; break; case NGP_TOKEN_END: case NGP_TOKEN_XTENSION: case NGP_TOKEN_GROUP: r = ngp_unread_line(); /* WARNING - not break here .... */ case NGP_TOKEN_EOF: exflg = 1; break; default: l = strlen(ngp_linkey.name); if ((l >= 2) && (l <= 6)) { if ('#' == ngp_linkey.name[l - 1]) { if (0 == incrementor_name[0]) { memcpy(incrementor_name, ngp_linkey.name, l - 1); incrementor_name[l - 1] = 0; } if (((l - 1) == (int)strlen(incrementor_name)) && (0 == memcmp(incrementor_name, ngp_linkey.name, l - 1))) { incrementor_index++; } sprintf(ngp_linkey.name + l - 1, "%d", incrementor_index); } } r = ngp_hdu_insert_token(&ngph, &ngp_linkey); break; } if ((NGP_OK != r) || exflg) break; } if (NGP_OK == r) { /* we should scan keywords, and calculate HDU's */ /* structure ourselves .... */ ngph_node_type = NGP_NODE_INVALID; /* init variables */ ngph_bitpix = 0; ngph_extname = NULL; for (i=0; i=1) && (j <= NGP_MAX_ARRAY_DIM)) { ngph_size[j - 1] = ngph.tok[i].value.i; } } } switch (ngph_node_type) { case NGP_NODE_IMAGE: if (NGP_XTENSION_FIRST == ((NGP_XTENSION_FIRST | NGP_XTENSION_SIMPLE) & simple_mode)) { /* if caller signals that this is 1st HDU in file */ /* and it is IMAGE defined with XTENSION, then we */ /* need create dummy Primary HDU */ fits_create_img(ff, 16, 0, NULL, &r); } /* create image */ fits_create_img(ff, ngph_bitpix, ngph_dim, ngph_size, &r); /* update keywords */ if (NGP_OK == r) r = ngp_keyword_all_write(&ngph, ff, NGP_NON_SYSTEM_ONLY); break; case NGP_NODE_ATABLE: case NGP_NODE_BTABLE: /* create table, 0 rows and 0 columns for the moment */ fits_create_tbl(ff, ((NGP_NODE_ATABLE == ngph_node_type) ? ASCII_TBL : BINARY_TBL), 0, 0, NULL, NULL, NULL, NULL, &r); if (NGP_OK != r) break; /* add columns ... */ r = ngp_append_columns(ff, &ngph, 0); if (NGP_OK != r) break; /* add remaining keywords */ r = ngp_keyword_all_write(&ngph, ff, NGP_NON_SYSTEM_ONLY); if (NGP_OK != r) break; /* if requested add rows */ if (ngph_size[1] > 0) fits_insert_rows(ff, 0, ngph_size[1], &r); break; default: r = NGP_BAD_ARG; break; } } if ((NGP_OK == r) && (NULL != ngph_extname)) { r = ngp_get_extver(ngph_extname, &my_version); /* write correct ext version number */ lv = my_version; /* bugfix - 22-Jan-99, BO - nonalignment of OSF/Alpha */ fits_write_key(ff, TLONG, "EXTVER", &lv, "auto assigned by template parser", &r); } if (NGP_OK == r) { if (parent_hn > 0) { fits_get_hdu_num(ff, &my_hn); fits_movabs_hdu(ff, parent_hn, &tmp0, &r); /* link us to parent */ fits_add_group_member(ff, NULL, my_hn, &r); fits_movabs_hdu(ff, my_hn, &tmp0, &r); if (NGP_OK != r) return(r); } } if (NGP_OK != r) /* in case of error - delete hdu */ { tmp0 = 0; fits_delete_hdu(ff, NULL, &tmp0); } ngp_hdu_clear(&ngph); return(r); } /* read complete GROUP */ int ngp_read_group(fitsfile *ff, char *grpname, int parent_hn) { int r, exitflg, l, my_hn, tmp0, incrementor_index; char grnm[NGP_MAX_STRING]; /* keyword holding group name */ char incrementor_name[NGP_MAX_STRING]; NGP_HDU ngph; incrementor_name[0] = 0; /* signal no keyword+'#' found yet */ incrementor_index = 6; /* first 6 cols are used by group */ ngp_grplevel++; if (NGP_OK != (r = ngp_hdu_init(&ngph))) return(r); r = NGP_OK; if (NGP_OK != (r = fits_create_group(ff, grpname, GT_ID_ALL_URI, &r))) return(r); fits_get_hdu_num(ff, &my_hn); if (parent_hn > 0) { fits_movabs_hdu(ff, parent_hn, &tmp0, &r); /* link us to parent */ fits_add_group_member(ff, NULL, my_hn, &r); fits_movabs_hdu(ff, my_hn, &tmp0, &r); if (NGP_OK != r) return(r); } for (exitflg = 0; 0 == exitflg;) { if (NGP_OK != (r = ngp_read_line(0))) break; /* EOF always means error here */ switch (ngp_keyidx) { case NGP_TOKEN_SIMPLE: case NGP_TOKEN_EOF: r = NGP_TOKEN_NOT_EXPECT; break; case NGP_TOKEN_END: ngp_grplevel--; exitflg = 1; break; case NGP_TOKEN_GROUP: if (NGP_TTYPE_STRING == ngp_linkey.type) { strncpy(grnm, ngp_linkey.value.s, NGP_MAX_STRING); } else { sprintf(grnm, "DEFAULT_GROUP_%d", master_grp_idx++); } grnm[NGP_MAX_STRING - 1] = 0; r = ngp_read_group(ff, grnm, my_hn); break; /* we can have many subsequent GROUP defs */ case NGP_TOKEN_XTENSION: r = ngp_unread_line(); if (NGP_OK != r) break; r = ngp_read_xtension(ff, my_hn, 0); break; /* we can have many subsequent HDU defs */ default: l = strlen(ngp_linkey.name); if ((l >= 2) && (l <= 6)) { if ('#' == ngp_linkey.name[l - 1]) { if (0 == incrementor_name[0]) { memcpy(incrementor_name, ngp_linkey.name, l - 1); incrementor_name[l - 1] = 0; } if (((l - 1) == (int)strlen(incrementor_name)) && (0 == memcmp(incrementor_name, ngp_linkey.name, l - 1))) { incrementor_index++; } sprintf(ngp_linkey.name + l - 1, "%d", incrementor_index); } } r = ngp_hdu_insert_token(&ngph, &ngp_linkey); break; /* here we can add keyword */ } if (NGP_OK != r) break; } fits_movabs_hdu(ff, my_hn, &tmp0, &r); /* back to our HDU */ if (NGP_OK == r) /* create additional columns, if requested */ r = ngp_append_columns(ff, &ngph, 6); if (NGP_OK == r) /* and write keywords */ r = ngp_keyword_all_write(&ngph, ff, NGP_NON_SYSTEM_ONLY); if (NGP_OK != r) /* delete group in case of error */ { tmp0 = 0; fits_remove_group(ff, OPT_RM_GPT, &tmp0); } ngp_hdu_clear(&ngph); /* we are done with this HDU, so delete it */ return(r); } /* top level API functions */ /* read whole template. ff should point to the opened empty fits file. */ int fits_execute_template(fitsfile *ff, char *ngp_template, int *status) { int r, exit_flg, first_extension, i, my_hn, tmp0, keys_exist, more_keys, used_ver; char grnm[NGP_MAX_STRING], used_name[NGP_MAX_STRING]; long luv; if (NULL == status) return(NGP_NUL_PTR); if (NGP_OK != *status) return(*status); if ((NULL == ff) || (NULL == ngp_template)) { *status = NGP_NUL_PTR; return(*status); } ngp_inclevel = 0; /* initialize things, not all should be zero */ ngp_grplevel = 0; master_grp_idx = 1; exit_flg = 0; ngp_master_dir[0] = 0; /* this should be before 1st call to ngp_include_file */ first_extension = 1; /* we need to create PHDU */ if (NGP_OK != (r = ngp_delete_extver_tab())) { *status = r; return(r); } fits_get_hdu_num(ff, &my_hn); /* our HDU position */ if (my_hn <= 1) /* check whether we really need to create PHDU */ { fits_movabs_hdu(ff, 1, &tmp0, status); fits_get_hdrspace(ff, &keys_exist, &more_keys, status); fits_movabs_hdu(ff, my_hn, &tmp0, status); if (NGP_OK != *status) return(*status); /* error here means file is corrupted */ if (keys_exist > 0) first_extension = 0; /* if keywords exist assume PHDU already exist */ } else { first_extension = 0; /* PHDU (followed by 1+ extensions) exist */ for (i = 2; i<= my_hn; i++) { *status = NGP_OK; fits_movabs_hdu(ff, 1, &tmp0, status); if (NGP_OK != *status) break; fits_read_key(ff, TSTRING, "EXTNAME", used_name, NULL, status); if (NGP_OK != *status) continue; fits_read_key(ff, TLONG, "EXTVER", &luv, NULL, status); used_ver = luv; /* bugfix - 22-Jan-99, BO - nonalignment of OSF/Alpha */ if (VALUE_UNDEFINED == *status) { used_ver = 1; *status = NGP_OK; } if (NGP_OK == *status) *status = ngp_set_extver(used_name, used_ver); } fits_movabs_hdu(ff, my_hn, &tmp0, status); } if (NGP_OK != *status) return(*status); if (NGP_OK != (*status = ngp_include_file(ngp_template))) return(*status); for (i = strlen(ngp_template) - 1; i >= 0; i--) /* strlen is > 0, otherwise fopen failed */ { #ifdef MSDOS if ('\\' == ngp_template[i]) break; #else if ('/' == ngp_template[i]) break; #endif } i++; if (i > (NGP_MAX_FNAME - 1)) i = NGP_MAX_FNAME - 1; if (i > 0) { memcpy(ngp_master_dir, ngp_template, i); ngp_master_dir[i] = 0; } for (;;) { if (NGP_OK != (r = ngp_read_line(1))) break; /* EOF always means error here */ switch (ngp_keyidx) { case NGP_TOKEN_SIMPLE: if (0 == first_extension) /* simple only allowed in first HDU */ { r = NGP_TOKEN_NOT_EXPECT; break; } if (NGP_OK != (r = ngp_unread_line())) break; r = ngp_read_xtension(ff, 0, NGP_XTENSION_SIMPLE | NGP_XTENSION_FIRST); first_extension = 0; break; case NGP_TOKEN_XTENSION: if (NGP_OK != (r = ngp_unread_line())) break; r = ngp_read_xtension(ff, 0, (first_extension ? NGP_XTENSION_FIRST : 0)); first_extension = 0; break; case NGP_TOKEN_GROUP: if (NGP_TTYPE_STRING == ngp_linkey.type) { strncpy(grnm, ngp_linkey.value.s, NGP_MAX_STRING); } else { sprintf(grnm, "DEFAULT_GROUP_%d", master_grp_idx++); } grnm[NGP_MAX_STRING - 1] = 0; r = ngp_read_group(ff, grnm, 0); first_extension = 0; break; case NGP_TOKEN_EOF: exit_flg = 1; break; default: r = NGP_TOKEN_NOT_EXPECT; break; } if (exit_flg || (NGP_OK != r)) break; } /* all top level HDUs up to faulty one are left intact in case of i/o error. It is up to the caller to call fits_close_file or fits_delete_file when this function returns error. */ ngp_free_line(); /* deallocate last line (if any) */ ngp_free_prevline(); /* deallocate cached line (if any) */ ngp_delete_extver_tab(); /* delete extver table (if present), error ignored */ *status = r; return(r); } astropy-1.1.1/cextern/cfitsio/deflate.c0000644001134200020070000020460712602615520021007 0ustar embrayscience00000000000000/* deflate.c -- compress data using the deflation algorithm * Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* * ALGORITHM * * The "deflation" process depends on being able to identify portions * of the input text which are identical to earlier input (within a * sliding window trailing behind the input currently being processed). * * The most straightforward technique turns out to be the fastest for * most input files: try all possible matches and select the longest. * The key feature of this algorithm is that insertions into the string * dictionary are very simple and thus fast, and deletions are avoided * completely. Insertions are performed at each input character, whereas * string matches are performed only when the previous match ends. So it * is preferable to spend more time in matches to allow very fast string * insertions and avoid deletions. The matching algorithm for small * strings is inspired from that of Rabin & Karp. A brute force approach * is used to find longer strings when a small match has been found. * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze * (by Leonid Broukhis). * A previous version of this file used a more sophisticated algorithm * (by Fiala and Greene) which is guaranteed to run in linear amortized * time, but has a larger average cost, uses more memory and is patented. * However the F&G algorithm may be faster for some highly redundant * files if the parameter max_chain_length (described below) is too large. * * ACKNOWLEDGEMENTS * * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and * I found it in 'freeze' written by Leonid Broukhis. * Thanks to many people for bug reports and testing. * * REFERENCES * * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification". * Available in http://www.ietf.org/rfc/rfc1951.txt * * A description of the Rabin and Karp algorithm is given in the book * "Algorithms" by R. Sedgewick, Addison-Wesley, p252. * * Fiala,E.R., and Greene,D.H. * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595 * */ #include "deflate.h" const char deflate_copyright[] = " deflate 1.2.5 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot include such an acknowledgment, I would appreciate that you keep this copyright string in the executable of your product. */ /* =========================================================================== * Function prototypes. */ typedef enum { need_more, /* block not completed, need more input or more output */ block_done, /* block flush performed */ finish_started, /* finish started, need only more output at next deflate */ finish_done /* finish done, accept no more input or output */ } block_state; typedef block_state (*compress_func) OF((deflate_state *s, int flush)); /* Compression function. Returns the block state after the call. */ local void fill_window OF((deflate_state *s)); local block_state deflate_stored OF((deflate_state *s, int flush)); local block_state deflate_fast OF((deflate_state *s, int flush)); #ifndef FASTEST local block_state deflate_slow OF((deflate_state *s, int flush)); #endif local block_state deflate_rle OF((deflate_state *s, int flush)); local block_state deflate_huff OF((deflate_state *s, int flush)); local void lm_init OF((deflate_state *s)); local void putShortMSB OF((deflate_state *s, uInt b)); local void flush_pending OF((z_streamp strm)); local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); #ifdef ASMV void match_init OF((void)); /* asm code initialization */ uInt longest_match OF((deflate_state *s, IPos cur_match)); #else local uInt longest_match OF((deflate_state *s, IPos cur_match)); #endif #ifdef DEBUG local void check_match OF((deflate_state *s, IPos start, IPos match, int length)); #endif /* =========================================================================== * Local data */ #define NIL 0 /* Tail of hash chains */ #ifndef TOO_FAR # define TOO_FAR 4096 #endif /* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ /* Values for max_lazy_match, good_match and max_chain_length, depending on * the desired pack level (0..9). The values given below have been tuned to * exclude worst case performance for pathological files. Better values may be * found for specific files. */ typedef struct config_s { ush good_length; /* reduce lazy search above this match length */ ush max_lazy; /* do not perform lazy search above this match length */ ush nice_length; /* quit search above this match length */ ush max_chain; compress_func func; } config; #ifdef FASTEST local const config configuration_table[2] = { /* good lazy nice chain */ /* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ /* 1 */ {4, 4, 8, 4, deflate_fast}}; /* max speed, no lazy matches */ #else local const config configuration_table[10] = { /* good lazy nice chain */ /* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ /* 1 */ {4, 4, 8, 4, deflate_fast}, /* max speed, no lazy matches */ /* 2 */ {4, 5, 16, 8, deflate_fast}, /* 3 */ {4, 6, 32, 32, deflate_fast}, /* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */ /* 5 */ {8, 16, 32, 32, deflate_slow}, /* 6 */ {8, 16, 128, 128, deflate_slow}, /* 7 */ {8, 32, 128, 256, deflate_slow}, /* 8 */ {32, 128, 258, 1024, deflate_slow}, /* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */ #endif /* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 * For deflate_fast() (levels <= 3) good is ignored and lazy has a different * meaning. */ #define EQUAL 0 /* result of memcmp for equal strings */ #ifndef NO_DUMMY_DECL struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ #endif /* =========================================================================== * Update a hash value with the given input byte * IN assertion: all calls to to UPDATE_HASH are made with consecutive * input characters, so that a running hash key can be computed from the * previous key instead of complete recalculation each time. */ #define UPDATE_HASH(s,h,c) (h = (((h)<hash_shift) ^ (c)) & s->hash_mask) /* =========================================================================== * Insert string str in the dictionary and set match_head to the previous head * of the hash chain (the most recent string with same hash key). Return * the previous length of the hash chain. * If this file is compiled with -DFASTEST, the compression level is forced * to 1, and no hash chains are maintained. * IN assertion: all calls to to INSERT_STRING are made with consecutive * input characters and the first MIN_MATCH bytes of str are valid * (except for the last MIN_MATCH-1 bytes of the input file). */ #ifdef FASTEST #define INSERT_STRING(s, str, match_head) \ (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ match_head = s->head[s->ins_h], \ s->head[s->ins_h] = (Pos)(str)) #else #define INSERT_STRING(s, str, match_head) \ (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \ s->head[s->ins_h] = (Pos)(str)) #endif /* =========================================================================== * Initialize the hash table (avoiding 64K overflow for 16 bit systems). * prev[] will be initialized on the fly. */ #define CLEAR_HASH(s) \ s->head[s->hash_size-1] = NIL; \ zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); /* ========================================================================= */ int ZEXPORT deflateInit_(strm, level, version, stream_size) z_streamp strm; int level; const char *version; int stream_size; { return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, version, stream_size); /* To do: ignore strm->next_in if we use it as window */ } /* ========================================================================= */ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, version, stream_size) z_streamp strm; int level; int method; int windowBits; int memLevel; int strategy; const char *version; int stream_size; { deflate_state *s; int wrap = 1; static const char my_version[] = ZLIB_VERSION; ushf *overlay; /* We overlay pending_buf and d_buf+l_buf. This works since the average * output size for (length,distance) codes is <= 24 bits. */ if (version == Z_NULL || version[0] != my_version[0] || stream_size != sizeof(z_stream)) { return Z_VERSION_ERROR; } if (strm == Z_NULL) return Z_STREAM_ERROR; strm->msg = Z_NULL; if (strm->zalloc == (alloc_func)0) { strm->zalloc = zcalloc; strm->opaque = (voidpf)0; } if (strm->zfree == (free_func)0) strm->zfree = zcfree; #ifdef FASTEST if (level != 0) level = 1; #else if (level == Z_DEFAULT_COMPRESSION) level = 6; #endif if (windowBits < 0) { /* suppress zlib wrapper */ wrap = 0; windowBits = -windowBits; } #ifdef GZIP else if (windowBits > 15) { wrap = 2; /* write gzip wrapper instead */ windowBits -= 16; } #endif if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { return Z_STREAM_ERROR; } if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */ s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); if (s == Z_NULL) return Z_MEM_ERROR; strm->state = (struct internal_state FAR *)s; s->strm = strm; s->wrap = wrap; s->gzhead = Z_NULL; s->w_bits = windowBits; s->w_size = 1 << s->w_bits; s->w_mask = s->w_size - 1; s->hash_bits = memLevel + 7; s->hash_size = 1 << s->hash_bits; s->hash_mask = s->hash_size - 1; s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); s->high_water = 0; /* nothing written to s->window yet */ s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); s->pending_buf = (uchf *) overlay; s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L); if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || s->pending_buf == Z_NULL) { s->status = FINISH_STATE; strm->msg = (char*)ERR_MSG(Z_MEM_ERROR); deflateEnd (strm); return Z_MEM_ERROR; } s->d_buf = overlay + s->lit_bufsize/sizeof(ush); s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; s->level = level; s->strategy = strategy; s->method = (Byte)method; return deflateReset(strm); } /* ========================================================================= */ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) z_streamp strm; const Bytef *dictionary; uInt dictLength; { deflate_state *s; uInt length = dictLength; uInt n; IPos hash_head = 0; if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL || strm->state->wrap == 2 || (strm->state->wrap == 1 && strm->state->status != INIT_STATE)) return Z_STREAM_ERROR; s = strm->state; if (s->wrap) strm->adler = adler32(strm->adler, dictionary, dictLength); if (length < MIN_MATCH) return Z_OK; if (length > s->w_size) { length = s->w_size; dictionary += dictLength - length; /* use the tail of the dictionary */ } zmemcpy(s->window, dictionary, length); s->strstart = length; s->block_start = (long)length; /* Insert all strings in the hash table (except for the last two bytes). * s->lookahead stays null, so s->ins_h will be recomputed at the next * call of fill_window. */ s->ins_h = s->window[0]; UPDATE_HASH(s, s->ins_h, s->window[1]); for (n = 0; n <= length - MIN_MATCH; n++) { INSERT_STRING(s, n, hash_head); } if (hash_head) hash_head = 0; /* to make compiler happy */ return Z_OK; } /* ========================================================================= */ int ZEXPORT deflateReset (strm) z_streamp strm; { deflate_state *s; if (strm == Z_NULL || strm->state == Z_NULL || strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) { return Z_STREAM_ERROR; } strm->total_in = strm->total_out = 0; strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ strm->data_type = Z_UNKNOWN; s = (deflate_state *)strm->state; s->pending = 0; s->pending_out = s->pending_buf; if (s->wrap < 0) { s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */ } s->status = s->wrap ? INIT_STATE : BUSY_STATE; strm->adler = #ifdef GZIP s->wrap == 2 ? crc32(0L, Z_NULL, 0) : #endif adler32(0L, Z_NULL, 0); s->last_flush = Z_NO_FLUSH; _tr_init(s); lm_init(s); return Z_OK; } /* ========================================================================= */ int ZEXPORT deflateSetHeader (strm, head) z_streamp strm; gz_headerp head; { if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; if (strm->state->wrap != 2) return Z_STREAM_ERROR; strm->state->gzhead = head; return Z_OK; } /* ========================================================================= */ int ZEXPORT deflatePrime (strm, bits, value) z_streamp strm; int bits; int value; { if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; strm->state->bi_valid = bits; strm->state->bi_buf = (ush)(value & ((1 << bits) - 1)); return Z_OK; } /* ========================================================================= */ int ZEXPORT deflateParams(strm, level, strategy) z_streamp strm; int level; int strategy; { deflate_state *s; compress_func func; int err = Z_OK; if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; s = strm->state; #ifdef FASTEST if (level != 0) level = 1; #else if (level == Z_DEFAULT_COMPRESSION) level = 6; #endif if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { return Z_STREAM_ERROR; } func = configuration_table[s->level].func; if ((strategy != s->strategy || func != configuration_table[level].func) && strm->total_in != 0) { /* Flush the last buffer: */ err = deflate(strm, Z_BLOCK); } if (s->level != level) { s->level = level; s->max_lazy_match = configuration_table[level].max_lazy; s->good_match = configuration_table[level].good_length; s->nice_match = configuration_table[level].nice_length; s->max_chain_length = configuration_table[level].max_chain; } s->strategy = strategy; return err; } /* ========================================================================= */ int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain) z_streamp strm; int good_length; int max_lazy; int nice_length; int max_chain; { deflate_state *s; if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; s = strm->state; s->good_match = good_length; s->max_lazy_match = max_lazy; s->nice_match = nice_length; s->max_chain_length = max_chain; return Z_OK; } /* ========================================================================= * For the default windowBits of 15 and memLevel of 8, this function returns * a close to exact, as well as small, upper bound on the compressed size. * They are coded as constants here for a reason--if the #define's are * changed, then this function needs to be changed as well. The return * value for 15 and 8 only works for those exact settings. * * For any setting other than those defaults for windowBits and memLevel, * the value returned is a conservative worst case for the maximum expansion * resulting from using fixed blocks instead of stored blocks, which deflate * can emit on compressed data for some combinations of the parameters. * * This function could be more sophisticated to provide closer upper bounds for * every combination of windowBits and memLevel. But even the conservative * upper bound of about 14% expansion does not seem onerous for output buffer * allocation. */ uLong ZEXPORT deflateBound(strm, sourceLen) z_streamp strm; uLong sourceLen; { deflate_state *s; uLong complen, wraplen; Bytef *str; /* conservative upper bound for compressed data */ complen = sourceLen + ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5; /* if can't get parameters, return conservative bound plus zlib wrapper */ if (strm == Z_NULL || strm->state == Z_NULL) return complen + 6; /* compute wrapper length */ s = strm->state; switch (s->wrap) { case 0: /* raw deflate */ wraplen = 0; break; case 1: /* zlib wrapper */ wraplen = 6 + (s->strstart ? 4 : 0); break; case 2: /* gzip wrapper */ wraplen = 18; if (s->gzhead != Z_NULL) { /* user-supplied gzip header */ if (s->gzhead->extra != Z_NULL) wraplen += 2 + s->gzhead->extra_len; str = s->gzhead->name; if (str != Z_NULL) do { wraplen++; } while (*str++); str = s->gzhead->comment; if (str != Z_NULL) do { wraplen++; } while (*str++); if (s->gzhead->hcrc) wraplen += 2; } break; default: /* for compiler happiness */ wraplen = 6; } /* if not default parameters, return conservative bound */ if (s->w_bits != 15 || s->hash_bits != 8 + 7) return complen + wraplen; /* default settings: return tight bound for that case */ return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + (sourceLen >> 25) + 13 - 6 + wraplen; } /* ========================================================================= * Put a short in the pending buffer. The 16-bit value is put in MSB order. * IN assertion: the stream state is correct and there is enough room in * pending_buf. */ local void putShortMSB (s, b) deflate_state *s; uInt b; { put_byte(s, (Byte)(b >> 8)); put_byte(s, (Byte)(b & 0xff)); } /* ========================================================================= * Flush as much pending output as possible. All deflate() output goes * through this function so some applications may wish to modify it * to avoid allocating a large strm->next_out buffer and copying into it. * (See also read_buf()). */ local void flush_pending(strm) z_streamp strm; { unsigned len = strm->state->pending; if (len > strm->avail_out) len = strm->avail_out; if (len == 0) return; zmemcpy(strm->next_out, strm->state->pending_out, len); strm->next_out += len; strm->state->pending_out += len; strm->total_out += len; strm->avail_out -= len; strm->state->pending -= len; if (strm->state->pending == 0) { strm->state->pending_out = strm->state->pending_buf; } } /* ========================================================================= */ int ZEXPORT deflate (strm, flush) z_streamp strm; int flush; { int old_flush; /* value of flush param for previous deflate call */ deflate_state *s; if (strm == Z_NULL || strm->state == Z_NULL || flush > Z_BLOCK || flush < 0) { return Z_STREAM_ERROR; } s = strm->state; if (strm->next_out == Z_NULL || (strm->next_in == Z_NULL && strm->avail_in != 0) || (s->status == FINISH_STATE && flush != Z_FINISH)) { ERR_RETURN(strm, Z_STREAM_ERROR); } if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); s->strm = strm; /* just in case */ old_flush = s->last_flush; s->last_flush = flush; /* Write the header */ if (s->status == INIT_STATE) { #ifdef GZIP if (s->wrap == 2) { strm->adler = crc32(0L, Z_NULL, 0); put_byte(s, 31); put_byte(s, 139); put_byte(s, 8); if (s->gzhead == Z_NULL) { put_byte(s, 0); put_byte(s, 0); put_byte(s, 0); put_byte(s, 0); put_byte(s, 0); put_byte(s, s->level == 9 ? 2 : (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? 4 : 0)); put_byte(s, OS_CODE); s->status = BUSY_STATE; } else { put_byte(s, (s->gzhead->text ? 1 : 0) + (s->gzhead->hcrc ? 2 : 0) + (s->gzhead->extra == Z_NULL ? 0 : 4) + (s->gzhead->name == Z_NULL ? 0 : 8) + (s->gzhead->comment == Z_NULL ? 0 : 16) ); put_byte(s, (Byte)(s->gzhead->time & 0xff)); put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff)); put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff)); put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff)); put_byte(s, s->level == 9 ? 2 : (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? 4 : 0)); put_byte(s, s->gzhead->os & 0xff); if (s->gzhead->extra != Z_NULL) { put_byte(s, s->gzhead->extra_len & 0xff); put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); } if (s->gzhead->hcrc) strm->adler = crc32(strm->adler, s->pending_buf, s->pending); s->gzindex = 0; s->status = EXTRA_STATE; } } else #endif { uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; uInt level_flags; if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2) level_flags = 0; else if (s->level < 6) level_flags = 1; else if (s->level == 6) level_flags = 2; else level_flags = 3; header |= (level_flags << 6); if (s->strstart != 0) header |= PRESET_DICT; header += 31 - (header % 31); s->status = BUSY_STATE; putShortMSB(s, header); /* Save the adler32 of the preset dictionary: */ if (s->strstart != 0) { putShortMSB(s, (uInt)(strm->adler >> 16)); putShortMSB(s, (uInt)(strm->adler & 0xffff)); } strm->adler = adler32(0L, Z_NULL, 0); } } #ifdef GZIP if (s->status == EXTRA_STATE) { if (s->gzhead->extra != Z_NULL) { uInt beg = s->pending; /* start of bytes to update crc */ while (s->gzindex < (s->gzhead->extra_len & 0xffff)) { if (s->pending == s->pending_buf_size) { if (s->gzhead->hcrc && s->pending > beg) strm->adler = crc32(strm->adler, s->pending_buf + beg, s->pending - beg); flush_pending(strm); beg = s->pending; if (s->pending == s->pending_buf_size) break; } put_byte(s, s->gzhead->extra[s->gzindex]); s->gzindex++; } if (s->gzhead->hcrc && s->pending > beg) strm->adler = crc32(strm->adler, s->pending_buf + beg, s->pending - beg); if (s->gzindex == s->gzhead->extra_len) { s->gzindex = 0; s->status = NAME_STATE; } } else s->status = NAME_STATE; } if (s->status == NAME_STATE) { if (s->gzhead->name != Z_NULL) { uInt beg = s->pending; /* start of bytes to update crc */ int val; do { if (s->pending == s->pending_buf_size) { if (s->gzhead->hcrc && s->pending > beg) strm->adler = crc32(strm->adler, s->pending_buf + beg, s->pending - beg); flush_pending(strm); beg = s->pending; if (s->pending == s->pending_buf_size) { val = 1; break; } } val = s->gzhead->name[s->gzindex++]; put_byte(s, val); } while (val != 0); if (s->gzhead->hcrc && s->pending > beg) strm->adler = crc32(strm->adler, s->pending_buf + beg, s->pending - beg); if (val == 0) { s->gzindex = 0; s->status = COMMENT_STATE; } } else s->status = COMMENT_STATE; } if (s->status == COMMENT_STATE) { if (s->gzhead->comment != Z_NULL) { uInt beg = s->pending; /* start of bytes to update crc */ int val; do { if (s->pending == s->pending_buf_size) { if (s->gzhead->hcrc && s->pending > beg) strm->adler = crc32(strm->adler, s->pending_buf + beg, s->pending - beg); flush_pending(strm); beg = s->pending; if (s->pending == s->pending_buf_size) { val = 1; break; } } val = s->gzhead->comment[s->gzindex++]; put_byte(s, val); } while (val != 0); if (s->gzhead->hcrc && s->pending > beg) strm->adler = crc32(strm->adler, s->pending_buf + beg, s->pending - beg); if (val == 0) s->status = HCRC_STATE; } else s->status = HCRC_STATE; } if (s->status == HCRC_STATE) { if (s->gzhead->hcrc) { if (s->pending + 2 > s->pending_buf_size) flush_pending(strm); if (s->pending + 2 <= s->pending_buf_size) { put_byte(s, (Byte)(strm->adler & 0xff)); put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); strm->adler = crc32(0L, Z_NULL, 0); s->status = BUSY_STATE; } } else s->status = BUSY_STATE; } #endif /* Flush as much pending output as possible */ if (s->pending != 0) { flush_pending(strm); if (strm->avail_out == 0) { /* Since avail_out is 0, deflate will be called again with * more output space, but possibly with both pending and * avail_in equal to zero. There won't be anything to do, * but this is not an error situation so make sure we * return OK instead of BUF_ERROR at next call of deflate: */ s->last_flush = -1; return Z_OK; } /* Make sure there is something to do and avoid duplicate consecutive * flushes. For repeated and useless calls with Z_FINISH, we keep * returning Z_STREAM_END instead of Z_BUF_ERROR. */ } else if (strm->avail_in == 0 && flush <= old_flush && flush != Z_FINISH) { ERR_RETURN(strm, Z_BUF_ERROR); } /* User must not provide more input after the first FINISH: */ if (s->status == FINISH_STATE && strm->avail_in != 0) { ERR_RETURN(strm, Z_BUF_ERROR); } /* Start a new block or continue the current one. */ if (strm->avail_in != 0 || s->lookahead != 0 || (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { block_state bstate; bstate = s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : (s->strategy == Z_RLE ? deflate_rle(s, flush) : (*(configuration_table[s->level].func))(s, flush)); if (bstate == finish_started || bstate == finish_done) { s->status = FINISH_STATE; } if (bstate == need_more || bstate == finish_started) { if (strm->avail_out == 0) { s->last_flush = -1; /* avoid BUF_ERROR next call, see above */ } return Z_OK; /* If flush != Z_NO_FLUSH && avail_out == 0, the next call * of deflate should use the same flush parameter to make sure * that the flush is complete. So we don't have to output an * empty block here, this will be done at next call. This also * ensures that for a very small output buffer, we emit at most * one empty block. */ } if (bstate == block_done) { if (flush == Z_PARTIAL_FLUSH) { _tr_align(s); } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ _tr_stored_block(s, (char*)0, 0L, 0); /* For a full flush, this empty block will be recognized * as a special marker by inflate_sync(). */ if (flush == Z_FULL_FLUSH) { CLEAR_HASH(s); /* forget history */ if (s->lookahead == 0) { s->strstart = 0; s->block_start = 0L; } } } flush_pending(strm); if (strm->avail_out == 0) { s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */ return Z_OK; } } } Assert(strm->avail_out > 0, "bug2"); if (flush != Z_FINISH) return Z_OK; if (s->wrap <= 0) return Z_STREAM_END; /* Write the trailer */ #ifdef GZIP if (s->wrap == 2) { put_byte(s, (Byte)(strm->adler & 0xff)); put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); put_byte(s, (Byte)((strm->adler >> 16) & 0xff)); put_byte(s, (Byte)((strm->adler >> 24) & 0xff)); put_byte(s, (Byte)(strm->total_in & 0xff)); put_byte(s, (Byte)((strm->total_in >> 8) & 0xff)); put_byte(s, (Byte)((strm->total_in >> 16) & 0xff)); put_byte(s, (Byte)((strm->total_in >> 24) & 0xff)); } else #endif { putShortMSB(s, (uInt)(strm->adler >> 16)); putShortMSB(s, (uInt)(strm->adler & 0xffff)); } flush_pending(strm); /* If avail_out is zero, the application will call deflate again * to flush the rest. */ if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */ return s->pending != 0 ? Z_OK : Z_STREAM_END; } /* ========================================================================= */ int ZEXPORT deflateEnd (strm) z_streamp strm; { int status; if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; status = strm->state->status; if (status != INIT_STATE && status != EXTRA_STATE && status != NAME_STATE && status != COMMENT_STATE && status != HCRC_STATE && status != BUSY_STATE && status != FINISH_STATE) { return Z_STREAM_ERROR; } /* Deallocate in reverse order of allocations: */ TRY_FREE(strm, strm->state->pending_buf); TRY_FREE(strm, strm->state->head); TRY_FREE(strm, strm->state->prev); TRY_FREE(strm, strm->state->window); ZFREE(strm, strm->state); strm->state = Z_NULL; return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; } /* ========================================================================= * Copy the source state to the destination state. * To simplify the source, this is not supported for 16-bit MSDOS (which * doesn't have enough memory anyway to duplicate compression states). */ int ZEXPORT deflateCopy (dest, source) z_streamp dest; z_streamp source; { #ifdef MAXSEG_64K return Z_STREAM_ERROR; #else deflate_state *ds; deflate_state *ss; ushf *overlay; if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) { return Z_STREAM_ERROR; } ss = source->state; zmemcpy(dest, source, sizeof(z_stream)); ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state)); if (ds == Z_NULL) return Z_MEM_ERROR; dest->state = (struct internal_state FAR *) ds; zmemcpy(ds, ss, sizeof(deflate_state)); ds->strm = dest; ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2); ds->pending_buf = (uchf *) overlay; if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || ds->pending_buf == Z_NULL) { deflateEnd (dest); return Z_MEM_ERROR; } /* following zmemcpy do not work for 16-bit MSDOS */ zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos)); zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos)); zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush); ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize; ds->l_desc.dyn_tree = ds->dyn_ltree; ds->d_desc.dyn_tree = ds->dyn_dtree; ds->bl_desc.dyn_tree = ds->bl_tree; return Z_OK; #endif /* MAXSEG_64K */ } /* =========================================================================== * Read a new buffer from the current input stream, update the adler32 * and total number of bytes read. All deflate() input goes through * this function so some applications may wish to modify it to avoid * allocating a large strm->next_in buffer and copying from it. * (See also flush_pending()). */ local int read_buf(strm, buf, size) z_streamp strm; Bytef *buf; unsigned size; { unsigned len = strm->avail_in; if (len > size) len = size; if (len == 0) return 0; strm->avail_in -= len; if (strm->state->wrap == 1) { strm->adler = adler32(strm->adler, strm->next_in, len); } #ifdef GZIP else if (strm->state->wrap == 2) { strm->adler = crc32(strm->adler, strm->next_in, len); } #endif zmemcpy(buf, strm->next_in, len); strm->next_in += len; strm->total_in += len; return (int)len; } /* =========================================================================== * Initialize the "longest match" routines for a new zlib stream */ local void lm_init (s) deflate_state *s; { s->window_size = (ulg)2L*s->w_size; CLEAR_HASH(s); /* Set the default configuration parameters: */ s->max_lazy_match = configuration_table[s->level].max_lazy; s->good_match = configuration_table[s->level].good_length; s->nice_match = configuration_table[s->level].nice_length; s->max_chain_length = configuration_table[s->level].max_chain; s->strstart = 0; s->block_start = 0L; s->lookahead = 0; s->match_length = s->prev_length = MIN_MATCH-1; s->match_available = 0; s->ins_h = 0; #ifndef FASTEST #ifdef ASMV match_init(); /* initialize the asm code */ #endif #endif } #ifndef FASTEST /* =========================================================================== * Set match_start to the longest match starting at the given string and * return its length. Matches shorter or equal to prev_length are discarded, * in which case the result is equal to prev_length and match_start is * garbage. * IN assertions: cur_match is the head of the hash chain for the current * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 * OUT assertion: the match length is not greater than s->lookahead. */ #ifndef ASMV /* For 80x86 and 680x0, an optimized version will be provided in match.asm or * match.S. The code will be functionally equivalent. */ local uInt longest_match(s, cur_match) deflate_state *s; IPos cur_match; /* current match */ { unsigned chain_length = s->max_chain_length;/* max hash chain length */ register Bytef *scan = s->window + s->strstart; /* current string */ register Bytef *match; /* matched string */ register int len; /* length of current match */ int best_len = s->prev_length; /* best match length so far */ int nice_match = s->nice_match; /* stop if match long enough */ IPos limit = s->strstart > (IPos)MAX_DIST(s) ? s->strstart - (IPos)MAX_DIST(s) : NIL; /* Stop when cur_match becomes <= limit. To simplify the code, * we prevent matches with the string of window index 0. */ Posf *prev = s->prev; uInt wmask = s->w_mask; #ifdef UNALIGNED_OK /* Compare two bytes at a time. Note: this is not always beneficial. * Try with and without -DUNALIGNED_OK to check. */ register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; register ush scan_start = *(ushf*)scan; register ush scan_end = *(ushf*)(scan+best_len-1); #else register Bytef *strend = s->window + s->strstart + MAX_MATCH; register Byte scan_end1 = scan[best_len-1]; register Byte scan_end = scan[best_len]; #endif /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. * It is easy to get rid of this optimization if necessary. */ Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); /* Do not waste too much time if we already have a good match: */ if (s->prev_length >= s->good_match) { chain_length >>= 2; } /* Do not look for matches beyond the end of the input. This is necessary * to make deflate deterministic. */ if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); do { Assert(cur_match < s->strstart, "no future"); match = s->window + cur_match; /* Skip to next match if the match length cannot increase * or if the match length is less than 2. Note that the checks below * for insufficient lookahead only occur occasionally for performance * reasons. Therefore uninitialized memory will be accessed, and * conditional jumps will be made that depend on those values. * However the length of the match is limited to the lookahead, so * the output of deflate is not affected by the uninitialized values. */ #if (defined(UNALIGNED_OK) && MAX_MATCH == 258) /* This code assumes sizeof(unsigned short) == 2. Do not use * UNALIGNED_OK if your compiler uses a different size. */ if (*(ushf*)(match+best_len-1) != scan_end || *(ushf*)match != scan_start) continue; /* It is not necessary to compare scan[2] and match[2] since they are * always equal when the other bytes match, given that the hash keys * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at * strstart+3, +5, ... up to strstart+257. We check for insufficient * lookahead only every 4th comparison; the 128th check will be made * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is * necessary to put more guard bytes at the end of the window, or * to check more often for insufficient lookahead. */ Assert(scan[2] == match[2], "scan[2]?"); scan++, match++; do { } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) && *(ushf*)(scan+=2) == *(ushf*)(match+=2) && *(ushf*)(scan+=2) == *(ushf*)(match+=2) && *(ushf*)(scan+=2) == *(ushf*)(match+=2) && scan < strend); /* The funny "do {}" generates better code on most compilers */ /* Here, scan <= window+strstart+257 */ Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); if (*scan == *match) scan++; len = (MAX_MATCH - 1) - (int)(strend-scan); scan = strend - (MAX_MATCH-1); #else /* UNALIGNED_OK */ if (match[best_len] != scan_end || match[best_len-1] != scan_end1 || *match != *scan || *++match != scan[1]) continue; /* The check at best_len-1 can be removed because it will be made * again later. (This heuristic is not always a win.) * It is not necessary to compare scan[2] and match[2] since they * are always equal when the other bytes match, given that * the hash keys are equal and that HASH_BITS >= 8. */ scan += 2, match++; Assert(*scan == *match, "match[2]?"); /* We check for insufficient lookahead only every 8th comparison; * the 256th check will be made at strstart+258. */ do { } while (*++scan == *++match && *++scan == *++match && *++scan == *++match && *++scan == *++match && *++scan == *++match && *++scan == *++match && *++scan == *++match && *++scan == *++match && scan < strend); Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); len = MAX_MATCH - (int)(strend - scan); scan = strend - MAX_MATCH; #endif /* UNALIGNED_OK */ if (len > best_len) { s->match_start = cur_match; best_len = len; if (len >= nice_match) break; #ifdef UNALIGNED_OK scan_end = *(ushf*)(scan+best_len-1); #else scan_end1 = scan[best_len-1]; scan_end = scan[best_len]; #endif } } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length != 0); if ((uInt)best_len <= s->lookahead) return (uInt)best_len; return s->lookahead; } #endif /* ASMV */ #else /* FASTEST */ /* --------------------------------------------------------------------------- * Optimized version for FASTEST only */ local uInt longest_match(s, cur_match) deflate_state *s; IPos cur_match; /* current match */ { register Bytef *scan = s->window + s->strstart; /* current string */ register Bytef *match; /* matched string */ register int len; /* length of current match */ register Bytef *strend = s->window + s->strstart + MAX_MATCH; /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. * It is easy to get rid of this optimization if necessary. */ Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); Assert(cur_match < s->strstart, "no future"); match = s->window + cur_match; /* Return failure if the match length is less than 2: */ if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1; /* The check at best_len-1 can be removed because it will be made * again later. (This heuristic is not always a win.) * It is not necessary to compare scan[2] and match[2] since they * are always equal when the other bytes match, given that * the hash keys are equal and that HASH_BITS >= 8. */ scan += 2, match += 2; Assert(*scan == *match, "match[2]?"); /* We check for insufficient lookahead only every 8th comparison; * the 256th check will be made at strstart+258. */ do { } while (*++scan == *++match && *++scan == *++match && *++scan == *++match && *++scan == *++match && *++scan == *++match && *++scan == *++match && *++scan == *++match && *++scan == *++match && scan < strend); Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); len = MAX_MATCH - (int)(strend - scan); if (len < MIN_MATCH) return MIN_MATCH - 1; s->match_start = cur_match; return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead; } #endif /* FASTEST */ #ifdef DEBUG /* =========================================================================== * Check that the match at match_start is indeed a match. */ local void check_match(s, start, match, length) deflate_state *s; IPos start, match; int length; { /* check that the match is indeed a match */ if (zmemcmp(s->window + match, s->window + start, length) != EQUAL) { fprintf(stderr, " start %u, match %u, length %d\n", start, match, length); do { fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); } while (--length != 0); z_error("invalid match"); } if (z_verbose > 1) { fprintf(stderr,"\\[%d,%d]", start-match, length); do { putc(s->window[start++], stderr); } while (--length != 0); } } #else # define check_match(s, start, match, length) #endif /* DEBUG */ /* =========================================================================== * Fill the window when the lookahead becomes insufficient. * Updates strstart and lookahead. * * IN assertion: lookahead < MIN_LOOKAHEAD * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD * At least one byte has been read, or avail_in == 0; reads are * performed for at least two bytes (required for the zip translate_eol * option -- not supported here). */ local void fill_window(s) deflate_state *s; { register unsigned n, m; register Posf *p; unsigned more; /* Amount of free space at the end of the window. */ uInt wsize = s->w_size; do { more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); /* Deal with !@#$% 64K limit: */ if (sizeof(int) <= 2) { if (more == 0 && s->strstart == 0 && s->lookahead == 0) { more = wsize; } else if (more == (unsigned)(-1)) { /* Very unlikely, but possible on 16 bit machine if * strstart == 0 && lookahead == 1 (input done a byte at time) */ more--; } } /* If the window is almost full and there is insufficient lookahead, * move the upper half to the lower one to make room in the upper half. */ if (s->strstart >= wsize+MAX_DIST(s)) { zmemcpy(s->window, s->window+wsize, (unsigned)wsize); s->match_start -= wsize; s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ s->block_start -= (long) wsize; /* Slide the hash table (could be avoided with 32 bit values at the expense of memory usage). We slide even when level == 0 to keep the hash table consistent if we switch back to level > 0 later. (Using level 0 permanently is not an optimal usage of zlib, so we don't care about this pathological case.) */ n = s->hash_size; p = &s->head[n]; do { m = *--p; *p = (Pos)(m >= wsize ? m-wsize : NIL); } while (--n); n = wsize; #ifndef FASTEST p = &s->prev[n]; do { m = *--p; *p = (Pos)(m >= wsize ? m-wsize : NIL); /* If n is not on any hash chain, prev[n] is garbage but * its value will never be used. */ } while (--n); #endif more += wsize; } if (s->strm->avail_in == 0) return; /* If there was no sliding: * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && * more == window_size - lookahead - strstart * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) * => more >= window_size - 2*WSIZE + 2 * In the BIG_MEM or MMAP case (not yet supported), * window_size == input_size + MIN_LOOKAHEAD && * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. * Otherwise, window_size == 2*WSIZE so more >= 2. * If there was sliding, more >= WSIZE. So in all cases, more >= 2. */ Assert(more >= 2, "more < 2"); n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); s->lookahead += n; /* Initialize the hash value now that we have some input: */ if (s->lookahead >= MIN_MATCH) { s->ins_h = s->window[s->strstart]; UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); #if MIN_MATCH != 3 Call UPDATE_HASH() MIN_MATCH-3 more times #endif } /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, * but this is not important since only literal bytes will be emitted. */ } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); /* If the WIN_INIT bytes after the end of the current data have never been * written, then zero those bytes in order to avoid memory check reports of * the use of uninitialized (or uninitialised as Julian writes) bytes by * the longest match routines. Update the high water mark for the next * time through here. WIN_INIT is set to MAX_MATCH since the longest match * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. */ if (s->high_water < s->window_size) { ulg curr = s->strstart + (ulg)(s->lookahead); ulg init; if (s->high_water < curr) { /* Previous high water mark below current data -- zero WIN_INIT * bytes or up to end of window, whichever is less. */ init = s->window_size - curr; if (init > WIN_INIT) init = WIN_INIT; zmemzero(s->window + curr, (unsigned)init); s->high_water = curr + init; } else if (s->high_water < (ulg)curr + WIN_INIT) { /* High water mark at or above current data, but below current data * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up * to end of window, whichever is less. */ init = (ulg)curr + WIN_INIT - s->high_water; if (init > s->window_size - s->high_water) init = s->window_size - s->high_water; zmemzero(s->window + s->high_water, (unsigned)init); s->high_water += init; } } } /* =========================================================================== * Flush the current block, with given end-of-file flag. * IN assertion: strstart is set to the end of the current match. */ #define FLUSH_BLOCK_ONLY(s, last) { \ _tr_flush_block(s, (s->block_start >= 0L ? \ (charf *)&s->window[(unsigned)s->block_start] : \ (charf *)Z_NULL), \ (ulg)((long)s->strstart - s->block_start), \ (last)); \ s->block_start = s->strstart; \ flush_pending(s->strm); \ Tracev((stderr,"[FLUSH]")); \ } /* Same but force premature exit if necessary. */ #define FLUSH_BLOCK(s, last) { \ FLUSH_BLOCK_ONLY(s, last); \ if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \ } /* =========================================================================== * Copy without compression as much as possible from the input stream, return * the current block state. * This function does not insert new strings in the dictionary since * uncompressible data is probably not useful. This function is used * only for the level=0 compression option. * NOTE: this function should be optimized to avoid extra copying from * window to pending_buf. */ local block_state deflate_stored(s, flush) deflate_state *s; int flush; { /* Stored blocks are limited to 0xffff bytes, pending_buf is limited * to pending_buf_size, and each stored block has a 5 byte header: */ ulg max_block_size = 0xffff; ulg max_start; if (max_block_size > s->pending_buf_size - 5) { max_block_size = s->pending_buf_size - 5; } /* Copy as much as possible from input to output: */ for (;;) { /* Fill the window as much as possible: */ if (s->lookahead <= 1) { Assert(s->strstart < s->w_size+MAX_DIST(s) || s->block_start >= (long)s->w_size, "slide too late"); fill_window(s); if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more; if (s->lookahead == 0) break; /* flush the current block */ } Assert(s->block_start >= 0L, "block gone"); s->strstart += s->lookahead; s->lookahead = 0; /* Emit a stored block if pending_buf will be full: */ max_start = s->block_start + max_block_size; if (s->strstart == 0 || (ulg)s->strstart >= max_start) { /* strstart == 0 is possible when wraparound on 16-bit machine */ s->lookahead = (uInt)(s->strstart - max_start); s->strstart = (uInt)max_start; FLUSH_BLOCK(s, 0); } /* Flush if we may have to slide, otherwise block_start may become * negative and the data will be gone: */ if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) { FLUSH_BLOCK(s, 0); } } FLUSH_BLOCK(s, flush == Z_FINISH); return flush == Z_FINISH ? finish_done : block_done; } /* =========================================================================== * Compress as much as possible from the input stream, return the current * block state. * This function does not perform lazy evaluation of matches and inserts * new strings in the dictionary only for unmatched strings or for short * matches. It is used only for the fast compression options. */ local block_state deflate_fast(s, flush) deflate_state *s; int flush; { IPos hash_head; /* head of the hash chain */ int bflush; /* set if current block must be flushed */ for (;;) { /* Make sure that we always have enough lookahead, except * at the end of the input file. We need MAX_MATCH bytes * for the next match, plus MIN_MATCH bytes to insert the * string following the next match. */ if (s->lookahead < MIN_LOOKAHEAD) { fill_window(s); if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { return need_more; } if (s->lookahead == 0) break; /* flush the current block */ } /* Insert the string window[strstart .. strstart+2] in the * dictionary, and set hash_head to the head of the hash chain: */ hash_head = NIL; if (s->lookahead >= MIN_MATCH) { INSERT_STRING(s, s->strstart, hash_head); } /* Find the longest match, discarding those <= prev_length. * At this point we have always match_length < MIN_MATCH */ if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) { /* To simplify the code, we prevent matches with the string * of window index 0 (in particular we have to avoid a match * of the string with itself at the start of the input file). */ s->match_length = longest_match (s, hash_head); /* longest_match() sets match_start */ } if (s->match_length >= MIN_MATCH) { check_match(s, s->strstart, s->match_start, s->match_length); _tr_tally_dist(s, s->strstart - s->match_start, s->match_length - MIN_MATCH, bflush); s->lookahead -= s->match_length; /* Insert new strings in the hash table only if the match length * is not too large. This saves time but degrades compression. */ #ifndef FASTEST if (s->match_length <= s->max_insert_length && s->lookahead >= MIN_MATCH) { s->match_length--; /* string at strstart already in table */ do { s->strstart++; INSERT_STRING(s, s->strstart, hash_head); /* strstart never exceeds WSIZE-MAX_MATCH, so there are * always MIN_MATCH bytes ahead. */ } while (--s->match_length != 0); s->strstart++; } else #endif { s->strstart += s->match_length; s->match_length = 0; s->ins_h = s->window[s->strstart]; UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); #if MIN_MATCH != 3 Call UPDATE_HASH() MIN_MATCH-3 more times #endif /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not * matter since it will be recomputed at next deflate call. */ } } else { /* No match, output a literal byte */ Tracevv((stderr,"%c", s->window[s->strstart])); _tr_tally_lit (s, s->window[s->strstart], bflush); s->lookahead--; s->strstart++; } if (bflush) FLUSH_BLOCK(s, 0); } FLUSH_BLOCK(s, flush == Z_FINISH); return flush == Z_FINISH ? finish_done : block_done; } #ifndef FASTEST /* =========================================================================== * Same as above, but achieves better compression. We use a lazy * evaluation for matches: a match is finally adopted only if there is * no better match at the next window position. */ local block_state deflate_slow(s, flush) deflate_state *s; int flush; { IPos hash_head; /* head of hash chain */ int bflush; /* set if current block must be flushed */ /* Process the input block. */ for (;;) { /* Make sure that we always have enough lookahead, except * at the end of the input file. We need MAX_MATCH bytes * for the next match, plus MIN_MATCH bytes to insert the * string following the next match. */ if (s->lookahead < MIN_LOOKAHEAD) { fill_window(s); if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { return need_more; } if (s->lookahead == 0) break; /* flush the current block */ } /* Insert the string window[strstart .. strstart+2] in the * dictionary, and set hash_head to the head of the hash chain: */ hash_head = NIL; if (s->lookahead >= MIN_MATCH) { INSERT_STRING(s, s->strstart, hash_head); } /* Find the longest match, discarding those <= prev_length. */ s->prev_length = s->match_length, s->prev_match = s->match_start; s->match_length = MIN_MATCH-1; if (hash_head != NIL && s->prev_length < s->max_lazy_match && s->strstart - hash_head <= MAX_DIST(s)) { /* To simplify the code, we prevent matches with the string * of window index 0 (in particular we have to avoid a match * of the string with itself at the start of the input file). */ s->match_length = longest_match (s, hash_head); /* longest_match() sets match_start */ if (s->match_length <= 5 && (s->strategy == Z_FILTERED #if TOO_FAR <= 32767 || (s->match_length == MIN_MATCH && s->strstart - s->match_start > TOO_FAR) #endif )) { /* If prev_match is also MIN_MATCH, match_start is garbage * but we will ignore the current match anyway. */ s->match_length = MIN_MATCH-1; } } /* If there was a match at the previous step and the current * match is not better, output the previous match: */ if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) { uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; /* Do not insert strings in hash table beyond this. */ check_match(s, s->strstart-1, s->prev_match, s->prev_length); _tr_tally_dist(s, s->strstart -1 - s->prev_match, s->prev_length - MIN_MATCH, bflush); /* Insert in hash table all strings up to the end of the match. * strstart-1 and strstart are already inserted. If there is not * enough lookahead, the last two strings are not inserted in * the hash table. */ s->lookahead -= s->prev_length-1; s->prev_length -= 2; do { if (++s->strstart <= max_insert) { INSERT_STRING(s, s->strstart, hash_head); } } while (--s->prev_length != 0); s->match_available = 0; s->match_length = MIN_MATCH-1; s->strstart++; if (bflush) FLUSH_BLOCK(s, 0); } else if (s->match_available) { /* If there was no match at the previous position, output a * single literal. If there was a match but the current match * is longer, truncate the previous match to a single literal. */ Tracevv((stderr,"%c", s->window[s->strstart-1])); _tr_tally_lit(s, s->window[s->strstart-1], bflush); if (bflush) { FLUSH_BLOCK_ONLY(s, 0); } s->strstart++; s->lookahead--; if (s->strm->avail_out == 0) return need_more; } else { /* There is no previous match to compare with, wait for * the next step to decide. */ s->match_available = 1; s->strstart++; s->lookahead--; } } Assert (flush != Z_NO_FLUSH, "no flush?"); if (s->match_available) { Tracevv((stderr,"%c", s->window[s->strstart-1])); _tr_tally_lit(s, s->window[s->strstart-1], bflush); s->match_available = 0; } FLUSH_BLOCK(s, flush == Z_FINISH); return flush == Z_FINISH ? finish_done : block_done; } #endif /* FASTEST */ /* =========================================================================== * For Z_RLE, simply look for runs of bytes, generate matches only of distance * one. Do not maintain a hash table. (It will be regenerated if this run of * deflate switches away from Z_RLE.) */ local block_state deflate_rle(s, flush) deflate_state *s; int flush; { int bflush; /* set if current block must be flushed */ uInt prev; /* byte at distance one to match */ Bytef *scan, *strend; /* scan goes up to strend for length of run */ for (;;) { /* Make sure that we always have enough lookahead, except * at the end of the input file. We need MAX_MATCH bytes * for the longest encodable run. */ if (s->lookahead < MAX_MATCH) { fill_window(s); if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) { return need_more; } if (s->lookahead == 0) break; /* flush the current block */ } /* See how many times the previous byte repeats */ s->match_length = 0; if (s->lookahead >= MIN_MATCH && s->strstart > 0) { scan = s->window + s->strstart - 1; prev = *scan; if (prev == *++scan && prev == *++scan && prev == *++scan) { strend = s->window + s->strstart + MAX_MATCH; do { } while (prev == *++scan && prev == *++scan && prev == *++scan && prev == *++scan && prev == *++scan && prev == *++scan && prev == *++scan && prev == *++scan && scan < strend); s->match_length = MAX_MATCH - (int)(strend - scan); if (s->match_length > s->lookahead) s->match_length = s->lookahead; } } /* Emit match if have run of MIN_MATCH or longer, else emit literal */ if (s->match_length >= MIN_MATCH) { check_match(s, s->strstart, s->strstart - 1, s->match_length); _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush); s->lookahead -= s->match_length; s->strstart += s->match_length; s->match_length = 0; } else { /* No match, output a literal byte */ Tracevv((stderr,"%c", s->window[s->strstart])); _tr_tally_lit (s, s->window[s->strstart], bflush); s->lookahead--; s->strstart++; } if (bflush) FLUSH_BLOCK(s, 0); } FLUSH_BLOCK(s, flush == Z_FINISH); return flush == Z_FINISH ? finish_done : block_done; } /* =========================================================================== * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. * (It will be regenerated if this run of deflate switches away from Huffman.) */ local block_state deflate_huff(s, flush) deflate_state *s; int flush; { int bflush; /* set if current block must be flushed */ for (;;) { /* Make sure that we have a literal to write. */ if (s->lookahead == 0) { fill_window(s); if (s->lookahead == 0) { if (flush == Z_NO_FLUSH) return need_more; break; /* flush the current block */ } } /* Output a literal byte */ s->match_length = 0; Tracevv((stderr,"%c", s->window[s->strstart])); _tr_tally_lit (s, s->window[s->strstart], bflush); s->lookahead--; s->strstart++; if (bflush) FLUSH_BLOCK(s, 0); } FLUSH_BLOCK(s, flush == Z_FINISH); return flush == Z_FINISH ? finish_done : block_done; } astropy-1.1.1/cextern/cfitsio/crc32.c0000644001134200020070000003254012602615520020312 0ustar embrayscience00000000000000/* crc32.c -- compute the CRC-32 of a data stream * Copyright (C) 1995-2006, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h * * Thanks to Rodney Brown for his contribution of faster * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing * tables for updating the shift register in one step with three exclusive-ors * instead of four steps with four exclusive-ors. This results in about a * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3. */ /* Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore protection on the static variables used to control the first-use generation of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should first call get_crc_table() to initialize the tables before allowing more than one thread to use crc32(). */ #ifdef MAKECRCH # include # ifndef DYNAMIC_CRC_TABLE # define DYNAMIC_CRC_TABLE # endif /* !DYNAMIC_CRC_TABLE */ #endif /* MAKECRCH */ #include "zutil.h" /* for STDC and FAR definitions */ #define local static /* Find a four-byte integer type for crc32_little() and crc32_big(). */ #ifndef NOBYFOUR # ifdef STDC /* need ANSI C limits.h to determine sizes */ # include # define BYFOUR # if (UINT_MAX == 0xffffffffUL) typedef unsigned int u4; # else # if (ULONG_MAX == 0xffffffffUL) typedef unsigned long u4; # else # if (USHRT_MAX == 0xffffffffUL) typedef unsigned short u4; # else # undef BYFOUR /* can't find a four-byte integer type! */ # endif # endif # endif # endif /* STDC */ #endif /* !NOBYFOUR */ /* Definitions for doing the crc four data bytes at a time. */ #ifdef BYFOUR # define REV(w) ((((w)>>24)&0xff)+(((w)>>8)&0xff00)+ \ (((w)&0xff00)<<8)+(((w)&0xff)<<24)) local unsigned long crc32_little OF((unsigned long, const unsigned char FAR *, unsigned)); local unsigned long crc32_big OF((unsigned long, const unsigned char FAR *, unsigned)); # define TBLS 8 #else # define TBLS 1 #endif /* BYFOUR */ /* Local functions for crc concatenation */ local unsigned long gf2_matrix_times OF((unsigned long *mat, unsigned long vec)); local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat)); local uLong crc32_combine_(uLong crc1, uLong crc2, z_off64_t len2); #ifdef DYNAMIC_CRC_TABLE local volatile int crc_table_empty = 1; local unsigned long FAR crc_table[TBLS][256]; local void make_crc_table OF((void)); #ifdef MAKECRCH local void write_table OF((FILE *, const unsigned long FAR *)); #endif /* MAKECRCH */ /* Generate tables for a byte-wise 32-bit CRC calculation on the polynomial: x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. Polynomials over GF(2) are represented in binary, one bit per coefficient, with the lowest powers in the most significant bit. Then adding polynomials is just exclusive-or, and multiplying a polynomial by x is a right shift by one. If we call the above polynomial p, and represent a byte as the polynomial q, also with the lowest power in the most significant bit (so the byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, where a mod b means the remainder after dividing a by b. This calculation is done using the shift-register method of multiplying and taking the remainder. The register is initialized to zero, and for each incoming bit, x^32 is added mod p to the register if the bit is a one (where x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by x (which is shifting right by one and adding x^32 mod p if the bit shifted out is a one). We start with the highest power (least significant bit) of q and repeat for all eight bits of q. The first table is simply the CRC of all possible eight bit values. This is all the information needed to generate CRCs on data a byte at a time for all combinations of CRC register values and incoming bytes. The remaining tables allow for word-at-a-time CRC calculation for both big-endian and little- endian machines, where a word is four bytes. */ local void make_crc_table() { unsigned long c; int n, k; unsigned long poly; /* polynomial exclusive-or pattern */ /* terms of polynomial defining this crc (except x^32): */ static volatile int first = 1; /* flag to limit concurrent making */ static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; /* See if another task is already doing this (not thread-safe, but better than nothing -- significantly reduces duration of vulnerability in case the advice about DYNAMIC_CRC_TABLE is ignored) */ if (first) { first = 0; /* make exclusive-or pattern from polynomial (0xedb88320UL) */ poly = 0UL; for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++) poly |= 1UL << (31 - p[n]); /* generate a crc for every 8-bit value */ for (n = 0; n < 256; n++) { c = (unsigned long)n; for (k = 0; k < 8; k++) c = c & 1 ? poly ^ (c >> 1) : c >> 1; crc_table[0][n] = c; } #ifdef BYFOUR /* generate crc for each value followed by one, two, and three zeros, and then the byte reversal of those as well as the first table */ for (n = 0; n < 256; n++) { c = crc_table[0][n]; crc_table[4][n] = REV(c); for (k = 1; k < 4; k++) { c = crc_table[0][c & 0xff] ^ (c >> 8); crc_table[k][n] = c; crc_table[k + 4][n] = REV(c); } } #endif /* BYFOUR */ crc_table_empty = 0; } else { /* not first */ /* wait for the other guy to finish (not efficient, but rare) */ while (crc_table_empty) ; } #ifdef MAKECRCH /* write out CRC tables to crc32.h */ { FILE *out; out = fopen("crc32.h", "w"); if (out == NULL) return; fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n"); fprintf(out, " * Generated automatically by crc32.c\n */\n\n"); fprintf(out, "local const unsigned long FAR "); fprintf(out, "crc_table[TBLS][256] =\n{\n {\n"); write_table(out, crc_table[0]); # ifdef BYFOUR fprintf(out, "#ifdef BYFOUR\n"); for (k = 1; k < 8; k++) { fprintf(out, " },\n {\n"); write_table(out, crc_table[k]); } fprintf(out, "#endif\n"); # endif /* BYFOUR */ fprintf(out, " }\n};\n"); fclose(out); } #endif /* MAKECRCH */ } #ifdef MAKECRCH local void write_table(out, table) FILE *out; const unsigned long FAR *table; { int n; for (n = 0; n < 256; n++) fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ", table[n], n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", ")); } #endif /* MAKECRCH */ #else /* !DYNAMIC_CRC_TABLE */ /* ======================================================================== * Tables of CRC-32s of all single-byte values, made by make_crc_table(). */ #include "crc32.h" #endif /* DYNAMIC_CRC_TABLE */ /* ========================================================================= * This function can be used by asm versions of crc32() */ const unsigned long FAR * ZEXPORT get_crc_table() { #ifdef DYNAMIC_CRC_TABLE if (crc_table_empty) make_crc_table(); #endif /* DYNAMIC_CRC_TABLE */ return (const unsigned long FAR *)crc_table; } /* ========================================================================= */ #define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8) #define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1 /* ========================================================================= */ unsigned long ZEXPORT crc32(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; uInt len; { if (buf == Z_NULL) return 0UL; #ifdef DYNAMIC_CRC_TABLE if (crc_table_empty) make_crc_table(); #endif /* DYNAMIC_CRC_TABLE */ #ifdef BYFOUR if (sizeof(void *) == sizeof(ptrdiff_t)) { u4 endian; endian = 1; if (*((unsigned char *)(&endian))) return crc32_little(crc, buf, len); else return crc32_big(crc, buf, len); } #endif /* BYFOUR */ crc = crc ^ 0xffffffffUL; while (len >= 8) { DO8; len -= 8; } if (len) do { DO1; } while (--len); return crc ^ 0xffffffffUL; } #ifdef BYFOUR /* ========================================================================= */ #define DOLIT4 c ^= *buf4++; \ c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \ crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24] #define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4 /* ========================================================================= */ local unsigned long crc32_little(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; unsigned len; { register u4 c; register const u4 FAR *buf4; c = (u4)crc; c = ~c; while (len && ((ptrdiff_t)buf & 3)) { c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8); len--; } buf4 = (const u4 FAR *)(const void FAR *)buf; while (len >= 32) { DOLIT32; len -= 32; } while (len >= 4) { DOLIT4; len -= 4; } buf = (const unsigned char FAR *)buf4; if (len) do { c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8); } while (--len); c = ~c; return (unsigned long)c; } /* ========================================================================= */ #define DOBIG4 c ^= *++buf4; \ c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \ crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24] #define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4 /* ========================================================================= */ local unsigned long crc32_big(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; unsigned len; { register u4 c; register const u4 FAR *buf4; c = REV((u4)crc); c = ~c; while (len && ((ptrdiff_t)buf & 3)) { c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8); len--; } buf4 = (const u4 FAR *)(const void FAR *)buf; buf4--; while (len >= 32) { DOBIG32; len -= 32; } while (len >= 4) { DOBIG4; len -= 4; } buf4++; buf = (const unsigned char FAR *)buf4; if (len) do { c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8); } while (--len); c = ~c; return (unsigned long)(REV(c)); } #endif /* BYFOUR */ #define GF2_DIM 32 /* dimension of GF(2) vectors (length of CRC) */ /* ========================================================================= */ local unsigned long gf2_matrix_times(mat, vec) unsigned long *mat; unsigned long vec; { unsigned long sum; sum = 0; while (vec) { if (vec & 1) sum ^= *mat; vec >>= 1; mat++; } return sum; } /* ========================================================================= */ local void gf2_matrix_square(square, mat) unsigned long *square; unsigned long *mat; { int n; for (n = 0; n < GF2_DIM; n++) square[n] = gf2_matrix_times(mat, mat[n]); } /* ========================================================================= */ local uLong crc32_combine_(crc1, crc2, len2) uLong crc1; uLong crc2; z_off64_t len2; { int n; unsigned long row; unsigned long even[GF2_DIM]; /* even-power-of-two zeros operator */ unsigned long odd[GF2_DIM]; /* odd-power-of-two zeros operator */ /* degenerate case (also disallow negative lengths) */ if (len2 <= 0) return crc1; /* put operator for one zero bit in odd */ odd[0] = 0xedb88320UL; /* CRC-32 polynomial */ row = 1; for (n = 1; n < GF2_DIM; n++) { odd[n] = row; row <<= 1; } /* put operator for two zero bits in even */ gf2_matrix_square(even, odd); /* put operator for four zero bits in odd */ gf2_matrix_square(odd, even); /* apply len2 zeros to crc1 (first square will put the operator for one zero byte, eight zero bits, in even) */ do { /* apply zeros operator for this bit of len2 */ gf2_matrix_square(even, odd); if (len2 & 1) crc1 = gf2_matrix_times(even, crc1); len2 >>= 1; /* if no more bits set, then done */ if (len2 == 0) break; /* another iteration of the loop with odd and even swapped */ gf2_matrix_square(odd, even); if (len2 & 1) crc1 = gf2_matrix_times(odd, crc1); len2 >>= 1; /* if no more bits set, then done */ } while (len2 != 0); /* return combined crc */ crc1 ^= crc2; return crc1; } /* ========================================================================= */ uLong ZEXPORT crc32_combine(crc1, crc2, len2) uLong crc1; uLong crc2; z_off_t len2; { return crc32_combine_(crc1, crc2, len2); } uLong ZEXPORT crc32_combine64(crc1, crc2, len2) uLong crc1; uLong crc2; z_off64_t len2; { return crc32_combine_(crc1, crc2, len2); } astropy-1.1.1/cextern/cfitsio/putcols.c0000644001134200020070000002521412602615517021075 0ustar embrayscience00000000000000/* This file, putcols.c, contains routines that write data elements to */ /* a FITS image or table, of type character string. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffpcls( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of strings to write */ char **array, /* I - array of pointers to strings */ int *status) /* IO - error status */ /* Write an array of string values to a column in the current FITS HDU. */ { int tcode, maxelem, hdutype, nchar; long twidth, incre; long ii, jj, ntodo; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; double scale, zero; char tform[20], *blanks; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ tcolumn *colptr; double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ char *buffer, *arrayptr; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (colnum < 1 || colnum > (fptr->Fptr)->tfield) { sprintf(message, "Specified column number is out of range: %d", colnum); ffpmsg(message); return(*status = BAD_COL_NUM); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode == -TSTRING) /* variable length column in a binary table? */ { /* only write a single string; ignore value of firstelem */ nchar = maxvalue(1,strlen(array[0])); /* will write at least 1 char */ /* even if input string is null */ if (ffgcprll( fptr, colnum, firstrow, 1, nchar, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); /* simply move to write position, then write the string */ ffmbyt(fptr, startpos, IGNORE_EOF, status); ffpbyt(fptr, nchar, array[0], status); if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing to variable length string column (ffpcls)."); ffpmsg(message); } return(*status); } else if (tcode == TSTRING) { if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); /* if string length is greater than a FITS block (2880 char) then must */ /* only write 1 string at a time, to force writein by ffpbyt instead of */ /* ffpbytoff (ffpbytoff can't handle this case) */ if (twidth > IOBUFLEN) { maxelem = 1; incre = twidth; repeat = 1; } blanks = (char *) malloc(twidth); /* string for blank fill values */ if (!blanks) { ffpmsg("Could not allocate memory for string (ffpcls)"); return(*status = ARRAY_TOO_BIG); } for (ii = 0; ii < twidth; ii++) blanks[ii] = ' '; /* fill string with blanks */ remain = nelem; /* remaining number of values to write */ } else return(*status = NOT_ASCII_COL); /*-------------------------------------------------------*/ /* Now write the strings to the FITS column. */ /*-------------------------------------------------------*/ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to process at one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + (rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ buffer = (char *) cbuff; /* copy the user's strings into the buffer */ for (ii = 0; ii < ntodo; ii++) { arrayptr = array[next]; for (jj = 0; jj < twidth; jj++) /* copy the string, char by char */ { if (*arrayptr) { *buffer = *arrayptr; buffer++; arrayptr++; } else break; } for (;jj < twidth; jj++) /* fill field with blanks, if needed */ { *buffer = ' '; buffer++; } next++; } /* write the buffer full of strings to the FITS file */ if (incre == twidth) ffpbyt(fptr, ntodo * twidth, cbuff, status); else ffpbytoff(fptr, twidth, ntodo, incre - twidth, cbuff, status); if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing elements %.0f thru %.0f of input data array (ffpcls).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); if (blanks) free(blanks); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ if (blanks) free(blanks); return(*status); } /*--------------------------------------------------------------------------*/ int ffpcns( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ char **array, /* I - array of values to write */ char *nulvalue, /* I - string representing a null value */ int *status) /* IO - error status */ /* Write an array of elements to the specified column of a table. Any input pixels flagged as null will be replaced by the appropriate null value in the output FITS file. */ { long repeat, width, ngood = 0, nbad = 0, ii; LONGLONG first, fstelm, fstrow; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } /* get the vector repeat length of the column */ ffgtcl(fptr, colnum, NULL, &repeat, &width, status); if ((fptr->Fptr)->hdutype == BINARY_TBL) repeat = repeat / width; /* convert from chars to unit strings */ /* absolute element number in the column */ first = (firstrow - 1) * repeat + firstelem; for (ii = 0; ii < nelem; ii++) { if (strcmp(nulvalue, array[ii])) /* is this a good pixel? */ { if (nbad) /* write previous string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) return(*status); nbad=0; } ngood = ngood +1; /* the consecutive number of good pixels */ } else { if (ngood) /* write previous string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (ffpcls(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status) > 0) return(*status); ngood=0; } nbad = nbad +1; /* the consecutive number of bad pixels */ } } /* finished loop; now just write the last set of pixels */ if (ngood) /* write last string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpcls(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); } else if (nbad) /* write last string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); } return(*status); } astropy-1.1.1/cextern/cfitsio/eval.l0000644001134200020070000003743012602615520020341 0ustar embrayscience00000000000000%{ /************************************************************************/ /* */ /* CFITSIO Lexical Parser */ /* */ /* This file is one of 3 files containing code which parses an */ /* arithmetic expression and evaluates it in the context of an input */ /* FITS file table extension. The CFITSIO lexical parser is divided */ /* into the following 3 parts/files: the CFITSIO "front-end", */ /* eval_f.c, contains the interface between the user/CFITSIO and the */ /* real core of the parser; the FLEX interpreter, eval_l.c, takes the */ /* input string and parses it into tokens and identifies the FITS */ /* information required to evaluate the expression (ie, keywords and */ /* columns); and, the BISON grammar and evaluation routines, eval_y.c, */ /* receives the FLEX output and determines and performs the actual */ /* operations. The files eval_l.c and eval_y.c are produced from */ /* running flex and bison on the files eval.l and eval.y, respectively. */ /* (flex and bison are available from any GNU archive: see www.gnu.org) */ /* */ /* The grammar rules, rather than evaluating the expression in situ, */ /* builds a tree, or Nodal, structure mapping out the order of */ /* operations and expression dependencies. This "compilation" process */ /* allows for much faster processing of multiple rows. This technique */ /* was developed by Uwe Lammers of the XMM Science Analysis System, */ /* although the CFITSIO implementation is entirely code original. */ /* */ /* */ /* Modification History: */ /* */ /* Kent Blackburn c1992 Original parser code developed for the */ /* FTOOLS software package, in particular, */ /* the fselect task. */ /* Kent Blackburn c1995 BIT column support added */ /* Peter D Wilson Feb 1998 Vector column support added */ /* Peter D Wilson May 1998 Ported to CFITSIO library. User */ /* interface routines written, in essence */ /* making fselect, fcalc, and maketime */ /* capabilities available to all tools */ /* via single function calls. */ /* Peter D Wilson Jun 1998 Major rewrite of parser core, so as to */ /* create a run-time evaluation tree, */ /* inspired by the work of Uwe Lammers, */ /* resulting in a speed increase of */ /* 10-100 times. */ /* Peter D Wilson Jul 1998 gtifilter(a,b,c,d) function added */ /* Peter D Wilson Aug 1998 regfilter(a,b,c,d) function added */ /* Peter D Wilson Jul 1999 Make parser fitsfile-independent, */ /* allowing a purely vector-based usage */ /* */ /************************************************************************/ #include #include #include #ifdef sparc #include #else #include #endif #include "eval_defs.h" ParseData gParse; /* Global structure holding all parser information */ /***** Internal functions *****/ int yyGetVariable( char *varName, YYSTYPE *varVal ); static int find_variable( char *varName ); static int expr_read( char *buf, int nbytes ); /***** Definitions *****/ #define YY_NO_UNPUT /* Don't include YYUNPUT function */ #define YY_NEVER_INTERACTIVE 1 #define MAXCHR 256 #define MAXBIT 128 #define OCT_0 "000" #define OCT_1 "001" #define OCT_2 "010" #define OCT_3 "011" #define OCT_4 "100" #define OCT_5 "101" #define OCT_6 "110" #define OCT_7 "111" #define OCT_X "xxx" #define HEX_0 "0000" #define HEX_1 "0001" #define HEX_2 "0010" #define HEX_3 "0011" #define HEX_4 "0100" #define HEX_5 "0101" #define HEX_6 "0110" #define HEX_7 "0111" #define HEX_8 "1000" #define HEX_9 "1001" #define HEX_A "1010" #define HEX_B "1011" #define HEX_C "1100" #define HEX_D "1101" #define HEX_E "1110" #define HEX_F "1111" #define HEX_X "xxxx" /* MJT - 13 June 1996 read from buffer instead of stdin (as per old ftools.skel) */ #undef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( (result = expr_read( (char *) buf, max_size )) < 0 ) \ YY_FATAL_ERROR( "read() in flex scanner failed" ); %} bit ([bB][01xX]+) oct ([oO][01234567xX]+) hex ([hH][0123456789aAbBcCdDeEfFxX]+) integer [0-9]+ boolean (t|f|T|F) real ([0-9]*"."[0-9]+)|([0-9]*"."*[0-9]+[eEdD][+-]?[0-9]+)|([0-9]*".") constant ("#"[a-zA-Z0-9_]+)|("#""$"[^\n]*"$") string ([\"][^\"\n]*[\"])|([\'][^\'\n]*[\']) variable ([a-zA-Z_][a-zA-Z0-9_]*)|("$"[^$\n]*"$") function [a-zA-Z][a-zA-Z0-9]+"(" intcast ("(int)"|"(INT)") fltcast ("(float)"|"(FLOAT)"|"(double)"|"(DOUBLE)") power ("^"|"**") not ("!"|".not."|".NOT."|"not."|"NOT.") or ("||"|".or."|".OR."|"or."|"OR.") and ("&&"|".and."|".AND."|"and."|"AND.") equal ("=="|".eq."|".EQ."|"eq."|"EQ.") not_equal ("!="|".ne."|".NE."|"ne."|"NE.") greater (">"|".gt."|".GT."|"gt."|"GT.") lesser ("<"|".lt."|".LT."|"lt."|"LT.") greater_eq (">="|"=>"|".ge."|".GE."|"ge."|"GE.") lesser_eq ("<="|"=<"|".le."|".LE."|"le."|"LE.") nl \n %% [ \t]+ ; {bit} { int len; len = strlen(yytext); while (yytext[len] == ' ') len--; len = len - 1; strncpy(yylval.str,&yytext[1],len); yylval.str[len] = '\0'; return( BITSTR ); } {oct} { int len; char tmpstring[256]; char bitstring[256]; len = strlen(yytext); if (len >= 256) { char errMsg[100]; gParse.status = PARSE_SYNTAX_ERR; strcpy (errMsg,"Bit string exceeds maximum length: '"); strncat(errMsg, &(yytext[0]), 20); strcat (errMsg,"...'"); ffpmsg (errMsg); len = 0; } else { while (yytext[len] == ' ') len--; len = len - 1; strncpy(tmpstring,&yytext[1],len); } tmpstring[len] = '\0'; bitstring[0] = '\0'; len = 0; while ( tmpstring[len] != '\0') { switch ( tmpstring[len] ) { case '0': strcat(bitstring,OCT_0); break; case '1': strcat(bitstring,OCT_1); break; case '2': strcat(bitstring,OCT_2); break; case '3': strcat(bitstring,OCT_3); break; case '4': strcat(bitstring,OCT_4); break; case '5': strcat(bitstring,OCT_5); break; case '6': strcat(bitstring,OCT_6); break; case '7': strcat(bitstring,OCT_7); break; case 'x': case 'X': strcat(bitstring,OCT_X); break; } len++; } strcpy( yylval.str, bitstring ); return( BITSTR ); } {hex} { int len; char tmpstring[256]; char bitstring[256]; len = strlen(yytext); if (len >= 256) { char errMsg[100]; gParse.status = PARSE_SYNTAX_ERR; strcpy (errMsg,"Hex string exceeds maximum length: '"); strncat(errMsg, &(yytext[0]), 20); strcat (errMsg,"...'"); ffpmsg (errMsg); len = 0; } else { while (yytext[len] == ' ') len--; len = len - 1; strncpy(tmpstring,&yytext[1],len); } tmpstring[len] = '\0'; bitstring[0] = '\0'; len = 0; while ( tmpstring[len] != '\0') { switch ( tmpstring[len] ) { case '0': strcat(bitstring,HEX_0); break; case '1': strcat(bitstring,HEX_1); break; case '2': strcat(bitstring,HEX_2); break; case '3': strcat(bitstring,HEX_3); break; case '4': strcat(bitstring,HEX_4); break; case '5': strcat(bitstring,HEX_5); break; case '6': strcat(bitstring,HEX_6); break; case '7': strcat(bitstring,HEX_7); break; case '8': strcat(bitstring,HEX_8); break; case '9': strcat(bitstring,HEX_9); break; case 'a': case 'A': strcat(bitstring,HEX_A); break; case 'b': case 'B': strcat(bitstring,HEX_B); break; case 'c': case 'C': strcat(bitstring,HEX_C); break; case 'd': case 'D': strcat(bitstring,HEX_D); break; case 'e': case 'E': strcat(bitstring,HEX_E); break; case 'f': case 'F': strcat(bitstring,HEX_F); break; case 'x': case 'X': strcat(bitstring,HEX_X); break; } len++; } strcpy( yylval.str, bitstring ); return( BITSTR ); } {integer} { yylval.lng = atol(yytext); return( LONG ); } {boolean} { if ((yytext[0] == 't') || (yytext[0] == 'T')) yylval.log = 1; else yylval.log = 0; return( BOOLEAN ); } {real} { yylval.dbl = atof(yytext); return( DOUBLE ); } {constant} { if( !strcasecmp(yytext,"#PI") ) { yylval.dbl = (double)(4) * atan((double)(1)); return( DOUBLE ); } else if( !strcasecmp(yytext,"#E") ) { yylval.dbl = exp((double)(1)); return( DOUBLE ); } else if( !strcasecmp(yytext,"#DEG") ) { yylval.dbl = ((double)4)*atan((double)1)/((double)180); return( DOUBLE ); } else if( !strcasecmp(yytext,"#ROW") ) { return( ROWREF ); } else if( !strcasecmp(yytext,"#NULL") ) { return( NULLREF ); } else if( !strcasecmp(yytext,"#SNULL") ) { return( SNULLREF ); } else { int len; if (yytext[1] == '$') { len = strlen(yytext) - 3; yylval.str[0] = '#'; strncpy(yylval.str+1,&yytext[2],len); yylval.str[len+1] = '\0'; yytext = yylval.str; } return( (*gParse.getData)(yytext, &yylval) ); } } {string} { int len; len = strlen(yytext) - 2; if (len >= MAX_STRLEN) { char errMsg[100]; gParse.status = PARSE_SYNTAX_ERR; strcpy (errMsg,"String exceeds maximum length: '"); strncat(errMsg, &(yytext[1]), 20); strcat (errMsg,"...'"); ffpmsg (errMsg); len = 0; } else { strncpy(yylval.str,&yytext[1],len); } yylval.str[len] = '\0'; return( STRING ); } {variable} { int len,type; if (yytext[0] == '$') { len = strlen(yytext) - 2; strncpy(yylval.str,&yytext[1],len); yylval.str[len] = '\0'; yytext = yylval.str; } type = yyGetVariable(yytext, &yylval); return( type ); } {function} { char *fname; int len=0; fname = &yylval.str[0]; while( (fname[len]=toupper(yytext[len])) ) len++; if( FSTRCMP(fname,"BOX(")==0 || FSTRCMP(fname,"CIRCLE(")==0 || FSTRCMP(fname,"ELLIPSE(")==0 || FSTRCMP(fname,"NEAR(")==0 || FSTRCMP(fname,"ISNULL(")==0 ) /* Return type is always boolean */ return( BFUNCTION ); else if( FSTRCMP(fname,"GTIFILTER(")==0 ) return( GTIFILTER ); else if( FSTRCMP(fname,"REGFILTER(")==0 ) return( REGFILTER ); else if( FSTRCMP(fname,"STRSTR(")==0 ) return( IFUNCTION ); /* Returns integer */ else return( FUNCTION ); } {intcast} { return( INTCAST ); } {fltcast} { return( FLTCAST ); } {power} { return( POWER ); } {not} { return( NOT ); } {or} { return( OR ); } {and} { return( AND ); } {equal} { return( EQ ); } {not_equal} { return( NE ); } {greater} { return( GT ); } {lesser} { return( LT ); } {greater_eq} { return( GTE ); } {lesser_eq} { return( LTE ); } {nl} { return( '\n' ); } . { return( yytext[0] ); } %% int yywrap() { /* MJT -- 13 June 1996 Supplied for compatibility with pre-2.5.1 versions of flex which do not recognize %option noyywrap */ return(1); } /* expr_read is lifted from old ftools.skel. Now we can use any version of flex with no .skel file necessary! MJT - 13 June 1996 keep a memory of how many bytes have been read previously, so that an unlimited-sized buffer can be supported. PDW - 28 Feb 1998 */ static int expr_read(char *buf, int nbytes) { int n; n = 0; if( !gParse.is_eobuf ) { do { buf[n++] = gParse.expr[gParse.index++]; } while ((nlng = varNum; } return( type ); } static int find_variable(char *varName) { int i; if( gParse.nCols ) for( i=0; i c2) return(1); if (c1 == 0) return(0); s1++; s2++; } } int strncasecmp(const char *s1, const char *s2, size_t n) { char c1, c2; for (; n-- ;) { c1 = toupper( *s1 ); c2 = toupper( *s2 ); if (c1 < c2) return(-1); if (c1 > c2) return(1); if (c1 == 0) return(0); s1++; s2++; } return(0); } #endif astropy-1.1.1/cextern/cfitsio/putcoluk.c0000644001134200020070000010441712602615520021247 0ustar embrayscience00000000000000/* This file, putcolk.c, contains routines that write data elements to */ /* a FITS image or table, with 'unsigned int' datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffppruk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned int *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; unsigned int nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_pixels(fptr, TUINT, firstelem, nelem, 0, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcluk(fptr, 2, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffppnuk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned int *array, /* I - array of values that are written */ unsigned int nulval, /* I - undefined pixel value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). Any array values that are equal to the value of nulval will be replaced with the null pixel value that is appropriate for this column. */ { long row; unsigned int nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_write_compressed_pixels(fptr, TUINT, firstelem, nelem, 1, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcnuk(fptr, 2, row, firstelem, nelem, array, nulval, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp2duk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ unsigned int *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { /* call the 3D writing routine, with the 3rd dimension = 1 */ ffp3duk(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp3duk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ unsigned int *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 3-D cube of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow, ii, jj; long fpixel[3]= {1,1,1}, lpixel[3]; LONGLONG nfits, narray; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = (long) ncols; lpixel[1] = (long) nrows; lpixel[2] = (long) naxis3; fits_write_compressed_img(fptr, TUINT, fpixel, lpixel, 0, array, NULL, status); return(*status); } tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so write all at once */ ffpcluk(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to write to */ narray = 0; /* next pixel in input array to be written */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* writing naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffpcluk(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpssuk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long naxis, /* I - number of data axes in array */ long *naxes, /* I - size of each FITS axis */ long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ long *lpixel, /* I - last pixel in each axis to write */ unsigned int *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write a subsection of pixels to the primary array or image. A subsection is defined to be any contiguous rectangular array of pixels within the n-dimensional FITS data file. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow; LONGLONG fpix[7], dimen[7], astart, pstart; LONGLONG off2, off3, off4, off5, off6, off7; LONGLONG st10, st20, st30, st40, st50, st60, st70; LONGLONG st1, st2, st3, st4, st5, st6, st7; long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; if (*status > 0) return(*status); if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_img(fptr, TUINT, fpixel, lpixel, 0, array, NULL, status); return(*status); } if (naxis < 1 || naxis > 7) return(*status = BAD_DIMEN); tablerow=maxvalue(1,group); /* calculate the size and number of loops to perform in each dimension */ for (ii = 0; ii < 7; ii++) { fpix[ii]=1; irange[ii]=1; dimen[ii]=1; } for (ii = 0; ii < naxis; ii++) { fpix[ii]=fpixel[ii]; irange[ii]=lpixel[ii]-fpixel[ii]+1; dimen[ii]=naxes[ii]; } i1=irange[0]; /* compute the pixel offset between each dimension */ off2 = dimen[0]; off3 = off2 * dimen[1]; off4 = off3 * dimen[2]; off5 = off4 * dimen[3]; off6 = off5 * dimen[4]; off7 = off6 * dimen[5]; st10 = fpix[0]; st20 = (fpix[1] - 1) * off2; st30 = (fpix[2] - 1) * off3; st40 = (fpix[3] - 1) * off4; st50 = (fpix[4] - 1) * off5; st60 = (fpix[5] - 1) * off6; st70 = (fpix[6] - 1) * off7; /* store the initial offset in each dimension */ st1 = st10; st2 = st20; st3 = st30; st4 = st40; st5 = st50; st6 = st60; st7 = st70; astart = 0; for (i7 = 0; i7 < irange[6]; i7++) { for (i6 = 0; i6 < irange[5]; i6++) { for (i5 = 0; i5 < irange[4]; i5++) { for (i4 = 0; i4 < irange[3]; i4++) { for (i3 = 0; i3 < irange[2]; i3++) { pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; for (i2 = 0; i2 < irange[1]; i2++) { if (ffpcluk(fptr, 2, tablerow, pstart, i1, &array[astart], status) > 0) return(*status); astart += i1; pstart += off2; } st2 = st20; st3 = st3+off3; } st3 = st30; st4 = st4+off4; } st4 = st40; st5 = st5+off5; } st5 = st50; st6 = st6+off6; } st6 = st60; st7 = st7+off7; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpgpuk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long firstelem, /* I - first vector element to write(1 = 1st) */ long nelem, /* I - number of values to write */ unsigned int *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of group parameters to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffpcluk(fptr, 1L, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpcluk(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned int *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of values to a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. */ { int tcode, maxelem, hdutype; long twidth, incre; long ntodo; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; double scale, zero; char tform[20], cform[20]; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* call the 'short' or 'long' version of this routine, if possible */ if (sizeof(int) == sizeof(short)) ffpclui(fptr, colnum, firstrow, firstelem, nelem, (unsigned short *) array, status); else if (sizeof(int) == sizeof(long)) ffpcluj(fptr, colnum, firstrow, firstelem, nelem, (unsigned long *) array, status); else { /* This is a special case: sizeof(int) is not equal to sizeof(short) or sizeof(long). This occurs on Alpha OSF systems where short = 2 bytes, int = 4 bytes, and long = 8 bytes. */ buffer = cbuff; /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); if (tcode == TSTRING) ffcfmt(tform, cform); /* derive C format for writing strings */ /*---------------------------------------------------------------------*/ /* Now write the pixels to the FITS column. */ /* First call the ffXXfYY routine to (1) convert the datatype */ /* if necessary, and (2) scale the values by the FITS TSCALn and */ /* TZEROn linear scaling parameters into a temporary buffer. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to process a one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ switch (tcode) { case (TLONG): /* convert the raw data before writing to FITS file */ ffuintfi4(&array[next], ntodo, scale, zero, (INT32BIT *) buffer, status); ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); break; case (TLONGLONG): ffuintfi8(&array[next], ntodo, scale, zero, (LONGLONG *) buffer, status); ffpi8b(fptr, ntodo, incre, (long *) buffer, status); break; case (TBYTE): ffuintfi1(&array[next], ntodo, scale, zero, (unsigned char *) buffer, status); ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); break; case (TSHORT): ffuintfi2(&array[next], ntodo, scale, zero, (short *) buffer, status); ffpi2b(fptr, ntodo, incre, (short *) buffer, status); break; case (TFLOAT): ffuintfr4(&array[next], ntodo, scale, zero, (float *) buffer, status); ffpr4b(fptr, ntodo, incre, (float *) buffer, status); break; case (TDOUBLE): ffuintfr8(&array[next], ntodo, scale, zero, (double *) buffer, status); ffpr8b(fptr, ntodo, incre, (double *) buffer, status); break; case (TSTRING): /* numerical column in an ASCII table */ if (cform[1] != 's') /* "%s" format is a string */ { ffuintfstr(&array[next], ntodo, scale, zero, cform, twidth, (char *) buffer, status); if (incre == twidth) /* contiguous bytes */ ffpbyt(fptr, ntodo * twidth, buffer, status); else ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); break; } /* can't write to string column, so fall thru to default: */ default: /* error trap */ sprintf(message, "Cannot write numbers to column %d which has format %s", colnum,tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing elements %.0f thru %.0f of input data array (ffpcluk).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while writing FITS data."); *status = NUM_OVERFLOW; } } /* end of Dec ALPHA special case */ return(*status); } /*--------------------------------------------------------------------------*/ int ffpcnuk(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned int *array, /* I - array of values to write */ unsigned int nulvalue, /* I - value used to flag undefined pixels */ int *status) /* IO - error status */ /* Write an array of elements to the specified column of a table. Any input pixels equal to the value of nulvalue will be replaced by the appropriate null value in the output FITS file. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary */ { tcolumn *colptr; long ngood = 0, nbad = 0, ii; LONGLONG repeat, first, fstelm, fstrow; int tcode, overflow = 0; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode > 0) repeat = colptr->trepeat; /* repeat count for this column */ else repeat = firstelem -1 + nelem; /* variable length arrays */ /* if variable length array, first write the whole input vector, then go back and fill in the nulls */ if (tcode < 0) { if (ffpcluk(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { if (*status == NUM_OVERFLOW) { /* ignore overflows, which are possibly the null pixel values */ /* overflow = 1; */ *status = 0; } else { return(*status); } } } /* absolute element number in the column */ first = (firstrow - 1) * repeat + firstelem; for (ii = 0; ii < nelem; ii++) { if (array[ii] != nulvalue) /* is this a good pixel? */ { if (nbad) /* write previous string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) return(*status); nbad=0; } ngood = ngood +1; /* the consecutive number of good pixels */ } else { if (ngood) /* write previous string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ if (ffpcluk(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status) > 0) { if (*status == NUM_OVERFLOW) { overflow = 1; *status = 0; } else { return(*status); } } } ngood=0; } nbad = nbad +1; /* the consecutive number of bad pixels */ } } /* finished loop; now just write the last set of pixels */ if (ngood) /* write last string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ ffpcluk(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); } } else if (nbad) /* write last string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); } if (*status <= 0) { if (overflow) { *status = NUM_OVERFLOW; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffuintfi1(unsigned int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ unsigned char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] > UCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) (dvalue + .5); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffuintfi2(unsigned int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ short *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] > SHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else { if (dvalue >= 0) output[ii] = (short) (dvalue + .5); else output[ii] = (short) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffuintfi4(unsigned int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ INT32BIT *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 2147483648.) { /* Instead of subtracting 2147483648, it is more efficient */ /* to just flip the sign bit with the XOR operator */ for (ii = 0; ii < ntodo; ii++) output[ii] = ( *(int *) &input[ii] ) ^ 0x80000000; } else if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] > INT32_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else output[ii] = input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else { if (dvalue >= 0) output[ii] = (INT32BIT) (dvalue + .5); else output[ii] = (INT32BIT) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffuintfi8(unsigned int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ LONGLONG *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = input[ii]; } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else { if (dvalue >= 0) output[ii] = (LONGLONG) (dvalue + .5); else output[ii] = (LONGLONG) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffuintfr4(unsigned int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ float *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) ((input[ii] - zero) / scale); } return(*status); } /*--------------------------------------------------------------------------*/ int ffuintfr8(unsigned int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ double *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (input[ii] - zero) / scale; } return(*status); } /*--------------------------------------------------------------------------*/ int ffuintfstr(unsigned int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ char *cform, /* I - format for output string values */ long twidth, /* I - width of each field, in chars */ char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do scaling if required. */ { long ii; double dvalue; char *cptr; cptr = output; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { sprintf(output, cform, (double) input[ii]); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; sprintf(output, cform, dvalue); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } /* replace any commas with periods (e.g., in French locale) */ while ((cptr = strchr(cptr, ','))) *cptr = '.'; return(*status); } astropy-1.1.1/cextern/cfitsio/histo.c0000644001134200020070000022162312602615520020526 0ustar embrayscience00000000000000/* Globally defined histogram parameters */ #include #include #include #include #include "fitsio2.h" typedef struct { /* Structure holding all the histogramming information */ union { /* the iterator work functions (ffwritehist, ffcalchist) */ char *b; /* need to do their job... passed via *userPointer. */ short *i; int *j; float *r; double *d; } hist; fitsfile *tblptr; int haxis, hcolnum[4], himagetype; long haxis1, haxis2, haxis3, haxis4; float amin1, amin2, amin3, amin4; float maxbin1, maxbin2, maxbin3, maxbin4; float binsize1, binsize2, binsize3, binsize4; int wtrecip, wtcolnum; float weight; char *rowselector; } histType; /*--------------------------------------------------------------------------*/ int ffbins(char *binspec, /* I - binning specification */ int *imagetype, /* O - image type, TINT or TSHORT */ int *histaxis, /* O - no. of axes in the histogram */ char colname[4][FLEN_VALUE], /* column name for axis */ double *minin, /* minimum value for each axis */ double *maxin, /* maximum value for each axis */ double *binsizein, /* size of bins on each axis */ char minname[4][FLEN_VALUE], /* keyword name for min */ char maxname[4][FLEN_VALUE], /* keyword name for max */ char binname[4][FLEN_VALUE], /* keyword name for binsize */ double *wt, /* weighting factor */ char *wtname, /* keyword or column name for weight */ int *recip, /* the reciprocal of the weight? */ int *status) { /* Parse the input binning specification string, returning the binning parameters. Supports up to 4 dimensions. The binspec string has one of these forms: bin binsize - 2D histogram with binsize on each axis bin xcol - 1D histogram on column xcol bin (xcol, ycol) = binsize - 2D histogram with binsize on each axis bin x=min:max:size, y=min:max:size, z..., t... bin x=:max, y=::size bin x=size, y=min::size most other reasonable combinations are supported. */ int ii, slen, defaulttype; char *ptr, tmpname[30], *file_expr = NULL; double dummy; if (*status > 0) return(*status); /* set the default values */ *histaxis = 2; *imagetype = TINT; defaulttype = 1; *wt = 1.; *recip = 0; *wtname = '\0'; /* set default values */ for (ii = 0; ii < 4; ii++) { *colname[ii] = '\0'; *minname[ii] = '\0'; *maxname[ii] = '\0'; *binname[ii] = '\0'; minin[ii] = DOUBLENULLVALUE; /* undefined values */ maxin[ii] = DOUBLENULLVALUE; binsizein[ii] = DOUBLENULLVALUE; } ptr = binspec + 3; /* skip over 'bin' */ if (*ptr == 'i' ) /* bini */ { *imagetype = TSHORT; defaulttype = 0; ptr++; } else if (*ptr == 'j' ) /* binj; same as default */ { defaulttype = 0; ptr ++; } else if (*ptr == 'r' ) /* binr */ { *imagetype = TFLOAT; defaulttype = 0; ptr ++; } else if (*ptr == 'd' ) /* bind */ { *imagetype = TDOUBLE; defaulttype = 0; ptr ++; } else if (*ptr == 'b' ) /* binb */ { *imagetype = TBYTE; defaulttype = 0; ptr ++; } if (*ptr == '\0') /* use all defaults for other parameters */ return(*status); else if (*ptr != ' ') /* must be at least one blank */ { ffpmsg("binning specification syntax error:"); ffpmsg(binspec); return(*status = URL_PARSE_ERROR); } while (*ptr == ' ') /* skip over blanks */ ptr++; if (*ptr == '\0') /* no other parameters; use defaults */ return(*status); /* Check if need to import expression from a file */ if( *ptr=='@' ) { if( ffimport_file( ptr+1, &file_expr, status ) ) return(*status); ptr = file_expr; while (*ptr == ' ') ptr++; /* skip leading white space... again */ } if (*ptr == '(' ) { /* this must be the opening parenthesis around a list of column */ /* names, optionally followed by a '=' and the binning spec. */ for (ii = 0; ii < 4; ii++) { ptr++; /* skip over the '(', ',', or ' ') */ while (*ptr == ' ') /* skip over blanks */ ptr++; slen = strcspn(ptr, " ,)"); strncat(colname[ii], ptr, slen); /* copy 1st column name */ ptr += slen; while (*ptr == ' ') /* skip over blanks */ ptr++; if (*ptr == ')' ) /* end of the list of names */ { *histaxis = ii + 1; break; } } if (ii == 4) /* too many names in the list , or missing ')' */ { ffpmsg( "binning specification has too many column names or is missing closing ')':"); ffpmsg(binspec); if( file_expr ) free( file_expr ); return(*status = URL_PARSE_ERROR); } ptr++; /* skip over the closing parenthesis */ while (*ptr == ' ') /* skip over blanks */ ptr++; if (*ptr == '\0') { if( file_expr ) free( file_expr ); return(*status); /* parsed the entire string */ } else if (*ptr != '=') /* must be an equals sign now*/ { ffpmsg("illegal binning specification in URL:"); ffpmsg(" an equals sign '=' must follow the column names"); ffpmsg(binspec); if( file_expr ) free( file_expr ); return(*status = URL_PARSE_ERROR); } ptr++; /* skip over the equals sign */ while (*ptr == ' ') /* skip over blanks */ ptr++; /* get the single range specification for all the columns */ ffbinr(&ptr, tmpname, minin, maxin, binsizein, minname[0], maxname[0], binname[0], status); if (*status > 0) { ffpmsg("illegal binning specification in URL:"); ffpmsg(binspec); if( file_expr ) free( file_expr ); return(*status); } for (ii = 1; ii < *histaxis; ii++) { minin[ii] = minin[0]; maxin[ii] = maxin[0]; binsizein[ii] = binsizein[0]; strcpy(minname[ii], minname[0]); strcpy(maxname[ii], maxname[0]); strcpy(binname[ii], binname[0]); } while (*ptr == ' ') /* skip over blanks */ ptr++; if (*ptr == ';') goto getweight; /* a weighting factor is specified */ if (*ptr != '\0') /* must have reached end of string */ { ffpmsg("illegal syntax after binning range specification in URL:"); ffpmsg(binspec); if( file_expr ) free( file_expr ); return(*status = URL_PARSE_ERROR); } return(*status); } /* end of case with list of column names in ( ) */ /* if we've reached this point, then the binning specification */ /* must be of the form: XCOL = min:max:binsize, YCOL = ... */ /* where the column name followed by '=' are optional. */ /* If the column name is not specified, then use the default name */ for (ii = 0; ii < 4; ii++) /* allow up to 4 histogram dimensions */ { ffbinr(&ptr, colname[ii], &minin[ii], &maxin[ii], &binsizein[ii], minname[ii], maxname[ii], binname[ii], status); if (*status > 0) { ffpmsg("illegal syntax in binning range specification in URL:"); ffpmsg(binspec); if( file_expr ) free( file_expr ); return(*status); } if (*ptr == '\0' || *ptr == ';') break; /* reached the end of the string */ if (*ptr == ' ') { while (*ptr == ' ') /* skip over blanks */ ptr++; if (*ptr == '\0' || *ptr == ';') break; /* reached the end of the string */ if (*ptr == ',') ptr++; /* comma separates the next column specification */ } else if (*ptr == ',') { ptr++; /* comma separates the next column specification */ } else { ffpmsg("illegal characters following binning specification in URL:"); ffpmsg(binspec); if( file_expr ) free( file_expr ); return(*status = URL_PARSE_ERROR); } } if (ii == 4) { /* there are yet more characters in the string */ ffpmsg("illegal binning specification in URL:"); ffpmsg("apparently greater than 4 histogram dimensions"); ffpmsg(binspec); return(*status = URL_PARSE_ERROR); } else *histaxis = ii + 1; /* special case: if a single number was entered it should be */ /* interpreted as the binning factor for the default X and Y axes */ if (*histaxis == 1 && *colname[0] == '\0' && minin[0] == DOUBLENULLVALUE && maxin[0] == DOUBLENULLVALUE) { *histaxis = 2; binsizein[1] = binsizein[0]; } getweight: if (*ptr == ';') /* looks like a weighting factor is given */ { ptr++; while (*ptr == ' ') /* skip over blanks */ ptr++; recip = 0; if (*ptr == '/') { *recip = 1; /* the reciprocal of the weight is entered */ ptr++; while (*ptr == ' ') /* skip over blanks */ ptr++; } /* parse the weight as though it were a binrange. */ /* either a column name or a numerical value will be returned */ ffbinr(&ptr, wtname, &dummy, &dummy, wt, tmpname, tmpname, tmpname, status); if (*status > 0) { ffpmsg("illegal binning weight specification in URL:"); ffpmsg(binspec); if( file_expr ) free( file_expr ); return(*status); } /* creat a float datatype histogram by default, if weight */ /* factor is not = 1.0 */ if ( (defaulttype && *wt != 1.0) || (defaulttype && *wtname) ) *imagetype = TFLOAT; } while (*ptr == ' ') /* skip over blanks */ ptr++; if (*ptr != '\0') /* should have reached the end of string */ { ffpmsg("illegal syntax after binning weight specification in URL:"); ffpmsg(binspec); *status = URL_PARSE_ERROR; } if( file_expr ) free( file_expr ); return(*status); } /*--------------------------------------------------------------------------*/ int ffbinr(char **ptr, char *colname, double *minin, double *maxin, double *binsizein, char *minname, char *maxname, char *binname, int *status) /* Parse the input binning range specification string, returning the column name, histogram min and max values, and bin size. */ { int slen, isanumber; char token[FLEN_VALUE]; if (*status > 0) return(*status); slen = fits_get_token(ptr, " ,=:;", token, &isanumber); /* get 1st token */ if (slen == 0 && (**ptr == '\0' || **ptr == ',' || **ptr == ';') ) return(*status); /* a null range string */ if (!isanumber && **ptr != ':') { /* this looks like the column name */ if (token[0] == '#' && isdigit((int) token[1]) ) { /* omit the leading '#' in the column number */ strcpy(colname, token+1); } else strcpy(colname, token); while (**ptr == ' ') /* skip over blanks */ (*ptr)++; if (**ptr != '=') return(*status); /* reached the end */ (*ptr)++; /* skip over the = sign */ while (**ptr == ' ') /* skip over blanks */ (*ptr)++; slen = fits_get_token(ptr, " ,:;", token, &isanumber); /* get token */ } if (**ptr != ':') { /* this is the first token, and since it is not followed by */ /* a ':' this must be the binsize token */ if (!isanumber) strcpy(binname, token); else *binsizein = strtod(token, NULL); return(*status); /* reached the end */ } else { /* the token contains the min value */ if (slen) { if (!isanumber) strcpy(minname, token); else *minin = strtod(token, NULL); } } (*ptr)++; /* skip the colon between the min and max values */ slen = fits_get_token(ptr, " ,:;", token, &isanumber); /* get token */ /* the token contains the max value */ if (slen) { if (!isanumber) strcpy(maxname, token); else *maxin = strtod(token, NULL); } if (**ptr != ':') return(*status); /* reached the end; no binsize token */ (*ptr)++; /* skip the colon between the max and binsize values */ slen = fits_get_token(ptr, " ,:;", token, &isanumber); /* get token */ /* the token contains the binsize value */ if (slen) { if (!isanumber) strcpy(binname, token); else *binsizein = strtod(token, NULL); } return(*status); } /*--------------------------------------------------------------------------*/ int ffhist2(fitsfile **fptr, /* IO - pointer to table with X and Y cols; */ /* on output, points to histogram image */ char *outfile, /* I - name for the output histogram file */ int imagetype, /* I - datatype for image: TINT, TSHORT, etc */ int naxis, /* I - number of axes in the histogram image */ char colname[4][FLEN_VALUE], /* I - column names */ double *minin, /* I - minimum histogram value, for each axis */ double *maxin, /* I - maximum histogram value, for each axis */ double *binsizein, /* I - bin size along each axis */ char minname[4][FLEN_VALUE], /* I - optional keywords for min */ char maxname[4][FLEN_VALUE], /* I - optional keywords for max */ char binname[4][FLEN_VALUE], /* I - optional keywords for binsize */ double weightin, /* I - binning weighting factor */ char wtcol[FLEN_VALUE], /* I - optional keyword or col for weight*/ int recip, /* I - use reciprocal of the weight? */ char *selectrow, /* I - optional array (length = no. of */ /* rows in the table). If the element is true */ /* then the corresponding row of the table will*/ /* be included in the histogram, otherwise the */ /* row will be skipped. Ingnored if *selectrow*/ /* is equal to NULL. */ int *status) { fitsfile *histptr; int bitpix, colnum[4], wtcolnum; long haxes[4]; float amin[4], amax[4], binsize[4], weight; if (*status > 0) return(*status); if (naxis > 4) { ffpmsg("histogram has more than 4 dimensions"); return(*status = BAD_DIMEN); } /* reset position to the correct HDU if necessary */ if ((*fptr)->HDUposition != ((*fptr)->Fptr)->curhdu) ffmahd(*fptr, ((*fptr)->HDUposition) + 1, NULL, status); if (imagetype == TBYTE) bitpix = BYTE_IMG; else if (imagetype == TSHORT) bitpix = SHORT_IMG; else if (imagetype == TINT) bitpix = LONG_IMG; else if (imagetype == TFLOAT) bitpix = FLOAT_IMG; else if (imagetype == TDOUBLE) bitpix = DOUBLE_IMG; else return(*status = BAD_DATATYPE); /* Calculate the binning parameters: */ /* columm numbers, axes length, min values, max values, and binsizes. */ if (fits_calc_binning( *fptr, naxis, colname, minin, maxin, binsizein, minname, maxname, binname, colnum, haxes, amin, amax, binsize, status) > 0) { ffpmsg("failed to determine binning parameters"); return(*status); } /* get the histogramming weighting factor, if any */ if (*wtcol) { /* first, look for a keyword with the weight value */ if (ffgky(*fptr, TFLOAT, wtcol, &weight, NULL, status) ) { /* not a keyword, so look for column with this name */ *status = 0; /* get the column number in the table */ if (ffgcno(*fptr, CASEINSEN, wtcol, &wtcolnum, status) > 0) { ffpmsg( "keyword or column for histogram weights doesn't exist: "); ffpmsg(wtcol); return(*status); } weight = FLOATNULLVALUE; } } else weight = (float) weightin; if (weight <= 0. && weight != FLOATNULLVALUE) { ffpmsg("Illegal histogramming weighting factor <= 0."); return(*status = URL_PARSE_ERROR); } if (recip && weight != FLOATNULLVALUE) /* take reciprocal of weight */ weight = (float) (1.0 / weight); /* size of histogram is now known, so create temp output file */ if (fits_create_file(&histptr, outfile, status) > 0) { ffpmsg("failed to create temp output file for histogram"); return(*status); } /* create output FITS image HDU */ if (ffcrim(histptr, bitpix, naxis, haxes, status) > 0) { ffpmsg("failed to create output histogram FITS image"); return(*status); } /* copy header keywords, converting pixel list WCS keywords to image WCS form */ if (fits_copy_pixlist2image(*fptr, histptr, 9, naxis, colnum, status) > 0) { ffpmsg("failed to copy pixel list keywords to new histogram header"); return(*status); } /* if the table columns have no WCS keywords, then write default keywords */ fits_write_keys_histo(*fptr, histptr, naxis, colnum, status); /* update the WCS keywords for the ref. pixel location, and pixel size */ fits_rebin_wcs(histptr, naxis, amin, binsize, status); /* now compute the output image by binning the column values */ if (fits_make_hist(*fptr, histptr, bitpix, naxis, haxes, colnum, amin, amax, binsize, weight, wtcolnum, recip, selectrow, status) > 0) { ffpmsg("failed to calculate new histogram values"); return(*status); } /* finally, close the original file and return ptr to the new image */ ffclos(*fptr, status); *fptr = histptr; return(*status); } /*--------------------------------------------------------------------------*/ int ffhist(fitsfile **fptr, /* IO - pointer to table with X and Y cols; */ /* on output, points to histogram image */ char *outfile, /* I - name for the output histogram file */ int imagetype, /* I - datatype for image: TINT, TSHORT, etc */ int naxis, /* I - number of axes in the histogram image */ char colname[4][FLEN_VALUE], /* I - column names */ double *minin, /* I - minimum histogram value, for each axis */ double *maxin, /* I - maximum histogram value, for each axis */ double *binsizein, /* I - bin size along each axis */ char minname[4][FLEN_VALUE], /* I - optional keywords for min */ char maxname[4][FLEN_VALUE], /* I - optional keywords for max */ char binname[4][FLEN_VALUE], /* I - optional keywords for binsize */ double weightin, /* I - binning weighting factor */ char wtcol[FLEN_VALUE], /* I - optional keyword or col for weight*/ int recip, /* I - use reciprocal of the weight? */ char *selectrow, /* I - optional array (length = no. of */ /* rows in the table). If the element is true */ /* then the corresponding row of the table will*/ /* be included in the histogram, otherwise the */ /* row will be skipped. Ingnored if *selectrow*/ /* is equal to NULL. */ int *status) { int ii, datatype, repeat, imin, imax, ibin, bitpix, tstatus, use_datamax = 0; long haxes[4]; fitsfile *histptr; char errmsg[FLEN_ERRMSG], keyname[FLEN_KEYWORD], card[FLEN_CARD]; tcolumn *colptr; iteratorCol imagepars[1]; int n_cols = 1, nkeys; long offset = 0; long n_per_loop = -1; /* force whole array to be passed at one time */ histType histData; /* Structure holding histogram info for iterator */ float amin[4], amax[4], binsize[4], maxbin[4]; float datamin = FLOATNULLVALUE, datamax = FLOATNULLVALUE; char svalue[FLEN_VALUE]; double dvalue; char cpref[4][FLEN_VALUE]; char *cptr; if (*status > 0) return(*status); if (naxis > 4) { ffpmsg("histogram has more than 4 dimensions"); return(*status = BAD_DIMEN); } /* reset position to the correct HDU if necessary */ if ((*fptr)->HDUposition != ((*fptr)->Fptr)->curhdu) ffmahd(*fptr, ((*fptr)->HDUposition) + 1, NULL, status); histData.tblptr = *fptr; histData.himagetype = imagetype; histData.haxis = naxis; histData.rowselector = selectrow; if (imagetype == TBYTE) bitpix = BYTE_IMG; else if (imagetype == TSHORT) bitpix = SHORT_IMG; else if (imagetype == TINT) bitpix = LONG_IMG; else if (imagetype == TFLOAT) bitpix = FLOAT_IMG; else if (imagetype == TDOUBLE) bitpix = DOUBLE_IMG; else return(*status = BAD_DATATYPE); /* The CPREF keyword, if it exists, gives the preferred columns. */ /* Otherwise, assume "X", "Y", "Z", and "T" */ tstatus = 0; ffgky(*fptr, TSTRING, "CPREF", cpref[0], NULL, &tstatus); if (!tstatus) { /* Preferred column names are given; separate them */ cptr = cpref[0]; /* the first preferred axis... */ while (*cptr != ',' && *cptr != '\0') cptr++; if (*cptr != '\0') { *cptr = '\0'; cptr++; while (*cptr == ' ') cptr++; strcpy(cpref[1], cptr); cptr = cpref[1]; /* the second preferred axis... */ while (*cptr != ',' && *cptr != '\0') cptr++; if (*cptr != '\0') { *cptr = '\0'; cptr++; while (*cptr == ' ') cptr++; strcpy(cpref[2], cptr); cptr = cpref[2]; /* the third preferred axis... */ while (*cptr != ',' && *cptr != '\0') cptr++; if (*cptr != '\0') { *cptr = '\0'; cptr++; while (*cptr == ' ') cptr++; strcpy(cpref[3], cptr); } } } } for (ii = 0; ii < naxis; ii++) { /* get the min, max, and binsize values from keywords, if specified */ if (*minname[ii]) { if (ffgky(*fptr, TDOUBLE, minname[ii], &minin[ii], NULL, status) ) { ffpmsg("error reading histogramming minimum keyword"); ffpmsg(minname[ii]); return(*status); } } if (*maxname[ii]) { if (ffgky(*fptr, TDOUBLE, maxname[ii], &maxin[ii], NULL, status) ) { ffpmsg("error reading histogramming maximum keyword"); ffpmsg(maxname[ii]); return(*status); } } if (*binname[ii]) { if (ffgky(*fptr, TDOUBLE, binname[ii], &binsizein[ii], NULL, status) ) { ffpmsg("error reading histogramming binsize keyword"); ffpmsg(binname[ii]); return(*status); } } if (binsizein[ii] == 0.) { ffpmsg("error: histogram binsize = 0"); return(*status = ZERO_SCALE); } if (*colname[ii] == '\0') { strcpy(colname[ii], cpref[ii]); /* try using the preferred column */ if (*colname[ii] == '\0') { if (ii == 0) strcpy(colname[ii], "X"); else if (ii == 1) strcpy(colname[ii], "Y"); else if (ii == 2) strcpy(colname[ii], "Z"); else if (ii == 3) strcpy(colname[ii], "T"); } } /* get the column number in the table */ if (ffgcno(*fptr, CASEINSEN, colname[ii], histData.hcolnum+ii, status) > 0) { strcpy(errmsg, "column for histogram axis doesn't exist: "); strcat(errmsg, colname[ii]); ffpmsg(errmsg); return(*status); } colptr = ((*fptr)->Fptr)->tableptr; colptr += (histData.hcolnum[ii] - 1); repeat = (int) colptr->trepeat; /* vector repeat factor of the column */ if (repeat > 1) { strcpy(errmsg, "Can't bin a vector column: "); strcat(errmsg, colname[ii]); ffpmsg(errmsg); return(*status = BAD_DATATYPE); } /* get the datatype of the column */ fits_get_coltype(*fptr, histData.hcolnum[ii], &datatype, NULL, NULL, status); if (datatype < 0 || datatype == TSTRING) { strcpy(errmsg, "Inappropriate datatype; can't bin this column: "); strcat(errmsg, colname[ii]); ffpmsg(errmsg); return(*status = BAD_DATATYPE); } /* use TLMINn and TLMAXn keyword values if min and max were not given */ /* else use actual data min and max if TLMINn and TLMAXn don't exist */ if (minin[ii] == DOUBLENULLVALUE) { ffkeyn("TLMIN", histData.hcolnum[ii], keyname, status); if (ffgky(*fptr, TFLOAT, keyname, amin+ii, NULL, status) > 0) { /* use actual data minimum value for the histogram minimum */ *status = 0; if (fits_get_col_minmax(*fptr, histData.hcolnum[ii], amin+ii, &datamax, status) > 0) { strcpy(errmsg, "Error calculating datamin and datamax for column: "); strcat(errmsg, colname[ii]); ffpmsg(errmsg); return(*status); } } } else { amin[ii] = (float) minin[ii]; } if (maxin[ii] == DOUBLENULLVALUE) { ffkeyn("TLMAX", histData.hcolnum[ii], keyname, status); if (ffgky(*fptr, TFLOAT, keyname, &amax[ii], NULL, status) > 0) { *status = 0; if(datamax != FLOATNULLVALUE) /* already computed max value */ { amax[ii] = datamax; } else { /* use actual data maximum value for the histogram maximum */ if (fits_get_col_minmax(*fptr, histData.hcolnum[ii], &datamin, &amax[ii], status) > 0) { strcpy(errmsg, "Error calculating datamin and datamax for column: "); strcat(errmsg, colname[ii]); ffpmsg(errmsg); return(*status); } } } use_datamax = 1; /* flag that the max was determined by the data values */ /* and not specifically set by the calling program */ } else { amax[ii] = (float) maxin[ii]; } /* use TDBINn keyword or else 1 if bin size is not given */ if (binsizein[ii] == DOUBLENULLVALUE) { tstatus = 0; ffkeyn("TDBIN", histData.hcolnum[ii], keyname, &tstatus); if (ffgky(*fptr, TDOUBLE, keyname, binsizein + ii, NULL, &tstatus) > 0) { /* make at least 10 bins */ binsizein[ii] = (amax[ii] - amin[ii]) / 10. ; if (binsizein[ii] > 1.) binsizein[ii] = 1.; /* use default bin size */ } } if ( (amin[ii] > amax[ii] && binsizein[ii] > 0. ) || (amin[ii] < amax[ii] && binsizein[ii] < 0. ) ) binsize[ii] = (float) -binsizein[ii]; /* reverse the sign of binsize */ else binsize[ii] = (float) binsizein[ii]; /* binsize has the correct sign */ ibin = (int) binsize[ii]; imin = (int) amin[ii]; imax = (int) amax[ii]; /* Determine the range and number of bins in the histogram. This */ /* depends on whether the input columns are integer or floats, so */ /* treat each case separately. */ if (datatype <= TLONG && (float) imin == amin[ii] && (float) imax == amax[ii] && (float) ibin == binsize[ii] ) { /* This is an integer column and integer limits were entered. */ /* Shift the lower and upper histogramming limits by 0.5, so that */ /* the values fall in the center of the bin, not on the edge. */ haxes[ii] = (imax - imin) / ibin + 1; /* last bin may only */ /* be partially full */ maxbin[ii] = (float) (haxes[ii] + 1.); /* add 1. instead of .5 to avoid roundoff */ if (amin[ii] < amax[ii]) { amin[ii] = (float) (amin[ii] - 0.5); amax[ii] = (float) (amax[ii] + 0.5); } else { amin[ii] = (float) (amin[ii] + 0.5); amax[ii] = (float) (amax[ii] - 0.5); } } else if (use_datamax) { /* Either the column datatype and/or the limits are floating point, */ /* and the histogram limits are being defined by the min and max */ /* values of the array. Add 1 to the number of histogram bins to */ /* make sure that pixels that are equal to the maximum or are */ /* in the last partial bin are included. */ maxbin[ii] = (amax[ii] - amin[ii]) / binsize[ii]; haxes[ii] = (long) (maxbin[ii] + 1); } else { /* float datatype column and/or limits, and the maximum value to */ /* include in the histogram is specified by the calling program. */ /* The lower limit is inclusive, but upper limit is exclusive */ maxbin[ii] = (amax[ii] - amin[ii]) / binsize[ii]; haxes[ii] = (long) maxbin[ii]; if (amin[ii] < amax[ii]) { if (amin[ii] + (haxes[ii] * binsize[ii]) < amax[ii]) haxes[ii]++; /* need to include another partial bin */ } else { if (amin[ii] + (haxes[ii] * binsize[ii]) > amax[ii]) haxes[ii]++; /* need to include another partial bin */ } } } /* get the histogramming weighting factor */ if (*wtcol) { /* first, look for a keyword with the weight value */ if (ffgky(*fptr, TFLOAT, wtcol, &histData.weight, NULL, status) ) { /* not a keyword, so look for column with this name */ *status = 0; /* get the column number in the table */ if (ffgcno(*fptr, CASEINSEN, wtcol, &histData.wtcolnum, status) > 0) { ffpmsg( "keyword or column for histogram weights doesn't exist: "); ffpmsg(wtcol); return(*status); } histData.weight = FLOATNULLVALUE; } } else histData.weight = (float) weightin; if (histData.weight <= 0. && histData.weight != FLOATNULLVALUE) { ffpmsg("Illegal histogramming weighting factor <= 0."); return(*status = URL_PARSE_ERROR); } if (recip && histData.weight != FLOATNULLVALUE) /* take reciprocal of weight */ histData.weight = (float) (1.0 / histData.weight); histData.wtrecip = recip; /* size of histogram is now known, so create temp output file */ if (ffinit(&histptr, outfile, status) > 0) { ffpmsg("failed to create temp output file for histogram"); return(*status); } if (ffcrim(histptr, bitpix, histData.haxis, haxes, status) > 0) { ffpmsg("failed to create primary array histogram in temp file"); ffclos(histptr, status); return(*status); } /* copy all non-structural keywords from the table to the image */ fits_get_hdrspace(*fptr, &nkeys, NULL, status); for (ii = 1; ii <= nkeys; ii++) { fits_read_record(*fptr, ii, card, status); if (fits_get_keyclass(card) >= 120) fits_write_record(histptr, card, status); } /* Set global variables with histogram parameter values. */ /* Use separate scalar variables rather than arrays because */ /* it is more efficient when computing the histogram. */ histData.amin1 = amin[0]; histData.maxbin1 = maxbin[0]; histData.binsize1 = binsize[0]; histData.haxis1 = haxes[0]; if (histData.haxis > 1) { histData.amin2 = amin[1]; histData.maxbin2 = maxbin[1]; histData.binsize2 = binsize[1]; histData.haxis2 = haxes[1]; if (histData.haxis > 2) { histData.amin3 = amin[2]; histData.maxbin3 = maxbin[2]; histData.binsize3 = binsize[2]; histData.haxis3 = haxes[2]; if (histData.haxis > 3) { histData.amin4 = amin[3]; histData.maxbin4 = maxbin[3]; histData.binsize4 = binsize[3]; histData.haxis4 = haxes[3]; } } } /* define parameters of image for the iterator function */ fits_iter_set_file(imagepars, histptr); /* pointer to image */ fits_iter_set_datatype(imagepars, imagetype); /* image datatype */ fits_iter_set_iotype(imagepars, OutputCol); /* image is output */ /* call the iterator function to write out the histogram image */ if (fits_iterate_data(n_cols, imagepars, offset, n_per_loop, ffwritehisto, (void*)&histData, status) ) return(*status); /* write the World Coordinate System (WCS) keywords */ /* create default values if WCS keywords are not present in the table */ for (ii = 0; ii < histData.haxis; ii++) { /* CTYPEn */ tstatus = 0; ffkeyn("TCTYP", histData.hcolnum[ii], keyname, &tstatus); ffgky(*fptr, TSTRING, keyname, svalue, NULL, &tstatus); if (tstatus) { /* just use column name as the type */ tstatus = 0; ffkeyn("TTYPE", histData.hcolnum[ii], keyname, &tstatus); ffgky(*fptr, TSTRING, keyname, svalue, NULL, &tstatus); } if (!tstatus) { ffkeyn("CTYPE", ii + 1, keyname, &tstatus); ffpky(histptr, TSTRING, keyname, svalue, "Coordinate Type", &tstatus); } else tstatus = 0; /* CUNITn */ ffkeyn("TCUNI", histData.hcolnum[ii], keyname, &tstatus); ffgky(*fptr, TSTRING, keyname, svalue, NULL, &tstatus); if (tstatus) { /* use the column units */ tstatus = 0; ffkeyn("TUNIT", histData.hcolnum[ii], keyname, &tstatus); ffgky(*fptr, TSTRING, keyname, svalue, NULL, &tstatus); } if (!tstatus) { ffkeyn("CUNIT", ii + 1, keyname, &tstatus); ffpky(histptr, TSTRING, keyname, svalue, "Coordinate Units", &tstatus); } else tstatus = 0; /* CRPIXn - Reference Pixel */ ffkeyn("TCRPX", histData.hcolnum[ii], keyname, &tstatus); ffgky(*fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); if (tstatus) { dvalue = 1.0; /* choose first pixel in new image as ref. pix. */ tstatus = 0; } else { /* calculate locate of the ref. pix. in the new image */ dvalue = (dvalue - amin[ii]) / binsize[ii] + .5; } ffkeyn("CRPIX", ii + 1, keyname, &tstatus); ffpky(histptr, TDOUBLE, keyname, &dvalue, "Reference Pixel", &tstatus); /* CRVALn - Value at the location of the reference pixel */ ffkeyn("TCRVL", histData.hcolnum[ii], keyname, &tstatus); ffgky(*fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); if (tstatus) { /* calculate value at ref. pix. location (at center of 1st pixel) */ dvalue = amin[ii] + binsize[ii]/2.; tstatus = 0; } ffkeyn("CRVAL", ii + 1, keyname, &tstatus); ffpky(histptr, TDOUBLE, keyname, &dvalue, "Reference Value", &tstatus); /* CDELTn - unit size of pixels */ ffkeyn("TCDLT", histData.hcolnum[ii], keyname, &tstatus); ffgky(*fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); if (tstatus) { dvalue = 1.0; /* use default pixel size */ tstatus = 0; } dvalue = dvalue * binsize[ii]; ffkeyn("CDELT", ii + 1, keyname, &tstatus); ffpky(histptr, TDOUBLE, keyname, &dvalue, "Pixel size", &tstatus); /* CROTAn - Rotation angle (degrees CCW) */ /* There should only be a CROTA2 keyword, and only for 2+ D images */ if (ii == 1) { ffkeyn("TCROT", histData.hcolnum[ii], keyname, &tstatus); ffgky(*fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); if (!tstatus && dvalue != 0.) /* only write keyword if angle != 0 */ { ffkeyn("CROTA", ii + 1, keyname, &tstatus); ffpky(histptr, TDOUBLE, keyname, &dvalue, "Rotation angle", &tstatus); } else { /* didn't find CROTA for the 2nd axis, so look for one */ /* on the first axis */ tstatus = 0; ffkeyn("TCROT", histData.hcolnum[0], keyname, &tstatus); ffgky(*fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); if (!tstatus && dvalue != 0.) /* only write keyword if angle != 0 */ { dvalue *= -1.; /* negate the value, because mirror image */ ffkeyn("CROTA", ii + 1, keyname, &tstatus); ffpky(histptr, TDOUBLE, keyname, &dvalue, "Rotation angle", &tstatus); } } } } /* convert any TPn_k keywords to PCi_j; the value remains unchanged */ /* also convert any TCn_k to CDi_j; the value is modified by n binning size */ /* This is a bit of a kludge, and only works for 2D WCS */ if (histData.haxis == 2) { /* PC1_1 */ tstatus = 0; ffkeyn("TP", histData.hcolnum[0], card, &tstatus); strcat(card,"_"); ffkeyn(card, histData.hcolnum[0], keyname, &tstatus); ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); if (!tstatus) ffpky(histptr, TDOUBLE, "PC1_1", &dvalue, card, &tstatus); tstatus = 0; keyname[1] = 'C'; ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); if (!tstatus) { dvalue *= binsize[0]; ffpky(histptr, TDOUBLE, "CD1_1", &dvalue, card, &tstatus); } /* PC1_2 */ tstatus = 0; ffkeyn("TP", histData.hcolnum[0], card, &tstatus); strcat(card,"_"); ffkeyn(card, histData.hcolnum[1], keyname, &tstatus); ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); if (!tstatus) ffpky(histptr, TDOUBLE, "PC1_2", &dvalue, card, &tstatus); tstatus = 0; keyname[1] = 'C'; ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); if (!tstatus) { dvalue *= binsize[0]; ffpky(histptr, TDOUBLE, "CD1_2", &dvalue, card, &tstatus); } /* PC2_1 */ tstatus = 0; ffkeyn("TP", histData.hcolnum[1], card, &tstatus); strcat(card,"_"); ffkeyn(card, histData.hcolnum[0], keyname, &tstatus); ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); if (!tstatus) ffpky(histptr, TDOUBLE, "PC2_1", &dvalue, card, &tstatus); tstatus = 0; keyname[1] = 'C'; ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); if (!tstatus) { dvalue *= binsize[1]; ffpky(histptr, TDOUBLE, "CD2_1", &dvalue, card, &tstatus); } /* PC2_2 */ tstatus = 0; ffkeyn("TP", histData.hcolnum[1], card, &tstatus); strcat(card,"_"); ffkeyn(card, histData.hcolnum[1], keyname, &tstatus); ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); if (!tstatus) ffpky(histptr, TDOUBLE, "PC2_2", &dvalue, card, &tstatus); tstatus = 0; keyname[1] = 'C'; ffgky(*fptr, TDOUBLE, keyname, &dvalue, card, &tstatus); if (!tstatus) { dvalue *= binsize[1]; ffpky(histptr, TDOUBLE, "CD2_2", &dvalue, card, &tstatus); } } /* finally, close the original file and return ptr to the new image */ ffclos(*fptr, status); *fptr = histptr; return(*status); } /*--------------------------------------------------------------------------*/ int fits_calc_binning( fitsfile *fptr, /* IO - pointer to table to be binned ; */ int naxis, /* I - number of axes/columns in the binned image */ char colname[4][FLEN_VALUE], /* I - optional column names */ double *minin, /* I - optional lower bound value for each axis */ double *maxin, /* I - optional upper bound value, for each axis */ double *binsizein, /* I - optional bin size along each axis */ char minname[4][FLEN_VALUE], /* I - optional keywords for min */ char maxname[4][FLEN_VALUE], /* I - optional keywords for max */ char binname[4][FLEN_VALUE], /* I - optional keywords for binsize */ /* The returned parameters for each axis of the n-dimensional histogram are */ int *colnum, /* O - column numbers, to be binned */ long *haxes, /* O - number of bins in each histogram axis */ float *amin, /* O - lower bound of the histogram axes */ float *amax, /* O - upper bound of the histogram axes */ float *binsize, /* O - width of histogram bins/pixels on each axis */ int *status) /*_ Calculate the actual binning parameters, based on various user input options. */ { tcolumn *colptr; char *cptr, cpref[4][FLEN_VALUE]; char errmsg[FLEN_ERRMSG], keyname[FLEN_KEYWORD]; int tstatus, ii; int datatype, repeat, imin, imax, ibin, use_datamax = 0; float datamin, datamax; /* check inputs */ if (*status > 0) return(*status); if (naxis > 4) { ffpmsg("histograms with more than 4 dimensions are not supported"); return(*status = BAD_DIMEN); } /* reset position to the correct HDU if necessary */ if ((fptr)->HDUposition != ((fptr)->Fptr)->curhdu) ffmahd(fptr, ((fptr)->HDUposition) + 1, NULL, status); /* ============================================================= */ /* The CPREF keyword, if it exists, gives the preferred columns. */ /* Otherwise, assume "X", "Y", "Z", and "T" */ *cpref[0] = '\0'; *cpref[1] = '\0'; *cpref[2] = '\0'; *cpref[3] = '\0'; tstatus = 0; ffgky(fptr, TSTRING, "CPREF", cpref[0], NULL, &tstatus); if (!tstatus) { /* Preferred column names are given; separate them */ cptr = cpref[0]; /* the first preferred axis... */ while (*cptr != ',' && *cptr != '\0') cptr++; if (*cptr != '\0') { *cptr = '\0'; cptr++; while (*cptr == ' ') cptr++; strcpy(cpref[1], cptr); cptr = cpref[1]; /* the second preferred axis... */ while (*cptr != ',' && *cptr != '\0') cptr++; if (*cptr != '\0') { *cptr = '\0'; cptr++; while (*cptr == ' ') cptr++; strcpy(cpref[2], cptr); cptr = cpref[2]; /* the third preferred axis... */ while (*cptr != ',' && *cptr != '\0') cptr++; if (*cptr != '\0') { *cptr = '\0'; cptr++; while (*cptr == ' ') cptr++; strcpy(cpref[3], cptr); } } } } /* ============================================================= */ /* Main Loop for calculating parameters for each column */ for (ii = 0; ii < naxis; ii++) { /* =========================================================== */ /* Determine column Number, based on, in order of priority, 1 input column name, or 2 name given by CPREF keyword, or 3 assume X, Y, Z and T for the name */ if (*colname[ii] == '\0') { strcpy(colname[ii], cpref[ii]); /* try using the preferred column */ if (*colname[ii] == '\0') { if (ii == 0) strcpy(colname[ii], "X"); else if (ii == 1) strcpy(colname[ii], "Y"); else if (ii == 2) strcpy(colname[ii], "Z"); else if (ii == 3) strcpy(colname[ii], "T"); } } /* get the column number in the table */ if (ffgcno(fptr, CASEINSEN, colname[ii], colnum+ii, status) > 0) { strcpy(errmsg, "column for histogram axis doesn't exist: "); strcat(errmsg, colname[ii]); ffpmsg(errmsg); return(*status); } /* ================================================================ */ /* check tha column is not a vector or a string */ colptr = ((fptr)->Fptr)->tableptr; colptr += (colnum[ii] - 1); repeat = (int) colptr->trepeat; /* vector repeat factor of the column */ if (repeat > 1) { strcpy(errmsg, "Can't bin a vector column: "); strcat(errmsg, colname[ii]); ffpmsg(errmsg); return(*status = BAD_DATATYPE); } /* get the datatype of the column */ fits_get_coltype(fptr, colnum[ii], &datatype, NULL, NULL, status); if (datatype < 0 || datatype == TSTRING) { strcpy(errmsg, "Inappropriate datatype; can't bin this column: "); strcat(errmsg, colname[ii]); ffpmsg(errmsg); return(*status = BAD_DATATYPE); } /* ================================================================ */ /* get the minimum value */ datamin = FLOATNULLVALUE; datamax = FLOATNULLVALUE; if (*minname[ii]) { if (ffgky(fptr, TDOUBLE, minname[ii], &minin[ii], NULL, status) ) { ffpmsg("error reading histogramming minimum keyword"); ffpmsg(minname[ii]); return(*status); } } if (minin[ii] != DOUBLENULLVALUE) { amin[ii] = (float) minin[ii]; } else { ffkeyn("TLMIN", colnum[ii], keyname, status); if (ffgky(fptr, TFLOAT, keyname, amin+ii, NULL, status) > 0) { /* use actual data minimum value for the histogram minimum */ *status = 0; if (fits_get_col_minmax(fptr, colnum[ii], amin+ii, &datamax, status) > 0) { strcpy(errmsg, "Error calculating datamin and datamax for column: "); strcat(errmsg, colname[ii]); ffpmsg(errmsg); return(*status); } } } /* ================================================================ */ /* get the maximum value */ if (*maxname[ii]) { if (ffgky(fptr, TDOUBLE, maxname[ii], &maxin[ii], NULL, status) ) { ffpmsg("error reading histogramming maximum keyword"); ffpmsg(maxname[ii]); return(*status); } } if (maxin[ii] != DOUBLENULLVALUE) { amax[ii] = (float) maxin[ii]; } else { ffkeyn("TLMAX", colnum[ii], keyname, status); if (ffgky(fptr, TFLOAT, keyname, &amax[ii], NULL, status) > 0) { *status = 0; if(datamax != FLOATNULLVALUE) /* already computed max value */ { amax[ii] = datamax; } else { /* use actual data maximum value for the histogram maximum */ if (fits_get_col_minmax(fptr, colnum[ii], &datamin, &amax[ii], status) > 0) { strcpy(errmsg, "Error calculating datamin and datamax for column: "); strcat(errmsg, colname[ii]); ffpmsg(errmsg); return(*status); } } } use_datamax = 1; /* flag that the max was determined by the data values */ /* and not specifically set by the calling program */ } /* ================================================================ */ /* determine binning size and range */ if (*binname[ii]) { if (ffgky(fptr, TDOUBLE, binname[ii], &binsizein[ii], NULL, status) ) { ffpmsg("error reading histogramming binsize keyword"); ffpmsg(binname[ii]); return(*status); } } if (binsizein[ii] == 0.) { ffpmsg("error: histogram binsize = 0"); return(*status = ZERO_SCALE); } /* use TDBINn keyword or else 1 if bin size is not given */ if (binsizein[ii] != DOUBLENULLVALUE) { binsize[ii] = (float) binsizein[ii]; } else { tstatus = 0; ffkeyn("TDBIN", colnum[ii], keyname, &tstatus); if (ffgky(fptr, TDOUBLE, keyname, binsizein + ii, NULL, &tstatus) > 0) { /* make at least 10 bins */ binsize[ii] = (amax[ii] - amin[ii]) / 10.F ; if (binsize[ii] > 1.) binsize[ii] = 1.; /* use default bin size */ } } /* ================================================================ */ /* if the min is greater than the max, make the binsize negative */ if ( (amin[ii] > amax[ii] && binsize[ii] > 0. ) || (amin[ii] < amax[ii] && binsize[ii] < 0. ) ) binsize[ii] = -binsize[ii]; /* reverse the sign of binsize */ ibin = (int) binsize[ii]; imin = (int) amin[ii]; imax = (int) amax[ii]; /* Determine the range and number of bins in the histogram. This */ /* depends on whether the input columns are integer or floats, so */ /* treat each case separately. */ if (datatype <= TLONG && (float) imin == amin[ii] && (float) imax == amax[ii] && (float) ibin == binsize[ii] ) { /* This is an integer column and integer limits were entered. */ /* Shift the lower and upper histogramming limits by 0.5, so that */ /* the values fall in the center of the bin, not on the edge. */ haxes[ii] = (imax - imin) / ibin + 1; /* last bin may only */ /* be partially full */ if (amin[ii] < amax[ii]) { amin[ii] = (float) (amin[ii] - 0.5); amax[ii] = (float) (amax[ii] + 0.5); } else { amin[ii] = (float) (amin[ii] + 0.5); amax[ii] = (float) (amax[ii] - 0.5); } } else if (use_datamax) { /* Either the column datatype and/or the limits are floating point, */ /* and the histogram limits are being defined by the min and max */ /* values of the array. Add 1 to the number of histogram bins to */ /* make sure that pixels that are equal to the maximum or are */ /* in the last partial bin are included. */ haxes[ii] = (long) (((amax[ii] - amin[ii]) / binsize[ii]) + 1.); } else { /* float datatype column and/or limits, and the maximum value to */ /* include in the histogram is specified by the calling program. */ /* The lower limit is inclusive, but upper limit is exclusive */ haxes[ii] = (long) ((amax[ii] - amin[ii]) / binsize[ii]); if (amin[ii] < amax[ii]) { if (amin[ii] + (haxes[ii] * binsize[ii]) < amax[ii]) haxes[ii]++; /* need to include another partial bin */ } else { if (amin[ii] + (haxes[ii] * binsize[ii]) > amax[ii]) haxes[ii]++; /* need to include another partial bin */ } } } return(*status); } /*--------------------------------------------------------------------------*/ int fits_write_keys_histo( fitsfile *fptr, /* I - pointer to table to be binned */ fitsfile *histptr, /* I - pointer to output histogram image HDU */ int naxis, /* I - number of axes in the histogram image */ int *colnum, /* I - column numbers (array length = naxis) */ int *status) { /* Write default WCS keywords in the output histogram image header */ /* if the keywords do not already exist. */ int ii, tstatus; char keyname[FLEN_KEYWORD], svalue[FLEN_VALUE]; double dvalue; if (*status > 0) return(*status); for (ii = 0; ii < naxis; ii++) { /* CTYPEn */ tstatus = 0; ffkeyn("CTYPE", ii+1, keyname, &tstatus); ffgky(histptr, TSTRING, keyname, svalue, NULL, &tstatus); if (!tstatus) continue; /* keyword already exists, so skip to next axis */ /* use column name as the axis name */ tstatus = 0; ffkeyn("TTYPE", colnum[ii], keyname, &tstatus); ffgky(fptr, TSTRING, keyname, svalue, NULL, &tstatus); if (!tstatus) { ffkeyn("CTYPE", ii + 1, keyname, &tstatus); ffpky(histptr, TSTRING, keyname, svalue, "Coordinate Type", &tstatus); } /* CUNITn, use the column units */ tstatus = 0; ffkeyn("TUNIT", colnum[ii], keyname, &tstatus); ffgky(fptr, TSTRING, keyname, svalue, NULL, &tstatus); if (!tstatus) { ffkeyn("CUNIT", ii + 1, keyname, &tstatus); ffpky(histptr, TSTRING, keyname, svalue, "Coordinate Units", &tstatus); } /* CRPIXn - Reference Pixel choose first pixel in new image as ref. pix. */ dvalue = 1.0; tstatus = 0; ffkeyn("CRPIX", ii + 1, keyname, &tstatus); ffpky(histptr, TDOUBLE, keyname, &dvalue, "Reference Pixel", &tstatus); /* CRVALn - Value at the location of the reference pixel */ dvalue = 1.0; tstatus = 0; ffkeyn("CRVAL", ii + 1, keyname, &tstatus); ffpky(histptr, TDOUBLE, keyname, &dvalue, "Reference Value", &tstatus); /* CDELTn - unit size of pixels */ dvalue = 1.0; tstatus = 0; dvalue = 1.; ffkeyn("CDELT", ii + 1, keyname, &tstatus); ffpky(histptr, TDOUBLE, keyname, &dvalue, "Pixel size", &tstatus); } return(*status); } /*--------------------------------------------------------------------------*/ int fits_rebin_wcs( fitsfile *fptr, /* I - pointer to table to be binned */ int naxis, /* I - number of axes in the histogram image */ float *amin, /* I - first pixel include in each axis */ float *binsize, /* I - binning factor for each axis */ int *status) { /* Update the WCS keywords that define the location of the reference */ /* pixel, and the pixel size, along each axis. */ int ii, jj, tstatus, reset ; char keyname[FLEN_KEYWORD], svalue[FLEN_VALUE]; double dvalue; if (*status > 0) return(*status); for (ii = 0; ii < naxis; ii++) { reset = 0; /* flag to reset the reference pixel */ tstatus = 0; ffkeyn("CRVAL", ii + 1, keyname, &tstatus); /* get previous (pre-binning) value */ ffgky(fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); if (!tstatus && dvalue == 1.0) reset = 1; tstatus = 0; /* CRPIXn - update location of the ref. pix. in the binned image */ ffkeyn("CRPIX", ii + 1, keyname, &tstatus); /* get previous (pre-binning) value */ ffgky(fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); if (!tstatus) { if (dvalue != 1.0) reset = 0; /* updated value to give pixel location after binning */ dvalue = (dvalue - amin[ii]) / ((double) binsize[ii]) + .5; fits_modify_key_dbl(fptr, keyname, dvalue, -14, NULL, &tstatus); } else { reset = 0; } /* CDELTn - update unit size of pixels */ tstatus = 0; ffkeyn("CDELT", ii + 1, keyname, &tstatus); /* get previous (pre-binning) value */ ffgky(fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); if (!tstatus) { if (dvalue != 1.0) reset = 0; /* updated to give post-binning value */ dvalue = dvalue * binsize[ii]; fits_modify_key_dbl(fptr, keyname, dvalue, -14, NULL, &tstatus); } else { /* no CDELTn keyword, so look for a CDij keywords */ reset = 0; for (jj = 0; jj < naxis; jj++) { tstatus = 0; ffkeyn("CD", jj + 1, svalue, &tstatus); strcat(svalue,"_"); ffkeyn(svalue, ii + 1, keyname, &tstatus); /* get previous (pre-binning) value */ ffgky(fptr, TDOUBLE, keyname, &dvalue, NULL, &tstatus); if (!tstatus) { /* updated to give post-binning value */ dvalue = dvalue * binsize[ii]; fits_modify_key_dbl(fptr, keyname, dvalue, -14, NULL, &tstatus); } } } if (reset) { /* the original CRPIX, CRVAL, and CDELT keywords were all = 1.0 */ /* In this special case, reset the reference pixel to be the */ /* first pixel in the array (instead of possibly far off the array) */ dvalue = 1.0; ffkeyn("CRPIX", ii + 1, keyname, &tstatus); fits_modify_key_dbl(fptr, keyname, dvalue, -14, NULL, &tstatus); ffkeyn("CRVAL", ii + 1, keyname, &tstatus); dvalue = amin[ii] + (binsize[ii] / 2.0); fits_modify_key_dbl(fptr, keyname, dvalue, -14, NULL, &tstatus); } } return(*status); } /*--------------------------------------------------------------------------*/ int fits_make_hist(fitsfile *fptr, /* IO - pointer to table with X and Y cols; */ fitsfile *histptr, /* I - pointer to output FITS image */ int bitpix, /* I - datatype for image: 16, 32, -32, etc */ int naxis, /* I - number of axes in the histogram image */ long *naxes, /* I - size of axes in the histogram image */ int *colnum, /* I - column numbers (array length = naxis) */ float *amin, /* I - minimum histogram value, for each axis */ float *amax, /* I - maximum histogram value, for each axis */ float *binsize, /* I - bin size along each axis */ float weight, /* I - binning weighting factor */ int wtcolnum, /* I - optional keyword or col for weight*/ int recip, /* I - use reciprocal of the weight? */ char *selectrow, /* I - optional array (length = no. of */ /* rows in the table). If the element is true */ /* then the corresponding row of the table will*/ /* be included in the histogram, otherwise the */ /* row will be skipped. Ingnored if *selectrow*/ /* is equal to NULL. */ int *status) { int ii, imagetype, datatype; int n_cols = 1; long imin, imax, ibin; long offset = 0; long n_per_loop = -1; /* force whole array to be passed at one time */ float taxes[4], tmin[4], tmax[4], tbin[4], maxbin[4]; histType histData; /* Structure holding histogram info for iterator */ iteratorCol imagepars[1]; /* check inputs */ if (*status > 0) return(*status); if (naxis > 4) { ffpmsg("histogram has more than 4 dimensions"); return(*status = BAD_DIMEN); } if (bitpix == BYTE_IMG) imagetype = TBYTE; else if (bitpix == SHORT_IMG) imagetype = TSHORT; else if (bitpix == LONG_IMG) imagetype = TINT; else if (bitpix == FLOAT_IMG) imagetype = TFLOAT; else if (bitpix == DOUBLE_IMG) imagetype = TDOUBLE; else return(*status = BAD_DATATYPE); /* reset position to the correct HDU if necessary */ if ((fptr)->HDUposition != ((fptr)->Fptr)->curhdu) ffmahd(fptr, ((fptr)->HDUposition) + 1, NULL, status); histData.weight = weight; histData.wtcolnum = wtcolnum; histData.wtrecip = recip; histData.tblptr = fptr; histData.himagetype = imagetype; histData.haxis = naxis; histData.rowselector = selectrow; for (ii = 0; ii < naxis; ii++) { taxes[ii] = (float) naxes[ii]; tmin[ii] = amin[ii]; tmax[ii] = amax[ii]; if ( (amin[ii] > amax[ii] && binsize[ii] > 0. ) || (amin[ii] < amax[ii] && binsize[ii] < 0. ) ) tbin[ii] = -binsize[ii]; /* reverse the sign of binsize */ else tbin[ii] = binsize[ii]; /* binsize has the correct sign */ imin = (long) tmin[ii]; imax = (long) tmax[ii]; ibin = (long) tbin[ii]; /* get the datatype of the column */ fits_get_coltype(fptr, colnum[ii], &datatype, NULL, NULL, status); if (datatype <= TLONG && (float) imin == tmin[ii] && (float) imax == tmax[ii] && (float) ibin == tbin[ii] ) { /* This is an integer column and integer limits were entered. */ /* Shift the lower and upper histogramming limits by 0.5, so that */ /* the values fall in the center of the bin, not on the edge. */ maxbin[ii] = (taxes[ii] + 1.F); /* add 1. instead of .5 to avoid roundoff */ if (tmin[ii] < tmax[ii]) { tmin[ii] = tmin[ii] - 0.5F; tmax[ii] = tmax[ii] + 0.5F; } else { tmin[ii] = tmin[ii] + 0.5F; tmax[ii] = tmax[ii] - 0.5F; } } else { /* not an integer column with integer limits */ maxbin[ii] = (tmax[ii] - tmin[ii]) / tbin[ii]; } } /* Set global variables with histogram parameter values. */ /* Use separate scalar variables rather than arrays because */ /* it is more efficient when computing the histogram. */ histData.hcolnum[0] = colnum[0]; histData.amin1 = tmin[0]; histData.maxbin1 = maxbin[0]; histData.binsize1 = tbin[0]; histData.haxis1 = (long) taxes[0]; if (histData.haxis > 1) { histData.hcolnum[1] = colnum[1]; histData.amin2 = tmin[1]; histData.maxbin2 = maxbin[1]; histData.binsize2 = tbin[1]; histData.haxis2 = (long) taxes[1]; if (histData.haxis > 2) { histData.hcolnum[2] = colnum[2]; histData.amin3 = tmin[2]; histData.maxbin3 = maxbin[2]; histData.binsize3 = tbin[2]; histData.haxis3 = (long) taxes[2]; if (histData.haxis > 3) { histData.hcolnum[3] = colnum[3]; histData.amin4 = tmin[3]; histData.maxbin4 = maxbin[3]; histData.binsize4 = tbin[3]; histData.haxis4 = (long) taxes[3]; } } } /* define parameters of image for the iterator function */ fits_iter_set_file(imagepars, histptr); /* pointer to image */ fits_iter_set_datatype(imagepars, imagetype); /* image datatype */ fits_iter_set_iotype(imagepars, OutputCol); /* image is output */ /* call the iterator function to write out the histogram image */ fits_iterate_data(n_cols, imagepars, offset, n_per_loop, ffwritehisto, (void*)&histData, status); return(*status); } /*--------------------------------------------------------------------------*/ int fits_get_col_minmax(fitsfile *fptr, int colnum, float *datamin, float *datamax, int *status) /* Simple utility routine to compute the min and max value in a column */ { int anynul; long nrows, ntodo, firstrow, ii; float array[1000], nulval; ffgky(fptr, TLONG, "NAXIS2", &nrows, NULL, status); /* no. of rows */ firstrow = 1; nulval = FLOATNULLVALUE; *datamin = 9.0E36F; *datamax = -9.0E36F; while(nrows) { ntodo = minvalue(nrows, 100); ffgcv(fptr, TFLOAT, colnum, firstrow, 1, ntodo, &nulval, array, &anynul, status); for (ii = 0; ii < ntodo; ii++) { if (array[ii] != nulval) { *datamin = minvalue(*datamin, array[ii]); *datamax = maxvalue(*datamax, array[ii]); } } nrows -= ntodo; firstrow += ntodo; } return(*status); } /*--------------------------------------------------------------------------*/ int ffwritehisto(long totaln, long pixoffset, long firstn, long nvalues, int narrays, iteratorCol *imagepars, void *userPointer) /* Interator work function that writes out the histogram. The histogram values are calculated by another work function, ffcalchisto. This work function only gets called once, and totaln = nvalues. */ { iteratorCol colpars[5]; int ii, status = 0, ncols; long rows_per_loop = 0, offset = 0; histType *histData; histData = (histType *)userPointer; /* store pointer to the histogram array, and initialize to zero */ switch( histData->himagetype ) { case TBYTE: histData->hist.b = (char * ) fits_iter_get_array(imagepars); break; case TSHORT: histData->hist.i = (short * ) fits_iter_get_array(imagepars); break; case TINT: histData->hist.j = (int * ) fits_iter_get_array(imagepars); break; case TFLOAT: histData->hist.r = (float * ) fits_iter_get_array(imagepars); break; case TDOUBLE: histData->hist.d = (double *) fits_iter_get_array(imagepars); break; } /* set the column parameters for the iterator function */ for (ii = 0; ii < histData->haxis; ii++) { fits_iter_set_by_num(&colpars[ii], histData->tblptr, histData->hcolnum[ii], TFLOAT, InputCol); } ncols = histData->haxis; if (histData->weight == FLOATNULLVALUE) { fits_iter_set_by_num(&colpars[histData->haxis], histData->tblptr, histData->wtcolnum, TFLOAT, InputCol); ncols = histData->haxis + 1; } /* call iterator function to calc the histogram pixel values */ /* must lock this call in multithreaded environoments because */ /* the ffcalchist work routine uses static vaiables that would */ /* get clobbered if multiple threads were running at the same time */ FFLOCK; fits_iterate_data(ncols, colpars, offset, rows_per_loop, ffcalchist, (void*)histData, &status); FFUNLOCK; return(status); } /*--------------------------------------------------------------------------*/ int ffcalchist(long totalrows, long offset, long firstrow, long nrows, int ncols, iteratorCol *colpars, void *userPointer) /* Interator work function that calculates values for the 2D histogram. */ { long ii, ipix, iaxisbin; float pix, axisbin; static float *col1, *col2, *col3, *col4; /* static to preserve values */ static float *wtcol; static long incr2, incr3, incr4; static histType histData; static char *rowselect; /* Initialization procedures: execute on the first call */ if (firstrow == 1) { /* Copy input histogram data to static local variable so we */ /* don't have to constantly dereference it. */ histData = *(histType*)userPointer; rowselect = histData.rowselector; /* assign the input array pointers to local pointers */ col1 = (float *) fits_iter_get_array(&colpars[0]); if (histData.haxis > 1) { col2 = (float *) fits_iter_get_array(&colpars[1]); incr2 = histData.haxis1; if (histData.haxis > 2) { col3 = (float *) fits_iter_get_array(&colpars[2]); incr3 = incr2 * histData.haxis2; if (histData.haxis > 3) { col4 = (float *) fits_iter_get_array(&colpars[3]); incr4 = incr3 * histData.haxis3; } } } if (ncols > histData.haxis) /* then weights are give in a column */ { wtcol = (float *) fits_iter_get_array(&colpars[histData.haxis]); } } /* end of Initialization procedures */ /* Main loop: increment the histogram at position of each event */ for (ii = 1; ii <= nrows; ii++) { if (rowselect) /* if a row selector array is supplied... */ { if (*rowselect) { rowselect++; /* this row is included in the histogram */ } else { rowselect++; /* this row is excluded from the histogram */ continue; } } if (col1[ii] == FLOATNULLVALUE) /* test for null value */ continue; pix = (col1[ii] - histData.amin1) / histData.binsize1; ipix = (long) (pix + 1.); /* add 1 because the 1st pixel is the null value */ /* test if bin is within range */ if (ipix < 1 || ipix > histData.haxis1 || pix > histData.maxbin1) continue; if (histData.haxis > 1) { if (col2[ii] == FLOATNULLVALUE) continue; axisbin = (col2[ii] - histData.amin2) / histData.binsize2; iaxisbin = (long) axisbin; if (axisbin < 0. || iaxisbin >= histData.haxis2 || axisbin > histData.maxbin2) continue; ipix += (iaxisbin * incr2); if (histData.haxis > 2) { if (col3[ii] == FLOATNULLVALUE) continue; axisbin = (col3[ii] - histData.amin3) / histData.binsize3; iaxisbin = (long) axisbin; if (axisbin < 0. || iaxisbin >= histData.haxis3 || axisbin > histData.maxbin3) continue; ipix += (iaxisbin * incr3); if (histData.haxis > 3) { if (col4[ii] == FLOATNULLVALUE) continue; axisbin = (col4[ii] - histData.amin4) / histData.binsize4; iaxisbin = (long) axisbin; if (axisbin < 0. || iaxisbin >= histData.haxis4 || axisbin > histData.maxbin4) continue; ipix += (iaxisbin * incr4); } /* end of haxis > 3 case */ } /* end of haxis > 2 case */ } /* end of haxis > 1 case */ /* increment the histogram pixel */ if (histData.weight != FLOATNULLVALUE) /* constant weight factor */ { if (histData.himagetype == TINT) histData.hist.j[ipix] += (int) histData.weight; else if (histData.himagetype == TSHORT) histData.hist.i[ipix] += (short) histData.weight; else if (histData.himagetype == TFLOAT) histData.hist.r[ipix] += histData.weight; else if (histData.himagetype == TDOUBLE) histData.hist.d[ipix] += histData.weight; else if (histData.himagetype == TBYTE) histData.hist.b[ipix] += (char) histData.weight; } else if (histData.wtrecip) /* use reciprocal of the weight */ { if (histData.himagetype == TINT) histData.hist.j[ipix] += (int) (1./wtcol[ii]); else if (histData.himagetype == TSHORT) histData.hist.i[ipix] += (short) (1./wtcol[ii]); else if (histData.himagetype == TFLOAT) histData.hist.r[ipix] += (float) (1./wtcol[ii]); else if (histData.himagetype == TDOUBLE) histData.hist.d[ipix] += 1./wtcol[ii]; else if (histData.himagetype == TBYTE) histData.hist.b[ipix] += (char) (1./wtcol[ii]); } else /* no weights */ { if (histData.himagetype == TINT) histData.hist.j[ipix] += (int) wtcol[ii]; else if (histData.himagetype == TSHORT) histData.hist.i[ipix] += (short) wtcol[ii]; else if (histData.himagetype == TFLOAT) histData.hist.r[ipix] += wtcol[ii]; else if (histData.himagetype == TDOUBLE) histData.hist.d[ipix] += wtcol[ii]; else if (histData.himagetype == TBYTE) histData.hist.b[ipix] += (char) wtcol[ii]; } } /* end of main loop over all rows */ return(0); } astropy-1.1.1/cextern/cfitsio/longnam.h0000644001134200020070000005010012602615520021026 0ustar embrayscience00000000000000#ifndef _LONGNAME_H #define _LONGNAME_H #define fits_parse_input_url ffiurl #define fits_parse_input_filename ffifile #define fits_parse_rootname ffrtnm #define fits_file_exists ffexist #define fits_parse_output_url ffourl #define fits_parse_extspec ffexts #define fits_parse_extnum ffextn #define fits_parse_binspec ffbins #define fits_parse_binrange ffbinr #define fits_parse_range ffrwrg #define fits_parse_rangell ffrwrgll #define fits_open_memfile ffomem /* use the following special macro to test that the fitsio.h include file that was used to build the CFITSIO library is compatible with the version as included when compiling the application program */ #define fits_open_file(A, B, C, D) ffopentest( CFITSIO_SONAME, A, B, C, D) #define fits_open_data ffdopn #define fits_open_table fftopn #define fits_open_image ffiopn #define fits_open_diskfile ffdkopn #define fits_reopen_file ffreopen #define fits_create_file ffinit #define fits_create_diskfile ffdkinit #define fits_create_memfile ffimem #define fits_create_template fftplt #define fits_flush_file ffflus #define fits_flush_buffer ffflsh #define fits_close_file ffclos #define fits_delete_file ffdelt #define fits_file_name ffflnm #define fits_file_mode ffflmd #define fits_url_type ffurlt #define fits_get_version ffvers #define fits_uppercase ffupch #define fits_get_errstatus ffgerr #define fits_write_errmsg ffpmsg #define fits_write_errmark ffpmrk #define fits_read_errmsg ffgmsg #define fits_clear_errmsg ffcmsg #define fits_clear_errmark ffcmrk #define fits_report_error ffrprt #define fits_compare_str ffcmps #define fits_test_keyword fftkey #define fits_test_record fftrec #define fits_null_check ffnchk #define fits_make_keyn ffkeyn #define fits_make_nkey ffnkey #define fits_make_key ffmkky #define fits_get_keyclass ffgkcl #define fits_get_keytype ffdtyp #define fits_get_inttype ffinttyp #define fits_parse_value ffpsvc #define fits_get_keyname ffgknm #define fits_parse_template ffgthd #define fits_ascii_tform ffasfm #define fits_binary_tform ffbnfm #define fits_binary_tformll ffbnfmll #define fits_get_tbcol ffgabc #define fits_get_rowsize ffgrsz #define fits_get_col_display_width ffgcdw #define fits_write_record ffprec #define fits_write_key ffpky #define fits_write_key_unit ffpunt #define fits_write_comment ffpcom #define fits_write_history ffphis #define fits_write_date ffpdat #define fits_get_system_time ffgstm #define fits_get_system_date ffgsdt #define fits_date2str ffdt2s #define fits_time2str fftm2s #define fits_str2date ffs2dt #define fits_str2time ffs2tm #define fits_write_key_longstr ffpkls #define fits_write_key_longwarn ffplsw #define fits_write_key_null ffpkyu #define fits_write_key_str ffpkys #define fits_write_key_log ffpkyl #define fits_write_key_lng ffpkyj #define fits_write_key_fixflt ffpkyf #define fits_write_key_flt ffpkye #define fits_write_key_fixdbl ffpkyg #define fits_write_key_dbl ffpkyd #define fits_write_key_fixcmp ffpkfc #define fits_write_key_cmp ffpkyc #define fits_write_key_fixdblcmp ffpkfm #define fits_write_key_dblcmp ffpkym #define fits_write_key_triple ffpkyt #define fits_write_tdim ffptdm #define fits_write_tdimll ffptdmll #define fits_write_keys_str ffpkns #define fits_write_keys_log ffpknl #define fits_write_keys_lng ffpknj #define fits_write_keys_fixflt ffpknf #define fits_write_keys_flt ffpkne #define fits_write_keys_fixdbl ffpkng #define fits_write_keys_dbl ffpknd #define fits_copy_key ffcpky #define fits_write_imghdr ffphps #define fits_write_imghdrll ffphpsll #define fits_write_grphdr ffphpr #define fits_write_grphdrll ffphprll #define fits_write_atblhdr ffphtb #define fits_write_btblhdr ffphbn #define fits_write_exthdr ffphext #define fits_write_key_template ffpktp #define fits_get_hdrspace ffghsp #define fits_get_hdrpos ffghps #define fits_movabs_key ffmaky #define fits_movrel_key ffmrky #define fits_find_nextkey ffgnxk #define fits_read_record ffgrec #define fits_read_card ffgcrd #define fits_read_str ffgstr #define fits_read_key_unit ffgunt #define fits_read_keyn ffgkyn #define fits_read_key ffgky #define fits_read_keyword ffgkey #define fits_read_key_str ffgkys #define fits_read_key_log ffgkyl #define fits_read_key_lng ffgkyj #define fits_read_key_lnglng ffgkyjj #define fits_read_key_flt ffgkye #define fits_read_key_dbl ffgkyd #define fits_read_key_cmp ffgkyc #define fits_read_key_dblcmp ffgkym #define fits_read_key_triple ffgkyt #define fits_read_key_longstr ffgkls #define fits_free_memory fffree #define fits_read_tdim ffgtdm #define fits_read_tdimll ffgtdmll #define fits_decode_tdim ffdtdm #define fits_decode_tdimll ffdtdmll #define fits_read_keys_str ffgkns #define fits_read_keys_log ffgknl #define fits_read_keys_lng ffgknj #define fits_read_keys_lnglng ffgknjj #define fits_read_keys_flt ffgkne #define fits_read_keys_dbl ffgknd #define fits_read_imghdr ffghpr #define fits_read_imghdrll ffghprll #define fits_read_atblhdr ffghtb #define fits_read_btblhdr ffghbn #define fits_read_atblhdrll ffghtbll #define fits_read_btblhdrll ffghbnll #define fits_hdr2str ffhdr2str #define fits_convert_hdr2str ffcnvthdr2str #define fits_update_card ffucrd #define fits_update_key ffuky #define fits_update_key_null ffukyu #define fits_update_key_str ffukys #define fits_update_key_longstr ffukls #define fits_update_key_log ffukyl #define fits_update_key_lng ffukyj #define fits_update_key_fixflt ffukyf #define fits_update_key_flt ffukye #define fits_update_key_fixdbl ffukyg #define fits_update_key_dbl ffukyd #define fits_update_key_fixcmp ffukfc #define fits_update_key_cmp ffukyc #define fits_update_key_fixdblcmp ffukfm #define fits_update_key_dblcmp ffukym #define fits_modify_record ffmrec #define fits_modify_card ffmcrd #define fits_modify_name ffmnam #define fits_modify_comment ffmcom #define fits_modify_key_null ffmkyu #define fits_modify_key_str ffmkys #define fits_modify_key_longstr ffmkls #define fits_modify_key_log ffmkyl #define fits_modify_key_lng ffmkyj #define fits_modify_key_fixflt ffmkyf #define fits_modify_key_flt ffmkye #define fits_modify_key_fixdbl ffmkyg #define fits_modify_key_dbl ffmkyd #define fits_modify_key_fixcmp ffmkfc #define fits_modify_key_cmp ffmkyc #define fits_modify_key_fixdblcmp ffmkfm #define fits_modify_key_dblcmp ffmkym #define fits_insert_record ffirec #define fits_insert_card ffikey #define fits_insert_key_null ffikyu #define fits_insert_key_str ffikys #define fits_insert_key_longstr ffikls #define fits_insert_key_log ffikyl #define fits_insert_key_lng ffikyj #define fits_insert_key_fixflt ffikyf #define fits_insert_key_flt ffikye #define fits_insert_key_fixdbl ffikyg #define fits_insert_key_dbl ffikyd #define fits_insert_key_fixcmp ffikfc #define fits_insert_key_cmp ffikyc #define fits_insert_key_fixdblcmp ffikfm #define fits_insert_key_dblcmp ffikym #define fits_delete_key ffdkey #define fits_delete_str ffdstr #define fits_delete_record ffdrec #define fits_get_hdu_num ffghdn #define fits_get_hdu_type ffghdt #define fits_get_hduaddr ffghad #define fits_get_hduaddrll ffghadll #define fits_get_hduoff ffghof #define fits_get_img_param ffgipr #define fits_get_img_paramll ffgiprll #define fits_get_img_type ffgidt #define fits_get_img_equivtype ffgiet #define fits_get_img_dim ffgidm #define fits_get_img_size ffgisz #define fits_get_img_sizell ffgiszll #define fits_movabs_hdu ffmahd #define fits_movrel_hdu ffmrhd #define fits_movnam_hdu ffmnhd #define fits_get_num_hdus ffthdu #define fits_create_img ffcrim #define fits_create_imgll ffcrimll #define fits_create_tbl ffcrtb #define fits_create_hdu ffcrhd #define fits_insert_img ffiimg #define fits_insert_imgll ffiimgll #define fits_insert_atbl ffitab #define fits_insert_btbl ffibin #define fits_resize_img ffrsim #define fits_resize_imgll ffrsimll #define fits_delete_hdu ffdhdu #define fits_copy_hdu ffcopy #define fits_copy_file ffcpfl #define fits_copy_header ffcphd #define fits_copy_data ffcpdt #define fits_write_hdu ffwrhdu #define fits_set_hdustruc ffrdef #define fits_set_hdrsize ffhdef #define fits_write_theap ffpthp #define fits_encode_chksum ffesum #define fits_decode_chksum ffdsum #define fits_write_chksum ffpcks #define fits_update_chksum ffupck #define fits_verify_chksum ffvcks #define fits_get_chksum ffgcks #define fits_set_bscale ffpscl #define fits_set_tscale fftscl #define fits_set_imgnull ffpnul #define fits_set_btblnull fftnul #define fits_set_atblnull ffsnul #define fits_get_colnum ffgcno #define fits_get_colname ffgcnn #define fits_get_coltype ffgtcl #define fits_get_coltypell ffgtclll #define fits_get_eqcoltype ffeqty #define fits_get_eqcoltypell ffeqtyll #define fits_get_num_rows ffgnrw #define fits_get_num_rowsll ffgnrwll #define fits_get_num_cols ffgncl #define fits_get_acolparms ffgacl #define fits_get_bcolparms ffgbcl #define fits_get_bcolparmsll ffgbclll #define fits_iterate_data ffiter #define fits_read_grppar_byt ffggpb #define fits_read_grppar_sbyt ffggpsb #define fits_read_grppar_usht ffggpui #define fits_read_grppar_ulng ffggpuj #define fits_read_grppar_sht ffggpi #define fits_read_grppar_lng ffggpj #define fits_read_grppar_lnglng ffggpjj #define fits_read_grppar_int ffggpk #define fits_read_grppar_uint ffggpuk #define fits_read_grppar_flt ffggpe #define fits_read_grppar_dbl ffggpd #define fits_read_pix ffgpxv #define fits_read_pixll ffgpxvll #define fits_read_pixnull ffgpxf #define fits_read_pixnullll ffgpxfll #define fits_read_img ffgpv #define fits_read_imgnull ffgpf #define fits_read_img_byt ffgpvb #define fits_read_img_sbyt ffgpvsb #define fits_read_img_usht ffgpvui #define fits_read_img_ulng ffgpvuj #define fits_read_img_sht ffgpvi #define fits_read_img_lng ffgpvj #define fits_read_img_lnglng ffgpvjj #define fits_read_img_uint ffgpvuk #define fits_read_img_int ffgpvk #define fits_read_img_flt ffgpve #define fits_read_img_dbl ffgpvd #define fits_read_imgnull_byt ffgpfb #define fits_read_imgnull_sbyt ffgpfsb #define fits_read_imgnull_usht ffgpfui #define fits_read_imgnull_ulng ffgpfuj #define fits_read_imgnull_sht ffgpfi #define fits_read_imgnull_lng ffgpfj #define fits_read_imgnull_lnglng ffgpfjj #define fits_read_imgnull_uint ffgpfuk #define fits_read_imgnull_int ffgpfk #define fits_read_imgnull_flt ffgpfe #define fits_read_imgnull_dbl ffgpfd #define fits_read_2d_byt ffg2db #define fits_read_2d_sbyt ffg2dsb #define fits_read_2d_usht ffg2dui #define fits_read_2d_ulng ffg2duj #define fits_read_2d_sht ffg2di #define fits_read_2d_lng ffg2dj #define fits_read_2d_lnglng ffg2djj #define fits_read_2d_uint ffg2duk #define fits_read_2d_int ffg2dk #define fits_read_2d_flt ffg2de #define fits_read_2d_dbl ffg2dd #define fits_read_3d_byt ffg3db #define fits_read_3d_sbyt ffg3dsb #define fits_read_3d_usht ffg3dui #define fits_read_3d_ulng ffg3duj #define fits_read_3d_sht ffg3di #define fits_read_3d_lng ffg3dj #define fits_read_3d_lnglng ffg3djj #define fits_read_3d_uint ffg3duk #define fits_read_3d_int ffg3dk #define fits_read_3d_flt ffg3de #define fits_read_3d_dbl ffg3dd #define fits_read_subset ffgsv #define fits_read_subset_byt ffgsvb #define fits_read_subset_sbyt ffgsvsb #define fits_read_subset_usht ffgsvui #define fits_read_subset_ulng ffgsvuj #define fits_read_subset_sht ffgsvi #define fits_read_subset_lng ffgsvj #define fits_read_subset_lnglng ffgsvjj #define fits_read_subset_uint ffgsvuk #define fits_read_subset_int ffgsvk #define fits_read_subset_flt ffgsve #define fits_read_subset_dbl ffgsvd #define fits_read_subsetnull_byt ffgsfb #define fits_read_subsetnull_sbyt ffgsfsb #define fits_read_subsetnull_usht ffgsfui #define fits_read_subsetnull_ulng ffgsfuj #define fits_read_subsetnull_sht ffgsfi #define fits_read_subsetnull_lng ffgsfj #define fits_read_subsetnull_lnglng ffgsfjj #define fits_read_subsetnull_uint ffgsfuk #define fits_read_subsetnull_int ffgsfk #define fits_read_subsetnull_flt ffgsfe #define fits_read_subsetnull_dbl ffgsfd #define ffcpimg fits_copy_image_section #define fits_compress_img fits_comp_img #define fits_decompress_img fits_decomp_img #define fits_read_col ffgcv #define fits_read_colnull ffgcf #define fits_read_col_str ffgcvs #define fits_read_col_log ffgcvl #define fits_read_col_byt ffgcvb #define fits_read_col_sbyt ffgcvsb #define fits_read_col_usht ffgcvui #define fits_read_col_ulng ffgcvuj #define fits_read_col_sht ffgcvi #define fits_read_col_lng ffgcvj #define fits_read_col_lnglng ffgcvjj #define fits_read_col_uint ffgcvuk #define fits_read_col_int ffgcvk #define fits_read_col_flt ffgcve #define fits_read_col_dbl ffgcvd #define fits_read_col_cmp ffgcvc #define fits_read_col_dblcmp ffgcvm #define fits_read_col_bit ffgcx #define fits_read_col_bit_usht ffgcxui #define fits_read_col_bit_uint ffgcxuk #define fits_read_colnull_str ffgcfs #define fits_read_colnull_log ffgcfl #define fits_read_colnull_byt ffgcfb #define fits_read_colnull_sbyt ffgcfsb #define fits_read_colnull_usht ffgcfui #define fits_read_colnull_ulng ffgcfuj #define fits_read_colnull_sht ffgcfi #define fits_read_colnull_lng ffgcfj #define fits_read_colnull_lnglng ffgcfjj #define fits_read_colnull_uint ffgcfuk #define fits_read_colnull_int ffgcfk #define fits_read_colnull_flt ffgcfe #define fits_read_colnull_dbl ffgcfd #define fits_read_colnull_cmp ffgcfc #define fits_read_colnull_dblcmp ffgcfm #define fits_read_descript ffgdes #define fits_read_descriptll ffgdesll #define fits_read_descripts ffgdess #define fits_read_descriptsll ffgdessll #define fits_read_tblbytes ffgtbb #define fits_write_grppar_byt ffpgpb #define fits_write_grppar_sbyt ffpgpsb #define fits_write_grppar_usht ffpgpui #define fits_write_grppar_ulng ffpgpuj #define fits_write_grppar_sht ffpgpi #define fits_write_grppar_lng ffpgpj #define fits_write_grppar_lnglng ffpgpjj #define fits_write_grppar_uint ffpgpuk #define fits_write_grppar_int ffpgpk #define fits_write_grppar_flt ffpgpe #define fits_write_grppar_dbl ffpgpd #define fits_write_pix ffppx #define fits_write_pixll ffppxll #define fits_write_pixnull ffppxn #define fits_write_pixnullll ffppxnll #define fits_write_img ffppr #define fits_write_img_byt ffpprb #define fits_write_img_sbyt ffpprsb #define fits_write_img_usht ffpprui #define fits_write_img_ulng ffppruj #define fits_write_img_sht ffppri #define fits_write_img_lng ffpprj #define fits_write_img_lnglng ffpprjj #define fits_write_img_uint ffppruk #define fits_write_img_int ffpprk #define fits_write_img_flt ffppre #define fits_write_img_dbl ffpprd #define fits_write_imgnull ffppn #define fits_write_imgnull_byt ffppnb #define fits_write_imgnull_sbyt ffppnsb #define fits_write_imgnull_usht ffppnui #define fits_write_imgnull_ulng ffppnuj #define fits_write_imgnull_sht ffppni #define fits_write_imgnull_lng ffppnj #define fits_write_imgnull_lnglng ffppnjj #define fits_write_imgnull_uint ffppnuk #define fits_write_imgnull_int ffppnk #define fits_write_imgnull_flt ffppne #define fits_write_imgnull_dbl ffppnd #define fits_write_img_null ffppru #define fits_write_null_img ffpprn #define fits_write_2d_byt ffp2db #define fits_write_2d_sbyt ffp2dsb #define fits_write_2d_usht ffp2dui #define fits_write_2d_ulng ffp2duj #define fits_write_2d_sht ffp2di #define fits_write_2d_lng ffp2dj #define fits_write_2d_lnglng ffp2djj #define fits_write_2d_uint ffp2duk #define fits_write_2d_int ffp2dk #define fits_write_2d_flt ffp2de #define fits_write_2d_dbl ffp2dd #define fits_write_3d_byt ffp3db #define fits_write_3d_sbyt ffp3dsb #define fits_write_3d_usht ffp3dui #define fits_write_3d_ulng ffp3duj #define fits_write_3d_sht ffp3di #define fits_write_3d_lng ffp3dj #define fits_write_3d_lnglng ffp3djj #define fits_write_3d_uint ffp3duk #define fits_write_3d_int ffp3dk #define fits_write_3d_flt ffp3de #define fits_write_3d_dbl ffp3dd #define fits_write_subset ffpss #define fits_write_subset_byt ffpssb #define fits_write_subset_sbyt ffpsssb #define fits_write_subset_usht ffpssui #define fits_write_subset_ulng ffpssuj #define fits_write_subset_sht ffpssi #define fits_write_subset_lng ffpssj #define fits_write_subset_lnglng ffpssjj #define fits_write_subset_uint ffpssuk #define fits_write_subset_int ffpssk #define fits_write_subset_flt ffpsse #define fits_write_subset_dbl ffpssd #define fits_write_col ffpcl #define fits_write_col_str ffpcls #define fits_write_col_log ffpcll #define fits_write_col_byt ffpclb #define fits_write_col_sbyt ffpclsb #define fits_write_col_usht ffpclui #define fits_write_col_ulng ffpcluj #define fits_write_col_sht ffpcli #define fits_write_col_lng ffpclj #define fits_write_col_lnglng ffpcljj #define fits_write_col_uint ffpcluk #define fits_write_col_int ffpclk #define fits_write_col_flt ffpcle #define fits_write_col_dbl ffpcld #define fits_write_col_cmp ffpclc #define fits_write_col_dblcmp ffpclm #define fits_write_col_null ffpclu #define fits_write_col_bit ffpclx #define fits_write_nulrows ffprwu #define fits_write_nullrows ffprwu #define fits_write_colnull ffpcn #define fits_write_colnull_str ffpcns #define fits_write_colnull_log ffpcnl #define fits_write_colnull_byt ffpcnb #define fits_write_colnull_sbyt ffpcnsb #define fits_write_colnull_usht ffpcnui #define fits_write_colnull_ulng ffpcnuj #define fits_write_colnull_sht ffpcni #define fits_write_colnull_lng ffpcnj #define fits_write_colnull_lnglng ffpcnjj #define fits_write_colnull_uint ffpcnuk #define fits_write_colnull_int ffpcnk #define fits_write_colnull_flt ffpcne #define fits_write_colnull_dbl ffpcnd #define fits_write_ext ffpextn #define fits_read_ext ffgextn #define fits_write_descript ffpdes #define fits_compress_heap ffcmph #define fits_test_heap fftheap #define fits_write_tblbytes ffptbb #define fits_insert_rows ffirow #define fits_delete_rows ffdrow #define fits_delete_rowrange ffdrrg #define fits_delete_rowlist ffdrws #define fits_delete_rowlistll ffdrwsll #define fits_insert_col fficol #define fits_insert_cols fficls #define fits_delete_col ffdcol #define fits_copy_col ffcpcl #define fits_copy_rows ffcprw #define fits_modify_vector_len ffmvec #define fits_read_img_coord ffgics #define fits_read_img_coord_version ffgicsa #define fits_read_tbl_coord ffgtcs #define fits_pix_to_world ffwldp #define fits_world_to_pix ffxypx #define fits_get_image_wcs_keys ffgiwcs #define fits_get_table_wcs_keys ffgtwcs #define fits_find_rows fffrow #define fits_find_first_row ffffrw #define fits_find_rows_cmp fffrwc #define fits_select_rows ffsrow #define fits_calc_rows ffcrow #define fits_calculator ffcalc #define fits_calculator_rng ffcalc_rng #define fits_test_expr fftexp #define fits_create_group ffgtcr #define fits_insert_group ffgtis #define fits_change_group ffgtch #define fits_remove_group ffgtrm #define fits_copy_group ffgtcp #define fits_merge_groups ffgtmg #define fits_compact_group ffgtcm #define fits_verify_group ffgtvf #define fits_open_group ffgtop #define fits_add_group_member ffgtam #define fits_get_num_members ffgtnm #define fits_get_num_groups ffgmng #define fits_open_member ffgmop #define fits_copy_member ffgmcp #define fits_transfer_member ffgmtf #define fits_remove_member ffgmrm #endif astropy-1.1.1/cextern/cfitsio/eval_f.c0000644001134200020070000030057712602615520020642 0ustar embrayscience00000000000000/************************************************************************/ /* */ /* CFITSIO Lexical Parser */ /* */ /* This file is one of 3 files containing code which parses an */ /* arithmetic expression and evaluates it in the context of an input */ /* FITS file table extension. The CFITSIO lexical parser is divided */ /* into the following 3 parts/files: the CFITSIO "front-end", */ /* eval_f.c, contains the interface between the user/CFITSIO and the */ /* real core of the parser; the FLEX interpreter, eval_l.c, takes the */ /* input string and parses it into tokens and identifies the FITS */ /* information required to evaluate the expression (ie, keywords and */ /* columns); and, the BISON grammar and evaluation routines, eval_y.c, */ /* receives the FLEX output and determines and performs the actual */ /* operations. The files eval_l.c and eval_y.c are produced from */ /* running flex and bison on the files eval.l and eval.y, respectively. */ /* (flex and bison are available from any GNU archive: see www.gnu.org) */ /* */ /* The grammar rules, rather than evaluating the expression in situ, */ /* builds a tree, or Nodal, structure mapping out the order of */ /* operations and expression dependencies. This "compilation" process */ /* allows for much faster processing of multiple rows. This technique */ /* was developed by Uwe Lammers of the XMM Science Analysis System, */ /* although the CFITSIO implementation is entirely code original. */ /* */ /* */ /* Modification History: */ /* */ /* Kent Blackburn c1992 Original parser code developed for the */ /* FTOOLS software package, in particular, */ /* the fselect task. */ /* Kent Blackburn c1995 BIT column support added */ /* Peter D Wilson Feb 1998 Vector column support added */ /* Peter D Wilson May 1998 Ported to CFITSIO library. User */ /* interface routines written, in essence */ /* making fselect, fcalc, and maketime */ /* capabilities available to all tools */ /* via single function calls. */ /* Peter D Wilson Jun 1998 Major rewrite of parser core, so as to */ /* create a run-time evaluation tree, */ /* inspired by the work of Uwe Lammers, */ /* resulting in a speed increase of */ /* 10-100 times. */ /* Peter D Wilson Jul 1998 gtifilter(a,b,c,d) function added */ /* Peter D Wilson Aug 1998 regfilter(a,b,c,d) function added */ /* Peter D Wilson Jul 1999 Make parser fitsfile-independent, */ /* allowing a purely vector-based usage */ /* Peter D Wilson Aug 1999 Add row-offset capability */ /* Peter D Wilson Sep 1999 Add row-range capability to ffcalc_rng */ /* */ /************************************************************************/ #include #include #include "eval_defs.h" #include "region.h" typedef struct { int datatype; /* Data type to cast parse results into for user */ void *dataPtr; /* Pointer to array of results, NULL if to use iterCol */ void *nullPtr; /* Pointer to nulval, use zero if NULL */ long maxRows; /* Max No. of rows to process, -1=all, 0=1 iteration */ int anyNull; /* Flag indicating at least 1 undef value encountered */ } parseInfo; /* Internal routines needed to allow the evaluator to operate on FITS data */ static void Setup_DataArrays( int nCols, iteratorCol *cols, long fRow, long nRows ); static int find_column( char *colName, void *itslval ); static int find_keywd ( char *key, void *itslval ); static int allocateCol( int nCol, int *status ); static int load_column( int varNum, long fRow, long nRows, void *data, char *undef ); static int DEBUG_PIXFILTER; #define FREE(x) { if (x) free(x); else printf("invalid free(" #x ") at %s:%d\n", __FILE__, __LINE__); } /*---------------------------------------------------------------------------*/ int fffrow( fitsfile *fptr, /* I - Input FITS file */ char *expr, /* I - Boolean expression */ long firstrow, /* I - First row of table to eval */ long nrows, /* I - Number of rows to evaluate */ long *n_good_rows, /* O - Number of rows eval to True */ char *row_status, /* O - Array of boolean results */ int *status ) /* O - Error status */ /* */ /* Evaluate a boolean expression using the indicated rows, returning an */ /* array of flags indicating which rows evaluated to TRUE/FALSE */ /*---------------------------------------------------------------------------*/ { parseInfo Info; int naxis, constant; long nelem, naxes[MAXDIMS], elem; char result; if( *status ) return( *status ); FFLOCK; if( ffiprs( fptr, 0, expr, MAXDIMS, &Info.datatype, &nelem, &naxis, naxes, status ) ) { ffcprs(); FFUNLOCK; return( *status ); } if( nelem<0 ) { constant = 1; nelem = -nelem; } else constant = 0; if( Info.datatype!=TLOGICAL || nelem!=1 ) { ffcprs(); ffpmsg("Expression does not evaluate to a logical scalar."); FFUNLOCK; return( *status = PARSE_BAD_TYPE ); } if( constant ) { /* No need to call parser... have result from ffiprs */ result = gParse.Nodes[gParse.resultNode].value.data.log; *n_good_rows = nrows; for( elem=0; elem1 ? firstrow : 1); Info.dataPtr = row_status; Info.nullPtr = NULL; Info.maxRows = nrows; if( ffiter( gParse.nCols, gParse.colData, firstrow-1, 0, parse_data, (void*)&Info, status ) == -1 ) *status = 0; /* -1 indicates exitted without error before end... OK */ if( *status ) { /***********************/ /* Error... Do nothing */ /***********************/ } else { /***********************************/ /* Count number of good rows found */ /***********************************/ *n_good_rows = 0L; for( elem=0; elemHDUposition != (infptr->Fptr)->curhdu ) ffmahd( infptr, (infptr->HDUposition) + 1, NULL, status ); if( *status ) { ffcprs(); FFUNLOCK; return( *status ); } inExt.rowLength = (long) (infptr->Fptr)->rowlength; inExt.numRows = (infptr->Fptr)->numrows; inExt.heapSize = (infptr->Fptr)->heapsize; if( inExt.numRows == 0 ) { /* Nothing to copy */ ffcprs(); FFUNLOCK; return( *status ); } if( outfptr->HDUposition != (outfptr->Fptr)->curhdu ) ffmahd( outfptr, (outfptr->HDUposition) + 1, NULL, status ); if( (outfptr->Fptr)->datastart < 0 ) ffrdef( outfptr, status ); if( *status ) { ffcprs(); FFUNLOCK; return( *status ); } outExt.rowLength = (long) (outfptr->Fptr)->rowlength; outExt.numRows = (outfptr->Fptr)->numrows; if( !outExt.numRows ) (outfptr->Fptr)->heapsize = 0L; outExt.heapSize = (outfptr->Fptr)->heapsize; if( inExt.rowLength != outExt.rowLength ) { ffpmsg("Output table has different row length from input"); ffcprs(); FFUNLOCK; return( *status = PARSE_BAD_OUTPUT ); } /***********************************/ /* Fill out Info data for parser */ /***********************************/ Info.dataPtr = (char *)malloc( (size_t) ((inExt.numRows + 1) * sizeof(char)) ); Info.nullPtr = NULL; Info.maxRows = (long) inExt.numRows; if( !Info.dataPtr ) { ffpmsg("Unable to allocate memory for row selection"); ffcprs(); FFUNLOCK; return( *status = MEMORY_ALLOCATION ); } /* make sure array is zero terminated */ ((char*)Info.dataPtr)[inExt.numRows] = 0; if( constant ) { /* Set all rows to the same value from constant result */ result = gParse.Nodes[gParse.resultNode].value.data.log; for( ntodo = 0; ntodo 1) ffirow( outfptr, outExt.numRows, nGood, status ); } do { if( ((char*)Info.dataPtr)[inloc-1] ) { ffgtbb( infptr, inloc, 1L, rdlen, buffer+rdlen*nbuff, status ); nbuff++; if( nbuff==maxrows ) { ffptbb( outfptr, outloc, 1L, rdlen*nbuff, buffer, status ); outloc += nbuff; nbuff = 0; } } inloc++; } while( !*status && inloc<=inExt.numRows ); if( nbuff ) { ffptbb( outfptr, outloc, 1L, rdlen*nbuff, buffer, status ); outloc += nbuff; } if( infptr==outfptr ) { if( outloc<=inExt.numRows ) ffdrow( infptr, outloc, inExt.numRows-outloc+1, status ); } else if( inExt.heapSize && nGood ) { /* Copy heap, if it exists and at least one row copied */ /********************************************************/ /* Get location information from the output extension */ /********************************************************/ if( outfptr->HDUposition != (outfptr->Fptr)->curhdu ) ffmahd( outfptr, (outfptr->HDUposition) + 1, NULL, status ); outExt.dataStart = (outfptr->Fptr)->datastart; outExt.heapStart = (outfptr->Fptr)->heapstart; /*************************************************/ /* Insert more space into outfptr if necessary */ /*************************************************/ hsize = outExt.heapStart + outExt.heapSize; freespace = (long) (( ( (hsize + 2879) / 2880) * 2880) - hsize); ntodo = inExt.heapSize; if ( (freespace - ntodo) < 0) { /* not enough existing space? */ ntodo = (ntodo - freespace + 2879) / 2880; /* number of blocks */ ffiblk(outfptr, (long) ntodo, 1, status); /* insert the blocks */ } ffukyj( outfptr, "PCOUNT", inExt.heapSize+outExt.heapSize, NULL, status ); /*******************************************************/ /* Get location information from the input extension */ /*******************************************************/ if( infptr->HDUposition != (infptr->Fptr)->curhdu ) ffmahd( infptr, (infptr->HDUposition) + 1, NULL, status ); inExt.dataStart = (infptr->Fptr)->datastart; inExt.heapStart = (infptr->Fptr)->heapstart; /**********************************/ /* Finally copy heap to outfptr */ /**********************************/ ntodo = inExt.heapSize; inbyteloc = inExt.heapStart + inExt.dataStart; outbyteloc = outExt.heapStart + outExt.dataStart + outExt.heapSize; while ( ntodo && !*status ) { rdlen = (long) minvalue(ntodo,500000); ffmbyt( infptr, inbyteloc, REPORT_EOF, status ); ffgbyt( infptr, rdlen, buffer, status ); ffmbyt( outfptr, outbyteloc, IGNORE_EOF, status ); ffpbyt( outfptr, rdlen, buffer, status ); inbyteloc += rdlen; outbyteloc += rdlen; ntodo -= rdlen; } /***********************************************************/ /* But must update DES if data is being appended to a */ /* pre-existing heap space. Edit each new entry in file */ /***********************************************************/ if( outExt.heapSize ) { LONGLONG repeat, offset, j; int i; for( i=1; i<=(outfptr->Fptr)->tfield; i++ ) { if( (outfptr->Fptr)->tableptr[i-1].tdatatype<0 ) { for( j=outExt.numRows+1; j<=outExt.numRows+nGood; j++ ) { ffgdesll( outfptr, i, j, &repeat, &offset, status ); offset += outExt.heapSize; ffpdes( outfptr, i, j, repeat, offset, status ); } } } } } /* End of HEAP copy */ FREE(buffer); } FREE(Info.dataPtr); ffcprs(); ffcmph(outfptr, status); /* compress heap, deleting any orphaned data */ FFUNLOCK; return(*status); } /*---------------------------------------------------------------------------*/ int ffcrow( fitsfile *fptr, /* I - Input FITS file */ int datatype, /* I - Datatype to return results as */ char *expr, /* I - Arithmetic expression */ long firstrow, /* I - First row to evaluate */ long nelements, /* I - Number of elements to return */ void *nulval, /* I - Ptr to value to use as UNDEF */ void *array, /* O - Array of results */ int *anynul, /* O - Were any UNDEFs encountered? */ int *status ) /* O - Error status */ /* */ /* Calculate an expression for the indicated rows of a table, returning */ /* the results, cast as datatype (TSHORT, TDOUBLE, etc), in array. If */ /* nulval==NULL, UNDEFs will be zeroed out. For vector results, the number */ /* of elements returned may be less than nelements if nelements is not an */ /* even multiple of the result dimension. Call fftexp to obtain the */ /* dimensions of the results. */ /*---------------------------------------------------------------------------*/ { parseInfo Info; int naxis; long nelem1, naxes[MAXDIMS]; if( *status ) return( *status ); FFLOCK; if( ffiprs( fptr, 0, expr, MAXDIMS, &Info.datatype, &nelem1, &naxis, naxes, status ) ) { ffcprs(); FFUNLOCK; return( *status ); } if( nelem1<0 ) nelem1 = - nelem1; if( nelements1 ? firstrow : 1); if( datatype ) Info.datatype = datatype; Info.dataPtr = array; Info.nullPtr = nulval; Info.maxRows = nelements / nelem1; if( ffiter( gParse.nCols, gParse.colData, firstrow-1, 0, parse_data, (void*)&Info, status ) == -1 ) *status=0; /* -1 indicates exitted without error before end... OK */ *anynul = Info.anyNull; ffcprs(); FFUNLOCK; return( *status ); } /*--------------------------------------------------------------------------*/ int ffcalc( fitsfile *infptr, /* I - Input FITS file */ char *expr, /* I - Arithmetic expression */ fitsfile *outfptr, /* I - Output fits file */ char *parName, /* I - Name of output parameter */ char *parInfo, /* I - Extra information on parameter */ int *status ) /* O - Error status */ /* */ /* Evaluate an expression for all rows of a table. Call ffcalc_rng with */ /* a row range of 1-MAX. */ { long start=1, end=LONG_MAX; return ffcalc_rng( infptr, expr, outfptr, parName, parInfo, 1, &start, &end, status ); } /*--------------------------------------------------------------------------*/ int ffcalc_rng( fitsfile *infptr, /* I - Input FITS file */ char *expr, /* I - Arithmetic expression */ fitsfile *outfptr, /* I - Output fits file */ char *parName, /* I - Name of output parameter */ char *parInfo, /* I - Extra information on parameter */ int nRngs, /* I - Row range info */ long *start, /* I - Row range info */ long *end, /* I - Row range info */ int *status ) /* O - Error status */ /* */ /* Evaluate an expression using the data in the input FITS file and place */ /* the results into either a column or keyword in the output fits file, */ /* depending on the value of parName (keywords normally prefixed with '#') */ /* and whether the expression evaluates to a constant or a table column. */ /* The logic is as follows: */ /* (1) If a column exists with name, parName, put results there. */ /* (2) If parName starts with '#', as in #NAXIS, put result there, */ /* with parInfo used as the comment. If expression does not evaluate */ /* to a constant, flag an error. */ /* (3) If a keyword exists with name, parName, and expression is a */ /* constant, put result there, using parInfo as the new comment. */ /* (4) Else, create a new column with name parName and TFORM parInfo. */ /* If parInfo is NULL, use a default data type for the column. */ /*--------------------------------------------------------------------------*/ { parseInfo Info; int naxis, constant, typecode, newNullKwd=0; long nelem, naxes[MAXDIMS], repeat, width; int col_cnt, colNo; Node *result; char card[81], tform[16], nullKwd[9], tdimKwd[9]; if( *status ) return( *status ); FFLOCK; if( ffiprs( infptr, 0, expr, MAXDIMS, &Info.datatype, &nelem, &naxis, naxes, status ) ) { ffcprs(); FFUNLOCK; return( *status ); } if( nelem<0 ) { constant = 1; nelem = -nelem; } else constant = 0; /* Case (1): If column exists put it there */ colNo = 0; if( ffgcno( outfptr, CASEINSEN, parName, &colNo, status )==COL_NOT_FOUND ) { /* Output column doesn't exist. Test for keyword. */ /* Case (2): Does parName indicate result should be put into keyword */ *status = 0; if( parName[0]=='#' ) { if( ! constant ) { ffcprs(); ffpmsg( "Cannot put tabular result into keyword (ffcalc)" ); FFUNLOCK; return( *status = PARSE_BAD_TYPE ); } parName++; /* Advance past '#' */ if ( (strcasecmp(parName,"HISTORY") == 0 || strcasecmp(parName,"COMMENT") == 0) && Info.datatype != TSTRING ) { ffcprs(); ffpmsg( "HISTORY and COMMENT values must be strings (ffcalc)" ); FFUNLOCK; return( *status = PARSE_BAD_TYPE ); } } else if( constant ) { /* Case (3): Does a keyword named parName already exist */ if( ffgcrd( outfptr, parName, card, status )==KEY_NO_EXIST ) { colNo = -1; } else if( *status ) { ffcprs(); FFUNLOCK; return( *status ); } } else colNo = -1; if( colNo<0 ) { /* Case (4): Create new column */ *status = 0; ffgncl( outfptr, &colNo, status ); colNo++; if( parInfo==NULL || *parInfo=='\0' ) { /* Figure out best default column type */ if( gParse.hdutype==BINARY_TBL ) { sprintf(tform,"%ld",nelem); switch( Info.datatype ) { case TLOGICAL: strcat(tform,"L"); break; case TLONG: strcat(tform,"J"); break; case TDOUBLE: strcat(tform,"D"); break; case TSTRING: strcat(tform,"A"); break; case TBIT: strcat(tform,"X"); break; case TLONGLONG: strcat(tform,"K"); break; } } else { switch( Info.datatype ) { case TLOGICAL: ffcprs(); ffpmsg("Cannot create LOGICAL column in ASCII table"); FFUNLOCK; return( *status = NOT_BTABLE ); case TLONG: strcpy(tform,"I11"); break; case TDOUBLE: strcpy(tform,"D23.15"); break; case TSTRING: case TBIT: sprintf(tform,"A%ld",nelem); break; } } parInfo = tform; } else if( !(isdigit((int) *parInfo)) && gParse.hdutype==BINARY_TBL ) { if( Info.datatype==TBIT && *parInfo=='B' ) nelem = (nelem+7)/8; sprintf(tform,"%ld%s",nelem,parInfo); parInfo = tform; } fficol( outfptr, colNo, parName, parInfo, status ); if( naxis>1 ) ffptdm( outfptr, colNo, naxis, naxes, status ); /* Setup TNULLn keyword in case NULLs are encountered */ ffkeyn("TNULL", colNo, nullKwd, status); if( ffgcrd( outfptr, nullKwd, card, status )==KEY_NO_EXIST ) { *status = 0; if( gParse.hdutype==BINARY_TBL ) { LONGLONG nullVal=0; fits_binary_tform( parInfo, &typecode, &repeat, &width, status ); if( typecode==TBYTE ) nullVal = UCHAR_MAX; else if( typecode==TSHORT ) nullVal = SHRT_MIN; else if( typecode==TINT ) nullVal = INT_MIN; else if( typecode==TLONG ) nullVal = LONG_MIN; else if( typecode==TLONGLONG ) nullVal = LONGLONG_MIN; if( nullVal ) { ffpkyj( outfptr, nullKwd, nullVal, "Null value", status ); fits_set_btblnull( outfptr, colNo, nullVal, status ); newNullKwd = 1; } } else if( gParse.hdutype==ASCII_TBL ) { ffpkys( outfptr, nullKwd, "NULL", "Null value string", status ); fits_set_atblnull( outfptr, colNo, "NULL", status ); newNullKwd = 1; } } } } else if( *status ) { ffcprs(); FFUNLOCK; return( *status ); } else { /********************************************************/ /* Check if a TDIM keyword should be written/updated. */ /********************************************************/ ffkeyn("TDIM", colNo, tdimKwd, status); ffgcrd( outfptr, tdimKwd, card, status ); if( *status==0 ) { /* TDIM exists, so update it with result's dimension */ ffptdm( outfptr, colNo, naxis, naxes, status ); } else if( *status==KEY_NO_EXIST ) { /* TDIM does not exist, so clear error stack and */ /* write a TDIM only if result is multi-dimensional */ *status = 0; ffcmsg(); if( naxis>1 ) ffptdm( outfptr, colNo, naxis, naxes, status ); } if( *status ) { /* Either some other error happened in ffgcrd */ /* or one happened in ffptdm */ ffcprs(); FFUNLOCK; return( *status ); } } if( colNo>0 ) { /* Output column exists (now)... put results into it */ int anyNull = 0; int nPerLp, i; long totaln; ffgkyj(infptr, "NAXIS2", &totaln, 0, status); /*************************************/ /* Create new iterator Output Column */ /*************************************/ col_cnt = gParse.nCols; if( allocateCol( col_cnt, status ) ) { ffcprs(); FFUNLOCK; return( *status ); } fits_iter_set_by_num( gParse.colData+col_cnt, outfptr, colNo, 0, OutputCol ); gParse.nCols++; for( i=0; i= 10) && (nRngs == 1) && (start[0] == 1) && (end[0] == totaln)) nPerLp = 0; else nPerLp = Info.maxRows; if( ffiter( gParse.nCols, gParse.colData, start[i]-1, nPerLp, parse_data, (void*)&Info, status ) == -1 ) *status = 0; else if( *status ) { ffcprs(); FFUNLOCK; return( *status ); } if( Info.anyNull ) anyNull = 1; } if( newNullKwd && !anyNull ) { ffdkey( outfptr, nullKwd, status ); } } else { /* Put constant result into keyword */ result = gParse.Nodes + gParse.resultNode; switch( Info.datatype ) { case TDOUBLE: ffukyd( outfptr, parName, result->value.data.dbl, 15, parInfo, status ); break; case TLONG: ffukyj( outfptr, parName, result->value.data.lng, parInfo, status ); break; case TLOGICAL: ffukyl( outfptr, parName, result->value.data.log, parInfo, status ); break; case TBIT: case TSTRING: if (strcasecmp(parName,"HISTORY") == 0) { ffphis( outfptr, result->value.data.str, status); } else if (strcasecmp(parName,"COMMENT") == 0) { ffpcom( outfptr, result->value.data.str, status); } else { ffukys( outfptr, parName, result->value.data.str, parInfo, status ); } break; } } ffcprs(); FFUNLOCK; return( *status ); } /*--------------------------------------------------------------------------*/ int fftexp( fitsfile *fptr, /* I - Input FITS file */ char *expr, /* I - Arithmetic expression */ int maxdim, /* I - Max Dimension of naxes */ int *datatype, /* O - Data type of result */ long *nelem, /* O - Vector length of result */ int *naxis, /* O - # of dimensions of result */ long *naxes, /* O - Size of each dimension */ int *status ) /* O - Error status */ /* */ /* Evaluate the given expression and return information on the result. */ /*--------------------------------------------------------------------------*/ { FFLOCK; ffiprs( fptr, 0, expr, maxdim, datatype, nelem, naxis, naxes, status ); ffcprs(); FFUNLOCK; return( *status ); } /*--------------------------------------------------------------------------*/ int ffiprs( fitsfile *fptr, /* I - Input FITS file */ int compressed, /* I - Is FITS file hkunexpanded? */ char *expr, /* I - Arithmetic expression */ int maxdim, /* I - Max Dimension of naxes */ int *datatype, /* O - Data type of result */ long *nelem, /* O - Vector length of result */ int *naxis, /* O - # of dimensions of result */ long *naxes, /* O - Size of each dimension */ int *status ) /* O - Error status */ /* */ /* Initialize the parser and determine what type of result the expression */ /* produces. */ /*--------------------------------------------------------------------------*/ { Node *result; int i,lexpr, tstatus = 0; int xaxis, bitpix; long xaxes[9]; static iteratorCol dmyCol; if( *status ) return( *status ); /* make sure all internal structures for this HDU are current */ if ( ffrdef(fptr, status) ) return(*status); /* Initialize the Parser structure */ gParse.def_fptr = fptr; gParse.compressed = compressed; gParse.nCols = 0; gParse.colData = NULL; gParse.varData = NULL; gParse.getData = find_column; gParse.loadData = load_column; gParse.Nodes = NULL; gParse.nNodesAlloc= 0; gParse.nNodes = 0; gParse.hdutype = 0; gParse.status = 0; fits_get_hdu_type(fptr, &gParse.hdutype, status ); if (gParse.hdutype == IMAGE_HDU) { fits_get_img_param(fptr, 9, &bitpix, &xaxis, xaxes, status); if (*status) { ffpmsg("ffiprs: unable to get image dimensions"); return( *status ); } gParse.totalRows = xaxis > 0 ? 1 : 0; for (i = 0; i < xaxis; ++i) gParse.totalRows *= xaxes[i]; if (DEBUG_PIXFILTER) printf("naxis=%d, gParse.totalRows=%ld\n", xaxis, gParse.totalRows); } else if( ffgkyj(fptr, "NAXIS2", &gParse.totalRows, 0, &tstatus) ) { /* this might be a 1D or null image with no NAXIS2 keyword */ gParse.totalRows = 0; } /* Copy expression into parser... read from file if necessary */ if( expr[0]=='@' ) { if( ffimport_file( expr+1, &gParse.expr, status ) ) return( *status ); lexpr = strlen(gParse.expr); } else { lexpr = strlen(expr); gParse.expr = (char*)malloc( (2+lexpr)*sizeof(char)); strcpy(gParse.expr,expr); } strcat(gParse.expr + lexpr,"\n"); gParse.index = 0; gParse.is_eobuf = 0; /* Parse the expression, building the Nodes and determing */ /* which columns are needed and what data type is returned */ ffrestart(NULL); if( ffparse() ) { return( *status = PARSE_SYNTAX_ERR ); } /* Check results */ *status = gParse.status; if( *status ) return(*status); if( !gParse.nNodes ) { ffpmsg("Blank expression"); return( *status = PARSE_SYNTAX_ERR ); } if( !gParse.nCols ) { dmyCol.fptr = fptr; /* This allows iterator to know value of */ gParse.colData = &dmyCol; /* fptr when no columns are referenced */ } result = gParse.Nodes + gParse.resultNode; *naxis = result->value.naxis; *nelem = result->value.nelem; for( i=0; i<*naxis && ivalue.naxes[i]; switch( result->type ) { case BOOLEAN: *datatype = TLOGICAL; break; case LONG: *datatype = TLONG; break; case DOUBLE: *datatype = TDOUBLE; break; case BITSTR: *datatype = TBIT; break; case STRING: *datatype = TSTRING; break; default: *datatype = 0; ffpmsg("Bad return data type"); *status = gParse.status = PARSE_BAD_TYPE; break; } gParse.datatype = *datatype; FREE(gParse.expr); if( result->operation==CONST_OP ) *nelem = - *nelem; return(*status); } /*--------------------------------------------------------------------------*/ void ffcprs( void ) /* No parameters */ /* */ /* Clear the parser, making it ready to accept a new expression. */ /*--------------------------------------------------------------------------*/ { int col, node, i; if( gParse.nCols > 0 ) { FREE( gParse.colData ); for( col=0; col 0 ) { node = gParse.nNodes; while( node-- ) { if( gParse.Nodes[node].operation==gtifilt_fct ) { i = gParse.Nodes[node].SubNodes[0]; if (gParse.Nodes[ i ].value.data.ptr) FREE( gParse.Nodes[ i ].value.data.ptr ); } else if( gParse.Nodes[node].operation==regfilt_fct ) { i = gParse.Nodes[node].SubNodes[0]; fits_free_region( (SAORegion *)gParse.Nodes[ i ].value.data.ptr ); } } gParse.nNodes = 0; } if( gParse.Nodes ) free( gParse.Nodes ); gParse.Nodes = NULL; gParse.hdutype = ANY_HDU; gParse.pixFilter = 0; } /*---------------------------------------------------------------------------*/ int parse_data( long totalrows, /* I - Total rows to be processed */ long offset, /* I - Number of rows skipped at start*/ long firstrow, /* I - First row of this iteration */ long nrows, /* I - Number of rows in this iter */ int nCols, /* I - Number of columns in use */ iteratorCol *colData, /* IO- Column information/data */ void *userPtr ) /* I - Data handling instructions */ /* */ /* Iterator work function which calls the parser and copies the results */ /* into either an OutputCol or a data pointer supplied in the userPtr */ /* structure. */ /*---------------------------------------------------------------------------*/ { int status, constant=0, anyNullThisTime=0; long jj, kk, idx, remain, ntodo; Node *result; iteratorCol * outcol; /* declare variables static to preserve their values between calls */ static void *Data, *Null; static int datasize; static long lastRow, repeat, resDataSize; static LONGLONG jnull; static parseInfo *userInfo; static long zeros[4] = {0,0,0,0}; if (DEBUG_PIXFILTER) printf("parse_data(total=%ld, offset=%ld, first=%ld, rows=%ld, cols=%d)\n", totalrows, offset, firstrow, nrows, nCols); /*--------------------------------------------------------*/ /* Initialization procedures: execute on the first call */ /*--------------------------------------------------------*/ outcol = colData + (nCols - 1); if (firstrow == offset+1) { userInfo = (parseInfo*)userPtr; userInfo->anyNull = 0; if( userInfo->maxRows>0 ) userInfo->maxRows = minvalue(totalrows,userInfo->maxRows); else if( userInfo->maxRows<0 ) userInfo->maxRows = totalrows; else userInfo->maxRows = nrows; lastRow = firstrow + userInfo->maxRows - 1; if( userInfo->dataPtr==NULL ) { if( outcol->iotype == InputCol ) { ffpmsg("Output column for parser results not found!"); return( PARSE_NO_OUTPUT ); } /* Data gets set later */ Null = outcol->array; userInfo->datatype = outcol->datatype; /* Check for a TNULL/BLANK keyword for output column/image */ status = 0; jnull = 0; if (gParse.hdutype == IMAGE_HDU) { if (gParse.pixFilter->blank) jnull = (LONGLONG) gParse.pixFilter->blank; } else { ffgknjj( outcol->fptr, "TNULL", outcol->colnum, 1, &jnull, (int*)&jj, &status ); if( status==BAD_INTKEY ) { /* Probably ASCII table with text TNULL keyword */ switch( userInfo->datatype ) { case TSHORT: jnull = (LONGLONG) SHRT_MIN; break; case TINT: jnull = (LONGLONG) INT_MIN; break; case TLONG: jnull = (LONGLONG) LONG_MIN; break; } } } repeat = outcol->repeat; /* if (DEBUG_PIXFILTER) printf("parse_data: using null value %ld\n", jnull); */ } else { Data = userInfo->dataPtr; Null = (userInfo->nullPtr ? userInfo->nullPtr : zeros); repeat = gParse.Nodes[gParse.resultNode].value.nelem; } /* Determine the size of each element of the returned result */ switch( userInfo->datatype ) { case TBIT: /* Fall through to TBYTE */ case TLOGICAL: /* Fall through to TBYTE */ case TBYTE: datasize = sizeof(char); break; case TSHORT: datasize = sizeof(short); break; case TINT: datasize = sizeof(int); break; case TLONG: datasize = sizeof(long); break; case TLONGLONG: datasize = sizeof(LONGLONG); break; case TFLOAT: datasize = sizeof(float); break; case TDOUBLE: datasize = sizeof(double); break; case TSTRING: datasize = sizeof(char*); break; } /* Determine the size of each element of the calculated result */ /* (only matters for numeric/logical data) */ switch( gParse.Nodes[gParse.resultNode].type ) { case BOOLEAN: resDataSize = sizeof(char); break; case LONG: resDataSize = sizeof(long); break; case DOUBLE: resDataSize = sizeof(double); break; } } /*-------------------------------------------*/ /* Main loop: process all the rows of data */ /*-------------------------------------------*/ /* If writing to output column, set first element to appropriate */ /* null value. If no NULLs encounter, zero out before returning. */ /* if (DEBUG_PIXFILTER) printf("parse_data: using null value %ld\n", jnull); */ if( userInfo->dataPtr == NULL ) { /* First, reset Data pointer to start of output array */ Data = (char*) outcol->array + datasize; switch( userInfo->datatype ) { case TLOGICAL: *(char *)Null = 'U'; break; case TBYTE: *(char *)Null = (char )jnull; break; case TSHORT: *(short *)Null = (short)jnull; break; case TINT: *(int *)Null = (int )jnull; break; case TLONG: *(long *)Null = (long )jnull; break; case TLONGLONG: *(LONGLONG *)Null = (LONGLONG )jnull; break; case TFLOAT: *(float *)Null = FLOATNULLVALUE; break; case TDOUBLE: *(double*)Null = DOUBLENULLVALUE; break; case TSTRING: (*(char **)Null)[0] = '\1'; (*(char **)Null)[1] = '\0'; break; } } /* Alter nrows in case calling routine didn't want to do all rows */ nrows = minvalue(nrows,lastRow-firstrow+1); Setup_DataArrays( nCols, colData, firstrow, nrows ); /* Parser allocates arrays for each column and calculation it performs. */ /* Limit number of rows processed during each pass to reduce memory */ /* requirements... In most cases, iterator will limit rows to less */ /* than 2500 rows per iteration, so this is really only relevant for */ /* hk-compressed files which must be decompressed in memory and sent */ /* whole to parse_data in a single iteration. */ remain = nrows; while( remain ) { ntodo = minvalue(remain,2500); Evaluate_Parser ( firstrow, ntodo ); if( gParse.status ) break; firstrow += ntodo; remain -= ntodo; /* Copy results into data array */ result = gParse.Nodes + gParse.resultNode; if( result->operation==CONST_OP ) constant = 1; switch( result->type ) { case BOOLEAN: case LONG: case DOUBLE: if( constant ) { char undef=0; for( kk=0; kkvalue.data), &undef, result->value.nelem /* 1 */, userInfo->datatype, Null, (char*)Data + (kk*repeat+jj)*datasize, &anyNullThisTime, &gParse.status ); } else { if ( repeat == result->value.nelem ) { ffcvtn( gParse.datatype, result->value.data.ptr, result->value.undef, result->value.nelem*ntodo, userInfo->datatype, Null, Data, &anyNullThisTime, &gParse.status ); } else if( result->value.nelem == 1 ) { for( kk=0; kkvalue.data.ptr + kk*resDataSize, (char*)result->value.undef + kk, 1, userInfo->datatype, Null, (char*)Data + (kk*repeat+jj)*datasize, &anyNullThisTime, &gParse.status ); } } else { int nCopy; nCopy = minvalue( repeat, result->value.nelem ); for( kk=0; kkvalue.data.ptr + kk*result->value.nelem*resDataSize, (char*)result->value.undef + kk*result->value.nelem, nCopy, userInfo->datatype, Null, (char*)Data + (kk*repeat)*datasize, &anyNullThisTime, &gParse.status ); if( nCopy < repeat ) { memset( (char*)Data + (kk*repeat+nCopy)*datasize, 0, (repeat-nCopy)*datasize); } } } if( result->operation>0 ) { FREE( result->value.data.ptr ); } } if( gParse.status==OVERFLOW_ERR ) { gParse.status = NUM_OVERFLOW; ffpmsg("Numerical overflow while converting expression to necessary datatype"); } break; case BITSTR: switch( userInfo->datatype ) { case TBYTE: idx = -1; for( kk=0; kkvalue.nelem; jj++ ) { if( jj%8 == 0 ) ((char*)Data)[++idx] = 0; if( constant ) { if( result->value.data.str[jj]=='1' ) ((char*)Data)[idx] |= 128>>(jj%8); } else { if( result->value.data.strptr[kk][jj]=='1' ) ((char*)Data)[idx] |= 128>>(jj%8); } } } break; case TBIT: case TLOGICAL: if( constant ) { for( kk=0; kkvalue.nelem; jj++ ) { ((char*)Data)[ jj+kk*result->value.nelem ] = ( result->value.data.str[jj]=='1' ); } } else { for( kk=0; kkvalue.nelem; jj++ ) { ((char*)Data)[ jj+kk*result->value.nelem ] = ( result->value.data.strptr[kk][jj]=='1' ); } } break; case TSTRING: if( constant ) { for( jj=0; jjvalue.data.str ); } } else { for( jj=0; jjvalue.data.strptr[jj] ); } } break; default: ffpmsg("Cannot convert bit expression to desired type."); gParse.status = PARSE_BAD_TYPE; break; } if( result->operation>0 ) { FREE( result->value.data.strptr[0] ); FREE( result->value.data.strptr ); } break; case STRING: if( userInfo->datatype==TSTRING ) { if( constant ) { for( jj=0; jjvalue.data.str ); } else { for( jj=0; jjvalue.undef[jj] ) { anyNullThisTime = 1; strcpy( ((char**)Data)[jj], *(char **)Null ); } else { strcpy( ((char**)Data)[jj], result->value.data.strptr[jj] ); } } } else { ffpmsg("Cannot convert string expression to desired type."); gParse.status = PARSE_BAD_TYPE; } if( result->operation>0 ) { FREE( result->value.data.strptr[0] ); FREE( result->value.data.strptr ); } break; } if( gParse.status ) break; /* Increment Data to point to where the next block should go */ if( result->type==BITSTR && userInfo->datatype==TBYTE ) Data = (char*)Data + datasize * ( (result->value.nelem+7)/8 ) * ntodo; else if( result->type==STRING ) Data = (char*)Data + datasize * ntodo; else Data = (char*)Data + datasize * ntodo * repeat; } /* If no NULLs encountered during this pass, set Null value to */ /* zero to make the writing of the output column data faster */ if( anyNullThisTime ) userInfo->anyNull = 1; else if( userInfo->dataPtr == NULL ) { if( userInfo->datatype == TSTRING ) memcpy( *(char **)Null, zeros, 2 ); else memcpy( Null, zeros, datasize ); } /*-------------------------------------------------------*/ /* Clean up procedures: after processing all the rows */ /*-------------------------------------------------------*/ /* if the calling routine specified that only a limited number */ /* of rows in the table should be processed, return a value of -1 */ /* once all the rows have been done, if no other error occurred. */ if (gParse.hdutype != IMAGE_HDU && firstrow - 1 == lastRow) { if (!gParse.status && userInfo->maxRowsiotype == OutputCol ) continue; nelem = varData->nelem; len = nelem * nRows; switch ( varData->type ) { case BITSTR: /* No need for UNDEF array, but must make string DATA array */ len = (nelem+1)*nRows; /* Count '\0' */ bitStrs = (char**)varData->data; if( bitStrs ) FREE( bitStrs[0] ); free( bitStrs ); bitStrs = (char**)malloc( nRows*sizeof(char*) ); if( bitStrs==NULL ) { varData->data = varData->undef = NULL; gParse.status = MEMORY_ALLOCATION; break; } bitStrs[0] = (char*)malloc( len*sizeof(char) ); if( bitStrs[0]==NULL ) { free( bitStrs ); varData->data = varData->undef = NULL; gParse.status = MEMORY_ALLOCATION; break; } for( row=0; rowarray)[idx] & (1<<(7-len%8)) ) bitStrs[row][len] = '1'; else bitStrs[row][len] = '0'; if( len%8==7 ) idx++; } bitStrs[row][len] = '\0'; } varData->undef = (char*)bitStrs; varData->data = (char*)bitStrs; break; case STRING: sptr = (char**)icol->array; if (varData->undef) free( varData->undef ); varData->undef = (char*)malloc( nRows*sizeof(char) ); if( varData->undef==NULL ) { gParse.status = MEMORY_ALLOCATION; break; } row = nRows; while( row-- ) varData->undef[row] = ( **sptr != '\0' && FSTRCMP( sptr[0], sptr[row+1] )==0 ); varData->data = sptr + 1; break; case BOOLEAN: barray = (char*)icol->array; if (varData->undef) free( varData->undef ); varData->undef = (char*)malloc( len*sizeof(char) ); if( varData->undef==NULL ) { gParse.status = MEMORY_ALLOCATION; break; } while( len-- ) { varData->undef[len] = ( barray[0]!=0 && barray[0]==barray[len+1] ); } varData->data = barray + 1; break; case LONG: iarray = (long*)icol->array; if (varData->undef) free( varData->undef ); varData->undef = (char*)malloc( len*sizeof(char) ); if( varData->undef==NULL ) { gParse.status = MEMORY_ALLOCATION; break; } while( len-- ) { varData->undef[len] = ( iarray[0]!=0L && iarray[0]==iarray[len+1] ); } varData->data = iarray + 1; break; case DOUBLE: rarray = (double*)icol->array; if (varData->undef) free( varData->undef ); varData->undef = (char*)malloc( len*sizeof(char) ); if( varData->undef==NULL ) { gParse.status = MEMORY_ALLOCATION; break; } while( len-- ) { varData->undef[len] = ( rarray[0]!=0.0 && rarray[0]==rarray[len+1]); } varData->data = rarray + 1; break; default: sprintf(msg, "SetupDataArrays, unhandled type %d\n", varData->type); ffpmsg(msg); } if( gParse.status ) { /* Deallocate NULL arrays of previous columns */ while( i-- ) { varData = gParse.varData + i; if( varData->type==BITSTR ) FREE( ((char**)varData->data)[0] ); FREE( varData->undef ); varData->undef = NULL; } return; } } } /*--------------------------------------------------------------------------*/ int ffcvtn( int inputType, /* I - Data type of input array */ void *input, /* I - Input array of type inputType */ char *undef, /* I - Array of flags indicating UNDEF elems */ long ntodo, /* I - Number of elements to process */ int outputType, /* I - Data type of output array */ void *nulval, /* I - Ptr to value to use for UNDEF elements */ void *output, /* O - Output array of type outputType */ int *anynull, /* O - Any nulls flagged? */ int *status ) /* O - Error status */ /* */ /* Convert an array of any input data type to an array of any output */ /* data type, using an array of UNDEF flags to assign nulvals to */ /*--------------------------------------------------------------------------*/ { long i; switch( outputType ) { case TLOGICAL: switch( inputType ) { case TLOGICAL: case TBYTE: for( i=0; i UCHAR_MAX ) { *status = OVERFLOW_ERR; ((unsigned char*)output)[i] = UCHAR_MAX; } else ((unsigned char*)output)[i] = (unsigned char) ((long*)input)[i]; } } return( *status ); case TFLOAT: fffr4i1((float*)input,ntodo,1.,0.,0,0,NULL,NULL, (unsigned char*)output,status); break; case TDOUBLE: fffr8i1((double*)input,ntodo,1.,0.,0,0,NULL,NULL, (unsigned char*)output,status); break; default: *status = BAD_DATATYPE; break; } for(i=0;i SHRT_MAX ) { *status = OVERFLOW_ERR; ((short*)output)[i] = SHRT_MAX; } else ((short*)output)[i] = (short) ((long*)input)[i]; } } return( *status ); case TFLOAT: fffr4i2((float*)input,ntodo,1.,0.,0,0,NULL,NULL, (short*)output,status); break; case TDOUBLE: fffr8i2((double*)input,ntodo,1.,0.,0,0,NULL,NULL, (short*)output,status); break; default: *status = BAD_DATATYPE; break; } for(i=0;i=0 ) { found[parNo] = 1; /* Flag this parameter as found */ switch( gParse.colData[parNo].datatype ) { case TLONG: ffgcvj( fptr, gParse.valCol, row, 1L, 1L, ((long*)gParse.colData[parNo].array)[0], ((long*)gParse.colData[parNo].array)+currelem, &anynul, status ); break; case TDOUBLE: ffgcvd( fptr, gParse.valCol, row, 1L, 1L, ((double*)gParse.colData[parNo].array)[0], ((double*)gParse.colData[parNo].array)+currelem, &anynul, status ); break; case TSTRING: ffgcvs( fptr, gParse.valCol, row, 1L, 1L, ((char**)gParse.colData[parNo].array)[0], ((char**)gParse.colData[parNo].array)+currelem, &anynul, status ); break; } if( *status ) return( *status ); } } if( currelemoperation==CONST_OP ) { if( result->value.data.log ) { *(long*)userPtr = firstrow; return( -1 ); } } else { for( idx=0; idxvalue.data.logptr[idx] && !result->value.undef[idx] ) { *(long*)userPtr = firstrow + idx; return( -1 ); } } } return( gParse.status ); } static int set_image_col_types (fitsfile * fptr, const char * name, int bitpix, DataInfo * varInfo, iteratorCol *colIter) { int istatus; double tscale, tzero; char temp[80]; switch (bitpix) { case BYTE_IMG: case SHORT_IMG: case LONG_IMG: istatus = 0; if (fits_read_key(fptr, TDOUBLE, "BZERO", &tzero, NULL, &istatus)) tzero = 0.0; istatus = 0; if (fits_read_key(fptr, TDOUBLE, "BSCALE", &tscale, NULL, &istatus)) tscale = 1.0; if (tscale == 1.0 && (tzero == 0.0 || tzero == 32768.0 )) { varInfo->type = LONG; colIter->datatype = TLONG; } else { varInfo->type = DOUBLE; colIter->datatype = TDOUBLE; if (DEBUG_PIXFILTER) printf("use DOUBLE for %s with BSCALE=%g/BZERO=%g\n", name, tscale, tzero); } break; case LONGLONG_IMG: case FLOAT_IMG: case DOUBLE_IMG: varInfo->type = DOUBLE; colIter->datatype = TDOUBLE; break; default: sprintf(temp, "set_image_col_types: unrecognized image bitpix [%d]\n", bitpix); ffpmsg(temp); return gParse.status = PARSE_BAD_TYPE; } return 0; } /************************************************************************* Functions used by the evaluator to access FITS data (find_column, find_keywd, allocateCol, load_column) *************************************************************************/ static int find_column( char *colName, void *itslval ) { FFSTYPE *thelval = (FFSTYPE*)itslval; int col_cnt, status; int colnum, typecode, type; long repeat, width; fitsfile *fptr; char temp[80]; double tzero,tscale; int istatus; DataInfo *varInfo; iteratorCol *colIter; if (DEBUG_PIXFILTER) printf("find_column(%s)\n", colName); if( *colName == '#' ) return( find_keywd( colName + 1, itslval ) ); fptr = gParse.def_fptr; status = 0; col_cnt = gParse.nCols; if (gParse.hdutype == IMAGE_HDU) { int i; if (!gParse.pixFilter) { gParse.status = COL_NOT_FOUND; ffpmsg("find_column: IMAGE_HDU but no PixelFilter"); return pERROR; } colnum = -1; for (i = 0; i < gParse.pixFilter->count; ++i) { if (!strcasecmp(colName, gParse.pixFilter->tag[i])) colnum = i; } if (colnum < 0) { sprintf(temp, "find_column: PixelFilter tag %s not found", colName); ffpmsg(temp); gParse.status = COL_NOT_FOUND; return pERROR; } if( allocateCol( col_cnt, &gParse.status ) ) return pERROR; varInfo = gParse.varData + col_cnt; colIter = gParse.colData + col_cnt; fptr = gParse.pixFilter->ifptr[colnum]; fits_get_img_param(fptr, MAXDIMS, &typecode, /* actually bitpix */ &varInfo->naxis, &varInfo->naxes[0], &status); varInfo->nelem = 1; type = COLUMN; if (set_image_col_types(fptr, colName, typecode, varInfo, colIter)) return pERROR; colIter->fptr = fptr; colIter->iotype = InputCol; } else { /* HDU holds a table */ if( gParse.compressed ) colnum = gParse.valCol; else if( fits_get_colnum( fptr, CASEINSEN, colName, &colnum, &status ) ) { if( status == COL_NOT_FOUND ) { type = find_keywd( colName, itslval ); if( type != pERROR ) ffcmsg(); return( type ); } gParse.status = status; return pERROR; } if( fits_get_coltype( fptr, colnum, &typecode, &repeat, &width, &status ) ) { gParse.status = status; return pERROR; } if( allocateCol( col_cnt, &gParse.status ) ) return pERROR; varInfo = gParse.varData + col_cnt; colIter = gParse.colData + col_cnt; fits_iter_set_by_num( colIter, fptr, colnum, 0, InputCol ); } /* Make sure we don't overflow variable name array */ strncpy(varInfo->name,colName,MAXVARNAME); varInfo->name[MAXVARNAME] = '\0'; if (gParse.hdutype != IMAGE_HDU) { switch( typecode ) { case TBIT: varInfo->type = BITSTR; colIter->datatype = TBYTE; type = BITCOL; break; case TBYTE: case TSHORT: case TLONG: /* The datatype of column with TZERO and TSCALE keywords might be float or double. */ sprintf(temp,"TZERO%d",colnum); istatus = 0; if(fits_read_key(fptr,TDOUBLE,temp,&tzero,NULL,&istatus)) { tzero = 0.0; } sprintf(temp,"TSCAL%d",colnum); istatus = 0; if(fits_read_key(fptr,TDOUBLE,temp,&tscale,NULL,&istatus)) { tscale = 1.0; } if (tscale == 1.0 && (tzero == 0.0 || tzero == 32768.0 )) { varInfo->type = LONG; colIter->datatype = TLONG; /* Reading an unsigned long column as a long can cause overflow errors. Treat the column as a double instead. } else if (tscale == 1.0 && tzero == 2147483648.0 ) { varInfo->type = LONG; colIter->datatype = TULONG; */ } else { varInfo->type = DOUBLE; colIter->datatype = TDOUBLE; } type = COLUMN; break; /* For now, treat 8-byte integer columns as type double. This can lose precision, so the better long term solution will be to add support for TLONGLONG as a separate datatype. */ case TLONGLONG: case TFLOAT: case TDOUBLE: varInfo->type = DOUBLE; colIter->datatype = TDOUBLE; type = COLUMN; break; case TLOGICAL: varInfo->type = BOOLEAN; colIter->datatype = TLOGICAL; type = BCOLUMN; break; case TSTRING: varInfo->type = STRING; colIter->datatype = TSTRING; type = SCOLUMN; if ( width >= MAX_STRLEN ) { sprintf(temp, "column %d is wider than maximum %d characters", colnum, MAX_STRLEN-1); ffpmsg(temp); gParse.status = PARSE_LRG_VECTOR; return pERROR; } if( gParse.hdutype == ASCII_TBL ) repeat = width; break; default: if (typecode < 0) { sprintf(temp, "variable-length array columns are not supported. typecode = %d", typecode); ffpmsg(temp); } gParse.status = PARSE_BAD_TYPE; return pERROR; } varInfo->nelem = repeat; if( repeat>1 && typecode!=TSTRING ) { if( fits_read_tdim( fptr, colnum, MAXDIMS, &varInfo->naxis, &varInfo->naxes[0], &status ) ) { gParse.status = status; return pERROR; } } else { varInfo->naxis = 1; varInfo->naxes[0] = 1; } } gParse.nCols++; thelval->lng = col_cnt; return( type ); } static int find_keywd(char *keyname, void *itslval ) { FFSTYPE *thelval = (FFSTYPE*)itslval; int status, type; char keyvalue[FLEN_VALUE], dtype; fitsfile *fptr; double rval; int bval; long ival; status = 0; fptr = gParse.def_fptr; if( fits_read_keyword( fptr, keyname, keyvalue, NULL, &status ) ) { if( status == KEY_NO_EXIST ) { /* Do this since ffgkey doesn't put an error message on stack */ sprintf(keyvalue, "ffgkey could not find keyword: %s",keyname); ffpmsg(keyvalue); } gParse.status = status; return( pERROR ); } if( fits_get_keytype( keyvalue, &dtype, &status ) ) { gParse.status = status; return( pERROR ); } switch( dtype ) { case 'C': fits_read_key_str( fptr, keyname, keyvalue, NULL, &status ); type = STRING; strcpy( thelval->str , keyvalue ); break; case 'L': fits_read_key_log( fptr, keyname, &bval, NULL, &status ); type = BOOLEAN; thelval->log = bval; break; case 'I': fits_read_key_lng( fptr, keyname, &ival, NULL, &status ); type = LONG; thelval->lng = ival; break; case 'F': fits_read_key_dbl( fptr, keyname, &rval, NULL, &status ); type = DOUBLE; thelval->dbl = rval; break; default: type = pERROR; break; } if( status ) { gParse.status=status; return pERROR; } return( type ); } static int allocateCol( int nCol, int *status ) { if( (nCol%25)==0 ) { if( nCol ) { gParse.colData = (iteratorCol*) realloc( gParse.colData, (nCol+25)*sizeof(iteratorCol) ); gParse.varData = (DataInfo *) realloc( gParse.varData, (nCol+25)*sizeof(DataInfo) ); } else { gParse.colData = (iteratorCol*) malloc( 25*sizeof(iteratorCol) ); gParse.varData = (DataInfo *) malloc( 25*sizeof(DataInfo) ); } if( gParse.colData == NULL || gParse.varData == NULL ) { if( gParse.colData ) free(gParse.colData); if( gParse.varData ) free(gParse.varData); gParse.colData = NULL; gParse.varData = NULL; return( *status = MEMORY_ALLOCATION ); } } gParse.varData[nCol].data = NULL; gParse.varData[nCol].undef = NULL; return 0; } static int load_column( int varNum, long fRow, long nRows, void *data, char *undef ) { iteratorCol *var = gParse.colData+varNum; long nelem,nbytes,row,len,idx; char **bitStrs, msg[80]; unsigned char *bytes; int status = 0, anynul; if (gParse.hdutype == IMAGE_HDU) { /* This test would need to be on a per varNum basis to support * cross HDU operations */ fits_read_imgnull(var->fptr, var->datatype, fRow, nRows, data, undef, &anynul, &status); if (DEBUG_PIXFILTER) printf("load_column: IMAGE_HDU fRow=%ld, nRows=%ld => %d\n", fRow, nRows, status); } else { nelem = nRows * var->repeat; switch( var->datatype ) { case TBYTE: nbytes = ((var->repeat+7)/8) * nRows; bytes = (unsigned char *)malloc( nbytes * sizeof(char) ); ffgcvb(var->fptr, var->colnum, fRow, 1L, nbytes, 0, bytes, &anynul, &status); nelem = var->repeat; bitStrs = (char **)data; for( row=0; rowfptr, var->colnum, fRow, 1L, nRows, (char **)data, undef, &anynul, &status); break; case TLOGICAL: ffgcfl(var->fptr, var->colnum, fRow, 1L, nelem, (char *)data, undef, &anynul, &status); break; case TLONG: ffgcfj(var->fptr, var->colnum, fRow, 1L, nelem, (long *)data, undef, &anynul, &status); break; case TDOUBLE: ffgcfd(var->fptr, var->colnum, fRow, 1L, nelem, (double *)data, undef, &anynul, &status); break; default: sprintf(msg,"load_column: unexpected datatype %d", var->datatype); ffpmsg(msg); } } if( status ) { gParse.status = status; return pERROR; } return 0; } /*--------------------------------------------------------------------------*/ int fits_pixel_filter (PixelFilter * filter, int * status) /* Evaluate an expression using the data in the input FITS file(s) */ /*--------------------------------------------------------------------------*/ { parseInfo Info = { 0 }; int naxis, bitpix; long nelem, naxes[MAXDIMS]; int col_cnt; Node *result; int datatype; fitsfile * infptr; fitsfile * outfptr; char * DEFAULT_TAGS[] = { "X" }; char msg[256]; int writeBlankKwd = 0; /* write BLANK if any output nulls? */ DEBUG_PIXFILTER = getenv("DEBUG_PIXFILTER") ? 1 : 0; if (*status) return (*status); FFLOCK; if (!filter->tag || !filter->tag[0] || !filter->tag[0][0]) { filter->tag = DEFAULT_TAGS; if (DEBUG_PIXFILTER) printf("using default tag '%s'\n", filter->tag[0]); } infptr = filter->ifptr[0]; outfptr = filter->ofptr; gParse.pixFilter = filter; if (ffiprs(infptr, 0, filter->expression, MAXDIMS, &Info.datatype, &nelem, &naxis, naxes, status)) { goto CLEANUP; } if (nelem < 0) { nelem = -nelem; } { /* validate result type */ const char * type = 0; switch (Info.datatype) { case TLOGICAL: type = "LOGICAL"; break; case TLONG: type = "LONG"; break; case TDOUBLE: type = "DOUBLE"; break; case TSTRING: type = "STRING"; *status = pERROR; ffpmsg("pixel_filter: cannot have string image"); case TBIT: type = "BIT"; if (DEBUG_PIXFILTER) printf("hmm, image from bits?\n"); break; default: type = "UNKNOWN?!"; *status = pERROR; ffpmsg("pixel_filter: unexpected result datatype"); } if (DEBUG_PIXFILTER) printf("result type is %s [%d]\n", type, Info.datatype); if (*status) goto CLEANUP; } if (fits_get_img_param(infptr, MAXDIMS, &bitpix, &naxis, &naxes[0], status)) { ffpmsg("pixel_filter: unable to read input image parameters"); goto CLEANUP; } if (DEBUG_PIXFILTER) printf("input bitpix %d\n", bitpix); if (Info.datatype == TDOUBLE) { /* for floating point expressions, set the default output image to bitpix = -32 (float) unless the default is already a double */ if (bitpix != DOUBLE_IMG) bitpix = FLOAT_IMG; } /* override output image bitpix if specified by caller */ if (filter->bitpix) bitpix = filter->bitpix; if (DEBUG_PIXFILTER) printf("output bitpix %d\n", bitpix); if (fits_create_img(outfptr, bitpix, naxis, naxes, status)) { ffpmsg("pixel_filter: unable to create output image"); goto CLEANUP; } /* transfer keycards */ { int i, ncards, more; if (fits_get_hdrspace(infptr, &ncards, &more, status)) { ffpmsg("pixel_filter: unable to determine number of keycards"); goto CLEANUP; } for (i = 1; i <= ncards; ++i) { int keyclass; char card[FLEN_CARD]; if (fits_read_record(infptr, i, card, status)) { sprintf(msg, "pixel_filter: unable to read keycard %d", i); ffpmsg(msg); goto CLEANUP; } keyclass = fits_get_keyclass(card); if (keyclass == TYP_STRUC_KEY) { /* output structure defined by fits_create_img */ } else if (keyclass == TYP_COMM_KEY && i < 12) { /* assume this is one of the FITS standard comments */ } else if (keyclass == TYP_NULL_KEY && bitpix < 0) { /* do not transfer BLANK to real output image */ } else if (keyclass == TYP_SCAL_KEY && bitpix < 0) { /* do not transfer BZERO, BSCALE to real output image */ } else if (fits_write_record(outfptr, card, status)) { sprintf(msg, "pixel_filter: unable to write keycard '%s' [%d]\n", card, *status); ffpmsg(msg); goto CLEANUP; } } } switch (bitpix) { case BYTE_IMG: datatype = TLONG; Info.datatype = TBYTE; break; case SHORT_IMG: datatype = TLONG; Info.datatype = TSHORT; break; case LONG_IMG: datatype = TLONG; Info.datatype = TLONG; break; case FLOAT_IMG: datatype = TDOUBLE; Info.datatype = TFLOAT; break; case DOUBLE_IMG: datatype = TDOUBLE; Info.datatype = TDOUBLE; break; default: sprintf(msg, "pixel_filter: unexpected output bitpix %d\n", bitpix); ffpmsg(msg); *status = pERROR; goto CLEANUP; } if (bitpix > 0) { /* arrange for NULLs in output */ long nullVal = filter->blank; if (!filter->blank) { int tstatus = 0; if (fits_read_key_lng(infptr, "BLANK", &nullVal, 0, &tstatus)) { writeBlankKwd = 1; if (bitpix == BYTE_IMG) nullVal = UCHAR_MAX; else if (bitpix == SHORT_IMG) nullVal = SHRT_MIN; else if (bitpix == LONG_IMG) nullVal = LONG_MIN; else printf("unhandled positive output BITPIX %d\n", bitpix); } filter->blank = nullVal; } fits_set_imgnull(outfptr, filter->blank, status); if (DEBUG_PIXFILTER) printf("using blank %ld\n", nullVal); } if (!filter->keyword[0]) { iteratorCol * colIter; DataInfo * varInfo; /*************************************/ /* Create new iterator Output Column */ /*************************************/ col_cnt = gParse.nCols; if (allocateCol(col_cnt, status)) goto CLEANUP; gParse.nCols++; colIter = &gParse.colData[col_cnt]; colIter->fptr = filter->ofptr; colIter->iotype = OutputCol; varInfo = &gParse.varData[col_cnt]; set_image_col_types(colIter->fptr, "CREATED", bitpix, varInfo, colIter); Info.maxRows = -1; if (ffiter(gParse.nCols, gParse.colData, 0, 0, parse_data, &Info, status) == -1) *status = 0; else if (*status) goto CLEANUP; if (Info.anyNull) { if (writeBlankKwd) { fits_update_key_lng(outfptr, "BLANK", filter->blank, "NULL pixel value", status); if (*status) ffpmsg("pixel_filter: unable to write BLANK keyword"); if (DEBUG_PIXFILTER) { printf("output has NULLs\n"); printf("wrote blank [%d]\n", *status); } } } else if (bitpix > 0) /* never used a null */ if (fits_set_imgnull(outfptr, -1234554321, status)) ffpmsg("pixel_filter: unable to reset imgnull"); } else { /* Put constant result into keyword */ char * parName = filter->keyword; char * parInfo = filter->comment; result = gParse.Nodes + gParse.resultNode; switch (Info.datatype) { case TDOUBLE: ffukyd(outfptr, parName, result->value.data.dbl, 15, parInfo, status); break; case TLONG: ffukyj(outfptr, parName, result->value.data.lng, parInfo, status); break; case TLOGICAL: ffukyl(outfptr, parName, result->value.data.log, parInfo, status); break; case TBIT: case TSTRING: ffukys(outfptr, parName, result->value.data.str, parInfo, status); break; default: sprintf(msg, "pixel_filter: unexpected constant result type [%d]\n", Info.datatype); ffpmsg(msg); } } CLEANUP: ffcprs(); FFUNLOCK; return (*status); } astropy-1.1.1/cextern/cfitsio/wcsutil.c0000644001134200020070000004060112602615520021065 0ustar embrayscience00000000000000#include #include "fitsio2.h" #define D2R 0.01745329252 #define TWOPI 6.28318530717959 /*--------------------------------------------------------------------------*/ int ffwldp(double xpix, double ypix, double xref, double yref, double xrefpix, double yrefpix, double xinc, double yinc, double rot, char *type, double *xpos, double *ypos, int *status) /* This routine is based on the classic AIPS WCS routine. It converts from pixel location to RA,Dec for 9 projective geometries: "-CAR", "-SIN", "-TAN", "-ARC", "-NCP", "-GLS", "-MER", "-AIT" and "-STG". */ /*-----------------------------------------------------------------------*/ /* routine to determine accurate position for pixel coordinates */ /* returns 0 if successful otherwise: */ /* 501 = angle too large for projection; */ /* does: -CAR, -SIN, -TAN, -ARC, -NCP, -GLS, -MER, -AIT -STG projections*/ /* Input: */ /* f xpix x pixel number (RA or long without rotation) */ /* f ypiy y pixel number (dec or lat without rotation) */ /* d xref x reference coordinate value (deg) */ /* d yref y reference coordinate value (deg) */ /* f xrefpix x reference pixel */ /* f yrefpix y reference pixel */ /* f xinc x coordinate increment (deg) */ /* f yinc y coordinate increment (deg) */ /* f rot rotation (deg) (from N through E) */ /* c *type projection type code e.g. "-SIN"; */ /* Output: */ /* d *xpos x (RA) coordinate (deg) */ /* d *ypos y (dec) coordinate (deg) */ /*-----------------------------------------------------------------------*/ {double cosr, sinr, dx, dy, dz, temp, x, y, z; double sins, coss, dect, rat, dt, l, m, mg, da, dd, cos0, sin0; double dec0, ra0; double geo1, geo2, geo3; double deps = 1.0e-5; char *cptr; if (*status > 0) return(*status); /* Offset from ref pixel */ dx = (xpix-xrefpix) * xinc; dy = (ypix-yrefpix) * yinc; /* Take out rotation */ cosr = cos(rot * D2R); sinr = sin(rot * D2R); if (rot != 0.0) { temp = dx * cosr - dy * sinr; dy = dy * cosr + dx * sinr; dx = temp; } /* convert to radians */ ra0 = xref * D2R; dec0 = yref * D2R; l = dx * D2R; m = dy * D2R; sins = l*l + m*m; cos0 = cos(dec0); sin0 = sin(dec0); if (*type != '-') { /* unrecognized projection code */ return(*status = 504); } cptr = type + 1; if (*cptr == 'C') { /* linear -CAR */ if (*(cptr + 1) != 'A' || *(cptr + 2) != 'R') { return(*status = 504); } rat = ra0 + l; dect = dec0 + m; } else if (*cptr == 'T') { /* -TAN */ if (*(cptr + 1) != 'A' || *(cptr + 2) != 'N') { return(*status = 504); } x = cos0*cos(ra0) - l*sin(ra0) - m*cos(ra0)*sin0; y = cos0*sin(ra0) + l*cos(ra0) - m*sin(ra0)*sin0; z = sin0 + m* cos0; rat = atan2( y, x ); dect = atan ( z / sqrt(x*x+y*y) ); } else if (*cptr == 'S') { if (*(cptr + 1) == 'I' && *(cptr + 2) == 'N') { /* -SIN */ if (sins>1.0) return(*status = 501); coss = sqrt (1.0 - sins); dt = sin0 * coss + cos0 * m; if ((dt>1.0) || (dt<-1.0)) return(*status = 501); dect = asin (dt); rat = cos0 * coss - sin0 * m; if ((rat==0.0) && (l==0.0)) return(*status = 501); rat = atan2 (l, rat) + ra0; } else if (*(cptr + 1) == 'T' && *(cptr + 2) == 'G') { /* -STG Sterographic*/ dz = (4.0 - sins) / (4.0 + sins); if (fabs(dz)>1.0) return(*status = 501); dect = dz * sin0 + m * cos0 * (1.0+dz) / 2.0; if (fabs(dect)>1.0) return(*status = 501); dect = asin (dect); rat = cos(dect); if (fabs(rat)1.0) return(*status = 501); rat = asin (rat); mg = 1.0 + sin(dect) * sin0 + cos(dect) * cos0 * cos(rat); if (fabs(mg)deps) rat = TWOPI /2.0 - rat; rat = ra0 + rat; } else { return(*status = 504); } } else if (*cptr == 'A') { if (*(cptr + 1) == 'R' && *(cptr + 2) == 'C') { /* ARC */ if (sins>=TWOPI*TWOPI/4.0) return(*status = 501); sins = sqrt(sins); coss = cos (sins); if (sins!=0.0) sins = sin (sins) / sins; else sins = 1.0; dt = m * cos0 * sins + sin0 * coss; if ((dt>1.0) || (dt<-1.0)) return(*status = 501); dect = asin (dt); da = coss - dt * sin0; dt = l * sins * cos0; if ((da==0.0) && (dt==0.0)) return(*status = 501); rat = ra0 + atan2 (dt, da); } else if (*(cptr + 1) == 'I' && *(cptr + 2) == 'T') { /* -AIT Aitoff */ dt = yinc*cosr + xinc*sinr; if (dt==0.0) dt = 1.0; dt = dt * D2R; dy = yref * D2R; dx = sin(dy+dt)/sqrt((1.0+cos(dy+dt))/2.0) - sin(dy)/sqrt((1.0+cos(dy))/2.0); if (dx==0.0) dx = 1.0; geo2 = dt / dx; dt = xinc*cosr - yinc* sinr; if (dt==0.0) dt = 1.0; dt = dt * D2R; dx = 2.0 * cos(dy) * sin(dt/2.0); if (dx==0.0) dx = 1.0; geo1 = dt * sqrt((1.0+cos(dy)*cos(dt/2.0))/2.0) / dx; geo3 = geo2 * sin(dy) / sqrt((1.0+cos(dy))/2.0); rat = ra0; dect = dec0; if ((l != 0.0) || (m != 0.0)) { dz = 4.0 - l*l/(4.0*geo1*geo1) - ((m+geo3)/geo2)*((m+geo3)/geo2) ; if ((dz>4.0) || (dz<2.0)) return(*status = 501); dz = 0.5 * sqrt (dz); dd = (m+geo3) * dz / geo2; if (fabs(dd)>1.0) return(*status = 501); dd = asin (dd); if (fabs(cos(dd))1.0) return(*status = 501); da = asin (da); rat = ra0 + 2.0 * da; dect = dd; } } else { return(*status = 504); } } else if (*cptr == 'N') { /* -NCP North celestial pole*/ if (*(cptr + 1) != 'C' || *(cptr + 2) != 'P') { return(*status = 504); } dect = cos0 - m * sin0; if (dect==0.0) return(*status = 501); rat = ra0 + atan2 (l, dect); dt = cos (rat-ra0); if (dt==0.0) return(*status = 501); dect = dect / dt; if ((dect>1.0) || (dect<-1.0)) return(*status = 501); dect = acos (dect); if (dec0<0.0) dect = -dect; } else if (*cptr == 'G') { /* -GLS global sinusoid */ if (*(cptr + 1) != 'L' || *(cptr + 2) != 'S') { return(*status = 504); } dect = dec0 + m; if (fabs(dect)>TWOPI/4.0) return(*status = 501); coss = cos (dect); if (fabs(l)>TWOPI*coss/2.0) return(*status = 501); rat = ra0; if (coss>deps) rat = rat + l / coss; } else if (*cptr == 'M') { /* -MER mercator*/ if (*(cptr + 1) != 'E' || *(cptr + 2) != 'R') { return(*status = 504); } dt = yinc * cosr + xinc * sinr; if (dt==0.0) dt = 1.0; dy = (yref/2.0 + 45.0) * D2R; dx = dy + dt / 2.0 * D2R; dy = log (tan (dy)); dx = log (tan (dx)); geo2 = dt * D2R / (dx - dy); geo3 = geo2 * dy; geo1 = cos (yref*D2R); if (geo1<=0.0) geo1 = 1.0; rat = l / geo1 + ra0; if (fabs(rat - ra0) > TWOPI) return(*status = 501); dt = 0.0; if (geo2!=0.0) dt = (m + geo3) / geo2; dt = exp (dt); dect = 2.0 * atan (dt) - TWOPI / 4.0; } else { return(*status = 504); } /* correct for RA rollover */ if (rat-ra0>TWOPI/2.0) rat = rat - TWOPI; if (rat-ra0<-TWOPI/2.0) rat = rat + TWOPI; if (rat < 0.0) rat += TWOPI; /* convert to degrees */ *xpos = rat / D2R; *ypos = dect / D2R; return(*status); } /*--------------------------------------------------------------------------*/ int ffxypx(double xpos, double ypos, double xref, double yref, double xrefpix, double yrefpix, double xinc, double yinc, double rot, char *type, double *xpix, double *ypix, int *status) /* This routine is based on the classic AIPS WCS routine. It converts from RA,Dec to pixel location to for 9 projective geometries: "-CAR", "-SIN", "-TAN", "-ARC", "-NCP", "-GLS", "-MER", "-AIT" and "-STG". */ /*-----------------------------------------------------------------------*/ /* routine to determine accurate pixel coordinates for an RA and Dec */ /* returns 0 if successful otherwise: */ /* 501 = angle too large for projection; */ /* 502 = bad values */ /* does: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, -AIT projections */ /* anything else is linear */ /* Input: */ /* d xpos x (RA) coordinate (deg) */ /* d ypos y (dec) coordinate (deg) */ /* d xref x reference coordinate value (deg) */ /* d yref y reference coordinate value (deg) */ /* f xrefpix x reference pixel */ /* f yrefpix y reference pixel */ /* f xinc x coordinate increment (deg) */ /* f yinc y coordinate increment (deg) */ /* f rot rotation (deg) (from N through E) */ /* c *type projection type code e.g. "-SIN"; */ /* Output: */ /* f *xpix x pixel number (RA or long without rotation) */ /* f *ypiy y pixel number (dec or lat without rotation) */ /*-----------------------------------------------------------------------*/ { double dx, dy, dz, r, ra0, dec0, ra, dec, coss, sins, dt, da, dd, sint; double l, m, geo1, geo2, geo3, sinr, cosr, cos0, sin0; double deps=1.0e-5; char *cptr; if (*type != '-') { /* unrecognized projection code */ return(*status = 504); } cptr = type + 1; dt = (xpos - xref); if (dt > 180) xpos -= 360; if (dt < -180) xpos += 360; /* NOTE: changing input argument xpos is OK (call-by-value in C!) */ /* default values - linear */ dx = xpos - xref; dy = ypos - yref; /* Correct for rotation */ r = rot * D2R; cosr = cos (r); sinr = sin (r); dz = dx*cosr + dy*sinr; dy = dy*cosr - dx*sinr; dx = dz; /* check axis increments - bail out if either 0 */ if ((xinc==0.0) || (yinc==0.0)) {*xpix=0.0; *ypix=0.0; return(*status = 502);} /* convert to pixels */ *xpix = dx / xinc + xrefpix; *ypix = dy / yinc + yrefpix; if (*cptr == 'C') { /* linear -CAR */ if (*(cptr + 1) != 'A' || *(cptr + 2) != 'R') { return(*status = 504); } return(*status); /* done if linear */ } /* Non linear position */ ra0 = xref * D2R; dec0 = yref * D2R; ra = xpos * D2R; dec = ypos * D2R; /* compute direction cosine */ coss = cos (dec); sins = sin (dec); cos0 = cos (dec0); sin0 = sin (dec0); l = sin(ra-ra0) * coss; sint = sins * sin0 + coss * cos0 * cos(ra-ra0); /* process by case */ if (*cptr == 'T') { /* -TAN tan */ if (*(cptr + 1) != 'A' || *(cptr + 2) != 'N') { return(*status = 504); } if (sint<=0.0) return(*status = 501); if( cos0<0.001 ) { /* Do a first order expansion around pole */ m = (coss * cos(ra-ra0)) / (sins * sin0); m = (-m + cos0 * (1.0 + m*m)) / sin0; } else { m = ( sins/sint - sin0 ) / cos0; } if( fabs(sin(ra0)) < 0.3 ) { l = coss*sin(ra)/sint - cos0*sin(ra0) + m*sin(ra0)*sin0; l /= cos(ra0); } else { l = coss*cos(ra)/sint - cos0*cos(ra0) + m*cos(ra0)*sin0; l /= -sin(ra0); } } else if (*cptr == 'S') { if (*(cptr + 1) == 'I' && *(cptr + 2) == 'N') { /* -SIN */ if (sint<0.0) return(*status = 501); m = sins * cos(dec0) - coss * sin(dec0) * cos(ra-ra0); } else if (*(cptr + 1) == 'T' && *(cptr + 2) == 'G') { /* -STG Sterographic*/ da = ra - ra0; if (fabs(dec)>TWOPI/4.0) return(*status = 501); dd = 1.0 + sins * sin(dec0) + coss * cos(dec0) * cos(da); if (fabs(dd)1.0) m = 1.0; m = acos (m); if (m!=0) m = m / sin(m); else m = 1.0; l = l * m; m = (sins * cos(dec0) - coss * sin(dec0) * cos(ra-ra0)) * m; } else if (*(cptr + 1) == 'I' && *(cptr + 2) == 'T') { /* -AIT Aitoff */ da = (ra - ra0) / 2.0; if (fabs(da)>TWOPI/4.0) return(*status = 501); dt = yinc*cosr + xinc*sinr; if (dt==0.0) dt = 1.0; dt = dt * D2R; dy = yref * D2R; dx = sin(dy+dt)/sqrt((1.0+cos(dy+dt))/2.0) - sin(dy)/sqrt((1.0+cos(dy))/2.0); if (dx==0.0) dx = 1.0; geo2 = dt / dx; dt = xinc*cosr - yinc* sinr; if (dt==0.0) dt = 1.0; dt = dt * D2R; dx = 2.0 * cos(dy) * sin(dt/2.0); if (dx==0.0) dx = 1.0; geo1 = dt * sqrt((1.0+cos(dy)*cos(dt/2.0))/2.0) / dx; geo3 = geo2 * sin(dy) / sqrt((1.0+cos(dy))/2.0); dt = sqrt ((1.0 + cos(dec) * cos(da))/2.0); if (fabs(dt)TWOPI/4.0) return(*status = 501); if (fabs(dec0)>TWOPI/4.0) return(*status = 501); m = dec - dec0; l = dt * coss; } else if (*cptr == 'M') { /* -MER mercator*/ if (*(cptr + 1) != 'E' || *(cptr + 2) != 'R') { return(*status = 504); } dt = yinc * cosr + xinc * sinr; if (dt==0.0) dt = 1.0; dy = (yref/2.0 + 45.0) * D2R; dx = dy + dt / 2.0 * D2R; dy = log (tan (dy)); dx = log (tan (dx)); geo2 = dt * D2R / (dx - dy); geo3 = geo2 * dy; geo1 = cos (yref*D2R); if (geo1<=0.0) geo1 = 1.0; dt = ra - ra0; l = geo1 * dt; dt = dec / 2.0 + TWOPI / 8.0; dt = tan (dt); if (dt= 199901L # ifndef STDC99 # define STDC99 # endif # endif #endif #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) # define STDC #endif #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) # define STDC #endif #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) # define STDC #endif #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) # define STDC #endif #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ # define STDC #endif #ifndef STDC # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ # define const /* note: need a more gentle solution here */ # endif #endif /* Some Mac compilers merge all .h files incorrectly: */ #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) # define NO_DUMMY_DECL #endif /* Maximum value for memLevel in deflateInit2 */ #ifndef MAX_MEM_LEVEL # ifdef MAXSEG_64K # define MAX_MEM_LEVEL 8 # else # define MAX_MEM_LEVEL 9 # endif #endif /* Maximum value for windowBits in deflateInit2 and inflateInit2. * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files * created by gzip. (Files created by minigzip can still be extracted by * gzip.) */ #ifndef MAX_WBITS # define MAX_WBITS 15 /* 32K LZ77 window */ #endif /* The memory requirements for deflate are (in bytes): (1 << (windowBits+2)) + (1 << (memLevel+9)) that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) plus a few kilobytes for small objects. For example, if you want to reduce the default memory requirements from 256K to 128K, compile with make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" Of course this will generally degrade compression (there's no free lunch). The memory requirements for inflate are (in bytes) 1 << windowBits that is, 32K for windowBits=15 (default value) plus a few kilobytes for small objects. */ /* Type declarations */ #ifndef OF /* function prototypes */ # ifdef STDC # define OF(args) args # else # define OF(args) () # endif #endif /* The following definitions for FAR are needed only for MSDOS mixed * model programming (small or medium model with some far allocations). * This was tested only with MSC; for other MSDOS compilers you may have * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, * just define FAR to be empty. */ #ifdef SYS16BIT # if defined(M_I86SM) || defined(M_I86MM) /* MSC small or medium model */ # define SMALL_MEDIUM # ifdef _MSC_VER # define FAR _far # else # define FAR far # endif # endif # if (defined(__SMALL__) || defined(__MEDIUM__)) /* Turbo C small or medium model */ # define SMALL_MEDIUM # ifdef __BORLANDC__ # define FAR _far # else # define FAR far # endif # endif #endif #if defined(WINDOWS) || defined(WIN32) /* If building or using zlib as a DLL, define ZLIB_DLL. * This is not mandatory, but it offers a little performance increase. */ # ifdef ZLIB_DLL # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) # ifdef ZLIB_INTERNAL # define ZEXTERN extern __declspec(dllexport) # else # define ZEXTERN extern __declspec(dllimport) # endif # endif # endif /* ZLIB_DLL */ /* If building or using zlib with the WINAPI/WINAPIV calling convention, * define ZLIB_WINAPI. * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. */ # ifdef ZLIB_WINAPI # ifdef FAR # undef FAR # endif # include /* No need for _export, use ZLIB.DEF instead. */ /* For complete Windows compatibility, use WINAPI, not __stdcall. */ # define ZEXPORT WINAPI # ifdef WIN32 # define ZEXPORTVA WINAPIV # else # define ZEXPORTVA FAR CDECL # endif # endif #endif #if defined (__BEOS__) # ifdef ZLIB_DLL # ifdef ZLIB_INTERNAL # define ZEXPORT __declspec(dllexport) # define ZEXPORTVA __declspec(dllexport) # else # define ZEXPORT __declspec(dllimport) # define ZEXPORTVA __declspec(dllimport) # endif # endif #endif #ifndef ZEXTERN # define ZEXTERN extern #endif #ifndef ZEXPORT # define ZEXPORT #endif #ifndef ZEXPORTVA # define ZEXPORTVA #endif #ifndef FAR # define FAR #endif #if !defined(__MACTYPES__) typedef unsigned char Byte; /* 8 bits */ #endif typedef unsigned int uInt; /* 16 bits or more */ typedef unsigned long uLong; /* 32 bits or more */ #ifdef SMALL_MEDIUM /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ # define Bytef Byte FAR #else typedef Byte FAR Bytef; #endif typedef char FAR charf; typedef int FAR intf; typedef uInt FAR uIntf; typedef uLong FAR uLongf; #ifdef STDC typedef void const *voidpc; typedef void FAR *voidpf; typedef void *voidp; #else typedef Byte const *voidpc; typedef Byte FAR *voidpf; typedef Byte *voidp; #endif #if !defined(MSDOS) && !defined(WINDOWS) && !defined(WIN32) # define Z_HAVE_UNISTD_H #endif #ifdef STDC # include /* for off_t */ #endif /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even * though the former does not conform to the LFS document), but considering * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as * equivalently requesting no 64-bit operations */ #if -_LARGEFILE64_SOURCE - -1 == 1 # undef _LARGEFILE64_SOURCE #endif #if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # include /* for SEEK_* and off_t */ # ifdef VMS # include /* for off_t */ # endif # ifndef z_off_t # define z_off_t off_t # endif #endif #ifndef SEEK_SET # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif #ifndef z_off_t # define z_off_t long #endif #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 # define z_off64_t off64_t #else # define z_off64_t z_off_t #endif #if defined(__OS400__) # define NO_vsnprintf #endif #if defined(__MVS__) # define NO_vsnprintf #endif /* MVS linker does not support external names larger than 8 bytes */ #if defined(__MVS__) #pragma map(deflateInit_,"DEIN") #pragma map(deflateInit2_,"DEIN2") #pragma map(deflateEnd,"DEEND") #pragma map(deflateBound,"DEBND") #pragma map(inflateInit_,"ININ") #pragma map(inflateInit2_,"ININ2") #pragma map(inflateEnd,"INEND") #pragma map(inflateSync,"INSY") #pragma map(inflateSetDictionary,"INSEDI") #pragma map(compressBound,"CMBND") #pragma map(inflate_table,"INTABL") #pragma map(inflate_fast,"INFA") #pragma map(inflate_copyright,"INCOPY") #endif #endif /* ZCONF_H */ astropy-1.1.1/cextern/cfitsio/drvrfile.c0000644001134200020070000006622412602615517021227 0ustar embrayscience00000000000000/* This file, drvrfile.c contains driver routines for disk files. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include "fitsio2.h" #if defined(unix) || defined(__unix__) || defined(__unix) #include /* needed in file_openfile */ #ifdef REPLACE_LINKS #include #include #endif #endif #ifdef HAVE_FTRUNCATE #if defined(unix) || defined(__unix__) || defined(__unix) #include /* needed for getcwd prototype on unix machines */ #endif #endif #define IO_SEEK 0 /* last file I/O operation was a seek */ #define IO_READ 1 /* last file I/O operation was a read */ #define IO_WRITE 2 /* last file I/O operation was a write */ static char file_outfile[FLEN_FILENAME]; typedef struct /* structure containing disk file structure */ { FILE *fileptr; LONGLONG currentpos; int last_io_op; } diskdriver; static diskdriver handleTable[NMAXFILES]; /* allocate diskfile handle tables */ /*--------------------------------------------------------------------------*/ int file_init(void) { int ii; for (ii = 0; ii < NMAXFILES; ii++) /* initialize all empty slots in table */ { handleTable[ii].fileptr = 0; } return(0); } /*--------------------------------------------------------------------------*/ int file_setoptions(int options) { /* do something with the options argument, to stop compiler warning */ options = 0; return(options); } /*--------------------------------------------------------------------------*/ int file_getoptions(int *options) { *options = 0; return(0); } /*--------------------------------------------------------------------------*/ int file_getversion(int *version) { *version = 10; return(0); } /*--------------------------------------------------------------------------*/ int file_shutdown(void) { return(0); } /*--------------------------------------------------------------------------*/ int file_open(char *filename, int rwmode, int *handle) { FILE *diskfile; int copyhandle, ii, status; char recbuf[2880]; size_t nread; /* if an output filename has been specified as part of the input file, as in "inputfile.fits(outputfile.fit)" then we have to create the output file, copy the input to it, then reopen the the new copy. */ if (*file_outfile) { /* open the original file, with readonly access */ status = file_openfile(filename, READONLY, &diskfile); if (status) { file_outfile[0] = '\0'; return(status); } /* create the output file */ status = file_create(file_outfile,handle); if (status) { ffpmsg("Unable to create output file for copy of input file:"); ffpmsg(file_outfile); file_outfile[0] = '\0'; return(status); } /* copy the file from input to output */ while(0 != (nread = fread(recbuf,1,2880, diskfile))) { status = file_write(*handle, recbuf, nread); if (status) { file_outfile[0] = '\0'; return(status); } } /* close both files */ fclose(diskfile); copyhandle = *handle; file_close(*handle); *handle = copyhandle; /* reuse the old file handle */ /* reopen the new copy, with correct rwmode */ status = file_openfile(file_outfile, rwmode, &diskfile); file_outfile[0] = '\0'; } else { *handle = -1; for (ii = 0; ii < NMAXFILES; ii++) /* find empty slot in table */ { if (handleTable[ii].fileptr == 0) { *handle = ii; break; } } if (*handle == -1) return(TOO_MANY_FILES); /* too many files opened */ /*open the file */ status = file_openfile(filename, rwmode, &diskfile); } handleTable[*handle].fileptr = diskfile; handleTable[*handle].currentpos = 0; handleTable[*handle].last_io_op = IO_SEEK; return(status); } /*--------------------------------------------------------------------------*/ int file_openfile(char *filename, int rwmode, FILE **diskfile) /* lowest level routine to physically open a disk file */ { char mode[4]; #if defined(unix) || defined(__unix__) || defined(__unix) char tempname[1024], *cptr, user[80]; struct passwd *pwd; int ii = 0; #if defined(REPLACE_LINKS) struct stat stbuf; int success = 0; size_t n; FILE *f1, *f2; char buf[BUFSIZ]; #endif #endif if (rwmode == READWRITE) { strcpy(mode, "r+b"); /* open existing file with read-write */ } else { strcpy(mode, "rb"); /* open existing file readonly */ } #if MACHINE == ALPHAVMS || MACHINE == VAXVMS /* specify VMS record structure: fixed format, 2880 byte records */ /* but force stream mode access to enable random I/O access */ *diskfile = fopen(filename, mode, "rfm=fix", "mrs=2880", "ctx=stm"); #elif defined(unix) || defined(__unix__) || defined(__unix) /* support the ~user/file.fits or ~/file.fits filenames in UNIX */ if (*filename == '~') { if (filename[1] == '/') { cptr = getenv("HOME"); if (cptr) { if (strlen(cptr) + strlen(filename+1) > 1023) return(FILE_NOT_OPENED); strcpy(tempname, cptr); strcat(tempname, filename+1); } else { if (strlen(filename) > 1023) return(FILE_NOT_OPENED); strcpy(tempname, filename); } } else { /* copy user name */ cptr = filename+1; while (*cptr && (*cptr != '/')) { user[ii] = *cptr; cptr++; ii++; } user[ii] = '\0'; /* get structure that includes name of user's home directory */ pwd = getpwnam(user); /* copy user's home directory */ if (strlen(pwd->pw_dir) + strlen(cptr) > 1023) return(FILE_NOT_OPENED); strcpy(tempname, pwd->pw_dir); strcat(tempname, cptr); } *diskfile = fopen(tempname, mode); } else { /* don't need to expand the input file name */ *diskfile = fopen(filename, mode); #if defined(REPLACE_LINKS) if (!(*diskfile) && (rwmode == READWRITE)) { /* failed to open file with READWRITE privilege. Test if */ /* the file we are trying to open is a soft link to a file that */ /* doesn't have write privilege. */ lstat(filename, &stbuf); if ((stbuf.st_mode & S_IFMT) == S_IFLNK) /* is this a soft link? */ { if ((f1 = fopen(filename, "rb")) != 0) /* try opening READONLY */ { if (strlen(filename) + 7 > 1023) return(FILE_NOT_OPENED); strcpy(tempname, filename); strcat(tempname, ".TmxFil"); if ((f2 = fopen(tempname, "wb")) != 0) /* create temp file */ { success = 1; while ((n = fread(buf, 1, BUFSIZ, f1)) > 0) { /* copy linked file to local temporary file */ if (fwrite(buf, 1, n, f2) != n) { success = 0; break; } } fclose(f2); } fclose(f1); if (success) { /* delete link and rename temp file to previous link name */ remove(filename); rename(tempname, filename); /* try once again to open the file with write access */ *diskfile = fopen(filename, mode); } else remove(tempname); /* clean up the failed copy */ } } } #endif } #else /* other non-UNIX machines */ *diskfile = fopen(filename, mode); #endif if (!(*diskfile)) /* couldn't open file */ { return(FILE_NOT_OPENED); } return(0); } /*--------------------------------------------------------------------------*/ int file_create(char *filename, int *handle) { FILE *diskfile; int ii; char mode[4]; #if defined(BUILD_HERA) /* special code to verify that the path to the file to be created */ /* is within the users data directory on Hera */ int status = 0, rootlen, rootlen2, slen; char *cpos; char cwd[FLEN_FILENAME], absURL[FLEN_FILENAME]; /* note that "/heradata/users/" is actually "/.hera_mountpnt/hera_users/" */ char rootstring[]="/.hera_mountpnt/hera_users/"; char rootstring2[]="/heradata/users/"; char username[FLEN_FILENAME], userroot[FLEN_FILENAME], userroot2[FLEN_FILENAME]; /* Get the current working directory */ fits_get_cwd(cwd, &status); slen = strlen(cwd); if (cwd[slen-1] != '/') strcat(cwd,"/"); /* make sure the CWD ends with slash */ /* printf("CWD = %s\n", cwd); */ /* check that CWD string matches the rootstring */ rootlen = strlen(rootstring); if (strncmp(rootstring, cwd, rootlen)) { ffpmsg("invalid CWD: does not match Hera data directory"); /* ffpmsg(rootstring); */ return(FILE_NOT_CREATED); } else { /* get the user name from CWD (it follows the root string) */ strcpy(username, cwd+rootlen); cpos=strchr(username, '/'); if (!cpos) { ffpmsg("invalid CWD: not equal to Hera data directory + username"); /* ffpmsg(cwd); */ return(FILE_NOT_CREATED); } else { *(cpos+1) = '\0'; /* truncate user name string */ /* construct full user root name */ strcpy(userroot, rootstring); strcat(userroot, username); rootlen = strlen(userroot); /* construct alternate full user root name */ strcpy(userroot2, rootstring2); strcat(userroot2, username); rootlen2 = strlen(userroot2); /* convert the input filename to absolute path relative to the CWD */ fits_relurl2url(cwd, filename, absURL, &status); /* printf("username = %s\n", username); printf("userroot = %s\n", userroot); printf("filename = %s\n", filename); printf("ABS = %s\n", absURL); */ /* check that CWD string matches the rootstring or alternate root string */ if ( strncmp(userroot, absURL, rootlen) && strncmp(userroot2, absURL, rootlen2) ) { ffpmsg("invalid filename: path not within user directory"); /* ffpmsg(absURL); ffpmsg(userroot); */ return(FILE_NOT_CREATED); } } } /* if we got here, then the input filename appears to be valid */ #endif *handle = -1; for (ii = 0; ii < NMAXFILES; ii++) /* find empty slot in table */ { if (handleTable[ii].fileptr == 0) { *handle = ii; break; } } if (*handle == -1) return(TOO_MANY_FILES); /* too many files opened */ strcpy(mode, "w+b"); /* create new file with read-write */ diskfile = fopen(filename, "r"); /* does file already exist? */ if (diskfile) { fclose(diskfile); /* close file and exit with error */ return(FILE_NOT_CREATED); } #if MACHINE == ALPHAVMS || MACHINE == VAXVMS /* specify VMS record structure: fixed format, 2880 byte records */ /* but force stream mode access to enable random I/O access */ diskfile = fopen(filename, mode, "rfm=fix", "mrs=2880", "ctx=stm"); #else diskfile = fopen(filename, mode); #endif if (!(diskfile)) /* couldn't create file */ { return(FILE_NOT_CREATED); } handleTable[ii].fileptr = diskfile; handleTable[ii].currentpos = 0; handleTable[ii].last_io_op = IO_SEEK; return(0); } /*--------------------------------------------------------------------------*/ int file_truncate(int handle, LONGLONG filesize) /* truncate the diskfile to a new smaller size */ { #ifdef HAVE_FTRUNCATE int fdesc; fdesc = fileno(handleTable[handle].fileptr); ftruncate(fdesc, (OFF_T) filesize); file_seek(handle, filesize); handleTable[handle].currentpos = filesize; handleTable[handle].last_io_op = IO_SEEK; #endif return(0); } /*--------------------------------------------------------------------------*/ int file_size(int handle, LONGLONG *filesize) /* return the size of the file in bytes */ { OFF_T position1,position2; FILE *diskfile; diskfile = handleTable[handle].fileptr; #if defined(_MSC_VER) && (_MSC_VER >= 1400) /* call the VISUAL C++ version of the routines which support */ /* Large Files (> 2GB) if they are supported (since VC 8.0) */ position1 = _ftelli64(diskfile); /* save current postion */ if (position1 < 0) return(SEEK_ERROR); if (_fseeki64(diskfile, 0, 2) != 0) /* seek to end of file */ return(SEEK_ERROR); position2 = _ftelli64(diskfile); /* get file size */ if (position2 < 0) return(SEEK_ERROR); if (_fseeki64(diskfile, position1, 0) != 0) /* seek back to original pos */ return(SEEK_ERROR); #elif _FILE_OFFSET_BITS - 0 == 64 && !defined(__MINGW32__) /* call the newer ftello and fseeko routines , which support */ /* Large Files (> 2GB) if they are supported. */ position1 = ftello(diskfile); /* save current postion */ if (position1 < 0) return(SEEK_ERROR); if (fseeko(diskfile, 0, 2) != 0) /* seek to end of file */ return(SEEK_ERROR); position2 = ftello(diskfile); /* get file size */ if (position2 < 0) return(SEEK_ERROR); if (fseeko(diskfile, position1, 0) != 0) /* seek back to original pos */ return(SEEK_ERROR); #else position1 = ftell(diskfile); /* save current postion */ if (position1 < 0) return(SEEK_ERROR); if (fseek(diskfile, 0, 2) != 0) /* seek to end of file */ return(SEEK_ERROR); position2 = ftell(diskfile); /* get file size */ if (position2 < 0) return(SEEK_ERROR); if (fseek(diskfile, position1, 0) != 0) /* seek back to original pos */ return(SEEK_ERROR); #endif *filesize = (LONGLONG) position2; return(0); } /*--------------------------------------------------------------------------*/ int file_close(int handle) /* close the file */ { if (fclose(handleTable[handle].fileptr) ) return(FILE_NOT_CLOSED); handleTable[handle].fileptr = 0; return(0); } /*--------------------------------------------------------------------------*/ int file_remove(char *filename) /* delete the file from disk */ { remove(filename); return(0); } /*--------------------------------------------------------------------------*/ int file_flush(int handle) /* flush the file */ { if (fflush(handleTable[handle].fileptr) ) return(WRITE_ERROR); /* The flush operation is not supposed to move the internal */ /* file pointer, but it does on some Windows-95 compilers and */ /* perhaps others, so seek to original position to be sure. */ /* This seek will do no harm on other systems. */ #if MACHINE == IBMPC if (file_seek(handle, handleTable[handle].currentpos)) return(SEEK_ERROR); #endif return(0); } /*--------------------------------------------------------------------------*/ int file_seek(int handle, LONGLONG offset) /* seek to position relative to start of the file */ { #if defined(_MSC_VER) && (_MSC_VER >= 1400) /* Microsoft visual studio C++ */ /* _fseeki64 supported beginning with version 8.0 */ if (_fseeki64(handleTable[handle].fileptr, (OFF_T) offset, 0) != 0) return(SEEK_ERROR); #elif _FILE_OFFSET_BITS - 0 == 64 && !defined(__MINGW32__) if (fseeko(handleTable[handle].fileptr, (OFF_T) offset, 0) != 0) return(SEEK_ERROR); #else if (fseek(handleTable[handle].fileptr, (OFF_T) offset, 0) != 0) return(SEEK_ERROR); #endif handleTable[handle].currentpos = offset; return(0); } /*--------------------------------------------------------------------------*/ int file_read(int hdl, void *buffer, long nbytes) /* read bytes from the current position in the file */ { long nread; char *cptr; if (handleTable[hdl].last_io_op == IO_WRITE) { if (file_seek(hdl, handleTable[hdl].currentpos)) return(SEEK_ERROR); } nread = (long) fread(buffer, 1, nbytes, handleTable[hdl].fileptr); if (nread == 1) { cptr = (char *) buffer; /* some editors will add a single end-of-file character to a file */ /* Ignore it if the character is a zero, 10, or 32 */ if (*cptr == 0 || *cptr == 10 || *cptr == 32) return(END_OF_FILE); else return(READ_ERROR); } else if (nread != nbytes) { return(READ_ERROR); } handleTable[hdl].currentpos += nbytes; handleTable[hdl].last_io_op = IO_READ; return(0); } /*--------------------------------------------------------------------------*/ int file_write(int hdl, void *buffer, long nbytes) /* write bytes at the current position in the file */ { if (handleTable[hdl].last_io_op == IO_READ) { if (file_seek(hdl, handleTable[hdl].currentpos)) return(SEEK_ERROR); } if((long) fwrite(buffer, 1, nbytes, handleTable[hdl].fileptr) != nbytes) return(WRITE_ERROR); handleTable[hdl].currentpos += nbytes; handleTable[hdl].last_io_op = IO_WRITE; return(0); } /*--------------------------------------------------------------------------*/ int file_compress_open(char *filename, int rwmode, int *hdl) /* This routine opens the compressed diskfile by creating a new uncompressed file then opening it. The input file name (the name of the compressed file) gets replaced with the name of the uncompressed file, which is initially stored in the global file_outfile string. file_outfile then gets set to a null string. */ { FILE *indiskfile, *outdiskfile; int status; char *cptr; /* open the compressed disk file */ status = file_openfile(filename, READONLY, &indiskfile); if (status) { ffpmsg("failed to open compressed disk file (file_compress_open)"); ffpmsg(filename); return(status); } /* name of the output uncompressed file is stored in the */ /* global variable called 'file_outfile'. */ cptr = file_outfile; if (*cptr == '!') { /* clobber any existing file with the same name */ cptr++; remove(cptr); } else { outdiskfile = fopen(file_outfile, "r"); /* does file already exist? */ if (outdiskfile) { ffpmsg("uncompressed file already exists: (file_compress_open)"); ffpmsg(file_outfile); fclose(outdiskfile); /* close file and exit with error */ file_outfile[0] = '\0'; return(FILE_NOT_CREATED); } } outdiskfile = fopen(cptr, "w+b"); /* create new file */ if (!outdiskfile) { ffpmsg("could not create uncompressed file: (file_compress_open)"); ffpmsg(file_outfile); file_outfile[0] = '\0'; return(FILE_NOT_CREATED); } /* uncompress file into another file */ uncompress2file(filename, indiskfile, outdiskfile, &status); fclose(indiskfile); fclose(outdiskfile); if (status) { ffpmsg("error in file_compress_open: failed to uncompressed file:"); ffpmsg(filename); ffpmsg(" into new output file:"); ffpmsg(file_outfile); file_outfile[0] = '\0'; return(status); } strcpy(filename, cptr); /* switch the names */ file_outfile[0] = '\0'; status = file_open(filename, rwmode, hdl); return(status); } /*--------------------------------------------------------------------------*/ int file_is_compressed(char *filename) /* I - FITS file name */ /* Test if the disk file is compressed. Returns 1 if compressed, 0 if not. This may modify the filename string by appending a compression suffex. */ { FILE *diskfile; unsigned char buffer[2]; char tmpfilename[FLEN_FILENAME]; /* Open file. Try various suffix combinations */ if (file_openfile(filename, 0, &diskfile)) { if (strlen(filename) > FLEN_FILENAME - 1) return(0); strcpy(tmpfilename,filename); strcat(filename,".gz"); if (file_openfile(filename, 0, &diskfile)) { strcpy(filename, tmpfilename); strcat(filename,".Z"); if (file_openfile(filename, 0, &diskfile)) { strcpy(filename, tmpfilename); strcat(filename,".z"); /* it's often lower case on CDROMs */ if (file_openfile(filename, 0, &diskfile)) { strcpy(filename, tmpfilename); strcat(filename,".zip"); if (file_openfile(filename, 0, &diskfile)) { strcpy(filename, tmpfilename); strcat(filename,"-z"); /* VMS suffix */ if (file_openfile(filename, 0, &diskfile)) { strcpy(filename, tmpfilename); strcat(filename,"-gz"); /* VMS suffix */ if (file_openfile(filename, 0, &diskfile)) { strcpy(filename,tmpfilename); /* restore original name */ return(0); /* file not found */ } } } } } } } if (fread(buffer, 1, 2, diskfile) != 2) /* read 2 bytes */ { fclose(diskfile); /* error reading file so just return */ return(0); } fclose(diskfile); /* see if the 2 bytes have the magic values for a compressed file */ if ( (memcmp(buffer, "\037\213", 2) == 0) || /* GZIP */ (memcmp(buffer, "\120\113", 2) == 0) || /* PKZIP */ (memcmp(buffer, "\037\036", 2) == 0) || /* PACK */ (memcmp(buffer, "\037\235", 2) == 0) || /* LZW */ (memcmp(buffer, "\037\240", 2) == 0) ) /* LZH */ { return(1); /* this is a compressed file */ } else { return(0); /* not a compressed file */ } } /*--------------------------------------------------------------------------*/ int file_checkfile (char *urltype, char *infile, char *outfile) { /* special case: if file:// driver, check if the file is compressed */ if ( file_is_compressed(infile) ) { /* if output file has been specified, save the name for future use: */ /* This is the name of the uncompressed file to be created on disk. */ if (strlen(outfile)) { if (!strncmp(outfile, "mem:", 4) ) { /* uncompress the file in memory, with READ and WRITE access */ strcpy(urltype, "compressmem://"); /* use special driver */ *file_outfile = '\0'; } else { strcpy(urltype, "compressfile://"); /* use special driver */ /* don't copy the "file://" prefix, if present. */ if (!strncmp(outfile, "file://", 7) ) strcpy(file_outfile,outfile+7); else strcpy(file_outfile,outfile); } } else { /* uncompress the file in memory */ strcpy(urltype, "compress://"); /* use special driver */ *file_outfile = '\0'; /* no output file was specified */ } } else /* an ordinary, uncompressed FITS file on disk */ { /* save the output file name for later use when opening the file. */ /* In this case, the file to be opened will be opened READONLY, */ /* and copied to this newly created output file. The original file */ /* will be closed, and the copy will be opened by CFITSIO for */ /* subsequent processing (possibly with READWRITE access). */ if (strlen(outfile)) { file_outfile[0] = '\0'; strncat(file_outfile,outfile,FLEN_FILENAME-1); } } return 0; } /**********************************************************************/ /**********************************************************************/ /**********************************************************************/ /**** driver routines for stream//: device (stdin or stdout) ********/ /*--------------------------------------------------------------------------*/ int stream_open(char *filename, int rwmode, int *handle) { /* read from stdin */ if (filename) rwmode = 1; /* dummy statement to suppress unused parameter compiler warning */ *handle = 1; /* 1 = stdin */ return(0); } /*--------------------------------------------------------------------------*/ int stream_create(char *filename, int *handle) { /* write to stdout */ if (filename) /* dummy statement to suppress unused parameter compiler warning */ *handle = 2; else *handle = 2; /* 2 = stdout */ return(0); } /*--------------------------------------------------------------------------*/ int stream_size(int handle, LONGLONG *filesize) /* return the size of the file in bytes */ { handle = 0; /* suppress unused parameter compiler warning */ /* this operation is not supported in a stream; return large value */ *filesize = LONG_MAX; return(0); } /*--------------------------------------------------------------------------*/ int stream_close(int handle) /* don't have to close stdin or stdout */ { handle = 0; /* suppress unused parameter compiler warning */ return(0); } /*--------------------------------------------------------------------------*/ int stream_flush(int handle) /* flush the file */ { if (handle == 2) fflush(stdout); return(0); } /*--------------------------------------------------------------------------*/ int stream_seek(int handle, LONGLONG offset) /* seeking is not allowed in a stream */ { offset = handle; /* suppress unused parameter compiler warning */ return(1); } /*--------------------------------------------------------------------------*/ int stream_read(int hdl, void *buffer, long nbytes) /* reading from stdin stream */ { long nread; if (hdl != 1) return(1); /* can only read from stdin */ nread = (long) fread(buffer, 1, nbytes, stdin); if (nread != nbytes) { /* return(READ_ERROR); */ return(END_OF_FILE); } return(0); } /*--------------------------------------------------------------------------*/ int stream_write(int hdl, void *buffer, long nbytes) /* write bytes at the current position in the file */ { if (hdl != 2) return(1); /* can only write to stdout */ if((long) fwrite(buffer, 1, nbytes, stdout) != nbytes) return(WRITE_ERROR); return(0); } astropy-1.1.1/cextern/cfitsio/getcoll.c0000644001134200020070000005514112602615517021037 0ustar embrayscience00000000000000/* This file, getcoll.c, contains routines that read data elements from */ /* a FITS image or table, with logical datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffgcvl( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ char nulval, /* I - value for null pixels */ char *array, /* O - array of values */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of logical values from a column in the current FITS HDU. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. */ { char cdummy; ffgcll( fptr, colnum, firstrow, firstelem, nelem, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcl( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ char *array, /* O - array of values */ int *status) /* IO - error status */ /* !!!! THIS ROUTINE IS DEPRECATED AND SHOULD NOT BE USED !!!!!! !!!! USE ffgcvl INSTEAD !!!!!! Read an array of logical values from a column in the current FITS HDU. No checking for null values will be performed. */ { char nulval = 0; int anynul; ffgcvl( fptr, colnum, firstrow, firstelem, nelem, nulval, array, &anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfl( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ char *array, /* O - array of values */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of logical values from a column in the current FITS HDU. */ { char nulval = 0; ffgcll( fptr, colnum, firstrow, firstelem, nelem, 2, nulval, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcll( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ char nulval, /* I - value for null pixels if nultyp = 1 */ char *array, /* O - array of values */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of logical values from a column in the current FITS HDU. */ { double dtemp; int tcode, maxelem, hdutype, ii, nulcheck; long twidth, incre; long ntodo; LONGLONG repeat, startpos, elemnum, readptr, tnull, rowlen, rownum, remain, next; double scale, zero; char tform[20]; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ unsigned char buffer[DBUFFSIZE], *buffptr; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); if (anynul) *anynul = 0; if (nultyp == 2) memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 0, &scale, &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); if (tcode != TLOGICAL) return(*status = NOT_LOGICAL_COL); /*------------------------------------------------------------------*/ /* Decide whether to check for null values in the input FITS file: */ /*------------------------------------------------------------------*/ nulcheck = nultyp; /* by default, check for null values in the FITS file */ if (nultyp == 1 && nulval == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ /*---------------------------------------------------------------------*/ /* Now read the logical values from the FITS column. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to read */ next = 0; /* next element in array to be read */ rownum = 0; /* row number, relative to firstrow */ ntodo = (long) remain; /* max number of elements to read at one time */ while (ntodo) { /* limit the number of pixels to read at one time to the number that remain in the current vector. */ ntodo = (long) minvalue(ntodo, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); readptr = startpos + (rowlen * rownum) + (elemnum * incre); ffgi1b(fptr, readptr, ntodo, incre, buffer, status); /* convert from T or F to 1 or 0 */ buffptr = buffer; for (ii = 0; ii < ntodo; ii++, next++, buffptr++) { if (*buffptr == 'T') array[next] = 1; else if (*buffptr =='F') array[next] = 0; else if (*buffptr == 0) { array[next] = nulval; /* set null values to input nulval */ if (anynul) *anynul = 1; if (nulcheck == 2) { nularray[next] = 1; /* set null flags */ } } else /* some other illegal character; return the char value */ { if (*buffptr == 1) { /* this is an unfortunate case where the illegal value is the same as what we set True values to, so set the value to the character '1' instead, which has ASCII value 49. */ array[next] = 49; } else { array[next] = (char) *buffptr; } } } if (*status > 0) /* test for error during previous read operation */ { dtemp = (double) next; sprintf(message, "Error reading elements %.0f thruough %.0f of logical array (ffgcl).", dtemp+1., dtemp + ntodo); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on later row */ { elemnum = 0; rownum++; } } ntodo = (long) remain; /* this is the maximum number to do in next loop */ } /* End of main while Loop */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgcx( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG frow, /* I - first row to write (1 = 1st row) */ LONGLONG fbit, /* I - first bit to write (1 = 1st) */ LONGLONG nbit, /* I - number of bits to write */ char *larray, /* O - array of logicals corresponding to bits */ int *status) /* IO - error status */ /* read an array of logical values from a specified bit or byte column of the binary table. larray is set = TRUE, if the corresponding bit = 1, otherwise it is set to FALSE. The binary table column being read from must have datatype 'B' or 'X'. */ { LONGLONG bstart; long offset, ndone, ii, repeat, bitloc, fbyte; LONGLONG rstart, estart; int tcode, descrp; unsigned char cbuff; static unsigned char onbit[8] = {128, 64, 32, 16, 8, 4, 2, 1}; tcolumn *colptr; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* check input parameters */ if (nbit < 1) return(*status); else if (frow < 1) return(*status = BAD_ROW_NUM); else if (fbit < 1) return(*status = BAD_ELEM_NUM); /* position to the correct HDU */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); fbyte = (long) ((fbit + 7) / 8); bitloc = (long) (fbit - 1 - ((fbit - 1) / 8 * 8)); ndone = 0; rstart = frow - 1; estart = fbyte - 1; colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (abs(tcode) > TBYTE) return(*status = NOT_LOGICAL_COL); /* not correct datatype column */ if (tcode > 0) { descrp = FALSE; /* not a variable length descriptor column */ /* N.B: REPEAT is the number of bytes, not number of bits */ repeat = (long) colptr->trepeat; if (tcode == TBIT) repeat = (repeat + 7) / 8; /* convert from bits to bytes */ if (fbyte > repeat) return(*status = BAD_ELEM_NUM); /* calc the i/o pointer location to start of sequence of pixels */ bstart = (fptr->Fptr)->datastart + ((fptr->Fptr)->rowlength * rstart) + colptr->tbcol + estart; } else { descrp = TRUE; /* a variable length descriptor column */ /* only bit arrays (tform = 'X') are supported for variable */ /* length arrays. REPEAT is the number of BITS in the array. */ ffgdes(fptr, colnum, frow, &repeat, &offset, status); if (tcode == -TBIT) repeat = (repeat + 7) / 8; if ((fbit + nbit + 6) / 8 > repeat) return(*status = BAD_ELEM_NUM); /* calc the i/o pointer location to start of sequence of pixels */ bstart = (fptr->Fptr)->datastart + offset + (fptr->Fptr)->heapstart + estart; } /* move the i/o pointer to the start of the pixel sequence */ if (ffmbyt(fptr, bstart, REPORT_EOF, status) > 0) return(*status); /* read the next byte */ while (1) { if (ffgbyt(fptr, 1, &cbuff, status) > 0) return(*status); for (ii = bitloc; (ii < 8) && (ndone < nbit); ii++, ndone++) { if(cbuff & onbit[ii]) /* test if bit is set */ larray[ndone] = TRUE; else larray[ndone] = FALSE; } if (ndone == nbit) /* finished all the bits */ return(*status); /* not done, so get the next byte */ if (!descrp) { estart++; if (estart == repeat) { /* move the i/o pointer to the next row of pixels */ estart = 0; rstart = rstart + 1; bstart = (fptr->Fptr)->datastart + ((fptr->Fptr)->rowlength * rstart) + colptr->tbcol; ffmbyt(fptr, bstart, REPORT_EOF, status); } } bitloc = 0; } } /*--------------------------------------------------------------------------*/ int ffgcxui(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG nrows, /* I - no. of rows to read */ long input_first_bit, /* I - first bit to read (1 = 1st) */ int input_nbits, /* I - number of bits to read (<= 32) */ unsigned short *array, /* O - array of integer values */ int *status) /* IO - error status */ /* Read a consecutive string of bits from an 'X' or 'B' column and interprete them as an unsigned integer. The number of bits must be less than or equal to 16 or the total number of bits in the column, which ever is less. */ { int ii, firstbit, nbits, bytenum, startbit, numbits, endbit; int firstbyte, lastbyte, nbytes, rshift, lshift; unsigned short colbyte[5]; tcolumn *colptr; char message[81]; if (*status > 0 || nrows == 0) return(*status); /* check input parameters */ if (firstrow < 1) { sprintf(message, "Starting row number is less than 1: %ld (ffgcxui)", (long) firstrow); ffpmsg(message); return(*status = BAD_ROW_NUM); } else if (input_first_bit < 1) { sprintf(message, "Starting bit number is less than 1: %ld (ffgcxui)", input_first_bit); ffpmsg(message); return(*status = BAD_ELEM_NUM); } else if (input_nbits > 16) { sprintf(message, "Number of bits to read is > 16: %d (ffgcxui)", input_nbits); ffpmsg(message); return(*status = BAD_ELEM_NUM); } /* position to the correct HDU */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); if ((fptr->Fptr)->hdutype != BINARY_TBL) { ffpmsg("This is not a binary table extension (ffgcxui)"); return(*status = NOT_BTABLE); } if (colnum > (fptr->Fptr)->tfield) { sprintf(message, "Specified column number is out of range: %d (ffgcxui)", colnum); ffpmsg(message); sprintf(message, " There are %d columns in this table.", (fptr->Fptr)->tfield ); ffpmsg(message); return(*status = BAD_COL_NUM); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ if (abs(colptr->tdatatype) > TBYTE) { ffpmsg("Can only read bits from X or B type columns. (ffgcxui)"); return(*status = NOT_LOGICAL_COL); /* not correct datatype column */ } firstbyte = (input_first_bit - 1 ) / 8 + 1; lastbyte = (input_first_bit + input_nbits - 2) / 8 + 1; nbytes = lastbyte - firstbyte + 1; if (colptr->tdatatype == TBIT && input_first_bit + input_nbits - 1 > (long) colptr->trepeat) { ffpmsg("Too many bits. Tried to read past width of column (ffgcxui)"); return(*status = BAD_ELEM_NUM); } else if (colptr->tdatatype == TBYTE && lastbyte > (long) colptr->trepeat) { ffpmsg("Too many bits. Tried to read past width of column (ffgcxui)"); return(*status = BAD_ELEM_NUM); } for (ii = 0; ii < nrows; ii++) { /* read the relevant bytes from the row */ if (ffgcvui(fptr, colnum, firstrow+ii, firstbyte, nbytes, 0, colbyte, NULL, status) > 0) { ffpmsg("Error reading bytes from column (ffgcxui)"); return(*status); } firstbit = (input_first_bit - 1) % 8; /* modulus operator */ nbits = input_nbits; array[ii] = 0; /* select and shift the bits from each byte into the output word */ while(nbits) { bytenum = firstbit / 8; startbit = firstbit % 8; numbits = minvalue(nbits, 8 - startbit); endbit = startbit + numbits - 1; rshift = 7 - endbit; lshift = nbits - numbits; array[ii] = ((colbyte[bytenum] >> rshift) << lshift) | array[ii]; nbits -= numbits; firstbit += numbits; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgcxuk(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG nrows, /* I - no. of rows to read */ long input_first_bit, /* I - first bit to read (1 = 1st) */ int input_nbits, /* I - number of bits to read (<= 32) */ unsigned int *array, /* O - array of integer values */ int *status) /* IO - error status */ /* Read a consecutive string of bits from an 'X' or 'B' column and interprete them as an unsigned integer. The number of bits must be less than or equal to 32 or the total number of bits in the column, which ever is less. */ { int ii, firstbit, nbits, bytenum, startbit, numbits, endbit; int firstbyte, lastbyte, nbytes, rshift, lshift; unsigned int colbyte[5]; tcolumn *colptr; char message[81]; if (*status > 0 || nrows == 0) return(*status); /* check input parameters */ if (firstrow < 1) { sprintf(message, "Starting row number is less than 1: %ld (ffgcxuk)", (long) firstrow); ffpmsg(message); return(*status = BAD_ROW_NUM); } else if (input_first_bit < 1) { sprintf(message, "Starting bit number is less than 1: %ld (ffgcxuk)", input_first_bit); ffpmsg(message); return(*status = BAD_ELEM_NUM); } else if (input_nbits > 32) { sprintf(message, "Number of bits to read is > 32: %d (ffgcxuk)", input_nbits); ffpmsg(message); return(*status = BAD_ELEM_NUM); } /* position to the correct HDU */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); if ((fptr->Fptr)->hdutype != BINARY_TBL) { ffpmsg("This is not a binary table extension (ffgcxuk)"); return(*status = NOT_BTABLE); } if (colnum > (fptr->Fptr)->tfield) { sprintf(message, "Specified column number is out of range: %d (ffgcxuk)", colnum); ffpmsg(message); sprintf(message, " There are %d columns in this table.", (fptr->Fptr)->tfield ); ffpmsg(message); return(*status = BAD_COL_NUM); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ if (abs(colptr->tdatatype) > TBYTE) { ffpmsg("Can only read bits from X or B type columns. (ffgcxuk)"); return(*status = NOT_LOGICAL_COL); /* not correct datatype column */ } firstbyte = (input_first_bit - 1 ) / 8 + 1; lastbyte = (input_first_bit + input_nbits - 2) / 8 + 1; nbytes = lastbyte - firstbyte + 1; if (colptr->tdatatype == TBIT && input_first_bit + input_nbits - 1 > (long) colptr->trepeat) { ffpmsg("Too many bits. Tried to read past width of column (ffgcxuk)"); return(*status = BAD_ELEM_NUM); } else if (colptr->tdatatype == TBYTE && lastbyte > (long) colptr->trepeat) { ffpmsg("Too many bits. Tried to read past width of column (ffgcxuk)"); return(*status = BAD_ELEM_NUM); } for (ii = 0; ii < nrows; ii++) { /* read the relevant bytes from the row */ if (ffgcvuk(fptr, colnum, firstrow+ii, firstbyte, nbytes, 0, colbyte, NULL, status) > 0) { ffpmsg("Error reading bytes from column (ffgcxuk)"); return(*status); } firstbit = (input_first_bit - 1) % 8; /* modulus operator */ nbits = input_nbits; array[ii] = 0; /* select and shift the bits from each byte into the output word */ while(nbits) { bytenum = firstbit / 8; startbit = firstbit % 8; numbits = minvalue(nbits, 8 - startbit); endbit = startbit + numbits - 1; rshift = 7 - endbit; lshift = nbits - numbits; array[ii] = ((colbyte[bytenum] >> rshift) << lshift) | array[ii]; nbits -= numbits; firstbit += numbits; } } return(*status); } astropy-1.1.1/cextern/cfitsio/modkey.c0000644001134200020070000017563212602615520020700 0ustar embrayscience00000000000000/* This file, modkey.c, contains routines that modify, insert, or update */ /* keywords in a FITS header. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include /* stddef.h is apparently needed to define size_t */ #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffuky( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ const char *keyname,/* I - name of keyword to write */ void *value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Update the keyword, value and comment in the FITS header. The datatype is specified by the 2nd argument. */ { if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (datatype == TSTRING) { ffukys(fptr, keyname, (char *) value, comm, status); } else if (datatype == TBYTE) { ffukyj(fptr, keyname, (LONGLONG) *(unsigned char *) value, comm, status); } else if (datatype == TSBYTE) { ffukyj(fptr, keyname, (LONGLONG) *(signed char *) value, comm, status); } else if (datatype == TUSHORT) { ffukyj(fptr, keyname, (LONGLONG) *(unsigned short *) value, comm, status); } else if (datatype == TSHORT) { ffukyj(fptr, keyname, (LONGLONG) *(short *) value, comm, status); } else if (datatype == TINT) { ffukyj(fptr, keyname, (LONGLONG) *(int *) value, comm, status); } else if (datatype == TUINT) { ffukyg(fptr, keyname, (double) *(unsigned int *) value, 0, comm, status); } else if (datatype == TLOGICAL) { ffukyl(fptr, keyname, *(int *) value, comm, status); } else if (datatype == TULONG) { ffukyg(fptr, keyname, (double) *(unsigned long *) value, 0, comm, status); } else if (datatype == TLONG) { ffukyj(fptr, keyname, (LONGLONG) *(long *) value, comm, status); } else if (datatype == TLONGLONG) { ffukyj(fptr, keyname, *(LONGLONG *) value, comm, status); } else if (datatype == TFLOAT) { ffukye(fptr, keyname, *(float *) value, -7, comm, status); } else if (datatype == TDOUBLE) { ffukyd(fptr, keyname, *(double *) value, -15, comm, status); } else if (datatype == TCOMPLEX) { ffukyc(fptr, keyname, (float *) value, -7, comm, status); } else if (datatype == TDBLCOMPLEX) { ffukym(fptr, keyname, (double *) value, -15, comm, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffukyu(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmkyu(fptr, keyname, comm, status) == KEY_NO_EXIST) { *status = tstatus; ffpkyu(fptr, keyname, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffukys(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ const char *value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmkys(fptr, keyname, value, comm, status) == KEY_NO_EXIST) { *status = tstatus; ffpkys(fptr, keyname, value, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffukls(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ const char *value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { /* update a long string keyword */ int tstatus; char junk[FLEN_ERRMSG]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmkls(fptr, keyname, value, comm, status) == KEY_NO_EXIST) { /* since the ffmkls call failed, it wrote a bogus error message */ fits_read_errmsg(junk); /* clear the error message */ *status = tstatus; ffpkls(fptr, keyname, value, comm, status); } return(*status); }/*--------------------------------------------------------------------------*/ int ffukyl(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ int value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmkyl(fptr, keyname, value, comm, status) == KEY_NO_EXIST) { *status = tstatus; ffpkyl(fptr, keyname, value, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffukyj(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ LONGLONG value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmkyj(fptr, keyname, value, comm, status) == KEY_NO_EXIST) { *status = tstatus; ffpkyj(fptr, keyname, value, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffukyf(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ float value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmkyf(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) { *status = tstatus; ffpkyf(fptr, keyname, value, decim, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffukye(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ float value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmkye(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) { *status = tstatus; ffpkye(fptr, keyname, value, decim, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffukyg(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ double value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmkyg(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) { *status = tstatus; ffpkyg(fptr, keyname, value, decim, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffukyd(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ double value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmkyd(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) { *status = tstatus; ffpkyd(fptr, keyname, value, decim, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffukfc(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ float *value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmkfc(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) { *status = tstatus; ffpkfc(fptr, keyname, value, decim, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffukyc(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ float *value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmkyc(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) { *status = tstatus; ffpkyc(fptr, keyname, value, decim, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffukfm(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ double *value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmkfm(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) { *status = tstatus; ffpkfm(fptr, keyname, value, decim, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffukym(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ double *value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmkym(fptr, keyname, value, decim, comm, status) == KEY_NO_EXIST) { *status = tstatus; ffpkym(fptr, keyname, value, decim, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffucrd(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ const char *card, /* I - card string value */ int *status) /* IO - error status */ { int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = *status; if (ffmcrd(fptr, keyname, card, status) == KEY_NO_EXIST) { *status = tstatus; ffprec(fptr, card, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffmrec(fitsfile *fptr, /* I - FITS file pointer */ int nkey, /* I - number of the keyword to modify */ const char *card, /* I - card string value */ int *status) /* IO - error status */ { if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffmaky(fptr, nkey+1, status); ffmkey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffmcrd(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ const char *card, /* I - card string value */ int *status) /* IO - error status */ { char tcard[FLEN_CARD], valstring[FLEN_CARD], comm[FLEN_CARD], value[FLEN_CARD]; int keypos, len; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgcrd(fptr, keyname, tcard, status) > 0) return(*status); ffmkey(fptr, card, status); /* calc position of keyword in header */ keypos = (int) ((((fptr->Fptr)->nextkey) - ((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu])) / 80) + 1; ffpsvc(tcard, valstring, comm, status); if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* check for string value which may be continued over multiple keywords */ ffpmrk(); /* put mark on message stack; erase any messages after this */ ffc2s(valstring, value, status); /* remove quotes and trailing spaces */ if (*status == VALUE_UNDEFINED) { ffcmrk(); /* clear any spurious error messages, back to the mark */ *status = 0; } else { len = strlen(value); while (len && value[len - 1] == '&') /* ampersand used as continuation char */ { ffgcnt(fptr, value, status); if (*value) { ffdrec(fptr, keypos, status); /* delete the keyword */ len = strlen(value); } else /* a null valstring indicates no continuation */ len = 0; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffmnam(fitsfile *fptr, /* I - FITS file pointer */ const char *oldname,/* I - existing keyword name */ const char *newname,/* I - new name for keyword */ int *status) /* IO - error status */ { char comm[FLEN_COMMENT]; char value[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, oldname, value, comm, status) > 0) return(*status); ffmkky(newname, value, comm, card, status); /* construct the card */ ffmkey(fptr, card, status); /* rewrite with new name */ return(*status); } /*--------------------------------------------------------------------------*/ int ffmcom(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char oldcomm[FLEN_COMMENT]; char value[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, value, oldcomm, status) > 0) return(*status); ffmkky(keyname, value, comm, card, status); /* construct the card */ ffmkey(fptr, card, status); /* rewrite with new comment */ return(*status); } /*--------------------------------------------------------------------------*/ int ffpunt(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ const char *unit, /* I - keyword unit string */ int *status) /* IO - error status */ /* Write (put) the units string into the comment field of the existing keyword. This routine uses a local FITS convention (not defined in the official FITS standard) in which the units are enclosed in square brackets following the '/' comment field delimiter, e.g.: KEYWORD = 12 / [kpc] comment string goes here */ { char oldcomm[FLEN_COMMENT]; char newcomm[FLEN_COMMENT]; char value[FLEN_VALUE]; char card[FLEN_CARD]; char *loc; size_t len; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, value, oldcomm, status) > 0) return(*status); /* copy the units string to the new comment string if not null */ if (*unit) { strcpy(newcomm, "["); strncat(newcomm, unit, 45); /* max allowed length is about 45 chars */ strcat(newcomm, "] "); len = strlen(newcomm); len = FLEN_COMMENT - len - 1; /* amount of space left in the field */ } else { newcomm[0] = '\0'; len = FLEN_COMMENT - 1; } if (oldcomm[0] == '[') /* check for existing units field */ { loc = strchr(oldcomm, ']'); /* look for the closing bracket */ if (loc) { loc++; while (*loc == ' ') /* skip any blank spaces */ loc++; strncat(newcomm, loc, len); /* concat remainder of comment */ } else { strncat(newcomm, oldcomm, len); /* append old comment onto new */ } } else { strncat(newcomm, oldcomm, len); } ffmkky(keyname, value, newcomm, card, status); /* construct the card */ ffmkey(fptr, card, status); /* rewrite with new units string */ return(*status); } /*--------------------------------------------------------------------------*/ int ffmkyu(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - keyword name */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char oldcomm[FLEN_COMMENT]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) return(*status); /* get old comment */ strcpy(valstring," "); /* create a dummy value string */ if (!comm || comm[0] == '&') /* preserve the current comment string */ ffmkky(keyname, valstring, oldcomm, card, status); else ffmkky(keyname, valstring, comm, card, status); ffmkey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffmkys(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ const char *value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { /* NOTE: This routine does not support long continued strings */ /* It will correctly overwrite an existing long continued string, */ /* but it will not write a new long string. */ char oldval[FLEN_VALUE], valstring[FLEN_VALUE]; char oldcomm[FLEN_COMMENT]; char card[FLEN_CARD]; int len, keypos; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, oldval, oldcomm, status) > 0) return(*status); /* get old comment */ ffs2c(value, valstring, status); /* convert value to a string */ if (!comm || comm[0] == '&') /* preserve the current comment string */ ffmkky(keyname, valstring, oldcomm, card, status); else ffmkky(keyname, valstring, comm, card, status); ffmkey(fptr, card, status); /* overwrite the previous keyword */ keypos = (int) (((((fptr->Fptr)->nextkey) - ((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu])) / 80) + 1); if (*status > 0) return(*status); /* check if old string value was continued over multiple keywords */ ffpmrk(); /* put mark on message stack; erase any messages after this */ ffc2s(oldval, valstring, status); /* remove quotes and trailing spaces */ if (*status == VALUE_UNDEFINED) { ffcmrk(); /* clear any spurious error messages, back to the mark */ *status = 0; } else { len = strlen(valstring); while (len && valstring[len - 1] == '&') /* ampersand is continuation char */ { ffgcnt(fptr, valstring, status); if (*valstring) { ffdrec(fptr, keypos, status); /* delete the continuation */ len = strlen(valstring); } else /* a null valstring indicates no continuation */ len = 0; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffmkls( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to write */ const char *value, /* I - keyword value */ const char *incomm, /* I - keyword comment */ int *status) /* IO - error status */ /* Modify the value and optionally the comment of a long string keyword. This routine supports the HEASARC long string convention and can modify arbitrarily long string keyword values. The value is continued over multiple keywords that have the name COMTINUE without an equal sign in column 9 of the card. This routine also supports simple string keywords which are less than 69 characters in length. This routine is not very efficient, so it should be used sparingly. */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD], tmpkeyname[FLEN_CARD]; char comm[FLEN_COMMENT]; char tstring[FLEN_VALUE], *cptr; char *longval; int next, remain, vlen, nquote, nchar, namelen, contin, tstatus = -1; int nkeys, keypos; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (!incomm || incomm[0] == '&') /* preserve the old comment string */ { ffghps(fptr, &nkeys, &keypos, status); /* save current position */ if (ffgkls(fptr, keyname, &longval, comm, status) > 0) return(*status); /* keyword doesn't exist */ free(longval); /* don't need the old value */ /* move back to previous position to ensure that we delete */ /* the right keyword in case there are more than one keyword */ /* with this same name. */ ffgrec(fptr, keypos - 1, card, status); } else { /* copy the input comment string */ strncpy(comm, incomm, FLEN_COMMENT-1); comm[FLEN_COMMENT-1] = '\0'; } /* delete the old keyword */ if (ffdkey(fptr, keyname, status) > 0) return(*status); /* keyword doesn't exist */ ffghps(fptr, &nkeys, &keypos, status); /* save current position */ /* now construct the new keyword, and insert into header */ remain = strlen(value); /* number of characters to write out */ next = 0; /* pointer to next character to write */ /* count the number of single quote characters in the string */ nquote = 0; cptr = strchr(value, '\''); /* search for quote character */ while (cptr) /* search for quote character */ { nquote++; /* increment no. of quote characters */ cptr++; /* increment pointer to next character */ cptr = strchr(cptr, '\''); /* search for another quote char */ } strncpy(tmpkeyname, keyname, 80); tmpkeyname[80] = '\0'; cptr = tmpkeyname; while(*cptr == ' ') /* skip over leading spaces in name */ cptr++; /* determine the number of characters that will fit on the line */ /* Note: each quote character is expanded to 2 quotes */ namelen = strlen(cptr); if (namelen <= 8 && (fftkey(cptr, &tstatus) <= 0) ) { /* This a normal 8-character FITS keyword */ nchar = 68 - nquote; /* max of 68 chars fit in a FITS string value */ } else { /* This a HIERARCH keyword */ if (FSTRNCMP(cptr, "HIERARCH ", 9) && FSTRNCMP(cptr, "hierarch ", 9)) nchar = 66 - nquote - namelen; else nchar = 75 - nquote - namelen; /* don't count 'HIERARCH' twice */ } contin = 0; while (remain > 0) { strncpy(tstring, &value[next], nchar); /* copy string to temp buff */ tstring[nchar] = '\0'; ffs2c(tstring, valstring, status); /* put quotes around the string */ if (remain > nchar) /* if string is continued, put & as last char */ { vlen = strlen(valstring); nchar -= 1; /* outputting one less character now */ if (valstring[vlen-2] != '\'') valstring[vlen-2] = '&'; /* over write last char with & */ else { /* last char was a pair of single quotes, so over write both */ valstring[vlen-3] = '&'; valstring[vlen-1] = '\0'; } } if (contin) /* This is a CONTINUEd keyword */ { ffmkky("CONTINUE", valstring, comm, card, status); /* make keyword */ strncpy(&card[8], " ", 2); /* overwrite the '=' */ } else { ffmkky(keyname, valstring, comm, card, status); /* make keyword */ } ffirec(fptr, keypos, card, status); /* insert the keyword */ keypos++; /* next insert position */ contin = 1; remain -= nchar; next += nchar; nchar = 68 - nquote; } return(*status); } /*--------------------------------------------------------------------------*/ int ffmkyl(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ int value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char oldcomm[FLEN_COMMENT]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) return(*status); /* get old comment */ ffl2c(value, valstring, status); /* convert value to a string */ if (!comm || comm[0] == '&') /* preserve the current comment string */ ffmkky(keyname, valstring, oldcomm, card, status); else ffmkky(keyname, valstring, comm, card, status); ffmkey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffmkyj(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ LONGLONG value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char oldcomm[FLEN_COMMENT]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) return(*status); /* get old comment */ ffi2c(value, valstring, status); /* convert value to a string */ if (!comm || comm[0] == '&') /* preserve the current comment string */ ffmkky(keyname, valstring, oldcomm, card, status); else ffmkky(keyname, valstring, comm, card, status); ffmkey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffmkyf(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ float value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char oldcomm[FLEN_COMMENT]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) return(*status); /* get old comment */ ffr2f(value, decim, valstring, status); /* convert value to a string */ if (!comm || comm[0] == '&') /* preserve the current comment string */ ffmkky(keyname, valstring, oldcomm, card, status); else ffmkky(keyname, valstring, comm, card, status); ffmkey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffmkye(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ float value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char oldcomm[FLEN_COMMENT]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) return(*status); /* get old comment */ ffr2e(value, decim, valstring, status); /* convert value to a string */ if (!comm || comm[0] == '&') /* preserve the current comment string */ ffmkky(keyname, valstring, oldcomm, card, status); else ffmkky(keyname, valstring, comm, card, status); ffmkey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffmkyg(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ double value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char oldcomm[FLEN_COMMENT]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) return(*status); /* get old comment */ ffd2f(value, decim, valstring, status); /* convert value to a string */ if (!comm || comm[0] == '&') /* preserve the current comment string */ ffmkky(keyname, valstring, oldcomm, card, status); else ffmkky(keyname, valstring, comm, card, status); ffmkey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffmkyd(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ double value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char oldcomm[FLEN_COMMENT]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) return(*status); /* get old comment */ ffd2e(value, decim, valstring, status); /* convert value to a string */ if (!comm || comm[0] == '&') /* preserve the current comment string */ ffmkky(keyname, valstring, oldcomm, card, status); else ffmkky(keyname, valstring, comm, card, status); ffmkey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffmkfc(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ float *value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; char oldcomm[FLEN_COMMENT]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) return(*status); /* get old comment */ strcpy(valstring, "(" ); ffr2f(value[0], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ", "); ffr2f(value[1], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ")"); if (!comm || comm[0] == '&') /* preserve the current comment string */ ffmkky(keyname, valstring, oldcomm, card, status); else ffmkky(keyname, valstring, comm, card, status); ffmkey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffmkyc(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ float *value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; char oldcomm[FLEN_COMMENT]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) return(*status); /* get old comment */ strcpy(valstring, "(" ); ffr2e(value[0], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ", "); ffr2e(value[1], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ")"); if (!comm || comm[0] == '&') /* preserve the current comment string */ ffmkky(keyname, valstring, oldcomm, card, status); else ffmkky(keyname, valstring, comm, card, status); ffmkey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffmkfm(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ double *value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; char oldcomm[FLEN_COMMENT]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) return(*status); /* get old comment */ strcpy(valstring, "(" ); ffd2f(value[0], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ", "); ffd2f(value[1], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ")"); if (!comm || comm[0] == '&') /* preserve the current comment string */ ffmkky(keyname, valstring, oldcomm, card, status); else ffmkky(keyname, valstring, comm, card, status); ffmkey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffmkym(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ double *value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; char oldcomm[FLEN_COMMENT]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, valstring, oldcomm, status) > 0) return(*status); /* get old comment */ strcpy(valstring, "(" ); ffd2e(value[0], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ", "); ffd2e(value[1], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ")"); if (!comm || comm[0] == '&') /* preserve the current comment string */ ffmkky(keyname, valstring, oldcomm, card, status); else ffmkky(keyname, valstring, comm, card, status); ffmkey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffikyu(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Insert a null-valued keyword and comment into the FITS header. */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); strcpy(valstring," "); /* create a dummy value string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffikey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffikys(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ const char *value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffs2c(value, valstring, status); /* put quotes around the string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffikey(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffikls( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to write */ const char *value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Insert a long string keyword. This routine supports the HEASARC long string convention and can insert arbitrarily long string keyword values. The value is continued over multiple keywords that have the name COMTINUE without an equal sign in column 9 of the card. This routine also supports simple string keywords which are less than 69 characters in length. */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD], tmpkeyname[FLEN_CARD]; char tstring[FLEN_VALUE], *cptr; int next, remain, vlen, nquote, nchar, namelen, contin, tstatus = -1; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* construct the new keyword, and insert into header */ remain = strlen(value); /* number of characters to write out */ next = 0; /* pointer to next character to write */ /* count the number of single quote characters in the string */ nquote = 0; cptr = strchr(value, '\''); /* search for quote character */ while (cptr) /* search for quote character */ { nquote++; /* increment no. of quote characters */ cptr++; /* increment pointer to next character */ cptr = strchr(cptr, '\''); /* search for another quote char */ } strncpy(tmpkeyname, keyname, 80); tmpkeyname[80] = '\0'; cptr = tmpkeyname; while(*cptr == ' ') /* skip over leading spaces in name */ cptr++; /* determine the number of characters that will fit on the line */ /* Note: each quote character is expanded to 2 quotes */ namelen = strlen(cptr); if (namelen <= 8 && (fftkey(cptr, &tstatus) <= 0) ) { /* This a normal 8-character FITS keyword */ nchar = 68 - nquote; /* max of 68 chars fit in a FITS string value */ } else { /* This a HIERARCH keyword */ if (FSTRNCMP(cptr, "HIERARCH ", 9) && FSTRNCMP(cptr, "hierarch ", 9)) nchar = 66 - nquote - namelen; else nchar = 75 - nquote - namelen; /* don't count 'HIERARCH' twice */ } contin = 0; while (remain > 0) { strncpy(tstring, &value[next], nchar); /* copy string to temp buff */ tstring[nchar] = '\0'; ffs2c(tstring, valstring, status); /* put quotes around the string */ if (remain > nchar) /* if string is continued, put & as last char */ { vlen = strlen(valstring); nchar -= 1; /* outputting one less character now */ if (valstring[vlen-2] != '\'') valstring[vlen-2] = '&'; /* over write last char with & */ else { /* last char was a pair of single quotes, so over write both */ valstring[vlen-3] = '&'; valstring[vlen-1] = '\0'; } } if (contin) /* This is a CONTINUEd keyword */ { ffmkky("CONTINUE", valstring, comm, card, status); /* make keyword */ strncpy(&card[8], " ", 2); /* overwrite the '=' */ } else { ffmkky(keyname, valstring, comm, card, status); /* make keyword */ } ffikey(fptr, card, status); /* insert the keyword */ contin = 1; remain -= nchar; next += nchar; nchar = 68 - nquote; } return(*status); } /*--------------------------------------------------------------------------*/ int ffikyl(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ int value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffl2c(value, valstring, status); /* convert logical to 'T' or 'F' */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffikey(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffikyj(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ LONGLONG value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffi2c(value, valstring, status); /* convert to formatted string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffikey(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffikyf(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ float value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffr2f(value, decim, valstring, status); /* convert to formatted string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffikey(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffikye(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ float value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffr2e(value, decim, valstring, status); /* convert to formatted string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffikey(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffikyg(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ double value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffd2f(value, decim, valstring, status); /* convert to formatted string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffikey(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffikyd(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ double value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffd2e(value, decim, valstring, status); /* convert to formatted string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffikey(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffikfc(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ float *value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); strcpy(valstring, "(" ); ffr2f(value[0], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ", "); ffr2f(value[1], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ")"); ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffikey(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffikyc(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ float *value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); strcpy(valstring, "(" ); ffr2e(value[0], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ", "); ffr2e(value[1], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ")"); ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffikey(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffikfm(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ double *value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); strcpy(valstring, "(" ); ffd2f(value[0], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ", "); ffd2f(value[1], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ")"); ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffikey(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffikym(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ double *value, /* I - keyword value */ int decim, /* I - no of decimals */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ { char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); strcpy(valstring, "(" ); ffd2e(value[0], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ", "); ffd2e(value[1], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ")"); ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffikey(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffirec(fitsfile *fptr, /* I - FITS file pointer */ int nkey, /* I - position to insert new keyword */ const char *card, /* I - card string value */ int *status) /* IO - error status */ { if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffmaky(fptr, nkey, status); /* move to insert position */ ffikey(fptr, card, status); /* insert the keyword card */ return(*status); } /*--------------------------------------------------------------------------*/ int ffikey(fitsfile *fptr, /* I - FITS file pointer */ const char *card, /* I - card string value */ int *status) /* IO - error status */ /* insert a keyword at the position of (fptr->Fptr)->nextkey */ { int ii, len, nshift; long nblocks; LONGLONG bytepos; char *inbuff, *outbuff, *tmpbuff, buff1[FLEN_CARD], buff2[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if ( ((fptr->Fptr)->datastart - (fptr->Fptr)->headend) == 80) /* only room for END card */ { nblocks = 1; if (ffiblk(fptr, nblocks, 0, status) > 0) /* add new 2880-byte block*/ return(*status); } /* no. keywords to shift */ nshift= (int) (( (fptr->Fptr)->headend - (fptr->Fptr)->nextkey ) / 80); strncpy(buff2, card, 80); /* copy card to output buffer */ buff2[80] = '\0'; len = strlen(buff2); /* silently replace any illegal characters with a space */ for (ii=0; ii < len; ii++) if (buff2[ii] < ' ' || buff2[ii] > 126) buff2[ii] = ' '; for (ii=len; ii < 80; ii++) /* fill buffer with spaces if necessary */ buff2[ii] = ' '; for (ii=0; ii < 8; ii++) /* make sure keyword name is uppercase */ buff2[ii] = toupper(buff2[ii]); fftkey(buff2, status); /* test keyword name contains legal chars */ /* no need to do this any more, since any illegal characters have been removed fftrec(buff2, status); */ /* test rest of keyword for legal chars */ inbuff = buff1; outbuff = buff2; bytepos = (fptr->Fptr)->nextkey; /* pointer to next keyword in header */ ffmbyt(fptr, bytepos, REPORT_EOF, status); for (ii = 0; ii < nshift; ii++) /* shift each keyword down one position */ { ffgbyt(fptr, 80, inbuff, status); /* read the current keyword */ ffmbyt(fptr, bytepos, REPORT_EOF, status); /* move back */ ffpbyt(fptr, 80, outbuff, status); /* overwrite with other buffer */ tmpbuff = inbuff; /* swap input and output buffers */ inbuff = outbuff; outbuff = tmpbuff; bytepos += 80; } ffpbyt(fptr, 80, outbuff, status); /* write the final keyword */ (fptr->Fptr)->headend += 80; /* increment the position of the END keyword */ (fptr->Fptr)->nextkey += 80; /* increment the pointer to next keyword */ return(*status); } /*--------------------------------------------------------------------------*/ int ffdkey(fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - keyword name */ int *status) /* IO - error status */ /* delete a specified header keyword */ { int keypos, len; char valstring[FLEN_VALUE], comm[FLEN_COMMENT], value[FLEN_VALUE]; char message[FLEN_ERRMSG]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgkey(fptr, keyname, valstring, comm, status) > 0) /* read keyword */ { sprintf(message, "Could not find the %s keyword to delete (ffdkey)", keyname); ffpmsg(message); return(*status); } /* calc position of keyword in header */ keypos = (int) ((((fptr->Fptr)->nextkey) - ((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu])) / 80); ffdrec(fptr, keypos, status); /* delete the keyword */ if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* check for string value which may be continued over multiple keywords */ ffpmrk(); /* put mark on message stack; erase any messages after this */ ffc2s(valstring, value, status); /* remove quotes and trailing spaces */ if (*status == VALUE_UNDEFINED) { ffcmrk(); /* clear any spurious error messages, back to the mark */ *status = 0; } else { len = strlen(value); while (len && value[len - 1] == '&') /* ampersand used as continuation char */ { ffgcnt(fptr, value, status); if (*value) { ffdrec(fptr, keypos, status); /* delete the keyword */ len = strlen(value); } else /* a null valstring indicates no continuation */ len = 0; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffdstr(fitsfile *fptr, /* I - FITS file pointer */ const char *string, /* I - keyword name */ int *status) /* IO - error status */ /* delete a specified header keyword containing the input string */ { int keypos, len; char valstring[FLEN_VALUE], comm[FLEN_COMMENT], value[FLEN_VALUE]; char card[FLEN_CARD], message[FLEN_ERRMSG]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (ffgstr(fptr, string, card, status) > 0) /* read keyword */ { sprintf(message, "Could not find the %s keyword to delete (ffdkey)", string); ffpmsg(message); return(*status); } /* calc position of keyword in header */ keypos = (int) ((((fptr->Fptr)->nextkey) - ((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu])) / 80); ffdrec(fptr, keypos, status); /* delete the keyword */ /* check for string value which may be continued over multiple keywords */ ffpsvc(card, valstring, comm, status); if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* check for string value which may be continued over multiple keywords */ ffpmrk(); /* put mark on message stack; erase any messages after this */ ffc2s(valstring, value, status); /* remove quotes and trailing spaces */ if (*status == VALUE_UNDEFINED) { ffcmrk(); /* clear any spurious error messages, back to the mark */ *status = 0; } else { len = strlen(value); while (len && value[len - 1] == '&') /* ampersand used as continuation char */ { ffgcnt(fptr, value, status); if (*value) { ffdrec(fptr, keypos, status); /* delete the keyword */ len = strlen(value); } else /* a null valstring indicates no continuation */ len = 0; } } return(*status); }/*--------------------------------------------------------------------------*/ int ffdrec(fitsfile *fptr, /* I - FITS file pointer */ int keypos, /* I - position in header of keyword to delete */ int *status) /* IO - error status */ /* Delete a header keyword at position keypos. The 1st keyword is at keypos=1. */ { int ii, nshift; LONGLONG bytepos; char *inbuff, *outbuff, *tmpbuff, buff1[81], buff2[81]; char message[FLEN_ERRMSG]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if (keypos < 1 || keypos > (fptr->Fptr)->headend - (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] / 80 ) return(*status = KEY_OUT_BOUNDS); (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] + (keypos - 1) * 80; nshift=(int) (( (fptr->Fptr)->headend - (fptr->Fptr)->nextkey ) / 80); /* no. keywords to shift */ if (nshift <= 0) { sprintf(message, "Cannot delete keyword number %d. It does not exist.", keypos); ffpmsg(message); return(*status = KEY_OUT_BOUNDS); } bytepos = (fptr->Fptr)->headend - 80; /* last keyword in header */ /* construct a blank keyword */ strcpy(buff2, " "); strcat(buff2, " "); inbuff = buff1; outbuff = buff2; for (ii = 0; ii < nshift; ii++) /* shift each keyword up one position */ { ffmbyt(fptr, bytepos, REPORT_EOF, status); ffgbyt(fptr, 80, inbuff, status); /* read the current keyword */ ffmbyt(fptr, bytepos, REPORT_EOF, status); ffpbyt(fptr, 80, outbuff, status); /* overwrite with next keyword */ tmpbuff = inbuff; /* swap input and output buffers */ inbuff = outbuff; outbuff = tmpbuff; bytepos -= 80; } (fptr->Fptr)->headend -= 80; /* decrement the position of the END keyword */ return(*status); } astropy-1.1.1/cextern/cfitsio/fits_hdecompress.c0000644001134200020070000017356612602615520022755 0ustar embrayscience00000000000000/* ######################################################################### These routines to apply the H-compress decompression algorithm to a 2-D Fits image were written by R. White at the STScI and were obtained from the STScI at http://www.stsci.edu/software/hcompress.html This source file is a concatination of the following sources files in the original distribution hinv.c hsmooth.c undigitize.c decode.c dodecode.c qtree_decode.c qread.c bit_input.c The following modifications have been made to the original code: - commented out redundant "include" statements - added the nextchar global variable - changed all the 'extern' declarations to 'static', since all the routines are in the same source file - changed the first parameter in decode (and in lower level routines from a file stream to a char array - modified the myread routine, and lower level byte reading routines, to copy the input bytes to a char array, instead of reading them from a file stream - changed the function declarations to the more modern ANSI C style - changed calls to printf and perror to call the CFITSIO ffpmsg routine - replace "exit" statements with "return" statements ############################################################################ */ #include #include #include #include #include "fitsio2.h" /* WDP added test to see if min and max are already defined */ #ifndef min #define min(a,b) (((a)<(b))?(a):(b)) #endif #ifndef max #define max(a,b) (((a)>(b))?(a):(b)) #endif static long nextchar; static int decode(unsigned char *infile, int *a, int *nx, int *ny, int *scale); static int decode64(unsigned char *infile, LONGLONG *a, int *nx, int *ny, int *scale); static int hinv(int a[], int nx, int ny, int smooth ,int scale); static int hinv64(LONGLONG a[], int nx, int ny, int smooth ,int scale); static void undigitize(int a[], int nx, int ny, int scale); static void undigitize64(LONGLONG a[], int nx, int ny, int scale); static void unshuffle(int a[], int n, int n2, int tmp[]); static void unshuffle64(LONGLONG a[], int n, int n2, LONGLONG tmp[]); static void hsmooth(int a[], int nxtop, int nytop, int ny, int scale); static void hsmooth64(LONGLONG a[], int nxtop, int nytop, int ny, int scale); static void qread(unsigned char *infile,char *a, int n); static int readint(unsigned char *infile); static LONGLONG readlonglong(unsigned char *infile); static int dodecode(unsigned char *infile, int a[], int nx, int ny, unsigned char nbitplanes[3]); static int dodecode64(unsigned char *infile, LONGLONG a[], int nx, int ny, unsigned char nbitplanes[3]); static int qtree_decode(unsigned char *infile, int a[], int n, int nqx, int nqy, int nbitplanes); static int qtree_decode64(unsigned char *infile, LONGLONG a[], int n, int nqx, int nqy, int nbitplanes); static void start_inputing_bits(void); static int input_bit(unsigned char *infile); static int input_nbits(unsigned char *infile, int n); /* make input_nybble a separate routine, for added effiency */ /* #define input_nybble(infile) input_nbits(infile,4) */ static int input_nybble(unsigned char *infile); static int input_nnybble(unsigned char *infile, int n, unsigned char *array); static void qtree_expand(unsigned char *infile, unsigned char a[], int nx, int ny, unsigned char b[]); static void qtree_bitins(unsigned char a[], int nx, int ny, int b[], int n, int bit); static void qtree_bitins64(unsigned char a[], int nx, int ny, LONGLONG b[], int n, int bit); static void qtree_copy(unsigned char a[], int nx, int ny, unsigned char b[], int n); static void read_bdirect(unsigned char *infile, int a[], int n, int nqx, int nqy, unsigned char scratch[], int bit); static void read_bdirect64(unsigned char *infile, LONGLONG a[], int n, int nqx, int nqy, unsigned char scratch[], int bit); static int input_huffman(unsigned char *infile); /* ---------------------------------------------------------------------- */ int fits_hdecompress(unsigned char *input, int smooth, int *a, int *ny, int *nx, int *scale, int *status) { /* decompress the input byte stream using the H-compress algorithm input - input array of compressed bytes a - pre-allocated array to hold the output uncompressed image nx - returned X axis size ny - returned Y axis size NOTE: the nx and ny dimensions as defined within this code are reversed from the usual FITS notation. ny is the fastest varying dimension, which is usually considered the X axis in the FITS image display */ int stat; if (*status > 0) return(*status); /* decode the input array */ FFLOCK; /* decode uses the nextchar global variable */ stat = decode(input, a, nx, ny, scale); FFUNLOCK; *status = stat; if (stat) return(*status); /* * Un-Digitize */ undigitize(a, *nx, *ny, *scale); /* * Inverse H-transform */ stat = hinv(a, *nx, *ny, smooth, *scale); *status = stat; return(*status); } /* ---------------------------------------------------------------------- */ int fits_hdecompress64(unsigned char *input, int smooth, LONGLONG *a, int *ny, int *nx, int *scale, int *status) { /* decompress the input byte stream using the H-compress algorithm input - input array of compressed bytes a - pre-allocated array to hold the output uncompressed image nx - returned X axis size ny - returned Y axis size NOTE: the nx and ny dimensions as defined within this code are reversed from the usual FITS notation. ny is the fastest varying dimension, which is usually considered the X axis in the FITS image display */ int stat, *iarray, ii, nval; if (*status > 0) return(*status); /* decode the input array */ FFLOCK; /* decode uses the nextchar global variable */ stat = decode64(input, a, nx, ny, scale); FFUNLOCK; *status = stat; if (stat) return(*status); /* * Un-Digitize */ undigitize64(a, *nx, *ny, *scale); /* * Inverse H-transform */ stat = hinv64(a, *nx, *ny, smooth, *scale); *status = stat; /* pack the I*8 values back into an I*4 array */ iarray = (int *) a; nval = (*nx) * (*ny); for (ii = 0; ii < nval; ii++) iarray[ii] = (int) a[ii]; return(*status); } /* ############################################################################ */ /* ############################################################################ */ /* Copyright (c) 1993 Association of Universities for Research * in Astronomy. All rights reserved. Produced under National * Aeronautics and Space Administration Contract No. NAS5-26555. */ /* hinv.c Inverse H-transform of NX x NY integer image * * Programmer: R. White Date: 23 July 1993 */ /* ############################################################################ */ static int hinv(int a[], int nx, int ny, int smooth ,int scale) /* int smooth; 0 for no smoothing, else smooth during inversion int scale; used if smoothing is specified */ { int nmax, log2n, i, j, k; int nxtop,nytop,nxf,nyf,c; int oddx,oddy; int shift, bit0, bit1, bit2, mask0, mask1, mask2, prnd0, prnd1, prnd2, nrnd0, nrnd1, nrnd2, lowbit0, lowbit1; int h0, hx, hy, hc; int s10, s00; int *tmp; /* * log2n is log2 of max(nx,ny) rounded up to next power of 2 */ nmax = (nx>ny) ? nx : ny; log2n = (int) (log((float) nmax)/log(2.0)+0.5); if ( nmax > (1<> 1; prnd1 = bit1 >> 1; prnd2 = bit2 >> 1; nrnd0 = prnd0 - 1; nrnd1 = prnd1 - 1; nrnd2 = prnd2 - 1; /* * round h0 to multiple of bit2 */ a[0] = (a[0] + ((a[0] >= 0) ? prnd2 : nrnd2)) & mask2; /* * do log2n expansions * * We're indexing a as a 2-D array with dimensions (nx,ny). */ nxtop = 1; nytop = 1; nxf = nx; nyf = ny; c = 1<=0; k--) { /* * this somewhat cryptic code generates the sequence * ntop[k-1] = (ntop[k]+1)/2, where ntop[log2n] = n */ c = c>>1; nxtop = nxtop<<1; nytop = nytop<<1; if (nxf <= c) { nxtop -= 1; } else { nxf -= c; } if (nyf <= c) { nytop -= 1; } else { nyf -= c; } /* * double shift and fix nrnd0 (because prnd0=0) on last pass */ if (k == 0) { nrnd0 = 0; shift = 2; } /* * unshuffle in each dimension to interleave coefficients */ for (i = 0; i= 0) ? prnd1 : nrnd1)) & mask1; hy = (hy + ((hy >= 0) ? prnd1 : nrnd1)) & mask1; hc = (hc + ((hc >= 0) ? prnd0 : nrnd0)) & mask0; /* * propagate bit0 of hc to hx,hy */ lowbit0 = hc & bit0; hx = (hx >= 0) ? (hx - lowbit0) : (hx + lowbit0); hy = (hy >= 0) ? (hy - lowbit0) : (hy + lowbit0); /* * Propagate bits 0 and 1 of hc,hx,hy to h0. * This could be simplified if we assume h0>0, but then * the inversion would not be lossless for images with * negative pixels. */ lowbit1 = (hc ^ hx ^ hy) & bit1; h0 = (h0 >= 0) ? (h0 + lowbit0 - lowbit1) : (h0 + ((lowbit0 == 0) ? lowbit1 : (lowbit0-lowbit1))); /* * Divide sums by 2 (4 last time) */ a[s10+1] = (h0 + hx + hy + hc) >> shift; a[s10 ] = (h0 + hx - hy - hc) >> shift; a[s00+1] = (h0 - hx + hy - hc) >> shift; a[s00 ] = (h0 - hx - hy + hc) >> shift; s00 += 2; s10 += 2; } if (oddy) { /* * do last element in row if row length is odd * s00+1, s10+1 are off edge */ h0 = a[s00 ]; hx = a[s10 ]; hx = ((hx >= 0) ? (hx+prnd1) : (hx+nrnd1)) & mask1; lowbit1 = hx & bit1; h0 = (h0 >= 0) ? (h0 - lowbit1) : (h0 + lowbit1); a[s10 ] = (h0 + hx) >> shift; a[s00 ] = (h0 - hx) >> shift; } } if (oddx) { /* * do last row if column length is odd * s10, s10+1 are off edge */ s00 = ny*i; for (j = 0; j= 0) ? (hy+prnd1) : (hy+nrnd1)) & mask1; lowbit1 = hy & bit1; h0 = (h0 >= 0) ? (h0 - lowbit1) : (h0 + lowbit1); a[s00+1] = (h0 + hy) >> shift; a[s00 ] = (h0 - hy) >> shift; s00 += 2; } if (oddy) { /* * do corner element if both row and column lengths are odd * s00+1, s10, s10+1 are off edge */ h0 = a[s00 ]; a[s00 ] = h0 >> shift; } } /* * divide all the masks and rounding values by 2 */ bit2 = bit1; bit1 = bit0; bit0 = bit0 >> 1; mask1 = mask0; mask0 = mask0 >> 1; prnd1 = prnd0; prnd0 = prnd0 >> 1; nrnd1 = nrnd0; nrnd0 = prnd0 - 1; } free(tmp); return(0); } /* ############################################################################ */ static int hinv64(LONGLONG a[], int nx, int ny, int smooth ,int scale) /* int smooth; 0 for no smoothing, else smooth during inversion int scale; used if smoothing is specified */ { int nmax, log2n, i, j, k; int nxtop,nytop,nxf,nyf,c; int oddx,oddy; int shift; LONGLONG mask0, mask1, mask2, prnd0, prnd1, prnd2, bit0, bit1, bit2; LONGLONG nrnd0, nrnd1, nrnd2, lowbit0, lowbit1; LONGLONG h0, hx, hy, hc; int s10, s00; LONGLONG *tmp; /* * log2n is log2 of max(nx,ny) rounded up to next power of 2 */ nmax = (nx>ny) ? nx : ny; log2n = (int) (log((float) nmax)/log(2.0)+0.5); if ( nmax > (1<> 1; prnd1 = bit1 >> 1; prnd2 = bit2 >> 1; nrnd0 = prnd0 - 1; nrnd1 = prnd1 - 1; nrnd2 = prnd2 - 1; /* * round h0 to multiple of bit2 */ a[0] = (a[0] + ((a[0] >= 0) ? prnd2 : nrnd2)) & mask2; /* * do log2n expansions * * We're indexing a as a 2-D array with dimensions (nx,ny). */ nxtop = 1; nytop = 1; nxf = nx; nyf = ny; c = 1<=0; k--) { /* * this somewhat cryptic code generates the sequence * ntop[k-1] = (ntop[k]+1)/2, where ntop[log2n] = n */ c = c>>1; nxtop = nxtop<<1; nytop = nytop<<1; if (nxf <= c) { nxtop -= 1; } else { nxf -= c; } if (nyf <= c) { nytop -= 1; } else { nyf -= c; } /* * double shift and fix nrnd0 (because prnd0=0) on last pass */ if (k == 0) { nrnd0 = 0; shift = 2; } /* * unshuffle in each dimension to interleave coefficients */ for (i = 0; i= 0) ? prnd1 : nrnd1)) & mask1; hy = (hy + ((hy >= 0) ? prnd1 : nrnd1)) & mask1; hc = (hc + ((hc >= 0) ? prnd0 : nrnd0)) & mask0; /* * propagate bit0 of hc to hx,hy */ lowbit0 = hc & bit0; hx = (hx >= 0) ? (hx - lowbit0) : (hx + lowbit0); hy = (hy >= 0) ? (hy - lowbit0) : (hy + lowbit0); /* * Propagate bits 0 and 1 of hc,hx,hy to h0. * This could be simplified if we assume h0>0, but then * the inversion would not be lossless for images with * negative pixels. */ lowbit1 = (hc ^ hx ^ hy) & bit1; h0 = (h0 >= 0) ? (h0 + lowbit0 - lowbit1) : (h0 + ((lowbit0 == 0) ? lowbit1 : (lowbit0-lowbit1))); /* * Divide sums by 2 (4 last time) */ a[s10+1] = (h0 + hx + hy + hc) >> shift; a[s10 ] = (h0 + hx - hy - hc) >> shift; a[s00+1] = (h0 - hx + hy - hc) >> shift; a[s00 ] = (h0 - hx - hy + hc) >> shift; s00 += 2; s10 += 2; } if (oddy) { /* * do last element in row if row length is odd * s00+1, s10+1 are off edge */ h0 = a[s00 ]; hx = a[s10 ]; hx = ((hx >= 0) ? (hx+prnd1) : (hx+nrnd1)) & mask1; lowbit1 = hx & bit1; h0 = (h0 >= 0) ? (h0 - lowbit1) : (h0 + lowbit1); a[s10 ] = (h0 + hx) >> shift; a[s00 ] = (h0 - hx) >> shift; } } if (oddx) { /* * do last row if column length is odd * s10, s10+1 are off edge */ s00 = ny*i; for (j = 0; j= 0) ? (hy+prnd1) : (hy+nrnd1)) & mask1; lowbit1 = hy & bit1; h0 = (h0 >= 0) ? (h0 - lowbit1) : (h0 + lowbit1); a[s00+1] = (h0 + hy) >> shift; a[s00 ] = (h0 - hy) >> shift; s00 += 2; } if (oddy) { /* * do corner element if both row and column lengths are odd * s00+1, s10, s10+1 are off edge */ h0 = a[s00 ]; a[s00 ] = h0 >> shift; } } /* * divide all the masks and rounding values by 2 */ bit2 = bit1; bit1 = bit0; bit0 = bit0 >> 1; mask1 = mask0; mask0 = mask0 >> 1; prnd1 = prnd0; prnd0 = prnd0 >> 1; nrnd1 = nrnd0; nrnd0 = prnd0 - 1; } free(tmp); return(0); } /* ############################################################################ */ static void unshuffle(int a[], int n, int n2, int tmp[]) /* int a[]; array to shuffle int n; number of elements to shuffle int n2; second dimension int tmp[]; scratch storage */ { int i; int nhalf; int *p1, *p2, *pt; /* * copy 2nd half of array to tmp */ nhalf = (n+1)>>1; pt = tmp; p1 = &a[n2*nhalf]; /* pointer to a[i] */ for (i=nhalf; i= 0; i--) { *p1 = *p2; p2 -= n2; p1 -= (n2+n2); } /* * now distribute 2nd half of array (in tmp) to odd elements */ pt = tmp; p1 = &a[n2]; /* pointer to a[i] */ for (i=1; i>1; pt = tmp; p1 = &a[n2*nhalf]; /* pointer to a[i] */ for (i=nhalf; i= 0; i--) { *p1 = *p2; p2 -= n2; p1 -= (n2+n2); } /* * now distribute 2nd half of array (in tmp) to odd elements */ pt = tmp; p1 = &a[n2]; /* pointer to a[i] */ for (i=1; i> 1); if (smax <= 0) return; ny2 = ny << 1; /* * We're indexing a as a 2-D array with dimensions (nxtop,ny) of which * only (nxtop,nytop) are used. The coefficients on the edge of the * array are not adjusted (which is why the loops below start at 2 * instead of 0 and end at nxtop-2 instead of nxtop.) */ /* * Adjust x difference hx */ for (i = 2; i=0, dmin<=0. */ if (dmin < dmax) { diff = max( min(diff, dmax), dmin); /* * Compute change in slope limited to range +/- smax. * Careful with rounding negative numbers when using * shift for divide by 8. */ s = diff-(a[s10]<<3); s = (s>=0) ? (s>>3) : ((s+7)>>3) ; s = max( min(s, smax), -smax); a[s10] = a[s10]+s; } s00 += 2; s10 += 2; } } /* * Adjust y difference hy */ for (i = 0; i=0) ? (s>>3) : ((s+7)>>3) ; s = max( min(s, smax), -smax); a[s00+1] = a[s00+1]+s; } s00 += 2; s10 += 2; } } /* * Adjust curvature difference hc */ for (i = 2; i=0, dmin<=0. */ if (dmin < dmax) { diff = max( min(diff, dmax), dmin); /* * Compute change in slope limited to range +/- smax. * Careful with rounding negative numbers when using * shift for divide by 64. */ s = diff-(a[s10+1]<<6); s = (s>=0) ? (s>>6) : ((s+63)>>6) ; s = max( min(s, smax), -smax); a[s10+1] = a[s10+1]+s; } s00 += 2; s10 += 2; } } } /* ############################################################################ */ static void hsmooth64(LONGLONG a[], int nxtop, int nytop, int ny, int scale) /* LONGLONG a[]; array of H-transform coefficients int nxtop,nytop; size of coefficient block to use int ny; actual 1st dimension of array int scale; truncation scale factor that was used */ { int i, j; int ny2, s10, s00; LONGLONG hm, h0, hp, hmm, hpm, hmp, hpp, hx2, hy2, diff, dmax, dmin, s, smax, m1, m2; /* * Maximum change in coefficients is determined by scale factor. * Since we rounded during division (see digitize.c), the biggest * permitted change is scale/2. */ smax = (scale >> 1); if (smax <= 0) return; ny2 = ny << 1; /* * We're indexing a as a 2-D array with dimensions (nxtop,ny) of which * only (nxtop,nytop) are used. The coefficients on the edge of the * array are not adjusted (which is why the loops below start at 2 * instead of 0 and end at nxtop-2 instead of nxtop.) */ /* * Adjust x difference hx */ for (i = 2; i=0, dmin<=0. */ if (dmin < dmax) { diff = max( min(diff, dmax), dmin); /* * Compute change in slope limited to range +/- smax. * Careful with rounding negative numbers when using * shift for divide by 8. */ s = diff-(a[s10]<<3); s = (s>=0) ? (s>>3) : ((s+7)>>3) ; s = max( min(s, smax), -smax); a[s10] = a[s10]+s; } s00 += 2; s10 += 2; } } /* * Adjust y difference hy */ for (i = 0; i=0) ? (s>>3) : ((s+7)>>3) ; s = max( min(s, smax), -smax); a[s00+1] = a[s00+1]+s; } s00 += 2; s10 += 2; } } /* * Adjust curvature difference hc */ for (i = 2; i=0, dmin<=0. */ if (dmin < dmax) { diff = max( min(diff, dmax), dmin); /* * Compute change in slope limited to range +/- smax. * Careful with rounding negative numbers when using * shift for divide by 64. */ s = diff-(a[s10+1]<<6); s = (s>=0) ? (s>>6) : ((s+63)>>6) ; s = max( min(s, smax), -smax); a[s10+1] = a[s10+1]+s; } s00 += 2; s10 += 2; } } } /* ############################################################################ */ /* ############################################################################ */ /* Copyright (c) 1993 Association of Universities for Research * in Astronomy. All rights reserved. Produced under National * Aeronautics and Space Administration Contract No. NAS5-26555. */ /* undigitize.c undigitize H-transform * * Programmer: R. White Date: 9 May 1991 */ /* ############################################################################ */ static void undigitize(int a[], int nx, int ny, int scale) { int *p; /* * multiply by scale */ if (scale <= 1) return; for (p=a; p <= &a[nx*ny-1]; p++) *p = (*p)*scale; } /* ############################################################################ */ static void undigitize64(LONGLONG a[], int nx, int ny, int scale) { LONGLONG *p, scale64; /* * multiply by scale */ if (scale <= 1) return; scale64 = (LONGLONG) scale; /* use a 64-bit int for efficiency in the big loop */ for (p=a; p <= &a[nx*ny-1]; p++) *p = (*p)*scale64; } /* ############################################################################ */ /* ############################################################################ */ /* Copyright (c) 1993 Association of Universities for Research * in Astronomy. All rights reserved. Produced under National * Aeronautics and Space Administration Contract No. NAS5-26555. */ /* decode.c read codes from infile and construct array * * Programmer: R. White Date: 2 February 1994 */ static char code_magic[2] = { (char)0xDD, (char)0x99 }; /* ############################################################################ */ static int decode(unsigned char *infile, int *a, int *nx, int *ny, int *scale) /* char *infile; input file int *a; address of output array [nx][ny] int *nx,*ny; size of output array int *scale; scale factor for digitization */ { LONGLONG sumall; int nel, stat; unsigned char nbitplanes[3]; char tmagic[2]; /* initialize the byte read position to the beginning of the array */; nextchar = 0; /* * File starts either with special 2-byte magic code or with * FITS keyword "SIMPLE =" */ qread(infile, tmagic, sizeof(tmagic)); /* * check for correct magic code value */ if (memcmp(tmagic,code_magic,sizeof(code_magic)) != 0) { ffpmsg("bad file format"); return(DATA_DECOMPRESSION_ERR); } *nx =readint(infile); /* x size of image */ *ny =readint(infile); /* y size of image */ *scale=readint(infile); /* scale factor for digitization */ nel = (*nx) * (*ny); /* sum of all pixels */ sumall=readlonglong(infile); /* # bits in quadrants */ qread(infile, (char *) nbitplanes, sizeof(nbitplanes)); stat = dodecode(infile, a, *nx, *ny, nbitplanes); /* * put sum of all pixels back into pixel 0 */ a[0] = (int) sumall; return(stat); } /* ############################################################################ */ static int decode64(unsigned char *infile, LONGLONG *a, int *nx, int *ny, int *scale) /* char *infile; input file LONGLONG *a; address of output array [nx][ny] int *nx,*ny; size of output array int *scale; scale factor for digitization */ { int nel, stat; LONGLONG sumall; unsigned char nbitplanes[3]; char tmagic[2]; /* initialize the byte read position to the beginning of the array */; nextchar = 0; /* * File starts either with special 2-byte magic code or with * FITS keyword "SIMPLE =" */ qread(infile, tmagic, sizeof(tmagic)); /* * check for correct magic code value */ if (memcmp(tmagic,code_magic,sizeof(code_magic)) != 0) { ffpmsg("bad file format"); return(DATA_DECOMPRESSION_ERR); } *nx =readint(infile); /* x size of image */ *ny =readint(infile); /* y size of image */ *scale=readint(infile); /* scale factor for digitization */ nel = (*nx) * (*ny); /* sum of all pixels */ sumall=readlonglong(infile); /* # bits in quadrants */ qread(infile, (char *) nbitplanes, sizeof(nbitplanes)); stat = dodecode64(infile, a, *nx, *ny, nbitplanes); /* * put sum of all pixels back into pixel 0 */ a[0] = sumall; return(stat); } /* ############################################################################ */ /* ############################################################################ */ /* Copyright (c) 1993 Association of Universities for Research * in Astronomy. All rights reserved. Produced under National * Aeronautics and Space Administration Contract No. NAS5-26555. */ /* dodecode.c Decode stream of characters on infile and return array * * This version encodes the different quadrants separately * * Programmer: R. White Date: 9 May 1991 */ /* ############################################################################ */ static int dodecode(unsigned char *infile, int a[], int nx, int ny, unsigned char nbitplanes[3]) /* int a[]; int nx,ny; Array dimensions are [nx][ny] unsigned char nbitplanes[3]; Number of bit planes in quadrants */ { int i, nel, nx2, ny2, stat; nel = nx*ny; nx2 = (nx+1)/2; ny2 = (ny+1)/2; /* * initialize a to zero */ for (i=0; inqy) ? nqx : nqy; log2n = (int) (log((float) nqmax)/log(2.0)+0.5); if (nqmax > (1<= 0; bit--) { /* * Was bitplane was quadtree-coded or written directly? */ b = input_nybble(infile); if(b == 0) { /* * bit map was written directly */ read_bdirect(infile,a,n,nqx,nqy,scratch,bit); } else if (b != 0xf) { ffpmsg("qtree_decode: bad format code"); return(DATA_DECOMPRESSION_ERR); } else { /* * bitmap was quadtree-coded, do log2n expansions * * read first code */ scratch[0] = input_huffman(infile); /* * now do log2n expansions, reading codes from file as necessary */ nx = 1; ny = 1; nfx = nqx; nfy = nqy; c = 1<>1; nx = nx<<1; ny = ny<<1; if (nfx <= c) { nx -= 1; } else { nfx -= c; } if (nfy <= c) { ny -= 1; } else { nfy -= c; } qtree_expand(infile,scratch,nx,ny,scratch); } /* * now copy last set of 4-bit codes to bitplane bit of array a */ qtree_bitins(scratch,nqx,nqy,a,n,bit); } } free(scratch); return(0); } /* ############################################################################ */ static int qtree_decode64(unsigned char *infile, LONGLONG a[], int n, int nqx, int nqy, int nbitplanes) /* char *infile; LONGLONG a[]; a is 2-D array with dimensions (n,n) int n; length of full row in a int nqx; partial length of row to decode int nqy; partial length of column (<=n) int nbitplanes; number of bitplanes to decode */ { int log2n, k, bit, b, nqmax; int nx,ny,nfx,nfy,c; int nqx2, nqy2; unsigned char *scratch; /* * log2n is log2 of max(nqx,nqy) rounded up to next power of 2 */ nqmax = (nqx>nqy) ? nqx : nqy; log2n = (int) (log((float) nqmax)/log(2.0)+0.5); if (nqmax > (1<= 0; bit--) { /* * Was bitplane was quadtree-coded or written directly? */ b = input_nybble(infile); if(b == 0) { /* * bit map was written directly */ read_bdirect64(infile,a,n,nqx,nqy,scratch,bit); } else if (b != 0xf) { ffpmsg("qtree_decode64: bad format code"); return(DATA_DECOMPRESSION_ERR); } else { /* * bitmap was quadtree-coded, do log2n expansions * * read first code */ scratch[0] = input_huffman(infile); /* * now do log2n expansions, reading codes from file as necessary */ nx = 1; ny = 1; nfx = nqx; nfy = nqy; c = 1<>1; nx = nx<<1; ny = ny<<1; if (nfx <= c) { nx -= 1; } else { nfx -= c; } if (nfy <= c) { ny -= 1; } else { nfy -= c; } qtree_expand(infile,scratch,nx,ny,scratch); } /* * now copy last set of 4-bit codes to bitplane bit of array a */ qtree_bitins64(scratch,nqx,nqy,a,n,bit); } } free(scratch); return(0); } /* ############################################################################ */ /* * do one quadtree expansion step on array a[(nqx+1)/2,(nqy+1)/2] * results put into b[nqx,nqy] (which may be the same as a) */ static void qtree_expand(unsigned char *infile, unsigned char a[], int nx, int ny, unsigned char b[]) { int i; /* * first copy a to b, expanding each 4-bit value */ qtree_copy(a,nx,ny,b,ny); /* * now read new 4-bit values into b for each non-zero element */ for (i = nx*ny-1; i >= 0; i--) { if (b[i]) b[i] = input_huffman(infile); } } /* ############################################################################ */ /* * copy 4-bit values from a[(nx+1)/2,(ny+1)/2] to b[nx,ny], expanding * each value to 2x2 pixels * a,b may be same array */ static void qtree_copy(unsigned char a[], int nx, int ny, unsigned char b[], int n) /* int n; declared y dimension of b */ { int i, j, k, nx2, ny2; int s00, s10; /* * first copy 4-bit values to b * start at end in case a,b are same array */ nx2 = (nx+1)/2; ny2 = (ny+1)/2; k = ny2*(nx2-1)+ny2-1; /* k is index of a[i,j] */ for (i = nx2-1; i >= 0; i--) { s00 = 2*(n*i+ny2-1); /* s00 is index of b[2*i,2*j] */ for (j = ny2-1; j >= 0; j--) { b[s00] = a[k]; k -= 1; s00 -= 2; } } /* * now expand each 2x2 block */ for (i = 0; i>1) & 1; b[s00+1] = (b[s00]>>2) & 1; b[s00 ] = (b[s00]>>3) & 1; */ s00 += 2; s10 += 2; } if (j < ny) { /* * row size is odd, do last element in row * s00+1, s10+1 are off edge */ /* not worth converting this to use 16 case statements */ b[s10 ] = (b[s00]>>1) & 1; b[s00 ] = (b[s00]>>3) & 1; } } if (i < nx) { /* * column size is odd, do last row * s10, s10+1 are off edge */ s00 = n*i; for (j = 0; j>2) & 1; b[s00 ] = (b[s00]>>3) & 1; s00 += 2; } if (j < ny) { /* * both row and column size are odd, do corner element * s00+1, s10, s10+1 are off edge */ /* not worth converting this to use 16 case statements */ b[s00 ] = (b[s00]>>3) & 1; } } } /* ############################################################################ */ /* * Copy 4-bit values from a[(nx+1)/2,(ny+1)/2] to b[nx,ny], expanding * each value to 2x2 pixels and inserting into bitplane BIT of B. * A,B may NOT be same array (it wouldn't make sense to be inserting * bits into the same array anyway.) */ static void qtree_bitins(unsigned char a[], int nx, int ny, int b[], int n, int bit) /* int n; declared y dimension of b */ { int i, j, k; int s00; int plane_val; plane_val = 1 << bit; /* * expand each 2x2 block */ k = 0; /* k is index of a[i/2,j/2] */ for (i = 0; i>1) & 1) << bit; b[s00+1] |= ((a[k]>>2) & 1) << bit; b[s00 ] |= ((a[k]>>3) & 1) << bit; */ s00 += 2; /* s10 += 2; */ k += 1; } if (j < ny) { /* * row size is odd, do last element in row * s00+1, s10+1 are off edge */ switch (a[k]) { case(0): break; case(1): break; case(2): b[s00+n ] |= plane_val; break; case(3): b[s00+n ] |= plane_val; break; case(4): break; case(5): break; case(6): b[s00+n ] |= plane_val; break; case(7): b[s00+n ] |= plane_val; break; case(8): b[s00 ] |= plane_val; break; case(9): b[s00 ] |= plane_val; break; case(10): b[s00+n ] |= plane_val; b[s00 ] |= plane_val; break; case(11): b[s00+n ] |= plane_val; b[s00 ] |= plane_val; break; case(12): b[s00 ] |= plane_val; break; case(13): b[s00 ] |= plane_val; break; case(14): b[s00+n ] |= plane_val; b[s00 ] |= plane_val; break; case(15): b[s00+n ] |= plane_val; b[s00 ] |= plane_val; break; } /* b[s10 ] |= ((a[k]>>1) & 1) << bit; b[s00 ] |= ((a[k]>>3) & 1) << bit; */ k += 1; } } if (i < nx) { /* * column size is odd, do last row * s10, s10+1 are off edge */ s00 = n*i; for (j = 0; j>2) & 1) << bit; b[s00 ] |= ((a[k]>>3) & 1) << bit; */ s00 += 2; k += 1; } if (j < ny) { /* * both row and column size are odd, do corner element * s00+1, s10, s10+1 are off edge */ switch (a[k]) { case(0): break; case(1): break; case(2): break; case(3): break; case(4): break; case(5): break; case(6): break; case(7): break; case(8): b[s00 ] |= plane_val; break; case(9): b[s00 ] |= plane_val; break; case(10): b[s00 ] |= plane_val; break; case(11): b[s00 ] |= plane_val; break; case(12): b[s00 ] |= plane_val; break; case(13): b[s00 ] |= plane_val; break; case(14): b[s00 ] |= plane_val; break; case(15): b[s00 ] |= plane_val; break; } /* b[s00 ] |= ((a[k]>>3) & 1) << bit; */ k += 1; } } } /* ############################################################################ */ /* * Copy 4-bit values from a[(nx+1)/2,(ny+1)/2] to b[nx,ny], expanding * each value to 2x2 pixels and inserting into bitplane BIT of B. * A,B may NOT be same array (it wouldn't make sense to be inserting * bits into the same array anyway.) */ static void qtree_bitins64(unsigned char a[], int nx, int ny, LONGLONG b[], int n, int bit) /* int n; declared y dimension of b */ { int i, j, k; int s00; int plane_val; plane_val = 1 << bit; /* * expand each 2x2 block */ k = 0; /* k is index of a[i/2,j/2] */ for (i = 0; i>1) & 1) << bit; b[s00+1] |= ((((LONGLONG)a[k])>>2) & 1) << bit; b[s00 ] |= ((((LONGLONG)a[k])>>3) & 1) << bit; */ s00 += 2; /* s10 += 2; */ k += 1; } if (j < ny) { /* * row size is odd, do last element in row * s00+1, s10+1 are off edge */ switch (a[k]) { case(0): break; case(1): break; case(2): b[s00+n ] |= plane_val; break; case(3): b[s00+n ] |= plane_val; break; case(4): break; case(5): break; case(6): b[s00+n ] |= plane_val; break; case(7): b[s00+n ] |= plane_val; break; case(8): b[s00 ] |= plane_val; break; case(9): b[s00 ] |= plane_val; break; case(10): b[s00+n ] |= plane_val; b[s00 ] |= plane_val; break; case(11): b[s00+n ] |= plane_val; b[s00 ] |= plane_val; break; case(12): b[s00 ] |= plane_val; break; case(13): b[s00 ] |= plane_val; break; case(14): b[s00+n ] |= plane_val; b[s00 ] |= plane_val; break; case(15): b[s00+n ] |= plane_val; b[s00 ] |= plane_val; break; } /* b[s10 ] |= ((((LONGLONG)a[k])>>1) & 1) << bit; b[s00 ] |= ((((LONGLONG)a[k])>>3) & 1) << bit; */ k += 1; } } if (i < nx) { /* * column size is odd, do last row * s10, s10+1 are off edge */ s00 = n*i; for (j = 0; j>2) & 1) << bit; b[s00 ] |= ((((LONGLONG)a[k])>>3) & 1) << bit; */ s00 += 2; k += 1; } if (j < ny) { /* * both row and column size are odd, do corner element * s00+1, s10, s10+1 are off edge */ switch (a[k]) { case(0): break; case(1): break; case(2): break; case(3): break; case(4): break; case(5): break; case(6): break; case(7): break; case(8): b[s00 ] |= plane_val; break; case(9): b[s00 ] |= plane_val; break; case(10): b[s00 ] |= plane_val; break; case(11): b[s00 ] |= plane_val; break; case(12): b[s00 ] |= plane_val; break; case(13): b[s00 ] |= plane_val; break; case(14): b[s00 ] |= plane_val; break; case(15): b[s00 ] |= plane_val; break; } /* b[s00 ] |= ((((LONGLONG)a[k])>>3) & 1) << bit; */ k += 1; } } } /* ############################################################################ */ static void read_bdirect(unsigned char *infile, int a[], int n, int nqx, int nqy, unsigned char scratch[], int bit) { /* * read bit image packed 4 pixels/nybble */ /* int i; for (i = 0; i < ((nqx+1)/2) * ((nqy+1)/2); i++) { scratch[i] = input_nybble(infile); } */ input_nnybble(infile, ((nqx+1)/2) * ((nqy+1)/2), scratch); /* * insert in bitplane BIT of image A */ qtree_bitins(scratch,nqx,nqy,a,n,bit); } /* ############################################################################ */ static void read_bdirect64(unsigned char *infile, LONGLONG a[], int n, int nqx, int nqy, unsigned char scratch[], int bit) { /* * read bit image packed 4 pixels/nybble */ /* int i; for (i = 0; i < ((nqx+1)/2) * ((nqy+1)/2); i++) { scratch[i] = input_nybble(infile); } */ input_nnybble(infile, ((nqx+1)/2) * ((nqy+1)/2), scratch); /* * insert in bitplane BIT of image A */ qtree_bitins64(scratch,nqx,nqy,a,n,bit); } /* ############################################################################ */ /* * Huffman decoding for fixed codes * * Coded values range from 0-15 * * Huffman code values (hex): * * 3e, 00, 01, 08, 02, 09, 1a, 1b, * 03, 1c, 0a, 1d, 0b, 1e, 3f, 0c * * and number of bits in each code: * * 6, 3, 3, 4, 3, 4, 5, 5, * 3, 5, 4, 5, 4, 5, 6, 4 */ static int input_huffman(unsigned char *infile) { int c; /* * get first 3 bits to start */ c = input_nbits(infile,3); if (c < 4) { /* * this is all we need * return 1,2,4,8 for c=0,1,2,3 */ return(1<>bits_to_go) & 1); } /* ############################################################################ */ /* INPUT N BITS (N must be <= 8) */ static int input_nbits(unsigned char *infile, int n) { /* AND mask for retreiving the right-most n bits */ static int mask[9] = {0, 1, 3, 7, 15, 31, 63, 127, 255}; if (bits_to_go < n) { /* * need another byte's worth of bits */ buffer2 = (buffer2<<8) | (int) infile[nextchar]; nextchar++; bits_to_go += 8; } /* * now pick off the first n bits */ bits_to_go -= n; /* there was a slight gain in speed by replacing the following line */ /* return( (buffer2>>bits_to_go) & ((1<>bits_to_go) & (*(mask+n)) ); } /* ############################################################################ */ /* INPUT 4 BITS */ static int input_nybble(unsigned char *infile) { if (bits_to_go < 4) { /* * need another byte's worth of bits */ buffer2 = (buffer2<<8) | (int) infile[nextchar]; nextchar++; bits_to_go += 8; } /* * now pick off the first 4 bits */ bits_to_go -= 4; return( (buffer2>>bits_to_go) & 15 ); } /* ############################################################################ */ /* INPUT array of 4 BITS */ static int input_nnybble(unsigned char *infile, int n, unsigned char array[]) { /* copy n 4-bit nybbles from infile to the lower 4 bits of array */ int ii, kk, shift1, shift2; /* forcing byte alignment doesn;t help, and even makes it go slightly slower if (bits_to_go != 8) input_nbits(infile, bits_to_go); */ if (n == 1) { array[0] = input_nybble(infile); return(0); } if (bits_to_go == 8) { /* already have 2 full nybbles in buffer2, so backspace the infile array to reuse last char */ nextchar--; bits_to_go = 0; } /* bits_to_go now has a value in the range 0 - 7. After adding */ /* another byte, bits_to_go effectively will be in range 8 - 15 */ shift1 = bits_to_go + 4; /* shift1 will be in range 4 - 11 */ shift2 = bits_to_go; /* shift2 will be in range 0 - 7 */ kk = 0; /* special case */ if (bits_to_go == 0) { for (ii = 0; ii < n/2; ii++) { /* * refill the buffer with next byte */ buffer2 = (buffer2<<8) | (int) infile[nextchar]; nextchar++; array[kk] = (int) ((buffer2>>4) & 15); array[kk + 1] = (int) ((buffer2) & 15); /* no shift required */ kk += 2; } } else { for (ii = 0; ii < n/2; ii++) { /* * refill the buffer with next byte */ buffer2 = (buffer2<<8) | (int) infile[nextchar]; nextchar++; array[kk] = (int) ((buffer2>>shift1) & 15); array[kk + 1] = (int) ((buffer2>>shift2) & 15); kk += 2; } } if (ii * 2 != n) { /* have to read last odd byte */ array[n-1] = input_nybble(infile); } return( (buffer2>>bits_to_go) & 15 ); } astropy-1.1.1/cextern/cfitsio/ricecomp.c0000644001134200020070000010462212602615520021200 0ustar embrayscience00000000000000/* The following code was written by Richard White at STScI and made available for use in CFITSIO in July 1999. These routines were originally contained in 2 source files: rcomp.c and rdecomp.c, and the 'include' file now called ricecomp.h was originally called buffer.h. */ /*----------------------------------------------------------*/ /* */ /* START OF SOURCE FILE ORIGINALLY CALLED rcomp.c */ /* */ /*----------------------------------------------------------*/ /* @(#) rcomp.c 1.5 99/03/01 12:40:27 */ /* rcomp.c Compress image line using * (1) Difference of adjacent pixels * (2) Rice algorithm coding * * Returns number of bytes written to code buffer or * -1 on failure */ #include #include #include /* * nonzero_count is lookup table giving number of bits in 8-bit values not including * leading zeros used in fits_rdecomp, fits_rdecomp_short and fits_rdecomp_byte */ static const int nonzero_count[256] = { 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}; typedef unsigned char Buffer_t; typedef struct { int bitbuffer; /* bit buffer */ int bits_to_go; /* bits to go in buffer */ Buffer_t *start; /* start of buffer */ Buffer_t *current; /* current position in buffer */ Buffer_t *end; /* end of buffer */ } Buffer; #define putcbuf(c,mf) ((*(mf->current)++ = c), 0) #include "fitsio2.h" static void start_outputing_bits(Buffer *buffer); static int done_outputing_bits(Buffer *buffer); static int output_nbits(Buffer *buffer, int bits, int n); /* only used for diagnoistics static int case1, case2, case3; int fits_get_case(int *c1, int*c2, int*c3) { *c1 = case1; *c2 = case2; *c3 = case3; return(0); } */ /* this routine used to be called 'rcomp' (WDP) */ /*---------------------------------------------------------------------------*/ int fits_rcomp(int a[], /* input array */ int nx, /* number of input pixels */ unsigned char *c, /* output buffer */ int clen, /* max length of output */ int nblock) /* coding block size */ { Buffer bufmem, *buffer = &bufmem; /* int bsize; */ int i, j, thisblock; int lastpix, nextpix, pdiff; int v, fs, fsmask, top, fsmax, fsbits, bbits; int lbitbuffer, lbits_to_go; unsigned int psum; double pixelsum, dpsum; unsigned int *diff; /* * Original size of each pixel (bsize, bytes) and coding block * size (nblock, pixels) * Could make bsize a parameter to allow more efficient * compression of short & byte images. */ /* bsize = 4; */ /* nblock = 32; now an input parameter*/ /* * From bsize derive: * FSBITS = # bits required to store FS * FSMAX = maximum value for FS * BBITS = bits/pixel for direct coding */ /* switch (bsize) { case 1: fsbits = 3; fsmax = 6; break; case 2: fsbits = 4; fsmax = 14; break; case 4: fsbits = 5; fsmax = 25; break; default: ffpmsg("rdecomp: bsize must be 1, 2, or 4 bytes"); return(-1); } */ /* move out of switch block, to tweak performance */ fsbits = 5; fsmax = 25; bbits = 1<start = c; buffer->current = c; buffer->end = c+clen; buffer->bits_to_go = 8; /* * array for differences mapped to non-negative values */ diff = (unsigned int *) malloc(nblock*sizeof(unsigned int)); if (diff == (unsigned int *) NULL) { ffpmsg("fits_rcomp: insufficient memory"); return(-1); } /* * Code in blocks of nblock pixels */ start_outputing_bits(buffer); /* write out first int value to the first 4 bytes of the buffer */ if (output_nbits(buffer, a[0], 32) == EOF) { ffpmsg("rice_encode: end of buffer"); free(diff); return(-1); } lastpix = a[0]; /* the first difference will always be zero */ thisblock = nblock; for (i=0; i> 1; for (fs = 0; psum>0; fs++) psum >>= 1; /* * write the codes * fsbits ID bits used to indicate split level */ if (fs >= fsmax) { /* Special high entropy case when FS >= fsmax * Just write pixel difference values directly, no Rice coding at all. */ if (output_nbits(buffer, fsmax+1, fsbits) == EOF) { ffpmsg("rice_encode: end of buffer"); free(diff); return(-1); } for (j=0; jbitbuffer; lbits_to_go = buffer->bits_to_go; for (j=0; j> fs; /* * top is coded by top zeros + 1 */ if (lbits_to_go >= top+1) { lbitbuffer <<= top+1; lbitbuffer |= 1; lbits_to_go -= top+1; } else { lbitbuffer <<= lbits_to_go; putcbuf(lbitbuffer & 0xff,buffer); for (top -= lbits_to_go; top>=8; top -= 8) { putcbuf(0, buffer); } lbitbuffer = 1; lbits_to_go = 7-top; } /* * bottom FS bits are written without coding * code is output_nbits, moved into this routine to reduce overheads * This code potentially breaks if FS>24, so I am limiting * FS to 24 by choice of FSMAX above. */ if (fs > 0) { lbitbuffer <<= fs; lbitbuffer |= v & fsmask; lbits_to_go -= fs; while (lbits_to_go <= 0) { putcbuf((lbitbuffer>>(-lbits_to_go)) & 0xff,buffer); lbits_to_go += 8; } } } /* check if overflowed output buffer */ if (buffer->current > buffer->end) { ffpmsg("rice_encode: end of buffer"); free(diff); return(-1); } buffer->bitbuffer = lbitbuffer; buffer->bits_to_go = lbits_to_go; } } done_outputing_bits(buffer); free(diff); /* * return number of bytes used */ return(buffer->current - buffer->start); } /*---------------------------------------------------------------------------*/ int fits_rcomp_short( short a[], /* input array */ int nx, /* number of input pixels */ unsigned char *c, /* output buffer */ int clen, /* max length of output */ int nblock) /* coding block size */ { Buffer bufmem, *buffer = &bufmem; /* int bsize; */ int i, j, thisblock; /* NOTE: in principle, the following 2 variable could be declared as 'short' but in fact the code runs faster (on 32-bit Linux at least) as 'int' */ int lastpix, nextpix; /* int pdiff; */ short pdiff; int v, fs, fsmask, top, fsmax, fsbits, bbits; int lbitbuffer, lbits_to_go; /* unsigned int psum; */ unsigned short psum; double pixelsum, dpsum; unsigned int *diff; /* * Original size of each pixel (bsize, bytes) and coding block * size (nblock, pixels) * Could make bsize a parameter to allow more efficient * compression of short & byte images. */ /* bsize = 2; */ /* nblock = 32; now an input parameter */ /* * From bsize derive: * FSBITS = # bits required to store FS * FSMAX = maximum value for FS * BBITS = bits/pixel for direct coding */ /* switch (bsize) { case 1: fsbits = 3; fsmax = 6; break; case 2: fsbits = 4; fsmax = 14; break; case 4: fsbits = 5; fsmax = 25; break; default: ffpmsg("rdecomp: bsize must be 1, 2, or 4 bytes"); return(-1); } */ /* move these out of switch block to further tweak performance */ fsbits = 4; fsmax = 14; bbits = 1<start = c; buffer->current = c; buffer->end = c+clen; buffer->bits_to_go = 8; /* * array for differences mapped to non-negative values */ diff = (unsigned int *) malloc(nblock*sizeof(unsigned int)); if (diff == (unsigned int *) NULL) { ffpmsg("fits_rcomp: insufficient memory"); return(-1); } /* * Code in blocks of nblock pixels */ start_outputing_bits(buffer); /* write out first short value to the first 2 bytes of the buffer */ if (output_nbits(buffer, a[0], 16) == EOF) { ffpmsg("rice_encode: end of buffer"); free(diff); return(-1); } lastpix = a[0]; /* the first difference will always be zero */ thisblock = nblock; for (i=0; i> 1; */ psum = ((unsigned short) dpsum ) >> 1; for (fs = 0; psum>0; fs++) psum >>= 1; /* * write the codes * fsbits ID bits used to indicate split level */ if (fs >= fsmax) { /* case3++; */ /* Special high entropy case when FS >= fsmax * Just write pixel difference values directly, no Rice coding at all. */ if (output_nbits(buffer, fsmax+1, fsbits) == EOF) { ffpmsg("rice_encode: end of buffer"); free(diff); return(-1); } for (j=0; jbitbuffer; lbits_to_go = buffer->bits_to_go; for (j=0; j> fs; /* * top is coded by top zeros + 1 */ if (lbits_to_go >= top+1) { lbitbuffer <<= top+1; lbitbuffer |= 1; lbits_to_go -= top+1; } else { lbitbuffer <<= lbits_to_go; putcbuf(lbitbuffer & 0xff,buffer); for (top -= lbits_to_go; top>=8; top -= 8) { putcbuf(0, buffer); } lbitbuffer = 1; lbits_to_go = 7-top; } /* * bottom FS bits are written without coding * code is output_nbits, moved into this routine to reduce overheads * This code potentially breaks if FS>24, so I am limiting * FS to 24 by choice of FSMAX above. */ if (fs > 0) { lbitbuffer <<= fs; lbitbuffer |= v & fsmask; lbits_to_go -= fs; while (lbits_to_go <= 0) { putcbuf((lbitbuffer>>(-lbits_to_go)) & 0xff,buffer); lbits_to_go += 8; } } } /* check if overflowed output buffer */ if (buffer->current > buffer->end) { ffpmsg("rice_encode: end of buffer"); free(diff); return(-1); } buffer->bitbuffer = lbitbuffer; buffer->bits_to_go = lbits_to_go; } } done_outputing_bits(buffer); free(diff); /* * return number of bytes used */ return(buffer->current - buffer->start); } /*---------------------------------------------------------------------------*/ int fits_rcomp_byte( signed char a[], /* input array */ int nx, /* number of input pixels */ unsigned char *c, /* output buffer */ int clen, /* max length of output */ int nblock) /* coding block size */ { Buffer bufmem, *buffer = &bufmem; /* int bsize; */ int i, j, thisblock; /* NOTE: in principle, the following 2 variable could be declared as 'short' but in fact the code runs faster (on 32-bit Linux at least) as 'int' */ int lastpix, nextpix; /* int pdiff; */ signed char pdiff; int v, fs, fsmask, top, fsmax, fsbits, bbits; int lbitbuffer, lbits_to_go; /* unsigned int psum; */ unsigned char psum; double pixelsum, dpsum; unsigned int *diff; /* * Original size of each pixel (bsize, bytes) and coding block * size (nblock, pixels) * Could make bsize a parameter to allow more efficient * compression of short & byte images. */ /* bsize = 1; */ /* nblock = 32; now an input parameter */ /* * From bsize derive: * FSBITS = # bits required to store FS * FSMAX = maximum value for FS * BBITS = bits/pixel for direct coding */ /* switch (bsize) { case 1: fsbits = 3; fsmax = 6; break; case 2: fsbits = 4; fsmax = 14; break; case 4: fsbits = 5; fsmax = 25; break; default: ffpmsg("rdecomp: bsize must be 1, 2, or 4 bytes"); return(-1); } */ /* move these out of switch block to further tweak performance */ fsbits = 3; fsmax = 6; bbits = 1<start = c; buffer->current = c; buffer->end = c+clen; buffer->bits_to_go = 8; /* * array for differences mapped to non-negative values */ diff = (unsigned int *) malloc(nblock*sizeof(unsigned int)); if (diff == (unsigned int *) NULL) { ffpmsg("fits_rcomp: insufficient memory"); return(-1); } /* * Code in blocks of nblock pixels */ start_outputing_bits(buffer); /* write out first byte value to the first byte of the buffer */ if (output_nbits(buffer, a[0], 8) == EOF) { ffpmsg("rice_encode: end of buffer"); free(diff); return(-1); } lastpix = a[0]; /* the first difference will always be zero */ thisblock = nblock; for (i=0; i> 1; */ psum = ((unsigned char) dpsum ) >> 1; for (fs = 0; psum>0; fs++) psum >>= 1; /* * write the codes * fsbits ID bits used to indicate split level */ if (fs >= fsmax) { /* Special high entropy case when FS >= fsmax * Just write pixel difference values directly, no Rice coding at all. */ if (output_nbits(buffer, fsmax+1, fsbits) == EOF) { ffpmsg("rice_encode: end of buffer"); free(diff); return(-1); } for (j=0; jbitbuffer; lbits_to_go = buffer->bits_to_go; for (j=0; j> fs; /* * top is coded by top zeros + 1 */ if (lbits_to_go >= top+1) { lbitbuffer <<= top+1; lbitbuffer |= 1; lbits_to_go -= top+1; } else { lbitbuffer <<= lbits_to_go; putcbuf(lbitbuffer & 0xff,buffer); for (top -= lbits_to_go; top>=8; top -= 8) { putcbuf(0, buffer); } lbitbuffer = 1; lbits_to_go = 7-top; } /* * bottom FS bits are written without coding * code is output_nbits, moved into this routine to reduce overheads * This code potentially breaks if FS>24, so I am limiting * FS to 24 by choice of FSMAX above. */ if (fs > 0) { lbitbuffer <<= fs; lbitbuffer |= v & fsmask; lbits_to_go -= fs; while (lbits_to_go <= 0) { putcbuf((lbitbuffer>>(-lbits_to_go)) & 0xff,buffer); lbits_to_go += 8; } } } /* check if overflowed output buffer */ if (buffer->current > buffer->end) { ffpmsg("rice_encode: end of buffer"); free(diff); return(-1); } buffer->bitbuffer = lbitbuffer; buffer->bits_to_go = lbits_to_go; } } done_outputing_bits(buffer); free(diff); /* * return number of bytes used */ return(buffer->current - buffer->start); } /*---------------------------------------------------------------------------*/ /* bit_output.c * * Bit output routines * Procedures return zero on success, EOF on end-of-buffer * * Programmer: R. White Date: 20 July 1998 */ /* Initialize for bit output */ static void start_outputing_bits(Buffer *buffer) { /* * Buffer is empty to start with */ buffer->bitbuffer = 0; buffer->bits_to_go = 8; } /*---------------------------------------------------------------------------*/ /* Output N bits (N must be <= 32) */ static int output_nbits(Buffer *buffer, int bits, int n) { /* local copies */ int lbitbuffer; int lbits_to_go; /* AND mask for the right-most n bits */ static unsigned int mask[33] = {0, 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff, 0x1ff, 0x3ff, 0x7ff, 0xfff, 0x1fff, 0x3fff, 0x7fff, 0xffff, 0x1ffff, 0x3ffff, 0x7ffff, 0xfffff, 0x1fffff, 0x3fffff, 0x7fffff, 0xffffff, 0x1ffffff, 0x3ffffff, 0x7ffffff, 0xfffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff}; /* * insert bits at end of bitbuffer */ lbitbuffer = buffer->bitbuffer; lbits_to_go = buffer->bits_to_go; if (lbits_to_go+n > 32) { /* * special case for large n: put out the top lbits_to_go bits first * note that 0 < lbits_to_go <= 8 */ lbitbuffer <<= lbits_to_go; /* lbitbuffer |= (bits>>(n-lbits_to_go)) & ((1<>(n-lbits_to_go)) & *(mask+lbits_to_go); putcbuf(lbitbuffer & 0xff,buffer); n -= lbits_to_go; lbits_to_go = 8; } lbitbuffer <<= n; /* lbitbuffer |= ( bits & ((1<>(-lbits_to_go)) & 0xff,buffer); lbits_to_go += 8; } buffer->bitbuffer = lbitbuffer; buffer->bits_to_go = lbits_to_go; return(0); } /*---------------------------------------------------------------------------*/ /* Flush out the last bits */ static int done_outputing_bits(Buffer *buffer) { if(buffer->bits_to_go < 8) { putcbuf(buffer->bitbuffer<bits_to_go,buffer); /* if (putcbuf(buffer->bitbuffer<bits_to_go,buffer) == EOF) return(EOF); */ } return(0); } /*---------------------------------------------------------------------------*/ /*----------------------------------------------------------*/ /* */ /* START OF SOURCE FILE ORIGINALLY CALLED rdecomp.c */ /* */ /*----------------------------------------------------------*/ /* @(#) rdecomp.c 1.4 99/03/01 12:38:41 */ /* rdecomp.c Decompress image line using * (1) Difference of adjacent pixels * (2) Rice algorithm coding * * Returns 0 on success or 1 on failure */ /* moved these 'includes' to the beginning of the file (WDP) #include #include */ /*---------------------------------------------------------------------------*/ /* this routine used to be called 'rdecomp' (WDP) */ int fits_rdecomp (unsigned char *c, /* input buffer */ int clen, /* length of input */ unsigned int array[], /* output array */ int nx, /* number of output pixels */ int nblock) /* coding block size */ { /* int bsize; */ int i, k, imax; int nbits, nzero, fs; unsigned char *cend, bytevalue; unsigned int b, diff, lastpix; int fsmax, fsbits, bbits; extern const int nonzero_count[]; /* * Original size of each pixel (bsize, bytes) and coding block * size (nblock, pixels) * Could make bsize a parameter to allow more efficient * compression of short & byte images. */ /* bsize = 4; */ /* nblock = 32; now an input parameter */ /* * From bsize derive: * FSBITS = # bits required to store FS * FSMAX = maximum value for FS * BBITS = bits/pixel for direct coding */ /* switch (bsize) { case 1: fsbits = 3; fsmax = 6; break; case 2: fsbits = 4; fsmax = 14; break; case 4: fsbits = 5; fsmax = 25; break; default: ffpmsg("rdecomp: bsize must be 1, 2, or 4 bytes"); return 1; } */ /* move out of switch block, to tweak performance */ fsbits = 5; fsmax = 25; bbits = 1<> nbits) - 1; b &= (1< nx) imax = nx; if (fs<0) { /* low-entropy case, all zero differences */ for ( ; i= 0; k -= 8) { b = *c++; diff |= b<0) { b = *c++; diff |= b>>(-k); b &= (1<>1; } else { diff = ~(diff>>1); } array[i] = diff+lastpix; lastpix = array[i]; } } else { /* normal case, Rice coding */ for ( ; i>nbits); b &= (1<>1; } else { diff = ~(diff>>1); } array[i] = diff+lastpix; lastpix = array[i]; } } if (c > cend) { ffpmsg("decompression error: hit end of compressed byte stream"); return 1; } } if (c < cend) { ffpmsg("decompression warning: unused bytes at end of compressed buffer"); } return 0; } /*---------------------------------------------------------------------------*/ /* this routine used to be called 'rdecomp' (WDP) */ int fits_rdecomp_short (unsigned char *c, /* input buffer */ int clen, /* length of input */ unsigned short array[], /* output array */ int nx, /* number of output pixels */ int nblock) /* coding block size */ { int i, imax; /* int bsize; */ int k; int nbits, nzero, fs; unsigned char *cend, bytevalue; unsigned int b, diff, lastpix; int fsmax, fsbits, bbits; extern const int nonzero_count[]; /* * Original size of each pixel (bsize, bytes) and coding block * size (nblock, pixels) * Could make bsize a parameter to allow more efficient * compression of short & byte images. */ /* bsize = 2; */ /* nblock = 32; now an input parameter */ /* * From bsize derive: * FSBITS = # bits required to store FS * FSMAX = maximum value for FS * BBITS = bits/pixel for direct coding */ /* switch (bsize) { case 1: fsbits = 3; fsmax = 6; break; case 2: fsbits = 4; fsmax = 14; break; case 4: fsbits = 5; fsmax = 25; break; default: ffpmsg("rdecomp: bsize must be 1, 2, or 4 bytes"); return 1; } */ /* move out of switch block, to tweak performance */ fsbits = 4; fsmax = 14; bbits = 1<> nbits) - 1; b &= (1< nx) imax = nx; if (fs<0) { /* low-entropy case, all zero differences */ for ( ; i= 0; k -= 8) { b = *c++; diff |= b<0) { b = *c++; diff |= b>>(-k); b &= (1<>1; } else { diff = ~(diff>>1); } array[i] = diff+lastpix; lastpix = array[i]; } } else { /* normal case, Rice coding */ for ( ; i>nbits); b &= (1<>1; } else { diff = ~(diff>>1); } array[i] = diff+lastpix; lastpix = array[i]; } } if (c > cend) { ffpmsg("decompression error: hit end of compressed byte stream"); return 1; } } if (c < cend) { ffpmsg("decompression warning: unused bytes at end of compressed buffer"); } return 0; } /*---------------------------------------------------------------------------*/ /* this routine used to be called 'rdecomp' (WDP) */ int fits_rdecomp_byte (unsigned char *c, /* input buffer */ int clen, /* length of input */ unsigned char array[], /* output array */ int nx, /* number of output pixels */ int nblock) /* coding block size */ { int i, imax; /* int bsize; */ int k; int nbits, nzero, fs; unsigned char *cend; unsigned int b, diff, lastpix; int fsmax, fsbits, bbits; extern const int nonzero_count[]; /* * Original size of each pixel (bsize, bytes) and coding block * size (nblock, pixels) * Could make bsize a parameter to allow more efficient * compression of short & byte images. */ /* bsize = 1; */ /* nblock = 32; now an input parameter */ /* * From bsize derive: * FSBITS = # bits required to store FS * FSMAX = maximum value for FS * BBITS = bits/pixel for direct coding */ /* switch (bsize) { case 1: fsbits = 3; fsmax = 6; break; case 2: fsbits = 4; fsmax = 14; break; case 4: fsbits = 5; fsmax = 25; break; default: ffpmsg("rdecomp: bsize must be 1, 2, or 4 bytes"); return 1; } */ /* move out of switch block, to tweak performance */ fsbits = 3; fsmax = 6; bbits = 1<> nbits) - 1; b &= (1< nx) imax = nx; if (fs<0) { /* low-entropy case, all zero differences */ for ( ; i= 0; k -= 8) { b = *c++; diff |= b<0) { b = *c++; diff |= b>>(-k); b &= (1<>1; } else { diff = ~(diff>>1); } array[i] = diff+lastpix; lastpix = array[i]; } } else { /* normal case, Rice coding */ for ( ; i>nbits); b &= (1<>1; } else { diff = ~(diff>>1); } array[i] = diff+lastpix; lastpix = array[i]; } } if (c > cend) { ffpmsg("decompression error: hit end of compressed byte stream"); return 1; } } if (c < cend) { ffpmsg("decompression warning: unused bytes at end of compressed buffer"); } return 0; } astropy-1.1.1/cextern/cfitsio/inffast.h0000644001134200020070000000065312602615517021043 0ustar embrayscience00000000000000/* inffast.h -- header to use inffast.c * Copyright (C) 1995-2003, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* WARNING: this file should *not* be used by applications. It is part of the implementation of the compression library and is subject to change. Applications should only use zlib.h. */ void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); astropy-1.1.1/cextern/cfitsio/inftrees.h0000644001134200020070000000556012602615520021224 0ustar embrayscience00000000000000/* inftrees.h -- header to use inftrees.c * Copyright (C) 1995-2005, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* WARNING: this file should *not* be used by applications. It is part of the implementation of the compression library and is subject to change. Applications should only use zlib.h. */ /* Structure for decoding tables. Each entry provides either the information needed to do the operation requested by the code that indexed that table entry, or it provides a pointer to another table that indexes more bits of the code. op indicates whether the entry is a pointer to another table, a literal, a length or distance, an end-of-block, or an invalid code. For a table pointer, the low four bits of op is the number of index bits of that table. For a length or distance, the low four bits of op is the number of extra bits to get after the code. bits is the number of bits in this code or part of the code to drop off of the bit buffer. val is the actual byte to output in the case of a literal, the base length or distance, or the offset from the current table to the next table. Each entry is four bytes. */ typedef struct { unsigned char op; /* operation, extra bits, table bits */ unsigned char bits; /* bits in this part of the code */ unsigned short val; /* offset in table or code value */ } code; /* op values as set by inflate_table(): 00000000 - literal 0000tttt - table link, tttt != 0 is the number of table index bits 0001eeee - length or distance, eeee is the number of extra bits 01100000 - end of block 01000000 - invalid code */ /* Maximum size of the dynamic table. The maximum number of code structures is 1444, which is the sum of 852 for literal/length codes and 592 for distance codes. These values were found by exhaustive searches using the program examples/enough.c found in the zlib distribtution. The arguments to that program are the number of symbols, the initial root table size, and the maximum bit length of a code. "enough 286 9 15" for literal/length codes returns returns 852, and "enough 30 6 15" for distance codes returns 592. The initial root table size (9 or 6) is found in the fifth argument of the inflate_table() calls in inflate.c and infback.c. If the root table size is changed, then these maximum sizes would be need to be recalculated and updated. */ #define ENOUGH_LENS 852 #define ENOUGH_DISTS 592 #define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) /* Type of code to build for inflate_table() */ typedef enum { CODES, LENS, DISTS } codetype; int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, unsigned codes, code FAR * FAR *table, unsigned FAR *bits, unsigned short FAR *work)); astropy-1.1.1/cextern/cfitsio/buffers.c0000644001134200020070000014745612602615520021047 0ustar embrayscience00000000000000/* This file, buffers.c, contains the core set of FITSIO routines */ /* that use or manage the internal set of IO buffers. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffmbyt(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG bytepos, /* I - byte position in file to move to */ int err_mode, /* I - 1=ignore error, 0 = return error */ int *status) /* IO - error status */ { /* Move to the input byte location in the file. When writing to a file, a move may sometimes be made to a position beyond the current EOF. The err_mode parameter determines whether such conditions should be returned as an error or simply ignored. */ long record; if (*status > 0) return(*status); if (bytepos < 0) return(*status = NEG_FILE_POS); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); record = (long) (bytepos / IOBUFLEN); /* zero-indexed record number */ /* if this is not the current record, then load it */ if ( ((fptr->Fptr)->curbuf < 0) || (record != (fptr->Fptr)->bufrecnum[(fptr->Fptr)->curbuf])) ffldrc(fptr, record, err_mode, status); if (*status <= 0) (fptr->Fptr)->bytepos = bytepos; /* save new file position */ return(*status); } /*--------------------------------------------------------------------------*/ int ffpbyt(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG nbytes, /* I - number of bytes to write */ void *buffer, /* I - buffer containing the bytes to write */ int *status) /* IO - error status */ /* put (write) the buffer of bytes to the output FITS file, starting at the current file position. Write large blocks of data directly to disk; write smaller segments to intermediate IO buffers to improve efficiency. */ { int ii, nbuff; LONGLONG filepos; long recstart, recend; long ntodo, bufpos, nspace, nwrite; char *cptr; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); cptr = (char *)buffer; ntodo = (long) nbytes; if ((fptr->Fptr)->curbuf < 0) /* no current data buffer for this file */ { /* so reload the last one that was used */ ffldrc(fptr, (long) (((fptr->Fptr)->bytepos) / IOBUFLEN), REPORT_EOF, status); } if (nbytes >= MINDIRECT) { /* write large blocks of data directly to disk instead of via buffers */ /* first, fill up the current IO buffer before flushing it to disk */ nbuff = (fptr->Fptr)->curbuf; /* current IO buffer number */ filepos = (fptr->Fptr)->bytepos; /* save the write starting position */ recstart = (fptr->Fptr)->bufrecnum[nbuff]; /* starting record */ recend = (long) ((filepos + nbytes - 1) / IOBUFLEN); /* ending record */ /* bufpos is the starting position within the IO buffer */ bufpos = (long) (filepos - ((LONGLONG)recstart * IOBUFLEN)); nspace = IOBUFLEN - bufpos; /* amount of space left in the buffer */ if (nspace) { /* fill up the IO buffer */ memcpy((fptr->Fptr)->iobuffer + (nbuff * IOBUFLEN) + bufpos, cptr, nspace); ntodo -= nspace; /* decrement remaining number of bytes */ cptr += nspace; /* increment user buffer pointer */ filepos += nspace; /* increment file position pointer */ (fptr->Fptr)->dirty[nbuff] = TRUE; /* mark record as having been modified */ } for (ii = 0; ii < NIOBUF; ii++) /* flush any affected buffers to disk */ { if ((fptr->Fptr)->bufrecnum[ii] >= recstart && (fptr->Fptr)->bufrecnum[ii] <= recend ) { if ((fptr->Fptr)->dirty[ii]) /* flush modified buffer to disk */ ffbfwt(fptr->Fptr, ii, status); (fptr->Fptr)->bufrecnum[ii] = -1; /* disassociate buffer from the file */ } } /* move to the correct write position */ if ((fptr->Fptr)->io_pos != filepos) ffseek(fptr->Fptr, filepos); nwrite = ((ntodo - 1) / IOBUFLEN) * IOBUFLEN; /* don't write last buff */ ffwrite(fptr->Fptr, nwrite, cptr, status); /* write the data */ ntodo -= nwrite; /* decrement remaining number of bytes */ cptr += nwrite; /* increment user buffer pointer */ (fptr->Fptr)->io_pos = filepos + nwrite; /* update the file position */ if ((fptr->Fptr)->io_pos >= (fptr->Fptr)->filesize) /* at the EOF? */ { (fptr->Fptr)->filesize = (fptr->Fptr)->io_pos; /* increment file size */ /* initialize the current buffer with the correct fill value */ if ((fptr->Fptr)->hdutype == ASCII_TBL) memset((fptr->Fptr)->iobuffer + (nbuff * IOBUFLEN), 32, IOBUFLEN); /* blank fill */ else memset((fptr->Fptr)->iobuffer + (nbuff * IOBUFLEN), 0, IOBUFLEN); /* zero fill */ } else { /* read next record */ ffread(fptr->Fptr, IOBUFLEN, (fptr->Fptr)->iobuffer + (nbuff * IOBUFLEN), status); (fptr->Fptr)->io_pos += IOBUFLEN; } /* copy remaining bytes from user buffer into current IO buffer */ memcpy((fptr->Fptr)->iobuffer + (nbuff * IOBUFLEN), cptr, ntodo); (fptr->Fptr)->dirty[nbuff] = TRUE; /* mark record as having been modified */ (fptr->Fptr)->bufrecnum[nbuff] = recend; /* record number */ (fptr->Fptr)->logfilesize = maxvalue((fptr->Fptr)->logfilesize, (LONGLONG)(recend + 1) * IOBUFLEN); (fptr->Fptr)->bytepos = filepos + nwrite + ntodo; } else { /* bufpos is the starting position in IO buffer */ bufpos = (long) ((fptr->Fptr)->bytepos - ((LONGLONG)(fptr->Fptr)->bufrecnum[(fptr->Fptr)->curbuf] * IOBUFLEN)); nspace = IOBUFLEN - bufpos; /* amount of space left in the buffer */ while (ntodo) { nwrite = minvalue(ntodo, nspace); /* copy bytes from user's buffer to the IO buffer */ memcpy((fptr->Fptr)->iobuffer + ((fptr->Fptr)->curbuf * IOBUFLEN) + bufpos, cptr, nwrite); ntodo -= nwrite; /* decrement remaining number of bytes */ cptr += nwrite; (fptr->Fptr)->bytepos += nwrite; /* increment file position pointer */ (fptr->Fptr)->dirty[(fptr->Fptr)->curbuf] = TRUE; /* mark record as modified */ if (ntodo) /* load next record into a buffer */ { ffldrc(fptr, (long) ((fptr->Fptr)->bytepos / IOBUFLEN), IGNORE_EOF, status); bufpos = 0; nspace = IOBUFLEN; } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffpbytoff(fitsfile *fptr, /* I - FITS file pointer */ long gsize, /* I - size of each group of bytes */ long ngroups, /* I - number of groups to write */ long offset, /* I - size of gap between groups */ void *buffer, /* I - buffer to be written */ int *status) /* IO - error status */ /* put (write) the buffer of bytes to the output FITS file, with an offset between each group of bytes. This function combines ffmbyt and ffpbyt for increased efficiency. */ { int bcurrent; long ii, bufpos, nspace, nwrite, record; char *cptr, *ioptr; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if ((fptr->Fptr)->curbuf < 0) /* no current data buffer for this file */ { /* so reload the last one that was used */ ffldrc(fptr, (long) (((fptr->Fptr)->bytepos) / IOBUFLEN), REPORT_EOF, status); } cptr = (char *)buffer; bcurrent = (fptr->Fptr)->curbuf; /* number of the current IO buffer */ record = (fptr->Fptr)->bufrecnum[bcurrent]; /* zero-indexed record number */ bufpos = (long) ((fptr->Fptr)->bytepos - ((LONGLONG)record * IOBUFLEN)); /* start pos */ nspace = IOBUFLEN - bufpos; /* amount of space left in buffer */ ioptr = (fptr->Fptr)->iobuffer + (bcurrent * IOBUFLEN) + bufpos; for (ii = 1; ii < ngroups; ii++) /* write all but the last group */ { /* copy bytes from user's buffer to the IO buffer */ nwrite = minvalue(gsize, nspace); memcpy(ioptr, cptr, nwrite); cptr += nwrite; /* increment buffer pointer */ if (nwrite < gsize) /* entire group did not fit */ { (fptr->Fptr)->dirty[bcurrent] = TRUE; /* mark record as having been modified */ record++; ffldrc(fptr, record, IGNORE_EOF, status); /* load next record */ bcurrent = (fptr->Fptr)->curbuf; ioptr = (fptr->Fptr)->iobuffer + (bcurrent * IOBUFLEN); nwrite = gsize - nwrite; memcpy(ioptr, cptr, nwrite); cptr += nwrite; /* increment buffer pointer */ ioptr += (offset + nwrite); /* increment IO buffer pointer */ nspace = IOBUFLEN - offset - nwrite; /* amount of space left */ } else { ioptr += (offset + nwrite); /* increment IO bufer pointer */ nspace -= (offset + nwrite); } if (nspace <= 0) /* beyond current record? */ { (fptr->Fptr)->dirty[bcurrent] = TRUE; record += ((IOBUFLEN - nspace) / IOBUFLEN); /* new record number */ ffldrc(fptr, record, IGNORE_EOF, status); bcurrent = (fptr->Fptr)->curbuf; bufpos = (-nspace) % IOBUFLEN; /* starting buffer pos */ nspace = IOBUFLEN - bufpos; ioptr = (fptr->Fptr)->iobuffer + (bcurrent * IOBUFLEN) + bufpos; } } /* now write the last group */ nwrite = minvalue(gsize, nspace); memcpy(ioptr, cptr, nwrite); cptr += nwrite; /* increment buffer pointer */ if (nwrite < gsize) /* entire group did not fit */ { (fptr->Fptr)->dirty[bcurrent] = TRUE; /* mark record as having been modified */ record++; ffldrc(fptr, record, IGNORE_EOF, status); /* load next record */ bcurrent = (fptr->Fptr)->curbuf; ioptr = (fptr->Fptr)->iobuffer + (bcurrent * IOBUFLEN); nwrite = gsize - nwrite; memcpy(ioptr, cptr, nwrite); } (fptr->Fptr)->dirty[bcurrent] = TRUE; /* mark record as having been modified */ (fptr->Fptr)->bytepos = (fptr->Fptr)->bytepos + (ngroups * gsize) + (ngroups - 1) * offset; return(*status); } /*--------------------------------------------------------------------------*/ int ffgbyt(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG nbytes, /* I - number of bytes to read */ void *buffer, /* O - buffer to read into */ int *status) /* IO - error status */ /* get (read) the requested number of bytes from the file, starting at the current file position. Read large blocks of data directly from disk; read smaller segments via intermediate IO buffers to improve efficiency. */ { int ii; LONGLONG filepos; long recstart, recend, ntodo, bufpos, nspace, nread; char *cptr; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); cptr = (char *)buffer; if (nbytes >= MINDIRECT) { /* read large blocks of data directly from disk instead of via buffers */ filepos = (fptr->Fptr)->bytepos; /* save the read starting position */ /* note that in this case, ffmbyt has not been called, and so */ /* bufrecnum[(fptr->Fptr)->curbuf] does not point to the intended */ /* output buffer */ recstart = (long) (filepos / IOBUFLEN); /* starting record */ recend = (long) ((filepos + nbytes - 1) / IOBUFLEN); /* ending record */ for (ii = 0; ii < NIOBUF; ii++) /* flush any affected buffers to disk */ { if ((fptr->Fptr)->dirty[ii] && (fptr->Fptr)->bufrecnum[ii] >= recstart && (fptr->Fptr)->bufrecnum[ii] <= recend) { ffbfwt(fptr->Fptr, ii, status); /* flush modified buffer to disk */ } } /* move to the correct read position */ if ((fptr->Fptr)->io_pos != filepos) ffseek(fptr->Fptr, filepos); ffread(fptr->Fptr, (long) nbytes, cptr, status); /* read the data */ (fptr->Fptr)->io_pos = filepos + nbytes; /* update the file position */ } else { /* read small chucks of data using the IO buffers for efficiency */ if ((fptr->Fptr)->curbuf < 0) /* no current data buffer for this file */ { /* so reload the last one that was used */ ffldrc(fptr, (long) (((fptr->Fptr)->bytepos) / IOBUFLEN), REPORT_EOF, status); } /* bufpos is the starting position in IO buffer */ bufpos = (long) ((fptr->Fptr)->bytepos - ((LONGLONG)(fptr->Fptr)->bufrecnum[(fptr->Fptr)->curbuf] * IOBUFLEN)); nspace = IOBUFLEN - bufpos; /* amount of space left in the buffer */ ntodo = (long) nbytes; while (ntodo) { nread = minvalue(ntodo, nspace); /* copy bytes from IO buffer to user's buffer */ memcpy(cptr, (fptr->Fptr)->iobuffer + ((fptr->Fptr)->curbuf * IOBUFLEN) + bufpos, nread); ntodo -= nread; /* decrement remaining number of bytes */ cptr += nread; (fptr->Fptr)->bytepos += nread; /* increment file position pointer */ if (ntodo) /* load next record into a buffer */ { ffldrc(fptr, (long) ((fptr->Fptr)->bytepos / IOBUFLEN), REPORT_EOF, status); bufpos = 0; nspace = IOBUFLEN; } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgbytoff(fitsfile *fptr, /* I - FITS file pointer */ long gsize, /* I - size of each group of bytes */ long ngroups, /* I - number of groups to read */ long offset, /* I - size of gap between groups (may be < 0) */ void *buffer, /* I - buffer to be filled */ int *status) /* IO - error status */ /* get (read) the requested number of bytes from the file, starting at the current file position. This function combines ffmbyt and ffgbyt for increased efficiency. */ { int bcurrent; long ii, bufpos, nspace, nread, record; char *cptr, *ioptr; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if ((fptr->Fptr)->curbuf < 0) /* no current data buffer for this file */ { /* so reload the last one that was used */ ffldrc(fptr, (long) (((fptr->Fptr)->bytepos) / IOBUFLEN), REPORT_EOF, status); } cptr = (char *)buffer; bcurrent = (fptr->Fptr)->curbuf; /* number of the current IO buffer */ record = (fptr->Fptr)->bufrecnum[bcurrent]; /* zero-indexed record number */ bufpos = (long) ((fptr->Fptr)->bytepos - ((LONGLONG)record * IOBUFLEN)); /* start pos */ nspace = IOBUFLEN - bufpos; /* amount of space left in buffer */ ioptr = (fptr->Fptr)->iobuffer + (bcurrent * IOBUFLEN) + bufpos; for (ii = 1; ii < ngroups; ii++) /* read all but the last group */ { /* copy bytes from IO buffer to the user's buffer */ nread = minvalue(gsize, nspace); memcpy(cptr, ioptr, nread); cptr += nread; /* increment buffer pointer */ if (nread < gsize) /* entire group did not fit */ { record++; ffldrc(fptr, record, REPORT_EOF, status); /* load next record */ bcurrent = (fptr->Fptr)->curbuf; ioptr = (fptr->Fptr)->iobuffer + (bcurrent * IOBUFLEN); nread = gsize - nread; memcpy(cptr, ioptr, nread); cptr += nread; /* increment buffer pointer */ ioptr += (offset + nread); /* increment IO buffer pointer */ nspace = IOBUFLEN - offset - nread; /* amount of space left */ } else { ioptr += (offset + nread); /* increment IO bufer pointer */ nspace -= (offset + nread); } if (nspace <= 0 || nspace > IOBUFLEN) /* beyond current record? */ { if (nspace <= 0) { record += ((IOBUFLEN - nspace) / IOBUFLEN); /* new record number */ bufpos = (-nspace) % IOBUFLEN; /* starting buffer pos */ } else { record -= ((nspace - 1 ) / IOBUFLEN); /* new record number */ bufpos = IOBUFLEN - (nspace % IOBUFLEN); /* starting buffer pos */ } ffldrc(fptr, record, REPORT_EOF, status); bcurrent = (fptr->Fptr)->curbuf; nspace = IOBUFLEN - bufpos; ioptr = (fptr->Fptr)->iobuffer + (bcurrent * IOBUFLEN) + bufpos; } } /* now read the last group */ nread = minvalue(gsize, nspace); memcpy(cptr, ioptr, nread); cptr += nread; /* increment buffer pointer */ if (nread < gsize) /* entire group did not fit */ { record++; ffldrc(fptr, record, REPORT_EOF, status); /* load next record */ bcurrent = (fptr->Fptr)->curbuf; ioptr = (fptr->Fptr)->iobuffer + (bcurrent * IOBUFLEN); nread = gsize - nread; memcpy(cptr, ioptr, nread); } (fptr->Fptr)->bytepos = (fptr->Fptr)->bytepos + (ngroups * gsize) + (ngroups - 1) * offset; return(*status); } /*--------------------------------------------------------------------------*/ int ffldrc(fitsfile *fptr, /* I - FITS file pointer */ long record, /* I - record number to be loaded */ int err_mode, /* I - 1=ignore EOF, 0 = return EOF error */ int *status) /* IO - error status */ { /* low-level routine to load a specified record from a file into a physical buffer, if it is not already loaded. Reset all pointers to make this the new current record for that file. Update ages of all the physical buffers. */ int ibuff, nbuff; LONGLONG rstart; /* check if record is already loaded in one of the buffers */ /* search from youngest to oldest buffer for efficiency */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); for (ibuff = NIOBUF - 1; ibuff >= 0; ibuff--) { nbuff = (fptr->Fptr)->ageindex[ibuff]; if (record == (fptr->Fptr)->bufrecnum[nbuff]) { goto updatebuf; /* use 'goto' for efficiency */ } } /* record is not already loaded */ rstart = (LONGLONG)record * IOBUFLEN; if ( !err_mode && (rstart >= (fptr->Fptr)->logfilesize) ) /* EOF? */ return(*status = END_OF_FILE); if (ffwhbf(fptr, &nbuff) < 0) /* which buffer should we reuse? */ return(*status = TOO_MANY_FILES); if ((fptr->Fptr)->dirty[nbuff]) ffbfwt(fptr->Fptr, nbuff, status); /* write dirty buffer to disk */ if (rstart >= (fptr->Fptr)->filesize) /* EOF? */ { /* initialize an empty buffer with the correct fill value */ if ((fptr->Fptr)->hdutype == ASCII_TBL) memset((fptr->Fptr)->iobuffer + (nbuff * IOBUFLEN), 32, IOBUFLEN); /* blank fill */ else memset((fptr->Fptr)->iobuffer + (nbuff * IOBUFLEN), 0, IOBUFLEN); /* zero fill */ (fptr->Fptr)->logfilesize = maxvalue((fptr->Fptr)->logfilesize, rstart + IOBUFLEN); (fptr->Fptr)->dirty[nbuff] = TRUE; /* mark record as having been modified */ } else /* not EOF, so read record from disk */ { if ((fptr->Fptr)->io_pos != rstart) ffseek(fptr->Fptr, rstart); ffread(fptr->Fptr, IOBUFLEN, (fptr->Fptr)->iobuffer + (nbuff * IOBUFLEN), status); (fptr->Fptr)->io_pos = rstart + IOBUFLEN; /* set new IO position */ } (fptr->Fptr)->bufrecnum[nbuff] = record; /* record number contained in buffer */ updatebuf: (fptr->Fptr)->curbuf = nbuff; /* this is the current buffer for this file */ if (ibuff < 0) { /* find the current position of the buffer in the age index */ for (ibuff = 0; ibuff < NIOBUF; ibuff++) if ((fptr->Fptr)->ageindex[ibuff] == nbuff) break; } /* increment the age of all the buffers that were younger than it */ for (ibuff++; ibuff < NIOBUF; ibuff++) (fptr->Fptr)->ageindex[ibuff - 1] = (fptr->Fptr)->ageindex[ibuff]; (fptr->Fptr)->ageindex[NIOBUF - 1] = nbuff; /* this is now the youngest buffer */ return(*status); } /*--------------------------------------------------------------------------*/ int ffwhbf(fitsfile *fptr, /* I - FITS file pointer */ int *nbuff) /* O - which buffer to use */ { /* decide which buffer to (re)use to hold a new file record */ return(*nbuff = (fptr->Fptr)->ageindex[0]); /* return oldest buffer */ } /*--------------------------------------------------------------------------*/ int ffflus(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* Flush all the data in the current FITS file to disk. This ensures that if the program subsequently dies, the disk FITS file will be closed correctly. */ { int hdunum, hdutype; if (*status > 0) return(*status); ffghdn(fptr, &hdunum); /* get the current HDU number */ if (ffchdu(fptr,status) > 0) /* close out the current HDU */ ffpmsg("ffflus could not close the current HDU."); ffflsh(fptr, FALSE, status); /* flush any modified IO buffers to disk */ if (ffgext(fptr, hdunum - 1, &hdutype, status) > 0) /* reopen HDU */ ffpmsg("ffflus could not reopen the current HDU."); return(*status); } /*--------------------------------------------------------------------------*/ int ffflsh(fitsfile *fptr, /* I - FITS file pointer */ int clearbuf, /* I - also clear buffer contents? */ int *status) /* IO - error status */ { /* flush all dirty IO buffers associated with the file to disk */ int ii; /* no need to move to a different HDU if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); */ for (ii = 0; ii < NIOBUF; ii++) { /* flush modified buffer to disk */ if ((fptr->Fptr)->bufrecnum[ii] >= 0 &&(fptr->Fptr)->dirty[ii]) ffbfwt(fptr->Fptr, ii, status); if (clearbuf) (fptr->Fptr)->bufrecnum[ii] = -1; /* set contents of buffer as undefined */ } if (*status != READONLY_FILE) ffflushx(fptr->Fptr); /* flush system buffers to disk */ return(*status); } /*--------------------------------------------------------------------------*/ int ffbfeof(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ { /* clear any buffers beyond the end of file */ int ii; for (ii = 0; ii < NIOBUF; ii++) { if ( (LONGLONG) (fptr->Fptr)->bufrecnum[ii] * IOBUFLEN >= fptr->Fptr->filesize) { (fptr->Fptr)->bufrecnum[ii] = -1; /* set contents of buffer as undefined */ } } return(*status); } /*--------------------------------------------------------------------------*/ int ffbfwt(FITSfile *Fptr, /* I - FITS file pointer */ int nbuff, /* I - which buffer to write */ int *status) /* IO - error status */ { /* write contents of buffer to file; If the position of the buffer is beyond the current EOF, then the file may need to be extended with fill values, and/or with the contents of some of the other i/o buffers. */ int ii,ibuff; long jj, irec, minrec, nloop; LONGLONG filepos; static char zeros[IOBUFLEN]; /* initialized to zero by default */ if (!(Fptr->writemode) ) { ffpmsg("Error: trying to write to READONLY file."); if (Fptr->driver == 8) { /* gzip compressed file */ ffpmsg("Cannot write to a GZIP or COMPRESS compressed file."); } Fptr->dirty[nbuff] = FALSE; /* reset buffer status to prevent later probs */ *status = READONLY_FILE; return(*status); } filepos = (LONGLONG)Fptr->bufrecnum[nbuff] * IOBUFLEN; if (filepos <= Fptr->filesize) { /* record is located within current file, so just write it */ /* move to the correct write position */ if (Fptr->io_pos != filepos) ffseek(Fptr, filepos); ffwrite(Fptr, IOBUFLEN, Fptr->iobuffer + (nbuff * IOBUFLEN), status); Fptr->io_pos = filepos + IOBUFLEN; if (filepos == Fptr->filesize) /* appended new record? */ Fptr->filesize += IOBUFLEN; /* increment the file size */ Fptr->dirty[nbuff] = FALSE; } else /* if record is beyond the EOF, append any other records */ /* and/or insert fill values if necessary */ { /* move to EOF */ if (Fptr->io_pos != Fptr->filesize) ffseek(Fptr, Fptr->filesize); ibuff = NIOBUF; /* initialize to impossible value */ while(ibuff != nbuff) /* repeat until requested buffer is written */ { minrec = (long) (Fptr->filesize / IOBUFLEN); /* write lowest record beyond the EOF first */ irec = Fptr->bufrecnum[nbuff]; /* initially point to the requested buffer */ ibuff = nbuff; for (ii = 0; ii < NIOBUF; ii++) { if (Fptr->bufrecnum[ii] >= minrec && Fptr->bufrecnum[ii] < irec) { irec = Fptr->bufrecnum[ii]; /* found a lower record */ ibuff = ii; } } filepos = (LONGLONG)irec * IOBUFLEN; /* byte offset of record in file */ /* append 1 or more fill records if necessary */ if (filepos > Fptr->filesize) { nloop = (long) ((filepos - (Fptr->filesize)) / IOBUFLEN); for (jj = 0; jj < nloop && !(*status); jj++) ffwrite(Fptr, IOBUFLEN, zeros, status); /* ffseek(Fptr, filepos); */ Fptr->filesize = filepos; /* increment the file size */ } /* write the buffer itself */ ffwrite(Fptr, IOBUFLEN, Fptr->iobuffer + (ibuff * IOBUFLEN), status); Fptr->dirty[ibuff] = FALSE; Fptr->filesize += IOBUFLEN; /* increment the file size */ } /* loop back if more buffers need to be written */ Fptr->io_pos = Fptr->filesize; /* currently positioned at EOF */ } return(*status); } /*--------------------------------------------------------------------------*/ int ffgrsz( fitsfile *fptr, /* I - FITS file pionter */ long *ndata, /* O - optimal amount of data to access */ int *status) /* IO - error status */ /* Returns an optimal value for the number of rows in a binary table or the number of pixels in an image that should be read or written at one time for maximum efficiency. Accessing more data than this may cause excessive flushing and rereading of buffers to/from disk. */ { int typecode, bytesperpixel; /* There are NIOBUF internal buffers available each IOBUFLEN bytes long. */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header to get hdu struct */ return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU ) /* calc pixels per buffer size */ { /* image pixels are in column 2 of the 'table' */ ffgtcl(fptr, 2, &typecode, NULL, NULL, status); bytesperpixel = typecode / 10; *ndata = ((NIOBUF - 1) * IOBUFLEN) / bytesperpixel; } else /* calc number of rows that fit in buffers */ { *ndata = (long) (((NIOBUF - 1) * IOBUFLEN) / maxvalue(1, (fptr->Fptr)->rowlength)); *ndata = maxvalue(1, *ndata); } return(*status); } /*--------------------------------------------------------------------------*/ int ffgtbb(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG firstrow, /* I - starting row (1 = first row) */ LONGLONG firstchar, /* I - starting byte in row (1=first) */ LONGLONG nchars, /* I - number of bytes to read */ unsigned char *values, /* I - array of bytes to read */ int *status) /* IO - error status */ /* read a consecutive string of bytes from an ascii or binary table. This will span multiple rows of the table if nchars + firstchar is greater than the length of a row. */ { LONGLONG bytepos, endrow; if (*status > 0 || nchars <= 0) return(*status); else if (firstrow < 1) return(*status=BAD_ROW_NUM); else if (firstchar < 1) return(*status=BAD_ELEM_NUM); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* check that we do not exceed number of rows in the table */ endrow = ((firstchar + nchars - 2) / (fptr->Fptr)->rowlength) + firstrow; if (endrow > (fptr->Fptr)->numrows) { ffpmsg("attempt to read past end of table (ffgtbb)"); return(*status=BAD_ROW_NUM); } /* move the i/o pointer to the start of the sequence of characters */ bytepos = (fptr->Fptr)->datastart + ((fptr->Fptr)->rowlength * (firstrow - 1)) + firstchar - 1; ffmbyt(fptr, bytepos, REPORT_EOF, status); ffgbyt(fptr, nchars, values, status); /* read the bytes */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgi1b(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG byteloc, /* I - position within file to start reading */ long nvals, /* I - number of pixels to read */ long incre, /* I - byte increment between pixels */ unsigned char *values, /* O - returned array of values */ int *status) /* IO - error status */ /* get (read) the array of values from the FITS file, doing machine dependent format conversion (e.g. byte-swapping) if necessary. */ { LONGLONG postemp; if (incre == 1) /* read all the values at once (contiguous bytes) */ { if (nvals < MINDIRECT) /* read normally via IO buffers */ { ffmbyt(fptr, byteloc, REPORT_EOF, status); ffgbyt(fptr, nvals, values, status); } else /* read directly from disk, bypassing IO buffers */ { postemp = (fptr->Fptr)->bytepos; /* store current file position */ (fptr->Fptr)->bytepos = byteloc; /* set to the desired position */ ffgbyt(fptr, nvals, values, status); (fptr->Fptr)->bytepos = postemp; /* reset to original position */ } } else /* have to read each value individually (not contiguous ) */ { ffmbyt(fptr, byteloc, REPORT_EOF, status); ffgbytoff(fptr, 1, nvals, incre - 1, values, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffgi2b(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG byteloc, /* I - position within file to start reading */ long nvals, /* I - number of pixels to read */ long incre, /* I - byte increment between pixels */ short *values, /* O - returned array of values */ int *status) /* IO - error status */ /* get (read) the array of values from the FITS file, doing machine dependent format conversion (e.g. byte-swapping) if necessary. */ { LONGLONG postemp; if (incre == 2) /* read all the values at once (contiguous bytes) */ { if (nvals * 2 < MINDIRECT) /* read normally via IO buffers */ { ffmbyt(fptr, byteloc, REPORT_EOF, status); ffgbyt(fptr, nvals * 2, values, status); } else /* read directly from disk, bypassing IO buffers */ { postemp = (fptr->Fptr)->bytepos; /* store current file position */ (fptr->Fptr)->bytepos = byteloc; /* set to the desired position */ ffgbyt(fptr, nvals * 2, values, status); (fptr->Fptr)->bytepos = postemp; /* reset to original position */ } } else /* have to read each value individually (not contiguous ) */ { ffmbyt(fptr, byteloc, REPORT_EOF, status); ffgbytoff(fptr, 2, nvals, incre - 2, values, status); } #if BYTESWAPPED ffswap2(values, nvals); /* reverse order of bytes in each value */ #endif return(*status); } /*--------------------------------------------------------------------------*/ int ffgi4b(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG byteloc, /* I - position within file to start reading */ long nvals, /* I - number of pixels to read */ long incre, /* I - byte increment between pixels */ INT32BIT *values, /* O - returned array of values */ int *status) /* IO - error status */ /* get (read) the array of values from the FITS file, doing machine dependent format conversion (e.g. byte-swapping) if necessary. */ { LONGLONG postemp; if (incre == 4) /* read all the values at once (contiguous bytes) */ { if (nvals * 4 < MINDIRECT) /* read normally via IO buffers */ { ffmbyt(fptr, byteloc, REPORT_EOF, status); ffgbyt(fptr, nvals * 4, values, status); } else /* read directly from disk, bypassing IO buffers */ { postemp = (fptr->Fptr)->bytepos; /* store current file position */ (fptr->Fptr)->bytepos = byteloc; /* set to the desired position */ ffgbyt(fptr, nvals * 4, values, status); (fptr->Fptr)->bytepos = postemp; /* reset to original position */ } } else /* have to read each value individually (not contiguous ) */ { ffmbyt(fptr, byteloc, REPORT_EOF, status); ffgbytoff(fptr, 4, nvals, incre - 4, values, status); } #if BYTESWAPPED ffswap4(values, nvals); /* reverse order of bytes in each value */ #endif return(*status); } /*--------------------------------------------------------------------------*/ int ffgi8b(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG byteloc, /* I - position within file to start reading */ long nvals, /* I - number of pixels to read */ long incre, /* I - byte increment between pixels */ long *values, /* O - returned array of values */ int *status) /* IO - error status */ /* get (read) the array of values from the FITS file, doing machine dependent format conversion (e.g. byte-swapping) if necessary. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! This routine reads 'nvals' 8-byte integers into 'values'. This works both on platforms that have sizeof(long) = 64, and 32, as long as 'values' has been allocated to large enough to hold 8 * nvals bytes of data. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ { LONGLONG postemp; if (incre == 8) /* read all the values at once (contiguous bytes) */ { if (nvals * 8 < MINDIRECT) /* read normally via IO buffers */ { ffmbyt(fptr, byteloc, REPORT_EOF, status); ffgbyt(fptr, nvals * 8, values, status); } else /* read directly from disk, bypassing IO buffers */ { postemp = (fptr->Fptr)->bytepos; /* store current file position */ (fptr->Fptr)->bytepos = byteloc; /* set to the desired position */ ffgbyt(fptr, nvals * 8, values, status); (fptr->Fptr)->bytepos = postemp; /* reset to original position */ } } else /* have to read each value individually (not contiguous ) */ { ffmbyt(fptr, byteloc, REPORT_EOF, status); ffgbytoff(fptr, 8, nvals, incre - 8, values, status); } #if BYTESWAPPED ffswap8((double *) values, nvals); /* reverse bytes in each value */ #endif return(*status); } /*--------------------------------------------------------------------------*/ int ffgr4b(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG byteloc, /* I - position within file to start reading */ long nvals, /* I - number of pixels to read */ long incre, /* I - byte increment between pixels */ float *values, /* O - returned array of values */ int *status) /* IO - error status */ /* get (read) the array of values from the FITS file, doing machine dependent format conversion (e.g. byte-swapping) if necessary. */ { LONGLONG postemp; #if MACHINE == VAXVMS long ii; #elif (MACHINE == ALPHAVMS) && (FLOATTYPE == GFLOAT) short *sptr; long ii; #endif if (incre == 4) /* read all the values at once (contiguous bytes) */ { if (nvals * 4 < MINDIRECT) /* read normally via IO buffers */ { ffmbyt(fptr, byteloc, REPORT_EOF, status); ffgbyt(fptr, nvals * 4, values, status); } else /* read directly from disk, bypassing IO buffers */ { postemp = (fptr->Fptr)->bytepos; /* store current file position */ (fptr->Fptr)->bytepos = byteloc; /* set to the desired position */ ffgbyt(fptr, nvals * 4, values, status); (fptr->Fptr)->bytepos = postemp; /* reset to original position */ } } else /* have to read each value individually (not contiguous ) */ { ffmbyt(fptr, byteloc, REPORT_EOF, status); ffgbytoff(fptr, 4, nvals, incre - 4, values, status); } #if MACHINE == VAXVMS ii = nvals; /* call VAX macro routine to convert */ ieevur(values, values, &ii); /* from IEEE float -> F float */ #elif (MACHINE == ALPHAVMS) && (FLOATTYPE == GFLOAT) ffswap2( (short *) values, nvals * 2); /* swap pairs of bytes */ /* convert from IEEE float format to VMS GFLOAT float format */ sptr = (short *) values; for (ii = 0; ii < nvals; ii++, sptr += 2) { if (!fnan(*sptr) ) /* test for NaN or underflow */ values[ii] *= 4.0; } #elif BYTESWAPPED ffswap4((INT32BIT *)values, nvals); /* reverse order of bytes in values */ #endif return(*status); } /*--------------------------------------------------------------------------*/ int ffgr8b(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG byteloc, /* I - position within file to start reading */ long nvals, /* I - number of pixels to read */ long incre, /* I - byte increment between pixels */ double *values, /* O - returned array of values */ int *status) /* IO - error status */ /* get (read) the array of values from the FITS file, doing machine dependent format conversion (e.g. byte-swapping) if necessary. */ { LONGLONG postemp; #if MACHINE == VAXVMS long ii; #elif (MACHINE == ALPHAVMS) && (FLOATTYPE == GFLOAT) short *sptr; long ii; #endif if (incre == 8) /* read all the values at once (contiguous bytes) */ { if (nvals * 8 < MINDIRECT) /* read normally via IO buffers */ { ffmbyt(fptr, byteloc, REPORT_EOF, status); ffgbyt(fptr, nvals * 8, values, status); } else /* read directly from disk, bypassing IO buffers */ { postemp = (fptr->Fptr)->bytepos; /* store current file position */ (fptr->Fptr)->bytepos = byteloc; /* set to the desired position */ ffgbyt(fptr, nvals * 8, values, status); (fptr->Fptr)->bytepos = postemp; /* reset to original position */ } } else /* have to read each value individually (not contiguous ) */ { ffmbyt(fptr, byteloc, REPORT_EOF, status); ffgbytoff(fptr, 8, nvals, incre - 8, values, status); } #if MACHINE == VAXVMS ii = nvals; /* call VAX macro routine to convert */ ieevud(values, values, &ii); /* from IEEE float -> D float */ #elif (MACHINE == ALPHAVMS) && (FLOATTYPE == GFLOAT) ffswap2( (short *) values, nvals * 4); /* swap pairs of bytes */ /* convert from IEEE float format to VMS GFLOAT float format */ sptr = (short *) values; for (ii = 0; ii < nvals; ii++, sptr += 4) { if (!dnan(*sptr) ) /* test for NaN or underflow */ values[ii] *= 4.0; } #elif BYTESWAPPED ffswap8(values, nvals); /* reverse order of bytes in each value */ #endif return(*status); } /*--------------------------------------------------------------------------*/ int ffptbb(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG firstrow, /* I - starting row (1 = first row) */ LONGLONG firstchar, /* I - starting byte in row (1=first) */ LONGLONG nchars, /* I - number of bytes to write */ unsigned char *values, /* I - array of bytes to write */ int *status) /* IO - error status */ /* write a consecutive string of bytes to an ascii or binary table. This will span multiple rows of the table if nchars + firstchar is greater than the length of a row. */ { LONGLONG bytepos, endrow, nrows; char message[81]; if (*status > 0 || nchars <= 0) return(*status); else if (firstrow < 1) return(*status=BAD_ROW_NUM); else if (firstchar < 1) return(*status=BAD_ELEM_NUM); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart < 0) /* rescan header if data undefined */ ffrdef(fptr, status); endrow = ((firstchar + nchars - 2) / (fptr->Fptr)->rowlength) + firstrow; /* check if we are writing beyond the current end of table */ if (endrow > (fptr->Fptr)->numrows) { /* if there are more HDUs following the current one, or */ /* if there is a data heap, then we must insert space */ /* for the new rows. */ if ( !((fptr->Fptr)->lasthdu) || (fptr->Fptr)->heapsize > 0) { nrows = endrow - ((fptr->Fptr)->numrows); /* ffirow also updates the heap address and numrows */ if (ffirow(fptr, (fptr->Fptr)->numrows, nrows, status) > 0) { sprintf(message, "ffptbb failed to add space for %.0f new rows in table.", (double) nrows); ffpmsg(message); return(*status); } } else { /* manally update heap starting address */ (fptr->Fptr)->heapstart += ((LONGLONG)(endrow - (fptr->Fptr)->numrows) * (fptr->Fptr)->rowlength ); (fptr->Fptr)->numrows = endrow; /* update number of rows */ } } /* move the i/o pointer to the start of the sequence of characters */ bytepos = (fptr->Fptr)->datastart + ((fptr->Fptr)->rowlength * (firstrow - 1)) + firstchar - 1; ffmbyt(fptr, bytepos, IGNORE_EOF, status); ffpbyt(fptr, nchars, values, status); /* write the bytes */ return(*status); } /*--------------------------------------------------------------------------*/ int ffpi1b(fitsfile *fptr, /* I - FITS file pointer */ long nvals, /* I - number of pixels in the values array */ long incre, /* I - byte increment between pixels */ unsigned char *values, /* I - array of values to write */ int *status) /* IO - error status */ /* put (write) the array of values to the FITS file, doing machine dependent format conversion (e.g. byte-swapping) if necessary. */ { if (incre == 1) /* write all the values at once (contiguous bytes) */ ffpbyt(fptr, nvals, values, status); else /* have to write each value individually (not contiguous ) */ ffpbytoff(fptr, 1, nvals, incre - 1, values, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpi2b(fitsfile *fptr, /* I - FITS file pointer */ long nvals, /* I - number of pixels in the values array */ long incre, /* I - byte increment between pixels */ short *values, /* I - array of values to write */ int *status) /* IO - error status */ /* put (write) the array of values to the FITS file, doing machine dependent format conversion (e.g. byte-swapping) if necessary. */ { #if BYTESWAPPED ffswap2(values, nvals); /* reverse order of bytes in each value */ #endif if (incre == 2) /* write all the values at once (contiguous bytes) */ ffpbyt(fptr, nvals * 2, values, status); else /* have to write each value individually (not contiguous ) */ ffpbytoff(fptr, 2, nvals, incre - 2, values, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpi4b(fitsfile *fptr, /* I - FITS file pointer */ long nvals, /* I - number of pixels in the values array */ long incre, /* I - byte increment between pixels */ INT32BIT *values, /* I - array of values to write */ int *status) /* IO - error status */ /* put (write) the array of values to the FITS file, doing machine dependent format conversion (e.g. byte-swapping) if necessary. */ { #if BYTESWAPPED ffswap4(values, nvals); /* reverse order of bytes in each value */ #endif if (incre == 4) /* write all the values at once (contiguous bytes) */ ffpbyt(fptr, nvals * 4, values, status); else /* have to write each value individually (not contiguous ) */ ffpbytoff(fptr, 4, nvals, incre - 4, values, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpi8b(fitsfile *fptr, /* I - FITS file pointer */ long nvals, /* I - number of pixels in the values array */ long incre, /* I - byte increment between pixels */ long *values, /* I - array of values to write */ int *status) /* IO - error status */ /* put (write) the array of values to the FITS file, doing machine dependent format conversion (e.g. byte-swapping) if necessary. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! This routine writes 'nvals' 8-byte integers from 'values'. This works both on platforms that have sizeof(long) = 64, and 32, as long as 'values' has been allocated to large enough to hold 8 * nvals bytes of data. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ { #if BYTESWAPPED ffswap8((double *) values, nvals); /* reverse bytes in each value */ #endif if (incre == 8) /* write all the values at once (contiguous bytes) */ ffpbyt(fptr, nvals * 8, values, status); else /* have to write each value individually (not contiguous ) */ ffpbytoff(fptr, 8, nvals, incre - 8, values, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpr4b(fitsfile *fptr, /* I - FITS file pointer */ long nvals, /* I - number of pixels in the values array */ long incre, /* I - byte increment between pixels */ float *values, /* I - array of values to write */ int *status) /* IO - error status */ /* put (write) the array of values to the FITS file, doing machine dependent format conversion (e.g. byte-swapping) if necessary. */ { #if MACHINE == VAXVMS long ii; ii = nvals; /* call VAX macro routine to convert */ ieevpr(values, values, &ii); /* from F float -> IEEE float */ #elif (MACHINE == ALPHAVMS) && (FLOATTYPE == GFLOAT) long ii; /* convert from VMS FFLOAT float format to IEEE float format */ for (ii = 0; ii < nvals; ii++) values[ii] *= 0.25; ffswap2( (short *) values, nvals * 2); /* swap pairs of bytes */ #elif BYTESWAPPED ffswap4((INT32BIT *) values, nvals); /* reverse order of bytes in values */ #endif if (incre == 4) /* write all the values at once (contiguous bytes) */ ffpbyt(fptr, nvals * 4, values, status); else /* have to write each value individually (not contiguous ) */ ffpbytoff(fptr, 4, nvals, incre - 4, values, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpr8b(fitsfile *fptr, /* I - FITS file pointer */ long nvals, /* I - number of pixels in the values array */ long incre, /* I - byte increment between pixels */ double *values, /* I - array of values to write */ int *status) /* IO - error status */ /* put (write) the array of values to the FITS file, doing machine dependent format conversion (e.g. byte-swapping) if necessary. */ { #if MACHINE == VAXVMS long ii; ii = nvals; /* call VAX macro routine to convert */ ieevpd(values, values, &ii); /* from D float -> IEEE float */ #elif (MACHINE == ALPHAVMS) && (FLOATTYPE == GFLOAT) long ii; /* convert from VMS GFLOAT float format to IEEE float format */ for (ii = 0; ii < nvals; ii++) values[ii] *= 0.25; ffswap2( (short *) values, nvals * 4); /* swap pairs of bytes */ #elif BYTESWAPPED ffswap8(values, nvals); /* reverse order of bytes in each value */ #endif if (incre == 8) /* write all the values at once (contiguous bytes) */ ffpbyt(fptr, nvals * 8, values, status); else /* have to write each value individually (not contiguous ) */ ffpbytoff(fptr, 8, nvals, incre - 8, values, status); return(*status); } astropy-1.1.1/cextern/cfitsio/group.c0000644001134200020070000052437712602615517020556 0ustar embrayscience00000000000000/* This file, group.c, contains the grouping convention suport routines. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ /* */ /* The group.c module of CFITSIO was written by Donald G. Jennings of */ /* the INTEGRAL Science Data Centre (ISDC) under NASA contract task */ /* 66002J6. The above copyright laws apply. Copyright guidelines of The */ /* University of Geneva might also apply. */ /* The following routines are designed to create, read, and manipulate */ /* FITS Grouping Tables as defined in the FITS Grouping Convention paper */ /* by Jennings, Pence, Folk and Schlesinger. The development of the */ /* grouping structure was partially funded under the NASA AISRP Program. */ #include "fitsio2.h" #include "group.h" #include #include #include #if defined(WIN32) || defined(__WIN32__) #include /* defines the getcwd function on Windows PCs */ #endif #if defined(unix) || defined(__unix__) || defined(__unix) #include /* needed for getcwd prototype on unix machines */ #endif #define HEX_ESCAPE '%' /*--------------------------------------------------------------------------- Change record: D. Jennings, 18/06/98, version 1.0 of group module delivered to B. Pence for integration into CFITSIO 2.005 D. Jennings, 17/11/98, fixed bug in ffgtcpr(). Now use fits_find_nextkey() correctly and insert auxiliary keyword records directly before the TTYPE1 keyword in the copied group table. D. Jennings, 22/01/99, ffgmop() now looks for relative file paths when the MEMBER_LOCATION information is given in a grouping table. D. Jennings, 01/02/99, ffgtop() now looks for relatve file paths when the GRPLCn keyword value is supplied in the member HDU header. D. Jennings, 01/02/99, ffgtam() now trys to construct relative file paths from the member's file to the group table's file (and visa versa) when both the member's file and group table file are of access type FILE://. D. Jennings, 05/05/99, removed the ffgtcn() function; made obsolete by fits_get_url(). D. Jennings, 05/05/99, updated entire module to handle partial URLs and absolute URLs more robustly. Host dependent directory paths are now converted to true URLs before being read from/written to grouping tables. D. Jennings, 05/05/99, added the following new functions (note, none of these are directly callable by the application) int fits_path2url() int fits_url2path() int fits_get_cwd() int fits_get_url() int fits_clean_url() int fits_relurl2url() int fits_encode_url() int fits_unencode_url() int fits_is_url_absolute() -----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ int ffgtcr(fitsfile *fptr, /* FITS file pointer */ char *grpname, /* name of the grouping table */ int grouptype, /* code specifying the type of grouping table information: GT_ID_ALL_URI 0 ==> defualt (all columns) GT_ID_REF 1 ==> ID by reference GT_ID_POS 2 ==> ID by position GT_ID_ALL 3 ==> ID by ref. and position GT_ID_REF_URI 11 ==> (1) + URI info GT_ID_POS_URI 12 ==> (2) + URI info */ int *status )/* return status code */ /* create a grouping table at the end of the current FITS file. This function makes the last HDU in the file the CHDU, then calls the fits_insert_group() function to actually create the new grouping table. */ { int hdutype; int hdunum; if(*status != 0) return(*status); *status = fits_get_num_hdus(fptr,&hdunum,status); /* If hdunum is 0 then we are at the beginning of the file and we actually haven't closed the first header yet, so don't do anything more */ if (0 != hdunum) { *status = fits_movabs_hdu(fptr,hdunum,&hdutype,status); } /* Now, the whole point of the above two fits_ calls was to get to the end of file. Let's ignore errors at this point and keep going since any error is likely to mean that we are already at the EOF, or the file is fatally corrupted. If we are at the EOF then the next fits_ call will be ok. If it's corrupted then the next call will fail, but that's not big deal at this point. */ if (0 != *status ) *status = 0; *status = fits_insert_group(fptr,grpname,grouptype,status); return(*status); } /*---------------------------------------------------------------------------*/ int ffgtis(fitsfile *fptr, /* FITS file pointer */ char *grpname, /* name of the grouping table */ int grouptype, /* code specifying the type of grouping table information: GT_ID_ALL_URI 0 ==> defualt (all columns) GT_ID_REF 1 ==> ID by reference GT_ID_POS 2 ==> ID by position GT_ID_ALL 3 ==> ID by ref. and position GT_ID_REF_URI 11 ==> (1) + URI info GT_ID_POS_URI 12 ==> (2) + URI info */ int *status) /* return status code */ /* insert a grouping table just after the current HDU of the current FITS file. This is the same as fits_create_group() only it allows the user to select the place within the FITS file to add the grouping table. */ { int tfields = 0; int hdunum = 0; int hdutype = 0; int extver; int i; long pcount = 0; char *ttype[6]; char *tform[6]; char ttypeBuff[102]; char tformBuff[54]; char extname[] = "GROUPING"; char keyword[FLEN_KEYWORD]; char keyvalue[FLEN_VALUE]; char comment[FLEN_COMMENT]; do { /* set up the ttype and tform character buffers */ for(i = 0; i < 6; ++i) { ttype[i] = ttypeBuff+(i*17); tform[i] = tformBuff+(i*9); } /* define the columns required according to the grouptype parameter */ *status = ffgtdc(grouptype,0,0,0,0,0,0,ttype,tform,&tfields,status); /* create the grouping table using the columns defined above */ *status = fits_insert_btbl(fptr,0,tfields,ttype,tform,NULL, NULL,pcount,status); if(*status != 0) continue; /* retrieve the hdu position of the new grouping table for future use */ fits_get_hdu_num(fptr,&hdunum); /* add the EXTNAME and EXTVER keywords to the HDU just after the TFIELDS keyword; for now the EXTVER value is set to 0, it will be set to the correct value later on */ fits_read_keyword(fptr,"TFIELDS",keyvalue,comment,status); fits_insert_key_str(fptr,"EXTNAME",extname, "HDU contains a Grouping Table",status); fits_insert_key_lng(fptr,"EXTVER",0,"Grouping Table vers. (this file)", status); /* if the grpname parameter value was defined (Non NULL and non zero length) then add the GRPNAME keyword and value */ if(grpname != NULL && strlen(grpname) > 0) fits_insert_key_str(fptr,"GRPNAME",grpname,"Grouping Table name", status); /* add the TNULL keywords and values for each integer column defined; integer null values are zero (0) for the MEMBER_POSITION and MEMBER_VERSION columns. */ for(i = 0; i < tfields && *status == 0; ++i) { if(strcasecmp(ttype[i],"MEMBER_POSITION") == 0 || strcasecmp(ttype[i],"MEMBER_VERSION") == 0) { sprintf(keyword,"TFORM%d",i+1); *status = fits_read_key_str(fptr,keyword,keyvalue,comment, status); sprintf(keyword,"TNULL%d",i+1); *status = fits_insert_key_lng(fptr,keyword,0,"Column Null Value", status); } } /* determine the correct EXTVER value for the new grouping table by finding the highest numbered grouping table EXTVER value the currently exists */ for(extver = 1; (fits_movnam_hdu(fptr,ANY_HDU,"GROUPING",extver,status)) == 0; ++extver); if(*status == BAD_HDU_NUM) *status = 0; /* move back to the new grouping table HDU and update the EXTVER keyword value */ fits_movabs_hdu(fptr,hdunum,&hdutype,status); fits_modify_key_lng(fptr,"EXTVER",extver,"&",status); }while(0); return(*status); } /*---------------------------------------------------------------------------*/ int ffgtch(fitsfile *gfptr, /* FITS pointer to group */ int grouptype, /* code specifying the type of grouping table information: GT_ID_ALL_URI 0 ==> defualt (all columns) GT_ID_REF 1 ==> ID by reference GT_ID_POS 2 ==> ID by position GT_ID_ALL 3 ==> ID by ref. and position GT_ID_REF_URI 11 ==> (1) + URI info GT_ID_POS_URI 12 ==> (2) + URI info */ int *status) /* return status code */ /* Change the grouping table structure of the grouping table pointed to by gfptr. The grouptype code specifies the new structure of the table. This operation only adds or removes grouping table columns, it does not add or delete group members (i.e., table rows). If the grouping table already has the desired structure then no operations are performed and function simply returns with a (0) success status code. If the requested structure change creates new grouping table columns, then the column values for all existing members will be filled with the appropriate null values. */ { int xtensionCol, extnameCol, extverCol, positionCol, locationCol, uriCol; int ncols = 0; int colnum = 0; int nrows = 0; int grptype = 0; int i,j; long intNull = 0; long tfields = 0; char *tform[6]; char *ttype[6]; unsigned char charNull[1] = {'\0'}; char ttypeBuff[102]; char tformBuff[54]; char keyword[FLEN_KEYWORD]; char keyvalue[FLEN_VALUE]; char comment[FLEN_COMMENT]; if(*status != 0) return(*status); do { /* set up the ttype and tform character buffers */ for(i = 0; i < 6; ++i) { ttype[i] = ttypeBuff+(i*17); tform[i] = tformBuff+(i*9); } /* retrieve positions of all Grouping table reserved columns */ *status = ffgtgc(gfptr,&xtensionCol,&extnameCol,&extverCol,&positionCol, &locationCol,&uriCol,&grptype,status); if(*status != 0) continue; /* determine the total number of grouping table columns */ *status = fits_read_key_lng(gfptr,"TFIELDS",&tfields,comment,status); /* define grouping table columns to be added to the configuration */ *status = ffgtdc(grouptype,xtensionCol,extnameCol,extverCol,positionCol, locationCol,uriCol,ttype,tform,&ncols,status); /* delete any grouping tables columns that exist but do not belong to new desired configuration; note that we delete before creating new columns for (file size) efficiency reasons */ switch(grouptype) { case GT_ID_ALL_URI: /* no columns to be deleted in this case */ break; case GT_ID_REF: if(positionCol != 0) { *status = fits_delete_col(gfptr,positionCol,status); --tfields; if(uriCol > positionCol) --uriCol; if(locationCol > positionCol) --locationCol; } if(uriCol != 0) { *status = fits_delete_col(gfptr,uriCol,status); --tfields; if(locationCol > uriCol) --locationCol; } if(locationCol != 0) *status = fits_delete_col(gfptr,locationCol,status); break; case GT_ID_POS: if(xtensionCol != 0) { *status = fits_delete_col(gfptr,xtensionCol,status); --tfields; if(extnameCol > xtensionCol) --extnameCol; if(extverCol > xtensionCol) --extverCol; if(uriCol > xtensionCol) --uriCol; if(locationCol > xtensionCol) --locationCol; } if(extnameCol != 0) { *status = fits_delete_col(gfptr,extnameCol,status); --tfields; if(extverCol > extnameCol) --extverCol; if(uriCol > extnameCol) --uriCol; if(locationCol > extnameCol) --locationCol; } if(extverCol != 0) { *status = fits_delete_col(gfptr,extverCol,status); --tfields; if(uriCol > extverCol) --uriCol; if(locationCol > extverCol) --locationCol; } if(uriCol != 0) { *status = fits_delete_col(gfptr,uriCol,status); --tfields; if(locationCol > uriCol) --locationCol; } if(locationCol != 0) { *status = fits_delete_col(gfptr,locationCol,status); --tfields; } break; case GT_ID_ALL: if(uriCol != 0) { *status = fits_delete_col(gfptr,uriCol,status); --tfields; if(locationCol > uriCol) --locationCol; } if(locationCol != 0) { *status = fits_delete_col(gfptr,locationCol,status); --tfields; } break; case GT_ID_REF_URI: if(positionCol != 0) { *status = fits_delete_col(gfptr,positionCol,status); --tfields; } break; case GT_ID_POS_URI: if(xtensionCol != 0) { *status = fits_delete_col(gfptr,xtensionCol,status); --tfields; if(extnameCol > xtensionCol) --extnameCol; if(extverCol > xtensionCol) --extverCol; } if(extnameCol != 0) { *status = fits_delete_col(gfptr,extnameCol,status); --tfields; if(extverCol > extnameCol) --extverCol; } if(extverCol != 0) { *status = fits_delete_col(gfptr,extverCol,status); --tfields; } break; default: *status = BAD_OPTION; ffpmsg("Invalid value for grouptype parameter specified (ffgtch)"); break; } /* add all the new grouping table columns that were not there previously but are called for by the grouptype parameter */ for(i = 0; i < ncols && *status == 0; ++i) *status = fits_insert_col(gfptr,tfields+i+1,ttype[i],tform[i],status); /* add the TNULL keywords and values for each new integer column defined; integer null values are zero (0) for the MEMBER_POSITION and MEMBER_VERSION columns. Insert a null ("/0") into each new string column defined: MEMBER_XTENSION, MEMBER_NAME, MEMBER_URI_TYPE and MEMBER_LOCATION. Note that by convention a null string is the TNULL value for character fields so no TNULL is required. */ for(i = 0; i < ncols && *status == 0; ++i) { if(strcasecmp(ttype[i],"MEMBER_POSITION") == 0 || strcasecmp(ttype[i],"MEMBER_VERSION") == 0) { /* col contains int data; set TNULL and insert 0 for each col */ *status = fits_get_colnum(gfptr,CASESEN,ttype[i],&colnum, status); sprintf(keyword,"TFORM%d",colnum); *status = fits_read_key_str(gfptr,keyword,keyvalue,comment, status); sprintf(keyword,"TNULL%d",colnum); *status = fits_insert_key_lng(gfptr,keyword,0, "Column Null Value",status); for(j = 1; j <= nrows && *status == 0; ++j) *status = fits_write_col_lng(gfptr,colnum,j,1,1,&intNull, status); } else if(strcasecmp(ttype[i],"MEMBER_XTENSION") == 0 || strcasecmp(ttype[i],"MEMBER_NAME") == 0 || strcasecmp(ttype[i],"MEMBER_URI_TYPE") == 0 || strcasecmp(ttype[i],"MEMBER_LOCATION") == 0) { /* new col contains character data; insert NULLs into each col */ *status = fits_get_colnum(gfptr,CASESEN,ttype[i],&colnum, status); for(j = 1; j <= nrows && *status == 0; ++j) /* WILL THIS WORK FOR VAR LENTH CHAR COLS??????*/ *status = fits_write_col_byt(gfptr,colnum,j,1,1,charNull, status); } } }while(0); return(*status); } /*---------------------------------------------------------------------------*/ int ffgtrm(fitsfile *gfptr, /* FITS file pointer to group */ int rmopt, /* code specifying if member elements are to be deleted: OPT_RM_GPT ==> remove only group table OPT_RM_ALL ==> recursively remove members and their members (if groups) */ int *status) /* return status code */ /* remove a grouping table, and optionally all its members. Any groups containing the grouping table are updated, and all members (if not deleted) have their GRPIDn and GRPLCn keywords updated accordingly. If the (deleted) members are members of another grouping table then those tables are also updated. The CHDU of the FITS file pointed to by gfptr must be positioned to the grouping table to be deleted. */ { int hdutype; long i; long nmembers = 0; HDUtracker HDU; if(*status != 0) return(*status); /* remove the grouping table depending upon the rmopt parameter */ switch(rmopt) { case OPT_RM_GPT: /* for this option, the grouping table is deleted, but the member HDUs remain; in this case we only have to remove each member from the grouping table by calling fits_remove_member() with the OPT_RM_ENTRY option */ /* get the number of members contained by this table */ *status = fits_get_num_members(gfptr,&nmembers,status); /* loop over all grouping table members and remove them */ for(i = nmembers; i > 0 && *status == 0; --i) *status = fits_remove_member(gfptr,i,OPT_RM_ENTRY,status); break; case OPT_RM_ALL: /* for this option the entire Group is deleted -- this includes all members and their members (if grouping tables themselves). Call the recursive form of this function to perform the removal. */ /* add the current grouping table to the HDUtracker struct */ HDU.nHDU = 0; *status = fftsad(gfptr,&HDU,NULL,NULL); /* call the recursive group remove function */ *status = ffgtrmr(gfptr,&HDU,status); /* free the memory allocated to the HDUtracker struct */ for(i = 0; i < HDU.nHDU; ++i) { free(HDU.filename[i]); free(HDU.newFilename[i]); } break; default: *status = BAD_OPTION; ffpmsg("Invalid value for the rmopt parameter specified (ffgtrm)"); break; } /* if all went well then unlink and delete the grouping table HDU */ *status = ffgmul(gfptr,0,status); *status = fits_delete_hdu(gfptr,&hdutype,status); return(*status); } /*---------------------------------------------------------------------------*/ int ffgtcp(fitsfile *infptr, /* input FITS file pointer */ fitsfile *outfptr, /* output FITS file pointer */ int cpopt, /* code specifying copy options: OPT_GCP_GPT (0) ==> copy only grouping table OPT_GCP_ALL (2) ==> recusrively copy members and their members (if groups) */ int *status) /* return status code */ /* copy a grouping table, and optionally all its members, to a new FITS file. If the cpopt is set to OPT_GCP_GPT (copy grouping table only) then the existing members have their GRPIDn and GRPLCn keywords updated to reflect the existance of the new group, since they now belong to another group. If cpopt is set to OPT_GCP_ALL (copy grouping table and members recursively) then the original members are not updated; the new grouping table is modified to include only the copied member HDUs and not the original members. Note that the recursive version of this function, ffgtcpr(), is called to perform the group table copy. In the case of cpopt == OPT_GCP_GPT ffgtcpr() does not actually use recursion. */ { int i; HDUtracker HDU; if(*status != 0) return(*status); /* make sure infptr and outfptr are not the same pointer */ if(infptr == outfptr) *status = IDENTICAL_POINTERS; else { /* initialize the HDUtracker struct */ HDU.nHDU = 0; *status = fftsad(infptr,&HDU,NULL,NULL); /* call the recursive form of this function to copy the grouping table. If the cpopt is OPT_GCP_GPT then there is actually no recursion performed */ *status = ffgtcpr(infptr,outfptr,cpopt,&HDU,status); /* free memory allocated for the HDUtracker struct */ for(i = 0; i < HDU.nHDU; ++i) { free(HDU.filename[i]); free(HDU.newFilename[i]); } } return(*status); } /*---------------------------------------------------------------------------*/ int ffgtmg(fitsfile *infptr, /* FITS file ptr to source grouping table */ fitsfile *outfptr, /* FITS file ptr to target grouping table */ int mgopt, /* code specifying merge options: OPT_MRG_COPY (0) ==> copy members to target group, leaving source group in place OPT_MRG_MOV (1) ==> move members to target group, source group is deleted after merge */ int *status) /* return status code */ /* merge two grouping tables by combining their members into a single table. The source grouping table must be the CHDU of the fitsfile pointed to by infptr, and the target grouping table must be the CHDU of the fitsfile to by outfptr. All members of the source grouping table shall be copied to the target grouping table. If the mgopt parameter is OPT_MRG_COPY then the source grouping table continues to exist after the merge. If the mgopt parameter is OPT_MRG_MOV then the source grouping table is deleted after the merge, and all member HDUs are updated accordingly. */ { long i ; long nmembers = 0; fitsfile *tmpfptr = NULL; if(*status != 0) return(*status); do { *status = fits_get_num_members(infptr,&nmembers,status); for(i = 1; i <= nmembers && *status == 0; ++i) { *status = fits_open_member(infptr,i,&tmpfptr,status); *status = fits_add_group_member(outfptr,tmpfptr,0,status); if(*status == HDU_ALREADY_MEMBER) *status = 0; if(tmpfptr != NULL) { fits_close_file(tmpfptr,status); tmpfptr = NULL; } } if(*status != 0) continue; if(mgopt == OPT_MRG_MOV) *status = fits_remove_group(infptr,OPT_RM_GPT,status); }while(0); if(tmpfptr != NULL) { fits_close_file(tmpfptr,status); } return(*status); } /*---------------------------------------------------------------------------*/ int ffgtcm(fitsfile *gfptr, /* FITS file pointer to grouping table */ int cmopt, /* code specifying compact options OPT_CMT_MBR (1) ==> compact only direct members (if groups) OPT_CMT_MBR_DEL (11) ==> (1) + delete all compacted groups */ int *status) /* return status code */ /* "Compact" a group pointed to by the FITS file pointer gfptr. This is achieved by flattening the tree structure of a group and its (grouping table) members. All members HDUs of a grouping table which is itself a member of the grouping table gfptr are added to gfptr. Optionally, the grouping tables which are "compacted" are deleted. If the grouping table contains no members that are themselves grouping tables then this function performs a NOOP. */ { long i; long nmembers = 0; char keyvalue[FLEN_VALUE]; char comment[FLEN_COMMENT]; fitsfile *mfptr = NULL; if(*status != 0) return(*status); do { if(cmopt != OPT_CMT_MBR && cmopt != OPT_CMT_MBR_DEL) { *status = BAD_OPTION; ffpmsg("Invalid value for cmopt parameter specified (ffgtcm)"); continue; } /* reteive the number of grouping table members */ *status = fits_get_num_members(gfptr,&nmembers,status); /* loop over all the grouping table members; if the member is a grouping table then merge its members with the parent grouping table */ for(i = 1; i <= nmembers && *status == 0; ++i) { *status = fits_open_member(gfptr,i,&mfptr,status); if(*status != 0) continue; *status = fits_read_key_str(mfptr,"EXTNAME",keyvalue,comment,status); /* if no EXTNAME keyword then cannot be a grouping table */ if(*status == KEY_NO_EXIST) { *status = 0; continue; } prepare_keyvalue(keyvalue); if(*status != 0) continue; /* if EXTNAME == "GROUPING" then process member as grouping table */ if(strcasecmp(keyvalue,"GROUPING") == 0) { /* merge the member (grouping table) into the grouping table */ *status = fits_merge_groups(mfptr,gfptr,OPT_MRG_COPY,status); *status = fits_close_file(mfptr,status); mfptr = NULL; /* remove the member from the grouping table now that all of its members have been transferred; if cmopt is set to OPT_CMT_MBR_DEL then remove and delete the member */ if(cmopt == OPT_CMT_MBR) *status = fits_remove_member(gfptr,i,OPT_RM_ENTRY,status); else *status = fits_remove_member(gfptr,i,OPT_RM_MBR,status); } else { /* not a grouping table; just close the opened member */ *status = fits_close_file(mfptr,status); mfptr = NULL; } } }while(0); return(*status); } /*--------------------------------------------------------------------------*/ int ffgtvf(fitsfile *gfptr, /* FITS file pointer to group */ long *firstfailed, /* Member ID (if positive) of first failed member HDU verify check or GRPID index (if negitive) of first failed group link verify check. */ int *status) /* return status code */ /* check the integrity of a grouping table to make sure that all group members are accessible and all the links to other grouping tables are valid. The firstfailed parameter returns the member ID of the first member HDU to fail verification if positive or the first group link to fail if negative; otherwise firstfailed contains a return value of 0. */ { long i; long nmembers = 0; long ngroups = 0; char errstr[FLEN_VALUE]; fitsfile *fptr = NULL; if(*status != 0) return(*status); *firstfailed = 0; do { /* attempt to open all the members of the grouping table. We stop at the first member which cannot be opened (which implies that it cannot be located) */ *status = fits_get_num_members(gfptr,&nmembers,status); for(i = 1; i <= nmembers && *status == 0; ++i) { *status = fits_open_member(gfptr,i,&fptr,status); fits_close_file(fptr,status); } /* if the status is non-zero from the above loop then record the member index that caused the error */ if(*status != 0) { *firstfailed = i; sprintf(errstr,"Group table verify failed for member %ld (ffgtvf)", i); ffpmsg(errstr); continue; } /* attempt to open all the groups linked to this grouping table. We stop at the first group which cannot be opened (which implies that it cannot be located) */ *status = fits_get_num_groups(gfptr,&ngroups,status); for(i = 1; i <= ngroups && *status == 0; ++i) { *status = fits_open_group(gfptr,i,&fptr,status); fits_close_file(fptr,status); } /* if the status from the above loop is non-zero, then record the GRPIDn index of the group that caused the failure */ if(*status != 0) { *firstfailed = -1*i; sprintf(errstr, "Group table verify failed for GRPID index %ld (ffgtvf)",i); ffpmsg(errstr); continue; } }while(0); return(*status); } /*---------------------------------------------------------------------------*/ int ffgtop(fitsfile *mfptr, /* FITS file pointer to the member HDU */ int grpid, /* group ID (GRPIDn index) within member HDU */ fitsfile **gfptr, /* FITS file pointer to grouping table HDU */ int *status) /* return status code */ /* open the grouping table that contains the member HDU. The member HDU must be the CHDU of the FITS file pointed to by mfptr, and the grouping table is identified by the Nth index number of the GRPIDn keywords specified in the member HDU's header. The fitsfile gfptr pointer is positioned with the appropriate FITS file with the grouping table as the CHDU. If the group grouping table resides in a file other than the member then an attempt is first made to open the file readwrite, and failing that readonly. Note that it is possible for the GRPIDn/GRPLCn keywords in a member header to be non-continuous, e.g., GRPID1, GRPID2, GRPID5, GRPID6. In such cases, the grpid index value specified in the function call shall identify the (grpid)th GRPID value. In the above example, if grpid == 3, then the group specified by GRPID5 would be opened. */ { int i; int found; long ngroups = 0; long grpExtver = 0; char keyword[FLEN_KEYWORD]; char keyvalue[FLEN_FILENAME]; char *tkeyvalue; char location[FLEN_FILENAME]; char location1[FLEN_FILENAME]; char location2[FLEN_FILENAME]; char comment[FLEN_COMMENT]; char *url[2]; if(*status != 0) return(*status); do { /* set the grouping table pointer to NULL for error checking later */ *gfptr = NULL; /* make sure that the group ID requested is valid ==> cannot be larger than the number of GRPIDn keywords in the member HDU header */ *status = fits_get_num_groups(mfptr,&ngroups,status); if(grpid > ngroups) { *status = BAD_GROUP_ID; sprintf(comment, "GRPID index %d larger total GRPID keywords %ld (ffgtop)", grpid,ngroups); ffpmsg(comment); continue; } /* find the (grpid)th group that the member HDU belongs to and read the value of the GRPID(grpid) keyword; fits_get_num_groups() automatically re-enumerates the GRPIDn/GRPLCn keywords to fill in any gaps */ sprintf(keyword,"GRPID%d",grpid); *status = fits_read_key_lng(mfptr,keyword,&grpExtver,comment,status); if(*status != 0) continue; /* if the value of the GRPIDn keyword is positive then the member is in the same FITS file as the grouping table and we only have to reopen the current FITS file. Else the member and grouping table HDUs reside in different files and another FITS file must be opened as specified by the corresponding GRPLCn keyword The DO WHILE loop only executes once and is used to control the file opening logic. */ do { if(grpExtver > 0) { /* the member resides in the same file as the grouping table, so just reopen the grouping table file */ *status = fits_reopen_file(mfptr,gfptr,status); continue; } else if(grpExtver == 0) { /* a GRPIDn value of zero (0) is undefined */ *status = BAD_GROUP_ID; sprintf(comment,"Invalid value of %ld for GRPID%d (ffgtop)", grpExtver,grpid); ffpmsg(comment); continue; } /* The GRPLCn keyword value is negative, which implies that the grouping table must reside in another FITS file; search for the corresponding GRPLCn keyword */ /* set the grpExtver value positive */ grpExtver = -1*grpExtver; /* read the GRPLCn keyword value */ sprintf(keyword,"GRPLC%d",grpid); /* SPR 1738 */ *status = fits_read_key_longstr(mfptr,keyword,&tkeyvalue,comment, status); if (0 == *status) { strcpy(keyvalue,tkeyvalue); free(tkeyvalue); } /* if the GRPLCn keyword was not found then there is a problem */ if(*status == KEY_NO_EXIST) { *status = BAD_GROUP_ID; sprintf(comment,"Cannot find GRPLC%d keyword (ffgtop)", grpid); ffpmsg(comment); continue; } prepare_keyvalue(keyvalue); /* if the GRPLCn keyword value specifies an absolute URL then try to open the file; we cannot attempt any relative URL or host-dependent file path reconstruction */ if(fits_is_url_absolute(keyvalue)) { ffpmsg("Try to open group table file as absolute URL (ffgtop)"); *status = fits_open_file(gfptr,keyvalue,READWRITE,status); /* if the open was successful then continue */ if(*status == 0) continue; /* if READWRITE failed then try opening it READONLY */ ffpmsg("OK, try open group table file as READONLY (ffgtop)"); *status = 0; *status = fits_open_file(gfptr,keyvalue,READONLY,status); /* continue regardless of the outcome */ continue; } /* see if the URL gives a file path that is absolute on the host machine */ *status = fits_url2path(keyvalue,location1,status); *status = fits_open_file(gfptr,location1,READWRITE,status); /* if the file opened then continue */ if(*status == 0) continue; /* if READWRITE failed then try opening it READONLY */ ffpmsg("OK, try open group table file as READONLY (ffgtop)"); *status = 0; *status = fits_open_file(gfptr,location1,READONLY,status); /* if the file opened then continue */ if(*status == 0) continue; /* the grouping table location given by GRPLCn must specify a relative URL. We assume that this URL is relative to the member HDU's FITS file. Try to construct a full URL location for the grouping table's FITS file and then open it */ *status = 0; /* retrieve the URL information for the member HDU's file */ url[0] = location1; url[1] = location2; *status = fits_get_url(mfptr,url[0],url[1],NULL,NULL,NULL,status); /* It is possible that the member HDU file has an initial URL it was opened with and a real URL that the file actually exists at (e.g., an HTTP accessed file copied to a local file). For each possible URL try to construct a */ for(i = 0, found = 0, *gfptr = NULL; i < 2 && !found; ++i) { /* the url string could be empty */ if(*url[i] == 0) continue; /* create a full URL from the partial and the member HDU file URL */ *status = fits_relurl2url(url[i],keyvalue,location,status); /* if an error occured then contniue */ if(*status != 0) { *status = 0; continue; } /* if the location does not specify an access method then turn it into a host dependent path */ if(! fits_is_url_absolute(location)) { *status = fits_url2path(location,url[i],status); strcpy(location,url[i]); } /* try to open the grouping table file READWRITE */ *status = fits_open_file(gfptr,location,READWRITE,status); if(*status != 0) { /* try to open the grouping table file READONLY */ ffpmsg("opening file as READWRITE failed (ffgtop)"); ffpmsg("OK, try to open file as READONLY (ffgtop)"); *status = 0; *status = fits_open_file(gfptr,location,READONLY,status); } /* either set the found flag or reset the status flag */ if(*status == 0) found = 1; else *status = 0; } }while(0); /* end of file opening loop */ /* if an error occured with the file opening then exit */ if(*status != 0) continue; if(*gfptr == NULL) { ffpmsg("Cannot open or find grouping table FITS file (ffgtop)"); *status = GROUP_NOT_FOUND; continue; } /* search for the grouping table in its FITS file */ *status = fits_movnam_hdu(*gfptr,ANY_HDU,"GROUPING",(int)grpExtver, status); if(*status != 0) *status = GROUP_NOT_FOUND; }while(0); if(*status != 0 && *gfptr != NULL) { fits_close_file(*gfptr,status); *gfptr = NULL; } return(*status); } /*---------------------------------------------------------------------------*/ int ffgtam(fitsfile *gfptr, /* FITS file pointer to grouping table HDU */ fitsfile *mfptr, /* FITS file pointer to member HDU */ int hdupos, /* member HDU position IF in the same file as the grouping table AND mfptr == NULL */ int *status) /* return status code */ /* add a member HDU to an existing grouping table. The fitsfile pointer gfptr must be positioned with the grouping table as the CHDU. The member HDU may either be identifed with the fitsfile *mfptr (which must be positioned to the member HDU) or the hdupos parameter (the HDU number of the member HDU) if both reside in the same FITS file. The hdupos value is only used if the mfptr parameter has a value of NULL (0). The new member HDU shall have the appropriate GRPIDn and GRPLCn keywords created in its header. Note that if the member HDU to be added to the grouping table is already a member of the group then it will not be added a sceond time. */ { int xtensionCol,extnameCol,extverCol,positionCol,locationCol,uriCol; int memberPosition = 0; int grptype = 0; int hdutype = 0; int useLocation = 0; int nkeys = 6; int found; int i; int memberIOstate; int groupIOstate; int iomode; long memberExtver = 0; long groupExtver = 0; long memberID = 0; long nmembers = 0; long ngroups = 0; long grpid = 0; char memberAccess1[FLEN_VALUE]; char memberAccess2[FLEN_VALUE]; char memberFileName[FLEN_FILENAME]; char memberLocation[FLEN_FILENAME]; char grplc[FLEN_FILENAME]; char *tgrplc; char memberHDUtype[FLEN_VALUE]; char memberExtname[FLEN_VALUE]; char memberURI[] = "URL"; char groupAccess1[FLEN_VALUE]; char groupAccess2[FLEN_VALUE]; char groupFileName[FLEN_FILENAME]; char groupLocation[FLEN_FILENAME]; char tmprootname[FLEN_FILENAME], grootname[FLEN_FILENAME]; char cwd[FLEN_FILENAME]; char *keys[] = {"GRPNAME","EXTVER","EXTNAME","TFIELDS","GCOUNT","EXTEND"}; char *tmpPtr[1]; char keyword[FLEN_KEYWORD]; char card[FLEN_CARD]; unsigned char charNull[] = {'\0'}; fitsfile *tmpfptr = NULL; int parentStatus = 0; if(*status != 0) return(*status); do { /* make sure the grouping table can be modified before proceeding */ fits_file_mode(gfptr,&iomode,status); if(iomode != READWRITE) { ffpmsg("cannot modify grouping table (ffgtam)"); *status = BAD_GROUP_ATTACH; continue; } /* if the calling function supplied the HDU position of the member HDU instead of fitsfile pointer then get a fitsfile pointer */ if(mfptr == NULL) { *status = fits_reopen_file(gfptr,&tmpfptr,status); *status = fits_movabs_hdu(tmpfptr,hdupos,&hdutype,status); if(*status != 0) continue; } else tmpfptr = mfptr; /* determine all the information about the member HDU that will be needed later; note that we establish the default values for all information values that are not explicitly found */ *status = fits_read_key_str(tmpfptr,"XTENSION",memberHDUtype,card, status); if(*status == KEY_NO_EXIST) { strcpy(memberHDUtype,"PRIMARY"); *status = 0; } prepare_keyvalue(memberHDUtype); *status = fits_read_key_lng(tmpfptr,"EXTVER",&memberExtver,card,status); if(*status == KEY_NO_EXIST) { memberExtver = 1; *status = 0; } *status = fits_read_key_str(tmpfptr,"EXTNAME",memberExtname,card, status); if(*status == KEY_NO_EXIST) { memberExtname[0] = 0; *status = 0; } prepare_keyvalue(memberExtname); fits_get_hdu_num(tmpfptr,&memberPosition); /* Determine if the member HDU's FITS file location needs to be taken into account when building its grouping table reference If the member location needs to be used (==> grouping table and member HDU reside in different files) then create an appropriate URL for the member HDU's file and grouping table's file. Note that the logic for this is rather complicated */ /* SPR 3463, don't do this if(tmpfptr->Fptr == gfptr->Fptr) { */ /* member HDU and grouping table reside in the same file, no need to use the location information */ /* printf ("same file\n"); useLocation = 0; memberIOstate = 1; *memberFileName = 0; } else { */ /* the member HDU and grouping table FITS file location information must be used. First determine the correct driver and file name for the group table and member HDU files. If either are disk files then construct an absolute file path for them. Finally, if both are disk files construct relative file paths from the group(member) file to the member(group) file. */ /* set the USELOCATION flag to true */ useLocation = 1; /* get the location, access type and iostate (RO, RW) of the member HDU file */ *status = fits_get_url(tmpfptr,memberFileName,memberLocation, memberAccess1,memberAccess2,&memberIOstate, status); /* if the memberFileName string is empty then use the values of the memberLocation string. This corresponds to a file where the "real" file is a temporary memory file, and we must assume the the application really wants the original file to be the group member */ if(strlen(memberFileName) == 0) { strcpy(memberFileName,memberLocation); strcpy(memberAccess1,memberAccess2); } /* get the location, access type and iostate (RO, RW) of the grouping table file */ *status = fits_get_url(gfptr,groupFileName,groupLocation, groupAccess1,groupAccess2,&groupIOstate, status); if(*status != 0) continue; /* the grouping table file must be writable to continue */ if(groupIOstate == 0) { ffpmsg("cannot modify grouping table (ffgtam)"); *status = BAD_GROUP_ATTACH; continue; } /* determine how to construct the resulting URLs for the member and group files */ if(strcasecmp(groupAccess1,"file://") && strcasecmp(memberAccess1,"file://")) { *cwd = 0; /* nothing to do in this case; both the member and group files must be of an access type that already gives valid URLs; i.e., URLs that we can pass directly to the file drivers */ } else { /* retrieve the Current Working Directory as a Unix-like URL standard string */ *status = fits_get_cwd(cwd,status); /* create full file path for the member HDU FITS file URL if it is of access type file:// */ if(strcasecmp(memberAccess1,"file://") == 0) { if(*memberFileName == '/') { strcpy(memberLocation,memberFileName); } else { strcpy(memberLocation,cwd); strcat(memberLocation,"/"); strcat(memberLocation,memberFileName); } *status = fits_clean_url(memberLocation,memberFileName, status); } /* create full file path for the grouping table HDU FITS file URL if it is of access type file:// */ if(strcasecmp(groupAccess1,"file://") == 0) { if(*groupFileName == '/') { strcpy(groupLocation,groupFileName); } else { strcpy(groupLocation,cwd); strcat(groupLocation,"/"); strcat(groupLocation,groupFileName); } *status = fits_clean_url(groupLocation,groupFileName,status); } /* if both the member and group files are disk files then create a relative path (relative URL) strings with respect to the grouping table's file and the grouping table's file with respect to the member HDU's file */ if(strcasecmp(groupAccess1,"file://") == 0 && strcasecmp(memberAccess1,"file://") == 0) { fits_url2relurl(memberFileName,groupFileName, groupLocation,status); fits_url2relurl(groupFileName,memberFileName, memberLocation,status); /* copy the resulting partial URL strings to the memberFileName and groupFileName variables for latter use in the function */ strcpy(memberFileName,memberLocation); strcpy(groupFileName,groupLocation); } } /* beo done */ /* } */ /* retrieve the grouping table's EXTVER value */ *status = fits_read_key_lng(gfptr,"EXTVER",&groupExtver,card,status); /* if useLocation is true then make the group EXTVER value negative for the subsequent GRPIDn/GRPLCn matching */ /* SPR 3463 change test; WDP added test for same filename */ /* Now, if either the Fptr values are the same, or the root filenames are the same, then assume these refer to the same file. */ fits_parse_rootname(tmpfptr->Fptr->filename, tmprootname, status); fits_parse_rootname(gfptr->Fptr->filename, grootname, status); if((tmpfptr->Fptr != gfptr->Fptr) && strncmp(tmprootname, grootname, FLEN_FILENAME)) groupExtver = -1*groupExtver; /* retrieve the number of group members */ *status = fits_get_num_members(gfptr,&nmembers,status); do { /* make sure the member HDU is not already an entry in the grouping table before adding it */ *status = ffgmf(gfptr,memberHDUtype,memberExtname,memberExtver, memberPosition,memberFileName,&memberID,status); if(*status == MEMBER_NOT_FOUND) *status = 0; else if(*status == 0) { parentStatus = HDU_ALREADY_MEMBER; ffpmsg("Specified HDU is already a member of the Grouping table (ffgtam)"); continue; } else continue; /* if the member HDU is not already recorded in the grouping table then add it */ /* add a new row to the grouping table */ *status = fits_insert_rows(gfptr,nmembers,1,status); ++nmembers; /* retrieve the grouping table column IDs and structure type */ *status = ffgtgc(gfptr,&xtensionCol,&extnameCol,&extverCol,&positionCol, &locationCol,&uriCol,&grptype,status); /* fill in the member HDU data in the new grouping table row */ *tmpPtr = memberHDUtype; if(xtensionCol != 0) fits_write_col_str(gfptr,xtensionCol,nmembers,1,1,tmpPtr,status); *tmpPtr = memberExtname; if(extnameCol != 0) { if(strlen(memberExtname) != 0) fits_write_col_str(gfptr,extnameCol,nmembers,1,1,tmpPtr,status); else /* WILL THIS WORK FOR VAR LENTH CHAR COLS??????*/ fits_write_col_byt(gfptr,extnameCol,nmembers,1,1,charNull,status); } if(extverCol != 0) fits_write_col_lng(gfptr,extverCol,nmembers,1,1,&memberExtver, status); if(positionCol != 0) fits_write_col_int(gfptr,positionCol,nmembers,1,1, &memberPosition,status); *tmpPtr = memberFileName; if(locationCol != 0) { /* Change the test for SPR 3463 */ /* Now, if either the Fptr values are the same, or the root filenames are the same, then assume these refer to the same file. */ fits_parse_rootname(tmpfptr->Fptr->filename, tmprootname, status); fits_parse_rootname(gfptr->Fptr->filename, grootname, status); if((tmpfptr->Fptr != gfptr->Fptr) && strncmp(tmprootname, grootname, FLEN_FILENAME)) fits_write_col_str(gfptr,locationCol,nmembers,1,1,tmpPtr,status); else /* WILL THIS WORK FOR VAR LENTH CHAR COLS??????*/ fits_write_col_byt(gfptr,locationCol,nmembers,1,1,charNull,status); } *tmpPtr = memberURI; if(uriCol != 0) { /* Change the test for SPR 3463 */ /* Now, if either the Fptr values are the same, or the root filenames are the same, then assume these refer to the same file. */ fits_parse_rootname(tmpfptr->Fptr->filename, tmprootname, status); fits_parse_rootname(gfptr->Fptr->filename, grootname, status); if((tmpfptr->Fptr != gfptr->Fptr) && strncmp(tmprootname, grootname, FLEN_FILENAME)) fits_write_col_str(gfptr,uriCol,nmembers,1,1,tmpPtr,status); else /* WILL THIS WORK FOR VAR LENTH CHAR COLS??????*/ fits_write_col_byt(gfptr,uriCol,nmembers,1,1,charNull,status); } } while(0); if(0 != *status) continue; /* add GRPIDn/GRPLCn keywords to the member HDU header to link it to the grouing table if the they do not already exist and the member file is RW */ fits_file_mode(tmpfptr,&iomode,status); if(memberIOstate == 0 || iomode != READWRITE) { ffpmsg("cannot add GRPID/LC keywords to member HDU: (ffgtam)"); ffpmsg(memberFileName); continue; } *status = fits_get_num_groups(tmpfptr,&ngroups,status); /* look for the GRPID/LC keywords in the member HDU; if the keywords for the back-link to the grouping table already exist then no need to add them again */ for(i = 1, found = 0; i <= ngroups && !found && *status == 0; ++i) { sprintf(keyword,"GRPID%d",(int)ngroups); *status = fits_read_key_lng(tmpfptr,keyword,&grpid,card,status); if(grpid == groupExtver) { if(grpid < 0) { /* have to make sure the GRPLCn keyword matches too */ sprintf(keyword,"GRPLC%d",(int)ngroups); /* SPR 1738 */ *status = fits_read_key_longstr(mfptr,keyword,&tgrplc,card, status); if (0 == *status) { strcpy(grplc,tgrplc); free(tgrplc); } /* always compare files using absolute paths the presence of a non-empty cwd indicates that the file names may require conversion to absolute paths */ if(0 < strlen(cwd)) { /* temp buffer for use in assembling abs. path(s) */ char tmp[FLEN_FILENAME]; /* make grplc absolute if necessary */ if(!fits_is_url_absolute(grplc)) { fits_path2url(grplc,groupLocation,status); if(groupLocation[0] != '/') { strcpy(tmp, cwd); strcat(tmp,"/"); strcat(tmp,groupLocation); fits_clean_url(tmp,grplc,status); } } /* make groupFileName absolute if necessary */ if(!fits_is_url_absolute(groupFileName)) { fits_path2url(groupFileName,groupLocation,status); if(groupLocation[0] != '/') { strcpy(tmp, cwd); strcat(tmp,"/"); strcat(tmp,groupLocation); /* note: use groupLocation (which is not used below this block), to store the absolute file name instead of using groupFileName. The latter may be needed unaltered if the GRPLC is written below */ fits_clean_url(tmp,groupLocation,status); } } } /* see if the grplc value and the group file name match */ if(strcmp(grplc,groupLocation) == 0) found = 1; } else { /* the match is found with GRPIDn alone */ found = 1; } } } /* if FOUND is true then no need to continue */ if(found) { ffpmsg("HDU already has GRPID/LC keywords for group table (ffgtam)"); continue; } /* add the GRPID/LC keywords to the member header for this grouping table If NGROUPS == 0 then we must position the header pointer to the record where we want to insert the GRPID/LC keywords (the pointer is already correctly positioned if the above search loop activiated) */ if(ngroups == 0) { /* no GRPIDn/GRPLCn keywords currently exist in header so try to position the header pointer to a desirable position */ for(i = 0, *status = KEY_NO_EXIST; i < nkeys && *status == KEY_NO_EXIST; ++i) { *status = 0; *status = fits_read_card(tmpfptr,keys[i],card,status); } /* all else fails: move write pointer to end of header */ if(*status == KEY_NO_EXIST) { *status = 0; fits_get_hdrspace(tmpfptr,&nkeys,&i,status); ffgrec(tmpfptr,nkeys,card,status); } /* any other error status then abort */ if(*status != 0) continue; } /* now that the header pointer is positioned for the GRPID/LC keyword insertion increment the number of group links counter for the member HDU */ ++ngroups; /* if the member HDU and grouping table reside in the same FITS file then there is no need to add a GRPLCn keyword */ /* SPR 3463 change test */ /* Now, if either the Fptr values are the same, or the root filenames are the same, then assume these refer to the same file. */ fits_parse_rootname(tmpfptr->Fptr->filename, tmprootname, status); fits_parse_rootname(gfptr->Fptr->filename, grootname, status); if((tmpfptr->Fptr == gfptr->Fptr) || strncmp(tmprootname, grootname, FLEN_FILENAME) == 0) { /* add the GRPIDn keyword only */ sprintf(keyword,"GRPID%d",(int)ngroups); fits_insert_key_lng(tmpfptr,keyword,groupExtver, "EXTVER of Group containing this HDU",status); } else { /* add the GRPIDn and GRPLCn keywords */ sprintf(keyword,"GRPID%d",(int)ngroups); fits_insert_key_lng(tmpfptr,keyword,groupExtver, "EXTVER of Group containing this HDU",status); sprintf(keyword,"GRPLC%d",(int)ngroups); /* SPR 1738 */ fits_insert_key_longstr(tmpfptr,keyword,groupFileName, "URL of file containing Group",status); fits_write_key_longwarn(tmpfptr,status); } }while(0); /* close the tmpfptr pointer if it was opened in this function */ if(mfptr == NULL) { *status = fits_close_file(tmpfptr,status); } *status = 0 == *status ? parentStatus : *status; return(*status); } /*---------------------------------------------------------------------------*/ int ffgtnm(fitsfile *gfptr, /* FITS file pointer to grouping table */ long *nmembers, /* member count of the groping table */ int *status) /* return status code */ /* return the number of member HDUs in a grouping table. The fitsfile pointer gfptr must be positioned with the grouping table as the CHDU. The number of grouping table member HDUs is just the NAXIS2 value of the grouping table. */ { char keyvalue[FLEN_VALUE]; char comment[FLEN_COMMENT]; if(*status != 0) return(*status); *status = fits_read_keyword(gfptr,"EXTNAME",keyvalue,comment,status); if(*status == KEY_NO_EXIST) *status = NOT_GROUP_TABLE; else { prepare_keyvalue(keyvalue); if(strcasecmp(keyvalue,"GROUPING") != 0) { *status = NOT_GROUP_TABLE; ffpmsg("Specified HDU is not a Grouping table (ffgtnm)"); } *status = fits_read_key_lng(gfptr,"NAXIS2",nmembers,comment,status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffgmng(fitsfile *mfptr, /* FITS file pointer to member HDU */ long *ngroups, /* total number of groups linked to HDU */ int *status) /* return status code */ /* return the number of groups to which a HDU belongs, as defined by the number of GRPIDn/GRPLCn keyword records that appear in the HDU header. The fitsfile pointer mfptr must be positioned with the member HDU as the CHDU. Each time this function is called, the indicies of the GRPIDn/GRPLCn keywords are checked to make sure they are continuous (ie no gaps) and are re-enumerated to eliminate gaps if gaps are found to be present. */ { int offset; int index; int newIndex; int i; long grpid; char *inclist[] = {"GRPID#"}; char keyword[FLEN_KEYWORD]; char newKeyword[FLEN_KEYWORD]; char card[FLEN_CARD]; char comment[FLEN_COMMENT]; char *tkeyvalue; if(*status != 0) return(*status); *ngroups = 0; /* reset the member HDU keyword counter to the beginning */ *status = ffgrec(mfptr,0,card,status); /* search for the number of GRPIDn keywords in the member HDU header and count them with the ngroups variable */ while(*status == 0) { /* read the next GRPIDn keyword in the series */ *status = fits_find_nextkey(mfptr,inclist,1,NULL,0,card,status); if(*status != 0) continue; ++(*ngroups); } if(*status == KEY_NO_EXIST) *status = 0; /* read each GRPIDn/GRPLCn keyword and adjust their index values so that there are no gaps in the index count */ for(index = 1, offset = 0, i = 1; i <= *ngroups && *status == 0; ++index) { sprintf(keyword,"GRPID%d",index); /* try to read the next GRPIDn keyword in the series */ *status = fits_read_key_lng(mfptr,keyword,&grpid,card,status); /* if not found then increment the offset counter and continue */ if(*status == KEY_NO_EXIST) { *status = 0; ++offset; } else { /* increment the number_keys_found counter and see if the index of the keyword needs to be updated */ ++i; if(offset > 0) { /* compute the new index for the GRPIDn/GRPLCn keywords */ newIndex = index - offset; /* update the GRPIDn keyword index */ sprintf(newKeyword,"GRPID%d",newIndex); fits_modify_name(mfptr,keyword,newKeyword,status); /* If present, update the GRPLCn keyword index */ sprintf(keyword,"GRPLC%d",index); sprintf(newKeyword,"GRPLC%d",newIndex); /* SPR 1738 */ *status = fits_read_key_longstr(mfptr,keyword,&tkeyvalue,comment, status); if (0 == *status) { fits_delete_key(mfptr,keyword,status); fits_insert_key_longstr(mfptr,newKeyword,tkeyvalue,comment,status); fits_write_key_longwarn(mfptr,status); free(tkeyvalue); } if(*status == KEY_NO_EXIST) *status = 0; } } } return(*status); } /*---------------------------------------------------------------------------*/ int ffgmop(fitsfile *gfptr, /* FITS file pointer to grouping table */ long member, /* member ID (row num) within grouping table */ fitsfile **mfptr, /* FITS file pointer to member HDU */ int *status) /* return status code */ /* open a grouping table member, returning a pointer to the member's FITS file with the CHDU set to the member HDU. The grouping table must be the CHDU of the FITS file pointed to by gfptr. The member to open is identified by its row number within the grouping table (first row/member == 1). If the member resides in a FITS file different from the grouping table the member file is first opened readwrite and if this fails then it is opened readonly. For access type of FILE:// the member file is searched for assuming (1) an absolute path is given, (2) a path relative to the CWD is given, and (3) a path relative to the grouping table file but not relative to the CWD is given. If all of these fail then the error FILE_NOT_FOUND is returned. */ { int xtensionCol,extnameCol,extverCol,positionCol,locationCol,uriCol; int grptype,hdutype; int dummy; long hdupos = 0; long extver = 0; char xtension[FLEN_VALUE]; char extname[FLEN_VALUE]; char uri[FLEN_VALUE]; char grpLocation1[FLEN_FILENAME]; char grpLocation2[FLEN_FILENAME]; char mbrLocation1[FLEN_FILENAME]; char mbrLocation2[FLEN_FILENAME]; char mbrLocation3[FLEN_FILENAME]; char cwd[FLEN_FILENAME]; char card[FLEN_CARD]; char nstr[] = {'\0'}; char *tmpPtr[1]; if(*status != 0) return(*status); do { /* retrieve the Grouping Convention reserved column positions within the grouping table */ *status = ffgtgc(gfptr,&xtensionCol,&extnameCol,&extverCol,&positionCol, &locationCol,&uriCol,&grptype,status); if(*status != 0) continue; /* extract the member information from grouping table */ tmpPtr[0] = xtension; if(xtensionCol != 0) { *status = fits_read_col_str(gfptr,xtensionCol,member,1,1,nstr, tmpPtr,&dummy,status); /* convert the xtension string to a hdutype code */ if(strcasecmp(xtension,"PRIMARY") == 0) hdutype = IMAGE_HDU; else if(strcasecmp(xtension,"IMAGE") == 0) hdutype = IMAGE_HDU; else if(strcasecmp(xtension,"TABLE") == 0) hdutype = ASCII_TBL; else if(strcasecmp(xtension,"BINTABLE") == 0) hdutype = BINARY_TBL; else hdutype = ANY_HDU; } tmpPtr[0] = extname; if(extnameCol != 0) *status = fits_read_col_str(gfptr,extnameCol,member,1,1,nstr, tmpPtr,&dummy,status); if(extverCol != 0) *status = fits_read_col_lng(gfptr,extverCol,member,1,1,0, (long*)&extver,&dummy,status); if(positionCol != 0) *status = fits_read_col_lng(gfptr,positionCol,member,1,1,0, (long*)&hdupos,&dummy,status); tmpPtr[0] = mbrLocation1; if(locationCol != 0) *status = fits_read_col_str(gfptr,locationCol,member,1,1,nstr, tmpPtr,&dummy,status); tmpPtr[0] = uri; if(uriCol != 0) *status = fits_read_col_str(gfptr,uriCol,member,1,1,nstr, tmpPtr,&dummy,status); if(*status != 0) continue; /* decide what FITS file the member HDU resides in and open the file using the fitsfile* pointer mfptr; note that this logic is rather complicated and is based primiarly upon if a URL specifier is given for the member file in the grouping table */ switch(grptype) { case GT_ID_POS: case GT_ID_REF: case GT_ID_ALL: /* no location information is given so we must assume that the member HDU resides in the same FITS file as the grouping table; if the grouping table was incorrectly constructed then this assumption will be false, but there is nothing to be done about it at this point */ *status = fits_reopen_file(gfptr,mfptr,status); break; case GT_ID_REF_URI: case GT_ID_POS_URI: case GT_ID_ALL_URI: /* The member location column exists. Determine if the member resides in the same file as the grouping table or in a separate file; open the member file in either case */ if(strlen(mbrLocation1) == 0) { /* since no location information was given we must assume that the member is in the same FITS file as the grouping table */ *status = fits_reopen_file(gfptr,mfptr,status); } else { /* make sure the location specifiation is "URL"; we cannot decode any other URI types at this time */ if(strcasecmp(uri,"URL") != 0) { *status = FILE_NOT_OPENED; sprintf(card, "Cannot open member HDU file with URI type %s (ffgmop)", uri); ffpmsg(card); continue; } /* The location string for the member is not NULL, so it does not necessially reside in the same FITS file as the grouping table. Three cases are attempted for opening the member's file in the following order: 1. The URL given for the member's file is absolute (i.e., access method supplied); try to open the member 2. The URL given for the member's file is not absolute but is an absolute file path; try to open the member as a file after the file path is converted to a host-dependent form 3. The URL given for the member's file is not absolute and is given as a relative path to the location of the grouping table's file. Create an absolute URL using the grouping table's file URL and try to open the member. If all three cases fail then an error is returned. In each case the file is first opened in read/write mode and failing that readonly mode. The following DO loop is only used as a mechanism to break (continue) when the proper file opening method is found */ do { /* CASE 1: See if the member URL is absolute (i.e., includes a access directive) and if so open the file */ if(fits_is_url_absolute(mbrLocation1)) { /* the URL must specify an access method, which implies that its an absolute reference regardless of the access method, pass the whole URL to the open function for processing */ ffpmsg("member URL is absolute, try open R/W (ffgmop)"); *status = fits_open_file(mfptr,mbrLocation1,READWRITE, status); if(*status == 0) continue; *status = 0; /* now try to open file using full URL specs in readonly mode */ ffpmsg("OK, now try to open read-only (ffgmop)"); *status = fits_open_file(mfptr,mbrLocation1,READONLY, status); /* break from DO loop regardless of status */ continue; } /* CASE 2: If we got this far then the member URL location has no access type ==> FILE:// Try to open the member file using the URL as is, i.e., assume that it is given as absolute, if it starts with a '/' character */ ffpmsg("Member URL is of type FILE (ffgmop)"); if(*mbrLocation1 == '/') { ffpmsg("Member URL specifies abs file path (ffgmop)"); /* convert the URL path to a host dependent path */ *status = fits_url2path(mbrLocation1,mbrLocation2, status); ffpmsg("Try to open member URL in R/W mode (ffgmop)"); *status = fits_open_file(mfptr,mbrLocation2,READWRITE, status); if(*status == 0) continue; *status = 0; /* now try to open file using the URL as an absolute path in readonly mode */ ffpmsg("OK, now try to open read-only (ffgmop)"); *status = fits_open_file(mfptr,mbrLocation2,READONLY, status); /* break from the Do loop regardless of the status */ continue; } /* CASE 3: If we got this far then the URL does not specify an absoulte file path or URL with access method. Since the path to the group table's file is (obviously) valid for the CWD, create a full location string for the member HDU using the grouping table URL as a basis The only problem is that the grouping table file might have two URLs, the original one used to open it and the one that points to the real file being accessed (i.e., a file accessed via HTTP but transferred to a local disk file). Have to attempt to build a URL to the member HDU file using both of these URLs if defined. */ ffpmsg("Try to open member file as relative URL (ffgmop)"); /* get the URL information for the grouping table file */ *status = fits_get_url(gfptr,grpLocation1,grpLocation2, NULL,NULL,NULL,status); /* if the "real" grouping table file URL is defined then build a full url for the member HDU file using it and try to open the member HDU file */ if(*grpLocation1) { /* make sure the group location is absolute */ if(! fits_is_url_absolute(grpLocation1) && *grpLocation1 != '/') { fits_get_cwd(cwd,status); strcat(cwd,"/"); strcat(cwd,grpLocation1); strcpy(grpLocation1,cwd); } /* create a full URL for the member HDU file */ *status = fits_relurl2url(grpLocation1,mbrLocation1, mbrLocation2,status); if(*status != 0) continue; /* if the URL does not have an access method given then translate it into a host dependent file path */ if(! fits_is_url_absolute(mbrLocation2)) { *status = fits_url2path(mbrLocation2,mbrLocation3, status); strcpy(mbrLocation2,mbrLocation3); } /* try to open the member file READWRITE */ *status = fits_open_file(mfptr,mbrLocation2,READWRITE, status); if(*status == 0) continue; *status = 0; /* now try to open in readonly mode */ ffpmsg("now try to open file as READONLY (ffgmop)"); *status = fits_open_file(mfptr,mbrLocation2,READONLY, status); if(*status == 0) continue; *status = 0; } /* if we got this far then either the "real" grouping table file URL was not defined or all attempts to open the resulting member HDU file URL failed. if the "original" grouping table file URL is defined then build a full url for the member HDU file using it and try to open the member HDU file */ if(*grpLocation2) { /* make sure the group location is absolute */ if(! fits_is_url_absolute(grpLocation2) && *grpLocation2 != '/') { fits_get_cwd(cwd,status); strcat(cwd,"/"); strcat(cwd,grpLocation2); strcpy(grpLocation2,cwd); } /* create an absolute URL for the member HDU file */ *status = fits_relurl2url(grpLocation2,mbrLocation1, mbrLocation2,status); if(*status != 0) continue; /* if the URL does not have an access method given then translate it into a host dependent file path */ if(! fits_is_url_absolute(mbrLocation2)) { *status = fits_url2path(mbrLocation2,mbrLocation3, status); strcpy(mbrLocation2,mbrLocation3); } /* try to open the member file READWRITE */ *status = fits_open_file(mfptr,mbrLocation2,READWRITE, status); if(*status == 0) continue; *status = 0; /* now try to open in readonly mode */ ffpmsg("now try to open file as READONLY (ffgmop)"); *status = fits_open_file(mfptr,mbrLocation2,READONLY, status); if(*status == 0) continue; *status = 0; } /* if we got this far then the member HDU file could not be opened using any method. Log the error. */ ffpmsg("Cannot open member HDU FITS file (ffgmop)"); *status = MEMBER_NOT_FOUND; }while(0); } break; default: /* no default action */ break; } if(*status != 0) continue; /* attempt to locate the member HDU within its FITS file as determined and opened above */ switch(grptype) { case GT_ID_POS: case GT_ID_POS_URI: /* try to find the member hdu in the the FITS file pointed to by mfptr based upon its HDU posistion value. Note that is impossible to verify if the HDU is actually the correct HDU due to a lack of information. */ *status = fits_movabs_hdu(*mfptr,(int)hdupos,&hdutype,status); break; case GT_ID_REF: case GT_ID_REF_URI: /* try to find the member hdu in the FITS file pointed to by mfptr based upon its XTENSION, EXTNAME and EXTVER keyword values */ *status = fits_movnam_hdu(*mfptr,hdutype,extname,extver,status); if(*status == BAD_HDU_NUM) { *status = MEMBER_NOT_FOUND; ffpmsg("Cannot find specified member HDU (ffgmop)"); } /* if the above function returned without error then the mfptr is pointed to the member HDU */ break; case GT_ID_ALL: case GT_ID_ALL_URI: /* if the member entry has reference information then use it (ID by reference is safer than ID by position) else use the position information */ if(strlen(xtension) > 0 && strlen(extname) > 0 && extver > 0) { /* valid reference info exists so use it */ /* try to find the member hdu in the grouping table's file */ *status = fits_movnam_hdu(*mfptr,hdutype,extname,extver,status); if(*status == BAD_HDU_NUM) { *status = MEMBER_NOT_FOUND; ffpmsg("Cannot find specified member HDU (ffgmop)"); } } else { *status = fits_movabs_hdu(*mfptr,(int)hdupos,&hdutype, status); if(*status == END_OF_FILE) *status = MEMBER_NOT_FOUND; } /* if the above function returned without error then the mfptr is pointed to the member HDU */ break; default: /* no default action */ break; } }while(0); if(*status != 0 && *mfptr != NULL) { fits_close_file(*mfptr,status); } return(*status); } /*---------------------------------------------------------------------------*/ int ffgmcp(fitsfile *gfptr, /* FITS file pointer to group */ fitsfile *mfptr, /* FITS file pointer to new member FITS file */ long member, /* member ID (row num) within grouping table */ int cpopt, /* code specifying copy options: OPT_MCP_ADD (0) ==> add copied member to the grouping table OPT_MCP_NADD (1) ==> do not add member copy to the grouping table OPT_MCP_REPL (2) ==> replace current member entry with member copy */ int *status) /* return status code */ /* copy a member HDU of a grouping table to a new FITS file. The grouping table must be the CHDU of the FITS file pointed to by gfptr. The copy of the group member shall be appended to the end of the FITS file pointed to by mfptr. If the cpopt parameter is set to OPT_MCP_ADD then the copy of the member is added to the grouping table as a new member, if OPT_MCP_NADD then the copied member is not added to the grouping table, and if OPT_MCP_REPL then the copied member is used to replace the original member. The copied member HDU also has its EXTVER value updated so that its combination of XTENSION, EXTNAME and EXVTER is unique within its new FITS file. */ { int numkeys = 0; int keypos = 0; int hdunum = 0; int hdutype = 0; int i; char *incList[] = {"GRPID#","GRPLC#"}; char extname[FLEN_VALUE]; char card[FLEN_CARD]; char comment[FLEN_COMMENT]; char keyname[FLEN_CARD]; char value[FLEN_CARD]; fitsfile *tmpfptr = NULL; if(*status != 0) return(*status); do { /* open the member HDU to be copied */ *status = fits_open_member(gfptr,member,&tmpfptr,status); if(*status != 0) continue; /* if the member is a grouping table then copy it with a call to fits_copy_group() using the "copy only the grouping table" option if it is not a grouping table then copy the hdu with fits_copy_hdu() remove all GRPIDn and GRPLCn keywords, and update the EXTVER keyword value */ /* get the member HDU's EXTNAME value */ *status = fits_read_key_str(tmpfptr,"EXTNAME",extname,comment,status); /* if no EXTNAME value was found then set the extname to a null string */ if(*status == KEY_NO_EXIST) { extname[0] = 0; *status = 0; } else if(*status != 0) continue; prepare_keyvalue(extname); /* if a grouping table then copy with fits_copy_group() */ if(strcasecmp(extname,"GROUPING") == 0) *status = fits_copy_group(tmpfptr,mfptr,OPT_GCP_GPT,status); else { /* copy the non-grouping table HDU the conventional way */ *status = fits_copy_hdu(tmpfptr,mfptr,0,status); ffgrec(mfptr,0,card,status); /* delete all the GRPIDn and GRPLCn keywords in the copied HDU */ while(*status == 0) { *status = fits_find_nextkey(mfptr,incList,2,NULL,0,card,status); *status = fits_get_hdrpos(mfptr,&numkeys,&keypos,status); /* SPR 1738 */ *status = fits_read_keyn(mfptr,keypos-1,keyname,value, comment,status); *status = fits_read_record(mfptr,keypos-1,card,status); *status = fits_delete_key(mfptr,keyname,status); } if(*status == KEY_NO_EXIST) *status = 0; if(*status != 0) continue; } /* if the member HDU does not have an EXTNAME keyword then add one with a default value */ if(strlen(extname) == 0) { if(fits_get_hdu_num(tmpfptr,&hdunum) == 1) { strcpy(extname,"PRIMARY"); *status = fits_write_key_str(mfptr,"EXTNAME",extname, "HDU was Formerly a Primary Array", status); } else { strcpy(extname,"DEFAULT"); *status = fits_write_key_str(mfptr,"EXTNAME",extname, "default EXTNAME set by CFITSIO", status); } } /* update the member HDU's EXTVER value (add it if not present) */ fits_get_hdu_num(mfptr,&hdunum); fits_get_hdu_type(mfptr,&hdutype,status); /* set the EXTVER value to 0 for now */ *status = fits_modify_key_lng(mfptr,"EXTVER",0,NULL,status); /* if the EXTVER keyword was not found then add it */ if(*status == KEY_NO_EXIST) { *status = 0; *status = fits_read_key_str(mfptr,"EXTNAME",extname,comment, status); *status = fits_insert_key_lng(mfptr,"EXTVER",0, "Extension version ID",status); } if(*status != 0) continue; /* find the first available EXTVER value for the copied HDU */ for(i = 1; fits_movnam_hdu(mfptr,hdutype,extname,i,status) == 0; ++i); *status = 0; fits_movabs_hdu(mfptr,hdunum,&hdutype,status); /* reset the copied member HDUs EXTVER value */ *status = fits_modify_key_lng(mfptr,"EXTVER",(long)i,NULL,status); /* perform member copy operations that are dependent upon the cpopt parameter value */ switch(cpopt) { case OPT_MCP_ADD: /* add the copied member to the grouping table, leaving the entry for the original member in place */ *status = fits_add_group_member(gfptr,mfptr,0,status); break; case OPT_MCP_NADD: /* nothing to do for this copy option */ break; case OPT_MCP_REPL: /* remove the original member from the grouping table and add the copied member in its place */ *status = fits_remove_member(gfptr,member,OPT_RM_ENTRY,status); *status = fits_add_group_member(gfptr,mfptr,0,status); break; default: *status = BAD_OPTION; ffpmsg("Invalid value specified for the cmopt parameter (ffgmcp)"); break; } }while(0); if(tmpfptr != NULL) { fits_close_file(tmpfptr,status); } return(*status); } /*---------------------------------------------------------------------------*/ int ffgmtf(fitsfile *infptr, /* FITS file pointer to source grouping table */ fitsfile *outfptr, /* FITS file pointer to target grouping table */ long member, /* member ID within source grouping table */ int tfopt, /* code specifying transfer opts: OPT_MCP_ADD (0) ==> copy member to dest. OPT_MCP_MOV (3) ==> move member to dest. */ int *status) /* return status code */ /* transfer a group member from one grouping table to another. The source grouping table must be the CHDU of the fitsfile pointed to by infptr, and the destination grouping table must be the CHDU of the fitsfile to by outfptr. If the tfopt parameter is OPT_MCP_ADD then the member is made a member of the target group and remains a member of the source group. If the tfopt parameter is OPT_MCP_MOV then the member is deleted from the source group after the transfer to the destination group. The member to be transfered is identified by its row number within the source grouping table. */ { fitsfile *mfptr = NULL; if(*status != 0) return(*status); if(tfopt != OPT_MCP_MOV && tfopt != OPT_MCP_ADD) { *status = BAD_OPTION; ffpmsg("Invalid value specified for the tfopt parameter (ffgmtf)"); } else { /* open the member of infptr to be transfered */ *status = fits_open_member(infptr,member,&mfptr,status); /* add the member to the outfptr grouping table */ *status = fits_add_group_member(outfptr,mfptr,0,status); /* close the member HDU */ *status = fits_close_file(mfptr,status); /* if the tfopt is "move member" then remove it from the infptr grouping table */ if(tfopt == OPT_MCP_MOV) *status = fits_remove_member(infptr,member,OPT_RM_ENTRY,status); } return(*status); } /*---------------------------------------------------------------------------*/ int ffgmrm(fitsfile *gfptr, /* FITS file pointer to group table */ long member, /* member ID (row num) in the group */ int rmopt, /* code specifying the delete option: OPT_RM_ENTRY ==> delete the member entry OPT_RM_MBR ==> delete entry and member HDU */ int *status) /* return status code */ /* remove a member HDU from a grouping table. The fitsfile pointer gfptr must be positioned with the grouping table as the CHDU, and the member to delete is identified by its row number in the table (first member == 1). The rmopt parameter determines if the member entry is deleted from the grouping table (in which case GRPIDn and GRPLCn keywords in the member HDU's header shall be updated accordingly) or if the member HDU shall itself be removed from its FITS file. */ { int found; int hdutype = 0; int index; int iomode = 0; long i; long ngroups = 0; long nmembers = 0; long groupExtver = 0; long grpid = 0; char grpLocation1[FLEN_FILENAME]; char grpLocation2[FLEN_FILENAME]; char grpLocation3[FLEN_FILENAME]; char cwd[FLEN_FILENAME]; char keyword[FLEN_KEYWORD]; /* SPR 1738 This can now be longer */ char grplc[FLEN_FILENAME]; char *tgrplc; char keyvalue[FLEN_VALUE]; char card[FLEN_CARD]; char *editLocation; char mrootname[FLEN_FILENAME], grootname[FLEN_FILENAME]; fitsfile *mfptr = NULL; if(*status != 0) return(*status); do { /* make sure the grouping table can be modified before proceeding */ fits_file_mode(gfptr,&iomode,status); if(iomode != READWRITE) { ffpmsg("cannot modify grouping table (ffgtam)"); *status = BAD_GROUP_DETACH; continue; } /* open the group member to be deleted and get its IOstatus*/ *status = fits_open_member(gfptr,member,&mfptr,status); *status = fits_file_mode(mfptr,&iomode,status); /* if the member HDU is to be deleted then call fits_unlink_member() to remove it from all groups to which it belongs (including this one) and then delete it. Note that if the member is a grouping table then we have to recursively call fits_remove_member() for each member of the member before we delete the member itself. */ if(rmopt == OPT_RM_MBR) { /* cannot delete a PHDU */ if(fits_get_hdu_num(mfptr,&hdutype) == 1) { *status = BAD_HDU_NUM; continue; } /* determine if the member HDU is itself a grouping table */ *status = fits_read_key_str(mfptr,"EXTNAME",keyvalue,card,status); /* if no EXTNAME is found then the HDU cannot be a grouping table */ if(*status == KEY_NO_EXIST) { keyvalue[0] = 0; *status = 0; } prepare_keyvalue(keyvalue); /* Any other error is a reason to abort */ if(*status != 0) continue; /* if the EXTNAME == GROUPING then the member is a grouping table */ if(strcasecmp(keyvalue,"GROUPING") == 0) { /* remove each of the grouping table members */ *status = fits_get_num_members(mfptr,&nmembers,status); for(i = nmembers; i > 0 && *status == 0; --i) *status = fits_remove_member(mfptr,i,OPT_RM_ENTRY,status); if(*status != 0) continue; } /* unlink the member HDU from all groups that contain it */ *status = ffgmul(mfptr,0,status); if(*status != 0) continue; /* reset the grouping table HDU struct */ fits_set_hdustruc(gfptr,status); /* delete the member HDU */ if(iomode != READONLY) *status = fits_delete_hdu(mfptr,&hdutype,status); } else if(rmopt == OPT_RM_ENTRY) { /* The member HDU is only to be removed as an entry from this grouping table. Actions are (1) find the GRPIDn/GRPLCn keywords that link the member to the grouping table, (2) remove the GRPIDn/GRPLCn keyword from the member HDU header and (3) remove the member entry from the grouping table */ /* there is no need to seach for and remove the GRPIDn/GRPLCn keywords from the member HDU if it has not been opened in READWRITE mode */ if(iomode == READWRITE) { /* determine the group EXTVER value of the grouping table; if the member HDU and grouping table HDU do not reside in the same file then set the groupExtver value to its negative */ *status = fits_read_key_lng(gfptr,"EXTVER",&groupExtver,card, status); /* Now, if either the Fptr values are the same, or the root filenames are the same, then assume these refer to the same file. */ fits_parse_rootname(mfptr->Fptr->filename, mrootname, status); fits_parse_rootname(gfptr->Fptr->filename, grootname, status); if((mfptr->Fptr != gfptr->Fptr) && strncmp(mrootname, grootname, FLEN_FILENAME)) groupExtver = -1*groupExtver; /* retrieve the URLs for the grouping table; note that it is possible that the grouping table file has two URLs, the one used to open it and the "real" one pointing to the actual file being accessed */ *status = fits_get_url(gfptr,grpLocation1,grpLocation2,NULL, NULL,NULL,status); if(*status != 0) continue; /* if either of the group location strings specify a relative file path then convert them into absolute file paths */ *status = fits_get_cwd(cwd,status); if(*grpLocation1 != 0 && *grpLocation1 != '/' && !fits_is_url_absolute(grpLocation1)) { strcpy(grpLocation3,cwd); strcat(grpLocation3,"/"); strcat(grpLocation3,grpLocation1); fits_clean_url(grpLocation3,grpLocation1,status); } if(*grpLocation2 != 0 && *grpLocation2 != '/' && !fits_is_url_absolute(grpLocation2)) { strcpy(grpLocation3,cwd); strcat(grpLocation3,"/"); strcat(grpLocation3,grpLocation2); fits_clean_url(grpLocation3,grpLocation2,status); } /* determine the number of groups to which the member HDU belongs */ *status = fits_get_num_groups(mfptr,&ngroups,status); /* reset the HDU keyword position counter to the beginning */ *status = ffgrec(mfptr,0,card,status); /* loop over all the GRPIDn keywords in the member HDU header and find the appropriate GRPIDn and GRPLCn keywords that identify it as belonging to the group */ for(index = 1, found = 0; index <= ngroups && *status == 0 && !found; ++index) { /* read the next GRPIDn keyword in the series */ sprintf(keyword,"GRPID%d",index); *status = fits_read_key_lng(mfptr,keyword,&grpid,card, status); if(*status != 0) continue; /* grpid value == group EXTVER value then we could have a match */ if(grpid == groupExtver && grpid > 0) { /* if GRPID is positive then its a match because both the member HDU and grouping table HDU reside in the same FITS file */ found = index; } else if(grpid == groupExtver && grpid < 0) { /* have to look at the GRPLCn value to determine a match because the member HDU and grouping table HDU reside in different FITS files */ sprintf(keyword,"GRPLC%d",index); /* SPR 1738 */ *status = fits_read_key_longstr(mfptr,keyword,&tgrplc, card, status); if (0 == *status) { strcpy(grplc,tgrplc); free(tgrplc); } if(*status == KEY_NO_EXIST) { /* no GRPLCn keyword value found ==> grouping convention not followed; nothing we can do about it, so just continue */ sprintf(card,"No GRPLC%d found for GRPID%d", index,index); ffpmsg(card); *status = 0; continue; } else if (*status != 0) continue; /* construct the URL for the GRPLCn value */ prepare_keyvalue(grplc); /* if the grplc value specifies a relative path then turn it into a absolute file path for comparison purposes */ if(*grplc != 0 && !fits_is_url_absolute(grplc) && *grplc != '/') { /* No, wrong, strcpy(grpLocation3,cwd); should be */ *status = fits_file_name(mfptr,grpLocation3,status); /* Remove everything after the last / */ if (NULL != (editLocation = strrchr(grpLocation3,'/'))) { *editLocation = '\0'; } strcat(grpLocation3,"/"); strcat(grpLocation3,grplc); *status = fits_clean_url(grpLocation3,grplc, status); } /* if the absolute value of GRPIDn is equal to the EXTVER value of the grouping table and (one of the possible two) grouping table file URL matches the GRPLCn keyword value then we hava a match */ if(strcmp(grplc,grpLocation1) == 0 || strcmp(grplc,grpLocation2) == 0) found = index; } } /* if found == 0 (false) after the above search then we assume that it is due to an inpromper updating of the GRPIDn and GRPLCn keywords in the member header ==> nothing to delete in the header. Else delete the GRPLCn and GRPIDn keywords that identify the member HDU with the group HDU and re-enumerate the remaining GRPIDn and GRPLCn keywords */ if(found != 0) { sprintf(keyword,"GRPID%d",found); *status = fits_delete_key(mfptr,keyword,status); sprintf(keyword,"GRPLC%d",found); *status = fits_delete_key(mfptr,keyword,status); *status = 0; /* call fits_get_num_groups() to re-enumerate the GRPIDn */ *status = fits_get_num_groups(mfptr,&ngroups,status); } } /* finally, remove the member entry from the current grouping table pointed to by gfptr */ *status = fits_delete_rows(gfptr,member,1,status); } else { *status = BAD_OPTION; ffpmsg("Invalid value specified for the rmopt parameter (ffgmrm)"); } }while(0); if(mfptr != NULL) { fits_close_file(mfptr,status); } return(*status); } /*--------------------------------------------------------------------------- Grouping Table support functions ---------------------------------------------------------------------------*/ int ffgtgc(fitsfile *gfptr, /* pointer to the grouping table */ int *xtensionCol, /* column ID of the MEMBER_XTENSION column */ int *extnameCol, /* column ID of the MEMBER_NAME column */ int *extverCol, /* column ID of the MEMBER_VERSION column */ int *positionCol, /* column ID of the MEMBER_POSITION column */ int *locationCol, /* column ID of the MEMBER_LOCATION column */ int *uriCol, /* column ID of the MEMBER_URI_TYPE column */ int *grptype, /* group structure type code specifying the grouping table columns that are defined: GT_ID_ALL_URI (0) ==> all columns defined GT_ID_REF (1) ==> reference cols only GT_ID_POS (2) ==> position col only GT_ID_ALL (3) ==> ref & pos cols GT_ID_REF_URI (11) ==> ref & loc cols GT_ID_POS_URI (12) ==> pos & loc cols */ int *status) /* return status code */ /* examine the grouping table pointed to by gfptr and determine the column index ID of each possible grouping column. If a column is not found then an index of 0 is returned. the grptype parameter returns the structure of the grouping table ==> what columns are defined. */ { char keyvalue[FLEN_VALUE]; char comment[FLEN_COMMENT]; if(*status != 0) return(*status); do { /* if the HDU does not have an extname of "GROUPING" then it is not a grouping table */ *status = fits_read_key_str(gfptr,"EXTNAME",keyvalue,comment,status); if(*status == KEY_NO_EXIST) { *status = NOT_GROUP_TABLE; ffpmsg("Specified HDU is not a Grouping Table (ffgtgc)"); } if(*status != 0) continue; prepare_keyvalue(keyvalue); if(strcasecmp(keyvalue,"GROUPING") != 0) { *status = NOT_GROUP_TABLE; continue; } /* search for the MEMBER_XTENSION, MEMBER_NAME, MEMBER_VERSION, MEMBER_POSITION, MEMBER_LOCATION and MEMBER_URI_TYPE columns and determine their column index ID */ *status = fits_get_colnum(gfptr,CASESEN,"MEMBER_XTENSION",xtensionCol, status); if(*status == COL_NOT_FOUND) { *status = 0; *xtensionCol = 0; } if(*status != 0) continue; *status = fits_get_colnum(gfptr,CASESEN,"MEMBER_NAME",extnameCol,status); if(*status == COL_NOT_FOUND) { *status = 0; *extnameCol = 0; } if(*status != 0) continue; *status = fits_get_colnum(gfptr,CASESEN,"MEMBER_VERSION",extverCol, status); if(*status == COL_NOT_FOUND) { *status = 0; *extverCol = 0; } if(*status != 0) continue; *status = fits_get_colnum(gfptr,CASESEN,"MEMBER_POSITION",positionCol, status); if(*status == COL_NOT_FOUND) { *status = 0; *positionCol = 0; } if(*status != 0) continue; *status = fits_get_colnum(gfptr,CASESEN,"MEMBER_LOCATION",locationCol, status); if(*status == COL_NOT_FOUND) { *status = 0; *locationCol = 0; } if(*status != 0) continue; *status = fits_get_colnum(gfptr,CASESEN,"MEMBER_URI_TYPE",uriCol, status); if(*status == COL_NOT_FOUND) { *status = 0; *uriCol = 0; } if(*status != 0) continue; /* determine the type of grouping table structure used by this grouping table and record it in the grptype parameter */ if(*xtensionCol && *extnameCol && *extverCol && *positionCol && *locationCol && *uriCol) *grptype = GT_ID_ALL_URI; else if(*xtensionCol && *extnameCol && *extverCol && *locationCol && *uriCol) *grptype = GT_ID_REF_URI; else if(*xtensionCol && *extnameCol && *extverCol && *positionCol) *grptype = GT_ID_ALL; else if(*xtensionCol && *extnameCol && *extverCol) *grptype = GT_ID_REF; else if(*positionCol && *locationCol && *uriCol) *grptype = GT_ID_POS_URI; else if(*positionCol) *grptype = GT_ID_POS; else *status = NOT_GROUP_TABLE; }while(0); /* if the table contained more than one column with a reserved name then this cannot be considered a vailid grouping table */ if(*status == COL_NOT_UNIQUE) { *status = NOT_GROUP_TABLE; ffpmsg("Specified HDU has multipule Group table cols defined (ffgtgc)"); } return(*status); } /*****************************************************************************/ int ffgtdc(int grouptype, /* code specifying the type of grouping table information: GT_ID_ALL_URI 0 ==> defualt (all columns) GT_ID_REF 1 ==> ID by reference GT_ID_POS 2 ==> ID by position GT_ID_ALL 3 ==> ID by ref. and position GT_ID_REF_URI 11 ==> (1) + URI info GT_ID_POS_URI 12 ==> (2) + URI info */ int xtensioncol, /* does MEMBER_XTENSION already exist? */ int extnamecol, /* does MEMBER_NAME aleady exist? */ int extvercol, /* does MEMBER_VERSION already exist? */ int positioncol, /* does MEMBER_POSITION already exist? */ int locationcol, /* does MEMBER_LOCATION already exist? */ int uricol, /* does MEMBER_URI_TYPE aleardy exist? */ char *ttype[], /* array of grouping table column TTYPE names to define (if *col var false) */ char *tform[], /* array of grouping table column TFORM values to define (if*col variable false) */ int *ncols, /* number of TTYPE and TFORM values returned */ int *status) /* return status code */ /* create the TTYPE and TFORM values for the grouping table according to the value of the grouptype parameter and the values of the *col flags. The resulting TTYPE and TFORM are returned in ttype[] and tform[] respectively. The number of TTYPE and TFORMs returned is given by ncols. Both the TTYPE[] and TTFORM[] arrays must contain enough pre-allocated strings to hold the returned information. */ { int i = 0; char xtension[] = "MEMBER_XTENSION"; char xtenTform[] = "8A"; char name[] = "MEMBER_NAME"; char nameTform[] = "32A"; char version[] = "MEMBER_VERSION"; char verTform[] = "1J"; char position[] = "MEMBER_POSITION"; char posTform[] = "1J"; char URI[] = "MEMBER_URI_TYPE"; char URITform[] = "3A"; char location[] = "MEMBER_LOCATION"; /* SPR 01720, move from 160A to 256A */ char locTform[] = "256A"; if(*status != 0) return(*status); switch(grouptype) { case GT_ID_ALL_URI: if(xtensioncol == 0) { strcpy(ttype[i],xtension); strcpy(tform[i],xtenTform); ++i; } if(extnamecol == 0) { strcpy(ttype[i],name); strcpy(tform[i],nameTform); ++i; } if(extvercol == 0) { strcpy(ttype[i],version); strcpy(tform[i],verTform); ++i; } if(positioncol == 0) { strcpy(ttype[i],position); strcpy(tform[i],posTform); ++i; } if(locationcol == 0) { strcpy(ttype[i],location); strcpy(tform[i],locTform); ++i; } if(uricol == 0) { strcpy(ttype[i],URI); strcpy(tform[i],URITform); ++i; } break; case GT_ID_REF: if(xtensioncol == 0) { strcpy(ttype[i],xtension); strcpy(tform[i],xtenTform); ++i; } if(extnamecol == 0) { strcpy(ttype[i],name); strcpy(tform[i],nameTform); ++i; } if(extvercol == 0) { strcpy(ttype[i],version); strcpy(tform[i],verTform); ++i; } break; case GT_ID_POS: if(positioncol == 0) { strcpy(ttype[i],position); strcpy(tform[i],posTform); ++i; } break; case GT_ID_ALL: if(xtensioncol == 0) { strcpy(ttype[i],xtension); strcpy(tform[i],xtenTform); ++i; } if(extnamecol == 0) { strcpy(ttype[i],name); strcpy(tform[i],nameTform); ++i; } if(extvercol == 0) { strcpy(ttype[i],version); strcpy(tform[i],verTform); ++i; } if(positioncol == 0) { strcpy(ttype[i],position); strcpy(tform[i], posTform); ++i; } break; case GT_ID_REF_URI: if(xtensioncol == 0) { strcpy(ttype[i],xtension); strcpy(tform[i],xtenTform); ++i; } if(extnamecol == 0) { strcpy(ttype[i],name); strcpy(tform[i],nameTform); ++i; } if(extvercol == 0) { strcpy(ttype[i],version); strcpy(tform[i],verTform); ++i; } if(locationcol == 0) { strcpy(ttype[i],location); strcpy(tform[i],locTform); ++i; } if(uricol == 0) { strcpy(ttype[i],URI); strcpy(tform[i],URITform); ++i; } break; case GT_ID_POS_URI: if(positioncol == 0) { strcpy(ttype[i],position); strcpy(tform[i],posTform); ++i; } if(locationcol == 0) { strcpy(ttype[i],location); strcpy(tform[i],locTform); ++i; } if(uricol == 0) { strcpy(ttype[i],URI); strcpy(tform[i],URITform); ++i; } break; default: *status = BAD_OPTION; ffpmsg("Invalid value specified for the grouptype parameter (ffgtdc)"); break; } *ncols = i; return(*status); } /*****************************************************************************/ int ffgmul(fitsfile *mfptr, /* pointer to the grouping table member HDU */ int rmopt, /* 0 ==> leave GRPIDn/GRPLCn keywords, 1 ==> remove GRPIDn/GRPLCn keywords */ int *status) /* return status code */ /* examine all the GRPIDn and GRPLCn keywords in the member HDUs header and remove the member from the grouping tables referenced; This effectively "unlinks" the member from all of its groups. The rmopt specifies if the GRPIDn/GRPLCn keywords are to be removed from the member HDUs header after the unlinking. */ { int memberPosition = 0; int iomode; long index; long ngroups = 0; long memberExtver = 0; long memberID = 0; char mbrLocation1[FLEN_FILENAME]; char mbrLocation2[FLEN_FILENAME]; char memberHDUtype[FLEN_VALUE]; char memberExtname[FLEN_VALUE]; char keyword[FLEN_KEYWORD]; char card[FLEN_CARD]; fitsfile *gfptr = NULL; if(*status != 0) return(*status); do { /* determine location parameters of the member HDU; note that default values are supplied if the expected keywords are not found */ *status = fits_read_key_str(mfptr,"XTENSION",memberHDUtype,card,status); if(*status == KEY_NO_EXIST) { strcpy(memberHDUtype,"PRIMARY"); *status = 0; } prepare_keyvalue(memberHDUtype); *status = fits_read_key_lng(mfptr,"EXTVER",&memberExtver,card,status); if(*status == KEY_NO_EXIST) { memberExtver = 1; *status = 0; } *status = fits_read_key_str(mfptr,"EXTNAME",memberExtname,card,status); if(*status == KEY_NO_EXIST) { memberExtname[0] = 0; *status = 0; } prepare_keyvalue(memberExtname); fits_get_hdu_num(mfptr,&memberPosition); *status = fits_get_url(mfptr,mbrLocation1,mbrLocation2,NULL,NULL, NULL,status); if(*status != 0) continue; /* open each grouping table linked to this HDU and remove the member from the grouping tables */ *status = fits_get_num_groups(mfptr,&ngroups,status); /* loop over each group linked to the member HDU */ for(index = 1; index <= ngroups && *status == 0; ++index) { /* open the (index)th group linked to the member HDU */ *status = fits_open_group(mfptr,index,&gfptr,status); /* if the group could not be opened then just skip it */ if(*status != 0) { *status = 0; sprintf(card,"Cannot open the %dth group table (ffgmul)", (int)index); ffpmsg(card); continue; } /* make sure the grouping table can be modified before proceeding */ fits_file_mode(gfptr,&iomode,status); if(iomode != READWRITE) { sprintf(card,"The %dth group cannot be modified (ffgtam)", (int)index); ffpmsg(card); continue; } /* try to find the member's row within the grouping table; first try using the member HDU file's "real" URL string then try using its originally opened URL string if either string exist */ memberID = 0; if(strlen(mbrLocation1) != 0) { *status = ffgmf(gfptr,memberHDUtype,memberExtname,memberExtver, memberPosition,mbrLocation1,&memberID,status); } if(*status == MEMBER_NOT_FOUND && strlen(mbrLocation2) != 0) { *status = 0; *status = ffgmf(gfptr,memberHDUtype,memberExtname,memberExtver, memberPosition,mbrLocation2,&memberID,status); } /* if the member was found then delete it from the grouping table */ if(*status == 0) *status = fits_delete_rows(gfptr,memberID,1,status); /* continue the loop over all member groups even if an error was generated */ if(*status == MEMBER_NOT_FOUND) { ffpmsg("cannot locate member's entry in group table (ffgmul)"); } *status = 0; /* close the file pointed to by gfptr if it is non NULL to prepare for the next loop iterration */ if(gfptr != NULL) { fits_close_file(gfptr,status); gfptr = NULL; } } if(*status != 0) continue; /* if rmopt is non-zero then find and delete the GRPIDn/GRPLCn keywords from the member HDU header */ if(rmopt != 0) { fits_file_mode(mfptr,&iomode,status); if(iomode == READONLY) { ffpmsg("Cannot modify member HDU, opened READONLY (ffgmul)"); continue; } /* delete all the GRPIDn/GRPLCn keywords */ for(index = 1; index <= ngroups && *status == 0; ++index) { sprintf(keyword,"GRPID%d",(int)index); fits_delete_key(mfptr,keyword,status); sprintf(keyword,"GRPLC%d",(int)index); fits_delete_key(mfptr,keyword,status); if(*status == KEY_NO_EXIST) *status = 0; } } }while(0); /* make sure the gfptr has been closed */ if(gfptr != NULL) { fits_close_file(gfptr,status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffgmf(fitsfile *gfptr, /* pointer to grouping table HDU to search */ char *xtension, /* XTENSION value for member HDU */ char *extname, /* EXTNAME value for member HDU */ int extver, /* EXTVER value for member HDU */ int position, /* HDU position value for member HDU */ char *location, /* FITS file location value for member HDU */ long *member, /* member HDU ID within group table (if found) */ int *status) /* return status code */ /* try to find the entry for the member HDU defined by the xtension, extname, extver, position, and location parameters within the grouping table pointed to by gfptr. If the member HDU is found then its ID (row number) within the grouping table is returned in the member variable; if not found then member is returned with a value of 0 and the status return code will be set to MEMBER_NOT_FOUND. Note that the member HDU postion information is used to obtain a member match only if the grouping table type is GT_ID_POS_URI or GT_ID_POS. This is because the position information can become invalid much more easily then the reference information for a group member. */ { int xtensionCol,extnameCol,extverCol,positionCol,locationCol,uriCol; int mposition = 0; int grptype; int dummy; int i; long nmembers = 0; long mextver = 0; char charBuff1[FLEN_FILENAME]; char charBuff2[FLEN_FILENAME]; char tmpLocation[FLEN_FILENAME]; char mbrLocation1[FLEN_FILENAME]; char mbrLocation2[FLEN_FILENAME]; char mbrLocation3[FLEN_FILENAME]; char grpLocation1[FLEN_FILENAME]; char grpLocation2[FLEN_FILENAME]; char cwd[FLEN_FILENAME]; char nstr[] = {'\0'}; char *tmpPtr[2]; if(*status != 0) return(*status); *member = 0; tmpPtr[0] = charBuff1; tmpPtr[1] = charBuff2; if(*status != 0) return(*status); /* if the passed LOCATION value is not an absolute URL then turn it into an absolute path */ if(location == NULL) { *tmpLocation = 0; } else if(*location == 0) { *tmpLocation = 0; } else if(!fits_is_url_absolute(location)) { fits_path2url(location,tmpLocation,status); if(*tmpLocation != '/') { fits_get_cwd(cwd,status); strcat(cwd,"/"); strcat(cwd,tmpLocation); fits_clean_url(cwd,tmpLocation,status); } } else strcpy(tmpLocation,location); /* retrieve the Grouping Convention reserved column positions within the grouping table */ *status = ffgtgc(gfptr,&xtensionCol,&extnameCol,&extverCol,&positionCol, &locationCol,&uriCol,&grptype,status); /* retrieve the number of group members */ *status = fits_get_num_members(gfptr,&nmembers,status); /* loop over all grouping table rows until the member HDU is found */ for(i = 1; i <= nmembers && *member == 0 && *status == 0; ++i) { if(xtensionCol != 0) { fits_read_col_str(gfptr,xtensionCol,i,1,1,nstr,tmpPtr,&dummy,status); if(strcasecmp(tmpPtr[0],xtension) != 0) continue; } if(extnameCol != 0) { fits_read_col_str(gfptr,extnameCol,i,1,1,nstr,tmpPtr,&dummy,status); if(strcasecmp(tmpPtr[0],extname) != 0) continue; } if(extverCol != 0) { fits_read_col_lng(gfptr,extverCol,i,1,1,0, (long*)&mextver,&dummy,status); if(extver != mextver) continue; } /* note we only use postionCol if we have to */ if(positionCol != 0 && (grptype == GT_ID_POS || grptype == GT_ID_POS_URI)) { fits_read_col_int(gfptr,positionCol,i,1,1,0, &mposition,&dummy,status); if(position != mposition) continue; } /* if no location string was passed to the function then assume that the calling application does not wish to use it as a comparision critera ==> if we got this far then we have a match */ if(location == NULL) { ffpmsg("NULL Location string given ==> ingore location (ffgmf)"); *member = i; continue; } /* if the grouping table MEMBER_LOCATION column exists then read the location URL for the member, else set the location string to a zero-length string for subsequent comparisions */ if(locationCol != 0) { fits_read_col_str(gfptr,locationCol,i,1,1,nstr,tmpPtr,&dummy,status); strcpy(mbrLocation1,tmpPtr[0]); *mbrLocation2 = 0; } else *mbrLocation1 = 0; /* if the member location string from the grouping table is zero length (either implicitly or explicitly) then assume that the member HDU is in the same file as the grouping table HDU; retrieve the possible URL values of the grouping table HDU file */ if(*mbrLocation1 == 0) { /* retrieve the possible URLs of the grouping table file */ *status = fits_get_url(gfptr,mbrLocation1,mbrLocation2,NULL,NULL, NULL,status); /* if non-NULL, make sure the first URL is absolute or a full path */ if(*mbrLocation1 != 0 && !fits_is_url_absolute(mbrLocation1) && *mbrLocation1 != '/') { fits_get_cwd(cwd,status); strcat(cwd,"/"); strcat(cwd,mbrLocation1); fits_clean_url(cwd,mbrLocation1,status); } /* if non-NULL, make sure the first URL is absolute or a full path */ if(*mbrLocation2 != 0 && !fits_is_url_absolute(mbrLocation2) && *mbrLocation2 != '/') { fits_get_cwd(cwd,status); strcat(cwd,"/"); strcat(cwd,mbrLocation2); fits_clean_url(cwd,mbrLocation2,status); } } /* if the member location was specified, then make sure that it is either an absolute URL or specifies a full path */ else if(!fits_is_url_absolute(mbrLocation1) && *mbrLocation1 != '/') { strcpy(mbrLocation2,mbrLocation1); /* get the possible URLs for the grouping table file */ *status = fits_get_url(gfptr,grpLocation1,grpLocation2,NULL,NULL, NULL,status); if(*grpLocation1 != 0) { /* make sure the first grouping table URL is absolute */ if(!fits_is_url_absolute(grpLocation1) && *grpLocation1 != '/') { fits_get_cwd(cwd,status); strcat(cwd,"/"); strcat(cwd,grpLocation1); fits_clean_url(cwd,grpLocation1,status); } /* create an absoute URL for the member */ fits_relurl2url(grpLocation1,mbrLocation1,mbrLocation3,status); /* if URL construction succeeded then copy it to the first location string; else set the location string to empty */ if(*status == 0) { strcpy(mbrLocation1,mbrLocation3); } else if(*status == URL_PARSE_ERROR) { *status = 0; *mbrLocation1 = 0; } } else *mbrLocation1 = 0; if(*grpLocation2 != 0) { /* make sure the second grouping table URL is absolute */ if(!fits_is_url_absolute(grpLocation2) && *grpLocation2 != '/') { fits_get_cwd(cwd,status); strcat(cwd,"/"); strcat(cwd,grpLocation2); fits_clean_url(cwd,grpLocation2,status); } /* create an absolute URL for the member */ fits_relurl2url(grpLocation2,mbrLocation2,mbrLocation3,status); /* if URL construction succeeded then copy it to the second location string; else set the location string to empty */ if(*status == 0) { strcpy(mbrLocation2,mbrLocation3); } else if(*status == URL_PARSE_ERROR) { *status = 0; *mbrLocation2 = 0; } } else *mbrLocation2 = 0; } /* compare the passed member HDU file location string with the (possibly two) member location strings to see if there is a match */ if(strcmp(mbrLocation1,tmpLocation) != 0 && strcmp(mbrLocation2,tmpLocation) != 0 ) continue; /* if we made it this far then a match to the member HDU was found */ *member = i; } /* if a match was not found then set the return status code */ if(*member == 0 && *status == 0) { *status = MEMBER_NOT_FOUND; ffpmsg("Cannot find specified member HDU (ffgmf)"); } return(*status); } /*-------------------------------------------------------------------------- Recursive Group Functions --------------------------------------------------------------------------*/ int ffgtrmr(fitsfile *gfptr, /* FITS file pointer to group */ HDUtracker *HDU, /* list of processed HDUs */ int *status) /* return status code */ /* recursively remove a grouping table and all its members. Each member of the grouping table pointed to by gfptr it processed. If the member is itself a grouping table then ffgtrmr() is recursively called to process all of its members. The HDUtracker struct *HDU is used to make sure a member is not processed twice, thus avoiding an infinite loop (e.g., a grouping table contains itself as a member). */ { int i; int hdutype; long nmembers = 0; char keyvalue[FLEN_VALUE]; char comment[FLEN_COMMENT]; fitsfile *mfptr = NULL; if(*status != 0) return(*status); /* get the number of members contained by this grouping table */ *status = fits_get_num_members(gfptr,&nmembers,status); /* loop over all group members and delete them */ for(i = nmembers; i > 0 && *status == 0; --i) { /* open the member HDU */ *status = fits_open_member(gfptr,i,&mfptr,status); /* if the member cannot be opened then just skip it and continue */ if(*status == MEMBER_NOT_FOUND) { *status = 0; continue; } /* Any other error is a reason to abort */ if(*status != 0) continue; /* add the member HDU to the HDUtracker struct */ *status = fftsad(mfptr,HDU,NULL,NULL); /* status == HDU_ALREADY_TRACKED ==> HDU has already been processed */ if(*status == HDU_ALREADY_TRACKED) { *status = 0; fits_close_file(mfptr,status); continue; } else if(*status != 0) continue; /* determine if the member HDU is itself a grouping table */ *status = fits_read_key_str(mfptr,"EXTNAME",keyvalue,comment,status); /* if no EXTNAME is found then the HDU cannot be a grouping table */ if(*status == KEY_NO_EXIST) { *status = 0; keyvalue[0] = 0; } prepare_keyvalue(keyvalue); /* Any other error is a reason to abort */ if(*status != 0) continue; /* if the EXTNAME == GROUPING then the member is a grouping table and we must call ffgtrmr() to process its members */ if(strcasecmp(keyvalue,"GROUPING") == 0) *status = ffgtrmr(mfptr,HDU,status); /* unlink all the grouping tables that contain this HDU as a member and then delete the HDU (if not a PHDU) */ if(fits_get_hdu_num(mfptr,&hdutype) == 1) *status = ffgmul(mfptr,1,status); else { *status = ffgmul(mfptr,0,status); *status = fits_delete_hdu(mfptr,&hdutype,status); } /* close the fitsfile pointer */ fits_close_file(mfptr,status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffgtcpr(fitsfile *infptr, /* input FITS file pointer */ fitsfile *outfptr, /* output FITS file pointer */ int cpopt, /* code specifying copy options: OPT_GCP_GPT (0) ==> cp only grouping table OPT_GCP_ALL (2) ==> recusrively copy members and their members (if groups) */ HDUtracker *HDU, /* list of already copied HDUs */ int *status) /* return status code */ /* copy a Group to a new FITS file. If the cpopt parameter is set to OPT_GCP_GPT (copy grouping table only) then the existing members have their GRPIDn and GRPLCn keywords updated to reflect the existance of the new group, since they now belong to another group. If cpopt is set to OPT_GCP_ALL (copy grouping table and members recursively) then the original members are not updated; the new grouping table is modified to include only the copied member HDUs and not the original members. Note that this function is recursive. When copt is OPT_GCP_ALL it will call itself whenever a member HDU of the current grouping table is itself a grouping table (i.e., EXTNAME = 'GROUPING'). */ { int i; int nexclude = 8; int hdutype = 0; int groupHDUnum = 0; int numkeys = 0; int keypos = 0; int startSearch = 0; int newPosition = 0; long nmembers = 0; long tfields = 0; long newTfields = 0; char keyword[FLEN_KEYWORD]; char keyvalue[FLEN_VALUE]; char card[FLEN_CARD]; char comment[FLEN_CARD]; char *tkeyvalue; char *includeList[] = {"*"}; char *excludeList[] = {"EXTNAME","EXTVER","GRPNAME","GRPID#","GRPLC#", "THEAP","TDIM#","T????#"}; fitsfile *mfptr = NULL; if(*status != 0) return(*status); do { /* create a new grouping table in the FITS file pointed to by outptr */ *status = fits_get_num_members(infptr,&nmembers,status); *status = fits_read_key_str(infptr,"GRPNAME",keyvalue,card,status); if(*status == KEY_NO_EXIST) { keyvalue[0] = 0; *status = 0; } prepare_keyvalue(keyvalue); *status = fits_create_group(outfptr,keyvalue,GT_ID_ALL_URI,status); /* save the new grouping table's HDU position for future use */ fits_get_hdu_num(outfptr,&groupHDUnum); /* update the HDUtracker struct with the grouping table's new position */ *status = fftsud(infptr,HDU,groupHDUnum,NULL); /* Now populate the copied grouping table depending upon the copy option parameter value */ switch(cpopt) { /* for the "copy grouping table only" option we only have to add the members of the original grouping table to the new grouping table */ case OPT_GCP_GPT: for(i = 1; i <= nmembers && *status == 0; ++i) { *status = fits_open_member(infptr,i,&mfptr,status); *status = fits_add_group_member(outfptr,mfptr,0,status); fits_close_file(mfptr,status); mfptr = NULL; } break; case OPT_GCP_ALL: /* for the "copy the entire group" option */ /* loop over all the grouping table members */ for(i = 1; i <= nmembers && *status == 0; ++i) { /* open the ith member */ *status = fits_open_member(infptr,i,&mfptr,status); if(*status != 0) continue; /* add it to the HDUtracker struct */ *status = fftsad(mfptr,HDU,&newPosition,NULL); /* if already copied then just add the member to the group */ if(*status == HDU_ALREADY_TRACKED) { *status = 0; *status = fits_add_group_member(outfptr,NULL,newPosition, status); fits_close_file(mfptr,status); mfptr = NULL; continue; } else if(*status != 0) continue; /* see if the member is a grouping table */ *status = fits_read_key_str(mfptr,"EXTNAME",keyvalue,card, status); if(*status == KEY_NO_EXIST) { keyvalue[0] = 0; *status = 0; } prepare_keyvalue(keyvalue); /* if the member is a grouping table then copy it and all of its members using ffgtcpr(), else copy it using fits_copy_member(); the outptr will point to the newly copied member upon return from both functions */ if(strcasecmp(keyvalue,"GROUPING") == 0) *status = ffgtcpr(mfptr,outfptr,OPT_GCP_ALL,HDU,status); else *status = fits_copy_member(infptr,outfptr,i,OPT_MCP_NADD, status); /* retrieve the position of the newly copied member */ fits_get_hdu_num(outfptr,&newPosition); /* update the HDUtracker struct with member's new position */ if(strcasecmp(keyvalue,"GROUPING") != 0) *status = fftsud(mfptr,HDU,newPosition,NULL); /* move the outfptr back to the copied grouping table HDU */ *status = fits_movabs_hdu(outfptr,groupHDUnum,&hdutype,status); /* add the copied member HDU to the copied grouping table */ *status = fits_add_group_member(outfptr,NULL,newPosition,status); /* close the mfptr pointer */ fits_close_file(mfptr,status); mfptr = NULL; } break; default: *status = BAD_OPTION; ffpmsg("Invalid value specified for cmopt parameter (ffgtcpr)"); break; } if(*status != 0) continue; /* reposition the outfptr to the grouping table so that the grouping table is the CHDU upon return to the calling function */ fits_movabs_hdu(outfptr,groupHDUnum,&hdutype,status); /* copy all auxiliary keyword records from the original grouping table to the new grouping table; they are copied in their original order and inserted just before the TTYPE1 keyword record */ *status = fits_read_card(outfptr,"TTYPE1",card,status); *status = fits_get_hdrpos(outfptr,&numkeys,&keypos,status); --keypos; startSearch = 8; while(*status == 0) { ffgrec(infptr,startSearch,card,status); *status = fits_find_nextkey(infptr,includeList,1,excludeList, nexclude,card,status); *status = fits_get_hdrpos(infptr,&numkeys,&startSearch,status); --startSearch; /* SPR 1738 */ if (strncmp(card,"GRPLC",5)) { /* Not going to be a long string so we're ok */ *status = fits_insert_record(outfptr,keypos,card,status); } else { /* We could have a long string */ *status = fits_read_record(infptr,startSearch,card,status); card[9] = '\0'; *status = fits_read_key_longstr(infptr,card,&tkeyvalue,comment, status); if (0 == *status) { fits_insert_key_longstr(outfptr,card,tkeyvalue,comment,status); fits_write_key_longwarn(outfptr,status); free(tkeyvalue); } } ++keypos; } if(*status == KEY_NO_EXIST) *status = 0; else if(*status != 0) continue; /* search all the columns of the original grouping table and copy those to the new grouping table that were not part of the grouping convention. Note that is legal to have additional columns in a grouping table. Also note that the order of the columns may not be the same in the original and copied grouping table. */ /* retrieve the number of columns in the original and new group tables */ *status = fits_read_key_lng(infptr,"TFIELDS",&tfields,card,status); *status = fits_read_key_lng(outfptr,"TFIELDS",&newTfields,card,status); for(i = 1; i <= tfields; ++i) { sprintf(keyword,"TTYPE%d",i); *status = fits_read_key_str(infptr,keyword,keyvalue,card,status); if(*status == KEY_NO_EXIST) { *status = 0; keyvalue[0] = 0; } prepare_keyvalue(keyvalue); if(strcasecmp(keyvalue,"MEMBER_XTENSION") != 0 && strcasecmp(keyvalue,"MEMBER_NAME") != 0 && strcasecmp(keyvalue,"MEMBER_VERSION") != 0 && strcasecmp(keyvalue,"MEMBER_POSITION") != 0 && strcasecmp(keyvalue,"MEMBER_LOCATION") != 0 && strcasecmp(keyvalue,"MEMBER_URI_TYPE") != 0 ) { /* SPR 3956, add at the end of the table */ *status = fits_copy_col(infptr,outfptr,i,newTfields+1,1,status); ++newTfields; } } }while(0); if(mfptr != NULL) { fits_close_file(mfptr,status); } return(*status); } /*-------------------------------------------------------------------------- HDUtracker struct manipulation functions --------------------------------------------------------------------------*/ int fftsad(fitsfile *mfptr, /* pointer to an member HDU */ HDUtracker *HDU, /* pointer to an HDU tracker struct */ int *newPosition, /* new HDU position of the member HDU */ char *newFileName) /* file containing member HDU */ /* add an HDU to the HDUtracker struct pointed to by HDU. The HDU is only added if it does not already reside in the HDUtracker. If it already resides in the HDUtracker then the new HDU postion and file name are returned in newPosition and newFileName (if != NULL) */ { int i; int hdunum; int status = 0; char filename1[FLEN_FILENAME]; char filename2[FLEN_FILENAME]; do { /* retrieve the HDU's position within the FITS file */ fits_get_hdu_num(mfptr,&hdunum); /* retrieve the HDU's file name */ status = fits_file_name(mfptr,filename1,&status); /* parse the file name and construct the "standard" URL for it */ status = ffrtnm(filename1,filename2,&status); /* examine all the existing HDUs in the HDUtracker an see if this HDU has already been registered */ for(i = 0; i < HDU->nHDU && !(HDU->position[i] == hdunum && strcmp(HDU->filename[i],filename2) == 0); ++i); if(i != HDU->nHDU) { status = HDU_ALREADY_TRACKED; if(newPosition != NULL) *newPosition = HDU->newPosition[i]; if(newFileName != NULL) strcpy(newFileName,HDU->newFilename[i]); continue; } if(HDU->nHDU == MAX_HDU_TRACKER) { status = TOO_MANY_HDUS_TRACKED; continue; } HDU->filename[i] = (char*) malloc(FLEN_FILENAME * sizeof(char)); if(HDU->filename[i] == NULL) { status = MEMORY_ALLOCATION; continue; } HDU->newFilename[i] = (char*) malloc(FLEN_FILENAME * sizeof(char)); if(HDU->newFilename[i] == NULL) { status = MEMORY_ALLOCATION; free(HDU->filename[i]); continue; } HDU->position[i] = hdunum; HDU->newPosition[i] = hdunum; strcpy(HDU->filename[i],filename2); strcpy(HDU->newFilename[i],filename2); ++(HDU->nHDU); }while(0); return(status); } /*--------------------------------------------------------------------------*/ int fftsud(fitsfile *mfptr, /* pointer to an member HDU */ HDUtracker *HDU, /* pointer to an HDU tracker struct */ int newPosition, /* new HDU position of the member HDU */ char *newFileName) /* file containing member HDU */ /* update the HDU information in the HDUtracker struct pointed to by HDU. The HDU to update is pointed to by mfptr. If non-zero, the value of newPosition is used to update the HDU->newPosition[] value for the mfptr, and if non-NULL the newFileName value is used to update the HDU->newFilename[] value for mfptr. */ { int i; int hdunum; int status = 0; char filename1[FLEN_FILENAME]; char filename2[FLEN_FILENAME]; /* retrieve the HDU's position within the FITS file */ fits_get_hdu_num(mfptr,&hdunum); /* retrieve the HDU's file name */ status = fits_file_name(mfptr,filename1,&status); /* parse the file name and construct the "standard" URL for it */ status = ffrtnm(filename1,filename2,&status); /* examine all the existing HDUs in the HDUtracker an see if this HDU has already been registered */ for(i = 0; i < HDU->nHDU && !(HDU->position[i] == hdunum && strcmp(HDU->filename[i],filename2) == 0); ++i); /* if previously registered then change newPosition and newFileName */ if(i != HDU->nHDU) { if(newPosition != 0) HDU->newPosition[i] = newPosition; if(newFileName != NULL) { strcpy(HDU->newFilename[i],newFileName); } } else status = MEMBER_NOT_FOUND; return(status); } /*---------------------------------------------------------------------------*/ void prepare_keyvalue(char *keyvalue) /* string containing keyword value */ /* strip off all single quote characters "'" and blank spaces from a keyword value retrieved via fits_read_key*() routines this is necessary so that a standard comparision of keyword values may be made */ { int i; int length; /* strip off any leading or trailing single quotes (`) and (') from the keyword value */ length = strlen(keyvalue) - 1; if(keyvalue[0] == '\'' && keyvalue[length] == '\'') { for(i = 0; i < length - 1; ++i) keyvalue[i] = keyvalue[i+1]; keyvalue[length-1] = 0; } /* strip off any trailing blanks from the keyword value; note that if the keyvalue consists of nothing but blanks then no blanks are stripped */ length = strlen(keyvalue) - 1; for(i = 0; i < length && keyvalue[i] == ' '; ++i); if(i != length) { for(i = length; i >= 0 && keyvalue[i] == ' '; --i) keyvalue[i] = '\0'; } } /*--------------------------------------------------------------------------- Host dependent directory path to/from URL functions --------------------------------------------------------------------------*/ int fits_path2url(char *inpath, /* input file path string */ char *outpath, /* output file path string */ int *status) /* convert a file path into its Unix-style equivelent for URL purposes. Note that this process is platform dependent. This function supports Unix, MSDOS/WIN32, VMS and Macintosh platforms. The plaform dependant code is conditionally compiled depending upon the setting of the appropriate C preprocessor macros. */ { char buff[FLEN_FILENAME]; #if defined(WINNT) || defined(__WINNT__) /* Microsoft Windows NT case. We assume input file paths of the form: //disk/path/filename All path segments may be null, so that a single file name is the simplist case. The leading "//" becomes a single "/" if present. If no "//" is present, then make sure the resulting URL path is relative, i.e., does not begin with a "/". In other words, the only way that an absolute URL file path may be generated is if the drive specification is given. */ if(*status > 0) return(*status); if(inpath[0] == '/') { strcpy(buff,inpath+1); } else { strcpy(buff,inpath); } #elif defined(MSDOS) || defined(__WIN32__) || defined(WIN32) /* MSDOS or Microsoft windows/NT case. The assumed form of the input path is: disk:\path\filename All path segments may be null, so that a single file name is the simplist case. All back-slashes '\' become slashes '/'; if the path starts with a string of the form "X:" then it is replaced with "/X/" */ int i,j,k; int size; if(*status > 0) return(*status); for(i = 0, j = 0, size = strlen(inpath), buff[0] = 0; i < size; j = strlen(buff)) { switch(inpath[i]) { case ':': /* must be a disk desiginator; add a slash '/' at the start of outpath to designate that the path is absolute, then change the colon ':' to a slash '/' */ for(k = j; k >= 0; --k) buff[k+1] = buff[k]; buff[0] = '/'; strcat(buff,"/"); ++i; break; case '\\': /* just replace the '\' with a '/' IF its not the first character */ if(i != 0 && buff[(j == 0 ? 0 : j-1)] != '/') { buff[j] = '/'; buff[j+1] = 0; } ++i; break; default: /* copy the character from inpath to buff as is */ buff[j] = inpath[i]; buff[j+1] = 0; ++i; break; } } #elif defined(VMS) || defined(vms) || defined(__vms) /* VMS case. Assumed format of the input path is: node::disk:[path]filename.ext;version Any part of the file path may be missing, so that in the simplist case a single file name/extension is given. all brackets "[", "]" and dots "." become "/"; dashes "-" become "..", all single colons ":" become ":/", all double colons "::" become "FILE://" */ int i,j,k; int done; int size; if(*status > 0) return(*status); /* see if inpath contains a directory specification */ if(strchr(inpath,']') == NULL) done = 1; else done = 0; for(i = 0, j = 0, size = strlen(inpath), buff[0] = 0; i < size && j < FLEN_FILENAME - 8; j = strlen(buff)) { switch(inpath[i]) { case ':': /* must be a logical/symbol separator or (in the case of a double colon "::") machine node separator */ if(inpath[i+1] == ':') { /* insert a "FILE://" at the start of buff ==> machine given */ for(k = j; k >= 0; --k) buff[k+7] = buff[k]; strncpy(buff,"FILE://",7); i += 2; } else if(strstr(buff,"FILE://") == NULL) { /* insert a "/" at the start of buff ==> absolute path */ for(k = j; k >= 0; --k) buff[k+1] = buff[k]; buff[0] = '/'; ++i; } else ++i; /* a colon always ==> path separator */ strcat(buff,"/"); break; case ']': /* end of directory spec, file name spec begins after this */ done = 1; buff[j] = '/'; buff[j+1] = 0; ++i; break; case '[': /* begin directory specification; add a '/' only if the last char is not '/' */ if(i != 0 && buff[(j == 0 ? 0 : j-1)] != '/') { buff[j] = '/'; buff[j+1] = 0; } ++i; break; case '.': /* directory segment separator or file name/extension separator; we decide which by looking at the value of done */ if(!done) { /* must be a directory segment separator */ if(inpath[i-1] == '[') { strcat(buff,"./"); ++j; } else buff[j] = '/'; } else /* must be a filename/extension separator */ buff[j] = '.'; buff[j+1] = 0; ++i; break; case '-': /* a dash is the same as ".." in Unix speak, but lets make sure that its not part of the file name first! */ if(!done) /* must be part of the directory path specification */ strcat(buff,".."); else { /* the dash is part of the filename, so just copy it as is */ buff[j] = '-'; buff[j+1] = 0; } ++i; break; default: /* nothing special, just copy the character as is */ buff[j] = inpath[i]; buff[j+1] = 0; ++i; break; } } if(j > FLEN_FILENAME - 8) { *status = URL_PARSE_ERROR; ffpmsg("resulting path to URL conversion too big (fits_path2url)"); } #elif defined(macintosh) /* MacOS case. The assumed form of the input path is: disk:path:filename It is assumed that all paths are absolute with disk and path specified, unless no colons ":" are supplied with the string ==> a single file name only. All colons ":" become slashes "/", and if one or more colon is encountered then the path is specified as absolute. */ int i,j,k; int firstColon; int size; if(*status > 0) return(*status); for(i = 0, j = 0, firstColon = 1, size = strlen(inpath), buff[0] = 0; i < size; j = strlen(buff)) { switch(inpath[i]) { case ':': /* colons imply path separators. If its the first colon encountered then assume that its the disk designator and add a slash to the beginning of the buff string */ if(firstColon) { firstColon = 0; for(k = j; k >= 0; --k) buff[k+1] = buff[k]; buff[0] = '/'; } /* all colons become slashes */ strcat(buff,"/"); ++i; break; default: /* copy the character from inpath to buff as is */ buff[j] = inpath[i]; buff[j+1] = 0; ++i; break; } } #else /* Default Unix case. Nothing special to do here except to remove the double or more // and replace them with single / */ int ii = 0; int jj = 0; if(*status > 0) return(*status); while (inpath[ii]) { if (inpath[ii] == '/' && inpath[ii+1] == '/') { /* do nothing */ } else { buff[jj] = inpath[ii]; jj++; } ii++; } buff[jj] = '\0'; /* printf("buff is %s\ninpath is %s\n",buff,inpath); */ /* strcpy(buff,inpath); */ #endif /* encode all "unsafe" and "reserved" URL characters */ *status = fits_encode_url(buff,outpath,status); return(*status); } /*---------------------------------------------------------------------------*/ int fits_url2path(char *inpath, /* input file path string */ char *outpath, /* output file path string */ int *status) /* convert a Unix-style URL into a platform dependent directory path. Note that this process is platform dependent. This function supports Unix, MSDOS/WIN32, VMS and Macintosh platforms. Each platform dependent code segment is conditionally compiled depending upon the setting of the appropriate C preprocesser macros. */ { char buff[FLEN_FILENAME]; int absolute; #if defined(MSDOS) || defined(__WIN32__) || defined(WIN32) char *tmpStr; #elif defined(VMS) || defined(vms) || defined(__vms) int i; char *tmpStr; #elif defined(macintosh) char *tmpStr; #endif if(*status != 0) return(*status); /* make a copy of the inpath so that we can manipulate it */ strcpy(buff,inpath); /* convert any encoded characters to their unencoded values */ *status = fits_unencode_url(inpath,buff,status); /* see if the URL is given as absolute w.r.t. the "local" file system */ if(buff[0] == '/') absolute = 1; else absolute = 0; #if defined(WINNT) || defined(__WINNT__) /* Microsoft Windows NT case. We create output paths of the form //disk/path/filename All path segments but the last may be null, so that a single file name is the simplist case. */ if(absolute) { strcpy(outpath,"/"); strcat(outpath,buff); } else { strcpy(outpath,buff); } #elif defined(MSDOS) || defined(__WIN32__) || defined(WIN32) /* MSDOS or Microsoft windows/NT case. The output path will be of the form disk:\path\filename All path segments but the last may be null, so that a single file name is the simplist case. */ /* separate the URL into tokens at each slash '/' and process until all tokens have been examined */ for(tmpStr = strtok(buff,"/"), outpath[0] = 0; tmpStr != NULL; tmpStr = strtok(NULL,"/")) { strcat(outpath,tmpStr); /* if the absolute flag is set then process the token as a disk specification; else just process it as a directory path or filename */ if(absolute) { strcat(outpath,":\\"); absolute = 0; } else strcat(outpath,"\\"); } /* remove the last "\" from the outpath, it does not belong there */ outpath[strlen(outpath)-1] = 0; #elif defined(VMS) || defined(vms) || defined(__vms) /* VMS case. The output path will be of the form: node::disk:[path]filename.ext;version Any part of the file path may be missing execpt filename.ext, so that in the simplist case a single file name/extension is given. if the path is specified as relative starting with "./" then the first part of the VMS path is "[.". If the path is relative and does not start with "./" (e.g., "a/b/c") then the VMS path is constructed as "[a.b.c]" */ /* separate the URL into tokens at each slash '/' and process until all tokens have been examined */ for(tmpStr = strtok(buff,"/"), outpath[0] = 0; tmpStr != NULL; tmpStr = strtok(NULL,"/")) { if(strcasecmp(tmpStr,"FILE:") == 0) { /* the next token should contain the DECnet machine name */ tmpStr = strtok(NULL,"/"); if(tmpStr == NULL) continue; strcat(outpath,tmpStr); strcat(outpath,"::"); /* set the absolute flag to true for the next token */ absolute = 1; } else if(strcmp(tmpStr,"..") == 0) { /* replace all Unix-like ".." with VMS "-" */ if(strlen(outpath) == 0) strcat(outpath,"["); strcat(outpath,"-."); } else if(strcmp(tmpStr,".") == 0 && strlen(outpath) == 0) { /* must indicate a relative path specifier */ strcat(outpath,"[."); } else if(strchr(tmpStr,'.') != NULL) { /* must be up to the file name; turn the last "." path separator into a "]" and then add the file name to the outpath */ i = strlen(outpath); if(i > 0 && outpath[i-1] == '.') outpath[i-1] = ']'; strcat(outpath,tmpStr); } else { /* process the token as a a directory path segement */ if(absolute) { /* treat the token as a disk specifier */ absolute = 0; strcat(outpath,tmpStr); strcat(outpath,":["); } else if(strlen(outpath) == 0) { /* treat the token as the first directory path specifier */ strcat(outpath,"["); strcat(outpath,tmpStr); strcat(outpath,"."); } else { /* treat the token as an imtermediate path specifier */ strcat(outpath,tmpStr); strcat(outpath,"."); } } } #elif defined(macintosh) /* MacOS case. The output path will be of the form disk:path:filename All path segments but the last may be null, so that a single file name is the simplist case. */ /* separate the URL into tokens at each slash '/' and process until all tokens have been examined */ for(tmpStr = strtok(buff,"/"), outpath[0] = 0; tmpStr != NULL; tmpStr = strtok(NULL,"/")) { strcat(outpath,tmpStr); strcat(outpath,":"); } /* remove the last ":" from the outpath, it does not belong there */ outpath[strlen(outpath)-1] = 0; #else /* Default Unix case. Nothing special to do here */ strcpy(outpath,buff); #endif return(*status); } /****************************************************************************/ int fits_get_cwd(char *cwd, /* IO current working directory string */ int *status) /* retrieve the string containing the current working directory absolute path in Unix-like URL standard notation. It is assumed that the CWD string has a size of at least FLEN_FILENAME. Note that this process is platform dependent. This function supports Unix, MSDOS/WIN32, VMS and Macintosh platforms. Each platform dependent code segment is conditionally compiled depending upon the setting of the appropriate C preprocesser macros. */ { char buff[FLEN_FILENAME]; if(*status != 0) return(*status); #if defined(macintosh) /* MacOS case. Currently unknown !!!! */ *buff = 0; #else /* Good old getcwd() seems to work with all other platforms */ getcwd(buff,FLEN_FILENAME); #endif /* convert the cwd string to a URL standard path string */ fits_path2url(buff,cwd,status); return(*status); } /*---------------------------------------------------------------------------*/ int fits_get_url(fitsfile *fptr, /* I ptr to FITS file to evaluate */ char *realURL, /* O URL of real FITS file */ char *startURL, /* O URL of starting FITS file */ char *realAccess, /* O true access method of FITS file */ char *startAccess,/* O "official" access of FITS file */ int *iostate, /* O can this file be modified? */ int *status) /* For grouping convention purposes, determine the URL of the FITS file associated with the fitsfile pointer fptr. The true access type (file://, mem://, shmem://, root://), starting "official" access type, and iostate (0 ==> readonly, 1 ==> readwrite) are also returned. It is assumed that the url string has enough room to hold the resulting URL, and the the accessType string has enough room to hold the access type. */ { int i; int tmpIOstate = 0; char infile[FLEN_FILENAME]; char outfile[FLEN_FILENAME]; char tmpStr1[FLEN_FILENAME]; char tmpStr2[FLEN_FILENAME]; char tmpStr3[FLEN_FILENAME]; char tmpStr4[FLEN_FILENAME]; char *tmpPtr; if(*status != 0) return(*status); do { /* retrieve the member HDU's file name as opened by ffopen() and parse it into its constitutent pieces; get the currently active driver token too */ *tmpStr1 = *tmpStr2 = *tmpStr3 = *tmpStr4 = 0; *status = fits_file_name(fptr,tmpStr1,status); *status = ffiurl(tmpStr1,NULL,infile,outfile,NULL,tmpStr2,tmpStr3, tmpStr4,status); if((*tmpStr2) || (*tmpStr3) || (*tmpStr4)) tmpIOstate = -1; *status = ffurlt(fptr,tmpStr3,status); strcpy(tmpStr4,tmpStr3); *status = ffrtnm(tmpStr1,tmpStr2,status); strcpy(tmpStr1,tmpStr2); /* for grouping convention purposes (only) determine the URL of the actual FITS file being used for the given fptr, its true access type (file://, mem://, shmem://, root://) and its iostate (0 ==> read only, 1 ==> readwrite) */ /* The first set of access types are "simple" in that they do not use any redirection to temporary memory or outfiles */ /* standard disk file driver is in use */ if(strcasecmp(tmpStr3,"file://") == 0) { tmpIOstate = 1; if(strlen(outfile)) strcpy(tmpStr1,outfile); else *tmpStr2 = 0; /* make sure no FILE:// specifier is given in the tmpStr1 or tmpStr2 strings; the convention calls for local files to have no access specification */ if((tmpPtr = strstr(tmpStr1,"://")) != NULL) { strcpy(infile,tmpPtr+3); strcpy(tmpStr1,infile); } if((tmpPtr = strstr(tmpStr2,"://")) != NULL) { strcpy(infile,tmpPtr+3); strcpy(tmpStr2,infile); } } /* file stored in conventional memory */ else if(strcasecmp(tmpStr3,"mem://") == 0) { if(tmpIOstate < 0) { /* file is a temp mem file only */ ffpmsg("cannot make URL from temp MEM:// file (fits_get_url)"); *status = URL_PARSE_ERROR; } else { /* file is a "perminate" mem file for this process */ tmpIOstate = 1; *tmpStr2 = 0; } } /* file stored in conventional memory */ else if(strcasecmp(tmpStr3,"memkeep://") == 0) { strcpy(tmpStr3,"mem://"); *tmpStr4 = 0; *tmpStr2 = 0; tmpIOstate = 1; } /* file residing in shared memory */ else if(strcasecmp(tmpStr3,"shmem://") == 0) { *tmpStr4 = 0; *tmpStr2 = 0; tmpIOstate = 1; } /* file accessed via the ROOT network protocol */ else if(strcasecmp(tmpStr3,"root://") == 0) { *tmpStr4 = 0; *tmpStr2 = 0; tmpIOstate = 1; } /* the next set of access types redirect the contents of the original file to an special outfile because the original could not be directly modified (i.e., resides on the network, was compressed). In these cases the URL string takes on the value of the OUTFILE, the access type becomes file://, and the iostate is set to 1 (can read/write to the file). */ /* compressed file uncompressed and written to disk */ else if(strcasecmp(tmpStr3,"compressfile://") == 0) { strcpy(tmpStr1,outfile); strcpy(tmpStr2,infile); strcpy(tmpStr3,"file://"); strcpy(tmpStr4,"file://"); tmpIOstate = 1; } /* HTTP accessed file written locally to disk */ else if(strcasecmp(tmpStr3,"httpfile://") == 0) { strcpy(tmpStr1,outfile); strcpy(tmpStr3,"file://"); strcpy(tmpStr4,"http://"); tmpIOstate = 1; } /* FTP accessd file written locally to disk */ else if(strcasecmp(tmpStr3,"ftpfile://") == 0) { strcpy(tmpStr1,outfile); strcpy(tmpStr3,"file://"); strcpy(tmpStr4,"ftp://"); tmpIOstate = 1; } /* file from STDIN written to disk */ else if(strcasecmp(tmpStr3,"stdinfile://") == 0) { strcpy(tmpStr1,outfile); strcpy(tmpStr3,"file://"); strcpy(tmpStr4,"stdin://"); tmpIOstate = 1; } /* the following access types use memory resident files as temporary storage; they cannot be modified or be made group members for grouping conventions purposes, but their original files can be. Thus, their tmpStr3s are reset to mem://, their iostate values are set to 0 (for no-modification), and their URL string values remain set to their original values */ /* compressed disk file uncompressed into memory */ else if(strcasecmp(tmpStr3,"compress://") == 0) { *tmpStr1 = 0; strcpy(tmpStr2,infile); strcpy(tmpStr3,"mem://"); strcpy(tmpStr4,"file://"); tmpIOstate = 0; } /* HTTP accessed file transferred into memory */ else if(strcasecmp(tmpStr3,"http://") == 0) { *tmpStr1 = 0; strcpy(tmpStr3,"mem://"); strcpy(tmpStr4,"http://"); tmpIOstate = 0; } /* HTTP accessed compressed file transferred into memory */ else if(strcasecmp(tmpStr3,"httpcompress://") == 0) { *tmpStr1 = 0; strcpy(tmpStr3,"mem://"); strcpy(tmpStr4,"http://"); tmpIOstate = 0; } /* FTP accessed file transferred into memory */ else if(strcasecmp(tmpStr3,"ftp://") == 0) { *tmpStr1 = 0; strcpy(tmpStr3,"mem://"); strcpy(tmpStr4,"ftp://"); tmpIOstate = 0; } /* FTP accessed compressed file transferred into memory */ else if(strcasecmp(tmpStr3,"ftpcompress://") == 0) { *tmpStr1 = 0; strcpy(tmpStr3,"mem://"); strcpy(tmpStr4,"ftp://"); tmpIOstate = 0; } /* The last set of access types cannot be used to make a meaningful URL strings from; thus an error is generated */ else if(strcasecmp(tmpStr3,"stdin://") == 0) { *status = URL_PARSE_ERROR; ffpmsg("cannot make vaild URL from stdin:// (fits_get_url)"); *tmpStr1 = *tmpStr2 = 0; } else if(strcasecmp(tmpStr3,"stdout://") == 0) { *status = URL_PARSE_ERROR; ffpmsg("cannot make vaild URL from stdout:// (fits_get_url)"); *tmpStr1 = *tmpStr2 = 0; } else if(strcasecmp(tmpStr3,"irafmem://") == 0) { *status = URL_PARSE_ERROR; ffpmsg("cannot make vaild URL from irafmem:// (fits_get_url)"); *tmpStr1 = *tmpStr2 = 0; } if(*status != 0) continue; /* assign values to the calling parameters if they are non-NULL */ if(realURL != NULL) { if(strlen(tmpStr1) == 0) *realURL = 0; else { if((tmpPtr = strstr(tmpStr1,"://")) != NULL) { tmpPtr += 3; i = (long)tmpPtr - (long)tmpStr1; strncpy(realURL,tmpStr1,i); } else { tmpPtr = tmpStr1; i = 0; } *status = fits_path2url(tmpPtr,realURL+i,status); } } if(startURL != NULL) { if(strlen(tmpStr2) == 0) *startURL = 0; else { if((tmpPtr = strstr(tmpStr2,"://")) != NULL) { tmpPtr += 3; i = (long)tmpPtr - (long)tmpStr2; strncpy(startURL,tmpStr2,i); } else { tmpPtr = tmpStr2; i = 0; } *status = fits_path2url(tmpPtr,startURL+i,status); } } if(realAccess != NULL) strcpy(realAccess,tmpStr3); if(startAccess != NULL) strcpy(startAccess,tmpStr4); if(iostate != NULL) *iostate = tmpIOstate; }while(0); return(*status); } /*-------------------------------------------------------------------------- URL parse support functions --------------------------------------------------------------------------*/ /* simple push/pop/shift/unshift string stack for use by fits_clean_url */ typedef char* grp_stack_data; /* type of data held by grp_stack */ typedef struct grp_stack_item_struct { grp_stack_data data; /* value of this stack item */ struct grp_stack_item_struct* next; /* next stack item */ struct grp_stack_item_struct* prev; /* previous stack item */ } grp_stack_item; typedef struct grp_stack_struct { size_t stack_size; /* number of items on stack */ grp_stack_item* top; /* top item */ } grp_stack; static char* grp_stack_default = NULL; /* initial value for new instances of grp_stack_data */ /* the following functions implement the group string stack grp_stack */ static void delete_grp_stack(grp_stack** mystack); static grp_stack_item* grp_stack_append( grp_stack_item* last, grp_stack_data data ); static grp_stack_data grp_stack_remove(grp_stack_item* last); static grp_stack* new_grp_stack(void); static grp_stack_data pop_grp_stack(grp_stack* mystack); static void push_grp_stack(grp_stack* mystack, grp_stack_data data); static grp_stack_data shift_grp_stack(grp_stack* mystack); /* static void unshift_grp_stack(grp_stack* mystack, grp_stack_data data); */ int fits_clean_url(char *inURL, /* I input URL string */ char *outURL, /* O output URL string */ int *status) /* clean the URL by eliminating any ".." or "." specifiers in the inURL string, and write the output to the outURL string. Note that this function must have a valid Unix-style URL as input; platform dependent path strings are not allowed. */ { grp_stack* mystack; /* stack to hold pieces of URL */ char* tmp; if(*status) return *status; mystack = new_grp_stack(); *outURL = 0; do { /* handle URL scheme and domain if they exist */ tmp = strstr(inURL, "://"); if(tmp) { /* there is a URL scheme, so look for the end of the domain too */ tmp = strchr(tmp + 3, '/'); if(tmp) { /* tmp is now the end of the domain, so * copy URL scheme and domain as is, and terminate by hand */ size_t string_size = (size_t) (tmp - inURL); strncpy(outURL, inURL, string_size); outURL[string_size] = 0; /* now advance the input pointer to just after the domain and go on */ inURL = tmp; } else { /* '/' was not found, which means there are no path-like * portions, so copy whole inURL to outURL and we're done */ strcpy(outURL, inURL); continue; /* while(0) */ } } /* explicitly copy a leading / (absolute path) */ if('/' == *inURL) strcat(outURL, "/"); /* now clean the remainder of the inURL. push URL segments onto * stack, dealing with .. and . as we go */ tmp = strtok(inURL, "/"); /* finds first / */ while(tmp) { if(!strcmp(tmp, "..")) { /* discard previous URL segment, if there was one. if not, * add the .. to the stack if this is *not* an absolute path * (for absolute paths, leading .. has no effect, so skip it) */ if(0 < mystack->stack_size) pop_grp_stack(mystack); else if('/' != *inURL) push_grp_stack(mystack, tmp); } else { /* always just skip ., but otherwise add segment to stack */ if(strcmp(tmp, ".")) push_grp_stack(mystack, tmp); } tmp = strtok(NULL, "/"); /* get the next segment */ } /* stack now has pieces of cleaned URL, so just catenate them * onto output string until stack is empty */ while(0 < mystack->stack_size) { tmp = shift_grp_stack(mystack); strcat(outURL, tmp); strcat(outURL, "/"); } outURL[strlen(outURL) - 1] = 0; /* blank out trailing / */ } while(0); delete_grp_stack(&mystack); return *status; } /* free all stack contents using pop_grp_stack before freeing the * grp_stack itself */ static void delete_grp_stack(grp_stack** mystack) { if(!mystack || !*mystack) return; while((*mystack)->stack_size) pop_grp_stack(*mystack); free(*mystack); *mystack = NULL; } /* append an item to the stack, handling the special case of the first * item appended */ static grp_stack_item* grp_stack_append( grp_stack_item* last, grp_stack_data data ) { /* first create a new stack item, and copy data to it */ grp_stack_item* new_item = (grp_stack_item*) malloc(sizeof(grp_stack_item)); new_item->data = data; if(last) { /* attach this item between the "last" item and its "next" item */ new_item->next = last->next; new_item->prev = last; last->next->prev = new_item; last->next = new_item; } else { /* stack is empty, so "next" and "previous" both point back to it */ new_item->next = new_item; new_item->prev = new_item; } return new_item; } /* remove an item from the stack, handling the special case of the last * item removed */ static grp_stack_data grp_stack_remove(grp_stack_item* last) { grp_stack_data retval = last->data; last->prev->next = last->next; last->next->prev = last->prev; free(last); return retval; } /* create new stack dynamically, and give it valid initial values */ static grp_stack* new_grp_stack(void) { grp_stack* retval = (grp_stack*) malloc(sizeof(grp_stack)); if(retval) { retval->stack_size = 0; retval->top = NULL; } return retval; } /* return the value at the top of the stack and remove it, updating * stack_size. top->prev becomes the new "top" */ static grp_stack_data pop_grp_stack(grp_stack* mystack) { grp_stack_data retval = grp_stack_default; if(mystack && mystack->top) { grp_stack_item* newtop = mystack->top->prev; retval = grp_stack_remove(mystack->top); mystack->top = newtop; if(0 == --mystack->stack_size) mystack->top = NULL; } return retval; } /* add to the stack after the top element. the added element becomes * the new "top" */ static void push_grp_stack(grp_stack* mystack, grp_stack_data data) { if(!mystack) return; mystack->top = grp_stack_append(mystack->top, data); ++mystack->stack_size; return; } /* return the value at the bottom of the stack and remove it, updating * stack_size. "top" pointer is unaffected */ static grp_stack_data shift_grp_stack(grp_stack* mystack) { grp_stack_data retval = grp_stack_default; if(mystack && mystack->top) { retval = grp_stack_remove(mystack->top->next); /* top->next == bottom */ if(0 == --mystack->stack_size) mystack->top = NULL; } return retval; } /* add to the stack after the top element. "top" is unaffected, except * in the special case of an initially empty stack */ /* static void unshift_grp_stack(grp_stack* mystack, grp_stack_data data) { if(!mystack) return; if(mystack->top) grp_stack_append(mystack->top, data); else mystack->top = grp_stack_append(NULL, data); ++mystack->stack_size; return; } */ /*--------------------------------------------------------------------------*/ int fits_url2relurl(char *refURL, /* I reference URL string */ char *absURL, /* I absoulute URL string to process */ char *relURL, /* O resulting relative URL string */ int *status) /* create a relative URL to the file referenced by absURL with respect to the reference URL refURL. The relative URL is returned in relURL. Both refURL and absURL must be absolute URL strings; i.e. either begin with an access method specification "XXX://" or with a '/' character signifiying that they are absolute file paths. Note that it is possible to make a relative URL from two input URLs (absURL and refURL) that are not compatable. This function does not check to see if the resulting relative URL makes any sence. For instance, it is impossible to make a relative URL from the following two inputs: absURL = ftp://a.b.c.com/x/y/z/foo.fits refURL = /a/b/c/ttt.fits The resulting relURL will be: ../../../ftp://a.b.c.com/x/y/z/foo.fits Which is syntically correct but meaningless. The problem is that a file with an access method of ftp:// cannot be expressed a a relative URL to a local disk file. */ { int i,j; int refcount,abscount; int refsize,abssize; int done; if(*status != 0) return(*status); /* initialize the relative URL string */ relURL[0] = 0; do { /* refURL and absURL must be absolute to process */ if(!(fits_is_url_absolute(refURL) || *refURL == '/') || !(fits_is_url_absolute(absURL) || *absURL == '/')) { *status = URL_PARSE_ERROR; ffpmsg("Cannot make rel. URL from non abs. URLs (fits_url2relurl)"); continue; } /* determine the size of the refURL and absURL strings */ refsize = strlen(refURL); abssize = strlen(absURL); /* process the two URL strings and build the relative URL between them */ for(done = 0, refcount = 0, abscount = 0; !done && refcount < refsize && abscount < abssize; ++refcount, ++abscount) { for(; abscount < abssize && absURL[abscount] == '/'; ++abscount); for(; refcount < refsize && refURL[refcount] == '/'; ++refcount); /* find the next path segment in absURL */ for(i = abscount; absURL[i] != '/' && i < abssize; ++i); /* find the next path segment in refURL */ for(j = refcount; refURL[j] != '/' && j < refsize; ++j); /* do the two path segments match? */ if(i == j && strncmp(absURL+abscount, refURL+refcount,i-refcount) == 0) { /* they match, so ignore them and continue */ abscount = i; refcount = j; continue; } /* We found a difference in the paths in refURL and absURL. For every path segment remaining in the refURL string, append a "../" path segment to the relataive URL relURL. */ for(j = refcount; j < refsize; ++j) if(refURL[j] == '/') strcat(relURL,"../"); /* copy all remaining characters of absURL to the output relURL */ strcat(relURL,absURL+abscount); /* we are done building the relative URL */ done = 1; } }while(0); return(*status); } /*--------------------------------------------------------------------------*/ int fits_relurl2url(char *refURL, /* I reference URL string */ char *relURL, /* I relative URL string to process */ char *absURL, /* O absolute URL string */ int *status) /* create an absolute URL from a relative url and a reference URL. The reference URL is given by the FITS file pointed to by fptr. The construction of the absolute URL from the partial and reference URl is performed using the rules set forth in: http://www.w3.org/Addressing/URL/URL_TOC.html and http://www.w3.org/Addressing/URL/4_3_Partial.html Note that the relative URL string relURL must conform to the Unix-like URL syntax; host dependent partial URL strings are not allowed. */ { int i; char tmpStr[FLEN_FILENAME]; char *tmpStr1, *tmpStr2; if(*status != 0) return(*status); do { /* make a copy of the reference URL string refURL for parsing purposes */ strcpy(tmpStr,refURL); /* if the reference file has an access method of mem:// or shmem:// then we cannot use it as the basis of an absolute URL construction for a partial URL */ if(strncasecmp(tmpStr,"MEM:",4) == 0 || strncasecmp(tmpStr,"SHMEM:",6) == 0) { ffpmsg("ref URL has access mem:// or shmem:// (fits_relurl2url)"); ffpmsg(" cannot construct full URL from a partial URL and "); ffpmsg(" MEM/SHMEM base URL"); *status = URL_PARSE_ERROR; continue; } if(relURL[0] != '/') { /* just append the relative URL string to the reference URL string (minus the reference URL file name) to form the absolute URL string */ tmpStr1 = strrchr(tmpStr,'/'); if(tmpStr1 != NULL) tmpStr1[1] = 0; else tmpStr[0] = 0; strcat(tmpStr,relURL); } else { /* have to parse the refURL string for the first occurnace of the same number of '/' characters as contained in the beginning of location that is not followed by a greater number of consective '/' charaters (yes, that is a confusing statement); this is the location in the refURL string where the relURL string is to be appended to form the new absolute URL string */ /* first, build up a slash pattern string that has one more slash in it than the starting slash pattern of the relURL string */ strcpy(absURL,"/"); for(i = 0; relURL[i] == '/'; ++i) strcat(absURL,"/"); /* loop over the refURL string until the slash pattern stored in absURL is no longer found */ for(tmpStr1 = tmpStr, i = strlen(absURL); (tmpStr2 = strstr(tmpStr1,absURL)) != NULL; tmpStr1 = tmpStr2 + i); /* reduce the slash pattern string by one slash */ absURL[i-1] = 0; /* search for the slash pattern in the remaining portion of the refURL string */ tmpStr2 = strstr(tmpStr1,absURL); /* if no slash pattern match was found */ if(tmpStr2 == NULL) { /* just strip off the file name from the refURL */ tmpStr2 = strrchr(tmpStr1,'/'); if(tmpStr2 != NULL) tmpStr2[0] = 0; else tmpStr[0] = 0; } else { /* set a string terminator at the slash pattern match */ *tmpStr2 = 0; } /* conatenate the relURL string to the refURL string to form the absURL */ strcat(tmpStr,relURL); } /* normalize the absURL by removing any ".." or "." specifiers in the string */ *status = fits_clean_url(tmpStr,absURL,status); }while(0); return(*status); } /*--------------------------------------------------------------------------*/ int fits_encode_url(char *inpath, /* I URL to be encoded */ char *outpath, /* O output encoded URL */ int *status) /* encode all URL "unsafe" and "reserved" characters using the "%XX" convention, where XX stand for the two hexidecimal digits of the encode character's ASCII code. Note that the output path is at least as large as, if not larger than the input path, so that OUTPATH should be passed to this function with room for growth. If not a runtime error could result. It is assumed that OUTPATH has been allocated with enough room to hold the resulting encoded URL. This function was adopted from code in the libwww.a library available via the W3 consortium */ { unsigned char a; char *p; char *q; char *hex = "0123456789ABCDEF"; unsigned const char isAcceptable[96] = {/* 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xA 0xB 0xC 0xD 0xE 0xF */ 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xF,0xE,0x0,0xF,0xF,0xC, /* 2x !"#$%&'()*+,-./ */ 0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0x8,0x0,0x0,0x0,0x0,0x0, /* 3x 0123456789:;<=>? */ 0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF, /* 4x @ABCDEFGHIJKLMNO */ 0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0x0,0x0,0x0,0x0,0xF, /* 5X PQRSTUVWXYZ[\]^_ */ 0x0,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF, /* 6x `abcdefghijklmno */ 0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0xF,0x0,0x0,0x0,0x0,0x0 /* 7X pqrstuvwxyz{\}~DEL */ }; if(*status != 0) return(*status); /* loop over all characters in inpath until '\0' is encountered */ for(q = outpath, p = inpath; *p; p++) { a = (unsigned char)*p; /* if the charcter requires encoding then process it */ if(!( a>=32 && a<128 && (isAcceptable[a-32]))) { /* add a '%' character to the outpath */ *q++ = HEX_ESCAPE; /* add the most significant ASCII code hex value */ *q++ = hex[a >> 4]; /* add the least significant ASCII code hex value */ *q++ = hex[a & 15]; } /* else just copy the character as is */ else *q++ = *p; } /* null terminate the outpath string */ *q++ = 0; return(*status); } /*---------------------------------------------------------------------------*/ int fits_unencode_url(char *inpath, /* I input URL with encoding */ char *outpath, /* O unencoded URL */ int *status) /* unencode all URL "unsafe" and "reserved" characters to their actual ASCII representation. All tokens of the form "%XX" where XX is the hexidecimal code for an ASCII character, are searched for and translated into the actuall ASCII character (so three chars become 1 char). It is assumed that OUTPATH has enough room to hold the unencoded URL. This function was adopted from code in the libwww.a library available via the W3 consortium */ { char *p; char *q; char c; if(*status != 0) return(*status); p = inpath; q = outpath; /* loop over all characters in the inpath looking for the '%' escape character; if found the process the escape sequence */ while(*p != 0) { /* if the character is '%' then unencode the sequence, else just copy the character from inpath to outpath */ if (*p == HEX_ESCAPE) { if((c = *(++p)) != 0) { *q = ( (c >= '0' && c <= '9') ? (c - '0') : ((c >= 'A' && c <= 'F') ? (c - 'A' + 10) : (c - 'a' + 10)) )*16; if((c = *(++p)) != 0) { *q = *q + ( (c >= '0' && c <= '9') ? (c - '0') : ((c >= 'A' && c <= 'F') ? (c - 'A' + 10) : (c - 'a' + 10)) ); p++, q++; } } } else *q++ = *p++; } /* terminate the outpath */ *q = 0; return(*status); } /*---------------------------------------------------------------------------*/ int fits_is_url_absolute(char *url) /* Return a True (1) or False (0) value indicating whether or not the passed URL string contains an access method specifier or not. Note that this is a boolean function and it neither reads nor returns the standard error status parameter */ { char *tmpStr1, *tmpStr2; char reserved[] = {':',';','/','?','@','&','=','+','$',','}; /* The rule for determing if an URL is relative or absolute is that it (1) must have a colon ":" and (2) that the colon must appear before any other reserved URL character in the URL string. We first see if a colon exists, get its position in the string, and then check to see if any of the other reserved characters exists and if their position in the string is greater than that of the colons. */ if( (tmpStr1 = strchr(url,reserved[0])) != NULL && ((tmpStr2 = strchr(url,reserved[1])) == NULL || tmpStr2 > tmpStr1) && ((tmpStr2 = strchr(url,reserved[2])) == NULL || tmpStr2 > tmpStr1) && ((tmpStr2 = strchr(url,reserved[3])) == NULL || tmpStr2 > tmpStr1) && ((tmpStr2 = strchr(url,reserved[4])) == NULL || tmpStr2 > tmpStr1) && ((tmpStr2 = strchr(url,reserved[5])) == NULL || tmpStr2 > tmpStr1) && ((tmpStr2 = strchr(url,reserved[6])) == NULL || tmpStr2 > tmpStr1) && ((tmpStr2 = strchr(url,reserved[7])) == NULL || tmpStr2 > tmpStr1) && ((tmpStr2 = strchr(url,reserved[8])) == NULL || tmpStr2 > tmpStr1) && ((tmpStr2 = strchr(url,reserved[9])) == NULL || tmpStr2 > tmpStr1) ) { return(1); } else { return(0); } } astropy-1.1.1/cextern/cfitsio/uncompr.c0000644001134200020070000000367112602615520021064 0ustar embrayscience00000000000000/* uncompr.c -- decompress a memory buffer * Copyright (C) 1995-2003, 2010 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ #define ZLIB_INTERNAL #include "zlib.h" /* =========================================================================== Decompresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be large enough to hold the entire uncompressed data. (The size of the uncompressed data must have been saved previously by the compressor and transmitted to the decompressor by some mechanism outside the scope of this compression library.) Upon exit, destLen is the actual size of the compressed buffer. uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer, or Z_DATA_ERROR if the input data was corrupted. */ int ZEXPORT uncompress (dest, destLen, source, sourceLen) Bytef *dest; uLongf *destLen; const Bytef *source; uLong sourceLen; { z_stream stream; int err; stream.next_in = (Bytef*)source; stream.avail_in = (uInt)sourceLen; /* Check for source > 64K on 16-bit machine: */ if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; stream.next_out = dest; stream.avail_out = (uInt)*destLen; if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; stream.zalloc = (alloc_func)0; stream.zfree = (free_func)0; err = inflateInit(&stream); if (err != Z_OK) return err; err = inflate(&stream, Z_FINISH); if (err != Z_STREAM_END) { inflateEnd(&stream); if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0)) return Z_DATA_ERROR; return err; } *destLen = stream.total_out; err = inflateEnd(&stream); return err; } astropy-1.1.1/cextern/cfitsio/trees.h0000644001134200020070000002043012602615517020526 0ustar embrayscience00000000000000/* header created automatically with -DGEN_TREES_H */ local const ct_data static_ltree[L_CODES+2] = { {{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, {{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}}, {{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}}, {{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}}, {{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}}, {{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}}, {{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}}, {{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}}, {{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}}, {{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}}, {{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}}, {{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}}, {{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}}, {{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}}, {{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}}, {{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}}, {{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}}, {{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}}, {{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}}, {{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}}, {{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}}, {{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}}, {{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}}, {{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}}, {{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}}, {{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}}, {{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}}, {{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}}, {{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}}, {{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}}, {{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}}, {{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}}, {{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}}, {{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}}, {{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}}, {{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}}, {{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}}, {{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}}, {{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}}, {{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}}, {{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}}, {{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}}, {{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}}, {{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}}, {{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}}, {{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}}, {{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}}, {{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}}, {{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}}, {{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}}, {{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}}, {{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}}, {{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}}, {{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}}, {{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}}, {{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}}, {{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}}, {{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}} }; local const ct_data static_dtree[D_CODES] = { {{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}}, {{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}}, {{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}}, {{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}}, {{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}}, {{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} }; const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = { 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, 18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 }; const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= { 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28 }; local const int base_length[LENGTH_CODES] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0 }; local const int base_dist[D_CODES] = { 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 }; astropy-1.1.1/cextern/cfitsio/wcssub.c0000644001134200020070000010470412602615520020706 0ustar embrayscience00000000000000#include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int fits_read_wcstab( fitsfile *fptr, /* I - FITS file pointer */ int nwtb, /* Number of arrays to be read from the binary table(s) */ wtbarr *wtb, /* Address of the first element of an array of wtbarr typedefs. This wtbarr typedef is defined below to match the wtbarr struct defined in WCSLIB. An array of such structs returned by the WCSLIB function wcstab(). */ int *status) /* * Author: Mark Calabretta, Australia Telescope National Facility * http://www.atnf.csiro.au/~mcalabre/index.html * * fits_read_wcstab() extracts arrays from a binary table required in * constructing -TAB coordinates. This helper routine is intended for * use by routines in the WCSLIB library when dealing with the -TAB table * look up WCS convention. */ { int anynul, colnum, hdunum, iwtb, m, naxis, nostat; long *naxes = 0, nelem; wtbarr *wtbp; if (*status) return *status; if (fptr == 0) { return (*status = NULL_INPUT_PTR); } if (nwtb == 0) return 0; /* Zero the array pointers. */ wtbp = wtb; for (iwtb = 0; iwtb < nwtb; iwtb++, wtbp++) { *wtbp->arrayp = 0x0; } /* Save HDU number so that we can move back to it later. */ fits_get_hdu_num(fptr, &hdunum); wtbp = wtb; for (iwtb = 0; iwtb < nwtb; iwtb++, wtbp++) { /* Move to the required binary table extension. */ if (fits_movnam_hdu(fptr, BINARY_TBL, (char *)(wtbp->extnam), wtbp->extver, status)) { goto cleanup; } /* Locate the table column. */ if (fits_get_colnum(fptr, CASEINSEN, (char *)(wtbp->ttype), &colnum, status)) { goto cleanup; } /* Get the array dimensions and check for consistency. */ if (wtbp->ndim < 1) { *status = NEG_AXIS; goto cleanup; } if (!(naxes = calloc(wtbp->ndim, sizeof(long)))) { *status = MEMORY_ALLOCATION; goto cleanup; } if (fits_read_tdim(fptr, colnum, wtbp->ndim, &naxis, naxes, status)) { goto cleanup; } if (naxis != wtbp->ndim) { if (wtbp->kind == 'c' && wtbp->ndim == 2) { /* Allow TDIMn to be omitted for degenerate coordinate arrays. */ naxis = 2; naxes[1] = naxes[0]; naxes[0] = 1; } else { *status = BAD_TDIM; goto cleanup; } } if (wtbp->kind == 'c') { /* Coordinate array; calculate the array size. */ nelem = naxes[0]; for (m = 0; m < naxis-1; m++) { *(wtbp->dimlen + m) = naxes[m+1]; nelem *= naxes[m+1]; } } else { /* Index vector; check length. */ if ((nelem = naxes[0]) != *(wtbp->dimlen)) { /* N.B. coordinate array precedes the index vectors. */ *status = BAD_TDIM; goto cleanup; } } free(naxes); naxes = 0; /* Allocate memory for the array. */ if (!(*wtbp->arrayp = calloc((size_t)nelem, sizeof(double)))) { *status = MEMORY_ALLOCATION; goto cleanup; } /* Read the array from the table. */ if (fits_read_col_dbl(fptr, colnum, wtbp->row, 1L, nelem, 0.0, *wtbp->arrayp, &anynul, status)) { goto cleanup; } } cleanup: /* Move back to the starting HDU. */ nostat = 0; fits_movabs_hdu(fptr, hdunum, 0, &nostat); /* Release allocated memory. */ if (naxes) free(naxes); if (*status) { wtbp = wtb; for (iwtb = 0; iwtb < nwtb; iwtb++, wtbp++) { if (*wtbp->arrayp) free(*wtbp->arrayp); } } return *status; } /*--------------------------------------------------------------------------*/ int ffgiwcs(fitsfile *fptr, /* I - FITS file pointer */ char **header, /* O - pointer to the WCS related keywords */ int *status) /* IO - error status */ /* int fits_get_image_wcs_keys return a string containing all the image WCS header keywords. This string is then used as input to the wcsinit WCSlib routine. THIS ROUTINE IS DEPRECATED. USE fits_hdr2str INSTEAD */ { int hdutype; if (*status > 0) return(*status); fits_get_hdu_type(fptr, &hdutype, status); if (hdutype != IMAGE_HDU) { ffpmsg( "Error in ffgiwcs. This HDU is not an image. Can't read WCS keywords"); return(*status = NOT_IMAGE); } /* read header keywords into a long string of chars */ if (ffh2st(fptr, header, status) > 0) { ffpmsg("error creating string of image WCS keywords (ffgiwcs)"); return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffgics(fitsfile *fptr, /* I - FITS file pointer */ double *xrval, /* O - X reference value */ double *yrval, /* O - Y reference value */ double *xrpix, /* O - X reference pixel */ double *yrpix, /* O - Y reference pixel */ double *xinc, /* O - X increment per pixel */ double *yinc, /* O - Y increment per pixel */ double *rot, /* O - rotation angle (degrees) */ char *type, /* O - type of projection ('-tan') */ int *status) /* IO - error status */ /* read the values of the celestial coordinate system keywords. These values may be used as input to the subroutines that calculate celestial coordinates. (ffxypx, ffwldp) Modified in Nov 1999 to convert the CD matrix keywords back to the old CDELTn form, and to swap the axes if the dec-like axis is given first, and to assume default values if any of the keywords are not present. */ { int tstat = 0, cd_exists = 0, pc_exists = 0; char ctype[FLEN_VALUE]; double cd11 = 0.0, cd21 = 0.0, cd22 = 0.0, cd12 = 0.0; double pc11 = 1.0, pc21 = 0.0, pc22 = 1.0, pc12 = 0.0; double pi = 3.1415926535897932; double phia, phib, temp; double toler = .0002; /* tolerance for angles to agree (radians) */ /* (= approximately 0.01 degrees) */ if (*status > 0) return(*status); tstat = 0; if (ffgkyd(fptr, "CRVAL1", xrval, NULL, &tstat)) *xrval = 0.; tstat = 0; if (ffgkyd(fptr, "CRVAL2", yrval, NULL, &tstat)) *yrval = 0.; tstat = 0; if (ffgkyd(fptr, "CRPIX1", xrpix, NULL, &tstat)) *xrpix = 0.; tstat = 0; if (ffgkyd(fptr, "CRPIX2", yrpix, NULL, &tstat)) *yrpix = 0.; /* look for CDELTn first, then CDi_j keywords */ tstat = 0; if (ffgkyd(fptr, "CDELT1", xinc, NULL, &tstat)) { /* CASE 1: no CDELTn keyword, so look for the CD matrix */ tstat = 0; if (ffgkyd(fptr, "CD1_1", &cd11, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else cd_exists = 1; /* found at least 1 CD_ keyword */ if (ffgkyd(fptr, "CD2_1", &cd21, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else cd_exists = 1; /* found at least 1 CD_ keyword */ if (ffgkyd(fptr, "CD1_2", &cd12, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else cd_exists = 1; /* found at least 1 CD_ keyword */ if (ffgkyd(fptr, "CD2_2", &cd22, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else cd_exists = 1; /* found at least 1 CD_ keyword */ if (cd_exists) /* convert CDi_j back to CDELTn */ { /* there are 2 ways to compute the angle: */ phia = atan2( cd21, cd11); phib = atan2(-cd12, cd22); /* ensure that phia <= phib */ temp = minvalue(phia, phib); phib = maxvalue(phia, phib); phia = temp; /* there is a possible 180 degree ambiguity in the angles */ /* so add 180 degress to the smaller value if the values */ /* differ by more than 90 degrees = pi/2 radians. */ /* (Later, we may decide to take the other solution by */ /* subtracting 180 degrees from the larger value). */ if ((phib - phia) > (pi / 2.)) phia += pi; if (fabs(phia - phib) > toler) { /* angles don't agree, so looks like there is some skewness */ /* between the axes. Return with an error to be safe. */ *status = APPROX_WCS_KEY; } phia = (phia + phib) /2.; /* use the average of the 2 values */ *xinc = cd11 / cos(phia); *yinc = cd22 / cos(phia); *rot = phia * 180. / pi; /* common usage is to have a positive yinc value. If it is */ /* negative, then subtract 180 degrees from rot and negate */ /* both xinc and yinc. */ if (*yinc < 0) { *xinc = -(*xinc); *yinc = -(*yinc); *rot = *rot - 180.; } } else /* no CD matrix keywords either */ { *xinc = 1.; /* there was no CDELT1 keyword, but check for CDELT2 just in case */ tstat = 0; if (ffgkyd(fptr, "CDELT2", yinc, NULL, &tstat)) *yinc = 1.; tstat = 0; if (ffgkyd(fptr, "CROTA2", rot, NULL, &tstat)) *rot=0.; } } else /* Case 2: CDELTn + optional PC matrix */ { if (ffgkyd(fptr, "CDELT2", yinc, NULL, &tstat)) *yinc = 1.; tstat = 0; if (ffgkyd(fptr, "CROTA2", rot, NULL, &tstat)) { *rot=0.; /* no CROTA2 keyword, so look for the PC matrix */ tstat = 0; if (ffgkyd(fptr, "PC1_1", &pc11, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else pc_exists = 1; /* found at least 1 PC_ keyword */ if (ffgkyd(fptr, "PC2_1", &pc21, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else pc_exists = 1; /* found at least 1 PC_ keyword */ if (ffgkyd(fptr, "PC1_2", &pc12, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else pc_exists = 1; /* found at least 1 PC_ keyword */ if (ffgkyd(fptr, "PC2_2", &pc22, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else pc_exists = 1; /* found at least 1 PC_ keyword */ if (pc_exists) /* convert PCi_j back to CDELTn */ { /* there are 2 ways to compute the angle: */ phia = atan2( pc21, pc11); phib = atan2(-pc12, pc22); /* ensure that phia <= phib */ temp = minvalue(phia, phib); phib = maxvalue(phia, phib); phia = temp; /* there is a possible 180 degree ambiguity in the angles */ /* so add 180 degress to the smaller value if the values */ /* differ by more than 90 degrees = pi/2 radians. */ /* (Later, we may decide to take the other solution by */ /* subtracting 180 degrees from the larger value). */ if ((phib - phia) > (pi / 2.)) phia += pi; if (fabs(phia - phib) > toler) { /* angles don't agree, so looks like there is some skewness */ /* between the axes. Return with an error to be safe. */ *status = APPROX_WCS_KEY; } phia = (phia + phib) /2.; /* use the average of the 2 values */ *rot = phia * 180. / pi; } } } /* get the type of projection, if any */ tstat = 0; if (ffgkys(fptr, "CTYPE1", ctype, NULL, &tstat)) type[0] = '\0'; else { /* copy the projection type string */ strncpy(type, &ctype[4], 4); type[4] = '\0'; /* check if RA and DEC are inverted */ if (!strncmp(ctype, "DEC-", 4) || !strncmp(ctype+1, "LAT", 3)) { /* the latitudinal axis is given first, so swap them */ /* this case was removed on 12/9. Apparently not correct. if ((*xinc / *yinc) < 0. ) *rot = -90. - (*rot); else */ *rot = 90. - (*rot); /* Empirical tests with ds9 show the y-axis sign must be negated */ /* and the xinc and yinc values must NOT be swapped. */ *yinc = -(*yinc); temp = *xrval; *xrval = *yrval; *yrval = temp; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgicsa(fitsfile *fptr, /* I - FITS file pointer */ char version, /* I - character code of desired version *(/ /* A - Z or blank */ double *xrval, /* O - X reference value */ double *yrval, /* O - Y reference value */ double *xrpix, /* O - X reference pixel */ double *yrpix, /* O - Y reference pixel */ double *xinc, /* O - X increment per pixel */ double *yinc, /* O - Y increment per pixel */ double *rot, /* O - rotation angle (degrees) */ char *type, /* O - type of projection ('-tan') */ int *status) /* IO - error status */ /* read the values of the celestial coordinate system keywords. These values may be used as input to the subroutines that calculate celestial coordinates. (ffxypx, ffwldp) Modified in Nov 1999 to convert the CD matrix keywords back to the old CDELTn form, and to swap the axes if the dec-like axis is given first, and to assume default values if any of the keywords are not present. */ { int tstat = 0, cd_exists = 0, pc_exists = 0; char ctype[FLEN_VALUE], keyname[FLEN_VALUE], alt[2]; double cd11 = 0.0, cd21 = 0.0, cd22 = 0.0, cd12 = 0.0; double pc11 = 1.0, pc21 = 0.0, pc22 = 1.0, pc12 = 0.0; double pi = 3.1415926535897932; double phia, phib, temp; double toler = .0002; /* tolerance for angles to agree (radians) */ /* (= approximately 0.01 degrees) */ if (*status > 0) return(*status); if (version == ' ') { ffgics(fptr, xrval, yrval, xrpix, yrpix, xinc, yinc, rot, type, status); return (*status); } if (version > 'Z' || version < 'A') { ffpmsg("ffgicsa: illegal WCS version code (must be A - Z or blank)"); return(*status = WCS_ERROR); } alt[0] = version; alt[1] = '\0'; tstat = 0; strcpy(keyname, "CRVAL1"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, xrval, NULL, &tstat)) *xrval = 0.; tstat = 0; strcpy(keyname, "CRVAL2"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, yrval, NULL, &tstat)) *yrval = 0.; tstat = 0; strcpy(keyname, "CRPIX1"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, xrpix, NULL, &tstat)) *xrpix = 0.; tstat = 0; strcpy(keyname, "CRPIX2"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, yrpix, NULL, &tstat)) *yrpix = 0.; /* look for CDELTn first, then CDi_j keywords */ tstat = 0; strcpy(keyname, "CDELT1"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, xinc, NULL, &tstat)) { /* CASE 1: no CDELTn keyword, so look for the CD matrix */ tstat = 0; strcpy(keyname, "CD1_1"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, &cd11, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else cd_exists = 1; /* found at least 1 CD_ keyword */ strcpy(keyname, "CD2_1"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, &cd21, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else cd_exists = 1; /* found at least 1 CD_ keyword */ strcpy(keyname, "CD1_2"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, &cd12, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else cd_exists = 1; /* found at least 1 CD_ keyword */ strcpy(keyname, "CD2_2"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, &cd22, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else cd_exists = 1; /* found at least 1 CD_ keyword */ if (cd_exists) /* convert CDi_j back to CDELTn */ { /* there are 2 ways to compute the angle: */ phia = atan2( cd21, cd11); phib = atan2(-cd12, cd22); /* ensure that phia <= phib */ temp = minvalue(phia, phib); phib = maxvalue(phia, phib); phia = temp; /* there is a possible 180 degree ambiguity in the angles */ /* so add 180 degress to the smaller value if the values */ /* differ by more than 90 degrees = pi/2 radians. */ /* (Later, we may decide to take the other solution by */ /* subtracting 180 degrees from the larger value). */ if ((phib - phia) > (pi / 2.)) phia += pi; if (fabs(phia - phib) > toler) { /* angles don't agree, so looks like there is some skewness */ /* between the axes. Return with an error to be safe. */ *status = APPROX_WCS_KEY; } phia = (phia + phib) /2.; /* use the average of the 2 values */ *xinc = cd11 / cos(phia); *yinc = cd22 / cos(phia); *rot = phia * 180. / pi; /* common usage is to have a positive yinc value. If it is */ /* negative, then subtract 180 degrees from rot and negate */ /* both xinc and yinc. */ if (*yinc < 0) { *xinc = -(*xinc); *yinc = -(*yinc); *rot = *rot - 180.; } } else /* no CD matrix keywords either */ { *xinc = 1.; /* there was no CDELT1 keyword, but check for CDELT2 just in case */ tstat = 0; strcpy(keyname, "CDELT2"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, yinc, NULL, &tstat)) *yinc = 1.; tstat = 0; strcpy(keyname, "CROTA2"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, rot, NULL, &tstat)) *rot=0.; } } else /* Case 2: CDELTn + optional PC matrix */ { strcpy(keyname, "CDELT2"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, yinc, NULL, &tstat)) *yinc = 1.; tstat = 0; strcpy(keyname, "CROTA2"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, rot, NULL, &tstat)) { *rot=0.; /* no CROTA2 keyword, so look for the PC matrix */ tstat = 0; strcpy(keyname, "PC1_1"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, &pc11, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else pc_exists = 1; /* found at least 1 PC_ keyword */ strcpy(keyname, "PC2_1"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, &pc21, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else pc_exists = 1; /* found at least 1 PC_ keyword */ strcpy(keyname, "PC1_2"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, &pc12, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else pc_exists = 1; /* found at least 1 PC_ keyword */ strcpy(keyname, "PC2_2"); strcat(keyname, alt); if (ffgkyd(fptr, keyname, &pc22, NULL, &tstat)) tstat = 0; /* reset keyword not found error */ else pc_exists = 1; /* found at least 1 PC_ keyword */ if (pc_exists) /* convert PCi_j back to CDELTn */ { /* there are 2 ways to compute the angle: */ phia = atan2( pc21, pc11); phib = atan2(-pc12, pc22); /* ensure that phia <= phib */ temp = minvalue(phia, phib); phib = maxvalue(phia, phib); phia = temp; /* there is a possible 180 degree ambiguity in the angles */ /* so add 180 degress to the smaller value if the values */ /* differ by more than 90 degrees = pi/2 radians. */ /* (Later, we may decide to take the other solution by */ /* subtracting 180 degrees from the larger value). */ if ((phib - phia) > (pi / 2.)) phia += pi; if (fabs(phia - phib) > toler) { /* angles don't agree, so looks like there is some skewness */ /* between the axes. Return with an error to be safe. */ *status = APPROX_WCS_KEY; } phia = (phia + phib) /2.; /* use the average of the 2 values */ *rot = phia * 180. / pi; } } } /* get the type of projection, if any */ tstat = 0; strcpy(keyname, "CTYPE1"); strcat(keyname, alt); if (ffgkys(fptr, keyname, ctype, NULL, &tstat)) type[0] = '\0'; else { /* copy the projection type string */ strncpy(type, &ctype[4], 4); type[4] = '\0'; /* check if RA and DEC are inverted */ if (!strncmp(ctype, "DEC-", 4) || !strncmp(ctype+1, "LAT", 3)) { /* the latitudinal axis is given first, so swap them */ *rot = 90. - (*rot); /* Empirical tests with ds9 show the y-axis sign must be negated */ /* and the xinc and yinc values must NOT be swapped. */ *yinc = -(*yinc); temp = *xrval; *xrval = *yrval; *yrval = temp; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgtcs(fitsfile *fptr, /* I - FITS file pointer */ int xcol, /* I - column containing the RA coordinate */ int ycol, /* I - column containing the DEC coordinate */ double *xrval, /* O - X reference value */ double *yrval, /* O - Y reference value */ double *xrpix, /* O - X reference pixel */ double *yrpix, /* O - Y reference pixel */ double *xinc, /* O - X increment per pixel */ double *yinc, /* O - Y increment per pixel */ double *rot, /* O - rotation angle (degrees) */ char *type, /* O - type of projection ('-sin') */ int *status) /* IO - error status */ /* read the values of the celestial coordinate system keywords from a FITS table where the X and Y or RA and DEC coordinates are stored in separate column. Do this by converting the table to a temporary FITS image, then reading the keywords from the image file. These values may be used as input to the subroutines that calculate celestial coordinates. (ffxypx, ffwldp) */ { int colnum[2]; long naxes[2]; fitsfile *tptr; if (*status > 0) return(*status); colnum[0] = xcol; colnum[1] = ycol; naxes[0] = 10; naxes[1] = 10; /* create temporary FITS file, in memory */ ffinit(&tptr, "mem://", status); /* create a temporary image; the datatype and size are not important */ ffcrim(tptr, 32, 2, naxes, status); /* now copy the relevant keywords from the table to the image */ fits_copy_pixlist2image(fptr, tptr, 9, 2, colnum, status); /* write default WCS keywords, if they are not present */ fits_write_keys_histo(fptr, tptr, 2, colnum, status); if (*status > 0) return(*status); /* read the WCS keyword values from the temporary image */ ffgics(tptr, xrval, yrval, xrpix, yrpix, xinc, yinc, rot, type, status); if (*status > 0) { ffpmsg ("ffgtcs could not find all the celestial coordinate keywords"); return(*status = NO_WCS_KEY); } /* delete the temporary file */ fits_delete_file(tptr, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgtwcs(fitsfile *fptr, /* I - FITS file pointer */ int xcol, /* I - column number for the X column */ int ycol, /* I - column number for the Y column */ char **header, /* O - string of all the WCS keywords */ int *status) /* IO - error status */ /* int fits_get_table_wcs_keys Return string containing all the WCS keywords appropriate for the pair of X and Y columns containing the coordinate of each event in an event list table. This string may then be passed to Doug Mink's WCS library wcsinit routine, to create and initialize the WCS structure. The calling routine must free the header character string when it is no longer needed. THIS ROUTINE IS DEPRECATED. USE fits_hdr2str INSTEAD */ { int hdutype, ncols, tstatus, length; int naxis1 = 1, naxis2 = 1; long tlmin, tlmax; char keyname[FLEN_KEYWORD]; char valstring[FLEN_VALUE]; char comm[2]; char *cptr; /* construct a string of 80 blanks, for adding fill to the keywords */ /* 12345678901234567890123456789012345678901234567890123456789012345678901234567890 */ char blanks[] = " "; if (*status > 0) return(*status); fits_get_hdu_type(fptr, &hdutype, status); if (hdutype == IMAGE_HDU) { ffpmsg("Can't read table WSC keywords. This HDU is not a table"); return(*status = NOT_TABLE); } fits_get_num_cols(fptr, &ncols, status); if (xcol < 1 || xcol > ncols) { ffpmsg("illegal X axis column number in fftwcs"); return(*status = BAD_COL_NUM); } if (ycol < 1 || ycol > ncols) { ffpmsg("illegal Y axis column number in fftwcs"); return(*status = BAD_COL_NUM); } /* allocate character string for all the WCS keywords */ *header = calloc(1, 2401); /* room for up to 30 keywords */ if (*header == 0) { ffpmsg("error allocating memory for WCS header keywords (fftwcs)"); return(*status = MEMORY_ALLOCATION); } cptr = *header; comm[0] = '\0'; tstatus = 0; ffkeyn("TLMIN",xcol,keyname,status); ffgkyj(fptr,keyname, &tlmin,NULL,&tstatus); if (!tstatus) { ffkeyn("TLMAX",xcol,keyname,status); ffgkyj(fptr,keyname, &tlmax,NULL,&tstatus); } if (!tstatus) { naxis1 = tlmax - tlmin + 1; } tstatus = 0; ffkeyn("TLMIN",ycol,keyname,status); ffgkyj(fptr,keyname, &tlmin,NULL,&tstatus); if (!tstatus) { ffkeyn("TLMAX",ycol,keyname,status); ffgkyj(fptr,keyname, &tlmax,NULL,&tstatus); } if (!tstatus) { naxis2 = tlmax - tlmin + 1; } /* 123456789012345678901234567890 */ strcat(cptr, "NAXIS = 2"); strncat(cptr, blanks, 50); cptr += 80; ffi2c(naxis1, valstring, status); /* convert to formatted string */ ffmkky("NAXIS1", valstring, comm, cptr, status); /* construct the keyword*/ strncat(cptr, blanks, 50); /* pad with blanks */ cptr += 80; strcpy(keyname, "NAXIS2"); ffi2c(naxis2, valstring, status); /* convert to formatted string */ ffmkky(keyname, valstring, comm, cptr, status); /* construct the keyword*/ strncat(cptr, blanks, 50); /* pad with blanks */ cptr += 80; /* read the required header keywords (use defaults if not found) */ /* CTYPE1 keyword */ tstatus = 0; ffkeyn("TCTYP",xcol,keyname,status); if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) valstring[0] = '\0'; ffmkky("CTYPE1", valstring, comm, cptr, status); /* construct the keyword*/ length = strlen(cptr); strncat(cptr, blanks, 80 - length); /* pad with blanks */ cptr += 80; /* CTYPE2 keyword */ tstatus = 0; ffkeyn("TCTYP",ycol,keyname,status); if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) valstring[0] = '\0'; ffmkky("CTYPE2", valstring, comm, cptr, status); /* construct the keyword*/ length = strlen(cptr); strncat(cptr, blanks, 80 - length); /* pad with blanks */ cptr += 80; /* CRPIX1 keyword */ tstatus = 0; ffkeyn("TCRPX",xcol,keyname,status); if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) strcpy(valstring, "1"); ffmkky("CRPIX1", valstring, comm, cptr, status); /* construct the keyword*/ strncat(cptr, blanks, 50); /* pad with blanks */ cptr += 80; /* CRPIX2 keyword */ tstatus = 0; ffkeyn("TCRPX",ycol,keyname,status); if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) strcpy(valstring, "1"); ffmkky("CRPIX2", valstring, comm, cptr, status); /* construct the keyword*/ strncat(cptr, blanks, 50); /* pad with blanks */ cptr += 80; /* CRVAL1 keyword */ tstatus = 0; ffkeyn("TCRVL",xcol,keyname,status); if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) strcpy(valstring, "1"); ffmkky("CRVAL1", valstring, comm, cptr, status); /* construct the keyword*/ strncat(cptr, blanks, 50); /* pad with blanks */ cptr += 80; /* CRVAL2 keyword */ tstatus = 0; ffkeyn("TCRVL",ycol,keyname,status); if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) strcpy(valstring, "1"); ffmkky("CRVAL2", valstring, comm, cptr, status); /* construct the keyword*/ strncat(cptr, blanks, 50); /* pad with blanks */ cptr += 80; /* CDELT1 keyword */ tstatus = 0; ffkeyn("TCDLT",xcol,keyname,status); if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) strcpy(valstring, "1"); ffmkky("CDELT1", valstring, comm, cptr, status); /* construct the keyword*/ strncat(cptr, blanks, 50); /* pad with blanks */ cptr += 80; /* CDELT2 keyword */ tstatus = 0; ffkeyn("TCDLT",ycol,keyname,status); if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) ) strcpy(valstring, "1"); ffmkky("CDELT2", valstring, comm, cptr, status); /* construct the keyword*/ strncat(cptr, blanks, 50); /* pad with blanks */ cptr += 80; /* the following keywords may not exist */ /* CROTA2 keyword */ tstatus = 0; ffkeyn("TCROT",ycol,keyname,status); if (ffgkey(fptr, keyname, valstring, NULL, &tstatus) == 0 ) { ffmkky("CROTA2", valstring, comm, cptr, status); /* construct keyword*/ strncat(cptr, blanks, 50); /* pad with blanks */ cptr += 80; } /* EPOCH keyword */ tstatus = 0; if (ffgkey(fptr, "EPOCH", valstring, NULL, &tstatus) == 0 ) { ffmkky("EPOCH", valstring, comm, cptr, status); /* construct keyword*/ length = strlen(cptr); strncat(cptr, blanks, 80 - length); /* pad with blanks */ cptr += 80; } /* EQUINOX keyword */ tstatus = 0; if (ffgkey(fptr, "EQUINOX", valstring, NULL, &tstatus) == 0 ) { ffmkky("EQUINOX", valstring, comm, cptr, status); /* construct keyword*/ length = strlen(cptr); strncat(cptr, blanks, 80 - length); /* pad with blanks */ cptr += 80; } /* RADECSYS keyword */ tstatus = 0; if (ffgkey(fptr, "RADECSYS", valstring, NULL, &tstatus) == 0 ) { ffmkky("RADECSYS", valstring, comm, cptr, status); /*construct keyword*/ length = strlen(cptr); strncat(cptr, blanks, 80 - length); /* pad with blanks */ cptr += 80; } /* TELESCOPE keyword */ tstatus = 0; if (ffgkey(fptr, "TELESCOP", valstring, NULL, &tstatus) == 0 ) { ffmkky("TELESCOP", valstring, comm, cptr, status); length = strlen(cptr); strncat(cptr, blanks, 80 - length); /* pad with blanks */ cptr += 80; } /* INSTRUME keyword */ tstatus = 0; if (ffgkey(fptr, "INSTRUME", valstring, NULL, &tstatus) == 0 ) { ffmkky("INSTRUME", valstring, comm, cptr, status); length = strlen(cptr); strncat(cptr, blanks, 80 - length); /* pad with blanks */ cptr += 80; } /* DETECTOR keyword */ tstatus = 0; if (ffgkey(fptr, "DETECTOR", valstring, NULL, &tstatus) == 0 ) { ffmkky("DETECTOR", valstring, comm, cptr, status); length = strlen(cptr); strncat(cptr, blanks, 80 - length); /* pad with blanks */ cptr += 80; } /* MJD-OBS keyword */ tstatus = 0; if (ffgkey(fptr, "MJD-OBS", valstring, NULL, &tstatus) == 0 ) { ffmkky("MJD-OBS", valstring, comm, cptr, status); length = strlen(cptr); strncat(cptr, blanks, 80 - length); /* pad with blanks */ cptr += 80; } /* DATE-OBS keyword */ tstatus = 0; if (ffgkey(fptr, "DATE-OBS", valstring, NULL, &tstatus) == 0 ) { ffmkky("DATE-OBS", valstring, comm, cptr, status); length = strlen(cptr); strncat(cptr, blanks, 80 - length); /* pad with blanks */ cptr += 80; } /* DATE keyword */ tstatus = 0; if (ffgkey(fptr, "DATE", valstring, NULL, &tstatus) == 0 ) { ffmkky("DATE", valstring, comm, cptr, status); length = strlen(cptr); strncat(cptr, blanks, 80 - length); /* pad with blanks */ cptr += 80; } strcat(cptr, "END"); strncat(cptr, blanks, 77); return(*status); } astropy-1.1.1/cextern/cfitsio/region.h0000644001134200020070000000415512602615520020667 0ustar embrayscience00000000000000/***************************************************************/ /* REGION STUFF */ /***************************************************************/ #include "fitsio.h" #define myPI 3.1415926535897932385 #define RadToDeg 180.0/myPI typedef struct { int exists; double xrefval, yrefval; double xrefpix, yrefpix; double xinc, yinc; double rot; char type[6]; } WCSdata; typedef enum { point_rgn, line_rgn, circle_rgn, annulus_rgn, ellipse_rgn, elliptannulus_rgn, box_rgn, boxannulus_rgn, rectangle_rgn, diamond_rgn, sector_rgn, poly_rgn, panda_rgn, epanda_rgn, bpanda_rgn } shapeType; typedef enum { pixel_fmt, degree_fmt, hhmmss_fmt } coordFmt; typedef struct { char sign; /* Include or exclude? */ shapeType shape; /* Shape of this region */ int comp; /* Component number for this region */ double xmin,xmax; /* bounding box */ double ymin,ymax; union { /* Parameters - In pixels */ /**** Generic Shape Data ****/ struct { double p[11]; /* Region parameters */ double sinT, cosT; /* For rotated shapes */ double a, b; /* Extra scratch area */ } gen; /**** Polygon Data ****/ struct { int nPts; /* Number of Polygon pts */ double *Pts; /* Polygon points */ } poly; } param; } RgnShape; typedef struct { int nShapes; RgnShape *Shapes; WCSdata wcs; } SAORegion; /* SAO region file routines */ int fits_read_rgnfile( const char *filename, WCSdata *wcs, SAORegion **Rgn, int *status ); int fits_in_region( double X, double Y, SAORegion *Rgn ); void fits_free_region( SAORegion *Rgn ); void fits_set_region_components ( SAORegion *Rgn ); void fits_setup_shape ( RgnShape *shape); int fits_read_fits_region ( fitsfile *fptr, WCSdata * wcs, SAORegion **Rgn, int *status); int fits_read_ascii_region ( const char *filename, WCSdata * wcs, SAORegion **Rgn, int *status); astropy-1.1.1/cextern/cfitsio/zlib.h0000644001134200020070000023331412602615520020345 0ustar embrayscience00000000000000/* zlib.h -- interface of the 'zlib' general purpose compression library version 1.2.5, April 19th, 2010 Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). */ #ifndef ZLIB_H #define ZLIB_H #include "zconf.h" #ifdef __cplusplus extern "C" { #endif #define ZLIB_VERSION "1.2.5" #define ZLIB_VERNUM 0x1250 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 #define ZLIB_VER_REVISION 5 #define ZLIB_VER_SUBREVISION 0 /* The 'zlib' compression library provides in-memory compression and decompression functions, including integrity checks of the uncompressed data. This version of the library supports only one compression method (deflation) but other algorithms will be added later and will have the same stream interface. Compression can be done in a single step if the buffers are large enough, or can be done by repeated calls of the compression function. In the latter case, the application must provide more input and/or consume the output (providing more output space) before each call. The compressed data format used by default by the in-memory functions is the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped around a deflate stream, which is itself documented in RFC 1951. The library also supports reading and writing files in gzip (.gz) format with an interface similar to that of stdio using the functions that start with "gz". The gzip format is different from the zlib format. gzip is a gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. This library can optionally read and write gzip streams in memory as well. The zlib format was designed to be compact and fast for use in memory and on communications channels. The gzip format was designed for single- file compression on file systems, has a larger header than zlib to maintain directory information, and uses a different, slower check method than zlib. The library does not install any signal handler. The decoder checks the consistency of the compressed data, so the library should never crash even in case of corrupted input. */ typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); typedef void (*free_func) OF((voidpf opaque, voidpf address)); struct internal_state; typedef struct z_stream_s { Bytef *next_in; /* next input byte */ uInt avail_in; /* number of bytes available at next_in */ uLong total_in; /* total nb of input bytes read so far */ Bytef *next_out; /* next output byte should be put there */ uInt avail_out; /* remaining free space at next_out */ uLong total_out; /* total nb of bytes output so far */ char *msg; /* last error message, NULL if no error */ struct internal_state FAR *state; /* not visible by applications */ alloc_func zalloc; /* used to allocate the internal state */ free_func zfree; /* used to free the internal state */ voidpf opaque; /* private data object passed to zalloc and zfree */ int data_type; /* best guess about the data type: binary or text */ uLong adler; /* adler32 value of the uncompressed data */ uLong reserved; /* reserved for future use */ } z_stream; typedef z_stream FAR *z_streamp; /* gzip header information passed to and from zlib routines. See RFC 1952 for more details on the meanings of these fields. */ typedef struct gz_header_s { int text; /* true if compressed data believed to be text */ uLong time; /* modification time */ int xflags; /* extra flags (not used when writing a gzip file) */ int os; /* operating system */ Bytef *extra; /* pointer to extra field or Z_NULL if none */ uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ uInt extra_max; /* space at extra (only when reading header) */ Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ uInt name_max; /* space at name (only when reading header) */ Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ uInt comm_max; /* space at comment (only when reading header) */ int hcrc; /* true if there was or will be a header crc */ int done; /* true when done reading gzip header (not used when writing a gzip file) */ } gz_header; typedef gz_header FAR *gz_headerp; /* The application must update next_in and avail_in when avail_in has dropped to zero. It must update next_out and avail_out when avail_out has dropped to zero. The application must initialize zalloc, zfree and opaque before calling the init function. All other fields are set by the compression library and must not be updated by the application. The opaque value provided by the application will be passed as the first parameter for calls of zalloc and zfree. This can be useful for custom memory management. The compression library attaches no meaning to the opaque value. zalloc must return Z_NULL if there is not enough memory for the object. If zlib is used in a multi-threaded application, zalloc and zfree must be thread safe. On 16-bit systems, the functions zalloc and zfree must be able to allocate exactly 65536 bytes, but will not be required to allocate more than this if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers returned by zalloc for objects of exactly 65536 bytes *must* have their offset normalized to zero. The default allocation function provided by this library ensures this (see zutil.c). To reduce memory requirements and avoid any allocation of 64K objects, at the expense of compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). The fields total_in and total_out can be used for statistics or progress reports. After compression, total_in holds the total size of the uncompressed data and may be saved for use in the decompressor (particularly if the decompressor wants to decompress everything in a single step). */ /* constants */ #define Z_NO_FLUSH 0 #define Z_PARTIAL_FLUSH 1 #define Z_SYNC_FLUSH 2 #define Z_FULL_FLUSH 3 #define Z_FINISH 4 #define Z_BLOCK 5 #define Z_TREES 6 /* Allowed flush values; see deflate() and inflate() below for details */ #define Z_OK 0 #define Z_STREAM_END 1 #define Z_NEED_DICT 2 #define Z_ERRNO (-1) #define Z_STREAM_ERROR (-2) #define Z_DATA_ERROR (-3) #define Z_MEM_ERROR (-4) #define Z_BUF_ERROR (-5) #define Z_VERSION_ERROR (-6) /* Return codes for the compression/decompression functions. Negative values * are errors, positive values are used for special but normal events. */ #define Z_NO_COMPRESSION 0 #define Z_BEST_SPEED 1 #define Z_BEST_COMPRESSION 9 #define Z_DEFAULT_COMPRESSION (-1) /* compression levels */ #define Z_FILTERED 1 #define Z_HUFFMAN_ONLY 2 #define Z_RLE 3 #define Z_FIXED 4 #define Z_DEFAULT_STRATEGY 0 /* compression strategy; see deflateInit2() below for details */ #define Z_BINARY 0 #define Z_TEXT 1 #define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ #define Z_UNKNOWN 2 /* Possible values of the data_type field (though see inflate()) */ #define Z_DEFLATED 8 /* The deflate compression method (the only one supported in this version) */ #define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ #define zlib_version zlibVersion() /* for compatibility with versions < 1.0.2 */ /* basic functions */ ZEXTERN const char * ZEXPORT zlibVersion OF((void)); /* The application can compare zlibVersion and ZLIB_VERSION for consistency. If the first character differs, the library code actually used is not compatible with the zlib.h header file used by the application. This check is automatically made by deflateInit and inflateInit. */ /* ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); Initializes the internal stream state for compression. The fields zalloc, zfree and opaque must be initialized before by the caller. If zalloc and zfree are set to Z_NULL, deflateInit updates them to use default allocation functions. The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: 1 gives best speed, 9 gives best compression, 0 gives no compression at all (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION requests a default compromise between speed and compression (currently equivalent to level 6). deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_STREAM_ERROR if level is not a valid compression level, or Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible with the version assumed by the caller (ZLIB_VERSION). msg is set to null if there is no error message. deflateInit does not perform any compression: this will be done by deflate(). */ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); /* deflate compresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. It may introduce some output latency (reading input without producing any output) except when forced to flush. The detailed semantics are as follows. deflate performs one or both of the following actions: - Compress more input starting at next_in and update next_in and avail_in accordingly. If not all input can be processed (because there is not enough room in the output buffer), next_in and avail_in are updated and processing will resume at this point for the next call of deflate(). - Provide more output starting at next_out and update next_out and avail_out accordingly. This action is forced if the parameter flush is non zero. Forcing flush frequently degrades the compression ratio, so this parameter should be set only when necessary (in interactive applications). Some output may be provided even if flush is not set. Before the call of deflate(), the application should ensure that at least one of the actions is possible, by providing more input and/or consuming more output, and updating avail_in or avail_out accordingly; avail_out should never be zero before the call. The application can consume the compressed output when it wants, for example when the output buffer is full (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK and with zero avail_out, it must be called again after making room in the output buffer because there might be more output pending. Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to decide how much data to accumulate before producing output, in order to maximize compression. If the parameter flush is set to Z_SYNC_FLUSH, all pending output is flushed to the output buffer and the output is aligned on a byte boundary, so that the decompressor can get all input data available so far. (In particular avail_in is zero after the call if enough output space has been provided before the call.) Flushing may degrade compression for some compression algorithms and so it should be used only when necessary. This completes the current deflate block and follows it with an empty stored block that is three bits plus filler bits to the next byte, followed by four bytes (00 00 ff ff). If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the output buffer, but the output is not aligned to a byte boundary. All of the input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. This completes the current deflate block and follows it with an empty fixed codes block that is 10 bits long. This assures that enough bytes are output in order for the decompressor to finish the block before the empty fixed code block. If flush is set to Z_BLOCK, a deflate block is completed and emitted, as for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to seven bits of the current block are held to be written as the next byte after the next deflate block is completed. In this case, the decompressor may not be provided enough bits at this point in order to complete decompression of the data provided so far to the compressor. It may need to wait for the next block to be emitted. This is for advanced applications that need to control the emission of deflate blocks. If flush is set to Z_FULL_FLUSH, all output is flushed as with Z_SYNC_FLUSH, and the compression state is reset so that decompression can restart from this point if previous compressed data has been damaged or if random access is desired. Using Z_FULL_FLUSH too often can seriously degrade compression. If deflate returns with avail_out == 0, this function must be called again with the same value of the flush parameter and more output space (updated avail_out), until the flush is complete (deflate returns with non-zero avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that avail_out is greater than six to avoid repeated flush markers due to avail_out == 0 on return. If the parameter flush is set to Z_FINISH, pending input is processed, pending output is flushed and deflate returns with Z_STREAM_END if there was enough output space; if deflate returns with Z_OK, this function must be called again with Z_FINISH and more output space (updated avail_out) but no more input data, until it returns with Z_STREAM_END or an error. After deflate has returned Z_STREAM_END, the only possible operations on the stream are deflateReset or deflateEnd. Z_FINISH can be used immediately after deflateInit if all the compression is to be done in a single step. In this case, avail_out must be at least the value returned by deflateBound (see below). If deflate does not return Z_STREAM_END, then it must be called again as described above. deflate() sets strm->adler to the adler32 checksum of all input read so far (that is, total_in bytes). deflate() may update strm->data_type if it can make a good guess about the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered binary. This field is only for information purposes and does not affect the compression algorithm in any manner. deflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if all input has been consumed and all output has been produced (only when flush is set to Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and deflate() can be called again with more input and more output space to continue compressing. */ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); /* All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any pending output. deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state was inconsistent, Z_DATA_ERROR if the stream was freed prematurely (some input or output was discarded). In the error case, msg may be set but then points to a static string (which must not be deallocated). */ /* ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); Initializes the internal stream state for decompression. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by the caller. If next_in is not Z_NULL and avail_in is large enough (the exact value depends on the compression method), inflateInit determines the compression method from the zlib header and allocates all data structures accordingly; otherwise the allocation will be deferred to the first call of inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to use default allocation functions. inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the version assumed by the caller, or Z_STREAM_ERROR if the parameters are invalid, such as a null pointer to the structure. msg is set to null if there is no error message. inflateInit does not perform any decompression apart from possibly reading the zlib header if present: actual decompression will be done by inflate(). (So next_in and avail_in may be modified, but next_out and avail_out are unused and unchanged.) The current implementation of inflateInit() does not process any header information -- that is deferred until inflate() is called. */ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); /* inflate decompresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. It may introduce some output latency (reading input without producing any output) except when forced to flush. The detailed semantics are as follows. inflate performs one or both of the following actions: - Decompress more input starting at next_in and update next_in and avail_in accordingly. If not all input can be processed (because there is not enough room in the output buffer), next_in is updated and processing will resume at this point for the next call of inflate(). - Provide more output starting at next_out and update next_out and avail_out accordingly. inflate() provides as much output as possible, until there is no more input data or no more space in the output buffer (see below about the flush parameter). Before the call of inflate(), the application should ensure that at least one of the actions is possible, by providing more input and/or consuming more output, and updating the next_* and avail_* values accordingly. The application can consume the uncompressed output when it wants, for example when the output buffer is full (avail_out == 0), or after each call of inflate(). If inflate returns Z_OK and with zero avail_out, it must be called again after making room in the output buffer because there might be more output pending. The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much output as possible to the output buffer. Z_BLOCK requests that inflate() stop if and when it gets to the next deflate block boundary. When decoding the zlib or gzip format, this will cause inflate() to return immediately after the header and before the first block. When doing a raw inflate, inflate() will go ahead and process the first block, and will return when it gets to the end of that block, or when it runs out of data. The Z_BLOCK option assists in appending to or combining deflate streams. Also to assist in this, on return inflate() will set strm->data_type to the number of unused bits in the last byte taken from strm->next_in, plus 64 if inflate() is currently decoding the last block in the deflate stream, plus 128 if inflate() returned immediately after decoding an end-of-block code or decoding the complete header up to just before the first byte of the deflate stream. The end-of-block will not be indicated until all of the uncompressed data from that block has been written to strm->next_out. The number of unused bits may in general be greater than seven, except when bit 7 of data_type is set, in which case the number of unused bits will be less than eight. data_type is set as noted here every time inflate() returns for all flush options, and so can be used to determine the amount of currently consumed input in bits. The Z_TREES option behaves as Z_BLOCK does, but it also returns when the end of each deflate block header is reached, before any actual data in that block is decoded. This allows the caller to determine the length of the deflate block header for later use in random access within a deflate block. 256 is added to the value of strm->data_type when inflate() returns immediately after reaching the end of the deflate block header. inflate() should normally be called until it returns Z_STREAM_END or an error. However if all decompression is to be performed in a single step (a single call of inflate), the parameter flush should be set to Z_FINISH. In this case all pending input is processed and all pending output is flushed; avail_out must be large enough to hold all the uncompressed data. (The size of the uncompressed data may have been saved by the compressor for this purpose.) The next operation on this stream must be inflateEnd to deallocate the decompression state. The use of Z_FINISH is never required, but can be used to inform inflate that a faster approach may be used for the single inflate() call. In this implementation, inflate() always flushes as much output as possible to the output buffer, and always uses the faster approach on the first call. So the only effect of the flush parameter in this implementation is on the return value of inflate(), as noted below, or when it returns early because Z_BLOCK or Z_TREES is used. If a preset dictionary is needed after this call (see inflateSetDictionary below), inflate sets strm->adler to the adler32 checksum of the dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise it sets strm->adler to the adler32 checksum of all output produced so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described below. At the end of the stream, inflate() checks that its computed adler32 checksum is equal to that saved by the compressor and returns Z_STREAM_END only if the checksum is correct. inflate() can decompress and check either zlib-wrapped or gzip-wrapped deflate data. The header type is detected automatically, if requested when initializing with inflateInit2(). Any information contained in the gzip header is not retained, so applications that need that information should instead use raw inflate, see inflateInit2() below, or inflateBack() and perform their own processing of the gzip header and trailer. inflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if the end of the compressed data has been reached and all uncompressed output has been produced, Z_NEED_DICT if a preset dictionary is needed at this point, Z_DATA_ERROR if the input data was corrupted (input stream not conforming to the zlib format or incorrect check value), Z_STREAM_ERROR if the stream structure was inconsistent (for example next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if no progress is possible or if there was not enough room in the output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and inflate() can be called again with more input and more output space to continue decompressing. If Z_DATA_ERROR is returned, the application may then call inflateSync() to look for a good compression block if a partial recovery of the data is desired. */ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); /* All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any pending output. inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state was inconsistent. In the error case, msg may be set but then points to a static string (which must not be deallocated). */ /* Advanced functions */ /* The following functions are needed only in some special applications. */ /* ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy)); This is another version of deflateInit with more compression options. The fields next_in, zalloc, zfree and opaque must be initialized before by the caller. The method parameter is the compression method. It must be Z_DEFLATED in this version of the library. The windowBits parameter is the base two logarithm of the window size (the size of the history buffer). It should be in the range 8..15 for this version of the library. Larger values of this parameter result in better compression at the expense of memory usage. The default value is 15 if deflateInit is used instead. windowBits can also be -8..-15 for raw deflate. In this case, -windowBits determines the window size. deflate() will then generate raw deflate data with no zlib header or trailer, and will not compute an adler32 check value. windowBits can also be greater than 15 for optional gzip encoding. Add 16 to windowBits to write a simple gzip header and trailer around the compressed data instead of a zlib wrapper. The gzip header will have no file name, no extra data, no comment, no modification time (set to zero), no header crc, and the operating system will be set to 255 (unknown). If a gzip stream is being written, strm->adler is a crc32 instead of an adler32. The memLevel parameter specifies how much memory should be allocated for the internal compression state. memLevel=1 uses minimum memory but is slow and reduces compression ratio; memLevel=9 uses maximum memory for optimal speed. The default value is 8. See zconf.h for total memory usage as a function of windowBits and memLevel. The strategy parameter is used to tune the compression algorithm. Use the value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no string match), or Z_RLE to limit match distances to one (run-length encoding). Filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better. The effect of Z_FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications. deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible with the version assumed by the caller (ZLIB_VERSION). msg is set to null if there is no error message. deflateInit2 does not perform any compression: this will be done by deflate(). */ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, const Bytef *dictionary, uInt dictLength)); /* Initializes the compression dictionary from the given byte sequence without producing any compressed output. This function must be called immediately after deflateInit, deflateInit2 or deflateReset, before any call of deflate. The compressor and decompressor must use exactly the same dictionary (see inflateSetDictionary). The dictionary should consist of strings (byte sequences) that are likely to be encountered later in the data to be compressed, with the most commonly used strings preferably put towards the end of the dictionary. Using a dictionary is most useful when the data to be compressed is short and can be predicted with good accuracy; the data can then be compressed better than with the default empty dictionary. Depending on the size of the compression data structures selected by deflateInit or deflateInit2, a part of the dictionary may in effect be discarded, for example if the dictionary is larger than the window size provided in deflateInit or deflateInit2. Thus the strings most likely to be useful should be put at the end of the dictionary, not at the front. In addition, the current implementation of deflate will use at most the window size minus 262 bytes of the provided dictionary. Upon return of this function, strm->adler is set to the adler32 value of the dictionary; the decompressor may later use this value to determine which dictionary has been used by the compressor. (The adler32 value applies to the whole dictionary even if only a subset of the dictionary is actually used by the compressor.) If a raw deflate was requested, then the adler32 value is not computed and strm->adler is not set. deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is inconsistent (for example if deflate has already been called for this stream or if the compression method is bsort). deflateSetDictionary does not perform any compression: this will be done by deflate(). */ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, z_streamp source)); /* Sets the destination stream as a complete copy of the source stream. This function can be useful when several compression strategies will be tried, for example when there are several ways of pre-processing the input data with a filter. The streams that will be discarded should then be freed by calling deflateEnd. Note that deflateCopy duplicates the internal compression state which can be quite large, so this strategy is slow and can consume lots of memory. deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc being Z_NULL). msg is left unchanged in both source and destination. */ ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); /* This function is equivalent to deflateEnd followed by deflateInit, but does not free and reallocate all the internal compression state. The stream will keep the same compression level and any other attributes that may have been set by deflateInit2. deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL). */ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, int level, int strategy)); /* Dynamically update the compression level and compression strategy. The interpretation of level and strategy is as in deflateInit2. This can be used to switch between compression and straight copy of the input data, or to switch to a different kind of input data requiring a different strategy. If the compression level is changed, the input available so far is compressed with the old level (and may be flushed); the new level will take effect only at the next call of deflate(). Before the call of deflateParams, the stream state must be set as for a call of deflate(), since the currently available input may have to be compressed and flushed. In particular, strm->avail_out must be non-zero. deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if strm->avail_out was zero. */ ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, int good_length, int max_lazy, int nice_length, int max_chain)); /* Fine tune deflate's internal compression parameters. This should only be used by someone who understands the algorithm used by zlib's deflate for searching for the best matching string, and even then only by the most fanatic optimizer trying to squeeze out the last compressed bit for their specific input data. Read the deflate.c source code for the meaning of the max_lazy, good_length, nice_length, and max_chain parameters. deflateTune() can be called after deflateInit() or deflateInit2(), and returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. */ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, uLong sourceLen)); /* deflateBound() returns an upper bound on the compressed size after deflation of sourceLen bytes. It must be called after deflateInit() or deflateInit2(), and after deflateSetHeader(), if used. This would be used to allocate an output buffer for deflation in a single pass, and so would be called before deflate(). */ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, int bits, int value)); /* deflatePrime() inserts bits in the deflate output stream. The intent is that this function is used to start off the deflate output with the bits leftover from a previous deflate stream when appending to it. As such, this function can only be used for raw deflate, and must be used before the first deflate() call after a deflateInit2() or deflateReset(). bits must be less than or equal to 16, and that many of the least significant bits of value will be inserted in the output. deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, gz_headerp head)); /* deflateSetHeader() provides gzip header information for when a gzip stream is requested by deflateInit2(). deflateSetHeader() may be called after deflateInit2() or deflateReset() and before the first call of deflate(). The text, time, os, extra field, name, and comment information in the provided gz_header structure are written to the gzip header (xflag is ignored -- the extra flags are set according to the compression level). The caller must assure that, if not Z_NULL, name and comment are terminated with a zero byte, and that if extra is not Z_NULL, that extra_len bytes are available there. If hcrc is true, a gzip header crc is included. Note that the current versions of the command-line version of gzip (up through version 1.3.x) do not support header crc's, and will report that it is a "multi-part gzip file" and give up. If deflateSetHeader is not used, the default gzip header has text false, the time set to zero, and os set to 255, with no extra, name, or comment fields. The gzip header is returned to the default state by deflateReset(). deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ /* ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, int windowBits)); This is another version of inflateInit with an extra parameter. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by the caller. The windowBits parameter is the base two logarithm of the maximum window size (the size of the history buffer). It should be in the range 8..15 for this version of the library. The default value is 15 if inflateInit is used instead. windowBits must be greater than or equal to the windowBits value provided to deflateInit2() while compressing, or it must be equal to 15 if deflateInit2() was not used. If a compressed stream with a larger window size is given as input, inflate() will return with the error code Z_DATA_ERROR instead of trying to allocate a larger window. windowBits can also be zero to request that inflate use the window size in the zlib header of the compressed stream. windowBits can also be -8..-15 for raw inflate. In this case, -windowBits determines the window size. inflate() will then process raw deflate data, not looking for a zlib or gzip header, not generating a check value, and not looking for any check values for comparison at the end of the stream. This is for use with other formats that use the deflate compressed data format such as zip. Those formats provide their own check values. If a custom format is developed using the raw deflate format for compressed data, it is recommended that a check value such as an adler32 or a crc32 be applied to the uncompressed data as is done in the zlib, gzip, and zip formats. For most applications, the zlib format should be used as is. Note that comments above on the use in deflateInit2() applies to the magnitude of windowBits. windowBits can also be greater than 15 for optional gzip decoding. Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection, or add 16 to decode only the gzip format (the zlib format will return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a crc32 instead of an adler32. inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the version assumed by the caller, or Z_STREAM_ERROR if the parameters are invalid, such as a null pointer to the structure. msg is set to null if there is no error message. inflateInit2 does not perform any decompression apart from possibly reading the zlib header if present: actual decompression will be done by inflate(). (So next_in and avail_in may be modified, but next_out and avail_out are unused and unchanged.) The current implementation of inflateInit2() does not process any header information -- that is deferred until inflate() is called. */ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, const Bytef *dictionary, uInt dictLength)); /* Initializes the decompression dictionary from the given uncompressed byte sequence. This function must be called immediately after a call of inflate, if that call returned Z_NEED_DICT. The dictionary chosen by the compressor can be determined from the adler32 value returned by that call of inflate. The compressor and decompressor must use exactly the same dictionary (see deflateSetDictionary). For raw inflate, this function can be called immediately after inflateInit2() or inflateReset() and before any call of inflate() to set the dictionary. The application must insure that the dictionary that was used for compression is provided. inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the expected one (incorrect adler32 value). inflateSetDictionary does not perform any decompression: this will be done by subsequent calls of inflate(). */ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); /* Skips invalid compressed data until a full flush point (see above the description of deflate with Z_FULL_FLUSH) can be found, or until all available input is skipped. No output is provided. inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. In the success case, the application may save the current current value of total_in which indicates where valid compressed data was found. In the error case, the application may repeatedly call inflateSync, providing more input each time, until success or end of the input data. */ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, z_streamp source)); /* Sets the destination stream as a complete copy of the source stream. This function can be useful when randomly accessing a large stream. The first pass through the stream can periodically record the inflate state, allowing restarting inflate at those points when randomly accessing the stream. inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc being Z_NULL). msg is left unchanged in both source and destination. */ ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); /* This function is equivalent to inflateEnd followed by inflateInit, but does not free and reallocate all the internal decompression state. The stream will keep attributes that may have been set by inflateInit2. inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL). */ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, int windowBits)); /* This function is the same as inflateReset, but it also permits changing the wrap and window size requests. The windowBits parameter is interpreted the same as it is for inflateInit2. inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL), or if the windowBits parameter is invalid. */ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, int bits, int value)); /* This function inserts bits in the inflate input stream. The intent is that this function is used to start inflating at a bit position in the middle of a byte. The provided bits will be used before any bytes are used from next_in. This function should only be used with raw inflate, and should be used before the first inflate() call after inflateInit2() or inflateReset(). bits must be less than or equal to 16, and that many of the least significant bits of value will be inserted in the input. If bits is negative, then the input stream bit buffer is emptied. Then inflatePrime() can be called again to put bits in the buffer. This is used to clear out bits leftover after feeding inflate a block description prior to feeding inflate codes. inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); /* This function returns two values, one in the lower 16 bits of the return value, and the other in the remaining upper bits, obtained by shifting the return value down 16 bits. If the upper value is -1 and the lower value is zero, then inflate() is currently decoding information outside of a block. If the upper value is -1 and the lower value is non-zero, then inflate is in the middle of a stored block, with the lower value equaling the number of bytes from the input remaining to copy. If the upper value is not -1, then it is the number of bits back from the current bit position in the input of the code (literal or length/distance pair) currently being processed. In that case the lower value is the number of bytes already emitted for that code. A code is being processed if inflate is waiting for more input to complete decoding of the code, or if it has completed decoding but is waiting for more output space to write the literal or match data. inflateMark() is used to mark locations in the input data for random access, which may be at bit positions, and to note those cases where the output of a code may span boundaries of random access blocks. The current location in the input stream can be determined from avail_in and data_type as noted in the description for the Z_BLOCK flush parameter for inflate. inflateMark returns the value noted above or -1 << 16 if the provided source stream state was inconsistent. */ ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, gz_headerp head)); /* inflateGetHeader() requests that gzip header information be stored in the provided gz_header structure. inflateGetHeader() may be called after inflateInit2() or inflateReset(), and before the first call of inflate(). As inflate() processes the gzip stream, head->done is zero until the header is completed, at which time head->done is set to one. If a zlib stream is being decoded, then head->done is set to -1 to indicate that there will be no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be used to force inflate() to return immediately after header processing is complete and before any actual data is decompressed. The text, time, xflags, and os fields are filled in with the gzip header contents. hcrc is set to true if there is a header CRC. (The header CRC was valid if done is set to one.) If extra is not Z_NULL, then extra_max contains the maximum number of bytes to write to extra. Once done is true, extra_len contains the actual extra field length, and extra contains the extra field, or that field truncated if extra_max is less than extra_len. If name is not Z_NULL, then up to name_max characters are written there, terminated with a zero unless the length is greater than name_max. If comment is not Z_NULL, then up to comm_max characters are written there, terminated with a zero unless the length is greater than comm_max. When any of extra, name, or comment are not Z_NULL and the respective field is not present in the header, then that field is set to Z_NULL to signal its absence. This allows the use of deflateSetHeader() with the returned structure to duplicate the header. However if those fields are set to allocated memory, then the application will need to save those pointers elsewhere so that they can be eventually freed. If inflateGetHeader is not used, then the header information is simply discarded. The header is always checked for validity, including the header CRC if present. inflateReset() will reset the process to discard the header information. The application would need to call inflateGetHeader() again to retrieve the header from the next gzip stream. inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ /* ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, unsigned char FAR *window)); Initialize the internal stream state for decompression using inflateBack() calls. The fields zalloc, zfree and opaque in strm must be initialized before the call. If zalloc and zfree are Z_NULL, then the default library- derived memory allocation routines are used. windowBits is the base two logarithm of the window size, in the range 8..15. window is a caller supplied buffer of that size. Except for special applications where it is assured that deflate was used with small window sizes, windowBits must be 15 and a 32K byte window must be supplied to be able to decompress general deflate streams. See inflateBack() for the usage of these routines. inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of the paramaters are invalid, Z_MEM_ERROR if the internal state could not be allocated, or Z_VERSION_ERROR if the version of the library does not match the version of the header file. */ typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, in_func in, void FAR *in_desc, out_func out, void FAR *out_desc)); /* inflateBack() does a raw inflate with a single call using a call-back interface for input and output. This is more efficient than inflate() for file i/o applications in that it avoids copying between the output and the sliding window by simply making the window itself the output buffer. This function trusts the application to not change the output buffer passed by the output function, at least until inflateBack() returns. inflateBackInit() must be called first to allocate the internal state and to initialize the state with the user-provided window buffer. inflateBack() may then be used multiple times to inflate a complete, raw deflate stream with each call. inflateBackEnd() is then called to free the allocated state. A raw deflate stream is one with no zlib or gzip header or trailer. This routine would normally be used in a utility that reads zip or gzip files and writes out uncompressed files. The utility would decode the header and process the trailer on its own, hence this routine expects only the raw deflate stream to decompress. This is different from the normal behavior of inflate(), which expects either a zlib or gzip header and trailer around the deflate stream. inflateBack() uses two subroutines supplied by the caller that are then called by inflateBack() for input and output. inflateBack() calls those routines until it reads a complete deflate stream and writes out all of the uncompressed data, or until it encounters an error. The function's parameters and return types are defined above in the in_func and out_func typedefs. inflateBack() will call in(in_desc, &buf) which should return the number of bytes of provided input, and a pointer to that input in buf. If there is no input available, in() must return zero--buf is ignored in that case--and inflateBack() will return a buffer error. inflateBack() will call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out() should return zero on success, or non-zero on failure. If out() returns non-zero, inflateBack() will return with an error. Neither in() nor out() are permitted to change the contents of the window provided to inflateBackInit(), which is also the buffer that out() uses to write from. The length written by out() will be at most the window size. Any non-zero amount of input may be provided by in(). For convenience, inflateBack() can be provided input on the first call by setting strm->next_in and strm->avail_in. If that input is exhausted, then in() will be called. Therefore strm->next_in must be initialized before calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in must also be initialized, and then if strm->avail_in is not zero, input will initially be taken from strm->next_in[0 .. strm->avail_in - 1]. The in_desc and out_desc parameters of inflateBack() is passed as the first parameter of in() and out() respectively when they are called. These descriptors can be optionally used to pass any information that the caller- supplied in() and out() functions need to do their job. On return, inflateBack() will set strm->next_in and strm->avail_in to pass back any unused input that was provided by the last in() call. The return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR if in() or out() returned an error, Z_DATA_ERROR if there was a format error in the deflate stream (in which case strm->msg is set to indicate the nature of the error), or Z_STREAM_ERROR if the stream was not properly initialized. In the case of Z_BUF_ERROR, an input or output error can be distinguished using strm->next_in which will be Z_NULL only if in() returned an error. If strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning non-zero. (in() will always be called before out(), so strm->next_in is assured to be defined if out() returns non-zero.) Note that inflateBack() cannot return Z_OK. */ ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); /* All memory allocated by inflateBackInit() is freed. inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream state was inconsistent. */ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); /* Return flags indicating compile-time options. Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: 1.0: size of uInt 3.2: size of uLong 5.4: size of voidpf (pointer) 7.6: size of z_off_t Compiler, assembler, and debug options: 8: DEBUG 9: ASMV or ASMINF -- use ASM code 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention 11: 0 (reserved) One-time table building (smaller code, but not thread-safe if true): 12: BUILDFIXED -- build static block decoding tables when needed 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed 14,15: 0 (reserved) Library content (indicates missing functionality): 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking deflate code when not needed) 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect and decode gzip streams (to avoid linking crc code) 18-19: 0 (reserved) Operation variations (changes in library functionality): 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate 21: FASTEST -- deflate algorithm with only one, lowest compression level 22,23: 0 (reserved) The sprintf variant used by gzprintf (zero is best): 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! 26: 0 = returns value, 1 = void -- 1 means inferred string length returned Remainder: 27-31: 0 (reserved) */ /* utility functions */ /* The following utility functions are implemented on top of the basic stream-oriented functions. To simplify the interface, some default options are assumed (compression level and memory usage, standard memory allocation functions). The source code of these utility functions can be modified if you need special options. */ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)); /* Compresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be at least the value returned by compressBound(sourceLen). Upon exit, destLen is the actual size of the compressed buffer. compress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer. */ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level)); /* Compresses the source buffer into the destination buffer. The level parameter has the same meaning as in deflateInit. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be at least the value returned by compressBound(sourceLen). Upon exit, destLen is the actual size of the compressed buffer. compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer, Z_STREAM_ERROR if the level parameter is invalid. */ ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); /* compressBound() returns an upper bound on the compressed size after compress() or compress2() on sourceLen bytes. It would be used before a compress() or compress2() call to allocate the destination buffer. */ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)); /* Decompresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be large enough to hold the entire uncompressed data. (The size of the uncompressed data must have been saved previously by the compressor and transmitted to the decompressor by some mechanism outside the scope of this compression library.) Upon exit, destLen is the actual size of the uncompressed buffer. uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. */ /* gzip file access functions */ /* This library supports reading and writing files in gzip (.gz) format with an interface similar to that of stdio, using the functions that start with "gz". The gzip format is different from the zlib format. gzip is a gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. */ typedef voidp gzFile; /* opaque gzip file descriptor */ /* ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); Opens a gzip (.gz) file for reading or writing. The mode parameter is as in fopen ("rb" or "wb") but can also include a compression level ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression as in "wb9F". (See the description of deflateInit2 for more information about the strategy parameter.) Also "a" can be used instead of "w" to request that the gzip stream that will be written be appended to the file. "+" will result in an error, since reading and writing to the same gzip file is not supported. gzopen can be used to read a file which is not in gzip format; in this case gzread will directly read from the file without decompression. gzopen returns NULL if the file could not be opened, if there was insufficient memory to allocate the gzFile state, or if an invalid mode was specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). errno can be checked to determine if the reason gzopen failed was that the file could not be opened. */ ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); /* gzdopen associates a gzFile with the file descriptor fd. File descriptors are obtained from calls like open, dup, creat, pipe or fileno (if the file has been previously opened with fopen). The mode parameter is as in gzopen. The next call of gzclose on the returned gzFile will also close the file descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, mode);. The duplicated descriptor should be saved to avoid a leak, since gzdopen does not close fd if it fails. gzdopen returns NULL if there was insufficient memory to allocate the gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not provided, or '+' was provided), or if fd is -1. The file descriptor is not used until the next gz* read, write, seek, or close operation, so gzdopen will not detect if fd is invalid (unless fd is -1). */ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); /* Set the internal buffer size used by this library's functions. The default buffer size is 8192 bytes. This function must be called after gzopen() or gzdopen(), and before any other calls that read or write the file. The buffer memory allocation is always deferred to the first read or write. Two buffers are allocated, either both of the specified size when writing, or one of the specified size and the other twice that size when reading. A larger buffer size of, for example, 64K or 128K bytes will noticeably increase the speed of decompression (reading). The new buffer size also affects the maximum length for gzprintf(). gzbuffer() returns 0 on success, or -1 on failure, such as being called too late. */ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); /* Dynamically update the compression level or strategy. See the description of deflateInit2 for the meaning of these parameters. gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not opened for writing. */ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); /* Reads the given number of uncompressed bytes from the compressed file. If the input file was not in gzip format, gzread copies the given number of bytes into the buffer. After reaching the end of a gzip stream in the input, gzread will continue to read, looking for another gzip stream, or failing that, reading the rest of the input file directly without decompression. The entire input file will be read if gzread is called until it returns less than the requested len. gzread returns the number of uncompressed bytes actually read, less than len for end of file, or -1 for error. */ ZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len)); /* Writes the given number of uncompressed bytes into the compressed file. gzwrite returns the number of uncompressed bytes written or 0 in case of error. */ ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); /* Converts, formats, and writes the arguments to the compressed file under control of the format string, as in fprintf. gzprintf returns the number of uncompressed bytes actually written, or 0 in case of error. The number of uncompressed bytes written is limited to 8191, or one less than the buffer size given to gzbuffer(). The caller should assure that this limit is not exceeded. If it is exceeded, then gzprintf() will return an error (0) with nothing written. In this case, there may also be a buffer overflow with unpredictable consequences, which is possible only if zlib was compiled with the insecure functions sprintf() or vsprintf() because the secure snprintf() or vsnprintf() functions were not available. This can be determined using zlibCompileFlags(). */ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); /* Writes the given null-terminated string to the compressed file, excluding the terminating null character. gzputs returns the number of characters written, or -1 in case of error. */ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); /* Reads bytes from the compressed file until len-1 characters are read, or a newline character is read and transferred to buf, or an end-of-file condition is encountered. If any characters are read or if len == 1, the string is terminated with a null character. If no characters are read due to an end-of-file or len < 1, then the buffer is left untouched. gzgets returns buf which is a null-terminated string, or it returns NULL for end-of-file or in case of error. If there was an error, the contents at buf are indeterminate. */ ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); /* Writes c, converted to an unsigned char, into the compressed file. gzputc returns the value that was written, or -1 in case of error. */ ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); /* Reads one byte from the compressed file. gzgetc returns this byte or -1 in case of end of file or error. */ ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); /* Push one character back onto the stream to be read as the first character on the next read. At least one character of push-back is allowed. gzungetc() returns the character pushed, or -1 on failure. gzungetc() will fail if c is -1, and may fail if a character has been pushed but not read yet. If gzungetc is used immediately after gzopen or gzdopen, at least the output buffer size of pushed characters is allowed. (See gzbuffer above.) The pushed character will be discarded if the stream is repositioned with gzseek() or gzrewind(). */ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); /* Flushes all pending output into the compressed file. The parameter flush is as in the deflate() function. The return value is the zlib error number (see function gzerror below). gzflush is only permitted when writing. If the flush parameter is Z_FINISH, the remaining data is written and the gzip stream is completed in the output. If gzwrite() is called again, a new gzip stream will be started in the output. gzread() is able to read such concatented gzip streams. gzflush should be called only when strictly necessary because it will degrade compression if called too often. */ /* ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, z_off_t offset, int whence)); Sets the starting position for the next gzread or gzwrite on the given compressed file. The offset represents a number of bytes in the uncompressed data stream. The whence parameter is defined as in lseek(2); the value SEEK_END is not supported. If the file is opened for reading, this function is emulated but can be extremely slow. If the file is opened for writing, only forward seeks are supported; gzseek then compresses a sequence of zeroes up to the new starting position. gzseek returns the resulting offset location as measured in bytes from the beginning of the uncompressed stream, or -1 in case of error, in particular if the file is opened for writing and the new starting position would be before the current position. */ ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); /* Rewinds the given file. This function is supported only for reading. gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) */ /* ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); Returns the starting position for the next gzread or gzwrite on the given compressed file. This position represents a number of bytes in the uncompressed data stream, and is zero when starting, even if appending or reading a gzip stream from the middle of a file using gzdopen(). gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) */ /* ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); Returns the current offset in the file being read or written. This offset includes the count of bytes that precede the gzip stream, for example when appending or when using gzdopen() for reading. When reading, the offset does not include as yet unused buffered input. This information can be used for a progress indicator. On error, gzoffset() returns -1. */ ZEXTERN int ZEXPORT gzeof OF((gzFile file)); /* Returns true (1) if the end-of-file indicator has been set while reading, false (0) otherwise. Note that the end-of-file indicator is set only if the read tried to go past the end of the input, but came up short. Therefore, just like feof(), gzeof() may return false even if there is no more data to read, in the event that the last read request was for the exact number of bytes remaining in the input file. This will happen if the input file size is an exact multiple of the buffer size. If gzeof() returns true, then the read functions will return no more data, unless the end-of-file indicator is reset by gzclearerr() and the input file has grown since the previous end of file was detected. */ ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); /* Returns true (1) if file is being copied directly while reading, or false (0) if file is a gzip stream being decompressed. This state can change from false to true while reading the input file if the end of a gzip stream is reached, but is followed by data that is not another gzip stream. If the input file is empty, gzdirect() will return true, since the input does not contain a gzip stream. If gzdirect() is used immediately after gzopen() or gzdopen() it will cause buffers to be allocated to allow reading the file to determine if it is a gzip file. Therefore if gzbuffer() is used, it should be called before gzdirect(). */ ZEXTERN int ZEXPORT gzclose OF((gzFile file)); /* Flushes all pending output if necessary, closes the compressed file and deallocates the (de)compression state. Note that once file is closed, you cannot call gzerror with file, since its structures have been deallocated. gzclose must not be called more than once on the same file, just as free must not be called more than once on the same allocation. gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a file operation error, or Z_OK on success. */ ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); /* Same as gzclose(), but gzclose_r() is only for use when reading, and gzclose_w() is only for use when writing or appending. The advantage to using these instead of gzclose() is that they avoid linking in zlib compression or decompression code that is not used when only reading or only writing respectively. If gzclose() is used, then both compression and decompression code will be included the application when linking to a static zlib library. */ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); /* Returns the error message for the last error which occurred on the given compressed file. errnum is set to zlib error number. If an error occurred in the file system and not in the compression library, errnum is set to Z_ERRNO and the application may consult errno to get the exact error code. The application must not modify the returned string. Future calls to this function may invalidate the previously returned string. If file is closed, then the string previously returned by gzerror will no longer be available. gzerror() should be used to distinguish errors from end-of-file for those functions above that do not distinguish those cases in their return values. */ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); /* Clears the error and end-of-file flags for file. This is analogous to the clearerr() function in stdio. This is useful for continuing to read a gzip file that is being written concurrently. */ /* checksum functions */ /* These functions are not related to compression but are exported anyway because they might be useful in applications using the compression library. */ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); /* Update a running Adler-32 checksum with the bytes buf[0..len-1] and return the updated checksum. If buf is Z_NULL, this function returns the required initial value for the checksum. An Adler-32 checksum is almost as reliable as a CRC32 but can be computed much faster. Usage example: uLong adler = adler32(0L, Z_NULL, 0); while (read_buffer(buffer, length) != EOF) { adler = adler32(adler, buffer, length); } if (adler != original_adler) error(); */ /* ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, z_off_t len2)); Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. */ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); /* Update a running CRC-32 with the bytes buf[0..len-1] and return the updated CRC-32. If buf is Z_NULL, this function returns the required initial value for the for the crc. Pre- and post-conditioning (one's complement) is performed within this function so it shouldn't be done by the application. Usage example: uLong crc = crc32(0L, Z_NULL, 0); while (read_buffer(buffer, length) != EOF) { crc = crc32(crc, buffer, length); } if (crc != original_crc) error(); */ /* ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); Combine two CRC-32 check values into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, CRC-32 check values were calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and len2. */ /* various hacks, don't look :) */ /* deflateInit and inflateInit are macros to allow checking the zlib version * and the compiler's view of z_stream: */ ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, const char *version, int stream_size)); ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, const char *version, int stream_size)); ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy, const char *version, int stream_size)); ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, const char *version, int stream_size)); ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, unsigned char FAR *window, const char *version, int stream_size)); #define deflateInit(strm, level) \ deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) #define inflateInit(strm) \ inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) #define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ (strategy), ZLIB_VERSION, sizeof(z_stream)) #define inflateInit2(strm, windowBits) \ inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) #define inflateBackInit(strm, windowBits, window) \ inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, sizeof(z_stream)) /* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if * both are true, the application gets the *64 functions, and the regular * functions are changed to 64 bits) -- in case these are set on systems * without large file support, _LFS64_LARGEFILE must also be true */ #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); #endif #if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0 # define gzopen gzopen64 # define gzseek gzseek64 # define gztell gztell64 # define gzoffset gzoffset64 # define adler32_combine adler32_combine64 # define crc32_combine crc32_combine64 # ifdef _LARGEFILE64_SOURCE ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); # endif #else ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); #endif /* hack for buggy compilers */ #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) struct internal_state {int dummy;}; #endif /* undocumented functions */ ZEXTERN const char * ZEXPORT zError OF((int)); ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); #ifdef __cplusplus } #endif #endif /* ZLIB_H */ astropy-1.1.1/cextern/cfitsio/drvrsmem.c0000644001134200020070000011306612602615520021240 0ustar embrayscience00000000000000/* S H A R E D M E M O R Y D R I V E R ======================================= by Jerzy.Borkowski@obs.unige.ch 09-Mar-98 : initial version 1.0 released 23-Mar-98 : shared_malloc now accepts new handle as an argument 23-Mar-98 : shmem://0, shmem://1, etc changed to shmem://h0, etc due to bug in url parser. 10-Apr-98 : code cleanup 13-May-99 : delayed initialization added, global table deleted on exit when no shmem segments remain, and last process terminates */ #ifdef HAVE_SHMEM_SERVICES #include "fitsio2.h" /* drvrsmem.h is included by it */ #include #include #include #include #include #include #include #if defined(unix) || defined(__unix__) || defined(__unix) #include #endif static int shared_kbase = 0; /* base for shared memory handles */ static int shared_maxseg = 0; /* max number of shared memory blocks */ static int shared_range = 0; /* max number of tried entries */ static int shared_fd = SHARED_INVALID; /* handle of global access lock file */ static int shared_gt_h = SHARED_INVALID; /* handle of global table segment */ static SHARED_LTAB *shared_lt = NULL; /* local table pointer */ static SHARED_GTAB *shared_gt = NULL; /* global table pointer */ static int shared_create_mode = 0666; /* permission flags for created objects */ static int shared_debug = 1; /* simple debugging tool, set to 0 to disable messages */ static int shared_init_called = 0; /* flag whether shared_init() has been called, used for delayed init */ /* static support routines prototypes */ static int shared_clear_entry(int idx); /* unconditionally clear entry */ static int shared_destroy_entry(int idx); /* unconditionally destroy sema & shseg and clear entry */ static int shared_mux(int idx, int mode); /* obtain exclusive access to specified segment */ static int shared_demux(int idx, int mode); /* free exclusive access to specified segment */ static int shared_process_count(int sem); /* valid only for time of invocation */ static int shared_delta_process(int sem, int delta); /* change number of processes hanging on segment */ static int shared_attach_process(int sem); static int shared_detach_process(int sem); static int shared_get_free_entry(int newhandle); /* get free entry in shared_key, or -1, entry is set rw locked */ static int shared_get_hash(long size, int idx);/* return hash value for malloc */ static long shared_adjust_size(long size); /* size must be >= 0 !!! */ static int shared_check_locked_index(int idx); /* verify that given idx is valid */ static int shared_map(int idx); /* map all tables for given idx, check for validity */ static int shared_validate(int idx, int mode); /* use intrnally inside crit.sect !!! */ /* support routines - initialization */ static int shared_clear_entry(int idx) /* unconditionally clear entry */ { if ((idx < 0) || (idx >= shared_maxseg)) return(SHARED_BADARG); shared_gt[idx].key = SHARED_INVALID; /* clear entries in global table */ shared_gt[idx].handle = SHARED_INVALID; shared_gt[idx].sem = SHARED_INVALID; shared_gt[idx].semkey = SHARED_INVALID; shared_gt[idx].nprocdebug = 0; shared_gt[idx].size = 0; shared_gt[idx].attr = 0; return(SHARED_OK); } static int shared_destroy_entry(int idx) /* unconditionally destroy sema & shseg and clear entry */ { int r, r2; union semun filler; if ((idx < 0) || (idx >= shared_maxseg)) return(SHARED_BADARG); r2 = r = SHARED_OK; filler.val = 0; /* this is to make cc happy (warning otherwise) */ if (SHARED_INVALID != shared_gt[idx].sem) r = semctl(shared_gt[idx].sem, 0, IPC_RMID, filler); /* destroy semaphore */ if (SHARED_INVALID != shared_gt[idx].handle) r2 = shmctl(shared_gt[idx].handle, IPC_RMID, 0); /* destroy shared memory segment */ if (SHARED_OK == r) r = r2; /* accumulate error code in r, free r2 */ r2 = shared_clear_entry(idx); return((SHARED_OK == r) ? r2 : r); } void shared_cleanup(void) /* this must (should) be called during exit/abort */ { int i, j, r, oktodelete, filelocked, segmentspresent; flock_t flk; struct shmid_ds ds; if (shared_debug) printf("shared_cleanup:"); if (NULL != shared_lt) { if (shared_debug) printf(" deleting segments:"); for (i=0; i>\n"); return; } int shared_init(int debug_msgs) /* initialize shared memory stuff, you have to call this routine once */ { int i; char buf[1000], *p; mode_t oldumask; shared_init_called = 1; /* tell everybody no need to call us for the 2nd time */ shared_debug = debug_msgs; /* set required debug mode */ if (shared_debug) printf("shared_init:"); shared_kbase = 0; /* adapt to current env. settings */ if (NULL != (p = getenv(SHARED_ENV_KEYBASE))) shared_kbase = atoi(p); if (0 == shared_kbase) shared_kbase = SHARED_KEYBASE; if (shared_debug) printf(" keybase=%d", shared_kbase); shared_maxseg = 0; if (NULL != (p = getenv(SHARED_ENV_MAXSEG))) shared_maxseg = atoi(p); if (0 == shared_maxseg) shared_maxseg = SHARED_MAXSEG; if (shared_debug) printf(" maxseg=%d", shared_maxseg); shared_range = 3 * shared_maxseg; if (SHARED_INVALID == shared_fd) /* create rw locking file (this file is never deleted) */ { if (shared_debug) printf(" lockfileinit="); sprintf(buf, "%s.%d.%d", SHARED_FDNAME, shared_kbase, shared_maxseg); oldumask = umask(0); shared_fd = open(buf, O_TRUNC | O_EXCL | O_CREAT | O_RDWR, shared_create_mode); umask(oldumask); if (SHARED_INVALID == shared_fd) /* or just open rw locking file, in case it already exists */ { shared_fd = open(buf, O_TRUNC | O_RDWR, shared_create_mode); if (SHARED_INVALID == shared_fd) return(SHARED_NOFILE); if (shared_debug) printf("slave"); } else { if (shared_debug) printf("master"); } } if (SHARED_INVALID == shared_gt_h) /* global table not attached, try to create it in shared memory */ { if (shared_debug) printf(" globalsharedtableinit="); shared_gt_h = shmget(shared_kbase, shared_maxseg * sizeof(SHARED_GTAB), IPC_CREAT | IPC_EXCL | shared_create_mode); /* try open as a master */ if (SHARED_INVALID == shared_gt_h) /* if failed, try to open as a slave */ { shared_gt_h = shmget(shared_kbase, shared_maxseg * sizeof(SHARED_GTAB), shared_create_mode); if (SHARED_INVALID == shared_gt_h) return(SHARED_IPCERR); /* means deleted ID residing in system, shared mem unusable ... */ shared_gt = (SHARED_GTAB *)shmat(shared_gt_h, 0, 0); /* attach segment */ if (((SHARED_GTAB *)SHARED_INVALID) == shared_gt) return(SHARED_IPCERR); if (shared_debug) printf("slave"); } else { shared_gt = (SHARED_GTAB *)shmat(shared_gt_h, 0, 0); /* attach segment */ if (((SHARED_GTAB *)SHARED_INVALID) == shared_gt) return(SHARED_IPCERR); for (i=0; i>\n"); return(SHARED_OK); } int shared_recover(int id) /* try to recover dormant segments after applic crash */ { int i, r, r2; if (NULL == shared_gt) return(SHARED_NOTINIT); /* not initialized */ if (NULL == shared_lt) return(SHARED_NOTINIT); /* not initialized */ r = SHARED_OK; for (i=0; i r2) || (0 == r2)) { if (shared_debug) printf("Bogus handle=%d nproc=%d sema=%d:", i, shared_gt[i].nprocdebug, r2); r = shared_destroy_entry(i); if (shared_debug) { printf("%s", r ? "error couldn't clear handle" : "handle cleared"); } } shared_demux(i, SHARED_RDWRITE); } return(r); /* table full */ } /* API routines - mutexes and locking */ static int shared_mux(int idx, int mode) /* obtain exclusive access to specified segment */ { flock_t flk; int r; if (0 == shared_init_called) /* delayed initialization */ { if (SHARED_OK != (r = shared_init(0))) return(r); } if (SHARED_INVALID == shared_fd) return(SHARED_NOTINIT); if ((idx < 0) || (idx >= shared_maxseg)) return(SHARED_BADARG); flk.l_type = ((mode & SHARED_RDWRITE) ? F_WRLCK : F_RDLCK); flk.l_whence = 0; flk.l_start = idx; flk.l_len = 1; if (shared_debug) printf(" [mux (%d): ", idx); if (-1 == fcntl(shared_fd, ((mode & SHARED_NOWAIT) ? F_SETLK : F_SETLKW), &flk)) { switch (errno) { case EAGAIN: ; case EACCES: if (shared_debug) printf("again]"); return(SHARED_AGAIN); default: if (shared_debug) printf("err]"); return(SHARED_IPCERR); } } if (shared_debug) printf("ok]"); return(SHARED_OK); } static int shared_demux(int idx, int mode) /* free exclusive access to specified segment */ { flock_t flk; if (SHARED_INVALID == shared_fd) return(SHARED_NOTINIT); if ((idx < 0) || (idx >= shared_maxseg)) return(SHARED_BADARG); flk.l_type = F_UNLCK; flk.l_whence = 0; flk.l_start = idx; flk.l_len = 1; if (shared_debug) printf(" [demux (%d): ", idx); if (-1 == fcntl(shared_fd, F_SETLKW, &flk)) { switch (errno) { case EAGAIN: ; case EACCES: if (shared_debug) printf("again]"); return(SHARED_AGAIN); default: if (shared_debug) printf("err]"); return(SHARED_IPCERR); } } if (shared_debug) printf("mode=%d ok]", mode); return(SHARED_OK); } static int shared_process_count(int sem) /* valid only for time of invocation */ { union semun su; su.val = 0; /* to force compiler not to give warning messages */ return(semctl(sem, 0, GETVAL, su)); /* su is unused here */ } static int shared_delta_process(int sem, int delta) /* change number of processes hanging on segment */ { struct sembuf sb; if (SHARED_INVALID == sem) return(SHARED_BADARG); /* semaphore not attached */ sb.sem_num = 0; sb.sem_op = delta; sb.sem_flg = SEM_UNDO; return((-1 == semop(sem, &sb, 1)) ? SHARED_IPCERR : SHARED_OK); } static int shared_attach_process(int sem) { if (shared_debug) printf(" [attach process]"); return(shared_delta_process(sem, 1)); } static int shared_detach_process(int sem) { if (shared_debug) printf(" [detach process]"); return(shared_delta_process(sem, -1)); } /* API routines - hashing and searching */ static int shared_get_free_entry(int newhandle) /* get newhandle, or -1, entry is set rw locked */ { if (NULL == shared_gt) return(-1); /* not initialized */ if (NULL == shared_lt) return(-1); /* not initialized */ if (newhandle < 0) return(-1); if (newhandle >= shared_maxseg) return(-1); if (shared_lt[newhandle].tcnt) return(-1); /* somebody (we) is using it */ if (shared_mux(newhandle, SHARED_NOWAIT | SHARED_RDWRITE)) return(-1); /* used by others */ if (SHARED_INVALID == shared_gt[newhandle].key) return(newhandle); /* we have found free slot, lock it and return index */ shared_demux(newhandle, SHARED_RDWRITE); if (shared_debug) printf("[free_entry - ERROR - entry unusable]"); return(-1); /* table full */ } static int shared_get_hash(long size, int idx) /* return hash value for malloc */ { static int counter = 0; int hash; hash = (counter + size * idx) % shared_range; counter = (counter + 1) % shared_range; return(hash); } static long shared_adjust_size(long size) /* size must be >= 0 !!! */ { return(((size + sizeof(BLKHEAD) + SHARED_GRANUL - 1) / SHARED_GRANUL) * SHARED_GRANUL); } /* API routines - core : malloc/realloc/free/attach/detach/lock/unlock */ int shared_malloc(long size, int mode, int newhandle) /* return idx or SHARED_INVALID */ { int h, i, r, idx, key; union semun filler; BLKHEAD *bp; if (0 == shared_init_called) /* delayed initialization */ { if (SHARED_OK != (r = shared_init(0))) return(r); } if (shared_debug) printf("malloc (size = %ld, mode = %d):", size, mode); if (size < 0) return(SHARED_INVALID); if (-1 == (idx = shared_get_free_entry(newhandle))) return(SHARED_INVALID); if (shared_debug) printf(" idx=%d", idx); for (i = 0; ; i++) { if (i >= shared_range) /* table full, signal error & exit */ { shared_demux(idx, SHARED_RDWRITE); return(SHARED_INVALID); } key = shared_kbase + ((i + shared_get_hash(size, idx)) % shared_range); if (shared_debug) printf(" key=%d", key); h = shmget(key, shared_adjust_size(size), IPC_CREAT | IPC_EXCL | shared_create_mode); if (shared_debug) printf(" handle=%d", h); if (SHARED_INVALID == h) continue; /* segment already accupied */ bp = (BLKHEAD *)shmat(h, 0, 0); /* try attach */ if (shared_debug) printf(" p=%p", bp); if (((BLKHEAD *)SHARED_INVALID) == bp) /* cannot attach, delete segment, try with another key */ { shmctl(h, IPC_RMID, 0); continue; } /* now create semaphor counting number of processes attached */ if (SHARED_INVALID == (shared_gt[idx].sem = semget(key, 1, IPC_CREAT | IPC_EXCL | shared_create_mode))) { shmdt((void *)bp); /* cannot create segment, delete everything */ shmctl(h, IPC_RMID, 0); continue; /* try with another key */ } if (shared_debug) printf(" sem=%d", shared_gt[idx].sem); if (shared_attach_process(shared_gt[idx].sem)) /* try attach process */ { semctl(shared_gt[idx].sem, 0, IPC_RMID, filler); /* destroy semaphore */ shmdt((char *)bp); /* detach shared mem segment */ shmctl(h, IPC_RMID, 0); /* destroy shared mem segment */ continue; /* try with another key */ } bp->s.tflag = BLOCK_SHARED; /* fill in data in segment's header (this is really not necessary) */ bp->s.ID[0] = SHARED_ID_0; bp->s.ID[1] = SHARED_ID_1; bp->s.handle = idx; /* used in yorick */ if (mode & SHARED_RESIZE) { if (shmdt((char *)bp)) r = SHARED_IPCERR; /* if segment is resizable, then detach segment */ shared_lt[idx].p = NULL; } else { shared_lt[idx].p = bp; } shared_lt[idx].tcnt = 1; /* one thread using segment */ shared_lt[idx].lkcnt = 0; /* no locks at the moment */ shared_lt[idx].seekpos = 0L; /* r/w pointer positioned at beg of block */ shared_gt[idx].handle = h; /* fill in data in global table */ shared_gt[idx].size = size; shared_gt[idx].attr = mode; shared_gt[idx].semkey = key; shared_gt[idx].key = key; shared_gt[idx].nprocdebug = 0; break; } shared_demux(idx, SHARED_RDWRITE); /* hope this will not fail */ return(idx); } int shared_attach(int idx) { int r, r2; if (SHARED_OK != (r = shared_mux(idx, SHARED_RDWRITE | SHARED_WAIT))) return(r); if (SHARED_OK != (r = shared_map(idx))) { shared_demux(idx, SHARED_RDWRITE); return(r); } if (shared_attach_process(shared_gt[idx].sem)) /* try attach process */ { shmdt((char *)(shared_lt[idx].p)); /* cannot attach process, detach everything */ shared_lt[idx].p = NULL; shared_demux(idx, SHARED_RDWRITE); return(SHARED_BADARG); } shared_lt[idx].tcnt++; /* one more thread is using segment */ if (shared_gt[idx].attr & SHARED_RESIZE) /* if resizeable, detach and return special pointer */ { if (shmdt((char *)(shared_lt[idx].p))) r = SHARED_IPCERR; /* if segment is resizable, then detach segment */ shared_lt[idx].p = NULL; } shared_lt[idx].seekpos = 0L; /* r/w pointer positioned at beg of block */ r2 = shared_demux(idx, SHARED_RDWRITE); return(r ? r : r2); } static int shared_check_locked_index(int idx) /* verify that given idx is valid */ { int r; if (0 == shared_init_called) /* delayed initialization */ { if (SHARED_OK != (r = shared_init(0))) return(r); } if ((idx < 0) || (idx >= shared_maxseg)) return(SHARED_BADARG); if (NULL == shared_lt[idx].p) return(SHARED_BADARG); /* NULL pointer, not attached ?? */ if (0 == shared_lt[idx].lkcnt) return(SHARED_BADARG); /* not locked ?? */ if ((SHARED_ID_0 != (shared_lt[idx].p)->s.ID[0]) || (SHARED_ID_1 != (shared_lt[idx].p)->s.ID[1]) || (BLOCK_SHARED != (shared_lt[idx].p)->s.tflag)) /* invalid data in segment */ return(SHARED_BADARG); return(SHARED_OK); } static int shared_map(int idx) /* map all tables for given idx, check for validity */ { int h; /* have to obtain excl. access before calling shared_map */ BLKHEAD *bp; if ((idx < 0) || (idx >= shared_maxseg)) return(SHARED_BADARG); if (SHARED_INVALID == shared_gt[idx].key) return(SHARED_BADARG); if (SHARED_INVALID == (h = shmget(shared_gt[idx].key, 1, shared_create_mode))) return(SHARED_BADARG); if (((BLKHEAD *)SHARED_INVALID) == (bp = (BLKHEAD *)shmat(h, 0, 0))) return(SHARED_BADARG); if ((SHARED_ID_0 != bp->s.ID[0]) || (SHARED_ID_1 != bp->s.ID[1]) || (BLOCK_SHARED != bp->s.tflag) || (h != shared_gt[idx].handle)) { shmdt((char *)bp); /* invalid segment, detach everything */ return(SHARED_BADARG); } if (shared_gt[idx].sem != semget(shared_gt[idx].semkey, 1, shared_create_mode)) /* check if sema is still there */ { shmdt((char *)bp); /* cannot attach semaphore, detach everything */ return(SHARED_BADARG); } shared_lt[idx].p = bp; /* store pointer to shmem data */ return(SHARED_OK); } static int shared_validate(int idx, int mode) /* use intrnally inside crit.sect !!! */ { int r; if (SHARED_OK != (r = shared_mux(idx, mode))) return(r); /* idx checked by shared_mux */ if (NULL == shared_lt[idx].p) if (SHARED_OK != (r = shared_map(idx))) { shared_demux(idx, mode); return(r); } if ((SHARED_ID_0 != (shared_lt[idx].p)->s.ID[0]) || (SHARED_ID_1 != (shared_lt[idx].p)->s.ID[1]) || (BLOCK_SHARED != (shared_lt[idx].p)->s.tflag)) { shared_demux(idx, mode); return(r); } return(SHARED_OK); } SHARED_P shared_realloc(int idx, long newsize) /* realloc shared memory segment */ { int h, key, i, r; BLKHEAD *bp; long transfersize; r = SHARED_OK; if (newsize < 0) return(NULL); if (shared_check_locked_index(idx)) return(NULL); if (0 == (shared_gt[idx].attr & SHARED_RESIZE)) return(NULL); if (-1 != shared_lt[idx].lkcnt) return(NULL); /* check for RW lock */ if (shared_adjust_size(shared_gt[idx].size) == shared_adjust_size(newsize)) { shared_gt[idx].size = newsize; return((SHARED_P)((shared_lt[idx].p) + 1)); } for (i = 0; ; i++) { if (i >= shared_range) return(NULL); /* table full, signal error & exit */ key = shared_kbase + ((i + shared_get_hash(newsize, idx)) % shared_range); h = shmget(key, shared_adjust_size(newsize), IPC_CREAT | IPC_EXCL | shared_create_mode); if (SHARED_INVALID == h) continue; /* segment already accupied */ bp = (BLKHEAD *)shmat(h, 0, 0); /* try attach */ if (((BLKHEAD *)SHARED_INVALID) == bp) /* cannot attach, delete segment, try with another key */ { shmctl(h, IPC_RMID, 0); continue; } *bp = *(shared_lt[idx].p); /* copy header, then data */ transfersize = ((newsize < shared_gt[idx].size) ? newsize : shared_gt[idx].size); if (transfersize > 0) memcpy((void *)(bp + 1), (void *)((shared_lt[idx].p) + 1), transfersize); if (shmdt((char *)(shared_lt[idx].p))) r = SHARED_IPCERR; /* try to detach old segment */ if (shmctl(shared_gt[idx].handle, IPC_RMID, 0)) if (SHARED_OK == r) r = SHARED_IPCERR; /* destroy old shared memory segment */ shared_gt[idx].size = newsize; /* signal new size */ shared_gt[idx].handle = h; /* signal new handle */ shared_gt[idx].key = key; /* signal new key */ shared_lt[idx].p = bp; break; } return((SHARED_P)(bp + 1)); } int shared_free(int idx) /* detach segment, if last process & !PERSIST, destroy segment */ { int cnt, r, r2; if (SHARED_OK != (r = shared_validate(idx, SHARED_RDWRITE | SHARED_WAIT))) return(r); if (SHARED_OK != (r = shared_detach_process(shared_gt[idx].sem))) /* update number of processes using segment */ { shared_demux(idx, SHARED_RDWRITE); return(r); } shared_lt[idx].tcnt--; /* update number of threads using segment */ if (shared_lt[idx].tcnt > 0) return(shared_demux(idx, SHARED_RDWRITE)); /* if more threads are using segment we are done */ if (shmdt((char *)(shared_lt[idx].p))) /* if, we are the last thread, try to detach segment */ { shared_demux(idx, SHARED_RDWRITE); return(SHARED_IPCERR); } shared_lt[idx].p = NULL; /* clear entry in local table */ shared_lt[idx].seekpos = 0L; /* r/w pointer positioned at beg of block */ if (-1 == (cnt = shared_process_count(shared_gt[idx].sem))) /* get number of processes hanging on segment */ { shared_demux(idx, SHARED_RDWRITE); return(SHARED_IPCERR); } if ((0 == cnt) && (0 == (shared_gt[idx].attr & SHARED_PERSIST))) r = shared_destroy_entry(idx); /* no procs on seg, destroy it */ r2 = shared_demux(idx, SHARED_RDWRITE); return(r ? r : r2); } SHARED_P shared_lock(int idx, int mode) /* lock given segment for exclusive access */ { int r; if (shared_mux(idx, mode)) return(NULL); /* idx checked by shared_mux */ if (0 != shared_lt[idx].lkcnt) /* are we already locked ?? */ if (SHARED_OK != (r = shared_map(idx))) { shared_demux(idx, mode); return(NULL); } if (NULL == shared_lt[idx].p) /* stupid pointer ?? */ if (SHARED_OK != (r = shared_map(idx))) { shared_demux(idx, mode); return(NULL); } if ((SHARED_ID_0 != (shared_lt[idx].p)->s.ID[0]) || (SHARED_ID_1 != (shared_lt[idx].p)->s.ID[1]) || (BLOCK_SHARED != (shared_lt[idx].p)->s.tflag)) { shared_demux(idx, mode); return(NULL); } if (mode & SHARED_RDWRITE) { shared_lt[idx].lkcnt = -1; shared_gt[idx].nprocdebug++; } else shared_lt[idx].lkcnt++; shared_lt[idx].seekpos = 0L; /* r/w pointer positioned at beg of block */ return((SHARED_P)((shared_lt[idx].p) + 1)); } int shared_unlock(int idx) /* unlock given segment, assumes seg is locked !! */ { int r, r2, mode; if (SHARED_OK != (r = shared_check_locked_index(idx))) return(r); if (shared_lt[idx].lkcnt > 0) { shared_lt[idx].lkcnt--; /* unlock read lock */ mode = SHARED_RDONLY; } else { shared_lt[idx].lkcnt = 0; /* unlock write lock */ shared_gt[idx].nprocdebug--; mode = SHARED_RDWRITE; } if (0 == shared_lt[idx].lkcnt) if (shared_gt[idx].attr & SHARED_RESIZE) { if (shmdt((char *)(shared_lt[idx].p))) r = SHARED_IPCERR; /* segment is resizable, then detach segment */ shared_lt[idx].p = NULL; /* signal detachment in local table */ } r2 = shared_demux(idx, mode); /* unlock segment, rest is only parameter checking */ return(r ? r : r2); } /* API routines - support and info routines */ int shared_attr(int idx) /* get the attributes of the shared memory segment */ { int r; if (shared_check_locked_index(idx)) return(SHARED_INVALID); r = shared_gt[idx].attr; return(r); } int shared_set_attr(int idx, int newattr) /* get the attributes of the shared memory segment */ { int r; if (shared_check_locked_index(idx)) return(SHARED_INVALID); if (-1 != shared_lt[idx].lkcnt) return(SHARED_INVALID); /* ADDED - check for RW lock */ r = shared_gt[idx].attr; shared_gt[idx].attr = newattr; return(r); } int shared_set_debug(int mode) /* set/reset debug mode */ { int r = shared_debug; shared_debug = mode; return(r); } int shared_set_createmode(int mode) /* set/reset debug mode */ { int r = shared_create_mode; shared_create_mode = mode; return(r); } int shared_list(int id) { int i, r; if (NULL == shared_gt) return(SHARED_NOTINIT); /* not initialized */ if (NULL == shared_lt) return(SHARED_NOTINIT); /* not initialized */ if (shared_debug) printf("shared_list:"); r = SHARED_OK; printf(" Idx Key Nproc Size Flags\n"); printf("==============================================\n"); for (i=0; i= SHARED_ERRBASE) { printf(" cannot clear PERSIST attribute"); } if (shared_free(i)) { printf(" delete failed\n"); } else { printf(" deleted\n"); } } if (shared_debug) printf(" done\n"); return(r); /* table full */ } /************************* CFITSIO DRIVER FUNCTIONS ***************************/ int smem_init(void) { return(0); } int smem_shutdown(void) { if (shared_init_called) shared_cleanup(); return(0); } int smem_setoptions(int option) { option = 0; return(0); } int smem_getoptions(int *options) { if (NULL == options) return(SHARED_NULPTR); *options = 0; return(0); } int smem_getversion(int *version) { if (NULL == version) return(SHARED_NULPTR); *version = 10; return(0); } int smem_open(char *filename, int rwmode, int *driverhandle) { int h, nitems, r; DAL_SHM_SEGHEAD *sp; if (NULL == filename) return(SHARED_NULPTR); if (NULL == driverhandle) return(SHARED_NULPTR); nitems = sscanf(filename, "h%d", &h); if (1 != nitems) return(SHARED_BADARG); if (SHARED_OK != (r = shared_attach(h))) return(r); if (NULL == (sp = (DAL_SHM_SEGHEAD *)shared_lock(h, ((READWRITE == rwmode) ? SHARED_RDWRITE : SHARED_RDONLY)))) { shared_free(h); return(SHARED_BADARG); } if ((h != sp->h) || (DAL_SHM_SEGHEAD_ID != sp->ID)) { shared_unlock(h); shared_free(h); return(SHARED_BADARG); } *driverhandle = h; return(0); } int smem_create(char *filename, int *driverhandle) { DAL_SHM_SEGHEAD *sp; int h, sz, nitems; if (NULL == filename) return(SHARED_NULPTR); /* currently ignored */ if (NULL == driverhandle) return(SHARED_NULPTR); nitems = sscanf(filename, "h%d", &h); if (1 != nitems) return(SHARED_BADARG); if (SHARED_INVALID == (h = shared_malloc(sz = 2880 + sizeof(DAL_SHM_SEGHEAD), SHARED_RESIZE | SHARED_PERSIST, h))) return(SHARED_NOMEM); if (NULL == (sp = (DAL_SHM_SEGHEAD *)shared_lock(h, SHARED_RDWRITE))) { shared_free(h); return(SHARED_BADARG); } sp->ID = DAL_SHM_SEGHEAD_ID; sp->h = h; sp->size = sz; sp->nodeidx = -1; *driverhandle = h; return(0); } int smem_close(int driverhandle) { int r; if (SHARED_OK != (r = shared_unlock(driverhandle))) return(r); return(shared_free(driverhandle)); } int smem_remove(char *filename) { int nitems, h, r; if (NULL == filename) return(SHARED_NULPTR); nitems = sscanf(filename, "h%d", &h); if (1 != nitems) return(SHARED_BADARG); if (0 == shared_check_locked_index(h)) /* are we locked ? */ { if (-1 != shared_lt[h].lkcnt) /* are we locked RO ? */ { if (SHARED_OK != (r = shared_unlock(h))) return(r); /* yes, so relock in RW */ if (NULL == shared_lock(h, SHARED_RDWRITE)) return(SHARED_BADARG); } } else /* not locked */ { if (SHARED_OK != (r = smem_open(filename, READWRITE, &h))) return(r); /* so open in RW mode */ } shared_set_attr(h, SHARED_RESIZE); /* delete PERSIST attribute */ return(smem_close(h)); /* detach segment (this will delete it) */ } int smem_size(int driverhandle, LONGLONG *size) { if (NULL == size) return(SHARED_NULPTR); if (shared_check_locked_index(driverhandle)) return(SHARED_INVALID); *size = (LONGLONG) (shared_gt[driverhandle].size - sizeof(DAL_SHM_SEGHEAD)); return(0); } int smem_flush(int driverhandle) { if (shared_check_locked_index(driverhandle)) return(SHARED_INVALID); return(0); } int smem_seek(int driverhandle, LONGLONG offset) { if (offset < 0) return(SHARED_BADARG); if (shared_check_locked_index(driverhandle)) return(SHARED_INVALID); shared_lt[driverhandle].seekpos = offset; return(0); } int smem_read(int driverhandle, void *buffer, long nbytes) { if (NULL == buffer) return(SHARED_NULPTR); if (shared_check_locked_index(driverhandle)) return(SHARED_INVALID); if (nbytes < 0) return(SHARED_BADARG); if ((shared_lt[driverhandle].seekpos + nbytes) > shared_gt[driverhandle].size) return(SHARED_BADARG); /* read beyond EOF */ memcpy(buffer, ((char *)(((DAL_SHM_SEGHEAD *)(shared_lt[driverhandle].p + 1)) + 1)) + shared_lt[driverhandle].seekpos, nbytes); shared_lt[driverhandle].seekpos += nbytes; return(0); } int smem_write(int driverhandle, void *buffer, long nbytes) { if (NULL == buffer) return(SHARED_NULPTR); if (shared_check_locked_index(driverhandle)) return(SHARED_INVALID); if (-1 != shared_lt[driverhandle].lkcnt) return(SHARED_INVALID); /* are we locked RW ? */ if (nbytes < 0) return(SHARED_BADARG); if ((unsigned long)(shared_lt[driverhandle].seekpos + nbytes) > (unsigned long)(shared_gt[driverhandle].size - sizeof(DAL_SHM_SEGHEAD))) { /* need to realloc shmem */ if (NULL == shared_realloc(driverhandle, shared_lt[driverhandle].seekpos + nbytes + sizeof(DAL_SHM_SEGHEAD))) return(SHARED_NOMEM); } memcpy(((char *)(((DAL_SHM_SEGHEAD *)(shared_lt[driverhandle].p + 1)) + 1)) + shared_lt[driverhandle].seekpos, buffer, nbytes); shared_lt[driverhandle].seekpos += nbytes; return(0); } #endif astropy-1.1.1/cextern/cfitsio/eval_l.c0000644001134200020070000016627312602615517020661 0ustar embrayscience00000000000000/* A lexical scanner generated by flex */ /* Scanner skeleton version: * $Header: /software/lheasoft/lheavc/hip/cfitsio/eval_l.c,v 3.47 2009/09/04 18:35:05 pence Exp $ */ #define FLEX_SCANNER #define FF_FLEX_MAJOR_VERSION 2 #define FF_FLEX_MINOR_VERSION 5 #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include #include /* Use prototypes in function declarations. */ #define FF_USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define FF_USE_CONST #else /* ! __cplusplus */ #if __STDC__ #define FF_USE_PROTOS #define FF_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch #pragma warn -use #include #include #define FF_USE_CONST #define FF_USE_PROTOS #endif #ifdef FF_USE_CONST #define ffconst const #else #define ffconst #endif #ifdef FF_USE_PROTOS #define FF_PROTO(proto) proto #else #define FF_PROTO(proto) () #endif /* Returned upon end-of-file. */ #define FF_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define FF_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN ff_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The FFSTATE alias is for lex * compatibility. */ #define FF_START ((ff_start - 1) / 2) #define FFSTATE FF_START /* Action number for EOF rule of a given start state. */ #define FF_STATE_EOF(state) (FF_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define FF_NEW_FILE ffrestart( ffin ) #define FF_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define FF_BUF_SIZE 16384 typedef struct ff_buffer_state *FF_BUFFER_STATE; extern int ffleng; extern FILE *ffin, *ffout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * ffless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the ffless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define ffless(n) \ do \ { \ /* Undo effects of setting up fftext. */ \ *ff_cp = ff_hold_char; \ FF_RESTORE_FF_MORE_OFFSET \ ff_c_buf_p = ff_cp = ff_bp + n - FF_MORE_ADJ; \ FF_DO_BEFORE_ACTION; /* set up fftext again */ \ } \ while ( 0 ) #define unput(c) ffunput( c, fftext_ptr ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int ff_size_t; struct ff_buffer_state { FILE *ff_input_file; char *ff_ch_buf; /* input buffer */ char *ff_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ ff_size_t ff_buf_size; /* Number of characters read into ff_ch_buf, not including EOB * characters. */ int ff_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int ff_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int ff_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int ff_at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int ff_fill_buffer; int ff_buffer_status; #define FF_BUFFER_NEW 0 #define FF_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as FF_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via ffrestart()), so that the user can continue scanning by * just pointing ffin at a new input file. */ #define FF_BUFFER_EOF_PENDING 2 }; static FF_BUFFER_STATE ff_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define FF_CURRENT_BUFFER ff_current_buffer /* ff_hold_char holds the character lost when fftext is formed. */ static char ff_hold_char; static int ff_n_chars; /* number of characters read into ff_ch_buf */ int ffleng; /* Points to current character in buffer. */ static char *ff_c_buf_p = (char *) 0; static int ff_init = 1; /* whether we need to initialize */ static int ff_start = 0; /* start state number */ /* Flag which is used to allow ffwrap()'s to do buffer switches * instead of setting up a fresh ffin. A bit of a hack ... */ static int ff_did_buffer_switch_on_eof; void ffrestart FF_PROTO(( FILE *input_file )); void ff_switch_to_buffer FF_PROTO(( FF_BUFFER_STATE new_buffer )); void ff_load_buffer_state FF_PROTO(( void )); FF_BUFFER_STATE ff_create_buffer FF_PROTO(( FILE *file, int size )); void ff_delete_buffer FF_PROTO(( FF_BUFFER_STATE b )); void ff_init_buffer FF_PROTO(( FF_BUFFER_STATE b, FILE *file )); void ff_flush_buffer FF_PROTO(( FF_BUFFER_STATE b )); #define FF_FLUSH_BUFFER ff_flush_buffer( ff_current_buffer ) FF_BUFFER_STATE ff_scan_buffer FF_PROTO(( char *base, ff_size_t size )); FF_BUFFER_STATE ff_scan_string FF_PROTO(( ffconst char *ff_str )); FF_BUFFER_STATE ff_scan_bytes FF_PROTO(( ffconst char *bytes, int len )); static void *ff_flex_alloc FF_PROTO(( ff_size_t )); static void *ff_flex_realloc FF_PROTO(( void *, ff_size_t )); static void ff_flex_free FF_PROTO(( void * )); #define ff_new_buffer ff_create_buffer #define ff_set_interactive(is_interactive) \ { \ if ( ! ff_current_buffer ) \ ff_current_buffer = ff_create_buffer( ffin, FF_BUF_SIZE ); \ ff_current_buffer->ff_is_interactive = is_interactive; \ } #define ff_set_bol(at_bol) \ { \ if ( ! ff_current_buffer ) \ ff_current_buffer = ff_create_buffer( ffin, FF_BUF_SIZE ); \ ff_current_buffer->ff_at_bol = at_bol; \ } #define FF_AT_BOL() (ff_current_buffer->ff_at_bol) typedef unsigned char FF_CHAR; FILE *ffin = (FILE *) 0, *ffout = (FILE *) 0; typedef int ff_state_type; extern char *fftext; #define fftext_ptr fftext static ff_state_type ff_get_previous_state FF_PROTO(( void )); static ff_state_type ff_try_NUL_trans FF_PROTO(( ff_state_type current_state )); static int ff_get_next_buffer FF_PROTO(( void )); static void ff_fatal_error FF_PROTO(( ffconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up fftext. */ #define FF_DO_BEFORE_ACTION \ fftext_ptr = ff_bp; \ ffleng = (int) (ff_cp - ff_bp); \ ff_hold_char = *ff_cp; \ *ff_cp = '\0'; \ ff_c_buf_p = ff_cp; #define FF_NUM_RULES 26 #define FF_END_OF_BUFFER 27 static ffconst short int ff_accept[160] = { 0, 0, 0, 27, 25, 1, 24, 15, 25, 25, 25, 25, 25, 25, 25, 7, 5, 21, 25, 20, 10, 10, 10, 10, 6, 10, 10, 10, 10, 10, 14, 10, 10, 10, 10, 10, 10, 10, 25, 1, 19, 0, 9, 0, 8, 0, 10, 17, 0, 0, 0, 0, 0, 0, 0, 14, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 5, 0, 23, 18, 22, 10, 10, 10, 2, 10, 10, 10, 4, 10, 10, 10, 10, 3, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 16, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 11, 10, 20, 21, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0 } ; static ffconst int ff_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, 6, 7, 1, 8, 9, 10, 11, 12, 13, 1, 13, 14, 1, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 1, 1, 18, 19, 20, 1, 1, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 30, 31, 30, 32, 33, 30, 34, 35, 30, 36, 37, 30, 30, 38, 30, 30, 1, 1, 1, 39, 40, 1, 41, 42, 23, 43, 44, 45, 46, 28, 47, 30, 30, 48, 30, 49, 50, 30, 51, 52, 30, 53, 54, 30, 30, 38, 30, 30, 1, 55, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static ffconst int ff_meta[56] = { 0, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1 } ; static ffconst short int ff_base[167] = { 0, 0, 0, 367, 368, 364, 368, 346, 359, 356, 355, 353, 351, 32, 347, 66, 103, 339, 44, 338, 25, 52, 316, 26, 315, 34, 133, 48, 61, 125, 368, 0, 29, 45, 60, 81, 82, 93, 299, 351, 368, 347, 368, 344, 343, 342, 368, 368, 339, 314, 315, 313, 294, 295, 293, 368, 121, 164, 307, 301, 70, 117, 43, 296, 276, 271, 58, 86, 79, 269, 152, 168, 181, 368, 368, 368, 151, 162, 0, 180, 189, 190, 191, 309, 196, 199, 205, 204, 211, 214, 207, 223, 224, 232, 238, 243, 245, 222, 246, 368, 311, 310, 279, 282, 278, 259, 262, 258, 252, 286, 295, 294, 293, 292, 291, 290, 267, 288, 258, 285, 284, 278, 270, 268, 259, 218, 252, 264, 272, 368, 251, 368, 368, 260, 280, 283, 236, 222, 230, 193, 184, 212, 208, 202, 173, 156, 368, 133, 126, 368, 104, 98, 119, 132, 80, 94, 92, 368, 78, 368, 323, 325, 329, 333, 68, 67, 337 } ; static ffconst short int ff_def[167] = { 0, 159, 1, 159, 159, 159, 159, 159, 160, 161, 162, 159, 163, 159, 159, 159, 159, 159, 159, 159, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 159, 165, 164, 164, 164, 164, 164, 164, 159, 159, 159, 160, 159, 166, 161, 162, 159, 159, 163, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 164, 164, 165, 164, 164, 164, 164, 26, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 159, 166, 166, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 164, 159, 159, 164, 164, 164, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 0, 159, 159, 159, 159, 159, 159, 159 } ; static ffconst short int ff_nxt[424] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 4, 14, 4, 15, 16, 16, 16, 17, 18, 19, 20, 21, 22, 22, 23, 24, 25, 26, 22, 22, 27, 28, 29, 22, 22, 24, 22, 22, 30, 31, 32, 21, 22, 33, 24, 34, 22, 35, 36, 37, 22, 22, 24, 22, 38, 49, 77, 50, 81, 80, 51, 73, 74, 75, 78, 78, 79, 115, 78, 82, 78, 76, 84, 78, 52, 116, 53, 90, 54, 56, 57, 57, 57, 85, 78, 86, 58, 78, 157, 79, 59, 78, 60, 87, 111, 91, 61, 62, 63, 78, 78, 120, 157, 92, 157, 112, 64, 88, 88, 65, 121, 66, 93, 67, 68, 69, 70, 71, 71, 71, 78, 78, 124, 158, 94, 96, 72, 72, 125, 122, 88, 97, 78, 95, 56, 108, 108, 108, 123, 88, 88, 113, 157, 156, 98, 72, 72, 83, 83, 83, 155, 154, 114, 83, 83, 83, 83, 83, 83, 89, 129, 153, 88, 152, 78, 56, 57, 57, 57, 146, 83, 129, 78, 83, 83, 83, 83, 83, 57, 57, 57, 70, 71, 71, 71, 130, 47, 72, 72, 129, 78, 72, 72, 127, 79, 128, 128, 128, 129, 129, 129, 78, 74, 75, 131, 129, 72, 72, 129, 73, 72, 72, 132, 129, 129, 146, 129, 79, 40, 78, 129, 47, 149, 129, 151, 88, 88, 99, 78, 78, 78, 129, 129, 129, 150, 78, 74, 75, 78, 133, 149, 129, 148, 78, 78, 131, 78, 129, 88, 134, 78, 73, 129, 78, 129, 129, 132, 147, 40, 99, 129, 78, 78, 78, 47, 99, 108, 108, 108, 129, 145, 78, 40, 146, 135, 72, 72, 78, 128, 128, 128, 132, 78, 73, 78, 78, 128, 128, 128, 129, 78, 131, 129, 47, 72, 72, 146, 75, 74, 78, 144, 99, 143, 40, 132, 73, 131, 75, 74, 142, 141, 140, 139, 138, 137, 136, 101, 101, 129, 78, 126, 119, 78, 41, 118, 41, 41, 44, 44, 45, 117, 45, 45, 48, 110, 48, 48, 100, 109, 100, 100, 107, 106, 105, 104, 103, 102, 42, 46, 159, 101, 42, 39, 99, 78, 78, 75, 73, 55, 42, 47, 46, 43, 42, 40, 39, 159, 3, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159 } ; static ffconst short int ff_chk[424] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 20, 13, 25, 23, 13, 18, 18, 18, 20, 23, 21, 62, 32, 25, 165, 164, 27, 25, 13, 62, 13, 32, 13, 15, 15, 15, 15, 27, 33, 28, 15, 27, 158, 21, 15, 21, 15, 28, 60, 33, 15, 15, 15, 34, 28, 66, 156, 34, 155, 60, 15, 37, 37, 15, 66, 15, 34, 15, 15, 15, 16, 16, 16, 16, 35, 36, 68, 154, 35, 36, 16, 16, 68, 67, 37, 36, 37, 35, 56, 56, 56, 56, 67, 29, 29, 61, 153, 152, 37, 16, 16, 26, 26, 26, 151, 150, 61, 26, 26, 26, 26, 26, 26, 29, 76, 148, 29, 147, 29, 70, 70, 70, 70, 145, 26, 77, 26, 26, 26, 26, 26, 26, 57, 57, 57, 71, 71, 71, 71, 77, 144, 57, 57, 79, 76, 71, 71, 72, 79, 72, 72, 72, 80, 81, 82, 77, 80, 81, 82, 84, 57, 57, 85, 84, 71, 71, 85, 87, 86, 143, 90, 79, 86, 79, 88, 142, 141, 89, 140, 88, 88, 89, 80, 81, 82, 97, 91, 92, 139, 84, 91, 92, 85, 87, 138, 93, 137, 87, 86, 93, 90, 94, 88, 90, 88, 94, 95, 89, 96, 98, 95, 136, 96, 98, 130, 97, 91, 92, 130, 126, 108, 108, 108, 133, 125, 93, 124, 133, 97, 108, 108, 94, 127, 127, 127, 123, 95, 122, 96, 98, 128, 128, 128, 134, 130, 121, 135, 134, 108, 108, 135, 120, 119, 133, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 107, 106, 105, 104, 103, 102, 101, 100, 83, 134, 69, 65, 135, 160, 64, 160, 160, 161, 161, 162, 63, 162, 162, 163, 59, 163, 163, 166, 58, 166, 166, 54, 53, 52, 51, 50, 49, 48, 45, 44, 43, 41, 39, 38, 24, 22, 19, 17, 14, 12, 11, 10, 9, 8, 7, 5, 3, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159 } ; static ff_state_type ff_last_accepting_state; static char *ff_last_accepting_cpos; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define ffmore() ffmore_used_but_not_detected #define FF_MORE_ADJ 0 #define FF_RESTORE_FF_MORE_OFFSET char *fftext; #line 1 "eval.l" #define INITIAL 0 #line 2 "eval.l" /************************************************************************/ /* */ /* CFITSIO Lexical Parser */ /* */ /* This file is one of 3 files containing code which parses an */ /* arithmetic expression and evaluates it in the context of an input */ /* FITS file table extension. The CFITSIO lexical parser is divided */ /* into the following 3 parts/files: the CFITSIO "front-end", */ /* eval_f.c, contains the interface between the user/CFITSIO and the */ /* real core of the parser; the FLEX interpreter, eval_l.c, takes the */ /* input string and parses it into tokens and identifies the FITS */ /* information required to evaluate the expression (ie, keywords and */ /* columns); and, the BISON grammar and evaluation routines, eval_y.c, */ /* receives the FLEX output and determines and performs the actual */ /* operations. The files eval_l.c and eval_y.c are produced from */ /* running flex and bison on the files eval.l and eval.y, respectively. */ /* (flex and bison are available from any GNU archive: see www.gnu.org) */ /* */ /* The grammar rules, rather than evaluating the expression in situ, */ /* builds a tree, or Nodal, structure mapping out the order of */ /* operations and expression dependencies. This "compilation" process */ /* allows for much faster processing of multiple rows. This technique */ /* was developed by Uwe Lammers of the XMM Science Analysis System, */ /* although the CFITSIO implementation is entirely code original. */ /* */ /* */ /* Modification History: */ /* */ /* Kent Blackburn c1992 Original parser code developed for the */ /* FTOOLS software package, in particular, */ /* the fselect task. */ /* Kent Blackburn c1995 BIT column support added */ /* Peter D Wilson Feb 1998 Vector column support added */ /* Peter D Wilson May 1998 Ported to CFITSIO library. User */ /* interface routines written, in essence */ /* making fselect, fcalc, and maketime */ /* capabilities available to all tools */ /* via single function calls. */ /* Peter D Wilson Jun 1998 Major rewrite of parser core, so as to */ /* create a run-time evaluation tree, */ /* inspired by the work of Uwe Lammers, */ /* resulting in a speed increase of */ /* 10-100 times. */ /* Peter D Wilson Jul 1998 gtifilter(a,b,c,d) function added */ /* Peter D Wilson Aug 1998 regfilter(a,b,c,d) function added */ /* Peter D Wilson Jul 1999 Make parser fitsfile-independent, */ /* allowing a purely vector-based usage */ /* */ /************************************************************************/ #include #include #include #ifdef sparc #include #else #include #endif #include "eval_defs.h" ParseData gParse; /* Global structure holding all parser information */ /***** Internal functions *****/ int ffGetVariable( char *varName, FFSTYPE *varVal ); static int find_variable( char *varName ); static int expr_read( char *buf, int nbytes ); /***** Definitions *****/ #define FF_NO_UNPUT /* Don't include FFUNPUT function */ #define FF_NEVER_INTERACTIVE 1 #define MAXCHR 256 #define MAXBIT 128 #define OCT_0 "000" #define OCT_1 "001" #define OCT_2 "010" #define OCT_3 "011" #define OCT_4 "100" #define OCT_5 "101" #define OCT_6 "110" #define OCT_7 "111" #define OCT_X "xxx" #define HEX_0 "0000" #define HEX_1 "0001" #define HEX_2 "0010" #define HEX_3 "0011" #define HEX_4 "0100" #define HEX_5 "0101" #define HEX_6 "0110" #define HEX_7 "0111" #define HEX_8 "1000" #define HEX_9 "1001" #define HEX_A "1010" #define HEX_B "1011" #define HEX_C "1100" #define HEX_D "1101" #define HEX_E "1110" #define HEX_F "1111" #define HEX_X "xxxx" /* MJT - 13 June 1996 read from buffer instead of stdin (as per old ftools.skel) */ #undef FF_INPUT #define FF_INPUT(buf,result,max_size) \ if ( (result = expr_read( (char *) buf, max_size )) < 0 ) \ FF_FATAL_ERROR( "read() in flex scanner failed" ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef FF_SKIP_FFWRAP #ifdef __cplusplus extern "C" int ffwrap FF_PROTO(( void )); #else extern int ffwrap FF_PROTO(( void )); #endif #endif #ifndef FF_NO_UNPUT static void ffunput FF_PROTO(( int c, char *buf_ptr )); #endif #ifndef fftext_ptr static void ff_flex_strncpy FF_PROTO(( char *, ffconst char *, int )); #endif #ifdef FF_NEED_STRLEN static int ff_flex_strlen FF_PROTO(( ffconst char * )); #endif #ifndef FF_NO_INPUT #ifdef __cplusplus static int ffinput FF_PROTO(( void )); #else static int input FF_PROTO(( void )); #endif #endif #if FF_STACK_USED static int ff_start_stack_ptr = 0; static int ff_start_stack_depth = 0; static int *ff_start_stack = 0; #ifndef FF_NO_PUSH_STATE static void ff_push_state FF_PROTO(( int new_state )); #endif #ifndef FF_NO_POP_STATE static void ff_pop_state FF_PROTO(( void )); #endif #ifndef FF_NO_TOP_STATE static int ff_top_state FF_PROTO(( void )); #endif #else #define FF_NO_PUSH_STATE 1 #define FF_NO_POP_STATE 1 #define FF_NO_TOP_STATE 1 #endif #ifdef FF_MALLOC_DECL FF_MALLOC_DECL #else #if __STDC__ #ifndef __cplusplus #include #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef FF_READ_BUF_SIZE #define FF_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( fftext, ffleng, 1, ffout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or FF_NULL, * is returned in "result". */ #ifndef FF_INPUT #define FF_INPUT(buf,result,max_size) \ if ( ff_current_buffer->ff_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( ffin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( ffin ) ) \ FF_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, ffin )) == 0) \ && ferror( ffin ) ) \ FF_FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "ffterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef ffterminate #define ffterminate() return FF_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef FF_START_STACK_INCR #define FF_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef FF_FATAL_ERROR #define FF_FATAL_ERROR(msg) ff_fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef FF_DECL #define FF_DECL int fflex FF_PROTO(( void )) #endif /* Code executed at the beginning of each rule, after fftext and ffleng * have been set up. */ #ifndef FF_USER_ACTION #define FF_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef FF_BREAK #define FF_BREAK break; #endif #define FF_RULE_SETUP \ FF_USER_ACTION FF_DECL { register ff_state_type ff_current_state; register char *ff_cp, *ff_bp; register int ff_act; #line 142 "eval.l" if ( ff_init ) { ff_init = 0; #ifdef FF_USER_INIT FF_USER_INIT; #endif if ( ! ff_start ) ff_start = 1; /* first start state */ if ( ! ffin ) ffin = stdin; if ( ! ffout ) ffout = stdout; if ( ! ff_current_buffer ) ff_current_buffer = ff_create_buffer( ffin, FF_BUF_SIZE ); ff_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { ff_cp = ff_c_buf_p; /* Support of fftext. */ *ff_cp = ff_hold_char; /* ff_bp points to the position in ff_ch_buf of the start of * the current run. */ ff_bp = ff_cp; ff_current_state = ff_start; ff_match: do { register FF_CHAR ff_c = ff_ec[FF_SC_TO_UI(*ff_cp)]; if ( ff_accept[ff_current_state] ) { ff_last_accepting_state = ff_current_state; ff_last_accepting_cpos = ff_cp; } while ( ff_chk[ff_base[ff_current_state] + ff_c] != ff_current_state ) { ff_current_state = (int) ff_def[ff_current_state]; if ( ff_current_state >= 160 ) ff_c = ff_meta[(unsigned int) ff_c]; } ff_current_state = ff_nxt[ff_base[ff_current_state] + (unsigned int) ff_c]; ++ff_cp; } while ( ff_base[ff_current_state] != 368 ); ff_find_action: ff_act = ff_accept[ff_current_state]; if ( ff_act == 0 ) { /* have to back up */ ff_cp = ff_last_accepting_cpos; ff_current_state = ff_last_accepting_state; ff_act = ff_accept[ff_current_state]; } FF_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( ff_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of FF_DO_BEFORE_ACTION */ *ff_cp = ff_hold_char; ff_cp = ff_last_accepting_cpos; ff_current_state = ff_last_accepting_state; goto ff_find_action; case 1: FF_RULE_SETUP #line 144 "eval.l" ; FF_BREAK case 2: FF_RULE_SETUP #line 145 "eval.l" { int len; len = strlen(fftext); while (fftext[len] == ' ') len--; len = len - 1; strncpy(fflval.str,&fftext[1],len); fflval.str[len] = '\0'; return( BITSTR ); } FF_BREAK case 3: FF_RULE_SETUP #line 155 "eval.l" { int len; char tmpstring[256]; char bitstring[256]; len = strlen(fftext); if (len >= 256) { char errMsg[100]; gParse.status = PARSE_SYNTAX_ERR; strcpy (errMsg,"Bit string exceeds maximum length: '"); strncat(errMsg, &(fftext[0]), 20); strcat (errMsg,"...'"); ffpmsg (errMsg); len = 0; } else { while (fftext[len] == ' ') len--; len = len - 1; strncpy(tmpstring,&fftext[1],len); } tmpstring[len] = '\0'; bitstring[0] = '\0'; len = 0; while ( tmpstring[len] != '\0') { switch ( tmpstring[len] ) { case '0': strcat(bitstring,OCT_0); break; case '1': strcat(bitstring,OCT_1); break; case '2': strcat(bitstring,OCT_2); break; case '3': strcat(bitstring,OCT_3); break; case '4': strcat(bitstring,OCT_4); break; case '5': strcat(bitstring,OCT_5); break; case '6': strcat(bitstring,OCT_6); break; case '7': strcat(bitstring,OCT_7); break; case 'x': case 'X': strcat(bitstring,OCT_X); break; } len++; } strcpy( fflval.str, bitstring ); return( BITSTR ); } FF_BREAK case 4: FF_RULE_SETUP #line 215 "eval.l" { int len; char tmpstring[256]; char bitstring[256]; len = strlen(fftext); if (len >= 256) { char errMsg[100]; gParse.status = PARSE_SYNTAX_ERR; strcpy (errMsg,"Hex string exceeds maximum length: '"); strncat(errMsg, &(fftext[0]), 20); strcat (errMsg,"...'"); ffpmsg (errMsg); len = 0; } else { while (fftext[len] == ' ') len--; len = len - 1; strncpy(tmpstring,&fftext[1],len); } tmpstring[len] = '\0'; bitstring[0] = '\0'; len = 0; while ( tmpstring[len] != '\0') { switch ( tmpstring[len] ) { case '0': strcat(bitstring,HEX_0); break; case '1': strcat(bitstring,HEX_1); break; case '2': strcat(bitstring,HEX_2); break; case '3': strcat(bitstring,HEX_3); break; case '4': strcat(bitstring,HEX_4); break; case '5': strcat(bitstring,HEX_5); break; case '6': strcat(bitstring,HEX_6); break; case '7': strcat(bitstring,HEX_7); break; case '8': strcat(bitstring,HEX_8); break; case '9': strcat(bitstring,HEX_9); break; case 'a': case 'A': strcat(bitstring,HEX_A); break; case 'b': case 'B': strcat(bitstring,HEX_B); break; case 'c': case 'C': strcat(bitstring,HEX_C); break; case 'd': case 'D': strcat(bitstring,HEX_D); break; case 'e': case 'E': strcat(bitstring,HEX_E); break; case 'f': case 'F': strcat(bitstring,HEX_F); break; case 'x': case 'X': strcat(bitstring,HEX_X); break; } len++; } strcpy( fflval.str, bitstring ); return( BITSTR ); } FF_BREAK case 5: FF_RULE_SETUP #line 306 "eval.l" { fflval.lng = atol(fftext); return( LONG ); } FF_BREAK case 6: FF_RULE_SETUP #line 310 "eval.l" { if ((fftext[0] == 't') || (fftext[0] == 'T')) fflval.log = 1; else fflval.log = 0; return( BOOLEAN ); } FF_BREAK case 7: FF_RULE_SETUP #line 317 "eval.l" { fflval.dbl = atof(fftext); return( DOUBLE ); } FF_BREAK case 8: FF_RULE_SETUP #line 321 "eval.l" { if( !strcasecmp(fftext,"#PI") ) { fflval.dbl = (double)(4) * atan((double)(1)); return( DOUBLE ); } else if( !strcasecmp(fftext,"#E") ) { fflval.dbl = exp((double)(1)); return( DOUBLE ); } else if( !strcasecmp(fftext,"#DEG") ) { fflval.dbl = ((double)4)*atan((double)1)/((double)180); return( DOUBLE ); } else if( !strcasecmp(fftext,"#ROW") ) { return( ROWREF ); } else if( !strcasecmp(fftext,"#NULL") ) { return( NULLREF ); } else if( !strcasecmp(fftext,"#SNULL") ) { return( SNULLREF ); } else { int len; if (fftext[1] == '$') { len = strlen(fftext) - 3; fflval.str[0] = '#'; strncpy(fflval.str+1,&fftext[2],len); fflval.str[len+1] = '\0'; fftext = fflval.str; } return( (*gParse.getData)(fftext, &fflval) ); } } FF_BREAK case 9: FF_RULE_SETUP #line 349 "eval.l" { int len; len = strlen(fftext) - 2; if (len >= MAX_STRLEN) { char errMsg[100]; gParse.status = PARSE_SYNTAX_ERR; strcpy (errMsg,"String exceeds maximum length: '"); strncat(errMsg, &(fftext[1]), 20); strcat (errMsg,"...'"); ffpmsg (errMsg); len = 0; } else { strncpy(fflval.str,&fftext[1],len); } fflval.str[len] = '\0'; return( STRING ); } FF_BREAK case 10: FF_RULE_SETUP #line 366 "eval.l" { int len,type; if (fftext[0] == '$') { len = strlen(fftext) - 2; strncpy(fflval.str,&fftext[1],len); fflval.str[len] = '\0'; fftext = fflval.str; } type = ffGetVariable(fftext, &fflval); return( type ); } FF_BREAK case 11: FF_RULE_SETUP #line 378 "eval.l" { char *fname; int len=0; fname = &fflval.str[0]; while( (fname[len]=toupper(fftext[len])) ) len++; if( FSTRCMP(fname,"BOX(")==0 || FSTRCMP(fname,"CIRCLE(")==0 || FSTRCMP(fname,"ELLIPSE(")==0 || FSTRCMP(fname,"NEAR(")==0 || FSTRCMP(fname,"ISNULL(")==0 ) /* Return type is always boolean */ return( BFUNCTION ); else if( FSTRCMP(fname,"GTIFILTER(")==0 ) return( GTIFILTER ); else if( FSTRCMP(fname,"REGFILTER(")==0 ) return( REGFILTER ); else if( FSTRCMP(fname,"STRSTR(")==0 ) return( IFUNCTION ); /* Returns integer */ else return( FUNCTION ); } FF_BREAK case 12: FF_RULE_SETUP #line 405 "eval.l" { return( INTCAST ); } FF_BREAK case 13: FF_RULE_SETUP #line 406 "eval.l" { return( FLTCAST ); } FF_BREAK case 14: FF_RULE_SETUP #line 407 "eval.l" { return( POWER ); } FF_BREAK case 15: FF_RULE_SETUP #line 408 "eval.l" { return( NOT ); } FF_BREAK case 16: FF_RULE_SETUP #line 409 "eval.l" { return( OR ); } FF_BREAK case 17: FF_RULE_SETUP #line 410 "eval.l" { return( AND ); } FF_BREAK case 18: FF_RULE_SETUP #line 411 "eval.l" { return( EQ ); } FF_BREAK case 19: FF_RULE_SETUP #line 412 "eval.l" { return( NE ); } FF_BREAK case 20: FF_RULE_SETUP #line 413 "eval.l" { return( GT ); } FF_BREAK case 21: FF_RULE_SETUP #line 414 "eval.l" { return( LT ); } FF_BREAK case 22: FF_RULE_SETUP #line 415 "eval.l" { return( GTE ); } FF_BREAK case 23: FF_RULE_SETUP #line 416 "eval.l" { return( LTE ); } FF_BREAK case 24: FF_RULE_SETUP #line 417 "eval.l" { return( '\n' ); } FF_BREAK case 25: FF_RULE_SETUP #line 418 "eval.l" { return( fftext[0] ); } FF_BREAK case 26: FF_RULE_SETUP #line 419 "eval.l" ECHO; FF_BREAK case FF_STATE_EOF(INITIAL): ffterminate(); case FF_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int ff_amount_of_matched_text = (int) (ff_cp - fftext_ptr) - 1; /* Undo the effects of FF_DO_BEFORE_ACTION. */ *ff_cp = ff_hold_char; FF_RESTORE_FF_MORE_OFFSET if ( ff_current_buffer->ff_buffer_status == FF_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed ffin at a new source and called * fflex(). If so, then we have to assure * consistency between ff_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ ff_n_chars = ff_current_buffer->ff_n_chars; ff_current_buffer->ff_input_file = ffin; ff_current_buffer->ff_buffer_status = FF_BUFFER_NORMAL; } /* Note that here we test for ff_c_buf_p "<=" to the position * of the first EOB in the buffer, since ff_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( ff_c_buf_p <= &ff_current_buffer->ff_ch_buf[ff_n_chars] ) { /* This was really a NUL. */ ff_state_type ff_next_state; ff_c_buf_p = fftext_ptr + ff_amount_of_matched_text; ff_current_state = ff_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * ff_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ ff_next_state = ff_try_NUL_trans( ff_current_state ); ff_bp = fftext_ptr + FF_MORE_ADJ; if ( ff_next_state ) { /* Consume the NUL. */ ff_cp = ++ff_c_buf_p; ff_current_state = ff_next_state; goto ff_match; } else { ff_cp = ff_c_buf_p; goto ff_find_action; } } else switch ( ff_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { ff_did_buffer_switch_on_eof = 0; if ( ffwrap() ) { /* Note: because we've taken care in * ff_get_next_buffer() to have set up * fftext, we can now set up * ff_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * FF_NULL, it'll still work - another * FF_NULL will get returned. */ ff_c_buf_p = fftext_ptr + FF_MORE_ADJ; ff_act = FF_STATE_EOF(FF_START); goto do_action; } else { if ( ! ff_did_buffer_switch_on_eof ) FF_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: ff_c_buf_p = fftext_ptr + ff_amount_of_matched_text; ff_current_state = ff_get_previous_state(); ff_cp = ff_c_buf_p; ff_bp = fftext_ptr + FF_MORE_ADJ; goto ff_match; case EOB_ACT_LAST_MATCH: ff_c_buf_p = &ff_current_buffer->ff_ch_buf[ff_n_chars]; ff_current_state = ff_get_previous_state(); ff_cp = ff_c_buf_p; ff_bp = fftext_ptr + FF_MORE_ADJ; goto ff_find_action; } break; } default: FF_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of fflex */ /* ff_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int ff_get_next_buffer() { register char *dest = ff_current_buffer->ff_ch_buf; register char *source = fftext_ptr; register int number_to_move, i; int ret_val; if ( ff_c_buf_p > &ff_current_buffer->ff_ch_buf[ff_n_chars + 1] ) FF_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( ff_current_buffer->ff_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( ff_c_buf_p - fftext_ptr - FF_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (ff_c_buf_p - fftext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( ff_current_buffer->ff_buffer_status == FF_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ ff_current_buffer->ff_n_chars = ff_n_chars = 0; else { int num_to_read = ff_current_buffer->ff_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef FF_USES_REJECT FF_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ FF_BUFFER_STATE b = ff_current_buffer; int ff_c_buf_p_offset = (int) (ff_c_buf_p - b->ff_ch_buf); if ( b->ff_is_our_buffer ) { int new_size = b->ff_buf_size * 2; if ( new_size <= 0 ) b->ff_buf_size += b->ff_buf_size / 8; else b->ff_buf_size *= 2; b->ff_ch_buf = (char *) /* Include room in for 2 EOB chars. */ ff_flex_realloc( (void *) b->ff_ch_buf, b->ff_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->ff_ch_buf = 0; if ( ! b->ff_ch_buf ) FF_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); ff_c_buf_p = &b->ff_ch_buf[ff_c_buf_p_offset]; num_to_read = ff_current_buffer->ff_buf_size - number_to_move - 1; #endif } if ( num_to_read > FF_READ_BUF_SIZE ) num_to_read = FF_READ_BUF_SIZE; /* Read in more data. */ FF_INPUT( (&ff_current_buffer->ff_ch_buf[number_to_move]), ff_n_chars, num_to_read ); ff_current_buffer->ff_n_chars = ff_n_chars; } if ( ff_n_chars == 0 ) { if ( number_to_move == FF_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; ffrestart( ffin ); } else { ret_val = EOB_ACT_LAST_MATCH; ff_current_buffer->ff_buffer_status = FF_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; ff_n_chars += number_to_move; ff_current_buffer->ff_ch_buf[ff_n_chars] = FF_END_OF_BUFFER_CHAR; ff_current_buffer->ff_ch_buf[ff_n_chars + 1] = FF_END_OF_BUFFER_CHAR; fftext_ptr = &ff_current_buffer->ff_ch_buf[0]; return ret_val; } /* ff_get_previous_state - get the state just before the EOB char was reached */ static ff_state_type ff_get_previous_state() { register ff_state_type ff_current_state; register char *ff_cp; ff_current_state = ff_start; for ( ff_cp = fftext_ptr + FF_MORE_ADJ; ff_cp < ff_c_buf_p; ++ff_cp ) { register FF_CHAR ff_c = (*ff_cp ? ff_ec[FF_SC_TO_UI(*ff_cp)] : 1); if ( ff_accept[ff_current_state] ) { ff_last_accepting_state = ff_current_state; ff_last_accepting_cpos = ff_cp; } while ( ff_chk[ff_base[ff_current_state] + ff_c] != ff_current_state ) { ff_current_state = (int) ff_def[ff_current_state]; if ( ff_current_state >= 160 ) ff_c = ff_meta[(unsigned int) ff_c]; } ff_current_state = ff_nxt[ff_base[ff_current_state] + (unsigned int) ff_c]; } return ff_current_state; } /* ff_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = ff_try_NUL_trans( current_state ); */ #ifdef FF_USE_PROTOS static ff_state_type ff_try_NUL_trans( ff_state_type ff_current_state ) #else static ff_state_type ff_try_NUL_trans( ff_current_state ) ff_state_type ff_current_state; #endif { register int ff_is_jam; register char *ff_cp = ff_c_buf_p; register FF_CHAR ff_c = 1; if ( ff_accept[ff_current_state] ) { ff_last_accepting_state = ff_current_state; ff_last_accepting_cpos = ff_cp; } while ( ff_chk[ff_base[ff_current_state] + ff_c] != ff_current_state ) { ff_current_state = (int) ff_def[ff_current_state]; if ( ff_current_state >= 160 ) ff_c = ff_meta[(unsigned int) ff_c]; } ff_current_state = ff_nxt[ff_base[ff_current_state] + (unsigned int) ff_c]; ff_is_jam = (ff_current_state == 159); return ff_is_jam ? 0 : ff_current_state; } #ifndef FF_NO_UNPUT #ifdef FF_USE_PROTOS static void ffunput( int c, register char *ff_bp ) #else static void ffunput( c, ff_bp ) int c; register char *ff_bp; #endif { register char *ff_cp = ff_c_buf_p; /* undo effects of setting up fftext */ *ff_cp = ff_hold_char; if ( ff_cp < ff_current_buffer->ff_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = ff_n_chars + 2; register char *dest = &ff_current_buffer->ff_ch_buf[ ff_current_buffer->ff_buf_size + 2]; register char *source = &ff_current_buffer->ff_ch_buf[number_to_move]; while ( source > ff_current_buffer->ff_ch_buf ) *--dest = *--source; ff_cp += (int) (dest - source); ff_bp += (int) (dest - source); ff_current_buffer->ff_n_chars = ff_n_chars = ff_current_buffer->ff_buf_size; if ( ff_cp < ff_current_buffer->ff_ch_buf + 2 ) FF_FATAL_ERROR( "flex scanner push-back overflow" ); } *--ff_cp = (char) c; fftext_ptr = ff_bp; ff_hold_char = *ff_cp; ff_c_buf_p = ff_cp; } #endif /* ifndef FF_NO_UNPUT */ #ifdef __cplusplus static int ffinput() #else static int input() #endif { int c; *ff_c_buf_p = ff_hold_char; if ( *ff_c_buf_p == FF_END_OF_BUFFER_CHAR ) { /* ff_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( ff_c_buf_p < &ff_current_buffer->ff_ch_buf[ff_n_chars] ) /* This was really a NUL. */ *ff_c_buf_p = '\0'; else { /* need more input */ int offset = ff_c_buf_p - fftext_ptr; ++ff_c_buf_p; switch ( ff_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because ff_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ ffrestart( ffin ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( ffwrap() ) return EOF; if ( ! ff_did_buffer_switch_on_eof ) FF_NEW_FILE; #ifdef __cplusplus return ffinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: ff_c_buf_p = fftext_ptr + offset; break; } } } c = *(unsigned char *) ff_c_buf_p; /* cast for 8-bit char's */ *ff_c_buf_p = '\0'; /* preserve fftext */ ff_hold_char = *++ff_c_buf_p; return c; } #ifdef FF_USE_PROTOS void ffrestart( FILE *input_file ) #else void ffrestart( input_file ) FILE *input_file; #endif { if ( ! ff_current_buffer ) ff_current_buffer = ff_create_buffer( ffin, FF_BUF_SIZE ); ff_init_buffer( ff_current_buffer, input_file ); ff_load_buffer_state(); } #ifdef FF_USE_PROTOS void ff_switch_to_buffer( FF_BUFFER_STATE new_buffer ) #else void ff_switch_to_buffer( new_buffer ) FF_BUFFER_STATE new_buffer; #endif { if ( ff_current_buffer == new_buffer ) return; if ( ff_current_buffer ) { /* Flush out information for old buffer. */ *ff_c_buf_p = ff_hold_char; ff_current_buffer->ff_buf_pos = ff_c_buf_p; ff_current_buffer->ff_n_chars = ff_n_chars; } ff_current_buffer = new_buffer; ff_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (ffwrap()) processing, but the only time this flag * is looked at is after ffwrap() is called, so it's safe * to go ahead and always set it. */ ff_did_buffer_switch_on_eof = 1; } #ifdef FF_USE_PROTOS void ff_load_buffer_state( void ) #else void ff_load_buffer_state() #endif { ff_n_chars = ff_current_buffer->ff_n_chars; fftext_ptr = ff_c_buf_p = ff_current_buffer->ff_buf_pos; ffin = ff_current_buffer->ff_input_file; ff_hold_char = *ff_c_buf_p; } #ifdef FF_USE_PROTOS FF_BUFFER_STATE ff_create_buffer( FILE *file, int size ) #else FF_BUFFER_STATE ff_create_buffer( file, size ) FILE *file; int size; #endif { FF_BUFFER_STATE b; b = (FF_BUFFER_STATE) ff_flex_alloc( sizeof( struct ff_buffer_state ) ); if ( ! b ) FF_FATAL_ERROR( "out of dynamic memory in ff_create_buffer()" ); b->ff_buf_size = size; /* ff_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->ff_ch_buf = (char *) ff_flex_alloc( b->ff_buf_size + 2 ); if ( ! b->ff_ch_buf ) FF_FATAL_ERROR( "out of dynamic memory in ff_create_buffer()" ); b->ff_is_our_buffer = 1; ff_init_buffer( b, file ); return b; } #ifdef FF_USE_PROTOS void ff_delete_buffer( FF_BUFFER_STATE b ) #else void ff_delete_buffer( b ) FF_BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == ff_current_buffer ) ff_current_buffer = (FF_BUFFER_STATE) 0; if ( b->ff_is_our_buffer ) ff_flex_free( (void *) b->ff_ch_buf ); ff_flex_free( (void *) b ); } #ifndef FF_ALWAYS_INTERACTIVE #ifndef FF_NEVER_INTERACTIVE extern int isatty FF_PROTO(( int )); #endif #endif #ifdef FF_USE_PROTOS void ff_init_buffer( FF_BUFFER_STATE b, FILE *file ) #else void ff_init_buffer( b, file ) FF_BUFFER_STATE b; FILE *file; #endif { ff_flush_buffer( b ); b->ff_input_file = file; b->ff_fill_buffer = 1; #if FF_ALWAYS_INTERACTIVE b->ff_is_interactive = 1; #else #if FF_NEVER_INTERACTIVE b->ff_is_interactive = 0; #else b->ff_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif } #ifdef FF_USE_PROTOS void ff_flush_buffer( FF_BUFFER_STATE b ) #else void ff_flush_buffer( b ) FF_BUFFER_STATE b; #endif { if ( ! b ) return; b->ff_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->ff_ch_buf[0] = FF_END_OF_BUFFER_CHAR; b->ff_ch_buf[1] = FF_END_OF_BUFFER_CHAR; b->ff_buf_pos = &b->ff_ch_buf[0]; b->ff_at_bol = 1; b->ff_buffer_status = FF_BUFFER_NEW; if ( b == ff_current_buffer ) ff_load_buffer_state(); } #ifndef FF_NO_SCAN_BUFFER #ifdef FF_USE_PROTOS FF_BUFFER_STATE ff_scan_buffer( char *base, ff_size_t size ) #else FF_BUFFER_STATE ff_scan_buffer( base, size ) char *base; ff_size_t size; #endif { FF_BUFFER_STATE b; if ( size < 2 || base[size-2] != FF_END_OF_BUFFER_CHAR || base[size-1] != FF_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (FF_BUFFER_STATE) ff_flex_alloc( sizeof( struct ff_buffer_state ) ); if ( ! b ) FF_FATAL_ERROR( "out of dynamic memory in ff_scan_buffer()" ); b->ff_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->ff_buf_pos = b->ff_ch_buf = base; b->ff_is_our_buffer = 0; b->ff_input_file = 0; b->ff_n_chars = b->ff_buf_size; b->ff_is_interactive = 0; b->ff_at_bol = 1; b->ff_fill_buffer = 0; b->ff_buffer_status = FF_BUFFER_NEW; ff_switch_to_buffer( b ); return b; } #endif #ifndef FF_NO_SCAN_STRING #ifdef FF_USE_PROTOS FF_BUFFER_STATE ff_scan_string( ffconst char *ff_str ) #else FF_BUFFER_STATE ff_scan_string( ff_str ) ffconst char *ff_str; #endif { int len; for ( len = 0; ff_str[len]; ++len ) ; return ff_scan_bytes( ff_str, len ); } #endif #ifndef FF_NO_SCAN_BYTES #ifdef FF_USE_PROTOS FF_BUFFER_STATE ff_scan_bytes( ffconst char *bytes, int len ) #else FF_BUFFER_STATE ff_scan_bytes( bytes, len ) ffconst char *bytes; int len; #endif { FF_BUFFER_STATE b; char *buf; ff_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) ff_flex_alloc( n ); if ( ! buf ) FF_FATAL_ERROR( "out of dynamic memory in ff_scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = FF_END_OF_BUFFER_CHAR; b = ff_scan_buffer( buf, n ); if ( ! b ) FF_FATAL_ERROR( "bad buffer in ff_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->ff_is_our_buffer = 1; return b; } #endif #ifndef FF_NO_PUSH_STATE #ifdef FF_USE_PROTOS static void ff_push_state( int new_state ) #else static void ff_push_state( new_state ) int new_state; #endif { if ( ff_start_stack_ptr >= ff_start_stack_depth ) { ff_size_t new_size; ff_start_stack_depth += FF_START_STACK_INCR; new_size = ff_start_stack_depth * sizeof( int ); if ( ! ff_start_stack ) ff_start_stack = (int *) ff_flex_alloc( new_size ); else ff_start_stack = (int *) ff_flex_realloc( (void *) ff_start_stack, new_size ); if ( ! ff_start_stack ) FF_FATAL_ERROR( "out of memory expanding start-condition stack" ); } ff_start_stack[ff_start_stack_ptr++] = FF_START; BEGIN(new_state); } #endif #ifndef FF_NO_POP_STATE static void ff_pop_state() { if ( --ff_start_stack_ptr < 0 ) FF_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(ff_start_stack[ff_start_stack_ptr]); } #endif #ifndef FF_NO_TOP_STATE static int ff_top_state() { return ff_start_stack[ff_start_stack_ptr - 1]; } #endif #ifndef FF_EXIT_FAILURE #define FF_EXIT_FAILURE 2 #endif #ifdef FF_USE_PROTOS static void ff_fatal_error( ffconst char msg[] ) #else static void ff_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( FF_EXIT_FAILURE ); } /* Redefine ffless() so it works in section 3 code. */ #undef ffless #define ffless(n) \ do \ { \ /* Undo effects of setting up fftext. */ \ fftext[ffleng] = ff_hold_char; \ ff_c_buf_p = fftext + n; \ ff_hold_char = *ff_c_buf_p; \ *ff_c_buf_p = '\0'; \ ffleng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef fftext_ptr #ifdef FF_USE_PROTOS static void ff_flex_strncpy( char *s1, ffconst char *s2, int n ) #else static void ff_flex_strncpy( s1, s2, n ) char *s1; ffconst char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef FF_NEED_STRLEN #ifdef FF_USE_PROTOS static int ff_flex_strlen( ffconst char *s ) #else static int ff_flex_strlen( s ) ffconst char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef FF_USE_PROTOS static void *ff_flex_alloc( ff_size_t size ) #else static void *ff_flex_alloc( size ) ff_size_t size; #endif { return (void *) malloc( size ); } #ifdef FF_USE_PROTOS static void *ff_flex_realloc( void *ptr, ff_size_t size ) #else static void *ff_flex_realloc( ptr, size ) void *ptr; ff_size_t size; #endif { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } #ifdef FF_USE_PROTOS static void ff_flex_free( void *ptr ) #else static void ff_flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if FF_MAIN int main() { fflex(); return 0; } #endif #line 419 "eval.l" int ffwrap() { /* MJT -- 13 June 1996 Supplied for compatibility with pre-2.5.1 versions of flex which do not recognize %option noffwrap */ return(1); } /* expr_read is lifted from old ftools.skel. Now we can use any version of flex with no .skel file necessary! MJT - 13 June 1996 keep a memory of how many bytes have been read previously, so that an unlimited-sized buffer can be supported. PDW - 28 Feb 1998 */ static int expr_read(char *buf, int nbytes) { int n; n = 0; if( !gParse.is_eobuf ) { do { buf[n++] = gParse.expr[gParse.index++]; } while ((nlng = varNum; } return( type ); } static int find_variable(char *varName) { int i; if( gParse.nCols ) for( i=0; i c2) return(1); if (c1 == 0) return(0); s1++; s2++; } } int strncasecmp(const char *s1, const char *s2, size_t n) { char c1, c2; for (; n-- ;) { c1 = toupper( *s1 ); c2 = toupper( *s2 ); if (c1 < c2) return(-1); if (c1 > c2) return(1); if (c1 == 0) return(0); s1++; s2++; } return(0); } #endif astropy-1.1.1/cextern/cfitsio/infback.c0000644001134200020070000005413612602615517021006 0ustar embrayscience00000000000000/* infback.c -- inflate using a call-back interface * Copyright (C) 1995-2009 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* This code is largely copied from inflate.c. Normally either infback.o or inflate.o would be linked into an application--not both. The interface with inffast.c is retained so that optimized assembler-coded versions of inflate_fast() can be used with either inflate.c or infback.c. */ #include "zutil.h" #include "inftrees.h" #include "inflate.h" #include "inffast.h" /* function prototypes */ local void fixedtables OF((struct inflate_state FAR *state)); /* strm provides memory allocation functions in zalloc and zfree, or Z_NULL to use the library memory allocation functions. windowBits is in the range 8..15, and window is a user-supplied window and output buffer that is 2**windowBits bytes. */ int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size) z_streamp strm; int windowBits; unsigned char FAR *window; const char *version; int stream_size; { struct inflate_state FAR *state; if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || stream_size != (int)(sizeof(z_stream))) return Z_VERSION_ERROR; if (strm == Z_NULL || window == Z_NULL || windowBits < 8 || windowBits > 15) return Z_STREAM_ERROR; strm->msg = Z_NULL; /* in case we return an error */ if (strm->zalloc == (alloc_func)0) { strm->zalloc = zcalloc; strm->opaque = (voidpf)0; } if (strm->zfree == (free_func)0) strm->zfree = zcfree; state = (struct inflate_state FAR *)ZALLOC(strm, 1, sizeof(struct inflate_state)); if (state == Z_NULL) return Z_MEM_ERROR; Tracev((stderr, "inflate: allocated\n")); strm->state = (struct internal_state FAR *)state; state->dmax = 32768U; state->wbits = windowBits; state->wsize = 1U << windowBits; state->window = window; state->wnext = 0; state->whave = 0; return Z_OK; } /* Return state with length and distance decoding tables and index sizes set to fixed code decoding. Normally this returns fixed tables from inffixed.h. If BUILDFIXED is defined, then instead this routine builds the tables the first time it's called, and returns those tables the first time and thereafter. This reduces the size of the code by about 2K bytes, in exchange for a little execution time. However, BUILDFIXED should not be used for threaded applications, since the rewriting of the tables and virgin may not be thread-safe. */ local void fixedtables(state) struct inflate_state FAR *state; { #ifdef BUILDFIXED static int virgin = 1; static code *lenfix, *distfix; static code fixed[544]; /* build fixed huffman tables if first call (may not be thread safe) */ if (virgin) { unsigned sym, bits; static code *next; /* literal/length table */ sym = 0; while (sym < 144) state->lens[sym++] = 8; while (sym < 256) state->lens[sym++] = 9; while (sym < 280) state->lens[sym++] = 7; while (sym < 288) state->lens[sym++] = 8; next = fixed; lenfix = next; bits = 9; inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); /* distance table */ sym = 0; while (sym < 32) state->lens[sym++] = 5; distfix = next; bits = 5; inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); /* do this just once */ virgin = 0; } #else /* !BUILDFIXED */ # include "inffixed.h" #endif /* BUILDFIXED */ state->lencode = lenfix; state->lenbits = 9; state->distcode = distfix; state->distbits = 5; } /* Macros for inflateBack(): */ /* Load returned state from inflate_fast() */ #define LOAD() \ do { \ put = strm->next_out; \ left = strm->avail_out; \ next = strm->next_in; \ have = strm->avail_in; \ hold = state->hold; \ bits = state->bits; \ } while (0) /* Set state from registers for inflate_fast() */ #define RESTORE() \ do { \ strm->next_out = put; \ strm->avail_out = left; \ strm->next_in = next; \ strm->avail_in = have; \ state->hold = hold; \ state->bits = bits; \ } while (0) /* Clear the input bit accumulator */ #define INITBITS() \ do { \ hold = 0; \ bits = 0; \ } while (0) /* Assure that some input is available. If input is requested, but denied, then return a Z_BUF_ERROR from inflateBack(). */ #define PULL() \ do { \ if (have == 0) { \ have = in(in_desc, &next); \ if (have == 0) { \ next = Z_NULL; \ ret = Z_BUF_ERROR; \ goto inf_leave; \ } \ } \ } while (0) /* Get a byte of input into the bit accumulator, or return from inflateBack() with an error if there is no input available. */ #define PULLBYTE() \ do { \ PULL(); \ have--; \ hold += (unsigned long)(*next++) << bits; \ bits += 8; \ } while (0) /* Assure that there are at least n bits in the bit accumulator. If there is not enough available input to do that, then return from inflateBack() with an error. */ #define NEEDBITS(n) \ do { \ while (bits < (unsigned)(n)) \ PULLBYTE(); \ } while (0) /* Return the low n bits of the bit accumulator (n < 16) */ #define BITS(n) \ ((unsigned)hold & ((1U << (n)) - 1)) /* Remove n bits from the bit accumulator */ #define DROPBITS(n) \ do { \ hold >>= (n); \ bits -= (unsigned)(n); \ } while (0) /* Remove zero to seven bits as needed to go to a byte boundary */ #define BYTEBITS() \ do { \ hold >>= bits & 7; \ bits -= bits & 7; \ } while (0) /* Assure that some output space is available, by writing out the window if it's full. If the write fails, return from inflateBack() with a Z_BUF_ERROR. */ #define ROOM() \ do { \ if (left == 0) { \ put = state->window; \ left = state->wsize; \ state->whave = left; \ if (out(out_desc, put, left)) { \ ret = Z_BUF_ERROR; \ goto inf_leave; \ } \ } \ } while (0) /* strm provides the memory allocation functions and window buffer on input, and provides information on the unused input on return. For Z_DATA_ERROR returns, strm will also provide an error message. in() and out() are the call-back input and output functions. When inflateBack() needs more input, it calls in(). When inflateBack() has filled the window with output, or when it completes with data in the window, it calls out() to write out the data. The application must not change the provided input until in() is called again or inflateBack() returns. The application must not change the window/output buffer until inflateBack() returns. in() and out() are called with a descriptor parameter provided in the inflateBack() call. This parameter can be a structure that provides the information required to do the read or write, as well as accumulated information on the input and output such as totals and check values. in() should return zero on failure. out() should return non-zero on failure. If either in() or out() fails, than inflateBack() returns a Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it was in() or out() that caused in the error. Otherwise, inflateBack() returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format error, or Z_MEM_ERROR if it could not allocate memory for the state. inflateBack() can also return Z_STREAM_ERROR if the input parameters are not correct, i.e. strm is Z_NULL or the state was not initialized. */ int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc) z_streamp strm; in_func in; void FAR *in_desc; out_func out; void FAR *out_desc; { struct inflate_state FAR *state; unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ unsigned have, left; /* available input and output */ unsigned long hold; /* bit buffer */ unsigned bits; /* bits in bit buffer */ unsigned copy; /* number of stored or match bytes to copy */ unsigned char FAR *from; /* where to copy match bytes from */ code here; /* current decoding table entry */ code last; /* parent table entry */ unsigned len; /* length to copy for repeats, bits to drop */ int ret; /* return code */ static const unsigned short order[19] = /* permutation of code lengths */ {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; /* Check that the strm exists and that the state was initialized */ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; /* Reset the state */ strm->msg = Z_NULL; state->mode = TYPE; state->last = 0; state->whave = 0; next = strm->next_in; have = next != Z_NULL ? strm->avail_in : 0; hold = 0; bits = 0; put = state->window; left = state->wsize; /* Inflate until end of block marked as last */ for (;;) switch (state->mode) { case TYPE: /* determine and dispatch block type */ if (state->last) { BYTEBITS(); state->mode = DONE; break; } NEEDBITS(3); state->last = BITS(1); DROPBITS(1); switch (BITS(2)) { case 0: /* stored block */ Tracev((stderr, "inflate: stored block%s\n", state->last ? " (last)" : "")); state->mode = STORED; break; case 1: /* fixed block */ fixedtables(state); Tracev((stderr, "inflate: fixed codes block%s\n", state->last ? " (last)" : "")); state->mode = LEN; /* decode codes */ break; case 2: /* dynamic block */ Tracev((stderr, "inflate: dynamic codes block%s\n", state->last ? " (last)" : "")); state->mode = TABLE; break; case 3: strm->msg = (char *)"invalid block type"; state->mode = BAD; } DROPBITS(2); break; case STORED: /* get and verify stored block length */ BYTEBITS(); /* go to byte boundary */ NEEDBITS(32); if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { strm->msg = (char *)"invalid stored block lengths"; state->mode = BAD; break; } state->length = (unsigned)hold & 0xffff; Tracev((stderr, "inflate: stored length %u\n", state->length)); INITBITS(); /* copy stored block from input to output */ while (state->length != 0) { copy = state->length; PULL(); ROOM(); if (copy > have) copy = have; if (copy > left) copy = left; zmemcpy(put, next, copy); have -= copy; next += copy; left -= copy; put += copy; state->length -= copy; } Tracev((stderr, "inflate: stored end\n")); state->mode = TYPE; break; case TABLE: /* get dynamic table entries descriptor */ NEEDBITS(14); state->nlen = BITS(5) + 257; DROPBITS(5); state->ndist = BITS(5) + 1; DROPBITS(5); state->ncode = BITS(4) + 4; DROPBITS(4); #ifndef PKZIP_BUG_WORKAROUND if (state->nlen > 286 || state->ndist > 30) { strm->msg = (char *)"too many length or distance symbols"; state->mode = BAD; break; } #endif Tracev((stderr, "inflate: table sizes ok\n")); /* get code length code lengths (not a typo) */ state->have = 0; while (state->have < state->ncode) { NEEDBITS(3); state->lens[order[state->have++]] = (unsigned short)BITS(3); DROPBITS(3); } while (state->have < 19) state->lens[order[state->have++]] = 0; state->next = state->codes; state->lencode = (code const FAR *)(state->next); state->lenbits = 7; ret = inflate_table(CODES, state->lens, 19, &(state->next), &(state->lenbits), state->work); if (ret) { strm->msg = (char *)"invalid code lengths set"; state->mode = BAD; break; } Tracev((stderr, "inflate: code lengths ok\n")); /* get length and distance code code lengths */ state->have = 0; while (state->have < state->nlen + state->ndist) { for (;;) { here = state->lencode[BITS(state->lenbits)]; if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } if (here.val < 16) { NEEDBITS(here.bits); DROPBITS(here.bits); state->lens[state->have++] = here.val; } else { if (here.val == 16) { NEEDBITS(here.bits + 2); DROPBITS(here.bits); if (state->have == 0) { strm->msg = (char *)"invalid bit length repeat"; state->mode = BAD; break; } len = (unsigned)(state->lens[state->have - 1]); copy = 3 + BITS(2); DROPBITS(2); } else if (here.val == 17) { NEEDBITS(here.bits + 3); DROPBITS(here.bits); len = 0; copy = 3 + BITS(3); DROPBITS(3); } else { NEEDBITS(here.bits + 7); DROPBITS(here.bits); len = 0; copy = 11 + BITS(7); DROPBITS(7); } if (state->have + copy > state->nlen + state->ndist) { strm->msg = (char *)"invalid bit length repeat"; state->mode = BAD; break; } while (copy--) state->lens[state->have++] = (unsigned short)len; } } /* handle error breaks in while */ if (state->mode == BAD) break; /* check for end-of-block code (better have one) */ if (state->lens[256] == 0) { strm->msg = (char *)"invalid code -- missing end-of-block"; state->mode = BAD; break; } /* build code tables -- note: do not change the lenbits or distbits values here (9 and 6) without reading the comments in inftrees.h concerning the ENOUGH constants, which depend on those values */ state->next = state->codes; state->lencode = (code const FAR *)(state->next); state->lenbits = 9; ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), &(state->lenbits), state->work); if (ret) { strm->msg = (char *)"invalid literal/lengths set"; state->mode = BAD; break; } state->distcode = (code const FAR *)(state->next); state->distbits = 6; ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, &(state->next), &(state->distbits), state->work); if (ret) { strm->msg = (char *)"invalid distances set"; state->mode = BAD; break; } Tracev((stderr, "inflate: codes ok\n")); state->mode = LEN; case LEN: /* use inflate_fast() if we have enough input and output */ if (have >= 6 && left >= 258) { RESTORE(); if (state->whave < state->wsize) state->whave = state->wsize - left; inflate_fast(strm, state->wsize); LOAD(); break; } /* get a literal, length, or end-of-block code */ for (;;) { here = state->lencode[BITS(state->lenbits)]; if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } if (here.op && (here.op & 0xf0) == 0) { last = here; for (;;) { here = state->lencode[last.val + (BITS(last.bits + last.op) >> last.bits)]; if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); } DROPBITS(here.bits); state->length = (unsigned)here.val; /* process literal */ if (here.op == 0) { Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? "inflate: literal '%c'\n" : "inflate: literal 0x%02x\n", here.val)); ROOM(); *put++ = (unsigned char)(state->length); left--; state->mode = LEN; break; } /* process end of block */ if (here.op & 32) { Tracevv((stderr, "inflate: end of block\n")); state->mode = TYPE; break; } /* invalid code */ if (here.op & 64) { strm->msg = (char *)"invalid literal/length code"; state->mode = BAD; break; } /* length code -- get extra bits, if any */ state->extra = (unsigned)(here.op) & 15; if (state->extra != 0) { NEEDBITS(state->extra); state->length += BITS(state->extra); DROPBITS(state->extra); } Tracevv((stderr, "inflate: length %u\n", state->length)); /* get distance code */ for (;;) { here = state->distcode[BITS(state->distbits)]; if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } if ((here.op & 0xf0) == 0) { last = here; for (;;) { here = state->distcode[last.val + (BITS(last.bits + last.op) >> last.bits)]; if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); } DROPBITS(here.bits); if (here.op & 64) { strm->msg = (char *)"invalid distance code"; state->mode = BAD; break; } state->offset = (unsigned)here.val; /* get distance extra bits, if any */ state->extra = (unsigned)(here.op) & 15; if (state->extra != 0) { NEEDBITS(state->extra); state->offset += BITS(state->extra); DROPBITS(state->extra); } if (state->offset > state->wsize - (state->whave < state->wsize ? left : 0)) { strm->msg = (char *)"invalid distance too far back"; state->mode = BAD; break; } Tracevv((stderr, "inflate: distance %u\n", state->offset)); /* copy match from window to output */ do { ROOM(); copy = state->wsize - state->offset; if (copy < left) { from = put + copy; copy = left - copy; } else { from = put - state->offset; copy = left; } if (copy > state->length) copy = state->length; state->length -= copy; left -= copy; do { *put++ = *from++; } while (--copy); } while (state->length != 0); break; case DONE: /* inflate stream terminated properly -- write leftover output */ ret = Z_STREAM_END; if (left < state->wsize) { if (out(out_desc, state->window, state->wsize - left)) ret = Z_BUF_ERROR; } goto inf_leave; case BAD: ret = Z_DATA_ERROR; goto inf_leave; default: /* can't happen, but makes compilers happy */ ret = Z_STREAM_ERROR; goto inf_leave; } /* Return unused input */ inf_leave: strm->next_in = next; strm->avail_in = have; return ret; } int ZEXPORT inflateBackEnd(strm) z_streamp strm; { if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) return Z_STREAM_ERROR; ZFREE(strm, strm->state); strm->state = Z_NULL; Tracev((stderr, "inflate: end\n")); return Z_OK; } astropy-1.1.1/cextern/cfitsio/drvrgsiftp.c0000644001134200020070000003241612602615520021572 0ustar embrayscience00000000000000 /* This file, drvrgsiftp.c contains driver routines for gsiftp files. */ /* Andrea Barisani */ /* Taffoni Giuliano */ #ifdef HAVE_NET_SERVICES #ifdef HAVE_GSIFTP #include #include #include #include #include #include "fitsio2.h" #include #define MAXLEN 1200 #define NETTIMEOUT 80 #define MAX_BUFFER_SIZE_R 1024 #define MAX_BUFFER_SIZE_W (64*1024) static int gsiftpopen = 0; static int global_offset = 0; static int gsiftp_get(char *filename, FILE **gsiftpfile, int num_streams); static globus_mutex_t lock; static globus_cond_t cond; static globus_bool_t done; static char *gsiftp_tmpfile; static char *gsiftpurl = NULL; static char gsiftp_tmpdir[MAXLEN]; static jmp_buf env; /* holds the jump buffer for setjmp/longjmp pairs */ static void signal_handler(int sig); int gsiftp_init(void) { if (getenv("GSIFTP_TMPFILE")) { gsiftp_tmpfile = getenv("GSIFTP_TMPFILE"); } else { strncpy(gsiftp_tmpdir, "/tmp/gsiftp_XXXXXX", sizeof gsiftp_tmpdir); if (mkdtemp(gsiftp_tmpdir) == NULL) { ffpmsg("Cannot create temporary directory!"); return (FILE_NOT_OPENED); } gsiftp_tmpfile = malloc(strlen(gsiftp_tmpdir) + strlen("/gsiftp_buffer.tmp")); strcat(gsiftp_tmpfile, gsiftp_tmpdir); strcat(gsiftp_tmpfile, "/gsiftp_buffer.tmp"); } return file_init(); } int gsiftp_shutdown(void) { free(gsiftpurl); free(gsiftp_tmpfile); free(gsiftp_tmpdir); return file_shutdown(); } int gsiftp_setoptions(int options) { return file_setoptions(options); } int gsiftp_getoptions(int *options) { return file_getoptions(options); } int gsiftp_getversion(int *version) { return file_getversion(version); } int gsiftp_checkfile(char *urltype, char *infile, char *outfile) { return file_checkfile(urltype, infile, outfile); } int gsiftp_open(char *filename, int rwmode, int *handle) { FILE *gsiftpfile; int num_streams; if (getenv("GSIFTP_STREAMS")) { num_streams = (int)getenv("GSIFTP_STREAMS"); } else { num_streams = 1; } if (rwmode) { gsiftpopen = 2; } else { gsiftpopen = 1; } if (gsiftpurl) free(gsiftpurl); gsiftpurl = strdup(filename); if (setjmp(env) != 0) { ffpmsg("Timeout (gsiftp_open)"); goto error; } signal(SIGALRM, signal_handler); alarm(NETTIMEOUT); if (gsiftp_get(filename,&gsiftpfile,num_streams)) { alarm(0); ffpmsg("Unable to open gsiftp file (gsiftp_open)"); ffpmsg(filename); goto error; } fclose(gsiftpfile); signal(SIGALRM, SIG_DFL); alarm(0); return file_open(gsiftp_tmpfile, rwmode, handle); error: alarm(0); signal(SIGALRM, SIG_DFL); return (FILE_NOT_OPENED); } int gsiftp_create(char *filename, int *handle) { if (gsiftpurl) free(gsiftpurl); gsiftpurl = strdup(filename); return file_create(gsiftp_tmpfile, handle); } int gsiftp_truncate(int handle, LONGLONG filesize) { return file_truncate(handle, filesize); } int gsiftp_size(int handle, LONGLONG *filesize) { return file_size(handle, filesize); } int gsiftp_flush(int handle) { FILE *gsiftpfile; int num_streams; if (getenv("GSIFTP_STREAMS")) { num_streams = (int)getenv("GSIFTP_STREAMS"); } else { num_streams = 1; } int rc = file_flush(handle); if (gsiftpopen != 1) { if (setjmp(env) != 0) { ffpmsg("Timeout (gsiftp_write)"); goto error; } signal(SIGALRM, signal_handler); alarm(NETTIMEOUT); if (gsiftp_put(gsiftpurl,&gsiftpfile,num_streams)) { alarm(0); ffpmsg("Unable to open gsiftp file (gsiftp_flush)"); ffpmsg(gsiftpurl); goto error; } fclose(gsiftpfile); signal(SIGALRM, SIG_DFL); alarm(0); } return rc; error: alarm(0); signal(SIGALRM, SIG_DFL); return (FILE_NOT_OPENED); } int gsiftp_seek(int handle, LONGLONG offset) { return file_seek(handle, offset); } int gsiftp_read(int hdl, void *buffer, long nbytes) { return file_read(hdl, buffer, nbytes); } int gsiftp_write(int hdl, void *buffer, long nbytes) { return file_write(hdl, buffer, nbytes); } int gsiftp_close(int handle) { unlink(gsiftp_tmpfile); if (gsiftp_tmpdir) rmdir(gsiftp_tmpdir); return file_close(handle); } static void done_cb( void * user_arg, globus_ftp_client_handle_t * handle, globus_object_t * err) { if(err){ fprintf(stderr, "%s", globus_object_printable_to_string(err)); } globus_mutex_lock(&lock); done = GLOBUS_TRUE; globus_cond_signal(&cond); globus_mutex_unlock(&lock); return; } static void data_cb_read( void * user_arg, globus_ftp_client_handle_t * handle, globus_object_t * err, globus_byte_t * buffer, globus_size_t length, globus_off_t offset, globus_bool_t eof) { if(err) { fprintf(stderr, "%s", globus_object_printable_to_string(err)); } else { FILE* fd = (FILE*) user_arg; int rc = fwrite(buffer, 1, length, fd); if (ferror(fd)) { printf("Read error in function data_cb_read; errno = %d\n", errno); return; } if (!eof) { globus_ftp_client_register_read(handle, buffer, MAX_BUFFER_SIZE_R, data_cb_read, (void*) fd); } } return; } static void data_cb_write( void * user_arg, globus_ftp_client_handle_t * handle, globus_object_t * err, globus_byte_t * buffer, globus_size_t length, globus_off_t offset, globus_bool_t eof) { int curr_offset; if(err) { fprintf(stderr, "%s", globus_object_printable_to_string(err)); } else { if (!eof) { FILE* fd = (FILE*) user_arg; int rc; globus_mutex_lock(&lock); curr_offset = global_offset; rc = fread(buffer, 1, MAX_BUFFER_SIZE_W, fd); global_offset += rc; globus_mutex_unlock(&lock); if (ferror(fd)) { printf("Read error in function data_cb_write; errno = %d\n", errno); return; } globus_ftp_client_register_write(handle, buffer, rc, curr_offset, feof(fd) != 0, data_cb_write, (void*) fd); } else { globus_libc_free(buffer); } } return; } int gsiftp_get(char *filename, FILE **gsiftpfile, int num_streams) { char gsiurl[MAXLEN]; globus_ftp_client_handle_t handle; globus_ftp_client_operationattr_t attr; globus_ftp_client_handleattr_t handle_attr; globus_ftp_control_parallelism_t parallelism; globus_ftp_control_layout_t layout; globus_byte_t buffer[MAX_BUFFER_SIZE_R]; globus_size_t buffer_length = sizeof(buffer); globus_result_t result; globus_ftp_client_restart_marker_t restart; globus_ftp_control_type_t filetype; globus_module_activate(GLOBUS_FTP_CLIENT_MODULE); globus_mutex_init(&lock, GLOBUS_NULL); globus_cond_init(&cond, GLOBUS_NULL); globus_ftp_client_handle_init(&handle, GLOBUS_NULL); globus_ftp_client_handleattr_init(&handle_attr); globus_ftp_client_operationattr_init(&attr); layout.mode = GLOBUS_FTP_CONTROL_STRIPING_NONE; globus_ftp_client_restart_marker_init(&restart); globus_ftp_client_operationattr_set_mode( &attr, GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK); if (num_streams >= 1) { parallelism.mode = GLOBUS_FTP_CONTROL_PARALLELISM_FIXED; parallelism.fixed.size = num_streams; globus_ftp_client_operationattr_set_parallelism( &attr, ¶llelism); } globus_ftp_client_operationattr_set_layout(&attr, &layout); filetype = GLOBUS_FTP_CONTROL_TYPE_IMAGE; globus_ftp_client_operationattr_set_type (&attr, filetype); globus_ftp_client_handle_init(&handle, &handle_attr); done = GLOBUS_FALSE; strcpy(gsiurl,"gsiftp://"); strcat(gsiurl,filename); *gsiftpfile = fopen(gsiftp_tmpfile,"w+"); if (!*gsiftpfile) { ffpmsg("Unable to open temporary file!"); return (FILE_NOT_OPENED); } result = globus_ftp_client_get(&handle, gsiurl, &attr, &restart, done_cb, 0); if(result != GLOBUS_SUCCESS) { globus_object_t * err; err = globus_error_get(result); fprintf(stderr, "%s", globus_object_printable_to_string(err)); done = GLOBUS_TRUE; } else { globus_ftp_client_register_read(&handle, buffer, buffer_length, data_cb_read, (void*) *gsiftpfile); } globus_mutex_lock(&lock); while(!done) { globus_cond_wait(&cond, &lock); } globus_mutex_unlock(&lock); globus_ftp_client_handle_destroy(&handle); globus_module_deactivate_all(); return 0; } int gsiftp_put(char *filename, FILE **gsiftpfile, int num_streams) { int i; char gsiurl[MAXLEN]; globus_ftp_client_handle_t handle; globus_ftp_client_operationattr_t attr; globus_ftp_client_handleattr_t handle_attr; globus_ftp_control_parallelism_t parallelism; globus_ftp_control_layout_t layout; globus_byte_t * buffer; globus_size_t buffer_length = sizeof(buffer); globus_result_t result; globus_ftp_client_restart_marker_t restart; globus_ftp_control_type_t filetype; globus_module_activate(GLOBUS_FTP_CLIENT_MODULE); globus_mutex_init(&lock, GLOBUS_NULL); globus_cond_init(&cond, GLOBUS_NULL); globus_ftp_client_handle_init(&handle, GLOBUS_NULL); globus_ftp_client_handleattr_init(&handle_attr); globus_ftp_client_operationattr_init(&attr); layout.mode = GLOBUS_FTP_CONTROL_STRIPING_NONE; globus_ftp_client_restart_marker_init(&restart); globus_ftp_client_operationattr_set_mode( &attr, GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK); if (num_streams >= 1) { parallelism.mode = GLOBUS_FTP_CONTROL_PARALLELISM_FIXED; parallelism.fixed.size = num_streams; globus_ftp_client_operationattr_set_parallelism( &attr, ¶llelism); } globus_ftp_client_operationattr_set_layout(&attr, &layout); filetype = GLOBUS_FTP_CONTROL_TYPE_IMAGE; globus_ftp_client_operationattr_set_type (&attr, filetype); globus_ftp_client_handle_init(&handle, &handle_attr); done = GLOBUS_FALSE; strcpy(gsiurl,"gsiftp://"); strcat(gsiurl,filename); *gsiftpfile = fopen(gsiftp_tmpfile,"r"); if (!*gsiftpfile) { ffpmsg("Unable to open temporary file!"); return (FILE_NOT_OPENED); } result = globus_ftp_client_put(&handle, gsiurl, &attr, &restart, done_cb, 0); if(result != GLOBUS_SUCCESS) { globus_object_t * err; err = globus_error_get(result); fprintf(stderr, "%s", globus_object_printable_to_string(err)); done = GLOBUS_TRUE; } else { int rc; int curr_offset; for (i = 0; i< 2 * num_streams && feof(*gsiftpfile) == 0; i++) { buffer = malloc(MAX_BUFFER_SIZE_W); globus_mutex_lock(&lock); curr_offset = global_offset; rc = fread(buffer, 1, MAX_BUFFER_SIZE_W, *gsiftpfile); global_offset += rc; globus_mutex_unlock(&lock); globus_ftp_client_register_write( &handle, buffer, rc, curr_offset, feof(*gsiftpfile) != 0, data_cb_write, (void*) *gsiftpfile); } } globus_mutex_lock(&lock); while(!done) { globus_cond_wait(&cond, &lock); } globus_mutex_unlock(&lock); globus_ftp_client_handle_destroy(&handle); globus_module_deactivate_all(); return 0; } static void signal_handler(int sig) { switch (sig) { case SIGALRM: /* process for alarm */ longjmp(env,sig); default: { /* Hmm, shouldn't have happend */ exit(sig); } } } #endif #endif astropy-1.1.1/cextern/cfitsio/putcoll.c0000644001134200020070000003264112602615517021070 0ustar embrayscience00000000000000/* This file, putcoll.c, contains routines that write data elements to */ /* a FITS image or table, with logical datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffpcll( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ char *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of logical values to a column in the current FITS HDU. */ { int tcode, maxelem, hdutype; long twidth, incre; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; double scale, zero; char tform[20], ctrue = 'T', cfalse = 'F'; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ if (*status > 0) /* inherit input status value if > 0 */ return(*status); /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); if (tcode != TLOGICAL) return(*status = NOT_LOGICAL_COL); /*---------------------------------------------------------------------*/ /* Now write the logical values one at a time to the FITS column. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ while (remain) { wrtptr = startpos + (rowlen * rownum) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ if (array[next]) ffpbyt(fptr, 1, &ctrue, status); else ffpbyt(fptr, 1, &cfalse, status); if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing element %.0f of input array of logicals (ffpcll).", (double) (next+1)); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain--; if (remain) { next++; elemnum++; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ return(*status); } /*--------------------------------------------------------------------------*/ int ffpcnl( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ char *array, /* I - array of values to write */ char nulvalue, /* I - array flagging undefined pixels if true */ int *status) /* IO - error status */ /* Write an array of elements to the specified column of a table. Any input pixels flagged as null will be replaced by the appropriate null value in the output FITS file. */ { tcolumn *colptr; long ngood = 0, nbad = 0, ii; LONGLONG repeat, first, fstelm, fstrow; int tcode; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode > 0) repeat = colptr->trepeat; /* repeat count for this column */ else repeat = firstelem -1 + nelem; /* variable length arrays */ /* first write the whole input vector, then go back and fill in the nulls */ if (ffpcll(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) return(*status); /* absolute element number in the column */ first = (firstrow - 1) * repeat + firstelem; for (ii = 0; ii < nelem; ii++) { if (array[ii] != nulvalue) /* is this a good pixel? */ { if (nbad) /* write previous string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) return(*status); nbad=0; } ngood = ngood +1; /* the consecutive number of good pixels */ } else { if (ngood) /* write previous string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ /* good values have already been written if (ffpcll(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status) > 0) return(*status); */ ngood=0; } nbad = nbad +1; /* the consecutive number of bad pixels */ } } /* finished loop; now just write the last set of pixels */ if (ngood) /* write last string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ /* these have already been written ffpcll(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); */ } else if (nbad) /* write last string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffpclx( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG frow, /* I - first row to write (1 = 1st row) */ long fbit, /* I - first bit to write (1 = 1st) */ long nbit, /* I - number of bits to write */ char *larray, /* I - array of logicals corresponding to bits */ int *status) /* IO - error status */ /* write an array of logical values to a specified bit or byte column of the binary table. If larray is TRUE, then the corresponding bit is set to 1, otherwise it is set to 0. The binary table column being written to must have datatype 'B' or 'X'. */ { LONGLONG offset, bstart, repeat, rowlen, elemnum, rstart, estart, tnull; long fbyte, lbyte, nbyte, bitloc, ndone; long ii, twidth, incre; int tcode, descrp, maxelem, hdutype; double dummyd; char tform[12], snull[12]; unsigned char cbuff; static unsigned char onbit[8] = {128, 64, 32, 16, 8, 4, 2, 1}; static unsigned char offbit[8] = {127, 191, 223, 239, 247, 251, 253, 254}; tcolumn *colptr; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* check input parameters */ if (nbit < 1) return(*status); else if (frow < 1) return(*status = BAD_ROW_NUM); else if (fbit < 1) return(*status = BAD_ELEM_NUM); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); fbyte = (fbit + 7) / 8; lbyte = (fbit + nbit + 6) / 8; nbyte = lbyte - fbyte +1; /* Save the current heapsize; ffgcprll will increment the value if */ /* we are writing to a variable length column. */ offset = (fptr->Fptr)->heapsize; /* call ffgcprll in case we are writing beyond the current end of */ /* the table; it will allocate more space and shift any following */ /* HDU's. Otherwise, we have little use for most of the returned */ /* parameters, therefore just use dummy parameters. */ if (ffgcprll( fptr, colnum, frow, fbyte, nbyte, 1, &dummyd, &dummyd, tform, &twidth, &tcode, &maxelem, &bstart, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); bitloc = fbit - 1 - ((fbit - 1) / 8 * 8); ndone = 0; rstart = frow - 1; estart = fbyte - 1; colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (abs(tcode) > TBYTE) return(*status = NOT_LOGICAL_COL); /* not correct datatype column */ if (tcode > 0) { descrp = FALSE; /* not a variable length descriptor column */ repeat = colptr->trepeat; if (tcode == TBIT) repeat = (repeat + 7) / 8; /* convert from bits to bytes */ if (fbyte > repeat) return(*status = BAD_ELEM_NUM); /* calc the i/o pointer location to start of sequence of pixels */ bstart = (fptr->Fptr)->datastart + ((fptr->Fptr)->rowlength * rstart) + colptr->tbcol + estart; } else { descrp = TRUE; /* a variable length descriptor column */ /* only bit arrays (tform = 'X') are supported for variable */ /* length arrays. REPEAT is the number of BITS in the array. */ repeat = fbit + nbit -1; /* write the number of elements and the starting offset. */ /* Note: ffgcprll previous wrote the descripter, but with the */ /* wrong repeat value (gave bytes instead of bits). */ if (tcode == -TBIT) ffpdes(fptr, colnum, frow, (long) repeat, offset, status); /* Calc the i/o pointer location to start of sequence of pixels. */ /* ffgcprll has already calculated a value for bstart that */ /* points to the first element of the vector; we just have to */ /* increment it to point to the first element we want to write to. */ /* Note: ffgcprll also already updated the size of the heap, so we */ /* don't have to do that again here. */ bstart += estart; } /* move the i/o pointer to the start of the pixel sequence */ ffmbyt(fptr, bstart, IGNORE_EOF, status); /* read the next byte (we may only be modifying some of the bits) */ while (1) { if (ffgbyt(fptr, 1, &cbuff, status) == END_OF_FILE) { /* hit end of file trying to read the byte, so just set byte = 0 */ *status = 0; cbuff = 0; } /* move back, to be able to overwrite the byte */ ffmbyt(fptr, bstart, IGNORE_EOF, status); for (ii = bitloc; (ii < 8) && (ndone < nbit); ii++, ndone++) { if(larray[ndone]) cbuff = cbuff | onbit[ii]; else cbuff = cbuff & offbit[ii]; } ffpbyt(fptr, 1, &cbuff, status); /* write the modified byte */ if (ndone == nbit) /* finished all the bits */ return(*status); /* not done, so get the next byte */ bstart++; if (!descrp) { estart++; if (estart == repeat) { /* move the i/o pointer to the next row of pixels */ estart = 0; rstart = rstart + 1; bstart = (fptr->Fptr)->datastart + ((fptr->Fptr)->rowlength * rstart) + colptr->tbcol; ffmbyt(fptr, bstart, IGNORE_EOF, status); } } bitloc = 0; } } astropy-1.1.1/cextern/cfitsio/crc32.h0000644001134200020070000007355012602615520020325 0ustar embrayscience00000000000000/* crc32.h -- tables for rapid CRC calculation * Generated automatically by crc32.c */ local const unsigned long FAR crc_table[TBLS][256] = { { 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL, 0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL, 0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL, 0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL, 0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL, 0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL, 0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL, 0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL, 0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL, 0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL, 0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL, 0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL, 0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL, 0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL, 0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL, 0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL, 0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL, 0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL, 0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL, 0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL, 0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL, 0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL, 0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL, 0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL, 0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL, 0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL, 0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL, 0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL, 0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL, 0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL, 0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL, 0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL, 0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL, 0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL, 0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL, 0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL, 0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL, 0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL, 0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL, 0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL, 0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL, 0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL, 0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL, 0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL, 0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL, 0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL, 0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL, 0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL, 0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL, 0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL, 0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL, 0x2d02ef8dUL #ifdef BYFOUR }, { 0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL, 0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL, 0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL, 0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL, 0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL, 0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL, 0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL, 0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL, 0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL, 0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL, 0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL, 0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL, 0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL, 0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL, 0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL, 0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL, 0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL, 0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL, 0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL, 0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL, 0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL, 0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL, 0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL, 0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL, 0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL, 0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL, 0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL, 0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL, 0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL, 0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL, 0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL, 0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL, 0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL, 0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL, 0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL, 0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL, 0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL, 0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL, 0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL, 0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL, 0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL, 0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL, 0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL, 0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL, 0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL, 0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL, 0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL, 0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL, 0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL, 0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL, 0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL, 0x9324fd72UL }, { 0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL, 0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL, 0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL, 0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL, 0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL, 0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL, 0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL, 0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL, 0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL, 0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL, 0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL, 0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL, 0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL, 0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL, 0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL, 0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL, 0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL, 0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL, 0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL, 0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL, 0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL, 0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL, 0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL, 0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL, 0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL, 0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL, 0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL, 0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL, 0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL, 0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL, 0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL, 0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL, 0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL, 0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL, 0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL, 0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL, 0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL, 0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL, 0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL, 0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL, 0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL, 0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL, 0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL, 0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL, 0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL, 0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL, 0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL, 0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL, 0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL, 0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL, 0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL, 0xbe9834edUL }, { 0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL, 0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL, 0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL, 0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL, 0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL, 0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL, 0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL, 0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL, 0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL, 0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL, 0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL, 0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL, 0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL, 0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL, 0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL, 0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL, 0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL, 0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL, 0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL, 0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL, 0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL, 0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL, 0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL, 0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL, 0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL, 0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL, 0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL, 0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL, 0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL, 0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL, 0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL, 0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL, 0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL, 0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL, 0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL, 0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL, 0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL, 0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL, 0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL, 0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL, 0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL, 0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL, 0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL, 0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL, 0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL, 0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL, 0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL, 0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL, 0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL, 0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL, 0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL, 0xde0506f1UL }, { 0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL, 0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL, 0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL, 0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL, 0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL, 0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL, 0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL, 0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL, 0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL, 0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL, 0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL, 0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL, 0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL, 0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL, 0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL, 0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL, 0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL, 0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL, 0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL, 0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL, 0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL, 0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL, 0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL, 0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL, 0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL, 0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL, 0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL, 0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL, 0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL, 0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL, 0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL, 0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL, 0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL, 0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL, 0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL, 0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL, 0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL, 0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL, 0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL, 0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL, 0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL, 0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL, 0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL, 0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL, 0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL, 0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL, 0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL, 0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL, 0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL, 0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL, 0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL, 0x8def022dUL }, { 0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL, 0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL, 0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL, 0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL, 0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL, 0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL, 0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL, 0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL, 0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL, 0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL, 0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL, 0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL, 0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL, 0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL, 0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL, 0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL, 0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL, 0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL, 0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL, 0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL, 0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL, 0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL, 0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL, 0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL, 0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL, 0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL, 0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL, 0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL, 0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL, 0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL, 0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL, 0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL, 0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL, 0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL, 0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL, 0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL, 0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL, 0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL, 0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL, 0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL, 0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL, 0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL, 0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL, 0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL, 0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL, 0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL, 0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL, 0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL, 0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL, 0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL, 0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL, 0x72fd2493UL }, { 0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL, 0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL, 0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL, 0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL, 0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL, 0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL, 0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL, 0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL, 0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL, 0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL, 0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL, 0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL, 0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL, 0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL, 0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL, 0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL, 0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL, 0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL, 0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL, 0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL, 0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL, 0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL, 0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL, 0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL, 0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL, 0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL, 0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL, 0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL, 0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL, 0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL, 0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL, 0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL, 0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL, 0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL, 0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL, 0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL, 0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL, 0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL, 0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL, 0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL, 0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL, 0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL, 0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL, 0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL, 0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL, 0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL, 0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL, 0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL, 0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL, 0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL, 0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL, 0xed3498beUL }, { 0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL, 0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL, 0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL, 0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL, 0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL, 0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL, 0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL, 0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL, 0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL, 0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL, 0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL, 0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL, 0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL, 0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL, 0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL, 0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL, 0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL, 0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL, 0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL, 0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL, 0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL, 0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL, 0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL, 0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL, 0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL, 0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL, 0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL, 0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL, 0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL, 0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL, 0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL, 0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL, 0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL, 0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL, 0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL, 0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL, 0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL, 0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL, 0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL, 0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL, 0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL, 0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL, 0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL, 0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL, 0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL, 0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL, 0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL, 0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL, 0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL, 0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL, 0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL, 0xf10605deUL #endif } }; astropy-1.1.1/cextern/cfitsio/fitsio2.h0000644001134200020070000016305012602615520020763 0ustar embrayscience00000000000000#ifndef _FITSIO2_H #define _FITSIO2_H #include "fitsio.h" /* Threading support using POSIX threads programming interface (supplied by Bruce O'Neel) All threaded programs MUST have the -D_REENTRANT on the compile line and must link with -lpthread. This means that when one builds cfitsio for threads you must have -D_REENTRANT on the gcc or cc command line. */ #ifdef _REENTRANT #include /* #include not needed any more */ extern pthread_mutex_t Fitsio_Lock; extern int Fitsio_Pthread_Status; #define FFLOCK1(lockname) (Fitsio_Pthread_Status = pthread_mutex_lock(&lockname)) #define FFUNLOCK1(lockname) (Fitsio_Pthread_Status = pthread_mutex_unlock(&lockname)) #define FFLOCK FFLOCK1(Fitsio_Lock) #define FFUNLOCK FFUNLOCK1(Fitsio_Lock) #else #define FFLOCK #define FFUNLOCK #endif /* If REPLACE_LINKS is defined, then whenever CFITSIO fails to open a file with write access because it is a soft link to a file that only has read access, then CFITSIO will attempt to replace the link with a local copy of the file, with write access. This feature was originally added to support the ftools in the Hera environment, where many of the user's data file are soft links. */ #if defined(BUILD_HERA) #define REPLACE_LINKS 1 #endif #define USE_LARGE_VALUE -99 /* flag used when writing images */ #define DBUFFSIZE 28800 /* size of data buffer in bytes */ #define NMAXFILES 300 /* maximum number of FITS files that can be opened */ /* CFITSIO will allocate (NMAXFILES * 80) bytes of memory */ #define MINDIRECT 8640 /* minimum size for direct reads and writes */ /* MINDIRECT must have a value >= 8640 */ /* it is useful to identify certain specific types of machines */ #define NATIVE 0 /* machine that uses non-byteswapped IEEE formats */ #define OTHERTYPE 1 /* any other type of machine */ #define VAXVMS 3 /* uses an odd floating point format */ #define ALPHAVMS 4 /* uses an odd floating point format */ #define IBMPC 5 /* used in drvrfile.c to work around a bug on PCs */ #define CRAY 6 /* requires a special NaN test algorithm */ #define GFLOAT 1 /* used for VMS */ #define IEEEFLOAT 2 /* used for VMS */ /* ======================================================================= */ /* The following logic is used to determine the type machine, */ /* whether the bytes are swapped, and the number of bits in a long value */ /* ======================================================================= */ /* The following platforms have sizeof(long) == 8 */ /* This block of code should match a similar block in fitsio.h */ /* and the block of code at the beginning of f77_wrap.h */ #if defined(__alpha) && ( defined(__unix__) || defined(__NetBSD__) ) /* old Dec Alpha platforms running OSF */ #define BYTESWAPPED TRUE #define LONGSIZE 64 #elif defined(__sparcv9) || (defined(__sparc__) && defined(__arch64__)) /* SUN Solaris7 in 64-bit mode */ #define BYTESWAPPED FALSE #define MACHINE NATIVE #define LONGSIZE 64 /* IBM System z mainframe support */ #elif defined(__s390x__) #define BYTESWAPPED FALSE #define LONGSIZE 64 #elif defined(__s390__) #define BYTESWAPPED FALSE #define LONGSIZE 32 #elif defined(__ia64__) || defined(__x86_64__) /* Intel itanium 64-bit PC, or AMD opteron 64-bit PC */ #define BYTESWAPPED TRUE #define LONGSIZE 64 #elif defined(_SX) /* Nec SuperUx */ #define BYTESWAPPED FALSE #define MACHINE NATIVE #define LONGSIZE 64 #elif defined(__powerpc64__) || defined(__64BIT__) /* IBM 64-bit AIX powerpc*/ /* could also test for __ppc64__ or __PPC64 */ #define BYTESWAPPED FALSE #define MACHINE NATIVE #define LONGSIZE 64 #elif defined(_MIPS_SZLONG) # if defined(MIPSEL) # define BYTESWAPPED TRUE # else # define BYTESWAPPED FALSE # define MACHINE NATIVE # endif # if _MIPS_SZLONG == 32 # define LONGSIZE 32 # elif _MIPS_SZLONG == 64 # define LONGSIZE 64 # else # error "can't handle long size given by _MIPS_SZLONG" # endif /* ============================================================== */ /* the following are all 32-bit byteswapped platforms */ #elif defined(vax) && defined(VMS) #define MACHINE VAXVMS #define BYTESWAPPED TRUE #elif defined(__alpha) && defined(__VMS) #if (__D_FLOAT == TRUE) /* this float option is the same as for VAX/VMS machines. */ #define MACHINE VAXVMS #define BYTESWAPPED TRUE #elif (__G_FLOAT == TRUE) /* G_FLOAT is the default for ALPHA VMS systems */ #define MACHINE ALPHAVMS #define BYTESWAPPED TRUE #define FLOATTYPE GFLOAT #elif (__IEEE_FLOAT == TRUE) #define MACHINE ALPHAVMS #define BYTESWAPPED TRUE #define FLOATTYPE IEEEFLOAT #endif /* end of alpha VMS case */ #elif defined(ultrix) && defined(unix) /* old Dec ultrix machines */ #define BYTESWAPPED TRUE #elif defined(__i386) || defined(__i386__) || defined(__i486__) || defined(__i586__) \ || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__TURBOC__) \ || defined(_NI_mswin_) || defined(__EMX__) /* generic 32-bit IBM PC */ #define MACHINE IBMPC #define BYTESWAPPED TRUE #elif defined(__arm__) /* This assumes all ARM are little endian. In the future, it might be */ /* necessary to use "if defined(__ARMEL__)" to distinguish little from big. */ /* (__ARMEL__ would be defined on little-endian, but not on big-endian). */ #define BYTESWAPPED TRUE #elif defined(__tile__) /* 64-core 8x8-architecture Tile64 platform */ #define BYTESWAPPED TRUE #elif defined(__sh__) /* SuperH CPU can be used in both little and big endian modes */ #if defined(__LITTLE_ENDIAN__) #define BYTESWAPPED TRUE #else #define BYTESWAPPED FALSE #endif #else /* assume all other machine uses the same IEEE formats as used in FITS files */ /* e.g., Macs fall into this category */ #define MACHINE NATIVE #define BYTESWAPPED FALSE #endif #ifndef MACHINE #define MACHINE OTHERTYPE #endif /* assume longs are 4 bytes long, unless previously set otherwise */ #ifndef LONGSIZE #define LONGSIZE 32 #endif /* end of block that determine long size and byte swapping */ /* ==================================================================== */ #define IGNORE_EOF 1 #define REPORT_EOF 0 #define DATA_UNDEFINED -1 #define NULL_UNDEFINED 1234554321 #define ASCII_NULL_UNDEFINED 1 /* indicate no defined null value */ #define maxvalue(A,B) ((A) > (B) ? (A) : (B)) #define minvalue(A,B) ((A) < (B) ? (A) : (B)) /* faster string comparison macros */ #define FSTRCMP(a,b) ((a)[0]<(b)[0]? -1:(a)[0]>(b)[0]?1:strcmp((a),(b))) #define FSTRNCMP(a,b,n) ((a)[0]<(b)[0]?-1:(a)[0]>(b)[0]?1:strncmp((a),(b),(n))) #if defined(__VMS) || defined(VMS) #define FNANMASK 0xFFFF /* mask all bits */ #define DNANMASK 0xFFFF /* mask all bits */ #else #define FNANMASK 0x7F80 /* mask bits 1 - 8; all set on NaNs */ /* all 0 on underflow or 0. */ #define DNANMASK 0x7FF0 /* mask bits 1 - 11; all set on NaNs */ /* all 0 on underflow or 0. */ #endif #if MACHINE == CRAY /* Cray machines: the large negative integer corresponds to the 3 most sig digits set to 1. If these 3 bits are set in a floating point number (64 bits), then it represents a reserved value (i.e., a NaN) */ #define fnan(L) ( (L) >= 0xE000000000000000 ? 1 : 0) ) #else /* these functions work for both big and little endian machines */ /* that use the IEEE floating point format for internal numbers */ /* These functions tests whether the float value is a reserved IEEE */ /* value such as a Not-a-Number (NaN), or underflow, overflow, or */ /* infinity. The functions returns 1 if the value is a NaN, overflow */ /* or infinity; it returns 2 if the value is an denormalized underflow */ /* value; otherwise it returns 0. fnan tests floats, dnan tests doubles */ #define fnan(L) \ ( (L & FNANMASK) == FNANMASK ? 1 : (L & FNANMASK) == 0 ? 2 : 0) #define dnan(L) \ ( (L & DNANMASK) == DNANMASK ? 1 : (L & DNANMASK) == 0 ? 2 : 0) #endif #define DSCHAR_MAX 127.49 /* max double value that fits in an signed char */ #define DSCHAR_MIN -128.49 /* min double value that fits in an signed char */ #define DUCHAR_MAX 255.49 /* max double value that fits in an unsigned char */ #define DUCHAR_MIN -0.49 /* min double value that fits in an unsigned char */ #define DUSHRT_MAX 65535.49 /* max double value that fits in a unsigned short*/ #define DUSHRT_MIN -0.49 /* min double value that fits in an unsigned short */ #define DSHRT_MAX 32767.49 /* max double value that fits in a short */ #define DSHRT_MIN -32768.49 /* min double value that fits in a short */ #if LONGSIZE == 32 # define DLONG_MAX 2147483647.49 /* max double value that fits in a long */ # define DLONG_MIN -2147483648.49 /* min double value that fits in a long */ # define DULONG_MAX 4294967295.49 /* max double that fits in a unsigned long */ #else # define DLONG_MAX 9.2233720368547752E18 /* max double value long */ # define DLONG_MIN -9.2233720368547752E18 /* min double value long */ # define DULONG_MAX 1.84467440737095504E19 /* max double value ulong */ #endif #define DULONG_MIN -0.49 /* min double value that fits in an unsigned long */ #define DLONGLONG_MAX 9.2233720368547755807E18 /* max double value longlong */ #define DLONGLONG_MIN -9.2233720368547755808E18 /* min double value longlong */ #define DUINT_MAX 4294967295.49 /* max dbl that fits in a unsigned 4-byte int */ #define DUINT_MIN -0.49 /* min dbl that fits in an unsigned 4-byte int */ #define DINT_MAX 2147483647.49 /* max double value that fits in a 4-byte int */ #define DINT_MIN -2147483648.49 /* min double value that fits in a 4-byte int */ #ifndef UINT32_MAX #define UINT32_MAX 4294967295U /* max unsigned 32-bit integer */ #endif #ifndef INT32_MAX #define INT32_MAX 2147483647 /* max 32-bit integer */ #endif #ifndef INT32_MIN #define INT32_MIN (-INT32_MAX -1) /* min 32-bit integer */ #endif #define COMPRESS_NULL_VALUE -2147483647 #define N_RANDOM 10000 /* DO NOT CHANGE THIS; used when quantizing real numbers */ int ffgnky(fitsfile *fptr, char *card, int *status); void ffcfmt(char *tform, char *cform); void ffcdsp(char *tform, char *cform); void ffswap2(short *values, long nvalues); void ffswap4(INT32BIT *values, long nvalues); void ffswap8(double *values, long nvalues); int ffi2c(LONGLONG ival, char *cval, int *status); int ffl2c(int lval, char *cval, int *status); int ffs2c(const char *instr, char *outstr, int *status); int ffr2f(float fval, int decim, char *cval, int *status); int ffr2e(float fval, int decim, char *cval, int *status); int ffd2f(double dval, int decim, char *cval, int *status); int ffd2e(double dval, int decim, char *cval, int *status); int ffc2ii(const char *cval, long *ival, int *status); int ffc2jj(const char *cval, LONGLONG *ival, int *status); int ffc2ll(const char *cval, int *lval, int *status); int ffc2rr(const char *cval, float *fval, int *status); int ffc2dd(const char *cval, double *dval, int *status); int ffc2x(const char *cval, char *dtype, long *ival, int *lval, char *sval, double *dval, int *status); int ffc2xx(const char *cval, char *dtype, LONGLONG *ival, int *lval, char *sval, double *dval, int *status); int ffc2s(const char *instr, char *outstr, int *status); int ffc2i(const char *cval, long *ival, int *status); int ffc2j(const char *cval, LONGLONG *ival, int *status); int ffc2r(const char *cval, float *fval, int *status); int ffc2d(const char *cval, double *dval, int *status); int ffc2l(const char *cval, int *lval, int *status); void ffxmsg(int action, char *err_message); int ffgcnt(fitsfile *fptr, char *value, int *status); int ffgtkn(fitsfile *fptr, int numkey, char *keyname, long *value, int *status); int ffgtknjj(fitsfile *fptr, int numkey, char *keyname, LONGLONG *value, int *status); int fftkyn(fitsfile *fptr, int numkey, char *keyname, char *value, int *status); int ffgphd(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis, LONGLONG naxes[], long *pcount, long *gcount, int *extend, double *bscale, double *bzero, LONGLONG *blank, int *nspace, int *status); int ffgttb(fitsfile *fptr, LONGLONG *rowlen, LONGLONG *nrows, LONGLONG *pcount, long *tfield, int *status); int ffmkey(fitsfile *fptr, const char *card, int *status); /* ffmbyt has been moved to fitsio.h */ int ffgbyt(fitsfile *fptr, LONGLONG nbytes, void *buffer, int *status); int ffpbyt(fitsfile *fptr, LONGLONG nbytes, void *buffer, int *status); int ffgbytoff(fitsfile *fptr, long gsize, long ngroups, long offset, void *buffer, int *status); int ffpbytoff(fitsfile *fptr, long gsize, long ngroups, long offset, void *buffer, int *status); int ffldrc(fitsfile *fptr, long record, int err_mode, int *status); int ffwhbf(fitsfile *fptr, int *nbuff); int ffbfeof(fitsfile *fptr, int *status); int ffbfwt(FITSfile *Fptr, int nbuff, int *status); int ffpxsz(int datatype); int ffourl(char *url, char *urltype, char *outfile, char *tmplfile, char *compspec, int *status); int ffparsecompspec(fitsfile *fptr, char *compspec, int *status); int ffoptplt(fitsfile *fptr, const char *tempname, int *status); int fits_is_this_a_copy(char *urltype); int fits_store_Fptr(FITSfile *Fptr, int *status); int fits_clear_Fptr(FITSfile *Fptr, int *status); int fits_already_open(fitsfile **fptr, char *url, char *urltype, char *infile, char *extspec, char *rowfilter, char *binspec, char *colspec, int mode,int *isopen, int *status); int ffedit_columns(fitsfile **fptr, char *outfile, char *expr, int *status); int fits_get_col_minmax(fitsfile *fptr, int colnum, float *datamin, float *datamax, int *status); int ffwritehisto(long totaln, long offset, long firstn, long nvalues, int narrays, iteratorCol *imagepars, void *userPointer); int ffcalchist(long totalrows, long offset, long firstrow, long nrows, int ncols, iteratorCol *colpars, void *userPointer); int ffrhdu(fitsfile *fptr, int *hdutype, int *status); int ffpinit(fitsfile *fptr, int *status); int ffainit(fitsfile *fptr, int *status); int ffbinit(fitsfile *fptr, int *status); int ffchdu(fitsfile *fptr, int *status); int ffwend(fitsfile *fptr, int *status); int ffpdfl(fitsfile *fptr, int *status); int ffuptf(fitsfile *fptr, int *status); int ffdblk(fitsfile *fptr, long nblocks, int *status); int ffgext(fitsfile *fptr, int moveto, int *exttype, int *status); int ffgtbc(fitsfile *fptr, LONGLONG *totalwidth, int *status); int ffgtbp(fitsfile *fptr, char *name, char *value, int *status); int ffiblk(fitsfile *fptr, long nblock, int headdata, int *status); int ffshft(fitsfile *fptr, LONGLONG firstbyte, LONGLONG nbytes, LONGLONG nshift, int *status); int ffgcprll(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, int writemode, double *scale, double *zero, char *tform, long *twidth, int *tcode, int *maxelem, LONGLONG *startpos, LONGLONG *elemnum, long *incre, LONGLONG *repeat, LONGLONG *rowlen, int *hdutype, LONGLONG *tnull, char *snull, int *status); int ffflushx(FITSfile *fptr); int ffseek(FITSfile *fptr, LONGLONG position); int ffread(FITSfile *fptr, long nbytes, void *buffer, int *status); int ffwrite(FITSfile *fptr, long nbytes, void *buffer, int *status); int fftrun(fitsfile *fptr, LONGLONG filesize, int *status); int ffpcluc(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, int *status); int ffgcll(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, int nultyp, char nulval, char *array, char *nularray, int *anynul, int *status); int ffgcls(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, int nultyp, char *nulval, char **array, char *nularray, int *anynul, int *status); int ffgcls2(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, int nultyp, char *nulval, char **array, char *nularray, int *anynul, int *status); int ffgclb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long elemincre, int nultyp, unsigned char nulval, unsigned char *array, char *nularray, int *anynul, int *status); int ffgclsb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long elemincre, int nultyp, signed char nulval, signed char *array, char *nularray, int *anynul, int *status); int ffgclui(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long elemincre, int nultyp, unsigned short nulval, unsigned short *array, char *nularray, int *anynul, int *status); int ffgcli(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long elemincre, int nultyp, short nulval, short *array, char *nularray, int *anynul, int *status); int ffgcluj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long elemincre, int nultyp, unsigned long nulval, unsigned long *array, char *nularray, int *anynul, int *status); int ffgcljj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long elemincre, int nultyp, LONGLONG nulval, LONGLONG *array, char *nularray, int *anynul, int *status); int ffgclj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long elemincre, int nultyp, long nulval, long *array, char *nularray, int *anynul, int *status); int ffgcluk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long elemincre, int nultyp, unsigned int nulval, unsigned int *array, char *nularray, int *anynul, int *status); int ffgclk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long elemincre, int nultyp, int nulval, int *array, char *nularray, int *anynul, int *status); int ffgcle(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long elemincre, int nultyp, float nulval, float *array, char *nularray, int *anynul, int *status); int ffgcld(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long elemincre, int nultyp, double nulval, double *array, char *nularray, int *anynul, int *status); int ffpi1b(fitsfile *fptr, long nelem, long incre, unsigned char *buffer, int *status); int ffpi2b(fitsfile *fptr, long nelem, long incre, short *buffer, int *status); int ffpi4b(fitsfile *fptr, long nelem, long incre, INT32BIT *buffer, int *status); int ffpi8b(fitsfile *fptr, long nelem, long incre, long *buffer, int *status); int ffpr4b(fitsfile *fptr, long nelem, long incre, float *buffer, int *status); int ffpr8b(fitsfile *fptr, long nelem, long incre, double *buffer, int *status); int ffgi1b(fitsfile *fptr, LONGLONG pos, long nelem, long incre, unsigned char *buffer, int *status); int ffgi2b(fitsfile *fptr, LONGLONG pos, long nelem, long incre, short *buffer, int *status); int ffgi4b(fitsfile *fptr, LONGLONG pos, long nelem, long incre, INT32BIT *buffer, int *status); int ffgi8b(fitsfile *fptr, LONGLONG pos, long nelem, long incre, long *buffer, int *status); int ffgr4b(fitsfile *fptr, LONGLONG pos, long nelem, long incre, float *buffer, int *status); int ffgr8b(fitsfile *fptr, LONGLONG pos, long nelem, long incre, double *buffer, int *status); int ffcins(fitsfile *fptr, LONGLONG naxis1, LONGLONG naxis2, LONGLONG nbytes, LONGLONG bytepos, int *status); int ffcdel(fitsfile *fptr, LONGLONG naxis1, LONGLONG naxis2, LONGLONG nbytes, LONGLONG bytepos, int *status); int ffkshf(fitsfile *fptr, int firstcol, int tfields, int nshift, int *status); int fffi1i1(unsigned char *input, long ntodo, double scale, double zero, int nullcheck, unsigned char tnull, unsigned char nullval, char *nullarray, int *anynull, unsigned char *output, int *status); int fffi2i1(short *input, long ntodo, double scale, double zero, int nullcheck, short tnull, unsigned char nullval, char *nullarray, int *anynull, unsigned char *output, int *status); int fffi4i1(INT32BIT *input, long ntodo, double scale, double zero, int nullcheck, INT32BIT tnull, unsigned char nullval, char *nullarray, int *anynull, unsigned char *output, int *status); int fffi8i1(LONGLONG *input, long ntodo, double scale, double zero, int nullcheck, LONGLONG tnull, unsigned char nullval, char *nullarray, int *anynull, unsigned char *output, int *status); int fffr4i1(float *input, long ntodo, double scale, double zero, int nullcheck, unsigned char nullval, char *nullarray, int *anynull, unsigned char *output, int *status); int fffr8i1(double *input, long ntodo, double scale, double zero, int nullcheck, unsigned char nullval, char *nullarray, int *anynull, unsigned char *output, int *status); int fffstri1(char *input, long ntodo, double scale, double zero, long twidth, double power, int nullcheck, char *snull, unsigned char nullval, char *nullarray, int *anynull, unsigned char *output, int *status); int fffi1s1(unsigned char *input, long ntodo, double scale, double zero, int nullcheck, unsigned char tnull, signed char nullval, char *nullarray, int *anynull, signed char *output, int *status); int fffi2s1(short *input, long ntodo, double scale, double zero, int nullcheck, short tnull, signed char nullval, char *nullarray, int *anynull, signed char *output, int *status); int fffi4s1(INT32BIT *input, long ntodo, double scale, double zero, int nullcheck, INT32BIT tnull, signed char nullval, char *nullarray, int *anynull, signed char *output, int *status); int fffi8s1(LONGLONG *input, long ntodo, double scale, double zero, int nullcheck, LONGLONG tnull, signed char nullval, char *nullarray, int *anynull, signed char *output, int *status); int fffr4s1(float *input, long ntodo, double scale, double zero, int nullcheck, signed char nullval, char *nullarray, int *anynull, signed char *output, int *status); int fffr8s1(double *input, long ntodo, double scale, double zero, int nullcheck, signed char nullval, char *nullarray, int *anynull, signed char *output, int *status); int fffstrs1(char *input, long ntodo, double scale, double zero, long twidth, double power, int nullcheck, char *snull, signed char nullval, char *nullarray, int *anynull, signed char *output, int *status); int fffi1u2(unsigned char *input, long ntodo, double scale, double zero, int nullcheck, unsigned char tnull, unsigned short nullval, char *nullarray, int *anynull, unsigned short *output, int *status); int fffi2u2(short *input, long ntodo, double scale, double zero, int nullcheck, short tnull, unsigned short nullval, char *nullarray, int *anynull, unsigned short *output, int *status); int fffi4u2(INT32BIT *input, long ntodo, double scale, double zero, int nullcheck, INT32BIT tnull, unsigned short nullval, char *nullarray, int *anynull, unsigned short *output, int *status); int fffi8u2(LONGLONG *input, long ntodo, double scale, double zero, int nullcheck, LONGLONG tnull, unsigned short nullval, char *nullarray, int *anynull, unsigned short *output, int *status); int fffr4u2(float *input, long ntodo, double scale, double zero, int nullcheck, unsigned short nullval, char *nullarray, int *anynull, unsigned short *output, int *status); int fffr8u2(double *input, long ntodo, double scale, double zero, int nullcheck, unsigned short nullval, char *nullarray, int *anynull, unsigned short *output, int *status); int fffstru2(char *input, long ntodo, double scale, double zero, long twidth, double power, int nullcheck, char *snull, unsigned short nullval, char *nullarray, int *anynull, unsigned short *output, int *status); int fffi1i2(unsigned char *input, long ntodo, double scale, double zero, int nullcheck, unsigned char tnull, short nullval, char *nullarray, int *anynull, short *output, int *status); int fffi2i2(short *input, long ntodo, double scale, double zero, int nullcheck, short tnull, short nullval, char *nullarray, int *anynull, short *output, int *status); int fffi4i2(INT32BIT *input, long ntodo, double scale, double zero, int nullcheck, INT32BIT tnull, short nullval, char *nullarray, int *anynull, short *output, int *status); int fffi8i2(LONGLONG *input, long ntodo, double scale, double zero, int nullcheck, LONGLONG tnull, short nullval, char *nullarray, int *anynull, short *output, int *status); int fffr4i2(float *input, long ntodo, double scale, double zero, int nullcheck, short nullval, char *nullarray, int *anynull, short *output, int *status); int fffr8i2(double *input, long ntodo, double scale, double zero, int nullcheck, short nullval, char *nullarray, int *anynull, short *output, int *status); int fffstri2(char *input, long ntodo, double scale, double zero, long twidth, double power, int nullcheck, char *snull, short nullval, char *nullarray, int *anynull, short *output, int *status); int fffi1u4(unsigned char *input, long ntodo, double scale, double zero, int nullcheck, unsigned char tnull, unsigned long nullval, char *nullarray, int *anynull, unsigned long *output, int *status); int fffi2u4(short *input, long ntodo, double scale, double zero, int nullcheck, short tnull, unsigned long nullval, char *nullarray, int *anynull, unsigned long *output, int *status); int fffi4u4(INT32BIT *input, long ntodo, double scale, double zero, int nullcheck, INT32BIT tnull, unsigned long nullval, char *nullarray, int *anynull, unsigned long *output, int *status); int fffi8u4(LONGLONG *input, long ntodo, double scale, double zero, int nullcheck, LONGLONG tnull, unsigned long nullval, char *nullarray, int *anynull, unsigned long *output, int *status); int fffr4u4(float *input, long ntodo, double scale, double zero, int nullcheck, unsigned long nullval, char *nullarray, int *anynull, unsigned long *output, int *status); int fffr8u4(double *input, long ntodo, double scale, double zero, int nullcheck, unsigned long nullval, char *nullarray, int *anynull, unsigned long *output, int *status); int fffstru4(char *input, long ntodo, double scale, double zero, long twidth, double power, int nullcheck, char *snull, unsigned long nullval, char *nullarray, int *anynull, unsigned long *output, int *status); int fffi1i4(unsigned char *input, long ntodo, double scale, double zero, int nullcheck, unsigned char tnull, long nullval, char *nullarray, int *anynull, long *output, int *status); int fffi2i4(short *input, long ntodo, double scale, double zero, int nullcheck, short tnull, long nullval, char *nullarray, int *anynull, long *output, int *status); int fffi4i4(INT32BIT *input, long ntodo, double scale, double zero, int nullcheck, INT32BIT tnull, long nullval, char *nullarray, int *anynull, long *output, int *status); int fffi8i4(LONGLONG *input, long ntodo, double scale, double zero, int nullcheck, LONGLONG tnull, long nullval, char *nullarray, int *anynull, long *output, int *status); int fffr4i4(float *input, long ntodo, double scale, double zero, int nullcheck, long nullval, char *nullarray, int *anynull, long *output, int *status); int fffr8i4(double *input, long ntodo, double scale, double zero, int nullcheck, long nullval, char *nullarray, int *anynull, long *output, int *status); int fffstri4(char *input, long ntodo, double scale, double zero, long twidth, double power, int nullcheck, char *snull, long nullval, char *nullarray, int *anynull, long *output, int *status); int fffi1int(unsigned char *input, long ntodo, double scale, double zero, int nullcheck, unsigned char tnull, int nullval, char *nullarray, int *anynull, int *output, int *status); int fffi2int(short *input, long ntodo, double scale, double zero, int nullcheck, short tnull, int nullval, char *nullarray, int *anynull, int *output, int *status); int fffi4int(INT32BIT *input, long ntodo, double scale, double zero, int nullcheck, INT32BIT tnull, int nullval, char *nullarray, int *anynull, int *output, int *status); int fffi8int(LONGLONG *input, long ntodo, double scale, double zero, int nullcheck, LONGLONG tnull, int nullval, char *nullarray, int *anynull, int *output, int *status); int fffr4int(float *input, long ntodo, double scale, double zero, int nullcheck, int nullval, char *nullarray, int *anynull, int *output, int *status); int fffr8int(double *input, long ntodo, double scale, double zero, int nullcheck, int nullval, char *nullarray, int *anynull, int *output, int *status); int fffstrint(char *input, long ntodo, double scale, double zero, long twidth, double power, int nullcheck, char *snull, int nullval, char *nullarray, int *anynull, int *output, int *status); int fffi1uint(unsigned char *input, long ntodo, double scale, double zero, int nullcheck, unsigned char tnull, unsigned int nullval, char *nullarray, int *anynull, unsigned int *output, int *status); int fffi2uint(short *input, long ntodo, double scale, double zero, int nullcheck, short tnull, unsigned int nullval, char *nullarray, int *anynull, unsigned int *output, int *status); int fffi4uint(INT32BIT *input, long ntodo, double scale, double zero, int nullcheck, INT32BIT tnull, unsigned int nullval, char *nullarray, int *anynull, unsigned int *output, int *status); int fffi8uint(LONGLONG *input, long ntodo, double scale, double zero, int nullcheck, LONGLONG tnull, unsigned int nullval, char *nullarray, int *anynull, unsigned int *output, int *status); int fffr4uint(float *input, long ntodo, double scale, double zero, int nullcheck, unsigned int nullval, char *nullarray, int *anynull, unsigned int *output, int *status); int fffr8uint(double *input, long ntodo, double scale, double zero, int nullcheck, unsigned int nullval, char *nullarray, int *anynull, unsigned int *output, int *status); int fffstruint(char *input, long ntodo, double scale, double zero, long twidth, double power, int nullcheck, char *snull, unsigned int nullval, char *nullarray, int *anynull, unsigned int *output, int *status); int fffi1i8(unsigned char *input, long ntodo, double scale, double zero, int nullcheck, unsigned char tnull, LONGLONG nullval, char *nullarray, int *anynull, LONGLONG *output, int *status); int fffi2i8(short *input, long ntodo, double scale, double zero, int nullcheck, short tnull, LONGLONG nullval, char *nullarray, int *anynull, LONGLONG *output, int *status); int fffi4i8(INT32BIT *input, long ntodo, double scale, double zero, int nullcheck, INT32BIT tnull, LONGLONG nullval, char *nullarray, int *anynull, LONGLONG *output, int *status); int fffi8i8(LONGLONG *input, long ntodo, double scale, double zero, int nullcheck, LONGLONG tnull, LONGLONG nullval, char *nullarray, int *anynull, LONGLONG *output, int *status); int fffr4i8(float *input, long ntodo, double scale, double zero, int nullcheck, LONGLONG nullval, char *nullarray, int *anynull, LONGLONG *output, int *status); int fffr8i8(double *input, long ntodo, double scale, double zero, int nullcheck, LONGLONG nullval, char *nullarray, int *anynull, LONGLONG *output, int *status); int fffstri8(char *input, long ntodo, double scale, double zero, long twidth, double power, int nullcheck, char *snull, LONGLONG nullval, char *nullarray, int *anynull, LONGLONG *output, int *status); int fffi1r4(unsigned char *input, long ntodo, double scale, double zero, int nullcheck, unsigned char tnull, float nullval, char *nullarray, int *anynull, float *output, int *status); int fffi2r4(short *input, long ntodo, double scale, double zero, int nullcheck, short tnull, float nullval, char *nullarray, int *anynull, float *output, int *status); int fffi4r4(INT32BIT *input, long ntodo, double scale, double zero, int nullcheck, INT32BIT tnull, float nullval, char *nullarray, int *anynull, float *output, int *status); int fffi8r4(LONGLONG *input, long ntodo, double scale, double zero, int nullcheck, LONGLONG tnull, float nullval, char *nullarray, int *anynull, float *output, int *status); int fffr4r4(float *input, long ntodo, double scale, double zero, int nullcheck, float nullval, char *nullarray, int *anynull, float *output, int *status); int fffr8r4(double *input, long ntodo, double scale, double zero, int nullcheck, float nullval, char *nullarray, int *anynull, float *output, int *status); int fffstrr4(char *input, long ntodo, double scale, double zero, long twidth, double power, int nullcheck, char *snull, float nullval, char *nullarray, int *anynull, float *output, int *status); int fffi1r8(unsigned char *input, long ntodo, double scale, double zero, int nullcheck, unsigned char tnull, double nullval, char *nullarray, int *anynull, double *output, int *status); int fffi2r8(short *input, long ntodo, double scale, double zero, int nullcheck, short tnull, double nullval, char *nullarray, int *anynull, double *output, int *status); int fffi4r8(INT32BIT *input, long ntodo, double scale, double zero, int nullcheck, INT32BIT tnull, double nullval, char *nullarray, int *anynull, double *output, int *status); int fffi8r8(LONGLONG *input, long ntodo, double scale, double zero, int nullcheck, LONGLONG tnull, double nullval, char *nullarray, int *anynull, double *output, int *status); int fffr4r8(float *input, long ntodo, double scale, double zero, int nullcheck, double nullval, char *nullarray, int *anynull, double *output, int *status); int fffr8r8(double *input, long ntodo, double scale, double zero, int nullcheck, double nullval, char *nullarray, int *anynull, double *output, int *status); int fffstrr8(char *input, long ntodo, double scale, double zero, long twidth, double power, int nullcheck, char *snull, double nullval, char *nullarray, int *anynull, double *output, int *status); int ffi1fi1(unsigned char *array, long ntodo, double scale, double zero, unsigned char *buffer, int *status); int ffs1fi1(signed char *array, long ntodo, double scale, double zero, unsigned char *buffer, int *status); int ffu2fi1(unsigned short *array, long ntodo, double scale, double zero, unsigned char *buffer, int *status); int ffi2fi1(short *array, long ntodo, double scale, double zero, unsigned char *buffer, int *status); int ffu4fi1(unsigned long *array, long ntodo, double scale, double zero, unsigned char *buffer, int *status); int ffi4fi1(long *array, long ntodo, double scale, double zero, unsigned char *buffer, int *status); int ffi8fi1(LONGLONG *array, long ntodo, double scale, double zero, unsigned char *buffer, int *status); int ffuintfi1(unsigned int *array, long ntodo, double scale, double zero, unsigned char *buffer, int *status); int ffintfi1(int *array, long ntodo, double scale, double zero, unsigned char *buffer, int *status); int ffr4fi1(float *array, long ntodo, double scale, double zero, unsigned char *buffer, int *status); int ffr8fi1(double *array, long ntodo, double scale, double zero, unsigned char *buffer, int *status); int ffi1fi2(unsigned char *array, long ntodo, double scale, double zero, short *buffer, int *status); int ffs1fi2(signed char *array, long ntodo, double scale, double zero, short *buffer, int *status); int ffu2fi2(unsigned short *array, long ntodo, double scale, double zero, short *buffer, int *status); int ffi2fi2(short *array, long ntodo, double scale, double zero, short *buffer, int *status); int ffu4fi2(unsigned long *array, long ntodo, double scale, double zero, short *buffer, int *status); int ffi4fi2(long *array, long ntodo, double scale, double zero, short *buffer, int *status); int ffi8fi2(LONGLONG *array, long ntodo, double scale, double zero, short *buffer, int *status); int ffuintfi2(unsigned int *array, long ntodo, double scale, double zero, short *buffer, int *status); int ffintfi2(int *array, long ntodo, double scale, double zero, short *buffer, int *status); int ffr4fi2(float *array, long ntodo, double scale, double zero, short *buffer, int *status); int ffr8fi2(double *array, long ntodo, double scale, double zero, short *buffer, int *status); int ffi1fi4(unsigned char *array, long ntodo, double scale, double zero, INT32BIT *buffer, int *status); int ffs1fi4(signed char *array, long ntodo, double scale, double zero, INT32BIT *buffer, int *status); int ffu2fi4(unsigned short *array, long ntodo, double scale, double zero, INT32BIT *buffer, int *status); int ffi2fi4(short *array, long ntodo, double scale, double zero, INT32BIT *buffer, int *status); int ffu4fi4(unsigned long *array, long ntodo, double scale, double zero, INT32BIT *buffer, int *status); int ffi4fi4(long *array, long ntodo, double scale, double zero, INT32BIT *buffer, int *status); int ffi8fi4(LONGLONG *array, long ntodo, double scale, double zero, INT32BIT *buffer, int *status); int ffuintfi4(unsigned int *array, long ntodo, double scale, double zero, INT32BIT *buffer, int *status); int ffintfi4(int *array, long ntodo, double scale, double zero, INT32BIT *buffer, int *status); int ffr4fi4(float *array, long ntodo, double scale, double zero, INT32BIT *buffer, int *status); int ffr8fi4(double *array, long ntodo, double scale, double zero, INT32BIT *buffer, int *status); int fflongfi8(long *array, long ntodo, double scale, double zero, LONGLONG *buffer, int *status); int ffi8fi8(LONGLONG *array, long ntodo, double scale, double zero, LONGLONG *buffer, int *status); int ffi2fi8(short *array, long ntodo, double scale, double zero, LONGLONG *buffer, int *status); int ffi1fi8(unsigned char *array, long ntodo, double scale, double zero, LONGLONG *buffer, int *status); int ffs1fi8(signed char *array, long ntodo, double scale, double zero, LONGLONG *buffer, int *status); int ffr4fi8(float *array, long ntodo, double scale, double zero, LONGLONG *buffer, int *status); int ffr8fi8(double *array, long ntodo, double scale, double zero, LONGLONG *buffer, int *status); int ffintfi8(int *array, long ntodo, double scale, double zero, LONGLONG *buffer, int *status); int ffu2fi8(unsigned short *array, long ntodo, double scale, double zero, LONGLONG *buffer, int *status); int ffu4fi8(unsigned long *array, long ntodo, double scale, double zero, LONGLONG *buffer, int *status); int ffuintfi8(unsigned int *array, long ntodo, double scale, double zero, LONGLONG *buffer, int *status); int ffi1fr4(unsigned char *array, long ntodo, double scale, double zero, float *buffer, int *status); int ffs1fr4(signed char *array, long ntodo, double scale, double zero, float *buffer, int *status); int ffu2fr4(unsigned short *array, long ntodo, double scale, double zero, float *buffer, int *status); int ffi2fr4(short *array, long ntodo, double scale, double zero, float *buffer, int *status); int ffu4fr4(unsigned long *array, long ntodo, double scale, double zero, float *buffer, int *status); int ffi4fr4(long *array, long ntodo, double scale, double zero, float *buffer, int *status); int ffi8fr4(LONGLONG *array, long ntodo, double scale, double zero, float *buffer, int *status); int ffuintfr4(unsigned int *array, long ntodo, double scale, double zero, float *buffer, int *status); int ffintfr4(int *array, long ntodo, double scale, double zero, float *buffer, int *status); int ffr4fr4(float *array, long ntodo, double scale, double zero, float *buffer, int *status); int ffr8fr4(double *array, long ntodo, double scale, double zero, float *buffer, int *status); int ffi1fr8(unsigned char *array, long ntodo, double scale, double zero, double *buffer, int *status); int ffs1fr8(signed char *array, long ntodo, double scale, double zero, double *buffer, int *status); int ffu2fr8(unsigned short *array, long ntodo, double scale, double zero, double *buffer, int *status); int ffi2fr8(short *array, long ntodo, double scale, double zero, double *buffer, int *status); int ffu4fr8(unsigned long *array, long ntodo, double scale, double zero, double *buffer, int *status); int ffi4fr8(long *array, long ntodo, double scale, double zero, double *buffer, int *status); int ffi8fr8(LONGLONG *array, long ntodo, double scale, double zero, double *buffer, int *status); int ffuintfr8(unsigned int *array, long ntodo, double scale, double zero, double *buffer, int *status); int ffintfr8(int *array, long ntodo, double scale, double zero, double *buffer, int *status); int ffr4fr8(float *array, long ntodo, double scale, double zero, double *buffer, int *status); int ffr8fr8(double *array, long ntodo, double scale, double zero, double *buffer, int *status); int ffi1fstr(unsigned char *input, long ntodo, double scale, double zero, char *cform, long twidth, char *output, int *status); int ffs1fstr(signed char *input, long ntodo, double scale, double zero, char *cform, long twidth, char *output, int *status); int ffu2fstr(unsigned short *input, long ntodo, double scale, double zero, char *cform, long twidth, char *output, int *status); int ffi2fstr(short *input, long ntodo, double scale, double zero, char *cform, long twidth, char *output, int *status); int ffu4fstr(unsigned long *input, long ntodo, double scale, double zero, char *cform, long twidth, char *output, int *status); int ffi4fstr(long *input, long ntodo, double scale, double zero, char *cform, long twidth, char *output, int *status); int ffi8fstr(LONGLONG *input, long ntodo, double scale, double zero, char *cform, long twidth, char *output, int *status); int ffintfstr(int *input, long ntodo, double scale, double zero, char *cform, long twidth, char *output, int *status); int ffuintfstr(unsigned int *input, long ntodo, double scale, double zero, char *cform, long twidth, char *output, int *status); int ffr4fstr(float *input, long ntodo, double scale, double zero, char *cform, long twidth, char *output, int *status); int ffr8fstr(double *input, long ntodo, double scale, double zero, char *cform, long twidth, char *output, int *status); /* the following 4 routines are VMS macros used on VAX or Alpha VMS */ void ieevpd(double *inarray, double *outarray, long *nvals); void ieevud(double *inarray, double *outarray, long *nvals); void ieevpr(float *inarray, float *outarray, long *nvals); void ieevur(float *inarray, float *outarray, long *nvals); /* routines related to the lexical parser */ int ffselect_table(fitsfile **fptr, char *outfile, char *expr, int *status); int ffiprs( fitsfile *fptr, int compressed, char *expr, int maxdim, int *datatype, long *nelem, int *naxis, long *naxes, int *status ); void ffcprs( void ); int ffcvtn( int inputType, void *input, char *undef, long ntodo, int outputType, void *nulval, void *output, int *anynull, int *status ); int parse_data( long totalrows, long offset, long firstrow, long nrows, int nCols, iteratorCol *colData, void *userPtr ); int uncompress_hkdata( fitsfile *fptr, long ntimes, double *times, int *status ); int ffffrw_work( long totalrows, long offset, long firstrow, long nrows, int nCols, iteratorCol *colData, void *userPtr ); int fits_translate_pixkeyword(char *inrec, char *outrec,char *patterns[][2], int npat, int naxis, int *colnum, int *pat_num, int *i, int *j, int *n, int *m, int *l, int *status); /* image compression routines */ int fits_write_compressed_img(fitsfile *fptr, int datatype, long *fpixel, long *lpixel, int nullcheck, void *array, void *nulval, int *status); int fits_write_compressed_pixels(fitsfile *fptr, int datatype, LONGLONG fpixel, LONGLONG npixels, int nullcheck, void *array, void *nulval, int *status); int fits_write_compressed_img_plane(fitsfile *fptr, int datatype, int bytesperpixel, long nplane, long *firstcoord, long *lastcoord, long *naxes, int nullcheck, void *array, void *nullval, long *nread, int *status); int imcomp_init_table(fitsfile *outfptr, int bitpix, int naxis,long *naxes, int writebitpix, int *status); int imcomp_calc_max_elem (int comptype, int nx, int zbitpix, int blocksize); int imcomp_copy_imheader(fitsfile *infptr, fitsfile *outfptr, int *status); int imcomp_copy_img2comp(fitsfile *infptr, fitsfile *outfptr, int *status); int imcomp_copy_comp2img(fitsfile *infptr, fitsfile *outfptr, int norec, int *status); int imcomp_copy_prime2img(fitsfile *infptr, fitsfile *outfptr, int *status); int imcomp_compress_image (fitsfile *infptr, fitsfile *outfptr, int *status); int imcomp_compress_tile (fitsfile *outfptr, long row, int datatype, void *tiledata, long tilelen, long nx, long ny, int nullcheck, void *nullval, int *status); int imcomp_nullscale(int *idata, long tilelen, int nullflagval, int nullval, double scale, double zero, int * status); int imcomp_nullvalues(int *idata, long tilelen, int nullflagval, int nullval, int * status); int imcomp_scalevalues(int *idata, long tilelen, double scale, double zero, int * status); int imcomp_nullscalefloats(float *fdata, long tilelen, int *idata, double scale, double zero, int nullcheck, float nullflagval, int nullval, int *status); int imcomp_nullfloats(float *fdata, long tilelen, int *idata, int nullcheck, float nullflagval, int nullval, int *status); int imcomp_nullscaledoubles(double *fdata, long tilelen, int *idata, double scale, double zero, int nullcheck, double nullflagval, int nullval, int *status); int imcomp_nulldoubles(double *fdata, long tilelen, int *idata, int nullcheck, double nullflagval, int nullval, int *status); /* image decompression routines */ int fits_read_compressed_img(fitsfile *fptr, int datatype, LONGLONG *fpixel,LONGLONG *lpixel,long *inc, int nullcheck, void *nulval, void *array, char *nullarray, int *anynul, int *status); int fits_read_compressed_pixels(fitsfile *fptr, int datatype, LONGLONG fpixel, LONGLONG npixels, int nullcheck, void *nulval, void *array, char *nullarray, int *anynul, int *status); int fits_read_compressed_img_plane(fitsfile *fptr, int datatype, int bytesperpixel, long nplane, LONGLONG *firstcoord, LONGLONG *lastcoord, long *inc, long *naxes, int nullcheck, void *nullval, void *array, char *nullarray, int *anynul, long *nread, int *status); int imcomp_get_compressed_image_par(fitsfile *infptr, int *status); int imcomp_decompress_tile (fitsfile *infptr, int nrow, int tilesize, int datatype, int nullcheck, void *nulval, void *buffer, char *bnullarray, int *anynul, int *status); int imcomp_copy_overlap (char *tile, int pixlen, int ndim, long *tfpixel, long *tlpixel, char *bnullarray, char *image, long *fpixel, long *lpixel, long *inc, int nullcheck, char *nullarray, int *status); int imcomp_test_overlap (int ndim, long *tfpixel, long *tlpixel, long *fpixel, long *lpixel, long *inc, int *status); int imcomp_merge_overlap (char *tile, int pixlen, int ndim, long *tfpixel, long *tlpixel, char *bnullarray, char *image, long *fpixel, long *lpixel, int nullcheck, int *status); int imcomp_decompress_img(fitsfile *infptr, fitsfile *outfptr, int datatype, int *status); int fits_quantize_float (long row, float fdata[], long nx, long ny, int nullcheck, float in_null_value, float quantize_level, int dither_method, int idata[], double *bscale, double *bzero, int *iminval, int *imaxval); int fits_quantize_double (long row, double fdata[], long nx, long ny, int nullcheck, double in_null_value, float quantize_level, int dither_method, int idata[], double *bscale, double *bzero, int *iminval, int *imaxval); int fits_rcomp(int a[], int nx, unsigned char *c, int clen,int nblock); int fits_rcomp_short(short a[], int nx, unsigned char *c, int clen,int nblock); int fits_rcomp_byte(signed char a[], int nx, unsigned char *c, int clen,int nblock); int fits_rdecomp (unsigned char *c, int clen, unsigned int array[], int nx, int nblock); int fits_rdecomp_short (unsigned char *c, int clen, unsigned short array[], int nx, int nblock); int fits_rdecomp_byte (unsigned char *c, int clen, unsigned char array[], int nx, int nblock); int pl_p2li (int *pxsrc, int xs, short *lldst, int npix); int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix); int fits_init_randoms(void); int fits_unset_compression_param( fitsfile *fptr, int *status); int fits_unset_compression_request( fitsfile *fptr, int *status); int fitsio_init_lock(void); /* general driver routines */ int urltype2driver(char *urltype, int *driver); int fits_register_driver( char *prefix, int (*init)(void), int (*fitsshutdown)(void), int (*setoptions)(int option), int (*getoptions)(int *options), int (*getversion)(int *version), int (*checkfile) (char *urltype, char *infile, char *outfile), int (*fitsopen)(char *filename, int rwmode, int *driverhandle), int (*fitscreate)(char *filename, int *driverhandle), int (*fitstruncate)(int driverhandle, LONGLONG filesize), int (*fitsclose)(int driverhandle), int (*fremove)(char *filename), int (*size)(int driverhandle, LONGLONG *size), int (*flush)(int driverhandle), int (*seek)(int driverhandle, LONGLONG offset), int (*fitsread) (int driverhandle, void *buffer, long nbytes), int (*fitswrite)(int driverhandle, void *buffer, long nbytes)); /* file driver I/O routines */ int file_init(void); int file_setoptions(int options); int file_getoptions(int *options); int file_getversion(int *version); int file_shutdown(void); int file_checkfile(char *urltype, char *infile, char *outfile); int file_open(char *filename, int rwmode, int *driverhandle); int file_compress_open(char *filename, int rwmode, int *hdl); int file_openfile(char *filename, int rwmode, FILE **diskfile); int file_create(char *filename, int *driverhandle); int file_truncate(int driverhandle, LONGLONG filesize); int file_size(int driverhandle, LONGLONG *filesize); int file_close(int driverhandle); int file_remove(char *filename); int file_flush(int driverhandle); int file_seek(int driverhandle, LONGLONG offset); int file_read (int driverhandle, void *buffer, long nbytes); int file_write(int driverhandle, void *buffer, long nbytes); int file_is_compressed(char *filename); /* stream driver I/O routines */ int stream_open(char *filename, int rwmode, int *driverhandle); int stream_create(char *filename, int *driverhandle); int stream_size(int driverhandle, LONGLONG *filesize); int stream_close(int driverhandle); int stream_flush(int driverhandle); int stream_seek(int driverhandle, LONGLONG offset); int stream_read (int driverhandle, void *buffer, long nbytes); int stream_write(int driverhandle, void *buffer, long nbytes); /* memory driver I/O routines */ int mem_init(void); int mem_setoptions(int options); int mem_getoptions(int *options); int mem_getversion(int *version); int mem_shutdown(void); int mem_create(char *filename, int *handle); int mem_create_comp(char *filename, int *handle); int mem_openmem(void **buffptr, size_t *buffsize, size_t deltasize, void *(*memrealloc)(void *p, size_t newsize), int *handle); int mem_createmem(size_t memsize, int *handle); int stdin_checkfile(char *urltype, char *infile, char *outfile); int stdin_open(char *filename, int rwmode, int *handle); int stdin2mem(int hd); int stdin2file(int hd); int stdout_close(int handle); int mem_compress_openrw(char *filename, int rwmode, int *hdl); int mem_compress_open(char *filename, int rwmode, int *hdl); int mem_compress_stdin_open(char *filename, int rwmode, int *hdl); int mem_iraf_open(char *filename, int rwmode, int *hdl); int mem_rawfile_open(char *filename, int rwmode, int *hdl); int mem_size(int handle, LONGLONG *filesize); int mem_truncate(int handle, LONGLONG filesize); int mem_close_free(int handle); int mem_close_keep(int handle); int mem_close_comp(int handle); int mem_seek(int handle, LONGLONG offset); int mem_read(int hdl, void *buffer, long nbytes); int mem_write(int hdl, void *buffer, long nbytes); int mem_uncompress2mem(char *filename, FILE *diskfile, int hdl); int iraf2mem(char *filename, char **buffptr, size_t *buffsize, size_t *filesize, int *status); /* root driver I/O routines */ int root_init(void); int root_setoptions(int options); int root_getoptions(int *options); int root_getversion(int *version); int root_shutdown(void); int root_open(char *filename, int rwmode, int *driverhandle); int root_create(char *filename, int *driverhandle); int root_close(int driverhandle); int root_flush(int driverhandle); int root_seek(int driverhandle, LONGLONG offset); int root_read (int driverhandle, void *buffer, long nbytes); int root_write(int driverhandle, void *buffer, long nbytes); int root_size(int handle, LONGLONG *filesize); /* http driver I/O routines */ int http_checkfile(char *urltype, char *infile, char *outfile); int http_open(char *filename, int rwmode, int *driverhandle); int http_file_open(char *filename, int rwmode, int *driverhandle); int http_compress_open(char *filename, int rwmode, int *driverhandle); /* ftp driver I/O routines */ int ftp_checkfile(char *urltype, char *infile, char *outfile); int ftp_open(char *filename, int rwmode, int *driverhandle); int ftp_file_open(char *filename, int rwmode, int *driverhandle); int ftp_compress_open(char *filename, int rwmode, int *driverhandle); int uncompress2mem(char *filename, FILE *diskfile, char **buffptr, size_t *buffsize, void *(*mem_realloc)(void *p, size_t newsize), size_t *filesize, int *status); int uncompress2mem_from_mem( char *inmemptr, size_t inmemsize, char **buffptr, size_t *buffsize, void *(*mem_realloc)(void *p, size_t newsize), size_t *filesize, int *status); int uncompress2file(char *filename, FILE *indiskfile, FILE *outdiskfile, int *status); int compress2mem_from_mem( char *inmemptr, size_t inmemsize, char **buffptr, size_t *buffsize, void *(*mem_realloc)(void *p, size_t newsize), size_t *filesize, int *status); int compress2file_from_mem( char *inmemptr, size_t inmemsize, FILE *outdiskfile, size_t *filesize, /* O - size of file, in bytes */ int *status); #ifdef HAVE_GSIFTP /* prototypes for gsiftp driver I/O routines */ #include "drvrgsiftp.h" #endif #ifdef HAVE_SHMEM_SERVICES /* prototypes for shared memory driver I/O routines */ #include "drvrsmem.h" #endif #if defined(vms) || defined(__vms) || defined(WIN32) || defined(__WIN32__) || (defined(macintosh) && !defined(TARGET_API_MAC_CARBON)) /* A hack for nonunix machines, which lack strcasecmp and strncasecmp */ int strcasecmp (const char *s1, const char *s2 ); int strncasecmp(const char *s1, const char *s2, size_t n); #endif /* end of the entire "ifndef _FITSIO2_H" block */ #endif astropy-1.1.1/cextern/cfitsio/getcolsb.c0000644001134200020070000022324512602615520021204 0ustar embrayscience00000000000000/* This file, getcolsb.c, contains routines that read data elements from */ /* a FITS image or table, with signed char (signed byte) data type. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffgpvsb(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ signed char nulval, /* I - value for undefined pixels */ signed char *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; char cdummy; int nullcheck = 1; signed char nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_read_compressed_pixels(fptr, TSBYTE, firstelem, nelem, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclsb(fptr, 2, row, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgpfsb(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ signed char *array, /* O - array of values that are returned */ char *nularray, /* O - array of null pixel flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any undefined pixels in the returned array will be set = 0 and the corresponding nularray value will be set = 1. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; int nullcheck = 2; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_read_compressed_pixels(fptr, TSBYTE, firstelem, nelem, nullcheck, NULL, array, nularray, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclsb(fptr, 2, row, firstelem, nelem, 1, 2, 0, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg2dsb(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ signed char nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ signed char *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { /* call the 3D reading routine, with the 3rd dimension = 1 */ ffg3dsb(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg3dsb(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ signed char nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ signed char *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 3-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { long tablerow, ii, jj; LONGLONG nfits, narray; char cdummy; int nullcheck = 1; long inc[] = {1,1,1}; LONGLONG fpixel[] = {1,1,1}; LONGLONG lpixel[3]; signed char nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = ncols; lpixel[1] = nrows; lpixel[2] = naxis3; nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TSBYTE, fpixel, lpixel, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so read all at once */ ffgclsb(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to read */ narray = 0; /* next pixel in output array to be filled */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* reading naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffgclsb(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, &array[narray], &cdummy, anynul, status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsvsb(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ signed char nulval, /* I - value to set undefined pixels */ signed char *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii, i0, i1, i2, i3, i4, i5, i6, i7, i8, row, rstr, rstp, rinc; long str[9], stp[9], incr[9], dir[9]; long nelem, nultyp, ninc, numcol; LONGLONG felem, dsize[10], blcll[9], trcll[9]; int hdutype, anyf; char ldummy, msg[FLEN_ERRMSG]; int nullcheck = 1; signed char nullvalue; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvsb is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TSBYTE, blcll, trcll, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 1; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; dir[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { if (hdutype == IMAGE_HDU) { dir[ii] = -1; } else { sprintf(msg, "ffgsvsb: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; dsize[ii] = dsize[ii] * dir[ii]; } dsize[naxis] = dsize[naxis] * dir[naxis]; if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; ninc = incr[0] * dir[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) { for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) { for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) { for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) { for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) { for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) { for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) { for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) { felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; if ( ffgclsb(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &ldummy, &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsfsb(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ signed char *array, /* O - array to be filled and returned */ char *flagval, /* O - set to 1 if corresponding value is null */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dsize[10]; LONGLONG blcll[9], trcll[9]; long felem, nelem, nultyp, ninc, numcol; int hdutype, anyf; signed char nulval = 0; char msg[FLEN_ERRMSG]; int nullcheck = 2; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvsb is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } fits_read_compressed_img(fptr, TSBYTE, blcll, trcll, inc, nullcheck, NULL, array, flagval, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 2; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsvsb: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgclsb(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &flagval[i0], &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffggpsb( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ long firstelem, /* I - first vector element to read (1 = 1st) */ long nelem, /* I - number of values to read */ signed char *array, /* O - array of values that are returned */ int *status) /* IO - error status */ /* Read an array of group parameters from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). */ { long row; int idummy; char cdummy; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclsb(fptr, 1, row, firstelem, nelem, 1, 1, 0, array, &cdummy, &idummy, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcvsb(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ signed char nulval, /* I - value for null pixels */ signed char *array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. */ { char cdummy; ffgclsb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfsb(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ signed char *array, /* O - array of values that are read */ char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. */ { signed char dummy = 0; ffgclsb(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgclsb(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long elemincre, /* I - pixel increment; e.g., 2 = every other */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ signed char nulval, /* I - value for null pixels if nultyp = 1 */ signed char *array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer be a virtual column in a 1 or more grouped FITS primary array or image extension. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The output array of values will be converted from the datatype of the column and will be scaled by the FITS TSCALn and TZEROn values if necessary. */ { double scale, zero, power = 1., dtemp; int tcode, maxelem, hdutype, xcode, decimals; long twidth, incre; long ii, xwidth, ntodo; int nulcheck, readcheck = 0; LONGLONG repeat, startpos, elemnum, readptr, tnull; LONGLONG rowlen, rownum, remain, next, rowincre; char tform[20]; char message[81]; char snull[20]; /* the FITS null value if reading from ASCII table */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; union u_tag { char charval; signed char scharval; } u; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; if (anynul) *anynul = 0; if (nultyp == 2) memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (elemincre < 0) readcheck = -1; /* don't do range checking in this case */ ffgcprll( fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status); /* special case: read column of T/F logicals */ if (tcode == TLOGICAL && elemincre == 1) { u.scharval = nulval; ffgcll(fptr, colnum, firstrow, firstelem, nelem, nultyp, u.charval, (char *) array, nularray, anynul, status); return(*status); } if (strchr(tform,'A') != NULL) { if (*status == BAD_ELEM_NUM) { /* ignore this error message */ *status = 0; ffcmsg(); /* clear error stack */ } /* interpret a 'A' ASCII column as a 'B' byte column ('8A' == '8B') */ /* This is an undocumented 'feature' in CFITSIO */ /* we have to reset some of the values returned by ffgcpr */ tcode = TBYTE; incre = 1; /* each element is 1 byte wide */ repeat = twidth; /* total no. of chars in the col */ twidth = 1; /* width of each element */ scale = 1.0; /* no scaling */ zero = 0.0; tnull = NULL_UNDEFINED; /* don't test for nulls */ maxelem = DBUFFSIZE; } if (*status > 0) return(*status); incre *= elemincre; /* multiply incre to just get every nth pixel */ if (tcode == TSTRING && hdutype == ASCII_TBL) /* setup for ASCII tables */ { /* get the number of implied decimal places if no explicit decmal point */ ffasfm(tform, &xcode, &xwidth, &decimals, status); for(ii = 0; ii < decimals; ii++) power *= 10.; } /*------------------------------------------------------------------*/ /* Decide whether to check for null values in the input FITS file: */ /*------------------------------------------------------------------*/ nulcheck = nultyp; /* by default, check for null values in the FITS file */ if (nultyp == 1 && nulval == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ else if (tcode%10 == 1 && /* if reading an integer column, and */ tnull == NULL_UNDEFINED) /* if a null value is not defined, */ nulcheck = 0; /* then do not check for null values. */ else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) nulcheck = 0; /*---------------------------------------------------------------------*/ /* Now read the pixels from the FITS column. If the column does not */ /* have the same datatype as the output array, then we have to read */ /* the raw values into a temporary buffer (of limited size). In */ /* the case of a vector colum read only 1 vector of values at a time */ /* then skip to the next row if more values need to be read. */ /* After reading the raw values, then call the fffXXYY routine to (1) */ /* test for undefined values, (2) convert the datatype if necessary, */ /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ /* scaling parameters. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to read */ next = 0; /* next element in array to be read */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to read at one time to the number that will fit in the buffer or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); if (elemincre >= 0) { ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); } else { ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); } readptr = startpos + (rownum * rowlen) + (elemnum * (incre / elemincre)); switch (tcode) { case (TBYTE): ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) &array[next], status); fffi1s1((unsigned char *)&array[next], ntodo, scale, zero, nulcheck, (unsigned char) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TSHORT): ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); fffi2s1((short *) buffer, ntodo, scale, zero, nulcheck, (short) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONG): ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, status); fffi4s1((INT32BIT *) buffer, ntodo, scale, zero, nulcheck, (INT32BIT) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONGLONG): ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); fffi8s1( (LONGLONG *) buffer, ntodo, scale, zero, nulcheck, tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TFLOAT): ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); fffr4s1((float *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TDOUBLE): ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); fffr8s1((double *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TSTRING): ffmbyt(fptr, readptr, REPORT_EOF, status); if (incre == twidth) /* contiguous bytes */ ffgbyt(fptr, ntodo * twidth, buffer, status); else ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); /* interpret the string as an ASCII formated number */ fffstrs1((char *) buffer, ntodo, scale, zero, twidth, power, nulcheck, snull, nulval, &nularray[next], anynul, &array[next], status); break; default: /* error trap for invalid column format */ sprintf(message, "Cannot read bytes from column %d which has format %s", colnum, tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous read operation */ { dtemp = (double) next; if (hdutype > 0) sprintf(message, "Error reading elements %.0f thru %.0f from column %d (ffgclsb).", dtemp+1., dtemp+ntodo, colnum); else sprintf(message, "Error reading elements %.0f thru %.0f from image (ffgclsb).", dtemp+1., dtemp+ntodo); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum = elemnum + (ntodo * elemincre); if (elemnum >= repeat) /* completed a row; start on later row */ { rowincre = elemnum / repeat; rownum += rowincre; elemnum = elemnum - (rowincre * repeat); } else if (elemnum < 0) /* completed a row; start on a previous row */ { rowincre = (-elemnum - 1) / repeat + 1; rownum -= rowincre; elemnum = (rowincre * repeat) + elemnum; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while reading FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int fffi1s1(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ signed char nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ signed char *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == -128.) { /* Instead of subtracting 128, it is more efficient */ /* to just flip the sign bit with the XOR operator */ for (ii = 0; ii < ntodo; ii++) output[ii] = ( *(signed char *) &input[ii] ) ^ 0x80; } else if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] > 127) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) input[ii]; /* copy input */ } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (dvalue > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == -128.) { /* Instead of subtracting 128, it is more efficient */ /* to just flip the sign bit with the XOR operator */ for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = ( *(signed char *) &input[ii] ) ^ 0x80; } } else if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (signed char) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (dvalue > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi2s1(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ signed char nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ signed char *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < -128) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (input[ii] > 127) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (dvalue > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < -128) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (input[ii] > 127) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (dvalue > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi4s1(INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ signed char nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ signed char *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < -128) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (input[ii] > 127) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (dvalue > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < -128) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (input[ii] > 127) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (dvalue > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi8s1(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ signed char nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ signed char *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < -128) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (input[ii] > 127) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (dvalue > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < -128) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (input[ii] > 127) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (dvalue > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr4s1(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ signed char nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ signed char *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (input[ii] > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (dvalue > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr++; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { /* use redundant boolean logic in following statement */ /* to suppress irritating Borland compiler warning message */ if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (input[ii] > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (zero > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (dvalue > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr8s1(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ signed char nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ signed char *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (input[ii] > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (dvalue > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr += 3; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (input[ii] > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (zero > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (dvalue > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffstrs1(char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ long twidth, /* I - width of each substring of chars */ double implipower, /* I - power of 10 of implied decimal */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ char *snull, /* I - value of FITS null string, if any */ signed char nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ signed char *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to snull. If nullcheck= 0, then no special checking for nulls is performed. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { int nullen; long ii; double dvalue; char *cstring, message[81]; char *cptr, *tpos; char tempstore, chrzero = '0'; double val, power; int exponent, sign, esign, decpt; nullen = strlen(snull); cptr = input; /* pointer to start of input string */ for (ii = 0; ii < ntodo; ii++) { cstring = cptr; /* temporarily insert a null terminator at end of the string */ tpos = cptr + twidth; tempstore = *tpos; *tpos = 0; /* check if null value is defined, and if the */ /* column string is identical to the null string */ if (snull[0] != ASCII_NULL_UNDEFINED && !strncmp(snull, cptr, nullen) ) { if (nullcheck) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } cptr += twidth; } else { /* value is not the null value, so decode it */ /* remove any embedded blank characters from the string */ decpt = 0; sign = 1; val = 0.; power = 1.; exponent = 0; esign = 1; while (*cptr == ' ') /* skip leading blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for leading sign */ { if (*cptr == '-') sign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and value */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } if (*cptr == '.' || *cptr == ',') /* check for decimal point */ { decpt = 1; cptr++; while (*cptr == ' ') /* skip any blanks */ cptr++; while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ power = power * 10.; cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } } if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ { cptr++; while (*cptr == ' ') /* skip blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ { if (*cptr == '-') esign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and exp */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ cptr++; while (*cptr == ' ') /* skip embedded blanks */ cptr++; } } if (*cptr != 0) /* should end up at the null terminator */ { sprintf(message, "Cannot read number from ASCII table"); ffpmsg(message); sprintf(message, "Column field = %s.", cstring); ffpmsg(message); /* restore the char that was overwritten by the null */ *tpos = tempstore; return(*status = BAD_C2D); } if (!decpt) /* if no explicit decimal, use implied */ power = implipower; dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); dvalue = dvalue * scale + zero; /* apply the scaling */ if (dvalue < DSCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = -128; } else if (dvalue > DSCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = 127; } else output[ii] = (signed char) dvalue; } /* restore the char that was overwritten by the null */ *tpos = tempstore; } return(*status); } astropy-1.1.1/cextern/cfitsio/putkey.c0000644001134200020070000032205212602615520020717 0ustar embrayscience00000000000000/* This file, putkey.c, contains routines that write keywords to */ /* a FITS header. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include /* stddef.h is apparently needed to define size_t */ #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffcrim(fitsfile *fptr, /* I - FITS file pointer */ int bitpix, /* I - bits per pixel */ int naxis, /* I - number of axes in the array */ long *naxes, /* I - size of each axis */ int *status) /* IO - error status */ /* create an IMAGE extension following the current HDU. If the current HDU is empty (contains no header keywords), then simply write the required image (or primary array) keywords to the current HDU. */ { if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* create new extension if current header is not empty */ if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) ffcrhd(fptr, status); /* write the required header keywords */ ffphpr(fptr, TRUE, bitpix, naxis, naxes, 0, 1, TRUE, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffcrimll(fitsfile *fptr, /* I - FITS file pointer */ int bitpix, /* I - bits per pixel */ int naxis, /* I - number of axes in the array */ LONGLONG *naxes, /* I - size of each axis */ int *status) /* IO - error status */ /* create an IMAGE extension following the current HDU. If the current HDU is empty (contains no header keywords), then simply write the required image (or primary array) keywords to the current HDU. */ { if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* create new extension if current header is not empty */ if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) ffcrhd(fptr, status); /* write the required header keywords */ ffphprll(fptr, TRUE, bitpix, naxis, naxes, 0, 1, TRUE, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffcrtb(fitsfile *fptr, /* I - FITS file pointer */ int tbltype, /* I - type of table to create */ LONGLONG naxis2, /* I - number of rows in the table */ int tfields, /* I - number of columns in the table */ char **ttype, /* I - name of each column */ char **tform, /* I - value of TFORMn keyword for each column */ char **tunit, /* I - value of TUNITn keyword for each column */ const char *extnm, /* I - value of EXTNAME keyword, if any */ int *status) /* IO - error status */ /* Create a table extension in a FITS file. */ { LONGLONG naxis1 = 0; long *tbcol = 0; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* create new extension if current header is not empty */ if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) ffcrhd(fptr, status); if ((fptr->Fptr)->curhdu == 0) /* have to create dummy primary array */ { ffcrim(fptr, 16, 0, tbcol, status); ffcrhd(fptr, status); } if (tbltype == BINARY_TBL) { /* write the required header keywords. This will write PCOUNT = 0 */ ffphbn(fptr, naxis2, tfields, ttype, tform, tunit, extnm, 0, status); } else if (tbltype == ASCII_TBL) { /* write the required header keywords */ /* default values for naxis1 and tbcol will be calculated */ ffphtb(fptr, naxis1, naxis2, tfields, ttype, tbcol, tform, tunit, extnm, status); } else *status = NOT_TABLE; return(*status); } /*-------------------------------------------------------------------------*/ int ffpktp(fitsfile *fptr, /* I - FITS file pointer */ const char *filename, /* I - name of template file */ int *status) /* IO - error status */ /* read keywords from template file and append to the FITS file */ { FILE *diskfile; char card[FLEN_CARD], template[161]; char keyname[FLEN_KEYWORD], newname[FLEN_KEYWORD]; int keytype; size_t slen; if (*status > 0) /* inherit input status value if > 0 */ return(*status); diskfile = fopen(filename,"r"); if (!diskfile) /* couldn't open file */ { ffpmsg("ffpktp could not open the following template file:"); ffpmsg(filename); return(*status = FILE_NOT_OPENED); } while (fgets(template, 160, diskfile) ) /* get next template line */ { template[160] = '\0'; /* make sure string is terminated */ slen = strlen(template); /* get string length */ template[slen - 1] = '\0'; /* over write the 'newline' char */ if (ffgthd(template, card, &keytype, status) > 0) /* parse template */ break; strncpy(keyname, card, 8); keyname[8] = '\0'; if (keytype == -2) /* rename the card */ { strncpy(newname, &card[40], 8); newname[8] = '\0'; ffmnam(fptr, keyname, newname, status); } else if (keytype == -1) /* delete the card */ { ffdkey(fptr, keyname, status); } else if (keytype == 0) /* update the card */ { ffucrd(fptr, keyname, card, status); } else if (keytype == 1) /* append the card */ { ffprec(fptr, card, status); } else /* END card; stop here */ { break; } } fclose(diskfile); /* close the template file */ return(*status); } /*--------------------------------------------------------------------------*/ int ffpky( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ const char *keyname,/* I - name of keyword to write */ void *value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) the keyword, value and comment into the FITS header. Writes a keyword value with the datatype specified by the 2nd argument. */ { char errmsg[81]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (datatype == TSTRING) { ffpkys(fptr, keyname, (char *) value, comm, status); } else if (datatype == TBYTE) { ffpkyj(fptr, keyname, (LONGLONG) *(unsigned char *) value, comm, status); } else if (datatype == TSBYTE) { ffpkyj(fptr, keyname, (LONGLONG) *(signed char *) value, comm, status); } else if (datatype == TUSHORT) { ffpkyj(fptr, keyname, (LONGLONG) *(unsigned short *) value, comm, status); } else if (datatype == TSHORT) { ffpkyj(fptr, keyname, (LONGLONG) *(short *) value, comm, status); } else if (datatype == TUINT) { ffpkyg(fptr, keyname, (double) *(unsigned int *) value, 0, comm, status); } else if (datatype == TINT) { ffpkyj(fptr, keyname, (LONGLONG) *(int *) value, comm, status); } else if (datatype == TLOGICAL) { ffpkyl(fptr, keyname, *(int *) value, comm, status); } else if (datatype == TULONG) { ffpkyg(fptr, keyname, (double) *(unsigned long *) value, 0, comm, status); } else if (datatype == TLONG) { ffpkyj(fptr, keyname, (LONGLONG) *(long *) value, comm, status); } else if (datatype == TLONGLONG) { ffpkyj(fptr, keyname, *(LONGLONG *) value, comm, status); } else if (datatype == TFLOAT) { ffpkye(fptr, keyname, *(float *) value, -7, comm, status); } else if (datatype == TDOUBLE) { ffpkyd(fptr, keyname, *(double *) value, -15, comm, status); } else if (datatype == TCOMPLEX) { ffpkyc(fptr, keyname, (float *) value, -7, comm, status); } else if (datatype == TDBLCOMPLEX) { ffpkym(fptr, keyname, (double *) value, -15, comm, status); } else { sprintf(errmsg, "Bad keyword datatype code: %d (ffpky)", datatype); ffpmsg(errmsg); *status = BAD_DATATYPE; } return(*status); } /*-------------------------------------------------------------------------*/ int ffprec(fitsfile *fptr, /* I - FITS file pointer */ const char *card, /* I - string to be written */ int *status) /* IO - error status */ /* write a keyword record (80 bytes long) to the end of the header */ { char tcard[FLEN_CARD]; size_t len, ii; long nblocks; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if ( ((fptr->Fptr)->datastart - (fptr->Fptr)->headend) == 80) /* no room */ { nblocks = 1; if (ffiblk(fptr, nblocks, 0, status) > 0) /* insert 2880-byte block */ return(*status); } strncpy(tcard,card,80); tcard[80] = '\0'; len = strlen(tcard); /* silently replace any illegal characters with a space */ for (ii=0; ii < len; ii++) if (tcard[ii] < ' ' || tcard[ii] > 126) tcard[ii] = ' '; for (ii=len; ii < 80; ii++) /* fill card with spaces if necessary */ tcard[ii] = ' '; for (ii=0; ii < 8; ii++) /* make sure keyword name is uppercase */ tcard[ii] = toupper(tcard[ii]); fftkey(tcard, status); /* test keyword name contains legal chars */ /* no need to do this any more, since any illegal characters have been removed fftrec(tcard, status); */ /* test rest of keyword for legal chars */ ffmbyt(fptr, (fptr->Fptr)->headend, IGNORE_EOF, status); /* move to end */ ffpbyt(fptr, 80, tcard, status); /* write the 80 byte card */ if (*status <= 0) (fptr->Fptr)->headend += 80; /* update end-of-header position */ return(*status); } /*--------------------------------------------------------------------------*/ int ffpkyu( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) a null-valued keyword and comment into the FITS header. */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); strcpy(valstring," "); /* create a dummy value string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword */ ffprec(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpkys( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ const char *value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) the keyword, value and comment into the FITS header. The value string will be truncated at 68 characters which is the maximum length that will fit on a single FITS keyword. */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffs2c(value, valstring, status); /* put quotes around the string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword */ ffprec(fptr, card, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpkls( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ const char *value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) the keyword, value and comment into the FITS header. This routine is a modified version of ffpkys which supports the HEASARC long string convention and can write arbitrarily long string keyword values. The value is continued over multiple keywords that have the name COMTINUE without an equal sign in column 9 of the card. This routine also supports simple string keywords which are less than 69 characters in length. */ { char valstring[FLEN_CARD]; char card[FLEN_CARD], tmpkeyname[FLEN_CARD]; char tstring[FLEN_CARD], *cptr; int next, remain, vlen, nquote, nchar, namelen, contin, tstatus = -1; if (*status > 0) /* inherit input status value if > 0 */ return(*status); remain = maxvalue(strlen(value), 1); /* no. of chars to write (at least 1) */ /* count the number of single quote characters are in the string */ tstring[0] = '\0'; strncat(tstring, value, 68); /* copy 1st part of string to temp buff */ nquote = 0; cptr = strchr(tstring, '\''); /* search for quote character */ while (cptr) /* search for quote character */ { nquote++; /* increment no. of quote characters */ cptr++; /* increment pointer to next character */ cptr = strchr(cptr, '\''); /* search for another quote char */ } strncpy(tmpkeyname, keyname, 80); tmpkeyname[80] = '\0'; cptr = tmpkeyname; while(*cptr == ' ') /* skip over leading spaces in name */ cptr++; /* determine the number of characters that will fit on the line */ /* Note: each quote character is expanded to 2 quotes */ namelen = strlen(cptr); if (namelen <= 8 && (fftkey(cptr, &tstatus) <= 0) ) { /* This a normal 8-character FITS keyword */ nchar = 68 - nquote; /* max of 68 chars fit in a FITS string value */ } else { /* This a HIERARCH keyword */ if (FSTRNCMP(cptr, "HIERARCH ", 9) && FSTRNCMP(cptr, "hierarch ", 9)) nchar = 66 - nquote - namelen; else nchar = 75 - nquote - namelen; /* don't count 'HIERARCH' twice */ } contin = 0; next = 0; /* pointer to next character to write */ while (remain > 0) { tstring[0] = '\0'; strncat(tstring, &value[next], nchar); /* copy string to temp buff */ ffs2c(tstring, valstring, status); /* put quotes around the string */ if (remain > nchar) /* if string is continued, put & as last char */ { vlen = strlen(valstring); nchar -= 1; /* outputting one less character now */ if (valstring[vlen-2] != '\'') valstring[vlen-2] = '&'; /* over write last char with & */ else { /* last char was a pair of single quotes, so over write both */ valstring[vlen-3] = '&'; valstring[vlen-1] = '\0'; } } if (contin) /* This is a CONTINUEd keyword */ { ffmkky("CONTINUE", valstring, comm, card, status); /* make keyword */ strncpy(&card[8], " ", 2); /* overwrite the '=' */ } else { ffmkky(keyname, valstring, comm, card, status); /* make keyword */ } ffprec(fptr, card, status); /* write the keyword */ contin = 1; remain -= nchar; next += nchar; if (remain > 0) { /* count the number of single quote characters in next section */ tstring[0] = '\0'; strncat(tstring, &value[next], 68); /* copy next part of string */ nquote = 0; cptr = strchr(tstring, '\''); /* search for quote character */ while (cptr) /* search for quote character */ { nquote++; /* increment no. of quote characters */ cptr++; /* increment pointer to next character */ cptr = strchr(cptr, '\''); /* search for another quote char */ } nchar = 68 - nquote; /* max number of chars to write this time */ } } return(*status); } /*--------------------------------------------------------------------------*/ int ffplsw( fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* Write the LONGSTRN keyword and a series of related COMMENT keywords which document that this FITS header may contain long string keyword values which are continued over multiple keywords using the HEASARC long string keyword convention. If the LONGSTRN keyword already exists then this routine simple returns without doing anything. */ { char valstring[FLEN_VALUE], comm[FLEN_COMMENT]; int tstatus; if (*status > 0) /* inherit input status value if > 0 */ return(*status); tstatus = 0; if (ffgkys(fptr, "LONGSTRN", valstring, comm, &tstatus) == 0) return(*status); /* keyword already exists, so just return */ ffpkys(fptr, "LONGSTRN", "OGIP 1.0", "The HEASARC Long String Convention may be used.", status); ffpcom(fptr, " This FITS file may contain long string keyword values that are", status); ffpcom(fptr, " continued over multiple keywords. The HEASARC convention uses the &", status); ffpcom(fptr, " character at the end of each substring which is then continued", status); ffpcom(fptr, " on the next keyword which has the name CONTINUE.", status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpkyl( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ int value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) the keyword, value and comment into the FITS header. Values equal to 0 will result in a False FITS keyword; any other non-zero value will result in a True FITS keyword. */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffl2c(value, valstring, status); /* convert to formatted string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffprec(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffpkyj( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ LONGLONG value, /* I - keyword value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) the keyword, value and comment into the FITS header. Writes an integer keyword value. */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffi2c(value, valstring, status); /* convert to formatted string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffprec(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffpkyf( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ float value, /* I - keyword value */ int decim, /* I - number of decimal places to display */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) the keyword, value and comment into the FITS header. Writes a fixed float keyword value. */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffr2f(value, decim, valstring, status); /* convert to formatted string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffprec(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffpkye( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ float value, /* I - keyword value */ int decim, /* I - number of decimal places to display */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) the keyword, value and comment into the FITS header. Writes an exponential float keyword value. */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffr2e(value, decim, valstring, status); /* convert to formatted string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffprec(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffpkyg( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ double value, /* I - keyword value */ int decim, /* I - number of decimal places to display */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) the keyword, value and comment into the FITS header. Writes a fixed double keyword value.*/ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffd2f(value, decim, valstring, status); /* convert to formatted string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffprec(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffpkyd( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ double value, /* I - keyword value */ int decim, /* I - number of decimal places to display */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) the keyword, value and comment into the FITS header. Writes an exponential double keyword value.*/ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffd2e(value, decim, valstring, status); /* convert to formatted string */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffprec(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffpkyc( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ float *value, /* I - keyword value (real, imaginary) */ int decim, /* I - number of decimal places to display */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) the keyword, value and comment into the FITS header. Writes an complex float keyword value. Format = (realvalue, imagvalue) */ { char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); strcpy(valstring, "(" ); ffr2e(value[0], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ", "); ffr2e(value[1], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ")"); ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffprec(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffpkym( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ double *value, /* I - keyword value (real, imaginary) */ int decim, /* I - number of decimal places to display */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) the keyword, value and comment into the FITS header. Writes an complex double keyword value. Format = (realvalue, imagvalue) */ { char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); strcpy(valstring, "(" ); ffd2e(value[0], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ", "); ffd2e(value[1], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ")"); ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffprec(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffpkfc( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ float *value, /* I - keyword value (real, imaginary) */ int decim, /* I - number of decimal places to display */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) the keyword, value and comment into the FITS header. Writes an complex float keyword value. Format = (realvalue, imagvalue) */ { char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); strcpy(valstring, "(" ); ffr2f(value[0], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ", "); ffr2f(value[1], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ")"); ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffprec(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffpkfm( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ double *value, /* I - keyword value (real, imaginary) */ int decim, /* I - number of decimal places to display */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) the keyword, value and comment into the FITS header. Writes an complex double keyword value. Format = (realvalue, imagvalue) */ { char valstring[FLEN_VALUE], tmpstring[FLEN_VALUE]; char card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); strcpy(valstring, "(" ); ffd2f(value[0], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ", "); ffd2f(value[1], decim, tmpstring, status); /* convert to string */ strcat(valstring, tmpstring); strcat(valstring, ")"); ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffprec(fptr, card, status); /* write the keyword*/ return(*status); } /*--------------------------------------------------------------------------*/ int ffpkyt( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname,/* I - name of keyword to write */ long intval, /* I - integer part of value */ double fraction, /* I - fractional part of value */ const char *comm, /* I - keyword comment */ int *status) /* IO - error status */ /* Write (put) a 'triple' precision keyword where the integer and fractional parts of the value are passed in separate parameters to increase the total amount of numerical precision. */ { char valstring[FLEN_VALUE]; char card[FLEN_CARD]; char fstring[20], *cptr; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (fraction > 1. || fraction < 0.) { ffpmsg("fraction must be between 0. and 1. (ffpkyt)"); return(*status = BAD_F2C); } ffi2c(intval, valstring, status); /* convert integer to string */ ffd2f(fraction, 16, fstring, status); /* convert to 16 decimal string */ cptr = strchr(fstring, '.'); /* find the decimal point */ strcat(valstring, cptr); /* append the fraction to the integer */ ffmkky(keyname, valstring, comm, card, status); /* construct the keyword*/ ffprec(fptr, card, status); /* write the keyword*/ return(*status); } /*-----------------------------------------------------------------*/ int ffpcom( fitsfile *fptr, /* I - FITS file pointer */ const char *comm, /* I - comment string */ int *status) /* IO - error status */ /* Write 1 or more COMMENT keywords. If the comment string is too long to fit on a single keyword (72 chars) then it will automatically be continued on multiple CONTINUE keywords. */ { char card[FLEN_CARD]; int len, ii; if (*status > 0) /* inherit input status value if > 0 */ return(*status); len = strlen(comm); ii = 0; for (; len > 0; len -= 72) { strcpy(card, "COMMENT "); strncat(card, &comm[ii], 72); ffprec(fptr, card, status); ii += 72; } return(*status); } /*-----------------------------------------------------------------*/ int ffphis( fitsfile *fptr, /* I - FITS file pointer */ const char *history, /* I - history string */ int *status) /* IO - error status */ /* Write 1 or more HISTORY keywords. If the history string is too long to fit on a single keyword (72 chars) then it will automatically be continued on multiple HISTORY keywords. */ { char card[FLEN_CARD]; int len, ii; if (*status > 0) /* inherit input status value if > 0 */ return(*status); len = strlen(history); ii = 0; for (; len > 0; len -= 72) { strcpy(card, "HISTORY "); strncat(card, &history[ii], 72); ffprec(fptr, card, status); ii += 72; } return(*status); } /*-----------------------------------------------------------------*/ int ffpdat( fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* Write the DATE keyword into the FITS header. If the keyword already exists then the date will simply be updated in the existing keyword. */ { int timeref; char date[30], tmzone[10], card[FLEN_CARD]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); ffgstm(date, &timeref, status); if (timeref) /* GMT not available on this machine */ strcpy(tmzone, " Local"); else strcpy(tmzone, " UT"); strcpy(card, "DATE = '"); strcat(card, date); strcat(card, "' / file creation date (YYYY-MM-DDThh:mm:ss"); strcat(card, tmzone); strcat(card, ")"); ffucrd(fptr, "DATE", card, status); return(*status); } /*-------------------------------------------------------------------*/ int ffverifydate(int year, /* I - year (0 - 9999) */ int month, /* I - month (1 - 12) */ int day, /* I - day (1 - 31) */ int *status) /* IO - error status */ /* Verify that the date is valid */ { int ndays[] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; char errmsg[81]; if (year < 0 || year > 9999) { sprintf(errmsg, "input year value = %d is out of range 0 - 9999", year); ffpmsg(errmsg); return(*status = BAD_DATE); } else if (month < 1 || month > 12) { sprintf(errmsg, "input month value = %d is out of range 1 - 12", month); ffpmsg(errmsg); return(*status = BAD_DATE); } if (ndays[month] == 31) { if (day < 1 || day > 31) { sprintf(errmsg, "input day value = %d is out of range 1 - 31 for month %d", day, month); ffpmsg(errmsg); return(*status = BAD_DATE); } } else if (ndays[month] == 30) { if (day < 1 || day > 30) { sprintf(errmsg, "input day value = %d is out of range 1 - 30 for month %d", day, month); ffpmsg(errmsg); return(*status = BAD_DATE); } } else { if (day < 1 || day > 28) { if (day == 29) { /* year is a leap year if it is divisible by 4 but not by 100, except years divisible by 400 are leap years */ if ((year % 4 == 0 && year % 100 != 0 ) || year % 400 == 0) return (*status); sprintf(errmsg, "input day value = %d is out of range 1 - 28 for February %d (not leap year)", day, year); ffpmsg(errmsg); } else { sprintf(errmsg, "input day value = %d is out of range 1 - 28 (or 29) for February", day); ffpmsg(errmsg); } return(*status = BAD_DATE); } } return(*status); } /*-----------------------------------------------------------------*/ int ffgstm( char *timestr, /* O - returned system date and time string */ int *timeref, /* O - GMT = 0, Local time = 1 */ int *status) /* IO - error status */ /* Returns the current date and time in format 'yyyy-mm-ddThh:mm:ss'. */ { time_t tp; struct tm *ptr; if (*status > 0) /* inherit input status value if > 0 */ return(*status); time(&tp); ptr = gmtime(&tp); /* get GMT (= UTC) time */ if (timeref) { if (ptr) *timeref = 0; /* returning GMT */ else *timeref = 1; /* returning local time */ } if (!ptr) /* GMT not available on this machine */ ptr = localtime(&tp); strftime(timestr, 25, "%Y-%m-%dT%H:%M:%S", ptr); return(*status); } /*-----------------------------------------------------------------*/ int ffdt2s(int year, /* I - year (0 - 9999) */ int month, /* I - month (1 - 12) */ int day, /* I - day (1 - 31) */ char *datestr, /* O - date string: "YYYY-MM-DD" */ int *status) /* IO - error status */ /* Construct a date character string */ { if (*status > 0) /* inherit input status value if > 0 */ return(*status); *datestr = '\0'; if (ffverifydate(year, month, day, status) > 0) { ffpmsg("invalid date (ffdt2s)"); return(*status); } if (year >= 1900 && year <= 1998) /* use old 'dd/mm/yy' format */ sprintf(datestr, "%.2d/%.2d/%.2d", day, month, year - 1900); else /* use the new 'YYYY-MM-DD' format */ sprintf(datestr, "%.4d-%.2d-%.2d", year, month, day); return(*status); } /*-----------------------------------------------------------------*/ int ffs2dt(char *datestr, /* I - date string: "YYYY-MM-DD" or "dd/mm/yy" */ int *year, /* O - year (0 - 9999) */ int *month, /* O - month (1 - 12) */ int *day, /* O - day (1 - 31) */ int *status) /* IO - error status */ /* Parse a date character string into year, month, and day values */ { int slen, lyear, lmonth, lday; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (year) *year = 0; if (month) *month = 0; if (day) *day = 0; if (!datestr) { ffpmsg("error: null input date string (ffs2dt)"); return(*status = BAD_DATE); /* Null datestr pointer ??? */ } slen = strlen(datestr); if (slen == 8 && datestr[2] == '/' && datestr[5] == '/') { if (isdigit((int) datestr[0]) && isdigit((int) datestr[1]) && isdigit((int) datestr[3]) && isdigit((int) datestr[4]) && isdigit((int) datestr[6]) && isdigit((int) datestr[7]) ) { /* this is an old format string: "dd/mm/yy" */ lyear = atoi(&datestr[6]) + 1900; lmonth = atoi(&datestr[3]); lday = atoi(datestr); if (year) *year = lyear; if (month) *month = lmonth; if (day) *day = lday; } else { ffpmsg("input date string has illegal format (ffs2dt):"); ffpmsg(datestr); return(*status = BAD_DATE); } } else if (slen >= 10 && datestr[4] == '-' && datestr[7] == '-') { if (isdigit((int) datestr[0]) && isdigit((int) datestr[1]) && isdigit((int) datestr[2]) && isdigit((int) datestr[3]) && isdigit((int) datestr[5]) && isdigit((int) datestr[6]) && isdigit((int) datestr[8]) && isdigit((int) datestr[9]) ) { if (slen > 10 && datestr[10] != 'T') { ffpmsg("input date string has illegal format (ffs2dt):"); ffpmsg(datestr); return(*status = BAD_DATE); } /* this is a new format string: "yyyy-mm-dd" */ lyear = atoi(datestr); lmonth = atoi(&datestr[5]); lday = atoi(&datestr[8]); if (year) *year = lyear; if (month) *month = lmonth; if (day) *day = lday; } else { ffpmsg("input date string has illegal format (ffs2dt):"); ffpmsg(datestr); return(*status = BAD_DATE); } } else { ffpmsg("input date string has illegal format (ffs2dt):"); ffpmsg(datestr); return(*status = BAD_DATE); } if (ffverifydate(lyear, lmonth, lday, status) > 0) { ffpmsg("invalid date (ffs2dt)"); } return(*status); } /*-----------------------------------------------------------------*/ int fftm2s(int year, /* I - year (0 - 9999) */ int month, /* I - month (1 - 12) */ int day, /* I - day (1 - 31) */ int hour, /* I - hour (0 - 23) */ int minute, /* I - minute (0 - 59) */ double second, /* I - second (0. - 60.9999999) */ int decimals, /* I - number of decimal points to write */ char *datestr, /* O - date string: "YYYY-MM-DDThh:mm:ss.ddd" */ /* or "hh:mm:ss.ddd" if year, month day = 0 */ int *status) /* IO - error status */ /* Construct a date and time character string */ { int width; char errmsg[81]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); *datestr='\0'; if (year != 0 || month != 0 || day !=0) { if (ffverifydate(year, month, day, status) > 0) { ffpmsg("invalid date (fftm2s)"); return(*status); } } if (hour < 0 || hour > 23) { sprintf(errmsg, "input hour value is out of range 0 - 23: %d (fftm2s)", hour); ffpmsg(errmsg); return(*status = BAD_DATE); } else if (minute < 0 || minute > 59) { sprintf(errmsg, "input minute value is out of range 0 - 59: %d (fftm2s)", minute); ffpmsg(errmsg); return(*status = BAD_DATE); } else if (second < 0. || second >= 61) { sprintf(errmsg, "input second value is out of range 0 - 60.999: %f (fftm2s)", second); ffpmsg(errmsg); return(*status = BAD_DATE); } else if (decimals > 25) { sprintf(errmsg, "input decimals value is out of range 0 - 25: %d (fftm2s)", decimals); ffpmsg(errmsg); return(*status = BAD_DATE); } if (decimals == 0) width = 2; else width = decimals + 3; if (decimals < 0) { /* a negative decimals value means return only the date, not time */ sprintf(datestr, "%.4d-%.2d-%.2d", year, month, day); } else if (year == 0 && month == 0 && day == 0) { /* return only the time, not the date */ sprintf(datestr, "%.2d:%.2d:%0*.*f", hour, minute, width, decimals, second); } else { /* return both the time and date */ sprintf(datestr, "%.4d-%.2d-%.2dT%.2d:%.2d:%0*.*f", year, month, day, hour, minute, width, decimals, second); } return(*status); } /*-----------------------------------------------------------------*/ int ffs2tm(char *datestr, /* I - date string: "YYYY-MM-DD" */ /* or "YYYY-MM-DDThh:mm:ss.ddd" */ /* or "dd/mm/yy" */ int *year, /* O - year (0 - 9999) */ int *month, /* O - month (1 - 12) */ int *day, /* O - day (1 - 31) */ int *hour, /* I - hour (0 - 23) */ int *minute, /* I - minute (0 - 59) */ double *second, /* I - second (0. - 60.9999999) */ int *status) /* IO - error status */ /* Parse a date character string into date and time values */ { int slen; char errmsg[81]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (year) *year = 0; if (month) *month = 0; if (day) *day = 0; if (hour) *hour = 0; if (minute) *minute = 0; if (second) *second = 0.; if (!datestr) { ffpmsg("error: null input date string (ffs2tm)"); return(*status = BAD_DATE); /* Null datestr pointer ??? */ } if (datestr[2] == '/' || datestr[4] == '-') { /* Parse the year, month, and date */ if (ffs2dt(datestr, year, month, day, status) > 0) return(*status); slen = strlen(datestr); if (slen == 8 || slen == 10) return(*status); /* OK, no time fields */ else if (slen < 19) { ffpmsg("input date string has illegal format:"); ffpmsg(datestr); return(*status = BAD_DATE); } else if (datestr[10] == 'T' && datestr[13] == ':' && datestr[16] == ':') { if (isdigit((int) datestr[11]) && isdigit((int) datestr[12]) && isdigit((int) datestr[14]) && isdigit((int) datestr[15]) && isdigit((int) datestr[17]) && isdigit((int) datestr[18]) ) { if (slen > 19 && datestr[19] != '.') { ffpmsg("input date string has illegal format:"); ffpmsg(datestr); return(*status = BAD_DATE); } /* this is a new format string: "yyyy-mm-ddThh:mm:ss.dddd" */ if (hour) *hour = atoi(&datestr[11]); if (minute) *minute = atoi(&datestr[14]); if (second) *second = atof(&datestr[17]); } else { ffpmsg("input date string has illegal format:"); ffpmsg(datestr); return(*status = BAD_DATE); } } } else /* no date fields */ { if (datestr[2] == ':' && datestr[5] == ':') /* time string */ { if (isdigit((int) datestr[0]) && isdigit((int) datestr[1]) && isdigit((int) datestr[3]) && isdigit((int) datestr[4]) && isdigit((int) datestr[6]) && isdigit((int) datestr[7]) ) { /* this is a time string: "hh:mm:ss.dddd" */ if (hour) *hour = atoi(&datestr[0]); if (minute) *minute = atoi(&datestr[3]); if (second) *second = atof(&datestr[6]); } else { ffpmsg("input date string has illegal format:"); ffpmsg(datestr); return(*status = BAD_DATE); } } else { ffpmsg("input date string has illegal format:"); ffpmsg(datestr); return(*status = BAD_DATE); } } if (hour) if (*hour < 0 || *hour > 23) { sprintf(errmsg, "hour value is out of range 0 - 23: %d (ffs2tm)", *hour); ffpmsg(errmsg); return(*status = BAD_DATE); } if (minute) if (*minute < 0 || *minute > 59) { sprintf(errmsg, "minute value is out of range 0 - 59: %d (ffs2tm)", *minute); ffpmsg(errmsg); return(*status = BAD_DATE); } if (second) if (*second < 0 || *second >= 61.) { sprintf(errmsg, "second value is out of range 0 - 60.9999: %f (ffs2tm)", *second); ffpmsg(errmsg); return(*status = BAD_DATE); } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsdt( int *day, int *month, int *year, int *status ) { /* This routine is included for backward compatibility with the Fortran FITSIO library. ffgsdt : Get current System DaTe (GMT if available) Return integer values of the day, month, and year Function parameters: day Day of the month month Numerical month (1=Jan, etc.) year Year (1999, 2000, etc.) status output error status */ time_t now; struct tm *date; now = time( NULL ); date = gmtime(&now); /* get GMT (= UTC) time */ if (!date) /* GMT not available on this machine */ { date = localtime(&now); } *day = date->tm_mday; *month = date->tm_mon + 1; *year = date->tm_year + 1900; /* tm_year is defined as years since 1900 */ return( *status ); } /*--------------------------------------------------------------------------*/ int ffpkns( fitsfile *fptr, /* I - FITS file pointer */ const char *keyroot, /* I - root name of keywords to write */ int nstart, /* I - starting index number */ int nkey, /* I - number of keywords to write */ char *value[], /* I - array of pointers to keyword values */ char *comm[], /* I - array of pointers to keyword comment */ int *status) /* IO - error status */ /* Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Writes string keywords. The value strings will be truncated at 68 characters, and the HEASARC long string keyword convention is not supported by this routine. */ { char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; int ii, jj, repeat, len; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* check if first comment string is to be repeated for all the keywords */ /* by looking to see if the last non-blank character is a '&' char */ repeat = 0; if (comm) { len = strlen(comm[0]); while (len > 0 && comm[0][len - 1] == ' ') len--; /* ignore trailing blanks */ if (comm[0][len - 1] == '&') { len = minvalue(len, FLEN_COMMENT); tcomment[0] = '\0'; strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ repeat = 1; } } else { repeat = 1; tcomment[0] = '\0'; } for (ii=0, jj=nstart; ii < nkey; ii++, jj++) { ffkeyn(keyroot, jj, keyname, status); if (repeat) ffpkys(fptr, keyname, value[ii], tcomment, status); else ffpkys(fptr, keyname, value[ii], comm[ii], status); if (*status > 0) return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffpknl( fitsfile *fptr, /* I - FITS file pointer */ const char *keyroot, /* I - root name of keywords to write */ int nstart, /* I - starting index number */ int nkey, /* I - number of keywords to write */ int *value, /* I - array of keyword values */ char *comm[], /* I - array of pointers to keyword comment */ int *status) /* IO - error status */ /* Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Writes logical keywords Values equal to zero will be written as a False FITS keyword value; any other non-zero value will result in a True FITS keyword. */ { char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; int ii, jj, repeat, len; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* check if first comment string is to be repeated for all the keywords */ /* by looking to see if the last non-blank character is a '&' char */ repeat = 0; if (comm) { len = strlen(comm[0]); while (len > 0 && comm[0][len - 1] == ' ') len--; /* ignore trailing blanks */ if (comm[0][len - 1] == '&') { len = minvalue(len, FLEN_COMMENT); tcomment[0] = '\0'; strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ repeat = 1; } } else { repeat = 1; tcomment[0] = '\0'; } for (ii=0, jj=nstart; ii < nkey; ii++, jj++) { ffkeyn(keyroot, jj, keyname, status); if (repeat) ffpkyl(fptr, keyname, value[ii], tcomment, status); else ffpkyl(fptr, keyname, value[ii], comm[ii], status); if (*status > 0) return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffpknj( fitsfile *fptr, /* I - FITS file pointer */ const char *keyroot, /* I - root name of keywords to write */ int nstart, /* I - starting index number */ int nkey, /* I - number of keywords to write */ long *value, /* I - array of keyword values */ char *comm[], /* I - array of pointers to keyword comment */ int *status) /* IO - error status */ /* Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Write integer keywords */ { char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; int ii, jj, repeat, len; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* check if first comment string is to be repeated for all the keywords */ /* by looking to see if the last non-blank character is a '&' char */ repeat = 0; if (comm) { len = strlen(comm[0]); while (len > 0 && comm[0][len - 1] == ' ') len--; /* ignore trailing blanks */ if (comm[0][len - 1] == '&') { len = minvalue(len, FLEN_COMMENT); tcomment[0] = '\0'; strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ repeat = 1; } } else { repeat = 1; tcomment[0] = '\0'; } for (ii=0, jj=nstart; ii < nkey; ii++, jj++) { ffkeyn(keyroot, jj, keyname, status); if (repeat) ffpkyj(fptr, keyname, value[ii], tcomment, status); else ffpkyj(fptr, keyname, value[ii], comm[ii], status); if (*status > 0) return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffpknjj( fitsfile *fptr, /* I - FITS file pointer */ const char *keyroot, /* I - root name of keywords to write */ int nstart, /* I - starting index number */ int nkey, /* I - number of keywords to write */ LONGLONG *value, /* I - array of keyword values */ char *comm[], /* I - array of pointers to keyword comment */ int *status) /* IO - error status */ /* Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Write integer keywords */ { char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; int ii, jj, repeat, len; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* check if first comment string is to be repeated for all the keywords */ /* by looking to see if the last non-blank character is a '&' char */ repeat = 0; if (comm) { len = strlen(comm[0]); while (len > 0 && comm[0][len - 1] == ' ') len--; /* ignore trailing blanks */ if (comm[0][len - 1] == '&') { len = minvalue(len, FLEN_COMMENT); tcomment[0] = '\0'; strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ repeat = 1; } } else { repeat = 1; tcomment[0] = '\0'; } for (ii=0, jj=nstart; ii < nkey; ii++, jj++) { ffkeyn(keyroot, jj, keyname, status); if (repeat) ffpkyj(fptr, keyname, value[ii], tcomment, status); else ffpkyj(fptr, keyname, value[ii], comm[ii], status); if (*status > 0) return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffpknf( fitsfile *fptr, /* I - FITS file pointer */ const char *keyroot, /* I - root name of keywords to write */ int nstart, /* I - starting index number */ int nkey, /* I - number of keywords to write */ float *value, /* I - array of keyword values */ int decim, /* I - number of decimals to display */ char *comm[], /* I - array of pointers to keyword comment */ int *status) /* IO - error status */ /* Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Writes fixed float values. */ { char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; int ii, jj, repeat, len; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* check if first comment string is to be repeated for all the keywords */ /* by looking to see if the last non-blank character is a '&' char */ repeat = 0; if (comm) { len = strlen(comm[0]); while (len > 0 && comm[0][len - 1] == ' ') len--; /* ignore trailing blanks */ if (comm[0][len - 1] == '&') { len = minvalue(len, FLEN_COMMENT); tcomment[0] = '\0'; strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ repeat = 1; } } else { repeat = 1; tcomment[0] = '\0'; } for (ii=0, jj=nstart; ii < nkey; ii++, jj++) { ffkeyn(keyroot, jj, keyname, status); if (repeat) ffpkyf(fptr, keyname, value[ii], decim, tcomment, status); else ffpkyf(fptr, keyname, value[ii], decim, comm[ii], status); if (*status > 0) return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffpkne( fitsfile *fptr, /* I - FITS file pointer */ const char *keyroot, /* I - root name of keywords to write */ int nstart, /* I - starting index number */ int nkey, /* I - number of keywords to write */ float *value, /* I - array of keyword values */ int decim, /* I - number of decimals to display */ char *comm[], /* I - array of pointers to keyword comment */ int *status) /* IO - error status */ /* Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Writes exponential float values. */ { char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; int ii, jj, repeat, len; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* check if first comment string is to be repeated for all the keywords */ /* by looking to see if the last non-blank character is a '&' char */ repeat = 0; if (comm) { len = strlen(comm[0]); while (len > 0 && comm[0][len - 1] == ' ') len--; /* ignore trailing blanks */ if (comm[0][len - 1] == '&') { len = minvalue(len, FLEN_COMMENT); tcomment[0] = '\0'; strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ repeat = 1; } } else { repeat = 1; tcomment[0] = '\0'; } for (ii=0, jj=nstart; ii < nkey; ii++, jj++) { ffkeyn(keyroot, jj, keyname, status); if (repeat) ffpkye(fptr, keyname, value[ii], decim, tcomment, status); else ffpkye(fptr, keyname, value[ii], decim, comm[ii], status); if (*status > 0) return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffpkng( fitsfile *fptr, /* I - FITS file pointer */ const char *keyroot, /* I - root name of keywords to write */ int nstart, /* I - starting index number */ int nkey, /* I - number of keywords to write */ double *value, /* I - array of keyword values */ int decim, /* I - number of decimals to display */ char *comm[], /* I - array of pointers to keyword comment */ int *status) /* IO - error status */ /* Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Writes fixed double values. */ { char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; int ii, jj, repeat, len; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* check if first comment string is to be repeated for all the keywords */ /* by looking to see if the last non-blank character is a '&' char */ repeat = 0; if (comm) { len = strlen(comm[0]); while (len > 0 && comm[0][len - 1] == ' ') len--; /* ignore trailing blanks */ if (comm[0][len - 1] == '&') { len = minvalue(len, FLEN_COMMENT); tcomment[0] = '\0'; strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ repeat = 1; } } else { repeat = 1; tcomment[0] = '\0'; } for (ii=0, jj=nstart; ii < nkey; ii++, jj++) { ffkeyn(keyroot, jj, keyname, status); if (repeat) ffpkyg(fptr, keyname, value[ii], decim, tcomment, status); else ffpkyg(fptr, keyname, value[ii], decim, comm[ii], status); if (*status > 0) return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffpknd( fitsfile *fptr, /* I - FITS file pointer */ const char *keyroot, /* I - root name of keywords to write */ int nstart, /* I - starting index number */ int nkey, /* I - number of keywords to write */ double *value, /* I - array of keyword values */ int decim, /* I - number of decimals to display */ char *comm[], /* I - array of pointers to keyword comment */ int *status) /* IO - error status */ /* Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Writes exponential double values. */ { char keyname[FLEN_KEYWORD], tcomment[FLEN_COMMENT]; int ii, jj, repeat, len; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* check if first comment string is to be repeated for all the keywords */ /* by looking to see if the last non-blank character is a '&' char */ repeat = 0; if (comm) { len = strlen(comm[0]); while (len > 0 && comm[0][len - 1] == ' ') len--; /* ignore trailing blanks */ if (comm[0][len - 1] == '&') { len = minvalue(len, FLEN_COMMENT); tcomment[0] = '\0'; strncat(tcomment, comm[0], len-1); /* don't copy the final '&' char */ repeat = 1; } } else { repeat = 1; tcomment[0] = '\0'; } for (ii=0, jj=nstart; ii < nkey; ii++, jj++) { ffkeyn(keyroot, jj, keyname, status); if (repeat) ffpkyd(fptr, keyname, value[ii], decim, tcomment, status); else ffpkyd(fptr, keyname, value[ii], decim, comm[ii], status); if (*status > 0) return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffptdm( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number */ int naxis, /* I - number of axes in the data array */ long naxes[], /* I - length of each data axis */ int *status) /* IO - error status */ /* write the TDIMnnn keyword describing the dimensionality of a column */ { char keyname[FLEN_KEYWORD], tdimstr[FLEN_VALUE], comm[FLEN_COMMENT]; char value[80], message[81]; int ii; long totalpix = 1, repeat; tcolumn *colptr; if (*status > 0) return(*status); if (colnum < 1 || colnum > 999) { ffpmsg("column number is out of range 1 - 999 (ffptdm)"); return(*status = BAD_COL_NUM); } if (naxis < 1) { ffpmsg("naxis is less than 1 (ffptdm)"); return(*status = BAD_DIMEN); } /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); if ( (fptr->Fptr)->hdutype != BINARY_TBL) { ffpmsg( "Error: The TDIMn keyword is only allowed in BINTABLE extensions (ffptdm)"); return(*status = NOT_BTABLE); } strcpy(tdimstr, "("); /* start constructing the TDIM value */ for (ii = 0; ii < naxis; ii++) { if (ii > 0) strcat(tdimstr, ","); /* append the comma separator */ if (naxes[ii] < 0) { ffpmsg("one or more TDIM values are less than 0 (ffptdm)"); return(*status = BAD_TDIM); } sprintf(value, "%ld", naxes[ii]); strcat(tdimstr, value); /* append the axis size */ totalpix *= naxes[ii]; } colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ colptr += (colnum - 1); /* point to the specified column number */ if ((long) colptr->trepeat != totalpix) { /* There is an apparent inconsistency between TDIMn and TFORMn. */ /* The colptr->trepeat value may be out of date, so re-read */ /* the TFORMn keyword to be sure. */ ffkeyn("TFORM", colnum, keyname, status); /* construct TFORMn name */ ffgkys(fptr, keyname, value, NULL, status); /* read TFORMn keyword */ ffbnfm(value, NULL, &repeat, NULL, status); /* parse the repeat count */ if (*status > 0 || repeat != totalpix) { sprintf(message, "column vector length, %ld, does not equal TDIMn array size, %ld", (long) colptr->trepeat, totalpix); ffpmsg(message); return(*status = BAD_TDIM); } } strcat(tdimstr, ")" ); /* append the closing parenthesis */ strcpy(comm, "size of the multidimensional array"); ffkeyn("TDIM", colnum, keyname, status); /* construct TDIMn name */ ffpkys(fptr, keyname, tdimstr, comm, status); /* write the keyword */ return(*status); } /*--------------------------------------------------------------------------*/ int ffptdmll( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number */ int naxis, /* I - number of axes in the data array */ LONGLONG naxes[], /* I - length of each data axis */ int *status) /* IO - error status */ /* write the TDIMnnn keyword describing the dimensionality of a column */ { char keyname[FLEN_KEYWORD], tdimstr[FLEN_VALUE], comm[FLEN_COMMENT]; char value[80], message[81]; int ii; LONGLONG totalpix = 1, repeat; tcolumn *colptr; if (*status > 0) return(*status); if (colnum < 1 || colnum > 999) { ffpmsg("column number is out of range 1 - 999 (ffptdm)"); return(*status = BAD_COL_NUM); } if (naxis < 1) { ffpmsg("naxis is less than 1 (ffptdm)"); return(*status = BAD_DIMEN); } /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); if ( (fptr->Fptr)->hdutype != BINARY_TBL) { ffpmsg( "Error: The TDIMn keyword is only allowed in BINTABLE extensions (ffptdm)"); return(*status = NOT_BTABLE); } strcpy(tdimstr, "("); /* start constructing the TDIM value */ for (ii = 0; ii < naxis; ii++) { if (ii > 0) strcat(tdimstr, ","); /* append the comma separator */ if (naxes[ii] < 0) { ffpmsg("one or more TDIM values are less than 0 (ffptdm)"); return(*status = BAD_TDIM); } /* cast to double because the 64-bit int conversion character in */ /* sprintf is platform dependent ( %lld, %ld, %I64d ) */ sprintf(value, "%.0f", (double) naxes[ii]); strcat(tdimstr, value); /* append the axis size */ totalpix *= naxes[ii]; } colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ colptr += (colnum - 1); /* point to the specified column number */ if ( colptr->trepeat != totalpix) { /* There is an apparent inconsistency between TDIMn and TFORMn. */ /* The colptr->trepeat value may be out of date, so re-read */ /* the TFORMn keyword to be sure. */ ffkeyn("TFORM", colnum, keyname, status); /* construct TFORMn name */ ffgkys(fptr, keyname, value, NULL, status); /* read TFORMn keyword */ ffbnfmll(value, NULL, &repeat, NULL, status); /* parse the repeat count */ if (*status > 0 || repeat != totalpix) { sprintf(message, "column vector length, %.0f, does not equal TDIMn array size, %.0f", (double) (colptr->trepeat), (double) totalpix); ffpmsg(message); return(*status = BAD_TDIM); } } strcat(tdimstr, ")" ); /* append the closing parenthesis */ strcpy(comm, "size of the multidimensional array"); ffkeyn("TDIM", colnum, keyname, status); /* construct TDIMn name */ ffpkys(fptr, keyname, tdimstr, comm, status); /* write the keyword */ return(*status); } /*--------------------------------------------------------------------------*/ int ffphps( fitsfile *fptr, /* I - FITS file pointer */ int bitpix, /* I - number of bits per data value pixel */ int naxis, /* I - number of axes in the data array */ long naxes[], /* I - length of each data axis */ int *status) /* IO - error status */ /* write STANDARD set of required primary header keywords */ { int simple = 1; /* does file conform to FITS standard? 1/0 */ long pcount = 0; /* number of group parameters (usually 0) */ long gcount = 1; /* number of random groups (usually 1 or 0) */ int extend = 1; /* may FITS file have extensions? */ ffphpr(fptr, simple, bitpix, naxis, naxes, pcount, gcount, extend, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffphpsll( fitsfile *fptr, /* I - FITS file pointer */ int bitpix, /* I - number of bits per data value pixel */ int naxis, /* I - number of axes in the data array */ LONGLONG naxes[], /* I - length of each data axis */ int *status) /* IO - error status */ /* write STANDARD set of required primary header keywords */ { int simple = 1; /* does file conform to FITS standard? 1/0 */ LONGLONG pcount = 0; /* number of group parameters (usually 0) */ LONGLONG gcount = 1; /* number of random groups (usually 1 or 0) */ int extend = 1; /* may FITS file have extensions? */ ffphprll(fptr, simple, bitpix, naxis, naxes, pcount, gcount, extend, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffphpr( fitsfile *fptr, /* I - FITS file pointer */ int simple, /* I - does file conform to FITS standard? 1/0 */ int bitpix, /* I - number of bits per data value pixel */ int naxis, /* I - number of axes in the data array */ long naxes[], /* I - length of each data axis */ LONGLONG pcount, /* I - number of group parameters (usually 0) */ LONGLONG gcount, /* I - number of random groups (usually 1 or 0) */ int extend, /* I - may FITS file have extensions? */ int *status) /* IO - error status */ /* write required primary header keywords */ { int ii; LONGLONG naxesll[20]; for (ii = 0; (ii < naxis) && (ii < 20); ii++) naxesll[ii] = naxes[ii]; ffphprll(fptr, simple, bitpix, naxis, naxesll, pcount, gcount, extend, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffphprll( fitsfile *fptr, /* I - FITS file pointer */ int simple, /* I - does file conform to FITS standard? 1/0 */ int bitpix, /* I - number of bits per data value pixel */ int naxis, /* I - number of axes in the data array */ LONGLONG naxes[], /* I - length of each data axis */ LONGLONG pcount, /* I - number of group parameters (usually 0) */ LONGLONG gcount, /* I - number of random groups (usually 1 or 0) */ int extend, /* I - may FITS file have extensions? */ int *status) /* IO - error status */ /* write required primary header keywords */ { int ii; long longbitpix, tnaxes[20]; char name[FLEN_KEYWORD], comm[FLEN_COMMENT], message[FLEN_ERRMSG]; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) return(*status = HEADER_NOT_EMPTY); if (naxis != 0) /* never try to compress a null image */ { if ( (fptr->Fptr)->request_compress_type ) { for (ii = 0; ii < naxis; ii++) tnaxes[ii] = (long) naxes[ii]; /* write header for a compressed image */ imcomp_init_table(fptr, bitpix, naxis, tnaxes, 1, status); return(*status); } } if ((fptr->Fptr)->curhdu == 0) { /* write primary array header */ if (simple) strcpy(comm, "file does conform to FITS standard"); else strcpy(comm, "file does not conform to FITS standard"); ffpkyl(fptr, "SIMPLE", simple, comm, status); } else { /* write IMAGE extension header */ strcpy(comm, "IMAGE extension"); ffpkys(fptr, "XTENSION", "IMAGE", comm, status); } longbitpix = bitpix; /* test for the 3 special cases that represent unsigned integers */ if (longbitpix == USHORT_IMG) longbitpix = SHORT_IMG; else if (longbitpix == ULONG_IMG) longbitpix = LONG_IMG; else if (longbitpix == SBYTE_IMG) longbitpix = BYTE_IMG; if (longbitpix != BYTE_IMG && longbitpix != SHORT_IMG && longbitpix != LONG_IMG && longbitpix != LONGLONG_IMG && longbitpix != FLOAT_IMG && longbitpix != DOUBLE_IMG) { sprintf(message, "Illegal value for BITPIX keyword: %d", bitpix); ffpmsg(message); return(*status = BAD_BITPIX); } strcpy(comm, "number of bits per data pixel"); if (ffpkyj(fptr, "BITPIX", longbitpix, comm, status) > 0) return(*status); if (naxis < 0 || naxis > 999) { sprintf(message, "Illegal value for NAXIS keyword: %d", naxis); ffpmsg(message); return(*status = BAD_NAXIS); } strcpy(comm, "number of data axes"); ffpkyj(fptr, "NAXIS", naxis, comm, status); strcpy(comm, "length of data axis "); for (ii = 0; ii < naxis; ii++) { if (naxes[ii] < 0) { sprintf(message, "Illegal negative value for NAXIS%d keyword: %.0f", ii + 1, (double) (naxes[ii])); ffpmsg(message); return(*status = BAD_NAXES); } sprintf(&comm[20], "%d", ii + 1); ffkeyn("NAXIS", ii + 1, name, status); ffpkyj(fptr, name, naxes[ii], comm, status); } if ((fptr->Fptr)->curhdu == 0) /* the primary array */ { if (extend) { /* only write EXTEND keyword if value = true */ strcpy(comm, "FITS dataset may contain extensions"); ffpkyl(fptr, "EXTEND", extend, comm, status); } if (pcount < 0) { ffpmsg("pcount value is less than 0"); return(*status = BAD_PCOUNT); } else if (gcount < 1) { ffpmsg("gcount value is less than 1"); return(*status = BAD_GCOUNT); } else if (pcount > 0 || gcount > 1) { /* only write these keyword if non-standard values */ strcpy(comm, "random group records are present"); ffpkyl(fptr, "GROUPS", 1, comm, status); strcpy(comm, "number of random group parameters"); ffpkyj(fptr, "PCOUNT", pcount, comm, status); strcpy(comm, "number of random groups"); ffpkyj(fptr, "GCOUNT", gcount, comm, status); } /* write standard block of self-documentating comments */ ffprec(fptr, "COMMENT FITS (Flexible Image Transport System) format is defined in 'Astronomy", status); ffprec(fptr, "COMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H", status); } else /* an IMAGE extension */ { /* image extension; cannot have random groups */ if (pcount != 0) { ffpmsg("image extensions must have pcount = 0"); *status = BAD_PCOUNT; } else if (gcount != 1) { ffpmsg("image extensions must have gcount = 1"); *status = BAD_GCOUNT; } else { strcpy(comm, "required keyword; must = 0"); ffpkyj(fptr, "PCOUNT", 0, comm, status); strcpy(comm, "required keyword; must = 1"); ffpkyj(fptr, "GCOUNT", 1, comm, status); } } /* Write the BSCALE and BZERO keywords, if an unsigned integer image */ if (bitpix == USHORT_IMG) { strcpy(comm, "offset data range to that of unsigned short"); ffpkyg(fptr, "BZERO", 32768., 0, comm, status); strcpy(comm, "default scaling factor"); ffpkyg(fptr, "BSCALE", 1.0, 0, comm, status); } else if (bitpix == ULONG_IMG) { strcpy(comm, "offset data range to that of unsigned long"); ffpkyg(fptr, "BZERO", 2147483648., 0, comm, status); strcpy(comm, "default scaling factor"); ffpkyg(fptr, "BSCALE", 1.0, 0, comm, status); } else if (bitpix == SBYTE_IMG) { strcpy(comm, "offset data range to that of signed byte"); ffpkyg(fptr, "BZERO", -128., 0, comm, status); strcpy(comm, "default scaling factor"); ffpkyg(fptr, "BSCALE", 1.0, 0, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffphtb(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG naxis1, /* I - width of row in the table */ LONGLONG naxis2, /* I - number of rows in the table */ int tfields, /* I - number of columns in the table */ char **ttype, /* I - name of each column */ long *tbcol, /* I - byte offset in row to each column */ char **tform, /* I - value of TFORMn keyword for each column */ char **tunit, /* I - value of TUNITn keyword for each column */ const char *extnmx, /* I - value of EXTNAME keyword, if any */ int *status) /* IO - error status */ /* Put required Header keywords into the ASCII TaBle: */ { int ii, ncols, gotmem = 0; long rowlen; /* must be 'long' because it is passed to ffgabc */ char tfmt[30], name[FLEN_KEYWORD], comm[FLEN_COMMENT], extnm[FLEN_VALUE]; if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if (*status > 0) return(*status); else if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) return(*status = HEADER_NOT_EMPTY); else if (naxis1 < 0) return(*status = NEG_WIDTH); else if (naxis2 < 0) return(*status = NEG_ROWS); else if (tfields < 0 || tfields > 999) return(*status = BAD_TFIELDS); extnm[0] = '\0'; if (extnmx) strncat(extnm, extnmx, FLEN_VALUE-1); rowlen = (long) naxis1; if (!tbcol || !tbcol[0] || (!naxis1 && tfields)) /* spacing not defined? */ { /* allocate mem for tbcol; malloc can have problems allocating small */ /* arrays, so allocate at least 20 bytes */ ncols = maxvalue(5, tfields); tbcol = (long *) calloc(ncols, sizeof(long)); if (tbcol) { gotmem = 1; /* calculate width of a row and starting position of each column. */ /* Each column will be separated by 1 blank space */ ffgabc(tfields, tform, 1, &rowlen, tbcol, status); } } ffpkys(fptr, "XTENSION", "TABLE", "ASCII table extension", status); ffpkyj(fptr, "BITPIX", 8, "8-bit ASCII characters", status); ffpkyj(fptr, "NAXIS", 2, "2-dimensional ASCII table", status); ffpkyj(fptr, "NAXIS1", rowlen, "width of table in characters", status); ffpkyj(fptr, "NAXIS2", naxis2, "number of rows in table", status); ffpkyj(fptr, "PCOUNT", 0, "no group parameters (required keyword)", status); ffpkyj(fptr, "GCOUNT", 1, "one data group (required keyword)", status); ffpkyj(fptr, "TFIELDS", tfields, "number of fields in each row", status); for (ii = 0; ii < tfields; ii++) /* loop over every column */ { if ( *(ttype[ii]) ) /* optional TTYPEn keyword */ { sprintf(comm, "label for field %3d", ii + 1); ffkeyn("TTYPE", ii + 1, name, status); ffpkys(fptr, name, ttype[ii], comm, status); } if (tbcol[ii] < 1 || tbcol[ii] > rowlen) *status = BAD_TBCOL; sprintf(comm, "beginning column of field %3d", ii + 1); ffkeyn("TBCOL", ii + 1, name, status); ffpkyj(fptr, name, tbcol[ii], comm, status); strcpy(tfmt, tform[ii]); /* required TFORMn keyword */ ffupch(tfmt); ffkeyn("TFORM", ii + 1, name, status); ffpkys(fptr, name, tfmt, "Fortran-77 format of field", status); if (tunit) { if (tunit[ii] && *(tunit[ii]) ) /* optional TUNITn keyword */ { ffkeyn("TUNIT", ii + 1, name, status); ffpkys(fptr, name, tunit[ii], "physical unit of field", status) ; } } if (*status > 0) break; /* abort loop on error */ } if (extnm) { if (extnm[0]) /* optional EXTNAME keyword */ ffpkys(fptr, "EXTNAME", extnm, "name of this ASCII table extension", status); } if (*status > 0) ffpmsg("Failed to write ASCII table header keywords (ffphtb)"); if (gotmem) free(tbcol); return(*status); } /*--------------------------------------------------------------------------*/ int ffphbn(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG naxis2, /* I - number of rows in the table */ int tfields, /* I - number of columns in the table */ char **ttype, /* I - name of each column */ char **tform, /* I - value of TFORMn keyword for each column */ char **tunit, /* I - value of TUNITn keyword for each column */ const char *extnmx, /* I - value of EXTNAME keyword, if any */ LONGLONG pcount, /* I - size of the variable length heap area */ int *status) /* IO - error status */ /* Put required Header keywords into the Binary Table: */ { int ii, datatype, iread = 0; long repeat, width; LONGLONG naxis1; char tfmt[30], name[FLEN_KEYWORD], comm[FLEN_COMMENT], extnm[FLEN_VALUE]; char *cptr; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) return(*status = HEADER_NOT_EMPTY); else if (naxis2 < 0) return(*status = NEG_ROWS); else if (pcount < 0) return(*status = BAD_PCOUNT); else if (tfields < 0 || tfields > 999) return(*status = BAD_TFIELDS); extnm[0] = '\0'; if (extnmx) strncat(extnm, extnmx, FLEN_VALUE-1); ffpkys(fptr, "XTENSION", "BINTABLE", "binary table extension", status); ffpkyj(fptr, "BITPIX", 8, "8-bit bytes", status); ffpkyj(fptr, "NAXIS", 2, "2-dimensional binary table", status); naxis1 = 0; for (ii = 0; ii < tfields; ii++) /* sum the width of each field */ { ffbnfm(tform[ii], &datatype, &repeat, &width, status); if (datatype == TSTRING) naxis1 += repeat; /* one byte per char */ else if (datatype == TBIT) naxis1 += (repeat + 7) / 8; else if (datatype > 0) naxis1 += repeat * (datatype / 10); else if (tform[ii][0] == 'P' || tform[ii][1] == 'P') /* this is a 'P' variable length descriptor (neg. datatype) */ naxis1 += 8; else /* this is a 'Q' variable length descriptor (neg. datatype) */ naxis1 += 16; if (*status > 0) break; /* abort loop on error */ } ffpkyj(fptr, "NAXIS1", naxis1, "width of table in bytes", status); ffpkyj(fptr, "NAXIS2", naxis2, "number of rows in table", status); /* the initial value of PCOUNT (= size of the variable length array heap) should always be zero. If any variable length data is written, then the value of PCOUNT will be updated when the HDU is closed */ ffpkyj(fptr, "PCOUNT", 0, "size of special data area", status); ffpkyj(fptr, "GCOUNT", 1, "one data group (required keyword)", status); ffpkyj(fptr, "TFIELDS", tfields, "number of fields in each row", status); for (ii = 0; ii < tfields; ii++) /* loop over every column */ { if ( *(ttype[ii]) ) /* optional TTYPEn keyword */ { sprintf(comm, "label for field %3d", ii + 1); ffkeyn("TTYPE", ii + 1, name, status); ffpkys(fptr, name, ttype[ii], comm, status); } strcpy(tfmt, tform[ii]); /* required TFORMn keyword */ ffupch(tfmt); ffkeyn("TFORM", ii + 1, name, status); strcpy(comm, "data format of field"); ffbnfm(tfmt, &datatype, &repeat, &width, status); if (datatype == TSTRING) { strcat(comm, ": ASCII Character"); /* Do sanity check to see if an ASCII table format was used, */ /* e.g., 'A8' instead of '8A', or a bad unit width eg '8A9'. */ /* Don't want to return an error status, so write error into */ /* the keyword comment. */ cptr = strchr(tfmt,'A'); cptr++; if (cptr) iread = sscanf(cptr,"%ld", &width); if (iread == 1 && (width > repeat)) { if (repeat == 1) strcpy(comm, "ERROR?? USING ASCII TABLE SYNTAX BY MISTAKE??"); else strcpy(comm, "rAw FORMAT ERROR! UNIT WIDTH w > COLUMN WIDTH r"); } } else if (datatype == TBIT) strcat(comm, ": BIT"); else if (datatype == TBYTE) strcat(comm, ": BYTE"); else if (datatype == TLOGICAL) strcat(comm, ": 1-byte LOGICAL"); else if (datatype == TSHORT) strcat(comm, ": 2-byte INTEGER"); else if (datatype == TUSHORT) strcat(comm, ": 2-byte INTEGER"); else if (datatype == TLONG) strcat(comm, ": 4-byte INTEGER"); else if (datatype == TLONGLONG) strcat(comm, ": 8-byte INTEGER"); else if (datatype == TULONG) strcat(comm, ": 4-byte INTEGER"); else if (datatype == TFLOAT) strcat(comm, ": 4-byte REAL"); else if (datatype == TDOUBLE) strcat(comm, ": 8-byte DOUBLE"); else if (datatype == TCOMPLEX) strcat(comm, ": COMPLEX"); else if (datatype == TDBLCOMPLEX) strcat(comm, ": DOUBLE COMPLEX"); else if (datatype < 0) strcat(comm, ": variable length array"); if (abs(datatype) == TSBYTE) /* signed bytes */ { /* Replace the 'S' with an 'B' in the TFORMn code */ cptr = tfmt; while (*cptr != 'S') cptr++; *cptr = 'B'; ffpkys(fptr, name, tfmt, comm, status); /* write the TZEROn and TSCALn keywords */ ffkeyn("TZERO", ii + 1, name, status); strcpy(comm, "offset for signed bytes"); ffpkyg(fptr, name, -128., 0, comm, status); ffkeyn("TSCAL", ii + 1, name, status); strcpy(comm, "data are not scaled"); ffpkyg(fptr, name, 1., 0, comm, status); } else if (abs(datatype) == TUSHORT) { /* Replace the 'U' with an 'I' in the TFORMn code */ cptr = tfmt; while (*cptr != 'U') cptr++; *cptr = 'I'; ffpkys(fptr, name, tfmt, comm, status); /* write the TZEROn and TSCALn keywords */ ffkeyn("TZERO", ii + 1, name, status); strcpy(comm, "offset for unsigned integers"); ffpkyg(fptr, name, 32768., 0, comm, status); ffkeyn("TSCAL", ii + 1, name, status); strcpy(comm, "data are not scaled"); ffpkyg(fptr, name, 1., 0, comm, status); } else if (abs(datatype) == TULONG) { /* Replace the 'V' with an 'J' in the TFORMn code */ cptr = tfmt; while (*cptr != 'V') cptr++; *cptr = 'J'; ffpkys(fptr, name, tfmt, comm, status); /* write the TZEROn and TSCALn keywords */ ffkeyn("TZERO", ii + 1, name, status); strcpy(comm, "offset for unsigned integers"); ffpkyg(fptr, name, 2147483648., 0, comm, status); ffkeyn("TSCAL", ii + 1, name, status); strcpy(comm, "data are not scaled"); ffpkyg(fptr, name, 1., 0, comm, status); } else { ffpkys(fptr, name, tfmt, comm, status); } if (tunit) { if (tunit[ii] && *(tunit[ii]) ) /* optional TUNITn keyword */ { ffkeyn("TUNIT", ii + 1, name, status); ffpkys(fptr, name, tunit[ii], "physical unit of field", status); } } if (*status > 0) break; /* abort loop on error */ } if (extnm) { if (extnm[0]) /* optional EXTNAME keyword */ ffpkys(fptr, "EXTNAME", extnm, "name of this binary table extension", status); } if (*status > 0) ffpmsg("Failed to write binary table header keywords (ffphbn)"); return(*status); } /*--------------------------------------------------------------------------*/ int ffphext(fitsfile *fptr, /* I - FITS file pointer */ const char *xtensionx, /* I - value for the XTENSION keyword */ int bitpix, /* I - value for the BIXPIX keyword */ int naxis, /* I - value for the NAXIS keyword */ long naxes[], /* I - value for the NAXISn keywords */ LONGLONG pcount, /* I - value for the PCOUNT keyword */ LONGLONG gcount, /* I - value for the GCOUNT keyword */ int *status) /* IO - error status */ /* Put required Header keywords into a conforming extension: */ { char message[FLEN_ERRMSG],comm[81], name[20], xtension[FLEN_VALUE]; int ii; if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if (*status > 0) return(*status); else if ((fptr->Fptr)->headend != (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) return(*status = HEADER_NOT_EMPTY); if (naxis < 0 || naxis > 999) { sprintf(message, "Illegal value for NAXIS keyword: %d", naxis); ffpmsg(message); return(*status = BAD_NAXIS); } xtension[0] = '\0'; strncat(xtension, xtensionx, FLEN_VALUE-1); ffpkys(fptr, "XTENSION", xtension, "extension type", status); ffpkyj(fptr, "BITPIX", bitpix, "number of bits per data pixel", status); ffpkyj(fptr, "NAXIS", naxis, "number of data axes", status); strcpy(comm, "length of data axis "); for (ii = 0; ii < naxis; ii++) { if (naxes[ii] < 0) { sprintf(message, "Illegal negative value for NAXIS%d keyword: %.0f", ii + 1, (double) (naxes[ii])); ffpmsg(message); return(*status = BAD_NAXES); } sprintf(&comm[20], "%d", ii + 1); ffkeyn("NAXIS", ii + 1, name, status); ffpkyj(fptr, name, naxes[ii], comm, status); } ffpkyj(fptr, "PCOUNT", pcount, " ", status); ffpkyj(fptr, "GCOUNT", gcount, " ", status); if (*status > 0) ffpmsg("Failed to write extension header keywords (ffphext)"); return(*status); } /*--------------------------------------------------------------------------*/ int ffi2c(LONGLONG ival, /* I - value to be converted to a string */ char *cval, /* O - character string representation of the value */ int *status) /* IO - error status */ /* convert value to a null-terminated formatted string. */ { if (*status > 0) /* inherit input status value if > 0 */ return(*status); cval[0] = '\0'; #if defined(_MSC_VER) /* Microsoft Visual C++ 6.0 uses '%I64d' syntax for 8-byte integers */ if (sprintf(cval, "%I64d", ival) < 0) #elif (USE_LL_SUFFIX == 1) if (sprintf(cval, "%lld", ival) < 0) #else if (sprintf(cval, "%ld", ival) < 0) #endif { ffpmsg("Error in ffi2c converting integer to string"); *status = BAD_I2C; } return(*status); } /*--------------------------------------------------------------------------*/ int ffl2c(int lval, /* I - value to be converted to a string */ char *cval, /* O - character string representation of the value */ int *status) /* IO - error status ) */ /* convert logical value to a null-terminated formatted string. If the input value == 0, then the output character is the letter F, else the output character is the letter T. The output string is null terminated. */ { if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (lval) strcpy(cval,"T"); else strcpy(cval,"F"); return(*status); } /*--------------------------------------------------------------------------*/ int ffs2c(const char *instr, /* I - null terminated input string */ char *outstr, /* O - null terminated quoted output string */ int *status) /* IO - error status */ /* convert an input string to a quoted string. Leading spaces are significant. FITS string keyword values must be at least 8 chars long so pad out string with spaces if necessary. Example: km/s ==> 'km/s ' Single quote characters in the input string will be replace by two single quote characters. e.g., o'brian ==> 'o''brian' */ { size_t len, ii, jj; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (!instr) /* a null input pointer?? */ { strcpy(outstr, "''"); /* a null FITS string */ return(*status); } outstr[0] = '\''; /* start output string with a quote */ len = strlen(instr); if (len > 68) len = 68; /* limit input string to 68 chars */ for (ii=0, jj=1; ii < len && jj < 69; ii++, jj++) { outstr[jj] = instr[ii]; /* copy each char from input to output */ if (instr[ii] == '\'') { jj++; outstr[jj]='\''; /* duplicate any apostrophies in the input */ } } for (; jj < 9; jj++) /* pad string so it is at least 8 chars long */ outstr[jj] = ' '; if (jj == 70) /* only occurs if the last char of string was a quote */ outstr[69] = '\0'; else { outstr[jj] = '\''; /* append closing quote character */ outstr[jj+1] = '\0'; /* terminate the string */ } return(*status); } /*--------------------------------------------------------------------------*/ int ffr2f(float fval, /* I - value to be converted to a string */ int decim, /* I - number of decimal places to display */ char *cval, /* O - character string representation of the value */ int *status) /* IO - error status */ /* convert float value to a null-terminated F format string */ { char *cptr; if (*status > 0) /* inherit input status value if > 0 */ return(*status); cval[0] = '\0'; if (decim < 0) { ffpmsg("Error in ffr2f: no. of decimal places < 0"); return(*status = BAD_DECIM); } if (sprintf(cval, "%.*f", decim, fval) < 0) { ffpmsg("Error in ffr2f converting float to string"); *status = BAD_F2C; } /* replace comma with a period (e.g. in French locale) */ if ( (cptr = strchr(cval, ','))) *cptr = '.'; /* test if output string is 'NaN', 'INDEF', or 'INF' */ if (strchr(cval, 'N')) { ffpmsg("Error in ffr2f: float value is a NaN or INDEF"); *status = BAD_F2C; } return(*status); } /*--------------------------------------------------------------------------*/ int ffr2e(float fval, /* I - value to be converted to a string */ int decim, /* I - number of decimal places to display */ char *cval, /* O - character string representation of the value */ int *status) /* IO - error status */ /* convert float value to a null-terminated exponential format string */ { char *cptr; if (*status > 0) /* inherit input status value if > 0 */ return(*status); cval[0] = '\0'; if (decim < 0) { /* use G format if decim is negative */ if ( sprintf(cval, "%.*G", -decim, fval) < 0) { ffpmsg("Error in ffr2e converting float to string"); *status = BAD_F2C; } else { /* test if E format was used, and there is no displayed decimal */ if ( !strchr(cval, '.') && strchr(cval,'E') ) { /* reformat value with a decimal point and single zero */ if ( sprintf(cval, "%.1E", fval) < 0) { ffpmsg("Error in ffr2e converting float to string"); *status = BAD_F2C; } return(*status); } } } else { if ( sprintf(cval, "%.*E", decim, fval) < 0) { ffpmsg("Error in ffr2e converting float to string"); *status = BAD_F2C; } } if (*status <= 0) { /* replace comma with a period (e.g. in French locale) */ if ( (cptr = strchr(cval, ','))) *cptr = '.'; /* test if output string is 'NaN', 'INDEF', or 'INF' */ if (strchr(cval, 'N')) { ffpmsg("Error in ffr2e: float value is a NaN or INDEF"); *status = BAD_F2C; } else if ( !strchr(cval, '.') && !strchr(cval,'E') ) { /* add decimal point if necessary to distinquish from integer */ strcat(cval, "."); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffd2f(double dval, /* I - value to be converted to a string */ int decim, /* I - number of decimal places to display */ char *cval, /* O - character string representation of the value */ int *status) /* IO - error status */ /* convert double value to a null-terminated F format string */ { char *cptr; if (*status > 0) /* inherit input status value if > 0 */ return(*status); cval[0] = '\0'; if (decim < 0) { ffpmsg("Error in ffd2f: no. of decimal places < 0"); return(*status = BAD_DECIM); } if (sprintf(cval, "%.*f", decim, dval) < 0) { ffpmsg("Error in ffd2f converting double to string"); *status = BAD_F2C; } /* replace comma with a period (e.g. in French locale) */ if ( (cptr = strchr(cval, ','))) *cptr = '.'; /* test if output string is 'NaN', 'INDEF', or 'INF' */ if (strchr(cval, 'N')) { ffpmsg("Error in ffd2f: double value is a NaN or INDEF"); *status = BAD_F2C; } return(*status); } /*--------------------------------------------------------------------------*/ int ffd2e(double dval, /* I - value to be converted to a string */ int decim, /* I - number of decimal places to display */ char *cval, /* O - character string representation of the value */ int *status) /* IO - error status */ /* convert double value to a null-terminated exponential format string. */ { char *cptr; if (*status > 0) /* inherit input status value if > 0 */ return(*status); cval[0] = '\0'; if (decim < 0) { /* use G format if decim is negative */ if ( sprintf(cval, "%.*G", -decim, dval) < 0) { ffpmsg("Error in ffd2e converting float to string"); *status = BAD_F2C; } else { /* test if E format was used, and there is no displayed decimal */ if ( !strchr(cval, '.') && strchr(cval,'E') ) { /* reformat value with a decimal point and single zero */ if ( sprintf(cval, "%.1E", dval) < 0) { ffpmsg("Error in ffd2e converting float to string"); *status = BAD_F2C; } return(*status); } } } else { if ( sprintf(cval, "%.*E", decim, dval) < 0) { ffpmsg("Error in ffd2e converting float to string"); *status = BAD_F2C; } } if (*status <= 0) { /* replace comma with a period (e.g. in French locale) */ if ( (cptr = strchr(cval, ','))) *cptr = '.'; /* test if output string is 'NaN', 'INDEF', or 'INF' */ if (strchr(cval, 'N')) { ffpmsg("Error in ffd2e: double value is a NaN or INDEF"); *status = BAD_F2C; } else if ( !strchr(cval, '.') && !strchr(cval,'E') ) { /* add decimal point if necessary to distinquish from integer */ strcat(cval, "."); } } return(*status); } astropy-1.1.1/cextern/cfitsio/adler32.c0000644001134200020070000001164712602615517020645 0ustar embrayscience00000000000000/* adler32.c -- compute the Adler-32 checksum of a data stream * Copyright (C) 1995-2007 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ #include "zutil.h" #define local static local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2); #define BASE 65521UL /* largest prime smaller than 65536 */ #define NMAX 5552 /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ #define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;} #define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); #define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); #define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); #define DO16(buf) DO8(buf,0); DO8(buf,8); /* use NO_DIVIDE if your processor does not do division in hardware */ #ifdef NO_DIVIDE # define MOD(a) \ do { \ if (a >= (BASE << 16)) a -= (BASE << 16); \ if (a >= (BASE << 15)) a -= (BASE << 15); \ if (a >= (BASE << 14)) a -= (BASE << 14); \ if (a >= (BASE << 13)) a -= (BASE << 13); \ if (a >= (BASE << 12)) a -= (BASE << 12); \ if (a >= (BASE << 11)) a -= (BASE << 11); \ if (a >= (BASE << 10)) a -= (BASE << 10); \ if (a >= (BASE << 9)) a -= (BASE << 9); \ if (a >= (BASE << 8)) a -= (BASE << 8); \ if (a >= (BASE << 7)) a -= (BASE << 7); \ if (a >= (BASE << 6)) a -= (BASE << 6); \ if (a >= (BASE << 5)) a -= (BASE << 5); \ if (a >= (BASE << 4)) a -= (BASE << 4); \ if (a >= (BASE << 3)) a -= (BASE << 3); \ if (a >= (BASE << 2)) a -= (BASE << 2); \ if (a >= (BASE << 1)) a -= (BASE << 1); \ if (a >= BASE) a -= BASE; \ } while (0) # define MOD4(a) \ do { \ if (a >= (BASE << 4)) a -= (BASE << 4); \ if (a >= (BASE << 3)) a -= (BASE << 3); \ if (a >= (BASE << 2)) a -= (BASE << 2); \ if (a >= (BASE << 1)) a -= (BASE << 1); \ if (a >= BASE) a -= BASE; \ } while (0) #else # define MOD(a) a %= BASE # define MOD4(a) a %= BASE #endif /* ========================================================================= */ uLong ZEXPORT adler32(adler, buf, len) uLong adler; const Bytef *buf; uInt len; { unsigned long sum2; unsigned n; /* split Adler-32 into component sums */ sum2 = (adler >> 16) & 0xffff; adler &= 0xffff; /* in case user likes doing a byte at a time, keep it fast */ if (len == 1) { adler += buf[0]; if (adler >= BASE) adler -= BASE; sum2 += adler; if (sum2 >= BASE) sum2 -= BASE; return adler | (sum2 << 16); } /* initial Adler-32 value (deferred check for len == 1 speed) */ if (buf == Z_NULL) return 1L; /* in case short lengths are provided, keep it somewhat fast */ if (len < 16) { while (len--) { adler += *buf++; sum2 += adler; } if (adler >= BASE) adler -= BASE; MOD4(sum2); /* only added so many BASE's */ return adler | (sum2 << 16); } /* do length NMAX blocks -- requires just one modulo operation */ while (len >= NMAX) { len -= NMAX; n = NMAX / 16; /* NMAX is divisible by 16 */ do { DO16(buf); /* 16 sums unrolled */ buf += 16; } while (--n); MOD(adler); MOD(sum2); } /* do remaining bytes (less than NMAX, still just one modulo) */ if (len) { /* avoid modulos if none remaining */ while (len >= 16) { len -= 16; DO16(buf); buf += 16; } while (len--) { adler += *buf++; sum2 += adler; } MOD(adler); MOD(sum2); } /* return recombined sums */ return adler | (sum2 << 16); } /* ========================================================================= */ local uLong adler32_combine_(adler1, adler2, len2) uLong adler1; uLong adler2; z_off64_t len2; { unsigned long sum1; unsigned long sum2; unsigned rem; /* the derivation of this formula is left as an exercise for the reader */ rem = (unsigned)(len2 % BASE); sum1 = adler1 & 0xffff; sum2 = rem * sum1; MOD(sum2); sum1 += (adler2 & 0xffff) + BASE - 1; sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; if (sum1 >= BASE) sum1 -= BASE; if (sum1 >= BASE) sum1 -= BASE; if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1); if (sum2 >= BASE) sum2 -= BASE; return sum1 | (sum2 << 16); } /* ========================================================================= */ uLong ZEXPORT adler32_combine(adler1, adler2, len2) uLong adler1; uLong adler2; z_off_t len2; { return adler32_combine_(adler1, adler2, len2); } uLong ZEXPORT adler32_combine64(adler1, adler2, len2) uLong adler1; uLong adler2; z_off64_t len2; { return adler32_combine_(adler1, adler2, len2); } astropy-1.1.1/cextern/cfitsio/inftrees.c0000644001134200020070000003271112602615520021215 0ustar embrayscience00000000000000/* inftrees.c -- generate Huffman trees for efficient decoding * Copyright (C) 1995-2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ #include "zutil.h" #include "inftrees.h" #define MAXBITS 15 const char inflate_copyright[] = " inflate 1.2.5 Copyright 1995-2010 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot include such an acknowledgment, I would appreciate that you keep this copyright string in the executable of your product. */ /* Build a set of tables to decode the provided canonical Huffman code. The code lengths are lens[0..codes-1]. The result starts at *table, whose indices are 0..2^bits-1. work is a writable array of at least lens shorts, which is used as a work area. type is the type of code to be generated, CODES, LENS, or DISTS. On return, zero is success, -1 is an invalid code, and +1 means that ENOUGH isn't enough. table on return points to the next available entry's address. bits is the requested root table index bits, and on return it is the actual root table index bits. It will differ if the request is greater than the longest code or if it is less than the shortest code. */ int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work) codetype type; unsigned short FAR *lens; unsigned codes; code FAR * FAR *table; unsigned FAR *bits; unsigned short FAR *work; { unsigned len; /* a code's length in bits */ unsigned sym; /* index of code symbols */ unsigned min, max; /* minimum and maximum code lengths */ unsigned root; /* number of index bits for root table */ unsigned curr; /* number of index bits for current table */ unsigned drop; /* code bits to drop for sub-table */ int left; /* number of prefix codes available */ unsigned used; /* code entries in table used */ unsigned huff; /* Huffman code */ unsigned incr; /* for incrementing code, index */ unsigned fill; /* index for replicating entries */ unsigned low; /* low bits for current root entry */ unsigned mask; /* mask for low root bits */ code here; /* table entry for duplication */ code FAR *next; /* next available space in table */ const unsigned short FAR *base; /* base value table to use */ const unsigned short FAR *extra; /* extra bits table to use */ int end; /* use base and extra for symbol > end */ unsigned short count[MAXBITS+1]; /* number of codes of each length */ unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ static const unsigned short lbase[31] = { /* Length codes 257..285 base */ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 73, 195}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0}; static const unsigned short dext[32] = { /* Distance codes 0..29 extra */ 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64}; /* Process a set of code lengths to create a canonical Huffman code. The code lengths are lens[0..codes-1]. Each length corresponds to the symbols 0..codes-1. The Huffman code is generated by first sorting the symbols by length from short to long, and retaining the symbol order for codes with equal lengths. Then the code starts with all zero bits for the first code of the shortest length, and the codes are integer increments for the same length, and zeros are appended as the length increases. For the deflate format, these bits are stored backwards from their more natural integer increment ordering, and so when the decoding tables are built in the large loop below, the integer codes are incremented backwards. This routine assumes, but does not check, that all of the entries in lens[] are in the range 0..MAXBITS. The caller must assure this. 1..MAXBITS is interpreted as that code length. zero means that that symbol does not occur in this code. The codes are sorted by computing a count of codes for each length, creating from that a table of starting indices for each length in the sorted table, and then entering the symbols in order in the sorted table. The sorted table is work[], with that space being provided by the caller. The length counts are used for other purposes as well, i.e. finding the minimum and maximum length codes, determining if there are any codes at all, checking for a valid set of lengths, and looking ahead at length counts to determine sub-table sizes when building the decoding tables. */ /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ for (len = 0; len <= MAXBITS; len++) count[len] = 0; for (sym = 0; sym < codes; sym++) count[lens[sym]]++; /* bound code lengths, force root to be within code lengths */ root = *bits; for (max = MAXBITS; max >= 1; max--) if (count[max] != 0) break; if (root > max) root = max; if (max == 0) { /* no symbols to code at all */ here.op = (unsigned char)64; /* invalid code marker */ here.bits = (unsigned char)1; here.val = (unsigned short)0; *(*table)++ = here; /* make a table to force an error */ *(*table)++ = here; *bits = 1; return 0; /* no symbols, but wait for decoding to report error */ } for (min = 1; min < max; min++) if (count[min] != 0) break; if (root < min) root = min; /* check for an over-subscribed or incomplete set of lengths */ left = 1; for (len = 1; len <= MAXBITS; len++) { left <<= 1; left -= count[len]; if (left < 0) return -1; /* over-subscribed */ } if (left > 0 && (type == CODES || max != 1)) return -1; /* incomplete set */ /* generate offsets into symbol table for each length for sorting */ offs[1] = 0; for (len = 1; len < MAXBITS; len++) offs[len + 1] = offs[len] + count[len]; /* sort symbols by length, by symbol order within each length */ for (sym = 0; sym < codes; sym++) if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym; /* Create and fill in decoding tables. In this loop, the table being filled is at next and has curr index bits. The code being used is huff with length len. That code is converted to an index by dropping drop bits off of the bottom. For codes where len is less than drop + curr, those top drop + curr - len bits are incremented through all values to fill the table with replicated entries. root is the number of index bits for the root table. When len exceeds root, sub-tables are created pointed to by the root entry with an index of the low root bits of huff. This is saved in low to check for when a new sub-table should be started. drop is zero when the root table is being filled, and drop is root when sub-tables are being filled. When a new sub-table is needed, it is necessary to look ahead in the code lengths to determine what size sub-table is needed. The length counts are used for this, and so count[] is decremented as codes are entered in the tables. used keeps track of how many table entries have been allocated from the provided *table space. It is checked for LENS and DIST tables against the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in the initial root table size constants. See the comments in inftrees.h for more information. sym increments through all symbols, and the loop terminates when all codes of length max, i.e. all codes, have been processed. This routine permits incomplete codes, so another loop after this one fills in the rest of the decoding tables with invalid code markers. */ /* set up for code type */ switch (type) { case CODES: base = extra = work; /* dummy value--not used */ end = 19; break; case LENS: base = lbase; base -= 257; extra = lext; extra -= 257; end = 256; break; default: /* DISTS */ base = dbase; extra = dext; end = -1; } /* initialize state for loop */ huff = 0; /* starting code */ sym = 0; /* starting code symbol */ len = min; /* starting code length */ next = *table; /* current table to fill in */ curr = root; /* current table index bits */ drop = 0; /* current bits to drop from code for index */ low = (unsigned)(-1); /* trigger new sub-table when len > root */ used = 1U << root; /* use root table entries */ mask = used - 1; /* mask for comparing low */ /* check available table space */ if ((type == LENS && used >= ENOUGH_LENS) || (type == DISTS && used >= ENOUGH_DISTS)) return 1; /* process all codes and make table entries */ for (;;) { /* create table entry */ here.bits = (unsigned char)(len - drop); if ((int)(work[sym]) < end) { here.op = (unsigned char)0; here.val = work[sym]; } else if ((int)(work[sym]) > end) { here.op = (unsigned char)(extra[work[sym]]); here.val = base[work[sym]]; } else { here.op = (unsigned char)(32 + 64); /* end of block */ here.val = 0; } /* replicate for those indices with low len bits equal to huff */ incr = 1U << (len - drop); fill = 1U << curr; min = fill; /* save offset to next table */ do { fill -= incr; next[(huff >> drop) + fill] = here; } while (fill != 0); /* backwards increment the len-bit code huff */ incr = 1U << (len - 1); while (huff & incr) incr >>= 1; if (incr != 0) { huff &= incr - 1; huff += incr; } else huff = 0; /* go to next symbol, update count, len */ sym++; if (--(count[len]) == 0) { if (len == max) break; len = lens[work[sym]]; } /* create new sub-table if needed */ if (len > root && (huff & mask) != low) { /* if first time, transition to sub-tables */ if (drop == 0) drop = root; /* increment past last table */ next += min; /* here min is 1 << curr */ /* determine length of next table */ curr = len - drop; left = (int)(1 << curr); while (curr + drop < max) { left -= count[curr + drop]; if (left <= 0) break; curr++; left <<= 1; } /* check for enough space */ used += 1U << curr; if ((type == LENS && used >= ENOUGH_LENS) || (type == DISTS && used >= ENOUGH_DISTS)) return 1; /* point entry in root table to sub-table */ low = huff & mask; (*table)[low].op = (unsigned char)curr; (*table)[low].bits = (unsigned char)root; (*table)[low].val = (unsigned short)(next - *table); } } /* Fill in rest of table for incomplete codes. This loop is similar to the loop above in incrementing huff for table indices. It is assumed that len is equal to curr + drop, so there is no loop needed to increment through high index bits. When the current sub-table is filled, the loop drops back to the root table to fill in any remaining entries there. */ here.op = (unsigned char)64; /* invalid code marker */ here.bits = (unsigned char)(len - drop); here.val = (unsigned short)0; while (huff != 0) { /* when done with sub-table, drop back to root table */ if (drop != 0 && (huff & mask) != low) { drop = 0; len = root; next = *table; here.bits = (unsigned char)len; } /* put invalid code marker in table */ next[huff >> drop] = here; /* backwards increment the len-bit code huff */ incr = 1U << (len - 1); while (huff & incr) incr >>= 1; if (incr != 0) { huff &= incr - 1; huff += incr; } else huff = 0; } /* set return parameters */ *table += used; *bits = root; return 0; } astropy-1.1.1/cextern/cfitsio/drvrmem.c0000644001134200020070000010744512602615520021061 0ustar embrayscience00000000000000/* This file, drvrmem.c, contains driver routines for memory files. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include /* apparently needed to define size_t */ #include "fitsio2.h" /* prototype for .Z file uncompression function in zuncompress.c */ int zuncompress2mem(char *filename, FILE *diskfile, char **buffptr, size_t *buffsize, void *(*mem_realloc)(void *p, size_t newsize), size_t *filesize, int *status); #define RECBUFLEN 1000 static char stdin_outfile[FLEN_FILENAME]; typedef struct /* structure containing mem file structure */ { char **memaddrptr; /* Pointer to memory address pointer; */ /* This may or may not point to memaddr. */ char *memaddr; /* Pointer to starting memory address; may */ /* not always be used, so use *memaddrptr instead */ size_t *memsizeptr; /* Pointer to the size of the memory allocation. */ /* This may or may not point to memsize. */ size_t memsize; /* Size of the memory allocation; this may not */ /* always be used, so use *memsizeptr instead. */ size_t deltasize; /* Suggested increment for reallocating memory */ void *(*mem_realloc)(void *p, size_t newsize); /* realloc function */ LONGLONG currentpos; /* current file position, relative to start */ LONGLONG fitsfilesize; /* size of the FITS file (always <= *memsizeptr) */ FILE *fileptr; /* pointer to compressed output disk file */ } memdriver; static memdriver memTable[NMAXFILES]; /* allocate mem file handle tables */ /*--------------------------------------------------------------------------*/ int mem_init(void) { int ii; for (ii = 0; ii < NMAXFILES; ii++) /* initialize all empty slots in table */ { memTable[ii].memaddrptr = 0; memTable[ii].memaddr = 0; } return(0); } /*--------------------------------------------------------------------------*/ int mem_setoptions(int options) { /* do something with the options argument, to stop compiler warning */ options = 0; return(options); } /*--------------------------------------------------------------------------*/ int mem_getoptions(int *options) { *options = 0; return(0); } /*--------------------------------------------------------------------------*/ int mem_getversion(int *version) { *version = 10; return(0); } /*--------------------------------------------------------------------------*/ int mem_shutdown(void) { return(0); } /*--------------------------------------------------------------------------*/ int mem_create(char *filename, int *handle) /* Create a new empty memory file for subsequent writes. The file name is ignored in this case. */ { int status; /* initially allocate 1 FITS block = 2880 bytes */ status = mem_createmem(2880L, handle); if (status) { ffpmsg("failed to create empty memory file (mem_create)"); return(status); } return(0); } /*--------------------------------------------------------------------------*/ int mem_create_comp(char *filename, int *handle) /* Create a new empty memory file for subsequent writes. Also create an empty compressed .gz file. The memory file will be compressed and written to the disk file when the file is closed. */ { FILE *diskfile; char mode[4]; int status; /* first, create disk file for the compressed output */ if ( !strcmp(filename, "-.gz") || !strcmp(filename, "stdout.gz") || !strcmp(filename, "STDOUT.gz") ) { /* special case: create uncompressed FITS file in memory, then compress it an write it out to 'stdout' when it is closed. */ diskfile = stdout; } else { /* normal case: create disk file for the compressed output */ strcpy(mode, "w+b"); /* create file with read-write */ diskfile = fopen(filename, "r"); /* does file already exist? */ if (diskfile) { fclose(diskfile); /* close file and exit with error */ return(FILE_NOT_CREATED); } #if MACHINE == ALPHAVMS || MACHINE == VAXVMS /* specify VMS record structure: fixed format, 2880 byte records */ /* but force stream mode access to enable random I/O access */ diskfile = fopen(filename, mode, "rfm=fix", "mrs=2880", "ctx=stm"); #else diskfile = fopen(filename, mode); #endif if (!(diskfile)) /* couldn't create file */ { return(FILE_NOT_CREATED); } } /* now create temporary memory file */ /* initially allocate 1 FITS block = 2880 bytes */ status = mem_createmem(2880L, handle); if (status) { ffpmsg("failed to create empty memory file (mem_create_comp)"); return(status); } memTable[*handle].fileptr = diskfile; return(0); } /*--------------------------------------------------------------------------*/ int mem_openmem(void **buffptr, /* I - address of memory pointer */ size_t *buffsize, /* I - size of buffer, in bytes */ size_t deltasize, /* I - increment for future realloc's */ void *(*memrealloc)(void *p, size_t newsize), /* function */ int *handle) /* lowest level routine to open a pre-existing memory file. */ { int ii; *handle = -1; for (ii = 0; ii < NMAXFILES; ii++) /* find empty slot in handle table */ { if (memTable[ii].memaddrptr == 0) { *handle = ii; break; } } if (*handle == -1) return(TOO_MANY_FILES); /* too many files opened */ memTable[ii].memaddrptr = (char **) buffptr; /* pointer to start addres */ memTable[ii].memsizeptr = buffsize; /* allocated size of memory */ memTable[ii].deltasize = deltasize; /* suggested realloc increment */ memTable[ii].fitsfilesize = *buffsize; /* size of FITS file (upper limit) */ memTable[ii].currentpos = 0; /* at beginning of the file */ memTable[ii].mem_realloc = memrealloc; /* memory realloc function */ return(0); } /*--------------------------------------------------------------------------*/ int mem_createmem(size_t msize, int *handle) /* lowest level routine to allocate a memory file. */ { int ii; *handle = -1; for (ii = 0; ii < NMAXFILES; ii++) /* find empty slot in handle table */ { if (memTable[ii].memaddrptr == 0) { *handle = ii; break; } } if (*handle == -1) return(TOO_MANY_FILES); /* too many files opened */ /* use the internally allocated memaddr and memsize variables */ memTable[ii].memaddrptr = &memTable[ii].memaddr; memTable[ii].memsizeptr = &memTable[ii].memsize; /* allocate initial block of memory for the file */ if (msize > 0) { memTable[ii].memaddr = (char *) malloc(msize); if ( !(memTable[ii].memaddr) ) { ffpmsg("malloc of initial memory failed (mem_createmem)"); return(FILE_NOT_OPENED); } } /* set initial state of the file */ memTable[ii].memsize = msize; memTable[ii].deltasize = 2880; memTable[ii].fitsfilesize = 0; memTable[ii].currentpos = 0; memTable[ii].mem_realloc = realloc; return(0); } /*--------------------------------------------------------------------------*/ int mem_truncate(int handle, LONGLONG filesize) /* truncate the file to a new size */ { char *ptr; /* call the memory reallocation function, if defined */ if ( memTable[handle].mem_realloc ) { /* explicit LONGLONG->size_t cast */ ptr = (memTable[handle].mem_realloc)( *(memTable[handle].memaddrptr), (size_t) filesize); if (!ptr) { ffpmsg("Failed to reallocate memory (mem_truncate)"); return(MEMORY_ALLOCATION); } /* if allocated more memory, initialize it to zero */ if ( filesize > *(memTable[handle].memsizeptr) ) { memset(ptr + *(memTable[handle].memsizeptr), 0, ((size_t) filesize) - *(memTable[handle].memsizeptr) ); } *(memTable[handle].memaddrptr) = ptr; *(memTable[handle].memsizeptr) = (size_t) (filesize); } memTable[handle].currentpos = filesize; memTable[handle].fitsfilesize = filesize; return(0); } /*--------------------------------------------------------------------------*/ int stdin_checkfile(char *urltype, char *infile, char *outfile) /* do any special case checking when opening a file on the stdin stream */ { if (strlen(outfile)) { stdin_outfile[0] = '\0'; strncat(stdin_outfile,outfile,FLEN_FILENAME-1); /* an output file is specified */ strcpy(urltype,"stdinfile://"); } else *stdin_outfile = '\0'; /* no output file was specified */ return(0); } /*--------------------------------------------------------------------------*/ int stdin_open(char *filename, int rwmode, int *handle) /* open a FITS file from the stdin file stream by copying it into memory The file name is ignored in this case. */ { int status; char cbuff; if (*stdin_outfile) { /* copy the stdin stream to the specified disk file then open the file */ /* Create the output file */ status = file_create(stdin_outfile,handle); if (status) { ffpmsg("Unable to create output file to copy stdin (stdin_open):"); ffpmsg(stdin_outfile); return(status); } /* copy the whole stdin stream to the file */ status = stdin2file(*handle); file_close(*handle); if (status) { ffpmsg("failed to copy stdin to file (stdin_open)"); ffpmsg(stdin_outfile); return(status); } /* reopen file with proper rwmode attribute */ status = file_open(stdin_outfile, rwmode, handle); } else { /* get the first character, then put it back */ cbuff = fgetc(stdin); ungetc(cbuff, stdin); /* compressed files begin with 037 or 'P' */ if (cbuff == 31 || cbuff == 75) { /* looks like the input stream is compressed */ status = mem_compress_stdin_open(filename, rwmode, handle); } else { /* copy the stdin stream into memory then open file in memory */ if (rwmode != READONLY) { ffpmsg("cannot open stdin with WRITE access"); return(READONLY_FILE); } status = mem_createmem(2880L, handle); if (status) { ffpmsg("failed to create empty memory file (stdin_open)"); return(status); } /* copy the whole stdin stream into memory */ status = stdin2mem(*handle); if (status) { ffpmsg("failed to copy stdin into memory (stdin_open)"); free(memTable[*handle].memaddr); } } } return(status); } /*--------------------------------------------------------------------------*/ int stdin2mem(int hd) /* handle number */ /* Copy the stdin stream into memory. Fill whatever amount of memory has already been allocated, then realloc more memory if necessary. */ { size_t nread, memsize, delta; LONGLONG filesize; char *memptr; char simple[] = "SIMPLE"; int c, ii, jj; memptr = *memTable[hd].memaddrptr; memsize = *memTable[hd].memsizeptr; delta = memTable[hd].deltasize; filesize = 0; ii = 0; for(jj = 0; (c = fgetc(stdin)) != EOF && jj < 2000; jj++) { /* Skip over any garbage at the beginning of the stdin stream by */ /* reading 1 char at a time, looking for 'S', 'I', 'M', 'P', 'L', 'E' */ /* Give up if not found in the first 2000 characters */ if (c == simple[ii]) { ii++; if (ii == 6) /* found the complete string? */ { memcpy(memptr, simple, 6); /* copy "SIMPLE" to buffer */ filesize = 6; break; } } else ii = 0; /* reset search to beginning of the string */ } if (filesize == 0) { ffpmsg("Couldn't find the string 'SIMPLE' in the stdin stream."); ffpmsg("This does not look like a FITS file."); return(FILE_NOT_OPENED); } /* fill up the remainder of the initial memory allocation */ nread = fread(memptr + 6, 1, memsize - 6, stdin); nread += 6; /* add in the 6 characters in 'SIMPLE' */ if (nread < memsize) /* reached the end? */ { memTable[hd].fitsfilesize = nread; return(0); } filesize = nread; while (1) { /* allocate memory for another FITS block */ memptr = realloc(memptr, memsize + delta); if (!memptr) { ffpmsg("realloc failed while copying stdin (stdin2mem)"); return(MEMORY_ALLOCATION); } memsize += delta; /* read another FITS block */ nread = fread(memptr + filesize, 1, delta, stdin); filesize += nread; if (nread < delta) /* reached the end? */ break; } memTable[hd].fitsfilesize = filesize; *memTable[hd].memaddrptr = memptr; *memTable[hd].memsizeptr = memsize; return(0); } /*--------------------------------------------------------------------------*/ int stdin2file(int handle) /* handle number */ /* Copy the stdin stream to a file. . */ { size_t nread; char simple[] = "SIMPLE"; int c, ii, jj, status; char recbuf[RECBUFLEN]; ii = 0; for(jj = 0; (c = fgetc(stdin)) != EOF && jj < 2000; jj++) { /* Skip over any garbage at the beginning of the stdin stream by */ /* reading 1 char at a time, looking for 'S', 'I', 'M', 'P', 'L', 'E' */ /* Give up if not found in the first 2000 characters */ if (c == simple[ii]) { ii++; if (ii == 6) /* found the complete string? */ { memcpy(recbuf, simple, 6); /* copy "SIMPLE" to buffer */ break; } } else ii = 0; /* reset search to beginning of the string */ } if (ii != 6) { ffpmsg("Couldn't find the string 'SIMPLE' in the stdin stream"); return(FILE_NOT_OPENED); } /* fill up the remainder of the buffer */ nread = fread(recbuf + 6, 1, RECBUFLEN - 6, stdin); nread += 6; /* add in the 6 characters in 'SIMPLE' */ status = file_write(handle, recbuf, nread); if (status) return(status); /* copy the rest of stdin stream */ while(0 != (nread = fread(recbuf,1,RECBUFLEN, stdin))) { status = file_write(handle, recbuf, nread); if (status) return(status); } return(status); } /*--------------------------------------------------------------------------*/ int stdout_close(int handle) /* copy the memory file to stdout, then free the memory */ { int status = 0; /* copy from memory to standard out. explicit LONGLONG->size_t cast */ if(fwrite(memTable[handle].memaddr, 1, ((size_t) memTable[handle].fitsfilesize), stdout) != (size_t) memTable[handle].fitsfilesize ) { ffpmsg("failed to copy memory file to stdout (stdout_close)"); status = WRITE_ERROR; } free( memTable[handle].memaddr ); /* free the memory */ memTable[handle].memaddrptr = 0; memTable[handle].memaddr = 0; return(status); } /*--------------------------------------------------------------------------*/ int mem_compress_openrw(char *filename, int rwmode, int *hdl) /* This routine opens the compressed diskfile and creates an empty memory buffer with an appropriate size, then calls mem_uncompress2mem. It allows the memory 'file' to be opened with READWRITE access. */ { return(mem_compress_open(filename, READONLY, hdl)); } /*--------------------------------------------------------------------------*/ int mem_compress_open(char *filename, int rwmode, int *hdl) /* This routine opens the compressed diskfile and creates an empty memory buffer with an appropriate size, then calls mem_uncompress2mem. */ { FILE *diskfile; int status, estimated = 1; unsigned char buffer[4]; size_t finalsize, filesize; unsigned int modulosize; char *ptr; if (rwmode != READONLY) { ffpmsg( "cannot open compressed file with WRITE access (mem_compress_open)"); ffpmsg(filename); return(READONLY_FILE); } /* open the compressed disk file */ status = file_openfile(filename, READONLY, &diskfile); if (status) { ffpmsg("failed to open compressed disk file (compress_open)"); ffpmsg(filename); return(status); } if (fread(buffer, 1, 2, diskfile) != 2) /* read 2 bytes */ { fclose(diskfile); return(READ_ERROR); } if (memcmp(buffer, "\037\213", 2) == 0) /* GZIP */ { /* the uncompressed file size is give at the end */ /* of the file in the ISIZE field (modulo 2^32) */ fseek(diskfile, 0, 2); /* move to end of file */ filesize = ftell(diskfile); /* position = size of file */ fseek(diskfile, -4L, 1); /* move back 4 bytes */ fread(buffer, 1, 4L, diskfile); /* read 4 bytes */ /* have to worry about integer byte order */ modulosize = buffer[0]; modulosize |= buffer[1] << 8; modulosize |= buffer[2] << 16; modulosize |= buffer[3] << 24; /* the field ISIZE in the gzipped file header only stores 4 bytes and contains the uncompressed file size modulo 2^32. If the uncompressed file size is less than the compressed file size (filesize), then one probably needs to add 2^32 = 4294967296 to the uncompressed file size, assuming that the gzip produces a compressed file that is smaller than the original file. But one must allow for the case of very small files, where the gzipped file may actually be larger then the original uncompressed file. Therefore, only perform the modulo 2^32 correction test if the compressed file is greater than 10,000 bytes in size. (Note: this threhold would fail only if the original file was greater than 2^32 bytes in size AND gzip was able to compress it by more than a factor of 400,000 (!) which seems highly unlikely.) Also, obviously, this 2^32 modulo correction cannot be performed if the finalsize variable is only 32-bits long. Typically, the 'size_t' integer type must be 8 bytes or larger in size to support data files that are greater than 2 GB (2^31 bytes) in size. */ finalsize = modulosize; if (sizeof(size_t) > 4 && filesize > 10000) { while (finalsize < filesize) finalsize += 4294967296; } estimated = 0; /* file size is known, not estimated */ } else if (memcmp(buffer, "\120\113", 2) == 0) /* PKZIP */ { /* the uncompressed file size is give at byte 22 the file */ fseek(diskfile, 22L, 0); /* move to byte 22 */ fread(buffer, 1, 4L, diskfile); /* read 4 bytes */ /* have to worry about integer byte order */ modulosize = buffer[0]; modulosize |= buffer[1] << 8; modulosize |= buffer[2] << 16; modulosize |= buffer[3] << 24; finalsize = modulosize; estimated = 0; /* file size is known, not estimated */ } else if (memcmp(buffer, "\037\036", 2) == 0) /* PACK */ finalsize = 0; /* for most methods we can't determine final size */ else if (memcmp(buffer, "\037\235", 2) == 0) /* LZW */ finalsize = 0; /* for most methods we can't determine final size */ else if (memcmp(buffer, "\037\240", 2) == 0) /* LZH */ finalsize = 0; /* for most methods we can't determine final size */ else { /* not a compressed file; this should never happen */ fclose(diskfile); return(1); } if (finalsize == 0) /* estimate uncompressed file size */ { fseek(diskfile, 0, 2); /* move to end of the compressed file */ finalsize = ftell(diskfile); /* position = size of file */ finalsize = finalsize * 3; /* assume factor of 3 compression */ } fseek(diskfile, 0, 0); /* move back to beginning of file */ /* create a memory file big enough (hopefully) for the uncompressed file */ status = mem_createmem(finalsize, hdl); if (status && estimated) { /* memory allocation failed, so try a smaller estimated size */ finalsize = finalsize / 3; status = mem_createmem(finalsize, hdl); } if (status) { fclose(diskfile); ffpmsg("failed to create empty memory file (compress_open)"); return(status); } /* uncompress file into memory */ status = mem_uncompress2mem(filename, diskfile, *hdl); fclose(diskfile); if (status) { mem_close_free(*hdl); /* free up the memory */ ffpmsg("failed to uncompress file into memory (compress_open)"); return(status); } /* if we allocated too much memory initially, then free it */ if (*(memTable[*hdl].memsizeptr) > (( (size_t) memTable[*hdl].fitsfilesize) + 256L) ) { ptr = realloc(*(memTable[*hdl].memaddrptr), ((size_t) memTable[*hdl].fitsfilesize) ); if (!ptr) { ffpmsg("Failed to reduce size of allocated memory (compress_open)"); return(MEMORY_ALLOCATION); } *(memTable[*hdl].memaddrptr) = ptr; *(memTable[*hdl].memsizeptr) = (size_t) (memTable[*hdl].fitsfilesize); } return(0); } /*--------------------------------------------------------------------------*/ int mem_compress_stdin_open(char *filename, int rwmode, int *hdl) /* This routine reads the compressed input stream and creates an empty memory buffer, then calls mem_uncompress2mem. */ { int status; char *ptr; if (rwmode != READONLY) { ffpmsg( "cannot open compressed input stream with WRITE access (mem_compress_stdin_open)"); return(READONLY_FILE); } /* create a memory file for the uncompressed file */ status = mem_createmem(28800, hdl); if (status) { ffpmsg("failed to create empty memory file (compress_stdin_open)"); return(status); } /* uncompress file into memory */ status = mem_uncompress2mem(filename, stdin, *hdl); if (status) { mem_close_free(*hdl); /* free up the memory */ ffpmsg("failed to uncompress stdin into memory (compress_stdin_open)"); return(status); } /* if we allocated too much memory initially, then free it */ if (*(memTable[*hdl].memsizeptr) > (( (size_t) memTable[*hdl].fitsfilesize) + 256L) ) { ptr = realloc(*(memTable[*hdl].memaddrptr), ((size_t) memTable[*hdl].fitsfilesize) ); if (!ptr) { ffpmsg("Failed to reduce size of allocated memory (compress_stdin_open)"); return(MEMORY_ALLOCATION); } *(memTable[*hdl].memaddrptr) = ptr; *(memTable[*hdl].memsizeptr) = (size_t) (memTable[*hdl].fitsfilesize); } return(0); } /*--------------------------------------------------------------------------*/ int mem_iraf_open(char *filename, int rwmode, int *hdl) /* This routine creates an empty memory buffer, then calls iraf2mem to open the IRAF disk file and convert it to a FITS file in memeory. */ { int status; size_t filesize = 0; /* create a memory file with size = 0 for the FITS converted IRAF file */ status = mem_createmem(filesize, hdl); if (status) { ffpmsg("failed to create empty memory file (mem_iraf_open)"); return(status); } /* convert the iraf file into a FITS file in memory */ status = iraf2mem(filename, memTable[*hdl].memaddrptr, memTable[*hdl].memsizeptr, &filesize, &status); if (status) { mem_close_free(*hdl); /* free up the memory */ ffpmsg("failed to convert IRAF file into memory (mem_iraf_open)"); return(status); } memTable[*hdl].currentpos = 0; /* save starting position */ memTable[*hdl].fitsfilesize=filesize; /* and initial file size */ return(0); } /*--------------------------------------------------------------------------*/ int mem_rawfile_open(char *filename, int rwmode, int *hdl) /* This routine creates an empty memory buffer, writes a minimal image header, then copies the image data from the raw file into memory. It will byteswap the pixel values if the raw array is in little endian byte order. */ { FILE *diskfile; fitsfile *fptr; short *sptr; int status, endian, datatype, bytePerPix, naxis; long dim[5] = {1,1,1,1,1}, ii, nvals, offset = 0; size_t filesize = 0, datasize; char rootfile[FLEN_FILENAME], *cptr = 0, *cptr2 = 0; void *ptr; if (rwmode != READONLY) { ffpmsg( "cannot open raw binary file with WRITE access (mem_rawfile_open)"); ffpmsg(filename); return(READONLY_FILE); } cptr = strchr(filename, '['); /* search for opening bracket [ */ if (!cptr) { ffpmsg("binary file name missing '[' character (mem_rawfile_open)"); ffpmsg(filename); return(URL_PARSE_ERROR); } *rootfile = '\0'; strncat(rootfile, filename, cptr - filename); /* store the rootname */ cptr++; while (*cptr == ' ') cptr++; /* skip leading blanks */ /* Get the Data Type of the Image */ if (*cptr == 'b' || *cptr == 'B') { datatype = BYTE_IMG; bytePerPix = 1; } else if (*cptr == 'i' || *cptr == 'I') { datatype = SHORT_IMG; bytePerPix = 2; } else if (*cptr == 'u' || *cptr == 'U') { datatype = USHORT_IMG; bytePerPix = 2; } else if (*cptr == 'j' || *cptr == 'J') { datatype = LONG_IMG; bytePerPix = 4; } else if (*cptr == 'r' || *cptr == 'R' || *cptr == 'f' || *cptr == 'F') { datatype = FLOAT_IMG; bytePerPix = 4; } else if (*cptr == 'd' || *cptr == 'D') { datatype = DOUBLE_IMG; bytePerPix = 8; } else { ffpmsg("error in raw binary file datatype (mem_rawfile_open)"); ffpmsg(filename); return(URL_PARSE_ERROR); } cptr++; /* get Endian: Big or Little; default is same as the local machine */ if (*cptr == 'b' || *cptr == 'B') { endian = 0; cptr++; } else if (*cptr == 'l' || *cptr == 'L') { endian = 1; cptr++; } else endian = BYTESWAPPED; /* byteswapped machines are little endian */ /* read each dimension (up to 5) */ naxis = 1; dim[0] = strtol(cptr, &cptr2, 10); if (cptr2 && *cptr2 == ',') { naxis = 2; dim[1] = strtol(cptr2+1, &cptr, 10); if (cptr && *cptr == ',') { naxis = 3; dim[2] = strtol(cptr+1, &cptr2, 10); if (cptr2 && *cptr2 == ',') { naxis = 4; dim[3] = strtol(cptr2+1, &cptr, 10); if (cptr && *cptr == ',') naxis = 5; dim[4] = strtol(cptr+1, &cptr2, 10); } } } cptr = maxvalue(cptr, cptr2); if (*cptr == ':') /* read starting offset value */ offset = strtol(cptr+1, 0, 10); nvals = dim[0] * dim[1] * dim[2] * dim[3] * dim[4]; datasize = nvals * bytePerPix; filesize = nvals * bytePerPix + 2880; filesize = ((filesize - 1) / 2880 + 1) * 2880; /* open the raw binary disk file */ status = file_openfile(rootfile, READONLY, &diskfile); if (status) { ffpmsg("failed to open raw binary file (mem_rawfile_open)"); ffpmsg(rootfile); return(status); } /* create a memory file with corrct size for the FITS converted raw file */ status = mem_createmem(filesize, hdl); if (status) { ffpmsg("failed to create memory file (mem_rawfile_open)"); fclose(diskfile); return(status); } /* open this piece of memory as a new FITS file */ ffimem(&fptr, (void **) memTable[*hdl].memaddrptr, &filesize, 0, 0, &status); /* write the required header keywords */ ffcrim(fptr, datatype, naxis, dim, &status); /* close the FITS file, but keep the memory allocated */ ffclos(fptr, &status); if (status > 0) { ffpmsg("failed to write basic image header (mem_rawfile_open)"); fclose(diskfile); mem_close_free(*hdl); /* free up the memory */ return(status); } if (offset > 0) fseek(diskfile, offset, 0); /* offset to start of the data */ /* read the raw data into memory */ ptr = *memTable[*hdl].memaddrptr + 2880; if (fread((char *) ptr, 1, datasize, diskfile) != datasize) status = READ_ERROR; fclose(diskfile); /* close the raw binary disk file */ if (status) { mem_close_free(*hdl); /* free up the memory */ ffpmsg("failed to copy raw file data into memory (mem_rawfile_open)"); return(status); } if (datatype == USHORT_IMG) /* have to subtract 32768 from each unsigned */ { /* value to conform to FITS convention. More */ /* efficient way to do this is to just flip */ /* the most significant bit. */ sptr = (short *) ptr; if (endian == BYTESWAPPED) /* working with native format */ { for (ii = 0; ii < nvals; ii++, sptr++) { *sptr = ( *sptr ) ^ 0x8000; } } else /* pixels are byteswapped WRT the native format */ { for (ii = 0; ii < nvals; ii++, sptr++) { *sptr = ( *sptr ) ^ 0x80; } } } if (endian) /* swap the bytes if array is in little endian byte order */ { if (datatype == SHORT_IMG || datatype == USHORT_IMG) { ffswap2( (short *) ptr, nvals); } else if (datatype == LONG_IMG || datatype == FLOAT_IMG) { ffswap4( (INT32BIT *) ptr, nvals); } else if (datatype == DOUBLE_IMG) { ffswap8( (double *) ptr, nvals); } } memTable[*hdl].currentpos = 0; /* save starting position */ memTable[*hdl].fitsfilesize=filesize; /* and initial file size */ return(0); } /*--------------------------------------------------------------------------*/ int mem_uncompress2mem(char *filename, FILE *diskfile, int hdl) { /* lower level routine to uncompress a file into memory. The file has already been opened and the memory buffer has been allocated. */ size_t finalsize; int status; /* uncompress file into memory */ status = 0; if (strstr(filename, ".Z")) { zuncompress2mem(filename, diskfile, memTable[hdl].memaddrptr, /* pointer to memory address */ memTable[hdl].memsizeptr, /* pointer to size of memory */ realloc, /* reallocation function */ &finalsize, &status); /* returned file size nd status*/ } else { uncompress2mem(filename, diskfile, memTable[hdl].memaddrptr, /* pointer to memory address */ memTable[hdl].memsizeptr, /* pointer to size of memory */ realloc, /* reallocation function */ &finalsize, &status); /* returned file size nd status*/ } memTable[hdl].currentpos = 0; /* save starting position */ memTable[hdl].fitsfilesize=finalsize; /* and initial file size */ return status; } /*--------------------------------------------------------------------------*/ int mem_size(int handle, LONGLONG *filesize) /* return the size of the file; only called when the file is first opened */ { *filesize = memTable[handle].fitsfilesize; return(0); } /*--------------------------------------------------------------------------*/ int mem_close_free(int handle) /* close the file and free the memory. */ { free( *(memTable[handle].memaddrptr) ); memTable[handle].memaddrptr = 0; memTable[handle].memaddr = 0; return(0); } /*--------------------------------------------------------------------------*/ int mem_close_keep(int handle) /* close the memory file but do not free the memory. */ { memTable[handle].memaddrptr = 0; memTable[handle].memaddr = 0; return(0); } /*--------------------------------------------------------------------------*/ int mem_close_comp(int handle) /* compress the memory file, writing it out to the fileptr (which might be stdout) */ { int status = 0; size_t compsize; /* compress file in memory to a .gz disk file */ if(compress2file_from_mem(memTable[handle].memaddr, (size_t) (memTable[handle].fitsfilesize), memTable[handle].fileptr, &compsize, &status ) ) { ffpmsg("failed to copy memory file to file (mem_close_comp)"); status = WRITE_ERROR; } free( memTable[handle].memaddr ); /* free the memory */ memTable[handle].memaddrptr = 0; memTable[handle].memaddr = 0; /* close the compressed disk file (except if it is 'stdout' */ if (memTable[handle].fileptr != stdout) fclose(memTable[handle].fileptr); return(status); } /*--------------------------------------------------------------------------*/ int mem_seek(int handle, LONGLONG offset) /* seek to position relative to start of the file. */ { if (offset > memTable[handle].fitsfilesize ) return(END_OF_FILE); memTable[handle].currentpos = offset; return(0); } /*--------------------------------------------------------------------------*/ int mem_read(int hdl, void *buffer, long nbytes) /* read bytes from the current position in the file */ { if (memTable[hdl].currentpos + nbytes > memTable[hdl].fitsfilesize) return(END_OF_FILE); memcpy(buffer, *(memTable[hdl].memaddrptr) + memTable[hdl].currentpos, nbytes); memTable[hdl].currentpos += nbytes; return(0); } /*--------------------------------------------------------------------------*/ int mem_write(int hdl, void *buffer, long nbytes) /* write bytes at the current position in the file */ { size_t newsize; char *ptr; if ((size_t) (memTable[hdl].currentpos + nbytes) > *(memTable[hdl].memsizeptr) ) { if (!(memTable[hdl].mem_realloc)) { ffpmsg("realloc function not defined (mem_write)"); return(WRITE_ERROR); } /* Attempt to reallocate additional memory: the memory buffer size is incremented by the larger of: 1 FITS block (2880 bytes) or the defined 'deltasize' parameter */ newsize = maxvalue( (size_t) (((memTable[hdl].currentpos + nbytes - 1) / 2880) + 1) * 2880, *(memTable[hdl].memsizeptr) + memTable[hdl].deltasize); /* call the realloc function */ ptr = (memTable[hdl].mem_realloc)( *(memTable[hdl].memaddrptr), newsize); if (!ptr) { ffpmsg("Failed to reallocate memory (mem_write)"); return(MEMORY_ALLOCATION); } *(memTable[hdl].memaddrptr) = ptr; *(memTable[hdl].memsizeptr) = newsize; } /* now copy the bytes from the buffer into memory */ memcpy( *(memTable[hdl].memaddrptr) + memTable[hdl].currentpos, buffer, nbytes); memTable[hdl].currentpos += nbytes; memTable[hdl].fitsfilesize = maxvalue(memTable[hdl].fitsfilesize, memTable[hdl].currentpos); return(0); } astropy-1.1.1/cextern/cfitsio/editcol.c0000644001134200020070000024527112602615520021030 0ustar embrayscience00000000000000/* This file, editcol.c, contains the set of FITSIO routines that */ /* insert or delete rows or columns in a table or resize an image */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffrsim(fitsfile *fptr, /* I - FITS file pointer */ int bitpix, /* I - bits per pixel */ int naxis, /* I - number of axes in the array */ long *naxes, /* I - size of each axis */ int *status) /* IO - error status */ /* resize an existing primary array or IMAGE extension. */ { LONGLONG tnaxes[99]; int ii; if (*status > 0) return(*status); for (ii = 0; (ii < naxis) && (ii < 99); ii++) tnaxes[ii] = naxes[ii]; ffrsimll(fptr, bitpix, naxis, tnaxes, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffrsimll(fitsfile *fptr, /* I - FITS file pointer */ int bitpix, /* I - bits per pixel */ int naxis, /* I - number of axes in the array */ LONGLONG *naxes, /* I - size of each axis */ int *status) /* IO - error status */ /* resize an existing primary array or IMAGE extension. */ { int ii, simple, obitpix, onaxis, extend, nmodify; long nblocks, longval; long pcount, gcount, longbitpix; LONGLONG onaxes[99], newsize, oldsize; char comment[FLEN_COMMENT], keyname[FLEN_KEYWORD], message[FLEN_ERRMSG]; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); /* get current image size parameters */ if (ffghprll(fptr, 99, &simple, &obitpix, &onaxis, onaxes, &pcount, &gcount, &extend, status) > 0) return(*status); longbitpix = bitpix; /* test for the 2 special cases that represent unsigned integers */ if (longbitpix == USHORT_IMG) longbitpix = SHORT_IMG; else if (longbitpix == ULONG_IMG) longbitpix = LONG_IMG; /* test that the new values are legal */ if (longbitpix != BYTE_IMG && longbitpix != SHORT_IMG && longbitpix != LONG_IMG && longbitpix != LONGLONG_IMG && longbitpix != FLOAT_IMG && longbitpix != DOUBLE_IMG) { sprintf(message, "Illegal value for BITPIX keyword: %d", bitpix); ffpmsg(message); return(*status = BAD_BITPIX); } if (naxis < 0 || naxis > 999) { sprintf(message, "Illegal value for NAXIS keyword: %d", naxis); ffpmsg(message); return(*status = BAD_NAXIS); } if (naxis == 0) newsize = 0; else newsize = 1; for (ii = 0; ii < naxis; ii++) { if (naxes[ii] < 0) { sprintf(message, "Illegal value for NAXIS%d keyword: %.0f", ii + 1, (double) (naxes[ii])); ffpmsg(message); return(*status = BAD_NAXES); } newsize *= naxes[ii]; /* compute new image size, in pixels */ } /* compute size of old image, in bytes */ if (onaxis == 0) oldsize = 0; else { oldsize = 1; for (ii = 0; ii < onaxis; ii++) oldsize *= onaxes[ii]; oldsize = (oldsize + pcount) * gcount * (abs(obitpix) / 8); } oldsize = (oldsize + 2879) / 2880; /* old size, in blocks */ newsize = (newsize + pcount) * gcount * (abs(longbitpix) / 8); newsize = (newsize + 2879) / 2880; /* new size, in blocks */ if (newsize > oldsize) /* have to insert new blocks for image */ { nblocks = (long) (newsize - oldsize); if (ffiblk(fptr, nblocks, 1, status) > 0) return(*status); } else if (oldsize > newsize) /* have to delete blocks from image */ { nblocks = (long) (oldsize - newsize); if (ffdblk(fptr, nblocks, status) > 0) return(*status); } /* now update the header keywords */ strcpy(comment,"&"); /* special value to leave comments unchanged */ if (longbitpix != obitpix) { /* update BITPIX value */ ffmkyj(fptr, "BITPIX", longbitpix, comment, status); } if (naxis != onaxis) { /* update NAXIS value */ longval = naxis; ffmkyj(fptr, "NAXIS", longval, comment, status); } /* modify the existing NAXISn keywords */ nmodify = minvalue(naxis, onaxis); for (ii = 0; ii < nmodify; ii++) { ffkeyn("NAXIS", ii+1, keyname, status); ffmkyj(fptr, keyname, naxes[ii], comment, status); } if (naxis > onaxis) /* insert additional NAXISn keywords */ { strcpy(comment,"length of data axis"); for (ii = onaxis; ii < naxis; ii++) { ffkeyn("NAXIS", ii+1, keyname, status); ffikyj(fptr, keyname, naxes[ii], comment, status); } } else if (onaxis > naxis) /* delete old NAXISn keywords */ { for (ii = naxis; ii < onaxis; ii++) { ffkeyn("NAXIS", ii+1, keyname, status); ffdkey(fptr, keyname, status); } } /* Update the BSCALE and BZERO keywords, if an unsigned integer image */ if (bitpix == USHORT_IMG) { strcpy(comment, "offset data range to that of unsigned short"); ffukyg(fptr, "BZERO", 32768., 0, comment, status); strcpy(comment, "default scaling factor"); ffukyg(fptr, "BSCALE", 1.0, 0, comment, status); } else if (bitpix == ULONG_IMG) { strcpy(comment, "offset data range to that of unsigned long"); ffukyg(fptr, "BZERO", 2147483648., 0, comment, status); strcpy(comment, "default scaling factor"); ffukyg(fptr, "BSCALE", 1.0, 0, comment, status); } /* re-read the header, to make sure structures are updated */ ffrdef(fptr, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffirow(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG firstrow, /* I - insert space AFTER this row */ /* 0 = insert space at beginning of table */ LONGLONG nrows, /* I - number of rows to insert */ int *status) /* IO - error status */ /* insert NROWS blank rows immediated after row firstrow (1 = first row). Set firstrow = 0 to insert space at the beginning of the table. */ { int tstatus; LONGLONG naxis1, naxis2; LONGLONG datasize, firstbyte, nshift, nbytes; LONGLONG freespace; long nblock; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU) { ffpmsg("Can only add rows to TABLE or BINTABLE extension (ffirow)"); return(*status = NOT_TABLE); } if (nrows < 0 ) return(*status = NEG_BYTES); else if (nrows == 0) return(*status); /* no op, so just return */ /* get the current size of the table */ /* use internal structure since NAXIS2 keyword may not be up to date */ naxis1 = (fptr->Fptr)->rowlength; naxis2 = (fptr->Fptr)->numrows; if (firstrow > naxis2) { ffpmsg( "Insert position greater than the number of rows in the table (ffirow)"); return(*status = BAD_ROW_NUM); } else if (firstrow < 0) { ffpmsg("Insert position is less than 0 (ffirow)"); return(*status = BAD_ROW_NUM); } /* current data size */ datasize = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; freespace = ( ( (datasize + 2879) / 2880) * 2880) - datasize; nshift = naxis1 * nrows; /* no. of bytes to add to table */ if ( (freespace - nshift) < 0) /* not enough existing space? */ { nblock = (long) ((nshift - freespace + 2879) / 2880); /* number of blocks */ ffiblk(fptr, nblock, 1, status); /* insert the blocks */ } firstbyte = naxis1 * firstrow; /* relative insert position */ nbytes = datasize - firstbyte; /* no. of bytes to shift down */ firstbyte += ((fptr->Fptr)->datastart); /* absolute insert position */ ffshft(fptr, firstbyte, nbytes, nshift, status); /* shift rows and heap */ /* update the heap starting address */ (fptr->Fptr)->heapstart += nshift; /* update the THEAP keyword if it exists */ tstatus = 0; ffmkyj(fptr, "THEAP", (fptr->Fptr)->heapstart, "&", &tstatus); /* update the NAXIS2 keyword */ ffmkyj(fptr, "NAXIS2", naxis2 + nrows, "&", status); ((fptr->Fptr)->numrows) += nrows; ((fptr->Fptr)->origrows) += nrows; return(*status); } /*--------------------------------------------------------------------------*/ int ffdrow(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG firstrow, /* I - first row to delete (1 = first) */ LONGLONG nrows, /* I - number of rows to delete */ int *status) /* IO - error status */ /* delete NROWS rows from table starting with firstrow (1 = first row of table). */ { int tstatus; LONGLONG naxis1, naxis2; LONGLONG datasize, firstbyte, nbytes, nshift; LONGLONG freespace; long nblock; char comm[FLEN_COMMENT]; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU) { ffpmsg("Can only delete rows in TABLE or BINTABLE extension (ffdrow)"); return(*status = NOT_TABLE); } if (nrows < 0 ) return(*status = NEG_BYTES); else if (nrows == 0) return(*status); /* no op, so just return */ ffgkyjj(fptr, "NAXIS1", &naxis1, comm, status); /* get the current */ /* ffgkyj(fptr, "NAXIS2", &naxis2, comm, status);*/ /* size of the table */ /* the NAXIS2 keyword may not be up to date, so use the structure value */ naxis2 = (fptr->Fptr)->numrows; if (firstrow > naxis2) { ffpmsg( "Delete position greater than the number of rows in the table (ffdrow)"); return(*status = BAD_ROW_NUM); } else if (firstrow < 1) { ffpmsg("Delete position is less than 1 (ffdrow)"); return(*status = BAD_ROW_NUM); } else if (firstrow + nrows - 1 > naxis2) { ffpmsg("No. of rows to delete exceeds size of table (ffdrow)"); return(*status = BAD_ROW_NUM); } nshift = naxis1 * nrows; /* no. of bytes to delete from table */ /* cur size of data */ datasize = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; firstbyte = naxis1 * (firstrow + nrows - 1); /* relative del pos */ nbytes = datasize - firstbyte; /* no. of bytes to shift up */ firstbyte += ((fptr->Fptr)->datastart); /* absolute delete position */ ffshft(fptr, firstbyte, nbytes, nshift * (-1), status); /* shift data */ freespace = ( ( (datasize + 2879) / 2880) * 2880) - datasize; nblock = (long) ((nshift + freespace) / 2880); /* number of blocks */ /* delete integral number blocks */ if (nblock > 0) ffdblk(fptr, nblock, status); /* update the heap starting address */ (fptr->Fptr)->heapstart -= nshift; /* update the THEAP keyword if it exists */ tstatus = 0; ffmkyj(fptr, "THEAP", (long)(fptr->Fptr)->heapstart, "&", &tstatus); /* update the NAXIS2 keyword */ ffmkyj(fptr, "NAXIS2", naxis2 - nrows, "&", status); ((fptr->Fptr)->numrows) -= nrows; ((fptr->Fptr)->origrows) -= nrows; /* Update the heap data, if any. This will remove any orphaned data */ /* that was only pointed to by the rows that have been deleted */ ffcmph(fptr, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffdrrg(fitsfile *fptr, /* I - FITS file pointer to table */ char *ranges, /* I - ranges of rows to delete (1 = first) */ int *status) /* IO - error status */ /* delete the ranges of rows from the table (1 = first row of table). The 'ranges' parameter typically looks like: '10-20, 30 - 40, 55' or '50-' and gives a list of rows or row ranges separated by commas. */ { char *cptr; int nranges, nranges2, ii; long *minrow, *maxrow, nrows, *rowarray, jj, kk; LONGLONG naxis2; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU) { ffpmsg("Can only delete rows in TABLE or BINTABLE extension (ffdrrg)"); return(*status = NOT_TABLE); } /* the NAXIS2 keyword may not be up to date, so use the structure value */ naxis2 = (fptr->Fptr)->numrows; /* find how many ranges were specified ( = no. of commas in string + 1) */ cptr = ranges; for (nranges = 1; (cptr = strchr(cptr, ',')); nranges++) cptr++; minrow = calloc(nranges, sizeof(long)); maxrow = calloc(nranges, sizeof(long)); if (!minrow || !maxrow) { *status = MEMORY_ALLOCATION; ffpmsg("failed to allocate memory for row ranges (ffdrrg)"); if (maxrow) free(maxrow); if (minrow) free(minrow); return(*status); } /* parse range list into array of range min and max values */ ffrwrg(ranges, naxis2, nranges, &nranges2, minrow, maxrow, status); if (*status > 0 || nranges2 == 0) { free(maxrow); free(minrow); return(*status); } /* determine total number or rows to delete */ nrows = 0; for (ii = 0; ii < nranges2; ii++) { nrows = nrows + maxrow[ii] - minrow[ii] + 1; } rowarray = calloc(nrows, sizeof(long)); if (!rowarray) { *status = MEMORY_ALLOCATION; ffpmsg("failed to allocate memory for row array (ffdrrg)"); return(*status); } for (kk = 0, ii = 0; ii < nranges2; ii++) { for (jj = minrow[ii]; jj <= maxrow[ii]; jj++) { rowarray[kk] = jj; kk++; } } /* delete the rows */ ffdrws(fptr, rowarray, nrows, status); free(rowarray); free(maxrow); free(minrow); return(*status); } /*--------------------------------------------------------------------------*/ int ffdrws(fitsfile *fptr, /* I - FITS file pointer */ long *rownum, /* I - list of rows to delete (1 = first) */ long nrows, /* I - number of rows to delete */ int *status) /* IO - error status */ /* delete the list of rows from the table (1 = first row of table). */ { LONGLONG naxis1, naxis2, insertpos, nextrowpos; long ii, nextrow; char comm[FLEN_COMMENT]; unsigned char *buffer; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* rescan header if data structure is undefined */ if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU) { ffpmsg("Can only delete rows in TABLE or BINTABLE extension (ffdrws)"); return(*status = NOT_TABLE); } if (nrows < 0 ) return(*status = NEG_BYTES); else if (nrows == 0) return(*status); /* no op, so just return */ ffgkyjj(fptr, "NAXIS1", &naxis1, comm, status); /* row width */ ffgkyjj(fptr, "NAXIS2", &naxis2, comm, status); /* number of rows */ /* check that input row list is in ascending order */ for (ii = 1; ii < nrows; ii++) { if (rownum[ii - 1] >= rownum[ii]) { ffpmsg("row numbers are not in increasing order (ffdrws)"); return(*status = BAD_ROW_NUM); } } if (rownum[0] < 1) { ffpmsg("first row to delete is less than 1 (ffdrws)"); return(*status = BAD_ROW_NUM); } else if (rownum[nrows - 1] > naxis2) { ffpmsg("last row to delete exceeds size of table (ffdrws)"); return(*status = BAD_ROW_NUM); } buffer = (unsigned char *) malloc( (size_t) naxis1); /* buffer for one row */ if (!buffer) { ffpmsg("malloc failed (ffdrws)"); return(*status = MEMORY_ALLOCATION); } /* byte location to start of first row to delete, and the next row */ insertpos = (fptr->Fptr)->datastart + ((rownum[0] - 1) * naxis1); nextrowpos = insertpos + naxis1; nextrow = rownum[0] + 1; /* work through the list of rows to delete */ for (ii = 1; ii < nrows; nextrow++, nextrowpos += naxis1) { if (nextrow < rownum[ii]) { /* keep this row, so copy it to the new position */ ffmbyt(fptr, nextrowpos, REPORT_EOF, status); ffgbyt(fptr, naxis1, buffer, status); /* read the bytes */ ffmbyt(fptr, insertpos, IGNORE_EOF, status); ffpbyt(fptr, naxis1, buffer, status); /* write the bytes */ if (*status > 0) { ffpmsg("error while copying good rows in table (ffdrws)"); free(buffer); return(*status); } insertpos += naxis1; } else { /* skip over this row since it is in the list */ ii++; } } /* finished with all the rows to delete; copy remaining rows */ while(nextrow <= naxis2) { ffmbyt(fptr, nextrowpos, REPORT_EOF, status); ffgbyt(fptr, naxis1, buffer, status); /* read the bytes */ ffmbyt(fptr, insertpos, IGNORE_EOF, status); ffpbyt(fptr, naxis1, buffer, status); /* write the bytes */ if (*status > 0) { ffpmsg("failed to copy remaining rows in table (ffdrws)"); free(buffer); return(*status); } insertpos += naxis1; nextrowpos += naxis1; nextrow++; } free(buffer); /* now delete the empty rows at the end of the table */ ffdrow(fptr, naxis2 - nrows + 1, nrows, status); /* Update the heap data, if any. This will remove any orphaned data */ /* that was only pointed to by the rows that have been deleted */ ffcmph(fptr, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffdrwsll(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG *rownum, /* I - list of rows to delete (1 = first) */ LONGLONG nrows, /* I - number of rows to delete */ int *status) /* IO - error status */ /* delete the list of rows from the table (1 = first row of table). */ { LONGLONG insertpos, nextrowpos; LONGLONG naxis1, naxis2, ii, nextrow; char comm[FLEN_COMMENT]; unsigned char *buffer; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* rescan header if data structure is undefined */ if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU) { ffpmsg("Can only delete rows in TABLE or BINTABLE extension (ffdrws)"); return(*status = NOT_TABLE); } if (nrows < 0 ) return(*status = NEG_BYTES); else if (nrows == 0) return(*status); /* no op, so just return */ ffgkyjj(fptr, "NAXIS1", &naxis1, comm, status); /* row width */ ffgkyjj(fptr, "NAXIS2", &naxis2, comm, status); /* number of rows */ /* check that input row list is in ascending order */ for (ii = 1; ii < nrows; ii++) { if (rownum[ii - 1] >= rownum[ii]) { ffpmsg("row numbers are not in increasing order (ffdrws)"); return(*status = BAD_ROW_NUM); } } if (rownum[0] < 1) { ffpmsg("first row to delete is less than 1 (ffdrws)"); return(*status = BAD_ROW_NUM); } else if (rownum[nrows - 1] > naxis2) { ffpmsg("last row to delete exceeds size of table (ffdrws)"); return(*status = BAD_ROW_NUM); } buffer = (unsigned char *) malloc( (size_t) naxis1); /* buffer for one row */ if (!buffer) { ffpmsg("malloc failed (ffdrwsll)"); return(*status = MEMORY_ALLOCATION); } /* byte location to start of first row to delete, and the next row */ insertpos = (fptr->Fptr)->datastart + ((rownum[0] - 1) * naxis1); nextrowpos = insertpos + naxis1; nextrow = rownum[0] + 1; /* work through the list of rows to delete */ for (ii = 1; ii < nrows; nextrow++, nextrowpos += naxis1) { if (nextrow < rownum[ii]) { /* keep this row, so copy it to the new position */ ffmbyt(fptr, nextrowpos, REPORT_EOF, status); ffgbyt(fptr, naxis1, buffer, status); /* read the bytes */ ffmbyt(fptr, insertpos, IGNORE_EOF, status); ffpbyt(fptr, naxis1, buffer, status); /* write the bytes */ if (*status > 0) { ffpmsg("error while copying good rows in table (ffdrws)"); free(buffer); return(*status); } insertpos += naxis1; } else { /* skip over this row since it is in the list */ ii++; } } /* finished with all the rows to delete; copy remaining rows */ while(nextrow <= naxis2) { ffmbyt(fptr, nextrowpos, REPORT_EOF, status); ffgbyt(fptr, naxis1, buffer, status); /* read the bytes */ ffmbyt(fptr, insertpos, IGNORE_EOF, status); ffpbyt(fptr, naxis1, buffer, status); /* write the bytes */ if (*status > 0) { ffpmsg("failed to copy remaining rows in table (ffdrws)"); free(buffer); return(*status); } insertpos += naxis1; nextrowpos += naxis1; nextrow++; } free(buffer); /* now delete the empty rows at the end of the table */ ffdrow(fptr, naxis2 - nrows + 1, nrows, status); /* Update the heap data, if any. This will remove any orphaned data */ /* that was only pointed to by the rows that have been deleted */ ffcmph(fptr, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffrwrg( char *rowlist, /* I - list of rows and row ranges */ LONGLONG maxrows, /* I - number of rows in the table */ int maxranges, /* I - max number of ranges to be returned */ int *numranges, /* O - number ranges returned */ long *minrow, /* O - first row in each range */ long *maxrow, /* O - last row in each range */ int *status) /* IO - status value */ { /* parse the input list of row ranges, returning the number of ranges, and the min and max row value in each range. The only characters allowed in the input rowlist are decimal digits, minus sign, and comma (and non-significant spaces) Example: list = "10-20, 30-35,50" would return numranges = 3, minrow[] = {10, 30, 50}, maxrow[] = {20, 35, 50} error is returned if min value of range is > max value of range or if the ranges are not monotonically increasing. */ char *next; long minval, maxval; if (*status > 0) return(*status); if (maxrows <= 0 ) { *status = RANGE_PARSE_ERROR; ffpmsg("Input maximum range value is <= 0 (fits_parse_ranges)"); return(*status); } next = rowlist; *numranges = 0; while (*next == ' ')next++; /* skip spaces */ while (*next != '\0') { /* find min value of next range; *next must be '-' or a digit */ if (*next == '-') { minval = 1; /* implied minrow value = 1 */ } else if ( isdigit((int) *next) ) { minval = strtol(next, &next, 10); } else { *status = RANGE_PARSE_ERROR; ffpmsg("Syntax error in this row range list:"); ffpmsg(rowlist); return(*status); } while (*next == ' ')next++; /* skip spaces */ /* find max value of next range; *next must be '-', or ',' */ if (*next == '-') { next++; while (*next == ' ')next++; /* skip spaces */ if ( isdigit((int) *next) ) { maxval = strtol(next, &next, 10); } else if (*next == ',' || *next == '\0') { maxval = (long) maxrows; /* implied max value */ } else { *status = RANGE_PARSE_ERROR; ffpmsg("Syntax error in this row range list:"); ffpmsg(rowlist); return(*status); } } else if (*next == ',' || *next == '\0') { maxval = minval; /* only a single integer in this range */ } else { *status = RANGE_PARSE_ERROR; ffpmsg("Syntax error in this row range list:"); ffpmsg(rowlist); return(*status); } if (*numranges + 1 > maxranges) { *status = RANGE_PARSE_ERROR; ffpmsg("Overflowed maximum number of ranges (fits_parse_ranges)"); return(*status); } if (minval < 1 ) { *status = RANGE_PARSE_ERROR; ffpmsg("Syntax error in this row range list: row number < 1"); ffpmsg(rowlist); return(*status); } if (maxval < minval) { *status = RANGE_PARSE_ERROR; ffpmsg("Syntax error in this row range list: min > max"); ffpmsg(rowlist); return(*status); } if (*numranges > 0) { if (minval <= maxrow[(*numranges) - 1]) { *status = RANGE_PARSE_ERROR; ffpmsg("Syntax error in this row range list. Range minimum is"); ffpmsg(" less than or equal to previous range maximum"); ffpmsg(rowlist); return(*status); } } if (minval <= maxrows) { /* ignore range if greater than maxrows */ if (maxval > maxrows) maxval = (long) maxrows; minrow[*numranges] = minval; maxrow[*numranges] = maxval; (*numranges)++; } while (*next == ' ')next++; /* skip spaces */ if (*next == ',') { next++; while (*next == ' ')next++; /* skip more spaces */ } } if (*numranges == 0) { /* a null string was entered */ minrow[0] = 1; maxrow[0] = (long) maxrows; *numranges = 1; } return(*status); } /*--------------------------------------------------------------------------*/ int ffrwrgll( char *rowlist, /* I - list of rows and row ranges */ LONGLONG maxrows, /* I - number of rows in the list */ int maxranges, /* I - max number of ranges to be returned */ int *numranges, /* O - number ranges returned */ LONGLONG *minrow, /* O - first row in each range */ LONGLONG *maxrow, /* O - last row in each range */ int *status) /* IO - status value */ { /* parse the input list of row ranges, returning the number of ranges, and the min and max row value in each range. The only characters allowed in the input rowlist are decimal digits, minus sign, and comma (and non-significant spaces) Example: list = "10-20, 30-35,50" would return numranges = 3, minrow[] = {10, 30, 50}, maxrow[] = {20, 35, 50} error is returned if min value of range is > max value of range or if the ranges are not monotonically increasing. */ char *next; LONGLONG minval, maxval; double dvalue; if (*status > 0) return(*status); if (maxrows <= 0 ) { *status = RANGE_PARSE_ERROR; ffpmsg("Input maximum range value is <= 0 (fits_parse_ranges)"); return(*status); } next = rowlist; *numranges = 0; while (*next == ' ')next++; /* skip spaces */ while (*next != '\0') { /* find min value of next range; *next must be '-' or a digit */ if (*next == '-') { minval = 1; /* implied minrow value = 1 */ } else if ( isdigit((int) *next) ) { /* read as a double, because the string to LONGLONG function */ /* is platform dependent (strtoll, strtol, _atoI64) */ dvalue = strtod(next, &next); minval = (LONGLONG) (dvalue + 0.1); } else { *status = RANGE_PARSE_ERROR; ffpmsg("Syntax error in this row range list:"); ffpmsg(rowlist); return(*status); } while (*next == ' ')next++; /* skip spaces */ /* find max value of next range; *next must be '-', or ',' */ if (*next == '-') { next++; while (*next == ' ')next++; /* skip spaces */ if ( isdigit((int) *next) ) { /* read as a double, because the string to LONGLONG function */ /* is platform dependent (strtoll, strtol, _atoI64) */ dvalue = strtod(next, &next); maxval = (LONGLONG) (dvalue + 0.1); } else if (*next == ',' || *next == '\0') { maxval = maxrows; /* implied max value */ } else { *status = RANGE_PARSE_ERROR; ffpmsg("Syntax error in this row range list:"); ffpmsg(rowlist); return(*status); } } else if (*next == ',' || *next == '\0') { maxval = minval; /* only a single integer in this range */ } else { *status = RANGE_PARSE_ERROR; ffpmsg("Syntax error in this row range list:"); ffpmsg(rowlist); return(*status); } if (*numranges + 1 > maxranges) { *status = RANGE_PARSE_ERROR; ffpmsg("Overflowed maximum number of ranges (fits_parse_ranges)"); return(*status); } if (minval < 1 ) { *status = RANGE_PARSE_ERROR; ffpmsg("Syntax error in this row range list: row number < 1"); ffpmsg(rowlist); return(*status); } if (maxval < minval) { *status = RANGE_PARSE_ERROR; ffpmsg("Syntax error in this row range list: min > max"); ffpmsg(rowlist); return(*status); } if (*numranges > 0) { if (minval <= maxrow[(*numranges) - 1]) { *status = RANGE_PARSE_ERROR; ffpmsg("Syntax error in this row range list. Range minimum is"); ffpmsg(" less than or equal to previous range maximum"); ffpmsg(rowlist); return(*status); } } if (minval <= maxrows) { /* ignore range if greater than maxrows */ if (maxval > maxrows) maxval = maxrows; minrow[*numranges] = minval; maxrow[*numranges] = maxval; (*numranges)++; } while (*next == ' ')next++; /* skip spaces */ if (*next == ',') { next++; while (*next == ' ')next++; /* skip more spaces */ } } if (*numranges == 0) { /* a null string was entered */ minrow[0] = 1; maxrow[0] = maxrows; *numranges = 1; } return(*status); } /*--------------------------------------------------------------------------*/ int fficol(fitsfile *fptr, /* I - FITS file pointer */ int numcol, /* I - position for new col. (1 = 1st) */ char *ttype, /* I - name of column (TTYPE keyword) */ char *tform, /* I - format of column (TFORM keyword) */ int *status) /* IO - error status */ /* Insert a new column into an existing table at position numcol. If numcol is greater than the number of existing columns in the table then the new column will be appended as the last column in the table. */ { char *name, *format; name = ttype; format = tform; fficls(fptr, numcol, 1, &name, &format, status); return(*status); } /*--------------------------------------------------------------------------*/ int fficls(fitsfile *fptr, /* I - FITS file pointer */ int fstcol, /* I - position for first new col. (1 = 1st) */ int ncols, /* I - number of columns to insert */ char **ttype, /* I - array of column names(TTYPE keywords) */ char **tform, /* I - array of formats of column (TFORM) */ int *status) /* IO - error status */ /* Insert 1 or more new columns into an existing table at position numcol. If fstcol is greater than the number of existing columns in the table then the new column will be appended as the last column in the table. */ { int colnum, datacode, decims, tfields, tstatus, ii; LONGLONG datasize, firstbyte, nbytes, nadd, naxis1, naxis2, freespace; LONGLONG tbcol, firstcol, delbyte; long nblock, width, repeat; char tfm[FLEN_VALUE], keyname[FLEN_KEYWORD], comm[FLEN_COMMENT], *cptr; tcolumn *colptr; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU) { ffpmsg("Can only add columns to TABLE or BINTABLE extension (fficol)"); return(*status = NOT_TABLE); } /* is the column number valid? */ tfields = (fptr->Fptr)->tfield; if (fstcol < 1 ) return(*status = BAD_COL_NUM); else if (fstcol > tfields) colnum = tfields + 1; /* append as last column */ else colnum = fstcol; /* parse the tform value and calc number of bytes to add to each row */ delbyte = 0; for (ii = 0; ii < ncols; ii++) { strcpy(tfm, tform[ii]); ffupch(tfm); /* make sure format is in upper case */ if ((fptr->Fptr)->hdutype == ASCII_TBL) { ffasfm(tfm, &datacode, &width, &decims, status); delbyte += width + 1; /* add one space between the columns */ } else { ffbnfm(tfm, &datacode, &repeat, &width, status); if (datacode < 0) { /* variable length array column */ if (strchr(tfm, 'Q')) delbyte += 16; else delbyte += 8; } else if (datacode == 1) /* bit column; round up */ delbyte += (repeat + 7) / 8; /* to multiple of 8 bits */ else if (datacode == 16) /* ASCII string column */ delbyte += repeat; else /* numerical data type */ delbyte += (datacode / 10) * repeat; } } if (*status > 0) return(*status); /* get the current size of the table */ /* use internal structure since NAXIS2 keyword may not be up to date */ naxis1 = (fptr->Fptr)->rowlength; naxis2 = (fptr->Fptr)->numrows; /* current size of data */ datasize = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; freespace = ( ( (datasize + 2879) / 2880) * 2880) - datasize; nadd = delbyte * naxis2; /* no. of bytes to add to table */ if ( (freespace - nadd) < 0) /* not enough existing space? */ { nblock = (long) ((nadd - freespace + 2879) / 2880); /* number of blocks */ if (ffiblk(fptr, nblock, 1, status) > 0) /* insert the blocks */ return(*status); } /* shift heap down (if it exists) */ if ((fptr->Fptr)->heapsize > 0) { nbytes = (fptr->Fptr)->heapsize; /* no. of bytes to shift down */ /* absolute heap pos */ firstbyte = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart; if (ffshft(fptr, firstbyte, nbytes, nadd, status) > 0) /* move heap */ return(*status); } /* update the heap starting address */ (fptr->Fptr)->heapstart += nadd; /* update the THEAP keyword if it exists */ tstatus = 0; ffmkyj(fptr, "THEAP", (fptr->Fptr)->heapstart, "&", &tstatus); /* calculate byte position in the row where to insert the new column */ if (colnum > tfields) firstcol = naxis1; else { colptr = (fptr->Fptr)->tableptr; colptr += (colnum - 1); firstcol = colptr->tbcol; } /* insert delbyte bytes in every row, at byte position firstcol */ ffcins(fptr, naxis1, naxis2, delbyte, firstcol, status); if ((fptr->Fptr)->hdutype == ASCII_TBL) { /* adjust the TBCOL values of the existing columns */ for(ii = 0; ii < tfields; ii++) { ffkeyn("TBCOL", ii + 1, keyname, status); ffgkyjj(fptr, keyname, &tbcol, comm, status); if (tbcol > firstcol) { tbcol += delbyte; ffmkyj(fptr, keyname, tbcol, "&", status); } } } /* update the mandatory keywords */ ffmkyj(fptr, "TFIELDS", tfields + ncols, "&", status); ffmkyj(fptr, "NAXIS1", naxis1 + delbyte, "&", status); /* increment the index value on any existing column keywords */ if(colnum <= tfields) ffkshf(fptr, colnum, tfields, ncols, status); /* add the required keywords for the new columns */ for (ii = 0; ii < ncols; ii++, colnum++) { strcpy(comm, "label for field"); ffkeyn("TTYPE", colnum, keyname, status); ffpkys(fptr, keyname, ttype[ii], comm, status); strcpy(comm, "format of field"); strcpy(tfm, tform[ii]); ffupch(tfm); /* make sure format is in upper case */ ffkeyn("TFORM", colnum, keyname, status); if (abs(datacode) == TSBYTE) { /* Replace the 'S' with an 'B' in the TFORMn code */ cptr = tfm; while (*cptr != 'S') cptr++; *cptr = 'B'; ffpkys(fptr, keyname, tfm, comm, status); /* write the TZEROn and TSCALn keywords */ ffkeyn("TZERO", colnum, keyname, status); strcpy(comm, "offset for signed bytes"); ffpkyg(fptr, keyname, -128., 0, comm, status); ffkeyn("TSCAL", colnum, keyname, status); strcpy(comm, "data are not scaled"); ffpkyg(fptr, keyname, 1., 0, comm, status); } else if (abs(datacode) == TUSHORT) { /* Replace the 'U' with an 'I' in the TFORMn code */ cptr = tfm; while (*cptr != 'U') cptr++; *cptr = 'I'; ffpkys(fptr, keyname, tfm, comm, status); /* write the TZEROn and TSCALn keywords */ ffkeyn("TZERO", colnum, keyname, status); strcpy(comm, "offset for unsigned integers"); ffpkyg(fptr, keyname, 32768., 0, comm, status); ffkeyn("TSCAL", colnum, keyname, status); strcpy(comm, "data are not scaled"); ffpkyg(fptr, keyname, 1., 0, comm, status); } else if (abs(datacode) == TULONG) { /* Replace the 'V' with an 'J' in the TFORMn code */ cptr = tfm; while (*cptr != 'V') cptr++; *cptr = 'J'; ffpkys(fptr, keyname, tfm, comm, status); /* write the TZEROn and TSCALn keywords */ ffkeyn("TZERO", colnum, keyname, status); strcpy(comm, "offset for unsigned integers"); ffpkyg(fptr, keyname, 2147483648., 0, comm, status); ffkeyn("TSCAL", colnum, keyname, status); strcpy(comm, "data are not scaled"); ffpkyg(fptr, keyname, 1., 0, comm, status); } else { ffpkys(fptr, keyname, tfm, comm, status); } if ((fptr->Fptr)->hdutype == ASCII_TBL) /* write the TBCOL keyword */ { if (colnum == tfields + 1) tbcol = firstcol + 2; /* allow space between preceding col */ else tbcol = firstcol + 1; strcpy(comm, "beginning column of field"); ffkeyn("TBCOL", colnum, keyname, status); ffpkyj(fptr, keyname, tbcol, comm, status); /* increment the column starting position for the next column */ ffasfm(tfm, &datacode, &width, &decims, status); firstcol += width + 1; /* add one space between the columns */ } } ffrdef(fptr, status); /* initialize the new table structure */ return(*status); } /*--------------------------------------------------------------------------*/ int ffmvec(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - position of col to be modified */ LONGLONG newveclen, /* I - new vector length of column (TFORM) */ int *status) /* IO - error status */ /* Modify the vector length of a column in a binary table, larger or smaller. E.g., change a column from TFORMn = '1E' to '20E'. */ { int datacode, tfields, tstatus; LONGLONG datasize, size, firstbyte, nbytes, nadd, ndelete; LONGLONG naxis1, naxis2, firstcol, freespace; LONGLONG width, delbyte, repeat; long nblock; char tfm[FLEN_VALUE], keyname[FLEN_KEYWORD], tcode[2]; tcolumn *colptr; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); if ((fptr->Fptr)->hdutype != BINARY_TBL) { ffpmsg( "Can only change vector length of a column in BINTABLE extension (ffmvec)"); return(*status = NOT_TABLE); } /* is the column number valid? */ tfields = (fptr->Fptr)->tfield; if (colnum < 1 || colnum > tfields) return(*status = BAD_COL_NUM); /* look up the current vector length and element width */ colptr = (fptr->Fptr)->tableptr; colptr += (colnum - 1); datacode = colptr->tdatatype; /* datatype of the column */ repeat = colptr->trepeat; /* field repeat count */ width = colptr->twidth; /* width of a single element in chars */ if (datacode < 0) { ffpmsg( "Can't modify vector length of variable length column (ffmvec)"); return(*status = BAD_TFORM); } if (repeat == newveclen) return(*status); /* column already has the desired vector length */ if (datacode == TSTRING) width = 1; /* width was equal to width of unit string */ naxis1 = (fptr->Fptr)->rowlength; /* current width of the table */ naxis2 = (fptr->Fptr)->numrows; delbyte = (newveclen - repeat) * width; /* no. of bytes to insert */ if (datacode == TBIT) /* BIT column is a special case */ delbyte = ((newveclen + 7) / 8) - ((repeat + 7) / 8); if (delbyte > 0) /* insert space for more elements */ { /* current size of data */ datasize = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; freespace = ( ( (datasize + 2879) / 2880) * 2880) - datasize; nadd = (LONGLONG)delbyte * naxis2; /* no. of bytes to add to table */ if ( (freespace - nadd) < 0) /* not enough existing space? */ { nblock = (long) ((nadd - freespace + 2879) / 2880); /* number of blocks */ if (ffiblk(fptr, nblock, 1, status) > 0) /* insert the blocks */ return(*status); } /* shift heap down (if it exists) */ if ((fptr->Fptr)->heapsize > 0) { nbytes = (fptr->Fptr)->heapsize; /* no. of bytes to shift down */ /* absolute heap pos */ firstbyte = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart; if (ffshft(fptr, firstbyte, nbytes, nadd, status) > 0) /* move heap */ return(*status); } /* update the heap starting address */ (fptr->Fptr)->heapstart += nadd; /* update the THEAP keyword if it exists */ tstatus = 0; ffmkyj(fptr, "THEAP", (fptr->Fptr)->heapstart, "&", &tstatus); firstcol = colptr->tbcol + (repeat * width); /* insert position */ /* insert delbyte bytes in every row, at byte position firstcol */ ffcins(fptr, naxis1, naxis2, delbyte, firstcol, status); } else if (delbyte < 0) { /* current size of table */ size = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; freespace = ((size + 2879) / 2880) * 2880 - size - ((LONGLONG)delbyte * naxis2); nblock = (long) (freespace / 2880); /* number of empty blocks to delete */ firstcol = colptr->tbcol + (newveclen * width); /* delete position */ /* delete elements from the vector */ ffcdel(fptr, naxis1, naxis2, -delbyte, firstcol, status); /* abs heap pos */ firstbyte = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart; ndelete = (LONGLONG)delbyte * naxis2; /* size of shift (negative) */ /* shift heap up (if it exists) */ if ((fptr->Fptr)->heapsize > 0) { nbytes = (fptr->Fptr)->heapsize; /* no. of bytes to shift up */ if (ffshft(fptr, firstbyte, nbytes, ndelete, status) > 0) return(*status); } /* delete the empty blocks at the end of the HDU */ if (nblock > 0) ffdblk(fptr, nblock, status); /* update the heap starting address */ (fptr->Fptr)->heapstart += ndelete; /* ndelete is negative */ /* update the THEAP keyword if it exists */ tstatus = 0; ffmkyj(fptr, "THEAP", (fptr->Fptr)->heapstart, "&", &tstatus); } /* construct the new TFORM keyword for the column */ if (datacode == TBIT) strcpy(tcode,"X"); else if (datacode == TBYTE) strcpy(tcode,"B"); else if (datacode == TLOGICAL) strcpy(tcode,"L"); else if (datacode == TSTRING) strcpy(tcode,"A"); else if (datacode == TSHORT) strcpy(tcode,"I"); else if (datacode == TLONG) strcpy(tcode,"J"); else if (datacode == TLONGLONG) strcpy(tcode,"K"); else if (datacode == TFLOAT) strcpy(tcode,"E"); else if (datacode == TDOUBLE) strcpy(tcode,"D"); else if (datacode == TCOMPLEX) strcpy(tcode,"C"); else if (datacode == TDBLCOMPLEX) strcpy(tcode,"M"); /* write as a double value because the LONGLONG conversion */ /* character in sprintf is platform dependent ( %lld, %ld, %I64d ) */ sprintf(tfm,"%.0f%s",(double) newveclen, tcode); ffkeyn("TFORM", colnum, keyname, status); /* Keyword name */ ffmkys(fptr, keyname, tfm, "&", status); /* modify TFORM keyword */ ffmkyj(fptr, "NAXIS1", naxis1 + delbyte, "&", status); /* modify NAXIS1 */ ffrdef(fptr, status); /* reinitialize the new table structure */ return(*status); } /*--------------------------------------------------------------------------*/ int ffcpcl(fitsfile *infptr, /* I - FITS file pointer to input file */ fitsfile *outfptr, /* I - FITS file pointer to output file */ int incol, /* I - number of input column */ int outcol, /* I - number for output column */ int create_col, /* I - create new col if TRUE, else overwrite */ int *status) /* IO - error status */ /* copy a column from infptr and insert it in the outfptr table. */ { int tstatus, colnum, typecode, anynull; long tfields, repeat, width, nrows, outrows; long inloop, outloop, maxloop, ndone, ntodo, npixels; long firstrow, firstelem, ii; char keyname[FLEN_KEYWORD], ttype[FLEN_VALUE], tform[FLEN_VALUE]; char ttype_comm[FLEN_COMMENT],tform_comm[FLEN_COMMENT]; char *lvalues = 0, nullflag, **strarray = 0; char nulstr[] = {'\5', '\0'}; /* unique null string value */ double dnull = 0.l, *dvalues = 0; float fnull = 0., *fvalues = 0; if (*status > 0) return(*status); if (infptr->HDUposition != (infptr->Fptr)->curhdu) { ffmahd(infptr, (infptr->HDUposition) + 1, NULL, status); } else if ((infptr->Fptr)->datastart == DATA_UNDEFINED) ffrdef(infptr, status); /* rescan header */ if (outfptr->HDUposition != (outfptr->Fptr)->curhdu) { ffmahd(outfptr, (outfptr->HDUposition) + 1, NULL, status); } else if ((outfptr->Fptr)->datastart == DATA_UNDEFINED) ffrdef(outfptr, status); /* rescan header */ if (*status > 0) return(*status); if ((infptr->Fptr)->hdutype == IMAGE_HDU || (outfptr->Fptr)->hdutype == IMAGE_HDU) { ffpmsg ("Can not copy columns to or from IMAGE HDUs (ffcpcl)"); return(*status = NOT_TABLE); } if ( (infptr->Fptr)->hdutype == BINARY_TBL && (outfptr->Fptr)->hdutype == ASCII_TBL) { ffpmsg ("Copying from Binary table to ASCII table is not supported (ffcpcl)"); return(*status = NOT_BTABLE); } /* get the datatype and vector repeat length of the column */ ffgtcl(infptr, incol, &typecode, &repeat, &width, status); if (typecode < 0) { ffpmsg("Variable-length columns are not supported (ffcpcl)"); return(*status = BAD_TFORM); } if (create_col) /* insert new column in output table? */ { tstatus = 0; ffkeyn("TTYPE", incol, keyname, &tstatus); ffgkys(infptr, keyname, ttype, ttype_comm, &tstatus); ffkeyn("TFORM", incol, keyname, &tstatus); if (ffgkys(infptr, keyname, tform, tform_comm, &tstatus) ) { ffpmsg ("Could not find TTYPE and TFORM keywords in input table (ffcpcl)"); return(*status = NO_TFORM); } if ((infptr->Fptr)->hdutype == ASCII_TBL && (outfptr->Fptr)->hdutype == BINARY_TBL) { /* convert from ASCII table to BINARY table format string */ if (typecode == TSTRING) ffnkey(width, "A", tform, status); else if (typecode == TLONG) strcpy(tform, "1J"); else if (typecode == TSHORT) strcpy(tform, "1I"); else if (typecode == TFLOAT) strcpy(tform,"1E"); else if (typecode == TDOUBLE) strcpy(tform,"1D"); } if (ffgkyj(outfptr, "TFIELDS", &tfields, 0, &tstatus)) { ffpmsg ("Could not read TFIELDS keyword in output table (ffcpcl)"); return(*status = NO_TFIELDS); } colnum = minvalue((int) tfields + 1, outcol); /* output col. number */ /* create the empty column */ if (fficol(outfptr, colnum, ttype, tform, status) > 0) { ffpmsg ("Could not append new column to output file (ffcpcl)"); return(*status); } /* copy the comment strings from the input file for TTYPE and TFORM */ tstatus = 0; ffkeyn("TTYPE", colnum, keyname, &tstatus); ffmcom(outfptr, keyname, ttype_comm, &tstatus); ffkeyn("TFORM", colnum, keyname, &tstatus); ffmcom(outfptr, keyname, tform_comm, &tstatus); /* copy other column-related keywords if they exist */ ffcpky(infptr, outfptr, incol, colnum, "TUNIT", status); ffcpky(infptr, outfptr, incol, colnum, "TSCAL", status); ffcpky(infptr, outfptr, incol, colnum, "TZERO", status); ffcpky(infptr, outfptr, incol, colnum, "TDISP", status); ffcpky(infptr, outfptr, incol, colnum, "TLMIN", status); ffcpky(infptr, outfptr, incol, colnum, "TLMAX", status); ffcpky(infptr, outfptr, incol, colnum, "TDIM", status); /* WCS keywords */ ffcpky(infptr, outfptr, incol, colnum, "TCTYP", status); ffcpky(infptr, outfptr, incol, colnum, "TCUNI", status); ffcpky(infptr, outfptr, incol, colnum, "TCRVL", status); ffcpky(infptr, outfptr, incol, colnum, "TCRPX", status); ffcpky(infptr, outfptr, incol, colnum, "TCDLT", status); ffcpky(infptr, outfptr, incol, colnum, "TCROT", status); if ((infptr->Fptr)->hdutype == ASCII_TBL && (outfptr->Fptr)->hdutype == BINARY_TBL) { /* binary tables only have TNULLn keyword for integer columns */ if (typecode == TLONG || typecode == TSHORT) { /* check if null string is defined; replace with integer */ ffkeyn("TNULL", incol, keyname, &tstatus); if (ffgkys(infptr, keyname, ttype, 0, &tstatus) <= 0) { ffkeyn("TNULL", colnum, keyname, &tstatus); if (typecode == TLONG) ffpkyj(outfptr, keyname, -9999999L, "Null value", status); else ffpkyj(outfptr, keyname, -32768L, "Null value", status); } } } else { ffcpky(infptr, outfptr, incol, colnum, "TNULL", status); } /* rescan header to recognize the new keywords */ if (ffrdef(outfptr, status) ) return(*status); } else { colnum = outcol; } ffgkyj(infptr, "NAXIS2", &nrows, 0, status); /* no. of input rows */ ffgkyj(outfptr, "NAXIS2", &outrows, 0, status); /* no. of output rows */ nrows = minvalue(nrows, outrows); if (typecode == TBIT) repeat = (repeat + 7) / 8; /* convert from bits to bytes */ else if (typecode == TSTRING && (infptr->Fptr)->hdutype == BINARY_TBL) repeat = repeat / width; /* convert from chars to unit strings */ /* get optimum number of rows to copy at one time */ ffgrsz(infptr, &inloop, status); ffgrsz(outfptr, &outloop, status); /* adjust optimum number, since 2 tables are open at once */ maxloop = minvalue(inloop, outloop); /* smallest of the 2 tables */ maxloop = maxvalue(1, maxloop / 2); /* at least 1 row */ maxloop = minvalue(maxloop, nrows); /* max = nrows to be copied */ maxloop *= repeat; /* mult by no of elements in a row */ /* allocate memory for arrays */ if (typecode == TLOGICAL) { lvalues = (char *) calloc(maxloop, sizeof(char) ); if (!lvalues) { ffpmsg ("malloc failed to get memory for logicals (ffcpcl)"); return(*status = ARRAY_TOO_BIG); } } else if (typecode == TSTRING) { /* allocate array of pointers */ strarray = (char **) calloc(maxloop, sizeof(strarray)); /* allocate space for each string */ for (ii = 0; ii < maxloop; ii++) strarray[ii] = (char *) calloc(width+1, sizeof(char)); } else if (typecode == TCOMPLEX) { fvalues = (float *) calloc(maxloop * 2, sizeof(float) ); if (!fvalues) { ffpmsg ("malloc failed to get memory for complex (ffcpcl)"); return(*status = ARRAY_TOO_BIG); } fnull = 0.; } else if (typecode == TDBLCOMPLEX) { dvalues = (double *) calloc(maxloop * 2, sizeof(double) ); if (!dvalues) { ffpmsg ("malloc failed to get memory for dbl complex (ffcpcl)"); return(*status = ARRAY_TOO_BIG); } dnull = 0.; } else /* numerical datatype; read them all as doubles */ { dvalues = (double *) calloc(maxloop, sizeof(double) ); if (!dvalues) { ffpmsg ("malloc failed to get memory for doubles (ffcpcl)"); return(*status = ARRAY_TOO_BIG); } dnull = -9.99991999E31; /* use an unlikely value for nulls */ } npixels = nrows * repeat; /* total no. of pixels to copy */ ntodo = minvalue(npixels, maxloop); /* no. to copy per iteration */ ndone = 0; /* total no. of pixels that have been copied */ while (ntodo) /* iterate through the table */ { firstrow = ndone / repeat + 1; firstelem = ndone - ((firstrow - 1) * repeat) + 1; /* read from input table */ if (typecode == TLOGICAL) ffgcl(infptr, incol, firstrow, firstelem, ntodo, lvalues, status); else if (typecode == TSTRING) ffgcvs(infptr, incol, firstrow, firstelem, ntodo, nulstr, strarray, &anynull, status); else if (typecode == TCOMPLEX) ffgcvc(infptr, incol, firstrow, firstelem, ntodo, fnull, fvalues, &anynull, status); else if (typecode == TDBLCOMPLEX) ffgcvm(infptr, incol, firstrow, firstelem, ntodo, dnull, dvalues, &anynull, status); else /* all numerical types */ ffgcvd(infptr, incol, firstrow, firstelem, ntodo, dnull, dvalues, &anynull, status); if (*status > 0) { ffpmsg("Error reading input copy of column (ffcpcl)"); break; } /* write to output table */ if (typecode == TLOGICAL) { nullflag = 2; ffpcnl(outfptr, colnum, firstrow, firstelem, ntodo, lvalues, nullflag, status); } else if (typecode == TSTRING) { if (anynull) ffpcns(outfptr, colnum, firstrow, firstelem, ntodo, strarray, nulstr, status); else ffpcls(outfptr, colnum, firstrow, firstelem, ntodo, strarray, status); } else if (typecode == TCOMPLEX) { /* doesn't support writing nulls */ ffpclc(outfptr, colnum, firstrow, firstelem, ntodo, fvalues, status); } else if (typecode == TDBLCOMPLEX) { /* doesn't support writing nulls */ ffpclm(outfptr, colnum, firstrow, firstelem, ntodo, dvalues, status); } else /* all other numerical types */ { if (anynull) ffpcnd(outfptr, colnum, firstrow, firstelem, ntodo, dvalues, dnull, status); else ffpcld(outfptr, colnum, firstrow, firstelem, ntodo, dvalues, status); } if (*status > 0) { ffpmsg("Error writing output copy of column (ffcpcl)"); break; } npixels -= ntodo; ndone += ntodo; ntodo = minvalue(npixels, maxloop); } /* free the previously allocated memory */ if (typecode == TLOGICAL) { free(lvalues); } else if (typecode == TSTRING) { for (ii = 0; ii < maxloop; ii++) free(strarray[ii]); free(strarray); } else { free(dvalues); } return(*status); } /*--------------------------------------------------------------------------*/ int ffcprw(fitsfile *infptr, /* I - FITS file pointer to input file */ fitsfile *outfptr, /* I - FITS file pointer to output file */ LONGLONG firstrow, /* I - number of first row to copy (1 based) */ LONGLONG nrows, /* I - number of rows to copy */ int *status) /* IO - error status */ /* copy consecutive set of rows from infptr and append it in the outfptr table. */ { LONGLONG innaxis1, innaxis2, outnaxis1, outnaxis2, ii, jj; unsigned char *buffer; if (*status > 0) return(*status); if (infptr->HDUposition != (infptr->Fptr)->curhdu) { ffmahd(infptr, (infptr->HDUposition) + 1, NULL, status); } else if ((infptr->Fptr)->datastart == DATA_UNDEFINED) ffrdef(infptr, status); /* rescan header */ if (outfptr->HDUposition != (outfptr->Fptr)->curhdu) { ffmahd(outfptr, (outfptr->HDUposition) + 1, NULL, status); } else if ((outfptr->Fptr)->datastart == DATA_UNDEFINED) ffrdef(outfptr, status); /* rescan header */ if (*status > 0) return(*status); if ((infptr->Fptr)->hdutype == IMAGE_HDU || (outfptr->Fptr)->hdutype == IMAGE_HDU) { ffpmsg ("Can not copy rows to or from IMAGE HDUs (ffcprw)"); return(*status = NOT_TABLE); } if ( ((infptr->Fptr)->hdutype == BINARY_TBL && (outfptr->Fptr)->hdutype == ASCII_TBL) || ((infptr->Fptr)->hdutype == ASCII_TBL && (outfptr->Fptr)->hdutype == BINARY_TBL) ) { ffpmsg ("Copying rows between Binary and ASCII tables is not supported (ffcprw)"); return(*status = NOT_BTABLE); } ffgkyjj(infptr, "NAXIS1", &innaxis1, 0, status); /* width of input rows */ ffgkyjj(infptr, "NAXIS2", &innaxis2, 0, status); /* no. of input rows */ ffgkyjj(outfptr, "NAXIS1", &outnaxis1, 0, status); /* width of output rows */ ffgkyjj(outfptr, "NAXIS2", &outnaxis2, 0, status); /* no. of output rows */ if (*status > 0) return(*status); if (outnaxis1 > innaxis1) { ffpmsg ("Input and output tables do not have same width (ffcprw)"); return(*status = BAD_ROW_WIDTH); } if (firstrow + nrows - 1 > innaxis2) { ffpmsg ("Not enough rows in input table to copy (ffcprw)"); return(*status = BAD_ROW_NUM); } /* allocate buffer to hold 1 row of data */ buffer = malloc( (size_t) innaxis1); if (!buffer) { ffpmsg ("Unable to allocate memory (ffcprw)"); return(*status = MEMORY_ALLOCATION); } /* copy the rows, 1 at a time */ jj = outnaxis2 + 1; for (ii = firstrow; ii < firstrow + nrows; ii++) { fits_read_tblbytes (infptr, ii, 1, innaxis1, buffer, status); fits_write_tblbytes(outfptr, jj, 1, innaxis1, buffer, status); jj++; } outnaxis2 += nrows; fits_update_key(outfptr, TLONGLONG, "NAXIS2", &outnaxis2, 0, status); free(buffer); return(*status); } /*--------------------------------------------------------------------------*/ int ffcpky(fitsfile *infptr, /* I - FITS file pointer to input file */ fitsfile *outfptr, /* I - FITS file pointer to output file */ int incol, /* I - input index number */ int outcol, /* I - output index number */ char *rootname, /* I - root name of the keyword to be copied */ int *status) /* IO - error status */ /* copy an indexed keyword from infptr to outfptr. */ { int tstatus = 0; char keyname[FLEN_KEYWORD]; char value[FLEN_VALUE], comment[FLEN_COMMENT], card[FLEN_CARD]; ffkeyn(rootname, incol, keyname, &tstatus); if (ffgkey(infptr, keyname, value, comment, &tstatus) <= 0) { ffkeyn(rootname, outcol, keyname, &tstatus); ffmkky(keyname, value, comment, card, status); ffprec(outfptr, card, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffdcol(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column to delete (1 = 1st) */ int *status) /* IO - error status */ /* Delete a column from a table. */ { int ii, tstatus; LONGLONG firstbyte, size, ndelete, nbytes, naxis1, naxis2, firstcol, delbyte, freespace; LONGLONG tbcol; long nblock, nspace; char keyname[FLEN_KEYWORD], comm[FLEN_COMMENT]; tcolumn *colptr, *nextcol; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU) { ffpmsg ("Can only delete column from TABLE or BINTABLE extension (ffdcol)"); return(*status = NOT_TABLE); } if (colnum < 1 || colnum > (fptr->Fptr)->tfield ) return(*status = BAD_COL_NUM); colptr = (fptr->Fptr)->tableptr; colptr += (colnum - 1); firstcol = colptr->tbcol; /* starting byte position of the column */ /* use column width to determine how many bytes to delete in each row */ if ((fptr->Fptr)->hdutype == ASCII_TBL) { delbyte = colptr->twidth; /* width of ASCII column */ if (colnum < (fptr->Fptr)->tfield) /* check for space between next column */ { nextcol = colptr + 1; nspace = (long) ((nextcol->tbcol) - (colptr->tbcol) - delbyte); if (nspace > 0) delbyte++; } else if (colnum > 1) /* check for space between last 2 columns */ { nextcol = colptr - 1; nspace = (long) ((colptr->tbcol) - (nextcol->tbcol) - (nextcol->twidth)); if (nspace > 0) { delbyte++; firstcol--; /* delete the leading space */ } } } else /* a binary table */ { if (colnum < (fptr->Fptr)->tfield) { nextcol = colptr + 1; delbyte = (nextcol->tbcol) - (colptr->tbcol); } else { delbyte = ((fptr->Fptr)->rowlength) - (colptr->tbcol); } } naxis1 = (fptr->Fptr)->rowlength; /* current width of the table */ naxis2 = (fptr->Fptr)->numrows; /* current size of table */ size = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; freespace = ((LONGLONG)delbyte * naxis2) + ((size + 2879) / 2880) * 2880 - size; nblock = (long) (freespace / 2880); /* number of empty blocks to delete */ ffcdel(fptr, naxis1, naxis2, delbyte, firstcol, status); /* delete col */ /* absolute heap position */ firstbyte = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart; ndelete = (LONGLONG)delbyte * naxis2; /* size of shift */ /* shift heap up (if it exists) */ if ((fptr->Fptr)->heapsize > 0) { nbytes = (fptr->Fptr)->heapsize; /* no. of bytes to shift up */ if (ffshft(fptr, firstbyte, nbytes, -ndelete, status) > 0) /* mv heap */ return(*status); } /* delete the empty blocks at the end of the HDU */ if (nblock > 0) ffdblk(fptr, nblock, status); /* update the heap starting address */ (fptr->Fptr)->heapstart -= ndelete; /* update the THEAP keyword if it exists */ tstatus = 0; ffmkyj(fptr, "THEAP", (long)(fptr->Fptr)->heapstart, "&", &tstatus); if ((fptr->Fptr)->hdutype == ASCII_TBL) { /* adjust the TBCOL values of the remaining columns */ for (ii = 1; ii <= (fptr->Fptr)->tfield; ii++) { ffkeyn("TBCOL", ii, keyname, status); ffgkyjj(fptr, keyname, &tbcol, comm, status); if (tbcol > firstcol) { tbcol = tbcol - delbyte; ffmkyj(fptr, keyname, tbcol, "&", status); } } } /* update the mandatory keywords */ ffmkyj(fptr, "TFIELDS", ((fptr->Fptr)->tfield) - 1, "&", status); ffmkyj(fptr, "NAXIS1", naxis1 - delbyte, "&", status); /* delete the index keywords starting with 'T' associated with the deleted column and subtract 1 from index of all higher keywords */ ffkshf(fptr, colnum, (fptr->Fptr)->tfield, -1, status); ffrdef(fptr, status); /* initialize the new table structure */ return(*status); } /*--------------------------------------------------------------------------*/ int ffcins(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG naxis1, /* I - width of the table, in bytes */ LONGLONG naxis2, /* I - number of rows in the table */ LONGLONG ninsert, /* I - number of bytes to insert in each row */ LONGLONG bytepos, /* I - rel. position in row to insert bytes */ int *status) /* IO - error status */ /* Insert 'ninsert' bytes into each row of the table at position 'bytepos'. */ { unsigned char buffer[10000], cfill; LONGLONG newlen, fbyte, nbytes, irow, nseg, ii; if (*status > 0) return(*status); if (naxis2 == 0) return(*status); /* just return if there are 0 rows in the table */ /* select appropriate fill value */ if ((fptr->Fptr)->hdutype == ASCII_TBL) cfill = 32; /* ASCII tables use blank fill */ else cfill = 0; /* primary array and binary tables use zero fill */ newlen = naxis1 + ninsert; if (newlen <= 10000) { /******************************************************************* CASE #1: optimal case where whole new row fits in the work buffer *******************************************************************/ for (ii = 0; ii < ninsert; ii++) buffer[ii] = cfill; /* initialize buffer with fill value */ /* first move the trailing bytes (if any) in the last row */ fbyte = bytepos + 1; nbytes = naxis1 - bytepos; ffgtbb(fptr, naxis2, fbyte, nbytes, &buffer[ninsert], status); (fptr->Fptr)->rowlength = newlen; /* new row length */ /* write the row (with leading fill bytes) in the new place */ nbytes += ninsert; ffptbb(fptr, naxis2, fbyte, nbytes, buffer, status); (fptr->Fptr)->rowlength = naxis1; /* reset to orig. value */ /* now move the rest of the rows */ for (irow = naxis2 - 1; irow > 0; irow--) { /* read the row to be shifted (work backwards thru the table) */ ffgtbb(fptr, irow, fbyte, naxis1, &buffer[ninsert], status); (fptr->Fptr)->rowlength = newlen; /* new row length */ /* write the row (with the leading fill bytes) in the new place */ ffptbb(fptr, irow, fbyte, newlen, buffer, status); (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ } } else { /***************************************************************** CASE #2: whole row doesn't fit in work buffer; move row in pieces ****************************************************************** first copy the data, then go back and write fill into the new column start by copying the trailing bytes (if any) in the last row. */ nbytes = naxis1 - bytepos; nseg = (nbytes + 9999) / 10000; fbyte = (nseg - 1) * 10000 + bytepos + 1; nbytes = naxis1 - fbyte + 1; for (ii = 0; ii < nseg; ii++) { ffgtbb(fptr, naxis2, fbyte, nbytes, buffer, status); (fptr->Fptr)->rowlength = newlen; /* new row length */ ffptbb(fptr, naxis2, fbyte + ninsert, nbytes, buffer, status); (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ fbyte -= 10000; nbytes = 10000; } /* now move the rest of the rows */ nseg = (naxis1 + 9999) / 10000; for (irow = naxis2 - 1; irow > 0; irow--) { fbyte = (nseg - 1) * 10000 + bytepos + 1; nbytes = naxis1 - (nseg - 1) * 10000; for (ii = 0; ii < nseg; ii++) { /* read the row to be shifted (work backwards thru the table) */ ffgtbb(fptr, irow, fbyte, nbytes, buffer, status); (fptr->Fptr)->rowlength = newlen; /* new row length */ /* write the row in the new place */ ffptbb(fptr, irow, fbyte + ninsert, nbytes, buffer, status); (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ fbyte -= 10000; nbytes = 10000; } } /* now write the fill values into the new column */ nbytes = minvalue(ninsert, 10000); memset(buffer, cfill, (size_t) nbytes); /* initialize with fill value */ nseg = (ninsert + 9999) / 10000; (fptr->Fptr)->rowlength = newlen; /* new row length */ for (irow = 1; irow <= naxis2; irow++) { fbyte = bytepos + 1; nbytes = ninsert - ((nseg - 1) * 10000); for (ii = 0; ii < nseg; ii++) { ffptbb(fptr, irow, fbyte, nbytes, buffer, status); fbyte += nbytes; nbytes = 10000; } } (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ } return(*status); } /*--------------------------------------------------------------------------*/ int ffcdel(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG naxis1, /* I - width of the table, in bytes */ LONGLONG naxis2, /* I - number of rows in the table */ LONGLONG ndelete, /* I - number of bytes to delete in each row */ LONGLONG bytepos, /* I - rel. position in row to delete bytes */ int *status) /* IO - error status */ /* delete 'ndelete' bytes from each row of the table at position 'bytepos'. */ { unsigned char buffer[10000]; LONGLONG i1, i2, ii, irow, nseg; LONGLONG newlen, remain, nbytes; if (*status > 0) return(*status); if (naxis2 == 0) return(*status); /* just return if there are 0 rows in the table */ newlen = naxis1 - ndelete; if (newlen <= 10000) { /******************************************************************* CASE #1: optimal case where whole new row fits in the work buffer *******************************************************************/ i1 = bytepos + 1; i2 = i1 + ndelete; for (irow = 1; irow < naxis2; irow++) { ffgtbb(fptr, irow, i2, newlen, buffer, status); /* read row */ (fptr->Fptr)->rowlength = newlen; /* new row length */ ffptbb(fptr, irow, i1, newlen, buffer, status); /* write row */ (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ } /* now do the last row */ remain = naxis1 - (bytepos + ndelete); if (remain > 0) { ffgtbb(fptr, naxis2, i2, remain, buffer, status); /* read row */ (fptr->Fptr)->rowlength = newlen; /* new row length */ ffptbb(fptr, naxis2, i1, remain, buffer, status); /* write row */ (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ } } else { /***************************************************************** CASE #2: whole row doesn't fit in work buffer; move row in pieces ******************************************************************/ nseg = (newlen + 9999) / 10000; for (irow = 1; irow < naxis2; irow++) { i1 = bytepos + 1; i2 = i1 + ndelete; nbytes = newlen - (nseg - 1) * 10000; for (ii = 0; ii < nseg; ii++) { ffgtbb(fptr, irow, i2, nbytes, buffer, status); /* read bytes */ (fptr->Fptr)->rowlength = newlen; /* new row length */ ffptbb(fptr, irow, i1, nbytes, buffer, status); /* rewrite bytes */ (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ i1 += nbytes; i2 += nbytes; nbytes = 10000; } } /* now do the last row */ remain = naxis1 - (bytepos + ndelete); if (remain > 0) { nseg = (remain + 9999) / 10000; i1 = bytepos + 1; i2 = i1 + ndelete; nbytes = remain - (nseg - 1) * 10000; for (ii = 0; ii < nseg; ii++) { ffgtbb(fptr, naxis2, i2, nbytes, buffer, status); (fptr->Fptr)->rowlength = newlen; /* new row length */ ffptbb(fptr, naxis2, i1, nbytes, buffer, status); /* write row */ (fptr->Fptr)->rowlength = naxis1; /* reset to orig value */ i1 += nbytes; i2 += nbytes; nbytes = 10000; } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffkshf(fitsfile *fptr, /* I - FITS file pointer */ int colmin, /* I - starting col. to be incremented; 1 = 1st */ int colmax, /* I - last column to be incremented */ int incre, /* I - shift index number by this amount */ int *status) /* IO - error status */ /* shift the index value on any existing column keywords This routine will modify the name of any keyword that begins with 'T' and has an index number in the range COLMIN - COLMAX, inclusive. if incre is positive, then the index values will be incremented. if incre is negative, then the kewords with index = COLMIN will be deleted and the index of higher numbered keywords will be decremented. */ { int nkeys, nmore, nrec, tstatus, i1; long ivalue; char rec[FLEN_CARD], q[FLEN_KEYWORD], newkey[FLEN_KEYWORD]; ffghsp(fptr, &nkeys, &nmore, status); /* get number of keywords */ /* go thru header starting with the 9th keyword looking for 'TxxxxNNN' */ for (nrec = 9; nrec <= nkeys; nrec++) { ffgrec(fptr, nrec, rec, status); if (rec[0] == 'T') { i1 = 0; strncpy(q, &rec[1], 4); if (!strncmp(q, "BCOL", 4) || !strncmp(q, "FORM", 4) || !strncmp(q, "TYPE", 4) || !strncmp(q, "SCAL", 4) || !strncmp(q, "UNIT", 4) || !strncmp(q, "NULL", 4) || !strncmp(q, "ZERO", 4) || !strncmp(q, "DISP", 4) || !strncmp(q, "LMIN", 4) || !strncmp(q, "LMAX", 4) || !strncmp(q, "DMIN", 4) || !strncmp(q, "DMAX", 4) || !strncmp(q, "CTYP", 4) || !strncmp(q, "CRPX", 4) || !strncmp(q, "CRVL", 4) || !strncmp(q, "CDLT", 4) || !strncmp(q, "CROT", 4) || !strncmp(q, "CUNI", 4) ) i1 = 5; else if (!strncmp(rec, "TDIM", 4) ) i1 = 4; if (i1) { /* try reading the index number suffix */ q[0] = '\0'; strncat(q, &rec[i1], 8 - i1); tstatus = 0; ffc2ii(q, &ivalue, &tstatus); if (tstatus == 0 && ivalue >= colmin && ivalue <= colmax) { if (incre <= 0 && ivalue == colmin) { ffdrec(fptr, nrec, status); /* delete keyword */ nkeys = nkeys - 1; nrec = nrec - 1; } else { ivalue = ivalue + incre; q[0] = '\0'; strncat(q, rec, i1); ffkeyn(q, ivalue, newkey, status); strncpy(rec, " ", 8); /* erase old keyword name */ i1 = strlen(newkey); strncpy(rec, newkey, i1); /* overwrite new keyword name */ ffmrec(fptr, nrec, rec, status); /* modify the record */ } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffshft(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG firstbyte, /* I - position of first byte in block to shift */ LONGLONG nbytes, /* I - size of block of bytes to shift */ LONGLONG nshift, /* I - size of shift in bytes (+ or -) */ int *status) /* IO - error status */ /* Shift block of bytes by nshift bytes (positive or negative). A positive nshift value moves the block down further in the file, while a negative value shifts the block towards the beginning of the file. */ { #define shftbuffsize 100000 long ntomov; LONGLONG ptr, ntodo; char buffer[shftbuffsize]; if (*status > 0) return(*status); ntodo = nbytes; /* total number of bytes to shift */ if (nshift > 0) /* start at the end of the block and work backwards */ ptr = firstbyte + nbytes; else /* start at the beginning of the block working forwards */ ptr = firstbyte; while (ntodo) { /* number of bytes to move at one time */ ntomov = (long) (minvalue(ntodo, shftbuffsize)); if (nshift > 0) /* if moving block down ... */ ptr -= ntomov; /* move to position and read the bytes to be moved */ ffmbyt(fptr, ptr, REPORT_EOF, status); ffgbyt(fptr, ntomov, buffer, status); /* move by shift amount and write the bytes */ ffmbyt(fptr, ptr + nshift, IGNORE_EOF, status); if (ffpbyt(fptr, ntomov, buffer, status) > 0) { ffpmsg("Error while shifting block (ffshft)"); return(*status); } ntodo -= ntomov; if (nshift < 0) /* if moving block up ... */ ptr += ntomov; } /* now overwrite the old data with fill */ if ((fptr->Fptr)->hdutype == ASCII_TBL) memset(buffer, 32, shftbuffsize); /* fill ASCII tables with spaces */ else memset(buffer, 0, shftbuffsize); /* fill other HDUs with zeros */ if (nshift < 0) { ntodo = -nshift; /* point to the end of the shifted block */ ptr = firstbyte + nbytes + nshift; } else { ntodo = nshift; /* point to original beginning of the block */ ptr = firstbyte; } ffmbyt(fptr, ptr, REPORT_EOF, status); while (ntodo) { ntomov = (long) (minvalue(ntodo, shftbuffsize)); ffpbyt(fptr, ntomov, buffer, status); ntodo -= ntomov; } return(*status); } astropy-1.1.1/cextern/cfitsio/inffast.c0000644001134200020070000003217712602615520021036 0ustar embrayscience00000000000000/* inffast.c -- fast decoding * Copyright (C) 1995-2008, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ #include "zutil.h" #include "inftrees.h" #include "inflate.h" #include "inffast.h" #ifndef ASMINF /* Allow machine dependent optimization for post-increment or pre-increment. Based on testing to date, Pre-increment preferred for: - PowerPC G3 (Adler) - MIPS R5000 (Randers-Pehrson) Post-increment preferred for: - none No measurable difference: - Pentium III (Anderson) - M68060 (Nikl) */ #ifdef POSTINC # define OFF 0 # define PUP(a) *(a)++ #else # define OFF 1 # define PUP(a) *++(a) #endif /* Decode literal, length, and distance codes and write out the resulting literal and match bytes until either not enough input or output is available, an end-of-block is encountered, or a data error is encountered. When large enough input and output buffers are supplied to inflate(), for example, a 16K input buffer and a 64K output buffer, more than 95% of the inflate execution time is spent in this routine. Entry assumptions: state->mode == LEN strm->avail_in >= 6 strm->avail_out >= 258 start >= strm->avail_out state->bits < 8 On return, state->mode is one of: LEN -- ran out of enough output space or enough available input TYPE -- reached end of block code, inflate() to interpret next block BAD -- error in block data Notes: - The maximum input bits used by a length/distance pair is 15 bits for the length code, 5 bits for the length extra, 15 bits for the distance code, and 13 bits for the distance extra. This totals 48 bits, or six bytes. Therefore if strm->avail_in >= 6, then there is enough input to avoid checking for available input while decoding. - The maximum bytes that a single length/distance pair can output is 258 bytes, which is the maximum length that can be coded. inflate_fast() requires strm->avail_out >= 258 for each loop to avoid checking for output space. */ void ZLIB_INTERNAL inflate_fast(strm, start) z_streamp strm; unsigned start; /* inflate()'s starting value for strm->avail_out */ { struct inflate_state FAR *state; unsigned char FAR *in; /* local strm->next_in */ unsigned char FAR *last; /* while in < last, enough input available */ unsigned char FAR *out; /* local strm->next_out */ unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ unsigned char FAR *end; /* while out < end, enough space available */ #ifdef INFLATE_STRICT unsigned dmax; /* maximum distance from zlib header */ #endif unsigned wsize; /* window size or zero if not using window */ unsigned whave; /* valid bytes in the window */ unsigned wnext; /* window write index */ unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */ unsigned long hold; /* local strm->hold */ unsigned bits; /* local strm->bits */ code const FAR *lcode; /* local strm->lencode */ code const FAR *dcode; /* local strm->distcode */ unsigned lmask; /* mask for first level of length codes */ unsigned dmask; /* mask for first level of distance codes */ code here; /* retrieved table entry */ unsigned op; /* code bits, operation, extra bits, or */ /* window position, window bytes to copy */ unsigned len; /* match length, unused bytes */ unsigned dist; /* match distance */ unsigned char FAR *from; /* where to copy match from */ /* copy state to local variables */ state = (struct inflate_state FAR *)strm->state; in = strm->next_in - OFF; last = in + (strm->avail_in - 5); out = strm->next_out - OFF; beg = out - (start - strm->avail_out); end = out + (strm->avail_out - 257); #ifdef INFLATE_STRICT dmax = state->dmax; #endif wsize = state->wsize; whave = state->whave; wnext = state->wnext; window = state->window; hold = state->hold; bits = state->bits; lcode = state->lencode; dcode = state->distcode; lmask = (1U << state->lenbits) - 1; dmask = (1U << state->distbits) - 1; /* decode literals and length/distances until end-of-block or not enough input data or output space */ do { if (bits < 15) { hold += (unsigned long)(PUP(in)) << bits; bits += 8; hold += (unsigned long)(PUP(in)) << bits; bits += 8; } here = lcode[hold & lmask]; dolen: op = (unsigned)(here.bits); hold >>= op; bits -= op; op = (unsigned)(here.op); if (op == 0) { /* literal */ Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? "inflate: literal '%c'\n" : "inflate: literal 0x%02x\n", here.val)); PUP(out) = (unsigned char)(here.val); } else if (op & 16) { /* length base */ len = (unsigned)(here.val); op &= 15; /* number of extra bits */ if (op) { if (bits < op) { hold += (unsigned long)(PUP(in)) << bits; bits += 8; } len += (unsigned)hold & ((1U << op) - 1); hold >>= op; bits -= op; } Tracevv((stderr, "inflate: length %u\n", len)); if (bits < 15) { hold += (unsigned long)(PUP(in)) << bits; bits += 8; hold += (unsigned long)(PUP(in)) << bits; bits += 8; } here = dcode[hold & dmask]; dodist: op = (unsigned)(here.bits); hold >>= op; bits -= op; op = (unsigned)(here.op); if (op & 16) { /* distance base */ dist = (unsigned)(here.val); op &= 15; /* number of extra bits */ if (bits < op) { hold += (unsigned long)(PUP(in)) << bits; bits += 8; if (bits < op) { hold += (unsigned long)(PUP(in)) << bits; bits += 8; } } dist += (unsigned)hold & ((1U << op) - 1); #ifdef INFLATE_STRICT if (dist > dmax) { strm->msg = (char *)"invalid distance too far back"; state->mode = BAD; break; } #endif hold >>= op; bits -= op; Tracevv((stderr, "inflate: distance %u\n", dist)); op = (unsigned)(out - beg); /* max distance in output */ if (dist > op) { /* see if copy from window */ op = dist - op; /* distance back in window */ if (op > whave) { if (state->sane) { strm->msg = (char *)"invalid distance too far back"; state->mode = BAD; break; } #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR if (len <= op - whave) { do { PUP(out) = 0; } while (--len); continue; } len -= op - whave; do { PUP(out) = 0; } while (--op > whave); if (op == 0) { from = out - dist; do { PUP(out) = PUP(from); } while (--len); continue; } #endif } from = window - OFF; if (wnext == 0) { /* very common case */ from += wsize - op; if (op < len) { /* some from window */ len -= op; do { PUP(out) = PUP(from); } while (--op); from = out - dist; /* rest from output */ } } else if (wnext < op) { /* wrap around window */ from += wsize + wnext - op; op -= wnext; if (op < len) { /* some from end of window */ len -= op; do { PUP(out) = PUP(from); } while (--op); from = window - OFF; if (wnext < len) { /* some from start of window */ op = wnext; len -= op; do { PUP(out) = PUP(from); } while (--op); from = out - dist; /* rest from output */ } } } else { /* contiguous in window */ from += wnext - op; if (op < len) { /* some from window */ len -= op; do { PUP(out) = PUP(from); } while (--op); from = out - dist; /* rest from output */ } } while (len > 2) { PUP(out) = PUP(from); PUP(out) = PUP(from); PUP(out) = PUP(from); len -= 3; } if (len) { PUP(out) = PUP(from); if (len > 1) PUP(out) = PUP(from); } } else { from = out - dist; /* copy direct from output */ do { /* minimum length is three */ PUP(out) = PUP(from); PUP(out) = PUP(from); PUP(out) = PUP(from); len -= 3; } while (len > 2); if (len) { PUP(out) = PUP(from); if (len > 1) PUP(out) = PUP(from); } } } else if ((op & 64) == 0) { /* 2nd level distance code */ here = dcode[here.val + (hold & ((1U << op) - 1))]; goto dodist; } else { strm->msg = (char *)"invalid distance code"; state->mode = BAD; break; } } else if ((op & 64) == 0) { /* 2nd level length code */ here = lcode[here.val + (hold & ((1U << op) - 1))]; goto dolen; } else if (op & 32) { /* end-of-block */ Tracevv((stderr, "inflate: end of block\n")); state->mode = TYPE; break; } else { strm->msg = (char *)"invalid literal/length code"; state->mode = BAD; break; } } while (in < last && out < end); /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ len = bits >> 3; in -= len; bits -= len << 3; hold &= (1U << bits) - 1; /* update state and return */ strm->next_in = in + OFF; strm->next_out = out + OFF; strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last)); strm->avail_out = (unsigned)(out < end ? 257 + (end - out) : 257 - (out - end)); state->hold = hold; state->bits = bits; return; } /* inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): - Using bit fields for code structure - Different op definition to avoid & for extra bits (do & for table bits) - Three separate decoding do-loops for direct, window, and wnext == 0 - Special case for distance > 1 copies to do overlapped load and store copy - Explicit branch predictions (based on measured branch probabilities) - Deferring match copy and interspersed it with decoding subsequent codes - Swapping literal/length else - Swapping window/direct else - Larger unrolled copy loops (three is about right) - Moving len -= 3 statement into middle of loop */ #endif /* !ASMINF */ astropy-1.1.1/cextern/cfitsio/getkey.c0000644001134200020070000034002012602615520020661 0ustar embrayscience00000000000000/* This file, getkey.c, contains routines that read keywords from */ /* a FITS header. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include /* stddef.h is apparently needed to define size_t */ #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffghsp(fitsfile *fptr, /* I - FITS file pointer */ int *nexist, /* O - number of existing keywords in header */ int *nmore, /* O - how many more keywords will fit */ int *status) /* IO - error status */ /* returns the number of existing keywords (not counting the END keyword) and the number of more keyword that will fit in the current header without having to insert more FITS blocks. */ { if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if (nexist) *nexist = (int) (( ((fptr->Fptr)->headend) - ((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]) ) / 80); if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if (nmore) *nmore = -1; /* data not written yet, so room for any keywords */ } else { /* calculate space available between the data and the END card */ if (nmore) *nmore = (int) (((fptr->Fptr)->datastart - (fptr->Fptr)->headend) / 80 - 1); } return(*status); } /*--------------------------------------------------------------------------*/ int ffghps(fitsfile *fptr, /* I - FITS file pointer */ int *nexist, /* O - number of existing keywords in header */ int *position, /* O - position of next keyword to be read */ int *status) /* IO - error status */ /* return the number of existing keywords and the position of the next keyword that will be read. */ { if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); *nexist = (int) (( ((fptr->Fptr)->headend) - ((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]) ) / 80); *position = (int) (( ((fptr->Fptr)->nextkey) - ((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]) ) / 80 + 1); return(*status); } /*--------------------------------------------------------------------------*/ int ffnchk(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* function returns the position of the first null character (ASCII 0), if any, in the current header. Null characters are illegal, but the other CFITSIO routines that read the header will not detect this error, because the null gets interpreted as a normal end of string character. */ { long ii, nblock; LONGLONG bytepos; int length, nullpos; char block[2881]; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { return(0); /* Don't check a file that is just being created. */ /* It cannot contain nulls since CFITSIO wrote it. */ } else { /* calculate number of blocks in the header */ nblock = (long) (( (fptr->Fptr)->datastart - (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) / 2880); } bytepos = (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]; ffmbyt(fptr, bytepos, REPORT_EOF, status); /* move to read pos. */ block[2880] = '\0'; for (ii = 0; ii < nblock; ii++) { if (ffgbyt(fptr, 2880, block, status) > 0) return(0); /* read error of some sort */ length = strlen(block); if (length != 2880) { nullpos = (ii * 2880) + length + 1; return(nullpos); } } return(0); } /*--------------------------------------------------------------------------*/ int ffmaky(fitsfile *fptr, /* I - FITS file pointer */ int nrec, /* I - one-based keyword number to move to */ int *status) /* IO - error status */ { /* move pointer to the specified absolute keyword position. E.g. this keyword will then be read by the next call to ffgnky. */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] + ( (nrec - 1) * 80); return(*status); } /*--------------------------------------------------------------------------*/ int ffmrky(fitsfile *fptr, /* I - FITS file pointer */ int nmove, /* I - relative number of keywords to move */ int *status) /* IO - error status */ { /* move pointer to the specified keyword position relative to the current position. E.g. this keyword will then be read by the next call to ffgnky. */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); (fptr->Fptr)->nextkey += (nmove * 80); return(*status); } /*--------------------------------------------------------------------------*/ int ffgnky(fitsfile *fptr, /* I - FITS file pointer */ char *card, /* O - card string */ int *status) /* IO - error status */ /* read the next keyword from the header - used internally by cfitsio */ { int jj, nrec; LONGLONG bytepos, endhead; char message[FLEN_ERRMSG]; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); card[0] = '\0'; /* make sure card is terminated, even affer read error */ /* Check that nextkey points to a legal keyword position. Note that headend is the current end of the header, i.e., the position where a new keyword would be appended, however, if there are more than 1 FITS block worth of blank keywords at the end of the header (36 keywords per 2880 byte block) then the actual physical END card must be located at a starting position which is just 2880 bytes prior to the start of the data unit. */ bytepos = (fptr->Fptr)->nextkey; endhead = maxvalue( ((fptr->Fptr)->headend), ((fptr->Fptr)->datastart - 2880) ); /* nextkey must be < endhead and > than headstart */ if (bytepos > endhead || bytepos < (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) { nrec= (int) ((bytepos - (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]) / 80 + 1); sprintf(message, "Cannot get keyword number %d. It does not exist.", nrec); ffpmsg(message); return(*status = KEY_OUT_BOUNDS); } ffmbyt(fptr, bytepos, REPORT_EOF, status); /* move to read pos. */ card[80] = '\0'; /* make sure card is terminate, even if ffgbyt fails */ if (ffgbyt(fptr, 80, card, status) <= 0) { (fptr->Fptr)->nextkey += 80; /* increment pointer to next keyword */ /* strip off trailing blanks with terminated string */ jj = 79; while (jj >= 0 && card[jj] == ' ') jj--; card[jj + 1] = '\0'; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgnxk( fitsfile *fptr, /* I - FITS file pointer */ char **inclist, /* I - list of included keyword names */ int ninc, /* I - number of names in inclist */ char **exclist, /* I - list of excluded keyword names */ int nexc, /* I - number of names in exclist */ char *card, /* O - first matching keyword */ int *status) /* IO - error status */ /* Return the next keyword that matches one of the names in inclist but does not match any of the names in exclist. The search goes from the current position to the end of the header, only. Wild card characters may be used in the name lists ('*', '?' and '#'). */ { int casesn, match, exact, namelen; long ii, jj; char keybuf[FLEN_CARD], keyname[FLEN_KEYWORD]; card[0] = '\0'; if (*status > 0) return(*status); casesn = FALSE; /* get next card, and return with an error if hit end of header */ while( ffgcrd(fptr, "*", keybuf, status) <= 0) { ffgknm(keybuf, keyname, &namelen, status); /* get the keyword name */ /* does keyword match any names in the include list? */ for (ii = 0; ii < ninc; ii++) { ffcmps(inclist[ii], keyname, casesn, &match, &exact); if (match) { /* does keyword match any names in the exclusion list? */ jj = -1; while ( ++jj < nexc ) { ffcmps(exclist[jj], keyname, casesn, &match, &exact); if (match) break; } if (jj >= nexc) { /* not in exclusion list, so return this keyword */ strcat(card, keybuf); return(*status); } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgky( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ const char *keyname, /* I - name of keyword to read */ void *value, /* O - keyword value */ char *comm, /* O - keyword comment */ int *status) /* IO - error status */ /* Read (get) the keyword value and comment from the FITS header. Reads a keyword value with the datatype specified by the 2nd argument. */ { long longval; double doubleval; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (datatype == TSTRING) { ffgkys(fptr, keyname, (char *) value, comm, status); } else if (datatype == TBYTE) { if (ffgkyj(fptr, keyname, &longval, comm, status) <= 0) { if (longval > UCHAR_MAX || longval < 0) *status = NUM_OVERFLOW; else *(unsigned char *) value = (unsigned char) longval; } } else if (datatype == TSBYTE) { if (ffgkyj(fptr, keyname, &longval, comm, status) <= 0) { if (longval > 127 || longval < -128) *status = NUM_OVERFLOW; else *(signed char *) value = (signed char) longval; } } else if (datatype == TUSHORT) { if (ffgkyj(fptr, keyname, &longval, comm, status) <= 0) { if (longval > (long) USHRT_MAX || longval < 0) *status = NUM_OVERFLOW; else *(unsigned short *) value = (unsigned short) longval; } } else if (datatype == TSHORT) { if (ffgkyj(fptr, keyname, &longval, comm, status) <= 0) { if (longval > SHRT_MAX || longval < SHRT_MIN) *status = NUM_OVERFLOW; else *(short *) value = (short) longval; } } else if (datatype == TUINT) { if (ffgkyj(fptr, keyname, &longval, comm, status) <= 0) { if (longval > (long) UINT_MAX || longval < 0) *status = NUM_OVERFLOW; else *(unsigned int *) value = longval; } } else if (datatype == TINT) { if (ffgkyj(fptr, keyname, &longval, comm, status) <= 0) { if (longval > INT_MAX || longval < INT_MIN) *status = NUM_OVERFLOW; else *(int *) value = longval; } } else if (datatype == TLOGICAL) { ffgkyl(fptr, keyname, (int *) value, comm, status); } else if (datatype == TULONG) { if (ffgkyd(fptr, keyname, &doubleval, comm, status) <= 0) { if (doubleval > (double) ULONG_MAX || doubleval < 0) *status = NUM_OVERFLOW; else *(unsigned long *) value = (unsigned long) doubleval; } } else if (datatype == TLONG) { ffgkyj(fptr, keyname, (long *) value, comm, status); } else if (datatype == TLONGLONG) { ffgkyjj(fptr, keyname, (LONGLONG *) value, comm, status); } else if (datatype == TFLOAT) { ffgkye(fptr, keyname, (float *) value, comm, status); } else if (datatype == TDOUBLE) { ffgkyd(fptr, keyname, (double *) value, comm, status); } else if (datatype == TCOMPLEX) { ffgkyc(fptr, keyname, (float *) value, comm, status); } else if (datatype == TDBLCOMPLEX) { ffgkym(fptr, keyname, (double *) value, comm, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffgkey( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to read */ char *keyval, /* O - keyword value */ char *comm, /* O - keyword comment */ int *status) /* IO - error status */ /* Read (get) the named keyword, returning the keyword value and comment. The value is just the literal string of characters in the value field of the keyword. In the case of a string valued keyword, the returned value includes the leading and closing quote characters. The value may be up to 70 characters long, and the comment may be up to 72 characters long. If the keyword has no value (no equal sign in column 9) then a null value is returned. */ { char card[FLEN_CARD]; keyval[0] = '\0'; if (comm) comm[0] = '\0'; if (*status > 0) return(*status); if (ffgcrd(fptr, keyname, card, status) > 0) /* get the 80-byte card */ return(*status); ffpsvc(card, keyval, comm, status); /* parse the value and comment */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgrec( fitsfile *fptr, /* I - FITS file pointer */ int nrec, /* I - number of keyword to read */ char *card, /* O - keyword card */ int *status) /* IO - error status */ /* Read (get) the nrec-th keyword, returning the entire keyword card up to 80 characters long. The first keyword in the header has nrec = 1, not 0. The returned card value is null terminated with any trailing blank characters removed. If nrec = 0, then this routine simply moves the current header pointer to the top of the header. */ { if (*status > 0) return(*status); if (nrec == 0) { ffmaky(fptr, 1, status); /* simply move to beginning of header */ if (card) card[0] = '\0'; /* and return null card */ } else if (nrec > 0) { ffmaky(fptr, nrec, status); ffgnky(fptr, card, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffgcrd( fitsfile *fptr, /* I - FITS file pointer */ const char *name, /* I - name of keyword to read */ char *card, /* O - keyword card */ int *status) /* IO - error status */ /* Read (get) the named keyword, returning the entire keyword card up to 80 characters long. The returned card value is null terminated with any trailing blank characters removed. If the input name contains wild cards ('?' matches any single char and '*' matches any sequence of chars, # matches any string of decimal digits) then the search ends once the end of header is reached and does not automatically resume from the top of the header. */ { int nkeys, nextkey, ntodo, namelen, namelen_limit, namelenminus1, cardlen; int ii = 0, jj, kk, wild, match, exact, hier = 0; char keyname[FLEN_KEYWORD], cardname[FLEN_KEYWORD]; char *ptr1, *ptr2, *gotstar; if (*status > 0) return(*status); *keyname = '\0'; while (name[ii] == ' ') /* skip leading blanks in name */ ii++; strncat(keyname, &name[ii], FLEN_KEYWORD - 1); namelen = strlen(keyname); while (namelen > 0 && keyname[namelen - 1] == ' ') namelen--; /* ignore trailing blanks in name */ keyname[namelen] = '\0'; /* terminate the name */ for (ii=0; ii < namelen; ii++) keyname[ii] = toupper(keyname[ii]); /* make upper case */ if (FSTRNCMP("HIERARCH", keyname, 8) == 0) { if (namelen == 8) { /* special case: just looking for any HIERARCH keyword */ hier = 1; } else { /* ignore the leading HIERARCH and look for the 'real' name */ /* starting with first non-blank character following HIERARCH */ ptr1 = keyname; ptr2 = &keyname[8]; while(*ptr2 == ' ') ptr2++; namelen = 0; while(*ptr2) { *ptr1 = *ptr2; ptr1++; ptr2++; namelen++; } *ptr1 = '\0'; } } /* does input name contain wild card chars? ('?', '*', or '#') */ /* wild cards are currently not supported with HIERARCH keywords */ namelen_limit = namelen; gotstar = 0; if (namelen < 9 && (strchr(keyname,'?') || (gotstar = strchr(keyname,'*')) || strchr(keyname,'#')) ) { wild = 1; /* if we found a '*' wild card in the name, there might be */ /* more than one. Support up to 2 '*' in the template. */ /* Thus we need to compare keywords whose names have at least */ /* namelen - 2 characters. */ if (gotstar) namelen_limit -= 2; } else wild = 0; ffghps(fptr, &nkeys, &nextkey, status); /* get no. keywords and position */ namelenminus1 = maxvalue(namelen - 1, 1); ntodo = nkeys - nextkey + 1; /* first, read from next keyword to end */ for (jj=0; jj < 2; jj++) { for (kk = 0; kk < ntodo; kk++) { ffgnky(fptr, card, status); /* get next keyword */ if (hier) { if (FSTRNCMP("HIERARCH", card, 8) == 0) return(*status); /* found a HIERARCH keyword */ } else { ffgknm(card, cardname, &cardlen, status); /* get the keyword name */ if (cardlen >= namelen_limit) /* can't match if card < name */ { /* if there are no wild cards, lengths must be the same */ if (!( !wild && cardlen != namelen) ) { for (ii=0; ii < cardlen; ii++) { /* make sure keyword is in uppercase */ if (cardname[ii] > 96) { /* This assumes the ASCII character set in which */ /* upper case characters start at ASCII(97) */ /* Timing tests showed that this is 20% faster */ /* than calling the isupper function. */ cardname[ii] = toupper(cardname[ii]); /* make upper case */ } } if (wild) { ffcmps(keyname, cardname, 1, &match, &exact); if (match) return(*status); /* found a matching keyword */ } else if (keyname[namelenminus1] == cardname[namelenminus1]) { /* test the last character of the keyword name first, on */ /* the theory that it is less likely to match then the first */ /* character since many keywords begin with 'T', for example */ if (FSTRNCMP(keyname, cardname, namelenminus1) == 0) { return(*status); /* found the matching keyword */ } } else if (namelen == 0 && cardlen == 0) { /* matched a blank keyword */ return(*status); } } } } } if (wild || jj == 1) break; /* stop at end of header if template contains wildcards */ ffmaky(fptr, 1, status); /* reset pointer to beginning of header */ ntodo = nextkey - 1; /* number of keyword to read */ } return(*status = KEY_NO_EXIST); /* couldn't find the keyword */ } /*--------------------------------------------------------------------------*/ int ffgstr( fitsfile *fptr, /* I - FITS file pointer */ const char *string, /* I - string to match */ char *card, /* O - keyword card */ int *status) /* IO - error status */ /* Read (get) the next keyword record that contains the input character string, returning the entire keyword card up to 80 characters long. The returned card value is null terminated with any trailing blank characters removed. */ { int nkeys, nextkey, ntodo, stringlen; int jj, kk; if (*status > 0) return(*status); stringlen = strlen(string); if (stringlen > 80) { return(*status = KEY_NO_EXIST); /* matching string is too long to exist */ } ffghps(fptr, &nkeys, &nextkey, status); /* get no. keywords and position */ ntodo = nkeys - nextkey + 1; /* first, read from next keyword to end */ for (jj=0; jj < 2; jj++) { for (kk = 0; kk < ntodo; kk++) { ffgnky(fptr, card, status); /* get next keyword */ if (strstr(card, string) != 0) { return(*status); /* found the matching string */ } } ffmaky(fptr, 1, status); /* reset pointer to beginning of header */ ntodo = nextkey - 1; /* number of keyword to read */ } return(*status = KEY_NO_EXIST); /* couldn't find the keyword */ } /*--------------------------------------------------------------------------*/ int ffgknm( char *card, /* I - keyword card */ char *name, /* O - name of the keyword */ int *length, /* O - length of the keyword name */ int *status) /* IO - error status */ /* Return the name of the keyword, and the name length. This supports the ESO HIERARCH convention where keyword names may be > 8 characters long. */ { char *ptr1, *ptr2; int ii; *name = '\0'; *length = 0; /* support for ESO HIERARCH keywords; find the '=' */ if (FSTRNCMP(card, "HIERARCH ", 9) == 0) { ptr2 = strchr(card, '='); if (!ptr2) /* no value indicator ??? */ { /* this probably indicates an error, so just return FITS name */ strcat(name, "HIERARCH"); *length = 8; return(*status); } /* find the start and end of the HIERARCH name */ ptr1 = &card[9]; while (*ptr1 == ' ') /* skip spaces */ ptr1++; strncat(name, ptr1, ptr2 - ptr1); ii = ptr2 - ptr1; while (ii > 0 && name[ii - 1] == ' ') /* remove trailing spaces */ ii--; name[ii] = '\0'; *length = ii; } else { for (ii = 0; ii < 8; ii++) { /* look for string terminator, or a blank */ if (*(card+ii) != ' ' && *(card+ii) !='\0') { *(name+ii) = *(card+ii); } else { name[ii] = '\0'; *length = ii; return(*status); } } /* if we got here, keyword is 8 characters long */ name[8] = '\0'; *length = 8; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgunt( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to read */ char *unit, /* O - keyword units */ int *status) /* IO - error status */ /* Read (get) the units string from the comment field of the existing keyword. This routine uses a local FITS convention (not defined in the official FITS standard) in which the units are enclosed in square brackets following the '/' comment field delimiter, e.g.: KEYWORD = 12 / [kpc] comment string goes here */ { char valstring[FLEN_VALUE]; char comm[FLEN_COMMENT]; char *loc; if (*status > 0) return(*status); ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ if (comm[0] == '[') { loc = strchr(comm, ']'); /* find the closing bracket */ if (loc) *loc = '\0'; /* terminate the string */ strcpy(unit, &comm[1]); /* copy the string */ } else unit[0] = '\0'; return(*status); } /*--------------------------------------------------------------------------*/ int ffgkys( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to read */ char *value, /* O - keyword value */ char *comm, /* O - keyword comment */ int *status) /* IO - error status */ /* Get KeYword with a String value: Read (get) a simple string valued keyword. The returned value may be up to 68 chars long ( + 1 null terminator char). The routine does not support the HEASARC convention for continuing long string values over multiple keywords. The ffgkls routine may be used to read long continued strings. The returned comment string may be up to 69 characters long (including null terminator). */ { char valstring[FLEN_VALUE]; if (*status > 0) return(*status); ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ value[0] = '\0'; ffc2s(valstring, value, status); /* remove quotes from string */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgkls( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to read */ char **value, /* O - pointer to keyword value */ char *comm, /* O - keyword comment */ int *status) /* IO - error status */ /* Get Keyword with possible Long String value: Read (get) the named keyword, returning the value and comment. The returned value string may be arbitrarily long (by using the HEASARC convention for continuing long string values over multiple keywords) so this routine allocates the required memory for the returned string value. It is up to the calling routine to free the memory once it is finished with the value string. The returned comment string may be up to 69 characters long. */ { char valstring[FLEN_VALUE]; int contin; size_t len; if (*status > 0) return(*status); *value = NULL; /* initialize a null pointer in case of error */ ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ if (*status > 0) return(*status); if (!valstring[0]) /* null value string? */ { *value = (char *) malloc(1); /* allocate and return a null string */ **value = '\0'; } else { /* allocate space, plus 1 for null */ *value = (char *) malloc(strlen(valstring) + 1); ffc2s(valstring, *value, status); /* convert string to value */ len = strlen(*value); /* If last character is a & then value may be continued on next keyword */ contin = 1; while (contin) { if (len && *(*value+len-1) == '&') /* is last char an anpersand? */ { ffgcnt(fptr, valstring, status); if (*valstring) /* a null valstring indicates no continuation */ { *(*value+len-1) = '\0'; /* erase the trailing & char */ len += strlen(valstring) - 1; *value = (char *) realloc(*value, len + 1); /* increase size */ strcat(*value, valstring); /* append the continued chars */ } else contin = 0; } else contin = 0; } } return(*status); } /*--------------------------------------------------------------------------*/ int fffree( void *value, /* I - pointer to keyword value */ int *status) /* IO - error status */ /* Free the memory that was previously allocated by CFITSIO, such as by ffgkls or fits_hdr2str */ { if (*status > 0) return(*status); if (value) free(value); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcnt( fitsfile *fptr, /* I - FITS file pointer */ char *value, /* O - continued string value */ int *status) /* IO - error status */ /* Attempt to read the next keyword, returning the string value if it is a continuation of the previous string keyword value. This uses the HEASARC convention for continuing long string values over multiple keywords. Each continued string is terminated with a backslash character, and the continuation follows on the next keyword which must have the name CONTINUE without an equal sign in column 9 of the card. If the next card is not a continuation, then the returned value string will be null. */ { int tstatus; char card[FLEN_CARD], strval[FLEN_VALUE], comm[FLEN_COMMENT]; if (*status > 0) return(*status); tstatus = 0; value[0] = '\0'; if (ffgnky(fptr, card, &tstatus) > 0) /* read next keyword */ return(*status); /* hit end of header */ if (strncmp(card, "CONTINUE ", 10) == 0) /* a continuation card? */ { strncpy(card, "D2345678= ", 10); /* overwrite a dummy keyword name */ ffpsvc(card, strval, comm, &tstatus); /* get the string value */ ffc2s(strval, value, &tstatus); /* remove the surrounding quotes */ if (tstatus) /* return null if error status was returned */ value[0] = '\0'; } else ffmrky(fptr, -1, status); /* reset the keyword pointer */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgkyl( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to read */ int *value, /* O - keyword value */ char *comm, /* O - keyword comment */ int *status) /* IO - error status */ /* Read (get) the named keyword, returning the value and comment. The returned value = 1 if the keyword is true, else = 0 if false. The comment may be up to 69 characters long. */ { char valstring[FLEN_VALUE]; if (*status > 0) return(*status); ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ ffc2l(valstring, value, status); /* convert string to value */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgkyj( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to read */ long *value, /* O - keyword value */ char *comm, /* O - keyword comment */ int *status) /* IO - error status */ /* Read (get) the named keyword, returning the value and comment. The value will be implicitly converted to a (long) integer if it not already of this datatype. The comment may be up to 69 characters long. */ { char valstring[FLEN_VALUE]; if (*status > 0) return(*status); ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ ffc2i(valstring, value, status); /* convert string to value */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgkyjj( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to read */ LONGLONG *value, /* O - keyword value */ char *comm, /* O - keyword comment */ int *status) /* IO - error status */ /* Read (get) the named keyword, returning the value and comment. The value will be implicitly converted to a (long) integer if it not already of this datatype. The comment may be up to 69 characters long. */ { char valstring[FLEN_VALUE]; if (*status > 0) return(*status); ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ ffc2j(valstring, value, status); /* convert string to value */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgkye( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to read */ float *value, /* O - keyword value */ char *comm, /* O - keyword comment */ int *status) /* IO - error status */ /* Read (get) the named keyword, returning the value and comment. The value will be implicitly converted to a float if it not already of this datatype. The comment may be up to 69 characters long. */ { char valstring[FLEN_VALUE]; if (*status > 0) return(*status); ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ ffc2r(valstring, value, status); /* convert string to value */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgkyd( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to read */ double *value, /* O - keyword value */ char *comm, /* O - keyword comment */ int *status) /* IO - error status */ /* Read (get) the named keyword, returning the value and comment. The value will be implicitly converted to a double if it not already of this datatype. The comment may be up to 69 characters long. */ { char valstring[FLEN_VALUE]; if (*status > 0) return(*status); ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ ffc2d(valstring, value, status); /* convert string to value */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgkyc( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to read */ float *value, /* O - keyword value (real,imag) */ char *comm, /* O - keyword comment */ int *status) /* IO - error status */ /* Read (get) the named keyword, returning the value and comment. The keyword must have a complex value. No implicit data conversion will be performed. */ { char valstring[FLEN_VALUE], message[81]; int len; if (*status > 0) return(*status); ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ if (valstring[0] != '(' ) /* test that this is a complex keyword */ { sprintf(message, "keyword %s does not have a complex value (ffgkyc):", keyname); ffpmsg(message); ffpmsg(valstring); return(*status = BAD_C2F); } valstring[0] = ' '; /* delete the opening parenthesis */ len = strcspn(valstring, ")" ); valstring[len] = '\0'; /* delete the closing parenthesis */ len = strcspn(valstring, ","); valstring[len] = '\0'; ffc2r(valstring, &value[0], status); /* convert the real part */ ffc2r(&valstring[len + 1], &value[1], status); /* convert imag. part */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgkym( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to read */ double *value, /* O - keyword value (real,imag) */ char *comm, /* O - keyword comment */ int *status) /* IO - error status */ /* Read (get) the named keyword, returning the value and comment. The keyword must have a complex value. No implicit data conversion will be performed. */ { char valstring[FLEN_VALUE], message[81]; int len; if (*status > 0) return(*status); ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ if (valstring[0] != '(' ) /* test that this is a complex keyword */ { sprintf(message, "keyword %s does not have a complex value (ffgkym):", keyname); ffpmsg(message); ffpmsg(valstring); return(*status = BAD_C2D); } valstring[0] = ' '; /* delete the opening parenthesis */ len = strcspn(valstring, ")" ); valstring[len] = '\0'; /* delete the closing parenthesis */ len = strcspn(valstring, ","); valstring[len] = '\0'; ffc2d(valstring, &value[0], status); /* convert the real part */ ffc2d(&valstring[len + 1], &value[1], status); /* convert the imag. part */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgkyt( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - name of keyword to read */ long *ivalue, /* O - integer part of keyword value */ double *fraction, /* O - fractional part of keyword value */ char *comm, /* O - keyword comment */ int *status) /* IO - error status */ /* Read (get) the named keyword, returning the value and comment. The integer and fractional parts of the value are returned in separate variables, to allow more numerical precision to be passed. This effectively passes a 'triple' precision value, with a 4-byte integer and an 8-byte fraction. The comment may be up to 69 characters long. */ { char valstring[FLEN_VALUE]; char *loc; if (*status > 0) return(*status); ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */ /* read the entire value string as a double, to get the integer part */ ffc2d(valstring, fraction, status); *ivalue = (long) *fraction; *fraction = *fraction - *ivalue; /* see if we need to read the fractional part again with more precision */ /* look for decimal point, without an exponential E or D character */ loc = strchr(valstring, '.'); if (loc) { if (!strchr(valstring, 'E') && !strchr(valstring, 'D')) ffc2d(loc, fraction, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffgkyn( fitsfile *fptr, /* I - FITS file pointer */ int nkey, /* I - number of the keyword to read */ char *keyname, /* O - name of the keyword */ char *value, /* O - keyword value */ char *comm, /* O - keyword comment */ int *status) /* IO - error status */ /* Read (get) the nkey-th keyword returning the keyword name, value and comment. The value is just the literal string of characters in the value field of the keyword. In the case of a string valued keyword, the returned value includes the leading and closing quote characters. The value may be up to 70 characters long, and the comment may be up to 72 characters long. If the keyword has no value (no equal sign in column 9) then a null value is returned. If comm = NULL, then do not return the comment string. */ { char card[FLEN_CARD], sbuff[FLEN_CARD]; int namelen; keyname[0] = '\0'; value[0] = '\0'; if (comm) comm[0] = '\0'; if (*status > 0) return(*status); if (ffgrec(fptr, nkey, card, status) > 0 ) /* get the 80-byte card */ return(*status); ffgknm(card, keyname, &namelen, status); /* get the keyword name */ if (ffpsvc(card, value, comm, status) > 0) /* parse value and comment */ return(*status); if (fftrec(keyname, status) > 0) /* test keyword name; catches no END */ { sprintf(sbuff,"Name of keyword no. %d contains illegal character(s): %s", nkey, keyname); ffpmsg(sbuff); if (nkey % 36 == 0) /* test if at beginning of 36-card FITS record */ ffpmsg(" (This may indicate a missing END keyword)."); } return(*status); } /*--------------------------------------------------------------------------*/ int ffgkns( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - root name of keywords to read */ int nstart, /* I - starting index number */ int nmax, /* I - maximum number of keywords to return */ char *value[], /* O - array of pointers to keyword values */ int *nfound, /* O - number of values that were returned */ int *status) /* IO - error status */ /* Read (get) an indexed array of keywords with index numbers between NSTART and (NSTART + NMAX -1) inclusive. This routine does NOT support the HEASARC long string convention. */ { int nend, lenroot, ii, nkeys, mkeys, tstatus, undefinedval; long ival; char keyroot[FLEN_KEYWORD], keyindex[8], card[FLEN_CARD]; char svalue[FLEN_VALUE], comm[FLEN_COMMENT]; if (*status > 0) return(*status); *nfound = 0; nend = nstart + nmax - 1; keyroot[0] = '\0'; strncat(keyroot, keyname, 8); lenroot = strlen(keyroot); if (lenroot == 0 || lenroot > 7) /* root must be 1 - 7 chars long */ return(*status); for (ii=0; ii < lenroot; ii++) /* make sure upper case */ keyroot[ii] = toupper(keyroot[ii]); ffghps(fptr, &nkeys, &mkeys, status); /* get the number of keywords */ undefinedval = FALSE; for (ii=3; ii <= nkeys; ii++) { if (ffgrec(fptr, ii, card, status) > 0) /* get next keyword */ return(*status); if (strncmp(keyroot, card, lenroot) == 0) /* see if keyword matches */ { keyindex[0] = '\0'; strncat(keyindex, &card[lenroot], 8-lenroot); /* copy suffix */ tstatus = 0; if (ffc2ii(keyindex, &ival, &tstatus) <= 0) /* test suffix */ { if (ival <= nend && ival >= nstart) { ffpsvc(card, svalue, comm, status); /* parse the value */ ffc2s(svalue, value[ival-nstart], status); /* convert */ if (ival - nstart + 1 > *nfound) *nfound = ival - nstart + 1; /* max found */ if (*status == VALUE_UNDEFINED) { undefinedval = TRUE; *status = 0; /* reset status to read remaining values */ } } } } } if (undefinedval && (*status <= 0) ) *status = VALUE_UNDEFINED; /* report at least 1 value undefined */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgknl( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - root name of keywords to read */ int nstart, /* I - starting index number */ int nmax, /* I - maximum number of keywords to return */ int *value, /* O - array of keyword values */ int *nfound, /* O - number of values that were returned */ int *status) /* IO - error status */ /* Read (get) an indexed array of keywords with index numbers between NSTART and (NSTART + NMAX -1) inclusive. The returned value = 1 if the keyword is true, else = 0 if false. */ { int nend, lenroot, ii, nkeys, mkeys, tstatus, undefinedval; long ival; char keyroot[FLEN_KEYWORD], keyindex[8], card[FLEN_CARD]; char svalue[FLEN_VALUE], comm[FLEN_COMMENT]; if (*status > 0) return(*status); *nfound = 0; nend = nstart + nmax - 1; keyroot[0] = '\0'; strncat(keyroot, keyname, 8); lenroot = strlen(keyroot); if (lenroot == 0 || lenroot > 7) /* root must be 1 - 7 chars long */ return(*status); for (ii=0; ii < lenroot; ii++) /* make sure upper case */ keyroot[ii] = toupper(keyroot[ii]); ffghps(fptr, &nkeys, &mkeys, status); /* get the number of keywords */ ffmaky(fptr, 3, status); /* move to 3rd keyword (skip 1st 2 keywords) */ undefinedval = FALSE; for (ii=3; ii <= nkeys; ii++) { if (ffgnky(fptr, card, status) > 0) /* get next keyword */ return(*status); if (strncmp(keyroot, card, lenroot) == 0) /* see if keyword matches */ { keyindex[0] = '\0'; strncat(keyindex, &card[lenroot], 8-lenroot); /* copy suffix */ tstatus = 0; if (ffc2ii(keyindex, &ival, &tstatus) <= 0) /* test suffix */ { if (ival <= nend && ival >= nstart) { ffpsvc(card, svalue, comm, status); /* parse the value */ ffc2l(svalue, &value[ival-nstart], status); /* convert*/ if (ival - nstart + 1 > *nfound) *nfound = ival - nstart + 1; /* max found */ if (*status == VALUE_UNDEFINED) { undefinedval = TRUE; *status = 0; /* reset status to read remaining values */ } } } } } if (undefinedval && (*status <= 0) ) *status = VALUE_UNDEFINED; /* report at least 1 value undefined */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgknj( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - root name of keywords to read */ int nstart, /* I - starting index number */ int nmax, /* I - maximum number of keywords to return */ long *value, /* O - array of keyword values */ int *nfound, /* O - number of values that were returned */ int *status) /* IO - error status */ /* Read (get) an indexed array of keywords with index numbers between NSTART and (NSTART + NMAX -1) inclusive. */ { int nend, lenroot, ii, nkeys, mkeys, tstatus, undefinedval; long ival; char keyroot[FLEN_KEYWORD], keyindex[8], card[FLEN_CARD]; char svalue[FLEN_VALUE], comm[FLEN_COMMENT]; if (*status > 0) return(*status); *nfound = 0; nend = nstart + nmax - 1; keyroot[0] = '\0'; strncat(keyroot, keyname, 8); lenroot = strlen(keyroot); if (lenroot == 0 || lenroot > 7) /* root must be 1 - 7 chars long */ return(*status); for (ii=0; ii < lenroot; ii++) /* make sure upper case */ keyroot[ii] = toupper(keyroot[ii]); ffghps(fptr, &nkeys, &mkeys, status); /* get the number of keywords */ ffmaky(fptr, 3, status); /* move to 3rd keyword (skip 1st 2 keywords) */ undefinedval = FALSE; for (ii=3; ii <= nkeys; ii++) { if (ffgnky(fptr, card, status) > 0) /* get next keyword */ return(*status); if (strncmp(keyroot, card, lenroot) == 0) /* see if keyword matches */ { keyindex[0] = '\0'; strncat(keyindex, &card[lenroot], 8-lenroot); /* copy suffix */ tstatus = 0; if (ffc2ii(keyindex, &ival, &tstatus) <= 0) /* test suffix */ { if (ival <= nend && ival >= nstart) { ffpsvc(card, svalue, comm, status); /* parse the value */ ffc2i(svalue, &value[ival-nstart], status); /* convert */ if (ival - nstart + 1 > *nfound) *nfound = ival - nstart + 1; /* max found */ if (*status == VALUE_UNDEFINED) { undefinedval = TRUE; *status = 0; /* reset status to read remaining values */ } } } } } if (undefinedval && (*status <= 0) ) *status = VALUE_UNDEFINED; /* report at least 1 value undefined */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgknjj( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - root name of keywords to read */ int nstart, /* I - starting index number */ int nmax, /* I - maximum number of keywords to return */ LONGLONG *value, /* O - array of keyword values */ int *nfound, /* O - number of values that were returned */ int *status) /* IO - error status */ /* Read (get) an indexed array of keywords with index numbers between NSTART and (NSTART + NMAX -1) inclusive. */ { int nend, lenroot, ii, nkeys, mkeys, tstatus, undefinedval; long ival; char keyroot[FLEN_KEYWORD], keyindex[8], card[FLEN_CARD]; char svalue[FLEN_VALUE], comm[FLEN_COMMENT]; if (*status > 0) return(*status); *nfound = 0; nend = nstart + nmax - 1; keyroot[0] = '\0'; strncat(keyroot, keyname, 8); lenroot = strlen(keyroot); if (lenroot == 0 || lenroot > 7) /* root must be 1 - 7 chars long */ return(*status); for (ii=0; ii < lenroot; ii++) /* make sure upper case */ keyroot[ii] = toupper(keyroot[ii]); ffghps(fptr, &nkeys, &mkeys, status); /* get the number of keywords */ ffmaky(fptr, 3, status); /* move to 3rd keyword (skip 1st 2 keywords) */ undefinedval = FALSE; for (ii=3; ii <= nkeys; ii++) { if (ffgnky(fptr, card, status) > 0) /* get next keyword */ return(*status); if (strncmp(keyroot, card, lenroot) == 0) /* see if keyword matches */ { keyindex[0] = '\0'; strncat(keyindex, &card[lenroot], 8-lenroot); /* copy suffix */ tstatus = 0; if (ffc2ii(keyindex, &ival, &tstatus) <= 0) /* test suffix */ { if (ival <= nend && ival >= nstart) { ffpsvc(card, svalue, comm, status); /* parse the value */ ffc2j(svalue, &value[ival-nstart], status); /* convert */ if (ival - nstart + 1 > *nfound) *nfound = ival - nstart + 1; /* max found */ if (*status == VALUE_UNDEFINED) { undefinedval = TRUE; *status = 0; /* reset status to read remaining values */ } } } } } if (undefinedval && (*status <= 0) ) *status = VALUE_UNDEFINED; /* report at least 1 value undefined */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgkne( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - root name of keywords to read */ int nstart, /* I - starting index number */ int nmax, /* I - maximum number of keywords to return */ float *value, /* O - array of keyword values */ int *nfound, /* O - number of values that were returned */ int *status) /* IO - error status */ /* Read (get) an indexed array of keywords with index numbers between NSTART and (NSTART + NMAX -1) inclusive. */ { int nend, lenroot, ii, nkeys, mkeys, tstatus, undefinedval; long ival; char keyroot[FLEN_KEYWORD], keyindex[8], card[FLEN_CARD]; char svalue[FLEN_VALUE], comm[FLEN_COMMENT]; if (*status > 0) return(*status); *nfound = 0; nend = nstart + nmax - 1; keyroot[0] = '\0'; strncat(keyroot, keyname, 8); lenroot = strlen(keyroot); if (lenroot == 0 || lenroot > 7) /* root must be 1 - 7 chars long */ return(*status); for (ii=0; ii < lenroot; ii++) /* make sure upper case */ keyroot[ii] = toupper(keyroot[ii]); ffghps(fptr, &nkeys, &mkeys, status); /* get the number of keywords */ ffmaky(fptr, 3, status); /* move to 3rd keyword (skip 1st 2 keywords) */ undefinedval = FALSE; for (ii=3; ii <= nkeys; ii++) { if (ffgnky(fptr, card, status) > 0) /* get next keyword */ return(*status); if (strncmp(keyroot, card, lenroot) == 0) /* see if keyword matches */ { keyindex[0] = '\0'; strncat(keyindex, &card[lenroot], 8-lenroot); /* copy suffix */ tstatus = 0; if (ffc2ii(keyindex, &ival, &tstatus) <= 0) /* test suffix */ { if (ival <= nend && ival >= nstart) { ffpsvc(card, svalue, comm, status); /* parse the value */ ffc2r(svalue, &value[ival-nstart], status); /* convert */ if (ival - nstart + 1 > *nfound) *nfound = ival - nstart + 1; /* max found */ if (*status == VALUE_UNDEFINED) { undefinedval = TRUE; *status = 0; /* reset status to read remaining values */ } } } } } if (undefinedval && (*status <= 0) ) *status = VALUE_UNDEFINED; /* report at least 1 value undefined */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgknd( fitsfile *fptr, /* I - FITS file pointer */ const char *keyname, /* I - root name of keywords to read */ int nstart, /* I - starting index number */ int nmax, /* I - maximum number of keywords to return */ double *value, /* O - array of keyword values */ int *nfound, /* O - number of values that were returned */ int *status) /* IO - error status */ /* Read (get) an indexed array of keywords with index numbers between NSTART and (NSTART + NMAX -1) inclusive. */ { int nend, lenroot, ii, nkeys, mkeys, tstatus, undefinedval; long ival; char keyroot[FLEN_KEYWORD], keyindex[8], card[FLEN_CARD]; char svalue[FLEN_VALUE], comm[FLEN_COMMENT]; if (*status > 0) return(*status); *nfound = 0; nend = nstart + nmax - 1; keyroot[0] = '\0'; strncat(keyroot, keyname, 8); lenroot = strlen(keyroot); if (lenroot == 0 || lenroot > 7) /* root must be 1 - 7 chars long */ return(*status); for (ii=0; ii < lenroot; ii++) /* make sure upper case */ keyroot[ii] = toupper(keyroot[ii]); ffghps(fptr, &nkeys, &mkeys, status); /* get the number of keywords */ ffmaky(fptr, 3, status); /* move to 3rd keyword (skip 1st 2 keywords) */ undefinedval = FALSE; for (ii=3; ii <= nkeys; ii++) { if (ffgnky(fptr, card, status) > 0) /* get next keyword */ return(*status); if (strncmp(keyroot, card, lenroot) == 0) /* see if keyword matches */ { keyindex[0] = '\0'; strncat(keyindex, &card[lenroot], 8-lenroot); /* copy suffix */ tstatus = 0; if (ffc2ii(keyindex, &ival, &tstatus) <= 0) /* test suffix */ { if (ival <= nend && ival >= nstart) /* is index within range? */ { ffpsvc(card, svalue, comm, status); /* parse the value */ ffc2d(svalue, &value[ival-nstart], status); /* convert */ if (ival - nstart + 1 > *nfound) *nfound = ival - nstart + 1; /* max found */ if (*status == VALUE_UNDEFINED) { undefinedval = TRUE; *status = 0; /* reset status to read remaining values */ } } } } } if (undefinedval && (*status <= 0) ) *status = VALUE_UNDEFINED; /* report at least 1 value undefined */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgtdm(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read */ int maxdim, /* I - maximum no. of dimensions to read; */ int *naxis, /* O - number of axes in the data array */ long naxes[], /* O - length of each data axis */ int *status) /* IO - error status */ /* read and parse the TDIMnnn keyword to get the dimensionality of a column */ { int tstatus = 0; char keyname[FLEN_KEYWORD], tdimstr[FLEN_VALUE]; if (*status > 0) return(*status); ffkeyn("TDIM", colnum, keyname, status); /* construct keyword name */ ffgkys(fptr, keyname, tdimstr, NULL, &tstatus); /* try reading keyword */ ffdtdm(fptr, tdimstr, colnum, maxdim,naxis, naxes, status); /* decode it */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgtdmll(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read */ int maxdim, /* I - maximum no. of dimensions to read; */ int *naxis, /* O - number of axes in the data array */ LONGLONG naxes[], /* O - length of each data axis */ int *status) /* IO - error status */ /* read and parse the TDIMnnn keyword to get the dimensionality of a column */ { int tstatus = 0; char keyname[FLEN_KEYWORD], tdimstr[FLEN_VALUE]; if (*status > 0) return(*status); ffkeyn("TDIM", colnum, keyname, status); /* construct keyword name */ ffgkys(fptr, keyname, tdimstr, NULL, &tstatus); /* try reading keyword */ ffdtdmll(fptr, tdimstr, colnum, maxdim,naxis, naxes, status); /* decode it */ return(*status); } /*--------------------------------------------------------------------------*/ int ffdtdm(fitsfile *fptr, /* I - FITS file pointer */ char *tdimstr, /* I - TDIMn keyword value string. e.g. (10,10) */ int colnum, /* I - number of the column */ int maxdim, /* I - maximum no. of dimensions to read; */ int *naxis, /* O - number of axes in the data array */ long naxes[], /* O - length of each data axis */ int *status) /* IO - error status */ /* decode the TDIMnnn keyword to get the dimensionality of a column. Check that the value is legal and consistent with the TFORM value. If colnum = 0, then the validity checking is disabled. */ { long dimsize, totalpix = 1; char *loc, *lastloc, message[81]; tcolumn *colptr; if (*status > 0) return(*status); if (colnum != 0) { if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if (colnum < 1 || colnum > (fptr->Fptr)->tfield) return(*status = BAD_COL_NUM); colptr = (fptr->Fptr)->tableptr; /* set pointer to the first column */ colptr += (colnum - 1); /* increment to the correct column */ if (!tdimstr[0]) /* TDIMn keyword doesn't exist? */ { *naxis = 1; /* default = 1 dimensional */ if (maxdim > 0) naxes[0] = (long) colptr->trepeat; /* default length = repeat */ return(*status); } } *naxis = 0; loc = strchr(tdimstr, '(' ); /* find the opening quote */ if (!loc) { sprintf(message, "Illegal dimensions format: %s", tdimstr); return(*status = BAD_TDIM); } while (loc) { loc++; dimsize = strtol(loc, &loc, 10); /* read size of next dimension */ if (*naxis < maxdim) naxes[*naxis] = dimsize; if (dimsize < 0) { ffpmsg("one or more dimension are less than 0 (ffdtdm)"); ffpmsg(tdimstr); return(*status = BAD_TDIM); } totalpix *= dimsize; (*naxis)++; lastloc = loc; loc = strchr(loc, ','); /* look for comma before next dimension */ } loc = strchr(lastloc, ')' ); /* check for the closing quote */ if (!loc) { sprintf(message, "Illegal dimensions format: %s", tdimstr); return(*status = BAD_TDIM); } if (colnum != 0) { if ((colptr->tdatatype > 0) && ((long) colptr->trepeat != totalpix)) { sprintf(message, "column vector length, %ld, does not equal TDIMn array size, %ld", (long) colptr->trepeat, totalpix); ffpmsg(message); ffpmsg(tdimstr); return(*status = BAD_TDIM); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffdtdmll(fitsfile *fptr, /* I - FITS file pointer */ char *tdimstr, /* I - TDIMn keyword value string. e.g. (10,10) */ int colnum, /* I - number of the column */ int maxdim, /* I - maximum no. of dimensions to read; */ int *naxis, /* O - number of axes in the data array */ LONGLONG naxes[], /* O - length of each data axis */ int *status) /* IO - error status */ /* decode the TDIMnnn keyword to get the dimensionality of a column. Check that the value is legal and consistent with the TFORM value. */ { LONGLONG dimsize; LONGLONG totalpix = 1; char *loc, *lastloc, message[81]; tcolumn *colptr; double doublesize; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if (colnum < 1 || colnum > (fptr->Fptr)->tfield) return(*status = BAD_COL_NUM); colptr = (fptr->Fptr)->tableptr; /* set pointer to the first column */ colptr += (colnum - 1); /* increment to the correct column */ if (!tdimstr[0]) /* TDIMn keyword doesn't exist? */ { *naxis = 1; /* default = 1 dimensional */ if (maxdim > 0) naxes[0] = colptr->trepeat; /* default length = repeat */ } else { *naxis = 0; loc = strchr(tdimstr, '(' ); /* find the opening quote */ if (!loc) { sprintf(message, "Illegal TDIM keyword value: %s", tdimstr); return(*status = BAD_TDIM); } while (loc) { loc++; /* Read value as a double because the string to 64-bit int function is */ /* platform dependent (strtoll, strtol, _atoI64). This still gives */ /* about 48 bits of precision, which is plenty for this purpose. */ doublesize = strtod(loc, &loc); dimsize = (LONGLONG) (doublesize + 0.1); if (*naxis < maxdim) naxes[*naxis] = dimsize; if (dimsize < 0) { ffpmsg("one or more TDIM values are less than 0 (ffdtdm)"); ffpmsg(tdimstr); return(*status = BAD_TDIM); } totalpix *= dimsize; (*naxis)++; lastloc = loc; loc = strchr(loc, ','); /* look for comma before next dimension */ } loc = strchr(lastloc, ')' ); /* check for the closing quote */ if (!loc) { sprintf(message, "Illegal TDIM keyword value: %s", tdimstr); return(*status = BAD_TDIM); } if ((colptr->tdatatype > 0) && (colptr->trepeat != totalpix)) { sprintf(message, "column vector length, %.0f, does not equal TDIMn array size, %.0f", (double) (colptr->trepeat), (double) totalpix); ffpmsg(message); ffpmsg(tdimstr); return(*status = BAD_TDIM); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffghpr(fitsfile *fptr, /* I - FITS file pointer */ int maxdim, /* I - maximum no. of dimensions to read; */ int *simple, /* O - does file conform to FITS standard? 1/0 */ int *bitpix, /* O - number of bits per data value pixel */ int *naxis, /* O - number of axes in the data array */ long naxes[], /* O - length of each data axis */ long *pcount, /* O - number of group parameters (usually 0) */ long *gcount, /* O - number of random groups (usually 1 or 0) */ int *extend, /* O - may FITS file haave extensions? */ int *status) /* IO - error status */ /* Get keywords from the Header of the PRimary array: Check that the keywords conform to the FITS standard and return the parameters which determine the size and structure of the primary array or IMAGE extension. */ { int idummy, ii; LONGLONG lldummy; double ddummy; LONGLONG tnaxes[99]; ffgphd(fptr, maxdim, simple, bitpix, naxis, tnaxes, pcount, gcount, extend, &ddummy, &ddummy, &lldummy, &idummy, status); if (naxis && naxes) { for (ii = 0; (ii < *naxis) && (ii < maxdim); ii++) naxes[ii] = (long) tnaxes[ii]; } else if (naxes) { for (ii = 0; ii < maxdim; ii++) naxes[ii] = (long) tnaxes[ii]; } return(*status); } /*--------------------------------------------------------------------------*/ int ffghprll(fitsfile *fptr, /* I - FITS file pointer */ int maxdim, /* I - maximum no. of dimensions to read; */ int *simple, /* O - does file conform to FITS standard? 1/0 */ int *bitpix, /* O - number of bits per data value pixel */ int *naxis, /* O - number of axes in the data array */ LONGLONG naxes[], /* O - length of each data axis */ long *pcount, /* O - number of group parameters (usually 0) */ long *gcount, /* O - number of random groups (usually 1 or 0) */ int *extend, /* O - may FITS file haave extensions? */ int *status) /* IO - error status */ /* Get keywords from the Header of the PRimary array: Check that the keywords conform to the FITS standard and return the parameters which determine the size and structure of the primary array or IMAGE extension. */ { int idummy; LONGLONG lldummy; double ddummy; ffgphd(fptr, maxdim, simple, bitpix, naxis, naxes, pcount, gcount, extend, &ddummy, &ddummy, &lldummy, &idummy, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffghtb(fitsfile *fptr, /* I - FITS file pointer */ int maxfield, /* I - maximum no. of columns to read; */ long *naxis1, /* O - length of table row in bytes */ long *naxis2, /* O - number of rows in the table */ int *tfields, /* O - number of columns in the table */ char **ttype, /* O - name of each column */ long *tbcol, /* O - byte offset in row to each column */ char **tform, /* O - value of TFORMn keyword for each column */ char **tunit, /* O - value of TUNITn keyword for each column */ char *extnm, /* O - value of EXTNAME keyword, if any */ int *status) /* IO - error status */ /* Get keywords from the Header of the ASCII TaBle: Check that the keywords conform to the FITS standard and return the parameters which describe the table. */ { int ii, maxf, nfound, tstatus; long fields; char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; char xtension[FLEN_VALUE], message[81]; LONGLONG llnaxis1, llnaxis2, pcount; if (*status > 0) return(*status); /* read the first keyword of the extension */ ffgkyn(fptr, 1, name, value, comm, status); if (!strcmp(name, "XTENSION")) { if (ffc2s(value, xtension, status) > 0) /* get the value string */ { ffpmsg("Bad value string for XTENSION keyword:"); ffpmsg(value); return(*status); } /* allow the quoted string value to begin in any column and */ /* allow any number of trailing blanks before the closing quote */ if ( (value[0] != '\'') || /* first char must be a quote */ ( strcmp(xtension, "TABLE") ) ) { sprintf(message, "This is not a TABLE extension: %s", value); ffpmsg(message); return(*status = NOT_ATABLE); } } else /* error: 1st keyword of extension != XTENSION */ { sprintf(message, "First keyword of the extension is not XTENSION: %s", name); ffpmsg(message); return(*status = NO_XTENSION); } if (ffgttb(fptr, &llnaxis1, &llnaxis2, &pcount, &fields, status) > 0) return(*status); if (naxis1) *naxis1 = (long) llnaxis1; if (naxis2) *naxis2 = (long) llnaxis2; if (pcount != 0) { sprintf(message, "PCOUNT = %.0f is illegal in ASCII table; must = 0", (double) pcount); ffpmsg(message); return(*status = BAD_PCOUNT); } if (tfields) *tfields = fields; if (maxfield < 0) maxf = fields; else maxf = minvalue(maxfield, fields); if (maxf > 0) { for (ii = 0; ii < maxf; ii++) { /* initialize optional keyword values */ if (ttype) *ttype[ii] = '\0'; if (tunit) *tunit[ii] = '\0'; } if (ttype) ffgkns(fptr, "TTYPE", 1, maxf, ttype, &nfound, status); if (tunit) ffgkns(fptr, "TUNIT", 1, maxf, tunit, &nfound, status); if (*status > 0) return(*status); if (tbcol) { ffgknj(fptr, "TBCOL", 1, maxf, tbcol, &nfound, status); if (*status > 0 || nfound != maxf) { ffpmsg( "Required TBCOL keyword(s) not found in ASCII table header (ffghtb)."); return(*status = NO_TBCOL); } } if (tform) { ffgkns(fptr, "TFORM", 1, maxf, tform, &nfound, status); if (*status > 0 || nfound != maxf) { ffpmsg( "Required TFORM keyword(s) not found in ASCII table header (ffghtb)."); return(*status = NO_TFORM); } } } if (extnm) { extnm[0] = '\0'; tstatus = *status; ffgkys(fptr, "EXTNAME", extnm, comm, status); if (*status == KEY_NO_EXIST) *status = tstatus; /* keyword not required, so ignore error */ } return(*status); } /*--------------------------------------------------------------------------*/ int ffghtbll(fitsfile *fptr, /* I - FITS file pointer */ int maxfield, /* I - maximum no. of columns to read; */ LONGLONG *naxis1, /* O - length of table row in bytes */ LONGLONG *naxis2, /* O - number of rows in the table */ int *tfields, /* O - number of columns in the table */ char **ttype, /* O - name of each column */ LONGLONG *tbcol, /* O - byte offset in row to each column */ char **tform, /* O - value of TFORMn keyword for each column */ char **tunit, /* O - value of TUNITn keyword for each column */ char *extnm, /* O - value of EXTNAME keyword, if any */ int *status) /* IO - error status */ /* Get keywords from the Header of the ASCII TaBle: Check that the keywords conform to the FITS standard and return the parameters which describe the table. */ { int ii, maxf, nfound, tstatus; long fields; char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; char xtension[FLEN_VALUE], message[81]; LONGLONG llnaxis1, llnaxis2, pcount; if (*status > 0) return(*status); /* read the first keyword of the extension */ ffgkyn(fptr, 1, name, value, comm, status); if (!strcmp(name, "XTENSION")) { if (ffc2s(value, xtension, status) > 0) /* get the value string */ { ffpmsg("Bad value string for XTENSION keyword:"); ffpmsg(value); return(*status); } /* allow the quoted string value to begin in any column and */ /* allow any number of trailing blanks before the closing quote */ if ( (value[0] != '\'') || /* first char must be a quote */ ( strcmp(xtension, "TABLE") ) ) { sprintf(message, "This is not a TABLE extension: %s", value); ffpmsg(message); return(*status = NOT_ATABLE); } } else /* error: 1st keyword of extension != XTENSION */ { sprintf(message, "First keyword of the extension is not XTENSION: %s", name); ffpmsg(message); return(*status = NO_XTENSION); } if (ffgttb(fptr, &llnaxis1, &llnaxis2, &pcount, &fields, status) > 0) return(*status); if (naxis1) *naxis1 = llnaxis1; if (naxis2) *naxis2 = llnaxis2; if (pcount != 0) { sprintf(message, "PCOUNT = %.0f is illegal in ASCII table; must = 0", (double) pcount); ffpmsg(message); return(*status = BAD_PCOUNT); } if (tfields) *tfields = fields; if (maxfield < 0) maxf = fields; else maxf = minvalue(maxfield, fields); if (maxf > 0) { for (ii = 0; ii < maxf; ii++) { /* initialize optional keyword values */ if (ttype) *ttype[ii] = '\0'; if (tunit) *tunit[ii] = '\0'; } if (ttype) ffgkns(fptr, "TTYPE", 1, maxf, ttype, &nfound, status); if (tunit) ffgkns(fptr, "TUNIT", 1, maxf, tunit, &nfound, status); if (*status > 0) return(*status); if (tbcol) { ffgknjj(fptr, "TBCOL", 1, maxf, tbcol, &nfound, status); if (*status > 0 || nfound != maxf) { ffpmsg( "Required TBCOL keyword(s) not found in ASCII table header (ffghtbll)."); return(*status = NO_TBCOL); } } if (tform) { ffgkns(fptr, "TFORM", 1, maxf, tform, &nfound, status); if (*status > 0 || nfound != maxf) { ffpmsg( "Required TFORM keyword(s) not found in ASCII table header (ffghtbll)."); return(*status = NO_TFORM); } } } if (extnm) { extnm[0] = '\0'; tstatus = *status; ffgkys(fptr, "EXTNAME", extnm, comm, status); if (*status == KEY_NO_EXIST) *status = tstatus; /* keyword not required, so ignore error */ } return(*status); } /*--------------------------------------------------------------------------*/ int ffghbn(fitsfile *fptr, /* I - FITS file pointer */ int maxfield, /* I - maximum no. of columns to read; */ long *naxis2, /* O - number of rows in the table */ int *tfields, /* O - number of columns in the table */ char **ttype, /* O - name of each column */ char **tform, /* O - TFORMn value for each column */ char **tunit, /* O - TUNITn value for each column */ char *extnm, /* O - value of EXTNAME keyword, if any */ long *pcount, /* O - value of PCOUNT keyword */ int *status) /* IO - error status */ /* Get keywords from the Header of the BiNary table: Check that the keywords conform to the FITS standard and return the parameters which describe the table. */ { int ii, maxf, nfound, tstatus; long fields; char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; char xtension[FLEN_VALUE], message[81]; LONGLONG naxis1ll, naxis2ll, pcountll; if (*status > 0) return(*status); /* read the first keyword of the extension */ ffgkyn(fptr, 1, name, value, comm, status); if (!strcmp(name, "XTENSION")) { if (ffc2s(value, xtension, status) > 0) /* get the value string */ { ffpmsg("Bad value string for XTENSION keyword:"); ffpmsg(value); return(*status); } /* allow the quoted string value to begin in any column and */ /* allow any number of trailing blanks before the closing quote */ if ( (value[0] != '\'') || /* first char must be a quote */ ( strcmp(xtension, "BINTABLE") && strcmp(xtension, "A3DTABLE") && strcmp(xtension, "3DTABLE") ) ) { sprintf(message, "This is not a BINTABLE extension: %s", value); ffpmsg(message); return(*status = NOT_BTABLE); } } else /* error: 1st keyword of extension != XTENSION */ { sprintf(message, "First keyword of the extension is not XTENSION: %s", name); ffpmsg(message); return(*status = NO_XTENSION); } if (ffgttb(fptr, &naxis1ll, &naxis2ll, &pcountll, &fields, status) > 0) return(*status); if (naxis2) *naxis2 = (long) naxis2ll; if (pcount) *pcount = (long) pcountll; if (tfields) *tfields = fields; if (maxfield < 0) maxf = fields; else maxf = minvalue(maxfield, fields); if (maxf > 0) { for (ii = 0; ii < maxf; ii++) { /* initialize optional keyword values */ if (ttype) *ttype[ii] = '\0'; if (tunit) *tunit[ii] = '\0'; } if (ttype) ffgkns(fptr, "TTYPE", 1, maxf, ttype, &nfound, status); if (tunit) ffgkns(fptr, "TUNIT", 1, maxf, tunit, &nfound, status); if (*status > 0) return(*status); if (tform) { ffgkns(fptr, "TFORM", 1, maxf, tform, &nfound, status); if (*status > 0 || nfound != maxf) { ffpmsg( "Required TFORM keyword(s) not found in binary table header (ffghbn)."); return(*status = NO_TFORM); } } } if (extnm) { extnm[0] = '\0'; tstatus = *status; ffgkys(fptr, "EXTNAME", extnm, comm, status); if (*status == KEY_NO_EXIST) *status = tstatus; /* keyword not required, so ignore error */ } return(*status); } /*--------------------------------------------------------------------------*/ int ffghbnll(fitsfile *fptr, /* I - FITS file pointer */ int maxfield, /* I - maximum no. of columns to read; */ LONGLONG *naxis2, /* O - number of rows in the table */ int *tfields, /* O - number of columns in the table */ char **ttype, /* O - name of each column */ char **tform, /* O - TFORMn value for each column */ char **tunit, /* O - TUNITn value for each column */ char *extnm, /* O - value of EXTNAME keyword, if any */ LONGLONG *pcount, /* O - value of PCOUNT keyword */ int *status) /* IO - error status */ /* Get keywords from the Header of the BiNary table: Check that the keywords conform to the FITS standard and return the parameters which describe the table. */ { int ii, maxf, nfound, tstatus; long fields; char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; char xtension[FLEN_VALUE], message[81]; LONGLONG naxis1ll, naxis2ll, pcountll; if (*status > 0) return(*status); /* read the first keyword of the extension */ ffgkyn(fptr, 1, name, value, comm, status); if (!strcmp(name, "XTENSION")) { if (ffc2s(value, xtension, status) > 0) /* get the value string */ { ffpmsg("Bad value string for XTENSION keyword:"); ffpmsg(value); return(*status); } /* allow the quoted string value to begin in any column and */ /* allow any number of trailing blanks before the closing quote */ if ( (value[0] != '\'') || /* first char must be a quote */ ( strcmp(xtension, "BINTABLE") && strcmp(xtension, "A3DTABLE") && strcmp(xtension, "3DTABLE") ) ) { sprintf(message, "This is not a BINTABLE extension: %s", value); ffpmsg(message); return(*status = NOT_BTABLE); } } else /* error: 1st keyword of extension != XTENSION */ { sprintf(message, "First keyword of the extension is not XTENSION: %s", name); ffpmsg(message); return(*status = NO_XTENSION); } if (ffgttb(fptr, &naxis1ll, &naxis2ll, &pcountll, &fields, status) > 0) return(*status); if (naxis2) *naxis2 = naxis2ll; if (pcount) *pcount = pcountll; if (tfields) *tfields = fields; if (maxfield < 0) maxf = fields; else maxf = minvalue(maxfield, fields); if (maxf > 0) { for (ii = 0; ii < maxf; ii++) { /* initialize optional keyword values */ if (ttype) *ttype[ii] = '\0'; if (tunit) *tunit[ii] = '\0'; } if (ttype) ffgkns(fptr, "TTYPE", 1, maxf, ttype, &nfound, status); if (tunit) ffgkns(fptr, "TUNIT", 1, maxf, tunit, &nfound, status); if (*status > 0) return(*status); if (tform) { ffgkns(fptr, "TFORM", 1, maxf, tform, &nfound, status); if (*status > 0 || nfound != maxf) { ffpmsg( "Required TFORM keyword(s) not found in binary table header (ffghbn)."); return(*status = NO_TFORM); } } } if (extnm) { extnm[0] = '\0'; tstatus = *status; ffgkys(fptr, "EXTNAME", extnm, comm, status); if (*status == KEY_NO_EXIST) *status = tstatus; /* keyword not required, so ignore error */ } return(*status); } /*--------------------------------------------------------------------------*/ int ffgphd(fitsfile *fptr, /* I - FITS file pointer */ int maxdim, /* I - maximum no. of dimensions to read; */ int *simple, /* O - does file conform to FITS standard? 1/0 */ int *bitpix, /* O - number of bits per data value pixel */ int *naxis, /* O - number of axes in the data array */ LONGLONG naxes[], /* O - length of each data axis */ long *pcount, /* O - number of group parameters (usually 0) */ long *gcount, /* O - number of random groups (usually 1 or 0) */ int *extend, /* O - may FITS file haave extensions? */ double *bscale, /* O - array pixel linear scaling factor */ double *bzero, /* O - array pixel linear scaling zero point */ LONGLONG *blank, /* O - value used to represent undefined pixels */ int *nspace, /* O - number of blank keywords prior to END */ int *status) /* IO - error status */ { /* Get the Primary HeaDer parameters. Check that the keywords conform to the FITS standard and return the parameters which determine the size and structure of the primary array or IMAGE extension. */ int unknown, found_end, tstatus, ii, nextkey, namelen; long longbitpix, longnaxis; LONGLONG axislen; char message[FLEN_ERRMSG], keyword[FLEN_KEYWORD]; char card[FLEN_CARD]; char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; char xtension[FLEN_VALUE]; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if (simple) *simple = 1; unknown = 0; /*--------------------------------------------------------------------*/ /* Get 1st keyword of HDU and test whether it is SIMPLE or XTENSION */ /*--------------------------------------------------------------------*/ ffgkyn(fptr, 1, name, value, comm, status); if ((fptr->Fptr)->curhdu == 0) /* Is this the beginning of the FITS file? */ { if (!strcmp(name, "SIMPLE")) { if (value[0] == 'F') { if (simple) *simple=0; /* not a simple FITS file */ } else if (value[0] != 'T') return(*status = BAD_SIMPLE); } else { sprintf(message, "First keyword of the file is not SIMPLE: %s", name); ffpmsg(message); return(*status = NO_SIMPLE); } } else /* not beginning of the file, so presumably an IMAGE extension */ { /* or it could be a compressed image in a binary table */ if (!strcmp(name, "XTENSION")) { if (ffc2s(value, xtension, status) > 0) /* get the value string */ { ffpmsg("Bad value string for XTENSION keyword:"); ffpmsg(value); return(*status); } /* allow the quoted string value to begin in any column and */ /* allow any number of trailing blanks before the closing quote */ if ( (value[0] != '\'') || /* first char must be a quote */ ( strcmp(xtension, "IMAGE") && strcmp(xtension, "IUEIMAGE") ) ) { unknown = 1; /* unknown type of extension; press on anyway */ sprintf(message, "This is not an IMAGE extension: %s", value); ffpmsg(message); } } else /* error: 1st keyword of extension != XTENSION */ { sprintf(message, "First keyword of the extension is not XTENSION: %s", name); ffpmsg(message); return(*status = NO_XTENSION); } } if (unknown && (fptr->Fptr)->compressimg) { /* this is a compressed image, so read ZBITPIX, ZNAXIS keywords */ unknown = 0; /* reset flag */ ffxmsg(3, message); /* clear previous spurious error message */ if (bitpix) { ffgidt(fptr, bitpix, status); /* get bitpix value */ if (*status > 0) { ffpmsg("Error reading BITPIX value of compressed image"); return(*status); } } if (naxis) { ffgidm(fptr, naxis, status); /* get NAXIS value */ if (*status > 0) { ffpmsg("Error reading NAXIS value of compressed image"); return(*status); } } if (naxes) { ffgiszll(fptr, maxdim, naxes, status); /* get NAXISn value */ if (*status > 0) { ffpmsg("Error reading NAXISn values of compressed image"); return(*status); } } nextkey = 9; /* skip required table keywords in the following search */ } else { /*----------------------------------------------------------------*/ /* Get 2nd keyword; test whether it is BITPIX with legal value */ /*----------------------------------------------------------------*/ ffgkyn(fptr, 2, name, value, comm, status); /* BITPIX = 2nd keyword */ if (strcmp(name, "BITPIX")) { sprintf(message, "Second keyword of the extension is not BITPIX: %s", name); ffpmsg(message); return(*status = NO_BITPIX); } if (ffc2ii(value, &longbitpix, status) > 0) { sprintf(message, "Value of BITPIX keyword is not an integer: %s", value); ffpmsg(message); return(*status = BAD_BITPIX); } else if (longbitpix != BYTE_IMG && longbitpix != SHORT_IMG && longbitpix != LONG_IMG && longbitpix != LONGLONG_IMG && longbitpix != FLOAT_IMG && longbitpix != DOUBLE_IMG) { sprintf(message, "Illegal value for BITPIX keyword: %s", value); ffpmsg(message); return(*status = BAD_BITPIX); } if (bitpix) *bitpix = longbitpix; /* do explicit type conversion */ /*---------------------------------------------------------------*/ /* Get 3rd keyword; test whether it is NAXIS with legal value */ /*---------------------------------------------------------------*/ ffgtkn(fptr, 3, "NAXIS", &longnaxis, status); if (*status == BAD_ORDER) return(*status = NO_NAXIS); else if (*status == NOT_POS_INT || longnaxis > 999) { sprintf(message,"NAXIS = %ld is illegal", longnaxis); ffpmsg(message); return(*status = BAD_NAXIS); } else if (naxis) *naxis = longnaxis; /* do explicit type conversion */ /*---------------------------------------------------------*/ /* Get the next NAXISn keywords and test for legal values */ /*---------------------------------------------------------*/ for (ii=0, nextkey=4; ii < longnaxis; ii++, nextkey++) { ffkeyn("NAXIS", ii+1, keyword, status); ffgtknjj(fptr, 4+ii, keyword, &axislen, status); if (*status == BAD_ORDER) return(*status = NO_NAXES); else if (*status == NOT_POS_INT) return(*status = BAD_NAXES); else if (ii < maxdim) if (naxes) naxes[ii] = axislen; } } /*---------------------------------------------------------*/ /* now look for other keywords of interest: */ /* BSCALE, BZERO, BLANK, PCOUNT, GCOUNT, EXTEND, and END */ /*---------------------------------------------------------*/ /* initialize default values in case keyword is not present */ if (bscale) *bscale = 1.0; if (bzero) *bzero = 0.0; if (pcount) *pcount = 0; if (gcount) *gcount = 1; if (extend) *extend = 0; if (blank) *blank = NULL_UNDEFINED; /* no default null value for BITPIX=8,16,32 */ *nspace = 0; found_end = 0; tstatus = *status; for (; !found_end; nextkey++) { /* get next keyword */ /* don't use ffgkyn here because it trys to parse the card to read */ /* the value string, thus failing to read the file just because of */ /* minor syntax errors in optional keywords. */ if (ffgrec(fptr, nextkey, card, status) > 0 ) /* get the 80-byte card */ { if (*status == KEY_OUT_BOUNDS) { found_end = 1; /* simply hit the end of the header */ *status = tstatus; /* reset error status */ } else { ffpmsg("Failed to find the END keyword in header (ffgphd)."); } } else /* got the next keyword without error */ { ffgknm(card, name, &namelen, status); /* get the keyword name */ if (fftrec(name, status) > 0) /* test keyword name; catches no END */ { sprintf(message, "Name of keyword no. %d contains illegal character(s): %s", nextkey, name); ffpmsg(message); if (nextkey % 36 == 0) /* test if at beginning of 36-card record */ ffpmsg(" (This may indicate a missing END keyword)."); } if (!strcmp(name, "BSCALE") && bscale) { *nspace = 0; /* reset count of blank keywords */ ffpsvc(card, value, comm, status); /* parse value and comment */ if (ffc2dd(value, bscale, status) > 0) /* convert to double */ { /* reset error status and continue, but still issue warning */ *status = tstatus; *bscale = 1.0; sprintf(message, "Error reading BSCALE keyword value as a double: %s", value); ffpmsg(message); } } else if (!strcmp(name, "BZERO") && bzero) { *nspace = 0; /* reset count of blank keywords */ ffpsvc(card, value, comm, status); /* parse value and comment */ if (ffc2dd(value, bzero, status) > 0) /* convert to double */ { /* reset error status and continue, but still issue warning */ *status = tstatus; *bzero = 0.0; sprintf(message, "Error reading BZERO keyword value as a double: %s", value); ffpmsg(message); } } else if (!strcmp(name, "BLANK") && blank) { *nspace = 0; /* reset count of blank keywords */ ffpsvc(card, value, comm, status); /* parse value and comment */ if (ffc2jj(value, blank, status) > 0) /* convert to LONGLONG */ { /* reset error status and continue, but still issue warning */ *status = tstatus; *blank = NULL_UNDEFINED; sprintf(message, "Error reading BLANK keyword value as an integer: %s", value); ffpmsg(message); } } else if (!strcmp(name, "PCOUNT") && pcount) { *nspace = 0; /* reset count of blank keywords */ ffpsvc(card, value, comm, status); /* parse value and comment */ if (ffc2ii(value, pcount, status) > 0) /* convert to long */ { sprintf(message, "Error reading PCOUNT keyword value as an integer: %s", value); ffpmsg(message); } } else if (!strcmp(name, "GCOUNT") && gcount) { *nspace = 0; /* reset count of blank keywords */ ffpsvc(card, value, comm, status); /* parse value and comment */ if (ffc2ii(value, gcount, status) > 0) /* convert to long */ { sprintf(message, "Error reading GCOUNT keyword value as an integer: %s", value); ffpmsg(message); } } else if (!strcmp(name, "EXTEND") && extend) { *nspace = 0; /* reset count of blank keywords */ ffpsvc(card, value, comm, status); /* parse value and comment */ if (ffc2ll(value, extend, status) > 0) /* convert to logical */ { /* reset error status and continue, but still issue warning */ *status = tstatus; *extend = 0; sprintf(message, "Error reading EXTEND keyword value as a logical: %s", value); ffpmsg(message); } } else if (!strcmp(name, "END")) found_end = 1; else if (!card[0] ) *nspace = *nspace + 1; /* this is a blank card in the header */ else *nspace = 0; /* reset count of blank keywords immediately before the END keyword to zero */ } if (*status > 0) /* exit on error after writing error message */ { if ((fptr->Fptr)->curhdu == 0) ffpmsg( "Failed to read the required primary array header keywords."); else ffpmsg( "Failed to read the required image extension header keywords."); return(*status); } } if (unknown) *status = NOT_IMAGE; return(*status); } /*--------------------------------------------------------------------------*/ int ffgttb(fitsfile *fptr, /* I - FITS file pointer*/ LONGLONG *rowlen, /* O - length of a table row, in bytes */ LONGLONG *nrows, /* O - number of rows in the table */ LONGLONG *pcount, /* O - value of PCOUNT keyword */ long *tfields, /* O - number of fields in the table */ int *status) /* IO - error status */ { /* Get and Test TaBle; Test that this is a legal ASCII or binary table and get some keyword values. We assume that the calling routine has already tested the 1st keyword of the extension to ensure that this is really a table extension. */ if (*status > 0) return(*status); if (fftkyn(fptr, 2, "BITPIX", "8", status) == BAD_ORDER) /* 2nd keyword */ return(*status = NO_BITPIX); /* keyword not BITPIX */ else if (*status == NOT_POS_INT) return(*status = BAD_BITPIX); /* value != 8 */ if (fftkyn(fptr, 3, "NAXIS", "2", status) == BAD_ORDER) /* 3rd keyword */ return(*status = NO_NAXIS); /* keyword not NAXIS */ else if (*status == NOT_POS_INT) return(*status = BAD_NAXIS); /* value != 2 */ if (ffgtknjj(fptr, 4, "NAXIS1", rowlen, status) == BAD_ORDER) /* 4th key */ return(*status = NO_NAXES); /* keyword not NAXIS1 */ else if (*status == NOT_POS_INT) return(*status == BAD_NAXES); /* bad NAXIS1 value */ if (ffgtknjj(fptr, 5, "NAXIS2", nrows, status) == BAD_ORDER) /* 5th key */ return(*status = NO_NAXES); /* keyword not NAXIS2 */ else if (*status == NOT_POS_INT) return(*status == BAD_NAXES); /* bad NAXIS2 value */ if (ffgtknjj(fptr, 6, "PCOUNT", pcount, status) == BAD_ORDER) /* 6th key */ return(*status = NO_PCOUNT); /* keyword not PCOUNT */ else if (*status == NOT_POS_INT) return(*status = BAD_PCOUNT); /* bad PCOUNT value */ if (fftkyn(fptr, 7, "GCOUNT", "1", status) == BAD_ORDER) /* 7th keyword */ return(*status = NO_GCOUNT); /* keyword not GCOUNT */ else if (*status == NOT_POS_INT) return(*status = BAD_GCOUNT); /* value != 1 */ if (ffgtkn(fptr, 8, "TFIELDS", tfields, status) == BAD_ORDER) /* 8th key*/ return(*status = NO_TFIELDS); /* keyword not TFIELDS */ else if (*status == NOT_POS_INT || *tfields > 999) return(*status == BAD_TFIELDS); /* bad TFIELDS value */ if (*status > 0) ffpmsg( "Error reading required keywords in the table header (FTGTTB)."); return(*status); } /*--------------------------------------------------------------------------*/ int ffgtkn(fitsfile *fptr, /* I - FITS file pointer */ int numkey, /* I - number of the keyword to read */ char *name, /* I - expected name of the keyword */ long *value, /* O - integer value of the keyword */ int *status) /* IO - error status */ { /* test that keyword number NUMKEY has the expected name and get the integer value of the keyword. Return an error if the keyword name does not match the input name, or if the value of the keyword is not a positive integer. */ char keyname[FLEN_KEYWORD], valuestring[FLEN_VALUE]; char comm[FLEN_COMMENT], message[FLEN_ERRMSG]; if (*status > 0) return(*status); keyname[0] = '\0'; valuestring[0] = '\0'; if (ffgkyn(fptr, numkey, keyname, valuestring, comm, status) <= 0) { if (strcmp(keyname, name) ) *status = BAD_ORDER; /* incorrect keyword name */ else { ffc2ii(valuestring, value, status); /* convert to integer */ if (*status > 0 || *value < 0 ) *status = NOT_POS_INT; } if (*status > 0) { sprintf(message, "ffgtkn found unexpected keyword or value for keyword no. %d.", numkey); ffpmsg(message); sprintf(message, " Expected positive integer keyword %s, but instead", name); ffpmsg(message); sprintf(message, " found keyword %s with value %s", keyname, valuestring); ffpmsg(message); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgtknjj(fitsfile *fptr, /* I - FITS file pointer */ int numkey, /* I - number of the keyword to read */ char *name, /* I - expected name of the keyword */ LONGLONG *value, /* O - integer value of the keyword */ int *status) /* IO - error status */ { /* test that keyword number NUMKEY has the expected name and get the integer value of the keyword. Return an error if the keyword name does not match the input name, or if the value of the keyword is not a positive integer. */ char keyname[FLEN_KEYWORD], valuestring[FLEN_VALUE]; char comm[FLEN_COMMENT], message[FLEN_ERRMSG]; if (*status > 0) return(*status); keyname[0] = '\0'; valuestring[0] = '\0'; if (ffgkyn(fptr, numkey, keyname, valuestring, comm, status) <= 0) { if (strcmp(keyname, name) ) *status = BAD_ORDER; /* incorrect keyword name */ else { ffc2jj(valuestring, value, status); /* convert to integer */ if (*status > 0 || *value < 0 ) *status = NOT_POS_INT; } if (*status > 0) { sprintf(message, "ffgtknjj found unexpected keyword or value for keyword no. %d.", numkey); ffpmsg(message); sprintf(message, " Expected positive integer keyword %s, but instead", name); ffpmsg(message); sprintf(message, " found keyword %s with value %s", keyname, valuestring); ffpmsg(message); } } return(*status); } /*--------------------------------------------------------------------------*/ int fftkyn(fitsfile *fptr, /* I - FITS file pointer */ int numkey, /* I - number of the keyword to read */ char *name, /* I - expected name of the keyword */ char *value, /* I - expected value of the keyword */ int *status) /* IO - error status */ { /* test that keyword number NUMKEY has the expected name and the expected value string. */ char keyname[FLEN_KEYWORD], valuestring[FLEN_VALUE]; char comm[FLEN_COMMENT], message[FLEN_ERRMSG]; if (*status > 0) return(*status); keyname[0] = '\0'; valuestring[0] = '\0'; if (ffgkyn(fptr, numkey, keyname, valuestring, comm, status) <= 0) { if (strcmp(keyname, name) ) *status = BAD_ORDER; /* incorrect keyword name */ if (strcmp(value, valuestring) ) *status = NOT_POS_INT; /* incorrect keyword value */ } if (*status > 0) { sprintf(message, "fftkyn found unexpected keyword or value for keyword no. %d.", numkey); ffpmsg(message); sprintf(message, " Expected keyword %s with value %s, but", name, value); ffpmsg(message); sprintf(message, " found keyword %s with value %s", keyname, valuestring); ffpmsg(message); } return(*status); } /*--------------------------------------------------------------------------*/ int ffh2st(fitsfile *fptr, /* I - FITS file pointer */ char **header, /* O - returned header string */ int *status) /* IO - error status */ /* read header keywords into a long string of chars. This routine allocates memory for the string, so the calling routine must eventually free the memory when it is not needed any more. */ { int nkeys; long nrec; LONGLONG headstart; if (*status > 0) return(*status); /* get number of keywords in the header (doesn't include END) */ if (ffghsp(fptr, &nkeys, NULL, status) > 0) return(*status); nrec = (nkeys / 36 + 1); /* allocate memory for all the keywords (multiple of 2880 bytes) */ *header = (char *) calloc ( nrec * 2880 + 1, 1); if (!(*header)) { *status = MEMORY_ALLOCATION; ffpmsg("failed to allocate memory to hold all the header keywords"); return(*status); } ffghadll(fptr, &headstart, NULL, NULL, status); /* get header address */ ffmbyt(fptr, headstart, REPORT_EOF, status); /* move to header */ ffgbyt(fptr, nrec * 2880, *header, status); /* copy header */ *(*header + (nrec * 2880)) = '\0'; return(*status); } /*--------------------------------------------------------------------------*/ int ffhdr2str( fitsfile *fptr, /* I - FITS file pointer */ int exclude_comm, /* I - if TRUE, exclude commentary keywords */ char **exclist, /* I - list of excluded keyword names */ int nexc, /* I - number of names in exclist */ char **header, /* O - returned header string */ int *nkeys, /* O - returned number of 80-char keywords */ int *status) /* IO - error status */ /* read header keywords into a long string of chars. This routine allocates memory for the string, so the calling routine must eventually free the memory when it is not needed any more. If exclude_comm is TRUE, then all the COMMENT, HISTORY, and keywords will be excluded from the output string of keywords. Any other list of keywords to be excluded may be specified with the exclist parameter. */ { int casesn, match, exact, totkeys; long ii, jj; char keybuf[162], keyname[FLEN_KEYWORD], *headptr; *nkeys = 0; if (*status > 0) return(*status); /* get number of keywords in the header (doesn't include END) */ if (ffghsp(fptr, &totkeys, NULL, status) > 0) return(*status); /* allocate memory for all the keywords */ /* (will reallocate it later to minimize the memory size) */ *header = (char *) calloc ( (totkeys + 1) * 80 + 1, 1); if (!(*header)) { *status = MEMORY_ALLOCATION; ffpmsg("failed to allocate memory to hold all the header keywords"); return(*status); } headptr = *header; casesn = FALSE; /* read every keyword */ for (ii = 1; ii <= totkeys; ii++) { ffgrec(fptr, ii, keybuf, status); /* pad record with blanks so that it is at least 80 chars long */ strcat(keybuf, " "); keyname[0] = '\0'; strncat(keyname, keybuf, 8); /* copy the keyword name */ if (exclude_comm) { if (!FSTRCMP("COMMENT ", keyname) || !FSTRCMP("HISTORY ", keyname) || !FSTRCMP(" ", keyname) ) continue; /* skip this commentary keyword */ } /* does keyword match any names in the exclusion list? */ for (jj = 0; jj < nexc; jj++ ) { ffcmps(exclist[jj], keyname, casesn, &match, &exact); if (match) break; } if (jj == nexc) { /* not in exclusion list, add this keyword to the string */ strcpy(headptr, keybuf); headptr += 80; (*nkeys)++; } } /* add the END keyword */ strcpy(headptr, "END "); headptr += 80; (*nkeys)++; *headptr = '\0'; /* terminate the header string */ /* minimize the allocated memory */ *header = (char *) realloc(*header, (*nkeys *80) + 1); return(*status); } /*--------------------------------------------------------------------------*/ int ffcnvthdr2str( fitsfile *fptr, /* I - FITS file pointer */ int exclude_comm, /* I - if TRUE, exclude commentary keywords */ char **exclist, /* I - list of excluded keyword names */ int nexc, /* I - number of names in exclist */ char **header, /* O - returned header string */ int *nkeys, /* O - returned number of 80-char keywords */ int *status) /* IO - error status */ /* Same as ffhdr2str, except that if the input HDU is a tile compressed image (stored in a binary table) then it will first convert that header back to that of a normal uncompressed FITS image before concatenating the header keyword records. */ { fitsfile *tempfptr; if (*status > 0) return(*status); if (fits_is_compressed_image(fptr, status) ) { /* this is a tile compressed image, so need to make an uncompressed */ /* copy of the image header in memory before concatenating the keywords */ if (fits_create_file(&tempfptr, "mem://", status) > 0) { return(*status); } if (fits_img_decompress_header(fptr, tempfptr, status) > 0) { fits_delete_file(tempfptr, status); return(*status); } ffhdr2str(tempfptr, exclude_comm, exclist, nexc, header, nkeys, status); fits_close_file(tempfptr, status); } else { ffhdr2str(fptr, exclude_comm, exclist, nexc, header, nkeys, status); } return(*status); } astropy-1.1.1/cextern/cfitsio/eval_tab.h0000644001134200020070000000154712602615517021171 0ustar embrayscience00000000000000typedef union { int Node; /* Index of Node */ double dbl; /* real value */ long lng; /* integer value */ char log; /* logical value */ char str[MAX_STRLEN]; /* string value */ } FFSTYPE; #define BOOLEAN 258 #define LONG 259 #define DOUBLE 260 #define STRING 261 #define BITSTR 262 #define FUNCTION 263 #define BFUNCTION 264 #define IFUNCTION 265 #define GTIFILTER 266 #define REGFILTER 267 #define COLUMN 268 #define BCOLUMN 269 #define SCOLUMN 270 #define BITCOL 271 #define ROWREF 272 #define NULLREF 273 #define SNULLREF 274 #define OR 275 #define AND 276 #define EQ 277 #define NE 278 #define GT 279 #define LT 280 #define LTE 281 #define GTE 282 #define POWER 283 #define NOT 284 #define INTCAST 285 #define FLTCAST 286 #define UMINUS 287 #define ACCUM 288 #define DIFF 289 extern FFSTYPE fflval; astropy-1.1.1/cextern/cfitsio/getcoluj.c0000644001134200020070000021643712602615520021223 0ustar embrayscience00000000000000/* This file, getcoluj.c, contains routines that read data elements from */ /* a FITS image or table, with unsigned long data type. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffgpvuj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned long nulval, /* I - value for undefined pixels */ unsigned long *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; char cdummy; int nullcheck = 1; unsigned long nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_read_compressed_pixels(fptr, TULONG, firstelem, nelem, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcluj(fptr, 2, row, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgpfuj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned long *array, /* O - array of values that are returned */ char *nularray, /* O - array of null pixel flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any undefined pixels in the returned array will be set = 0 and the corresponding nularray value will be set = 1. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; int nullcheck = 2; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_read_compressed_pixels(fptr, TULONG, firstelem, nelem, nullcheck, NULL, array, nularray, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcluj(fptr, 2, row, firstelem, nelem, 1, 2, 0L, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg2duj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ unsigned long nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ unsigned long *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { /* call the 3D reading routine, with the 3rd dimension = 1 */ ffg3duj(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg3duj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ unsigned long nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ unsigned long *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 3-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { long tablerow, ii, jj; char cdummy; int nullcheck = 1; long inc[] = {1,1,1}; LONGLONG fpixel[] = {1,1,1}, nfits, narray; LONGLONG lpixel[3]; unsigned long nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = ncols; lpixel[1] = nrows; lpixel[2] = naxis3; nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TULONG, fpixel, lpixel, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so read all at once */ ffgcluj(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to read */ narray = 0; /* next pixel in output array to be filled */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* reading naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffgcluj(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, &array[narray], &cdummy, anynul, status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsvuj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ unsigned long nulval, /* I - value to set undefined pixels */ unsigned long *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9]; long nelem, nultyp, ninc, numcol; LONGLONG felem, dsize[10], blcll[9], trcll[9]; int hdutype, anyf; char ldummy, msg[FLEN_ERRMSG]; int nullcheck = 1; unsigned long nullvalue; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvuj is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TULONG, blcll, trcll, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 1; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsvuj: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgcluj(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &ldummy, &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsfuj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ unsigned long *array, /* O - array to be filled and returned */ char *flagval, /* O - set to 1 if corresponding value is null */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dsize[10]; LONGLONG blcll[9], trcll[9]; long felem, nelem, nultyp, ninc, numcol; unsigned long nulval = 0; int hdutype, anyf; char msg[FLEN_ERRMSG]; int nullcheck = 2; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvj is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } fits_read_compressed_img(fptr, TULONG, blcll, trcll, inc, nullcheck, NULL, array, flagval, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 2; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsvj: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgcluj(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &flagval[i0], &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffggpuj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ long firstelem, /* I - first vector element to read (1 = 1st) */ long nelem, /* I - number of values to read */ unsigned long *array, /* O - array of values that are returned */ int *status) /* IO - error status */ /* Read an array of group parameters from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). */ { long row; int idummy; char cdummy; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcluj(fptr, 1, row, firstelem, nelem, 1, 1, 0L, array, &cdummy, &idummy, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcvuj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned long nulval, /* I - value for null pixels */ unsigned long *array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. */ { char cdummy; ffgcluj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfuj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned long *array, /* O - array of values that are read */ char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. */ { unsigned long dummy = 0; ffgcluj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcluj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long elemincre, /* I - pixel increment; e.g., 2 = every other */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ unsigned long nulval, /* I - value for null pixels if nultyp = 1 */ unsigned long *array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer be a virtual column in a 1 or more grouped FITS primary array or image extension. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The output array of values will be converted from the datatype of the column and will be scaled by the FITS TSCALn and TZEROn values if necessary. */ { double scale, zero, power = 1., dtemp; int tcode, maxelem2, hdutype, xcode, decimals; long twidth, incre; long ii, xwidth, ntodo; int nulcheck; LONGLONG repeat, startpos, elemnum, readptr, tnull; LONGLONG rowlen, rownum, remain, next, rowincre, maxelem; char tform[20]; char message[81]; char snull[20]; /* the FITS null value if reading from ASCII table */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; if (anynul) *anynul = 0; if (nultyp == 2) memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 0, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) return(*status); maxelem = maxelem2; incre *= elemincre; /* multiply incre to just get every nth pixel */ if (tcode == TSTRING) /* setup for ASCII tables */ { /* get the number of implied decimal places if no explicit decmal point */ ffasfm(tform, &xcode, &xwidth, &decimals, status); for(ii = 0; ii < decimals; ii++) power *= 10.; } /*------------------------------------------------------------------*/ /* Decide whether to check for null values in the input FITS file: */ /*------------------------------------------------------------------*/ nulcheck = nultyp; /* by default check for null values in the FITS file */ if (nultyp == 1 && nulval == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ else if (tcode%10 == 1 && /* if reading an integer column, and */ tnull == NULL_UNDEFINED) /* if a null value is not defined, */ nulcheck = 0; /* then do not check for null values. */ else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) nulcheck = 0; /*----------------------------------------------------------------------*/ /* If FITS column and output data array have same datatype, then we do */ /* not need to use a temporary buffer to store intermediate datatype. */ /*----------------------------------------------------------------------*/ if (tcode == TLONG) /* Special Case: */ { /* no type convertion required, so read */ maxelem = nelem; /* data directly into output buffer. */ } /*---------------------------------------------------------------------*/ /* Now read the pixels from the FITS column. If the column does not */ /* have the same datatype as the output array, then we have to read */ /* the raw values into a temporary buffer (of limited size). In */ /* the case of a vector colum read only 1 vector of values at a time */ /* then skip to the next row if more values need to be read. */ /* After reading the raw values, then call the fffXXYY routine to (1) */ /* test for undefined values, (2) convert the datatype if necessary, */ /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ /* scaling parameters. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to read */ next = 0; /* next element in array to be read */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to read at one time to the number that will fit in the buffer or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); switch (tcode) { case (TLONG): ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) &array[next], status); fffi4u4((INT32BIT *) &array[next], ntodo, scale, zero, nulcheck, (INT32BIT) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONGLONG): ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); fffi8u4( (LONGLONG *) buffer, ntodo, scale, zero, nulcheck, tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TBYTE): ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, status); fffi1u4((unsigned char *) buffer, ntodo, scale, zero, nulcheck, (unsigned char) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TSHORT): ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); fffi2u4((short *) buffer, ntodo, scale, zero, nulcheck, (short) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TFLOAT): ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); fffr4u4((float *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TDOUBLE): ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); fffr8u4((double *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TSTRING): ffmbyt(fptr, readptr, REPORT_EOF, status); if (incre == twidth) /* contiguous bytes */ ffgbyt(fptr, ntodo * twidth, buffer, status); else ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); fffstru4((char *) buffer, ntodo, scale, zero, twidth, power, nulcheck, snull, nulval, &nularray[next], anynul, &array[next], status); break; default: /* error trap for invalid column format */ sprintf(message, "Cannot read numbers from column %d which has format %s", colnum, tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous read operation */ { dtemp = (double) next; if (hdutype > 0) sprintf(message, "Error reading elements %.0f thru %.0f from column %d (ffgcluj).", dtemp+1., dtemp+ntodo, colnum); else sprintf(message, "Error reading elements %.0f thru %.0f from image (ffgcluj).", dtemp+1., dtemp+ntodo); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum = elemnum + (ntodo * elemincre); if (elemnum >= repeat) /* completed a row; start on later row */ { rowincre = elemnum / repeat; rownum += rowincre; elemnum = elemnum - (rowincre * repeat); } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while reading FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int fffi1u4(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (unsigned long) input[ii]; /* copy input */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (unsigned long) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi2u4(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else output[ii] = (unsigned long) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else output[ii] = (unsigned long) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi4u4(INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; Process the array of data in reverse order, to handle the case where the input data is 4-bytes and the output is 8-bytes and the conversion is being done in place in the same array. */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 2147483648.) { /* Instead of adding 2147483648, it is more efficient */ /* to just flip the sign bit with the XOR operator */ for (ii = ntodo - 1; ii >= 0; ii--) output[ii] = ( *(unsigned int *) &input[ii] ) ^ 0x80000000; } else if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = ntodo - 1; ii >= 0; ii--) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else output[ii] = (unsigned long) input[ii]; /* copy input */ } } else /* must scale the data */ { for (ii = ntodo - 1; ii >= 0; ii--) { dvalue = input[ii] * scale + zero; if (dvalue < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 2147483648.) { for (ii = ntodo - 1; ii >= 0; ii--) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = ( *(unsigned int *) &input[ii] ) ^ 0x80000000; } } else if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = ntodo - 1; ii >= 0; ii--) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else output[ii] = (unsigned long) input[ii]; /* copy input */ } } else /* must scale the data */ { for (ii = ntodo - 1; ii >= 0; ii--) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi8u4(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > ULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > ULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr4u4(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr++; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (zero > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr8u4(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr += 3; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (zero > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffstru4(char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ long twidth, /* I - width of each substring of chars */ double implipower, /* I - power of 10 of implied decimal */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ char *snull, /* I - value of FITS null string, if any */ unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned long *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to snull. If nullcheck= 0, then no special checking for nulls is performed. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { int nullen; long ii; double dvalue; char *cstring, message[81]; char *cptr, *tpos; char tempstore, chrzero = '0'; double val, power; int exponent, sign, esign, decpt; nullen = strlen(snull); cptr = input; /* pointer to start of input string */ for (ii = 0; ii < ntodo; ii++) { cstring = cptr; /* temporarily insert a null terminator at end of the string */ tpos = cptr + twidth; tempstore = *tpos; *tpos = 0; /* check if null value is defined, and if the */ /* column string is identical to the null string */ if (snull[0] != ASCII_NULL_UNDEFINED && !strncmp(snull, cptr, nullen) ) { if (nullcheck) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } cptr += twidth; } else { /* value is not the null value, so decode it */ /* remove any embedded blank characters from the string */ decpt = 0; sign = 1; val = 0.; power = 1.; exponent = 0; esign = 1; while (*cptr == ' ') /* skip leading blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for leading sign */ { if (*cptr == '-') sign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and value */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } if (*cptr == '.' || *cptr == ',') /* check for decimal point */ { decpt = 1; /* set flag to show there was a decimal point */ cptr++; while (*cptr == ' ') /* skip any blanks */ cptr++; while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ power = power * 10.; cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } } if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ { cptr++; while (*cptr == ' ') /* skip blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ { if (*cptr == '-') esign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and exp */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ cptr++; while (*cptr == ' ') /* skip embedded blanks */ cptr++; } } if (*cptr != 0) /* should end up at the null terminator */ { sprintf(message, "Cannot read number from ASCII table"); ffpmsg(message); sprintf(message, "Column field = %s.", cstring); ffpmsg(message); /* restore the char that was overwritten by the null */ *tpos = tempstore; return(*status = BAD_C2D); } if (!decpt) /* if no explicit decimal, use implied */ power = implipower; dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); dvalue = dvalue * scale + zero; /* apply the scaling */ if (dvalue < DULONG_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DULONG_MAX) { *status = OVERFLOW_ERR; output[ii] = ULONG_MAX; } else output[ii] = (unsigned long) dvalue; } /* restore the char that was overwritten by the null */ *tpos = tempstore; } return(*status); } astropy-1.1.1/cextern/cfitsio/quantize.c0000644001134200020070000034726012602615520021246 0ustar embrayscience00000000000000/* The following code is based on algorithms written by Richard White at STScI and made available for use in CFITSIO in July 1999 and updated in January 2008. */ # include # include # include # include # include #include "fitsio2.h" /* nearest integer function */ # define NINT(x) ((x >= 0.) ? (int) (x + 0.5) : (int) (x - 0.5)) #define NULL_VALUE -2147483647 /* value used to represent undefined pixels */ #define ZERO_VALUE -2147483646 /* value used to represent zero-valued pixels */ #define N_RESERVED_VALUES 10 /* number of reserved values, starting with */ /* and including NULL_VALUE. These values */ /* may not be used to represent the quantized */ /* and scaled floating point pixel values */ /* If lossy Hcompression is used, and the */ /* array contains null values, then it is also */ /* possible for the compressed values to slightly */ /* exceed the range of the actual (lossless) values */ /* so we must reserve a little more space */ /* more than this many standard deviations from the mean is an outlier */ # define SIGMA_CLIP 5. # define NITER 3 /* number of sigma-clipping iterations */ static int FnMeanSigma_short(short *array, long npix, int nullcheck, short nullvalue, long *ngoodpix, double *mean, double *sigma, int *status); static int FnMeanSigma_int(int *array, long npix, int nullcheck, int nullvalue, long *ngoodpix, double *mean, double *sigma, int *status); static int FnMeanSigma_float(float *array, long npix, int nullcheck, float nullvalue, long *ngoodpix, double *mean, double *sigma, int *status); static int FnMeanSigma_double(double *array, long npix, int nullcheck, double nullvalue, long *ngoodpix, double *mean, double *sigma, int *status); static int FnNoise5_short(short *array, long nx, long ny, int nullcheck, short nullvalue, long *ngood, short *minval, short *maxval, double *n2, double *n3, double *n5, int *status); static int FnNoise5_int(int *array, long nx, long ny, int nullcheck, int nullvalue, long *ngood, int *minval, int *maxval, double *n2, double *n3, double *n5, int *status); static int FnNoise5_float(float *array, long nx, long ny, int nullcheck, float nullvalue, long *ngood, float *minval, float *maxval, double *n2, double *n3, double *n5, int *status); static int FnNoise5_double(double *array, long nx, long ny, int nullcheck, double nullvalue, long *ngood, double *minval, double *maxval, double *n2, double *n3, double *n5, int *status); static int FnNoise3_short(short *array, long nx, long ny, int nullcheck, short nullvalue, long *ngood, short *minval, short *maxval, double *noise, int *status); static int FnNoise3_int(int *array, long nx, long ny, int nullcheck, int nullvalue, long *ngood, int *minval, int *maxval, double *noise, int *status); static int FnNoise3_float(float *array, long nx, long ny, int nullcheck, float nullvalue, long *ngood, float *minval, float *maxval, double *noise, int *status); static int FnNoise3_double(double *array, long nx, long ny, int nullcheck, double nullvalue, long *ngood, double *minval, double *maxval, double *noise, int *status); static int FnNoise1_short(short *array, long nx, long ny, int nullcheck, short nullvalue, double *noise, int *status); static int FnNoise1_int(int *array, long nx, long ny, int nullcheck, int nullvalue, double *noise, int *status); static int FnNoise1_float(float *array, long nx, long ny, int nullcheck, float nullvalue, double *noise, int *status); static int FnNoise1_double(double *array, long nx, long ny, int nullcheck, double nullvalue, double *noise, int *status); static int FnCompare_short (const void *, const void *); static int FnCompare_int (const void *, const void *); static int FnCompare_float (const void *, const void *); static int FnCompare_double (const void *, const void *); static float quick_select_float(float arr[], int n); static short quick_select_short(short arr[], int n); static int quick_select_int(int arr[], int n); static LONGLONG quick_select_longlong(LONGLONG arr[], int n); static double quick_select_double(double arr[], int n); /*---------------------------------------------------------------------------*/ int fits_quantize_float (long row, float fdata[], long nxpix, long nypix, int nullcheck, float in_null_value, float qlevel, int dither_method, int idata[], double *bscale, double *bzero, int *iminval, int *imaxval) { /* arguments: long row i: if positive, used to calculate random dithering seed value (this is only used when dithering the quantized values) float fdata[] i: array of image pixels to be compressed long nxpix i: number of pixels in each row of fdata long nypix i: number of rows in fdata nullcheck i: check for nullvalues in fdata? float in_null_value i: value used to represent undefined pixels in fdata float qlevel i: quantization level int dither_method i; which dithering method to use int idata[] o: values of fdata after applying bzero and bscale double bscale o: scale factor double bzero o: zero offset int iminval o: minimum quantized value that is returned int imaxval o: maximum quantized value that is returned The function value will be one if the input fdata were copied to idata; in this case the parameters bscale and bzero can be used to convert back to nearly the original floating point values: fdata ~= idata * bscale + bzero. If the function value is zero, the data were not copied to idata. */ int status, anynulls = 0, iseed; long i, nx, ngood = 0; double stdev, noise2, noise3, noise5; /* MAD 2nd, 3rd, and 5th order noise values */ float minval = 0., maxval = 0.; /* min & max of fdata */ double delta; /* bscale, 1 in idata = delta in fdata */ double zeropt; /* bzero */ double temp; int nextrand = 0; extern float *fits_rand_value; /* this is defined in imcompress.c */ LONGLONG iqfactor; nx = nxpix * nypix; if (nx <= 1) { *bscale = 1.; *bzero = 0.; return (0); } if (qlevel >= 0.) { /* estimate background noise using MAD pixel differences */ FnNoise5_float(fdata, nxpix, nypix, nullcheck, in_null_value, &ngood, &minval, &maxval, &noise2, &noise3, &noise5, &status); if (nullcheck && ngood == 0) { /* special case of an image filled with Nulls */ /* set parameters to dummy values, which are not used */ minval = 0.; maxval = 1.; stdev = 1; } else { /* use the minimum of noise2, noise3, and noise5 as the best noise value */ stdev = noise3; if (noise2 != 0. && noise2 < stdev) stdev = noise2; if (noise5 != 0. && noise5 < stdev) stdev = noise5; } if (qlevel == 0.) delta = stdev / 4.; /* default quantization */ else delta = stdev / qlevel; if (delta == 0.) return (0); /* don't quantize */ } else { /* negative value represents the absolute quantization level */ delta = -qlevel; /* only nned to calculate the min and max values */ FnNoise3_float(fdata, nxpix, nypix, nullcheck, in_null_value, &ngood, &minval, &maxval, 0, &status); } /* check that the range of quantized levels is not > range of int */ if ((maxval - minval) / delta > 2. * 2147483647. - N_RESERVED_VALUES ) return (0); /* don't quantize */ if (row > 0) { /* we need to dither the quantized values */ if (!fits_rand_value) if (fits_init_randoms()) return(MEMORY_ALLOCATION); /* initialize the index to the next random number in the list */ iseed = (int) ((row - 1) % N_RANDOM); nextrand = (int) (fits_rand_value[iseed] * 500.); } if (ngood == nx) { /* don't have to check for nulls */ /* return all positive values, if possible since some */ /* compression algorithms either only work for positive integers, */ /* or are more efficient. */ if (dither_method == SUBTRACTIVE_DITHER_2) { /* shift the range to be close to the value used to represent zeros */ zeropt = minval - delta * (NULL_VALUE + N_RESERVED_VALUES); } else if ((maxval - minval) / delta < 2147483647. - N_RESERVED_VALUES ) { zeropt = minval; /* fudge the zero point so it is an integer multiple of delta */ /* This helps to ensure the same scaling will be performed if the */ /* file undergoes multiple fpack/funpack cycles */ iqfactor = (LONGLONG) (zeropt/delta + 0.5); zeropt = iqfactor * delta; } else { /* center the quantized levels around zero */ zeropt = (minval + maxval) / 2.; } if (row > 0) { /* dither the values when quantizing */ for (i = 0; i < nx; i++) { if (dither_method == SUBTRACTIVE_DITHER_2 && fdata[i] == 0.0) { idata[i] = ZERO_VALUE; } else { idata[i] = NINT((((double) fdata[i] - zeropt) / delta) + fits_rand_value[nextrand] - 0.5); } nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } else { /* do not dither the values */ for (i = 0; i < nx; i++) { idata[i] = NINT ((fdata[i] - zeropt) / delta); } } } else { /* data contains null values; shift the range to be */ /* close to the value used to represent null values */ zeropt = minval - delta * (NULL_VALUE + N_RESERVED_VALUES); if (row > 0) { /* dither the values */ for (i = 0; i < nx; i++) { if (fdata[i] != in_null_value) { if (dither_method == SUBTRACTIVE_DITHER_2 && fdata[i] == 0.0) { idata[i] = ZERO_VALUE; } else { idata[i] = NINT((((double) fdata[i] - zeropt) / delta) + fits_rand_value[nextrand] - 0.5); } } else { idata[i] = NULL_VALUE; } /* increment the random number index, regardless */ nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } else { /* do not dither the values */ for (i = 0; i < nx; i++) { if (fdata[i] != in_null_value) { idata[i] = NINT((fdata[i] - zeropt) / delta); } else { idata[i] = NULL_VALUE; } } } } /* calc min and max values */ temp = (minval - zeropt) / delta; *iminval = NINT (temp); temp = (maxval - zeropt) / delta; *imaxval = NINT (temp); *bscale = delta; *bzero = zeropt; return (1); /* yes, data have been quantized */ } /*---------------------------------------------------------------------------*/ int fits_quantize_double (long row, double fdata[], long nxpix, long nypix, int nullcheck, double in_null_value, float qlevel, int dither_method, int idata[], double *bscale, double *bzero, int *iminval, int *imaxval) { /* arguments: long row i: tile number = row number in the binary table double fdata[] i: array of image pixels to be compressed long nxpix i: number of pixels in each row of fdata long nypix i: number of rows in fdata nullcheck i: check for nullvalues in fdata? double in_null_value i: value used to represent undefined pixels in fdata float qlevel i: quantization level int dither_method i; which dithering method to use int idata[] o: values of fdata after applying bzero and bscale double bscale o: scale factor double bzero o: zero offset int iminval o: minimum quantized value that is returned int imaxval o: maximum quantized value that is returned The function value will be one if the input fdata were copied to idata; in this case the parameters bscale and bzero can be used to convert back to nearly the original floating point values: fdata ~= idata * bscale + bzero. If the function value is zero, the data were not copied to idata. */ int status, anynulls = 0, iseed; long i, nx, ngood = 0; double stdev, noise2, noise3, noise5; /* MAD 2nd, 3rd, and 5th order noise values */ double minval = 0., maxval = 0.; /* min & max of fdata */ double delta; /* bscale, 1 in idata = delta in fdata */ double zeropt; /* bzero */ double temp; int nextrand = 0; extern float *fits_rand_value; LONGLONG iqfactor; nx = nxpix * nypix; if (nx <= 1) { *bscale = 1.; *bzero = 0.; return (0); } if (qlevel >= 0.) { /* estimate background noise using MAD pixel differences */ FnNoise5_double(fdata, nxpix, nypix, nullcheck, in_null_value, &ngood, &minval, &maxval, &noise2, &noise3, &noise5, &status); if (nullcheck && ngood == 0) { /* special case of an image filled with Nulls */ /* set parameters to dummy values, which are not used */ minval = 0.; maxval = 1.; stdev = 1; } else { /* use the minimum of noise2, noise3, and noise5 as the best noise value */ stdev = noise3; if (noise2 != 0. && noise2 < stdev) stdev = noise2; if (noise5 != 0. && noise5 < stdev) stdev = noise5; } if (qlevel == 0.) delta = stdev / 4.; /* default quantization */ else delta = stdev / qlevel; if (delta == 0.) return (0); /* don't quantize */ } else { /* negative value represents the absolute quantization level */ delta = -qlevel; /* only nned to calculate the min and max values */ FnNoise3_double(fdata, nxpix, nypix, nullcheck, in_null_value, &ngood, &minval, &maxval, 0, &status); } /* check that the range of quantized levels is not > range of int */ if ((maxval - minval) / delta > 2. * 2147483647. - N_RESERVED_VALUES ) return (0); /* don't quantize */ if (row > 0) { /* we need to dither the quantized values */ if (!fits_rand_value) if (fits_init_randoms()) return(MEMORY_ALLOCATION); /* initialize the index to the next random number in the list */ iseed = (int) ((row - 1) % N_RANDOM); nextrand = (int) (fits_rand_value[iseed] * 500); } if (ngood == nx) { /* don't have to check for nulls */ /* return all positive values, if possible since some */ /* compression algorithms either only work for positive integers, */ /* or are more efficient. */ if (dither_method == SUBTRACTIVE_DITHER_2) { /* shift the range to be close to the value used to represent zeros */ zeropt = minval - delta * (NULL_VALUE + N_RESERVED_VALUES); } else if ((maxval - minval) / delta < 2147483647. - N_RESERVED_VALUES ) { zeropt = minval; /* fudge the zero point so it is an integer multiple of delta */ /* This helps to ensure the same scaling will be performed if the */ /* file undergoes multiple fpack/funpack cycles */ iqfactor = (LONGLONG) (zeropt/delta + 0.5); zeropt = iqfactor * delta; } else { /* center the quantized levels around zero */ zeropt = (minval + maxval) / 2.; } if (row > 0) { /* dither the values when quantizing */ for (i = 0; i < nx; i++) { if (dither_method == SUBTRACTIVE_DITHER_2 && fdata[i] == 0.0) { idata[i] = ZERO_VALUE; } else { idata[i] = NINT((((double) fdata[i] - zeropt) / delta) + fits_rand_value[nextrand] - 0.5); } nextrand++; if (nextrand == N_RANDOM) { iseed++; nextrand = (int) (fits_rand_value[iseed] * 500); } } } else { /* do not dither the values */ for (i = 0; i < nx; i++) { idata[i] = NINT ((fdata[i] - zeropt) / delta); } } } else { /* data contains null values; shift the range to be */ /* close to the value used to represent null values */ zeropt = minval - delta * (NULL_VALUE + N_RESERVED_VALUES); if (row > 0) { /* dither the values */ for (i = 0; i < nx; i++) { if (fdata[i] != in_null_value) { if (dither_method == SUBTRACTIVE_DITHER_2 && fdata[i] == 0.0) { idata[i] = ZERO_VALUE; } else { idata[i] = NINT((((double) fdata[i] - zeropt) / delta) + fits_rand_value[nextrand] - 0.5); } } else { idata[i] = NULL_VALUE; } /* increment the random number index, regardless */ nextrand++; if (nextrand == N_RANDOM) { iseed++; nextrand = (int) (fits_rand_value[iseed] * 500); } } } else { /* do not dither the values */ for (i = 0; i < nx; i++) { if (fdata[i] != in_null_value) idata[i] = NINT((fdata[i] - zeropt) / delta); else idata[i] = NULL_VALUE; } } } /* calc min and max values */ temp = (minval - zeropt) / delta; *iminval = NINT (temp); temp = (maxval - zeropt) / delta; *imaxval = NINT (temp); *bscale = delta; *bzero = zeropt; return (1); /* yes, data have been quantized */ } /*--------------------------------------------------------------------------*/ int fits_img_stats_short(short *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ /* (if this is a 3D image, then ny should be the */ /* product of the no. of rows times the no. of planes) */ int nullcheck, /* check for null values, if true */ short nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters (if the pointer is not null) */ long *ngoodpix, /* number of non-null pixels in the image */ short *minvalue, /* returned minimum non-null value in the array */ short *maxvalue, /* returned maximum non-null value in the array */ double *mean, /* returned mean value of all non-null pixels */ double *sigma, /* returned R.M.S. value of all non-null pixels */ double *noise1, /* 1st order estimate of noise in image background level */ double *noise2, /* 2nd order estimate of noise in image background level */ double *noise3, /* 3rd order estimate of noise in image background level */ double *noise5, /* 5th order estimate of noise in image background level */ int *status) /* error status */ /* Compute statistics of the input short integer image. */ { long ngood; short minval, maxval; double xmean = 0., xsigma = 0., xnoise = 0., xnoise2 = 0., xnoise3 = 0., xnoise5 = 0.; /* need to calculate mean and/or sigma and/or limits? */ if (mean || sigma ) { FnMeanSigma_short(array, nx * ny, nullcheck, nullvalue, &ngood, &xmean, &xsigma, status); if (ngoodpix) *ngoodpix = ngood; if (mean) *mean = xmean; if (sigma) *sigma = xsigma; } if (noise1) { FnNoise1_short(array, nx, ny, nullcheck, nullvalue, &xnoise, status); *noise1 = xnoise; } if (minvalue || maxvalue || noise3) { FnNoise5_short(array, nx, ny, nullcheck, nullvalue, &ngood, &minval, &maxval, &xnoise2, &xnoise3, &xnoise5, status); if (ngoodpix) *ngoodpix = ngood; if (minvalue) *minvalue= minval; if (maxvalue) *maxvalue = maxval; if (noise2) *noise2 = xnoise2; if (noise3) *noise3 = xnoise3; if (noise5) *noise5 = xnoise5; } return(*status); } /*--------------------------------------------------------------------------*/ int fits_img_stats_int(int *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ /* (if this is a 3D image, then ny should be the */ /* product of the no. of rows times the no. of planes) */ int nullcheck, /* check for null values, if true */ int nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters (if the pointer is not null) */ long *ngoodpix, /* number of non-null pixels in the image */ int *minvalue, /* returned minimum non-null value in the array */ int *maxvalue, /* returned maximum non-null value in the array */ double *mean, /* returned mean value of all non-null pixels */ double *sigma, /* returned R.M.S. value of all non-null pixels */ double *noise1, /* 1st order estimate of noise in image background level */ double *noise2, /* 2nd order estimate of noise in image background level */ double *noise3, /* 3rd order estimate of noise in image background level */ double *noise5, /* 5th order estimate of noise in image background level */ int *status) /* error status */ /* Compute statistics of the input integer image. */ { long ngood; int minval, maxval; double xmean = 0., xsigma = 0., xnoise = 0., xnoise2 = 0., xnoise3 = 0., xnoise5 = 0.; /* need to calculate mean and/or sigma and/or limits? */ if (mean || sigma ) { FnMeanSigma_int(array, nx * ny, nullcheck, nullvalue, &ngood, &xmean, &xsigma, status); if (ngoodpix) *ngoodpix = ngood; if (mean) *mean = xmean; if (sigma) *sigma = xsigma; } if (noise1) { FnNoise1_int(array, nx, ny, nullcheck, nullvalue, &xnoise, status); *noise1 = xnoise; } if (minvalue || maxvalue || noise3) { FnNoise5_int(array, nx, ny, nullcheck, nullvalue, &ngood, &minval, &maxval, &xnoise2, &xnoise3, &xnoise5, status); if (ngoodpix) *ngoodpix = ngood; if (minvalue) *minvalue= minval; if (maxvalue) *maxvalue = maxval; if (noise2) *noise2 = xnoise2; if (noise3) *noise3 = xnoise3; if (noise5) *noise5 = xnoise5; } return(*status); } /*--------------------------------------------------------------------------*/ int fits_img_stats_float(float *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ /* (if this is a 3D image, then ny should be the */ /* product of the no. of rows times the no. of planes) */ int nullcheck, /* check for null values, if true */ float nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters (if the pointer is not null) */ long *ngoodpix, /* number of non-null pixels in the image */ float *minvalue, /* returned minimum non-null value in the array */ float *maxvalue, /* returned maximum non-null value in the array */ double *mean, /* returned mean value of all non-null pixels */ double *sigma, /* returned R.M.S. value of all non-null pixels */ double *noise1, /* 1st order estimate of noise in image background level */ double *noise2, /* 2nd order estimate of noise in image background level */ double *noise3, /* 3rd order estimate of noise in image background level */ double *noise5, /* 5th order estimate of noise in image background level */ int *status) /* error status */ /* Compute statistics of the input float image. */ { long ngood; float minval, maxval; double xmean = 0., xsigma = 0., xnoise = 0., xnoise2 = 0., xnoise3 = 0., xnoise5 = 0.; /* need to calculate mean and/or sigma and/or limits? */ if (mean || sigma ) { FnMeanSigma_float(array, nx * ny, nullcheck, nullvalue, &ngood, &xmean, &xsigma, status); if (ngoodpix) *ngoodpix = ngood; if (mean) *mean = xmean; if (sigma) *sigma = xsigma; } if (noise1) { FnNoise1_float(array, nx, ny, nullcheck, nullvalue, &xnoise, status); *noise1 = xnoise; } if (minvalue || maxvalue || noise3) { FnNoise5_float(array, nx, ny, nullcheck, nullvalue, &ngood, &minval, &maxval, &xnoise2, &xnoise3, &xnoise5, status); if (ngoodpix) *ngoodpix = ngood; if (minvalue) *minvalue= minval; if (maxvalue) *maxvalue = maxval; if (noise2) *noise2 = xnoise2; if (noise3) *noise3 = xnoise3; if (noise5) *noise5 = xnoise5; } return(*status); } /*--------------------------------------------------------------------------*/ static int FnMeanSigma_short (short *array, /* 2 dimensional array of image pixels */ long npix, /* number of pixels in the image */ int nullcheck, /* check for null values, if true */ short nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ long *ngoodpix, /* number of non-null pixels in the image */ double *mean, /* returned mean value of all non-null pixels */ double *sigma, /* returned R.M.S. value of all non-null pixels */ int *status) /* error status */ /* Compute mean and RMS sigma of the non-null pixels in the input array. */ { long ii, ngood = 0; short *value; double sum = 0., sum2 = 0., xtemp; value = array; if (nullcheck) { for (ii = 0; ii < npix; ii++, value++) { if (*value != nullvalue) { ngood++; xtemp = (double) *value; sum += xtemp; sum2 += (xtemp * xtemp); } } } else { ngood = npix; for (ii = 0; ii < npix; ii++, value++) { xtemp = (double) *value; sum += xtemp; sum2 += (xtemp * xtemp); } } if (ngood > 1) { if (ngoodpix) *ngoodpix = ngood; xtemp = sum / ngood; if (mean) *mean = xtemp; if (sigma) *sigma = sqrt((sum2 / ngood) - (xtemp * xtemp)); } else if (ngood == 1){ if (ngoodpix) *ngoodpix = 1; if (mean) *mean = sum; if (sigma) *sigma = 0.0; } else { if (ngoodpix) *ngoodpix = 0; if (mean) *mean = 0.; if (sigma) *sigma = 0.; } return(*status); } /*--------------------------------------------------------------------------*/ static int FnMeanSigma_int (int *array, /* 2 dimensional array of image pixels */ long npix, /* number of pixels in the image */ int nullcheck, /* check for null values, if true */ int nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ long *ngoodpix, /* number of non-null pixels in the image */ double *mean, /* returned mean value of all non-null pixels */ double *sigma, /* returned R.M.S. value of all non-null pixels */ int *status) /* error status */ /* Compute mean and RMS sigma of the non-null pixels in the input array. */ { long ii, ngood = 0; int *value; double sum = 0., sum2 = 0., xtemp; value = array; if (nullcheck) { for (ii = 0; ii < npix; ii++, value++) { if (*value != nullvalue) { ngood++; xtemp = (double) *value; sum += xtemp; sum2 += (xtemp * xtemp); } } } else { ngood = npix; for (ii = 0; ii < npix; ii++, value++) { xtemp = (double) *value; sum += xtemp; sum2 += (xtemp * xtemp); } } if (ngood > 1) { if (ngoodpix) *ngoodpix = ngood; xtemp = sum / ngood; if (mean) *mean = xtemp; if (sigma) *sigma = sqrt((sum2 / ngood) - (xtemp * xtemp)); } else if (ngood == 1){ if (ngoodpix) *ngoodpix = 1; if (mean) *mean = sum; if (sigma) *sigma = 0.0; } else { if (ngoodpix) *ngoodpix = 0; if (mean) *mean = 0.; if (sigma) *sigma = 0.; } return(*status); } /*--------------------------------------------------------------------------*/ static int FnMeanSigma_float (float *array, /* 2 dimensional array of image pixels */ long npix, /* number of pixels in the image */ int nullcheck, /* check for null values, if true */ float nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ long *ngoodpix, /* number of non-null pixels in the image */ double *mean, /* returned mean value of all non-null pixels */ double *sigma, /* returned R.M.S. value of all non-null pixels */ int *status) /* error status */ /* Compute mean and RMS sigma of the non-null pixels in the input array. */ { long ii, ngood = 0; float *value; double sum = 0., sum2 = 0., xtemp; value = array; if (nullcheck) { for (ii = 0; ii < npix; ii++, value++) { if (*value != nullvalue) { ngood++; xtemp = (double) *value; sum += xtemp; sum2 += (xtemp * xtemp); } } } else { ngood = npix; for (ii = 0; ii < npix; ii++, value++) { xtemp = (double) *value; sum += xtemp; sum2 += (xtemp * xtemp); } } if (ngood > 1) { if (ngoodpix) *ngoodpix = ngood; xtemp = sum / ngood; if (mean) *mean = xtemp; if (sigma) *sigma = sqrt((sum2 / ngood) - (xtemp * xtemp)); } else if (ngood == 1){ if (ngoodpix) *ngoodpix = 1; if (mean) *mean = sum; if (sigma) *sigma = 0.0; } else { if (ngoodpix) *ngoodpix = 0; if (mean) *mean = 0.; if (sigma) *sigma = 0.; } return(*status); } /*--------------------------------------------------------------------------*/ static int FnMeanSigma_double (double *array, /* 2 dimensional array of image pixels */ long npix, /* number of pixels in the image */ int nullcheck, /* check for null values, if true */ double nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ long *ngoodpix, /* number of non-null pixels in the image */ double *mean, /* returned mean value of all non-null pixels */ double *sigma, /* returned R.M.S. value of all non-null pixels */ int *status) /* error status */ /* Compute mean and RMS sigma of the non-null pixels in the input array. */ { long ii, ngood = 0; double *value; double sum = 0., sum2 = 0., xtemp; value = array; if (nullcheck) { for (ii = 0; ii < npix; ii++, value++) { if (*value != nullvalue) { ngood++; xtemp = *value; sum += xtemp; sum2 += (xtemp * xtemp); } } } else { ngood = npix; for (ii = 0; ii < npix; ii++, value++) { xtemp = *value; sum += xtemp; sum2 += (xtemp * xtemp); } } if (ngood > 1) { if (ngoodpix) *ngoodpix = ngood; xtemp = sum / ngood; if (mean) *mean = xtemp; if (sigma) *sigma = sqrt((sum2 / ngood) - (xtemp * xtemp)); } else if (ngood == 1){ if (ngoodpix) *ngoodpix = 1; if (mean) *mean = sum; if (sigma) *sigma = 0.0; } else { if (ngoodpix) *ngoodpix = 0; if (mean) *mean = 0.; if (sigma) *sigma = 0.; } return(*status); } /*--------------------------------------------------------------------------*/ static int FnNoise5_short (short *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ int nullcheck, /* check for null values, if true */ short nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ long *ngood, /* number of good, non-null pixels? */ short *minval, /* minimum non-null value */ short *maxval, /* maximum non-null value */ double *noise2, /* returned 2nd order MAD of all non-null pixels */ double *noise3, /* returned 3rd order MAD of all non-null pixels */ double *noise5, /* returned 5th order MAD of all non-null pixels */ int *status) /* error status */ /* Estimate the median and background noise in the input image using 2nd, 3rd and 5th order Median Absolute Differences. The noise in the background of the image is calculated using the MAD algorithms developed for deriving the signal to noise ratio in spectra (see issue #42 of the ST-ECF newsletter, http://www.stecf.org/documents/newsletter/) 3rd order: noise = 1.482602 / sqrt(6) * median (abs(2*flux(i) - flux(i-2) - flux(i+2))) The returned estimates are the median of the values that are computed for each row of the image. */ { long ii, jj, nrows = 0, nrows2 = 0, nvals, nvals2, ngoodpix = 0; int *differences2, *differences3, *differences5; short *rowpix, v1, v2, v3, v4, v5, v6, v7, v8, v9; short xminval = SHRT_MAX, xmaxval = SHRT_MIN; int do_range = 0; double *diffs2, *diffs3, *diffs5; double xnoise2 = 0, xnoise3 = 0, xnoise5 = 0; if (nx < 5) { /* treat entire array as an image with a single row */ nx = nx * ny; ny = 1; } /* rows must have at least 9 pixels */ if (nx < 9) { for (ii = 0; ii < nx; ii++) { if (nullcheck && array[ii] == nullvalue) continue; else { if (array[ii] < xminval) xminval = array[ii]; if (array[ii] > xmaxval) xmaxval = array[ii]; ngoodpix++; } } if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (ngood) *ngood = ngoodpix; if (noise2) *noise2 = 0.; if (noise3) *noise3 = 0.; if (noise5) *noise5 = 0.; return(*status); } /* do we need to compute the min and max value? */ if (minval || maxval) do_range = 1; /* allocate arrays used to compute the median and noise estimates */ differences2 = calloc(nx, sizeof(int)); if (!differences2) { *status = MEMORY_ALLOCATION; return(*status); } differences3 = calloc(nx, sizeof(int)); if (!differences3) { free(differences2); *status = MEMORY_ALLOCATION; return(*status); } differences5 = calloc(nx, sizeof(int)); if (!differences5) { free(differences2); free(differences3); *status = MEMORY_ALLOCATION; return(*status); } diffs2 = calloc(ny, sizeof(double)); if (!diffs2) { free(differences2); free(differences3); free(differences5); *status = MEMORY_ALLOCATION; return(*status); } diffs3 = calloc(ny, sizeof(double)); if (!diffs3) { free(differences2); free(differences3); free(differences5); free(diffs2); *status = MEMORY_ALLOCATION; return(*status); } diffs5 = calloc(ny, sizeof(double)); if (!diffs5) { free(differences2); free(differences3); free(differences5); free(diffs2); free(diffs3); *status = MEMORY_ALLOCATION; return(*status); } /* loop over each row of the image */ for (jj=0; jj < ny; jj++) { rowpix = array + (jj * nx); /* point to first pixel in the row */ /***** find the first valid pixel in row */ ii = 0; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v1 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v1 < xminval) xminval = v1; if (v1 > xmaxval) xmaxval = v1; } /***** find the 2nd valid pixel in row (which we will skip over) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v2 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v2 < xminval) xminval = v2; if (v2 > xmaxval) xmaxval = v2; } /***** find the 3rd valid pixel in row */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v3 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v3 < xminval) xminval = v3; if (v3 > xmaxval) xmaxval = v3; } /* find the 4nd valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v4 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v4 < xminval) xminval = v4; if (v4 > xmaxval) xmaxval = v4; } /* find the 5th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v5 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v5 < xminval) xminval = v5; if (v5 > xmaxval) xmaxval = v5; } /* find the 6th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v6 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v6 < xminval) xminval = v6; if (v6 > xmaxval) xmaxval = v6; } /* find the 7th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v7 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v7 < xminval) xminval = v7; if (v7 > xmaxval) xmaxval = v7; } /* find the 8th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v8 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v8 < xminval) xminval = v8; if (v8 > xmaxval) xmaxval = v8; } /* now populate the differences arrays */ /* for the remaining pixels in the row */ nvals = 0; nvals2 = 0; for (ii++; ii < nx; ii++) { /* find the next valid pixel in row */ if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) break; /* hit end of row */ v9 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v9 < xminval) xminval = v9; if (v9 > xmaxval) xmaxval = v9; } /* construct array of absolute differences */ if (!(v5 == v6 && v6 == v7) ) { differences2[nvals2] = abs((int) v5 - (int) v7); nvals2++; } if (!(v3 == v4 && v4 == v5 && v5 == v6 && v6 == v7) ) { differences3[nvals] = abs((2 * (int) v5) - (int) v3 - (int) v7); differences5[nvals] = abs((6 * (int) v5) - (4 * (int) v3) - (4 * (int) v7) + (int) v1 + (int) v9); nvals++; } else { /* ignore constant background regions */ ngoodpix++; } /* shift over 1 pixel */ v1 = v2; v2 = v3; v3 = v4; v4 = v5; v5 = v6; v6 = v7; v7 = v8; v8 = v9; } /* end of loop over pixels in the row */ /* compute the median diffs */ /* Note that there are 8 more pixel values than there are diffs values. */ ngoodpix += (nvals + 8); if (nvals == 0) { continue; /* cannot compute medians on this row */ } else if (nvals == 1) { if (nvals2 == 1) { diffs2[nrows2] = differences2[0]; nrows2++; } diffs3[nrows] = differences3[0]; diffs5[nrows] = differences5[0]; } else { /* quick_select returns the median MUCH faster than using qsort */ if (nvals2 > 1) { diffs2[nrows2] = quick_select_int(differences2, nvals); nrows2++; } diffs3[nrows] = quick_select_int(differences3, nvals); diffs5[nrows] = quick_select_int(differences5, nvals); } nrows++; } /* end of loop over rows */ /* compute median of the values for each row */ if (nrows == 0) { xnoise3 = 0; xnoise5 = 0; } else if (nrows == 1) { xnoise3 = diffs3[0]; xnoise5 = diffs5[0]; } else { qsort(diffs3, nrows, sizeof(double), FnCompare_double); qsort(diffs5, nrows, sizeof(double), FnCompare_double); xnoise3 = (diffs3[(nrows - 1)/2] + diffs3[nrows/2]) / 2.; xnoise5 = (diffs5[(nrows - 1)/2] + diffs5[nrows/2]) / 2.; } if (nrows2 == 0) { xnoise2 = 0; } else if (nrows2 == 1) { xnoise2 = diffs2[0]; } else { qsort(diffs2, nrows2, sizeof(double), FnCompare_double); xnoise2 = (diffs2[(nrows2 - 1)/2] + diffs2[nrows2/2]) / 2.; } if (ngood) *ngood = ngoodpix; if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (noise2) *noise2 = 1.0483579 * xnoise2; if (noise3) *noise3 = 0.6052697 * xnoise3; if (noise5) *noise5 = 0.1772048 * xnoise5; free(diffs5); free(diffs3); free(diffs2); free(differences5); free(differences3); free(differences2); return(*status); } /*--------------------------------------------------------------------------*/ static int FnNoise5_int (int *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ int nullcheck, /* check for null values, if true */ int nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ long *ngood, /* number of good, non-null pixels? */ int *minval, /* minimum non-null value */ int *maxval, /* maximum non-null value */ double *noise2, /* returned 2nd order MAD of all non-null pixels */ double *noise3, /* returned 3rd order MAD of all non-null pixels */ double *noise5, /* returned 5th order MAD of all non-null pixels */ int *status) /* error status */ /* Estimate the median and background noise in the input image using 2nd, 3rd and 5th order Median Absolute Differences. The noise in the background of the image is calculated using the MAD algorithms developed for deriving the signal to noise ratio in spectra (see issue #42 of the ST-ECF newsletter, http://www.stecf.org/documents/newsletter/) 3rd order: noise = 1.482602 / sqrt(6) * median (abs(2*flux(i) - flux(i-2) - flux(i+2))) The returned estimates are the median of the values that are computed for each row of the image. */ { long ii, jj, nrows = 0, nrows2 = 0, nvals, nvals2, ngoodpix = 0; LONGLONG *differences2, *differences3, *differences5, tdiff; int *rowpix, v1, v2, v3, v4, v5, v6, v7, v8, v9; int xminval = INT_MAX, xmaxval = INT_MIN; int do_range = 0; double *diffs2, *diffs3, *diffs5; double xnoise2 = 0, xnoise3 = 0, xnoise5 = 0; if (nx < 5) { /* treat entire array as an image with a single row */ nx = nx * ny; ny = 1; } /* rows must have at least 9 pixels */ if (nx < 9) { for (ii = 0; ii < nx; ii++) { if (nullcheck && array[ii] == nullvalue) continue; else { if (array[ii] < xminval) xminval = array[ii]; if (array[ii] > xmaxval) xmaxval = array[ii]; ngoodpix++; } } if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (ngood) *ngood = ngoodpix; if (noise2) *noise2 = 0.; if (noise3) *noise3 = 0.; if (noise5) *noise5 = 0.; return(*status); } /* do we need to compute the min and max value? */ if (minval || maxval) do_range = 1; /* allocate arrays used to compute the median and noise estimates */ differences2 = calloc(nx, sizeof(LONGLONG)); if (!differences2) { *status = MEMORY_ALLOCATION; return(*status); } differences3 = calloc(nx, sizeof(LONGLONG)); if (!differences3) { free(differences2); *status = MEMORY_ALLOCATION; return(*status); } differences5 = calloc(nx, sizeof(LONGLONG)); if (!differences5) { free(differences2); free(differences3); *status = MEMORY_ALLOCATION; return(*status); } diffs2 = calloc(ny, sizeof(double)); if (!diffs2) { free(differences2); free(differences3); free(differences5); *status = MEMORY_ALLOCATION; return(*status); } diffs3 = calloc(ny, sizeof(double)); if (!diffs3) { free(differences2); free(differences3); free(differences5); free(diffs2); *status = MEMORY_ALLOCATION; return(*status); } diffs5 = calloc(ny, sizeof(double)); if (!diffs5) { free(differences2); free(differences3); free(differences5); free(diffs2); free(diffs3); *status = MEMORY_ALLOCATION; return(*status); } /* loop over each row of the image */ for (jj=0; jj < ny; jj++) { rowpix = array + (jj * nx); /* point to first pixel in the row */ /***** find the first valid pixel in row */ ii = 0; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v1 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v1 < xminval) xminval = v1; if (v1 > xmaxval) xmaxval = v1; } /***** find the 2nd valid pixel in row (which we will skip over) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v2 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v2 < xminval) xminval = v2; if (v2 > xmaxval) xmaxval = v2; } /***** find the 3rd valid pixel in row */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v3 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v3 < xminval) xminval = v3; if (v3 > xmaxval) xmaxval = v3; } /* find the 4nd valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v4 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v4 < xminval) xminval = v4; if (v4 > xmaxval) xmaxval = v4; } /* find the 5th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v5 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v5 < xminval) xminval = v5; if (v5 > xmaxval) xmaxval = v5; } /* find the 6th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v6 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v6 < xminval) xminval = v6; if (v6 > xmaxval) xmaxval = v6; } /* find the 7th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v7 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v7 < xminval) xminval = v7; if (v7 > xmaxval) xmaxval = v7; } /* find the 8th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v8 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v8 < xminval) xminval = v8; if (v8 > xmaxval) xmaxval = v8; } /* now populate the differences arrays */ /* for the remaining pixels in the row */ nvals = 0; nvals2 = 0; for (ii++; ii < nx; ii++) { /* find the next valid pixel in row */ if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) break; /* hit end of row */ v9 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v9 < xminval) xminval = v9; if (v9 > xmaxval) xmaxval = v9; } /* construct array of absolute differences */ if (!(v5 == v6 && v6 == v7) ) { tdiff = (LONGLONG) v5 - (LONGLONG) v7; if (tdiff < 0) differences2[nvals2] = -1 * tdiff; else differences2[nvals2] = tdiff; nvals2++; } if (!(v3 == v4 && v4 == v5 && v5 == v6 && v6 == v7) ) { tdiff = (2 * (LONGLONG) v5) - (LONGLONG) v3 - (LONGLONG) v7; if (tdiff < 0) differences3[nvals] = -1 * tdiff; else differences3[nvals] = tdiff; tdiff = (6 * (LONGLONG) v5) - (4 * (LONGLONG) v3) - (4 * (LONGLONG) v7) + (LONGLONG) v1 + (LONGLONG) v9; if (tdiff < 0) differences5[nvals] = -1 * tdiff; else differences5[nvals] = tdiff; nvals++; } else { /* ignore constant background regions */ ngoodpix++; } /* shift over 1 pixel */ v1 = v2; v2 = v3; v3 = v4; v4 = v5; v5 = v6; v6 = v7; v7 = v8; v8 = v9; } /* end of loop over pixels in the row */ /* compute the median diffs */ /* Note that there are 8 more pixel values than there are diffs values. */ ngoodpix += (nvals + 8); if (nvals == 0) { continue; /* cannot compute medians on this row */ } else if (nvals == 1) { if (nvals2 == 1) { diffs2[nrows2] = (double) differences2[0]; nrows2++; } diffs3[nrows] = (double) differences3[0]; diffs5[nrows] = (double) differences5[0]; } else { /* quick_select returns the median MUCH faster than using qsort */ if (nvals2 > 1) { diffs2[nrows2] = (double) quick_select_longlong(differences2, nvals); nrows2++; } diffs3[nrows] = (double) quick_select_longlong(differences3, nvals); diffs5[nrows] = (double) quick_select_longlong(differences5, nvals); } nrows++; } /* end of loop over rows */ /* compute median of the values for each row */ if (nrows == 0) { xnoise3 = 0; xnoise5 = 0; } else if (nrows == 1) { xnoise3 = diffs3[0]; xnoise5 = diffs5[0]; } else { qsort(diffs3, nrows, sizeof(double), FnCompare_double); qsort(diffs5, nrows, sizeof(double), FnCompare_double); xnoise3 = (diffs3[(nrows - 1)/2] + diffs3[nrows/2]) / 2.; xnoise5 = (diffs5[(nrows - 1)/2] + diffs5[nrows/2]) / 2.; } if (nrows2 == 0) { xnoise2 = 0; } else if (nrows2 == 1) { xnoise2 = diffs2[0]; } else { qsort(diffs2, nrows2, sizeof(double), FnCompare_double); xnoise2 = (diffs2[(nrows2 - 1)/2] + diffs2[nrows2/2]) / 2.; } if (ngood) *ngood = ngoodpix; if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (noise2) *noise2 = 1.0483579 * xnoise2; if (noise3) *noise3 = 0.6052697 * xnoise3; if (noise5) *noise5 = 0.1772048 * xnoise5; free(diffs5); free(diffs3); free(diffs2); free(differences5); free(differences3); free(differences2); return(*status); } /*--------------------------------------------------------------------------*/ static int FnNoise5_float (float *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ int nullcheck, /* check for null values, if true */ float nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ long *ngood, /* number of good, non-null pixels? */ float *minval, /* minimum non-null value */ float *maxval, /* maximum non-null value */ double *noise2, /* returned 2nd order MAD of all non-null pixels */ double *noise3, /* returned 3rd order MAD of all non-null pixels */ double *noise5, /* returned 5th order MAD of all non-null pixels */ int *status) /* error status */ /* Estimate the median and background noise in the input image using 2nd, 3rd and 5th order Median Absolute Differences. The noise in the background of the image is calculated using the MAD algorithms developed for deriving the signal to noise ratio in spectra (see issue #42 of the ST-ECF newsletter, http://www.stecf.org/documents/newsletter/) 3rd order: noise = 1.482602 / sqrt(6) * median (abs(2*flux(i) - flux(i-2) - flux(i+2))) The returned estimates are the median of the values that are computed for each row of the image. */ { long ii, jj, nrows = 0, nrows2 = 0, nvals, nvals2, ngoodpix = 0; float *differences2, *differences3, *differences5; float *rowpix, v1, v2, v3, v4, v5, v6, v7, v8, v9; float xminval = FLT_MAX, xmaxval = -FLT_MAX; int do_range = 0; double *diffs2, *diffs3, *diffs5; double xnoise2 = 0, xnoise3 = 0, xnoise5 = 0; if (nx < 5) { /* treat entire array as an image with a single row */ nx = nx * ny; ny = 1; } /* rows must have at least 9 pixels */ if (nx < 9) { for (ii = 0; ii < nx; ii++) { if (nullcheck && array[ii] == nullvalue) continue; else { if (array[ii] < xminval) xminval = array[ii]; if (array[ii] > xmaxval) xmaxval = array[ii]; ngoodpix++; } } if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (ngood) *ngood = ngoodpix; if (noise2) *noise2 = 0.; if (noise3) *noise3 = 0.; if (noise5) *noise5 = 0.; return(*status); } /* do we need to compute the min and max value? */ if (minval || maxval) do_range = 1; /* allocate arrays used to compute the median and noise estimates */ differences2 = calloc(nx, sizeof(float)); if (!differences2) { *status = MEMORY_ALLOCATION; return(*status); } differences3 = calloc(nx, sizeof(float)); if (!differences3) { free(differences2); *status = MEMORY_ALLOCATION; return(*status); } differences5 = calloc(nx, sizeof(float)); if (!differences5) { free(differences2); free(differences3); *status = MEMORY_ALLOCATION; return(*status); } diffs2 = calloc(ny, sizeof(double)); if (!diffs2) { free(differences2); free(differences3); free(differences5); *status = MEMORY_ALLOCATION; return(*status); } diffs3 = calloc(ny, sizeof(double)); if (!diffs3) { free(differences2); free(differences3); free(differences5); free(diffs2); *status = MEMORY_ALLOCATION; return(*status); } diffs5 = calloc(ny, sizeof(double)); if (!diffs5) { free(differences2); free(differences3); free(differences5); free(diffs2); free(diffs3); *status = MEMORY_ALLOCATION; return(*status); } /* loop over each row of the image */ for (jj=0; jj < ny; jj++) { rowpix = array + (jj * nx); /* point to first pixel in the row */ /***** find the first valid pixel in row */ ii = 0; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v1 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v1 < xminval) xminval = v1; if (v1 > xmaxval) xmaxval = v1; } /***** find the 2nd valid pixel in row (which we will skip over) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v2 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v2 < xminval) xminval = v2; if (v2 > xmaxval) xmaxval = v2; } /***** find the 3rd valid pixel in row */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v3 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v3 < xminval) xminval = v3; if (v3 > xmaxval) xmaxval = v3; } /* find the 4nd valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v4 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v4 < xminval) xminval = v4; if (v4 > xmaxval) xmaxval = v4; } /* find the 5th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v5 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v5 < xminval) xminval = v5; if (v5 > xmaxval) xmaxval = v5; } /* find the 6th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v6 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v6 < xminval) xminval = v6; if (v6 > xmaxval) xmaxval = v6; } /* find the 7th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v7 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v7 < xminval) xminval = v7; if (v7 > xmaxval) xmaxval = v7; } /* find the 8th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v8 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v8 < xminval) xminval = v8; if (v8 > xmaxval) xmaxval = v8; } /* now populate the differences arrays */ /* for the remaining pixels in the row */ nvals = 0; nvals2 = 0; for (ii++; ii < nx; ii++) { /* find the next valid pixel in row */ if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) break; /* hit end of row */ v9 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v9 < xminval) xminval = v9; if (v9 > xmaxval) xmaxval = v9; } /* construct array of absolute differences */ if (!(v5 == v6 && v6 == v7) ) { differences2[nvals2] = (float) fabs(v5 - v7); nvals2++; } if (!(v3 == v4 && v4 == v5 && v5 == v6 && v6 == v7) ) { differences3[nvals] = (float) fabs((2 * v5) - v3 - v7); differences5[nvals] = (float) fabs((6 * v5) - (4 * v3) - (4 * v7) + v1 + v9); nvals++; } else { /* ignore constant background regions */ ngoodpix++; } /* shift over 1 pixel */ v1 = v2; v2 = v3; v3 = v4; v4 = v5; v5 = v6; v6 = v7; v7 = v8; v8 = v9; } /* end of loop over pixels in the row */ /* compute the median diffs */ /* Note that there are 8 more pixel values than there are diffs values. */ ngoodpix += (nvals + 8); if (nvals == 0) { continue; /* cannot compute medians on this row */ } else if (nvals == 1) { if (nvals2 == 1) { diffs2[nrows2] = differences2[0]; nrows2++; } diffs3[nrows] = differences3[0]; diffs5[nrows] = differences5[0]; } else { /* quick_select returns the median MUCH faster than using qsort */ if (nvals2 > 1) { diffs2[nrows2] = quick_select_float(differences2, nvals); nrows2++; } diffs3[nrows] = quick_select_float(differences3, nvals); diffs5[nrows] = quick_select_float(differences5, nvals); } nrows++; } /* end of loop over rows */ /* compute median of the values for each row */ if (nrows == 0) { xnoise3 = 0; xnoise5 = 0; } else if (nrows == 1) { xnoise3 = diffs3[0]; xnoise5 = diffs5[0]; } else { qsort(diffs3, nrows, sizeof(double), FnCompare_double); qsort(diffs5, nrows, sizeof(double), FnCompare_double); xnoise3 = (diffs3[(nrows - 1)/2] + diffs3[nrows/2]) / 2.; xnoise5 = (diffs5[(nrows - 1)/2] + diffs5[nrows/2]) / 2.; } if (nrows2 == 0) { xnoise2 = 0; } else if (nrows2 == 1) { xnoise2 = diffs2[0]; } else { qsort(diffs2, nrows2, sizeof(double), FnCompare_double); xnoise2 = (diffs2[(nrows2 - 1)/2] + diffs2[nrows2/2]) / 2.; } if (ngood) *ngood = ngoodpix; if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (noise2) *noise2 = 1.0483579 * xnoise2; if (noise3) *noise3 = 0.6052697 * xnoise3; if (noise5) *noise5 = 0.1772048 * xnoise5; free(diffs5); free(diffs3); free(diffs2); free(differences5); free(differences3); free(differences2); return(*status); } /*--------------------------------------------------------------------------*/ static int FnNoise5_double (double *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ int nullcheck, /* check for null values, if true */ double nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ long *ngood, /* number of good, non-null pixels? */ double *minval, /* minimum non-null value */ double *maxval, /* maximum non-null value */ double *noise2, /* returned 2nd order MAD of all non-null pixels */ double *noise3, /* returned 3rd order MAD of all non-null pixels */ double *noise5, /* returned 5th order MAD of all non-null pixels */ int *status) /* error status */ /* Estimate the median and background noise in the input image using 2nd, 3rd and 5th order Median Absolute Differences. The noise in the background of the image is calculated using the MAD algorithms developed for deriving the signal to noise ratio in spectra (see issue #42 of the ST-ECF newsletter, http://www.stecf.org/documents/newsletter/) 3rd order: noise = 1.482602 / sqrt(6) * median (abs(2*flux(i) - flux(i-2) - flux(i+2))) The returned estimates are the median of the values that are computed for each row of the image. */ { long ii, jj, nrows = 0, nrows2 = 0, nvals, nvals2, ngoodpix = 0; double *differences2, *differences3, *differences5; double *rowpix, v1, v2, v3, v4, v5, v6, v7, v8, v9; double xminval = DBL_MAX, xmaxval = -DBL_MAX; int do_range = 0; double *diffs2, *diffs3, *diffs5; double xnoise2 = 0, xnoise3 = 0, xnoise5 = 0; if (nx < 5) { /* treat entire array as an image with a single row */ nx = nx * ny; ny = 1; } /* rows must have at least 9 pixels */ if (nx < 9) { for (ii = 0; ii < nx; ii++) { if (nullcheck && array[ii] == nullvalue) continue; else { if (array[ii] < xminval) xminval = array[ii]; if (array[ii] > xmaxval) xmaxval = array[ii]; ngoodpix++; } } if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (ngood) *ngood = ngoodpix; if (noise2) *noise2 = 0.; if (noise3) *noise3 = 0.; if (noise5) *noise5 = 0.; return(*status); } /* do we need to compute the min and max value? */ if (minval || maxval) do_range = 1; /* allocate arrays used to compute the median and noise estimates */ differences2 = calloc(nx, sizeof(double)); if (!differences2) { *status = MEMORY_ALLOCATION; return(*status); } differences3 = calloc(nx, sizeof(double)); if (!differences3) { free(differences2); *status = MEMORY_ALLOCATION; return(*status); } differences5 = calloc(nx, sizeof(double)); if (!differences5) { free(differences2); free(differences3); *status = MEMORY_ALLOCATION; return(*status); } diffs2 = calloc(ny, sizeof(double)); if (!diffs2) { free(differences2); free(differences3); free(differences5); *status = MEMORY_ALLOCATION; return(*status); } diffs3 = calloc(ny, sizeof(double)); if (!diffs3) { free(differences2); free(differences3); free(differences5); free(diffs2); *status = MEMORY_ALLOCATION; return(*status); } diffs5 = calloc(ny, sizeof(double)); if (!diffs5) { free(differences2); free(differences3); free(differences5); free(diffs2); free(diffs3); *status = MEMORY_ALLOCATION; return(*status); } /* loop over each row of the image */ for (jj=0; jj < ny; jj++) { rowpix = array + (jj * nx); /* point to first pixel in the row */ /***** find the first valid pixel in row */ ii = 0; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v1 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v1 < xminval) xminval = v1; if (v1 > xmaxval) xmaxval = v1; } /***** find the 2nd valid pixel in row (which we will skip over) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v2 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v2 < xminval) xminval = v2; if (v2 > xmaxval) xmaxval = v2; } /***** find the 3rd valid pixel in row */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v3 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v3 < xminval) xminval = v3; if (v3 > xmaxval) xmaxval = v3; } /* find the 4nd valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v4 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v4 < xminval) xminval = v4; if (v4 > xmaxval) xmaxval = v4; } /* find the 5th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v5 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v5 < xminval) xminval = v5; if (v5 > xmaxval) xmaxval = v5; } /* find the 6th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v6 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v6 < xminval) xminval = v6; if (v6 > xmaxval) xmaxval = v6; } /* find the 7th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v7 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v7 < xminval) xminval = v7; if (v7 > xmaxval) xmaxval = v7; } /* find the 8th valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v8 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v8 < xminval) xminval = v8; if (v8 > xmaxval) xmaxval = v8; } /* now populate the differences arrays */ /* for the remaining pixels in the row */ nvals = 0; nvals2 = 0; for (ii++; ii < nx; ii++) { /* find the next valid pixel in row */ if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) break; /* hit end of row */ v9 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v9 < xminval) xminval = v9; if (v9 > xmaxval) xmaxval = v9; } /* construct array of absolute differences */ if (!(v5 == v6 && v6 == v7) ) { differences2[nvals2] = fabs(v5 - v7); nvals2++; } if (!(v3 == v4 && v4 == v5 && v5 == v6 && v6 == v7) ) { differences3[nvals] = fabs((2 * v5) - v3 - v7); differences5[nvals] = fabs((6 * v5) - (4 * v3) - (4 * v7) + v1 + v9); nvals++; } else { /* ignore constant background regions */ ngoodpix++; } /* shift over 1 pixel */ v1 = v2; v2 = v3; v3 = v4; v4 = v5; v5 = v6; v6 = v7; v7 = v8; v8 = v9; } /* end of loop over pixels in the row */ /* compute the median diffs */ /* Note that there are 8 more pixel values than there are diffs values. */ ngoodpix += (nvals + 8); if (nvals == 0) { continue; /* cannot compute medians on this row */ } else if (nvals == 1) { if (nvals2 == 1) { diffs2[nrows2] = differences2[0]; nrows2++; } diffs3[nrows] = differences3[0]; diffs5[nrows] = differences5[0]; } else { /* quick_select returns the median MUCH faster than using qsort */ if (nvals2 > 1) { diffs2[nrows2] = quick_select_double(differences2, nvals); nrows2++; } diffs3[nrows] = quick_select_double(differences3, nvals); diffs5[nrows] = quick_select_double(differences5, nvals); } nrows++; } /* end of loop over rows */ /* compute median of the values for each row */ if (nrows == 0) { xnoise3 = 0; xnoise5 = 0; } else if (nrows == 1) { xnoise3 = diffs3[0]; xnoise5 = diffs5[0]; } else { qsort(diffs3, nrows, sizeof(double), FnCompare_double); qsort(diffs5, nrows, sizeof(double), FnCompare_double); xnoise3 = (diffs3[(nrows - 1)/2] + diffs3[nrows/2]) / 2.; xnoise5 = (diffs5[(nrows - 1)/2] + diffs5[nrows/2]) / 2.; } if (nrows2 == 0) { xnoise2 = 0; } else if (nrows2 == 1) { xnoise2 = diffs2[0]; } else { qsort(diffs2, nrows2, sizeof(double), FnCompare_double); xnoise2 = (diffs2[(nrows2 - 1)/2] + diffs2[nrows2/2]) / 2.; } if (ngood) *ngood = ngoodpix; if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (noise2) *noise2 = 1.0483579 * xnoise2; if (noise3) *noise3 = 0.6052697 * xnoise3; if (noise5) *noise5 = 0.1772048 * xnoise5; free(diffs5); free(diffs3); free(diffs2); free(differences5); free(differences3); free(differences2); return(*status); } /*--------------------------------------------------------------------------*/ static int FnNoise3_short (short *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ int nullcheck, /* check for null values, if true */ short nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ long *ngood, /* number of good, non-null pixels? */ short *minval, /* minimum non-null value */ short *maxval, /* maximum non-null value */ double *noise, /* returned R.M.S. value of all non-null pixels */ int *status) /* error status */ /* Estimate the median and background noise in the input image using 3rd order differences. The noise in the background of the image is calculated using the 3rd order algorithm developed for deriving the signal to noise ratio in spectra (see issue #42 of the ST-ECF newsletter, http://www.stecf.org/documents/newsletter/) noise = 1.482602 / sqrt(6) * median (abs(2*flux(i) - flux(i-2) - flux(i+2))) The returned estimates are the median of the values that are computed for each row of the image. */ { long ii, jj, nrows = 0, nvals, ngoodpix = 0; short *differences, *rowpix, v1, v2, v3, v4, v5; short xminval = SHRT_MAX, xmaxval = SHRT_MIN, do_range = 0; double *diffs, xnoise = 0, sigma; if (nx < 5) { /* treat entire array as an image with a single row */ nx = nx * ny; ny = 1; } /* rows must have at least 5 pixels */ if (nx < 5) { for (ii = 0; ii < nx; ii++) { if (nullcheck && array[ii] == nullvalue) continue; else { if (array[ii] < xminval) xminval = array[ii]; if (array[ii] > xmaxval) xmaxval = array[ii]; ngoodpix++; } } if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (ngood) *ngood = ngoodpix; if (noise) *noise = 0.; return(*status); } /* do we need to compute the min and max value? */ if (minval || maxval) do_range = 1; /* allocate arrays used to compute the median and noise estimates */ differences = calloc(nx, sizeof(short)); if (!differences) { *status = MEMORY_ALLOCATION; return(*status); } diffs = calloc(ny, sizeof(double)); if (!diffs) { free(differences); *status = MEMORY_ALLOCATION; return(*status); } /* loop over each row of the image */ for (jj=0; jj < ny; jj++) { rowpix = array + (jj * nx); /* point to first pixel in the row */ /***** find the first valid pixel in row */ ii = 0; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v1 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v1 < xminval) xminval = v1; if (v1 > xmaxval) xmaxval = v1; } /***** find the 2nd valid pixel in row (which we will skip over) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v2 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v2 < xminval) xminval = v2; if (v2 > xmaxval) xmaxval = v2; } /***** find the 3rd valid pixel in row */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v3 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v3 < xminval) xminval = v3; if (v3 > xmaxval) xmaxval = v3; } /* find the 4nd valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v4 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v4 < xminval) xminval = v4; if (v4 > xmaxval) xmaxval = v4; } /* now populate the differences arrays */ /* for the remaining pixels in the row */ nvals = 0; for (ii++; ii < nx; ii++) { /* find the next valid pixel in row */ if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) break; /* hit end of row */ v5 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v5 < xminval) xminval = v5; if (v5 > xmaxval) xmaxval = v5; } /* construct array of 3rd order absolute differences */ if (!(v1 == v2 && v2 == v3 && v3 == v4 && v4 == v5)) { differences[nvals] = abs((2 * v3) - v1 - v5); nvals++; } else { /* ignore constant background regions */ ngoodpix++; } /* shift over 1 pixel */ v1 = v2; v2 = v3; v3 = v4; v4 = v5; } /* end of loop over pixels in the row */ /* compute the 3rd order diffs */ /* Note that there are 4 more pixel values than there are diffs values. */ ngoodpix += (nvals + 4); if (nvals == 0) { continue; /* cannot compute medians on this row */ } else if (nvals == 1) { diffs[nrows] = differences[0]; } else { /* quick_select returns the median MUCH faster than using qsort */ diffs[nrows] = quick_select_short(differences, nvals); } nrows++; } /* end of loop over rows */ /* compute median of the values for each row */ if (nrows == 0) { xnoise = 0; } else if (nrows == 1) { xnoise = diffs[0]; } else { qsort(diffs, nrows, sizeof(double), FnCompare_double); xnoise = (diffs[(nrows - 1)/2] + diffs[nrows/2]) / 2.; FnMeanSigma_double(diffs, nrows, 0, 0.0, 0, &xnoise, &sigma, status); /* do a 4.5 sigma rejection of outliers */ jj = 0; sigma = 4.5 * sigma; for (ii = 0; ii < nrows; ii++) { if ( fabs(diffs[ii] - xnoise) <= sigma) { if (jj != ii) diffs[jj] = diffs[ii]; jj++; } } if (ii != jj) FnMeanSigma_double(diffs, jj, 0, 0.0, 0, &xnoise, &sigma, status); } if (ngood) *ngood = ngoodpix; if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (noise) *noise = 0.6052697 * xnoise; free(diffs); free(differences); return(*status); } /*--------------------------------------------------------------------------*/ static int FnNoise3_int (int *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ int nullcheck, /* check for null values, if true */ int nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ long *ngood, /* number of good, non-null pixels? */ int *minval, /* minimum non-null value */ int *maxval, /* maximum non-null value */ double *noise, /* returned R.M.S. value of all non-null pixels */ int *status) /* error status */ /* Estimate the background noise in the input image using 3rd order differences. The noise in the background of the image is calculated using the 3rd order algorithm developed for deriving the signal to noise ratio in spectra (see issue #42 of the ST-ECF newsletter, http://www.stecf.org/documents/newsletter/) noise = 1.482602 / sqrt(6) * median (abs(2*flux(i) - flux(i-2) - flux(i+2))) The returned estimates are the median of the values that are computed for each row of the image. */ { long ii, jj, nrows = 0, nvals, ngoodpix = 0; int *differences, *rowpix, v1, v2, v3, v4, v5; int xminval = INT_MAX, xmaxval = INT_MIN, do_range = 0; double *diffs, xnoise = 0, sigma; if (nx < 5) { /* treat entire array as an image with a single row */ nx = nx * ny; ny = 1; } /* rows must have at least 5 pixels */ if (nx < 5) { for (ii = 0; ii < nx; ii++) { if (nullcheck && array[ii] == nullvalue) continue; else { if (array[ii] < xminval) xminval = array[ii]; if (array[ii] > xmaxval) xmaxval = array[ii]; ngoodpix++; } } if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (ngood) *ngood = ngoodpix; if (noise) *noise = 0.; return(*status); } /* do we need to compute the min and max value? */ if (minval || maxval) do_range = 1; /* allocate arrays used to compute the median and noise estimates */ differences = calloc(nx, sizeof(int)); if (!differences) { *status = MEMORY_ALLOCATION; return(*status); } diffs = calloc(ny, sizeof(double)); if (!diffs) { free(differences); *status = MEMORY_ALLOCATION; return(*status); } /* loop over each row of the image */ for (jj=0; jj < ny; jj++) { rowpix = array + (jj * nx); /* point to first pixel in the row */ /***** find the first valid pixel in row */ ii = 0; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v1 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v1 < xminval) xminval = v1; if (v1 > xmaxval) xmaxval = v1; } /***** find the 2nd valid pixel in row (which we will skip over) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v2 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v2 < xminval) xminval = v2; if (v2 > xmaxval) xmaxval = v2; } /***** find the 3rd valid pixel in row */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v3 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v3 < xminval) xminval = v3; if (v3 > xmaxval) xmaxval = v3; } /* find the 4nd valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v4 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v4 < xminval) xminval = v4; if (v4 > xmaxval) xmaxval = v4; } /* now populate the differences arrays */ /* for the remaining pixels in the row */ nvals = 0; for (ii++; ii < nx; ii++) { /* find the next valid pixel in row */ if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) break; /* hit end of row */ v5 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v5 < xminval) xminval = v5; if (v5 > xmaxval) xmaxval = v5; } /* construct array of 3rd order absolute differences */ if (!(v1 == v2 && v2 == v3 && v3 == v4 && v4 == v5)) { differences[nvals] = abs((2 * v3) - v1 - v5); nvals++; } else { /* ignore constant background regions */ ngoodpix++; } /* shift over 1 pixel */ v1 = v2; v2 = v3; v3 = v4; v4 = v5; } /* end of loop over pixels in the row */ /* compute the 3rd order diffs */ /* Note that there are 4 more pixel values than there are diffs values. */ ngoodpix += (nvals + 4); if (nvals == 0) { continue; /* cannot compute medians on this row */ } else if (nvals == 1) { diffs[nrows] = differences[0]; } else { /* quick_select returns the median MUCH faster than using qsort */ diffs[nrows] = quick_select_int(differences, nvals); } nrows++; } /* end of loop over rows */ /* compute median of the values for each row */ if (nrows == 0) { xnoise = 0; } else if (nrows == 1) { xnoise = diffs[0]; } else { qsort(diffs, nrows, sizeof(double), FnCompare_double); xnoise = (diffs[(nrows - 1)/2] + diffs[nrows/2]) / 2.; FnMeanSigma_double(diffs, nrows, 0, 0.0, 0, &xnoise, &sigma, status); /* do a 4.5 sigma rejection of outliers */ jj = 0; sigma = 4.5 * sigma; for (ii = 0; ii < nrows; ii++) { if ( fabs(diffs[ii] - xnoise) <= sigma) { if (jj != ii) diffs[jj] = diffs[ii]; jj++; } } if (ii != jj) FnMeanSigma_double(diffs, jj, 0, 0.0, 0, &xnoise, &sigma, status); } if (ngood) *ngood = ngoodpix; if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (noise) *noise = 0.6052697 * xnoise; free(diffs); free(differences); return(*status); } /*--------------------------------------------------------------------------*/ static int FnNoise3_float (float *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ int nullcheck, /* check for null values, if true */ float nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ long *ngood, /* number of good, non-null pixels? */ float *minval, /* minimum non-null value */ float *maxval, /* maximum non-null value */ double *noise, /* returned R.M.S. value of all non-null pixels */ int *status) /* error status */ /* Estimate the median and background noise in the input image using 3rd order differences. The noise in the background of the image is calculated using the 3rd order algorithm developed for deriving the signal to noise ratio in spectra (see issue #42 of the ST-ECF newsletter, http://www.stecf.org/documents/newsletter/) noise = 1.482602 / sqrt(6) * median (abs(2*flux(i) - flux(i-2) - flux(i+2))) The returned estimates are the median of the values that are computed for each row of the image. */ { long ii, jj, nrows = 0, nvals, ngoodpix = 0; float *differences, *rowpix, v1, v2, v3, v4, v5; float xminval = FLT_MAX, xmaxval = -FLT_MAX; int do_range = 0; double *diffs, xnoise = 0; if (nx < 5) { /* treat entire array as an image with a single row */ nx = nx * ny; ny = 1; } /* rows must have at least 5 pixels to calc noise, so just calc min, max, ngood */ if (nx < 5) { for (ii = 0; ii < nx; ii++) { if (nullcheck && array[ii] == nullvalue) continue; else { if (array[ii] < xminval) xminval = array[ii]; if (array[ii] > xmaxval) xmaxval = array[ii]; ngoodpix++; } } if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (ngood) *ngood = ngoodpix; if (noise) *noise = 0.; return(*status); } /* do we need to compute the min and max value? */ if (minval || maxval) do_range = 1; /* allocate arrays used to compute the median and noise estimates */ if (noise) { differences = calloc(nx, sizeof(float)); if (!differences) { *status = MEMORY_ALLOCATION; return(*status); } diffs = calloc(ny, sizeof(double)); if (!diffs) { free(differences); *status = MEMORY_ALLOCATION; return(*status); } } /* loop over each row of the image */ for (jj=0; jj < ny; jj++) { rowpix = array + (jj * nx); /* point to first pixel in the row */ /***** find the first valid pixel in row */ ii = 0; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v1 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v1 < xminval) xminval = v1; if (v1 > xmaxval) xmaxval = v1; } /***** find the 2nd valid pixel in row (which we will skip over) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v2 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v2 < xminval) xminval = v2; if (v2 > xmaxval) xmaxval = v2; } /***** find the 3rd valid pixel in row */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v3 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v3 < xminval) xminval = v3; if (v3 > xmaxval) xmaxval = v3; } /* find the 4nd valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v4 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v4 < xminval) xminval = v4; if (v4 > xmaxval) xmaxval = v4; } /* now populate the differences arrays */ /* for the remaining pixels in the row */ nvals = 0; for (ii++; ii < nx; ii++) { /* find the next valid pixel in row */ if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) { ii++; } if (ii == nx) break; /* hit end of row */ v5 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v5 < xminval) xminval = v5; if (v5 > xmaxval) xmaxval = v5; } /* construct array of 3rd order absolute differences */ if (noise) { if (!(v1 == v2 && v2 == v3 && v3 == v4 && v4 == v5)) { differences[nvals] = (float) fabs((2. * v3) - v1 - v5); nvals++; } else { /* ignore constant background regions */ ngoodpix++; } } else { /* just increment the number of non-null pixels */ ngoodpix++; } /* shift over 1 pixel */ v1 = v2; v2 = v3; v3 = v4; v4 = v5; } /* end of loop over pixels in the row */ /* compute the 3rd order diffs */ /* Note that there are 4 more pixel values than there are diffs values. */ ngoodpix += (nvals + 4); if (noise) { if (nvals == 0) { continue; /* cannot compute medians on this row */ } else if (nvals == 1) { diffs[nrows] = differences[0]; } else { /* quick_select returns the median MUCH faster than using qsort */ diffs[nrows] = quick_select_float(differences, nvals); } } nrows++; } /* end of loop over rows */ /* compute median of the values for each row */ if (noise) { if (nrows == 0) { xnoise = 0; } else if (nrows == 1) { xnoise = diffs[0]; } else { qsort(diffs, nrows, sizeof(double), FnCompare_double); xnoise = (diffs[(nrows - 1)/2] + diffs[nrows/2]) / 2.; } } if (ngood) *ngood = ngoodpix; if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (noise) { *noise = 0.6052697 * xnoise; free(diffs); free(differences); } return(*status); } /*--------------------------------------------------------------------------*/ static int FnNoise3_double (double *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ int nullcheck, /* check for null values, if true */ double nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ long *ngood, /* number of good, non-null pixels? */ double *minval, /* minimum non-null value */ double *maxval, /* maximum non-null value */ double *noise, /* returned R.M.S. value of all non-null pixels */ int *status) /* error status */ /* Estimate the median and background noise in the input image using 3rd order differences. The noise in the background of the image is calculated using the 3rd order algorithm developed for deriving the signal to noise ratio in spectra (see issue #42 of the ST-ECF newsletter, http://www.stecf.org/documents/newsletter/) noise = 1.482602 / sqrt(6) * median (abs(2*flux(i) - flux(i-2) - flux(i+2))) The returned estimates are the median of the values that are computed for each row of the image. */ { long ii, jj, nrows = 0, nvals, ngoodpix = 0; double *differences, *rowpix, v1, v2, v3, v4, v5; double xminval = DBL_MAX, xmaxval = -DBL_MAX; int do_range = 0; double *diffs, xnoise = 0; if (nx < 5) { /* treat entire array as an image with a single row */ nx = nx * ny; ny = 1; } /* rows must have at least 5 pixels */ if (nx < 5) { for (ii = 0; ii < nx; ii++) { if (nullcheck && array[ii] == nullvalue) continue; else { if (array[ii] < xminval) xminval = array[ii]; if (array[ii] > xmaxval) xmaxval = array[ii]; ngoodpix++; } } if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (ngood) *ngood = ngoodpix; if (noise) *noise = 0.; return(*status); } /* do we need to compute the min and max value? */ if (minval || maxval) do_range = 1; /* allocate arrays used to compute the median and noise estimates */ if (noise) { differences = calloc(nx, sizeof(double)); if (!differences) { *status = MEMORY_ALLOCATION; return(*status); } diffs = calloc(ny, sizeof(double)); if (!diffs) { free(differences); *status = MEMORY_ALLOCATION; return(*status); } } /* loop over each row of the image */ for (jj=0; jj < ny; jj++) { rowpix = array + (jj * nx); /* point to first pixel in the row */ /***** find the first valid pixel in row */ ii = 0; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v1 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v1 < xminval) xminval = v1; if (v1 > xmaxval) xmaxval = v1; } /***** find the 2nd valid pixel in row (which we will skip over) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v2 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v2 < xminval) xminval = v2; if (v2 > xmaxval) xmaxval = v2; } /***** find the 3rd valid pixel in row */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v3 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v3 < xminval) xminval = v3; if (v3 > xmaxval) xmaxval = v3; } /* find the 4nd valid pixel in row (to be skipped) */ ii++; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v4 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v4 < xminval) xminval = v4; if (v4 > xmaxval) xmaxval = v4; } /* now populate the differences arrays */ /* for the remaining pixels in the row */ nvals = 0; for (ii++; ii < nx; ii++) { /* find the next valid pixel in row */ if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) break; /* hit end of row */ v5 = rowpix[ii]; /* store the good pixel value */ if (do_range) { if (v5 < xminval) xminval = v5; if (v5 > xmaxval) xmaxval = v5; } /* construct array of 3rd order absolute differences */ if (noise) { if (!(v1 == v2 && v2 == v3 && v3 == v4 && v4 == v5)) { differences[nvals] = fabs((2. * v3) - v1 - v5); nvals++; } else { /* ignore constant background regions */ ngoodpix++; } } else { /* just increment the number of non-null pixels */ ngoodpix++; } /* shift over 1 pixel */ v1 = v2; v2 = v3; v3 = v4; v4 = v5; } /* end of loop over pixels in the row */ /* compute the 3rd order diffs */ /* Note that there are 4 more pixel values than there are diffs values. */ ngoodpix += (nvals + 4); if (noise) { if (nvals == 0) { continue; /* cannot compute medians on this row */ } else if (nvals == 1) { diffs[nrows] = differences[0]; } else { /* quick_select returns the median MUCH faster than using qsort */ diffs[nrows] = quick_select_double(differences, nvals); } } nrows++; } /* end of loop over rows */ /* compute median of the values for each row */ if (noise) { if (nrows == 0) { xnoise = 0; } else if (nrows == 1) { xnoise = diffs[0]; } else { qsort(diffs, nrows, sizeof(double), FnCompare_double); xnoise = (diffs[(nrows - 1)/2] + diffs[nrows/2]) / 2.; } } if (ngood) *ngood = ngoodpix; if (minval) *minval = xminval; if (maxval) *maxval = xmaxval; if (noise) { *noise = 0.6052697 * xnoise; free(diffs); free(differences); } return(*status); } /*--------------------------------------------------------------------------*/ static int FnNoise1_short (short *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ int nullcheck, /* check for null values, if true */ short nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ double *noise, /* returned R.M.S. value of all non-null pixels */ int *status) /* error status */ /* Estimate the background noise in the input image using sigma of 1st order differences. noise = 1.0 / sqrt(2) * rms of (flux[i] - flux[i-1]) The returned estimate is the median of the values that are computed for each row of the image. */ { int iter; long ii, jj, kk, nrows = 0, nvals; short *differences, *rowpix, v1; double *diffs, xnoise, mean, stdev; /* rows must have at least 3 pixels to estimate noise */ if (nx < 3) { *noise = 0; return(*status); } /* allocate arrays used to compute the median and noise estimates */ differences = calloc(nx, sizeof(short)); if (!differences) { *status = MEMORY_ALLOCATION; return(*status); } diffs = calloc(ny, sizeof(double)); if (!diffs) { free(differences); *status = MEMORY_ALLOCATION; return(*status); } /* loop over each row of the image */ for (jj=0; jj < ny; jj++) { rowpix = array + (jj * nx); /* point to first pixel in the row */ /***** find the first valid pixel in row */ ii = 0; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v1 = rowpix[ii]; /* store the good pixel value */ /* now continue populating the differences arrays */ /* for the remaining pixels in the row */ nvals = 0; for (ii++; ii < nx; ii++) { /* find the next valid pixel in row */ if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) break; /* hit end of row */ /* construct array of 1st order differences */ differences[nvals] = v1 - rowpix[ii]; nvals++; /* shift over 1 pixel */ v1 = rowpix[ii]; } /* end of loop over pixels in the row */ if (nvals < 2) continue; else { FnMeanSigma_short(differences, nvals, 0, 0, 0, &mean, &stdev, status); if (stdev > 0.) { for (iter = 0; iter < NITER; iter++) { kk = 0; for (ii = 0; ii < nvals; ii++) { if (fabs (differences[ii] - mean) < SIGMA_CLIP * stdev) { if (kk < ii) differences[kk] = differences[ii]; kk++; } } if (kk == nvals) break; nvals = kk; FnMeanSigma_short(differences, nvals, 0, 0, 0, &mean, &stdev, status); } } diffs[nrows] = stdev; nrows++; } } /* end of loop over rows */ /* compute median of the values for each row */ if (nrows == 0) { xnoise = 0; } else if (nrows == 1) { xnoise = diffs[0]; } else { qsort(diffs, nrows, sizeof(double), FnCompare_double); xnoise = (diffs[(nrows - 1)/2] + diffs[nrows/2]) / 2.; } *noise = .70710678 * xnoise; free(diffs); free(differences); return(*status); } /*--------------------------------------------------------------------------*/ static int FnNoise1_int (int *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ int nullcheck, /* check for null values, if true */ int nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ double *noise, /* returned R.M.S. value of all non-null pixels */ int *status) /* error status */ /* Estimate the background noise in the input image using sigma of 1st order differences. noise = 1.0 / sqrt(2) * rms of (flux[i] - flux[i-1]) The returned estimate is the median of the values that are computed for each row of the image. */ { int iter; long ii, jj, kk, nrows = 0, nvals; int *differences, *rowpix, v1; double *diffs, xnoise, mean, stdev; /* rows must have at least 3 pixels to estimate noise */ if (nx < 3) { *noise = 0; return(*status); } /* allocate arrays used to compute the median and noise estimates */ differences = calloc(nx, sizeof(int)); if (!differences) { *status = MEMORY_ALLOCATION; return(*status); } diffs = calloc(ny, sizeof(double)); if (!diffs) { free(differences); *status = MEMORY_ALLOCATION; return(*status); } /* loop over each row of the image */ for (jj=0; jj < ny; jj++) { rowpix = array + (jj * nx); /* point to first pixel in the row */ /***** find the first valid pixel in row */ ii = 0; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v1 = rowpix[ii]; /* store the good pixel value */ /* now continue populating the differences arrays */ /* for the remaining pixels in the row */ nvals = 0; for (ii++; ii < nx; ii++) { /* find the next valid pixel in row */ if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) break; /* hit end of row */ /* construct array of 1st order differences */ differences[nvals] = v1 - rowpix[ii]; nvals++; /* shift over 1 pixel */ v1 = rowpix[ii]; } /* end of loop over pixels in the row */ if (nvals < 2) continue; else { FnMeanSigma_int(differences, nvals, 0, 0, 0, &mean, &stdev, status); if (stdev > 0.) { for (iter = 0; iter < NITER; iter++) { kk = 0; for (ii = 0; ii < nvals; ii++) { if (fabs (differences[ii] - mean) < SIGMA_CLIP * stdev) { if (kk < ii) differences[kk] = differences[ii]; kk++; } } if (kk == nvals) break; nvals = kk; FnMeanSigma_int(differences, nvals, 0, 0, 0, &mean, &stdev, status); } } diffs[nrows] = stdev; nrows++; } } /* end of loop over rows */ /* compute median of the values for each row */ if (nrows == 0) { xnoise = 0; } else if (nrows == 1) { xnoise = diffs[0]; } else { qsort(diffs, nrows, sizeof(double), FnCompare_double); xnoise = (diffs[(nrows - 1)/2] + diffs[nrows/2]) / 2.; } *noise = .70710678 * xnoise; free(diffs); free(differences); return(*status); } /*--------------------------------------------------------------------------*/ static int FnNoise1_float (float *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ int nullcheck, /* check for null values, if true */ float nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ double *noise, /* returned R.M.S. value of all non-null pixels */ int *status) /* error status */ /* Estimate the background noise in the input image using sigma of 1st order differences. noise = 1.0 / sqrt(2) * rms of (flux[i] - flux[i-1]) The returned estimate is the median of the values that are computed for each row of the image. */ { int iter; long ii, jj, kk, nrows = 0, nvals; float *differences, *rowpix, v1; double *diffs, xnoise, mean, stdev; /* rows must have at least 3 pixels to estimate noise */ if (nx < 3) { *noise = 0; return(*status); } /* allocate arrays used to compute the median and noise estimates */ differences = calloc(nx, sizeof(float)); if (!differences) { *status = MEMORY_ALLOCATION; return(*status); } diffs = calloc(ny, sizeof(double)); if (!diffs) { free(differences); *status = MEMORY_ALLOCATION; return(*status); } /* loop over each row of the image */ for (jj=0; jj < ny; jj++) { rowpix = array + (jj * nx); /* point to first pixel in the row */ /***** find the first valid pixel in row */ ii = 0; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v1 = rowpix[ii]; /* store the good pixel value */ /* now continue populating the differences arrays */ /* for the remaining pixels in the row */ nvals = 0; for (ii++; ii < nx; ii++) { /* find the next valid pixel in row */ if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) break; /* hit end of row */ /* construct array of 1st order differences */ differences[nvals] = v1 - rowpix[ii]; nvals++; /* shift over 1 pixel */ v1 = rowpix[ii]; } /* end of loop over pixels in the row */ if (nvals < 2) continue; else { FnMeanSigma_float(differences, nvals, 0, 0, 0, &mean, &stdev, status); if (stdev > 0.) { for (iter = 0; iter < NITER; iter++) { kk = 0; for (ii = 0; ii < nvals; ii++) { if (fabs (differences[ii] - mean) < SIGMA_CLIP * stdev) { if (kk < ii) differences[kk] = differences[ii]; kk++; } } if (kk == nvals) break; nvals = kk; FnMeanSigma_float(differences, nvals, 0, 0, 0, &mean, &stdev, status); } } diffs[nrows] = stdev; nrows++; } } /* end of loop over rows */ /* compute median of the values for each row */ if (nrows == 0) { xnoise = 0; } else if (nrows == 1) { xnoise = diffs[0]; } else { qsort(diffs, nrows, sizeof(double), FnCompare_double); xnoise = (diffs[(nrows - 1)/2] + diffs[nrows/2]) / 2.; } *noise = .70710678 * xnoise; free(diffs); free(differences); return(*status); } /*--------------------------------------------------------------------------*/ static int FnNoise1_double (double *array, /* 2 dimensional array of image pixels */ long nx, /* number of pixels in each row of the image */ long ny, /* number of rows in the image */ int nullcheck, /* check for null values, if true */ double nullvalue, /* value of null pixels, if nullcheck is true */ /* returned parameters */ double *noise, /* returned R.M.S. value of all non-null pixels */ int *status) /* error status */ /* Estimate the background noise in the input image using sigma of 1st order differences. noise = 1.0 / sqrt(2) * rms of (flux[i] - flux[i-1]) The returned estimate is the median of the values that are computed for each row of the image. */ { int iter; long ii, jj, kk, nrows = 0, nvals; double *differences, *rowpix, v1; double *diffs, xnoise, mean, stdev; /* rows must have at least 3 pixels to estimate noise */ if (nx < 3) { *noise = 0; return(*status); } /* allocate arrays used to compute the median and noise estimates */ differences = calloc(nx, sizeof(double)); if (!differences) { *status = MEMORY_ALLOCATION; return(*status); } diffs = calloc(ny, sizeof(double)); if (!diffs) { free(differences); *status = MEMORY_ALLOCATION; return(*status); } /* loop over each row of the image */ for (jj=0; jj < ny; jj++) { rowpix = array + (jj * nx); /* point to first pixel in the row */ /***** find the first valid pixel in row */ ii = 0; if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) continue; /* hit end of row */ v1 = rowpix[ii]; /* store the good pixel value */ /* now continue populating the differences arrays */ /* for the remaining pixels in the row */ nvals = 0; for (ii++; ii < nx; ii++) { /* find the next valid pixel in row */ if (nullcheck) while (ii < nx && rowpix[ii] == nullvalue) ii++; if (ii == nx) break; /* hit end of row */ /* construct array of 1st order differences */ differences[nvals] = v1 - rowpix[ii]; nvals++; /* shift over 1 pixel */ v1 = rowpix[ii]; } /* end of loop over pixels in the row */ if (nvals < 2) continue; else { FnMeanSigma_double(differences, nvals, 0, 0, 0, &mean, &stdev, status); if (stdev > 0.) { for (iter = 0; iter < NITER; iter++) { kk = 0; for (ii = 0; ii < nvals; ii++) { if (fabs (differences[ii] - mean) < SIGMA_CLIP * stdev) { if (kk < ii) differences[kk] = differences[ii]; kk++; } } if (kk == nvals) break; nvals = kk; FnMeanSigma_double(differences, nvals, 0, 0, 0, &mean, &stdev, status); } } diffs[nrows] = stdev; nrows++; } } /* end of loop over rows */ /* compute median of the values for each row */ if (nrows == 0) { xnoise = 0; } else if (nrows == 1) { xnoise = diffs[0]; } else { qsort(diffs, nrows, sizeof(double), FnCompare_double); xnoise = (diffs[(nrows - 1)/2] + diffs[nrows/2]) / 2.; } *noise = .70710678 * xnoise; free(diffs); free(differences); return(*status); } /*--------------------------------------------------------------------------*/ static int FnCompare_short(const void *v1, const void *v2) { const short *i1 = v1; const short *i2 = v2; if (*i1 < *i2) return(-1); else if (*i1 > *i2) return(1); else return(0); } /*--------------------------------------------------------------------------*/ static int FnCompare_int(const void *v1, const void *v2) { const int *i1 = v1; const int *i2 = v2; if (*i1 < *i2) return(-1); else if (*i1 > *i2) return(1); else return(0); } /*--------------------------------------------------------------------------*/ static int FnCompare_float(const void *v1, const void *v2) { const float *i1 = v1; const float *i2 = v2; if (*i1 < *i2) return(-1); else if (*i1 > *i2) return(1); else return(0); } /*--------------------------------------------------------------------------*/ static int FnCompare_double(const void *v1, const void *v2) { const double *i1 = v1; const double *i2 = v2; if (*i1 < *i2) return(-1); else if (*i1 > *i2) return(1); else return(0); } /*--------------------------------------------------------------------------*/ /* * These Quickselect routines are based on the algorithm described in * "Numerical recipes in C", Second Edition, * Cambridge University Press, 1992, Section 8.5, ISBN 0-521-43108-5 * This code by Nicolas Devillard - 1998. Public domain. */ /*--------------------------------------------------------------------------*/ #define ELEM_SWAP(a,b) { register float t=(a);(a)=(b);(b)=t; } static float quick_select_float(float arr[], int n) { int low, high ; int median; int middle, ll, hh; low = 0 ; high = n-1 ; median = (low + high) / 2; for (;;) { if (high <= low) /* One element only */ return arr[median] ; if (high == low + 1) { /* Two elements only */ if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; return arr[median] ; } /* Find median of low, middle and high items; swap into position low */ middle = (low + high) / 2; if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; /* Swap low item (now in position middle) into position (low+1) */ ELEM_SWAP(arr[middle], arr[low+1]) ; /* Nibble from each end towards middle, swapping items when stuck */ ll = low + 1; hh = high; for (;;) { do ll++; while (arr[low] > arr[ll]) ; do hh--; while (arr[hh] > arr[low]) ; if (hh < ll) break; ELEM_SWAP(arr[ll], arr[hh]) ; } /* Swap middle item (in position low) back into correct position */ ELEM_SWAP(arr[low], arr[hh]) ; /* Re-set active partition */ if (hh <= median) low = ll; if (hh >= median) high = hh - 1; } } #undef ELEM_SWAP /*--------------------------------------------------------------------------*/ #define ELEM_SWAP(a,b) { register short t=(a);(a)=(b);(b)=t; } static short quick_select_short(short arr[], int n) { int low, high ; int median; int middle, ll, hh; low = 0 ; high = n-1 ; median = (low + high) / 2; for (;;) { if (high <= low) /* One element only */ return arr[median] ; if (high == low + 1) { /* Two elements only */ if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; return arr[median] ; } /* Find median of low, middle and high items; swap into position low */ middle = (low + high) / 2; if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; /* Swap low item (now in position middle) into position (low+1) */ ELEM_SWAP(arr[middle], arr[low+1]) ; /* Nibble from each end towards middle, swapping items when stuck */ ll = low + 1; hh = high; for (;;) { do ll++; while (arr[low] > arr[ll]) ; do hh--; while (arr[hh] > arr[low]) ; if (hh < ll) break; ELEM_SWAP(arr[ll], arr[hh]) ; } /* Swap middle item (in position low) back into correct position */ ELEM_SWAP(arr[low], arr[hh]) ; /* Re-set active partition */ if (hh <= median) low = ll; if (hh >= median) high = hh - 1; } } #undef ELEM_SWAP /*--------------------------------------------------------------------------*/ #define ELEM_SWAP(a,b) { register int t=(a);(a)=(b);(b)=t; } static int quick_select_int(int arr[], int n) { int low, high ; int median; int middle, ll, hh; low = 0 ; high = n-1 ; median = (low + high) / 2; for (;;) { if (high <= low) /* One element only */ return arr[median] ; if (high == low + 1) { /* Two elements only */ if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; return arr[median] ; } /* Find median of low, middle and high items; swap into position low */ middle = (low + high) / 2; if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; /* Swap low item (now in position middle) into position (low+1) */ ELEM_SWAP(arr[middle], arr[low+1]) ; /* Nibble from each end towards middle, swapping items when stuck */ ll = low + 1; hh = high; for (;;) { do ll++; while (arr[low] > arr[ll]) ; do hh--; while (arr[hh] > arr[low]) ; if (hh < ll) break; ELEM_SWAP(arr[ll], arr[hh]) ; } /* Swap middle item (in position low) back into correct position */ ELEM_SWAP(arr[low], arr[hh]) ; /* Re-set active partition */ if (hh <= median) low = ll; if (hh >= median) high = hh - 1; } } #undef ELEM_SWAP /*--------------------------------------------------------------------------*/ #define ELEM_SWAP(a,b) { register LONGLONG t=(a);(a)=(b);(b)=t; } static LONGLONG quick_select_longlong(LONGLONG arr[], int n) { int low, high ; int median; int middle, ll, hh; low = 0 ; high = n-1 ; median = (low + high) / 2; for (;;) { if (high <= low) /* One element only */ return arr[median] ; if (high == low + 1) { /* Two elements only */ if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; return arr[median] ; } /* Find median of low, middle and high items; swap into position low */ middle = (low + high) / 2; if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; /* Swap low item (now in position middle) into position (low+1) */ ELEM_SWAP(arr[middle], arr[low+1]) ; /* Nibble from each end towards middle, swapping items when stuck */ ll = low + 1; hh = high; for (;;) { do ll++; while (arr[low] > arr[ll]) ; do hh--; while (arr[hh] > arr[low]) ; if (hh < ll) break; ELEM_SWAP(arr[ll], arr[hh]) ; } /* Swap middle item (in position low) back into correct position */ ELEM_SWAP(arr[low], arr[hh]) ; /* Re-set active partition */ if (hh <= median) low = ll; if (hh >= median) high = hh - 1; } } #undef ELEM_SWAP /*--------------------------------------------------------------------------*/ #define ELEM_SWAP(a,b) { register double t=(a);(a)=(b);(b)=t; } static double quick_select_double(double arr[], int n) { int low, high ; int median; int middle, ll, hh; low = 0 ; high = n-1 ; median = (low + high) / 2; for (;;) { if (high <= low) /* One element only */ return arr[median] ; if (high == low + 1) { /* Two elements only */ if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; return arr[median] ; } /* Find median of low, middle and high items; swap into position low */ middle = (low + high) / 2; if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; /* Swap low item (now in position middle) into position (low+1) */ ELEM_SWAP(arr[middle], arr[low+1]) ; /* Nibble from each end towards middle, swapping items when stuck */ ll = low + 1; hh = high; for (;;) { do ll++; while (arr[low] > arr[ll]) ; do hh--; while (arr[hh] > arr[low]) ; if (hh < ll) break; ELEM_SWAP(arr[ll], arr[hh]) ; } /* Swap middle item (in position low) back into correct position */ ELEM_SWAP(arr[low], arr[hh]) ; /* Re-set active partition */ if (hh <= median) low = ll; if (hh >= median) high = hh - 1; } } #undef ELEM_SWAP astropy-1.1.1/cextern/cfitsio/iraffits.c0000644001134200020070000015671012602615520021213 0ustar embrayscience00000000000000/*------------------------------------------------------------------------*/ /* */ /* These routines have been modified by William Pence for use by CFITSIO */ /* The original files were provided by Doug Mink */ /*------------------------------------------------------------------------*/ /* File imhfile.c * August 6, 1998 * By Doug Mink, based on Mike VanHilst's readiraf.c * Module: imhfile.c (IRAF .imh image file reading and writing) * Purpose: Read and write IRAF image files (and translate headers) * Subroutine: irafrhead (filename, lfhead, fitsheader, lihead) * Read IRAF image header * Subroutine: irafrimage (fitsheader) * Read IRAF image pixels (call after irafrhead) * Subroutine: same_path (pixname, hdrname) * Put filename and header path together * Subroutine: iraf2fits (hdrname, irafheader, nbiraf, nbfits) * Convert IRAF image header to FITS image header * Subroutine: irafgeti4 (irafheader, offset) * Get 4-byte integer from arbitrary part of IRAF header * Subroutine: irafgetc2 (irafheader, offset) * Get character string from arbitrary part of IRAF v.1 header * Subroutine: irafgetc (irafheader, offset) * Get character string from arbitrary part of IRAF header * Subroutine: iraf2str (irafstring, nchar) * Convert 2-byte/char IRAF string to 1-byte/char string * Subroutine: irafswap (bitpix,string,nbytes) * Swap bytes in string in place, with FITS bits/pixel code * Subroutine: irafswap2 (string,nbytes) * Swap bytes in string in place * Subroutine irafswap4 (string,nbytes) * Reverse bytes of Integer*4 or Real*4 vector in place * Subroutine irafswap8 (string,nbytes) * Reverse bytes of Real*8 vector in place * Copyright: 2000 Smithsonian Astrophysical Observatory * You may do anything you like with this file except remove * this copyright. The Smithsonian Astrophysical Observatory * makes no representations about the suitability of this * software for any purpose. It is provided "as is" without * express or implied warranty. */ #include /* define stderr, FD, and NULL */ #include #include /* stddef.h is apparently needed to define size_t */ #include #define FILE_NOT_OPENED 104 /* Parameters from iraf/lib/imhdr.h for IRAF version 1 images */ #define SZ_IMPIXFILE 79 /* name of pixel storage file */ #define SZ_IMHDRFILE 79 /* length of header storage file */ #define SZ_IMTITLE 79 /* image title string */ #define LEN_IMHDR 2052 /* length of std header */ /* Parameters from iraf/lib/imhdr.h for IRAF version 2 images */ #define SZ_IM2PIXFILE 255 /* name of pixel storage file */ #define SZ_IM2HDRFILE 255 /* name of header storage file */ #define SZ_IM2TITLE 383 /* image title string */ #define LEN_IM2HDR 2046 /* length of std header */ /* Offsets into header in bytes for parameters in IRAF version 1 images */ #define IM_HDRLEN 12 /* Length of header in 4-byte ints */ #define IM_PIXTYPE 16 /* Datatype of the pixels */ #define IM_NDIM 20 /* Number of dimensions */ #define IM_LEN 24 /* Length (as stored) */ #define IM_PHYSLEN 52 /* Physical length (as stored) */ #define IM_PIXOFF 88 /* Offset of the pixels */ #define IM_CTIME 108 /* Time of image creation */ #define IM_MTIME 112 /* Time of last modification */ #define IM_LIMTIME 116 /* Time of min,max computation */ #define IM_MAX 120 /* Maximum pixel value */ #define IM_MIN 124 /* Maximum pixel value */ #define IM_PIXFILE 412 /* Name of pixel storage file */ #define IM_HDRFILE 572 /* Name of header storage file */ #define IM_TITLE 732 /* Image name string */ /* Offsets into header in bytes for parameters in IRAF version 2 images */ #define IM2_HDRLEN 6 /* Length of header in 4-byte ints */ #define IM2_PIXTYPE 10 /* Datatype of the pixels */ #define IM2_SWAPPED 14 /* Pixels are byte swapped */ #define IM2_NDIM 18 /* Number of dimensions */ #define IM2_LEN 22 /* Length (as stored) */ #define IM2_PHYSLEN 50 /* Physical length (as stored) */ #define IM2_PIXOFF 86 /* Offset of the pixels */ #define IM2_CTIME 106 /* Time of image creation */ #define IM2_MTIME 110 /* Time of last modification */ #define IM2_LIMTIME 114 /* Time of min,max computation */ #define IM2_MAX 118 /* Maximum pixel value */ #define IM2_MIN 122 /* Maximum pixel value */ #define IM2_PIXFILE 126 /* Name of pixel storage file */ #define IM2_HDRFILE 382 /* Name of header storage file */ #define IM2_TITLE 638 /* Image name string */ /* Codes from iraf/unix/hlib/iraf.h */ #define TY_CHAR 2 #define TY_SHORT 3 #define TY_INT 4 #define TY_LONG 5 #define TY_REAL 6 #define TY_DOUBLE 7 #define TY_COMPLEX 8 #define TY_POINTER 9 #define TY_STRUCT 10 #define TY_USHORT 11 #define TY_UBYTE 12 #define LEN_PIXHDR 1024 #define MAXINT 2147483647 /* Biggest number that can fit in long */ static int isirafswapped(char *irafheader, int offset); static int irafgeti4(char *irafheader, int offset); static char *irafgetc2(char *irafheader, int offset, int nc); static char *irafgetc(char *irafheader, int offset, int nc); static char *iraf2str(char *irafstring, int nchar); static char *irafrdhead(const char *filename, int *lihead); static int irafrdimage (char **buffptr, size_t *buffsize, size_t *filesize, int *status); static int iraftofits (char *hdrname, char *irafheader, int nbiraf, char **buffptr, size_t *nbfits, size_t *fitssize, int *status); static char *same_path(char *pixname, const char *hdrname); static int swaphead=0; /* =1 to swap data bytes of IRAF header values */ static int swapdata=0; /* =1 to swap bytes in IRAF data pixels */ static void irafswap(int bitpix, char *string, int nbytes); static void irafswap2(char *string, int nbytes); static void irafswap4(char *string, int nbytes); static void irafswap8(char *string, int nbytes); static int pix_version (char *irafheader); static int irafncmp (char *irafheader, char *teststring, int nc); static int machswap(void); static int head_version (char *irafheader); static int hgeti4(char* hstring, char* keyword, int* val); static int hgets(char* hstring, char* keyword, int lstr, char* string); static char* hgetc(char* hstring, char* keyword); static char* ksearch(char* hstring, char* keyword); static char *blsearch (char* hstring, char* keyword); static char *strsrch (char* s1, char* s2); static char *strnsrch ( char* s1,char* s2,int ls1); static void hputi4(char* hstring,char* keyword, int ival); static void hputs(char* hstring,char* keyword,char* cval); static void hputcom(char* hstring,char* keyword,char* comment); static void hputl(char* hstring,char* keyword,int lval); static void hputc(char* hstring,char* keyword,char* cval); static int getirafpixname (const char *hdrname, char *irafheader, char *pixfilename, int *status); int iraf2mem(char *filename, char **buffptr, size_t *buffsize, size_t *filesize, int *status); void ffpmsg(const char *err_message); /*--------------------------------------------------------------------------*/ int fits_delete_iraf_file(const char *filename, /* name of input file */ int *status) /* IO - error status */ /* Delete the iraf .imh header file and the associated .pix data file */ { char *irafheader; int lenirafhead; char pixfilename[SZ_IM2PIXFILE+1]; /* read IRAF header into dynamically created char array (free it later!) */ irafheader = irafrdhead(filename, &lenirafhead); if (!irafheader) { return(*status = FILE_NOT_OPENED); } getirafpixname (filename, irafheader, pixfilename, status); /* don't need the IRAF header any more */ free(irafheader); if (*status > 0) return(*status); remove(filename); remove(pixfilename); return(*status); } /*--------------------------------------------------------------------------*/ int iraf2mem(char *filename, /* name of input file */ char **buffptr, /* O - memory pointer (initially NULL) */ size_t *buffsize, /* O - size of mem buffer, in bytes */ size_t *filesize, /* O - size of FITS file, in bytes */ int *status) /* IO - error status */ /* Driver routine that reads an IRAF image into memory, also converting it into FITS format. */ { char *irafheader; int lenirafhead; *buffptr = NULL; *buffsize = 0; *filesize = 0; /* read IRAF header into dynamically created char array (free it later!) */ irafheader = irafrdhead(filename, &lenirafhead); if (!irafheader) { return(*status = FILE_NOT_OPENED); } /* convert IRAF header to FITS header in memory */ iraftofits(filename, irafheader, lenirafhead, buffptr, buffsize, filesize, status); /* don't need the IRAF header any more */ free(irafheader); if (*status > 0) return(*status); *filesize = (((*filesize - 1) / 2880 ) + 1 ) * 2880; /* multiple of 2880 */ /* append the image data onto the FITS header */ irafrdimage(buffptr, buffsize, filesize, status); return(*status); } /*--------------------------------------------------------------------------*/ /* Subroutine: irafrdhead (was irafrhead in D. Mink's original code) * Purpose: Open and read the iraf .imh file. * Returns: NULL if failure, else pointer to IRAF .imh image header * Notes: The imhdr format is defined in iraf/lib/imhdr.h, some of * which defines or mimicked, above. */ static char *irafrdhead ( const char *filename, /* Name of IRAF header file */ int *lihead) /* Length of IRAF image header in bytes (returned) */ { FILE *fd; int nbr; char *irafheader; char errmsg[81]; long nbhead; int nihead; *lihead = 0; /* open the image header file */ fd = fopen (filename, "rb"); if (fd == NULL) { ffpmsg("unable to open IRAF header file:"); ffpmsg(filename); return (NULL); } /* Find size of image header file */ if (fseek(fd, 0, 2) != 0) /* move to end of the file */ { ffpmsg("IRAFRHEAD: cannot seek in file:"); ffpmsg(filename); return(NULL); } nbhead = ftell(fd); /* position = size of file */ if (nbhead < 0) { ffpmsg("IRAFRHEAD: cannot get pos. in file:"); ffpmsg(filename); return(NULL); } if (fseek(fd, 0, 0) != 0) /* move back to beginning */ { ffpmsg("IRAFRHEAD: cannot seek to beginning of file:"); ffpmsg(filename); return(NULL); } /* allocate initial sized buffer */ nihead = nbhead + 5000; irafheader = (char *) calloc (1, nihead); if (irafheader == NULL) { sprintf(errmsg, "IRAFRHEAD Cannot allocate %d-byte header", nihead); ffpmsg(errmsg); ffpmsg(filename); return (NULL); } *lihead = nihead; /* Read IRAF header */ nbr = fread (irafheader, 1, nbhead, fd); fclose (fd); /* Reject if header less than minimum length */ if (nbr < LEN_PIXHDR) { sprintf(errmsg, "IRAFRHEAD header file: %d / %d bytes read.", nbr,LEN_PIXHDR); ffpmsg(errmsg); ffpmsg(filename); free (irafheader); return (NULL); } return (irafheader); } /*--------------------------------------------------------------------------*/ static int irafrdimage ( char **buffptr, /* FITS image header (filled) */ size_t *buffsize, /* allocated size of the buffer */ size_t *filesize, /* actual size of the FITS file */ int *status) { FILE *fd; char *bang; int nax = 1, naxis1 = 1, naxis2 = 1, naxis3 = 1, naxis4 = 1, npaxis1 = 1, npaxis2; int bitpix, bytepix, i; char *fitsheader, *image; int nbr, nbimage, nbaxis, nbl, nbdiff; char *pixheader; char *linebuff; int imhver, lpixhead = 0; char pixname[SZ_IM2PIXFILE+1]; char errmsg[81]; size_t newfilesize; fitsheader = *buffptr; /* pointer to start of header */ /* Convert pixel file name to character string */ hgets (fitsheader, "PIXFILE", SZ_IM2PIXFILE, pixname); hgeti4 (fitsheader, "PIXOFF", &lpixhead); /* Open pixel file, ignoring machine name if present */ if ((bang = strchr (pixname, '!')) != NULL ) fd = fopen (bang + 1, "rb"); else fd = fopen (pixname, "rb"); /* Print error message and exit if pixel file is not found */ if (!fd) { ffpmsg("IRAFRIMAGE: Cannot open IRAF pixel file:"); ffpmsg(pixname); return (*status = FILE_NOT_OPENED); } /* Read pixel header */ pixheader = (char *) calloc (lpixhead, 1); if (pixheader == NULL) { ffpmsg("IRAFRIMAGE: Cannot alloc memory for pixel header"); ffpmsg(pixname); fclose (fd); return (*status = FILE_NOT_OPENED); } nbr = fread (pixheader, 1, lpixhead, fd); /* Check size of pixel header */ if (nbr < lpixhead) { sprintf(errmsg, "IRAF pixel file: %d / %d bytes read.", nbr,LEN_PIXHDR); ffpmsg(errmsg); free (pixheader); fclose (fd); return (*status = FILE_NOT_OPENED); } /* check pixel header magic word */ imhver = pix_version (pixheader); if (imhver < 1) { ffpmsg("File not valid IRAF pixel file:"); ffpmsg(pixname); free (pixheader); fclose (fd); return (*status = FILE_NOT_OPENED); } free (pixheader); /* Find number of bytes to read */ hgeti4 (fitsheader,"NAXIS",&nax); hgeti4 (fitsheader,"NAXIS1",&naxis1); hgeti4 (fitsheader,"NPAXIS1",&npaxis1); if (nax > 1) { hgeti4 (fitsheader,"NAXIS2",&naxis2); hgeti4 (fitsheader,"NPAXIS2",&npaxis2); } if (nax > 2) hgeti4 (fitsheader,"NAXIS3",&naxis3); if (nax > 3) hgeti4 (fitsheader,"NAXIS4",&naxis4); hgeti4 (fitsheader,"BITPIX",&bitpix); if (bitpix < 0) bytepix = -bitpix / 8; else bytepix = bitpix / 8; nbimage = naxis1 * naxis2 * naxis3 * naxis4 * bytepix; newfilesize = *filesize + nbimage; /* header + data */ newfilesize = (((newfilesize - 1) / 2880 ) + 1 ) * 2880; if (newfilesize > *buffsize) /* need to allocate more memory? */ { fitsheader = (char *) realloc (*buffptr, newfilesize); if (fitsheader == NULL) { sprintf(errmsg, "IRAFRIMAGE Cannot allocate %d-byte image buffer", (int) (*filesize)); ffpmsg(errmsg); ffpmsg(pixname); fclose (fd); return (*status = FILE_NOT_OPENED); } } *buffptr = fitsheader; *buffsize = newfilesize; image = fitsheader + *filesize; *filesize = newfilesize; /* Read IRAF image all at once if physical and image dimensions are the same */ if (npaxis1 == naxis1) nbr = fread (image, 1, nbimage, fd); /* Read IRAF image one line at a time if physical and image dimensions differ */ else { nbdiff = (npaxis1 - naxis1) * bytepix; nbaxis = naxis1 * bytepix; linebuff = image; nbr = 0; if (naxis2 == 1 && naxis3 > 1) naxis2 = naxis3; for (i = 0; i < naxis2; i++) { nbl = fread (linebuff, 1, nbaxis, fd); nbr = nbr + nbl; fseek (fd, nbdiff, 1); linebuff = linebuff + nbaxis; } } fclose (fd); /* Check size of image */ if (nbr < nbimage) { sprintf(errmsg, "IRAF pixel file: %d / %d bytes read.", nbr,nbimage); ffpmsg(errmsg); ffpmsg(pixname); return (*status = FILE_NOT_OPENED); } /* Byte-reverse image, if necessary */ if (swapdata) irafswap (bitpix, image, nbimage); return (*status); } /*--------------------------------------------------------------------------*/ /* Return IRAF image format version number from magic word in IRAF header*/ static int head_version ( char *irafheader) /* IRAF image header from file */ { /* Check header file magic word */ if (irafncmp (irafheader, "imhdr", 5) != 0 ) { if (strncmp (irafheader, "imhv2", 5) != 0) return (0); else return (2); } else return (1); } /*--------------------------------------------------------------------------*/ /* Return IRAF image format version number from magic word in IRAF pixel file */ static int pix_version ( char *irafheader) /* IRAF image header from file */ { /* Check pixel file header magic word */ if (irafncmp (irafheader, "impix", 5) != 0) { if (strncmp (irafheader, "impv2", 5) != 0) return (0); else return (2); } else return (1); } /*--------------------------------------------------------------------------*/ /* Verify that file is valid IRAF imhdr or impix by checking first 5 chars * Returns: 0 on success, 1 on failure */ static int irafncmp ( char *irafheader, /* IRAF image header from file */ char *teststring, /* C character string to compare */ int nc) /* Number of characters to compate */ { char *line; if ((line = iraf2str (irafheader, nc)) == NULL) return (1); if (strncmp (line, teststring, nc) == 0) { free (line); return (0); } else { free (line); return (1); } } /*--------------------------------------------------------------------------*/ /* Convert IRAF image header to FITS image header, returning FITS header */ static int iraftofits ( char *hdrname, /* IRAF header file name (may be path) */ char *irafheader, /* IRAF image header */ int nbiraf, /* Number of bytes in IRAF header */ char **buffptr, /* pointer to the FITS header */ size_t *nbfits, /* allocated size of the FITS header buffer */ size_t *fitssize, /* Number of bytes in FITS header (returned) */ /* = number of bytes to the end of the END keyword */ int *status) { char *objname; /* object name from FITS file */ int lstr, i, j, k, ib, nax, nbits; char *pixname, *newpixname, *bang, *chead; char *fitsheader; int nblock, nlines; char *fhead, *fhead1, *fp, endline[81]; char irafchar; char fitsline[81]; int pixtype; int imhver, n, imu, pixoff, impixoff; /* int immax, immin, imtime; */ int imndim, imlen, imphyslen, impixtype; char errmsg[81]; /* Set up last line of FITS header */ (void)strncpy (endline,"END", 3); for (i = 3; i < 80; i++) endline[i] = ' '; endline[80] = 0; /* Check header magic word */ imhver = head_version (irafheader); if (imhver < 1) { ffpmsg("File not valid IRAF image header"); ffpmsg(hdrname); return(*status = FILE_NOT_OPENED); } if (imhver == 2) { nlines = 24 + ((nbiraf - LEN_IM2HDR) / 81); imndim = IM2_NDIM; imlen = IM2_LEN; imphyslen = IM2_PHYSLEN; impixtype = IM2_PIXTYPE; impixoff = IM2_PIXOFF; /* imtime = IM2_MTIME; */ /* immax = IM2_MAX; */ /* immin = IM2_MIN; */ } else { nlines = 24 + ((nbiraf - LEN_IMHDR) / 162); imndim = IM_NDIM; imlen = IM_LEN; imphyslen = IM_PHYSLEN; impixtype = IM_PIXTYPE; impixoff = IM_PIXOFF; /* imtime = IM_MTIME; */ /* immax = IM_MAX; */ /* immin = IM_MIN; */ } /* Initialize FITS header */ nblock = (nlines * 80) / 2880; *nbfits = (nblock + 5) * 2880 + 4; fitsheader = (char *) calloc (*nbfits, 1); if (fitsheader == NULL) { sprintf(errmsg, "IRAF2FITS Cannot allocate %d-byte FITS header", (int) (*nbfits)); ffpmsg(hdrname); return (*status = FILE_NOT_OPENED); } fhead = fitsheader; *buffptr = fitsheader; (void)strncpy (fitsheader, endline, 80); hputl (fitsheader, "SIMPLE", 1); fhead = fhead + 80; /* check if the IRAF file is in big endian (sun) format (= 0) or not. */ /* This is done by checking the 4 byte integer in the header that */ /* represents the iraf pixel type. This 4-byte word is guaranteed to */ /* have the least sig byte != 0 and the most sig byte = 0, so if the */ /* first byte of the word != 0, then the file in little endian format */ /* like on an Alpha machine. */ swaphead = isirafswapped(irafheader, impixtype); if (imhver == 1) swapdata = swaphead; /* vers 1 data has same swapness as header */ else swapdata = irafgeti4 (irafheader, IM2_SWAPPED); /* Set pixel size in FITS header */ pixtype = irafgeti4 (irafheader, impixtype); switch (pixtype) { case TY_CHAR: nbits = 8; break; case TY_UBYTE: nbits = 8; break; case TY_SHORT: nbits = 16; break; case TY_USHORT: nbits = -16; break; case TY_INT: case TY_LONG: nbits = 32; break; case TY_REAL: nbits = -32; break; case TY_DOUBLE: nbits = -64; break; default: sprintf(errmsg,"Unsupported IRAF data type: %d", pixtype); ffpmsg(errmsg); ffpmsg(hdrname); return (*status = FILE_NOT_OPENED); } hputi4 (fitsheader,"BITPIX",nbits); hputcom (fitsheader,"BITPIX", "IRAF .imh pixel type"); fhead = fhead + 80; /* Set image dimensions in FITS header */ nax = irafgeti4 (irafheader, imndim); hputi4 (fitsheader,"NAXIS",nax); hputcom (fitsheader,"NAXIS", "IRAF .imh naxis"); fhead = fhead + 80; n = irafgeti4 (irafheader, imlen); hputi4 (fitsheader, "NAXIS1", n); hputcom (fitsheader,"NAXIS1", "IRAF .imh image naxis[1]"); fhead = fhead + 80; if (nax > 1) { n = irafgeti4 (irafheader, imlen+4); hputi4 (fitsheader, "NAXIS2", n); hputcom (fitsheader,"NAXIS2", "IRAF .imh image naxis[2]"); fhead = fhead + 80; } if (nax > 2) { n = irafgeti4 (irafheader, imlen+8); hputi4 (fitsheader, "NAXIS3", n); hputcom (fitsheader,"NAXIS3", "IRAF .imh image naxis[3]"); fhead = fhead + 80; } if (nax > 3) { n = irafgeti4 (irafheader, imlen+12); hputi4 (fitsheader, "NAXIS4", n); hputcom (fitsheader,"NAXIS4", "IRAF .imh image naxis[4]"); fhead = fhead + 80; } /* Set object name in FITS header */ if (imhver == 2) objname = irafgetc (irafheader, IM2_TITLE, SZ_IM2TITLE); else objname = irafgetc2 (irafheader, IM_TITLE, SZ_IMTITLE); if ((lstr = strlen (objname)) < 8) { for (i = lstr; i < 8; i++) objname[i] = ' '; objname[8] = 0; } hputs (fitsheader,"OBJECT",objname); hputcom (fitsheader,"OBJECT", "IRAF .imh title"); free (objname); fhead = fhead + 80; /* Save physical axis lengths so image file can be read */ n = irafgeti4 (irafheader, imphyslen); hputi4 (fitsheader, "NPAXIS1", n); hputcom (fitsheader,"NPAXIS1", "IRAF .imh physical naxis[1]"); fhead = fhead + 80; if (nax > 1) { n = irafgeti4 (irafheader, imphyslen+4); hputi4 (fitsheader, "NPAXIS2", n); hputcom (fitsheader,"NPAXIS2", "IRAF .imh physical naxis[2]"); fhead = fhead + 80; } if (nax > 2) { n = irafgeti4 (irafheader, imphyslen+8); hputi4 (fitsheader, "NPAXIS3", n); hputcom (fitsheader,"NPAXIS3", "IRAF .imh physical naxis[3]"); fhead = fhead + 80; } if (nax > 3) { n = irafgeti4 (irafheader, imphyslen+12); hputi4 (fitsheader, "NPAXIS4", n); hputcom (fitsheader,"NPAXIS4", "IRAF .imh physical naxis[4]"); fhead = fhead + 80; } /* Save image header filename in header */ hputs (fitsheader,"IMHFILE",hdrname); hputcom (fitsheader,"IMHFILE", "IRAF header file name"); fhead = fhead + 80; /* Save image pixel file pathname in header */ if (imhver == 2) pixname = irafgetc (irafheader, IM2_PIXFILE, SZ_IM2PIXFILE); else pixname = irafgetc2 (irafheader, IM_PIXFILE, SZ_IMPIXFILE); if (strncmp(pixname, "HDR", 3) == 0 ) { newpixname = same_path (pixname, hdrname); if (newpixname) { free (pixname); pixname = newpixname; } } if (strchr (pixname, '/') == NULL && strchr (pixname, '$') == NULL) { newpixname = same_path (pixname, hdrname); if (newpixname) { free (pixname); pixname = newpixname; } } if ((bang = strchr (pixname, '!')) != NULL ) hputs (fitsheader,"PIXFILE",bang+1); else hputs (fitsheader,"PIXFILE",pixname); free (pixname); hputcom (fitsheader,"PIXFILE", "IRAF .pix pixel file"); fhead = fhead + 80; /* Save image offset from star of pixel file */ pixoff = irafgeti4 (irafheader, impixoff); pixoff = (pixoff - 1) * 2; hputi4 (fitsheader, "PIXOFF", pixoff); hputcom (fitsheader,"PIXOFF", "IRAF .pix pixel offset (Do not change!)"); fhead = fhead + 80; /* Save IRAF file format version in header */ hputi4 (fitsheader,"IMHVER",imhver); hputcom (fitsheader,"IMHVER", "IRAF .imh format version (1 or 2)"); fhead = fhead + 80; /* Save flag as to whether to swap IRAF data for this file and machine */ if (swapdata) hputl (fitsheader, "PIXSWAP", 1); else hputl (fitsheader, "PIXSWAP", 0); hputcom (fitsheader,"PIXSWAP", "IRAF pixels, FITS byte orders differ if T"); fhead = fhead + 80; /* Add user portion of IRAF header to FITS header */ fitsline[80] = 0; if (imhver == 2) { imu = LEN_IM2HDR; chead = irafheader; j = 0; for (k = 0; k < 80; k++) fitsline[k] = ' '; for (i = imu; i < nbiraf; i++) { irafchar = chead[i]; if (irafchar == 0) break; else if (irafchar == 10) { (void)strncpy (fhead, fitsline, 80); /* fprintf (stderr,"%80s\n",fitsline); */ if (strncmp (fitsline, "OBJECT ", 7) != 0) { fhead = fhead + 80; } for (k = 0; k < 80; k++) fitsline[k] = ' '; j = 0; } else { if (j > 80) { if (strncmp (fitsline, "OBJECT ", 7) != 0) { (void)strncpy (fhead, fitsline, 80); /* fprintf (stderr,"%80s\n",fitsline); */ j = 9; fhead = fhead + 80; } for (k = 0; k < 80; k++) fitsline[k] = ' '; } if (irafchar > 32 && irafchar < 127) fitsline[j] = irafchar; j++; } } } else { imu = LEN_IMHDR; chead = irafheader; if (swaphead == 1) ib = 0; else ib = 1; for (k = 0; k < 80; k++) fitsline[k] = ' '; j = 0; for (i = imu; i < nbiraf; i=i+2) { irafchar = chead[i+ib]; if (irafchar == 0) break; else if (irafchar == 10) { if (strncmp (fitsline, "OBJECT ", 7) != 0) { (void)strncpy (fhead, fitsline, 80); fhead = fhead + 80; } /* fprintf (stderr,"%80s\n",fitsline); */ j = 0; for (k = 0; k < 80; k++) fitsline[k] = ' '; } else { if (j > 80) { if (strncmp (fitsline, "OBJECT ", 7) != 0) { (void)strncpy (fhead, fitsline, 80); j = 9; fhead = fhead + 80; } /* fprintf (stderr,"%80s\n",fitsline); */ for (k = 0; k < 80; k++) fitsline[k] = ' '; } if (irafchar > 32 && irafchar < 127) fitsline[j] = irafchar; j++; } } } /* Add END to last line */ (void)strncpy (fhead, endline, 80); /* Find end of last 2880-byte block of header */ fhead = ksearch (fitsheader, "END") + 80; nblock = *nbfits / 2880; fhead1 = fitsheader + (nblock * 2880); *fitssize = fhead - fitsheader; /* no. of bytes to end of END keyword */ /* Pad rest of header with spaces */ strncpy (endline," ",3); for (fp = fhead; fp < fhead1; fp = fp + 80) { (void)strncpy (fp, endline,80); } return (*status); } /*--------------------------------------------------------------------------*/ /* get the IRAF pixel file name */ static int getirafpixname ( const char *hdrname, /* IRAF header file name (may be path) */ char *irafheader, /* IRAF image header */ char *pixfilename, /* IRAF pixel file name */ int *status) { int imhver; char *pixname, *newpixname, *bang; /* Check header magic word */ imhver = head_version (irafheader); if (imhver < 1) { ffpmsg("File not valid IRAF image header"); ffpmsg(hdrname); return(*status = FILE_NOT_OPENED); } /* get image pixel file pathname in header */ if (imhver == 2) pixname = irafgetc (irafheader, IM2_PIXFILE, SZ_IM2PIXFILE); else pixname = irafgetc2 (irafheader, IM_PIXFILE, SZ_IMPIXFILE); if (strncmp(pixname, "HDR", 3) == 0 ) { newpixname = same_path (pixname, hdrname); if (newpixname) { free (pixname); pixname = newpixname; } } if (strchr (pixname, '/') == NULL && strchr (pixname, '$') == NULL) { newpixname = same_path (pixname, hdrname); if (newpixname) { free (pixname); pixname = newpixname; } } if ((bang = strchr (pixname, '!')) != NULL ) strcpy(pixfilename,bang+1); else strcpy(pixfilename,pixname); free (pixname); return (*status); } /*--------------------------------------------------------------------------*/ /* Put filename and header path together */ static char *same_path ( char *pixname, /* IRAF pixel file pathname */ const char *hdrname) /* IRAF image header file pathname */ { int len; char *newpixname; /* WDP - 10/16/2007 - increased allocation to avoid possible overflow */ /* newpixname = (char *) calloc (SZ_IM2PIXFILE, sizeof (char)); */ newpixname = (char *) calloc (2*SZ_IM2PIXFILE+1, sizeof (char)); if (newpixname == NULL) { ffpmsg("iraffits same_path: Cannot alloc memory for newpixname"); return (NULL); } /* Pixel file is in same directory as header */ if (strncmp(pixname, "HDR$", 4) == 0 ) { (void)strncpy (newpixname, hdrname, SZ_IM2PIXFILE); /* find the end of the pathname */ len = strlen (newpixname); #ifndef VMS while( (len > 0) && (newpixname[len-1] != '/') ) #else while( (len > 0) && (newpixname[len-1] != ']') && (newpixname[len-1] != ':') ) #endif len--; /* add name */ newpixname[len] = '\0'; (void)strncat (newpixname, &pixname[4], SZ_IM2PIXFILE); } /* Bare pixel file with no path is assumed to be same as HDR$filename */ else if (strchr (pixname, '/') == NULL && strchr (pixname, '$') == NULL) { (void)strncpy (newpixname, hdrname, SZ_IM2PIXFILE); /* find the end of the pathname */ len = strlen (newpixname); #ifndef VMS while( (len > 0) && (newpixname[len-1] != '/') ) #else while( (len > 0) && (newpixname[len-1] != ']') && (newpixname[len-1] != ':') ) #endif len--; /* add name */ newpixname[len] = '\0'; (void)strncat (newpixname, pixname, SZ_IM2PIXFILE); } /* Pixel file has same name as header file, but with .pix extension */ else if (strncmp (pixname, "HDR", 3) == 0) { /* load entire header name string into name buffer */ (void)strncpy (newpixname, hdrname, SZ_IM2PIXFILE); len = strlen (newpixname); newpixname[len-3] = 'p'; newpixname[len-2] = 'i'; newpixname[len-1] = 'x'; } return (newpixname); } /*--------------------------------------------------------------------------*/ static int isirafswapped ( char *irafheader, /* IRAF image header */ int offset) /* Number of bytes to skip before number */ /* check if the IRAF file is in big endian (sun) format (= 0) or not */ /* This is done by checking the 4 byte integer in the header that */ /* represents the iraf pixel type. This 4-byte word is guaranteed to */ /* have the least sig byte != 0 and the most sig byte = 0, so if the */ /* first byte of the word != 0, then the file in little endian format */ /* like on an Alpha machine. */ { int swapped; if (irafheader[offset] != 0) swapped = 1; else swapped = 0; return (swapped); } /*--------------------------------------------------------------------------*/ static int irafgeti4 ( char *irafheader, /* IRAF image header */ int offset) /* Number of bytes to skip before number */ { char *ctemp, *cheader; int temp; cheader = irafheader; ctemp = (char *) &temp; if (machswap() != swaphead) { ctemp[3] = cheader[offset]; ctemp[2] = cheader[offset+1]; ctemp[1] = cheader[offset+2]; ctemp[0] = cheader[offset+3]; } else { ctemp[0] = cheader[offset]; ctemp[1] = cheader[offset+1]; ctemp[2] = cheader[offset+2]; ctemp[3] = cheader[offset+3]; } return (temp); } /*--------------------------------------------------------------------------*/ /* IRAFGETC2 -- Get character string from arbitrary part of v.1 IRAF header */ static char *irafgetc2 ( char *irafheader, /* IRAF image header */ int offset, /* Number of bytes to skip before string */ int nc) /* Maximum number of characters in string */ { char *irafstring, *string; irafstring = irafgetc (irafheader, offset, 2*(nc+1)); string = iraf2str (irafstring, nc); free (irafstring); return (string); } /*--------------------------------------------------------------------------*/ /* IRAFGETC -- Get character string from arbitrary part of IRAF header */ static char *irafgetc ( char *irafheader, /* IRAF image header */ int offset, /* Number of bytes to skip before string */ int nc) /* Maximum number of characters in string */ { char *ctemp, *cheader; int i; cheader = irafheader; ctemp = (char *) calloc (nc+1, 1); if (ctemp == NULL) { ffpmsg("IRAFGETC Cannot allocate memory for string variable"); return (NULL); } for (i = 0; i < nc; i++) { ctemp[i] = cheader[offset+i]; if (ctemp[i] > 0 && ctemp[i] < 32) ctemp[i] = ' '; } return (ctemp); } /*--------------------------------------------------------------------------*/ /* Convert IRAF 2-byte/char string to 1-byte/char string */ static char *iraf2str ( char *irafstring, /* IRAF 2-byte/character string */ int nchar) /* Number of characters in string */ { char *string; int i, j; string = (char *) calloc (nchar+1, 1); if (string == NULL) { ffpmsg("IRAF2STR Cannot allocate memory for string variable"); return (NULL); } /* the chars are in bytes 1, 3, 5, ... if bigendian format (SUN) */ /* else in bytes 0, 2, 4, ... if little endian format (Alpha) */ if (irafstring[0] != 0) j = 0; else j = 1; /* Convert appropriate byte of input to output character */ for (i = 0; i < nchar; i++) { string[i] = irafstring[j]; j = j + 2; } return (string); } /*--------------------------------------------------------------------------*/ /* IRAFSWAP -- Reverse bytes of any type of vector in place */ static void irafswap ( int bitpix, /* Number of bits per pixel */ /* 16 = short, -16 = unsigned short, 32 = int */ /* -32 = float, -64 = double */ char *string, /* Address of starting point of bytes to swap */ int nbytes) /* Number of bytes to swap */ { switch (bitpix) { case 16: if (nbytes < 2) return; irafswap2 (string,nbytes); break; case 32: if (nbytes < 4) return; irafswap4 (string,nbytes); break; case -16: if (nbytes < 2) return; irafswap2 (string,nbytes); break; case -32: if (nbytes < 4) return; irafswap4 (string,nbytes); break; case -64: if (nbytes < 8) return; irafswap8 (string,nbytes); break; } return; } /*--------------------------------------------------------------------------*/ /* IRAFSWAP2 -- Swap bytes in string in place */ static void irafswap2 ( char *string, /* Address of starting point of bytes to swap */ int nbytes) /* Number of bytes to swap */ { char *sbyte, temp, *slast; slast = string + nbytes; sbyte = string; while (sbyte < slast) { temp = sbyte[0]; sbyte[0] = sbyte[1]; sbyte[1] = temp; sbyte= sbyte + 2; } return; } /*--------------------------------------------------------------------------*/ /* IRAFSWAP4 -- Reverse bytes of Integer*4 or Real*4 vector in place */ static void irafswap4 ( char *string, /* Address of Integer*4 or Real*4 vector */ int nbytes) /* Number of bytes to reverse */ { char *sbyte, *slast; char temp0, temp1, temp2, temp3; slast = string + nbytes; sbyte = string; while (sbyte < slast) { temp3 = sbyte[0]; temp2 = sbyte[1]; temp1 = sbyte[2]; temp0 = sbyte[3]; sbyte[0] = temp0; sbyte[1] = temp1; sbyte[2] = temp2; sbyte[3] = temp3; sbyte = sbyte + 4; } return; } /*--------------------------------------------------------------------------*/ /* IRAFSWAP8 -- Reverse bytes of Real*8 vector in place */ static void irafswap8 ( char *string, /* Address of Real*8 vector */ int nbytes) /* Number of bytes to reverse */ { char *sbyte, *slast; char temp[8]; slast = string + nbytes; sbyte = string; while (sbyte < slast) { temp[7] = sbyte[0]; temp[6] = sbyte[1]; temp[5] = sbyte[2]; temp[4] = sbyte[3]; temp[3] = sbyte[4]; temp[2] = sbyte[5]; temp[1] = sbyte[6]; temp[0] = sbyte[7]; sbyte[0] = temp[0]; sbyte[1] = temp[1]; sbyte[2] = temp[2]; sbyte[3] = temp[3]; sbyte[4] = temp[4]; sbyte[5] = temp[5]; sbyte[6] = temp[6]; sbyte[7] = temp[7]; sbyte = sbyte + 8; } return; } /*--------------------------------------------------------------------------*/ static int machswap (void) { char *ctest; int itest; itest = 1; ctest = (char *)&itest; if (*ctest) return (1); else return (0); } /*--------------------------------------------------------------------------*/ /* the following routines were originally in hget.c */ /*--------------------------------------------------------------------------*/ static int lhead0 = 0; /*--------------------------------------------------------------------------*/ /* Extract long value for variable from FITS header string */ static int hgeti4 (hstring,keyword,ival) char *hstring; /* character string containing FITS header information in the format = {/ } */ char *keyword; /* character string containing the name of the keyword the value of which is returned. hget searches for a line beginning with this string. if "[n]" is present, the n'th token in the value is returned. (the first 8 characters must be unique) */ int *ival; { char *value; double dval; int minint; char val[30]; /* Get value and comment from header string */ value = hgetc (hstring,keyword); /* Translate value from ASCII to binary */ if (value != NULL) { minint = -MAXINT - 1; strcpy (val, value); dval = atof (val); if (dval+0.001 > MAXINT) *ival = MAXINT; else if (dval >= 0) *ival = (int) (dval + 0.001); else if (dval-0.001 < minint) *ival = minint; else *ival = (int) (dval - 0.001); return (1); } else { return (0); } } /*-------------------------------------------------------------------*/ /* Extract string value for variable from FITS header string */ static int hgets (hstring, keyword, lstr, str) char *hstring; /* character string containing FITS header information in the format = {/ } */ char *keyword; /* character string containing the name of the keyword the value of which is returned. hget searches for a line beginning with this string. if "[n]" is present, the n'th token in the value is returned. (the first 8 characters must be unique) */ int lstr; /* Size of str in characters */ char *str; /* String (returned) */ { char *value; int lval; /* Get value and comment from header string */ value = hgetc (hstring,keyword); if (value != NULL) { lval = strlen (value); if (lval < lstr) strcpy (str, value); else if (lstr > 1) strncpy (str, value, lstr-1); else str[0] = value[0]; return (1); } else return (0); } /*-------------------------------------------------------------------*/ /* Extract character value for variable from FITS header string */ static char * hgetc (hstring,keyword0) char *hstring; /* character string containing FITS header information in the format = {/ } */ char *keyword0; /* character string containing the name of the keyword the value of which is returned. hget searches for a line beginning with this string. if "[n]" is present, the n'th token in the value is returned. (the first 8 characters must be unique) */ { static char cval[80]; char *value; char cwhite[2]; char squot[2], dquot[2], lbracket[2], rbracket[2], slash[2], comma[2]; char keyword[81]; /* large for ESO hierarchical keywords */ char line[100]; char *vpos, *cpar = NULL; char *q1, *q2 = NULL, *v1, *v2, *c1, *brack1, *brack2; int ipar, i; squot[0] = 39; squot[1] = 0; dquot[0] = 34; dquot[1] = 0; lbracket[0] = 91; lbracket[1] = 0; comma[0] = 44; comma[1] = 0; rbracket[0] = 93; rbracket[1] = 0; slash[0] = 47; slash[1] = 0; /* Find length of variable name */ strncpy (keyword,keyword0, sizeof(keyword)-1); brack1 = strsrch (keyword,lbracket); if (brack1 == NULL) brack1 = strsrch (keyword,comma); if (brack1 != NULL) { *brack1 = '\0'; brack1++; } /* Search header string for variable name */ vpos = ksearch (hstring,keyword); /* Exit if not found */ if (vpos == NULL) { return (NULL); } /* Initialize line to nulls */ for (i = 0; i < 100; i++) line[i] = 0; /* In standard FITS, data lasts until 80th character */ /* Extract entry for this variable from the header */ strncpy (line,vpos,80); /* check for quoted value */ q1 = strsrch (line,squot); c1 = strsrch (line,slash); if (q1 != NULL) { if (c1 != NULL && q1 < c1) q2 = strsrch (q1+1,squot); else if (c1 == NULL) q2 = strsrch (q1+1,squot); else q1 = NULL; } else { q1 = strsrch (line,dquot); if (q1 != NULL) { if (c1 != NULL && q1 < c1) q2 = strsrch (q1+1,dquot); else if (c1 == NULL) q2 = strsrch (q1+1,dquot); else q1 = NULL; } else { q1 = NULL; q2 = line + 10; } } /* Extract value and remove excess spaces */ if (q1 != NULL) { v1 = q1 + 1; v2 = q2; c1 = strsrch (q2,"/"); } else { v1 = strsrch (line,"=") + 1; c1 = strsrch (line,"/"); if (c1 != NULL) v2 = c1; else v2 = line + 79; } /* Ignore leading spaces */ while (*v1 == ' ' && v1 < v2) { v1++; } /* Drop trailing spaces */ *v2 = '\0'; v2--; while (*v2 == ' ' && v2 > v1) { *v2 = '\0'; v2--; } if (!strcmp (v1, "-0")) v1++; strcpy (cval,v1); value = cval; /* If keyword has brackets, extract appropriate token from value */ if (brack1 != NULL) { brack2 = strsrch (brack1,rbracket); if (brack2 != NULL) *brack2 = '\0'; ipar = atoi (brack1); if (ipar > 0) { cwhite[0] = ' '; cwhite[1] = '\0'; for (i = 1; i <= ipar; i++) { cpar = strtok (v1,cwhite); v1 = NULL; } if (cpar != NULL) { strcpy (cval,cpar); } else value = NULL; } } return (value); } /*-------------------------------------------------------------------*/ /* Find beginning of fillable blank line before FITS header keyword line */ static char * blsearch (hstring,keyword) /* Find entry for keyword keyword in FITS header string hstring. (the keyword may have a maximum of eight letters) NULL is returned if the keyword is not found */ char *hstring; /* character string containing fits-style header information in the format = {/ } the default is that each entry is 80 characters long; however, lines may be of arbitrary length terminated by nulls, carriage returns or linefeeds, if packed is true. */ char *keyword; /* character string containing the name of the variable to be returned. ksearch searches for a line beginning with this string. The string may be a character literal or a character variable terminated by a null or '$'. it is truncated to 8 characters. */ { char *loc, *headnext, *headlast, *pval, *lc, *line; char *bval; int icol, nextchar, lkey, nleft, lhstr; pval = 0; /* Search header string for variable name */ if (lhead0) lhstr = lhead0; else { lhstr = 0; while (lhstr < 57600 && hstring[lhstr] != 0) lhstr++; } headlast = hstring + lhstr; headnext = hstring; pval = NULL; while (headnext < headlast) { nleft = headlast - headnext; loc = strnsrch (headnext, keyword, nleft); /* Exit if keyword is not found */ if (loc == NULL) { break; } icol = (loc - hstring) % 80; lkey = strlen (keyword); nextchar = (int) *(loc + lkey); /* If this is not in the first 8 characters of a line, keep searching */ if (icol > 7) headnext = loc + 1; /* If parameter name in header is longer, keep searching */ else if (nextchar != 61 && nextchar > 32 && nextchar < 127) headnext = loc + 1; /* If preceeding characters in line are not blanks, keep searching */ else { line = loc - icol; for (lc = line; lc < loc; lc++) { if (*lc != ' ') headnext = loc + 1; } /* Return pointer to start of line if match */ if (loc >= headnext) { pval = line; break; } } } /* Return NULL if keyword is found at start of FITS header string */ if (pval == NULL) return (pval); /* Return NULL if found the first keyword in the header */ if (pval == hstring) return (NULL); /* Find last nonblank line before requested keyword */ bval = pval - 80; while (!strncmp (bval," ",8)) bval = bval - 80; bval = bval + 80; /* Return pointer to calling program if blank lines found */ if (bval < pval) return (bval); else return (NULL); } /*-------------------------------------------------------------------*/ /* Find FITS header line containing specified keyword */ static char *ksearch (hstring,keyword) /* Find entry for keyword keyword in FITS header string hstring. (the keyword may have a maximum of eight letters) NULL is returned if the keyword is not found */ char *hstring; /* character string containing fits-style header information in the format = {/ } the default is that each entry is 80 characters long; however, lines may be of arbitrary length terminated by nulls, carriage returns or linefeeds, if packed is true. */ char *keyword; /* character string containing the name of the variable to be returned. ksearch searches for a line beginning with this string. The string may be a character literal or a character variable terminated by a null or '$'. it is truncated to 8 characters. */ { char *loc, *headnext, *headlast, *pval, *lc, *line; int icol, nextchar, lkey, nleft, lhstr; pval = 0; /* Search header string for variable name */ if (lhead0) lhstr = lhead0; else { lhstr = 0; while (lhstr < 57600 && hstring[lhstr] != 0) lhstr++; } headlast = hstring + lhstr; headnext = hstring; pval = NULL; while (headnext < headlast) { nleft = headlast - headnext; loc = strnsrch (headnext, keyword, nleft); /* Exit if keyword is not found */ if (loc == NULL) { break; } icol = (loc - hstring) % 80; lkey = strlen (keyword); nextchar = (int) *(loc + lkey); /* If this is not in the first 8 characters of a line, keep searching */ if (icol > 7) headnext = loc + 1; /* If parameter name in header is longer, keep searching */ else if (nextchar != 61 && nextchar > 32 && nextchar < 127) headnext = loc + 1; /* If preceeding characters in line are not blanks, keep searching */ else { line = loc - icol; for (lc = line; lc < loc; lc++) { if (*lc != ' ') headnext = loc + 1; } /* Return pointer to start of line if match */ if (loc >= headnext) { pval = line; break; } } } /* Return pointer to calling program */ return (pval); } /*-------------------------------------------------------------------*/ /* Find string s2 within null-terminated string s1 */ static char * strsrch (s1, s2) char *s1; /* String to search */ char *s2; /* String to look for */ { int ls1; ls1 = strlen (s1); return (strnsrch (s1, s2, ls1)); } /*-------------------------------------------------------------------*/ /* Find string s2 within string s1 */ static char * strnsrch (s1, s2, ls1) char *s1; /* String to search */ char *s2; /* String to look for */ int ls1; /* Length of string being searched */ { char *s,*s1e; char cfirst,clast; int i,ls2; /* Return null string if either pointer is NULL */ if (s1 == NULL || s2 == NULL) return (NULL); /* A zero-length pattern is found in any string */ ls2 = strlen (s2); if (ls2 ==0) return (s1); /* Only a zero-length string can be found in a zero-length string */ if (ls1 ==0) return (NULL); cfirst = s2[0]; clast = s2[ls2-1]; s1e = s1 + ls1 - ls2 + 1; s = s1; while (s < s1e) { /* Search for first character in pattern string */ if (*s == cfirst) { /* If single character search, return */ if (ls2 == 1) return (s); /* Search for last character in pattern string if first found */ if (s[ls2-1] == clast) { /* If two-character search, return */ if (ls2 == 2) return (s); /* If 3 or more characters, check for rest of search string */ i = 1; while (i < ls2 && s[i] == s2[i]) i++; /* If entire string matches, return */ if (i >= ls2) return (s); } } s++; } return (NULL); } /*-------------------------------------------------------------------*/ /* the following routines were originally in hget.c */ /*-------------------------------------------------------------------*/ /* HPUTI4 - Set int keyword = ival in FITS header string */ static void hputi4 (hstring,keyword,ival) char *hstring; /* character string containing FITS-style header information in the format = {/ } each entry is padded with spaces to 80 characters */ char *keyword; /* character string containing the name of the variable to be returned. hput searches for a line beginning with this string, and if there isn't one, creates one. The first 8 characters of keyword must be unique. */ int ival; /* int number */ { char value[30]; /* Translate value from binary to ASCII */ sprintf (value,"%d",ival); /* Put value into header string */ hputc (hstring,keyword,value); /* Return to calling program */ return; } /*-------------------------------------------------------------------*/ /* HPUTL - Set keyword = F if lval=0, else T, in FITS header string */ static void hputl (hstring, keyword,lval) char *hstring; /* FITS header */ char *keyword; /* Keyword name */ int lval; /* logical variable (0=false, else true) */ { char value[8]; /* Translate value from binary to ASCII */ if (lval) strcpy (value, "T"); else strcpy (value, "F"); /* Put value into header string */ hputc (hstring,keyword,value); /* Return to calling program */ return; } /*-------------------------------------------------------------------*/ /* HPUTS - Set character string keyword = 'cval' in FITS header string */ static void hputs (hstring,keyword,cval) char *hstring; /* FITS header */ char *keyword; /* Keyword name */ char *cval; /* character string containing the value for variable keyword. trailing and leading blanks are removed. */ { char squot = 39; char value[70]; int lcval; /* find length of variable string */ lcval = strlen (cval); if (lcval > 67) lcval = 67; /* Put quotes around string */ value[0] = squot; strncpy (&value[1],cval,lcval); value[lcval+1] = squot; value[lcval+2] = 0; /* Put value into header string */ hputc (hstring,keyword,value); /* Return to calling program */ return; } /*---------------------------------------------------------------------*/ /* HPUTC - Set character string keyword = value in FITS header string */ static void hputc (hstring,keyword,value) char *hstring; char *keyword; char *value; /* character string containing the value for variable keyword. trailing and leading blanks are removed. */ { char squot = 39; char line[100]; char newcom[50]; char blank[80]; char *v, *vp, *v1, *v2, *q1, *q2, *c1, *ve; int lkeyword, lcom, lval, lc, i; for (i = 0; i < 80; i++) blank[i] = ' '; /* find length of keyword and value */ lkeyword = strlen (keyword); lval = strlen (value); /* If COMMENT or HISTORY, always add it just before the END */ if (lkeyword == 7 && (strncmp (keyword,"COMMENT",7) == 0 || strncmp (keyword,"HISTORY",7) == 0)) { /* Find end of header */ v1 = ksearch (hstring,"END"); v2 = v1 + 80; /* Move END down one line */ strncpy (v2, v1, 80); /* Insert keyword */ strncpy (v1,keyword,7); /* Pad with spaces */ for (vp = v1+lkeyword; vp < v2; vp++) *vp = ' '; /* Insert comment */ strncpy (v1+9,value,lval); return; } /* Otherwise search for keyword */ else v1 = ksearch (hstring,keyword); /* If parameter is not found, find a place to put it */ if (v1 == NULL) { /* First look for blank lines before END */ v1 = blsearch (hstring, "END"); /* Otherwise, create a space for it at the end of the header */ if (v1 == NULL) { ve = ksearch (hstring,"END"); v1 = ve; v2 = v1 + 80; strncpy (v2, ve, 80); } else v2 = v1 + 80; lcom = 0; newcom[0] = 0; } /* Otherwise, extract the entry for this keyword from the header */ else { strncpy (line, v1, 80); line[80] = 0; v2 = v1 + 80; /* check for quoted value */ q1 = strchr (line, squot); if (q1 != NULL) q2 = strchr (q1+1,squot); else q2 = line; /* extract comment and remove trailing spaces */ c1 = strchr (q2,'/'); if (c1 != NULL) { lcom = 80 - (c1 - line); strncpy (newcom, c1+1, lcom); vp = newcom + lcom - 1; while (vp-- > newcom && *vp == ' ') *vp = 0; lcom = strlen (newcom); } else { newcom[0] = 0; lcom = 0; } } /* Fill new entry with spaces */ for (vp = v1; vp < v2; vp++) *vp = ' '; /* Copy keyword to new entry */ strncpy (v1, keyword, lkeyword); /* Add parameter value in the appropriate place */ vp = v1 + 8; *vp = '='; vp = v1 + 9; *vp = ' '; vp = vp + 1; if (*value == squot) { strncpy (vp, value, lval); if (lval+12 > 31) lc = lval + 12; else lc = 30; } else { vp = v1 + 30 - lval; strncpy (vp, value, lval); lc = 30; } /* Add comment in the appropriate place */ if (lcom > 0) { if (lc+2+lcom > 80) lcom = 78 - lc; vp = v1 + lc + 2; /* Jul 16 1997: was vp = v1 + lc * 2 */ *vp = '/'; vp = vp + 1; strncpy (vp, newcom, lcom); for (v = vp + lcom; v < v2; v++) *v = ' '; } return; } /*-------------------------------------------------------------------*/ /* HPUTCOM - Set comment for keyword or on line in FITS header string */ static void hputcom (hstring,keyword,comment) char *hstring; char *keyword; char *comment; { char squot; char line[100]; int lkeyword, lcom; char *vp, *v1, *v2, *c0 = NULL, *c1, *q1, *q2; squot = 39; /* Find length of variable name */ lkeyword = strlen (keyword); /* If COMMENT or HISTORY, always add it just before the END */ if (lkeyword == 7 && (strncmp (keyword,"COMMENT",7) == 0 || strncmp (keyword,"HISTORY",7) == 0)) { /* Find end of header */ v1 = ksearch (hstring,"END"); v2 = v1 + 80; strncpy (v2, v1, 80); /* blank out new line and insert keyword */ for (vp = v1; vp < v2; vp++) *vp = ' '; strncpy (v1, keyword, lkeyword); } /* search header string for variable name */ else { v1 = ksearch (hstring,keyword); v2 = v1 + 80; /* if parameter is not found, return without doing anything */ if (v1 == NULL) { return; } /* otherwise, extract entry for this variable from the header */ strncpy (line, v1, 80); /* check for quoted value */ q1 = strchr (line,squot); if (q1 != NULL) q2 = strchr (q1+1,squot); else q2 = NULL; if (q2 == NULL || q2-line < 31) c0 = v1 + 31; else c0 = v1 + (q2-line) + 2; /* allan: 1997-09-30, was c0=q2+2 */ strncpy (c0, "/ ",2); } /* create new entry */ lcom = strlen (comment); if (lcom > 0) { c1 = c0 + 2; if (c1+lcom > v2) lcom = v2 - c1; strncpy (c1, comment, lcom); } } astropy-1.1.1/cextern/cfitsio/getcold.c0000644001134200020070000020312012602615517021017 0ustar embrayscience00000000000000/* This file, getcold.c, contains routines that read data elements from */ /* a FITS image or table, with double datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffgpvd( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ double nulval, /* I - value for undefined pixels */ double *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; char cdummy; int nullcheck = 1; double nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_read_compressed_pixels(fptr, TDOUBLE, firstelem, nelem, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcld(fptr, 2, row, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgpfd( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ double *array, /* O - array of values that are returned */ char *nularray, /* O - array of null pixel flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any undefined pixels in the returned array will be set = 0 and the corresponding nularray value will be set = 1. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; int nullcheck = 2; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_read_compressed_pixels(fptr, TDOUBLE, firstelem, nelem, nullcheck, NULL, array, nularray, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcld(fptr, 2, row, firstelem, nelem, 1, 2, 0., array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg2dd(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ double nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ double *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { /* call the 3D reading routine, with the 3rd dimension = 1 */ ffg3dd(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg3dd(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ double nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ double *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 3-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { LONGLONG nfits, narray; long tablerow, ii, jj; char cdummy; int nullcheck = 1; long inc[] = {1,1,1}; LONGLONG fpixel[] = {1,1,1}; LONGLONG lpixel[3]; double nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = (long) ncols; lpixel[1] = (long) nrows; lpixel[2] = (long) naxis3; nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TDOUBLE, fpixel, lpixel, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so read all at once */ ffgcld(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to read */ narray = 0; /* next pixel in output array to be filled */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* reading naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffgcld(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, &array[narray], &cdummy, anynul, status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsvd(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ double nulval, /* I - value to set undefined pixels */ double *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dir[9]; long nelem, nultyp, ninc, numcol; LONGLONG felem, dsize[10], blcll[9], trcll[9]; int hdutype, anyf; char ldummy, msg[FLEN_ERRMSG]; int nullcheck = 1; double nullvalue; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvd is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TDOUBLE, blcll, trcll, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 1; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; dir[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { if (hdutype == IMAGE_HDU) { dir[ii] = -1; } else { sprintf(msg, "ffgsvd: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; dsize[ii] = dsize[ii] * dir[ii]; } dsize[naxis] = dsize[naxis] * dir[naxis]; if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; ninc = incr[0] * dir[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) { for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) { for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) { for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) { for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) { for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) { for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) { for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) { felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; if ( ffgcld(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &ldummy, &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsfd(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ double *array, /* O - array to be filled and returned */ char *flagval, /* O - set to 1 if corresponding value is null */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dsize[10]; LONGLONG blcll[9], trcll[9]; long felem, nelem, nultyp, ninc, numcol; int hdutype, anyf; double nulval = 0; char msg[FLEN_ERRMSG]; int nullcheck = 2; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvd is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } fits_read_compressed_img(fptr, TDOUBLE, blcll, trcll, inc, nullcheck, NULL, array, flagval, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 2; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsvd: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgcld(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &flagval[i0], &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffggpd( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ long firstelem, /* I - first vector element to read (1 = 1st) */ long nelem, /* I - number of values to read */ double *array, /* O - array of values that are returned */ int *status) /* IO - error status */ /* Read an array of group parameters from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). */ { long row; int idummy; char cdummy; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcld(fptr, 1, row, firstelem, nelem, 1, 1, 0., array, &cdummy, &idummy, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcvd(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ double nulval, /* I - value for null pixels */ double *array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. */ { char cdummy; ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcvm(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ double nulval, /* I - value for null pixels */ double *array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. TSCAL and ZERO should not be used with complex values. */ { char cdummy; /* a complex double value is interpreted as a pair of double values, */ /* thus need to multiply the first element and number of elements by 2 */ ffgcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfd(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ double *array, /* O - array of values that are read */ char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. */ { double dummy = 0; ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfm(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ double *array, /* O - array of values that are read */ char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. TSCAL and ZERO should not be used with complex values. */ { long ii, jj; float dummy = 0; char *carray; /* a complex double value is interpreted as a pair of double values, */ /* thus need to multiply the first element and number of elements by 2 */ /* allocate temporary array */ carray = (char *) calloc( (size_t) (nelem * 2), 1); ffgcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, 1, 2, dummy, array, carray, anynul, status); for (ii = 0, jj = 0; jj < nelem; ii += 2, jj++) { if (carray[ii] || carray[ii + 1]) nularray[jj] = 1; else nularray[jj] = 0; } free(carray); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcld( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long elemincre, /* I - pixel increment; e.g., 2 = every other */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ double nulval, /* I - value for null pixels if nultyp = 1 */ double *array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer be a virtual column in a 1 or more grouped FITS primary array or image extension. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The output array of values will be converted from the datatype of the column and will be scaled by the FITS TSCALn and TZEROn values if necessary. */ { double scale, zero, power = 1, dtemp; int tcode, hdutype, xcode, decimals, maxelem2; long twidth, incre; long ii, xwidth, ntodo; int convert, nulcheck, readcheck = 0; LONGLONG repeat, startpos, elemnum, readptr, tnull; LONGLONG rowlen, rownum, remain, next, rowincre, maxelem; char tform[20]; char message[81]; char snull[20]; /* the FITS null value if reading from ASCII table */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; if (anynul) *anynul = 0; if (nultyp == 2) memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (elemincre < 0) readcheck = -1; /* don't do range checking in this case */ if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) return(*status); maxelem = maxelem2; incre *= elemincre; /* multiply incre to just get every nth pixel */ if (tcode == TSTRING) /* setup for ASCII tables */ { /* get the number of implied decimal places if no explicit decmal point */ ffasfm(tform, &xcode, &xwidth, &decimals, status); for(ii = 0; ii < decimals; ii++) power *= 10.; } /*------------------------------------------------------------------*/ /* Decide whether to check for null values in the input FITS file: */ /*------------------------------------------------------------------*/ nulcheck = nultyp; /* by default check for null values in the FITS file */ if (nultyp == 1 && nulval == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ else if (tcode%10 == 1 && /* if reading an integer column, and */ tnull == NULL_UNDEFINED) /* if a null value is not defined, */ nulcheck = 0; /* then do not check for null values. */ else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) nulcheck = 0; /*----------------------------------------------------------------------*/ /* If FITS column and output data array have same datatype, then we do */ /* not need to use a temporary buffer to store intermediate datatype. */ /*----------------------------------------------------------------------*/ convert = 1; if (tcode == TDOUBLE) /* Special Case: */ { /* no type convertion required, so read */ maxelem = nelem; /* data directly into output buffer. */ if (nulcheck == 0 && scale == 1. && zero == 0.) convert = 0; /* no need to scale data or find nulls */ } /*---------------------------------------------------------------------*/ /* Now read the pixels from the FITS column. If the column does not */ /* have the same datatype as the output array, then we have to read */ /* the raw values into a temporary buffer (of limited size). In */ /* the case of a vector colum read only 1 vector of values at a time */ /* then skip to the next row if more values need to be read. */ /* After reading the raw values, then call the fffXXYY routine to (1) */ /* test for undefined values, (2) convert the datatype if necessary, */ /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ /* scaling parameters. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to read */ next = 0; /* next element in array to be read */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to read at one time to the number that will fit in the buffer or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); if (elemincre >= 0) { ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); } else { ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); } readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); switch (tcode) { case (TDOUBLE): ffgr8b(fptr, readptr, ntodo, incre, &array[next], status); if (convert) fffr8r8(&array[next], ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TBYTE): ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, status); fffi1r8((unsigned char *) buffer, ntodo, scale, zero, nulcheck, (unsigned char) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TSHORT): ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); fffi2r8((short *) buffer, ntodo, scale, zero, nulcheck, (short) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONG): ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, status); fffi4r8((INT32BIT *) buffer, ntodo, scale, zero, nulcheck, (INT32BIT) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONGLONG): ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); fffi8r8( (LONGLONG *) buffer, ntodo, scale, zero, nulcheck, tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TFLOAT): ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); fffr4r8((float *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TSTRING): ffmbyt(fptr, readptr, REPORT_EOF, status); if (incre == twidth) /* contiguous bytes */ ffgbyt(fptr, ntodo * twidth, buffer, status); else ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); fffstrr8((char *) buffer, ntodo, scale, zero, twidth, power, nulcheck, snull, nulval, &nularray[next], anynul, &array[next], status); break; default: /* error trap for invalid column format */ sprintf(message, "Cannot read numbers from column %d which has format %s", colnum, tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous read operation */ { dtemp = (double) next; if (hdutype > 0) sprintf(message, "Error reading elements %.0f thru %.0f from column %d (ffgcld).", dtemp+1., dtemp+ntodo, colnum); else sprintf(message, "Error reading elements %.0f thru %.0f from image (ffgcld).", dtemp+1., dtemp+ntodo); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum = elemnum + (ntodo * elemincre); if (elemnum >= repeat) /* completed a row; start on later row */ { rowincre = (long) (elemnum / repeat); rownum += rowincre; elemnum = elemnum - (rowincre * repeat); } else if (elemnum < 0) /* completed a row; start on a previous row */ { rowincre = (long) ((-elemnum - 1) / repeat + 1); rownum -= rowincre; elemnum = (rowincre * repeat) + elemnum; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while reading FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int fffi1r8(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ double nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ double *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { output[ii] = input[ii] * scale + zero; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (double) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { output[ii] = input[ii] * scale + zero; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi2r8(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ double nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ double *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { output[ii] = input[ii] * scale + zero; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (double) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { output[ii] = input[ii] * scale + zero; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi4r8(INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ double nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ double *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { output[ii] = input[ii] * scale + zero; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (double) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { output[ii] = input[ii] * scale + zero; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi8r8(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ double nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ double *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { output[ii] = input[ii] * scale + zero; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (double) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { output[ii] = input[ii] * scale + zero; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr4r8(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ double nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ double *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { output[ii] = input[ii] * scale + zero; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr++; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else output[ii] = (double) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = zero; } else output[ii] = input[ii] * scale + zero; } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr8r8(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ double nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ double *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { memcpy(output, input, ntodo * sizeof(double) ); } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { output[ii] = input[ii] * scale + zero; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr += 3; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else { nullarray[ii] = 1; /* explicitly set value in case output contains a NaN */ output[ii] = DOUBLENULLVALUE; } } else /* it's an underflow */ output[ii] = 0; } else output[ii] = input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else { nullarray[ii] = 1; /* explicitly set value in case output contains a NaN */ output[ii] = DOUBLENULLVALUE; } } else /* it's an underflow */ output[ii] = zero; } else output[ii] = input[ii] * scale + zero; } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffstrr8(char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ long twidth, /* I - width of each substring of chars */ double implipower, /* I - power of 10 of implied decimal */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ char *snull, /* I - value of FITS null string, if any */ double nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ double *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to snull. If nullcheck= 0, then no special checking for nulls is performed. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { int nullen; long ii; double dvalue; char *cstring, message[81]; char *cptr, *tpos; char tempstore, chrzero = '0'; double val, power; int exponent, sign, esign, decpt; nullen = strlen(snull); cptr = input; /* pointer to start of input string */ for (ii = 0; ii < ntodo; ii++) { cstring = cptr; /* temporarily insert a null terminator at end of the string */ tpos = cptr + twidth; tempstore = *tpos; *tpos = 0; /* check if null value is defined, and if the */ /* column string is identical to the null string */ if (snull[0] != ASCII_NULL_UNDEFINED && !strncmp(snull, cptr, nullen) ) { if (nullcheck) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } cptr += twidth; } else { /* value is not the null value, so decode it */ /* remove any embedded blank characters from the string */ decpt = 0; sign = 1; val = 0.; power = 1.; exponent = 0; esign = 1; while (*cptr == ' ') /* skip leading blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for leading sign */ { if (*cptr == '-') sign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and value */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } if (*cptr == '.' || *cptr == ',') /* check for decimal point */ { decpt = 1; /* set flag to show there was a decimal point */ cptr++; while (*cptr == ' ') /* skip any blanks */ cptr++; while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ power = power * 10.; cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } } if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ { cptr++; while (*cptr == ' ') /* skip blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ { if (*cptr == '-') esign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and exp */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ cptr++; while (*cptr == ' ') /* skip embedded blanks */ cptr++; } } if (*cptr != 0) /* should end up at the null terminator */ { sprintf(message, "Cannot read number from ASCII table"); ffpmsg(message); sprintf(message, "Column field = %s.", cstring); ffpmsg(message); /* restore the char that was overwritten by the null */ *tpos = tempstore; return(*status = BAD_C2D); } if (!decpt) /* if no explicit decimal, use implied */ power = implipower; dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); output[ii] = (dvalue * scale + zero); /* apply the scaling */ } /* restore the char that was overwritten by the null */ *tpos = tempstore; } return(*status); } astropy-1.1.1/cextern/cfitsio/scalnull.c0000644001134200020070000002141512602615520021212 0ustar embrayscience00000000000000/* This file, scalnull.c, contains the FITSIO routines used to define */ /* the starting heap address, the value scaling and the null values. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffpthp(fitsfile *fptr, /* I - FITS file pointer */ long theap, /* I - starting addrss for the heap */ int *status) /* IO - error status */ /* Define the starting address for the heap for a binary table. The default address is NAXIS1 * NAXIS2. It is in units of bytes relative to the beginning of the regular binary table data. This routine also writes the appropriate THEAP keyword to the FITS header. */ { if (*status > 0 || theap < 1) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); (fptr->Fptr)->heapstart = theap; ffukyj(fptr, "THEAP", theap, "byte offset to heap area", status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpscl(fitsfile *fptr, /* I - FITS file pointer */ double scale, /* I - scaling factor: value of BSCALE */ double zero, /* I - zero point: value of BZERO */ int *status) /* IO - error status */ /* Define the linear scaling factor for the primary array or image extension pixel values. This routine overrides the scaling values given by the BSCALE and BZERO keywords if present. Note that this routine does not write or modify the BSCALE and BZERO keywords, but instead only modifies the values temporarily in the internal buffer. Thus, a subsequent call to the ffrdef routine will reset the scaling back to the BSCALE and BZERO keyword values (or 1. and 0. respectively if the keywords are not present). */ { tcolumn *colptr; int hdutype; if (*status > 0) return(*status); if (scale == 0) return(*status = ZERO_SCALE); /* zero scale value is illegal */ if (ffghdt(fptr, &hdutype, status) > 0) /* get HDU type */ return(*status); if (hdutype != IMAGE_HDU) return(*status = NOT_IMAGE); /* not proper HDU type */ if (fits_is_compressed_image(fptr, status)) /* compressed images */ { (fptr->Fptr)->cn_bscale = scale; (fptr->Fptr)->cn_bzero = zero; return(*status); } /* set pointer to the first 'column' (contains group parameters if any) */ colptr = (fptr->Fptr)->tableptr; colptr++; /* increment to the 2nd 'column' pointer (the image itself) */ colptr->tscale = scale; colptr->tzero = zero; return(*status); } /*--------------------------------------------------------------------------*/ int ffpnul(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG nulvalue, /* I - null pixel value: value of BLANK */ int *status) /* IO - error status */ /* Define the value used to represent undefined pixels in the primary array or image extension. This only applies to integer image pixel (i.e. BITPIX > 0). This routine overrides the null pixel value given by the BLANK keyword if present. Note that this routine does not write or modify the BLANK keyword, but instead only modifies the value temporarily in the internal buffer. Thus, a subsequent call to the ffrdef routine will reset the null value back to the BLANK keyword value (or not defined if the keyword is not present). */ { tcolumn *colptr; int hdutype; if (*status > 0) return(*status); if (ffghdt(fptr, &hdutype, status) > 0) /* get HDU type */ return(*status); if (hdutype != IMAGE_HDU) return(*status = NOT_IMAGE); /* not proper HDU type */ if (fits_is_compressed_image(fptr, status)) /* ignore compressed images */ return(*status); /* set pointer to the first 'column' (contains group parameters if any) */ colptr = (fptr->Fptr)->tableptr; colptr++; /* increment to the 2nd 'column' pointer (the image itself) */ colptr->tnull = nulvalue; return(*status); } /*--------------------------------------------------------------------------*/ int fftscl(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number to apply scaling to */ double scale, /* I - scaling factor: value of TSCALn */ double zero, /* I - zero point: value of TZEROn */ int *status) /* IO - error status */ /* Define the linear scaling factor for the TABLE or BINTABLE extension column values. This routine overrides the scaling values given by the TSCALn and TZEROn keywords if present. Note that this routine does not write or modify the TSCALn and TZEROn keywords, but instead only modifies the values temporarily in the internal buffer. Thus, a subsequent call to the ffrdef routine will reset the scaling back to the TSCALn and TZEROn keyword values (or 1. and 0. respectively if the keywords are not present). */ { tcolumn *colptr; int hdutype; if (*status > 0) return(*status); if (scale == 0) return(*status = ZERO_SCALE); /* zero scale value is illegal */ if (ffghdt(fptr, &hdutype, status) > 0) /* get HDU type */ return(*status); if (hdutype == IMAGE_HDU) return(*status = NOT_TABLE); /* not proper HDU type */ colptr = (fptr->Fptr)->tableptr; /* set pointer to the first column */ colptr += (colnum - 1); /* increment to the correct column */ colptr->tscale = scale; colptr->tzero = zero; return(*status); } /*--------------------------------------------------------------------------*/ int fftnul(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number to apply nulvalue to */ LONGLONG nulvalue, /* I - null pixel value: value of TNULLn */ int *status) /* IO - error status */ /* Define the value used to represent undefined pixels in the BINTABLE column. This only applies to integer datatype columns (TFORM = B, I, or J). This routine overrides the null pixel value given by the TNULLn keyword if present. Note that this routine does not write or modify the TNULLn keyword, but instead only modifies the value temporarily in the internal buffer. Thus, a subsequent call to the ffrdef routine will reset the null value back to the TNULLn keyword value (or not defined if the keyword is not present). */ { tcolumn *colptr; int hdutype; if (*status > 0) return(*status); if (ffghdt(fptr, &hdutype, status) > 0) /* get HDU type */ return(*status); if (hdutype != BINARY_TBL) return(*status = NOT_BTABLE); /* not proper HDU type */ colptr = (fptr->Fptr)->tableptr; /* set pointer to the first column */ colptr += (colnum - 1); /* increment to the correct column */ colptr->tnull = nulvalue; return(*status); } /*--------------------------------------------------------------------------*/ int ffsnul(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number to apply nulvalue to */ char *nulstring, /* I - null pixel value: value of TNULLn */ int *status) /* IO - error status */ /* Define the string used to represent undefined pixels in the ASCII TABLE column. This routine overrides the null value given by the TNULLn keyword if present. Note that this routine does not write or modify the TNULLn keyword, but instead only modifies the value temporarily in the internal buffer. Thus, a subsequent call to the ffrdef routine will reset the null value back to the TNULLn keyword value (or not defined if the keyword is not present). */ { tcolumn *colptr; int hdutype; if (*status > 0) return(*status); if (ffghdt(fptr, &hdutype, status) > 0) /* get HDU type */ return(*status); if (hdutype != ASCII_TBL) return(*status = NOT_ATABLE); /* not proper HDU type */ colptr = (fptr->Fptr)->tableptr; /* set pointer to the first column */ colptr += (colnum - 1); /* increment to the correct column */ colptr->strnull[0] = '\0'; strncat(colptr->strnull, nulstring, 19); /* limit string to 19 chars */ return(*status); } astropy-1.1.1/cextern/cfitsio/putcoluj.c0000644001134200020070000010316112602615520021241 0ustar embrayscience00000000000000/* This file, putcoluj.c, contains routines that write data elements to */ /* a FITS image or table, with unsigned long datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffppruj( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned long *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; unsigned long nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_pixels(fptr, TULONG, firstelem, nelem, 0, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcluj(fptr, 2, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffppnuj( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned long *array, /* I - array of values that are written */ unsigned long nulval, /* I - undefined pixel value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). Any array values that are equal to the value of nulval will be replaced with the null pixel value that is appropriate for this column. */ { long row; unsigned long nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_write_compressed_pixels(fptr, TULONG, firstelem, nelem, 1, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcnuj(fptr, 2, row, firstelem, nelem, array, nulval, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp2duj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ unsigned long *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { /* call the 3D writing routine, with the 3rd dimension = 1 */ ffp3duj(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp3duj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ unsigned long *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 3-D cube of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow, ii, jj; long fpixel[3]= {1,1,1}, lpixel[3]; LONGLONG nfits, narray; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = (long) ncols; lpixel[1] = (long) nrows; lpixel[2] = (long) naxis3; fits_write_compressed_img(fptr, TULONG, fpixel, lpixel, 0, array, NULL, status); return(*status); } tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so write all at once */ ffpcluj(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to write to */ narray = 0; /* next pixel in input array to be written */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* writing naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffpcluj(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpssuj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long naxis, /* I - number of data axes in array */ long *naxes, /* I - size of each FITS axis */ long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ long *lpixel, /* I - last pixel in each axis to write */ unsigned long *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write a subsection of pixels to the primary array or image. A subsection is defined to be any contiguous rectangular array of pixels within the n-dimensional FITS data file. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow; LONGLONG fpix[7], dimen[7], astart, pstart; LONGLONG off2, off3, off4, off5, off6, off7; LONGLONG st10, st20, st30, st40, st50, st60, st70; LONGLONG st1, st2, st3, st4, st5, st6, st7; long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; if (*status > 0) return(*status); if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_img(fptr, TULONG, fpixel, lpixel, 0, array, NULL, status); return(*status); } if (naxis < 1 || naxis > 7) return(*status = BAD_DIMEN); tablerow=maxvalue(1,group); /* calculate the size and number of loops to perform in each dimension */ for (ii = 0; ii < 7; ii++) { fpix[ii]=1; irange[ii]=1; dimen[ii]=1; } for (ii = 0; ii < naxis; ii++) { fpix[ii]=fpixel[ii]; irange[ii]=lpixel[ii]-fpixel[ii]+1; dimen[ii]=naxes[ii]; } i1=irange[0]; /* compute the pixel offset between each dimension */ off2 = dimen[0]; off3 = off2 * dimen[1]; off4 = off3 * dimen[2]; off5 = off4 * dimen[3]; off6 = off5 * dimen[4]; off7 = off6 * dimen[5]; st10 = fpix[0]; st20 = (fpix[1] - 1) * off2; st30 = (fpix[2] - 1) * off3; st40 = (fpix[3] - 1) * off4; st50 = (fpix[4] - 1) * off5; st60 = (fpix[5] - 1) * off6; st70 = (fpix[6] - 1) * off7; /* store the initial offset in each dimension */ st1 = st10; st2 = st20; st3 = st30; st4 = st40; st5 = st50; st6 = st60; st7 = st70; astart = 0; for (i7 = 0; i7 < irange[6]; i7++) { for (i6 = 0; i6 < irange[5]; i6++) { for (i5 = 0; i5 < irange[4]; i5++) { for (i4 = 0; i4 < irange[3]; i4++) { for (i3 = 0; i3 < irange[2]; i3++) { pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; for (i2 = 0; i2 < irange[1]; i2++) { if (ffpcluj(fptr, 2, tablerow, pstart, i1, &array[astart], status) > 0) return(*status); astart += i1; pstart += off2; } st2 = st20; st3 = st3+off3; } st3 = st30; st4 = st4+off4; } st4 = st40; st5 = st5+off5; } st5 = st50; st6 = st6+off6; } st6 = st60; st7 = st7+off7; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpgpuj( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long firstelem, /* I - first vector element to write(1 = 1st) */ long nelem, /* I - number of values to write */ unsigned long *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of group parameters to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffpcluj(fptr, 1L, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpcluj( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned long *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of values to a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. */ { int tcode, maxelem, hdutype; long twidth, incre; long ntodo; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; double scale, zero; char tform[20], cform[20]; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); if (tcode == TSTRING) ffcfmt(tform, cform); /* derive C format for writing strings */ /*---------------------------------------------------------------------*/ /* Now write the pixels to the FITS column. */ /* First call the ffXXfYY routine to (1) convert the datatype */ /* if necessary, and (2) scale the values by the FITS TSCALn and */ /* TZEROn linear scaling parameters into a temporary buffer. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to process a one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ switch (tcode) { case (TLONG): ffu4fi4(&array[next], ntodo, scale, zero, (INT32BIT *) buffer, status); ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); break; case (TLONGLONG): ffu4fi8(&array[next], ntodo, scale, zero, (LONGLONG *) buffer, status); ffpi8b(fptr, ntodo, incre, (long *) buffer, status); break; case (TBYTE): ffu4fi1(&array[next], ntodo, scale, zero, (unsigned char *) buffer, status); ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); break; case (TSHORT): ffu4fi2(&array[next], ntodo, scale, zero, (short *) buffer, status); ffpi2b(fptr, ntodo, incre, (short *) buffer, status); break; case (TFLOAT): ffu4fr4(&array[next], ntodo, scale, zero, (float *) buffer, status); ffpr4b(fptr, ntodo, incre, (float *) buffer, status); break; case (TDOUBLE): ffu4fr8(&array[next], ntodo, scale, zero, (double *) buffer, status); ffpr8b(fptr, ntodo, incre, (double *) buffer, status); break; case (TSTRING): /* numerical column in an ASCII table */ if (cform[1] != 's') /* "%s" format is a string */ { ffu4fstr(&array[next], ntodo, scale, zero, cform, twidth, (char *) buffer, status); if (incre == twidth) /* contiguous bytes */ ffpbyt(fptr, ntodo * twidth, buffer, status); else ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); break; } /* can't write to string column, so fall thru to default: */ default: /* error trap */ sprintf(message, "Cannot write numbers to column %d which has format %s", colnum,tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing elements %.0f thru %.0f of input data array (ffpcluj).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while writing FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpcnuj( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned long *array, /* I - array of values to write */ unsigned long nulvalue, /* I - value used to flag undefined pixels */ int *status) /* IO - error status */ /* Write an array of elements to the specified column of a table. Any input pixels equal to the value of nulvalue will be replaced by the appropriate null value in the output FITS file. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary */ { tcolumn *colptr; long ngood = 0, nbad = 0, ii; LONGLONG repeat, first, fstelm, fstrow; int tcode, overflow = 0; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode > 0) repeat = colptr->trepeat; /* repeat count for this column */ else repeat = firstelem -1 + nelem; /* variable length arrays */ /* if variable length array, first write the whole input vector, then go back and fill in the nulls */ if (tcode < 0) { if (ffpcluj(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { if (*status == NUM_OVERFLOW) { /* ignore overflows, which are possibly the null pixel values */ /* overflow = 1; */ *status = 0; } else { return(*status); } } } /* absolute element number in the column */ first = (firstrow - 1) * repeat + firstelem; for (ii = 0; ii < nelem; ii++) { if (array[ii] != nulvalue) /* is this a good pixel? */ { if (nbad) /* write previous string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) return(*status); nbad=0; } ngood = ngood +1; /* the consecutive number of good pixels */ } else { if (ngood) /* write previous string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ if (ffpcluj(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status) > 0) { if (*status == NUM_OVERFLOW) { overflow = 1; *status = 0; } else { return(*status); } } } ngood=0; } nbad = nbad +1; /* the consecutive number of bad pixels */ } } /* finished loop; now just write the last set of pixels */ if (ngood) /* write last string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ ffpcluj(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); } } else if (nbad) /* write last string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); } if (*status <= 0) { if (overflow) { *status = NUM_OVERFLOW; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffu4fi1(unsigned long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ unsigned char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] > UCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) (dvalue + .5); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffu4fi2(unsigned long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ short *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] > SHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else { if (dvalue >= 0) output[ii] = (short) (dvalue + .5); else output[ii] = (short) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffu4fi4(unsigned long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ INT32BIT *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 2147483648. && sizeof(long) == 4) { /* Instead of subtracting 2147483648, it is more efficient */ /* to just flip the sign bit with the XOR operator */ for (ii = 0; ii < ntodo; ii++) output[ii] = ( *(long *) &input[ii] ) ^ 0x80000000; } else if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] > INT32_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else output[ii] = input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else { if (dvalue >= 0) output[ii] = (INT32BIT) (dvalue + .5); else output[ii] = (INT32BIT) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffu4fi8(unsigned long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ LONGLONG *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = input[ii]; } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else { if (dvalue >= 0) output[ii] = (LONGLONG) (dvalue + .5); else output[ii] = (LONGLONG) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffu4fr4(unsigned long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ float *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) ((input[ii] - zero) / scale); } return(*status); } /*--------------------------------------------------------------------------*/ int ffu4fr8(unsigned long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ double *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (input[ii] - zero) / scale; } return(*status); } /*--------------------------------------------------------------------------*/ int ffu4fstr(unsigned long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ char *cform, /* I - format for output string values */ long twidth, /* I - width of each field, in chars */ char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do scaling if required. */ { long ii; double dvalue; char *cptr; cptr = output; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { sprintf(output, cform, (double) input[ii]); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; sprintf(output, cform, dvalue); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } /* replace any commas with periods (e.g., in French locale) */ while ((cptr = strchr(cptr, ','))) *cptr = '.'; return(*status); } astropy-1.1.1/cextern/cfitsio/fitsio.h0000644001134200020070000032070712602615517020713 0ustar embrayscience00000000000000/* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ /* Copyright (Unpublished--all rights reserved under the copyright laws of the United States), U.S. Government as represented by the Administrator of the National Aeronautics and Space Administration. No copyright is claimed in the United States under Title 17, U.S. Code. Permission to freely use, copy, modify, and distribute this software and its documentation without fee is hereby granted, provided that this copyright notice and disclaimer of warranty appears in all copies. DISCLAIMER: THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER." */ #ifndef _FITSIO_H #define _FITSIO_H #define CFITSIO_VERSION 3.35 #define CFITSIO_MINOR 35 #define CFITSIO_MAJOR 3 #define CFITSIO_SONAME 1 /* the SONAME is incremented in a new release if the binary shared */ /* library (on linux and Mac systems) is not backward compatible */ /* with the previous release of CFITSIO */ #include /* the following was provided by Michael Greason (GSFC) to fix a */ /* C/Fortran compatibility problem on an SGI Altix system running */ /* SGI ProPack 4 [this is a Novell SuSE Enterprise 9 derivative] */ /* and using the Intel C++ and Fortran compilers (version 9.1) */ #if defined(__INTEL_COMPILER) && defined(__itanium__) # define mipsFortran 1 # define _MIPS_SZLONG 64 #endif #if defined(linux) || defined(__APPLE__) || defined(__sgi) # include /* apparently needed on debian linux systems */ #endif /* to define off_t */ #include /* apparently needed to define size_t with gcc 2.8.1 */ #include /* needed for LLONG_MAX and INT64_MAX definitions */ /* Define the datatype for variables which store file offset values. */ /* The newer 'off_t' datatype should be used for this purpose, but some */ /* older compilers do not recognize this type, in which case we use 'long' */ /* instead. Note that _OFF_T is defined (or not) in stdio.h depending */ /* on whether _LARGEFILE_SOURCE is defined in sys/feature_tests.h */ /* (at least on Solaris platforms using cc) */ /* Debian systems require the 2nd test, below, */ /* i.e, "(defined(linux) && defined(__off_t_defined))" */ #if defined(_OFF_T) || (defined(linux) && defined(__off_t_defined)) || defined(_MIPS_SZLONG) || defined(__APPLE__) || defined(_AIX) # define OFF_T off_t #elif defined(_MSC_VER) && (_MSC_VER>= 1400) # define OFF_T long long #else # define OFF_T long #endif /* this block determines if the the string function name is strtol or strtoll, and whether to use %ld or %lld in printf statements */ /* The following 2 cases for that Athon64 were removed on 4 Jan 2006; they appear to be incorrect now that LONGLONG is always typedef'ed to 'long long' || defined(__ia64__) \ || defined(__x86_64__) \ */ #if (defined(__alpha) && ( defined(__unix__) || defined(__NetBSD__) )) \ || defined(__sparcv9) || (defined(__sparc__) && defined(__arch64__)) \ || defined(__powerpc64__) || defined(__64BIT__) \ || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) \ || defined( _MSC_VER)|| defined(__BORLANDC__) # define USE_LL_SUFFIX 0 #else # define USE_LL_SUFFIX 1 #endif /* Determine what 8-byte integer data type is available. 'long long' is now supported by most compilers, but older MS Visual C++ compilers before V7.0 use '__int64' instead. */ #ifndef LONGLONG_TYPE /* this may have been previously defined */ #if defined(_MSC_VER) /* Microsoft Visual C++ */ #if (_MSC_VER < 1300) /* versions earlier than V7.0 do not have 'long long' */ typedef __int64 LONGLONG; #else /* newer versions do support 'long long' */ typedef long long LONGLONG; #endif #elif defined( __BORLANDC__) /* for the Borland 5.5 compiler, in particular */ typedef __int64 LONGLONG; #else typedef long long LONGLONG; #endif #define LONGLONG_TYPE #endif #ifndef LONGLONG_MAX #ifdef LLONG_MAX /* Linux and Solaris definition */ #define LONGLONG_MAX LLONG_MAX #define LONGLONG_MIN LLONG_MIN #elif defined(LONG_LONG_MAX) #define LONGLONG_MAX LONG_LONG_MAX #define LONGLONG_MIN LONG_LONG_MIN #elif defined(__LONG_LONG_MAX__) /* Mac OS X & CYGWIN defintion */ #define LONGLONG_MAX __LONG_LONG_MAX__ #define LONGLONG_MIN (-LONGLONG_MAX -1LL) #elif defined(INT64_MAX) /* windows definition */ #define LONGLONG_MAX INT64_MAX #define LONGLONG_MIN INT64_MIN #elif defined(_I64_MAX) /* windows definition */ #define LONGLONG_MAX _I64_MAX #define LONGLONG_MIN _I64_MIN #elif (defined(__alpha) && ( defined(__unix__) || defined(__NetBSD__) )) \ || defined(__sparcv9) \ || defined(__ia64__) \ || defined(__x86_64__) \ || defined(_SX) \ || defined(__powerpc64__) || defined(__64BIT__) \ || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) /* sizeof(long) = 64 */ #define LONGLONG_MAX 9223372036854775807L /* max 64-bit integer */ #define LONGLONG_MIN (-LONGLONG_MAX -1L) /* min 64-bit integer */ #else /* define a default value, even if it is never used */ #define LONGLONG_MAX 9223372036854775807LL /* max 64-bit integer */ #define LONGLONG_MIN (-LONGLONG_MAX -1LL) /* min 64-bit integer */ #endif #endif /* end of ndef LONGLONG_MAX section */ /* ================================================================= */ /* The following exclusion if __CINT__ is defined is needed for ROOT */ #ifndef __CINT__ #include "longnam.h" #endif #define NIOBUF 40 /* number of IO buffers to create (default = 40) */ /* !! Significantly increasing NIOBUF may degrade performance !! */ #define IOBUFLEN 2880 /* size in bytes of each IO buffer (DONT CHANGE!) */ /* global variables */ #define FLEN_FILENAME 1025 /* max length of a filename */ #define FLEN_KEYWORD 72 /* max length of a keyword (HIERARCH convention) */ #define FLEN_CARD 81 /* length of a FITS header card */ #define FLEN_VALUE 71 /* max length of a keyword value string */ #define FLEN_COMMENT 73 /* max length of a keyword comment string */ #define FLEN_ERRMSG 81 /* max length of a FITSIO error message */ #define FLEN_STATUS 31 /* max length of a FITSIO status text string */ #define TBIT 1 /* codes for FITS table data types */ #define TBYTE 11 #define TSBYTE 12 #define TLOGICAL 14 #define TSTRING 16 #define TUSHORT 20 #define TSHORT 21 #define TUINT 30 #define TINT 31 #define TULONG 40 #define TLONG 41 #define TINT32BIT 41 /* used when returning datatype of a column */ #define TFLOAT 42 #define TLONGLONG 81 #define TDOUBLE 82 #define TCOMPLEX 83 #define TDBLCOMPLEX 163 #define TYP_STRUC_KEY 10 #define TYP_CMPRS_KEY 20 #define TYP_SCAL_KEY 30 #define TYP_NULL_KEY 40 #define TYP_DIM_KEY 50 #define TYP_RANG_KEY 60 #define TYP_UNIT_KEY 70 #define TYP_DISP_KEY 80 #define TYP_HDUID_KEY 90 #define TYP_CKSUM_KEY 100 #define TYP_WCS_KEY 110 #define TYP_REFSYS_KEY 120 #define TYP_COMM_KEY 130 #define TYP_CONT_KEY 140 #define TYP_USER_KEY 150 #define INT32BIT int /* 32-bit integer datatype. Currently this */ /* datatype is an 'int' on all useful platforms */ /* however, it is possible that that are cases */ /* where 'int' is a 2-byte integer, in which case */ /* INT32BIT would need to be defined as 'long'. */ #define BYTE_IMG 8 /* BITPIX code values for FITS image types */ #define SHORT_IMG 16 #define LONG_IMG 32 #define LONGLONG_IMG 64 #define FLOAT_IMG -32 #define DOUBLE_IMG -64 /* The following 2 codes are not true FITS */ /* datatypes; these codes are only used internally */ /* within cfitsio to make it easier for users */ /* to deal with unsigned integers. */ #define SBYTE_IMG 10 #define USHORT_IMG 20 #define ULONG_IMG 40 #define IMAGE_HDU 0 /* Primary Array or IMAGE HDU */ #define ASCII_TBL 1 /* ASCII table HDU */ #define BINARY_TBL 2 /* Binary table HDU */ #define ANY_HDU -1 /* matches any HDU type */ #define READONLY 0 /* options when opening a file */ #define READWRITE 1 /* adopt a hopefully obscure number to use as a null value flag */ /* could be problems if the FITS files contain data with these values */ #define FLOATNULLVALUE -9.11912E-36F #define DOUBLENULLVALUE -9.1191291391491E-36 /* compression algorithm codes */ #define NO_DITHER -1 #define SUBTRACTIVE_DITHER_1 1 #define SUBTRACTIVE_DITHER_2 2 #define MAX_COMPRESS_DIM 6 #define RICE_1 11 #define GZIP_1 21 #define GZIP_2 22 #define PLIO_1 31 #define HCOMPRESS_1 41 #define BZIP2_1 51 /* not publicly supported; only for test purposes */ #define NOCOMPRESS -1 #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #define CASESEN 1 /* do case-sensitive string match */ #define CASEINSEN 0 /* do case-insensitive string match */ #define GT_ID_ALL_URI 0 /* hierarchical grouping parameters */ #define GT_ID_REF 1 #define GT_ID_POS 2 #define GT_ID_ALL 3 #define GT_ID_REF_URI 11 #define GT_ID_POS_URI 12 #define OPT_RM_GPT 0 #define OPT_RM_ENTRY 1 #define OPT_RM_MBR 2 #define OPT_RM_ALL 3 #define OPT_GCP_GPT 0 #define OPT_GCP_MBR 1 #define OPT_GCP_ALL 2 #define OPT_MCP_ADD 0 #define OPT_MCP_NADD 1 #define OPT_MCP_REPL 2 #define OPT_MCP_MOV 3 #define OPT_MRG_COPY 0 #define OPT_MRG_MOV 1 #define OPT_CMT_MBR 1 #define OPT_CMT_MBR_DEL 11 typedef struct /* structure used to store table column information */ { char ttype[70]; /* column name = FITS TTYPEn keyword; */ LONGLONG tbcol; /* offset in row to first byte of each column */ int tdatatype; /* datatype code of each column */ LONGLONG trepeat; /* repeat count of column; number of elements */ double tscale; /* FITS TSCALn linear scaling factor */ double tzero; /* FITS TZEROn linear scaling zero point */ LONGLONG tnull; /* FITS null value for int image or binary table cols */ char strnull[20]; /* FITS null value string for ASCII table columns */ char tform[10]; /* FITS tform keyword value */ long twidth; /* width of each ASCII table column */ }tcolumn; #define VALIDSTRUC 555 /* magic value used to identify if structure is valid */ typedef struct /* structure used to store basic FITS file information */ { int filehandle; /* handle returned by the file open function */ int driver; /* defines which set of I/O drivers should be used */ int open_count; /* number of opened 'fitsfiles' using this structure */ char *filename; /* file name */ int validcode; /* magic value used to verify that structure is valid */ int only_one; /* flag meaning only copy the specified extension */ LONGLONG filesize; /* current size of the physical disk file in bytes */ LONGLONG logfilesize; /* logical size of file, including unflushed buffers */ int lasthdu; /* is this the last HDU in the file? 0 = no, else yes */ LONGLONG bytepos; /* current logical I/O pointer position in file */ LONGLONG io_pos; /* current I/O pointer position in the physical file */ int curbuf; /* number of I/O buffer currently in use */ int curhdu; /* current HDU number; 0 = primary array */ int hdutype; /* 0 = primary array, 1 = ASCII table, 2 = binary table */ int writemode; /* 0 = readonly, 1 = readwrite */ int maxhdu; /* highest numbered HDU known to exist in the file */ int MAXHDU; /* dynamically allocated dimension of headstart array */ LONGLONG *headstart; /* byte offset in file to start of each HDU */ LONGLONG headend; /* byte offest in file to end of the current HDU header */ LONGLONG ENDpos; /* byte offest to where the END keyword was last written */ LONGLONG nextkey; /* byte offset in file to beginning of next keyword */ LONGLONG datastart; /* byte offset in file to start of the current data unit */ int imgdim; /* dimension of image; cached for fast access */ LONGLONG imgnaxis[99]; /* length of each axis; cached for fast access */ int tfield; /* number of fields in the table (primary array has 2 */ int startcol; /* used by ffgcnn to record starting column number */ LONGLONG origrows; /* original number of rows (value of NAXIS2 keyword) */ LONGLONG numrows; /* number of rows in the table (dynamically updated) */ LONGLONG rowlength; /* length of a table row or image size (bytes) */ tcolumn *tableptr; /* pointer to the table structure */ LONGLONG heapstart; /* heap start byte relative to start of data unit */ LONGLONG heapsize; /* size of the heap, in bytes */ /* the following elements are related to compressed images */ /* these record the 'requested' options to be used when the image is compressed */ int request_compress_type; /* requested image compression algorithm */ long request_tilesize[MAX_COMPRESS_DIM]; /* requested tiling size */ float request_quantize_level; /* requested quantize level */ int request_quantize_method ; /* requested quantizing method */ int request_dither_seed; /* starting offset into the array of random dithering */ int request_lossy_int_compress; /* lossy compress integer image as if float image? */ int request_huge_hdu; /* use '1Q' rather then '1P' variable length arrays */ float request_hcomp_scale; /* requested HCOMPRESS scale factor */ int request_hcomp_smooth; /* requested HCOMPRESS smooth parameter */ /* these record the actual options that were used when the image was compressed */ int compress_type; /* type of compression algorithm */ long tilesize[MAX_COMPRESS_DIM]; /* size of compression tiles */ float quantize_level; /* floating point quantization level */ int quantize_method; /* floating point pixel quantization algorithm */ int dither_seed; /* starting offset into the array of random dithering */ /* other compression parameters */ int compressimg; /* 1 if HDU contains a compressed image, else 0 */ char zcmptype[12]; /* compression type string */ int zbitpix; /* FITS data type of image (BITPIX) */ int zndim; /* dimension of image */ long znaxis[MAX_COMPRESS_DIM]; /* length of each axis */ long maxtilelen; /* max number of pixels in each image tile */ long maxelem; /* maximum byte length of tile compressed arrays */ int cn_compressed; /* column number for COMPRESSED_DATA column */ int cn_uncompressed; /* column number for UNCOMPRESSED_DATA column */ int cn_gzip_data; /* column number for GZIP2 lossless compressed data */ int cn_zscale; /* column number for ZSCALE column */ int cn_zzero; /* column number for ZZERO column */ int cn_zblank; /* column number for the ZBLANK column */ double zscale; /* scaling value, if same for all tiles */ double zzero; /* zero pt, if same for all tiles */ double cn_bscale; /* value of the BSCALE keyword in header */ double cn_bzero; /* value of the BZERO keyword (may be reset) */ double cn_actual_bzero; /* actual value of the BZERO keyword */ int zblank; /* value for null pixels, if not a column */ int rice_blocksize; /* first compression parameter: Rice pixels/block */ int rice_bytepix; /* 2nd compression parameter: Rice bytes/pixel */ float hcomp_scale; /* 1st hcompress compression parameter */ int hcomp_smooth; /* 2nd hcompress compression parameter */ int *tilerow; /* row number of the array of uncompressed tiledata */ long *tiledatasize; /* length of the array of tile data in bytes */ int *tiletype; /* datatype of the array of tile (TINT, TSHORT, etc) */ void **tiledata; /* array of uncompressed tile of data, for row *tilerow */ void **tilenullarray; /* array of optional array of null value flags */ int *tileanynull; /* anynulls in the array of tile? */ char *iobuffer; /* pointer to FITS file I/O buffers */ long bufrecnum[NIOBUF]; /* file record number of each of the buffers */ int dirty[NIOBUF]; /* has the corresponding buffer been modified? */ int ageindex[NIOBUF]; /* relative age of each buffer */ } FITSfile; typedef struct /* structure used to store basic HDU information */ { int HDUposition; /* HDU position in file; 0 = first HDU */ FITSfile *Fptr; /* pointer to FITS file structure */ }fitsfile; typedef struct /* structure for the iterator function column information */ { /* elements required as input to fits_iterate_data: */ fitsfile *fptr; /* pointer to the HDU containing the column */ int colnum; /* column number in the table (use name if < 1) */ char colname[70]; /* name (= TTYPEn value) of the column (optional) */ int datatype; /* output datatype (converted if necessary */ int iotype; /* = InputCol, InputOutputCol, or OutputCol */ /* output elements that may be useful for the work function: */ void *array; /* pointer to the array (and the null value) */ long repeat; /* binary table vector repeat value */ long tlmin; /* legal minimum data value */ long tlmax; /* legal maximum data value */ char tunit[70]; /* physical unit string */ char tdisp[70]; /* suggested display format */ } iteratorCol; #define InputCol 0 /* flag for input only iterator column */ #define InputOutputCol 1 /* flag for input and output iterator column */ #define OutputCol 2 /* flag for output only iterator column */ /*============================================================================= * * The following wtbarr typedef is used in the fits_read_wcstab() routine, * which is intended for use with the WCSLIB library written by Mark * Calabretta, http://www.atnf.csiro.au/~mcalabre/index.html * * In order to maintain WCSLIB and CFITSIO as independent libraries it * was not permissible for any CFITSIO library code to include WCSLIB * header files, or vice versa. However, the CFITSIO function * fits_read_wcstab() accepts an array of structs defined by wcs.h within * WCSLIB. The problem then was to define this struct within fitsio.h * without including wcs.h, especially noting that wcs.h will often (but * not always) be included together with fitsio.h in an applications * program that uses fits_read_wcstab(). * * Of the various possibilities, the solution adopted was for WCSLIB to * define "struct wtbarr" while fitsio.h defines "typedef wtbarr", a * untagged struct with identical members. This allows both wcs.h and * fitsio.h to define a wtbarr data type without conflict by virtue of * the fact that structure tags and typedef names share different * namespaces in C. Therefore, declarations within WCSLIB look like * * struct wtbarr *w; * * while within CFITSIO they are simply * * wtbarr *w; * * but as suggested by the commonality of the names, these are really the * same aggregate data type. However, in passing a (struct wtbarr *) to * fits_read_wcstab() a cast to (wtbarr *) is formally required. *===========================================================================*/ #ifndef WCSLIB_GETWCSTAB #define WCSLIB_GETWCSTAB typedef struct { int i; /* Image axis number. */ int m; /* Array axis number for index vectors. */ int kind; /* Array type, 'c' (coord) or 'i' (index). */ char extnam[72]; /* EXTNAME of binary table extension. */ int extver; /* EXTVER of binary table extension. */ int extlev; /* EXTLEV of binary table extension. */ char ttype[72]; /* TTYPEn of column containing the array. */ long row; /* Table row number. */ int ndim; /* Expected array dimensionality. */ int *dimlen; /* Where to write the array axis lengths. */ double **arrayp; /* Where to write the address of the array */ /* allocated to store the array. */ } wtbarr; int fits_read_wcstab(fitsfile *fptr, int nwtb, wtbarr *wtb, int *status); #endif /* WCSLIB_GETWCSTAB */ /* error status codes */ #define CREATE_DISK_FILE -106 /* create disk file, without extended filename syntax */ #define OPEN_DISK_FILE -105 /* open disk file, without extended filename syntax */ #define SKIP_TABLE -104 /* move to 1st image when opening file */ #define SKIP_IMAGE -103 /* move to 1st table when opening file */ #define SKIP_NULL_PRIMARY -102 /* skip null primary array when opening file */ #define USE_MEM_BUFF -101 /* use memory buffer when opening file */ #define OVERFLOW_ERR -11 /* overflow during datatype conversion */ #define PREPEND_PRIMARY -9 /* used in ffiimg to insert new primary array */ #define SAME_FILE 101 /* input and output files are the same */ #define TOO_MANY_FILES 103 /* tried to open too many FITS files */ #define FILE_NOT_OPENED 104 /* could not open the named file */ #define FILE_NOT_CREATED 105 /* could not create the named file */ #define WRITE_ERROR 106 /* error writing to FITS file */ #define END_OF_FILE 107 /* tried to move past end of file */ #define READ_ERROR 108 /* error reading from FITS file */ #define FILE_NOT_CLOSED 110 /* could not close the file */ #define ARRAY_TOO_BIG 111 /* array dimensions exceed internal limit */ #define READONLY_FILE 112 /* Cannot write to readonly file */ #define MEMORY_ALLOCATION 113 /* Could not allocate memory */ #define BAD_FILEPTR 114 /* invalid fitsfile pointer */ #define NULL_INPUT_PTR 115 /* NULL input pointer to routine */ #define SEEK_ERROR 116 /* error seeking position in file */ #define BAD_URL_PREFIX 121 /* invalid URL prefix on file name */ #define TOO_MANY_DRIVERS 122 /* tried to register too many IO drivers */ #define DRIVER_INIT_FAILED 123 /* driver initialization failed */ #define NO_MATCHING_DRIVER 124 /* matching driver is not registered */ #define URL_PARSE_ERROR 125 /* failed to parse input file URL */ #define RANGE_PARSE_ERROR 126 /* failed to parse input file URL */ #define SHARED_ERRBASE (150) #define SHARED_BADARG (SHARED_ERRBASE + 1) #define SHARED_NULPTR (SHARED_ERRBASE + 2) #define SHARED_TABFULL (SHARED_ERRBASE + 3) #define SHARED_NOTINIT (SHARED_ERRBASE + 4) #define SHARED_IPCERR (SHARED_ERRBASE + 5) #define SHARED_NOMEM (SHARED_ERRBASE + 6) #define SHARED_AGAIN (SHARED_ERRBASE + 7) #define SHARED_NOFILE (SHARED_ERRBASE + 8) #define SHARED_NORESIZE (SHARED_ERRBASE + 9) #define HEADER_NOT_EMPTY 201 /* header already contains keywords */ #define KEY_NO_EXIST 202 /* keyword not found in header */ #define KEY_OUT_BOUNDS 203 /* keyword record number is out of bounds */ #define VALUE_UNDEFINED 204 /* keyword value field is blank */ #define NO_QUOTE 205 /* string is missing the closing quote */ #define BAD_INDEX_KEY 206 /* illegal indexed keyword name */ #define BAD_KEYCHAR 207 /* illegal character in keyword name or card */ #define BAD_ORDER 208 /* required keywords out of order */ #define NOT_POS_INT 209 /* keyword value is not a positive integer */ #define NO_END 210 /* couldn't find END keyword */ #define BAD_BITPIX 211 /* illegal BITPIX keyword value*/ #define BAD_NAXIS 212 /* illegal NAXIS keyword value */ #define BAD_NAXES 213 /* illegal NAXISn keyword value */ #define BAD_PCOUNT 214 /* illegal PCOUNT keyword value */ #define BAD_GCOUNT 215 /* illegal GCOUNT keyword value */ #define BAD_TFIELDS 216 /* illegal TFIELDS keyword value */ #define NEG_WIDTH 217 /* negative table row size */ #define NEG_ROWS 218 /* negative number of rows in table */ #define COL_NOT_FOUND 219 /* column with this name not found in table */ #define BAD_SIMPLE 220 /* illegal value of SIMPLE keyword */ #define NO_SIMPLE 221 /* Primary array doesn't start with SIMPLE */ #define NO_BITPIX 222 /* Second keyword not BITPIX */ #define NO_NAXIS 223 /* Third keyword not NAXIS */ #define NO_NAXES 224 /* Couldn't find all the NAXISn keywords */ #define NO_XTENSION 225 /* HDU doesn't start with XTENSION keyword */ #define NOT_ATABLE 226 /* the CHDU is not an ASCII table extension */ #define NOT_BTABLE 227 /* the CHDU is not a binary table extension */ #define NO_PCOUNT 228 /* couldn't find PCOUNT keyword */ #define NO_GCOUNT 229 /* couldn't find GCOUNT keyword */ #define NO_TFIELDS 230 /* couldn't find TFIELDS keyword */ #define NO_TBCOL 231 /* couldn't find TBCOLn keyword */ #define NO_TFORM 232 /* couldn't find TFORMn keyword */ #define NOT_IMAGE 233 /* the CHDU is not an IMAGE extension */ #define BAD_TBCOL 234 /* TBCOLn keyword value < 0 or > rowlength */ #define NOT_TABLE 235 /* the CHDU is not a table */ #define COL_TOO_WIDE 236 /* column is too wide to fit in table */ #define COL_NOT_UNIQUE 237 /* more than 1 column name matches template */ #define BAD_ROW_WIDTH 241 /* sum of column widths not = NAXIS1 */ #define UNKNOWN_EXT 251 /* unrecognizable FITS extension type */ #define UNKNOWN_REC 252 /* unrecognizable FITS record */ #define END_JUNK 253 /* END keyword is not blank */ #define BAD_HEADER_FILL 254 /* Header fill area not blank */ #define BAD_DATA_FILL 255 /* Data fill area not blank or zero */ #define BAD_TFORM 261 /* illegal TFORM format code */ #define BAD_TFORM_DTYPE 262 /* unrecognizable TFORM datatype code */ #define BAD_TDIM 263 /* illegal TDIMn keyword value */ #define BAD_HEAP_PTR 264 /* invalid BINTABLE heap address */ #define BAD_HDU_NUM 301 /* HDU number < 1 or > MAXHDU */ #define BAD_COL_NUM 302 /* column number < 1 or > tfields */ #define NEG_FILE_POS 304 /* tried to move before beginning of file */ #define NEG_BYTES 306 /* tried to read or write negative bytes */ #define BAD_ROW_NUM 307 /* illegal starting row number in table */ #define BAD_ELEM_NUM 308 /* illegal starting element number in vector */ #define NOT_ASCII_COL 309 /* this is not an ASCII string column */ #define NOT_LOGICAL_COL 310 /* this is not a logical datatype column */ #define BAD_ATABLE_FORMAT 311 /* ASCII table column has wrong format */ #define BAD_BTABLE_FORMAT 312 /* Binary table column has wrong format */ #define NO_NULL 314 /* null value has not been defined */ #define NOT_VARI_LEN 317 /* this is not a variable length column */ #define BAD_DIMEN 320 /* illegal number of dimensions in array */ #define BAD_PIX_NUM 321 /* first pixel number greater than last pixel */ #define ZERO_SCALE 322 /* illegal BSCALE or TSCALn keyword = 0 */ #define NEG_AXIS 323 /* illegal axis length < 1 */ #define NOT_GROUP_TABLE 340 #define HDU_ALREADY_MEMBER 341 #define MEMBER_NOT_FOUND 342 #define GROUP_NOT_FOUND 343 #define BAD_GROUP_ID 344 #define TOO_MANY_HDUS_TRACKED 345 #define HDU_ALREADY_TRACKED 346 #define BAD_OPTION 347 #define IDENTICAL_POINTERS 348 #define BAD_GROUP_ATTACH 349 #define BAD_GROUP_DETACH 350 #define BAD_I2C 401 /* bad int to formatted string conversion */ #define BAD_F2C 402 /* bad float to formatted string conversion */ #define BAD_INTKEY 403 /* can't interprete keyword value as integer */ #define BAD_LOGICALKEY 404 /* can't interprete keyword value as logical */ #define BAD_FLOATKEY 405 /* can't interprete keyword value as float */ #define BAD_DOUBLEKEY 406 /* can't interprete keyword value as double */ #define BAD_C2I 407 /* bad formatted string to int conversion */ #define BAD_C2F 408 /* bad formatted string to float conversion */ #define BAD_C2D 409 /* bad formatted string to double conversion */ #define BAD_DATATYPE 410 /* bad keyword datatype code */ #define BAD_DECIM 411 /* bad number of decimal places specified */ #define NUM_OVERFLOW 412 /* overflow during datatype conversion */ # define DATA_COMPRESSION_ERR 413 /* error in imcompress routines */ # define DATA_DECOMPRESSION_ERR 414 /* error in imcompress routines */ # define NO_COMPRESSED_TILE 415 /* compressed tile doesn't exist */ #define BAD_DATE 420 /* error in date or time conversion */ #define PARSE_SYNTAX_ERR 431 /* syntax error in parser expression */ #define PARSE_BAD_TYPE 432 /* expression did not evaluate to desired type */ #define PARSE_LRG_VECTOR 433 /* vector result too large to return in array */ #define PARSE_NO_OUTPUT 434 /* data parser failed not sent an out column */ #define PARSE_BAD_COL 435 /* bad data encounter while parsing column */ #define PARSE_BAD_OUTPUT 436 /* Output file not of proper type */ #define ANGLE_TOO_BIG 501 /* celestial angle too large for projection */ #define BAD_WCS_VAL 502 /* bad celestial coordinate or pixel value */ #define WCS_ERROR 503 /* error in celestial coordinate calculation */ #define BAD_WCS_PROJ 504 /* unsupported type of celestial projection */ #define NO_WCS_KEY 505 /* celestial coordinate keywords not found */ #define APPROX_WCS_KEY 506 /* approximate WCS keywords were calculated */ #define NO_CLOSE_ERROR 999 /* special value used internally to switch off */ /* the error message from ffclos and ffchdu */ /*------- following error codes are used in the grparser.c file -----------*/ #define NGP_ERRBASE (360) /* base chosen so not to interfere with CFITSIO */ #define NGP_OK (0) #define NGP_NO_MEMORY (NGP_ERRBASE + 0) /* malloc failed */ #define NGP_READ_ERR (NGP_ERRBASE + 1) /* read error from file */ #define NGP_NUL_PTR (NGP_ERRBASE + 2) /* null pointer passed as argument */ #define NGP_EMPTY_CURLINE (NGP_ERRBASE + 3) /* line read seems to be empty */ #define NGP_UNREAD_QUEUE_FULL (NGP_ERRBASE + 4) /* cannot unread more then 1 line (or single line twice) */ #define NGP_INC_NESTING (NGP_ERRBASE + 5) /* too deep include file nesting (inf. loop ?) */ #define NGP_ERR_FOPEN (NGP_ERRBASE + 6) /* fopen() failed, cannot open file */ #define NGP_EOF (NGP_ERRBASE + 7) /* end of file encountered */ #define NGP_BAD_ARG (NGP_ERRBASE + 8) /* bad arguments passed */ #define NGP_TOKEN_NOT_EXPECT (NGP_ERRBASE + 9) /* token not expected here */ /* The following exclusion if __CINT__ is defined is needed for ROOT */ #ifndef __CINT__ /* the following 3 lines are needed to support C++ compilers */ #ifdef __cplusplus extern "C" { #endif #endif int CFITS2Unit( fitsfile *fptr ); fitsfile* CUnit2FITS(int unit); /*---------------- FITS file URL parsing routines -------------*/ int fits_get_token (char **ptr, char *delimiter, char *token, int *isanumber); int fits_get_token2(char **ptr, char *delimiter, char **token, int *isanumber, int *status); char *fits_split_names(char *list); int ffiurl( char *url, char *urltype, char *infile, char *outfile, char *extspec, char *rowfilter, char *binspec, char *colspec, int *status); int ffifile (char *url, char *urltype, char *infile, char *outfile, char *extspec, char *rowfilter, char *binspec, char *colspec, char *pixfilter, int *status); int ffifile2 (char *url, char *urltype, char *infile, char *outfile, char *extspec, char *rowfilter, char *binspec, char *colspec, char *pixfilter, char *compspec, int *status); int ffrtnm(char *url, char *rootname, int *status); int ffexist(const char *infile, int *exists, int *status); int ffexts(char *extspec, int *extnum, char *extname, int *extvers, int *hdutype, char *colname, char *rowexpress, int *status); int ffextn(char *url, int *extension_num, int *status); int ffurlt(fitsfile *fptr, char *urlType, int *status); int ffbins(char *binspec, int *imagetype, int *haxis, char colname[4][FLEN_VALUE], double *minin, double *maxin, double *binsizein, char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE], char binname[4][FLEN_VALUE], double *weight, char *wtname, int *recip, int *status); int ffbinr(char **binspec, char *colname, double *minin, double *maxin, double *binsizein, char *minname, char *maxname, char *binname, int *status); int fits_copy_cell2image(fitsfile *fptr, fitsfile *newptr, char *colname, long rownum, int *status); int fits_copy_image2cell(fitsfile *fptr, fitsfile *newptr, char *colname, long rownum, int copykeyflag, int *status); int fits_copy_pixlist2image(fitsfile *infptr, fitsfile *outfptr, int firstkey, /* I - first HDU record number to start with */ int naxis, int *colnum, int *status); int ffimport_file( char *filename, char **contents, int *status ); int ffrwrg( char *rowlist, LONGLONG maxrows, int maxranges, int *numranges, long *minrow, long *maxrow, int *status); int ffrwrgll( char *rowlist, LONGLONG maxrows, int maxranges, int *numranges, LONGLONG *minrow, LONGLONG *maxrow, int *status); /*---------------- FITS file I/O routines -------------*/ int fits_init_cfitsio(void); int ffomem(fitsfile **fptr, const char *name, int mode, void **buffptr, size_t *buffsize, size_t deltasize, void *(*mem_realloc)(void *p, size_t newsize), int *status); int ffopen(fitsfile **fptr, const char *filename, int iomode, int *status); int ffopentest(int soname, fitsfile **fptr, const char *filename, int iomode, int *status); int ffdopn(fitsfile **fptr, const char *filename, int iomode, int *status); int fftopn(fitsfile **fptr, const char *filename, int iomode, int *status); int ffiopn(fitsfile **fptr, const char *filename, int iomode, int *status); int ffdkopn(fitsfile **fptr, const char *filename, int iomode, int *status); int ffreopen(fitsfile *openfptr, fitsfile **newfptr, int *status); int ffinit( fitsfile **fptr, const char *filename, int *status); int ffdkinit(fitsfile **fptr, const char *filename, int *status); int ffimem(fitsfile **fptr, void **buffptr, size_t *buffsize, size_t deltasize, void *(*mem_realloc)(void *p, size_t newsize), int *status); int fftplt(fitsfile **fptr, const char *filename, const char *tempname, int *status); int ffflus(fitsfile *fptr, int *status); int ffflsh(fitsfile *fptr, int clearbuf, int *status); int ffclos(fitsfile *fptr, int *status); int ffdelt(fitsfile *fptr, int *status); int ffflnm(fitsfile *fptr, char *filename, int *status); int ffflmd(fitsfile *fptr, int *filemode, int *status); int fits_delete_iraf_file(const char *filename, int *status); /*---------------- utility routines -------------*/ float ffvers(float *version); void ffupch(char *string); void ffgerr(int status, char *errtext); void ffpmsg(const char *err_message); void ffpmrk(void); int ffgmsg(char *err_message); void ffcmsg(void); void ffcmrk(void); void ffrprt(FILE *stream, int status); void ffcmps(char *templt, char *colname, int casesen, int *match, int *exact); int fftkey(const char *keyword, int *status); int fftrec(char *card, int *status); int ffnchk(fitsfile *fptr, int *status); int ffkeyn(const char *keyroot, int value, char *keyname, int *status); int ffnkey(int value, const char *keyroot, char *keyname, int *status); int ffgkcl(char *card); int ffdtyp(const char *cval, char *dtype, int *status); int ffinttyp(char *cval, int *datatype, int *negative, int *status); int ffpsvc(char *card, char *value, char *comm, int *status); int ffgknm(char *card, char *name, int *length, int *status); int ffgthd(char *tmplt, char *card, int *hdtype, int *status); int ffmkky(const char *keyname, char *keyval, const char *comm, char *card, int *status); int fits_translate_keyword(char *inrec, char *outrec, char *patterns[][2], int npat, int n_value, int n_offset, int n_range, int *pat_num, int *i, int *j, int *m, int *n, int *status); int fits_translate_keywords(fitsfile *infptr, fitsfile *outfptr, int firstkey, char *patterns[][2], int npat, int n_value, int n_offset, int n_range, int *status); int ffasfm(char *tform, int *datacode, long *width, int *decim, int *status); int ffbnfm(char *tform, int *datacode, long *repeat, long *width, int *status); int ffbnfmll(char *tform, int *datacode, LONGLONG *repeat, long *width, int *status); int ffgabc(int tfields, char **tform, int space, long *rowlen, long *tbcol, int *status); int fits_get_section_range(char **ptr,long *secmin,long *secmax,long *incre, int *status); /* ffmbyt should not normally be used in application programs, but it is defined here as a publicly available routine because there are a few rare cases where it is needed */ int ffmbyt(fitsfile *fptr, LONGLONG bytpos, int ignore_err, int *status); /*----------------- write single keywords --------------*/ int ffpky(fitsfile *fptr, int datatype, const char *keyname, void *value, const char *comm, int *status); int ffprec(fitsfile *fptr, const char *card, int *status); int ffpcom(fitsfile *fptr, const char *comm, int *status); int ffpunt(fitsfile *fptr, const char *keyname, const char *unit, int *status); int ffphis(fitsfile *fptr, const char *history, int *status); int ffpdat(fitsfile *fptr, int *status); int ffverifydate(int year, int month, int day, int *status); int ffgstm(char *timestr, int *timeref, int *status); int ffgsdt(int *day, int *month, int *year, int *status); int ffdt2s(int year, int month, int day, char *datestr, int *status); int fftm2s(int year, int month, int day, int hour, int minute, double second, int decimals, char *datestr, int *status); int ffs2dt(char *datestr, int *year, int *month, int *day, int *status); int ffs2tm(char *datestr, int *year, int *month, int *day, int *hour, int *minute, double *second, int *status); int ffpkyu(fitsfile *fptr, const char *keyname, const char *comm, int *status); int ffpkys(fitsfile *fptr, const char *keyname, const char *value, const char *comm,int *status); int ffpkls(fitsfile *fptr, const char *keyname, const char *value, const char *comm,int *status); int ffplsw(fitsfile *fptr, int *status); int ffpkyl(fitsfile *fptr, const char *keyname, int value, const char *comm, int *status); int ffpkyj(fitsfile *fptr, const char *keyname, LONGLONG value, const char *comm, int *status); int ffpkyf(fitsfile *fptr, const char *keyname, float value, int decim, const char *comm, int *status); int ffpkye(fitsfile *fptr, const char *keyname, float value, int decim, const char *comm, int *status); int ffpkyg(fitsfile *fptr, const char *keyname, double value, int decim, const char *comm, int *status); int ffpkyd(fitsfile *fptr, const char *keyname, double value, int decim, const char *comm, int *status); int ffpkyc(fitsfile *fptr, const char *keyname, float *value, int decim, const char *comm, int *status); int ffpkym(fitsfile *fptr, const char *keyname, double *value, int decim, const char *comm, int *status); int ffpkfc(fitsfile *fptr, const char *keyname, float *value, int decim, const char *comm, int *status); int ffpkfm(fitsfile *fptr, const char *keyname, double *value, int decim, const char *comm, int *status); int ffpkyt(fitsfile *fptr, const char *keyname, long intval, double frac, const char *comm, int *status); int ffptdm( fitsfile *fptr, int colnum, int naxis, long naxes[], int *status); int ffptdmll( fitsfile *fptr, int colnum, int naxis, LONGLONG naxes[], int *status); /*----------------- write array of keywords --------------*/ int ffpkns(fitsfile *fptr, const char *keyroot, int nstart, int nkey, char *value[], char *comm[], int *status); int ffpknl(fitsfile *fptr, const char *keyroot, int nstart, int nkey, int *value, char *comm[], int *status); int ffpknj(fitsfile *fptr, const char *keyroot, int nstart, int nkey, long *value, char *comm[], int *status); int ffpknjj(fitsfile *fptr, const char *keyroot, int nstart, int nkey, LONGLONG *value, char *comm[], int *status); int ffpknf(fitsfile *fptr, const char *keyroot, int nstart, int nkey, float *value, int decim, char *comm[], int *status); int ffpkne(fitsfile *fptr, const char *keyroot, int nstart, int nkey, float *value, int decim, char *comm[], int *status); int ffpkng(fitsfile *fptr, const char *keyroot, int nstart, int nkey, double *value, int decim, char *comm[], int *status); int ffpknd(fitsfile *fptr, const char *keyroot, int nstart, int nkey, double *value, int decim, char *comm[], int *status); int ffcpky(fitsfile *infptr,fitsfile *outfptr,int incol,int outcol, char *rootname, int *status); /*----------------- write required header keywords --------------*/ int ffphps( fitsfile *fptr, int bitpix, int naxis, long naxes[], int *status); int ffphpsll( fitsfile *fptr, int bitpix, int naxis, LONGLONG naxes[], int *status); int ffphpr( fitsfile *fptr, int simple, int bitpix, int naxis, long naxes[], LONGLONG pcount, LONGLONG gcount, int extend, int *status); int ffphprll( fitsfile *fptr, int simple, int bitpix, int naxis, LONGLONG naxes[], LONGLONG pcount, LONGLONG gcount, int extend, int *status); int ffphtb(fitsfile *fptr, LONGLONG naxis1, LONGLONG naxis2, int tfields, char **ttype, long *tbcol, char **tform, char **tunit, const char *extname, int *status); int ffphbn(fitsfile *fptr, LONGLONG naxis2, int tfields, char **ttype, char **tform, char **tunit, const char *extname, LONGLONG pcount, int *status); int ffphext( fitsfile *fptr, const char *xtension, int bitpix, int naxis, long naxes[], LONGLONG pcount, LONGLONG gcount, int *status); /*----------------- write template keywords --------------*/ int ffpktp(fitsfile *fptr, const char *filename, int *status); /*------------------ get header information --------------*/ int ffghsp(fitsfile *fptr, int *nexist, int *nmore, int *status); int ffghps(fitsfile *fptr, int *nexist, int *position, int *status); /*------------------ move position in header -------------*/ int ffmaky(fitsfile *fptr, int nrec, int *status); int ffmrky(fitsfile *fptr, int nrec, int *status); /*------------------ read single keywords -----------------*/ int ffgnxk(fitsfile *fptr, char **inclist, int ninc, char **exclist, int nexc, char *card, int *status); int ffgrec(fitsfile *fptr, int nrec, char *card, int *status); int ffgcrd(fitsfile *fptr, const char *keyname, char *card, int *status); int ffgstr(fitsfile *fptr, const char *string, char *card, int *status); int ffgunt(fitsfile *fptr, const char *keyname, char *unit, int *status); int ffgkyn(fitsfile *fptr, int nkey, char *keyname, char *keyval, char *comm, int *status); int ffgkey(fitsfile *fptr, const char *keyname, char *keyval, char *comm, int *status); int ffgky( fitsfile *fptr, int datatype, const char *keyname, void *value, char *comm, int *status); int ffgkys(fitsfile *fptr, const char *keyname, char *value, char *comm, int *status); int ffgkls(fitsfile *fptr, const char *keyname, char **value, char *comm, int *status); int fffree(void *value, int *status); int fffkls(char *value, int *status); int ffgkyl(fitsfile *fptr, const char *keyname, int *value, char *comm, int *status); int ffgkyj(fitsfile *fptr, const char *keyname, long *value, char *comm, int *status); int ffgkyjj(fitsfile *fptr, const char *keyname, LONGLONG *value, char *comm, int *status); int ffgkye(fitsfile *fptr, const char *keyname, float *value, char *comm,int *status); int ffgkyd(fitsfile *fptr, const char *keyname, double *value,char *comm,int *status); int ffgkyc(fitsfile *fptr, const char *keyname, float *value, char *comm,int *status); int ffgkym(fitsfile *fptr, const char *keyname, double *value,char *comm,int *status); int ffgkyt(fitsfile *fptr, const char *keyname, long *ivalue, double *dvalue, char *comm, int *status); int ffgtdm(fitsfile *fptr, int colnum, int maxdim, int *naxis, long naxes[], int *status); int ffgtdmll(fitsfile *fptr, int colnum, int maxdim, int *naxis, LONGLONG naxes[], int *status); int ffdtdm(fitsfile *fptr, char *tdimstr, int colnum, int maxdim, int *naxis, long naxes[], int *status); int ffdtdmll(fitsfile *fptr, char *tdimstr, int colnum, int maxdim, int *naxis, LONGLONG naxes[], int *status); /*------------------ read array of keywords -----------------*/ int ffgkns(fitsfile *fptr, const char *keyname, int nstart, int nmax, char *value[], int *nfound, int *status); int ffgknl(fitsfile *fptr, const char *keyname, int nstart, int nmax, int *value, int *nfound, int *status); int ffgknj(fitsfile *fptr, const char *keyname, int nstart, int nmax, long *value, int *nfound, int *status); int ffgknjj(fitsfile *fptr, const char *keyname, int nstart, int nmax, LONGLONG *value, int *nfound, int *status); int ffgkne(fitsfile *fptr, const char *keyname, int nstart, int nmax, float *value, int *nfound, int *status); int ffgknd(fitsfile *fptr, const char *keyname, int nstart, int nmax, double *value, int *nfound, int *status); int ffh2st(fitsfile *fptr, char **header, int *status); int ffhdr2str( fitsfile *fptr, int exclude_comm, char **exclist, int nexc, char **header, int *nkeys, int *status); int ffcnvthdr2str( fitsfile *fptr, int exclude_comm, char **exclist, int nexc, char **header, int *nkeys, int *status); /*----------------- read required header keywords --------------*/ int ffghpr(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis, long naxes[], long *pcount, long *gcount, int *extend, int *status); int ffghprll(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis, LONGLONG naxes[], long *pcount, long *gcount, int *extend, int *status); int ffghtb(fitsfile *fptr,int maxfield, long *naxis1, long *naxis2, int *tfields, char **ttype, long *tbcol, char **tform, char **tunit, char *extname, int *status); int ffghtbll(fitsfile *fptr,int maxfield, LONGLONG *naxis1, LONGLONG *naxis2, int *tfields, char **ttype, LONGLONG *tbcol, char **tform, char **tunit, char *extname, int *status); int ffghbn(fitsfile *fptr, int maxfield, long *naxis2, int *tfields, char **ttype, char **tform, char **tunit, char *extname, long *pcount, int *status); int ffghbnll(fitsfile *fptr, int maxfield, LONGLONG *naxis2, int *tfields, char **ttype, char **tform, char **tunit, char *extname, LONGLONG *pcount, int *status); /*--------------------- update keywords ---------------*/ int ffuky(fitsfile *fptr, int datatype, const char *keyname, void *value, const char *comm, int *status); int ffucrd(fitsfile *fptr, const char *keyname, const char *card, int *status); int ffukyu(fitsfile *fptr, const char *keyname, const char *comm, int *status); int ffukys(fitsfile *fptr, const char *keyname, const char *value, const char *comm, int *status); int ffukls(fitsfile *fptr, const char *keyname, const char *value, const char *comm, int *status); int ffukyl(fitsfile *fptr, const char *keyname, int value, const char *comm, int *status); int ffukyj(fitsfile *fptr, const char *keyname, LONGLONG value, const char *comm, int *status); int ffukyf(fitsfile *fptr, const char *keyname, float value, int decim, const char *comm, int *status); int ffukye(fitsfile *fptr, const char *keyname, float value, int decim, const char *comm, int *status); int ffukyg(fitsfile *fptr, const char *keyname, double value, int decim, const char *comm, int *status); int ffukyd(fitsfile *fptr, const char *keyname, double value, int decim, const char *comm, int *status); int ffukyc(fitsfile *fptr, const char *keyname, float *value, int decim, const char *comm, int *status); int ffukym(fitsfile *fptr, const char *keyname, double *value, int decim, const char *comm, int *status); int ffukfc(fitsfile *fptr, const char *keyname, float *value, int decim, const char *comm, int *status); int ffukfm(fitsfile *fptr, const char *keyname, double *value, int decim, const char *comm, int *status); /*--------------------- modify keywords ---------------*/ int ffmrec(fitsfile *fptr, int nkey, const char *card, int *status); int ffmcrd(fitsfile *fptr, const char *keyname, const char *card, int *status); int ffmnam(fitsfile *fptr, const char *oldname, const char *newname, int *status); int ffmcom(fitsfile *fptr, const char *keyname, const char *comm, int *status); int ffmkyu(fitsfile *fptr, const char *keyname, const char *comm, int *status); int ffmkys(fitsfile *fptr, const char *keyname, const char *value, const char *comm,int *status); int ffmkls(fitsfile *fptr, const char *keyname, const char *value, const char *comm,int *status); int ffmkyl(fitsfile *fptr, const char *keyname, int value, const char *comm, int *status); int ffmkyj(fitsfile *fptr, const char *keyname, LONGLONG value, const char *comm, int *status); int ffmkyf(fitsfile *fptr, const char *keyname, float value, int decim, const char *comm, int *status); int ffmkye(fitsfile *fptr, const char *keyname, float value, int decim, const char *comm, int *status); int ffmkyg(fitsfile *fptr, const char *keyname, double value, int decim, const char *comm, int *status); int ffmkyd(fitsfile *fptr, const char *keyname, double value, int decim, const char *comm, int *status); int ffmkyc(fitsfile *fptr, const char *keyname, float *value, int decim, const char *comm, int *status); int ffmkym(fitsfile *fptr, const char *keyname, double *value, int decim, const char *comm, int *status); int ffmkfc(fitsfile *fptr, const char *keyname, float *value, int decim, const char *comm, int *status); int ffmkfm(fitsfile *fptr, const char *keyname, double *value, int decim, const char *comm, int *status); /*--------------------- insert keywords ---------------*/ int ffirec(fitsfile *fptr, int nkey, const char *card, int *status); int ffikey(fitsfile *fptr, const char *card, int *status); int ffikyu(fitsfile *fptr, const char *keyname, const char *comm, int *status); int ffikys(fitsfile *fptr, const char *keyname, const char *value, const char *comm,int *status); int ffikls(fitsfile *fptr, const char *keyname, const char *value, const char *comm,int *status); int ffikyl(fitsfile *fptr, const char *keyname, int value, const char *comm, int *status); int ffikyj(fitsfile *fptr, const char *keyname, LONGLONG value, const char *comm, int *status); int ffikyf(fitsfile *fptr, const char *keyname, float value, int decim, const char *comm, int *status); int ffikye(fitsfile *fptr, const char *keyname, float value, int decim, const char *comm, int *status); int ffikyg(fitsfile *fptr, const char *keyname, double value, int decim, const char *comm, int *status); int ffikyd(fitsfile *fptr, const char *keyname, double value, int decim, const char *comm, int *status); int ffikyc(fitsfile *fptr, const char *keyname, float *value, int decim, const char *comm, int *status); int ffikym(fitsfile *fptr, const char *keyname, double *value, int decim, const char *comm, int *status); int ffikfc(fitsfile *fptr, const char *keyname, float *value, int decim, const char *comm, int *status); int ffikfm(fitsfile *fptr, const char *keyname, double *value, int decim, const char *comm, int *status); /*--------------------- delete keywords ---------------*/ int ffdkey(fitsfile *fptr, const char *keyname, int *status); int ffdstr(fitsfile *fptr, const char *string, int *status); int ffdrec(fitsfile *fptr, int keypos, int *status); /*--------------------- get HDU information -------------*/ int ffghdn(fitsfile *fptr, int *chdunum); int ffghdt(fitsfile *fptr, int *exttype, int *status); int ffghad(fitsfile *fptr, long *headstart, long *datastart, long *dataend, int *status); int ffghadll(fitsfile *fptr, LONGLONG *headstart, LONGLONG *datastart, LONGLONG *dataend, int *status); int ffghof(fitsfile *fptr, OFF_T *headstart, OFF_T *datastart, OFF_T *dataend, int *status); int ffgipr(fitsfile *fptr, int maxaxis, int *imgtype, int *naxis, long *naxes, int *status); int ffgiprll(fitsfile *fptr, int maxaxis, int *imgtype, int *naxis, LONGLONG *naxes, int *status); int ffgidt(fitsfile *fptr, int *imgtype, int *status); int ffgiet(fitsfile *fptr, int *imgtype, int *status); int ffgidm(fitsfile *fptr, int *naxis, int *status); int ffgisz(fitsfile *fptr, int nlen, long *naxes, int *status); int ffgiszll(fitsfile *fptr, int nlen, LONGLONG *naxes, int *status); /*--------------------- HDU operations -------------*/ int ffmahd(fitsfile *fptr, int hdunum, int *exttype, int *status); int ffmrhd(fitsfile *fptr, int hdumov, int *exttype, int *status); int ffmnhd(fitsfile *fptr, int exttype, char *hduname, int hduvers, int *status); int ffthdu(fitsfile *fptr, int *nhdu, int *status); int ffcrhd(fitsfile *fptr, int *status); int ffcrim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status); int ffcrimll(fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, int *status); int ffcrtb(fitsfile *fptr, int tbltype, LONGLONG naxis2, int tfields, char **ttype, char **tform, char **tunit, const char *extname, int *status); int ffiimg(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status); int ffiimgll(fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, int *status); int ffitab(fitsfile *fptr, LONGLONG naxis1, LONGLONG naxis2, int tfields, char **ttype, long *tbcol, char **tform, char **tunit, const char *extname, int *status); int ffibin(fitsfile *fptr, LONGLONG naxis2, int tfields, char **ttype, char **tform, char **tunit, const char *extname, LONGLONG pcount, int *status); int ffrsim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status); int ffrsimll(fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, int *status); int ffdhdu(fitsfile *fptr, int *hdutype, int *status); int ffcopy(fitsfile *infptr, fitsfile *outfptr, int morekeys, int *status); int ffcpfl(fitsfile *infptr, fitsfile *outfptr, int prev, int cur, int follow, int *status); int ffcphd(fitsfile *infptr, fitsfile *outfptr, int *status); int ffcpdt(fitsfile *infptr, fitsfile *outfptr, int *status); int ffchfl(fitsfile *fptr, int *status); int ffcdfl(fitsfile *fptr, int *status); int ffwrhdu(fitsfile *fptr, FILE *outstream, int *status); int ffrdef(fitsfile *fptr, int *status); int ffhdef(fitsfile *fptr, int morekeys, int *status); int ffpthp(fitsfile *fptr, long theap, int *status); int ffcsum(fitsfile *fptr, long nrec, unsigned long *sum, int *status); void ffesum(unsigned long sum, int complm, char *ascii); unsigned long ffdsum(char *ascii, int complm, unsigned long *sum); int ffpcks(fitsfile *fptr, int *status); int ffupck(fitsfile *fptr, int *status); int ffvcks(fitsfile *fptr, int *datastatus, int *hdustatus, int *status); int ffgcks(fitsfile *fptr, unsigned long *datasum, unsigned long *hdusum, int *status); /*--------------------- define scaling or null values -------------*/ int ffpscl(fitsfile *fptr, double scale, double zero, int *status); int ffpnul(fitsfile *fptr, LONGLONG nulvalue, int *status); int fftscl(fitsfile *fptr, int colnum, double scale, double zero, int *status); int fftnul(fitsfile *fptr, int colnum, LONGLONG nulvalue, int *status); int ffsnul(fitsfile *fptr, int colnum, char *nulstring, int *status); /*--------------------- get column information -------------*/ int ffgcno(fitsfile *fptr, int casesen, char *templt, int *colnum, int *status); int ffgcnn(fitsfile *fptr, int casesen, char *templt, char *colname, int *colnum, int *status); int ffgtcl(fitsfile *fptr, int colnum, int *typecode, long *repeat, long *width, int *status); int ffgtclll(fitsfile *fptr, int colnum, int *typecode, LONGLONG *repeat, LONGLONG *width, int *status); int ffeqty(fitsfile *fptr, int colnum, int *typecode, long *repeat, long *width, int *status); int ffeqtyll(fitsfile *fptr, int colnum, int *typecode, LONGLONG *repeat, LONGLONG *width, int *status); int ffgncl(fitsfile *fptr, int *ncols, int *status); int ffgnrw(fitsfile *fptr, long *nrows, int *status); int ffgnrwll(fitsfile *fptr, LONGLONG *nrows, int *status); int ffgacl(fitsfile *fptr, int colnum, char *ttype, long *tbcol, char *tunit, char *tform, double *tscal, double *tzero, char *tnull, char *tdisp, int *status); int ffgbcl(fitsfile *fptr, int colnum, char *ttype, char *tunit, char *dtype, long *repeat, double *tscal, double *tzero, long *tnull, char *tdisp, int *status); int ffgbclll(fitsfile *fptr, int colnum, char *ttype, char *tunit, char *dtype, LONGLONG *repeat, double *tscal, double *tzero, LONGLONG *tnull, char *tdisp, int *status); int ffgrsz(fitsfile *fptr, long *nrows, int *status); int ffgcdw(fitsfile *fptr, int colnum, int *width, int *status); /*--------------------- read primary array or image elements -------------*/ int ffgpxv(fitsfile *fptr, int datatype, long *firstpix, LONGLONG nelem, void *nulval, void *array, int *anynul, int *status); int ffgpxvll(fitsfile *fptr, int datatype, LONGLONG *firstpix, LONGLONG nelem, void *nulval, void *array, int *anynul, int *status); int ffgpxf(fitsfile *fptr, int datatype, long *firstpix, LONGLONG nelem, void *array, char *nullarray, int *anynul, int *status); int ffgpxfll(fitsfile *fptr, int datatype, LONGLONG *firstpix, LONGLONG nelem, void *array, char *nullarray, int *anynul, int *status); int ffgsv(fitsfile *fptr, int datatype, long *blc, long *trc, long *inc, void *nulval, void *array, int *anynul, int *status); int ffgpv(fitsfile *fptr, int datatype, LONGLONG firstelem, LONGLONG nelem, void *nulval, void *array, int *anynul, int *status); int ffgpf(fitsfile *fptr, int datatype, LONGLONG firstelem, LONGLONG nelem, void *array, char *nullarray, int *anynul, int *status); int ffgpvb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned char nulval, unsigned char *array, int *anynul, int *status); int ffgpvsb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, signed char nulval, signed char *array, int *anynul, int *status); int ffgpvui(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned short nulval, unsigned short *array, int *anynul, int *status); int ffgpvi(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, short nulval, short *array, int *anynul, int *status); int ffgpvuj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned long nulval, unsigned long *array, int *anynul, int *status); int ffgpvj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, long nulval, long *array, int *anynul, int *status); int ffgpvjj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, LONGLONG nulval, LONGLONG *array, int *anynul, int *status); int ffgpvuk(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned int nulval, unsigned int *array, int *anynul, int *status); int ffgpvk(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, int nulval, int *array, int *anynul, int *status); int ffgpve(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, float nulval, float *array, int *anynul, int *status); int ffgpvd(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, double nulval, double *array, int *anynul, int *status); int ffgpfb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned char *array, char *nularray, int *anynul, int *status); int ffgpfsb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, signed char *array, char *nularray, int *anynul, int *status); int ffgpfui(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned short *array, char *nularray, int *anynul, int *status); int ffgpfi(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, short *array, char *nularray, int *anynul, int *status); int ffgpfuj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned long *array, char *nularray, int *anynul, int *status); int ffgpfj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, long *array, char *nularray, int *anynul, int *status); int ffgpfjj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, LONGLONG *array, char *nularray, int *anynul, int *status); int ffgpfuk(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned int *array, char *nularray, int *anynul, int *status); int ffgpfk(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, int *array, char *nularray, int *anynul, int *status); int ffgpfe(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, float *array, char *nularray, int *anynul, int *status); int ffgpfd(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, double *array, char *nularray, int *anynul, int *status); int ffg2db(fitsfile *fptr, long group, unsigned char nulval, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, unsigned char *array, int *anynul, int *status); int ffg2dsb(fitsfile *fptr, long group, signed char nulval, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, signed char *array, int *anynul, int *status); int ffg2dui(fitsfile *fptr, long group, unsigned short nulval, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, unsigned short *array, int *anynul, int *status); int ffg2di(fitsfile *fptr, long group, short nulval, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, short *array, int *anynul, int *status); int ffg2duj(fitsfile *fptr, long group, unsigned long nulval, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, unsigned long *array, int *anynul, int *status); int ffg2dj(fitsfile *fptr, long group, long nulval, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, long *array, int *anynul, int *status); int ffg2djj(fitsfile *fptr, long group, LONGLONG nulval, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, LONGLONG *array, int *anynul, int *status); int ffg2duk(fitsfile *fptr, long group, unsigned int nulval, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, unsigned int *array, int *anynul, int *status); int ffg2dk(fitsfile *fptr, long group, int nulval, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, int *array, int *anynul, int *status); int ffg2de(fitsfile *fptr, long group, float nulval, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, float *array, int *anynul, int *status); int ffg2dd(fitsfile *fptr, long group, double nulval, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, double *array, int *anynul, int *status); int ffg3db(fitsfile *fptr, long group, unsigned char nulval, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, unsigned char *array, int *anynul, int *status); int ffg3dsb(fitsfile *fptr, long group, signed char nulval, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, signed char *array, int *anynul, int *status); int ffg3dui(fitsfile *fptr, long group, unsigned short nulval, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, unsigned short *array, int *anynul, int *status); int ffg3di(fitsfile *fptr, long group, short nulval, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, short *array, int *anynul, int *status); int ffg3duj(fitsfile *fptr, long group, unsigned long nulval, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, unsigned long *array, int *anynul, int *status); int ffg3dj(fitsfile *fptr, long group, long nulval, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, long *array, int *anynul, int *status); int ffg3djj(fitsfile *fptr, long group, LONGLONG nulval, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, LONGLONG *array, int *anynul, int *status); int ffg3duk(fitsfile *fptr, long group, unsigned int nulval, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, unsigned int *array, int *anynul, int *status); int ffg3dk(fitsfile *fptr, long group, int nulval, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, int *array, int *anynul, int *status); int ffg3de(fitsfile *fptr, long group, float nulval, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, float *array, int *anynul, int *status); int ffg3dd(fitsfile *fptr, long group, double nulval, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, double *array, int *anynul, int *status); int ffgsvb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, unsigned char nulval, unsigned char *array, int *anynul, int *status); int ffgsvsb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, signed char nulval, signed char *array, int *anynul, int *status); int ffgsvui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, unsigned short nulval, unsigned short *array, int *anynul, int *status); int ffgsvi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, short nulval, short *array, int *anynul, int *status); int ffgsvuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, unsigned long nulval, unsigned long *array, int *anynul, int *status); int ffgsvj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, long nulval, long *array, int *anynul, int *status); int ffgsvjj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, LONGLONG nulval, LONGLONG *array, int *anynul, int *status); int ffgsvuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, unsigned int nulval, unsigned int *array, int *anynul, int *status); int ffgsvk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, int nulval, int *array, int *anynul, int *status); int ffgsve(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, float nulval, float *array, int *anynul, int *status); int ffgsvd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, double nulval, double *array, int *anynul, int *status); int ffgsfb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, unsigned char *array, char *flagval, int *anynul, int *status); int ffgsfsb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, signed char *array, char *flagval, int *anynul, int *status); int ffgsfui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, unsigned short *array, char *flagval, int *anynul, int *status); int ffgsfi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, short *array, char *flagval, int *anynul, int *status); int ffgsfuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, unsigned long *array, char *flagval, int *anynul, int *status); int ffgsfj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, long *array, char *flagval, int *anynul, int *status); int ffgsfjj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, LONGLONG *array, char *flagval, int *anynul, int *status); int ffgsfuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, unsigned int *array, char *flagval, int *anynul, int *status); int ffgsfk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, int *array, char *flagval, int *anynul, int *status); int ffgsfe(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, float *array, char *flagval, int *anynul, int *status); int ffgsfd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc, long *trc, long *inc, double *array, char *flagval, int *anynul, int *status); int ffggpb(fitsfile *fptr, long group, long firstelem, long nelem, unsigned char *array, int *status); int ffggpsb(fitsfile *fptr, long group, long firstelem, long nelem, signed char *array, int *status); int ffggpui(fitsfile *fptr, long group, long firstelem, long nelem, unsigned short *array, int *status); int ffggpi(fitsfile *fptr, long group, long firstelem, long nelem, short *array, int *status); int ffggpuj(fitsfile *fptr, long group, long firstelem, long nelem, unsigned long *array, int *status); int ffggpj(fitsfile *fptr, long group, long firstelem, long nelem, long *array, int *status); int ffggpjj(fitsfile *fptr, long group, long firstelem, long nelem, LONGLONG *array, int *status); int ffggpuk(fitsfile *fptr, long group, long firstelem, long nelem, unsigned int *array, int *status); int ffggpk(fitsfile *fptr, long group, long firstelem, long nelem, int *array, int *status); int ffggpe(fitsfile *fptr, long group, long firstelem, long nelem, float *array, int *status); int ffggpd(fitsfile *fptr, long group, long firstelem, long nelem, double *array, int *status); /*--------------------- read column elements -------------*/ int ffgcv( fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, void *nulval, void *array, int *anynul, int *status); int ffgcf( fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, void *array, char *nullarray, int *anynul, int *status); int ffgcvs(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, char *nulval, char **array, int *anynul, int *status); int ffgcl (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, char *array, int *status); int ffgcvl (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, char nulval, char *array, int *anynul, int *status); int ffgcvb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned char nulval, unsigned char *array, int *anynul, int *status); int ffgcvsb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, signed char nulval, signed char *array, int *anynul, int *status); int ffgcvui(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned short nulval, unsigned short *array, int *anynul, int *status); int ffgcvi(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, short nulval, short *array, int *anynul, int *status); int ffgcvuj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned long nulval, unsigned long *array, int *anynul, int *status); int ffgcvj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long nulval, long *array, int *anynul, int *status); int ffgcvjj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, LONGLONG nulval, LONGLONG *array, int *anynul, int *status); int ffgcvuk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned int nulval, unsigned int *array, int *anynul, int *status); int ffgcvk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, int nulval, int *array, int *anynul, int *status); int ffgcve(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, float nulval, float *array, int *anynul, int *status); int ffgcvd(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, double nulval, double *array, int *anynul, int *status); int ffgcvc(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, float nulval, float *array, int *anynul, int *status); int ffgcvm(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, double nulval, double *array, int *anynul, int *status); int ffgcx(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstbit, LONGLONG nbits, char *larray, int *status); int ffgcxui(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows, long firstbit, int nbits, unsigned short *array, int *status); int ffgcxuk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows, long firstbit, int nbits, unsigned int *array, int *status); int ffgcfs(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, char **array, char *nularray, int *anynul, int *status); int ffgcfl(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, char *array, char *nularray, int *anynul, int *status); int ffgcfb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned char *array, char *nularray, int *anynul, int *status); int ffgcfsb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, signed char *array, char *nularray, int *anynul, int *status); int ffgcfui(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned short *array, char *nularray, int *anynul, int *status); int ffgcfi(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, short *array, char *nularray, int *anynul, int *status); int ffgcfuj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned long *array, char *nularray, int *anynul, int *status); int ffgcfj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long *array, char *nularray, int *anynul, int *status); int ffgcfjj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, LONGLONG *array, char *nularray, int *anynul, int *status); int ffgcfuk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned int *array, char *nularray, int *anynul, int *status); int ffgcfk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, int *array, char *nularray, int *anynul, int *status); int ffgcfe(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, float *array, char *nularray, int *anynul, int *status); int ffgcfd(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, double *array, char *nularray, int *anynul, int *status); int ffgcfc(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, float *array, char *nularray, int *anynul, int *status); int ffgcfm(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, double *array, char *nularray, int *anynul, int *status); int ffgdes(fitsfile *fptr, int colnum, LONGLONG rownum, long *length, long *heapaddr, int *status); int ffgdesll(fitsfile *fptr, int colnum, LONGLONG rownum, LONGLONG *length, LONGLONG *heapaddr, int *status); int ffgdess(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows, long *length, long *heapaddr, int *status); int ffgdessll(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows, LONGLONG *length, LONGLONG *heapaddr, int *status); int ffpdes(fitsfile *fptr, int colnum, LONGLONG rownum, LONGLONG length, LONGLONG heapaddr, int *status); int fftheap(fitsfile *fptr, LONGLONG *heapsize, LONGLONG *unused, LONGLONG *overlap, int *valid, int *status); int ffcmph(fitsfile *fptr, int *status); int ffgtbb(fitsfile *fptr, LONGLONG firstrow, LONGLONG firstchar, LONGLONG nchars, unsigned char *values, int *status); int ffgextn(fitsfile *fptr, LONGLONG offset, LONGLONG nelem, void *array, int *status); int ffpextn(fitsfile *fptr, LONGLONG offset, LONGLONG nelem, void *array, int *status); /*------------ write primary array or image elements -------------*/ int ffppx(fitsfile *fptr, int datatype, long *firstpix, LONGLONG nelem, void *array, int *status); int ffppxll(fitsfile *fptr, int datatype, LONGLONG *firstpix, LONGLONG nelem, void *array, int *status); int ffppxn(fitsfile *fptr, int datatype, long *firstpix, LONGLONG nelem, void *array, void *nulval, int *status); int ffppxnll(fitsfile *fptr, int datatype, LONGLONG *firstpix, LONGLONG nelem, void *array, void *nulval, int *status); int ffppr(fitsfile *fptr, int datatype, LONGLONG firstelem, LONGLONG nelem, void *array, int *status); int ffpprb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned char *array, int *status); int ffpprsb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, signed char *array, int *status); int ffpprui(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned short *array, int *status); int ffppri(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, short *array, int *status); int ffppruj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned long *array, int *status); int ffpprj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, long *array, int *status); int ffppruk(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned int *array, int *status); int ffpprk(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, int *array, int *status); int ffppre(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, float *array, int *status); int ffpprd(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, double *array, int *status); int ffpprjj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, LONGLONG *array, int *status); int ffppru(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, int *status); int ffpprn(fitsfile *fptr, LONGLONG firstelem, LONGLONG nelem, int *status); int ffppn(fitsfile *fptr, int datatype, LONGLONG firstelem, LONGLONG nelem, void *array, void *nulval, int *status); int ffppnb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned char *array, unsigned char nulval, int *status); int ffppnsb(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, signed char *array, signed char nulval, int *status); int ffppnui(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned short *array, unsigned short nulval, int *status); int ffppni(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, short *array, short nulval, int *status); int ffppnj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, long *array, long nulval, int *status); int ffppnuj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned long *array, unsigned long nulval, int *status); int ffppnuk(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, unsigned int *array, unsigned int nulval, int *status); int ffppnk(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, int *array, int nulval, int *status); int ffppne(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, float *array, float nulval, int *status); int ffppnd(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, double *array, double nulval, int *status); int ffppnjj(fitsfile *fptr, long group, LONGLONG firstelem, LONGLONG nelem, LONGLONG *array, LONGLONG nulval, int *status); int ffp2db(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, unsigned char *array, int *status); int ffp2dsb(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, signed char *array, int *status); int ffp2dui(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, unsigned short *array, int *status); int ffp2di(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, short *array, int *status); int ffp2duj(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, unsigned long *array, int *status); int ffp2dj(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, long *array, int *status); int ffp2duk(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, unsigned int *array, int *status); int ffp2dk(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, int *array, int *status); int ffp2de(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, float *array, int *status); int ffp2dd(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, double *array, int *status); int ffp2djj(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG naxis1, LONGLONG naxis2, LONGLONG *array, int *status); int ffp3db(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, unsigned char *array, int *status); int ffp3dsb(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, signed char *array, int *status); int ffp3dui(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, unsigned short *array, int *status); int ffp3di(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, short *array, int *status); int ffp3duj(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, unsigned long *array, int *status); int ffp3dj(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, long *array, int *status); int ffp3duk(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, unsigned int *array, int *status); int ffp3dk(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, int *array, int *status); int ffp3de(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, float *array, int *status); int ffp3dd(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, double *array, int *status); int ffp3djj(fitsfile *fptr, long group, LONGLONG ncols, LONGLONG nrows, LONGLONG naxis1, LONGLONG naxis2, LONGLONG naxis3, LONGLONG *array, int *status); int ffpss(fitsfile *fptr, int datatype, long *fpixel, long *lpixel, void *array, int *status); int ffpssb(fitsfile *fptr, long group, long naxis, long *naxes, long *fpixel, long *lpixel, unsigned char *array, int *status); int ffpsssb(fitsfile *fptr, long group, long naxis, long *naxes, long *fpixel, long *lpixel, signed char *array, int *status); int ffpssui(fitsfile *fptr, long group, long naxis, long *naxes, long *fpixel, long *lpixel, unsigned short *array, int *status); int ffpssi(fitsfile *fptr, long group, long naxis, long *naxes, long *fpixel, long *lpixel, short *array, int *status); int ffpssuj(fitsfile *fptr, long group, long naxis, long *naxes, long *fpixel, long *lpixel, unsigned long *array, int *status); int ffpssj(fitsfile *fptr, long group, long naxis, long *naxes, long *fpixel, long *lpixel, long *array, int *status); int ffpssuk(fitsfile *fptr, long group, long naxis, long *naxes, long *fpixel, long *lpixel, unsigned int *array, int *status); int ffpssk(fitsfile *fptr, long group, long naxis, long *naxes, long *fpixel, long *lpixel, int *array, int *status); int ffpsse(fitsfile *fptr, long group, long naxis, long *naxes, long *fpixel, long *lpixel, float *array, int *status); int ffpssd(fitsfile *fptr, long group, long naxis, long *naxes, long *fpixel, long *lpixel, double *array, int *status); int ffpssjj(fitsfile *fptr, long group, long naxis, long *naxes, long *fpixel, long *lpixel, LONGLONG *array, int *status); int ffpgpb(fitsfile *fptr, long group, long firstelem, long nelem, unsigned char *array, int *status); int ffpgpsb(fitsfile *fptr, long group, long firstelem, long nelem, signed char *array, int *status); int ffpgpui(fitsfile *fptr, long group, long firstelem, long nelem, unsigned short *array, int *status); int ffpgpi(fitsfile *fptr, long group, long firstelem, long nelem, short *array, int *status); int ffpgpuj(fitsfile *fptr, long group, long firstelem, long nelem, unsigned long *array, int *status); int ffpgpj(fitsfile *fptr, long group, long firstelem, long nelem, long *array, int *status); int ffpgpuk(fitsfile *fptr, long group, long firstelem, long nelem, unsigned int *array, int *status); int ffpgpk(fitsfile *fptr, long group, long firstelem, long nelem, int *array, int *status); int ffpgpe(fitsfile *fptr, long group, long firstelem, long nelem, float *array, int *status); int ffpgpd(fitsfile *fptr, long group, long firstelem, long nelem, double *array, int *status); int ffpgpjj(fitsfile *fptr, long group, long firstelem, long nelem, LONGLONG *array, int *status); /*--------------------- iterator functions -------------*/ int fits_iter_set_by_name(iteratorCol *col, fitsfile *fptr, char *colname, int datatype, int iotype); int fits_iter_set_by_num(iteratorCol *col, fitsfile *fptr, int colnum, int datatype, int iotype); int fits_iter_set_file(iteratorCol *col, fitsfile *fptr); int fits_iter_set_colname(iteratorCol *col, char *colname); int fits_iter_set_colnum(iteratorCol *col, int colnum); int fits_iter_set_datatype(iteratorCol *col, int datatype); int fits_iter_set_iotype(iteratorCol *col, int iotype); fitsfile * fits_iter_get_file(iteratorCol *col); char * fits_iter_get_colname(iteratorCol *col); int fits_iter_get_colnum(iteratorCol *col); int fits_iter_get_datatype(iteratorCol *col); int fits_iter_get_iotype(iteratorCol *col); void * fits_iter_get_array(iteratorCol *col); long fits_iter_get_tlmin(iteratorCol *col); long fits_iter_get_tlmax(iteratorCol *col); long fits_iter_get_repeat(iteratorCol *col); char * fits_iter_get_tunit(iteratorCol *col); char * fits_iter_get_tdisp(iteratorCol *col); int ffiter(int ncols, iteratorCol *data, long offset, long nPerLoop, int (*workFn)( long totaln, long offset, long firstn, long nvalues, int narrays, iteratorCol *data, void *userPointer), void *userPointer, int *status); /*--------------------- write column elements -------------*/ int ffpcl(fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, void *array, int *status); int ffpcls(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, char **array, int *status); int ffpcll(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, char *array, int *status); int ffpclb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned char *array, int *status); int ffpclsb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, signed char *array, int *status); int ffpclui(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned short *array, int *status); int ffpcli(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, short *array, int *status); int ffpcluj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned long *array, int *status); int ffpclj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long *array, int *status); int ffpcluk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned int *array, int *status); int ffpclk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, int *array, int *status); int ffpcle(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, float *array, int *status); int ffpcld(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, double *array, int *status); int ffpclc(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, float *array, int *status); int ffpclm(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, double *array, int *status); int ffpclu(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, int *status); int ffprwu(fitsfile *fptr, LONGLONG firstrow, LONGLONG nrows, int *status); int ffpcljj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, LONGLONG *array, int *status); int ffpclx(fitsfile *fptr, int colnum, LONGLONG frow, long fbit, long nbit, char *larray, int *status); int ffpcn(fitsfile *fptr, int datatype, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, void *array, void *nulval, int *status); int ffpcns( fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, char **array, char *nulvalue, int *status); int ffpcnl( fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, char *array, char nulvalue, int *status); int ffpcnb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned char *array, unsigned char nulvalue, int *status); int ffpcnsb(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, signed char *array, signed char nulvalue, int *status); int ffpcnui(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned short *array, unsigned short nulvalue, int *status); int ffpcni(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, short *array, short nulvalue, int *status); int ffpcnuj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned long *array, unsigned long nulvalue, int *status); int ffpcnj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, long *array, long nulvalue, int *status); int ffpcnuk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, unsigned int *array, unsigned int nulvalue, int *status); int ffpcnk(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, int *array, int nulvalue, int *status); int ffpcne(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, float *array, float nulvalue, int *status); int ffpcnd(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, double *array, double nulvalue, int *status); int ffpcnjj(fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, LONGLONG *array, LONGLONG nulvalue, int *status); int ffptbb(fitsfile *fptr, LONGLONG firstrow, LONGLONG firstchar, LONGLONG nchars, unsigned char *values, int *status); int ffirow(fitsfile *fptr, LONGLONG firstrow, LONGLONG nrows, int *status); int ffdrow(fitsfile *fptr, LONGLONG firstrow, LONGLONG nrows, int *status); int ffdrrg(fitsfile *fptr, char *ranges, int *status); int ffdrws(fitsfile *fptr, long *rownum, long nrows, int *status); int ffdrwsll(fitsfile *fptr, LONGLONG *rownum, LONGLONG nrows, int *status); int fficol(fitsfile *fptr, int numcol, char *ttype, char *tform, int *status); int fficls(fitsfile *fptr, int firstcol, int ncols, char **ttype, char **tform, int *status); int ffmvec(fitsfile *fptr, int colnum, LONGLONG newveclen, int *status); int ffdcol(fitsfile *fptr, int numcol, int *status); int ffcpcl(fitsfile *infptr, fitsfile *outfptr, int incol, int outcol, int create_col, int *status); int ffcprw(fitsfile *infptr, fitsfile *outfptr, LONGLONG firstrow, LONGLONG nrows, int *status); /*--------------------- WCS Utilities ------------------*/ int ffgics(fitsfile *fptr, double *xrval, double *yrval, double *xrpix, double *yrpix, double *xinc, double *yinc, double *rot, char *type, int *status); int ffgicsa(fitsfile *fptr, char version, double *xrval, double *yrval, double *xrpix, double *yrpix, double *xinc, double *yinc, double *rot, char *type, int *status); int ffgtcs(fitsfile *fptr, int xcol, int ycol, double *xrval, double *yrval, double *xrpix, double *yrpix, double *xinc, double *yinc, double *rot, char *type, int *status); int ffwldp(double xpix, double ypix, double xref, double yref, double xrefpix, double yrefpix, double xinc, double yinc, double rot, char *type, double *xpos, double *ypos, int *status); int ffxypx(double xpos, double ypos, double xref, double yref, double xrefpix, double yrefpix, double xinc, double yinc, double rot, char *type, double *xpix, double *ypix, int *status); /* WCS support routines (provide interface to Doug Mink's WCS library */ int ffgiwcs(fitsfile *fptr, char **header, int *status); int ffgtwcs(fitsfile *fptr, int xcol, int ycol, char **header, int *status); /*--------------------- lexical parsing routines ------------------*/ int fftexp( fitsfile *fptr, char *expr, int maxdim, int *datatype, long *nelem, int *naxis, long *naxes, int *status ); int fffrow( fitsfile *infptr, char *expr, long firstrow, long nrows, long *n_good_rows, char *row_status, int *status); int ffffrw( fitsfile *fptr, char *expr, long *rownum, int *status); int fffrwc( fitsfile *fptr, char *expr, char *timeCol, char *parCol, char *valCol, long ntimes, double *times, char *time_status, int *status ); int ffsrow( fitsfile *infptr, fitsfile *outfptr, char *expr, int *status); int ffcrow( fitsfile *fptr, int datatype, char *expr, long firstrow, long nelements, void *nulval, void *array, int *anynul, int *status ); int ffcalc_rng( fitsfile *infptr, char *expr, fitsfile *outfptr, char *parName, char *parInfo, int nRngs, long *start, long *end, int *status ); int ffcalc( fitsfile *infptr, char *expr, fitsfile *outfptr, char *parName, char *parInfo, int *status ); /* ffhist is not really intended as a user-callable routine */ /* but it may be useful for some specialized applications */ /* ffhist2 is a newer version which is strongly recommended instead of ffhist */ int ffhist(fitsfile **fptr, char *outfile, int imagetype, int naxis, char colname[4][FLEN_VALUE], double *minin, double *maxin, double *binsizein, char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE], char binname[4][FLEN_VALUE], double weightin, char wtcol[FLEN_VALUE], int recip, char *rowselect, int *status); int ffhist2(fitsfile **fptr, char *outfile, int imagetype, int naxis, char colname[4][FLEN_VALUE], double *minin, double *maxin, double *binsizein, char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE], char binname[4][FLEN_VALUE], double weightin, char wtcol[FLEN_VALUE], int recip, char *rowselect, int *status); int fits_select_image_section(fitsfile **fptr, char *outfile, char *imagesection, int *status); int fits_copy_image_section(fitsfile *infptr, fitsfile *outfile, char *imagesection, int *status); int fits_calc_binning(fitsfile *fptr, int naxis, char colname[4][FLEN_VALUE], double *minin, double *maxin, double *binsizein, char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE], char binname[4][FLEN_VALUE], int *colnum, long *haxes, float *amin, float *amax, float *binsize, int *status); int fits_write_keys_histo(fitsfile *fptr, fitsfile *histptr, int naxis, int *colnum, int *status); int fits_rebin_wcs( fitsfile *fptr, int naxis, float *amin, float *binsize, int *status); int fits_make_hist(fitsfile *fptr, fitsfile *histptr, int bitpix,int naxis, long *naxes, int *colnum, float *amin, float *amax, float *binsize, float weight, int wtcolnum, int recip, char *selectrow, int *status); typedef struct { /* input(s) */ int count; char ** path; char ** tag; fitsfile ** ifptr; char * expression; /* output control */ int bitpix; long blank; fitsfile * ofptr; char keyword[FLEN_KEYWORD]; char comment[FLEN_COMMENT]; } PixelFilter; int fits_pixel_filter (PixelFilter * filter, int * status); /*--------------------- grouping routines ------------------*/ int ffgtcr(fitsfile *fptr, char *grpname, int grouptype, int *status); int ffgtis(fitsfile *fptr, char *grpname, int grouptype, int *status); int ffgtch(fitsfile *gfptr, int grouptype, int *status); int ffgtrm(fitsfile *gfptr, int rmopt, int *status); int ffgtcp(fitsfile *infptr, fitsfile *outfptr, int cpopt, int *status); int ffgtmg(fitsfile *infptr, fitsfile *outfptr, int mgopt, int *status); int ffgtcm(fitsfile *gfptr, int cmopt, int *status); int ffgtvf(fitsfile *gfptr, long *firstfailed, int *status); int ffgtop(fitsfile *mfptr,int group,fitsfile **gfptr,int *status); int ffgtam(fitsfile *gfptr, fitsfile *mfptr, int hdupos, int *status); int ffgtnm(fitsfile *gfptr, long *nmembers, int *status); int ffgmng(fitsfile *mfptr, long *nmembers, int *status); int ffgmop(fitsfile *gfptr, long member, fitsfile **mfptr, int *status); int ffgmcp(fitsfile *gfptr, fitsfile *mfptr, long member, int cpopt, int *status); int ffgmtf(fitsfile *infptr, fitsfile *outfptr, long member, int tfopt, int *status); int ffgmrm(fitsfile *fptr, long member, int rmopt, int *status); /*--------------------- group template parser routines ------------------*/ int fits_execute_template(fitsfile *ff, char *ngp_template, int *status); int fits_img_stats_short(short *array,long nx, long ny, int nullcheck, short nullvalue,long *ngoodpix, short *minvalue, short *maxvalue, double *mean, double *sigma, double *noise1, double *noise2, double *noise3, double *noise5, int *status); int fits_img_stats_int(int *array,long nx, long ny, int nullcheck, int nullvalue,long *ngoodpix, int *minvalue, int *maxvalue, double *mean, double *sigma, double *noise1, double *noise2, double *noise3, double *noise5, int *status); int fits_img_stats_float(float *array, long nx, long ny, int nullcheck, float nullvalue,long *ngoodpix, float *minvalue, float *maxvalue, double *mean, double *sigma, double *noise1, double *noise2, double *noise3, double *noise5, int *status); /*--------------------- image compression routines ------------------*/ int fits_set_compression_type(fitsfile *fptr, int ctype, int *status); int fits_set_tile_dim(fitsfile *fptr, int ndim, long *dims, int *status); int fits_set_noise_bits(fitsfile *fptr, int noisebits, int *status); int fits_set_quantize_level(fitsfile *fptr, float qlevel, int *status); int fits_set_hcomp_scale(fitsfile *fptr, float scale, int *status); int fits_set_hcomp_smooth(fitsfile *fptr, int smooth, int *status); int fits_set_quantize_method(fitsfile *fptr, int method, int *status); int fits_set_quantize_dither(fitsfile *fptr, int dither, int *status); int fits_set_dither_seed(fitsfile *fptr, int seed, int *status); int fits_set_dither_offset(fitsfile *fptr, int offset, int *status); int fits_set_lossy_int(fitsfile *fptr, int lossy_int, int *status); int fits_set_huge_hdu(fitsfile *fptr, int huge, int *status); int fits_set_compression_pref(fitsfile *infptr, fitsfile *outfptr, int *status); int fits_get_compression_type(fitsfile *fptr, int *ctype, int *status); int fits_get_tile_dim(fitsfile *fptr, int ndim, long *dims, int *status); int fits_get_quantize_level(fitsfile *fptr, float *qlevel, int *status); int fits_get_noise_bits(fitsfile *fptr, int *noisebits, int *status); int fits_get_hcomp_scale(fitsfile *fptr, float *scale, int *status); int fits_get_hcomp_smooth(fitsfile *fptr, int *smooth, int *status); int fits_get_dither_seed(fitsfile *fptr, int *seed, int *status); int fits_img_compress(fitsfile *infptr, fitsfile *outfptr, int *status); int fits_compress_img(fitsfile *infptr, fitsfile *outfptr, int compress_type, long *tilesize, int parm1, int parm2, int *status); int fits_is_compressed_image(fitsfile *fptr, int *status); int fits_is_reentrant(void); int fits_decompress_img (fitsfile *infptr, fitsfile *outfptr, int *status); int fits_img_decompress_header(fitsfile *infptr, fitsfile *outfptr, int *status); int fits_img_decompress (fitsfile *infptr, fitsfile *outfptr, int *status); /* H-compress routines */ int fits_hcompress(int *a, int nx, int ny, int scale, char *output, long *nbytes, int *status); int fits_hcompress64(LONGLONG *a, int nx, int ny, int scale, char *output, long *nbytes, int *status); int fits_hdecompress(unsigned char *input, int smooth, int *a, int *nx, int *ny, int *scale, int *status); int fits_hdecompress64(unsigned char *input, int smooth, LONGLONG *a, int *nx, int *ny, int *scale, int *status); int fits_compress_table_gzip(fitsfile *infptr, fitsfile *outfptr, int *status); int fits_compress_table_shuffle(fitsfile *infptr, fitsfile *outfptr, int *status); int fits_compress_table_best(fitsfile *infptr, fitsfile *outfptr, int *status); int fits_compress_table_rice(fitsfile *infptr, fitsfile *outfptr, int *status); int fits_uncompress_table(fitsfile *infptr, fitsfile *outfptr, int *status); int fits_gzip_datablocks(fitsfile *fptr, size_t *size, int *status); /* The following exclusion if __CINT__ is defined is needed for ROOT */ #ifndef __CINT__ #ifdef __cplusplus } #endif #endif #endif astropy-1.1.1/cextern/cfitsio/zcompress.c0000644001134200020070000004230412602615517021430 0ustar embrayscience00000000000000#include #include #include #include #include "zlib.h" unsigned int GZBUFSIZE = 115200; /* 40 FITS blocks */ int BUFFINCR = 28800; /* 10 FITS blocks */ /* prototype for the following functions */ int uncompress2mem(char *filename, FILE *diskfile, char **buffptr, size_t *buffsize, void *(*mem_realloc)(void *p, size_t newsize), size_t *filesize, int *status); int uncompress2mem_from_mem( char *inmemptr, size_t inmemsize, char **buffptr, size_t *buffsize, void *(*mem_realloc)(void *p, size_t newsize), size_t *filesize, int *status); int uncompress2file(char *filename, FILE *indiskfile, FILE *outdiskfile, int *status); int compress2mem_from_mem( char *inmemptr, size_t inmemsize, char **buffptr, size_t *buffsize, void *(*mem_realloc)(void *p, size_t newsize), size_t *filesize, int *status); int compress2file_from_mem( char *inmemptr, size_t inmemsize, FILE *outdiskfile, size_t *filesize, /* O - size of file, in bytes */ int *status); /*--------------------------------------------------------------------------*/ int uncompress2mem(char *filename, /* name of input file */ FILE *diskfile, /* I - file pointer */ char **buffptr, /* IO - memory pointer */ size_t *buffsize, /* IO - size of buffer, in bytes */ void *(*mem_realloc)(void *p, size_t newsize), /* function */ size_t *filesize, /* O - size of file, in bytes */ int *status) /* IO - error status */ /* Uncompress the disk file into memory. Fill whatever amount of memory has already been allocated, then realloc more memory, using the supplied input function, if necessary. */ { int err, len; char *filebuff; z_stream d_stream; /* decompression stream */ if (*status > 0) return(*status); /* Allocate memory to hold compressed bytes read from the file. */ filebuff = (char*)malloc(GZBUFSIZE); if (!filebuff) return(*status = 113); /* memory error */ d_stream.zalloc = (alloc_func)0; d_stream.zfree = (free_func)0; d_stream.opaque = (voidpf)0; d_stream.next_out = (unsigned char*) *buffptr; d_stream.avail_out = *buffsize; /* Initialize the decompression. The argument (15+16) tells the decompressor that we are to use the gzip algorithm */ err = inflateInit2(&d_stream, (15+16)); if (err != Z_OK) return(*status = 414); /* loop through the file, reading a buffer and uncompressing it */ for (;;) { len = fread(filebuff, 1, GZBUFSIZE, diskfile); if (ferror(diskfile)) { inflateEnd(&d_stream); free(filebuff); return(*status = 414); } if (len == 0) break; /* no more data */ d_stream.next_in = (unsigned char*)filebuff; d_stream.avail_in = len; for (;;) { /* uncompress as much of the input as will fit in the output */ err = inflate(&d_stream, Z_NO_FLUSH); if (err == Z_STREAM_END ) { /* We reached the end of the input */ break; } else if (err == Z_OK ) { if (!d_stream.avail_in) break; /* need more input */ /* need more space in output buffer */ if (mem_realloc) { *buffptr = mem_realloc(*buffptr,*buffsize + BUFFINCR); if (*buffptr == NULL){ inflateEnd(&d_stream); free(filebuff); return(*status = 414); /* memory allocation failed */ } d_stream.avail_out = BUFFINCR; d_stream.next_out = (unsigned char*) (*buffptr + *buffsize); *buffsize = *buffsize + BUFFINCR; } else { /* error: no realloc function available */ inflateEnd(&d_stream); free(filebuff); return(*status = 414); } } else { /* some other error */ inflateEnd(&d_stream); free(filebuff); return(*status = 414); } } if (feof(diskfile)) break; d_stream.next_out = (unsigned char*) (*buffptr + d_stream.total_out); d_stream.avail_out = *buffsize - d_stream.total_out; } /* Set the output file size to be the total output data */ *filesize = d_stream.total_out; free(filebuff); /* free temporary output data buffer */ err = inflateEnd(&d_stream); /* End the decompression */ if (err != Z_OK) return(*status = 414); return(*status); } /*--------------------------------------------------------------------------*/ int uncompress2mem_from_mem( char *inmemptr, /* I - memory pointer to compressed bytes */ size_t inmemsize, /* I - size of input compressed file */ char **buffptr, /* IO - memory pointer */ size_t *buffsize, /* IO - size of buffer, in bytes */ void *(*mem_realloc)(void *p, size_t newsize), /* function */ size_t *filesize, /* O - size of file, in bytes */ int *status) /* IO - error status */ /* Uncompress the file in memory into memory. Fill whatever amount of memory has already been allocated, then realloc more memory, using the supplied input function, if necessary. */ { int err; z_stream d_stream; /* decompression stream */ if (*status > 0) return(*status); d_stream.zalloc = (alloc_func)0; d_stream.zfree = (free_func)0; d_stream.opaque = (voidpf)0; /* Initialize the decompression. The argument (15+16) tells the decompressor that we are to use the gzip algorithm */ err = inflateInit2(&d_stream, (15+16)); if (err != Z_OK) return(*status = 414); d_stream.next_in = (unsigned char*)inmemptr; d_stream.avail_in = inmemsize; d_stream.next_out = (unsigned char*) *buffptr; d_stream.avail_out = *buffsize; for (;;) { /* uncompress as much of the input as will fit in the output */ err = inflate(&d_stream, Z_NO_FLUSH); if (err == Z_STREAM_END) { /* We reached the end of the input */ break; } else if (err == Z_OK ) { /* need more space in output buffer */ if (mem_realloc) { *buffptr = mem_realloc(*buffptr,*buffsize + BUFFINCR); if (*buffptr == NULL){ inflateEnd(&d_stream); return(*status = 414); /* memory allocation failed */ } d_stream.avail_out = BUFFINCR; d_stream.next_out = (unsigned char*) (*buffptr + *buffsize); *buffsize = *buffsize + BUFFINCR; } else { /* error: no realloc function available */ inflateEnd(&d_stream); return(*status = 414); } } else { /* some other error */ inflateEnd(&d_stream); return(*status = 414); } } /* Set the output file size to be the total output data */ if (filesize) *filesize = d_stream.total_out; /* End the decompression */ err = inflateEnd(&d_stream); if (err != Z_OK) return(*status = 414); return(*status); } /*--------------------------------------------------------------------------*/ int uncompress2file(char *filename, /* name of input file */ FILE *indiskfile, /* I - input file pointer */ FILE *outdiskfile, /* I - output file pointer */ int *status) /* IO - error status */ /* Uncompress the file into another file. */ { int err, len; unsigned long bytes_out = 0; char *infilebuff, *outfilebuff; z_stream d_stream; /* decompression stream */ if (*status > 0) return(*status); /* Allocate buffers to hold compressed and uncompressed */ infilebuff = (char*)malloc(GZBUFSIZE); if (!infilebuff) return(*status = 113); /* memory error */ outfilebuff = (char*)malloc(GZBUFSIZE); if (!outfilebuff) return(*status = 113); /* memory error */ d_stream.zalloc = (alloc_func)0; d_stream.zfree = (free_func)0; d_stream.opaque = (voidpf)0; d_stream.next_out = (unsigned char*) outfilebuff; d_stream.avail_out = GZBUFSIZE; /* Initialize the decompression. The argument (15+16) tells the decompressor that we are to use the gzip algorithm */ err = inflateInit2(&d_stream, (15+16)); if (err != Z_OK) return(*status = 414); /* loop through the file, reading a buffer and uncompressing it */ for (;;) { len = fread(infilebuff, 1, GZBUFSIZE, indiskfile); if (ferror(indiskfile)) { inflateEnd(&d_stream); free(infilebuff); free(outfilebuff); return(*status = 414); } if (len == 0) break; /* no more data */ d_stream.next_in = (unsigned char*)infilebuff; d_stream.avail_in = len; for (;;) { /* uncompress as much of the input as will fit in the output */ err = inflate(&d_stream, Z_NO_FLUSH); if (err == Z_STREAM_END ) { /* We reached the end of the input */ break; } else if (err == Z_OK ) { if (!d_stream.avail_in) break; /* need more input */ /* flush out the full output buffer */ if ((int)fwrite(outfilebuff, 1, GZBUFSIZE, outdiskfile) != GZBUFSIZE) { inflateEnd(&d_stream); free(infilebuff); free(outfilebuff); return(*status = 414); } bytes_out += GZBUFSIZE; d_stream.next_out = (unsigned char*) outfilebuff; d_stream.avail_out = GZBUFSIZE; } else { /* some other error */ inflateEnd(&d_stream); free(infilebuff); free(outfilebuff); return(*status = 414); } } if (feof(indiskfile)) break; } /* write out any remaining bytes in the buffer */ if (d_stream.total_out > bytes_out) { if ((int)fwrite(outfilebuff, 1, (d_stream.total_out - bytes_out), outdiskfile) != (d_stream.total_out - bytes_out)) { inflateEnd(&d_stream); free(infilebuff); free(outfilebuff); return(*status = 414); } } free(infilebuff); /* free temporary output data buffer */ free(outfilebuff); /* free temporary output data buffer */ err = inflateEnd(&d_stream); /* End the decompression */ if (err != Z_OK) return(*status = 414); return(*status); } /*--------------------------------------------------------------------------*/ int compress2mem_from_mem( char *inmemptr, /* I - memory pointer to uncompressed bytes */ size_t inmemsize, /* I - size of input uncompressed file */ char **buffptr, /* IO - memory pointer for compressed file */ size_t *buffsize, /* IO - size of buffer, in bytes */ void *(*mem_realloc)(void *p, size_t newsize), /* function */ size_t *filesize, /* O - size of file, in bytes */ int *status) /* IO - error status */ /* Compress the file into memory. Fill whatever amount of memory has already been allocated, then realloc more memory, using the supplied input function, if necessary. */ { int err; z_stream c_stream; /* compression stream */ if (*status > 0) return(*status); c_stream.zalloc = (alloc_func)0; c_stream.zfree = (free_func)0; c_stream.opaque = (voidpf)0; /* Initialize the compression. The argument (15+16) tells the compressor that we are to use the gzip algorythm. Also use Z_BEST_SPEED for maximum speed with very minor loss in compression factor. */ err = deflateInit2(&c_stream, Z_BEST_SPEED, Z_DEFLATED, (15+16), 8, Z_DEFAULT_STRATEGY); if (err != Z_OK) return(*status = 413); c_stream.next_in = (unsigned char*)inmemptr; c_stream.avail_in = inmemsize; c_stream.next_out = (unsigned char*) *buffptr; c_stream.avail_out = *buffsize; for (;;) { /* compress as much of the input as will fit in the output */ err = deflate(&c_stream, Z_FINISH); if (err == Z_STREAM_END) { /* We reached the end of the input */ break; } else if (err == Z_OK ) { /* need more space in output buffer */ if (mem_realloc) { *buffptr = mem_realloc(*buffptr,*buffsize + BUFFINCR); if (*buffptr == NULL){ deflateEnd(&c_stream); return(*status = 413); /* memory allocation failed */ } c_stream.avail_out = BUFFINCR; c_stream.next_out = (unsigned char*) (*buffptr + *buffsize); *buffsize = *buffsize + BUFFINCR; } else { /* error: no realloc function available */ deflateEnd(&c_stream); return(*status = 413); } } else { /* some other error */ deflateEnd(&c_stream); return(*status = 413); } } /* Set the output file size to be the total output data */ if (filesize) *filesize = c_stream.total_out; /* End the compression */ err = deflateEnd(&c_stream); if (err != Z_OK) return(*status = 413); return(*status); } /*--------------------------------------------------------------------------*/ int compress2file_from_mem( char *inmemptr, /* I - memory pointer to uncompressed bytes */ size_t inmemsize, /* I - size of input uncompressed file */ FILE *outdiskfile, size_t *filesize, /* O - size of file, in bytes */ int *status) /* Compress the memory file into disk file. */ { int err; unsigned long bytes_out = 0; char *outfilebuff; z_stream c_stream; /* compression stream */ if (*status > 0) return(*status); /* Allocate buffer to hold compressed bytes */ outfilebuff = (char*)malloc(GZBUFSIZE); if (!outfilebuff) return(*status = 113); /* memory error */ c_stream.zalloc = (alloc_func)0; c_stream.zfree = (free_func)0; c_stream.opaque = (voidpf)0; /* Initialize the compression. The argument (15+16) tells the compressor that we are to use the gzip algorythm. Also use Z_BEST_SPEED for maximum speed with very minor loss in compression factor. */ err = deflateInit2(&c_stream, Z_BEST_SPEED, Z_DEFLATED, (15+16), 8, Z_DEFAULT_STRATEGY); if (err != Z_OK) return(*status = 413); c_stream.next_in = (unsigned char*)inmemptr; c_stream.avail_in = inmemsize; c_stream.next_out = (unsigned char*) outfilebuff; c_stream.avail_out = GZBUFSIZE; for (;;) { /* compress as much of the input as will fit in the output */ err = deflate(&c_stream, Z_FINISH); if (err == Z_STREAM_END) { /* We reached the end of the input */ break; } else if (err == Z_OK ) { /* need more space in output buffer */ /* flush out the full output buffer */ if ((int)fwrite(outfilebuff, 1, GZBUFSIZE, outdiskfile) != GZBUFSIZE) { deflateEnd(&c_stream); free(outfilebuff); return(*status = 413); } bytes_out += GZBUFSIZE; c_stream.next_out = (unsigned char*) outfilebuff; c_stream.avail_out = GZBUFSIZE; } else { /* some other error */ deflateEnd(&c_stream); free(outfilebuff); return(*status = 413); } } /* write out any remaining bytes in the buffer */ if (c_stream.total_out > bytes_out) { if ((int)fwrite(outfilebuff, 1, (c_stream.total_out - bytes_out), outdiskfile) != (c_stream.total_out - bytes_out)) { deflateEnd(&c_stream); free(outfilebuff); return(*status = 413); } } free(outfilebuff); /* free temporary output data buffer */ /* Set the output file size to be the total output data */ if (filesize) *filesize = c_stream.total_out; /* End the compression */ err = deflateEnd(&c_stream); if (err != Z_OK) return(*status = 413); return(*status); } astropy-1.1.1/cextern/cfitsio/getcolui.c0000644001134200020070000021673612602615517021232 0ustar embrayscience00000000000000/* This file, getcolui.c, contains routines that read data elements from */ /* a FITS image or table, with unsigned short datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffgpvui( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned short nulval, /* I - value for undefined pixels */ unsigned short *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; char cdummy; int nullcheck = 1; unsigned short nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_read_compressed_pixels(fptr, TUSHORT, firstelem, nelem, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclui(fptr, 2, row, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgpfui( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned short *array, /* O - array of values that are returned */ char *nularray, /* O - array of null pixel flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any undefined pixels in the returned array will be set = 0 and the corresponding nularray value will be set = 1. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; int nullcheck = 2; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_read_compressed_pixels(fptr, TUSHORT, firstelem, nelem, nullcheck, NULL, array, nularray, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclui(fptr, 2, row, firstelem, nelem, 1, 2, 0, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg2dui(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ unsigned short nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ unsigned short *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { /* call the 3D reading routine, with the 3rd dimension = 1 */ ffg3dui(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg3dui(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ unsigned short nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ unsigned short *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 3-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { long tablerow, ii, jj; char cdummy; int nullcheck = 1; long inc[] = {1,1,1}; LONGLONG fpixel[] = {1,1,1}, nfits, narray; LONGLONG lpixel[3]; unsigned short nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = ncols; lpixel[1] = nrows; lpixel[2] = naxis3; nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TUSHORT, fpixel, lpixel, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so read all at once */ ffgclui(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to read */ narray = 0; /* next pixel in output array to be filled */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* reading naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffgclui(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, &array[narray], &cdummy, anynul, status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsvui(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ unsigned short nulval, /* I - value to set undefined pixels */ unsigned short *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9]; long nelem, nultyp, ninc, numcol; LONGLONG felem, dsize[10], blcll[9], trcll[9]; int hdutype, anyf; char ldummy, msg[FLEN_ERRMSG]; int nullcheck = 1; unsigned short nullvalue; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvui is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TUSHORT, blcll, trcll, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 1; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsvui: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgclui(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &ldummy, &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsfui(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ unsigned short *array, /* O - array to be filled and returned */ char *flagval, /* O - set to 1 if corresponding value is null */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dsize[10]; LONGLONG blcll[9], trcll[9]; long felem, nelem, nultyp, ninc, numcol; int hdutype, anyf; unsigned short nulval = 0; char msg[FLEN_ERRMSG]; int nullcheck = 2; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvi is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } fits_read_compressed_img(fptr, TUSHORT, blcll, trcll, inc, nullcheck, NULL, array, flagval, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 2; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsvi: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgclui(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &flagval[i0], &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffggpui( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ long firstelem, /* I - first vector element to read (1 = 1st) */ long nelem, /* I - number of values to read */ unsigned short *array, /* O - array of values that are returned */ int *status) /* IO - error status */ /* Read an array of group parameters from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). */ { long row; int idummy; char cdummy; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclui(fptr, 1, row, firstelem, nelem, 1, 1, 0, array, &cdummy, &idummy, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcvui(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned short nulval, /* I - value for null pixels */ unsigned short *array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. */ { char cdummy; ffgclui(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfui(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned short *array, /* O - array of values that are read */ char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. */ { unsigned short dummy = 0; ffgclui(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgclui( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long elemincre, /* I - pixel increment; e.g., 2 = every other */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ unsigned short nulval, /* I - value for null pixels if nultyp = 1 */ unsigned short *array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer be a virtual column in a 1 or more grouped FITS primary array or image extension. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The output array of values will be converted from the datatype of the column and will be scaled by the FITS TSCALn and TZEROn values if necessary. */ { double scale, zero, power = 1., dtemp; int tcode, maxelem2, hdutype, xcode, decimals; long twidth, incre; long ii, xwidth, ntodo; int nulcheck; LONGLONG repeat, startpos, elemnum, readptr, tnull; LONGLONG rowlen, rownum, remain, next, rowincre, maxelem; char tform[20]; char message[81]; char snull[20]; /* the FITS null value if reading from ASCII table */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; if (anynul) *anynul = 0; if (nultyp == 2) memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 0, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) return(*status); maxelem = maxelem2; incre *= elemincre; /* multiply incre to just get every nth pixel */ if (tcode == TSTRING) /* setup for ASCII tables */ { /* get the number of implied decimal places if no explicit decmal point */ ffasfm(tform, &xcode, &xwidth, &decimals, status); for(ii = 0; ii < decimals; ii++) power *= 10.; } /*------------------------------------------------------------------*/ /* Decide whether to check for null values in the input FITS file: */ /*------------------------------------------------------------------*/ nulcheck = nultyp; /* by default check for null values in the FITS file */ if (nultyp == 1 && nulval == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ else if (tcode%10 == 1 && /* if reading an integer column, and */ tnull == NULL_UNDEFINED) /* if a null value is not defined, */ nulcheck = 0; /* then do not check for null values. */ else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) nulcheck = 0; /*----------------------------------------------------------------------*/ /* If FITS column and output data array have same datatype, then we do */ /* not need to use a temporary buffer to store intermediate datatype. */ /*----------------------------------------------------------------------*/ if (tcode == TSHORT) /* Special Case: */ { /* no type convertion required, so read */ maxelem = nelem; /* data directly into output buffer. */ } /*---------------------------------------------------------------------*/ /* Now read the pixels from the FITS column. If the column does not */ /* have the same datatype as the output array, then we have to read */ /* the raw values into a temporary buffer (of limited size). In */ /* the case of a vector colum read only 1 vector of values at a time */ /* then skip to the next row if more values need to be read. */ /* After reading the raw values, then call the fffXXYY routine to (1) */ /* test for undefined values, (2) convert the datatype if necessary, */ /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ /* scaling parameters. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to read */ next = 0; /* next element in array to be read */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to read at one time to the number that will fit in the buffer or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); switch (tcode) { case (TSHORT): ffgi2b(fptr, readptr, ntodo, incre, (short *) &array[next], status); fffi2u2((short *) &array[next], ntodo, scale, zero, nulcheck, (short) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONGLONG): ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); fffi8u2( (LONGLONG *) buffer, ntodo, scale, zero, nulcheck, tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TBYTE): ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, status); fffi1u2((unsigned char *) buffer, ntodo, scale, zero, nulcheck, (unsigned char) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONG): ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, status); fffi4u2((INT32BIT *) buffer, ntodo, scale, zero, nulcheck, (INT32BIT) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TFLOAT): ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); fffr4u2((float *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TDOUBLE): ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); fffr8u2((double *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TSTRING): ffmbyt(fptr, readptr, REPORT_EOF, status); if (incre == twidth) /* contiguous bytes */ ffgbyt(fptr, ntodo * twidth, buffer, status); else ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); fffstru2((char *) buffer, ntodo, scale, zero, twidth, power, nulcheck, snull, nulval, &nularray[next], anynul, &array[next], status); break; default: /* error trap for invalid column format */ sprintf(message, "Cannot read numbers from column %d which has format %s", colnum, tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous read operation */ { dtemp = (double) next; if (hdutype > 0) sprintf(message, "Error reading elements %.0f thru %.0f from column %d (ffgclui).", dtemp+1., dtemp+ntodo, colnum); else sprintf(message, "Error reading elements %.0f thru %.0f from image (ffgclui).", dtemp+1., dtemp+ntodo); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum = elemnum + (ntodo * elemincre); if (elemnum >= repeat) /* completed a row; start on later row */ { rowincre = elemnum / repeat; rownum += rowincre; elemnum = elemnum - (rowincre * repeat); } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while reading FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int fffi1u2(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (unsigned short) input[ii]; /* copy input */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (unsigned short) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi2u2(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 32768.) { /* Instead of adding 32768, it is more efficient */ /* to just flip the sign bit with the XOR operator */ for (ii = 0; ii < ntodo; ii++) output[ii] = ( *(unsigned short *) &input[ii] ) ^ 0x8000; } else if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else output[ii] = (unsigned short) input[ii]; /* copy input */ } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 32768.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = ( *(unsigned short *) &input[ii] ) ^ 0x8000; } } else if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else output[ii] = (unsigned short) input[ii]; /* copy input */ } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi4u2(INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > USHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > USHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi8u2(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > USHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > USHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr4u2(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr++; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (zero > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr8u2(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr += 3; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (zero > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffstru2(char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ long twidth, /* I - width of each substring of chars */ double implipower, /* I - power of 10 of implied decimal */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ char *snull, /* I - value of FITS null string, if any */ unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to snull. If nullcheck= 0, then no special checking for nulls is performed. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { int nullen; long ii; double dvalue; char *cstring, message[81]; char *cptr, *tpos; char tempstore, chrzero = '0'; double val, power; int exponent, sign, esign, decpt; nullen = strlen(snull); cptr = input; /* pointer to start of input string */ for (ii = 0; ii < ntodo; ii++) { cstring = cptr; /* temporarily insert a null terminator at end of the string */ tpos = cptr + twidth; tempstore = *tpos; *tpos = 0; /* check if null value is defined, and if the */ /* column string is identical to the null string */ if (snull[0] != ASCII_NULL_UNDEFINED && !strncmp(snull, cptr, nullen) ) { if (nullcheck) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } cptr += twidth; } else { /* value is not the null value, so decode it */ /* remove any embedded blank characters from the string */ decpt = 0; sign = 1; val = 0.; power = 1.; exponent = 0; esign = 1; while (*cptr == ' ') /* skip leading blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for leading sign */ { if (*cptr == '-') sign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and value */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } if (*cptr == '.' || *cptr == ',') /* check for decimal point */ { decpt = 1; /* set flag to show there was a decimal point */ cptr++; while (*cptr == ' ') /* skip any blanks */ cptr++; while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ power = power * 10.; cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } } if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ { cptr++; while (*cptr == ' ') /* skip blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ { if (*cptr == '-') esign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and exp */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ cptr++; while (*cptr == ' ') /* skip embedded blanks */ cptr++; } } if (*cptr != 0) /* should end up at the null terminator */ { sprintf(message, "Cannot read number from ASCII table"); ffpmsg(message); sprintf(message, "Column field = %s.", cstring); ffpmsg(message); /* restore the char that was overwritten by the null */ *tpos = tempstore; return(*status = BAD_C2D); } if (!decpt) /* if no explicit decimal, use implied */ power = implipower; dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); dvalue = dvalue * scale + zero; /* apply the scaling */ if (dvalue < DUSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = USHRT_MAX; } else output[ii] = (unsigned short) dvalue; } /* restore the char that was overwritten by the null */ *tpos = tempstore; } return(*status); } astropy-1.1.1/cextern/cfitsio/putcoli.c0000644001134200020070000010374112602615517021065 0ustar embrayscience00000000000000/* This file, putcoli.c, contains routines that write data elements to */ /* a FITS image or table, with short datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffppri( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ short *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; short nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_pixels(fptr, TSHORT, firstelem, nelem, 0, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcli(fptr, 2, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffppni( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ short *array, /* I - array of values that are written */ short nulval, /* I - undefined pixel value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). Any array values that are equal to the value of nulval will be replaced with the null pixel value that is appropriate for this column. */ { long row; short nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_write_compressed_pixels(fptr, TSHORT, firstelem, nelem, 1, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcni(fptr, 2, row, firstelem, nelem, array, nulval, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp2di(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ short *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { /* call the 3D writing routine, with the 3rd dimension = 1 */ ffp3di(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp3di(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ short *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 3-D cube of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow, ii, jj; long fpixel[3]= {1,1,1}, lpixel[3]; LONGLONG nfits, narray; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = (long) ncols; lpixel[1] = (long) nrows; lpixel[2] = (long) naxis3; fits_write_compressed_img(fptr, TSHORT, fpixel, lpixel, 0, array, NULL, status); return(*status); } tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so write all at once */ ffpcli(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to write to */ narray = 0; /* next pixel in input array to be written */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* writing naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffpcli(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpssi(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long naxis, /* I - number of data axes in array */ long *naxes, /* I - size of each FITS axis */ long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ long *lpixel, /* I - last pixel in each axis to write */ short *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write a subsection of pixels to the primary array or image. A subsection is defined to be any contiguous rectangular array of pixels within the n-dimensional FITS data file. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow; LONGLONG fpix[7], dimen[7], astart, pstart; LONGLONG off2, off3, off4, off5, off6, off7; LONGLONG st10, st20, st30, st40, st50, st60, st70; LONGLONG st1, st2, st3, st4, st5, st6, st7; long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; if (*status > 0) return(*status); if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_img(fptr, TSHORT, fpixel, lpixel, 0, array, NULL, status); return(*status); } if (naxis < 1 || naxis > 7) return(*status = BAD_DIMEN); tablerow=maxvalue(1,group); /* calculate the size and number of loops to perform in each dimension */ for (ii = 0; ii < 7; ii++) { fpix[ii]=1; irange[ii]=1; dimen[ii]=1; } for (ii = 0; ii < naxis; ii++) { fpix[ii]=fpixel[ii]; irange[ii]=lpixel[ii]-fpixel[ii]+1; dimen[ii]=naxes[ii]; } i1=irange[0]; /* compute the pixel offset between each dimension */ off2 = dimen[0]; off3 = off2 * dimen[1]; off4 = off3 * dimen[2]; off5 = off4 * dimen[3]; off6 = off5 * dimen[4]; off7 = off6 * dimen[5]; st10 = fpix[0]; st20 = (fpix[1] - 1) * off2; st30 = (fpix[2] - 1) * off3; st40 = (fpix[3] - 1) * off4; st50 = (fpix[4] - 1) * off5; st60 = (fpix[5] - 1) * off6; st70 = (fpix[6] - 1) * off7; /* store the initial offset in each dimension */ st1 = st10; st2 = st20; st3 = st30; st4 = st40; st5 = st50; st6 = st60; st7 = st70; astart = 0; for (i7 = 0; i7 < irange[6]; i7++) { for (i6 = 0; i6 < irange[5]; i6++) { for (i5 = 0; i5 < irange[4]; i5++) { for (i4 = 0; i4 < irange[3]; i4++) { for (i3 = 0; i3 < irange[2]; i3++) { pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; for (i2 = 0; i2 < irange[1]; i2++) { if (ffpcli(fptr, 2, tablerow, pstart, i1, &array[astart], status) > 0) return(*status); astart += i1; pstart += off2; } st2 = st20; st3 = st3+off3; } st3 = st30; st4 = st4+off4; } st4 = st40; st5 = st5+off5; } st5 = st50; st6 = st6+off6; } st6 = st60; st7 = st7+off7; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpgpi( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long firstelem, /* I - first vector element to write(1 = 1st) */ long nelem, /* I - number of values to write */ short *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of group parameters to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffpcli(fptr, 1L, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpcli( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ short *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of values to a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. */ { int tcode, maxelem2, hdutype, writeraw; long twidth, incre; long ntodo; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull, maxelem; double scale, zero; char tform[20], cform[20]; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); maxelem = maxelem2; if (tcode == TSTRING) ffcfmt(tform, cform); /* derive C format for writing strings */ /* if there is no scaling and the native machine format is not byteswapped, then we can simply write the raw data bytes into the FITS file if the datatype of the FITS column is the same as the input values. Otherwise, we must convert the raw values into the scaled and/or machine dependent format in a temporary buffer that has been allocated for this purpose. */ if (scale == 1. && zero == 0. && MACHINE == NATIVE && tcode == TSHORT) { writeraw = 1; maxelem = nelem; /* we can write the entire array at one time */ } else writeraw = 0; /*---------------------------------------------------------------------*/ /* Now write the pixels to the FITS column. */ /* First call the ffXXfYY routine to (1) convert the datatype */ /* if necessary, and (2) scale the values by the FITS TSCALn and */ /* TZEROn linear scaling parameters into a temporary buffer. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to process a one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ switch (tcode) { case (TSHORT): if (writeraw) { /* write raw input bytes without conversion */ ffpi2b(fptr, ntodo, incre, &array[next], status); } else { /* convert the raw data before writing to FITS file */ ffi2fi2(&array[next], ntodo, scale, zero, (short *) buffer, status); ffpi2b(fptr, ntodo, incre, (short *) buffer, status); } break; case (TLONGLONG): ffi2fi8(&array[next], ntodo, scale, zero, (LONGLONG *) buffer, status); ffpi8b(fptr, ntodo, incre, (long *) buffer, status); break; case (TBYTE): ffi2fi1(&array[next], ntodo, scale, zero, (unsigned char *) buffer, status); ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); break; case (TLONG): ffi2fi4(&array[next], ntodo, scale, zero, (INT32BIT *) buffer, status); ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); break; case (TFLOAT): ffi2fr4(&array[next], ntodo, scale, zero, (float *) buffer, status); ffpr4b(fptr, ntodo, incre, (float *) buffer, status); break; case (TDOUBLE): ffi2fr8(&array[next], ntodo, scale, zero, (double *) buffer, status); ffpr8b(fptr, ntodo, incre, (double *) buffer, status); break; case (TSTRING): /* numerical column in an ASCII table */ if (cform[1] != 's') /* "%s" format is a string */ { ffi2fstr(&array[next], ntodo, scale, zero, cform, twidth, (char *) buffer, status); if (incre == twidth) /* contiguous bytes */ ffpbyt(fptr, ntodo * twidth, buffer, status); else ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); break; } /* can't write to string column, so fall thru to default: */ default: /* error trap */ sprintf(message, "Cannot write numbers to column %d which has format %s", colnum,tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing elements %.0f thru %.0f of input data array (ffpcli).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while writing FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpcni( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ short *array, /* I - array of values to write */ short nulvalue, /* I - value used to flag undefined pixels */ int *status) /* IO - error status */ /* Write an array of elements to the specified column of a table. Any input pixels equal to the value of nulvalue will be replaced by the appropriate null value in the output FITS file. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary */ { tcolumn *colptr; long ngood = 0, nbad = 0, ii; LONGLONG repeat, first, fstelm, fstrow; int tcode, overflow = 0; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode > 0) repeat = colptr->trepeat; /* repeat count for this column */ else repeat = firstelem -1 + nelem; /* variable length arrays */ /* if variable length array, first write the whole input vector, then go back and fill in the nulls */ if (tcode < 0) { if (ffpcli(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { if (*status == NUM_OVERFLOW) { /* ignore overflows, which are possibly the null pixel values */ /* overflow = 1; */ *status = 0; } else { return(*status); } } } /* absolute element number in the column */ first = (firstrow - 1) * repeat + firstelem; for (ii = 0; ii < nelem; ii++) { if (array[ii] != nulvalue) /* is this a good pixel? */ { if (nbad) /* write previous string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) return(*status); nbad=0; } ngood = ngood +1; /* the consecutive number of good pixels */ } else { if (ngood) /* write previous string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ if (ffpcli(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status) > 0) { if (*status == NUM_OVERFLOW) { overflow = 1; *status = 0; } else { return(*status); } } } ngood=0; } nbad = nbad +1; /* the consecutive number of bad pixels */ } } /* finished loop; now just write the last set of pixels */ if (ngood) /* write last string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ ffpcli(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); } } else if (nbad) /* write last string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); } if (*status <= 0) { if (overflow) { *status = NUM_OVERFLOW; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi2fi1(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ unsigned char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > UCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) (dvalue + .5); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi2fi2(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ short *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { memcpy(output, input, ntodo * sizeof(short) ); } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else { if (dvalue >= 0) output[ii] = (short) (dvalue + .5); else output[ii] = (short) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi2fi4(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ INT32BIT *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (INT32BIT) input[ii]; /* just copy input to output */ } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else { if (dvalue >= 0) output[ii] = (INT32BIT) (dvalue + .5); else output[ii] = (INT32BIT) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi2fi8(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ LONGLONG *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = input[ii]; } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else { if (dvalue >= 0) output[ii] = (LONGLONG) (dvalue + .5); else output[ii] = (LONGLONG) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi2fr4(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ float *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) ((input[ii] - zero) / scale); } return(*status); } /*--------------------------------------------------------------------------*/ int ffi2fr8(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ double *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (input[ii] - zero) / scale; } return(*status); } /*--------------------------------------------------------------------------*/ int ffi2fstr(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ char *cform, /* I - format for output string values */ long twidth, /* I - width of each field, in chars */ char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do scaling if required. */ { long ii; double dvalue; char *cptr, *tptr; cptr = output; tptr = output; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { sprintf(output, cform, (double) input[ii]); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; sprintf(output, cform, dvalue); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } /* replace any commas with periods (e.g., in French locale) */ while ((cptr = strchr(cptr, ','))) *cptr = '.'; return(*status); } astropy-1.1.1/cextern/cfitsio/License.txt0000644001134200020070000000260212602615520021351 0ustar embrayscience00000000000000Copyright (Unpublished--all rights reserved under the copyright laws of the United States), U.S. Government as represented by the Administrator of the National Aeronautics and Space Administration. No copyright is claimed in the United States under Title 17, U.S. Code. Permission to freely use, copy, modify, and distribute this software and its documentation without fee is hereby granted, provided that this copyright notice and disclaimer of warranty appears in all copies. DISCLAIMER: THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER. astropy-1.1.1/cextern/cfitsio/eval_defs.h0000644001134200020070000001023612602615517021337 0ustar embrayscience00000000000000#include #include #include #include #if defined(__sgi) || defined(__hpux) #include #endif #ifdef sparc #include #endif #include "fitsio2.h" #define MAXDIMS 5 #define MAXSUBS 10 #define MAXVARNAME 80 #define CONST_OP -1000 #define pERROR -1 #define MAX_STRLEN 256 #define MAX_STRLEN_S "255" #ifndef FFBISON #include "eval_tab.h" #endif typedef struct { char name[MAXVARNAME+1]; int type; long nelem; int naxis; long naxes[MAXDIMS]; char *undef; void *data; } DataInfo; typedef struct { long nelem; int naxis; long naxes[MAXDIMS]; char *undef; union { double dbl; long lng; char log; char str[MAX_STRLEN]; double *dblptr; long *lngptr; char *logptr; char **strptr; void *ptr; } data; } lval; typedef struct Node { int operation; void (*DoOp)(struct Node *this); int nSubNodes; int SubNodes[MAXSUBS]; int type; lval value; } Node; typedef struct { fitsfile *def_fptr; int (*getData)( char *dataName, void *dataValue ); int (*loadData)( int varNum, long fRow, long nRows, void *data, char *undef ); int compressed; int timeCol; int parCol; int valCol; char *expr; int index; int is_eobuf; Node *Nodes; int nNodes; int nNodesAlloc; int resultNode; long firstRow; long nRows; int nCols; iteratorCol *colData; DataInfo *varData; PixelFilter *pixFilter; long firstDataRow; long nDataRows; long totalRows; int datatype; int hdutype; int status; } ParseData; typedef enum { rnd_fct = 1001, sum_fct, nelem_fct, sin_fct, cos_fct, tan_fct, asin_fct, acos_fct, atan_fct, sinh_fct, cosh_fct, tanh_fct, exp_fct, log_fct, log10_fct, sqrt_fct, abs_fct, atan2_fct, ceil_fct, floor_fct, round_fct, min1_fct, min2_fct, max1_fct, max2_fct, near_fct, circle_fct, box_fct, elps_fct, isnull_fct, defnull_fct, gtifilt_fct, regfilt_fct, ifthenelse_fct, row_fct, null_fct, median_fct, average_fct, stddev_fct, nonnull_fct, angsep_fct, gasrnd_fct, poirnd_fct, strmid_fct, strpos_fct } funcOp; extern ParseData gParse; #ifdef __cplusplus extern "C" { #endif int ffparse(void); int fflex(void); void ffrestart(FILE*); void Evaluate_Parser( long firstRow, long nRows ); #ifdef __cplusplus } #endif astropy-1.1.1/cextern/cfitsio/checksum.c0000644001134200020070000004226412602615520021204 0ustar embrayscience00000000000000/* This file, checksum.c, contains the checksum-related routines in the */ /* FITSIO library. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include "fitsio2.h" /*------------------------------------------------------------------------*/ int ffcsum(fitsfile *fptr, /* I - FITS file pointer */ long nrec, /* I - number of 2880-byte blocks to sum */ unsigned long *sum, /* IO - accumulated checksum */ int *status) /* IO - error status */ /* Calculate a 32-bit 1's complement checksum of the FITS 2880-byte blocks. This routine is based on the C algorithm developed by Rob Seaman at NOAO that was presented at the 1994 ADASS conference, published in the Astronomical Society of the Pacific Conference Series. This uses a 32-bit 1's complement checksum in which the overflow bits are permuted back into the sum and therefore all bit positions are sampled evenly. */ { long ii, jj; unsigned short sbuf[1440]; unsigned long hi, lo, hicarry, locarry; if (*status > 0) return(*status); /* Sum the specified number of FITS 2880-byte records. This assumes that the FITSIO file pointer points to the start of the records to be summed. Read each FITS block as 1440 short values (do byte swapping if needed). */ for (jj = 0; jj < nrec; jj++) { ffgbyt(fptr, 2880, sbuf, status); #if BYTESWAPPED ffswap2( (short *)sbuf, 1440); /* reverse order of bytes in each value */ #endif hi = (*sum >> 16); lo = *sum & 0xFFFF; for (ii = 0; ii < 1440; ii += 2) { hi += sbuf[ii]; lo += sbuf[ii+1]; } hicarry = hi >> 16; /* fold carry bits in */ locarry = lo >> 16; while (hicarry | locarry) { hi = (hi & 0xFFFF) + locarry; lo = (lo & 0xFFFF) + hicarry; hicarry = hi >> 16; locarry = lo >> 16; } *sum = (hi << 16) + lo; } return(*status); } /*-------------------------------------------------------------------------*/ void ffesum(unsigned long sum, /* I - accumulated checksum */ int complm, /* I - = 1 to encode complement of the sum */ char *ascii) /* O - 16-char ASCII encoded checksum */ /* encode the 32 bit checksum by converting every 2 bits of each byte into an ASCII character (32 bit word encoded as 16 character string). Only ASCII letters and digits are used to encode the values (no ASCII punctuation characters). If complm=TRUE, then the complement of the sum will be encoded. This routine is based on the C algorithm developed by Rob Seaman at NOAO that was presented at the 1994 ADASS conference, published in the Astronomical Society of the Pacific Conference Series. */ { unsigned int exclude[13] = { 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60 }; unsigned long mask[4] = { 0xff000000, 0xff0000, 0xff00, 0xff }; int offset = 0x30; /* ASCII 0 (zero) */ unsigned long value; int byte, quotient, remainder, ch[4], check, ii, jj, kk; char asc[32]; if (complm) value = 0xFFFFFFFF - sum; /* complement each bit of the value */ else value = sum; for (ii = 0; ii < 4; ii++) { byte = (value & mask[ii]) >> (24 - (8 * ii)); quotient = byte / 4 + offset; remainder = byte % 4; for (jj = 0; jj < 4; jj++) ch[jj] = quotient; ch[0] += remainder; for (check = 1; check;) /* avoid ASCII punctuation */ for (check = 0, kk = 0; kk < 13; kk++) for (jj = 0; jj < 4; jj += 2) if ((unsigned char) ch[jj] == exclude[kk] || (unsigned char) ch[jj+1] == exclude[kk]) { ch[jj]++; ch[jj+1]--; check++; } for (jj = 0; jj < 4; jj++) /* assign the bytes */ asc[4*jj+ii] = ch[jj]; } for (ii = 0; ii < 16; ii++) /* shift the bytes 1 to the right */ ascii[ii] = asc[(ii+15)%16]; ascii[16] = '\0'; } /*-------------------------------------------------------------------------*/ unsigned long ffdsum(char *ascii, /* I - 16-char ASCII encoded checksum */ int complm, /* I - =1 to decode complement of the */ unsigned long *sum) /* O - 32-bit checksum */ /* decode the 16-char ASCII encoded checksum into an unsigned 32-bit long. If complm=TRUE, then the complement of the sum will be decoded. This routine is based on the C algorithm developed by Rob Seaman at NOAO that was presented at the 1994 ADASS conference, published in the Astronomical Society of the Pacific Conference Series. */ { char cbuf[16]; unsigned long hi = 0, lo = 0, hicarry, locarry; int ii; /* remove the permuted FITS byte alignment and the ASCII 0 offset */ for (ii = 0; ii < 16; ii++) { cbuf[ii] = ascii[(ii+1)%16]; cbuf[ii] -= 0x30; } for (ii = 0; ii < 16; ii += 4) { hi += (cbuf[ii] << 8) + cbuf[ii+1]; lo += (cbuf[ii+2] << 8) + cbuf[ii+3]; } hicarry = hi >> 16; locarry = lo >> 16; while (hicarry || locarry) { hi = (hi & 0xFFFF) + locarry; lo = (lo & 0xFFFF) + hicarry; hicarry = hi >> 16; locarry = lo >> 16; } *sum = (hi << 16) + lo; if (complm) *sum = 0xFFFFFFFF - *sum; /* complement each bit of the value */ return(*sum); } /*------------------------------------------------------------------------*/ int ffpcks(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* Create or update the checksum keywords in the CHDU. These keywords provide a checksum verification of the FITS HDU based on the ASCII coded 1's complement checksum algorithm developed by Rob Seaman at NOAO. */ { char datestr[20], checksum[FLEN_VALUE], datasum[FLEN_VALUE]; char comm[FLEN_COMMENT], chkcomm[FLEN_COMMENT], datacomm[FLEN_COMMENT]; int tstatus; long nrec; LONGLONG headstart, datastart, dataend; unsigned long dsum, olddsum, sum; double tdouble; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* generate current date string and construct the keyword comments */ ffgstm(datestr, NULL, status); strcpy(chkcomm, "HDU checksum updated "); strcat(chkcomm, datestr); strcpy(datacomm, "data unit checksum updated "); strcat(datacomm, datestr); /* write the CHECKSUM keyword if it does not exist */ tstatus = *status; if (ffgkys(fptr, "CHECKSUM", checksum, comm, status) == KEY_NO_EXIST) { *status = tstatus; strcpy(checksum, "0000000000000000"); ffpkys(fptr, "CHECKSUM", checksum, chkcomm, status); } /* write the DATASUM keyword if it does not exist */ tstatus = *status; if (ffgkys(fptr, "DATASUM", datasum, comm, status) == KEY_NO_EXIST) { *status = tstatus; olddsum = 0; ffpkys(fptr, "DATASUM", " 0", datacomm, status); /* set the CHECKSUM keyword as undefined, if it isn't already */ if (strcmp(checksum, "0000000000000000") ) { strcpy(checksum, "0000000000000000"); ffmkys(fptr, "CHECKSUM", checksum, chkcomm, status); } } else { /* decode the datasum into an unsigned long variable */ /* olddsum = strtoul(datasum, 0, 10); doesn't work on SUN OS */ tdouble = atof(datasum); olddsum = (unsigned long) tdouble; } /* close header: rewrite END keyword and following blank fill */ /* and re-read the required keywords to determine the structure */ if (ffrdef(fptr, status) > 0) return(*status); if ((fptr->Fptr)->heapsize > 0) ffuptf(fptr, status); /* update the variable length TFORM values */ /* write the correct data fill values, if they are not already correct */ if (ffpdfl(fptr, status) > 0) return(*status); /* calc size of data unit, in FITS 2880-byte blocks */ if (ffghadll(fptr, &headstart, &datastart, &dataend, status) > 0) return(*status); nrec = (long) ((dataend - datastart) / 2880); dsum = 0; if (nrec > 0) { /* accumulate the 32-bit 1's complement checksum */ ffmbyt(fptr, datastart, REPORT_EOF, status); if (ffcsum(fptr, nrec, &dsum, status) > 0) return(*status); } if (dsum != olddsum) { /* update the DATASUM keyword with the correct value */ sprintf(datasum, "%lu", dsum); ffmkys(fptr, "DATASUM", datasum, datacomm, status); /* set the CHECKSUM keyword as undefined, if it isn't already */ if (strcmp(checksum, "0000000000000000") ) { strcpy(checksum, "0000000000000000"); ffmkys(fptr, "CHECKSUM", checksum, chkcomm, status); } } if (strcmp(checksum, "0000000000000000") ) { /* check if CHECKSUM is still OK; move to the start of the header */ ffmbyt(fptr, headstart, REPORT_EOF, status); /* accumulate the header checksum into the previous data checksum */ nrec = (long) ((datastart - headstart) / 2880); sum = dsum; if (ffcsum(fptr, nrec, &sum, status) > 0) return(*status); if (sum == 0 || sum == 0xFFFFFFFF) return(*status); /* CHECKSUM is correct */ /* Zero the CHECKSUM and recompute the new value */ ffmkys(fptr, "CHECKSUM", "0000000000000000", chkcomm, status); } /* move to the start of the header */ ffmbyt(fptr, headstart, REPORT_EOF, status); /* accumulate the header checksum into the previous data checksum */ nrec = (long) ((datastart - headstart) / 2880); sum = dsum; if (ffcsum(fptr, nrec, &sum, status) > 0) return(*status); /* encode the COMPLEMENT of the checksum into a 16-character string */ ffesum(sum, TRUE, checksum); /* update the CHECKSUM keyword value with the new string */ ffmkys(fptr, "CHECKSUM", checksum, "&", status); return(*status); } /*------------------------------------------------------------------------*/ int ffupck(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* Update the CHECKSUM keyword value. This assumes that the DATASUM keyword exists and has the correct value. */ { char datestr[20], chkcomm[FLEN_COMMENT], comm[FLEN_COMMENT]; char checksum[FLEN_VALUE], datasum[FLEN_VALUE]; int tstatus; long nrec; LONGLONG headstart, datastart, dataend; unsigned long sum, dsum; double tdouble; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* generate current date string and construct the keyword comments */ ffgstm(datestr, NULL, status); strcpy(chkcomm, "HDU checksum updated "); strcat(chkcomm, datestr); /* get the DATASUM keyword and convert it to a unsigned long */ if (ffgkys(fptr, "DATASUM", datasum, comm, status) == KEY_NO_EXIST) { ffpmsg("DATASUM keyword not found (ffupck"); return(*status); } tdouble = atof(datasum); /* read as a double as a workaround */ dsum = (unsigned long) tdouble; /* get size of the HDU */ if (ffghadll(fptr, &headstart, &datastart, &dataend, status) > 0) return(*status); /* get the checksum keyword, if it exists */ tstatus = *status; if (ffgkys(fptr, "CHECKSUM", checksum, comm, status) == KEY_NO_EXIST) { *status = tstatus; strcpy(checksum, "0000000000000000"); ffpkys(fptr, "CHECKSUM", checksum, chkcomm, status); } else { /* check if CHECKSUM is still OK */ /* rewrite END keyword and following blank fill */ if (ffwend(fptr, status) > 0) return(*status); /* move to the start of the header */ ffmbyt(fptr, headstart, REPORT_EOF, status); /* accumulate the header checksum into the previous data checksum */ nrec = (long) ((datastart - headstart) / 2880); sum = dsum; if (ffcsum(fptr, nrec, &sum, status) > 0) return(*status); if (sum == 0 || sum == 0xFFFFFFFF) return(*status); /* CHECKSUM is already correct */ /* Zero the CHECKSUM and recompute the new value */ ffmkys(fptr, "CHECKSUM", "0000000000000000", chkcomm, status); } /* move to the start of the header */ ffmbyt(fptr, headstart, REPORT_EOF, status); /* accumulate the header checksum into the previous data checksum */ nrec = (long) ((datastart - headstart) / 2880); sum = dsum; if (ffcsum(fptr, nrec, &sum, status) > 0) return(*status); /* encode the COMPLEMENT of the checksum into a 16-character string */ ffesum(sum, TRUE, checksum); /* update the CHECKSUM keyword value with the new string */ ffmkys(fptr, "CHECKSUM", checksum, "&", status); return(*status); } /*------------------------------------------------------------------------*/ int ffvcks(fitsfile *fptr, /* I - FITS file pointer */ int *datastatus, /* O - data checksum status */ int *hdustatus, /* O - hdu checksum status */ /* 1 verification is correct */ /* 0 checksum keyword is not present */ /* -1 verification not correct */ int *status) /* IO - error status */ /* Verify the HDU by comparing the value of the computed checksums against the values of the DATASUM and CHECKSUM keywords if they are present. */ { int tstatus; double tdouble; unsigned long datasum, hdusum, olddatasum; char chksum[FLEN_VALUE], comm[FLEN_COMMENT]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); *datastatus = -1; *hdustatus = -1; tstatus = *status; if (ffgkys(fptr, "CHECKSUM", chksum, comm, status) == KEY_NO_EXIST) { *hdustatus = 0; /* CHECKSUM keyword does not exist */ *status = tstatus; } if (chksum[0] == '\0') *hdustatus = 0; /* all blank checksum means it is undefined */ if (ffgkys(fptr, "DATASUM", chksum, comm, status) == KEY_NO_EXIST) { *datastatus = 0; /* DATASUM keyword does not exist */ *status = tstatus; } if (chksum[0] == '\0') *datastatus = 0; /* all blank checksum means it is undefined */ if ( *status > 0 || (!(*hdustatus) && !(*datastatus)) ) return(*status); /* return if neither keywords exist */ /* convert string to unsigned long */ /* olddatasum = strtoul(chksum, 0, 10); doesn't work w/ gcc on SUN OS */ /* sscanf(chksum, "%u", &olddatasum); doesn't work w/ cc on VAX/VMS */ tdouble = atof(chksum); /* read as a double as a workaround */ olddatasum = (unsigned long) tdouble; /* calculate the data checksum and the HDU checksum */ if (ffgcks(fptr, &datasum, &hdusum, status) > 0) return(*status); if (*datastatus) if (datasum == olddatasum) *datastatus = 1; if (*hdustatus) if (hdusum == 0 || hdusum == 0xFFFFFFFF) *hdustatus = 1; return(*status); } /*------------------------------------------------------------------------*/ int ffgcks(fitsfile *fptr, /* I - FITS file pointer */ unsigned long *datasum, /* O - data checksum */ unsigned long *hdusum, /* O - hdu checksum */ int *status) /* IO - error status */ /* calculate the checksums of the data unit and the total HDU */ { long nrec; LONGLONG headstart, datastart, dataend; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* get size of the HDU */ if (ffghadll(fptr, &headstart, &datastart, &dataend, status) > 0) return(*status); nrec = (long) ((dataend - datastart) / 2880); *datasum = 0; if (nrec > 0) { /* accumulate the 32-bit 1's complement checksum */ ffmbyt(fptr, datastart, REPORT_EOF, status); if (ffcsum(fptr, nrec, datasum, status) > 0) return(*status); } /* move to the start of the header and calc. size of header */ ffmbyt(fptr, headstart, REPORT_EOF, status); nrec = (long) ((datastart - headstart) / 2880); /* accumulate the header checksum into the previous data checksum */ *hdusum = *datasum; ffcsum(fptr, nrec, hdusum, status); return(*status); } astropy-1.1.1/cextern/cfitsio/eval.y0000644001134200020070000053306212602615517020366 0ustar embrayscience00000000000000%{ /************************************************************************/ /* */ /* CFITSIO Lexical Parser */ /* */ /* This file is one of 3 files containing code which parses an */ /* arithmetic expression and evaluates it in the context of an input */ /* FITS file table extension. The CFITSIO lexical parser is divided */ /* into the following 3 parts/files: the CFITSIO "front-end", */ /* eval_f.c, contains the interface between the user/CFITSIO and the */ /* real core of the parser; the FLEX interpreter, eval_l.c, takes the */ /* input string and parses it into tokens and identifies the FITS */ /* information required to evaluate the expression (ie, keywords and */ /* columns); and, the BISON grammar and evaluation routines, eval_y.c, */ /* receives the FLEX output and determines and performs the actual */ /* operations. The files eval_l.c and eval_y.c are produced from */ /* running flex and bison on the files eval.l and eval.y, respectively. */ /* (flex and bison are available from any GNU archive: see www.gnu.org) */ /* */ /* The grammar rules, rather than evaluating the expression in situ, */ /* builds a tree, or Nodal, structure mapping out the order of */ /* operations and expression dependencies. This "compilation" process */ /* allows for much faster processing of multiple rows. This technique */ /* was developed by Uwe Lammers of the XMM Science Analysis System, */ /* although the CFITSIO implementation is entirely code original. */ /* */ /* */ /* Modification History: */ /* */ /* Kent Blackburn c1992 Original parser code developed for the */ /* FTOOLS software package, in particular, */ /* the fselect task. */ /* Kent Blackburn c1995 BIT column support added */ /* Peter D Wilson Feb 1998 Vector column support added */ /* Peter D Wilson May 1998 Ported to CFITSIO library. User */ /* interface routines written, in essence */ /* making fselect, fcalc, and maketime */ /* capabilities available to all tools */ /* via single function calls. */ /* Peter D Wilson Jun 1998 Major rewrite of parser core, so as to */ /* create a run-time evaluation tree, */ /* inspired by the work of Uwe Lammers, */ /* resulting in a speed increase of */ /* 10-100 times. */ /* Peter D Wilson Jul 1998 gtifilter(a,b,c,d) function added */ /* Peter D Wilson Aug 1998 regfilter(a,b,c,d) function added */ /* Peter D Wilson Jul 1999 Make parser fitsfile-independent, */ /* allowing a purely vector-based usage */ /* Craig B Markwardt Jun 2004 Add MEDIAN() function */ /* Craig B Markwardt Jun 2004 Add SUM(), and MIN/MAX() for bit arrays */ /* Craig B Markwardt Jun 2004 Allow subscripting of nX bit arrays */ /* Craig B Markwardt Jun 2004 Implement statistical functions */ /* NVALID(), AVERAGE(), and STDDEV() */ /* for integer and floating point vectors */ /* Craig B Markwardt Jun 2004 Use NULL values for range errors instead*/ /* of throwing a parse error */ /* Craig B Markwardt Oct 2004 Add ACCUM() and SEQDIFF() functions */ /* Craig B Markwardt Feb 2005 Add ANGSEP() function */ /* Craig B Markwardt Aug 2005 CIRCLE, BOX, ELLIPSE, NEAR and REGFILTER*/ /* functions now accept vector arguments */ /* Craig B Markwardt Sum 2006 Add RANDOMN() and RANDOMP() functions */ /* Craig B Markwardt Mar 2007 Allow arguments to RANDOM and RANDOMN to*/ /* determine the output dimensions */ /* Craig B Markwardt Aug 2009 Add substring STRMID() and string search*/ /* STRSTR() functions; more overflow checks*/ /* */ /************************************************************************/ #define APPROX 1.0e-7 #include "eval_defs.h" #include "region.h" #include #include #ifndef alloca #define alloca malloc #endif /* Shrink the initial stack depth to keep local data <32K (mac limit) */ /* yacc will allocate more space if needed, though. */ #define YYINITDEPTH 100 /***************************************************************/ /* Replace Bison's BACKUP macro with one that fixes a bug -- */ /* must update state after popping the stack -- and allows */ /* popping multiple terms at one time. */ /***************************************************************/ #define YYNEWBACKUP(token, value) \ do \ if (yychar == YYEMPTY ) \ { yychar = (token); \ memcpy( &yylval, &(value), sizeof(value) ); \ yychar1 = YYTRANSLATE (yychar); \ while (yylen--) YYPOPSTACK; \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) /***************************************************************/ /* Useful macros for accessing/testing Nodes */ /***************************************************************/ #define TEST(a) if( (a)<0 ) YYERROR #define SIZE(a) gParse.Nodes[ a ].value.nelem #define TYPE(a) gParse.Nodes[ a ].type #define OPER(a) gParse.Nodes[ a ].operation #define PROMOTE(a,b) if( TYPE(a) > TYPE(b) ) \ b = New_Unary( TYPE(a), 0, b ); \ else if( TYPE(a) < TYPE(b) ) \ a = New_Unary( TYPE(b), 0, a ); /***** Internal functions *****/ #ifdef __cplusplus extern "C" { #endif static int Alloc_Node ( void ); static void Free_Last_Node( void ); static void Evaluate_Node ( int thisNode ); static int New_Const ( int returnType, void *value, long len ); static int New_Column( int ColNum ); static int New_Offset( int ColNum, int offset ); static int New_Unary ( int returnType, int Op, int Node1 ); static int New_BinOp ( int returnType, int Node1, int Op, int Node2 ); static int New_Func ( int returnType, funcOp Op, int nNodes, int Node1, int Node2, int Node3, int Node4, int Node5, int Node6, int Node7 ); static int New_FuncSize( int returnType, funcOp Op, int nNodes, int Node1, int Node2, int Node3, int Node4, int Node5, int Node6, int Node7, int Size); static int New_Deref ( int Var, int nDim, int Dim1, int Dim2, int Dim3, int Dim4, int Dim5 ); static int New_GTI ( char *fname, int Node1, char *start, char *stop ); static int New_REG ( char *fname, int NodeX, int NodeY, char *colNames ); static int New_Vector( int subNode ); static int Close_Vec ( int vecNode ); static int Locate_Col( Node *this ); static int Test_Dims ( int Node1, int Node2 ); static void Copy_Dims ( int Node1, int Node2 ); static void Allocate_Ptrs( Node *this ); static void Do_Unary ( Node *this ); static void Do_Offset ( Node *this ); static void Do_BinOp_bit ( Node *this ); static void Do_BinOp_str ( Node *this ); static void Do_BinOp_log ( Node *this ); static void Do_BinOp_lng ( Node *this ); static void Do_BinOp_dbl ( Node *this ); static void Do_Func ( Node *this ); static void Do_Deref ( Node *this ); static void Do_GTI ( Node *this ); static void Do_REG ( Node *this ); static void Do_Vector ( Node *this ); static long Search_GTI ( double evtTime, long nGTI, double *start, double *stop, int ordered ); static char saobox (double xcen, double ycen, double xwid, double ywid, double rot, double xcol, double ycol); static char ellipse(double xcen, double ycen, double xrad, double yrad, double rot, double xcol, double ycol); static char circle (double xcen, double ycen, double rad, double xcol, double ycol); static char bnear (double x, double y, double tolerance); static char bitcmp (char *bitstrm1, char *bitstrm2); static char bitlgte(char *bits1, int oper, char *bits2); static void bitand(char *result, char *bitstrm1, char *bitstrm2); static void bitor (char *result, char *bitstrm1, char *bitstrm2); static void bitnot(char *result, char *bits); static int cstrmid(char *dest_str, int dest_len, char *src_str, int src_len, int pos); static void yyerror(char *msg); #ifdef __cplusplus } #endif %} %union { int Node; /* Index of Node */ double dbl; /* real value */ long lng; /* integer value */ char log; /* logical value */ char str[MAX_STRLEN]; /* string value */ } %token BOOLEAN /* First 3 must be in order of */ %token LONG /* increasing promotion for later use */ %token DOUBLE %token STRING %token BITSTR %token FUNCTION %token BFUNCTION /* Bit function */ %token IFUNCTION /* Integer function */ %token GTIFILTER %token REGFILTER %token COLUMN %token BCOLUMN %token SCOLUMN %token BITCOL %token ROWREF %token NULLREF %token SNULLREF %type expr %type bexpr %type sexpr %type bits %type vector %type bvector %left ',' '=' ':' '{' '}' %right '?' %left OR %left AND %left EQ NE '~' %left GT LT LTE GTE %left '+' '-' '%' %left '*' '/' %left '|' '&' %right POWER %left NOT %left INTCAST FLTCAST %left UMINUS %left '[' %right ACCUM DIFF %% lines: /* nothing ; was | lines line */ | lines line ; line: '\n' {} | expr '\n' { if( $1<0 ) { yyerror("Couldn't build node structure: out of memory?"); YYERROR; } gParse.resultNode = $1; } | bexpr '\n' { if( $1<0 ) { yyerror("Couldn't build node structure: out of memory?"); YYERROR; } gParse.resultNode = $1; } | sexpr '\n' { if( $1<0 ) { yyerror("Couldn't build node structure: out of memory?"); YYERROR; } gParse.resultNode = $1; } | bits '\n' { if( $1<0 ) { yyerror("Couldn't build node structure: out of memory?"); YYERROR; } gParse.resultNode = $1; } | error '\n' { yyerrok; } ; bvector: '{' bexpr { $$ = New_Vector( $2 ); TEST($$); } | bvector ',' bexpr { if( gParse.Nodes[$1].nSubNodes >= MAXSUBS ) { $1 = Close_Vec( $1 ); TEST($1); $$ = New_Vector( $1 ); TEST($$); } else { $$ = $1; } gParse.Nodes[$$].SubNodes[ gParse.Nodes[$$].nSubNodes++ ] = $3; } ; vector: '{' expr { $$ = New_Vector( $2 ); TEST($$); } | vector ',' expr { if( TYPE($1) < TYPE($3) ) TYPE($1) = TYPE($3); if( gParse.Nodes[$1].nSubNodes >= MAXSUBS ) { $1 = Close_Vec( $1 ); TEST($1); $$ = New_Vector( $1 ); TEST($$); } else { $$ = $1; } gParse.Nodes[$$].SubNodes[ gParse.Nodes[$$].nSubNodes++ ] = $3; } | vector ',' bexpr { if( gParse.Nodes[$1].nSubNodes >= MAXSUBS ) { $1 = Close_Vec( $1 ); TEST($1); $$ = New_Vector( $1 ); TEST($$); } else { $$ = $1; } gParse.Nodes[$$].SubNodes[ gParse.Nodes[$$].nSubNodes++ ] = $3; } | bvector ',' expr { TYPE($1) = TYPE($3); if( gParse.Nodes[$1].nSubNodes >= MAXSUBS ) { $1 = Close_Vec( $1 ); TEST($1); $$ = New_Vector( $1 ); TEST($$); } else { $$ = $1; } gParse.Nodes[$$].SubNodes[ gParse.Nodes[$$].nSubNodes++ ] = $3; } ; expr: vector '}' { $$ = Close_Vec( $1 ); TEST($$); } ; bexpr: bvector '}' { $$ = Close_Vec( $1 ); TEST($$); } ; bits: BITSTR { $$ = New_Const( BITSTR, $1, strlen($1)+1 ); TEST($$); SIZE($$) = strlen($1); } | BITCOL { $$ = New_Column( $1 ); TEST($$); } | BITCOL '{' expr '}' { if( TYPE($3) != LONG || OPER($3) != CONST_OP ) { yyerror("Offset argument must be a constant integer"); YYERROR; } $$ = New_Offset( $1, $3 ); TEST($$); } | bits '&' bits { $$ = New_BinOp( BITSTR, $1, '&', $3 ); TEST($$); SIZE($$) = ( SIZE($1)>SIZE($3) ? SIZE($1) : SIZE($3) ); } | bits '|' bits { $$ = New_BinOp( BITSTR, $1, '|', $3 ); TEST($$); SIZE($$) = ( SIZE($1)>SIZE($3) ? SIZE($1) : SIZE($3) ); } | bits '+' bits { if (SIZE($1)+SIZE($3) >= MAX_STRLEN) { yyerror("Combined bit string size exceeds " MAX_STRLEN_S " bits"); YYERROR; } $$ = New_BinOp( BITSTR, $1, '+', $3 ); TEST($$); SIZE($$) = SIZE($1) + SIZE($3); } | bits '[' expr ']' { $$ = New_Deref( $1, 1, $3, 0, 0, 0, 0 ); TEST($$); } | bits '[' expr ',' expr ']' { $$ = New_Deref( $1, 2, $3, $5, 0, 0, 0 ); TEST($$); } | bits '[' expr ',' expr ',' expr ']' { $$ = New_Deref( $1, 3, $3, $5, $7, 0, 0 ); TEST($$); } | bits '[' expr ',' expr ',' expr ',' expr ']' { $$ = New_Deref( $1, 4, $3, $5, $7, $9, 0 ); TEST($$); } | bits '[' expr ',' expr ',' expr ',' expr ',' expr ']' { $$ = New_Deref( $1, 5, $3, $5, $7, $9, $11 ); TEST($$); } | NOT bits { $$ = New_Unary( BITSTR, NOT, $2 ); TEST($$); } | '(' bits ')' { $$ = $2; } ; expr: LONG { $$ = New_Const( LONG, &($1), sizeof(long) ); TEST($$); } | DOUBLE { $$ = New_Const( DOUBLE, &($1), sizeof(double) ); TEST($$); } | COLUMN { $$ = New_Column( $1 ); TEST($$); } | COLUMN '{' expr '}' { if( TYPE($3) != LONG || OPER($3) != CONST_OP ) { yyerror("Offset argument must be a constant integer"); YYERROR; } $$ = New_Offset( $1, $3 ); TEST($$); } | ROWREF { $$ = New_Func( LONG, row_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); } | NULLREF { $$ = New_Func( LONG, null_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); } | expr '%' expr { PROMOTE($1,$3); $$ = New_BinOp( TYPE($1), $1, '%', $3 ); TEST($$); } | expr '+' expr { PROMOTE($1,$3); $$ = New_BinOp( TYPE($1), $1, '+', $3 ); TEST($$); } | expr '-' expr { PROMOTE($1,$3); $$ = New_BinOp( TYPE($1), $1, '-', $3 ); TEST($$); } | expr '*' expr { PROMOTE($1,$3); $$ = New_BinOp( TYPE($1), $1, '*', $3 ); TEST($$); } | expr '/' expr { PROMOTE($1,$3); $$ = New_BinOp( TYPE($1), $1, '/', $3 ); TEST($$); } | expr POWER expr { PROMOTE($1,$3); $$ = New_BinOp( TYPE($1), $1, POWER, $3 ); TEST($$); } | '+' expr %prec UMINUS { $$ = $2; } | '-' expr %prec UMINUS { $$ = New_Unary( TYPE($2), UMINUS, $2 ); TEST($$); } | '(' expr ')' { $$ = $2; } | expr '*' bexpr { $3 = New_Unary( TYPE($1), 0, $3 ); $$ = New_BinOp( TYPE($1), $1, '*', $3 ); TEST($$); } | bexpr '*' expr { $1 = New_Unary( TYPE($3), 0, $1 ); $$ = New_BinOp( TYPE($3), $1, '*', $3 ); TEST($$); } | bexpr '?' expr ':' expr { PROMOTE($3,$5); if( ! Test_Dims($3,$5) ) { yyerror("Incompatible dimensions in '?:' arguments"); YYERROR; } $$ = New_Func( 0, ifthenelse_fct, 3, $3, $5, $1, 0, 0, 0, 0 ); TEST($$); if( SIZE($3)=SIZE($4) && Test_Dims( $2, $4 ) ) { PROMOTE($2,$4); $$ = New_Func( 0, defnull_fct, 2, $2, $4, 0, 0, 0, 0, 0 ); TEST($$); } else { yyerror("Dimensions of DEFNULL arguments " "are not compatible"); YYERROR; } } else if (FSTRCMP($1,"ARCTAN2(") == 0) { if( TYPE($2) != DOUBLE ) $2 = New_Unary( DOUBLE, 0, $2 ); if( TYPE($4) != DOUBLE ) $4 = New_Unary( DOUBLE, 0, $4 ); if( Test_Dims( $2, $4 ) ) { $$ = New_Func( 0, atan2_fct, 2, $2, $4, 0, 0, 0, 0, 0 ); TEST($$); if( SIZE($2)=SIZE($4) && Test_Dims( $2, $4 ) ) { $$ = New_Func( 0, defnull_fct, 2, $2, $4, 0, 0, 0, 0, 0 ); TEST($$); } else { yyerror("Dimensions of DEFNULL arguments are not compatible"); YYERROR; } } else { yyerror("Boolean Function(expr,expr) not supported"); YYERROR; } } | BFUNCTION expr ',' expr ',' expr ')' { if( TYPE($2) != DOUBLE ) $2 = New_Unary( DOUBLE, 0, $2 ); if( TYPE($4) != DOUBLE ) $4 = New_Unary( DOUBLE, 0, $4 ); if( TYPE($6) != DOUBLE ) $6 = New_Unary( DOUBLE, 0, $6 ); if( ! (Test_Dims( $2, $4 ) && Test_Dims( $4, $6 ) ) ) { yyerror("Dimensions of NEAR arguments " "are not compatible"); YYERROR; } else { if (FSTRCMP($1,"NEAR(") == 0) { $$ = New_Func( BOOLEAN, near_fct, 3, $2, $4, $6, 0, 0, 0, 0 ); } else { yyerror("Boolean Function not supported"); YYERROR; } TEST($$); if( SIZE($$)= MAX_STRLEN) { yyerror("Combined string size exceeds " MAX_STRLEN_S " characters"); YYERROR; } $$ = New_BinOp( STRING, $1, '+', $3 ); TEST($$); SIZE($$) = SIZE($1) + SIZE($3); } | bexpr '?' sexpr ':' sexpr { int outSize; if( SIZE($1)!=1 ) { yyerror("Cannot have a vector string column"); YYERROR; } /* Since the output can be calculated now, as a constant scalar, we must precalculate the output size, in order to avoid an overflow. */ outSize = SIZE($3); if (SIZE($5) > outSize) outSize = SIZE($5); $$ = New_FuncSize( 0, ifthenelse_fct, 3, $3, $5, $1, 0, 0, 0, 0, outSize); TEST($$); if( SIZE($3) outSize) outSize = SIZE($4); $$ = New_FuncSize( 0, defnull_fct, 2, $2, $4, 0, 0, 0, 0, 0, outSize ); TEST($$); if( SIZE($4)>SIZE($2) ) SIZE($$) = SIZE($4); } else { yyerror("Function(string,string) not supported"); YYERROR; } } | FUNCTION sexpr ',' expr ',' expr ')' { if (FSTRCMP($1,"STRMID(") == 0) { int len; if( TYPE($4) != LONG || SIZE($4) != 1 || TYPE($6) != LONG || SIZE($6) != 1) { yyerror("When using STRMID(S,P,N), P and N must be integers (and not vector columns)"); YYERROR; } if (OPER($6) == CONST_OP) { /* Constant value: use that directly */ len = (gParse.Nodes[$6].value.data.lng); } else { /* Variable value: use the maximum possible (from $2) */ len = SIZE($2); } if (len <= 0 || len >= MAX_STRLEN) { yyerror("STRMID(S,P,N), N must be 1-" MAX_STRLEN_S); YYERROR; } $$ = New_FuncSize( 0, strmid_fct, 3, $2, $4,$6,0,0,0,0,len); TEST($$); } else { yyerror("Function(string,expr,expr) not supported"); YYERROR; } } ; %% /*************************************************************************/ /* Start of "New" routines which build the expression Nodal structure */ /*************************************************************************/ static int Alloc_Node( void ) { /* Use this for allocation to guarantee *Nodes */ Node *newNodePtr; /* survives on failure, making it still valid */ /* while working our way out of this error */ if( gParse.nNodes == gParse.nNodesAlloc ) { if( gParse.Nodes ) { gParse.nNodesAlloc += gParse.nNodesAlloc; newNodePtr = (Node *)realloc( gParse.Nodes, sizeof(Node)*gParse.nNodesAlloc ); } else { gParse.nNodesAlloc = 100; newNodePtr = (Node *)malloc ( sizeof(Node)*gParse.nNodesAlloc ); } if( newNodePtr ) { gParse.Nodes = newNodePtr; } else { gParse.status = MEMORY_ALLOCATION; return( -1 ); } } return ( gParse.nNodes++ ); } static void Free_Last_Node( void ) { if( gParse.nNodes ) gParse.nNodes--; } static int New_Const( int returnType, void *value, long len ) { Node *this; int n; n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->operation = CONST_OP; /* Flag a constant */ this->DoOp = NULL; this->nSubNodes = 0; this->type = returnType; memcpy( &(this->value.data), value, len ); this->value.undef = NULL; this->value.nelem = 1; this->value.naxis = 1; this->value.naxes[0] = 1; } return(n); } static int New_Column( int ColNum ) { Node *this; int n, i; n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->operation = -ColNum; this->DoOp = NULL; this->nSubNodes = 0; this->type = gParse.varData[ColNum].type; this->value.nelem = gParse.varData[ColNum].nelem; this->value.naxis = gParse.varData[ColNum].naxis; for( i=0; ivalue.naxes[i] = gParse.varData[ColNum].naxes[i]; } return(n); } static int New_Offset( int ColNum, int offsetNode ) { Node *this; int n, i, colNode; colNode = New_Column( ColNum ); if( colNode<0 ) return(-1); n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->operation = '{'; this->DoOp = Do_Offset; this->nSubNodes = 2; this->SubNodes[0] = colNode; this->SubNodes[1] = offsetNode; this->type = gParse.varData[ColNum].type; this->value.nelem = gParse.varData[ColNum].nelem; this->value.naxis = gParse.varData[ColNum].naxis; for( i=0; ivalue.naxes[i] = gParse.varData[ColNum].naxes[i]; } return(n); } static int New_Unary( int returnType, int Op, int Node1 ) { Node *this, *that; int i,n; if( Node1<0 ) return(-1); that = gParse.Nodes + Node1; if( !Op ) Op = returnType; if( (Op==DOUBLE || Op==FLTCAST) && that->type==DOUBLE ) return( Node1 ); if( (Op==LONG || Op==INTCAST) && that->type==LONG ) return( Node1 ); if( (Op==BOOLEAN ) && that->type==BOOLEAN ) return( Node1 ); n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->operation = Op; this->DoOp = Do_Unary; this->nSubNodes = 1; this->SubNodes[0] = Node1; this->type = returnType; that = gParse.Nodes + Node1; /* Reset in case .Nodes mv'd */ this->value.nelem = that->value.nelem; this->value.naxis = that->value.naxis; for( i=0; ivalue.naxis; i++ ) this->value.naxes[i] = that->value.naxes[i]; if( that->operation==CONST_OP ) this->DoOp( this ); } return( n ); } static int New_BinOp( int returnType, int Node1, int Op, int Node2 ) { Node *this,*that1,*that2; int n,i,constant; if( Node1<0 || Node2<0 ) return(-1); n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->operation = Op; this->nSubNodes = 2; this->SubNodes[0]= Node1; this->SubNodes[1]= Node2; this->type = returnType; that1 = gParse.Nodes + Node1; that2 = gParse.Nodes + Node2; constant = (that1->operation==CONST_OP && that2->operation==CONST_OP); if( that1->type!=STRING && that1->type!=BITSTR ) if( !Test_Dims( Node1, Node2 ) ) { Free_Last_Node(); yyerror("Array sizes/dims do not match for binary operator"); return(-1); } if( that1->value.nelem == 1 ) that1 = that2; this->value.nelem = that1->value.nelem; this->value.naxis = that1->value.naxis; for( i=0; ivalue.naxis; i++ ) this->value.naxes[i] = that1->value.naxes[i]; if ( Op == ACCUM && that1->type == BITSTR ) { /* ACCUM is rank-reducing on bit strings */ this->value.nelem = 1; this->value.naxis = 1; this->value.naxes[0] = 1; } /* Both subnodes should be of same time */ switch( that1->type ) { case BITSTR: this->DoOp = Do_BinOp_bit; break; case STRING: this->DoOp = Do_BinOp_str; break; case BOOLEAN: this->DoOp = Do_BinOp_log; break; case LONG: this->DoOp = Do_BinOp_lng; break; case DOUBLE: this->DoOp = Do_BinOp_dbl; break; } if( constant ) this->DoOp( this ); } return( n ); } static int New_Func( int returnType, funcOp Op, int nNodes, int Node1, int Node2, int Node3, int Node4, int Node5, int Node6, int Node7 ) { return New_FuncSize(returnType, Op, nNodes, Node1, Node2, Node3, Node4, Node5, Node6, Node7, 0); } static int New_FuncSize( int returnType, funcOp Op, int nNodes, int Node1, int Node2, int Node3, int Node4, int Node5, int Node6, int Node7, int Size ) /* If returnType==0 , use Node1's type and vector sizes as returnType, */ /* else return a single value of type returnType */ { Node *this, *that; int i,n,constant; if( Node1<0 || Node2<0 || Node3<0 || Node4<0 || Node5<0 || Node6<0 || Node7<0 ) return(-1); n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->operation = (int)Op; this->DoOp = Do_Func; this->nSubNodes = nNodes; this->SubNodes[0] = Node1; this->SubNodes[1] = Node2; this->SubNodes[2] = Node3; this->SubNodes[3] = Node4; this->SubNodes[4] = Node5; this->SubNodes[5] = Node6; this->SubNodes[6] = Node7; i = constant = nNodes; /* Functions with zero params are not const */ if (Op == poirnd_fct) constant = 0; /* Nor is Poisson deviate */ while( i-- ) constant = ( constant && OPER(this->SubNodes[i]) == CONST_OP ); if( returnType ) { this->type = returnType; this->value.nelem = 1; this->value.naxis = 1; this->value.naxes[0] = 1; } else { that = gParse.Nodes + Node1; this->type = that->type; this->value.nelem = that->value.nelem; this->value.naxis = that->value.naxis; for( i=0; ivalue.naxis; i++ ) this->value.naxes[i] = that->value.naxes[i]; } /* Force explicit size before evaluating */ if (Size > 0) this->value.nelem = Size; if( constant ) this->DoOp( this ); } return( n ); } static int New_Deref( int Var, int nDim, int Dim1, int Dim2, int Dim3, int Dim4, int Dim5 ) { int n, idx, constant; long elem=0; Node *this, *theVar, *theDim[MAXDIMS]; if( Var<0 || Dim1<0 || Dim2<0 || Dim3<0 || Dim4<0 || Dim5<0 ) return(-1); theVar = gParse.Nodes + Var; if( theVar->operation==CONST_OP || theVar->value.nelem==1 ) { yyerror("Cannot index a scalar value"); return(-1); } n = Alloc_Node(); if( n>=0 ) { this = gParse.Nodes + n; this->nSubNodes = nDim+1; theVar = gParse.Nodes + (this->SubNodes[0]=Var); theDim[0] = gParse.Nodes + (this->SubNodes[1]=Dim1); theDim[1] = gParse.Nodes + (this->SubNodes[2]=Dim2); theDim[2] = gParse.Nodes + (this->SubNodes[3]=Dim3); theDim[3] = gParse.Nodes + (this->SubNodes[4]=Dim4); theDim[4] = gParse.Nodes + (this->SubNodes[5]=Dim5); constant = theVar->operation==CONST_OP; for( idx=0; idxoperation==CONST_OP); for( idx=0; idxvalue.nelem>1 ) { Free_Last_Node(); yyerror("Cannot use an array as an index value"); return(-1); } else if( theDim[idx]->type!=LONG ) { Free_Last_Node(); yyerror("Index value must be an integer type"); return(-1); } this->operation = '['; this->DoOp = Do_Deref; this->type = theVar->type; if( theVar->value.naxis == nDim ) { /* All dimensions specified */ this->value.nelem = 1; this->value.naxis = 1; this->value.naxes[0] = 1; } else if( nDim==1 ) { /* Dereference only one dimension */ elem=1; this->value.naxis = theVar->value.naxis-1; for( idx=0; idxvalue.naxis; idx++ ) { elem *= ( this->value.naxes[idx] = theVar->value.naxes[idx] ); } this->value.nelem = elem; } else { Free_Last_Node(); yyerror("Must specify just one or all indices for vector"); return(-1); } if( constant ) this->DoOp( this ); } return(n); } extern int yyGetVariable( char *varName, YYSTYPE *varVal ); static int New_GTI( char *fname, int Node1, char *start, char *stop ) { fitsfile *fptr; Node *this, *that0, *that1; int type,i,n, startCol, stopCol, Node0; int hdutype, hdunum, evthdu, samefile, extvers, movetotype, tstat; char extname[100]; long nrows; double timeZeroI[2], timeZeroF[2], dt, timeSpan; char xcol[20], xexpr[20]; YYSTYPE colVal; if( Node1==-99 ) { type = yyGetVariable( "TIME", &colVal ); if( type==COLUMN ) { Node1 = New_Column( (int)colVal.lng ); } else { yyerror("Could not build TIME column for GTIFILTER"); return(-1); } } Node1 = New_Unary( DOUBLE, 0, Node1 ); Node0 = Alloc_Node(); /* This will hold the START/STOP times */ if( Node1<0 || Node0<0 ) return(-1); /* Record current HDU number in case we need to move within this file */ fptr = gParse.def_fptr; ffghdn( fptr, &evthdu ); /* Look for TIMEZERO keywords in current extension */ tstat = 0; if( ffgkyd( fptr, "TIMEZERO", timeZeroI, NULL, &tstat ) ) { tstat = 0; if( ffgkyd( fptr, "TIMEZERI", timeZeroI, NULL, &tstat ) ) { timeZeroI[0] = timeZeroF[0] = 0.0; } else if( ffgkyd( fptr, "TIMEZERF", timeZeroF, NULL, &tstat ) ) { timeZeroF[0] = 0.0; } } else { timeZeroF[0] = 0.0; } /* Resolve filename parameter */ switch( fname[0] ) { case '\0': samefile = 1; hdunum = 1; break; case '[': samefile = 1; i = 1; while( fname[i] != '\0' && fname[i] != ']' ) i++; if( fname[i] ) { fname[i] = '\0'; fname++; ffexts( fname, &hdunum, extname, &extvers, &movetotype, xcol, xexpr, &gParse.status ); if( *extname ) { ffmnhd( fptr, movetotype, extname, extvers, &gParse.status ); ffghdn( fptr, &hdunum ); } else if( hdunum ) { ffmahd( fptr, ++hdunum, &hdutype, &gParse.status ); } else if( !gParse.status ) { yyerror("Cannot use primary array for GTI filter"); return( -1 ); } } else { yyerror("File extension specifier lacks closing ']'"); return( -1 ); } break; case '+': samefile = 1; hdunum = atoi( fname ) + 1; if( hdunum>1 ) ffmahd( fptr, hdunum, &hdutype, &gParse.status ); else { yyerror("Cannot use primary array for GTI filter"); return( -1 ); } break; default: samefile = 0; if( ! ffopen( &fptr, fname, READONLY, &gParse.status ) ) ffghdn( fptr, &hdunum ); break; } if( gParse.status ) return(-1); /* If at primary, search for GTI extension */ if( hdunum==1 ) { while( 1 ) { hdunum++; if( ffmahd( fptr, hdunum, &hdutype, &gParse.status ) ) break; if( hdutype==IMAGE_HDU ) continue; tstat = 0; if( ffgkys( fptr, "EXTNAME", extname, NULL, &tstat ) ) continue; ffupch( extname ); if( strstr( extname, "GTI" ) ) break; } if( gParse.status ) { if( gParse.status==END_OF_FILE ) yyerror("GTI extension not found in this file"); return(-1); } } /* Locate START/STOP Columns */ ffgcno( fptr, CASEINSEN, start, &startCol, &gParse.status ); ffgcno( fptr, CASEINSEN, stop, &stopCol, &gParse.status ); if( gParse.status ) return(-1); /* Look for TIMEZERO keywords in GTI extension */ tstat = 0; if( ffgkyd( fptr, "TIMEZERO", timeZeroI+1, NULL, &tstat ) ) { tstat = 0; if( ffgkyd( fptr, "TIMEZERI", timeZeroI+1, NULL, &tstat ) ) { timeZeroI[1] = timeZeroF[1] = 0.0; } else if( ffgkyd( fptr, "TIMEZERF", timeZeroF+1, NULL, &tstat ) ) { timeZeroF[1] = 0.0; } } else { timeZeroF[1] = 0.0; } n = Alloc_Node(); if( n >= 0 ) { this = gParse.Nodes + n; this->nSubNodes = 2; this->SubNodes[1] = Node1; this->operation = (int)gtifilt_fct; this->DoOp = Do_GTI; this->type = BOOLEAN; that1 = gParse.Nodes + Node1; this->value.nelem = that1->value.nelem; this->value.naxis = that1->value.naxis; for( i=0; i < that1->value.naxis; i++ ) this->value.naxes[i] = that1->value.naxes[i]; /* Init START/STOP node to be treated as a "constant" */ this->SubNodes[0] = Node0; that0 = gParse.Nodes + Node0; that0->operation = CONST_OP; that0->DoOp = NULL; that0->value.data.ptr= NULL; /* Read in START/STOP times */ if( ffgkyj( fptr, "NAXIS2", &nrows, NULL, &gParse.status ) ) return(-1); that0->value.nelem = nrows; if( nrows ) { that0->value.data.dblptr = (double*)malloc( 2*nrows*sizeof(double) ); if( !that0->value.data.dblptr ) { gParse.status = MEMORY_ALLOCATION; return(-1); } ffgcvd( fptr, startCol, 1L, 1L, nrows, 0.0, that0->value.data.dblptr, &i, &gParse.status ); ffgcvd( fptr, stopCol, 1L, 1L, nrows, 0.0, that0->value.data.dblptr+nrows, &i, &gParse.status ); if( gParse.status ) { free( that0->value.data.dblptr ); return(-1); } /* Test for fully time-ordered GTI... both START && STOP */ that0->type = 1; /* Assume yes */ i = nrows; while( --i ) if( that0->value.data.dblptr[i-1] >= that0->value.data.dblptr[i] || that0->value.data.dblptr[i-1+nrows] >= that0->value.data.dblptr[i+nrows] ) { that0->type = 0; break; } /* Handle TIMEZERO offset, if any */ dt = (timeZeroI[1] - timeZeroI[0]) + (timeZeroF[1] - timeZeroF[0]); timeSpan = that0->value.data.dblptr[nrows+nrows-1] - that0->value.data.dblptr[0]; if( fabs( dt / timeSpan ) > 1e-12 ) { for( i=0; i<(nrows+nrows); i++ ) that0->value.data.dblptr[i] += dt; } } if( OPER(Node1)==CONST_OP ) this->DoOp( this ); } if( samefile ) ffmahd( fptr, evthdu, &hdutype, &gParse.status ); else ffclos( fptr, &gParse.status ); return( n ); } static int New_REG( char *fname, int NodeX, int NodeY, char *colNames ) { Node *this, *that0; int type, n, Node0; int Xcol, Ycol, tstat; WCSdata wcs; SAORegion *Rgn; char *cX, *cY; YYSTYPE colVal; if( NodeX==-99 ) { type = yyGetVariable( "X", &colVal ); if( type==COLUMN ) { NodeX = New_Column( (int)colVal.lng ); } else { yyerror("Could not build X column for REGFILTER"); return(-1); } } if( NodeY==-99 ) { type = yyGetVariable( "Y", &colVal ); if( type==COLUMN ) { NodeY = New_Column( (int)colVal.lng ); } else { yyerror("Could not build Y column for REGFILTER"); return(-1); } } NodeX = New_Unary( DOUBLE, 0, NodeX ); NodeY = New_Unary( DOUBLE, 0, NodeY ); Node0 = Alloc_Node(); /* This will hold the Region Data */ if( NodeX<0 || NodeY<0 || Node0<0 ) return(-1); if( ! (Test_Dims( NodeX, NodeY ) ) ) { yyerror("Dimensions of REGFILTER arguments are not compatible"); return (-1); } n = Alloc_Node(); if( n >= 0 ) { this = gParse.Nodes + n; this->nSubNodes = 3; this->SubNodes[0] = Node0; this->SubNodes[1] = NodeX; this->SubNodes[2] = NodeY; this->operation = (int)regfilt_fct; this->DoOp = Do_REG; this->type = BOOLEAN; this->value.nelem = 1; this->value.naxis = 1; this->value.naxes[0] = 1; Copy_Dims(n, NodeX); if( SIZE(NodeX)operation = CONST_OP; that0->DoOp = NULL; /* Identify what columns to use for WCS information */ Xcol = Ycol = 0; if( *colNames ) { /* Use the column names in this string for WCS info */ while( *colNames==' ' ) colNames++; cX = cY = colNames; while( *cY && *cY!=' ' && *cY!=',' ) cY++; if( *cY ) *(cY++) = '\0'; while( *cY==' ' ) cY++; if( !*cY ) { yyerror("Could not extract valid pair of column names from REGFILTER"); Free_Last_Node(); return( -1 ); } fits_get_colnum( gParse.def_fptr, CASEINSEN, cX, &Xcol, &gParse.status ); fits_get_colnum( gParse.def_fptr, CASEINSEN, cY, &Ycol, &gParse.status ); if( gParse.status ) { yyerror("Could not locate columns indicated for WCS info"); Free_Last_Node(); return( -1 ); } } else { /* Try to find columns used in X/Y expressions */ Xcol = Locate_Col( gParse.Nodes + NodeX ); Ycol = Locate_Col( gParse.Nodes + NodeY ); if( Xcol<0 || Ycol<0 ) { yyerror("Found multiple X/Y column references in REGFILTER"); Free_Last_Node(); return( -1 ); } } /* Now, get the WCS info, if it exists, from the indicated columns */ wcs.exists = 0; if( Xcol>0 && Ycol>0 ) { tstat = 0; ffgtcs( gParse.def_fptr, Xcol, Ycol, &wcs.xrefval, &wcs.yrefval, &wcs.xrefpix, &wcs.yrefpix, &wcs.xinc, &wcs.yinc, &wcs.rot, wcs.type, &tstat ); if( tstat==NO_WCS_KEY ) { wcs.exists = 0; } else if( tstat ) { gParse.status = tstat; Free_Last_Node(); return( -1 ); } else { wcs.exists = 1; } } /* Read in Region file */ fits_read_rgnfile( fname, &wcs, &Rgn, &gParse.status ); if( gParse.status ) { Free_Last_Node(); return( -1 ); } that0->value.data.ptr = Rgn; if( OPER(NodeX)==CONST_OP && OPER(NodeY)==CONST_OP ) this->DoOp( this ); } return( n ); } static int New_Vector( int subNode ) { Node *this, *that; int n; n = Alloc_Node(); if( n >= 0 ) { this = gParse.Nodes + n; that = gParse.Nodes + subNode; this->type = that->type; this->nSubNodes = 1; this->SubNodes[0] = subNode; this->operation = '{'; this->DoOp = Do_Vector; } return( n ); } static int Close_Vec( int vecNode ) { Node *this; int n, nelem=0; this = gParse.Nodes + vecNode; for( n=0; n < this->nSubNodes; n++ ) { if( TYPE( this->SubNodes[n] ) != this->type ) { this->SubNodes[n] = New_Unary( this->type, 0, this->SubNodes[n] ); if( this->SubNodes[n]<0 ) return(-1); } nelem += SIZE(this->SubNodes[n]); } this->value.naxis = 1; this->value.nelem = nelem; this->value.naxes[0] = nelem; return( vecNode ); } static int Locate_Col( Node *this ) /* Locate the TABLE column number of any columns in "this" calculation. */ /* Return ZERO if none found, or negative if more than 1 found. */ { Node *that; int i, col=0, newCol, nfound=0; if( this->nSubNodes==0 && this->operation<=0 && this->operation!=CONST_OP ) return gParse.colData[ - this->operation].colnum; for( i=0; inSubNodes; i++ ) { that = gParse.Nodes + this->SubNodes[i]; if( that->operation>0 ) { newCol = Locate_Col( that ); if( newCol<=0 ) { nfound += -newCol; } else { if( !nfound ) { col = newCol; nfound++; } else if( col != newCol ) { nfound++; } } } else if( that->operation!=CONST_OP ) { /* Found a Column */ newCol = gParse.colData[- that->operation].colnum; if( !nfound ) { col = newCol; nfound++; } else if( col != newCol ) { nfound++; } } } if( nfound!=1 ) return( - nfound ); else return( col ); } static int Test_Dims( int Node1, int Node2 ) { Node *that1, *that2; int valid, i; if( Node1<0 || Node2<0 ) return(0); that1 = gParse.Nodes + Node1; that2 = gParse.Nodes + Node2; if( that1->value.nelem==1 || that2->value.nelem==1 ) valid = 1; else if( that1->type==that2->type && that1->value.nelem==that2->value.nelem && that1->value.naxis==that2->value.naxis ) { valid = 1; for( i=0; ivalue.naxis; i++ ) { if( that1->value.naxes[i]!=that2->value.naxes[i] ) valid = 0; } } else valid = 0; return( valid ); } static void Copy_Dims( int Node1, int Node2 ) { Node *that1, *that2; int i; if( Node1<0 || Node2<0 ) return; that1 = gParse.Nodes + Node1; that2 = gParse.Nodes + Node2; that1->value.nelem = that2->value.nelem; that1->value.naxis = that2->value.naxis; for( i=0; ivalue.naxis; i++ ) that1->value.naxes[i] = that2->value.naxes[i]; } /********************************************************************/ /* Routines for actually evaluating the expression start here */ /********************************************************************/ void Evaluate_Parser( long firstRow, long nRows ) /***********************************************************************/ /* Reset the parser for processing another batch of data... */ /* firstRow: Row number of the first element to evaluate */ /* nRows: Number of rows to be processed */ /* Initialize each COLUMN node so that its UNDEF and DATA pointers */ /* point to the appropriate column arrays. */ /* Finally, call Evaluate_Node for final node. */ /***********************************************************************/ { int i, column; long offset, rowOffset; gParse.firstRow = firstRow; gParse.nRows = nRows; /* Reset Column Nodes' pointers to point to right data and UNDEF arrays */ rowOffset = firstRow - gParse.firstDataRow; for( i=0; i 0 || OPER(i) == CONST_OP ) continue; column = -OPER(i); offset = gParse.varData[column].nelem * rowOffset; gParse.Nodes[i].value.undef = gParse.varData[column].undef + offset; switch( gParse.Nodes[i].type ) { case BITSTR: gParse.Nodes[i].value.data.strptr = (char**)gParse.varData[column].data + rowOffset; gParse.Nodes[i].value.undef = NULL; break; case STRING: gParse.Nodes[i].value.data.strptr = (char**)gParse.varData[column].data + rowOffset; gParse.Nodes[i].value.undef = gParse.varData[column].undef + rowOffset; break; case BOOLEAN: gParse.Nodes[i].value.data.logptr = (char*)gParse.varData[column].data + offset; break; case LONG: gParse.Nodes[i].value.data.lngptr = (long*)gParse.varData[column].data + offset; break; case DOUBLE: gParse.Nodes[i].value.data.dblptr = (double*)gParse.varData[column].data + offset; break; } } Evaluate_Node( gParse.resultNode ); } static void Evaluate_Node( int thisNode ) /**********************************************************************/ /* Recursively evaluate thisNode's subNodes, then call one of the */ /* Do_ functions pointed to by thisNode's DoOp element. */ /**********************************************************************/ { Node *this; int i; if( gParse.status ) return; this = gParse.Nodes + thisNode; if( this->operation>0 ) { /* <=0 indicate constants and columns */ i = this->nSubNodes; while( i-- ) { Evaluate_Node( this->SubNodes[i] ); if( gParse.status ) return; } this->DoOp( this ); } } static void Allocate_Ptrs( Node *this ) { long elem, row, size; if( this->type==BITSTR || this->type==STRING ) { this->value.data.strptr = (char**)malloc( gParse.nRows * sizeof(char*) ); if( this->value.data.strptr ) { this->value.data.strptr[0] = (char*)malloc( gParse.nRows * (this->value.nelem+2) * sizeof(char) ); if( this->value.data.strptr[0] ) { row = 0; while( (++row)value.data.strptr[row] = this->value.data.strptr[row-1] + this->value.nelem+1; } if( this->type==STRING ) { this->value.undef = this->value.data.strptr[row-1] + this->value.nelem+1; } else { this->value.undef = NULL; /* BITSTRs don't use undef array */ } } else { gParse.status = MEMORY_ALLOCATION; free( this->value.data.strptr ); } } else { gParse.status = MEMORY_ALLOCATION; } } else { elem = this->value.nelem * gParse.nRows; switch( this->type ) { case DOUBLE: size = sizeof( double ); break; case LONG: size = sizeof( long ); break; case BOOLEAN: size = sizeof( char ); break; default: size = 1; break; } this->value.data.ptr = calloc(size+1, elem); if( this->value.data.ptr==NULL ) { gParse.status = MEMORY_ALLOCATION; } else { this->value.undef = (char *)this->value.data.ptr + elem*size; } } } static void Do_Unary( Node *this ) { Node *that; long elem; that = gParse.Nodes + this->SubNodes[0]; if( that->operation==CONST_OP ) { /* Operating on a constant! */ switch( this->operation ) { case DOUBLE: case FLTCAST: if( that->type==LONG ) this->value.data.dbl = (double)that->value.data.lng; else if( that->type==BOOLEAN ) this->value.data.dbl = ( that->value.data.log ? 1.0 : 0.0 ); break; case LONG: case INTCAST: if( that->type==DOUBLE ) this->value.data.lng = (long)that->value.data.dbl; else if( that->type==BOOLEAN ) this->value.data.lng = ( that->value.data.log ? 1L : 0L ); break; case BOOLEAN: if( that->type==DOUBLE ) this->value.data.log = ( that->value.data.dbl != 0.0 ); else if( that->type==LONG ) this->value.data.log = ( that->value.data.lng != 0L ); break; case UMINUS: if( that->type==DOUBLE ) this->value.data.dbl = - that->value.data.dbl; else if( that->type==LONG ) this->value.data.lng = - that->value.data.lng; break; case NOT: if( that->type==BOOLEAN ) this->value.data.log = ( ! that->value.data.log ); else if( that->type==BITSTR ) bitnot( this->value.data.str, that->value.data.str ); break; } this->operation = CONST_OP; } else { Allocate_Ptrs( this ); if( !gParse.status ) { if( this->type!=BITSTR ) { elem = gParse.nRows; if( this->type!=STRING ) elem *= this->value.nelem; while( elem-- ) this->value.undef[elem] = that->value.undef[elem]; } elem = gParse.nRows * this->value.nelem; switch( this->operation ) { case BOOLEAN: if( that->type==DOUBLE ) while( elem-- ) this->value.data.logptr[elem] = ( that->value.data.dblptr[elem] != 0.0 ); else if( that->type==LONG ) while( elem-- ) this->value.data.logptr[elem] = ( that->value.data.lngptr[elem] != 0L ); break; case DOUBLE: case FLTCAST: if( that->type==LONG ) while( elem-- ) this->value.data.dblptr[elem] = (double)that->value.data.lngptr[elem]; else if( that->type==BOOLEAN ) while( elem-- ) this->value.data.dblptr[elem] = ( that->value.data.logptr[elem] ? 1.0 : 0.0 ); break; case LONG: case INTCAST: if( that->type==DOUBLE ) while( elem-- ) this->value.data.lngptr[elem] = (long)that->value.data.dblptr[elem]; else if( that->type==BOOLEAN ) while( elem-- ) this->value.data.lngptr[elem] = ( that->value.data.logptr[elem] ? 1L : 0L ); break; case UMINUS: if( that->type==DOUBLE ) { while( elem-- ) this->value.data.dblptr[elem] = - that->value.data.dblptr[elem]; } else if( that->type==LONG ) { while( elem-- ) this->value.data.lngptr[elem] = - that->value.data.lngptr[elem]; } break; case NOT: if( that->type==BOOLEAN ) { while( elem-- ) this->value.data.logptr[elem] = ( ! that->value.data.logptr[elem] ); } else if( that->type==BITSTR ) { elem = gParse.nRows; while( elem-- ) bitnot( this->value.data.strptr[elem], that->value.data.strptr[elem] ); } break; } } } if( that->operation>0 ) { free( that->value.data.ptr ); } } static void Do_Offset( Node *this ) { Node *col; long fRow, nRowOverlap, nRowReload, rowOffset; long nelem, elem, offset, nRealElem; int status; col = gParse.Nodes + this->SubNodes[0]; rowOffset = gParse.Nodes[ this->SubNodes[1] ].value.data.lng; Allocate_Ptrs( this ); fRow = gParse.firstRow + rowOffset; if( this->type==STRING || this->type==BITSTR ) nRealElem = 1; else nRealElem = this->value.nelem; nelem = nRealElem; if( fRow < gParse.firstDataRow ) { /* Must fill in data at start of array */ nRowReload = gParse.firstDataRow - fRow; if( nRowReload > gParse.nRows ) nRowReload = gParse.nRows; nRowOverlap = gParse.nRows - nRowReload; offset = 0; /* NULLify any values falling out of bounds */ while( fRow<1 && nRowReload>0 ) { if( this->type == BITSTR ) { nelem = this->value.nelem; this->value.data.strptr[offset][ nelem ] = '\0'; while( nelem-- ) this->value.data.strptr[offset][nelem] = '0'; offset++; } else { while( nelem-- ) this->value.undef[offset++] = 1; } nelem = nRealElem; fRow++; nRowReload--; } } else if( fRow + gParse.nRows > gParse.firstDataRow + gParse.nDataRows ) { /* Must fill in data at end of array */ nRowReload = (fRow+gParse.nRows) - (gParse.firstDataRow+gParse.nDataRows); if( nRowReload>gParse.nRows ) { nRowReload = gParse.nRows; } else { fRow = gParse.firstDataRow + gParse.nDataRows; } nRowOverlap = gParse.nRows - nRowReload; offset = nRowOverlap * nelem; /* NULLify any values falling out of bounds */ elem = gParse.nRows * nelem; while( fRow+nRowReload>gParse.totalRows && nRowReload>0 ) { if( this->type == BITSTR ) { nelem = this->value.nelem; elem--; this->value.data.strptr[elem][ nelem ] = '\0'; while( nelem-- ) this->value.data.strptr[elem][nelem] = '0'; } else { while( nelem-- ) this->value.undef[--elem] = 1; } nelem = nRealElem; nRowReload--; } } else { nRowReload = 0; nRowOverlap = gParse.nRows; offset = 0; } if( nRowReload>0 ) { switch( this->type ) { case BITSTR: case STRING: status = (*gParse.loadData)( -col->operation, fRow, nRowReload, this->value.data.strptr+offset, this->value.undef+offset ); break; case BOOLEAN: status = (*gParse.loadData)( -col->operation, fRow, nRowReload, this->value.data.logptr+offset, this->value.undef+offset ); break; case LONG: status = (*gParse.loadData)( -col->operation, fRow, nRowReload, this->value.data.lngptr+offset, this->value.undef+offset ); break; case DOUBLE: status = (*gParse.loadData)( -col->operation, fRow, nRowReload, this->value.data.dblptr+offset, this->value.undef+offset ); break; } } /* Now copy over the overlapping region, if any */ if( nRowOverlap <= 0 ) return; if( rowOffset>0 ) elem = nRowOverlap * nelem; else elem = gParse.nRows * nelem; offset = nelem * rowOffset; while( nRowOverlap-- && !gParse.status ) { while( nelem-- && !gParse.status ) { elem--; if( this->type != BITSTR ) this->value.undef[elem] = col->value.undef[elem+offset]; switch( this->type ) { case BITSTR: strcpy( this->value.data.strptr[elem ], col->value.data.strptr[elem+offset] ); break; case STRING: strcpy( this->value.data.strptr[elem ], col->value.data.strptr[elem+offset] ); break; case BOOLEAN: this->value.data.logptr[elem] = col->value.data.logptr[elem+offset]; break; case LONG: this->value.data.lngptr[elem] = col->value.data.lngptr[elem+offset]; break; case DOUBLE: this->value.data.dblptr[elem] = col->value.data.dblptr[elem+offset]; break; } } nelem = nRealElem; } } static void Do_BinOp_bit( Node *this ) { Node *that1, *that2; char *sptr1=NULL, *sptr2=NULL; int const1, const2; long rows; that1 = gParse.Nodes + this->SubNodes[0]; that2 = gParse.Nodes + this->SubNodes[1]; const1 = ( that1->operation==CONST_OP ); const2 = ( that2->operation==CONST_OP ); sptr1 = ( const1 ? that1->value.data.str : NULL ); sptr2 = ( const2 ? that2->value.data.str : NULL ); if( const1 && const2 ) { switch( this->operation ) { case NE: this->value.data.log = !bitcmp( sptr1, sptr2 ); break; case EQ: this->value.data.log = bitcmp( sptr1, sptr2 ); break; case GT: case LT: case LTE: case GTE: this->value.data.log = bitlgte( sptr1, this->operation, sptr2 ); break; case '|': bitor( this->value.data.str, sptr1, sptr2 ); break; case '&': bitand( this->value.data.str, sptr1, sptr2 ); break; case '+': strcpy( this->value.data.str, sptr1 ); strcat( this->value.data.str, sptr2 ); break; case ACCUM: this->value.data.lng = 0; while( *sptr1 ) { if ( *sptr1 == '1' ) this->value.data.lng ++; sptr1 ++; } break; } this->operation = CONST_OP; } else { Allocate_Ptrs( this ); if( !gParse.status ) { rows = gParse.nRows; switch( this->operation ) { /* BITSTR comparisons */ case NE: case EQ: case GT: case LT: case LTE: case GTE: while( rows-- ) { if( !const1 ) sptr1 = that1->value.data.strptr[rows]; if( !const2 ) sptr2 = that2->value.data.strptr[rows]; switch( this->operation ) { case NE: this->value.data.logptr[rows] = !bitcmp( sptr1, sptr2 ); break; case EQ: this->value.data.logptr[rows] = bitcmp( sptr1, sptr2 ); break; case GT: case LT: case LTE: case GTE: this->value.data.logptr[rows] = bitlgte( sptr1, this->operation, sptr2 ); break; } this->value.undef[rows] = 0; } break; /* BITSTR AND/ORs ... no UNDEFS in or out */ case '|': case '&': case '+': while( rows-- ) { if( !const1 ) sptr1 = that1->value.data.strptr[rows]; if( !const2 ) sptr2 = that2->value.data.strptr[rows]; if( this->operation=='|' ) bitor( this->value.data.strptr[rows], sptr1, sptr2 ); else if( this->operation=='&' ) bitand( this->value.data.strptr[rows], sptr1, sptr2 ); else { strcpy( this->value.data.strptr[rows], sptr1 ); strcat( this->value.data.strptr[rows], sptr2 ); } } break; /* Accumulate 1 bits */ case ACCUM: { long i, previous, curr; previous = that2->value.data.lng; /* Cumulative sum of this chunk */ for (i=0; ivalue.data.strptr[i]; for (curr = 0; *sptr1; sptr1 ++) { if ( *sptr1 == '1' ) curr ++; } previous += curr; this->value.data.lngptr[i] = previous; this->value.undef[i] = 0; } /* Store final cumulant for next pass */ that2->value.data.lng = previous; } } } } if( that1->operation>0 ) { free( that1->value.data.strptr[0] ); free( that1->value.data.strptr ); } if( that2->operation>0 ) { free( that2->value.data.strptr[0] ); free( that2->value.data.strptr ); } } static void Do_BinOp_str( Node *this ) { Node *that1, *that2; char *sptr1, *sptr2, null1=0, null2=0; int const1, const2, val; long rows; that1 = gParse.Nodes + this->SubNodes[0]; that2 = gParse.Nodes + this->SubNodes[1]; const1 = ( that1->operation==CONST_OP ); const2 = ( that2->operation==CONST_OP ); sptr1 = ( const1 ? that1->value.data.str : NULL ); sptr2 = ( const2 ? that2->value.data.str : NULL ); if( const1 && const2 ) { /* Result is a constant */ switch( this->operation ) { /* Compare Strings */ case NE: case EQ: val = ( FSTRCMP( sptr1, sptr2 ) == 0 ); this->value.data.log = ( this->operation==EQ ? val : !val ); break; case GT: this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) > 0 ); break; case LT: this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) < 0 ); break; case GTE: this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) >= 0 ); break; case LTE: this->value.data.log = ( FSTRCMP( sptr1, sptr2 ) <= 0 ); break; /* Concat Strings */ case '+': strcpy( this->value.data.str, sptr1 ); strcat( this->value.data.str, sptr2 ); break; } this->operation = CONST_OP; } else { /* Not a constant */ Allocate_Ptrs( this ); if( !gParse.status ) { rows = gParse.nRows; switch( this->operation ) { /* Compare Strings */ case NE: case EQ: while( rows-- ) { if( !const1 ) null1 = that1->value.undef[rows]; if( !const2 ) null2 = that2->value.undef[rows]; this->value.undef[rows] = (null1 || null2); if( ! this->value.undef[rows] ) { if( !const1 ) sptr1 = that1->value.data.strptr[rows]; if( !const2 ) sptr2 = that2->value.data.strptr[rows]; val = ( FSTRCMP( sptr1, sptr2 ) == 0 ); this->value.data.logptr[rows] = ( this->operation==EQ ? val : !val ); } } break; case GT: case LT: while( rows-- ) { if( !const1 ) null1 = that1->value.undef[rows]; if( !const2 ) null2 = that2->value.undef[rows]; this->value.undef[rows] = (null1 || null2); if( ! this->value.undef[rows] ) { if( !const1 ) sptr1 = that1->value.data.strptr[rows]; if( !const2 ) sptr2 = that2->value.data.strptr[rows]; val = ( FSTRCMP( sptr1, sptr2 ) ); this->value.data.logptr[rows] = ( this->operation==GT ? val>0 : val<0 ); } } break; case GTE: case LTE: while( rows-- ) { if( !const1 ) null1 = that1->value.undef[rows]; if( !const2 ) null2 = that2->value.undef[rows]; this->value.undef[rows] = (null1 || null2); if( ! this->value.undef[rows] ) { if( !const1 ) sptr1 = that1->value.data.strptr[rows]; if( !const2 ) sptr2 = that2->value.data.strptr[rows]; val = ( FSTRCMP( sptr1, sptr2 ) ); this->value.data.logptr[rows] = ( this->operation==GTE ? val>=0 : val<=0 ); } } break; /* Concat Strings */ case '+': while( rows-- ) { if( !const1 ) null1 = that1->value.undef[rows]; if( !const2 ) null2 = that2->value.undef[rows]; this->value.undef[rows] = (null1 || null2); if( ! this->value.undef[rows] ) { if( !const1 ) sptr1 = that1->value.data.strptr[rows]; if( !const2 ) sptr2 = that2->value.data.strptr[rows]; strcpy( this->value.data.strptr[rows], sptr1 ); strcat( this->value.data.strptr[rows], sptr2 ); } } break; } } } if( that1->operation>0 ) { free( that1->value.data.strptr[0] ); free( that1->value.data.strptr ); } if( that2->operation>0 ) { free( that2->value.data.strptr[0] ); free( that2->value.data.strptr ); } } static void Do_BinOp_log( Node *this ) { Node *that1, *that2; int vector1, vector2; char val1=0, val2=0, null1=0, null2=0; long rows, nelem, elem; that1 = gParse.Nodes + this->SubNodes[0]; that2 = gParse.Nodes + this->SubNodes[1]; vector1 = ( that1->operation!=CONST_OP ); if( vector1 ) vector1 = that1->value.nelem; else { val1 = that1->value.data.log; } vector2 = ( that2->operation!=CONST_OP ); if( vector2 ) vector2 = that2->value.nelem; else { val2 = that2->value.data.log; } if( !vector1 && !vector2 ) { /* Result is a constant */ switch( this->operation ) { case OR: this->value.data.log = (val1 || val2); break; case AND: this->value.data.log = (val1 && val2); break; case EQ: this->value.data.log = ( (val1 && val2) || (!val1 && !val2) ); break; case NE: this->value.data.log = ( (val1 && !val2) || (!val1 && val2) ); break; case ACCUM: this->value.data.lng = val1; break; } this->operation=CONST_OP; } else if (this->operation == ACCUM) { long i, previous, curr; rows = gParse.nRows; nelem = this->value.nelem; elem = this->value.nelem * rows; Allocate_Ptrs( this ); if( !gParse.status ) { previous = that2->value.data.lng; /* Cumulative sum of this chunk */ for (i=0; ivalue.undef[i]) { curr = that1->value.data.logptr[i]; previous += curr; } this->value.data.lngptr[i] = previous; this->value.undef[i] = 0; } /* Store final cumulant for next pass */ that2->value.data.lng = previous; } } else { rows = gParse.nRows; nelem = this->value.nelem; elem = this->value.nelem * rows; Allocate_Ptrs( this ); if( !gParse.status ) { if (this->operation == ACCUM) { long i, previous, curr; previous = that2->value.data.lng; /* Cumulative sum of this chunk */ for (i=0; ivalue.undef[i]) { curr = that1->value.data.logptr[i]; previous += curr; } this->value.data.lngptr[i] = previous; this->value.undef[i] = 0; } /* Store final cumulant for next pass */ that2->value.data.lng = previous; } while( rows-- ) { while( nelem-- ) { elem--; if( vector1>1 ) { val1 = that1->value.data.logptr[elem]; null1 = that1->value.undef[elem]; } else if( vector1 ) { val1 = that1->value.data.logptr[rows]; null1 = that1->value.undef[rows]; } if( vector2>1 ) { val2 = that2->value.data.logptr[elem]; null2 = that2->value.undef[elem]; } else if( vector2 ) { val2 = that2->value.data.logptr[rows]; null2 = that2->value.undef[rows]; } this->value.undef[elem] = (null1 || null2); switch( this->operation ) { case OR: /* This is more complicated than others to suppress UNDEFs */ /* in those cases where the other argument is DEF && TRUE */ if( !null1 && !null2 ) { this->value.data.logptr[elem] = (val1 || val2); } else if( (null1 && !null2 && val2) || ( !null1 && null2 && val1 ) ) { this->value.data.logptr[elem] = 1; this->value.undef[elem] = 0; } break; case AND: /* This is more complicated than others to suppress UNDEFs */ /* in those cases where the other argument is DEF && FALSE */ if( !null1 && !null2 ) { this->value.data.logptr[elem] = (val1 && val2); } else if( (null1 && !null2 && !val2) || ( !null1 && null2 && !val1 ) ) { this->value.data.logptr[elem] = 0; this->value.undef[elem] = 0; } break; case EQ: this->value.data.logptr[elem] = ( (val1 && val2) || (!val1 && !val2) ); break; case NE: this->value.data.logptr[elem] = ( (val1 && !val2) || (!val1 && val2) ); break; } } nelem = this->value.nelem; } } } if( that1->operation>0 ) { free( that1->value.data.ptr ); } if( that2->operation>0 ) { free( that2->value.data.ptr ); } } static void Do_BinOp_lng( Node *this ) { Node *that1, *that2; int vector1, vector2; long val1=0, val2=0; char null1=0, null2=0; long rows, nelem, elem; that1 = gParse.Nodes + this->SubNodes[0]; that2 = gParse.Nodes + this->SubNodes[1]; vector1 = ( that1->operation!=CONST_OP ); if( vector1 ) vector1 = that1->value.nelem; else { val1 = that1->value.data.lng; } vector2 = ( that2->operation!=CONST_OP ); if( vector2 ) vector2 = that2->value.nelem; else { val2 = that2->value.data.lng; } if( !vector1 && !vector2 ) { /* Result is a constant */ switch( this->operation ) { case '~': /* Treat as == for LONGS */ case EQ: this->value.data.log = (val1 == val2); break; case NE: this->value.data.log = (val1 != val2); break; case GT: this->value.data.log = (val1 > val2); break; case LT: this->value.data.log = (val1 < val2); break; case LTE: this->value.data.log = (val1 <= val2); break; case GTE: this->value.data.log = (val1 >= val2); break; case '+': this->value.data.lng = (val1 + val2); break; case '-': this->value.data.lng = (val1 - val2); break; case '*': this->value.data.lng = (val1 * val2); break; case '%': if( val2 ) this->value.data.lng = (val1 % val2); else yyerror("Divide by Zero"); break; case '/': if( val2 ) this->value.data.lng = (val1 / val2); else yyerror("Divide by Zero"); break; case POWER: this->value.data.lng = (long)pow((double)val1,(double)val2); break; case ACCUM: this->value.data.lng = val1; break; case DIFF: this->value.data.lng = 0; break; } this->operation=CONST_OP; } else if ((this->operation == ACCUM) || (this->operation == DIFF)) { long i, previous, curr; long undef; rows = gParse.nRows; nelem = this->value.nelem; elem = this->value.nelem * rows; Allocate_Ptrs( this ); if( !gParse.status ) { previous = that2->value.data.lng; undef = (long) that2->value.undef; if (this->operation == ACCUM) { /* Cumulative sum of this chunk */ for (i=0; ivalue.undef[i]) { curr = that1->value.data.lngptr[i]; previous += curr; } this->value.data.lngptr[i] = previous; this->value.undef[i] = 0; } } else { /* Sequential difference for this chunk */ for (i=0; ivalue.data.lngptr[i]; if (that1->value.undef[i] || undef) { /* Either this, or previous, value was undefined */ this->value.data.lngptr[i] = 0; this->value.undef[i] = 1; } else { /* Both defined, we are okay! */ this->value.data.lngptr[i] = curr - previous; this->value.undef[i] = 0; } previous = curr; undef = that1->value.undef[i]; } } /* Store final cumulant for next pass */ that2->value.data.lng = previous; that2->value.undef = (char *) undef; /* XXX evil, but no harm here */ } } else { rows = gParse.nRows; nelem = this->value.nelem; elem = this->value.nelem * rows; Allocate_Ptrs( this ); while( rows-- && !gParse.status ) { while( nelem-- && !gParse.status ) { elem--; if( vector1>1 ) { val1 = that1->value.data.lngptr[elem]; null1 = that1->value.undef[elem]; } else if( vector1 ) { val1 = that1->value.data.lngptr[rows]; null1 = that1->value.undef[rows]; } if( vector2>1 ) { val2 = that2->value.data.lngptr[elem]; null2 = that2->value.undef[elem]; } else if( vector2 ) { val2 = that2->value.data.lngptr[rows]; null2 = that2->value.undef[rows]; } this->value.undef[elem] = (null1 || null2); switch( this->operation ) { case '~': /* Treat as == for LONGS */ case EQ: this->value.data.logptr[elem] = (val1 == val2); break; case NE: this->value.data.logptr[elem] = (val1 != val2); break; case GT: this->value.data.logptr[elem] = (val1 > val2); break; case LT: this->value.data.logptr[elem] = (val1 < val2); break; case LTE: this->value.data.logptr[elem] = (val1 <= val2); break; case GTE: this->value.data.logptr[elem] = (val1 >= val2); break; case '+': this->value.data.lngptr[elem] = (val1 + val2); break; case '-': this->value.data.lngptr[elem] = (val1 - val2); break; case '*': this->value.data.lngptr[elem] = (val1 * val2); break; case '%': if( val2 ) this->value.data.lngptr[elem] = (val1 % val2); else { this->value.data.lngptr[elem] = 0; this->value.undef[elem] = 1; } break; case '/': if( val2 ) this->value.data.lngptr[elem] = (val1 / val2); else { this->value.data.lngptr[elem] = 0; this->value.undef[elem] = 1; } break; case POWER: this->value.data.lngptr[elem] = (long)pow((double)val1,(double)val2); break; } } nelem = this->value.nelem; } } if( that1->operation>0 ) { free( that1->value.data.ptr ); } if( that2->operation>0 ) { free( that2->value.data.ptr ); } } static void Do_BinOp_dbl( Node *this ) { Node *that1, *that2; int vector1, vector2; double val1=0.0, val2=0.0; char null1=0, null2=0; long rows, nelem, elem; that1 = gParse.Nodes + this->SubNodes[0]; that2 = gParse.Nodes + this->SubNodes[1]; vector1 = ( that1->operation!=CONST_OP ); if( vector1 ) vector1 = that1->value.nelem; else { val1 = that1->value.data.dbl; } vector2 = ( that2->operation!=CONST_OP ); if( vector2 ) vector2 = that2->value.nelem; else { val2 = that2->value.data.dbl; } if( !vector1 && !vector2 ) { /* Result is a constant */ switch( this->operation ) { case '~': this->value.data.log = ( fabs(val1-val2) < APPROX ); break; case EQ: this->value.data.log = (val1 == val2); break; case NE: this->value.data.log = (val1 != val2); break; case GT: this->value.data.log = (val1 > val2); break; case LT: this->value.data.log = (val1 < val2); break; case LTE: this->value.data.log = (val1 <= val2); break; case GTE: this->value.data.log = (val1 >= val2); break; case '+': this->value.data.dbl = (val1 + val2); break; case '-': this->value.data.dbl = (val1 - val2); break; case '*': this->value.data.dbl = (val1 * val2); break; case '%': if( val2 ) this->value.data.dbl = val1 - val2*((int)(val1/val2)); else yyerror("Divide by Zero"); break; case '/': if( val2 ) this->value.data.dbl = (val1 / val2); else yyerror("Divide by Zero"); break; case POWER: this->value.data.dbl = (double)pow(val1,val2); break; case ACCUM: this->value.data.dbl = val1; break; case DIFF: this->value.data.dbl = 0; break; } this->operation=CONST_OP; } else if ((this->operation == ACCUM) || (this->operation == DIFF)) { long i; long undef; double previous, curr; rows = gParse.nRows; nelem = this->value.nelem; elem = this->value.nelem * rows; Allocate_Ptrs( this ); if( !gParse.status ) { previous = that2->value.data.dbl; undef = (long) that2->value.undef; if (this->operation == ACCUM) { /* Cumulative sum of this chunk */ for (i=0; ivalue.undef[i]) { curr = that1->value.data.dblptr[i]; previous += curr; } this->value.data.dblptr[i] = previous; this->value.undef[i] = 0; } } else { /* Sequential difference for this chunk */ for (i=0; ivalue.data.dblptr[i]; if (that1->value.undef[i] || undef) { /* Either this, or previous, value was undefined */ this->value.data.dblptr[i] = 0; this->value.undef[i] = 1; } else { /* Both defined, we are okay! */ this->value.data.dblptr[i] = curr - previous; this->value.undef[i] = 0; } previous = curr; undef = that1->value.undef[i]; } } /* Store final cumulant for next pass */ that2->value.data.dbl = previous; that2->value.undef = (char *) undef; /* XXX evil, but no harm here */ } } else { rows = gParse.nRows; nelem = this->value.nelem; elem = this->value.nelem * rows; Allocate_Ptrs( this ); while( rows-- && !gParse.status ) { while( nelem-- && !gParse.status ) { elem--; if( vector1>1 ) { val1 = that1->value.data.dblptr[elem]; null1 = that1->value.undef[elem]; } else if( vector1 ) { val1 = that1->value.data.dblptr[rows]; null1 = that1->value.undef[rows]; } if( vector2>1 ) { val2 = that2->value.data.dblptr[elem]; null2 = that2->value.undef[elem]; } else if( vector2 ) { val2 = that2->value.data.dblptr[rows]; null2 = that2->value.undef[rows]; } this->value.undef[elem] = (null1 || null2); switch( this->operation ) { case '~': this->value.data.logptr[elem] = ( fabs(val1-val2) < APPROX ); break; case EQ: this->value.data.logptr[elem] = (val1 == val2); break; case NE: this->value.data.logptr[elem] = (val1 != val2); break; case GT: this->value.data.logptr[elem] = (val1 > val2); break; case LT: this->value.data.logptr[elem] = (val1 < val2); break; case LTE: this->value.data.logptr[elem] = (val1 <= val2); break; case GTE: this->value.data.logptr[elem] = (val1 >= val2); break; case '+': this->value.data.dblptr[elem] = (val1 + val2); break; case '-': this->value.data.dblptr[elem] = (val1 - val2); break; case '*': this->value.data.dblptr[elem] = (val1 * val2); break; case '%': if( val2 ) this->value.data.dblptr[elem] = val1 - val2*((int)(val1/val2)); else { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } break; case '/': if( val2 ) this->value.data.dblptr[elem] = (val1 / val2); else { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } break; case POWER: this->value.data.dblptr[elem] = (double)pow(val1,val2); break; } } nelem = this->value.nelem; } } if( that1->operation>0 ) { free( that1->value.data.ptr ); } if( that2->operation>0 ) { free( that2->value.data.ptr ); } } /* * This Quickselect routine is based on the algorithm described in * "Numerical recipes in C", Second Edition, * Cambridge University Press, 1992, Section 8.5, ISBN 0-521-43108-5 * This code by Nicolas Devillard - 1998. Public domain. * http://ndevilla.free.fr/median/median/src/quickselect.c */ #define ELEM_SWAP(a,b) { register long t=(a);(a)=(b);(b)=t; } /* * qselect_median_lng - select the median value of a long array * * This routine selects the median value of the long integer array * arr[]. If there are an even number of elements, the "lower median" * is selected. * * The array arr[] is scrambled, so users must operate on a scratch * array if they wish the values to be preserved. * * long arr[] - array of values * int n - number of elements in arr * * RETURNS: the lower median value of arr[] * */ long qselect_median_lng(long arr[], int n) { int low, high ; int median; int middle, ll, hh; low = 0 ; high = n-1 ; median = (low + high) / 2; for (;;) { if (high <= low) { /* One element only */ return arr[median]; } if (high == low + 1) { /* Two elements only */ if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; return arr[median]; } /* Find median of low, middle and high items; swap into position low */ middle = (low + high) / 2; if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; /* Swap low item (now in position middle) into position (low+1) */ ELEM_SWAP(arr[middle], arr[low+1]) ; /* Nibble from each end towards middle, swapping items when stuck */ ll = low + 1; hh = high; for (;;) { do ll++; while (arr[low] > arr[ll]) ; do hh--; while (arr[hh] > arr[low]) ; if (hh < ll) break; ELEM_SWAP(arr[ll], arr[hh]) ; } /* Swap middle item (in position low) back into correct position */ ELEM_SWAP(arr[low], arr[hh]) ; /* Re-set active partition */ if (hh <= median) low = ll; if (hh >= median) high = hh - 1; } } #undef ELEM_SWAP #define ELEM_SWAP(a,b) { register double t=(a);(a)=(b);(b)=t; } /* * qselect_median_dbl - select the median value of a double array * * This routine selects the median value of the double array * arr[]. If there are an even number of elements, the "lower median" * is selected. * * The array arr[] is scrambled, so users must operate on a scratch * array if they wish the values to be preserved. * * double arr[] - array of values * int n - number of elements in arr * * RETURNS: the lower median value of arr[] * */ double qselect_median_dbl(double arr[], int n) { int low, high ; int median; int middle, ll, hh; low = 0 ; high = n-1 ; median = (low + high) / 2; for (;;) { if (high <= low) { /* One element only */ return arr[median] ; } if (high == low + 1) { /* Two elements only */ if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; return arr[median] ; } /* Find median of low, middle and high items; swap into position low */ middle = (low + high) / 2; if (arr[middle] > arr[high]) ELEM_SWAP(arr[middle], arr[high]) ; if (arr[low] > arr[high]) ELEM_SWAP(arr[low], arr[high]) ; if (arr[middle] > arr[low]) ELEM_SWAP(arr[middle], arr[low]) ; /* Swap low item (now in position middle) into position (low+1) */ ELEM_SWAP(arr[middle], arr[low+1]) ; /* Nibble from each end towards middle, swapping items when stuck */ ll = low + 1; hh = high; for (;;) { do ll++; while (arr[low] > arr[ll]) ; do hh--; while (arr[hh] > arr[low]) ; if (hh < ll) break; ELEM_SWAP(arr[ll], arr[hh]) ; } /* Swap middle item (in position low) back into correct position */ ELEM_SWAP(arr[low], arr[hh]) ; /* Re-set active partition */ if (hh <= median) low = ll; if (hh >= median) high = hh - 1; } } #undef ELEM_SWAP /* * angsep_calc - compute angular separation between celestial coordinates * * This routine computes the angular separation between to coordinates * on the celestial sphere (i.e. RA and Dec). Note that all units are * in DEGREES, unlike the other trig functions in the calculator. * * double ra1, dec1 - RA and Dec of the first position in degrees * double ra2, dec2 - RA and Dec of the second position in degrees * * RETURNS: (double) angular separation in degrees * */ double angsep_calc(double ra1, double dec1, double ra2, double dec2) { double cd; static double deg = 0; double a, sdec, sra; if (deg == 0) deg = ((double)4)*atan((double)1)/((double)180); /* deg = 1.0; **** UNCOMMENT IF YOU WANT RADIANS */ /* This (commented out) algorithm uses the Low of Cosines, which becomes unstable for angles less than 0.1 arcsec. cd = sin(dec1*deg)*sin(dec2*deg) + cos(dec1*deg)*cos(dec2*deg)*cos((ra1-ra2)*deg); if (cd < (-1)) cd = -1; if (cd > (+1)) cd = +1; return acos(cd)/deg; */ /* The algorithm is the law of Haversines. This algorithm is stable even when the points are close together. The normal Law of Cosines fails for angles around 0.1 arcsec. */ sra = sin( (ra2 - ra1)*deg / 2 ); sdec = sin( (dec2 - dec1)*deg / 2); a = sdec*sdec + cos(dec1*deg)*cos(dec2*deg)*sra*sra; /* Sanity checking to avoid a range error in the sqrt()'s below */ if (a < 0) { a = 0; } if (a > 1) { a = 1; } return 2.0*atan2(sqrt(a), sqrt(1.0 - a)) / deg; } static double ran1() { static double dval = 0.0; double rndVal; if (dval == 0.0) { if( rand()<32768 && rand()<32768 ) dval = 32768.0; else dval = 2147483648.0; } rndVal = (double)rand(); while( rndVal > dval ) dval *= 2.0; return rndVal/dval; } /* Gaussian deviate routine from Numerical Recipes */ static double gasdev() { static int iset = 0; static double gset; double fac, rsq, v1, v2; if (iset == 0) { do { v1 = 2.0*ran1()-1.0; v2 = 2.0*ran1()-1.0; rsq = v1*v1 + v2*v2; } while (rsq >= 1.0 || rsq == 0.0); fac = sqrt(-2.0*log(rsq)/rsq); gset = v1*fac; iset = 1; return v2*fac; } else { iset = 0; return gset; } } /* lgamma function - from Numerical Recipes */ float gammaln(float xx) /* Returns the value ln Gamma[(xx)] for xx > 0. */ { /* Internal arithmetic will be done in double precision, a nicety that you can omit if five-figure accuracy is good enough. */ double x,y,tmp,ser; static double cof[6]={76.18009172947146,-86.50532032941677, 24.01409824083091,-1.231739572450155, 0.1208650973866179e-2,-0.5395239384953e-5}; int j; y=x=xx; tmp=x+5.5; tmp -= (x+0.5)*log(tmp); ser=1.000000000190015; for (j=0;j<=5;j++) ser += cof[j]/++y; return (float) -tmp+log(2.5066282746310005*ser/x); } /* Poisson deviate - derived from Numerical Recipes */ static long poidev(double xm) { static double sq, alxm, g, oldm = -1.0; static double pi = 0; double em, t, y; if (pi == 0) pi = ((double)4)*atan((double)1); if (xm < 20.0) { if (xm != oldm) { oldm = xm; g = exp(-xm); } em = -1; t = 1.0; do { em += 1; t *= ran1(); } while (t > g); } else { if (xm != oldm) { oldm = xm; sq = sqrt(2.0*xm); alxm = log(xm); g = xm*alxm-gammaln( (float) (xm+1.0)); } do { do { y = tan(pi*ran1()); em = sq*y+xm; } while (em < 0.0); em = floor(em); t = 0.9*(1.0+y*y)*exp(em*alxm-gammaln( (float) (em+1.0) )-g); } while (ran1() > t); } /* Return integer version */ return (long int) floor(em+0.5); } static void Do_Func( Node *this ) { Node *theParams[MAXSUBS]; int vector[MAXSUBS], allConst; lval pVals[MAXSUBS]; char pNull[MAXSUBS]; long ival; double dval; int i, valInit; long row, elem, nelem; i = this->nSubNodes; allConst = 1; while( i-- ) { theParams[i] = gParse.Nodes + this->SubNodes[i]; vector[i] = ( theParams[i]->operation!=CONST_OP ); if( vector[i] ) { allConst = 0; vector[i] = theParams[i]->value.nelem; } else { if( theParams[i]->type==DOUBLE ) { pVals[i].data.dbl = theParams[i]->value.data.dbl; } else if( theParams[i]->type==LONG ) { pVals[i].data.lng = theParams[i]->value.data.lng; } else if( theParams[i]->type==BOOLEAN ) { pVals[i].data.log = theParams[i]->value.data.log; } else strcpy(pVals[i].data.str, theParams[i]->value.data.str); pNull[i] = 0; } } if( this->nSubNodes==0 ) allConst = 0; /* These do produce scalars */ /* Random numbers are *never* constant !! */ if( this->operation == poirnd_fct ) allConst = 0; if( this->operation == gasrnd_fct ) allConst = 0; if( this->operation == rnd_fct ) allConst = 0; if( allConst ) { switch( this->operation ) { /* Non-Trig single-argument functions */ case sum_fct: if( theParams[0]->type==BOOLEAN ) this->value.data.lng = ( pVals[0].data.log ? 1 : 0 ); else if( theParams[0]->type==LONG ) this->value.data.lng = pVals[0].data.lng; else if( theParams[0]->type==DOUBLE ) this->value.data.dbl = pVals[0].data.dbl; else if( theParams[0]->type==BITSTR ) strcpy(this->value.data.str, pVals[0].data.str); break; case average_fct: if( theParams[0]->type==LONG ) this->value.data.dbl = pVals[0].data.lng; else if( theParams[0]->type==DOUBLE ) this->value.data.dbl = pVals[0].data.dbl; break; case stddev_fct: this->value.data.dbl = 0; /* Standard deviation of a constant = 0 */ break; case median_fct: if( theParams[0]->type==BOOLEAN ) this->value.data.lng = ( pVals[0].data.log ? 1 : 0 ); else if( theParams[0]->type==LONG ) this->value.data.lng = pVals[0].data.lng; else this->value.data.dbl = pVals[0].data.dbl; break; case poirnd_fct: if( theParams[0]->type==DOUBLE ) this->value.data.lng = poidev(pVals[0].data.dbl); else this->value.data.lng = poidev(pVals[0].data.lng); break; case abs_fct: if( theParams[0]->type==DOUBLE ) { dval = pVals[0].data.dbl; this->value.data.dbl = (dval>0.0 ? dval : -dval); } else { ival = pVals[0].data.lng; this->value.data.lng = (ival> 0 ? ival : -ival); } break; /* Special Null-Handling Functions */ case nonnull_fct: this->value.data.lng = 1; /* Constants are always 1-element and defined */ break; case isnull_fct: /* Constants are always defined */ this->value.data.log = 0; break; case defnull_fct: if( this->type==BOOLEAN ) this->value.data.log = pVals[0].data.log; else if( this->type==LONG ) this->value.data.lng = pVals[0].data.lng; else if( this->type==DOUBLE ) this->value.data.dbl = pVals[0].data.dbl; else if( this->type==STRING ) strcpy(this->value.data.str,pVals[0].data.str); break; /* Math functions with 1 double argument */ case sin_fct: this->value.data.dbl = sin( pVals[0].data.dbl ); break; case cos_fct: this->value.data.dbl = cos( pVals[0].data.dbl ); break; case tan_fct: this->value.data.dbl = tan( pVals[0].data.dbl ); break; case asin_fct: dval = pVals[0].data.dbl; if( dval<-1.0 || dval>1.0 ) yyerror("Out of range argument to arcsin"); else this->value.data.dbl = asin( dval ); break; case acos_fct: dval = pVals[0].data.dbl; if( dval<-1.0 || dval>1.0 ) yyerror("Out of range argument to arccos"); else this->value.data.dbl = acos( dval ); break; case atan_fct: this->value.data.dbl = atan( pVals[0].data.dbl ); break; case sinh_fct: this->value.data.dbl = sinh( pVals[0].data.dbl ); break; case cosh_fct: this->value.data.dbl = cosh( pVals[0].data.dbl ); break; case tanh_fct: this->value.data.dbl = tanh( pVals[0].data.dbl ); break; case exp_fct: this->value.data.dbl = exp( pVals[0].data.dbl ); break; case log_fct: dval = pVals[0].data.dbl; if( dval<=0.0 ) yyerror("Out of range argument to log"); else this->value.data.dbl = log( dval ); break; case log10_fct: dval = pVals[0].data.dbl; if( dval<=0.0 ) yyerror("Out of range argument to log10"); else this->value.data.dbl = log10( dval ); break; case sqrt_fct: dval = pVals[0].data.dbl; if( dval<0.0 ) yyerror("Out of range argument to sqrt"); else this->value.data.dbl = sqrt( dval ); break; case ceil_fct: this->value.data.dbl = ceil( pVals[0].data.dbl ); break; case floor_fct: this->value.data.dbl = floor( pVals[0].data.dbl ); break; case round_fct: this->value.data.dbl = floor( pVals[0].data.dbl + 0.5 ); break; /* Two-argument Trig Functions */ case atan2_fct: this->value.data.dbl = atan2( pVals[0].data.dbl, pVals[1].data.dbl ); break; /* Four-argument ANGSEP function */ case angsep_fct: this->value.data.dbl = angsep_calc(pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl); /* Min/Max functions taking 1 or 2 arguments */ case min1_fct: /* No constant vectors! */ if( this->type == DOUBLE ) this->value.data.dbl = pVals[0].data.dbl; else if( this->type == LONG ) this->value.data.lng = pVals[0].data.lng; else if( this->type == BITSTR ) strcpy(this->value.data.str, pVals[0].data.str); break; case min2_fct: if( this->type == DOUBLE ) this->value.data.dbl = minvalue( pVals[0].data.dbl, pVals[1].data.dbl ); else if( this->type == LONG ) this->value.data.lng = minvalue( pVals[0].data.lng, pVals[1].data.lng ); break; case max1_fct: /* No constant vectors! */ if( this->type == DOUBLE ) this->value.data.dbl = pVals[0].data.dbl; else if( this->type == LONG ) this->value.data.lng = pVals[0].data.lng; else if( this->type == BITSTR ) strcpy(this->value.data.str, pVals[0].data.str); break; case max2_fct: if( this->type == DOUBLE ) this->value.data.dbl = maxvalue( pVals[0].data.dbl, pVals[1].data.dbl ); else if( this->type == LONG ) this->value.data.lng = maxvalue( pVals[0].data.lng, pVals[1].data.lng ); break; /* Boolean SAO region Functions... scalar or vector dbls */ case near_fct: this->value.data.log = bnear( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl ); break; case circle_fct: this->value.data.log = circle( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl, pVals[4].data.dbl ); break; case box_fct: this->value.data.log = saobox( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl, pVals[4].data.dbl, pVals[5].data.dbl, pVals[6].data.dbl ); break; case elps_fct: this->value.data.log = ellipse( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl, pVals[4].data.dbl, pVals[5].data.dbl, pVals[6].data.dbl ); break; /* C Conditional expression: bool ? expr : expr */ case ifthenelse_fct: switch( this->type ) { case BOOLEAN: this->value.data.log = ( pVals[2].data.log ? pVals[0].data.log : pVals[1].data.log ); break; case LONG: this->value.data.lng = ( pVals[2].data.log ? pVals[0].data.lng : pVals[1].data.lng ); break; case DOUBLE: this->value.data.dbl = ( pVals[2].data.log ? pVals[0].data.dbl : pVals[1].data.dbl ); break; case STRING: strcpy(this->value.data.str, ( pVals[2].data.log ? pVals[0].data.str : pVals[1].data.str ) ); break; } break; /* String functions */ case strmid_fct: cstrmid(this->value.data.str, this->value.nelem, pVals[0].data.str, pVals[0].nelem, pVals[1].data.lng); break; case strpos_fct: { char *res = strstr(pVals[0].data.str, pVals[1].data.str); if (res == NULL) { this->value.data.lng = 0; } else { this->value.data.lng = (res - pVals[0].data.str) + 1; } break; } } this->operation = CONST_OP; } else { Allocate_Ptrs( this ); row = gParse.nRows; elem = row * this->value.nelem; if( !gParse.status ) { switch( this->operation ) { /* Special functions with no arguments */ case row_fct: while( row-- ) { this->value.data.lngptr[row] = gParse.firstRow + row; this->value.undef[row] = 0; } break; case null_fct: if( this->type==LONG ) { while( row-- ) { this->value.data.lngptr[row] = 0; this->value.undef[row] = 1; } } else if( this->type==STRING ) { while( row-- ) { this->value.data.strptr[row][0] = '\0'; this->value.undef[row] = 1; } } break; case rnd_fct: while( elem-- ) { this->value.data.dblptr[elem] = ran1(); this->value.undef[elem] = 0; } break; case gasrnd_fct: while( elem-- ) { this->value.data.dblptr[elem] = gasdev(); this->value.undef[elem] = 0; } break; case poirnd_fct: if( theParams[0]->type==DOUBLE ) { if (theParams[0]->operation == CONST_OP) { while( elem-- ) { this->value.undef[elem] = (pVals[0].data.dbl < 0); if (! this->value.undef[elem]) { this->value.data.lngptr[elem] = poidev(pVals[0].data.dbl); } } } else { while( elem-- ) { this->value.undef[elem] = theParams[0]->value.undef[elem]; if (theParams[0]->value.data.dblptr[elem] < 0) this->value.undef[elem] = 1; if (! this->value.undef[elem]) { this->value.data.lngptr[elem] = poidev(theParams[0]->value.data.dblptr[elem]); } } /* while */ } /* ! CONST_OP */ } else { /* LONG */ if (theParams[0]->operation == CONST_OP) { while( elem-- ) { this->value.undef[elem] = (pVals[0].data.lng < 0); if (! this->value.undef[elem]) { this->value.data.lngptr[elem] = poidev(pVals[0].data.lng); } } } else { while( elem-- ) { this->value.undef[elem] = theParams[0]->value.undef[elem]; if (theParams[0]->value.data.lngptr[elem] < 0) this->value.undef[elem] = 1; if (! this->value.undef[elem]) { this->value.data.lngptr[elem] = poidev(theParams[0]->value.data.lngptr[elem]); } } /* while */ } /* ! CONST_OP */ } /* END LONG */ break; /* Non-Trig single-argument functions */ case sum_fct: elem = row * theParams[0]->value.nelem; if( theParams[0]->type==BOOLEAN ) { while( row-- ) { this->value.data.lngptr[row] = 0; /* Default is UNDEF until a defined value is found */ this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( ! theParams[0]->value.undef[elem] ) { this->value.data.lngptr[row] += ( theParams[0]->value.data.logptr[elem] ? 1 : 0 ); this->value.undef[row] = 0; } } } } else if( theParams[0]->type==LONG ) { while( row-- ) { this->value.data.lngptr[row] = 0; /* Default is UNDEF until a defined value is found */ this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( ! theParams[0]->value.undef[elem] ) { this->value.data.lngptr[row] += theParams[0]->value.data.lngptr[elem]; this->value.undef[row] = 0; } } } } else if( theParams[0]->type==DOUBLE ){ while( row-- ) { this->value.data.dblptr[row] = 0.0; /* Default is UNDEF until a defined value is found */ this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( ! theParams[0]->value.undef[elem] ) { this->value.data.dblptr[row] += theParams[0]->value.data.dblptr[elem]; this->value.undef[row] = 0; } } } } else { /* BITSTR */ nelem = theParams[0]->value.nelem; while( row-- ) { char *sptr1 = theParams[0]->value.data.strptr[row]; this->value.data.lngptr[row] = 0; this->value.undef[row] = 0; while (*sptr1) { if (*sptr1 == '1') this->value.data.lngptr[row] ++; sptr1++; } } } break; case average_fct: elem = row * theParams[0]->value.nelem; if( theParams[0]->type==LONG ) { while( row-- ) { int count = 0; this->value.data.dblptr[row] = 0; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if (theParams[0]->value.undef[elem] == 0) { this->value.data.dblptr[row] += theParams[0]->value.data.lngptr[elem]; count ++; } } if (count == 0) { this->value.undef[row] = 1; } else { this->value.undef[row] = 0; this->value.data.dblptr[row] /= count; } } } else if( theParams[0]->type==DOUBLE ){ while( row-- ) { int count = 0; this->value.data.dblptr[row] = 0; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if (theParams[0]->value.undef[elem] == 0) { this->value.data.dblptr[row] += theParams[0]->value.data.dblptr[elem]; count ++; } } if (count == 0) { this->value.undef[row] = 1; } else { this->value.undef[row] = 0; this->value.data.dblptr[row] /= count; } } } break; case stddev_fct: elem = row * theParams[0]->value.nelem; if( theParams[0]->type==LONG ) { /* Compute the mean value */ while( row-- ) { int count = 0; double sum = 0, sum2 = 0; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if (theParams[0]->value.undef[elem] == 0) { sum += theParams[0]->value.data.lngptr[elem]; count ++; } } if (count > 1) { sum /= count; /* Compute the sum of squared deviations */ nelem = theParams[0]->value.nelem; elem += nelem; /* Reset elem for second pass */ while( nelem-- ) { elem--; if (theParams[0]->value.undef[elem] == 0) { double dx = (theParams[0]->value.data.lngptr[elem] - sum); sum2 += (dx*dx); } } sum2 /= (double)count-1; this->value.undef[row] = 0; this->value.data.dblptr[row] = sqrt(sum2); } else { this->value.undef[row] = 0; /* STDDEV => 0 */ this->value.data.dblptr[row] = 0; } } } else if( theParams[0]->type==DOUBLE ){ /* Compute the mean value */ while( row-- ) { int count = 0; double sum = 0, sum2 = 0; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if (theParams[0]->value.undef[elem] == 0) { sum += theParams[0]->value.data.dblptr[elem]; count ++; } } if (count > 1) { sum /= count; /* Compute the sum of squared deviations */ nelem = theParams[0]->value.nelem; elem += nelem; /* Reset elem for second pass */ while( nelem-- ) { elem--; if (theParams[0]->value.undef[elem] == 0) { double dx = (theParams[0]->value.data.dblptr[elem] - sum); sum2 += (dx*dx); } } sum2 /= (double)count-1; this->value.undef[row] = 0; this->value.data.dblptr[row] = sqrt(sum2); } else { this->value.undef[row] = 0; /* STDDEV => 0 */ this->value.data.dblptr[row] = 0; } } } break; case median_fct: elem = row * theParams[0]->value.nelem; nelem = theParams[0]->value.nelem; if( theParams[0]->type==LONG ) { long *dptr = theParams[0]->value.data.lngptr; char *uptr = theParams[0]->value.undef; long *mptr = (long *) malloc(sizeof(long)*nelem); int irow; /* Allocate temporary storage for this row, since the quickselect function will scramble the contents */ if (mptr == 0) { yyerror("Could not allocate temporary memory in median function"); free( this->value.data.ptr ); break; } for (irow=0; irow 0) { this->value.undef[irow] = 0; this->value.data.lngptr[irow] = qselect_median_lng(mptr, nelem1); } else { this->value.undef[irow] = 1; this->value.data.lngptr[irow] = 0; } } free(mptr); } else { double *dptr = theParams[0]->value.data.dblptr; char *uptr = theParams[0]->value.undef; double *mptr = (double *) malloc(sizeof(double)*nelem); int irow; /* Allocate temporary storage for this row, since the quickselect function will scramble the contents */ if (mptr == 0) { yyerror("Could not allocate temporary memory in median function"); free( this->value.data.ptr ); break; } for (irow=0; irow 0) { this->value.undef[irow] = 0; this->value.data.dblptr[irow] = qselect_median_dbl(mptr, nelem1); } else { this->value.undef[irow] = 1; this->value.data.dblptr[irow] = 0; } } free(mptr); } break; case abs_fct: if( theParams[0]->type==DOUBLE ) while( elem-- ) { dval = theParams[0]->value.data.dblptr[elem]; this->value.data.dblptr[elem] = (dval>0.0 ? dval : -dval); this->value.undef[elem] = theParams[0]->value.undef[elem]; } else while( elem-- ) { ival = theParams[0]->value.data.lngptr[elem]; this->value.data.lngptr[elem] = (ival> 0 ? ival : -ival); this->value.undef[elem] = theParams[0]->value.undef[elem]; } break; /* Special Null-Handling Functions */ case nonnull_fct: nelem = theParams[0]->value.nelem; if ( theParams[0]->type==STRING ) nelem = 1; elem = row * nelem; while( row-- ) { int nelem1 = nelem; this->value.undef[row] = 0; /* Initialize to 0 (defined) */ this->value.data.lngptr[row] = 0; while( nelem1-- ) { elem --; if ( theParams[0]->value.undef[elem] == 0 ) this->value.data.lngptr[row] ++; } } break; case isnull_fct: if( theParams[0]->type==STRING ) elem = row; while( elem-- ) { this->value.data.logptr[elem] = theParams[0]->value.undef[elem]; this->value.undef[elem] = 0; } break; case defnull_fct: switch( this->type ) { case BOOLEAN: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pNull[i] = theParams[i]->value.undef[elem]; pVals[i].data.log = theParams[i]->value.data.logptr[elem]; } else if( vector[i] ) { pNull[i] = theParams[i]->value.undef[row]; pVals[i].data.log = theParams[i]->value.data.logptr[row]; } if( pNull[0] ) { this->value.undef[elem] = pNull[1]; this->value.data.logptr[elem] = pVals[1].data.log; } else { this->value.undef[elem] = 0; this->value.data.logptr[elem] = pVals[0].data.log; } } } break; case LONG: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pNull[i] = theParams[i]->value.undef[elem]; pVals[i].data.lng = theParams[i]->value.data.lngptr[elem]; } else if( vector[i] ) { pNull[i] = theParams[i]->value.undef[row]; pVals[i].data.lng = theParams[i]->value.data.lngptr[row]; } if( pNull[0] ) { this->value.undef[elem] = pNull[1]; this->value.data.lngptr[elem] = pVals[1].data.lng; } else { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = pVals[0].data.lng; } } } break; case DOUBLE: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pNull[i] = theParams[i]->value.undef[elem]; pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; } else if( vector[i] ) { pNull[i] = theParams[i]->value.undef[row]; pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; } if( pNull[0] ) { this->value.undef[elem] = pNull[1]; this->value.data.dblptr[elem] = pVals[1].data.dbl; } else { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = pVals[0].data.dbl; } } } break; case STRING: while( row-- ) { i=2; while( i-- ) if( vector[i] ) { pNull[i] = theParams[i]->value.undef[row]; strcpy(pVals[i].data.str, theParams[i]->value.data.strptr[row]); } if( pNull[0] ) { this->value.undef[row] = pNull[1]; strcpy(this->value.data.strptr[row],pVals[1].data.str); } else { this->value.undef[elem] = 0; strcpy(this->value.data.strptr[row],pVals[0].data.str); } } } break; /* Math functions with 1 double argument */ case sin_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = sin( theParams[0]->value.data.dblptr[elem] ); } break; case cos_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = cos( theParams[0]->value.data.dblptr[elem] ); } break; case tan_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = tan( theParams[0]->value.data.dblptr[elem] ); } break; case asin_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; if( dval<-1.0 || dval>1.0 ) { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } else this->value.data.dblptr[elem] = asin( dval ); } break; case acos_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; if( dval<-1.0 || dval>1.0 ) { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } else this->value.data.dblptr[elem] = acos( dval ); } break; case atan_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; this->value.data.dblptr[elem] = atan( dval ); } break; case sinh_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = sinh( theParams[0]->value.data.dblptr[elem] ); } break; case cosh_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = cosh( theParams[0]->value.data.dblptr[elem] ); } break; case tanh_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = tanh( theParams[0]->value.data.dblptr[elem] ); } break; case exp_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; this->value.data.dblptr[elem] = exp( dval ); } break; case log_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; if( dval<=0.0 ) { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } else this->value.data.dblptr[elem] = log( dval ); } break; case log10_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; if( dval<=0.0 ) { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } else this->value.data.dblptr[elem] = log10( dval ); } break; case sqrt_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { dval = theParams[0]->value.data.dblptr[elem]; if( dval<0.0 ) { this->value.data.dblptr[elem] = 0.0; this->value.undef[elem] = 1; } else this->value.data.dblptr[elem] = sqrt( dval ); } break; case ceil_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = ceil( theParams[0]->value.data.dblptr[elem] ); } break; case floor_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = floor( theParams[0]->value.data.dblptr[elem] ); } break; case round_fct: while( elem-- ) if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { this->value.data.dblptr[elem] = floor( theParams[0]->value.data.dblptr[elem] + 0.5); } break; /* Two-argument Trig Functions */ case atan2_fct: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = (pNull[0] || pNull[1]) ) ) this->value.data.dblptr[elem] = atan2( pVals[0].data.dbl, pVals[1].data.dbl ); } } break; /* Four-argument ANGSEP Function */ case angsep_fct: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=4; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || pNull[2] || pNull[3]) ) ) this->value.data.dblptr[elem] = angsep_calc(pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl); } } break; /* Min/Max functions taking 1 or 2 arguments */ case min1_fct: elem = row * theParams[0]->value.nelem; if( this->type==LONG ) { long minVal=0; while( row-- ) { valInit = 1; this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( !theParams[0]->value.undef[elem] ) { if ( valInit ) { valInit = 0; minVal = theParams[0]->value.data.lngptr[elem]; } else { minVal = minvalue( minVal, theParams[0]->value.data.lngptr[elem] ); } this->value.undef[row] = 0; } } this->value.data.lngptr[row] = minVal; } } else if( this->type==DOUBLE ) { double minVal=0.0; while( row-- ) { valInit = 1; this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( !theParams[0]->value.undef[elem] ) { if ( valInit ) { valInit = 0; minVal = theParams[0]->value.data.dblptr[elem]; } else { minVal = minvalue( minVal, theParams[0]->value.data.dblptr[elem] ); } this->value.undef[row] = 0; } } this->value.data.dblptr[row] = minVal; } } else if( this->type==BITSTR ) { char minVal; while( row-- ) { char *sptr1 = theParams[0]->value.data.strptr[row]; minVal = '1'; while (*sptr1) { if (*sptr1 == '0') minVal = '0'; sptr1++; } this->value.data.strptr[row][0] = minVal; this->value.data.strptr[row][1] = 0; /* Null terminate */ } } break; case min2_fct: if( this->type==LONG ) { while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.lng = theParams[i]->value.data.lngptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.lng = theParams[i]->value.data.lngptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( pNull[0] && pNull[1] ) { this->value.undef[elem] = 1; this->value.data.lngptr[elem] = 0; } else if (pNull[0]) { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = pVals[1].data.lng; } else if (pNull[1]) { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = pVals[0].data.lng; } else { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = minvalue( pVals[0].data.lng, pVals[1].data.lng ); } } } } else if( this->type==DOUBLE ) { while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( pNull[0] && pNull[1] ) { this->value.undef[elem] = 1; this->value.data.dblptr[elem] = 0; } else if (pNull[0]) { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = pVals[1].data.dbl; } else if (pNull[1]) { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = pVals[0].data.dbl; } else { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = minvalue( pVals[0].data.dbl, pVals[1].data.dbl ); } } } } break; case max1_fct: elem = row * theParams[0]->value.nelem; if( this->type==LONG ) { long maxVal=0; while( row-- ) { valInit = 1; this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( !theParams[0]->value.undef[elem] ) { if ( valInit ) { valInit = 0; maxVal = theParams[0]->value.data.lngptr[elem]; } else { maxVal = maxvalue( maxVal, theParams[0]->value.data.lngptr[elem] ); } this->value.undef[row] = 0; } } this->value.data.lngptr[row] = maxVal; } } else if( this->type==DOUBLE ) { double maxVal=0.0; while( row-- ) { valInit = 1; this->value.undef[row] = 1; nelem = theParams[0]->value.nelem; while( nelem-- ) { elem--; if ( !theParams[0]->value.undef[elem] ) { if ( valInit ) { valInit = 0; maxVal = theParams[0]->value.data.dblptr[elem]; } else { maxVal = maxvalue( maxVal, theParams[0]->value.data.dblptr[elem] ); } this->value.undef[row] = 0; } } this->value.data.dblptr[row] = maxVal; } } else if( this->type==BITSTR ) { char maxVal; while( row-- ) { char *sptr1 = theParams[0]->value.data.strptr[row]; maxVal = '0'; while (*sptr1) { if (*sptr1 == '1') maxVal = '1'; sptr1++; } this->value.data.strptr[row][0] = maxVal; this->value.data.strptr[row][1] = 0; /* Null terminate */ } } break; case max2_fct: if( this->type==LONG ) { while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.lng = theParams[i]->value.data.lngptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.lng = theParams[i]->value.data.lngptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( pNull[0] && pNull[1] ) { this->value.undef[elem] = 1; this->value.data.lngptr[elem] = 0; } else if (pNull[0]) { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = pVals[1].data.lng; } else if (pNull[1]) { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = pVals[0].data.lng; } else { this->value.undef[elem] = 0; this->value.data.lngptr[elem] = maxvalue( pVals[0].data.lng, pVals[1].data.lng ); } } } } else if( this->type==DOUBLE ) { while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( pNull[0] && pNull[1] ) { this->value.undef[elem] = 1; this->value.data.dblptr[elem] = 0; } else if (pNull[0]) { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = pVals[1].data.dbl; } else if (pNull[1]) { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = pVals[0].data.dbl; } else { this->value.undef[elem] = 0; this->value.data.dblptr[elem] = maxvalue( pVals[0].data.dbl, pVals[1].data.dbl ); } } } } break; /* Boolean SAO region Functions... scalar or vector dbls */ case near_fct: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=3; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || pNull[2]) ) ) this->value.data.logptr[elem] = bnear( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl ); } } break; case circle_fct: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=5; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || pNull[2] || pNull[3] || pNull[4]) ) ) this->value.data.logptr[elem] = circle( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl, pVals[4].data.dbl ); } } break; case box_fct: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=7; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || pNull[2] || pNull[3] || pNull[4] || pNull[5] || pNull[6] ) ) ) this->value.data.logptr[elem] = saobox( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl, pVals[4].data.dbl, pVals[5].data.dbl, pVals[6].data.dbl ); } } break; case elps_fct: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; i=7; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = (pNull[0] || pNull[1] || pNull[2] || pNull[3] || pNull[4] || pNull[5] || pNull[6] ) ) ) this->value.data.logptr[elem] = ellipse( pVals[0].data.dbl, pVals[1].data.dbl, pVals[2].data.dbl, pVals[3].data.dbl, pVals[4].data.dbl, pVals[5].data.dbl, pVals[6].data.dbl ); } } break; /* C Conditional expression: bool ? expr : expr */ case ifthenelse_fct: switch( this->type ) { case BOOLEAN: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; if( vector[2]>1 ) { pVals[2].data.log = theParams[2]->value.data.logptr[elem]; pNull[2] = theParams[2]->value.undef[elem]; } else if( vector[2] ) { pVals[2].data.log = theParams[2]->value.data.logptr[row]; pNull[2] = theParams[2]->value.undef[row]; } i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.log = theParams[i]->value.data.logptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.log = theParams[i]->value.data.logptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = pNull[2]) ) { if( pVals[2].data.log ) { this->value.data.logptr[elem] = pVals[0].data.log; this->value.undef[elem] = pNull[0]; } else { this->value.data.logptr[elem] = pVals[1].data.log; this->value.undef[elem] = pNull[1]; } } } } break; case LONG: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; if( vector[2]>1 ) { pVals[2].data.log = theParams[2]->value.data.logptr[elem]; pNull[2] = theParams[2]->value.undef[elem]; } else if( vector[2] ) { pVals[2].data.log = theParams[2]->value.data.logptr[row]; pNull[2] = theParams[2]->value.undef[row]; } i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.lng = theParams[i]->value.data.lngptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.lng = theParams[i]->value.data.lngptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = pNull[2]) ) { if( pVals[2].data.log ) { this->value.data.lngptr[elem] = pVals[0].data.lng; this->value.undef[elem] = pNull[0]; } else { this->value.data.lngptr[elem] = pVals[1].data.lng; this->value.undef[elem] = pNull[1]; } } } } break; case DOUBLE: while( row-- ) { nelem = this->value.nelem; while( nelem-- ) { elem--; if( vector[2]>1 ) { pVals[2].data.log = theParams[2]->value.data.logptr[elem]; pNull[2] = theParams[2]->value.undef[elem]; } else if( vector[2] ) { pVals[2].data.log = theParams[2]->value.data.logptr[row]; pNull[2] = theParams[2]->value.undef[row]; } i=2; while( i-- ) if( vector[i]>1 ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[elem]; pNull[i] = theParams[i]->value.undef[elem]; } else if( vector[i] ) { pVals[i].data.dbl = theParams[i]->value.data.dblptr[row]; pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[elem] = pNull[2]) ) { if( pVals[2].data.log ) { this->value.data.dblptr[elem] = pVals[0].data.dbl; this->value.undef[elem] = pNull[0]; } else { this->value.data.dblptr[elem] = pVals[1].data.dbl; this->value.undef[elem] = pNull[1]; } } } } break; case STRING: while( row-- ) { if( vector[2] ) { pVals[2].data.log = theParams[2]->value.data.logptr[row]; pNull[2] = theParams[2]->value.undef[row]; } i=2; while( i-- ) if( vector[i] ) { strcpy( pVals[i].data.str, theParams[i]->value.data.strptr[row] ); pNull[i] = theParams[i]->value.undef[row]; } if( !(this->value.undef[row] = pNull[2]) ) { if( pVals[2].data.log ) { strcpy( this->value.data.strptr[row], pVals[0].data.str ); this->value.undef[row] = pNull[0]; } else { strcpy( this->value.data.strptr[row], pVals[1].data.str ); this->value.undef[row] = pNull[1]; } } else { this->value.data.strptr[row][0] = '\0'; } } break; } break; /* String functions */ case strmid_fct: { int strconst = theParams[0]->operation == CONST_OP; int posconst = theParams[1]->operation == CONST_OP; int lenconst = theParams[2]->operation == CONST_OP; int dest_len = this->value.nelem; int src_len = theParams[0]->value.nelem; while (row--) { int pos; int len; char *str; int undef = 0; if (posconst) { pos = theParams[1]->value.data.lng; } else { pos = theParams[1]->value.data.lngptr[row]; if (theParams[1]->value.undef[row]) undef = 1; } if (strconst) { str = theParams[0]->value.data.str; if (src_len == 0) src_len = strlen(str); } else { str = theParams[0]->value.data.strptr[row]; if (theParams[0]->value.undef[row]) undef = 1; } if (lenconst) { len = dest_len; } else { len = theParams[2]->value.data.lngptr[row]; if (theParams[2]->value.undef[row]) undef = 1; } this->value.data.strptr[row][0] = '\0'; if (pos == 0) undef = 1; if (! undef ) { if (cstrmid(this->value.data.strptr[row], len, str, src_len, pos) < 0) break; } this->value.undef[row] = undef; } } break; /* String functions */ case strpos_fct: { int const1 = theParams[0]->operation == CONST_OP; int const2 = theParams[1]->operation == CONST_OP; while (row--) { char *str1, *str2; int undef = 0; if (const1) { str1 = theParams[0]->value.data.str; } else { str1 = theParams[0]->value.data.strptr[row]; if (theParams[0]->value.undef[row]) undef = 1; } if (const2) { str2 = theParams[1]->value.data.str; } else { str2 = theParams[1]->value.data.strptr[row]; if (theParams[1]->value.undef[row]) undef = 1; } this->value.data.lngptr[row] = 0; if (! undef ) { char *res = strstr(str1, str2); if (res == NULL) { undef = 1; this->value.data.lngptr[row] = 0; } else { this->value.data.lngptr[row] = (res - str1) + 1; } } this->value.undef[row] = undef; } } break; } /* End switch(this->operation) */ } /* End if (!gParse.status) */ } /* End non-constant operations */ i = this->nSubNodes; while( i-- ) { if( theParams[i]->operation>0 ) { /* Currently only numeric params allowed */ free( theParams[i]->value.data.ptr ); } } } static void Do_Deref( Node *this ) { Node *theVar, *theDims[MAXDIMS]; int isConst[MAXDIMS], allConst; long dimVals[MAXDIMS]; int i, nDims; long row, elem, dsize; theVar = gParse.Nodes + this->SubNodes[0]; i = nDims = this->nSubNodes-1; allConst = 1; while( i-- ) { theDims[i] = gParse.Nodes + this->SubNodes[i+1]; isConst[i] = ( theDims[i]->operation==CONST_OP ); if( isConst[i] ) dimVals[i] = theDims[i]->value.data.lng; else allConst = 0; } if( this->type==DOUBLE ) { dsize = sizeof( double ); } else if( this->type==LONG ) { dsize = sizeof( long ); } else if( this->type==BOOLEAN ) { dsize = sizeof( char ); } else dsize = 0; Allocate_Ptrs( this ); if( !gParse.status ) { if( allConst && theVar->value.naxis==nDims ) { /* Dereference completely using constant indices */ elem = 0; i = nDims; while( i-- ) { if( dimVals[i]<1 || dimVals[i]>theVar->value.naxes[i] ) break; elem = theVar->value.naxes[i]*elem + dimVals[i]-1; } if( i<0 ) { for( row=0; rowtype==STRING ) this->value.undef[row] = theVar->value.undef[row]; else if( this->type==BITSTR ) this->value.undef; /* Dummy - BITSTRs do not have undefs */ else this->value.undef[row] = theVar->value.undef[elem]; if( this->type==DOUBLE ) this->value.data.dblptr[row] = theVar->value.data.dblptr[elem]; else if( this->type==LONG ) this->value.data.lngptr[row] = theVar->value.data.lngptr[elem]; else if( this->type==BOOLEAN ) this->value.data.logptr[row] = theVar->value.data.logptr[elem]; else { /* XXX Note, the below expression uses knowledge of the layout of the string format, namely (nelem+1) characters per string, followed by (nelem+1) "undef" values. */ this->value.data.strptr[row][0] = theVar->value.data.strptr[0][elem+row]; this->value.data.strptr[row][1] = 0; /* Null terminate */ } elem += theVar->value.nelem; } } else { yyerror("Index out of range"); free( this->value.data.ptr ); } } else if( allConst && nDims==1 ) { /* Reduce dimensions by 1, using a constant index */ if( dimVals[0] < 1 || dimVals[0] > theVar->value.naxes[ theVar->value.naxis-1 ] ) { yyerror("Index out of range"); free( this->value.data.ptr ); } else if ( this->type == BITSTR || this->type == STRING ) { elem = this->value.nelem * (dimVals[0]-1); for( row=0; rowvalue.undef) this->value.undef[row] = theVar->value.undef[row]; memcpy( (char*)this->value.data.strptr[0] + row*sizeof(char)*(this->value.nelem+1), (char*)theVar->value.data.strptr[0] + elem*sizeof(char), this->value.nelem * sizeof(char) ); /* Null terminate */ this->value.data.strptr[row][this->value.nelem] = 0; elem += theVar->value.nelem+1; } } else { elem = this->value.nelem * (dimVals[0]-1); for( row=0; rowvalue.undef + row*this->value.nelem, theVar->value.undef + elem, this->value.nelem * sizeof(char) ); memcpy( (char*)this->value.data.ptr + row*dsize*this->value.nelem, (char*)theVar->value.data.ptr + elem*dsize, this->value.nelem * dsize ); elem += theVar->value.nelem; } } } else if( theVar->value.naxis==nDims ) { /* Dereference completely using an expression for the indices */ for( row=0; rowvalue.undef[row] ) { yyerror("Null encountered as vector index"); free( this->value.data.ptr ); break; } else dimVals[i] = theDims[i]->value.data.lngptr[row]; } } if( gParse.status ) break; elem = 0; i = nDims; while( i-- ) { if( dimVals[i]<1 || dimVals[i]>theVar->value.naxes[i] ) break; elem = theVar->value.naxes[i]*elem + dimVals[i]-1; } if( i<0 ) { elem += row*theVar->value.nelem; if( this->type==STRING ) this->value.undef[row] = theVar->value.undef[row]; else if( this->type==BITSTR ) this->value.undef; /* Dummy - BITSTRs do not have undefs */ else this->value.undef[row] = theVar->value.undef[elem]; if( this->type==DOUBLE ) this->value.data.dblptr[row] = theVar->value.data.dblptr[elem]; else if( this->type==LONG ) this->value.data.lngptr[row] = theVar->value.data.lngptr[elem]; else if( this->type==BOOLEAN ) this->value.data.logptr[row] = theVar->value.data.logptr[elem]; else { /* XXX Note, the below expression uses knowledge of the layout of the string format, namely (nelem+1) characters per string, followed by (nelem+1) "undef" values. */ this->value.data.strptr[row][0] = theVar->value.data.strptr[0][elem+row]; this->value.data.strptr[row][1] = 0; /* Null terminate */ } } else { yyerror("Index out of range"); free( this->value.data.ptr ); } } } else { /* Reduce dimensions by 1, using a nonconstant expression */ for( row=0; rowvalue.undef[row] ) { yyerror("Null encountered as vector index"); free( this->value.data.ptr ); break; } else dimVals[0] = theDims[0]->value.data.lngptr[row]; if( dimVals[0] < 1 || dimVals[0] > theVar->value.naxes[ theVar->value.naxis-1 ] ) { yyerror("Index out of range"); free( this->value.data.ptr ); } else if ( this->type == BITSTR || this->type == STRING ) { elem = this->value.nelem * (dimVals[0]-1); elem += row*(theVar->value.nelem+1); if (this->value.undef) this->value.undef[row] = theVar->value.undef[row]; memcpy( (char*)this->value.data.strptr[0] + row*sizeof(char)*(this->value.nelem+1), (char*)theVar->value.data.strptr[0] + elem*sizeof(char), this->value.nelem * sizeof(char) ); /* Null terminate */ this->value.data.strptr[row][this->value.nelem] = 0; } else { elem = this->value.nelem * (dimVals[0]-1); elem += row*theVar->value.nelem; memcpy( this->value.undef + row*this->value.nelem, theVar->value.undef + elem, this->value.nelem * sizeof(char) ); memcpy( (char*)this->value.data.ptr + row*dsize*this->value.nelem, (char*)theVar->value.data.ptr + elem*dsize, this->value.nelem * dsize ); } } } } if( theVar->operation>0 ) { if (theVar->type == STRING || theVar->type == BITSTR) free(theVar->value.data.strptr[0] ); else free( theVar->value.data.ptr ); } for( i=0; ioperation>0 ) { free( theDims[i]->value.data.ptr ); } } static void Do_GTI( Node *this ) { Node *theExpr, *theTimes; double *start, *stop, *times; long elem, nGTI, gti; int ordered; theTimes = gParse.Nodes + this->SubNodes[0]; theExpr = gParse.Nodes + this->SubNodes[1]; nGTI = theTimes->value.nelem; start = theTimes->value.data.dblptr; stop = theTimes->value.data.dblptr + nGTI; ordered = theTimes->type; if( theExpr->operation==CONST_OP ) { this->value.data.log = (Search_GTI( theExpr->value.data.dbl, nGTI, start, stop, ordered )>=0); this->operation = CONST_OP; } else { Allocate_Ptrs( this ); times = theExpr->value.data.dblptr; if( !gParse.status ) { elem = gParse.nRows * this->value.nelem; if( nGTI ) { gti = -1; while( elem-- ) { if( (this->value.undef[elem] = theExpr->value.undef[elem]) ) continue; /* Before searching entire GTI, check the GTI found last time */ if( gti<0 || times[elem]stop[gti] ) { gti = Search_GTI( times[elem], nGTI, start, stop, ordered ); } this->value.data.logptr[elem] = ( gti>=0 ); } } else while( elem-- ) { this->value.data.logptr[elem] = 0; this->value.undef[elem] = 0; } } } if( theExpr->operation>0 ) free( theExpr->value.data.ptr ); } static long Search_GTI( double evtTime, long nGTI, double *start, double *stop, int ordered ) { long gti, step; if( ordered && nGTI>15 ) { /* If time-ordered and lots of GTIs, */ /* use "FAST" Binary search algorithm */ if( evtTime>=start[0] && evtTime<=stop[nGTI-1] ) { gti = step = (nGTI >> 1); while(1) { if( step>1L ) step >>= 1; if( evtTime>stop[gti] ) { if( evtTime>=start[gti+1] ) gti += step; else { gti = -1L; break; } } else if( evtTime=start[gti] && evtTime<=stop[gti] ) break; } return( gti ); } static void Do_REG( Node *this ) { Node *theRegion, *theX, *theY; double Xval=0.0, Yval=0.0; char Xnull=0, Ynull=0; int Xvector, Yvector; long nelem, elem, rows; theRegion = gParse.Nodes + this->SubNodes[0]; theX = gParse.Nodes + this->SubNodes[1]; theY = gParse.Nodes + this->SubNodes[2]; Xvector = ( theX->operation!=CONST_OP ); if( Xvector ) Xvector = theX->value.nelem; else { Xval = theX->value.data.dbl; } Yvector = ( theY->operation!=CONST_OP ); if( Yvector ) Yvector = theY->value.nelem; else { Yval = theY->value.data.dbl; } if( !Xvector && !Yvector ) { this->value.data.log = ( fits_in_region( Xval, Yval, (SAORegion *)theRegion->value.data.ptr ) != 0 ); this->operation = CONST_OP; } else { Allocate_Ptrs( this ); if( !gParse.status ) { rows = gParse.nRows; nelem = this->value.nelem; elem = rows*nelem; while( rows-- ) { while( nelem-- ) { elem--; if( Xvector>1 ) { Xval = theX->value.data.dblptr[elem]; Xnull = theX->value.undef[elem]; } else if( Xvector ) { Xval = theX->value.data.dblptr[rows]; Xnull = theX->value.undef[rows]; } if( Yvector>1 ) { Yval = theY->value.data.dblptr[elem]; Ynull = theY->value.undef[elem]; } else if( Yvector ) { Yval = theY->value.data.dblptr[rows]; Ynull = theY->value.undef[rows]; } this->value.undef[elem] = ( Xnull || Ynull ); if( this->value.undef[elem] ) continue; this->value.data.logptr[elem] = ( fits_in_region( Xval, Yval, (SAORegion *)theRegion->value.data.ptr ) != 0 ); } nelem = this->value.nelem; } } } if( theX->operation>0 ) free( theX->value.data.ptr ); if( theY->operation>0 ) free( theY->value.data.ptr ); } static void Do_Vector( Node *this ) { Node *that; long row, elem, idx, jdx, offset=0; int node; Allocate_Ptrs( this ); if( !gParse.status ) { for( node=0; nodenSubNodes; node++ ) { that = gParse.Nodes + this->SubNodes[node]; if( that->operation == CONST_OP ) { idx = gParse.nRows*this->value.nelem + offset; while( (idx-=this->value.nelem)>=0 ) { this->value.undef[idx] = 0; switch( this->type ) { case BOOLEAN: this->value.data.logptr[idx] = that->value.data.log; break; case LONG: this->value.data.lngptr[idx] = that->value.data.lng; break; case DOUBLE: this->value.data.dblptr[idx] = that->value.data.dbl; break; } } } else { row = gParse.nRows; idx = row * that->value.nelem; while( row-- ) { elem = that->value.nelem; jdx = row*this->value.nelem + offset; while( elem-- ) { this->value.undef[jdx+elem] = that->value.undef[--idx]; switch( this->type ) { case BOOLEAN: this->value.data.logptr[jdx+elem] = that->value.data.logptr[idx]; break; case LONG: this->value.data.lngptr[jdx+elem] = that->value.data.lngptr[idx]; break; case DOUBLE: this->value.data.dblptr[jdx+elem] = that->value.data.dblptr[idx]; break; } } } } offset += that->value.nelem; } } for( node=0; node < this->nSubNodes; node++ ) if( OPER(this->SubNodes[node])>0 ) free( gParse.Nodes[this->SubNodes[node]].value.data.ptr ); } /*****************************************************************************/ /* Utility routines which perform the calculations on bits and SAO regions */ /*****************************************************************************/ static char bitlgte(char *bits1, int oper, char *bits2) { int val1, val2, nextbit; char result; int i, l1, l2, length, ldiff; char stream[256]; char chr1, chr2; l1 = strlen(bits1); l2 = strlen(bits2); if (l1 < l2) { length = l2; ldiff = l2 - l1; i=0; while( ldiff-- ) stream[i++] = '0'; while( l1-- ) stream[i++] = *(bits1++); stream[i] = '\0'; bits1 = stream; } else if (l2 < l1) { length = l1; ldiff = l1 - l2; i=0; while( ldiff-- ) stream[i++] = '0'; while( l2-- ) stream[i++] = *(bits2++); stream[i] = '\0'; bits2 = stream; } else length = l1; val1 = val2 = 0; nextbit = 1; while( length-- ) { chr1 = bits1[length]; chr2 = bits2[length]; if ((chr1 != 'x')&&(chr1 != 'X')&&(chr2 != 'x')&&(chr2 != 'X')) { if (chr1 == '1') val1 += nextbit; if (chr2 == '1') val2 += nextbit; nextbit *= 2; } } result = 0; switch (oper) { case LT: if (val1 < val2) result = 1; break; case LTE: if (val1 <= val2) result = 1; break; case GT: if (val1 > val2) result = 1; break; case GTE: if (val1 >= val2) result = 1; break; } return (result); } static void bitand(char *result,char *bitstrm1,char *bitstrm2) { int i, l1, l2, ldiff; char stream[256]; char chr1, chr2; l1 = strlen(bitstrm1); l2 = strlen(bitstrm2); if (l1 < l2) { ldiff = l2 - l1; i=0; while( ldiff-- ) stream[i++] = '0'; while( l1-- ) stream[i++] = *(bitstrm1++); stream[i] = '\0'; bitstrm1 = stream; } else if (l2 < l1) { ldiff = l1 - l2; i=0; while( ldiff-- ) stream[i++] = '0'; while( l2-- ) stream[i++] = *(bitstrm2++); stream[i] = '\0'; bitstrm2 = stream; } while ( (chr1 = *(bitstrm1++)) ) { chr2 = *(bitstrm2++); if ((chr1 == 'x') || (chr2 == 'x')) *result = 'x'; else if ((chr1 == '1') && (chr2 == '1')) *result = '1'; else *result = '0'; result++; } *result = '\0'; } static void bitor(char *result,char *bitstrm1,char *bitstrm2) { int i, l1, l2, ldiff; char stream[256]; char chr1, chr2; l1 = strlen(bitstrm1); l2 = strlen(bitstrm2); if (l1 < l2) { ldiff = l2 - l1; i=0; while( ldiff-- ) stream[i++] = '0'; while( l1-- ) stream[i++] = *(bitstrm1++); stream[i] = '\0'; bitstrm1 = stream; } else if (l2 < l1) { ldiff = l1 - l2; i=0; while( ldiff-- ) stream[i++] = '0'; while( l2-- ) stream[i++] = *(bitstrm2++); stream[i] = '\0'; bitstrm2 = stream; } while ( (chr1 = *(bitstrm1++)) ) { chr2 = *(bitstrm2++); if ((chr1 == '1') || (chr2 == '1')) *result = '1'; else if ((chr1 == '0') || (chr2 == '0')) *result = '0'; else *result = 'x'; result++; } *result = '\0'; } static void bitnot(char *result,char *bits) { int length; char chr; length = strlen(bits); while( length-- ) { chr = *(bits++); *(result++) = ( chr=='1' ? '0' : ( chr=='0' ? '1' : chr ) ); } *result = '\0'; } static char bitcmp(char *bitstrm1, char *bitstrm2) { int i, l1, l2, ldiff; char stream[256]; char chr1, chr2; l1 = strlen(bitstrm1); l2 = strlen(bitstrm2); if (l1 < l2) { ldiff = l2 - l1; i=0; while( ldiff-- ) stream[i++] = '0'; while( l1-- ) stream[i++] = *(bitstrm1++); stream[i] = '\0'; bitstrm1 = stream; } else if (l2 < l1) { ldiff = l1 - l2; i=0; while( ldiff-- ) stream[i++] = '0'; while( l2-- ) stream[i++] = *(bitstrm2++); stream[i] = '\0'; bitstrm2 = stream; } while( (chr1 = *(bitstrm1++)) ) { chr2 = *(bitstrm2++); if ( ((chr1 == '0') && (chr2 == '1')) || ((chr1 == '1') && (chr2 == '0')) ) return( 0 ); } return( 1 ); } static char bnear(double x, double y, double tolerance) { if (fabs(x - y) < tolerance) return ( 1 ); else return ( 0 ); } static char saobox(double xcen, double ycen, double xwid, double ywid, double rot, double xcol, double ycol) { double x,y,xprime,yprime,xmin,xmax,ymin,ymax,theta; theta = (rot / 180.0) * myPI; xprime = xcol - xcen; yprime = ycol - ycen; x = xprime * cos(theta) + yprime * sin(theta); y = -xprime * sin(theta) + yprime * cos(theta); xmin = - 0.5 * xwid; xmax = 0.5 * xwid; ymin = - 0.5 * ywid; ymax = 0.5 * ywid; if ((x >= xmin) && (x <= xmax) && (y >= ymin) && (y <= ymax)) return ( 1 ); else return ( 0 ); } static char circle(double xcen, double ycen, double rad, double xcol, double ycol) { double r2,dx,dy,dlen; dx = xcol - xcen; dy = ycol - ycen; dx *= dx; dy *= dy; dlen = dx + dy; r2 = rad * rad; if (dlen <= r2) return ( 1 ); else return ( 0 ); } static char ellipse(double xcen, double ycen, double xrad, double yrad, double rot, double xcol, double ycol) { double x,y,xprime,yprime,dx,dy,dlen,theta; theta = (rot / 180.0) * myPI; xprime = xcol - xcen; yprime = ycol - ycen; x = xprime * cos(theta) + yprime * sin(theta); y = -xprime * sin(theta) + yprime * cos(theta); dx = x / xrad; dy = y / yrad; dx *= dx; dy *= dy; dlen = dx + dy; if (dlen <= 1.0) return ( 1 ); else return ( 0 ); } /* * Extract substring */ int cstrmid(char *dest_str, int dest_len, char *src_str, int src_len, int pos) { /* char fill_char = ' '; */ char fill_char = '\0'; if (src_len == 0) { src_len = strlen(src_str); } /* .. if constant */ /* Fill destination with blanks */ if (pos < 0) { yyerror("STRMID(S,P,N) P must be 0 or greater"); return -1; } if (pos > src_len || pos == 0) { /* pos==0: blank string requested */ memset(dest_str, fill_char, dest_len); } else if (pos+dest_len > src_len) { /* Copy a subset */ int nsub = src_len-pos+1; int npad = dest_len - nsub; memcpy(dest_str, src_str+pos-1, nsub); /* Fill remaining string with blanks */ memset(dest_str+nsub, fill_char, npad); } else { /* Full string copy */ memcpy(dest_str, src_str+pos-1, dest_len); } dest_str[dest_len] = '\0'; /* Null-terminate */ return 0; } static void yyerror(char *s) { char msg[80]; if( !gParse.status ) gParse.status = PARSE_SYNTAX_ERR; strncpy(msg, s, 80); msg[79] = '\0'; ffpmsg(msg); } astropy-1.1.1/cextern/cfitsio/group.h0000644001134200020070000000360612602615520020540 0ustar embrayscience00000000000000#define MAX_HDU_TRACKER 1000 typedef struct _HDUtracker HDUtracker; struct _HDUtracker { int nHDU; char *filename[MAX_HDU_TRACKER]; int position[MAX_HDU_TRACKER]; char *newFilename[MAX_HDU_TRACKER]; int newPosition[MAX_HDU_TRACKER]; }; /* functions used internally in the grouping convention module */ int ffgtdc(int grouptype, int xtensioncol, int extnamecol, int extvercol, int positioncol, int locationcol, int uricol, char *ttype[], char *tform[], int *ncols, int *status); int ffgtgc(fitsfile *gfptr, int *xtensionCol, int *extnameCol, int *extverCol, int *positionCol, int *locationCol, int *uriCol, int *grptype, int *status); int ffgmul(fitsfile *mfptr, int rmopt, int *status); int ffgmf(fitsfile *gfptr, char *xtension, char *extname, int extver, int position, char *location, long *member, int *status); int ffgtrmr(fitsfile *gfptr, HDUtracker *HDU, int *status); int ffgtcpr(fitsfile *infptr, fitsfile *outfptr, int cpopt, HDUtracker *HDU, int *status); int fftsad(fitsfile *mfptr, HDUtracker *HDU, int *newPosition, char *newFileName); int fftsud(fitsfile *mfptr, HDUtracker *HDU, int newPosition, char *newFileName); void prepare_keyvalue(char *keyvalue); int fits_path2url(char *inpath, char *outpath, int *status); int fits_url2path(char *inpath, char *outpath, int *status); int fits_get_cwd(char *cwd, int *status); int fits_get_url(fitsfile *fptr, char *realURL, char *startURL, char *realAccess, char *startAccess, int *iostate, int *status); int fits_clean_url(char *inURL, char *outURL, int *status); int fits_relurl2url(char *refURL, char *relURL, char *absURL, int *status); int fits_url2relurl(char *refURL, char *absURL, char *relURL, int *status); int fits_encode_url(char *inpath, char *outpath, int *status); int fits_unencode_url(char *inpath, char *outpath, int *status); int fits_is_url_absolute(char *url); astropy-1.1.1/cextern/cfitsio/fitscore.c0000644001134200020070000112202212602615517021216 0ustar embrayscience00000000000000/* This file, fitscore.c, contains the core set of FITSIO routines. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ /* Copyright (Unpublished--all rights reserved under the copyright laws of the United States), U.S. Government as represented by the Administrator of the National Aeronautics and Space Administration. No copyright is claimed in the United States under Title 17, U.S. Code. Permission to freely use, copy, modify, and distribute this software and its documentation without fee is hereby granted, provided that this copyright notice and disclaimer of warranty appears in all copies. DISCLAIMER: THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER." */ #include #include #include #include #include #include /* stddef.h is apparently needed to define size_t with some compilers ?? */ #include #include #include "fitsio2.h" #define errmsgsiz 25 #define ESMARKER 27 /* Escape character is used as error stack marker */ #define DelAll 1 /* delete all messages on the error stack */ #define DelMark 2 /* delete newest messages back to and including marker */ #define DelNewest 3 /* delete the newest message from the stack */ #define GetMesg 4 /* pop and return oldest message, ignoring marks */ #define PutMesg 5 /* add a new message to the stack */ #define PutMark 6 /* add a marker to the stack */ #ifdef _REENTRANT /* Fitsio_Lock and Fitsio_Pthread_Status are declared in fitsio2.h. */ pthread_mutex_t Fitsio_Lock; int Fitsio_Pthread_Status = 0; #endif int STREAM_DRIVER = 0; struct lconv *lcxxx; /*--------------------------------------------------------------------------*/ float ffvers(float *version) /* IO - version number */ /* return the current version number of the FITSIO software */ { *version = (float) 3.35; /* 23 May 2013 Previous releases: *version = 3.34 20 Mar 2013 *version = 3.33 14 Feb 2013 *version = 3.32 Oct 2012 *version = 3.31 18 Jul 2012 *version = 3.30 11 Apr 2012 *version = 3.29 22 Sep 2011 *version = 3.28 12 May 2011 *version = 3.27 3 Mar 2011 *version = 3.26 30 Dec 2010 *version = 3.25 9 June 2010 *version = 3.24 26 Jan 2010 *version = 3.23 7 Jan 2010 *version = 3.22 28 Oct 2009 *version = 3.21 24 Sep 2009 *version = 3.20 31 Aug 2009 *version = 3.18 12 May 2009 (beta version) *version = 3.14 18 Mar 2009 *version = 3.13 5 Jan 2009 *version = 3.12 8 Oct 2008 *version = 3.11 19 Sep 2008 *version = 3.10 20 Aug 2008 *version = 3.09 3 Jun 2008 *version = 3.08 15 Apr 2007 (internal release) *version = 3.07 5 Nov 2007 (internal release) *version = 3.06 27 Aug 2007 *version = 3.05 12 Jul 2007 (internal release) *version = 3.03 11 Dec 2006 *version = 3.02 18 Sep 2006 *version = 3.01 May 2006 included in FTOOLS 6.1 release *version = 3.006 20 Feb 2006 *version = 3.005 20 Dec 2005 (beta, in heasoft swift release *version = 3.004 16 Sep 2005 (beta, in heasoft swift release *version = 3.003 28 Jul 2005 (beta, in heasoft swift release *version = 3.002 15 Apr 2005 (beta) *version = 3.001 15 Mar 2005 (beta) released with heasoft 6.0 *version = 3.000 1 Mar 2005 (internal release only) *version = 2.51 2 Dec 2004 *version = 2.50 28 Jul 2004 *version = 2.49 11 Feb 2004 *version = 2.48 28 Jan 2004 *version = 2.470 18 Aug 2003 *version = 2.460 20 May 2003 *version = 2.450 30 Apr 2003 (internal release only) *version = 2.440 8 Jan 2003 *version = 2.430; 4 Nov 2002 *version = 2.420; 19 Jul 2002 *version = 2.410; 22 Apr 2002 used in ftools v5.2 *version = 2.401; 28 Jan 2002 *version = 2.400; 18 Jan 2002 *version = 2.301; 7 Dec 2001 *version = 2.300; 23 Oct 2001 *version = 2.204; 26 Jul 2001 *version = 2.203; 19 Jul 2001 used in ftools v5.1 *version = 2.202; 22 May 2001 *version = 2.201; 15 Mar 2001 *version = 2.200; 26 Jan 2001 *version = 2.100; 26 Sep 2000 *version = 2.037; 6 Jul 2000 *version = 2.036; 1 Feb 2000 *version = 2.035; 7 Dec 1999 (internal release only) *version = 2.034; 23 Nov 1999 *version = 2.033; 17 Sep 1999 *version = 2.032; 25 May 1999 *version = 2.031; 31 Mar 1999 *version = 2.030; 24 Feb 1999 *version = 2.029; 11 Feb 1999 *version = 2.028; 26 Jan 1999 *version = 2.027; 12 Jan 1999 *version = 2.026; 23 Dec 1998 *version = 2.025; 1 Dec 1998 *version = 2.024; 9 Nov 1998 *version = 2.023; 1 Nov 1998 first full release of V2.0 *version = 1.42; 30 Apr 1998 *version = 1.40; 6 Feb 1998 *version = 1.33; 16 Dec 1997 (internal release only) *version = 1.32; 21 Nov 1997 (internal release only) *version = 1.31; 4 Nov 1997 (internal release only) *version = 1.30; 11 Sep 1997 *version = 1.27; 3 Sep 1997 (internal release only) *version = 1.25; 2 Jul 1997 *version = 1.24; 2 May 1997 *version = 1.23; 24 Apr 1997 *version = 1.22; 18 Apr 1997 *version = 1.21; 26 Mar 1997 *version = 1.2; 29 Jan 1997 *version = 1.11; 04 Dec 1996 *version = 1.101; 13 Nov 1996 *version = 1.1; 6 Nov 1996 *version = 1.04; 17 Sep 1996 *version = 1.03; 20 Aug 1996 *version = 1.02; 15 Aug 1996 *version = 1.01; 12 Aug 1996 */ return(*version); } /*--------------------------------------------------------------------------*/ int ffflnm(fitsfile *fptr, /* I - FITS file pointer */ char *filename, /* O - name of the file */ int *status) /* IO - error status */ /* return the name of the FITS file */ { strcpy(filename,(fptr->Fptr)->filename); return(*status); } /*--------------------------------------------------------------------------*/ int ffflmd(fitsfile *fptr, /* I - FITS file pointer */ int *filemode, /* O - open mode of the file */ int *status) /* IO - error status */ /* return the access mode of the FITS file */ { *filemode = (fptr->Fptr)->writemode; return(*status); } /*--------------------------------------------------------------------------*/ void ffgerr(int status, /* I - error status value */ char *errtext) /* O - error message (max 30 char long + null) */ /* Return a short descriptive error message that corresponds to the input error status value. The message may be up to 30 characters long, plus the terminating null character. */ { errtext[0] = '\0'; if (status >= 0 && status < 300) { switch (status) { case 0: strcpy(errtext, "OK - no error"); break; case 1: strcpy(errtext, "non-CFITSIO program error"); break; case 101: strcpy(errtext, "same input and output files"); break; case 103: strcpy(errtext, "attempt to open too many files"); break; case 104: strcpy(errtext, "could not open the named file"); break; case 105: strcpy(errtext, "couldn't create the named file"); break; case 106: strcpy(errtext, "error writing to FITS file"); break; case 107: strcpy(errtext, "tried to move past end of file"); break; case 108: strcpy(errtext, "error reading from FITS file"); break; case 110: strcpy(errtext, "could not close the file"); break; case 111: strcpy(errtext, "array dimensions too big"); break; case 112: strcpy(errtext, "cannot write to readonly file"); break; case 113: strcpy(errtext, "could not allocate memory"); break; case 114: strcpy(errtext, "invalid fitsfile pointer"); break; case 115: strcpy(errtext, "NULL input pointer"); break; case 116: strcpy(errtext, "error seeking file position"); break; case 121: strcpy(errtext, "invalid URL prefix"); break; case 122: strcpy(errtext, "too many I/O drivers"); break; case 123: strcpy(errtext, "I/O driver init failed"); break; case 124: strcpy(errtext, "no I/O driver for this URLtype"); break; case 125: strcpy(errtext, "parse error in input file URL"); break; case 126: strcpy(errtext, "parse error in range list"); break; case 151: strcpy(errtext, "bad argument (shared mem drvr)"); break; case 152: strcpy(errtext, "null ptr arg (shared mem drvr)"); break; case 153: strcpy(errtext, "no free shared memory handles"); break; case 154: strcpy(errtext, "share mem drvr not initialized"); break; case 155: strcpy(errtext, "IPC system error (shared mem)"); break; case 156: strcpy(errtext, "no memory (shared mem drvr)"); break; case 157: strcpy(errtext, "share mem resource deadlock"); break; case 158: strcpy(errtext, "lock file open/create failed"); break; case 159: strcpy(errtext, "can't resize share mem block"); break; case 201: strcpy(errtext, "header already has keywords"); break; case 202: strcpy(errtext, "keyword not found in header"); break; case 203: strcpy(errtext, "keyword number out of bounds"); break; case 204: strcpy(errtext, "keyword value is undefined"); break; case 205: strcpy(errtext, "string missing closing quote"); break; case 206: strcpy(errtext, "error in indexed keyword name"); break; case 207: strcpy(errtext, "illegal character in keyword"); break; case 208: strcpy(errtext, "required keywords out of order"); break; case 209: strcpy(errtext, "keyword value not positive int"); break; case 210: strcpy(errtext, "END keyword not found"); break; case 211: strcpy(errtext, "illegal BITPIX keyword value"); break; case 212: strcpy(errtext, "illegal NAXIS keyword value"); break; case 213: strcpy(errtext, "illegal NAXISn keyword value"); break; case 214: strcpy(errtext, "illegal PCOUNT keyword value"); break; case 215: strcpy(errtext, "illegal GCOUNT keyword value"); break; case 216: strcpy(errtext, "illegal TFIELDS keyword value"); break; case 217: strcpy(errtext, "negative table row size"); break; case 218: strcpy(errtext, "negative number of rows"); break; case 219: strcpy(errtext, "named column not found"); break; case 220: strcpy(errtext, "illegal SIMPLE keyword value"); break; case 221: strcpy(errtext, "first keyword not SIMPLE"); break; case 222: strcpy(errtext, "second keyword not BITPIX"); break; case 223: strcpy(errtext, "third keyword not NAXIS"); break; case 224: strcpy(errtext, "missing NAXISn keywords"); break; case 225: strcpy(errtext, "first keyword not XTENSION"); break; case 226: strcpy(errtext, "CHDU not an ASCII table"); break; case 227: strcpy(errtext, "CHDU not a binary table"); break; case 228: strcpy(errtext, "PCOUNT keyword not found"); break; case 229: strcpy(errtext, "GCOUNT keyword not found"); break; case 230: strcpy(errtext, "TFIELDS keyword not found"); break; case 231: strcpy(errtext, "missing TBCOLn keyword"); break; case 232: strcpy(errtext, "missing TFORMn keyword"); break; case 233: strcpy(errtext, "CHDU not an IMAGE extension"); break; case 234: strcpy(errtext, "illegal TBCOLn keyword value"); break; case 235: strcpy(errtext, "CHDU not a table extension"); break; case 236: strcpy(errtext, "column exceeds width of table"); break; case 237: strcpy(errtext, "more than 1 matching col. name"); break; case 241: strcpy(errtext, "row width not = field widths"); break; case 251: strcpy(errtext, "unknown FITS extension type"); break; case 252: strcpy(errtext, "1st key not SIMPLE or XTENSION"); break; case 253: strcpy(errtext, "END keyword is not blank"); break; case 254: strcpy(errtext, "Header fill area not blank"); break; case 255: strcpy(errtext, "Data fill area invalid"); break; case 261: strcpy(errtext, "illegal TFORM format code"); break; case 262: strcpy(errtext, "unknown TFORM datatype code"); break; case 263: strcpy(errtext, "illegal TDIMn keyword value"); break; case 264: strcpy(errtext, "invalid BINTABLE heap pointer"); break; default: strcpy(errtext, "unknown error status"); break; } } else if (status < 600) { switch(status) { case 301: strcpy(errtext, "illegal HDU number"); break; case 302: strcpy(errtext, "column number < 1 or > tfields"); break; case 304: strcpy(errtext, "negative byte address"); break; case 306: strcpy(errtext, "negative number of elements"); break; case 307: strcpy(errtext, "bad first row number"); break; case 308: strcpy(errtext, "bad first element number"); break; case 309: strcpy(errtext, "not an ASCII (A) column"); break; case 310: strcpy(errtext, "not a logical (L) column"); break; case 311: strcpy(errtext, "bad ASCII table datatype"); break; case 312: strcpy(errtext, "bad binary table datatype"); break; case 314: strcpy(errtext, "null value not defined"); break; case 317: strcpy(errtext, "not a variable length column"); break; case 320: strcpy(errtext, "illegal number of dimensions"); break; case 321: strcpy(errtext, "1st pixel no. > last pixel no."); break; case 322: strcpy(errtext, "BSCALE or TSCALn = 0."); break; case 323: strcpy(errtext, "illegal axis length < 1"); break; case 340: strcpy(errtext, "not group table"); break; case 341: strcpy(errtext, "HDU already member of group"); break; case 342: strcpy(errtext, "group member not found"); break; case 343: strcpy(errtext, "group not found"); break; case 344: strcpy(errtext, "bad group id"); break; case 345: strcpy(errtext, "too many HDUs tracked"); break; case 346: strcpy(errtext, "HDU alread tracked"); break; case 347: strcpy(errtext, "bad Grouping option"); break; case 348: strcpy(errtext, "identical pointers (groups)"); break; case 360: strcpy(errtext, "malloc failed in parser"); break; case 361: strcpy(errtext, "file read error in parser"); break; case 362: strcpy(errtext, "null pointer arg (parser)"); break; case 363: strcpy(errtext, "empty line (parser)"); break; case 364: strcpy(errtext, "cannot unread > 1 line"); break; case 365: strcpy(errtext, "parser too deeply nested"); break; case 366: strcpy(errtext, "file open failed (parser)"); break; case 367: strcpy(errtext, "hit EOF (parser)"); break; case 368: strcpy(errtext, "bad argument (parser)"); break; case 369: strcpy(errtext, "unexpected token (parser)"); break; case 401: strcpy(errtext, "bad int to string conversion"); break; case 402: strcpy(errtext, "bad float to string conversion"); break; case 403: strcpy(errtext, "keyword value not integer"); break; case 404: strcpy(errtext, "keyword value not logical"); break; case 405: strcpy(errtext, "keyword value not floating pt"); break; case 406: strcpy(errtext, "keyword value not double"); break; case 407: strcpy(errtext, "bad string to int conversion"); break; case 408: strcpy(errtext, "bad string to float conversion"); break; case 409: strcpy(errtext, "bad string to double convert"); break; case 410: strcpy(errtext, "illegal datatype code value"); break; case 411: strcpy(errtext, "illegal no. of decimals"); break; case 412: strcpy(errtext, "datatype conversion overflow"); break; case 413: strcpy(errtext, "error compressing image"); break; case 414: strcpy(errtext, "error uncompressing image"); break; case 420: strcpy(errtext, "bad date or time conversion"); break; case 431: strcpy(errtext, "syntax error in expression"); break; case 432: strcpy(errtext, "expression result wrong type"); break; case 433: strcpy(errtext, "vector result too large"); break; case 434: strcpy(errtext, "missing output column"); break; case 435: strcpy(errtext, "bad data in parsed column"); break; case 436: strcpy(errtext, "output extension of wrong type"); break; case 501: strcpy(errtext, "WCS angle too large"); break; case 502: strcpy(errtext, "bad WCS coordinate"); break; case 503: strcpy(errtext, "error in WCS calculation"); break; case 504: strcpy(errtext, "bad WCS projection type"); break; case 505: strcpy(errtext, "WCS keywords not found"); break; default: strcpy(errtext, "unknown error status"); break; } } else { strcpy(errtext, "unknown error status"); } return; } /*--------------------------------------------------------------------------*/ void ffpmsg(const char *err_message) /* put message on to error stack */ { ffxmsg(PutMesg, (char *)err_message); return; } /*--------------------------------------------------------------------------*/ void ffpmrk(void) /* write a marker to the stack. It is then possible to pop only those messages following the marker off of the stack, leaving the previous messages unaffected. The marker is ignored by the ffgmsg routine. */ { char *dummy = 0; ffxmsg(PutMark, dummy); return; } /*--------------------------------------------------------------------------*/ int ffgmsg(char *err_message) /* get oldest message from error stack, ignoring markers */ { ffxmsg(GetMesg, err_message); return(*err_message); } /*--------------------------------------------------------------------------*/ void ffcmsg(void) /* erase all messages in the error stack */ { char *dummy = 0; ffxmsg(DelAll, dummy); return; } /*--------------------------------------------------------------------------*/ void ffcmrk(void) /* erase newest messages in the error stack, stopping if a marker is found. The marker is also erased in this case. */ { char *dummy = 0; ffxmsg(DelMark, dummy); return; } /*--------------------------------------------------------------------------*/ void ffxmsg( int action, char *errmsg) /* general routine to get, put, or clear the error message stack. Use a static array rather than allocating memory as needed for the error messages because it is likely to be more efficient and simpler to implement. Action Code: DelAll 1 delete all messages on the error stack DelMark 2 delete messages back to and including the 1st marker DelNewest 3 delete the newest message from the stack GetMesg 4 pop and return oldest message, ignoring marks PutMesg 5 add a new message to the stack PutMark 6 add a marker to the stack */ { int ii; char markflag; static char *txtbuff[errmsgsiz], *tmpbuff, *msgptr; static char errbuff[errmsgsiz][81]; /* initialize all = \0 */ static int nummsg = 0; FFLOCK; if (action == DelAll) /* clear the whole message stack */ { for (ii = 0; ii < nummsg; ii ++) *txtbuff[ii] = '\0'; nummsg = 0; } else if (action == DelMark) /* clear up to and including first marker */ { while (nummsg > 0) { nummsg--; markflag = *txtbuff[nummsg]; /* store possible marker character */ *txtbuff[nummsg] = '\0'; /* clear the buffer for this msg */ if (markflag == ESMARKER) break; /* found a marker, so quit */ } } else if (action == DelNewest) /* remove newest message from stack */ { if (nummsg > 0) { nummsg--; *txtbuff[nummsg] = '\0'; /* clear the buffer for this msg */ } } else if (action == GetMesg) /* pop and return oldest message from stack */ { /* ignoring markers */ while (nummsg > 0) { strcpy(errmsg, txtbuff[0]); /* copy oldest message to output */ *txtbuff[0] = '\0'; /* clear the buffer for this msg */ nummsg--; for (ii = 0; ii < nummsg; ii++) txtbuff[ii] = txtbuff[ii + 1]; /* shift remaining pointers */ if (errmsg[0] != ESMARKER) { /* quit if this is not a marker */ FFUNLOCK; return; } } errmsg[0] = '\0'; /* no messages in the stack */ } else if (action == PutMesg) /* add new message to stack */ { msgptr = errmsg; while (strlen(msgptr)) { if (nummsg == errmsgsiz) { tmpbuff = txtbuff[0]; /* buffers full; reuse oldest buffer */ *txtbuff[0] = '\0'; /* clear the buffer for this msg */ nummsg--; for (ii = 0; ii < nummsg; ii++) txtbuff[ii] = txtbuff[ii + 1]; /* shift remaining pointers */ txtbuff[nummsg] = tmpbuff; /* set pointer for the new message */ } else { for (ii = 0; ii < errmsgsiz; ii++) { if (*errbuff[ii] == '\0') /* find first empty buffer */ { txtbuff[nummsg] = errbuff[ii]; break; } } } strncat(txtbuff[nummsg], msgptr, 80); nummsg++; msgptr += minvalue(80, strlen(msgptr)); } } else if (action == PutMark) /* put a marker on the stack */ { if (nummsg == errmsgsiz) { tmpbuff = txtbuff[0]; /* buffers full; reuse oldest buffer */ *txtbuff[0] = '\0'; /* clear the buffer for this msg */ nummsg--; for (ii = 0; ii < nummsg; ii++) txtbuff[ii] = txtbuff[ii + 1]; /* shift remaining pointers */ txtbuff[nummsg] = tmpbuff; /* set pointer for the new message */ } else { for (ii = 0; ii < errmsgsiz; ii++) { if (*errbuff[ii] == '\0') /* find first empty buffer */ { txtbuff[nummsg] = errbuff[ii]; break; } } } *txtbuff[nummsg] = ESMARKER; /* write the marker */ *(txtbuff[nummsg] + 1) = '\0'; nummsg++; } FFUNLOCK; return; } /*--------------------------------------------------------------------------*/ int ffpxsz(int datatype) /* return the number of bytes per pixel associated with the datatype */ { if (datatype == TBYTE) return(sizeof(char)); else if (datatype == TUSHORT) return(sizeof(short)); else if (datatype == TSHORT) return(sizeof(short)); else if (datatype == TULONG) return(sizeof(long)); else if (datatype == TLONG) return(sizeof(long)); else if (datatype == TINT) return(sizeof(int)); else if (datatype == TUINT) return(sizeof(int)); else if (datatype == TFLOAT) return(sizeof(float)); else if (datatype == TDOUBLE) return(sizeof(double)); else if (datatype == TLOGICAL) return(sizeof(char)); else return(0); } /*--------------------------------------------------------------------------*/ int fftkey(const char *keyword, /* I - keyword name */ int *status) /* IO - error status */ /* Test that the keyword name conforms to the FITS standard. Must contain only capital letters, digits, minus or underscore chars. Trailing spaces are allowed. If the input status value is less than zero, then the test is modified so that upper or lower case letters are allowed, and no error messages are printed if the keyword is not legal. */ { size_t maxchr, ii; int spaces=0; char msg[81], testchar; if (*status > 0) /* inherit input status value if > 0 */ return(*status); maxchr=strlen(keyword); if (maxchr > 8) maxchr = 8; for (ii = 0; ii < maxchr; ii++) { if (*status == 0) testchar = keyword[ii]; else testchar = toupper(keyword[ii]); if ( (testchar >= 'A' && testchar <= 'Z') || (testchar >= '0' && testchar <= '9') || testchar == '-' || testchar == '_' ) { if (spaces) { if (*status == 0) { /* don't print error message if status < 0 */ sprintf(msg, "Keyword name contains embedded space(s): %.8s", keyword); ffpmsg(msg); } return(*status = BAD_KEYCHAR); } } else if (keyword[ii] == ' ') spaces = 1; else { if (*status == 0) { /* don't print error message if status < 0 */ sprintf(msg, "Character %d in this keyword is illegal: %.8s", (int) (ii+1), keyword); ffpmsg(msg); /* explicitly flag the 2 most common cases */ if (keyword[ii] == 0) ffpmsg(" (This a NULL (0) character)."); else if (keyword[ii] == 9) ffpmsg(" (This an ASCII TAB (9) character)."); } return(*status = BAD_KEYCHAR); } } return(*status); } /*--------------------------------------------------------------------------*/ int fftrec(char *card, /* I - keyword card to test */ int *status) /* IO - error status */ /* Test that the keyword card conforms to the FITS standard. Must contain only printable ASCII characters; */ { size_t ii, maxchr; char msg[81]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); maxchr = strlen(card); for (ii = 8; ii < maxchr; ii++) { if (card[ii] < 32 || card[ii] > 126) { sprintf(msg, "Character %d in this keyword is illegal. Hex Value = %X", (int) (ii+1), (int) card[ii] ); if (card[ii] == 0) strcat(msg, " (NULL char.)"); else if (card[ii] == 9) strcat(msg, " (TAB char.)"); else if (card[ii] == 10) strcat(msg, " (Line Feed char.)"); else if (card[ii] == 11) strcat(msg, " (Vertical Tab)"); else if (card[ii] == 12) strcat(msg, " (Form Feed char.)"); else if (card[ii] == 13) strcat(msg, " (Carriage Return)"); else if (card[ii] == 27) strcat(msg, " (Escape char.)"); else if (card[ii] == 127) strcat(msg, " (Delete char.)"); ffpmsg(msg); strncpy(msg, card, 80); msg[80] = '\0'; ffpmsg(msg); return(*status = BAD_KEYCHAR); } } return(*status); } /*--------------------------------------------------------------------------*/ void ffupch(char *string) /* convert string to upper case, in place. */ { size_t len, ii; len = strlen(string); for (ii = 0; ii < len; ii++) string[ii] = toupper(string[ii]); return; } /*--------------------------------------------------------------------------*/ int ffmkky(const char *keyname, /* I - keyword name */ char *value, /* I - keyword value */ const char *comm, /* I - keyword comment */ char *card, /* O - constructed keyword card */ int *status) /* IO - status value */ /* Make a complete FITS 80-byte keyword card from the input name, value and comment strings. Output card is null terminated without any trailing blanks. */ { size_t namelen, len, ii; char tmpname[FLEN_KEYWORD], *cptr; int tstatus = -1, nblank = 0; if (*status > 0) return(*status); *tmpname = '\0'; *card = '\0'; while(*(keyname + nblank) == ' ') /* skip leading blanks in the name */ nblank++; strncat(tmpname, keyname + nblank, FLEN_KEYWORD - 1); len = strlen(value); namelen = strlen(tmpname); if (namelen) { cptr = tmpname + namelen - 1; while(*cptr == ' ') /* skip trailing blanks */ { *cptr = '\0'; cptr--; } namelen = cptr - tmpname + 1; } if (namelen <= 8 && (fftkey(keyname, &tstatus) <= 0) ) { /* a normal FITS keyword */ strcat(card, tmpname); /* copy keyword name to buffer */ for (ii = namelen; ii < 8; ii++) card[ii] = ' '; /* pad keyword name with spaces */ card[8] = '='; /* append '= ' in columns 9-10 */ card[9] = ' '; card[10] = '\0'; /* terminate the partial string */ namelen = 10; } else { /* use the ESO HIERARCH convention for longer keyword names */ /* check that the name does not contain an '=' (equals sign) */ if (strchr(tmpname, '=') ) { ffpmsg("Illegal keyword name; contains an equals sign (=)"); ffpmsg(tmpname); return(*status = BAD_KEYCHAR); } /* Don't repeat HIERARCH if the keyword already contains it */ if (FSTRNCMP(tmpname, "HIERARCH ", 9) && FSTRNCMP(tmpname, "hierarch ", 9)) strcat(card, "HIERARCH "); else namelen -= 9; /* deleted the string 'HIERARCH ' */ strcat(card, tmpname); if (namelen + 12 + len > 80) { /* save 1 char by not putting a space before the equals sign */ strcat(card, "= "); namelen += 11; } else { strcat(card, " = "); namelen += 12; } } if (len > 0) { if (value[0] == '\'') /* is this a quoted string value? */ { if (namelen > 77) { ffpmsg( "The following keyword + value is too long to fit on a card:"); ffpmsg(keyname); ffpmsg(value); return(*status = BAD_KEYCHAR); } strncat(card, value, 80 - namelen); /* append the value string */ len = minvalue(80, namelen + len); /* restore the closing quote if it got truncated */ if (len == 80) { card[79] = '\''; } if (comm) { if (comm[0] != 0) { if (len < 30) { for (ii = len; ii < 30; ii++) card[ii] = ' '; /* fill with spaces to col 30 */ card[30] = '\0'; len = 30; } } } } else { if (namelen + len > 80) { ffpmsg( "The following keyword + value is too long to fit on a card:"); ffpmsg(keyname); ffpmsg(value); return(*status = BAD_KEYCHAR); } else if (namelen + len < 30) { /* add spaces so field ends at least in col 30 */ strncat(card, " ", 30 - (namelen + len)); } strncat(card, value, 80 - namelen); /* append the value string */ len = minvalue(80, namelen + len); len = maxvalue(30, len); } if (comm) { if ((len < 77) && ( strlen(comm) > 0) ) /* room for a comment? */ { strcat(card, " / "); /* append comment separator */ strncat(card, comm, 77 - len); /* append comment (what fits) */ } } } else { if (namelen == 10) /* This case applies to normal keywords only */ { card[8] = ' '; /* keywords with no value have no '=' */ if (comm) { strncat(card, comm, 80 - namelen); /* append comment (what fits) */ } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffmkey(fitsfile *fptr, /* I - FITS file pointer */ const char *card, /* I - card string value */ int *status) /* IO - error status */ /* replace the previously read card (i.e. starting 80 bytes before the (fptr->Fptr)->nextkey position) with the contents of the input card. */ { char tcard[81]; size_t len, ii; /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); strncpy(tcard,card,80); tcard[80] = '\0'; len = strlen(tcard); /* silently replace any illegal characters with a space */ for (ii=0; ii < len; ii++) if (tcard[ii] < ' ' || tcard[ii] > 126) tcard[ii] = ' '; for (ii=len; ii < 80; ii++) /* fill card with spaces if necessary */ tcard[ii] = ' '; for (ii=0; ii < 8; ii++) /* make sure keyword name is uppercase */ tcard[ii] = toupper(tcard[ii]); fftkey(tcard, status); /* test keyword name contains legal chars */ /* no need to do this any more, since any illegal characters have been removed fftrec(tcard, status); */ /* test rest of keyword for legal chars */ /* move position of keyword to be over written */ ffmbyt(fptr, ((fptr->Fptr)->nextkey) - 80, REPORT_EOF, status); ffpbyt(fptr, 80, tcard, status); /* write the 80 byte card */ return(*status); } /*--------------------------------------------------------------------------*/ int ffkeyn(const char *keyroot, /* I - root string for keyword name */ int value, /* I - index number to be appended to root name */ char *keyname, /* O - output root + index keyword name */ int *status) /* IO - error status */ /* Construct a keyword name string by appending the index number to the root. e.g., if root = "TTYPE" and value = 12 then keyname = "TTYPE12". */ { char suffix[16]; size_t rootlen; keyname[0] = '\0'; /* initialize output name to null */ rootlen = strlen(keyroot); if (rootlen == 0 || rootlen > 7 || value < 0 ) return(*status = 206); sprintf(suffix, "%d", value); /* construct keyword suffix */ if ( strlen(suffix) + rootlen > 8) return(*status = 206); strcpy(keyname, keyroot); /* copy root string to name string */ strcat(keyname, suffix); /* append suffix to the root */ return(*status); } /*--------------------------------------------------------------------------*/ int ffnkey(int value, /* I - index number to be appended to root name */ const char *keyroot, /* I - root string for keyword name */ char *keyname, /* O - output root + index keyword name */ int *status) /* IO - error status */ /* Construct a keyword name string by appending the root string to the index number. e.g., if root = "TTYPE" and value = 12 then keyname = "12TTYPE". */ { size_t rootlen; keyname[0] = '\0'; /* initialize output name to null */ rootlen = strlen(keyroot); if (rootlen == 0 || rootlen > 7 || value < 0 ) return(*status = 206); sprintf(keyname, "%d", value); /* construct keyword prefix */ if (rootlen + strlen(keyname) > 8) return(*status = 206); strcat(keyname, keyroot); /* append root to the prefix */ return(*status); } /*--------------------------------------------------------------------------*/ int ffpsvc(char *card, /* I - FITS header card (nominally 80 bytes long) */ char *value, /* O - value string parsed from the card */ char *comm, /* O - comment string parsed from the card */ int *status) /* IO - error status */ /* ParSe the Value and Comment strings from the input header card string. If the card contains a quoted string value, the returned value string includes the enclosing quote characters. If comm = NULL, don't return the comment string. */ { int jj; size_t ii, cardlen, nblank, valpos; if (*status > 0) return(*status); value[0] = '\0'; if (comm) comm[0] = '\0'; cardlen = strlen(card); /* support for ESO HIERARCH keywords; find the '=' */ if (FSTRNCMP(card, "HIERARCH ", 9) == 0) { valpos = strcspn(card, "="); if (valpos == cardlen) /* no value indicator ??? */ { if (comm != NULL) { if (cardlen > 8) { strcpy(comm, &card[8]); jj=cardlen - 8; for (jj--; jj >= 0; jj--) /* replace trailing blanks with nulls */ { if (comm[jj] == ' ') comm[jj] = '\0'; else break; } } } return(*status); /* no value indicator */ } valpos++; /* point to the position after the '=' */ } else if (cardlen < 9 || FSTRNCMP(card, "COMMENT ", 8) == 0 || /* keywords with no value */ FSTRNCMP(card, "HISTORY ", 8) == 0 || FSTRNCMP(card, "END ", 8) == 0 || FSTRNCMP(card, " ", 8) == 0 || FSTRNCMP(&card[8], "= ", 2) != 0 ) /* no '= ' in cols 9-10 */ { /* no value, so the comment extends from cols 9 - 80 */ if (comm != NULL) { if (cardlen > 8) { strcpy(comm, &card[8]); jj=cardlen - 8; for (jj--; jj >= 0; jj--) /* replace trailing blanks with nulls */ { if (comm[jj] == ' ') comm[jj] = '\0'; else break; } } } return(*status); } else { valpos = 10; /* starting position of the value field */ } nblank = strspn(&card[valpos], " "); /* find number of leading blanks */ if (nblank + valpos == cardlen) { /* the absence of a value string is legal, and simply indicates that the keyword value is undefined. Don't write an error message in this case. */ return(*status); } ii = valpos + nblank; if (card[ii] == '/' ) /* slash indicates start of the comment */ { ii++; } else if (card[ii] == '\'' ) /* is this a quoted string value? */ { value[0] = card[ii]; for (jj=1, ii++; ii < cardlen; ii++, jj++) { if (card[ii] == '\'') /* is this the closing quote? */ { if (card[ii+1] == '\'') /* 2 successive quotes? */ { value[jj] = card[ii]; ii++; jj++; } else { value[jj] = card[ii]; break; /* found the closing quote, so exit this loop */ } } value[jj] = card[ii]; /* copy the next character to the output */ } if (ii == cardlen) { jj = minvalue(jj, 69); /* don't exceed 70 char string length */ value[jj] = '\''; /* close the bad value string */ value[jj+1] = '\0'; /* terminate the bad value string */ ffpmsg("This keyword string value has no closing quote:"); ffpmsg(card); /* May 2008 - modified to not fail on this minor error */ /* return(*status = NO_QUOTE); */ } else { value[jj+1] = '\0'; /* terminate the good value string */ ii++; /* point to the character following the value */ } } else if (card[ii] == '(' ) /* is this a complex value? */ { nblank = strcspn(&card[ii], ")" ); /* find closing ) */ if (nblank == strlen( &card[ii] ) ) { ffpmsg("This complex keyword value has no closing ')':"); ffpmsg(card); return(*status = NO_QUOTE); } nblank++; strncpy(value, &card[ii], nblank); value[nblank] = '\0'; ii = ii + nblank; } else /* an integer, floating point, or logical FITS value string */ { nblank = strcspn(&card[ii], " /"); /* find the end of the token */ strncpy(value, &card[ii], nblank); value[nblank] = '\0'; ii = ii + nblank; } /* now find the comment string, if any */ if (comm) { nblank = strspn(&card[ii], " "); /* find next non-space character */ ii = ii + nblank; if (ii < 80) { if (card[ii] == '/') /* ignore the slash separator */ { ii++; if (card[ii] == ' ') /* also ignore the following space */ ii++; } strcat(comm, &card[ii]); /* copy the remaining characters */ jj=strlen(comm); for (jj--; jj >= 0; jj--) /* replace trailing blanks with nulls */ { if (comm[jj] == ' ') comm[jj] = '\0'; else break; } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgthd(char *tmplt, /* I - input header template string */ char *card, /* O - returned FITS header record */ int *hdtype, /* O - how to interpreter the returned card string */ /* -2 = modify the name of a keyword; the old keyword name is returned starting at address chars[0]; the new name is returned starting at address char[40] (to be consistent with the Fortran version). Both names are null terminated. -1 = card contains the name of a keyword that is to be deleted 0 = append this keyword if it doesn't already exist, or modify the value if the keyword already exists. 1 = append this comment keyword ('HISTORY', 'COMMENT', or blank keyword name) 2 = this is the END keyword; do not write it to the header */ int *status) /* IO - error status */ /* 'Get Template HeaDer' parse a template header line and create a formated character string which is suitable for appending to a FITS header */ { char keyname[FLEN_KEYWORD], value[140], comment[140]; char *tok, *suffix, *loc, tvalue[140]; int len, vlen, more, tstatus; double dval; if (*status > 0) return(*status); card[0] = '\0'; *hdtype = 0; if (!FSTRNCMP(tmplt, " ", 8) ) { /* if first 8 chars of template are blank, then this is a comment */ strncat(card, tmplt, 80); *hdtype = 1; return(*status); } tok = tmplt; /* point to start of template string */ keyname[0] = '\0'; value[0] = '\0'; comment[0] = '\0'; len = strspn(tok, " "); /* no. of spaces before keyword */ tok += len; /* test for pecular case where token is a string of dashes */ if (strncmp(tok, "--------------------", 20) == 0) return(*status = BAD_KEYCHAR); if (tok[0] == '-') /* is there a leading minus sign? */ { /* first token is name of keyword to be deleted or renamed */ *hdtype = -1; tok++; len = strspn(tok, " "); /* no. of spaces before keyword */ tok += len; if (len < 8) /* not a blank name? */ { len = strcspn(tok, " ="); /* length of name */ if (len >= FLEN_KEYWORD) return(*status = BAD_KEYCHAR); strncat(card, tok, len); /* The HIERARCH convention supports non-standard characters in the keyword name, so don't always convert to upper case or abort if there are illegal characters in the name or if the name is greater than 8 characters long. */ if (len < 9) /* this is possibly a normal FITS keyword name */ { ffupch(card); tstatus = 0; if (fftkey(card, &tstatus) > 0) { /* name contained non-standard characters, so reset */ card[0] = '\0'; strncat(card, tok, len); } } tok += len; } /* second token, if present, is the new name for the keyword */ len = strspn(tok, " "); /* no. of spaces before next token */ tok += len; if (tok[0] == '\0' || tok[0] == '=') return(*status); /* no second token */ *hdtype = -2; len = strcspn(tok, " "); /* length of new name */ if (len > 40) /* name has to fit on columns 41-80 of card */ return(*status = BAD_KEYCHAR); /* copy the new name to card + 40; This is awkward, */ /* but is consistent with the way the Fortran FITSIO works */ strcat(card," "); strncpy(&card[40], tok, len+1); /* copy len+1 to get terminator */ /* The HIERARCH convention supports non-standard characters in the keyword name, so don't always convert to upper case or abort if there are illegal characters in the name or if the name is greater than 8 characters long. */ if (len < 9) /* this is possibly a normal FITS keyword name */ { ffupch(&card[40]); tstatus = 0; if (fftkey(&card[40], &tstatus) > 0) { /* name contained non-standard characters, so reset */ strncpy(&card[40], tok, len); } } } else /* no negative sign at beginning of template */ { /* get the keyword name token */ len = strcspn(tok, " ="); /* length of keyword name */ if (len >= FLEN_KEYWORD) return(*status = BAD_KEYCHAR); strncat(keyname, tok, len); /* The HIERARCH convention supports non-standard characters in the keyword name, so don't always convert to upper case or abort if there are illegal characters in the name or if the name is greater than 8 characters long. */ if (len < 9) /* this is possibly a normal FITS keyword name */ { ffupch(keyname); tstatus = 0; if (fftkey(keyname, &tstatus) > 0) { /* name contained non-standard characters, so reset */ keyname[0] = '\0'; strncat(keyname, tok, len); } } if (!FSTRCMP(keyname, "END") ) { strcpy(card, "END"); *hdtype = 2; return(*status); } tok += len; /* move token pointer to end of the keyword */ if (!FSTRCMP(keyname, "COMMENT") || !FSTRCMP(keyname, "HISTORY") || !FSTRCMP(keyname, "HIERARCH") ) { *hdtype = 1; /* simply append COMMENT and HISTORY keywords */ strcpy(card, keyname); strncat(card, tok, 73); return(*status); } /* look for the value token */ len = strspn(tok, " ="); /* spaces or = between name and value */ tok += len; if (*tok == '\'') /* is value enclosed in quotes? */ { more = TRUE; while (more) { tok++; /* temporarily move past the quote char */ len = strcspn(tok, "'"); /* length of quoted string */ tok--; strncat(value, tok, len + 2); tok += len + 1; if (tok[0] != '\'') /* check there is a closing quote */ return(*status = NO_QUOTE); tok++; if (tok[0] != '\'') /* 2 quote chars = literal quote */ more = FALSE; } } else if (*tok == '/' || *tok == '\0') /* There is no value */ { strcat(value, " "); } else /* not a quoted string value */ { len = strcspn(tok, " /"); /* length of value string */ strncat(value, tok, len); if (!( (tok[0] == 'T' || tok[0] == 'F') && (tok[1] == ' ' || tok[1] == '/' || tok[1] == '\0') )) { /* not a logical value */ dval = strtod(value, &suffix); /* try to read value as number */ if (*suffix != '\0' && *suffix != ' ' && *suffix != '/') { /* value not recognized as a number; might be because it */ /* contains a 'd' or 'D' exponent character */ strcpy(tvalue, value); if ((loc = strchr(tvalue, 'D'))) { *loc = 'E'; /* replace D's with E's. */ dval = strtod(tvalue, &suffix); /* read value again */ } else if ((loc = strchr(tvalue, 'd'))) { *loc = 'E'; /* replace d's with E's. */ dval = strtod(tvalue, &suffix); /* read value again */ } else if ((loc = strchr(tvalue, '.'))) { *loc = ','; /* replace period with a comma */ dval = strtod(tvalue, &suffix); /* read value again */ } } if (*suffix != '\0' && *suffix != ' ' && *suffix != '/') { /* value is not a number; must enclose it in quotes */ strcpy(value, "'"); strncat(value, tok, len); strcat(value, "'"); /* the following useless statement stops the compiler warning */ /* that dval is not used anywhere */ if (dval == 0.) len += (int) dval; } else { /* value is a number; convert any 'e' to 'E', or 'd' to 'D' */ loc = strchr(value, 'e'); if (loc) { *loc = 'E'; } else { loc = strchr(value, 'd'); if (loc) { *loc = 'D'; } } } } tok += len; } len = strspn(tok, " /"); /* no. of spaces between value and comment */ tok += len; vlen = strlen(value); if (vlen > 0 && vlen < 10 && value[0] == '\'') { /* pad quoted string with blanks so it is at least 8 chars long */ value[vlen-1] = '\0'; strncat(value, " ", 10 - vlen); strcat(&value[9], "'"); } /* get the comment string */ strncat(comment, tok, 70); /* construct the complete FITS header card */ ffmkky(keyname, value, comment, card, status); } return(*status); } /*--------------------------------------------------------------------------*/ int fits_translate_keyword( char *inrec, /* I - input string */ char *outrec, /* O - output converted string, or */ /* a null string if input does not */ /* match any of the patterns */ char *patterns[][2],/* I - pointer to input / output string */ /* templates */ int npat, /* I - number of templates passed */ int n_value, /* I - base 'n' template value of interest */ int n_offset, /* I - offset to be applied to the 'n' */ /* value in the output string */ int n_range, /* I - controls range of 'n' template */ /* values of interest (-1,0, or +1) */ int *pat_num, /* O - matched pattern number (0 based) or -1 */ int *i, /* O - value of i, if any, else 0 */ int *j, /* O - value of j, if any, else 0 */ int *m, /* O - value of m, if any, else 0 */ int *n, /* O - value of n, if any, else 0 */ int *status) /* IO - error status */ /* Translate a keyword name to a new name, based on a set of patterns. The user passes an array of patterns to be matched. Input pattern number i is pattern[i][0], and output pattern number i is pattern[i][1]. Keywords are matched against the input patterns. If a match is found then the keyword is re-written according to the output pattern. Order is important. The first match is accepted. The fastest match will be made when templates with the same first character are grouped together. Several characters have special meanings: i,j - single digits, preserved in output template n - column number of one or more digits, preserved in output template m - generic number of one or more digits, preserved in output template a - coordinate designator, preserved in output template # - number of one or more digits ? - any character * - only allowed in first character position, to match all keywords; only useful as last pattern in the list i, j, n, and m are returned by the routine. For example, the input pattern "iCTYPn" will match "1CTYP5" (if n_value is 5); the output pattern "CTYPEi" will be re-written as "CTYPE1". Notice that "i" is preserved. The following output patterns are special Special output pattern characters: "-" - do not copy a keyword that matches the corresponding input pattern "+" - copy the input unchanged The inrec string could be just the 8-char keyword name, or the entire 80-char header record. Characters 9 = 80 in the input string simply get appended to the translated keyword name. If n_range = 0, then only keywords with 'n' equal to n_value will be considered as a pattern match. If n_range = +1, then all values of 'n' greater than or equal to n_value will be a match, and if -1, then values of 'n' less than or equal to n_value will match. This routine was written by Craig Markwardt, GSFC */ { int i1 = 0, j1 = 0, n1 = 0, m1 = 0; int fac; char a = ' '; char oldp; char c, s; int ip, ic, pat, pass = 0, firstfail; char *spat; if (*status > 0) return(*status); if ((inrec == 0) || (outrec == 0)) return (*status = NULL_INPUT_PTR); *outrec = '\0'; /* if (*inrec == '\0') return 0; */ if (*inrec == '\0') /* expand to full 8 char blank keyword name */ strcpy(inrec, " "); oldp = '\0'; firstfail = 0; /* ===== Pattern match stage */ for (pat=0; pat < npat; pat++) { spat = patterns[pat][0]; i1 = 0; j1 = 0; m1 = -1; n1 = -1; a = ' '; /* Initialize the place-holders */ pass = 0; /* Pass the wildcard pattern */ if (spat[0] == '*') { pass = 1; break; } /* Optimization: if we have seen this initial pattern character before, then it must have failed, and we can skip the pattern */ if (firstfail && spat[0] == oldp) continue; oldp = spat[0]; /* ip = index of pattern character being matched ic = index of keyname character being matched firstfail = 1 if we fail on the first characteor (0=not) */ for (ip=0, ic=0, firstfail=1; (spat[ip]) && (ic < 8); ip++, ic++, firstfail=0) { c = inrec[ic]; s = spat[ip]; if (s == 'i') { /* Special pattern: 'i' placeholder */ if (isdigit(c)) { i1 = c - '0'; pass = 1;} } else if (s == 'j') { /* Special pattern: 'j' placeholder */ if (isdigit(c)) { j1 = c - '0'; pass = 1;} } else if ((s == 'n')||(s == 'm')||(s == '#')) { /* Special patterns: multi-digit number */ int val = 0; pass = 0; if (isdigit(c)) { pass = 1; /* NOTE, could fail below */ /* Parse decimal number */ while (ic<8 && isdigit(c)) { val = val*10 + (c - '0'); ic++; c = inrec[ic]; } ic--; c = inrec[ic]; if (s == 'n') { /* Is it a column number? */ if ( val >= 1 && val <= 999 && /* Row range check */ (((n_range == 0) && (val == n_value)) || /* Strict equality */ ((n_range == -1) && (val <= n_value)) || /* n <= n_value */ ((n_range == +1) && (val >= n_value))) ) { /* n >= n_value */ n1 = val; } else { pass = 0; } } else if (s == 'm') { /* Generic number */ m1 = val; } } } else if (s == 'a') { /* Special pattern: coordinate designator */ if (isupper(c) || c == ' ') { a = c; pass = 1;} } else if (s == '?') { /* Match any individual character */ pass = 1; } else if (c == s) { /* Match a specific character */ pass = 1; } else { /* FAIL */ pass = 0; } if (!pass) break; } /* Must pass to the end of the keyword. No partial matches allowed */ if (pass && (ic >= 8 || inrec[ic] == ' ')) break; } /* Transfer the pattern-matched numbers to the output parameters */ if (i) { *i = i1; } if (j) { *j = j1; } if (n) { *n = n1; } if (m) { *m = m1; } if (pat_num) { *pat_num = pat; } /* ===== Keyword rewriting and output stage */ spat = patterns[pat][1]; /* Return case: no match, or explicit deletion pattern */ if (pass == 0 || spat[0] == '\0' || spat[0] == '-') return 0; /* A match: we start by copying the input record to the output */ strcpy(outrec, inrec); /* Return case: return the input record unchanged */ if (spat[0] == '+') return 0; /* Final case: a new output pattern */ for (ip=0, ic=0; spat[ip]; ip++, ic++) { s = spat[ip]; if (s == 'i') { outrec[ic] = (i1+'0'); } else if (s == 'j') { outrec[ic] = (j1+'0'); } else if (s == 'n') { if (n1 == -1) { n1 = n_value; } if (n1 > 0) { n1 += n_offset; for (fac = 1; (n1/fac) > 0; fac *= 10); fac /= 10; while(fac > 0) { outrec[ic] = ((n1/fac) % 10) + '0'; fac /= 10; ic ++; } ic--; } } else if (s == 'm' && m1 >= 0) { for (fac = 1; (m1/fac) > 0; fac *= 10); fac /= 10; while(fac > 0) { outrec[ic] = ((m1/fac) % 10) + '0'; fac /= 10; ic ++; } ic --; } else if (s == 'a') { outrec[ic] = a; } else { outrec[ic] = s; } } /* Pad the keyword name with spaces */ for ( ; ic<8; ic++) { outrec[ic] = ' '; } return(*status); } /*--------------------------------------------------------------------------*/ int fits_translate_keywords( fitsfile *infptr, /* I - pointer to input HDU */ fitsfile *outfptr, /* I - pointer to output HDU */ int firstkey, /* I - first HDU record number to start with */ char *patterns[][2],/* I - pointer to input / output keyword templates */ int npat, /* I - number of templates passed */ int n_value, /* I - base 'n' template value of interest */ int n_offset, /* I - offset to be applied to the 'n' */ /* value in the output string */ int n_range, /* I - controls range of 'n' template */ /* values of interest (-1,0, or +1) */ int *status) /* IO - error status */ /* Copy relevant keywords from the table header into the newly created primary array header. Convert names of keywords where appropriate. See fits_translate_keyword() for the definitions. Translation begins at header record number 'firstkey', and continues to the end of the header. This routine was written by Craig Markwardt, GSFC */ { int nrec, nkeys, nmore; char rec[FLEN_CARD]; int i = 0, j = 0, n = 0, m = 0; int pat_num = 0, maxchr, ii; char outrec[FLEN_CARD]; if (*status > 0) return(*status); ffghsp(infptr, &nkeys, &nmore, status); /* get number of keywords */ for (nrec = firstkey; nrec <= nkeys; nrec++) { outrec[0] = '\0'; ffgrec(infptr, nrec, rec, status); /* silently overlook any illegal ASCII characters in the value or */ /* comment fields of the record. It is usually not appropriate to */ /* abort the process because of this minor transgression of the FITS rules. */ /* Set the offending character to a blank */ maxchr = strlen(rec); for (ii = 8; ii < maxchr; ii++) { if (rec[ii] < 32 || rec[ii] > 126) rec[ii] = ' '; } fits_translate_keyword(rec, outrec, patterns, npat, n_value, n_offset, n_range, &pat_num, &i, &j, &m, &n, status); if (outrec[0]) { ffprec(outfptr, outrec, status); /* copy the keyword */ rec[8] = 0; outrec[8] = 0; } else { rec[8] = 0; outrec[8] = 0; } } return(*status); } /*--------------------------------------------------------------------------*/ int fits_copy_pixlist2image( fitsfile *infptr, /* I - pointer to input HDU */ fitsfile *outfptr, /* I - pointer to output HDU */ int firstkey, /* I - first HDU record number to start with */ int naxis, /* I - number of axes in the image */ int *colnum, /* I - numbers of the columns to be binned */ int *status) /* IO - error status */ /* Copy relevant keywords from the pixel list table header into a newly created primary array header. Convert names of keywords where appropriate. See fits_translate_pixkeyword() for the definitions. Translation begins at header record number 'firstkey', and continues to the end of the header. */ { int nrec, nkeys, nmore; char rec[FLEN_CARD], outrec[FLEN_CARD]; int pat_num = 0, npat; int iret, jret, nret, mret, lret; char *patterns[][2] = { {"TCTYPn", "CTYPEn" }, {"TCTYna", "CTYPEna" }, {"TCUNIn", "CUNITn" }, {"TCUNna", "CUNITna" }, {"TCRVLn", "CRVALn" }, {"TCRVna", "CRVALna" }, {"TCDLTn", "CDELTn" }, {"TCDEna", "CDELTna" }, {"TCRPXn", "CRPIXn" }, {"TCRPna", "CRPIXna" }, {"TCROTn", "CROTAn" }, {"TPn_ma", "PCn_ma" }, {"TPCn_m", "PCn_ma" }, {"TCn_ma", "CDn_ma" }, {"TCDn_m", "CDn_ma" }, {"TVn_la", "PVn_la" }, {"TPVn_l", "PVn_la" }, {"TSn_la", "PSn_la" }, {"TPSn_l", "PSn_la" }, {"TWCSna", "WCSNAMEa" }, {"TCNAna", "CNAMEna" }, {"TCRDna", "CRDERna" }, {"TCSYna", "CSYERna" }, {"LONPna", "LONPOLEa" }, {"LATPna", "LATPOLEa" }, {"EQUIna", "EQUINOXa" }, {"MJDOBn", "MJD-OBS" }, {"MJDAn", "MJD-AVG" }, {"DAVGn", "DATE-AVG" }, {"RADEna", "RADESYSa" }, {"RFRQna", "RESTFRQa" }, {"RWAVna", "RESTWAVa" }, {"SPECna", "SPECSYSa" }, {"SOBSna", "SSYSOBSa" }, {"SSRCna", "SSYSSRCa" }, /* preserve common keywords */ {"LONPOLEa", "+" }, {"LATPOLEa", "+" }, {"EQUINOXa", "+" }, {"EPOCH", "+" }, {"MJD-????", "+" }, {"DATE????", "+" }, {"TIME????", "+" }, {"RADESYSa", "+" }, {"RADECSYS", "+" }, {"TELESCOP", "+" }, {"INSTRUME", "+" }, {"OBSERVER", "+" }, {"OBJECT", "+" }, /* Delete general table column keywords */ {"XTENSION", "-" }, {"BITPIX", "-" }, {"NAXIS", "-" }, {"NAXISi", "-" }, {"PCOUNT", "-" }, {"GCOUNT", "-" }, {"TFIELDS", "-" }, {"TDIM#", "-" }, {"THEAP", "-" }, {"EXTNAME", "-" }, {"EXTVER", "-" }, {"EXTLEVEL","-" }, {"CHECKSUM","-" }, {"DATASUM", "-" }, {"NAXLEN", "-" }, {"AXLEN#", "-" }, {"CPREF", "-" }, /* Delete table keywords related to other columns */ {"T????#a", "-" }, {"TC??#a", "-" }, {"T??#_#", "-" }, {"TWCS#a", "-" }, {"LONP#a", "-" }, {"LATP#a", "-" }, {"EQUI#a", "-" }, {"MJDOB#", "-" }, {"MJDA#", "-" }, {"RADE#a", "-" }, {"DAVG#", "-" }, {"iCTYP#", "-" }, {"iCTY#a", "-" }, {"iCUNI#", "-" }, {"iCUN#a", "-" }, {"iCRVL#", "-" }, {"iCDLT#", "-" }, {"iCRPX#", "-" }, {"iCTY#a", "-" }, {"iCUN#a", "-" }, {"iCRV#a", "-" }, {"iCDE#a", "-" }, {"iCRP#a", "-" }, {"ijPC#a", "-" }, {"ijCD#a", "-" }, {"iV#_#a", "-" }, {"iS#_#a", "-" }, {"iCRD#a", "-" }, {"iCSY#a", "-" }, {"iCROT#", "-" }, {"WCAX#a", "-" }, {"WCSN#a", "-" }, {"iCNA#a", "-" }, {"*", "+" }}; /* copy all other keywords */ if (*status > 0) return(*status); npat = sizeof(patterns)/sizeof(patterns[0][0])/2; ffghsp(infptr, &nkeys, &nmore, status); /* get number of keywords */ for (nrec = firstkey; nrec <= nkeys; nrec++) { outrec[0] = '\0'; ffgrec(infptr, nrec, rec, status); fits_translate_pixkeyword(rec, outrec, patterns, npat, naxis, colnum, &pat_num, &iret, &jret, &nret, &mret, &lret, status); if (outrec[0]) { ffprec(outfptr, outrec, status); /* copy the keyword */ } rec[8] = 0; outrec[8] = 0; } return(*status); } /*--------------------------------------------------------------------------*/ int fits_translate_pixkeyword( char *inrec, /* I - input string */ char *outrec, /* O - output converted string, or */ /* a null string if input does not */ /* match any of the patterns */ char *patterns[][2],/* I - pointer to input / output string */ /* templates */ int npat, /* I - number of templates passed */ int naxis, /* I - number of columns to be binned */ int *colnum, /* I - numbers of the columns to be binned */ int *pat_num, /* O - matched pattern number (0 based) or -1 */ int *i, int *j, int *n, int *m, int *l, int *status) /* IO - error status */ /* Translate a keyword name to a new name, based on a set of patterns. The user passes an array of patterns to be matched. Input pattern number i is pattern[i][0], and output pattern number i is pattern[i][1]. Keywords are matched against the input patterns. If a match is found then the keyword is re-written according to the output pattern. Order is important. The first match is accepted. The fastest match will be made when templates with the same first character are grouped together. Several characters have special meanings: i,j - single digits, preserved in output template n, m - column number of one or more digits, preserved in output template k - generic number of one or more digits, preserved in output template a - coordinate designator, preserved in output template # - number of one or more digits ? - any character * - only allowed in first character position, to match all keywords; only useful as last pattern in the list i, j, n, and m are returned by the routine. For example, the input pattern "iCTYPn" will match "1CTYP5" (if n_value is 5); the output pattern "CTYPEi" will be re-written as "CTYPE1". Notice that "i" is preserved. The following output patterns are special Special output pattern characters: "-" - do not copy a keyword that matches the corresponding input pattern "+" - copy the input unchanged The inrec string could be just the 8-char keyword name, or the entire 80-char header record. Characters 9 = 80 in the input string simply get appended to the translated keyword name. If n_range = 0, then only keywords with 'n' equal to n_value will be considered as a pattern match. If n_range = +1, then all values of 'n' greater than or equal to n_value will be a match, and if -1, then values of 'n' less than or equal to n_value will match. */ { int i1 = 0, j1 = 0, val; int fac, nval, mval, lval; char a = ' '; char oldp; char c, s; int ip, ic, pat, pass = 0, firstfail; char *spat; if (*status > 0) return(*status); if ((inrec == 0) || (outrec == 0)) return (*status = NULL_INPUT_PTR); *outrec = '\0'; if (*inrec == '\0') return 0; oldp = '\0'; firstfail = 0; /* ===== Pattern match stage */ for (pat=0; pat < npat; pat++) { spat = patterns[pat][0]; i1 = 0; j1 = 0; a = ' '; /* Initialize the place-holders */ pass = 0; /* Pass the wildcard pattern */ if (spat[0] == '*') { pass = 1; break; } /* Optimization: if we have seen this initial pattern character before, then it must have failed, and we can skip the pattern */ if (firstfail && spat[0] == oldp) continue; oldp = spat[0]; /* ip = index of pattern character being matched ic = index of keyname character being matched firstfail = 1 if we fail on the first characteor (0=not) */ for (ip=0, ic=0, firstfail=1; (spat[ip]) && (ic < 8); ip++, ic++, firstfail=0) { c = inrec[ic]; s = spat[ip]; if (s == 'i') { /* Special pattern: 'i' placeholder */ if (isdigit(c)) { i1 = c - '0'; pass = 1;} } else if (s == 'j') { /* Special pattern: 'j' placeholder */ if (isdigit(c)) { j1 = c - '0'; pass = 1;} } else if ((s == 'n')||(s == 'm')||(s == 'l')||(s == '#')) { /* Special patterns: multi-digit number */ val = 0; pass = 0; if (isdigit(c)) { pass = 1; /* NOTE, could fail below */ /* Parse decimal number */ while (ic<8 && isdigit(c)) { val = val*10 + (c - '0'); ic++; c = inrec[ic]; } ic--; c = inrec[ic]; if (s == 'n' || s == 'm') { /* Is it a column number? */ if ( val >= 1 && val <= 999) { if (val == colnum[0]) val = 1; else if (val == colnum[1]) val = 2; else if (val == colnum[2]) val = 3; else if (val == colnum[3]) val = 4; else { pass = 0; val = 0; } if (s == 'n') nval = val; else mval = val; } else { pass = 0; } } else if (s == 'l') { /* Generic number */ lval = val; } } } else if (s == 'a') { /* Special pattern: coordinate designator */ if (isupper(c) || c == ' ') { a = c; pass = 1;} } else if (s == '?') { /* Match any individual character */ pass = 1; } else if (c == s) { /* Match a specific character */ pass = 1; } else { /* FAIL */ pass = 0; } if (!pass) break; } /* Must pass to the end of the keyword. No partial matches allowed */ if (pass && (ic >= 8 || inrec[ic] == ' ')) break; } /* Transfer the pattern-matched numbers to the output parameters */ if (i) { *i = i1; } if (j) { *j = j1; } if (n) { *n = nval; } if (m) { *m = mval; } if (l) { *l = lval; } if (pat_num) { *pat_num = pat; } /* ===== Keyword rewriting and output stage */ spat = patterns[pat][1]; /* Return case: no match, or explicit deletion pattern */ if (pass == 0 || spat[0] == '\0' || spat[0] == '-') return 0; /* A match: we start by copying the input record to the output */ strcpy(outrec, inrec); /* Return case: return the input record unchanged */ if (spat[0] == '+') return 0; /* Final case: a new output pattern */ for (ip=0, ic=0; spat[ip]; ip++, ic++) { s = spat[ip]; if (s == 'i') { outrec[ic] = (i1+'0'); } else if (s == 'j') { outrec[ic] = (j1+'0'); } else if (s == 'n' && nval > 0) { for (fac = 1; (nval/fac) > 0; fac *= 10); fac /= 10; while(fac > 0) { outrec[ic] = ((nval/fac) % 10) + '0'; fac /= 10; ic ++; } ic--; } else if (s == 'm' && mval > 0) { for (fac = 1; (mval/fac) > 0; fac *= 10); fac /= 10; while(fac > 0) { outrec[ic] = ((mval/fac) % 10) + '0'; fac /= 10; ic ++; } ic--; } else if (s == 'l' && lval >= 0) { for (fac = 1; (lval/fac) > 0; fac *= 10); fac /= 10; while(fac > 0) { outrec[ic] = ((lval/fac) % 10) + '0'; fac /= 10; ic ++; } ic --; } else if (s == 'a') { outrec[ic] = a; } else { outrec[ic] = s; } } /* Pad the keyword name with spaces */ for ( ; ic<8; ic++) { outrec[ic] = ' '; } return(*status); } /*--------------------------------------------------------------------------*/ int ffasfm(char *tform, /* I - format code from the TFORMn keyword */ int *dtcode, /* O - numerical datatype code */ long *twidth, /* O - width of the field, in chars */ int *decimals, /* O - number of decimal places (F, E, D format) */ int *status) /* IO - error status */ { /* parse the ASCII table TFORM column format to determine the data type, the field width, and number of decimal places (if relevant) */ int ii, datacode; long longval, width; float fwidth; char *form, temp[FLEN_VALUE], message[FLEN_ERRMSG]; if (*status > 0) return(*status); if (dtcode) *dtcode = 0; if (twidth) *twidth = 0; if (decimals) *decimals = 0; ii = 0; while (tform[ii] != 0 && tform[ii] == ' ') /* find first non-blank char */ ii++; strcpy(temp, &tform[ii]); /* copy format string */ ffupch(temp); /* make sure it is in upper case */ form = temp; /* point to start of format string */ if (form[0] == 0) { ffpmsg("Error: ASCII table TFORM code is blank"); return(*status = BAD_TFORM); } /*-----------------------------------------------*/ /* determine default datatype code */ /*-----------------------------------------------*/ if (form[0] == 'A') datacode = TSTRING; else if (form[0] == 'I') datacode = TLONG; else if (form[0] == 'F') datacode = TFLOAT; else if (form[0] == 'E') datacode = TFLOAT; else if (form[0] == 'D') datacode = TDOUBLE; else { sprintf(message, "Illegal ASCII table TFORMn datatype: \'%s\'", tform); ffpmsg(message); return(*status = BAD_TFORM_DTYPE); } if (dtcode) *dtcode = datacode; form++; /* point to the start of field width */ if (datacode == TSTRING || datacode == TLONG) { /*-----------------------------------------------*/ /* A or I data formats: */ /*-----------------------------------------------*/ if (ffc2ii(form, &width, status) <= 0) /* read the width field */ { if (width <= 0) { width = 0; *status = BAD_TFORM; } else { /* set to shorter precision if I4 or less */ if (width <= 4 && datacode == TLONG) datacode = TSHORT; } } } else { /*-----------------------------------------------*/ /* F, E or D data formats: */ /*-----------------------------------------------*/ if (ffc2rr(form, &fwidth, status) <= 0) /* read ww.dd width field */ { if (fwidth <= 0.) *status = BAD_TFORM; else { width = (long) fwidth; /* convert from float to long */ if (width > 7 && *temp == 'F') datacode = TDOUBLE; /* type double if >7 digits */ if (width < 10) form = form + 1; /* skip 1 digit */ else form = form + 2; /* skip 2 digits */ if (form[0] == '.') /* should be a decimal point here */ { form++; /* point to start of decimals field */ if (ffc2ii(form, &longval, status) <= 0) /* read decimals */ { if (decimals) *decimals = longval; /* long to short convertion */ if (longval >= width) /* width < no. of decimals */ *status = BAD_TFORM; if (longval > 6 && *temp == 'E') datacode = TDOUBLE; /* type double if >6 digits */ } } } } } if (*status > 0) { *status = BAD_TFORM; sprintf(message,"Illegal ASCII table TFORMn code: \'%s\'", tform); ffpmsg(message); } if (dtcode) *dtcode = datacode; if (twidth) *twidth = width; return(*status); } /*--------------------------------------------------------------------------*/ int ffbnfm(char *tform, /* I - format code from the TFORMn keyword */ int *dtcode, /* O - numerical datatype code */ long *trepeat, /* O - repeat count of the field */ long *twidth, /* O - width of the field, in chars */ int *status) /* IO - error status */ { /* parse the binary table TFORM column format to determine the data type, repeat count, and the field width (if it is an ASCII (A) field) */ size_t ii, nchar; int datacode, variable, iread; long width, repeat; char *form, temp[FLEN_VALUE], message[FLEN_ERRMSG]; if (*status > 0) return(*status); if (dtcode) *dtcode = 0; if (trepeat) *trepeat = 0; if (twidth) *twidth = 0; nchar = strlen(tform); for (ii = 0; ii < nchar; ii++) { if (tform[ii] != ' ') /* find first non-space char */ break; } if (ii == nchar) { ffpmsg("Error: binary table TFORM code is blank (ffbnfm)."); return(*status = BAD_TFORM); } strcpy(temp, &tform[ii]); /* copy format string */ ffupch(temp); /* make sure it is in upper case */ form = temp; /* point to start of format string */ /*-----------------------------------------------*/ /* get the repeat count */ /*-----------------------------------------------*/ ii = 0; while(isdigit((int) form[ii])) ii++; /* look for leading digits in the field */ if (ii == 0) repeat = 1; /* no explicit repeat count */ else sscanf(form,"%ld", &repeat); /* read repeat count */ /*-----------------------------------------------*/ /* determine datatype code */ /*-----------------------------------------------*/ form = form + ii; /* skip over the repeat field */ if (form[0] == 'P' || form[0] == 'Q') { variable = 1; /* this is a variable length column */ /* repeat = 1; */ /* disregard any other repeat value */ form++; /* move to the next data type code char */ } else variable = 0; if (form[0] == 'U') /* internal code to signify unsigned integer */ { datacode = TUSHORT; width = 2; } else if (form[0] == 'I') { datacode = TSHORT; width = 2; } else if (form[0] == 'V') /* internal code to signify unsigned integer */ { datacode = TULONG; width = 4; } else if (form[0] == 'J') { datacode = TLONG; width = 4; } else if (form[0] == 'K') { datacode = TLONGLONG; width = 8; } else if (form[0] == 'E') { datacode = TFLOAT; width = 4; } else if (form[0] == 'D') { datacode = TDOUBLE; width = 8; } else if (form[0] == 'A') { datacode = TSTRING; /* the following code is used to support the non-standard datatype of the form rAw where r = total width of the field and w = width of fixed-length substrings within the field. */ iread = 0; if (form[1] != 0) { if (form[1] == '(' ) /* skip parenthesis around */ form++; /* variable length column width */ iread = sscanf(&form[1],"%ld", &width); } if (iread != 1 || (!variable && (width > repeat)) ) width = repeat; } else if (form[0] == 'L') { datacode = TLOGICAL; width = 1; } else if (form[0] == 'X') { datacode = TBIT; width = 1; } else if (form[0] == 'B') { datacode = TBYTE; width = 1; } else if (form[0] == 'S') /* internal code to signify signed byte */ { datacode = TSBYTE; width = 1; } else if (form[0] == 'C') { datacode = TCOMPLEX; width = 8; } else if (form[0] == 'M') { datacode = TDBLCOMPLEX; width = 16; } else { sprintf(message, "Illegal binary table TFORMn datatype: \'%s\' ", tform); ffpmsg(message); return(*status = BAD_TFORM_DTYPE); } if (variable) datacode = datacode * (-1); /* flag variable cols w/ neg type code */ if (dtcode) *dtcode = datacode; if (trepeat) *trepeat = repeat; if (twidth) *twidth = width; return(*status); } /*--------------------------------------------------------------------------*/ int ffbnfmll(char *tform, /* I - format code from the TFORMn keyword */ int *dtcode, /* O - numerical datatype code */ LONGLONG *trepeat, /* O - repeat count of the field */ long *twidth, /* O - width of the field, in chars */ int *status) /* IO - error status */ { /* parse the binary table TFORM column format to determine the data type, repeat count, and the field width (if it is an ASCII (A) field) */ size_t ii, nchar; int datacode, variable, iread; long width; LONGLONG repeat; char *form, temp[FLEN_VALUE], message[FLEN_ERRMSG]; double drepeat; if (*status > 0) return(*status); if (dtcode) *dtcode = 0; if (trepeat) *trepeat = 0; if (twidth) *twidth = 0; nchar = strlen(tform); for (ii = 0; ii < nchar; ii++) { if (tform[ii] != ' ') /* find first non-space char */ break; } if (ii == nchar) { ffpmsg("Error: binary table TFORM code is blank (ffbnfmll)."); return(*status = BAD_TFORM); } strcpy(temp, &tform[ii]); /* copy format string */ ffupch(temp); /* make sure it is in upper case */ form = temp; /* point to start of format string */ /*-----------------------------------------------*/ /* get the repeat count */ /*-----------------------------------------------*/ ii = 0; while(isdigit((int) form[ii])) ii++; /* look for leading digits in the field */ if (ii == 0) repeat = 1; /* no explicit repeat count */ else { /* read repeat count */ /* print as double, because the string-to-64-bit int conversion */ /* character is platform dependent (%lld, %ld, %I64d) */ sscanf(form,"%lf", &drepeat); repeat = (LONGLONG) (drepeat + 0.1); } /*-----------------------------------------------*/ /* determine datatype code */ /*-----------------------------------------------*/ form = form + ii; /* skip over the repeat field */ if (form[0] == 'P' || form[0] == 'Q') { variable = 1; /* this is a variable length column */ /* repeat = 1; */ /* disregard any other repeat value */ form++; /* move to the next data type code char */ } else variable = 0; if (form[0] == 'U') /* internal code to signify unsigned integer */ { datacode = TUSHORT; width = 2; } else if (form[0] == 'I') { datacode = TSHORT; width = 2; } else if (form[0] == 'V') /* internal code to signify unsigned integer */ { datacode = TULONG; width = 4; } else if (form[0] == 'J') { datacode = TLONG; width = 4; } else if (form[0] == 'K') { datacode = TLONGLONG; width = 8; } else if (form[0] == 'E') { datacode = TFLOAT; width = 4; } else if (form[0] == 'D') { datacode = TDOUBLE; width = 8; } else if (form[0] == 'A') { datacode = TSTRING; /* the following code is used to support the non-standard datatype of the form rAw where r = total width of the field and w = width of fixed-length substrings within the field. */ iread = 0; if (form[1] != 0) { if (form[1] == '(' ) /* skip parenthesis around */ form++; /* variable length column width */ iread = sscanf(&form[1],"%ld", &width); } if (iread != 1 || (!variable && (width > repeat)) ) width = (long) repeat; } else if (form[0] == 'L') { datacode = TLOGICAL; width = 1; } else if (form[0] == 'X') { datacode = TBIT; width = 1; } else if (form[0] == 'B') { datacode = TBYTE; width = 1; } else if (form[0] == 'S') /* internal code to signify signed byte */ { datacode = TSBYTE; width = 1; } else if (form[0] == 'C') { datacode = TCOMPLEX; width = 8; } else if (form[0] == 'M') { datacode = TDBLCOMPLEX; width = 16; } else { sprintf(message, "Illegal binary table TFORMn datatype: \'%s\' ", tform); ffpmsg(message); return(*status = BAD_TFORM_DTYPE); } if (variable) datacode = datacode * (-1); /* flag variable cols w/ neg type code */ if (dtcode) *dtcode = datacode; if (trepeat) *trepeat = repeat; if (twidth) *twidth = width; return(*status); } /*--------------------------------------------------------------------------*/ void ffcfmt(char *tform, /* value of an ASCII table TFORMn keyword */ char *cform) /* equivalent format code in C language syntax */ /* convert the FITS format string for an ASCII Table extension column into the equivalent C format string that can be used in a printf statement, after the values have been read as a double. */ { int ii; cform[0] = '\0'; ii = 0; while (tform[ii] != 0 && tform[ii] == ' ') /* find first non-blank char */ ii++; if (tform[ii] == 0) return; /* input format string was blank */ cform[0] = '%'; /* start the format string */ strcpy(&cform[1], &tform[ii + 1]); /* append the width and decimal code */ if (tform[ii] == 'A') strcat(cform, "s"); else if (tform[ii] == 'I') strcat(cform, ".0f"); /* 0 precision to suppress decimal point */ if (tform[ii] == 'F') strcat(cform, "f"); if (tform[ii] == 'E') strcat(cform, "E"); if (tform[ii] == 'D') strcat(cform, "E"); return; } /*--------------------------------------------------------------------------*/ void ffcdsp(char *tform, /* value of an ASCII table TFORMn keyword */ char *cform) /* equivalent format code in C language syntax */ /* convert the FITS TDISPn display format into the equivalent C format suitable for use in a printf statement. */ { int ii; cform[0] = '\0'; ii = 0; while (tform[ii] != 0 && tform[ii] == ' ') /* find first non-blank char */ ii++; if (tform[ii] == 0) { cform[0] = '\0'; return; /* input format string was blank */ } if (strchr(tform+ii, '%')) /* is there a % character in the string?? */ { cform[0] = '\0'; return; /* illegal TFORM string (possibly even harmful) */ } cform[0] = '%'; /* start the format string */ strcpy(&cform[1], &tform[ii + 1]); /* append the width and decimal code */ if (tform[ii] == 'A' || tform[ii] == 'a') strcat(cform, "s"); else if (tform[ii] == 'I' || tform[ii] == 'i') strcat(cform, "d"); else if (tform[ii] == 'O' || tform[ii] == 'o') strcat(cform, "o"); else if (tform[ii] == 'Z' || tform[ii] == 'z') strcat(cform, "X"); else if (tform[ii] == 'F' || tform[ii] == 'f') strcat(cform, "f"); else if (tform[ii] == 'E' || tform[ii] == 'e') strcat(cform, "E"); else if (tform[ii] == 'D' || tform[ii] == 'd') strcat(cform, "E"); else if (tform[ii] == 'G' || tform[ii] == 'g') strcat(cform, "G"); else cform[0] = '\0'; /* unrecognized tform code */ return; } /*--------------------------------------------------------------------------*/ int ffgcno( fitsfile *fptr, /* I - FITS file pionter */ int casesen, /* I - case sensitive string comparison? 0=no */ char *templt, /* I - input name of column (w/wildcards) */ int *colnum, /* O - number of the named column; 1=first col */ int *status) /* IO - error status */ /* Determine the column number corresponding to an input column name. The first column of the table = column 1; This supports the * and ? wild cards in the input template. */ { char colname[FLEN_VALUE]; /* temporary string to hold column name */ ffgcnn(fptr, casesen, templt, colname, colnum, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcnn( fitsfile *fptr, /* I - FITS file pointer */ int casesen, /* I - case sensitive string comparison? 0=no */ char *templt, /* I - input name of column (w/wildcards) */ char *colname, /* O - full column name up to 68 + 1 chars long*/ int *colnum, /* O - number of the named column; 1=first col */ int *status) /* IO - error status */ /* Return the full column name and column number of the next column whose TTYPEn keyword value matches the input template string. The template may contain the * and ? wildcards. Status = 237 is returned if the match is not unique. If so, one may call this routine again with input status=237 to get the next match. A status value of 219 is returned when there are no more matching columns. */ { char errmsg[FLEN_ERRMSG]; int tstatus, ii, founde, foundw, match, exact, unique; long ivalue; tcolumn *colptr; if (*status <= 0) { (fptr->Fptr)->startcol = 0; /* start search with first column */ tstatus = 0; } else if (*status == COL_NOT_UNIQUE) /* start search from previous spot */ { tstatus = COL_NOT_UNIQUE; *status = 0; } else return(*status); /* bad input status value */ colname[0] = 0; /* initialize null return */ *colnum = 0; /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header to get col struct */ return(*status); colptr = (fptr->Fptr)->tableptr; /* pointer to first column */ colptr += ((fptr->Fptr)->startcol); /* offset to starting column */ founde = FALSE; /* initialize 'found exact match' flag */ foundw = FALSE; /* initialize 'found wildcard match' flag */ unique = FALSE; for (ii = (fptr->Fptr)->startcol; ii < (fptr->Fptr)->tfield; ii++, colptr++) { ffcmps(templt, colptr->ttype, casesen, &match, &exact); if (match) { if (founde && exact) { /* warning: this is the second exact match we've found */ /*reset pointer to first match so next search starts there */ (fptr->Fptr)->startcol = *colnum; return(*status = COL_NOT_UNIQUE); } else if (founde) /* a wildcard match */ { /* already found exact match so ignore this non-exact match */ } else if (exact) { /* this is the first exact match we have found, so save it. */ strcpy(colname, colptr->ttype); *colnum = ii + 1; founde = TRUE; } else if (foundw) { /* we have already found a wild card match, so not unique */ /* continue searching for other matches */ unique = FALSE; } else { /* this is the first wild card match we've found. save it */ strcpy(colname, colptr->ttype); *colnum = ii + 1; (fptr->Fptr)->startcol = *colnum; foundw = TRUE; unique = TRUE; } } } /* OK, we've checked all the names now see if we got any matches */ if (founde) { if (tstatus == COL_NOT_UNIQUE) /* we did find 1 exact match but */ *status = COL_NOT_UNIQUE; /* there was a previous match too */ } else if (foundw) { /* found one or more wildcard matches; report error if not unique */ if (!unique || tstatus == COL_NOT_UNIQUE) *status = COL_NOT_UNIQUE; } else { /* didn't find a match; check if template is a positive integer */ ffc2ii(templt, &ivalue, &tstatus); if (tstatus == 0 && ivalue <= (fptr->Fptr)->tfield && ivalue > 0) { *colnum = ivalue; colptr = (fptr->Fptr)->tableptr; /* pointer to first column */ colptr += (ivalue - 1); /* offset to correct column */ strcpy(colname, colptr->ttype); } else { *status = COL_NOT_FOUND; if (tstatus != COL_NOT_UNIQUE) { sprintf(errmsg, "ffgcnn could not find column: %.45s", templt); ffpmsg(errmsg); } } } (fptr->Fptr)->startcol = *colnum; /* save pointer for next time */ return(*status); } /*--------------------------------------------------------------------------*/ void ffcmps(char *templt, /* I - input template (may have wildcards) */ char *colname, /* I - full column name up to 68 + 1 chars long */ int casesen, /* I - case sensitive string comparison? 1=yes */ int *match, /* O - do template and colname match? 1=yes */ int *exact) /* O - do strings exactly match, or wildcards */ /* compare the template to the string and test if they match. The strings are limited to 68 characters or less (the max. length of a FITS string keyword value. This routine reports whether the two strings match and whether the match is exact or involves wildcards. This algorithm is very similar to the way unix filename wildcards work except that this first treats a wild card as a literal character when looking for a match. If there is no literal match, then it interpretes it as a wild card. So the template 'AB*DE' is considered to be an exact rather than a wild card match to the string 'AB*DE'. The '#' wild card in the template string will match any consecutive string of decimal digits in the colname. */ { int ii, found, t1, s1, wildsearch = 0, tsave = 0, ssave = 0; char temp[FLEN_VALUE], col[FLEN_VALUE]; *match = FALSE; *exact = TRUE; strncpy(temp, templt, FLEN_VALUE); /* copy strings to work area */ strncpy(col, colname, FLEN_VALUE); temp[FLEN_VALUE - 1] = '\0'; /* make sure strings are terminated */ col[FLEN_VALUE - 1] = '\0'; /* truncate trailing non-significant blanks */ for (ii = strlen(temp) - 1; ii >= 0 && temp[ii] == ' '; ii--) temp[ii] = '\0'; for (ii = strlen(col) - 1; ii >= 0 && col[ii] == ' '; ii--) col[ii] = '\0'; if (!casesen) { /* convert both strings to uppercase before comparison */ ffupch(temp); ffupch(col); } if (!FSTRCMP(temp, col) ) { *match = TRUE; /* strings exactly match */ return; } *exact = FALSE; /* strings don't exactly match */ t1 = 0; /* start comparison with 1st char of each string */ s1 = 0; while(1) /* compare corresponding chars in each string */ { if (temp[t1] == '\0' && col[s1] == '\0') { /* completely scanned both strings so they match */ *match = TRUE; return; } else if (temp[t1] == '\0') { if (wildsearch) { /* the previous wildcard search may have been going down a blind alley. Backtrack, and resume the wildcard search with the next character in the string. */ t1 = tsave; s1 = ssave + 1; } else { /* reached end of template string so they don't match */ return; } } else if (col[s1] == '\0') { /* reached end of other string; they match if the next */ /* character in the template string is a '*' wild card */ if (temp[t1] == '*' && temp[t1 + 1] == '\0') { *match = TRUE; } return; } if (temp[t1] == col[s1] || (temp[t1] == '?') ) { s1++; /* corresponding chars in the 2 strings match */ t1++; /* increment both pointers and loop back again */ } else if (temp[t1] == '#' && isdigit((int) col[s1]) ) { s1++; /* corresponding chars in the 2 strings match */ t1++; /* increment both pointers */ /* find the end of the string of digits */ while (isdigit((int) col[s1]) ) s1++; } else if (temp[t1] == '*') { /* save current string locations, in case we need to restart */ wildsearch = 1; tsave = t1; ssave = s1; /* get next char from template and look for it in the col name */ t1++; if (temp[t1] == '\0' || temp[t1] == ' ') { /* reached end of template so strings match */ *match = TRUE; return; } found = FALSE; while (col[s1] && !found) { if (temp[t1] == col[s1]) { t1++; /* found matching characters; incre both pointers */ s1++; /* and loop back to compare next chars */ found = TRUE; } else s1++; /* increment the column name pointer and try again */ } if (!found) { return; /* hit end of column name and failed to find a match */ } } else { if (wildsearch) { /* the previous wildcard search may have been going down a blind alley. Backtrack, and resume the wildcard search with the next character in the string. */ t1 = tsave; s1 = ssave + 1; } else { return; /* strings don't match */ } } } } /*--------------------------------------------------------------------------*/ int ffgtcl( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number */ int *typecode, /* O - datatype code (21 = short, etc) */ long *repeat, /* O - repeat count of field */ long *width, /* O - if ASCII, width of field or unit string */ int *status) /* IO - error status */ /* Get Type of table column. Returns the datatype code of the column, as well as the vector repeat count and (if it is an ASCII character column) the width of the field or a unit string within the field. This supports the TFORMn = 'rAw' syntax for specifying arrays of substrings, so if TFORMn = '60A12' then repeat = 60 and width = 12. */ { LONGLONG trepeat, twidth; ffgtclll(fptr, colnum, typecode, &trepeat, &twidth, status); if (*status > 0) return(*status); if (repeat) *repeat= (long) trepeat; if (width) *width = (long) twidth; return(*status); } /*--------------------------------------------------------------------------*/ int ffgtclll( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number */ int *typecode, /* O - datatype code (21 = short, etc) */ LONGLONG *repeat, /* O - repeat count of field */ LONGLONG *width, /* O - if ASCII, width of field or unit string */ int *status) /* IO - error status */ /* Get Type of table column. Returns the datatype code of the column, as well as the vector repeat count and (if it is an ASCII character column) the width of the field or a unit string within the field. This supports the TFORMn = 'rAw' syntax for specifying arrays of substrings, so if TFORMn = '60A12' then repeat = 60 and width = 12. */ { tcolumn *colptr; int hdutype, decims; long tmpwidth; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); if (colnum < 1 || colnum > (fptr->Fptr)->tfield) return(*status = BAD_COL_NUM); colptr = (fptr->Fptr)->tableptr; /* pointer to first column */ colptr += (colnum - 1); /* offset to correct column */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == ASCII_TBL) { ffasfm(colptr->tform, typecode, &tmpwidth, &decims, status); *width = tmpwidth; if (repeat) *repeat = 1; } else { if (typecode) *typecode = colptr->tdatatype; if (width) *width = colptr->twidth; if (repeat) *repeat = colptr->trepeat; } return(*status); } /*--------------------------------------------------------------------------*/ int ffeqty( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number */ int *typecode, /* O - datatype code (21 = short, etc) */ long *repeat, /* O - repeat count of field */ long *width, /* O - if ASCII, width of field or unit string */ int *status) /* IO - error status */ /* Get the 'equivalent' table column type. This routine is similar to the ffgtcl routine (which returns the physical datatype of the column, as stored in the FITS file) except that if the TSCALn and TZEROn keywords are defined for the column, then it returns the 'equivalent' datatype. Thus, if the column is defined as '1I' (short integer) this routine may return the type as 'TUSHORT' or as 'TFLOAT' depending on the TSCALn and TZEROn values. Returns the datatype code of the column, as well as the vector repeat count and (if it is an ASCII character column) the width of the field or a unit string within the field. This supports the TFORMn = 'rAw' syntax for specifying arrays of substrings, so if TFORMn = '60A12' then repeat = 60 and width = 12. */ { LONGLONG trepeat, twidth; ffeqtyll(fptr, colnum, typecode, &trepeat, &twidth, status); if (repeat) *repeat= (long) trepeat; if (width) *width = (long) twidth; return(*status); } /*--------------------------------------------------------------------------*/ int ffeqtyll( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number */ int *typecode, /* O - datatype code (21 = short, etc) */ LONGLONG *repeat, /* O - repeat count of field */ LONGLONG *width, /* O - if ASCII, width of field or unit string */ int *status) /* IO - error status */ /* Get the 'equivalent' table column type. This routine is similar to the ffgtcl routine (which returns the physical datatype of the column, as stored in the FITS file) except that if the TSCALn and TZEROn keywords are defined for the column, then it returns the 'equivalent' datatype. Thus, if the column is defined as '1I' (short integer) this routine may return the type as 'TUSHORT' or as 'TFLOAT' depending on the TSCALn and TZEROn values. Returns the datatype code of the column, as well as the vector repeat count and (if it is an ASCII character column) the width of the field or a unit string within the field. This supports the TFORMn = 'rAw' syntax for specifying arrays of substrings, so if TFORMn = '60A12' then repeat = 60 and width = 12. */ { tcolumn *colptr; int hdutype, decims, tcode, effcode; double tscale, tzero, min_val, max_val; long lngscale, lngzero = 0, tmpwidth; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); if (colnum < 1 || colnum > (fptr->Fptr)->tfield) return(*status = BAD_COL_NUM); colptr = (fptr->Fptr)->tableptr; /* pointer to first column */ colptr += (colnum - 1); /* offset to correct column */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == ASCII_TBL) { ffasfm(colptr->tform, typecode, &tmpwidth, &decims, status); *width = tmpwidth; if (repeat) *repeat = 1; } else { if (typecode) *typecode = colptr->tdatatype; if (width) *width = colptr->twidth; if (repeat) *repeat = colptr->trepeat; } /* return if caller is not interested in the typecode value */ if (!typecode) return(*status); /* check if the tscale and tzero keywords are defined, which might change the effective datatype of the column */ tscale = colptr->tscale; tzero = colptr->tzero; if (tscale == 1.0 && tzero == 0.0) /* no scaling */ return(*status); tcode = abs(*typecode); switch (tcode) { case TBYTE: /* binary table 'rB' column */ min_val = 0.; max_val = 255.0; break; case TSHORT: min_val = -32768.0; max_val = 32767.0; break; case TLONG: min_val = -2147483648.0; max_val = 2147483647.0; break; default: /* don't have to deal with other data types */ return(*status); } if (tscale >= 0.) { min_val = tzero + tscale * min_val; max_val = tzero + tscale * max_val; } else { max_val = tzero + tscale * min_val; min_val = tzero + tscale * max_val; } if (tzero < 2147483648.) /* don't exceed range of 32-bit integer */ lngzero = (long) tzero; lngscale = (long) tscale; if ((tzero != 2147483648.) && /* special value that exceeds integer range */ (lngzero != tzero || lngscale != tscale)) { /* not integers? */ /* floating point scaled values; just decide on required precision */ if (tcode == TBYTE || tcode == TSHORT) effcode = TFLOAT; else effcode = TDOUBLE; /* In all the remaining cases, TSCALn and TZEROn are integers, and not equal to 1 and 0, respectively. */ } else if ((min_val == -128.) && (max_val == 127.)) { effcode = TSBYTE; } else if ((min_val >= -32768.0) && (max_val <= 32767.0)) { effcode = TSHORT; } else if ((min_val >= 0.0) && (max_val <= 65535.0)) { effcode = TUSHORT; } else if ((min_val >= -2147483648.0) && (max_val <= 2147483647.0)) { effcode = TLONG; } else if ((min_val >= 0.0) && (max_val < 4294967296.0)) { effcode = TULONG; } else { /* exceeds the range of a 32-bit integer */ effcode = TDOUBLE; } /* return the effective datatype code (negative if variable length col.) */ if (*typecode < 0) /* variable length array column */ *typecode = -effcode; else *typecode = effcode; return(*status); } /*--------------------------------------------------------------------------*/ int ffgncl( fitsfile *fptr, /* I - FITS file pointer */ int *ncols, /* O - number of columns in the table */ int *status) /* IO - error status */ /* Get the number of columns in the table (= TFIELDS keyword) */ { if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU) return(*status = NOT_TABLE); *ncols = (fptr->Fptr)->tfield; return(*status); } /*--------------------------------------------------------------------------*/ int ffgnrw( fitsfile *fptr, /* I - FITS file pointer */ long *nrows, /* O - number of rows in the table */ int *status) /* IO - error status */ /* Get the number of rows in the table (= NAXIS2 keyword) */ { if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU) return(*status = NOT_TABLE); /* the NAXIS2 keyword may not be up to date, so use the structure value */ *nrows = (long) (fptr->Fptr)->numrows; return(*status); } /*--------------------------------------------------------------------------*/ int ffgnrwll( fitsfile *fptr, /* I - FITS file pointer */ LONGLONG *nrows, /* O - number of rows in the table */ int *status) /* IO - error status */ /* Get the number of rows in the table (= NAXIS2 keyword) */ { if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU) return(*status = NOT_TABLE); /* the NAXIS2 keyword may not be up to date, so use the structure value */ *nrows = (fptr->Fptr)->numrows; return(*status); } /*--------------------------------------------------------------------------*/ int ffgacl( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number */ char *ttype, /* O - TTYPEn keyword value */ long *tbcol, /* O - TBCOLn keyword value */ char *tunit, /* O - TUNITn keyword value */ char *tform, /* O - TFORMn keyword value */ double *tscal, /* O - TSCALn keyword value */ double *tzero, /* O - TZEROn keyword value */ char *tnull, /* O - TNULLn keyword value */ char *tdisp, /* O - TDISPn keyword value */ int *status) /* IO - error status */ /* get ASCII column keyword values */ { char name[FLEN_KEYWORD], comm[FLEN_COMMENT]; tcolumn *colptr; int tstatus; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); if (colnum < 1 || colnum > (fptr->Fptr)->tfield) return(*status = BAD_COL_NUM); /* get what we can from the column structure */ colptr = (fptr->Fptr)->tableptr; /* pointer to first column */ colptr += (colnum -1); /* offset to correct column */ if (ttype) strcpy(ttype, colptr->ttype); if (tbcol) *tbcol = (long) ((colptr->tbcol) + 1); /* first col is 1, not 0 */ if (tform) strcpy(tform, colptr->tform); if (tscal) *tscal = colptr->tscale; if (tzero) *tzero = colptr->tzero; if (tnull) strcpy(tnull, colptr->strnull); /* read keywords to get additional parameters */ if (tunit) { ffkeyn("TUNIT", colnum, name, status); tstatus = 0; *tunit = '\0'; ffgkys(fptr, name, tunit, comm, &tstatus); } if (tdisp) { ffkeyn("TDISP", colnum, name, status); tstatus = 0; *tdisp = '\0'; ffgkys(fptr, name, tdisp, comm, &tstatus); } return(*status); } /*--------------------------------------------------------------------------*/ int ffgbcl( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number */ char *ttype, /* O - TTYPEn keyword value */ char *tunit, /* O - TUNITn keyword value */ char *dtype, /* O - datatype char: I, J, E, D, etc. */ long *repeat, /* O - vector column repeat count */ double *tscal, /* O - TSCALn keyword value */ double *tzero, /* O - TZEROn keyword value */ long *tnull, /* O - TNULLn keyword value integer cols only */ char *tdisp, /* O - TDISPn keyword value */ int *status) /* IO - error status */ /* get BINTABLE column keyword values */ { LONGLONG trepeat, ttnull; if (*status > 0) return(*status); ffgbclll(fptr, colnum, ttype, tunit, dtype, &trepeat, tscal, tzero, &ttnull, tdisp, status); if (repeat) *repeat = (long) trepeat; if (tnull) *tnull = (long) ttnull; return(*status); } /*--------------------------------------------------------------------------*/ int ffgbclll( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number */ char *ttype, /* O - TTYPEn keyword value */ char *tunit, /* O - TUNITn keyword value */ char *dtype, /* O - datatype char: I, J, E, D, etc. */ LONGLONG *repeat, /* O - vector column repeat count */ double *tscal, /* O - TSCALn keyword value */ double *tzero, /* O - TZEROn keyword value */ LONGLONG *tnull, /* O - TNULLn keyword value integer cols only */ char *tdisp, /* O - TDISPn keyword value */ int *status) /* IO - error status */ /* get BINTABLE column keyword values */ { char name[FLEN_KEYWORD], comm[FLEN_COMMENT]; tcolumn *colptr; int tstatus; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); if (colnum < 1 || colnum > (fptr->Fptr)->tfield) return(*status = BAD_COL_NUM); /* get what we can from the column structure */ colptr = (fptr->Fptr)->tableptr; /* pointer to first column */ colptr += (colnum -1); /* offset to correct column */ if (ttype) strcpy(ttype, colptr->ttype); if (dtype) { if (colptr->tdatatype < 0) /* add the "P" prefix for */ strcpy(dtype, "P"); /* variable length columns */ else dtype[0] = 0; if (abs(colptr->tdatatype) == TBIT) strcat(dtype, "X"); else if (abs(colptr->tdatatype) == TBYTE) strcat(dtype, "B"); else if (abs(colptr->tdatatype) == TLOGICAL) strcat(dtype, "L"); else if (abs(colptr->tdatatype) == TSTRING) strcat(dtype, "A"); else if (abs(colptr->tdatatype) == TSHORT) strcat(dtype, "I"); else if (abs(colptr->tdatatype) == TLONG) strcat(dtype, "J"); else if (abs(colptr->tdatatype) == TLONGLONG) strcat(dtype, "K"); else if (abs(colptr->tdatatype) == TFLOAT) strcat(dtype, "E"); else if (abs(colptr->tdatatype) == TDOUBLE) strcat(dtype, "D"); else if (abs(colptr->tdatatype) == TCOMPLEX) strcat(dtype, "C"); else if (abs(colptr->tdatatype) == TDBLCOMPLEX) strcat(dtype, "M"); } if (repeat) *repeat = colptr->trepeat; if (tscal) *tscal = colptr->tscale; if (tzero) *tzero = colptr->tzero; if (tnull) *tnull = colptr->tnull; /* read keywords to get additional parameters */ if (tunit) { ffkeyn("TUNIT", colnum, name, status); tstatus = 0; *tunit = '\0'; ffgkys(fptr, name, tunit, comm, &tstatus); } if (tdisp) { ffkeyn("TDISP", colnum, name, status); tstatus = 0; *tdisp = '\0'; ffgkys(fptr, name, tdisp, comm, &tstatus); } return(*status); } /*--------------------------------------------------------------------------*/ int ffghdn(fitsfile *fptr, /* I - FITS file pointer */ int *chdunum) /* O - number of the CHDU; 1 = primary array */ /* Return the number of the Current HDU in the FITS file. The primary array is HDU number 1. Note that this is one of the few cfitsio routines that does not return the error status value as the value of the function. */ { *chdunum = (fptr->HDUposition) + 1; return(*chdunum); } /*--------------------------------------------------------------------------*/ int ffghadll(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG *headstart, /* O - byte offset to beginning of CHDU */ LONGLONG *datastart, /* O - byte offset to beginning of next HDU */ LONGLONG *dataend, /* O - byte offset to beginning of next HDU */ int *status) /* IO - error status */ /* Return the address (= byte offset) in the FITS file to the beginning of the current HDU, the beginning of the data unit, and the end of the data unit. */ { if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { if (ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status) > 0) return(*status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if (ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } if (headstart) *headstart = (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]; if (datastart) *datastart = (fptr->Fptr)->datastart; if (dataend) *dataend = (fptr->Fptr)->headstart[((fptr->Fptr)->curhdu) + 1]; return(*status); } /*--------------------------------------------------------------------------*/ int ffghof(fitsfile *fptr, /* I - FITS file pointer */ OFF_T *headstart, /* O - byte offset to beginning of CHDU */ OFF_T *datastart, /* O - byte offset to beginning of next HDU */ OFF_T *dataend, /* O - byte offset to beginning of next HDU */ int *status) /* IO - error status */ /* Return the address (= byte offset) in the FITS file to the beginning of the current HDU, the beginning of the data unit, and the end of the data unit. */ { if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { if (ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status) > 0) return(*status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if (ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } if (headstart) *headstart = (OFF_T) (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]; if (datastart) *datastart = (OFF_T) (fptr->Fptr)->datastart; if (dataend) *dataend = (OFF_T) (fptr->Fptr)->headstart[((fptr->Fptr)->curhdu) + 1]; return(*status); } /*--------------------------------------------------------------------------*/ int ffghad(fitsfile *fptr, /* I - FITS file pointer */ long *headstart, /* O - byte offset to beginning of CHDU */ long *datastart, /* O - byte offset to beginning of next HDU */ long *dataend, /* O - byte offset to beginning of next HDU */ int *status) /* IO - error status */ /* Return the address (= byte offset) in the FITS file to the beginning of the current HDU, the beginning of the data unit, and the end of the data unit. */ { LONGLONG shead, sdata, edata; if (*status > 0) return(*status); ffghadll(fptr, &shead, &sdata, &edata, status); if (headstart) { if (shead > LONG_MAX) *status = NUM_OVERFLOW; else *headstart = (long) shead; } if (datastart) { if (sdata > LONG_MAX) *status = NUM_OVERFLOW; else *datastart = (long) sdata; } if (dataend) { if (edata > LONG_MAX) *status = NUM_OVERFLOW; else *dataend = (long) edata; } return(*status); } /*--------------------------------------------------------------------------*/ int ffrhdu(fitsfile *fptr, /* I - FITS file pointer */ int *hdutype, /* O - type of HDU */ int *status) /* IO - error status */ /* read the required keywords of the CHDU and initialize the corresponding structure elements that describe the format of the HDU */ { int ii, tstatus; char card[FLEN_CARD]; char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; char xname[FLEN_VALUE], *xtension, urltype[20]; if (*status > 0) return(*status); if (ffgrec(fptr, 1, card, status) > 0 ) /* get the 80-byte card */ { ffpmsg("Cannot read first keyword in header (ffrhdu)."); return(*status); } strncpy(name,card,8); /* first 8 characters = the keyword name */ name[8] = '\0'; for (ii=7; ii >= 0; ii--) /* replace trailing blanks with nulls */ { if (name[ii] == ' ') name[ii] = '\0'; else break; } if (ffpsvc(card, value, comm, status) > 0) /* parse value and comment */ { ffpmsg("Cannot read value of first keyword in header (ffrhdu):"); ffpmsg(card); return(*status); } if (!strcmp(name, "SIMPLE")) /* this is the primary array */ { ffpinit(fptr, status); /* initialize the primary array */ if (hdutype != NULL) *hdutype = 0; } else if (!strcmp(name, "XTENSION")) /* this is an XTENSION keyword */ { if (ffc2s(value, xname, status) > 0) /* get the value string */ { ffpmsg("Bad value string for XTENSION keyword:"); ffpmsg(value); return(*status); } xtension = xname; while (*xtension == ' ') /* ignore any leading spaces in name */ xtension++; if (!strcmp(xtension, "TABLE")) { ffainit(fptr, status); /* initialize the ASCII table */ if (hdutype != NULL) *hdutype = 1; } else if (!strcmp(xtension, "BINTABLE") || !strcmp(xtension, "A3DTABLE") || !strcmp(xtension, "3DTABLE") ) { ffbinit(fptr, status); /* initialize the binary table */ if (hdutype != NULL) *hdutype = 2; } else { tstatus = 0; ffpinit(fptr, &tstatus); /* probably an IMAGE extension */ if (tstatus == UNKNOWN_EXT && hdutype != NULL) *hdutype = -1; /* don't recognize this extension type */ else { *status = tstatus; if (hdutype != NULL) *hdutype = 0; } } } else /* not the start of a new extension */ { if (card[0] == 0 || card[0] == 10) /* some editors append this character to EOF */ { *status = END_OF_FILE; } else { *status = UNKNOWN_REC; /* found unknown type of record */ ffpmsg ("Extension doesn't start with SIMPLE or XTENSION keyword. (ffrhdu)"); ffpmsg(card); } } /* compare the starting position of the next HDU (if any) with the size */ /* of the whole file to see if this is the last HDU in the file */ if ((fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] < (fptr->Fptr)->logfilesize ) { (fptr->Fptr)->lasthdu = 0; /* no, not the last HDU */ } else { (fptr->Fptr)->lasthdu = 1; /* yes, this is the last HDU */ /* special code for mem:// type files (FITS file in memory) */ /* Allocate enough memory to hold the entire HDU. */ /* Without this code, CFITSIO would repeatedly realloc memory */ /* to incrementally increase the size of the file by 2880 bytes */ /* at a time, until it reached the final size */ ffurlt(fptr, urltype, status); if (!strcmp(urltype,"mem://") || !strcmp(urltype,"memkeep://")) { fftrun(fptr, (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1], status); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffpinit(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* initialize the parameters defining the structure of the primary array or an Image extension */ { int groups, tstatus, simple, bitpix, naxis, extend, nspace; int ttype = 0, bytlen = 0, ii, ntilebins; long pcount, gcount; LONGLONG naxes[999], npix, blank; double bscale, bzero; char comm[FLEN_COMMENT]; tcolumn *colptr; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); (fptr->Fptr)->hdutype = IMAGE_HDU; /* primary array or IMAGE extension */ (fptr->Fptr)->headend = (fptr->Fptr)->logfilesize; /* set max size */ groups = 0; tstatus = *status; /* get all the descriptive info about this HDU */ ffgphd(fptr, 999, &simple, &bitpix, &naxis, naxes, &pcount, &gcount, &extend, &bscale, &bzero, &blank, &nspace, status); if (*status == NOT_IMAGE) *status = tstatus; /* ignore 'unknown extension type' error */ else if (*status > 0) return(*status); /* the logical end of the header is 80 bytes before the current position, minus any trailing blank keywords just before the END keyword. */ (fptr->Fptr)->headend = (fptr->Fptr)->nextkey - (80 * (nspace + 1)); /* the data unit begins at the beginning of the next logical block */ (fptr->Fptr)->datastart = (((fptr->Fptr)->nextkey - 80) / 2880 + 1) * 2880; if (naxis > 0 && naxes[0] == 0) /* test for 'random groups' */ { tstatus = 0; ffmaky(fptr, 2, status); /* reset to beginning of header */ if (ffgkyl(fptr, "GROUPS", &groups, comm, &tstatus)) groups = 0; /* GROUPS keyword not found */ } if (bitpix == BYTE_IMG) /* test bitpix and set the datatype code */ { ttype=TBYTE; bytlen=1; } else if (bitpix == SHORT_IMG) { ttype=TSHORT; bytlen=2; } else if (bitpix == LONG_IMG) { ttype=TLONG; bytlen=4; } else if (bitpix == LONGLONG_IMG) { ttype=TLONGLONG; bytlen=8; } else if (bitpix == FLOAT_IMG) { ttype=TFLOAT; bytlen=4; } else if (bitpix == DOUBLE_IMG) { ttype=TDOUBLE; bytlen=8; } /* calculate the size of the primary array */ (fptr->Fptr)->imgdim = naxis; if (naxis == 0) { npix = 0; } else { if (groups) { npix = 1; /* NAXIS1 = 0 is a special flag for 'random groups' */ } else { npix = naxes[0]; } (fptr->Fptr)->imgnaxis[0] = naxes[0]; for (ii=1; ii < naxis; ii++) { npix = npix*naxes[ii]; /* calc number of pixels in the array */ (fptr->Fptr)->imgnaxis[ii] = naxes[ii]; } } /* now we know everything about the array; just fill in the parameters: the next HDU begins in the next logical block after the data */ (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] = (fptr->Fptr)->datastart + ( ((LONGLONG) pcount + npix) * bytlen * gcount + 2879) / 2880 * 2880; /* initialize the fictitious heap starting address (immediately following the array data) and a zero length heap. This is used to find the end of the data when checking the fill values in the last block. */ (fptr->Fptr)->heapstart = (npix + pcount) * bytlen * gcount; (fptr->Fptr)->heapsize = 0; (fptr->Fptr)->compressimg = 0; /* this is not a compressed image */ if (naxis == 0) { (fptr->Fptr)->rowlength = 0; /* rows have zero length */ (fptr->Fptr)->tfield = 0; /* table has no fields */ /* free the tile-compressed image cache, if it exists */ if ((fptr->Fptr)->tilerow) { ntilebins = (((fptr->Fptr)->znaxis[0] - 1) / ((fptr->Fptr)->tilesize[0])) + 1; for (ii = 0; ii < ntilebins; ii++) { if ((fptr->Fptr)->tiledata[ii]) { free((fptr->Fptr)->tiledata[ii]); } if ((fptr->Fptr)->tilenullarray[ii]) { free((fptr->Fptr)->tilenullarray[ii]); } } free((fptr->Fptr)->tileanynull); free((fptr->Fptr)->tiletype); free((fptr->Fptr)->tiledatasize); free((fptr->Fptr)->tilenullarray); free((fptr->Fptr)->tiledata); free((fptr->Fptr)->tilerow); (fptr->Fptr)->tileanynull = 0; (fptr->Fptr)->tiletype = 0; (fptr->Fptr)->tiledatasize = 0; (fptr->Fptr)->tilenullarray = 0; (fptr->Fptr)->tiledata = 0; (fptr->Fptr)->tilerow = 0; } if ((fptr->Fptr)->tableptr) free((fptr->Fptr)->tableptr); /* free memory for the old CHDU */ (fptr->Fptr)->tableptr = 0; /* set a null table structure pointer */ (fptr->Fptr)->numrows = 0; (fptr->Fptr)->origrows = 0; } else { /* The primary array is actually interpreted as a binary table. There are two columns: the first column contains the group parameters if any. The second column contains the primary array of data as a single vector column element. In the case of 'random grouped' format, each group is stored in a separate row of the table. */ /* the number of rows is equal to the number of groups */ (fptr->Fptr)->numrows = gcount; (fptr->Fptr)->origrows = gcount; (fptr->Fptr)->rowlength = (npix + pcount) * bytlen; /* total size */ (fptr->Fptr)->tfield = 2; /* 2 fields: group params and the image */ /* free the tile-compressed image cache, if it exists */ if ((fptr->Fptr)->tilerow) { ntilebins = (((fptr->Fptr)->znaxis[0] - 1) / ((fptr->Fptr)->tilesize[0])) + 1; for (ii = 0; ii < ntilebins; ii++) { if ((fptr->Fptr)->tiledata[ii]) { free((fptr->Fptr)->tiledata[ii]); } if ((fptr->Fptr)->tilenullarray[ii]) { free((fptr->Fptr)->tilenullarray[ii]); } } free((fptr->Fptr)->tileanynull); free((fptr->Fptr)->tiletype); free((fptr->Fptr)->tiledatasize); free((fptr->Fptr)->tilenullarray); free((fptr->Fptr)->tiledata); free((fptr->Fptr)->tilerow); (fptr->Fptr)->tileanynull = 0; (fptr->Fptr)->tiletype = 0; (fptr->Fptr)->tiledatasize = 0; (fptr->Fptr)->tilenullarray = 0; (fptr->Fptr)->tiledata = 0; (fptr->Fptr)->tilerow = 0; } if ((fptr->Fptr)->tableptr) free((fptr->Fptr)->tableptr); /* free memory for the old CHDU */ colptr = (tcolumn *) calloc(2, sizeof(tcolumn) ) ; if (!colptr) { ffpmsg ("malloc failed to get memory for FITS array descriptors (ffpinit)"); (fptr->Fptr)->tableptr = 0; /* set a null table structure pointer */ return(*status = ARRAY_TOO_BIG); } /* copy the table structure address to the fitsfile structure */ (fptr->Fptr)->tableptr = colptr; /* the first column represents the group parameters, if any */ colptr->tbcol = 0; colptr->tdatatype = ttype; colptr->twidth = bytlen; colptr->trepeat = (LONGLONG) pcount; colptr->tscale = 1.; colptr->tzero = 0.; colptr->tnull = blank; colptr++; /* increment pointer to the second column */ /* the second column represents the image array */ colptr->tbcol = pcount * bytlen; /* col starts after the group parms */ colptr->tdatatype = ttype; colptr->twidth = bytlen; colptr->trepeat = npix; colptr->tscale = bscale; colptr->tzero = bzero; colptr->tnull = blank; } /* reset next keyword pointer to the start of the header */ (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu ]; return(*status); } /*--------------------------------------------------------------------------*/ int ffainit(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ { /* initialize the parameters defining the structure of an ASCII table */ int ii, nspace, ntilebins; long tfield; LONGLONG pcount, rowlen, nrows, tbcoln; tcolumn *colptr = 0; char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; char message[FLEN_ERRMSG], errmsg[81]; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); (fptr->Fptr)->hdutype = ASCII_TBL; /* set that this is an ASCII table */ (fptr->Fptr)->headend = (fptr->Fptr)->logfilesize; /* set max size */ /* get table parameters and test that the header is a valid: */ if (ffgttb(fptr, &rowlen, &nrows, &pcount, &tfield, status) > 0) return(*status); if (pcount != 0) { ffpmsg("PCOUNT keyword not equal to 0 in ASCII table (ffainit)."); sprintf(errmsg, " PCOUNT = %ld", (long) pcount); ffpmsg(errmsg); return(*status = BAD_PCOUNT); } (fptr->Fptr)->rowlength = rowlen; /* store length of a row */ (fptr->Fptr)->tfield = tfield; /* store number of table fields in row */ /* free the tile-compressed image cache, if it exists */ if ((fptr->Fptr)->tilerow) { ntilebins = (((fptr->Fptr)->znaxis[0] - 1) / ((fptr->Fptr)->tilesize[0])) + 1; for (ii = 0; ii < ntilebins; ii++) { if ((fptr->Fptr)->tiledata[ii]) { free((fptr->Fptr)->tiledata[ii]); } if ((fptr->Fptr)->tilenullarray[ii]) { free((fptr->Fptr)->tilenullarray[ii]); } } free((fptr->Fptr)->tileanynull); free((fptr->Fptr)->tiletype); free((fptr->Fptr)->tiledatasize); free((fptr->Fptr)->tilenullarray); free((fptr->Fptr)->tiledata); free((fptr->Fptr)->tilerow); (fptr->Fptr)->tileanynull = 0; (fptr->Fptr)->tiletype = 0; (fptr->Fptr)->tiledatasize = 0; (fptr->Fptr)->tilenullarray = 0; (fptr->Fptr)->tiledata = 0; (fptr->Fptr)->tilerow = 0; } if ((fptr->Fptr)->tableptr) free((fptr->Fptr)->tableptr); /* free memory for the old CHDU */ /* mem for column structures ; space is initialized = 0 */ if (tfield > 0) { colptr = (tcolumn *) calloc(tfield, sizeof(tcolumn) ); if (!colptr) { ffpmsg ("malloc failed to get memory for FITS table descriptors (ffainit)"); (fptr->Fptr)->tableptr = 0; /* set a null table structure pointer */ return(*status = ARRAY_TOO_BIG); } } /* copy the table structure address to the fitsfile structure */ (fptr->Fptr)->tableptr = colptr; /* initialize the table field parameters */ for (ii = 0; ii < tfield; ii++, colptr++) { colptr->ttype[0] = '\0'; /* null column name */ colptr->tscale = 1.; colptr->tzero = 0.; colptr->strnull[0] = ASCII_NULL_UNDEFINED; /* null value undefined */ colptr->tbcol = -1; /* initialize to illegal value */ colptr->tdatatype = -9999; /* initialize to illegal value */ } /* Initialize the fictitious heap starting address (immediately following the table data) and a zero length heap. This is used to find the end of the table data when checking the fill values in the last block. There is no special data following an ASCII table. */ (fptr->Fptr)->numrows = nrows; (fptr->Fptr)->origrows = nrows; (fptr->Fptr)->heapstart = rowlen * nrows; (fptr->Fptr)->heapsize = 0; (fptr->Fptr)->compressimg = 0; /* this is not a compressed image */ /* now search for the table column keywords and the END keyword */ for (nspace = 0, ii = 8; 1; ii++) /* infinite loop */ { ffgkyn(fptr, ii, name, value, comm, status); /* try to ignore minor syntax errors */ if (*status == NO_QUOTE) { strcat(value, "'"); *status = 0; } else if (*status == BAD_KEYCHAR) { *status = 0; } if (*status == END_OF_FILE) { ffpmsg("END keyword not found in ASCII table header (ffainit)."); return(*status = NO_END); } else if (*status > 0) return(*status); else if (name[0] == 'T') /* keyword starts with 'T' ? */ ffgtbp(fptr, name, value, status); /* test if column keyword */ else if (!FSTRCMP(name, "END")) /* is this the END keyword? */ break; if (!name[0] && !value[0] && !comm[0]) /* a blank keyword? */ nspace++; else nspace = 0; } /* test that all required keywords were found and have legal values */ colptr = (fptr->Fptr)->tableptr; for (ii = 0; ii < tfield; ii++, colptr++) { tbcoln = colptr->tbcol; /* the starting column number (zero based) */ if (colptr->tdatatype == -9999) { ffkeyn("TFORM", ii+1, name, status); /* construct keyword name */ sprintf(message,"Required %s keyword not found (ffainit).", name); ffpmsg(message); return(*status = NO_TFORM); } else if (tbcoln == -1) { ffkeyn("TBCOL", ii+1, name, status); /* construct keyword name */ sprintf(message,"Required %s keyword not found (ffainit).", name); ffpmsg(message); return(*status = NO_TBCOL); } else if ((fptr->Fptr)->rowlength != 0 && (tbcoln < 0 || tbcoln >= (fptr->Fptr)->rowlength ) ) { ffkeyn("TBCOL", ii+1, name, status); /* construct keyword name */ sprintf(message,"Value of %s keyword out of range: %ld (ffainit).", name, (long) tbcoln); ffpmsg(message); return(*status = BAD_TBCOL); } else if ((fptr->Fptr)->rowlength != 0 && tbcoln + colptr->twidth > (fptr->Fptr)->rowlength ) { sprintf(message,"Column %d is too wide to fit in table (ffainit)", ii+1); ffpmsg(message); sprintf(message, " TFORM = %s and NAXIS1 = %ld", colptr->tform, (long) (fptr->Fptr)->rowlength); ffpmsg(message); return(*status = COL_TOO_WIDE); } } /* now we know everything about the table; just fill in the parameters: the 'END' record is 80 bytes before the current position, minus any trailing blank keywords just before the END keyword. */ (fptr->Fptr)->headend = (fptr->Fptr)->nextkey - (80 * (nspace + 1)); /* the data unit begins at the beginning of the next logical block */ (fptr->Fptr)->datastart = (((fptr->Fptr)->nextkey - 80) / 2880 + 1) * 2880; /* the next HDU begins in the next logical block after the data */ (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] = (fptr->Fptr)->datastart + ( ((LONGLONG)rowlen * nrows + 2879) / 2880 * 2880 ); /* reset next keyword pointer to the start of the header */ (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu ]; return(*status); } /*--------------------------------------------------------------------------*/ int ffbinit(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ { /* initialize the parameters defining the structure of a binary table */ int ii, nspace, ntilebins; long tfield; LONGLONG pcount, rowlen, nrows, totalwidth; tcolumn *colptr = 0; char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT]; char message[FLEN_ERRMSG]; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); (fptr->Fptr)->hdutype = BINARY_TBL; /* set that this is a binary table */ (fptr->Fptr)->headend = (fptr->Fptr)->logfilesize; /* set max size */ /* get table parameters and test that the header is valid: */ if (ffgttb(fptr, &rowlen, &nrows, &pcount, &tfield, status) > 0) return(*status); (fptr->Fptr)->rowlength = rowlen; /* store length of a row */ (fptr->Fptr)->tfield = tfield; /* store number of table fields in row */ /* free the tile-compressed image cache, if it exists */ if ((fptr->Fptr)->tilerow) { ntilebins = (((fptr->Fptr)->znaxis[0] - 1) / ((fptr->Fptr)->tilesize[0])) + 1; for (ii = 0; ii < ntilebins; ii++) { if ((fptr->Fptr)->tiledata[ii]) { free((fptr->Fptr)->tiledata[ii]); } if ((fptr->Fptr)->tilenullarray[ii]) { free((fptr->Fptr)->tilenullarray[ii]); } } free((fptr->Fptr)->tileanynull); free((fptr->Fptr)->tiletype); free((fptr->Fptr)->tiledatasize); free((fptr->Fptr)->tilenullarray); free((fptr->Fptr)->tiledata); free((fptr->Fptr)->tilerow); (fptr->Fptr)->tileanynull = 0; (fptr->Fptr)->tiletype = 0; (fptr->Fptr)->tiledatasize = 0; (fptr->Fptr)->tilenullarray = 0; (fptr->Fptr)->tiledata = 0; (fptr->Fptr)->tilerow = 0; } if ((fptr->Fptr)->tableptr) free((fptr->Fptr)->tableptr); /* free memory for the old CHDU */ /* mem for column structures ; space is initialized = 0 */ if (tfield > 0) { colptr = (tcolumn *) calloc(tfield, sizeof(tcolumn) ); if (!colptr) { ffpmsg ("malloc failed to get memory for FITS table descriptors (ffbinit)"); (fptr->Fptr)->tableptr = 0; /* set a null table structure pointer */ return(*status = ARRAY_TOO_BIG); } } /* copy the table structure address to the fitsfile structure */ (fptr->Fptr)->tableptr = colptr; /* initialize the table field parameters */ for (ii = 0; ii < tfield; ii++, colptr++) { colptr->ttype[0] = '\0'; /* null column name */ colptr->tscale = 1.; colptr->tzero = 0.; colptr->tnull = NULL_UNDEFINED; /* (integer) null value undefined */ colptr->tdatatype = -9999; /* initialize to illegal value */ colptr->trepeat = 1; colptr->strnull[0] = '\0'; /* for ASCII string columns (TFORM = rA) */ } /* Initialize the heap starting address (immediately following the table data) and the size of the heap. This is used to find the end of the table data when checking the fill values in the last block. */ (fptr->Fptr)->numrows = nrows; (fptr->Fptr)->origrows = nrows; (fptr->Fptr)->heapstart = rowlen * nrows; (fptr->Fptr)->heapsize = pcount; (fptr->Fptr)->compressimg = 0; /* initialize as not a compressed image */ /* now search for the table column keywords and the END keyword */ for (nspace = 0, ii = 8; 1; ii++) /* infinite loop */ { ffgkyn(fptr, ii, name, value, comm, status); /* try to ignore minor syntax errors */ if (*status == NO_QUOTE) { strcat(value, "'"); *status = 0; } else if (*status == BAD_KEYCHAR) { *status = 0; } if (*status == END_OF_FILE) { ffpmsg("END keyword not found in binary table header (ffbinit)."); return(*status = NO_END); } else if (*status > 0) return(*status); else if (name[0] == 'T') /* keyword starts with 'T' ? */ ffgtbp(fptr, name, value, status); /* test if column keyword */ else if (!FSTRCMP(name, "ZIMAGE")) { if (value[0] == 'T') (fptr->Fptr)->compressimg = 1; /* this is a compressed image */ } else if (!FSTRCMP(name, "END")) /* is this the END keyword? */ break; if (!name[0] && !value[0] && !comm[0]) /* a blank keyword? */ nspace++; else nspace = 0; /* reset number of consecutive spaces before END */ } /* test that all the required keywords were found and have legal values */ colptr = (fptr->Fptr)->tableptr; /* set pointer to first column */ for (ii = 0; ii < tfield; ii++, colptr++) { if (colptr->tdatatype == -9999) { ffkeyn("TFORM", ii+1, name, status); /* construct keyword name */ sprintf(message,"Required %s keyword not found (ffbinit).", name); ffpmsg(message); return(*status = NO_TFORM); } } /* now we know everything about the table; just fill in the parameters: the 'END' record is 80 bytes before the current position, minus any trailing blank keywords just before the END keyword. */ (fptr->Fptr)->headend = (fptr->Fptr)->nextkey - (80 * (nspace + 1)); /* the data unit begins at the beginning of the next logical block */ (fptr->Fptr)->datastart = (((fptr->Fptr)->nextkey - 80) / 2880 + 1) * 2880; /* the next HDU begins in the next logical block after the data */ (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] = (fptr->Fptr)->datastart + ( ((fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize + 2879) / 2880 * 2880 ); /* determine the byte offset to the beginning of each column */ ffgtbc(fptr, &totalwidth, status); if (totalwidth != rowlen) { sprintf(message, "NAXIS1 = %ld is not equal to the sum of column widths: %ld", (long) rowlen, (long) totalwidth); ffpmsg(message); *status = BAD_ROW_WIDTH; } /* reset next keyword pointer to the start of the header */ (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu ]; if ( (fptr->Fptr)->compressimg == 1) /* Is this a compressed image */ imcomp_get_compressed_image_par(fptr, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgabc(int tfields, /* I - number of columns in the table */ char **tform, /* I - value of TFORMn keyword for each column */ int space, /* I - number of spaces to leave between cols */ long *rowlen, /* O - total width of a table row */ long *tbcol, /* O - starting byte in row for each column */ int *status) /* IO - error status */ /* calculate the starting byte offset of each column of an ASCII table and the total length of a row, in bytes. The input space value determines how many blank spaces to leave between each column (1 is recommended). */ { int ii, datacode, decims; long width; if (*status > 0) return(*status); *rowlen=0; if (tfields <= 0) return(*status); tbcol[0] = 1; for (ii = 0; ii < tfields; ii++) { tbcol[ii] = *rowlen + 1; /* starting byte in row of column */ ffasfm(tform[ii], &datacode, &width, &decims, status); *rowlen += (width + space); /* total length of row */ } *rowlen -= space; /* don't add space after the last field */ return (*status); } /*--------------------------------------------------------------------------*/ int ffgtbc(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG *totalwidth, /* O - total width of a table row */ int *status) /* IO - error status */ { /* calculate the starting byte offset of each column of a binary table. Use the values of the datatype code and repeat counts in the column structure. Return the total length of a row, in bytes. */ int tfields, ii; LONGLONG nbytes; tcolumn *colptr; char message[FLEN_ERRMSG], *cptr; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); tfields = (fptr->Fptr)->tfield; colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ *totalwidth = 0; for (ii = 0; ii < tfields; ii++, colptr++) { colptr->tbcol = *totalwidth; /* byte offset in row to this column */ if (colptr->tdatatype == TSTRING) { nbytes = colptr->trepeat; /* one byte per char */ } else if (colptr->tdatatype == TBIT) { nbytes = ( colptr->trepeat + 7) / 8; } else if (colptr->tdatatype > 0) { nbytes = colptr->trepeat * (colptr->tdatatype / 10); } else { cptr = colptr->tform; while (isdigit(*cptr)) cptr++; if (*cptr == 'P') /* this is a 'P' variable length descriptor (neg. tdatatype) */ nbytes = colptr->trepeat * 8; else if (*cptr == 'Q') /* this is a 'Q' variable length descriptor (neg. tdatatype) */ nbytes = colptr->trepeat * 16; else { sprintf(message, "unknown binary table column type: %s", colptr->tform); ffpmsg(message); *status = BAD_TFORM; return(*status); } } *totalwidth = *totalwidth + nbytes; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgtbp(fitsfile *fptr, /* I - FITS file pointer */ char *name, /* I - name of the keyword */ char *value, /* I - value string of the keyword */ int *status) /* IO - error status */ { /* Get TaBle Parameter. The input keyword name begins with the letter T. Test if the keyword is one of the table column definition keywords of an ASCII or binary table. If so, decode it and update the value in the structure. */ int tstatus, datacode, decimals; long width, repeat, nfield, ivalue; LONGLONG jjvalue; double dvalue; char tvalue[FLEN_VALUE], *loc; char message[FLEN_ERRMSG]; tcolumn *colptr; if (*status > 0) return(*status); tstatus = 0; /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if(!FSTRNCMP(name + 1, "TYPE", 4) ) { /* get the index number */ if( ffc2ii(name + 5, &nfield, &tstatus) > 0) /* read index no. */ return(*status); /* must not be an indexed keyword */ if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ return(*status); colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ colptr = colptr + nfield - 1; /* point to the correct column */ if (ffc2s(value, tvalue, &tstatus) > 0) /* remove quotes */ return(*status); strcpy(colptr->ttype, tvalue); /* copy col name to structure */ } else if(!FSTRNCMP(name + 1, "FORM", 4) ) { /* get the index number */ if( ffc2ii(name + 5, &nfield, &tstatus) > 0) /* read index no. */ return(*status); /* must not be an indexed keyword */ if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ return(*status); colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ colptr = colptr + nfield - 1; /* point to the correct column */ if (ffc2s(value, tvalue, &tstatus) > 0) /* remove quotes */ return(*status); strncpy(colptr->tform, tvalue, 9); /* copy TFORM to structure */ colptr->tform[9] = '\0'; /* make sure it is terminated */ if ((fptr->Fptr)->hdutype == ASCII_TBL) /* ASCII table */ { if (ffasfm(tvalue, &datacode, &width, &decimals, status) > 0) return(*status); /* bad format code */ colptr->tdatatype = TSTRING; /* store datatype code */ colptr->trepeat = 1; /* field repeat count == 1 */ colptr->twidth = width; /* the width of the field, in bytes */ } else /* binary table */ { if (ffbnfm(tvalue, &datacode, &repeat, &width, status) > 0) return(*status); /* bad format code */ colptr->tdatatype = datacode; /* store datatype code */ colptr->trepeat = (LONGLONG) repeat; /* field repeat count */ /* Don't overwrite the unit string width if it was previously */ /* set by a TDIMn keyword and has a legal value */ if (datacode == TSTRING) { if (colptr->twidth == 0 || colptr->twidth > repeat) colptr->twidth = width; /* width of a unit string */ } else { colptr->twidth = width; /* width of a unit value in chars */ } } } else if(!FSTRNCMP(name + 1, "BCOL", 4) ) { /* get the index number */ if( ffc2ii(name + 5, &nfield, &tstatus) > 0) /* read index no. */ return(*status); /* must not be an indexed keyword */ if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ return(*status); colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ colptr = colptr + nfield - 1; /* point to the correct column */ if ((fptr->Fptr)->hdutype == BINARY_TBL) return(*status); /* binary tables don't have TBCOL keywords */ if (ffc2ii(value, &ivalue, status) > 0) { sprintf(message, "Error reading value of %s as an integer: %s", name, value); ffpmsg(message); return(*status); } colptr->tbcol = ivalue - 1; /* convert to zero base */ } else if(!FSTRNCMP(name + 1, "SCAL", 4) ) { /* get the index number */ if( ffc2ii(name + 5, &nfield, &tstatus) > 0) /* read index no. */ return(*status); /* must not be an indexed keyword */ if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ return(*status); colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ colptr = colptr + nfield - 1; /* point to the correct column */ if (ffc2dd(value, &dvalue, &tstatus) > 0) { sprintf(message, "Error reading value of %s as a double: %s", name, value); ffpmsg(message); /* ignore this error, so don't return error status */ return(*status); } colptr->tscale = dvalue; } else if(!FSTRNCMP(name + 1, "ZERO", 4) ) { /* get the index number */ if( ffc2ii(name + 5, &nfield, &tstatus) > 0) /* read index no. */ return(*status); /* must not be an indexed keyword */ if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ return(*status); colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ colptr = colptr + nfield - 1; /* point to the correct column */ if (ffc2dd(value, &dvalue, &tstatus) > 0) { sprintf(message, "Error reading value of %s as a double: %s", name, value); ffpmsg(message); /* ignore this error, so don't return error status */ return(*status); } colptr->tzero = dvalue; } else if(!FSTRNCMP(name + 1, "NULL", 4) ) { /* get the index number */ if( ffc2ii(name + 5, &nfield, &tstatus) > 0) /* read index no. */ return(*status); /* must not be an indexed keyword */ if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ return(*status); colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ colptr = colptr + nfield - 1; /* point to the correct column */ if ((fptr->Fptr)->hdutype == ASCII_TBL) /* ASCII table */ { if (ffc2s(value, tvalue, &tstatus) > 0) /* remove quotes */ return(*status); strncpy(colptr->strnull, tvalue, 17); /* copy TNULL string */ colptr->strnull[17] = '\0'; /* terminate the strnull field */ } else /* binary table */ { if (ffc2jj(value, &jjvalue, &tstatus) > 0) { sprintf(message, "Error reading value of %s as an integer: %s", name, value); ffpmsg(message); /* ignore this error, so don't return error status */ return(*status); } colptr->tnull = jjvalue; /* null value for integer column */ } } else if(!FSTRNCMP(name + 1, "DIM", 3) ) { if ((fptr->Fptr)->hdutype == ASCII_TBL) /* ASCII table */ return(*status); /* ASCII tables don't support TDIMn keyword */ /* get the index number */ if( ffc2ii(name + 4, &nfield, &tstatus) > 0) /* read index no. */ return(*status); /* must not be an indexed keyword */ if (nfield < 1 || nfield > (fptr->Fptr)->tfield ) /* out of range */ return(*status); colptr = (fptr->Fptr)->tableptr; /* get pointer to columns */ colptr = colptr + nfield - 1; /* point to the correct column */ /* uninitialized columns have tdatatype set = -9999 */ if (colptr->tdatatype != -9999 && colptr->tdatatype != TSTRING) return(*status); /* this is not an ASCII string column */ loc = strchr(value, '(' ); /* find the opening parenthesis */ if (!loc) return(*status); /* not a proper TDIM keyword */ loc++; width = strtol(loc, &loc, 10); /* read size of first dimension */ if (colptr->trepeat != 1 && colptr->trepeat < width) return(*status); /* string length is greater than column width */ colptr->twidth = width; /* set width of a unit string in chars */ } else if (!FSTRNCMP(name + 1, "HEAP", 4) ) { if ((fptr->Fptr)->hdutype == ASCII_TBL) /* ASCII table */ return(*status); /* ASCII tables don't have a heap */ if (ffc2jj(value, &jjvalue, &tstatus) > 0) { sprintf(message, "Error reading value of %s as an integer: %s", name, value); ffpmsg(message); /* ignore this error, so don't return error status */ return(*status); } (fptr->Fptr)->heapstart = jjvalue; /* starting byte of the heap */ return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffgcprll( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number (1 = 1st column of table) */ LONGLONG firstrow, /* I - first row (1 = 1st row of table) */ LONGLONG firstelem, /* I - first element within vector (1 = 1st) */ LONGLONG nelem, /* I - number of elements to read or write */ int writemode, /* I - = 1 if writing data, = 0 if reading data */ /* If = 2, then writing data, but don't modify */ /* the returned values of repeat and incre. */ /* If = -1, then reading data in reverse */ /* direction. */ double *scale, /* O - FITS scaling factor (TSCALn keyword value) */ double *zero, /* O - FITS scaling zero pt (TZEROn keyword value) */ char *tform, /* O - ASCII column format: value of TFORMn keyword */ long *twidth, /* O - width of ASCII column (characters) */ int *tcode, /* O - column datatype code: I*4=41, R*4=42, etc */ int *maxelem, /* O - max number of elements that fit in buffer */ LONGLONG *startpos,/* O - offset in file to starting row & column */ LONGLONG *elemnum, /* O - starting element number ( 0 = 1st element) */ long *incre, /* O - byte offset between elements within a row */ LONGLONG *repeat, /* O - number of elements in a row (vector column) */ LONGLONG *rowlen, /* O - length of a row, in bytes */ int *hdutype, /* O - HDU type: 0, 1, 2 = primary, table, bintable */ LONGLONG *tnull, /* O - null value for integer columns */ char *snull, /* O - null value for ASCII table columns */ int *status) /* IO - error status */ /* Get Column PaRameters, and test starting row and element numbers for validity. This is a workhorse routine that is call by nearly every other routine that reads or writes to FITS files. */ { int nulpos, rangecheck = 1, tstatus = 0; LONGLONG datastart, endpos; long nblock; LONGLONG heapoffset, lrepeat, endrow, nrows, tbcol; char message[81]; tcolumn *colptr; if (fptr->HDUposition != (fptr->Fptr)->curhdu) { /* reset position to the correct HDU if necessary */ ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { /* rescan header if data structure is undefined */ if ( ffrdef(fptr, status) > 0) return(*status); } else if (writemode > 0) { /* Only terminate the header with the END card if */ /* writing to the stdout stream (don't have random access). */ /* Initialize STREAM_DRIVER to be the device number for */ /* writing FITS files directly out to the stdout stream. */ /* This only needs to be done once and is thread safe. */ if (STREAM_DRIVER <= 0 || STREAM_DRIVER > 40) { urltype2driver("stream://", &STREAM_DRIVER); } if (((fptr->Fptr)->driver == STREAM_DRIVER)) { if ((fptr->Fptr)->ENDpos != maxvalue((fptr->Fptr)->headend , (fptr->Fptr)->datastart -2880)) { ffwend(fptr, status); } } } /* Do sanity check of input parameters */ if (firstrow < 1) { if ((fptr->Fptr)->hdutype == IMAGE_HDU) /* Primary Array or IMAGE */ { sprintf(message, "Image group number is less than 1: %.0f", (double) firstrow); ffpmsg(message); return(*status = BAD_ROW_NUM); } else { sprintf(message, "Starting row number is less than 1: %.0f", (double) firstrow); ffpmsg(message); return(*status = BAD_ROW_NUM); } } else if ((fptr->Fptr)->hdutype != ASCII_TBL && firstelem < 1) { sprintf(message, "Starting element number less than 1: %ld", (long) firstelem); ffpmsg(message); return(*status = BAD_ELEM_NUM); } else if (nelem < 0) { sprintf(message, "Tried to read or write less than 0 elements: %.0f", (double) nelem); ffpmsg(message); return(*status = NEG_BYTES); } else if (colnum < 1 || colnum > (fptr->Fptr)->tfield) { sprintf(message, "Specified column number is out of range: %d", colnum); ffpmsg(message); sprintf(message, " There are %d columns in this table.", (fptr->Fptr)->tfield ); ffpmsg(message); return(*status = BAD_COL_NUM); } /* copy relevant parameters from the structure */ *hdutype = (fptr->Fptr)->hdutype; /* image, ASCII table, or BINTABLE */ *rowlen = (fptr->Fptr)->rowlength; /* width of the table, in bytes */ datastart = (fptr->Fptr)->datastart; /* offset in file to start of table */ colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ *scale = colptr->tscale; /* value scaling factor; default = 1.0 */ *zero = colptr->tzero; /* value scaling zeropoint; default = 0.0 */ *tnull = colptr->tnull; /* null value for integer columns */ tbcol = colptr->tbcol; /* offset to start of column within row */ *twidth = colptr->twidth; /* width of a single datum, in bytes */ *incre = colptr->twidth; /* increment between datums, in bytes */ *tcode = colptr->tdatatype; *repeat = colptr->trepeat; strcpy(tform, colptr->tform); /* value of TFORMn keyword */ strcpy(snull, colptr->strnull); /* null value for ASCII table columns */ if (*hdutype == ASCII_TBL && snull[0] == '\0') { /* In ASCII tables, a null value is equivalent to all spaces */ strcpy(snull, " "); /* maximum of 17 spaces */ nulpos = minvalue(17, *twidth); /* truncate to width of column */ snull[nulpos] = '\0'; } /* Special case: interpret writemode = -1 as reading data, but */ /* don't do error check for exceeding the range of pixels */ if (writemode == -1) { writemode = 0; rangecheck = 0; } /* Special case: interprete 'X' column as 'B' */ if (abs(*tcode) == TBIT) { *tcode = *tcode / TBIT * TBYTE; *repeat = (*repeat + 7) / 8; } /* Special case: support the 'rAw' format in BINTABLEs */ if (*hdutype == BINARY_TBL && *tcode == TSTRING) { *repeat = *repeat / *twidth; /* repeat = # of unit strings in field */ } else if (*hdutype == BINARY_TBL && *tcode == -TSTRING) { /* variable length string */ *incre = 1; *twidth = (long) nelem; } if (*hdutype == ASCII_TBL) *elemnum = 0; /* ASCII tables don't have vector elements */ else *elemnum = firstelem - 1; /* interprete complex and double complex as pairs of floats or doubles */ if (abs(*tcode) >= TCOMPLEX) { if (*tcode > 0) *tcode = (*tcode + 1) / 2; else *tcode = (*tcode - 1) / 2; *repeat = *repeat * 2; *twidth = *twidth / 2; *incre = *incre / 2; } /* calculate no. of pixels that fit in buffer */ /* allow for case where floats are 8 bytes long */ if (abs(*tcode) == TFLOAT) *maxelem = DBUFFSIZE / sizeof(float); else if (abs(*tcode) == TDOUBLE) *maxelem = DBUFFSIZE / sizeof(double); else if (abs(*tcode) == TSTRING) { *maxelem = (DBUFFSIZE - 1)/ *twidth; /* leave room for final \0 */ if (*maxelem == 0) { sprintf(message, "ASCII string column is too wide: %ld; max supported width is %d", *twidth, DBUFFSIZE - 1); ffpmsg(message); return(*status = COL_TOO_WIDE); } } else *maxelem = DBUFFSIZE / *twidth; /* calc starting byte position to 1st element of col */ /* (this does not apply to variable length columns) */ *startpos = datastart + ((LONGLONG)(firstrow - 1) * *rowlen) + tbcol; if (*hdutype == IMAGE_HDU && writemode) /* Primary Array or IMAGE */ { /* For primary arrays, set the repeat count greater than the total number of pixels to be written. This prevents an out-of-range error message in cases where the final image array size is not yet known or defined. */ if (*repeat < *elemnum + nelem) *repeat = *elemnum + nelem; } else if (*tcode > 0) /* Fixed length table column */ { if (*elemnum >= *repeat) { sprintf(message, "First element to write is too large: %ld; max allowed value is %ld", (long) ((*elemnum) + 1), (long) *repeat); ffpmsg(message); return(*status = BAD_ELEM_NUM); } /* last row number to be read or written */ endrow = ((*elemnum + nelem - 1) / *repeat) + firstrow; if (writemode) { /* check if we are writing beyond the current end of table */ if ((endrow > (fptr->Fptr)->numrows) && (nelem > 0) ) { /* if there are more HDUs following the current one, or */ /* if there is a data heap, then we must insert space */ /* for the new rows. */ if ( !((fptr->Fptr)->lasthdu) || (fptr->Fptr)->heapsize > 0) { nrows = endrow - ((fptr->Fptr)->numrows); if (ffirow(fptr, (fptr->Fptr)->numrows, nrows, status) > 0) { sprintf(message, "Failed to add space for %.0f new rows in table.", (double) nrows); ffpmsg(message); return(*status); } } else { /* update heap starting address */ (fptr->Fptr)->heapstart += ((LONGLONG)(endrow - (fptr->Fptr)->numrows) * (fptr->Fptr)->rowlength ); (fptr->Fptr)->numrows = endrow; /* update number of rows */ } } } else /* reading from the file */ { if ( endrow > (fptr->Fptr)->numrows && rangecheck) { if (*hdutype == IMAGE_HDU) /* Primary Array or IMAGE */ { if (firstrow > (fptr->Fptr)->numrows) { sprintf(message, "Attempted to read from group %ld of the HDU,", (long) firstrow); ffpmsg(message); sprintf(message, "however the HDU only contains %ld group(s).", (long) ((fptr->Fptr)->numrows) ); ffpmsg(message); } else { ffpmsg("Attempt to read past end of array:"); sprintf(message, " Image has %ld elements;", (long) *repeat); ffpmsg(message); sprintf(message, " Tried to read %ld elements starting at element %ld.", (long) nelem, (long) firstelem); ffpmsg(message); } } else { ffpmsg("Attempt to read past end of table:"); sprintf(message, " Table has %.0f rows with %.0f elements per row;", (double) ((fptr->Fptr)->numrows), (double) *repeat); ffpmsg(message); sprintf(message, " Tried to read %.0f elements starting at row %.0f, element %.0f.", (double) nelem, (double) firstrow, (double) ((*elemnum) + 1)); ffpmsg(message); } return(*status = BAD_ROW_NUM); } } if (*repeat == 1 && nelem > 1 && writemode != 2) { /* When accessing a scalar column, fool the calling routine into thinking that this is a vector column with very big elements. This allows multiple values (up to the maxelem number of elements that will fit in the buffer) to be read or written with a single routine call, which increases the efficiency. If writemode == 2, then the calling program does not want to have this efficiency trick applied. */ *incre = (long) *rowlen; *repeat = nelem; } } else /* Variable length Binary Table column */ { *tcode *= (-1); if (writemode) /* return next empty heap address for writing */ { *repeat = nelem + *elemnum; /* total no. of elements in the field */ /* first, check if we are overwriting an existing row, and */ /* if so, if the existing space is big enough for the new vector */ if ( firstrow <= (fptr->Fptr)->numrows ) { ffgdesll(fptr, colnum, firstrow, &lrepeat, &heapoffset, &tstatus); if (!tstatus) { if (colptr->tdatatype <= -TCOMPLEX) lrepeat = lrepeat * 2; /* no. of float or double values */ else if (colptr->tdatatype == -TBIT) lrepeat = (lrepeat + 7) / 8; /* convert from bits to bytes */ if (lrepeat >= *repeat) /* enough existing space? */ { *startpos = datastart + heapoffset + (fptr->Fptr)->heapstart; /* write the descriptor into the fixed length part of table */ if (colptr->tdatatype <= -TCOMPLEX) { /* divide repeat count by 2 to get no. of complex values */ ffpdes(fptr, colnum, firstrow, *repeat / 2, heapoffset, status); } else { ffpdes(fptr, colnum, firstrow, *repeat, heapoffset, status); } return(*status); } } } /* Add more rows to the table, if writing beyond the end. */ /* It is necessary to shift the heap down in this case */ if ( firstrow > (fptr->Fptr)->numrows) { nrows = firstrow - ((fptr->Fptr)->numrows); if (ffirow(fptr, (fptr->Fptr)->numrows, nrows, status) > 0) { sprintf(message, "Failed to add space for %.0f new rows in table.", (double) nrows); ffpmsg(message); return(*status); } } /* calculate starting position (for writing new data) in the heap */ *startpos = datastart + (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; /* write the descriptor into the fixed length part of table */ if (colptr->tdatatype <= -TCOMPLEX) { /* divide repeat count by 2 to get no. of complex values */ ffpdes(fptr, colnum, firstrow, *repeat / 2, (fptr->Fptr)->heapsize, status); } else { ffpdes(fptr, colnum, firstrow, *repeat, (fptr->Fptr)->heapsize, status); } /* If this is not the last HDU in the file, then check if */ /* extending the heap would overwrite the following header. */ /* If so, then have to insert more blocks. */ if ( !((fptr->Fptr)->lasthdu) ) { endpos = datastart + (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize + ( *repeat * (*incre)); if (endpos > (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1]) { /* calc the number of blocks that need to be added */ nblock = (long) (((endpos - 1 - (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] ) / 2880) + 1); if (ffiblk(fptr, nblock, 1, status) > 0) /* insert blocks */ { sprintf(message, "Failed to extend the size of the variable length heap by %ld blocks.", nblock); ffpmsg(message); return(*status); } } } /* increment the address to the next empty heap position */ (fptr->Fptr)->heapsize += ( *repeat * (*incre)); } else /* get the read start position in the heap */ { if ( firstrow > (fptr->Fptr)->numrows) { ffpmsg("Attempt to read past end of table"); sprintf(message, " Table has %.0f rows and tried to read row %.0f.", (double) ((fptr->Fptr)->numrows), (double) firstrow); ffpmsg(message); return(*status = BAD_ROW_NUM); } ffgdesll(fptr, colnum, firstrow, &lrepeat, &heapoffset, status); *repeat = lrepeat; if (colptr->tdatatype <= -TCOMPLEX) *repeat = *repeat * 2; /* no. of float or double values */ else if (colptr->tdatatype == -TBIT) *repeat = (*repeat + 7) / 8; /* convert from bits to bytes */ if (*elemnum >= *repeat) { sprintf(message, "Starting element to read in variable length column is too large: %ld", (long) firstelem); ffpmsg(message); sprintf(message, " This row only contains %ld elements", (long) *repeat); ffpmsg(message); return(*status = BAD_ELEM_NUM); } *startpos = datastart + heapoffset + (fptr->Fptr)->heapstart; } } return(*status); } /*---------------------------------------------------------------------------*/ int fftheap(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG *heapsz, /* O - current size of the heap */ LONGLONG *unused, /* O - no. of unused bytes in the heap */ LONGLONG *overlap, /* O - no. of bytes shared by > 1 descriptors */ int *valid, /* O - are all the heap addresses valid? */ int *status) /* IO - error status */ /* Tests the contents of the binary table variable length array heap. Returns the number of bytes that are currently not pointed to by any of the descriptors, and also the number of bytes that are pointed to by more than one descriptor. It returns valid = FALSE if any of the descriptors point to addresses that are out of the bounds of the heap. */ { int jj, typecode, pixsize; long ii, kk, theapsz, nbytes; LONGLONG repeat, offset, tunused = 0, toverlap = 0; char *buffer, message[81]; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if ( fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* rescan header to make sure everything is up to date */ else if ( ffrdef(fptr, status) > 0) return(*status); if (valid) *valid = TRUE; if (heapsz) *heapsz = (fptr->Fptr)->heapsize; if (unused) *unused = 0; if (overlap) *overlap = 0; /* return if this is not a binary table HDU or if the heap is empty */ if ( (fptr->Fptr)->hdutype != BINARY_TBL || (fptr->Fptr)->heapsize == 0 ) return(*status); if ((fptr->Fptr)->heapsize > LONG_MAX) { ffpmsg("Heap is too big to test ( > 2**31 bytes). (fftheap)"); return(*status = MEMORY_ALLOCATION); } theapsz = (long) (fptr->Fptr)->heapsize; buffer = calloc(1, theapsz); /* allocate temp space */ if (!buffer ) { sprintf(message,"Failed to allocate buffer to test the heap"); ffpmsg(message); return(*status = MEMORY_ALLOCATION); } /* loop over all cols */ for (jj = 1; jj <= (fptr->Fptr)->tfield && *status <= 0; jj++) { ffgtcl(fptr, jj, &typecode, NULL, NULL, status); if (typecode > 0) continue; /* ignore fixed length columns */ pixsize = -typecode / 10; for (ii = 1; ii <= (fptr->Fptr)->numrows; ii++) { ffgdesll(fptr, jj, ii, &repeat, &offset, status); if (typecode == -TBIT) nbytes = (long) (repeat + 7) / 8; else nbytes = (long) repeat * pixsize; if (offset < 0 || offset + nbytes > theapsz) { if (valid) *valid = FALSE; /* address out of bounds */ sprintf(message, "Descriptor in row %ld, column %d has invalid heap address", ii, jj); ffpmsg(message); } else { for (kk = 0; kk < nbytes; kk++) buffer[kk + offset]++; /* increment every used byte */ } } } for (kk = 0; kk < theapsz; kk++) { if (buffer[kk] == 0) tunused++; else if (buffer[kk] > 1) toverlap++; } if (heapsz) *heapsz = theapsz; if (unused) *unused = tunused; if (overlap) *overlap = toverlap; free(buffer); return(*status); } /*--------------------------------------------------------------------------*/ int ffcmph(fitsfile *fptr, /* I -FITS file pointer */ int *status) /* IO - error status */ /* compress the binary table heap by reordering the contents heap and recovering any unused space */ { fitsfile *tptr; int jj, typecode, pixsize, valid; long ii, buffsize = 10000, nblock, nbytes; LONGLONG unused, overlap; LONGLONG repeat, offset; char *buffer, *tbuff, comm[FLEN_COMMENT]; char message[81]; LONGLONG pcount; LONGLONG readheapstart, writeheapstart, endpos, t1heapsize, t2heapsize; if (*status > 0) return(*status); /* get information about the current heap */ fftheap(fptr, NULL, &unused, &overlap, &valid, status); if (!valid) return(*status = BAD_HEAP_PTR); /* bad heap pointers */ /* return if this is not a binary table HDU or if the heap is OK as is */ if ( (fptr->Fptr)->hdutype != BINARY_TBL || (fptr->Fptr)->heapsize == 0 || (unused == 0 && overlap == 0) || *status > 0 ) return(*status); /* copy the current HDU to a temporary file in memory */ if (ffinit( &tptr, "mem://tempheapfile", status) ) { sprintf(message,"Failed to create temporary file for the heap"); ffpmsg(message); return(*status); } if ( ffcopy(fptr, tptr, 0, status) ) { sprintf(message,"Failed to create copy of the heap"); ffpmsg(message); ffclos(tptr, status); return(*status); } buffer = (char *) malloc(buffsize); /* allocate initial buffer */ if (!buffer) { sprintf(message,"Failed to allocate buffer to copy the heap"); ffpmsg(message); ffclos(tptr, status); return(*status = MEMORY_ALLOCATION); } readheapstart = (tptr->Fptr)->datastart + (tptr->Fptr)->heapstart; writeheapstart = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart; t1heapsize = (fptr->Fptr)->heapsize; /* save original heap size */ (fptr->Fptr)->heapsize = 0; /* reset heap to zero */ /* loop over all cols */ for (jj = 1; jj <= (fptr->Fptr)->tfield && *status <= 0; jj++) { ffgtcl(tptr, jj, &typecode, NULL, NULL, status); if (typecode > 0) continue; /* ignore fixed length columns */ pixsize = -typecode / 10; /* copy heap data, row by row */ for (ii = 1; ii <= (fptr->Fptr)->numrows; ii++) { ffgdesll(tptr, jj, ii, &repeat, &offset, status); if (typecode == -TBIT) nbytes = (long) (repeat + 7) / 8; else nbytes = (long) repeat * pixsize; /* increase size of buffer if necessary to read whole array */ if (nbytes > buffsize) { tbuff = realloc(buffer, nbytes); if (tbuff) { buffer = tbuff; buffsize = nbytes; } else *status = MEMORY_ALLOCATION; } /* If this is not the last HDU in the file, then check if */ /* extending the heap would overwrite the following header. */ /* If so, then have to insert more blocks. */ if ( !((fptr->Fptr)->lasthdu) ) { endpos = writeheapstart + (fptr->Fptr)->heapsize + nbytes; if (endpos > (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1]) { /* calc the number of blocks that need to be added */ nblock = (long) (((endpos - 1 - (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] ) / 2880) + 1); if (ffiblk(fptr, nblock, 1, status) > 0) /* insert blocks */ { sprintf(message, "Failed to extend the size of the variable length heap by %ld blocks.", nblock); ffpmsg(message); } } } /* read arrray of bytes from temporary copy */ ffmbyt(tptr, readheapstart + offset, REPORT_EOF, status); ffgbyt(tptr, nbytes, buffer, status); /* write arrray of bytes back to original file */ ffmbyt(fptr, writeheapstart + (fptr->Fptr)->heapsize, IGNORE_EOF, status); ffpbyt(fptr, nbytes, buffer, status); /* write descriptor */ ffpdes(fptr, jj, ii, repeat, (fptr->Fptr)->heapsize, status); (fptr->Fptr)->heapsize += nbytes; /* update heapsize */ if (*status > 0) { free(buffer); ffclos(tptr, status); return(*status); } } } free(buffer); ffclos(tptr, status); /* delete any empty blocks at the end of the HDU */ nblock = (long) (( (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] - (writeheapstart + (fptr->Fptr)->heapsize) ) / 2880); if (nblock > 0) { t2heapsize = (fptr->Fptr)->heapsize; /* save new heap size */ (fptr->Fptr)->heapsize = t1heapsize; /* restore original heap size */ ffdblk(fptr, nblock, status); (fptr->Fptr)->heapsize = t2heapsize; /* reset correct heap size */ } /* update the PCOUNT value (size of heap) */ ffmaky(fptr, 2, status); /* reset to beginning of header */ ffgkyjj(fptr, "PCOUNT", &pcount, comm, status); if ((fptr->Fptr)->heapsize != pcount) { ffmkyj(fptr, "PCOUNT", (fptr->Fptr)->heapsize, comm, status); } ffrdef(fptr, status); /* rescan new HDU structure */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgdes(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number (1 = 1st column of table) */ LONGLONG rownum, /* I - row number (1 = 1st row of table) */ long *length, /* O - number of elements in the row */ long *heapaddr, /* O - heap pointer to the data */ int *status) /* IO - error status */ /* get (read) the variable length vector descriptor from the table. */ { LONGLONG lengthjj, heapaddrjj; if (ffgdesll(fptr, colnum, rownum, &lengthjj, &heapaddrjj, status) > 0) return(*status); /* convert the temporary 8-byte values to 4-byte values */ /* check for overflow */ if (length) { if (lengthjj > LONG_MAX) *status = NUM_OVERFLOW; else *length = (long) lengthjj; } if (heapaddr) { if (heapaddrjj > LONG_MAX) *status = NUM_OVERFLOW; else *heapaddr = (long) heapaddrjj; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgdesll(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number (1 = 1st column of table) */ LONGLONG rownum, /* I - row number (1 = 1st row of table) */ LONGLONG *length, /* O - number of elements in the row */ LONGLONG *heapaddr, /* O - heap pointer to the data */ int *status) /* IO - error status */ /* get (read) the variable length vector descriptor from the binary table. This is similar to ffgdes, except it supports the full 8-byte range of the length and offset values in 'Q' columns, as well as 'P' columns. */ { LONGLONG bytepos; unsigned int descript4[2] = {0,0}; LONGLONG descript8[2] = {0,0}; tcolumn *colptr; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ colptr += (colnum - 1); /* offset to the correct column */ if (colptr->tdatatype >= 0) { *status = NOT_VARI_LEN; return(*status); } bytepos = (fptr->Fptr)->datastart + ((fptr->Fptr)->rowlength * (rownum - 1)) + colptr->tbcol; if (colptr->tform[0] == 'P' || colptr->tform[1] == 'P') { /* read 4-byte descriptor */ if (ffgi4b(fptr, bytepos, 2, 4, (INT32BIT *) descript4, status) <= 0) { if (length) *length = (LONGLONG) descript4[0]; /* 1st word is the length */ if (heapaddr) *heapaddr = (LONGLONG) descript4[1]; /* 2nd word is the address */ } } else /* this is for 'Q' columns */ { /* read 8 byte descriptor */ if (ffgi8b(fptr, bytepos, 2, 8, (long *) descript8, status) <= 0) { if (length) *length = descript8[0]; /* 1st word is the length */ if (heapaddr) *heapaddr = descript8[1]; /* 2nd word is the address */ } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgdess(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number (1 = 1st column of table) */ LONGLONG firstrow, /* I - first row (1 = 1st row of table) */ LONGLONG nrows, /* I - number or rows to read */ long *length, /* O - number of elements in the row */ long *heapaddr, /* O - heap pointer to the data */ int *status) /* IO - error status */ /* get (read) a range of variable length vector descriptors from the table. */ { LONGLONG rowsize, bytepos; long ii; INT32BIT descript4[2] = {0,0}; LONGLONG descript8[2] = {0,0}; tcolumn *colptr; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ colptr += (colnum - 1); /* offset to the correct column */ if (colptr->tdatatype >= 0) { *status = NOT_VARI_LEN; return(*status); } rowsize = (fptr->Fptr)->rowlength; bytepos = (fptr->Fptr)->datastart + (rowsize * (firstrow - 1)) + colptr->tbcol; if (colptr->tform[0] == 'P' || colptr->tform[1] == 'P') { /* read 4-byte descriptors */ for (ii = 0; ii < nrows; ii++) { /* read descriptors */ if (ffgi4b(fptr, bytepos, 2, 4, descript4, status) <= 0) { if (length) { *length = (long) descript4[0]; /* 1st word is the length */ length++; } if (heapaddr) { *heapaddr = (long) descript4[1]; /* 2nd word is the address */ heapaddr++; } bytepos += rowsize; } else return(*status); } } else /* this is for 'Q' columns */ { /* read 8-byte descriptors */ for (ii = 0; ii < nrows; ii++) { /* read descriptors */ if (ffgi8b(fptr, bytepos, 2, 8, (long *) descript8, status) <= 0) { if (length) { if (descript8[0] > LONG_MAX)*status = NUM_OVERFLOW; *length = (long) descript8[0]; /* 1st word is the length */ length++; } if (heapaddr) { if (descript8[1] > LONG_MAX)*status = NUM_OVERFLOW; *heapaddr = (long) descript8[1]; /* 2nd word is the address */ heapaddr++; } bytepos += rowsize; } else return(*status); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgdessll(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number (1 = 1st column of table) */ LONGLONG firstrow, /* I - first row (1 = 1st row of table) */ LONGLONG nrows, /* I - number or rows to read */ LONGLONG *length, /* O - number of elements in the row */ LONGLONG *heapaddr, /* O - heap pointer to the data */ int *status) /* IO - error status */ /* get (read) a range of variable length vector descriptors from the table. */ { LONGLONG rowsize, bytepos; long ii; unsigned int descript4[2] = {0,0}; LONGLONG descript8[2] = {0,0}; tcolumn *colptr; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ colptr += (colnum - 1); /* offset to the correct column */ if (colptr->tdatatype >= 0) { *status = NOT_VARI_LEN; return(*status); } rowsize = (fptr->Fptr)->rowlength; bytepos = (fptr->Fptr)->datastart + (rowsize * (firstrow - 1)) + colptr->tbcol; if (colptr->tform[0] == 'P' || colptr->tform[1] == 'P') { /* read 4-byte descriptors */ for (ii = 0; ii < nrows; ii++) { /* read descriptors */ if (ffgi4b(fptr, bytepos, 2, 4, (INT32BIT *) descript4, status) <= 0) { if (length) { *length = (LONGLONG) descript4[0]; /* 1st word is the length */ length++; } if (heapaddr) { *heapaddr = (LONGLONG) descript4[1]; /* 2nd word is the address */ heapaddr++; } bytepos += rowsize; } else return(*status); } } else /* this is for 'Q' columns */ { /* read 8-byte descriptors */ for (ii = 0; ii < nrows; ii++) { /* read descriptors */ /* cast to type (long *) even though it is actually (LONGLONG *) */ if (ffgi8b(fptr, bytepos, 2, 8, (long *) descript8, status) <= 0) { if (length) { *length = descript8[0]; /* 1st word is the length */ length++; } if (heapaddr) { *heapaddr = descript8[1]; /* 2nd word is the address */ heapaddr++; } bytepos += rowsize; } else return(*status); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffpdes(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number (1 = 1st column of table) */ LONGLONG rownum, /* I - row number (1 = 1st row of table) */ LONGLONG length, /* I - number of elements in the row */ LONGLONG heapaddr, /* I - heap pointer to the data */ int *status) /* IO - error status */ /* put (write) the variable length vector descriptor to the table. */ { LONGLONG bytepos; unsigned int descript4[2]; LONGLONG descript8[2]; tcolumn *colptr; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); colptr = (fptr->Fptr)->tableptr; /* point to first column structure */ colptr += (colnum - 1); /* offset to the correct column */ if (colptr->tdatatype >= 0) *status = NOT_VARI_LEN; bytepos = (fptr->Fptr)->datastart + ((fptr->Fptr)->rowlength * (rownum - 1)) + colptr->tbcol; ffmbyt(fptr, bytepos, IGNORE_EOF, status); /* move to element */ if (colptr->tform[0] == 'P' || colptr->tform[1] == 'P') { if (length > UINT_MAX || length < 0 || heapaddr > UINT_MAX || heapaddr < 0) { ffpmsg("P variable length column descriptor is out of range"); *status = NUM_OVERFLOW; return(*status); } descript4[0] = (unsigned int) length; /* 1st word is the length */ descript4[1] = (unsigned int) heapaddr; /* 2nd word is the address */ ffpi4b(fptr, 2, 4, (INT32BIT *) descript4, status); /* write the descriptor */ } else /* this is a 'Q' descriptor column */ { descript8[0] = length; /* 1st word is the length */ descript8[1] = heapaddr; /* 2nd word is the address */ ffpi8b(fptr, 2, 8, (long *) descript8, status); /* write the descriptor */ } return(*status); } /*--------------------------------------------------------------------------*/ int ffchdu(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ { /* close the current HDU. If we have write access to the file, then: - write the END keyword and pad header with blanks if necessary - check the data fill values, and rewrite them if not correct */ char message[FLEN_ERRMSG]; int ii, stdriver, ntilebins; /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* no need to do any further updating of the HDU */ } else if ((fptr->Fptr)->writemode == 1) { urltype2driver("stream://", &stdriver); /* don't rescan header in special case of writing to stdout */ if (((fptr->Fptr)->driver != stdriver)) ffrdef(fptr, status); if ((fptr->Fptr)->heapsize > 0) { ffuptf(fptr, status); /* update the variable length TFORM values */ } ffpdfl(fptr, status); /* insure correct data fill values */ } if ((fptr->Fptr)->open_count == 1) { /* free memory for the CHDU structure only if no other files are using it */ if ((fptr->Fptr)->tableptr) { free((fptr->Fptr)->tableptr); (fptr->Fptr)->tableptr = NULL; /* free the tile-compressed image cache, if it exists */ if ((fptr->Fptr)->tilerow) { ntilebins = (((fptr->Fptr)->znaxis[0] - 1) / ((fptr->Fptr)->tilesize[0])) + 1; for (ii = 0; ii < ntilebins; ii++) { if ((fptr->Fptr)->tiledata[ii]) { free((fptr->Fptr)->tiledata[ii]); } if ((fptr->Fptr)->tilenullarray[ii]) { free((fptr->Fptr)->tilenullarray[ii]); } } free((fptr->Fptr)->tileanynull); free((fptr->Fptr)->tiletype); free((fptr->Fptr)->tiledatasize); free((fptr->Fptr)->tilenullarray); free((fptr->Fptr)->tiledata); free((fptr->Fptr)->tilerow); (fptr->Fptr)->tileanynull = 0; (fptr->Fptr)->tiletype = 0; (fptr->Fptr)->tiledatasize = 0; (fptr->Fptr)->tilenullarray = 0; (fptr->Fptr)->tiledata = 0; (fptr->Fptr)->tilerow = 0; } } } if (*status > 0 && *status != NO_CLOSE_ERROR) { sprintf(message, "Error while closing HDU number %d (ffchdu).", (fptr->Fptr)->curhdu); ffpmsg(message); } return(*status); } /*--------------------------------------------------------------------------*/ int ffuptf(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* Update the value of the TFORM keywords for the variable length array columns to make sure they all have the form 1Px(len) or Px(len) where 'len' is the maximum length of the vector in the table (e.g., '1PE(400)') */ { int ii; long tflds; LONGLONG length, addr, maxlen, naxis2, jj; char comment[FLEN_COMMENT], keyname[FLEN_KEYWORD]; char tform[FLEN_VALUE], newform[FLEN_VALUE], lenval[40]; char card[FLEN_CARD]; char message[FLEN_ERRMSG]; char *tmp; ffmaky(fptr, 2, status); /* reset to beginning of header */ ffgkyjj(fptr, "NAXIS2", &naxis2, comment, status); ffgkyj(fptr, "TFIELDS", &tflds, comment, status); for (ii = 1; ii <= tflds; ii++) /* loop over all the columns */ { ffkeyn("TFORM", ii, keyname, status); /* construct name */ if (ffgkys(fptr, keyname, tform, comment, status) > 0) { sprintf(message, "Error while updating variable length vector TFORMn values (ffuptf)."); ffpmsg(message); return(*status); } /* is this a variable array length column ? */ if (tform[0] == 'P' || tform[1] == 'P' || tform[0] == 'Q' || tform[1] == 'Q') { /* get the max length */ maxlen = 0; for (jj=1; jj <= naxis2; jj++) { ffgdesll(fptr, ii, jj, &length, &addr, status); if (length > maxlen) maxlen = length; } /* construct the new keyword value */ strcpy(newform, "'"); tmp = strchr(tform, '('); /* truncate old length, if present */ if (tmp) *tmp = 0; strcat(newform, tform); /* print as double, because the string-to-64-bit */ /* conversion is platform dependent (%lld, %ld, %I64d) */ sprintf(lenval, "(%.0f)", (double) maxlen); strcat(newform,lenval); while(strlen(newform) < 9) strcat(newform," "); /* append spaces 'till length = 8 */ strcat(newform,"'" ); /* append closing parenthesis */ /* would be simpler to just call ffmkyj here, but this */ /* would force linking in all the modkey & putkey routines */ ffmkky(keyname, newform, comment, card, status); /* make new card */ ffmkey(fptr, card, status); /* replace last read keyword */ } } return(*status); } /*--------------------------------------------------------------------------*/ int ffrdef(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* ReDEFine the structure of a data unit. This routine re-reads the CHDU header keywords to determine the structure and length of the current data unit. This redefines the start of the next HDU. */ { int dummy, tstatus = 0; LONGLONG naxis2; LONGLONG pcount; char card[FLEN_CARD], comm[FLEN_COMMENT], valstring[FLEN_VALUE]; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->writemode == 1) /* write access to the file? */ { /* don't need to check NAXIS2 and PCOUNT if data hasn't been written */ if ((fptr->Fptr)->datastart != DATA_UNDEFINED) { /* update NAXIS2 keyword if more rows were written to the table */ /* and if the user has not explicitly reset the NAXIS2 value */ if ((fptr->Fptr)->hdutype != IMAGE_HDU) { ffmaky(fptr, 2, status); if (ffgkyjj(fptr, "NAXIS2", &naxis2, comm, &tstatus) > 0) { /* Couldn't read NAXIS2 (odd!); in certain circumstances */ /* this may be normal, so ignore the error. */ naxis2 = (fptr->Fptr)->numrows; } if ((fptr->Fptr)->numrows > naxis2 && (fptr->Fptr)->origrows == naxis2) /* if origrows is not equal to naxis2, then the user must */ /* have manually modified the NAXIS2 keyword value, and */ /* we will assume that the current value is correct. */ { /* would be simpler to just call ffmkyj here, but this */ /* would force linking in all the modkey & putkey routines */ /* print as double because the 64-bit int conversion */ /* is platform dependent (%lld, %ld, %I64 ) */ sprintf(valstring, "%.0f", (double) ((fptr->Fptr)->numrows)); ffmkky("NAXIS2", valstring, comm, card, status); ffmkey(fptr, card, status); } } /* if data has been written to variable length columns in a */ /* binary table, then we may need to update the PCOUNT value */ if ((fptr->Fptr)->heapsize > 0) { ffmaky(fptr, 2, status); ffgkyjj(fptr, "PCOUNT", &pcount, comm, status); if ((fptr->Fptr)->heapsize != pcount) { ffmkyj(fptr, "PCOUNT", (fptr->Fptr)->heapsize, comm, status); } } } if (ffwend(fptr, status) <= 0) /* rewrite END keyword and fill */ { ffrhdu(fptr, &dummy, status); /* re-scan the header keywords */ } } return(*status); } /*--------------------------------------------------------------------------*/ int ffhdef(fitsfile *fptr, /* I - FITS file pointer */ int morekeys, /* I - reserve space for this many keywords */ int *status) /* IO - error status */ /* based on the number of keywords which have already been written, plus the number of keywords to reserve space for, we then can define where the data unit should start (it must start at the beginning of a 2880-byte logical block). This routine will only have any effect if the starting location of the data unit following the header is not already defined. In any case, it is always possible to add more keywords to the header even if the data has already been written. It is just more efficient to reserve the space in advance. */ { LONGLONG delta; if (*status > 0 || morekeys < 1) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { ffrdef(fptr, status); /* ffrdef defines the offset to datastart and the start of */ /* the next HDU based on the number of existing keywords. */ /* We need to increment both of these values based on */ /* the number of new keywords to be added. */ delta = (((fptr->Fptr)->headend + (morekeys * 80)) / 2880 + 1) * 2880 - (fptr->Fptr)->datastart; (fptr->Fptr)->datastart += delta; (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] += delta; } return(*status); } /*--------------------------------------------------------------------------*/ int ffwend(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* write the END card and following fill (space chars) in the current header */ { int ii, tstatus; LONGLONG endpos; long nspace; char blankkey[FLEN_CARD], endkey[FLEN_CARD], keyrec[FLEN_CARD] = ""; if (*status > 0) return(*status); endpos = (fptr->Fptr)->headend; /* we assume that the HDUposition == curhdu in all cases */ /* calc the data starting position if not currently defined */ if ((fptr->Fptr)->datastart == DATA_UNDEFINED) (fptr->Fptr)->datastart = ( endpos / 2880 + 1 ) * 2880; /* calculate the number of blank keyword slots in the header */ nspace = (long) (( (fptr->Fptr)->datastart - endpos ) / 80); /* construct a blank and END keyword (80 spaces ) */ strcpy(blankkey, " "); strcat(blankkey, " "); strcpy(endkey, "END "); strcat(endkey, " "); /* check if header is already correctly terminated with END and fill */ tstatus=0; ffmbyt(fptr, endpos, REPORT_EOF, &tstatus); /* move to header end */ for (ii=0; ii < nspace; ii++) { ffgbyt(fptr, 80, keyrec, &tstatus); /* get next keyword */ if (tstatus) break; if (strncmp(keyrec, blankkey, 80) && strncmp(keyrec, endkey, 80)) break; } if (ii == nspace && !tstatus) { /* check if the END keyword exists at the correct position */ endpos=maxvalue( endpos, ( (fptr->Fptr)->datastart - 2880 ) ); ffmbyt(fptr, endpos, REPORT_EOF, &tstatus); /* move to END position */ ffgbyt(fptr, 80, keyrec, &tstatus); /* read the END keyword */ if ( !strncmp(keyrec, endkey, 80) && !tstatus) { /* store this position, for later reference */ (fptr->Fptr)->ENDpos = endpos; return(*status); /* END card was already correct */ } } /* header was not correctly terminated, so write the END and blank fill */ endpos = (fptr->Fptr)->headend; ffmbyt(fptr, endpos, IGNORE_EOF, status); /* move to header end */ for (ii=0; ii < nspace; ii++) ffpbyt(fptr, 80, blankkey, status); /* write the blank keywords */ /* The END keyword must either be placed immediately after the last keyword that was written (as indicated by the headend value), or must be in the first 80 bytes of the 2880-byte FITS record immediately preceeding the data unit, whichever is further in the file. The latter will occur if space has been reserved for more header keywords which have not yet been written. */ endpos=maxvalue( endpos, ( (fptr->Fptr)->datastart - 2880 ) ); ffmbyt(fptr, endpos, REPORT_EOF, status); /* move to END position */ ffpbyt(fptr, 80, endkey, status); /* write the END keyword to header */ /* store this position, for later reference */ (fptr->Fptr)->ENDpos = endpos; if (*status > 0) ffpmsg("Error while writing END card (ffwend)."); return(*status); } /*--------------------------------------------------------------------------*/ int ffpdfl(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* Write the Data Unit Fill values if they are not already correct. The fill values are used to fill out the last 2880 byte block of the HDU. Fill the data unit with zeros or blanks depending on the type of HDU from the end of the data to the end of the current FITS 2880 byte block */ { char chfill, fill[2880]; LONGLONG fillstart; int nfill, tstatus, ii; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) return(*status); /* fill has already been correctly written */ if ((fptr->Fptr)->heapstart == 0) return(*status); /* null data unit, so there is no fill */ fillstart = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; nfill = (long) ((fillstart + 2879) / 2880 * 2880 - fillstart); if ((fptr->Fptr)->hdutype == ASCII_TBL) chfill = 32; /* ASCII tables are filled with spaces */ else chfill = 0; /* all other extensions are filled with zeros */ tstatus = 0; if (!nfill) /* no fill bytes; just check that entire table exists */ { fillstart--; nfill = 1; ffmbyt(fptr, fillstart, REPORT_EOF, &tstatus); /* move to last byte */ ffgbyt(fptr, nfill, fill, &tstatus); /* get the last byte */ if (tstatus == 0) return(*status); /* no EOF error, so everything is OK */ } else { ffmbyt(fptr, fillstart, REPORT_EOF, &tstatus); /* move to fill area */ ffgbyt(fptr, nfill, fill, &tstatus); /* get the fill bytes */ if (tstatus == 0) { for (ii = 0; ii < nfill; ii++) { if (fill[ii] != chfill) break; } if (ii == nfill) return(*status); /* all the fill values were correct */ } } /* fill values are incorrect or have not been written, so write them */ memset(fill, chfill, nfill); /* fill the buffer with the fill value */ ffmbyt(fptr, fillstart, IGNORE_EOF, status); /* move to fill area */ ffpbyt(fptr, nfill, fill, status); /* write the fill bytes */ if (*status > 0) ffpmsg("Error writing Data Unit fill bytes (ffpdfl)."); return(*status); } /********************************************************************** ffchfl : Check Header Fill values Check that the header unit is correctly filled with blanks from the END card to the end of the current FITS 2880-byte block Function parameters: fptr Fits file pointer status output error status Translated ftchfl into C by Peter Wilson, Oct. 1997 **********************************************************************/ int ffchfl( fitsfile *fptr, int *status) { int nblank,i,gotend; LONGLONG endpos; char rec[FLEN_CARD]; char *blanks=" "; /* 80 spaces */ if( *status > 0 ) return (*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* calculate the number of blank keyword slots in the header */ endpos=(fptr->Fptr)->headend; nblank=(long) (((fptr->Fptr)->datastart-endpos)/80); /* move the i/o pointer to the end of the header keywords */ ffmbyt(fptr,endpos,TRUE,status); /* find the END card (there may be blank keywords perceeding it) */ gotend=FALSE; for(i=0;i 0 ) { rec[FLEN_CARD - 1] = '\0'; /* make sure string is null terminated */ ffpmsg(rec); return( *status ); } } return( *status ); } /********************************************************************** ffcdfl : Check Data Unit Fill values Check that the data unit is correctly filled with zeros or blanks from the end of the data to the end of the current FITS 2880 byte block Function parameters: fptr Fits file pointer status output error status Translated ftcdfl into C by Peter Wilson, Oct. 1997 **********************************************************************/ int ffcdfl( fitsfile *fptr, int *status) { int nfill,i; LONGLONG filpos; char chfill,chbuff[2880]; if( *status > 0 ) return( *status ); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* check if the data unit is null */ if( (fptr->Fptr)->heapstart==0 ) return( *status ); /* calculate starting position of the fill bytes, if any */ filpos = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; /* calculate the number of fill bytes */ nfill = (long) ((filpos + 2879) / 2880 * 2880 - filpos); if( nfill == 0 ) return( *status ); /* move to the beginning of the fill bytes */ ffmbyt(fptr, filpos, FALSE, status); if( ffgbyt(fptr, nfill, chbuff, status) > 0) { ffpmsg("Error reading data unit fill bytes (ffcdfl)."); return( *status ); } if( (fptr->Fptr)->hdutype==ASCII_TBL ) chfill = 32; /* ASCII tables are filled with spaces */ else chfill = 0; /* all other extensions are filled with zeros */ /* check for all zeros or blanks */ for(i=0;iFptr)->hdutype==ASCII_TBL ) ffpmsg("Warning: remaining bytes following ASCII table data are not filled with blanks."); else ffpmsg("Warning: remaining bytes following data are not filled with zeros."); return( *status ); } } return( *status ); } /*--------------------------------------------------------------------------*/ int ffcrhd(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* CReate Header Data unit: Create, initialize, and move the i/o pointer to a new extension appended to the end of the FITS file. */ { int tstatus = 0; LONGLONG bytepos, *ptr; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* If the current header is empty, we don't have to do anything */ if ((fptr->Fptr)->headend == (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) return(*status); while (ffmrhd(fptr, 1, 0, &tstatus) == 0); /* move to end of file */ if ((fptr->Fptr)->maxhdu == (fptr->Fptr)->MAXHDU) { /* allocate more space for the headstart array */ ptr = (LONGLONG*) realloc( (fptr->Fptr)->headstart, ((fptr->Fptr)->MAXHDU + 1001) * sizeof(LONGLONG) ); if (ptr == NULL) return (*status = MEMORY_ALLOCATION); else { (fptr->Fptr)->MAXHDU = (fptr->Fptr)->MAXHDU + 1000; (fptr->Fptr)->headstart = ptr; } } if (ffchdu(fptr, status) <= 0) /* close the current HDU */ { bytepos = (fptr->Fptr)->headstart[(fptr->Fptr)->maxhdu + 1]; /* last */ ffmbyt(fptr, bytepos, IGNORE_EOF, status); /* move file ptr to it */ (fptr->Fptr)->maxhdu++; /* increment the known number of HDUs */ (fptr->Fptr)->curhdu = (fptr->Fptr)->maxhdu; /* set current HDU loc */ fptr->HDUposition = (fptr->Fptr)->maxhdu; /* set current HDU loc */ (fptr->Fptr)->nextkey = bytepos; /* next keyword = start of header */ (fptr->Fptr)->headend = bytepos; /* end of header */ (fptr->Fptr)->datastart = DATA_UNDEFINED; /* start data unit undefined */ /* any other needed resets */ /* reset the dithering offset that may have been calculated for the */ /* previous HDU back to the requested default value */ (fptr->Fptr)->dither_seed = (fptr->Fptr)->request_dither_seed; } return(*status); } /*--------------------------------------------------------------------------*/ int ffdblk(fitsfile *fptr, /* I - FITS file pointer */ long nblocks, /* I - number of 2880-byte blocks to delete */ int *status) /* IO - error status */ /* Delete the specified number of 2880-byte blocks from the end of the CHDU by shifting all following extensions up this number of blocks. */ { char buffer[2880]; int tstatus, ii; LONGLONG readpos, writepos; if (*status > 0 || nblocks <= 0) return(*status); tstatus = 0; /* pointers to the read and write positions */ readpos = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; readpos = ((readpos + 2879) / 2880) * 2880; /* start of block */ /* the following formula is wrong because the current data unit may have been extended without updating the headstart value of the following HDU. readpos = (fptr->Fptr)->headstart[((fptr->Fptr)->curhdu) + 1]; */ writepos = readpos - ((LONGLONG)nblocks * 2880); while ( !ffmbyt(fptr, readpos, REPORT_EOF, &tstatus) && !ffgbyt(fptr, 2880L, buffer, &tstatus) ) { ffmbyt(fptr, writepos, REPORT_EOF, status); ffpbyt(fptr, 2880L, buffer, status); if (*status > 0) { ffpmsg("Error deleting FITS blocks (ffdblk)"); return(*status); } readpos += 2880; /* increment to next block to transfer */ writepos += 2880; } /* now fill the last nblock blocks with zeros */ memset(buffer, 0, 2880); ffmbyt(fptr, writepos, REPORT_EOF, status); for (ii = 0; ii < nblocks; ii++) ffpbyt(fptr, 2880L, buffer, status); /* move back before the deleted blocks, since they may be deleted */ /* and we do not want to delete the current active buffer */ ffmbyt(fptr, writepos - 1, REPORT_EOF, status); /* truncate the file to the new size, if supported on this device */ fftrun(fptr, writepos, status); /* recalculate the starting location of all subsequent HDUs */ for (ii = (fptr->Fptr)->curhdu; ii <= (fptr->Fptr)->maxhdu; ii++) (fptr->Fptr)->headstart[ii + 1] -= ((LONGLONG)nblocks * 2880); return(*status); } /*--------------------------------------------------------------------------*/ int ffghdt(fitsfile *fptr, /* I - FITS file pointer */ int *exttype, /* O - type of extension, 0, 1, or 2 */ /* for IMAGE_HDU, ASCII_TBL, or BINARY_TBL */ int *status) /* IO - error status */ /* Return the type of the CHDU. This returns the 'logical' type of the HDU, not necessarily the physical type, so in the case of a compressed image stored in a binary table, this will return the type as an Image, not a binary table. */ { if (*status > 0) return(*status); if (fptr->HDUposition == 0 && (fptr->Fptr)->headend == 0) { /* empty primary array is alway an IMAGE_HDU */ *exttype = IMAGE_HDU; } else { /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { /* rescan header if data structure is undefined */ if ( ffrdef(fptr, status) > 0) return(*status); } *exttype = (fptr->Fptr)->hdutype; /* return the type of HDU */ /* check if this is a compressed image */ if ((fptr->Fptr)->compressimg) *exttype = IMAGE_HDU; } return(*status); } /*--------------------------------------------------------------------------*/ int fits_is_reentrant(void) /* Was CFITSIO compiled with the -D_REENTRANT flag? 1 = yes, 0 = no. Note that specifying the -D_REENTRANT flag is required, but may not be sufficient, to ensure that CFITSIO can be safely used in a multi-threaded environoment. */ { #ifdef _REENTRANT return(1); #else return(0); #endif } /*--------------------------------------------------------------------------*/ int fits_is_compressed_image(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* Returns TRUE if the CHDU is a compressed image, else returns zero. */ { if (*status > 0) return(0); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { /* rescan header if data structure is undefined */ if ( ffrdef(fptr, status) > 0) return(*status); } /* check if this is a compressed image */ if ((fptr->Fptr)->compressimg) return(1); return(0); } /*--------------------------------------------------------------------------*/ int ffgipr(fitsfile *infptr, /* I - FITS file pointer */ int maxaxis, /* I - max number of axes to return */ int *bitpix, /* O - image data type */ int *naxis, /* O - image dimension (NAXIS value) */ long *naxes, /* O - size of image dimensions */ int *status) /* IO - error status */ /* get the datatype and size of the input image */ { if (*status > 0) return(*status); /* don't return the parameter if a null pointer was given */ if (bitpix) fits_get_img_type(infptr, bitpix, status); /* get BITPIX value */ if (naxis) fits_get_img_dim(infptr, naxis, status); /* get NAXIS value */ if (naxes) fits_get_img_size(infptr, maxaxis, naxes, status); /* get NAXISn values */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgiprll(fitsfile *infptr, /* I - FITS file pointer */ int maxaxis, /* I - max number of axes to return */ int *bitpix, /* O - image data type */ int *naxis, /* O - image dimension (NAXIS value) */ LONGLONG *naxes, /* O - size of image dimensions */ int *status) /* IO - error status */ /* get the datatype and size of the input image */ { if (*status > 0) return(*status); /* don't return the parameter if a null pointer was given */ if (bitpix) fits_get_img_type(infptr, bitpix, status); /* get BITPIX value */ if (naxis) fits_get_img_dim(infptr, naxis, status); /* get NAXIS value */ if (naxes) fits_get_img_sizell(infptr, maxaxis, naxes, status); /* get NAXISn values */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgidt( fitsfile *fptr, /* I - FITS file pointer */ int *imgtype, /* O - image data type */ int *status) /* IO - error status */ /* Get the datatype of the image (= BITPIX keyword for normal image, or ZBITPIX for a compressed image) */ { if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); /* reset to beginning of header */ ffmaky(fptr, 1, status); /* simply move to beginning of header */ if ((fptr->Fptr)->hdutype == IMAGE_HDU) { ffgky(fptr, TINT, "BITPIX", imgtype, NULL, status); } else if ((fptr->Fptr)->compressimg) { /* this is a binary table containing a compressed image */ ffgky(fptr, TINT, "ZBITPIX", imgtype, NULL, status); } else { *status = NOT_IMAGE; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgiet( fitsfile *fptr, /* I - FITS file pointer */ int *imgtype, /* O - image data type */ int *status) /* IO - error status */ /* Get the effective datatype of the image (= BITPIX keyword for normal image, or ZBITPIX for a compressed image) */ { int tstatus; long lngscale, lngzero = 0; double bscale, bzero, min_val, max_val; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); /* reset to beginning of header */ ffmaky(fptr, 2, status); /* simply move to beginning of header */ if ((fptr->Fptr)->hdutype == IMAGE_HDU) { ffgky(fptr, TINT, "BITPIX", imgtype, NULL, status); } else if ((fptr->Fptr)->compressimg) { /* this is a binary table containing a compressed image */ ffgky(fptr, TINT, "ZBITPIX", imgtype, NULL, status); } else { *status = NOT_IMAGE; return(*status); } /* check if the BSCALE and BZERO keywords are defined, which might change the effective datatype of the image */ tstatus = 0; ffgky(fptr, TDOUBLE, "BSCALE", &bscale, NULL, &tstatus); if (tstatus) bscale = 1.0; tstatus = 0; ffgky(fptr, TDOUBLE, "BZERO", &bzero, NULL, &tstatus); if (tstatus) bzero = 0.0; if (bscale == 1.0 && bzero == 0.0) /* no scaling */ return(*status); switch (*imgtype) { case BYTE_IMG: /* 8-bit image */ min_val = 0.; max_val = 255.0; break; case SHORT_IMG: min_val = -32768.0; max_val = 32767.0; break; case LONG_IMG: min_val = -2147483648.0; max_val = 2147483647.0; break; default: /* don't have to deal with other data types */ return(*status); } if (bscale >= 0.) { min_val = bzero + bscale * min_val; max_val = bzero + bscale * max_val; } else { max_val = bzero + bscale * min_val; min_val = bzero + bscale * max_val; } if (bzero < 2147483648.) /* don't exceed range of 32-bit integer */ lngzero = (long) bzero; lngscale = (long) bscale; if ((bzero != 2147483648.) && /* special value that exceeds integer range */ (lngzero != bzero || lngscale != bscale)) { /* not integers? */ /* floating point scaled values; just decide on required precision */ if (*imgtype == BYTE_IMG || *imgtype == SHORT_IMG) *imgtype = FLOAT_IMG; else *imgtype = DOUBLE_IMG; /* In all the remaining cases, BSCALE and BZERO are integers, and not equal to 1 and 0, respectively. */ } else if ((min_val == -128.) && (max_val == 127.)) { *imgtype = SBYTE_IMG; } else if ((min_val >= -32768.0) && (max_val <= 32767.0)) { *imgtype = SHORT_IMG; } else if ((min_val >= 0.0) && (max_val <= 65535.0)) { *imgtype = USHORT_IMG; } else if ((min_val >= -2147483648.0) && (max_val <= 2147483647.0)) { *imgtype = LONG_IMG; } else if ((min_val >= 0.0) && (max_val < 4294967296.0)) { *imgtype = ULONG_IMG; } else { /* exceeds the range of a 32-bit integer */ *imgtype = DOUBLE_IMG; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgidm( fitsfile *fptr, /* I - FITS file pointer */ int *naxis , /* O - image dimension (NAXIS value) */ int *status) /* IO - error status */ /* Get the dimension of the image (= NAXIS keyword for normal image, or ZNAXIS for a compressed image) These values are cached for faster access. */ { if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU) { *naxis = (fptr->Fptr)->imgdim; } else if ((fptr->Fptr)->compressimg) { *naxis = (fptr->Fptr)->zndim; } else { *status = NOT_IMAGE; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgisz( fitsfile *fptr, /* I - FITS file pointer */ int nlen, /* I - number of axes to return */ long *naxes, /* O - size of image dimensions */ int *status) /* IO - error status */ /* Get the size of the image dimensions (= NAXISn keywords for normal image, or ZNAXISn for a compressed image) These values are cached for faster access. */ { int ii, naxis; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU) { naxis = minvalue((fptr->Fptr)->imgdim, nlen); for (ii = 0; ii < naxis; ii++) { naxes[ii] = (long) (fptr->Fptr)->imgnaxis[ii]; } } else if ((fptr->Fptr)->compressimg) { naxis = minvalue( (fptr->Fptr)->zndim, nlen); for (ii = 0; ii < naxis; ii++) { naxes[ii] = (long) (fptr->Fptr)->znaxis[ii]; } } else { *status = NOT_IMAGE; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgiszll( fitsfile *fptr, /* I - FITS file pointer */ int nlen, /* I - number of axes to return */ LONGLONG *naxes, /* O - size of image dimensions */ int *status) /* IO - error status */ /* Get the size of the image dimensions (= NAXISn keywords for normal image, or ZNAXISn for a compressed image) */ { int ii, naxis; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); if ((fptr->Fptr)->hdutype == IMAGE_HDU) { naxis = minvalue((fptr->Fptr)->imgdim, nlen); for (ii = 0; ii < naxis; ii++) { naxes[ii] = (fptr->Fptr)->imgnaxis[ii]; } } else if ((fptr->Fptr)->compressimg) { naxis = minvalue( (fptr->Fptr)->zndim, nlen); for (ii = 0; ii < naxis; ii++) { naxes[ii] = (fptr->Fptr)->znaxis[ii]; } } else { *status = NOT_IMAGE; } return(*status); }/*--------------------------------------------------------------------------*/ int ffmahd(fitsfile *fptr, /* I - FITS file pointer */ int hdunum, /* I - number of the HDU to move to */ int *exttype, /* O - type of extension, 0, 1, or 2 */ int *status) /* IO - error status */ /* Move to Absolute Header Data unit. Move to the specified HDU and read the header to initialize the table structure. Note that extnum is one based, so the primary array is extnum = 1. */ { int moveto, tstatus; char message[FLEN_ERRMSG]; LONGLONG *ptr; if (*status > 0) return(*status); else if (hdunum < 1 ) return(*status = BAD_HDU_NUM); else if (hdunum >= (fptr->Fptr)->MAXHDU ) { /* allocate more space for the headstart array */ ptr = (LONGLONG*) realloc( (fptr->Fptr)->headstart, (hdunum + 1001) * sizeof(LONGLONG) ); if (ptr == NULL) return (*status = MEMORY_ALLOCATION); else { (fptr->Fptr)->MAXHDU = hdunum + 1000; (fptr->Fptr)->headstart = ptr; } } /* set logical HDU position to the actual position, in case they differ */ fptr->HDUposition = (fptr->Fptr)->curhdu; while( ((fptr->Fptr)->curhdu) + 1 != hdunum) /* at the correct HDU? */ { /* move directly to the extension if we know that it exists, otherwise move to the highest known extension. */ moveto = minvalue(hdunum - 1, ((fptr->Fptr)->maxhdu) + 1); /* test if HDU exists */ if ((fptr->Fptr)->headstart[moveto] < (fptr->Fptr)->logfilesize ) { if (ffchdu(fptr, status) <= 0) /* close out the current HDU */ { if (ffgext(fptr, moveto, exttype, status) > 0) { /* failed to get the requested extension */ tstatus = 0; ffrhdu(fptr, exttype, &tstatus); /* restore the CHDU */ } } } else *status = END_OF_FILE; if (*status > 0) { if (*status != END_OF_FILE) { /* don't clutter up the message stack in the common case of */ /* simply hitting the end of file (often an expected error) */ sprintf(message, "Failed to move to HDU number %d (ffmahd).", hdunum); ffpmsg(message); } return(*status); } } /* return the type of HDU; tile compressed images which are stored */ /* in a binary table will return exttype = IMAGE_HDU, not BINARY_TBL */ if (exttype != NULL) ffghdt(fptr, exttype, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffmrhd(fitsfile *fptr, /* I - FITS file pointer */ int hdumov, /* I - rel. no. of HDUs to move by (+ or -) */ int *exttype, /* O - type of extension, 0, 1, or 2 */ int *status) /* IO - error status */ /* Move a Relative number of Header Data units. Offset to the specified extension and read the header to initialize the HDU structure. */ { int extnum; if (*status > 0) return(*status); extnum = fptr->HDUposition + 1 + hdumov; /* the absolute HDU number */ ffmahd(fptr, extnum, exttype, status); /* move to the HDU */ return(*status); } /*--------------------------------------------------------------------------*/ int ffmnhd(fitsfile *fptr, /* I - FITS file pointer */ int exttype, /* I - desired extension type */ char *hduname, /* I - desired EXTNAME value for the HDU */ int hduver, /* I - desired EXTVERS value for the HDU */ int *status) /* IO - error status */ /* Move to the next HDU with a given extension type (IMAGE_HDU, ASCII_TBL, BINARY_TBL, or ANY_HDU), extension name (EXTNAME or HDUNAME keyword), and EXTVERS keyword values. If hduvers = 0, then move to the first HDU with the given type and name regardless of EXTVERS value. If no matching HDU is found in the file, then the current open HDU will remain unchanged. */ { char extname[FLEN_VALUE]; int ii, hdutype, alttype, extnum, tstatus, match, exact; int slen, putback = 0, chopped = 0; long extver; if (*status > 0) return(*status); extnum = fptr->HDUposition + 1; /* save the current HDU number */ /* This is a kludge to deal with a special case where the user specified a hduname that ended with a # character, which CFITSIO previously interpreted as a flag to mean "don't copy any other HDUs in the file into the virtual file in memory. If the remaining hduname does not end with a # character (meaning that the user originally entered a hduname ending in 2 # characters) then there is the possibility that the # character should be treated literally, if the actual EXTNAME also ends with a #. Setting putback = 1 means that we need to test for this case later on. */ if ((fptr->Fptr)->only_one) { /* if true, name orignally ended with a # */ slen = strlen(hduname); if (hduname[slen - 1] != '#') /* This will fail if real EXTNAME value */ putback = 1; /* ends with 2 # characters. */ } for (ii=1; 1; ii++) /* loop over all HDUs until EOF */ { tstatus = 0; if (ffmahd(fptr, ii, &hdutype, &tstatus)) /* move to next HDU */ { ffmahd(fptr, extnum, 0, status); /* restore original file position */ return(*status = BAD_HDU_NUM); /* couldn't find desired HDU */ } alttype = -1; if (fits_is_compressed_image(fptr, status)) alttype = BINARY_TBL; /* Does this HDU have a matching type? */ if (exttype == ANY_HDU || hdutype == exttype || hdutype == alttype) { ffmaky(fptr, 2, status); /* reset to the 2nd keyword in the header */ if (ffgkys(fptr, "EXTNAME", extname, 0, &tstatus) <= 0) /* get keyword */ { if (putback) { /* more of the kludge */ /* test if the EXTNAME value ends with a #; if so, chop it */ /* off before comparing the strings */ chopped = 0; slen = strlen(extname); if (extname[slen - 1] == '#') { extname[slen - 1] = '\0'; chopped = 1; } } /* see if the strings are an exact match */ ffcmps(extname, hduname, CASEINSEN, &match, &exact); } /* if EXTNAME keyword doesn't exist, or it does not match, then try HDUNAME */ if (tstatus || !exact) { tstatus = 0; if (ffgkys(fptr, "HDUNAME", extname, 0, &tstatus) <= 0) { if (putback) { /* more of the kludge */ chopped = 0; slen = strlen(extname); if (extname[slen - 1] == '#') { extname[slen - 1] = '\0'; /* chop off the # */ chopped = 1; } } /* see if the strings are an exact match */ ffcmps(extname, hduname, CASEINSEN, &match, &exact); } } if (!tstatus && exact) /* found a matching name */ { if (hduver) /* need to check if version numbers match? */ { if (ffgkyj(fptr, "EXTVER", &extver, 0, &tstatus) > 0) extver = 1; /* assume default EXTVER value */ if ( (int) extver == hduver) { if (chopped) { /* The # was literally part of the name, not a flag */ (fptr->Fptr)->only_one = 0; } return(*status); /* found matching name and vers */ } } else { if (chopped) { /* The # was literally part of the name, not a flag */ (fptr->Fptr)->only_one = 0; } return(*status); /* found matching name */ } } /* end of !tstatus && exact */ } /* end of matching HDU type */ } /* end of loop over HDUs */ } /*--------------------------------------------------------------------------*/ int ffthdu(fitsfile *fptr, /* I - FITS file pointer */ int *nhdu, /* O - number of HDUs in the file */ int *status) /* IO - error status */ /* Return the number of HDUs that currently exist in the file. */ { int ii, extnum, tstatus; if (*status > 0) return(*status); extnum = fptr->HDUposition + 1; /* save the current HDU number */ *nhdu = extnum - 1; /* if the CHDU is empty or not completely defined, just return */ if ((fptr->Fptr)->datastart == DATA_UNDEFINED) return(*status); tstatus = 0; /* loop until EOF */ for (ii=extnum; ffmahd(fptr, ii, 0, &tstatus) <= 0; ii++) { *nhdu = ii; } ffmahd(fptr, extnum, 0, status); /* restore orig file position */ return(*status); } /*--------------------------------------------------------------------------*/ int ffgext(fitsfile *fptr, /* I - FITS file pointer */ int hdunum, /* I - no. of HDU to move get (0 based) */ int *exttype, /* O - type of extension, 0, 1, or 2 */ int *status) /* IO - error status */ /* Get Extension. Move to the specified extension and initialize the HDU structure. */ { int xcurhdu, xmaxhdu; LONGLONG xheadend; if (*status > 0) return(*status); if (ffmbyt(fptr, (fptr->Fptr)->headstart[hdunum], REPORT_EOF, status) <= 0) { /* temporarily save current values, in case of error */ xcurhdu = (fptr->Fptr)->curhdu; xmaxhdu = (fptr->Fptr)->maxhdu; xheadend = (fptr->Fptr)->headend; /* set new parameter values */ (fptr->Fptr)->curhdu = hdunum; fptr->HDUposition = hdunum; (fptr->Fptr)->maxhdu = maxvalue((fptr->Fptr)->maxhdu, hdunum); (fptr->Fptr)->headend = (fptr->Fptr)->logfilesize; /* set max size */ if (ffrhdu(fptr, exttype, status) > 0) { /* failed to get the new HDU, so restore previous values */ (fptr->Fptr)->curhdu = xcurhdu; fptr->HDUposition = xcurhdu; (fptr->Fptr)->maxhdu = xmaxhdu; (fptr->Fptr)->headend = xheadend; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffiblk(fitsfile *fptr, /* I - FITS file pointer */ long nblock, /* I - no. of blocks to insert */ int headdata, /* I - insert where? 0=header, 1=data */ /* -1=beginning of file */ int *status) /* IO - error status */ /* insert 2880-byte blocks at the end of the current header or data unit */ { int tstatus, savehdu, typhdu; LONGLONG insertpt, jpoint; long ii, nshift; char charfill; char buff1[2880], buff2[2880]; char *inbuff, *outbuff, *tmpbuff; char card[FLEN_CARD]; if (*status > 0 || nblock <= 0) return(*status); tstatus = *status; if (headdata == 0 || (fptr->Fptr)->hdutype == ASCII_TBL) charfill = 32; /* headers and ASCII tables have space (32) fill */ else charfill = 0; /* images and binary tables have zero fill */ if (headdata == 0) insertpt = (fptr->Fptr)->datastart; /* insert just before data, or */ else if (headdata == -1) { insertpt = 0; strcpy(card, "XTENSION= 'IMAGE ' / IMAGE extension"); } else /* at end of data, */ { insertpt = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize; insertpt = ((insertpt + 2879) / 2880) * 2880; /* start of block */ /* the following formula is wrong because the current data unit may have been extended without updating the headstart value of the following HDU. */ /* insertpt = (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu + 1]; */ } inbuff = buff1; /* set pointers to input and output buffers */ outbuff = buff2; memset(outbuff, charfill, 2880); /* initialize buffer with fill */ if (nblock == 1) /* insert one block */ { if (headdata == -1) ffmrec(fptr, 1, card, status); /* change SIMPLE -> XTENSION */ ffmbyt(fptr, insertpt, REPORT_EOF, status); /* move to 1st point */ ffgbyt(fptr, 2880, inbuff, status); /* read first block of bytes */ while (*status <= 0) { ffmbyt(fptr, insertpt, REPORT_EOF, status); /* insert point */ ffpbyt(fptr, 2880, outbuff, status); /* write the output buffer */ if (*status > 0) return(*status); tmpbuff = inbuff; /* swap input and output pointers */ inbuff = outbuff; outbuff = tmpbuff; insertpt += 2880; /* increment insert point by 1 block */ ffmbyt(fptr, insertpt, REPORT_EOF, status); /* move to next block */ ffgbyt(fptr, 2880, inbuff, status); /* read block of bytes */ } *status = tstatus; /* reset status value */ ffmbyt(fptr, insertpt, IGNORE_EOF, status); /* move back to insert pt */ ffpbyt(fptr, 2880, outbuff, status); /* write the final block */ } else /* inserting more than 1 block */ { savehdu = (fptr->Fptr)->curhdu; /* save the current HDU number */ tstatus = *status; while(*status <= 0) /* find the last HDU in file */ ffmrhd(fptr, 1, &typhdu, status); if (*status == END_OF_FILE) { *status = tstatus; } ffmahd(fptr, savehdu + 1, &typhdu, status); /* move back to CHDU */ if (headdata == -1) ffmrec(fptr, 1, card, status); /* NOW change SIMPLE -> XTENSION */ /* number of 2880-byte blocks that have to be shifted down */ nshift = (long) (((fptr->Fptr)->headstart[(fptr->Fptr)->maxhdu + 1] - insertpt) / 2880); /* position of last block in file to be shifted */ jpoint = (fptr->Fptr)->headstart[(fptr->Fptr)->maxhdu + 1] - 2880; /* move all the blocks starting at end of file working backwards */ for (ii = 0; ii < nshift; ii++) { /* move to the read start position */ if (ffmbyt(fptr, jpoint, REPORT_EOF, status) > 0) return(*status); ffgbyt(fptr, 2880, inbuff,status); /* read one record */ /* move forward to the write postion */ ffmbyt(fptr, jpoint + ((LONGLONG) nblock * 2880), IGNORE_EOF, status); ffpbyt(fptr, 2880, inbuff, status); /* write the record */ jpoint -= 2880; } /* move back to the write start postion (might be EOF) */ ffmbyt(fptr, insertpt, IGNORE_EOF, status); for (ii = 0; ii < nblock; ii++) /* insert correct fill value */ ffpbyt(fptr, 2880, outbuff, status); } if (headdata == 0) /* update data start address */ (fptr->Fptr)->datastart += ((LONGLONG) nblock * 2880); /* update following HDU addresses */ for (ii = (fptr->Fptr)->curhdu; ii <= (fptr->Fptr)->maxhdu; ii++) (fptr->Fptr)->headstart[ii + 1] += ((LONGLONG) nblock * 2880); return(*status); } /*--------------------------------------------------------------------------*/ int ffgkcl(char *tcard) /* Return the type classification of the input header record TYP_STRUC_KEY: SIMPLE, BITPIX, NAXIS, NAXISn, EXTEND, BLOCKED, GROUPS, PCOUNT, GCOUNT, END XTENSION, TFIELDS, TTYPEn, TBCOLn, TFORMn, THEAP, and the first 4 COMMENT keywords in the primary array that define the FITS format. TYP_CMPRS_KEY: The experimental keywords used in the compressed image format ZIMAGE, ZCMPTYPE, ZNAMEn, ZVALn, ZTILEn, ZBITPIX, ZNAXISn, ZSCALE, ZZERO, ZBLANK, EXTNAME = 'COMPRESSED_IMAGE' ZSIMPLE, ZTENSION, ZEXTEND, ZBLOCKED, ZPCOUNT, ZGCOUNT TYP_SCAL_KEY: BSCALE, BZERO, TSCALn, TZEROn TYP_NULL_KEY: BLANK, TNULLn TYP_DIM_KEY: TDIMn TYP_RANG_KEY: TLMINn, TLMAXn, TDMINn, TDMAXn, DATAMIN, DATAMAX TYP_UNIT_KEY: BUNIT, TUNITn TYP_DISP_KEY: TDISPn TYP_HDUID_KEY: EXTNAME, EXTVER, EXTLEVEL, HDUNAME, HDUVER, HDULEVEL TYP_CKSUM_KEY CHECKSUM, DATASUM TYP_WCS_KEY: Primary array: WCAXES, CTYPEn, CUNITn, CRVALn, CRPIXn, CROTAn, CDELTn CDj_is, PVj_ms, LONPOLEs, LATPOLEs Pixel list: TCTYPn, TCTYns, TCUNIn, TCUNns, TCRVLn, TCRVns, TCRPXn, TCRPks, TCDn_k, TCn_ks, TPVn_m, TPn_ms, TCDLTn, TCROTn Bintable vector: jCTYPn, jCTYns, jCUNIn, jCUNns, jCRVLn, jCRVns, iCRPXn, iCRPns, jiCDn, jiCDns, jPVn_m, jPn_ms, jCDLTn, jCROTn TYP_REFSYS_KEY: EQUINOXs, EPOCH, MJD-OBSs, RADECSYS, RADESYSs TYP_COMM_KEY: COMMENT, HISTORY, (blank keyword) TYP_CONT_KEY: CONTINUE TYP_USER_KEY: all other keywords */ { char card[20], *card1, *card5; card[0] = '\0'; strncat(card, tcard, 8); /* copy the keyword name */ strcat(card, " "); /* append blanks to make at least 8 chars long */ ffupch(card); /* make sure it is in upper case */ card1 = card + 1; /* pointer to 2nd character */ card5 = card + 5; /* pointer to 6th character */ /* the strncmp function is slow, so try to be more efficient */ if (*card == 'Z') { if (FSTRNCMP (card1, "IMAGE ", 7) == 0) return (TYP_CMPRS_KEY); else if (FSTRNCMP (card1, "CMPTYPE", 7) == 0) return (TYP_CMPRS_KEY); else if (FSTRNCMP (card1, "NAME", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_CMPRS_KEY); } else if (FSTRNCMP (card1, "VAL", 3) == 0) { if (*(card + 4) >= '0' && *(card + 4) <= '9') return (TYP_CMPRS_KEY); } else if (FSTRNCMP (card1, "TILE", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_CMPRS_KEY); } else if (FSTRNCMP (card1, "BITPIX ", 7) == 0) return (TYP_CMPRS_KEY); else if (FSTRNCMP (card1, "NAXIS", 5) == 0) { if ( ( *(card + 6) >= '0' && *(card + 6) <= '9' ) || (*(card + 6) == ' ') ) return (TYP_CMPRS_KEY); } else if (FSTRNCMP (card1, "SCALE ", 7) == 0) return (TYP_CMPRS_KEY); else if (FSTRNCMP (card1, "ZERO ", 7) == 0) return (TYP_CMPRS_KEY); else if (FSTRNCMP (card1, "BLANK ", 7) == 0) return (TYP_CMPRS_KEY); else if (FSTRNCMP (card1, "SIMPLE ", 7) == 0) return (TYP_CMPRS_KEY); else if (FSTRNCMP (card1, "TENSION", 7) == 0) return (TYP_CMPRS_KEY); else if (FSTRNCMP (card1, "EXTEND ", 7) == 0) return (TYP_CMPRS_KEY); else if (FSTRNCMP (card1, "BLOCKED", 7) == 0) return (TYP_CMPRS_KEY); else if (FSTRNCMP (card1, "PCOUNT ", 7) == 0) return (TYP_CMPRS_KEY); else if (FSTRNCMP (card1, "GCOUNT ", 7) == 0) return (TYP_CMPRS_KEY); } else if (*card == ' ') { return (TYP_COMM_KEY); } else if (*card == 'B') { if (FSTRNCMP (card1, "ITPIX ", 7) == 0) return (TYP_STRUC_KEY); if (FSTRNCMP (card1, "LOCKED ", 7) == 0) return (TYP_STRUC_KEY); if (FSTRNCMP (card1, "LANK ", 7) == 0) return (TYP_NULL_KEY); if (FSTRNCMP (card1, "SCALE ", 7) == 0) return (TYP_SCAL_KEY); if (FSTRNCMP (card1, "ZERO ", 7) == 0) return (TYP_SCAL_KEY); if (FSTRNCMP (card1, "UNIT ", 7) == 0) return (TYP_UNIT_KEY); } else if (*card == 'C') { if (FSTRNCMP (card1, "OMMENT",6) == 0) { /* new comment string starting Oct 2001 */ if (FSTRNCMP (tcard, "COMMENT and Astrophysics', volume 376, page 3", 47) == 0) return (TYP_STRUC_KEY); /* original COMMENT strings from 1993 - 2001 */ if (FSTRNCMP (tcard, "COMMENT FITS (Flexible Image Transport System", 47) == 0) return (TYP_STRUC_KEY); if (FSTRNCMP (tcard, "COMMENT Astrophysics Supplement Series v44/p3", 47) == 0) return (TYP_STRUC_KEY); if (FSTRNCMP (tcard, "COMMENT Contact the NASA Science Office of St", 47) == 0) return (TYP_STRUC_KEY); if (FSTRNCMP (tcard, "COMMENT FITS Definition document #100 and oth", 47) == 0) return (TYP_STRUC_KEY); if (*(card + 7) == ' ') return (TYP_COMM_KEY); else return (TYP_USER_KEY); } if (FSTRNCMP (card1, "HECKSUM", 7) == 0) return (TYP_CKSUM_KEY); if (FSTRNCMP (card1, "ONTINUE", 7) == 0) return (TYP_CONT_KEY); if (FSTRNCMP (card1, "TYPE",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "UNIT",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "RVAL",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "RPIX",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "ROTA",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "RDER",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "SYER",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "DELT",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (*card1 == 'D') { if (*(card + 2) >= '0' && *(card + 2) <= '9') return (TYP_WCS_KEY); } } else if (*card == 'D') { if (FSTRNCMP (card1, "ATASUM ", 7) == 0) return (TYP_CKSUM_KEY); if (FSTRNCMP (card1, "ATAMIN ", 7) == 0) return (TYP_RANG_KEY); if (FSTRNCMP (card1, "ATAMAX ", 7) == 0) return (TYP_RANG_KEY); if (FSTRNCMP (card1, "ATE-OBS", 7) == 0) return (TYP_REFSYS_KEY); } else if (*card == 'E') { if (FSTRNCMP (card1, "XTEND ", 7) == 0) return (TYP_STRUC_KEY); if (FSTRNCMP (card1, "ND ", 7) == 0) return (TYP_STRUC_KEY); if (FSTRNCMP (card1, "XTNAME ", 7) == 0) { /* check for special compressed image value */ if (FSTRNCMP(tcard, "EXTNAME = 'COMPRESSED_IMAGE'", 28) == 0) return (TYP_CMPRS_KEY); else return (TYP_HDUID_KEY); } if (FSTRNCMP (card1, "XTVER ", 7) == 0) return (TYP_HDUID_KEY); if (FSTRNCMP (card1, "XTLEVEL", 7) == 0) return (TYP_HDUID_KEY); if (FSTRNCMP (card1, "QUINOX", 6) == 0) return (TYP_REFSYS_KEY); if (FSTRNCMP (card1, "QUI",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_REFSYS_KEY); } if (FSTRNCMP (card1, "POCH ", 7) == 0) return (TYP_REFSYS_KEY); } else if (*card == 'G') { if (FSTRNCMP (card1, "COUNT ", 7) == 0) return (TYP_STRUC_KEY); if (FSTRNCMP (card1, "ROUPS ", 7) == 0) return (TYP_STRUC_KEY); } else if (*card == 'H') { if (FSTRNCMP (card1, "DUNAME ", 7) == 0) return (TYP_HDUID_KEY); if (FSTRNCMP (card1, "DUVER ", 7) == 0) return (TYP_HDUID_KEY); if (FSTRNCMP (card1, "DULEVEL", 7) == 0) return (TYP_HDUID_KEY); if (FSTRNCMP (card1, "ISTORY",6) == 0) { if (*(card + 7) == ' ') return (TYP_COMM_KEY); else return (TYP_USER_KEY); } } else if (*card == 'L') { if (FSTRNCMP (card1, "ONPOLE",6) == 0) return (TYP_WCS_KEY); if (FSTRNCMP (card1, "ATPOLE",6) == 0) return (TYP_WCS_KEY); if (FSTRNCMP (card1, "ONP",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "ATP",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } } else if (*card == 'M') { if (FSTRNCMP (card1, "JD-OBS ", 7) == 0) return (TYP_REFSYS_KEY); if (FSTRNCMP (card1, "JDOB",4) == 0) { if (*(card+5) >= '0' && *(card+5) <= '9') return (TYP_REFSYS_KEY); } } else if (*card == 'N') { if (FSTRNCMP (card1, "AXIS", 4) == 0) { if ((*card5 >= '0' && *card5 <= '9') || (*card5 == ' ')) return (TYP_STRUC_KEY); } } else if (*card == 'P') { if (FSTRNCMP (card1, "COUNT ", 7) == 0) return (TYP_STRUC_KEY); if (*card1 == 'C') { if (*(card + 2) >= '0' && *(card + 2) <= '9') return (TYP_WCS_KEY); } else if (*card1 == 'V') { if (*(card + 2) >= '0' && *(card + 2) <= '9') return (TYP_WCS_KEY); } else if (*card1 == 'S') { if (*(card + 2) >= '0' && *(card + 2) <= '9') return (TYP_WCS_KEY); } } else if (*card == 'R') { if (FSTRNCMP (card1, "ADECSYS", 7) == 0) return (TYP_REFSYS_KEY); if (FSTRNCMP (card1, "ADESYS", 6) == 0) return (TYP_REFSYS_KEY); if (FSTRNCMP (card1, "ADE",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_REFSYS_KEY); } } else if (*card == 'S') { if (FSTRNCMP (card1, "IMPLE ", 7) == 0) return (TYP_STRUC_KEY); } else if (*card == 'T') { if (FSTRNCMP (card1, "TYPE", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_STRUC_KEY); } else if (FSTRNCMP (card1, "FORM", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_STRUC_KEY); } else if (FSTRNCMP (card1, "BCOL", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_STRUC_KEY); } else if (FSTRNCMP (card1, "FIELDS ", 7) == 0) return (TYP_STRUC_KEY); else if (FSTRNCMP (card1, "HEAP ", 7) == 0) return (TYP_STRUC_KEY); else if (FSTRNCMP (card1, "NULL", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_NULL_KEY); } else if (FSTRNCMP (card1, "DIM", 3) == 0) { if (*(card + 4) >= '0' && *(card + 4) <= '9') return (TYP_DIM_KEY); } else if (FSTRNCMP (card1, "UNIT", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_UNIT_KEY); } else if (FSTRNCMP (card1, "DISP", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_DISP_KEY); } else if (FSTRNCMP (card1, "SCAL", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_SCAL_KEY); } else if (FSTRNCMP (card1, "ZERO", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_SCAL_KEY); } else if (FSTRNCMP (card1, "LMIN", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_RANG_KEY); } else if (FSTRNCMP (card1, "LMAX", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_RANG_KEY); } else if (FSTRNCMP (card1, "DMIN", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_RANG_KEY); } else if (FSTRNCMP (card1, "DMAX", 4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_RANG_KEY); } else if (FSTRNCMP (card1, "CTYP",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CTY",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CUNI",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CUN",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CRVL",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CRV",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CRPX",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CRP",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CROT",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CDLT",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CDE",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CRD",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CSY",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "WCS",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "C",1) == 0) { if (*(card + 2) >= '0' && *(card + 2) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "P",1) == 0) { if (*(card + 2) >= '0' && *(card + 2) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "V",1) == 0) { if (*(card + 2) >= '0' && *(card + 2) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "S",1) == 0) { if (*(card + 2) >= '0' && *(card + 2) <= '9') return (TYP_WCS_KEY); } } else if (*card == 'X') { if (FSTRNCMP (card1, "TENSION", 7) == 0) return (TYP_STRUC_KEY); } else if (*card == 'W') { if (FSTRNCMP (card1, "CSAXES", 6) == 0) return (TYP_WCS_KEY); if (FSTRNCMP (card1, "CSNAME", 6) == 0) return (TYP_WCS_KEY); if (FSTRNCMP (card1, "CAX", 3) == 0) { if (*(card + 4) >= '0' && *(card + 4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CSN", 3) == 0) { if (*(card + 4) >= '0' && *(card + 4) <= '9') return (TYP_WCS_KEY); } } else if (*card >= '0' && *card <= '9') { if (*card1 == 'C') { if (FSTRNCMP (card1, "CTYP",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CTY",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CUNI",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CUN",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CRVL",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CRV",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CRPX",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CRP",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CROT",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CDLT",4) == 0) { if (*card5 >= '0' && *card5 <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CDE",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CRD",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "CSY",3) == 0) { if (*(card+4) >= '0' && *(card+4) <= '9') return (TYP_WCS_KEY); } } else if (FSTRNCMP (card1, "V",1) == 0) { if (*(card + 2) >= '0' && *(card + 2) <= '9') return (TYP_WCS_KEY); } else if (FSTRNCMP (card1, "S",1) == 0) { if (*(card + 2) >= '0' && *(card + 2) <= '9') return (TYP_WCS_KEY); } else if (*card1 >= '0' && *card1 <= '9') { /* 2 digits at beginning of keyword */ if ( (*(card + 2) == 'P') && (*(card + 3) == 'C') ) { if (*(card + 4) >= '0' && *(card + 4) <= '9') return (TYP_WCS_KEY); /* ijPCn keyword */ } else if ( (*(card + 2) == 'C') && (*(card + 3) == 'D') ) { if (*(card + 4) >= '0' && *(card + 4) <= '9') return (TYP_WCS_KEY); /* ijCDn keyword */ } } } return (TYP_USER_KEY); /* by default all others are user keywords */ } /*--------------------------------------------------------------------------*/ int ffdtyp(const char *cval, /* I - formatted string representation of the value */ char *dtype, /* O - datatype code: C, L, F, I, or X */ int *status) /* IO - error status */ /* determine implicit datatype of input string. This assumes that the string conforms to the FITS standard for keyword values, so may not detect all invalid formats. */ { if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (cval[0] == '\0') return(*status = VALUE_UNDEFINED); else if (cval[0] == '\'') *dtype = 'C'; /* character string starts with a quote */ else if (cval[0] == 'T' || cval[0] == 'F') *dtype = 'L'; /* logical = T or F character */ else if (cval[0] == '(') *dtype = 'X'; /* complex datatype "(1.2, -3.4)" */ else if (strchr(cval,'.')) *dtype = 'F'; /* float usualy contains a decimal point */ else if (strchr(cval,'E') || strchr(cval,'D') ) *dtype = 'F'; /* exponential contains a E or D */ else *dtype = 'I'; /* if none of the above assume it is integer */ return(*status); } /*--------------------------------------------------------------------------*/ int ffinttyp(char *cval, /* I - formatted string representation of the integer */ int *dtype, /* O - datatype code: TBYTE, TSHORT, TUSHORT, etc */ int *negative, /* O - is cval negative? */ int *status) /* IO - error status */ /* determine implicit datatype of input integer string. This assumes that the string conforms to the FITS standard for integer keyword value, so may not detect all invalid formats. */ { int ii, len; char *p; if (*status > 0) /* inherit input status value if > 0 */ return(*status); *dtype = 0; /* initialize to NULL */ p = cval; if (*p == '+') { p++; /* ignore leading + sign */ } else if (*p == '-') { p++; *negative = 1; /* this is a negative number */ } if (*p == '0') { while (*p == '0') p++; /* skip leading zeros */ if (*p == 0) { /* the value is a string of 1 or more zeros */ *dtype = TSBYTE; return(*status); } } len = strlen(p); for (ii = 0; ii < len; ii++) { if (!isdigit(*(p+ii))) { *status = BAD_INTKEY; return(*status); } } /* check for unambiguous cases, based on length of the string */ if (len == 0) { *status = VALUE_UNDEFINED; } else if (len < 3) { *dtype = TSBYTE; } else if (len == 4) { *dtype = TSHORT; } else if (len > 5 && len < 10) { *dtype = TINT; } else if (len > 10 && len < 19) { *dtype = TLONGLONG; } else if (len > 19) { *status = BAD_INTKEY; } else { if (!(*negative)) { /* positive integers */ if (len == 3) { if (strcmp(p,"127") <= 0 ) { *dtype = TSBYTE; } else if (strcmp(p,"255") <= 0 ) { *dtype = TBYTE; } else { *dtype = TSHORT; } } else if (len == 5) { if (strcmp(p,"32767") <= 0 ) { *dtype = TSHORT; } else if (strcmp(p,"65535") <= 0 ) { *dtype = TUSHORT; } else { *dtype = TINT; } } else if (len == 10) { if (strcmp(p,"2147483647") <= 0 ) { *dtype = TINT; } else if (strcmp(p,"4294967295") <= 0 ) { *dtype = TUINT; } else { *dtype = TLONGLONG; } } else if (len == 19) { if (strcmp(p,"9223372036854775807") <= 0 ) { *dtype = TLONGLONG; } else { *status = BAD_INTKEY; } } } else { /* negative integers */ if (len == 3) { if (strcmp(p,"128") <= 0 ) { *dtype = TSBYTE; } else { *dtype = TSHORT; } } else if (len == 5) { if (strcmp(p,"32768") <= 0 ) { *dtype = TSHORT; } else { *dtype = TINT; } } else if (len == 10) { if (strcmp(p,"2147483648") <= 0 ) { *dtype = TINT; } else { *dtype = TLONGLONG; } } else if (len == 19) { if (strcmp(p,"9223372036854775808") <= 0 ) { *dtype = TLONGLONG; } else { *status = BAD_INTKEY; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffc2x(const char *cval, /* I - formatted string representation of the value */ char *dtype, /* O - datatype code: C, L, F, I or X */ /* Only one of the following will be defined, depending on datatype */ long *ival, /* O - integer value */ int *lval, /* O - logical value */ char *sval, /* O - string value */ double *dval, /* O - double value */ int *status) /* IO - error status */ /* high level routine to convert formatted character string to its intrinsic data type */ { ffdtyp(cval, dtype, status); /* determine the datatype */ if (*dtype == 'I') ffc2ii(cval, ival, status); else if (*dtype == 'F') ffc2dd(cval, dval, status); else if (*dtype == 'L') ffc2ll(cval, lval, status); else ffc2s(cval, sval, status); /* C and X formats */ return(*status); } /*--------------------------------------------------------------------------*/ int ffc2xx(const char *cval, /* I - formatted string representation of the value */ char *dtype, /* O - datatype code: C, L, F, I or X */ /* Only one of the following will be defined, depending on datatype */ LONGLONG *ival, /* O - integer value */ int *lval, /* O - logical value */ char *sval, /* O - string value */ double *dval, /* O - double value */ int *status) /* IO - error status */ /* high level routine to convert formatted character string to its intrinsic data type */ { ffdtyp(cval, dtype, status); /* determine the datatype */ if (*dtype == 'I') ffc2jj(cval, ival, status); else if (*dtype == 'F') ffc2dd(cval, dval, status); else if (*dtype == 'L') ffc2ll(cval, lval, status); else ffc2s(cval, sval, status); /* C and X formats */ return(*status); } /*--------------------------------------------------------------------------*/ int ffc2i(const char *cval, /* I - string representation of the value */ long *ival, /* O - numerical value of the input string */ int *status) /* IO - error status */ /* convert formatted string to an integer value, doing implicit datatype conversion if necessary. */ { char dtype, sval[81], msg[81]; int lval; double dval; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (cval[0] == '\0') return(*status = VALUE_UNDEFINED); /* null value string */ /* convert the keyword to its native datatype */ ffc2x(cval, &dtype, ival, &lval, sval, &dval, status); if (dtype == 'X' ) { *status = BAD_INTKEY; } else if (dtype == 'C') { /* try reading the string as a number */ if (ffc2dd(sval, &dval, status) <= 0) { if (dval > (double) LONG_MAX || dval < (double) LONG_MIN) *status = NUM_OVERFLOW; else *ival = (long) dval; } } else if (dtype == 'F') { if (dval > (double) LONG_MAX || dval < (double) LONG_MIN) *status = NUM_OVERFLOW; else *ival = (long) dval; } else if (dtype == 'L') { *ival = (long) lval; } if (*status > 0) { *ival = 0; strcpy(msg,"Error in ffc2i evaluating string as an integer: "); strncat(msg,cval,30); ffpmsg(msg); return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffc2j(const char *cval, /* I - string representation of the value */ LONGLONG *ival, /* O - numerical value of the input string */ int *status) /* IO - error status */ /* convert formatted string to a LONGLONG integer value, doing implicit datatype conversion if necessary. */ { char dtype, sval[81], msg[81]; int lval; double dval; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (cval[0] == '\0') return(*status = VALUE_UNDEFINED); /* null value string */ /* convert the keyword to its native datatype */ ffc2xx(cval, &dtype, ival, &lval, sval, &dval, status); if (dtype == 'X' ) { *status = BAD_INTKEY; } else if (dtype == 'C') { /* try reading the string as a number */ if (ffc2dd(sval, &dval, status) <= 0) { if (dval > (double) LONGLONG_MAX || dval < (double) LONGLONG_MIN) *status = NUM_OVERFLOW; else *ival = (LONGLONG) dval; } } else if (dtype == 'F') { if (dval > (double) LONGLONG_MAX || dval < (double) LONGLONG_MIN) *status = NUM_OVERFLOW; else *ival = (LONGLONG) dval; } else if (dtype == 'L') { *ival = (LONGLONG) lval; } if (*status > 0) { *ival = 0; strcpy(msg,"Error in ffc2j evaluating string as a long integer: "); strncat(msg,cval,30); ffpmsg(msg); return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffc2l(const char *cval, /* I - string representation of the value */ int *lval, /* O - numerical value of the input string */ int *status) /* IO - error status */ /* convert formatted string to a logical value, doing implicit datatype conversion if necessary */ { char dtype, sval[81], msg[81]; long ival; double dval; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (cval[0] == '\0') return(*status = VALUE_UNDEFINED); /* null value string */ /* convert the keyword to its native datatype */ ffc2x(cval, &dtype, &ival, lval, sval, &dval, status); if (dtype == 'C' || dtype == 'X' ) *status = BAD_LOGICALKEY; if (*status > 0) { *lval = 0; strcpy(msg,"Error in ffc2l evaluating string as a logical: "); strncat(msg,cval,30); ffpmsg(msg); return(*status); } if (dtype == 'I') { if (ival) *lval = 1; else *lval = 0; } else if (dtype == 'F') { if (dval) *lval = 1; else *lval = 0; } return(*status); } /*--------------------------------------------------------------------------*/ int ffc2r(const char *cval, /* I - string representation of the value */ float *fval, /* O - numerical value of the input string */ int *status) /* IO - error status */ /* convert formatted string to a real float value, doing implicit datatype conversion if necessary */ { char dtype, sval[81], msg[81]; int lval; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (cval[0] == '\0') return(*status = VALUE_UNDEFINED); /* null value string */ ffdtyp(cval, &dtype, status); /* determine the datatype */ if (dtype == 'I' || dtype == 'F') ffc2rr(cval, fval, status); else if (dtype == 'L') { ffc2ll(cval, &lval, status); *fval = (float) lval; } else if (dtype == 'C') { /* try reading the string as a number */ ffc2s(cval, sval, status); ffc2rr(sval, fval, status); } else *status = BAD_FLOATKEY; if (*status > 0) { *fval = 0.; strcpy(msg,"Error in ffc2r evaluating string as a float: "); strncat(msg,cval,30); ffpmsg(msg); return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffc2d(const char *cval, /* I - string representation of the value */ double *dval, /* O - numerical value of the input string */ int *status) /* IO - error status */ /* convert formatted string to a double value, doing implicit datatype conversion if necessary */ { char dtype, sval[81], msg[81]; int lval; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (cval[0] == '\0') return(*status = VALUE_UNDEFINED); /* null value string */ ffdtyp(cval, &dtype, status); /* determine the datatype */ if (dtype == 'I' || dtype == 'F') ffc2dd(cval, dval, status); else if (dtype == 'L') { ffc2ll(cval, &lval, status); *dval = (double) lval; } else if (dtype == 'C') { /* try reading the string as a number */ ffc2s(cval, sval, status); ffc2dd(sval, dval, status); } else *status = BAD_DOUBLEKEY; if (*status > 0) { *dval = 0.; strcpy(msg,"Error in ffc2d evaluating string as a double: "); strncat(msg,cval,30); ffpmsg(msg); return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffc2ii(const char *cval, /* I - string representation of the value */ long *ival, /* O - numerical value of the input string */ int *status) /* IO - error status */ /* convert null-terminated formatted string to an integer value */ { char *loc, msg[81]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); errno = 0; *ival = 0; *ival = strtol(cval, &loc, 10); /* read the string as an integer */ /* check for read error, or junk following the integer */ if (*loc != '\0' && *loc != ' ' ) *status = BAD_C2I; if (errno == ERANGE) { strcpy(msg,"Range Error in ffc2ii converting string to long int: "); strncat(msg,cval,25); ffpmsg(msg); *status = NUM_OVERFLOW; errno = 0; } return(*status); } /*--------------------------------------------------------------------------*/ int ffc2jj(const char *cval, /* I - string representation of the value */ LONGLONG *ival, /* O - numerical value of the input string */ int *status) /* IO - error status */ /* convert null-terminated formatted string to an long long integer value */ { char *loc, msg[81]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); errno = 0; *ival = 0; #if defined(_MSC_VER) /* Microsoft Visual C++ 6.0 does not have the strtoll function */ *ival = _atoi64(cval); loc = cval; while (*loc == ' ') loc++; /* skip spaces */ if (*loc == '-') loc++; /* skip minus sign */ if (*loc == '+') loc++; /* skip plus sign */ while (isdigit(*loc)) loc++; /* skip digits */ #elif (USE_LL_SUFFIX == 1) *ival = strtoll(cval, &loc, 10); /* read the string as an integer */ #else *ival = strtol(cval, &loc, 10); /* read the string as an integer */ #endif /* check for read error, or junk following the integer */ if (*loc != '\0' && *loc != ' ' ) *status = BAD_C2I; if (errno == ERANGE) { strcpy(msg,"Range Error in ffc2jj converting string to longlong int: "); strncat(msg,cval,25); ffpmsg(msg); *status = NUM_OVERFLOW; errno = 0; } return(*status); } /*--------------------------------------------------------------------------*/ int ffc2ll(const char *cval, /* I - string representation of the value: T or F */ int *lval, /* O - numerical value of the input string: 1 or 0 */ int *status) /* IO - error status */ /* convert null-terminated formatted string to a logical value */ { if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (cval[0] == 'T') *lval = 1; else *lval = 0; /* any character besides T is considered false */ return(*status); } /*--------------------------------------------------------------------------*/ int ffc2s(const char *instr, /* I - null terminated quoted input string */ char *outstr, /* O - null terminated output string without quotes */ int *status) /* IO - error status */ /* convert an input quoted string to an unquoted string by removing the leading and trailing quote character. Also, replace any pairs of single quote characters with just a single quote character (FITS used a pair of single quotes to represent a literal quote character within the string). */ { int jj; size_t len, ii; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (instr[0] != '\'') { if (instr[0] == '\0') { outstr[0] = '\0'; return(*status = VALUE_UNDEFINED); /* null value string */ } else { strcpy(outstr, instr); /* no leading quote, so return input string */ return(*status); } } len = strlen(instr); for (ii=1, jj=0; ii < len; ii++, jj++) { if (instr[ii] == '\'') /* is this the closing quote? */ { if (instr[ii+1] == '\'') /* 2 successive quotes? */ ii++; /* copy only one of the quotes */ else break; /* found the closing quote, so exit this loop */ } outstr[jj] = instr[ii]; /* copy the next character to the output */ } outstr[jj] = '\0'; /* terminate the output string */ if (ii == len) { ffpmsg("This string value has no closing quote (ffc2s):"); ffpmsg(instr); return(*status = 205); } for (jj--; jj >= 0; jj--) /* replace trailing blanks with nulls */ { if (outstr[jj] == ' ') outstr[jj] = 0; else break; } return(*status); } /*--------------------------------------------------------------------------*/ int ffc2rr(const char *cval, /* I - string representation of the value */ float *fval, /* O - numerical value of the input string */ int *status) /* IO - error status */ /* convert null-terminated formatted string to a float value */ { char *loc, msg[81], tval[73]; struct lconv *lcc = 0; static char decimalpt = 0; short *sptr, iret; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (!decimalpt) { /* only do this once for efficiency */ lcc = localeconv(); /* set structure containing local decimal point symbol */ decimalpt = *(lcc->decimal_point); } errno = 0; *fval = 0.; if (strchr(cval, 'D') || decimalpt == ',') { /* strtod expects a comma, not a period, as the decimal point */ strcpy(tval, cval); /* The C language does not support a 'D'; replace with 'E' */ if (loc = strchr(tval, 'D')) *loc = 'E'; if (decimalpt == ',') { /* strtod expects a comma, not a period, as the decimal point */ if (loc = strchr(tval, '.')) *loc = ','; } *fval = (float) strtod(tval, &loc); /* read the string as an float */ } else { *fval = (float) strtod(cval, &loc); } /* check for read error, or junk following the value */ if (*loc != '\0' && *loc != ' ' ) { strcpy(msg,"Error in ffc2rr converting string to float: "); strncat(msg,cval,30); ffpmsg(msg); *status = BAD_C2F; } sptr = (short *) fval; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr++; /* point to MSBs */ #endif iret = fnan(*sptr); /* if iret == 1, then the float value is a NaN */ if (errno == ERANGE || (iret == 1) ) { strcpy(msg,"Error in ffc2rr converting string to float: "); strncat(msg,cval,30); ffpmsg(msg); *fval = 0.; *status = NUM_OVERFLOW; errno = 0; } return(*status); } /*--------------------------------------------------------------------------*/ int ffc2dd(const char *cval, /* I - string representation of the value */ double *dval, /* O - numerical value of the input string */ int *status) /* IO - error status */ /* convert null-terminated formatted string to a double value */ { char *loc, msg[81], tval[73]; struct lconv *lcc = 0; static char decimalpt = 0; short *sptr, iret; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (!decimalpt) { /* only do this once for efficiency */ lcc = localeconv(); /* set structure containing local decimal point symbol */ decimalpt = *(lcc->decimal_point); } errno = 0; *dval = 0.; if (strchr(cval, 'D') || decimalpt == ',') { /* need to modify a temporary copy of the string before parsing it */ strcpy(tval, cval); /* The C language does not support a 'D'; replace with 'E' */ if (loc = strchr(tval, 'D')) *loc = 'E'; if (decimalpt == ',') { /* strtod expects a comma, not a period, as the decimal point */ if (loc = strchr(tval, '.')) *loc = ','; } *dval = strtod(tval, &loc); /* read the string as an double */ } else { *dval = strtod(cval, &loc); } /* check for read error, or junk following the value */ if (*loc != '\0' && *loc != ' ' ) { strcpy(msg,"Error in ffc2dd converting string to double: "); strncat(msg,cval,30); ffpmsg(msg); *status = BAD_C2D; } sptr = (short *) dval; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr += 3; /* point to MSBs */ #endif iret = dnan(*sptr); /* if iret == 1, then the double value is a NaN */ if (errno == ERANGE || (iret == 1) ) { strcpy(msg,"Error in ffc2dd converting string to double: "); strncat(msg,cval,30); ffpmsg(msg); *dval = 0.; *status = NUM_OVERFLOW; errno = 0; } return(*status); } astropy-1.1.1/cextern/cfitsio/getcole.c0000644001134200020070000020327112602615520021021 0ustar embrayscience00000000000000/* This file, getcole.c, contains routines that read data elements from */ /* a FITS image or table, with float datatype */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffgpve( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ float nulval, /* I - value for undefined pixels */ float *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; char cdummy; int nullcheck = 1; float nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_read_compressed_pixels(fptr, TFLOAT, firstelem, nelem, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcle(fptr, 2, row, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgpfe( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ float *array, /* O - array of values that are returned */ char *nularray, /* O - array of null pixel flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any undefined pixels in the returned array will be set = 0 and the corresponding nularray value will be set = 1. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; int nullcheck = 2; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_read_compressed_pixels(fptr, TFLOAT, firstelem, nelem, nullcheck, NULL, array, nularray, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcle(fptr, 2, row, firstelem, nelem, 1, 2, 0.F, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg2de(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ float nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ float *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { /* call the 3D reading routine, with the 3rd dimension = 1 */ ffg3de(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg3de(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ float nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ float *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 3-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { long tablerow, ii, jj; LONGLONG narray, nfits; char cdummy; int nullcheck = 1; long inc[] = {1,1,1}; LONGLONG fpixel[] = {1,1,1}; LONGLONG lpixel[3]; float nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = ncols; lpixel[1] = nrows; lpixel[2] = naxis3; nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TFLOAT, fpixel, lpixel, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so read all at once */ ffgcle(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to read */ narray = 0; /* next pixel in output array to be filled */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* reading naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffgcle(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, &array[narray], &cdummy, anynul, status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsve(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ float nulval, /* I - value to set undefined pixels */ float *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dir[9]; long nelem, nultyp, ninc, numcol; LONGLONG felem, dsize[10], blcll[9], trcll[9]; int hdutype, anyf; char ldummy, msg[FLEN_ERRMSG]; int nullcheck = 1; float nullvalue; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsve is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TFLOAT, blcll, trcll, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 1; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; dir[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { if (hdutype == IMAGE_HDU) { dir[ii] = -1; } else { sprintf(msg, "ffgsve: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; dsize[ii] = dsize[ii] * dir[ii]; } dsize[naxis] = dsize[naxis] * dir[naxis]; if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; ninc = incr[0] * dir[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) { for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) { for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) { for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) { for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) { for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) { for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) { for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) { felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; if ( ffgcle(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &ldummy, &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsfe(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ float *array, /* O - array to be filled and returned */ char *flagval, /* O - set to 1 if corresponding value is null */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dsize[10]; LONGLONG blcll[9], trcll[9]; long felem, nelem, nultyp, ninc, numcol; int hdutype, anyf; float nulval = 0; char msg[FLEN_ERRMSG]; int nullcheck = 2; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsve is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } fits_read_compressed_img(fptr, TFLOAT, blcll, trcll, inc, nullcheck, NULL, array, flagval, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 2; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsve: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgcle(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &flagval[i0], &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffggpe( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ long firstelem, /* I - first vector element to read (1 = 1st) */ long nelem, /* I - number of values to read */ float *array, /* O - array of values that are returned */ int *status) /* IO - error status */ /* Read an array of group parameters from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). */ { long row; int idummy; char cdummy; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcle(fptr, 1, row, firstelem, nelem, 1, 1, 0.F, array, &cdummy, &idummy, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcve(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ float nulval, /* I - value for null pixels */ float *array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. */ { char cdummy; ffgcle(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcvc(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ float nulval, /* I - value for null pixels */ float *array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. TSCAL and ZERO should not be used with complex values. */ { char cdummy; /* a complex value is interpreted as a pair of float values, thus */ /* need to multiply the first element and number of elements by 2 */ ffgcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem *2, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfe(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ float *array, /* O - array of values that are read */ char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. */ { float dummy = 0; ffgcle(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfc(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ float *array, /* O - array of values that are read */ char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. TSCAL and ZERO should not be used with complex values. */ { long ii, jj; float dummy = 0; char *carray; /* a complex value is interpreted as a pair of float values, thus */ /* need to multiply the first element and number of elements by 2 */ /* allocate temporary array */ carray = (char *) calloc( (size_t) (nelem * 2), 1); ffgcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, 1, 2, dummy, array, carray, anynul, status); for (ii = 0, jj = 0; jj < nelem; ii += 2, jj++) { if (carray[ii] || carray[ii + 1]) nularray[jj] = 1; else nularray[jj] = 0; } free(carray); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcle( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long elemincre, /* I - pixel increment; e.g., 2 = every other */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ float nulval, /* I - value for null pixels if nultyp = 1 */ float *array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer be a virtual column in a 1 or more grouped FITS primary array or image extension. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The output array of values will be converted from the datatype of the column and will be scaled by the FITS TSCALn and TZEROn values if necessary. */ { double scale, zero, power = 1., dtemp; int tcode, maxelem2, hdutype, xcode, decimals; long twidth, incre; long ii, xwidth, ntodo; int convert, nulcheck, readcheck = 0; LONGLONG repeat, startpos, elemnum, readptr, tnull; LONGLONG rowlen, rownum, remain, next, rowincre, maxelem; char tform[20]; char message[81]; char snull[20]; /* the FITS null value if reading from ASCII table */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; if (anynul) *anynul = 0; if (nultyp == 2) memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (elemincre < 0) readcheck = -1; /* don't do range checking in this case */ if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) return(*status); maxelem = maxelem2; incre *= elemincre; /* multiply incre to just get every nth pixel */ if (tcode == TSTRING) /* setup for ASCII tables */ { /* get the number of implied decimal places if no explicit decmal point */ ffasfm(tform, &xcode, &xwidth, &decimals, status); for(ii = 0; ii < decimals; ii++) power *= 10.; } /*------------------------------------------------------------------*/ /* Decide whether to check for null values in the input FITS file: */ /*------------------------------------------------------------------*/ nulcheck = nultyp; /* by default check for null values in the FITS file */ if (nultyp == 1 && nulval == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ else if (tcode%10 == 1 && /* if reading an integer column, and */ tnull == NULL_UNDEFINED) /* if a null value is not defined, */ nulcheck = 0; /* then do not check for null values. */ else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) nulcheck = 0; /*----------------------------------------------------------------------*/ /* If FITS column and output data array have same datatype, then we do */ /* not need to use a temporary buffer to store intermediate datatype. */ /*----------------------------------------------------------------------*/ convert = 1; if (tcode == TFLOAT) /* Special Case: */ { /* no type convertion required, so read */ maxelem = nelem; /* data directly into output buffer. */ if (nulcheck == 0 && scale == 1. && zero == 0.) convert = 0; /* no need to scale data or find nulls */ } /*---------------------------------------------------------------------*/ /* Now read the pixels from the FITS column. If the column does not */ /* have the same datatype as the output array, then we have to read */ /* the raw values into a temporary buffer (of limited size). In */ /* the case of a vector colum read only 1 vector of values at a time */ /* then skip to the next row if more values need to be read. */ /* After reading the raw values, then call the fffXXYY routine to (1) */ /* test for undefined values, (2) convert the datatype if necessary, */ /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ /* scaling parameters. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to read */ next = 0; /* next element in array to be read */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to read at one time to the number that will fit in the buffer or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); if (elemincre >= 0) { ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); } else { ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); } readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); switch (tcode) { case (TFLOAT): ffgr4b(fptr, readptr, ntodo, incre, &array[next], status); if (convert) fffr4r4(&array[next], ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TBYTE): ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, status); fffi1r4((unsigned char *) buffer, ntodo, scale, zero, nulcheck, (unsigned char) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TSHORT): ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); fffi2r4((short *) buffer, ntodo, scale, zero, nulcheck, (short) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONG): ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, status); fffi4r4((INT32BIT *) buffer, ntodo, scale, zero, nulcheck, (INT32BIT) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONGLONG): ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); fffi8r4( (LONGLONG *) buffer, ntodo, scale, zero, nulcheck, tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TDOUBLE): ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); fffr8r4((double *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TSTRING): ffmbyt(fptr, readptr, REPORT_EOF, status); if (incre == twidth) /* contiguous bytes */ ffgbyt(fptr, ntodo * twidth, buffer, status); else ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); fffstrr4((char *) buffer, ntodo, scale, zero, twidth, power, nulcheck, snull, nulval, &nularray[next], anynul, &array[next], status); break; default: /* error trap for invalid column format */ sprintf(message, "Cannot read numbers from column %d which has format %s", colnum, tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous read operation */ { dtemp = (double) next; if (hdutype > 0) sprintf(message, "Error reading elements %.0f thru %.0f from column %d (ffgcle).", dtemp+1., dtemp+ntodo, colnum); else sprintf(message, "Error reading elements %.0f thru %.0f from image (ffgcle).", dtemp+1., dtemp+ntodo); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum = elemnum + (ntodo * elemincre); if (elemnum >= repeat) /* completed a row; start on later row */ { rowincre = elemnum / repeat; rownum += rowincre; elemnum = elemnum - (rowincre * repeat); } else if (elemnum < 0) /* completed a row; start on a previous row */ { rowincre = (-elemnum - 1) / repeat + 1; rownum -= rowincre; elemnum = (rowincre * repeat) + elemnum; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while reading FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int fffi1r4(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ float nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ float *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { output[ii] = (float) (( (double) input[ii] ) * scale + zero); } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (float) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { output[ii] = (float) (( (double) input[ii] ) * scale + zero); } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi2r4(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ float nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ float *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { output[ii] = (float) (input[ii] * scale + zero); } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (float) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { output[ii] = (float) (input[ii] * scale + zero); } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi4r4(INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ float nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ float *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { output[ii] = (float) (input[ii] * scale + zero); } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (float) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { output[ii] = (float) (input[ii] * scale + zero); } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi8r4(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ float nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ float *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { output[ii] = (float) (input[ii] * scale + zero); } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (float) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { output[ii] = (float) (input[ii] * scale + zero); } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr4r4(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ float nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ float *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { memcpy(output, input, ntodo * sizeof(float) ); } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { output[ii] = (float) (input[ii] * scale + zero); } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr++; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else { nullarray[ii] = 1; /* explicitly set value in case output contains a NaN */ output[ii] = FLOATNULLVALUE; } } else /* it's an underflow */ output[ii] = 0; } else output[ii] = input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else { nullarray[ii] = 1; /* explicitly set value in case output contains a NaN */ output[ii] = FLOATNULLVALUE; } } else /* it's an underflow */ output[ii] = (float) zero; } else output[ii] = (float) (input[ii] * scale + zero); } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr8r4(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ float nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ float *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { output[ii] = (float) (input[ii] * scale + zero); } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr += 3; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else output[ii] = (float) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = (float) zero; } else output[ii] = (float) (input[ii] * scale + zero); } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffstrr4(char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ long twidth, /* I - width of each substring of chars */ double implipower, /* I - power of 10 of implied decimal */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ char *snull, /* I - value of FITS null string, if any */ float nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ float *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to snull. If nullcheck= 0, then no special checking for nulls is performed. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { int nullen; long ii; double dvalue; char *cstring, message[81]; char *cptr, *tpos; char tempstore, chrzero = '0'; double val, power; int exponent, sign, esign, decpt; nullen = strlen(snull); cptr = input; /* pointer to start of input string */ for (ii = 0; ii < ntodo; ii++) { cstring = cptr; /* temporarily insert a null terminator at end of the string */ tpos = cptr + twidth; tempstore = *tpos; *tpos = 0; /* check if null value is defined, and if the */ /* column string is identical to the null string */ if (snull[0] != ASCII_NULL_UNDEFINED && !strncmp(snull, cptr, nullen) ) { if (nullcheck) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } cptr += twidth; } else { /* value is not the null value, so decode it */ /* remove any embedded blank characters from the string */ decpt = 0; sign = 1; val = 0.; power = 1.; exponent = 0; esign = 1; while (*cptr == ' ') /* skip leading blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for leading sign */ { if (*cptr == '-') sign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and value */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } if (*cptr == '.' || *cptr == ',') /* check for decimal point */ { decpt = 1; /* set flag to show there was a decimal point */ cptr++; while (*cptr == ' ') /* skip any blanks */ cptr++; while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ power = power * 10.; cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } } if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ { cptr++; while (*cptr == ' ') /* skip blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ { if (*cptr == '-') esign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and exp */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ cptr++; while (*cptr == ' ') /* skip embedded blanks */ cptr++; } } if (*cptr != 0) /* should end up at the null terminator */ { sprintf(message, "Cannot read number from ASCII table"); ffpmsg(message); sprintf(message, "Column field = %s.", cstring); ffpmsg(message); /* restore the char that was overwritten by the null */ *tpos = tempstore; return(*status = BAD_C2D); } if (!decpt) /* if no explicit decimal, use implied */ power = implipower; dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); output[ii] = (float) (dvalue * scale + zero); /* apply the scaling */ } /* restore the char that was overwritten by the null */ *tpos = tempstore; } return(*status); } astropy-1.1.1/cextern/cfitsio/grparser.h0000644001134200020070000001326512602615517021241 0ustar embrayscience00000000000000/* T E M P L A T E P A R S E R H E A D E R F I L E ===================================================== by Jerzy.Borkowski@obs.unige.ch Integral Science Data Center ch. d'Ecogia 16 1290 Versoix Switzerland 14-Oct-98: initial release 16-Oct-98: reference to fitsio.h removed, also removed strings after #endif directives to make gcc -Wall not to complain 20-Oct-98: added declarations NGP_XTENSION_SIMPLE and NGP_XTENSION_FIRST 24-Oct-98: prototype of ngp_read_line() function updated. 22-Jan-99: prototype for ngp_set_extver() function added. 20-Jun-2002 Wm Pence, added support for the HIERARCH keyword convention (changed NGP_MAX_NAME from (20) to FLEN_KEYWORD) */ #ifndef GRPARSER_H_INCLUDED #define GRPARSER_H_INCLUDED #ifdef __cplusplus extern "C" { #endif /* error codes - now defined in fitsio.h */ /* common constants definitions */ #define NGP_ALLOCCHUNK (1000) #define NGP_MAX_INCLUDE (10) /* include file nesting limit */ #define NGP_MAX_COMMENT (80) /* max size for comment */ #define NGP_MAX_NAME FLEN_KEYWORD /* max size for KEYWORD (FITS limits it to 8 chars) */ /* except HIERARCH can have longer effective keyword names */ #define NGP_MAX_STRING (80) /* max size for various strings */ #define NGP_MAX_ARRAY_DIM (999) /* max. number of dimensions in array */ #define NGP_MAX_FNAME (1000) /* max size of combined path+fname */ #define NGP_MAX_ENVFILES (10000) /* max size of CFITSIO_INCLUDE_FILES env. variable */ #define NGP_TOKEN_UNKNOWN (-1) /* token type unknown */ #define NGP_TOKEN_INCLUDE (0) /* \INCLUDE token */ #define NGP_TOKEN_GROUP (1) /* \GROUP token */ #define NGP_TOKEN_END (2) /* \END token */ #define NGP_TOKEN_XTENSION (3) /* XTENSION token */ #define NGP_TOKEN_SIMPLE (4) /* SIMPLE token */ #define NGP_TOKEN_EOF (5) /* End Of File pseudo token */ #define NGP_TTYPE_UNKNOWN (0) /* undef (yet) token type - invalid to print/write to disk */ #define NGP_TTYPE_BOOL (1) /* boolean, it is 'T' or 'F' */ #define NGP_TTYPE_STRING (2) /* something withing "" or starting with letter */ #define NGP_TTYPE_INT (3) /* starting with digit and not with '.' */ #define NGP_TTYPE_REAL (4) /* digits + '.' */ #define NGP_TTYPE_COMPLEX (5) /* 2 reals, separated with ',' */ #define NGP_TTYPE_NULL (6) /* NULL token, format is : NAME = / comment */ #define NGP_TTYPE_RAW (7) /* HISTORY/COMMENT/8SPACES + comment string without / */ #define NGP_FOUND_EQUAL_SIGN (1) /* line contains '=' after keyword name */ #define NGP_FORMAT_OK (0) /* line format OK */ #define NGP_FORMAT_ERROR (1) /* line format error */ #define NGP_NODE_INVALID (0) /* default node type - invalid (to catch errors) */ #define NGP_NODE_IMAGE (1) /* IMAGE type */ #define NGP_NODE_ATABLE (2) /* ASCII table type */ #define NGP_NODE_BTABLE (3) /* BINARY table type */ #define NGP_NON_SYSTEM_ONLY (0) /* save all keywords except NAXIS,BITPIX,etc.. */ #define NGP_REALLY_ALL (1) /* save really all keywords */ #define NGP_XTENSION_SIMPLE (1) /* HDU defined with SIMPLE T */ #define NGP_XTENSION_FIRST (2) /* this is first extension in template */ #define NGP_LINE_REREAD (1) /* reread line */ #define NGP_BITPIX_INVALID (-12345) /* default BITPIX (to catch errors) */ /* common macro definitions */ #ifdef NGP_PARSER_DEBUG_MALLOC #define ngp_alloc(x) dal_malloc(x) #define ngp_free(x) dal_free(x) #define ngp_realloc(x,y) dal_realloc(x,y) #else #define ngp_alloc(x) malloc(x) #define ngp_free(x) free(x) #define ngp_realloc(x,y) realloc(x,y) #endif /* type definitions */ typedef struct NGP_RAW_LINE_STRUCT { char *line; char *name; char *value; int type; char *comment; int format; int flags; } NGP_RAW_LINE; typedef union NGP_TOKVAL_UNION { char *s; /* space allocated separately, be careful !!! */ char b; int i; double d; struct NGP_COMPLEX_STRUCT { double re; double im; } c; /* complex value */ } NGP_TOKVAL; typedef struct NGP_TOKEN_STRUCT { int type; char name[NGP_MAX_NAME]; NGP_TOKVAL value; char comment[NGP_MAX_COMMENT]; } NGP_TOKEN; typedef struct NGP_HDU_STRUCT { int tokcnt; NGP_TOKEN *tok; } NGP_HDU; typedef struct NGP_TKDEF_STRUCT { char *name; int code; } NGP_TKDEF; typedef struct NGP_EXTVER_TAB_STRUCT { char *extname; int version; } NGP_EXTVER_TAB; /* globally visible variables declarations */ extern NGP_RAW_LINE ngp_curline; extern NGP_RAW_LINE ngp_prevline; extern int ngp_extver_tab_size; extern NGP_EXTVER_TAB *ngp_extver_tab; /* globally visible functions declarations */ int ngp_get_extver(char *extname, int *version); int ngp_set_extver(char *extname, int version); int ngp_delete_extver_tab(void); int ngp_strcasecmp(char *p1, char *p2); int ngp_strcasencmp(char *p1, char *p2, int n); int ngp_line_from_file(FILE *fp, char **p); int ngp_free_line(void); int ngp_free_prevline(void); int ngp_read_line_buffered(FILE *fp); int ngp_unread_line(void); int ngp_extract_tokens(NGP_RAW_LINE *cl); int ngp_include_file(char *fname); int ngp_read_line(int ignore_blank_lines); int ngp_keyword_is_write(NGP_TOKEN *ngp_tok); int ngp_keyword_all_write(NGP_HDU *ngph, fitsfile *ffp, int mode); int ngp_hdu_init(NGP_HDU *ngph); int ngp_hdu_clear(NGP_HDU *ngph); int ngp_hdu_insert_token(NGP_HDU *ngph, NGP_TOKEN *newtok); int ngp_append_columns(fitsfile *ff, NGP_HDU *ngph, int aftercol); int ngp_read_xtension(fitsfile *ff, int parent_hn, int simple_mode); int ngp_read_group(fitsfile *ff, char *grpname, int parent_hn); /* top level API function - now defined in fitsio.h */ #ifdef __cplusplus } #endif #endif astropy-1.1.1/cextern/cfitsio/edithdu.c0000644001134200020070000007475112602615520021036 0ustar embrayscience00000000000000/* This file, edithdu.c, contains the FITSIO routines related to */ /* copying, inserting, or deleting HDUs in a FITS file */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffcopy(fitsfile *infptr, /* I - FITS file pointer to input file */ fitsfile *outfptr, /* I - FITS file pointer to output file */ int morekeys, /* I - reserve space in output header */ int *status) /* IO - error status */ /* copy the CHDU from infptr to the CHDU of outfptr. This will also allocate space in the output header for MOREKY keywords */ { int nspace; if (*status > 0) return(*status); if (infptr == outfptr) return(*status = SAME_FILE); if (ffcphd(infptr, outfptr, status) ) /* copy the header keywords */ return(*status); if (morekeys > 0) { ffhdef(outfptr, morekeys, status); /* reserve space for more keywords */ } else { if (ffghsp(infptr, NULL, &nspace, status) > 0) /* get existing space */ return(*status); if (nspace > 0) { ffhdef(outfptr, nspace, status); /* preserve same amount of space */ if (nspace >= 35) { /* There is at least 1 full empty FITS block in the header. */ /* Physically write the END keyword at the beginning of the */ /* last block to preserve this extra space now rather than */ /* later. This is needed by the stream: driver which cannot */ /* seek back to the header to write the END keyword later. */ ffwend(outfptr, status); } } } ffcpdt(infptr, outfptr, status); /* now copy the data unit */ return(*status); } /*--------------------------------------------------------------------------*/ int ffcpfl(fitsfile *infptr, /* I - FITS file pointer to input file */ fitsfile *outfptr, /* I - FITS file pointer to output file */ int previous, /* I - copy any previous HDUs? */ int current, /* I - copy the current HDU? */ int following, /* I - copy any following HDUs? */ int *status) /* IO - error status */ /* copy all or part of the input file to the output file. */ { int hdunum, ii; if (*status > 0) return(*status); if (infptr == outfptr) return(*status = SAME_FILE); ffghdn(infptr, &hdunum); if (previous) { /* copy any previous HDUs */ for (ii=1; ii < hdunum; ii++) { ffmahd(infptr, ii, NULL, status); ffcopy(infptr, outfptr, 0, status); } } if (current && (*status <= 0) ) { /* copy current HDU */ ffmahd(infptr, hdunum, NULL, status); ffcopy(infptr, outfptr, 0, status); } if (following && (*status <= 0) ) { /* copy any remaining HDUs */ ii = hdunum + 1; while (1) { if (ffmahd(infptr, ii, NULL, status) ) { /* reset expected end of file status */ if (*status == END_OF_FILE) *status = 0; break; } if (ffcopy(infptr, outfptr, 0, status)) break; /* quit on unexpected error */ ii++; } } ffmahd(infptr, hdunum, NULL, status); /* restore initial position */ return(*status); } /*--------------------------------------------------------------------------*/ int ffcphd(fitsfile *infptr, /* I - FITS file pointer to input file */ fitsfile *outfptr, /* I - FITS file pointer to output file */ int *status) /* IO - error status */ /* copy the header keywords from infptr to outfptr. */ { int nkeys, ii, inPrim = 0, outPrim = 0; long naxis, naxes[1]; char *card, comm[FLEN_COMMENT]; char *tmpbuff; if (*status > 0) return(*status); if (infptr == outfptr) return(*status = SAME_FILE); /* set the input pointer to the correct HDU */ if (infptr->HDUposition != (infptr->Fptr)->curhdu) ffmahd(infptr, (infptr->HDUposition) + 1, NULL, status); if (ffghsp(infptr, &nkeys, NULL, status) > 0) /* get no. of keywords */ return(*status); /* create a memory buffer to hold the header records */ tmpbuff = (char*) malloc(nkeys*FLEN_CARD*sizeof(char)); if (!tmpbuff) return(*status = MEMORY_ALLOCATION); /* read all of the header records in the input HDU */ for (ii = 0; ii < nkeys; ii++) ffgrec(infptr, ii+1, tmpbuff + (ii * FLEN_CARD), status); if (infptr->HDUposition == 0) /* set flag if this is the Primary HDU */ inPrim = 1; /* if input is an image hdu, get the number of axes */ naxis = -1; /* negative if HDU is a table */ if ((infptr->Fptr)->hdutype == IMAGE_HDU) ffgkyj(infptr, "NAXIS", &naxis, NULL, status); /* set the output pointer to the correct HDU */ if (outfptr->HDUposition != (outfptr->Fptr)->curhdu) ffmahd(outfptr, (outfptr->HDUposition) + 1, NULL, status); /* check if output header is empty; if not create new empty HDU */ if ((outfptr->Fptr)->headend != (outfptr->Fptr)->headstart[(outfptr->Fptr)->curhdu] ) ffcrhd(outfptr, status); if (outfptr->HDUposition == 0) { if (naxis < 0) { /* the input HDU is a table, so we have to create */ /* a dummy Primary array before copying it to the output */ ffcrim(outfptr, 8, 0, naxes, status); ffcrhd(outfptr, status); /* create new empty HDU */ } else { /* set flag that this is the Primary HDU */ outPrim = 1; } } if (*status > 0) /* check for errors before proceeding */ { free(tmpbuff); return(*status); } if ( inPrim == 1 && outPrim == 0 ) { /* copying from primary array to image extension */ strcpy(comm, "IMAGE extension"); ffpkys(outfptr, "XTENSION", "IMAGE", comm, status); /* copy BITPIX through NAXISn keywords */ for (ii = 1; ii < 3 + naxis; ii++) { card = tmpbuff + (ii * FLEN_CARD); ffprec(outfptr, card, status); } strcpy(comm, "number of random group parameters"); ffpkyj(outfptr, "PCOUNT", 0, comm, status); strcpy(comm, "number of random groups"); ffpkyj(outfptr, "GCOUNT", 1, comm, status); /* copy remaining keywords, excluding EXTEND, and reference COMMENT keywords */ for (ii = 3 + naxis ; ii < nkeys; ii++) { card = tmpbuff+(ii * FLEN_CARD); if (FSTRNCMP(card, "EXTEND ", 8) && FSTRNCMP(card, "COMMENT FITS (Flexible Image Transport System) format is", 58) && FSTRNCMP(card, "COMMENT and Astrophysics', volume 376, page 3", 47) ) { ffprec(outfptr, card, status); } } } else if ( inPrim == 0 && outPrim == 1 ) { /* copying between image extension and primary array */ strcpy(comm, "file does conform to FITS standard"); ffpkyl(outfptr, "SIMPLE", TRUE, comm, status); /* copy BITPIX through NAXISn keywords */ for (ii = 1; ii < 3 + naxis; ii++) { card = tmpbuff + (ii * FLEN_CARD); ffprec(outfptr, card, status); } /* add the EXTEND keyword */ strcpy(comm, "FITS dataset may contain extensions"); ffpkyl(outfptr, "EXTEND", TRUE, comm, status); /* write standard block of self-documentating comments */ ffprec(outfptr, "COMMENT FITS (Flexible Image Transport System) format is defined in 'Astronomy", status); ffprec(outfptr, "COMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H", status); /* copy remaining keywords, excluding pcount, gcount */ for (ii = 3 + naxis; ii < nkeys; ii++) { card = tmpbuff+(ii * FLEN_CARD); if (FSTRNCMP(card, "PCOUNT ", 8) && FSTRNCMP(card, "GCOUNT ", 8)) { ffprec(outfptr, card, status); } } } else { /* input and output HDUs are same type; simply copy all keywords */ for (ii = 0; ii < nkeys; ii++) { card = tmpbuff+(ii * FLEN_CARD); ffprec(outfptr, card, status); } } free(tmpbuff); return(*status); } /*--------------------------------------------------------------------------*/ int ffcpdt(fitsfile *infptr, /* I - FITS file pointer to input file */ fitsfile *outfptr, /* I - FITS file pointer to output file */ int *status) /* IO - error status */ { /* copy the data unit from the CHDU of infptr to the CHDU of outfptr. This will overwrite any data already in the outfptr CHDU. */ long nb, ii; LONGLONG indatastart, indataend, outdatastart; char buffer[2880]; if (*status > 0) return(*status); if (infptr == outfptr) return(*status = SAME_FILE); ffghadll(infptr, NULL, &indatastart, &indataend, status); ffghadll(outfptr, NULL, &outdatastart, NULL, status); /* Calculate the number of blocks to be copied */ nb = (long) ((indataend - indatastart) / 2880); if (nb > 0) { if (infptr->Fptr == outfptr->Fptr) { /* copying between 2 HDUs in the SAME file */ for (ii = 0; ii < nb; ii++) { ffmbyt(infptr, indatastart, REPORT_EOF, status); ffgbyt(infptr, 2880L, buffer, status); /* read input block */ ffmbyt(outfptr, outdatastart, IGNORE_EOF, status); ffpbyt(outfptr, 2880L, buffer, status); /* write output block */ indatastart += 2880; /* move address */ outdatastart += 2880; /* move address */ } } else { /* copying between HDUs in separate files */ /* move to the initial copy position in each of the files */ ffmbyt(infptr, indatastart, REPORT_EOF, status); ffmbyt(outfptr, outdatastart, IGNORE_EOF, status); for (ii = 0; ii < nb; ii++) { ffgbyt(infptr, 2880L, buffer, status); /* read input block */ ffpbyt(outfptr, 2880L, buffer, status); /* write output block */ } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffwrhdu(fitsfile *infptr, /* I - FITS file pointer to input file */ FILE *outstream, /* I - stream to write HDU to */ int *status) /* IO - error status */ { /* write the data unit from the CHDU of infptr to the output file stream */ long nb, ii; LONGLONG hdustart, hduend; char buffer[2880]; if (*status > 0) return(*status); ffghadll(infptr, &hdustart, NULL, &hduend, status); nb = (long) ((hduend - hdustart) / 2880); /* number of blocks to copy */ if (nb > 0) { /* move to the start of the HDU */ ffmbyt(infptr, hdustart, REPORT_EOF, status); for (ii = 0; ii < nb; ii++) { ffgbyt(infptr, 2880L, buffer, status); /* read input block */ fwrite(buffer, 1, 2880, outstream ); /* write to output stream */ } } return(*status); } /*--------------------------------------------------------------------------*/ int ffiimg(fitsfile *fptr, /* I - FITS file pointer */ int bitpix, /* I - bits per pixel */ int naxis, /* I - number of axes in the array */ long *naxes, /* I - size of each axis */ int *status) /* IO - error status */ /* insert an IMAGE extension following the current HDU */ { LONGLONG tnaxes[99]; int ii; if (*status > 0) return(*status); if (naxis > 99) { ffpmsg("NAXIS value is too large (>99) (ffiimg)"); return(*status = 212); } for (ii = 0; (ii < naxis); ii++) tnaxes[ii] = naxes[ii]; ffiimgll(fptr, bitpix, naxis, tnaxes, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffiimgll(fitsfile *fptr, /* I - FITS file pointer */ int bitpix, /* I - bits per pixel */ int naxis, /* I - number of axes in the array */ LONGLONG *naxes, /* I - size of each axis */ int *status) /* IO - error status */ /* insert an IMAGE extension following the current HDU */ { int bytlen, nexthdu, maxhdu, ii, onaxis; long nblocks; LONGLONG npixels, newstart, datasize; char errmsg[FLEN_ERRMSG], card[FLEN_CARD], naxiskey[FLEN_KEYWORD]; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); maxhdu = (fptr->Fptr)->maxhdu; if (*status != PREPEND_PRIMARY) { /* if the current header is completely empty ... */ if (( (fptr->Fptr)->headend == (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]) /* or, if we are at the end of the file, ... */ || ( (((fptr->Fptr)->curhdu) == maxhdu ) && ((fptr->Fptr)->headstart[maxhdu + 1] >= (fptr->Fptr)->logfilesize ) ) ) { /* then simply append new image extension */ ffcrimll(fptr, bitpix, naxis, naxes, status); return(*status); } } if (bitpix == 8) bytlen = 1; else if (bitpix == 16) bytlen = 2; else if (bitpix == 32 || bitpix == -32) bytlen = 4; else if (bitpix == 64 || bitpix == -64) bytlen = 8; else { sprintf(errmsg, "Illegal value for BITPIX keyword: %d", bitpix); ffpmsg(errmsg); return(*status = BAD_BITPIX); /* illegal bitpix value */ } if (naxis < 0 || naxis > 999) { sprintf(errmsg, "Illegal value for NAXIS keyword: %d", naxis); ffpmsg(errmsg); return(*status = BAD_NAXIS); } for (ii = 0; ii < naxis; ii++) { if (naxes[ii] < 0) { sprintf(errmsg, "Illegal value for NAXIS%d keyword: %ld", ii + 1, (long) naxes[ii]); ffpmsg(errmsg); return(*status = BAD_NAXES); } } /* calculate number of pixels in the image */ if (naxis == 0) npixels = 0; else npixels = naxes[0]; for (ii = 1; ii < naxis; ii++) npixels = npixels * naxes[ii]; datasize = npixels * bytlen; /* size of image in bytes */ nblocks = (long) (((datasize + 2879) / 2880) + 1); /* +1 for the header */ if ((fptr->Fptr)->writemode == READWRITE) /* must have write access */ { /* close the CHDU */ ffrdef(fptr, status); /* scan header to redefine structure */ ffpdfl(fptr, status); /* insure correct data file values */ } else return(*status = READONLY_FILE); if (*status == PREPEND_PRIMARY) { /* inserting a new primary array; the current primary */ /* array must be transformed into an image extension. */ *status = 0; ffmahd(fptr, 1, NULL, status); /* move to the primary array */ ffgidm(fptr, &onaxis, status); if (onaxis > 0) ffkeyn("NAXIS",onaxis, naxiskey, status); else strcpy(naxiskey, "NAXIS"); ffgcrd(fptr, naxiskey, card, status); /* read last NAXIS keyword */ ffikyj(fptr, "PCOUNT", 0, "required keyword", status); /* add PCOUNT and */ ffikyj(fptr, "GCOUNT", 1, "required keyword", status); /* GCOUNT keywords */ if (*status > 0) return(*status); if (ffdkey(fptr, "EXTEND", status) ) /* delete the EXTEND keyword */ *status = 0; /* redefine internal structure for this HDU */ ffrdef(fptr, status); /* insert space for the primary array */ if (ffiblk(fptr, nblocks, -1, status) > 0) /* insert the blocks */ return(*status); nexthdu = 0; /* number of the new hdu */ newstart = 0; /* starting addr of HDU */ } else { nexthdu = ((fptr->Fptr)->curhdu) + 1; /* number of the next (new) hdu */ newstart = (fptr->Fptr)->headstart[nexthdu]; /* save starting addr of HDU */ (fptr->Fptr)->hdutype = IMAGE_HDU; /* so that correct fill value is used */ /* ffiblk also increments headstart for all following HDUs */ if (ffiblk(fptr, nblocks, 1, status) > 0) /* insert the blocks */ return(*status); } ((fptr->Fptr)->maxhdu)++; /* increment known number of HDUs in the file */ for (ii = (fptr->Fptr)->maxhdu; ii > (fptr->Fptr)->curhdu; ii--) (fptr->Fptr)->headstart[ii + 1] = (fptr->Fptr)->headstart[ii]; /* incre start addr */ if (nexthdu == 0) (fptr->Fptr)->headstart[1] = nblocks * 2880; /* start of the old Primary array */ (fptr->Fptr)->headstart[nexthdu] = newstart; /* set starting addr of HDU */ /* set default parameters for this new empty HDU */ (fptr->Fptr)->curhdu = nexthdu; /* we are now located at the next HDU */ fptr->HDUposition = nexthdu; /* we are now located at the next HDU */ (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[nexthdu]; (fptr->Fptr)->headend = (fptr->Fptr)->headstart[nexthdu]; (fptr->Fptr)->datastart = ((fptr->Fptr)->headstart[nexthdu]) + 2880; (fptr->Fptr)->hdutype = IMAGE_HDU; /* might need to be reset... */ /* write the required header keywords */ ffphprll(fptr, TRUE, bitpix, naxis, naxes, 0, 1, TRUE, status); /* redefine internal structure for this HDU */ ffrdef(fptr, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffitab(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG naxis1, /* I - width of row in the table */ LONGLONG naxis2, /* I - number of rows in the table */ int tfields, /* I - number of columns in the table */ char **ttype, /* I - name of each column */ long *tbcol, /* I - byte offset in row to each column */ char **tform, /* I - value of TFORMn keyword for each column */ char **tunit, /* I - value of TUNITn keyword for each column */ const char *extnmx, /* I - value of EXTNAME keyword, if any */ int *status) /* IO - error status */ /* insert an ASCII table extension following the current HDU */ { int nexthdu, maxhdu, ii, nunit, nhead, ncols, gotmem = 0; long nblocks, rowlen; LONGLONG datasize, newstart; char errmsg[81], extnm[FLEN_VALUE]; if (*status > 0) return(*status); extnm[0] = '\0'; if (extnmx) strncat(extnm, extnmx, FLEN_VALUE-1); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); maxhdu = (fptr->Fptr)->maxhdu; /* if the current header is completely empty ... */ if (( (fptr->Fptr)->headend == (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) /* or, if we are at the end of the file, ... */ || ( (((fptr->Fptr)->curhdu) == maxhdu ) && ((fptr->Fptr)->headstart[maxhdu + 1] >= (fptr->Fptr)->logfilesize ) ) ) { /* then simply append new image extension */ ffcrtb(fptr, ASCII_TBL, naxis2, tfields, ttype, tform, tunit, extnm, status); return(*status); } if (naxis1 < 0) return(*status = NEG_WIDTH); else if (naxis2 < 0) return(*status = NEG_ROWS); else if (tfields < 0 || tfields > 999) { sprintf(errmsg, "Illegal value for TFIELDS keyword: %d", tfields); ffpmsg(errmsg); return(*status = BAD_TFIELDS); } /* count number of optional TUNIT keywords to be written */ nunit = 0; for (ii = 0; ii < tfields; ii++) { if (tunit && *tunit && *tunit[ii]) nunit++; } if (extnm && *extnm) nunit++; /* add one for the EXTNAME keyword */ rowlen = (long) naxis1; if (!tbcol || !tbcol[0] || (!naxis1 && tfields)) /* spacing not defined? */ { /* allocate mem for tbcol; malloc may have problems allocating small */ /* arrays, so allocate at least 20 bytes */ ncols = maxvalue(5, tfields); tbcol = (long *) calloc(ncols, sizeof(long)); if (tbcol) { gotmem = 1; /* calculate width of a row and starting position of each column. */ /* Each column will be separated by 1 blank space */ ffgabc(tfields, tform, 1, &rowlen, tbcol, status); } } nhead = (9 + (3 * tfields) + nunit + 35) / 36; /* no. of header blocks */ datasize = (LONGLONG)rowlen * naxis2; /* size of table in bytes */ nblocks = (long) (((datasize + 2879) / 2880) + nhead); /* size of HDU */ if ((fptr->Fptr)->writemode == READWRITE) /* must have write access */ { /* close the CHDU */ ffrdef(fptr, status); /* scan header to redefine structure */ ffpdfl(fptr, status); /* insure correct data file values */ } else return(*status = READONLY_FILE); nexthdu = ((fptr->Fptr)->curhdu) + 1; /* number of the next (new) hdu */ newstart = (fptr->Fptr)->headstart[nexthdu]; /* save starting addr of HDU */ (fptr->Fptr)->hdutype = ASCII_TBL; /* so that correct fill value is used */ /* ffiblk also increments headstart for all following HDUs */ if (ffiblk(fptr, nblocks, 1, status) > 0) /* insert the blocks */ { if (gotmem) free(tbcol); return(*status); } ((fptr->Fptr)->maxhdu)++; /* increment known number of HDUs in the file */ for (ii = (fptr->Fptr)->maxhdu; ii > (fptr->Fptr)->curhdu; ii--) (fptr->Fptr)->headstart[ii + 1] = (fptr->Fptr)->headstart[ii]; /* incre start addr */ (fptr->Fptr)->headstart[nexthdu] = newstart; /* set starting addr of HDU */ /* set default parameters for this new empty HDU */ (fptr->Fptr)->curhdu = nexthdu; /* we are now located at the next HDU */ fptr->HDUposition = nexthdu; /* we are now located at the next HDU */ (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[nexthdu]; (fptr->Fptr)->headend = (fptr->Fptr)->headstart[nexthdu]; (fptr->Fptr)->datastart = ((fptr->Fptr)->headstart[nexthdu]) + (nhead * 2880); (fptr->Fptr)->hdutype = ASCII_TBL; /* might need to be reset... */ /* write the required header keywords */ ffphtb(fptr, rowlen, naxis2, tfields, ttype, tbcol, tform, tunit, extnm, status); if (gotmem) free(tbcol); /* redefine internal structure for this HDU */ ffrdef(fptr, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffibin(fitsfile *fptr, /* I - FITS file pointer */ LONGLONG naxis2, /* I - number of rows in the table */ int tfields, /* I - number of columns in the table */ char **ttype, /* I - name of each column */ char **tform, /* I - value of TFORMn keyword for each column */ char **tunit, /* I - value of TUNITn keyword for each column */ const char *extnmx, /* I - value of EXTNAME keyword, if any */ LONGLONG pcount, /* I - size of special data area (heap) */ int *status) /* IO - error status */ /* insert a Binary table extension following the current HDU */ { int nexthdu, maxhdu, ii, nunit, nhead, datacode; LONGLONG naxis1; long nblocks, repeat, width; LONGLONG datasize, newstart; char errmsg[81], extnm[FLEN_VALUE]; if (*status > 0) return(*status); extnm[0] = '\0'; if (extnmx) strncat(extnm, extnmx, FLEN_VALUE-1); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); maxhdu = (fptr->Fptr)->maxhdu; /* if the current header is completely empty ... */ if (( (fptr->Fptr)->headend == (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) /* or, if we are at the end of the file, ... */ || ( (((fptr->Fptr)->curhdu) == maxhdu ) && ((fptr->Fptr)->headstart[maxhdu + 1] >= (fptr->Fptr)->logfilesize ) ) ) { /* then simply append new image extension */ ffcrtb(fptr, BINARY_TBL, naxis2, tfields, ttype, tform, tunit, extnm, status); return(*status); } if (naxis2 < 0) return(*status = NEG_ROWS); else if (tfields < 0 || tfields > 999) { sprintf(errmsg, "Illegal value for TFIELDS keyword: %d", tfields); ffpmsg(errmsg); return(*status = BAD_TFIELDS); } /* count number of optional TUNIT keywords to be written */ nunit = 0; for (ii = 0; ii < tfields; ii++) { if (tunit && *tunit && *tunit[ii]) nunit++; } if (extnm && *extnm) nunit++; /* add one for the EXTNAME keyword */ nhead = (9 + (2 * tfields) + nunit + 35) / 36; /* no. of header blocks */ /* calculate total width of the table */ naxis1 = 0; for (ii = 0; ii < tfields; ii++) { ffbnfm(tform[ii], &datacode, &repeat, &width, status); if (datacode == TBIT) naxis1 = naxis1 + ((repeat + 7) / 8); else if (datacode == TSTRING) naxis1 += repeat; else naxis1 = naxis1 + (repeat * width); } datasize = ((LONGLONG)naxis1 * naxis2) + pcount; /* size of table in bytes */ nblocks = (long) ((datasize + 2879) / 2880) + nhead; /* size of HDU */ if ((fptr->Fptr)->writemode == READWRITE) /* must have write access */ { /* close the CHDU */ ffrdef(fptr, status); /* scan header to redefine structure */ ffpdfl(fptr, status); /* insure correct data file values */ } else return(*status = READONLY_FILE); nexthdu = ((fptr->Fptr)->curhdu) + 1; /* number of the next (new) hdu */ newstart = (fptr->Fptr)->headstart[nexthdu]; /* save starting addr of HDU */ (fptr->Fptr)->hdutype = BINARY_TBL; /* so that correct fill value is used */ /* ffiblk also increments headstart for all following HDUs */ if (ffiblk(fptr, nblocks, 1, status) > 0) /* insert the blocks */ return(*status); ((fptr->Fptr)->maxhdu)++; /* increment known number of HDUs in the file */ for (ii = (fptr->Fptr)->maxhdu; ii > (fptr->Fptr)->curhdu; ii--) (fptr->Fptr)->headstart[ii + 1] = (fptr->Fptr)->headstart[ii]; /* incre start addr */ (fptr->Fptr)->headstart[nexthdu] = newstart; /* set starting addr of HDU */ /* set default parameters for this new empty HDU */ (fptr->Fptr)->curhdu = nexthdu; /* we are now located at the next HDU */ fptr->HDUposition = nexthdu; /* we are now located at the next HDU */ (fptr->Fptr)->nextkey = (fptr->Fptr)->headstart[nexthdu]; (fptr->Fptr)->headend = (fptr->Fptr)->headstart[nexthdu]; (fptr->Fptr)->datastart = ((fptr->Fptr)->headstart[nexthdu]) + (nhead * 2880); (fptr->Fptr)->hdutype = BINARY_TBL; /* might need to be reset... */ /* write the required header keywords. This will write PCOUNT = 0 */ /* so that the variable length data will be written at the right place */ ffphbn(fptr, naxis2, tfields, ttype, tform, tunit, extnm, pcount, status); /* redefine internal structure for this HDU (with PCOUNT = 0) */ ffrdef(fptr, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffdhdu(fitsfile *fptr, /* I - FITS file pointer */ int *hdutype, /* O - type of the new CHDU after deletion */ int *status) /* IO - error status */ /* Delete the CHDU. If the CHDU is the primary array, then replace the HDU with an empty primary array with no data. Return the type of the new CHDU after the old CHDU is deleted. */ { int tmptype = 0; long nblocks, ii, naxes[1]; if (*status > 0) return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if ((fptr->Fptr)->curhdu == 0) /* replace primary array with null image */ { /* ignore any existing keywords */ (fptr->Fptr)->headend = 0; (fptr->Fptr)->nextkey = 0; /* write default primary array header */ ffphpr(fptr,1,8,0,naxes,0,1,1,status); /* calc number of blocks to delete (leave just 1 block) */ nblocks = (long) (( (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu + 1] - 2880 ) / 2880); /* ffdblk also updates the starting address of all following HDUs */ if (nblocks > 0) { if (ffdblk(fptr, nblocks, status) > 0) /* delete the HDU */ return(*status); } /* this might not be necessary, but is doesn't hurt */ (fptr->Fptr)->datastart = DATA_UNDEFINED; ffrdef(fptr, status); /* reinitialize the primary array */ } else { /* calc number of blocks to delete */ nblocks = (long) (( (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu + 1] - (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] ) / 2880); /* ffdblk also updates the starting address of all following HDUs */ if (ffdblk(fptr, nblocks, status) > 0) /* delete the HDU */ return(*status); /* delete the CHDU from the list of HDUs */ for (ii = (fptr->Fptr)->curhdu + 1; ii <= (fptr->Fptr)->maxhdu; ii++) (fptr->Fptr)->headstart[ii] = (fptr->Fptr)->headstart[ii + 1]; (fptr->Fptr)->headstart[(fptr->Fptr)->maxhdu + 1] = 0; ((fptr->Fptr)->maxhdu)--; /* decrement the known number of HDUs */ if (ffrhdu(fptr, &tmptype, status) > 0) /* initialize next HDU */ { /* failed (end of file?), so move back one HDU */ *status = 0; ffcmsg(); /* clear extraneous error messages */ ffgext(fptr, ((fptr->Fptr)->curhdu) - 1, &tmptype, status); } } if (hdutype) *hdutype = tmptype; return(*status); } astropy-1.1.1/cextern/cfitsio/pliocomp.c0000644001134200020070000001562712602615517021235 0ustar embrayscience00000000000000/* stdlib is needed for the abs function */ #include /* The following prototype code was provided by Doug Tody, NRAO, for performing conversion between pixel arrays and line lists. The compression technique is used in IRAF. */ int pl_p2li (int *pxsrc, int xs, short *lldst, int npix); int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix); /* * PL_P2L -- Convert a pixel array to a line list. The length of the list is * returned as the function value. * * Translated from the SPP version using xc -f, f2c. 8Sep99 DCT. */ #ifndef min #define min(a,b) (((a)<(b))?(a):(b)) #endif #ifndef max #define max(a,b) (((a)>(b))?(a):(b)) #endif int pl_p2li (int *pxsrc, int xs, short *lldst, int npix) /* int *pxsrc; input pixel array */ /* int xs; starting index in pxsrc (?) */ /* short *lldst; encoded line list */ /* int npix; number of pixels to convert */ { /* System generated locals */ int ret_val, i__1, i__2, i__3; /* Local variables */ int zero, v, x1, hi, ip, dv, xe, np, op, iz, nv, pv, nz; /* Parameter adjustments */ --lldst; --pxsrc; /* Function Body */ if (! (npix <= 0)) { goto L110; } ret_val = 0; goto L100; L110: lldst[3] = -100; lldst[2] = 7; lldst[1] = 0; lldst[6] = 0; lldst[7] = 0; xe = xs + npix - 1; op = 8; zero = 0; /* Computing MAX */ i__1 = zero, i__2 = pxsrc[xs]; pv = max(i__1,i__2); x1 = xs; iz = xs; hi = 1; i__1 = xe; for (ip = xs; ip <= i__1; ++ip) { if (! (ip < xe)) { goto L130; } /* Computing MAX */ i__2 = zero, i__3 = pxsrc[ip + 1]; nv = max(i__2,i__3); if (! (nv == pv)) { goto L140; } goto L120; L140: if (! (pv == 0)) { goto L150; } pv = nv; x1 = ip + 1; goto L120; L150: goto L131; L130: if (! (pv == 0)) { goto L160; } x1 = xe + 1; L160: L131: np = ip - x1 + 1; nz = x1 - iz; if (! (pv > 0)) { goto L170; } dv = pv - hi; if (! (dv != 0)) { goto L180; } hi = pv; if (! (abs(dv) > 4095)) { goto L190; } lldst[op] = (short) ((pv & 4095) + 4096); ++op; lldst[op] = (short) (pv / 4096); ++op; goto L191; L190: if (! (dv < 0)) { goto L200; } lldst[op] = (short) (-dv + 12288); goto L201; L200: lldst[op] = (short) (dv + 8192); L201: ++op; if (! (np == 1 && nz == 0)) { goto L210; } v = lldst[op - 1]; lldst[op - 1] = (short) (v | 16384); goto L91; L210: L191: L180: L170: if (! (nz > 0)) { goto L220; } L230: if (! (nz > 0)) { goto L232; } lldst[op] = (short) min(4095,nz); ++op; /* L231: */ nz += -4095; goto L230; L232: if (! (np == 1 && pv > 0)) { goto L240; } lldst[op - 1] = (short) (lldst[op - 1] + 20481); goto L91; L240: L220: L250: if (! (np > 0)) { goto L252; } lldst[op] = (short) (min(4095,np) + 16384); ++op; /* L251: */ np += -4095; goto L250; L252: L91: x1 = ip + 1; iz = x1; pv = nv; L120: ; } /* L121: */ lldst[4] = (short) ((op - 1) % 32768); lldst[5] = (short) ((op - 1) / 32768); ret_val = op - 1; goto L100; L100: return ret_val; } /* plp2li_ */ /* * PL_L2PI -- Translate a PLIO line list into an integer pixel array. * The number of pixels output (always npix) is returned as the function * value. * * Translated from the SPP version using xc -f, f2c. 8Sep99 DCT. */ int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix) /* short *ll_src; encoded line list */ /* int xs; starting index in ll_src */ /* int *px_dst; output pixel array */ /* int npix; number of pixels to convert */ { /* System generated locals */ int ret_val, i__1, i__2; /* Local variables */ int data, sw0001, otop, i__, lllen, i1, i2, x1, x2, ip, xe, np, op, pv, opcode, llfirt; int skipwd; /* Parameter adjustments */ --px_dst; --ll_src; /* Function Body */ if (! (ll_src[3] > 0)) { goto L110; } lllen = ll_src[3]; llfirt = 4; goto L111; L110: lllen = (ll_src[5] << 15) + ll_src[4]; llfirt = ll_src[2] + 1; L111: if (! (npix <= 0 || lllen <= 0)) { goto L120; } ret_val = 0; goto L100; L120: xe = xs + npix - 1; skipwd = 0; op = 1; x1 = 1; pv = 1; i__1 = lllen; for (ip = llfirt; ip <= i__1; ++ip) { if (! skipwd) { goto L140; } skipwd = 0; goto L130; L140: opcode = ll_src[ip] / 4096; data = ll_src[ip] & 4095; sw0001 = opcode; goto L150; L160: x2 = x1 + data - 1; i1 = max(x1,xs); i2 = min(x2,xe); np = i2 - i1 + 1; if (! (np > 0)) { goto L170; } otop = op + np - 1; if (! (opcode == 4)) { goto L180; } i__2 = otop; for (i__ = op; i__ <= i__2; ++i__) { px_dst[i__] = pv; /* L190: */ } /* L191: */ goto L181; L180: i__2 = otop; for (i__ = op; i__ <= i__2; ++i__) { px_dst[i__] = 0; /* L200: */ } /* L201: */ if (! (opcode == 5 && i2 == x2)) { goto L210; } px_dst[otop] = pv; L210: L181: op = otop + 1; L170: x1 = x2 + 1; goto L151; L220: pv = (ll_src[ip + 1] << 12) + data; skipwd = 1; goto L151; L230: pv += data; goto L151; L240: pv -= data; goto L151; L250: pv += data; goto L91; L260: pv -= data; L91: if (! (x1 >= xs && x1 <= xe)) { goto L270; } px_dst[op] = pv; ++op; L270: ++x1; goto L151; L150: ++sw0001; if (sw0001 < 1 || sw0001 > 8) { goto L151; } switch ((int)sw0001) { case 1: goto L160; case 2: goto L220; case 3: goto L230; case 4: goto L240; case 5: goto L160; case 6: goto L160; case 7: goto L250; case 8: goto L260; } L151: if (! (x1 > xe)) { goto L280; } goto L131; L280: L130: ; } L131: i__1 = npix; for (i__ = op; i__ <= i__1; ++i__) { px_dst[i__] = 0; /* L290: */ } /* L291: */ ret_val = npix; goto L100; L100: return ret_val; } /* pll2pi_ */ astropy-1.1.1/cextern/cfitsio/getcolb.c0000644001134200020070000022531412602615520021020 0ustar embrayscience00000000000000/* This file, getcolb.c, contains routines that read data elements from */ /* a FITS image or table, with unsigned char (unsigned byte) data type. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffgpvb( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned char nulval, /* I - value for undefined pixels */ unsigned char *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; char cdummy; int nullcheck = 1; unsigned char nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_read_compressed_pixels(fptr, TBYTE, firstelem, nelem, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclb(fptr, 2, row, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgpfb( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned char *array, /* O - array of values that are returned */ char *nularray, /* O - array of null pixel flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any undefined pixels in the returned array will be set = 0 and the corresponding nularray value will be set = 1. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; int nullcheck = 2; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_read_compressed_pixels(fptr, TBYTE, firstelem, nelem, nullcheck, NULL, array, nularray, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclb(fptr, 2, row, firstelem, nelem, 1, 2, 0, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg2db(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ unsigned char nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ unsigned char *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { /* call the 3D reading routine, with the 3rd dimension = 1 */ ffg3db(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg3db(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ unsigned char nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ unsigned char *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 3-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { long tablerow, ii, jj; LONGLONG narray, nfits; char cdummy; int nullcheck = 1; long inc[] = {1,1,1}; LONGLONG fpixel[] = {1,1,1}; LONGLONG lpixel[3]; unsigned char nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = ncols; lpixel[1] = nrows; lpixel[2] = naxis3; nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TBYTE, fpixel, lpixel, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so read all at once */ ffgclb(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to read */ narray = 0; /* next pixel in output array to be filled */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* reading naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffgclb(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, &array[narray], &cdummy, anynul, status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsvb(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ unsigned char nulval, /* I - value to set undefined pixels */ unsigned char *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii, i0, i1, i2, i3, i4, i5, i6, i7, i8, row, rstr, rstp, rinc; long str[9], stp[9], incr[9], dir[9]; long nelem, nultyp, ninc, numcol; LONGLONG felem, dsize[10], blcll[9], trcll[9]; int hdutype, anyf; char ldummy, msg[FLEN_ERRMSG]; int nullcheck = 1; unsigned char nullvalue; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvb is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TBYTE, blcll, trcll, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 1; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; dir[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { if (hdutype == IMAGE_HDU) { dir[ii] = -1; } else { sprintf(msg, "ffgsvb: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; dsize[ii] = dsize[ii] * dir[ii]; } dsize[naxis] = dsize[naxis] * dir[naxis]; if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; ninc = incr[0] * dir[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) { for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) { for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) { for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) { for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) { for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) { for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) { for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) { felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; if ( ffgclb(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &ldummy, &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsfb(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ unsigned char *array, /* O - array to be filled and returned */ char *flagval, /* O - set to 1 if corresponding value is null */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dsize[10]; LONGLONG blcll[9], trcll[9]; long felem, nelem, nultyp, ninc, numcol; int hdutype, anyf; unsigned char nulval = 0; char msg[FLEN_ERRMSG]; int nullcheck = 2; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvb is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } fits_read_compressed_img(fptr, TBYTE, blcll, trcll, inc, nullcheck, NULL, array, flagval, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 2; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsvb: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgclb(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &flagval[i0], &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffggpb( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ long firstelem, /* I - first vector element to read (1 = 1st) */ long nelem, /* I - number of values to read */ unsigned char *array, /* O - array of values that are returned */ int *status) /* IO - error status */ /* Read an array of group parameters from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). */ { long row; int idummy; char cdummy; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgclb(fptr, 1, row, firstelem, nelem, 1, 1, 0, array, &cdummy, &idummy, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcvb(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned char nulval, /* I - value for null pixels */ unsigned char *array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. */ { char cdummy; ffgclb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfb(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ unsigned char *array, /* O - array of values that are read */ char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. */ { unsigned char dummy = 0; ffgclb(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgclb( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long elemincre, /* I - pixel increment; e.g., 2 = every other */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ unsigned char nulval, /* I - value for null pixels if nultyp = 1 */ unsigned char *array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer be a virtual column in a 1 or more grouped FITS primary array or image extension. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The output array of values will be converted from the datatype of the column and will be scaled by the FITS TSCALn and TZEROn values if necessary. */ { double scale, zero, power = 1., dtemp; int tcode, maxelem2, hdutype, xcode, decimals; long twidth, incre, ntodo; long ii, xwidth; int convert, nulcheck, readcheck = 0; LONGLONG repeat, startpos, elemnum, readptr, tnull; LONGLONG rowlen, rownum, remain, next, rowincre, maxelem; char tform[20]; char message[81]; char snull[20]; /* the FITS null value if reading from ASCII table */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; union u_tag { char charval; unsigned char ucharval; } u; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; if (anynul) *anynul = 0; if (nultyp == 2) memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (elemincre < 0) readcheck = -1; /* don't do range checking in this case */ ffgcprll( fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status); maxelem = maxelem2; /* special case */ if (tcode == TLOGICAL && elemincre == 1) { u.ucharval = nulval; ffgcll(fptr, colnum, firstrow, firstelem, nelem, nultyp, u.charval, (char *) array, nularray, anynul, status); return(*status); } if (strchr(tform,'A') != NULL) { if (*status == BAD_ELEM_NUM) { /* ignore this error message */ *status = 0; ffcmsg(); /* clear error stack */ } /* interpret a 'A' ASCII column as a 'B' byte column ('8A' == '8B') */ /* This is an undocumented 'feature' in CFITSIO */ /* we have to reset some of the values returned by ffgcpr */ tcode = TBYTE; incre = 1; /* each element is 1 byte wide */ repeat = twidth; /* total no. of chars in the col */ twidth = 1; /* width of each element */ scale = 1.0; /* no scaling */ zero = 0.0; tnull = NULL_UNDEFINED; /* don't test for nulls */ maxelem = DBUFFSIZE; } if (*status > 0) return(*status); incre *= elemincre; /* multiply incre to just get every nth pixel */ if (tcode == TSTRING && hdutype == ASCII_TBL) /* setup for ASCII tables */ { /* get the number of implied decimal places if no explicit decmal point */ ffasfm(tform, &xcode, &xwidth, &decimals, status); for(ii = 0; ii < decimals; ii++) power *= 10.; } /*------------------------------------------------------------------*/ /* Decide whether to check for null values in the input FITS file: */ /*------------------------------------------------------------------*/ nulcheck = nultyp; /* by default, check for null values in the FITS file */ if (nultyp == 1 && nulval == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ else if (tcode%10 == 1 && /* if reading an integer column, and */ tnull == NULL_UNDEFINED) /* if a null value is not defined, */ nulcheck = 0; /* then do not check for null values. */ else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) nulcheck = 0; /*----------------------------------------------------------------------*/ /* If FITS column and output data array have same datatype, then we do */ /* not need to use a temporary buffer to store intermediate datatype. */ /*----------------------------------------------------------------------*/ convert = 1; if (tcode == TBYTE) /* Special Case: */ { /* no type convertion required, so read */ maxelem = nelem; /* data directly into output buffer. */ if (nulcheck == 0 && scale == 1. && zero == 0.) convert = 0; /* no need to scale data or find nulls */ } /*---------------------------------------------------------------------*/ /* Now read the pixels from the FITS column. If the column does not */ /* have the same datatype as the output array, then we have to read */ /* the raw values into a temporary buffer (of limited size). In */ /* the case of a vector colum read only 1 vector of values at a time */ /* then skip to the next row if more values need to be read. */ /* After reading the raw values, then call the fffXXYY routine to (1) */ /* test for undefined values, (2) convert the datatype if necessary, */ /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ /* scaling parameters. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to read */ next = 0; /* next element in array to be read */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to read at one time to the number that will fit in the buffer or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); if (elemincre >= 0) { ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); } else { ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); } readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); switch (tcode) { case (TBYTE): ffgi1b(fptr, readptr, ntodo, incre, &array[next], status); if (convert) fffi1i1(&array[next], ntodo, scale, zero, nulcheck, (unsigned char) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TSHORT): ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status); fffi2i1((short *) buffer, ntodo, scale, zero, nulcheck, (short) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONG): ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, status); fffi4i1((INT32BIT *) buffer, ntodo, scale, zero, nulcheck, (INT32BIT) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONGLONG): ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); fffi8i1( (LONGLONG *) buffer, ntodo, scale, zero, nulcheck, tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TFLOAT): ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); fffr4i1((float *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TDOUBLE): ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); fffr8i1((double *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TSTRING): ffmbyt(fptr, readptr, REPORT_EOF, status); if (incre == twidth) /* contiguous bytes */ ffgbyt(fptr, ntodo * twidth, buffer, status); else ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); /* interpret the string as an ASCII formated number */ fffstri1((char *) buffer, ntodo, scale, zero, twidth, power, nulcheck, snull, nulval, &nularray[next], anynul, &array[next], status); break; default: /* error trap for invalid column format */ sprintf(message, "Cannot read bytes from column %d which has format %s", colnum, tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous read operation */ { dtemp = (double) next; if (hdutype > 0) sprintf(message, "Error reading elements %.0f thru %.0f from column %d (ffgclb).", dtemp+1., dtemp+ntodo, colnum); else sprintf(message, "Error reading elements %.0f thru %.0f from image (ffgclb).", dtemp+1., dtemp+ntodo); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum = elemnum + (ntodo * elemincre); if (elemnum >= repeat) /* completed a row; start on later row */ { rowincre = elemnum / repeat; rownum += rowincre; elemnum = elemnum - (rowincre * repeat); } else if (elemnum < 0) /* completed a row; start on a previous row */ { rowincre = (-elemnum - 1) / repeat + 1; rownum -= rowincre; elemnum = (rowincre * repeat) + elemnum; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while reading FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgextn( fitsfile *fptr, /* I - FITS file pointer */ LONGLONG offset, /* I - byte offset from start of extension data */ LONGLONG nelem, /* I - number of elements to read */ void *buffer, /* I - stream of bytes to read */ int *status) /* IO - error status */ /* Read a stream of bytes from the current FITS HDU. This primative routine is mainly for reading non-standard "conforming" extensions and should not be used for standard IMAGE, TABLE or BINTABLE extensions. */ { if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); /* move to write position */ ffmbyt(fptr, (fptr->Fptr)->datastart+ offset, IGNORE_EOF, status); /* read the buffer */ ffgbyt(fptr, nelem, buffer, status); return(*status); } /*--------------------------------------------------------------------------*/ int fffi1i1(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned char *output,/* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { /* this routine is normally not called in this case */ memcpy(output, input, ntodo ); } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi2i1(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned char *output,/* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > UCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > UCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi4i1(INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned char *output,/* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > UCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > UCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi8i1(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned char *output,/* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > UCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > UCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr4i1(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned char *output,/* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr++; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { /* use redundant boolean logic in following statement */ /* to suppress irritating Borland compiler warning message */ if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (zero > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr8i1(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned char *output,/* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr += 3; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (zero > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffstri1(char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ long twidth, /* I - width of each substring of chars */ double implipower, /* I - power of 10 of implied decimal */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ char *snull, /* I - value of FITS null string, if any */ unsigned char nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ unsigned char *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to snull. If nullcheck= 0, then no special checking for nulls is performed. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { int nullen; long ii; double dvalue; char *cstring, message[81]; char *cptr, *tpos; char tempstore, chrzero = '0'; double val, power; int exponent, sign, esign, decpt; nullen = strlen(snull); cptr = input; /* pointer to start of input string */ for (ii = 0; ii < ntodo; ii++) { cstring = cptr; /* temporarily insert a null terminator at end of the string */ tpos = cptr + twidth; tempstore = *tpos; *tpos = 0; /* check if null value is defined, and if the */ /* column string is identical to the null string */ if (snull[0] != ASCII_NULL_UNDEFINED && !strncmp(snull, cptr, nullen) ) { if (nullcheck) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } cptr += twidth; } else { /* value is not the null value, so decode it */ /* remove any embedded blank characters from the string */ decpt = 0; sign = 1; val = 0.; power = 1.; exponent = 0; esign = 1; while (*cptr == ' ') /* skip leading blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for leading sign */ { if (*cptr == '-') sign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and value */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } if (*cptr == '.' || *cptr == ',') /* check for decimal point */ { decpt = 1; cptr++; while (*cptr == ' ') /* skip any blanks */ cptr++; while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ power = power * 10.; cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } } if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ { cptr++; while (*cptr == ' ') /* skip blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ { if (*cptr == '-') esign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and exp */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ cptr++; while (*cptr == ' ') /* skip embedded blanks */ cptr++; } } if (*cptr != 0) /* should end up at the null terminator */ { sprintf(message, "Cannot read number from ASCII table"); ffpmsg(message); sprintf(message, "Column field = %s.", cstring); ffpmsg(message); /* restore the char that was overwritten by the null */ *tpos = tempstore; return(*status = BAD_C2D); } if (!decpt) /* if no explicit decimal, use implied */ power = implipower; dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); dvalue = dvalue * scale + zero; /* apply the scaling */ if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) dvalue; } /* restore the char that was overwritten by the null */ *tpos = tempstore; } return(*status); } astropy-1.1.1/cextern/cfitsio/putcolb.c0000644001134200020070000010735112602615520021051 0ustar embrayscience00000000000000/* This file, putcolb.c, contains routines that write data elements to */ /* a FITS image or table with char (byte) datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffpprb( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned char *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; unsigned char nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_pixels(fptr, TBYTE, firstelem, nelem, 0, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpclb(fptr, 2, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffppnb( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned char *array, /* I - array of values that are written */ unsigned char nulval, /* I - undefined pixel value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). Any array values that are equal to the value of nulval will be replaced with the null pixel value that is appropriate for this column. */ { long row; unsigned char nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_write_compressed_pixels(fptr, TBYTE, firstelem, nelem, 1, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcnb(fptr, 2, row, firstelem, nelem, array, nulval, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp2db(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ unsigned char *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { /* call the 3D writing routine, with the 3rd dimension = 1 */ ffp3db(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp3db(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ unsigned char *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 3-D cube of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow, ii, jj; LONGLONG nfits, narray; long fpixel[3]= {1,1,1}, lpixel[3]; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = (long) ncols; lpixel[1] = (long) nrows; lpixel[2] = (long) naxis3; fits_write_compressed_img(fptr, TBYTE, fpixel, lpixel, 0, array, NULL, status); return(*status); } tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so write all at once */ ffpclb(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to write to */ narray = 0; /* next pixel in input array to be written */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* writing naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffpclb(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpssb(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long naxis, /* I - number of data axes in array */ long *naxes, /* I - size of each FITS axis */ long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ long *lpixel, /* I - last pixel in each axis to write */ unsigned char *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write a subsection of pixels to the primary array or image. A subsection is defined to be any contiguous rectangular array of pixels within the n-dimensional FITS data file. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow; LONGLONG fpix[7], dimen[7], astart, pstart; LONGLONG off2, off3, off4, off5, off6, off7; LONGLONG st10, st20, st30, st40, st50, st60, st70; LONGLONG st1, st2, st3, st4, st5, st6, st7; long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; if (*status > 0) return(*status); if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_img(fptr, TBYTE, fpixel, lpixel, 0, array, NULL, status); return(*status); } if (naxis < 1 || naxis > 7) return(*status = BAD_DIMEN); tablerow=maxvalue(1,group); /* calculate the size and number of loops to perform in each dimension */ for (ii = 0; ii < 7; ii++) { fpix[ii]=1; irange[ii]=1; dimen[ii]=1; } for (ii = 0; ii < naxis; ii++) { fpix[ii]=fpixel[ii]; irange[ii]=lpixel[ii]-fpixel[ii]+1; dimen[ii]=naxes[ii]; } i1=irange[0]; /* compute the pixel offset between each dimension */ off2 = dimen[0]; off3 = off2 * dimen[1]; off4 = off3 * dimen[2]; off5 = off4 * dimen[3]; off6 = off5 * dimen[4]; off7 = off6 * dimen[5]; st10 = fpix[0]; st20 = (fpix[1] - 1) * off2; st30 = (fpix[2] - 1) * off3; st40 = (fpix[3] - 1) * off4; st50 = (fpix[4] - 1) * off5; st60 = (fpix[5] - 1) * off6; st70 = (fpix[6] - 1) * off7; /* store the initial offset in each dimension */ st1 = st10; st2 = st20; st3 = st30; st4 = st40; st5 = st50; st6 = st60; st7 = st70; astart = 0; for (i7 = 0; i7 < irange[6]; i7++) { for (i6 = 0; i6 < irange[5]; i6++) { for (i5 = 0; i5 < irange[4]; i5++) { for (i4 = 0; i4 < irange[3]; i4++) { for (i3 = 0; i3 < irange[2]; i3++) { pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; for (i2 = 0; i2 < irange[1]; i2++) { if (ffpclb(fptr, 2, tablerow, pstart, i1, &array[astart], status) > 0) return(*status); astart += i1; pstart += off2; } st2 = st20; st3 = st3+off3; } st3 = st30; st4 = st4+off4; } st4 = st40; st5 = st5+off5; } st5 = st50; st6 = st6+off6; } st6 = st60; st7 = st7+off7; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpgpb( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long firstelem, /* I - first vector element to write(1 = 1st) */ long nelem, /* I - number of values to write */ unsigned char *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of group parameters to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffpclb(fptr, 1L, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpclb( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned char *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of values to a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. */ { int tcode, maxelem2, hdutype, writeraw; long twidth, incre; long ntodo; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull, maxelem; double scale, zero; char tform[20], cform[20]; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); maxelem = maxelem2; if (tcode == TSTRING) ffcfmt(tform, cform); /* derive C format for writing strings */ /* if there is no scaling then we can simply write the raw data bytes into the FITS file if the datatype of the FITS column is the same as the input values. Otherwise, we must convert the raw values into the scaled and/or machine dependent format in a temporary buffer that has been allocated for this purpose. */ if (scale == 1. && zero == 0. && tcode == TBYTE) { writeraw = 1; maxelem = nelem; /* we can write the entire array at one time */ } else writeraw = 0; /*---------------------------------------------------------------------*/ /* Now write the pixels to the FITS column. */ /* First call the ffXXfYY routine to (1) convert the datatype */ /* if necessary, and (2) scale the values by the FITS TSCALn and */ /* TZEROn linear scaling parameters into a temporary buffer. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to process a one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ switch (tcode) { case (TBYTE): if (writeraw) { /* write raw input bytes without conversion */ ffpi1b(fptr, ntodo, incre, &array[next], status); } else { /* convert the raw data before writing to FITS file */ ffi1fi1(&array[next], ntodo, scale, zero, (unsigned char *) buffer, status); ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); } break; case (TLONGLONG): ffi1fi8(&array[next], ntodo, scale, zero, (LONGLONG *) buffer, status); ffpi8b(fptr, ntodo, incre, (long *) buffer, status); break; case (TSHORT): ffi1fi2(&array[next], ntodo, scale, zero, (short *) buffer, status); ffpi2b(fptr, ntodo, incre, (short *) buffer, status); break; case (TLONG): ffi1fi4(&array[next], ntodo, scale, zero, (INT32BIT *) buffer, status); ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); break; case (TFLOAT): ffi1fr4(&array[next], ntodo, scale, zero, (float *) buffer, status); ffpr4b(fptr, ntodo, incre, (float *) buffer, status); break; case (TDOUBLE): ffi1fr8(&array[next], ntodo, scale, zero, (double *) buffer, status); ffpr8b(fptr, ntodo, incre, (double *) buffer, status); break; case (TSTRING): /* numerical column in an ASCII table */ if (strchr(tform,'A')) { /* write raw input bytes without conversion */ /* This case is a hack to let users write a stream */ /* of bytes directly to the 'A' format column */ if (incre == twidth) ffpbyt(fptr, ntodo, &array[next], status); else ffpbytoff(fptr, twidth, ntodo/twidth, incre - twidth, &array[next], status); break; } else if (cform[1] != 's') /* "%s" format is a string */ { ffi1fstr(&array[next], ntodo, scale, zero, cform, twidth, (char *) buffer, status); if (incre == twidth) /* contiguous bytes */ ffpbyt(fptr, ntodo * twidth, buffer, status); else ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); break; } /* can't write to string column, so fall thru to default: */ default: /* error trap */ sprintf(message, "Cannot write numbers to column %d which has format %s", colnum,tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing elements %.0f thru %.0f of input data array (ffpclb).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while writing FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpcnb( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned char *array, /* I - array of values to write */ unsigned char nulvalue, /* I - flag for undefined pixels */ int *status) /* IO - error status */ /* Write an array of elements to the specified column of a table. Any input pixels equal to the value of nulvalue will be replaced by the appropriate null value in the output FITS file. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary */ { tcolumn *colptr; long ngood = 0, nbad = 0, ii; LONGLONG repeat, first, fstelm, fstrow; int tcode, overflow = 0; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode > 0) repeat = colptr->trepeat; /* repeat count for this column */ else repeat = firstelem -1 + nelem; /* variable length arrays */ /* if variable length array, first write the whole input vector, then go back and fill in the nulls */ if (tcode < 0) { if (ffpclb(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { if (*status == NUM_OVERFLOW) { /* ignore overflows, which are possibly the null pixel values */ /* overflow = 1; */ *status = 0; } else { return(*status); } } } /* absolute element number in the column */ first = (firstrow - 1) * repeat + firstelem; for (ii = 0; ii < nelem; ii++) { if (array[ii] != nulvalue) /* is this a good pixel? */ { if (nbad) /* write previous string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) return(*status); nbad=0; } ngood = ngood + 1; /* the consecutive number of good pixels */ } else { if (ngood) /* write previous string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ if (ffpclb(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status) > 0) { if (*status == NUM_OVERFLOW) { overflow = 1; *status = 0; } else { return(*status); } } } ngood=0; } nbad = nbad + 1; /* the consecutive number of bad pixels */ } } /* finished loop; now just write the last set of pixels */ if (ngood) /* write last string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ ffpclb(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); } } else if (nbad) /* write last string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); } if (*status <= 0) { if (overflow) { *status = NUM_OVERFLOW; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffpextn( fitsfile *fptr, /* I - FITS file pointer */ LONGLONG offset, /* I - byte offset from start of extension data */ LONGLONG nelem, /* I - number of elements to write */ void *buffer, /* I - stream of bytes to write */ int *status) /* IO - error status */ /* Write a stream of bytes to the current FITS HDU. This primative routine is mainly for writing non-standard "conforming" extensions and should not be used for standard IMAGE, TABLE or BINTABLE extensions. */ { if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); /* move to write position */ ffmbyt(fptr, (fptr->Fptr)->datastart+ offset, IGNORE_EOF, status); /* write the buffer */ ffpbyt(fptr, nelem, buffer, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffi1fi1(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ unsigned char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { memcpy(output, input, ntodo); /* just copy input to output */ } else { for (ii = 0; ii < ntodo; ii++) { dvalue = ( ((double) input[ii]) - zero) / scale; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) (dvalue + .5); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi1fi2(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ short *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = input[ii]; /* just copy input to output */ } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (((double) input[ii]) - zero) / scale; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else { if (dvalue >= 0) output[ii] = (short) (dvalue + .5); else output[ii] = (short) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi1fi4(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ INT32BIT *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (INT32BIT) input[ii]; /* copy input to output */ } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (((double) input[ii]) - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else { if (dvalue >= 0) output[ii] = (INT32BIT) (dvalue + .5); else output[ii] = (INT32BIT) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi1fi8(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ LONGLONG *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = input[ii]; } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else { if (dvalue >= 0) output[ii] = (LONGLONG) (dvalue + .5); else output[ii] = (LONGLONG) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi1fr4(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ float *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) (( ( (double) input[ii] ) - zero) / scale); } return(*status); } /*--------------------------------------------------------------------------*/ int ffi1fr8(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ double *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = ( ( (double) input[ii] ) - zero) / scale; } return(*status); } /*--------------------------------------------------------------------------*/ int ffi1fstr(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ char *cform, /* I - format for output string values */ long twidth, /* I - width of each field, in chars */ char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do scaling if required. */ { long ii; double dvalue; char *cptr; cptr = output; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { sprintf(output, cform, (double) input[ii]); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = ((double) input[ii] - zero) / scale; sprintf(output, cform, dvalue); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } /* replace any commas with periods (e.g., in French locale) */ while ((cptr = strchr(cptr, ','))) *cptr = '.'; return(*status); } astropy-1.1.1/cextern/cfitsio/inffixed.h0000644001134200020070000001430712602615520021200 0ustar embrayscience00000000000000 /* inffixed.h -- table for decoding fixed codes * Generated automatically by makefixed(). */ /* WARNING: this file should *not* be used by applications. It is part of the implementation of the compression library and is subject to change. Applications should only use zlib.h. */ static const code lenfix[512] = { {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48}, {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128}, {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59}, {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176}, {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20}, {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100}, {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8}, {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216}, {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76}, {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114}, {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2}, {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148}, {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42}, {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86}, {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15}, {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236}, {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62}, {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31}, {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162}, {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25}, {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105}, {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4}, {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202}, {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69}, {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125}, {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13}, {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195}, {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35}, {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91}, {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19}, {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246}, {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55}, {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135}, {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99}, {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190}, {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16}, {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96}, {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6}, {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209}, {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72}, {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116}, {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4}, {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153}, {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44}, {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82}, {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11}, {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58}, {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138}, {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51}, {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173}, {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30}, {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110}, {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0}, {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195}, {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65}, {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121}, {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9}, {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258}, {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37}, {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93}, {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23}, {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251}, {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51}, {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67}, {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183}, {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23}, {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103}, {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9}, {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223}, {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79}, {0,9,255} }; static const code distfix[32] = { {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025}, {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193}, {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385}, {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577}, {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073}, {22,5,193},{64,5,0} }; astropy-1.1.1/cextern/cfitsio/trees.c0000644001134200020070000013025112602615517020524 0ustar embrayscience00000000000000/* trees.c -- output deflated data using Huffman coding * Copyright (C) 1995-2010 Jean-loup Gailly * detect_data_type() function provided freely by Cosmin Truta, 2006 * For conditions of distribution and use, see copyright notice in zlib.h */ /* * ALGORITHM * * The "deflation" process uses several Huffman trees. The more * common source values are represented by shorter bit sequences. * * Each code tree is stored in a compressed form which is itself * a Huffman encoding of the lengths of all the code strings (in * ascending order by source values). The actual code strings are * reconstructed from the lengths in the inflate process, as described * in the deflate specification. * * REFERENCES * * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification". * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc * * Storer, James A. * Data Compression: Methods and Theory, pp. 49-50. * Computer Science Press, 1988. ISBN 0-7167-8156-5. * * Sedgewick, R. * Algorithms, p290. * Addison-Wesley, 1983. ISBN 0-201-06672-6. */ /* #define GEN_TREES_H */ #include "deflate.h" #ifdef DEBUG # include #endif /* =========================================================================== * Constants */ #define MAX_BL_BITS 7 /* Bit length codes must not exceed MAX_BL_BITS bits */ #define END_BLOCK 256 /* end of block literal code */ #define REP_3_6 16 /* repeat previous bit length 3-6 times (2 bits of repeat count) */ #define REPZ_3_10 17 /* repeat a zero length 3-10 times (3 bits of repeat count) */ #define REPZ_11_138 18 /* repeat a zero length 11-138 times (7 bits of repeat count) */ local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */ = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}; local const int extra_dbits[D_CODES] /* extra bits for each distance code */ = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */ = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}; local const uch bl_order[BL_CODES] = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}; /* The lengths of the bit length codes are sent in order of decreasing * probability, to avoid transmitting the lengths for unused bit length codes. */ #define Buf_size (8 * 2*sizeof(char)) /* Number of bits used within bi_buf. (bi_buf might be implemented on * more than 16 bits on some systems.) */ /* =========================================================================== * Local data. These are initialized only once. */ #define DIST_CODE_LEN 512 /* see definition of array dist_code below */ #if defined(GEN_TREES_H) || !defined(STDC) /* non ANSI compilers may not accept trees.h */ local ct_data static_ltree[L_CODES+2]; /* The static literal tree. Since the bit lengths are imposed, there is no * need for the L_CODES extra codes used during heap construction. However * The codes 286 and 287 are needed to build a canonical tree (see _tr_init * below). */ local ct_data static_dtree[D_CODES]; /* The static distance tree. (Actually a trivial tree since all codes use * 5 bits.) */ uch _dist_code[DIST_CODE_LEN]; /* Distance codes. The first 256 values correspond to the distances * 3 .. 258, the last 256 values correspond to the top 8 bits of * the 15 bit distances. */ uch _length_code[MAX_MATCH-MIN_MATCH+1]; /* length code for each normalized match length (0 == MIN_MATCH) */ local int base_length[LENGTH_CODES]; /* First normalized length for each code (0 = MIN_MATCH) */ local int base_dist[D_CODES]; /* First normalized distance for each code (0 = distance of 1) */ #else # include "trees.h" #endif /* GEN_TREES_H */ struct static_tree_desc_s { const ct_data *static_tree; /* static tree or NULL */ const intf *extra_bits; /* extra bits for each code or NULL */ int extra_base; /* base index for extra_bits */ int elems; /* max number of elements in the tree */ int max_length; /* max bit length for the codes */ }; local static_tree_desc static_l_desc = {static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; local static_tree_desc static_d_desc = {static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; local static_tree_desc static_bl_desc = {(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; /* =========================================================================== * Local (static) routines in this file. */ local void tr_static_init OF((void)); local void init_block OF((deflate_state *s)); local void pqdownheap OF((deflate_state *s, ct_data *tree, int k)); local void gen_bitlen OF((deflate_state *s, tree_desc *desc)); local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count)); local void build_tree OF((deflate_state *s, tree_desc *desc)); local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code)); local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); local int build_bl_tree OF((deflate_state *s)); local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, int blcodes)); local void compress_block OF((deflate_state *s, ct_data *ltree, ct_data *dtree)); local int detect_data_type OF((deflate_state *s)); local unsigned bi_reverse OF((unsigned value, int length)); local void bi_windup OF((deflate_state *s)); local void bi_flush OF((deflate_state *s)); local void copy_block OF((deflate_state *s, charf *buf, unsigned len, int header)); #ifdef GEN_TREES_H local void gen_trees_header OF((void)); #endif #ifndef DEBUG # define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) /* Send a code of the given tree. c and tree must not have side effects */ #else /* DEBUG */ # define send_code(s, c, tree) \ { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ send_bits(s, tree[c].Code, tree[c].Len); } #endif /* =========================================================================== * Output a short LSB first on the stream. * IN assertion: there is enough room in pendingBuf. */ #define put_short(s, w) { \ put_byte(s, (uch)((w) & 0xff)); \ put_byte(s, (uch)((ush)(w) >> 8)); \ } /* =========================================================================== * Send a value on a given number of bits. * IN assertion: length <= 16 and value fits in length bits. */ #ifdef DEBUG local void send_bits OF((deflate_state *s, int value, int length)); local void send_bits(s, value, length) deflate_state *s; int value; /* value to send */ int length; /* number of bits */ { Tracevv((stderr," l %2d v %4x ", length, value)); Assert(length > 0 && length <= 15, "invalid length"); s->bits_sent += (ulg)length; /* If not enough room in bi_buf, use (valid) bits from bi_buf and * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) * unused bits in value. */ if (s->bi_valid > (int)Buf_size - length) { s->bi_buf |= (ush)value << s->bi_valid; put_short(s, s->bi_buf); s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); s->bi_valid += length - Buf_size; } else { s->bi_buf |= (ush)value << s->bi_valid; s->bi_valid += length; } } #else /* !DEBUG */ #define send_bits(s, value, length) \ { int len = length;\ if (s->bi_valid > (int)Buf_size - len) {\ int val = value;\ s->bi_buf |= (ush)val << s->bi_valid;\ put_short(s, s->bi_buf);\ s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ s->bi_valid += len - Buf_size;\ } else {\ s->bi_buf |= (ush)(value) << s->bi_valid;\ s->bi_valid += len;\ }\ } #endif /* DEBUG */ /* the arguments must not have side effects */ /* =========================================================================== * Initialize the various 'constant' tables. */ local void tr_static_init() { #if defined(GEN_TREES_H) || !defined(STDC) static int static_init_done = 0; int n; /* iterates over tree elements */ int bits; /* bit counter */ int length; /* length value */ int code; /* code value */ int dist; /* distance index */ ush bl_count[MAX_BITS+1]; /* number of codes at each bit length for an optimal tree */ if (static_init_done) return; /* For some embedded targets, global variables are not initialized: */ #ifdef NO_INIT_GLOBAL_POINTERS static_l_desc.static_tree = static_ltree; static_l_desc.extra_bits = extra_lbits; static_d_desc.static_tree = static_dtree; static_d_desc.extra_bits = extra_dbits; static_bl_desc.extra_bits = extra_blbits; #endif /* Initialize the mapping length (0..255) -> length code (0..28) */ length = 0; for (code = 0; code < LENGTH_CODES-1; code++) { base_length[code] = length; for (n = 0; n < (1< dist code (0..29) */ dist = 0; for (code = 0 ; code < 16; code++) { base_dist[code] = dist; for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ for ( ; code < D_CODES; code++) { base_dist[code] = dist << 7; for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { _dist_code[256 + dist++] = (uch)code; } } Assert (dist == 256, "tr_static_init: 256+dist != 512"); /* Construct the codes of the static literal tree */ for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; n = 0; while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++; while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++; while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++; while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++; /* Codes 286 and 287 do not exist, but we must include them in the * tree construction to get a canonical Huffman tree (longest code * all ones) */ gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count); /* The static distance tree is trivial: */ for (n = 0; n < D_CODES; n++) { static_dtree[n].Len = 5; static_dtree[n].Code = bi_reverse((unsigned)n, 5); } static_init_done = 1; # ifdef GEN_TREES_H gen_trees_header(); # endif #endif /* defined(GEN_TREES_H) || !defined(STDC) */ } /* =========================================================================== * Genererate the file trees.h describing the static trees. */ #ifdef GEN_TREES_H # ifndef DEBUG # include # endif # define SEPARATOR(i, last, width) \ ((i) == (last)? "\n};\n\n" : \ ((i) % (width) == (width)-1 ? ",\n" : ", ")) void gen_trees_header() { FILE *header = fopen("trees.h", "w"); int i; Assert (header != NULL, "Can't open trees.h"); fprintf(header, "/* header created automatically with -DGEN_TREES_H */\n\n"); fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n"); for (i = 0; i < L_CODES+2; i++) { fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code, static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5)); } fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n"); for (i = 0; i < D_CODES; i++) { fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code, static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); } fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n"); for (i = 0; i < DIST_CODE_LEN; i++) { fprintf(header, "%2u%s", _dist_code[i], SEPARATOR(i, DIST_CODE_LEN-1, 20)); } fprintf(header, "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { fprintf(header, "%2u%s", _length_code[i], SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); } fprintf(header, "local const int base_length[LENGTH_CODES] = {\n"); for (i = 0; i < LENGTH_CODES; i++) { fprintf(header, "%1u%s", base_length[i], SEPARATOR(i, LENGTH_CODES-1, 20)); } fprintf(header, "local const int base_dist[D_CODES] = {\n"); for (i = 0; i < D_CODES; i++) { fprintf(header, "%5u%s", base_dist[i], SEPARATOR(i, D_CODES-1, 10)); } fclose(header); } #endif /* GEN_TREES_H */ /* =========================================================================== * Initialize the tree data structures for a new zlib stream. */ void ZLIB_INTERNAL _tr_init(s) deflate_state *s; { tr_static_init(); s->l_desc.dyn_tree = s->dyn_ltree; s->l_desc.stat_desc = &static_l_desc; s->d_desc.dyn_tree = s->dyn_dtree; s->d_desc.stat_desc = &static_d_desc; s->bl_desc.dyn_tree = s->bl_tree; s->bl_desc.stat_desc = &static_bl_desc; s->bi_buf = 0; s->bi_valid = 0; s->last_eob_len = 8; /* enough lookahead for inflate */ #ifdef DEBUG s->compressed_len = 0L; s->bits_sent = 0L; #endif /* Initialize the first block of the first file: */ init_block(s); } /* =========================================================================== * Initialize a new block. */ local void init_block(s) deflate_state *s; { int n; /* iterates over tree elements */ /* Initialize the trees. */ for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; s->dyn_ltree[END_BLOCK].Freq = 1; s->opt_len = s->static_len = 0L; s->last_lit = s->matches = 0; } #define SMALLEST 1 /* Index within the heap array of least frequent node in the Huffman tree */ /* =========================================================================== * Remove the smallest element from the heap and recreate the heap with * one less element. Updates heap and heap_len. */ #define pqremove(s, tree, top) \ {\ top = s->heap[SMALLEST]; \ s->heap[SMALLEST] = s->heap[s->heap_len--]; \ pqdownheap(s, tree, SMALLEST); \ } /* =========================================================================== * Compares to subtrees, using the tree depth as tie breaker when * the subtrees have equal frequency. This minimizes the worst case length. */ #define smaller(tree, n, m, depth) \ (tree[n].Freq < tree[m].Freq || \ (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m])) /* =========================================================================== * Restore the heap property by moving down the tree starting at node k, * exchanging a node with the smallest of its two sons if necessary, stopping * when the heap property is re-established (each father smaller than its * two sons). */ local void pqdownheap(s, tree, k) deflate_state *s; ct_data *tree; /* the tree to restore */ int k; /* node to move down */ { int v = s->heap[k]; int j = k << 1; /* left son of k */ while (j <= s->heap_len) { /* Set j to the smallest of the two sons: */ if (j < s->heap_len && smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { j++; } /* Exit if v is smaller than both sons */ if (smaller(tree, v, s->heap[j], s->depth)) break; /* Exchange v with the smallest son */ s->heap[k] = s->heap[j]; k = j; /* And continue down the tree, setting j to the left son of k */ j <<= 1; } s->heap[k] = v; } /* =========================================================================== * Compute the optimal bit lengths for a tree and update the total bit length * for the current block. * IN assertion: the fields freq and dad are set, heap[heap_max] and * above are the tree nodes sorted by increasing frequency. * OUT assertions: the field len is set to the optimal bit length, the * array bl_count contains the frequencies for each bit length. * The length opt_len is updated; static_len is also updated if stree is * not null. */ local void gen_bitlen(s, desc) deflate_state *s; tree_desc *desc; /* the tree descriptor */ { ct_data *tree = desc->dyn_tree; int max_code = desc->max_code; const ct_data *stree = desc->stat_desc->static_tree; const intf *extra = desc->stat_desc->extra_bits; int base = desc->stat_desc->extra_base; int max_length = desc->stat_desc->max_length; int h; /* heap index */ int n, m; /* iterate over the tree elements */ int bits; /* bit length */ int xbits; /* extra bits */ ush f; /* frequency */ int overflow = 0; /* number of elements with bit length too large */ for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; /* In a first pass, compute the optimal bit lengths (which may * overflow in the case of the bit length tree). */ tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ for (h = s->heap_max+1; h < HEAP_SIZE; h++) { n = s->heap[h]; bits = tree[tree[n].Dad].Len + 1; if (bits > max_length) bits = max_length, overflow++; tree[n].Len = (ush)bits; /* We overwrite tree[n].Dad which is no longer needed */ if (n > max_code) continue; /* not a leaf node */ s->bl_count[bits]++; xbits = 0; if (n >= base) xbits = extra[n-base]; f = tree[n].Freq; s->opt_len += (ulg)f * (bits + xbits); if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits); } if (overflow == 0) return; Trace((stderr,"\nbit length overflow\n")); /* This happens for example on obj2 and pic of the Calgary corpus */ /* Find the first bit length which could increase: */ do { bits = max_length-1; while (s->bl_count[bits] == 0) bits--; s->bl_count[bits]--; /* move one leaf down the tree */ s->bl_count[bits+1] += 2; /* move one overflow item as its brother */ s->bl_count[max_length]--; /* The brother of the overflow item also moves one step up, * but this does not affect bl_count[max_length] */ overflow -= 2; } while (overflow > 0); /* Now recompute all bit lengths, scanning in increasing frequency. * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all * lengths instead of fixing only the wrong ones. This idea is taken * from 'ar' written by Haruhiko Okumura.) */ for (bits = max_length; bits != 0; bits--) { n = s->bl_count[bits]; while (n != 0) { m = s->heap[--h]; if (m > max_code) continue; if ((unsigned) tree[m].Len != (unsigned) bits) { Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); s->opt_len += ((long)bits - (long)tree[m].Len) *(long)tree[m].Freq; tree[m].Len = (ush)bits; } n--; } } } /* =========================================================================== * Generate the codes for a given tree and bit counts (which need not be * optimal). * IN assertion: the array bl_count contains the bit length statistics for * the given tree and the field len is set for all tree elements. * OUT assertion: the field code is set for all tree elements of non * zero code length. */ local void gen_codes (tree, max_code, bl_count) ct_data *tree; /* the tree to decorate */ int max_code; /* largest code with non zero frequency */ ushf *bl_count; /* number of codes at each bit length */ { ush next_code[MAX_BITS+1]; /* next code value for each bit length */ ush code = 0; /* running code value */ int bits; /* bit index */ int n; /* code index */ /* The distribution counts are first used to generate the code values * without bit reversal. */ for (bits = 1; bits <= MAX_BITS; bits++) { next_code[bits] = code = (code + bl_count[bits-1]) << 1; } /* Check that the bit counts in bl_count are consistent. The last code * must be all ones. */ Assert (code + bl_count[MAX_BITS]-1 == (1<dyn_tree; const ct_data *stree = desc->stat_desc->static_tree; int elems = desc->stat_desc->elems; int n, m; /* iterate over heap elements */ int max_code = -1; /* largest code with non zero frequency */ int node; /* new node being created */ /* Construct the initial heap, with least frequent element in * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. * heap[0] is not used. */ s->heap_len = 0, s->heap_max = HEAP_SIZE; for (n = 0; n < elems; n++) { if (tree[n].Freq != 0) { s->heap[++(s->heap_len)] = max_code = n; s->depth[n] = 0; } else { tree[n].Len = 0; } } /* The pkzip format requires that at least one distance code exists, * and that at least one bit should be sent even if there is only one * possible code. So to avoid special checks later on we force at least * two codes of non zero frequency. */ while (s->heap_len < 2) { node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); tree[node].Freq = 1; s->depth[node] = 0; s->opt_len--; if (stree) s->static_len -= stree[node].Len; /* node is 0 or 1 so it does not have extra bits */ } desc->max_code = max_code; /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, * establish sub-heaps of increasing lengths: */ for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n); /* Construct the Huffman tree by repeatedly combining the least two * frequent nodes. */ node = elems; /* next internal node of the tree */ do { pqremove(s, tree, n); /* n = node of least frequency */ m = s->heap[SMALLEST]; /* m = node of next least frequency */ s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */ s->heap[--(s->heap_max)] = m; /* Create a new node father of n and m */ tree[node].Freq = tree[n].Freq + tree[m].Freq; s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ? s->depth[n] : s->depth[m]) + 1); tree[n].Dad = tree[m].Dad = (ush)node; #ifdef DUMP_BL_TREE if (tree == s->bl_tree) { fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)", node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); } #endif /* and insert the new node in the heap */ s->heap[SMALLEST] = node++; pqdownheap(s, tree, SMALLEST); } while (s->heap_len >= 2); s->heap[--(s->heap_max)] = s->heap[SMALLEST]; /* At this point, the fields freq and dad are set. We can now * generate the bit lengths. */ gen_bitlen(s, (tree_desc *)desc); /* The field len is now set, we can generate the bit codes */ gen_codes ((ct_data *)tree, max_code, s->bl_count); } /* =========================================================================== * Scan a literal or distance tree to determine the frequencies of the codes * in the bit length tree. */ local void scan_tree (s, tree, max_code) deflate_state *s; ct_data *tree; /* the tree to be scanned */ int max_code; /* and its largest code of non zero frequency */ { int n; /* iterates over all tree elements */ int prevlen = -1; /* last emitted length */ int curlen; /* length of current code */ int nextlen = tree[0].Len; /* length of next code */ int count = 0; /* repeat count of the current code */ int max_count = 7; /* max repeat count */ int min_count = 4; /* min repeat count */ if (nextlen == 0) max_count = 138, min_count = 3; tree[max_code+1].Len = (ush)0xffff; /* guard */ for (n = 0; n <= max_code; n++) { curlen = nextlen; nextlen = tree[n+1].Len; if (++count < max_count && curlen == nextlen) { continue; } else if (count < min_count) { s->bl_tree[curlen].Freq += count; } else if (curlen != 0) { if (curlen != prevlen) s->bl_tree[curlen].Freq++; s->bl_tree[REP_3_6].Freq++; } else if (count <= 10) { s->bl_tree[REPZ_3_10].Freq++; } else { s->bl_tree[REPZ_11_138].Freq++; } count = 0; prevlen = curlen; if (nextlen == 0) { max_count = 138, min_count = 3; } else if (curlen == nextlen) { max_count = 6, min_count = 3; } else { max_count = 7, min_count = 4; } } } /* =========================================================================== * Send a literal or distance tree in compressed form, using the codes in * bl_tree. */ local void send_tree (s, tree, max_code) deflate_state *s; ct_data *tree; /* the tree to be scanned */ int max_code; /* and its largest code of non zero frequency */ { int n; /* iterates over all tree elements */ int prevlen = -1; /* last emitted length */ int curlen; /* length of current code */ int nextlen = tree[0].Len; /* length of next code */ int count = 0; /* repeat count of the current code */ int max_count = 7; /* max repeat count */ int min_count = 4; /* min repeat count */ /* tree[max_code+1].Len = -1; */ /* guard already set */ if (nextlen == 0) max_count = 138, min_count = 3; for (n = 0; n <= max_code; n++) { curlen = nextlen; nextlen = tree[n+1].Len; if (++count < max_count && curlen == nextlen) { continue; } else if (count < min_count) { do { send_code(s, curlen, s->bl_tree); } while (--count != 0); } else if (curlen != 0) { if (curlen != prevlen) { send_code(s, curlen, s->bl_tree); count--; } Assert(count >= 3 && count <= 6, " 3_6?"); send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2); } else if (count <= 10) { send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3); } else { send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7); } count = 0; prevlen = curlen; if (nextlen == 0) { max_count = 138, min_count = 3; } else if (curlen == nextlen) { max_count = 6, min_count = 3; } else { max_count = 7, min_count = 4; } } } /* =========================================================================== * Construct the Huffman tree for the bit lengths and return the index in * bl_order of the last bit length code to send. */ local int build_bl_tree(s) deflate_state *s; { int max_blindex; /* index of last bit length code of non zero freq */ /* Determine the bit length frequencies for literal and distance trees */ scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code); scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code); /* Build the bit length tree: */ build_tree(s, (tree_desc *)(&(s->bl_desc))); /* opt_len now includes the length of the tree representations, except * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. */ /* Determine the number of bit length codes to send. The pkzip format * requires that at least 4 bit length codes be sent. (appnote.txt says * 3 but the actual value used is 4.) */ for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { if (s->bl_tree[bl_order[max_blindex]].Len != 0) break; } /* Update opt_len to include the bit length tree and counts */ s->opt_len += 3*(max_blindex+1) + 5+5+4; Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", s->opt_len, s->static_len)); return max_blindex; } /* =========================================================================== * Send the header for a block using dynamic Huffman trees: the counts, the * lengths of the bit length codes, the literal tree and the distance tree. * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. */ local void send_all_trees(s, lcodes, dcodes, blcodes) deflate_state *s; int lcodes, dcodes, blcodes; /* number of codes for each tree */ { int rank; /* index in bl_order */ Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, "too many codes"); Tracev((stderr, "\nbl counts: ")); send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ send_bits(s, dcodes-1, 5); send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ for (rank = 0; rank < blcodes; rank++) { Tracev((stderr, "\nbl code %2d ", bl_order[rank])); send_bits(s, s->bl_tree[bl_order[rank]].Len, 3); } Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */ Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */ Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); } /* =========================================================================== * Send a stored block */ void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last) deflate_state *s; charf *buf; /* input block */ ulg stored_len; /* length of input block */ int last; /* one if this is the last block for a file */ { send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */ #ifdef DEBUG s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; s->compressed_len += (stored_len + 4) << 3; #endif copy_block(s, buf, (unsigned)stored_len, 1); /* with header */ } /* =========================================================================== * Send one empty static block to give enough lookahead for inflate. * This takes 10 bits, of which 7 may remain in the bit buffer. * The current inflate code requires 9 bits of lookahead. If the * last two codes for the previous block (real code plus EOB) were coded * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode * the last real code. In this case we send two empty static blocks instead * of one. (There are no problems if the previous block is stored or fixed.) * To simplify the code, we assume the worst case of last real code encoded * on one bit only. */ void ZLIB_INTERNAL _tr_align(s) deflate_state *s; { send_bits(s, STATIC_TREES<<1, 3); send_code(s, END_BLOCK, static_ltree); #ifdef DEBUG s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ #endif bi_flush(s); /* Of the 10 bits for the empty block, we have already sent * (10 - bi_valid) bits. The lookahead for the last real code (before * the EOB of the previous block) was thus at least one plus the length * of the EOB plus what we have just sent of the empty static block. */ if (1 + s->last_eob_len + 10 - s->bi_valid < 9) { send_bits(s, STATIC_TREES<<1, 3); send_code(s, END_BLOCK, static_ltree); #ifdef DEBUG s->compressed_len += 10L; #endif bi_flush(s); } s->last_eob_len = 7; } /* =========================================================================== * Determine the best encoding for the current block: dynamic trees, static * trees or store, and output the encoded block to the zip file. */ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) deflate_state *s; charf *buf; /* input block, or NULL if too old */ ulg stored_len; /* length of input block */ int last; /* one if this is the last block for a file */ { ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ int max_blindex = 0; /* index of last bit length code of non zero freq */ /* Build the Huffman trees unless a stored block is forced */ if (s->level > 0) { /* Check if the file is binary or text */ if (s->strm->data_type == Z_UNKNOWN) s->strm->data_type = detect_data_type(s); /* Construct the literal and distance trees */ build_tree(s, (tree_desc *)(&(s->l_desc))); Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, s->static_len)); build_tree(s, (tree_desc *)(&(s->d_desc))); Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, s->static_len)); /* At this point, opt_len and static_len are the total bit lengths of * the compressed block data, excluding the tree representations. */ /* Build the bit length tree for the above two trees, and get the index * in bl_order of the last bit length code to send. */ max_blindex = build_bl_tree(s); /* Determine the best encoding. Compute the block lengths in bytes. */ opt_lenb = (s->opt_len+3+7)>>3; static_lenb = (s->static_len+3+7)>>3; Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, s->last_lit)); if (static_lenb <= opt_lenb) opt_lenb = static_lenb; } else { Assert(buf != (char*)0, "lost buf"); opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ } #ifdef FORCE_STORED if (buf != (char*)0) { /* force stored block */ #else if (stored_len+4 <= opt_lenb && buf != (char*)0) { /* 4: two words for the lengths */ #endif /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. * Otherwise we can't have processed more than WSIZE input bytes since * the last block flush, because compression would have been * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to * transform a block into a stored block. */ _tr_stored_block(s, buf, stored_len, last); #ifdef FORCE_STATIC } else if (static_lenb >= 0) { /* force static trees */ #else } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { #endif send_bits(s, (STATIC_TREES<<1)+last, 3); compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); #ifdef DEBUG s->compressed_len += 3 + s->static_len; #endif } else { send_bits(s, (DYN_TREES<<1)+last, 3); send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, max_blindex+1); compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree); #ifdef DEBUG s->compressed_len += 3 + s->opt_len; #endif } Assert (s->compressed_len == s->bits_sent, "bad compressed size"); /* The above check is made mod 2^32, for files larger than 512 MB * and uLong implemented on 32 bits. */ init_block(s); if (last) { bi_windup(s); #ifdef DEBUG s->compressed_len += 7; /* align on byte boundary */ #endif } Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, s->compressed_len-7*last)); } /* =========================================================================== * Save the match info and tally the frequency counts. Return true if * the current block must be flushed. */ int ZLIB_INTERNAL _tr_tally (s, dist, lc) deflate_state *s; unsigned dist; /* distance of matched string */ unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ { s->d_buf[s->last_lit] = (ush)dist; s->l_buf[s->last_lit++] = (uch)lc; if (dist == 0) { /* lc is the unmatched char */ s->dyn_ltree[lc].Freq++; } else { s->matches++; /* Here, lc is the match length - MIN_MATCH */ dist--; /* dist = match distance - 1 */ Assert((ush)dist < (ush)MAX_DIST(s) && (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++; s->dyn_dtree[d_code(dist)].Freq++; } #ifdef TRUNCATE_BLOCK /* Try to guess if it is profitable to stop the current block here */ if ((s->last_lit & 0x1fff) == 0 && s->level > 2) { /* Compute an upper bound for the compressed length */ ulg out_length = (ulg)s->last_lit*8L; ulg in_length = (ulg)((long)s->strstart - s->block_start); int dcode; for (dcode = 0; dcode < D_CODES; dcode++) { out_length += (ulg)s->dyn_dtree[dcode].Freq * (5L+extra_dbits[dcode]); } out_length >>= 3; Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", s->last_lit, in_length, out_length, 100L - out_length*100L/in_length)); if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; } #endif return (s->last_lit == s->lit_bufsize-1); /* We avoid equality with lit_bufsize because of wraparound at 64K * on 16 bit machines and because stored blocks are restricted to * 64K-1 bytes. */ } /* =========================================================================== * Send the block data compressed using the given Huffman trees */ local void compress_block(s, ltree, dtree) deflate_state *s; ct_data *ltree; /* literal tree */ ct_data *dtree; /* distance tree */ { unsigned dist; /* distance of matched string */ int lc; /* match length or unmatched char (if dist == 0) */ unsigned lx = 0; /* running index in l_buf */ unsigned code; /* the code to send */ int extra; /* number of extra bits to send */ if (s->last_lit != 0) do { dist = s->d_buf[lx]; lc = s->l_buf[lx++]; if (dist == 0) { send_code(s, lc, ltree); /* send a literal byte */ Tracecv(isgraph(lc), (stderr," '%c' ", lc)); } else { /* Here, lc is the match length - MIN_MATCH */ code = _length_code[lc]; send_code(s, code+LITERALS+1, ltree); /* send the length code */ extra = extra_lbits[code]; if (extra != 0) { lc -= base_length[code]; send_bits(s, lc, extra); /* send the extra length bits */ } dist--; /* dist is now the match distance - 1 */ code = d_code(dist); Assert (code < D_CODES, "bad d_code"); send_code(s, code, dtree); /* send the distance code */ extra = extra_dbits[code]; if (extra != 0) { dist -= base_dist[code]; send_bits(s, dist, extra); /* send the extra distance bits */ } } /* literal or match pair ? */ /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, "pendingBuf overflow"); } while (lx < s->last_lit); send_code(s, END_BLOCK, ltree); s->last_eob_len = ltree[END_BLOCK].Len; } /* =========================================================================== * Check if the data type is TEXT or BINARY, using the following algorithm: * - TEXT if the two conditions below are satisfied: * a) There are no non-portable control characters belonging to the * "black list" (0..6, 14..25, 28..31). * b) There is at least one printable character belonging to the * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). * - BINARY otherwise. * - The following partially-portable control characters form a * "gray list" that is ignored in this detection algorithm: * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). * IN assertion: the fields Freq of dyn_ltree are set. */ local int detect_data_type(s) deflate_state *s; { /* black_mask is the bit mask of black-listed bytes * set bits 0..6, 14..25, and 28..31 * 0xf3ffc07f = binary 11110011111111111100000001111111 */ unsigned long black_mask = 0xf3ffc07fUL; int n; /* Check for non-textual ("black-listed") bytes. */ for (n = 0; n <= 31; n++, black_mask >>= 1) if ((black_mask & 1) && (s->dyn_ltree[n].Freq != 0)) return Z_BINARY; /* Check for textual ("white-listed") bytes. */ if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0 || s->dyn_ltree[13].Freq != 0) return Z_TEXT; for (n = 32; n < LITERALS; n++) if (s->dyn_ltree[n].Freq != 0) return Z_TEXT; /* There are no "black-listed" or "white-listed" bytes: * this stream either is empty or has tolerated ("gray-listed") bytes only. */ return Z_BINARY; } /* =========================================================================== * Reverse the first len bits of a code, using straightforward code (a faster * method would use a table) * IN assertion: 1 <= len <= 15 */ local unsigned bi_reverse(code, len) unsigned code; /* the value to invert */ int len; /* its bit length */ { register unsigned res = 0; do { res |= code & 1; code >>= 1, res <<= 1; } while (--len > 0); return res >> 1; } /* =========================================================================== * Flush the bit buffer, keeping at most 7 bits in it. */ local void bi_flush(s) deflate_state *s; { if (s->bi_valid == 16) { put_short(s, s->bi_buf); s->bi_buf = 0; s->bi_valid = 0; } else if (s->bi_valid >= 8) { put_byte(s, (Byte)s->bi_buf); s->bi_buf >>= 8; s->bi_valid -= 8; } } /* =========================================================================== * Flush the bit buffer and align the output on a byte boundary */ local void bi_windup(s) deflate_state *s; { if (s->bi_valid > 8) { put_short(s, s->bi_buf); } else if (s->bi_valid > 0) { put_byte(s, (Byte)s->bi_buf); } s->bi_buf = 0; s->bi_valid = 0; #ifdef DEBUG s->bits_sent = (s->bits_sent+7) & ~7; #endif } /* =========================================================================== * Copy a stored block, storing first the length and its * one's complement if requested. */ local void copy_block(s, buf, len, header) deflate_state *s; charf *buf; /* the input data */ unsigned len; /* its length */ int header; /* true if block header must be written */ { bi_windup(s); /* align on byte boundary */ s->last_eob_len = 8; /* enough lookahead for inflate */ if (header) { put_short(s, (ush)len); put_short(s, (ush)~len); #ifdef DEBUG s->bits_sent += 2*16; #endif } #ifdef DEBUG s->bits_sent += (ulg)len<<3; #endif while (len--) { put_byte(s, *buf++); } } astropy-1.1.1/cextern/cfitsio/imcompress.c0000644001134200020070000130510612602615520021561 0ustar embrayscience00000000000000# include # include # include # include # include # include # include "fitsio2.h" #define NULL_VALUE -2147483647 /* value used to represent undefined pixels */ #define ZERO_VALUE -2147483646 /* value used to represent zero-valued pixels */ /* nearest integer function */ # define NINT(x) ((x >= 0.) ? (int) (x + 0.5) : (int) (x - 0.5)) /* special quantize level value indicates that floating point image pixels */ /* should not be quantized and instead losslessly compressed (with GZIP) */ #define NO_QUANTIZE 9999 /* string array for storing the individual column compression stats */ char results[999][60]; float trans_ratio[999]; float *fits_rand_value = 0; int imcomp_write_nocompress_tile(fitsfile *outfptr, long row, int datatype, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int *status); int imcomp_convert_tile_tshort(fitsfile *outfptr, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, double actual_bzero, int *intlength, int *status); int imcomp_convert_tile_tushort(fitsfile *outfptr, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *status); int imcomp_convert_tile_tint(fitsfile *outfptr, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *status); int imcomp_convert_tile_tuint(fitsfile *outfptr, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *status); int imcomp_convert_tile_tbyte(fitsfile *outfptr, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *status); int imcomp_convert_tile_tsbyte(fitsfile *outfptr, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *status); int imcomp_convert_tile_tfloat(fitsfile *outfptr, long row, void *tiledata, long tilelen, long tilenx, long tileny, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *flag, double *bscale, double *bzero,int *status); int imcomp_convert_tile_tdouble(fitsfile *outfptr, long row, void *tiledata, long tilelen, long tilenx, long tileny, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *flag, double *bscale, double *bzero, int *status); static int unquantize_i1r4(long row, unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int dither_method, /* I - which subtractive dither method to use */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ float nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ float *output, /* O - array of converted pixels */ int *status); /* IO - error status */ static int unquantize_i2r4(long row, short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int dither_method, /* I - which subtractive dither method to use */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ float nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ float *output, /* O - array of converted pixels */ int *status); /* IO - error status */ static int unquantize_i4r4(long row, INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int dither_method, /* I - which subtractive dither method to use */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ float nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ float *output, /* O - array of converted pixels */ int *status); /* IO - error status */ static int unquantize_i1r8(long row, unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int dither_method, /* I - which subtractive dither method to use */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ double nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ double *output, /* O - array of converted pixels */ int *status); /* IO - error status */ static int unquantize_i2r8(long row, short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int dither_method, /* I - which subtractive dither method to use */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ double nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ double *output, /* O - array of converted pixels */ int *status); /* IO - error status */ static int unquantize_i4r8(long row, INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int dither_method, /* I - which subtractive dither method to use */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ double nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ double *output, /* O - array of converted pixels */ int *status); /* IO - error status */ static int imcomp_float2nan(float *indata, long tilelen, int *outdata, float nullflagval, int *status); static int imcomp_double2nan(double *indata, long tilelen, LONGLONG *outdata, double nullflagval, int *status); static int fits_read_write_compressed_img(fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the array to be returned */ LONGLONG *infpixel, /* I - 'bottom left corner' of the subsection */ LONGLONG *inlpixel, /* I - 'top right corner' of the subsection */ long *ininc, /* I - increment to be applied in each dimension */ int nullcheck, /* I - 0 for no null checking */ /* 1: set undefined pixels = nullval */ void *nullval, /* I - value for undefined pixels */ int *anynul, /* O - set to 1 if any values are null; else 0 */ fitsfile *outfptr, /* I - FITS file pointer */ int *status); static int fits_shuffle_8bytes(char *heap, LONGLONG length, int *status); static int fits_shuffle_4bytes(char *heap, LONGLONG length, int *status); static int fits_shuffle_2bytes(char *heap, LONGLONG length, int *status); static int fits_gzip_heap(fitsfile *infptr, fitsfile *outfptr, int *status); static int fits_unshuffle_8bytes(char *heap, LONGLONG length, int *status); static int fits_unshuffle_4bytes(char *heap, LONGLONG length, int *status); static int fits_unshuffle_2bytes(char *heap, LONGLONG length, int *status); static int fits_gunzip_heap(fitsfile *infptr, fitsfile *outfptr, int *status); /* only used for diagnoitic purposes */ /* int fits_get_case(int *c1, int*c2, int*c3); */ /*---------------------------------------------------------------------------*/ int fits_init_randoms(void) { /* initialize an array of random numbers */ int ii; double a = 16807.0; double m = 2147483647.0; double temp, seed; FFLOCK; if (fits_rand_value) { FFUNLOCK; return(0); /* array is already initialized */ } /* allocate array for the random number sequence */ /* THIS MEMORY IS NEVER FREED */ fits_rand_value = calloc(N_RANDOM, sizeof(float)); if (!fits_rand_value) { FFUNLOCK; return(MEMORY_ALLOCATION); } /* We need a portable algorithm that anyone can use to generate this exact same sequence of random number. The C 'rand' function is not suitable because it is not available to Fortran or Java programmers. Instead, use a well known simple algorithm published here: "Random number generators: good ones are hard to find", Communications of the ACM, Volume 31 , Issue 10 (October 1988) Pages: 1192 - 1201 */ /* initialize the random numbers */ seed = 1; for (ii = 0; ii < N_RANDOM; ii++) { temp = a * seed; seed = temp -m * ((int) (temp / m) ); fits_rand_value[ii] = (float) (seed / m); } FFUNLOCK; /* IMPORTANT NOTE: the 10000th seed value must have the value 1043618065 if the algorithm has been implemented correctly */ if ( (int) seed != 1043618065) { ffpmsg("fits_init_randoms generated incorrect random number sequence"); return(1); } else { return(0); } } /*--------------------------------------------------------------------------*/ void bz_internal_error(int errcode) { /* external function declared by the bzip2 code in bzlib_private.h */ ffpmsg("bzip2 returned an internal error"); ffpmsg("This should never happen"); return; } /*--------------------------------------------------------------------------*/ int fits_set_compression_type(fitsfile *fptr, /* I - FITS file pointer */ int ctype, /* image compression type code; */ /* allowed values: RICE_1, GZIP_1, GZIP_2, PLIO_1, */ /* HCOMPRESS_1, BZIP2_1, and NOCOMPRESS */ int *status) /* IO - error status */ { /* This routine specifies the image compression algorithm that should be used when writing a FITS image. The image is divided into tiles, and each tile is compressed and stored in a row of at variable length binary table column. */ if (ctype != RICE_1 && ctype != GZIP_1 && ctype != GZIP_2 && ctype != PLIO_1 && ctype != HCOMPRESS_1 && ctype != BZIP2_1 && ctype != NOCOMPRESS) { ffpmsg("unknown compression algorithm (fits_set_compression_type)"); *status = DATA_COMPRESSION_ERR; } else { (fptr->Fptr)->request_compress_type = ctype; } return(*status); } /*--------------------------------------------------------------------------*/ int fits_set_tile_dim(fitsfile *fptr, /* I - FITS file pointer */ int ndim, /* number of dimensions in the compressed image */ long *dims, /* size of image compression tile in each dimension */ /* default tile size = (NAXIS1, 1, 1, ...) */ int *status) /* IO - error status */ { /* This routine specifies the size (dimension) of the image compression tiles that should be used when writing a FITS image. The image is divided into tiles, and each tile is compressed and stored in a row of at variable length binary table column. */ int ii; if (ndim < 0 || ndim > MAX_COMPRESS_DIM) { *status = BAD_DIMEN; ffpmsg("illegal number of tile dimensions (fits_set_tile_dim)"); return(*status); } for (ii = 0; ii < ndim; ii++) { (fptr->Fptr)->request_tilesize[ii] = dims[ii]; } return(*status); } /*--------------------------------------------------------------------------*/ int fits_set_quantize_level(fitsfile *fptr, /* I - FITS file pointer */ float qlevel, /* floating point quantization level */ int *status) /* IO - error status */ { /* This routine specifies the value of the quantization level, q, that should be used when compressing floating point images. The image is divided into tiles, and each tile is compressed and stored in a row of at variable length binary table column. */ if (qlevel == 0.) { /* this means don't quantize the floating point values. Instead, */ /* the floating point values will be losslessly compressed */ (fptr->Fptr)->request_quantize_level = NO_QUANTIZE; } else { (fptr->Fptr)->request_quantize_level = qlevel; } return(*status); } /*--------------------------------------------------------------------------*/ int fits_set_quantize_method(fitsfile *fptr, /* I - FITS file pointer */ int method, /* quantization method */ int *status) /* IO - error status */ { /* This routine specifies what type of dithering (randomization) should be performed when quantizing floating point images to integer prior to compression. A value of -1 means do no dithering. A value of 0 means use the default SUBTRACTIVE_DITHER_1 (which is equivalent to dither = 1). A value of 2 means use SUBTRACTIVE_DITHER_2. */ if (method < -1 || method > 2) { ffpmsg("illegal dithering value (fits_set_quantize_method)"); *status = DATA_COMPRESSION_ERR; } else { if (method == 0) method = 1; (fptr->Fptr)->request_quantize_method = method; } return(*status); } /*--------------------------------------------------------------------------*/ int fits_set_quantize_dither(fitsfile *fptr, /* I - FITS file pointer */ int dither, /* dither type */ int *status) /* IO - error status */ { /* the name of this routine has changed. This is kept here only for backwards compatibility for any software that may be calling the old routine. */ fits_set_quantize_method(fptr, dither, status); return(*status); } /*--------------------------------------------------------------------------*/ int fits_set_dither_seed(fitsfile *fptr, /* I - FITS file pointer */ int seed, /* random dithering seed value (1 to 10000) */ int *status) /* IO - error status */ { /* This routine specifies the value of the offset that should be applied when calculating the random dithering when quantizing floating point iamges. A random offset should be applied to each image to avoid quantization effects when taking the difference of 2 images, or co-adding a set of images. Without this random offset, the corresponding pixel in every image will have exactly the same dithering. offset = 0 means use the default random dithering based on system time offset = negative means randomly chose dithering based on 1st tile checksum offset = [1 - 10000] means use that particular dithering pattern */ /* if positive, ensure that the value is in the range 1 to 10000 */ if (seed > 10000) { ffpmsg("illegal dithering seed value (fits_set_dither_seed)"); *status = DATA_COMPRESSION_ERR; } else { (fptr->Fptr)->request_dither_seed = seed; } return(*status); } /*--------------------------------------------------------------------------*/ int fits_set_dither_offset(fitsfile *fptr, /* I - FITS file pointer */ int offset, /* random dithering offset value (1 to 10000) */ int *status) /* IO - error status */ { /* The name of this routine has changed. This is kept just for backwards compatibility with any software that calls the old name */ fits_set_dither_seed(fptr, offset, status); return(*status); } /*--------------------------------------------------------------------------*/ int fits_set_noise_bits(fitsfile *fptr, /* I - FITS file pointer */ int noisebits, /* noise_bits parameter value */ /* (default = 4) */ int *status) /* IO - error status */ { /* ******************************************************************** ******************************************************************** THIS ROUTINE IS PROVIDED ONLY FOR BACKWARDS COMPATIBILITY; ALL NEW SOFTWARE SHOULD CALL fits_set_quantize_level INSTEAD ******************************************************************** ******************************************************************** This routine specifies the value of the noice_bits parameter that should be used when compressing floating point images. The image is divided into tiles, and each tile is compressed and stored in a row of at variable length binary table column. Feb 2008: the "noisebits" parameter has been replaced with the more general "quantize level" parameter. */ float qlevel; if (noisebits < 1 || noisebits > 16) { *status = DATA_COMPRESSION_ERR; ffpmsg("illegal number of noise bits (fits_set_noise_bits)"); return(*status); } qlevel = (float) pow (2., (double)noisebits); fits_set_quantize_level(fptr, qlevel, status); return(*status); } /*--------------------------------------------------------------------------*/ int fits_set_hcomp_scale(fitsfile *fptr, /* I - FITS file pointer */ float scale, /* hcompress scale parameter value */ /* (default = 0.) */ int *status) /* IO - error status */ { /* This routine specifies the value of the hcompress scale parameter. */ (fptr->Fptr)->request_hcomp_scale = scale; return(*status); } /*--------------------------------------------------------------------------*/ int fits_set_hcomp_smooth(fitsfile *fptr, /* I - FITS file pointer */ int smooth, /* hcompress smooth parameter value */ /* if scale > 1 and smooth != 0, then */ /* the image will be smoothed when it is */ /* decompressed to remove some of the */ /* 'blockiness' in the image produced */ /* by the lossy compression */ int *status) /* IO - error status */ { /* This routine specifies the value of the hcompress scale parameter. */ (fptr->Fptr)->request_hcomp_smooth = smooth; return(*status); } /*--------------------------------------------------------------------------*/ int fits_set_lossy_int(fitsfile *fptr, /* I - FITS file pointer */ int lossy_int, /* I - True (!= 0) or False (0) */ int *status) /* IO - error status */ { /* This routine specifies whether images with integer pixel values should quantized and compressed the same way float images are compressed. The default is to not do this, and instead apply a lossless compression algorithm to integer images. */ (fptr->Fptr)->request_lossy_int_compress = lossy_int; return(*status); } /*--------------------------------------------------------------------------*/ int fits_set_huge_hdu(fitsfile *fptr, /* I - FITS file pointer */ int huge, /* I - True (!= 0) or False (0) */ int *status) /* IO - error status */ { /* This routine specifies whether the HDU that is being compressed is so large (i.e., > 4 GB) that the 'Q' type variable length array columns should be used rather than the normal 'P' type. The allows the heap pointers to be stored as 64-bit quantities, rather than just 32-bits. */ (fptr->Fptr)->request_huge_hdu = huge; return(*status); } /*--------------------------------------------------------------------------*/ int fits_get_compression_type(fitsfile *fptr, /* I - FITS file pointer */ int *ctype, /* image compression type code; */ /* allowed values: */ /* RICE_1, GZIP_1, GZIP_2, PLIO_1, HCOMPRESS_1, BZIP2_1 */ int *status) /* IO - error status */ { /* This routine returns the image compression algorithm that should be used when writing a FITS image. The image is divided into tiles, and each tile is compressed and stored in a row of at variable length binary table column. */ *ctype = (fptr->Fptr)->request_compress_type; if (*ctype != RICE_1 && *ctype != GZIP_1 && *ctype != GZIP_2 && *ctype != PLIO_1 && *ctype != HCOMPRESS_1 && *ctype != BZIP2_1 && *ctype != NOCOMPRESS) { ffpmsg("unknown compression algorithm (fits_get_compression_type)"); *status = DATA_COMPRESSION_ERR; } return(*status); } /*--------------------------------------------------------------------------*/ int fits_get_tile_dim(fitsfile *fptr, /* I - FITS file pointer */ int ndim, /* number of dimensions in the compressed image */ long *dims, /* size of image compression tile in each dimension */ /* default tile size = (NAXIS1, 1, 1, ...) */ int *status) /* IO - error status */ { /* This routine returns the size (dimension) of the image compression tiles that should be used when writing a FITS image. The image is divided into tiles, and each tile is compressed and stored in a row of at variable length binary table column. */ int ii; if (ndim < 0 || ndim > MAX_COMPRESS_DIM) { *status = BAD_DIMEN; ffpmsg("illegal number of tile dimensions (fits_get_tile_dim)"); return(*status); } for (ii = 0; ii < ndim; ii++) { dims[ii] = (fptr->Fptr)->request_tilesize[ii]; } return(*status); } /*--------------------------------------------------------------------------*/ int fits_unset_compression_param( fitsfile *fptr, int *status) { int ii; (fptr->Fptr)->compress_type = 0; (fptr->Fptr)->quantize_level = 0; (fptr->Fptr)->quantize_method = 0; (fptr->Fptr)->dither_seed = 0; (fptr->Fptr)->hcomp_scale = 0; for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) { (fptr->Fptr)->tilesize[ii] = 0; } } /*--------------------------------------------------------------------------*/ int fits_unset_compression_request( fitsfile *fptr, int *status) { int ii; (fptr->Fptr)->request_compress_type = 0; (fptr->Fptr)->request_quantize_level = 0; (fptr->Fptr)->request_quantize_method = 0; (fptr->Fptr)->request_dither_seed = 0; (fptr->Fptr)->request_hcomp_scale = 0; (fptr->Fptr)->request_lossy_int_compress = 0; (fptr->Fptr)->request_huge_hdu = 0; for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) { (fptr->Fptr)->request_tilesize[ii] = 0; } } /*--------------------------------------------------------------------------*/ int fits_set_compression_pref( fitsfile *infptr, fitsfile *outfptr, int *status) { /* Set the preference for various compression options, based on keywords in the input file that provide guidance about how the HDU should be compressed when written to the output file. */ int ii, naxis, nkeys, comptype, lossyintvalue, hsmooth; int ivalue, tstatus; long tiledim[6]= {1,1,1,1,1,1}; char card[FLEN_CARD], value[FLEN_VALUE]; double qvalue, hscale; LONGLONG datastart, dataend; if (*status > 0) return(*status); /* check the size of the HDU that is to be compressed */ fits_get_hduaddrll(infptr, NULL, &datastart, &dataend, status); if ( (LONGLONG)(dataend - datastart) > UINT32_MAX) { /* use 64-bit '1Q' variable length columns instead of '1P' columns */ /* for large files, in case the heap size becomes larger than 2**32 bytes*/ fits_set_huge_hdu(outfptr, 1, status); } fits_get_hdrspace(infptr, &nkeys, NULL, status); /* look for a image compression directive keywords (begin with 'FZ') */ for (ii = 2; ii <= nkeys; ii++) { fits_read_record(infptr, ii, card, status); if (!strncmp(card, "FZ", 2) ){ /* get the keyword value string */ fits_parse_value(card, value, NULL, status); if (!strncmp(card+2, "ALGOR", 5) ) { /* set the desired compression algorithm */ /* allowed values: RICE_1, GZIP_1, GZIP_2, PLIO_1, */ /* HCOMPRESS_1, BZIP2_1, and NOCOMPRESS */ if (!strncasecmp(value, "'RICE_1", 7) ) { comptype = RICE_1; } else if (!strncasecmp(value, "'GZIP_1", 7) ) { comptype = GZIP_1; } else if (!strncasecmp(value, "'GZIP_2", 7) ) { comptype = GZIP_2; } else if (!strncasecmp(value, "'PLIO_1", 7) ) { comptype = PLIO_1; } else if (!strncasecmp(value, "'HCOMPRESS_1", 12) ) { comptype = HCOMPRESS_1; } else if (!strncasecmp(value, "'NONE", 5) ) { comptype = NOCOMPRESS; } else { ffpmsg("Unknown FZALGOR keyword compression algorithm:"); ffpmsg(value); return(*status = DATA_COMPRESSION_ERR); } fits_set_compression_type (outfptr, comptype, status); } else if (!strncmp(card+2, "TILE ", 6) ) { tstatus = 0; if (!strncasecmp(value, "'row", 4) ) { tiledim[0] = -1; } else if (!strncasecmp(value, "'whole", 6) ) { tiledim[0] = -1; tiledim[1] = -1; tiledim[2] = -1; } else { ffdtdm(infptr, value, 0,6, &naxis, tiledim, status); } /* set the desired tile size */ fits_set_tile_dim (outfptr, 6, tiledim, status); } else if (!strncmp(card+2, "QVALUE", 6) ) { /* set the desired Q quantization value */ qvalue = atof(value); fits_set_quantize_level (outfptr, (float) qvalue, status); } else if (!strncmp(card+2, "QMETHD", 6) ) { if (!strncasecmp(value, "'no_dither", 10) ) { ivalue = -1; /* just quantize, with no dithering */ } else if (!strncasecmp(value, "'subtractive_dither_1", 21) ) { ivalue = SUBTRACTIVE_DITHER_1; /* use subtractive dithering */ } else if (!strncasecmp(value, "'subtractive_dither_2", 21) ) { ivalue = SUBTRACTIVE_DITHER_2; /* dither, except preserve zero-valued pixels */ } else { ffpmsg("Unknown value for FZQUANT keyword: (set_compression_pref)"); ffpmsg(value); return(*status = DATA_COMPRESSION_ERR); } fits_set_quantize_method(outfptr, ivalue, status); } else if (!strncmp(card+2, "DTHRSD", 6) ) { if (!strncasecmp(value, "'checksum", 9) ) { ivalue = -1; /* use checksum of first tile */ } else if (!strncasecmp(value, "'clock", 6) ) { ivalue = 0; /* set dithering seed based on system clock */ } else { /* read integer value */ if (*value == '\'') ivalue = (int) atol(value+1); /* allow for leading quote character */ else ivalue = (int) atol(value+1); if (ivalue < 1 || ivalue > 10000) { ffpmsg("Invalid value for FZDTHRSD keyword: (set_compression_pref)"); ffpmsg(value); return(*status = DATA_COMPRESSION_ERR); } } /* set the desired dithering */ fits_set_dither_seed(outfptr, ivalue, status); } else if (!strncmp(card+2, "INT2F", 5) ) { /* set whether to convert integers to float then use lossy compression */ if (!strcasecmp(value, "t") ) { fits_set_lossy_int (outfptr, 1, status); } else if (!strcasecmp(value, "f") ) { fits_set_lossy_int (outfptr, 0, status); } else { ffpmsg("Unknown value for FZINT2F keyword: (set_compression_pref)"); ffpmsg(value); return(*status = DATA_COMPRESSION_ERR); } } else if (!strncmp(card+2, "HSCALE ", 6) ) { /* set the desired Hcompress scale value */ hscale = atof(value); fits_set_hcomp_scale (outfptr, hscale, status); } } } return(*status); } /*--------------------------------------------------------------------------*/ int fits_get_noise_bits(fitsfile *fptr, /* I - FITS file pointer */ int *noisebits, /* noise_bits parameter value */ /* (default = 4) */ int *status) /* IO - error status */ { /* ******************************************************************** ******************************************************************** THIS ROUTINE IS PROVIDED ONLY FOR BACKWARDS COMPATIBILITY; ALL NEW SOFTWARE SHOULD CALL fits_set_quantize_level INSTEAD ******************************************************************** ******************************************************************** This routine returns the value of the noice_bits parameter that should be used when compressing floating point images. The image is divided into tiles, and each tile is compressed and stored in a row of at variable length binary table column. Feb 2008: code changed to use the more general "quantize level" parameter rather than the "noise bits" parameter. If quantize level is greater than zero, then the previous noisebits parameter is approximately given by noise bits = natural logarithm (quantize level) / natural log (2) This result is rounded to the nearest integer. */ double qlevel; qlevel = (fptr->Fptr)->request_quantize_level; if (qlevel > 0. && qlevel < 65537. ) *noisebits = (int) ((log(qlevel) / log(2.0)) + 0.5); else *noisebits = 0; return(*status); } /*--------------------------------------------------------------------------*/ int fits_get_quantize_level(fitsfile *fptr, /* I - FITS file pointer */ float *qlevel, /* quantize level parameter value */ int *status) /* IO - error status */ { /* This routine returns the value of the noice_bits parameter that should be used when compressing floating point images. The image is divided into tiles, and each tile is compressed and stored in a row of at variable length binary table column. */ if ((fptr->Fptr)->request_quantize_level == NO_QUANTIZE) { *qlevel = 0; } else { *qlevel = (fptr->Fptr)->request_quantize_level; } return(*status); } /*--------------------------------------------------------------------------*/ int fits_get_dither_seed(fitsfile *fptr, /* I - FITS file pointer */ int *offset, /* dithering offset parameter value */ int *status) /* IO - error status */ { /* This routine returns the value of the dithering offset parameter that is used when compressing floating point images. The image is divided into tiles, and each tile is compressed and stored in a row of at variable length binary table column. */ *offset = (fptr->Fptr)->request_dither_seed; return(*status); }/*--------------------------------------------------------------------------*/ int fits_get_hcomp_scale(fitsfile *fptr, /* I - FITS file pointer */ float *scale, /* Hcompress scale parameter value */ int *status) /* IO - error status */ { /* This routine returns the value of the noice_bits parameter that should be used when compressing floating point images. The image is divided into tiles, and each tile is compressed and stored in a row of at variable length binary table column. */ *scale = (fptr->Fptr)->request_hcomp_scale; return(*status); } /*--------------------------------------------------------------------------*/ int fits_get_hcomp_smooth(fitsfile *fptr, /* I - FITS file pointer */ int *smooth, /* Hcompress smooth parameter value */ int *status) /* IO - error status */ { *smooth = (fptr->Fptr)->request_hcomp_smooth; return(*status); } /*--------------------------------------------------------------------------*/ int fits_img_compress(fitsfile *infptr, /* pointer to image to be compressed */ fitsfile *outfptr, /* empty HDU for output compressed image */ int *status) /* IO - error status */ /* This routine initializes the output table, copies all the keywords, and loops through the input image, compressing the data and writing the compressed tiles to the output table. This is a high level routine that is called by the fpack and funpack FITS compression utilities. */ { int bitpix, naxis; long naxes[MAX_COMPRESS_DIM]; /* int c1, c2, c3; */ if (*status > 0) return(*status); /* get datatype and size of input image */ if (fits_get_img_param(infptr, MAX_COMPRESS_DIM, &bitpix, &naxis, naxes, status) > 0) return(*status); if (naxis < 1 || naxis > MAX_COMPRESS_DIM) { ffpmsg("Image cannot be compressed: NAXIS out of range"); return(*status = BAD_NAXIS); } /* create a new empty HDU in the output file now, before setting the */ /* compression preferences. This HDU will become a binary table that */ /* contains the compressed image. If necessary, create a dummy primary */ /* array, which much precede the binary table extension. */ ffcrhd(outfptr, status); /* this does nothing if the output file is empty */ if ((outfptr->Fptr)->curhdu == 0) /* have to create dummy primary array */ { ffcrim(outfptr, 16, 0, NULL, status); ffcrhd(outfptr, status); } else { /* unset any compress parameter preferences that may have been set when closing the previous HDU in the output file */ fits_unset_compression_param(outfptr, status); } /* set any compress parameter preferences as given in the input file */ fits_set_compression_pref(infptr, outfptr, status); /* special case: the quantization level is not given by a keyword in */ /* the HDU header, so we have to explicitly copy the requested value */ /* to the actual value */ if ( (outfptr->Fptr)->request_quantize_level != 0.) (outfptr->Fptr)->quantize_level = (outfptr->Fptr)->request_quantize_level; /* if requested, treat integer images same as a float image. */ /* Then the pixels will be quantized (lossy algorithm) to achieve */ /* higher amounts of compression than with lossless algorithms */ if ( (outfptr->Fptr)->request_lossy_int_compress != 0 && bitpix > 0) bitpix = FLOAT_IMG; /* compress integer images as if float */ /* initialize output table */ if (imcomp_init_table(outfptr, bitpix, naxis, naxes, 0, status) > 0) return (*status); /* Copy the image header keywords to the table header. */ if (imcomp_copy_img2comp(infptr, outfptr, status) > 0) return (*status); /* turn off any intensity scaling (defined by BSCALE and BZERO */ /* keywords) so that unscaled values will be read by CFITSIO */ /* (except if quantizing an int image, same as a float image) */ if ( (outfptr->Fptr)->request_lossy_int_compress == 0 && bitpix > 0) ffpscl(infptr, 1.0, 0.0, status); /* force a rescan of the output file keywords, so that */ /* the compression parameters will be copied to the internal */ /* fitsfile structure used by CFITSIO */ ffrdef(outfptr, status); /* turn off any intensity scaling (defined by BSCALE and BZERO */ /* keywords) so that unscaled values will be written by CFITSIO */ /* (except if quantizing an int image, same as a float image) */ if ( (outfptr->Fptr)->request_lossy_int_compress == 0 && bitpix > 0) ffpscl(outfptr, 1.0, 0.0, status); /* Read each image tile, compress, and write to a table row. */ imcomp_compress_image (infptr, outfptr, status); /* force another rescan of the output file keywords, to */ /* update PCOUNT and TFORMn = '1PB(iii)' keyword values. */ ffrdef(outfptr, status); /* unset any previously set compress parameter preferences */ fits_unset_compression_request(outfptr, status); /* fits_get_case(&c1, &c2, &c3); printf("c1, c2, c3 = %d, %d, %d\n", c1, c2, c3); */ return (*status); } /*--------------------------------------------------------------------------*/ int imcomp_init_table(fitsfile *outfptr, int inbitpix, int naxis, long *naxes, int writebitpix, /* write the ZBITPIX, ZNAXIS, and ZNAXES keyword? */ int *status) /* create a BINTABLE extension for the output compressed image. */ { char keyname[FLEN_KEYWORD], zcmptype[12]; int ii, remain, ncols, bitpix; long nrows; char *ttype[] = {"COMPRESSED_DATA", "ZSCALE", "ZZERO"}; char *tform[3]; char tf0[4], tf1[4], tf2[4]; char *tunit[] = {"\0", "\0", "\0" }; char comm[FLEN_COMMENT]; long actual_tilesize[MAX_COMPRESS_DIM]; /* Actual size to use for tiles */ if (*status > 0) return(*status); /* check for special case of losslessly compressing floating point */ /* images. Only compression algorithm that supports this is GZIP */ if ( (outfptr->Fptr)->request_quantize_level == NO_QUANTIZE) { if (((outfptr->Fptr)->request_compress_type != GZIP_1) && ((outfptr->Fptr)->request_compress_type != GZIP_2)) { ffpmsg("Lossless compression of floating point images must use GZIP (imcomp_init_table)"); return(*status = DATA_COMPRESSION_ERR); } } /* set default compression parameter values, if undefined */ if ( (outfptr->Fptr)->request_compress_type == 0) { /* use RICE_1 by default */ (outfptr->Fptr)->request_compress_type = RICE_1; } if (inbitpix < 0 && (outfptr->Fptr)->request_quantize_level != NO_QUANTIZE) { /* set defaults for quantizing floating point images */ if ( (outfptr->Fptr)->request_quantize_method == 0) { /* set default dithering method */ (outfptr->Fptr)->request_quantize_method = SUBTRACTIVE_DITHER_1; } if ( (outfptr->Fptr)->request_quantize_level == 0) { if ((outfptr->Fptr)->request_quantize_method == NO_DITHER) { /* must use finer quantization if no dithering is done */ (outfptr->Fptr)->request_quantize_level = 16; } else { (outfptr->Fptr)->request_quantize_level = 4; } } } /* test for the 2 special cases that represent unsigned integers */ if (inbitpix == USHORT_IMG) bitpix = SHORT_IMG; else if (inbitpix == ULONG_IMG) bitpix = LONG_IMG; else if (inbitpix == SBYTE_IMG) bitpix = BYTE_IMG; else bitpix = inbitpix; /* reset default tile dimensions too if required */ memcpy(actual_tilesize, outfptr->Fptr->request_tilesize, MAX_COMPRESS_DIM * sizeof(long)); if ((outfptr->Fptr)->request_compress_type == HCOMPRESS_1) { if (naxis < 2 ) { ffpmsg("Hcompress cannot be used with 1-dimensional images (imcomp_init_table)"); return(*status = DATA_COMPRESSION_ERR); } else if (naxes[0] < 4 || naxes[1] < 4) { ffpmsg("Hcompress minimum image dimension is 4 pixels (imcomp_init_table)"); return(*status = DATA_COMPRESSION_ERR); } if ((actual_tilesize[0] <= 0) && (actual_tilesize[1] == -1) ){ /* compress the whole image as a single tile */ actual_tilesize[0] = naxes[0]; actual_tilesize[1] = naxes[1]; for (ii = 2; ii < naxis; ii++) { /* set all higher tile dimensions = 1 */ actual_tilesize[ii] = 1; } } else if ((actual_tilesize[0] <= 0) && (actual_tilesize[1] == 0 || actual_tilesize[1] == 1) ){ /* The Hcompress algorithm is inherently 2D in nature, so the row by row tiling that is used for other compression algorithms is not appropriate. If the image has less than 30 rows, then the entire image will be compressed as a single tile. Otherwise the tiles will consist of 16 rows of the image. This keeps the tiles to a reasonable size, and it also includes enough rows to allow good compression efficiency. If the last tile of the image happens to contain less than 4 rows, then find another tile size with between 14 and 30 rows (preferably even), so that the last tile has at least 4 rows */ /* 1st tile dimension is the row length of the image */ actual_tilesize[0] = naxes[0]; if (naxes[1] <= 30) { /* use whole image if it is small */ actual_tilesize[1] = naxes[1]; } else { /* look for another good tile dimension */ if (naxes[1] % 16 == 0 || naxes[1] % 16 > 3) { actual_tilesize[1] = 16; } else if (naxes[1] % 24 == 0 || naxes[1] % 24 > 3) { actual_tilesize[1] = 24; } else if (naxes[1] % 20 == 0 || naxes[1] % 20 > 3) { actual_tilesize[1] = 20; } else if (naxes[1] % 30 == 0 || naxes[1] % 30 > 3) { actual_tilesize[1] = 30; } else if (naxes[1] % 28 == 0 || naxes[1] % 28 > 3) { actual_tilesize[1] = 28; } else if (naxes[1] % 26 == 0 || naxes[1] % 26 > 3) { actual_tilesize[1] = 26; } else if (naxes[1] % 22 == 0 || naxes[1] % 22 > 3) { actual_tilesize[1] = 22; } else if (naxes[1] % 18 == 0 || naxes[1] % 18 > 3) { actual_tilesize[1] = 18; } else if (naxes[1] % 14 == 0 || naxes[1] % 14 > 3) { actual_tilesize[1] = 14; } else { actual_tilesize[1] = 17; } } } else if (actual_tilesize[0] < 4 || actual_tilesize[1] < 4) { /* user-specified tile size is too small */ ffpmsg("Hcompress minimum tile dimension is 4 pixels (imcomp_init_table)"); return(*status = DATA_COMPRESSION_ERR); } /* check if requested tile size causes the last tile to to have less than 4 pixels */ remain = naxes[0] % (actual_tilesize[0]); /* 1st dimension */ if (remain > 0 && remain < 4) { (actual_tilesize[0])++; /* try increasing tile size by 1 */ remain = naxes[0] % (actual_tilesize[0]); if (remain > 0 && remain < 4) { ffpmsg("Last tile along 1st dimension has less than 4 pixels (imcomp_init_table)"); return(*status = DATA_COMPRESSION_ERR); } } remain = naxes[1] % (actual_tilesize[1]); /* 2nd dimension */ if (remain > 0 && remain < 4) { (actual_tilesize[1])++; /* try increasing tile size by 1 */ remain = naxes[1] % (actual_tilesize[1]); if (remain > 0 && remain < 4) { ffpmsg("Last tile along 2nd dimension has less than 4 pixels (imcomp_init_table)"); return(*status = DATA_COMPRESSION_ERR); } } } /* end, if HCOMPRESS_1 */ for (ii = 0; ii < naxis; ii++) { if (ii == 0) { /* first axis is different */ if (actual_tilesize[ii] <= 0) { actual_tilesize[ii] = naxes[ii]; } } else { if (actual_tilesize[ii] < 0) { actual_tilesize[ii] = naxes[ii]; /* negative value maean use whole length */ } else if (actual_tilesize[ii] == 0) { actual_tilesize[ii] = 1; /* zero value means use default value = 1 */ } } } /* ---- set up array of TFORM strings -------------------------------*/ if ( (outfptr->Fptr)->request_huge_hdu != 0) { strcpy(tf0, "1QB"); } else { strcpy(tf0, "1PB"); } strcpy(tf1, "1D"); strcpy(tf2, "1D"); tform[0] = tf0; tform[1] = tf1; tform[2] = tf2; /* calculate number of rows in output table */ nrows = 1; for (ii = 0; ii < naxis; ii++) { nrows = nrows * ((naxes[ii] - 1)/ (actual_tilesize[ii]) + 1); } /* determine the default number of columns in the output table */ if (bitpix < 0 && (outfptr->Fptr)->request_quantize_level != NO_QUANTIZE) ncols = 3; /* quantized and scaled floating point image */ else ncols = 1; /* default table has just one 'COMPRESSED_DATA' column */ if ((outfptr->Fptr)->request_compress_type == RICE_1) { strcpy(zcmptype, "RICE_1"); } else if ((outfptr->Fptr)->request_compress_type == GZIP_1) { strcpy(zcmptype, "GZIP_1"); } else if ((outfptr->Fptr)->request_compress_type == GZIP_2) { strcpy(zcmptype, "GZIP_2"); } else if ((outfptr->Fptr)->request_compress_type == BZIP2_1) { strcpy(zcmptype, "BZIP2_1"); } else if ((outfptr->Fptr)->request_compress_type == PLIO_1) { strcpy(zcmptype, "PLIO_1"); /* the PLIO compression algorithm outputs short integers, not bytes */ if ( (outfptr->Fptr)->request_huge_hdu != 0) { strcpy(tform[0], "1QI"); } else { strcpy(tform[0], "1PI"); } } else if ((outfptr->Fptr)->request_compress_type == HCOMPRESS_1) { strcpy(zcmptype, "HCOMPRESS_1"); } else if ((outfptr->Fptr)->request_compress_type == NOCOMPRESS) { strcpy(zcmptype, "NOCOMPRESS"); } else { ffpmsg("unknown compression type (imcomp_init_table)"); return(*status = DATA_COMPRESSION_ERR); } /* create the bintable extension to contain the compressed image */ ffcrtb(outfptr, BINARY_TBL, nrows, ncols, ttype, tform, tunit, 0, status); /* Add standard header keywords. */ ffpkyl (outfptr, "ZIMAGE", 1, "extension contains compressed image", status); if (writebitpix) { /* write the keywords defining the datatype and dimensions of */ /* the uncompressed image. If not, these keywords will be */ /* copied later from the input uncompressed image */ ffpkyj (outfptr, "ZBITPIX", bitpix, "data type of original image", status); ffpkyj (outfptr, "ZNAXIS", naxis, "dimension of original image", status); for (ii = 0; ii < naxis; ii++) { sprintf (keyname, "ZNAXIS%d", ii+1); ffpkyj (outfptr, keyname, naxes[ii], "length of original image axis", status); } } for (ii = 0; ii < naxis; ii++) { sprintf (keyname, "ZTILE%d", ii+1); ffpkyj (outfptr, keyname, actual_tilesize[ii], "size of tiles to be compressed", status); } if (bitpix < 0) { if ((outfptr->Fptr)->request_quantize_level == NO_QUANTIZE) { ffpkys(outfptr, "ZQUANTIZ", "NONE", "Lossless compression without quantization", status); } else { /* Unless dithering has been specifically turned off by setting */ /* request_quantize_method = -1, use dithering by default */ /* when quantizing floating point images. */ if ( (outfptr->Fptr)->request_quantize_method == 0) (outfptr->Fptr)->request_quantize_method = SUBTRACTIVE_DITHER_1; if ((outfptr->Fptr)->request_quantize_method == SUBTRACTIVE_DITHER_1) { ffpkys(outfptr, "ZQUANTIZ", "SUBTRACTIVE_DITHER_1", "Pixel Quantization Algorithm", status); /* also write the associated ZDITHER0 keyword with a default value */ /* which may get updated later. */ ffpky(outfptr, TINT, "ZDITHER0", &((outfptr->Fptr)->request_dither_seed), "dithering offset when quantizing floats", status); } else if ((outfptr->Fptr)->request_quantize_method == SUBTRACTIVE_DITHER_2) { ffpkys(outfptr, "ZQUANTIZ", "SUBTRACTIVE_DITHER_2", "Pixel Quantization Algorithm", status); /* also write the associated ZDITHER0 keyword with a default value */ /* which may get updated later. */ ffpky(outfptr, TINT, "ZDITHER0", &((outfptr->Fptr)->request_dither_seed), "dithering offset when quantizing floats", status); if (!strcmp(zcmptype, "RICE_1")) { /* when using this new dithering method, change the compression type */ /* to an alias, so that old versions of funpack will not be able to */ /* created a corrupted uncompressed image. */ /* ******* can remove this cludge after about June 2015, after most old versions of fpack are gone */ strcpy(zcmptype, "RICE_ONE"); } } else if ((outfptr->Fptr)->request_quantize_method == NO_DITHER) { ffpkys(outfptr, "ZQUANTIZ", "NO_DITHER", "No dithering during quantization", status); } } } ffpkys (outfptr, "ZCMPTYPE", zcmptype, "compression algorithm", status); /* write any algorithm-specific keywords */ if ((outfptr->Fptr)->request_compress_type == RICE_1) { ffpkys (outfptr, "ZNAME1", "BLOCKSIZE", "compression block size", status); /* for now at least, the block size is always 32 */ ffpkyj (outfptr, "ZVAL1", 32, "pixels per block", status); ffpkys (outfptr, "ZNAME2", "BYTEPIX", "bytes per pixel (1, 2, 4, or 8)", status); if (bitpix == BYTE_IMG) ffpkyj (outfptr, "ZVAL2", 1, "bytes per pixel (1, 2, 4, or 8)", status); else if (bitpix == SHORT_IMG) ffpkyj (outfptr, "ZVAL2", 2, "bytes per pixel (1, 2, 4, or 8)", status); else ffpkyj (outfptr, "ZVAL2", 4, "bytes per pixel (1, 2, 4, or 8)", status); } else if ((outfptr->Fptr)->request_compress_type == HCOMPRESS_1) { ffpkys (outfptr, "ZNAME1", "SCALE", "HCOMPRESS scale factor", status); ffpkye (outfptr, "ZVAL1", (outfptr->Fptr)->request_hcomp_scale, 7, "HCOMPRESS scale factor", status); ffpkys (outfptr, "ZNAME2", "SMOOTH", "HCOMPRESS smooth option", status); ffpkyj (outfptr, "ZVAL2", (long) (outfptr->Fptr)->request_hcomp_smooth, "HCOMPRESS smooth option", status); } /* Write the BSCALE and BZERO keywords, if an unsigned integer image */ if (inbitpix == USHORT_IMG) { strcpy(comm, "offset data range to that of unsigned short"); ffpkyg(outfptr, "BZERO", 32768., 0, comm, status); strcpy(comm, "default scaling factor"); ffpkyg(outfptr, "BSCALE", 1.0, 0, comm, status); } else if (inbitpix == SBYTE_IMG) { strcpy(comm, "offset data range to that of signed byte"); ffpkyg(outfptr, "BZERO", -128., 0, comm, status); strcpy(comm, "default scaling factor"); ffpkyg(outfptr, "BSCALE", 1.0, 0, comm, status); } else if (inbitpix == ULONG_IMG) { strcpy(comm, "offset data range to that of unsigned long"); ffpkyg(outfptr, "BZERO", 2147483648., 0, comm, status); strcpy(comm, "default scaling factor"); ffpkyg(outfptr, "BSCALE", 1.0, 0, comm, status); } return(*status); } /*--------------------------------------------------------------------------*/ int imcomp_calc_max_elem (int comptype, int nx, int zbitpix, int blocksize) /* This function returns the maximum number of bytes in a compressed image line. nx = maximum number of pixels in a tile blocksize is only relevant for RICE compression */ { if (comptype == RICE_1) { if (zbitpix == 16) return (sizeof(short) * nx + nx / blocksize + 2 + 4); else return (sizeof(float) * nx + nx / blocksize + 2 + 4); } else if ((comptype == GZIP_1) || (comptype == GZIP_2)) { /* gzip usually compressed by at least a factor of 2 for I*4 images */ /* and somewhat less for I*2 images */ /* If this size turns out to be too small, then the gzip */ /* compression routine will allocate more space as required */ /* to be on the safe size, allocate buffer same size as input */ if (zbitpix == 16) return(nx * 2); else if (zbitpix == 8) return(nx); else return(nx * 4); } else if (comptype == BZIP2_1) { /* To guarantee that the compressed data will fit, allocate an output buffer of size 1% larger than the uncompressed data, plus 600 bytes */ return((int) (nx * 1.01 * zbitpix / 8. + 601.)); } else if (comptype == HCOMPRESS_1) { /* Imperical evidence suggests in the worst case, the compressed stream could be up to 10% larger than the original image. Add 26 byte overhead, only significant for very small tiles Possible improvement: may need to allow a larger size for 32-bit images */ if (zbitpix == 16 || zbitpix == 8) return( (int) (nx * 2.2 + 26)); /* will be compressing 16-bit int array */ else return( (int) (nx * 4.4 + 26)); /* will be compressing 32-bit int array */ } else return(nx * sizeof(int)); } /*--------------------------------------------------------------------------*/ int imcomp_compress_image (fitsfile *infptr, fitsfile *outfptr, int *status) /* This routine does the following: - reads an image one tile at a time - if it is a float or double image, then it tries to quantize the pixels into scaled integers. - it then compressess the integer pixels, or if the it was not possible to quantize the floating point pixels, then it losslessly compresses them with gzip - writes the compressed byte stream to the output FITS file */ { double *tiledata; int anynul, gotnulls = 0, datatype; long ii, row; int naxis; double dummy = 0., dblnull = DOUBLENULLVALUE; float fltnull = FLOATNULLVALUE; long maxtilelen, tilelen, incre[] = {1, 1, 1, 1, 1, 1}; long naxes[MAX_COMPRESS_DIM], fpixel[MAX_COMPRESS_DIM]; long lpixel[MAX_COMPRESS_DIM], tile[MAX_COMPRESS_DIM]; long tilesize[MAX_COMPRESS_DIM]; long i0, i1, i2, i3, i4, i5; char card[FLEN_CARD]; if (*status > 0) return(*status); maxtilelen = (outfptr->Fptr)->maxtilelen; /* Allocate buffer to hold 1 tile of data; size depends on which compression algorithm is used: Rice and GZIP will compress byte, short, or int arrays without conversion. PLIO requires 4-byte int values, so byte and short arrays must be converted to int. HCompress internally converts byte or short values to ints, and converts int values to 8-byte longlong integers. */ if ((outfptr->Fptr)->zbitpix == FLOAT_IMG) { datatype = TFLOAT; if ( (outfptr->Fptr)->compress_type == HCOMPRESS_1) { /* need twice as much scratch space (8 bytes per pixel) */ tiledata = (double*) malloc (maxtilelen * 2 *sizeof (float)); } else { tiledata = (double*) malloc (maxtilelen * sizeof (float)); } } else if ((outfptr->Fptr)->zbitpix == DOUBLE_IMG) { datatype = TDOUBLE; tiledata = (double*) malloc (maxtilelen * sizeof (double)); } else if ((outfptr->Fptr)->zbitpix == SHORT_IMG) { datatype = TSHORT; if ( (outfptr->Fptr)->compress_type == RICE_1 || (outfptr->Fptr)->compress_type == GZIP_1 || (outfptr->Fptr)->compress_type == GZIP_2 || (outfptr->Fptr)->compress_type == BZIP2_1 || (outfptr->Fptr)->compress_type == NOCOMPRESS) { /* only need buffer of I*2 pixels for gzip, bzip2, and Rice */ tiledata = (double*) malloc (maxtilelen * sizeof (short)); } else { /* need buffer of I*4 pixels for Hcompress and PLIO */ tiledata = (double*) malloc (maxtilelen * sizeof (int)); } } else if ((outfptr->Fptr)->zbitpix == BYTE_IMG) { datatype = TBYTE; if ( (outfptr->Fptr)->compress_type == RICE_1 || (outfptr->Fptr)->compress_type == BZIP2_1 || (outfptr->Fptr)->compress_type == GZIP_1 || (outfptr->Fptr)->compress_type == GZIP_2) { /* only need buffer of I*1 pixels for gzip, bzip2, and Rice */ tiledata = (double*) malloc (maxtilelen); } else { /* need buffer of I*4 pixels for Hcompress and PLIO */ tiledata = (double*) malloc (maxtilelen * sizeof (int)); } } else if ((outfptr->Fptr)->zbitpix == LONG_IMG) { datatype = TINT; if ( (outfptr->Fptr)->compress_type == HCOMPRESS_1) { /* need twice as much scratch space (8 bytes per pixel) */ tiledata = (double*) malloc (maxtilelen * 2 * sizeof (int)); } else { /* only need buffer of I*4 pixels for gzip, bzip2, Rice, and PLIO */ tiledata = (double*) malloc (maxtilelen * sizeof (int)); } } else { ffpmsg("Bad image datatype. (imcomp_compress_image)"); return (*status = MEMORY_ALLOCATION); } if (tiledata == NULL) { ffpmsg("Out of memory. (imcomp_compress_image)"); return (*status = MEMORY_ALLOCATION); } /* calculate size of tile in each dimension */ naxis = (outfptr->Fptr)->zndim; for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) { if (ii < naxis) { naxes[ii] = (outfptr->Fptr)->znaxis[ii]; tilesize[ii] = (outfptr->Fptr)->tilesize[ii]; } else { naxes[ii] = 1; tilesize[ii] = 1; } } row = 1; /* set up big loop over up to 6 dimensions */ for (i5 = 1; i5 <= naxes[5]; i5 += tilesize[5]) { fpixel[5] = i5; lpixel[5] = minvalue(i5 + tilesize[5] - 1, naxes[5]); tile[5] = lpixel[5] - fpixel[5] + 1; for (i4 = 1; i4 <= naxes[4]; i4 += tilesize[4]) { fpixel[4] = i4; lpixel[4] = minvalue(i4 + tilesize[4] - 1, naxes[4]); tile[4] = lpixel[4] - fpixel[4] + 1; for (i3 = 1; i3 <= naxes[3]; i3 += tilesize[3]) { fpixel[3] = i3; lpixel[3] = minvalue(i3 + tilesize[3] - 1, naxes[3]); tile[3] = lpixel[3] - fpixel[3] + 1; for (i2 = 1; i2 <= naxes[2]; i2 += tilesize[2]) { fpixel[2] = i2; lpixel[2] = minvalue(i2 + tilesize[2] - 1, naxes[2]); tile[2] = lpixel[2] - fpixel[2] + 1; for (i1 = 1; i1 <= naxes[1]; i1 += tilesize[1]) { fpixel[1] = i1; lpixel[1] = minvalue(i1 + tilesize[1] - 1, naxes[1]); tile[1] = lpixel[1] - fpixel[1] + 1; for (i0 = 1; i0 <= naxes[0]; i0 += tilesize[0]) { fpixel[0] = i0; lpixel[0] = minvalue(i0 + tilesize[0] - 1, naxes[0]); tile[0] = lpixel[0] - fpixel[0] + 1; /* number of pixels in this tile */ tilelen = tile[0]; for (ii = 1; ii < naxis; ii++) { tilelen *= tile[ii]; } /* read next tile of data from image */ anynul = 0; if (datatype == TFLOAT) { ffgsve(infptr, 1, naxis, naxes, fpixel, lpixel, incre, FLOATNULLVALUE, (float *) tiledata, &anynul, status); } else if (datatype == TDOUBLE) { ffgsvd(infptr, 1, naxis, naxes, fpixel, lpixel, incre, DOUBLENULLVALUE, tiledata, &anynul, status); } else if (datatype == TINT) { ffgsvk(infptr, 1, naxis, naxes, fpixel, lpixel, incre, 0, (int *) tiledata, &anynul, status); } else if (datatype == TSHORT) { ffgsvi(infptr, 1, naxis, naxes, fpixel, lpixel, incre, 0, (short *) tiledata, &anynul, status); } else if (datatype == TBYTE) { ffgsvb(infptr, 1, naxis, naxes, fpixel, lpixel, incre, 0, (unsigned char *) tiledata, &anynul, status); } else { ffpmsg("Error bad datatype of image tile to compress"); free(tiledata); return (*status); } /* now compress the tile, and write to row of binary table */ /* NOTE: we don't have to worry about the presence of null values in the array if it is an integer array: the null value is simply encoded in the compressed array just like any other pixel value. If it is a floating point array, then we need to check for null only if the anynul parameter returned a true value when reading the tile */ if (anynul && datatype == TFLOAT) { imcomp_compress_tile(outfptr, row, datatype, tiledata, tilelen, tile[0], tile[1], 1, &fltnull, status); } else if (anynul && datatype == TDOUBLE) { imcomp_compress_tile(outfptr, row, datatype, tiledata, tilelen, tile[0], tile[1], 1, &dblnull, status); } else { imcomp_compress_tile(outfptr, row, datatype, tiledata, tilelen, tile[0], tile[1], 0, &dummy, status); } /* set flag if we found any null values */ if (anynul) gotnulls = 1; /* check for any error in the previous operations */ if (*status > 0) { ffpmsg("Error writing compressed image to table"); free(tiledata); return (*status); } row++; } } } } } } free (tiledata); /* finished with this buffer */ /* insert ZBLANK keyword if necessary; only for TFLOAT or TDOUBLE images */ if (gotnulls) { ffgcrd(outfptr, "ZCMPTYPE", card, status); ffikyj(outfptr, "ZBLANK", COMPRESS_NULL_VALUE, "null value in the compressed integer array", status); } return (*status); } /*--------------------------------------------------------------------------*/ int imcomp_compress_tile (fitsfile *outfptr, long row, /* tile number = row in the binary table that holds the compressed data */ int datatype, void *tiledata, long tilelen, long tilenx, long tileny, int nullcheck, void *nullflagval, int *status) /* This is the main compression routine. This routine does the following to the input tile of pixels: - if it is a float or double image, then it quantizes the pixels - compresses the integer pixel values - writes the compressed byte stream to the FITS file. If the tile cannot be quantized than the raw float or double values are losslessly compressed with gzip and then written to the output table. This input array may be modified by this routine. If the array is of type TINT or TFLOAT, and the compression type is HCOMPRESS, then it must have been allocated to be twice as large (8 bytes per pixel) to provide scratch space. Note that this routine does not fully support the implicit datatype conversion that is supported when writing to normal FITS images. The datatype of the input array must have the same datatype (either signed or unsigned) as the output (compressed) FITS image in some cases. */ { int *idata; /* quantized integer data */ int cn_zblank, zbitpix, nullval; int flag = 1; /* true by default; only = 0 if float data couldn't be quantized */ int intlength; /* size of integers to be compressed */ double scale, zero, actual_bzero; long ii; size_t clen; /* size of cbuf */ short *cbuf; /* compressed data */ int nelem = 0; /* number of bytes */ int tilecol; size_t gzip_nelem = 0; unsigned int bzlen; int ihcompscale; float hcompscale; double noise2, noise3, noise5; double bscale[1] = {1.}, bzero[1] = {0.}; /* scaling parameters */ long hcomp_len; LONGLONG *lldata; if (*status > 0) return(*status); /* check for special case of losslessly compressing floating point */ /* images. Only compression algorithm that supports this is GZIP */ if ( (outfptr->Fptr)->quantize_level == NO_QUANTIZE) { if (((outfptr->Fptr)->compress_type != GZIP_1) && ((outfptr->Fptr)->compress_type != GZIP_2)) { ffpmsg("Lossless compression of floating point images must use GZIP (imcomp_compress_tile)"); return(*status = DATA_COMPRESSION_ERR); } } /* free the previously saved tile if the input tile is for the same row */ if ((outfptr->Fptr)->tilerow) { /* has the tile cache been allocated? */ /* calculate the column bin of the compressed tile */ tilecol = (row - 1) % ((long)(((outfptr->Fptr)->znaxis[0] - 1) / ((outfptr->Fptr)->tilesize[0])) + 1); if ((outfptr->Fptr)->tilerow[tilecol] == row) { if (((outfptr->Fptr)->tiledata)[tilecol]) { free(((outfptr->Fptr)->tiledata)[tilecol]); } if (((outfptr->Fptr)->tilenullarray)[tilecol]) { free(((outfptr->Fptr)->tilenullarray)[tilecol]); } ((outfptr->Fptr)->tiledata)[tilecol] = 0; ((outfptr->Fptr)->tilenullarray)[tilecol] = 0; (outfptr->Fptr)->tilerow[tilecol] = 0; (outfptr->Fptr)->tiledatasize[tilecol] = 0; (outfptr->Fptr)->tiletype[tilecol] = 0; (outfptr->Fptr)->tileanynull[tilecol] = 0; } } if ( (outfptr->Fptr)->compress_type == NOCOMPRESS) { /* Special case when using NOCOMPRESS for diagnostic purposes in fpack */ if (imcomp_write_nocompress_tile(outfptr, row, datatype, tiledata, tilelen, nullcheck, nullflagval, status) > 0) { return(*status); } return(*status); } /* =========================================================================== */ /* initialize various parameters */ idata = (int *) tiledata; /* may overwrite the input tiledata in place */ /* zbitpix is the BITPIX keyword value in the uncompressed FITS image */ zbitpix = (outfptr->Fptr)->zbitpix; /* if the tile/image has an integer datatype, see if a null value has */ /* been defined (with the BLANK keyword in a normal FITS image). */ /* If so, and if the input tile array also contains null pixels, */ /* (represented by pixels that have a value = nullflagval) then */ /* any pixels whose value = nullflagval, must be set to the value = nullval */ /* before the pixel array is compressed. These null pixel values must */ /* not be inverse scaled by the BSCALE/BZERO values, if present. */ cn_zblank = (outfptr->Fptr)->cn_zblank; nullval = (outfptr->Fptr)->zblank; if (zbitpix > 0 && cn_zblank != -1) /* If the integer image has no defined null */ nullcheck = 0; /* value, then don't bother checking input array for nulls. */ /* if the BSCALE and BZERO keywords exist, then the input values must */ /* be inverse scaled by this factor, before the values are compressed. */ /* (The program may have turned off scaling, which over rides the keywords) */ scale = (outfptr->Fptr)->cn_bscale; zero = (outfptr->Fptr)->cn_bzero; actual_bzero = (outfptr->Fptr)->cn_actual_bzero; /* =========================================================================== */ /* prepare the tile of pixel values for compression */ if (datatype == TSHORT) { imcomp_convert_tile_tshort(outfptr, tiledata, tilelen, nullcheck, nullflagval, nullval, zbitpix, scale, zero, actual_bzero, &intlength, status); } else if (datatype == TUSHORT) { imcomp_convert_tile_tushort(outfptr, tiledata, tilelen, nullcheck, nullflagval, nullval, zbitpix, scale, zero, &intlength, status); } else if (datatype == TBYTE) { imcomp_convert_tile_tbyte(outfptr, tiledata, tilelen, nullcheck, nullflagval, nullval, zbitpix, scale, zero, &intlength, status); } else if (datatype == TSBYTE) { imcomp_convert_tile_tsbyte(outfptr, tiledata, tilelen, nullcheck, nullflagval, nullval, zbitpix, scale, zero, &intlength, status); } else if (datatype == TINT) { imcomp_convert_tile_tint(outfptr, tiledata, tilelen, nullcheck, nullflagval, nullval, zbitpix, scale, zero, &intlength, status); } else if (datatype == TUINT) { imcomp_convert_tile_tuint(outfptr, tiledata, tilelen, nullcheck, nullflagval, nullval, zbitpix, scale, zero, &intlength, status); } else if (datatype == TLONG && sizeof(long) == 8) { ffpmsg("Integer*8 Long datatype is not supported when writing to compressed images"); return(*status = BAD_DATATYPE); } else if (datatype == TULONG && sizeof(long) == 8) { ffpmsg("Unsigned integer*8 datatype is not supported when writing to compressed images"); return(*status = BAD_DATATYPE); } else if (datatype == TFLOAT) { imcomp_convert_tile_tfloat(outfptr, row, tiledata, tilelen, tilenx, tileny, nullcheck, nullflagval, nullval, zbitpix, scale, zero, &intlength, &flag, bscale, bzero, status); } else if (datatype == TDOUBLE) { imcomp_convert_tile_tdouble(outfptr, row, tiledata, tilelen, tilenx, tileny, nullcheck, nullflagval, nullval, zbitpix, scale, zero, &intlength, &flag, bscale, bzero, status); } else { ffpmsg("unsupported image datatype (imcomp_compress_tile)"); return(*status = BAD_DATATYPE); } if (*status > 0) return(*status); /* return if error occurs */ /* =========================================================================== */ if (flag) /* now compress the integer data array */ { /* allocate buffer for the compressed tile bytes */ clen = (outfptr->Fptr)->maxelem; cbuf = (short *) calloc (clen, sizeof (unsigned char)); if (cbuf == NULL) { ffpmsg("Memory allocation failure. (imcomp_compress_tile)"); return (*status = MEMORY_ALLOCATION); } /* =========================================================================== */ if ( (outfptr->Fptr)->compress_type == RICE_1) { if (intlength == 2) { nelem = fits_rcomp_short ((short *)idata, tilelen, (unsigned char *) cbuf, clen, (outfptr->Fptr)->rice_blocksize); } else if (intlength == 1) { nelem = fits_rcomp_byte ((signed char *)idata, tilelen, (unsigned char *) cbuf, clen, (outfptr->Fptr)->rice_blocksize); } else { nelem = fits_rcomp (idata, tilelen, (unsigned char *) cbuf, clen, (outfptr->Fptr)->rice_blocksize); } if (nelem < 0) /* data compression error condition */ { free (cbuf); ffpmsg("error Rice compressing image tile (imcomp_compress_tile)"); return (*status = DATA_COMPRESSION_ERR); } /* Write the compressed byte stream. */ ffpclb(outfptr, (outfptr->Fptr)->cn_compressed, row, 1, nelem, (unsigned char *) cbuf, status); } /* =========================================================================== */ else if ( (outfptr->Fptr)->compress_type == PLIO_1) { for (ii = 0; ii < tilelen; ii++) { if (idata[ii] < 0 || idata[ii] > 16777215) { /* plio algorithn only supports positive 24 bit ints */ ffpmsg("data out of range for PLIO compression (0 - 2**24)"); return(*status = DATA_COMPRESSION_ERR); } } nelem = pl_p2li (idata, 1, cbuf, tilelen); if (nelem < 0) /* data compression error condition */ { free (cbuf); ffpmsg("error PLIO compressing image tile (imcomp_compress_tile)"); return (*status = DATA_COMPRESSION_ERR); } /* Write the compressed byte stream. */ ffpcli(outfptr, (outfptr->Fptr)->cn_compressed, row, 1, nelem, cbuf, status); } /* =========================================================================== */ else if ( ((outfptr->Fptr)->compress_type == GZIP_1) || ((outfptr->Fptr)->compress_type == GZIP_2) ) { if ((outfptr->Fptr)->quantize_level == NO_QUANTIZE && datatype == TFLOAT) { /* Special case of losslessly compressing floating point pixels with GZIP */ /* In this case we compress the input tile array directly */ #if BYTESWAPPED ffswap4((int*) tiledata, tilelen); #endif if ( (outfptr->Fptr)->compress_type == GZIP_2 ) fits_shuffle_4bytes((char *) tiledata, tilelen, status); compress2mem_from_mem((char *) tiledata, tilelen * sizeof(float), (char **) &cbuf, &clen, realloc, &gzip_nelem, status); } else if ((outfptr->Fptr)->quantize_level == NO_QUANTIZE && datatype == TDOUBLE) { /* Special case of losslessly compressing double pixels with GZIP */ /* In this case we compress the input tile array directly */ #if BYTESWAPPED ffswap8((double *) tiledata, tilelen); #endif if ( (outfptr->Fptr)->compress_type == GZIP_2 ) fits_shuffle_8bytes((char *) tiledata, tilelen, status); compress2mem_from_mem((char *) tiledata, tilelen * sizeof(double), (char **) &cbuf, &clen, realloc, &gzip_nelem, status); } else { /* compress the integer idata array */ #if BYTESWAPPED if (intlength == 2) ffswap2((short *) idata, tilelen); else if (intlength == 4) ffswap4(idata, tilelen); #endif if (intlength == 2) { if ( (outfptr->Fptr)->compress_type == GZIP_2 ) fits_shuffle_2bytes((char *) tiledata, tilelen, status); compress2mem_from_mem((char *) idata, tilelen * sizeof(short), (char **) &cbuf, &clen, realloc, &gzip_nelem, status); } else if (intlength == 1) { compress2mem_from_mem((char *) idata, tilelen * sizeof(unsigned char), (char **) &cbuf, &clen, realloc, &gzip_nelem, status); } else { if ( (outfptr->Fptr)->compress_type == GZIP_2 ) fits_shuffle_4bytes((char *) tiledata, tilelen, status); compress2mem_from_mem((char *) idata, tilelen * sizeof(int), (char **) &cbuf, &clen, realloc, &gzip_nelem, status); } } /* Write the compressed byte stream. */ ffpclb(outfptr, (outfptr->Fptr)->cn_compressed, row, 1, gzip_nelem, (unsigned char *) cbuf, status); /* =========================================================================== */ } else if ( (outfptr->Fptr)->compress_type == BZIP2_1) { #if BYTESWAPPED if (intlength == 2) ffswap2((short *) idata, tilelen); else if (intlength == 4) ffswap4(idata, tilelen); #endif bzlen = (unsigned int) clen; /* call bzip2 with blocksize = 900K, verbosity = 0, and default workfactor */ /* bzip2 is not supported in the public release. This is only for test purposes. if (BZ2_bzBuffToBuffCompress( (char *) cbuf, &bzlen, (char *) idata, (unsigned int) (tilelen * intlength), 9, 0, 0) ) */ { ffpmsg("bzip2 compression error"); return(*status = DATA_COMPRESSION_ERR); } /* Write the compressed byte stream. */ ffpclb(outfptr, (outfptr->Fptr)->cn_compressed, row, 1, bzlen, (unsigned char *) cbuf, status); /* =========================================================================== */ } else if ( (outfptr->Fptr)->compress_type == HCOMPRESS_1) { /* if hcompscale is positive, then we have to multiply the value by the RMS background noise to get the absolute scale value. If negative, then it gives the absolute scale value directly. */ hcompscale = (outfptr->Fptr)->hcomp_scale; if (hcompscale > 0.) { fits_img_stats_int(idata, tilenx, tileny, nullcheck, nullval, 0,0,0,0,0,0,&noise2,&noise3,&noise5,status); /* use the minimum of the 3 noise estimates */ if (noise2 != 0. && noise2 < noise3) noise3 = noise2; if (noise5 != 0. && noise5 < noise3) noise3 = noise5; hcompscale = (float) (hcompscale * noise3); } else if (hcompscale < 0.) { hcompscale = hcompscale * -1.0F; } ihcompscale = (int) (hcompscale + 0.5); hcomp_len = clen; /* allocated size of the buffer */ if (zbitpix == BYTE_IMG || zbitpix == SHORT_IMG) { fits_hcompress(idata, tilenx, tileny, ihcompscale, (char *) cbuf, &hcomp_len, status); } else { /* have to convert idata to an I*8 array, in place */ /* idata must have been allocated large enough to do this */ lldata = (LONGLONG *) idata; for (ii = tilelen - 1; ii >= 0; ii--) { lldata[ii] = idata[ii]; } fits_hcompress64(lldata, tilenx, tileny, ihcompscale, (char *) cbuf, &hcomp_len, status); } /* Write the compressed byte stream. */ ffpclb(outfptr, (outfptr->Fptr)->cn_compressed, row, 1, hcomp_len, (unsigned char *) cbuf, status); } /* =========================================================================== */ if ((outfptr->Fptr)->cn_zscale > 0) { /* write the linear scaling parameters for this tile */ ffpcld (outfptr, (outfptr->Fptr)->cn_zscale, row, 1, 1, bscale, status); ffpcld (outfptr, (outfptr->Fptr)->cn_zzero, row, 1, 1, bzero, status); } free(cbuf); /* finished with this buffer */ /* =========================================================================== */ } else { /* if flag == 0., floating point data couldn't be quantized */ /* losslessly compress the data with gzip. */ /* if gzip2 compressed data column doesn't exist, create it */ if ((outfptr->Fptr)->cn_gzip_data < 1) { if ( (outfptr->Fptr)->request_huge_hdu != 0) { fits_insert_col(outfptr, 999, "GZIP_COMPRESSED_DATA", "1QB", status); } else { fits_insert_col(outfptr, 999, "GZIP_COMPRESSED_DATA", "1PB", status); } if (*status <= 0) /* save the number of this column */ ffgcno(outfptr, CASEINSEN, "GZIP_COMPRESSED_DATA", &(outfptr->Fptr)->cn_gzip_data, status); } if (datatype == TFLOAT) { /* allocate buffer for the compressed tile bytes */ /* make it 10% larger than the original uncompressed data */ clen = tilelen * sizeof(float) * 1.1; cbuf = (short *) calloc (clen, sizeof (unsigned char)); if (cbuf == NULL) { ffpmsg("Memory allocation error. (imcomp_compress_tile)"); return (*status = MEMORY_ALLOCATION); } /* convert null values to NaNs in place, if necessary */ if (nullcheck == 1) { imcomp_float2nan((float *) tiledata, tilelen, (int *) tiledata, *(float *) (nullflagval), status); } #if BYTESWAPPED ffswap4((int*) tiledata, tilelen); #endif compress2mem_from_mem((char *) tiledata, tilelen * sizeof(float), (char **) &cbuf, &clen, realloc, &gzip_nelem, status); } else if (datatype == TDOUBLE) { /* allocate buffer for the compressed tile bytes */ /* make it 10% larger than the original uncompressed data */ clen = tilelen * sizeof(double) * 1.1; cbuf = (short *) calloc (clen, sizeof (unsigned char)); if (cbuf == NULL) { ffpmsg("Memory allocation error. (imcomp_compress_tile)"); return (*status = MEMORY_ALLOCATION); } /* convert null values to NaNs in place, if necessary */ if (nullcheck == 1) { imcomp_double2nan((double *) tiledata, tilelen, (LONGLONG *) tiledata, *(double *) (nullflagval), status); } #if BYTESWAPPED ffswap8((double*) tiledata, tilelen); #endif compress2mem_from_mem((char *) tiledata, tilelen * sizeof(double), (char **) &cbuf, &clen, realloc, &gzip_nelem, status); } /* Write the compressed byte stream. */ ffpclb(outfptr, (outfptr->Fptr)->cn_gzip_data, row, 1, gzip_nelem, (unsigned char *) cbuf, status); free(cbuf); /* finished with this buffer */ } return(*status); } /*--------------------------------------------------------------------------*/ int imcomp_write_nocompress_tile(fitsfile *outfptr, long row, int datatype, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int *status) { char coltype[4]; /* Write the uncompressed image tile pixels to the tile-compressed image file. */ /* This is a special case when using NOCOMPRESS for diagnostic purposes in fpack. */ /* Currently, this only supports a limited number of data types and */ /* does not fully support null-valued pixels in the image. */ if ((outfptr->Fptr)->cn_uncompressed < 1) { /* uncompressed data column doesn't exist, so append new column to table */ if (datatype == TSHORT) { strcpy(coltype, "1PI"); } else if (datatype == TINT) { strcpy(coltype, "1PJ"); } else if (datatype == TFLOAT) { strcpy(coltype, "1PE"); } else { ffpmsg("NOCOMPRESSION option only supported for int*2, int*4, and float*4 images"); return(*status = DATA_COMPRESSION_ERR); } fits_insert_col(outfptr, 999, "UNCOMPRESSED_DATA", coltype, status); /* create column */ } fits_get_colnum(outfptr, CASEINSEN, "UNCOMPRESSED_DATA", &(outfptr->Fptr)->cn_uncompressed, status); /* save col. num. */ fits_write_col(outfptr, datatype, (outfptr->Fptr)->cn_uncompressed, row, 1, tilelen, tiledata, status); /* write the tile data */ return (*status); } /*--------------------------------------------------------------------------*/ int imcomp_convert_tile_tshort( fitsfile *outfptr, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, double actual_bzero, int *intlength, int *status) { /* Prepare the input tile array of pixels for compression. /* Convert input integer*2 tile array in place to 4 or 8-byte ints for compression, */ /* If needed, convert 4 or 8-byte ints and do null value substitution. */ /* Note that the calling routine must have allocated the input array big enough */ /* to be able to do this. */ short *sbuff; int flagval, *idata; long ii; /* We only support writing this integer*2 tile data to a FITS image with BITPIX = 16 and with BZERO = 0 and BSCALE = 1. */ if (zbitpix != SHORT_IMG || scale != 1.0 || zero != 0.0) { ffpmsg("Datatype conversion/scaling is not supported when writing to compressed images"); return(*status = DATA_COMPRESSION_ERR); } sbuff = (short *) tiledata; idata = (int *) tiledata; if ( (outfptr->Fptr)->compress_type == RICE_1 || (outfptr->Fptr)->compress_type == GZIP_1 || (outfptr->Fptr)->compress_type == GZIP_2 || (outfptr->Fptr)->compress_type == BZIP2_1 ) { /* don't have to convert to int if using gzip, bzip2 or Rice compression */ *intlength = 2; if (nullcheck == 1) { /* reset pixels equal to flagval to the FITS null value, prior to compression */ flagval = *(short *) (nullflagval); if (flagval != nullval) { for (ii = tilelen - 1; ii >= 0; ii--) { if (sbuff[ii] == (short) flagval) sbuff[ii] = (short) nullval; } } } } else if ((outfptr->Fptr)->compress_type == HCOMPRESS_1) { /* have to convert to int if using HCOMPRESS */ *intlength = 4; if (nullcheck == 1) { /* reset pixels equal to flagval to the FITS null value, prior to compression */ flagval = *(short *) (nullflagval); for (ii = tilelen - 1; ii >= 0; ii--) { if (sbuff[ii] == (short) flagval) idata[ii] = nullval; else idata[ii] = (int) sbuff[ii]; } } else { /* just do the data type conversion to int */ for (ii = tilelen - 1; ii >= 0; ii--) idata[ii] = (int) sbuff[ii]; } } else { /* have to convert to int if using PLIO */ *intlength = 4; if (zero == 0. && actual_bzero == 32768.) { /* Here we are compressing unsigned 16-bit integers that have */ /* been offset by -32768 using the standard FITS convention. */ /* Since PLIO cannot deal with negative values, we must apply */ /* the shift of 32786 to the values to make them all positive. */ /* The inverse negative shift will be applied in */ /* imcomp_decompress_tile when reading the compressed tile. */ if (nullcheck == 1) { /* reset pixels equal to flagval to the FITS null value, prior to compression */ flagval = *(short *) (nullflagval); for (ii = tilelen - 1; ii >= 0; ii--) { if (sbuff[ii] == (short) flagval) idata[ii] = nullval; else idata[ii] = (int) sbuff[ii] + 32768; } } else { /* just do the data type conversion to int */ for (ii = tilelen - 1; ii >= 0; ii--) idata[ii] = (int) sbuff[ii] + 32768; } } else { /* This is not an unsigned 16-bit integer array, so process normally */ if (nullcheck == 1) { /* reset pixels equal to flagval to the FITS null value, prior to compression */ flagval = *(short *) (nullflagval); for (ii = tilelen - 1; ii >= 0; ii--) { if (sbuff[ii] == (short) flagval) idata[ii] = nullval; else idata[ii] = (int) sbuff[ii]; } } else { /* just do the data type conversion to int */ for (ii = tilelen - 1; ii >= 0; ii--) idata[ii] = (int) sbuff[ii]; } } } return(*status); } /*--------------------------------------------------------------------------*/ int imcomp_convert_tile_tushort( fitsfile *outfptr, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *status) { /* Prepare the input tile array of pixels for compression. /* Convert input unsigned integer*2 tile array in place to 4 or 8-byte ints for compression, */ /* If needed, convert 4 or 8-byte ints and do null value substitution. */ /* Note that the calling routine must have allocated the input array big enough */ /* to be able to do this. */ unsigned short *usbuff; short *sbuff; int flagval, *idata; long ii; /* datatype of input array is unsigned short. We only support writing this datatype to a FITS image with BITPIX = 16 and with BZERO = 0 and BSCALE = 32768. */ if (zbitpix != SHORT_IMG || scale != 1.0 || zero != 32768.) { ffpmsg("Implicit datatype conversion is not supported when writing to compressed images"); return(*status = DATA_COMPRESSION_ERR); } usbuff = (unsigned short *) tiledata; sbuff = (short *) tiledata; idata = (int *) tiledata; if ((outfptr->Fptr)->compress_type == RICE_1 || (outfptr->Fptr)->compress_type == GZIP_1 || (outfptr->Fptr)->compress_type == GZIP_2 || (outfptr->Fptr)->compress_type == BZIP2_1) { /* don't have to convert to int if using gzip, bzip2, or Rice compression */ *intlength = 2; /* offset the unsigned value by -32768 to a signed short value. */ /* It is more efficient to do this by just flipping the most significant of the 16 bits */ if (nullcheck == 1) { /* reset pixels equal to flagval to the FITS null value, prior to compression */ flagval = *(unsigned short *) (nullflagval); for (ii = tilelen - 1; ii >= 0; ii--) { if (usbuff[ii] == (unsigned short) flagval) sbuff[ii] = (short) nullval; else usbuff[ii] = (usbuff[ii]) ^ 0x8000; } } else { /* just offset the pixel values by 32768 (by flipping the MSB */ for (ii = tilelen - 1; ii >= 0; ii--) usbuff[ii] = (usbuff[ii]) ^ 0x8000; } } else { /* have to convert to int if using HCOMPRESS or PLIO */ *intlength = 4; if (nullcheck == 1) { /* offset the pixel values by 32768, and */ /* reset pixels equal to flagval to nullval */ flagval = *(unsigned short *) (nullflagval); for (ii = tilelen - 1; ii >= 0; ii--) { if (usbuff[ii] == (unsigned short) flagval) idata[ii] = nullval; else idata[ii] = ((int) usbuff[ii]) - 32768; } } else { /* just do the data type conversion to int */ for (ii = tilelen - 1; ii >= 0; ii--) idata[ii] = ((int) usbuff[ii]) - 32768; } } return(*status); } /*--------------------------------------------------------------------------*/ int imcomp_convert_tile_tint( fitsfile *outfptr, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *status) { /* Prepare the input tile array of pixels for compression. /* Convert input integer tile array in place to 4 or 8-byte ints for compression, */ /* If needed, do null value substitution. */ int flagval, *idata; long ii; /* datatype of input array is int. We only support writing this datatype to a FITS image with BITPIX = 32 and with BZERO = 0 and BSCALE = 1. */ if (zbitpix != LONG_IMG || scale != 1.0 || zero != 0.) { ffpmsg("Implicit datatype conversion is not supported when writing to compressed images"); return(*status = DATA_COMPRESSION_ERR); } idata = (int *) tiledata; *intlength = 4; if (nullcheck == 1) { /* no datatype conversion is required for any of the compression algorithms, except possibly for HCOMPRESS (to I*8), which is handled later. Just reset pixels equal to flagval to the FITS null value */ flagval = *(int *) (nullflagval); if (flagval != nullval) { for (ii = tilelen - 1; ii >= 0; ii--) { if (idata[ii] == flagval) idata[ii] = nullval; } } } return(*status); } /*--------------------------------------------------------------------------*/ int imcomp_convert_tile_tuint( fitsfile *outfptr, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *status) { /* Prepare the input tile array of pixels for compression. /* Convert input unsigned integer tile array in place to 4 or 8-byte ints for compression, */ /* If needed, do null value substitution. */ int flagval, *idata; unsigned int *uintbuff, uintflagval; long ii; /* datatype of input array is unsigned int. We only support writing this datatype to a FITS image with BITPIX = 32 and with BZERO = 0 and BSCALE = 2147483648. */ if (zbitpix != LONG_IMG || scale != 1.0 || zero != 2147483648.) { ffpmsg("Implicit datatype conversion is not supported when writing to compressed images"); return(*status = DATA_COMPRESSION_ERR); } *intlength = 4; idata = (int *) tiledata; uintbuff = (unsigned int *) tiledata; /* offset the unsigned value by -2147483648 to a signed int value. */ /* It is more efficient to do this by just flipping the most significant of the 32 bits */ if (nullcheck == 1) { /* reset pixels equal to flagval to nullval and */ /* offset the other pixel values (by flipping the MSB) */ uintflagval = *(unsigned int *) (nullflagval); for (ii = tilelen - 1; ii >= 0; ii--) { if (uintbuff[ii] == uintflagval) idata[ii] = nullval; else uintbuff[ii] = (uintbuff[ii]) ^ 0x80000000; } } else { /* just offset the pixel values (by flipping the MSB) */ for (ii = tilelen - 1; ii >= 0; ii--) uintbuff[ii] = (uintbuff[ii]) ^ 0x80000000; } return(*status); } /*--------------------------------------------------------------------------*/ int imcomp_convert_tile_tbyte( fitsfile *outfptr, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *status) { /* Prepare the input tile array of pixels for compression. /* Convert input unsigned integer*1 tile array in place to 4 or 8-byte ints for compression, */ /* If needed, convert 4 or 8-byte ints and do null value substitution. */ /* Note that the calling routine must have allocated the input array big enough */ /* to be able to do this. */ int flagval, *idata; long ii; unsigned char *usbbuff; /* datatype of input array is unsigned byte. We only support writing this datatype to a FITS image with BITPIX = 8 and with BZERO = 0 and BSCALE = 1. */ if (zbitpix != BYTE_IMG || scale != 1.0 || zero != 0.) { ffpmsg("Implicit datatype conversion is not supported when writing to compressed images"); return(*status = DATA_COMPRESSION_ERR); } idata = (int *) tiledata; usbbuff = (unsigned char *) tiledata; if ( (outfptr->Fptr)->compress_type == RICE_1 || (outfptr->Fptr)->compress_type == GZIP_1 || (outfptr->Fptr)->compress_type == GZIP_2 || (outfptr->Fptr)->compress_type == BZIP2_1 ) { /* don't have to convert to int if using gzip, bzip2, or Rice compression */ *intlength = 1; if (nullcheck == 1) { /* reset pixels equal to flagval to the FITS null value, prior to compression */ flagval = *(unsigned char *) (nullflagval); if (flagval != nullval) { for (ii = tilelen - 1; ii >= 0; ii--) { if (usbbuff[ii] == (unsigned char) flagval) usbbuff[ii] = (unsigned char) nullval; } } } } else { /* have to convert to int if using HCOMPRESS or PLIO */ *intlength = 4; if (nullcheck == 1) { /* reset pixels equal to flagval to the FITS null value, prior to compression */ flagval = *(unsigned char *) (nullflagval); for (ii = tilelen - 1; ii >= 0; ii--) { if (usbbuff[ii] == (unsigned char) flagval) idata[ii] = nullval; else idata[ii] = (int) usbbuff[ii]; } } else { /* just do the data type conversion to int */ for (ii = tilelen - 1; ii >= 0; ii--) idata[ii] = (int) usbbuff[ii]; } } return(*status); } /*--------------------------------------------------------------------------*/ int imcomp_convert_tile_tsbyte( fitsfile *outfptr, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *status) { /* Prepare the input tile array of pixels for compression. /* Convert input integer*1 tile array in place to 4 or 8-byte ints for compression, */ /* If needed, convert 4 or 8-byte ints and do null value substitution. */ /* Note that the calling routine must have allocated the input array big enough */ /* to be able to do this. */ int flagval, *idata; long ii; signed char *sbbuff; /* datatype of input array is signed byte. We only support writing this datatype to a FITS image with BITPIX = 8 and with BZERO = 0 and BSCALE = -128. */ if (zbitpix != BYTE_IMG|| scale != 1.0 || zero != -128.) { ffpmsg("Implicit datatype conversion is not supported when writing to compressed images"); return(*status = DATA_COMPRESSION_ERR); } idata = (int *) tiledata; sbbuff = (signed char *) tiledata; if ( (outfptr->Fptr)->compress_type == RICE_1 || (outfptr->Fptr)->compress_type == GZIP_1 || (outfptr->Fptr)->compress_type == GZIP_2 || (outfptr->Fptr)->compress_type == BZIP2_1 ) { /* don't have to convert to int if using gzip, bzip2 or Rice compression */ *intlength = 1; if (nullcheck == 1) { /* reset pixels equal to flagval to the FITS null value, prior to compression */ /* offset the other pixel values (by flipping the MSB) */ flagval = *(signed char *) (nullflagval); for (ii = tilelen - 1; ii >= 0; ii--) { if (sbbuff[ii] == (signed char) flagval) sbbuff[ii] = (signed char) nullval; else sbbuff[ii] = (sbbuff[ii]) ^ 0x80; } } else { /* just offset the pixel values (by flipping the MSB) */ for (ii = tilelen - 1; ii >= 0; ii--) sbbuff[ii] = (sbbuff[ii]) ^ 0x80; } } else { /* have to convert to int if using HCOMPRESS or PLIO */ *intlength = 4; if (nullcheck == 1) { /* reset pixels equal to flagval to the FITS null value, prior to compression */ flagval = *(signed char *) (nullflagval); for (ii = tilelen - 1; ii >= 0; ii--) { if (sbbuff[ii] == (signed char) flagval) idata[ii] = nullval; else idata[ii] = ((int) sbbuff[ii]) + 128; } } else { /* just do the data type conversion to int */ for (ii = tilelen - 1; ii >= 0; ii--) idata[ii] = ((int) sbbuff[ii]) + 128; } } return(*status); } /*--------------------------------------------------------------------------*/ int imcomp_convert_tile_tfloat( fitsfile *outfptr, long row, void *tiledata, long tilelen, long tilenx, long tileny, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *flag, double *bscale, double *bzero, int *status) { /* Prepare the input tile array of pixels for compression. /* Convert input float tile array in place to 4 or 8-byte ints for compression, */ /* If needed, convert 4 or 8-byte ints and do null value substitution. */ /* Note that the calling routine must have allocated the input array big enough */ /* to be able to do this. */ int flagval, *idata; long irow, ii; float floatnull; unsigned char *usbbuff; unsigned long dithersum; int iminval = 0, imaxval = 0; /* min and max quantized integers */ /* datatype of input array is double. We only support writing this datatype to a FITS image with BITPIX = -64 or -32, except we also support the special case where BITPIX = 32 and BZERO = 0 and BSCALE = 1. */ if ((zbitpix != LONG_IMG && zbitpix != DOUBLE_IMG && zbitpix != FLOAT_IMG) || scale != 1.0 || zero != 0.) { ffpmsg("Implicit datatype conversion is not supported when writing to compressed images"); return(*status = DATA_COMPRESSION_ERR); } *intlength = 4; idata = (int *) tiledata; /* if the tile-compressed table contains zscale and zzero columns */ /* then scale and quantize the input floating point data. */ if ((outfptr->Fptr)->cn_zscale > 0) { /* quantize the float values into integers */ if (nullcheck == 1) floatnull = *(float *) (nullflagval); else floatnull = FLOATNULLVALUE; /* NaNs are represented by this, by default */ if ((outfptr->Fptr)->quantize_method == SUBTRACTIVE_DITHER_1 || (outfptr->Fptr)->quantize_method == SUBTRACTIVE_DITHER_2) { /* see if the dithering offset value needs to be initialized */ if ((outfptr->Fptr)->request_dither_seed == 0 && (outfptr->Fptr)->dither_seed == 0) { /* This means randomly choose the dithering offset based on the system time. */ /* The offset will have a value between 1 and 10000, inclusive. */ /* The time function returns an integer value that is incremented each second. */ /* The clock function returns the elapsed CPU time, in integer CLOCKS_PER_SEC units. */ /* The CPU time returned by clock is typically (on linux PC) only good to 0.01 sec */ /* Summing the 2 quantities may help avoid cases where 2 executions of the program */ /* (perhaps in a multithreaded environoment) end up with exactly the same dither seed */ /* value. The sum is incremented by the current HDU number in the file to provide */ /* further randomization. This randomization is desireable if multiple compressed */ /* images will be summed (or differenced). In such cases, the benefits of dithering */ /* may be lost if all the images use exactly the same sequence of random numbers when */ /* calculating the dithering offsets. */ (outfptr->Fptr)->dither_seed = (( (int)time(NULL) + ( (int) clock() / (int) (CLOCKS_PER_SEC / 100)) + (outfptr->Fptr)->curhdu) % 10000) + 1; /* update the header keyword with this new value */ fits_update_key(outfptr, TINT, "ZDITHER0", &((outfptr->Fptr)->dither_seed), NULL, status); } else if ((outfptr->Fptr)->request_dither_seed < 0 && (outfptr->Fptr)->dither_seed < 0) { /* this means randomly choose the dithering offset based on some hash function */ /* of the first input tile of data to be quantized and compressed. This ensures that */ /* the same offset value is used for a given image every time it is compressed. */ usbbuff = (unsigned char *) tiledata; dithersum = 0; for (ii = 0; ii < 4 * tilelen; ii++) { dithersum += usbbuff[ii]; /* doesn't matter if there is an integer overflow */ } (outfptr->Fptr)->dither_seed = ((int) (dithersum % 10000)) + 1; /* update the header keyword with this new value */ fits_update_key(outfptr, TINT, "ZDITHER0", &((outfptr->Fptr)->dither_seed), NULL, status); } /* subtract 1 to convert from 1-based to 0-based element number */ irow = row + (outfptr->Fptr)->dither_seed - 1; /* dither the quantized values */ } else if ((outfptr->Fptr)->quantize_method == -1) { irow = 0; /* do not dither the quantized values */ } else { ffpmsg("Unknown dithering method."); ffpmsg("May need to install a newer version of CFITSIO."); return(*status = DATA_COMPRESSION_ERR); } *flag = fits_quantize_float (irow, (float *) tiledata, tilenx, tileny, nullcheck, floatnull, (outfptr->Fptr)->quantize_level, (outfptr->Fptr)->quantize_method, idata, bscale, bzero, &iminval, &imaxval); if (*flag > 1) return(*status = *flag); } else if ((outfptr->Fptr)->quantize_level != NO_QUANTIZE) { /* if floating point pixels are not being losslessly compressed, then */ /* input float data is implicitly converted (truncated) to integers */ if ((scale != 1. || zero != 0.)) /* must scale the values */ imcomp_nullscalefloats((float *) tiledata, tilelen, idata, scale, zero, nullcheck, *(float *) (nullflagval), nullval, status); else imcomp_nullfloats((float *) tiledata, tilelen, idata, nullcheck, *(float *) (nullflagval), nullval, status); } else if ((outfptr->Fptr)->quantize_level == NO_QUANTIZE) { /* just convert null values to NaNs in place, if necessary, then do lossless gzip compression */ if (nullcheck == 1) { imcomp_float2nan((float *) tiledata, tilelen, (int *) tiledata, *(float *) (nullflagval), status); } } return(*status); } /*--------------------------------------------------------------------------*/ int imcomp_convert_tile_tdouble( fitsfile *outfptr, long row, void *tiledata, long tilelen, long tilenx, long tileny, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *flag, double *bscale, double *bzero, int *status) { /* Prepare the input tile array of pixels for compression. /* Convert input double tile array in place to 4-byte ints for compression, */ /* If needed, convert 4 or 8-byte ints and do null value substitution. */ /* Note that the calling routine must have allocated the input array big enough */ /* to be able to do this. */ int flagval, *idata; long irow, ii; double doublenull; unsigned char *usbbuff; unsigned long dithersum; int iminval = 0, imaxval = 0; /* min and max quantized integers */ /* datatype of input array is double. We only support writing this datatype to a FITS image with BITPIX = -64 or -32, except we also support the special case where BITPIX = 32 and BZERO = 0 and BSCALE = 1. */ if ((zbitpix != LONG_IMG && zbitpix != DOUBLE_IMG && zbitpix != FLOAT_IMG) || scale != 1.0 || zero != 0.) { ffpmsg("Implicit datatype conversion is not supported when writing to compressed images"); return(*status = DATA_COMPRESSION_ERR); } *intlength = 4; idata = (int *) tiledata; /* if the tile-compressed table contains zscale and zzero columns */ /* then scale and quantize the input floating point data. */ /* Otherwise, just truncate the floats to integers. */ if ((outfptr->Fptr)->cn_zscale > 0) { if (nullcheck == 1) doublenull = *(double *) (nullflagval); else doublenull = DOUBLENULLVALUE; /* quantize the double values into integers */ if ((outfptr->Fptr)->quantize_method == SUBTRACTIVE_DITHER_1 || (outfptr->Fptr)->quantize_method == SUBTRACTIVE_DITHER_2) { /* see if the dithering offset value needs to be initialized (see above) */ if ((outfptr->Fptr)->request_dither_seed == 0 && (outfptr->Fptr)->dither_seed == 0) { (outfptr->Fptr)->dither_seed = (( (int)time(NULL) + ( (int) clock() / (int) (CLOCKS_PER_SEC / 100)) + (outfptr->Fptr)->curhdu) % 10000) + 1; /* update the header keyword with this new value */ fits_update_key(outfptr, TINT, "ZDITHER0", &((outfptr->Fptr)->dither_seed), NULL, status); } else if ((outfptr->Fptr)->request_dither_seed < 0 && (outfptr->Fptr)->dither_seed < 0) { usbbuff = (unsigned char *) tiledata; dithersum = 0; for (ii = 0; ii < 8 * tilelen; ii++) { dithersum += usbbuff[ii]; } (outfptr->Fptr)->dither_seed = ((int) (dithersum % 10000)) + 1; /* update the header keyword with this new value */ fits_update_key(outfptr, TINT, "ZDITHER0", &((outfptr->Fptr)->dither_seed), NULL, status); } irow = row + (outfptr->Fptr)->dither_seed - 1; /* dither the quantized values */ } else if ((outfptr->Fptr)->quantize_method == -1) { irow = 0; /* do not dither the quantized values */ } else { ffpmsg("Unknown subtractive dithering method."); ffpmsg("May need to install a newer version of CFITSIO."); return(*status = DATA_COMPRESSION_ERR); } *flag = fits_quantize_double (irow, (double *) tiledata, tilenx, tileny, nullcheck, doublenull, (outfptr->Fptr)->quantize_level, (outfptr->Fptr)->quantize_method, idata, bscale, bzero, &iminval, &imaxval); if (*flag > 1) return(*status = *flag); } else if ((outfptr->Fptr)->quantize_level != NO_QUANTIZE) { /* if floating point pixels are not being losslessly compressed, then */ /* input float data is implicitly converted (truncated) to integers */ if ((scale != 1. || zero != 0.)) /* must scale the values */ imcomp_nullscaledoubles((double *) tiledata, tilelen, idata, scale, zero, nullcheck, *(double *) (nullflagval), nullval, status); else imcomp_nulldoubles((double *) tiledata, tilelen, idata, nullcheck, *(double *) (nullflagval), nullval, status); } else if ((outfptr->Fptr)->quantize_level == NO_QUANTIZE) { /* just convert null values to NaNs in place, if necessary, then do lossless gzip compression */ if (nullcheck == 1) { imcomp_double2nan((double *) tiledata, tilelen, (LONGLONG *) tiledata, *(double *) (nullflagval), status); } } return(*status); } /*---------------------------------------------------------------------------*/ int imcomp_nullscale( int *idata, long tilelen, int nullflagval, int nullval, double scale, double zero, int *status) /* do null value substitution AND scaling of the integer array. If array value = nullflagval, then set the value to nullval. Otherwise, inverse scale the integer value. */ { long ii; double dvalue; for (ii=0; ii < tilelen; ii++) { if (idata[ii] == nullflagval) idata[ii] = nullval; else { dvalue = (idata[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; idata[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; idata[ii] = INT32_MAX; } else { if (dvalue >= 0) idata[ii] = (int) (dvalue + .5); else idata[ii] = (int) (dvalue - .5); } } } return(*status); } /*---------------------------------------------------------------------------*/ int imcomp_nullvalues( int *idata, long tilelen, int nullflagval, int nullval, int *status) /* do null value substitution. If array value = nullflagval, then set the value to nullval. */ { long ii; for (ii=0; ii < tilelen; ii++) { if (idata[ii] == nullflagval) idata[ii] = nullval; } return(*status); } /*---------------------------------------------------------------------------*/ int imcomp_scalevalues( int *idata, long tilelen, double scale, double zero, int *status) /* do inverse scaling the integer values. */ { long ii; double dvalue; for (ii=0; ii < tilelen; ii++) { dvalue = (idata[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; idata[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; idata[ii] = INT32_MAX; } else { if (dvalue >= 0) idata[ii] = (int) (dvalue + .5); else idata[ii] = (int) (dvalue - .5); } } return(*status); } /*---------------------------------------------------------------------------*/ int imcomp_nullscalei2( short *idata, long tilelen, short nullflagval, short nullval, double scale, double zero, int *status) /* do null value substitution AND scaling of the integer array. If array value = nullflagval, then set the value to nullval. Otherwise, inverse scale the integer value. */ { long ii; double dvalue; for (ii=0; ii < tilelen; ii++) { if (idata[ii] == nullflagval) idata[ii] = nullval; else { dvalue = (idata[ii] - zero) / scale; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; idata[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; idata[ii] = SHRT_MAX; } else { if (dvalue >= 0) idata[ii] = (int) (dvalue + .5); else idata[ii] = (int) (dvalue - .5); } } } return(*status); } /*---------------------------------------------------------------------------*/ int imcomp_nullvaluesi2( short *idata, long tilelen, short nullflagval, short nullval, int *status) /* do null value substitution. If array value = nullflagval, then set the value to nullval. */ { long ii; for (ii=0; ii < tilelen; ii++) { if (idata[ii] == nullflagval) idata[ii] = nullval; } return(*status); } /*---------------------------------------------------------------------------*/ int imcomp_scalevaluesi2( short *idata, long tilelen, double scale, double zero, int *status) /* do inverse scaling the integer values. */ { long ii; double dvalue; for (ii=0; ii < tilelen; ii++) { dvalue = (idata[ii] - zero) / scale; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; idata[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; idata[ii] = SHRT_MAX; } else { if (dvalue >= 0) idata[ii] = (int) (dvalue + .5); else idata[ii] = (int) (dvalue - .5); } } return(*status); } /*---------------------------------------------------------------------------*/ int imcomp_nullfloats( float *fdata, long tilelen, int *idata, int nullcheck, float nullflagval, int nullval, int *status) /* do null value substitution of the float array. If array value = nullflagval, then set the output value to FLOATNULLVALUE. */ { long ii; double dvalue; if (nullcheck == 1) /* must check for null values */ { for (ii=0; ii < tilelen; ii++) { if (fdata[ii] == nullflagval) idata[ii] = nullval; else { dvalue = fdata[ii]; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; idata[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; idata[ii] = INT32_MAX; } else { if (dvalue >= 0) idata[ii] = (int) (dvalue + .5); else idata[ii] = (int) (dvalue - .5); } } } } else /* don't have to worry about null values */ { for (ii=0; ii < tilelen; ii++) { dvalue = fdata[ii]; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; idata[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; idata[ii] = INT32_MAX; } else { if (dvalue >= 0) idata[ii] = (int) (dvalue + .5); else idata[ii] = (int) (dvalue - .5); } } } return(*status); } /*---------------------------------------------------------------------------*/ int imcomp_nullscalefloats( float *fdata, long tilelen, int *idata, double scale, double zero, int nullcheck, float nullflagval, int nullval, int *status) /* do null value substitution of the float array. If array value = nullflagval, then set the output value to FLOATNULLVALUE. Otherwise, inverse scale the integer value. */ { long ii; double dvalue; if (nullcheck == 1) /* must check for null values */ { for (ii=0; ii < tilelen; ii++) { if (fdata[ii] == nullflagval) idata[ii] = nullval; else { dvalue = (fdata[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; idata[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; idata[ii] = INT32_MAX; } else { if (dvalue >= 0.) idata[ii] = (int) (dvalue + .5); else idata[ii] = (int) (dvalue - .5); } } } } else /* don't have to worry about null values */ { for (ii=0; ii < tilelen; ii++) { dvalue = (fdata[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; idata[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; idata[ii] = INT32_MAX; } else { if (dvalue >= 0.) idata[ii] = (int) (dvalue + .5); else idata[ii] = (int) (dvalue - .5); } } } return(*status); } /*---------------------------------------------------------------------------*/ int imcomp_nulldoubles( double *fdata, long tilelen, int *idata, int nullcheck, double nullflagval, int nullval, int *status) /* do null value substitution of the float array. If array value = nullflagval, then set the output value to FLOATNULLVALUE. Otherwise, inverse scale the integer value. */ { long ii; double dvalue; if (nullcheck == 1) /* must check for null values */ { for (ii=0; ii < tilelen; ii++) { if (fdata[ii] == nullflagval) idata[ii] = nullval; else { dvalue = fdata[ii]; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; idata[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; idata[ii] = INT32_MAX; } else { if (dvalue >= 0.) idata[ii] = (int) (dvalue + .5); else idata[ii] = (int) (dvalue - .5); } } } } else /* don't have to worry about null values */ { for (ii=0; ii < tilelen; ii++) { dvalue = fdata[ii]; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; idata[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; idata[ii] = INT32_MAX; } else { if (dvalue >= 0.) idata[ii] = (int) (dvalue + .5); else idata[ii] = (int) (dvalue - .5); } } } return(*status); } /*---------------------------------------------------------------------------*/ int imcomp_nullscaledoubles( double *fdata, long tilelen, int *idata, double scale, double zero, int nullcheck, double nullflagval, int nullval, int *status) /* do null value substitution of the float array. If array value = nullflagval, then set the output value to FLOATNULLVALUE. Otherwise, inverse scale the integer value. */ { long ii; double dvalue; if (nullcheck == 1) /* must check for null values */ { for (ii=0; ii < tilelen; ii++) { if (fdata[ii] == nullflagval) idata[ii] = nullval; else { dvalue = (fdata[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; idata[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; idata[ii] = INT32_MAX; } else { if (dvalue >= 0.) idata[ii] = (int) (dvalue + .5); else idata[ii] = (int) (dvalue - .5); } } } } else /* don't have to worry about null values */ { for (ii=0; ii < tilelen; ii++) { dvalue = (fdata[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; idata[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; idata[ii] = INT32_MAX; } else { if (dvalue >= 0.) idata[ii] = (int) (dvalue + .5); else idata[ii] = (int) (dvalue - .5); } } } return(*status); } /*---------------------------------------------------------------------------*/ int fits_write_compressed_img(fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the array to be written */ long *infpixel, /* I - 'bottom left corner' of the subsection */ long *inlpixel, /* I - 'top right corner' of the subsection */ int nullcheck, /* I - 0 for no null checking */ /* 1: pixels that are = nullval will be */ /* written with the FITS null pixel value */ /* (floating point arrays only) */ void *array, /* I - array of values to be written */ void *nullval, /* I - undefined pixel value */ int *status) /* IO - error status */ /* Write a section of a compressed image. */ { int tiledim[MAX_COMPRESS_DIM]; long naxis[MAX_COMPRESS_DIM]; long tilesize[MAX_COMPRESS_DIM], thistilesize[MAX_COMPRESS_DIM]; long ftile[MAX_COMPRESS_DIM], ltile[MAX_COMPRESS_DIM]; long tfpixel[MAX_COMPRESS_DIM], tlpixel[MAX_COMPRESS_DIM]; long rowdim[MAX_COMPRESS_DIM], offset[MAX_COMPRESS_DIM],ntemp; long fpixel[MAX_COMPRESS_DIM], lpixel[MAX_COMPRESS_DIM]; long i5, i4, i3, i2, i1, i0, irow; int ii, ndim, pixlen, tilenul; int tstatus, buffpixsiz; void *buffer; char *bnullarray = 0, card[FLEN_CARD]; if (*status > 0) return(*status); if (!fits_is_compressed_image(fptr, status) ) { ffpmsg("CHDU is not a compressed image (fits_write_compressed_img)"); return(*status = DATA_COMPRESSION_ERR); } /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); /* ===================================================================== */ if (datatype == TSHORT || datatype == TUSHORT) { pixlen = sizeof(short); } else if (datatype == TINT || datatype == TUINT) { pixlen = sizeof(int); } else if (datatype == TBYTE || datatype == TSBYTE) { pixlen = 1; } else if (datatype == TLONG || datatype == TULONG) { pixlen = sizeof(long); } else if (datatype == TFLOAT) { pixlen = sizeof(float); } else if (datatype == TDOUBLE) { pixlen = sizeof(double); } else { ffpmsg("unsupported datatype for compressing image"); return(*status = BAD_DATATYPE); } /* ===================================================================== */ /* allocate scratch space for processing one tile of the image */ buffpixsiz = pixlen; /* this is the minimum pixel size */ if ( (fptr->Fptr)->compress_type == HCOMPRESS_1) { /* need 4 or 8 bytes per pixel */ if ((fptr->Fptr)->zbitpix == BYTE_IMG || (fptr->Fptr)->zbitpix == SHORT_IMG ) buffpixsiz = maxvalue(buffpixsiz, 4); else buffpixsiz = 8; } else if ( (fptr->Fptr)->compress_type == PLIO_1) { /* need 4 bytes per pixel */ buffpixsiz = maxvalue(buffpixsiz, 4); } else if ( (fptr->Fptr)->compress_type == RICE_1 || (fptr->Fptr)->compress_type == GZIP_1 || (fptr->Fptr)->compress_type == GZIP_2 || (fptr->Fptr)->compress_type == BZIP2_1) { /* need 1, 2, or 4 bytes per pixel */ if ((fptr->Fptr)->zbitpix == BYTE_IMG) buffpixsiz = maxvalue(buffpixsiz, 1); else if ((fptr->Fptr)->zbitpix == SHORT_IMG) buffpixsiz = maxvalue(buffpixsiz, 2); else buffpixsiz = maxvalue(buffpixsiz, 4); } else { ffpmsg("unsupported image compression algorithm"); return(*status = BAD_DATATYPE); } /* cast to double to force alignment on 8-byte addresses */ buffer = (double *) calloc ((fptr->Fptr)->maxtilelen, buffpixsiz); if (buffer == NULL) { ffpmsg("Out of memory (fits_write_compress_img)"); return (*status = MEMORY_ALLOCATION); } /* ===================================================================== */ /* initialize all the arrays */ for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) { naxis[ii] = 1; tiledim[ii] = 1; tilesize[ii] = 1; ftile[ii] = 1; ltile[ii] = 1; rowdim[ii] = 1; } ndim = (fptr->Fptr)->zndim; ntemp = 1; for (ii = 0; ii < ndim; ii++) { fpixel[ii] = infpixel[ii]; lpixel[ii] = inlpixel[ii]; /* calc number of tiles in each dimension, and tile containing */ /* the first and last pixel we want to read in each dimension */ naxis[ii] = (fptr->Fptr)->znaxis[ii]; if (fpixel[ii] < 1) { free(buffer); return(*status = BAD_PIX_NUM); } tilesize[ii] = (fptr->Fptr)->tilesize[ii]; tiledim[ii] = (naxis[ii] - 1) / tilesize[ii] + 1; ftile[ii] = (fpixel[ii] - 1) / tilesize[ii] + 1; ltile[ii] = minvalue((lpixel[ii] - 1) / tilesize[ii] + 1, tiledim[ii]); rowdim[ii] = ntemp; /* total tiles in each dimension */ ntemp *= tiledim[ii]; } /* support up to 6 dimensions for now */ /* tfpixel and tlpixel are the first and last image pixels */ /* along each dimension of the compression tile */ for (i5 = ftile[5]; i5 <= ltile[5]; i5++) { tfpixel[5] = (i5 - 1) * tilesize[5] + 1; tlpixel[5] = minvalue(tfpixel[5] + tilesize[5] - 1, naxis[5]); thistilesize[5] = tlpixel[5] - tfpixel[5] + 1; offset[5] = (i5 - 1) * rowdim[5]; for (i4 = ftile[4]; i4 <= ltile[4]; i4++) { tfpixel[4] = (i4 - 1) * tilesize[4] + 1; tlpixel[4] = minvalue(tfpixel[4] + tilesize[4] - 1, naxis[4]); thistilesize[4] = thistilesize[5] * (tlpixel[4] - tfpixel[4] + 1); offset[4] = (i4 - 1) * rowdim[4] + offset[5]; for (i3 = ftile[3]; i3 <= ltile[3]; i3++) { tfpixel[3] = (i3 - 1) * tilesize[3] + 1; tlpixel[3] = minvalue(tfpixel[3] + tilesize[3] - 1, naxis[3]); thistilesize[3] = thistilesize[4] * (tlpixel[3] - tfpixel[3] + 1); offset[3] = (i3 - 1) * rowdim[3] + offset[4]; for (i2 = ftile[2]; i2 <= ltile[2]; i2++) { tfpixel[2] = (i2 - 1) * tilesize[2] + 1; tlpixel[2] = minvalue(tfpixel[2] + tilesize[2] - 1, naxis[2]); thistilesize[2] = thistilesize[3] * (tlpixel[2] - tfpixel[2] + 1); offset[2] = (i2 - 1) * rowdim[2] + offset[3]; for (i1 = ftile[1]; i1 <= ltile[1]; i1++) { tfpixel[1] = (i1 - 1) * tilesize[1] + 1; tlpixel[1] = minvalue(tfpixel[1] + tilesize[1] - 1, naxis[1]); thistilesize[1] = thistilesize[2] * (tlpixel[1] - tfpixel[1] + 1); offset[1] = (i1 - 1) * rowdim[1] + offset[2]; for (i0 = ftile[0]; i0 <= ltile[0]; i0++) { tfpixel[0] = (i0 - 1) * tilesize[0] + 1; tlpixel[0] = minvalue(tfpixel[0] + tilesize[0] - 1, naxis[0]); thistilesize[0] = thistilesize[1] * (tlpixel[0] - tfpixel[0] + 1); /* calculate row of table containing this tile */ irow = i0 + offset[1]; /* read and uncompress this row (tile) of the table */ /* also do type conversion and undefined pixel substitution */ /* at this point */ imcomp_decompress_tile(fptr, irow, thistilesize[0], datatype, nullcheck, nullval, buffer, bnullarray, &tilenul, status); if (*status == NO_COMPRESSED_TILE) { /* tile doesn't exist, so initialize to zero */ memset(buffer, 0, pixlen * thistilesize[0]); *status = 0; } /* copy the intersecting pixels to this tile from the input */ imcomp_merge_overlap(buffer, pixlen, ndim, tfpixel, tlpixel, bnullarray, array, fpixel, lpixel, nullcheck, status); /* compress the tile again, and write it back to the FITS file */ imcomp_compress_tile (fptr, irow, datatype, buffer, thistilesize[0], tlpixel[0] - tfpixel[0] + 1, tlpixel[1] - tfpixel[1] + 1, nullcheck, nullval, status); } } } } } } free(buffer); if ((fptr->Fptr)->zbitpix < 0 && nullcheck != 0) { /* This is a floating point FITS image with possible null values. It is too messy to test if any null values are actually written, so just assume so. We need to make sure that the ZBLANK keyword is present in the compressed image header. If it is not there then we need to insert the keyword. */ tstatus = 0; ffgcrd(fptr, "ZBLANK", card, &tstatus); if (tstatus) { /* have to insert the ZBLANK keyword */ ffgcrd(fptr, "ZCMPTYPE", card, status); ffikyj(fptr, "ZBLANK", COMPRESS_NULL_VALUE, "null value in the compressed integer array", status); /* set this value into the internal structure; it is used if */ /* the program reads back the values from the array */ (fptr->Fptr)->zblank = COMPRESS_NULL_VALUE; (fptr->Fptr)->cn_zblank = -1; /* flag for a constant ZBLANK */ } } return(*status); } /*--------------------------------------------------------------------------*/ int fits_write_compressed_pixels(fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the array to be written */ LONGLONG fpixel, /* I - 'first pixel to write */ LONGLONG npixel, /* I - number of pixels to write */ int nullcheck, /* I - 0 for no null checking */ /* 1: pixels that are = nullval will be */ /* written with the FITS null pixel value */ /* (floating point arrays only) */ void *array, /* I - array of values to write */ void *nullval, /* I - value used to represent undefined pixels*/ int *status) /* IO - error status */ /* Write a consecutive set of pixels to a compressed image. This routine interpretes the n-dimensional image as a long one-dimensional array. This is actually a rather inconvenient way to write compressed images in general, and could be rather inefficient if the requested pixels to be written are located in many different image compression tiles. The general strategy used here is to write the requested pixels in blocks that correspond to rectangular image sections. */ { int naxis, ii, bytesperpixel; long naxes[MAX_COMPRESS_DIM], nread; LONGLONG tfirst, tlast, last0, last1, dimsize[MAX_COMPRESS_DIM]; long nplane, firstcoord[MAX_COMPRESS_DIM], lastcoord[MAX_COMPRESS_DIM]; char *arrayptr; if (*status > 0) return(*status); arrayptr = (char *) array; /* get size of array pixels, in bytes */ bytesperpixel = ffpxsz(datatype); for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) { naxes[ii] = 1; firstcoord[ii] = 0; lastcoord[ii] = 0; } /* determine the dimensions of the image to be written */ ffgidm(fptr, &naxis, status); ffgisz(fptr, MAX_COMPRESS_DIM, naxes, status); /* calc the cumulative number of pixels in each successive dimension */ dimsize[0] = 1; for (ii = 1; ii < MAX_COMPRESS_DIM; ii++) dimsize[ii] = dimsize[ii - 1] * naxes[ii - 1]; /* determine the coordinate of the first and last pixel in the image */ /* Use zero based indexes here */ tfirst = fpixel - 1; tlast = tfirst + npixel - 1; for (ii = naxis - 1; ii >= 0; ii--) { firstcoord[ii] = (long) (tfirst / dimsize[ii]); lastcoord[ii] = (long) (tlast / dimsize[ii]); tfirst = tfirst - firstcoord[ii] * dimsize[ii]; tlast = tlast - lastcoord[ii] * dimsize[ii]; } /* to simplify things, treat 1-D, 2-D, and 3-D images as separate cases */ if (naxis == 1) { /* Simple: just write the requested range of pixels */ firstcoord[0] = firstcoord[0] + 1; lastcoord[0] = lastcoord[0] + 1; fits_write_compressed_img(fptr, datatype, firstcoord, lastcoord, nullcheck, array, nullval, status); return(*status); } else if (naxis == 2) { nplane = 0; /* write 1st (and only) plane of the image */ fits_write_compressed_img_plane(fptr, datatype, bytesperpixel, nplane, firstcoord, lastcoord, naxes, nullcheck, array, nullval, &nread, status); } else if (naxis == 3) { /* test for special case: writing an integral number of planes */ if (firstcoord[0] == 0 && firstcoord[1] == 0 && lastcoord[0] == naxes[0] - 1 && lastcoord[1] == naxes[1] - 1) { for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) { /* convert from zero base to 1 base */ (firstcoord[ii])++; (lastcoord[ii])++; } /* we can write the contiguous block of pixels in one go */ fits_write_compressed_img(fptr, datatype, firstcoord, lastcoord, nullcheck, array, nullval, status); return(*status); } /* save last coordinate in temporary variables */ last0 = lastcoord[0]; last1 = lastcoord[1]; if (firstcoord[2] < lastcoord[2]) { /* we will write up to the last pixel in all but the last plane */ lastcoord[0] = naxes[0] - 1; lastcoord[1] = naxes[1] - 1; } /* write one plane of the cube at a time, for simplicity */ for (nplane = firstcoord[2]; nplane <= lastcoord[2]; nplane++) { if (nplane == lastcoord[2]) { lastcoord[0] = (long) last0; lastcoord[1] = (long) last1; } fits_write_compressed_img_plane(fptr, datatype, bytesperpixel, nplane, firstcoord, lastcoord, naxes, nullcheck, arrayptr, nullval, &nread, status); /* for all subsequent planes, we start with the first pixel */ firstcoord[0] = 0; firstcoord[1] = 0; /* increment pointers to next elements to be written */ arrayptr = arrayptr + nread * bytesperpixel; } } else { ffpmsg("only 1D, 2D, or 3D images are currently supported"); return(*status = DATA_COMPRESSION_ERR); } return(*status); } /*--------------------------------------------------------------------------*/ int fits_write_compressed_img_plane(fitsfile *fptr, /* I - FITS file */ int datatype, /* I - datatype of the array to be written */ int bytesperpixel, /* I - number of bytes per pixel in array */ long nplane, /* I - which plane of the cube to write */ long *firstcoord, /* I coordinate of first pixel to write */ long *lastcoord, /* I coordinate of last pixel to write */ long *naxes, /* I size of each image dimension */ int nullcheck, /* I - 0 for no null checking */ /* 1: pixels that are = nullval will be */ /* written with the FITS null pixel value */ /* (floating point arrays only) */ void *array, /* I - array of values that are written */ void *nullval, /* I - value for undefined pixels */ long *nread, /* O - total number of pixels written */ int *status) /* IO - error status */ /* in general we have to write the first partial row of the image, followed by the middle complete rows, followed by the last partial row of the image. If the first or last rows are complete, then write them at the same time as all the middle rows. */ { /* bottom left coord. and top right coord. */ long blc[MAX_COMPRESS_DIM], trc[MAX_COMPRESS_DIM]; char *arrayptr; *nread = 0; arrayptr = (char *) array; blc[2] = nplane + 1; trc[2] = nplane + 1; if (firstcoord[0] != 0) { /* have to read a partial first row */ blc[0] = firstcoord[0] + 1; blc[1] = firstcoord[1] + 1; trc[1] = blc[1]; if (lastcoord[1] == firstcoord[1]) trc[0] = lastcoord[0] + 1; /* 1st and last pixels in same row */ else trc[0] = naxes[0]; /* read entire rest of the row */ fits_write_compressed_img(fptr, datatype, blc, trc, nullcheck, arrayptr, nullval, status); *nread = *nread + trc[0] - blc[0] + 1; if (lastcoord[1] == firstcoord[1]) { return(*status); /* finished */ } /* set starting coord to beginning of next line */ firstcoord[0] = 0; firstcoord[1] += 1; arrayptr = arrayptr + (trc[0] - blc[0] + 1) * bytesperpixel; } /* write contiguous complete rows of the image, if any */ blc[0] = 1; blc[1] = firstcoord[1] + 1; trc[0] = naxes[0]; if (lastcoord[0] + 1 == naxes[0]) { /* can write the last complete row, too */ trc[1] = lastcoord[1] + 1; } else { /* last row is incomplete; have to read it separately */ trc[1] = lastcoord[1]; } if (trc[1] >= blc[1]) /* must have at least one whole line to read */ { fits_write_compressed_img(fptr, datatype, blc, trc, nullcheck, arrayptr, nullval, status); *nread = *nread + (trc[1] - blc[1] + 1) * naxes[0]; if (lastcoord[1] + 1 == trc[1]) return(*status); /* finished */ /* increment pointers for the last partial row */ arrayptr = arrayptr + (trc[1] - blc[1] + 1) * naxes[0] * bytesperpixel; } if (trc[1] == lastcoord[1] + 1) return(*status); /* all done */ /* set starting and ending coord to last line */ trc[0] = lastcoord[0] + 1; trc[1] = lastcoord[1] + 1; blc[1] = trc[1]; fits_write_compressed_img(fptr, datatype, blc, trc, nullcheck, arrayptr, nullval, status); *nread = *nread + trc[0] - blc[0] + 1; return(*status); } /* ######################################################################## */ /* ### Image Decompression Routines ### */ /* ######################################################################## */ /*--------------------------------------------------------------------------*/ int fits_img_decompress (fitsfile *infptr, /* image (bintable) to uncompress */ fitsfile *outfptr, /* empty HDU for output uncompressed image */ int *status) /* IO - error status */ /* This routine decompresses the whole image and writes it to the output file. */ { int ii, datatype = 0; int nullcheck, anynul; LONGLONG fpixel[MAX_COMPRESS_DIM], lpixel[MAX_COMPRESS_DIM]; long inc[MAX_COMPRESS_DIM]; long imgsize; float *nulladdr, fnulval; double dnulval; if (fits_img_decompress_header(infptr, outfptr, status) > 0) { return (*status); } /* force a rescan of the output header keywords, then reset the scaling */ /* in case the BSCALE and BZERO keywords are present, so that the */ /* decompressed values won't be scaled when written to the output image */ ffrdef(outfptr, status); ffpscl(outfptr, 1.0, 0.0, status); ffpscl(infptr, 1.0, 0.0, status); /* initialize; no null checking is needed for integer images */ nullcheck = 0; nulladdr = &fnulval; /* determine datatype for image */ if ((infptr->Fptr)->zbitpix == BYTE_IMG) { datatype = TBYTE; } else if ((infptr->Fptr)->zbitpix == SHORT_IMG) { datatype = TSHORT; } else if ((infptr->Fptr)->zbitpix == LONG_IMG) { datatype = TINT; } else if ((infptr->Fptr)->zbitpix == FLOAT_IMG) { /* In the case of float images we must check for NaNs */ nullcheck = 1; fnulval = FLOATNULLVALUE; nulladdr = &fnulval; datatype = TFLOAT; } else if ((infptr->Fptr)->zbitpix == DOUBLE_IMG) { /* In the case of double images we must check for NaNs */ nullcheck = 1; dnulval = DOUBLENULLVALUE; nulladdr = (float *) &dnulval; datatype = TDOUBLE; } /* calculate size of the image (in pixels) */ imgsize = 1; for (ii = 0; ii < (infptr->Fptr)->zndim; ii++) { imgsize *= (infptr->Fptr)->znaxis[ii]; fpixel[ii] = 1; /* Set first and last pixel to */ lpixel[ii] = (infptr->Fptr)->znaxis[ii]; /* include the entire image. */ inc[ii] = 1; } /* uncompress the input image and write to output image, one tile at a time */ fits_read_write_compressed_img(infptr, datatype, fpixel, lpixel, inc, nullcheck, nulladdr, &anynul, outfptr, status); return (*status); } /*--------------------------------------------------------------------------*/ int fits_decompress_img (fitsfile *infptr, /* image (bintable) to uncompress */ fitsfile *outfptr, /* empty HDU for output uncompressed image */ int *status) /* IO - error status */ /* THIS IS AN OBSOLETE ROUTINE. USE fits_img_decompress instead!!! This routine decompresses the whole image and writes it to the output file. */ { double *data; int ii, datatype = 0, byte_per_pix = 0; int nullcheck, anynul; LONGLONG fpixel[MAX_COMPRESS_DIM], lpixel[MAX_COMPRESS_DIM]; long inc[MAX_COMPRESS_DIM]; long imgsize, memsize; float *nulladdr, fnulval; double dnulval; if (*status > 0) return(*status); if (!fits_is_compressed_image(infptr, status) ) { ffpmsg("CHDU is not a compressed image (fits_decompress_img)"); return(*status = DATA_DECOMPRESSION_ERR); } /* create an empty output image with the correct dimensions */ if (ffcrim(outfptr, (infptr->Fptr)->zbitpix, (infptr->Fptr)->zndim, (infptr->Fptr)->znaxis, status) > 0) { ffpmsg("error creating output decompressed image HDU"); return (*status); } /* Copy the table header to the image header. */ if (imcomp_copy_imheader(infptr, outfptr, status) > 0) { ffpmsg("error copying header of compressed image"); return (*status); } /* force a rescan of the output header keywords, then reset the scaling */ /* in case the BSCALE and BZERO keywords are present, so that the */ /* decompressed values won't be scaled when written to the output image */ ffrdef(outfptr, status); ffpscl(outfptr, 1.0, 0.0, status); ffpscl(infptr, 1.0, 0.0, status); /* initialize; no null checking is needed for integer images */ nullcheck = 0; nulladdr = &fnulval; /* determine datatype for image */ if ((infptr->Fptr)->zbitpix == BYTE_IMG) { datatype = TBYTE; byte_per_pix = 1; } else if ((infptr->Fptr)->zbitpix == SHORT_IMG) { datatype = TSHORT; byte_per_pix = sizeof(short); } else if ((infptr->Fptr)->zbitpix == LONG_IMG) { datatype = TINT; byte_per_pix = sizeof(int); } else if ((infptr->Fptr)->zbitpix == FLOAT_IMG) { /* In the case of float images we must check for NaNs */ nullcheck = 1; fnulval = FLOATNULLVALUE; nulladdr = &fnulval; datatype = TFLOAT; byte_per_pix = sizeof(float); } else if ((infptr->Fptr)->zbitpix == DOUBLE_IMG) { /* In the case of double images we must check for NaNs */ nullcheck = 1; dnulval = DOUBLENULLVALUE; nulladdr = (float *) &dnulval; datatype = TDOUBLE; byte_per_pix = sizeof(double); } /* calculate size of the image (in pixels) */ imgsize = 1; for (ii = 0; ii < (infptr->Fptr)->zndim; ii++) { imgsize *= (infptr->Fptr)->znaxis[ii]; fpixel[ii] = 1; /* Set first and last pixel to */ lpixel[ii] = (infptr->Fptr)->znaxis[ii]; /* include the entire image. */ inc[ii] = 1; } /* Calc equivalent number of double pixels same size as whole the image. */ /* We use double datatype to force the memory to be aligned properly */ memsize = ((imgsize * byte_per_pix) - 1) / sizeof(double) + 1; /* allocate memory for the image */ data = (double*) calloc (memsize, sizeof(double)); if (!data) { ffpmsg("Couldn't allocate memory for the uncompressed image"); return(*status = MEMORY_ALLOCATION); } /* uncompress the entire image into memory */ /* This routine should be enhanced sometime to only need enough */ /* memory to uncompress one tile at a time. */ fits_read_compressed_img(infptr, datatype, fpixel, lpixel, inc, nullcheck, nulladdr, data, NULL, &anynul, status); /* write the image to the output file */ if (anynul) fits_write_imgnull(outfptr, datatype, 1, imgsize, data, nulladdr, status); else fits_write_img(outfptr, datatype, 1, imgsize, data, status); free(data); return (*status); } /*--------------------------------------------------------------------------*/ int fits_img_decompress_header(fitsfile *infptr, /* image (bintable) to uncompress */ fitsfile *outfptr, /* empty HDU for output uncompressed image */ int *status) /* IO - error status */ /* This routine reads the header of the input tile compressed image and converts it to that of a standard uncompress FITS image. */ { int writeprime = 0; int hdupos, inhdupos, numkeys; int nullprime = 0, copyprime = 0, norec = 0, tstatus; char card[FLEN_CARD]; int ii, datatype = 0, naxis, bitpix; long naxes[MAX_COMPRESS_DIM]; if (*status > 0) return(*status); else if (*status == -1) { *status = 0; writeprime = 1; } if (!fits_is_compressed_image(infptr, status) ) { ffpmsg("CHDU is not a compressed image (fits_img_decompress)"); return(*status = DATA_DECOMPRESSION_ERR); } /* get information about the state of the output file; does it already */ /* contain any keywords and HDUs? */ fits_get_hdu_num(infptr, &inhdupos); /* Get the current output HDU position */ fits_get_hdu_num(outfptr, &hdupos); /* Get the current output HDU position */ fits_get_hdrspace(outfptr, &numkeys, 0, status); /* Was the input compressed HDU originally the primary array image? */ tstatus = 0; if (!fits_read_card(infptr, "ZSIMPLE", card, &tstatus)) { /* yes, input HDU was a primary array (not an IMAGE extension) */ /* Now determine if we can uncompress it into the primary array of */ /* the output file. This is only possible if the output file */ /* currently only contains a null primary array, with no addition */ /* header keywords and with no following extension in the FITS file. */ if (hdupos == 1) { /* are we positioned at the primary array? */ if (numkeys == 0) { /* primary HDU is completely empty */ nullprime = 1; } else { fits_get_img_param(outfptr, MAX_COMPRESS_DIM, &bitpix, &naxis, naxes, status); if (naxis == 0) { /* is this a null image? */ nullprime = 1; if (inhdupos == 2) /* must be at the first extension */ copyprime = 1; } } } } if (nullprime) { /* We will delete the existing keywords in the null primary array and uncompress the input image into the primary array of the output. Some of these keywords may be added back to the uncompressed image header later. */ for (ii = numkeys; ii > 0; ii--) fits_delete_record(outfptr, ii, status); } else { /* if the ZTENSION keyword doesn't exist, then we have to write the required keywords manually */ tstatus = 0; if (fits_read_card(infptr, "ZTENSION", card, &tstatus)) { /* create an empty output image with the correct dimensions */ if (ffcrim(outfptr, (infptr->Fptr)->zbitpix, (infptr->Fptr)->zndim, (infptr->Fptr)->znaxis, status) > 0) { ffpmsg("error creating output decompressed image HDU"); return (*status); } norec = 1; /* the required keywords have already been written */ } else { /* the input compressed image does have ZTENSION keyword */ if (writeprime) { /* convert the image extension to a primary array */ /* have to write the required keywords manually */ /* create an empty output image with the correct dimensions */ if (ffcrim(outfptr, (infptr->Fptr)->zbitpix, (infptr->Fptr)->zndim, (infptr->Fptr)->znaxis, status) > 0) { ffpmsg("error creating output decompressed image HDU"); return (*status); } norec = 1; /* the required keywords have already been written */ } else { /* write the input compressed image to an image extension */ if (numkeys == 0) { /* the output file is currently completely empty */ /* In this case, the input is a compressed IMAGE extension. */ /* Since the uncompressed output file is currently completely empty, */ /* we need to write a null primary array before uncompressing the */ /* image extension */ ffcrim(outfptr, 8, 0, naxes, status); /* naxes is not used */ /* now create the empty extension to uncompress into */ if (fits_create_hdu(outfptr, status) > 0) { ffpmsg("error creating output decompressed image HDU"); return (*status); } } else { /* just create a new empty extension, then copy all the required */ /* keywords into it. */ fits_create_hdu(outfptr, status); } } } } if (*status > 0) { ffpmsg("error creating output decompressed image HDU"); return (*status); } /* Copy the table header to the image header. */ if (imcomp_copy_comp2img(infptr, outfptr, norec, status) > 0) { ffpmsg("error copying header keywords from compressed image"); } if (copyprime) { /* append any unexpected keywords from the primary array. This includes any keywords except SIMPLE, BITPIX, NAXIS, EXTEND, COMMENT, HISTORY, CHECKSUM, and DATASUM. */ fits_movabs_hdu(infptr, 1, NULL, status); /* move to primary array */ /* do this so that any new keywords get written before any blank keywords that may have been appended by imcomp_copy_comp2img */ fits_set_hdustruc(outfptr, status); if (imcomp_copy_prime2img(infptr, outfptr, status) > 0) { ffpmsg("error copying primary keywords from compressed file"); } fits_movabs_hdu(infptr, 2, NULL, status); /* move back to where we were */ } return (*status); } /*---------------------------------------------------------------------------*/ int fits_read_compressed_img(fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the array to be returned */ LONGLONG *infpixel, /* I - 'bottom left corner' of the subsection */ LONGLONG *inlpixel, /* I - 'top right corner' of the subsection */ long *ininc, /* I - increment to be applied in each dimension */ int nullcheck, /* I - 0 for no null checking */ /* 1: set undefined pixels = nullval */ /* 2: set nullarray=1 for undefined pixels */ void *nullval, /* I - value for undefined pixels */ void *array, /* O - array of values that are returned */ char *nullarray, /* O - array of flags = 1 if nullcheck = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a section of a compressed image; Note: lpixel may be larger than the size of the uncompressed image. Only the pixels within the image will be returned. */ { long naxis[MAX_COMPRESS_DIM], tiledim[MAX_COMPRESS_DIM]; long tilesize[MAX_COMPRESS_DIM], thistilesize[MAX_COMPRESS_DIM]; long ftile[MAX_COMPRESS_DIM], ltile[MAX_COMPRESS_DIM]; long tfpixel[MAX_COMPRESS_DIM], tlpixel[MAX_COMPRESS_DIM]; long rowdim[MAX_COMPRESS_DIM], offset[MAX_COMPRESS_DIM],ntemp; long fpixel[MAX_COMPRESS_DIM], lpixel[MAX_COMPRESS_DIM]; long inc[MAX_COMPRESS_DIM]; long i5, i4, i3, i2, i1, i0, irow; int ii, ndim, pixlen, tilenul; void *buffer; char *bnullarray = 0; double testnullval = 0.; if (*status > 0) return(*status); if (!fits_is_compressed_image(fptr, status) ) { ffpmsg("CHDU is not a compressed image (fits_read_compressed_img)"); return(*status = DATA_DECOMPRESSION_ERR); } /* get temporary space for uncompressing one image tile */ if (datatype == TSHORT) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (short)); pixlen = sizeof(short); if (nullval) testnullval = *(short *) nullval; } else if (datatype == TINT) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (int)); pixlen = sizeof(int); if (nullval) testnullval = *(int *) nullval; } else if (datatype == TLONG) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (long)); pixlen = sizeof(long); if (nullval) testnullval = *(long *) nullval; } else if (datatype == TFLOAT) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (float)); pixlen = sizeof(float); if (nullval) testnullval = *(float *) nullval; } else if (datatype == TDOUBLE) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (double)); pixlen = sizeof(double); if (nullval) testnullval = *(double *) nullval; } else if (datatype == TUSHORT) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (unsigned short)); pixlen = sizeof(short); if (nullval) testnullval = *(unsigned short *) nullval; } else if (datatype == TUINT) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (unsigned int)); pixlen = sizeof(int); if (nullval) testnullval = *(unsigned int *) nullval; } else if (datatype == TULONG) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (unsigned long)); pixlen = sizeof(long); if (nullval) testnullval = *(unsigned long *) nullval; } else if (datatype == TBYTE || datatype == TSBYTE) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (char)); pixlen = 1; if (nullval) testnullval = *(unsigned char *) nullval; } else { ffpmsg("unsupported datatype for uncompressing image"); return(*status = BAD_DATATYPE); } /* If nullcheck ==1 and nullval == 0, then this means that the */ /* calling routine does not want to check for null pixels in the array */ if (nullcheck == 1 && testnullval == 0.) nullcheck = 0; if (buffer == NULL) { ffpmsg("Out of memory (fits_read_compress_img)"); return (*status = MEMORY_ALLOCATION); } /* allocate memory for a null flag array, if needed */ if (nullcheck == 2) { bnullarray = calloc ((fptr->Fptr)->maxtilelen, sizeof (char)); if (bnullarray == NULL) { ffpmsg("Out of memory (fits_read_compress_img)"); free(buffer); return (*status = MEMORY_ALLOCATION); } } /* initialize all the arrays */ for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) { naxis[ii] = 1; tiledim[ii] = 1; tilesize[ii] = 1; ftile[ii] = 1; ltile[ii] = 1; rowdim[ii] = 1; } ndim = (fptr->Fptr)->zndim; ntemp = 1; for (ii = 0; ii < ndim; ii++) { /* support for mirror-reversed image sections */ if (infpixel[ii] <= inlpixel[ii]) { fpixel[ii] = (long) infpixel[ii]; lpixel[ii] = (long) inlpixel[ii]; inc[ii] = ininc[ii]; } else { fpixel[ii] = (long) inlpixel[ii]; lpixel[ii] = (long) infpixel[ii]; inc[ii] = -ininc[ii]; } /* calc number of tiles in each dimension, and tile containing */ /* the first and last pixel we want to read in each dimension */ naxis[ii] = (fptr->Fptr)->znaxis[ii]; if (fpixel[ii] < 1) { if (nullcheck == 2) { free(bnullarray); } free(buffer); return(*status = BAD_PIX_NUM); } tilesize[ii] = (fptr->Fptr)->tilesize[ii]; tiledim[ii] = (naxis[ii] - 1) / tilesize[ii] + 1; ftile[ii] = (fpixel[ii] - 1) / tilesize[ii] + 1; ltile[ii] = minvalue((lpixel[ii] - 1) / tilesize[ii] + 1, tiledim[ii]); rowdim[ii] = ntemp; /* total tiles in each dimension */ ntemp *= tiledim[ii]; } if (anynul) *anynul = 0; /* initialize */ /* support up to 6 dimensions for now */ /* tfpixel and tlpixel are the first and last image pixels */ /* along each dimension of the compression tile */ for (i5 = ftile[5]; i5 <= ltile[5]; i5++) { tfpixel[5] = (i5 - 1) * tilesize[5] + 1; tlpixel[5] = minvalue(tfpixel[5] + tilesize[5] - 1, naxis[5]); thistilesize[5] = tlpixel[5] - tfpixel[5] + 1; offset[5] = (i5 - 1) * rowdim[5]; for (i4 = ftile[4]; i4 <= ltile[4]; i4++) { tfpixel[4] = (i4 - 1) * tilesize[4] + 1; tlpixel[4] = minvalue(tfpixel[4] + tilesize[4] - 1, naxis[4]); thistilesize[4] = thistilesize[5] * (tlpixel[4] - tfpixel[4] + 1); offset[4] = (i4 - 1) * rowdim[4] + offset[5]; for (i3 = ftile[3]; i3 <= ltile[3]; i3++) { tfpixel[3] = (i3 - 1) * tilesize[3] + 1; tlpixel[3] = minvalue(tfpixel[3] + tilesize[3] - 1, naxis[3]); thistilesize[3] = thistilesize[4] * (tlpixel[3] - tfpixel[3] + 1); offset[3] = (i3 - 1) * rowdim[3] + offset[4]; for (i2 = ftile[2]; i2 <= ltile[2]; i2++) { tfpixel[2] = (i2 - 1) * tilesize[2] + 1; tlpixel[2] = minvalue(tfpixel[2] + tilesize[2] - 1, naxis[2]); thistilesize[2] = thistilesize[3] * (tlpixel[2] - tfpixel[2] + 1); offset[2] = (i2 - 1) * rowdim[2] + offset[3]; for (i1 = ftile[1]; i1 <= ltile[1]; i1++) { tfpixel[1] = (i1 - 1) * tilesize[1] + 1; tlpixel[1] = minvalue(tfpixel[1] + tilesize[1] - 1, naxis[1]); thistilesize[1] = thistilesize[2] * (tlpixel[1] - tfpixel[1] + 1); offset[1] = (i1 - 1) * rowdim[1] + offset[2]; for (i0 = ftile[0]; i0 <= ltile[0]; i0++) { tfpixel[0] = (i0 - 1) * tilesize[0] + 1; tlpixel[0] = minvalue(tfpixel[0] + tilesize[0] - 1, naxis[0]); thistilesize[0] = thistilesize[1] * (tlpixel[0] - tfpixel[0] + 1); /* calculate row of table containing this tile */ irow = i0 + offset[1]; /* printf("row %d, %d %d, %d %d, %d %d; %d\n", irow, tfpixel[0],tlpixel[0],tfpixel[1],tlpixel[1],tfpixel[2],tlpixel[2], thistilesize[0]); */ /* test if there are any intersecting pixels in this tile and the output image */ if (imcomp_test_overlap(ndim, tfpixel, tlpixel, fpixel, lpixel, inc, status)) { /* read and uncompress this row (tile) of the table */ /* also do type conversion and undefined pixel substitution */ /* at this point */ imcomp_decompress_tile(fptr, irow, thistilesize[0], datatype, nullcheck, nullval, buffer, bnullarray, &tilenul, status); if (tilenul && anynul) *anynul = 1; /* there are null pixels */ /* printf(" pixlen=%d, ndim=%d, %d %d %d, %d %d %d, %d %d %d\n", pixlen, ndim, fpixel[0],lpixel[0],inc[0],fpixel[1],lpixel[1],inc[1], fpixel[2],lpixel[2],inc[2]); */ /* copy the intersecting pixels from this tile to the output */ imcomp_copy_overlap(buffer, pixlen, ndim, tfpixel, tlpixel, bnullarray, array, fpixel, lpixel, inc, nullcheck, nullarray, status); } } } } } } } if (nullcheck == 2) { free(bnullarray); } free(buffer); return(*status); } /*---------------------------------------------------------------------------*/ int fits_read_write_compressed_img(fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the array to be returned */ LONGLONG *infpixel, /* I - 'bottom left corner' of the subsection */ LONGLONG *inlpixel, /* I - 'top right corner' of the subsection */ long *ininc, /* I - increment to be applied in each dimension */ int nullcheck, /* I - 0 for no null checking */ /* 1: set undefined pixels = nullval */ void *nullval, /* I - value for undefined pixels */ int *anynul, /* O - set to 1 if any values are null; else 0 */ fitsfile *outfptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* This is similar to fits_read_compressed_img, except that it writes the pixels to the output image, on a tile by tile basis instead of returning the array. */ { long naxis[MAX_COMPRESS_DIM], tiledim[MAX_COMPRESS_DIM]; long tilesize[MAX_COMPRESS_DIM], thistilesize[MAX_COMPRESS_DIM]; long ftile[MAX_COMPRESS_DIM], ltile[MAX_COMPRESS_DIM]; long tfpixel[MAX_COMPRESS_DIM], tlpixel[MAX_COMPRESS_DIM]; long rowdim[MAX_COMPRESS_DIM], offset[MAX_COMPRESS_DIM],ntemp; long fpixel[MAX_COMPRESS_DIM], lpixel[MAX_COMPRESS_DIM]; long inc[MAX_COMPRESS_DIM]; long i5, i4, i3, i2, i1, i0, irow; int ii, ndim, pixlen, tilenul; void *buffer; char *bnullarray = 0; double testnullval = 0.; LONGLONG firstelem; if (*status > 0) return(*status); if (!fits_is_compressed_image(fptr, status) ) { ffpmsg("CHDU is not a compressed image (fits_read_compressed_img)"); return(*status = DATA_DECOMPRESSION_ERR); } /* get temporary space for uncompressing one image tile */ if (datatype == TSHORT) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (short)); pixlen = sizeof(short); if (nullval) testnullval = *(short *) nullval; } else if (datatype == TINT) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (int)); pixlen = sizeof(int); if (nullval) testnullval = *(int *) nullval; } else if (datatype == TLONG) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (long)); pixlen = sizeof(long); if (nullval) testnullval = *(long *) nullval; } else if (datatype == TFLOAT) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (float)); pixlen = sizeof(float); if (nullval) testnullval = *(float *) nullval; } else if (datatype == TDOUBLE) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (double)); pixlen = sizeof(double); if (nullval) testnullval = *(double *) nullval; } else if (datatype == TUSHORT) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (unsigned short)); pixlen = sizeof(short); if (nullval) testnullval = *(unsigned short *) nullval; } else if (datatype == TUINT) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (unsigned int)); pixlen = sizeof(int); if (nullval) testnullval = *(unsigned int *) nullval; } else if (datatype == TULONG) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (unsigned long)); pixlen = sizeof(long); if (nullval) testnullval = *(unsigned long *) nullval; } else if (datatype == TBYTE || datatype == TSBYTE) { buffer = malloc ((fptr->Fptr)->maxtilelen * sizeof (char)); pixlen = 1; if (nullval) testnullval = *(unsigned char *) nullval; } else { ffpmsg("unsupported datatype for uncompressing image"); return(*status = BAD_DATATYPE); } /* If nullcheck ==1 and nullval == 0, then this means that the */ /* calling routine does not want to check for null pixels in the array */ if (nullcheck == 1 && testnullval == 0.) nullcheck = 0; if (buffer == NULL) { ffpmsg("Out of memory (fits_read_compress_img)"); return (*status = MEMORY_ALLOCATION); } /* initialize all the arrays */ for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) { naxis[ii] = 1; tiledim[ii] = 1; tilesize[ii] = 1; ftile[ii] = 1; ltile[ii] = 1; rowdim[ii] = 1; } ndim = (fptr->Fptr)->zndim; ntemp = 1; for (ii = 0; ii < ndim; ii++) { /* support for mirror-reversed image sections */ if (infpixel[ii] <= inlpixel[ii]) { fpixel[ii] = (long) infpixel[ii]; lpixel[ii] = (long) inlpixel[ii]; inc[ii] = ininc[ii]; } else { fpixel[ii] = (long) inlpixel[ii]; lpixel[ii] = (long) infpixel[ii]; inc[ii] = -ininc[ii]; } /* calc number of tiles in each dimension, and tile containing */ /* the first and last pixel we want to read in each dimension */ naxis[ii] = (fptr->Fptr)->znaxis[ii]; if (fpixel[ii] < 1) { free(buffer); return(*status = BAD_PIX_NUM); } tilesize[ii] = (fptr->Fptr)->tilesize[ii]; tiledim[ii] = (naxis[ii] - 1) / tilesize[ii] + 1; ftile[ii] = (fpixel[ii] - 1) / tilesize[ii] + 1; ltile[ii] = minvalue((lpixel[ii] - 1) / tilesize[ii] + 1, tiledim[ii]); rowdim[ii] = ntemp; /* total tiles in each dimension */ ntemp *= tiledim[ii]; } if (anynul) *anynul = 0; /* initialize */ firstelem = 1; /* support up to 6 dimensions for now */ /* tfpixel and tlpixel are the first and last image pixels */ /* along each dimension of the compression tile */ for (i5 = ftile[5]; i5 <= ltile[5]; i5++) { tfpixel[5] = (i5 - 1) * tilesize[5] + 1; tlpixel[5] = minvalue(tfpixel[5] + tilesize[5] - 1, naxis[5]); thistilesize[5] = tlpixel[5] - tfpixel[5] + 1; offset[5] = (i5 - 1) * rowdim[5]; for (i4 = ftile[4]; i4 <= ltile[4]; i4++) { tfpixel[4] = (i4 - 1) * tilesize[4] + 1; tlpixel[4] = minvalue(tfpixel[4] + tilesize[4] - 1, naxis[4]); thistilesize[4] = thistilesize[5] * (tlpixel[4] - tfpixel[4] + 1); offset[4] = (i4 - 1) * rowdim[4] + offset[5]; for (i3 = ftile[3]; i3 <= ltile[3]; i3++) { tfpixel[3] = (i3 - 1) * tilesize[3] + 1; tlpixel[3] = minvalue(tfpixel[3] + tilesize[3] - 1, naxis[3]); thistilesize[3] = thistilesize[4] * (tlpixel[3] - tfpixel[3] + 1); offset[3] = (i3 - 1) * rowdim[3] + offset[4]; for (i2 = ftile[2]; i2 <= ltile[2]; i2++) { tfpixel[2] = (i2 - 1) * tilesize[2] + 1; tlpixel[2] = minvalue(tfpixel[2] + tilesize[2] - 1, naxis[2]); thistilesize[2] = thistilesize[3] * (tlpixel[2] - tfpixel[2] + 1); offset[2] = (i2 - 1) * rowdim[2] + offset[3]; for (i1 = ftile[1]; i1 <= ltile[1]; i1++) { tfpixel[1] = (i1 - 1) * tilesize[1] + 1; tlpixel[1] = minvalue(tfpixel[1] + tilesize[1] - 1, naxis[1]); thistilesize[1] = thistilesize[2] * (tlpixel[1] - tfpixel[1] + 1); offset[1] = (i1 - 1) * rowdim[1] + offset[2]; for (i0 = ftile[0]; i0 <= ltile[0]; i0++) { tfpixel[0] = (i0 - 1) * tilesize[0] + 1; tlpixel[0] = minvalue(tfpixel[0] + tilesize[0] - 1, naxis[0]); thistilesize[0] = thistilesize[1] * (tlpixel[0] - tfpixel[0] + 1); /* calculate row of table containing this tile */ irow = i0 + offset[1]; /* read and uncompress this row (tile) of the table */ /* also do type conversion and undefined pixel substitution */ /* at this point */ imcomp_decompress_tile(fptr, irow, thistilesize[0], datatype, nullcheck, nullval, buffer, bnullarray, &tilenul, status); /* write the image to the output file */ if (tilenul && anynul) { /* this assumes that the tiled pixels are in the same order as in the uncompressed FITS image. This is not necessarily the case, but it almost alway is in practice. Note that null checking is not performed for integer images, so this could only be a problem for tile compressed floating point images that use an unconventional tiling pattern. */ fits_write_imgnull(outfptr, datatype, firstelem, thistilesize[0], buffer, nullval, status); } else { fits_write_subset(outfptr, datatype, tfpixel, tlpixel, buffer, status); } firstelem += thistilesize[0]; } } } } } } free(buffer); return(*status); } /*--------------------------------------------------------------------------*/ int fits_read_compressed_pixels(fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the array to be returned */ LONGLONG fpixel, /* I - 'first pixel to read */ LONGLONG npixel, /* I - number of pixels to read */ int nullcheck, /* I - 0 for no null checking */ /* 1: set undefined pixels = nullval */ /* 2: set nullarray=1 for undefined pixels */ void *nullval, /* I - value for undefined pixels */ void *array, /* O - array of values that are returned */ char *nullarray, /* O - array of flags = 1 if nullcheck = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a consecutive set of pixels from a compressed image. This routine interpretes the n-dimensional image as a long one-dimensional array. This is actually a rather inconvenient way to read compressed images in general, and could be rather inefficient if the requested pixels to be read are located in many different image compression tiles. The general strategy used here is to read the requested pixels in blocks that correspond to rectangular image sections. */ { int naxis, ii, bytesperpixel, planenul; long naxes[MAX_COMPRESS_DIM], nread; long nplane, inc[MAX_COMPRESS_DIM]; LONGLONG tfirst, tlast, last0, last1, dimsize[MAX_COMPRESS_DIM]; LONGLONG firstcoord[MAX_COMPRESS_DIM], lastcoord[MAX_COMPRESS_DIM]; char *arrayptr, *nullarrayptr; if (*status > 0) return(*status); arrayptr = (char *) array; nullarrayptr = nullarray; /* get size of array pixels, in bytes */ bytesperpixel = ffpxsz(datatype); for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) { naxes[ii] = 1; firstcoord[ii] = 0; lastcoord[ii] = 0; inc[ii] = 1; } /* determine the dimensions of the image to be read */ ffgidm(fptr, &naxis, status); ffgisz(fptr, MAX_COMPRESS_DIM, naxes, status); /* calc the cumulative number of pixels in each successive dimension */ dimsize[0] = 1; for (ii = 1; ii < MAX_COMPRESS_DIM; ii++) dimsize[ii] = dimsize[ii - 1] * naxes[ii - 1]; /* determine the coordinate of the first and last pixel in the image */ /* Use zero based indexes here */ tfirst = fpixel - 1; tlast = tfirst + npixel - 1; for (ii = naxis - 1; ii >= 0; ii--) { firstcoord[ii] = tfirst / dimsize[ii]; lastcoord[ii] = tlast / dimsize[ii]; tfirst = tfirst - firstcoord[ii] * dimsize[ii]; tlast = tlast - lastcoord[ii] * dimsize[ii]; } /* to simplify things, treat 1-D, 2-D, and 3-D images as separate cases */ if (naxis == 1) { /* Simple: just read the requested range of pixels */ firstcoord[0] = firstcoord[0] + 1; lastcoord[0] = lastcoord[0] + 1; fits_read_compressed_img(fptr, datatype, firstcoord, lastcoord, inc, nullcheck, nullval, array, nullarray, anynul, status); return(*status); } else if (naxis == 2) { nplane = 0; /* read 1st (and only) plane of the image */ fits_read_compressed_img_plane(fptr, datatype, bytesperpixel, nplane, firstcoord, lastcoord, inc, naxes, nullcheck, nullval, array, nullarray, anynul, &nread, status); } else if (naxis == 3) { /* test for special case: reading an integral number of planes */ if (firstcoord[0] == 0 && firstcoord[1] == 0 && lastcoord[0] == naxes[0] - 1 && lastcoord[1] == naxes[1] - 1) { for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) { /* convert from zero base to 1 base */ (firstcoord[ii])++; (lastcoord[ii])++; } /* we can read the contiguous block of pixels in one go */ fits_read_compressed_img(fptr, datatype, firstcoord, lastcoord, inc, nullcheck, nullval, array, nullarray, anynul, status); return(*status); } if (anynul) *anynul = 0; /* initialize */ /* save last coordinate in temporary variables */ last0 = lastcoord[0]; last1 = lastcoord[1]; if (firstcoord[2] < lastcoord[2]) { /* we will read up to the last pixel in all but the last plane */ lastcoord[0] = naxes[0] - 1; lastcoord[1] = naxes[1] - 1; } /* read one plane of the cube at a time, for simplicity */ for (nplane = (long) firstcoord[2]; nplane <= lastcoord[2]; nplane++) { if (nplane == lastcoord[2]) { lastcoord[0] = last0; lastcoord[1] = last1; } fits_read_compressed_img_plane(fptr, datatype, bytesperpixel, nplane, firstcoord, lastcoord, inc, naxes, nullcheck, nullval, arrayptr, nullarrayptr, &planenul, &nread, status); if (planenul && anynul) *anynul = 1; /* there are null pixels */ /* for all subsequent planes, we start with the first pixel */ firstcoord[0] = 0; firstcoord[1] = 0; /* increment pointers to next elements to be read */ arrayptr = arrayptr + nread * bytesperpixel; if (nullarrayptr && (nullcheck == 2) ) nullarrayptr = nullarrayptr + nread; } } else { ffpmsg("only 1D, 2D, or 3D images are currently supported"); return(*status = DATA_DECOMPRESSION_ERR); } return(*status); } /*--------------------------------------------------------------------------*/ int fits_read_compressed_img_plane(fitsfile *fptr, /* I - FITS file */ int datatype, /* I - datatype of the array to be returned */ int bytesperpixel, /* I - number of bytes per pixel in array */ long nplane, /* I - which plane of the cube to read */ LONGLONG *firstcoord, /* coordinate of first pixel to read */ LONGLONG *lastcoord, /* coordinate of last pixel to read */ long *inc, /* increment of pixels to read */ long *naxes, /* size of each image dimension */ int nullcheck, /* I - 0 for no null checking */ /* 1: set undefined pixels = nullval */ /* 2: set nullarray=1 for undefined pixels */ void *nullval, /* I - value for undefined pixels */ void *array, /* O - array of values that are returned */ char *nullarray, /* O - array of flags = 1 if nullcheck = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ long *nread, /* O - total number of pixels read and returned*/ int *status) /* IO - error status */ /* in general we have to read the first partial row of the image, followed by the middle complete rows, followed by the last partial row of the image. If the first or last rows are complete, then read them at the same time as all the middle rows. */ { /* bottom left coord. and top right coord. */ LONGLONG blc[MAX_COMPRESS_DIM], trc[MAX_COMPRESS_DIM]; char *arrayptr, *nullarrayptr; int tnull; if (anynul) *anynul = 0; *nread = 0; arrayptr = (char *) array; nullarrayptr = nullarray; blc[2] = nplane + 1; trc[2] = nplane + 1; if (firstcoord[0] != 0) { /* have to read a partial first row */ blc[0] = firstcoord[0] + 1; blc[1] = firstcoord[1] + 1; trc[1] = blc[1]; if (lastcoord[1] == firstcoord[1]) trc[0] = lastcoord[0] + 1; /* 1st and last pixels in same row */ else trc[0] = naxes[0]; /* read entire rest of the row */ fits_read_compressed_img(fptr, datatype, blc, trc, inc, nullcheck, nullval, arrayptr, nullarrayptr, &tnull, status); *nread = *nread + (long) (trc[0] - blc[0] + 1); if (tnull && anynul) *anynul = 1; /* there are null pixels */ if (lastcoord[1] == firstcoord[1]) { return(*status); /* finished */ } /* set starting coord to beginning of next line */ firstcoord[0] = 0; firstcoord[1] += 1; arrayptr = arrayptr + (trc[0] - blc[0] + 1) * bytesperpixel; if (nullarrayptr && (nullcheck == 2) ) nullarrayptr = nullarrayptr + (trc[0] - blc[0] + 1); } /* read contiguous complete rows of the image, if any */ blc[0] = 1; blc[1] = firstcoord[1] + 1; trc[0] = naxes[0]; if (lastcoord[0] + 1 == naxes[0]) { /* can read the last complete row, too */ trc[1] = lastcoord[1] + 1; } else { /* last row is incomplete; have to read it separately */ trc[1] = lastcoord[1]; } if (trc[1] >= blc[1]) /* must have at least one whole line to read */ { fits_read_compressed_img(fptr, datatype, blc, trc, inc, nullcheck, nullval, arrayptr, nullarrayptr, &tnull, status); *nread = *nread + (long) ((trc[1] - blc[1] + 1) * naxes[0]); if (tnull && anynul) *anynul = 1; if (lastcoord[1] + 1 == trc[1]) return(*status); /* finished */ /* increment pointers for the last partial row */ arrayptr = arrayptr + (trc[1] - blc[1] + 1) * naxes[0] * bytesperpixel; if (nullarrayptr && (nullcheck == 2) ) nullarrayptr = nullarrayptr + (trc[1] - blc[1] + 1) * naxes[0]; } if (trc[1] == lastcoord[1] + 1) return(*status); /* all done */ /* set starting and ending coord to last line */ trc[0] = lastcoord[0] + 1; trc[1] = lastcoord[1] + 1; blc[1] = trc[1]; fits_read_compressed_img(fptr, datatype, blc, trc, inc, nullcheck, nullval, arrayptr, nullarrayptr, &tnull, status); if (tnull && anynul) *anynul = 1; *nread = *nread + (long) (trc[0] - blc[0] + 1); return(*status); } /*--------------------------------------------------------------------------*/ int imcomp_get_compressed_image_par(fitsfile *infptr, int *status) /* This routine reads keywords from a BINTABLE extension containing a compressed image. */ { char keyword[FLEN_KEYWORD]; char value[FLEN_VALUE]; int ii, tstatus, doffset; long expect_nrows, maxtilelen; if (*status > 0) return(*status); /* Copy relevant header keyword values to structure */ if (ffgky (infptr, TSTRING, "ZCMPTYPE", value, NULL, status) > 0) { ffpmsg("required ZCMPTYPE compression keyword not found in"); ffpmsg(" imcomp_get_compressed_image_par"); return(*status); } (infptr->Fptr)->zcmptype[0] = '\0'; strncat((infptr->Fptr)->zcmptype, value, 11); if (!FSTRCMP(value, "RICE_1") || !FSTRCMP(value, "RICE_ONE") ) (infptr->Fptr)->compress_type = RICE_1; else if (!FSTRCMP(value, "HCOMPRESS_1") ) (infptr->Fptr)->compress_type = HCOMPRESS_1; else if (!FSTRCMP(value, "GZIP_1") ) (infptr->Fptr)->compress_type = GZIP_1; else if (!FSTRCMP(value, "GZIP_2") ) (infptr->Fptr)->compress_type = GZIP_2; else if (!FSTRCMP(value, "BZIP2_1") ) (infptr->Fptr)->compress_type = BZIP2_1; else if (!FSTRCMP(value, "PLIO_1") ) (infptr->Fptr)->compress_type = PLIO_1; else if (!FSTRCMP(value, "NOCOMPRESS") ) (infptr->Fptr)->compress_type = NOCOMPRESS; else { ffpmsg("Unknown image compression type:"); ffpmsg(value); return (*status = DATA_DECOMPRESSION_ERR); } /* get the floating point to integer quantization type, if present. */ /* FITS files produced before 2009 will not have this keyword */ tstatus = 0; if (ffgky(infptr, TSTRING, "ZQUANTIZ", value, NULL, &tstatus) > 0) { (infptr->Fptr)->quantize_method = 0; } else { if (!FSTRCMP(value, "NONE") ) { (infptr->Fptr)->quantize_level = NO_QUANTIZE; } else if (!FSTRCMP(value, "SUBTRACTIVE_DITHER_1") ) (infptr->Fptr)->quantize_method = SUBTRACTIVE_DITHER_1; else if (!FSTRCMP(value, "SUBTRACTIVE_DITHER_2") ) (infptr->Fptr)->quantize_method = SUBTRACTIVE_DITHER_2; else if (!FSTRCMP(value, "NO_DITHER") ) (infptr->Fptr)->quantize_method = NO_DITHER; else (infptr->Fptr)->quantize_method = 0; } /* get the floating point quantization dithering offset, if present. */ /* FITS files produced before October 2009 will not have this keyword */ tstatus = 0; if (ffgky(infptr, TINT, "ZDITHER0", &doffset, NULL, &tstatus) > 0) { /* by default start with 1st element of random sequence */ (infptr->Fptr)->dither_seed = 1; } else { (infptr->Fptr)->dither_seed = doffset; } if (ffgky (infptr, TINT, "ZBITPIX", &(infptr->Fptr)->zbitpix, NULL, status) > 0) { ffpmsg("required ZBITPIX compression keyword not found"); return(*status); } if (ffgky (infptr,TINT, "ZNAXIS", &(infptr->Fptr)->zndim, NULL, status) > 0) { ffpmsg("required ZNAXIS compression keyword not found"); return(*status); } if ((infptr->Fptr)->zndim < 1) { ffpmsg("Compressed image has no data (ZNAXIS < 1)"); return (*status = BAD_NAXIS); } if ((infptr->Fptr)->zndim > MAX_COMPRESS_DIM) { ffpmsg("Compressed image has too many dimensions"); return(*status = BAD_NAXIS); } expect_nrows = 1; maxtilelen = 1; for (ii = 0; ii < (infptr->Fptr)->zndim; ii++) { /* get image size */ sprintf (keyword, "ZNAXIS%d", ii+1); ffgky (infptr, TLONG,keyword, &(infptr->Fptr)->znaxis[ii],NULL,status); if (*status > 0) { ffpmsg("required ZNAXISn compression keyword not found"); return(*status); } /* get compression tile size */ sprintf (keyword, "ZTILE%d", ii+1); /* set default tile size in case keywords are not present */ if (ii == 0) (infptr->Fptr)->tilesize[0] = (infptr->Fptr)->znaxis[0]; else (infptr->Fptr)->tilesize[ii] = 1; tstatus = 0; ffgky (infptr, TLONG, keyword, &(infptr->Fptr)->tilesize[ii], NULL, &tstatus); expect_nrows *= (((infptr->Fptr)->znaxis[ii] - 1) / (infptr->Fptr)->tilesize[ii]+ 1); maxtilelen *= (infptr->Fptr)->tilesize[ii]; } /* check number of rows */ if (expect_nrows != (infptr->Fptr)->numrows) { ffpmsg( "number of table rows != the number of tiles in compressed image"); return (*status = DATA_DECOMPRESSION_ERR); } /* read any algorithm specific parameters */ if ((infptr->Fptr)->compress_type == RICE_1 ) { if (ffgky(infptr, TINT,"ZVAL1", &(infptr->Fptr)->rice_blocksize, NULL, status) > 0) { ffpmsg("required ZVAL1 compression keyword not found"); return(*status); } tstatus = 0; if (ffgky(infptr, TINT,"ZVAL2", &(infptr->Fptr)->rice_bytepix, NULL, &tstatus) > 0) { (infptr->Fptr)->rice_bytepix = 4; /* default value */ } if ((infptr->Fptr)->rice_blocksize < 16 && (infptr->Fptr)->rice_bytepix > 8) { /* values are reversed */ tstatus = (infptr->Fptr)->rice_bytepix; (infptr->Fptr)->rice_bytepix = (infptr->Fptr)->rice_blocksize; (infptr->Fptr)->rice_blocksize = tstatus; } } else if ((infptr->Fptr)->compress_type == HCOMPRESS_1 ) { if (ffgky(infptr, TFLOAT,"ZVAL1", &(infptr->Fptr)->hcomp_scale, NULL, status) > 0) { ffpmsg("required ZVAL1 compression keyword not found"); return(*status); } tstatus = 0; ffgky(infptr, TINT,"ZVAL2", &(infptr->Fptr)->hcomp_smooth, NULL, &tstatus); } /* store number of pixels in each compression tile, */ /* and max size of the compressed tile buffer */ (infptr->Fptr)->maxtilelen = maxtilelen; (infptr->Fptr)->maxelem = imcomp_calc_max_elem ((infptr->Fptr)->compress_type, maxtilelen, (infptr->Fptr)->zbitpix, (infptr->Fptr)->rice_blocksize); /* Get Column numbers. */ if (ffgcno(infptr, CASEINSEN, "COMPRESSED_DATA", &(infptr->Fptr)->cn_compressed, status) > 0) { ffpmsg("couldn't find COMPRESSED_DATA column (fits_get_compressed_img_par)"); return(*status = DATA_DECOMPRESSION_ERR); } ffpmrk(); /* put mark on message stack; erase any messages after this */ tstatus = 0; ffgcno(infptr,CASEINSEN, "UNCOMPRESSED_DATA", &(infptr->Fptr)->cn_uncompressed, &tstatus); tstatus = 0; ffgcno(infptr,CASEINSEN, "GZIP_COMPRESSED_DATA", &(infptr->Fptr)->cn_gzip_data, &tstatus); tstatus = 0; if (ffgcno(infptr, CASEINSEN, "ZSCALE", &(infptr->Fptr)->cn_zscale, &tstatus) > 0) { /* CMPSCALE column doesn't exist; see if there is a keyword */ tstatus = 0; if (ffgky(infptr, TDOUBLE, "ZSCALE", &(infptr->Fptr)->zscale, NULL, &tstatus) <= 0) (infptr->Fptr)->cn_zscale = -1; /* flag for a constant ZSCALE */ } tstatus = 0; if (ffgcno(infptr, CASEINSEN, "ZZERO", &(infptr->Fptr)->cn_zzero, &tstatus) > 0) { /* CMPZERO column doesn't exist; see if there is a keyword */ tstatus = 0; if (ffgky(infptr, TDOUBLE, "ZZERO", &(infptr->Fptr)->zzero, NULL, &tstatus) <= 0) (infptr->Fptr)->cn_zzero = -1; /* flag for a constant ZZERO */ } tstatus = 0; if (ffgcno(infptr, CASEINSEN, "ZBLANK", &(infptr->Fptr)->cn_zblank, &tstatus) > 0) { /* ZBLANK column doesn't exist; see if there is a keyword */ tstatus = 0; if (ffgky(infptr, TINT, "ZBLANK", &(infptr->Fptr)->zblank, NULL, &tstatus) <= 0) { (infptr->Fptr)->cn_zblank = -1; /* flag for a constant ZBLANK */ } else { /* ZBLANK keyword doesn't exist; see if there is a BLANK keyword */ tstatus = 0; if (ffgky(infptr, TINT, "BLANK", &(infptr->Fptr)->zblank, NULL, &tstatus) <= 0) (infptr->Fptr)->cn_zblank = -1; /* flag for a constant ZBLANK */ } } /* read the conventional BSCALE and BZERO scaling keywords, if present */ tstatus = 0; if (ffgky (infptr, TDOUBLE, "BSCALE", &(infptr->Fptr)->cn_bscale, NULL, &tstatus) > 0) { (infptr->Fptr)->cn_bscale = 1.0; } tstatus = 0; if (ffgky (infptr, TDOUBLE, "BZERO", &(infptr->Fptr)->cn_bzero, NULL, &tstatus) > 0) { (infptr->Fptr)->cn_bzero = 0.0; (infptr->Fptr)->cn_actual_bzero = 0.0; } else { (infptr->Fptr)->cn_actual_bzero = (infptr->Fptr)->cn_bzero; } ffcmrk(); /* clear any spurious error messages, back to the mark */ return (*status); } /*--------------------------------------------------------------------------*/ int imcomp_copy_imheader(fitsfile *infptr, fitsfile *outfptr, int *status) /* This routine reads the header keywords from the input image and copies them to the output image; the manditory structural keywords and the checksum keywords are not copied. If the DATE keyword is copied, then it is updated with the current date and time. */ { int nkeys, ii, keyclass; char card[FLEN_CARD]; /* a header record */ if (*status > 0) return(*status); ffghsp(infptr, &nkeys, NULL, status); /* get number of keywords in image */ for (ii = 5; ii <= nkeys; ii++) /* skip the first 4 keywords */ { ffgrec(infptr, ii, card, status); keyclass = ffgkcl(card); /* Get the type/class of keyword */ /* don't copy structural keywords or checksum keywords */ if ((keyclass <= TYP_CMPRS_KEY) || (keyclass == TYP_CKSUM_KEY)) continue; if (FSTRNCMP(card, "DATE ", 5) == 0) /* write current date */ { ffpdat(outfptr, status); } else if (FSTRNCMP(card, "EXTNAME ", 8) == 0) { /* don't copy default EXTNAME keyword from a compressed image */ if (FSTRNCMP(card, "EXTNAME = 'COMPRESSED_IMAGE'", 28)) { /* if EXTNAME keyword already exists, overwrite it */ /* otherwise append a new EXTNAME keyword */ ffucrd(outfptr, "EXTNAME", card, status); } } else { /* just copy the keyword to the output header */ ffprec (outfptr, card, status); } if (*status > 0) return (*status); } return (*status); } /*--------------------------------------------------------------------------*/ int imcomp_copy_img2comp(fitsfile *infptr, fitsfile *outfptr, int *status) /* This routine copies the header keywords from the uncompressed input image and to the compressed image (in a binary table) */ { char card[FLEN_CARD], card2[FLEN_CARD]; /* a header record */ int nkeys, nmore, ii, jj, tstatus, bitpix; /* tile compressed image keyword translation table */ /* INPUT OUTPUT */ /* 01234567 01234567 */ char *patterns[][2] = {{"SIMPLE", "ZSIMPLE" }, {"XTENSION", "ZTENSION" }, {"BITPIX", "ZBITPIX" }, {"NAXIS", "ZNAXIS" }, {"NAXISm", "ZNAXISm" }, {"EXTEND", "ZEXTEND" }, {"BLOCKED", "ZBLOCKED"}, {"PCOUNT", "ZPCOUNT" }, {"GCOUNT", "ZGCOUNT" }, {"CHECKSUM","ZHECKSUM"}, /* save original checksums */ {"DATASUM", "ZDATASUM"}, {"*", "+" }}; /* copy all other keywords */ int npat; if (*status > 0) return(*status); /* write a default EXTNAME keyword if it doesn't exist in input file*/ fits_read_card(infptr, "EXTNAME", card, status); if (*status) { *status = 0; strcpy(card, "EXTNAME = 'COMPRESSED_IMAGE'"); fits_write_record(outfptr, card, status); } /* copy all the keywords from the input file to the output */ npat = sizeof(patterns)/sizeof(patterns[0][0])/2; fits_translate_keywords(infptr, outfptr, 1, patterns, npat, 0, 0, 0, status); if ( (outfptr->Fptr)->request_lossy_int_compress != 0) { /* request was made to compress integer images as if they had float pixels. */ /* If input image has positive bitpix value, then reset the output ZBITPIX */ /* value to -32. */ fits_read_key(infptr, TINT, "BITPIX", &bitpix, NULL, status); if (*status <= 0 && bitpix > 0) { fits_modify_key_lng(outfptr, "ZBITPIX", -32, NULL, status); /* also delete the BSCALE, BZERO, and BLANK keywords */ tstatus = 0; fits_delete_key(outfptr, "BSCALE", &tstatus); tstatus = 0; fits_delete_key(outfptr, "BZERO", &tstatus); tstatus = 0; fits_delete_key(outfptr, "BLANK", &tstatus); } } /* For compatibility with software that uses an older version of CFITSIO, we must make certain that the new ZQUANTIZ keyword, if it exists, must occur after the other peudo-required keywords (e.g., ZSIMPLE, ZBITPIX, etc.). Do this by trying to delete the keyword. If that succeeds (and thus the keyword did exist) then rewrite the keyword at the end of header. In principle this should not be necessary once all software has upgraded to a newer version of CFITSIO (version number greater than 3.181, newer than August 2009). Do the same for the new ZDITHER0 keyword. */ tstatus = 0; if (fits_read_card(outfptr, "ZQUANTIZ", card, &tstatus) == 0) { fits_delete_key(outfptr, "ZQUANTIZ", status); /* rewrite the deleted keyword at the end of the header */ fits_write_record(outfptr, card, status); /* write some associated HISTORY keywords */ fits_parse_value(card, card2, NULL, status); if (strncasecmp(card2, "'NONE", 5) ) { /* the value is not 'NONE' */ fits_write_history(outfptr, "Image was compressed by CFITSIO using scaled integer quantization:", status); sprintf(card2, " q = %f / quantized level scaling parameter", (outfptr->Fptr)->request_quantize_level); fits_write_history(outfptr, card2, status); fits_write_history(outfptr, card+10, status); } } tstatus = 0; if (fits_read_card(outfptr, "ZDITHER0", card, &tstatus) == 0) { fits_delete_key(outfptr, "ZDITHER0", status); /* rewrite the deleted keyword at the end of the header */ fits_write_record(outfptr, card, status); } ffghsp(infptr, &nkeys, &nmore, status); /* get number of keywords in image */ nmore = nmore / 36; /* how many completely empty header blocks are there? */ /* preserve the same number of spare header blocks in the output header */ for (jj = 0; jj < nmore; jj++) for (ii = 0; ii < 36; ii++) fits_write_record(outfptr, " ", status); return (*status); } /*--------------------------------------------------------------------------*/ int imcomp_copy_comp2img(fitsfile *infptr, fitsfile *outfptr, int norec, int *status) /* This routine copies the header keywords from the compressed input image and to the uncompressed image (in a binary table) */ { char card[FLEN_CARD]; /* a header record */ char *patterns[40][2]; char negative[] = "-"; int ii,jj, npat, nreq, nsp, tstatus = 0; int nkeys, nmore; /* tile compressed image keyword translation table */ /* INPUT OUTPUT */ /* 01234567 01234567 */ /* only translate these if required keywords not already written */ char *reqkeys[][2] = { {"ZSIMPLE", "SIMPLE" }, {"ZTENSION", "XTENSION"}, {"ZBITPIX", "BITPIX" }, {"ZNAXIS", "NAXIS" }, {"ZNAXISm", "NAXISm" }, {"ZEXTEND", "EXTEND" }, {"ZBLOCKED", "BLOCKED"}, {"ZPCOUNT", "PCOUNT" }, {"ZGCOUNT", "GCOUNT" }, {"ZHECKSUM", "CHECKSUM"}, /* restore original checksums */ {"ZDATASUM", "DATASUM"}}; /* other special keywords */ char *spkeys[][2] = { {"XTENSION", "-" }, {"BITPIX", "-" }, {"NAXIS", "-" }, {"NAXISm", "-" }, {"PCOUNT", "-" }, {"GCOUNT", "-" }, {"TFIELDS", "-" }, {"TTYPEm", "-" }, {"TFORMm", "-" }, {"ZIMAGE", "-" }, {"ZQUANTIZ", "-" }, {"ZDITHER0", "-" }, {"ZTILEm", "-" }, {"ZCMPTYPE", "-" }, {"ZBLANK", "-" }, {"ZNAMEm", "-" }, {"ZVALm", "-" }, {"CHECKSUM","-" }, /* delete checksums */ {"DATASUM", "-" }, {"EXTNAME", "+" }, /* we may change this, below */ {"*", "+" }}; if (*status > 0) return(*status); nreq = sizeof(reqkeys)/sizeof(reqkeys[0][0])/2; nsp = sizeof(spkeys)/sizeof(spkeys[0][0])/2; /* construct translation patterns */ for (ii = 0; ii < nreq; ii++) { patterns[ii][0] = reqkeys[ii][0]; if (norec) patterns[ii][1] = negative; else patterns[ii][1] = reqkeys[ii][1]; } for (ii = 0; ii < nsp; ii++) { patterns[ii+nreq][0] = spkeys[ii][0]; patterns[ii+nreq][1] = spkeys[ii][1]; } npat = nreq + nsp; /* see if the EXTNAME keyword should be copied or not */ fits_read_card(infptr, "EXTNAME", card, &tstatus); if (tstatus == 0) { if (!strncmp(card, "EXTNAME = 'COMPRESSED_IMAGE'", 28)) patterns[npat-2][1] = negative; } /* translate and copy the keywords from the input file to the output */ fits_translate_keywords(infptr, outfptr, 1, patterns, npat, 0, 0, 0, status); ffghsp(infptr, &nkeys, &nmore, status); /* get number of keywords in image */ nmore = nmore / 36; /* how many completely empty header blocks are there? */ /* preserve the same number of spare header blocks in the output header */ for (jj = 0; jj < nmore; jj++) for (ii = 0; ii < 36; ii++) fits_write_record(outfptr, " ", status); return (*status); } /*--------------------------------------------------------------------------*/ int imcomp_copy_prime2img(fitsfile *infptr, fitsfile *outfptr, int *status) /* This routine copies any unexpected keywords from the primary array of the compressed input image into the header of the uncompressed image (which is the primary array of the output file). */ { int nsp; /* keywords that will not be copied */ char *spkeys[][2] = { {"SIMPLE", "-" }, {"BITPIX", "-" }, {"NAXIS", "-" }, {"NAXISm", "-" }, {"PCOUNT", "-" }, {"EXTEND", "-" }, {"GCOUNT", "-" }, {"CHECKSUM","-" }, {"DATASUM", "-" }, {"EXTNAME", "-" }, {"HISTORY", "-" }, {"COMMENT", "-" }, {"*", "+" }}; if (*status > 0) return(*status); nsp = sizeof(spkeys)/sizeof(spkeys[0][0])/2; /* translate and copy the keywords from the input file to the output */ fits_translate_keywords(infptr, outfptr, 1, spkeys, nsp, 0, 0, 0, status); return (*status); } /*--------------------------------------------------------------------------*/ int imcomp_decompress_tile (fitsfile *infptr, int nrow, /* I - row of table to read and uncompress */ int tilelen, /* I - number of pixels in the tile */ int datatype, /* I - datatype to be returned in 'buffer' */ int nullcheck, /* I - 0 for no null checking */ void *nulval, /* I - value to be used for undefined pixels */ void *buffer, /* O - buffer for returned decompressed values */ char *bnullarray, /* O - buffer for returned null flags */ int *anynul, /* O - any null values returned? */ int *status) /* This routine decompresses one tile of the image */ { int *idata = 0; int tiledatatype, pixlen; /* uncompressed integer data */ size_t idatalen, tilebytesize; int ii, tnull; /* value in the data which represents nulls */ unsigned char *cbuf; /* compressed data */ unsigned char charnull = 0; short snull = 0; int blocksize, ntilebins, tilecol; float fnulval=0; float *tempfloat = 0; double dnulval=0; double bscale, bzero, actual_bzero, dummy = 0; /* scaling parameters */ long nelem = 0, offset = 0, tilesize; /* number of bytes */ int smooth, nx, ny, scale; /* hcompress parameters */ if (*status > 0) return(*status); /* **************************************************************** */ /* allocate pointers to array of cached uncompressed tiles, if not already done */ if ((infptr->Fptr)->tilerow == 0) { /* calculate number of column bins of compressed tile */ ntilebins = (((infptr->Fptr)->znaxis[0] - 1) / ((infptr->Fptr)->tilesize[0])) + 1; if ((infptr->Fptr)->znaxis[0] != (infptr->Fptr)->tilesize[0] || (infptr->Fptr)->tilesize[1] != 1 ) { /* don't cache the tile if only single row of the image */ (infptr->Fptr)->tilerow = (int *) calloc (ntilebins, sizeof(int)); (infptr->Fptr)->tiledata = (void**) calloc (ntilebins, sizeof(void*)); (infptr->Fptr)->tilenullarray = (void **) calloc (ntilebins, sizeof(char*)); (infptr->Fptr)->tiledatasize = (long *) calloc (ntilebins, sizeof(long)); (infptr->Fptr)->tiletype = (int *) calloc (ntilebins, sizeof(int)); (infptr->Fptr)->tileanynull = (int *) calloc (ntilebins, sizeof(int)); } } /* **************************************************************** */ /* check if this tile was cached; if so, just copy it out */ if ((infptr->Fptr)->tilerow) { /* calculate the column bin of the compressed tile */ tilecol = (nrow - 1) % ((long)(((infptr->Fptr)->znaxis[0] - 1) / ((infptr->Fptr)->tilesize[0])) + 1); if (nrow == (infptr->Fptr)->tilerow[tilecol] && datatype == (infptr->Fptr)->tiletype[tilecol] ) { memcpy(buffer, ((infptr->Fptr)->tiledata)[tilecol], (infptr->Fptr)->tiledatasize[tilecol]); if (nullcheck == 2) memcpy(bnullarray, (infptr->Fptr)->tilenullarray[tilecol], tilelen); *anynul = (infptr->Fptr)->tileanynull[tilecol]; return(*status); } } /* **************************************************************** */ /* get length of the compressed byte stream */ ffgdes (infptr, (infptr->Fptr)->cn_compressed, nrow, &nelem, &offset, status); /* EOF error here indicates that this tile has not yet been written */ if (*status == END_OF_FILE) return(*status = NO_COMPRESSED_TILE); /* **************************************************************** */ if (nelem == 0) /* special case: tile was not compressed normally */ { if ((infptr->Fptr)->cn_uncompressed >= 1 ) { /* This option of writing the uncompressed floating point data */ /* to the tile compressed file was used until about May 2011. */ /* This was replaced by the more efficient option of gzipping the */ /* floating point data before writing it to the tile-compressed file */ /* no compressed data, so simply read the uncompressed data */ /* directly from the UNCOMPRESSED_DATA column */ ffgdes (infptr, (infptr->Fptr)->cn_uncompressed, nrow, &nelem, &offset, status); if (nelem == 0 && offset == 0) /* this should never happen */ return (*status = NO_COMPRESSED_TILE); if (nullcheck <= 1) { /* set any null values in the array = nulval */ fits_read_col(infptr, datatype, (infptr->Fptr)->cn_uncompressed, nrow, 1, nelem, nulval, buffer, anynul, status); } else { /* set the bnullarray = 1 for any null values in the array */ fits_read_colnull(infptr, datatype, (infptr->Fptr)->cn_uncompressed, nrow, 1, nelem, buffer, bnullarray, anynul, status); } } else if ((infptr->Fptr)->cn_gzip_data >= 1) { /* This is the newer option, that was introduced in May 2011 */ /* floating point data was not quantized, so read the losslessly */ /* compressed data from the GZIP_COMPRESSED_DATA column */ ffgdes (infptr, (infptr->Fptr)->cn_gzip_data, nrow, &nelem, &offset, status); if (nelem == 0 && offset == 0) /* this should never happen */ return (*status = NO_COMPRESSED_TILE); /* allocate memory for the compressed tile of data */ cbuf = (unsigned char *) malloc (nelem); if (cbuf == NULL) { ffpmsg("error allocating memory for gzipped tile (imcomp_decompress_tile)"); return (*status = MEMORY_ALLOCATION); } /* read array of compressed bytes */ if (fits_read_col(infptr, TBYTE, (infptr->Fptr)->cn_gzip_data, nrow, 1, nelem, &charnull, cbuf, NULL, status) > 0) { ffpmsg("error reading compressed byte stream from binary table"); free (cbuf); return (*status); } /* size of the returned (uncompressed) data buffer, in bytes */ if ((infptr->Fptr)->zbitpix == FLOAT_IMG) { idatalen = tilelen * sizeof(float); } else if ((infptr->Fptr)->zbitpix == DOUBLE_IMG) { idatalen = tilelen * sizeof(double); } else { /* this should never happen! */ ffpmsg("incompatible data type in gzipped floating-point tile-compressed image"); free (cbuf); return (*status = DATA_DECOMPRESSION_ERR); } if (datatype == TDOUBLE && (infptr->Fptr)->zbitpix == FLOAT_IMG) { /* have to allocat a temporary buffer for the uncompressed data in the */ /* case where a gzipped "float" tile is returned as a "double" array */ tempfloat = (float*) malloc (idatalen); if (tempfloat == NULL) { ffpmsg("Memory allocation failure for tempfloat. (imcomp_decompress_tile)"); free (cbuf); return (*status = MEMORY_ALLOCATION); } /* uncompress the data into temp buffer */ if (uncompress2mem_from_mem ((char *)cbuf, nelem, (char **) &tempfloat, &idatalen, NULL, &tilebytesize, status)) { ffpmsg("failed to gunzip the image tile"); free (tempfloat); free (cbuf); return (*status); } } else { /* uncompress the data directly into the output buffer in all other cases */ if (uncompress2mem_from_mem ((char *)cbuf, nelem, (char **) &buffer, &idatalen, NULL, &tilebytesize, status)) { ffpmsg("failed to gunzip the image tile"); free (cbuf); return (*status); } } free(cbuf); /* do byte swapping and null value substitution for the tile of pixels */ if (tilebytesize == 4 * tilelen) { /* float pixels */ #if BYTESWAPPED if (tempfloat) ffswap4((int *) tempfloat, tilelen); else ffswap4((int *) buffer, tilelen); #endif if (datatype == TFLOAT) { if (nulval) { fnulval = *(float *) nulval; } fffr4r4((float *) buffer, (long) tilelen, 1., 0., nullcheck, fnulval, bnullarray, anynul, (float *) buffer, status); } else if (datatype == TDOUBLE) { if (nulval) { dnulval = *(double *) nulval; } /* note that the R*4 data are in the tempfloat array in this case */ fffr4r8((float *) tempfloat, (long) tilelen, 1., 0., nullcheck, dnulval, bnullarray, anynul, (double *) buffer, status); free(tempfloat); } else { ffpmsg("implicit data type conversion is not supported for gzipped image tiles"); return (*status = DATA_DECOMPRESSION_ERR); } } else if (tilebytesize == 8 * tilelen) { /* double pixels */ #if BYTESWAPPED ffswap8((double *) buffer, tilelen); #endif if (datatype == TFLOAT) { if (nulval) { fnulval = *(float *) nulval; } fffr8r4((double *) buffer, (long) tilelen, 1., 0., nullcheck, fnulval, bnullarray, anynul, (float *) buffer, status); } else if (datatype == TDOUBLE) { if (nulval) { dnulval = *(double *) nulval; } fffr8r8((double *) buffer, (long) tilelen, 1., 0., nullcheck, dnulval, bnullarray, anynul, (double *) buffer, status); } else { ffpmsg("implicit data type conversion is not supported in tile-compressed images"); return (*status = DATA_DECOMPRESSION_ERR); } } else { ffpmsg("error: uncompressed tile has wrong size"); return (*status = DATA_DECOMPRESSION_ERR); } /* end of special case of losslessly gzipping a floating-point image tile */ } else { /* this should never happen */ *status = NO_COMPRESSED_TILE; } return(*status); } /* **************************************************************** */ /* deal with the normal case of a compressed tile of pixels */ if (nullcheck == 2) { for (ii = 0; ii < tilelen; ii++) /* initialize the null flage array */ bnullarray[ii] = 0; } if (anynul) *anynul = 0; /* get linear scaling and offset values, if they exist */ actual_bzero = (infptr->Fptr)->cn_actual_bzero; if ((infptr->Fptr)->cn_zscale == 0) { /* set default scaling, if scaling is not defined */ bscale = 1.; bzero = 0.; } else if ((infptr->Fptr)->cn_zscale == -1) { bscale = (infptr->Fptr)->zscale; bzero = (infptr->Fptr)->zzero; } else { /* read the linear scale and offset values for this row */ ffgcvd (infptr, (infptr->Fptr)->cn_zscale, nrow, 1, 1, 0., &bscale, NULL, status); ffgcvd (infptr, (infptr->Fptr)->cn_zzero, nrow, 1, 1, 0., &bzero, NULL, status); if (*status > 0) { ffpmsg("error reading scaling factor and offset for compressed tile"); return (*status); } /* test if floating-point FITS image also has non-default BSCALE and */ /* BZERO keywords. If so, we have to combine the 2 linear scaling factors. */ if ( ((infptr->Fptr)->zbitpix == FLOAT_IMG || (infptr->Fptr)->zbitpix == DOUBLE_IMG ) && ((infptr->Fptr)->cn_bscale != 1.0 || (infptr->Fptr)->cn_bzero != 0.0 ) ) { bscale = bscale * (infptr->Fptr)->cn_bscale; bzero = bzero * (infptr->Fptr)->cn_bscale + (infptr->Fptr)->cn_bzero; } } if (bscale == 1.0 && bzero == 0.0 ) { /* if no other scaling has been specified, try using the values given by the BSCALE and BZERO keywords, if any */ bscale = (infptr->Fptr)->cn_bscale; bzero = (infptr->Fptr)->cn_bzero; } /* ************************************************************* */ /* get the value used to represent nulls in the int array */ if ((infptr->Fptr)->cn_zblank == 0) { nullcheck = 0; /* no null value; don't check for nulls */ } else if ((infptr->Fptr)->cn_zblank == -1) { tnull = (infptr->Fptr)->zblank; /* use the the ZBLANK keyword */ } else { /* read the null value for this row */ ffgcvk (infptr, (infptr->Fptr)->cn_zblank, nrow, 1, 1, 0, &tnull, NULL, status); if (*status > 0) { ffpmsg("error reading null value for compressed tile"); return (*status); } } /* ************************************************************* */ /* allocate memory for the uncompressed array of tile integers */ /* The size depends on the datatype and the compression type. */ if ((infptr->Fptr)->compress_type == HCOMPRESS_1 && ((infptr->Fptr)->zbitpix != BYTE_IMG && (infptr->Fptr)->zbitpix != SHORT_IMG) ) { idatalen = tilelen * sizeof(LONGLONG); /* 8 bytes per pixel */ } else if ( (infptr->Fptr)->compress_type == RICE_1 && (infptr->Fptr)->zbitpix == BYTE_IMG && (infptr->Fptr)->rice_bytepix == 1) { idatalen = tilelen * sizeof(char); /* 1 byte per pixel */ } else if ( ( (infptr->Fptr)->compress_type == GZIP_1 || (infptr->Fptr)->compress_type == GZIP_2 || (infptr->Fptr)->compress_type == BZIP2_1 ) && (infptr->Fptr)->zbitpix == BYTE_IMG ) { idatalen = tilelen * sizeof(char); /* 1 byte per pixel */ } else if ( (infptr->Fptr)->compress_type == RICE_1 && (infptr->Fptr)->zbitpix == SHORT_IMG && (infptr->Fptr)->rice_bytepix == 2) { idatalen = tilelen * sizeof(short); /* 2 bytes per pixel */ } else if ( ( (infptr->Fptr)->compress_type == GZIP_1 || (infptr->Fptr)->compress_type == GZIP_2 || (infptr->Fptr)->compress_type == BZIP2_1 ) && (infptr->Fptr)->zbitpix == SHORT_IMG ) { idatalen = tilelen * sizeof(short); /* 2 bytes per pixel */ } else if ( ( (infptr->Fptr)->compress_type == GZIP_1 || (infptr->Fptr)->compress_type == GZIP_2 || (infptr->Fptr)->compress_type == BZIP2_1 ) && (infptr->Fptr)->zbitpix == DOUBLE_IMG ) { idatalen = tilelen * sizeof(double); /* 8 bytes per pixel */ } else { idatalen = tilelen * sizeof(int); /* all other cases have int pixels */ } idata = (int*) malloc (idatalen); if (idata == NULL) { ffpmsg("Memory allocation failure for idata. (imcomp_decompress_tile)"); return (*status = MEMORY_ALLOCATION); } /* ************************************************************* */ /* allocate memory for the compressed bytes */ if ((infptr->Fptr)->compress_type == PLIO_1) { cbuf = (unsigned char *) malloc (nelem * sizeof (short)); } else { cbuf = (unsigned char *) malloc (nelem); } if (cbuf == NULL) { ffpmsg("Out of memory for cbuf. (imcomp_decompress_tile)"); free(idata); return (*status = MEMORY_ALLOCATION); } /* ************************************************************* */ /* read the compressed bytes from the FITS file */ if ((infptr->Fptr)->compress_type == PLIO_1) { fits_read_col(infptr, TSHORT, (infptr->Fptr)->cn_compressed, nrow, 1, nelem, &snull, (short *) cbuf, NULL, status); } else { fits_read_col(infptr, TBYTE, (infptr->Fptr)->cn_compressed, nrow, 1, nelem, &charnull, cbuf, NULL, status); } if (*status > 0) { ffpmsg("error reading compressed byte stream from binary table"); free (cbuf); free(idata); return (*status); } /* ************************************************************* */ /* call the algorithm-specific code to uncompress the tile */ if ((infptr->Fptr)->compress_type == RICE_1) { blocksize = (infptr->Fptr)->rice_blocksize; if ((infptr->Fptr)->rice_bytepix == 1 ) { *status = fits_rdecomp_byte (cbuf, nelem, (unsigned char *)idata, tilelen, blocksize); tiledatatype = TBYTE; } else if ((infptr->Fptr)->rice_bytepix == 2 ) { *status = fits_rdecomp_short (cbuf, nelem, (unsigned short *)idata, tilelen, blocksize); tiledatatype = TSHORT; } else { *status = fits_rdecomp (cbuf, nelem, (unsigned int *)idata, tilelen, blocksize); tiledatatype = TINT; } /* ************************************************************* */ } else if ((infptr->Fptr)->compress_type == HCOMPRESS_1) { smooth = (infptr->Fptr)->hcomp_smooth; if ( ((infptr->Fptr)->zbitpix == BYTE_IMG || (infptr->Fptr)->zbitpix == SHORT_IMG)) { *status = fits_hdecompress(cbuf, smooth, idata, &nx, &ny, &scale, status); } else { /* zbitpix = LONG_IMG (32) */ /* idata must have been allocated twice as large for this to work */ *status = fits_hdecompress64(cbuf, smooth, (LONGLONG *) idata, &nx, &ny, &scale, status); } tiledatatype = TINT; /* ************************************************************* */ } else if ((infptr->Fptr)->compress_type == PLIO_1) { pl_l2pi ((short *) cbuf, 1, idata, tilelen); /* uncompress the data */ tiledatatype = TINT; /* ************************************************************* */ } else if ( ((infptr->Fptr)->compress_type == GZIP_1) || ((infptr->Fptr)->compress_type == GZIP_2) ) { uncompress2mem_from_mem ((char *)cbuf, nelem, (char **) &idata, &idatalen, realloc, &tilebytesize, status); /* determine the data type of the uncompressed array, and */ /* do byte unshuffling and unswapping if needed */ if (tilebytesize == (size_t) (tilelen * 2)) { /* this is a short I*2 array */ tiledatatype = TSHORT; if ( (infptr->Fptr)->compress_type == GZIP_2 ) fits_unshuffle_2bytes((char *) idata, tilelen, status); #if BYTESWAPPED ffswap2((short *) idata, tilelen); #endif } else if (tilebytesize == (size_t) (tilelen * 4)) { /* this is a int I*4 array (or maybe R*4) */ tiledatatype = TINT; if ( (infptr->Fptr)->compress_type == GZIP_2 ) fits_unshuffle_4bytes((char *) idata, tilelen, status); #if BYTESWAPPED ffswap4(idata, tilelen); #endif } else if (tilebytesize == (size_t) (tilelen * 8)) { /* this is a R*8 double array */ tiledatatype = TDOUBLE; if ( (infptr->Fptr)->compress_type == GZIP_2 ) fits_unshuffle_8bytes((char *) idata, tilelen, status); #if BYTESWAPPED ffswap8((double *) idata, tilelen); #endif } else if (tilebytesize == (size_t) tilelen) { /* this is an unsigned char I*1 array */ tiledatatype = TBYTE; } else { ffpmsg("error: uncompressed tile has wrong size"); free(idata); return (*status = DATA_DECOMPRESSION_ERR); } /* ************************************************************* */ } else if ((infptr->Fptr)->compress_type == BZIP2_1) { /* BZIP2 is not supported in the public release; this is only for test purposes if (BZ2_bzBuffToBuffDecompress ((char *) idata, &idatalen, (char *)cbuf, (unsigned int) nelem, 0, 0) ) */ { ffpmsg("bzip2 decompression error"); free(idata); free (cbuf); return (*status = DATA_DECOMPRESSION_ERR); } if ((infptr->Fptr)->zbitpix == BYTE_IMG) { tiledatatype = TBYTE; } else if ((infptr->Fptr)->zbitpix == SHORT_IMG) { tiledatatype = TSHORT; #if BYTESWAPPED ffswap2((short *) idata, tilelen); #endif } else { tiledatatype = TINT; #if BYTESWAPPED ffswap4(idata, tilelen); #endif } /* ************************************************************* */ } else { ffpmsg("unknown compression algorithm"); free(idata); return (*status = DATA_DECOMPRESSION_ERR); } free(cbuf); if (*status) { /* error uncompressing the tile */ free(idata); return (*status); } /* ************************************************************* */ /* copy the uncompressed tile data to the output buffer, doing */ /* null checking, datatype conversion and linear scaling, if necessary */ if (nulval == 0) nulval = &dummy; /* set address to dummy value */ if (datatype == TSHORT) { pixlen = sizeof(short); if ((infptr->Fptr)->quantize_level == NO_QUANTIZE) { /* the floating point pixels were losselessly compressed with GZIP */ /* Just have to copy the values to the output array */ if (tiledatatype == TINT) { fffr4i2((float *) idata, tilelen, bscale, bzero, nullcheck, *(short *) nulval, bnullarray, anynul, (short *) buffer, status); } else { fffr8i2((double *) idata, tilelen, bscale, bzero, nullcheck, *(short *) nulval, bnullarray, anynul, (short *) buffer, status); } } else if (tiledatatype == TINT) if ((infptr->Fptr)->compress_type == PLIO_1 && bzero == 0. && actual_bzero == 32768.) { /* special case where unsigned 16-bit integers have been */ /* offset by +32768 when using PLIO */ fffi4i2(idata, tilelen, bscale, -32768., nullcheck, tnull, *(short *) nulval, bnullarray, anynul, (short *) buffer, status); } else { fffi4i2(idata, tilelen, bscale, bzero, nullcheck, tnull, *(short *) nulval, bnullarray, anynul, (short *) buffer, status); /* Hcompress is a special case: ignore any numerical overflow errors that may have occurred during the integer*4 to integer*2 convertion. Overflows can happen when a lossy Hcompress algorithm is invoked (with a non-zero scale factor). The fffi4i2 routine clips the returned values to be within the legal I*2 range, so all we need to is to reset the error status to zero. */ if ((infptr->Fptr)->compress_type == HCOMPRESS_1) { if (*status == NUM_OVERFLOW) *status = 0; } } else if (tiledatatype == TSHORT) fffi2i2((short *)idata, tilelen, bscale, bzero, nullcheck, (short) tnull, *(short *) nulval, bnullarray, anynul, (short *) buffer, status); else if (tiledatatype == TBYTE) fffi1i2((unsigned char *)idata, tilelen, bscale, bzero, nullcheck, (unsigned char) tnull, *(short *) nulval, bnullarray, anynul, (short *) buffer, status); } else if (datatype == TINT) { pixlen = sizeof(int); if ((infptr->Fptr)->quantize_level == NO_QUANTIZE) { /* the floating point pixels were losselessly compressed with GZIP */ /* Just have to copy the values to the output array */ if (tiledatatype == TINT) { fffr4int((float *) idata, tilelen, bscale, bzero, nullcheck, *(int *) nulval, bnullarray, anynul, (int *) buffer, status); } else { fffr8int((double *) idata, tilelen, bscale, bzero, nullcheck, *(int *) nulval, bnullarray, anynul, (int *) buffer, status); } } else if (tiledatatype == TINT) fffi4int(idata, (long) tilelen, bscale, bzero, nullcheck, tnull, *(int *) nulval, bnullarray, anynul, (int *) buffer, status); else if (tiledatatype == TSHORT) fffi2int((short *)idata, tilelen, bscale, bzero, nullcheck, (short) tnull, *(int *) nulval, bnullarray, anynul, (int *) buffer, status); else if (tiledatatype == TBYTE) fffi1int((unsigned char *)idata, tilelen, bscale, bzero, nullcheck, (unsigned char) tnull, *(int *) nulval, bnullarray, anynul, (int *) buffer, status); } else if (datatype == TLONG) { pixlen = sizeof(long); if ((infptr->Fptr)->quantize_level == NO_QUANTIZE) { /* the floating point pixels were losselessly compressed with GZIP */ /* Just have to copy the values to the output array */ if (tiledatatype == TINT) { fffr4i4((float *) idata, tilelen, bscale, bzero, nullcheck, *(long *) nulval, bnullarray, anynul, (long *) buffer, status); } else { fffr8i4((double *) idata, tilelen, bscale, bzero, nullcheck, *(long *) nulval, bnullarray, anynul, (long *) buffer, status); } } else if (tiledatatype == TINT) fffi4i4(idata, tilelen, bscale, bzero, nullcheck, tnull, *(long *) nulval, bnullarray, anynul, (long *) buffer, status); else if (tiledatatype == TSHORT) fffi2i4((short *)idata, tilelen, bscale, bzero, nullcheck, (short) tnull, *(long *) nulval, bnullarray, anynul, (long *) buffer, status); else if (tiledatatype == TBYTE) fffi1i4((unsigned char *)idata, tilelen, bscale, bzero, nullcheck, (unsigned char) tnull, *(long *) nulval, bnullarray, anynul, (long *) buffer, status); } else if (datatype == TFLOAT) { pixlen = sizeof(float); if (nulval) { fnulval = *(float *) nulval; } if ((infptr->Fptr)->quantize_level == NO_QUANTIZE) { /* the floating point pixels were losselessly compressed with GZIP */ /* Just have to copy the values to the output array */ if (tiledatatype == TINT) { fffr4r4((float *) idata, tilelen, bscale, bzero, nullcheck, fnulval, bnullarray, anynul, (float *) buffer, status); } else { fffr8r4((double *) idata, tilelen, bscale, bzero, nullcheck, fnulval, bnullarray, anynul, (float *) buffer, status); } } else if ((infptr->Fptr)->quantize_method == SUBTRACTIVE_DITHER_1 || (infptr->Fptr)->quantize_method == SUBTRACTIVE_DITHER_2) { /* use the new dithering algorithm (introduced in July 2009) */ if (tiledatatype == TINT) unquantize_i4r4(nrow + (infptr->Fptr)->dither_seed - 1, idata, tilelen, bscale, bzero, (infptr->Fptr)->quantize_method, nullcheck, tnull, fnulval, bnullarray, anynul, (float *) buffer, status); else if (tiledatatype == TSHORT) unquantize_i2r4(nrow + (infptr->Fptr)->dither_seed - 1, (short *)idata, tilelen, bscale, bzero, (infptr->Fptr)->quantize_method, nullcheck, (short) tnull, fnulval, bnullarray, anynul, (float *) buffer, status); else if (tiledatatype == TBYTE) unquantize_i1r4(nrow + (infptr->Fptr)->dither_seed - 1, (unsigned char *)idata, tilelen, bscale, bzero, (infptr->Fptr)->quantize_method, nullcheck, (unsigned char) tnull, fnulval, bnullarray, anynul, (float *) buffer, status); } else { /* use the old "round to nearest level" quantization algorithm */ if (tiledatatype == TINT) fffi4r4(idata, tilelen, bscale, bzero, nullcheck, tnull, fnulval, bnullarray, anynul, (float *) buffer, status); else if (tiledatatype == TSHORT) fffi2r4((short *)idata, tilelen, bscale, bzero, nullcheck, (short) tnull, fnulval, bnullarray, anynul, (float *) buffer, status); else if (tiledatatype == TBYTE) fffi1r4((unsigned char *)idata, tilelen, bscale, bzero, nullcheck, (unsigned char) tnull, fnulval, bnullarray, anynul, (float *) buffer, status); } } else if (datatype == TDOUBLE) { pixlen = sizeof(double); if (nulval) { dnulval = *(double *) nulval; } if ((infptr->Fptr)->quantize_level == NO_QUANTIZE) { /* the floating point pixels were losselessly compressed with GZIP */ /* Just have to copy the values to the output array */ if (tiledatatype == TINT) { fffr4r8((float *) idata, tilelen, bscale, bzero, nullcheck, dnulval, bnullarray, anynul, (double *) buffer, status); } else { fffr8r8((double *) idata, tilelen, bscale, bzero, nullcheck, dnulval, bnullarray, anynul, (double *) buffer, status); } } else if ((infptr->Fptr)->quantize_method == SUBTRACTIVE_DITHER_1 || (infptr->Fptr)->quantize_method == SUBTRACTIVE_DITHER_2) { /* use the new dithering algorithm (introduced in July 2009) */ if (tiledatatype == TINT) unquantize_i4r8(nrow + (infptr->Fptr)->dither_seed - 1, idata, tilelen, bscale, bzero, (infptr->Fptr)->quantize_method, nullcheck, tnull, dnulval, bnullarray, anynul, (double *) buffer, status); else if (tiledatatype == TSHORT) unquantize_i2r8(nrow + (infptr->Fptr)->dither_seed - 1, (short *)idata, tilelen, bscale, bzero, (infptr->Fptr)->quantize_method, nullcheck, (short) tnull, dnulval, bnullarray, anynul, (double *) buffer, status); else if (tiledatatype == TBYTE) unquantize_i1r8(nrow + (infptr->Fptr)->dither_seed - 1, (unsigned char *)idata, tilelen, bscale, bzero, (infptr->Fptr)->quantize_method, nullcheck, (unsigned char) tnull, dnulval, bnullarray, anynul, (double *) buffer, status); } else { /* use the old "round to nearest level" quantization algorithm */ if (tiledatatype == TINT) fffi4r8(idata, tilelen, bscale, bzero, nullcheck, tnull, dnulval, bnullarray, anynul, (double *) buffer, status); else if (tiledatatype == TSHORT) fffi2r8((short *)idata, tilelen, bscale, bzero, nullcheck, (short) tnull, dnulval, bnullarray, anynul, (double *) buffer, status); else if (tiledatatype == TBYTE) fffi1r8((unsigned char *)idata, tilelen, bscale, bzero, nullcheck, (unsigned char) tnull, dnulval, bnullarray, anynul, (double *) buffer, status); } } else if (datatype == TBYTE) { pixlen = sizeof(char); if (tiledatatype == TINT) fffi4i1(idata, tilelen, bscale, bzero, nullcheck, tnull, *(unsigned char *) nulval, bnullarray, anynul, (unsigned char *) buffer, status); else if (tiledatatype == TSHORT) fffi2i1((short *)idata, tilelen, bscale, bzero, nullcheck, (short) tnull, *(unsigned char *) nulval, bnullarray, anynul, (unsigned char *) buffer, status); else if (tiledatatype == TBYTE) fffi1i1((unsigned char *)idata, tilelen, bscale, bzero, nullcheck, (unsigned char) tnull, *(unsigned char *) nulval, bnullarray, anynul, (unsigned char *) buffer, status); } else if (datatype == TSBYTE) { pixlen = sizeof(char); if (tiledatatype == TINT) fffi4s1(idata, tilelen, bscale, bzero, nullcheck, tnull, *(signed char *) nulval, bnullarray, anynul, (signed char *) buffer, status); else if (tiledatatype == TSHORT) fffi2s1((short *)idata, tilelen, bscale, bzero, nullcheck, (short) tnull, *(signed char *) nulval, bnullarray, anynul, (signed char *) buffer, status); else if (tiledatatype == TBYTE) fffi1s1((unsigned char *)idata, tilelen, bscale, bzero, nullcheck, (unsigned char) tnull, *(signed char *) nulval, bnullarray, anynul, (signed char *) buffer, status); } else if (datatype == TUSHORT) { pixlen = sizeof(short); if ((infptr->Fptr)->quantize_level == NO_QUANTIZE) { /* the floating point pixels were losselessly compressed with GZIP */ /* Just have to copy the values to the output array */ if (tiledatatype == TINT) { fffr4u2((float *) idata, tilelen, bscale, bzero, nullcheck, *(unsigned short *) nulval, bnullarray, anynul, (unsigned short *) buffer, status); } else { fffr8u2((double *) idata, tilelen, bscale, bzero, nullcheck, *(unsigned short *) nulval, bnullarray, anynul, (unsigned short *) buffer, status); } } else if (tiledatatype == TINT) fffi4u2(idata, tilelen, bscale, bzero, nullcheck, tnull, *(unsigned short *) nulval, bnullarray, anynul, (unsigned short *) buffer, status); else if (tiledatatype == TSHORT) fffi2u2((short *)idata, tilelen, bscale, bzero, nullcheck, (short) tnull, *(unsigned short *) nulval, bnullarray, anynul, (unsigned short *) buffer, status); else if (tiledatatype == TBYTE) fffi1u2((unsigned char *)idata, tilelen, bscale, bzero, nullcheck, (unsigned char) tnull, *(unsigned short *) nulval, bnullarray, anynul, (unsigned short *) buffer, status); } else if (datatype == TUINT) { pixlen = sizeof(int); if ((infptr->Fptr)->quantize_level == NO_QUANTIZE) { /* the floating point pixels were losselessly compressed with GZIP */ /* Just have to copy the values to the output array */ if (tiledatatype == TINT) { fffr4uint((float *) idata, tilelen, bscale, bzero, nullcheck, *(unsigned int *) nulval, bnullarray, anynul, (unsigned int *) buffer, status); } else { fffr8uint((double *) idata, tilelen, bscale, bzero, nullcheck, *(unsigned int *) nulval, bnullarray, anynul, (unsigned int *) buffer, status); } } else if (tiledatatype == TINT) fffi4uint(idata, tilelen, bscale, bzero, nullcheck, tnull, *(unsigned int *) nulval, bnullarray, anynul, (unsigned int *) buffer, status); else if (tiledatatype == TSHORT) fffi2uint((short *)idata, tilelen, bscale, bzero, nullcheck, (short) tnull, *(unsigned int *) nulval, bnullarray, anynul, (unsigned int *) buffer, status); else if (tiledatatype == TBYTE) fffi1uint((unsigned char *)idata, tilelen, bscale, bzero, nullcheck, (unsigned char) tnull, *(unsigned int *) nulval, bnullarray, anynul, (unsigned int *) buffer, status); } else if (datatype == TULONG) { pixlen = sizeof(long); if ((infptr->Fptr)->quantize_level == NO_QUANTIZE) { /* the floating point pixels were losselessly compressed with GZIP */ /* Just have to copy the values to the output array */ if (tiledatatype == TINT) { fffr4u4((float *) idata, tilelen, bscale, bzero, nullcheck, *(unsigned long *) nulval, bnullarray, anynul, (unsigned long *) buffer, status); } else { fffr8u4((double *) idata, tilelen, bscale, bzero, nullcheck, *(unsigned long *) nulval, bnullarray, anynul, (unsigned long *) buffer, status); } } else if (tiledatatype == TINT) fffi4u4(idata, tilelen, bscale, bzero, nullcheck, tnull, *(unsigned long *) nulval, bnullarray, anynul, (unsigned long *) buffer, status); else if (tiledatatype == TSHORT) fffi2u4((short *)idata, tilelen, bscale, bzero, nullcheck, (short) tnull, *(unsigned long *) nulval, bnullarray, anynul, (unsigned long *) buffer, status); else if (tiledatatype == TBYTE) fffi1u4((unsigned char *)idata, tilelen, bscale, bzero, nullcheck, (unsigned char) tnull, *(unsigned long *) nulval, bnullarray, anynul, (unsigned long *) buffer, status); } else *status = BAD_DATATYPE; free(idata); /* don't need the uncompressed tile any more */ /* **************************************************************** */ /* cache the tile, in case the application wants it again */ /* Don't cache the tile if tile is a single row of the image; it is less likely that the cache will be used in this cases, so it is not worth the time and the memory overheads. */ if ((infptr->Fptr)->tilerow) { /* make sure cache has been allocated */ if ((infptr->Fptr)->znaxis[0] != (infptr->Fptr)->tilesize[0] || (infptr->Fptr)->tilesize[1] != 1 ) { tilesize = pixlen * tilelen; /* check that tile size/type has not changed */ if (tilesize != (infptr->Fptr)->tiledatasize[tilecol] || datatype != (infptr->Fptr)->tiletype[tilecol] ) { if (((infptr->Fptr)->tiledata)[tilecol]) { free(((infptr->Fptr)->tiledata)[tilecol]); } if (((infptr->Fptr)->tilenullarray)[tilecol]) { free(((infptr->Fptr)->tilenullarray)[tilecol]); } ((infptr->Fptr)->tilenullarray)[tilecol] = 0; ((infptr->Fptr)->tilerow)[tilecol] = 0; ((infptr->Fptr)->tiledatasize)[tilecol] = 0; ((infptr->Fptr)->tiletype)[tilecol] = 0; /* allocate new array(s) */ ((infptr->Fptr)->tiledata)[tilecol] = malloc(tilesize); if (((infptr->Fptr)->tiledata)[tilecol] == 0) return (*status); if (nullcheck == 2) { /* also need array of null pixel flags */ (infptr->Fptr)->tilenullarray[tilecol] = malloc(tilelen); if ((infptr->Fptr)->tilenullarray[tilecol] == 0) return (*status); } (infptr->Fptr)->tiledatasize[tilecol] = tilesize; (infptr->Fptr)->tiletype[tilecol] = datatype; } /* copy the tile array(s) into cache buffer */ memcpy((infptr->Fptr)->tiledata[tilecol], buffer, tilesize); if (nullcheck == 2) { if ((infptr->Fptr)->tilenullarray == 0) { (infptr->Fptr)->tilenullarray[tilecol] = malloc(tilelen); } memcpy((infptr->Fptr)->tilenullarray[tilecol], bnullarray, tilelen); } (infptr->Fptr)->tilerow[tilecol] = nrow; (infptr->Fptr)->tileanynull[tilecol] = *anynul; } } return (*status); } /*--------------------------------------------------------------------------*/ int imcomp_test_overlap ( int ndim, /* I - number of dimension in the tile and image */ long *tfpixel, /* I - first pixel number in each dim. of the tile */ long *tlpixel, /* I - last pixel number in each dim. of the tile */ long *fpixel, /* I - first pixel number in each dim. of the image */ long *lpixel, /* I - last pixel number in each dim. of the image */ long *ininc, /* I - increment to be applied in each image dimen. */ int *status) /* test if there are any intersecting pixels between this tile and the section of the image defined by fixel, lpixel, ininc. */ { long imgdim[MAX_COMPRESS_DIM]; /* product of preceding dimensions in the */ /* output image, allowing for inc factor */ long tiledim[MAX_COMPRESS_DIM]; /* product of preceding dimensions in the */ /* tile, array; inc factor is not relevant */ long imgfpix[MAX_COMPRESS_DIM]; /* 1st img pix overlapping tile: 0 base, */ /* allowing for inc factor */ long imglpix[MAX_COMPRESS_DIM]; /* last img pix overlapping tile 0 base, */ /* allowing for inc factor */ long tilefpix[MAX_COMPRESS_DIM]; /* 1st tile pix overlapping img 0 base, */ /* allowing for inc factor */ long inc[MAX_COMPRESS_DIM]; /* local copy of input ininc */ int ii; long tf, tl; if (*status > 0) return(*status); /* ------------------------------------------------------------ */ /* calc amount of overlap in each dimension; if there is zero */ /* overlap in any dimension then just return */ /* ------------------------------------------------------------ */ for (ii = 0; ii < ndim; ii++) { if (tlpixel[ii] < fpixel[ii] || tfpixel[ii] > lpixel[ii]) return(0); /* there are no overlapping pixels */ inc[ii] = ininc[ii]; /* calc dimensions of the output image section */ imgdim[ii] = (lpixel[ii] - fpixel[ii]) / labs(inc[ii]) + 1; if (imgdim[ii] < 1) { *status = NEG_AXIS; return(0); } /* calc dimensions of the tile */ tiledim[ii] = tlpixel[ii] - tfpixel[ii] + 1; if (tiledim[ii] < 1) { *status = NEG_AXIS; return(0); } if (ii > 0) tiledim[ii] *= tiledim[ii - 1]; /* product of dimensions */ /* first and last pixels in image that overlap with the tile, 0 base */ tf = tfpixel[ii] - 1; tl = tlpixel[ii] - 1; /* skip this plane if it falls in the cracks of the subsampled image */ while ((tf-(fpixel[ii] - 1)) % labs(inc[ii])) { tf++; if (tf > tl) return(0); /* no overlapping pixels */ } while ((tl-(fpixel[ii] - 1)) % labs(inc[ii])) { tl--; if (tf > tl) return(0); /* no overlapping pixels */ } imgfpix[ii] = maxvalue((tf - fpixel[ii] +1) / labs(inc[ii]) , 0); imglpix[ii] = minvalue((tl - fpixel[ii] +1) / labs(inc[ii]) , imgdim[ii] - 1); /* first pixel in the tile that overlaps with the image (0 base) */ tilefpix[ii] = maxvalue(fpixel[ii] - tfpixel[ii], 0); while ((tfpixel[ii] + tilefpix[ii] - fpixel[ii]) % labs(inc[ii])) { (tilefpix[ii])++; if (tilefpix[ii] >= tiledim[ii]) return(0); /* no overlapping pixels */ } if (ii > 0) imgdim[ii] *= imgdim[ii - 1]; /* product of dimensions */ } return(1); /* there appears to be intersecting pixels */ } /*--------------------------------------------------------------------------*/ int imcomp_copy_overlap ( char *tile, /* I - multi dimensional array of tile pixels */ int pixlen, /* I - number of bytes in each tile or image pixel */ int ndim, /* I - number of dimension in the tile and image */ long *tfpixel, /* I - first pixel number in each dim. of the tile */ long *tlpixel, /* I - last pixel number in each dim. of the tile */ char *bnullarray, /* I - array of null flags; used if nullcheck = 2 */ char *image, /* O - multi dimensional output image */ long *fpixel, /* I - first pixel number in each dim. of the image */ long *lpixel, /* I - last pixel number in each dim. of the image */ long *ininc, /* I - increment to be applied in each image dimen. */ int nullcheck, /* I - 0, 1: do nothing; 2: set nullarray for nulls */ char *nullarray, int *status) /* copy the intersecting pixels from a decompressed tile to the output image. Both the tile and the image must have the same number of dimensions. */ { long imgdim[MAX_COMPRESS_DIM]; /* product of preceding dimensions in the */ /* output image, allowing for inc factor */ long tiledim[MAX_COMPRESS_DIM]; /* product of preceding dimensions in the */ /* tile, array; inc factor is not relevant */ long imgfpix[MAX_COMPRESS_DIM]; /* 1st img pix overlapping tile: 0 base, */ /* allowing for inc factor */ long imglpix[MAX_COMPRESS_DIM]; /* last img pix overlapping tile 0 base, */ /* allowing for inc factor */ long tilefpix[MAX_COMPRESS_DIM]; /* 1st tile pix overlapping img 0 base, */ /* allowing for inc factor */ long inc[MAX_COMPRESS_DIM]; /* local copy of input ininc */ long i1, i2, i3, i4; /* offset along each axis of the image */ long it1, it2, it3, it4; long im1, im2, im3, im4; /* offset to image pixel, allowing for inc */ long ipos, tf, tl; long t2, t3, t4; /* offset along each axis of the tile */ long tilepix, imgpix, tilepixbyte, imgpixbyte; int ii, overlap_bytes, overlap_flags; if (*status > 0) return(*status); for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) { /* set default values for higher dimensions */ inc[ii] = 1; imgdim[ii] = 1; tiledim[ii] = 1; imgfpix[ii] = 0; imglpix[ii] = 0; tilefpix[ii] = 0; } /* ------------------------------------------------------------ */ /* calc amount of overlap in each dimension; if there is zero */ /* overlap in any dimension then just return */ /* ------------------------------------------------------------ */ for (ii = 0; ii < ndim; ii++) { if (tlpixel[ii] < fpixel[ii] || tfpixel[ii] > lpixel[ii]) return(*status); /* there are no overlapping pixels */ inc[ii] = ininc[ii]; /* calc dimensions of the output image section */ imgdim[ii] = (lpixel[ii] - fpixel[ii]) / labs(inc[ii]) + 1; if (imgdim[ii] < 1) return(*status = NEG_AXIS); /* calc dimensions of the tile */ tiledim[ii] = tlpixel[ii] - tfpixel[ii] + 1; if (tiledim[ii] < 1) return(*status = NEG_AXIS); if (ii > 0) tiledim[ii] *= tiledim[ii - 1]; /* product of dimensions */ /* first and last pixels in image that overlap with the tile, 0 base */ tf = tfpixel[ii] - 1; tl = tlpixel[ii] - 1; /* skip this plane if it falls in the cracks of the subsampled image */ while ((tf-(fpixel[ii] - 1)) % labs(inc[ii])) { tf++; if (tf > tl) return(*status); /* no overlapping pixels */ } while ((tl-(fpixel[ii] - 1)) % labs(inc[ii])) { tl--; if (tf > tl) return(*status); /* no overlapping pixels */ } imgfpix[ii] = maxvalue((tf - fpixel[ii] +1) / labs(inc[ii]) , 0); imglpix[ii] = minvalue((tl - fpixel[ii] +1) / labs(inc[ii]) , imgdim[ii] - 1); /* first pixel in the tile that overlaps with the image (0 base) */ tilefpix[ii] = maxvalue(fpixel[ii] - tfpixel[ii], 0); while ((tfpixel[ii] + tilefpix[ii] - fpixel[ii]) % labs(inc[ii])) { (tilefpix[ii])++; if (tilefpix[ii] >= tiledim[ii]) return(*status); /* no overlapping pixels */ } /* printf("ii tfpixel, tlpixel %d %d %d \n",ii, tfpixel[ii], tlpixel[ii]); printf("ii, tf, tl, imgfpix,imglpix, tilefpix %d %d %d %d %d %d\n",ii, tf,tl,imgfpix[ii], imglpix[ii],tilefpix[ii]); */ if (ii > 0) imgdim[ii] *= imgdim[ii - 1]; /* product of dimensions */ } /* ---------------------------------------------------------------- */ /* calc number of pixels in each row (first dimension) that overlap */ /* multiply by pixlen to get number of bytes to copy in each loop */ /* ---------------------------------------------------------------- */ if (inc[0] != 1) overlap_flags = 1; /* can only copy 1 pixel at a time */ else overlap_flags = imglpix[0] - imgfpix[0] + 1; /* can copy whole row */ overlap_bytes = overlap_flags * pixlen; /* support up to 5 dimensions for now */ for (i4 = 0, it4=0; i4 <= imglpix[4] - imgfpix[4]; i4++, it4++) { /* increment plane if it falls in the cracks of the subsampled image */ while (ndim > 4 && (tfpixel[4] + tilefpix[4] - fpixel[4] + it4) % labs(inc[4]) != 0) it4++; /* offset to start of hypercube */ if (inc[4] > 0) im4 = (i4 + imgfpix[4]) * imgdim[3]; else im4 = imgdim[4] - (i4 + 1 + imgfpix[4]) * imgdim[3]; t4 = (tilefpix[4] + it4) * tiledim[3]; for (i3 = 0, it3=0; i3 <= imglpix[3] - imgfpix[3]; i3++, it3++) { /* increment plane if it falls in the cracks of the subsampled image */ while (ndim > 3 && (tfpixel[3] + tilefpix[3] - fpixel[3] + it3) % labs(inc[3]) != 0) it3++; /* offset to start of cube */ if (inc[3] > 0) im3 = (i3 + imgfpix[3]) * imgdim[2] + im4; else im3 = imgdim[3] - (i3 + 1 + imgfpix[3]) * imgdim[2] + im4; t3 = (tilefpix[3] + it3) * tiledim[2] + t4; /* loop through planes of the image */ for (i2 = 0, it2=0; i2 <= imglpix[2] - imgfpix[2]; i2++, it2++) { /* incre plane if it falls in the cracks of the subsampled image */ while (ndim > 2 && (tfpixel[2] + tilefpix[2] - fpixel[2] + it2) % labs(inc[2]) != 0) it2++; /* offset to start of plane */ if (inc[2] > 0) im2 = (i2 + imgfpix[2]) * imgdim[1] + im3; else im2 = imgdim[2] - (i2 + 1 + imgfpix[2]) * imgdim[1] + im3; t2 = (tilefpix[2] + it2) * tiledim[1] + t3; /* loop through rows of the image */ for (i1 = 0, it1=0; i1 <= imglpix[1] - imgfpix[1]; i1++, it1++) { /* incre row if it falls in the cracks of the subsampled image */ while (ndim > 1 && (tfpixel[1] + tilefpix[1] - fpixel[1] + it1) % labs(inc[1]) != 0) it1++; /* calc position of first pixel in tile to be copied */ tilepix = tilefpix[0] + (tilefpix[1] + it1) * tiledim[0] + t2; /* offset to start of row */ if (inc[1] > 0) im1 = (i1 + imgfpix[1]) * imgdim[0] + im2; else im1 = imgdim[1] - (i1 + 1 + imgfpix[1]) * imgdim[0] + im2; /* printf("inc = %d %d %d %d\n",inc[0],inc[1],inc[2],inc[3]); printf("im1,im2,im3,im4 = %d %d %d %d\n",im1,im2,im3,im4); */ /* offset to byte within the row */ if (inc[0] > 0) imgpix = imgfpix[0] + im1; else imgpix = imgdim[0] - 1 - imgfpix[0] + im1; /* printf("tilefpix0,1, imgfpix1, it1, inc1, t2= %d %d %d %d %d %d\n", tilefpix[0],tilefpix[1],imgfpix[1],it1,inc[1], t2); printf("i1, it1, tilepix, imgpix %d %d %d %d \n", i1, it1, tilepix, imgpix); */ /* loop over pixels along one row of the image */ for (ipos = imgfpix[0]; ipos <= imglpix[0]; ipos += overlap_flags) { if (nullcheck == 2) { /* copy overlapping null flags from tile to image */ memcpy(nullarray + imgpix, bnullarray + tilepix, overlap_flags); } /* convert from image pixel to byte offset */ tilepixbyte = tilepix * pixlen; imgpixbyte = imgpix * pixlen; /* printf(" tilepix, tilepixbyte, imgpix, imgpixbyte= %d %d %d %d\n", tilepix, tilepixbyte, imgpix, imgpixbyte); */ /* copy overlapping row of pixels from tile to image */ memcpy(image + imgpixbyte, tile + tilepixbyte, overlap_bytes); tilepix += (overlap_flags * labs(inc[0])); if (inc[0] > 0) imgpix += overlap_flags; else imgpix -= overlap_flags; } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int imcomp_merge_overlap ( char *tile, /* O - multi dimensional array of tile pixels */ int pixlen, /* I - number of bytes in each tile or image pixel */ int ndim, /* I - number of dimension in the tile and image */ long *tfpixel, /* I - first pixel number in each dim. of the tile */ long *tlpixel, /* I - last pixel number in each dim. of the tile */ char *bnullarray, /* I - array of null flags; used if nullcheck = 2 */ char *image, /* I - multi dimensional output image */ long *fpixel, /* I - first pixel number in each dim. of the image */ long *lpixel, /* I - last pixel number in each dim. of the image */ int nullcheck, /* I - 0, 1: do nothing; 2: set nullarray for nulls */ int *status) /* Similar to imcomp_copy_overlap, except it copies the overlapping pixels from the 'image' to the 'tile'. */ { long imgdim[MAX_COMPRESS_DIM]; /* product of preceding dimensions in the */ /* output image, allowing for inc factor */ long tiledim[MAX_COMPRESS_DIM]; /* product of preceding dimensions in the */ /* tile, array; inc factor is not relevant */ long imgfpix[MAX_COMPRESS_DIM]; /* 1st img pix overlapping tile: 0 base, */ /* allowing for inc factor */ long imglpix[MAX_COMPRESS_DIM]; /* last img pix overlapping tile 0 base, */ /* allowing for inc factor */ long tilefpix[MAX_COMPRESS_DIM]; /* 1st tile pix overlapping img 0 base, */ /* allowing for inc factor */ long inc[MAX_COMPRESS_DIM]; /* local copy of input ininc */ long i1, i2, i3, i4; /* offset along each axis of the image */ long it1, it2, it3, it4; long im1, im2, im3, im4; /* offset to image pixel, allowing for inc */ long ipos, tf, tl; long t2, t3, t4; /* offset along each axis of the tile */ long tilepix, imgpix, tilepixbyte, imgpixbyte; int ii, overlap_bytes, overlap_flags; if (*status > 0) return(*status); for (ii = 0; ii < MAX_COMPRESS_DIM; ii++) { /* set default values for higher dimensions */ inc[ii] = 1; imgdim[ii] = 1; tiledim[ii] = 1; imgfpix[ii] = 0; imglpix[ii] = 0; tilefpix[ii] = 0; } /* ------------------------------------------------------------ */ /* calc amount of overlap in each dimension; if there is zero */ /* overlap in any dimension then just return */ /* ------------------------------------------------------------ */ for (ii = 0; ii < ndim; ii++) { if (tlpixel[ii] < fpixel[ii] || tfpixel[ii] > lpixel[ii]) return(*status); /* there are no overlapping pixels */ /* calc dimensions of the output image section */ imgdim[ii] = (lpixel[ii] - fpixel[ii]) / labs(inc[ii]) + 1; if (imgdim[ii] < 1) return(*status = NEG_AXIS); /* calc dimensions of the tile */ tiledim[ii] = tlpixel[ii] - tfpixel[ii] + 1; if (tiledim[ii] < 1) return(*status = NEG_AXIS); if (ii > 0) tiledim[ii] *= tiledim[ii - 1]; /* product of dimensions */ /* first and last pixels in image that overlap with the tile, 0 base */ tf = tfpixel[ii] - 1; tl = tlpixel[ii] - 1; /* skip this plane if it falls in the cracks of the subsampled image */ while ((tf-(fpixel[ii] - 1)) % labs(inc[ii])) { tf++; if (tf > tl) return(*status); /* no overlapping pixels */ } while ((tl-(fpixel[ii] - 1)) % labs(inc[ii])) { tl--; if (tf > tl) return(*status); /* no overlapping pixels */ } imgfpix[ii] = maxvalue((tf - fpixel[ii] +1) / labs(inc[ii]) , 0); imglpix[ii] = minvalue((tl - fpixel[ii] +1) / labs(inc[ii]) , imgdim[ii] - 1); /* first pixel in the tile that overlaps with the image (0 base) */ tilefpix[ii] = maxvalue(fpixel[ii] - tfpixel[ii], 0); while ((tfpixel[ii] + tilefpix[ii] - fpixel[ii]) % labs(inc[ii])) { (tilefpix[ii])++; if (tilefpix[ii] >= tiledim[ii]) return(*status); /* no overlapping pixels */ } /* printf("ii tfpixel, tlpixel %d %d %d \n",ii, tfpixel[ii], tlpixel[ii]); printf("ii, tf, tl, imgfpix,imglpix, tilefpix %d %d %d %d %d %d\n",ii, tf,tl,imgfpix[ii], imglpix[ii],tilefpix[ii]); */ if (ii > 0) imgdim[ii] *= imgdim[ii - 1]; /* product of dimensions */ } /* ---------------------------------------------------------------- */ /* calc number of pixels in each row (first dimension) that overlap */ /* multiply by pixlen to get number of bytes to copy in each loop */ /* ---------------------------------------------------------------- */ if (inc[0] != 1) overlap_flags = 1; /* can only copy 1 pixel at a time */ else overlap_flags = imglpix[0] - imgfpix[0] + 1; /* can copy whole row */ overlap_bytes = overlap_flags * pixlen; /* support up to 5 dimensions for now */ for (i4 = 0, it4=0; i4 <= imglpix[4] - imgfpix[4]; i4++, it4++) { /* increment plane if it falls in the cracks of the subsampled image */ while (ndim > 4 && (tfpixel[4] + tilefpix[4] - fpixel[4] + it4) % labs(inc[4]) != 0) it4++; /* offset to start of hypercube */ if (inc[4] > 0) im4 = (i4 + imgfpix[4]) * imgdim[3]; else im4 = imgdim[4] - (i4 + 1 + imgfpix[4]) * imgdim[3]; t4 = (tilefpix[4] + it4) * tiledim[3]; for (i3 = 0, it3=0; i3 <= imglpix[3] - imgfpix[3]; i3++, it3++) { /* increment plane if it falls in the cracks of the subsampled image */ while (ndim > 3 && (tfpixel[3] + tilefpix[3] - fpixel[3] + it3) % labs(inc[3]) != 0) it3++; /* offset to start of cube */ if (inc[3] > 0) im3 = (i3 + imgfpix[3]) * imgdim[2] + im4; else im3 = imgdim[3] - (i3 + 1 + imgfpix[3]) * imgdim[2] + im4; t3 = (tilefpix[3] + it3) * tiledim[2] + t4; /* loop through planes of the image */ for (i2 = 0, it2=0; i2 <= imglpix[2] - imgfpix[2]; i2++, it2++) { /* incre plane if it falls in the cracks of the subsampled image */ while (ndim > 2 && (tfpixel[2] + tilefpix[2] - fpixel[2] + it2) % labs(inc[2]) != 0) it2++; /* offset to start of plane */ if (inc[2] > 0) im2 = (i2 + imgfpix[2]) * imgdim[1] + im3; else im2 = imgdim[2] - (i2 + 1 + imgfpix[2]) * imgdim[1] + im3; t2 = (tilefpix[2] + it2) * tiledim[1] + t3; /* loop through rows of the image */ for (i1 = 0, it1=0; i1 <= imglpix[1] - imgfpix[1]; i1++, it1++) { /* incre row if it falls in the cracks of the subsampled image */ while (ndim > 1 && (tfpixel[1] + tilefpix[1] - fpixel[1] + it1) % labs(inc[1]) != 0) it1++; /* calc position of first pixel in tile to be copied */ tilepix = tilefpix[0] + (tilefpix[1] + it1) * tiledim[0] + t2; /* offset to start of row */ if (inc[1] > 0) im1 = (i1 + imgfpix[1]) * imgdim[0] + im2; else im1 = imgdim[1] - (i1 + 1 + imgfpix[1]) * imgdim[0] + im2; /* printf("inc = %d %d %d %d\n",inc[0],inc[1],inc[2],inc[3]); printf("im1,im2,im3,im4 = %d %d %d %d\n",im1,im2,im3,im4); */ /* offset to byte within the row */ if (inc[0] > 0) imgpix = imgfpix[0] + im1; else imgpix = imgdim[0] - 1 - imgfpix[0] + im1; /* printf("tilefpix0,1, imgfpix1, it1, inc1, t2= %d %d %d %d %d %d\n", tilefpix[0],tilefpix[1],imgfpix[1],it1,inc[1], t2); printf("i1, it1, tilepix, imgpix %d %d %d %d \n", i1, it1, tilepix, imgpix); */ /* loop over pixels along one row of the image */ for (ipos = imgfpix[0]; ipos <= imglpix[0]; ipos += overlap_flags) { /* convert from image pixel to byte offset */ tilepixbyte = tilepix * pixlen; imgpixbyte = imgpix * pixlen; /* printf(" tilepix, tilepixbyte, imgpix, imgpixbyte= %d %d %d %d\n", tilepix, tilepixbyte, imgpix, imgpixbyte); */ /* copy overlapping row of pixels from image to tile */ memcpy(tile + tilepixbyte, image + imgpixbyte, overlap_bytes); tilepix += (overlap_flags * labs(inc[0])); if (inc[0] > 0) imgpix += overlap_flags; else imgpix -= overlap_flags; } } } } } return(*status); } /*--------------------------------------------------------------------------*/ static int unquantize_i1r4(long row, /* tile number = row number in table */ unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int dither_method, /* I - dithering method to use */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ float nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ float *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Unquantize byte values into the scaled floating point values */ { long ii; int nextrand, iseed; if (!fits_rand_value) if (fits_init_randoms()) return(MEMORY_ALLOCATION); /* initialize the index to the next random number in the list */ iseed = (int) ((row - 1) % N_RANDOM); nextrand = (int) (fits_rand_value[iseed] * 500); if (nullcheck == 0) /* no null checking required */ { for (ii = 0; ii < ntodo; ii++) { if (dither_method == SUBTRACTIVE_DITHER_2 && input[ii] == ZERO_VALUE) output[ii] = 0.0; else output[ii] = (float) (((double) input[ii] - fits_rand_value[nextrand] + 0.5) * scale + zero); nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } else /* must check for null values */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (dither_method == SUBTRACTIVE_DITHER_2 && input[ii] == ZERO_VALUE) output[ii] = 0.0; else output[ii] = (float) (((double) input[ii] - fits_rand_value[nextrand] + 0.5) * scale + zero); } nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } return(*status); } /*--------------------------------------------------------------------------*/ static int unquantize_i2r4(long row, /* seed for random values */ short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int dither_method, /* I - dithering method to use */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ float nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ float *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Unquantize short integer values into the scaled floating point values */ { long ii; int nextrand, iseed; if (!fits_rand_value) if (fits_init_randoms()) return(MEMORY_ALLOCATION); /* initialize the index to the next random number in the list */ iseed = (int) ((row - 1) % N_RANDOM); nextrand = (int) (fits_rand_value[iseed] * 500); if (nullcheck == 0) /* no null checking required */ { for (ii = 0; ii < ntodo; ii++) { if (dither_method == SUBTRACTIVE_DITHER_2 && input[ii] == ZERO_VALUE) output[ii] = 0.0; else output[ii] = (float) (((double) input[ii] - fits_rand_value[nextrand] + 0.5) * scale + zero); nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } else /* must check for null values */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (dither_method == SUBTRACTIVE_DITHER_2 && input[ii] == ZERO_VALUE) output[ii] = 0.0; else output[ii] = (float) (((double) input[ii] - fits_rand_value[nextrand] + 0.5) * scale + zero); } nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } return(*status); } /*--------------------------------------------------------------------------*/ static int unquantize_i4r4(long row, /* tile number = row number in table */ INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int dither_method, /* I - dithering method to use */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ float nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ float *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Unquantize int integer values into the scaled floating point values */ { long ii; int nextrand, iseed; if (fits_rand_value == 0) if (fits_init_randoms()) return(MEMORY_ALLOCATION); /* initialize the index to the next random number in the list */ iseed = (int) ((row - 1) % N_RANDOM); nextrand = (int) (fits_rand_value[iseed] * 500); if (nullcheck == 0) /* no null checking required */ { for (ii = 0; ii < ntodo; ii++) { if (dither_method == SUBTRACTIVE_DITHER_2 && input[ii] == ZERO_VALUE) output[ii] = 0.0; else output[ii] = (float) (((double) input[ii] - fits_rand_value[nextrand] + 0.5) * scale + zero); nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } else /* must check for null values */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (dither_method == SUBTRACTIVE_DITHER_2 && input[ii] == ZERO_VALUE) output[ii] = 0.0; else output[ii] = (float) (((double) input[ii] - fits_rand_value[nextrand] + 0.5) * scale + zero); } nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } return(*status); } /*--------------------------------------------------------------------------*/ static int unquantize_i1r8(long row, /* tile number = row number in table */ unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int dither_method, /* I - dithering method to use */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ double nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ double *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Unquantize byte values into the scaled floating point values */ { long ii; int nextrand, iseed; if (!fits_rand_value) if (fits_init_randoms()) return(MEMORY_ALLOCATION); /* initialize the index to the next random number in the list */ iseed = (int) ((row - 1) % N_RANDOM); nextrand = (int) (fits_rand_value[iseed] * 500); if (nullcheck == 0) /* no null checking required */ { for (ii = 0; ii < ntodo; ii++) { if (dither_method == SUBTRACTIVE_DITHER_2 && input[ii] == ZERO_VALUE) output[ii] = 0.0; else output[ii] = (double) (((double) input[ii] - fits_rand_value[nextrand] + 0.5) * scale + zero); nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } else /* must check for null values */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (dither_method == SUBTRACTIVE_DITHER_2 && input[ii] == ZERO_VALUE) output[ii] = 0.0; else output[ii] = (double) (((double) input[ii] - fits_rand_value[nextrand] + 0.5) * scale + zero); } nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } return(*status); } /*--------------------------------------------------------------------------*/ static int unquantize_i2r8(long row, /* tile number = row number in table */ short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int dither_method, /* I - dithering method to use */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ double nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ double *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Unquantize short integer values into the scaled floating point values */ { long ii; int nextrand, iseed; if (!fits_rand_value) if (fits_init_randoms()) return(MEMORY_ALLOCATION); /* initialize the index to the next random number in the list */ iseed = (int) ((row - 1) % N_RANDOM); nextrand = (int) (fits_rand_value[iseed] * 500); if (nullcheck == 0) /* no null checking required */ { for (ii = 0; ii < ntodo; ii++) { if (dither_method == SUBTRACTIVE_DITHER_2 && input[ii] == ZERO_VALUE) output[ii] = 0.0; else output[ii] = (double) (((double) input[ii] - fits_rand_value[nextrand] + 0.5) * scale + zero); nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } else /* must check for null values */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (dither_method == SUBTRACTIVE_DITHER_2 && input[ii] == ZERO_VALUE) output[ii] = 0.0; else output[ii] = (double) (((double) input[ii] - fits_rand_value[nextrand] + 0.5) * scale + zero); } nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } return(*status); } /*--------------------------------------------------------------------------*/ static int unquantize_i4r8(long row, /* tile number = row number in table */ INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int dither_method, /* I - dithering method to use */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ double nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ double *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Unquantize int integer values into the scaled floating point values */ { long ii; int nextrand, iseed; if (fits_rand_value == 0) if (fits_init_randoms()) return(MEMORY_ALLOCATION); /* initialize the index to the next random number in the list */ iseed = (int) ((row - 1) % N_RANDOM); nextrand = (int) (fits_rand_value[iseed] * 500); if (nullcheck == 0) /* no null checking required */ { for (ii = 0; ii < ntodo; ii++) { if (dither_method == SUBTRACTIVE_DITHER_2 && input[ii] == ZERO_VALUE) output[ii] = 0.0; else output[ii] = (double) (((double) input[ii] - fits_rand_value[nextrand] + 0.5) * scale + zero); nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } else /* must check for null values */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (dither_method == SUBTRACTIVE_DITHER_2 && input[ii] == ZERO_VALUE) output[ii] = 0.0; else output[ii] = (double) (((double) input[ii] - fits_rand_value[nextrand] + 0.5) * scale + zero); } nextrand++; if (nextrand == N_RANDOM) { iseed++; if (iseed == N_RANDOM) iseed = 0; nextrand = (int) (fits_rand_value[iseed] * 500); } } } return(*status); } /*--------------------------------------------------------------------------*/ static int imcomp_float2nan(float *indata, long tilelen, int *outdata, float nullflagval, int *status) /* convert pixels that are equal to nullflag to NaNs. Note that indata and outdata point to the same location. */ { int ii; for (ii = 0; ii < tilelen; ii++) { if (indata[ii] == nullflagval) outdata[ii] = -1; /* integer -1 has the same bit pattern as a real*4 NaN */ } return(*status); } /*--------------------------------------------------------------------------*/ static int imcomp_double2nan(double *indata, long tilelen, LONGLONG *outdata, double nullflagval, int *status) /* convert pixels that are equal to nullflag to NaNs. Note that indata and outdata point to the same location. */ { int ii; for (ii = 0; ii < tilelen; ii++) { if (indata[ii] == nullflagval) outdata[ii] = -1; /* integer -1 has the same bit pattern as a real*8 NaN */ } return(*status); } /*--------------------------------------------------------------------------*/ int fits_compress_table_gzip(fitsfile *infptr, fitsfile *outfptr, int *status) /* Transpose the elements in the input table columns from row-major order into column-major order, then compress each column with gzip. Write to the output table (which may be the same as the input table). For example, a table with 10000 rows and 2 '1I' columns will be transformed into a 1 row table with 2 '10000I' columns. */ { LONGLONG nrows, incolwidth[999], inrepeat[999], outcolstart[1000], outbytespan[999]; LONGLONG headstart, datastart, dataend, startbyte, jj, kk, naxis1; long repeat, width, pcount; int ii, ncols, coltype, hdutype, ltrue = 1; char *buffer, *cptr, keyname[9], tform[40], colcode[999], colname[999][50]; char comm[FLEN_COMMENT], *compressed_data; size_t dlen, datasize; float cratio[999]; if (*status > 0) return(*status); fits_get_hdu_type(infptr, &hdutype, status); if (hdutype != BINARY_TBL) { *status = NOT_BTABLE; return(*status); } fits_get_num_rowsll(infptr, &nrows, status); fits_get_num_cols(infptr, &ncols, status); fits_read_key(infptr, TLONGLONG, "NAXIS1", &naxis1, NULL, status); if (*status > 0) return(*status); if (nrows < 1 || ncols < 1) { /* just copy the HDU if the table has 0 columns or rows */ if (infptr != outfptr) { /* copy input header to the output */ fits_copy_hdu (infptr, outfptr, 0, status); } return(*status); } /* allocate space for the transposed table */ buffer = calloc((size_t) naxis1, (size_t) nrows); if (!buffer) { ffpmsg("Could not allocate buffer for transformed table"); *status = MEMORY_ALLOCATION; return(*status); } if (infptr != outfptr) { /* copy input header to the output */ fits_copy_header(infptr, outfptr, status); } outcolstart[0] = 0; /* do initial setup for each column */ for (ii = 0; ii < ncols; ii++) { /* get the column name */ fits_make_keyn("TTYPE", ii+1, keyname, status); fits_read_key(outfptr, TSTRING, keyname, colname[ii], comm, status); /* get the column type, repeat count, and unit width */ fits_make_keyn("TFORM", ii+1, keyname, status); fits_read_key(outfptr, TSTRING, keyname, tform, comm, status); /* preserve the original TFORM value and comment string */ keyname[0] = 'Z'; fits_write_key(outfptr, TSTRING, keyname, tform, comm, status); keyname[0] = 'T'; fits_binary_tform(tform, &coltype, &repeat, &width, status); /* BIT columns are a difficult case */ /* round up to a multiple of 8 bits */ /* if (coltype == TBIT) { repeat = (repeat + 7) / 8 * 8; } */ cptr = tform; while(isdigit(*cptr)) cptr++; colcode[ii] = *cptr; /* save the column type code */ /* all columns are now VLAs */ fits_modify_key_str(outfptr, keyname, "1PB", "&", status); if (coltype == TBIT) { repeat = (repeat + 7) / 8; /* convert from bits to bytes */ } else if (coltype == TSTRING) { width = 1; /* ignore the optional 'w' in 'rAw' format */ } else if (coltype < 0) { /* pointer to variable length array */ width = 8; if (colcode[ii] == 'Q') width = 16; /* this is a 'Q' not a 'P' column */ repeat = 1; } inrepeat[ii] = repeat; /* width (in bytes) of each element and field in the INPUT row-major table */ incolwidth[ii] = repeat * width; /* starting offset of each field in the OUTPUT column-major table */ outcolstart[ii + 1] = outcolstart[ii] + incolwidth[ii] * nrows; /* length of each sequence of bytes, after sorting them in signicant order */ outbytespan[ii] = (incolwidth[ii] * nrows) / width; } /* the transformed table has only 1 row */ /* output table width 8 bytes per column */ fits_modify_key_lng(outfptr, "NAXIS2", 1, "&", status); fits_modify_key_lng(outfptr, "NAXIS1", ncols * 8, "&", status); /* move to the start of the input table */ fits_get_hduaddrll(infptr, &headstart, &datastart, &dataend, status); ffmbyt(infptr, datastart, 0, status); /* now transpose the table into an array in memory */ for (jj = 0; jj < nrows; jj++) { /* loop over rows */ for (ii = 0; ii < ncols; ii++) { /* loop over columns */ if (inrepeat[ii] > 0) { kk = 0; cptr = buffer + (outcolstart[ii] + (jj * incolwidth[ii])); /* addr to copy to */ startbyte = (infptr->Fptr)->bytepos; /* save the starting byte location */ ffgbyt(infptr, incolwidth[ii], cptr, status); /* copy all the bytes */ if (incolwidth[ii] >= MINDIRECT) { /* have to explicitly move to next byte */ ffmbyt(infptr, startbyte + incolwidth[ii], 0, status); } } } } fits_set_hdustruc(outfptr, status); /* now compress each column with GZIP and write out to output table */ for (ii = 0; ii < ncols; ii++) { /* loop over columns */ if (inrepeat[ii] > 0) { datasize = (size_t) (outcolstart[ii + 1] - outcolstart[ii]); /* allocate memory for the compressed data */ compressed_data = malloc(datasize); if (!compressed_data) { ffpmsg("data memory allocation error"); return(-1); } /* gzip compress the data */ compress2mem_from_mem(buffer + outcolstart[ii], datasize, &compressed_data, &datasize, realloc, &dlen, status); /* write the compressed data to the output column */ fits_set_tscale(outfptr, ii + 1, 1.0, 0.0, status); /* turn off any data scaling, first */ fits_write_col(outfptr, TBYTE, ii + 1, 1, 1, dlen, compressed_data, status); cratio[ii] = (float) datasize / (float) dlen; free(compressed_data); /* don't need the compressed data any more */ fits_make_keyn("ZCTYP", ii+1, keyname, status); fits_write_key(outfptr, TSTRING, keyname, "GZIP_1", "compression algorithm for column", status); sprintf(results[ii]," %3d %10.10s %6d%c %6.2f", ii+1, colname[ii], (int) inrepeat[ii],colcode[ii],cratio[ii]); trans_ratio[ii] = cratio[ii]; } else { /* zero length vector column; not compressed */ sprintf(results[ii]," %3d %10.10s %6d%c ", ii+1, colname[ii], (int) inrepeat[ii],colcode[ii]); } } fits_write_key(outfptr, TLOGICAL, "ZTABLE", <rue, "this is a compressed table", status); fits_write_key(outfptr, TLONGLONG, "ZTILELEN", &nrows, "number of rows in each tile", status); /* save the original PCOUNT value */ fits_read_key(infptr, TLONG, "PCOUNT", &pcount, comm, status); fits_write_key(outfptr, TLONG, "ZPCOUNT", &pcount, comm, status); fits_write_key(outfptr, TLONGLONG, "ZNAXIS1", &naxis1, "original rows width", status); fits_write_key(outfptr, TLONGLONG, "ZNAXIS2", &nrows, "original number of rows", status); fits_set_hdustruc(outfptr, status); /* copy the heap from input to output file */ fits_gzip_heap(infptr, outfptr, status); free(buffer); return(*status); } /*--------------------------------------------------------------------------*/ int fits_compress_table_rice(fitsfile *infptr, fitsfile *outfptr, int *status) /* Transpose the elements in the input table columns from row-major order into column-major order, and write to the output table (which may be the same as the input table). For example, a table with 10000 rows and 2 '1I' columns will be transformed into a 1 row table with 2 '10000I' columns. Integer columns are then compressed with Rice; all other columns compressed with GZIP. In addition, the bytes in the floating point numeric data values (columns with TFORM = E, and D) are shuffled so that the most significant byte of every element occurs first in the array, followed by the next most significant byte, and so on to the least significant byte. Thus, if you have 3 4-byte numeric values, the bytes 012301230123 get shuffled to 000111222333 */ { LONGLONG nrows, incolwidth[999], inrepeat[999], outcolstart[1000], outbytespan[999]; LONGLONG headstart, datastart, dataend, startbyte, jj, kk, naxis1; long repeat, width, pcount; int ii, ncols, coltype, hdutype, ltrue = 1, print_report = 0; char *buffer, *cptr, keyname[9], tform[40], colcode[999], tempstring[20]; char comm[FLEN_COMMENT], *compressed_data; float cratio[999]; size_t dlen, datasize; if (*status == -999) { /* special flag that means print out diagnostics */ print_report = 1; *status = 0; } if (*status > 0) return(*status); fits_get_hdu_type(infptr, &hdutype, status); if (hdutype != BINARY_TBL) { *status = NOT_BTABLE; return(*status); } fits_get_num_rowsll(infptr, &nrows, status); fits_get_num_cols(infptr, &ncols, status); fits_read_key(infptr, TLONGLONG, "NAXIS1", &naxis1, NULL, status); if (*status > 0) return(*status); if (nrows < 1 || ncols < 1) { /* just copy the HDU if the table has 0 columns or rows */ if (infptr != outfptr) { /* copy input header to the output */ fits_copy_hdu (infptr, outfptr, 0, status); } return(*status); } /* allocate space for the transposed table */ buffer = calloc((size_t) naxis1, (size_t) nrows); if (!buffer) { ffpmsg("Could not allocate buffer for transformed table"); *status = MEMORY_ALLOCATION; return(*status); } if (infptr != outfptr) { /* copy input header to the output */ fits_copy_header(infptr, outfptr, status); } outcolstart[0] = 0; for (ii = 0; ii < ncols; ii++) { /* get the column type, repeat count, and unit width */ fits_make_keyn("TFORM", ii+1, keyname, status); fits_read_key(outfptr, TSTRING, keyname, tform, comm, status); /* preserve the original TFORM value and comment string */ keyname[0] = 'Z'; fits_write_key(outfptr, TSTRING, keyname, tform, comm, status); keyname[0] = 'T'; fits_binary_tform(tform, &coltype, &repeat, &width, status); /* BIT columns are a difficult case */ /* round up to a multiple of 8 bits */ /* if (coltype == TBIT) { repeat = (repeat + 7) / 8 * 8; } */ cptr = tform; while(isdigit(*cptr)) cptr++; colcode[ii] = *cptr; /* save the column type code */ /* all columns are now VLAs */ fits_modify_key_str(outfptr, keyname, "1PB", "&", status); if (coltype == TBIT) { repeat = (repeat + 7) / 8; /* convert from bits to bytes */ } else if (coltype == TSTRING) { width = 1; /* ignore the optional 'w' in 'rAw' format */ } else if (coltype < 0) { /* pointer to variable length array */ width = 8; if (colcode[ii] == 'Q') width = 16; /* this is a 'Q' not a 'P' column */ repeat = 1; } inrepeat[ii] = repeat; /* width (in bytes) of each element and field in the INPUT row-major table */ incolwidth[ii] = repeat * width; /* starting offset of each field in the OUTPUT column-major table */ outcolstart[ii + 1] = outcolstart[ii] + incolwidth[ii] * nrows; /* length of each sequence of bytes, after sorting them in signicant order */ outbytespan[ii] = (incolwidth[ii] * nrows) / width; } /* the transformed table has only 1 row */ /* output table width 8 bytes per column */ fits_modify_key_lng(outfptr, "NAXIS2", 1, "&", status); fits_modify_key_lng(outfptr, "NAXIS1", ncols * 8, "&", status); /* move to the start of the input table */ fits_get_hduaddrll(infptr, &headstart, &datastart, &dataend, status); ffmbyt(infptr, datastart, 0, status); for (jj = 0; jj < nrows; jj++) { /* loop over rows */ for (ii = 0; ii < ncols; ii++) { /* loop over columns */ if (inrepeat[ii] > 0) { kk = 0; switch (colcode[ii]) { /* separate the byte planes for the 2-byte, 4-byte, and 8-byte numeric columns */ case 'E': while(kk < incolwidth[ii]) { cptr = buffer + (outcolstart[ii] + (jj * inrepeat[ii]) + kk/4); ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ kk += 4; } break; case 'D': case 'K': while(kk < incolwidth[ii]) { cptr = buffer + (outcolstart[ii] + (jj * inrepeat[ii]) + kk/8); ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ kk += 8; } break; default: /* don't bother separating the bytes for other column types */ cptr = buffer + (outcolstart[ii] + (jj * incolwidth[ii])); /* addr to copy to */ startbyte = (infptr->Fptr)->bytepos; /* save the starting byte location */ ffgbyt(infptr, incolwidth[ii], cptr, status); /* copy all the bytes */ if (incolwidth[ii] >= MINDIRECT) { /* have to explicitly move to next byte */ ffmbyt(infptr, startbyte + incolwidth[ii], 0, status); } } } } } fits_set_hdustruc(outfptr, status); for (ii = 0; ii < ncols; ii++) { /* loop over columns */ if (inrepeat[ii] > 0) { datasize = (size_t) (outcolstart[ii + 1] - outcolstart[ii]); /* allocate memory for the compressed data */ compressed_data = malloc(datasize*2); if (!compressed_data) { ffpmsg("data memory allocation error"); return(-1); } switch (colcode[ii]) { case 'I': #if BYTESWAPPED ffswap2((short *) (buffer + outcolstart[ii]), datasize / 2); #endif dlen = fits_rcomp_short ((short *)(buffer + outcolstart[ii]), datasize / 2, (unsigned char *) compressed_data, datasize * 2, 32); fits_make_keyn("ZCTYP", ii+1, keyname, status); fits_write_key(outfptr, TSTRING, keyname, "RICE_1", "compression algorithm for column", status); break; case 'J': #if BYTESWAPPED ffswap4((int *) (buffer + outcolstart[ii]), datasize / 4); #endif dlen = fits_rcomp ((int *)(buffer + outcolstart[ii]), datasize / 4, (unsigned char *) compressed_data, datasize * 2, 32); fits_make_keyn("ZCTYP", ii+1, keyname, status); fits_write_key(outfptr, TSTRING, keyname, "RICE_1", "compression algorithm for column", status); break; case 'B': dlen = fits_rcomp_byte ((signed char *)(buffer + outcolstart[ii]), datasize, (unsigned char *) compressed_data, datasize * 2, 32); fits_make_keyn("ZCTYP", ii+1, keyname, status); fits_write_key(outfptr, TSTRING, keyname, "RICE_1", "compression algorithm for column", status); break; default: /* gzip compress the data */ compress2mem_from_mem(buffer + outcolstart[ii], datasize, &compressed_data, &datasize, realloc, &dlen, status); fits_make_keyn("ZCTYP", ii+1, keyname, status); switch (colcode[ii]) { case 'E': case 'D': case 'K': fits_write_key(outfptr, TSTRING, keyname, "GZIP_2", "compression algorithm for column", status); break; default: fits_write_key(outfptr, TSTRING, keyname, "GZIP_1", "compression algorithm for column", status); } } /* end of switch block */ if (dlen != 0) cratio[ii] = (float) datasize / (float) dlen; /* compression ratio of the column */ /* write the compressed data to the output column */ fits_set_tscale(outfptr, ii + 1, 1.0, 0.0, status); /* turn off any data scaling, first */ fits_write_col(outfptr, TBYTE, ii + 1, 1, 1, dlen, compressed_data, status); free(compressed_data); /* don't need the compressed data any more */ /* printf(" %c %5.2f\n",colcode[ii],cratio[ii]); */ if (colcode[ii] == 'I' || colcode[ii] == 'J' || colcode[ii] == 'B') sprintf(tempstring," %6.2f\n",cratio[ii]); else sprintf(tempstring," \n"); strcat(results[ii],tempstring); } } /* end of loop over ncols */ if (print_report) { printf(" Compression Ratios: Gzip Shuf Rice\n"); for (ii = 0; ii < ncols; ii++) { printf("%s", results[ii]); } } fits_write_key(outfptr, TLOGICAL, "ZTABLE", <rue, "this is a compressed table", status); fits_write_key(outfptr, TLONGLONG, "ZTILELEN", &nrows, "number of rows in each tile", status); /* save the original PCOUNT value */ fits_read_key(infptr, TLONG, "PCOUNT", &pcount, comm, status); fits_write_key(outfptr, TLONG, "ZPCOUNT", &pcount, comm, status); fits_write_key(outfptr, TLONGLONG, "ZNAXIS1", &naxis1, "original rows width", status); fits_write_key(outfptr, TLONGLONG, "ZNAXIS2", &nrows, "original number of rows", status); free(buffer); fits_gzip_heap(infptr, outfptr, status); fits_set_hdustruc(outfptr, status); return(*status); } /*--------------------------------------------------------------------------*/ int fits_compress_table_shuffle(fitsfile *infptr, fitsfile *outfptr, int *status) /* Compress the input FITS binary table using the 'fast' method, which consists of (a) transposing the rows and columns, and (b) shuffling the bytes for the I, J, K, E, and D columns so that the most significant byte of every element occurs first in the array, followed by the next most significant byte, and so on to the least significant byte. Thus, if you have 3 4-byte numeric values, the bytes 012301230123 get shuffled to 000111222333 Finally, (c) compress each column of bytes with gzip and copy to the output table. */ { LONGLONG nrows, incolwidth[999], inrepeat[999], outcolstart[1000], outbytespan[999]; LONGLONG headstart, datastart, dataend, startbyte, jj, kk, naxis1; long repeat, width, pcount; int ii, ncols, coltype, hdutype, ltrue = 1; char *buffer, *cptr, keyname[9], tform[40], colcode[999]; char comm[FLEN_COMMENT], *compressed_data, tempstring[20]; size_t dlen, datasize; float cratio[999]; if (*status > 0) return(*status); fits_get_hdu_type(infptr, &hdutype, status); if (hdutype != BINARY_TBL) { *status = NOT_BTABLE; return(*status); } fits_get_num_rowsll(infptr, &nrows, status); fits_get_num_cols(infptr, &ncols, status); fits_read_key(infptr, TLONGLONG, "NAXIS1", &naxis1, NULL, status); if (*status > 0) return(*status); if (nrows < 1 || ncols < 1) { /* just copy the HDU if the table has 0 columns or rows */ if (infptr != outfptr) { /* copy input header to the output */ fits_copy_hdu (infptr, outfptr, 0, status); } return(*status); } /* allocate space for the transposed table */ buffer = calloc((size_t) naxis1, (size_t) nrows); if (!buffer) { ffpmsg("Could not allocate buffer for transformed table"); *status = MEMORY_ALLOCATION; return(*status); } if (infptr != outfptr) { /* copy input header to the output */ fits_copy_header(infptr, outfptr, status); } fits_write_key_log(outfptr, "ZTABLE", 1, "extension contains compressed binary table", status); fits_write_key(outfptr, TLONGLONG, "ZTILELEN", &nrows, "number of rows in each tile", status); fits_write_key(outfptr, TLONGLONG, "ZNAXIS1", &naxis1, "original rows width", status); fits_write_key(outfptr, TLONGLONG, "ZNAXIS2", &nrows, "original number of rows", status); /* save the original PCOUNT value */ fits_read_key(infptr, TLONG, "PCOUNT", &pcount, comm, status); fits_write_key(outfptr, TLONG, "ZPCOUNT", &pcount, comm, status); /* reset the PCOUNT keyword to zero */ pcount = 0; fits_modify_key_lng(outfptr, "PCOUNT", pcount, NULL, status); outcolstart[0] = 0; for (ii = 0; ii < ncols; ii++) { /* get the column type, repeat count, and unit width */ fits_make_keyn("TFORM", ii+1, keyname, status); fits_read_key(outfptr, TSTRING, keyname, tform, comm, status); /* preserve the original TFORM value and comment string */ keyname[0] = 'Z'; fits_write_key(outfptr, TSTRING, keyname, tform, comm, status); keyname[0] = 'T'; /* all columns are now VLAs */ fits_modify_key_str(outfptr, keyname, "1PB", "&", status); fits_binary_tform(tform, &coltype, &repeat, &width, status); cptr = tform; while(isdigit(*cptr)) cptr++; colcode[ii] = *cptr; /* save the column type code */ if (coltype == TBIT) { repeat = (repeat + 7) / 8; /* convert from bits to bytes */ } else if (coltype == TSTRING) { width = 1; /* ignore the optional 'w' in 'rAw' format */ } else if (coltype < 0) { /* pointer to variable length array */ width = 8; if (colcode[ii] == 'Q') width = 16; /* this is a 'Q' not a 'P' column */ repeat = 1; } inrepeat[ii] = repeat; /* width (in bytes) of each element and field in the INPUT row-major table */ incolwidth[ii] = repeat * width; /* starting offset of each field in the OUTPUT column-major table */ outcolstart[ii + 1] = outcolstart[ii] + incolwidth[ii] * nrows; /* length of each sequence of bytes, after sorting them in signicant order */ outbytespan[ii] = (incolwidth[ii] * nrows) / width; } /* the transformed table has only 1 row */ /* output table width 8 bytes per column */ fits_modify_key_lng(outfptr, "NAXIS2", 1, "&", status); fits_modify_key_lng(outfptr, "NAXIS1", ncols * 8, "&", status); /* move to the start of the input table */ fits_get_hduaddrll(infptr, &headstart, &datastart, &dataend, status); ffmbyt(infptr, datastart, 0, status); for (jj = 0; jj < nrows; jj++) { /* loop over rows */ for (ii = 0; ii < ncols; ii++) { /* loop over columns */ if (inrepeat[ii] > 0) { kk = 0; switch (colcode[ii]) { /* separate the byte planes for the 2-byte, 4-byte, and 8-byte numeric columns */ case 'I': while(kk < incolwidth[ii]) { cptr = buffer + (outcolstart[ii] + (jj * inrepeat[ii]) + kk/2); ffgbyt(infptr, 1, cptr, status); /* copy 1st byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 2nd byte */ kk += 2; } break; case 'J': case 'E': while(kk < incolwidth[ii]) { cptr = buffer + (outcolstart[ii] + (jj * inrepeat[ii]) + kk/4); ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ kk += 4; } break; case 'D': case 'K': while(kk < incolwidth[ii]) { cptr = buffer + (outcolstart[ii] + (jj * inrepeat[ii]) + kk/8); ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ cptr += outbytespan[ii]; ffgbyt(infptr, 1, cptr, status); /* copy 1 byte */ kk += 8; } break; default: /* don't bother separating the bytes for other column types */ cptr = buffer + (outcolstart[ii] + (jj * incolwidth[ii])); /* addr to copy to */ startbyte = (infptr->Fptr)->bytepos; /* save the starting byte location */ ffgbyt(infptr, incolwidth[ii], cptr, status); /* copy all the bytes */ if (incolwidth[ii] >= MINDIRECT) { /* have to explicitly move to next byte */ ffmbyt(infptr, startbyte + incolwidth[ii], 0, status); } } } } } fits_set_hdustruc(outfptr, status); /* now compress each column */ for (ii = 0; ii < ncols; ii++) { /* loop over columns */ if (inrepeat[ii] > 0) { /* write the compression type code for this column */ switch (colcode[ii]) { case 'I': case 'J': case 'K': case 'E': case 'D': fits_make_keyn("ZCTYP", ii+1, keyname, status); fits_write_key(outfptr, TSTRING, keyname, "GZIP_2", "compression algorithm for column", status); break; default: fits_make_keyn("ZCTYP", ii+1, keyname, status); fits_write_key(outfptr, TSTRING, keyname, "GZIP_1", "compression algorithm for column", status); } datasize = (size_t) (outcolstart[ii + 1] - outcolstart[ii]); /* allocate memory for the compressed data */ compressed_data = malloc(datasize); if (!compressed_data) { ffpmsg("data memory allocation error"); return(-1); } /* gzip compress the data */ compress2mem_from_mem(buffer + outcolstart[ii], datasize, &compressed_data, &datasize, realloc, &dlen, status); /* write the compressed data to the output column */ fits_set_tscale(outfptr, ii + 1, 1.0, 0.0, status); /* turn off any data scaling, first */ fits_write_col(outfptr, TBYTE, ii + 1, 1, 1, dlen, compressed_data, status); cratio[ii] = (float) datasize / (float) dlen; free(compressed_data); /* don't need the compressed data any more */ sprintf(tempstring," %6.2f",cratio[ii]); strcat(results[ii],tempstring); } } free(buffer); /* shuffle and compress the input heap and append to the output file */ fits_gzip_heap(infptr, outfptr, status); fits_set_hdustruc(outfptr, status); return(*status); } /*--------------------------------------------------------------------------*/ int fits_compress_table_best(fitsfile *infptr, fitsfile *outfptr, int *status) /* Compress the input FITS binary table using the 'best' compression method, i.e, whichever method produces the highest compression for each column. First, transpose the rows and columns in the table, then, depending on the data type of the column, try the different compression methods to see which one produces the highest amount of compression. */ { LONGLONG nrows, incolwidth[999], inrepeat[999], outcolstart[1000], outbytespan[999]; LONGLONG headstart, datastart, dataend, startbyte, jj, naxis1; long repeat, width, pcount; int ii, ncols, coltype, hdutype, ltrue = 1; char *buffer, *cptr, keyname[9], tform[40], colcode[999]; char comm[FLEN_COMMENT]; char *gzip1_data = 0, *gzip2_data = 0, *rice_data = 0; size_t gzip1_len, gzip2_len, rice_len, datasize, buffsize; if (*status > 0) return(*status); fits_get_hdu_type(infptr, &hdutype, status); if (hdutype != BINARY_TBL) { *status = NOT_BTABLE; return(*status); } fits_get_num_rowsll(infptr, &nrows, status); fits_get_num_cols(infptr, &ncols, status); fits_read_key(infptr, TLONGLONG, "NAXIS1", &naxis1, NULL, status); if (*status > 0) return(*status); if (nrows < 1 || ncols < 1) { /* just copy the HDU if the table has 0 columns or rows */ if (infptr != outfptr) { /* copy input header to the output */ fits_copy_hdu (infptr, outfptr, 0, status); } return(*status); } /* allocate space for the transposed table */ buffer = calloc((size_t) naxis1, (size_t) nrows); if (!buffer) { ffpmsg("Could not allocate buffer for transformed table"); *status = MEMORY_ALLOCATION; return(*status); } if (infptr != outfptr) { /* copy input header to the output */ fits_copy_header(infptr, outfptr, status); } fits_write_key_log(outfptr, "ZTABLE", 1, "extension contains compressed binary table", status); fits_write_key(outfptr, TLONGLONG, "ZTILELEN", &nrows, "number of rows in each tile", status); fits_write_key(outfptr, TLONGLONG, "ZNAXIS1", &naxis1, "original rows width", status); fits_write_key(outfptr, TLONGLONG, "ZNAXIS2", &nrows, "original number of rows", status); /* save the original PCOUNT value */ fits_read_key(infptr, TLONG, "PCOUNT", &pcount, comm, status); fits_write_key(outfptr, TLONG, "ZPCOUNT", &pcount, comm, status); /* reset the PCOUNT keyword to zero */ pcount = 0; fits_modify_key_lng(outfptr, "PCOUNT", pcount, NULL, status); /* Modify the TFORMn keywords; all columns become variable-length arrays. */ /* Save the original TFORMn values in the corresponding ZFORMn keyword. */ outcolstart[0] = 0; for (ii = 0; ii < ncols; ii++) { /* get the column type, repeat count, and unit width */ fits_make_keyn("TFORM", ii+1, keyname, status); fits_read_key(outfptr, TSTRING, keyname, tform, comm, status); /* preserve the original TFORM value and comment string */ keyname[0] = 'Z'; fits_write_key(outfptr, TSTRING, keyname, tform, comm, status); keyname[0] = 'T'; /* all columns are now VLAs */ fits_modify_key_str(outfptr, keyname, "1PB", "&", status); fits_binary_tform(tform, &coltype, &repeat, &width, status); cptr = tform; while(isdigit(*cptr)) cptr++; colcode[ii] = *cptr; /* save the column type code */ /* deal with special cases */ if (coltype == TBIT) { repeat = (repeat + 7) / 8; /* convert from bits to bytes */ } else if (coltype == TSTRING) { width = 1; /* ignore the optional 'w' in 'rAw' format */ } else if (coltype < 0) { /* pointer to variable length array */ repeat = 1; if (colcode[ii] == 'Q') width = 16; /* this is a 'Q' column */ else width = 8; /* this is a 'P' column */ } inrepeat[ii] = repeat; /* width (in bytes) of each element and field in the INPUT row-major table */ incolwidth[ii] = repeat * width; /* starting offset of each field in the OUTPUT column-major table */ outcolstart[ii + 1] = outcolstart[ii] + incolwidth[ii] * nrows; /* length of each sequence of bytes, after sorting them in signicant order */ outbytespan[ii] = (incolwidth[ii] * nrows) / width; } /* the transformed table has only 1 row */ /* output table width 8 bytes per column */ fits_modify_key_lng(outfptr, "NAXIS2", 1, "&", status); fits_modify_key_lng(outfptr, "NAXIS1", ncols * 8, "&", status); /* move to the start of the input table */ fits_get_hduaddrll(infptr, &headstart, &datastart, &dataend, status); ffmbyt(infptr, datastart, 0, status); /* now transpose the rows and columns in the table into an array in memory */ for (jj = 0; jj < nrows; jj++) { /* loop over rows */ for (ii = 0; ii < ncols; ii++) { /* loop over columns */ if (inrepeat[ii] > 0) { cptr = buffer + (outcolstart[ii] + (jj * incolwidth[ii])); /* output address */ startbyte = (infptr->Fptr)->bytepos; /* save the starting byte location */ ffgbyt(infptr, incolwidth[ii], cptr, status); /* copy the column element */ if (incolwidth[ii] >= MINDIRECT) { /* have to explicitly move to next byte */ ffmbyt(infptr, startbyte + incolwidth[ii], 0, status); } } } } fits_set_hdustruc(outfptr, status); /* reinitialize internal pointers */ /* Now compress each column. Depending on the column data type, try */ /* all the various available compression algorithms, then choose the one */ /* that gives the most compression. */ for (ii = 0; ii < ncols; ii++) { /* loop over columns */ if (inrepeat[ii] > 0) { datasize = (size_t) (outcolstart[ii + 1] - outcolstart[ii]); /* allocate memory for the gzip compressed data */ gzip1_data = malloc(datasize); if (!gzip1_data) { ffpmsg("data memory allocation error"); return(-1); } buffsize = datasize; /* First, simply compress the bytes with gzip (GZIP_1 algorithm code). */ /* This algorithm can be applied to every type of column. */ compress2mem_from_mem(buffer + outcolstart[ii], datasize, &gzip1_data, &buffsize, realloc, &gzip1_len, status); /* depending on the data type, try other compression methods */ switch (colcode[ii]) { case 'I': /* 2-byte Integer columns */ /************* first, try rice compression *****************/ rice_data = malloc(datasize * 2); /* memory for the compressed bytes */ if (!rice_data) { ffpmsg("data memory allocation error"); return(-1); } #if BYTESWAPPED /* have to swap the bytes on little endian machines */ ffswap2((short *) (buffer + outcolstart[ii]), datasize / 2); #endif rice_len = fits_rcomp_short ((short *)(buffer + outcolstart[ii]), datasize / 2, (unsigned char *) rice_data, datasize * 2, 32); #if BYTESWAPPED /* un-swap the bytes, to restore the original order */ ffswap2((short *) (buffer + outcolstart[ii]), datasize / 2); #endif /************* Second, try shuffled gzip compression *****************/ fits_shuffle_2bytes(buffer + outcolstart[ii], datasize / 2, status); /* allocate memory for the shuffled gzip compressed data */ gzip2_data = malloc(datasize); if (!gzip2_data) { ffpmsg("data memory allocation error"); return(-1); } buffsize = datasize; compress2mem_from_mem(buffer + outcolstart[ii], datasize, &gzip2_data, &buffsize, realloc, &gzip2_len, status); break; case 'J': /* 4-byte Integer columns */ /************* first, try rice compression *****************/ rice_data = malloc(datasize * 2); /* memory for the compressed bytes */ if (!rice_data) { ffpmsg("data memory allocation error"); return(-1); } #if BYTESWAPPED /* have to swap the bytes on little endian machines */ ffswap4((int *) (buffer + outcolstart[ii]), datasize / 4); #endif rice_len = fits_rcomp ((int *)(buffer + outcolstart[ii]), datasize / 4, (unsigned char *) rice_data, datasize * 2, 32); #if BYTESWAPPED /* un-swap the bytes, to restore the original order */ ffswap4((int *) (buffer + outcolstart[ii]), datasize / 4); #endif /************* Second, try shuffled gzip compression *****************/ fits_shuffle_4bytes(buffer + outcolstart[ii], datasize / 4, status); /* allocate memory for the shuffled gzip compressed data */ gzip2_data = malloc(datasize); if (!gzip2_data) { ffpmsg("data memory allocation error"); return(-1); } buffsize = datasize; compress2mem_from_mem(buffer + outcolstart[ii], datasize, &gzip2_data, &buffsize, realloc, &gzip2_len, status); break; case 'E': /* 4-byte floating-point */ /************* try shuffled gzip compression *****************/ fits_shuffle_4bytes(buffer + outcolstart[ii], datasize / 4, status); /* allocate memory for the gzip compressed data */ gzip2_data = malloc(datasize); if (!gzip2_data) { ffpmsg("data memory allocation error"); return(-1); } buffsize = datasize; compress2mem_from_mem(buffer + outcolstart[ii], datasize, &gzip2_data, &buffsize, realloc, &gzip2_len, status); rice_len = 100 * datasize; /* rice is not applicable to R*4 data */ break; case 'K': case 'D': /* 8-byte floating-point or integers */ /************* try shuffled gzip compression *****************/ fits_shuffle_8bytes(buffer + outcolstart[ii], datasize / 8, status); /* allocate memory for the gzip compressed data */ gzip2_data = malloc(datasize); if (!gzip2_data) { ffpmsg("data memory allocation error"); return(-1); } buffsize = datasize; compress2mem_from_mem(buffer + outcolstart[ii], datasize, &gzip2_data, &buffsize, realloc, &gzip2_len, status); rice_len = 100 * datasize; /* rice is not applicable to R*8 or I*8 data */ break; default: /* L, X, B, A, C, M, P, Q type columns: no other compression options */ rice_len = 100 * datasize; /* rice is not applicable */ gzip2_len = 100 * datasize; /* shuffled-gzip is not applicable */ } /* end of switch block */ /* now write the compressed bytes from the best algorithm */ fits_set_tscale(outfptr, ii + 1, 1.0, 0.0, status); /* turn off any data scaling, first */ if (gzip1_len <= gzip2_len && gzip1_len <= rice_len) { fits_write_col(outfptr, TBYTE, ii + 1, 1, 1, gzip1_len, gzip1_data, status); fits_make_keyn("ZCTYP", ii+1, keyname, status); fits_write_key(outfptr, TSTRING, keyname, "GZIP_1", "compression algorithm for column", status); } else if (gzip2_len <= gzip1_len && gzip2_len <= rice_len) { fits_write_col(outfptr, TBYTE, ii + 1, 1, 1, gzip2_len, gzip2_data, status); fits_make_keyn("ZCTYP", ii+1, keyname, status); fits_write_key(outfptr, TSTRING, keyname, "GZIP_2", "compression algorithm for column", status); } else { fits_write_col(outfptr, TBYTE, ii + 1, 1, 1, rice_len, rice_data, status); fits_make_keyn("ZCTYP", ii+1, keyname, status); fits_write_key(outfptr, TSTRING, keyname, "RICE_1", "compression algorithm for column", status); } /* free the temporary memory */ if (gzip1_data) free(gzip1_data); if (gzip2_data) free(gzip2_data); gzip1_data = 0; gzip2_data = 0; } } free(buffer); /* shuffle and compress the input heap and append to the output file */ fits_gzip_heap(infptr, outfptr, status); fits_set_hdustruc(outfptr, status); return(*status); } /*--------------------------------------------------------------------------*/ int fits_uncompress_table(fitsfile *infptr, fitsfile *outfptr, int *status) /* Uncompress the table that was compressed with fits_compress_table_fast or fits_compress_table_best. */ { LONGLONG nrows, rmajor_colwidth[999], rmajor_colstart[1000], cmajor_colstart[1000]; LONGLONG cmajor_repeat[999], rmajor_repeat[999], cmajor_bytespan[999], kk; LONGLONG headstart, datastart, dataend; long repeat, width, vla_repeat; int ncols, coltype, hdutype, anynull, tstatus, zctype[999]; char *buffer, *transbuffer, *cptr, keyname[9], tform[40], colcode[999]; long pcount, zheapptr, naxis1, naxis2, ii, jj; char *ptr, comm[FLEN_COMMENT], zvalue[FLEN_VALUE]; size_t dlen, fullsize; /**** do initial sanity checks *****/ if (*status > 0) return(*status); fits_get_hdu_type(infptr, &hdutype, status); if (hdutype != BINARY_TBL) { *status = NOT_BTABLE; return(*status); } fits_get_num_rowsll(infptr, &nrows, status); fits_get_num_cols(infptr, &ncols, status); if (nrows != 1 || (ncols < 1)) { /* just copy the HDU if the table does not have 1 row and more than 0 columns */ if (infptr != outfptr) { fits_copy_hdu (infptr, outfptr, 0, status); } return(*status); } /**** get size of the uncompressed table */ fits_read_key(infptr, TLONG, "ZNAXIS1", &naxis1, comm, status); if (*status > 0) { ffpmsg("Could not find the required ZNAXIS1 keyword"); *status = 1; return(*status); } fits_read_key(infptr, TLONG, "ZNAXIS2", &naxis2, comm, status); if (*status > 0) { ffpmsg("Could not find the required ZNAXIS2 keyword"); *status = 1; return(*status); } fits_read_key(infptr, TLONG, "ZPCOUNT", &pcount, comm, status); if (*status > 0) { ffpmsg("Could not find the required ZPCOUNT keyword"); *status = 1; return(*status); } tstatus = 0; fits_read_key(infptr, TLONG, "ZHEAPPTR", &zheapptr, comm, &tstatus); if (tstatus > 0) { zheapptr = 0; /* uncompressed table has no heap */ } /**** recreate the uncompressed table header keywords ****/ fits_copy_header(infptr, outfptr, status); /* reset the NAXISn keywords to what they were in the original uncompressed table */ fits_modify_key_lng(outfptr, "NAXIS1", naxis1, "&", status); fits_modify_key_lng(outfptr, "NAXIS2", naxis2, "&", status); fits_modify_key_lng(outfptr, "PCOUNT", pcount, "&", status); fits_delete_key(outfptr, "ZTABLE", status); fits_delete_key(outfptr, "ZNAXIS1", status); fits_delete_key(outfptr, "ZNAXIS2", status); fits_delete_key(outfptr, "ZPCOUNT", status); fits_delete_key(outfptr, "ZTILELEN", status); tstatus = 0; fits_delete_key(outfptr, "ZHEAPPTR", &tstatus); /**** get the compression method that was used for each column ****/ for (ii = 0; ii < ncols; ii++) { /* construct the ZCTYPn keyword name then read the keyword */ fits_make_keyn("ZCTYP", ii+1, keyname, status); tstatus = 0; fits_read_key(infptr, TSTRING, keyname, zvalue, NULL, &tstatus); if (tstatus) { zctype[ii] = GZIP_2; } else { if (!strcmp(zvalue, "GZIP_2")) { zctype[ii] = GZIP_2; } else if (!strcmp(zvalue, "GZIP_1")) { zctype[ii] = GZIP_1; } else if (!strcmp(zvalue, "RICE_1")) { zctype[ii] = RICE_1; } else { ffpmsg("Unrecognized ZCTYPn keyword compression code:"); ffpmsg(zvalue); *status = DATA_DECOMPRESSION_ERR; return(*status); } /* delete this keyword from the uncompressed header */ fits_delete_key(outfptr, keyname, status); } } /**** allocate space for the full transposed and untransposed table ****/ fullsize = naxis1 * naxis2; transbuffer = malloc(fullsize); if (!transbuffer) { ffpmsg("Could not allocate buffer for shuffled table"); *status = MEMORY_ALLOCATION; return(*status); } buffer = malloc(fullsize); if (!buffer) { ffpmsg("Could not allocate buffer for unshuffled table"); *status = MEMORY_ALLOCATION; return(*status); } /*** loop over each column: read and uncompress the bytes ****/ rmajor_colstart[0] = 0; cmajor_colstart[0] = 0; for (ii = 0; ii < ncols; ii++) { /* get the original column type, repeat count, and unit width */ fits_make_keyn("ZFORM", ii+1, keyname, status); fits_read_key(infptr, TSTRING, keyname, tform, comm, status); /* restore the original TFORM value and comment */ keyname[0] = 'T'; fits_modify_key_str(outfptr, keyname, tform, comm, status); /* now delete the ZFORM keyword */ keyname[0] = 'Z'; fits_delete_key(outfptr, keyname, status); cptr = tform; while(isdigit(*cptr)) cptr++; colcode[ii] = *cptr; /* save the column type code */ fits_binary_tform(tform, &coltype, &repeat, &width, status); /* deal with special cases */ if (coltype == TBIT) { repeat = (repeat + 7) / 8 ; /* convert from bits to bytes */ } else if (coltype == TSTRING) { width = 1; } else if (coltype < 0) { /* pointer to variable length array */ if (colcode[ii] == 'P') width = 8; /* this is a 'P' column */ else width = 16; /* this is a 'Q' not a 'P' column */ } rmajor_repeat[ii] = repeat; cmajor_repeat[ii] = repeat * naxis2; /* width (in bytes) of each field in the row-major table */ rmajor_colwidth[ii] = rmajor_repeat[ii] * width; /* starting offset of each field in the column-major table */ cmajor_colstart[ii + 1] = cmajor_colstart[ii] + rmajor_colwidth[ii] * naxis2; /* length of each sequence of bytes, after sorting them in signicant order */ cmajor_bytespan[ii] = (rmajor_colwidth[ii] * naxis2) / width; /* starting offset of each field in the row-major table */ rmajor_colstart[ii + 1] = rmajor_colstart[ii] + rmajor_colwidth[ii]; if (rmajor_repeat[ii] > 0) { /* read compressed bytes from input table */ fits_read_descript(infptr, ii + 1, 1, &vla_repeat, NULL, status); /* allocate memory and read in the compressed bytes */ ptr = malloc(vla_repeat); if (!ptr) { ffpmsg("Could not allocate buffer for compressed bytes"); *status = MEMORY_ALLOCATION; return(*status); } fits_set_tscale(infptr, ii + 1, 1.0, 0.0, status); /* turn off any data scaling, first */ fits_read_col_byt(infptr, ii + 1, 1, 1, vla_repeat, 0, (unsigned char *) ptr, &anynull, status); cptr = transbuffer + cmajor_colstart[ii]; fullsize = (size_t) (cmajor_colstart[ii+1] - cmajor_colstart[ii]); switch (colcode[ii]) { /* separate the byte planes for the 2-byte, 4-byte, and 8-byte numeric columns */ case 'I': if (zctype[ii] == RICE_1) { dlen = fits_rdecomp_short((unsigned char *)ptr, vla_repeat, (unsigned short *)cptr, fullsize / 2, 32); #if BYTESWAPPED ffswap2((short *) cptr, fullsize / 2); #endif } else { /* gunzip the data into the correct location */ uncompress2mem_from_mem(ptr, vla_repeat, &cptr, &fullsize, realloc, &dlen, status); } break; case 'J': if (zctype[ii] == RICE_1) { dlen = fits_rdecomp ((unsigned char *) ptr, vla_repeat, (unsigned int *)cptr, fullsize / 4, 32); #if BYTESWAPPED ffswap4((int *) cptr, fullsize / 4); #endif } else { /* gunzip the data into the correct location */ uncompress2mem_from_mem(ptr, vla_repeat, &cptr, &fullsize, realloc, &dlen, status); } break; case 'B': if (zctype[ii] == RICE_1) { dlen = fits_rdecomp_byte ((unsigned char *) ptr, vla_repeat, (unsigned char *)cptr, fullsize, 32); } else { /* gunzip the data into the correct location */ uncompress2mem_from_mem(ptr, vla_repeat, &cptr, &fullsize, realloc, &dlen, status); } break; default: /* gunzip the data into the correct location in the full table buffer */ uncompress2mem_from_mem(ptr, vla_repeat, &cptr, &fullsize, realloc, &dlen, status); } /* end of switch block */ free(ptr); } } /* now transpose the rows and columns (from transbuffer to buffer) */ ptr = transbuffer; for (ii = 0; ii < ncols; ii++) { /* loop over columns */ if (rmajor_repeat[ii] > 0) { if ((zctype[ii] == GZIP_2)) { /* need to unshuffle the bytes */ switch (colcode[ii]) { /* recombine the byte planes for the 2-byte, 4-byte, and 8-byte numeric columns */ case 'I': /* get the 1st byte of each I*2 value */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols])); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 2; } } /* get the 2nd byte of each I*2 value */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols]) + 1); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 2; } } break; case 'J': case 'E': /* get the 1st byte of each 4-byte value */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols])); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 4; } } /* get the 2nd byte */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols]) + 1); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 4; } } /* get the 3rd byte */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols]) + 2); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 4; } } /* get the 4th byte */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols]) + 3); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 4; } } break; case 'D': case 'K': /* get the 1st byte of each 8-byte value */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols])); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 8; } } /* get the 2nd byte */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols]) + 1); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 8; } } /* get the 3rd byte */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols]) + 2); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 8; } } /* get the 4th byte */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols]) + 3); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 8; } } /* get the 5th byte */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols]) + 4); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 8; } } /* get the 6th byte */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols]) + 5); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 8; } } /* get the 7th byte */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols]) + 6); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 8; } } /* get the 8th byte */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + (jj * rmajor_colstart[ncols]) + 7); for (kk = 0; kk < rmajor_repeat[ii]; kk++) { *cptr = *ptr; /* copy 1 byte */ ptr++; cptr += 8; } } break; default: /* should never get here */ ffpmsg("Error: unexpected use of GZIP_2 to compress a column"); *status = DATA_DECOMPRESSION_ERR; return(*status); } /* end of switch */ } else { /* not GZIP_2, so just transpose the bytes */ for (jj = 0; jj < naxis2; jj++) { /* loop over number of rows in the output table */ cptr = buffer + (rmajor_colstart[ii] + jj * rmajor_colstart[ncols]); /* addr to copy to */ memcpy(cptr, ptr, (size_t) rmajor_colwidth[ii]); ptr += (rmajor_colwidth[ii]); } } } } /* end of ncols loop */ /* copy the buffer of data to the output data unit */ fits_get_hduaddrll(outfptr, &headstart, &datastart, &dataend, status); ffmbyt(outfptr, datastart, 1, status); ffpbyt(outfptr, naxis1 * naxis2, buffer, status); free(buffer); free(transbuffer); /* reset internal table structure parameters */ fits_set_hdustruc(outfptr, status); /* unshuffle the heap, if it exists */ fits_gunzip_heap(infptr, outfptr, status); return(*status); } /*--------------------------------------------------------------------------*/ int fits_gzip_datablocks(fitsfile *fptr, size_t *size, int *status) /* GZIP compress all the data blocks in the binary table HDU. Store the size of the compressed byte stream in the PCOUNT keyword. Save the original PCOUNT value in the ZPCOUNT keyword. */ { long headstart, datastart, dataend; char *ptr, *cptr, *iptr; size_t dlen, datasize, ii; /* allocate memory for the data and the compressed data */ fits_get_hduaddr(fptr, &headstart, &datastart, &dataend, status); datasize = dataend - datastart; ptr = malloc(datasize); cptr = malloc(datasize); if (!ptr || !cptr) { ffpmsg("data memory allocation error in fits_gzip_datablocks\n"); return(-1); } /* copy the data into memory */ ffmbyt(fptr,datastart, REPORT_EOF, status); iptr = ptr; for (ii = 0; ii < datasize; ii+= 2880) { ffgbyt(fptr, 2880, iptr, status); iptr += 2880; } /* gzip compress the data */ compress2mem_from_mem(ptr, datasize, &cptr, &datasize, realloc, &dlen, status); *size = dlen; free(cptr); /* don't need the compressed data any more */ free(ptr); /* don't need the original data any more */ return(*status); } /*--------------------------------------------------------------------------*/ static int fits_gzip_heap(fitsfile *infptr, fitsfile *outfptr, int *status) /* Compress the binary table heap in the input file and write it to the output file. First, shuffle the bytes for the numeric arrays in the heap, so that the bytes are sorted in order of decreasing significance. Then gzip the entire heap as a single block of data. Then append this compressed heap to the end of any existing data in the output file heap. */ { LONGLONG datastart, dataend, nrows, naxis1, heapsize, length, offset, pcount, jj; int coltype, ncols, ii; char *heap, *compheap, card[FLEN_CARD]; size_t theapsize, compsize; if (*status > 0) return(*status); /* insert a set of COMMENT keyword to indicate that this is a compressed table */ fits_read_card(outfptr, "TFIELDS", card, status); fits_insert_card(outfptr, "COMMENT [FPACK] This is a compressed binary table generated by fpack.", status); fits_insert_card(outfptr, "COMMENT [FPACK] It can be uncompressed using funpack.", status); fits_insert_card(outfptr, "COMMENT [FPACK] fpack and funpack are available from the HEASARC Web site.", status); /* get the size of the heap (value of PCOUNT keyword) */ fits_read_key(infptr, TLONGLONG, "PCOUNT", &heapsize, NULL, status); /* return if there is no heap */ if (*status != 0 || heapsize == 0) return(*status); /* allocate memory for the heap and compressed heap */ heap = malloc((size_t) heapsize); if (!heap) { ffpmsg("Could not allocate buffer for the heap (fits_gzip_heap"); *status = MEMORY_ALLOCATION; return(*status); } compheap = malloc((size_t) heapsize); if (!compheap) { ffpmsg("Could not allocate buffer for compressed heap (fits_gzip_heap"); free(heap); *status = MEMORY_ALLOCATION; return(*status); } fits_get_hduaddrll(infptr, NULL, &datastart, NULL, status); fits_get_num_rowsll(infptr, &nrows, status); fits_get_num_cols(infptr, &ncols, status); fits_read_key(infptr, TLONGLONG, "NAXIS1", &naxis1, NULL, status); /* move to start of the heap and copy the heap into memory */ ffmbyt(infptr, datastart + (nrows * naxis1), REPORT_EOF, status); ffgbyt(infptr, heapsize, heap, status); /* shuffle the bytes for the numeric columns */ for (ii = 1; ii <= ncols; ii++) { fits_get_coltype(infptr, ii, &coltype, NULL, NULL, status); if (coltype >= 0) continue; /* only interested in variable length columns */ coltype = coltype * (-1); switch (coltype) { /* shuffle the bytes for the 2-byte, 4-byte, and 8-byte numeric columns */ case TSHORT: for (jj = 1; jj <= nrows; jj++) { fits_read_descriptll(infptr, ii, jj, &length, &offset, status); fits_shuffle_2bytes(heap + offset, length, status); } break; case TLONG: case TFLOAT: for (jj = 1; jj <= nrows; jj++) { fits_read_descriptll(infptr, ii, jj, &length, &offset, status); fits_shuffle_4bytes(heap + offset, length, status); } break; case TDOUBLE: case TLONGLONG: for (jj = 1; jj <= nrows; jj++) { fits_read_descriptll(infptr, ii, jj, &length, &offset, status); fits_shuffle_8bytes(heap + offset, length, status); } break; default: /* don't have to do anything for other column types */ break; } /* end of switch block */ } /* gzip compress the shuffled heap */ theapsize = (size_t) heapsize; compress2mem_from_mem(heap, (size_t) heapsize, &compheap, &theapsize, realloc, &compsize, status); free(heap); /* don't need the uncompresse heap any more */ /* update the internal pointers */ fits_set_hdustruc(outfptr, status); /* save offset to the start of the compressed heap, relative to the start of the main data table in the ZHEAPPTR keyword, and update PCOUNT to the new extended heap size */ fits_read_key(outfptr, TLONGLONG, "PCOUNT", &pcount, NULL, status); fits_get_num_rowsll(outfptr, &nrows, status); fits_read_key(outfptr, TLONGLONG, "NAXIS1", &naxis1, NULL, status); fits_write_key_lng(outfptr, "ZHEAPPTR", (LONGLONG) ((nrows * naxis1) + pcount), "byte offset to compressed heap", status); fits_modify_key_lng(outfptr, "PCOUNT", pcount + compsize, NULL, status); /* now append the compressed heap to the heap in the output file */ dataend = (outfptr->Fptr)->datastart + (outfptr->Fptr)->heapstart + (outfptr->Fptr)->heapsize; ffmbyt(outfptr, dataend, IGNORE_EOF, status); ffpbyt(outfptr, compsize, compheap, status); free(compheap); /* also update the internal pointer to the heap size */ (outfptr->Fptr)->heapsize = (outfptr->Fptr)->heapsize + compsize; /* update the internal pointers again */ fits_set_hdustruc(outfptr, status); return(*status); } /*--------------------------------------------------------------------------*/ static int fits_shuffle_2bytes(char *heap, LONGLONG length, int *status) /* shuffle the bytes in an array of 2-byte integers in the heap */ { LONGLONG ii; char *ptr, *cptr, *heapptr; ptr = malloc((size_t) (length * 2)); heapptr = heap; cptr = ptr; for (ii = 0; ii < length; ii++) { *cptr = *heapptr; heapptr++; *(cptr + length) = *heapptr; heapptr++; cptr++; } memcpy(heap, ptr, (size_t) (length * 2)); free(ptr); return(*status); } /*--------------------------------------------------------------------------*/ static int fits_shuffle_4bytes(char *heap, LONGLONG length, int *status) /* shuffle the bytes in an array of 4-byte integers or floats */ { LONGLONG ii; char *ptr, *cptr, *heapptr; ptr = malloc((size_t) (length * 4)); if (!ptr) { ffpmsg("malloc failed\n"); return(*status); } heapptr = heap; cptr = ptr; for (ii = 0; ii < length; ii++) { *cptr = *heapptr; heapptr++; *(cptr + length) = *heapptr; heapptr++; *(cptr + (length * 2)) = *heapptr; heapptr++; *(cptr + (length * 3)) = *heapptr; heapptr++; cptr++; } memcpy(heap, ptr, (size_t) (length * 4)); free(ptr); return(*status); } /*--------------------------------------------------------------------------*/ static int fits_shuffle_8bytes(char *heap, LONGLONG length, int *status) /* shuffle the bytes in an array of 8-byte integers or doubles in the heap */ { LONGLONG ii; char *ptr, *cptr, *heapptr; ptr = calloc(1, (size_t) (length * 8)); heapptr = heap; /* for some bizarre reason this loop fails to compile under OpenSolaris using the proprietary SunStudioExpress C compiler; use the following equivalent loop instead. cptr = ptr; for (ii = 0; ii < length; ii++) { *cptr = *heapptr; heapptr++; *(cptr + length) = *heapptr; heapptr++; *(cptr + (length * 2)) = *heapptr; heapptr++; *(cptr + (length * 3)) = *heapptr; heapptr++; *(cptr + (length * 4)) = *heapptr; heapptr++; *(cptr + (length * 5)) = *heapptr; heapptr++; *(cptr + (length * 6)) = *heapptr; heapptr++; *(cptr + (length * 7)) = *heapptr; heapptr++; cptr++; } */ for (ii = 0; ii < length; ii++) { cptr = ptr + ii; *cptr = *heapptr; heapptr++; cptr += length; *cptr = *heapptr; heapptr++; cptr += length; *cptr = *heapptr; heapptr++; cptr += length; *cptr = *heapptr; heapptr++; cptr += length; *cptr = *heapptr; heapptr++; cptr += length; *cptr = *heapptr; heapptr++; cptr += length; *cptr = *heapptr; heapptr++; cptr += length; *cptr = *heapptr; heapptr++; } memcpy(heap, ptr, (size_t) (length * 8)); free(ptr); return(*status); } /*--------------------------------------------------------------------------*/ static int fits_gunzip_heap(fitsfile *infptr, fitsfile *outfptr, int *status) /* inverse of the fits_gzip_heap function: uncompress and unshuffle the heap in the input file and write it to the output file */ { LONGLONG datastart, nrows, naxis1, length, offset, pcount, jj; LONGLONG zpcount, zheapptr, cheapsize; int coltype, ncols, ii; char *heap, *compheap; size_t arraysize, theapsize; if (*status > 0) return(*status); /* first, delete any COMMENT keywords written by fits_gzip_heap */ while (*status == 0) { fits_delete_str(outfptr, "COMMENT [FPACK]", status); } if (*status == KEY_NO_EXIST) *status = 0; /* ZPCOUNT = size of original uncompressed heap */ fits_read_key(infptr, TLONGLONG, "ZPCOUNT", &zpcount, NULL, status); /* just return if there is no heap */ if (*status != 0 || zpcount == 0) return(*status); fits_get_num_rowsll(infptr, &nrows, status); fits_read_key(infptr, TLONGLONG, "NAXIS1", &naxis1, NULL, status); /* ZHEAPPTR = offset to the start of the compressed heap */ fits_read_key(infptr, TLONGLONG, "ZHEAPPTR", &zheapptr, NULL, status); /* PCOUNT = total size of the compressed 2D table plus the compressed heap */ fits_read_key(infptr, TLONGLONG, "PCOUNT", &pcount, NULL, status); /* size of the compressed heap */ cheapsize = pcount - (zheapptr - (naxis1 * nrows)); /* allocate memory for the heap and uncompressed heap */ arraysize = (size_t) zpcount; heap = malloc(arraysize); if (!heap) { ffpmsg("Could not allocate buffer for the heap (fits_gunzip_heap"); *status = MEMORY_ALLOCATION; return(*status); } compheap = malloc((size_t) cheapsize); if (!compheap) { ffpmsg("Could not allocate buffer for compressed heap (fits_gunzip_heap"); free(heap); *status = MEMORY_ALLOCATION; return(*status); } fits_get_hduaddrll(infptr, NULL, &datastart, NULL, status); /* read the compressed heap into memory */ ffmbyt(infptr, datastart + zheapptr, REPORT_EOF, status); ffgbyt(infptr, cheapsize, compheap, status); /* uncompress the heap */ theapsize = (size_t) zpcount; uncompress2mem_from_mem(compheap, (size_t) cheapsize, &heap, &arraysize, realloc, &theapsize, status); free(compheap); /* don't need the compressed heap any more */ if (theapsize != zpcount) { /* something is wrong */ ffpmsg("uncompressed heap size != to ZPCOUNT"); free(heap); *status = MEMORY_ALLOCATION; return(*status); } /* get dimensions of the uncompressed table */ fits_get_num_rowsll(outfptr, &nrows, status); fits_read_key(outfptr, TLONGLONG, "NAXIS1", &naxis1, NULL, status); fits_get_num_cols(outfptr, &ncols, status); for (ii = ncols; ii > 0; ii--) { fits_get_coltype(outfptr, ii, &coltype, NULL, NULL, status); if (coltype >= 0) continue; /* only interested in variable length columns */ coltype = coltype * (-1); switch (coltype) { /* recombine the byte planes for the 2-byte, 4-byte, and 8-byte numeric columns */ case TSHORT: for (jj = nrows; jj > 0; jj--) { fits_read_descriptll(outfptr, ii, jj, &length, &offset, status); fits_unshuffle_2bytes(heap + offset, length, status); } break; case TLONG: case TFLOAT: for (jj = nrows; jj > 0; jj--) { fits_read_descriptll(outfptr, ii, jj, &length, &offset, status); fits_unshuffle_4bytes(heap + offset, length, status); } break; case TDOUBLE: case TLONGLONG: for (jj = nrows; jj > 0; jj--) { fits_read_descriptll(outfptr, ii, jj, &length, &offset, status); fits_unshuffle_8bytes(heap + offset, length, status); } break; default: /* don't need to recombine bytes for other column types */ break; } /* end of switch block */ } /* copy the unshuffled heap back to the output file */ fits_get_hduaddrll(outfptr, NULL, &datastart, NULL, status); ffmbyt(outfptr, datastart + (nrows * naxis1), IGNORE_EOF, status); ffpbyt(outfptr, zpcount, heap, status); free(heap); /* also update the internal pointer to the heap size */ (outfptr->Fptr)->heapsize = zpcount; /* update the internal pointers again */ fits_set_hdustruc(outfptr, status); return(*status); } /*--------------------------------------------------------------------------*/ static int fits_unshuffle_2bytes(char *heap, LONGLONG length, int *status) /* unshuffle the bytes in an array of 2-byte integers */ { LONGLONG ii; char *ptr, *cptr, *heapptr; ptr = malloc((size_t) (length * 2)); heapptr = heap + (2 * length) - 1; cptr = ptr + (2 * length) - 1; for (ii = 0; ii < length; ii++) { *cptr = *heapptr; cptr--; *cptr = *(heapptr - length); cptr--; heapptr--; } memcpy(heap, ptr, (size_t) (length * 2)); free(ptr); return(*status); } /*--------------------------------------------------------------------------*/ static int fits_unshuffle_4bytes(char *heap, LONGLONG length, int *status) /* unshuffle the bytes in an array of 4-byte integers or floats */ { LONGLONG ii; char *ptr, *cptr, *heapptr; ptr = malloc((size_t) (length * 4)); heapptr = heap + (4 * length) -1; cptr = ptr + (4 * length) -1; for (ii = 0; ii < length; ii++) { *cptr = *heapptr; cptr--; *cptr = *(heapptr - length); cptr--; *cptr = *(heapptr - (2 * length)); cptr--; *cptr = *(heapptr - (3 * length)); cptr--; heapptr--; } memcpy(heap, ptr, (size_t) (length * 4)); free(ptr); return(*status); } /*--------------------------------------------------------------------------*/ static int fits_unshuffle_8bytes(char *heap, LONGLONG length, int *status) /* unshuffle the bytes in an array of 8-byte integers or doubles */ { LONGLONG ii; char *ptr, *cptr, *heapptr; ptr = malloc((size_t) (length * 8)); heapptr = heap + (8 * length) - 1; cptr = ptr + (8 * length) -1; for (ii = 0; ii < length; ii++) { *cptr = *heapptr; cptr--; *cptr = *(heapptr - length); cptr--; *cptr = *(heapptr - (2 * length)); cptr--; *cptr = *(heapptr - (3 * length)); cptr--; *cptr = *(heapptr - (4 * length)); cptr--; *cptr = *(heapptr - (5 * length)); cptr--; *cptr = *(heapptr - (6 * length)); cptr--; *cptr = *(heapptr - (7 * length)); cptr--; heapptr--; } memcpy(heap, ptr, (size_t) (length * 8)); free(ptr); return(*status); } astropy-1.1.1/cextern/cfitsio/zutil.h0000644001134200020070000001574012602615517020563 0ustar embrayscience00000000000000/* zutil.h -- internal interface and configuration of the compression library * Copyright (C) 1995-2010 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ /* WARNING: this file should *not* be used by applications. It is part of the implementation of the compression library and is subject to change. Applications should only use zlib.h. */ #ifndef ZUTIL_H #define ZUTIL_H #if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ) # define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) #else # define ZLIB_INTERNAL #endif #include "zlib.h" #ifdef STDC # if !(defined(_WIN32_WCE) && defined(_MSC_VER)) # include # endif # include # include #endif #ifndef local # define local static #endif /* compile with -Dlocal if your debugger can't find static symbols */ typedef unsigned char uch; typedef uch FAR uchf; typedef unsigned short ush; typedef ush FAR ushf; typedef unsigned long ulg; extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* (size given to avoid silly warnings with Visual C++) */ #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] #define ERR_RETURN(strm,err) \ return (strm->msg = (char*)ERR_MSG(err), (err)) /* To be used only when the state is known to be valid */ /* common constants */ #ifndef DEF_WBITS # define DEF_WBITS MAX_WBITS #endif /* default windowBits for decompression. MAX_WBITS is for compression only */ #if MAX_MEM_LEVEL >= 8 # define DEF_MEM_LEVEL 8 #else # define DEF_MEM_LEVEL MAX_MEM_LEVEL #endif /* default memLevel */ #define STORED_BLOCK 0 #define STATIC_TREES 1 #define DYN_TREES 2 /* The three kinds of block type */ #define MIN_MATCH 3 #define MAX_MATCH 258 /* The minimum and maximum match lengths */ #define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ /* target dependencies */ #if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) # define OS_CODE 0x00 # if defined(__TURBOC__) || defined(__BORLANDC__) # if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) /* Allow compilation with ANSI keywords only enabled */ void _Cdecl farfree( void *block ); void *_Cdecl farmalloc( unsigned long nbytes ); # else # include # endif # else /* MSC or DJGPP */ # include # endif #endif #ifdef AMIGA # define OS_CODE 0x01 #endif #if defined(VAXC) || defined(VMS) # define OS_CODE 0x02 # define F_OPEN(name, mode) \ fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") #endif #if defined(ATARI) || defined(atarist) # define OS_CODE 0x05 #endif #ifdef OS2 # define OS_CODE 0x06 # ifdef M_I86 # include # endif #endif #if defined(MACOS) || defined(TARGET_OS_MAC) # define OS_CODE 0x07 # if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os # include /* for fdopen */ # else # ifndef fdopen # define fdopen(fd,mode) NULL /* No fdopen() */ # endif # endif #endif #ifdef TOPS20 # define OS_CODE 0x0a #endif #ifdef WIN32 # ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */ # define OS_CODE 0x0b # endif #endif #ifdef __50SERIES /* Prime/PRIMOS */ # define OS_CODE 0x0f #endif #if defined(_BEOS_) || defined(RISCOS) # define fdopen(fd,mode) NULL /* No fdopen() */ #endif #if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX # if defined(_WIN32_WCE) # define fdopen(fd,mode) NULL /* No fdopen() */ # ifndef _PTRDIFF_T_DEFINED typedef int ptrdiff_t; # define _PTRDIFF_T_DEFINED # endif # else # define fdopen(fd,type) _fdopen(fd,type) # endif #endif #if defined(__BORLANDC__) #pragma warn -8004 #pragma warn -8008 #pragma warn -8066 #endif /* provide prototypes for these when building zlib without LFS */ #if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); #endif /* common defaults */ #ifndef OS_CODE # define OS_CODE 0x03 /* assume Unix */ #endif #ifndef F_OPEN # define F_OPEN(name, mode) fopen((name), (mode)) #endif /* functions */ #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) # ifndef HAVE_VSNPRINTF # define HAVE_VSNPRINTF # endif #endif #if defined(__CYGWIN__) # ifndef HAVE_VSNPRINTF # define HAVE_VSNPRINTF # endif #endif #ifndef HAVE_VSNPRINTF # ifdef MSDOS /* vsnprintf may exist on some MS-DOS compilers (DJGPP?), but for now we just assume it doesn't. */ # define NO_vsnprintf # endif # ifdef __TURBOC__ # define NO_vsnprintf # endif # ifdef WIN32 /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ # if !defined(vsnprintf) && !defined(NO_vsnprintf) # if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 ) # define vsnprintf _vsnprintf # endif # endif # endif # ifdef __SASC # define NO_vsnprintf # endif #endif #ifdef VMS # define NO_vsnprintf #endif #if defined(pyr) # define NO_MEMCPY #endif #if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) /* Use our own functions for small and medium model with MSC <= 5.0. * You may have to use the same strategy for Borland C (untested). * The __SC__ check is for Symantec. */ # define NO_MEMCPY #endif #if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) # define HAVE_MEMCPY #endif #ifdef HAVE_MEMCPY # ifdef SMALL_MEDIUM /* MSDOS small or medium model */ # define zmemcpy _fmemcpy # define zmemcmp _fmemcmp # define zmemzero(dest, len) _fmemset(dest, 0, len) # else # define zmemcpy memcpy # define zmemcmp memcmp # define zmemzero(dest, len) memset(dest, 0, len) # endif #else void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len)); #endif /* Diagnostic functions */ #ifdef DEBUG # include extern int ZLIB_INTERNAL z_verbose; extern void ZLIB_INTERNAL z_error OF((char *m)); # define Assert(cond,msg) {if(!(cond)) z_error(msg);} # define Trace(x) {if (z_verbose>=0) fprintf x ;} # define Tracev(x) {if (z_verbose>0) fprintf x ;} # define Tracevv(x) {if (z_verbose>1) fprintf x ;} # define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} # define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} #else # define Assert(cond,msg) # define Trace(x) # define Tracev(x) # define Tracevv(x) # define Tracec(c,x) # define Tracecv(c,x) #endif voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items, unsigned size)); void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr)); #define ZALLOC(strm, items, size) \ (*((strm)->zalloc))((strm)->opaque, (items), (size)) #define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) #define TRY_FREE(s, p) {if (p) ZFREE(s, p);} #endif /* ZUTIL_H */ astropy-1.1.1/cextern/cfitsio/putcolj.c0000644001134200020070000021062312602615520021056 0ustar embrayscience00000000000000/* This file, putcolj.c, contains routines that write data elements to */ /* a FITS image or table, with long datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffpprj( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ long *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; long nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_pixels(fptr, TLONG, firstelem, nelem, 0, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpclj(fptr, 2, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffppnj( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ long *array, /* I - array of values that are written */ long nulval, /* I - undefined pixel value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). Any array values that are equal to the value of nulval will be replaced with the null pixel value that is appropriate for this column. */ { long row; long nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_write_compressed_pixels(fptr, TLONG, firstelem, nelem, 1, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcnj(fptr, 2, row, firstelem, nelem, array, nulval, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp2dj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ long *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { /* call the 3D writing routine, with the 3rd dimension = 1 */ ffp3dj(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp3dj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ long *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 3-D cube of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow, ii, jj; long fpixel[3]= {1,1,1}, lpixel[3]; LONGLONG nfits, narray; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = (long) ncols; lpixel[1] = (long) nrows; lpixel[2] = (long) naxis3; fits_write_compressed_img(fptr, TLONG, fpixel, lpixel, 0, array, NULL, status); return(*status); } tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so write all at once */ ffpclj(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to write to */ narray = 0; /* next pixel in input array to be written */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* writing naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffpclj(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpssj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long naxis, /* I - number of data axes in array */ long *naxes, /* I - size of each FITS axis */ long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ long *lpixel, /* I - last pixel in each axis to write */ long *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write a subsection of pixels to the primary array or image. A subsection is defined to be any contiguous rectangular array of pixels within the n-dimensional FITS data file. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow; LONGLONG fpix[7], dimen[7], astart, pstart; LONGLONG off2, off3, off4, off5, off6, off7; LONGLONG st10, st20, st30, st40, st50, st60, st70; LONGLONG st1, st2, st3, st4, st5, st6, st7; long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; if (*status > 0) return(*status); if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_img(fptr, TLONG, fpixel, lpixel, 0, array, NULL, status); return(*status); } if (naxis < 1 || naxis > 7) return(*status = BAD_DIMEN); tablerow=maxvalue(1,group); /* calculate the size and number of loops to perform in each dimension */ for (ii = 0; ii < 7; ii++) { fpix[ii]=1; irange[ii]=1; dimen[ii]=1; } for (ii = 0; ii < naxis; ii++) { fpix[ii]=fpixel[ii]; irange[ii]=lpixel[ii]-fpixel[ii]+1; dimen[ii]=naxes[ii]; } i1=irange[0]; /* compute the pixel offset between each dimension */ off2 = dimen[0]; off3 = off2 * dimen[1]; off4 = off3 * dimen[2]; off5 = off4 * dimen[3]; off6 = off5 * dimen[4]; off7 = off6 * dimen[5]; st10 = fpix[0]; st20 = (fpix[1] - 1) * off2; st30 = (fpix[2] - 1) * off3; st40 = (fpix[3] - 1) * off4; st50 = (fpix[4] - 1) * off5; st60 = (fpix[5] - 1) * off6; st70 = (fpix[6] - 1) * off7; /* store the initial offset in each dimension */ st1 = st10; st2 = st20; st3 = st30; st4 = st40; st5 = st50; st6 = st60; st7 = st70; astart = 0; for (i7 = 0; i7 < irange[6]; i7++) { for (i6 = 0; i6 < irange[5]; i6++) { for (i5 = 0; i5 < irange[4]; i5++) { for (i4 = 0; i4 < irange[3]; i4++) { for (i3 = 0; i3 < irange[2]; i3++) { pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; for (i2 = 0; i2 < irange[1]; i2++) { if (ffpclj(fptr, 2, tablerow, pstart, i1, &array[astart], status) > 0) return(*status); astart += i1; pstart += off2; } st2 = st20; st3 = st3+off3; } st3 = st30; st4 = st4+off4; } st4 = st40; st5 = st5+off5; } st5 = st50; st6 = st6+off6; } st6 = st60; st7 = st7+off7; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpgpj( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long firstelem, /* I - first vector element to write(1 = 1st) */ long nelem, /* I - number of values to write */ long *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of group parameters to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffpclj(fptr, 1L, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpclj( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ long *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of values to a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. */ { int tcode, maxelem2, hdutype, writeraw; long twidth, incre; long ntodo; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull, maxelem; double scale, zero; char tform[20], cform[20]; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); maxelem = maxelem2; if (tcode == TSTRING) ffcfmt(tform, cform); /* derive C format for writing strings */ /* if there is no scaling and the native machine format is not byteswapped then we can simply write the raw data bytes into the FITS file if the datatype of the FITS column is the same as the input values. Otherwise we must convert the raw values into the scaled and/or machine dependent format in a temporary buffer that has been allocated for this purpose. */ if (scale == 1. && zero == 0. && MACHINE == NATIVE && tcode == TLONG && LONGSIZE == 32) { writeraw = 1; maxelem = nelem; /* we can write the entire array at one time */ } else writeraw = 0; /*---------------------------------------------------------------------*/ /* Now write the pixels to the FITS column. */ /* First call the ffXXfYY routine to (1) convert the datatype */ /* if necessary, and (2) scale the values by the FITS TSCALn and */ /* TZEROn linear scaling parameters into a temporary buffer. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to process a one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ switch (tcode) { case (TLONG): if (writeraw) { /* write raw input bytes without conversion */ ffpi4b(fptr, ntodo, incre, (INT32BIT *) &array[next], status); } else { /* convert the raw data before writing to FITS file */ ffi4fi4(&array[next], ntodo, scale, zero, (INT32BIT *) buffer, status); ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); } break; case (TLONGLONG): fflongfi8(&array[next], ntodo, scale, zero, (LONGLONG *) buffer, status); ffpi8b(fptr, ntodo, incre, (long *) buffer, status); break; case (TBYTE): ffi4fi1(&array[next], ntodo, scale, zero, (unsigned char *) buffer, status); ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); break; case (TSHORT): ffi4fi2(&array[next], ntodo, scale, zero, (short *) buffer, status); ffpi2b(fptr, ntodo, incre, (short *) buffer, status); break; case (TFLOAT): ffi4fr4(&array[next], ntodo, scale, zero, (float *) buffer, status); ffpr4b(fptr, ntodo, incre, (float *) buffer, status); break; case (TDOUBLE): ffi4fr8(&array[next], ntodo, scale, zero, (double *) buffer, status); ffpr8b(fptr, ntodo, incre, (double *) buffer, status); break; case (TSTRING): /* numerical column in an ASCII table */ if (cform[1] != 's') /* "%s" format is a string */ { ffi4fstr(&array[next], ntodo, scale, zero, cform, twidth, (char *) buffer, status); if (incre == twidth) /* contiguous bytes */ ffpbyt(fptr, ntodo * twidth, buffer, status); else ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); break; } /* can't write to string column, so fall thru to default: */ default: /* error trap */ sprintf(message, "Cannot write numbers to column %d which has format %s", colnum,tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing elements %.0f thru %.0f of input data array (ffpclj).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while writing FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpcnj( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ long *array, /* I - array of values to write */ long nulvalue, /* I - value used to flag undefined pixels */ int *status) /* IO - error status */ /* Write an array of elements to the specified column of a table. Any input pixels equal to the value of nulvalue will be replaced by the appropriate null value in the output FITS file. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary */ { tcolumn *colptr; long ngood = 0, nbad = 0, ii; LONGLONG repeat, first, fstelm, fstrow; int tcode, overflow = 0; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode > 0) repeat = colptr->trepeat; /* repeat count for this column */ else repeat = firstelem -1 + nelem; /* variable length arrays */ /* if variable length array, first write the whole input vector, then go back and fill in the nulls */ if (tcode < 0) { if (ffpclj(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { if (*status == NUM_OVERFLOW) { /* ignore overflows, which are possibly the null pixel values */ /* overflow = 1; */ *status = 0; } else { return(*status); } } } /* absolute element number in the column */ first = (firstrow - 1) * repeat + firstelem; for (ii = 0; ii < nelem; ii++) { if (array[ii] != nulvalue) /* is this a good pixel? */ { if (nbad) /* write previous string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) return(*status); nbad=0; } ngood = ngood + 1; /* the consecutive number of good pixels */ } else { if (ngood) /* write previous string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ if (ffpclj(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status) > 0) { if (*status == NUM_OVERFLOW) { overflow = 1; *status = 0; } else { return(*status); } } } ngood=0; } nbad = nbad +1; /* the consecutive number of bad pixels */ } } /* finished loop; now just write the last set of pixels */ if (ngood) /* write last string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ ffpclj(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); } } else if (nbad) /* write last string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); } if (*status <= 0) { if (overflow) { *status = NUM_OVERFLOW; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi4fi1(long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ unsigned char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > UCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) (dvalue + .5); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi4fi2(long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ short *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < SHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (input[ii] > SHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else { if (dvalue >= 0) output[ii] = (short) (dvalue + .5); else output[ii] = (short) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi4fi4(long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ INT32BIT *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (INT32BIT) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else { if (dvalue >= 0) output[ii] = (INT32BIT) (dvalue + .5); else output[ii] = (INT32BIT) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int fflongfi8(long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ LONGLONG *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = input[ii]; } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else { if (dvalue >= 0) output[ii] = (LONGLONG) (dvalue + .5); else output[ii] = (LONGLONG) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi4fr4(long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ float *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) ((input[ii] - zero) / scale); } return(*status); } /*--------------------------------------------------------------------------*/ int ffi4fr8(long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ double *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (input[ii] - zero) / scale; } return(*status); } /*--------------------------------------------------------------------------*/ int ffi4fstr(long *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ char *cform, /* I - format for output string values */ long twidth, /* I - width of each field, in chars */ char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do scaling if required. */ { long ii; double dvalue; char *cptr; cptr = output; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { sprintf(output, cform, (double) input[ii]); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; sprintf(output, cform, dvalue); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } /* replace any commas with periods (e.g., in French locale) */ while ((cptr = strchr(cptr, ','))) *cptr = '.'; return(*status); } /* ======================================================================== */ /* the following routines support the 'long long' data type */ /* ======================================================================== */ /*--------------------------------------------------------------------------*/ int ffpprjj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ LONGLONG *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ ffpmsg("writing to compressed image is not supported"); return(*status = DATA_COMPRESSION_ERR); } row=maxvalue(1,group); ffpcljj(fptr, 2, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffppnjj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ LONGLONG *array, /* I - array of values that are written */ LONGLONG nulval, /* I - undefined pixel value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). Any array values that are equal to the value of nulval will be replaced with the null pixel value that is appropriate for this column. */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ ffpmsg("writing to compressed image is not supported"); return(*status = DATA_COMPRESSION_ERR); } row=maxvalue(1,group); ffpcnjj(fptr, 2, row, firstelem, nelem, array, nulval, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp2djj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { /* call the 3D writing routine, with the 3rd dimension = 1 */ ffp3djj(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp3djj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ LONGLONG *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 3-D cube of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow, ii, jj; LONGLONG nfits, narray; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ ffpmsg("writing to compressed image is not supported"); return(*status = DATA_COMPRESSION_ERR); } tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so write all at once */ ffpcljj(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to write to */ narray = 0; /* next pixel in input array to be written */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* writing naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffpcljj(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpssjj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long naxis, /* I - number of data axes in array */ long *naxes, /* I - size of each FITS axis */ long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ long *lpixel, /* I - last pixel in each axis to write */ LONGLONG *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write a subsection of pixels to the primary array or image. A subsection is defined to be any contiguous rectangular array of pixels within the n-dimensional FITS data file. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow; LONGLONG fpix[7], dimen[7], astart, pstart; LONGLONG off2, off3, off4, off5, off6, off7; LONGLONG st10, st20, st30, st40, st50, st60, st70; LONGLONG st1, st2, st3, st4, st5, st6, st7; long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; if (*status > 0) return(*status); if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ ffpmsg("writing to compressed image is not supported"); return(*status = DATA_COMPRESSION_ERR); } if (naxis < 1 || naxis > 7) return(*status = BAD_DIMEN); tablerow=maxvalue(1,group); /* calculate the size and number of loops to perform in each dimension */ for (ii = 0; ii < 7; ii++) { fpix[ii]=1; irange[ii]=1; dimen[ii]=1; } for (ii = 0; ii < naxis; ii++) { fpix[ii]=fpixel[ii]; irange[ii]=lpixel[ii]-fpixel[ii]+1; dimen[ii]=naxes[ii]; } i1=irange[0]; /* compute the pixel offset between each dimension */ off2 = dimen[0]; off3 = off2 * dimen[1]; off4 = off3 * dimen[2]; off5 = off4 * dimen[3]; off6 = off5 * dimen[4]; off7 = off6 * dimen[5]; st10 = fpix[0]; st20 = (fpix[1] - 1) * off2; st30 = (fpix[2] - 1) * off3; st40 = (fpix[3] - 1) * off4; st50 = (fpix[4] - 1) * off5; st60 = (fpix[5] - 1) * off6; st70 = (fpix[6] - 1) * off7; /* store the initial offset in each dimension */ st1 = st10; st2 = st20; st3 = st30; st4 = st40; st5 = st50; st6 = st60; st7 = st70; astart = 0; for (i7 = 0; i7 < irange[6]; i7++) { for (i6 = 0; i6 < irange[5]; i6++) { for (i5 = 0; i5 < irange[4]; i5++) { for (i4 = 0; i4 < irange[3]; i4++) { for (i3 = 0; i3 < irange[2]; i3++) { pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; for (i2 = 0; i2 < irange[1]; i2++) { if (ffpcljj(fptr, 2, tablerow, pstart, i1, &array[astart], status) > 0) return(*status); astart += i1; pstart += off2; } st2 = st20; st3 = st3+off3; } st3 = st30; st4 = st4+off4; } st4 = st40; st5 = st5+off5; } st5 = st50; st6 = st6+off6; } st6 = st60; st7 = st7+off7; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpgpjj(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long firstelem, /* I - first vector element to write(1 = 1st) */ long nelem, /* I - number of values to write */ LONGLONG *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of group parameters to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffpcljj(fptr, 1L, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpcljj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ LONGLONG *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of values to a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. */ { int tcode, maxelem2, hdutype, writeraw; long twidth, incre; long ntodo; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull, maxelem; double scale, zero; char tform[20], cform[20]; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); maxelem = maxelem2; if (tcode == TSTRING) ffcfmt(tform, cform); /* derive C format for writing strings */ /* if there is no scaling and the native machine format is not byteswapped then we can simply write the raw data bytes into the FITS file if the datatype of the FITS column is the same as the input values. Otherwise we must convert the raw values into the scaled and/or machine dependent format in a temporary buffer that has been allocated for this purpose. */ if (scale == 1. && zero == 0. && MACHINE == NATIVE && tcode == TLONGLONG) { writeraw = 1; maxelem = nelem; /* we can write the entire array at one time */ } else writeraw = 0; /*---------------------------------------------------------------------*/ /* Now write the pixels to the FITS column. */ /* First call the ffXXfYY routine to (1) convert the datatype */ /* if necessary, and (2) scale the values by the FITS TSCALn and */ /* TZEROn linear scaling parameters into a temporary buffer. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to process a one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ switch (tcode) { case (TLONGLONG): if (writeraw) { /* write raw input bytes without conversion */ ffpi8b(fptr, ntodo, incre, (long *) &array[next], status); } else { /* convert the raw data before writing to FITS file */ ffi8fi8(&array[next], ntodo, scale, zero, (LONGLONG *) buffer, status); ffpi8b(fptr, ntodo, incre, (long *) buffer, status); } break; case (TLONG): ffi8fi4(&array[next], ntodo, scale, zero, (INT32BIT *) buffer, status); ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); break; case (TBYTE): ffi8fi1(&array[next], ntodo, scale, zero, (unsigned char *) buffer, status); ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); break; case (TSHORT): ffi8fi2(&array[next], ntodo, scale, zero, (short *) buffer, status); ffpi2b(fptr, ntodo, incre, (short *) buffer, status); break; case (TFLOAT): ffi8fr4(&array[next], ntodo, scale, zero, (float *) buffer, status); ffpr4b(fptr, ntodo, incre, (float *) buffer, status); break; case (TDOUBLE): ffi8fr8(&array[next], ntodo, scale, zero, (double *) buffer, status); ffpr8b(fptr, ntodo, incre, (double *) buffer, status); break; case (TSTRING): /* numerical column in an ASCII table */ if (cform[1] != 's') /* "%s" format is a string */ { ffi8fstr(&array[next], ntodo, scale, zero, cform, twidth, (char *) buffer, status); if (incre == twidth) /* contiguous bytes */ ffpbyt(fptr, ntodo * twidth, buffer, status); else ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); break; } /* can't write to string column, so fall thru to default: */ default: /* error trap */ sprintf(message, "Cannot write numbers to column %d which has format %s", colnum,tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing elements %.0f thru %.0f of input data array (ffpclj).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while writing FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpcnjj(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ LONGLONG *array, /* I - array of values to write */ LONGLONG nulvalue, /* I - value used to flag undefined pixels */ int *status) /* IO - error status */ /* Write an array of elements to the specified column of a table. Any input pixels equal to the value of nulvalue will be replaced by the appropriate null value in the output FITS file. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary */ { tcolumn *colptr; long ngood = 0, nbad = 0, ii; LONGLONG repeat, first, fstelm, fstrow; int tcode, overflow = 0; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode > 0) repeat = colptr->trepeat; /* repeat count for this column */ else repeat = firstelem -1 + nelem; /* variable length arrays */ /* if variable length array, first write the whole input vector, then go back and fill in the nulls */ if (tcode < 0) { if (ffpcljj(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { if (*status == NUM_OVERFLOW) { /* ignore overflows, which are possibly the null pixel values */ /* overflow = 1; */ *status = 0; } else { return(*status); } } } /* absolute element number in the column */ first = (firstrow - 1) * repeat + firstelem; for (ii = 0; ii < nelem; ii++) { if (array[ii] != nulvalue) /* is this a good pixel? */ { if (nbad) /* write previous string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) return(*status); nbad=0; } ngood = ngood +1; /* the consecutive number of good pixels */ } else { if (ngood) /* write previous string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ if (ffpcljj(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status) > 0) { if (*status == NUM_OVERFLOW) { overflow = 1; *status = 0; } else { return(*status); } } } ngood=0; } nbad = nbad +1; /* the consecutive number of bad pixels */ } } /* finished loop; now just write the last set of pixels */ if (ngood) /* write last string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ ffpcljj(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); } } else if (nbad) /* write last string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); } if (*status <= 0) { if (overflow) { *status = NUM_OVERFLOW; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi8fi1(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ unsigned char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > UCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) (dvalue + .5); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi8fi2(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ short *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < SHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (input[ii] > SHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else { if (dvalue >= 0) output[ii] = (short) (dvalue + .5); else output[ii] = (short) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi8fi4(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ INT32BIT *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < INT32_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (input[ii] > INT32_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else output[ii] = (INT32BIT) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else { if (dvalue >= 0) output[ii] = (INT32BIT) (dvalue + .5); else output[ii] = (INT32BIT) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi8fi8(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ LONGLONG *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = input[ii]; } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else { if (dvalue >= 0) output[ii] = (LONGLONG) (dvalue + .5); else output[ii] = (LONGLONG) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffi8fr4(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ float *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) ((input[ii] - zero) / scale); } return(*status); } /*--------------------------------------------------------------------------*/ int ffi8fr8(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ double *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (input[ii] - zero) / scale; } return(*status); } /*--------------------------------------------------------------------------*/ int ffi8fstr(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ char *cform, /* I - format for output string values */ long twidth, /* I - width of each field, in chars */ char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do scaling if required. */ { long ii; double dvalue; char *cptr; cptr = output; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { sprintf(output, cform, (double) input[ii]); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; sprintf(output, cform, dvalue); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } /* replace any commas with periods (e.g., in French locale) */ while ((cptr = strchr(cptr, ','))) *cptr = '.'; return(*status); } astropy-1.1.1/cextern/cfitsio/putcolu.c0000644001134200020070000005176712602615520021105 0ustar embrayscience00000000000000/* This file, putcolu.c, contains routines that write data elements to */ /* a FITS image or table. Writes null values. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffppru( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ int *status) /* IO - error status */ /* Write null values to the primary array. */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ ffpmsg("writing to compressed image is not supported"); return(*status = DATA_COMPRESSION_ERR); } row=maxvalue(1,group); ffpclu(fptr, 2, row, firstelem, nelem, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpprn( fitsfile *fptr, /* I - FITS file pointer */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ int *status) /* IO - error status */ /* Write null values to the primary array. (Doesn't support groups). */ { long row = 1; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ ffpmsg("writing to compressed image is not supported"); return(*status = DATA_COMPRESSION_ERR); } ffpclu(fptr, 2, row, firstelem, nelem, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpclu( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelempar, /* I - number of values to write */ int *status) /* IO - error status */ /* Set elements of a table column to the appropriate null value for the column The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. This routine support COMPLEX and DOUBLE COMPLEX binary table columns, and sets both the real and imaginary components of the element to a NaN. */ { int tcode, maxelem, hdutype, writemode = 2, leng; short i2null; INT32BIT i4null; long twidth, incre; long ii; LONGLONG largeelem, nelem, tnull, i8null; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, ntodo; double scale, zero; unsigned char i1null, lognul = 0; char tform[20], *cstring = 0; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ long jbuff[2] = { -1, -1}; /* all bits set is equivalent to a NaN */ size_t buffsize; if (*status > 0) /* inherit input status value if > 0 */ return(*status); nelem = nelempar; largeelem = firstelem; /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ /* note that writemode = 2 by default (not 1), so that the returned */ /* repeat and incre values will be the actual values for this column. */ /* If writing nulls to a variable length column then dummy data values */ /* must have already been written to the heap. */ /* We just have to overwrite the previous values with null values. */ /* Set writemode = 0 in this case, to test that values have been written */ fits_get_coltype(fptr, colnum, &tcode, NULL, NULL, status); if (tcode < 0) writemode = 0; /* this is a variable length column */ if (abs(tcode) >= TCOMPLEX) { /* treat complex columns as pairs of numbers */ largeelem = (largeelem - 1) * 2 + 1; nelem *= 2; } if (ffgcprll( fptr, colnum, firstrow, largeelem, nelem, writemode, &scale, &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); if (tcode == TSTRING) { if (snull[0] == ASCII_NULL_UNDEFINED) { ffpmsg( "Null value string for ASCII table column is not defined (FTPCLU)."); return(*status = NO_NULL); } /* allocate buffer to hold the null string. Must write the entire */ /* width of the column (twidth bytes) to avoid possible problems */ /* with uninitialized FITS blocks, in case the field spans blocks */ buffsize = maxvalue(20, twidth); cstring = (char *) malloc(buffsize); if (!cstring) return(*status = MEMORY_ALLOCATION); memset(cstring, ' ', buffsize); /* initialize with blanks */ leng = strlen(snull); if (hdutype == BINARY_TBL) leng++; /* copy the terminator too in binary tables */ strncpy(cstring, snull, leng); /* copy null string to temp buffer */ } else if ( tcode == TBYTE || tcode == TSHORT || tcode == TLONG || tcode == TLONGLONG) { if (tnull == NULL_UNDEFINED) { ffpmsg( "Null value for integer table column is not defined (FTPCLU)."); return(*status = NO_NULL); } if (tcode == TBYTE) i1null = (unsigned char) tnull; else if (tcode == TSHORT) { i2null = (short) tnull; #if BYTESWAPPED ffswap2(&i2null, 1); /* reverse order of bytes */ #endif } else if (tcode == TLONG) { i4null = (INT32BIT) tnull; #if BYTESWAPPED ffswap4(&i4null, 1); /* reverse order of bytes */ #endif } else { i8null = tnull; #if BYTESWAPPED ffswap8((double *)(&i8null), 1); /* reverse order of bytes */ #endif } } /*---------------------------------------------------------------------*/ /* Now write the pixels to the FITS column. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ ntodo = remain; /* number of elements to write at one time */ while (ntodo) { /* limit the number of pixels to process at one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ switch (tcode) { case (TBYTE): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 1, &i1null, status); break; case (TSHORT): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 2, &i2null, status); break; case (TLONG): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 4, &i4null, status); break; case (TLONGLONG): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 8, &i8null, status); break; case (TFLOAT): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 4, jbuff, status); break; case (TDOUBLE): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 8, jbuff, status); break; case (TLOGICAL): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 1, &lognul, status); break; case (TSTRING): /* an ASCII table column */ /* repeat always = 1, so ntodo is also guaranteed to = 1 */ ffpbyt(fptr, twidth, cstring, status); break; default: /* error trap */ sprintf(message, "Cannot write null value to column %d which has format %s", colnum,tform); ffpmsg(message); return(*status); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing %.0f thru %.0f of null values (ffpclu).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); if (cstring) free(cstring); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } ntodo = remain; /* this is the maximum number to do in next loop */ } /* End of main while Loop */ if (cstring) free(cstring); return(*status); } /*--------------------------------------------------------------------------*/ int ffpcluc( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ int *status) /* IO - error status */ /* Set elements of a table column to the appropriate null value for the column The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. This routine does not do anything special in the case of COMPLEX table columns (unlike the similar ffpclu routine). This routine is mainly for use by ffpcne which already compensates for the effective doubling of the number of elements in a complex column. */ { int tcode, maxelem, hdutype, writemode = 2, leng; short i2null; INT32BIT i4null; long twidth, incre; long ii; LONGLONG tnull, i8null; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, ntodo; double scale, zero; unsigned char i1null, lognul = 0; char tform[20], *cstring = 0; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ long jbuff[2] = { -1, -1}; /* all bits set is equivalent to a NaN */ size_t buffsize; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ /* note that writemode = 2 by default (not 1), so that the returned */ /* repeat and incre values will be the actual values for this column. */ /* If writing nulls to a variable length column then dummy data values */ /* must have already been written to the heap. */ /* We just have to overwrite the previous values with null values. */ /* Set writemode = 0 in this case, to test that values have been written */ fits_get_coltype(fptr, colnum, &tcode, NULL, NULL, status); if (tcode < 0) writemode = 0; /* this is a variable length column */ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, writemode, &scale, &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); if (tcode == TSTRING) { if (snull[0] == ASCII_NULL_UNDEFINED) { ffpmsg( "Null value string for ASCII table column is not defined (FTPCLU)."); return(*status = NO_NULL); } /* allocate buffer to hold the null string. Must write the entire */ /* width of the column (twidth bytes) to avoid possible problems */ /* with uninitialized FITS blocks, in case the field spans blocks */ buffsize = maxvalue(20, twidth); cstring = (char *) malloc(buffsize); if (!cstring) return(*status = MEMORY_ALLOCATION); memset(cstring, ' ', buffsize); /* initialize with blanks */ leng = strlen(snull); if (hdutype == BINARY_TBL) leng++; /* copy the terminator too in binary tables */ strncpy(cstring, snull, leng); /* copy null string to temp buffer */ } else if ( tcode == TBYTE || tcode == TSHORT || tcode == TLONG || tcode == TLONGLONG) { if (tnull == NULL_UNDEFINED) { ffpmsg( "Null value for integer table column is not defined (FTPCLU)."); return(*status = NO_NULL); } if (tcode == TBYTE) i1null = (unsigned char) tnull; else if (tcode == TSHORT) { i2null = (short) tnull; #if BYTESWAPPED ffswap2(&i2null, 1); /* reverse order of bytes */ #endif } else if (tcode == TLONG) { i4null = (INT32BIT) tnull; #if BYTESWAPPED ffswap4(&i4null, 1); /* reverse order of bytes */ #endif } else { i8null = tnull; #if BYTESWAPPED ffswap4( (INT32BIT*) &i8null, 2); /* reverse order of bytes */ #endif } } /*---------------------------------------------------------------------*/ /* Now write the pixels to the FITS column. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ ntodo = remain; /* number of elements to write at one time */ while (ntodo) { /* limit the number of pixels to process at one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ switch (tcode) { case (TBYTE): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 1, &i1null, status); break; case (TSHORT): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 2, &i2null, status); break; case (TLONG): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 4, &i4null, status); break; case (TLONGLONG): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 8, &i8null, status); break; case (TFLOAT): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 4, jbuff, status); break; case (TDOUBLE): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 8, jbuff, status); break; case (TLOGICAL): for (ii = 0; ii < ntodo; ii++) ffpbyt(fptr, 1, &lognul, status); break; case (TSTRING): /* an ASCII table column */ /* repeat always = 1, so ntodo is also guaranteed to = 1 */ ffpbyt(fptr, twidth, cstring, status); break; default: /* error trap */ sprintf(message, "Cannot write null value to column %d which has format %s", colnum,tform); ffpmsg(message); return(*status); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing %.0f thru %.0f of null values (ffpclu).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); if (cstring) free(cstring); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } ntodo = remain; /* this is the maximum number to do in next loop */ } /* End of main while Loop */ if (cstring) free(cstring); return(*status); } /*--------------------------------------------------------------------------*/ int ffprwu(fitsfile *fptr, LONGLONG firstrow, LONGLONG nrows, int *status) /* * fits_write_nullrows / ffprwu - write TNULLs to all columns in one or more rows * * fitsfile *fptr - pointer to FITS HDU opened for read/write * long int firstrow - first table row to set to null. (firstrow >= 1) * long int nrows - total number or rows to set to null. (nrows >= 1) * int *status - upon return, *status contains CFITSIO status code * * RETURNS: CFITSIO status code * * written by Craig Markwardt, GSFC */ { LONGLONG ntotrows; int ncols, i; int typecode = 0; LONGLONG repeat = 0, width = 0; int nullstatus; if (*status > 0) return *status; if ((firstrow <= 0) || (nrows <= 0)) return (*status = BAD_ROW_NUM); fits_get_num_rowsll(fptr, &ntotrows, status); if (firstrow + nrows - 1 > ntotrows) return (*status = BAD_ROW_NUM); fits_get_num_cols(fptr, &ncols, status); if (*status) return *status; /* Loop through each column and write nulls */ for (i=1; i <= ncols; i++) { repeat = 0; typecode = 0; width = 0; fits_get_coltypell(fptr, i, &typecode, &repeat, &width, status); if (*status) break; /* NOTE: data of TSTRING type must not write the total repeat count, since the repeat count is the *character* count, not the nstring count. Divide by string width to get number of strings. */ if (typecode == TSTRING) repeat /= width; /* Write NULLs */ nullstatus = 0; fits_write_col_null(fptr, i, firstrow, 1, repeat*nrows, &nullstatus); /* ignore error if no null value is defined for the column */ if (nullstatus && nullstatus != NO_NULL) return (*status = nullstatus); } return *status; } astropy-1.1.1/cextern/cfitsio/cfileio.c0000644001134200020070000072270512602615520021021 0ustar embrayscience00000000000000/* This file, cfileio.c, contains the low-level file access routines. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include #include #include /* apparently needed to define size_t */ #include "fitsio2.h" #include "group.h" #define MAX_PREFIX_LEN 20 /* max length of file type prefix (e.g. 'http://') */ #define MAX_DRIVERS 24 /* max number of file I/O drivers */ typedef struct /* structure containing pointers to I/O driver functions */ { char prefix[MAX_PREFIX_LEN]; int (*init)(void); int (*shutdown)(void); int (*setoptions)(int option); int (*getoptions)(int *options); int (*getversion)(int *version); int (*checkfile)(char *urltype, char *infile, char *outfile); int (*open)(char *filename, int rwmode, int *driverhandle); int (*create)(char *filename, int *drivehandle); int (*truncate)(int drivehandle, LONGLONG size); int (*close)(int drivehandle); int (*remove)(char *filename); int (*size)(int drivehandle, LONGLONG *size); int (*flush)(int drivehandle); int (*seek)(int drivehandle, LONGLONG offset); int (*read)(int drivehandle, void *buffer, long nbytes); int (*write)(int drivehandle, void *buffer, long nbytes); } fitsdriver; fitsdriver driverTable[MAX_DRIVERS]; /* allocate driver tables */ FITSfile *FptrTable[NMAXFILES]; /* this table of Fptr pointers is */ /* used by fits_already_open */ int need_to_initialize = 1; /* true if CFITSIO has not been initialized */ int no_of_drivers = 0; /* number of currently defined I/O drivers */ static int pixel_filter_helper(fitsfile **fptr, char *outfile, char *expr, int *status); static int find_quote(char **string); static int find_doublequote(char **string); static int find_paren(char **string); static int find_bracket(char **string); static int find_curlybracket(char **string); int comma2semicolon(char *string); #ifdef _REENTRANT pthread_mutex_t Fitsio_InitLock = PTHREAD_MUTEX_INITIALIZER; #endif /*--------------------------------------------------------------------------*/ int fitsio_init_lock(void) { static int need_to_init = 1; int status; #ifdef _REENTRANT pthread_mutexattr_t mutex_init; FFLOCK1(Fitsio_InitLock); if (need_to_init) { /* Init the main fitsio lock here since we need a a recursive lock */ status = pthread_mutexattr_init(&mutex_init); if (status) { ffpmsg("pthread_mutexattr_init failed (fitsio_init_lock)"); return(status); } #ifdef linux status = pthread_mutexattr_settype(&mutex_init, PTHREAD_MUTEX_RECURSIVE_NP); #else status = pthread_mutexattr_settype(&mutex_init, PTHREAD_MUTEX_RECURSIVE); #endif if (status) { ffpmsg("pthread_mutexattr_settu[e failed (fitsio_init_lock)"); return(status); } status = pthread_mutex_init(&Fitsio_Lock,&mutex_init); if (status) { ffpmsg("pthread_mutex_init failed (fitsio_init_lock)"); return(status); } need_to_init = 0; } FFUNLOCK1(Fitsio_InitLock); #endif return(0); } /*--------------------------------------------------------------------------*/ int ffomem(fitsfile **fptr, /* O - FITS file pointer */ const char *name, /* I - name of file to open */ int mode, /* I - 0 = open readonly; 1 = read/write */ void **buffptr, /* I - address of memory pointer */ size_t *buffsize, /* I - size of buffer, in bytes */ size_t deltasize, /* I - increment for future realloc's */ void *(*mem_realloc)(void *p, size_t newsize), /* function */ int *status) /* IO - error status */ /* Open an existing FITS file in core memory. This is a specialized version of ffopen. */ { int ii, driver, handle, hdutyp, slen, movetotype, extvers, extnum; char extname[FLEN_VALUE]; LONGLONG filesize; char urltype[MAX_PREFIX_LEN], infile[FLEN_FILENAME], outfile[FLEN_FILENAME]; char extspec[FLEN_FILENAME], rowfilter[FLEN_FILENAME]; char binspec[FLEN_FILENAME], colspec[FLEN_FILENAME]; char imagecolname[FLEN_VALUE], rowexpress[FLEN_FILENAME]; char *url, errmsg[FLEN_ERRMSG]; char *hdtype[3] = {"IMAGE", "TABLE", "BINTABLE"}; if (*status > 0) return(*status); *fptr = 0; /* initialize null file pointer */ if (need_to_initialize) /* this is called only once */ { *status = fits_init_cfitsio(); if (*status > 0) return(*status); } url = (char *) name; while (*url == ' ') /* ignore leading spaces in the file spec */ url++; /* parse the input file specification */ fits_parse_input_url(url, urltype, infile, outfile, extspec, rowfilter, binspec, colspec, status); strcpy(urltype, "memkeep://"); /* URL type for pre-existing memory file */ *status = urltype2driver(urltype, &driver); if (*status > 0) { ffpmsg("could not find driver for pre-existing memory file: (ffomem)"); return(*status); } /* call driver routine to open the memory file */ FFLOCK; /* lock this while searching for vacant handle */ *status = mem_openmem( buffptr, buffsize,deltasize, mem_realloc, &handle); FFUNLOCK; if (*status > 0) { ffpmsg("failed to open pre-existing memory file: (ffomem)"); return(*status); } /* get initial file size */ *status = (*driverTable[driver].size)(handle, &filesize); if (*status > 0) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed get the size of the memory file: (ffomem)"); return(*status); } /* allocate fitsfile structure and initialize = 0 */ *fptr = (fitsfile *) calloc(1, sizeof(fitsfile)); if (!(*fptr)) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate structure for following file: (ffomem)"); ffpmsg(url); return(*status = MEMORY_ALLOCATION); } /* allocate FITSfile structure and initialize = 0 */ (*fptr)->Fptr = (FITSfile *) calloc(1, sizeof(FITSfile)); if (!((*fptr)->Fptr)) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate structure for following file: (ffomem)"); ffpmsg(url); free(*fptr); *fptr = 0; return(*status = MEMORY_ALLOCATION); } slen = strlen(url) + 1; slen = maxvalue(slen, 32); /* reserve at least 32 chars */ ((*fptr)->Fptr)->filename = (char *) malloc(slen); /* mem for file name */ if ( !(((*fptr)->Fptr)->filename) ) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate memory for filename: (ffomem)"); ffpmsg(url); free((*fptr)->Fptr); free(*fptr); *fptr = 0; /* return null file pointer */ return(*status = MEMORY_ALLOCATION); } /* mem for headstart array */ ((*fptr)->Fptr)->headstart = (LONGLONG *) calloc(1001, sizeof(LONGLONG)); if ( !(((*fptr)->Fptr)->headstart) ) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate memory for headstart array: (ffomem)"); ffpmsg(url); free( ((*fptr)->Fptr)->filename); free((*fptr)->Fptr); free(*fptr); *fptr = 0; /* return null file pointer */ return(*status = MEMORY_ALLOCATION); } /* mem for file I/O buffers */ ((*fptr)->Fptr)->iobuffer = (char *) calloc(NIOBUF, IOBUFLEN); if ( !(((*fptr)->Fptr)->iobuffer) ) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate memory for iobuffer array: (ffomem)"); ffpmsg(url); free( ((*fptr)->Fptr)->headstart); /* free memory for headstart array */ free( ((*fptr)->Fptr)->filename); free((*fptr)->Fptr); free(*fptr); *fptr = 0; /* return null file pointer */ return(*status = MEMORY_ALLOCATION); } /* initialize the ageindex array (relative age of the I/O buffers) */ /* and initialize the bufrecnum array as being empty */ for (ii = 0; ii < NIOBUF; ii++) { ((*fptr)->Fptr)->ageindex[ii] = ii; ((*fptr)->Fptr)->bufrecnum[ii] = -1; } /* store the parameters describing the file */ ((*fptr)->Fptr)->MAXHDU = 1000; /* initial size of headstart */ ((*fptr)->Fptr)->filehandle = handle; /* file handle */ ((*fptr)->Fptr)->driver = driver; /* driver number */ strcpy(((*fptr)->Fptr)->filename, url); /* full input filename */ ((*fptr)->Fptr)->filesize = filesize; /* physical file size */ ((*fptr)->Fptr)->logfilesize = filesize; /* logical file size */ ((*fptr)->Fptr)->writemode = mode; /* read-write mode */ ((*fptr)->Fptr)->datastart = DATA_UNDEFINED; /* unknown start of data */ ((*fptr)->Fptr)->curbuf = -1; /* undefined current IO buffer */ ((*fptr)->Fptr)->open_count = 1; /* structure is currently used once */ ((*fptr)->Fptr)->validcode = VALIDSTRUC; /* flag denoting valid structure */ ffldrc(*fptr, 0, REPORT_EOF, status); /* load first record */ fits_store_Fptr( (*fptr)->Fptr, status); /* store Fptr address */ if (ffrhdu(*fptr, &hdutyp, status) > 0) /* determine HDU structure */ { ffpmsg( "ffomem could not interpret primary array header of file: (ffomem)"); ffpmsg(url); if (*status == UNKNOWN_REC) ffpmsg("This does not look like a FITS file."); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ } /* ---------------------------------------------------------- */ /* move to desired extension, if specified as part of the URL */ /* ---------------------------------------------------------- */ imagecolname[0] = '\0'; rowexpress[0] = '\0'; if (*extspec) { /* parse the extension specifier into individual parameters */ ffexts(extspec, &extnum, extname, &extvers, &movetotype, imagecolname, rowexpress, status); if (*status > 0) return(*status); if (extnum) { ffmahd(*fptr, extnum + 1, &hdutyp, status); } else if (*extname) /* move to named extension, if specified */ { ffmnhd(*fptr, movetotype, extname, extvers, status); } if (*status > 0) { ffpmsg("ffomem could not move to the specified extension:"); if (extnum > 0) { sprintf(errmsg, " extension number %d doesn't exist or couldn't be opened.",extnum); ffpmsg(errmsg); } else { sprintf(errmsg, " extension with EXTNAME = %s,", extname); ffpmsg(errmsg); if (extvers) { sprintf(errmsg, " and with EXTVERS = %d,", extvers); ffpmsg(errmsg); } if (movetotype != ANY_HDU) { sprintf(errmsg, " and with XTENSION = %s,", hdtype[movetotype]); ffpmsg(errmsg); } ffpmsg(" doesn't exist or couldn't be opened."); } return(*status); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffdkopn(fitsfile **fptr, /* O - FITS file pointer */ const char *name, /* I - full name of file to open */ int mode, /* I - 0 = open readonly; 1 = read/write */ int *status) /* IO - error status */ /* Open an existing FITS file on magnetic disk with either readonly or read/write access. The routine does not support CFITSIO's extended filename syntax and simply uses the entire input 'name' string as the name of the file. */ { if (*status > 0) return(*status); *status = OPEN_DISK_FILE; ffopen(fptr, name, mode, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffdopn(fitsfile **fptr, /* O - FITS file pointer */ const char *name, /* I - full name of file to open */ int mode, /* I - 0 = open readonly; 1 = read/write */ int *status) /* IO - error status */ /* Open an existing FITS file with either readonly or read/write access. and move to the first HDU that contains 'interesting' data, if the primary array contains a null image (i.e., NAXIS = 0). */ { if (*status > 0) return(*status); *status = SKIP_NULL_PRIMARY; ffopen(fptr, name, mode, status); return(*status); } /*--------------------------------------------------------------------------*/ int fftopn(fitsfile **fptr, /* O - FITS file pointer */ const char *name, /* I - full name of file to open */ int mode, /* I - 0 = open readonly; 1 = read/write */ int *status) /* IO - error status */ /* Open an existing FITS file with either readonly or read/write access. and move to the first HDU that contains 'interesting' table (not an image). */ { int hdutype; if (*status > 0) return(*status); *status = SKIP_IMAGE; ffopen(fptr, name, mode, status); if (ffghdt(*fptr, &hdutype, status) <= 0) { if (hdutype == IMAGE_HDU) *status = NOT_TABLE; } return(*status); } /*--------------------------------------------------------------------------*/ int ffiopn(fitsfile **fptr, /* O - FITS file pointer */ const char *name, /* I - full name of file to open */ int mode, /* I - 0 = open readonly; 1 = read/write */ int *status) /* IO - error status */ /* Open an existing FITS file with either readonly or read/write access. and move to the first HDU that contains 'interesting' image (not an table). */ { int hdutype; if (*status > 0) return(*status); *status = SKIP_TABLE; ffopen(fptr, name, mode, status); if (ffghdt(*fptr, &hdutype, status) <= 0) { if (hdutype != IMAGE_HDU) *status = NOT_IMAGE; } return(*status); } /*--------------------------------------------------------------------------*/ int ffopentest(int soname, /* I - CFITSIO shared library version */ /* application program (fitsio.h file) */ fitsfile **fptr, /* O - FITS file pointer */ const char *name, /* I - full name of file to open */ int mode, /* I - 0 = open readonly; 1 = read/write */ int *status) /* IO - error status */ /* Open an existing FITS file with either readonly or read/write access. First test that the SONAME of fitsio.h used to build the CFITSIO library is the same as was used in compiling the application program that links to the library. */ { if (soname != CFITSIO_SONAME) { printf("\nERROR: Mismatch in the CFITSIO_SONAME value in the fitsio.h include file\n"); printf("that was used to build the CFITSIO library, and the value in the include file\n"); printf("that was used when compiling the application program:\n"); printf(" Version used to build the CFITSIO library = %d\n",CFITSIO_SONAME); printf(" Version included by the application program = %d\n",soname); printf("\nFix this by recompiling and then relinking this application program \n"); printf("with the CFITSIO library.\n"); *status = FILE_NOT_OPENED; return(*status); } /* now call the normal file open routine */ ffopen(fptr, name, mode, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffopen(fitsfile **fptr, /* O - FITS file pointer */ const char *name, /* I - full name of file to open */ int mode, /* I - 0 = open readonly; 1 = read/write */ int *status) /* IO - error status */ /* Open an existing FITS file with either readonly or read/write access. */ { fitsfile *newptr; int ii, driver, hdutyp, hdunum, slen, writecopy, isopen; LONGLONG filesize; long rownum, nrows, goodrows; int extnum, extvers, handle, movetotype, tstatus = 0, only_one = 0; char urltype[MAX_PREFIX_LEN], infile[FLEN_FILENAME], outfile[FLEN_FILENAME]; char origurltype[MAX_PREFIX_LEN], extspec[FLEN_FILENAME]; char extname[FLEN_VALUE], rowfilter[FLEN_FILENAME], tblname[FLEN_VALUE]; char imagecolname[FLEN_VALUE], rowexpress[FLEN_FILENAME]; char binspec[FLEN_FILENAME], colspec[FLEN_FILENAME], pixfilter[FLEN_FILENAME]; char histfilename[FLEN_FILENAME]; char filtfilename[FLEN_FILENAME], compspec[FLEN_FILENAME]; char wtcol[FLEN_VALUE]; char minname[4][FLEN_VALUE], maxname[4][FLEN_VALUE]; char binname[4][FLEN_VALUE]; char *url; double minin[4], maxin[4], binsizein[4], weight; int imagetype, naxis = 1, haxis, recip; int skip_null = 0, skip_image = 0, skip_table = 0, open_disk_file = 0; char colname[4][FLEN_VALUE]; char errmsg[FLEN_ERRMSG]; char *hdtype[3] = {"IMAGE", "TABLE", "BINTABLE"}; char *rowselect = 0; if (*status > 0) return(*status); if (*status == SKIP_NULL_PRIMARY) { /* this special status value is used as a flag by ffdopn to tell */ /* ffopen to skip over a null primary array when opening the file. */ skip_null = 1; *status = 0; } else if (*status == SKIP_IMAGE) { /* this special status value is used as a flag by fftopn to tell */ /* ffopen to move to 1st significant table when opening the file. */ skip_image = 1; *status = 0; } else if (*status == SKIP_TABLE) { /* this special status value is used as a flag by ffiopn to tell */ /* ffopen to move to 1st significant image when opening the file. */ skip_table = 1; *status = 0; } else if (*status == OPEN_DISK_FILE) { /* this special status value is used as a flag by ffdkopn to tell */ /* ffopen to not interpret the input filename using CFITSIO's */ /* extended filename syntax, and simply open the specified disk file */ open_disk_file = 1; *status = 0; } *fptr = 0; /* initialize null file pointer */ writecopy = 0; /* have we made a write-able copy of the input file? */ if (need_to_initialize) { /* this is called only once */ *status = fits_init_cfitsio(); } if (*status > 0) return(*status); url = (char *) name; while (*url == ' ') /* ignore leading spaces in the filename */ url++; if (*url == '\0') { ffpmsg("Name of file to open is blank. (ffopen)"); return(*status = FILE_NOT_OPENED); } if (open_disk_file) { /* treat the input URL literally as the name of the file to open */ /* and don't try to parse the URL using the extended filename syntax */ if (strlen(url) > FLEN_FILENAME - 1) { ffpmsg("Name of file to open is too long. (ffopen)"); return(*status = FILE_NOT_OPENED); } strcpy(infile,url); strcpy(urltype, "file://"); outfile[0] = '\0'; extspec[0] = '\0'; binspec[0] = '\0'; colspec[0] = '\0'; rowfilter[0] = '\0'; pixfilter[0] = '\0'; compspec[0] = '\0'; } else { /* parse the input file specification */ /* NOTE: This routine tests that all the strings do not */ /* overflow the standard buffer sizes (FLEN_FILENAME, etc.) */ /* therefore in general we do not have to worry about buffer */ /* overflow of any of the returned strings. */ /* call the newer version of this parsing routine that supports 'compspec' */ ffifile2(url, urltype, infile, outfile, extspec, rowfilter, binspec, colspec, pixfilter, compspec, status); } if (*status > 0) { ffpmsg("could not parse the input filename: (ffopen)"); ffpmsg(url); return(*status); } imagecolname[0] = '\0'; rowexpress[0] = '\0'; if (*extspec) { slen = strlen(extspec); if (extspec[slen - 1] == '#') { /* special symbol to mean only copy this extension */ extspec[slen - 1] = '\0'; only_one = 1; } /* parse the extension specifier into individual parameters */ ffexts(extspec, &extnum, extname, &extvers, &movetotype, imagecolname, rowexpress, status); if (*status > 0) return(*status); } /*-------------------------------------------------------------------*/ /* special cases: */ /*-------------------------------------------------------------------*/ histfilename[0] = '\0'; filtfilename[0] = '\0'; if (*outfile && (*binspec || *imagecolname || *pixfilter)) { /* if binspec or imagecolumn are specified, then the */ /* output file name is intended for the final image, */ /* and not a copy of the input file. */ strcpy(histfilename, outfile); outfile[0] = '\0'; } else if (*outfile && (*rowfilter || *colspec)) { /* if rowfilter or colspece are specified, then the */ /* output file name is intended for the filtered file */ /* and not a copy of the input file. */ strcpy(filtfilename, outfile); outfile[0] = '\0'; } /*-------------------------------------------------------------------*/ /* check if this same file is already open, and if so, attach to it */ /*-------------------------------------------------------------------*/ FFLOCK; if (fits_already_open(fptr, url, urltype, infile, extspec, rowfilter, binspec, colspec, mode, &isopen, status) > 0) { FFUNLOCK; return(*status); } FFUNLOCK; if (isopen) { goto move2hdu; } /* get the driver number corresponding to this urltype */ *status = urltype2driver(urltype, &driver); if (*status > 0) { ffpmsg("could not find driver for this file: (ffopen)"); ffpmsg(urltype); ffpmsg(url); return(*status); } /*------------------------------------------------------------------- deal with all those messy special cases which may require that a different driver be used: - is disk file compressed? - are ftp:, gsiftp:, or http: files compressed? - has user requested that a local copy be made of the ftp or http file? -------------------------------------------------------------------*/ if (driverTable[driver].checkfile) { strcpy(origurltype,urltype); /* Save the urltype */ /* 'checkfile' may modify the urltype, infile and outfile strings */ *status = (*driverTable[driver].checkfile)(urltype, infile, outfile); if (*status) { ffpmsg("checkfile failed for this file: (ffopen)"); ffpmsg(url); return(*status); } if (strcmp(origurltype, urltype)) /* did driver changed on us? */ { *status = urltype2driver(urltype, &driver); if (*status > 0) { ffpmsg("could not change driver for this file: (ffopen)"); ffpmsg(url); ffpmsg(urltype); return(*status); } } } /* call appropriate driver to open the file */ if (driverTable[driver].open) { FFLOCK; /* lock this while searching for vacant handle */ *status = (*driverTable[driver].open)(infile, mode, &handle); FFUNLOCK; if (*status > 0) { ffpmsg("failed to find or open the following file: (ffopen)"); ffpmsg(url); return(*status); } } else { ffpmsg("cannot open an existing file of this type: (ffopen)"); ffpmsg(url); return(*status = FILE_NOT_OPENED); } /* get initial file size */ *status = (*driverTable[driver].size)(handle, &filesize); if (*status > 0) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed get the size of the following file: (ffopen)"); ffpmsg(url); return(*status); } /* allocate fitsfile structure and initialize = 0 */ *fptr = (fitsfile *) calloc(1, sizeof(fitsfile)); if (!(*fptr)) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate structure for following file: (ffopen)"); ffpmsg(url); return(*status = MEMORY_ALLOCATION); } /* allocate FITSfile structure and initialize = 0 */ (*fptr)->Fptr = (FITSfile *) calloc(1, sizeof(FITSfile)); if (!((*fptr)->Fptr)) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate structure for following file: (ffopen)"); ffpmsg(url); free(*fptr); *fptr = 0; return(*status = MEMORY_ALLOCATION); } slen = strlen(url) + 1; slen = maxvalue(slen, 32); /* reserve at least 32 chars */ ((*fptr)->Fptr)->filename = (char *) malloc(slen); /* mem for file name */ if ( !(((*fptr)->Fptr)->filename) ) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate memory for filename: (ffopen)"); ffpmsg(url); free((*fptr)->Fptr); free(*fptr); *fptr = 0; /* return null file pointer */ return(*status = MEMORY_ALLOCATION); } /* mem for headstart array */ ((*fptr)->Fptr)->headstart = (LONGLONG *) calloc(1001, sizeof(LONGLONG)); if ( !(((*fptr)->Fptr)->headstart) ) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate memory for headstart array: (ffopen)"); ffpmsg(url); free( ((*fptr)->Fptr)->filename); free((*fptr)->Fptr); free(*fptr); *fptr = 0; /* return null file pointer */ return(*status = MEMORY_ALLOCATION); } /* mem for file I/O buffers */ ((*fptr)->Fptr)->iobuffer = (char *) calloc(NIOBUF, IOBUFLEN); if ( !(((*fptr)->Fptr)->iobuffer) ) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate memory for iobuffer array: (ffopen)"); ffpmsg(url); free( ((*fptr)->Fptr)->headstart); /* free memory for headstart array */ free( ((*fptr)->Fptr)->filename); free((*fptr)->Fptr); free(*fptr); *fptr = 0; /* return null file pointer */ return(*status = MEMORY_ALLOCATION); } /* initialize the ageindex array (relative age of the I/O buffers) */ /* and initialize the bufrecnum array as being empty */ for (ii = 0; ii < NIOBUF; ii++) { ((*fptr)->Fptr)->ageindex[ii] = ii; ((*fptr)->Fptr)->bufrecnum[ii] = -1; } /* store the parameters describing the file */ ((*fptr)->Fptr)->MAXHDU = 1000; /* initial size of headstart */ ((*fptr)->Fptr)->filehandle = handle; /* file handle */ ((*fptr)->Fptr)->driver = driver; /* driver number */ strcpy(((*fptr)->Fptr)->filename, url); /* full input filename */ ((*fptr)->Fptr)->filesize = filesize; /* physical file size */ ((*fptr)->Fptr)->logfilesize = filesize; /* logical file size */ ((*fptr)->Fptr)->writemode = mode; /* read-write mode */ ((*fptr)->Fptr)->datastart = DATA_UNDEFINED; /* unknown start of data */ ((*fptr)->Fptr)->curbuf = -1; /* undefined current IO buffer */ ((*fptr)->Fptr)->open_count = 1; /* structure is currently used once */ ((*fptr)->Fptr)->validcode = VALIDSTRUC; /* flag denoting valid structure */ ((*fptr)->Fptr)->only_one = only_one; /* flag denoting only copy single extension */ ffldrc(*fptr, 0, REPORT_EOF, status); /* load first record */ fits_store_Fptr( (*fptr)->Fptr, status); /* store Fptr address */ if (ffrhdu(*fptr, &hdutyp, status) > 0) /* determine HDU structure */ { ffpmsg( "ffopen could not interpret primary array header of file: "); ffpmsg(url); if (*status == UNKNOWN_REC) ffpmsg("This does not look like a FITS file."); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ return(*status); } /* ------------------------------------------------------------- */ /* At this point, the input file has been opened. If outfile was */ /* specified, then we have opened a copy of the file, not the */ /* original file so it is safe to modify it if necessary */ /* ------------------------------------------------------------- */ if (*outfile) writecopy = 1; move2hdu: /* ---------------------------------------------------------- */ /* move to desired extension, if specified as part of the URL */ /* ---------------------------------------------------------- */ if (*extspec) { if (extnum) /* extension number was specified */ { ffmahd(*fptr, extnum + 1, &hdutyp, status); } else if (*extname) /* move to named extension, if specified */ { ffmnhd(*fptr, movetotype, extname, extvers, status); } if (*status > 0) /* clean up after error */ { ffpmsg("ffopen could not move to the specified extension:"); if (extnum > 0) { sprintf(errmsg, " extension number %d doesn't exist or couldn't be opened.",extnum); ffpmsg(errmsg); } else { sprintf(errmsg, " extension with EXTNAME = %s,", extname); ffpmsg(errmsg); if (extvers) { sprintf(errmsg, " and with EXTVERS = %d,", extvers); ffpmsg(errmsg); } if (movetotype != ANY_HDU) { sprintf(errmsg, " and with XTENSION = %s,", hdtype[movetotype]); ffpmsg(errmsg); } ffpmsg(" doesn't exist or couldn't be opened."); } ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ return(*status); } } else if (skip_null || skip_image || skip_table || (*imagecolname || *colspec || *rowfilter || *binspec)) { /* ------------------------------------------------------------------ If no explicit extension specifier is given as part of the file name, and, if a) skip_null is true (set if ffopen is called by ffdopn) or b) skip_image or skip_table is true (set if ffopen is called by fftopn or ffdopn) or c) other file filters are specified, then CFITSIO will attempt to move to the first 'interesting' HDU after opening an existing FITS file (or to first interesting table HDU if skip_image is true); An 'interesting' HDU is defined to be either an image with NAXIS > 0 (i.e., not a null array) or a table which has an EXTNAME value which does not contain any of the following strings: 'GTI' - Good Time Interval extension 'OBSTABLE' - used in Beppo SAX data files The main purpose for this is to allow CFITSIO to skip over a null primary and other non-interesting HDUs when opening an existing file, and move directly to the first extension that contains significant data. ------------------------------------------------------------------ */ fits_get_hdu_num(*fptr, &hdunum); if (hdunum == 1) { fits_get_img_dim(*fptr, &naxis, status); if (naxis == 0 || skip_image) /* skip primary array */ { while(1) { /* see if the next HDU is 'interesting' */ if (fits_movrel_hdu(*fptr, 1, &hdutyp, status)) { if (*status == END_OF_FILE) *status = 0; /* reset expected error */ /* didn't find an interesting HDU so move back to beginning */ fits_movabs_hdu(*fptr, 1, &hdutyp, status); break; } if (hdutyp == IMAGE_HDU && skip_image) { continue; /* skip images */ } else if (hdutyp != IMAGE_HDU && skip_table) { continue; /* skip tables */ } else if (hdutyp == IMAGE_HDU) { fits_get_img_dim(*fptr, &naxis, status); if (naxis > 0) break; /* found a non-null image */ } else { tstatus = 0; tblname[0] = '\0'; fits_read_key(*fptr, TSTRING, "EXTNAME", tblname, NULL,&tstatus); if ( (!strstr(tblname, "GTI") && !strstr(tblname, "gti")) && strncasecmp(tblname, "OBSTABLE", 8) ) break; /* found an interesting table */ } } /* end while */ } } /* end if (hdunum==1) */ } if (*imagecolname) { /* ----------------------------------------------------------------- */ /* we need to open an image contained in a single table cell */ /* First, determine which row of the table to use. */ /* ----------------------------------------------------------------- */ if (isdigit((int) *rowexpress)) /* is the row specification a number? */ { sscanf(rowexpress, "%ld", &rownum); if (rownum < 1) { ffpmsg("illegal rownum for image cell:"); ffpmsg(rowexpress); ffpmsg("Could not open the following image in a table cell:"); ffpmsg(extspec); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ return(*status = BAD_ROW_NUM); } } else if (fits_find_first_row(*fptr, rowexpress, &rownum, status) > 0) { ffpmsg("Failed to find row matching this expression:"); ffpmsg(rowexpress); ffpmsg("Could not open the following image in a table cell:"); ffpmsg(extspec); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ return(*status); } if (rownum == 0) { ffpmsg("row statisfying this expression doesn't exist::"); ffpmsg(rowexpress); ffpmsg("Could not open the following image in a table cell:"); ffpmsg(extspec); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ return(*status = BAD_ROW_NUM); } /* determine the name of the new file to contain copy of the image */ if (*histfilename && !(*pixfilter) ) strcpy(outfile, histfilename); /* the original outfile name */ else strcpy(outfile, "mem://_1"); /* create image file in memory */ /* Copy the image into new primary array and open it as the current */ /* fptr. This will close the table that contains the original image. */ /* create new empty file to hold copy of the image */ if (ffinit(&newptr, outfile, status) > 0) { ffpmsg("failed to create file for copy of image in table cell:"); ffpmsg(outfile); return(*status); } if (fits_copy_cell2image(*fptr, newptr, imagecolname, rownum, status) > 0) { ffpmsg("Failed to copy table cell to new primary array:"); ffpmsg(extspec); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ return(*status); } /* close the original file and set fptr to the new image */ ffclos(*fptr, status); *fptr = newptr; /* reset the pointer to the new table */ writecopy = 1; /* we are now dealing with a copy of the original file */ /* add some HISTORY; fits_copy_image_cell also wrote HISTORY keywords */ /* disable this; leave it up to calling routine to write any HISTORY keywords if (*extname) sprintf(card,"HISTORY in HDU '%.16s' of file '%.36s'",extname,infile); else sprintf(card,"HISTORY in HDU %d of file '%.45s'", extnum, infile); ffprec(*fptr, card, status); */ } /* --------------------------------------------------------------------- */ /* edit columns (and/or keywords) in the table, if specified in the URL */ /* --------------------------------------------------------------------- */ if (*colspec) { /* the column specifier will modify the file, so make sure */ /* we are already dealing with a copy, or else make a new copy */ if (!writecopy) /* Is the current file already a copy? */ writecopy = fits_is_this_a_copy(urltype); if (!writecopy) { if (*filtfilename && *outfile == '\0') strcpy(outfile, filtfilename); /* the original outfile name */ else strcpy(outfile, "mem://_1"); /* will create copy in memory */ writecopy = 1; } else { ((*fptr)->Fptr)->writemode = READWRITE; /* we have write access */ outfile[0] = '\0'; } if (ffedit_columns(fptr, outfile, colspec, status) > 0) { ffpmsg("editing columns in input table failed (ffopen)"); ffpmsg(" while trying to perform the following operation:"); ffpmsg(colspec); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ return(*status); } } /* ------------------------------------------------------------------- */ /* select rows from the table, if specified in the URL */ /* or select a subimage (if this is an image HDU and not a table) */ /* ------------------------------------------------------------------- */ if (*rowfilter) { fits_get_hdu_type(*fptr, &hdutyp, status); /* get type of HDU */ if (hdutyp == IMAGE_HDU) { /* this is an image so 'rowfilter' is an image section specification */ if (*filtfilename && *outfile == '\0') strcpy(outfile, filtfilename); /* the original outfile name */ else if (*outfile == '\0') /* output file name not already defined? */ strcpy(outfile, "mem://_2"); /* will create file in memory */ /* create new file containing the image section, plus a copy of */ /* any other HDUs that exist in the input file. This routine */ /* will close the original image file and return a pointer */ /* to the new file. */ if (fits_select_image_section(fptr, outfile, rowfilter, status) > 0) { ffpmsg("on-the-fly selection of image section failed (ffopen)"); ffpmsg(" while trying to use the following section filter:"); ffpmsg(rowfilter); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ return(*status); } } else { /* this is a table HDU, so the rowfilter is really a row filter */ if (*binspec) { /* since we are going to make a histogram of the selected rows, */ /* it would be a waste of time and memory to make a whole copy of */ /* the selected rows. Instead, just construct an array of TRUE */ /* or FALSE values that indicate which rows are to be included */ /* in the histogram and pass that to the histogram generating */ /* routine */ fits_get_num_rows(*fptr, &nrows, status); /* get no. of rows */ rowselect = (char *) calloc(nrows, 1); if (!rowselect) { ffpmsg( "failed to allocate memory for selected columns array (ffopen)"); ffpmsg(" while trying to select rows with the following filter:"); ffpmsg(rowfilter); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ return(*status = MEMORY_ALLOCATION); } if (fits_find_rows(*fptr, rowfilter, 1L, nrows, &goodrows, rowselect, status) > 0) { ffpmsg("selection of rows in input table failed (ffopen)"); ffpmsg(" while trying to select rows with the following filter:"); ffpmsg(rowfilter); free(rowselect); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ return(*status); } } else { if (!writecopy) /* Is the current file already a copy? */ writecopy = fits_is_this_a_copy(urltype); if (!writecopy) { if (*filtfilename && *outfile == '\0') strcpy(outfile, filtfilename); /* the original outfile name */ else if (*outfile == '\0') /* output filename not already defined? */ strcpy(outfile, "mem://_2"); /* will create copy in memory */ } else { ((*fptr)->Fptr)->writemode = READWRITE; /* we have write access */ outfile[0] = '\0'; } /* select rows in the table. If a copy of the input file has */ /* not already been made, then this routine will make a copy */ /* and then close the input file, so that the modifications will */ /* only be made on the copy, not the original */ if (ffselect_table(fptr, outfile, rowfilter, status) > 0) { ffpmsg("on-the-fly selection of rows in input table failed (ffopen)"); ffpmsg(" while trying to select rows with the following filter:"); ffpmsg(rowfilter); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ return(*status); } /* write history records */ ffphis(*fptr, "CFITSIO used the following filtering expression to create this table:", status); ffphis(*fptr, name, status); } /* end of no binspec case */ } /* end of table HDU case */ } /* end of rowfilter exists case */ /* ------------------------------------------------------------------- */ /* make an image histogram by binning columns, if specified in the URL */ /* ------------------------------------------------------------------- */ if (*binspec) { if (*histfilename && !(*pixfilter) ) strcpy(outfile, histfilename); /* the original outfile name */ else strcpy(outfile, "mem://_3"); /* create histogram in memory */ /* if not already copied the file */ /* parse the binning specifier into individual parameters */ ffbins(binspec, &imagetype, &haxis, colname, minin, maxin, binsizein, minname, maxname, binname, &weight, wtcol, &recip, status); /* Create the histogram primary array and open it as the current fptr */ /* This will close the table that was used to create the histogram. */ ffhist2(fptr, outfile, imagetype, haxis, colname, minin, maxin, binsizein, minname, maxname, binname, weight, wtcol, recip, rowselect, status); if (rowselect) free(rowselect); if (*status > 0) { ffpmsg("on-the-fly histogramming of input table failed (ffopen)"); ffpmsg(" while trying to execute the following histogram specification:"); ffpmsg(binspec); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ return(*status); } /* write history records */ ffphis(*fptr, "CFITSIO used the following expression to create this histogram:", status); ffphis(*fptr, name, status); } if (*pixfilter) { if (*histfilename) strcpy(outfile, histfilename); /* the original outfile name */ else strcpy(outfile, "mem://_4"); /* create in memory */ /* if not already copied the file */ /* Ensure type of HDU is consistent with pixel filtering */ fits_get_hdu_type(*fptr, &hdutyp, status); /* get type of HDU */ if (hdutyp == IMAGE_HDU) { pixel_filter_helper(fptr, outfile, pixfilter, status); if (*status > 0) { ffpmsg("pixel filtering of input image failed (ffopen)"); ffpmsg(" while trying to execute the following:"); ffpmsg(pixfilter); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ return(*status); } /* write history records */ ffphis(*fptr, "CFITSIO used the following expression to create this image:", status); ffphis(*fptr, name, status); } else { ffpmsg("cannot use pixel filter on non-IMAGE HDU"); ffpmsg(pixfilter); ffclos(*fptr, status); *fptr = 0; /* return null file pointer */ *status = NOT_IMAGE; return(*status); } } /* parse and save image compression specification, if given */ if (*compspec) { ffparsecompspec(*fptr, compspec, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffreopen(fitsfile *openfptr, /* I - FITS file pointer to open file */ fitsfile **newfptr, /* O - pointer to new re opened file */ int *status) /* IO - error status */ /* Reopen an existing FITS file with either readonly or read/write access. The reopened file shares the same FITSfile structure but may point to a different HDU within the file. */ { if (*status > 0) return(*status); /* check that the open file pointer is valid */ if (!openfptr) return(*status = NULL_INPUT_PTR); else if ((openfptr->Fptr)->validcode != VALIDSTRUC) /* check magic value */ return(*status = BAD_FILEPTR); /* allocate fitsfile structure and initialize = 0 */ *newfptr = (fitsfile *) calloc(1, sizeof(fitsfile)); (*newfptr)->Fptr = openfptr->Fptr; /* both point to the same structure */ (*newfptr)->HDUposition = 0; /* set initial position to primary array */ (((*newfptr)->Fptr)->open_count)++; /* increment the file usage counter */ return(*status); } /*--------------------------------------------------------------------------*/ int fits_store_Fptr(FITSfile *Fptr, /* O - FITS file pointer */ int *status) /* IO - error status */ /* store the new Fptr address for future use by fits_already_open */ { int ii; if (*status > 0) return(*status); FFLOCK; for (ii = 0; ii < NMAXFILES; ii++) { if (FptrTable[ii] == 0) { FptrTable[ii] = Fptr; break; } } FFUNLOCK; return(*status); } /*--------------------------------------------------------------------------*/ int fits_clear_Fptr(FITSfile *Fptr, /* O - FITS file pointer */ int *status) /* IO - error status */ /* clear the Fptr address from the Fptr Table */ { int ii; FFLOCK; for (ii = 0; ii < NMAXFILES; ii++) { if (FptrTable[ii] == Fptr) { FptrTable[ii] = 0; break; } } FFUNLOCK; return(*status); } /*--------------------------------------------------------------------------*/ int fits_already_open(fitsfile **fptr, /* I/O - FITS file pointer */ char *url, char *urltype, char *infile, char *extspec, char *rowfilter, char *binspec, char *colspec, int mode, /* I - 0 = open readonly; 1 = read/write */ int *isopen, /* O - 1 = file is already open */ int *status) /* IO - error status */ /* Check if the file to be opened is already open. If so, then attach to it. */ /* the input strings must not exceed the standard lengths */ /* of FLEN_FILENAME, MAX_PREFIX_LEN, etc. */ /* this function was changed so that for files of access method FILE:// the file paths are compared using standard URL syntax and absolute paths (as opposed to relative paths). This eliminates some instances where a file is already opened but it is not realized because it was opened with another file path. For instance, if the CWD is /a/b/c and I open /a/b/c/foo.fits then open ./foo.fits the previous version of this function would not have reconized that the two files were the same. This version does recognize that the two files are the same. */ { FITSfile *oldFptr; int ii; char oldurltype[MAX_PREFIX_LEN], oldinfile[FLEN_FILENAME]; char oldextspec[FLEN_FILENAME], oldoutfile[FLEN_FILENAME]; char oldrowfilter[FLEN_FILENAME]; char oldbinspec[FLEN_FILENAME], oldcolspec[FLEN_FILENAME]; char cwd[FLEN_FILENAME]; char tmpStr[FLEN_FILENAME]; char tmpinfile[FLEN_FILENAME]; *isopen = 0; /* When opening a file with readonly access then we simply let the operating system open the file again, instead of using the CFITSIO trick of attaching to the previously opened file. This is required if CFITSIO is running in a multi-threaded environment, because 2 different threads cannot share the same FITSfile pointer. If the file is opened/reopened with write access, then the file MUST only be physically opened once.. */ if (mode == 0) return(*status); if(strcasecmp(urltype,"FILE://") == 0) { fits_path2url(infile,tmpinfile,status); if(tmpinfile[0] != '/') { fits_get_cwd(cwd,status); strcat(cwd,"/"); if (strlen(cwd) + strlen(tmpinfile) > FLEN_FILENAME-1) { ffpmsg("File name is too long. (fits_already_open)"); return(*status = FILE_NOT_OPENED); } strcat(cwd,tmpinfile); fits_clean_url(cwd,tmpinfile,status); } } else strcpy(tmpinfile,infile); for (ii = 0; ii < NMAXFILES; ii++) /* check every buffer */ { if (FptrTable[ii] != 0) { oldFptr = FptrTable[ii]; fits_parse_input_url(oldFptr->filename, oldurltype, oldinfile, oldoutfile, oldextspec, oldrowfilter, oldbinspec, oldcolspec, status); if (*status > 0) { ffpmsg("could not parse the previously opened filename: (ffopen)"); ffpmsg(oldFptr->filename); return(*status); } if(strcasecmp(oldurltype,"FILE://") == 0) { fits_path2url(oldinfile,tmpStr,status); if(tmpStr[0] != '/') { fits_get_cwd(cwd,status); strcat(cwd,"/"); strcat(cwd,tmpStr); fits_clean_url(cwd,tmpStr,status); } strcpy(oldinfile,tmpStr); } if (!strcmp(urltype, oldurltype) && !strcmp(tmpinfile, oldinfile) ) { /* identical type of file and root file name */ if ( (!rowfilter[0] && !oldrowfilter[0] && !binspec[0] && !oldbinspec[0] && !colspec[0] && !oldcolspec[0]) /* no filtering or binning specs for either file, so */ /* this is a case where the same file is being reopened. */ /* It doesn't matter if the extensions are different */ || /* or */ (!strcmp(rowfilter, oldrowfilter) && !strcmp(binspec, oldbinspec) && !strcmp(colspec, oldcolspec) && !strcmp(extspec, oldextspec) ) ) /* filtering specs are given and are identical, and */ /* the same extension is specified */ { if (mode == READWRITE && oldFptr->writemode == READONLY) { /* cannot assume that a file previously opened with READONLY can now be written to (e.g., files on CDROM, or over the the network, or STDIN), so return with an error. */ ffpmsg( "cannot reopen file READWRITE when previously opened READONLY"); ffpmsg(url); return(*status = FILE_NOT_OPENED); } *fptr = (fitsfile *) calloc(1, sizeof(fitsfile)); if (!(*fptr)) { ffpmsg( "failed to allocate structure for following file: (ffopen)"); ffpmsg(url); return(*status = MEMORY_ALLOCATION); } (*fptr)->Fptr = oldFptr; /* point to the structure */ (*fptr)->HDUposition = 0; /* set initial position */ (((*fptr)->Fptr)->open_count)++; /* increment usage counter */ if (binspec[0]) /* if binning specified, don't move */ extspec[0] = '\0'; /* all the filtering has already been applied, so ignore */ rowfilter[0] = '\0'; binspec[0] = '\0'; colspec[0] = '\0'; *isopen = 1; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fits_is_this_a_copy(char *urltype) /* I - type of file */ /* specialized routine that returns 1 if the file is known to be a temporary copy of the originally opened file. Otherwise it returns 0. */ { int iscopy; if (!strncmp(urltype, "mem", 3) ) iscopy = 1; /* file copy is in memory */ else if (!strncmp(urltype, "compress", 8) ) iscopy = 1; /* compressed diskfile that is uncompressed in memory */ else if (!strncmp(urltype, "http", 4) ) iscopy = 1; /* copied file using http protocol */ else if (!strncmp(urltype, "ftp", 3) ) iscopy = 1; /* copied file using ftp protocol */ else if (!strncmp(urltype, "gsiftp", 6) ) iscopy = 1; /* copied file using gsiftp protocol */ else if (!strncpy(urltype, "stdin", 5) ) iscopy = 1; /* piped stdin has been copied to memory */ else iscopy = 0; /* file is not known to be a copy */ return(iscopy); } /*--------------------------------------------------------------------------*/ static int find_quote(char **string) /* look for the closing single quote character in the input string */ { char *tstr; tstr = *string; while (*tstr) { if (*tstr == '\'') { /* found the closing quote */ *string = tstr + 1; /* set pointer to next char */ return(0); } else { /* skip over any other character */ tstr++; } } return(1); /* opps, didn't find the closing character */ } /*--------------------------------------------------------------------------*/ static int find_doublequote(char **string) /* look for the closing double quote character in the input string */ { char *tstr; tstr = *string; while (*tstr) { if (*tstr == '"') { /* found the closing quote */ *string = tstr + 1; /* set pointer to next char */ return(0); } else { /* skip over any other character */ tstr++; } } return(1); /* opps, didn't find the closing character */ } /*--------------------------------------------------------------------------*/ static int find_paren(char **string) /* look for the closing parenthesis character in the input string */ { char *tstr; tstr = *string; while (*tstr) { if (*tstr == ')') { /* found the closing parens */ *string = tstr + 1; /* set pointer to next char */ return(0); } else if (*tstr == '(') { /* found another level of parens */ tstr++; if (find_paren(&tstr)) return(1); } else if (*tstr == '[') { tstr++; if (find_bracket(&tstr)) return(1); } else if (*tstr == '{') { tstr++; if (find_curlybracket(&tstr)) return(1); } else if (*tstr == '"') { tstr++; if (find_doublequote(&tstr)) return(1); } else if (*tstr == '\'') { tstr++; if (find_quote(&tstr)) return(1); } else { tstr++; } } return(1); /* opps, didn't find the closing character */ } /*--------------------------------------------------------------------------*/ static int find_bracket(char **string) /* look for the closing bracket character in the input string */ { char *tstr; tstr = *string; while (*tstr) { if (*tstr == ']') { /* found the closing bracket */ *string = tstr + 1; /* set pointer to next char */ return(0); } else if (*tstr == '(') { /* found another level of parens */ tstr++; if (find_paren(&tstr)) return(1); } else if (*tstr == '[') { tstr++; if (find_bracket(&tstr)) return(1); } else if (*tstr == '{') { tstr++; if (find_curlybracket(&tstr)) return(1); } else if (*tstr == '"') { tstr++; if (find_doublequote(&tstr)) return(1); } else if (*tstr == '\'') { tstr++; if (find_quote(&tstr)) return(1); } else { tstr++; } } return(1); /* opps, didn't find the closing character */ } /*--------------------------------------------------------------------------*/ static int find_curlybracket(char **string) /* look for the closing curly bracket character in the input string */ { char *tstr; tstr = *string; while (*tstr) { if (*tstr == '}') { /* found the closing curly bracket */ *string = tstr + 1; /* set pointer to next char */ return(0); } else if (*tstr == '(') { /* found another level of parens */ tstr++; if (find_paren(&tstr)) return(1); } else if (*tstr == '[') { tstr++; if (find_bracket(&tstr)) return(1); } else if (*tstr == '{') { tstr++; if (find_curlybracket(&tstr)) return(1); } else if (*tstr == '"') { tstr++; if (find_doublequote(&tstr)) return(1); } else if (*tstr == '\'') { tstr++; if (find_quote(&tstr)) return(1); } else { tstr++; } } return(1); /* opps, didn't find the closing character */ } /*--------------------------------------------------------------------------*/ int comma2semicolon(char *string) /* replace commas with semicolons, unless the comma is within a quoted or bracketed expression */ { char *tstr; tstr = string; while (*tstr) { if (*tstr == ',') { /* found a comma */ *tstr = ';'; tstr++; } else if (*tstr == '(') { /* found another level of parens */ tstr++; if (find_paren(&tstr)) return(1); } else if (*tstr == '[') { tstr++; if (find_bracket(&tstr)) return(1); } else if (*tstr == '{') { tstr++; if (find_curlybracket(&tstr)) return(1); } else if (*tstr == '"') { tstr++; if (find_doublequote(&tstr)) return(1); } else if (*tstr == '\'') { tstr++; if (find_quote(&tstr)) return(1); } else { tstr++; } } return(0); /* reached end of string */ } /*--------------------------------------------------------------------------*/ int ffedit_columns( fitsfile **fptr, /* IO - pointer to input table; on output it */ /* points to the new selected rows table */ char *outfile, /* I - name for output file */ char *expr, /* I - column edit expression */ int *status) /* modify columns in a table and/or header keywords in the HDU */ { fitsfile *newptr; int ii, hdunum, slen, colnum = -1, testnum, deletecol = 0, savecol = 0; int numcols = 0, *colindex = 0, tstatus = 0, inparen; char *cptr, *cptr2, *cptr3, *clause = NULL, keyname[FLEN_KEYWORD]; char colname[FLEN_VALUE], oldname[FLEN_VALUE], colformat[FLEN_VALUE]; char *file_expr = NULL, testname[FLEN_VALUE], card[FLEN_CARD]; if (*outfile) { /* create new empty file in to hold the selected rows */ if (ffinit(&newptr, outfile, status) > 0) { ffpmsg("failed to create file for copy (ffedit_columns)"); return(*status); } fits_get_hdu_num(*fptr, &hdunum); /* current HDU number in input file */ /* copy all HDUs to the output copy, if the 'only_one' flag is not set */ if (!((*fptr)->Fptr)->only_one) { for (ii = 1; 1; ii++) { if (fits_movabs_hdu(*fptr, ii, NULL, status) > 0) break; fits_copy_hdu(*fptr, newptr, 0, status); } if (*status == END_OF_FILE) { *status = 0; /* got the expected EOF error; reset = 0 */ } else if (*status > 0) { ffclos(newptr, status); ffpmsg("failed to copy all HDUs from input file (ffedit_columns)"); return(*status); } } else { /* only copy the primary array and the designated table extension */ fits_movabs_hdu(*fptr, 1, NULL, status); fits_copy_hdu(*fptr, newptr, 0, status); fits_movabs_hdu(*fptr, hdunum, NULL, status); fits_copy_hdu(*fptr, newptr, 0, status); if (*status > 0) { ffclos(newptr, status); ffpmsg("failed to copy all HDUs from input file (ffedit_columns)"); return(*status); } hdunum = 2; } /* close the original file and return ptr to the new image */ ffclos(*fptr, status); *fptr = newptr; /* reset the pointer to the new table */ /* move back to the selected table HDU */ if (fits_movabs_hdu(*fptr, hdunum, NULL, status) > 0) { ffpmsg("failed to copy the input file (ffedit_columns)"); return(*status); } } /* remove the "col " from the beginning of the column edit expression */ cptr = expr + 4; while (*cptr == ' ') cptr++; /* skip leading white space */ /* Check if need to import expression from a file */ if( *cptr=='@' ) { if( ffimport_file( cptr+1, &file_expr, status ) ) return(*status); cptr = file_expr; while (*cptr == ' ') cptr++; /* skip leading white space... again */ } tstatus = 0; ffgncl(*fptr, &numcols, &tstatus); /* get initial # of cols */ /* as of July 2012, the CFITSIO column filter syntax was modified */ /* so that commas may be used to separate clauses, as well as semi-colons. */ /* This was done because users cannot enter the semi-colon in the HEASARC's */ /* Hera on-line data processing system for computer security reasons. */ /* Therefore, we must convert those commas back to semi-colons here, but we */ /* must not convert any columns that occur within parenthesies. */ if (comma2semicolon(cptr)) { ffpmsg("parsing error in column filter expression"); ffpmsg(cptr); if( file_expr ) free( file_expr ); *status = PARSE_SYNTAX_ERR; return(*status); } /* parse expression and get first clause, if more than 1 */ while ((slen = fits_get_token2(&cptr, ";", &clause, NULL, status)) > 0 ) { if( *cptr==';' ) cptr++; clause[slen] = '\0'; if (clause[0] == '!' || clause[0] == '-') { /* ===================================== */ /* Case I. delete this column or keyword */ /* ===================================== */ if (ffgcno(*fptr, CASEINSEN, &clause[1], &colnum, status) <= 0) { /* a column with this name exists, so try to delete it */ if (ffdcol(*fptr, colnum, status) > 0) { ffpmsg("failed to delete column in input file:"); ffpmsg(clause); if( colindex ) free( colindex ); if( file_expr ) free( file_expr ); if( clause ) free(clause); return(*status); } deletecol = 1; /* set flag that at least one col was deleted */ numcols--; colnum = -1; } else { ffcmsg(); /* clear previous error message from ffgcno */ /* try deleting a keyword with this name */ *status = 0; if (ffdkey(*fptr, &clause[1], status) > 0) { ffpmsg("column or keyword to be deleted does not exist:"); ffpmsg(clause); if( colindex ) free( colindex ); if( file_expr ) free( file_expr ); if( clause ) free(clause); return(*status); } } } else { /* ===================================================== */ /* Case II: this is either a column name, (case 1) or a new column name followed by double = ("==") followed by the old name which is to be renamed. (case 2A) or a column or keyword name followed by a single "=" and a calculation expression (case 2B) */ /* ===================================================== */ cptr2 = clause; slen = fits_get_token(&cptr2, "( =", colname, NULL); if (slen == 0) { ffpmsg("error: column or keyword name is blank:"); ffpmsg(clause); if( colindex ) free( colindex ); if( file_expr ) free( file_expr ); if (clause) free(clause); return(*status= URL_PARSE_ERROR); } /* If this is a keyword of the form #KEYWORD# then transform to the form #KEYWORDn where n is the previously used column number */ if (colname[0] == '#' && strstr(colname+1, "#") == (colname + strlen(colname) - 1)) { if (colnum <= 0) { ffpmsg("The keyword name:"); ffpmsg(colname); ffpmsg("is invalid unless a column has been previously"); ffpmsg("created or editted by a calculator command"); if( file_expr ) free( file_expr ); if (clause) free(clause); return(*status = URL_PARSE_ERROR); } colname[strlen(colname)-1] = '\0'; /* Make keyword name and put it in oldname */ ffkeyn(colname+1, colnum, oldname, status); if (*status) return (*status); /* Re-copy back into colname */ strcpy(colname+1,oldname); } else if (strstr(colname, "#") == (colname + strlen(colname) - 1)) { /* colname is of the form "NAME#"; if a) colnum is defined, and b) a column with literal name "NAME#" does not exist, and c) a keyword with name "NAMEn" (where n=colnum) exists, then transfrom the colname string to "NAMEn", otherwise do nothing. */ if (colnum > 0) { /* colnum must be defined */ tstatus = 0; ffgcno(*fptr, CASEINSEN, colname, &testnum, &tstatus); if (tstatus != 0 && tstatus != COL_NOT_UNIQUE) { /* OK, column doesn't exist, now see if keyword exists */ ffcmsg(); /* clear previous error message from ffgcno */ strcpy(testname, colname); testname[strlen(testname)-1] = '\0'; /* Make keyword name and put it in oldname */ ffkeyn(testname, colnum, oldname, status); if (*status) { if( file_expr ) free( file_expr ); if (clause) free(clause); return (*status); } tstatus = 0; if (!fits_read_card(*fptr, oldname, card, &tstatus)) { /* Keyword does exist; copy real name back into colname */ strcpy(colname,oldname); } } } } /* if we encountered an opening parenthesis, then we need to */ /* find the closing parenthesis, and concatinate the 2 strings */ /* This supports expressions like: [col #EXTNAME(Extension name)="GTI"] */ if (*cptr2 == '(') { fits_get_token(&cptr2, ")", oldname, NULL); strcat(colname, oldname); strcat(colname, ")"); cptr2++; } while (*cptr2 == ' ') cptr2++; /* skip white space */ if (*cptr2 != '=') { /* ------------------------------------ */ /* case 1 - simply the name of a column */ /* ------------------------------------ */ /* look for matching column */ ffgcno(*fptr, CASEINSEN, colname, &testnum, status); while (*status == COL_NOT_UNIQUE) { /* the column name contained wild cards, and it */ /* matches more than one column in the table. */ colnum = testnum; /* keep this column in the output file */ savecol = 1; if (!colindex) colindex = (int *) calloc(999, sizeof(int)); colindex[colnum - 1] = 1; /* flag this column number */ /* look for other matching column names */ ffgcno(*fptr, CASEINSEN, colname, &testnum, status); if (*status == COL_NOT_FOUND) *status = 999; /* temporary status flag value */ } if (*status <= 0) { colnum = testnum; /* keep this column in the output file */ savecol = 1; if (!colindex) colindex = (int *) calloc(999, sizeof(int)); colindex[colnum - 1] = 1; /* flag this column number */ } else if (*status == 999) { /* this special flag value does not represent an error */ *status = 0; } else { ffpmsg("Syntax error in columns specifier in input URL:"); ffpmsg(cptr2); if( colindex ) free( colindex ); if( file_expr ) free( file_expr ); if (clause) free(clause); return(*status = URL_PARSE_ERROR); } } else { /* ----------------------------------------------- */ /* case 2 where the token ends with an equals sign */ /* ----------------------------------------------- */ cptr2++; /* skip over the first '=' */ if (*cptr2 == '=') { /*................................................. */ /* Case A: rename a column or keyword; syntax is "new_name == old_name" */ /*................................................. */ cptr2++; /* skip the 2nd '=' */ while (*cptr2 == ' ') cptr2++; /* skip white space */ fits_get_token(&cptr2, " ", oldname, NULL); /* get column number of the existing column */ if (ffgcno(*fptr, CASEINSEN, oldname, &colnum, status) <= 0) { /* modify the TTYPEn keyword value with the new name */ ffkeyn("TTYPE", colnum, keyname, status); if (ffmkys(*fptr, keyname, colname, NULL, status) > 0) { ffpmsg("failed to rename column in input file"); ffpmsg(" oldname ="); ffpmsg(oldname); ffpmsg(" newname ="); ffpmsg(colname); if( colindex ) free( colindex ); if( file_expr ) free( file_expr ); if (clause) free(clause); return(*status); } /* keep this column in the output file */ savecol = 1; if (!colindex) colindex = (int *) calloc(999, sizeof(int)); colindex[colnum - 1] = 1; /* flag this column number */ } else { /* try renaming a keyword */ ffcmsg(); /* clear error message stack */ *status = 0; if (ffmnam(*fptr, oldname, colname, status) > 0) { ffpmsg("column or keyword to be renamed does not exist:"); ffpmsg(clause); if( colindex ) free( colindex ); if( file_expr ) free( file_expr ); if (clause) free(clause); return(*status); } } } else { /*...................................................... */ /* Case B: */ /* this must be a general column/keyword calc expression */ /* "name = expression" or "colname(TFORM) = expression" */ /*...................................................... */ /* parse the name and TFORM values, if present */ colformat[0] = '\0'; cptr3 = colname; fits_get_token(&cptr3, "(", oldname, NULL); if (cptr3[0] == '(' ) { cptr3++; /* skip the '(' */ fits_get_token(&cptr3, ")", colformat, NULL); } /* calculate values for the column or keyword */ /* cptr2 = the expression to be calculated */ /* oldname = name of the column or keyword */ /* colformat = column format, or keyword comment string */ if (fits_calculator(*fptr, cptr2, *fptr, oldname, colformat, status) > 0) { ffpmsg("Unable to calculate expression"); if( colindex ) free( colindex ); if( file_expr ) free( file_expr ); if (clause) free(clause); return(*status); } /* test if this is a column and not a keyword */ tstatus = 0; ffgcno(*fptr, CASEINSEN, oldname, &testnum, &tstatus); if (tstatus == 0) { /* keep this column in the output file */ colnum = testnum; savecol = 1; if (!colindex) colindex = (int *) calloc(999, sizeof(int)); colindex[colnum - 1] = 1; if (colnum > numcols)numcols++; } else { ffcmsg(); /* clear the error message stack */ } } } } if (clause) free(clause); /* free old clause before getting new one */ clause = NULL; } if (savecol && !deletecol) { /* need to delete all but the specified columns */ for (ii = numcols; ii > 0; ii--) { if (!colindex[ii-1]) /* delete this column */ { if (ffdcol(*fptr, ii, status) > 0) { ffpmsg("failed to delete column in input file:"); ffpmsg(clause); if( colindex ) free( colindex ); if( file_expr ) free( file_expr ); if (clause) free(clause); return(*status); } } } } if( colindex ) free( colindex ); if( file_expr ) free( file_expr ); if (clause) free(clause); return(*status); } /*--------------------------------------------------------------------------*/ int fits_copy_cell2image( fitsfile *fptr, /* I - point to input table */ fitsfile *newptr, /* O - existing output file; new image HDU will be appended to it */ char *colname, /* I - column name / number containing the image*/ long rownum, /* I - number of the row containing the image */ int *status) /* IO - error status */ /* Copy a table cell of a given row and column into an image extension. The output file must already have been created. A new image extension will be created in that file. This routine was written by Craig Markwardt, GSFC */ { unsigned char buffer[30000]; int hdutype, colnum, typecode, bitpix, naxis, maxelem, tstatus; LONGLONG naxes[9], nbytes, firstbyte, ntodo; LONGLONG repeat, startpos, elemnum, rowlen, tnull; long twidth, incre; double scale, zero; char tform[20]; char card[FLEN_CARD]; char templt[FLEN_CARD] = ""; /* Table-to-image keyword translation table */ /* INPUT OUTPUT */ /* 01234567 01234567 */ char *patterns[][2] = {{"TSCALn", "BSCALE" }, /* Standard FITS keywords */ {"TZEROn", "BZERO" }, {"TUNITn", "BUNIT" }, {"TNULLn", "BLANK" }, {"TDMINn", "DATAMIN" }, {"TDMAXn", "DATAMAX" }, {"iCTYPn", "CTYPEi" }, /* Coordinate labels */ {"iCTYna", "CTYPEia" }, {"iCUNIn", "CUNITi" }, /* Coordinate units */ {"iCUNna", "CUNITia" }, {"iCRVLn", "CRVALi" }, /* WCS keywords */ {"iCRVna", "CRVALia" }, {"iCDLTn", "CDELTi" }, {"iCDEna", "CDELTia" }, {"iCRPXn", "CRPIXi" }, {"iCRPna", "CRPIXia" }, {"ijPCna", "PCi_ja" }, {"ijCDna", "CDi_ja" }, {"iVn_ma", "PVi_ma" }, {"iSn_ma", "PSi_ma" }, {"iCRDna", "CRDERia" }, {"iCSYna", "CSYERia" }, {"iCROTn", "CROTAi" }, {"WCAXna", "WCSAXESa"}, {"WCSNna", "WCSNAMEa"}, {"LONPna", "LONPOLEa"}, {"LATPna", "LATPOLEa"}, {"EQUIna", "EQUINOXa"}, {"MJDOBn", "MJD-OBS" }, {"MJDAn", "MJD-AVG" }, {"RADEna", "RADESYSa"}, {"iCNAna", "CNAMEia" }, {"DAVGn", "DATE-AVG"}, /* Delete table keywords related to other columns */ {"T????#a", "-" }, {"TC??#a", "-" }, {"TWCS#a", "-" }, {"TDIM#", "-" }, {"iCTYPm", "-" }, {"iCUNIm", "-" }, {"iCRVLm", "-" }, {"iCDLTm", "-" }, {"iCRPXm", "-" }, {"iCTYma", "-" }, {"iCUNma", "-" }, {"iCRVma", "-" }, {"iCDEma", "-" }, {"iCRPma", "-" }, {"ijPCma", "-" }, {"ijCDma", "-" }, {"iVm_ma", "-" }, {"iSm_ma", "-" }, {"iCRDma", "-" }, {"iCSYma", "-" }, {"iCROTm", "-" }, {"WCAXma", "-" }, {"WCSNma", "-" }, {"LONPma", "-" }, {"LATPma", "-" }, {"EQUIma", "-" }, {"MJDOBm", "-" }, {"MJDAm", "-" }, {"RADEma", "-" }, {"iCNAma", "-" }, {"DAVGm", "-" }, {"EXTNAME", "-" }, /* Remove structural keywords*/ {"EXTVER", "-" }, {"EXTLEVEL","-" }, {"CHECKSUM","-" }, {"DATASUM", "-" }, {"*", "+" }}; /* copy all other keywords */ int npat; if (*status > 0) return(*status); /* get column number */ if (ffgcno(fptr, CASEINSEN, colname, &colnum, status) > 0) { ffpmsg("column containing image in table cell does not exist:"); ffpmsg(colname); return(*status); } /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if ( ffgcprll(fptr, colnum, rownum, 1L, 1L, 0, &scale, &zero, tform, &twidth, &typecode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, (char *) buffer, status) > 0 ) return(*status); /* get the actual column name, in case a column number was given */ ffkeyn("", colnum, templt, &tstatus); ffgcnn(fptr, CASEINSEN, templt, colname, &colnum, &tstatus); if (hdutype != BINARY_TBL) { ffpmsg("This extension is not a binary table."); ffpmsg(" Cannot open the image in a binary table cell."); return(*status = NOT_BTABLE); } if (typecode < 0) { /* variable length array */ typecode *= -1; /* variable length arrays are 1-dimensional by default */ naxis = 1; naxes[0] = repeat; } else { /* get the dimensions of the image */ ffgtdmll(fptr, colnum, 9, &naxis, naxes, status); } if (*status > 0) { ffpmsg("Error getting the dimensions of the image"); return(*status); } /* determine BITPIX value for the image */ if (typecode == TBYTE) { bitpix = BYTE_IMG; nbytes = repeat; } else if (typecode == TSHORT) { bitpix = SHORT_IMG; nbytes = repeat * 2; } else if (typecode == TLONG) { bitpix = LONG_IMG; nbytes = repeat * 4; } else if (typecode == TFLOAT) { bitpix = FLOAT_IMG; nbytes = repeat * 4; } else if (typecode == TDOUBLE) { bitpix = DOUBLE_IMG; nbytes = repeat * 8; } else if (typecode == TLONGLONG) { bitpix = LONGLONG_IMG; nbytes = repeat * 8; } else if (typecode == TLOGICAL) { bitpix = BYTE_IMG; nbytes = repeat; } else { ffpmsg("Error: the following image column has invalid datatype:"); ffpmsg(colname); ffpmsg(tform); ffpmsg("Cannot open an image in a single row of this column."); return(*status = BAD_TFORM); } /* create new image in output file */ if (ffcrimll(newptr, bitpix, naxis, naxes, status) > 0) { ffpmsg("failed to write required primary array keywords in the output file"); return(*status); } npat = sizeof(patterns)/sizeof(patterns[0][0])/2; /* skip over the first 8 keywords, starting just after TFIELDS */ fits_translate_keywords(fptr, newptr, 9, patterns, npat, colnum, 0, 0, status); /* add some HISTORY */ sprintf(card,"HISTORY This image was copied from row %ld of column '%s',", rownum, colname); /* disable this; leave it up to the caller to write history if needed. ffprec(newptr, card, status); */ /* the use of ffread routine, below, requires that any 'dirty' */ /* buffers in memory be flushed back to the file first */ ffflsh(fptr, FALSE, status); /* finally, copy the data, one buffer size at a time */ ffmbyt(fptr, startpos, TRUE, status); firstbyte = 1; /* the upper limit on the number of bytes must match the declaration */ /* read up to the first 30000 bytes in the normal way with ffgbyt */ ntodo = minvalue(30000, nbytes); ffgbyt(fptr, ntodo, buffer, status); ffptbb(newptr, 1, firstbyte, ntodo, buffer, status); nbytes -= ntodo; firstbyte += ntodo; /* read any additional bytes with low-level ffread routine, for speed */ while (nbytes && (*status <= 0) ) { ntodo = minvalue(30000, nbytes); ffread((fptr)->Fptr, (long) ntodo, buffer, status); ffptbb(newptr, 1, firstbyte, ntodo, buffer, status); nbytes -= ntodo; firstbyte += ntodo; } /* Re-scan the header so that CFITSIO knows about all the new keywords */ ffrdef(newptr,status); return(*status); } /*--------------------------------------------------------------------------*/ int fits_copy_image2cell( fitsfile *fptr, /* I - pointer to input image extension */ fitsfile *newptr, /* I - pointer to output table */ char *colname, /* I - name of column containing the image */ long rownum, /* I - number of the row containing the image */ int copykeyflag, /* I - controls which keywords to copy */ int *status) /* IO - error status */ /* Copy an image extension into a table cell at a given row and column. The table must have already been created. If the "colname" column exists, it will be used, otherwise a new column will be created in the table. The "copykeyflag" parameter controls which keywords to copy from the input image to the output table header (with any appropriate translation). copykeyflag = 0 -- no keywords will be copied copykeyflag = 1 -- essentially all keywords will be copied copykeyflag = 2 -- copy only the WCS related keywords This routine was written by Craig Markwardt, GSFC */ { tcolumn *colptr; unsigned char buffer[30000]; int ii, hdutype, colnum, typecode, bitpix, naxis, ncols, hdunum; char tformchar, tform[20], card[FLEN_CARD]; LONGLONG imgstart, naxes[9], nbytes, repeat, ntodo,firstbyte; char filename[FLEN_FILENAME+20]; int npat; int naxis1; LONGLONG naxes1[9] = {0,0,0,0,0,0,0,0,0}, repeat1, width1; int typecode1; unsigned char dummy = 0; LONGLONG headstart, datastart, dataend; /* Image-to-table keyword translation table */ /* INPUT OUTPUT */ /* 01234567 01234567 */ char *patterns[][2] = {{"BSCALE", "TSCALn" }, /* Standard FITS keywords */ {"BZERO", "TZEROn" }, {"BUNIT", "TUNITn" }, {"BLANK", "TNULLn" }, {"DATAMIN", "TDMINn" }, {"DATAMAX", "TDMAXn" }, {"CTYPEi", "iCTYPn" }, /* Coordinate labels */ {"CTYPEia", "iCTYna" }, {"CUNITi", "iCUNIn" }, /* Coordinate units */ {"CUNITia", "iCUNna" }, {"CRVALi", "iCRVLn" }, /* WCS keywords */ {"CRVALia", "iCRVna" }, {"CDELTi", "iCDLTn" }, {"CDELTia", "iCDEna" }, {"CRPIXj", "jCRPXn" }, {"CRPIXja", "jCRPna" }, {"PCi_ja", "ijPCna" }, {"CDi_ja", "ijCDna" }, {"PVi_ma", "iVn_ma" }, {"PSi_ma", "iSn_ma" }, {"WCSAXESa","WCAXna" }, {"WCSNAMEa","WCSNna" }, {"CRDERia", "iCRDna" }, {"CSYERia", "iCSYna" }, {"CROTAi", "iCROTn" }, {"LONPOLEa","LONPna"}, {"LATPOLEa","LATPna"}, {"EQUINOXa","EQUIna"}, {"MJD-OBS", "MJDOBn" }, {"MJD-AVG", "MJDAn" }, {"RADESYSa","RADEna"}, {"CNAMEia", "iCNAna" }, {"DATE-AVG","DAVGn"}, {"NAXISi", "-" }, /* Remove structural keywords*/ {"PCOUNT", "-" }, {"GCOUNT", "-" }, {"EXTEND", "-" }, {"EXTNAME", "-" }, {"EXTVER", "-" }, {"EXTLEVEL","-" }, {"CHECKSUM","-" }, {"DATASUM", "-" }, {"*", "+" }}; /* copy all other keywords */ if (*status > 0) return(*status); if (fptr == 0 || newptr == 0) return (*status = NULL_INPUT_PTR); if (ffghdt(fptr, &hdutype, status) > 0) { ffpmsg("could not get input HDU type"); return (*status); } if (hdutype != IMAGE_HDU) { ffpmsg("The input extension is not an image."); ffpmsg(" Cannot open the image."); return(*status = NOT_IMAGE); } if (ffghdt(newptr, &hdutype, status) > 0) { ffpmsg("could not get output HDU type"); return (*status); } if (hdutype != BINARY_TBL) { ffpmsg("The output extension is not a table."); return(*status = NOT_BTABLE); } if (ffgiprll(fptr, 9, &bitpix, &naxis, naxes, status) > 0) { ffpmsg("Could not read image parameters."); return (*status); } /* Determine total number of pixels in the image */ repeat = 1; for (ii = 0; ii < naxis; ii++) repeat *= naxes[ii]; /* Determine the TFORM value for the table cell */ if (bitpix == BYTE_IMG) { typecode = TBYTE; tformchar = 'B'; nbytes = repeat; } else if (bitpix == SHORT_IMG) { typecode = TSHORT; tformchar = 'I'; nbytes = repeat*2; } else if (bitpix == LONG_IMG) { typecode = TLONG; tformchar = 'J'; nbytes = repeat*4; } else if (bitpix == FLOAT_IMG) { typecode = TFLOAT; tformchar = 'E'; nbytes = repeat*4; } else if (bitpix == DOUBLE_IMG) { typecode = TDOUBLE; tformchar = 'D'; nbytes = repeat*8; } else if (bitpix == LONGLONG_IMG) { typecode = TLONGLONG; tformchar = 'K'; nbytes = repeat*8; } else { ffpmsg("Error: the image has an invalid datatype."); return (*status = BAD_BITPIX); } /* get column number */ ffpmrk(); ffgcno(newptr, CASEINSEN, colname, &colnum, status); ffcmrk(); /* Column does not exist; create it */ if (*status) { *status = 0; sprintf(tform, "%.0f%c", (double) repeat, tformchar); ffgncl(newptr, &ncols, status); colnum = ncols+1; fficol(newptr, colnum, colname, tform, status); ffptdmll(newptr, colnum, naxis, naxes, status); if (*status) { ffpmsg("Could not insert new column into output table."); return *status; } } else { ffgtdmll(newptr, colnum, 9, &naxis1, naxes1, status); if (*status > 0 || naxis != naxis1) { ffpmsg("Input image dimensions and output table cell dimensions do not match."); return (*status = BAD_DIMEN); } for (ii=0; ii 0) || (typecode1 != typecode) || (repeat1 != repeat)) { ffpmsg("Input image data type does not match output table cell type."); return (*status = BAD_TFORM); } } /* copy keywords from input image to output table, if required */ if (copykeyflag) { npat = sizeof(patterns)/sizeof(patterns[0][0])/2; if (copykeyflag == 2) { /* copy only the WCS-related keywords */ patterns[npat-1][1] = "-"; } /* The 3rd parameter value = 5 means skip the first 4 keywords in the image */ fits_translate_keywords(fptr, newptr, 5, patterns, npat, colnum, 0, 0, status); } /* Here is all the code to compute offsets: * * byte offset from start of row to column (dest table) * * byte offset from start of file to image data (source image) */ /* Force the writing of the row of the table by writing the last byte of the array, which grows the table, and/or shifts following extensions */ ffpcl(newptr, TBYTE, colnum, rownum, repeat, 1, &dummy, status); /* byte offset within the row to the start of the image column */ colptr = (newptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ firstbyte = colptr->tbcol + 1; /* get starting address of input image to be read */ ffghadll(fptr, &headstart, &datastart, &dataend, status); imgstart = datastart; sprintf(card, "HISTORY Table column '%s' row %ld copied from image", colname, rownum); /* Don't automatically write History keywords; leave this up to the caller. ffprec(newptr, card, status); */ /* write HISTORY keyword with the file name (this is now disabled)*/ filename[0] = '\0'; hdunum = 0; strcpy(filename, "HISTORY "); ffflnm(fptr, filename+strlen(filename), status); ffghdn(fptr, &hdunum); sprintf(filename+strlen(filename),"[%d]", hdunum-1); /* ffprec(newptr, filename, status); */ /* the use of ffread routine, below, requires that any 'dirty' */ /* buffers in memory be flushed back to the file first */ ffflsh(fptr, FALSE, status); /* move to the first byte of the input image */ ffmbyt(fptr, imgstart, TRUE, status); ntodo = minvalue(30000L, nbytes); ffgbyt(fptr, ntodo, buffer, status); /* read input image */ ffptbb(newptr, rownum, firstbyte, ntodo, buffer, status); /* write to table */ nbytes -= ntodo; firstbyte += ntodo; /* read any additional bytes with low-level ffread routine, for speed */ while (nbytes && (*status <= 0) ) { ntodo = minvalue(30000L, nbytes); ffread(fptr->Fptr, (long) ntodo, buffer, status); ffptbb(newptr, rownum, firstbyte, ntodo, buffer, status); nbytes -= ntodo; firstbyte += ntodo; } /* Re-scan the header so that CFITSIO knows about all the new keywords */ ffrdef(newptr,status); return(*status); } /*--------------------------------------------------------------------------*/ int fits_select_image_section( fitsfile **fptr, /* IO - pointer to input image; on output it */ /* points to the new subimage */ char *outfile, /* I - name for output file */ char *expr, /* I - Image section expression */ int *status) { /* copies an image section from the input file to a new output file. Any HDUs preceding or following the image are also copied to the output file. */ fitsfile *newptr; int ii, hdunum; /* create new empty file to hold the image section */ if (ffinit(&newptr, outfile, status) > 0) { ffpmsg( "failed to create output file for image section:"); ffpmsg(outfile); return(*status); } fits_get_hdu_num(*fptr, &hdunum); /* current HDU number in input file */ /* copy all preceding extensions to the output file, if 'only_one' flag not set */ if (!(((*fptr)->Fptr)->only_one)) { for (ii = 1; ii < hdunum; ii++) { fits_movabs_hdu(*fptr, ii, NULL, status); if (fits_copy_hdu(*fptr, newptr, 0, status) > 0) { ffclos(newptr, status); return(*status); } } /* move back to the original HDU position */ fits_movabs_hdu(*fptr, hdunum, NULL, status); } if (fits_copy_image_section(*fptr, newptr, expr, status) > 0) { ffclos(newptr, status); return(*status); } /* copy any remaining HDUs to the output file, if 'only_one' flag not set */ if (!(((*fptr)->Fptr)->only_one)) { for (ii = hdunum + 1; 1; ii++) { if (fits_movabs_hdu(*fptr, ii, NULL, status) > 0) break; fits_copy_hdu(*fptr, newptr, 0, status); } if (*status == END_OF_FILE) *status = 0; /* got the expected EOF error; reset = 0 */ else if (*status > 0) { ffclos(newptr, status); return(*status); } } else { ii = hdunum + 1; /* this value of ii is required below */ } /* close the original file and return ptr to the new image */ ffclos(*fptr, status); *fptr = newptr; /* reset the pointer to the new table */ /* move back to the image subsection */ if (ii - 1 != hdunum) fits_movabs_hdu(*fptr, hdunum, NULL, status); else { /* may have to reset BSCALE and BZERO pixel scaling, */ /* since the keywords were previously turned off */ if (ffrdef(*fptr, status) > 0) { ffclos(*fptr, status); return(*status); } } return(*status); } /*--------------------------------------------------------------------------*/ int fits_copy_image_section( fitsfile *fptr, /* I - pointer to input image */ fitsfile *newptr, /* I - pointer to output image */ char *expr, /* I - Image section expression */ int *status) { /* copies an image section from the input file to a new output HDU */ int bitpix, naxis, numkeys, nkey; long naxes[] = {1,1,1,1,1,1,1,1,1}, smin, smax, sinc; long fpixels[] = {1,1,1,1,1,1,1,1,1}; long lpixels[] = {1,1,1,1,1,1,1,1,1}; long incs[] = {1,1,1,1,1,1,1,1,1}; char *cptr, keyname[FLEN_KEYWORD], card[FLEN_CARD]; int ii, tstatus, anynull; long minrow, maxrow, minslice, maxslice, mincube, maxcube; long firstpix; long ncubeiter, nsliceiter, nrowiter, kiter, jiter, iiter; int klen, kk, jj; long outnaxes[9], outsize, buffsize; double *buffer, crpix, cdelt; if (*status > 0) return(*status); /* get the size of the input image */ fits_get_img_type(fptr, &bitpix, status); fits_get_img_dim(fptr, &naxis, status); if (fits_get_img_size(fptr, naxis, naxes, status) > 0) return(*status); if (naxis < 1 || naxis > 4) { ffpmsg( "Input image either had NAXIS = 0 (NULL image) or has > 4 dimensions"); return(*status = BAD_NAXIS); } /* create output image with same size and type as the input image */ /* Will update the size later */ fits_create_img(newptr, bitpix, naxis, naxes, status); /* copy all other non-structural keywords from the input to output file */ fits_get_hdrspace(fptr, &numkeys, NULL, status); for (nkey = 4; nkey <= numkeys; nkey++) /* skip the first few keywords */ { fits_read_record(fptr, nkey, card, status); if (fits_get_keyclass(card) > TYP_CMPRS_KEY) { /* write the record to the output file */ fits_write_record(newptr, card, status); } } if (*status > 0) { ffpmsg("error copying header from input image to output image"); return(*status); } /* parse the section specifier to get min, max, and inc for each axis */ /* and the size of each output image axis */ cptr = expr; for (ii=0; ii < naxis; ii++) { if (fits_get_section_range(&cptr, &smin, &smax, &sinc, status) > 0) { ffpmsg("error parsing the following image section specifier:"); ffpmsg(expr); return(*status); } if (smax == 0) smax = naxes[ii]; /* use whole axis by default */ else if (smin == 0) smin = naxes[ii]; /* use inverted whole axis */ if (smin > naxes[ii] || smax > naxes[ii]) { ffpmsg("image section exceeds dimensions of input image:"); ffpmsg(expr); return(*status = BAD_NAXIS); } fpixels[ii] = smin; lpixels[ii] = smax; incs[ii] = sinc; if (smin <= smax) outnaxes[ii] = (smax - smin + sinc) / sinc; else outnaxes[ii] = (smin - smax + sinc) / sinc; /* modify the NAXISn keyword */ fits_make_keyn("NAXIS", ii + 1, keyname, status); fits_modify_key_lng(newptr, keyname, outnaxes[ii], NULL, status); /* modify the WCS keywords if necessary */ if (fpixels[ii] != 1 || incs[ii] != 1) { for (kk=-1;kk<26; kk++) /* modify any alternate WCS keywords */ { /* read the CRPIXn keyword if it exists in the input file */ fits_make_keyn("CRPIX", ii + 1, keyname, status); if (kk != -1) { klen = strlen(keyname); keyname[klen]='A' + kk; keyname[klen + 1] = '\0'; } tstatus = 0; if (fits_read_key(fptr, TDOUBLE, keyname, &crpix, NULL, &tstatus) == 0) { /* calculate the new CRPIXn value */ if (fpixels[ii] <= lpixels[ii]) { crpix = (crpix - (fpixels[ii])) / incs[ii] + 1.0; /* crpix = (crpix - (fpixels[ii] - 1.0) - .5) / incs[ii] + 0.5; */ } else { crpix = (fpixels[ii] - crpix) / incs[ii] + 1.0; /* crpix = (fpixels[ii] - (crpix - 1.0) - .5) / incs[ii] + 0.5; */ } /* modify the value in the output file */ fits_modify_key_dbl(newptr, keyname, crpix, 15, NULL, status); if (incs[ii] != 1 || fpixels[ii] > lpixels[ii]) { /* read the CDELTn keyword if it exists in the input file */ fits_make_keyn("CDELT", ii + 1, keyname, status); if (kk != -1) { klen = strlen(keyname); keyname[klen]='A' + kk; keyname[klen + 1] = '\0'; } tstatus = 0; if (fits_read_key(fptr, TDOUBLE, keyname, &cdelt, NULL, &tstatus) == 0) { /* calculate the new CDELTn value */ if (fpixels[ii] <= lpixels[ii]) cdelt = cdelt * incs[ii]; else cdelt = cdelt * (-incs[ii]); /* modify the value in the output file */ fits_modify_key_dbl(newptr, keyname, cdelt, 15, NULL, status); } /* modify the CDi_j keywords if they exist in the input file */ fits_make_keyn("CD1_", ii + 1, keyname, status); if (kk != -1) { klen = strlen(keyname); keyname[klen]='A' + kk; keyname[klen + 1] = '\0'; } for (jj=0; jj < 9; jj++) /* look for up to 9 dimensions */ { keyname[2] = '1' + jj; tstatus = 0; if (fits_read_key(fptr, TDOUBLE, keyname, &cdelt, NULL, &tstatus) == 0) { /* calculate the new CDi_j value */ if (fpixels[ii] <= lpixels[ii]) cdelt = cdelt * incs[ii]; else cdelt = cdelt * (-incs[ii]); /* modify the value in the output file */ fits_modify_key_dbl(newptr, keyname, cdelt, 15, NULL, status); } } } /* end of if (incs[ii]... loop */ } /* end of fits_read_key loop */ } /* end of for (kk loop */ } } /* end of main NAXIS loop */ if (ffrdef(newptr, status) > 0) /* force the header to be scanned */ { return(*status); } /* turn off any scaling of the pixel values */ fits_set_bscale(fptr, 1.0, 0.0, status); fits_set_bscale(newptr, 1.0, 0.0, status); /* to reduce memory foot print, just read/write image 1 row at a time */ outsize = outnaxes[0]; buffsize = (abs(bitpix) / 8) * outsize; buffer = (double *) malloc(buffsize); /* allocate memory for the image row */ if (!buffer) { ffpmsg("fits_copy_image_section: no memory for image section"); return(*status = MEMORY_ALLOCATION); } /* read the image section then write it to the output file */ minrow = fpixels[1]; maxrow = lpixels[1]; if (minrow > maxrow) { nrowiter = (minrow - maxrow + incs[1]) / incs[1]; } else { nrowiter = (maxrow - minrow + incs[1]) / incs[1]; } minslice = fpixels[2]; maxslice = lpixels[2]; if (minslice > maxslice) { nsliceiter = (minslice - maxslice + incs[2]) / incs[2]; } else { nsliceiter = (maxslice - minslice + incs[2]) / incs[2]; } mincube = fpixels[3]; maxcube = lpixels[3]; if (mincube > maxcube) { ncubeiter = (mincube - maxcube + incs[3]) / incs[3]; } else { ncubeiter = (maxcube - mincube + incs[3]) / incs[3]; } firstpix = 1; for (kiter = 0; kiter < ncubeiter; kiter++) { if (mincube > maxcube) { fpixels[3] = mincube - (kiter * incs[3]); } else { fpixels[3] = mincube + (kiter * incs[3]); } lpixels[3] = fpixels[3]; for (jiter = 0; jiter < nsliceiter; jiter++) { if (minslice > maxslice) { fpixels[2] = minslice - (jiter * incs[2]); } else { fpixels[2] = minslice + (jiter * incs[2]); } lpixels[2] = fpixels[2]; for (iiter = 0; iiter < nrowiter; iiter++) { if (minrow > maxrow) { fpixels[1] = minrow - (iiter * incs[1]); } else { fpixels[1] = minrow + (iiter * incs[1]); } lpixels[1] = fpixels[1]; if (bitpix == 8) { ffgsvb(fptr, 1, naxis, naxes, fpixels, lpixels, incs, 0, (unsigned char *) buffer, &anynull, status); ffpprb(newptr, 1, firstpix, outsize, (unsigned char *) buffer, status); } else if (bitpix == 16) { ffgsvi(fptr, 1, naxis, naxes, fpixels, lpixels, incs, 0, (short *) buffer, &anynull, status); ffppri(newptr, 1, firstpix, outsize, (short *) buffer, status); } else if (bitpix == 32) { ffgsvk(fptr, 1, naxis, naxes, fpixels, lpixels, incs, 0, (int *) buffer, &anynull, status); ffpprk(newptr, 1, firstpix, outsize, (int *) buffer, status); } else if (bitpix == -32) { ffgsve(fptr, 1, naxis, naxes, fpixels, lpixels, incs, FLOATNULLVALUE, (float *) buffer, &anynull, status); ffppne(newptr, 1, firstpix, outsize, (float *) buffer, FLOATNULLVALUE, status); } else if (bitpix == -64) { ffgsvd(fptr, 1, naxis, naxes, fpixels, lpixels, incs, DOUBLENULLVALUE, buffer, &anynull, status); ffppnd(newptr, 1, firstpix, outsize, buffer, DOUBLENULLVALUE, status); } else if (bitpix == 64) { ffgsvjj(fptr, 1, naxis, naxes, fpixels, lpixels, incs, 0, (LONGLONG *) buffer, &anynull, status); ffpprjj(newptr, 1, firstpix, outsize, (LONGLONG *) buffer, status); } firstpix += outsize; } } } free(buffer); /* finished with the memory */ if (*status > 0) { ffpmsg("fits_copy_image_section: error copying image section"); return(*status); } return(*status); } /*--------------------------------------------------------------------------*/ int fits_get_section_range(char **ptr, long *secmin, long *secmax, long *incre, int *status) /* Parse the input image section specification string, returning the min, max and increment values. Typical string = "1:512:2" or "1:512" */ { int slen, isanumber; char token[FLEN_VALUE]; if (*status > 0) return(*status); slen = fits_get_token(ptr, " ,:", token, &isanumber); /* get 1st token */ /* support [:2,:2] type syntax, where the leading * is implied */ if (slen==0) strcpy(token,"*"); if (*token == '*') /* wild card means to use the whole range */ { *secmin = 1; *secmax = 0; } else if (*token == '-' && *(token+1) == '*' ) /* invert the whole range */ { *secmin = 0; *secmax = 1; } else { if (slen == 0 || !isanumber || **ptr != ':') return(*status = URL_PARSE_ERROR); /* the token contains the min value */ *secmin = atol(token); (*ptr)++; /* skip the colon between the min and max values */ slen = fits_get_token(ptr, " ,:", token, &isanumber); /* get token */ if (slen == 0 || !isanumber) return(*status = URL_PARSE_ERROR); /* the token contains the max value */ *secmax = atol(token); } if (**ptr == ':') { (*ptr)++; /* skip the colon between the max and incre values */ slen = fits_get_token(ptr, " ,", token, &isanumber); /* get token */ if (slen == 0 || !isanumber) return(*status = URL_PARSE_ERROR); *incre = atol(token); } else *incre = 1; /* default increment if none is supplied */ if (**ptr == ',') (*ptr)++; while (**ptr == ' ') /* skip any trailing blanks */ (*ptr)++; if (*secmin < 0 || *secmax < 0 || *incre < 1) *status = URL_PARSE_ERROR; return(*status); } /*--------------------------------------------------------------------------*/ int ffselect_table( fitsfile **fptr, /* IO - pointer to input table; on output it */ /* points to the new selected rows table */ char *outfile, /* I - name for output file */ char *expr, /* I - Boolean expression */ int *status) { fitsfile *newptr; int ii, hdunum; if (*outfile) { /* create new empty file in to hold the selected rows */ if (ffinit(&newptr, outfile, status) > 0) { ffpmsg( "failed to create file for selected rows from input table"); ffpmsg(outfile); return(*status); } fits_get_hdu_num(*fptr, &hdunum); /* current HDU number in input file */ /* copy all preceding extensions to the output file, if the 'only_one' flag is not set */ if (!((*fptr)->Fptr)->only_one) { for (ii = 1; ii < hdunum; ii++) { fits_movabs_hdu(*fptr, ii, NULL, status); if (fits_copy_hdu(*fptr, newptr, 0, status) > 0) { ffclos(newptr, status); return(*status); } } } else { /* just copy the primary array */ fits_movabs_hdu(*fptr, 1, NULL, status); if (fits_copy_hdu(*fptr, newptr, 0, status) > 0) { ffclos(newptr, status); return(*status); } } fits_movabs_hdu(*fptr, hdunum, NULL, status); /* copy all the header keywords from the input to output file */ if (fits_copy_header(*fptr, newptr, status) > 0) { ffclos(newptr, status); return(*status); } /* set number of rows = 0 */ fits_modify_key_lng(newptr, "NAXIS2", 0, NULL,status); (newptr->Fptr)->numrows = 0; (newptr->Fptr)->origrows = 0; if (ffrdef(newptr, status) > 0) /* force the header to be scanned */ { ffclos(newptr, status); return(*status); } } else newptr = *fptr; /* will delete rows in place in the table */ /* copy rows which satisfy the selection expression to the output table */ /* or delete the nonqualifying rows if *fptr = newptr. */ if (fits_select_rows(*fptr, newptr, expr, status) > 0) { if (*outfile) ffclos(newptr, status); return(*status); } if (*outfile) { /* copy any remaining HDUs to the output copy */ if (!((*fptr)->Fptr)->only_one) { for (ii = hdunum + 1; 1; ii++) { if (fits_movabs_hdu(*fptr, ii, NULL, status) > 0) break; fits_copy_hdu(*fptr, newptr, 0, status); } if (*status == END_OF_FILE) *status = 0; /* got the expected EOF error; reset = 0 */ else if (*status > 0) { ffclos(newptr, status); return(*status); } } else { hdunum = 2; } /* close the original file and return ptr to the new image */ ffclos(*fptr, status); *fptr = newptr; /* reset the pointer to the new table */ /* move back to the selected table HDU */ fits_movabs_hdu(*fptr, hdunum, NULL, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffparsecompspec(fitsfile *fptr, /* I - FITS file pointer */ char *compspec, /* I - image compression specification */ int *status) /* IO - error status */ /* Parse the image compression specification that was give in square brackets following the output FITS file name, as in these examples: myfile.fits[compress] - default Rice compression, row by row myfile.fits[compress TYPE] - the first letter of TYPE defines the compression algorithm: R = Rice G = GZIP H = HCOMPRESS HS = HCOMPRESS (with smoothing) B - BZIP2 P = PLIO myfile.fits[compress TYPE 100,100] - the numbers give the dimensions of the compression tiles. Default is NAXIS1, 1, 1, ... other optional parameters may be specified following a semi-colon myfile.fits[compress; q 8.0] q specifies the floating point mufile.fits[compress TYPE; q -.0002] quantization level; myfile.fits[compress TYPE 100,100; q 10, s 25] s specifies the HCOMPRESS integer scaling parameter The compression parameters are saved in the fptr->Fptr structure for use when writing FITS images. */ { char *ptr1; /* initialize with default values */ int ii, compresstype = RICE_1, smooth = 0; int quantize_method = SUBTRACTIVE_DITHER_1; long tilesize[MAX_COMPRESS_DIM] = {0,0,0,0,0,0}; float qlevel = -99., scale = 0.; ptr1 = compspec; while (*ptr1 == ' ') /* ignore leading blanks */ ptr1++; if (strncmp(ptr1, "compress", 8) && strncmp(ptr1, "COMPRESS", 8) ) { /* apparently this string does not specify compression parameters */ return(*status = URL_PARSE_ERROR); } ptr1 += 8; while (*ptr1 == ' ') /* ignore leading blanks */ ptr1++; /* ========================= */ /* look for compression type */ /* ========================= */ if (*ptr1 == 'r' || *ptr1 == 'R') { compresstype = RICE_1; while (*ptr1 != ' ' && *ptr1 != ';' && *ptr1 != '\0') ptr1++; } else if (*ptr1 == 'g' || *ptr1 == 'G') { compresstype = GZIP_1; while (*ptr1 != ' ' && *ptr1 != ';' && *ptr1 != '\0') ptr1++; } /* else if (*ptr1 == 'b' || *ptr1 == 'B') { compresstype = BZIP2_1; while (*ptr1 != ' ' && *ptr1 != ';' && *ptr1 != '\0') ptr1++; } */ else if (*ptr1 == 'p' || *ptr1 == 'P') { compresstype = PLIO_1; while (*ptr1 != ' ' && *ptr1 != ';' && *ptr1 != '\0') ptr1++; } else if (*ptr1 == 'h' || *ptr1 == 'H') { compresstype = HCOMPRESS_1; ptr1++; if (*ptr1 == 's' || *ptr1 == 'S') smooth = 1; /* apply smoothing when uncompressing HCOMPRESSed image */ while (*ptr1 != ' ' && *ptr1 != ';' && *ptr1 != '\0') ptr1++; } /* ======================== */ /* look for tile dimensions */ /* ======================== */ while (*ptr1 == ' ') /* ignore leading blanks */ ptr1++; ii = 0; while (isdigit( (int) *ptr1) && ii < 9) { tilesize[ii] = atol(ptr1); /* read the integer value */ ii++; while (isdigit((int) *ptr1)) /* skip over the integer */ ptr1++; if (*ptr1 == ',') ptr1++; /* skip over the comma */ while (*ptr1 == ' ') /* ignore leading blanks */ ptr1++; } /* ========================================================= */ /* look for semi-colon, followed by other optional parameters */ /* ========================================================= */ if (*ptr1 == ';') { ptr1++; while (*ptr1 == ' ') /* ignore leading blanks */ ptr1++; while (*ptr1 != 0) { /* haven't reached end of string yet */ if (*ptr1 == 's' || *ptr1 == 'S') { /* this should be the HCOMPRESS "scale" parameter; default = 1 */ ptr1++; while (*ptr1 == ' ') /* ignore leading blanks */ ptr1++; scale = (float) strtod(ptr1, &ptr1); while (*ptr1 == ' ' || *ptr1 == ',') /* skip over blanks or comma */ ptr1++; } else if (*ptr1 == 'q' || *ptr1 == 'Q') { /* this should be the floating point quantization parameter */ ptr1++; if (*ptr1 == 'z' || *ptr1 == 'Z') { /* use the subtractive_dither_2 option */ quantize_method = SUBTRACTIVE_DITHER_2; ptr1++; } else if (*ptr1 == '0') { /* do not dither */ quantize_method = NO_DITHER; ptr1++; } while (*ptr1 == ' ') /* ignore leading blanks */ ptr1++; qlevel = (float) strtod(ptr1, &ptr1); while (*ptr1 == ' ' || *ptr1 == ',') /* skip over blanks or comma */ ptr1++; } else { return(*status = URL_PARSE_ERROR); } } } /* ================================= */ /* finished parsing; save the values */ /* ================================= */ fits_set_compression_type(fptr, compresstype, status); fits_set_tile_dim(fptr, MAX_COMPRESS_DIM, tilesize, status); if (compresstype == HCOMPRESS_1) { fits_set_hcomp_scale (fptr, scale, status); fits_set_hcomp_smooth(fptr, smooth, status); } if (qlevel != -99.) { fits_set_quantize_level(fptr, qlevel, status); fits_set_quantize_method(fptr, quantize_method, status); } return(*status); } /*--------------------------------------------------------------------------*/ int ffdkinit(fitsfile **fptr, /* O - FITS file pointer */ const char *name, /* I - name of file to create */ int *status) /* IO - error status */ /* Create and initialize a new FITS file on disk. This routine differs from ffinit in that the input 'name' is literally taken as the name of the disk file to be created, and it does not support CFITSIO's extended filename syntax. */ { if (*status > 0) return(*status); *status = CREATE_DISK_FILE; ffinit(fptr, name,status); return(*status); } /*--------------------------------------------------------------------------*/ int ffinit(fitsfile **fptr, /* O - FITS file pointer */ const char *name, /* I - name of file to create */ int *status) /* IO - error status */ /* Create and initialize a new FITS file. */ { int ii, driver, slen, clobber = 0; char *url; char urltype[MAX_PREFIX_LEN], outfile[FLEN_FILENAME]; char tmplfile[FLEN_FILENAME], compspec[80]; int handle, create_disk_file = 0; if (*status > 0) return(*status); if (*status == CREATE_DISK_FILE) { create_disk_file = 1; *status = 0; } *fptr = 0; /* initialize null file pointer */ if (need_to_initialize) { /* this is called only once */ *status = fits_init_cfitsio(); } if (*status > 0) return(*status); url = (char *) name; while (*url == ' ') /* ignore leading spaces in the filename */ url++; if (*url == '\0') { ffpmsg("Name of file to create is blank. (ffinit)"); return(*status = FILE_NOT_CREATED); } if (create_disk_file) { if (strlen(url) > FLEN_FILENAME - 1) { ffpmsg("Filename is too long. (ffinit)"); return(*status = FILE_NOT_CREATED); } strcpy(outfile, url); strcpy(urltype, "file://"); tmplfile[0] = '\0'; compspec[0] = '\0'; } else { /* check for clobber symbol, i.e, overwrite existing file */ if (*url == '!') { clobber = TRUE; url++; } else clobber = FALSE; /* parse the output file specification */ /* this routine checks that the strings will not overflow */ ffourl(url, urltype, outfile, tmplfile, compspec, status); if (*status > 0) { ffpmsg("could not parse the output filename: (ffinit)"); ffpmsg(url); return(*status); } } /* find which driver corresponds to the urltype */ *status = urltype2driver(urltype, &driver); if (*status) { ffpmsg("could not find driver for this file: (ffinit)"); ffpmsg(url); return(*status); } /* delete pre-existing file, if asked to do so */ if (clobber) { if (driverTable[driver].remove) (*driverTable[driver].remove)(outfile); } /* call appropriate driver to create the file */ if (driverTable[driver].create) { FFLOCK; /* lock this while searching for vacant handle */ *status = (*driverTable[driver].create)(outfile, &handle); FFUNLOCK; if (*status) { ffpmsg("failed to create new file (already exists?):"); ffpmsg(url); return(*status); } } else { ffpmsg("cannot create a new file of this type: (ffinit)"); ffpmsg(url); return(*status = FILE_NOT_CREATED); } /* allocate fitsfile structure and initialize = 0 */ *fptr = (fitsfile *) calloc(1, sizeof(fitsfile)); if (!(*fptr)) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate structure for following file: (ffopen)"); ffpmsg(url); return(*status = MEMORY_ALLOCATION); } /* allocate FITSfile structure and initialize = 0 */ (*fptr)->Fptr = (FITSfile *) calloc(1, sizeof(FITSfile)); if (!((*fptr)->Fptr)) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate structure for following file: (ffopen)"); ffpmsg(url); free(*fptr); *fptr = 0; return(*status = MEMORY_ALLOCATION); } slen = strlen(url) + 1; slen = maxvalue(slen, 32); /* reserve at least 32 chars */ ((*fptr)->Fptr)->filename = (char *) malloc(slen); /* mem for file name */ if ( !(((*fptr)->Fptr)->filename) ) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate memory for filename: (ffinit)"); ffpmsg(url); free((*fptr)->Fptr); free(*fptr); *fptr = 0; /* return null file pointer */ return(*status = FILE_NOT_CREATED); } /* mem for headstart array */ ((*fptr)->Fptr)->headstart = (LONGLONG *) calloc(1001, sizeof(LONGLONG)); if ( !(((*fptr)->Fptr)->headstart) ) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate memory for headstart array: (ffinit)"); ffpmsg(url); free( ((*fptr)->Fptr)->filename); free((*fptr)->Fptr); free(*fptr); *fptr = 0; /* return null file pointer */ return(*status = MEMORY_ALLOCATION); } /* mem for file I/O buffers */ ((*fptr)->Fptr)->iobuffer = (char *) calloc(NIOBUF, IOBUFLEN); if ( !(((*fptr)->Fptr)->iobuffer) ) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate memory for iobuffer array: (ffinit)"); ffpmsg(url); free( ((*fptr)->Fptr)->headstart); /* free memory for headstart array */ free( ((*fptr)->Fptr)->filename); free((*fptr)->Fptr); free(*fptr); *fptr = 0; /* return null file pointer */ return(*status = MEMORY_ALLOCATION); } /* initialize the ageindex array (relative age of the I/O buffers) */ /* and initialize the bufrecnum array as being empty */ for (ii = 0; ii < NIOBUF; ii++) { ((*fptr)->Fptr)->ageindex[ii] = ii; ((*fptr)->Fptr)->bufrecnum[ii] = -1; } /* store the parameters describing the file */ ((*fptr)->Fptr)->MAXHDU = 1000; /* initial size of headstart */ ((*fptr)->Fptr)->filehandle = handle; /* store the file pointer */ ((*fptr)->Fptr)->driver = driver; /* driver number */ strcpy(((*fptr)->Fptr)->filename, url); /* full input filename */ ((*fptr)->Fptr)->filesize = 0; /* physical file size */ ((*fptr)->Fptr)->logfilesize = 0; /* logical file size */ ((*fptr)->Fptr)->writemode = 1; /* read-write mode */ ((*fptr)->Fptr)->datastart = DATA_UNDEFINED; /* unknown start of data */ ((*fptr)->Fptr)->curbuf = -1; /* undefined current IO buffer */ ((*fptr)->Fptr)->open_count = 1; /* structure is currently used once */ ((*fptr)->Fptr)->validcode = VALIDSTRUC; /* flag denoting valid structure */ ffldrc(*fptr, 0, IGNORE_EOF, status); /* initialize first record */ fits_store_Fptr( (*fptr)->Fptr, status); /* store Fptr address */ /* if template file was given, use it to define structure of new file */ if (tmplfile[0]) ffoptplt(*fptr, tmplfile, status); /* parse and save image compression specification, if given */ if (compspec[0]) ffparsecompspec(*fptr, compspec, status); return(*status); /* successful return */ } /*--------------------------------------------------------------------------*/ /* ffimem == fits_create_memfile */ int ffimem(fitsfile **fptr, /* O - FITS file pointer */ void **buffptr, /* I - address of memory pointer */ size_t *buffsize, /* I - size of buffer, in bytes */ size_t deltasize, /* I - increment for future realloc's */ void *(*mem_realloc)(void *p, size_t newsize), /* function */ int *status) /* IO - error status */ /* Create and initialize a new FITS file in memory */ { int ii, driver, slen; char urltype[MAX_PREFIX_LEN]; int handle; if (*status > 0) return(*status); *fptr = 0; /* initialize null file pointer */ if (need_to_initialize) { /* this is called only once */ *status = fits_init_cfitsio(); } if (*status > 0) return(*status); strcpy(urltype, "memkeep://"); /* URL type for pre-existing memory file */ *status = urltype2driver(urltype, &driver); if (*status > 0) { ffpmsg("could not find driver for pre-existing memory file: (ffimem)"); return(*status); } /* call driver routine to "open" the memory file */ FFLOCK; /* lock this while searching for vacant handle */ *status = mem_openmem( buffptr, buffsize, deltasize, mem_realloc, &handle); FFUNLOCK; if (*status > 0) { ffpmsg("failed to open pre-existing memory file: (ffimem)"); return(*status); } /* allocate fitsfile structure and initialize = 0 */ *fptr = (fitsfile *) calloc(1, sizeof(fitsfile)); if (!(*fptr)) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate structure for memory file: (ffimem)"); return(*status = MEMORY_ALLOCATION); } /* allocate FITSfile structure and initialize = 0 */ (*fptr)->Fptr = (FITSfile *) calloc(1, sizeof(FITSfile)); if (!((*fptr)->Fptr)) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate structure for memory file: (ffimem)"); free(*fptr); *fptr = 0; return(*status = MEMORY_ALLOCATION); } slen = 32; /* reserve at least 32 chars */ ((*fptr)->Fptr)->filename = (char *) malloc(slen); /* mem for file name */ if ( !(((*fptr)->Fptr)->filename) ) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate memory for filename: (ffimem)"); free((*fptr)->Fptr); free(*fptr); *fptr = 0; /* return null file pointer */ return(*status = MEMORY_ALLOCATION); } /* mem for headstart array */ ((*fptr)->Fptr)->headstart = (LONGLONG *) calloc(1001, sizeof(LONGLONG)); if ( !(((*fptr)->Fptr)->headstart) ) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate memory for headstart array: (ffimem)"); free( ((*fptr)->Fptr)->filename); free((*fptr)->Fptr); free(*fptr); *fptr = 0; /* return null file pointer */ return(*status = MEMORY_ALLOCATION); } /* mem for file I/O buffers */ ((*fptr)->Fptr)->iobuffer = (char *) calloc(NIOBUF, IOBUFLEN); if ( !(((*fptr)->Fptr)->iobuffer) ) { (*driverTable[driver].close)(handle); /* close the file */ ffpmsg("failed to allocate memory for iobuffer array: (ffimem)"); free( ((*fptr)->Fptr)->headstart); /* free memory for headstart array */ free( ((*fptr)->Fptr)->filename); free((*fptr)->Fptr); free(*fptr); *fptr = 0; /* return null file pointer */ return(*status = MEMORY_ALLOCATION); } /* initialize the ageindex array (relative age of the I/O buffers) */ /* and initialize the bufrecnum array as being empty */ for (ii = 0; ii < NIOBUF; ii++) { ((*fptr)->Fptr)->ageindex[ii] = ii; ((*fptr)->Fptr)->bufrecnum[ii] = -1; } /* store the parameters describing the file */ ((*fptr)->Fptr)->MAXHDU = 1000; /* initial size of headstart */ ((*fptr)->Fptr)->filehandle = handle; /* file handle */ ((*fptr)->Fptr)->driver = driver; /* driver number */ strcpy(((*fptr)->Fptr)->filename, "memfile"); /* dummy filename */ ((*fptr)->Fptr)->filesize = *buffsize; /* physical file size */ ((*fptr)->Fptr)->logfilesize = *buffsize; /* logical file size */ ((*fptr)->Fptr)->writemode = 1; /* read-write mode */ ((*fptr)->Fptr)->datastart = DATA_UNDEFINED; /* unknown start of data */ ((*fptr)->Fptr)->curbuf = -1; /* undefined current IO buffer */ ((*fptr)->Fptr)->open_count = 1; /* structure is currently used once */ ((*fptr)->Fptr)->validcode = VALIDSTRUC; /* flag denoting valid structure */ ffldrc(*fptr, 0, IGNORE_EOF, status); /* initialize first record */ fits_store_Fptr( (*fptr)->Fptr, status); /* store Fptr address */ return(*status); } /*--------------------------------------------------------------------------*/ int fits_init_cfitsio(void) /* initialize anything that is required before using the CFITSIO routines */ { int status; union u_tag { short ival; char cval[2]; } u; fitsio_init_lock(); FFLOCK; /* lockout other threads while executing this critical */ /* section of code */ if (need_to_initialize == 0) { /* already initialized? */ FFUNLOCK; return(0); } /* test for correct byteswapping. */ u.ival = 1; if ((BYTESWAPPED && u.cval[0] != 1) || (BYTESWAPPED == FALSE && u.cval[1] != 1) ) { printf ("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); printf(" Byteswapping is not being done correctly on this system.\n"); printf(" Check the MACHINE and BYTESWAPPED definitions in fitsio2.h\n"); printf(" Please report this problem to the CFITSIO developers.\n"); printf( "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); FFUNLOCK; return(1); } /* test that LONGLONG is an 8 byte integer */ if (sizeof(LONGLONG) != 8) { printf ("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); printf(" CFITSIO did not find an 8-byte long integer data type.\n"); printf(" sizeof(LONGLONG) = %d\n",(int)sizeof(LONGLONG)); printf(" Please report this problem to the CFITSIO developers.\n"); printf( "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); FFUNLOCK; return(1); } /* register the standard I/O drivers that are always available */ /* 1--------------------disk file driver-----------------------*/ status = fits_register_driver("file://", file_init, file_shutdown, file_setoptions, file_getoptions, file_getversion, file_checkfile, file_open, file_create, #ifdef HAVE_FTRUNCATE file_truncate, #else NULL, /* no file truncate function */ #endif file_close, file_remove, file_size, file_flush, file_seek, file_read, file_write); if (status) { ffpmsg("failed to register the file:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 2------------ output temporary memory file driver ----------------*/ status = fits_register_driver("mem://", mem_init, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, NULL, /* checkfile not needed */ NULL, /* open function not allowed */ mem_create, mem_truncate, mem_close_free, NULL, /* remove function not required */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the mem:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 3--------------input pre-existing memory file driver----------------*/ status = fits_register_driver("memkeep://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, NULL, /* checkfile not needed */ NULL, /* file open driver function is not used */ NULL, /* create function not allowed */ mem_truncate, mem_close_keep, NULL, /* remove function not required */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the memkeep:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 4-------------------stdin stream driver----------------------*/ /* the stdin stream is copied to memory then opened in memory */ status = fits_register_driver("stdin://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, stdin_checkfile, stdin_open, NULL, /* create function not allowed */ mem_truncate, mem_close_free, NULL, /* remove function not required */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the stdin:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 5-------------------stdin file stream driver----------------------*/ /* the stdin stream is copied to a disk file then the disk file is opened */ status = fits_register_driver("stdinfile://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, NULL, /* checkfile not needed */ stdin_open, NULL, /* create function not allowed */ #ifdef HAVE_FTRUNCATE file_truncate, #else NULL, /* no file truncate function */ #endif file_close, file_remove, file_size, file_flush, file_seek, file_read, file_write); if (status) { ffpmsg("failed to register the stdinfile:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 6-----------------------stdout stream driver------------------*/ status = fits_register_driver("stdout://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, NULL, /* checkfile not needed */ NULL, /* open function not required */ mem_create, mem_truncate, stdout_close, NULL, /* remove function not required */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the stdout:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 7------------------iraf disk file to memory driver -----------*/ status = fits_register_driver("irafmem://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, NULL, /* checkfile not needed */ mem_iraf_open, NULL, /* create function not required */ mem_truncate, mem_close_free, NULL, /* remove function not required */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the irafmem:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 8------------------raw binary file to memory driver -----------*/ status = fits_register_driver("rawfile://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, NULL, /* checkfile not needed */ mem_rawfile_open, NULL, /* create function not required */ mem_truncate, mem_close_free, NULL, /* remove function not required */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the rawfile:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 9------------------compressed disk file to memory driver -----------*/ status = fits_register_driver("compress://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, NULL, /* checkfile not needed */ mem_compress_open, NULL, /* create function not required */ mem_truncate, mem_close_free, NULL, /* remove function not required */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the compress:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 10------------------compressed disk file to memory driver -----------*/ /* Identical to compress://, except it allows READWRITE access */ status = fits_register_driver("compressmem://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, NULL, /* checkfile not needed */ mem_compress_openrw, NULL, /* create function not required */ mem_truncate, mem_close_free, NULL, /* remove function not required */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the compressmem:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 11------------------compressed disk file to disk file driver -------*/ status = fits_register_driver("compressfile://", NULL, file_shutdown, file_setoptions, file_getoptions, file_getversion, NULL, /* checkfile not needed */ file_compress_open, file_create, #ifdef HAVE_FTRUNCATE file_truncate, #else NULL, /* no file truncate function */ #endif file_close, file_remove, file_size, file_flush, file_seek, file_read, file_write); if (status) { ffpmsg("failed to register the compressfile:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 12---create file in memory, then compress it to disk file on close--*/ status = fits_register_driver("compressoutfile://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, NULL, /* checkfile not needed */ NULL, /* open function not allowed */ mem_create_comp, mem_truncate, mem_close_comp, file_remove, /* delete existing compressed disk file */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg( "failed to register the compressoutfile:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* Register Optional drivers */ #ifdef HAVE_NET_SERVICES /* 13--------------------root driver-----------------------*/ status = fits_register_driver("root://", root_init, root_shutdown, root_setoptions, root_getoptions, root_getversion, NULL, /* checkfile not needed */ root_open, root_create, NULL, /* No truncate possible */ root_close, NULL, /* No remove possible */ root_size, /* no size possible */ root_flush, root_seek, /* Though will always succeed */ root_read, root_write); if (status) { ffpmsg("failed to register the root:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 14--------------------http driver-----------------------*/ status = fits_register_driver("http://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, http_checkfile, http_open, NULL, /* create function not required */ mem_truncate, mem_close_free, NULL, /* remove function not required */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the http:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 15--------------------http file driver-----------------------*/ status = fits_register_driver("httpfile://", NULL, file_shutdown, file_setoptions, file_getoptions, file_getversion, NULL, /* checkfile not needed */ http_file_open, file_create, #ifdef HAVE_FTRUNCATE file_truncate, #else NULL, /* no file truncate function */ #endif file_close, file_remove, file_size, file_flush, file_seek, file_read, file_write); if (status) { ffpmsg("failed to register the httpfile:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 16--------------------http memory driver-----------------------*/ /* same as http:// driver, except memory file can be opened READWRITE */ status = fits_register_driver("httpmem://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, http_checkfile, http_file_open, /* this will simply call http_open */ NULL, /* create function not required */ mem_truncate, mem_close_free, NULL, /* remove function not required */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the httpmem:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 17--------------------httpcompress file driver-----------------------*/ status = fits_register_driver("httpcompress://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, NULL, /* checkfile not needed */ http_compress_open, NULL, /* create function not required */ mem_truncate, mem_close_free, NULL, /* remove function not required */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the httpcompress:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 18--------------------ftp driver-----------------------*/ status = fits_register_driver("ftp://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, ftp_checkfile, ftp_open, NULL, /* create function not required */ mem_truncate, mem_close_free, NULL, /* remove function not required */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the ftp:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 19--------------------ftp file driver-----------------------*/ status = fits_register_driver("ftpfile://", NULL, file_shutdown, file_setoptions, file_getoptions, file_getversion, NULL, /* checkfile not needed */ ftp_file_open, file_create, #ifdef HAVE_FTRUNCATE file_truncate, #else NULL, /* no file truncate function */ #endif file_close, file_remove, file_size, file_flush, file_seek, file_read, file_write); if (status) { ffpmsg("failed to register the ftpfile:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 20--------------------ftp mem driver-----------------------*/ /* same as ftp:// driver, except memory file can be opened READWRITE */ status = fits_register_driver("ftpmem://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, ftp_checkfile, ftp_file_open, /* this will simply call ftp_open */ NULL, /* create function not required */ mem_truncate, mem_close_free, NULL, /* remove function not required */ mem_size, NULL, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the ftpmem:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* 21--------------------ftp compressed file driver------------------*/ status = fits_register_driver("ftpcompress://", NULL, mem_shutdown, mem_setoptions, mem_getoptions, mem_getversion, NULL, /* checkfile not needed */ ftp_compress_open, 0, /* create function not required */ mem_truncate, mem_close_free, 0, /* remove function not required */ mem_size, 0, /* flush function not required */ mem_seek, mem_read, mem_write); if (status) { ffpmsg("failed to register the ftpcompress:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* === End of net drivers section === */ #endif /* ==================== SHARED MEMORY DRIVER SECTION ======================= */ #ifdef HAVE_SHMEM_SERVICES /* 22--------------------shared memory driver-----------------------*/ status = fits_register_driver("shmem://", smem_init, smem_shutdown, smem_setoptions, smem_getoptions, smem_getversion, NULL, /* checkfile not needed */ smem_open, smem_create, NULL, /* truncate file not supported yet */ smem_close, smem_remove, smem_size, smem_flush, smem_seek, smem_read, smem_write ); if (status) { ffpmsg("failed to register the shmem:// driver (init_cfitsio)"); FFUNLOCK; return(status); } #endif /* ==================== END OF SHARED MEMORY DRIVER SECTION ================ */ #ifdef HAVE_GSIFTP /* 23--------------------gsiftp driver-----------------------*/ status = fits_register_driver("gsiftp://", gsiftp_init, gsiftp_shutdown, gsiftp_setoptions, gsiftp_getoptions, gsiftp_getversion, gsiftp_checkfile, gsiftp_open, gsiftp_create, #ifdef HAVE_FTRUNCATE gsiftp_truncate, #else NULL, #endif gsiftp_close, NULL, /* remove function not yet implemented */ gsiftp_size, gsiftp_flush, gsiftp_seek, gsiftp_read, gsiftp_write); if (status) { ffpmsg("failed to register the gsiftp:// driver (init_cfitsio)"); FFUNLOCK; return(status); } #endif /* 24---------------stdin and stdout stream driver-------------------*/ status = fits_register_driver("stream://", NULL, NULL, NULL, NULL, NULL, NULL, stream_open, stream_create, NULL, /* no stream truncate function */ stream_close, NULL, /* no stream remove */ stream_size, stream_flush, stream_seek, stream_read, stream_write); if (status) { ffpmsg("failed to register the stream:// driver (init_cfitsio)"); FFUNLOCK; return(status); } /* reset flag. Any other threads will now not need to call this routine */ need_to_initialize = 0; FFUNLOCK; return(status); } /*--------------------------------------------------------------------------*/ int fits_register_driver(char *prefix, int (*init)(void), int (*shutdown)(void), int (*setoptions)(int option), int (*getoptions)(int *options), int (*getversion)(int *version), int (*checkfile) (char *urltype, char *infile, char *outfile), int (*open)(char *filename, int rwmode, int *driverhandle), int (*create)(char *filename, int *driverhandle), int (*truncate)(int driverhandle, LONGLONG filesize), int (*close)(int driverhandle), int (*fremove)(char *filename), int (*size)(int driverhandle, LONGLONG *size), int (*flush)(int driverhandle), int (*seek)(int driverhandle, LONGLONG offset), int (*read) (int driverhandle, void *buffer, long nbytes), int (*write)(int driverhandle, void *buffer, long nbytes) ) /* register all the functions needed to support an I/O driver */ { int status; if (no_of_drivers < 0 ) { /* This is bad. looks like memory has been corrupted. */ ffpmsg("Vital CFITSIO parameters held in memory have been corrupted!!"); ffpmsg("Fatal condition detected in fits_register_driver."); return(TOO_MANY_DRIVERS); } if (no_of_drivers + 1 > MAX_DRIVERS) return(TOO_MANY_DRIVERS); if (prefix == NULL) return(BAD_URL_PREFIX); if (init != NULL) { status = (*init)(); /* initialize the driver */ if (status) return(status); } /* fill in data in table */ strncpy(driverTable[no_of_drivers].prefix, prefix, MAX_PREFIX_LEN); driverTable[no_of_drivers].prefix[MAX_PREFIX_LEN - 1] = 0; driverTable[no_of_drivers].init = init; driverTable[no_of_drivers].shutdown = shutdown; driverTable[no_of_drivers].setoptions = setoptions; driverTable[no_of_drivers].getoptions = getoptions; driverTable[no_of_drivers].getversion = getversion; driverTable[no_of_drivers].checkfile = checkfile; driverTable[no_of_drivers].open = open; driverTable[no_of_drivers].create = create; driverTable[no_of_drivers].truncate = truncate; driverTable[no_of_drivers].close = close; driverTable[no_of_drivers].remove = fremove; driverTable[no_of_drivers].size = size; driverTable[no_of_drivers].flush = flush; driverTable[no_of_drivers].seek = seek; driverTable[no_of_drivers].read = read; driverTable[no_of_drivers].write = write; no_of_drivers++; /* increment the number of drivers */ return(0); } /*--------------------------------------------------------------------------*/ /* fits_parse_input_url */ int ffiurl(char *url, /* input filename */ char *urltype, /* e.g., 'file://', 'http://', 'mem://' */ char *infilex, /* root filename (may be complete path) */ char *outfile, /* optional output file name */ char *extspec, /* extension spec: +n or [extname, extver] */ char *rowfilterx, /* boolean row filter expression */ char *binspec, /* histogram binning specifier */ char *colspec, /* column or keyword modifier expression */ int *status) /* parse the input URL into its basic components. This routine does not support the pixfilter or compspec components. */ { return ffifile2(url, urltype, infilex, outfile, extspec, rowfilterx, binspec, colspec, 0, 0, status); } /*--------------------------------------------------------------------------*/ /* fits_parse_input_file */ int ffifile(char *url, /* input filename */ char *urltype, /* e.g., 'file://', 'http://', 'mem://' */ char *infilex, /* root filename (may be complete path) */ char *outfile, /* optional output file name */ char *extspec, /* extension spec: +n or [extname, extver] */ char *rowfilterx, /* boolean row filter expression */ char *binspec, /* histogram binning specifier */ char *colspec, /* column or keyword modifier expression */ char *pixfilter, /* pixel filter expression */ int *status) /* fits_parse_input_filename parse the input URL into its basic components. This routine does not support the compspec component. */ { return ffifile2(url, urltype, infilex, outfile, extspec, rowfilterx, binspec, colspec, pixfilter, 0, status); } /*--------------------------------------------------------------------------*/ int ffifile2(char *url, /* input filename */ char *urltype, /* e.g., 'file://', 'http://', 'mem://' */ char *infilex, /* root filename (may be complete path) */ char *outfile, /* optional output file name */ char *extspec, /* extension spec: +n or [extname, extver] */ char *rowfilterx, /* boolean row filter expression */ char *binspec, /* histogram binning specifier */ char *colspec, /* column or keyword modifier expression */ char *pixfilter, /* pixel filter expression */ char *compspec, /* image compression specification */ int *status) /* fits_parse_input_filename parse the input URL into its basic components. This routine is big and ugly and should be redesigned someday! */ { int ii, jj, slen, infilelen, plus_ext = 0, collen; char *ptr1, *ptr2, *ptr3, *ptr4, *tmptr; int hasAt, hasDot, hasOper, followingOper, spaceTerm, rowFilter; int colStart, binStart, pixStart, compStart; /* must have temporary variable for these, in case inputs are NULL */ char *infile; char *rowfilter; char *tmpstr; if (*status > 0) return(*status); /* Initialize null strings */ if (infilex) *infilex = '\0'; if (urltype) *urltype = '\0'; if (outfile) *outfile = '\0'; if (extspec) *extspec = '\0'; if (binspec) *binspec = '\0'; if (colspec) *colspec = '\0'; if (rowfilterx) *rowfilterx = '\0'; if (pixfilter) *pixfilter = '\0'; if (compspec) *compspec = '\0'; slen = strlen(url); if (slen == 0) /* blank filename ?? */ return(*status); /* allocate memory for 3 strings, each as long as the input url */ infile = (char *) calloc(3, slen + 1); if (!infile) return(*status = MEMORY_ALLOCATION); rowfilter = &infile[slen + 1]; tmpstr = &rowfilter[slen + 1]; ptr1 = url; /* -------------------------------------------------------- */ /* get urltype (e.g., file://, ftp://, http://, etc.) */ /* --------------------------------------------------------- */ if (*ptr1 == '-' && ( *(ptr1 +1) == 0 || *(ptr1 +1) == ' ' || *(ptr1 +1) == '[' || *(ptr1 +1) == '(' ) ) { /* "-" means read file from stdin. Also support "- ", */ /* "-[extname]" and '-(outfile.fits)" but exclude disk file */ /* names that begin with a minus sign, e.g., "-55d33m.fits" */ if (urltype) strcat(urltype, "stdin://"); ptr1++; } else if (!strncasecmp(ptr1, "stdin", 5)) { if (urltype) strcat(urltype, "stdin://"); ptr1 = ptr1 + 5; } else { ptr2 = strstr(ptr1, "://"); ptr3 = strstr(ptr1, "(" ); if (ptr3 && (ptr3 < ptr2) ) { /* the urltype follows a '(' character, so it must apply */ /* to the output file, and is not the urltype of the input file */ ptr2 = 0; /* so reset pointer to zero */ } if (ptr2) /* copy the explicit urltype string */ { if (urltype) strncat(urltype, ptr1, ptr2 - ptr1 + 3); ptr1 = ptr2 + 3; } else if (!strncmp(ptr1, "ftp:", 4) ) { /* the 2 //'s are optional */ if (urltype) strcat(urltype, "ftp://"); ptr1 += 4; } else if (!strncmp(ptr1, "gsiftp:", 7) ) { /* the 2 //'s are optional */ if (urltype) strcat(urltype, "gsiftp://"); ptr1 += 7; } else if (!strncmp(ptr1, "http:", 5) ) { /* the 2 //'s are optional */ if (urltype) strcat(urltype, "http://"); ptr1 += 5; } else if (!strncmp(ptr1, "mem:", 4) ) { /* the 2 //'s are optional */ if (urltype) strcat(urltype, "mem://"); ptr1 += 4; } else if (!strncmp(ptr1, "shmem:", 6) ) { /* the 2 //'s are optional */ if (urltype) strcat(urltype, "shmem://"); ptr1 += 6; } else if (!strncmp(ptr1, "file:", 5) ) { /* the 2 //'s are optional */ if (urltype) strcat(urltype, "file://"); ptr1 += 5; } else /* assume file driver */ { if (urltype) strcat(urltype, "file://"); } } /* ---------------------------------------------------------- If this is a http:// type file, then the cgi file name could include the '[' character, which should not be interpreted as part of CFITSIO's Extended File Name Syntax. Test for this case by seeing if the last character is a ']' or ')'. If it is not, then just treat the whole input string as the file name and do not attempt to interprete the name using the extended filename syntax. ----------------------------------------------------------- */ if (urltype && !strncmp(urltype, "http://", 7) ) { /* test for opening parenthesis or bracket in the file name */ if( strchr(ptr1, '(' ) || strchr(ptr1, '[' ) ) { slen = strlen(ptr1); ptr3 = ptr1 + slen - 1; while (*ptr3 == ' ') /* ignore trailing blanks */ ptr3--; if (*ptr3 != ']' && *ptr3 != ')' ) { /* name doesn't end with a ']' or ')' so don't try */ /* to parse this unusual string (may be cgi string) */ if (infilex) { if (strlen(ptr1) > FLEN_FILENAME - 1) { ffpmsg("Name of file is too long."); return(*status = URL_PARSE_ERROR); } strcpy(infilex, ptr1); } free(infile); return(*status); } } } /* ---------------------------------------------------------- Look for VMS style filenames like: disk:[directory.subdirectory]filename.ext, or [directory.subdirectory]filename.ext Check if the first character is a '[' and urltype != stdin or if there is a ':[' string in the remaining url string. If so, then need to move past this bracket character before search for the opening bracket of a filter specification. ----------------------------------------------------------- */ tmptr = ptr1; if (*ptr1 == '[') { if (*url != '-') tmptr = ptr1 + 1; /* this bracket encloses a VMS directory name */ } else { tmptr = strstr(ptr1, ":["); if (tmptr) /* these 2 chars are part of the VMS disk and directory */ tmptr += 2; else tmptr = ptr1; } /* ------------------------ */ /* get the input file name */ /* ------------------------ */ ptr2 = strchr(tmptr, '('); /* search for opening parenthesis ( */ ptr3 = strchr(tmptr, '['); /* search for opening bracket [ */ if (ptr2 == ptr3) /* simple case: no [ or ( in the file name */ { strcat(infile, ptr1); } else if (!ptr3 || /* no bracket, so () enclose output file name */ (ptr2 && (ptr2 < ptr3)) ) /* () enclose output name before bracket */ { strncat(infile, ptr1, ptr2 - ptr1); ptr2++; ptr1 = strchr(ptr2, ')' ); /* search for closing ) */ if (!ptr1) { free(infile); return(*status = URL_PARSE_ERROR); /* error, no closing ) */ } if (outfile) { if (ptr1 - ptr2 > FLEN_FILENAME - 1) { free(infile); return(*status = URL_PARSE_ERROR); } strncat(outfile, ptr2, ptr1 - ptr2); } /* the opening [ could have been part of output name, */ /* e.g., file(out[compress])[3][#row > 5] */ /* so search again for opening bracket following the closing ) */ ptr3 = strchr(ptr1, '['); } else /* bracket comes first, so there is no output name */ { strncat(infile, ptr1, ptr3 - ptr1); } /* strip off any trailing blanks in the names */ slen = strlen(infile); while ( (--slen) > 0 && infile[slen] == ' ') infile[slen] = '\0'; if (outfile) { slen = strlen(outfile); while ( (--slen) > 0 && outfile[slen] == ' ') outfile[slen] = '\0'; } /* --------------------------------------------- */ /* check if this is an IRAF file (.imh extension */ /* --------------------------------------------- */ ptr4 = strstr(infile, ".imh"); /* did the infile name end with ".imh" ? */ if (ptr4 && (*(ptr4 + 4) == '\0')) { if (urltype) strcpy(urltype, "irafmem://"); } /* --------------------------------------------- */ /* check if the 'filename+n' convention has been */ /* used to specifiy which HDU number to open */ /* --------------------------------------------- */ jj = strlen(infile); for (ii = jj - 1; ii >= 0; ii--) { if (infile[ii] == '+') /* search backwards for '+' sign */ break; } if (ii > 0 && (jj - ii) < 7) /* limit extension numbers to 5 digits */ { infilelen = ii; ii++; ptr1 = infile+ii; /* pointer to start of sequence */ for (; ii < jj; ii++) { if (!isdigit((int) infile[ii] ) ) /* are all the chars digits? */ break; } if (ii == jj) { /* yes, the '+n' convention was used. Copy */ /* the digits to the output extspec string. */ plus_ext = 1; if (extspec) { if (jj - infilelen > FLEN_FILENAME - 1) { free(infile); return(*status = URL_PARSE_ERROR); } strncpy(extspec, ptr1, jj - infilelen); } infile[infilelen] = '\0'; /* delete the extension number */ } } /* -------------------------------------------------------------------- */ /* if '*' was given for the output name expand it to the root file name */ /* -------------------------------------------------------------------- */ if (outfile && outfile[0] == '*') { /* scan input name backwards to the first '/' character */ for (ii = jj - 1; ii >= 0; ii--) { if (infile[ii] == '/' || ii == 0) { if (strlen(&infile[ii + 1]) > FLEN_FILENAME - 1) { free(infile); return(*status = URL_PARSE_ERROR); } strcpy(outfile, &infile[ii + 1]); break; } } } /* ------------------------------------------ */ /* copy strings from local copy to the output */ /* ------------------------------------------ */ if (infilex) { if (strlen(infile) > FLEN_FILENAME - 1) { free(infile); return(*status = URL_PARSE_ERROR); } strcpy(infilex, infile); } /* ---------------------------------------------------------- */ /* if no '[' character in the input string, then we are done. */ /* ---------------------------------------------------------- */ if (!ptr3) { free(infile); return(*status); } /* ------------------------------------------- */ /* see if [ extension specification ] is given */ /* ------------------------------------------- */ if (!plus_ext) /* extension no. not already specified? Then */ /* first brackets must enclose extension name or # */ /* or it encloses a image subsection specification */ /* or a raw binary image specifier */ /* or a image compression specifier */ /* Or, the extension specification may have been */ /* omitted and we have to guess what the user intended */ { ptr1 = ptr3 + 1; /* pointer to first char after the [ */ ptr2 = strchr(ptr1, ']' ); /* search for closing ] */ if (!ptr2) { ffpmsg("input file URL is missing closing bracket ']'"); free(infile); return(*status = URL_PARSE_ERROR); /* error, no closing ] */ } /* ---------------------------------------------- */ /* First, test if this is a rawfile specifier */ /* which looks something like: '[ib512,512:2880]' */ /* Test if first character is b,i,j,d,r,f, or u, */ /* and optional second character is b or l, */ /* followed by one or more digits, */ /* finally followed by a ',', ':', or ']' */ /* ---------------------------------------------- */ if (*ptr1 == 'b' || *ptr1 == 'B' || *ptr1 == 'i' || *ptr1 == 'I' || *ptr1 == 'j' || *ptr1 == 'J' || *ptr1 == 'd' || *ptr1 == 'D' || *ptr1 == 'r' || *ptr1 == 'R' || *ptr1 == 'f' || *ptr1 == 'F' || *ptr1 == 'u' || *ptr1 == 'U') { /* next optional character may be a b or l (for Big or Little) */ ptr1++; if (*ptr1 == 'b' || *ptr1 == 'B' || *ptr1 == 'l' || *ptr1 == 'L') ptr1++; if (isdigit((int) *ptr1)) /* must have at least 1 digit */ { while (isdigit((int) *ptr1)) ptr1++; /* skip over digits */ if (*ptr1 == ',' || *ptr1 == ':' || *ptr1 == ']' ) { /* OK, this looks like a rawfile specifier */ if (urltype) { if (strstr(urltype, "stdin") ) strcpy(urltype, "rawstdin://"); else strcpy(urltype, "rawfile://"); } /* append the raw array specifier to infilex */ if (infilex) { if (strlen(infilex) + strlen(ptr3) > FLEN_FILENAME - 1) { free(infile); return(*status = URL_PARSE_ERROR); } strcat(infilex, ptr3); ptr1 = strchr(infilex, ']'); /* find the closing ] char */ if (ptr1) *(ptr1 + 1) = '\0'; /* terminate string after the ] */ } if (extspec) strcpy(extspec, "0"); /* the 0 ext number is implicit */ tmptr = strchr(ptr2 + 1, '[' ); /* search for another [ char */ /* copy any remaining characters into rowfilterx */ if (tmptr && rowfilterx) { if (strlen(rowfilterx) + strlen(tmptr + 1) > FLEN_FILENAME -1) { free(infile); return(*status = URL_PARSE_ERROR); } strcat(rowfilterx, tmptr + 1); tmptr = strchr(rowfilterx, ']' ); /* search for closing ] */ if (tmptr) *tmptr = '\0'; /* overwrite the ] with null terminator */ } free(infile); /* finished parsing, so return */ return(*status); } } } /* end of rawfile specifier test */ /* -------------------------------------------------------- */ /* Not a rawfile, so next, test if this is an image section */ /* i.e., an integer followed by a ':' or a '*' or '-*' */ /* -------------------------------------------------------- */ ptr1 = ptr3 + 1; /* reset pointer to first char after the [ */ tmptr = ptr1; while (*tmptr == ' ') tmptr++; /* skip leading blanks */ while (isdigit((int) *tmptr)) tmptr++; /* skip over leading digits */ if (*tmptr == ':' || *tmptr == '*' || *tmptr == '-') { /* this is an image section specifier */ strcat(rowfilter, ptr3); /* don't want to assume 0 extension any more; may imply an image extension. if (extspec) strcpy(extspec, "0"); */ } else { /* ----------------------------------------------------------------- Not an image section or rawfile spec so may be an extension spec. Examples of valid extension specifiers: [3] - 3rd extension; 0 = primary array [events] - events extension [events, 2] - events extension, with EXTVER = 2 [events,2] - spaces are optional [events, 3, b] - same as above, plus XTENSION = 'BINTABLE' [PICS; colName(12)] - an image in row 12 of the colName column in the PICS table extension [PICS; colName(exposure > 1000)] - as above, but find image in first row with with exposure column value > 1000. [Rate Table] - extension name can contain spaces! [Rate Table;colName(exposure>1000)] Examples of other types of specifiers (Not extension specifiers) [bin] !!! this is ambiguous, and can't be distinguished from a valid extension specifier [bini X=1:512:16] (also binb, binj, binr, and bind are allowed) [binr (X,Y) = 5] [bin @binfilter.txt] [col Time;rate] [col PI=PHA * 1.1] [col -Time; status] [X > 5] [X>5] [@filter.txt] [StatusCol] !!! this is ambiguous, and can't be distinguished from a valid extension specifier [StatusCol==0] [StatusCol || x>6] [gtifilter()] [regfilter("region.reg")] [compress Rice] There will always be some ambiguity between an extension name and a boolean row filtering expression, (as in a couple of the above examples). If there is any doubt, the expression should be treated as an extension specification; The user can always add an explicit expression specifier to override this interpretation. The following decision logic will be used: 1) locate the first token, terminated with a space, comma, semi-colon, or closing bracket. 2) the token is not part of an extension specifier if any of the following is true: - if the token begins with '@' and contains a '.' - if the token contains an operator: = > < || && - if the token begins with "gtifilter(" or "regfilter(" - if the token is terminated by a space and is followed by additional characters (not a ']') AND any of the following: - the token is 'col' - the token is 3 or 4 chars long and begins with 'bin' - the second token begins with an operator: ! = < > | & + - * / % 3) otherwise, the string is assumed to be an extension specifier ----------------------------------------------------------------- */ tmptr = ptr1; while(*tmptr == ' ') tmptr++; hasAt = 0; hasDot = 0; hasOper = 0; followingOper = 0; spaceTerm = 0; rowFilter = 0; colStart = 0; binStart = 0; pixStart = 0; compStart = 0; if (*tmptr == '@') /* test for leading @ symbol */ hasAt = 1; if ( !strncasecmp(tmptr, "col ", 4) ) colStart = 1; if ( !strncasecmp(tmptr, "bin", 3) ) binStart = 1; if ( !strncasecmp(tmptr, "pix", 3) ) pixStart = 1; if ( !strncasecmp(tmptr, "compress ", 9) || !strncasecmp(tmptr, "compress]", 9) ) compStart = 1; if ( !strncasecmp(tmptr, "gtifilter(", 10) || !strncasecmp(tmptr, "regfilter(", 10) ) { rowFilter = 1; } else { /* parse the first token of the expression */ for (ii = 0; ii < ptr2 - ptr1 + 1; ii++, tmptr++) { if (*tmptr == '.') hasDot = 1; else if (*tmptr == '=' || *tmptr == '>' || *tmptr == '<' || (*tmptr == '|' && *(tmptr+1) == '|') || (*tmptr == '&' && *(tmptr+1) == '&') ) hasOper = 1; else if (*tmptr == ',' || *tmptr == ';' || *tmptr == ']') { break; } else if (*tmptr == ' ') /* a space char? */ { while(*tmptr == ' ') /* skip spaces */ tmptr++; if (*tmptr == ']') /* is this the end? */ break; spaceTerm = 1; /* 1st token is terminated by space */ /* test if this is a column or binning specifier */ if (colStart || (ii <= 4 && (binStart || pixStart)) ) rowFilter = 1; else { /* check if next character is an operator */ if (*tmptr == '=' || *tmptr == '>' || *tmptr == '<' || *tmptr == '|' || *tmptr == '&' || *tmptr == '!' || *tmptr == '+' || *tmptr == '-' || *tmptr == '*' || *tmptr == '/' || *tmptr == '%') followingOper = 1; } break; } } } /* test if this is NOT an extension specifier */ if ( rowFilter || (pixStart && spaceTerm) || (hasAt && hasDot) || hasOper || compStart || (spaceTerm && followingOper) ) { /* this is (probably) not an extension specifier */ /* so copy all chars to filter spec string */ strcat(rowfilter, ptr3); } else { /* this appears to be a legit extension specifier */ /* copy the extension specification */ if (extspec) { if (ptr2 - ptr1 > FLEN_FILENAME - 1) { free(infile); return(*status = URL_PARSE_ERROR); } strncat(extspec, ptr1, ptr2 - ptr1); } /* copy any remaining chars to filter spec string */ strcat(rowfilter, ptr2 + 1); } } } /* end of if (!plus_ext) */ else { /* ------------------------------------------------------------------ */ /* already have extension, so this must be a filter spec of some sort */ /* ------------------------------------------------------------------ */ strcat(rowfilter, ptr3); } /* strip off any trailing blanks from filter */ slen = strlen(rowfilter); while ( (--slen) >= 0 && rowfilter[slen] == ' ') rowfilter[slen] = '\0'; if (!rowfilter[0]) { free(infile); return(*status); /* nothing left to parse */ } /* ------------------------------------------------ */ /* does the filter contain a binning specification? */ /* ------------------------------------------------ */ ptr1 = strstr(rowfilter, "[bin"); /* search for "[bin" */ if (!ptr1) ptr1 = strstr(rowfilter, "[BIN"); /* search for "[BIN" */ if (!ptr1) ptr1 = strstr(rowfilter, "[Bin"); /* search for "[Bin" */ if (ptr1) { ptr2 = ptr1 + 4; /* end of the '[bin' string */ if (*ptr2 == 'b' || *ptr2 == 'i' || *ptr2 == 'j' || *ptr2 == 'r' || *ptr2 == 'd') ptr2++; /* skip the datatype code letter */ if ( *ptr2 != ' ' && *ptr2 != ']') ptr1 = NULL; /* bin string must be followed by space or ] */ } if (ptr1) { /* found the binning string */ if (binspec) { if (strlen(ptr1 +1) > FLEN_FILENAME - 1) { free(infile); return(*status = URL_PARSE_ERROR); } strcpy(binspec, ptr1 + 1); ptr2 = strchr(binspec, ']'); if (ptr2) /* terminate the binning filter */ { *ptr2 = '\0'; if ( *(--ptr2) == ' ') /* delete trailing spaces */ *ptr2 = '\0'; } else { ffpmsg("input file URL is missing closing bracket ']'"); ffpmsg(rowfilter); free(infile); return(*status = URL_PARSE_ERROR); /* error, no closing ] */ } } /* delete the binning spec from the row filter string */ ptr2 = strchr(ptr1, ']'); strcpy(tmpstr, ptr2+1); /* copy any chars after the binspec */ strcpy(ptr1, tmpstr); /* overwrite binspec */ } /* --------------------------------------------------------- */ /* does the filter contain a column selection specification? */ /* --------------------------------------------------------- */ ptr1 = strstr(rowfilter, "[col "); if (!ptr1) { ptr1 = strstr(rowfilter, "[COL "); if (!ptr1) ptr1 = strstr(rowfilter, "[Col "); } if (ptr1) { /* find the end of the column specifier */ ptr2 = ptr1 + 5; while (*ptr2 != ']') { if (*ptr2 == '\0') { ffpmsg("input file URL is missing closing bracket ']'"); free(infile); return(*status = URL_PARSE_ERROR); /* error, no closing ] */ } if (*ptr2 == '\'') /* start of a literal string */ { ptr2 = strchr(ptr2 + 1, '\''); /* find closing quote */ if (!ptr2) { ffpmsg ("literal string in input file URL is missing closing single quote"); free(infile); return(*status = URL_PARSE_ERROR); /* error, no closing ] */ } } if (*ptr2 == '[') /* set of nested square brackets */ { ptr2 = strchr(ptr2 + 1, ']'); /* find closing bracket */ if (!ptr2) { ffpmsg ("nested brackets in input file URL is missing closing bracket"); free(infile); return(*status = URL_PARSE_ERROR); /* error, no closing ] */ } } ptr2++; /* continue search for the closing bracket character */ } collen = ptr2 - ptr1 - 1; if (colspec) /* copy the column specifier to output string */ { if (collen > FLEN_FILENAME - 1) { free(infile); return(*status = URL_PARSE_ERROR); } strncpy(colspec, ptr1 + 1, collen); colspec[collen] = '\0'; while (colspec[--collen] == ' ') colspec[collen] = '\0'; /* strip trailing blanks */ } /* delete the column selection spec from the row filter string */ strcpy(tmpstr, ptr2 + 1); /* copy any chars after the colspec */ strcpy(ptr1, tmpstr); /* overwrite binspec */ } /* --------------------------------------------------------- */ /* does the filter contain a pixel filter specification? */ /* --------------------------------------------------------- */ ptr1 = strstr(rowfilter, "[pix"); if (!ptr1) { ptr1 = strstr(rowfilter, "[PIX"); if (!ptr1) ptr1 = strstr(rowfilter, "[Pix"); } if (ptr1) { ptr2 = ptr1 + 4; /* end of the '[pix' string */ if (*ptr2 == 'b' || *ptr2 == 'i' || *ptr2 == 'j' || *ptr2 == 'B' || *ptr2 == 'I' || *ptr2 == 'J' || *ptr2 == 'r' || *ptr2 == 'd' || *ptr2 == 'R' || *ptr2 == 'D') ptr2++; /* skip the datatype code letter */ if (*ptr2 == '1') ptr2++; /* skip the single HDU indicator */ if ( *ptr2 != ' ') ptr1 = NULL; /* pix string must be followed by space */ } if (ptr1) { /* find the end of the pixel filter */ while (*ptr2 != ']') { if (*ptr2 == '\0') { ffpmsg("input file URL is missing closing bracket ']'"); free(infile); return(*status = URL_PARSE_ERROR); /* error, no closing ] */ } if (*ptr2 == '\'') /* start of a literal string */ { ptr2 = strchr(ptr2 + 1, '\''); /* find closing quote */ if (!ptr2) { ffpmsg ("literal string in input file URL is missing closing single quote"); free(infile); return(*status = URL_PARSE_ERROR); /* error, no closing ] */ } } if (*ptr2 == '[') /* set of nested square brackets */ { ptr2 = strchr(ptr2 + 1, ']'); /* find closing bracket */ if (!ptr2) { ffpmsg ("nested brackets in input file URL is missing closing bracket"); free(infile); return(*status = URL_PARSE_ERROR); /* error, no closing ] */ } } ptr2++; /* continue search for the closing bracket character */ } collen = ptr2 - ptr1 - 1; if (pixfilter) /* copy the column specifier to output string */ { if (collen > FLEN_FILENAME - 1) { free(infile); return(*status = URL_PARSE_ERROR); } strncpy(pixfilter, ptr1 + 1, collen); pixfilter[collen] = '\0'; while (pixfilter[--collen] == ' ') pixfilter[collen] = '\0'; /* strip trailing blanks */ } /* delete the pixel filter from the row filter string */ strcpy(tmpstr, ptr2 + 1); /* copy any chars after the pixel filter */ strcpy(ptr1, tmpstr); /* overwrite binspec */ } /* ------------------------------------------------------------ */ /* does the filter contain an image compression specification? */ /* ------------------------------------------------------------ */ ptr1 = strstr(rowfilter, "[compress"); if (ptr1) { ptr2 = ptr1 + 9; /* end of the '[compress' string */ if ( *ptr2 != ' ' && *ptr2 != ']') ptr1 = NULL; /* compress string must be followed by space or ] */ } if (ptr1) { /* found the compress string */ if (compspec) { if (strlen(ptr1 +1) > FLEN_FILENAME - 1) { free(infile); return(*status = URL_PARSE_ERROR); } strcpy(compspec, ptr1 + 1); ptr2 = strchr(compspec, ']'); if (ptr2) /* terminate the binning filter */ { *ptr2 = '\0'; if ( *(--ptr2) == ' ') /* delete trailing spaces */ *ptr2 = '\0'; } else { ffpmsg("input file URL is missing closing bracket ']'"); ffpmsg(rowfilter); free(infile); return(*status = URL_PARSE_ERROR); /* error, no closing ] */ } } /* delete the compression spec from the row filter string */ ptr2 = strchr(ptr1, ']'); strcpy(tmpstr, ptr2+1); /* copy any chars after the binspec */ strcpy(ptr1, tmpstr); /* overwrite binspec */ } /* copy the remaining string to the rowfilter output... should only */ /* contain a rowfilter expression of the form "[expr]" */ if (rowfilterx && rowfilter[0]) { ptr2 = rowfilter + strlen(rowfilter) - 1; if( rowfilter[0]=='[' && *ptr2==']' ) { *ptr2 = '\0'; if (strlen(rowfilter + 1) > FLEN_FILENAME - 1) { free(infile); return(*status = URL_PARSE_ERROR); } strcpy(rowfilterx, rowfilter+1); } else { ffpmsg("input file URL lacks valid row filter expression"); *status = URL_PARSE_ERROR; } } free(infile); return(*status); } /*--------------------------------------------------------------------------*/ int ffexist(const char *infile, /* I - input filename or URL */ int *exists, /* O - 2 = a compressed version of file exists */ /* 1 = yes, disk file exists */ /* 0 = no, disk file could not be found */ /* -1 = infile is not a disk file (could */ /* be a http, ftp, gsiftp, smem, or stdin file) */ int *status) /* I/O status */ /* test if the input file specifier is an existing file on disk If the specified file can't be found, it then searches for a compressed version of the file. */ { FILE *diskfile; char rootname[FLEN_FILENAME]; char *ptr1; if (*status > 0) return(*status); /* strip off any extname or filters from the name */ ffrtnm( (char *)infile, rootname, status); ptr1 = strstr(rootname, "://"); if (ptr1 || *rootname == '-') { if (!strncmp(rootname, "file", 4) ) { ptr1 = ptr1 + 3; /* pointer to start of the disk file name */ } else { *exists = -1; /* this is not a disk file */ return (*status); } } else { ptr1 = rootname; } /* see if the disk file exists */ if (file_openfile(ptr1, 0, &diskfile)) { /* no, couldn't open file, so see if there is a compressed version */ if (file_is_compressed(ptr1) ) { *exists = 2; /* a compressed version of the file exists */ } else { *exists = 0; /* neither file nor compressed version exist */ } } else { /* yes, file exists */ *exists = 1; fclose(diskfile); } return(*status); } /*--------------------------------------------------------------------------*/ int ffrtnm(char *url, char *rootname, int *status) /* parse the input URL, returning the root name (filetype://basename). */ { int ii, jj, slen, infilelen; char *ptr1, *ptr2, *ptr3; char urltype[MAX_PREFIX_LEN]; char infile[FLEN_FILENAME]; if (*status > 0) return(*status); ptr1 = url; *rootname = '\0'; *urltype = '\0'; *infile = '\0'; /* get urltype (e.g., file://, ftp://, http://, etc.) */ if (*ptr1 == '-') /* "-" means read file from stdin */ { strcat(urltype, "-"); ptr1++; } else if (!strncmp(ptr1, "stdin", 5) || !strncmp(ptr1, "STDIN", 5)) { strcat(urltype, "-"); ptr1 = ptr1 + 5; } else { ptr2 = strstr(ptr1, "://"); ptr3 = strstr(ptr1, "(" ); if (ptr3 && (ptr3 < ptr2) ) { /* the urltype follows a '(' character, so it must apply */ /* to the output file, and is not the urltype of the input file */ ptr2 = 0; /* so reset pointer to zero */ } if (ptr2) /* copy the explicit urltype string */ { if (ptr2 - ptr1 + 3 > MAX_PREFIX_LEN - 1) { return(*status = URL_PARSE_ERROR); } strncat(urltype, ptr1, ptr2 - ptr1 + 3); ptr1 = ptr2 + 3; } else if (!strncmp(ptr1, "ftp:", 4) ) { /* the 2 //'s are optional */ strcat(urltype, "ftp://"); ptr1 += 4; } else if (!strncmp(ptr1, "gsiftp:", 7) ) { /* the 2 //'s are optional */ strcat(urltype, "gsiftp://"); ptr1 += 7; } else if (!strncmp(ptr1, "http:", 5) ) { /* the 2 //'s are optional */ strcat(urltype, "http://"); ptr1 += 5; } else if (!strncmp(ptr1, "mem:", 4) ) { /* the 2 //'s are optional */ strcat(urltype, "mem://"); ptr1 += 4; } else if (!strncmp(ptr1, "shmem:", 6) ) { /* the 2 //'s are optional */ strcat(urltype, "shmem://"); ptr1 += 6; } else if (!strncmp(ptr1, "file:", 5) ) { /* the 2 //'s are optional */ ptr1 += 5; } /* else assume file driver */ } /* get the input file name */ ptr2 = strchr(ptr1, '('); /* search for opening parenthesis ( */ ptr3 = strchr(ptr1, '['); /* search for opening bracket [ */ if (ptr2 == ptr3) /* simple case: no [ or ( in the file name */ { if (strlen(ptr1) > FLEN_FILENAME - 1) { return(*status = URL_PARSE_ERROR); } strcat(infile, ptr1); } else if (!ptr3) /* no bracket, so () enclose output file name */ { if (ptr2 - ptr1 > FLEN_FILENAME - 1) { return(*status = URL_PARSE_ERROR); } strncat(infile, ptr1, ptr2 - ptr1); ptr2++; ptr1 = strchr(ptr2, ')' ); /* search for closing ) */ if (!ptr1) return(*status = URL_PARSE_ERROR); /* error, no closing ) */ } else if (ptr2 && (ptr2 < ptr3)) /* () enclose output name before bracket */ { if (ptr2 - ptr1 > FLEN_FILENAME - 1) { return(*status = URL_PARSE_ERROR); } strncat(infile, ptr1, ptr2 - ptr1); ptr2++; ptr1 = strchr(ptr2, ')' ); /* search for closing ) */ if (!ptr1) return(*status = URL_PARSE_ERROR); /* error, no closing ) */ } else /* bracket comes first, so there is no output name */ { if (ptr3 - ptr1 > FLEN_FILENAME - 1) { return(*status = URL_PARSE_ERROR); } strncat(infile, ptr1, ptr3 - ptr1); } /* strip off any trailing blanks in the names */ slen = strlen(infile); for (ii = slen - 1; ii > 0; ii--) { if (infile[ii] == ' ') infile[ii] = '\0'; else break; } /* --------------------------------------------- */ /* check if the 'filename+n' convention has been */ /* used to specifiy which HDU number to open */ /* --------------------------------------------- */ jj = strlen(infile); for (ii = jj - 1; ii >= 0; ii--) { if (infile[ii] == '+') /* search backwards for '+' sign */ break; } if (ii > 0 && (jj - ii) < 5) /* limit extension numbers to 4 digits */ { infilelen = ii; ii++; for (; ii < jj; ii++) { if (!isdigit((int) infile[ii] ) ) /* are all the chars digits? */ break; } if (ii == jj) { /* yes, the '+n' convention was used. */ infile[infilelen] = '\0'; /* delete the extension number */ } } if (strlen(urltype) + strlen(infile) > FLEN_FILENAME - 1) { return(*status = URL_PARSE_ERROR); } strcat(rootname, urltype); /* construct the root name */ strcat(rootname, infile); return(*status); } /*--------------------------------------------------------------------------*/ int ffourl(char *url, /* I - full input URL */ char *urltype, /* O - url type */ char *outfile, /* O - base file name */ char *tpltfile, /* O - template file name, if any */ char *compspec, /* O - compression specification, if any */ int *status) /* parse the output URL into its basic components. */ { char *ptr1, *ptr2, *ptr3; if (*status > 0) return(*status); if (urltype) *urltype = '\0'; if (outfile) *outfile = '\0'; if (tpltfile) *tpltfile = '\0'; if (compspec) *compspec = '\0'; ptr1 = url; while (*ptr1 == ' ') /* ignore leading blanks */ ptr1++; if ( ( (*ptr1 == '-') && ( *(ptr1 +1) == 0 || *(ptr1 +1) == ' ' ) ) || !strcmp(ptr1, "stdout") || !strcmp(ptr1, "STDOUT")) /* "-" means write to stdout; also support "- " */ /* but exclude disk file names that begin with a minus sign */ /* e.g., "-55d33m.fits" */ { if (urltype) strcpy(urltype, "stdout://"); } else { /* not writing to stdout */ /* get urltype (e.g., file://, ftp://, http://, etc.) */ ptr2 = strstr(ptr1, "://"); if (ptr2) /* copy the explicit urltype string */ { if (urltype) { if (ptr2 - ptr1 + 3 > MAX_PREFIX_LEN - 1) { return(*status = URL_PARSE_ERROR); } strncat(urltype, ptr1, ptr2 - ptr1 + 3); } ptr1 = ptr2 + 3; } else /* assume file driver */ { if (urltype) strcat(urltype, "file://"); } /* look for template file name, enclosed in parenthesis */ ptr2 = strchr(ptr1, '('); /* look for image compression parameters, enclosed in sq. brackets */ ptr3 = strchr(ptr1, '['); if (outfile) { if (ptr2) { /* template file was specified */ if (ptr2 - ptr1 > FLEN_FILENAME - 1) { return(*status = URL_PARSE_ERROR); } strncat(outfile, ptr1, ptr2 - ptr1); } else if (ptr3) { /* compression was specified */ if (ptr3 - ptr1 > FLEN_FILENAME - 1) { return(*status = URL_PARSE_ERROR); } strncat(outfile, ptr1, ptr3 - ptr1); } else { /* no template file or compression */ if (strlen(ptr1) > FLEN_FILENAME - 1) { return(*status = URL_PARSE_ERROR); } strcpy(outfile, ptr1); } } if (ptr2) /* template file was specified */ { ptr2++; ptr1 = strchr(ptr2, ')' ); /* search for closing ) */ if (!ptr1) { return(*status = URL_PARSE_ERROR); /* error, no closing ) */ } if (tpltfile) { if (ptr1 - ptr2 > FLEN_FILENAME - 1) { return(*status = URL_PARSE_ERROR); } strncat(tpltfile, ptr2, ptr1 - ptr2); } } if (ptr3) /* compression was specified */ { ptr3++; ptr1 = strchr(ptr3, ']' ); /* search for closing ] */ if (!ptr1) { return(*status = URL_PARSE_ERROR); /* error, no closing ] */ } if (compspec) { if (ptr1 - ptr3 > FLEN_FILENAME - 1) { return(*status = URL_PARSE_ERROR); } strncat(compspec, ptr3, ptr1 - ptr3); } } /* check if a .gz compressed output file is to be created */ /* by seeing if the filename ends in '.gz' */ if (urltype && outfile) { if (!strcmp(urltype, "file://") ) { ptr1 = strstr(outfile, ".gz"); if (ptr1) { /* make sure the ".gz" is at the end of the file name */ ptr1 += 3; if (*ptr1 == 0 || *ptr1 == ' ' ) strcpy(urltype, "compressoutfile://"); } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffexts(char *extspec, int *extnum, char *extname, int *extvers, int *hdutype, char *imagecolname, char *rowexpress, int *status) { /* Parse the input extension specification string, returning either the extension number or the values of the EXTNAME, EXTVERS, and XTENSION keywords in desired extension. Also return the name of the column containing an image, and an expression to be used to determine which row to use, if present. */ char *ptr1, *ptr2; int slen, nvals; int notint = 1; /* initially assume specified extname is not an integer */ char tmpname[FLEN_VALUE], *loc; *extnum = 0; *extname = '\0'; *extvers = 0; *hdutype = ANY_HDU; *imagecolname = '\0'; *rowexpress = '\0'; if (*status > 0) return(*status); ptr1 = extspec; /* pointer to first char */ while (*ptr1 == ' ') /* skip over any leading blanks */ ptr1++; if (isdigit((int) *ptr1)) /* is the extension specification a number? */ { notint = 0; /* looks like extname may actually be the ext. number */ errno = 0; /* reset this prior to calling strtol */ *extnum = strtol(ptr1, &loc, 10); /* read the string as an integer */ while (*loc == ' ') /* skip over trailing blanks */ loc++; /* check for read error, or junk following the integer */ if ((*loc != '\0' && *loc != ';' ) || (errno == ERANGE) ) { *extnum = 0; notint = 1; /* no, extname was not a simple integer after all */ errno = 0; /* reset error condition flag if it was set */ } if ( *extnum < 0 || *extnum > 99999) { *extnum = 0; /* this is not a reasonable extension number */ ffpmsg("specified extension number is out of range:"); ffpmsg(extspec); return(*status = URL_PARSE_ERROR); } } /* This logic was too simple, and failed on extnames like '1000TEMP' where it would try to move to the 1000th extension if (isdigit((int) *ptr1)) { sscanf(ptr1, "%d", extnum); if (*extnum < 0 || *extnum > 9999) { *extnum = 0; ffpmsg("specified extension number is out of range:"); ffpmsg(extspec); return(*status = URL_PARSE_ERROR); } } */ if (notint) { /* not a number, so EXTNAME must be specified, followed by */ /* optional EXTVERS and XTENSION values */ /* don't use space char as end indicator, because there */ /* may be imbedded spaces in the EXTNAME value */ slen = strcspn(ptr1, ",:;"); /* length of EXTNAME */ if (slen > FLEN_VALUE - 1) { return(*status = URL_PARSE_ERROR); } strncat(extname, ptr1, slen); /* EXTNAME value */ /* now remove any trailing blanks */ while (slen > 0 && *(extname + slen -1) == ' ') { *(extname + slen -1) = '\0'; slen--; } ptr1 += slen; slen = strspn(ptr1, " ,:"); /* skip delimiter characters */ ptr1 += slen; slen = strcspn(ptr1, " ,:;"); /* length of EXTVERS */ if (slen) { nvals = sscanf(ptr1, "%d", extvers); /* EXTVERS value */ if (nvals != 1) { ffpmsg("illegal EXTVER value in input URL:"); ffpmsg(extspec); return(*status = URL_PARSE_ERROR); } ptr1 += slen; slen = strspn(ptr1, " ,:"); /* skip delimiter characters */ ptr1 += slen; slen = strcspn(ptr1, ";"); /* length of HDUTYPE */ if (slen) { if (*ptr1 == 'b' || *ptr1 == 'B') *hdutype = BINARY_TBL; else if (*ptr1 == 't' || *ptr1 == 'T' || *ptr1 == 'a' || *ptr1 == 'A') *hdutype = ASCII_TBL; else if (*ptr1 == 'i' || *ptr1 == 'I') *hdutype = IMAGE_HDU; else { ffpmsg("unknown type of HDU in input URL:"); ffpmsg(extspec); return(*status = URL_PARSE_ERROR); } } } else { strcpy(tmpname, extname); ffupch(tmpname); if (!strcmp(tmpname, "PRIMARY") || !strcmp(tmpname, "P") ) *extname = '\0'; /* return extnum = 0 */ } } ptr1 = strchr(ptr1, ';'); if (ptr1) { /* an image is to be opened; the image is contained in a single */ /* cell of a binary table. A column name and an expression to */ /* determine which row to use has been entered. */ ptr1++; /* skip over the ';' delimiter */ while (*ptr1 == ' ') /* skip over any leading blanks */ ptr1++; ptr2 = strchr(ptr1, '('); if (!ptr2) { ffpmsg("illegal specification of image in table cell in input URL:"); ffpmsg(" did not find a row expression enclosed in ( )"); ffpmsg(extspec); return(*status = URL_PARSE_ERROR); } if (ptr2 - ptr1 > FLEN_FILENAME - 1) { return(*status = URL_PARSE_ERROR); } strncat(imagecolname, ptr1, ptr2 - ptr1); /* copy column name */ ptr2++; /* skip over the '(' delimiter */ while (*ptr2 == ' ') /* skip over any leading blanks */ ptr2++; ptr1 = strchr(ptr2, ')'); if (!ptr2) { ffpmsg("illegal specification of image in table cell in input URL:"); ffpmsg(" missing closing ')' character in row expression"); ffpmsg(extspec); return(*status = URL_PARSE_ERROR); } if (ptr1 - ptr2 > FLEN_FILENAME - 1) { return(*status = URL_PARSE_ERROR); } strncat(rowexpress, ptr2, ptr1 - ptr2); /* row expression */ } return(*status); } /*--------------------------------------------------------------------------*/ int ffextn(char *url, /* I - input filename/URL */ int *extension_num, /* O - returned extension number */ int *status) { /* Parse the input url string and return the number of the extension that CFITSIO would automatically move to if CFITSIO were to open this input URL. The extension numbers are one's based, so 1 = the primary array, 2 = the first extension, etc. The extension number that gets returned is determined by the following algorithm: 1. If the input URL includes a binning specification (e.g. 'myfile.fits[3][bin X,Y]') then the returned extension number will always = 1, since CFITSIO would create a temporary primary image on the fly in this case. The same is true if an image within a single cell of a binary table is opened. 2. Else if the input URL specifies an extension number (e.g., 'myfile.fits[3]' or 'myfile.fits+3') then the specified extension number (+ 1) is returned. 3. Else if the extension name is specified in brackets (e.g., this 'myfile.fits[EVENTS]') then the file will be opened and searched for the extension number. If the input URL is '-' (reading from the stdin file stream) this is not possible and an error will be returned. 4. Else if the URL does not specify an extension (e.g. 'myfile.fits') then a special extension number = -99 will be returned to signal that no extension was specified. This feature is mainly for compatibility with existing FTOOLS software. CFITSIO would open the primary array by default (extension_num = 1) in this case. */ fitsfile *fptr; char urltype[20]; char infile[FLEN_FILENAME]; char outfile[FLEN_FILENAME]; char extspec[FLEN_FILENAME]; char extname[FLEN_FILENAME]; char rowfilter[FLEN_FILENAME]; char binspec[FLEN_FILENAME]; char colspec[FLEN_FILENAME]; char imagecolname[FLEN_VALUE], rowexpress[FLEN_FILENAME]; char *cptr; int extnum, extvers, hdutype, tstatus = 0; if (*status > 0) return(*status); /* parse the input URL into its basic components */ fits_parse_input_url(url, urltype, infile, outfile, extspec, rowfilter,binspec, colspec, status); if (*status > 0) return(*status); if (*binspec) /* is there a binning specification? */ { *extension_num = 1; /* a temporary primary array image is created */ return(*status); } if (*extspec) /* is an extension specified? */ { ffexts(extspec, &extnum, extname, &extvers, &hdutype, imagecolname, rowexpress, status); if (*status > 0) return(*status); if (*imagecolname) /* is an image within a table cell being opened? */ { *extension_num = 1; /* a temporary primary array image is created */ return(*status); } if (*extname) { /* have to open the file to search for the extension name (curses!) */ if (!strcmp(urltype, "stdin://")) /* opening stdin would destroying it! */ return(*status = URL_PARSE_ERROR); /* First, strip off any filtering specification */ infile[0] = '\0'; strncat(infile, url, FLEN_FILENAME -1); cptr = strchr(infile, ']'); /* locate the closing bracket */ if (!cptr) { return(*status = URL_PARSE_ERROR); } else { cptr++; *cptr = '\0'; /* terminate URl after the extension spec */ } if (ffopen(&fptr, infile, READONLY, status) > 0) /* open the file */ { ffclos(fptr, &tstatus); return(*status); } ffghdn(fptr, &extnum); /* where am I in the file? */ *extension_num = extnum; ffclos(fptr, status); return(*status); } else { *extension_num = extnum + 1; /* return the specified number (+ 1) */ return(*status); } } else { *extension_num = -99; /* no specific extension was specified */ /* defaults to primary array */ return(*status); } } /*--------------------------------------------------------------------------*/ int ffurlt(fitsfile *fptr, char *urlType, int *status) /* return the prefix string associated with the driver in use by the fitsfile pointer fptr */ { strcpy(urlType, driverTable[fptr->Fptr->driver].prefix); return(*status); } /*--------------------------------------------------------------------------*/ int ffimport_file( char *filename, /* Text file to read */ char **contents, /* Pointer to pointer to hold file */ int *status ) /* CFITSIO error code */ /* Read and concatenate all the lines from the given text file. User must free the pointer returned in contents. Pointer is guaranteed to hold 2 characters more than the length of the text... allows the calling routine to append (or prepend) a newline (or quotes?) without reallocating memory. */ { int allocLen, totalLen, llen, eoline = 1; char *lines,line[256]; FILE *aFile; if( *status > 0 ) return( *status ); totalLen = 0; allocLen = 1024; lines = (char *)malloc( allocLen * sizeof(char) ); if( !lines ) { ffpmsg("Couldn't allocate memory to hold ASCII file contents."); return(*status = MEMORY_ALLOCATION ); } lines[0] = '\0'; if( (aFile = fopen( filename, "r" ))==NULL ) { sprintf(line,"Could not open ASCII file %s.",filename); ffpmsg(line); free( lines ); return(*status = FILE_NOT_OPENED); } while( fgets(line,256,aFile)!=NULL ) { llen = strlen(line); if ( eoline && (llen > 1) && (line[0] == '/' && line[1] == '/')) continue; /* skip comment lines begging with // */ eoline = 0; /* replace CR and newline chars at end of line with nulls */ if ((llen > 0) && (line[llen-1]=='\n' || line[llen-1] == '\r')) { line[--llen] = '\0'; eoline = 1; /* found an end of line character */ if ((llen > 0) && (line[llen-1]=='\n' || line[llen-1] == '\r')) { line[--llen] = '\0'; } } if( totalLen + llen + 3 >= allocLen ) { allocLen += 256; lines = (char *)realloc(lines, allocLen * sizeof(char) ); if( ! lines ) { ffpmsg("Couldn't allocate memory to hold ASCII file contents."); *status = MEMORY_ALLOCATION; break; } } strcpy( lines+totalLen, line ); totalLen += llen; if (eoline) { strcpy( lines+totalLen, " "); /* add a space between lines */ totalLen += 1; } } fclose(aFile); *contents = lines; return( *status ); } /*--------------------------------------------------------------------------*/ int fits_get_token(char **ptr, char *delimiter, char *token, int *isanumber) /* O - is this token a number? */ /* parse off the next token, delimited by a character in 'delimiter', from the input ptr string; increment *ptr to the end of the token. Returns the length of the token, not including the delimiter char; */ { char *loc, tval[73]; int slen; double dval; *token = '\0'; while (**ptr == ' ') /* skip over leading blanks */ (*ptr)++; slen = strcspn(*ptr, delimiter); /* length of next token */ if (slen) { strncat(token, *ptr, slen); /* copy token */ (*ptr) += slen; /* skip over the token */ if (isanumber) /* check if token is a number */ { *isanumber = 1; if (strchr(token, 'D')) { strncpy(tval, token, 72); tval[72] = '\0'; /* The C language does not support a 'D'; replace with 'E' */ if (loc = strchr(tval, 'D')) *loc = 'E'; dval = strtod(tval, &loc); } else { dval = strtod(token, &loc); } /* check for read error, or junk following the value */ if (*loc != '\0' && *loc != ' ' ) *isanumber = 0; if (errno == ERANGE) *isanumber = 0; } } return(slen); } /*--------------------------------------------------------------------------*/ int fits_get_token2(char **ptr, char *delimiter, char **token, int *isanumber, /* O - is this token a number? */ int *status) /* parse off the next token, delimited by a character in 'delimiter', from the input ptr string; increment *ptr to the end of the token. Returns the length of the token, not including the delimiter char; This routine allocates the *token string; the calling routine must free it */ { char *loc, tval[73]; int slen; double dval; if (*status) return(0); while (**ptr == ' ') /* skip over leading blanks */ (*ptr)++; slen = strcspn(*ptr, delimiter); /* length of next token */ if (slen) { *token = (char *) calloc(slen + 1, 1); if (!(*token)) { ffpmsg("Couldn't allocate memory to hold token string (fits_get_token2)."); *status = MEMORY_ALLOCATION ; return(0); } strncat(*token, *ptr, slen); /* copy token */ (*ptr) += slen; /* skip over the token */ if (isanumber) /* check if token is a number */ { *isanumber = 1; if (strchr(*token, 'D')) { strncpy(tval, *token, 72); tval[72] = '\0'; /* The C language does not support a 'D'; replace with 'E' */ if (loc = strchr(tval, 'D')) *loc = 'E'; dval = strtod(tval, &loc); } else { dval = strtod(*token, &loc); } /* check for read error, or junk following the value */ if (*loc != '\0' && *loc != ' ' ) *isanumber = 0; if (errno == ERANGE) *isanumber = 0; } } return(slen); } /*---------------------------------------------------------------------------*/ char *fits_split_names( char *list) /* I - input list of names */ { /* A sequence of calls to fits_split_names will split the input string into name tokens. The string typically contains a list of file or column names. The names must be delimited by a comma and/or spaces. This routine ignores spaces and commas that occur within parentheses, brackets, or curly brackets. It also strips any leading and trailing blanks from the returned name. This routine is similar to the ANSI C 'strtok' function: The first call to fits_split_names has a non-null input string. It finds the first name in the string and terminates it by overwriting the next character of the string with a '\0' and returns a pointer to the name. Each subsequent call, indicated by a NULL value of the input string, returns the next name, searching from just past the end of the previous name. It returns NULL when no further names are found. The following line illustrates how a string would be split into 3 names: myfile[1][bin (x,y)=4], file2.fits file3.fits ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ 1st name 2nd name 3rd name NOTE: This routine is not thread-safe. This routine is simply provided as a utility routine for other external software. It is not used by any CFITSIO routine. */ int depth = 0; char *start; static char *ptr; if (list) /* reset ptr if a string is given */ ptr = list; while (*ptr == ' ')ptr++; /* skip leading white space */ if (*ptr == '\0')return(0); /* no remaining file names */ start = ptr; while (*ptr != '\0') { if ((*ptr == '[') || (*ptr == '(') || (*ptr == '{')) depth ++; else if ((*ptr == '}') || (*ptr == ')') || (*ptr == ']')) depth --; else if ((depth == 0) && (*ptr == ',' || *ptr == ' ')) { *ptr = '\0'; /* terminate the filename here */ ptr++; /* save pointer to start of next filename */ break; } ptr++; } return(start); } /*--------------------------------------------------------------------------*/ int urltype2driver(char *urltype, int *driver) /* compare input URL with list of known drivers, returning the matching driver numberL. */ { int ii; /* find matching driver; search most recent drivers first */ for (ii=no_of_drivers - 1; ii >= 0; ii--) { if (0 == strcmp(driverTable[ii].prefix, urltype)) { *driver = ii; return(0); } } return(NO_MATCHING_DRIVER); } /*--------------------------------------------------------------------------*/ int ffclos(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* close the FITS file by completing the current HDU, flushing it to disk, then calling the system dependent routine to physically close the FITS file */ { int tstatus = NO_CLOSE_ERROR, zerostatus = 0; if (!fptr) return(*status = NULL_INPUT_PTR); else if ((fptr->Fptr)->validcode != VALIDSTRUC) /* check for magic value */ return(*status = BAD_FILEPTR); /* close and flush the current HDU */ if (*status > 0) ffchdu(fptr, &tstatus); /* turn off the error message from ffchdu */ else ffchdu(fptr, status); ((fptr->Fptr)->open_count)--; /* decrement usage counter */ if ((fptr->Fptr)->open_count == 0) /* if no other files use structure */ { ffflsh(fptr, TRUE, status); /* flush and disassociate IO buffers */ /* call driver function to actually close the file */ if ((*driverTable[(fptr->Fptr)->driver].close)((fptr->Fptr)->filehandle)) { if (*status <= 0) { *status = FILE_NOT_CLOSED; /* report if no previous error */ ffpmsg("failed to close the following file: (ffclos)"); ffpmsg((fptr->Fptr)->filename); } } fits_clear_Fptr( fptr->Fptr, status); /* clear Fptr address */ free((fptr->Fptr)->iobuffer); /* free memory for I/O buffers */ free((fptr->Fptr)->headstart); /* free memory for headstart array */ free((fptr->Fptr)->filename); /* free memory for the filename */ (fptr->Fptr)->filename = 0; (fptr->Fptr)->validcode = 0; /* magic value to indicate invalid fptr */ free(fptr->Fptr); /* free memory for the FITS file structure */ free(fptr); /* free memory for the FITS file structure */ } else { /* to minimize the fallout from any previous error (e.g., trying to open a non-existent extension in a already opened file), always call ffflsh with status = 0. */ /* just flush the buffers, don't disassociate them */ if (*status > 0) ffflsh(fptr, FALSE, &zerostatus); else ffflsh(fptr, FALSE, status); free(fptr); /* free memory for the FITS file structure */ } return(*status); } /*--------------------------------------------------------------------------*/ int ffdelt(fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* close and DELETE the FITS file. */ { char *basename; int slen, tstatus = 0; if (!fptr) return(*status = NULL_INPUT_PTR); else if ((fptr->Fptr)->validcode != VALIDSTRUC) /* check for magic value */ return(*status = BAD_FILEPTR); ffchdu(fptr, status); /* close the current HDU, ignore any errors */ ffflsh(fptr, TRUE, status); /* flush and disassociate IO buffers */ /* call driver function to actually close the file */ if ( (*driverTable[(fptr->Fptr)->driver].close)((fptr->Fptr)->filehandle) ) { if (*status <= 0) { *status = FILE_NOT_CLOSED; /* report error if no previous error */ ffpmsg("failed to close the following file: (ffdelt)"); ffpmsg((fptr->Fptr)->filename); } } /* call driver function to actually delete the file */ if ( (driverTable[(fptr->Fptr)->driver].remove) ) { /* parse the input URL to get the base filename */ slen = strlen((fptr->Fptr)->filename); basename = (char *) malloc(slen +1); if (!basename) return(*status = MEMORY_ALLOCATION); fits_parse_input_url((fptr->Fptr)->filename, NULL, basename, NULL, NULL, NULL, NULL, NULL, &tstatus); if ((*driverTable[(fptr->Fptr)->driver].remove)(basename)) { ffpmsg("failed to delete the following file: (ffdelt)"); ffpmsg((fptr->Fptr)->filename); if (!(*status)) *status = FILE_NOT_CLOSED; } free(basename); } fits_clear_Fptr( fptr->Fptr, status); /* clear Fptr address */ free((fptr->Fptr)->iobuffer); /* free memory for I/O buffers */ free((fptr->Fptr)->headstart); /* free memory for headstart array */ free((fptr->Fptr)->filename); /* free memory for the filename */ (fptr->Fptr)->filename = 0; (fptr->Fptr)->validcode = 0; /* magic value to indicate invalid fptr */ free(fptr->Fptr); /* free memory for the FITS file structure */ free(fptr); /* free memory for the FITS file structure */ return(*status); } /*--------------------------------------------------------------------------*/ int fftrun( fitsfile *fptr, /* I - FITS file pointer */ LONGLONG filesize, /* I - size to truncate the file */ int *status) /* O - error status */ /* low level routine to truncate a file to a new smaller size. */ { if (driverTable[(fptr->Fptr)->driver].truncate) { ffflsh(fptr, FALSE, status); /* flush all the buffers first */ (fptr->Fptr)->filesize = filesize; (fptr->Fptr)->io_pos = filesize; (fptr->Fptr)->logfilesize = filesize; (fptr->Fptr)->bytepos = filesize; ffbfeof(fptr, status); /* eliminate any buffers beyond current EOF */ return (*status = (*driverTable[(fptr->Fptr)->driver].truncate)((fptr->Fptr)->filehandle, filesize) ); } else return(*status); } /*--------------------------------------------------------------------------*/ int ffflushx( FITSfile *fptr) /* I - FITS file pointer */ /* low level routine to flush internal file buffers to the file. */ { if (driverTable[fptr->driver].flush) return ( (*driverTable[fptr->driver].flush)(fptr->filehandle) ); else return(0); /* no flush function defined for this driver */ } /*--------------------------------------------------------------------------*/ int ffseek( FITSfile *fptr, /* I - FITS file pointer */ LONGLONG position) /* I - byte position to seek to */ /* low level routine to seek to a position in a file. */ { return( (*driverTable[fptr->driver].seek)(fptr->filehandle, position) ); } /*--------------------------------------------------------------------------*/ int ffwrite( FITSfile *fptr, /* I - FITS file pointer */ long nbytes, /* I - number of bytes to write */ void *buffer, /* I - buffer to write */ int *status) /* O - error status */ /* low level routine to write bytes to a file. */ { if ( (*driverTable[fptr->driver].write)(fptr->filehandle, buffer, nbytes) ) { ffpmsg("Error writing data buffer to file:"); ffpmsg(fptr->filename); *status = WRITE_ERROR; } return(*status); } /*--------------------------------------------------------------------------*/ int ffread( FITSfile *fptr, /* I - FITS file pointer */ long nbytes, /* I - number of bytes to read */ void *buffer, /* O - buffer to read into */ int *status) /* O - error status */ /* low level routine to read bytes from a file. */ { int readstatus; readstatus = (*driverTable[fptr->driver].read)(fptr->filehandle, buffer, nbytes); if (readstatus == END_OF_FILE) *status = END_OF_FILE; else if (readstatus > 0) { ffpmsg("Error reading data buffer from file:"); ffpmsg(fptr->filename); *status = READ_ERROR; } return(*status); } /*--------------------------------------------------------------------------*/ int fftplt(fitsfile **fptr, /* O - FITS file pointer */ const char *filename, /* I - name of file to create */ const char *tempname, /* I - name of template file */ int *status) /* IO - error status */ /* Create and initialize a new FITS file based on a template file. Uses C fopen and fgets functions. */ { if (*status > 0) return(*status); if ( ffinit(fptr, filename, status) ) /* create empty file */ return(*status); ffoptplt(*fptr, tempname, status); /* open and use template */ return(*status); } /*--------------------------------------------------------------------------*/ int ffoptplt(fitsfile *fptr, /* O - FITS file pointer */ const char *tempname, /* I - name of template file */ int *status) /* IO - error status */ /* open template file and use it to create new file */ { fitsfile *tptr; int tstatus = 0, nkeys, nadd, ii; char card[FLEN_CARD]; if (*status > 0) return(*status); if (tempname == NULL || *tempname == '\0') /* no template file? */ return(*status); /* try opening template */ ffopen(&tptr, (char *) tempname, READONLY, &tstatus); if (tstatus) /* not a FITS file, so treat it as an ASCII template */ { ffxmsg(2, card); /* clear the error message */ fits_execute_template(fptr, (char *) tempname, status); ffmahd(fptr, 1, 0, status); /* move back to the primary array */ return(*status); } else /* template is a valid FITS file */ { ffmahd(tptr, 1, NULL, status); /* make sure we are at the beginning */ while (*status <= 0) { ffghsp(tptr, &nkeys, &nadd, status); /* get no. of keywords */ for (ii = 1; ii <= nkeys; ii++) /* copy keywords */ { ffgrec(tptr, ii, card, status); /* must reset the PCOUNT keyword to zero in the new output file */ if (strncmp(card, "PCOUNT ",8) == 0) { /* the PCOUNT keyword? */ if (strncmp(card+25, " 0", 5)) { /* non-zero value? */ strncpy(card, "PCOUNT = 0", 30); } } ffprec(fptr, card, status); } ffmrhd(tptr, 1, 0, status); /* move to next HDU until error */ ffcrhd(fptr, status); /* create empty new HDU in output file */ } if (*status == END_OF_FILE) { *status = 0; /* expected error condition */ } ffclos(tptr, status); /* close the template file */ } ffmahd(fptr, 1, 0, status); /* move to the primary array */ return(*status); } /*--------------------------------------------------------------------------*/ void ffrprt( FILE *stream, int status) /* Print out report of cfitsio error status and messages on the error stack. Uses C FILE stream. */ { char status_str[FLEN_STATUS], errmsg[FLEN_ERRMSG]; if (status) { fits_get_errstatus(status, status_str); /* get the error description */ fprintf(stream, "\nFITSIO status = %d: %s\n", status, status_str); while ( fits_read_errmsg(errmsg) ) /* get error stack messages */ fprintf(stream, "%s\n", errmsg); } return; } /*--------------------------------------------------------------------------*/ int pixel_filter_helper( fitsfile **fptr, /* IO - pointer to input image; on output it */ /* points to the new image */ char *outfile, /* I - name for output file */ char *expr, /* I - Image filter expression */ int *status) { PixelFilter filter = { 0 }; char * DEFAULT_TAG = "X"; int ii, hdunum; int singleHDU = 0; filter.count = 1; filter.ifptr = fptr; filter.tag = &DEFAULT_TAG; /* create new empty file for result */ if (ffinit(&filter.ofptr, outfile, status) > 0) { ffpmsg("failed to create output file for pixel filter:"); ffpmsg(outfile); return(*status); } fits_get_hdu_num(*fptr, &hdunum); /* current HDU number in input file */ expr += 3; /* skip 'pix' */ switch (expr[0]) { case 'b': case 'B': filter.bitpix = BYTE_IMG; break; case 'i': case 'I': filter.bitpix = SHORT_IMG; break; case 'j': case 'J': filter.bitpix = LONG_IMG; break; case 'r': case 'R': filter.bitpix = FLOAT_IMG; break; case 'd': case 'D': filter.bitpix = DOUBLE_IMG; break; } if (filter.bitpix) /* skip bitpix indicator */ ++expr; if (*expr == '1') { ++expr; singleHDU = 1; } if (((*fptr)->Fptr)->only_one) singleHDU = 1; if (*expr != ' ') { ffpmsg("pixel filtering expression not space separated:"); ffpmsg(expr); } while (*expr == ' ') ++expr; /* copy all preceding extensions to the output file */ for (ii = 1; !singleHDU && ii < hdunum; ii++) { fits_movabs_hdu(*fptr, ii, NULL, status); if (fits_copy_hdu(*fptr, filter.ofptr, 0, status) > 0) { ffclos(filter.ofptr, status); return(*status); } } /* move back to the original HDU position */ fits_movabs_hdu(*fptr, hdunum, NULL, status); filter.expression = expr; if (fits_pixel_filter(&filter, status)) { ffpmsg("failed to execute image filter:"); ffpmsg(expr); ffclos(filter.ofptr, status); return(*status); } /* copy any remaining HDUs to the output file */ for (ii = hdunum + 1; !singleHDU; ii++) { if (fits_movabs_hdu(*fptr, ii, NULL, status) > 0) break; fits_copy_hdu(*fptr, filter.ofptr, 0, status); } if (*status == END_OF_FILE) *status = 0; /* got the expected EOF error; reset = 0 */ else if (*status > 0) { ffclos(filter.ofptr, status); return(*status); } /* close the original file and return ptr to the new image */ ffclos(*fptr, status); *fptr = filter.ofptr; /* reset the pointer to the new table */ /* move back to the image subsection */ if (ii - 1 != hdunum) fits_movabs_hdu(*fptr, hdunum, NULL, status); return(*status); } astropy-1.1.1/cextern/cfitsio/drvrsmem.h0000644001134200020070000001461012602615520021240 0ustar embrayscience00000000000000/* S H A R E D M E M O R Y D R I V E R ======================================= by Jerzy.Borkowski@obs.unige.ch 09-Mar-98 : initial version 1.0 released 23-Mar-98 : shared_malloc now accepts new handle as an argument */ #include /* this is necessary for Solaris/Linux */ #include #include #ifdef _AIX #include #else #include #endif /* configuration parameters */ #define SHARED_MAXSEG (16) /* maximum number of shared memory blocks */ #define SHARED_KEYBASE (14011963) /* base for shared memory keys, may be overriden by getenv */ #define SHARED_FDNAME ("/tmp/.shmem-lockfile") /* template for lock file name */ #define SHARED_ENV_KEYBASE ("SHMEM_LIB_KEYBASE") /* name of environment variable */ #define SHARED_ENV_MAXSEG ("SHMEM_LIB_MAXSEG") /* name of environment variable */ /* useful constants */ #define SHARED_RDONLY (0) /* flag for shared_(un)lock, lock for read */ #define SHARED_RDWRITE (1) /* flag for shared_(un)lock, lock for write */ #define SHARED_WAIT (0) /* flag for shared_lock, block if cannot lock immediate */ #define SHARED_NOWAIT (2) /* flag for shared_lock, fail if cannot lock immediate */ #define SHARED_NOLOCK (0x100) /* flag for shared_validate function */ #define SHARED_RESIZE (4) /* flag for shared_malloc, object is resizeable */ #define SHARED_PERSIST (8) /* flag for shared_malloc, object is not deleted after last proc detaches */ #define SHARED_INVALID (-1) /* invalid handle for semaphore/shared memory */ #define SHARED_EMPTY (0) /* entries for shared_used table */ #define SHARED_USED (1) #define SHARED_GRANUL (16384) /* granularity of shared_malloc allocation = phys page size, system dependent */ /* checkpoints in shared memory segments - might be omitted */ #define SHARED_ID_0 ('J') /* first byte of identifier in BLKHEAD */ #define SHARED_ID_1 ('B') /* second byte of identifier in BLKHEAD */ #define BLOCK_REG (0) /* value for tflag member of BLKHEAD */ #define BLOCK_SHARED (1) /* value for tflag member of BLKHEAD */ /* generic error codes */ #define SHARED_OK (0) #define SHARED_ERR_MIN_IDX SHARED_BADARG #define SHARED_ERR_MAX_IDX SHARED_NORESIZE #define DAL_SHM_FREE (0) #define DAL_SHM_USED (1) #define DAL_SHM_ID0 ('D') #define DAL_SHM_ID1 ('S') #define DAL_SHM_ID2 ('M') #define DAL_SHM_SEGHEAD_ID (0x19630114) /* data types */ /* BLKHEAD object is placed at the beginning of every memory segment (both shared and regular) to allow automatic recognition of segments type */ typedef union { struct BLKHEADstruct { char ID[2]; /* ID = 'JB', just as a checkpoint */ char tflag; /* is it shared memory or regular one ? */ int handle; /* this is not necessary, used only for non-resizeable objects via ptr */ } s; double d; /* for proper alignment on every machine */ } BLKHEAD; typedef void *SHARED_P; /* generic type of shared memory pointer */ typedef struct SHARED_GTABstruct /* data type used in global table */ { int sem; /* access semaphore (1 field): process count */ int semkey; /* key value used to generate semaphore handle */ int key; /* key value used to generate shared memory handle (realloc changes it) */ int handle; /* handle of shared memory segment */ int size; /* size of shared memory segment */ int nprocdebug; /* attached proc counter, helps remove zombie segments */ char attr; /* attributes of shared memory object */ } SHARED_GTAB; typedef struct SHARED_LTABstruct /* data type used in local table */ { BLKHEAD *p; /* pointer to segment (may be null) */ int tcnt; /* number of threads in this process attached to segment */ int lkcnt; /* >=0 <- number of read locks, -1 - write lock */ long seekpos; /* current pointer position, read/write/seek operations change it */ } SHARED_LTAB; /* system dependent definitions */ #ifndef HAVE_FLOCK_T typedef struct flock flock_t; #define HAVE_FLOCK_T #endif #ifndef HAVE_UNION_SEMUN union semun { int val; struct semid_ds *buf; unsigned short *array; }; #define HAVE_UNION_SEMUN #endif typedef struct DAL_SHM_SEGHEAD_STRUCT DAL_SHM_SEGHEAD; struct DAL_SHM_SEGHEAD_STRUCT { int ID; /* ID for debugging */ int h; /* handle of sh. mem */ int size; /* size of data area */ int nodeidx; /* offset of root object (node struct typically) */ }; /* API routines */ #ifdef __cplusplus extern "C" { #endif void shared_cleanup(void); /* must be called at exit/abort */ int shared_init(int debug_msgs); /* must be called before any other shared memory routine */ int shared_recover(int id); /* try to recover dormant segment(s) after applic crash */ int shared_malloc(long size, int mode, int newhandle); /* allocate n-bytes of shared memory */ int shared_attach(int idx); /* attach to segment given index to table */ int shared_free(int idx); /* release shared memory */ SHARED_P shared_lock(int idx, int mode); /* lock segment for reading */ SHARED_P shared_realloc(int idx, long newsize); /* reallocate n-bytes of shared memory (ON LOCKED SEGMENT ONLY) */ int shared_size(int idx); /* get size of attached shared memory segment (ON LOCKED SEGMENT ONLY) */ int shared_attr(int idx); /* get attributes of attached shared memory segment (ON LOCKED SEGMENT ONLY) */ int shared_set_attr(int idx, int newattr); /* set attributes of attached shared memory segment (ON LOCKED SEGMENT ONLY) */ int shared_unlock(int idx); /* unlock segment (ON LOCKED SEGMENT ONLY) */ int shared_set_debug(int debug_msgs); /* set/reset debug mode */ int shared_set_createmode(int mode); /* set/reset debug mode */ int shared_list(int id); /* list segment(s) */ int shared_uncond_delete(int id); /* uncondintionally delete (NOWAIT operation) segment(s) */ int shared_getaddr(int id, char **address); /* get starting address of FITS file in segment */ int smem_init(void); int smem_shutdown(void); int smem_setoptions(int options); int smem_getoptions(int *options); int smem_getversion(int *version); int smem_open(char *filename, int rwmode, int *driverhandle); int smem_create(char *filename, int *driverhandle); int smem_close(int driverhandle); int smem_remove(char *filename); int smem_size(int driverhandle, LONGLONG *size); int smem_flush(int driverhandle); int smem_seek(int driverhandle, LONGLONG offset); int smem_read(int driverhandle, void *buffer, long nbytes); int smem_write(int driverhandle, void *buffer, long nbytes); #ifdef __cplusplus } #endif astropy-1.1.1/cextern/cfitsio/zuncompress.c0000644001134200020070000004005112602615520021762 0ustar embrayscience00000000000000/* gzcompress.h -- definitions for the .Z decompression routine used in CFITSIO */ #include #include #include #include #define get_char() get_byte() /* gzip.h -- common declarations for all gzip modules */ #define OF(args) args typedef void *voidp; #define memzero(s, n) memset ((voidp)(s), 0, (n)) typedef unsigned char uch; typedef unsigned short ush; typedef unsigned long ulg; /* private version of MIN function */ #define MINZIP(a,b) ((a) <= (b) ? (a) : (b)) /* Return codes from gzip */ #define OK 0 #define ERROR 1 #define COMPRESSED 1 #define DEFLATED 8 #define INBUFSIZ 0x8000 /* input buffer size */ #define INBUF_EXTRA 64 /* required by unlzw() */ #define OUTBUFSIZ 16384 /* output buffer size */ #define OUTBUF_EXTRA 2048 /* required by unlzw() */ #define DIST_BUFSIZE 0x8000 /* buffer for distances, see trees.c */ #define WSIZE 0x8000 /* window size--must be a power of two, and */ #define DECLARE(type, array, size) type array[size] #define tab_suffix window #define tab_prefix prev /* hash link (see deflate.c) */ #define head (prev+WSIZE) /* hash head (see deflate.c) */ #define LZW_MAGIC "\037\235" /* Magic header for lzw files, 1F 9D */ #define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf(0)) /* Diagnostic functions */ # define Assert(cond,msg) # define Trace(x) # define Tracev(x) # define Tracevv(x) # define Tracec(c,x) # define Tracecv(c,x) /* lzw.h -- define the lzw functions. */ #ifndef BITS # define BITS 16 #endif #define INIT_BITS 9 /* Initial number of bits per code */ #define BIT_MASK 0x1f /* Mask for 'number of compression bits' */ #define BLOCK_MODE 0x80 #define LZW_RESERVED 0x60 /* reserved bits */ #define CLEAR 256 /* flush the dictionary */ #define FIRST (CLEAR+1) /* first free entry */ /* prototypes */ #define local static void ffpmsg(const char *err_message); local int fill_inbuf OF((int eof_ok)); local void write_buf OF((voidp buf, unsigned cnt)); local void error OF((char *m)); local int unlzw OF((FILE *in, FILE *out)); typedef int file_t; /* Do not use stdio */ int (*work) OF((FILE *infile, FILE *outfile)) = unlzw; /* function to call */ local void error OF((char *m)); /* global buffers */ static DECLARE(uch, inbuf, INBUFSIZ +INBUF_EXTRA); static DECLARE(uch, outbuf, OUTBUFSIZ+OUTBUF_EXTRA); static DECLARE(ush, d_buf, DIST_BUFSIZE); static DECLARE(uch, window, 2L*WSIZE); #ifndef MAXSEG_64K static DECLARE(ush, tab_prefix, 1L< 0) return(*status); /* save input parameters into global variables */ ifname[0] = '\0'; strncat(ifname, filename, 127); ifd = indiskfile; memptr = (void **) buffptr; memsize = buffsize; realloc_fn = mem_realloc; /* clear input and output buffers */ insize = inptr = 0; bytes_in = bytes_out = 0L; magic[0] = (char)get_byte(); magic[1] = (char)get_byte(); if (memcmp(magic, LZW_MAGIC, 2) != 0) { error("ERROR: input .Z file is in unrecognized compression format.\n"); return(-1); } work = unlzw; method = COMPRESSED; last_member = 1; /* do the uncompression */ if ((*work)(ifd, ofd) != OK) { method = -1; /* force cleanup */ *status = 414; /* report some sort of decompression error */ } if (filesize) *filesize = bytes_out; return(*status); } /*=========================================================================*/ /*=========================================================================*/ /* this marks the begining of the original file 'unlzw.c' */ /*=========================================================================*/ /*=========================================================================*/ /* unlzw.c -- decompress files in LZW format. * The code in this file is directly derived from the public domain 'compress' * written by Spencer Thomas, Joe Orost, James Woods, Jim McKie, Steve Davies, * Ken Turkowski, Dave Mack and Peter Jannesen. */ typedef unsigned char char_type; typedef long code_int; typedef unsigned long count_int; typedef unsigned short count_short; typedef unsigned long cmp_code_int; #define MAXCODE(n) (1L << (n)) #ifndef REGISTERS # define REGISTERS 2 #endif #define REG1 #define REG2 #define REG3 #define REG4 #define REG5 #define REG6 #define REG7 #define REG8 #define REG9 #define REG10 #define REG11 #define REG12 #define REG13 #define REG14 #define REG15 #define REG16 #if REGISTERS >= 1 # undef REG1 # define REG1 register #endif #if REGISTERS >= 2 # undef REG2 # define REG2 register #endif #if REGISTERS >= 3 # undef REG3 # define REG3 register #endif #if REGISTERS >= 4 # undef REG4 # define REG4 register #endif #if REGISTERS >= 5 # undef REG5 # define REG5 register #endif #if REGISTERS >= 6 # undef REG6 # define REG6 register #endif #if REGISTERS >= 7 # undef REG7 # define REG7 register #endif #if REGISTERS >= 8 # undef REG8 # define REG8 register #endif #if REGISTERS >= 9 # undef REG9 # define REG9 register #endif #if REGISTERS >= 10 # undef REG10 # define REG10 register #endif #if REGISTERS >= 11 # undef REG11 # define REG11 register #endif #if REGISTERS >= 12 # undef REG12 # define REG12 register #endif #if REGISTERS >= 13 # undef REG13 # define REG13 register #endif #if REGISTERS >= 14 # undef REG14 # define REG14 register #endif #if REGISTERS >= 15 # undef REG15 # define REG15 register #endif #if REGISTERS >= 16 # undef REG16 # define REG16 register #endif #ifndef BYTEORDER # define BYTEORDER 0000 #endif #ifndef NOALLIGN # define NOALLIGN 0 #endif union bytes { long word; struct { #if BYTEORDER == 4321 char_type b1; char_type b2; char_type b3; char_type b4; #else #if BYTEORDER == 1234 char_type b4; char_type b3; char_type b2; char_type b1; #else # undef BYTEORDER int dummy; #endif #endif } bytes; }; #if BYTEORDER == 4321 && NOALLIGN == 1 # define input(b,o,c,n,m){ \ (c) = (*(long *)(&(b)[(o)>>3])>>((o)&0x7))&(m); \ (o) += (n); \ } #else # define input(b,o,c,n,m){ \ REG1 char_type *p = &(b)[(o)>>3]; \ (c) = ((((long)(p[0]))|((long)(p[1])<<8)| \ ((long)(p[2])<<16))>>((o)&0x7))&(m); \ (o) += (n); \ } #endif #ifndef MAXSEG_64K /* DECLARE(ush, tab_prefix, (1<>1] # define clear_tab_prefixof() \ memzero(tab_prefix0, 128), \ memzero(tab_prefix1, 128); #endif #define de_stack ((char_type *)(&d_buf[DIST_BUFSIZE-1])) #define tab_suffixof(i) tab_suffix[i] int block_mode = BLOCK_MODE; /* block compress mode -C compatible with 2.0 */ /* ============================================================================ * Decompress in to out. This routine adapts to the codes in the * file building the "string" table on-the-fly; requiring no table to * be stored in the compressed file. * IN assertions: the buffer inbuf contains already the beginning of * the compressed data, from offsets iptr to insize-1 included. * The magic header has already been checked and skipped. * bytes_in and bytes_out have been initialized. */ local int unlzw(FILE *in, FILE *out) /* input and output file descriptors */ { REG2 char_type *stackp; REG3 code_int code; REG4 int finchar; REG5 code_int oldcode; REG6 code_int incode; REG7 long inbits; REG8 long posbits; REG9 int outpos; /* REG10 int insize; (global) */ REG11 unsigned bitmask; REG12 code_int free_ent; REG13 code_int maxcode; REG14 code_int maxmaxcode; REG15 int n_bits; REG16 int rsize; ofd = out; #ifdef MAXSEG_64K tab_prefix[0] = tab_prefix0; tab_prefix[1] = tab_prefix1; #endif maxbits = get_byte(); block_mode = maxbits & BLOCK_MODE; if ((maxbits & LZW_RESERVED) != 0) { error( "warning, unknown flags in unlzw decompression"); } maxbits &= BIT_MASK; maxmaxcode = MAXCODE(maxbits); if (maxbits > BITS) { error("compressed with too many bits; cannot handle file"); exit_code = ERROR; return ERROR; } rsize = insize; maxcode = MAXCODE(n_bits = INIT_BITS)-1; bitmask = (1<= 0 ; --code) { tab_suffixof(code) = (char_type)code; } do { REG1 int i; int e; int o; resetbuf: e = insize-(o = (posbits>>3)); for (i = 0 ; i < e ; ++i) { inbuf[i] = inbuf[i+o]; } insize = e; posbits = 0; if (insize < INBUF_EXTRA) { /* modified to use fread instead of read - WDP 10/22/97 */ /* if ((rsize = read(in, (char*)inbuf+insize, INBUFSIZ)) == EOF) { */ if ((rsize = fread((char*)inbuf+insize, 1, INBUFSIZ, in)) == EOF) { error("unexpected end of file"); exit_code = ERROR; return ERROR; } insize += rsize; bytes_in += (ulg)rsize; } inbits = ((rsize != 0) ? ((long)insize - insize%n_bits)<<3 : ((long)insize<<3)-(n_bits-1)); while (inbits > posbits) { if (free_ent > maxcode) { posbits = ((posbits-1) + ((n_bits<<3)-(posbits-1+(n_bits<<3))%(n_bits<<3))); ++n_bits; if (n_bits == maxbits) { maxcode = maxmaxcode; } else { maxcode = MAXCODE(n_bits)-1; } bitmask = (1<= 256) { error("corrupt input."); exit_code = ERROR; return ERROR; } outbuf[outpos++] = (char_type)(finchar = (int)(oldcode=code)); continue; } if (code == CLEAR && block_mode) { clear_tab_prefixof(); free_ent = FIRST - 1; posbits = ((posbits-1) + ((n_bits<<3)-(posbits-1+(n_bits<<3))%(n_bits<<3))); maxcode = MAXCODE(n_bits = INIT_BITS)-1; bitmask = (1<= free_ent) { /* Special case for KwKwK string. */ if (code > free_ent) { if (outpos > 0) { write_buf((char*)outbuf, outpos); bytes_out += (ulg)outpos; } error("corrupt input."); exit_code = ERROR; return ERROR; } *--stackp = (char_type)finchar; code = oldcode; } while ((cmp_code_int)code >= (cmp_code_int)256) { /* Generate output characters in reverse order */ *--stackp = tab_suffixof(code); code = tab_prefixof(code); } *--stackp = (char_type)(finchar = tab_suffixof(code)); /* And put them out in forward order */ { /* REG1 int i; already defined above (WDP) */ if (outpos+(i = (de_stack-stackp)) >= OUTBUFSIZ) { do { if (i > OUTBUFSIZ-outpos) i = OUTBUFSIZ-outpos; if (i > 0) { memcpy(outbuf+outpos, stackp, i); outpos += i; } if (outpos >= OUTBUFSIZ) { write_buf((char*)outbuf, outpos); bytes_out += (ulg)outpos; outpos = 0; } stackp+= i; } while ((i = (de_stack-stackp)) > 0); } else { memcpy(outbuf+outpos, stackp, i); outpos += i; } } if ((code = free_ent) < maxmaxcode) { /* Generate the new entry. */ tab_prefixof(code) = (unsigned short)oldcode; tab_suffixof(code) = (char_type)finchar; free_ent = code+1; } oldcode = incode; /* Remember previous code. */ } } while (rsize != 0); if (outpos > 0) { write_buf((char*)outbuf, outpos); bytes_out += (ulg)outpos; } return OK; } /* ========================================================================*/ /* this marks the start of the code from 'util.c' */ local int fill_inbuf(int eof_ok) /* set if EOF acceptable as a result */ { int len; /* Read as much as possible from file */ insize = 0; do { len = fread((char*)inbuf+insize, 1, INBUFSIZ-insize, ifd); if (len == 0 || len == EOF) break; insize += len; } while (insize < INBUFSIZ); if (insize == 0) { if (eof_ok) return EOF; error("unexpected end of file"); exit_code = ERROR; return ERROR; } bytes_in += (ulg)insize; inptr = 1; return inbuf[0]; } /* =========================================================================== */ local void write_buf(voidp buf, unsigned cnt) /* copy buffer into memory; allocate more memory if required*/ { if (!realloc_fn) { /* append buffer to file */ /* added 'unsigned' to get rid of compiler warning (WDP 1/1/99) */ if ((unsigned long) fwrite(buf, 1, cnt, ofd) != cnt) { error ("failed to write buffer to uncompressed output file (write_buf)"); exit_code = ERROR; return; } } else { /* get more memory if current buffer is too small */ if (bytes_out + cnt > *memsize) { *memptr = realloc_fn(*memptr, bytes_out + cnt); *memsize = bytes_out + cnt; /* new memory buffer size */ if (!(*memptr)) { error("malloc failed while uncompressing (write_buf)"); exit_code = ERROR; return; } } /* copy into memory buffer */ memcpy((char *) *memptr + bytes_out, (char *) buf, cnt); } } /* ======================================================================== */ local void error(char *m) /* Error handler */ { ffpmsg(ifname); ffpmsg(m); } astropy-1.1.1/cextern/cfitsio/putcolk.c0000644001134200020070000010556112602615520021063 0ustar embrayscience00000000000000/* This file, putcolk.c, contains routines that write data elements to */ /* a FITS image or table, with 'int' datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffpprk( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ int *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; int nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_pixels(fptr, TINT, firstelem, nelem, 0, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpclk(fptr, 2, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffppnk( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ int *array, /* I - array of values that are written */ int nulval, /* I - undefined pixel value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). Any array values that are equal to the value of nulval will be replaced with the null pixel value that is appropriate for this column. */ { long row; int nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_write_compressed_pixels(fptr, TINT, firstelem, nelem, 1, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcnk(fptr, 2, row, firstelem, nelem, array, nulval, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp2dk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ int *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { /* call the 3D writing routine, with the 3rd dimension = 1 */ ffp3dk(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp3dk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ int *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 3-D cube of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow, ii, jj; long fpixel[3]= {1,1,1}, lpixel[3]; LONGLONG nfits, narray; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = (long) ncols; lpixel[1] = (long) nrows; lpixel[2] = (long) naxis3; fits_write_compressed_img(fptr, TINT, fpixel, lpixel, 0, array, NULL, status); return(*status); } tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so write all at once */ ffpclk(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to write to */ narray = 0; /* next pixel in input array to be written */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* writing naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffpclk(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpssk(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long naxis, /* I - number of data axes in array */ long *naxes, /* I - size of each FITS axis */ long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ long *lpixel, /* I - last pixel in each axis to write */ int *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write a subsection of pixels to the primary array or image. A subsection is defined to be any contiguous rectangular array of pixels within the n-dimensional FITS data file. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow; LONGLONG fpix[7], dimen[7], astart, pstart; LONGLONG off2, off3, off4, off5, off6, off7; LONGLONG st10, st20, st30, st40, st50, st60, st70; LONGLONG st1, st2, st3, st4, st5, st6, st7; long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; if (*status > 0) return(*status); if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_img(fptr, TINT, fpixel, lpixel, 0, array, NULL, status); return(*status); } if (naxis < 1 || naxis > 7) return(*status = BAD_DIMEN); tablerow=maxvalue(1,group); /* calculate the size and number of loops to perform in each dimension */ for (ii = 0; ii < 7; ii++) { fpix[ii]=1; irange[ii]=1; dimen[ii]=1; } for (ii = 0; ii < naxis; ii++) { fpix[ii]=fpixel[ii]; irange[ii]=lpixel[ii]-fpixel[ii]+1; dimen[ii]=naxes[ii]; } i1=irange[0]; /* compute the pixel offset between each dimension */ off2 = dimen[0]; off3 = off2 * dimen[1]; off4 = off3 * dimen[2]; off5 = off4 * dimen[3]; off6 = off5 * dimen[4]; off7 = off6 * dimen[5]; st10 = fpix[0]; st20 = (fpix[1] - 1) * off2; st30 = (fpix[2] - 1) * off3; st40 = (fpix[3] - 1) * off4; st50 = (fpix[4] - 1) * off5; st60 = (fpix[5] - 1) * off6; st70 = (fpix[6] - 1) * off7; /* store the initial offset in each dimension */ st1 = st10; st2 = st20; st3 = st30; st4 = st40; st5 = st50; st6 = st60; st7 = st70; astart = 0; for (i7 = 0; i7 < irange[6]; i7++) { for (i6 = 0; i6 < irange[5]; i6++) { for (i5 = 0; i5 < irange[4]; i5++) { for (i4 = 0; i4 < irange[3]; i4++) { for (i3 = 0; i3 < irange[2]; i3++) { pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; for (i2 = 0; i2 < irange[1]; i2++) { if (ffpclk(fptr, 2, tablerow, pstart, i1, &array[astart], status) > 0) return(*status); astart += i1; pstart += off2; } st2 = st20; st3 = st3+off3; } st3 = st30; st4 = st4+off4; } st4 = st40; st5 = st5+off5; } st5 = st50; st6 = st6+off6; } st6 = st60; st7 = st7+off7; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpgpk( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long firstelem, /* I - first vector element to write(1 = 1st) */ long nelem, /* I - number of values to write */ int *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of group parameters to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffpclk(fptr, 1L, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpclk( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ int *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of values to a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. */ { int tcode, maxelem2, hdutype, writeraw; long twidth, incre; long ntodo; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull, maxelem; double scale, zero; char tform[20], cform[20]; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* call the 'short' or 'long' version of this routine, if possible */ if (sizeof(int) == sizeof(short)) ffpcli(fptr, colnum, firstrow, firstelem, nelem, (short *) array, status); else if (sizeof(int) == sizeof(long)) ffpclj(fptr, colnum, firstrow, firstelem, nelem, (long *) array, status); else { /* This is a special case: sizeof(int) is not equal to sizeof(short) or sizeof(long). This occurs on Alpha OSF systems where short = 2 bytes, int = 4 bytes, and long = 8 bytes. */ buffer = cbuff; /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); maxelem = maxelem2; if (tcode == TSTRING) ffcfmt(tform, cform); /* derive C format for writing strings */ /* if there is no scaling and the native machine format is not byteswapped then we can simply write the raw data bytes into the FITS file if the datatype of the FITS column is the same as the input values. Otherwise we must convert the raw values into the scaled and/or machine dependent format in a temporary buffer that has been allocated for this purpose. */ if (scale == 1. && zero == 0. && MACHINE == NATIVE && tcode == TLONG) { writeraw = 1; maxelem = nelem; /* we can write the entire array at one time */ } else writeraw = 0; /*---------------------------------------------------------------------*/ /* Now write the pixels to the FITS column. */ /* First call the ffXXfYY routine to (1) convert the datatype */ /* if necessary, and (2) scale the values by the FITS TSCALn and */ /* TZEROn linear scaling parameters into a temporary buffer. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to process a one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ switch (tcode) { case (TLONG): if (writeraw) { /* write raw input bytes without conversion */ ffpi4b(fptr, ntodo, incre, (INT32BIT *) &array[next], status); } else { /* convert the raw data before writing to FITS file */ ffintfi4(&array[next], ntodo, scale, zero, (INT32BIT *) buffer, status); ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); } break; case (TLONGLONG): ffintfi8(&array[next], ntodo, scale, zero, (LONGLONG *) buffer, status); ffpi8b(fptr, ntodo, incre, (long *) buffer, status); break; case (TBYTE): ffintfi1(&array[next], ntodo, scale, zero, (unsigned char *) buffer, status); ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); break; case (TSHORT): ffintfi2(&array[next], ntodo, scale, zero, (short *) buffer, status); ffpi2b(fptr, ntodo, incre, (short *) buffer, status); break; case (TFLOAT): ffintfr4(&array[next], ntodo, scale, zero, (float *) buffer, status); ffpr4b(fptr, ntodo, incre, (float *) buffer, status); break; case (TDOUBLE): ffintfr8(&array[next], ntodo, scale, zero, (double *) buffer, status); ffpr8b(fptr, ntodo, incre, (double *) buffer, status); break; case (TSTRING): /* numerical column in an ASCII table */ if (cform[1] != 's') /* "%s" format is a string */ { ffintfstr(&array[next], ntodo, scale, zero, cform, twidth, (char *) buffer, status); if (incre == twidth) /* contiguous bytes */ ffpbyt(fptr, ntodo * twidth, buffer, status); else ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); break; } /* can't write to string column, so fall thru to default: */ default: /* error trap */ sprintf(message, "Cannot write numbers to column %d which has format %s", colnum,tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing elements %.0f thru %.0f of input data array (ffpclk).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while writing FITS data."); *status = NUM_OVERFLOW; } } /* end of Dec ALPHA special case */ return(*status); } /*--------------------------------------------------------------------------*/ int ffpcnk( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ int *array, /* I - array of values to write */ int nulvalue, /* I - value used to flag undefined pixels */ int *status) /* IO - error status */ /* Write an array of elements to the specified column of a table. Any input pixels equal to the value of nulvalue will be replaced by the appropriate null value in the output FITS file. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary */ { tcolumn *colptr; long ngood = 0, nbad = 0, ii; LONGLONG repeat, first, fstelm, fstrow; int tcode, overflow = 0; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode > 0) repeat = colptr->trepeat; /* repeat count for this column */ else repeat = firstelem -1 + nelem; /* variable length arrays */ /* if variable length array, first write the whole input vector, then go back and fill in the nulls */ if (tcode < 0) { if (ffpclk(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { if (*status == NUM_OVERFLOW) { /* ignore overflows, which are possibly the null pixel values */ /* overflow = 1; */ *status = 0; } else { return(*status); } } } /* absolute element number in the column */ first = (firstrow - 1) * repeat + firstelem; for (ii = 0; ii < nelem; ii++) { if (array[ii] != nulvalue) /* is this a good pixel? */ { if (nbad) /* write previous string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) return(*status); nbad=0; } ngood = ngood +1; /* the consecutive number of good pixels */ } else { if (ngood) /* write previous string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ if (ffpclk(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status) > 0) { if (*status == NUM_OVERFLOW) { overflow = 1; *status = 0; } else { return(*status); } } } ngood=0; } nbad = nbad +1; /* the consecutive number of bad pixels */ } } /* finished loop; now just write the last set of pixels */ if (ngood) /* write last string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ ffpclk(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); } } else if (nbad) /* write last string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); } if (*status <= 0) { if (overflow) { *status = NUM_OVERFLOW; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffintfi1(int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ unsigned char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < 0) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > UCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) (dvalue + .5); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffintfi2(int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ short *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < SHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (input[ii] > SHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else { if (dvalue >= 0) output[ii] = (short) (dvalue + .5); else output[ii] = (short) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffintfi4(int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ INT32BIT *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { memcpy(output, input, ntodo * sizeof(int) ); } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else { if (dvalue >= 0) output[ii] = (INT32BIT) (dvalue + .5); else output[ii] = (INT32BIT) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffintfi8(int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ LONGLONG *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = input[ii]; } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else { if (dvalue >= 0) output[ii] = (LONGLONG) (dvalue + .5); else output[ii] = (LONGLONG) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffintfr4(int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ float *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) ((input[ii] - zero) / scale); } return(*status); } /*--------------------------------------------------------------------------*/ int ffintfr8(int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ double *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (input[ii] - zero) / scale; } return(*status); } /*--------------------------------------------------------------------------*/ int ffintfstr(int *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ char *cform, /* I - format for output string values */ long twidth, /* I - width of each field, in chars */ char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do scaling if required. */ { long ii; double dvalue; char *cptr; cptr = output; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { sprintf(output, cform, (double) input[ii]); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; sprintf(output, cform, dvalue); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } /* replace any commas with periods (e.g., in French locale) */ while ((cptr = strchr(cptr, ','))) *cptr = '.'; return(*status); } astropy-1.1.1/cextern/cfitsio/getcoli.c0000644001134200020070000021615112602615517021034 0ustar embrayscience00000000000000/* This file, getcoli.c, contains routines that read data elements from */ /* a FITS image or table, with short datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffgpvi( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ short nulval, /* I - value for undefined pixels */ short *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; char cdummy; int nullcheck = 1; short nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_read_compressed_pixels(fptr, TSHORT, firstelem, nelem, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcli(fptr, 2, row, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgpfi( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ short *array, /* O - array of values that are returned */ char *nularray, /* O - array of null pixel flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any undefined pixels in the returned array will be set = 0 and the corresponding nularray value will be set = 1. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { long row; int nullcheck = 2; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_read_compressed_pixels(fptr, TSHORT, firstelem, nelem, nullcheck, NULL, array, nularray, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcli(fptr, 2, row, firstelem, nelem, 1, 2, 0, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg2di(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ short nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ short *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { /* call the 3D reading routine, with the 3rd dimension = 1 */ ffg3di(fptr, group, nulval, ncols, naxis2, naxis1, naxis2, 1, array, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffg3di(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ short nulval, /* set undefined pixels equal to this */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ short *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an entire 3-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Any null values in the array will be set equal to the value of nulval, unless nulval = 0 in which case no null checking will be performed. */ { long tablerow, ii, jj; LONGLONG nfits, narray; char cdummy; int nullcheck = 1; long inc[] = {1,1,1}; LONGLONG fpixel[] = {1,1,1}; LONGLONG lpixel[3]; short nullvalue; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = ncols; lpixel[1] = nrows; lpixel[2] = naxis3; nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TSHORT, fpixel, lpixel, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so read all at once */ ffgcli(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to read */ narray = 0; /* next pixel in output array to be filled */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* reading naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffgcli(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval, &array[narray], &cdummy, anynul, status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsvi(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ short nulval, /* I - value to set undefined pixels */ short *array, /* O - array to be filled and returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dir[9]; long nelem, nultyp, ninc, numcol; LONGLONG felem, dsize[10], blcll[9], trcll[9]; int hdutype, anyf; char ldummy, msg[FLEN_ERRMSG]; int nullcheck = 1; short nullvalue; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvi is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } nullvalue = nulval; /* set local variable */ fits_read_compressed_img(fptr, TSHORT, blcll, trcll, inc, nullcheck, &nullvalue, array, NULL, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 1; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; dir[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { if (hdutype == IMAGE_HDU) { dir[ii] = -1; } else { sprintf(msg, "ffgsvi: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; dsize[ii] = dsize[ii] * dir[ii]; } dsize[naxis] = dsize[naxis] * dir[naxis]; if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1; ninc = incr[0] * dir[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8]) { for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7]) { for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6]) { for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5]) { for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4]) { for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3]) { for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2]) { for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1]) { felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] + (i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] + (i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] + (i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8]; if ( ffgcli(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &ldummy, &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgsfi(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of the column to read (1 = 1st) */ int naxis, /* I - number of dimensions in the FITS array */ long *naxes, /* I - size of each dimension */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc, /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dimension */ short *array, /* O - array to be filled and returned */ char *flagval, /* O - set to 1 if corresponding value is null */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read a subsection of data values from an image or a table column. This routine is set up to handle a maximum of nine dimensions. */ { long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc; long str[9],stp[9],incr[9],dsize[10]; LONGLONG blcll[9], trcll[9]; long felem, nelem, nultyp, ninc, numcol; int hdutype, anyf; short nulval = 0; char msg[FLEN_ERRMSG]; int nullcheck = 2; if (naxis < 1 || naxis > 9) { sprintf(msg, "NAXIS = %d in call to ffgsvi is out of range", naxis); ffpmsg(msg); return(*status = BAD_DIMEN); } if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ for (ii=0; ii < naxis; ii++) { blcll[ii] = blc[ii]; trcll[ii] = trc[ii]; } fits_read_compressed_img(fptr, TSHORT, blcll, trcll, inc, nullcheck, NULL, array, flagval, anynul, status); return(*status); } /* if this is a primary array, then the input COLNUM parameter should be interpreted as the row number, and we will alway read the image data from column 2 (any group parameters are in column 1). */ if (ffghdt(fptr, &hdutype, status) > 0) return(*status); if (hdutype == IMAGE_HDU) { /* this is a primary array, or image extension */ if (colnum == 0) { rstr = 1; rstp = 1; } else { rstr = colnum; rstp = colnum; } rinc = 1; numcol = 2; } else { /* this is a table, so the row info is in the (naxis+1) elements */ rstr = blc[naxis]; rstp = trc[naxis]; rinc = inc[naxis]; numcol = colnum; } nultyp = 2; if (anynul) *anynul = FALSE; i0 = 0; for (ii = 0; ii < 9; ii++) { str[ii] = 1; stp[ii] = 1; incr[ii] = 1; dsize[ii] = 1; } for (ii = 0; ii < naxis; ii++) { if (trc[ii] < blc[ii]) { sprintf(msg, "ffgsvi: illegal range specified for axis %ld", ii + 1); ffpmsg(msg); return(*status = BAD_PIX_NUM); } str[ii] = blc[ii]; stp[ii] = trc[ii]; incr[ii] = inc[ii]; dsize[ii + 1] = dsize[ii] * naxes[ii]; } if (naxis == 1 && naxes[0] == 1) { /* This is not a vector column, so read all the rows at once */ nelem = (rstp - rstr) / rinc + 1; ninc = rinc; rstp = rstr; } else { /* have to read each row individually, in all dimensions */ nelem = (stp[0] - str[0]) / inc[0] + 1; ninc = incr[0]; } for (row = rstr; row <= rstp; row += rinc) { for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8]) { for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7]) { for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6]) { for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5]) { for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4]) { for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3]) { for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2]) { for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1]) { felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] + (i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] + (i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] + (i7 - 1) * dsize[7] + (i8 - 1) * dsize[8]; if ( ffgcli(fptr, numcol, row, felem, nelem, ninc, nultyp, nulval, &array[i0], &flagval[i0], &anyf, status) > 0) return(*status); if (anyf && anynul) *anynul = TRUE; i0 += nelem; } } } } } } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffggpi( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to read (1 = 1st group) */ long firstelem, /* I - first vector element to read (1 = 1st) */ long nelem, /* I - number of values to read */ short *array, /* O - array of values that are returned */ int *status) /* IO - error status */ /* Read an array of group parameters from the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). */ { long row; int idummy; char cdummy; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffgcli(fptr, 1, row, firstelem, nelem, 1, 1, 0, array, &cdummy, &idummy, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcvi(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ short nulval, /* I - value for null pixels */ short *array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = 0 in which case no checks for undefined pixels will be made. */ { char cdummy; ffgcli(fptr, colnum, firstrow, firstelem, nelem, 1, 1, nulval, array, &cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfi(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ short *array, /* O - array of values that are read */ char *nularray, /* O - array of flags: 1 if null pixel; else 0 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. Automatic datatype conversion will be performed if the datatype of the column does not match the datatype of the array parameter. The output values will be scaled by the FITS TSCALn and TZEROn values if these values have been defined. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. */ { short dummy = 0; ffgcli(fptr, colnum, firstrow, firstelem, nelem, 1, 2, dummy, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcli( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ long elemincre, /* I - pixel increment; e.g., 2 = every other */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ short nulval, /* I - value for null pixels if nultyp = 1 */ short *array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer be a virtual column in a 1 or more grouped FITS primary array or image extension. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The output array of values will be converted from the datatype of the column and will be scaled by the FITS TSCALn and TZEROn values if necessary. */ { double scale, zero, power = 1., dtemp; int tcode, maxelem2, hdutype, xcode, decimals; long twidth, incre; long ii, xwidth, ntodo; int convert, nulcheck, readcheck = 0; LONGLONG repeat, startpos, elemnum, readptr, tnull; LONGLONG rowlen, rownum, remain, next, rowincre, maxelem; char tform[20]; char message[81]; char snull[20]; /* the FITS null value if reading from ASCII table */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; if (anynul) *anynul = 0; if (nultyp == 2) memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (elemincre < 0) readcheck = -1; /* don't do range checking in this case */ if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 ) return(*status); maxelem = maxelem2; incre *= elemincre; /* multiply incre to just get every nth pixel */ if (tcode == TSTRING) /* setup for ASCII tables */ { /* get the number of implied decimal places if no explicit decmal point */ ffasfm(tform, &xcode, &xwidth, &decimals, status); for(ii = 0; ii < decimals; ii++) power *= 10.; } /*------------------------------------------------------------------*/ /* Decide whether to check for null values in the input FITS file: */ /*------------------------------------------------------------------*/ nulcheck = nultyp; /* by default check for null values in the FITS file */ if (nultyp == 1 && nulval == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ else if (tcode%10 == 1 && /* if reading an integer column, and */ tnull == NULL_UNDEFINED) /* if a null value is not defined, */ nulcheck = 0; /* then do not check for null values. */ else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TBYTE && (tnull > 255 || tnull < 0) ) nulcheck = 0; /* Impossible null value */ else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED) nulcheck = 0; /*----------------------------------------------------------------------*/ /* If FITS column and output data array have same datatype, then we do */ /* not need to use a temporary buffer to store intermediate datatype. */ /*----------------------------------------------------------------------*/ convert = 1; if (tcode == TSHORT) /* Special Case: */ { /* no type convertion required, so read */ maxelem = nelem; /* data directly into output buffer. */ if (nulcheck == 0 && scale == 1. && zero == 0.) convert = 0; /* no need to scale data or find nulls */ } /*---------------------------------------------------------------------*/ /* Now read the pixels from the FITS column. If the column does not */ /* have the same datatype as the output array, then we have to read */ /* the raw values into a temporary buffer (of limited size). In */ /* the case of a vector colum read only 1 vector of values at a time */ /* then skip to the next row if more values need to be read. */ /* After reading the raw values, then call the fffXXYY routine to (1) */ /* test for undefined values, (2) convert the datatype if necessary, */ /* and (3) scale the values by the FITS TSCALn and TZEROn linear */ /* scaling parameters. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to read */ next = 0; /* next element in array to be read */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to read at one time to the number that will fit in the buffer or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); if (elemincre >= 0) { ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1)); } else { ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1)); } readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre)); switch (tcode) { case (TSHORT): ffgi2b(fptr, readptr, ntodo, incre, &array[next], status); if (convert) fffi2i2(&array[next], ntodo, scale, zero, nulcheck, (short) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONGLONG): ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status); fffi8i2( (LONGLONG *) buffer, ntodo, scale, zero, nulcheck, tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TBYTE): ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer, status); fffi1i2((unsigned char *) buffer, ntodo, scale, zero, nulcheck, (unsigned char) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TLONG): ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer, status); fffi4i2((INT32BIT *) buffer, ntodo, scale, zero, nulcheck, (INT32BIT) tnull, nulval, &nularray[next], anynul, &array[next], status); break; case (TFLOAT): ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status); fffr4i2((float *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TDOUBLE): ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status); fffr8i2((double *) buffer, ntodo, scale, zero, nulcheck, nulval, &nularray[next], anynul, &array[next], status); break; case (TSTRING): ffmbyt(fptr, readptr, REPORT_EOF, status); if (incre == twidth) /* contiguous bytes */ ffgbyt(fptr, ntodo * twidth, buffer, status); else ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); fffstri2((char *) buffer, ntodo, scale, zero, twidth, power, nulcheck, snull, nulval, &nularray[next], anynul, &array[next], status); break; default: /* error trap for invalid column format */ sprintf(message, "Cannot read numbers from column %d which has format %s", colnum, tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous read operation */ { dtemp = (double) next; if (hdutype > 0) sprintf(message, "Error reading elements %.0f thru %.0f from column %d (ffgcli).", dtemp+1, dtemp+ntodo, colnum); else sprintf(message, "Error reading elements %.0f thru %.0f from image (ffgcli).", dtemp+1, dtemp+ntodo); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum = elemnum + (ntodo * elemincre); if (elemnum >= repeat) /* completed a row; start on later row */ { rowincre = elemnum / repeat; rownum += rowincre; elemnum = elemnum - (rowincre * repeat); } else if (elemnum < 0) /* completed a row; start on a previous row */ { rowincre = (-elemnum - 1) / repeat + 1; rownum -= rowincre; elemnum = (rowincre * repeat) + elemnum; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while reading FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int fffi1i2(unsigned char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ unsigned char tnull, /* I - value of FITS TNULLn keyword if any */ short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) output[ii] = (short) input[ii]; /* copy input to output */ } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = (short) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi2i2(short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short tnull, /* I - value of FITS TNULLn keyword if any */ short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { memcpy(output, input, ntodo * sizeof(short) ); } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else output[ii] = input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi4i2(INT32BIT *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */ short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < SHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (input[ii] > SHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < SHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (input[ii] > SHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffi8i2(LONGLONG *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */ short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to tnull. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < SHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (input[ii] > SHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) dvalue; } } } else /* must check for null values */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { if (input[ii] < SHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (input[ii] > SHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] == tnull) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else { dvalue = input[ii] * scale + zero; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr4i2(float *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (input[ii] > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr++; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (input[ii] > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 2) { if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (zero > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffr8i2(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do datatype conversion and scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to NaN. If nullcheck = 0, then no checking for nulls is performed and any null values will be transformed just like any other pixel. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { long ii; double dvalue; short *sptr, iret; if (nullcheck == 0) /* no null checking required */ { if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (input[ii] > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) input[ii]; } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++) { dvalue = input[ii] * scale + zero; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) dvalue; } } } else /* must check for null values */ { sptr = (short *) input; #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS sptr += 3; /* point to MSBs */ #endif if (scale == 1. && zero == 0.) /* no scaling */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ output[ii] = 0; } else { if (input[ii] < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (input[ii] > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) input[ii]; } } } else /* must scale the data */ { for (ii = 0; ii < ntodo; ii++, sptr += 4) { if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */ { if (iret == 1) /* is it a NaN? */ { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } else /* it's an underflow */ { if (zero < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (zero > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) zero; } } else { dvalue = input[ii] * scale + zero; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) dvalue; } } } } return(*status); } /*--------------------------------------------------------------------------*/ int fffstri2(char *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ long twidth, /* I - width of each substring of chars */ double implipower, /* I - power of 10 of implied decimal */ int nullcheck, /* I - null checking code; 0 = don't check */ /* 1:set null pixels = nullval */ /* 2: if null pixel, set nullarray = 1 */ char *snull, /* I - value of FITS null string, if any */ short nullval, /* I - set null pixels, if nullcheck = 1 */ char *nullarray, /* I - bad pixel array, if nullcheck = 2 */ int *anynull, /* O - set to 1 if any pixels are null */ short *output, /* O - array of converted pixels */ int *status) /* IO - error status */ /* Copy input to output following reading of the input from a FITS file. Check for null values and do scaling if required. The nullcheck code value determines how any null values in the input array are treated. A null value is an input pixel that is equal to snull. If nullcheck= 0, then no special checking for nulls is performed. If nullcheck = 1, then the output pixel will be set = nullval if the corresponding input pixel is null. If nullcheck = 2, then if the pixel is null then the corresponding value of nullarray will be set to 1; the value of nullarray for non-null pixels will = 0. The anynull parameter will be set = 1 if any of the returned pixels are null, otherwise anynull will be returned with a value = 0; */ { int nullen; long ii; double dvalue; char *cstring, message[81]; char *cptr, *tpos; char tempstore, chrzero = '0'; double val, power; int exponent, sign, esign, decpt; nullen = strlen(snull); cptr = input; /* pointer to start of input string */ for (ii = 0; ii < ntodo; ii++) { cstring = cptr; /* temporarily insert a null terminator at end of the string */ tpos = cptr + twidth; tempstore = *tpos; *tpos = 0; /* check if null value is defined, and if the */ /* column string is identical to the null string */ if (snull[0] != ASCII_NULL_UNDEFINED && !strncmp(snull, cptr, nullen) ) { if (nullcheck) { *anynull = 1; if (nullcheck == 1) output[ii] = nullval; else nullarray[ii] = 1; } cptr += twidth; } else { /* value is not the null value, so decode it */ /* remove any embedded blank characters from the string */ decpt = 0; sign = 1; val = 0.; power = 1.; exponent = 0; esign = 1; while (*cptr == ' ') /* skip leading blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for leading sign */ { if (*cptr == '-') sign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and value */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } if (*cptr == '.' || *cptr == ',') /* check for decimal point */ { decpt = 1; /* set flag to show there was a decimal point */ cptr++; while (*cptr == ' ') /* skip any blanks */ cptr++; while (*cptr >= '0' && *cptr <= '9') { val = val * 10. + *cptr - chrzero; /* accumulate the value */ power = power * 10.; cptr++; while (*cptr == ' ') /* skip embedded blanks in the value */ cptr++; } } if (*cptr == 'E' || *cptr == 'D') /* check for exponent */ { cptr++; while (*cptr == ' ') /* skip blanks */ cptr++; if (*cptr == '-' || *cptr == '+') /* check for exponent sign */ { if (*cptr == '-') esign = -1; cptr++; while (*cptr == ' ') /* skip blanks between sign and exp */ cptr++; } while (*cptr >= '0' && *cptr <= '9') { exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */ cptr++; while (*cptr == ' ') /* skip embedded blanks */ cptr++; } } if (*cptr != 0) /* should end up at the null terminator */ { sprintf(message, "Cannot read number from ASCII table"); ffpmsg(message); sprintf(message, "Column field = %s.", cstring); ffpmsg(message); /* restore the char that was overwritten by the null */ *tpos = tempstore; return(*status = BAD_C2D); } if (!decpt) /* if no explicit decimal, use implied */ power = implipower; dvalue = (sign * val / power) * pow(10., (double) (esign * exponent)); dvalue = dvalue * scale + zero; /* apply the scaling */ if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) dvalue; } /* restore the char that was overwritten by the null */ *tpos = tempstore; } return(*status); } astropy-1.1.1/cextern/cfitsio/drvrnet.c0000644001134200020070000021322712602615517021073 0ustar embrayscience00000000000000/* This file, drvrhttp.c contains driver routines for http, ftp and root files. */ /* This file was written by Bruce O'Neel at the ISDC, Switzerland */ /* The FITSIO software is maintained by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ /* Notes on the drivers: The ftp driver uses passive mode exclusivly. If your remote system can't deal with passive mode then it'll fail. Since Netscape Navigator uses passive mode as well there shouldn't be too many ftp servers which have problems. The http driver works properly with 301 and 302 redirects. For many more gory details see http://www.w3c.org/Protocols/rfc2068/rfc2068. The only catch to the 301/302 redirects is that they have to redirect to another http:// url. If not, things would have to change a lot in cfitsio and this was thought to be too difficult. Redirects look like 301 Moved Permanently

Moved Permanently

The document has moved here.

This redirect was from apache 1.2.5 but most of the other servers produce something very similiar. The parser for the redirects finds the first anchor tag in the body and goes there. If that wasn't what was intended by the remote system then hopefully the error stack, which includes notes about the redirect will help the user fix the problem. Root protocal doesn't have any real docs, so, the emperical docs are as follows. First, you must use a slightly modified rootd server. The modifications include implimentation of the stat command which returns the size of the remote file. Without that it's impossible for cfitsio to work properly since fitsfiles don't include any information about the size of the files in the headers. The rootd server closes the connections on any errors, including reading beyond the end of the file or seeking beyond the end of the file. The rootd:// driver doesn't reopen a closed connection, if the connection is closed you're pretty much done. The messages are of the form All binary information is transfered in network format, so use htonl and ntohl to convert back and forth. :== 4 byte length, in network format, the len doesn't include the length of :== one of the message opcodes below, 4 bytes, network format :== depends on opcode The response is of the same form with the same opcode sent. Success is indicated by being 0. Root is a NFSish protocol where each read/write includes the byte offset to read or write to. As a result, seeks will always succeed in the driver even if they would cause a fatal error when you try to read because you're beyond the end of the file. There is file locking on the host such that you need to possibly create /usr/tmp/rootdtab on the host system. There is one file per socket connection, though the rootd daemon can support multiple files open at once. The messages are sent in the following order: ROOTD_USER - user name, is the user name, trailing null is sent though it's not required it seems. A ROOTD_AUTH message is returned with any sort of error meaning that the user name is wrong. ROOTD_PASS - password, ones complemented, stored in . Once again the trailing null is sent. Once again a ROOTD_AUTH message is returned ROOTD_OPEN - includes filename and one of {create|update|read} as the file mode. ~ seems to be dealt with as the username's login directory. A ROOTD_OPEN message is returned. Once the file is opened any of the following can be sent: ROOTD_STAT - file status and size returns a message where is the file length in bytes ROOTD_FLUSH - flushes the file, not sure this has any real effect on the daemon since the daemon uses open/read/write/close rather than the buffered fopen/fread/fwrite/fclose. ROOTD_GET - on send includes a text message of offset and length to get. Return is a status message first with a status value, then, the raw bytes for the length that you requested. It's an error to seek or read past the end of the file, and, the rootd daemon exits and won't respond anymore. Ie, don't do this. ROOTD_PUT - on send includes a text message of offset and length to put. Then send the raw bytes you want to write. Then recieve a status message When you are finished then you send the message: ROOTD_CLOSE - closes the file Once the file is closed then the socket is closed. Revision 1.56 2000/01/04 11:58:31 oneel Updates so that compressed network files are dealt with regardless of their file names and/or mime types. Revision 1.55 2000/01/04 10:52:40 oneel cfitsio 2.034 Revision 1.51 1999/08/10 12:13:40 oneel Make the http code a bit less picky about the types of files it uncompresses. Now it also uncompresses files which end in .Z or .gz. Revision 1.50 1999/08/04 12:38:46 oneel Don's 2.0.32 patch with dal 1.3 Revision 1.39 1998/12/02 15:31:33 oneel Updates to drvrnet.c so that less compiler warnings would be generated. Fixes the signal handling. Revision 1.38 1998/11/23 10:03:24 oneel Added in a useragent string, as suggested by: Tim Kimball · Data Systems Division ¦ kimball@stsci.edu · 410-338-4417 Space Telescope Science Institute ¦ http://www.stsci.edu/~kimball/ 3700 San Martin Drive ¦ http://archive.stsci.edu/ Baltimore MD 21218 USA ¦ http://faxafloi.stsci.edu:4547/ */ #ifdef HAVE_NET_SERVICES #include #include #include #include #include #include #include #include #include #include #include #if defined(unix) || defined(__unix__) || defined(__unix) #include #endif #include #include #include "fitsio2.h" static jmp_buf env; /* holds the jump buffer for setjmp/longjmp pairs */ static void signal_handler(int sig); /* Network routine error codes */ #define NET_OK 0 #define NOT_INET_ADDRESS -1000 #define UNKNOWN_INET_HOST -1001 #define CONNECTION_ERROR -1002 /* Network routine constants */ #define NET_DEFAULT 0 #define NET_OOB 1 #define NET_PEEK 2 #define NETTIMEOUT 180 /* in secs */ /* local defines and variables */ #define MAXLEN 1200 #define SHORTLEN 100 static char netoutfile[MAXLEN]; #define ROOTD_USER 2000 /*user id follows */ #define ROOTD_PASS 2001 /*passwd follows */ #define ROOTD_AUTH 2002 /*authorization status (to client) */ #define ROOTD_FSTAT 2003 /*filename follows */ #define ROOTD_OPEN 2004 /*filename follows + mode */ #define ROOTD_PUT 2005 /*offset, number of bytes and buffer */ #define ROOTD_GET 2006 /*offset, number of bytes */ #define ROOTD_FLUSH 2007 /*flush file */ #define ROOTD_CLOSE 2008 /*close file */ #define ROOTD_STAT 2009 /*return rootd statistics */ #define ROOTD_ACK 2010 /*acknowledgement (all OK) */ #define ROOTD_ERR 2011 /*error code and message follow */ typedef struct /* structure containing disk file structure */ { int sock; LONGLONG currentpos; } rootdriver; static rootdriver handleTable[NMAXFILES]; /* allocate diskfile handle tables */ /* static prototypes */ static int NET_TcpConnect(char *hostname, int port); static int NET_SendRaw(int sock, const void *buf, int length, int opt); static int NET_RecvRaw(int sock, void *buffer, int length); static int NET_ParseUrl(const char *url, char *proto, char *host, int *port, char *fn); static int CreateSocketAddress(struct sockaddr_in *sockaddrPtr, char *host,int port); static int ftp_status(FILE *ftp, char *statusstr); static int http_open_network(char *url, FILE **httpfile, char *contentencoding, int *contentlength); static int ftp_open_network(char *url, FILE **ftpfile, FILE **command, int *sock); static int root_send_buffer(int sock, int op, char *buffer, int buflen); static int root_recv_buffer(int sock, int *op, char *buffer,int buflen); static int root_openfile(char *filename, char *rwmode, int *sock); static int encode64(unsigned s_len, char *src, unsigned d_len, char *dst); /***************************/ /* Static variables */ static int closehttpfile; static int closememfile; static int closefdiskfile; static int closediskfile; static int closefile; static int closeoutfile; static int closecommandfile; static int closeftpfile; static FILE *diskfile; static FILE *outfile; /*--------------------------------------------------------------------------*/ /* This creates a memory file handle with a copy of the URL in filename. The file is uncompressed if necessary */ int http_open(char *filename, int rwmode, int *handle) { FILE *httpfile; char contentencoding[SHORTLEN]; char newfilename[MAXLEN]; char errorstr[MAXLEN]; char recbuf[MAXLEN]; long len; int contentlength; int status; char firstchar; closehttpfile = 0; closememfile = 0; /* don't do r/w files */ if (rwmode != 0) { ffpmsg("Can't open http:// type file with READWRITE access"); ffpmsg(" Specify an outfile for r/w access (http_open)"); goto error; } /* do the signal handler bits */ if (setjmp(env) != 0) { /* feels like the second time */ /* this means something bad happened */ ffpmsg("Timeout (http_open)"); goto error; } (void) signal(SIGALRM, signal_handler); /* Open the network connection */ /* Does the file have a .Z or .gz in it */ /* Also, if file has a '?' in it (probably cgi script) */ if (strstr(filename,".Z") || strstr(filename,".gz") || strstr(filename,"?")) { alarm(NETTIMEOUT); if (http_open_network(filename,&httpfile,contentencoding, &contentlength)) { alarm(0); ffpmsg("Unable to open http file (http_open):"); ffpmsg(filename); goto error; } } else { if (strlen(filename) >= MAXLEN - 4) { ffpmsg("http file name is too long (http_open)"); ffpmsg(filename); goto error; } alarm(NETTIMEOUT); /* Try the .gz one */ strcpy(newfilename,filename); strcat(newfilename,".gz"); if (http_open_network(newfilename,&httpfile,contentencoding, &contentlength)) { alarm(0); /* Now the .Z one */ strcpy(newfilename,filename); strcat(newfilename,".Z"); alarm(NETTIMEOUT); if (http_open_network(newfilename,&httpfile,contentencoding, &contentlength)) { alarm(0); alarm(NETTIMEOUT); if (http_open_network(filename,&httpfile,contentencoding, &contentlength)) { alarm(0); ffpmsg("Unable to open http file (http_open)"); ffpmsg(filename); goto error; } } } } closehttpfile++; /* Create the memory file */ if ((status = mem_create(filename,handle))) { ffpmsg("Unable to create memory file (http_open)"); goto error; } closememfile++; /* Now, what do we do with the file */ /* Check to see what the first character is */ firstchar = fgetc(httpfile); ungetc(firstchar,httpfile); if (!strcmp(contentencoding,"x-gzip") || !strcmp(contentencoding,"x-compress") || strstr(filename,".gz") || strstr(filename,".Z") || ('\037' == firstchar)) { /* do the compress dance, which is the same as the gzip dance */ /* Using the cfitsio routine */ status = 0; /* Ok, this is a tough case, let's be arbritary and say 10*NETTIMEOUT, Given the choices for nettimeout above they'll probaby ^C before, but it's always worth a shot*/ alarm(NETTIMEOUT*10); status = mem_uncompress2mem(filename, httpfile, *handle); alarm(0); if (status) { ffpmsg("Error writing compressed memory file (http_open)"); ffpmsg(filename); goto error; } } else { /* It's not compressed, bad choice, but we'll copy it anyway */ if (contentlength % 2880) { sprintf(errorstr,"Content-Length not a multiple of 2880 (http_open) %d", contentlength); ffpmsg(errorstr); } /* write a memory file */ alarm(NETTIMEOUT); while(0 != (len = fread(recbuf,1,MAXLEN,httpfile))) { alarm(0); /* cancel alarm */ status = mem_write(*handle,recbuf,len); if (status) { ffpmsg("Error copying http file into memory (http_open)"); ffpmsg(filename); goto error; } alarm(NETTIMEOUT); /* rearm the alarm */ } } fclose(httpfile); signal(SIGALRM, SIG_DFL); alarm(0); return mem_seek(*handle,0); error: alarm(0); /* clear it */ if (closehttpfile) { fclose(httpfile); } if (closememfile) { mem_close_free(*handle); } signal(SIGALRM, SIG_DFL); return (FILE_NOT_OPENED); } /*--------------------------------------------------------------------------*/ /* This creates a memory file handle with a copy of the URL in filename. The file must be compressed and is copied (still compressed) to disk first. The compressed disk file is then uncompressed into memory (READONLY). */ int http_compress_open(char *url, int rwmode, int *handle) { FILE *httpfile; char contentencoding[SHORTLEN]; char recbuf[MAXLEN]; long len; int contentlength; int ii, flen, status; char firstchar; closehttpfile = 0; closediskfile = 0; closefdiskfile = 0; closememfile = 0; /* cfileio made a mistake, should set the netoufile first otherwise we don't know where to write the output file */ flen = strlen(netoutfile); if (!flen) { ffpmsg ("Output file not set, shouldn't have happened (http_compress_open)"); goto error; } if (rwmode != 0) { ffpmsg("Can't open compressed http:// type file with READWRITE access"); ffpmsg(" Specify an UNCOMPRESSED outfile (http_compress_open)"); goto error; } /* do the signal handler bits */ if (setjmp(env) != 0) { /* feels like the second time */ /* this means something bad happened */ ffpmsg("Timeout (http_open)"); goto error; } signal(SIGALRM, signal_handler); /* Open the http connectin */ alarm(NETTIMEOUT); if ((status = http_open_network(url,&httpfile,contentencoding, &contentlength))) { alarm(0); ffpmsg("Unable to open http file (http_compress_open)"); ffpmsg(url); goto error; } closehttpfile++; /* Better be compressed */ firstchar = fgetc(httpfile); ungetc(firstchar,httpfile); if (!strcmp(contentencoding,"x-gzip") || !strcmp(contentencoding,"x-compress") || ('\037' == firstchar)) { if (*netoutfile == '!') { /* user wants to clobber file, if it already exists */ for (ii = 0; ii < flen; ii++) netoutfile[ii] = netoutfile[ii + 1]; /* remove '!' */ status = file_remove(netoutfile); } /* Create the new file */ if ((status = file_create(netoutfile,handle))) { ffpmsg("Unable to create output disk file (http_compress_open):"); ffpmsg(netoutfile); goto error; } closediskfile++; /* write a file */ alarm(NETTIMEOUT); while(0 != (len = fread(recbuf,1,MAXLEN,httpfile))) { alarm(0); status = file_write(*handle,recbuf,len); if (status) { ffpmsg("Error writing disk file (http_compres_open)"); ffpmsg(netoutfile); goto error; } alarm(NETTIMEOUT); } file_close(*handle); fclose(httpfile); closehttpfile--; closediskfile--; /* File is on disk, let's uncompress it into memory */ if (NULL == (diskfile = fopen(netoutfile,"r"))) { ffpmsg("Unable to reopen disk file (http_compress_open)"); ffpmsg(netoutfile); goto error; } closefdiskfile++; /* Create the memory handle to hold it */ if ((status = mem_create(url,handle))) { ffpmsg("Unable to create memory file (http_compress_open)"); goto error; } closememfile++; /* Uncompress it */ status = 0; status = mem_uncompress2mem(url,diskfile,*handle); fclose(diskfile); closefdiskfile--; if (status) { ffpmsg("Error uncompressing disk file to memory (http_compress_open)"); ffpmsg(netoutfile); goto error; } } else { /* Opps, this should not have happened */ ffpmsg("Can only have compressed files here (http_compress_open)"); goto error; } signal(SIGALRM, SIG_DFL); alarm(0); return mem_seek(*handle,0); error: alarm(0); /* clear it */ if (closehttpfile) { fclose(httpfile); } if (closefdiskfile) { fclose(diskfile); } if (closememfile) { mem_close_free(*handle); } if (closediskfile) { file_close(*handle); } signal(SIGALRM, SIG_DFL); return (FILE_NOT_OPENED); } /*--------------------------------------------------------------------------*/ /* This creates a file handle with a copy of the URL in filename. The http file is copied to disk first. If it's compressed then it is uncompressed when copying to the disk */ int http_file_open(char *url, int rwmode, int *handle) { FILE *httpfile; char contentencoding[SHORTLEN]; char errorstr[MAXLEN]; char recbuf[MAXLEN]; long len; int contentlength; int ii, flen, status; char firstchar; /* Check if output file is actually a memory file */ if (!strncmp(netoutfile, "mem:", 4) ) { /* allow the memory file to be opened with write access */ return( http_open(url, READONLY, handle) ); } closehttpfile = 0; closefile = 0; closeoutfile = 0; /* cfileio made a mistake, we need to know where to write the file */ flen = strlen(netoutfile); if (!flen) { ffpmsg("Output file not set, shouldn't have happened (http_file_open)"); return (FILE_NOT_OPENED); } /* do the signal handler bits */ if (setjmp(env) != 0) { /* feels like the second time */ /* this means something bad happened */ ffpmsg("Timeout (http_open)"); goto error; } signal(SIGALRM, signal_handler); /* Open the network connection */ alarm(NETTIMEOUT); if ((status = http_open_network(url,&httpfile,contentencoding, &contentlength))) { alarm(0); ffpmsg("Unable to open http file (http_file_open)"); ffpmsg(url); goto error; } closehttpfile++; if (*netoutfile == '!') { /* user wants to clobber disk file, if it already exists */ for (ii = 0; ii < flen; ii++) netoutfile[ii] = netoutfile[ii + 1]; /* remove '!' */ status = file_remove(netoutfile); } firstchar = fgetc(httpfile); ungetc(firstchar,httpfile); if (!strcmp(contentencoding,"x-gzip") || !strcmp(contentencoding,"x-compress") || ('\037' == firstchar)) { /* to make this more cfitsioish we use the file driver calls to create the disk file */ /* Create the output file */ if ((status = file_create(netoutfile,handle))) { ffpmsg("Unable to create output file (http_file_open)"); ffpmsg(netoutfile); goto error; } file_close(*handle); if (NULL == (outfile = fopen(netoutfile,"w"))) { ffpmsg("Unable to reopen the output file (http_file_open)"); ffpmsg(netoutfile); goto error; } closeoutfile++; status = 0; /* Ok, this is a tough case, let's be arbritary and say 10*NETTIMEOUT, Given the choices for nettimeout above they'll probaby ^C before, but it's always worth a shot*/ alarm(NETTIMEOUT*10); status = uncompress2file(url,httpfile,outfile,&status); alarm(0); if (status) { ffpmsg("Error uncompressing http file to disk file (http_file_open)"); ffpmsg(url); ffpmsg(netoutfile); goto error; } fclose(outfile); closeoutfile--; } else { /* Create the output file */ if ((status = file_create(netoutfile,handle))) { ffpmsg("Unable to create output file (http_file_open)"); ffpmsg(netoutfile); goto error; } /* Give a warning message. This could just be bad padding at the end so don't treat it like an error. */ closefile++; if (contentlength % 2880) { sprintf(errorstr, "Content-Length not a multiple of 2880 (http_file_open) %d", contentlength); ffpmsg(errorstr); } /* write a file */ alarm(NETTIMEOUT); while(0 != (len = fread(recbuf,1,MAXLEN,httpfile))) { alarm(0); status = file_write(*handle,recbuf,len); if (status) { ffpmsg("Error copying http file to disk file (http_file_open)"); ffpmsg(url); ffpmsg(netoutfile); goto error; } } file_close(*handle); closefile--; } fclose(httpfile); closehttpfile--; signal(SIGALRM, SIG_DFL); alarm(0); return file_open(netoutfile,rwmode,handle); error: alarm(0); /* clear it */ if (closehttpfile) { fclose(httpfile); } if (closeoutfile) { fclose(outfile); } if (closefile) { file_close(*handle); } signal(SIGALRM, SIG_DFL); return (FILE_NOT_OPENED); } /*--------------------------------------------------------------------------*/ /* This is the guts of the code to get a file via http. url is the input url httpfile is set to be the file connected to the socket which you can read the file from contentencoding is the mime type of the file, returned if the http server returns it contentlength is the lenght of the file, returned if the http server returns it */ static int http_open_network(char *url, FILE **httpfile, char *contentencoding, int *contentlength) { int status; int sock; int tmpint; char recbuf[MAXLEN]; char tmpstr[MAXLEN]; char tmpstr1[SHORTLEN]; char tmpstr2[MAXLEN]; char errorstr[MAXLEN]; char proto[SHORTLEN]; char host[SHORTLEN]; char userpass[MAXLEN]; char fn[MAXLEN]; char turl[MAXLEN]; char *scratchstr; int port; float version; char pproto[SHORTLEN]; char phost[SHORTLEN]; /* address of the proxy server */ int pport; /* port number of the proxy server */ char pfn[MAXLEN]; char *proxy; /* URL of the proxy server */ /* Parse the URL apart again */ strcpy(turl,"http://"); strncat(turl,url,MAXLEN - 8); if (NET_ParseUrl(turl,proto,host,&port,fn)) { sprintf(errorstr,"URL Parse Error (http_open) %s",url); ffpmsg(errorstr); return (FILE_NOT_OPENED); } /* Do we have a user:password combo ? */ strcpy(userpass, url); if ((scratchstr = strchr(userpass, '@')) != NULL) { *scratchstr = '\0'; } else strcpy(userpass, ""); /* Ph. Prugniel 2003/04/03 Are we using a proxy? We use a proxy if the environment variable "http_proxy" is set to an address, eg. http://wwwcache.nottingham.ac.uk:3128 ("http_proxy" is also used by wget) */ proxy = getenv("http_proxy"); /* Connect to the remote host */ if (proxy) { if (NET_ParseUrl(proxy,pproto,phost,&pport,pfn)) { sprintf(errorstr,"URL Parse Error (http_open) %s",proxy); ffpmsg(errorstr); return (FILE_NOT_OPENED); } sock = NET_TcpConnect(phost,pport); } else sock = NET_TcpConnect(host,port); if (sock < 0) { if (proxy) { ffpmsg("Couldn't connect to host via proxy server (http_open_network)"); ffpmsg(proxy); } return (FILE_NOT_OPENED); } /* Make the socket a stdio file */ if (NULL == (*httpfile = fdopen(sock,"r"))) { ffpmsg ("fdopen failed to convert socket to file (http_open_network)"); close(sock); return (FILE_NOT_OPENED); } /* Send the GET request to the remote server */ /* Ph. Prugniel 2003/04/03 One must add the Host: command because of HTTP 1.1 servers (ie. virtual hosts) */ if (proxy) sprintf(tmpstr,"GET http://%s:%-d%s HTTP/1.0\r\n",host,port,fn); else sprintf(tmpstr,"GET %s HTTP/1.0\r\n",fn); if (strcmp(userpass, "")) { encode64(strlen(userpass), userpass, MAXLEN, tmpstr2); sprintf(tmpstr1, "Authorization: Basic %s\r\n", tmpstr2); if (strlen(tmpstr) + strlen(tmpstr1) > MAXLEN - 1) return (FILE_NOT_OPENED); strcat(tmpstr,tmpstr1); } sprintf(tmpstr1,"User-Agent: HEASARC/CFITSIO/%-8.3f\r\n",ffvers(&version)); if (strlen(tmpstr) + strlen(tmpstr1) > MAXLEN - 1) return (FILE_NOT_OPENED); strcat(tmpstr,tmpstr1); /* HTTP 1.1 servers require the following 'Host: ' string */ sprintf(tmpstr1,"Host: %s:%-d\r\n\r\n",host,port); if (strlen(tmpstr) + strlen(tmpstr1) > MAXLEN - 1) return (FILE_NOT_OPENED); strcat(tmpstr,tmpstr1); status = NET_SendRaw(sock,tmpstr,strlen(tmpstr),NET_DEFAULT); /* read the header */ if (!(fgets(recbuf,MAXLEN,*httpfile))) { sprintf (errorstr,"http header short (http_open_network) %s",recbuf); ffpmsg(errorstr); fclose(*httpfile); return (FILE_NOT_OPENED); } *contentlength = 0; contentencoding[0] = '\0'; /* Our choices are 200, ok, 301, temporary redirect, or 302 perm redirect */ sscanf(recbuf,"%s %d",tmpstr,&status); if (status != 200){ if (status == 301 || status == 302) { /* got a redirect */ if (status == 301) { ffpmsg("Note: Web server replied with a temporary redirect from"); } else { ffpmsg("Note: Web server replied with a redirect from"); } ffpmsg(turl); /* now, let's not write the most sophisticated parser here */ while (fgets(recbuf,MAXLEN,*httpfile)) { scratchstr = strstr(recbuf," 3) { recbuf[strlen(recbuf)-1] = '\0'; recbuf[strlen(recbuf)-1] = '\0'; } sscanf(recbuf,"%s %d",tmpstr,&tmpint); /* Did we get a content-length header ? */ if (!strcmp(tmpstr,"Content-Length:")) { *contentlength = tmpint; } /* Did we get the content-encoding header ? */ if (!strcmp(tmpstr,"Content-Encoding:")) { if (NULL != (scratchstr = strstr(recbuf,":"))) { /* Found the : */ scratchstr++; /* skip the : */ scratchstr++; /* skip the extra space */ strcpy(contentencoding,scratchstr); } } } /* we're done, so return */ return 0; } /*--------------------------------------------------------------------------*/ /* This creates a memory file handle with a copy of the URL in filename. The file is uncompressed if necessary */ int ftp_open(char *filename, int rwmode, int *handle) { FILE *ftpfile; FILE *command; int sock; char newfilename[MAXLEN]; char recbuf[MAXLEN]; long len; int status; char firstchar; closememfile = 0; closecommandfile = 0; closeftpfile = 0; /* don't do r/w files */ if (rwmode != 0) { ffpmsg("Can't open ftp:// type file with READWRITE access"); ffpmsg("Specify an outfile for r/w access (ftp_open)"); return (FILE_NOT_OPENED); } /* do the signal handler bits */ if (setjmp(env) != 0) { /* feels like the second time */ /* this means something bad happened */ ffpmsg("Timeout (http_open)"); goto error; } signal(SIGALRM, signal_handler); /* Open the ftp connetion. ftpfile is connected to the file port, command is connected to port 21. sock is the socket on port 21 */ if (strlen(filename) > MAXLEN - 4) { ffpmsg("filename too long (ftp_open)"); ffpmsg(filename); goto error; } alarm(NETTIMEOUT); strcpy(newfilename,filename); /* Does the file have a .Z or .gz in it */ if (strstr(newfilename,".Z") || strstr(newfilename,".gz")) { alarm(NETTIMEOUT); if (ftp_open_network(filename,&ftpfile,&command,&sock)) { alarm(0); ffpmsg("Unable to open ftp file (ftp_open)"); ffpmsg(filename); goto error; } } else { /* Try the .gz one */ strcpy(newfilename,filename); strcat(newfilename,".gz"); alarm(NETTIMEOUT); if (ftp_open_network(newfilename,&ftpfile,&command,&sock)) { alarm(0); strcpy(newfilename,filename); strcat(newfilename,".Z"); alarm(NETTIMEOUT); if (ftp_open_network(newfilename,&ftpfile,&command,&sock)) { /* Now as given */ alarm(0); strcpy(newfilename,filename); alarm(NETTIMEOUT); if (ftp_open_network(newfilename,&ftpfile,&command,&sock)) { alarm(0); ffpmsg("Unable to open ftp file (ftp_open)"); ffpmsg(newfilename); goto error; } } } } closeftpfile++; closecommandfile++; /* create the memory file */ if ((status = mem_create(filename,handle))) { ffpmsg ("Could not create memory file to passive port (ftp_open)"); ffpmsg(filename); goto error; } closememfile++; /* This isn't quite right, it'll fail if the file has .gzabc at the end for instance */ /* Decide if the file is compressed */ firstchar = fgetc(ftpfile); ungetc(firstchar,ftpfile); if (strstr(newfilename,".gz") || strstr(newfilename,".Z") || ('\037' == firstchar)) { status = 0; /* A bit arbritary really, the user will probably hit ^C */ alarm(NETTIMEOUT*10); status = mem_uncompress2mem(filename, ftpfile, *handle); alarm(0); if (status) { ffpmsg("Error writing compressed memory file (ftp_open)"); ffpmsg(filename); goto error; } } else { /* write a memory file */ alarm(NETTIMEOUT); while(0 != (len = fread(recbuf,1,MAXLEN,ftpfile))) { alarm(0); status = mem_write(*handle,recbuf,len); if (status) { ffpmsg("Error writing memory file (http_open)"); ffpmsg(filename); goto error; } alarm(NETTIMEOUT); } } /* close and clean up */ fclose(ftpfile); closeftpfile--; NET_SendRaw(sock,"QUIT\n",5,NET_DEFAULT); fclose(command); closecommandfile--; signal(SIGALRM, SIG_DFL); alarm(0); return mem_seek(*handle,0); error: alarm(0); /* clear it */ if (closecommandfile) { fclose(command); } if (closeftpfile) { fclose(ftpfile); } if (closememfile) { mem_close_free(*handle); } signal(SIGALRM, SIG_DFL); return (FILE_NOT_OPENED); } /*--------------------------------------------------------------------------*/ /* This creates a file handle with a copy of the URL in filename. The file must be uncompressed and is copied to disk first */ int ftp_file_open(char *url, int rwmode, int *handle) { FILE *ftpfile; FILE *command; char recbuf[MAXLEN]; long len; int sock; int ii, flen, status; char firstchar; /* Check if output file is actually a memory file */ if (!strncmp(netoutfile, "mem:", 4) ) { /* allow the memory file to be opened with write access */ return( ftp_open(url, READONLY, handle) ); } closeftpfile = 0; closecommandfile = 0; closefile = 0; closeoutfile = 0; /* cfileio made a mistake, need to know where to write the output file */ flen = strlen(netoutfile); if (!flen) { ffpmsg("Output file not set, shouldn't have happened (ftp_file_open)"); return (FILE_NOT_OPENED); } /* do the signal handler bits */ if (setjmp(env) != 0) { /* feels like the second time */ /* this means something bad happened */ ffpmsg("Timeout (http_open)"); goto error; } signal(SIGALRM, signal_handler); /* open the network connection to url. ftpfile holds the connection to the input file, command holds the connection to port 21, and sock is the socket connected to port 21 */ alarm(NETTIMEOUT); if ((status = ftp_open_network(url,&ftpfile,&command,&sock))) { alarm(0); ffpmsg("Unable to open http file (ftp_file_open)"); ffpmsg(url); goto error; } closeftpfile++; closecommandfile++; if (*netoutfile == '!') { /* user wants to clobber file, if it already exists */ for (ii = 0; ii < flen; ii++) netoutfile[ii] = netoutfile[ii + 1]; /* remove '!' */ status = file_remove(netoutfile); } /* Now, what do we do with the file */ firstchar = fgetc(ftpfile); ungetc(firstchar,ftpfile); if (strstr(url,".gz") || strstr(url,".Z") || ('\037' == firstchar)) { /* to make this more cfitsioish we use the file driver calls to create the file */ /* Create the output file */ if ((status = file_create(netoutfile,handle))) { ffpmsg("Unable to create output file (ftp_file_open)"); ffpmsg(netoutfile); goto error; } file_close(*handle); if (NULL == (outfile = fopen(netoutfile,"w"))) { ffpmsg("Unable to reopen the output file (ftp_file_open)"); ffpmsg(netoutfile); goto error; } closeoutfile++; status = 0; /* Ok, this is a tough case, let's be arbritary and say 10*NETTIMEOUT, Given the choices for nettimeout above they'll probaby ^C before, but it's always worth a shot*/ alarm(NETTIMEOUT*10); status = uncompress2file(url,ftpfile,outfile,&status); alarm(0); if (status) { ffpmsg("Unable to uncompress the output file (ftp_file_open)"); ffpmsg(url); ffpmsg(netoutfile); goto error; } fclose(outfile); closeoutfile--; } else { /* Create the output file */ if ((status = file_create(netoutfile,handle))) { ffpmsg("Unable to create output file (ftp_file_open)"); ffpmsg(netoutfile); goto error; } closefile++; /* write a file */ alarm(NETTIMEOUT); while(0 != (len = fread(recbuf,1,MAXLEN,ftpfile))) { alarm(0); status = file_write(*handle,recbuf,len); if (status) { ffpmsg("Error writing file (ftp_file_open)"); ffpmsg(url); ffpmsg(netoutfile); goto error; } alarm(NETTIMEOUT); } file_close(*handle); } fclose(ftpfile); closeftpfile--; NET_SendRaw(sock,"QUIT\n",5,NET_DEFAULT); fclose(command); closecommandfile--; signal(SIGALRM, SIG_DFL); alarm(0); return file_open(netoutfile,rwmode,handle); error: alarm(0); /* clear it */ if (closeftpfile) { fclose(ftpfile); } if (closecommandfile) { fclose(command); } if (closeoutfile) { fclose(outfile); } if (closefile) { file_close(*handle); } signal(SIGALRM, SIG_DFL); return (FILE_NOT_OPENED); } /*--------------------------------------------------------------------------*/ /* This creates a memory handle with a copy of the URL in filename. The file must be compressed and is copied to disk first */ int ftp_compress_open(char *url, int rwmode, int *handle) { FILE *ftpfile; FILE *command; char recbuf[MAXLEN]; long len; int ii, flen, status; int sock; char firstchar; closeftpfile = 0; closecommandfile = 0; closememfile = 0; closefdiskfile = 0; closediskfile = 0; /* don't do r/w files */ if (rwmode != 0) { ffpmsg("Compressed files must be r/o"); return (FILE_NOT_OPENED); } /* Need to know where to write the output file */ flen = strlen(netoutfile); if (!flen) { ffpmsg( "Output file not set, shouldn't have happened (ftp_compress_open)"); return (FILE_NOT_OPENED); } /* do the signal handler bits */ if (setjmp(env) != 0) { /* feels like the second time */ /* this means something bad happened */ ffpmsg("Timeout (http_open)"); goto error; } signal(SIGALRM, signal_handler); /* Open the network connection to url, ftpfile is connected to the file port, command is connected to port 21. sock is for writing to port 21 */ alarm(NETTIMEOUT); if ((status = ftp_open_network(url,&ftpfile,&command,&sock))) { alarm(0); ffpmsg("Unable to open ftp file (ftp_compress_open)"); ffpmsg(url); goto error; } closeftpfile++; closecommandfile++; /* Now, what do we do with the file */ firstchar = fgetc(ftpfile); ungetc(firstchar,ftpfile); if (strstr(url,".gz") || strstr(url,".Z") || ('\037' == firstchar)) { if (*netoutfile == '!') { /* user wants to clobber file, if it already exists */ for (ii = 0; ii < flen; ii++) netoutfile[ii] = netoutfile[ii + 1]; /* remove '!' */ status = file_remove(netoutfile); } /* Create the output file */ if ((status = file_create(netoutfile,handle))) { ffpmsg("Unable to create output file (ftp_compress_open)"); ffpmsg(netoutfile); goto error; } closediskfile++; /* write a file */ alarm(NETTIMEOUT); while(0 != (len = fread(recbuf,1,MAXLEN,ftpfile))) { alarm(0); status = file_write(*handle,recbuf,len); if (status) { ffpmsg("Error writing file (ftp_compres_open)"); ffpmsg(url); ffpmsg(netoutfile); goto error; } alarm(NETTIMEOUT); } file_close(*handle); closediskfile--; fclose(ftpfile); closeftpfile--; /* Close down the ftp connection */ NET_SendRaw(sock,"QUIT\n",5,NET_DEFAULT); fclose(command); closecommandfile--; /* File is on disk, let's uncompress it into memory */ if (NULL == (diskfile = fopen(netoutfile,"r"))) { ffpmsg("Unable to reopen disk file (ftp_compress_open)"); ffpmsg(netoutfile); return (FILE_NOT_OPENED); } closefdiskfile++; if ((status = mem_create(url,handle))) { ffpmsg("Unable to create memory file (ftp_compress_open)"); ffpmsg(url); goto error; } closememfile++; status = 0; status = mem_uncompress2mem(url,diskfile,*handle); fclose(diskfile); closefdiskfile--; if (status) { ffpmsg("Error writing compressed memory file (ftp_compress_open)"); goto error; } } else { /* Opps, this should not have happened */ ffpmsg("Can only compressed files here (ftp_compress_open)"); goto error; } signal(SIGALRM, SIG_DFL); alarm(0); return mem_seek(*handle,0); error: alarm(0); /* clear it */ if (closeftpfile) { fclose(ftpfile); } if (closecommandfile) { fclose(command); } if (closefdiskfile) { fclose(diskfile); } if (closememfile) { mem_close_free(*handle); } if (closediskfile) { file_close(*handle); } signal(SIGALRM, SIG_DFL); return (FILE_NOT_OPENED); } /*--------------------------------------------------------------------------*/ /* Open a ftp connection to filename (really a URL), return ftpfile set to the file connection, and command set to the control connection, with sock also set to the control connection */ int ftp_open_network(char *filename, FILE **ftpfile, FILE **command, int *sock) { int status; int sock1; int tmpint; char recbuf[MAXLEN]; char errorstr[MAXLEN]; char tmpstr[MAXLEN]; char proto[SHORTLEN]; char host[SHORTLEN]; char *newhost; char *username; char *password; char fn[MAXLEN]; char *newfn; char *passive; char *tstr; char ip[SHORTLEN]; char turl[MAXLEN]; int port; /* parse the URL */ if (strlen(filename) > MAXLEN - 7) { ffpmsg("ftp filename is too long (ftp_open)"); return (FILE_NOT_OPENED); } strcpy(turl,"ftp://"); strcat(turl,filename); if (NET_ParseUrl(turl,proto,host,&port,fn)) { sprintf(errorstr,"URL Parse Error (ftp_open) %s",filename); ffpmsg(errorstr); return (FILE_NOT_OPENED); } #ifdef DEBUG printf ("proto, %s, host, %s, port %d, fn %s\n",proto,host,port,fn); #endif port = 21; /* we might have a user name */ username = "anonymous"; password = "user@host.com"; /* is there an @ sign */ if (NULL != (newhost = strrchr(host,'@'))) { *newhost = '\0'; /* make it a null, */ newhost++; /* Now newhost points to the host name and host points to the user name, password combo */ username = host; /* is there a : for a password */ if (NULL != strchr(username,':')) { password = strchr(username,':'); *password = '\0'; password++; } } else { newhost = host; } #ifdef DEBUG printf("User %s pass %s\n",username,password); #endif /* Connect to the host on the required port */ *sock = NET_TcpConnect(newhost,port); /* convert it to a stdio file */ if (NULL == (*command = fdopen(*sock,"r"))) { ffpmsg ("fdopen failed to convert socket to stdio file (ftp_open)"); return (FILE_NOT_OPENED); } /* Wait for the 220 response */ if (ftp_status(*command,"220 ")) { ffpmsg ("error connecting to remote server, no 220 seen (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } /* Send the user name and wait for the right response */ sprintf(tmpstr,"USER %s\n",username); status = NET_SendRaw(*sock,tmpstr,strlen(tmpstr),NET_DEFAULT); if (ftp_status(*command,"331 ")) { ffpmsg ("USER error no 331 seen (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } /* Send the password and wait for the right response */ sprintf(tmpstr,"PASS %s\n",password); status = NET_SendRaw(*sock,tmpstr,strlen(tmpstr),NET_DEFAULT); if (ftp_status(*command,"230 ")) { ffpmsg ("PASS error, no 230 seen (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } /* now do the cwd command */ newfn = strrchr(fn,'/'); if (newfn == NULL) { strcpy(tmpstr,"CWD /\n"); newfn = fn; } else { *newfn = '\0'; newfn++; if (strlen(fn) == 0) { strcpy(tmpstr,"CWD /\n"); } else { /* remove the leading slash */ if (fn[0] == '/') { sprintf(tmpstr,"CWD %s\n",&fn[1]); } else { sprintf(tmpstr,"CWD %s\n",fn); } } } #ifdef DEBUG printf("CWD command is %s\n",tmpstr); #endif status = NET_SendRaw(*sock,tmpstr,strlen(tmpstr),NET_DEFAULT); if (ftp_status(*command,"250 ")) { ffpmsg ("CWD error, no 250 seen (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } if (!strlen(newfn)) { ffpmsg("Null file name (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } /* Always use binary mode */ sprintf(tmpstr,"TYPE I\n"); status = NET_SendRaw(*sock,tmpstr,strlen(tmpstr),NET_DEFAULT); if (ftp_status(*command,"200 ")) { ffpmsg ("TYPE I error, 200 not seen (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } status = NET_SendRaw(*sock,"PASV\n",5,NET_DEFAULT); if (!(fgets(recbuf,MAXLEN,*command))) { ffpmsg ("PASV error (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } /* Passive mode response looks like 227 Entering Passive Mode (129,194,67,8,210,80) */ if (recbuf[0] == '2' && recbuf[1] == '2' && recbuf[2] == '7') { /* got a good passive mode response, find the opening ( */ if (!(passive = strchr(recbuf,'('))) { ffpmsg ("PASV error (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } *passive = '\0'; passive++; ip[0] = '\0'; /* Messy parsing of response from PASV *command */ if (!(tstr = strtok(passive,",)"))) { ffpmsg ("PASV error (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } strcpy(ip,tstr); strcat(ip,"."); if (!(tstr = strtok(NULL,",)"))) { ffpmsg ("PASV error (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } strcat(ip,tstr); strcat(ip,"."); if (!(tstr = strtok(NULL,",)"))) { ffpmsg ("PASV error (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } strcat(ip,tstr); strcat(ip,"."); if (!(tstr = strtok(NULL,",)"))) { ffpmsg ("PASV error (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } strcat(ip,tstr); /* Done the ip number, now do the port # */ if (!(tstr = strtok(NULL,",)"))) { ffpmsg ("PASV error (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } sscanf(tstr,"%d",&port); port *= 256; if (!(tstr = strtok(NULL,",)"))) { ffpmsg ("PASV error (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } sscanf(tstr,"%d",&tmpint); port += tmpint; if (!strlen(newfn)) { ffpmsg("Null file name (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } #ifdef DEBUG puts("connection to passive port"); #endif /* COnnect to the data port */ sock1 = NET_TcpConnect(ip,port); if (NULL == (*ftpfile = fdopen(sock1,"r"))) { ffpmsg ("Could not connect to passive port (ftp_open)"); fclose(*command); return (FILE_NOT_OPENED); } /* now we return */ /* Send the retrieve command */ sprintf(tmpstr,"RETR %s\n",newfn); status = NET_SendRaw(*sock,tmpstr,strlen(tmpstr),NET_DEFAULT); #ifdef DEBUG puts("Sent RETR command"); #endif if (ftp_status(*command,"150 ")) { /* ffpmsg ("RETR error, most likely file is not there (ftp_open)"); */ fclose(*command); #ifdef DEBUG puts("File not there"); #endif return (FILE_NOT_OPENED); } return 0; } /* no passive mode */ NET_SendRaw(*sock,"QUIT\n",5,NET_DEFAULT); fclose(*command); return (FILE_NOT_OPENED); } /*--------------------------------------------------------------------------*/ /* return a socket which results from connection to hostname on port port */ static int NET_TcpConnect(char *hostname, int port) { /* Connect to hostname on port */ struct sockaddr_in sockaddr; int sock; int stat; int val = 1; CreateSocketAddress(&sockaddr,hostname,port); /* Create socket */ if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { ffpmsg("Can't create socket"); return CONNECTION_ERROR; } if ((stat = connect(sock, (struct sockaddr*) &sockaddr, sizeof(sockaddr))) < 0) { close(sock); /* perror("NET_Tcpconnect - Connection error"); ffpmsg("Can't connect to host, connection error"); */ return CONNECTION_ERROR; } setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&val, sizeof(val)); setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (char *)&val, sizeof(val)); val = 65536; setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)&val, sizeof(val)); setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)&val, sizeof(val)); return sock; } /*--------------------------------------------------------------------------*/ /* Write len bytes from buffer to socket sock */ static int NET_SendRaw(int sock, const void *buffer, int length, int opt) { char * buf = (char *) buffer; int flag; int n, nsent = 0; switch (opt) { case NET_DEFAULT: flag = 0; break; case NET_OOB: flag = MSG_OOB; break; case NET_PEEK: default: flag = 0; break; } if (sock < 0) return -1; for (n = 0; n < length; n += nsent) { if ((nsent = send(sock, buf+n, length-n, flag)) <= 0) { return nsent; } #ifdef DEBUG printf ("send raw, sent %d bytes\n",nsent); #endif } #ifdef DEBUG printf ("send raw end, sent %d bytes\n",n); #endif return n; } /*--------------------------------------------------------------------------*/ static int NET_RecvRaw(int sock, void *buffer, int length) { /* Receive exactly length bytes into buffer. Returns number of bytes */ /* received. Returns -1 in case of error. */ int nrecv, n; char *buf = (char *)buffer; if (sock < 0) return -1; for (n = 0; n < length; n += nrecv) { while ((nrecv = recv(sock, buf+n, length-n, 0)) == -1 && errno == EINTR) errno = 0; /* probably a SIGCLD that was caught */ if (nrecv < 0) return nrecv; else if (nrecv == 0) break; /*/ EOF */ } return n; } /*--------------------------------------------------------------------------*/ /* Yet Another URL Parser url - input url proto - input protocol host - output host port - output port fn - output filename */ static int NET_ParseUrl(const char *url, char *proto, char *host, int *port, char *fn) { /* parses urls into their bits */ /* returns 1 if error, else 0 */ char *urlcopy, *urlcopyorig; char *ptrstr; char *thost; int isftp = 0; /* figure out if there is a http: or ftp: */ urlcopyorig = urlcopy = (char *) malloc(strlen(url)+1); strcpy(urlcopy,url); /* set some defaults */ *port = 80; strcpy(proto,"http:"); strcpy(host,"localhost"); strcpy(fn,"/"); ptrstr = strstr(urlcopy,"http:"); if (ptrstr == NULL) { /* Nope, not http: */ ptrstr = strstr(urlcopy,"root:"); if (ptrstr == NULL) { /* Nope, not root either */ ptrstr = strstr(urlcopy,"ftp:"); if (ptrstr != NULL) { if (ptrstr == urlcopy) { strcpy(proto,"ftp:"); *port = 21; isftp++; urlcopy += 4; /* move past ftp: */ } else { /* not at the beginning, bad url */ free(urlcopyorig); return 1; } } } else { if (ptrstr == urlcopy) { urlcopy += 5; /* move past root: */ } else { /* not at the beginning, bad url */ free(urlcopyorig); return 1; } } } else { if (ptrstr == urlcopy) { urlcopy += 5; /* move past http: */ } else { free(urlcopyorig); return 1; } } /* got the protocol */ /* get the hostname */ if (urlcopy[0] == '/' && urlcopy[1] == '/') { /* we have a hostname */ urlcopy += 2; /* move past the // */ } /* do this only if http */ if (!strcmp(proto,"http:")) { /* Move past any user:password */ if ((thost = strchr(urlcopy, '@')) != NULL) urlcopy = thost+1; strcpy(host,urlcopy); thost = host; while (*urlcopy != '/' && *urlcopy != ':' && *urlcopy) { thost++; urlcopy++; } /* we should either be at the end of the string, have a /, or have a : */ *thost = '\0'; if (*urlcopy == ':') { /* follows a port number */ urlcopy++; sscanf(urlcopy,"%d",port); while (*urlcopy != '/' && *urlcopy) urlcopy++; /* step to the */ } } else { /* do this for ftp */ strcpy(host,urlcopy); thost = host; while (*urlcopy != '/' && *urlcopy) { thost++; urlcopy++; } *thost = '\0'; /* Now, we should either be at the end of the string, or have a / */ } /* Now the rest is a fn */ if (*urlcopy) { strcpy(fn,urlcopy); } free(urlcopyorig); return 0; } /*--------------------------------------------------------------------------*/ /* Small helper functions to set the netoutfile static string */ /* Called by cfileio after parsing the output file off of the input file url */ int http_checkfile (char *urltype, char *infile, char *outfile1) { char newinfile[MAXLEN]; FILE *httpfile; char contentencoding[MAXLEN]; int contentlength; /* default to http:// if there is no output file */ strcpy(urltype,"http://"); if (strlen(outfile1)) { /* there is an output file */ /* don't copy the "file://" prefix, if present. */ if (!strncmp(outfile1, "file://", 7) ) strcpy(netoutfile,outfile1+7); else strcpy(netoutfile,outfile1); if (!strncmp(outfile1, "mem:", 4) ) { /* copy the file to memory, with READ and WRITE access In this case, it makes no difference whether the http file and or the output file are compressed or not. */ strcpy(urltype, "httpmem://"); /* use special driver */ return 0; } if (strstr(infile, "?")) { /* file name contains a '?' so probably a cgi string; don't open it */ strcpy(urltype,"httpfile://"); return 0; } if (!http_open_network(infile,&httpfile,contentencoding,&contentlength)) { fclose(httpfile); /* It's there, we're happy */ if (strstr(infile,".gz") || (strstr(infile,".Z"))) { /* It's compressed */ if (strstr(outfile1,".gz") || (strstr(outfile1,".Z"))) { strcpy(urltype,"httpcompress://"); } else { strcpy(urltype,"httpfile://"); } } else { strcpy(urltype,"httpfile://"); } return 0; } /* Ok, let's try the .gz one */ strcpy(newinfile,infile); strcat(newinfile,".gz"); if (!http_open_network(newinfile,&httpfile,contentencoding, &contentlength)) { fclose(httpfile); strcpy(infile,newinfile); /* It's there, we're happy, and, it's compressed */ /* It's compressed */ if (strstr(outfile1,".gz") || (strstr(outfile1,".Z"))) { strcpy(urltype,"httpcompress://"); } else { strcpy(urltype,"httpfile://"); } return 0; } /* Ok, let's try the .Z one */ strcpy(newinfile,infile); strcat(newinfile,".Z"); if (!http_open_network(newinfile,&httpfile,contentencoding, &contentlength)) { fclose(httpfile); strcpy(infile,newinfile); /* It's there, we're happy, and, it's compressed */ if (strstr(outfile1,".gz") || (strstr(outfile1,".Z"))) { strcpy(urltype,"httpcompress://"); } else { strcpy(urltype,"httpfile://"); } return 0; } } return 0; } /*--------------------------------------------------------------------------*/ int ftp_checkfile (char *urltype, char *infile, char *outfile1) { char newinfile[MAXLEN]; FILE *ftpfile; FILE *command; int sock; /* default to ftp:// */ strcpy(urltype,"ftp://"); if (strlen(outfile1)) { /* there is an output file */ /* don't copy the "file://" prefix, if present. */ if (!strncmp(outfile1, "file://", 7) ) strcpy(netoutfile,outfile1+7); else strcpy(netoutfile,outfile1); if (!strncmp(outfile1, "mem:", 4) ) { /* copy the file to memory, with READ and WRITE access In this case, it makes no difference whether the ftp file and or the output file are compressed or not. */ strcpy(urltype, "ftpmem://"); /* use special driver */ return 0; } if (!ftp_open_network(infile,&ftpfile,&command,&sock)) { fclose(ftpfile); fclose(command); /* It's there, we're happy */ if (strstr(infile,".gz") || (strstr(infile,".Z"))) { /* It's compressed */ if (strstr(outfile1,".gz") || (strstr(outfile1,".Z"))) { strcpy(urltype,"ftpcompress://"); } else { strcpy(urltype,"ftpfile://"); } } else { strcpy(urltype,"ftpfile://"); } return 0; } /* Ok, let's try the .gz one */ strcpy(newinfile,infile); strcat(newinfile,".gz"); if (!ftp_open_network(newinfile,&ftpfile,&command,&sock)) { fclose(ftpfile); fclose(command); strcpy(infile,newinfile); /* It's there, we're happy, and, it's compressed */ if (strstr(outfile1,".gz") || (strstr(outfile1,".Z"))) { strcpy(urltype,"ftpcompress://"); } else { strcpy(urltype,"ftpfile://"); } return 0; } /* Ok, let's try the .Z one */ strcpy(newinfile,infile); strcat(newinfile,".Z"); if (!ftp_open_network(newinfile,&ftpfile,&command,&sock)) { fclose(ftpfile); fclose(command); strcpy(infile,newinfile); if (strstr(outfile1,".gz") || (strstr(outfile1,".Z"))) { strcpy(urltype,"ftpcompress://"); } else { strcpy(urltype,"ftpfile://"); } return 0; } } return 0; } /*--------------------------------------------------------------------------*/ /* A small helper function to wait for a particular status on the ftp connectino */ static int ftp_status(FILE *ftp, char *statusstr) { /* read through until we find a string beginning with statusstr */ /* This needs a timeout */ char recbuf[MAXLEN]; int len; len = strlen(statusstr); while (1) { if (!(fgets(recbuf,MAXLEN,ftp))) { #ifdef DEBUG puts("error reading response in ftp_status"); #endif return 1; /* error reading */ } #ifdef DEBUG printf("ftp_status, return string was %s\n",recbuf); #endif recbuf[len] = '\0'; /* make it short */ if (!strcmp(recbuf,statusstr)) { return 0; /* we're ok */ } if (recbuf[0] > '3') { /* oh well, some sort of error */ return 1; } } } /* *---------------------------------------------------------------------- * * CreateSocketAddress -- * * This function initializes a sockaddr structure for a host and port. * * Results: * 1 if the host was valid, 0 if the host could not be converted to * an IP address. * * Side effects: * Fills in the *sockaddrPtr structure. * *---------------------------------------------------------------------- */ static int CreateSocketAddress( struct sockaddr_in *sockaddrPtr, /* Socket address */ char *host, /* Host. NULL implies INADDR_ANY */ int port) /* Port number */ { struct hostent *hostent; /* Host database entry */ struct in_addr addr; /* For 64/32 bit madness */ char localhost[MAXLEN]; strcpy(localhost,host); memset((void *) sockaddrPtr, '\0', sizeof(struct sockaddr_in)); sockaddrPtr->sin_family = AF_INET; sockaddrPtr->sin_port = htons((unsigned short) (port & 0xFFFF)); if (host == NULL) { addr.s_addr = INADDR_ANY; } else { addr.s_addr = inet_addr(localhost); if (addr.s_addr == 0xFFFFFFFF) { hostent = gethostbyname(localhost); if (hostent != NULL) { memcpy((void *) &addr, (void *) hostent->h_addr_list[0], (size_t) hostent->h_length); } else { #ifdef EHOSTUNREACH errno = EHOSTUNREACH; #else #ifdef ENXIO errno = ENXIO; #endif #endif return 0; /* error */ } } } /* * NOTE: On 64 bit machines the assignment below is rumored to not * do the right thing. Please report errors related to this if you * observe incorrect behavior on 64 bit machines such as DEC Alphas. * Should we modify this code to do an explicit memcpy? */ sockaddrPtr->sin_addr.s_addr = addr.s_addr; return 1; /* Success. */ } /* Signal handler for timeouts */ static void signal_handler(int sig) { switch (sig) { case SIGALRM: /* process for alarm */ longjmp(env,sig); default: { /* Hmm, shouldn't have happend */ exit(sig); } } } /**************************************************************/ /* Root driver */ /*--------------------------------------------------------------------------*/ int root_init(void) { int ii; for (ii = 0; ii < NMAXFILES; ii++) /* initialize all empty slots in table */ { handleTable[ii].sock = 0; handleTable[ii].currentpos = 0; } return(0); } /*--------------------------------------------------------------------------*/ int root_setoptions(int options) { /* do something with the options argument, to stop compiler warning */ options = 0; return(options); } /*--------------------------------------------------------------------------*/ int root_getoptions(int *options) { *options = 0; return(0); } /*--------------------------------------------------------------------------*/ int root_getversion(int *version) { *version = 10; return(0); } /*--------------------------------------------------------------------------*/ int root_shutdown(void) { return(0); } /*--------------------------------------------------------------------------*/ int root_open(char *url, int rwmode, int *handle) { int ii, status; int sock; *handle = -1; for (ii = 0; ii < NMAXFILES; ii++) /* find empty slot in table */ { if (handleTable[ii].sock == 0) { *handle = ii; break; } } if (*handle == -1) return(TOO_MANY_FILES); /* too many files opened */ /*open the file */ if (rwmode) { status = root_openfile(url, "update", &sock); } else { status = root_openfile(url, "read", &sock); } if (status) return(status); handleTable[ii].sock = sock; handleTable[ii].currentpos = 0; return(0); } /*--------------------------------------------------------------------------*/ int root_create(char *filename, int *handle) { int ii, status; int sock; *handle = -1; for (ii = 0; ii < NMAXFILES; ii++) /* find empty slot in table */ { if (handleTable[ii].sock == 0) { *handle = ii; break; } } if (*handle == -1) return(TOO_MANY_FILES); /* too many files opened */ /*open the file */ status = root_openfile(filename, "create", &sock); if (status) { ffpmsg("Unable to create file"); return(status); } handleTable[ii].sock = sock; handleTable[ii].currentpos = 0; return(0); } /*--------------------------------------------------------------------------*/ int root_size(int handle, LONGLONG *filesize) /* return the size of the file in bytes */ { int sock; int offset; int status; int op; sock = handleTable[handle].sock; status = root_send_buffer(sock,ROOTD_STAT,NULL,0); status = root_recv_buffer(sock,&op,(char *)&offset, 4); *filesize = (LONGLONG) ntohl(offset); return(0); } /*--------------------------------------------------------------------------*/ int root_close(int handle) /* close the file */ { int status; int sock; sock = handleTable[handle].sock; status = root_send_buffer(sock,ROOTD_CLOSE,NULL,0); close(sock); handleTable[handle].sock = 0; return(0); } /*--------------------------------------------------------------------------*/ int root_flush(int handle) /* flush the file */ { int status; int sock; sock = handleTable[handle].sock; status = root_send_buffer(sock,ROOTD_FLUSH,NULL,0); return(0); } /*--------------------------------------------------------------------------*/ int root_seek(int handle, LONGLONG offset) /* seek to position relative to start of the file */ { handleTable[handle].currentpos = offset; return(0); } /*--------------------------------------------------------------------------*/ int root_read(int hdl, void *buffer, long nbytes) /* read bytes from the current position in the file */ { char msg[SHORTLEN]; int op; int status; int astat; /* we presume here that the file position will never be > 2**31 = 2.1GB */ sprintf(msg,"%ld %ld ",(long) handleTable[hdl].currentpos,nbytes); status = root_send_buffer(handleTable[hdl].sock,ROOTD_GET,msg,strlen(msg)); if ((unsigned) status != strlen(msg)) { return (READ_ERROR); } astat = 0; status = root_recv_buffer(handleTable[hdl].sock,&op,(char *) &astat,4); if (astat != 0) { return (READ_ERROR); } #ifdef DEBUG printf("root_read, op %d astat %d\n",op,astat); #endif status = NET_RecvRaw(handleTable[hdl].sock,buffer,nbytes); if (status != nbytes) { return (READ_ERROR); } handleTable[hdl].currentpos += nbytes; return(0); } /*--------------------------------------------------------------------------*/ int root_write(int hdl, void *buffer, long nbytes) /* write bytes at the current position in the file */ { char msg[SHORTLEN]; int len; int sock; int status; int astat; int op; sock = handleTable[hdl].sock; /* we presume here that the file position will never be > 2**31 = 2.1GB */ sprintf(msg,"%ld %ld ",(long) handleTable[hdl].currentpos,nbytes); len = strlen(msg); status = root_send_buffer(sock,ROOTD_PUT,msg,len+1); if (status != len+1) { return (WRITE_ERROR); } status = NET_SendRaw(sock,buffer,nbytes,NET_DEFAULT); if (status != nbytes) { return (WRITE_ERROR); } astat = 0; status = root_recv_buffer(handleTable[hdl].sock,&op,(char *) &astat,4); #ifdef DEBUG printf("root_read, op %d astat %d\n",op,astat); #endif if (astat != 0) { return (WRITE_ERROR); } handleTable[hdl].currentpos += nbytes; return(0); } /*--------------------------------------------------------------------------*/ int root_openfile(char *url, char *rwmode, int *sock) /* lowest level routine to physically open a root file */ { int status; char recbuf[MAXLEN]; char errorstr[MAXLEN]; char proto[SHORTLEN]; char host[SHORTLEN]; char fn[MAXLEN]; char turl[MAXLEN]; int port; int op; int ii; int authstat; /* Parse the URL apart again */ strcpy(turl,"root://"); strcat(turl,url); if (NET_ParseUrl(turl,proto,host,&port,fn)) { sprintf(errorstr,"URL Parse Error (root_open) %s",url); ffpmsg(errorstr); return (FILE_NOT_OPENED); } #ifdef DEBUG printf("Connecting to %s on port %d\n",host,port); #endif /* Connect to the remote host */ *sock = NET_TcpConnect(host,port); if (*sock < 0) { ffpmsg("Couldn't connect to host (http_open_network)"); return (FILE_NOT_OPENED); } /* get the username */ if (NULL != getenv("ROOTUSERNAME")) { strcpy(recbuf,getenv("ROOTUSERNAME")); } else { printf("Username: "); fgets(recbuf,MAXLEN,stdin); recbuf[strlen(recbuf)-1] = '\0'; } status = root_send_buffer(*sock, ROOTD_USER, recbuf,strlen(recbuf)); if (status < 0) { ffpmsg("error talking to remote system on username "); return (FILE_NOT_OPENED); } status = root_recv_buffer(*sock,&op,(char *)&authstat,4); if (!status) { ffpmsg("error talking to remote system on username"); return (FILE_NOT_OPENED); } #ifdef DEBUG printf("op is %d and authstat is %d\n",op,authstat); #endif if (op != ROOTD_AUTH) { ffpmsg("ERROR on ROOTD_USER"); ffpmsg(recbuf); return (FILE_NOT_OPENED); } /* now the password */ if (NULL != getenv("ROOTPASSWORD")) { strcpy(recbuf,getenv("ROOTPASSWORD")); } else { printf("Password: "); fgets(recbuf,MAXLEN,stdin); recbuf[strlen(recbuf)-1] = '\0'; } /* ones complement the password */ for (ii=0;(unsigned) ii includes the 4 bytes for the op, the length bytes (4) are implicit if buffer is null don't send it, not everything needs something sent */ int len; int status; int hdr[2]; len = 4; if (buffer != NULL) { len += buflen; } hdr[0] = htonl(len); #ifdef DEBUG printf("len sent is %x\n",hdr[0]); #endif hdr[1] = htonl(op); #ifdef DEBUG printf("op sent is %x\n",hdr[1]); #endif #ifdef DEBUG printf("Sending op %d and length of %d\n",op,len); #endif status = NET_SendRaw(sock,hdr,sizeof(hdr),NET_DEFAULT); if (status < 0) { return status; } if (buffer != NULL) { status = NET_SendRaw(sock,buffer,buflen,NET_DEFAULT); } return status; } static int root_recv_buffer(int sock, int *op, char *buffer, int buflen) { /* recv a buffer, the form is */ int recv1 = 0; int len; int status; char recbuf[MAXLEN]; status = NET_RecvRaw(sock,&len,4); #ifdef DEBUG printf("Recv: status from rec is %d\n",status); #endif if (status < 0) { return status; } recv1 += status; len = ntohl(len); #ifdef DEBUG printf ("Recv: length is %d\n",len); #endif /* ok, have the length, recive the operation */ len -= 4; status = NET_RecvRaw(sock,op,4); if (status < 0) { return status; } recv1 += status; *op = ntohl(*op); #ifdef DEBUG printf ("Recv: Operation is %d\n",*op); #endif if (len > MAXLEN) { len = MAXLEN; } if (len > 0) { /* Get the rest of the message */ status = NET_RecvRaw(sock,recbuf,len); if (len > buflen) { len = buflen; } memcpy(buffer,recbuf,len); if (status < 0) { return status; } } recv1 += status; return recv1; } /*****************************************************************************/ /* Encode a string into MIME Base64 format string */ static int encode64(unsigned s_len, char *src, unsigned d_len, char *dst) { static char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789" "+/"; unsigned triad; for (triad = 0; triad < s_len; triad += 3) { unsigned long int sr; unsigned byte; for (byte = 0; (byte<3) && (triad+byte #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffpprui(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write (1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned short *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; unsigned short nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_pixels(fptr, TUSHORT, firstelem, nelem, 0, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpclui(fptr, 2, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffppnui(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned short *array, /* I - array of values that are written */ unsigned short nulval, /* I - undefined pixel value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). Any array values that are equal to the value of nulval will be replaced with the null pixel value that is appropriate for this column. */ { long row; unsigned short nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_write_compressed_pixels(fptr, TUSHORT, firstelem, nelem, 1, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcnui(fptr, 2, row, firstelem, nelem, array, nulval, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp2dui(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ unsigned short *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { /* call the 3D writing routine, with the 3rd dimension = 1 */ ffp3dui(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp3dui(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ unsigned short *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 3-D cube of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow, ii, jj; long fpixel[3]= {1,1,1}, lpixel[3]; LONGLONG nfits, narray; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = (long) ncols; lpixel[1] = (long) nrows; lpixel[2] = (long) naxis3; fits_write_compressed_img(fptr, TUSHORT, fpixel, lpixel, 0, array, NULL, status); return(*status); } tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so write all at once */ ffpclui(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to write to */ narray = 0; /* next pixel in input array to be written */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* writing naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffpclui(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpssui(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long naxis, /* I - number of data axes in array */ long *naxes, /* I - size of each FITS axis */ long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ long *lpixel, /* I - last pixel in each axis to write */ unsigned short *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write a subsection of pixels to the primary array or image. A subsection is defined to be any contiguous rectangular array of pixels within the n-dimensional FITS data file. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow; LONGLONG fpix[7], dimen[7], astart, pstart; LONGLONG off2, off3, off4, off5, off6, off7; LONGLONG st10, st20, st30, st40, st50, st60, st70; LONGLONG st1, st2, st3, st4, st5, st6, st7; long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; if (*status > 0) return(*status); if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_img(fptr, TUSHORT, fpixel, lpixel, 0, array, NULL, status); return(*status); } if (naxis < 1 || naxis > 7) return(*status = BAD_DIMEN); tablerow=maxvalue(1,group); /* calculate the size and number of loops to perform in each dimension */ for (ii = 0; ii < 7; ii++) { fpix[ii]=1; irange[ii]=1; dimen[ii]=1; } for (ii = 0; ii < naxis; ii++) { fpix[ii]=fpixel[ii]; irange[ii]=lpixel[ii]-fpixel[ii]+1; dimen[ii]=naxes[ii]; } i1=irange[0]; /* compute the pixel offset between each dimension */ off2 = dimen[0]; off3 = off2 * dimen[1]; off4 = off3 * dimen[2]; off5 = off4 * dimen[3]; off6 = off5 * dimen[4]; off7 = off6 * dimen[5]; st10 = fpix[0]; st20 = (fpix[1] - 1) * off2; st30 = (fpix[2] - 1) * off3; st40 = (fpix[3] - 1) * off4; st50 = (fpix[4] - 1) * off5; st60 = (fpix[5] - 1) * off6; st70 = (fpix[6] - 1) * off7; /* store the initial offset in each dimension */ st1 = st10; st2 = st20; st3 = st30; st4 = st40; st5 = st50; st6 = st60; st7 = st70; astart = 0; for (i7 = 0; i7 < irange[6]; i7++) { for (i6 = 0; i6 < irange[5]; i6++) { for (i5 = 0; i5 < irange[4]; i5++) { for (i4 = 0; i4 < irange[3]; i4++) { for (i3 = 0; i3 < irange[2]; i3++) { pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; for (i2 = 0; i2 < irange[1]; i2++) { if (ffpclui(fptr, 2, tablerow, pstart, i1, &array[astart], status) > 0) return(*status); astart += i1; pstart += off2; } st2 = st20; st3 = st3+off3; } st3 = st30; st4 = st4+off4; } st4 = st40; st5 = st5+off5; } st5 = st50; st6 = st6+off6; } st6 = st60; st7 = st7+off7; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpgpui( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long firstelem, /* I - first vector element to write(1 = 1st) */ long nelem, /* I - number of values to write */ unsigned short *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of group parameters to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffpclui(fptr, 1L, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpclui( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned short *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of values to a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. */ { int tcode, maxelem, hdutype; long twidth, incre; long ntodo; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull; double scale, zero; char tform[20], cform[20]; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); if (tcode == TSTRING) ffcfmt(tform, cform); /* derive C format for writing strings */ /*---------------------------------------------------------------------*/ /* Now write the pixels to the FITS column. */ /* First call the ffXXfYY routine to (1) convert the datatype */ /* if necessary, and (2) scale the values by the FITS TSCALn and */ /* TZEROn linear scaling parameters into a temporary buffer. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to process a one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ switch (tcode) { case (TSHORT): ffu2fi2(&array[next], ntodo, scale, zero, (short *) buffer, status); ffpi2b(fptr, ntodo, incre, (short *) buffer, status); break; case (TLONGLONG): ffu2fi8(&array[next], ntodo, scale, zero, (LONGLONG *) buffer, status); ffpi8b(fptr, ntodo, incre, (long *) buffer, status); break; case (TBYTE): ffu2fi1(&array[next], ntodo, scale, zero, (unsigned char *) buffer, status); ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); break; case (TLONG): ffu2fi4(&array[next], ntodo, scale, zero, (INT32BIT *) buffer, status); ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); break; case (TFLOAT): ffu2fr4(&array[next], ntodo, scale, zero, (float *) buffer, status); ffpr4b(fptr, ntodo, incre, (float *) buffer, status); break; case (TDOUBLE): ffu2fr8(&array[next], ntodo, scale, zero, (double *) buffer, status); ffpr8b(fptr, ntodo, incre, (double *) buffer, status); break; case (TSTRING): /* numerical column in an ASCII table */ if (cform[1] != 's') /* "%s" format is a string */ { ffu2fstr(&array[next], ntodo, scale, zero, cform, twidth, (char *) buffer, status); if (incre == twidth) /* contiguous bytes */ ffpbyt(fptr, ntodo * twidth, buffer, status); else ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); break; } /* can't write to string column, so fall thru to default: */ default: /* error trap */ sprintf(message, "Cannot write numbers to column %d which has format %s", colnum,tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing elements %.0f thru %.0f of input data array (ffpclui).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while writing FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpcnui(fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ unsigned short *array, /* I - array of values to write */ unsigned short nulvalue, /* I - value used to flag undefined pixels */ int *status) /* IO - error status */ /* Write an array of elements to the specified column of a table. Any input pixels equal to the value of nulvalue will be replaced by the appropriate null value in the output FITS file. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary */ { tcolumn *colptr; long ngood = 0, nbad = 0, ii; LONGLONG repeat, first, fstelm, fstrow; int tcode, overflow = 0; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode > 0) repeat = colptr->trepeat; /* repeat count for this column */ else repeat = firstelem -1 + nelem; /* variable length arrays */ /* if variable length array, first write the whole input vector, then go back and fill in the nulls */ if (tcode < 0) { if (ffpclui(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { if (*status == NUM_OVERFLOW) { /* ignore overflows, which are possibly the null pixel values */ /* overflow = 1; */ *status = 0; } else { return(*status); } } } /* absolute element number in the column */ first = (firstrow - 1) * repeat + firstelem; for (ii = 0; ii < nelem; ii++) { if (array[ii] != nulvalue) /* is this a good pixel? */ { if (nbad) /* write previous string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (ffpclu(fptr, colnum, fstrow, fstelm, nbad, status) > 0) return(*status); nbad=0; } ngood = ngood +1; /* the consecutive number of good pixels */ } else { if (ngood) /* write previous string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ if (ffpclui(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status) > 0) { if (*status == NUM_OVERFLOW) { overflow = 1; *status = 0; } else { return(*status); } } } ngood=0; } nbad = nbad +1; /* the consecutive number of bad pixels */ } } /* finished loop; now just write the last set of pixels */ if (ngood) /* write last string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ ffpclui(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); } } else if (nbad) /* write last string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpclu(fptr, colnum, fstrow, fstelm, nbad, status); } if (*status <= 0) { if (overflow) { *status = NUM_OVERFLOW; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffu2fi1(unsigned short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ unsigned char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] > UCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = ((double) input[ii] - zero) / scale; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) (dvalue + .5); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffu2fi2(unsigned short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ short *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 32768.) { /* Instead of subtracting 32768, it is more efficient */ /* to just flip the sign bit with the XOR operator */ for (ii = 0; ii < ntodo; ii++) output[ii] = ( *(short *) &input[ii] ) ^ 0x8000; } else if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] > SHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = ((double) input[ii] - zero) / scale; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else { if (dvalue >= 0) output[ii] = (short) (dvalue + .5); else output[ii] = (short) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffu2fi4(unsigned short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ INT32BIT *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (INT32BIT) input[ii]; /* copy input to output */ } else { for (ii = 0; ii < ntodo; ii++) { dvalue = ((double) input[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else { if (dvalue >= 0) output[ii] = (INT32BIT) (dvalue + .5); else output[ii] = (INT32BIT) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffu2fi8(unsigned short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ LONGLONG *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = input[ii]; } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else { if (dvalue >= 0) output[ii] = (LONGLONG) (dvalue + .5); else output[ii] = (LONGLONG) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffu2fr4(unsigned short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ float *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) (((double) input[ii] - zero) / scale); } return(*status); } /*--------------------------------------------------------------------------*/ int ffu2fr8(unsigned short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ double *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (double) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = ((double) input[ii] - zero) / scale; } return(*status); } /*--------------------------------------------------------------------------*/ int ffu2fstr(unsigned short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ char *cform, /* I - format for output string values */ long twidth, /* I - width of each field, in chars */ char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do scaling if required. */ { long ii; double dvalue; char *cptr; cptr = output; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { sprintf(output, cform, (double) input[ii]); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = ((double) input[ii] - zero) / scale; sprintf(output, cform, dvalue); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } /* replace any commas with periods (e.g., in French locale) */ while ((cptr = strchr(cptr, ','))) *cptr = '.'; return(*status); } astropy-1.1.1/cextern/cfitsio/changes.txt0000644001134200020070000055216612602615520021416 0ustar embrayscience00000000000000 Log of Changes Made to CFITSIO - modified Makefile.in so that doing 'make distclean' does not delete new config.sub and config.guess files that were recently added. Version 3.35 - 26 June 2013 (1st beta release on 24 May) - fixed problem with the default tile size when compressing images with fpack using the Hcompress algorithm. - fixed returned value ("status" instead of "*status") - in imcompress.c, declared some arrays that are used to store the dimensions of the image from 'int' to 'long', to support very large images (at least on systems where sizeof(long) = 8), - modified the routines that convert a string value to a float or double to prevent them from returning a NaN or Inf value if the string is "NaN" or "Inf" (as can happen with gcc implementation of the strtod function). - removed/replaced the use of the assert() functions when locking or unlocking threads because they did not work correctly if NDEBUG is defined. - made modifications to the way the command-line file filters are parsed to 1) remove the 1024-character limit when specifying a column filter, 2) fixed a potential character buffer-overflow risk in fits_get_token, and 3) improved the parsing logic to remove any possible of confusing 2 slash characters ("//") in the string as the beginning of a comment string. - modified configure and Makefile.in so that when building CFITSIO as a shared library on linux or Mac platforms, it will use the SONAME convention to indicate whether each new release of the CFITSIO library is binary-compatible with the previous version. Application programs that link with the shared library will not need to be recompiled as long as the versions are compatible. In practice, this means that the shared library binary file that is created (on Linux systems) will have a name like 'libcfitsio.so.I.J.K', where I is the SONAME version number, J is the major CFITSIO version number (e.g. 3), and K is the minor CFITSIO version number (e.g., 34). Two link files will also be created such that libcfitsio.so -> libcfitsio.so.I, and libcfitsio.so.I -> libcfitsio.I.J.K Application programs will still run correctly with the new version of CFITSIO as long as the 'I' version number remains the same, but the applications will fail to run if the 'I' number changes, thus alerting the user that the application must be rebuilt. - fixed bug in fits_insert_col when computing the new table row width when inserting a '1Q' variable length array column. - modified the image compression routines so that the output compressed image (stored in a FITS binary table) uses the '1Q' variable length array format (instead of '1P') when the input file is larger than 4 GB. - added support for "compression directive" keywords which indicate how that HDU should be compressed (e.g., which compression algorithm to use, what tiling pattern to use, etc.). The values of these keywords will override the compression parameters that were specified on the command line when running the fpack FITS file compression program. - globally changed the variable and/or subroutine name "dither_offset" to "dither_seed" and "quantize_dither" to "quantize_method" so that the names more accurately reflects their purpose. - added support for a new SUBTRACTIVE_DITHER_2 method when compressing floating point images. The only difference with the previous method is that pixels with a value exactly equal to 0.0 will not be dithered, and instead will be exactly preserved when the image is compressed. - added support for an alias of "RICE_ONE" for "RICE_1" as the value of the ZCMPTYPE keyword, which gives the name of the image compression algorithm. This alias is used if the new SUBTRACTIVE_DITHER_2 option is used, to prevent old versions of funpack from creating a corrupted uncompressed image file. Only newer versions of funpack will recognize this alias and be able to uncompress the image. - made performance improvement to fits_read_compressed_img so that when reading a section of an compressed image that includes only every nth pixel in some dimension, it will only uncompressed a tile if there are actually any pixels of interest in that tile. - fixed several issues with the beta FITS binary table compression code that is used by fpack: added support for zero-length vector columns, made improvements to the output report when using the -T option in fpack, changed the default table compression method to 'Rice' instead of 'Best', and now writes the 'ZTILELEN' keyword to document the number of table rows in each tile. - fixed error in ffbinit in calculating the total length of the binary table extension if the THEAP keyword was used to override the default starting location of the heap. Version 3.34 - 20 March 2013 - modified configure and configure.in to support cross-compiled cfitsio as a static library for Windows on a Linux platform using MXE (http://mxe.cc) - a build environment for mingw32. (contributed by Niels Kristian Bech Jensen) - added conditional compilation statementsfor the mingw32 environment in drvrfile.c because mingw32 does not include the ftello and fseeko functions. (contributed by Niels Kristian Bech Jensen) - fixed a potential bug in ffcpcl (routine to copy a column from one table to another table) when dealing with the rare case of a '0X' column (zero length bit column). - fixed an issue in the routines that update or modify string-valued keyword values, as a result of the change to ffc2s in the previous release. These routines would exit with a 204 error status if the current value of the keyword to be updated or modified is null. - fixed typo in the previous modification that was intended to ignore numerical overflows in Hcompress when decompressing an image. - moved the 'startcol' static variable out of the ffgcnn routine and instead added it as a member of the 'FITSfile' structure that is defined in fitsio.h. This removes a possible race condition in ffgcnn in multi-threaded environments. Version 3.33 - 14 Feb 2013 - modified the imcomp_decompress_tile routine to ignore any numerical overflows that might occur when using Hcompress to decompress the image. If Hcompress is used in its 'lossy' mode, the uncompressed image pixel values may slightly exceed the range of an integer*2 variable. This is generally of no consequence, so we can safely ignore any overflows in this case and just clip the values to the legal range. - the default tiling pattern when writing a tile-compressed image has been changed. The old behavior was to compress the whole image as one single large tile. This is often not optimal when dealing with large images, so the new default behavior is to treat each row of the image as one tile. This is the same default behavior as in the standalone fpack program. The default tile size can be overridden by calling fits_set_tile_dim. - fixed bug that resulted in a corrupted output FITS image when attempting to write a float or double array of values to a tile-compressed integer data type image. CFITSIO does not support implicit data type conversion in this case and now correctly returns an appropriate error status. - modified ricecomp.c to define the nonzero_count lookup table as an external variable, rather then dynamically allocating it within the 3 routines that use it. This simplifies the code and eliminates the need for special thread locking and unlocking statements. (Thanks to Lars Kr. Lundin for this suggestion). - modifed how the uncompressed size of a gzipped file is computed in the mem_compress_open routine in drvrmem.c. Since gzip only uses 4 bytes in the compressed file header to store the original file size, one may need to apply a modulo 2^32 byte correction in some cases. The logic here was modified to allow for corner cases (e.g., very small files, and when running on 32-bit platforms that do not support files larger than 2^31 bytes in size). - added new public routine to construct a 80 keyword record from the 3 input component strings, i.e, the keyword name string, the value string, and the comment string: fits_make_key/ffmkky. (This was already an undocumented internal routine in previous versions of CFITSIO). - modified ffc2s so that if the input keyword value string is a null string, then it will return a VALUE_UNDEFINED (204) status value. This makes it consistent with the behavior when attempting to read a null keyword (which has no value) as a logical or as a number (which also returns the 204 error). This should only affect cases where the header keyword does not have an equal sign followed by a space character in columns 9 and 10 of the header record. - Changed the "char *" parameter declarations to "const char *" in many of the routines (mainly the routines that modify or update keywords) to avoid compiler warnings or errors from C++ programs that tend to be more rigorous about using "const char *" when appropriate. - added support for caching uncompressed image tiles, so that the tile does not need to be uncompressed again if the application program wants to read more data from the same tile. This required changes to the main FITS file structure that is defined in fitsio.h, as well as changes to imcompress.c. - enhanced the previous modification to drvrfile.c to handle additional user cases when running in the HEASARC's Hera environment. Version 3.32 - Oct 2012 - fixed flaw in the way logical columns (TFORM = 'L') in binary tables were read which caused an illegal value of 1 in the column to be interpreted as a 'T' (TRUE) value. - extended the column filtering syntax in the CFITSIO file name parser to enable users and scripts to append new COMMENT or HISTORY keyword into the header of the filtered file (provided by Craig Markwardt). For example, fcopy "infile.fits[col #HISTORY='Processed on 2012-10-05']" outfile.fits will append this header keyword: "HISTORY Processed on 2012-10-05" - small change to the code that opens and reads an ASCII region file to return an error if the file is empty. - fixed obscure sign propagation error when attempting to read the uncompressed size of a gzipped FITS file. This resulted in a memory allocation error if the gzipped file had an uncompressed file size between 2^31 and 2^32 bytes. Fix supplied by Gudlaugur Johannesson (Stanford). Version 3.31 - 18 July 2012 - enhanced the CFITSIO column filtering syntax to allow the comma, in addition to the semi-colon, to be used to separate clauses, for example: [col X,Y;Z = max(X,Y)]. This was done because users are not allowed to enter the semi-colon character in the on-line Hera data processing system due to computer security concerns. - enhanced the CFITSIO extended filename syntax to allow specifying image compression parameters (e.g. '[compress Rice]') when opening an existing FITS file with write access. The specified compression parameters will be used by default if more images are appended to the existing file. - modified drvrfile.c to do additional file security checks when CFITSIO is running within the HEASARC's Hera software system. In this case CFITSIO will not allow FITS files to be created outside of the user's individual Hera data directory area. - fixed an issue in fpack and funpack on Windows machines, caused by the fact that the 'rename' function behaves differently on Windows in that it does not clobber an existing file, as it does on Unix platforms. - fixed bug in the way byte-swapping was being performed when writing integer*8 null values to an image or binary table column. - added the missing macro definition for fffree to fitsio.h. - modified the low level table read and write functions in getcol*.c and putcol*.c to remove the 32-bit limitation on the number of elements. These routines now support reading and writing more than 2**31 elements at one time. Thanks to Keh-Cheng Chu (Stanford U.) for the patch. - modified Makefile.in so that the shared libcfitsio.so is linked against pthreads and libm. Version 3.30 - 11 April 2012 Enhancements - Added new routine called fits_is_reentrant which returns 1 or 0 depending on whether or not CFITSIO was compiled with the -D_REENTRANT directive. This can be used to determine if it is safe to use CFITSIO in multi-threaded programs. - Implemented much faster byte-swapping algorithms in swapproc.c based on code provided by Julian Taylor at ESO, Garching. These routines significantly improve the FITS image read and write speed (by more than a factor of 2 in some cases) on little-endian machines (e.g., Linux and Microsoft Windows and Macs running on x86 CPUs) where byte-swapping is required when reading and writing data in FITS files. This has no effect on big-endian machines (e.g. Motorola CPUs and some IBM systems). Even faster byte-swapping performance can be achieved in some cases by invoking the new "--enable-sse2" or "--enable-ssse3" configure options when building CFITSIO on machines that have CPUs and compilers that support the SSE2 and SSSE3 machine instructions. - added additional support for implicit data type conversion in cases where the floating point image has been losslessly compressed with gzip. The pixels in these compressed images can now be read back as arrays of short, int, and long integers as well as single and double precision floating-point. - modified fitsio2.h and f77_wrap.h to recognize IBM System z mainframes by testing if __s390x__ or __s390__ is defined. - small change to ffgcrd in getkey.c so that it supports reading a blank keyword (e.g., a keyword whose name simply contains 8 space characters). Bug Fixes - fixed a bug in imcomp_decompress_tile that caused the tile-compressed image to be uncompressed incorrectly (even though the tile-compressed image itself was written correctly) under the following specific conditions: - the original FITS image has a "float" datatype (R*4) - one or more of the image tiles cannot be compressed using the standard quantization method and instead are losslessly compressed with gzip - the pixels in these tiles are not all equal to zero (this bug does affect tiles where all the pixels are equal to zero) - the program that is reading the compressed image uses CFITSIO's "implicit datatype conversion" feature to read the "float" image back into an array of "double" pixel values. If all these conditions are met, then the returned pixel values in the affected image tiles will be garbage, with values often ranging up to 10**34. Note that this bug does not affect the fpack/funpack programs, because funpack does not use CFITSIO's implicit datatype conversion feature when uncompressing the image. Version 3.29 - 2 December 2011 Enhancements - modified Makefile.in to allow configure to override the lib and include destination directories. - added (or restored actually) support for tile compression of 1-byte integer images in imcomp_compress_tile. Support for that data type was overlooked during recent updates to this routine. - modified the fits_get_token command-line parsing routine to perform more rigorous checks to determine if the token can be interpreted as a number or not. - made small modification to fpack.c to not allow the -i2f option (convert image from integer to floating point) with the "-g -q 0" option (do lossless gzip compression). It is more efficient to simply use the -g option alone. - made modifications to fitsio.h and drvrfile.c to support reading and writing large FITS files (> 2.1 GB) when building CFITSIO using Microsoft Visual C++ on Windows platforms. - added new WCS routine (ffgicsa) which returns the WCS keyword values for a particular WCS version ('A' - 'Z'). Bug Fixes - fixed a problem with multi-threaded apps that open/close FITS files simultaneously by putting mutex locks around the call to fits_already_open and in fits_clear_Fptr. - fixed a bug when using the 'regfilter' function to select a subset of the rows in a FITS table that have coordinates that lie within a specified spatial region on the sky. This bug only affects the rarely used panda (and epanda and bpanda) region shapes in which the region is defined by the intersection of an annulus and a pie-shaped wedge. The previous code (starting with version 3.181 of CFITSIO where support for the panda region was first introduced) only worked correctly if the 2 angles that define the wedge have values between -180 and +180. If not, then fewer rows than expected may have been selected from the table. - fixed the extended filename parser so that when creating a histogram by binning 2 table columns, if a keyword or column name is given as the weighting factor, then the output histrogram image will have a floating point datatype, not the default integer datatype as is the case when no weight is specified (e.g. with a filename like "myfile.fits[bin x,y; weight_column]" - added fix to the code in imcompress.c to work around a problem with dereferencing the value of a pointer, in cases where the address of that pointer has not been defined (e.g., the nulval variable). - modified the byte shuffling algorithm in fits_shuffle_8bytes to work around a strange bug in the proprietary SunStudioExpress C compiler under OpenSolaris. - removed spurious messages on the CFITSIO error stack when opening a FITS file with FTP (in drvrnet.c); Version 3.28 - 12 May 2011 - added an enhancement to the tiled-image compression method when compressing floating-point image using the standard (lossy) quantization method. In cases where an image tile cannot be quantized, The floating-point pixel values will be losslessly compressed with gzip before writing them to the tile- compressed file. Previously, the uncompressed pixel values would have been written to the file, which obviously requires more disk space. - made significant internal changes to the structure of the tile compression and uncompression routines in imcompress.c to make them more modular and easier to maintain. - modified configure.in and configure to force it to build a Universal binary on Mac OS X. - modified the ffiter function in putcol.c to properly clean up allocated memory if an error occurs. - in quantize.c, when searching for the min and max values in a float array, initialize the max value to -FLT_MAX instead of FLT_MIN (and similarly for double array). Version 3.27 - 3 March 2011 Enhancements - added new routines fits_read_str and fits_delete_str which read or delete, respectively, a header keyword record that contains a specified character string. - added a new routine called fits_free_memory which frees the memory that fits_read_key_longstr allocated for the long string keyword value. - enhanced the ffmkky routine in fitscore.c to not put a space before the equals sign when writing long string-valued keywords using the ESO HIERARCH keyword convention, if that extra character is needed to fit the length of the keyword name + value string within the 80-character FITS keyword record. - made small change to fits_translate_keyword to support translation of blank keywords (where the name = 8 blank characters) - modified fpack so that it uses the minimum of the 2nd, 3rd, and 5th order MAD noise values when quantizing and compressing a floating point image. This is more conservative than just using the 3rd order MAD value alone. - added new routine imcomp_copy_prime2img to imcompress.c that is used by funpack to copy any keywords that may have been added to the primary array of the compressed image file (a null image) back into the header of the uncompressed image. - enhanced the fits_quantize_float and fits_quantize_double routines in quantize.c to also compress the tile if it is completely filled with null values. Previously, this type of tile would have been written to the output compressed image without any compression. - enhanced imcomp_decompress_tile to support implicit datatype conversion when reading a losslessly compressed (with gzip) real*4 image into an array of real*8 values. - in imcompress.c, removed possible attempt to free memory that had not been allocated. Version 3.26 - 30 December 2010 Enhancements - defined 2 new macros in fitsio.h: #define CFITSIO_MAJOR 3 #define CFITSIO_MINOR 26 These may be used within other macros to detect the CFITSIO version number at compile time. - modified group.c to initialize the output URL to a null string in fits_url2relurl. Also added more robust tests to see if 2 file pointers point to the same file. - enhanced the template keyword parsing code in grparser.c to support the 'D' exponent character in the ASCII representation of floating point keyword values (as in TVAL = 1.23D03). Previously, the parser would have written this keyword with a string value (TVAL = '1.23D03'). - modified the low-level routines that write a keyword record to a FITS header so that they silently replace any illegal characters (ASCII values less than 32 or greater than 126) with an ASCII space character. Previously, these routines would have returned with an error when encountering these illegal characters in the keyword record (most commonly tab, carriage return, and line feed characters). - made substantial internal changes to imcompress.c in preparation for possible future support for compression methods for FITS tables analogous to the tiled image compression method. - replaced all the source code in CFITSIO that was distributed under the GNU General Public License with freely available code. In particular, the gzip file compression and uncompression code was replaced by the zlib compression library. Thus, beginning with this version 3.26 of CFITSIO, other software applications may freely use CFITSIO without necessarily incurring any GNU licensing requirement. See the License.txt file for the CFITSIO licensing requirements. - added support for using cfitsio in different 'locales' which use a comma, not a period, as the decimal point character in ASCII representation of a floating point number (e.g., France). This affects how floating point keyword values and floating point numbers in ASCII tables are read and written with the 'printf' and 'strtod' functions. - added a new utility routine called fits_copy_rows/ffcprw that copies a specified range of rows from one table to another. - enhanced the test for illegal ASCII characters in a header (fftrec) to print out the name of the offending character (e.g TAB or Line Feed) as well as the Hex value of the character. - modified ffgtbc (in fitscore.c) to support nonstandard vector variable length array columns in binary tables (e.g. with TFORMn = 2000PE(500)'). - modified the configure file to add "-lm" when linking CFITSIO on Solaris machines. - added new routine, fits_get_inttype, to parse an integer keyword value string and return the minimum integer datatype (TBYTE, TSHORT, TLONG, TLONGLONG) required to store the integer value. - added new routine, fits_convert_hdr2str, which is similar to fits_hdr2str except that if the input HDU is a tile compressed image (stored in a binary table) then it will first convert that header back to that of a normal uncompressed FITS image before concatenating the header keyword records. - modified the file template reading routine (ngp_line_from_file in grparser.c) so that it ignores any carriage return characters (\r) in the line, that might be present, e.g. if the file was created on a Windows machine that uses \r\n as end of line characters. - modified the ffoptplt routine in cfileio.c to check if the PCOUNT keyword in the template file has a non-zero value, and if so, resets it to zero in the newly created file. Bug Fixes - fixed a bug when uncompressing floating-point images that contain Nan values on some 64-bit platforms. - fixed a bug when updating the value of the CRPIXn world coordinate system keywords when extracting a subimage from larger FITS image, using the extended CFITSIO syntax (e.g. myimage[1:500:2, 1:500:2]). This bug only affects cases where the pixel increment value is not equal to 1, and caused the coordinate grid to be shifted by between 0.25 pixels (in the case of a pixel increment of 2) and 0.5 pixels (for large pixel increment values). - fixed a potential string buffer overflow error in the ffmkls routine that modifies the value and comment strings in a keyword that uses the HEASARC long string keyword convention. - fixed a bug in imcompress.c that could cause programs to abort on 64-bit machines when using gzip to tile-compress images. Changed the declaration of clen in imcomp_compress_tile from int to size_t. Version 3.25 - 9 June 2010 - fixed bug that was introduced in version 3.13 that broke the ability to reverse an image section along the y-axis with an image section specifier like this: myimage.fits[*,-*]. This bug caused the output image to be filled with zeros. - fixed typo in the definition of the ftgprh Fortran wrapper routine in f77_wrap3.c. - modified the cfitsio.pc.in configuration file to make the lib path a variable instead of hard coding the path. The provides more flexibility for projects such as suse and fedora when building CFITSIO. - fixed bug in imcomp_compress_tile in imcompress.c which caused null pixel values to be written incorrectly in the rare case where the floating-point tile of pixels could not be quantized into integers. - modified imcompress.c to add a new specialized routine to uncompress an input image and then write it to a output image on a tile by tile basis. This appears to be faster than the old method of uncompressing the whole image into memory before writing it out. It also supports large images with more than 2**31 pixels. - made trivial changes to 2 statements in drvrfile.c to suppress nuisance compiler warnings. - some compilers define CLOCKS_PER_SEC as a double instead of an integer, so added an explicted integer type conversion to 2 statements in imcompress.c that used this macro. - removed debugging printf statements in drvrnet.c (15 July) Version 3.24 - 26 January 2010 - modified fits_translate_keywords so that it silently ignores any illegal ASCII characters in the value or comment fields of the input FITS file. Otherwise, fpack would abort without compressing input files that contained this minor violation of the FITS rules. - added support for Super H cpu in fitsio2.h - updated funpack to correctly handle the -S option, and to use a more robust algorithm for creating temporary output files. - modified the imcomp_compress_tile routine to support the NOCOMPRESS debugging option for real*4 images. Version 3.23 - 7 January 2010 - reduced the default value for the floating point image quantization parameter (q) from 16 to 4. This parameter is used when tile compressing floating point images. This change will increase the average compression ratio for floating point images from about 4.6 to about 6.5 without losing any significant information in the image. - enhanced the template keyword parsing routine to reject a header template string that only contains a sequence of dashes. - enhanced the ASCII region file reading routine to allow tabs as well as spaces between fields in the file. - got rid of bogus error message when calling fits_update_key_longstr - Made the error message more explicit when CFITSIO tries to write to a GZIP compressed file. Instead of just stating "cannot write to a READONLY file", it will say "cannot write to a GZIP compressed file". Version 3.22 - 28 October 2009 - added an option (in imcompress.c) to losslessly compress floating point images, rather than using the default integer scaling method. This option is almost never useful in practice for astronomical images (because the amount of compression is so poor), but it has been added for test comparison purposes. - enhanced the dithering option when quantizing and compressing floating point images so that a random dithering starting point is used, so that the same dithering pattern does not get used for every image. - modified the architecture setup section of fitsio2.h to support the 64-core 8x8-architecture Tile64 platform (thanks to Ken Mighell, NOAO) Fixes - fixed a problem that was introduced in version 3.13 of CFITSIO in cases where a program writes it own END keyword to the header instead of letting CFITSIO do it, as is strongly recommended. In one case this caused CFITSIO to rewrite the END keyword and any blank fill keywords in the header many times, causing a noticeable slow-down in the FITS file writing speed. Version 3.21 - 24 September 2009 - fixed bug in cfileio.c that caused CFITSIO to crash with a bus error on Mac OS X if CFITSIO was compiled with multi-threaded support (with the --enable-reentrant configure option). The Mac requires an additional thread initialization step that is not required on Linux machines. Even with this fix, occasional bus errors have been seen on some Mac platforms, The bus errors are seen when running the thread_test.c program. The bus errors are very intermittent, and occur less than about 1% of the time, on the affected platforms. These bus errors have not been seen on Linux platforms. - fixed invalid C comment delimiter ("//*" should have been "/*") in imcompress.c. - Increased the CFITSIO version number string length in fpackutil.c, to fix problem on some platforms when running fpack -V or funpack -V. Also modified the output format of the fpack -L command. Version 3.20 - 31 August 2009 - modified configure.in and configure so that it will build the Fortran interface routines by default, even if no Fortran compiler is found in the user's path. Building the interface routines may be disabled by specifying FC="none". This was done at the request of users who obtained CFITSIO from some other standard linux distributions, where CFITSIO was apparently built in an environment that had no Fortran compiler and hence did not build the Fortran wrappers. - modified ffchdu (close HDU) so that it calls the routine to update the maximum length of variable length table columns in the TFORM values in all cases where the values may have changed. Previously it would not update the values if a value was already specified in the TFORM value. - added 2 new string manipulation functions to the CFITSIO parser (contributed by Craig Markwardt): strmid extracts a substring from a string, and strstr searches for a substring within a string. - removed the code in quantize.c that treated "floating-point integer" images as a special case (it would just do a datatype conversion from float to int, and not otherwise quantize the pixel values). This caused complications with the new subtractive dithering feature. - enhanced the code for converting floating point images to quantized scaled integer prior to tile-compressing them, to apply a random subtractive dithering, which improves the photometric accuracy of the compressed images. - added new internal routine, iraf_delete_file, for use by fpack to delete a pair of IRAF format header and pixel files. - small change in cfileio.c in the way it recognizes an IRAF format .imh file. Instead of just requiring that the filename contain the ".imh" string, that string must occur at the end of the file name. - fixed bug in the code that is used when tile-compressing real*4 FITS images, which quantizes the floating point pixel values into integer levels. The bug would only appear in the fairly rare circumstance of tile compressing a floating point image that contains null pixels (NaNs) and only when using the lossy Hcompress algorithm (with the s parameter not equal to 1). This could cause underflow of low valued pixels, causing them to appear as very large pixel values (e.g., > 10**30) in the compressed image - changed the "if defined" blocks in fitsio.h, fitsio2.h and f77_wrap.h to correctly set the length of long variables on sparc64 machines. Patch contributed by Matthew Truch (U. Penn). - modified the HTTP file access code in drvrnet.c to support basic HTTP authentication, where the user supplies a user name and password. The CFITSIO filename format in this case is: "http://username:password@hostname/..." Thanks to Jochen Liske (ESO) for the suggestion and the code. Version 3.181 (BETA) - 12 May 2009 - modified region.c and region.h to add support for additional types of region shapes that are supported by ds9: panda, epanda, and bpanda. - fixed compiler error when using the new _REENTRANT flag, having to do with the an attempted static definition of Fitsio_Lock in several source files, after declaring it to be non-static in fitsio2.h. Version 3.18 (BETA) - 10 April 2009 - Made extensive changes to make CFITSIO thread safe. Previously, all opened FITS files shared a common pool of memory to store the most recently read or written FITS records in the files. In a multi-threaded environment different threads could simultaneously read or write to this common area causing unpredictable results. This was changed so that every opened FITS file has its own private memory area for buffering the file. Most of the changes were in buffers.c, fitsio.h, and fitsio2.h. Additional changes were made to cfileio.c, mainly to put locks around small sections of code when setting up the low-level drivers to read or write the FITS file. Also, locks were needed around the GZIP compression and uncompression code in compress.c., the error message stack access routine in fitscore.c, the encode and decode routines in fits_hcompress.c and fits_hdecompress.c, in ricecomp.c, and the table row selection and table calculator functions. Also, removed the 'static' declaration of the local variables in pliocomp.c which did not appeared to be required and prevented the routines from being thread safe. As a consequence of having a separate memory buffer for every FITS file (by default, about 115 kB per file), CFITSIO may now allocate more memory than previously when an application program opens multiple FITS files at once. The read and write speed may also be slightly faster, since the buffers are not shared between files. - Added new families of Fortran wrapper routines to read and write values to large tables that have more than 2**31 rows. The arguments that define the first row and first element to read or write must be I*8 integers, not ordinary I*4 integers. The names of these new routines have 'LL' appended to them, so for example, ftgcvb becomes ftgcvbll. Fixes - Corrected an obscure bug in imcompress.c that would have incorrectly written the null values only in the rare case of writing a signed byte array that is then tile compressed using the Hcompress or PLIO algorithm. Version 3.14 - 18 March 2009 Enhancements - modified the tiled-image compression and uncompression code to support compressing unsigned 16-bit integer images with PLIO. FITS unsigned integer arrays are offset by -32768, but the PLIO algorithm does not work with negative integer values. In this case, an offset of 32768 is added to the array before compression, and then subtracted again when reading the compressed array. IMPORTANT NOTE: This change is not backward compatible, so these PLIO compressed unsigned 16-bit integer images will not be read correctly by previous versions of CFITSIO; the pixel values will have an offset of +32768. - minor changes to the fpack utility to print out more complete version information with the -V option, and format the report produced by the -T option more compactly. Fixes - Modified imcomp_compress_image (which is called by fpack) so that it will preserve any null values (NaNs) if the input image has a floating point datatype (BITPIX = -32 or -64). Null values in integer datatype images are handled correctly. - Modified imcomp_copy_comp2img so that it does not copy the ZBLANK keyword, if present, from the compressed image header when uncompressing the image. - Fixed typo in the Fortran wrapper macro for the ftexist function. Version 3.13 - 5 January 2009 Enhancements - updated the typedef of LONGLONG in fitsio.h and cfortran.h to support the Borland compiler which uses the __int64 data type. - added new feature to the extended filename syntax so that when performing a filtering operation on specified HDU, if you add a '#' character after the name or number of the HDU, then ONLY that HDU (and the primary array if the HDU is a table) will be copied into the filtered version of the file in memory. Otherwise, by default CFITSIO copies all the HDUs from the input file into memory. - when specifying a section, if the specified number of dimensions is less than the number of dimensions in the image, then CFITSIO will use the entire dimension, as if a '*' had been specified. Thus [1:100] is equivalent to [1:100,*] when specifying a section of 2 dimensional image. - modified fits_copy_image_section to read/write the section 1 row at a time, instead of the whole section, to reduce memory usage. - added new stream:// drivers for reading/writing to stdin/stdout. This driver is somewhat fragile, but for simple FITS read and write operations this driver streams the FITS file on stdin or stdout without first copying the entire file in memory, as is done when specifying the file name as "-". - slight modification to ffcopy to make sure that the END keyword is correctly written before copying the data. This is required by the new stream driver. - modified ffgcprll, so that when writing data to an HDU, it first checks that the END keyword has been written to the correct place. This is required by the new stream driver. Fixes - fixed bug in ffgcls2 when reading an ASCII string column in binary tables in cases where the width of the column is greater than 2880 characters and when reading more than 1 row at a time. Similar change was made to ffpcls to fix same problem with writing to columns wider than 2880 characters. - updated the source files listed in makepc.bat so that it can be used to build CFITSIO with the Borland C++ compiler. - fixed overflow error in ffiblk that could cause writing to Large Files (> 2.1 GB) to fail with an error status. - fixed a bug in the spatial region code (region.c) with the annulus region. This bug only affected specialized applications which directly use the internal region structure; it does not affect any CFITSIO functions directly. - fixed memory corruption bug in region.c that was triggered if the region file contained a large number of excluded regions. - got rid of a harmless error message that would appear if filtering a FITS table with a GTI file that has zero rows. (eval_f.c) - modified fits_read_rgnfile so that it removes the error messages from the error stack if it is unable to open the region file as a FITS file. (region.c) Version 3.12 - 8 October 2008 - modified the histogramming code so that the first pixel in the binned array is chosen as the reference pixel by default, if no other value is previously defined. - modified ffitab and ffibin to allow a null pointer to the EXTNAME string, when inserting a table with no name. Version 3.11 - 19 September 2008 - optimized the code when tile compressing real*4 images (which get scaled to integers). This produced a modest speed increase. For best performance, one must specify the absolute q quantization parameter, rather than relative to the noise in the tile (which is expensive to compute). - modified the FITS region file reading code to check for NaN values, which signify the end of the array of points in a polygon region. - removed the test for LONGSIZE == 64 from fitsio.h, since it may not be defined. - modified imcompress.c to support unconventional floating point FITS images that also have BSCALE and BZERO keywords. The compressed floating point images are linearly scaled twice in this case. Version 3.10 - 20 August 2008 - fixed a number of cases, mainly dealing with long input file names (> 1024 char), where unsafe usage of strcat and strcpy could have caused buffer overflows. These buffer overflows could cause the application to crash, and at least theoretically, could be exploited by a malicious user to execute arbitrary code. There are no known instances of this type of malicious attack on CFITSIO applications, and the likelihood of such an attack seems remote. None the less, it would be prudent for CFITSIO users to upgrade to this new version to guard against this possibility. - modified some of the routines to define input character string parameters as "const char *" rather than just "char *" to eliminate some compiler warnings when the calling routine passes a constant string to the CFITSIO routine. Most of the changes were to the keyword name argument in the many routines that read or write keywords. - fixed bug when tile-compressing a FITS image which caused all the completely blank keywords in the input header to be deleted from the output compressed image. Also added a feature to preserve any empty FITS blocks in the header (reserved space for future keywords) when compressing or uncompressing an image. - fixed small bug in the way the default tile size is set in imcompress.c. (Fix sent in by Paul Price). - added support for reading FITS format region files (in addition to the ASCII format that was previously supported). Thanks to Keith Arnaud for modifying region.c to do this. Version 3.09 - 12 June 2008 - fixed bug in the calculator function, parse_data, that evaluates expressions then selecting rows or modifying values in table columns. This bug only appeared in unusual circumstances where the calculated value has a null value (= TNULLn). The bug could cause elements to not be flagged as having a null value, or in rare cases could cause valid elements to be flagged as null. This only appears to have affected 64-bit platforms (where size(long) = 8). - fixed typo in imcomp_decompress_tile: call to fffi2r8 should have been to fffi4r8. - in the imcopy_copy_comp2img routine, moved the call to fits_translate_keywords outside of the 'if' statement. This could affect reading compressed images that did not have a EXTNAME keyword in the header. - fixed imcomp_compress_tile in imcompress.c to properly support writing unsigned integers, in place, to tile compressed images. - modified fits_read_compressed_img so that if the calling routine specifies nullval = 0, then it will not check for null-valued pixels in the compressed FITS image. This mimics the same behavior when reading normal uncompressed FITS images. Version 3.08 - 15 April 2008 - fixed backwards compatibility issue when uncompressing a Rice compressed image that was created with previous versions of CFITSIO (this late fix was added on May 18). - small change to cfortran.h to add "extern" to the common block definition. This was done for compatibility with the version of cfortran.h that is distributed by the debian project. - relaxed the requirement that a string valued keyword must have a closing quote character. If the quote is missing, CFITSIO will silently append a quote at the end of the keyword record. This change was made because otherwise it is very difficult to correct the keyword because CFITSIO would exit with an error before making the fix. - added a new BYTEPIX compression parameter when tile-compressing images with the Rice algorithm. - cached the NAXIS and NAXISn keyword values in the fitsio structure for efficiency, to eliminate duplicates reads of these keywords. - added variants of the Rice compression and uncompression routines to support short int images (in addition to the routines that support int). - moved the definition of LONGLONG_MIN and LONGLONG_MAX from fitsio2.h to fitsio.h, to make it accessible to application programs. - make efficiency improvements to fitscore.c, to avoid needless searches through the entire header when reading the required keywords that must be near the beginning of the header. - made several improvements to getcol.c to optimize reading of compressed and uncompressed images. - changed the compression level in the gzip code from 6 to 1. In most cases this will provide nearly the same amount of compression, but is significantly faster in some cases. - added new "helper routines' to imcompress.c to allow applications to specified the "quantize level" and Hcompress scaling and smoothing parameters - modified the extended filename syntax to support the "quantize level" and Hcompress scaling and smoothing parameters. The parser in cfileio.c was extensively modified. - extensive changes to quantize.c: - replace the "nbits" parameter with "quantize level" - the quantize level is now relative to the RMS noise in the image - the HCOMPRESS scale factor is now relative to the RMS noise - added routines to calculate RMS noise in image (these changes require a change to the main file structure in fitsio.h) - initialize errno = 0 before the call to strtol in ffext, in case errno has previously been set by an unrelated error condition. - added the corresponding long name for the ffgkyjj routine to longnam.h. - changed imcomp_copy_comp2img (in imcompress.c) to not require the presence of the EXTNAME keyword in the input compressed image header. - modified imcompress.c to only write the UNCOMPRESSED_DATA column in tile-compressed images if it is actually needed. This eliminates the need to subsequently delete the column if it is not used (which is almost always the case). - found that it is necessary to seek to the EOF of a file after truncating the size of the file, to reestablish a definite current location in the file. The required small changes to 3 routines: file_truncate (to seek to EOF) and fftrun (to set io_pos) and the truncation routine in drvrmem.c. - improved the efficiency when compressing integer images with gzip. Previously, the image was always represented using integer*4 pixels, which were then compressed. Now, if the range of pixel values can be represented with integer*2 pixels or integer*1 pixels, then that is used. This change is backward compatible with any compressed images that used the previous method. - changed the default tiling pattern when using Hcompress from large squares (200 to 600 pixels wide) to 16 rows of the image. This generally requires less memory, compresses faster, and is more consistent with the default row by row tiling when using the other compression methods. - modified imcomp_init_table in imcompress.c to enforce a restriction when using the Hcompress algorithm that the 1st 2 dimensions of sll image tiles must be at least 4 pixels long. Hcompress becomes very inefficient for smaller dimensions, and does not work at all with 1D images. - fixed bug in the Hcompress compression algorithm that could affect compression of I*4 images, using non-square compression tiles (in the encode64 routine). Version 3.07 - 6 December 2007 (internal release) - fixed bug with the PLIO image compression routine which silently produced a corrupted compressed image if the uncompressed image pixels were not all in the range 0 to 2**24. (fixed in November) - fixed several 'for' loops in imcompress.c which were exceeding the bounds of an array by 1. (fixed in November) - fixed a possible, but unlikely, memory overflow issue in iraffits.c. - added a clarification to the cfortran.doc file that cfortran.h may be used and distributed under the terms of the GNU Library General Public License. - fixed bug in the fits_modify_vector_len routine when modifying the vector length of a 'X' bit column. Version 3.06 - 27 August 2007 - modified the imcopy.c utility program (to tile-compress images) so that it writes the default EXTNAME = 'COMPRESSED_IMAGE' keyword in the compressed images, to preserve the behavior of earlier versions of imcopy. - modified the angsep function in the FITS calculator (in eval.y) to use haversines, instead of the 'law of cosines', to provide more precision at small angles (< 0.1 arcsec). Version 3.05 - July 2007 (internal release only) - extensive changes to imcompress.c to fully support implicit data type conversion when reading and writing arrays of data to FITS images, where the data type of the array is not the same as the data type of the FITS image. This includes support for null pixels, and data scaling via the BSCALE and BZERO keywords. - rewrote the fits_read_tbl_coord routine in wcssub.c, that gets the standard set of WCS keywords appropriate to a pair of columns in a table, to better support the full set of officially approved WCS keywords. - made significant changes to histo.c, which creates an image by binning columns of a table, to better translate the WCS keywords in the table header into the WCS keywords that are appropriate for an image HDU. - modified imcompress.c so that when pixels are written to a tile-compressed image, the appropriate BSCALE and BZERO values of that image are applied. This fixes a bug in which writing to an unsigned integer datatype image (with BZERO = 32768) was not done correctly. Version 3.04 - 3 April 2007 - The various table calculator routines (fits_select_rows, etc.) implicitly assumed that the input table has not been modified immediately prior to the call. To cover cases where the table has been modified a call to ffrdef has been added to ffprs. IN UNUSUAL CASES THIS CHANGE COULD CAUSE CFITSIO TO BEHAVE DIFFERENTLY THAN IN PREVIOUS VERSIONS. For example, opening a FITS table with this column-editing virtual file expression: myfile.fits[3][col A==X; B = sqrt(X)] no longer works, because the X column does not exist when the sqrt expression is evaluated. The correct expression in this case is myfile.fits[3][col A==X; B = sqrt(A)] - modified putkey.c to support USHORT_IMG when calling fits_create_img to create a signed byte datatype image. - enhanced the column histogramming function to propagate any TCn_k and TPn_k keywords in the table header to the corresponding CDi_j and PCi_j keywords in the image header. - enhanced the random, randomn, and randomp functions in the lexical parser to take a vector column name argument to specify the length of the vector of random numbers that should be generated (provided by Craig Markwardt, GSFC) - enhanced the ffmcrd routine (to modify an existing header card) to support long string keywords so that any CONTINUE keywords associated with the previous keyword will be deleted. - modified the ffgtbp routine to recognize the TDIMn keyword for ASCII string columns in a binary table. The first dimension is taken to be the size of a unit string. (The TFORMn = 'rAw' syntax may also be used to specify the unit string size). - in fits_img_decompress, the fits_get_img_param function was called with an invalid dimension size, which caused a fatal error on at least 1 platform. - in ffopentest, set the status value before returning in case of error. - in the drvrnet.c file, the string terminators needed to be changed from "\n" to "\r\n" to support the strict interpretation of the http and ftp standard that is enforced by some newer web servers. Version 3.03 - 11 December 2006 New Routine - fits_write_hdu writes the current HDU to a FILE stream (e.g. stdout). Changes - modified the region parsing code to support region files where the keyword "physical" is on a separate line preceding the region shape token. (However, "physical" coordinates are not fully supported, and are treated identically to "image" coordinates). - enhanced the iterator routines to support calculations on 64-bit integer columns and images. Currently, the values are cast to double precision when doing the calculations, which can cause a loss of precision for integer values greater than about 2**52. - added support for accessing FITS files on the computational grid. Giuliano Taffoni and Andrea Barisani, at INAF, University of Trieste, Italy, implemented the necessary I/O driver routines in drvrgsiftp.c. - modified the tiled image compression/uncompression routines to preserve/restore the original CHECKSUM and DATASUM keywords if they exist. (saved as ZHECKSUM and ZDATASUM in the compressed image) - split fits_select_image_section into 2 routines: a higher level routine that creates the output file and copies other HDUs from the input file to the output file, and a lower level routine that extracts the image section from the input image into an output image HDU. - Improved the error messages that get generated if one tries to use the lexical parser to perform calculations on variable-length array columns. - added "#define MACHINE NATIVE" in fitsio2.h for all machines where BYTESWAPPED == FALSE. This may improve the file writing performance by eliminating the need to allocate a temporary buffer in some cases. - modified the configure.in and configure script to fix problems with testing if network services are available, which affects the definition of the HAVE_NET_SERVICES flag. - added explicit type casting to all malloc statements, and deleted declarations of unreferenced variables in the image compression code to suppress compiler warnings. - fixed incorrect logic in fitsio2.h in the way it determined if numerical values are byteswapped or not on MIPS and ARM architectures. - added __BORLANDC__ to the list of environments in fitsio.h that don't use %lld in printf for longlong integers - added "#if defined(unix)" around "#include " statements in several C source files, to make them compatible with Windows. Version 3.02 - 18 Sept 2006 - applied the security patch to the gzip code, available at http://security.FreeBSD.org/patches/SA-06:21/gzip.patch The insufficient bounds checks in buffer use can cause gzip to crash, and may permit the execution of arbitrary code. The NULL pointer deference can cause gzip to crash. The infinite loop can cause a Denial-of-Service situation where gzip uses all available CPU time. - added HCOMPRESS as one of the compression algorithm options in the tiled image compression code. (code provided by Richard White (STScI)) Made other improvements to preserve the exact header structure in the compressed image file so that the compressed-and-then-uncompressed FITS image will be as identical as possible to the original FITS image file. New Routines - the following new routines were added to support reading and writing non-standard extension types: fits_write_exthdr - write required keywords for a conforming extension fits_write_ext - write data to the extension fits_read_ext - read data from the extension - added new routines to compute the RMS noise in the background pixels of an image: fits_rms_float and fits_rms_short (take an input array of floats or shorts, respectively). Fixes - added the missing 64-bit integer case to set of "if (datatype)" statements in the routine that returns information about a particular column (ffgbclll). - fixed a parsing error in ffexts in cases where an extension number is followed by a semi-colon and then the column and row number of an array in a binary table. Also removed an extraneous HISTORY keyword that was being written when specifying an input image in a table cel. - modified the routine that reads a table column returning a string value (ffgcls) so that if the displayed numerical value is too wide to fit in the specified length string, then it will return a string of "*" characters instead of the number string. - small change to fitsio.h to support a particular Fortran and C compiler combination on a SGI Altix system - added a test in the gunzip code to prevent seg. fault when trying to uncompress a corrupted file (at least in some cases). - fixed a rarely-occurring bug in the routine that copies a table cell into an image; had to call the ffflsh call a few lines earlier. Version 3.01 - (in FTOOLS 6.1 release) - modified fits_copy_image2cell to correctly copy all the appropriate header keywords when copying an image into a table cell - in eval.y, explicitly included the code for the lgamma function instead of assuming it is available in a system library (e.g., the lgamma function is currently not included in MS Visual++ libraries) - modified the logic in fits_pixel_filter so that the default data type of the output image will be promoted to at least BITPIX = -32 (a single precision floating point) if the expression that is being evaluated resolves to a floating point result. If the expression resolves to an integer result, the output image will have the same BITPIX as the input image. - in fits_copy_cell2image, added 5 more WCS keywords to the list of keywords related to other columns that should be deleted in the output image header. - disabled code in cfileio.c that would write HISTORY keywords to the output file in fits_copy_image2cell and cell2image, because some tasks would not want these extraneous HISTORY keywords. - added 2 new random number functions to the CFITSIO parser RANDOMN() - produces a normal deviate (mean=0, stddev=1) RANDOMP(X) - produces a Poisson deviate for an expected # of counts X - in f77_wrap.h, removed the restriction that "g77Fortran" must be defined on 64-bit Itanium machines before assuming that sizeof(long) = 8. It appears that "long"s are always 8 bytes long on this machine, regardless of what compilers are used. - added test in fitsio.h so that LONGLONG cannot be multiply defined - modified longnam.h so that both "fits_write_nulrows" and "fits_write_nullrows" get replace by the string "ffprwu". This fixes a documentation error regarding the long name of this routine. Bug fixes - fixed a potential null character string dereferencing error in the the ffphtb and ffphbn routines that write the FITS table keywords. This concerned the optional TUNITn keywords. - fixed a few issues in fits_copy_cell2image and fits_copy_image2cell related to converting some WCS keyword between the image extension form and the table cell form of the keyword. (cfileio.c) - fixed bug in fits_translate_keyword (fitscore.c) that, e.g., caused 'EQUINOX' to be translated to EQUINOXA' if the pattern is 'EQUINOXa' - fixed 2 bugs that could affect 'tile compressed' floating point images that contain NaN pixels (null pixels). First, the ZBLANK keyword was not being written, and second, an integer overflow could occur when computing the BZERO offset in the compressed array. (quantize.c and imcompress.c) Version 3.006 - 20 February 2006 -(first full release of v3) - enhanced the 'col' extended filename syntax to support keyword name expressions like [col error=sqrt(rate); #TUNIT# = 'counts/s'], in which the trailing '#' will be replaced by the column number of the most recently referenced column. - fixed bug in the parse_data iterator work function that caused it to fail to return a value of -1 in cases where only a selected set of rows were to be processed. (affected Fv) - added code to fitsio.h and cfortran.h to typedef LONGLONG to the appropriate 8-byte integer data type. Most compilers now support the 'long long' data type, but older MS Visual C++ compilers used '__int64' instead. - made several small changes based on testing by Martin Reinecke: o in eval.y, change 'int undef' to 'long undef' o in getcold.c and getcole.c, fixed a couple format conversion specifiers when displaying the value of long long variables. o in fitsio.h, modified the definition of USE_LL_SUFFIX in the case of Athon64 machines. o in fitsio2.h, defined BYTESWAPPED in the case of SGI machines. o in group.c, added 'include unistd.h' to get rid of compiler warning. Version 3.005 - 20 December 2005 (beta) - cfortran.h has been enhanced to support 64-bit integer parameters when calling C routines from Fortran. This modification was kindly provided by Martin Reinecke (MPE, Garching). - Many new Fortran wrapper routines have been added to support reading and writing 64-bit integer values in FITS files. These new routines are documented in the updated version of the 'FITSIO User's Guide' for Fortran programmers. - fixed a problem in the fits_get_keyclass routine that caused it to not recognize the special COMMENT keywords at the beginning of most FITS files that defines the FITS format. - added a new check to the ffifile routine that parses the input extended file name, to distinguish between a FITS extension name that begins with 'pix', and a pixel filtering operator that begins with the 'pix' keyword. - small change to the WCSLIB interface routine, fits_read_wcstab, to be more permissive in allowing the TDIMn keyword to be omitted for degenerate coordinate array. Version 3.004 - 16 September 2005 (3rd public beta release) - a major enhancement to the CFITSIO virtual file parser was provided by Robert Wiegand (GSFC). One can now specify filtering operations that will be applied on the fly to the pixel values in a FITS image. For example [pix sqrt(X)] will create a virtual FITS image where the pixel values are the square root of the input image pixels. - modified region.c so that it interprets the position angles of regions in a SAO style region file in the same way as DS9. In particular, if the region parameters are given in WCS units, then the position angle should be relative to the WCS coordinates of the image (increasing CCW from West) instead of relative to the X/Y pixel coordinate system. This only affects rotated images (e.g. with non-zero CROTA2 keyword) with elliptical or rectangular regions. - cleaned up fitsio.h and fitsio2.h to make the definition of LONGLONG and BYTESWAPPED and MACHINE more logical. - removed HAVE_LONGLONG everywhere since it is no longer needed (the compiler now must have an 8-byte integer datatype to build CFITSIO). - added support for the 64-bit IBM AIX platform - modified eval.y so that the circle, ellipse, box, and near functions can operate on vectors as well as scalars. This allows region filtering on images that are stored in a vector cell in a binary table. (provided by Craig Markwardt, GSFC) New Routines - added new fits_read_wcstab routine that serves as an interface to Mark Calabretta's wcslib library for reading WCS information when the -TAB table lookup convention is used in the FITS file. - added new fits_write_nullrows routine, which writes null values into every column of a specified range of rows in a FITS table. - added the fits_translate_keyword and fits_translate_keywords utility routines for converting the names of keywords when moving columns and images around. - added fits_copy_cell2image and fits_copy_image2cell routines for copying an image extension (or primary array) to or from a cell in a binary table vector column. Bug fixes - fixed a memory leak in eval.y; was fixed by changing a call to malloc to cmalloc instead. - changed the definition of several global variables at the beginning of buffers.c to make them 'static' and thus invisible to applications programs. - in fits_copy_image_cell, added a call to flush the internal buffers before reading from the file, in case any records had been modified. Version 3.003 - 28 July 2005 - 2nd public beta release (used in HEASOFT) Enhancements - enhanced the string column reading routing fits_get_col_str to support cases where the user enters a null pointer (rather than a null string) as the nulval parameter. - modified the low level ffread and ffwrite routines that physically read and write data from the FITS file so that they write the name of the file to the CFITSIO error stack if an error occurs. - changed the definition of fits_open_file into a macro that will test that the version of the fitsio.h include file that was used to build the CFITSIO library is the same version as included when compiling the application program. - made a simple modification to region.c to support regions files of type "linear", for compatibility with ds9 and fv. - modified the internal ffgpr routine (and renamed it ffgprll) so that it returns the TNULL value as a LONGLONG parameter instead of 'long'. - in fits_get_col_display_width, added support for TFORM = 'k' - modified fitsio.h, fitsio2.h, and f77_wrap.h to add test for (_SX) to identify NEC SX supercomputers. - modified eval_f.c to treat table columns of TULONG (unsigned long) as a double. Also added support for TLONGLONG (8-byte integers) as a double, which is only a temporary fix, since doubles only have about 52 bits of precision. - changed the 'blank' parameter in the internal ffgphd function to to type LONGLONG to support integer*8 FITS images. - when reading the TNULL keyword value, now use ffc2jj instead of ffc2ii, to support integer*8 values. Bug fixes - fixed a significant bug when writing character strings to a variable length array column of a binary table. This bug would result in some unused space in the variable length heap, making the heap somewhat larger than necessary. This in itself is usually a minor issue, since the FITS files are perfectly valid, and other software should have no problems reading back the characters strings. In some cases, however, this problem could cause the program that is writing the table to exit with a status = 108 disk read error. - modified the standalone imcopy.c utility program to fix a memory allocation bug when running on 64-bit platforms where sizeof(long) = 8 bytes. - added an immediate 'return' statement to ffgtcl if the input status >0, to prevent a segfault on some platforms. Version 3.002 - 15 April 2005 - first public beta release - in drvrfile.c, if it fails to open the file for some reason, then it should reset file_outfile to a null string, to avoid errors on a subsequent call to open a file. - updated fits_get_keyclass to recognize most of the WCS keywords defined in the WCS Papers I and II. Version 3.001 - 15 March 2005 - released with HEASOFT 6.0 - numerous minor changes to the code to get rid of compiler warning messages, mainly dealing with numerical data type casting and the subsequent possible loss of precision in the result. Version 3.000 - 1 March 2005 (internal beta release) Enhancements: - Made major changes to many of the CFITSIO routines to more generally support Large Files (> 2.1 GB). These changes are intended to be 100% backward compatible with software that used the previous versions of CFITSIO. The datatype of many of the integer parameters in the CFITSIO functions has been changed from 'long' to 'LONGLONG', which is typedef'ed to be equivalent to an 8-byte integer datatype on each platform. With these changes, CFITSIO supports the following: - integer FITS keywords with absolute values > 2**31 - FITS files with total sizes > 2**31 bytes - FITS tables in which the number of rows, the row width, or the size of the heap is > 2**31 bytes - FITS images with dimensions > 2**31 bytes (support is still somewhat limited, with full support to be added later). - added another lexical parser function (thanks to Craig Markwardt, GSFC): angsep computes the angular separation between 2 positions on the celestial sphere. - modified the image subset extraction code (e.g., when specifying an image subregion when opening the file, such as 'myimage.fits[21:40, 81:90]') so that in addition to updating the values of the primary WCS keywords CRPIXk, CDELTi, and CDj_i in the extracted/binned image, it also looks for and updates any secondary WCS keywords (e.g., 'CRPIX1P'). - made cosmetic change to group.c, so that when a group table is copied, any extra columns will be appended after the last existing column, instead of being inserted before the last column. - modified the routines that read tile compressed images to support NULL as the input value for the 'anynul' parameter (meaning the calling program does not want the value of 'anynul' returned to it). - when constructing or parsing a year/month/day character string, (e.g, when writing the DATE keyword) the routines now rigorously verify that the input day value is valid for the given month (including leap years). - added some checks in cfileio.c to detect if some vital parameters that are stored in memory have been corrupted. This can occur if a user's program writes to areas of memory that it did not allocate. - added the wcsutil_alternate.c source code file which contains non-working stubs for the 2 Classic AIPS world coordinate conversion routines that are distributed under the GNU General Public License. Users who are unwilling or unable to distribute their software under the General Public License may use this alternate source file which has no GPL restrictions, instead of wcsutil.c. This will have no effect on programs that use CFITSIO as long as they do not call the fits_pix_to_world/ffwldp or fits_world_to_pix/ffxypx routines. Bug Fixes - in ffdtdm (which parses the TDIMn keyword value), the check for consistency between the length of the array defined by TDIMn and the size of the TFORMn repeat value, is now not performed for variable length array columns (which always have repeat = 1). - fixed byteswapping problem when writing null values to non-standard long integer FITS images with BITPIX = 64 and FITS table columns with TFORMn = 'K'. - fixed buffer overflow problem in fits_parse_template/ffgthd that occurred only if the input template keyword value string was much longer than can fit in an 80-char header record. Version 2.510 - 2 December 2004 New Routines: - added fits_open_diskfile and fits_create_diskfile routines that simply open or create a FITS file with a specified name. CFITSIO does not try to parse the name using the extended filename syntax. - 2 new C functions, CFITS2Unit and CUnit2FITS, were added to convert between the C fitsfile pointer value and the Fortran unit number. These functions may be useful in mixed language C and Fortran programs. Enhancements: - added the ability to recognize and open a compressed FITS file (compressed with gzip or unix compress) on the stdin standard input stream. - Craig Markwardt (GSFC) provided 2 more lexical parser functions: accum(x) and seqdiff(x) that compute the cumulative sum and the sequential difference of the values of x. - modified putcole.c and putcold.c so that when writing arrays of pixels to the FITS image or column that contain null values, and there are also numerical overflows when converting some of the non-null values to the FITS values, CFITSIO will now ignore the overflow error until after all the data have been written. Previously, in some circumstances CFITSIO would have simply stopped writing any data after the first overflow error. - modified fitsio2.h to try to eliminate compiler warning messages on some platforms about the use of 'long long' constants when defining the value of LONGLONG_MAX (whether to use L or LL suffix). - modified region.c to support 'physical' regions in addition to 'image', 'fk4', etc. - modified ffiurl (input filename parsing routine) to increase the maximum allowed extension number that can be specified from 9999 to 99999 (e.g. 'myfile.fits+99999') Bug Fixes: - added check to fits_create_template to force it to start with the primary array in the template file, in case an extension number was specified as part of the template FITS file name. Version 2.500 - 28 & 30 July 2004 New Routine: - fits_file_exists tests whether the specified input file, or a compressed version of the file, exists on disk. Enhancements: - modified the way CFITSIO reads and writes data in COMPLEX ('C') and DBLCOMPLEX 'M' columns. Now, in all cases, when referring to the number of elements in the vector, or the value of the offset to a particular element within the vector, CFITSIO considers each pair of numbers (the imaginary and real parts) as a single element instead of treating each single number as an element. In particular, this changes the behavior of fits_write_col_null when writing to complex columns. It also changes the length of the 'nullarray' vector in the fits_read_colnull routine; it is now only 1/2 as long as before. Each element of the nullarray is set = 1 if either the real or imaginary parts of the corresponding complex value have a null value.(this change was added to version 2.500 on 30 July). - Craig Markwardt, at GSFC, provided a number of significant enhancements to the CFITSIO lexical parser that is used to evaluate expressions: - the parser now can operate on bit columns ('X') in a similar way as for other numeric columns (e.g., 'B' or 'I' columns) - range checking has been implemented, so that the following conditions return a Null value, rather than returning an error: divide by zero, sqrt(negative), arccos(>1), arcsin(>1), log(negative), log10(negative) - new vector functions: MEDIAN, AVERAGE, STDDEV, and NVALID (returns the number of non-null values in the vector) - all the new functions (and SUM, MIN and MAX) ignore null values - modified the iterator to support variable-length array columns - modified configure to support AIX systems that have flock in a non- standard location. - modified configure to remove the -D_FILE_OFFSET_BITS flag when running on Mac Darwin systems. This caused conflicts with the Fortran wrappers, and should only be needed in any case when using CFITSIO to read/write FITS files greater than 2.1 GB in size. - modified fitsio2.h to support compilers that define LONG_LONG_MAX. - modified ffrsim (resize an existing image) so that it supports changing the datatype to an unsigned integer image using the USHORT_IMG and ULONG_IMG definitions. - modified the disk file driver (drvrfile.c) so that if an output file is specified when opening an ordinary file (e.g. with the syntax 'myfile.fits(outputfile.fits)' then it will make a copy of the file, close the original file and open the copy. Previously, the specified output file would be ignored unless the file was compressed. - modified f77_wrap.h and f77_wrap3.c to support the Fortran wrappers on 64-bit AMD Opteron machines Bug fixes: - made small change to ffsrow in eval_f.c to avoid potential array bounds overflow. - made small change to group.c to fix problem where an 'int' was incorrectly being cast to a 'long'. - corrected a memory allocation error in the new fits_hdr2str routine that was added in version 2.48 - The on-the-fly row-selection filtering would fail with a segfault if the length of a table row (NAXIS1 value) was greater than 500000 bytes. A small change to eval_f.c was required to fix this. Version 2.490 - 11 February 2004 Bug fixes: - fixed a bug that was introduced in the previous release, which caused the CFITSIO parser to no longer move to a named extension when opening a FITS file, e.g., when opening myfile.fit[events] CFITSIO would just open the primary array instead of moving to the EVENTS extension. - new group.c file from the INTEGRAL Science Data Center. It fixes a problem when you attach a child to a parent and they are both is the same file, but, that parent contains groups in other files. In certain cases the attach would not happen because it seemed that the new child was already in the parent group. - fixed bug in fits_calculator_rng when performing a calculation on a range of rows in a table, so that it does not reset the value in all the other rows that are not in the range = 0. - modified fits_write_chksum so that it updates the TFORMn keywords for any variable length vector table columns BEFORE calculating the CHECKSUM values. Otherwise the CHECKSUM value is invalidated when the HDU is subsequently closed. Version 2.480 - 28 January 2004 New Routines: - fits_get_img_equivtype - just like fits_get_img_type, except in the case of scaled integer images, it returns the 'equivalent' data type that is necessary to store the scaled data values. - fits_hdr2str copies all the header keywords in the current HDU into a single long character string. This is a convenient method of passing the header information to other subroutines. The user may exclude any specified keywords from the list. Enhancements: - modified the filename parser so that it accepts extension names that begin with digits, as in 'myfile.fits[123TEST]'. In this case CFITSIO will try to open the extension with EXTNAME = '123TEST' instead of trying to move to the 123rd extension in the file. - the template keyword parser now preserves the comments on the the mandatory FITS keywords if present, otherwise a standard default comment is provided. - modified the ftp driver file (drvrnet.c) to overcome a timeout or hangup problem caused by some firewall software at the user's end (Thanks to Bruce O'Neel for this fix). - modified iraffits.c to incorporate Doug Mink's latest changes to his wcstools library routines. The biggest change is that now the actual image dimensions, rather than the physically stored dimensions, are used when converting an IRAF file to FITS. Bug fixes: - when writing to ASCII FITS tables, the 'elemnum' parameter was supposed to be ignored if it did not have the default value of 1. In some cases however setting elemnum to a value other than 1 could cause the wrong number of rows to be produced in the output table. - If a cfitsio calculator expression was imported from a text file (e.g. using the extended filename syntax 'file.fits[col @file.calc]') and if any individual lines in that text file were greater than 255 characters long, then a space character would be inserted after the 255th character. This could corrupt the line if the space was inserted within a column name or keyword name token. Version 2.480beta (used in the FTOOLS 5.3 release, 1 Nov 2003) New Routines: - fits_get_eqcoltype - just like fits_get_coltype, except in the case of scaled integer columns, it returns the 'equivalent' data type that is necessary to store the scaled data values. - fits_split_names - splits an input string containing a comma or space delimited list of names (typically file names or column names) into individual name tokens. Enhancements: - changed fhist in histo.c so that it can make histograms of ASCII table columns as well as binary table columns (as long as they contain numeric data). Bug fixes: - removed an erroneous reference to listhead.c in makefile.vcc, that is used to build the cfitsio dll under Windows. This caused a 'main' routine to be added to the library, which causes problems when linking fortran programs to cfitsio under windows. - if an error occurs when opening for a 2nd time (with ffopen) a file that is already open (e.g., the specified extension doesn't exist), and if the file had been modified before attempting to reopen it, then the modified buffers may not get written to disk and the internal state of the file may become corrupted. ffclos was modified to always set status=0 before calling ffflsh if the file has been concurrently opened more than once. Version 2.470 - 18 August 2003 Enhancements: - defined 'TSBYTE' to represent the 'signed char' datatype (similar to 'TBYTE' that represents the 'unsigned char' datatype) and added support for this datatype to all the routines that read or write data to a FITS image or table. This was implemented by adding 2 new C source code files to the package: getcolsb.c and putcolsb.c. - Defined a new '1S' shorthand data code for a signed byte column in a binary table. CFITSIO will write TFORMn = '1B' and TZEROn = -128 in this case, which is the convention used to store signed byte values in a 'B' type column. - in fitsio2.h, added test of whether `__x86_64__` is defined, to support the new AMD Opteron 64-bit processor - modified configure to not use the -fast compiler flag on Solaris platforms when using the proprietary Solaris cc compiler. This flag causes compilation problems in eval_y.c (compiler just hangs forever). Bug fixes: - In the special case of writing 0 elements to a vector table column that contains 0 rows, ffgcpr no longer adds a blank row to the table. - added error checking code for cases where a ASCII string column in a binary table is greater than 28800 characters wide, to avoid going into an infinite loop. - the fits_get_col_display_width routine was incorrectly returning width = 0 for a 'A' binary table column that did not have an explicit vector length character. Version 2.460 - 20 May 2003 Enhancements: - modified the HTTP driver in drvrnet.c so that CFITSIO can read FITS files via a proxy HTTP server. (This code was contributed by Philippe Prugniel, Obs. de Lyon). To use this feature, the 'http_proxy' environment variable must be defined with the address (URL) and port number of the proxy server, i.e., > setenv http_proxy http://heasarc.gsfc.nasa.gov:3128 will use port 3128 on heasarc.gsfc.nasa.gov - suppressed some compiler warnings by casting a variable of type 'size_t' to type 'int' in fftkey (in fitscore.c) and iraftofits and irafrdimge (in iraffits.c). Version 2.450 - 30 April 2003 Enhancements: - modified the WCS keyword reading routine (ffgics) to support cases where some of the CDi_j keywords are omitted (with an assumed value = 0). - Made a change to http_open_network in drvrnet.c to add a 'Host: ' string to the open request. This is required by newer HTTP 1.1 servers (so-called virtual servers). - modified ffgcll (read logical table column) to return the illegal character value itself if the FITS file contains a logical value that is not equal to T, F or zero. Previously it treated this case the same as if the FITS file value was = 0. - modified fits_movnam_hdu (ffmnhd) so that it will move to a tile- compressed image (that is stored in a binary table) if the input desired HDU type is BINARY_TBL as well as if the HDU type = IMAGE_HDU. Bug fixes: - in the routine that checks the data fill bytes (ffcdfl), the call to ffmbyt should not ignore an EOF error when trying to read the bytes. This is a little-used routine that is not called by any other CFITSIO routine. - fits_copy_file was not reporting an error if it hit the End Of File while copying the last extension in the input file to the output file. - fixed inconsistencies in the virtual file column filter parser (ffedit_columns) to properly support expressions which create or modify a keyword, instead of a column. Previously it was only possible to modify keywords in a table extension (not an image), and the keyword filtering could cause some of the table columns to not get propagated into the virtual file. Also, spaces are now allowed within the specified keyword comment field. - ffdtyp was incorrectly returning the data type of FITS keyword values of the form '1E-09' (i.e., an exponential value without a decimal point) as integer rather than floating point. - The enhancement in the previous 2.440 release to allow more files to be opened at one time introduced a bug: if ffclos is called with a non-zero status value, then any subsequent call to ffopen will likely cause a segmentation fault. The fits_clear_Fptr routine was modified to fix this. - rearranged the order of some computations in fits_resize_img so as to not exceed the range of a 32-bit integer when dealing with large images. - the template parser routine, ngp_read_xtension, was testing for "ASCIITABLE" instead of "TABLE" as the XTENSION value of an ASCII table, and it did not allow for optional trailing spaces in the IMAGE" or "TABLE" string value. Version 2.440 - 8 January 2003 Enhancements: - modified the iterator function, ffiter, to operate on random groups files. - decoupled the NIOBUF (= 40) parameter from the limit on the number FITS files that can be opened, so that more files may be opened without the overhead of having to increase the number of NIOBUF buffers. A new NMAXFILES parameter is defined in fitsio2.h which sets the maximum number of opened FITS files. It is set = 300 by default. Note however, that the underlying compiler or operating system may not allow this many files to be opened at one time. - updated the version of cfortran.h that is distributed with CFITSIO from version 3.9 to version 4.4. This required changes to f77_wrap.h and f77_wrap3.c. The original cfortran.h v4.4 file was modified slightly to support CFITSIO and ftools (see comments in the header of cfortran.h). - modified ffhist so that it copies all the non-structural keywords from the original binary table header to the binned image header. - modified fits_get_keyclass so that it recognizes EXTNAME = COMPRESSED_IMAGE as a special tile compression keyword. - modified Makefile.in to support the standard --prefix convention for specifying the install target directory. Bug fixes: - in fits_decompress_img, needed to add a call to ffpscl to turn off the BZERO and BSCALE scaling when reading the compressed image. Version 2.430 - 4 November 2002 Enhancements: - modified fits_create_hdu/ffcrhd so that it returns without doing anything and does not generate an error if the current HDU is already an empty HDU. There is no need in this case to append a new empty HDU to the file. - new version of group.c (supplied by B. O'Neel at the ISDC) fixes 2 limitations: 1 - Groups now have 256 characters rather than 160 for the path lengths in the group tables. - ISDC SPR 1720. 2 - Groups now can have backpointers longer than 68 chars using the long string convention. - ISDC SPR 1738. - small change to f77_wrap.h and f77_wrap3.c to support the fortran wrappers on SUN solaris 64-bit sparc systems (see also change to v2.033) - small change to find_column in eval_f.c to support unsigned long columns in binary tables (with TZEROn = 2147483648.0) - small modification to cfortran.h to support Mac OS-X, (Darwin) Bug fixes: - When reading tile-compress images, the BSCALE and BZERO scaling keywords were not being applied, if present. - Previous changes to the error message stack code caused the tile compressed image routines to not clean up spurious error messages properly. - fits_open_image was not skipping over null primary arrays. Version 2.420 - 19 July 2002 Enhancements: - modified the virtual filename parser to support exponential notation when specifying the min, max or binsize in a binning specifier, as in: myfile.fits[binr X=1:10:1.0E-01, Y=1:10:1.0E-01] - removed the limitation on the maximum number of HDUs in a FITS file (limit used to be 1000 HDUs per file). Now any number of HDUs can be written/read in a FITS file. (BUT files that have huge numbers of HDUs can be difficult to manage and are not recommended); - modified grparser.c to support HIERARCH keywords, based on code supplied by Richard Mathar (Max-Planck) - moved the ffflsh (fits_flush_buffer) from the private to the public interface, since this routine may be useful for some applications. It is much faster than ffflus. - small change to the definition of OFF_T in fitsio.h to support large files on IBM AIX operating systems. Bug fixes: - fixed potential problem reading beyond array bounds in ffpkls. This would not have affected the content of any previously generated FITS files. - in the net driver code in drvrnet.c, the requested protocol string was changed from "http/1.0" to "HTTP/1.0" to support apache 1.3.26. - When using the virtual file syntax to open a vector cell in a binary table as if it were a primary array image, there was a bug in fits_copy_image_cell which garbled the data if the vector was more than 30000 bytes long. - fixed problem that caused fits_report_error to crash under Visual C++ on Windows systems. The fix is to use the '/MD' switch on the cl command line, or, in Visual Studio, under project settings / C++ select use runtime library multithreaded DLL - modified ffpscl so it does not attempt to reset the scaling values in the internal structure if the image is tile-compressed. - fixed multiple bugs in mem_rawfile_open which affected the case where a raw binary file is read and converted on the fly into a FITS file. - several small changes to group.c to suppress compiler warnings. Version 2.410 - 22 April 2002 (used in the FTOOLS 5.2 release) New Routines: - fits_open_data behaves similarly to fits_open_file except that it also will move to the first HDU containing significant data if and an explicit HDU name or number to open was not specified. This is useful for automatically skipping over a null primary array when opening the file. - fits_open_table and fits_open_image behaves similarly to fits_open_data, except they move to the first table or image HDU in the file, respectively. - fits_write_errmark and fits_clear_errmark routines can be use to write an invisible marker to the CFITSIO error stack, and then clear any more recent messages on the stack, back to that mark. This preserves any older messages on the stack. - fits_parse_range utility routine parses a row list string and returns integer arrays giving the min and max row in each range. - fits_delete_rowrange deletes a specified list of rows or row ranges. - fits_copy_file copies all or part of the HDUs in the input file to the output file. - added fits_insert_card/ffikey to the publicly defined set of routines (previously, it was a private routine). Enhancements: - changed the default numeric display format in ffgkys from 'E' format to 'G' format, and changed the format for 'X' columns to a string of 8 1s or 0s representing each bit value. - modified ffflsh so the system 'fflush' call is not made in cases where the file was opened with 'READONLY' access. - modified the output filename parser so the "-.gz", and "stdout.gz" now cause the output file to be initially created in memory, and then compressed and written out to the stdout stream when the file is closed. - modified the routines that delete rows from a table to also update the variable length array heap, to remove any orphaned data from the heap. - modified ffedit_columns so that wild card characters may be used when specifying column names in the 'col' file filter specifier (e.g., file.fits[col TIME; *RAW] will create a virtual table contain only the TIME column and any other columns whose name ends with 'RAW'). - modified the keyword classifier utility, fits_get_keyclass, to support cases where the input string is just the keyword name, not the entire 80-character card. - modified configure.in and configure to see if a proprietary C compiler is available (e.g. 'cc'), and only use 'gcc' if not. - modified ffcpcl (copy columns from one table to another) so that it also copies any WCS keywords related to that column. - included an alternate source file that can be used to replace compress.c, which is distributed under the GNU General Public License. The alternate file contains non-functional stubs for the compression routines, which can be used to make a version of CFITSIO that does not have the GPL restrictions (and is also less functional since it cannot read or write compressed FITS files). - modifications to the iterator routine (ffiter) to support writing tile compressed output images. - modified ffourl to support the [compress] qualifier when specifying the optional output file name. E.g., file.fit(out.file[compress])[3] - modified imcomp_compress_tile to fully support implicit data type conversion when writing to tile-compressed images. Previously, one could not write a floating point array to an integer compressed image. - increased the number of internal 2880-byte I/O buffers allocated by CFITSIO from 25 to 40, in recognition of the larger amount of memory available on typical machines today compared with a few years ago. The number of buffers can be set by the user with the NIOBUF parameter in fitsio2.h. (Setting this too large can actually hurt performance). - modified the #if statements in fitsio2.h, f77_wrap.h and f77_wrap1.c to support the new Itanium 64-bit Intel PC. - a couple minor modifications to fitsio.h needed to support the off_t datatype on debian linux systems. - increased internal buffer sizes in ffshft and ffsrow to improve the I/O performance. Bug fixes: - fits_get_keyclass could sometimes try to append to an unterminated string, causing an overflow of a string array. - fits_create_template no longer worked because of improvements made to other routines. Had to modify ffghdt to not try to rescan the header keywords if the file is still empty and contains no keywords yet. - ffrtnm, which returns the root filename, sometimes did not work properly when testing if the 'filename+n' convention was used for specifying an extension number. - fixed minor problem in the keyword template parsing routine, ffgthd which in rare cases could cause an improperly terminated string to be returned. - the routine to compare 2 strings, ffcmps, failed to find a match in comparing strings like "*R" and "ERROR" where the match occurs on the last character, but where the same matching character occurs previously in the 2nd string. - the region file reading routine (ffrrgn) did not work correctly if the region file (created by POW and perhaps other programs) had an 'exclude' region (beginning with a '-' sign) as the first region in the file. In this case all points outside the excluded region should be accepted, but in fact no points were being accepted in this case. Version 2.401 - 28 Jan 2002 - added the imcopy example program to the release (and Makefile) Bug fixes: - fixed typo in the imcompress code which affected compression of 3D datacubes. - made small change to fficls (insert column) to allow colums with TFORMn = '1PU' and '1PV' to be inserted in a binary table. The 'U' and 'V' are codes only used within CFITSIO to represent unsigned 16-bit and 32-bit integers; They get replaced by '1PI' and '1PJ' respectively in the FITS table header, along with the appropriate TZEROn keyword. Version 2.400 - 18 Jan 2002 (N.B.: Application programs must be recompiled, not just relinked with the new CFITSIO library because of changes made to fitsio.h) New Routines: - fits_write_subset/ffpss writes a rectangular subset (or the whole image) to a FITS image. - added a whole new family of routines to read and write arrays of 'long long' integers (64-bit) to FITS images or table columns. The new routine names all end in 'jj': ffpprjj, ffppnjj, ffp2djj, ffp3djj, ffppssjj, ffpgpjj, ffpcljj, ffpcnjj. ffgpvjj, ffgpfjj, ffg2djj, ffg3djj, ffgsvjj, ffgsfjj, ffggpjj, ffgcvjj, and ffgcfjj. - added a set of helper routines that are used in conjunction with the new support for tiled image compression. 3 routines set the parameters that should be used when CFITSIO compresses an image: fits_set_compression_type fits_set_tile_dim fits_set_noise_bits 3 corresponding routines report back the current settings: fits_get_compression_type fits_get_tile_dim fits_get_noise_bits Enhancements: - major enhancement was made to support writing to tile-compressed images. In this format, the image is divided up into a rectangular grid of tiles, and each tile of pixels is compressed individually and stored in a row of a variable-length array column in a binary table. CFITSIO has been able to transparently read this compressed image format ever since version 2.1. Now all the CFITSIO image writing routines also transparently support this format. There are 2 ways to force CFITSIO to write compressed images: 1) call the fits_set_compression_type routine before writing the image header keywords, or 2), specify that the image should be compressed when entering the name of the output FITS file, using a new extended filename syntax. (examples: "myfile.fits[compress]" will use the default compression parameters, and "myfile.fits[compress GZIP 100,100] will use the GZIP compression algorithm with 100 x 100 pixel tiles. - added new driver to support creating output .gz compressed fits files. If the name of the output FITS file to be created ends with '.gz' then CFITSIO will initially write the FITS file in memory and then, when the FITS file is closed, CFITSIO will gzip the entire file before writing it out to disk. - when over-writing vectors in a variable length array in a binary table, if the new vector to be written is less than or equal to the length of the previously written vector, then CFITSIO will now reuse the existing space in the heap, rather than always appending the new array to the end of the heap. - modified configure.in to support building cfitsio as a dynamic library on Mac OS X. Use 'make shared' like on other UNIX platforms, but a .dylib file will be created instead of .so. If installed in a nonstandard location, add its location to the DYLD_LIBRARY_PATH environment variable so that the library can be found at run time. - made various modifications to better support the 8-byte long integer datatype on more platforms. The 'LONGLONG' datatype is typedef'ed to equal 'long long' on most Unix platforms and MacOS, and equal to '__int64' on Windows machines. - modified configure.in and makefile.in to better support cases where the system has no Fortran compiler and thus the f77 wrapper routines should not be compiled. - made small modification to eval.y and eval_y.f to get rid of warning on some platforms about redefinition of the 'alloca'. Bug fixes: - other recent bug fixes in ffdblk (delete blocks) caused ffdhdu (delete HDU) to fail when trying to replace the primary array with a null primary array. - fixed bug that prevented inserting a new variable length column into a table that already contained variable length data. - modified fits_delete_file so that it will delete the file even if the input status value is not equal to zero. - in fits_resize_image, it was sometimes necessary to call ffrdef to force the image structure to be defined. - modified the filename parser to support input files with names like: "myfile.fits.gz(mem://tmp)" in which the url type is specified for the output file but not for the input file itself. This required modifications to ffiurl and ffrtnm. Version 2.301 - 7 Dec 2001 Enhancements: - modified the http file driver so that if the filename to be opened contains a '?' character (most likely a cgi related string) then it will not attempt to append a .gz or .Z as it would normally do. - added support for the '!' clobber character when specifying the output disk file name in CFITSIO's extended filename syntax, e.g., 'http://a.b.c.d/myfile.fits.gz(!outfile.fits)' - added new device driver which is used when opening a compressed FITS file on disk by uncompressing it into memory with READWRITE access. This happens when specifying an output filename 'mem://'. - added 2 other device drivers to open http and ftp files in memory with write access. - improved the error trapping and reporting in cases where program attempts to write to a READONLY file (especially in cases where the 'file' resides in memory, as is the case when opening an ftp or http file. - modified the extended filename parser so that it is does not confuse the bracket character '[' which is sometimes used in the root name of files of type 'http://', as the start of an extname or row filter expression. If the file is of type 'http://', the parser now checks to see if the last character in the extended file name is a ')' or ']'. If not, it does not try to parse the file name any further. - improved the efficiency when writing FITS files in memory, by initially allocating enough memory for the entire HDU when it is created, rather than incrementally reallocing memory 2880 bytes at a time (modified ffrhdu and mem_truncate). This change also means that the program will fail much sooner if it cannot allocate enough memory to hold the entire FITS HDU. Bug fixes: - There was an error in the definition of the Fortran ftphtb wrapper routine (writes required ASCII table header keywords) that caused it to fail on DEC OSF and other platforms where sizeof(long) = 8. Version 2.300 - 23 Oct 2001 New Routines: - fits_comp_img and fits_decomp_img are now fully supported and documented. These routine compress and decompress, respective, a FITS image using a new algorithm in which the image is first divided into a grid of rectangular tiles, then the compressed byte stream from each tile is stored in a row of a binary table. CFITSIO can transparently read FITS images stored in this compressed format. Compression ratios of 3 - 6 are typically achieved. Large compression ratios are achieved for floating point images by throwing away non-significant noise bits in the pixel values. - fits_test_heap tests the integrity of the binary table heap and returns statistics on the amount of unused space in the heap and the amount of space that is pointed to by more than 1 descriptor. - fits_compress_heap which will reorder the arrays in the binary table heap, recovering any unused space. Enhancements: - made substantial internal changes to the code to support FITS files containing 64-bit integer data values. These files have BITPIX = 64 or TFORMn = 'K'. This new feature in CFITSIO is currently only enabled if SUPPORT_64BIT_INTEGERS is defined = 1 in the beginning of the fitsio2.h file. By default support for 64-bit integers is not enabled. - improved the ability to read and return a table column value as a formatted string by supporting quasi-legal TDISPn values which have a lowercase format code letter, and by completely ignoring other unrecognizable TDISPn values. Previously, unrecognized TDISPn values could cause zero length strings to be returned. - made fits_write_key_longstr more efficient when writing keywords using the long string CONTINUE convention. It previously did not use all the available space on each card when the string to be written contained many single quote characters. - added a new "CFITSIO Quick Start Guide" which provides all the basic information needed to write C programs using CFITSIO. - updated the standard COMMENT keywords that are written at the beginning of every primary array to refer to the newly published FITS Standard document in Astronomy and Astrophysics. Note: because of this change, any FITS file created with this version of CFITSIO will not be identical to the same file written with a previous version of CFITSIO. - replaced the 2 routines in pliocomp.c with new versions provided by D Tody and N Zarate. These routines compress/uncompress image pixels using the IRAF pixel list compression algorithm. - modified fits_copy_hdu so that when copying a Primary Array to an Image extension, the COMMENT cards which give the reference to the A&A journal article about FITS are not copied. In the inverse case the COMMENT keywords are inserted in the header. - modified configure and Makefile.in to add capability to build a shared version of the CFITSIO library. Type 'make shared' or 'make libcfitsio.so' to invoke this option. - disabled some uninformative error messages on the error stack: 1) when calling ffclos (and then ffchdu) with input status > 0 2) when ffmahd tries to move beyond the end of file. The returned status value remains the same as before, but the annoying error messages no longer get written to the error stack. - The syntax for column filtering has been modified so that if one only specifies a list of column names, then only those columns will be copied into the output file. This provides a simple way to make a copy of a table containing only a specified list of columns. If the column specifier explicitly deletes a column, however, than all the other columns will be copied to the filtered input file, regardless of whether the columns were listed or not. Similarly, if the expression specifies only a column to be modified or created, then all the other columns in the table will be copied. mytable.fit[1][col Time;Rate] - only the Time and Rate columns will be copied to the filtered input file. mytable.fit[1][col -Time ] - all but the Time column are copied to the filtered input file. mytable.fit[1][col Rate;-Time] - same as above. - changed a '#if defined' statement in f77_wrap.h and f77_wrap1.c to support the fortran wrappers on 64-bit IBM/RS6000 systems - modified group.c so that when attaching one group (the child) to another (the parent), check in each file for the existence of a pointer to the other before adding the link. This is to prevent multiple links from forming under all circumstances. - modified the filename parser to accept 'STDIN', 'stdin', 'STDOUT' and 'stdout' in addition to '-' to mean read the file from standard input or write to standard output. - Added support for reversing an axis when reading a subsection of a compressed image using the extended filename syntax, as in myfile.fits+1[-*, *] or myfile.fits+1[600:501,501:600] - When copying a compressed image to a uncompressed image, the EXTNAME keyword is no longer copied if the value is equal to 'COMPRESSED_IMAGE'. - slight change to the comment field of the DATE keyword to reflect the fact that the Unix system date and time is not true UTC time. Bug fixes: - fits_write_key_longstr was not writing the keyword if a null input string value was given. - writing data to a variable length column, if that binary table is not the last HDU in the FITS file, might overwrite the following HDU. Fixed this by changing the order of a couple operations in ffgcpr. - deleting a column from a table containing variable length columns could cause the last few FITS blocks of the file to be reset = 0. This bug occurred as a result of modifications to ffdblk in v2.202. This mainly affects users of the 'compress_fits' utility program. - fixed obscure problem when writing bits to a variable length 'B' column. - when reading a subsection of an image, the BSCALE and BZERO pixel scaling may not have been applied when reading image pixel values (even though the scaling keywords were properly written in the header). - fits_get_keyclass was not returning 'TYP_STRUCT_KEY' for the END keyword. Version 2.204 - 26 July 2001 Bug fixes: - Re-write of fits_clean_url in group.c to solve various problems with invalid bounds checking. Version 2.203 - 19 July 2001 (version in FTOOLS v5.1) Enhancements: - When a row selection or calculator expression is written in an external file (and read by CFITSIO with the '@filename' syntax) the file can now contain comment lines. The comment line must begin with 2 slash characters as the first 2 characters on the line. CFITSIO will ignore the entire line when reading the expression. Bug fixes: - With previous versions of CFITSIO, the pixel values in a FITS image could be read incorrectly in the following case: when opening a subset of a FITS image (using the 'filename.fits[Xmin:Xmax,Ymin:Ymax]' notation) on a PC linux, PC Windows, or DEC OSF machine (but not on a SUN or Mac). This problem only occurs when reading more than 8640 bytes of data (2160 4-byte integers) at a time, and usually only occurs if the reading program reads the pixel data immediately after opening the file, without first reading any header keywords. This error would cause strips of zero valued pixels to appear at semi-random positions in the image, where each strip usually would be 2880 bytes long. This problem does not affect cases where the input subsetted image is simply copied to a new output FITS file. Version 2.202 - 22 May 2001 Enhancements: - revised the logic in the routine that tests if a point is within a region: if the first region is an excluded region, then it implicitly assumes a prior include region covering the entire detector. It also now supports cases where a smaller include region is within a prior exclude region. - made enhancement to ffgclb (read bytes) so that it can also read values from a logical column, returning an array of 1s and 0s. - defined 2 new grouping error status values (349, 350) in cfitsio.h and made minor changes to group.c to use these new status values. - modified fits_open_file so that if it encounters an error while trying to move to a user-specified extension (or select a subset of the rows in an input table, or make a histogram of the column values) it will close the input file instead of leaving it open. - when using the extended filename syntax to filter the rows in an input table, or create a histogram image from the values in a table column, CFITSIO now writes HISTORY keywords in the output file to document the filtering expression that was used. Bug fixes: - ffdblk (called by ffdrow) could overwrite the last FITS block(s) in the file in some cases where one writes data to a variable length column and then calls ffdrow to delete rows in the table. This bug was similar to the ffiblk bug that was fixed in v2.033. - modified fits_write_col_null to fix a problem which under unusual circumstances would cause a End-of-File error when trying to read back the value in an ASCII string column, after initializing if by writing a null value to it. - fixed obscure bug in the calculator function that caused an error when trying to modify the value of a keyword in a HDU that does not have a NAXIS2 keyword (e.g., a null primary array). - the iterator function (in putcol.c) had a bug when calculating the optimum number rows to process in the case where the table has very wide rows (>33120 bytes) and the calculator expression involves columns from more than one FITS table. This could cause an infinite loop in calls to the ffcalc calculator function. - fixed bug in ffmvec, which modifies the length of an existing vector column in a binary table. If the vector was reduced in length, the FITS file could sometimes be left in a corrupted state, and in all cases the values in the remaining vector elements of that column would be altered. - in drvrfile.c, replaced calls to fsetpos and fgetpos with fseek and ftell (or fseeko and ftello) because the fpos_t filetype used in fsetpos is incompatible with the off_t filetype used in fseek, at least on some platforms (Linux 7.0). (This fix was inserted into the V2.201 release on April 4). - added "#define fits_write_pixnull ffppxn" to longnam.h Version 2.201 - 15 March 2001 Enhancements - enhanced the keyword reading routines so that they will do implicit datatype conversion from a string keyword value to a numeric keyword value, if the string consist of a valid number enclosed in quotes. For example, the keyword mykey = '37.5' can be read by ffgkye. - modified ffiimg so that it is possible to insert a new primary array at the beginning of the file. The original primary array is then converted into an IMAGE extension. - modified ffcpdt (copy data unit) to support the case where the data unit is being copied between 2 HDUs in the same file. - enhanced the fits_read_pix and fits_read_pixnull routines so that they support the tiled image compression format that the other image reading routines also support. - modified the Extended File Name syntax to also accept a minus sign (-) as well as an exclamation point (!) as the leading character when specifying a column or or keyword to be deleted, as in [col -time] will delete the TIME column. - now completely support reading subimages, including pixel increments in each dimension, for tile-compressed images (where the compressed image tiles are stored in a binary table). Bug fixes: - fixed confusion in the use of the fpos_t and off_t datatypes in the fgetpos and fsetpos routines in drvrfile.c which caused problems with the Windows VC++ compiler. (fpos_t is not necessarily identical to off_t) - fixed a typo in the fits_get_url function in group.c which caused problems when determining the relative URL to a compressed FITS file. - included fitsio.h in the shared memory utility program, smem.c, in order to define OFF_T. - fixed typo in the datatype of 'nullvalue' in ffgsvi, which caused attempts to read subsections of a short integer tiled compressed image to fail with a bus error. - fixed bug in ffdkey which sometimes worked incorrectly if one tried to delete a nonexistent keyword beyond the end of the header. - fixed problem in fits_select_image_section when it writes a dummy value to the last pixel of the section. If the image contains scaled integer pixels, then in some cases the pixel value could end up out of range. - fixed obscure bug in the ffpcn_ family of routines which gave a floating exception when trying to write zero number of pixels to a zero length array (why would anyone do this?) Version 2.200 - 26 Jan 2001 Enhancements - updated the region filtering code to support the latest region file formats that are generated by the POW, SAOtng and ds9 programs. Region positions may now be given in HH:MM:SS.s, DD:MM:SS.s format, and region sizes may be given arcsec or arcmin instead of only in pixel units. Also changed the logic so that if multiple 'include' regions are specified in the region file, they are ORed together, instead of ANDed, so that the filtering keeps points that are located within any of the 'include' regions, not just the intersection of the regions. - added support for reading raw binary data arrays by converting them on the fly into virtual FITS files. - modified ffpmsg, which writes error messages to CFITSIO's internal error stack, so that messages > 80 characters long will be wrapped around into multiple 80 character messages, instead of just being truncated at 80 characters. - modified the CFITSIO parser so that expression which involve scaled integer columns get cast to double rather than int. - Modified the keyword template parsing routine, ffgthd, to support the HIERARCH keyword. - modified ffainit and ffbinit so that they don't unnecessarily allocate 0 bytes of memory if there are no columns (TFIELDS = 0) in the table that is being opened. - modified fitsio2.h to support NetBSD on Alpha OSF platforms (NetBSD does not define the '__unix__' symbol). - changed the way OFF_T is defined in fitsio.h for greater portability. - changed drvrsmem.c so it is compiled only when HAVE_SHMEM_SERVICES is defined in order to removed the conditional logic from the Makefile - reorganized the CFITSIO User's guide to make it clearer and easier for new users to learn the basic routines. - fixed ffhdef (which reserves space for more header keywords) so that is also updates the start position of the next HDU. This affected the offset values returned by ffghof. Version 2.100 - 18 Oct 2000 Enhancements - made substantial modification to the code to support Large files, i.e., files larger than 2**31 bytes = 2.1GB. FITS files up to 6 terabytes in size may now be read and written on platforms that support Large files (currently only Solaris). - modified ffpcom and ffphis, which write COMMENT and HISTORY keywords, respectively, so that they now use columns 9 - 80, instead of only columns 11 - 80. Previously, these routines avoided using columns 9 and 10, but this is was unnecessarily restrictive. - modified ffdhdu so that instead of refusing to delete the primary array, it will replace the current primary array with a null primary array containing the bare minimum of required keywords and no data. New Routines - fits_read_pix, fits_read_pixnull, fits_read_subset, and fits_write_pix routines were added to enable reading and writing of Large images, with more than 2.1e9 pixels. These new routines are now recommended as the basic routines for reading and writing all images. - fits_get_hduoff returns the byte offset in the file to the start and end of the current HDU. This routine replaces the now obsolete fits_get_hduaddr routine; it uses 'off_t' instead of 'long' as the datatype of the arguments and can support offsets in files greater than 2.1GB in size. Bug fixes: - fixed bug in fits_select_image_section that caused an integer overflow when reading very large image sections (bigger than 8192 x 8192 4-byte pixels). - improved ffptbb, the low-level table writing routine, so that it will insert additional rows in the table if the table is not already big enough. Previously it would have just over- written any HDUs following the table in the FITS file. - fixed a bug in the fits_write_col_bit/ffpclx routine which could not write to a bit 'X' column if that was the first column in the table to be written to. This bug would not appear if any other datatype column was written to first. - non-sensible (but still formally legal) binary table TFORM values such as '8A15', or '1A8' or 'A8' would confuse CFITSIO and cause it to return a 308 error. When parsing the TFORMn = 'rAw' value, the ffbnfm routine has been modified to ignore the 'w' value in cases where w > r. - fixed bug in the blsearch routine in iraffits.c which sometimes caused an out-of-bounds string pointer to be returned when searching for blank space in the header just before the 'END' keyword. - fixed minor problem in ffgtcr in group.c, which sometimes failed while trying to move to the end of file before appending a grouping table. - on Solaris, with Sun CC 5.0, one must check for '__unix' rather than '__unix__' or 'unix' as it's symbol. Needed to modify this in drvrfile.c in 3 places. - in ffextn, the FITS file would be left open if the named extension doesn't exist, thus preventing the file from being opened again later with write access. - fixed bug in ffiimg that would cause attempts to insert a new image extension following a table extension, and in front of any other type of extension, to fail. Version 2.037 - 6 July 2000 Enhancements - added support in the extended filename syntax for flipping an image along any axis either by specifying a starting section pixel number greater than the ending pixel number, or by using '-*' to flip the whole axis. Examples: "myfile.fits[1:100, 50:10]" or "myfile.fits[-*,*]". - when reading a section of an image with the extended filename syntax (e.g. image.fits[1:100:2, 1:100:2), any CDi_j WCS keywords will be updated if necessary to transfer the world coordinate system from the imput image to the output image section. - on UNIX platforms, added support for filenames that begin with "~/" or "~user/". The "~" symbol will get expanded into a string that gives the user's home directory. - changed the filename parser to support disk file names that begin with a minus sign. Previously, the leading minus sign would cause CFITSIO to try to read/write the file from/to stdin/stdout. - modified the general fits_update_key routine, which writes or updates a keyword value, to use the 'G' display format instead of the 'E' format for floating point keyword values. This will eliminate trailing zeros from appearing in the value. - added support for the "-CAR" celestial coordinate projection in the ffwldp and ffxypx routines. The "-CAR" projection is the default simplest possible linear projection. - added new fits_create_memfile/ffimem routine to create a new fits file at a designated memory location. - ported f77_wrap.h and f77_wrap1.c so that the Fortran interface wrappers work correctly on 64-bit SGI operating systems. In this environment, C 'long's are 8-bytes long, but Fortran 'integers' are still only 4-bytes long, so the words have to be converted by the wrappers. - minor modification to cfortran.h to automatically detect when it is running on a linux platform, and then define f2cFortran in that case. This eliminates the need to define -Df2cFortran on the command line. - modified group.c to support multiple "/" characters in the path name of the file to be opened/created. - minor modifications to the parser (eval.y, eval_f.c, eval_y.c) to a) add the unary '+' operator, and b) support copying the TDIMn keyword from the input to the output image under certain circumstances. - modified the lexical parser in eval_l.y and eval_l.c to support #NULL and #SNULL constants which act to set the value to Null. Support was also added for the C-conditional expression: 'boolean ? trueVal : falseVal'. - small modification to eval_f.c to write an error message to the error stack if numerical overflow occurs when evaluating an expression. - configure and configure.in now support the egcs g77 compiler on Linux platforms. Bug fixes: - fixed a significant bug when using the extended filename binning syntax to generate a 2-dimensional image from a histogram of the values in 2 table columns. This bug would cause table events that should have been located in the row just below the bottom row of the image (and thus should have been excluded from the histogram) to be instead added into the first row of the image. Similarly, the first plane of a 3-D or 4-D data cube would include the events that should have been excluded as falling in the previous plane of the cube. - fixed minor bug when parsing an extended filename that contains nested pairs of square brackets (e.g., '[col newcol=oldcol[9]]'). - fixed bug when reading unsigned integer values from a table or image with fits_read_col_uint/ffgcvuk. This bug only occurred on systems like Digital Unix (now Tru64 Unix) in which 'long' integers are 8 bytes long, and only when reading more than 7200 elements at a time. This bug would generally cause the program to crash with a segmentation fault. - modified ffgcpr to update 'heapstart' as well as 'numrows' when writing more rows beyond the end of the table. heapstart is needed to calculate if more space needs to be inserted in the table when inserting columns into the table. - modified fficls (insert column), ffmvec, ffdrow and ffdcol to not use the value of the NAXIS2 keyword as the number of rows in the table, and instead use the value that is stored in an internal structure, because the keyword value may not be up to date. - Fixed bug in the iterator function that affected the handling of null values in string columns in ASCII and binary tables. - Reading a subsample of pixels in very large images, (e.g., file = myfile.fits[1:10000:10,1:10000:10], could cause a long integer overflow (value > 2**31) in the computation of the starting byte offset in the file, and cause a return error status = 304 (negative byte address). This was fixed by changing the order of the arithmetic operations in calculating the value of 'readptr' in the ffgcli, ffgclj, ffgcle, ffgcld, etc. routines. - In version 2.031, a fix to prevent compressed files from being opened with write privilege was implemented incorrectly. The fix was intended to not allow a compressed FITS file to be opened except when a local uncompressed copy of the file is being produced (then the copy is opened with write access), but in fact the opposite behavior occurred: Compressed files could be opened with write access, EXCEPT when a local copy is produced. This has been fixed in the mem_compress_open and file_compress_open routines. - in iraffits.c, a global variable called 'val' caused multiply defined symbols warning when linking cfitsio and IRAF libraries. This was fixed by making 'val' a local variable within the routine. Version 2.036 - 1 Feb 2000 - added 2 new generic routines, ffgpf and ffgcf which are analogous to ffgpv and ffgcv but return an array of null flag values instead of setting null pixels to a reserved value. - minor change to eval_y.c and eval.y to "define alloca malloc" on all platforms, not just VMS. - added support for the unsigned int datatype (TUINT) in the generic ffuky routine and changed ffpky so that unsigned ints are cast to double instead of long before being written to the header. - modified ffs2c so that if a null string is given as input then a null FITS string (2 successive single quotes) will be returned. Previously this routine would just return a string with a single quote, which could cause an illegal keyword record to be written. - The file flush operation on Windows platforms apparently changes the internal file position pointer (!) in violation of the C standard. Put a patch into the file_flush routine to explicitly seek back to the original file position. - changed the name of imcomp_get_compressed_image_parms to imcomp_get_compressed_image_par to not exceed the 31 character limit on some compilers. - modified the filename parser (which is used when moving to a named HDU) to support EXTNAME values which contain embedded blanks. - modified drvrnet.c to deal with ftp compressed files better so that even fits files returned from cgi queries which have the wrong mime types and/or wrong types of file names should still decompress. - modified ffgics to reduce the tolerance for acceptable skewness between the axes, and added a new warning return status = APPROX_WCS_KEY in cases where there is significant skewness between the axes. - fixed bug in ffgics that affected cases where the first coordinate axis was DEC, not RA, and the image was a mirror image of the sky. - fixed bug in ffhist when trying to read the default binning factor keyword, TDBIN. - modified ffhist so that is correctly computes the rotation angle in a 2-D image if the first histogram column has a CROTA type keyword but the 2nd column does not. - modified ffcpcl so that it preserves the comment fields on the TTYPE and TFORM keywords when the column is copied to a new file. - make small change to configure.in to support FreeBSD Linux by setting CFLAGS = -Df2cFortran instead of -Dg77Fortran. Then regenerated configure with autoconf 2.13 instead of 2.12. Version 2.035 - 7 Dec 1999 (internal release only, FTOOLS 5.0.2) - added new routine called fits_get_keyclass/ffgkcl that returns the general class of the keyword, e.g., required structural keyword, WCS keyword, Comment keyword, etc. 15 classes of keywords have been defined in fitsio.h - added new routine called fits_get_img_parm/ffgipr that is similar to ffgphd but it only return the bitpix, naxis, and naxisn values. - added 3 new routines that support the long string keyword convention: fits_insert_key_longstr, fits_modify_key_longstr fits_update_key_longstr. - modified ffgphd which reads image header keywords to support the new experimental compressed image format. - when opening a .Z compressed file, CFITSIO tries to allocate memory equal to 3 times the file size, which may be excessive in some cases. This was changed so that if the allocation fails, then CFITSIO will try again to allocate only enough memory equal to 1 times the file size. More memory will be allocated later if this turns out to be too small. - improved the error checking in the fits_insert_key routine to check for illegal characters in the keyword. Version 2.034 - 23 Nov 1999 - enhanced support for the new 'CD' matrix world coordinate system keywords in the ffigics routine. This routine has been enhanced to look for the new 'CD' keywords, if present, and convert them back to the old CDELTn and CROTAn values, which are then returned. The routine will also swap the WCS parameters for the 2 axes if the declination-like axis is the first WCS axis. - modified ffphbn in putkey.c to support the 'U' and 'V" TFORM characters (which represent unsigned short and unsigned int columns) in variable length array columns. (previously only supported these types in fixed length columns). - added checks when reading gzipped files to detect unexpected EOF. Previously, the 'inflate_codes' routine would just sit in an infinite loop if the file ended unexpectedly. - modified fits_verify_chksum/ffvcks so that checksum keywords with a blank value string are treated as undefined, the same as if the keyword did not exist at all. - fixed ffghtb and ffghbn so that they return the extname value in cases where there are no columns in the table. - fixed bug in the ffgtwcs routine (this is a little utility routine to aid in interfacing to Doug Mink's WCS routines); it was not correctly padding the length of string-valued keywords in the returned string. - fixed bug in 'iraffits.c' that prevented Type-2 IRAF images from being correctly byte-swapped on PCs and DEC-OSF machines. - fixed tiny memory leak in irafncmp in iraffits.c. Only relevant when reading IRAF .imh files. - fixed a bug (introduced in version 2.027) that caused the keyword reading routines to sometimes not find a matching keyword if the input name template used the '*' wildcard as the last character. (e.g., if input name = 'COMMENT*' then it would not find the 'COMMENT' keywords. (It would have found longer keywords like 'COMMENTX' correctly). The fix required a minor change to ffgcrd in getkey.c - modified the routine (ffswap8) that does byteswapping of double precision numbers. Some linux systems have reported floating point exceptions because they were trying to interpret the bytes as a double before the bytes had been swapped. - fixed bug in the calculation of the position of the last byte in the string of bits to be read in ffgcxuk and ffgcxui. This bug generally caused no harm, but could cause the routine to exit with an invalid error message about trying to read beyond the size of the field. - If a unix machine did not have '__unix__', 'unix', or '__unix' C preprocessor symbols defined, then CFITSIO would correctly open one FITS file, but would not correctly open subsequent files. Instead it would think that the same file was being opened multiple times. This problem has only been seen on an IBM/AIX machine. The fits_path2url and fits_url2path routines in group.c were modified to fix the problem. - fixed bug in group.c, which affected WINDOWS platforms only, that caused programs to go into infinite loop when trying to open certain files. - the ftrsim Fortran wrapper routine to ffrsim was not defined correctly, which caused the naxis(2) value to be passed incorrectly on Dec OSF machines, where sizeof(long) != sizeof(int). Version 2.033 - 17 Sept 1999 - New Feature: enhanced the row selection parser so that comparisons between values in different rows of the table are allowed, and the string comparisons with <, >, <=, and >= are supported. - added new routine the returns the name of the keyword in the input keyword record string. The name is usually the first 8 characters of the record, except if the HIERARCH convention is being used in which case the name may be up to 67 characters long. - added new routine called fits_null_check/ffnchk that checks to see if the current header contains any null (ASCII 0) characters. These characters are illegal in FITS headers, but they go undetected by the other CFITSIO routines that read the header keywords. - the group.c file has been replaced with a new version as supplied by the ISDC. The changes are mainly to support partial URLs and absolute URLs more robustly. Host dependent directory paths are now converted to true URLs before being read from/written to grouping tables. - modified ffnmhd slightly so that it will move to the first extension in which either the EXTNAME or the HDUNAME keyword is equal to the user-specified name. Previously, it only checked for HDUNAME if the EXTNAME keyword did not exist. - made small change to drvrnet.c so that it uncompress files which end in .Z and .gz just as for ftp files. - rewrote ffcphd (copy header) to handle the case where the input and output HDU are in the same physical FITS file. - fixed bug in how long string keyword values (using the CONTINUE convention) were read. If the string keyword value ended in an '&' character, then fits_read_key_longstr, fits_modify_key_str, and fits_delete_key would interpret the following keyword as a continuation, regardless of whether that keyword name was 'CONTINUE' as required by this convention. There was also a bug in that if the string keyword value was all blanks, then fits_modify_key_str could in certain unusual cases think that the keyword ended in an '&' and go into an infinite loop. - modified ffgpv so that it calls the higher level ffgpv_ routine rather than directly calling the lower level ffgcl_ routine. This change is needed to eventually support reading compressed images. - added 3 new routines to get the image datatype, image dimensions, and image axes length. These support the case where the image is compressed and stored in a binary table. - fixed bug in ffiblk that could sometimes cause it to insert a new block in a file somewhere in the middle of the data, instead of at the end of the HDU. This fortunately is a rare problem, mainly only occurring in certain cases when inserting rows in a binary table that contains variable length array data (i.e., has a heap). - modified fits_write_tdim so that it double checks the TFORMn value directly if the column repeat count stored in the internal structure is not equal to the product of all the dimensions. - fixed bug that prevented ffitab or ffibin from inserting a new table after a null primary array (can't read NAXIS2 keyword). Required a small change to ffrdef. - modified testprog.c so that it will continue to run even if it cannot open or process the template file testprog.tpt. - modified the logic in lines 1182-1185 of grparser.c so that it returns the correct status value in case of an error. - added test in fitsio2.h to see if __sparcv9 is defined; this identifies a machine running Solaris 7 in 64-bit mode where long integers are 64 bits long. Version 2.032 - 25 May 1999 - the distribution .tar file was changed so that all the files will be untarred into a subdirectory by default instead of into the current directory. - modified ffclos so that it always frees the space allocated by the fptr pointer, even when another fptr points to the same file. - plugged a potential (but rare in practice) memory leak in ffpinit - fixed bug in all the ffp3d_ and ffg3d_ routines in cases where the data cube that has been allocated in memory has more planes than the data cube in the FITS file. - modified drvrsmem.c so that it allocates a small shared memory segment only if CFITSIO tries to read or write a FITS file in shared memory. Previously it always allocated the segment whether it was needed or not. Also, this small segment is removed if 0 shared memory segments remain in the system. - put "static" in front of 7 DECLARE macros in compress.c because these global variables were causing conflicts with other applications programs that had variables with the same names. - modified ffasfm to return datatype = TDOUBLE instead of TFLOAT if the ASCII table column has TFORMn = 'Ew.d' with d > 6. - modified the column reading routines to a) print out the offending entry if an error occurs when trying to read a numeric ASCII table column, and b) print out the column number that had the error (the messages are written to CFITSIOs error stack) - major updates to the Fortran FITSIO User's Guide to include many new functions that have been added to CFITSIO in the past year. - modified fitsio2.h so that the test for __D_FLOAT etc. is only made on Alpha VMS machines, to avoid syntax errors on some other platforms. - modified ffgthd so that it recognizes a floating point value that uses the 'd' or 'D' exponent character. - removed the range check in fftm2s that returned an error if 'decimals' was less than zero. A negative value is OK and is used to return only the date and not the time in the string. Version 2.031 - 31 Mar 1999 - moved the code that updates the NAXIS2 and PCOUNT keywords from ffchdu into the lower lever ffrdef routine. This ensures that other routines which call ffrdef will correctly update these 2 keywords if required. Otherwise, for instance, calling fits_write_checksum before closing the HDU could cause the NAXIS2 keyword (number of rows in the table) to not be updated. - fixed bug (introduced in version 2.030) when writing null values to a primary array or image extension. If trying to set more than 1 pixel to null at a time, then typically only 1 null would be written. Also fixed related bug when writing null values to rows in a table that are beyond the currently defined size of the table (the size of the table was not being expanded properly). - enhanced the extended filename parser to support '*' in image section specifiers, to mean use the whole range of the axis. myfile.fits[*,1:100] means use the whole range of the first axis and pixels 1 to 100 in the second axis. Also supports an increment, as in myfile.fits[*:2, *:2] to use just the odd numbered rows and columns. - modified fitscore.c to set the initial max size of the header, when first reading it, to the current size of the file, rather than to 2 x 10**9 to avoid rare cases where CFITSIO ends up writing a huge file to disk. - modified file_compress_open so that it will not allow a compressed FITS file to be opened with write access. Otherwise, a program could write to the temporary copy of the uncompressed file, but the modification would be lost when the program exits. Version 2.030 - 24 Feb 1999 - fixed bug in ffpclu when trying to write a null value to a row beyond the current size of the table (wouldn't append new rows like it should). - major new feature: enhanced the routines that read ASCII string columns in tables so that they can read any table column, including logical and numeric valued columns. The column values are returned as a formatted string. The format is determined by the TDISPn keyword if present, otherwise a default format based on the datatype of the column is used. - new routine: fits_get_col_display_width/ffgcdw returns the length of the formatted strings that will be returned by the routines that read table columns as strings. - major new feature: added support for specifying an 'image section' when opening an image: e.g, myfile.fits[1:512:2,2:512:2] to open a 256x256 pixel image consisting of the odd columns and the even numbered rows of the input image. - added supporting project files and instructions for building CFITSIO under Windows NT with the Microsoft Visual C++ compiler. - changed the variable 'template' to 'templt' in testprog.c since it conflicted with a reserved word on some compilers. - modified group.c to conditionally include sys/stat.h only on unix platforms - fixed bug in the ffiter iterator function that caused it to always pass 'firstn' = 1 to the work function when reading from the primary array or IMAGE extension. It worked correctly for tables. - fixed bug in the template header keyword parser (ffgthd) in cases where the input template line contains a logical valued keyword (T or F) without any following comment string. It was previously interpreting this as a string-valued keyword. - modified ffrhdu that reads and opens a new HDU, so that it ignores any leading blank characters in the XTENSION name, e.g., XTENSION= ' BINTABLE' will not cause any errors, even though this technically violates the FITS Standard. - modified ffgtbp that reads the required table keywords to make it more lenient and not exit with an error if the THEAP keyword in binary tables cannot be read as an integer. Now it will simply ignore this keyword if it cannot be read. - added test for 'WIN32' as well as '__WIN32__' in fitsio2.h, eval.l and eval_l.c in a preprocessor statement. - changed definition of strcasecmp and strncasecmp in fitsio2.h, eval.l and eval_l.c to conform to the function prototypes under the Alpha VMS v7.1 compiler. - corrected the long function names in longnam.h for the new WCS utility functions in wcssubs.c Version 2.029 - 11 Feb 1999 - fixed bug in the way NANs and underflows were being detected on VAX and Alpha VMS machines. - enhanced the filename parser to distinguish between a VMS-style directory name (e.g. disk:[directory]myfile.fits) and a CFITSIO filter specifier at the end of the name. - modified ffgthd to support the HIERARCH convention for keyword names that are longer than 8 characters or contain characters that would be illegal in standard FITS keyword names. - modified the include statements in grparser.c so that malloc.h and memory.h are only included on the few platforms that really need them. - modified the file_read routine in drvrfile.c to ignore the last record in the FITS file it it only contains a single character that is equal to 0, 10 or 32. Text editors sometimes append a character like this to the end of the file, so CFITSIO will ignore it and treat it as if it had reached the end of file. - minor modifications to fitsio.h to help support the ROOT environment. - installed new version of group.c and group.h; the main change is to support relative paths (e.g. "../filename") in the URLs - modified the histogramming routines so that it looks for the default preferred column axes in a keyword of the form CPREF = 'Xcol, Ycol' instead of separate keywords of the form CPREF1 = 'Xcol' CPREF2 = 'Ycol' - fixed bug so that if the binning spec is just a single integer, as in [bin 4] then this will be interpreted as meaning to make a 2D histogram using the preferred or default axes, with the integer taken as the binning factor in both axes. Version 2.028 - 27 Jan 1999 - if the TNULLn keyword value was outside the range of a 'I' or 'B' column, an overflow would occur when setting the short or char to the TNULLn value, leading to incorrect values being flagged as being undefined. This has been fixed so that CFITSIO will ignore TNULLn values that are beyond the range of the column data type. - changed a few instances of the string {"\0"} to {'\0'} in the file groups.c - installed new version of the grparser.c file from the ISDC - added new WCS support routines (in wcssub.c) which make it easier to call Doug Mink's WCSlib routines for converting between plate and sky coordinates. The CFITSIO routines themselves never call a WCSlib routine, so CFITSIO is not dependent on WCSlib. - modified ffopen so that if you use the extended filename syntax to both select rows in a table and then bin columns into a histogram, then CFITSIO will simply construct an array listing the good row numbers to be used when making the histogram, instead of making a whole new temporary FITS file containing the selected rows. - modified ffgphd which parses the primary array header keywords when opening a file, to not choke on minor format errors in optional keywords. Otherwise, this prevents CFITSIO from even opening the file. - changed a few more variable declarations in compress.c from global to static. Version 2.027 - 12 Jan 1999 - modified the usage of the output filename specifier so that it, a) gives the name of the binned image, if specified, else, b) gives the name of column filtered and/or row filtered table, if specified, else c) is the name for a local copy of the ftp or http file, else, d) is the name for the local uncompressed version of the compressed FITS file, else, e) the output filename is ignored. - fixed minor bug in ffcmps, when comparing 2 strings while using a '*' wild card character. - fixed bug in ftgthd that affected cases where the template string started with a minus sign and contained 2 tokens (to rename a keyword). - added support for the HIERARCH keyword convention for reading and writing keywords longer than 8 characters or that contain ASCII characters not allowed in normal FITS keywords. - modified the extended filename syntax to support opening images that are contained in a single cell of a binary table with syntax: filename.fits[extname; col_name(row_expression)] Version 2.026 - 23 Dec 1998 - modified the group parser to: a) support CFITSIO_INCLUDE_FILES environment variable, which can point to the location of template files, and, b) the FITS file parameter passed to the parser no longer has to point to an empty file. If there are already HDUs in the file, then the parser appends new HDUs to the end of the file. - make a small change to the drvrnet.c file to accommodate creating a static version of the CFITSIO library. - added 2 new routines to read consecutive bits as an unsigned integer from a Bit 'X' or Byte 'B' column (ffgcxui and ffgcxuk). - modified the logic for determining histogram boundaries in ffhisto to add one more bin by default, to catch values that are right on the upper boundary of the histogram, or are in the last partial bin. - modified cfitsio2.h to support the new Solaris 7 64-bit mode operating system. - Add utility routine, CFits2Unit, to the Fortran wrappers which searches the gFitsFiles array for a fptr, returning its element (Fortran unit number), or allocating a new element if one doesn't already exists... for C calling Fortran calling CFITSIO. - modified configure so that it does not use the compiler optimizer when using gcc 2.8.x on Linux - (re)added the fitsio.* documentation files that describe the Fortran-callable FITSIO interface to the C routines. - modified the lexical parser in eval_f.c to fix bug in null detections and bug in ffsrow when nrows = 0. - modified ffcalc so that it creates a TNULLn keyword if appropriate when a new column is created. Also fixed detection of OVERFLOWs so that it ignores null values. - added hyperbolic trig and rounding functions to the lexical parser in the eval* files. - improved error message that gets written when the group number is out of range when reading a 'random groups' array. - added description of shared memory, grouping, and template parsing error messages to ffgerr and to the User's Guide. Moved the error code definitions from drvsmem.h to fitsio.h. - modified grparser.c to compile correctly on Alpha/OSF machines - modified drvrnet.c to eliminate compiler warnings - Modified Makefile.in to include targets for building all the sample programs that are included with CFITSIO. Version 2.025 - 1 Dec 1998 - modified ffgphd and ffgtbp so that they ignores BLANK and TNULLn keywords that do not have a valid integer value. Also, any error while reading the BSCALE, BZERO, TSCALn, or TZEROn keywords will be ignored. Previously, CFITSIO would have simply refused to read an HDU that had such an invalid keyword. - modified the parser in eval_f.c to accept out of order times in GTIs - updated cfitsio_mac.sit.hqx to fix bad target parameters for Mac's speed test program - modified template parser in grparser.c to: 1) not write GRPNAME keyword twice, and 2) assign correct value for EXTVERS keyword. - fixed minor bugs in group.c; mainly would only affect users of the INTEGRAL Data Access Layer. - temporarily removed the prototype for ffiwcs from fitsio.h until full WCS support is added to CFITSIO in the near future. - modified the HTTP driver to send a User-Agent string: HEASARC/CFITSIO/ - declared local variables in compress.c as 'static' to avoid conflicts with other libraries. Version 2.024 - 9 Nov 1998 - added new function fits_url_type which returns the driver prefix string associated with a particular FITS file pointer. Version 2.023 - 1 Nov 1998 - first full release of CFITSIO 2.0 - slightly modified the way real keyword values are formatted, to ensure that it includes a decimal point. E.g., '1.0E-09' instead of '1E-09' - added new function to support template files when creating new FITS files. - support the TCROTn WCS keyword in tables, when reading the WCS keywords. - modified the iterator to support null values in logical columns in binary tables. - fixed bug in iterator to support null values in integer columns in ASCII tables. - changed the values for FLOATNULLVALUE and DOUBLENULLVALUE to make them less likely to duplicate actual values in the data. - fixed major bug when freeing memory in the iterator function. It caused mysterious crashes on a few platforms, but had no effect on most others. - added support for reading IRAF format image (.imh files) - added more error checking to return an error if the size of the FITS file exceeds the largest value of a long integer (2.1 GB on 32-bit platforms). - CFITSIO now will automatically insert space for additional table rows or add space to the data heap, if one writes beyond the current end of the table or heap. This prevents any HDUs which might follow the current HDU from being overwritten. It is thus no longer necessary to explicitly call fits_insert_rows before writing new rows of data to the FITS file. - CFITSIO now automatically keeps track of the number of rows that have been written to a FITS table, and updates the NAXIS2 keyword accordingly when the table is closed. It is no longer necessary for the application program to updated NAXIS2. - When reading from a FITS table, CFITSIO will now return an error if the application tries to read beyond the end of the table. - added 2 routines to get the number of rows or columns in a table. - improved the undocumented feature that allows a '20A' column to be read as though it were a '20B' column by fits_read_col_byt. - added overflow error checking when reading keywords. Previously, the returned value could be silently truncated to the maximum allowed value for that data type. Now an error status is returned whenever an overflow occurs. - added new set of routines dealing with hierarchical groups of files. These were provided by Don Jennings of the INTEGRAL Science Data Center. - added new URL parsing routines. - changed the calling sequence to ffghad (get HDU address) from ffghad(fitsfile *fptr, > long *headstart, long *dataend) to ffghad(fitsfile *fptr, > long *headstart, long datastart, long *dataend, int *status) - major modification to support opening the same FITS file more than once. Now one can open the same file multiple times and read and write simultaneously to different HDUs within the file. fits_open_file automatically detects if the file is already opened. - added the ability to clobber/overwrite an existing file with the same name when creating a new output file. Just precede the output file name with '!' (an exclamation mark) - changed the ffpdat routine which writes the DATE keyword to use the new 'YYYY-MM-DDThh:mm:ss' format. - added several new routines to create or parse the new date/time format string. - changed ifdef for DECFortran in f77_wrap.h and f77_wrap1.c: expanded to recognize Linux/Alpha - added new lexical parsing routines (from Peter Wilson): eval_l.c, eval_y.c, eval_f.c, eval_defs.h, and eval_tab.h. These are used when doing on-the-fly table row selections. - added new family of routines to support reading and writing 'unsigned int' data type values in keywords, images or tables. - restructured all the putcol and getcol routines to provide simpler and more robust support for machines which have sizeof(long) = 8. Defined a new datatype INT32BIT which is always 32 bits long (platform independent) and is used internally in CFITSIO when reading or writing BITPIX = 32 images or 'J' columns. This eliminated the need for specialize routines like ffswaplong, ffunswaplong, and ffpacklong. - overhauled cfileio.c (and other files) to use loadable drivers for doing data I/O to different devices. Now CFITSIO support network access to ftp:// and http:// files, and to shared memory files. - removed the ffsmem routine and replaced it with ffomem. This will only affect software that reads an existing file in core memory. (written there by some other process). - modified all the ffgkn[] routines (get an array of keywords) so that the 'nfound' parameter is = the number of keywords returned, not the highest index value on the returned keywords. This makes no difference if the starting index value to look for = 1. This change is not backward compatible with previous versions of CFITSIO, but is the way that FITSIO behaved. - added new error code = 1 for any application error external to CFITSIO. Also reports "unknown error status" if the value doesn't match a known CFITSIO error. Version 1.42 - 30 April 1998 (included in FTOOLS 4.1 release) - modified the routines which read a FITS float values into a float array, or read FITS double values into a double array, so that the array value is also explicitly set in addition to setting the array of flag values, if the FITS value is a NaN. This ensures that no NaN values get passed back to the calling program, which can cause serious problems on some platforms (OSF). - added calls to ffrdef at the beginning of the insert or delete rows or columns routines in editcol.c to make sure that CFITSIO has correctly initialized the HDU information. - added new routine ffdrws to delete a list of rows in a table - added ffcphd to copy the header keywords from one hdu to another - made the anynul parameter in the ffgcl* routines optional by first checking to see if the pointer is not null before initializing it. - modified ffbinit and ffainit to ignore minor format errors in header keywords so that cfitsio can at least move to an extension that contains illegal keywords. - modified all the ffgcl* routines to simply return without error if nelem = 0. - added check to ffclose to check the validity of the fitsfile pointer before closing it. This should prevent program crashes when someone tries to close the same file more than once. - replaced calls to strcmp and strncmp with macros FSTRCMP and FSTRNCMP in a few places to improve performance when reading header keywords (suggested by Mike Noble) Bug Fixes: - fixed typo in macro definition of error 504 in the file fitsio.h. - in ffopen, reserved space for 4 more characters in the input file name in case a '.zip' suffix needs to be added. - small changes to ffpclx to fix problems when writing bit (X) data columns beyond the current end of file. - fixed small bug in ffcrhd where a dummy pointer was not initialized - initialized the dummy variable in ffgcfe and ffgcfd which was causing crashes under OSF in some cases. - increased the length of the allocated string ffgkls by 2 to support the case of reading a numeric keyword as a string which doesn't have the enclosing quote characters. Version 1.4 - 6 Feb 1998 - major restructuring of the CFITSIO User's Guide - added the new 'iterator' function. The fortran wrapper is in f77_iter.c for now. - enhanced ffcrtb so that it writes a dummy primary array if none currently exists before appending the table. - removed the ffgcl routine and replaced it with ffgcvl - modified ffpcnl to just take a single input null value instead of an entire array of null value flags. - modified ffcmps and ffgnxk so that, for example, the string 'rate' is not considered a match to the string 'rate2', and 'rate*' is a match to the string 'rate'. - modified ffgrsz to also work with images, in which case it returns the optimum number of pixels to process at one time. - modified ffgthd to support null valued keywords - added a new source file 'f77_wrap.c' that includes all the Fortran77 wrapper routines for calling CFITSIO. This will eventually replace the Fortran FITSIO library. - added new routines: ffppn - generic write primary array with null values ffpprn - write null values to primary array ffuky - 'update' a keyword value, with any specified datatype. ffrprt - write out report of error status and error messages ffiter - apply a user function iteratively to all the rows of a table ffpkyc - write complex-valued keyword ffpkym - write double complex-valued keyword ffpkfc - write complex-valued keyword in fixed format ffpkfm - write double complex-valued keyword in fixed format ffgkyc - read complex-valued keyword ffgkym - read double complex-valued keyword ffmkyc - modify complex-valued keyword ffmkym - modify double complex-valued keyword ffmkfc - modify complex-valued keyword in fixed format ffmkfm - modify double complex-valued keyword in fixed format ffukyc - update complex-valued keyword ffukym - update double complex-valued keyword ffukfc - update complex-valued keyword in fixed format ffukfm - update double complex-valued keyword in fixed format ffikyc - insert complex-valued keyword ffikym - insert double complex-valued keyword ffikfc - insert complex-valued keyword in fixed format ffikfm - insert double complex-valued keyword in fixed format ffpktp - write or modify keywords using ASCII template file ffcpcl - copy a column from one table to another ffcpky - copy an indexed keyword from one HDU to another ffpcnl - write logical values, including nulls, to binary table ffpcns - write string values, including nulls, to table ffmnhd - move to HDU with given exttype, EXTNAME and EXTVERS values ffthdu - return the total number of HDUs in the file ffghdt - return the type of the CHDU ffflnm - return the name of the open FITS file ffflmd - return the mode of the file (READONLY or READWRITE) - modified ffmahd and ffmrhd (to move to a new extension) so that a null pointer may be given for the returned HDUTYPE argument. - worked around a bug in the Mac CWpro2 compiler by changing all the statements like "#if BYTESWAPPED == TRUE" to "if BYTESWAPPED". - modified ffitab (insert new ASCII table) to allow tables with zero number of columns - modified Makefile.in and configure to define the -Dg77Fortran CFLAGS variable on Linux platforms. This is needed to compile the new f77_wrap.c file (which includes cfortran.h) Bug Fixes: - fixed small bug in ffgrz (get optimum row size) which sometimes caused it to return slightly less than the maximum optimum size. This bug would have done no harm to application programs. - fixed bug in ffpclk and ffgclk to add an 'else' case if size of int is not equal to size of short or size of long. - added test to ffgkls to check if the input string is not null before allocating memory for it. Version 1.32 - 21 November 1997 (internal release only) - fixed bug in the memory deallocation (free) statements in the ffopen routine in the cfileio.c file. - modified ffgphd to tolerate minor violations of the FITS standard in the format of the XTENSION = 'IMAGE ' keyword when reading FITS files. Extra trailing spaces are now allowed in the keyword value. (FITS standard will be changed so that this is not a violation). Version 1.31 - 4 November 1997 (internal release only) Enhancements: - added support for directly reading compressed FITS files by copying the algorithms from the gzip program. This supports the Unix compress, gzip and pkzip algorithms. - modified ffiimg, ffitab, and ffibin (insert HDUs into a FITS file) so that if the inserted HDU is at the end of the FITS file, then it simply appends a new empty HDU and writes the required keywords. This allows space to be reserved for additional keywords in the header if desired. - added the ffchfl and ffcdfl routines to check the header and data fill values, for compatibility with the Fortran FITSIO library. - added the ffgsdt routine to return the system date for compatibility with the Fortran FITSIO library. - added a diagnostic error message (written to the error stack) if the routines that read data from image or column fail. - modified ffgclb so that it simply copies the bytes from an ASCII 'nA' or 'An' format column into the user's byte array. Previously, CFITSIO would return an error when trying to read an 'A' column with ffgclb. - modified ffpclb so that it simply copies the input array of bytes to an ASCII 'nA' or 'An' format column. Previously, CFITSIO would return an error when trying to write to an 'A' column with ffpclb. Bug Fixes: - ffgkls was allocating one too few bytes when reading continued string keyword values. - in testprog.c added code to properly free the memory that had been allocated for string arrays. - corrected typographical errors in the User's Guide. Version 1.30 - 11 September 1997 - major overhaul to support reading and writing FITS files in memory. The new routines fits_set_mem_buff and fits_write_mem_buff have been added to initialize and copy out the memory buffer, respectively. - added support for reading FITS files piped in on 'stdin' and piped out on 'stdout'. Just specify the file name as '-' when opening or creating the FITS file. - added support for 64-bit SGI IRIX machines. This required adding routines to pack and unpack 32-bit integers into 64-bit integers. - cleaned up the code that supports G_FLOAT and IEEE_FLOAT on Alpha VMS systems. Now, the type of float is determined at compile time, not run time. Bug Fixes: - replaced the malloc calls in the error message stack routines with a static fixed size array. The malloc's cause more problems than they solved, and were prone to cause memory leaks if users don't clear the error message stack when closing the FITS file. - when writing float or double keywords, test that the value is not a special IEEE value such as a NaN. Some compilers would write the string 'NaN' in this case into the output value string. - fixed bug in ffiblk, to ignore EOF status return if it is inserting blocks at the end of the file. - removed the 'l' from printf format string that is constructed in the ffcfmt routine. This 'l' is non-standard and causes problems with the Metrowerks compiler on a Mac. - the default null value in images was mistakenly being set equal to NO_NULL = 314, rather than NULL_UNDEFINED = 1234554321 in the ffgphd routine. - check status value in ffgkls to make sure the keyword exists before allocating memory for the value string. - fixed the support for writing and reading unsigned long integer keyword values in ffpky and ffgky by internally treating the values as doubles. This required changes to ffc2r and ffc2d as well. - added explicit cast to 'double' in one place in putcolb.c and 6 places in pubcolui.c, to get rid of warning messages issued by one compiler. - in ffbinit and ffainit, it is necessary to test that tfield > 0 before trying to allocate memory with calloc. Otherwise, some compilers return a null pointer which CFITSIO interprets to mean the memory allocation failed. - had to explicitly cast the null buffer pointer to a char pointer (cptr = (char *)buffer;) in 4 places in the buffers.c file to satisfy a picky C++ compiler. - changed the test for an ALPHA VMS system to see if '__VMS' is defined, rather than 'VMS'. The latter is not defined by at least one C++ compiler. - modified ffpcls so that it can write a null string to a variable length string column, without going into an infinite loop. - fixed bug in ffgcfl that caused the 'next' variable to be incremented twice. - fixed bug in ffgcpr that caused it write 2x the number of complex elements into the descriptor when writing to a complex or double complex variable length array column. - added call to ffrdef at the end of ffrsim to ensure that the internal structures are updated to correspond to the modified header keywords Version 1.25 - 7 July 1997 - improved the efficiency of the ffiblk routine, when inserting more than one block into the file. - fixed bug in ffwend that in rare instances caused the beginning of the following extension to be overwritten by blank fill. - added new routine to modify the size of an existing primary array or image extension: fits_resize_img/ffrsim. - added support for null-valued keywords, e.g., keywords that have no defined value. These keywords have an equal sign and space in columns 9-10, but have not value string. Example: KEYNAME = / null-valued keyword Support for this feature required the following changes: - modified ffpsvc to return a null value string without error - modified ffc2[ilrd] to return error VALUE_UNDEFINED in this case - modified ffgkn[sljed] to continue reading additional keywords even if one or more keywords have undefined values. - added 4 new routines: ffpkyu, ffikyu, ffmkyu, ffukyu to write, insert, modify, or update an undefined keyword - a new makefile.os2 file was added, for building CFITSIO on OS/2 systems. - modified ffgtkn so that if it finds an unexpected keyword name, the returned error status = BAD_ORDER instead of NOT_POS_INT. - added 2 new routines, fits_write_key_unit/ffpunt and fits_read_key_unit/ffgunt to write/read the physical units of a keyword value. These routines use a local FITS convention for storing the units in square brackets following the '/' comment field separator, as in: VELOCITY= 12 / [km/s] orbit speed The testprog.c program was modified to test these new routines. - in the test of Alpha OSF/1 machines in fitsio2.h, change 'defined(unix)' to 'defined(__unix__)' which appears to be a more robust test. - remove test for linux environment variable from fitsio2.h Version 1.24 - 2 May 1997 - fixed bug in ffpbyt that incorrectly computed the current location in the FITS file when writing > 10000 bytes. - changed the datatype of the 'nbytes' parameter in ffpbyt from 'int' to 'long'. Made corresponding datatype change to some internal variables in ffshft. - changed '(unsigned short *)' to '(short *)' in getcolui.c, and changed '(unsigned long *)' to '(long *)' in getcoluj.c, to work around problem with the VAX/VMS cc compiler. Version 1.23 - 24 April 1997 - modified ffcins and ffdins (in editcol.c) to simply return without error if there are no (zero) rows in the table. Version 1.22 - 18 April 1997 - fixed bug in ffgcpr that caused it to think that all values were undefined in ASCII tables columns that have TNULLn = ' ' (i.e., the TNULLn keyword value is a string of blanks. - fixed bug in the ffgcl[bdeijk,ui,uj] family of routines when parsing a numeric value in an ASCII table. The returned values would have the decimal place shifted to the left if the table field contained an explicit decimal point followed by blanks. Example: in an F5.2 column, the value '16. ' would be returned as 0.16. If the trailing zeros were present, then cfitsio returned the correct value (e.g., '16.00' returns 16.). - fixed another bug in the ffgcl[bdeijk,ui,uj] family of routines that caused them to misread values in an ASCII table in rows following an undefined value when all the values were read at once in a single call to the routine. Version 1.21 - 26 March 1997 - added general support for reading and writing unsigned integer keywords, images, and binary table column values. - fixed bug in the way the column number was used in ffgsve and similar routines. This bug caused cfitsio to read (colnum - 1) rather than the desired column. - fixed a bug in ftgkls that prevented it from reading more than one continuation line of a long string keyword value. - fixed the definition of fits_write_longwarn in longnam.h Version 1.20 - 29 Jan 1997 - when creating a binary table with variable length vector columns, if the calling routine does not specify a value for the maximum length of the vector (e.g., TFORMn = '1PE(400)') then cfitsio will automatically calculate the maximum value and append it to the TFORM value when the binary table is first closed. - added the set of routines to do coordinate system transformations - added support for wildcards ('*', '?', and '#') in the input keyword name when reading, modifying, or deleting keywords. - added new general keyword reading routine, ffgnxk, to return the next keyword whose name matches a list of template names, but does not match any names on a second template list. - modified ftgrec so that it simply moves to the beginning of the header if the input keyword number = 0 - added check in ffdelt to make sure the input fits file pointer is not already null - added check in ffcopy to make sure the output HDU does not already contain any keywords (it must be empty). - modified ffgcls so that it does not test if each string column value equals the null string value if the null string value is longer than the width of the column. - fixed bug in ftgtdm that caused it to fail if the TDIMn keyword did not exist in the FITS file - modified testprog.c to include tests of keyword wildcards and the WCS coordinate transformation routines. - added a test for 'EMX' in fitsio2.h so that cfitsio builds correctly on a PC running OS/2. Version 1.11 - 04 Dec 1996 - modified the testprog.c program that is included with the distribution, so that the output FITS file is identical to that produced by the Fortran FITSIO test program. - changed all instances of the 'extname' variable to 'extnm' to avoid a conflict with the -Dextname switch in cfortran.h on HP machines. - in all the routines like ffi4fi1, which convert an array of values to integers just prior to writing them to the FITS file, the integer value is now rounded to the nearest integer rather than truncated. (ffi4fi1, ffi4fi2, ffi4fi4, etc) - changed ffgcfl (and hence ffgcl) so that the input value of the logical array element is not changed if the corresponding FITS value is undefined. - in ffgacl, the returned value of TBCOL was off by 1 (too small) - fixed the comment of EXTNAME keyword to read 'binary table' instead of 'ASCII table' in the header of binary tables. Version 1.101 - 17 Nov 1996 - Made major I/O efficiency improvements by adding internal buffers rather than directly reading or writing to disk. Access to columns in binary tables is now 50 - 150 times faster. Access to FITS image is also slightly faster. - made significant speed improvements when reading numerical data in FITS ASCII tables by writing my own number parsing routines rather than using the sscanf C library routine. This change requires that the -lm argument now be included when linking a program that calls cfitsio (under UNIX). - regrouped the source files into logically related sets of routines. The Makefile now runs much faster since every single routine is not split into a separate file. - now use the memcpy function, rather than a 'for' loop in several places for added efficiency - redesigned the low-level binary table read and write routines (ffpbytoff and ffgbytoff) for greater efficiency. - added a new error status: 103 = too many open FITS files. - added a 'extern "C"' statement around the function prototypes in fitsio.h, to support use of cfitsio by C++ compilers. - fixed routines for writing or reading fixed-length substrings within a binary table ASCII column, with TFORM values of of the form 'rAw' where 'r' is the total width of the ASCII column and 'w' is the width of a substring within the column. - no longer automatically rewrite the END card and following fill values if they are already correct. - all the 'get keyword value and comment' routines have been changed so that the comment is not returned if the input pointer is NULL. - added new routine to return the optimum number of tables rows that should be read or written at one time for optimum efficiency. - modified the way numerical values in ASCII tables are parsed so that embedded spaces in the value are ignored, and implicit decimal points are now supported. (e.g, the string '123E 12' in a 'E10.2' format column will be interpreted as 1.23 * 10**12). - modified ffpcl and ffgcl to support binary table columns of all datatype (added logical, bit, complex, and double complex) - when writing numerical data to ASCII table columns, the ffpcl_ routines now return an overflow error if a value is too large to be expressed in the column format. - closed small memory leak in ffpcls. - initialized the 'incre' variable in ffgcpr to eliminate compiler warning. Version 1.04 - 17 Sept 1996 - added README.MacOS and cfitsio_mac.sit.hqx to the distribution to support the Mac platforms. - fixed bug in ffpdfl that caused an EOF error (107) when a program creates a new extension that is an exact multiple of 2880 bytes long, AND the program does not write a value to the last element in the table or image. - fixed bug in all the ffgsf* and ffgcv* routines which caused core dumps when reading null values in a table. Version 1.03 - 20 August 1996 - added full support for reading and writing the C 'int' data type. This was a problem on Alpha/OSF where short, int, and long datatypes are 2, 4, and 8 bytes long, respectively. - cleaned up the code in the byte-swapping routines. - renamed the file 'longname.h' to 'longnam.h' to avoid conflict with a file with the same name in another unrelated package. Version 1.02 - 15 August 1996 - ffgtbp was not correctly reading the THEAP keyword, hence would not correctly read variable length data in binary tables if the heap was not at the default starting location (i.e., starting immediately after the fixed length table). - now force the cbuff variable in ffpcl_ and ffgcl_ to be aligned on a double word boundary. Non-alignment can cause program to crash on some systems. Version 1.01 - 12 August 1996 - initial public release astropy-1.1.1/cextern/cfitsio/deflate.h0000644001134200020070000003055712602615520021015 0ustar embrayscience00000000000000/* deflate.h -- internal compression state * Copyright (C) 1995-2010 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ /* WARNING: this file should *not* be used by applications. It is part of the implementation of the compression library and is subject to change. Applications should only use zlib.h. */ #ifndef DEFLATE_H #define DEFLATE_H #include "zutil.h" /* define NO_GZIP when compiling if you want to disable gzip header and trailer creation by deflate(). NO_GZIP would be used to avoid linking in the crc code when it is not needed. For shared libraries, gzip encoding should be left enabled. */ #ifndef NO_GZIP # define GZIP #endif /* =========================================================================== * Internal compression state. */ #define LENGTH_CODES 29 /* number of length codes, not counting the special END_BLOCK code */ #define LITERALS 256 /* number of literal bytes 0..255 */ #define L_CODES (LITERALS+1+LENGTH_CODES) /* number of Literal or Length codes, including the END_BLOCK code */ #define D_CODES 30 /* number of distance codes */ #define BL_CODES 19 /* number of codes used to transfer the bit lengths */ #define HEAP_SIZE (2*L_CODES+1) /* maximum heap size */ #define MAX_BITS 15 /* All codes must not exceed MAX_BITS bits */ #define INIT_STATE 42 #define EXTRA_STATE 69 #define NAME_STATE 73 #define COMMENT_STATE 91 #define HCRC_STATE 103 #define BUSY_STATE 113 #define FINISH_STATE 666 /* Stream status */ /* Data structure describing a single value and its code string. */ typedef struct ct_data_s { union { ush freq; /* frequency count */ ush code; /* bit string */ } fc; union { ush dad; /* father node in Huffman tree */ ush len; /* length of bit string */ } dl; } FAR ct_data; #define Freq fc.freq #define Code fc.code #define Dad dl.dad #define Len dl.len typedef struct static_tree_desc_s static_tree_desc; typedef struct tree_desc_s { ct_data *dyn_tree; /* the dynamic tree */ int max_code; /* largest code with non zero frequency */ static_tree_desc *stat_desc; /* the corresponding static tree */ } FAR tree_desc; typedef ush Pos; typedef Pos FAR Posf; typedef unsigned IPos; /* A Pos is an index in the character window. We use short instead of int to * save space in the various tables. IPos is used only for parameter passing. */ typedef struct internal_state { z_streamp strm; /* pointer back to this zlib stream */ int status; /* as the name implies */ Bytef *pending_buf; /* output still pending */ ulg pending_buf_size; /* size of pending_buf */ Bytef *pending_out; /* next pending byte to output to the stream */ uInt pending; /* nb of bytes in the pending buffer */ int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ gz_headerp gzhead; /* gzip header information to write */ uInt gzindex; /* where in extra, name, or comment */ Byte method; /* STORED (for zip only) or DEFLATED */ int last_flush; /* value of flush param for previous deflate call */ /* used by deflate.c: */ uInt w_size; /* LZ77 window size (32K by default) */ uInt w_bits; /* log2(w_size) (8..16) */ uInt w_mask; /* w_size - 1 */ Bytef *window; /* Sliding window. Input bytes are read into the second half of the window, * and move to the first half later to keep a dictionary of at least wSize * bytes. With this organization, matches are limited to a distance of * wSize-MAX_MATCH bytes, but this ensures that IO is always * performed with a length multiple of the block size. Also, it limits * the window size to 64K, which is quite useful on MSDOS. * To do: use the user input buffer as sliding window. */ ulg window_size; /* Actual size of window: 2*wSize, except when the user input buffer * is directly used as sliding window. */ Posf *prev; /* Link to older string with same hash index. To limit the size of this * array to 64K, this link is maintained only for the last 32K strings. * An index in this array is thus a window index modulo 32K. */ Posf *head; /* Heads of the hash chains or NIL. */ uInt ins_h; /* hash index of string to be inserted */ uInt hash_size; /* number of elements in hash table */ uInt hash_bits; /* log2(hash_size) */ uInt hash_mask; /* hash_size-1 */ uInt hash_shift; /* Number of bits by which ins_h must be shifted at each input * step. It must be such that after MIN_MATCH steps, the oldest * byte no longer takes part in the hash key, that is: * hash_shift * MIN_MATCH >= hash_bits */ long block_start; /* Window position at the beginning of the current output block. Gets * negative when the window is moved backwards. */ uInt match_length; /* length of best match */ IPos prev_match; /* previous match */ int match_available; /* set if previous match exists */ uInt strstart; /* start of string to insert */ uInt match_start; /* start of matching string */ uInt lookahead; /* number of valid bytes ahead in window */ uInt prev_length; /* Length of the best match at previous step. Matches not greater than this * are discarded. This is used in the lazy match evaluation. */ uInt max_chain_length; /* To speed up deflation, hash chains are never searched beyond this * length. A higher limit improves compression ratio but degrades the * speed. */ uInt max_lazy_match; /* Attempt to find a better match only when the current match is strictly * smaller than this value. This mechanism is used only for compression * levels >= 4. */ # define max_insert_length max_lazy_match /* Insert new strings in the hash table only if the match length is not * greater than this length. This saves time but degrades compression. * max_insert_length is used only for compression levels <= 3. */ int level; /* compression level (1..9) */ int strategy; /* favor or force Huffman coding*/ uInt good_match; /* Use a faster search when the previous match is longer than this */ int nice_match; /* Stop searching when current match exceeds this */ /* used by trees.c: */ /* Didn't use ct_data typedef below to supress compiler warning */ struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ struct tree_desc_s l_desc; /* desc. for literal tree */ struct tree_desc_s d_desc; /* desc. for distance tree */ struct tree_desc_s bl_desc; /* desc. for bit length tree */ ush bl_count[MAX_BITS+1]; /* number of codes at each bit length for an optimal tree */ int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ int heap_len; /* number of elements in the heap */ int heap_max; /* element of largest frequency */ /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. * The same heap array is used to build all trees. */ uch depth[2*L_CODES+1]; /* Depth of each subtree used as tie breaker for trees of equal frequency */ uchf *l_buf; /* buffer for literals or lengths */ uInt lit_bufsize; /* Size of match buffer for literals/lengths. There are 4 reasons for * limiting lit_bufsize to 64K: * - frequencies can be kept in 16 bit counters * - if compression is not successful for the first block, all input * data is still in the window so we can still emit a stored block even * when input comes from standard input. (This can also be done for * all blocks if lit_bufsize is not greater than 32K.) * - if compression is not successful for a file smaller than 64K, we can * even emit a stored file instead of a stored block (saving 5 bytes). * This is applicable only for zip (not gzip or zlib). * - creating new Huffman trees less frequently may not provide fast * adaptation to changes in the input data statistics. (Take for * example a binary file with poorly compressible code followed by * a highly compressible string table.) Smaller buffer sizes give * fast adaptation but have of course the overhead of transmitting * trees more frequently. * - I can't count above 4 */ uInt last_lit; /* running index in l_buf */ ushf *d_buf; /* Buffer for distances. To simplify the code, d_buf and l_buf have * the same number of elements. To use different lengths, an extra flag * array would be necessary. */ ulg opt_len; /* bit length of current block with optimal trees */ ulg static_len; /* bit length of current block with static trees */ uInt matches; /* number of string matches in current block */ int last_eob_len; /* bit length of EOB code for last block */ #ifdef DEBUG ulg compressed_len; /* total bit length of compressed file mod 2^32 */ ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ #endif ush bi_buf; /* Output buffer. bits are inserted starting at the bottom (least * significant bits). */ int bi_valid; /* Number of valid bits in bi_buf. All bits above the last valid bit * are always zero. */ ulg high_water; /* High water mark offset in window for initialized bytes -- bytes above * this are set to zero in order to avoid memory check warnings when * longest match routines access bytes past the input. This is then * updated to the new high water mark. */ } FAR deflate_state; /* Output a byte on the stream. * IN assertion: there is enough room in pending_buf. */ #define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) /* Minimum amount of lookahead, except at the end of the input file. * See deflate.c for comments about the MIN_MATCH+1. */ #define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) /* In order to simplify the code, particularly on 16 bit machines, match * distances are limited to MAX_DIST instead of WSIZE. */ #define WIN_INIT MAX_MATCH /* Number of bytes after end of data in window to initialize in order to avoid memory checker errors from longest match routines */ /* in trees.c */ void ZLIB_INTERNAL _tr_init OF((deflate_state *s)); int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, int last)); void ZLIB_INTERNAL _tr_align OF((deflate_state *s)); void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, int last)); #define d_code(dist) \ ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) /* Mapping from a distance to a distance code. dist is the distance - 1 and * must not have side effects. _dist_code[256] and _dist_code[257] are never * used. */ #ifndef DEBUG /* Inline versions of _tr_tally for speed: */ #if defined(GEN_TREES_H) || !defined(STDC) extern uch ZLIB_INTERNAL _length_code[]; extern uch ZLIB_INTERNAL _dist_code[]; #else extern const uch ZLIB_INTERNAL _length_code[]; extern const uch ZLIB_INTERNAL _dist_code[]; #endif # define _tr_tally_lit(s, c, flush) \ { uch cc = (c); \ s->d_buf[s->last_lit] = 0; \ s->l_buf[s->last_lit++] = cc; \ s->dyn_ltree[cc].Freq++; \ flush = (s->last_lit == s->lit_bufsize-1); \ } # define _tr_tally_dist(s, distance, length, flush) \ { uch len = (length); \ ush dist = (distance); \ s->d_buf[s->last_lit] = dist; \ s->l_buf[s->last_lit++] = len; \ dist--; \ s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ s->dyn_dtree[d_code(dist)].Freq++; \ flush = (s->last_lit == s->lit_bufsize-1); \ } #else # define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) # define _tr_tally_dist(s, distance, length, flush) \ flush = _tr_tally(s, distance, length) #endif #endif /* DEFLATE_H */ astropy-1.1.1/cextern/cfitsio/putcold.c0000644001134200020070000011176512602615520021057 0ustar embrayscience00000000000000/* This file, putcold.c, contains routines that write data elements to */ /* a FITS image or table, with double datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffpprd( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ double *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; double nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_pixels(fptr, TDOUBLE, firstelem, nelem, 0, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcld(fptr, 2, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffppnd( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ double *array, /* I - array of values that are written */ double nulval, /* I - undefined pixel value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). Any array values that are equal to the value of nulval will be replaced with the null pixel value that is appropriate for this column. */ { long row; double nullvalue; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ nullvalue = nulval; /* set local variable */ fits_write_compressed_pixels(fptr, TDOUBLE, firstelem, nelem, 1, array, &nullvalue, status); return(*status); } row=maxvalue(1,group); ffpcnd(fptr, 2, row, firstelem, nelem, array, nulval, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp2dd(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ double *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 2-D array of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { /* call the 3D writing routine, with the 3rd dimension = 1 */ ffp3dd(fptr, group, ncols, naxis2, naxis1, naxis2, 1, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffp3dd(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ LONGLONG ncols, /* I - number of pixels in each row of array */ LONGLONG nrows, /* I - number of rows in each plane of array */ LONGLONG naxis1, /* I - FITS image NAXIS1 value */ LONGLONG naxis2, /* I - FITS image NAXIS2 value */ LONGLONG naxis3, /* I - FITS image NAXIS3 value */ double *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write an entire 3-D cube of values to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow, ii, jj; long fpixel[3]= {1,1,1}, lpixel[3]; LONGLONG nfits, narray; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ lpixel[0] = (long) ncols; lpixel[1] = (long) nrows; lpixel[2] = (long) naxis3; fits_write_compressed_img(fptr, TDOUBLE, fpixel, lpixel, 0, array, NULL, status); return(*status); } tablerow=maxvalue(1,group); if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */ { /* all the image pixels are contiguous, so write all at once */ ffpcld(fptr, 2, tablerow, 1L, naxis1 * naxis2 * naxis3, array, status); return(*status); } if (ncols < naxis1 || nrows < naxis2) return(*status = BAD_DIMEN); nfits = 1; /* next pixel in FITS image to write to */ narray = 0; /* next pixel in input array to be written */ /* loop over naxis3 planes in the data cube */ for (jj = 0; jj < naxis3; jj++) { /* loop over the naxis2 rows in the FITS image, */ /* writing naxis1 pixels to each row */ for (ii = 0; ii < naxis2; ii++) { if (ffpcld(fptr, 2, tablerow, nfits, naxis1,&array[narray],status) > 0) return(*status); nfits += naxis1; narray += ncols; } narray += (nrows - naxis2) * ncols; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpssd(fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long naxis, /* I - number of data axes in array */ long *naxes, /* I - size of each FITS axis */ long *fpixel, /* I - 1st pixel in each axis to write (1=1st) */ long *lpixel, /* I - last pixel in each axis to write */ double *array, /* I - array to be written */ int *status) /* IO - error status */ /* Write a subsection of pixels to the primary array or image. A subsection is defined to be any contiguous rectangular array of pixels within the n-dimensional FITS data file. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long tablerow; LONGLONG fpix[7], dimen[7], astart, pstart; LONGLONG off2, off3, off4, off5, off6, off7; LONGLONG st10, st20, st30, st40, st50, st60, st70; LONGLONG st1, st2, st3, st4, st5, st6, st7; long ii, i1, i2, i3, i4, i5, i6, i7, irange[7]; if (*status > 0) return(*status); if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_write_compressed_img(fptr, TDOUBLE, fpixel, lpixel, 0, array, NULL, status); return(*status); } if (naxis < 1 || naxis > 7) return(*status = BAD_DIMEN); tablerow=maxvalue(1,group); /* calculate the size and number of loops to perform in each dimension */ for (ii = 0; ii < 7; ii++) { fpix[ii]=1; irange[ii]=1; dimen[ii]=1; } for (ii = 0; ii < naxis; ii++) { fpix[ii]=fpixel[ii]; irange[ii]=lpixel[ii]-fpixel[ii]+1; dimen[ii]=naxes[ii]; } i1=irange[0]; /* compute the pixel offset between each dimension */ off2 = dimen[0]; off3 = off2 * dimen[1]; off4 = off3 * dimen[2]; off5 = off4 * dimen[3]; off6 = off5 * dimen[4]; off7 = off6 * dimen[5]; st10 = fpix[0]; st20 = (fpix[1] - 1) * off2; st30 = (fpix[2] - 1) * off3; st40 = (fpix[3] - 1) * off4; st50 = (fpix[4] - 1) * off5; st60 = (fpix[5] - 1) * off6; st70 = (fpix[6] - 1) * off7; /* store the initial offset in each dimension */ st1 = st10; st2 = st20; st3 = st30; st4 = st40; st5 = st50; st6 = st60; st7 = st70; astart = 0; for (i7 = 0; i7 < irange[6]; i7++) { for (i6 = 0; i6 < irange[5]; i6++) { for (i5 = 0; i5 < irange[4]; i5++) { for (i4 = 0; i4 < irange[3]; i4++) { for (i3 = 0; i3 < irange[2]; i3++) { pstart = st1 + st2 + st3 + st4 + st5 + st6 + st7; for (i2 = 0; i2 < irange[1]; i2++) { if (ffpcld(fptr, 2, tablerow, pstart, i1, &array[astart], status) > 0) return(*status); astart += i1; pstart += off2; } st2 = st20; st3 = st3+off3; } st3 = st30; st4 = st4+off4; } st4 = st40; st5 = st5+off5; } st5 = st50; st6 = st6+off6; } st6 = st60; st7 = st7+off7; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpgpd( fitsfile *fptr, /* I - FITS file pointer */ long group, /* I - group to write(1 = 1st group) */ long firstelem, /* I - first vector element to write(1 = 1st) */ long nelem, /* I - number of values to write */ double *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of group parameters to the primary array. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long row; /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ row=maxvalue(1,group); ffpcld(fptr, 1L, row, firstelem, nelem, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpcld( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ double *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of values to a column in the current FITS HDU. The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary. */ { int tcode, maxelem2, hdutype, writeraw; long twidth, incre; long ntodo; LONGLONG repeat, startpos, elemnum, wrtptr, rowlen, rownum, remain, next, tnull, maxelem; double scale, zero; char tform[20], cform[20]; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ void *buffer; if (*status > 0) /* inherit input status value if > 0 */ return(*status); buffer = cbuff; /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 1, &scale, &zero, tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); maxelem = maxelem2; if (tcode == TSTRING) ffcfmt(tform, cform); /* derive C format for writing strings */ /* if there is no scaling and the native machine format is not byteswapped, then we can simply write the raw data bytes into the FITS file if the datatype of the FITS column is the same as the input values. Otherwise, we must convert the raw values into the scaled and/or machine dependent format in a temporary buffer that has been allocated for this purpose. */ if (scale == 1. && zero == 0. && MACHINE == NATIVE && tcode == TDOUBLE) { writeraw = 1; maxelem = nelem; /* we can write the entire array at one time */ } else writeraw = 0; /*---------------------------------------------------------------------*/ /* Now write the pixels to the FITS column. */ /* First call the ffXXfYY routine to (1) convert the datatype */ /* if necessary, and (2) scale the values by the FITS TSCALn and */ /* TZEROn linear scaling parameters into a temporary buffer. */ /*---------------------------------------------------------------------*/ remain = nelem; /* remaining number of values to write */ next = 0; /* next element in array to be written */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to process a one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); wrtptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, wrtptr, IGNORE_EOF, status); /* move to write position */ switch (tcode) { case (TDOUBLE): if (writeraw) { /* write raw input bytes without conversion */ ffpr8b(fptr, ntodo, incre, &array[next], status); } else { /* convert the raw data before writing to FITS file */ ffr8fr8(&array[next], ntodo, scale, zero, (double *) buffer, status); ffpr8b(fptr, ntodo, incre, (double *) buffer, status); } break; case (TLONGLONG): ffr8fi8(&array[next], ntodo, scale, zero, (LONGLONG *) buffer, status); ffpi8b(fptr, ntodo, incre, (long *) buffer, status); break; case (TBYTE): ffr8fi1(&array[next], ntodo, scale, zero, (unsigned char *) buffer, status); ffpi1b(fptr, ntodo, incre, (unsigned char *) buffer, status); break; case (TSHORT): ffr8fi2(&array[next], ntodo, scale, zero, (short *) buffer, status); ffpi2b(fptr, ntodo, incre, (short *) buffer, status); break; case (TLONG): ffr8fi4(&array[next], ntodo, scale, zero, (INT32BIT *) buffer, status); ffpi4b(fptr, ntodo, incre, (INT32BIT *) buffer, status); break; case (TFLOAT): ffr8fr4(&array[next], ntodo, scale, zero, (float *) buffer, status); ffpr4b(fptr, ntodo, incre, (float *) buffer, status); break; case (TSTRING): /* numerical column in an ASCII table */ if (cform[1] != 's') /* "%s" format is a string */ { ffr8fstr(&array[next], ntodo, scale, zero, cform, twidth, (char *) buffer, status); if (incre == twidth) /* contiguous bytes */ ffpbyt(fptr, ntodo * twidth, buffer, status); else ffpbytoff(fptr, twidth, ntodo, incre - twidth, buffer, status); break; } /* can't write to string column, so fall thru to default: */ default: /* error trap */ sprintf(message, "Cannot write numbers to column %d which has format %s", colnum,tform); ffpmsg(message); if (hdutype == ASCII_TBL) return(*status = BAD_ATABLE_FORMAT); else return(*status = BAD_BTABLE_FORMAT); } /* End of switch block */ /*-------------------------*/ /* Check for fatal error */ /*-------------------------*/ if (*status > 0) /* test for error during previous write operation */ { sprintf(message, "Error writing elements %.0f thru %.0f of input data array (ffpcld).", (double) (next+1), (double) (next+ntodo)); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ remain -= ntodo; if (remain) { next += ntodo; elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ /*--------------------------------*/ /* check for numerical overflow */ /*--------------------------------*/ if (*status == OVERFLOW_ERR) { ffpmsg( "Numerical overflow during type conversion while writing FITS data."); *status = NUM_OVERFLOW; } return(*status); } /*--------------------------------------------------------------------------*/ int ffpclm( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ double *array, /* I - array of values to write */ int *status) /* IO - error status */ /* Write an array of double complex values to a column in the current FITS HDU. Each complex number if interpreted as a pair of float values. The column number may refer to a real column in an ASCII or binary table, or it may refer to a virtual column in a 1 or more grouped FITS primary array. FITSIO treats a primary array as a binary table with 2 vector columns: the first column contains the group parameters (often with length = 0) and the second column contains the array of image pixels. Each row of the table represents a group in the case of multigroup FITS images. The input array of values will be converted to the datatype of the column if necessary, but normally complex values should only be written to a binary table with TFORMn = 'rM' where r is an optional repeat count. The TSCALn and TZERO keywords should not be used with complex numbers because mathmatically the scaling should only be applied to the real (first) component of the complex value. */ { /* simply multiply the number of elements by 2, and call ffpcld */ ffpcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, array, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffpcnd( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ double *array, /* I - array of values to write */ double nulvalue, /* I - value used to flag undefined pixels */ int *status) /* IO - error status */ /* Write an array of elements to the specified column of a table. Any input pixels equal to the value of nulvalue will be replaced by the appropriate null value in the output FITS file. The input array of values will be converted to the datatype of the column and will be inverse-scaled by the FITS TSCALn and TZEROn values if necessary */ { tcolumn *colptr; long ngood = 0, nbad = 0, ii; LONGLONG repeat, first, fstelm, fstrow; int tcode, overflow = 0; if (*status > 0) return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) { ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); } else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) { if ( ffrdef(fptr, status) > 0) /* rescan header */ return(*status); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode > 0) repeat = colptr->trepeat; /* repeat count for this column */ else repeat = firstelem -1 + nelem; /* variable length arrays */ if (abs(tcode) >= TCOMPLEX) { /* treat complex columns as pairs of numbers */ repeat *= 2; } /* if variable length array, first write the whole input vector, then go back and fill in the nulls */ if (tcode < 0) { if (ffpcld(fptr, colnum, firstrow, firstelem, nelem, array, status) > 0) { if (*status == NUM_OVERFLOW) { /* ignore overflows, which are possibly the null pixel values */ /* overflow = 1; */ *status = 0; } else { return(*status); } } } /* absolute element number in the column */ first = (firstrow - 1) * repeat + firstelem; for (ii = 0; ii < nelem; ii++) { if (array[ii] != nulvalue) /* is this a good pixel? */ { if (nbad) /* write previous string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ /* call ffpcluc, not ffpclu, in case we are writing to a complex ('C') binary table column */ if (ffpcluc(fptr, colnum, fstrow, fstelm, nbad, status) > 0) return(*status); nbad=0; } ngood = ngood +1; /* the consecutive number of good pixels */ } else { if (ngood) /* write previous string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ if (ffpcld(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status) > 0) { if (*status == NUM_OVERFLOW) { overflow = 1; *status = 0; } else { return(*status); } } } ngood=0; } nbad = nbad +1; /* the consecutive number of bad pixels */ } } /* finished loop; now just write the last set of pixels */ if (ngood) /* write last string of good pixels */ { fstelm = ii - ngood + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ if (tcode > 0) { /* variable length arrays have already been written */ ffpcld(fptr, colnum, fstrow, fstelm, ngood, &array[ii-ngood], status); } } else if (nbad) /* write last string of bad pixels */ { fstelm = ii - nbad + first; /* absolute element number */ fstrow = (fstelm - 1) / repeat + 1; /* starting row number */ fstelm = fstelm - (fstrow - 1) * repeat; /* relative number */ ffpcluc(fptr, colnum, fstrow, fstelm, nbad, status); } if (*status <= 0) { if (overflow) { *status = NUM_OVERFLOW; } } return(*status); } /*--------------------------------------------------------------------------*/ int ffr8fi1(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ unsigned char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (input[ii] > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DUCHAR_MIN) { *status = OVERFLOW_ERR; output[ii] = 0; } else if (dvalue > DUCHAR_MAX) { *status = OVERFLOW_ERR; output[ii] = UCHAR_MAX; } else output[ii] = (unsigned char) (dvalue + .5); } } return(*status); } /*--------------------------------------------------------------------------*/ int ffr8fi2(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ short *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (input[ii] > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else output[ii] = (short) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DSHRT_MIN) { *status = OVERFLOW_ERR; output[ii] = SHRT_MIN; } else if (dvalue > DSHRT_MAX) { *status = OVERFLOW_ERR; output[ii] = SHRT_MAX; } else { if (dvalue >= 0) output[ii] = (short) (dvalue + .5); else output[ii] = (short) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffr8fi4(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ INT32BIT *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (input[ii] > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else output[ii] = (INT32BIT) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DINT_MIN) { *status = OVERFLOW_ERR; output[ii] = INT32_MIN; } else if (dvalue > DINT_MAX) { *status = OVERFLOW_ERR; output[ii] = INT32_MAX; } else { if (dvalue >= 0) output[ii] = (INT32BIT) (dvalue + .5); else output[ii] = (INT32BIT) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffr8fi8(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ LONGLONG *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; double dvalue; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { if (input[ii] < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (input[ii] > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else output[ii] = (LONGLONG) input[ii]; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; if (dvalue < DLONGLONG_MIN) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MIN; } else if (dvalue > DLONGLONG_MAX) { *status = OVERFLOW_ERR; output[ii] = LONGLONG_MAX; } else { if (dvalue >= 0) output[ii] = (LONGLONG) (dvalue + .5); else output[ii] = (LONGLONG) (dvalue - .5); } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffr8fr4(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ float *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) input[ii]; } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (float) ((input[ii] - zero) / scale); } return(*status); } /*--------------------------------------------------------------------------*/ int ffr8fr8(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ double *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do datatype conversion and scaling if required. */ { long ii; if (scale == 1. && zero == 0.) { memcpy(output, input, ntodo * sizeof(double) ); /* copy input to output */ } else { for (ii = 0; ii < ntodo; ii++) output[ii] = (input[ii] - zero) / scale; } return(*status); } /*--------------------------------------------------------------------------*/ int ffr8fstr(double *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ char *cform, /* I - format for output string values */ long twidth, /* I - width of each field, in chars */ char *output, /* O - output array of converted values */ int *status) /* IO - error status */ /* Copy input to output prior to writing output to a FITS file. Do scaling if required. */ { long ii; double dvalue; char *cptr; cptr = output; if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) { sprintf(output, cform, input[ii]); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } else { for (ii = 0; ii < ntodo; ii++) { dvalue = (input[ii] - zero) / scale; sprintf(output, cform, dvalue); output += twidth; if (*output) /* if this char != \0, then overflow occurred */ *status = OVERFLOW_ERR; } } /* replace any commas with periods (e.g., in French locale) */ while ((cptr = strchr(cptr, ','))) *cptr = '.'; return(*status); } astropy-1.1.1/cextern/cfitsio/getcols.c0000644001134200020070000007055212602615520021043 0ustar embrayscience00000000000000/* This file, getcols.c, contains routines that read data elements from */ /* a FITS image or table, with a character string datatype. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include /* stddef.h is apparently needed to define size_t */ #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffgcvs( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of strings to read */ char *nulval, /* I - string for null pixels */ char **array, /* O - array of values that are read */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of string values from a column in the current FITS HDU. Any undefined pixels will be set equal to the value of 'nulval' unless nulval = null in which case no checks for undefined pixels will be made. */ { char cdummy[2]; ffgcls(fptr, colnum, firstrow, firstelem, nelem, 1, nulval, array, cdummy, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcfs( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of strings to read */ char **array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of string values from a column in the current FITS HDU. Nularray will be set = 1 if the corresponding array pixel is undefined, otherwise nularray will = 0. */ { char dummy[2]; ffgcls(fptr, colnum, firstrow, firstelem, nelem, 2, dummy, array, nularray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgcls( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of strings to read */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ char *nulval, /* I - value for null pixels if nultyp = 1 */ char **array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of string values from a column in the current FITS HDU. Returns a formated string value, regardless of the datatype of the column */ { int tcode, hdutype, tstatus, scaled, intcol, dwidth, nulwidth, ll, dlen; long ii, jj; tcolumn *colptr; char message[FLEN_ERRMSG], *carray, keyname[FLEN_KEYWORD]; char cform[20], dispfmt[20], tmpstr[400], *flgarray, tmpnull[80]; unsigned char byteval; float *earray; double *darray, tscale = 1.0; LONGLONG *llarray; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); /* reset position to the correct HDU if necessary */ if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); /* rescan header if data structure is undefined */ else if ((fptr->Fptr)->datastart == DATA_UNDEFINED) if ( ffrdef(fptr, status) > 0) return(*status); if (colnum < 1 || colnum > (fptr->Fptr)->tfield) { sprintf(message, "Specified column number is out of range: %d", colnum); ffpmsg(message); return(*status = BAD_COL_NUM); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = abs(colptr->tdatatype); if (tcode == TSTRING) { /* simply call the string column reading routine */ ffgcls2(fptr, colnum, firstrow, firstelem, nelem, nultyp, nulval, array, nularray, anynul, status); } else if (tcode == TLOGICAL) { /* allocate memory for the array of logical values */ carray = (char *) malloc((size_t) nelem); /* call the logical column reading routine */ ffgcll(fptr, colnum, firstrow, firstelem, nelem, nultyp, *nulval, carray, nularray, anynul, status); if (*status <= 0) { /* convert logical values to "T", "F", or "N" (Null) */ for (ii = 0; ii < nelem; ii++) { if (carray[ii] == 1) strcpy(array[ii], "T"); else if (carray[ii] == 0) strcpy(array[ii], "F"); else /* undefined values = 2 */ strcpy(array[ii],"N"); } } free(carray); /* free the memory */ } else if (tcode == TCOMPLEX) { /* allocate memory for the array of double values */ earray = (float *) calloc((size_t) (nelem * 2), sizeof(float) ); ffgcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, 1, 1, FLOATNULLVALUE, earray, nularray, anynul, status); if (*status <= 0) { /* determine the format for the output strings */ ffgcdw(fptr, colnum, &dwidth, status); dwidth = (dwidth - 3) / 2; /* use the TDISPn keyword if it exists */ ffkeyn("TDISP", colnum, keyname, status); tstatus = 0; cform[0] = '\0'; if (ffgkys(fptr, keyname, dispfmt, NULL, &tstatus) == 0) { /* convert the Fortran style format to a C style format */ ffcdsp(dispfmt, cform); } if (!cform[0]) strcpy(cform, "%14.6E"); /* write the formated string for each value: "(real,imag)" */ jj = 0; for (ii = 0; ii < nelem; ii++) { strcpy(array[ii], "("); /* test for null value */ if (earray[jj] == FLOATNULLVALUE) { strcpy(tmpstr, "NULL"); if (nultyp == 2) nularray[ii] = 1; } else sprintf(tmpstr, cform, earray[jj]); strncat(array[ii], tmpstr, dwidth); strcat(array[ii], ","); jj++; /* test for null value */ if (earray[jj] == FLOATNULLVALUE) { strcpy(tmpstr, "NULL"); if (nultyp == 2) nularray[ii] = 1; } else sprintf(tmpstr, cform, earray[jj]); strncat(array[ii], tmpstr, dwidth); strcat(array[ii], ")"); jj++; } } free(earray); /* free the memory */ } else if (tcode == TDBLCOMPLEX) { /* allocate memory for the array of double values */ darray = (double *) calloc((size_t) (nelem * 2), sizeof(double) ); ffgcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, 1, 1, DOUBLENULLVALUE, darray, nularray, anynul, status); if (*status <= 0) { /* determine the format for the output strings */ ffgcdw(fptr, colnum, &dwidth, status); dwidth = (dwidth - 3) / 2; /* use the TDISPn keyword if it exists */ ffkeyn("TDISP", colnum, keyname, status); tstatus = 0; cform[0] = '\0'; if (ffgkys(fptr, keyname, dispfmt, NULL, &tstatus) == 0) { /* convert the Fortran style format to a C style format */ ffcdsp(dispfmt, cform); } if (!cform[0]) strcpy(cform, "%23.15E"); /* write the formated string for each value: "(real,imag)" */ jj = 0; for (ii = 0; ii < nelem; ii++) { strcpy(array[ii], "("); /* test for null value */ if (darray[jj] == DOUBLENULLVALUE) { strcpy(tmpstr, "NULL"); if (nultyp == 2) nularray[ii] = 1; } else sprintf(tmpstr, cform, darray[jj]); strncat(array[ii], tmpstr, dwidth); strcat(array[ii], ","); jj++; /* test for null value */ if (darray[jj] == DOUBLENULLVALUE) { strcpy(tmpstr, "NULL"); if (nultyp == 2) nularray[ii] = 1; } else sprintf(tmpstr, cform, darray[jj]); strncat(array[ii], tmpstr, dwidth); strcat(array[ii], ")"); jj++; } } free(darray); /* free the memory */ } else if (tcode == TLONGLONG) { /* allocate memory for the array of LONGLONG values */ llarray = (LONGLONG *) calloc((size_t) nelem, sizeof(LONGLONG) ); flgarray = (char *) calloc((size_t) nelem, sizeof(char) ); dwidth = 20; /* max width of displayed long long integer value */ if (ffgcfjj(fptr, colnum, firstrow, firstelem, nelem, llarray, flgarray, anynul, status) > 0) { free(flgarray); free(llarray); return(*status); } /* write the formated string for each value */ if (nulval) { strcpy(tmpnull, nulval); nulwidth = strlen(nulval); } else { strcpy(tmpnull, " "); nulwidth = 1; } for (ii = 0; ii < nelem; ii++) { if ( flgarray[ii] ) { *array[ii] = '\0'; if (dwidth < nulwidth) strncat(array[ii], tmpnull, dwidth); else sprintf(array[ii],"%*s",dwidth,tmpnull); if (nultyp == 2) nularray[ii] = 1; } else { #if defined(_MSC_VER) /* Microsoft Visual C++ 6.0 uses '%I64d' syntax for 8-byte integers */ sprintf(tmpstr, "%20I64d", llarray[ii]); #elif (USE_LL_SUFFIX == 1) sprintf(tmpstr, "%20lld", llarray[ii]); #else sprintf(tmpstr, "%20ld", llarray[ii]); #endif *array[ii] = '\0'; strncat(array[ii], tmpstr, 20); } } free(flgarray); free(llarray); /* free the memory */ } else { /* allocate memory for the array of double values */ darray = (double *) calloc((size_t) nelem, sizeof(double) ); /* read all other numeric type columns as doubles */ if (ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, nultyp, DOUBLENULLVALUE, darray, nularray, anynul, status) > 0) { free(darray); return(*status); } /* determine the format for the output strings */ ffgcdw(fptr, colnum, &dwidth, status); /* check if column is scaled */ ffkeyn("TSCAL", colnum, keyname, status); tstatus = 0; scaled = 0; if (ffgkyd(fptr, keyname, &tscale, NULL, &tstatus) == 0) { if (tscale != 1.0) scaled = 1; /* yes, this is a scaled column */ } intcol = 0; if (tcode <= TLONG && !scaled) intcol = 1; /* this is an unscaled integer column */ /* use the TDISPn keyword if it exists */ ffkeyn("TDISP", colnum, keyname, status); tstatus = 0; cform[0] = '\0'; if (ffgkys(fptr, keyname, dispfmt, NULL, &tstatus) == 0) { /* convert the Fortran style TDISPn to a C style format */ ffcdsp(dispfmt, cform); } if (!cform[0]) { /* no TDISPn keyword; use TFORMn instead */ ffkeyn("TFORM", colnum, keyname, status); ffgkys(fptr, keyname, dispfmt, NULL, status); if (scaled && tcode <= TSHORT) { /* scaled short integer column == float */ strcpy(cform, "%#14.6G"); } else if (scaled && tcode == TLONG) { /* scaled long integer column == double */ strcpy(cform, "%#23.15G"); } else { ffghdt(fptr, &hdutype, status); if (hdutype == ASCII_TBL) { /* convert the Fortran style TFORMn to a C style format */ ffcdsp(dispfmt, cform); } else { /* this is a binary table, need to convert the format */ if (tcode == TBIT) { /* 'X' */ strcpy(cform, "%4d"); } else if (tcode == TBYTE) { /* 'B' */ strcpy(cform, "%4d"); } else if (tcode == TSHORT) { /* 'I' */ strcpy(cform, "%6d"); } else if (tcode == TLONG) { /* 'J' */ strcpy(cform, "%11.0f"); intcol = 0; /* needed to support unsigned int */ } else if (tcode == TFLOAT) { /* 'E' */ strcpy(cform, "%#14.6G"); } else if (tcode == TDOUBLE) { /* 'D' */ strcpy(cform, "%#23.15G"); } } } } if (nulval) { strcpy(tmpnull, nulval); nulwidth = strlen(nulval); } else { strcpy(tmpnull, " "); nulwidth = 1; } /* write the formated string for each value */ for (ii = 0; ii < nelem; ii++) { if (tcode == TBIT) { byteval = (char) darray[ii]; for (ll=0; ll < 8; ll++) { if ( ((unsigned char) (byteval << ll)) >> 7 ) *(array[ii] + ll) = '1'; else *(array[ii] + ll) = '0'; } *(array[ii] + 8) = '\0'; } /* test for null value */ else if ( (nultyp == 1 && darray[ii] == DOUBLENULLVALUE) || (nultyp == 2 && nularray[ii]) ) { *array[ii] = '\0'; if (dwidth < nulwidth) strncat(array[ii], tmpnull, dwidth); else sprintf(array[ii],"%*s",dwidth,tmpnull); } else { if (intcol) sprintf(tmpstr, cform, (int) darray[ii]); else sprintf(tmpstr, cform, darray[ii]); /* fill field with '*' if number is too wide */ dlen = strlen(tmpstr); if (dlen > dwidth) { memset(tmpstr, '*', dwidth); } *array[ii] = '\0'; strncat(array[ii], tmpstr, dwidth); } } free(darray); /* free the memory */ } return(*status); } /*--------------------------------------------------------------------------*/ int ffgcdw( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column (1 = 1st col) */ int *width, /* O - display width */ int *status) /* IO - error status */ /* Get Column Display Width. */ { tcolumn *colptr; char *cptr; char message[FLEN_ERRMSG], keyname[FLEN_KEYWORD], dispfmt[20]; int tcode, hdutype, tstatus, scaled; double tscale; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if (colnum < 1 || colnum > (fptr->Fptr)->tfield) { sprintf(message, "Specified column number is out of range: %d", colnum); ffpmsg(message); return(*status = BAD_COL_NUM); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = abs(colptr->tdatatype); /* use the TDISPn keyword if it exists */ ffkeyn("TDISP", colnum, keyname, status); *width = 0; tstatus = 0; if (ffgkys(fptr, keyname, dispfmt, NULL, &tstatus) == 0) { /* parse TDISPn get the display width */ cptr = dispfmt; while(*cptr == ' ') /* skip leading blanks */ cptr++; if (*cptr == 'A' || *cptr == 'a' || *cptr == 'I' || *cptr == 'i' || *cptr == 'O' || *cptr == 'o' || *cptr == 'Z' || *cptr == 'z' || *cptr == 'F' || *cptr == 'f' || *cptr == 'E' || *cptr == 'e' || *cptr == 'D' || *cptr == 'd' || *cptr == 'G' || *cptr == 'g') { while(!isdigit((int) *cptr) && *cptr != '\0') /* find 1st digit */ cptr++; *width = atoi(cptr); if (tcode >= TCOMPLEX) *width = (2 * (*width)) + 3; } } if (*width == 0) { /* no valid TDISPn keyword; use TFORMn instead */ ffkeyn("TFORM", colnum, keyname, status); ffgkys(fptr, keyname, dispfmt, NULL, status); /* check if column is scaled */ ffkeyn("TSCAL", colnum, keyname, status); tstatus = 0; scaled = 0; if (ffgkyd(fptr, keyname, &tscale, NULL, &tstatus) == 0) { if (tscale != 1.0) scaled = 1; /* yes, this is a scaled column */ } if (scaled && tcode <= TSHORT) { /* scaled short integer col == float; default format is 14.6G */ *width = 14; } else if (scaled && tcode == TLONG) { /* scaled long integer col == double; default format is 23.15G */ *width = 23; } else { ffghdt(fptr, &hdutype, status); /* get type of table */ if (hdutype == ASCII_TBL) { /* parse TFORMn get the display width */ cptr = dispfmt; while(!isdigit((int) *cptr) && *cptr != '\0') /* find 1st digit */ cptr++; *width = atoi(cptr); } else { /* this is a binary table */ if (tcode == TBIT) /* 'X' */ *width = 8; else if (tcode == TBYTE) /* 'B' */ *width = 4; else if (tcode == TSHORT) /* 'I' */ *width = 6; else if (tcode == TLONG) /* 'J' */ *width = 11; else if (tcode == TLONGLONG) /* 'K' */ *width = 20; else if (tcode == TFLOAT) /* 'E' */ *width = 14; else if (tcode == TDOUBLE) /* 'D' */ *width = 23; else if (tcode == TCOMPLEX) /* 'C' */ *width = 31; else if (tcode == TDBLCOMPLEX) /* 'M' */ *width = 49; else if (tcode == TLOGICAL) /* 'L' */ *width = 1; else if (tcode == TSTRING) /* 'A' */ { cptr = dispfmt; while(!isdigit((int) *cptr) && *cptr != '\0') cptr++; *width = atoi(cptr); if (*width < 1) *width = 1; /* default is at least 1 column */ } } } } return(*status); } /*--------------------------------------------------------------------------*/ int ffgcls2 ( fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - number of column to read (1 = 1st col) */ LONGLONG firstrow, /* I - first row to read (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of strings to read */ int nultyp, /* I - null value handling code: */ /* 1: set undefined pixels = nulval */ /* 2: set nularray=1 for undefined pixels */ char *nulval, /* I - value for null pixels if nultyp = 1 */ char **array, /* O - array of values that are read */ char *nularray, /* O - array of flags = 1 if nultyp = 2 */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of string values from a column in the current FITS HDU. */ { double dtemp; long nullen; int tcode, maxelem, hdutype, nulcheck; long twidth, incre; long ii, jj, ntodo; LONGLONG repeat, startpos, elemnum, readptr, tnull, rowlen, rownum, remain, next; double scale, zero; char tform[20]; char message[FLEN_ERRMSG]; char snull[20]; /* the FITS null value */ tcolumn *colptr; double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */ char *buffer, *arrayptr; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); if (fptr->HDUposition != (fptr->Fptr)->curhdu) ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status); if (anynul) *anynul = 0; if (nultyp == 2) memset(nularray, 0, (size_t) nelem); /* initialize nullarray */ /*---------------------------------------------------*/ /* Check input and get parameters about the column: */ /*---------------------------------------------------*/ if (colnum < 1 || colnum > (fptr->Fptr)->tfield) { sprintf(message, "Specified column number is out of range: %d", colnum); ffpmsg(message); return(*status = BAD_COL_NUM); } colptr = (fptr->Fptr)->tableptr; /* point to first column */ colptr += (colnum - 1); /* offset to correct column structure */ tcode = colptr->tdatatype; if (tcode == -TSTRING) /* variable length column in a binary table? */ { /* only read a single string; ignore value of firstelem */ if (ffgcprll( fptr, colnum, firstrow, 1, 1, 0, &scale, &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); remain = 1; twidth = (long) repeat; } else if (tcode == TSTRING) { if (ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 0, &scale, &zero, tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre, &repeat, &rowlen, &hdutype, &tnull, snull, status) > 0) return(*status); /* if string length is greater than a FITS block (2880 char) then must */ /* only read 1 string at a time, to force reading by ffgbyt instead of */ /* ffgbytoff (ffgbytoff can't handle this case) */ if (twidth > IOBUFLEN) { maxelem = 1; incre = twidth; repeat = 1; } remain = nelem; } else return(*status = NOT_ASCII_COL); nullen = strlen(snull); /* length of the undefined pixel string */ if (nullen == 0) nullen = 1; /*------------------------------------------------------------------*/ /* Decide whether to check for null values in the input FITS file: */ /*------------------------------------------------------------------*/ nulcheck = nultyp; /* by default check for null values in the FITS file */ if (nultyp == 1 && nulval == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ else if (nultyp == 1 && nulval && nulval[0] == 0) nulcheck = 0; /* calling routine does not want to check for nulls */ else if (snull[0] == ASCII_NULL_UNDEFINED) nulcheck = 0; /* null value string in ASCII table not defined */ else if (nullen > twidth) nulcheck = 0; /* null value string is longer than width of column */ /* thus impossible for any column elements to = null */ /*---------------------------------------------------------------------*/ /* Now read the strings one at a time from the FITS column. */ /*---------------------------------------------------------------------*/ next = 0; /* next element in array to be read */ rownum = 0; /* row number, relative to firstrow */ while (remain) { /* limit the number of pixels to process at one time to the number that will fit in the buffer space or to the number of pixels that remain in the current vector, which ever is smaller. */ ntodo = (long) minvalue(remain, maxelem); ntodo = (long) minvalue(ntodo, (repeat - elemnum)); readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre); ffmbyt(fptr, readptr, REPORT_EOF, status); /* move to read position */ /* read the array of strings from the FITS file into the buffer */ if (incre == twidth) ffgbyt(fptr, ntodo * twidth, cbuff, status); else ffgbytoff(fptr, twidth, ntodo, incre - twidth, cbuff, status); /* copy from the buffer into the user's array of strings */ /* work backwards from last char of last string to 1st char of 1st */ buffer = ((char *) cbuff) + (ntodo * twidth) - 1; for (ii = (long) (next + ntodo - 1); ii >= next; ii--) { arrayptr = array[ii] + twidth - 1; for (jj = twidth - 1; jj > 0; jj--) /* ignore trailing blanks */ { if (*buffer == ' ') { buffer--; arrayptr--; } else break; } *(arrayptr + 1) = 0; /* write the string terminator */ for (; jj >= 0; jj--) /* copy the string itself */ { *arrayptr = *buffer; buffer--; arrayptr--; } /* check if null value is defined, and if the */ /* column string is identical to the null string */ if (nulcheck && !strncmp(snull, array[ii], nullen) ) { *anynul = 1; /* this is a null value */ if (nultyp == 1) { if (nulval) strcpy(array[ii], nulval); else strcpy(array[ii], " "); } else nularray[ii] = 1; } } if (*status > 0) /* test for error during previous read operation */ { dtemp = (double) next; sprintf(message, "Error reading elements %.0f thru %.0f of data array (ffpcls).", dtemp+1., dtemp+ntodo); ffpmsg(message); return(*status); } /*--------------------------------------------*/ /* increment the counters for the next loop */ /*--------------------------------------------*/ next += ntodo; remain -= ntodo; if (remain) { elemnum += ntodo; if (elemnum == repeat) /* completed a row; start on next row */ { elemnum = 0; rownum++; } } } /* End of main while Loop */ return(*status); } astropy-1.1.1/cextern/cfitsio/getcol.c0000644001134200020070000011563212602615520020657 0ustar embrayscience00000000000000 /* This file, getcol.c, contains routines that read data elements from */ /* a FITS image or table. There are generic datatype routines. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffgpxv( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ long *firstpix, /* I - coord of first pixel to read (1s based) */ LONGLONG nelem, /* I - number of values to read */ void *nulval, /* I - value for undefined pixels */ void *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { LONGLONG tfirstpix[99]; int naxis, ii; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); /* get the size of the image */ ffgidm(fptr, &naxis, status); for (ii=0; ii < naxis; ii++) tfirstpix[ii] = firstpix[ii]; ffgpxvll(fptr, datatype, tfirstpix, nelem, nulval, array, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgpxvll( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ LONGLONG *firstpix, /* I - coord of first pixel to read (1s based) */ LONGLONG nelem, /* I - number of values to read */ void *nulval, /* I - value for undefined pixels */ void *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { int naxis, ii; char cdummy; int nullcheck = 1; LONGLONG naxes[9], trc[9]= {1,1,1,1,1,1,1,1,1}; long inc[9]= {1,1,1,1,1,1,1,1,1}; LONGLONG dimsize = 1, firstelem; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); /* get the size of the image */ ffgidm(fptr, &naxis, status); ffgiszll(fptr, 9, naxes, status); if (naxis == 0 || naxes[0] == 0) { *status = BAD_DIMEN; return(*status); } /* calculate the position of the first element in the array */ firstelem = 0; for (ii=0; ii < naxis; ii++) { firstelem += ((firstpix[ii] - 1) * dimsize); dimsize *= naxes[ii]; trc[ii] = firstpix[ii]; } firstelem++; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ /* test for special case of reading an integral number of */ /* rows in a 2D or 3D image (which includes reading the whole image */ if (naxis > 1 && naxis < 4 && firstpix[0] == 1 && (nelem / naxes[0]) * naxes[0] == nelem) { /* calculate coordinate of last pixel */ trc[0] = naxes[0]; /* reading whole rows */ trc[1] = firstpix[1] + (nelem / naxes[0] - 1); while (trc[1] > naxes[1]) { trc[1] = trc[1] - naxes[1]; trc[2] = trc[2] + 1; /* increment to next plane of cube */ } fits_read_compressed_img(fptr, datatype, firstpix, trc, inc, 1, nulval, array, NULL, anynul, status); } else { fits_read_compressed_pixels(fptr, datatype, firstelem, nelem, nullcheck, nulval, array, NULL, anynul, status); } return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (datatype == TBYTE) { if (nulval == 0) ffgclb(fptr, 2, 1, firstelem, nelem, 1, 1, 0, (unsigned char *) array, &cdummy, anynul, status); else ffgclb(fptr, 2, 1, firstelem, nelem, 1, 1, *(unsigned char *) nulval, (unsigned char *) array, &cdummy, anynul, status); } else if (datatype == TSBYTE) { if (nulval == 0) ffgclsb(fptr, 2, 1, firstelem, nelem, 1, 1, 0, (signed char *) array, &cdummy, anynul, status); else ffgclsb(fptr, 2, 1, firstelem, nelem, 1, 1, *(signed char *) nulval, (signed char *) array, &cdummy, anynul, status); } else if (datatype == TUSHORT) { if (nulval == 0) ffgclui(fptr, 2, 1, firstelem, nelem, 1, 1, 0, (unsigned short *) array, &cdummy, anynul, status); else ffgclui(fptr, 2, 1, firstelem, nelem, 1, 1, *(unsigned short *) nulval, (unsigned short *) array, &cdummy, anynul, status); } else if (datatype == TSHORT) { if (nulval == 0) ffgcli(fptr, 2, 1, firstelem, nelem, 1, 1, 0, (short *) array, &cdummy, anynul, status); else ffgcli(fptr, 2, 1, firstelem, nelem, 1, 1, *(short *) nulval, (short *) array, &cdummy, anynul, status); } else if (datatype == TUINT) { if (nulval == 0) ffgcluk(fptr, 2, 1, firstelem, nelem, 1, 1, 0, (unsigned int *) array, &cdummy, anynul, status); else ffgcluk(fptr, 2, 1, firstelem, nelem, 1, 1, *(unsigned int *) nulval, (unsigned int *) array, &cdummy, anynul, status); } else if (datatype == TINT) { if (nulval == 0) ffgclk(fptr, 2, 1, firstelem, nelem, 1, 1, 0, (int *) array, &cdummy, anynul, status); else ffgclk(fptr, 2, 1, firstelem, nelem, 1, 1, *(int *) nulval, (int *) array, &cdummy, anynul, status); } else if (datatype == TULONG) { if (nulval == 0) ffgcluj(fptr, 2, 1, firstelem, nelem, 1, 1, 0, (unsigned long *) array, &cdummy, anynul, status); else ffgcluj(fptr, 2, 1, firstelem, nelem, 1, 1, *(unsigned long *) nulval, (unsigned long *) array, &cdummy, anynul, status); } else if (datatype == TLONG) { if (nulval == 0) ffgclj(fptr, 2, 1, firstelem, nelem, 1, 1, 0, (long *) array, &cdummy, anynul, status); else ffgclj(fptr, 2, 1, firstelem, nelem, 1, 1, *(long *) nulval, (long *) array, &cdummy, anynul, status); } else if (datatype == TLONGLONG) { if (nulval == 0) ffgcljj(fptr, 2, 1, firstelem, nelem, 1, 1, 0, (LONGLONG *) array, &cdummy, anynul, status); else ffgcljj(fptr, 2, 1, firstelem, nelem, 1, 1, *(LONGLONG *) nulval, (LONGLONG *) array, &cdummy, anynul, status); } else if (datatype == TFLOAT) { if (nulval == 0) ffgcle(fptr, 2, 1, firstelem, nelem, 1, 1, 0, (float *) array, &cdummy, anynul, status); else ffgcle(fptr, 2, 1, firstelem, nelem, 1, 1, *(float *) nulval, (float *) array, &cdummy, anynul, status); } else if (datatype == TDOUBLE) { if (nulval == 0) ffgcld(fptr, 2, 1, firstelem, nelem, 1, 1, 0, (double *) array, &cdummy, anynul, status); else ffgcld(fptr, 2, 1, firstelem, nelem, 1, 1, *(double *) nulval, (double *) array, &cdummy, anynul, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffgpxf( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ long *firstpix, /* I - coord of first pixel to read (1s based) */ LONGLONG nelem, /* I - number of values to read */ void *array, /* O - array of values that are returned */ char *nullarray, /* O - returned array of null value flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). The nullarray values will = 1 if the corresponding array value is null. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { LONGLONG tfirstpix[99]; int naxis, ii; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); /* get the size of the image */ ffgidm(fptr, &naxis, status); for (ii=0; ii < naxis; ii++) tfirstpix[ii] = firstpix[ii]; ffgpxfll(fptr, datatype, tfirstpix, nelem, array, nullarray, anynul, status); return(*status); } /*--------------------------------------------------------------------------*/ int ffgpxfll( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ LONGLONG *firstpix, /* I - coord of first pixel to read (1s based) */ LONGLONG nelem, /* I - number of values to read */ void *array, /* O - array of values that are returned */ char *nullarray, /* O - returned array of null value flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). The nullarray values will = 1 if the corresponding array value is null. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { int naxis, ii; int nullcheck = 2; LONGLONG naxes[9]; LONGLONG dimsize = 1, firstelem; if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); /* get the size of the image */ ffgidm(fptr, &naxis, status); ffgiszll(fptr, 9, naxes, status); /* calculate the position of the first element in the array */ firstelem = 0; for (ii=0; ii < naxis; ii++) { firstelem += ((firstpix[ii] - 1) * dimsize); dimsize *= naxes[ii]; } firstelem++; if (fits_is_compressed_image(fptr, status)) { /* this is a compressed image in a binary table */ fits_read_compressed_pixels(fptr, datatype, firstelem, nelem, nullcheck, NULL, array, nullarray, anynul, status); return(*status); } /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (datatype == TBYTE) { ffgclb(fptr, 2, 1, firstelem, nelem, 1, 2, 0, (unsigned char *) array, nullarray, anynul, status); } else if (datatype == TSBYTE) { ffgclsb(fptr, 2, 1, firstelem, nelem, 1, 2, 0, (signed char *) array, nullarray, anynul, status); } else if (datatype == TUSHORT) { ffgclui(fptr, 2, 1, firstelem, nelem, 1, 2, 0, (unsigned short *) array, nullarray, anynul, status); } else if (datatype == TSHORT) { ffgcli(fptr, 2, 1, firstelem, nelem, 1, 2, 0, (short *) array, nullarray, anynul, status); } else if (datatype == TUINT) { ffgcluk(fptr, 2, 1, firstelem, nelem, 1, 2, 0, (unsigned int *) array, nullarray, anynul, status); } else if (datatype == TINT) { ffgclk(fptr, 2, 1, firstelem, nelem, 1, 2, 0, (int *) array, nullarray, anynul, status); } else if (datatype == TULONG) { ffgcluj(fptr, 2, 1, firstelem, nelem, 1, 2, 0, (unsigned long *) array, nullarray, anynul, status); } else if (datatype == TLONG) { ffgclj(fptr, 2, 1, firstelem, nelem, 1, 2, 0, (long *) array, nullarray, anynul, status); } else if (datatype == TLONGLONG) { ffgcljj(fptr, 2, 1, firstelem, nelem, 1, 2, 0, (LONGLONG *) array, nullarray, anynul, status); } else if (datatype == TFLOAT) { ffgcle(fptr, 2, 1, firstelem, nelem, 1, 2, 0, (float *) array, nullarray, anynul, status); } else if (datatype == TDOUBLE) { ffgcld(fptr, 2, 1, firstelem, nelem, 1, 2, 0, (double *) array, nullarray, anynul, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffgsv( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc , /* I - 'top right corner' of the subsection */ long *inc, /* I - increment to be applied in each dim. */ void *nulval, /* I - value for undefined pixels */ void *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an section of values from the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { int naxis, ii; long naxes[9]; LONGLONG nelem = 1; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* get the size of the image */ ffgidm(fptr, &naxis, status); ffgisz(fptr, 9, naxes, status); /* test for the important special case where we are reading the whole image */ /* this is only useful for images that are not tile-compressed */ if (!fits_is_compressed_image(fptr, status)) { for (ii = 0; ii < naxis; ii++) { if (inc[ii] != 1 || blc[ii] !=1 || trc[ii] != naxes[ii]) break; nelem = nelem * naxes[ii]; } if (ii == naxis) { /* read the whole image more efficiently */ ffgpxv(fptr, datatype, blc, nelem, nulval, array, anynul, status); return(*status); } } if (datatype == TBYTE) { if (nulval == 0) ffgsvb(fptr, 1, naxis, naxes, blc, trc, inc, 0, (unsigned char *) array, anynul, status); else ffgsvb(fptr, 1, naxis, naxes, blc, trc, inc, *(unsigned char *) nulval, (unsigned char *) array, anynul, status); } else if (datatype == TSBYTE) { if (nulval == 0) ffgsvsb(fptr, 1, naxis, naxes, blc, trc, inc, 0, (signed char *) array, anynul, status); else ffgsvsb(fptr, 1, naxis, naxes, blc, trc, inc, *(signed char *) nulval, (signed char *) array, anynul, status); } else if (datatype == TUSHORT) { if (nulval == 0) ffgsvui(fptr, 1, naxis, naxes, blc, trc, inc, 0, (unsigned short *) array, anynul, status); else ffgsvui(fptr, 1, naxis, naxes,blc, trc, inc, *(unsigned short *) nulval, (unsigned short *) array, anynul, status); } else if (datatype == TSHORT) { if (nulval == 0) ffgsvi(fptr, 1, naxis, naxes, blc, trc, inc, 0, (short *) array, anynul, status); else ffgsvi(fptr, 1, naxis, naxes, blc, trc, inc, *(short *) nulval, (short *) array, anynul, status); } else if (datatype == TUINT) { if (nulval == 0) ffgsvuk(fptr, 1, naxis, naxes, blc, trc, inc, 0, (unsigned int *) array, anynul, status); else ffgsvuk(fptr, 1, naxis, naxes, blc, trc, inc, *(unsigned int *) nulval, (unsigned int *) array, anynul, status); } else if (datatype == TINT) { if (nulval == 0) ffgsvk(fptr, 1, naxis, naxes, blc, trc, inc, 0, (int *) array, anynul, status); else ffgsvk(fptr, 1, naxis, naxes, blc, trc, inc, *(int *) nulval, (int *) array, anynul, status); } else if (datatype == TULONG) { if (nulval == 0) ffgsvuj(fptr, 1, naxis, naxes, blc, trc, inc, 0, (unsigned long *) array, anynul, status); else ffgsvuj(fptr, 1, naxis, naxes, blc, trc, inc, *(unsigned long *) nulval, (unsigned long *) array, anynul, status); } else if (datatype == TLONG) { if (nulval == 0) ffgsvj(fptr, 1, naxis, naxes, blc, trc, inc, 0, (long *) array, anynul, status); else ffgsvj(fptr, 1, naxis, naxes, blc, trc, inc, *(long *) nulval, (long *) array, anynul, status); } else if (datatype == TLONGLONG) { if (nulval == 0) ffgsvjj(fptr, 1, naxis, naxes, blc, trc, inc, 0, (LONGLONG *) array, anynul, status); else ffgsvjj(fptr, 1, naxis, naxes, blc, trc, inc, *(LONGLONG *) nulval, (LONGLONG *) array, anynul, status); } else if (datatype == TFLOAT) { if (nulval == 0) ffgsve(fptr, 1, naxis, naxes, blc, trc, inc, 0, (float *) array, anynul, status); else ffgsve(fptr, 1, naxis, naxes, blc, trc, inc, *(float *) nulval, (float *) array, anynul, status); } else if (datatype == TDOUBLE) { if (nulval == 0) ffgsvd(fptr, 1, naxis, naxes, blc, trc, inc, 0, (double *) array, anynul, status); else ffgsvd(fptr, 1, naxis, naxes, blc, trc, inc, *(double *) nulval, (double *) array, anynul, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffgpv( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ void *nulval, /* I - value for undefined pixels */ void *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (datatype == TBYTE) { if (nulval == 0) ffgpvb(fptr, 1, firstelem, nelem, 0, (unsigned char *) array, anynul, status); else ffgpvb(fptr, 1, firstelem, nelem, *(unsigned char *) nulval, (unsigned char *) array, anynul, status); } else if (datatype == TSBYTE) { if (nulval == 0) ffgpvsb(fptr, 1, firstelem, nelem, 0, (signed char *) array, anynul, status); else ffgpvsb(fptr, 1, firstelem, nelem, *(signed char *) nulval, (signed char *) array, anynul, status); } else if (datatype == TUSHORT) { if (nulval == 0) ffgpvui(fptr, 1, firstelem, nelem, 0, (unsigned short *) array, anynul, status); else ffgpvui(fptr, 1, firstelem, nelem, *(unsigned short *) nulval, (unsigned short *) array, anynul, status); } else if (datatype == TSHORT) { if (nulval == 0) ffgpvi(fptr, 1, firstelem, nelem, 0, (short *) array, anynul, status); else ffgpvi(fptr, 1, firstelem, nelem, *(short *) nulval, (short *) array, anynul, status); } else if (datatype == TUINT) { if (nulval == 0) ffgpvuk(fptr, 1, firstelem, nelem, 0, (unsigned int *) array, anynul, status); else ffgpvuk(fptr, 1, firstelem, nelem, *(unsigned int *) nulval, (unsigned int *) array, anynul, status); } else if (datatype == TINT) { if (nulval == 0) ffgpvk(fptr, 1, firstelem, nelem, 0, (int *) array, anynul, status); else ffgpvk(fptr, 1, firstelem, nelem, *(int *) nulval, (int *) array, anynul, status); } else if (datatype == TULONG) { if (nulval == 0) ffgpvuj(fptr, 1, firstelem, nelem, 0, (unsigned long *) array, anynul, status); else ffgpvuj(fptr, 1, firstelem, nelem, *(unsigned long *) nulval, (unsigned long *) array, anynul, status); } else if (datatype == TLONG) { if (nulval == 0) ffgpvj(fptr, 1, firstelem, nelem, 0, (long *) array, anynul, status); else ffgpvj(fptr, 1, firstelem, nelem, *(long *) nulval, (long *) array, anynul, status); } else if (datatype == TLONGLONG) { if (nulval == 0) ffgpvjj(fptr, 1, firstelem, nelem, 0, (LONGLONG *) array, anynul, status); else ffgpvjj(fptr, 1, firstelem, nelem, *(LONGLONG *) nulval, (LONGLONG *) array, anynul, status); } else if (datatype == TFLOAT) { if (nulval == 0) ffgpve(fptr, 1, firstelem, nelem, 0, (float *) array, anynul, status); else ffgpve(fptr, 1, firstelem, nelem, *(float *) nulval, (float *) array, anynul, status); } else if (datatype == TDOUBLE) { if (nulval == 0) ffgpvd(fptr, 1, firstelem, nelem, 0, (double *) array, anynul, status); else { ffgpvd(fptr, 1, firstelem, nelem, *(double *) nulval, (double *) array, anynul, status); } } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffgpf( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ void *array, /* O - array of values that are returned */ char *nullarray, /* O - array of null value flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). The nullarray values will = 1 if the corresponding array value is null. ANYNUL is returned with a value of .true. if any pixels are undefined. */ { if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */ return(*status); /* the primary array is represented as a binary table: each group of the primary array is a row in the table, where the first column contains the group parameters and the second column contains the image itself. */ if (datatype == TBYTE) { ffgpfb(fptr, 1, firstelem, nelem, (unsigned char *) array, nullarray, anynul, status); } else if (datatype == TSBYTE) { ffgpfsb(fptr, 1, firstelem, nelem, (signed char *) array, nullarray, anynul, status); } else if (datatype == TUSHORT) { ffgpfui(fptr, 1, firstelem, nelem, (unsigned short *) array, nullarray, anynul, status); } else if (datatype == TSHORT) { ffgpfi(fptr, 1, firstelem, nelem, (short *) array, nullarray, anynul, status); } else if (datatype == TUINT) { ffgpfuk(fptr, 1, firstelem, nelem, (unsigned int *) array, nullarray, anynul, status); } else if (datatype == TINT) { ffgpfk(fptr, 1, firstelem, nelem, (int *) array, nullarray, anynul, status); } else if (datatype == TULONG) { ffgpfuj(fptr, 1, firstelem, nelem, (unsigned long *) array, nullarray, anynul, status); } else if (datatype == TLONG) { ffgpfj(fptr, 1, firstelem, nelem, (long *) array, nullarray, anynul, status); } else if (datatype == TLONGLONG) { ffgpfjj(fptr, 1, firstelem, nelem, (LONGLONG *) array, nullarray, anynul, status); } else if (datatype == TFLOAT) { ffgpfe(fptr, 1, firstelem, nelem, (float *) array, nullarray, anynul, status); } else if (datatype == TDOUBLE) { ffgpfd(fptr, 1, firstelem, nelem, (double *) array, nullarray, anynul, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffgcv( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ void *nulval, /* I - value for undefined pixels */ void *array, /* O - array of values that are returned */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a table column. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). Undefined elements will be set equal to NULVAL, unless NULVAL=0 in which case no checking for undefined values will be performed. ANYNUL is returned with a value of true if any pixels are undefined. */ { char cdummy[2]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (datatype == TBIT) { ffgcx(fptr, colnum, firstrow, firstelem, nelem, (char *) array, status); } else if (datatype == TBYTE) { if (nulval == 0) ffgclb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, (unsigned char *) array, cdummy, anynul, status); else ffgclb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(unsigned char *) nulval, (unsigned char *) array, cdummy, anynul, status); } else if (datatype == TSBYTE) { if (nulval == 0) ffgclsb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, (signed char *) array, cdummy, anynul, status); else ffgclsb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(signed char *) nulval, (signed char *) array, cdummy, anynul, status); } else if (datatype == TUSHORT) { if (nulval == 0) ffgclui(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, (unsigned short *) array, cdummy, anynul, status); else ffgclui(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(unsigned short *) nulval, (unsigned short *) array, cdummy, anynul, status); } else if (datatype == TSHORT) { if (nulval == 0) ffgcli(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, (short *) array, cdummy, anynul, status); else ffgcli(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(short *) nulval, (short *) array, cdummy, anynul, status); } else if (datatype == TUINT) { if (nulval == 0) ffgcluk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, (unsigned int *) array, cdummy, anynul, status); else ffgcluk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(unsigned int *) nulval, (unsigned int *) array, cdummy, anynul, status); } else if (datatype == TINT) { if (nulval == 0) ffgclk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, (int *) array, cdummy, anynul, status); else ffgclk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(int *) nulval, (int *) array, cdummy, anynul, status); } else if (datatype == TULONG) { if (nulval == 0) ffgcluj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, (unsigned long *) array, cdummy, anynul, status); else ffgcluj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(unsigned long *) nulval, (unsigned long *) array, cdummy, anynul, status); } else if (datatype == TLONG) { if (nulval == 0) ffgclj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, (long *) array, cdummy, anynul, status); else ffgclj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(long *) nulval, (long *) array, cdummy, anynul, status); } else if (datatype == TLONGLONG) { if (nulval == 0) ffgcljj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0, (LONGLONG *) array, cdummy, anynul, status); else ffgcljj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(LONGLONG *) nulval, (LONGLONG *) array, cdummy, anynul, status); } else if (datatype == TFLOAT) { if (nulval == 0) ffgcle(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0., (float *) array, cdummy, anynul, status); else ffgcle(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(float *) nulval,(float *) array, cdummy, anynul, status); } else if (datatype == TDOUBLE) { if (nulval == 0) ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0., (double *) array, cdummy, anynul, status); else ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(double *) nulval, (double *) array, cdummy, anynul, status); } else if (datatype == TCOMPLEX) { if (nulval == 0) ffgcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, 1, 1, 0., (float *) array, cdummy, anynul, status); else ffgcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, 1, 1, *(float *) nulval, (float *) array, cdummy, anynul, status); } else if (datatype == TDBLCOMPLEX) { if (nulval == 0) ffgcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, 1, 1, 0., (double *) array, cdummy, anynul, status); else ffgcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, 1, 1, *(double *) nulval, (double *) array, cdummy, anynul, status); } else if (datatype == TLOGICAL) { if (nulval == 0) ffgcll(fptr, colnum, firstrow, firstelem, nelem, 1, 0, (char *) array, cdummy, anynul, status); else ffgcll(fptr, colnum, firstrow, firstelem, nelem, 1, *(char *) nulval, (char *) array, cdummy, anynul, status); } else if (datatype == TSTRING) { if (nulval == 0) { cdummy[0] = '\0'; ffgcls(fptr, colnum, firstrow, firstelem, nelem, 1, cdummy, (char **) array, cdummy, anynul, status); } else ffgcls(fptr, colnum, firstrow, firstelem, nelem, 1, (char *) nulval, (char **) array, cdummy, anynul, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffgcf( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */ LONGLONG nelem, /* I - number of values to read */ void *array, /* O - array of values that are returned */ char *nullarray, /* O - array of null value flags */ int *anynul, /* O - set to 1 if any values are null; else 0 */ int *status) /* IO - error status */ /* Read an array of values from a table column. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being read). ANYNUL is returned with a value of true if any pixels are undefined. */ { void *nulval; /* dummy argument */ double dnulval = 0.; if (*status > 0) /* inherit input status value if > 0 */ return(*status); nulval = &dnulval; /* set to a harmless value; this is never used */ if (datatype == TBIT) { ffgcx(fptr, colnum, firstrow, firstelem, nelem, (char *) array, status); } else if (datatype == TBYTE) { ffgclb(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(unsigned char *) nulval, (unsigned char *) array, nullarray, anynul, status); } else if (datatype == TSBYTE) { ffgclsb(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(signed char *) nulval, (signed char *) array, nullarray, anynul, status); } else if (datatype == TUSHORT) { ffgclui(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(unsigned short *) nulval, (unsigned short *) array, nullarray, anynul, status); } else if (datatype == TSHORT) { ffgcli(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(short *) nulval, (short *) array, nullarray, anynul, status); } else if (datatype == TUINT) { ffgcluk(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(unsigned int *) nulval, (unsigned int *) array, nullarray, anynul, status); } else if (datatype == TINT) { ffgclk(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(int *) nulval, (int *) array, nullarray, anynul, status); } else if (datatype == TULONG) { ffgcluj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(unsigned long *) nulval, (unsigned long *) array, nullarray, anynul, status); } else if (datatype == TLONG) { ffgclj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(long *) nulval, (long *) array, nullarray, anynul, status); } else if (datatype == TLONGLONG) { ffgcljj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(LONGLONG *) nulval, (LONGLONG *) array, nullarray, anynul, status); } else if (datatype == TFLOAT) { ffgcle(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(float *) nulval,(float *) array, nullarray, anynul, status); } else if (datatype == TDOUBLE) { ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, 2, *(double *) nulval, (double *) array, nullarray, anynul, status); } else if (datatype == TCOMPLEX) { ffgcfc(fptr, colnum, firstrow, firstelem, nelem, (float *) array, nullarray, anynul, status); } else if (datatype == TDBLCOMPLEX) { ffgcfm(fptr, colnum, firstrow, firstelem, nelem, (double *) array, nullarray, anynul, status); } else if (datatype == TLOGICAL) { ffgcll(fptr, colnum, firstrow, firstelem, nelem, 2, *(char *) nulval, (char *) array, nullarray, anynul, status); } else if (datatype == TSTRING) { ffgcls(fptr, colnum, firstrow, firstelem, nelem, 2, (char *) nulval, (char **) array, nullarray, anynul, status); } else *status = BAD_DATATYPE; return(*status); } astropy-1.1.1/cextern/cfitsio/putcol.c0000644001134200020070000017765012602615517020726 0ustar embrayscience00000000000000/* This file, putcol.c, contains routines that write data elements to */ /* a FITS image or table. These are the generic routines. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ #include #include #include #include "fitsio2.h" /*--------------------------------------------------------------------------*/ int ffppx( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ long *firstpix, /* I - coord of first pixel to write(1 based) */ LONGLONG nelem, /* I - number of values to write */ void *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of pixels to the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). This routine is simillar to ffppr, except it supports writing to large images with more than 2**31 pixels. */ { int naxis, ii; long group = 1; LONGLONG firstelem, dimsize = 1, naxes[9]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* get the size of the image */ ffgidm(fptr, &naxis, status); ffgiszll(fptr, 9, naxes, status); firstelem = 0; for (ii=0; ii < naxis; ii++) { firstelem += ((firstpix[ii] - 1) * dimsize); dimsize *= naxes[ii]; } firstelem++; if (datatype == TBYTE) { ffpprb(fptr, group, firstelem, nelem, (unsigned char *) array, status); } else if (datatype == TSBYTE) { ffpprsb(fptr, group, firstelem, nelem, (signed char *) array, status); } else if (datatype == TUSHORT) { ffpprui(fptr, group, firstelem, nelem, (unsigned short *) array, status); } else if (datatype == TSHORT) { ffppri(fptr, group, firstelem, nelem, (short *) array, status); } else if (datatype == TUINT) { ffppruk(fptr, group, firstelem, nelem, (unsigned int *) array, status); } else if (datatype == TINT) { ffpprk(fptr, group, firstelem, nelem, (int *) array, status); } else if (datatype == TULONG) { ffppruj(fptr, group, firstelem, nelem, (unsigned long *) array, status); } else if (datatype == TLONG) { ffpprj(fptr, group, firstelem, nelem, (long *) array, status); } else if (datatype == TLONGLONG) { ffpprjj(fptr, group, firstelem, nelem, (LONGLONG *) array, status); } else if (datatype == TFLOAT) { ffppre(fptr, group, firstelem, nelem, (float *) array, status); } else if (datatype == TDOUBLE) { ffpprd(fptr, group, firstelem, nelem, (double *) array, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffppxll( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ LONGLONG *firstpix, /* I - coord of first pixel to write(1 based) */ LONGLONG nelem, /* I - number of values to write */ void *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of pixels to the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). This routine is simillar to ffppr, except it supports writing to large images with more than 2**31 pixels. */ { int naxis, ii; long group = 1; LONGLONG firstelem, dimsize = 1, naxes[9]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* get the size of the image */ ffgidm(fptr, &naxis, status); ffgiszll(fptr, 9, naxes, status); firstelem = 0; for (ii=0; ii < naxis; ii++) { firstelem += ((firstpix[ii] - 1) * dimsize); dimsize *= naxes[ii]; } firstelem++; if (datatype == TBYTE) { ffpprb(fptr, group, firstelem, nelem, (unsigned char *) array, status); } else if (datatype == TSBYTE) { ffpprsb(fptr, group, firstelem, nelem, (signed char *) array, status); } else if (datatype == TUSHORT) { ffpprui(fptr, group, firstelem, nelem, (unsigned short *) array, status); } else if (datatype == TSHORT) { ffppri(fptr, group, firstelem, nelem, (short *) array, status); } else if (datatype == TUINT) { ffppruk(fptr, group, firstelem, nelem, (unsigned int *) array, status); } else if (datatype == TINT) { ffpprk(fptr, group, firstelem, nelem, (int *) array, status); } else if (datatype == TULONG) { ffppruj(fptr, group, firstelem, nelem, (unsigned long *) array, status); } else if (datatype == TLONG) { ffpprj(fptr, group, firstelem, nelem, (long *) array, status); } else if (datatype == TLONGLONG) { ffpprjj(fptr, group, firstelem, nelem, (LONGLONG *) array, status); } else if (datatype == TFLOAT) { ffppre(fptr, group, firstelem, nelem, (float *) array, status); } else if (datatype == TDOUBLE) { ffpprd(fptr, group, firstelem, nelem, (double *) array, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffppxn( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ long *firstpix, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ void *array, /* I - array of values that are written */ void *nulval, /* I - pointer to the null value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). This routine supports writing to large images with more than 2**31 pixels. */ { int naxis, ii; long group = 1; LONGLONG firstelem, dimsize = 1, naxes[9]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (nulval == NULL) /* null value not defined? */ { ffppx(fptr, datatype, firstpix, nelem, array, status); return(*status); } /* get the size of the image */ ffgidm(fptr, &naxis, status); ffgiszll(fptr, 9, naxes, status); firstelem = 0; for (ii=0; ii < naxis; ii++) { firstelem += ((firstpix[ii] - 1) * dimsize); dimsize *= naxes[ii]; } firstelem++; if (datatype == TBYTE) { ffppnb(fptr, group, firstelem, nelem, (unsigned char *) array, *(unsigned char *) nulval, status); } else if (datatype == TSBYTE) { ffppnsb(fptr, group, firstelem, nelem, (signed char *) array, *(signed char *) nulval, status); } else if (datatype == TUSHORT) { ffppnui(fptr, group, firstelem, nelem, (unsigned short *) array, *(unsigned short *) nulval,status); } else if (datatype == TSHORT) { ffppni(fptr, group, firstelem, nelem, (short *) array, *(short *) nulval, status); } else if (datatype == TUINT) { ffppnuk(fptr, group, firstelem, nelem, (unsigned int *) array, *(unsigned int *) nulval, status); } else if (datatype == TINT) { ffppnk(fptr, group, firstelem, nelem, (int *) array, *(int *) nulval, status); } else if (datatype == TULONG) { ffppnuj(fptr, group, firstelem, nelem, (unsigned long *) array, *(unsigned long *) nulval,status); } else if (datatype == TLONG) { ffppnj(fptr, group, firstelem, nelem, (long *) array, *(long *) nulval, status); } else if (datatype == TLONGLONG) { ffppnjj(fptr, group, firstelem, nelem, (LONGLONG *) array, *(LONGLONG *) nulval, status); } else if (datatype == TFLOAT) { ffppne(fptr, group, firstelem, nelem, (float *) array, *(float *) nulval, status); } else if (datatype == TDOUBLE) { ffppnd(fptr, group, firstelem, nelem, (double *) array, *(double *) nulval, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffppxnll( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ LONGLONG *firstpix, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ void *array, /* I - array of values that are written */ void *nulval, /* I - pointer to the null value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). This routine supports writing to large images with more than 2**31 pixels. */ { int naxis, ii; long group = 1; LONGLONG firstelem, dimsize = 1, naxes[9]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (nulval == NULL) /* null value not defined? */ { ffppxll(fptr, datatype, firstpix, nelem, array, status); return(*status); } /* get the size of the image */ ffgidm(fptr, &naxis, status); ffgiszll(fptr, 9, naxes, status); firstelem = 0; for (ii=0; ii < naxis; ii++) { firstelem += ((firstpix[ii] - 1) * dimsize); dimsize *= naxes[ii]; } firstelem++; if (datatype == TBYTE) { ffppnb(fptr, group, firstelem, nelem, (unsigned char *) array, *(unsigned char *) nulval, status); } else if (datatype == TSBYTE) { ffppnsb(fptr, group, firstelem, nelem, (signed char *) array, *(signed char *) nulval, status); } else if (datatype == TUSHORT) { ffppnui(fptr, group, firstelem, nelem, (unsigned short *) array, *(unsigned short *) nulval,status); } else if (datatype == TSHORT) { ffppni(fptr, group, firstelem, nelem, (short *) array, *(short *) nulval, status); } else if (datatype == TUINT) { ffppnuk(fptr, group, firstelem, nelem, (unsigned int *) array, *(unsigned int *) nulval, status); } else if (datatype == TINT) { ffppnk(fptr, group, firstelem, nelem, (int *) array, *(int *) nulval, status); } else if (datatype == TULONG) { ffppnuj(fptr, group, firstelem, nelem, (unsigned long *) array, *(unsigned long *) nulval,status); } else if (datatype == TLONG) { ffppnj(fptr, group, firstelem, nelem, (long *) array, *(long *) nulval, status); } else if (datatype == TLONGLONG) { ffppnjj(fptr, group, firstelem, nelem, (LONGLONG *) array, *(LONGLONG *) nulval, status); } else if (datatype == TFLOAT) { ffppne(fptr, group, firstelem, nelem, (float *) array, *(float *) nulval, status); } else if (datatype == TDOUBLE) { ffppnd(fptr, group, firstelem, nelem, (double *) array, *(double *) nulval, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffppr( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ void *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of values to the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long group = 1; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (datatype == TBYTE) { ffpprb(fptr, group, firstelem, nelem, (unsigned char *) array, status); } else if (datatype == TSBYTE) { ffpprsb(fptr, group, firstelem, nelem, (signed char *) array, status); } else if (datatype == TUSHORT) { ffpprui(fptr, group, firstelem, nelem, (unsigned short *) array, status); } else if (datatype == TSHORT) { ffppri(fptr, group, firstelem, nelem, (short *) array, status); } else if (datatype == TUINT) { ffppruk(fptr, group, firstelem, nelem, (unsigned int *) array, status); } else if (datatype == TINT) { ffpprk(fptr, group, firstelem, nelem, (int *) array, status); } else if (datatype == TULONG) { ffppruj(fptr, group, firstelem, nelem, (unsigned long *) array, status); } else if (datatype == TLONG) { ffpprj(fptr, group, firstelem, nelem, (long *) array, status); } else if (datatype == TLONGLONG) { ffpprjj(fptr, group, firstelem, nelem, (LONGLONG *) array, status); } else if (datatype == TFLOAT) { ffppre(fptr, group, firstelem, nelem, (float *) array, status); } else if (datatype == TDOUBLE) { ffpprd(fptr, group, firstelem, nelem, (double *) array, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffppn( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ LONGLONG firstelem, /* I - first vector element to write(1 = 1st) */ LONGLONG nelem, /* I - number of values to write */ void *array, /* I - array of values that are written */ void *nulval, /* I - pointer to the null value */ int *status) /* IO - error status */ /* Write an array of values to the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). */ { long group = 1; if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (nulval == NULL) /* null value not defined? */ { ffppr(fptr, datatype, firstelem, nelem, array, status); return(*status); } if (datatype == TBYTE) { ffppnb(fptr, group, firstelem, nelem, (unsigned char *) array, *(unsigned char *) nulval, status); } else if (datatype == TSBYTE) { ffppnsb(fptr, group, firstelem, nelem, (signed char *) array, *(signed char *) nulval, status); } else if (datatype == TUSHORT) { ffppnui(fptr, group, firstelem, nelem, (unsigned short *) array, *(unsigned short *) nulval,status); } else if (datatype == TSHORT) { ffppni(fptr, group, firstelem, nelem, (short *) array, *(short *) nulval, status); } else if (datatype == TUINT) { ffppnuk(fptr, group, firstelem, nelem, (unsigned int *) array, *(unsigned int *) nulval, status); } else if (datatype == TINT) { ffppnk(fptr, group, firstelem, nelem, (int *) array, *(int *) nulval, status); } else if (datatype == TULONG) { ffppnuj(fptr, group, firstelem, nelem, (unsigned long *) array, *(unsigned long *) nulval,status); } else if (datatype == TLONG) { ffppnj(fptr, group, firstelem, nelem, (long *) array, *(long *) nulval, status); } else if (datatype == TLONGLONG) { ffppnjj(fptr, group, firstelem, nelem, (LONGLONG *) array, *(LONGLONG *) nulval, status); } else if (datatype == TFLOAT) { ffppne(fptr, group, firstelem, nelem, (float *) array, *(float *) nulval, status); } else if (datatype == TDOUBLE) { ffppnd(fptr, group, firstelem, nelem, (double *) array, *(double *) nulval, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffpss( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ long *blc, /* I - 'bottom left corner' of the subsection */ long *trc , /* I - 'top right corner' of the subsection */ void *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write a section of values to the primary array. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS array is not the same as the array being written). This routine supports writing to large images with more than 2**31 pixels. */ { int naxis; long naxes[9]; if (*status > 0) /* inherit input status value if > 0 */ return(*status); /* get the size of the image */ ffgidm(fptr, &naxis, status); ffgisz(fptr, 9, naxes, status); if (datatype == TBYTE) { ffpssb(fptr, 1, naxis, naxes, blc, trc, (unsigned char *) array, status); } else if (datatype == TSBYTE) { ffpsssb(fptr, 1, naxis, naxes, blc, trc, (signed char *) array, status); } else if (datatype == TUSHORT) { ffpssui(fptr, 1, naxis, naxes, blc, trc, (unsigned short *) array, status); } else if (datatype == TSHORT) { ffpssi(fptr, 1, naxis, naxes, blc, trc, (short *) array, status); } else if (datatype == TUINT) { ffpssuk(fptr, 1, naxis, naxes, blc, trc, (unsigned int *) array, status); } else if (datatype == TINT) { ffpssk(fptr, 1, naxis, naxes, blc, trc, (int *) array, status); } else if (datatype == TULONG) { ffpssuj(fptr, 1, naxis, naxes, blc, trc, (unsigned long *) array, status); } else if (datatype == TLONG) { ffpssj(fptr, 1, naxis, naxes, blc, trc, (long *) array, status); } else if (datatype == TLONGLONG) { ffpssjj(fptr, 1, naxis, naxes, blc, trc, (LONGLONG *) array, status); } else if (datatype == TFLOAT) { ffpsse(fptr, 1, naxis, naxes, blc, trc, (float *) array, status); } else if (datatype == TDOUBLE) { ffpssd(fptr, 1, naxis, naxes, blc, trc, (double *) array, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffpcl( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of elements to write */ void *array, /* I - array of values that are written */ int *status) /* IO - error status */ /* Write an array of values to a table column. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS column is not the same as the array being written). */ { if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (datatype == TBIT) { ffpclx(fptr, colnum, firstrow, (long) firstelem, (long) nelem, (char *) array, status); } else if (datatype == TBYTE) { ffpclb(fptr, colnum, firstrow, firstelem, nelem, (unsigned char *) array, status); } else if (datatype == TSBYTE) { ffpclsb(fptr, colnum, firstrow, firstelem, nelem, (signed char *) array, status); } else if (datatype == TUSHORT) { ffpclui(fptr, colnum, firstrow, firstelem, nelem, (unsigned short *) array, status); } else if (datatype == TSHORT) { ffpcli(fptr, colnum, firstrow, firstelem, nelem, (short *) array, status); } else if (datatype == TUINT) { ffpcluk(fptr, colnum, firstrow, firstelem, nelem, (unsigned int *) array, status); } else if (datatype == TINT) { ffpclk(fptr, colnum, firstrow, firstelem, nelem, (int *) array, status); } else if (datatype == TULONG) { ffpcluj(fptr, colnum, firstrow, firstelem, nelem, (unsigned long *) array, status); } else if (datatype == TLONG) { ffpclj(fptr, colnum, firstrow, firstelem, nelem, (long *) array, status); } else if (datatype == TLONGLONG) { ffpcljj(fptr, colnum, firstrow, firstelem, nelem, (LONGLONG *) array, status); } else if (datatype == TFLOAT) { ffpcle(fptr, colnum, firstrow, firstelem, nelem, (float *) array, status); } else if (datatype == TDOUBLE) { ffpcld(fptr, colnum, firstrow, firstelem, nelem, (double *) array, status); } else if (datatype == TCOMPLEX) { ffpcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, (float *) array, status); } else if (datatype == TDBLCOMPLEX) { ffpcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, (double *) array, status); } else if (datatype == TLOGICAL) { ffpcll(fptr, colnum, firstrow, firstelem, nelem, (char *) array, status); } else if (datatype == TSTRING) { ffpcls(fptr, colnum, firstrow, firstelem, nelem, (char **) array, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int ffpcn( fitsfile *fptr, /* I - FITS file pointer */ int datatype, /* I - datatype of the value */ int colnum, /* I - number of column to write (1 = 1st col) */ LONGLONG firstrow, /* I - first row to write (1 = 1st row) */ LONGLONG firstelem, /* I - first vector element to write (1 = 1st) */ LONGLONG nelem, /* I - number of elements to write */ void *array, /* I - array of values that are written */ void *nulval, /* I - pointer to the null value */ int *status) /* IO - error status */ /* Write an array of values to a table column. The datatype of the input array is defined by the 2nd argument. Data conversion and scaling will be performed if necessary (e.g, if the datatype of the FITS column is not the same as the array being written). */ { if (*status > 0) /* inherit input status value if > 0 */ return(*status); if (nulval == NULL) /* null value not defined? */ { ffpcl(fptr, datatype, colnum, firstrow, firstelem, nelem, array, status); return(*status); } if (datatype == TBYTE) { ffpcnb(fptr, colnum, firstrow, firstelem, nelem, (unsigned char *) array, *(unsigned char *) nulval, status); } else if (datatype == TSBYTE) { ffpcnsb(fptr, colnum, firstrow, firstelem, nelem, (signed char *) array, *(signed char *) nulval, status); } else if (datatype == TUSHORT) { ffpcnui(fptr, colnum, firstrow, firstelem, nelem, (unsigned short *) array, *(unsigned short *) nulval, status); } else if (datatype == TSHORT) { ffpcni(fptr, colnum, firstrow, firstelem, nelem, (short *) array, *(unsigned short *) nulval, status); } else if (datatype == TUINT) { ffpcnuk(fptr, colnum, firstrow, firstelem, nelem, (unsigned int *) array, *(unsigned int *) nulval, status); } else if (datatype == TINT) { ffpcnk(fptr, colnum, firstrow, firstelem, nelem, (int *) array, *(int *) nulval, status); } else if (datatype == TULONG) { ffpcnuj(fptr, colnum, firstrow, firstelem, nelem, (unsigned long *) array, *(unsigned long *) nulval, status); } else if (datatype == TLONG) { ffpcnj(fptr, colnum, firstrow, firstelem, nelem, (long *) array, *(long *) nulval, status); } else if (datatype == TLONGLONG) { ffpcnjj(fptr, colnum, firstrow, firstelem, nelem, (LONGLONG *) array, *(LONGLONG *) nulval, status); } else if (datatype == TFLOAT) { ffpcne(fptr, colnum, firstrow, firstelem, nelem, (float *) array, *(float *) nulval, status); } else if (datatype == TDOUBLE) { ffpcnd(fptr, colnum, firstrow, firstelem, nelem, (double *) array, *(double *) nulval, status); } else if (datatype == TCOMPLEX) { ffpcne(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, (float *) array, *(float *) nulval, status); } else if (datatype == TDBLCOMPLEX) { ffpcnd(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2, (double *) array, *(double *) nulval, status); } else if (datatype == TLOGICAL) { ffpcnl(fptr, colnum, firstrow, firstelem, nelem, (char *) array, *(char *) nulval, status); } else if (datatype == TSTRING) { ffpcns(fptr, colnum, firstrow, firstelem, nelem, (char **) array, (char *) nulval, status); } else *status = BAD_DATATYPE; return(*status); } /*--------------------------------------------------------------------------*/ int fits_iter_set_by_name(iteratorCol *col, /* I - iterator col structure */ fitsfile *fptr, /* I - FITS file pointer */ char *colname, /* I - column name */ int datatype, /* I - column datatype */ int iotype) /* I - InputCol, InputOutputCol, or OutputCol */ /* set all the parameters for an iterator column, by column name */ { col->fptr = fptr; strcpy(col->colname, colname); col->colnum = 0; /* set column number undefined since name is given */ col->datatype = datatype; col->iotype = iotype; return(0); } /*--------------------------------------------------------------------------*/ int fits_iter_set_by_num(iteratorCol *col, /* I - iterator column structure */ fitsfile *fptr, /* I - FITS file pointer */ int colnum, /* I - column number */ int datatype, /* I - column datatype */ int iotype) /* I - InputCol, InputOutputCol, or OutputCol */ /* set all the parameters for an iterator column, by column number */ { col->fptr = fptr; col->colnum = colnum; col->datatype = datatype; col->iotype = iotype; return(0); } /*--------------------------------------------------------------------------*/ int fits_iter_set_file(iteratorCol *col, /* I - iterator column structure */ fitsfile *fptr) /* I - FITS file pointer */ /* set iterator column parameter */ { col->fptr = fptr; return(0); } /*--------------------------------------------------------------------------*/ int fits_iter_set_colname(iteratorCol *col, /* I - iterator col structure */ char *colname) /* I - column name */ /* set iterator column parameter */ { strcpy(col->colname, colname); col->colnum = 0; /* set column number undefined since name is given */ return(0); } /*--------------------------------------------------------------------------*/ int fits_iter_set_colnum(iteratorCol *col, /* I - iterator column structure */ int colnum) /* I - column number */ /* set iterator column parameter */ { col->colnum = colnum; return(0); } /*--------------------------------------------------------------------------*/ int fits_iter_set_datatype(iteratorCol *col, /* I - iterator col structure */ int datatype) /* I - column datatype */ /* set iterator column parameter */ { col->datatype = datatype; return(0); } /*--------------------------------------------------------------------------*/ int fits_iter_set_iotype(iteratorCol *col, /* I - iterator column structure */ int iotype) /* I - InputCol, InputOutputCol, or OutputCol */ /* set iterator column parameter */ { col->iotype = iotype; return(0); } /*--------------------------------------------------------------------------*/ fitsfile * fits_iter_get_file(iteratorCol *col) /* I -iterator col structure */ /* get iterator column parameter */ { return(col->fptr); } /*--------------------------------------------------------------------------*/ char * fits_iter_get_colname(iteratorCol *col) /* I -iterator col structure */ /* get iterator column parameter */ { return(col->colname); } /*--------------------------------------------------------------------------*/ int fits_iter_get_colnum(iteratorCol *col) /* I - iterator column structure */ /* get iterator column parameter */ { return(col->colnum); } /*--------------------------------------------------------------------------*/ int fits_iter_get_datatype(iteratorCol *col) /* I - iterator col structure */ /* get iterator column parameter */ { return(col->datatype); } /*--------------------------------------------------------------------------*/ int fits_iter_get_iotype(iteratorCol *col) /* I - iterator column structure */ /* get iterator column parameter */ { return(col->iotype); } /*--------------------------------------------------------------------------*/ void * fits_iter_get_array(iteratorCol *col) /* I - iterator col structure */ /* get iterator column parameter */ { return(col->array); } /*--------------------------------------------------------------------------*/ long fits_iter_get_tlmin(iteratorCol *col) /* I - iterator column structure */ /* get iterator column parameter */ { return(col->tlmin); } /*--------------------------------------------------------------------------*/ long fits_iter_get_tlmax(iteratorCol *col) /* I - iterator column structure */ /* get iterator column parameter */ { return(col->tlmax); } /*--------------------------------------------------------------------------*/ long fits_iter_get_repeat(iteratorCol *col) /* I - iterator col structure */ /* get iterator column parameter */ { return(col->repeat); } /*--------------------------------------------------------------------------*/ char * fits_iter_get_tunit(iteratorCol *col) /* I - iterator col structure */ /* get iterator column parameter */ { return(col->tunit); } /*--------------------------------------------------------------------------*/ char * fits_iter_get_tdisp(iteratorCol *col) /* I -iterator col structure */ /* get iterator column parameter */ { return(col->tdisp); } /*--------------------------------------------------------------------------*/ int ffiter(int n_cols, iteratorCol *cols, long offset, long n_per_loop, int (*work_fn)(long total_n, long offset, long first_n, long n_values, int n_cols, iteratorCol *cols, void *userPointer), void *userPointer, int *status) /* The iterator function. This function will pass the specified columns from a FITS table or pixels from a FITS image to the user-supplied function. Depending on the size of the table or image, only a subset of the rows or pixels may be passed to the function on each call, in which case the function will be called multiple times until all the rows or pixels have been processed. */ { typedef struct /* structure to store the column null value */ { int nullsize; /* length of the null value, in bytes */ union { /* default null value for the column */ char *stringnull; unsigned char charnull; signed char scharnull; int intnull; short shortnull; long longnull; unsigned int uintnull; unsigned short ushortnull; unsigned long ulongnull; float floatnull; double doublenull; LONGLONG longlongnull; } null; } colNulls; void *dataptr, *defaultnull; colNulls *col; int ii, jj, tstatus, naxis, bitpix; int typecode, hdutype, jtype, type, anynul, nfiles, nbytes; long totaln, nleft, frow, felement, n_optimum, i_optimum, ntodo; long rept, rowrept, width, tnull, naxes[9] = {1,1,1,1,1,1,1,1,1}, groups; double zeros = 0.; char message[FLEN_ERRMSG], keyname[FLEN_KEYWORD], nullstr[FLEN_VALUE]; char **stringptr, *nullptr, *cptr; if (*status > 0) return(*status); if (n_cols < 0 || n_cols > 999 ) { ffpmsg("Illegal number of columms (ffiter)"); return(*status = BAD_COL_NUM); /* negative number of columns */ } /*------------------------------------------------------------*/ /* Make sure column numbers and datatypes are in legal range */ /* and column numbers and datatypes are legal. */ /* Also fill in other parameters in the column structure. */ /*------------------------------------------------------------*/ ffghdt(cols[0].fptr, &hdutype, status); /* type of first HDU */ for (jj = 0; jj < n_cols; jj++) { /* check that output datatype code value is legal */ type = cols[jj].datatype; /* Allow variable length arrays for InputCol and InputOutputCol columns, but not for OutputCol columns. Variable length arrays have a negative type code value. */ if ((cols[jj].iotype != OutputCol) && (type<0)) { type*=-1; } if (type != 0 && type != TBYTE && type != TSBYTE && type != TLOGICAL && type != TSTRING && type != TSHORT && type != TINT && type != TLONG && type != TFLOAT && type != TDOUBLE && type != TCOMPLEX && type != TULONG && type != TUSHORT && type != TDBLCOMPLEX && type != TLONGLONG ) { if (type < 0) { sprintf(message, "Variable length array not allowed for output column number %d (ffiter)", jj + 1); } else { sprintf(message, "Illegal datatype for column number %d: %d (ffiter)", jj + 1, cols[jj].datatype); } ffpmsg(message); return(*status = BAD_DATATYPE); } /* initialize TLMINn, TLMAXn, column name, and display format */ cols[jj].tlmin = 0; cols[jj].tlmax = 0; cols[jj].tunit[0] = '\0'; cols[jj].tdisp[0] = '\0'; ffghdt(cols[jj].fptr, &jtype, status); /* get HDU type */ if (hdutype == IMAGE_HDU) /* operating on FITS images */ { if (jtype != IMAGE_HDU) { sprintf(message, "File %d not positioned to an image extension (ffiter)", jj + 1); return(*status = NOT_IMAGE); } /* since this is an image, set a dummy column number = 0 */ cols[jj].colnum = 0; strcpy(cols[jj].colname, "IMAGE"); /* dummy name for images */ tstatus = 0; ffgkys(cols[jj].fptr, "BUNIT", cols[jj].tunit, 0, &tstatus); } else /* operating on FITS tables */ { if (jtype == IMAGE_HDU) { sprintf(message, "File %d not positioned to a table extension (ffiter)", jj + 1); return(*status = NOT_TABLE); } if (cols[jj].colnum < 1) { /* find the column number for the named column */ if (ffgcno(cols[jj].fptr, CASEINSEN, cols[jj].colname, &cols[jj].colnum, status) ) { sprintf(message, "Column '%s' not found for column number %d (ffiter)", cols[jj].colname, jj + 1); ffpmsg(message); return(*status); } } /* check that the column number is valid */ if (cols[jj].colnum < 1 || cols[jj].colnum > ((cols[jj].fptr)->Fptr)->tfield) { sprintf(message, "Column %d has illegal table position number: %d (ffiter)", jj + 1, cols[jj].colnum); ffpmsg(message); return(*status = BAD_COL_NUM); } /* look for column description keywords and update structure */ tstatus = 0; ffkeyn("TLMIN", cols[jj].colnum, keyname, &tstatus); ffgkyj(cols[jj].fptr, keyname, &cols[jj].tlmin, 0, &tstatus); tstatus = 0; ffkeyn("TLMAX", cols[jj].colnum, keyname, &tstatus); ffgkyj(cols[jj].fptr, keyname, &cols[jj].tlmax, 0, &tstatus); tstatus = 0; ffkeyn("TTYPE", cols[jj].colnum, keyname, &tstatus); ffgkys(cols[jj].fptr, keyname, cols[jj].colname, 0, &tstatus); if (tstatus) cols[jj].colname[0] = '\0'; tstatus = 0; ffkeyn("TUNIT", cols[jj].colnum, keyname, &tstatus); ffgkys(cols[jj].fptr, keyname, cols[jj].tunit, 0, &tstatus); tstatus = 0; ffkeyn("TDISP", cols[jj].colnum, keyname, &tstatus); ffgkys(cols[jj].fptr, keyname, cols[jj].tdisp, 0, &tstatus); } } /* end of loop over all columns */ /*-----------------------------------------------------------------*/ /* use the first file to set the total number of values to process */ /*-----------------------------------------------------------------*/ offset = maxvalue(offset, 0L); /* make sure offset is legal */ if (hdutype == IMAGE_HDU) /* get total number of pixels in the image */ { fits_get_img_dim(cols[0].fptr, &naxis, status); fits_get_img_size(cols[0].fptr, 9, naxes, status); tstatus = 0; ffgkyj(cols[0].fptr, "GROUPS", &groups, NULL, &tstatus); if (!tstatus && groups && (naxis > 1) && (naxes[0] == 0) ) { /* this is a random groups file, with NAXIS1 = 0 */ /* Use GCOUNT, the number of groups, as the first multiplier */ /* to calculate the total number of pixels in all the groups. */ ffgkyj(cols[0].fptr, "GCOUNT", &totaln, NULL, status); } else { totaln = naxes[0]; } for (ii = 1; ii < naxis; ii++) totaln *= naxes[ii]; frow = 1; felement = 1 + offset; } else /* get total number or rows in the table */ { ffgkyj(cols[0].fptr, "NAXIS2", &totaln, 0, status); frow = 1 + offset; felement = 1; } /* adjust total by the input starting offset value */ totaln -= offset; totaln = maxvalue(totaln, 0L); /* don't allow negative number */ /*------------------------------------------------------------------*/ /* Determine number of values to pass to work function on each loop */ /*------------------------------------------------------------------*/ if (n_per_loop == 0) { /* Determine optimum number of values for each iteration. */ /* Look at all the fitsfile pointers to determine the number */ /* of unique files. */ nfiles = 1; ffgrsz(cols[0].fptr, &n_optimum, status); for (jj = 1; jj < n_cols; jj++) { for (ii = 0; ii < jj; ii++) { if (cols[ii].fptr == cols[jj].fptr) break; } if (ii == jj) /* this is a new file */ { nfiles++; ffgrsz(cols[jj].fptr, &i_optimum, status); n_optimum = minvalue(n_optimum, i_optimum); } } /* divid n_optimum by the number of files that will be processed */ n_optimum = n_optimum / nfiles; n_optimum = maxvalue(n_optimum, 1); } else if (n_per_loop < 0) /* must pass all the values at one time */ { n_optimum = totaln; } else /* calling routine specified how many values to pass at a time */ { n_optimum = minvalue(n_per_loop, totaln); } /*--------------------------------------*/ /* allocate work arrays for each column */ /* and determine the null pixel value */ /*--------------------------------------*/ col = calloc(n_cols, sizeof(colNulls) ); /* memory for the null values */ if (!col) { ffpmsg("ffiter failed to allocate memory for null values"); *status = MEMORY_ALLOCATION; /* memory allocation failed */ return(*status); } for (jj = 0; jj < n_cols; jj++) { /* get image or column datatype and vector length */ if (hdutype == IMAGE_HDU) /* get total number of pixels in the image */ { fits_get_img_type(cols[jj].fptr, &bitpix, status); switch(bitpix) { case BYTE_IMG: typecode = TBYTE; break; case SHORT_IMG: typecode = TSHORT; break; case LONG_IMG: typecode = TLONG; break; case FLOAT_IMG: typecode = TFLOAT; break; case DOUBLE_IMG: typecode = TDOUBLE; break; case LONGLONG_IMG: typecode = TLONGLONG; break; } } else { if (ffgtcl(cols[jj].fptr, cols[jj].colnum, &typecode, &rept, &width, status) > 0) goto cleanup; if (typecode < 0) { /* if any variable length arrays, then the */ n_optimum = 1; /* must process the table 1 row at a time */ /* Allow variable length arrays for InputCol and InputOutputCol columns, but not for OutputCol columns. Variable length arrays have a negative type code value. */ if (cols[jj].iotype == OutputCol) { sprintf(message, "Variable length array not allowed for output column number %d (ffiter)", jj + 1); ffpmsg(message); return(*status = BAD_DATATYPE); } } } /* special case where sizeof(long) = 8: use TINT instead of TLONG */ if (abs(typecode) == TLONG && sizeof(long) == 8 && sizeof(int) == 4) { if(typecode<0) { typecode = -TINT; } else { typecode = TINT; } } /* Special case: interprete 'X' column as 'B' */ if (abs(typecode) == TBIT) { typecode = typecode / TBIT * TBYTE; rept = (rept + 7) / 8; } if (cols[jj].datatype == 0) /* output datatype not specified? */ { /* special case if sizeof(long) = 8: use TINT instead of TLONG */ if (abs(typecode) == TLONG && sizeof(long) == 8 && sizeof(int) == 4) cols[jj].datatype = TINT; else cols[jj].datatype = abs(typecode); } /* calc total number of elements to do on each iteration */ if (hdutype == IMAGE_HDU || cols[jj].datatype == TSTRING) { ntodo = n_optimum; cols[jj].repeat = 1; /* get the BLANK keyword value, if it exists */ if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) { tstatus = 0; ffgkyj(cols[jj].fptr, "BLANK", &tnull, 0, &tstatus); if (tstatus) { tnull = 0L; /* no null values */ } } } else { if (typecode < 0) { /* get max size of the variable length vector; dont't trust the value given by the TFORM keyword */ rept = 1; for (ii = 0; ii < totaln; ii++) { ffgdes(cols[jj].fptr, cols[jj].colnum, frow + ii, &rowrept, NULL, status); rept = maxvalue(rept, rowrept); } } ntodo = n_optimum * rept; /* vector columns */ cols[jj].repeat = rept; /* get the TNULL keyword value, if it exists */ if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) { tstatus = 0; if (hdutype == ASCII_TBL) /* TNULLn value is a string */ { ffkeyn("TNULL", cols[jj].colnum, keyname, &tstatus); ffgkys(cols[jj].fptr, keyname, nullstr, 0, &tstatus); if (tstatus) { tnull = 0L; /* keyword doesn't exist; no null values */ } else { cptr = nullstr; while (*cptr == ' ') /* skip over leading blanks */ cptr++; if (*cptr == '\0') /* TNULLn is all blanks? */ tnull = LONG_MIN; else { /* attempt to read TNULLn string as an integer */ ffc2ii(nullstr, &tnull, &tstatus); if (tstatus) tnull = LONG_MIN; /* choose smallest value */ } /* to represent nulls */ } } else /* Binary table; TNULLn value is an integer */ { ffkeyn("TNULL", cols[jj].colnum, keyname, &tstatus); ffgkyj(cols[jj].fptr, keyname, &tnull, 0, &tstatus); if (tstatus) { tnull = 0L; /* keyword doesn't exist; no null values */ } else if (tnull == 0) { /* worst possible case: a value of 0 is used to */ /* represent nulls in the FITS file. We have to */ /* use a non-zero null value here (zero is used to */ /* mean there are no null values in the array) so we */ /* will use the smallest possible integer instead. */ tnull = LONG_MIN; /* choose smallest possible value */ } } } } /* Note that the data array starts with 2nd element; */ /* 1st element of the array gives the null data value */ switch (cols[jj].datatype) { case TBYTE: cols[jj].array = calloc(ntodo + 1, sizeof(char)); col[jj].nullsize = sizeof(char); /* number of bytes per value */ if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) { tnull = minvalue(tnull, 255); tnull = maxvalue(tnull, 0); col[jj].null.charnull = (unsigned char) tnull; } else { col[jj].null.charnull = (unsigned char) 255; /* use 255 as null */ } break; case TSBYTE: cols[jj].array = calloc(ntodo + 1, sizeof(char)); col[jj].nullsize = sizeof(char); /* number of bytes per value */ if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) { tnull = minvalue(tnull, 127); tnull = maxvalue(tnull, -128); col[jj].null.scharnull = (signed char) tnull; } else { col[jj].null.scharnull = (signed char) -128; /* use -128 null */ } break; case TSHORT: cols[jj].array = calloc(ntodo + 1, sizeof(short)); col[jj].nullsize = sizeof(short); /* number of bytes per value */ if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) { tnull = minvalue(tnull, SHRT_MAX); tnull = maxvalue(tnull, SHRT_MIN); col[jj].null.shortnull = (short) tnull; } else { col[jj].null.shortnull = SHRT_MIN; /* use minimum as null */ } break; case TUSHORT: cols[jj].array = calloc(ntodo + 1, sizeof(unsigned short)); col[jj].nullsize = sizeof(unsigned short); /* bytes per value */ if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) { tnull = minvalue(tnull, (long) USHRT_MAX); tnull = maxvalue(tnull, 0); /* don't allow negative value */ col[jj].null.ushortnull = (unsigned short) tnull; } else { col[jj].null.ushortnull = USHRT_MAX; /* use maximum null */ } break; case TINT: cols[jj].array = calloc(sizeof(int), ntodo + 1); col[jj].nullsize = sizeof(int); /* number of bytes per value */ if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) { tnull = minvalue(tnull, INT_MAX); tnull = maxvalue(tnull, INT_MIN); col[jj].null.intnull = (int) tnull; } else { col[jj].null.intnull = INT_MIN; /* use minimum as null */ } break; case TUINT: cols[jj].array = calloc(ntodo + 1, sizeof(unsigned int)); col[jj].nullsize = sizeof(unsigned int); /* bytes per value */ if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) { tnull = minvalue(tnull, INT32_MAX); tnull = maxvalue(tnull, 0); col[jj].null.uintnull = (unsigned int) tnull; } else { col[jj].null.intnull = UINT_MAX; /* use maximum as null */ } break; case TLONG: cols[jj].array = calloc(ntodo + 1, sizeof(long)); col[jj].nullsize = sizeof(long); /* number of bytes per value */ if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) { col[jj].null.longnull = tnull; } else { col[jj].null.longnull = LONG_MIN; /* use minimum as null */ } break; case TULONG: cols[jj].array = calloc(ntodo + 1, sizeof(unsigned long)); col[jj].nullsize = sizeof(unsigned long); /* bytes per value */ if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) { if (tnull < 0) /* can't use a negative null value */ col[jj].null.ulongnull = LONG_MAX; else col[jj].null.ulongnull = (unsigned long) tnull; } else { col[jj].null.ulongnull = LONG_MAX; /* use maximum as null */ } break; case TFLOAT: cols[jj].array = calloc(ntodo + 1, sizeof(float)); col[jj].nullsize = sizeof(float); /* number of bytes per value */ if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) { col[jj].null.floatnull = (float) tnull; } else { col[jj].null.floatnull = FLOATNULLVALUE; /* special value */ } break; case TCOMPLEX: cols[jj].array = calloc((ntodo * 2) + 1, sizeof(float)); col[jj].nullsize = sizeof(float); /* number of bytes per value */ col[jj].null.floatnull = FLOATNULLVALUE; /* special value */ break; case TDOUBLE: cols[jj].array = calloc(ntodo + 1, sizeof(double)); col[jj].nullsize = sizeof(double); /* number of bytes per value */ if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG) { col[jj].null.doublenull = (double) tnull; } else { col[jj].null.doublenull = DOUBLENULLVALUE; /* special value */ } break; case TDBLCOMPLEX: cols[jj].array = calloc((ntodo * 2) + 1, sizeof(double)); col[jj].nullsize = sizeof(double); /* number of bytes per value */ col[jj].null.doublenull = DOUBLENULLVALUE; /* special value */ break; case TSTRING: /* allocate array of pointers to all the strings */ if( hdutype==ASCII_TBL ) rept = width; stringptr = calloc((ntodo + 1) , sizeof(stringptr)); cols[jj].array = stringptr; col[jj].nullsize = rept + 1; /* number of bytes per value */ if (stringptr) { /* allocate string to store the null string value */ col[jj].null.stringnull = calloc(rept + 1, sizeof(char) ); col[jj].null.stringnull[1] = 1; /* to make sure string != 0 */ /* allocate big block for the array of table column strings */ stringptr[0] = calloc((ntodo + 1) * (rept + 1), sizeof(char) ); if (stringptr[0]) { for (ii = 1; ii <= ntodo; ii++) { /* pointer to each string */ stringptr[ii] = stringptr[ii - 1] + (rept + 1); } /* get the TNULL keyword value, if it exists */ tstatus = 0; ffkeyn("TNULL", cols[jj].colnum, keyname, &tstatus); ffgkys(cols[jj].fptr, keyname, nullstr, 0, &tstatus); if (!tstatus) strncat(col[jj].null.stringnull, nullstr, rept); } else { ffpmsg("ffiter failed to allocate memory arrays"); *status = MEMORY_ALLOCATION; /* memory allocation failed */ goto cleanup; } } break; case TLOGICAL: cols[jj].array = calloc(ntodo + 1, sizeof(char)); col[jj].nullsize = sizeof(char); /* number of bytes per value */ /* use value = 2 to flag null values in logical columns */ col[jj].null.charnull = 2; break; case TLONGLONG: cols[jj].array = calloc(ntodo + 1, sizeof(LONGLONG)); col[jj].nullsize = sizeof(LONGLONG); /* number of bytes per value */ if (abs(typecode) == TBYTE || abs(typecode) == TSHORT || abs(typecode) == TLONG || abs(typecode) == TLONGLONG) { col[jj].null.longlongnull = tnull; } else { col[jj].null.longlongnull = LONGLONG_MIN; /* use minimum as null */ } break; default: sprintf(message, "Column %d datatype currently not supported: %d: (ffiter)", jj + 1, cols[jj].datatype); ffpmsg(message); *status = BAD_DATATYPE; goto cleanup; } /* end of switch block */ /* check that all the arrays were allocated successfully */ if (!cols[jj].array) { ffpmsg("ffiter failed to allocate memory arrays"); *status = MEMORY_ALLOCATION; /* memory allocation failed */ goto cleanup; } } /*--------------------------------------------------*/ /* main loop while there are values left to process */ /*--------------------------------------------------*/ nleft = totaln; while (nleft) { ntodo = minvalue(nleft, n_optimum); /* no. of values for this loop */ /* read input columns from FITS file(s) */ for (jj = 0; jj < n_cols; jj++) { if (cols[jj].iotype != OutputCol) { if (cols[jj].datatype == TSTRING) { stringptr = cols[jj].array; dataptr = stringptr + 1; defaultnull = col[jj].null.stringnull; /* ptr to the null value */ } else { dataptr = (char *) cols[jj].array + col[jj].nullsize; defaultnull = &col[jj].null.charnull; /* ptr to the null value */ } if (hdutype == IMAGE_HDU) { if (ffgpv(cols[jj].fptr, cols[jj].datatype, felement, cols[jj].repeat * ntodo, defaultnull, dataptr, &anynul, status) > 0) { break; } } else { if (ffgtcl(cols[jj].fptr, cols[jj].colnum, &typecode, &rept,&width, status) > 0) goto cleanup; if (typecode<0) { /* get size of the variable length vector */ ffgdes(cols[jj].fptr, cols[jj].colnum, frow,&cols[jj].repeat, NULL,status); } if (ffgcv(cols[jj].fptr, cols[jj].datatype, cols[jj].colnum, frow, felement, cols[jj].repeat * ntodo, defaultnull, dataptr, &anynul, status) > 0) { break; } } /* copy the appropriate null value into first array element */ if (anynul) /* are there any nulls in the data? */ { if (cols[jj].datatype == TSTRING) { stringptr = cols[jj].array; memcpy(*stringptr, col[jj].null.stringnull, col[jj].nullsize); } else { memcpy(cols[jj].array, defaultnull, col[jj].nullsize); } } else /* no null values so copy zero into first element */ { if (cols[jj].datatype == TSTRING) { stringptr = cols[jj].array; memset(*stringptr, 0, col[jj].nullsize); } else { memset(cols[jj].array, 0, col[jj].nullsize); } } } } if (*status > 0) break; /* looks like an error occurred; quit immediately */ /* call work function */ if (hdutype == IMAGE_HDU) *status = work_fn(totaln, offset, felement, ntodo, n_cols, cols, userPointer); else *status = work_fn(totaln, offset, frow, ntodo, n_cols, cols, userPointer); if (*status > 0 || *status < -1 ) break; /* looks like an error occurred; quit immediately */ /* write output columns before quiting if status = -1 */ tstatus = 0; for (jj = 0; jj < n_cols; jj++) { if (cols[jj].iotype != InputCol) { if (cols[jj].datatype == TSTRING) { stringptr = cols[jj].array; dataptr = stringptr + 1; nullptr = *stringptr; nbytes = 2; } else { dataptr = (char *) cols[jj].array + col[jj].nullsize; nullptr = (char *) cols[jj].array; nbytes = col[jj].nullsize; } if (memcmp(nullptr, &zeros, nbytes) ) { /* null value flag not zero; must check for and write nulls */ if (hdutype == IMAGE_HDU) { if (ffppn(cols[jj].fptr, cols[jj].datatype, felement, cols[jj].repeat * ntodo, dataptr, nullptr, &tstatus) > 0) break; } else { if (ffgtcl(cols[jj].fptr, cols[jj].colnum, &typecode, &rept,&width, status) > 0) goto cleanup; if (typecode<0) /* variable length array colum */ { ffgdes(cols[jj].fptr, cols[jj].colnum, frow,&cols[jj].repeat, NULL,status); } if (ffpcn(cols[jj].fptr, cols[jj].datatype, cols[jj].colnum, frow, felement, cols[jj].repeat * ntodo, dataptr, nullptr, &tstatus) > 0) break; } } else { /* no null values; just write the array */ if (hdutype == IMAGE_HDU) { if (ffppr(cols[jj].fptr, cols[jj].datatype, felement, cols[jj].repeat * ntodo, dataptr, &tstatus) > 0) break; } else { if (ffgtcl(cols[jj].fptr, cols[jj].colnum, &typecode, &rept,&width, status) > 0) goto cleanup; if (typecode<0) /* variable length array column */ { ffgdes(cols[jj].fptr, cols[jj].colnum, frow,&cols[jj].repeat, NULL,status); } if (ffpcl(cols[jj].fptr, cols[jj].datatype, cols[jj].colnum, frow, felement, cols[jj].repeat * ntodo, dataptr, &tstatus) > 0) break; } } } } if (*status == 0) *status = tstatus; /* propagate any error status from the writes */ if (*status) break; /* exit on any error */ nleft -= ntodo; if (hdutype == IMAGE_HDU) felement += ntodo; else frow += ntodo; } cleanup: /*----------------------------------*/ /* free work arrays for the columns */ /*----------------------------------*/ for (jj = 0; jj < n_cols; jj++) { if (cols[jj].datatype == TSTRING) { if (cols[jj].array) { stringptr = cols[jj].array; free(*stringptr); /* free the block of strings */ free(col[jj].null.stringnull); /* free the null string */ } } if (cols[jj].array) free(cols[jj].array); /* memory for the array of values from the col */ } free(col); /* the structure containing the null values */ return(*status); } astropy-1.1.1/cextern/cfitsio/swapproc.c0000644001134200020070000001702712602615520021237 0ustar embrayscience00000000000000/* This file, swapproc.c, contains general utility routines that are */ /* used by other FITSIO routines to swap bytes. */ /* The FITSIO software was written by William Pence at the High Energy */ /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */ /* Goddard Space Flight Center. */ /* The fast SSE2 and SSSE3 functions were provided by Julian Taylor, ESO */ #include #include #include "fitsio2.h" /* bswap builtin is available since GCC 4.3 */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) #define HAVE_BSWAP #endif #ifdef __SSSE3__ #include /* swap 16 bytes according to mask, values must be 16 byte aligned */ static inline void swap_ssse3(char * values, __m128i mask) { __m128i v = _mm_load_si128((__m128i *)values); __m128i s = _mm_shuffle_epi8(v, mask); _mm_store_si128((__m128i*)values, s); } #endif #ifdef __SSE2__ #include /* swap 8 shorts, values must be 16 byte aligned * faster than ssse3 variant for shorts */ static inline void swap2_sse2(char * values) { __m128i r1 = _mm_load_si128((__m128i *)values); __m128i r2 = r1; r1 = _mm_srli_epi16(r1, 8); r2 = _mm_slli_epi16(r2, 8); r1 = _mm_or_si128(r1, r2); _mm_store_si128((__m128i*)values, r1); } /* the three shuffles required for 4 and 8 byte variants make * SSE2 slower than bswap */ /* get number of elements to peel to reach alignment */ static inline size_t get_peel(void * addr, size_t esize, size_t nvals, size_t alignment) { const size_t offset = (size_t)addr % alignment; size_t peel = offset ? (alignment - offset) / esize : 0; peel = nvals < peel ? nvals : peel; return peel; } #endif /*--------------------------------------------------------------------------*/ static void ffswap2_slow(short *svalues, long nvals) { register long ii; unsigned short * usvalues; usvalues = (unsigned short *) svalues; for (ii = 0; ii < nvals; ii++) { usvalues[ii] = (usvalues[ii]>>8) | (usvalues[ii]<<8); } } /*--------------------------------------------------------------------------*/ #if __SSE2__ void ffswap2(short *svalues, /* IO - pointer to shorts to be swapped */ long nvals) /* I - number of shorts to be swapped */ /* swap the bytes in the input short integers: ( 0 1 -> 1 0 ) */ { if ((long)svalues % 2 != 0) { /* should not happen */ ffswap2_slow(svalues, nvals); return; } long ii; size_t peel = get_peel((void*)&svalues[0], sizeof(svalues[0]), nvals, 16); ffswap2_slow(svalues, peel); for (ii = peel; ii < (nvals - peel - (nvals - peel) % 8); ii+=8) { swap2_sse2((char*)&svalues[ii]); } ffswap2_slow(&svalues[ii], nvals - ii); } #else void ffswap2(short *svalues, /* IO - pointer to shorts to be swapped */ long nvals) /* I - number of shorts to be swapped */ /* swap the bytes in the input 4-byte integer: ( 0 1 2 3 -> 3 2 1 0 ) */ { ffswap2_slow(svalues, nvals); } #endif /*--------------------------------------------------------------------------*/ static void ffswap4_slow(INT32BIT *ivalues, long nvals) { register long ii; #if defined(HAVE_BSWAP) for (ii = 0; ii < nvals; ii++) { ivalues[ii] = __builtin_bswap32(ivalues[ii]); } #elif defined(_MSC_VER) && (_MSC_VER >= 1400) /* intrinsic byte swapping function in Microsoft Visual C++ 8.0 and later */ unsigned int* uivalues = (unsigned int *) ivalues; /* intrinsic byte swapping function in Microsoft Visual C++ */ for (ii = 0; ii < nvals; ii++) { uivalues[ii] = _byteswap_ulong(uivalues[ii]); } #else char *cvalues, tmp; for (ii = 0; ii < nvals; ii++) { cvalues = (char *)&ivalues[ii]; tmp = cvalues[0]; cvalues[0] = cvalues[3]; cvalues[3] = tmp; tmp = cvalues[1]; cvalues[1] = cvalues[2]; cvalues[2] = tmp; } #endif } /*--------------------------------------------------------------------------*/ #ifdef __SSSE3__ void ffswap4(INT32BIT *ivalues, /* IO - pointer to INT*4 to be swapped */ long nvals) /* I - number of floats to be swapped */ /* swap the bytes in the input 4-byte integer: ( 0 1 2 3 -> 3 2 1 0 ) */ { if ((long)ivalues % 4 != 0) { /* should not happen */ ffswap4_slow(ivalues, nvals); return; } long ii; const __m128i cmask4 = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2 ,3); size_t peel = get_peel((void*)&ivalues[0], sizeof(ivalues[0]), nvals, 16); ffswap4_slow(ivalues, peel); for (ii = peel; ii < (nvals - peel - (nvals - peel) % 4); ii+=4) { swap_ssse3((char*)&ivalues[ii], cmask4); } ffswap4_slow(&ivalues[ii], nvals - ii); } #else void ffswap4(INT32BIT *ivalues, /* IO - pointer to INT*4 to be swapped */ long nvals) /* I - number of floats to be swapped */ /* swap the bytes in the input 4-byte integer: ( 0 1 2 3 -> 3 2 1 0 ) */ { ffswap4_slow(ivalues, nvals); } #endif /*--------------------------------------------------------------------------*/ static void ffswap8_slow(double *dvalues, long nvals) { register long ii; #ifdef HAVE_BSWAP LONGLONG * llvalues = (LONGLONG*)dvalues; for (ii = 0; ii < nvals; ii++) { llvalues[ii] = __builtin_bswap64(llvalues[ii]); } #elif defined(_MSC_VER) && (_MSC_VER >= 1400) /* intrinsic byte swapping function in Microsoft Visual C++ 8.0 and later */ unsigned __int64 * llvalues = (unsigned __int64 *) dvalues; for (ii = 0; ii < nvals; ii++) { llvalues[ii] = _byteswap_uint64(llvalues[ii]); } #else register char *cvalues; register char temp; cvalues = (char *) dvalues; /* copy the pointer value */ for (ii = 0; ii < nvals*8; ii += 8) { temp = cvalues[ii]; cvalues[ii] = cvalues[ii+7]; cvalues[ii+7] = temp; temp = cvalues[ii+1]; cvalues[ii+1] = cvalues[ii+6]; cvalues[ii+6] = temp; temp = cvalues[ii+2]; cvalues[ii+2] = cvalues[ii+5]; cvalues[ii+5] = temp; temp = cvalues[ii+3]; cvalues[ii+3] = cvalues[ii+4]; cvalues[ii+4] = temp; } #endif } /*--------------------------------------------------------------------------*/ #ifdef __SSSE3__ void ffswap8(double *dvalues, /* IO - pointer to doubles to be swapped */ long nvals) /* I - number of doubles to be swapped */ /* swap the bytes in the input doubles: ( 01234567 -> 76543210 ) */ { if ((long)dvalues % 8 != 0) { /* should not happen on amd64 */ ffswap8_slow(dvalues, nvals); return; } long ii; const __m128i cmask8 = _mm_set_epi8(8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2 ,3, 4, 5, 6, 7); size_t peel = get_peel((void*)&dvalues[0], sizeof(dvalues[0]), nvals, 16); ffswap8_slow(dvalues, peel); for (ii = peel; ii < (nvals - peel - (nvals - peel) % 2); ii+=2) { swap_ssse3((char*)&dvalues[ii], cmask8); } ffswap8_slow(&dvalues[ii], nvals - ii); } #else void ffswap8(double *dvalues, /* IO - pointer to doubles to be swapped */ long nvals) /* I - number of doubles to be swapped */ /* swap the bytes in the input doubles: ( 01234567 -> 76543210 ) */ { ffswap8_slow(dvalues, nvals); } #endif astropy-1.1.1/cextern/cfitsio/zutil.c0000644001134200020070000001620012602615520020540 0ustar embrayscience00000000000000/* zutil.c -- target dependent utility functions for the compression library * Copyright (C) 1995-2005, 2010 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ #include "zutil.h" #ifndef NO_DUMMY_DECL struct internal_state {int dummy;}; /* for buggy compilers */ #endif const char * const z_errmsg[10] = { "need dictionary", /* Z_NEED_DICT 2 */ "stream end", /* Z_STREAM_END 1 */ "", /* Z_OK 0 */ "file error", /* Z_ERRNO (-1) */ "stream error", /* Z_STREAM_ERROR (-2) */ "data error", /* Z_DATA_ERROR (-3) */ "insufficient memory", /* Z_MEM_ERROR (-4) */ "buffer error", /* Z_BUF_ERROR (-5) */ "incompatible version",/* Z_VERSION_ERROR (-6) */ ""}; const char * ZEXPORT zlibVersion() { return ZLIB_VERSION; } uLong ZEXPORT zlibCompileFlags() { uLong flags; flags = 0; switch ((int)(sizeof(uInt))) { case 2: break; case 4: flags += 1; break; case 8: flags += 2; break; default: flags += 3; } switch ((int)(sizeof(uLong))) { case 2: break; case 4: flags += 1 << 2; break; case 8: flags += 2 << 2; break; default: flags += 3 << 2; } switch ((int)(sizeof(voidpf))) { case 2: break; case 4: flags += 1 << 4; break; case 8: flags += 2 << 4; break; default: flags += 3 << 4; } switch ((int)(sizeof(z_off_t))) { case 2: break; case 4: flags += 1 << 6; break; case 8: flags += 2 << 6; break; default: flags += 3 << 6; } #ifdef DEBUG flags += 1 << 8; #endif #if defined(ASMV) || defined(ASMINF) flags += 1 << 9; #endif #ifdef ZLIB_WINAPI flags += 1 << 10; #endif #ifdef BUILDFIXED flags += 1 << 12; #endif #ifdef DYNAMIC_CRC_TABLE flags += 1 << 13; #endif #ifdef NO_GZCOMPRESS flags += 1L << 16; #endif #ifdef NO_GZIP flags += 1L << 17; #endif #ifdef PKZIP_BUG_WORKAROUND flags += 1L << 20; #endif #ifdef FASTEST flags += 1L << 21; #endif #ifdef STDC # ifdef NO_vsnprintf flags += 1L << 25; # ifdef HAS_vsprintf_void flags += 1L << 26; # endif # else # ifdef HAS_vsnprintf_void flags += 1L << 26; # endif # endif #else flags += 1L << 24; # ifdef NO_snprintf flags += 1L << 25; # ifdef HAS_sprintf_void flags += 1L << 26; # endif # else # ifdef HAS_snprintf_void flags += 1L << 26; # endif # endif #endif return flags; } #ifdef DEBUG # ifndef verbose # define verbose 0 # endif int ZLIB_INTERNAL z_verbose = verbose; void ZLIB_INTERNAL z_error (m) char *m; { fprintf(stderr, "%s\n", m); exit(1); } #endif /* exported to allow conversion of error code to string for compress() and * uncompress() */ const char * ZEXPORT zError(err) int err; { return ERR_MSG(err); } #if defined(_WIN32_WCE) /* The Microsoft C Run-Time Library for Windows CE doesn't have * errno. We define it as a global variable to simplify porting. * Its value is always 0 and should not be used. */ int errno = 0; #endif #ifndef HAVE_MEMCPY void ZLIB_INTERNAL zmemcpy(dest, source, len) Bytef* dest; const Bytef* source; uInt len; { if (len == 0) return; do { *dest++ = *source++; /* ??? to be unrolled */ } while (--len != 0); } int ZLIB_INTERNAL zmemcmp(s1, s2, len) const Bytef* s1; const Bytef* s2; uInt len; { uInt j; for (j = 0; j < len; j++) { if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1; } return 0; } void ZLIB_INTERNAL zmemzero(dest, len) Bytef* dest; uInt len; { if (len == 0) return; do { *dest++ = 0; /* ??? to be unrolled */ } while (--len != 0); } #endif #ifdef SYS16BIT #ifdef __TURBOC__ /* Turbo C in 16-bit mode */ # define MY_ZCALLOC /* Turbo C malloc() does not allow dynamic allocation of 64K bytes * and farmalloc(64K) returns a pointer with an offset of 8, so we * must fix the pointer. Warning: the pointer must be put back to its * original form in order to free it, use zcfree(). */ #define MAX_PTR 10 /* 10*64K = 640K */ local int next_ptr = 0; typedef struct ptr_table_s { voidpf org_ptr; voidpf new_ptr; } ptr_table; local ptr_table table[MAX_PTR]; /* This table is used to remember the original form of pointers * to large buffers (64K). Such pointers are normalized with a zero offset. * Since MSDOS is not a preemptive multitasking OS, this table is not * protected from concurrent access. This hack doesn't work anyway on * a protected system like OS/2. Use Microsoft C instead. */ voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size) { voidpf buf = opaque; /* just to make some compilers happy */ ulg bsize = (ulg)items*size; /* If we allocate less than 65520 bytes, we assume that farmalloc * will return a usable pointer which doesn't have to be normalized. */ if (bsize < 65520L) { buf = farmalloc(bsize); if (*(ush*)&buf != 0) return buf; } else { buf = farmalloc(bsize + 16L); } if (buf == NULL || next_ptr >= MAX_PTR) return NULL; table[next_ptr].org_ptr = buf; /* Normalize the pointer to seg:0 */ *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4; *(ush*)&buf = 0; table[next_ptr++].new_ptr = buf; return buf; } void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) { int n; if (*(ush*)&ptr != 0) { /* object < 64K */ farfree(ptr); return; } /* Find the original pointer */ for (n = 0; n < next_ptr; n++) { if (ptr != table[n].new_ptr) continue; farfree(table[n].org_ptr); while (++n < next_ptr) { table[n-1] = table[n]; } next_ptr--; return; } ptr = opaque; /* just to make some compilers happy */ Assert(0, "zcfree: ptr not found"); } #endif /* __TURBOC__ */ #ifdef M_I86 /* Microsoft C in 16-bit mode */ # define MY_ZCALLOC #if (!defined(_MSC_VER) || (_MSC_VER <= 600)) # define _halloc halloc # define _hfree hfree #endif voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size) { if (opaque) opaque = 0; /* to make compiler happy */ return _halloc((long)items, size); } void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) { if (opaque) opaque = 0; /* to make compiler happy */ _hfree(ptr); } #endif /* M_I86 */ #endif /* SYS16BIT */ #ifndef MY_ZCALLOC /* Any system without a special alloc function */ #ifndef STDC extern voidp malloc OF((uInt size)); extern voidp calloc OF((uInt items, uInt size)); extern void free OF((voidpf ptr)); #endif voidpf ZLIB_INTERNAL zcalloc (opaque, items, size) voidpf opaque; unsigned items; unsigned size; { if (opaque) items += size - size; /* make compiler happy */ return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : (voidpf)calloc(items, size); } void ZLIB_INTERNAL zcfree (opaque, ptr) voidpf opaque; voidpf ptr; { free(ptr); if (opaque) return; /* make compiler happy */ } #endif /* MY_ZCALLOC */ astropy-1.1.1/cextern/trim_wcslib.sh0000755001134200020070000000042512602615516020451 0ustar embrayscience00000000000000#!/bin/sh # This script should be run every time wcslib is updated. # This removes extra large files from wcslib that aren't needed. rm -rf wcslib/C/test rm -rf wcslib/doxygen rm -rf wcslib/Fortran rm -rf wcslib/html rm -rf wcslib/pgsbox rm -rf wcslib/utils rm wcslib/*.pdf astropy-1.1.1/cextern/erfa/0000755001134200020070000000000012644022135016503 5ustar embrayscience00000000000000astropy-1.1.1/cextern/erfa/cal2jd.c0000644001134200020070000001257512640262015020017 0ustar embrayscience00000000000000#include "erfa.h" int eraCal2jd(int iy, int im, int id, double *djm0, double *djm) /* ** - - - - - - - - - - ** e r a C a l 2 j d ** - - - - - - - - - - ** ** Gregorian Calendar to Julian Date. ** ** Given: ** iy,im,id int year, month, day in Gregorian calendar (Note 1) ** ** Returned: ** djm0 double MJD zero-point: always 2400000.5 ** djm double Modified Julian Date for 0 hrs ** ** Returned (function value): ** int status: ** 0 = OK ** -1 = bad year (Note 3: JD not computed) ** -2 = bad month (JD not computed) ** -3 = bad day (JD computed) ** ** Notes: ** ** 1) The algorithm used is valid from -4800 March 1, but this ** implementation rejects dates before -4799 January 1. ** ** 2) The Julian Date is returned in two pieces, in the usual ERFA ** manner, which is designed to preserve time resolution. The ** Julian Date is available as a single number by adding djm0 and ** djm. ** ** 3) In early eras the conversion is from the "Proleptic Gregorian ** Calendar"; no account is taken of the date(s) of adoption of ** the Gregorian Calendar, nor is the AD/BC numbering convention ** observed. ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992), ** Section 12.92 (p604). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int j, ly, my; long iypmy; /* Earliest year allowed (4800BC) */ const int IYMIN = -4799; /* Month lengths in days */ static const int mtab[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; /* Preset status. */ j = 0; /* Validate year and month. */ if (iy < IYMIN) return -1; if (im < 1 || im > 12) return -2; /* If February in a leap year, 1, otherwise 0. */ ly = ((im == 2) && !(iy%4) && (iy%100 || !(iy%400))); /* Validate day, taking into account leap years. */ if ( (id < 1) || (id > (mtab[im-1] + ly))) j = -3; /* Return result. */ my = (im - 14) / 12; iypmy = (long) (iy + my); *djm0 = ERFA_DJM0; *djm = (double)((1461L * (iypmy + 4800L)) / 4L + (367L * (long) (im - 2 - 12 * my)) / 12L - (3L * ((iypmy + 4900L) / 100L)) / 4L + (long) id - 2432076L); /* Return status. */ return j; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pvm.c0000644001134200020070000000701312640262015017451 0ustar embrayscience00000000000000#include "erfa.h" void eraPvm(double pv[2][3], double *r, double *s) /* ** - - - - - - - ** e r a P v m ** - - - - - - - ** ** Modulus of pv-vector. ** ** Given: ** pv double[2][3] pv-vector ** ** Returned: ** r double modulus of position component ** s double modulus of velocity component ** ** Called: ** eraPm modulus of p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Distance. */ *r = eraPm(pv[0]); /* Speed. */ *s = eraPm(pv[1]); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/jd2cal.c0000644001134200020070000001323012640262015020004 0ustar embrayscience00000000000000#include "erfa.h" int eraJd2cal(double dj1, double dj2, int *iy, int *im, int *id, double *fd) /* ** - - - - - - - - - - ** e r a J d 2 c a l ** - - - - - - - - - - ** ** Julian Date to Gregorian year, month, day, and fraction of a day. ** ** Given: ** dj1,dj2 double Julian Date (Notes 1, 2) ** ** Returned (arguments): ** iy int year ** im int month ** id int day ** fd double fraction of day ** ** Returned (function value): ** int status: ** 0 = OK ** -1 = unacceptable date (Note 3) ** ** Notes: ** ** 1) The earliest valid date is -68569.5 (-4900 March 1). The ** largest value accepted is 1e9. ** ** 2) The Julian Date is apportioned in any convenient way between ** the arguments dj1 and dj2. For example, JD=2450123.7 could ** be expressed in any of these ways, among others: ** ** dj1 dj2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** 3) In early eras the conversion is from the "proleptic Gregorian ** calendar"; no account is taken of the date(s) of adoption of ** the Gregorian calendar, nor is the AD/BC numbering convention ** observed. ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992), ** Section 12.92 (p604). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Minimum and maximum allowed JD */ const double DJMIN = -68569.5; const double DJMAX = 1e9; long jd, l, n, i, k; double dj, d1, d2, f1, f2, f, d; /* Verify date is acceptable. */ dj = dj1 + dj2; if (dj < DJMIN || dj > DJMAX) return -1; /* Copy the date, big then small, and re-align to midnight. */ if (dj1 >= dj2) { d1 = dj1; d2 = dj2; } else { d1 = dj2; d2 = dj1; } d2 -= 0.5; /* Separate day and fraction. */ f1 = fmod(d1, 1.0); f2 = fmod(d2, 1.0); f = fmod(f1 + f2, 1.0); if (f < 0.0) f += 1.0; d = floor(d1 - f1) + floor(d2 - f2) + floor(f1 + f2 - f); jd = (long) floor(d) + 1L; /* Express day in Gregorian calendar. */ l = jd + 68569L; n = (4L * l) / 146097L; l -= (146097L * n + 3L) / 4L; i = (4000L * (l + 1L)) / 1461001L; l -= (1461L * i) / 4L - 31L; k = (80L * l) / 2447L; *id = (int) (l - (2447L * k) / 80L); l = k / 11L; *im = (int) (k + 2L - 12L * l); *iy = (int) (100L * (n - 49L) + i + l); *fd = f; return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/rxp.c0000644001134200020070000000735312640262015017467 0ustar embrayscience00000000000000#include "erfa.h" void eraRxp(double r[3][3], double p[3], double rp[3]) /* ** - - - - - - - ** e r a R x p ** - - - - - - - ** ** Multiply a p-vector by an r-matrix. ** ** Given: ** r double[3][3] r-matrix ** p double[3] p-vector ** ** Returned: ** rp double[3] r * p ** ** Note: ** It is permissible for p and rp to be the same array. ** ** Called: ** eraCp copy p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double w, wrp[3]; int i, j; /* Matrix r * vector p. */ for (j = 0; j < 3; j++) { w = 0.0; for (i = 0; i < 3; i++) { w += r[j][i] * p[i]; } wrp[j] = w; } /* Return the result. */ eraCp(wrp, rp); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/apio13.c0000644001134200020070000002616312640262015017752 0ustar embrayscience00000000000000#include "erfa.h" int eraApio13(double utc1, double utc2, double dut1, double elong, double phi, double hm, double xp, double yp, double phpa, double tc, double rh, double wl, eraASTROM *astrom) /* ** - - - - - - - - - - ** e r a A p i o 1 3 ** - - - - - - - - - - ** ** For a terrestrial observer, prepare star-independent astrometry ** parameters for transformations between CIRS and observed ** coordinates. The caller supplies UTC, site coordinates, ambient air ** conditions and observing wavelength. ** ** Given: ** utc1 double UTC as a 2-part... ** utc2 double ...quasi Julian Date (Notes 1,2) ** dut1 double UT1-UTC (seconds) ** elong double longitude (radians, east +ve, Note 3) ** phi double geodetic latitude (radians, Note 3) ** hm double height above ellipsoid (m, geodetic Notes 4,6) ** xp,yp double polar motion coordinates (radians, Note 5) ** phpa double pressure at the observer (hPa = mB, Note 6) ** tc double ambient temperature at the observer (deg C) ** rh double relative humidity at the observer (range 0-1) ** wl double wavelength (micrometers, Note 7) ** ** Returned: ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double unchanged ** eb double[3] unchanged ** eh double[3] unchanged ** em double unchanged ** v double[3] unchanged ** bm1 double unchanged ** bpn double[3][3] unchanged ** along double longitude + s' (radians) ** xpl double polar motion xp wrt local meridian (radians) ** ypl double polar motion yp wrt local meridian (radians) ** sphi double sine of geodetic latitude ** cphi double cosine of geodetic latitude ** diurab double magnitude of diurnal aberration vector ** eral double "local" Earth rotation angle (radians) ** refa double refraction constant A (radians) ** refb double refraction constant B (radians) ** ** Returned (function value): ** int status: +1 = dubious year (Note 2) ** 0 = OK ** -1 = unacceptable date ** ** Notes: ** ** 1) utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any ** convenient way between the two arguments, for example where utc1 ** is the Julian Day Number and utc2 is the fraction of a day. ** ** However, JD cannot unambiguously represent UTC during a leap ** second unless special measures are taken. The convention in the ** present function is that the JD day represents UTC days whether ** the length is 86399, 86400 or 86401 SI seconds. ** ** Applications should use the function eraDtf2d to convert from ** calendar date and time of day into 2-part quasi Julian Date, as ** it implements the leap-second-ambiguity convention just ** described. ** ** 2) The warning status "dubious year" flags UTCs that predate the ** introduction of the time scale or that are too far in the future ** to be trusted. See eraDat for further details. ** ** 3) UT1-UTC is tabulated in IERS bulletins. It increases by exactly ** one second at the end of each positive UTC leap second, ** introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This ** practice is under review, and in the future UT1-UTC may grow ** essentially without limit. ** ** 4) The geographical coordinates are with respect to the ERFA_WGS84 ** reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the ** longitude required by the present function is east-positive ** (i.e. right-handed), in accordance with geographical convention. ** ** 5) The polar motion xp,yp can be obtained from IERS bulletins. The ** values are the coordinates (in radians) of the Celestial ** Intermediate Pole with respect to the International Terrestrial ** Reference System (see IERS Conventions 2003), measured along the ** meridians 0 and 90 deg west respectively. For many applications, ** xp and yp can be set to zero. ** ** Internally, the polar motion is stored in a form rotated onto ** the local meridian. ** ** 6) If hm, the height above the ellipsoid of the observing station ** in meters, is not known but phpa, the pressure in hPa (=mB), is ** available, an adequate estimate of hm can be obtained from the ** expression ** ** hm = -29.3 * tsl * log ( phpa / 1013.25 ); ** ** where tsl is the approximate sea-level air temperature in K ** (See Astrophysical Quantities, C.W.Allen, 3rd edition, section ** 52). Similarly, if the pressure phpa is not known, it can be ** estimated from the height of the observing station, hm, as ** follows: ** ** phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) ); ** ** Note, however, that the refraction is nearly proportional to the ** pressure and that an accurate phpa value is important for ** precise work. ** ** 7) The argument wl specifies the observing wavelength in ** micrometers. The transition from optical to radio is assumed to ** occur at 100 micrometers (about 3000 GHz). ** ** 8) It is advisable to take great care with units, as even unlikely ** values of the input parameters are accepted and processed in ** accordance with the models used. ** ** 9) In cases where the caller wishes to supply his own Earth ** rotation information and refraction constants, the function ** eraApc can be used instead of the present function. ** ** 10) This is one of several functions that inserts into the astrom ** structure star-independent parameters needed for the chain of ** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. ** ** The various functions support different classes of observer and ** portions of the transformation chain: ** ** functions observer transformation ** ** eraApcg eraApcg13 geocentric ICRS <-> GCRS ** eraApci eraApci13 terrestrial ICRS <-> CIRS ** eraApco eraApco13 terrestrial ICRS <-> observed ** eraApcs eraApcs13 space ICRS <-> GCRS ** eraAper eraAper13 terrestrial update Earth rotation ** eraApio eraApio13 terrestrial CIRS <-> observed ** ** Those with names ending in "13" use contemporary ERFA models to ** compute the various ephemerides. The others accept ephemerides ** supplied by the caller. ** ** The transformation from ICRS to GCRS covers space motion, ** parallax, light deflection, and aberration. From GCRS to CIRS ** comprises frame bias and precession-nutation. From CIRS to ** observed takes account of Earth rotation, polar motion, diurnal ** aberration and parallax (unless subsumed into the ICRS <-> GCRS ** transformation), and atmospheric refraction. ** ** 11) The context structure astrom produced by this function is used ** by eraAtioq and eraAtoiq. ** ** Called: ** eraUtctai UTC to TAI ** eraTaitt TAI to TT ** eraUtcut1 UTC to UT1 ** eraSp00 the TIO locator s', IERS 2000 ** eraEra00 Earth rotation angle, IAU 2000 ** eraRefco refraction constants for given ambient conditions ** eraApio astrometry parameters, CIRS-observed ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int j; double tai1, tai2, tt1, tt2, ut11, ut12, sp, theta, refa, refb; /* UTC to other time scales. */ j = eraUtctai(utc1, utc2, &tai1, &tai2); if ( j < 0 ) return -1; j = eraTaitt(tai1, tai2, &tt1, &tt2); j = eraUtcut1(utc1, utc2, dut1, &ut11, &ut12); if ( j < 0 ) return -1; /* TIO locator s'. */ sp = eraSp00(tt1, tt2); /* Earth rotation angle. */ theta = eraEra00(ut11, ut12); /* Refraction constants A and B. */ eraRefco(phpa, tc, rh, wl, &refa, &refb); /* CIRS <-> observed astrometry parameters. */ eraApio(sp, theta, elong, phi, hm, xp, yp, refa, refb, astrom); /* Return any warning status. */ return j; /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/starpv.c0000644001134200020070000002442012640262015020167 0ustar embrayscience00000000000000#include "erfa.h" int eraStarpv(double ra, double dec, double pmr, double pmd, double px, double rv, double pv[2][3]) /* ** - - - - - - - - - - ** e r a S t a r p v ** - - - - - - - - - - ** ** Convert star catalog coordinates to position+velocity vector. ** ** Given (Note 1): ** ra double right ascension (radians) ** dec double declination (radians) ** pmr double RA proper motion (radians/year) ** pmd double Dec proper motion (radians/year) ** px double parallax (arcseconds) ** rv double radial velocity (km/s, positive = receding) ** ** Returned (Note 2): ** pv double[2][3] pv-vector (AU, AU/day) ** ** Returned (function value): ** int status: ** 0 = no warnings ** 1 = distance overridden (Note 6) ** 2 = excessive speed (Note 7) ** 4 = solution didn't converge (Note 8) ** else = binary logical OR of the above ** ** Notes: ** ** 1) The star data accepted by this function are "observables" for an ** imaginary observer at the solar-system barycenter. Proper motion ** and radial velocity are, strictly, in terms of barycentric ** coordinate time, TCB. For most practical applications, it is ** permissible to neglect the distinction between TCB and ordinary ** "proper" time on Earth (TT/TAI). The result will, as a rule, be ** limited by the intrinsic accuracy of the proper-motion and ** radial-velocity data; moreover, the pv-vector is likely to be ** merely an intermediate result, so that a change of time unit ** would cancel out overall. ** ** In accordance with normal star-catalog conventions, the object's ** right ascension and declination are freed from the effects of ** secular aberration. The frame, which is aligned to the catalog ** equator and equinox, is Lorentzian and centered on the SSB. ** ** 2) The resulting position and velocity pv-vector is with respect to ** the same frame and, like the catalog coordinates, is freed from ** the effects of secular aberration. Should the "coordinate ** direction", where the object was located at the catalog epoch, be ** required, it may be obtained by calculating the magnitude of the ** position vector pv[0][0-2] dividing by the speed of light in ** AU/day to give the light-time, and then multiplying the space ** velocity pv[1][0-2] by this light-time and adding the result to ** pv[0][0-2]. ** ** Summarizing, the pv-vector returned is for most stars almost ** identical to the result of applying the standard geometrical ** "space motion" transformation. The differences, which are the ** subject of the Stumpff paper referenced below, are: ** ** (i) In stars with significant radial velocity and proper motion, ** the constantly changing light-time distorts the apparent proper ** motion. Note that this is a classical, not a relativistic, ** effect. ** ** (ii) The transformation complies with special relativity. ** ** 3) Care is needed with units. The star coordinates are in radians ** and the proper motions in radians per Julian year, but the ** parallax is in arcseconds; the radial velocity is in km/s, but ** the pv-vector result is in AU and AU/day. ** ** 4) The RA proper motion is in terms of coordinate angle, not true ** angle. If the catalog uses arcseconds for both RA and Dec proper ** motions, the RA proper motion will need to be divided by cos(Dec) ** before use. ** ** 5) Straight-line motion at constant speed, in the inertial frame, ** is assumed. ** ** 6) An extremely small (or zero or negative) parallax is interpreted ** to mean that the object is on the "celestial sphere", the radius ** of which is an arbitrary (large) value (see the constant PXMIN). ** When the distance is overridden in this way, the status, ** initially zero, has 1 added to it. ** ** 7) If the space velocity is a significant fraction of c (see the ** constant VMAX), it is arbitrarily set to zero. When this action ** occurs, 2 is added to the status. ** ** 8) The relativistic adjustment involves an iterative calculation. ** If the process fails to converge within a set number (IMAX) of ** iterations, 4 is added to the status. ** ** 9) The inverse transformation is performed by the function ** eraPvstar. ** ** Called: ** eraS2pv spherical coordinates to pv-vector ** eraPm modulus of p-vector ** eraZp zero p-vector ** eraPn decompose p-vector into modulus and direction ** eraPdp scalar product of two p-vectors ** eraSxp multiply p-vector by scalar ** eraPmp p-vector minus p-vector ** eraPpp p-vector plus p-vector ** ** Reference: ** ** Stumpff, P., 1985, Astron.Astrophys. 144, 232-240. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Smallest allowed parallax */ static const double PXMIN = 1e-7; /* Largest allowed speed (fraction of c) */ static const double VMAX = 0.5; /* Maximum number of iterations for relativistic solution */ static const int IMAX = 100; int i, iwarn; double w, r, rd, rad, decd, v, x[3], usr[3], ust[3], vsr, vst, betst, betsr, bett, betr, dd, ddel, ur[3], ut[3], d = 0.0, del = 0.0, /* to prevent */ odd = 0.0, oddel = 0.0, /* compiler */ od = 0.0, odel = 0.0; /* warnings */ /* Distance (AU). */ if (px >= PXMIN) { w = px; iwarn = 0; } else { w = PXMIN; iwarn = 1; } r = ERFA_DR2AS / w; /* Radial velocity (AU/day). */ rd = ERFA_DAYSEC * rv * 1e3 / ERFA_DAU; /* Proper motion (radian/day). */ rad = pmr / ERFA_DJY; decd = pmd / ERFA_DJY; /* To pv-vector (AU,AU/day). */ eraS2pv(ra, dec, r, rad, decd, rd, pv); /* If excessive velocity, arbitrarily set it to zero. */ v = eraPm(pv[1]); if (v / ERFA_DC > VMAX) { eraZp(pv[1]); iwarn += 2; } /* Isolate the radial component of the velocity (AU/day). */ eraPn(pv[0], &w, x); vsr = eraPdp(x, pv[1]); eraSxp(vsr, x, usr); /* Isolate the transverse component of the velocity (AU/day). */ eraPmp(pv[1], usr, ust); vst = eraPm(ust); /* Special-relativity dimensionless parameters. */ betsr = vsr / ERFA_DC; betst = vst / ERFA_DC; /* Determine the inertial-to-observed relativistic correction terms. */ bett = betst; betr = betsr; for (i = 0; i < IMAX; i++) { d = 1.0 + betr; del = sqrt(1.0 - betr*betr - bett*bett) - 1.0; betr = d * betsr + del; bett = d * betst; if (i > 0) { dd = fabs(d - od); ddel = fabs(del - odel); if ((i > 1) && (dd >= odd) && (ddel >= oddel)) break; odd = dd; oddel = ddel; } od = d; odel = del; } if (i >= IMAX) iwarn += 4; /* Replace observed radial velocity with inertial value. */ w = (betsr != 0.0) ? d + del / betsr : 1.0; eraSxp(w, usr, ur); /* Replace observed tangential velocity with inertial value. */ eraSxp(d, ust, ut); /* Combine the two to obtain the inertial space velocity. */ eraPpp(ur, ut, pv[1]); /* Return the status. */ return iwarn; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/anp.c0000644001134200020070000000663612640262015017437 0ustar embrayscience00000000000000#include "erfa.h" double eraAnp(double a) /* ** - - - - - - - ** e r a A n p ** - - - - - - - ** ** Normalize angle into the range 0 <= a < 2pi. ** ** Given: ** a double angle (radians) ** ** Returned (function value): ** double angle in range 0-2pi ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double w; w = fmod(a, ERFA_D2PI); if (w < 0) w += ERFA_D2PI; return w; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ry.c0000644001134200020070000001042112640262015017276 0ustar embrayscience00000000000000#include "erfa.h" void eraRy(double theta, double r[3][3]) /* ** - - - - - - ** e r a R y ** - - - - - - ** ** Rotate an r-matrix about the y-axis. ** ** Given: ** theta double angle (radians) ** ** Given and returned: ** r double[3][3] r-matrix, rotated ** ** Notes: ** ** 1) Calling this function with positive theta incorporates in the ** supplied r-matrix r an additional rotation, about the y-axis, ** anticlockwise as seen looking towards the origin from positive y. ** ** 2) The additional rotation can be represented by this matrix: ** ** ( + cos(theta) 0 - sin(theta) ) ** ( ) ** ( 0 1 0 ) ** ( ) ** ( + sin(theta) 0 + cos(theta) ) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double s, c, a00, a01, a02, a20, a21, a22; s = sin(theta); c = cos(theta); a00 = c*r[0][0] - s*r[2][0]; a01 = c*r[0][1] - s*r[2][1]; a02 = c*r[0][2] - s*r[2][2]; a20 = s*r[0][0] + c*r[2][0]; a21 = s*r[0][1] + c*r[2][1]; a22 = s*r[0][2] + c*r[2][2]; r[0][0] = a00; r[0][1] = a01; r[0][2] = a02; r[2][0] = a20; r[2][1] = a21; r[2][2] = a22; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/nut00b.c0000644001134200020070000004234512640262015017766 0ustar embrayscience00000000000000#include "erfa.h" void eraNut00b(double date1, double date2, double *dpsi, double *deps) /* ** - - - - - - - - - - ** e r a N u t 0 0 b ** - - - - - - - - - - ** ** Nutation, IAU 2000B model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** dpsi,deps double nutation, luni-solar + planetary (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The nutation components in longitude and obliquity are in radians ** and with respect to the equinox and ecliptic of date. The ** obliquity at J2000.0 is assumed to be the Lieske et al. (1977) ** value of 84381.448 arcsec. (The errors that result from using ** this function with the IAU 2006 value of 84381.406 arcsec can be ** neglected.) ** ** The nutation model consists only of luni-solar terms, but ** includes also a fixed offset which compensates for certain long- ** period planetary terms (Note 7). ** ** 3) This function is an implementation of the IAU 2000B abridged ** nutation model formally adopted by the IAU General Assembly in ** 2000. The function computes the MHB_2000_SHORT luni-solar ** nutation series (Luzum 2001), but without the associated ** corrections for the precession rate adjustments and the offset ** between the GCRS and J2000.0 mean poles. ** ** 4) The full IAU 2000A (MHB2000) nutation model contains nearly 1400 ** terms. The IAU 2000B model (McCarthy & Luzum 2003) contains only ** 77 terms, plus additional simplifications, yet still delivers ** results of 1 mas accuracy at present epochs. This combination of ** accuracy and size makes the IAU 2000B abridged nutation model ** suitable for most practical applications. ** ** The function delivers a pole accurate to 1 mas from 1900 to 2100 ** (usually better than 1 mas, very occasionally just outside ** 1 mas). The full IAU 2000A model, which is implemented in the ** function eraNut00a (q.v.), delivers considerably greater accuracy ** at current dates; however, to realize this improved accuracy, ** corrections for the essentially unpredictable free-core-nutation ** (FCN) must also be included. ** ** 5) The present function provides classical nutation. The ** MHB_2000_SHORT algorithm, from which it is adapted, deals also ** with (i) the offsets between the GCRS and mean poles and (ii) the ** adjustments in longitude and obliquity due to the changed ** precession rates. These additional functions, namely frame bias ** and precession adjustments, are supported by the ERFA functions ** eraBi00 and eraPr00. ** ** 6) The MHB_2000_SHORT algorithm also provides "total" nutations, ** comprising the arithmetic sum of the frame bias, precession ** adjustments, and nutation (luni-solar + planetary). These total ** nutations can be used in combination with an existing IAU 1976 ** precession implementation, such as eraPmat76, to deliver GCRS- ** to-true predictions of mas accuracy at current epochs. However, ** for symmetry with the eraNut00a function (q.v. for the reasons), ** the ERFA functions do not generate the "total nutations" ** directly. Should they be required, they could of course easily ** be generated by calling eraBi00, eraPr00 and the present function ** and adding the results. ** ** 7) The IAU 2000B model includes "planetary bias" terms that are ** fixed in size but compensate for long-period nutations. The ** amplitudes quoted in McCarthy & Luzum (2003), namely ** Dpsi = -1.5835 mas and Depsilon = +1.6339 mas, are optimized for ** the "total nutations" method described in Note 6. The Luzum ** (2001) values used in this ERFA implementation, namely -0.135 mas ** and +0.388 mas, are optimized for the "rigorous" method, where ** frame bias, precession and nutation are applied separately and in ** that order. During the interval 1995-2050, the ERFA ** implementation delivers a maximum error of 1.001 mas (not ** including FCN). ** ** References: ** ** Lieske, J.H., Lederle, T., Fricke, W., Morando, B., "Expressions ** for the precession quantities based upon the IAU /1976/ system of ** astronomical constants", Astron.Astrophys. 58, 1-2, 1-16. (1977) ** ** Luzum, B., private communication, 2001 (Fortran code ** MHB_2000_SHORT) ** ** McCarthy, D.D. & Luzum, B.J., "An abridged model of the ** precession-nutation of the celestial pole", Cel.Mech.Dyn.Astron. ** 85, 37-49 (2003) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J., Astron.Astrophys. 282, 663-683 (1994) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t, el, elp, f, d, om, arg, dp, de, sarg, carg, dpsils, depsls, dpsipl, depspl; int i; /* Units of 0.1 microarcsecond to radians */ static const double U2R = ERFA_DAS2R / 1e7; /* ---------------------------------------- */ /* Fixed offsets in lieu of planetary terms */ /* ---------------------------------------- */ static const double DPPLAN = -0.135 * ERFA_DMAS2R; static const double DEPLAN = 0.388 * ERFA_DMAS2R; /* --------------------------------------------------- */ /* Luni-solar nutation: argument and term coefficients */ /* --------------------------------------------------- */ /* The units for the sine and cosine coefficients are */ /* 0.1 microarcsec and the same per Julian century */ static const struct { int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */ double ps,pst,pc; /* longitude sin, t*sin, cos coefficients */ double ec,ect,es; /* obliquity cos, t*cos, sin coefficients */ } x[] = { /* 1-10 */ { 0, 0, 0, 0,1, -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0}, { 0, 0, 2,-2,2, -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0}, { 0, 0, 2, 0,2,-2276413.0,-234.0, 2796.0, 978459.0,-485.0,1374.0}, { 0, 0, 0, 0,2,2074554.0, 207.0, -698.0,-897492.0, 470.0,-291.0}, { 0, 1, 0, 0,0,1475877.0,-3633.0,11817.0, 73871.0,-184.0,-1924.0}, { 0, 1, 2,-2,2,-516821.0, 1226.0, -524.0, 224386.0,-677.0,-174.0}, { 1, 0, 0, 0,0, 711159.0, 73.0, -872.0, -6750.0, 0.0, 358.0}, { 0, 0, 2, 0,1,-387298.0, -367.0, 380.0, 200728.0, 18.0, 318.0}, { 1, 0, 2, 0,2,-301461.0, -36.0, 816.0, 129025.0, -63.0, 367.0}, { 0,-1, 2,-2,2, 215829.0, -494.0, 111.0, -95929.0, 299.0, 132.0}, /* 11-20 */ { 0, 0, 2,-2,1, 128227.0, 137.0, 181.0, -68982.0, -9.0, 39.0}, {-1, 0, 2, 0,2, 123457.0, 11.0, 19.0, -53311.0, 32.0, -4.0}, {-1, 0, 0, 2,0, 156994.0, 10.0, -168.0, -1235.0, 0.0, 82.0}, { 1, 0, 0, 0,1, 63110.0, 63.0, 27.0, -33228.0, 0.0, -9.0}, {-1, 0, 0, 0,1, -57976.0, -63.0, -189.0, 31429.0, 0.0, -75.0}, {-1, 0, 2, 2,2, -59641.0, -11.0, 149.0, 25543.0, -11.0, 66.0}, { 1, 0, 2, 0,1, -51613.0, -42.0, 129.0, 26366.0, 0.0, 78.0}, {-2, 0, 2, 0,1, 45893.0, 50.0, 31.0, -24236.0, -10.0, 20.0}, { 0, 0, 0, 2,0, 63384.0, 11.0, -150.0, -1220.0, 0.0, 29.0}, { 0, 0, 2, 2,2, -38571.0, -1.0, 158.0, 16452.0, -11.0, 68.0}, /* 21-30 */ { 0,-2, 2,-2,2, 32481.0, 0.0, 0.0, -13870.0, 0.0, 0.0}, {-2, 0, 0, 2,0, -47722.0, 0.0, -18.0, 477.0, 0.0, -25.0}, { 2, 0, 2, 0,2, -31046.0, -1.0, 131.0, 13238.0, -11.0, 59.0}, { 1, 0, 2,-2,2, 28593.0, 0.0, -1.0, -12338.0, 10.0, -3.0}, {-1, 0, 2, 0,1, 20441.0, 21.0, 10.0, -10758.0, 0.0, -3.0}, { 2, 0, 0, 0,0, 29243.0, 0.0, -74.0, -609.0, 0.0, 13.0}, { 0, 0, 2, 0,0, 25887.0, 0.0, -66.0, -550.0, 0.0, 11.0}, { 0, 1, 0, 0,1, -14053.0, -25.0, 79.0, 8551.0, -2.0, -45.0}, {-1, 0, 0, 2,1, 15164.0, 10.0, 11.0, -8001.0, 0.0, -1.0}, { 0, 2, 2,-2,2, -15794.0, 72.0, -16.0, 6850.0, -42.0, -5.0}, /* 31-40 */ { 0, 0,-2, 2,0, 21783.0, 0.0, 13.0, -167.0, 0.0, 13.0}, { 1, 0, 0,-2,1, -12873.0, -10.0, -37.0, 6953.0, 0.0, -14.0}, { 0,-1, 0, 0,1, -12654.0, 11.0, 63.0, 6415.0, 0.0, 26.0}, {-1, 0, 2, 2,1, -10204.0, 0.0, 25.0, 5222.0, 0.0, 15.0}, { 0, 2, 0, 0,0, 16707.0, -85.0, -10.0, 168.0, -1.0, 10.0}, { 1, 0, 2, 2,2, -7691.0, 0.0, 44.0, 3268.0, 0.0, 19.0}, {-2, 0, 2, 0,0, -11024.0, 0.0, -14.0, 104.0, 0.0, 2.0}, { 0, 1, 2, 0,2, 7566.0, -21.0, -11.0, -3250.0, 0.0, -5.0}, { 0, 0, 2, 2,1, -6637.0, -11.0, 25.0, 3353.0, 0.0, 14.0}, { 0,-1, 2, 0,2, -7141.0, 21.0, 8.0, 3070.0, 0.0, 4.0}, /* 41-50 */ { 0, 0, 0, 2,1, -6302.0, -11.0, 2.0, 3272.0, 0.0, 4.0}, { 1, 0, 2,-2,1, 5800.0, 10.0, 2.0, -3045.0, 0.0, -1.0}, { 2, 0, 2,-2,2, 6443.0, 0.0, -7.0, -2768.0, 0.0, -4.0}, {-2, 0, 0, 2,1, -5774.0, -11.0, -15.0, 3041.0, 0.0, -5.0}, { 2, 0, 2, 0,1, -5350.0, 0.0, 21.0, 2695.0, 0.0, 12.0}, { 0,-1, 2,-2,1, -4752.0, -11.0, -3.0, 2719.0, 0.0, -3.0}, { 0, 0, 0,-2,1, -4940.0, -11.0, -21.0, 2720.0, 0.0, -9.0}, {-1,-1, 0, 2,0, 7350.0, 0.0, -8.0, -51.0, 0.0, 4.0}, { 2, 0, 0,-2,1, 4065.0, 0.0, 6.0, -2206.0, 0.0, 1.0}, { 1, 0, 0, 2,0, 6579.0, 0.0, -24.0, -199.0, 0.0, 2.0}, /* 51-60 */ { 0, 1, 2,-2,1, 3579.0, 0.0, 5.0, -1900.0, 0.0, 1.0}, { 1,-1, 0, 0,0, 4725.0, 0.0, -6.0, -41.0, 0.0, 3.0}, {-2, 0, 2, 0,2, -3075.0, 0.0, -2.0, 1313.0, 0.0, -1.0}, { 3, 0, 2, 0,2, -2904.0, 0.0, 15.0, 1233.0, 0.0, 7.0}, { 0,-1, 0, 2,0, 4348.0, 0.0, -10.0, -81.0, 0.0, 2.0}, { 1,-1, 2, 0,2, -2878.0, 0.0, 8.0, 1232.0, 0.0, 4.0}, { 0, 0, 0, 1,0, -4230.0, 0.0, 5.0, -20.0, 0.0, -2.0}, {-1,-1, 2, 2,2, -2819.0, 0.0, 7.0, 1207.0, 0.0, 3.0}, {-1, 0, 2, 0,0, -4056.0, 0.0, 5.0, 40.0, 0.0, -2.0}, { 0,-1, 2, 2,2, -2647.0, 0.0, 11.0, 1129.0, 0.0, 5.0}, /* 61-70 */ {-2, 0, 0, 0,1, -2294.0, 0.0, -10.0, 1266.0, 0.0, -4.0}, { 1, 1, 2, 0,2, 2481.0, 0.0, -7.0, -1062.0, 0.0, -3.0}, { 2, 0, 0, 0,1, 2179.0, 0.0, -2.0, -1129.0, 0.0, -2.0}, {-1, 1, 0, 1,0, 3276.0, 0.0, 1.0, -9.0, 0.0, 0.0}, { 1, 1, 0, 0,0, -3389.0, 0.0, 5.0, 35.0, 0.0, -2.0}, { 1, 0, 2, 0,0, 3339.0, 0.0, -13.0, -107.0, 0.0, 1.0}, {-1, 0, 2,-2,1, -1987.0, 0.0, -6.0, 1073.0, 0.0, -2.0}, { 1, 0, 0, 0,2, -1981.0, 0.0, 0.0, 854.0, 0.0, 0.0}, {-1, 0, 0, 1,0, 4026.0, 0.0, -353.0, -553.0, 0.0,-139.0}, { 0, 0, 2, 1,2, 1660.0, 0.0, -5.0, -710.0, 0.0, -2.0}, /* 71-77 */ {-1, 0, 2, 4,2, -1521.0, 0.0, 9.0, 647.0, 0.0, 4.0}, {-1, 1, 0, 1,1, 1314.0, 0.0, 0.0, -700.0, 0.0, 0.0}, { 0,-2, 2,-2,1, -1283.0, 0.0, 0.0, 672.0, 0.0, 0.0}, { 1, 0, 2, 2,1, -1331.0, 0.0, 8.0, 663.0, 0.0, 4.0}, {-2, 0, 2, 2,2, 1383.0, 0.0, -2.0, -594.0, 0.0, -2.0}, {-1, 0, 0, 0,2, 1405.0, 0.0, 4.0, -610.0, 0.0, 2.0}, { 1, 1, 2,-2,2, 1290.0, 0.0, 0.0, -556.0, 0.0, 0.0} }; /* Number of terms in the series */ const int NLS = (int) (sizeof x / sizeof x[0]); /*--------------------------------------------------------------------*/ /* Interval between fundamental epoch J2000.0 and given date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* --------------------*/ /* LUNI-SOLAR NUTATION */ /* --------------------*/ /* Fundamental (Delaunay) arguments from Simon et al. (1994) */ /* Mean anomaly of the Moon. */ el = fmod(485868.249036 + (1717915923.2178) * t, ERFA_TURNAS) * ERFA_DAS2R; /* Mean anomaly of the Sun. */ elp = fmod(1287104.79305 + (129596581.0481) * t, ERFA_TURNAS) * ERFA_DAS2R; /* Mean argument of the latitude of the Moon. */ f = fmod(335779.526232 + (1739527262.8478) * t, ERFA_TURNAS) * ERFA_DAS2R; /* Mean elongation of the Moon from the Sun. */ d = fmod(1072260.70369 + (1602961601.2090) * t, ERFA_TURNAS) * ERFA_DAS2R; /* Mean longitude of the ascending node of the Moon. */ om = fmod(450160.398036 + (-6962890.5431) * t, ERFA_TURNAS) * ERFA_DAS2R; /* Initialize the nutation values. */ dp = 0.0; de = 0.0; /* Summation of luni-solar nutation series (smallest terms first). */ for (i = NLS-1; i >= 0; i--) { /* Argument and functions. */ arg = fmod( (double)x[i].nl * el + (double)x[i].nlp * elp + (double)x[i].nf * f + (double)x[i].nd * d + (double)x[i].nom * om, ERFA_D2PI ); sarg = sin(arg); carg = cos(arg); /* Term. */ dp += (x[i].ps + x[i].pst * t) * sarg + x[i].pc * carg; de += (x[i].ec + x[i].ect * t) * carg + x[i].es * sarg; } /* Convert from 0.1 microarcsec units to radians. */ dpsils = dp * U2R; depsls = de * U2R; /* ------------------------------*/ /* IN LIEU OF PLANETARY NUTATION */ /* ------------------------------*/ /* Fixed offset to correct for missing terms in truncated series. */ dpsipl = DPPLAN; depspl = DEPLAN; /* --------*/ /* RESULTS */ /* --------*/ /* Add luni-solar and planetary components. */ *dpsi = dpsils + dpsipl; *deps = depsls + depspl; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/apcs.c0000644001134200020070000002254412640262015017603 0ustar embrayscience00000000000000#include "erfa.h" void eraApcs(double date1, double date2, double pv[2][3], double ebpv[2][3], double ehp[3], eraASTROM *astrom) /* ** - - - - - - - - ** e r a A p c s ** - - - - - - - - ** ** For an observer whose geocentric position and velocity are known, ** prepare star-independent astrometry parameters for transformations ** between ICRS and GCRS. The Earth ephemeris is supplied by the ** caller. ** ** The parameters produced by this function are required in the space ** motion, parallax, light deflection and aberration parts of the ** astrometric transformation chain. ** ** Given: ** date1 double TDB as a 2-part... ** date2 double ...Julian Date (Note 1) ** pv double[2][3] observer's geocentric pos/vel (m, m/s) ** ebpv double[2][3] Earth barycentric PV (au, au/day) ** ehp double[3] Earth heliocentric P (au) ** ** Returned: ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double unchanged ** xpl double unchanged ** ypl double unchanged ** sphi double unchanged ** cphi double unchanged ** diurab double unchanged ** eral double unchanged ** refa double unchanged ** refb double unchanged ** ** Notes: ** ** 1) The TDB date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TDB)=2450123.7 could be expressed in any of these ways, among ** others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 method is best matched to the way the ** argument is handled internally and will deliver the optimum ** resolution. The MJD method and the date & time methods are both ** good compromises between resolution and convenience. For most ** applications of this function the choice will not be at all ** critical. ** ** TT can be used instead of TDB without any significant impact on ** accuracy. ** ** 2) All the vectors are with respect to BCRS axes. ** ** 3) Providing separate arguments for (i) the observer's geocentric ** position and velocity and (ii) the Earth ephemeris is done for ** convenience in the geocentric, terrestrial and Earth orbit cases. ** For deep space applications it maybe more convenient to specify ** zero geocentric position and velocity and to supply the ** observer's position and velocity information directly instead of ** with respect to the Earth. However, note the different units: ** m and m/s for the geocentric vectors, au and au/day for the ** heliocentric and barycentric vectors. ** ** 4) In cases where the caller does not wish to provide the Earth ** ephemeris, the function eraApcs13 can be used instead of the ** present function. This computes the Earth ephemeris using the ** ERFA function eraEpv00. ** ** 5) This is one of several functions that inserts into the astrom ** structure star-independent parameters needed for the chain of ** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. ** ** The various functions support different classes of observer and ** portions of the transformation chain: ** ** functions observer transformation ** ** eraApcg eraApcg13 geocentric ICRS <-> GCRS ** eraApci eraApci13 terrestrial ICRS <-> CIRS ** eraApco eraApco13 terrestrial ICRS <-> observed ** eraApcs eraApcs13 space ICRS <-> GCRS ** eraAper eraAper13 terrestrial update Earth rotation ** eraApio eraApio13 terrestrial CIRS <-> observed ** ** Those with names ending in "13" use contemporary ERFA models to ** compute the various ephemerides. The others accept ephemerides ** supplied by the caller. ** ** The transformation from ICRS to GCRS covers space motion, ** parallax, light deflection, and aberration. From GCRS to CIRS ** comprises frame bias and precession-nutation. From CIRS to ** observed takes account of Earth rotation, polar motion, diurnal ** aberration and parallax (unless subsumed into the ICRS <-> GCRS ** transformation), and atmospheric refraction. ** ** 6) The context structure astrom produced by this function is used by ** eraAtciq* and eraAticq*. ** ** Called: ** eraCp copy p-vector ** eraPm modulus of p-vector ** eraPn decompose p-vector into modulus and direction ** eraIr initialize r-matrix to identity ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* au/d to m/s */ const double AUDMS = ERFA_DAU/ERFA_DAYSEC; /* Light time for 1 AU (day) */ const double CR = ERFA_AULT/ERFA_DAYSEC; int i; double dp, dv, pb[3], vb[3], ph[3], v2, w; /* Time since reference epoch, years (for proper motion calculation). */ astrom->pmt = ( (date1 - ERFA_DJ00) + date2 ) / ERFA_DJY; /* Adjust Earth ephemeris to observer. */ for (i = 0; i < 3; i++) { dp = pv[0][i] / ERFA_DAU; dv = pv[1][i] / AUDMS; pb[i] = ebpv[0][i] + dp; vb[i] = ebpv[1][i] + dv; ph[i] = ehp[i] + dp; } /* Barycentric position of observer (au). */ eraCp(pb, astrom->eb); /* Heliocentric direction and distance (unit vector and au). */ eraPn(ph, &astrom->em, astrom->eh); /* Barycentric vel. in units of c, and reciprocal of Lorenz factor. */ v2 = 0.0; for (i = 0; i < 3; i++) { w = vb[i] * CR; astrom->v[i] = w; v2 += w*w; } astrom->bm1 = sqrt(1.0 - v2); /* Reset the NPB matrix. */ eraIr(astrom->bpn); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2t00b.c0000644001134200020070000001457012640262015017647 0ustar embrayscience00000000000000#include "erfa.h" void eraC2t00b(double tta, double ttb, double uta, double utb, double xp, double yp, double rc2t[3][3]) /* ** - - - - - - - - - - ** e r a C 2 t 0 0 b ** - - - - - - - - - - ** ** Form the celestial to terrestrial matrix given the date, the UT1 and ** the polar motion, using the IAU 2000B nutation model. ** ** Given: ** tta,ttb double TT as a 2-part Julian Date (Note 1) ** uta,utb double UT1 as a 2-part Julian Date (Note 1) ** xp,yp double coordinates of the pole (radians, Note 2) ** ** Returned: ** rc2t double[3][3] celestial-to-terrestrial matrix (Note 3) ** ** Notes: ** ** 1) The TT and UT1 dates tta+ttb and uta+utb are Julian Dates, ** apportioned in any convenient way between the arguments uta and ** utb. For example, JD(UT1)=2450123.7 could be expressed in any of ** these ways, among others: ** ** uta utb ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution is ** acceptable. The J2000 and MJD methods are good compromises ** between resolution and convenience. In the case of uta,utb, the ** date & time method is best matched to the Earth rotation angle ** algorithm used: maximum precision is delivered when the uta ** argument is for 0hrs UT1 on the day in question and the utb ** argument lies in the range 0 to 1, or vice versa. ** ** 2) The arguments xp and yp are the coordinates (in radians) of the ** Celestial Intermediate Pole with respect to the International ** Terrestrial Reference System (see IERS Conventions 2003), ** measured along the meridians to 0 and 90 deg west respectively. ** ** 3) The matrix rc2t transforms from celestial to terrestrial ** coordinates: ** ** [TRS] = RPOM * R_3(ERA) * RC2I * [CRS] ** ** = rc2t * [CRS] ** ** where [CRS] is a vector in the Geocentric Celestial Reference ** System and [TRS] is a vector in the International Terrestrial ** Reference System (see IERS Conventions 2003), RC2I is the ** celestial-to-intermediate matrix, ERA is the Earth rotation ** angle and RPOM is the polar motion matrix. ** ** 4) The present function is faster, but slightly less accurate (about ** 1 mas), than the eraC2t00a function. ** ** Called: ** eraC2i00b celestial-to-intermediate matrix, IAU 2000B ** eraEra00 Earth rotation angle, IAU 2000 ** eraPom00 polar motion matrix ** eraC2tcio form CIO-based celestial-to-terrestrial matrix ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rc2i[3][3], era, rpom[3][3]; /* Form the celestial-to-intermediate matrix for this TT (IAU 2000B). */ eraC2i00b(tta, ttb, rc2i); /* Predict the Earth rotation angle for this UT1. */ era = eraEra00(uta, utb); /* Form the polar motion matrix (neglecting s'). */ eraPom00(xp, yp, 0.0, rpom); /* Combine to form the celestial-to-terrestrial matrix. */ eraC2tcio(rc2i, era, rpom, rc2t); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/s06a.c0000644001134200020070000001427612640262015017431 0ustar embrayscience00000000000000#include "erfa.h" double eraS06a(double date1, double date2) /* ** - - - - - - - - ** e r a S 0 6 a ** - - - - - - - - ** ** The CIO locator s, positioning the Celestial Intermediate Origin on ** the equator of the Celestial Intermediate Pole, using the IAU 2006 ** precession and IAU 2000A nutation models. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned (function value): ** double the CIO locator s in radians (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The CIO locator s is the difference between the right ascensions ** of the same point in two systems. The two systems are the GCRS ** and the CIP,CIO, and the point is the ascending node of the ** CIP equator. The CIO locator s remains a small fraction of ** 1 arcsecond throughout 1900-2100. ** ** 3) The series used to compute s is in fact for s+XY/2, where X and Y ** are the x and y components of the CIP unit vector; this series is ** more compact than a direct series for s would be. The present ** function uses the full IAU 2000A nutation model when predicting ** the CIP position. ** ** Called: ** eraPnm06a classical NPB matrix, IAU 2006/2000A ** eraBpn2xy extract CIP X,Y coordinates from NPB matrix ** eraS06 the CIO locator s, given X,Y, IAU 2006 ** ** References: ** ** Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., ** "Expressions for the Celestial Intermediate Pole and Celestial ** Ephemeris Origin consistent with the IAU 2000A precession- ** nutation model", Astron.Astrophys. 400, 1145-1154 (2003) ** ** n.b. The celestial ephemeris origin (CEO) was renamed "celestial ** intermediate origin" (CIO) by IAU 2006 Resolution 2. ** ** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 ** ** McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003), ** IERS Technical Note No. 32, BKG ** ** Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rnpb[3][3], x, y, s; /* Bias-precession-nutation-matrix, IAU 20006/2000A. */ eraPnm06a(date1, date2, rnpb); /* Extract the CIP coordinates. */ eraBpn2xy(rnpb, &x, &y); /* Compute the CIO locator s, given the CIP coordinates. */ s = eraS06(date1, date2, x, y); return s; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pap.c0000644001134200020070000001225112640262015017427 0ustar embrayscience00000000000000#include "erfa.h" double eraPap(double a[3], double b[3]) /* ** - - - - - - - ** e r a P a p ** - - - - - - - ** ** Position-angle from two p-vectors. ** ** Given: ** a double[3] direction of reference point ** b double[3] direction of point whose PA is required ** ** Returned (function value): ** double position angle of b with respect to a (radians) ** ** Notes: ** ** 1) The result is the position angle, in radians, of direction b with ** respect to direction a. It is in the range -pi to +pi. The ** sense is such that if b is a small distance "north" of a the ** position angle is approximately zero, and if b is a small ** distance "east" of a the position angle is approximately +pi/2. ** ** 2) The vectors a and b need not be of unit length. ** ** 3) Zero is returned if the two directions are the same or if either ** vector is null. ** ** 4) If vector a is at a pole, the result is ill-defined. ** ** Called: ** eraPn decompose p-vector into modulus and direction ** eraPm modulus of p-vector ** eraPxp vector product of two p-vectors ** eraPmp p-vector minus p-vector ** eraPdp scalar product of two p-vectors ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double am, au[3], bm, st, ct, xa, ya, za, eta[3], xi[3], a2b[3], pa; /* Modulus and direction of the a vector. */ eraPn(a, &am, au); /* Modulus of the b vector. */ bm = eraPm(b); /* Deal with the case of a null vector. */ if ((am == 0.0) || (bm == 0.0)) { st = 0.0; ct = 1.0; } else { /* The "north" axis tangential from a (arbitrary length). */ xa = a[0]; ya = a[1]; za = a[2]; eta[0] = -xa * za; eta[1] = -ya * za; eta[2] = xa*xa + ya*ya; /* The "east" axis tangential from a (same length). */ eraPxp(eta, au, xi); /* The vector from a to b. */ eraPmp(b, a, a2b); /* Resolve into components along the north and east axes. */ st = eraPdp(a2b, xi); ct = eraPdp(a2b, eta); /* Deal with degenerate cases. */ if ((st == 0.0) && (ct == 0.0)) ct = 1.0; } /* Position angle. */ pa = atan2(st, ct); return pa; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/icrs2g.c0000644001134200020070000001540312640262015020042 0ustar embrayscience00000000000000#include "erfa.h" void eraIcrs2g ( double dr, double dd, double *dl, double *db ) /* ** - - - - - - - - - - ** e r a I c r s 2 g ** - - - - - - - - - - ** ** Transformation from ICRS to Galactic Coordinates. ** ** Given: ** dr double ICRS right ascension (radians) ** dd double ICRS declination (radians) ** ** Returned: ** dl double galactic longitude (radians) ** db double galactic latitude (radians) ** ** Notes: ** ** 1) The IAU 1958 system of Galactic coordinates was defined with ** respect to the now obsolete reference system FK4 B1950.0. When ** interpreting the system in a modern context, several factors have ** to be taken into account: ** ** . The inclusion in FK4 positions of the E-terms of aberration. ** ** . The distortion of the FK4 proper motion system by differential ** Galactic rotation. ** ** . The use of the B1950.0 equinox rather than the now-standard ** J2000.0. ** ** . The frame bias between ICRS and the J2000.0 mean place system. ** ** The Hipparcos Catalogue (Perryman & ESA 1997) provides a rotation ** matrix that transforms directly between ICRS and Galactic ** coordinates with the above factors taken into account. The ** matrix is derived from three angles, namely the ICRS coordinates ** of the Galactic pole and the longitude of the ascending node of ** the galactic equator on the ICRS equator. They are given in ** degrees to five decimal places and for canonical purposes are ** regarded as exact. In the Hipparcos Catalogue the matrix ** elements are given to 10 decimal places (about 20 microarcsec). ** In the present ERFA function the matrix elements have been ** recomputed from the canonical three angles and are given to 30 ** decimal places. ** ** 2) The inverse transformation is performed by the function eraG2icrs. ** ** Called: ** eraAnp normalize angle into range 0 to 2pi ** eraAnpm normalize angle into range +/- pi ** eraS2c spherical coordinates to unit vector ** eraRxp product of r-matrix and p-vector ** eraC2s p-vector to spherical ** ** Reference: ** Perryman M.A.C. & ESA, 1997, ESA SP-1200, The Hipparcos and Tycho ** catalogues. Astrometric and photometric star catalogues ** derived from the ESA Hipparcos Space Astrometry Mission. ESA ** Publications Division, Noordwijk, Netherlands. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double v1[3], v2[3]; /* ** L2,B2 system of galactic coordinates in the form presented in the ** Hipparcos Catalogue. In degrees: ** ** P = 192.85948 right ascension of the Galactic north pole in ICRS ** Q = 27.12825 declination of the Galactic north pole in ICRS ** R = 32.93192 longitude of the ascending node of the Galactic ** plane on the ICRS equator ** ** ICRS to galactic rotation matrix, obtained by computing ** R_3(-R) R_1(pi/2-Q) R_3(pi/2+P) to the full precision shown: */ double r[3][3] = { { -0.054875560416215368492398900454, -0.873437090234885048760383168409, -0.483835015548713226831774175116 }, { +0.494109427875583673525222371358, -0.444829629960011178146614061616, +0.746982244497218890527388004556 }, { -0.867666149019004701181616534570, -0.198076373431201528180486091412, +0.455983776175066922272100478348 } }; /* Spherical to Cartesian. */ eraS2c(dr, dd, v1); /* ICRS to Galactic. */ eraRxp(r, v1, v2); /* Cartesian to spherical. */ eraC2s(v2, dl, db); /* Express in conventional ranges. */ *dl = eraAnp(*dl); *db = eraAnpm(*db); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/faf03.c0000644001134200020070000001051412640262015017546 0ustar embrayscience00000000000000#include "erfa.h" double eraFaf03(double t) /* ** - - - - - - - - - ** e r a F a f 0 3 ** - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of the Moon minus mean longitude of the ascending ** node. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double F, radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003) and ** is from Simon et al. (1994). ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* Mean longitude of the Moon minus that of the ascending node */ /* (IERS Conventions 2003). */ a = fmod( 335779.526232 + t * ( 1739527262.8478 + t * ( - 12.7512 + t * ( - 0.001037 + t * ( 0.00000417 ) ) ) ), ERFA_TURNAS ) * ERFA_DAS2R; return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/epb.c0000644001134200020070000000754612640262015017430 0ustar embrayscience00000000000000#include "erfa.h" double eraEpb(double dj1, double dj2) /* ** - - - - - - - ** e r a E p b ** - - - - - - - ** ** Julian Date to Besselian Epoch. ** ** Given: ** dj1,dj2 double Julian Date (see note) ** ** Returned (function value): ** double Besselian Epoch. ** ** Note: ** ** The Julian Date is supplied in two pieces, in the usual ERFA ** manner, which is designed to preserve time resolution. The ** Julian Date is available as a single number by adding dj1 and ** dj2. The maximum resolution is achieved if dj1 is 2451545.0 ** (J2000.0). ** ** Reference: ** ** Lieske, J.H., 1979. Astron.Astrophys., 73, 282. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* J2000.0-B1900.0 (2415019.81352) in days */ const double D1900 = 36524.68648; return 1900.0 + ((dj1 - ERFA_DJ00) + (dj2 + D1900)) / ERFA_DTY; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pnm00b.c0000644001134200020070000001232412640262015017744 0ustar embrayscience00000000000000#include "erfa.h" void eraPnm00b(double date1, double date2, double rbpn[3][3]) /* ** - - - - - - - - - - ** e r a P n m 0 0 b ** - - - - - - - - - - ** ** Form the matrix of precession-nutation for a given date (including ** frame bias), equinox-based, IAU 2000B model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** rbpn double[3][3] bias-precession-nutation matrix (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix operates in the sense V(date) = rbpn * V(GCRS), where ** the p-vector V(date) is with respect to the true equatorial triad ** of date date1+date2 and the p-vector V(GCRS) is with respect to ** the Geocentric Celestial Reference System (IAU, 2000). ** ** 3) The present function is faster, but slightly less accurate (about ** 1 mas), than the eraPnm00a function. ** ** Called: ** eraPn00b bias/precession/nutation, IAU 2000B ** ** Reference: ** ** IAU: Trans. International Astronomical Union, Vol. XXIVB; Proc. ** 24th General Assembly, Manchester, UK. Resolutions B1.3, B1.6. ** (2000) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dpsi, deps, epsa, rb[3][3], rp[3][3], rbp[3][3], rn[3][3]; /* Obtain the required matrix (discarding other results). */ eraPn00b(date1, date2, &dpsi, &deps, &epsa, rb, rp, rbp, rn, rbpn); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/prec76.c0000644001134200020070000001465712640262015017771 0ustar embrayscience00000000000000#include "erfa.h" void eraPrec76(double date01, double date02, double date11, double date12, double *zeta, double *z, double *theta) /* ** - - - - - - - - - - ** e r a P r e c 7 6 ** - - - - - - - - - - ** ** IAU 1976 precession model. ** ** This function forms the three Euler angles which implement general ** precession between two dates, using the IAU 1976 model (as for the ** FK5 catalog). ** ** Given: ** date01,date02 double TDB starting date (Note 1) ** date11,date12 double TDB ending date (Note 1) ** ** Returned: ** zeta double 1st rotation: radians cw around z ** z double 3rd rotation: radians cw around z ** theta double 2nd rotation: radians ccw around y ** ** Notes: ** ** 1) The dates date01+date02 and date11+date12 are Julian Dates, ** apportioned in any convenient way between the arguments daten1 ** and daten2. For example, JD(TDB)=2450123.7 could be expressed in ** any of these ways, among others: ** ** daten1 daten2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 method is best matched to the way the ** argument is handled internally and will deliver the optimum ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** The two dates may be expressed using different methods, but at ** the risk of losing some resolution. ** ** 2) The accumulated precession angles zeta, z, theta are expressed ** through canonical polynomials which are valid only for a limited ** time span. In addition, the IAU 1976 precession rate is known to ** be imperfect. The absolute accuracy of the present formulation ** is better than 0.1 arcsec from 1960AD to 2040AD, better than ** 1 arcsec from 1640AD to 2360AD, and remains below 3 arcsec for ** the whole of the period 500BC to 3000AD. The errors exceed ** 10 arcsec outside the range 1200BC to 3900AD, exceed 100 arcsec ** outside 4200BC to 5600AD and exceed 1000 arcsec outside 6800BC to ** 8200AD. ** ** 3) The three angles are returned in the conventional order, which ** is not the same as the order of the corresponding Euler ** rotations. The precession matrix is ** R_3(-z) x R_2(+theta) x R_3(-zeta). ** ** Reference: ** ** Lieske, J.H., 1979, Astron.Astrophys. 73, 282, equations ** (6) & (7), p283. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t0, t, tas2r, w; /* Interval between fundamental epoch J2000.0 and start date (JC). */ t0 = ((date01 - ERFA_DJ00) + date02) / ERFA_DJC; /* Interval over which precession required (JC). */ t = ((date11 - date01) + (date12 - date02)) / ERFA_DJC; /* Euler angles. */ tas2r = t * ERFA_DAS2R; w = 2306.2181 + (1.39656 - 0.000139 * t0) * t0; *zeta = (w + ((0.30188 - 0.000344 * t0) + 0.017998 * t) * t) * tas2r; *z = (w + ((1.09468 + 0.000066 * t0) + 0.018203 * t) * t) * tas2r; *theta = ((2004.3109 + (-0.85330 - 0.000217 * t0) * t0) + ((-0.42665 - 0.000217 * t0) - 0.041833 * t) * t) * tas2r; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/tttai.c0000644001134200020070000001043512640262015017776 0ustar embrayscience00000000000000#include "erfa.h" int eraTttai(double tt1, double tt2, double *tai1, double *tai2) /* ** - - - - - - - - - ** e r a T t t a i ** - - - - - - - - - ** ** Time scale transformation: Terrestrial Time, TT, to International ** Atomic Time, TAI. ** ** Given: ** tt1,tt2 double TT as a 2-part Julian Date ** ** Returned: ** tai1,tai2 double TAI as a 2-part Julian Date ** ** Returned (function value): ** int status: 0 = OK ** ** Note: ** ** tt1+tt2 is Julian Date, apportioned in any convenient way between ** the two arguments, for example where tt1 is the Julian Day Number ** and tt2 is the fraction of a day. The returned tai1,tai2 follow ** suit. ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* TT minus TAI (days). */ static const double dtat = ERFA_TTMTAI/ERFA_DAYSEC; /* Result, safeguarding precision. */ if ( tt1 > tt2 ) { *tai1 = tt1; *tai2 = tt2 - dtat; } else { *tai1 = tt1 - dtat; *tai2 = tt2; } /* Status (always OK). */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fae03.c0000644001134200020070000001031112640262015017540 0ustar embrayscience00000000000000#include "erfa.h" double eraFae03(double t) /* ** - - - - - - - - - ** e r a F a e 0 3 ** - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Earth. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double mean longitude of Earth, radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003) and ** comes from Souchay et al. (1999) after Simon et al. (1994). ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, ** Astron.Astrophys.Supp.Ser. 135, 111 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* Mean longitude of Earth (IERS Conventions 2003). */ a = fmod(1.753470314 + 628.3075849991 * t, ERFA_D2PI); return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fw2m.c0000644001134200020070000001227212640262015017525 0ustar embrayscience00000000000000#include "erfa.h" void eraFw2m(double gamb, double phib, double psi, double eps, double r[3][3]) /* ** - - - - - - - - ** e r a F w 2 m ** - - - - - - - - ** ** Form rotation matrix given the Fukushima-Williams angles. ** ** Given: ** gamb double F-W angle gamma_bar (radians) ** phib double F-W angle phi_bar (radians) ** psi double F-W angle psi (radians) ** eps double F-W angle epsilon (radians) ** ** Returned: ** r double[3][3] rotation matrix ** ** Notes: ** ** 1) Naming the following points: ** ** e = J2000.0 ecliptic pole, ** p = GCRS pole, ** E = ecliptic pole of date, ** and P = CIP, ** ** the four Fukushima-Williams angles are as follows: ** ** gamb = gamma = epE ** phib = phi = pE ** psi = psi = pEP ** eps = epsilon = EP ** ** 2) The matrix representing the combined effects of frame bias, ** precession and nutation is: ** ** NxPxB = R_1(-eps).R_3(-psi).R_1(phib).R_3(gamb) ** ** 3) Three different matrices can be constructed, depending on the ** supplied angles: ** ** o To obtain the nutation x precession x frame bias matrix, ** generate the four precession angles, generate the nutation ** components and add them to the psi_bar and epsilon_A angles, ** and call the present function. ** ** o To obtain the precession x frame bias matrix, generate the ** four precession angles and call the present function. ** ** o To obtain the frame bias matrix, generate the four precession ** angles for date J2000.0 and call the present function. ** ** The nutation-only and precession-only matrices can if necessary ** be obtained by combining these three appropriately. ** ** Called: ** eraIr initialize r-matrix to identity ** eraRz rotate around Z-axis ** eraRx rotate around X-axis ** ** Reference: ** ** Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Construct the matrix. */ eraIr(r); eraRz(gamb, r); eraRx(phib, r); eraRz(-psi, r); eraRx(-eps, r); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ppp.c0000644001134200020070000000703112640262015017446 0ustar embrayscience00000000000000#include "erfa.h" void eraPpp(double a[3], double b[3], double apb[3]) /* ** - - - - - - - ** e r a P p p ** - - - - - - - ** ** P-vector addition. ** ** Given: ** a double[3] first p-vector ** b double[3] second p-vector ** ** Returned: ** apb double[3] a + b ** ** Note: ** It is permissible to re-use the same array for any of the ** arguments. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { apb[0] = a[0] + b[0]; apb[1] = a[1] + b[1]; apb[2] = a[2] + b[2]; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/apio.c0000644001134200020070000002165212640262015017604 0ustar embrayscience00000000000000#include "erfa.h" void eraApio(double sp, double theta, double elong, double phi, double hm, double xp, double yp, double refa, double refb, eraASTROM *astrom) /* ** - - - - - - - - ** e r a A p i o ** - - - - - - - - ** ** For a terrestrial observer, prepare star-independent astrometry ** parameters for transformations between CIRS and observed ** coordinates. The caller supplies the Earth orientation information ** and the refraction constants as well as the site coordinates. ** ** Given: ** sp double the TIO locator s' (radians, Note 1) ** theta double Earth rotation angle (radians) ** elong double longitude (radians, east +ve, Note 2) ** phi double geodetic latitude (radians, Note 2) ** hm double height above ellipsoid (m, geodetic Note 2) ** xp,yp double polar motion coordinates (radians, Note 3) ** refa double refraction constant A (radians, Note 4) ** refb double refraction constant B (radians, Note 4) ** ** Returned: ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double unchanged ** eb double[3] unchanged ** eh double[3] unchanged ** em double unchanged ** v double[3] unchanged ** bm1 double unchanged ** bpn double[3][3] unchanged ** along double longitude + s' (radians) ** xpl double polar motion xp wrt local meridian (radians) ** ypl double polar motion yp wrt local meridian (radians) ** sphi double sine of geodetic latitude ** cphi double cosine of geodetic latitude ** diurab double magnitude of diurnal aberration vector ** eral double "local" Earth rotation angle (radians) ** refa double refraction constant A (radians) ** refb double refraction constant B (radians) ** ** Notes: ** ** 1) sp, the TIO locator s', is a tiny quantity needed only by the ** most precise applications. It can either be set to zero or ** predicted using the ERFA function eraSp00. ** ** 2) The geographical coordinates are with respect to the ERFA_WGS84 ** reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the ** longitude required by the present function is east-positive ** (i.e. right-handed), in accordance with geographical convention. ** ** 3) The polar motion xp,yp can be obtained from IERS bulletins. The ** values are the coordinates (in radians) of the Celestial ** Intermediate Pole with respect to the International Terrestrial ** Reference System (see IERS Conventions 2003), measured along the ** meridians 0 and 90 deg west respectively. For many applications, ** xp and yp can be set to zero. ** ** Internally, the polar motion is stored in a form rotated onto the ** local meridian. ** ** 4) The refraction constants refa and refb are for use in a ** dZ = A*tan(Z)+B*tan^3(Z) model, where Z is the observed ** (i.e. refracted) zenith distance and dZ is the amount of ** refraction. ** ** 5) It is advisable to take great care with units, as even unlikely ** values of the input parameters are accepted and processed in ** accordance with the models used. ** ** 6) In cases where the caller does not wish to provide the Earth ** rotation information and refraction constants, the function ** eraApio13 can be used instead of the present function. This ** starts from UTC and weather readings etc. and computes suitable ** values using other ERFA functions. ** ** 7) This is one of several functions that inserts into the astrom ** structure star-independent parameters needed for the chain of ** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. ** ** The various functions support different classes of observer and ** portions of the transformation chain: ** ** functions observer transformation ** ** eraApcg eraApcg13 geocentric ICRS <-> GCRS ** eraApci eraApci13 terrestrial ICRS <-> CIRS ** eraApco eraApco13 terrestrial ICRS <-> observed ** eraApcs eraApcs13 space ICRS <-> GCRS ** eraAper eraAper13 terrestrial update Earth rotation ** eraApio eraApio13 terrestrial CIRS <-> observed ** ** Those with names ending in "13" use contemporary ERFA models to ** compute the various ephemerides. The others accept ephemerides ** supplied by the caller. ** ** The transformation from ICRS to GCRS covers space motion, ** parallax, light deflection, and aberration. From GCRS to CIRS ** comprises frame bias and precession-nutation. From CIRS to ** observed takes account of Earth rotation, polar motion, diurnal ** aberration and parallax (unless subsumed into the ICRS <-> GCRS ** transformation), and atmospheric refraction. ** ** 8) The context structure astrom produced by this function is used by ** eraAtioq and eraAtoiq. ** ** Called: ** eraPvtob position/velocity of terrestrial station ** eraAper astrometry parameters: update ERA ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double sl, cl, pv[2][3]; /* Longitude with adjustment for TIO locator s'. */ astrom->along = elong + sp; /* Polar motion, rotated onto the local meridian. */ sl = sin(astrom->along); cl = cos(astrom->along); astrom->xpl = xp*cl - yp*sl; astrom->ypl = xp*sl + yp*cl; /* Functions of latitude. */ astrom->sphi = sin(phi); astrom->cphi = cos(phi); /* Observer's geocentric position and velocity (m, m/s, CIRS). */ eraPvtob(elong, phi, hm, xp, yp, sp, theta, pv); /* Magnitude of diurnal aberration vector. */ astrom->diurab = sqrt(pv[1][0]*pv[1][0]+pv[1][1]*pv[1][1]) / ERFA_CMPS; /* Refraction constants. */ astrom->refa = refa; astrom->refb = refb; /* Local Earth rotation angle. */ eraAper(theta, astrom); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/s00.c0000644001134200020070000003341412640262015017255 0ustar embrayscience00000000000000#include "erfa.h" double eraS00(double date1, double date2, double x, double y) /* ** - - - - - - - ** e r a S 0 0 ** - - - - - - - ** ** The CIO locator s, positioning the Celestial Intermediate Origin on ** the equator of the Celestial Intermediate Pole, given the CIP's X,Y ** coordinates. Compatible with IAU 2000A precession-nutation. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** x,y double CIP coordinates (Note 3) ** ** Returned (function value): ** double the CIO locator s in radians (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The CIO locator s is the difference between the right ascensions ** of the same point in two systems: the two systems are the GCRS ** and the CIP,CIO, and the point is the ascending node of the ** CIP equator. The quantity s remains below 0.1 arcsecond ** throughout 1900-2100. ** ** 3) The series used to compute s is in fact for s+XY/2, where X and Y ** are the x and y components of the CIP unit vector; this series ** is more compact than a direct series for s would be. This ** function requires X,Y to be supplied by the caller, who is ** responsible for providing values that are consistent with the ** supplied date. ** ** 4) The model is consistent with the IAU 2000A precession-nutation. ** ** Called: ** eraFal03 mean anomaly of the Moon ** eraFalp03 mean anomaly of the Sun ** eraFaf03 mean argument of the latitude of the Moon ** eraFad03 mean elongation of the Moon from the Sun ** eraFaom03 mean longitude of the Moon's ascending node ** eraFave03 mean longitude of Venus ** eraFae03 mean longitude of Earth ** eraFapa03 general accumulated precession in longitude ** ** References: ** ** Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., ** "Expressions for the Celestial Intermediate Pole and Celestial ** Ephemeris Origin consistent with the IAU 2000A precession- ** nutation model", Astron.Astrophys. 400, 1145-1154 (2003) ** ** n.b. The celestial ephemeris origin (CEO) was renamed "celestial ** intermediate origin" (CIO) by IAU 2006 Resolution 2. ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Time since J2000.0, in Julian centuries */ double t; /* Miscellaneous */ int i, j; double a, w0, w1, w2, w3, w4, w5; /* Fundamental arguments */ double fa[8]; /* Returned value */ double s; /* --------------------- */ /* The series for s+XY/2 */ /* --------------------- */ typedef struct { int nfa[8]; /* coefficients of l,l',F,D,Om,LVe,LE,pA */ double s, c; /* sine and cosine coefficients */ } TERM; /* Polynomial coefficients */ static const double sp[] = { /* 1-6 */ 94.00e-6, 3808.35e-6, -119.94e-6, -72574.09e-6, 27.70e-6, 15.61e-6 }; /* Terms of order t^0 */ static const TERM s0[] = { /* 1-10 */ {{ 0, 0, 0, 0, 1, 0, 0, 0}, -2640.73e-6, 0.39e-6 }, {{ 0, 0, 0, 0, 2, 0, 0, 0}, -63.53e-6, 0.02e-6 }, {{ 0, 0, 2, -2, 3, 0, 0, 0}, -11.75e-6, -0.01e-6 }, {{ 0, 0, 2, -2, 1, 0, 0, 0}, -11.21e-6, -0.01e-6 }, {{ 0, 0, 2, -2, 2, 0, 0, 0}, 4.57e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 3, 0, 0, 0}, -2.02e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 1, 0, 0, 0}, -1.98e-6, 0.00e-6 }, {{ 0, 0, 0, 0, 3, 0, 0, 0}, 1.72e-6, 0.00e-6 }, {{ 0, 1, 0, 0, 1, 0, 0, 0}, 1.41e-6, 0.01e-6 }, {{ 0, 1, 0, 0, -1, 0, 0, 0}, 1.26e-6, 0.01e-6 }, /* 11-20 */ {{ 1, 0, 0, 0, -1, 0, 0, 0}, 0.63e-6, 0.00e-6 }, {{ 1, 0, 0, 0, 1, 0, 0, 0}, 0.63e-6, 0.00e-6 }, {{ 0, 1, 2, -2, 3, 0, 0, 0}, -0.46e-6, 0.00e-6 }, {{ 0, 1, 2, -2, 1, 0, 0, 0}, -0.45e-6, 0.00e-6 }, {{ 0, 0, 4, -4, 4, 0, 0, 0}, -0.36e-6, 0.00e-6 }, {{ 0, 0, 1, -1, 1, -8, 12, 0}, 0.24e-6, 0.12e-6 }, {{ 0, 0, 2, 0, 0, 0, 0, 0}, -0.32e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 2, 0, 0, 0}, -0.28e-6, 0.00e-6 }, {{ 1, 0, 2, 0, 3, 0, 0, 0}, -0.27e-6, 0.00e-6 }, {{ 1, 0, 2, 0, 1, 0, 0, 0}, -0.26e-6, 0.00e-6 }, /* 21-30 */ {{ 0, 0, 2, -2, 0, 0, 0, 0}, 0.21e-6, 0.00e-6 }, {{ 0, 1, -2, 2, -3, 0, 0, 0}, -0.19e-6, 0.00e-6 }, {{ 0, 1, -2, 2, -1, 0, 0, 0}, -0.18e-6, 0.00e-6 }, {{ 0, 0, 0, 0, 0, 8,-13, -1}, 0.10e-6, -0.05e-6 }, {{ 0, 0, 0, 2, 0, 0, 0, 0}, -0.15e-6, 0.00e-6 }, {{ 2, 0, -2, 0, -1, 0, 0, 0}, 0.14e-6, 0.00e-6 }, {{ 0, 1, 2, -2, 2, 0, 0, 0}, 0.14e-6, 0.00e-6 }, {{ 1, 0, 0, -2, 1, 0, 0, 0}, -0.14e-6, 0.00e-6 }, {{ 1, 0, 0, -2, -1, 0, 0, 0}, -0.14e-6, 0.00e-6 }, {{ 0, 0, 4, -2, 4, 0, 0, 0}, -0.13e-6, 0.00e-6 }, /* 31-33 */ {{ 0, 0, 2, -2, 4, 0, 0, 0}, 0.11e-6, 0.00e-6 }, {{ 1, 0, -2, 0, -3, 0, 0, 0}, -0.11e-6, 0.00e-6 }, {{ 1, 0, -2, 0, -1, 0, 0, 0}, -0.11e-6, 0.00e-6 } }; /* Terms of order t^1 */ static const TERM s1[] ={ /* 1-3 */ {{ 0, 0, 0, 0, 2, 0, 0, 0}, -0.07e-6, 3.57e-6 }, {{ 0, 0, 0, 0, 1, 0, 0, 0}, 1.71e-6, -0.03e-6 }, {{ 0, 0, 2, -2, 3, 0, 0, 0}, 0.00e-6, 0.48e-6 } }; /* Terms of order t^2 */ static const TERM s2[] ={ /* 1-10 */ {{ 0, 0, 0, 0, 1, 0, 0, 0}, 743.53e-6, -0.17e-6 }, {{ 0, 0, 2, -2, 2, 0, 0, 0}, 56.91e-6, 0.06e-6 }, {{ 0, 0, 2, 0, 2, 0, 0, 0}, 9.84e-6, -0.01e-6 }, {{ 0, 0, 0, 0, 2, 0, 0, 0}, -8.85e-6, 0.01e-6 }, {{ 0, 1, 0, 0, 0, 0, 0, 0}, -6.38e-6, -0.05e-6 }, {{ 1, 0, 0, 0, 0, 0, 0, 0}, -3.07e-6, 0.00e-6 }, {{ 0, 1, 2, -2, 2, 0, 0, 0}, 2.23e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 1, 0, 0, 0}, 1.67e-6, 0.00e-6 }, {{ 1, 0, 2, 0, 2, 0, 0, 0}, 1.30e-6, 0.00e-6 }, {{ 0, 1, -2, 2, -2, 0, 0, 0}, 0.93e-6, 0.00e-6 }, /* 11-20 */ {{ 1, 0, 0, -2, 0, 0, 0, 0}, 0.68e-6, 0.00e-6 }, {{ 0, 0, 2, -2, 1, 0, 0, 0}, -0.55e-6, 0.00e-6 }, {{ 1, 0, -2, 0, -2, 0, 0, 0}, 0.53e-6, 0.00e-6 }, {{ 0, 0, 0, 2, 0, 0, 0, 0}, -0.27e-6, 0.00e-6 }, {{ 1, 0, 0, 0, 1, 0, 0, 0}, -0.27e-6, 0.00e-6 }, {{ 1, 0, -2, -2, -2, 0, 0, 0}, -0.26e-6, 0.00e-6 }, {{ 1, 0, 0, 0, -1, 0, 0, 0}, -0.25e-6, 0.00e-6 }, {{ 1, 0, 2, 0, 1, 0, 0, 0}, 0.22e-6, 0.00e-6 }, {{ 2, 0, 0, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6 }, {{ 2, 0, -2, 0, -1, 0, 0, 0}, 0.20e-6, 0.00e-6 }, /* 21-25 */ {{ 0, 0, 2, 2, 2, 0, 0, 0}, 0.17e-6, 0.00e-6 }, {{ 2, 0, 2, 0, 2, 0, 0, 0}, 0.13e-6, 0.00e-6 }, {{ 2, 0, 0, 0, 0, 0, 0, 0}, -0.13e-6, 0.00e-6 }, {{ 1, 0, 2, -2, 2, 0, 0, 0}, -0.12e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 0, 0, 0, 0}, -0.11e-6, 0.00e-6 } }; /* Terms of order t^3 */ static const TERM s3[] ={ /* 1-4 */ {{ 0, 0, 0, 0, 1, 0, 0, 0}, 0.30e-6, -23.51e-6 }, {{ 0, 0, 2, -2, 2, 0, 0, 0}, -0.03e-6, -1.39e-6 }, {{ 0, 0, 2, 0, 2, 0, 0, 0}, -0.01e-6, -0.24e-6 }, {{ 0, 0, 0, 0, 2, 0, 0, 0}, 0.00e-6, 0.22e-6 } }; /* Terms of order t^4 */ static const TERM s4[] ={ /* 1-1 */ {{ 0, 0, 0, 0, 1, 0, 0, 0}, -0.26e-6, -0.01e-6 } }; /* Number of terms in the series */ const int NS0 = (int) (sizeof s0 / sizeof (TERM)); const int NS1 = (int) (sizeof s1 / sizeof (TERM)); const int NS2 = (int) (sizeof s2 / sizeof (TERM)); const int NS3 = (int) (sizeof s3 / sizeof (TERM)); const int NS4 = (int) (sizeof s4 / sizeof (TERM)); /*--------------------------------------------------------------------*/ /* Interval between fundamental epoch J2000.0 and current date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* Fundamental Arguments (from IERS Conventions 2003) */ /* Mean anomaly of the Moon. */ fa[0] = eraFal03(t); /* Mean anomaly of the Sun. */ fa[1] = eraFalp03(t); /* Mean longitude of the Moon minus that of the ascending node. */ fa[2] = eraFaf03(t); /* Mean elongation of the Moon from the Sun. */ fa[3] = eraFad03(t); /* Mean longitude of the ascending node of the Moon. */ fa[4] = eraFaom03(t); /* Mean longitude of Venus. */ fa[5] = eraFave03(t); /* Mean longitude of Earth. */ fa[6] = eraFae03(t); /* General precession in longitude. */ fa[7] = eraFapa03(t); /* Evaluate s. */ w0 = sp[0]; w1 = sp[1]; w2 = sp[2]; w3 = sp[3]; w4 = sp[4]; w5 = sp[5]; for (i = NS0-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s0[i].nfa[j] * fa[j]; } w0 += s0[i].s * sin(a) + s0[i].c * cos(a); } for (i = NS1-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s1[i].nfa[j] * fa[j]; } w1 += s1[i].s * sin(a) + s1[i].c * cos(a); } for (i = NS2-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s2[i].nfa[j] * fa[j]; } w2 += s2[i].s * sin(a) + s2[i].c * cos(a); } for (i = NS3-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s3[i].nfa[j] * fa[j]; } w3 += s3[i].s * sin(a) + s3[i].c * cos(a); } for (i = NS4-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s4[i].nfa[j] * fa[j]; } w4 += s4[i].s * sin(a) + s4[i].c * cos(a); } s = (w0 + (w1 + (w2 + (w3 + (w4 + w5 * t) * t) * t) * t) * t) * ERFA_DAS2R - x*y/2.0; return s; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pn06.c0000644001134200020070000001716212640262015017440 0ustar embrayscience00000000000000#include "erfa.h" void eraPn06(double date1, double date2, double dpsi, double deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]) /* ** - - - - - - - - ** e r a P n 0 6 ** - - - - - - - - ** ** Precession-nutation, IAU 2006 model: a multi-purpose function, ** supporting classical (equinox-based) use directly and CIO-based use ** indirectly. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** dpsi,deps double nutation (Note 2) ** ** Returned: ** epsa double mean obliquity (Note 3) ** rb double[3][3] frame bias matrix (Note 4) ** rp double[3][3] precession matrix (Note 5) ** rbp double[3][3] bias-precession matrix (Note 6) ** rn double[3][3] nutation matrix (Note 7) ** rbpn double[3][3] GCRS-to-true matrix (Note 8) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The caller is responsible for providing the nutation components; ** they are in longitude and obliquity, in radians and are with ** respect to the equinox and ecliptic of date. For high-accuracy ** applications, free core nutation should be included as well as ** any other relevant corrections to the position of the CIP. ** ** 3) The returned mean obliquity is consistent with the IAU 2006 ** precession. ** ** 4) The matrix rb transforms vectors from GCRS to J2000.0 mean ** equator and equinox by applying frame bias. ** ** 5) The matrix rp transforms vectors from J2000.0 mean equator and ** equinox to mean equator and equinox of date by applying ** precession. ** ** 6) The matrix rbp transforms vectors from GCRS to mean equator and ** equinox of date by applying frame bias then precession. It is ** the product rp x rb. ** ** 7) The matrix rn transforms vectors from mean equator and equinox ** of date to true equator and equinox of date by applying the ** nutation (luni-solar + planetary). ** ** 8) The matrix rbpn transforms vectors from GCRS to true equator and ** equinox of date. It is the product rn x rbp, applying frame ** bias, precession and nutation in that order. ** ** 9) The X,Y,Z coordinates of the Celestial Intermediate Pole are ** elements (3,1-3) of the GCRS-to-true matrix, i.e. rbpn[2][0-2]. ** ** 10) It is permissible to re-use the same array in the returned ** arguments. The arrays are filled in the stated order. ** ** Called: ** eraPfw06 bias-precession F-W angles, IAU 2006 ** eraFw2m F-W angles to r-matrix ** eraCr copy r-matrix ** eraTr transpose r-matrix ** eraRxr product of two r-matrices ** ** References: ** ** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 ** ** Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double gamb, phib, psib, eps, r1[3][3], r2[3][3], rt[3][3]; /* Bias-precession Fukushima-Williams angles of J2000.0 = frame bias. */ eraPfw06(ERFA_DJM0, ERFA_DJM00, &gamb, &phib, &psib, &eps); /* B matrix. */ eraFw2m(gamb, phib, psib, eps, r1); eraCr(r1, rb); /* Bias-precession Fukushima-Williams angles of date. */ eraPfw06(date1, date2, &gamb, &phib, &psib, &eps); /* Bias-precession matrix. */ eraFw2m(gamb, phib, psib, eps, r2); eraCr(r2, rbp); /* Solve for precession matrix. */ eraTr(r1, rt); eraRxr(r2, rt, rp); /* Equinox-based bias-precession-nutation matrix. */ eraFw2m(gamb, phib, psib + dpsi, eps + deps, r1); eraCr(r1, rbpn); /* Solve for nutation matrix. */ eraTr(r2, rt); eraRxr(r1, rt, rn); /* Obliquity, mean of date. */ *epsa = eps; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/erfa.h0000644001134200020070000005532312640262015017600 0ustar embrayscience00000000000000// This copy of ERFA is bundled with Astropy, based on ERFA v1.2.0 #ifndef ERFAHDEF #define ERFAHDEF /* ** - - - - - - - ** e r f a . h ** - - - - - - - ** ** Prototype function declarations for ERFA library. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ #include "erfam.h" #include "math.h" #ifdef __cplusplus extern "C" { #endif /* Astronomy/Calendars */ int eraCal2jd(int iy, int im, int id, double *djm0, double *djm); double eraEpb(double dj1, double dj2); void eraEpb2jd(double epb, double *djm0, double *djm); double eraEpj(double dj1, double dj2); void eraEpj2jd(double epj, double *djm0, double *djm); int eraJd2cal(double dj1, double dj2, int *iy, int *im, int *id, double *fd); int eraJdcalf(int ndp, double dj1, double dj2, int iymdf[4]); /* Astronomy/Astrometry */ void eraAb(double pnat[3], double v[3], double s, double bm1, double ppr[3]); void eraApcg(double date1, double date2, double ebpv[2][3], double ehp[3], eraASTROM *astrom); void eraApcg13(double date1, double date2, eraASTROM *astrom); void eraApci(double date1, double date2, double ebpv[2][3], double ehp[3], double x, double y, double s, eraASTROM *astrom); void eraApci13(double date1, double date2, eraASTROM *astrom, double *eo); void eraApco(double date1, double date2, double ebpv[2][3], double ehp[3], double x, double y, double s, double theta, double elong, double phi, double hm, double xp, double yp, double sp, double refa, double refb, eraASTROM *astrom); int eraApco13(double utc1, double utc2, double dut1, double elong, double phi, double hm, double xp, double yp, double phpa, double tc, double rh, double wl, eraASTROM *astrom, double *eo); void eraApcs(double date1, double date2, double pv[2][3], double ebpv[2][3], double ehp[3], eraASTROM *astrom); void eraApcs13(double date1, double date2, double pv[2][3], eraASTROM *astrom); void eraAper(double theta, eraASTROM *astrom); void eraAper13(double ut11, double ut12, eraASTROM *astrom); void eraApio(double sp, double theta, double elong, double phi, double hm, double xp, double yp, double refa, double refb, eraASTROM *astrom); int eraApio13(double utc1, double utc2, double dut1, double elong, double phi, double hm, double xp, double yp, double phpa, double tc, double rh, double wl, eraASTROM *astrom); void eraAtci13(double rc, double dc, double pr, double pd, double px, double rv, double date1, double date2, double *ri, double *di, double *eo); void eraAtciq(double rc, double dc, double pr, double pd, double px, double rv, eraASTROM *astrom, double *ri, double *di); void eraAtciqn(double rc, double dc, double pr, double pd, double px, double rv, eraASTROM *astrom, int n, eraLDBODY b[], double *ri, double *di); void eraAtciqz(double rc, double dc, eraASTROM *astrom, double *ri, double *di); int eraAtco13(double rc, double dc, double pr, double pd, double px, double rv, double utc1, double utc2, double dut1, double elong, double phi, double hm, double xp, double yp, double phpa, double tc, double rh, double wl, double *aob, double *zob, double *hob, double *dob, double *rob, double *eo); void eraAtic13(double ri, double di, double date1, double date2, double *rc, double *dc, double *eo); void eraAticq(double ri, double di, eraASTROM *astrom, double *rc, double *dc); void eraAticqn(double ri, double di, eraASTROM *astrom, int n, eraLDBODY b[], double *rc, double *dc); int eraAtio13(double ri, double di, double utc1, double utc2, double dut1, double elong, double phi, double hm, double xp, double yp, double phpa, double tc, double rh, double wl, double *aob, double *zob, double *hob, double *dob, double *rob); void eraAtioq(double ri, double di, eraASTROM *astrom, double *aob, double *zob, double *hob, double *dob, double *rob); int eraAtoc13(const char *type, double ob1, double ob2, double utc1, double utc2, double dut1, double elong, double phi, double hm, double xp, double yp, double phpa, double tc, double rh, double wl, double *rc, double *dc); int eraAtoi13(const char *type, double ob1, double ob2, double utc1, double utc2, double dut1, double elong, double phi, double hm, double xp, double yp, double phpa, double tc, double rh, double wl, double *ri, double *di); void eraAtoiq(const char *type, double ob1, double ob2, eraASTROM *astrom, double *ri, double *di); void eraLd(double bm, double p[3], double q[3], double e[3], double em, double dlim, double p1[3]); void eraLdn(int n, eraLDBODY b[], double ob[3], double sc[3], double sn[3]); void eraLdsun(double p[3], double e[3], double em, double p1[3]); void eraPmpx(double rc, double dc, double pr, double pd, double px, double rv, double pmt, double pob[3], double pco[3]); int eraPmsafe(double ra1, double dec1, double pmr1, double pmd1, double px1, double rv1, double ep1a, double ep1b, double ep2a, double ep2b, double *ra2, double *dec2, double *pmr2, double *pmd2, double *px2, double *rv2); void eraPvtob(double elong, double phi, double height, double xp, double yp, double sp, double theta, double pv[2][3]); void eraRefco(double phpa, double tc, double rh, double wl, double *refa, double *refb); /* Astronomy/Ephemerides */ int eraEpv00(double date1, double date2, double pvh[2][3], double pvb[2][3]); int eraPlan94(double date1, double date2, int np, double pv[2][3]); /* Astronomy/FundamentalArgs */ double eraFad03(double t); double eraFae03(double t); double eraFaf03(double t); double eraFaju03(double t); double eraFal03(double t); double eraFalp03(double t); double eraFama03(double t); double eraFame03(double t); double eraFane03(double t); double eraFaom03(double t); double eraFapa03(double t); double eraFasa03(double t); double eraFaur03(double t); double eraFave03(double t); /* Astronomy/PrecNutPolar */ void eraBi00(double *dpsibi, double *depsbi, double *dra); void eraBp00(double date1, double date2, double rb[3][3], double rp[3][3], double rbp[3][3]); void eraBp06(double date1, double date2, double rb[3][3], double rp[3][3], double rbp[3][3]); void eraBpn2xy(double rbpn[3][3], double *x, double *y); void eraC2i00a(double date1, double date2, double rc2i[3][3]); void eraC2i00b(double date1, double date2, double rc2i[3][3]); void eraC2i06a(double date1, double date2, double rc2i[3][3]); void eraC2ibpn(double date1, double date2, double rbpn[3][3], double rc2i[3][3]); void eraC2ixy(double date1, double date2, double x, double y, double rc2i[3][3]); void eraC2ixys(double x, double y, double s, double rc2i[3][3]); void eraC2t00a(double tta, double ttb, double uta, double utb, double xp, double yp, double rc2t[3][3]); void eraC2t00b(double tta, double ttb, double uta, double utb, double xp, double yp, double rc2t[3][3]); void eraC2t06a(double tta, double ttb, double uta, double utb, double xp, double yp, double rc2t[3][3]); void eraC2tcio(double rc2i[3][3], double era, double rpom[3][3], double rc2t[3][3]); void eraC2teqx(double rbpn[3][3], double gst, double rpom[3][3], double rc2t[3][3]); void eraC2tpe(double tta, double ttb, double uta, double utb, double dpsi, double deps, double xp, double yp, double rc2t[3][3]); void eraC2txy(double tta, double ttb, double uta, double utb, double x, double y, double xp, double yp, double rc2t[3][3]); double eraEo06a(double date1, double date2); double eraEors(double rnpb[3][3], double s); void eraFw2m(double gamb, double phib, double psi, double eps, double r[3][3]); void eraFw2xy(double gamb, double phib, double psi, double eps, double *x, double *y); void eraNum00a(double date1, double date2, double rmatn[3][3]); void eraNum00b(double date1, double date2, double rmatn[3][3]); void eraNum06a(double date1, double date2, double rmatn[3][3]); void eraNumat(double epsa, double dpsi, double deps, double rmatn[3][3]); void eraNut00a(double date1, double date2, double *dpsi, double *deps); void eraNut00b(double date1, double date2, double *dpsi, double *deps); void eraNut06a(double date1, double date2, double *dpsi, double *deps); void eraNut80(double date1, double date2, double *dpsi, double *deps); void eraNutm80(double date1, double date2, double rmatn[3][3]); double eraObl06(double date1, double date2); double eraObl80(double date1, double date2); void eraP06e(double date1, double date2, double *eps0, double *psia, double *oma, double *bpa, double *bqa, double *pia, double *bpia, double *epsa, double *chia, double *za, double *zetaa, double *thetaa, double *pa, double *gam, double *phi, double *psi); void eraPb06(double date1, double date2, double *bzeta, double *bz, double *btheta); void eraPfw06(double date1, double date2, double *gamb, double *phib, double *psib, double *epsa); void eraPmat00(double date1, double date2, double rbp[3][3]); void eraPmat06(double date1, double date2, double rbp[3][3]); void eraPmat76(double date1, double date2, double rmatp[3][3]); void eraPn00(double date1, double date2, double dpsi, double deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]); void eraPn00a(double date1, double date2, double *dpsi, double *deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]); void eraPn00b(double date1, double date2, double *dpsi, double *deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]); void eraPn06(double date1, double date2, double dpsi, double deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]); void eraPn06a(double date1, double date2, double *dpsi, double *deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]); void eraPnm00a(double date1, double date2, double rbpn[3][3]); void eraPnm00b(double date1, double date2, double rbpn[3][3]); void eraPnm06a(double date1, double date2, double rnpb[3][3]); void eraPnm80(double date1, double date2, double rmatpn[3][3]); void eraPom00(double xp, double yp, double sp, double rpom[3][3]); void eraPr00(double date1, double date2, double *dpsipr, double *depspr); void eraPrec76(double date01, double date02, double date11, double date12, double *zeta, double *z, double *theta); double eraS00(double date1, double date2, double x, double y); double eraS00a(double date1, double date2); double eraS00b(double date1, double date2); double eraS06(double date1, double date2, double x, double y); double eraS06a(double date1, double date2); double eraSp00(double date1, double date2); void eraXy06(double date1, double date2, double *x, double *y); void eraXys00a(double date1, double date2, double *x, double *y, double *s); void eraXys00b(double date1, double date2, double *x, double *y, double *s); void eraXys06a(double date1, double date2, double *x, double *y, double *s); /* Astronomy/RotationAndTime */ double eraEe00(double date1, double date2, double epsa, double dpsi); double eraEe00a(double date1, double date2); double eraEe00b(double date1, double date2); double eraEe06a(double date1, double date2); double eraEect00(double date1, double date2); double eraEqeq94(double date1, double date2); double eraEra00(double dj1, double dj2); double eraGmst00(double uta, double utb, double tta, double ttb); double eraGmst06(double uta, double utb, double tta, double ttb); double eraGmst82(double dj1, double dj2); double eraGst00a(double uta, double utb, double tta, double ttb); double eraGst00b(double uta, double utb); double eraGst06(double uta, double utb, double tta, double ttb, double rnpb[3][3]); double eraGst06a(double uta, double utb, double tta, double ttb); double eraGst94(double uta, double utb); /* Astronomy/SpaceMotion */ int eraPvstar(double pv[2][3], double *ra, double *dec, double *pmr, double *pmd, double *px, double *rv); int eraStarpv(double ra, double dec, double pmr, double pmd, double px, double rv, double pv[2][3]); /* Astronomy/StarCatalogs */ void eraFk52h(double r5, double d5, double dr5, double dd5, double px5, double rv5, double *rh, double *dh, double *drh, double *ddh, double *pxh, double *rvh); void eraFk5hip(double r5h[3][3], double s5h[3]); void eraFk5hz(double r5, double d5, double date1, double date2, double *rh, double *dh); void eraH2fk5(double rh, double dh, double drh, double ddh, double pxh, double rvh, double *r5, double *d5, double *dr5, double *dd5, double *px5, double *rv5); void eraHfk5z(double rh, double dh, double date1, double date2, double *r5, double *d5, double *dr5, double *dd5); int eraStarpm(double ra1, double dec1, double pmr1, double pmd1, double px1, double rv1, double ep1a, double ep1b, double ep2a, double ep2b, double *ra2, double *dec2, double *pmr2, double *pmd2, double *px2, double *rv2); /* Astronomy/GalacticCoordinates */ void eraG2icrs ( double dl, double db, double *dr, double *dd ); void eraIcrs2g ( double dr, double dd, double *dl, double *db ); /* Astronomy/GeodeticGeocentric */ int eraEform(int n, double *a, double *f); int eraGc2gd(int n, double xyz[3], double *elong, double *phi, double *height); int eraGc2gde(double a, double f, double xyz[3], double *elong, double *phi, double *height); int eraGd2gc(int n, double elong, double phi, double height, double xyz[3]); int eraGd2gce(double a, double f, double elong, double phi, double height, double xyz[3]); /* Astronomy/Timescales */ int eraD2dtf(const char *scale, int ndp, double d1, double d2, int *iy, int *im, int *id, int ihmsf[4]); int eraDat(int iy, int im, int id, double fd, double *deltat); double eraDtdb(double date1, double date2, double ut, double elong, double u, double v); int eraDtf2d(const char *scale, int iy, int im, int id, int ihr, int imn, double sec, double *d1, double *d2); int eraTaitt(double tai1, double tai2, double *tt1, double *tt2); int eraTaiut1(double tai1, double tai2, double dta, double *ut11, double *ut12); int eraTaiutc(double tai1, double tai2, double *utc1, double *utc2); int eraTcbtdb(double tcb1, double tcb2, double *tdb1, double *tdb2); int eraTcgtt(double tcg1, double tcg2, double *tt1, double *tt2); int eraTdbtcb(double tdb1, double tdb2, double *tcb1, double *tcb2); int eraTdbtt(double tdb1, double tdb2, double dtr, double *tt1, double *tt2); int eraTttai(double tt1, double tt2, double *tai1, double *tai2); int eraTttcg(double tt1, double tt2, double *tcg1, double *tcg2); int eraTttdb(double tt1, double tt2, double dtr, double *tdb1, double *tdb2); int eraTtut1(double tt1, double tt2, double dt, double *ut11, double *ut12); int eraUt1tai(double ut11, double ut12, double dta, double *tai1, double *tai2); int eraUt1tt(double ut11, double ut12, double dt, double *tt1, double *tt2); int eraUt1utc(double ut11, double ut12, double dut1, double *utc1, double *utc2); int eraUtctai(double utc1, double utc2, double *tai1, double *tai2); int eraUtcut1(double utc1, double utc2, double dut1, double *ut11, double *ut12); /* VectorMatrix/AngleOps */ void eraA2af(int ndp, double angle, char *sign, int idmsf[4]); void eraA2tf(int ndp, double angle, char *sign, int ihmsf[4]); int eraAf2a(char s, int ideg, int iamin, double asec, double *rad); double eraAnp(double a); double eraAnpm(double a); void eraD2tf(int ndp, double days, char *sign, int ihmsf[4]); int eraTf2a(char s, int ihour, int imin, double sec, double *rad); int eraTf2d(char s, int ihour, int imin, double sec, double *days); /* VectorMatrix/BuildRotations */ void eraRx(double phi, double r[3][3]); void eraRy(double theta, double r[3][3]); void eraRz(double psi, double r[3][3]); /* VectorMatrix/CopyExtendExtract */ void eraCp(double p[3], double c[3]); void eraCpv(double pv[2][3], double c[2][3]); void eraCr(double r[3][3], double c[3][3]); void eraP2pv(double p[3], double pv[2][3]); void eraPv2p(double pv[2][3], double p[3]); /* VectorMatrix/Initialization */ void eraIr(double r[3][3]); void eraZp(double p[3]); void eraZpv(double pv[2][3]); void eraZr(double r[3][3]); /* VectorMatrix/MatrixOps */ void eraRxr(double a[3][3], double b[3][3], double atb[3][3]); void eraTr(double r[3][3], double rt[3][3]); /* VectorMatrix/MatrixVectorProducts */ void eraRxp(double r[3][3], double p[3], double rp[3]); void eraRxpv(double r[3][3], double pv[2][3], double rpv[2][3]); void eraTrxp(double r[3][3], double p[3], double trp[3]); void eraTrxpv(double r[3][3], double pv[2][3], double trpv[2][3]); /* VectorMatrix/RotationVectors */ void eraRm2v(double r[3][3], double w[3]); void eraRv2m(double w[3], double r[3][3]); /* VectorMatrix/SeparationAndAngle */ double eraPap(double a[3], double b[3]); double eraPas(double al, double ap, double bl, double bp); double eraSepp(double a[3], double b[3]); double eraSeps(double al, double ap, double bl, double bp); /* VectorMatrix/SphericalCartesian */ void eraC2s(double p[3], double *theta, double *phi); void eraP2s(double p[3], double *theta, double *phi, double *r); void eraPv2s(double pv[2][3], double *theta, double *phi, double *r, double *td, double *pd, double *rd); void eraS2c(double theta, double phi, double c[3]); void eraS2p(double theta, double phi, double r, double p[3]); void eraS2pv(double theta, double phi, double r, double td, double pd, double rd, double pv[2][3]); /* VectorMatrix/VectorOps */ double eraPdp(double a[3], double b[3]); double eraPm(double p[3]); void eraPmp(double a[3], double b[3], double amb[3]); void eraPn(double p[3], double *r, double u[3]); void eraPpp(double a[3], double b[3], double apb[3]); void eraPpsp(double a[3], double s, double b[3], double apsb[3]); void eraPvdpv(double a[2][3], double b[2][3], double adb[2]); void eraPvm(double pv[2][3], double *r, double *s); void eraPvmpv(double a[2][3], double b[2][3], double amb[2][3]); void eraPvppv(double a[2][3], double b[2][3], double apb[2][3]); void eraPvu(double dt, double pv[2][3], double upv[2][3]); void eraPvup(double dt, double pv[2][3], double p[3]); void eraPvxpv(double a[2][3], double b[2][3], double axb[2][3]); void eraPxp(double a[3], double b[3], double axb[3]); void eraS2xpv(double s1, double s2, double pv[2][3], double spv[2][3]); void eraSxp(double s, double p[3], double sp[3]); void eraSxpv(double s, double pv[2][3], double spv[2][3]); #ifdef __cplusplus } #endif #endif /* Copyright2 */ /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/gd2gce.c0000644001134200020070000001260412640262015020004 0ustar embrayscience00000000000000#include "erfa.h" int eraGd2gce ( double a, double f, double elong, double phi, double height, double xyz[3] ) /* ** - - - - - - - - - - ** e r a G d 2 g c e ** - - - - - - - - - - ** ** Transform geodetic coordinates to geocentric for a reference ** ellipsoid of specified form. ** ** Given: ** a double equatorial radius (Notes 1,4) ** f double flattening (Notes 2,4) ** elong double longitude (radians, east +ve) ** phi double latitude (geodetic, radians, Note 4) ** height double height above ellipsoid (geodetic, Notes 3,4) ** ** Returned: ** xyz double[3] geocentric vector (Note 3) ** ** Returned (function value): ** int status: 0 = OK ** -1 = illegal case (Note 4) ** Notes: ** ** 1) The equatorial radius, a, can be in any units, but meters is ** the conventional choice. ** ** 2) The flattening, f, is (for the Earth) a value around 0.00335, ** i.e. around 1/298. ** ** 3) The equatorial radius, a, and the height, height, must be ** given in the same units, and determine the units of the ** returned geocentric vector, xyz. ** ** 4) No validation is performed on individual arguments. The error ** status -1 protects against (unrealistic) cases that would lead ** to arithmetic exceptions. If an error occurs, xyz is unchanged. ** ** 5) The inverse transformation is performed in the function ** eraGc2gde. ** ** 6) The transformation for a standard ellipsoid (such as ERFA_WGS84) can ** more conveniently be performed by calling eraGd2gc, which uses a ** numerical code to identify the required a and f values. ** ** References: ** ** Green, R.M., Spherical Astronomy, Cambridge University Press, ** (1985) Section 4.5, p96. ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992), ** Section 4.22, p202. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double sp, cp, w, d, ac, as, r; /* Functions of geodetic latitude. */ sp = sin(phi); cp = cos(phi); w = 1.0 - f; w = w * w; d = cp*cp + w*sp*sp; if ( d <= 0.0 ) return -1; ac = a / sqrt(d); as = w * ac; /* Geocentric vector. */ r = (ac + height) * cp; xyz[0] = r * cos(elong); xyz[1] = r * sin(elong); xyz[2] = (as + height) * sp; /* Success. */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fave03.c0000644001134200020070000001032112640262015017727 0ustar embrayscience00000000000000#include "erfa.h" double eraFave03(double t) /* ** - - - - - - - - - - ** e r a F a v e 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Venus. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double mean longitude of Venus, radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003) and ** comes from Souchay et al. (1999) after Simon et al. (1994). ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, ** Astron.Astrophys.Supp.Ser. 135, 111 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* Mean longitude of Venus (IERS Conventions 2003). */ a = fmod(3.176146697 + 1021.3285546211 * t, ERFA_D2PI); return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pr00.c0000644001134200020070000001434112640262015017432 0ustar embrayscience00000000000000#include "erfa.h" void eraPr00(double date1, double date2, double *dpsipr, double *depspr) /* ** - - - - - - - - ** e r a P r 0 0 ** - - - - - - - - ** ** Precession-rate part of the IAU 2000 precession-nutation models ** (part of MHB2000). ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** dpsipr,depspr double precession corrections (Notes 2,3) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The precession adjustments are expressed as "nutation ** components", corrections in longitude and obliquity with respect ** to the J2000.0 equinox and ecliptic. ** ** 3) Although the precession adjustments are stated to be with respect ** to Lieske et al. (1977), the MHB2000 model does not specify which ** set of Euler angles are to be used and how the adjustments are to ** be applied. The most literal and straightforward procedure is to ** adopt the 4-rotation epsilon_0, psi_A, omega_A, xi_A option, and ** to add dpsipr to psi_A and depspr to both omega_A and eps_A. ** ** 4) This is an implementation of one aspect of the IAU 2000A nutation ** model, formally adopted by the IAU General Assembly in 2000, ** namely MHB2000 (Mathews et al. 2002). ** ** References: ** ** Lieske, J.H., Lederle, T., Fricke, W. & Morando, B., "Expressions ** for the precession quantities based upon the IAU (1976) System of ** Astronomical Constants", Astron.Astrophys., 58, 1-16 (1977) ** ** Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation ** and precession New nutation series for nonrigid Earth and ** insights into the Earth's interior", J.Geophys.Res., 107, B4, ** 2002. The MHB2000 code itself was obtained on 9th September 2002 ** from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A. ** ** Wallace, P.T., "Software for Implementing the IAU 2000 ** Resolutions", in IERS Workshop 5.1 (2002). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t; /* Precession and obliquity corrections (radians per century) */ static const double PRECOR = -0.29965 * ERFA_DAS2R, OBLCOR = -0.02524 * ERFA_DAS2R; /* Interval between fundamental epoch J2000.0 and given date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* Precession rate contributions with respect to IAU 1976/80. */ *dpsipr = PRECOR * t; *depspr = OBLCOR * t; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/s2p.c0000644001134200020070000000722212640262015017355 0ustar embrayscience00000000000000#include "erfa.h" void eraS2p(double theta, double phi, double r, double p[3]) /* ** - - - - - - - ** e r a S 2 p ** - - - - - - - ** ** Convert spherical polar coordinates to p-vector. ** ** Given: ** theta double longitude angle (radians) ** phi double latitude angle (radians) ** r double radial distance ** ** Returned: ** p double[3] Cartesian coordinates ** ** Called: ** eraS2c spherical coordinates to unit vector ** eraSxp multiply p-vector by scalar ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double u[3]; eraS2c(theta, phi, u); eraSxp(r, u, p); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2tcio.c0000644001134200020070000001210112640262015020024 0ustar embrayscience00000000000000#include "erfa.h" void eraC2tcio(double rc2i[3][3], double era, double rpom[3][3], double rc2t[3][3]) /* ** - - - - - - - - - - ** e r a C 2 t c i o ** - - - - - - - - - - ** ** Assemble the celestial to terrestrial matrix from CIO-based ** components (the celestial-to-intermediate matrix, the Earth Rotation ** Angle and the polar motion matrix). ** ** Given: ** rc2i double[3][3] celestial-to-intermediate matrix ** era double Earth rotation angle (radians) ** rpom double[3][3] polar-motion matrix ** ** Returned: ** rc2t double[3][3] celestial-to-terrestrial matrix ** ** Notes: ** ** 1) This function constructs the rotation matrix that transforms ** vectors in the celestial system into vectors in the terrestrial ** system. It does so starting from precomputed components, namely ** the matrix which rotates from celestial coordinates to the ** intermediate frame, the Earth rotation angle and the polar motion ** matrix. One use of the present function is when generating a ** series of celestial-to-terrestrial matrices where only the Earth ** Rotation Angle changes, avoiding the considerable overhead of ** recomputing the precession-nutation more often than necessary to ** achieve given accuracy objectives. ** ** 2) The relationship between the arguments is as follows: ** ** [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] ** ** = rc2t * [CRS] ** ** where [CRS] is a vector in the Geocentric Celestial Reference ** System and [TRS] is a vector in the International Terrestrial ** Reference System (see IERS Conventions 2003). ** ** Called: ** eraCr copy r-matrix ** eraRz rotate around Z-axis ** eraRxr product of two r-matrices ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003), ** IERS Technical Note No. 32, BKG ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double r[3][3]; /* Construct the matrix. */ eraCr(rc2i, r); eraRz(era, r); eraRxr(rpom, r, rc2t); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/tttcg.c0000644001134200020070000001057612640262015020004 0ustar embrayscience00000000000000#include "erfa.h" int eraTttcg(double tt1, double tt2, double *tcg1, double *tcg2) /* ** - - - - - - - - - ** e r a T t t c g ** - - - - - - - - - ** ** Time scale transformation: Terrestrial Time, TT, to Geocentric ** Coordinate Time, TCG. ** ** Given: ** tt1,tt2 double TT as a 2-part Julian Date ** ** Returned: ** tcg1,tcg2 double TCG as a 2-part Julian Date ** ** Returned (function value): ** int status: 0 = OK ** ** Note: ** ** tt1+tt2 is Julian Date, apportioned in any convenient way between ** the two arguments, for example where tt1 is the Julian Day Number ** and tt2 is the fraction of a day. The returned tcg1,tcg2 follow ** suit. ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** IAU 2000 Resolution B1.9 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* 1977 Jan 1 00:00:32.184 TT, as MJD */ static const double t77t = ERFA_DJM77 + ERFA_TTMTAI/ERFA_DAYSEC; /* TT to TCG rate */ static const double elgg = ERFA_ELG/(1.0-ERFA_ELG); /* Result, safeguarding precision. */ if ( tt1 > tt2 ) { *tcg1 = tt1; *tcg2 = tt2 + ( ( tt1 - ERFA_DJM0 ) + ( tt2 - t77t ) ) * elgg; } else { *tcg1 = tt1 + ( ( tt2 - ERFA_DJM0 ) + ( tt1 - t77t ) ) * elgg; *tcg2 = tt2; } /* Status (always OK). */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/faom03.c0000644001134200020070000001042412640262015017734 0ustar embrayscience00000000000000#include "erfa.h" double eraFaom03(double t) /* ** - - - - - - - - - - ** e r a F a o m 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of the Moon's ascending node. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double Omega, radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003) and ** is from Simon et al. (1994). ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* Mean longitude of the Moon's ascending node */ /* (IERS Conventions 2003). */ a = fmod( 450160.398036 + t * ( - 6962890.5431 + t * ( 7.4722 + t * ( 0.007702 + t * ( - 0.00005939 ) ) ) ), ERFA_TURNAS ) * ERFA_DAS2R; return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fal03.c0000644001134200020070000001032012640262015017547 0ustar embrayscience00000000000000#include "erfa.h" double eraFal03(double t) /* ** - - - - - - - - - ** e r a F a l 0 3 ** - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean anomaly of the Moon. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double l, radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003) and ** is from Simon et al. (1994). ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* Mean anomaly of the Moon (IERS Conventions 2003). */ a = fmod( 485868.249036 + t * ( 1717915923.2178 + t * ( 31.8792 + t * ( 0.051635 + t * ( - 0.00024470 ) ) ) ), ERFA_TURNAS ) * ERFA_DAS2R; return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ld.c0000644001134200020070000001407412640262015017253 0ustar embrayscience00000000000000#include "erfa.h" void eraLd(double bm, double p[3], double q[3], double e[3], double em, double dlim, double p1[3]) /* ** - - - - - - ** e r a L d ** - - - - - - ** ** Apply light deflection by a solar-system body, as part of ** transforming coordinate direction into natural direction. ** ** Given: ** bm double mass of the gravitating body (solar masses) ** p double[3] direction from observer to source (unit vector) ** q double[3] direction from body to source (unit vector) ** e double[3] direction from body to observer (unit vector) ** em double distance from body to observer (au) ** dlim double deflection limiter (Note 4) ** ** Returned: ** p1 double[3] observer to deflected source (unit vector) ** ** Notes: ** ** 1) The algorithm is based on Expr. (70) in Klioner (2003) and ** Expr. (7.63) in the Explanatory Supplement (Urban & Seidelmann ** 2013), with some rearrangement to minimize the effects of machine ** precision. ** ** 2) The mass parameter bm can, as required, be adjusted in order to ** allow for such effects as quadrupole field. ** ** 3) The barycentric position of the deflecting body should ideally ** correspond to the time of closest approach of the light ray to ** the body. ** ** 4) The deflection limiter parameter dlim is phi^2/2, where phi is ** the angular separation (in radians) between source and body at ** which limiting is applied. As phi shrinks below the chosen ** threshold, the deflection is artificially reduced, reaching zero ** for phi = 0. ** ** 5) The returned vector p1 is not normalized, but the consequential ** departure from unit magnitude is always negligible. ** ** 6) The arguments p and p1 can be the same array. ** ** 7) To accumulate total light deflection taking into account the ** contributions from several bodies, call the present function for ** each body in succession, in decreasing order of distance from the ** observer. ** ** 8) For efficiency, validation is omitted. The supplied vectors must ** be of unit magnitude, and the deflection limiter non-zero and ** positive. ** ** References: ** ** Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to ** the Astronomical Almanac, 3rd ed., University Science Books ** (2013). ** ** Klioner, Sergei A., "A practical relativistic model for micro- ** arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003). ** ** Called: ** eraPdp scalar product of two p-vectors ** eraPxp vector product of two p-vectors ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int i; double qpe[3], qdqpe, w, eq[3], peq[3]; /* q . (q + e). */ for (i = 0; i < 3; i++) { qpe[i] = q[i] + e[i]; } qdqpe = eraPdp(q, qpe); /* 2 x G x bm / ( em x c^2 x ( q . (q + e) ) ). */ w = bm * ERFA_SRS / em / ERFA_GMAX(qdqpe,dlim); /* p x (e x q). */ eraPxp(e, q, eq); eraPxp(p, eq, peq); /* Apply the deflection. */ for (i = 0; i < 3; i++) { p1[i] = p[i] + w*peq[i]; } /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/tr.c0000644001134200020070000000711112640262015017273 0ustar embrayscience00000000000000#include "erfa.h" void eraTr(double r[3][3], double rt[3][3]) /* ** - - - - - - ** e r a T r ** - - - - - - ** ** Transpose an r-matrix. ** ** Given: ** r double[3][3] r-matrix ** ** Returned: ** rt double[3][3] transpose ** ** Note: ** It is permissible for r and rt to be the same array. ** ** Called: ** eraCr copy r-matrix ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double wm[3][3]; int i, j; for (i = 0; i < 3; i++) { for (j = 0; j < 3; j++) { wm[i][j] = r[j][i]; } } eraCr(wm, rt); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/cp.c0000644001134200020070000000653312640262015017257 0ustar embrayscience00000000000000#include "erfa.h" void eraCp(double p[3], double c[3]) /* ** - - - - - - ** e r a C p ** - - - - - - ** ** Copy a p-vector. ** ** Given: ** p double[3] p-vector to be copied ** ** Returned: ** c double[3] copy ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { c[0] = p[0]; c[1] = p[1]; c[2] = p[2]; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/nutm80.c0000644001134200020070000001162012640262015020001 0ustar embrayscience00000000000000#include "erfa.h" void eraNutm80(double date1, double date2, double rmatn[3][3]) /* ** - - - - - - - - - - ** e r a N u t m 8 0 ** - - - - - - - - - - ** ** Form the matrix of nutation for a given date, IAU 1980 model. ** ** Given: ** date1,date2 double TDB date (Note 1) ** ** Returned: ** rmatn double[3][3] nutation matrix ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix operates in the sense V(true) = rmatn * V(mean), ** where the p-vector V(true) is with respect to the true ** equatorial triad of date and the p-vector V(mean) is with ** respect to the mean equatorial triad of date. ** ** Called: ** eraNut80 nutation, IAU 1980 ** eraObl80 mean obliquity, IAU 1980 ** eraNumat form nutation matrix ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dpsi, deps, epsa; /* Nutation components and mean obliquity. */ eraNut80(date1, date2, &dpsi, &deps); epsa = eraObl80(date1, date2); /* Build the rotation matrix. */ eraNumat(epsa, dpsi, deps, rmatn); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/taiut1.c0000644001134200020070000001052112640262015020054 0ustar embrayscience00000000000000#include "erfa.h" int eraTaiut1(double tai1, double tai2, double dta, double *ut11, double *ut12) /* ** - - - - - - - - - - ** e r a T a i u t 1 ** - - - - - - - - - - ** ** Time scale transformation: International Atomic Time, TAI, to ** Universal Time, UT1. ** ** Given: ** tai1,tai2 double TAI as a 2-part Julian Date ** dta double UT1-TAI in seconds ** ** Returned: ** ut11,ut12 double UT1 as a 2-part Julian Date ** ** Returned (function value): ** int status: 0 = OK ** ** Notes: ** ** 1) tai1+tai2 is Julian Date, apportioned in any convenient way ** between the two arguments, for example where tai1 is the Julian ** Day Number and tai2 is the fraction of a day. The returned ** UT11,UT12 follow suit. ** ** 2) The argument dta, i.e. UT1-TAI, is an observed quantity, and is ** available from IERS tabulations. ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dtad; /* Result, safeguarding precision. */ dtad = dta / ERFA_DAYSEC; if ( tai1 > tai2 ) { *ut11 = tai1; *ut12 = tai2 + dtad; } else { *ut11 = tai1 + dtad; *ut12 = tai2; } /* Status (always OK). */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/cpv.c0000644001134200020070000000667012640262015017447 0ustar embrayscience00000000000000#include "erfa.h" void eraCpv(double pv[2][3], double c[2][3]) /* ** - - - - - - - ** e r a C p v ** - - - - - - - ** ** Copy a position/velocity vector. ** ** Given: ** pv double[2][3] position/velocity vector to be copied ** ** Returned: ** c double[2][3] copy ** ** Called: ** eraCp copy p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraCp(pv[0], c[0]); eraCp(pv[1], c[1]); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/gc2gd.c0000644001134200020070000001220512640262015017634 0ustar embrayscience00000000000000#include "erfa.h" int eraGc2gd ( int n, double xyz[3], double *elong, double *phi, double *height ) /* ** - - - - - - - - - ** e r a G c 2 g d ** - - - - - - - - - ** ** Transform geocentric coordinates to geodetic using the specified ** reference ellipsoid. ** ** Given: ** n int ellipsoid identifier (Note 1) ** xyz double[3] geocentric vector (Note 2) ** ** Returned: ** elong double longitude (radians, east +ve, Note 3) ** phi double latitude (geodetic, radians, Note 3) ** height double height above ellipsoid (geodetic, Notes 2,3) ** ** Returned (function value): ** int status: 0 = OK ** -1 = illegal identifier (Note 3) ** -2 = internal error (Note 3) ** ** Notes: ** ** 1) The identifier n is a number that specifies the choice of ** reference ellipsoid. The following are supported: ** ** n ellipsoid ** ** 1 ERFA_WGS84 ** 2 ERFA_GRS80 ** 3 ERFA_WGS72 ** ** The n value has no significance outside the ERFA software. For ** convenience, symbols ERFA_WGS84 etc. are defined in erfam.h. ** ** 2) The geocentric vector (xyz, given) and height (height, returned) ** are in meters. ** ** 3) An error status -1 means that the identifier n is illegal. An ** error status -2 is theoretically impossible. In all error cases, ** all three results are set to -1e9. ** ** 4) The inverse transformation is performed in the function eraGd2gc. ** ** Called: ** eraEform Earth reference ellipsoids ** eraGc2gde geocentric to geodetic transformation, general ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int j; double a, f; /* Obtain reference ellipsoid parameters. */ j = eraEform ( n, &a, &f ); /* If OK, transform x,y,z to longitude, geodetic latitude, height. */ if ( j == 0 ) { j = eraGc2gde ( a, f, xyz, elong, phi, height ); if ( j < 0 ) j = -2; } /* Deal with any errors. */ if ( j < 0 ) { *elong = -1e9; *phi = -1e9; *height = -1e9; } /* Return the status. */ return j; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/jdcalf.c0000644001134200020070000001346712640262015020104 0ustar embrayscience00000000000000#include "erfa.h" int eraJdcalf(int ndp, double dj1, double dj2, int iymdf[4]) /* ** - - - - - - - - - - ** e r a J d c a l f ** - - - - - - - - - - ** ** Julian Date to Gregorian Calendar, expressed in a form convenient ** for formatting messages: rounded to a specified precision. ** ** Given: ** ndp int number of decimal places of days in fraction ** dj1,dj2 double dj1+dj2 = Julian Date (Note 1) ** ** Returned: ** iymdf int[4] year, month, day, fraction in Gregorian ** calendar ** ** Returned (function value): ** int status: ** -1 = date out of range ** 0 = OK ** +1 = NDP not 0-9 (interpreted as 0) ** ** Notes: ** ** 1) The Julian Date is apportioned in any convenient way between ** the arguments dj1 and dj2. For example, JD=2450123.7 could ** be expressed in any of these ways, among others: ** ** dj1 dj2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** 2) In early eras the conversion is from the "Proleptic Gregorian ** Calendar"; no account is taken of the date(s) of adoption of ** the Gregorian Calendar, nor is the AD/BC numbering convention ** observed. ** ** 3) Refer to the function eraJd2cal. ** ** 4) NDP should be 4 or less if internal overflows are to be ** avoided on machines which use 16-bit integers. ** ** Called: ** eraJd2cal JD to Gregorian calendar ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992), ** Section 12.92 (p604). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int j, js; double denom, d1, d2, f1, f2, f; /* Denominator of fraction (e.g. 100 for 2 decimal places). */ if ((ndp >= 0) && (ndp <= 9)) { j = 0; denom = pow(10.0, ndp); } else { j = 1; denom = 1.0; } /* Copy the date, big then small, and realign to midnight. */ if (dj1 >= dj2) { d1 = dj1; d2 = dj2; } else { d1 = dj2; d2 = dj1; } d2 -= 0.5; /* Separate days and fractions. */ f1 = fmod(d1, 1.0); f2 = fmod(d2, 1.0); d1 = floor(d1 - f1); d2 = floor(d2 - f2); /* Round the total fraction to the specified number of places. */ f = floor((f1+f2)*denom + 0.5) / denom; /* Re-assemble the rounded date and re-align to noon. */ d2 += f + 0.5; /* Convert to Gregorian calendar. */ js = eraJd2cal(d1, d2, &iymdf[0], &iymdf[1], &iymdf[2], &f); if (js == 0) { iymdf[3] = (int) (f * denom); } else { j = js; } /* Return the status. */ return j; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ut1tt.c0000644001134200020070000001035512640262015017733 0ustar embrayscience00000000000000#include "erfa.h" int eraUt1tt(double ut11, double ut12, double dt, double *tt1, double *tt2) /* ** - - - - - - - - - ** e r a U t 1 t t ** - - - - - - - - - ** ** Time scale transformation: Universal Time, UT1, to Terrestrial ** Time, TT. ** ** Given: ** ut11,ut12 double UT1 as a 2-part Julian Date ** dt double TT-UT1 in seconds ** ** Returned: ** tt1,tt2 double TT as a 2-part Julian Date ** ** Returned (function value): ** int status: 0 = OK ** ** Notes: ** ** 1) ut11+ut12 is Julian Date, apportioned in any convenient way ** between the two arguments, for example where ut11 is the Julian ** Day Number and ut12 is the fraction of a day. The returned ** tt1,tt2 follow suit. ** ** 2) The argument dt is classical Delta T. ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dtd; /* Result, safeguarding precision. */ dtd = dt / ERFA_DAYSEC; if ( ut11 > ut12 ) { *tt1 = ut11; *tt2 = ut12 + dtd; } else { *tt1 = ut11 + dtd; *tt2 = ut12; } /* Status (always OK). */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/aticq.c0000644001134200020070000001614312640262015017754 0ustar embrayscience00000000000000#include "erfa.h" void eraAticq(double ri, double di, eraASTROM *astrom, double *rc, double *dc) /* ** - - - - - - - - - ** e r a A t i c q ** - - - - - - - - - ** ** Quick CIRS RA,Dec to ICRS astrometric place, given the star- ** independent astrometry parameters. ** ** Use of this function is appropriate when efficiency is important and ** where many star positions are all to be transformed for one date. ** The star-independent astrometry parameters can be obtained by ** calling one of the functions eraApci[13], eraApcg[13], eraApco[13] ** or eraApcs[13]. ** ** Given: ** ri,di double CIRS RA,Dec (radians) ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double longitude + s' (radians) ** xpl double polar motion xp wrt local meridian (radians) ** ypl double polar motion yp wrt local meridian (radians) ** sphi double sine of geodetic latitude ** cphi double cosine of geodetic latitude ** diurab double magnitude of diurnal aberration vector ** eral double "local" Earth rotation angle (radians) ** refa double refraction constant A (radians) ** refb double refraction constant B (radians) ** ** Returned: ** rc,dc double ICRS astrometric RA,Dec (radians) ** ** Notes: ** ** 1) Only the Sun is taken into account in the light deflection ** correction. ** ** 2) Iterative techniques are used for the aberration and light ** deflection corrections so that the functions eraAtic13 (or ** eraAticq) and eraAtci13 (or eraAtciq) are accurate inverses; ** even at the edge of the Sun's disk the discrepancy is only about ** 1 nanoarcsecond. ** ** Called: ** eraS2c spherical coordinates to unit vector ** eraTrxp product of transpose of r-matrix and p-vector ** eraZp zero p-vector ** eraAb stellar aberration ** eraLdsun light deflection by the Sun ** eraC2s p-vector to spherical ** eraAnp normalize angle into range +/- pi ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int j, i; double pi[3], ppr[3], pnat[3], pco[3], w, d[3], before[3], r2, r, after[3]; /* CIRS RA,Dec to Cartesian. */ eraS2c(ri, di, pi); /* Bias-precession-nutation, giving GCRS proper direction. */ eraTrxp(astrom->bpn, pi, ppr); /* Aberration, giving GCRS natural direction. */ eraZp(d); for (j = 0; j < 2; j++) { r2 = 0.0; for (i = 0; i < 3; i++) { w = ppr[i] - d[i]; before[i] = w; r2 += w*w; } r = sqrt(r2); for (i = 0; i < 3; i++) { before[i] /= r; } eraAb(before, astrom->v, astrom->em, astrom->bm1, after); r2 = 0.0; for (i = 0; i < 3; i++) { d[i] = after[i] - before[i]; w = ppr[i] - d[i]; pnat[i] = w; r2 += w*w; } r = sqrt(r2); for (i = 0; i < 3; i++) { pnat[i] /= r; } } /* Light deflection by the Sun, giving BCRS coordinate direction. */ eraZp(d); for (j = 0; j < 5; j++) { r2 = 0.0; for (i = 0; i < 3; i++) { w = pnat[i] - d[i]; before[i] = w; r2 += w*w; } r = sqrt(r2); for (i = 0; i < 3; i++) { before[i] /= r; } eraLdsun(before, astrom->eh, astrom->em, after); r2 = 0.0; for (i = 0; i < 3; i++) { d[i] = after[i] - before[i]; w = pnat[i] - d[i]; pco[i] = w; r2 += w*w; } r = sqrt(r2); for (i = 0; i < 3; i++) { pco[i] /= r; } } /* ICRS astrometric RA,Dec. */ eraC2s(pco, &w, dc); *rc = eraAnp(w); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/trxpv.c0000644001134200020070000000734412640262015020041 0ustar embrayscience00000000000000#include "erfa.h" void eraTrxpv(double r[3][3], double pv[2][3], double trpv[2][3]) /* ** - - - - - - - - - ** e r a T r x p v ** - - - - - - - - - ** ** Multiply a pv-vector by the transpose of an r-matrix. ** ** Given: ** r double[3][3] r-matrix ** pv double[2][3] pv-vector ** ** Returned: ** trpv double[2][3] r * pv ** ** Note: ** It is permissible for pv and trpv to be the same array. ** ** Called: ** eraTr transpose r-matrix ** eraRxpv product of r-matrix and pv-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double tr[3][3]; /* Transpose of matrix r. */ eraTr(r, tr); /* Matrix tr * vector pv -> vector trpv. */ eraRxpv(tr, pv, trpv); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/tcgtt.c0000644001134200020070000001047212640262015017777 0ustar embrayscience00000000000000#include "erfa.h" int eraTcgtt(double tcg1, double tcg2, double *tt1, double *tt2) /* ** - - - - - - - - - ** e r a T c g t t ** - - - - - - - - - ** ** Time scale transformation: Geocentric Coordinate Time, TCG, to ** Terrestrial Time, TT. ** ** Given: ** tcg1,tcg2 double TCG as a 2-part Julian Date ** ** Returned: ** tt1,tt2 double TT as a 2-part Julian Date ** ** Returned (function value): ** int status: 0 = OK ** ** Note: ** ** tcg1+tcg2 is Julian Date, apportioned in any convenient way ** between the two arguments, for example where tcg1 is the Julian ** Day Number and tcg22 is the fraction of a day. The returned ** tt1,tt2 follow suit. ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),. ** IERS Technical Note No. 32, BKG (2004) ** ** IAU 2000 Resolution B1.9 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* 1977 Jan 1 00:00:32.184 TT, as MJD */ static const double t77t = ERFA_DJM77 + ERFA_TTMTAI/ERFA_DAYSEC; /* Result, safeguarding precision. */ if ( tcg1 > tcg2 ) { *tt1 = tcg1; *tt2 = tcg2 - ( ( tcg1 - ERFA_DJM0 ) + ( tcg2 - t77t ) ) * ERFA_ELG; } else { *tt1 = tcg1 - ( ( tcg2 - ERFA_DJM0 ) + ( tcg1 - t77t ) ) * ERFA_ELG; *tt2 = tcg2; } /* OK status. */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/xys00b.c0000644001134200020070000001265112640262015020000 0ustar embrayscience00000000000000#include "erfa.h" void eraXys00b(double date1, double date2, double *x, double *y, double *s) /* ** - - - - - - - - - - ** e r a X y s 0 0 b ** - - - - - - - - - - ** ** For a given TT date, compute the X,Y coordinates of the Celestial ** Intermediate Pole and the CIO locator s, using the IAU 2000B ** precession-nutation model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** x,y double Celestial Intermediate Pole (Note 2) ** s double the CIO locator s (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The Celestial Intermediate Pole coordinates are the x,y ** components of the unit vector in the Geocentric Celestial ** Reference System. ** ** 3) The CIO locator s (in radians) positions the Celestial ** Intermediate Origin on the equator of the CIP. ** ** 4) The present function is faster, but slightly less accurate (about ** 1 mas in X,Y), than the eraXys00a function. ** ** Called: ** eraPnm00b classical NPB matrix, IAU 2000B ** eraBpn2xy extract CIP X,Y coordinates from NPB matrix ** eraS00 the CIO locator s, given X,Y, IAU 2000A ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rbpn[3][3]; /* Form the bias-precession-nutation matrix, IAU 2000A. */ eraPnm00b(date1, date2, rbpn); /* Extract X,Y. */ eraBpn2xy(rbpn, x, y); /* Obtain s. */ *s = eraS00(date1, date2, *x, *y); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/aper.c0000644001134200020070000001523712640262015017605 0ustar embrayscience00000000000000#include "erfa.h" void eraAper(double theta, eraASTROM *astrom) /* ** - - - - - - - - ** e r a A p e r ** - - - - - - - - ** ** In the star-independent astrometry parameters, update only the ** Earth rotation angle, supplied by the caller explicitly. ** ** Given: ** theta double Earth rotation angle (radians, Note 2) ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double not used ** eb double[3] not used ** eh double[3] not used ** em double not used ** v double[3] not used ** bm1 double not used ** bpn double[3][3] not used ** along double longitude + s' (radians) ** xpl double not used ** ypl double not used ** sphi double not used ** cphi double not used ** diurab double not used ** eral double not used ** refa double not used ** refb double not used ** ** Returned: ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double unchanged ** eb double[3] unchanged ** eh double[3] unchanged ** em double unchanged ** v double[3] unchanged ** bm1 double unchanged ** bpn double[3][3] unchanged ** along double unchanged ** xpl double unchanged ** ypl double unchanged ** sphi double unchanged ** cphi double unchanged ** diurab double unchanged ** eral double "local" Earth rotation angle (radians) ** refa double unchanged ** refb double unchanged ** ** Notes: ** ** 1) This function exists to enable sidereal-tracking applications to ** avoid wasteful recomputation of the bulk of the astrometry ** parameters: only the Earth rotation is updated. ** ** 2) For targets expressed as equinox based positions, such as ** classical geocentric apparent (RA,Dec), the supplied theta can be ** Greenwich apparent sidereal time rather than Earth rotation ** angle. ** ** 3) The function eraAper13 can be used instead of the present ** function, and starts from UT1 rather than ERA itself. ** ** 4) This is one of several functions that inserts into the astrom ** structure star-independent parameters needed for the chain of ** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. ** ** The various functions support different classes of observer and ** portions of the transformation chain: ** ** functions observer transformation ** ** eraApcg eraApcg13 geocentric ICRS <-> GCRS ** eraApci eraApci13 terrestrial ICRS <-> CIRS ** eraApco eraApco13 terrestrial ICRS <-> observed ** eraApcs eraApcs13 space ICRS <-> GCRS ** eraAper eraAper13 terrestrial update Earth rotation ** eraApio eraApio13 terrestrial CIRS <-> observed ** ** Those with names ending in "13" use contemporary ERFA models to ** compute the various ephemerides. The others accept ephemerides ** supplied by the caller. ** ** The transformation from ICRS to GCRS covers space motion, ** parallax, light deflection, and aberration. From GCRS to CIRS ** comprises frame bias and precession-nutation. From CIRS to ** observed takes account of Earth rotation, polar motion, diurnal ** aberration and parallax (unless subsumed into the ICRS <-> GCRS ** transformation), and atmospheric refraction. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { astrom->eral = theta + astrom->along; /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/dtf2d.c0000644001134200020070000001735312640262015017662 0ustar embrayscience00000000000000#include "erfa.h" #include int eraDtf2d(const char *scale, int iy, int im, int id, int ihr, int imn, double sec, double *d1, double *d2) /* ** - - - - - - - - - ** e r a D t f 2 d ** - - - - - - - - - ** ** Encode date and time fields into 2-part Julian Date (or in the case ** of UTC a quasi-JD form that includes special provision for leap ** seconds). ** ** Given: ** scale char[] time scale ID (Note 1) ** iy,im,id int year, month, day in Gregorian calendar (Note 2) ** ihr,imn int hour, minute ** sec double seconds ** ** Returned: ** d1,d2 double 2-part Julian Date (Notes 3,4) ** ** Returned (function value): ** int status: +3 = both of next two ** +2 = time is after end of day (Note 5) ** +1 = dubious year (Note 6) ** 0 = OK ** -1 = bad year ** -2 = bad month ** -3 = bad day ** -4 = bad hour ** -5 = bad minute ** -6 = bad second (<0) ** ** Notes: ** ** 1) scale identifies the time scale. Only the value "UTC" (in upper ** case) is significant, and enables handling of leap seconds (see ** Note 4). ** ** 2) For calendar conventions and limitations, see eraCal2jd. ** ** 3) The sum of the results, d1+d2, is Julian Date, where normally d1 ** is the Julian Day Number and d2 is the fraction of a day. In the ** case of UTC, where the use of JD is problematical, special ** conventions apply: see the next note. ** ** 4) JD cannot unambiguously represent UTC during a leap second unless ** special measures are taken. The ERFA internal convention is that ** the quasi-JD day represents UTC days whether the length is 86399, ** 86400 or 86401 SI seconds. In the 1960-1972 era there were ** smaller jumps (in either direction) each time the linear UTC(TAI) ** expression was changed, and these "mini-leaps" are also included ** in the ERFA convention. ** ** 5) The warning status "time is after end of day" usually means that ** the sec argument is greater than 60.0. However, in a day ending ** in a leap second the limit changes to 61.0 (or 59.0 in the case ** of a negative leap second). ** ** 6) The warning status "dubious year" flags UTCs that predate the ** introduction of the time scale or that are too far in the future ** to be trusted. See eraDat for further details. ** ** 7) Only in the case of continuous and regular time scales (TAI, TT, ** TCG, TCB and TDB) is the result d1+d2 a Julian Date, strictly ** speaking. In the other cases (UT1 and UTC) the result must be ** used with circumspection; in particular the difference between ** two such results cannot be interpreted as a precise time ** interval. ** ** Called: ** eraCal2jd Gregorian calendar to JD ** eraDat delta(AT) = TAI-UTC ** eraJd2cal JD to Gregorian calendar ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int js, iy2, im2, id2; double dj, w, day, seclim, dat0, dat12, dat24, dleap, time; /* Today's Julian Day Number. */ js = eraCal2jd(iy, im, id, &dj, &w); if ( js ) return js; dj += w; /* Day length and final minute length in seconds (provisional). */ day = ERFA_DAYSEC; seclim = 60.0; /* Deal with the UTC leap second case. */ if ( ! strcmp(scale,"UTC") ) { /* TAI-UTC at 0h today. */ js = eraDat(iy, im, id, 0.0, &dat0); if ( js < 0 ) return js; /* TAI-UTC at 12h today (to detect drift). */ js = eraDat(iy, im, id, 0.5, &dat12); if ( js < 0 ) return js; /* TAI-UTC at 0h tomorrow (to detect jumps). */ js = eraJd2cal ( dj, 1.5, &iy2, &im2, &id2, &w); if ( js ) return js; js = eraDat(iy2, im2, id2, 0.0, &dat24); if ( js < 0 ) return js; /* Any sudden change in TAI-UTC between today and tomorrow. */ dleap = dat24 - (2.0*dat12 - dat0); /* If leap second day, correct the day and final minute lengths. */ day += dleap; if ( ihr == 23 && imn == 59 ) seclim += dleap; /* End of UTC-specific actions. */ } /* Validate the time. */ if ( ihr >= 0 && ihr <= 23 ) { if ( imn >= 0 && imn <= 59 ) { if ( sec >= 0 ) { if ( sec >= seclim ) { js += 2; } } else { js = -6; } } else { js = -5; } } else { js = -4; } if ( js < 0 ) return js; /* The time in days. */ time = ( 60.0 * ( (double) ( 60 * ihr + imn ) ) + sec ) / day; /* Return the date and time. */ *d1 = dj; *d2 = time; /* Status. */ return js; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pb06.c0000644001134200020070000001410112640262015017412 0ustar embrayscience00000000000000#include "erfa.h" void eraPb06(double date1, double date2, double *bzeta, double *bz, double *btheta) /* ** - - - - - - - - ** e r a P b 0 6 ** - - - - - - - - ** ** This function forms three Euler angles which implement general ** precession from epoch J2000.0, using the IAU 2006 model. Frame ** bias (the offset between ICRS and mean J2000.0) is included. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** bzeta double 1st rotation: radians cw around z ** bz double 3rd rotation: radians cw around z ** btheta double 2nd rotation: radians ccw around y ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The traditional accumulated precession angles zeta_A, z_A, ** theta_A cannot be obtained in the usual way, namely through ** polynomial expressions, because of the frame bias. The latter ** means that two of the angles undergo rapid changes near this ** date. They are instead the results of decomposing the ** precession-bias matrix obtained by using the Fukushima-Williams ** method, which does not suffer from the problem. The ** decomposition returns values which can be used in the ** conventional formulation and which include frame bias. ** ** 3) The three angles are returned in the conventional order, which ** is not the same as the order of the corresponding Euler ** rotations. The precession-bias matrix is ** R_3(-z) x R_2(+theta) x R_3(-zeta). ** ** 4) Should zeta_A, z_A, theta_A angles be required that do not ** contain frame bias, they are available by calling the ERFA ** function eraP06e. ** ** Called: ** eraPmat06 PB matrix, IAU 2006 ** eraRz rotate around Z-axis ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double r[3][3], r31, r32; /* Precession matrix via Fukushima-Williams angles. */ eraPmat06(date1, date2, r); /* Solve for z. */ *bz = atan2(r[1][2], r[0][2]); /* Remove it from the matrix. */ eraRz(*bz, r); /* Solve for the remaining two angles. */ *bzeta = atan2 (r[1][0], r[1][1]); r31 = r[2][0]; r32 = r[2][1]; *btheta = atan2(-ERFA_DSIGN(sqrt(r31 * r31 + r32 * r32), r[0][2]), r[2][2]); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/g2icrs.c0000644001134200020070000001542112640262015020042 0ustar embrayscience00000000000000#include "erfa.h" void eraG2icrs ( double dl, double db, double *dr, double *dd ) /* ** - - - - - - - - - - ** e r a G 2 i c r s ** - - - - - - - - - - ** ** Transformation from Galactic Coordinates to ICRS. ** ** Given: ** dl double galactic longitude (radians) ** db double galactic latitude (radians) ** ** Returned: ** dr double ICRS right ascension (radians) ** dd double ICRS declination (radians) ** ** Notes: ** ** 1) The IAU 1958 system of Galactic coordinates was defined with ** respect to the now obsolete reference system FK4 B1950.0. When ** interpreting the system in a modern context, several factors have ** to be taken into account: ** ** . The inclusion in FK4 positions of the E-terms of aberration. ** ** . The distortion of the FK4 proper motion system by differential ** Galactic rotation. ** ** . The use of the B1950.0 equinox rather than the now-standard ** J2000.0. ** ** . The frame bias between ICRS and the J2000.0 mean place system. ** ** The Hipparcos Catalogue (Perryman & ESA 1997) provides a rotation ** matrix that transforms directly between ICRS and Galactic ** coordinates with the above factors taken into account. The ** matrix is derived from three angles, namely the ICRS coordinates ** of the Galactic pole and the longitude of the ascending node of ** the galactic equator on the ICRS equator. They are given in ** degrees to five decimal places and for canonical purposes are ** regarded as exact. In the Hipparcos Catalogue the matrix ** elements are given to 10 decimal places (about 20 microarcsec). ** In the present ERFA function the matrix elements have been ** recomputed from the canonical three angles and are given to 30 ** decimal places. ** ** 2) The inverse transformation is performed by the function eraIcrs2g. ** ** Called: ** eraAnp normalize angle into range 0 to 2pi ** eraAnpm normalize angle into range +/- pi ** eraS2c spherical coordinates to unit vector ** eraTrxp product of transpose of r-matrix and p-vector ** eraC2s p-vector to spherical ** ** Reference: ** Perryman M.A.C. & ESA, 1997, ESA SP-1200, The Hipparcos and Tycho ** catalogues. Astrometric and photometric star catalogues ** derived from the ESA Hipparcos Space Astrometry Mission. ESA ** Publications Division, Noordwijk, Netherlands. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double v1[3], v2[3]; /* ** L2,B2 system of galactic coordinates in the form presented in the ** Hipparcos Catalogue. In degrees: ** ** P = 192.85948 right ascension of the Galactic north pole in ICRS ** Q = 27.12825 declination of the Galactic north pole in ICRS ** R = 32.93192 longitude of the ascending node of the Galactic ** plane on the ICRS equator ** ** ICRS to galactic rotation matrix, obtained by computing ** R_3(-R) R_1(pi/2-Q) R_3(pi/2+P) to the full precision shown: */ double r[3][3] = { { -0.054875560416215368492398900454, -0.873437090234885048760383168409, -0.483835015548713226831774175116 }, { +0.494109427875583673525222371358, -0.444829629960011178146614061616, +0.746982244497218890527388004556 }, { -0.867666149019004701181616534570, -0.198076373431201528180486091412, +0.455983776175066922272100478348 } }; /* Spherical to Cartesian. */ eraS2c(dl, db, v1); /* Galactic to ICRS. */ eraTrxp(r, v1, v2); /* Cartesian to spherical. */ eraC2s(v2, dr, dd); /* Express in conventional ranges. */ *dr = eraAnp(*dr); *dd = eraAnpm(*dd); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/epb2jd.c0000644001134200020070000000745612640262015020030 0ustar embrayscience00000000000000#include "erfa.h" void eraEpb2jd(double epb, double *djm0, double *djm) /* ** - - - - - - - - - - ** e r a E p b 2 j d ** - - - - - - - - - - ** ** Besselian Epoch to Julian Date. ** ** Given: ** epb double Besselian Epoch (e.g. 1957.3) ** ** Returned: ** djm0 double MJD zero-point: always 2400000.5 ** djm double Modified Julian Date ** ** Note: ** ** The Julian Date is returned in two pieces, in the usual ERFA ** manner, which is designed to preserve time resolution. The ** Julian Date is available as a single number by adding djm0 and ** djm. ** ** Reference: ** ** Lieske, J.H., 1979, Astron.Astrophys. 73, 282. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { *djm0 = ERFA_DJM0; *djm = 15019.81352 + (epb - 1900.0) * ERFA_DTY; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pm.c0000644001134200020070000000652012640262015017265 0ustar embrayscience00000000000000#include "erfa.h" double eraPm(double p[3]) /* ** - - - - - - ** e r a P m ** - - - - - - ** ** Modulus of p-vector. ** ** Given: ** p double[3] p-vector ** ** Returned (function value): ** double modulus ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { return sqrt( p[0]*p[0] + p[1]*p[1] + p[2]*p[2] ); } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/utctai.c0000644001134200020070000001526312640262015020146 0ustar embrayscience00000000000000#include "erfa.h" int eraUtctai(double utc1, double utc2, double *tai1, double *tai2) /* ** - - - - - - - - - - ** e r a U t c t a i ** - - - - - - - - - - ** ** Time scale transformation: Coordinated Universal Time, UTC, to ** International Atomic Time, TAI. ** ** Given: ** utc1,utc2 double UTC as a 2-part quasi Julian Date (Notes 1-4) ** ** Returned: ** tai1,tai2 double TAI as a 2-part Julian Date (Note 5) ** ** Returned (function value): ** int status: +1 = dubious year (Note 3) ** 0 = OK ** -1 = unacceptable date ** ** Notes: ** ** 1) utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any ** convenient way between the two arguments, for example where utc1 ** is the Julian Day Number and utc2 is the fraction of a day. ** ** 2) JD cannot unambiguously represent UTC during a leap second unless ** special measures are taken. The convention in the present ** function is that the JD day represents UTC days whether the ** length is 86399, 86400 or 86401 SI seconds. In the 1960-1972 era ** there were smaller jumps (in either direction) each time the ** linear UTC(TAI) expression was changed, and these "mini-leaps" ** are also included in the ERFA convention. ** ** 3) The warning status "dubious year" flags UTCs that predate the ** introduction of the time scale or that are too far in the future ** to be trusted. See eraDat for further details. ** ** 4) The function eraDtf2d converts from calendar date and time of day ** into 2-part Julian Date, and in the case of UTC implements the ** leap-second-ambiguity convention described above. ** ** 5) The returned TAI1,TAI2 are such that their sum is the TAI Julian ** Date. ** ** Called: ** eraJd2cal JD to Gregorian calendar ** eraDat delta(AT) = TAI-UTC ** eraCal2jd Gregorian calendar to JD ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int big1; int iy, im, id, j, iyt, imt, idt; double u1, u2, fd, dat0, dat12, w, dat24, dlod, dleap, z1, z2, a2; /* Put the two parts of the UTC into big-first order. */ big1 = ( utc1 >= utc2 ); if ( big1 ) { u1 = utc1; u2 = utc2; } else { u1 = utc2; u2 = utc1; } /* Get TAI-UTC at 0h today. */ j = eraJd2cal(u1, u2, &iy, &im, &id, &fd); if ( j ) return j; j = eraDat(iy, im, id, 0.0, &dat0); if ( j < 0 ) return j; /* Get TAI-UTC at 12h today (to detect drift). */ j = eraDat(iy, im, id, 0.5, &dat12); if ( j < 0 ) return j; /* Get TAI-UTC at 0h tomorrow (to detect jumps). */ j = eraJd2cal(u1+1.5, u2-fd, &iyt, &imt, &idt, &w); if ( j ) return j; j = eraDat(iyt, imt, idt, 0.0, &dat24); if ( j < 0 ) return j; /* Separate TAI-UTC change into per-day (DLOD) and any jump (DLEAP). */ dlod = 2.0 * (dat12 - dat0); dleap = dat24 - (dat0 + dlod); /* Remove any scaling applied to spread leap into preceding day. */ fd *= (ERFA_DAYSEC+dleap)/ERFA_DAYSEC; /* Scale from (pre-1972) UTC seconds to SI seconds. */ fd *= (ERFA_DAYSEC+dlod)/ERFA_DAYSEC; /* Today's calendar date to 2-part JD. */ if ( eraCal2jd(iy, im, id, &z1, &z2) ) return -1; /* Assemble the TAI result, preserving the UTC split and order. */ a2 = z1 - u1; a2 += z2; a2 += fd + dat0/ERFA_DAYSEC; if ( big1 ) { *tai1 = u1; *tai2 = a2; } else { *tai1 = a2; *tai2 = u1; } /* Status. */ return j; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/xys00a.c0000644001134200020070000001266712640262015020006 0ustar embrayscience00000000000000#include "erfa.h" void eraXys00a(double date1, double date2, double *x, double *y, double *s) /* ** - - - - - - - - - - ** e r a X y s 0 0 a ** - - - - - - - - - - ** ** For a given TT date, compute the X,Y coordinates of the Celestial ** Intermediate Pole and the CIO locator s, using the IAU 2000A ** precession-nutation model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** x,y double Celestial Intermediate Pole (Note 2) ** s double the CIO locator s (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The Celestial Intermediate Pole coordinates are the x,y ** components of the unit vector in the Geocentric Celestial ** Reference System. ** ** 3) The CIO locator s (in radians) positions the Celestial ** Intermediate Origin on the equator of the CIP. ** ** 4) A faster, but slightly less accurate result (about 1 mas for ** X,Y), can be obtained by using instead the eraXys00b function. ** ** Called: ** eraPnm00a classical NPB matrix, IAU 2000A ** eraBpn2xy extract CIP X,Y coordinates from NPB matrix ** eraS00 the CIO locator s, given X,Y, IAU 2000A ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rbpn[3][3]; /* Form the bias-precession-nutation matrix, IAU 2000A. */ eraPnm00a(date1, date2, rbpn); /* Extract X,Y. */ eraBpn2xy(rbpn, x, y); /* Obtain s. */ *s = eraS00(date1, date2, *x, *y); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/taiutc.c0000644001134200020070000001360712640262015020146 0ustar embrayscience00000000000000#include "erfa.h" int eraTaiutc(double tai1, double tai2, double *utc1, double *utc2) /* ** - - - - - - - - - - ** e r a T a i u t c ** - - - - - - - - - - ** ** Time scale transformation: International Atomic Time, TAI, to ** Coordinated Universal Time, UTC. ** ** Given: ** tai1,tai2 double TAI as a 2-part Julian Date (Note 1) ** ** Returned: ** utc1,utc2 double UTC as a 2-part quasi Julian Date (Notes 1-3) ** ** Returned (function value): ** int status: +1 = dubious year (Note 4) ** 0 = OK ** -1 = unacceptable date ** ** Notes: ** ** 1) tai1+tai2 is Julian Date, apportioned in any convenient way ** between the two arguments, for example where tai1 is the Julian ** Day Number and tai2 is the fraction of a day. The returned utc1 ** and utc2 form an analogous pair, except that a special convention ** is used, to deal with the problem of leap seconds - see the next ** note. ** ** 2) JD cannot unambiguously represent UTC during a leap second unless ** special measures are taken. The convention in the present ** function is that the JD day represents UTC days whether the ** length is 86399, 86400 or 86401 SI seconds. In the 1960-1972 era ** there were smaller jumps (in either direction) each time the ** linear UTC(TAI) expression was changed, and these "mini-leaps" ** are also included in the ERFA convention. ** ** 3) The function eraD2dtf can be used to transform the UTC quasi-JD ** into calendar date and clock time, including UTC leap second ** handling. ** ** 4) The warning status "dubious year" flags UTCs that predate the ** introduction of the time scale or that are too far in the future ** to be trusted. See eraDat for further details. ** ** Called: ** eraUtctai UTC to TAI ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int big1; int i, j; double a1, a2, u1, u2, g1, g2; /* Put the two parts of the TAI into big-first order. */ big1 = ( tai1 >= tai2 ); if ( big1 ) { a1 = tai1; a2 = tai2; } else { a1 = tai2; a2 = tai1; } /* Initial guess for UTC. */ u1 = a1; u2 = a2; /* Iterate (though in most cases just once is enough). */ for ( i = 0; i < 3; i++ ) { /* Guessed UTC to TAI. */ j = eraUtctai(u1, u2, &g1, &g2); if ( j < 0 ) return j; /* Adjust guessed UTC. */ u2 += a1 - g1; u2 += a2 - g2; } /* Return the UTC result, preserving the TAI order. */ if ( big1 ) { *utc1 = u1; *utc2 = u2; } else { *utc1 = u2; *utc2 = u1; } /* Status. */ return j; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/obl80.c0000644001134200020070000001162212640262015017574 0ustar embrayscience00000000000000#include "erfa.h" double eraObl80(double date1, double date2) /* ** - - - - - - - - - ** e r a O b l 8 0 ** - - - - - - - - - ** ** Mean obliquity of the ecliptic, IAU 1980 model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned (function value): ** double obliquity of the ecliptic (radians, Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The result is the angle between the ecliptic and mean equator of ** date date1+date2. ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992), ** Expression 3.222-1 (p114). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t, eps0; /* Interval between fundamental epoch J2000.0 and given date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* Mean obliquity of date. */ eps0 = ERFA_DAS2R * (84381.448 + (-46.8150 + (-0.00059 + ( 0.001813) * t) * t) * t); return eps0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/erfam.h0000644001134200020070000001616312640262015017754 0ustar embrayscience00000000000000#ifndef ERFAMHDEF #define ERFAMHDEF /* ** - - - - - - - - ** e r f a m . h ** - - - - - - - - ** ** Macros used by ERFA library. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ /* Star-independent astrometry parameters */ typedef struct { double pmt; /* PM time interval (SSB, Julian years) */ double eb[3]; /* SSB to observer (vector, au) */ double eh[3]; /* Sun to observer (unit vector) */ double em; /* distance from Sun to observer (au) */ double v[3]; /* barycentric observer velocity (vector, c) */ double bm1; /* sqrt(1-|v|^2): reciprocal of Lorenz factor */ double bpn[3][3]; /* bias-precession-nutation matrix */ double along; /* longitude + s' + dERA(DUT) (radians) */ double phi; /* geodetic latitude (radians) */ double xpl; /* polar motion xp wrt local meridian (radians) */ double ypl; /* polar motion yp wrt local meridian (radians) */ double sphi; /* sine of geodetic latitude */ double cphi; /* cosine of geodetic latitude */ double diurab; /* magnitude of diurnal aberration vector */ double eral; /* "local" Earth rotation angle (radians) */ double refa; /* refraction constant A (radians) */ double refb; /* refraction constant B (radians) */ } eraASTROM; /* (Vectors eb, eh, em and v are all with respect to BCRS axes.) */ /* Body parameters for light deflection */ typedef struct { double bm; /* mass of the body (solar masses) */ double dl; /* deflection limiter (radians^2/2) */ double pv[2][3]; /* barycentric PV of the body (au, au/day) */ } eraLDBODY; /* Pi */ #define ERFA_DPI (3.141592653589793238462643) /* 2Pi */ #define ERFA_D2PI (6.283185307179586476925287) /* Radians to degrees */ #define ERFA_DR2D (57.29577951308232087679815) /* Degrees to radians */ #define ERFA_DD2R (1.745329251994329576923691e-2) /* Radians to arcseconds */ #define ERFA_DR2AS (206264.8062470963551564734) /* Arcseconds to radians */ #define ERFA_DAS2R (4.848136811095359935899141e-6) /* Seconds of time to radians */ #define ERFA_DS2R (7.272205216643039903848712e-5) /* Arcseconds in a full circle */ #define ERFA_TURNAS (1296000.0) /* Milliarcseconds to radians */ #define ERFA_DMAS2R (ERFA_DAS2R / 1e3) /* Length of tropical year B1900 (days) */ #define ERFA_DTY (365.242198781) /* Seconds per day. */ #define ERFA_DAYSEC (86400.0) /* Days per Julian year */ #define ERFA_DJY (365.25) /* Days per Julian century */ #define ERFA_DJC (36525.0) /* Days per Julian millennium */ #define ERFA_DJM (365250.0) /* Reference epoch (J2000.0), Julian Date */ #define ERFA_DJ00 (2451545.0) /* Julian Date of Modified Julian Date zero */ #define ERFA_DJM0 (2400000.5) /* Reference epoch (J2000.0), Modified Julian Date */ #define ERFA_DJM00 (51544.5) /* 1977 Jan 1.0 as MJD */ #define ERFA_DJM77 (43144.0) /* TT minus TAI (s) */ #define ERFA_TTMTAI (32.184) /* Astronomical unit (m) */ #define ERFA_DAU (149597870e3) /* Speed of light (m/s) */ #define ERFA_CMPS 299792458.0 /* Light time for 1 au (s) */ #define ERFA_AULT 499.004782 /* Speed of light (AU per day) */ #define ERFA_DC (ERFA_DAYSEC / ERFA_AULT) /* L_G = 1 - d(TT)/d(TCG) */ #define ERFA_ELG (6.969290134e-10) /* L_B = 1 - d(TDB)/d(TCB), and TDB (s) at TAI 1977/1/1.0 */ #define ERFA_ELB (1.550519768e-8) #define ERFA_TDB0 (-6.55e-5) /* Schwarzschild radius of the Sun (au) */ /* = 2 * 1.32712440041e20 / (2.99792458e8)^2 / 1.49597870700e11 */ #define ERFA_SRS 1.97412574336e-8 /* ERFA_DINT(A) - truncate to nearest whole number towards zero (double) */ #define ERFA_DINT(A) ((A)<0.0?ceil(A):floor(A)) /* ERFA_DNINT(A) - round to nearest whole number (double) */ #define ERFA_DNINT(A) ((A)<0.0?ceil((A)-0.5):floor((A)+0.5)) /* ERFA_DSIGN(A,B) - magnitude of A with sign of B (double) */ #define ERFA_DSIGN(A,B) ((B)<0.0?-fabs(A):fabs(A)) /* max(A,B) - larger (most +ve) of two numbers (generic) */ #define ERFA_GMAX(A,B) (((A)>(B))?(A):(B)) /* min(A,B) - smaller (least +ve) of two numbers (generic) */ #define ERFA_GMIN(A,B) (((A)<(B))?(A):(B)) /* Reference ellipsoids */ #define ERFA_WGS84 1 #define ERFA_GRS80 2 #define ERFA_WGS72 3 #endif /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/rxpv.c0000644001134200020070000000712212640262015017647 0ustar embrayscience00000000000000#include "erfa.h" void eraRxpv(double r[3][3], double pv[2][3], double rpv[2][3]) /* ** - - - - - - - - ** e r a R x p v ** - - - - - - - - ** ** Multiply a pv-vector by an r-matrix. ** ** Given: ** r double[3][3] r-matrix ** pv double[2][3] pv-vector ** ** Returned: ** rpv double[2][3] r * pv ** ** Note: ** It is permissible for pv and rpv to be the same array. ** ** Called: ** eraRxp product of r-matrix and p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraRxp(r, pv[0], rpv[0]); eraRxp(r, pv[1], rpv[1]); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/dtdb.c0000644001134200020070000017125112640262015017572 0ustar embrayscience00000000000000#include "erfa.h" double eraDtdb(double date1, double date2, double ut, double elong, double u, double v) /* ** - - - - - - - - ** e r a D t d b ** - - - - - - - - ** ** An approximation to TDB-TT, the difference between barycentric ** dynamical time and terrestrial time, for an observer on the Earth. ** ** The different time scales - proper, coordinate and realized - are ** related to each other: ** ** TAI <- physically realized ** : ** offset <- observed (nominally +32.184s) ** : ** TT <- terrestrial time ** : ** rate adjustment (L_G) <- definition of TT ** : ** TCG <- time scale for GCRS ** : ** "periodic" terms <- eraDtdb is an implementation ** : ** rate adjustment (L_C) <- function of solar-system ephemeris ** : ** TCB <- time scale for BCRS ** : ** rate adjustment (-L_B) <- definition of TDB ** : ** TDB <- TCB scaled to track TT ** : ** "periodic" terms <- -eraDtdb is an approximation ** : ** TT <- terrestrial time ** ** Adopted values for the various constants can be found in the IERS ** Conventions (McCarthy & Petit 2003). ** ** Given: ** date1,date2 double date, TDB (Notes 1-3) ** ut double universal time (UT1, fraction of one day) ** elong double longitude (east positive, radians) ** u double distance from Earth spin axis (km) ** v double distance north of equatorial plane (km) ** ** Returned (function value): ** double TDB-TT (seconds) ** ** Notes: ** ** 1) The date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** Although the date is, formally, barycentric dynamical time (TDB), ** the terrestrial dynamical time (TT) can be used with no practical ** effect on the accuracy of the prediction. ** ** 2) TT can be regarded as a coordinate time that is realized as an ** offset of 32.184s from International Atomic Time, TAI. TT is a ** specific linear transformation of geocentric coordinate time TCG, ** which is the time scale for the Geocentric Celestial Reference ** System, GCRS. ** ** 3) TDB is a coordinate time, and is a specific linear transformation ** of barycentric coordinate time TCB, which is the time scale for ** the Barycentric Celestial Reference System, BCRS. ** ** 4) The difference TCG-TCB depends on the masses and positions of the ** bodies of the solar system and the velocity of the Earth. It is ** dominated by a rate difference, the residual being of a periodic ** character. The latter, which is modeled by the present function, ** comprises a main (annual) sinusoidal term of amplitude ** approximately 0.00166 seconds, plus planetary terms up to about ** 20 microseconds, and lunar and diurnal terms up to 2 microseconds. ** These effects come from the changing transverse Doppler effect ** and gravitational red-shift as the observer (on the Earth's ** surface) experiences variations in speed (with respect to the ** BCRS) and gravitational potential. ** ** 5) TDB can be regarded as the same as TCB but with a rate adjustment ** to keep it close to TT, which is convenient for many applications. ** The history of successive attempts to define TDB is set out in ** Resolution 3 adopted by the IAU General Assembly in 2006, which ** defines a fixed TDB(TCB) transformation that is consistent with ** contemporary solar-system ephemerides. Future ephemerides will ** imply slightly changed transformations between TCG and TCB, which ** could introduce a linear drift between TDB and TT; however, any ** such drift is unlikely to exceed 1 nanosecond per century. ** ** 6) The geocentric TDB-TT model used in the present function is that of ** Fairhead & Bretagnon (1990), in its full form. It was originally ** supplied by Fairhead (private communications with P.T.Wallace, ** 1990) as a Fortran subroutine. The present C function contains an ** adaptation of the Fairhead code. The numerical results are ** essentially unaffected by the changes, the differences with ** respect to the Fairhead & Bretagnon original being at the 1e-20 s ** level. ** ** The topocentric part of the model is from Moyer (1981) and ** Murray (1983), with fundamental arguments adapted from ** Simon et al. 1994. It is an approximation to the expression ** ( v / c ) . ( r / c ), where v is the barycentric velocity of ** the Earth, r is the geocentric position of the observer and ** c is the speed of light. ** ** By supplying zeroes for u and v, the topocentric part of the ** model can be nullified, and the function will return the Fairhead ** & Bretagnon result alone. ** ** 7) During the interval 1950-2050, the absolute accuracy is better ** than +/- 3 nanoseconds relative to time ephemerides obtained by ** direct numerical integrations based on the JPL DE405 solar system ** ephemeris. ** ** 8) It must be stressed that the present function is merely a model, ** and that numerical integration of solar-system ephemerides is the ** definitive method for predicting the relationship between TCG and ** TCB and hence between TT and TDB. ** ** References: ** ** Fairhead, L., & Bretagnon, P., Astron.Astrophys., 229, 240-247 ** (1990). ** ** IAU 2006 Resolution 3. ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Moyer, T.D., Cel.Mech., 23, 33 (1981). ** ** Murray, C.A., Vectorial Astrometry, Adam Hilger (1983). ** ** Seidelmann, P.K. et al., Explanatory Supplement to the ** Astronomical Almanac, Chapter 2, University Science Books (1992). ** ** Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G. & Laskar, J., Astron.Astrophys., 282, 663-683 (1994). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t, tsol, w, elsun, emsun, d, elj, els, wt, w0, w1, w2, w3, w4, wf, wj; int j; /* ** ===================== ** Fairhead et al. model ** ===================== ** ** 787 sets of three coefficients. ** ** Each set is ** amplitude (microseconds) ** frequency (radians per Julian millennium since J2000.0) ** phase (radians) ** ** Sets 1-474 are the T**0 terms ** " 475-679 " " T**1 ** " 680-764 " " T**2 ** " 765-784 " " T**3 ** " 785-787 " " T**4 */ static const double fairhd[787][3] = { /* 1, 10 */ { 1656.674564e-6, 6283.075849991, 6.240054195 }, { 22.417471e-6, 5753.384884897, 4.296977442 }, { 13.839792e-6, 12566.151699983, 6.196904410 }, { 4.770086e-6, 529.690965095, 0.444401603 }, { 4.676740e-6, 6069.776754553, 4.021195093 }, { 2.256707e-6, 213.299095438, 5.543113262 }, { 1.694205e-6, -3.523118349, 5.025132748 }, { 1.554905e-6, 77713.771467920, 5.198467090 }, { 1.276839e-6, 7860.419392439, 5.988822341 }, { 1.193379e-6, 5223.693919802, 3.649823730 }, /* 11, 20 */ { 1.115322e-6, 3930.209696220, 1.422745069 }, { 0.794185e-6, 11506.769769794, 2.322313077 }, { 0.447061e-6, 26.298319800, 3.615796498 }, { 0.435206e-6, -398.149003408, 4.349338347 }, { 0.600309e-6, 1577.343542448, 2.678271909 }, { 0.496817e-6, 6208.294251424, 5.696701824 }, { 0.486306e-6, 5884.926846583, 0.520007179 }, { 0.432392e-6, 74.781598567, 2.435898309 }, { 0.468597e-6, 6244.942814354, 5.866398759 }, { 0.375510e-6, 5507.553238667, 4.103476804 }, /* 21, 30 */ { 0.243085e-6, -775.522611324, 3.651837925 }, { 0.173435e-6, 18849.227549974, 6.153743485 }, { 0.230685e-6, 5856.477659115, 4.773852582 }, { 0.203747e-6, 12036.460734888, 4.333987818 }, { 0.143935e-6, -796.298006816, 5.957517795 }, { 0.159080e-6, 10977.078804699, 1.890075226 }, { 0.119979e-6, 38.133035638, 4.551585768 }, { 0.118971e-6, 5486.777843175, 1.914547226 }, { 0.116120e-6, 1059.381930189, 0.873504123 }, { 0.137927e-6, 11790.629088659, 1.135934669 }, /* 31, 40 */ { 0.098358e-6, 2544.314419883, 0.092793886 }, { 0.101868e-6, -5573.142801634, 5.984503847 }, { 0.080164e-6, 206.185548437, 2.095377709 }, { 0.079645e-6, 4694.002954708, 2.949233637 }, { 0.062617e-6, 20.775395492, 2.654394814 }, { 0.075019e-6, 2942.463423292, 4.980931759 }, { 0.064397e-6, 5746.271337896, 1.280308748 }, { 0.063814e-6, 5760.498431898, 4.167901731 }, { 0.048042e-6, 2146.165416475, 1.495846011 }, { 0.048373e-6, 155.420399434, 2.251573730 }, /* 41, 50 */ { 0.058844e-6, 426.598190876, 4.839650148 }, { 0.046551e-6, -0.980321068, 0.921573539 }, { 0.054139e-6, 17260.154654690, 3.411091093 }, { 0.042411e-6, 6275.962302991, 2.869567043 }, { 0.040184e-6, -7.113547001, 3.565975565 }, { 0.036564e-6, 5088.628839767, 3.324679049 }, { 0.040759e-6, 12352.852604545, 3.981496998 }, { 0.036507e-6, 801.820931124, 6.248866009 }, { 0.036955e-6, 3154.687084896, 5.071801441 }, { 0.042732e-6, 632.783739313, 5.720622217 }, /* 51, 60 */ { 0.042560e-6, 161000.685737473, 1.270837679 }, { 0.040480e-6, 15720.838784878, 2.546610123 }, { 0.028244e-6, -6286.598968340, 5.069663519 }, { 0.033477e-6, 6062.663207553, 4.144987272 }, { 0.034867e-6, 522.577418094, 5.210064075 }, { 0.032438e-6, 6076.890301554, 0.749317412 }, { 0.030215e-6, 7084.896781115, 3.389610345 }, { 0.029247e-6, -71430.695617928, 4.183178762 }, { 0.033529e-6, 9437.762934887, 2.404714239 }, { 0.032423e-6, 8827.390269875, 5.541473556 }, /* 61, 70 */ { 0.027567e-6, 6279.552731642, 5.040846034 }, { 0.029862e-6, 12139.553509107, 1.770181024 }, { 0.022509e-6, 10447.387839604, 1.460726241 }, { 0.020937e-6, 8429.241266467, 0.652303414 }, { 0.020322e-6, 419.484643875, 3.735430632 }, { 0.024816e-6, -1194.447010225, 1.087136918 }, { 0.025196e-6, 1748.016413067, 2.901883301 }, { 0.021691e-6, 14143.495242431, 5.952658009 }, { 0.017673e-6, 6812.766815086, 3.186129845 }, { 0.022567e-6, 6133.512652857, 3.307984806 }, /* 71, 80 */ { 0.016155e-6, 10213.285546211, 1.331103168 }, { 0.014751e-6, 1349.867409659, 4.308933301 }, { 0.015949e-6, -220.412642439, 4.005298270 }, { 0.015974e-6, -2352.866153772, 6.145309371 }, { 0.014223e-6, 17789.845619785, 2.104551349 }, { 0.017806e-6, 73.297125859, 3.475975097 }, { 0.013671e-6, -536.804512095, 5.971672571 }, { 0.011942e-6, 8031.092263058, 2.053414715 }, { 0.014318e-6, 16730.463689596, 3.016058075 }, { 0.012462e-6, 103.092774219, 1.737438797 }, /* 81, 90 */ { 0.010962e-6, 3.590428652, 2.196567739 }, { 0.015078e-6, 19651.048481098, 3.969480770 }, { 0.010396e-6, 951.718406251, 5.717799605 }, { 0.011707e-6, -4705.732307544, 2.654125618 }, { 0.010453e-6, 5863.591206116, 1.913704550 }, { 0.012420e-6, 4690.479836359, 4.734090399 }, { 0.011847e-6, 5643.178563677, 5.489005403 }, { 0.008610e-6, 3340.612426700, 3.661698944 }, { 0.011622e-6, 5120.601145584, 4.863931876 }, { 0.010825e-6, 553.569402842, 0.842715011 }, /* 91, 100 */ { 0.008666e-6, -135.065080035, 3.293406547 }, { 0.009963e-6, 149.563197135, 4.870690598 }, { 0.009858e-6, 6309.374169791, 1.061816410 }, { 0.007959e-6, 316.391869657, 2.465042647 }, { 0.010099e-6, 283.859318865, 1.942176992 }, { 0.007147e-6, -242.728603974, 3.661486981 }, { 0.007505e-6, 5230.807466803, 4.920937029 }, { 0.008323e-6, 11769.853693166, 1.229392026 }, { 0.007490e-6, -6256.777530192, 3.658444681 }, { 0.009370e-6, 149854.400134205, 0.673880395 }, /* 101, 110 */ { 0.007117e-6, 38.027672636, 5.294249518 }, { 0.007857e-6, 12168.002696575, 0.525733528 }, { 0.007019e-6, 6206.809778716, 0.837688810 }, { 0.006056e-6, 955.599741609, 4.194535082 }, { 0.008107e-6, 13367.972631107, 3.793235253 }, { 0.006731e-6, 5650.292110678, 5.639906583 }, { 0.007332e-6, 36.648562930, 0.114858677 }, { 0.006366e-6, 4164.311989613, 2.262081818 }, { 0.006858e-6, 5216.580372801, 0.642063318 }, { 0.006919e-6, 6681.224853400, 6.018501522 }, /* 111, 120 */ { 0.006826e-6, 7632.943259650, 3.458654112 }, { 0.005308e-6, -1592.596013633, 2.500382359 }, { 0.005096e-6, 11371.704689758, 2.547107806 }, { 0.004841e-6, 5333.900241022, 0.437078094 }, { 0.005582e-6, 5966.683980335, 2.246174308 }, { 0.006304e-6, 11926.254413669, 2.512929171 }, { 0.006603e-6, 23581.258177318, 5.393136889 }, { 0.005123e-6, -1.484472708, 2.999641028 }, { 0.004648e-6, 1589.072895284, 1.275847090 }, { 0.005119e-6, 6438.496249426, 1.486539246 }, /* 121, 130 */ { 0.004521e-6, 4292.330832950, 6.140635794 }, { 0.005680e-6, 23013.539539587, 4.557814849 }, { 0.005488e-6, -3.455808046, 0.090675389 }, { 0.004193e-6, 7234.794256242, 4.869091389 }, { 0.003742e-6, 7238.675591600, 4.691976180 }, { 0.004148e-6, -110.206321219, 3.016173439 }, { 0.004553e-6, 11499.656222793, 5.554998314 }, { 0.004892e-6, 5436.993015240, 1.475415597 }, { 0.004044e-6, 4732.030627343, 1.398784824 }, { 0.004164e-6, 12491.370101415, 5.650931916 }, /* 131, 140 */ { 0.004349e-6, 11513.883316794, 2.181745369 }, { 0.003919e-6, 12528.018664345, 5.823319737 }, { 0.003129e-6, 6836.645252834, 0.003844094 }, { 0.004080e-6, -7058.598461315, 3.690360123 }, { 0.003270e-6, 76.266071276, 1.517189902 }, { 0.002954e-6, 6283.143160294, 4.447203799 }, { 0.002872e-6, 28.449187468, 1.158692983 }, { 0.002881e-6, 735.876513532, 0.349250250 }, { 0.003279e-6, 5849.364112115, 4.893384368 }, { 0.003625e-6, 6209.778724132, 1.473760578 }, /* 141, 150 */ { 0.003074e-6, 949.175608970, 5.185878737 }, { 0.002775e-6, 9917.696874510, 1.030026325 }, { 0.002646e-6, 10973.555686350, 3.918259169 }, { 0.002575e-6, 25132.303399966, 6.109659023 }, { 0.003500e-6, 263.083923373, 1.892100742 }, { 0.002740e-6, 18319.536584880, 4.320519510 }, { 0.002464e-6, 202.253395174, 4.698203059 }, { 0.002409e-6, 2.542797281, 5.325009315 }, { 0.003354e-6, -90955.551694697, 1.942656623 }, { 0.002296e-6, 6496.374945429, 5.061810696 }, /* 151, 160 */ { 0.003002e-6, 6172.869528772, 2.797822767 }, { 0.003202e-6, 27511.467873537, 0.531673101 }, { 0.002954e-6, -6283.008539689, 4.533471191 }, { 0.002353e-6, 639.897286314, 3.734548088 }, { 0.002401e-6, 16200.772724501, 2.605547070 }, { 0.003053e-6, 233141.314403759, 3.029030662 }, { 0.003024e-6, 83286.914269554, 2.355556099 }, { 0.002863e-6, 17298.182327326, 5.240963796 }, { 0.002103e-6, -7079.373856808, 5.756641637 }, { 0.002303e-6, 83996.847317911, 2.013686814 }, /* 161, 170 */ { 0.002303e-6, 18073.704938650, 1.089100410 }, { 0.002381e-6, 63.735898303, 0.759188178 }, { 0.002493e-6, 6386.168624210, 0.645026535 }, { 0.002366e-6, 3.932153263, 6.215885448 }, { 0.002169e-6, 11015.106477335, 4.845297676 }, { 0.002397e-6, 6243.458341645, 3.809290043 }, { 0.002183e-6, 1162.474704408, 6.179611691 }, { 0.002353e-6, 6246.427287062, 4.781719760 }, { 0.002199e-6, -245.831646229, 5.956152284 }, { 0.001729e-6, 3894.181829542, 1.264976635 }, /* 171, 180 */ { 0.001896e-6, -3128.388765096, 4.914231596 }, { 0.002085e-6, 35.164090221, 1.405158503 }, { 0.002024e-6, 14712.317116458, 2.752035928 }, { 0.001737e-6, 6290.189396992, 5.280820144 }, { 0.002229e-6, 491.557929457, 1.571007057 }, { 0.001602e-6, 14314.168113050, 4.203664806 }, { 0.002186e-6, 454.909366527, 1.402101526 }, { 0.001897e-6, 22483.848574493, 4.167932508 }, { 0.001825e-6, -3738.761430108, 0.545828785 }, { 0.001894e-6, 1052.268383188, 5.817167450 }, /* 181, 190 */ { 0.001421e-6, 20.355319399, 2.419886601 }, { 0.001408e-6, 10984.192351700, 2.732084787 }, { 0.001847e-6, 10873.986030480, 2.903477885 }, { 0.001391e-6, -8635.942003763, 0.593891500 }, { 0.001388e-6, -7.046236698, 1.166145902 }, { 0.001810e-6, -88860.057071188, 0.487355242 }, { 0.001288e-6, -1990.745017041, 3.913022880 }, { 0.001297e-6, 23543.230504682, 3.063805171 }, { 0.001335e-6, -266.607041722, 3.995764039 }, { 0.001376e-6, 10969.965257698, 5.152914309 }, /* 191, 200 */ { 0.001745e-6, 244287.600007027, 3.626395673 }, { 0.001649e-6, 31441.677569757, 1.952049260 }, { 0.001416e-6, 9225.539273283, 4.996408389 }, { 0.001238e-6, 4804.209275927, 5.503379738 }, { 0.001472e-6, 4590.910180489, 4.164913291 }, { 0.001169e-6, 6040.347246017, 5.841719038 }, { 0.001039e-6, 5540.085789459, 2.769753519 }, { 0.001004e-6, -170.672870619, 0.755008103 }, { 0.001284e-6, 10575.406682942, 5.306538209 }, { 0.001278e-6, 71.812653151, 4.713486491 }, /* 201, 210 */ { 0.001321e-6, 18209.330263660, 2.624866359 }, { 0.001297e-6, 21228.392023546, 0.382603541 }, { 0.000954e-6, 6282.095528923, 0.882213514 }, { 0.001145e-6, 6058.731054289, 1.169483931 }, { 0.000979e-6, 5547.199336460, 5.448375984 }, { 0.000987e-6, -6262.300454499, 2.656486959 }, { 0.001070e-6, -154717.609887482, 1.827624012 }, { 0.000991e-6, 4701.116501708, 4.387001801 }, { 0.001155e-6, -14.227094002, 3.042700750 }, { 0.001176e-6, 277.034993741, 3.335519004 }, /* 211, 220 */ { 0.000890e-6, 13916.019109642, 5.601498297 }, { 0.000884e-6, -1551.045222648, 1.088831705 }, { 0.000876e-6, 5017.508371365, 3.969902609 }, { 0.000806e-6, 15110.466119866, 5.142876744 }, { 0.000773e-6, -4136.910433516, 0.022067765 }, { 0.001077e-6, 175.166059800, 1.844913056 }, { 0.000954e-6, -6284.056171060, 0.968480906 }, { 0.000737e-6, 5326.786694021, 4.923831588 }, { 0.000845e-6, -433.711737877, 4.749245231 }, { 0.000819e-6, 8662.240323563, 5.991247817 }, /* 221, 230 */ { 0.000852e-6, 199.072001436, 2.189604979 }, { 0.000723e-6, 17256.631536341, 6.068719637 }, { 0.000940e-6, 6037.244203762, 6.197428148 }, { 0.000885e-6, 11712.955318231, 3.280414875 }, { 0.000706e-6, 12559.038152982, 2.824848947 }, { 0.000732e-6, 2379.164473572, 2.501813417 }, { 0.000764e-6, -6127.655450557, 2.236346329 }, { 0.000908e-6, 131.541961686, 2.521257490 }, { 0.000907e-6, 35371.887265976, 3.370195967 }, { 0.000673e-6, 1066.495477190, 3.876512374 }, /* 231, 240 */ { 0.000814e-6, 17654.780539750, 4.627122566 }, { 0.000630e-6, 36.027866677, 0.156368499 }, { 0.000798e-6, 515.463871093, 5.151962502 }, { 0.000798e-6, 148.078724426, 5.909225055 }, { 0.000806e-6, 309.278322656, 6.054064447 }, { 0.000607e-6, -39.617508346, 2.839021623 }, { 0.000601e-6, 412.371096874, 3.984225404 }, { 0.000646e-6, 11403.676995575, 3.852959484 }, { 0.000704e-6, 13521.751441591, 2.300991267 }, { 0.000603e-6, -65147.619767937, 4.140083146 }, /* 241, 250 */ { 0.000609e-6, 10177.257679534, 0.437122327 }, { 0.000631e-6, 5767.611978898, 4.026532329 }, { 0.000576e-6, 11087.285125918, 4.760293101 }, { 0.000674e-6, 14945.316173554, 6.270510511 }, { 0.000726e-6, 5429.879468239, 6.039606892 }, { 0.000710e-6, 28766.924424484, 5.672617711 }, { 0.000647e-6, 11856.218651625, 3.397132627 }, { 0.000678e-6, -5481.254918868, 6.249666675 }, { 0.000618e-6, 22003.914634870, 2.466427018 }, { 0.000738e-6, 6134.997125565, 2.242668890 }, /* 251, 260 */ { 0.000660e-6, 625.670192312, 5.864091907 }, { 0.000694e-6, 3496.032826134, 2.668309141 }, { 0.000531e-6, 6489.261398429, 1.681888780 }, { 0.000611e-6, -143571.324284214, 2.424978312 }, { 0.000575e-6, 12043.574281889, 4.216492400 }, { 0.000553e-6, 12416.588502848, 4.772158039 }, { 0.000689e-6, 4686.889407707, 6.224271088 }, { 0.000495e-6, 7342.457780181, 3.817285811 }, { 0.000567e-6, 3634.621024518, 1.649264690 }, { 0.000515e-6, 18635.928454536, 3.945345892 }, /* 261, 270 */ { 0.000486e-6, -323.505416657, 4.061673868 }, { 0.000662e-6, 25158.601719765, 1.794058369 }, { 0.000509e-6, 846.082834751, 3.053874588 }, { 0.000472e-6, -12569.674818332, 5.112133338 }, { 0.000461e-6, 6179.983075773, 0.513669325 }, { 0.000641e-6, 83467.156352816, 3.210727723 }, { 0.000520e-6, 10344.295065386, 2.445597761 }, { 0.000493e-6, 18422.629359098, 1.676939306 }, { 0.000478e-6, 1265.567478626, 5.487314569 }, { 0.000472e-6, -18.159247265, 1.999707589 }, /* 271, 280 */ { 0.000559e-6, 11190.377900137, 5.783236356 }, { 0.000494e-6, 9623.688276691, 3.022645053 }, { 0.000463e-6, 5739.157790895, 1.411223013 }, { 0.000432e-6, 16858.482532933, 1.179256434 }, { 0.000574e-6, 72140.628666286, 1.758191830 }, { 0.000484e-6, 17267.268201691, 3.290589143 }, { 0.000550e-6, 4907.302050146, 0.864024298 }, { 0.000399e-6, 14.977853527, 2.094441910 }, { 0.000491e-6, 224.344795702, 0.878372791 }, { 0.000432e-6, 20426.571092422, 6.003829241 }, /* 281, 290 */ { 0.000481e-6, 5749.452731634, 4.309591964 }, { 0.000480e-6, 5757.317038160, 1.142348571 }, { 0.000485e-6, 6702.560493867, 0.210580917 }, { 0.000426e-6, 6055.549660552, 4.274476529 }, { 0.000480e-6, 5959.570433334, 5.031351030 }, { 0.000466e-6, 12562.628581634, 4.959581597 }, { 0.000520e-6, 39302.096962196, 4.788002889 }, { 0.000458e-6, 12132.439962106, 1.880103788 }, { 0.000470e-6, 12029.347187887, 1.405611197 }, { 0.000416e-6, -7477.522860216, 1.082356330 }, /* 291, 300 */ { 0.000449e-6, 11609.862544012, 4.179989585 }, { 0.000465e-6, 17253.041107690, 0.353496295 }, { 0.000362e-6, -4535.059436924, 1.583849576 }, { 0.000383e-6, 21954.157609398, 3.747376371 }, { 0.000389e-6, 17.252277143, 1.395753179 }, { 0.000331e-6, 18052.929543158, 0.566790582 }, { 0.000430e-6, 13517.870106233, 0.685827538 }, { 0.000368e-6, -5756.908003246, 0.731374317 }, { 0.000330e-6, 10557.594160824, 3.710043680 }, { 0.000332e-6, 20199.094959633, 1.652901407 }, /* 301, 310 */ { 0.000384e-6, 11933.367960670, 5.827781531 }, { 0.000387e-6, 10454.501386605, 2.541182564 }, { 0.000325e-6, 15671.081759407, 2.178850542 }, { 0.000318e-6, 138.517496871, 2.253253037 }, { 0.000305e-6, 9388.005909415, 0.578340206 }, { 0.000352e-6, 5749.861766548, 3.000297967 }, { 0.000311e-6, 6915.859589305, 1.693574249 }, { 0.000297e-6, 24072.921469776, 1.997249392 }, { 0.000363e-6, -640.877607382, 5.071820966 }, { 0.000323e-6, 12592.450019783, 1.072262823 }, /* 311, 320 */ { 0.000341e-6, 12146.667056108, 4.700657997 }, { 0.000290e-6, 9779.108676125, 1.812320441 }, { 0.000342e-6, 6132.028180148, 4.322238614 }, { 0.000329e-6, 6268.848755990, 3.033827743 }, { 0.000374e-6, 17996.031168222, 3.388716544 }, { 0.000285e-6, -533.214083444, 4.687313233 }, { 0.000338e-6, 6065.844601290, 0.877776108 }, { 0.000276e-6, 24.298513841, 0.770299429 }, { 0.000336e-6, -2388.894020449, 5.353796034 }, { 0.000290e-6, 3097.883822726, 4.075291557 }, /* 321, 330 */ { 0.000318e-6, 709.933048357, 5.941207518 }, { 0.000271e-6, 13095.842665077, 3.208912203 }, { 0.000331e-6, 6073.708907816, 4.007881169 }, { 0.000292e-6, 742.990060533, 2.714333592 }, { 0.000362e-6, 29088.811415985, 3.215977013 }, { 0.000280e-6, 12359.966151546, 0.710872502 }, { 0.000267e-6, 10440.274292604, 4.730108488 }, { 0.000262e-6, 838.969287750, 1.327720272 }, { 0.000250e-6, 16496.361396202, 0.898769761 }, { 0.000325e-6, 20597.243963041, 0.180044365 }, /* 331, 340 */ { 0.000268e-6, 6148.010769956, 5.152666276 }, { 0.000284e-6, 5636.065016677, 5.655385808 }, { 0.000301e-6, 6080.822454817, 2.135396205 }, { 0.000294e-6, -377.373607916, 3.708784168 }, { 0.000236e-6, 2118.763860378, 1.733578756 }, { 0.000234e-6, 5867.523359379, 5.575209112 }, { 0.000268e-6, -226858.238553767, 0.069432392 }, { 0.000265e-6, 167283.761587465, 4.369302826 }, { 0.000280e-6, 28237.233459389, 5.304829118 }, { 0.000292e-6, 12345.739057544, 4.096094132 }, /* 341, 350 */ { 0.000223e-6, 19800.945956225, 3.069327406 }, { 0.000301e-6, 43232.306658416, 6.205311188 }, { 0.000264e-6, 18875.525869774, 1.417263408 }, { 0.000304e-6, -1823.175188677, 3.409035232 }, { 0.000301e-6, 109.945688789, 0.510922054 }, { 0.000260e-6, 813.550283960, 2.389438934 }, { 0.000299e-6, 316428.228673312, 5.384595078 }, { 0.000211e-6, 5756.566278634, 3.789392838 }, { 0.000209e-6, 5750.203491159, 1.661943545 }, { 0.000240e-6, 12489.885628707, 5.684549045 }, /* 351, 360 */ { 0.000216e-6, 6303.851245484, 3.862942261 }, { 0.000203e-6, 1581.959348283, 5.549853589 }, { 0.000200e-6, 5642.198242609, 1.016115785 }, { 0.000197e-6, -70.849445304, 4.690702525 }, { 0.000227e-6, 6287.008003254, 2.911891613 }, { 0.000197e-6, 533.623118358, 1.048982898 }, { 0.000205e-6, -6279.485421340, 1.829362730 }, { 0.000209e-6, -10988.808157535, 2.636140084 }, { 0.000208e-6, -227.526189440, 4.127883842 }, { 0.000191e-6, 415.552490612, 4.401165650 }, /* 361, 370 */ { 0.000190e-6, 29296.615389579, 4.175658539 }, { 0.000264e-6, 66567.485864652, 4.601102551 }, { 0.000256e-6, -3646.350377354, 0.506364778 }, { 0.000188e-6, 13119.721102825, 2.032195842 }, { 0.000185e-6, -209.366942175, 4.694756586 }, { 0.000198e-6, 25934.124331089, 3.832703118 }, { 0.000195e-6, 4061.219215394, 3.308463427 }, { 0.000234e-6, 5113.487598583, 1.716090661 }, { 0.000188e-6, 1478.866574064, 5.686865780 }, { 0.000222e-6, 11823.161639450, 1.942386641 }, /* 371, 380 */ { 0.000181e-6, 10770.893256262, 1.999482059 }, { 0.000171e-6, 6546.159773364, 1.182807992 }, { 0.000206e-6, 70.328180442, 5.934076062 }, { 0.000169e-6, 20995.392966449, 2.169080622 }, { 0.000191e-6, 10660.686935042, 5.405515999 }, { 0.000228e-6, 33019.021112205, 4.656985514 }, { 0.000184e-6, -4933.208440333, 3.327476868 }, { 0.000220e-6, -135.625325010, 1.765430262 }, { 0.000166e-6, 23141.558382925, 3.454132746 }, { 0.000191e-6, 6144.558353121, 5.020393445 }, /* 381, 390 */ { 0.000180e-6, 6084.003848555, 0.602182191 }, { 0.000163e-6, 17782.732072784, 4.960593133 }, { 0.000225e-6, 16460.333529525, 2.596451817 }, { 0.000222e-6, 5905.702242076, 3.731990323 }, { 0.000204e-6, 227.476132789, 5.636192701 }, { 0.000159e-6, 16737.577236597, 3.600691544 }, { 0.000200e-6, 6805.653268085, 0.868220961 }, { 0.000187e-6, 11919.140866668, 2.629456641 }, { 0.000161e-6, 127.471796607, 2.862574720 }, { 0.000205e-6, 6286.666278643, 1.742882331 }, /* 391, 400 */ { 0.000189e-6, 153.778810485, 4.812372643 }, { 0.000168e-6, 16723.350142595, 0.027860588 }, { 0.000149e-6, 11720.068865232, 0.659721876 }, { 0.000189e-6, 5237.921013804, 5.245313000 }, { 0.000143e-6, 6709.674040867, 4.317625647 }, { 0.000146e-6, 4487.817406270, 4.815297007 }, { 0.000144e-6, -664.756045130, 5.381366880 }, { 0.000175e-6, 5127.714692584, 4.728443327 }, { 0.000162e-6, 6254.626662524, 1.435132069 }, { 0.000187e-6, 47162.516354635, 1.354371923 }, /* 401, 410 */ { 0.000146e-6, 11080.171578918, 3.369695406 }, { 0.000180e-6, -348.924420448, 2.490902145 }, { 0.000148e-6, 151.047669843, 3.799109588 }, { 0.000157e-6, 6197.248551160, 1.284375887 }, { 0.000167e-6, 146.594251718, 0.759969109 }, { 0.000133e-6, -5331.357443741, 5.409701889 }, { 0.000154e-6, 95.979227218, 3.366890614 }, { 0.000148e-6, -6418.140930027, 3.384104996 }, { 0.000128e-6, -6525.804453965, 3.803419985 }, { 0.000130e-6, 11293.470674356, 0.939039445 }, /* 411, 420 */ { 0.000152e-6, -5729.506447149, 0.734117523 }, { 0.000138e-6, 210.117701700, 2.564216078 }, { 0.000123e-6, 6066.595360816, 4.517099537 }, { 0.000140e-6, 18451.078546566, 0.642049130 }, { 0.000126e-6, 11300.584221356, 3.485280663 }, { 0.000119e-6, 10027.903195729, 3.217431161 }, { 0.000151e-6, 4274.518310832, 4.404359108 }, { 0.000117e-6, 6072.958148291, 0.366324650 }, { 0.000165e-6, -7668.637425143, 4.298212528 }, { 0.000117e-6, -6245.048177356, 5.379518958 }, /* 421, 430 */ { 0.000130e-6, -5888.449964932, 4.527681115 }, { 0.000121e-6, -543.918059096, 6.109429504 }, { 0.000162e-6, 9683.594581116, 5.720092446 }, { 0.000141e-6, 6219.339951688, 0.679068671 }, { 0.000118e-6, 22743.409379516, 4.881123092 }, { 0.000129e-6, 1692.165669502, 0.351407289 }, { 0.000126e-6, 5657.405657679, 5.146592349 }, { 0.000114e-6, 728.762966531, 0.520791814 }, { 0.000120e-6, 52.596639600, 0.948516300 }, { 0.000115e-6, 65.220371012, 3.504914846 }, /* 431, 440 */ { 0.000126e-6, 5881.403728234, 5.577502482 }, { 0.000158e-6, 163096.180360983, 2.957128968 }, { 0.000134e-6, 12341.806904281, 2.598576764 }, { 0.000151e-6, 16627.370915377, 3.985702050 }, { 0.000109e-6, 1368.660252845, 0.014730471 }, { 0.000131e-6, 6211.263196841, 0.085077024 }, { 0.000146e-6, 5792.741760812, 0.708426604 }, { 0.000146e-6, -77.750543984, 3.121576600 }, { 0.000107e-6, 5341.013788022, 0.288231904 }, { 0.000138e-6, 6281.591377283, 2.797450317 }, /* 441, 450 */ { 0.000113e-6, -6277.552925684, 2.788904128 }, { 0.000115e-6, -525.758811831, 5.895222200 }, { 0.000138e-6, 6016.468808270, 6.096188999 }, { 0.000139e-6, 23539.707386333, 2.028195445 }, { 0.000146e-6, -4176.041342449, 4.660008502 }, { 0.000107e-6, 16062.184526117, 4.066520001 }, { 0.000142e-6, 83783.548222473, 2.936315115 }, { 0.000128e-6, 9380.959672717, 3.223844306 }, { 0.000135e-6, 6205.325306007, 1.638054048 }, { 0.000101e-6, 2699.734819318, 5.481603249 }, /* 451, 460 */ { 0.000104e-6, -568.821874027, 2.205734493 }, { 0.000103e-6, 6321.103522627, 2.440421099 }, { 0.000119e-6, 6321.208885629, 2.547496264 }, { 0.000138e-6, 1975.492545856, 2.314608466 }, { 0.000121e-6, 137.033024162, 4.539108237 }, { 0.000123e-6, 19402.796952817, 4.538074405 }, { 0.000119e-6, 22805.735565994, 2.869040566 }, { 0.000133e-6, 64471.991241142, 6.056405489 }, { 0.000129e-6, -85.827298831, 2.540635083 }, { 0.000131e-6, 13613.804277336, 4.005732868 }, /* 461, 470 */ { 0.000104e-6, 9814.604100291, 1.959967212 }, { 0.000112e-6, 16097.679950283, 3.589026260 }, { 0.000123e-6, 2107.034507542, 1.728627253 }, { 0.000121e-6, 36949.230808424, 6.072332087 }, { 0.000108e-6, -12539.853380183, 3.716133846 }, { 0.000113e-6, -7875.671863624, 2.725771122 }, { 0.000109e-6, 4171.425536614, 4.033338079 }, { 0.000101e-6, 6247.911759770, 3.441347021 }, { 0.000113e-6, 7330.728427345, 0.656372122 }, { 0.000113e-6, 51092.726050855, 2.791483066 }, /* 471, 480 */ { 0.000106e-6, 5621.842923210, 1.815323326 }, { 0.000101e-6, 111.430161497, 5.711033677 }, { 0.000103e-6, 909.818733055, 2.812745443 }, { 0.000101e-6, 1790.642637886, 1.965746028 }, /* T */ { 102.156724e-6, 6283.075849991, 4.249032005 }, { 1.706807e-6, 12566.151699983, 4.205904248 }, { 0.269668e-6, 213.299095438, 3.400290479 }, { 0.265919e-6, 529.690965095, 5.836047367 }, { 0.210568e-6, -3.523118349, 6.262738348 }, { 0.077996e-6, 5223.693919802, 4.670344204 }, /* 481, 490 */ { 0.054764e-6, 1577.343542448, 4.534800170 }, { 0.059146e-6, 26.298319800, 1.083044735 }, { 0.034420e-6, -398.149003408, 5.980077351 }, { 0.032088e-6, 18849.227549974, 4.162913471 }, { 0.033595e-6, 5507.553238667, 5.980162321 }, { 0.029198e-6, 5856.477659115, 0.623811863 }, { 0.027764e-6, 155.420399434, 3.745318113 }, { 0.025190e-6, 5746.271337896, 2.980330535 }, { 0.022997e-6, -796.298006816, 1.174411803 }, { 0.024976e-6, 5760.498431898, 2.467913690 }, /* 491, 500 */ { 0.021774e-6, 206.185548437, 3.854787540 }, { 0.017925e-6, -775.522611324, 1.092065955 }, { 0.013794e-6, 426.598190876, 2.699831988 }, { 0.013276e-6, 6062.663207553, 5.845801920 }, { 0.011774e-6, 12036.460734888, 2.292832062 }, { 0.012869e-6, 6076.890301554, 5.333425680 }, { 0.012152e-6, 1059.381930189, 6.222874454 }, { 0.011081e-6, -7.113547001, 5.154724984 }, { 0.010143e-6, 4694.002954708, 4.044013795 }, { 0.009357e-6, 5486.777843175, 3.416081409 }, /* 501, 510 */ { 0.010084e-6, 522.577418094, 0.749320262 }, { 0.008587e-6, 10977.078804699, 2.777152598 }, { 0.008628e-6, 6275.962302991, 4.562060226 }, { 0.008158e-6, -220.412642439, 5.806891533 }, { 0.007746e-6, 2544.314419883, 1.603197066 }, { 0.007670e-6, 2146.165416475, 3.000200440 }, { 0.007098e-6, 74.781598567, 0.443725817 }, { 0.006180e-6, -536.804512095, 1.302642751 }, { 0.005818e-6, 5088.628839767, 4.827723531 }, { 0.004945e-6, -6286.598968340, 0.268305170 }, /* 511, 520 */ { 0.004774e-6, 1349.867409659, 5.808636673 }, { 0.004687e-6, -242.728603974, 5.154890570 }, { 0.006089e-6, 1748.016413067, 4.403765209 }, { 0.005975e-6, -1194.447010225, 2.583472591 }, { 0.004229e-6, 951.718406251, 0.931172179 }, { 0.005264e-6, 553.569402842, 2.336107252 }, { 0.003049e-6, 5643.178563677, 1.362634430 }, { 0.002974e-6, 6812.766815086, 1.583012668 }, { 0.003403e-6, -2352.866153772, 2.552189886 }, { 0.003030e-6, 419.484643875, 5.286473844 }, /* 521, 530 */ { 0.003210e-6, -7.046236698, 1.863796539 }, { 0.003058e-6, 9437.762934887, 4.226420633 }, { 0.002589e-6, 12352.852604545, 1.991935820 }, { 0.002927e-6, 5216.580372801, 2.319951253 }, { 0.002425e-6, 5230.807466803, 3.084752833 }, { 0.002656e-6, 3154.687084896, 2.487447866 }, { 0.002445e-6, 10447.387839604, 2.347139160 }, { 0.002990e-6, 4690.479836359, 6.235872050 }, { 0.002890e-6, 5863.591206116, 0.095197563 }, { 0.002498e-6, 6438.496249426, 2.994779800 }, /* 531, 540 */ { 0.001889e-6, 8031.092263058, 3.569003717 }, { 0.002567e-6, 801.820931124, 3.425611498 }, { 0.001803e-6, -71430.695617928, 2.192295512 }, { 0.001782e-6, 3.932153263, 5.180433689 }, { 0.001694e-6, -4705.732307544, 4.641779174 }, { 0.001704e-6, -1592.596013633, 3.997097652 }, { 0.001735e-6, 5849.364112115, 0.417558428 }, { 0.001643e-6, 8429.241266467, 2.180619584 }, { 0.001680e-6, 38.133035638, 4.164529426 }, { 0.002045e-6, 7084.896781115, 0.526323854 }, /* 541, 550 */ { 0.001458e-6, 4292.330832950, 1.356098141 }, { 0.001437e-6, 20.355319399, 3.895439360 }, { 0.001738e-6, 6279.552731642, 0.087484036 }, { 0.001367e-6, 14143.495242431, 3.987576591 }, { 0.001344e-6, 7234.794256242, 0.090454338 }, { 0.001438e-6, 11499.656222793, 0.974387904 }, { 0.001257e-6, 6836.645252834, 1.509069366 }, { 0.001358e-6, 11513.883316794, 0.495572260 }, { 0.001628e-6, 7632.943259650, 4.968445721 }, { 0.001169e-6, 103.092774219, 2.838496795 }, /* 551, 560 */ { 0.001162e-6, 4164.311989613, 3.408387778 }, { 0.001092e-6, 6069.776754553, 3.617942651 }, { 0.001008e-6, 17789.845619785, 0.286350174 }, { 0.001008e-6, 639.897286314, 1.610762073 }, { 0.000918e-6, 10213.285546211, 5.532798067 }, { 0.001011e-6, -6256.777530192, 0.661826484 }, { 0.000753e-6, 16730.463689596, 3.905030235 }, { 0.000737e-6, 11926.254413669, 4.641956361 }, { 0.000694e-6, 3340.612426700, 2.111120332 }, { 0.000701e-6, 3894.181829542, 2.760823491 }, /* 561, 570 */ { 0.000689e-6, -135.065080035, 4.768800780 }, { 0.000700e-6, 13367.972631107, 5.760439898 }, { 0.000664e-6, 6040.347246017, 1.051215840 }, { 0.000654e-6, 5650.292110678, 4.911332503 }, { 0.000788e-6, 6681.224853400, 4.699648011 }, { 0.000628e-6, 5333.900241022, 5.024608847 }, { 0.000755e-6, -110.206321219, 4.370971253 }, { 0.000628e-6, 6290.189396992, 3.660478857 }, { 0.000635e-6, 25132.303399966, 4.121051532 }, { 0.000534e-6, 5966.683980335, 1.173284524 }, /* 571, 580 */ { 0.000543e-6, -433.711737877, 0.345585464 }, { 0.000517e-6, -1990.745017041, 5.414571768 }, { 0.000504e-6, 5767.611978898, 2.328281115 }, { 0.000485e-6, 5753.384884897, 1.685874771 }, { 0.000463e-6, 7860.419392439, 5.297703006 }, { 0.000604e-6, 515.463871093, 0.591998446 }, { 0.000443e-6, 12168.002696575, 4.830881244 }, { 0.000570e-6, 199.072001436, 3.899190272 }, { 0.000465e-6, 10969.965257698, 0.476681802 }, { 0.000424e-6, -7079.373856808, 1.112242763 }, /* 581, 590 */ { 0.000427e-6, 735.876513532, 1.994214480 }, { 0.000478e-6, -6127.655450557, 3.778025483 }, { 0.000414e-6, 10973.555686350, 5.441088327 }, { 0.000512e-6, 1589.072895284, 0.107123853 }, { 0.000378e-6, 10984.192351700, 0.915087231 }, { 0.000402e-6, 11371.704689758, 4.107281715 }, { 0.000453e-6, 9917.696874510, 1.917490952 }, { 0.000395e-6, 149.563197135, 2.763124165 }, { 0.000371e-6, 5739.157790895, 3.112111866 }, { 0.000350e-6, 11790.629088659, 0.440639857 }, /* 591, 600 */ { 0.000356e-6, 6133.512652857, 5.444568842 }, { 0.000344e-6, 412.371096874, 5.676832684 }, { 0.000383e-6, 955.599741609, 5.559734846 }, { 0.000333e-6, 6496.374945429, 0.261537984 }, { 0.000340e-6, 6055.549660552, 5.975534987 }, { 0.000334e-6, 1066.495477190, 2.335063907 }, { 0.000399e-6, 11506.769769794, 5.321230910 }, { 0.000314e-6, 18319.536584880, 2.313312404 }, { 0.000424e-6, 1052.268383188, 1.211961766 }, { 0.000307e-6, 63.735898303, 3.169551388 }, /* 601, 610 */ { 0.000329e-6, 29.821438149, 6.106912080 }, { 0.000357e-6, 6309.374169791, 4.223760346 }, { 0.000312e-6, -3738.761430108, 2.180556645 }, { 0.000301e-6, 309.278322656, 1.499984572 }, { 0.000268e-6, 12043.574281889, 2.447520648 }, { 0.000257e-6, 12491.370101415, 3.662331761 }, { 0.000290e-6, 625.670192312, 1.272834584 }, { 0.000256e-6, 5429.879468239, 1.913426912 }, { 0.000339e-6, 3496.032826134, 4.165930011 }, { 0.000283e-6, 3930.209696220, 4.325565754 }, /* 611, 620 */ { 0.000241e-6, 12528.018664345, 3.832324536 }, { 0.000304e-6, 4686.889407707, 1.612348468 }, { 0.000259e-6, 16200.772724501, 3.470173146 }, { 0.000238e-6, 12139.553509107, 1.147977842 }, { 0.000236e-6, 6172.869528772, 3.776271728 }, { 0.000296e-6, -7058.598461315, 0.460368852 }, { 0.000306e-6, 10575.406682942, 0.554749016 }, { 0.000251e-6, 17298.182327326, 0.834332510 }, { 0.000290e-6, 4732.030627343, 4.759564091 }, { 0.000261e-6, 5884.926846583, 0.298259862 }, /* 621, 630 */ { 0.000249e-6, 5547.199336460, 3.749366406 }, { 0.000213e-6, 11712.955318231, 5.415666119 }, { 0.000223e-6, 4701.116501708, 2.703203558 }, { 0.000268e-6, -640.877607382, 0.283670793 }, { 0.000209e-6, 5636.065016677, 1.238477199 }, { 0.000193e-6, 10177.257679534, 1.943251340 }, { 0.000182e-6, 6283.143160294, 2.456157599 }, { 0.000184e-6, -227.526189440, 5.888038582 }, { 0.000182e-6, -6283.008539689, 0.241332086 }, { 0.000228e-6, -6284.056171060, 2.657323816 }, /* 631, 640 */ { 0.000166e-6, 7238.675591600, 5.930629110 }, { 0.000167e-6, 3097.883822726, 5.570955333 }, { 0.000159e-6, -323.505416657, 5.786670700 }, { 0.000154e-6, -4136.910433516, 1.517805532 }, { 0.000176e-6, 12029.347187887, 3.139266834 }, { 0.000167e-6, 12132.439962106, 3.556352289 }, { 0.000153e-6, 202.253395174, 1.463313961 }, { 0.000157e-6, 17267.268201691, 1.586837396 }, { 0.000142e-6, 83996.847317911, 0.022670115 }, { 0.000152e-6, 17260.154654690, 0.708528947 }, /* 641, 650 */ { 0.000144e-6, 6084.003848555, 5.187075177 }, { 0.000135e-6, 5756.566278634, 1.993229262 }, { 0.000134e-6, 5750.203491159, 3.457197134 }, { 0.000144e-6, 5326.786694021, 6.066193291 }, { 0.000160e-6, 11015.106477335, 1.710431974 }, { 0.000133e-6, 3634.621024518, 2.836451652 }, { 0.000134e-6, 18073.704938650, 5.453106665 }, { 0.000134e-6, 1162.474704408, 5.326898811 }, { 0.000128e-6, 5642.198242609, 2.511652591 }, { 0.000160e-6, 632.783739313, 5.628785365 }, /* 651, 660 */ { 0.000132e-6, 13916.019109642, 0.819294053 }, { 0.000122e-6, 14314.168113050, 5.677408071 }, { 0.000125e-6, 12359.966151546, 5.251984735 }, { 0.000121e-6, 5749.452731634, 2.210924603 }, { 0.000136e-6, -245.831646229, 1.646502367 }, { 0.000120e-6, 5757.317038160, 3.240883049 }, { 0.000134e-6, 12146.667056108, 3.059480037 }, { 0.000137e-6, 6206.809778716, 1.867105418 }, { 0.000141e-6, 17253.041107690, 2.069217456 }, { 0.000129e-6, -7477.522860216, 2.781469314 }, /* 661, 670 */ { 0.000116e-6, 5540.085789459, 4.281176991 }, { 0.000116e-6, 9779.108676125, 3.320925381 }, { 0.000129e-6, 5237.921013804, 3.497704076 }, { 0.000113e-6, 5959.570433334, 0.983210840 }, { 0.000122e-6, 6282.095528923, 2.674938860 }, { 0.000140e-6, -11.045700264, 4.957936982 }, { 0.000108e-6, 23543.230504682, 1.390113589 }, { 0.000106e-6, -12569.674818332, 0.429631317 }, { 0.000110e-6, -266.607041722, 5.501340197 }, { 0.000115e-6, 12559.038152982, 4.691456618 }, /* 671, 680 */ { 0.000134e-6, -2388.894020449, 0.577313584 }, { 0.000109e-6, 10440.274292604, 6.218148717 }, { 0.000102e-6, -543.918059096, 1.477842615 }, { 0.000108e-6, 21228.392023546, 2.237753948 }, { 0.000101e-6, -4535.059436924, 3.100492232 }, { 0.000103e-6, 76.266071276, 5.594294322 }, { 0.000104e-6, 949.175608970, 5.674287810 }, { 0.000101e-6, 13517.870106233, 2.196632348 }, { 0.000100e-6, 11933.367960670, 4.056084160 }, /* T^2 */ { 4.322990e-6, 6283.075849991, 2.642893748 }, /* 681, 690 */ { 0.406495e-6, 0.000000000, 4.712388980 }, { 0.122605e-6, 12566.151699983, 2.438140634 }, { 0.019476e-6, 213.299095438, 1.642186981 }, { 0.016916e-6, 529.690965095, 4.510959344 }, { 0.013374e-6, -3.523118349, 1.502210314 }, { 0.008042e-6, 26.298319800, 0.478549024 }, { 0.007824e-6, 155.420399434, 5.254710405 }, { 0.004894e-6, 5746.271337896, 4.683210850 }, { 0.004875e-6, 5760.498431898, 0.759507698 }, { 0.004416e-6, 5223.693919802, 6.028853166 }, /* 691, 700 */ { 0.004088e-6, -7.113547001, 0.060926389 }, { 0.004433e-6, 77713.771467920, 3.627734103 }, { 0.003277e-6, 18849.227549974, 2.327912542 }, { 0.002703e-6, 6062.663207553, 1.271941729 }, { 0.003435e-6, -775.522611324, 0.747446224 }, { 0.002618e-6, 6076.890301554, 3.633715689 }, { 0.003146e-6, 206.185548437, 5.647874613 }, { 0.002544e-6, 1577.343542448, 6.232904270 }, { 0.002218e-6, -220.412642439, 1.309509946 }, { 0.002197e-6, 5856.477659115, 2.407212349 }, /* 701, 710 */ { 0.002897e-6, 5753.384884897, 5.863842246 }, { 0.001766e-6, 426.598190876, 0.754113147 }, { 0.001738e-6, -796.298006816, 2.714942671 }, { 0.001695e-6, 522.577418094, 2.629369842 }, { 0.001584e-6, 5507.553238667, 1.341138229 }, { 0.001503e-6, -242.728603974, 0.377699736 }, { 0.001552e-6, -536.804512095, 2.904684667 }, { 0.001370e-6, -398.149003408, 1.265599125 }, { 0.001889e-6, -5573.142801634, 4.413514859 }, { 0.001722e-6, 6069.776754553, 2.445966339 }, /* 711, 720 */ { 0.001124e-6, 1059.381930189, 5.041799657 }, { 0.001258e-6, 553.569402842, 3.849557278 }, { 0.000831e-6, 951.718406251, 2.471094709 }, { 0.000767e-6, 4694.002954708, 5.363125422 }, { 0.000756e-6, 1349.867409659, 1.046195744 }, { 0.000775e-6, -11.045700264, 0.245548001 }, { 0.000597e-6, 2146.165416475, 4.543268798 }, { 0.000568e-6, 5216.580372801, 4.178853144 }, { 0.000711e-6, 1748.016413067, 5.934271972 }, { 0.000499e-6, 12036.460734888, 0.624434410 }, /* 721, 730 */ { 0.000671e-6, -1194.447010225, 4.136047594 }, { 0.000488e-6, 5849.364112115, 2.209679987 }, { 0.000621e-6, 6438.496249426, 4.518860804 }, { 0.000495e-6, -6286.598968340, 1.868201275 }, { 0.000456e-6, 5230.807466803, 1.271231591 }, { 0.000451e-6, 5088.628839767, 0.084060889 }, { 0.000435e-6, 5643.178563677, 3.324456609 }, { 0.000387e-6, 10977.078804699, 4.052488477 }, { 0.000547e-6, 161000.685737473, 2.841633844 }, { 0.000522e-6, 3154.687084896, 2.171979966 }, /* 731, 740 */ { 0.000375e-6, 5486.777843175, 4.983027306 }, { 0.000421e-6, 5863.591206116, 4.546432249 }, { 0.000439e-6, 7084.896781115, 0.522967921 }, { 0.000309e-6, 2544.314419883, 3.172606705 }, { 0.000347e-6, 4690.479836359, 1.479586566 }, { 0.000317e-6, 801.820931124, 3.553088096 }, { 0.000262e-6, 419.484643875, 0.606635550 }, { 0.000248e-6, 6836.645252834, 3.014082064 }, { 0.000245e-6, -1592.596013633, 5.519526220 }, { 0.000225e-6, 4292.330832950, 2.877956536 }, /* 741, 750 */ { 0.000214e-6, 7234.794256242, 1.605227587 }, { 0.000205e-6, 5767.611978898, 0.625804796 }, { 0.000180e-6, 10447.387839604, 3.499954526 }, { 0.000229e-6, 199.072001436, 5.632304604 }, { 0.000214e-6, 639.897286314, 5.960227667 }, { 0.000175e-6, -433.711737877, 2.162417992 }, { 0.000209e-6, 515.463871093, 2.322150893 }, { 0.000173e-6, 6040.347246017, 2.556183691 }, { 0.000184e-6, 6309.374169791, 4.732296790 }, { 0.000227e-6, 149854.400134205, 5.385812217 }, /* 751, 760 */ { 0.000154e-6, 8031.092263058, 5.120720920 }, { 0.000151e-6, 5739.157790895, 4.815000443 }, { 0.000197e-6, 7632.943259650, 0.222827271 }, { 0.000197e-6, 74.781598567, 3.910456770 }, { 0.000138e-6, 6055.549660552, 1.397484253 }, { 0.000149e-6, -6127.655450557, 5.333727496 }, { 0.000137e-6, 3894.181829542, 4.281749907 }, { 0.000135e-6, 9437.762934887, 5.979971885 }, { 0.000139e-6, -2352.866153772, 4.715630782 }, { 0.000142e-6, 6812.766815086, 0.513330157 }, /* 761, 770 */ { 0.000120e-6, -4705.732307544, 0.194160689 }, { 0.000131e-6, -71430.695617928, 0.000379226 }, { 0.000124e-6, 6279.552731642, 2.122264908 }, { 0.000108e-6, -6256.777530192, 0.883445696 }, /* T^3 */ { 0.143388e-6, 6283.075849991, 1.131453581 }, { 0.006671e-6, 12566.151699983, 0.775148887 }, { 0.001480e-6, 155.420399434, 0.480016880 }, { 0.000934e-6, 213.299095438, 6.144453084 }, { 0.000795e-6, 529.690965095, 2.941595619 }, { 0.000673e-6, 5746.271337896, 0.120415406 }, /* 771, 780 */ { 0.000672e-6, 5760.498431898, 5.317009738 }, { 0.000389e-6, -220.412642439, 3.090323467 }, { 0.000373e-6, 6062.663207553, 3.003551964 }, { 0.000360e-6, 6076.890301554, 1.918913041 }, { 0.000316e-6, -21.340641002, 5.545798121 }, { 0.000315e-6, -242.728603974, 1.884932563 }, { 0.000278e-6, 206.185548437, 1.266254859 }, { 0.000238e-6, -536.804512095, 4.532664830 }, { 0.000185e-6, 522.577418094, 4.578313856 }, { 0.000245e-6, 18849.227549974, 0.587467082 }, /* 781, 787 */ { 0.000180e-6, 426.598190876, 5.151178553 }, { 0.000200e-6, 553.569402842, 5.355983739 }, { 0.000141e-6, 5223.693919802, 1.336556009 }, { 0.000104e-6, 5856.477659115, 4.239842759 }, /* T^4 */ { 0.003826e-6, 6283.075849991, 5.705257275 }, { 0.000303e-6, 12566.151699983, 5.407132842 }, { 0.000209e-6, 155.420399434, 1.989815753 } }; /* Time since J2000.0 in Julian millennia. */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJM; /* ================= */ /* Topocentric terms */ /* ================= */ /* Convert UT to local solar time in radians. */ tsol = fmod(ut, 1.0) * ERFA_D2PI + elong; /* FUNDAMENTAL ARGUMENTS: Simon et al. 1994. */ /* Combine time argument (millennia) with deg/arcsec factor. */ w = t / 3600.0; /* Sun Mean Longitude. */ elsun = fmod(280.46645683 + 1296027711.03429 * w, 360.0) * ERFA_DD2R; /* Sun Mean Anomaly. */ emsun = fmod(357.52910918 + 1295965810.481 * w, 360.0) * ERFA_DD2R; /* Mean Elongation of Moon from Sun. */ d = fmod(297.85019547 + 16029616012.090 * w, 360.0) * ERFA_DD2R; /* Mean Longitude of Jupiter. */ elj = fmod(34.35151874 + 109306899.89453 * w, 360.0) * ERFA_DD2R; /* Mean Longitude of Saturn. */ els = fmod(50.07744430 + 44046398.47038 * w, 360.0) * ERFA_DD2R; /* TOPOCENTRIC TERMS: Moyer 1981 and Murray 1983. */ wt = + 0.00029e-10 * u * sin(tsol + elsun - els) + 0.00100e-10 * u * sin(tsol - 2.0 * emsun) + 0.00133e-10 * u * sin(tsol - d) + 0.00133e-10 * u * sin(tsol + elsun - elj) - 0.00229e-10 * u * sin(tsol + 2.0 * elsun + emsun) - 0.02200e-10 * v * cos(elsun + emsun) + 0.05312e-10 * u * sin(tsol - emsun) - 0.13677e-10 * u * sin(tsol + 2.0 * elsun) - 1.31840e-10 * v * cos(elsun) + 3.17679e-10 * u * sin(tsol); /* ===================== */ /* Fairhead et al. model */ /* ===================== */ /* T**0 */ w0 = 0; for (j = 473; j >= 0; j--) { w0 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]); } /* T**1 */ w1 = 0; for (j = 678; j >= 474; j--) { w1 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]); } /* T**2 */ w2 = 0; for (j = 763; j >= 679; j--) { w2 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]); } /* T**3 */ w3 = 0; for (j = 783; j >= 764; j--) { w3 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]); } /* T**4 */ w4 = 0; for (j = 786; j >= 784; j--) { w4 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]); } /* Multiply by powers of T and combine. */ wf = t * (t * (t * (t * w4 + w3) + w2) + w1) + w0; /* Adjustments to use JPL planetary masses instead of IAU. */ wj = 0.00065e-6 * sin(6069.776754 * t + 4.021194) + 0.00033e-6 * sin( 213.299095 * t + 5.543132) + (-0.00196e-6 * sin(6208.294251 * t + 5.696701)) + (-0.00173e-6 * sin( 74.781599 * t + 2.435900)) + 0.03638e-6 * t * t; /* ============ */ /* Final result */ /* ============ */ /* TDB-TT in seconds. */ w = wt + wf + wj; return w; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/num00a.c0000644001134200020070000001221712640262015017751 0ustar embrayscience00000000000000#include "erfa.h" void eraNum00a(double date1, double date2, double rmatn[3][3]) /* ** - - - - - - - - - - ** e r a N u m 0 0 a ** - - - - - - - - - - ** ** Form the matrix of nutation for a given date, IAU 2000A model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** rmatn double[3][3] nutation matrix ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix operates in the sense V(true) = rmatn * V(mean), where ** the p-vector V(true) is with respect to the true equatorial triad ** of date and the p-vector V(mean) is with respect to the mean ** equatorial triad of date. ** ** 3) A faster, but slightly less accurate result (about 1 mas), can be ** obtained by using instead the eraNum00b function. ** ** Called: ** eraPn00a bias/precession/nutation, IAU 2000A ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992), ** Section 3.222-3 (p114). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dpsi, deps, epsa, rb[3][3], rp[3][3], rbp[3][3], rbpn[3][3]; /* Obtain the required matrix (discarding other results). */ eraPn00a(date1, date2, &dpsi, &deps, &epsa, rb, rp, rbp, rmatn, rbpn); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/atciq.c0000644001134200020070000001455612640262015017762 0ustar embrayscience00000000000000#include "erfa.h" void eraAtciq(double rc, double dc, double pr, double pd, double px, double rv, eraASTROM *astrom, double *ri, double *di) /* ** - - - - - - - - - ** e r a A t c i q ** - - - - - - - - - ** ** Quick ICRS, epoch J2000.0, to CIRS transformation, given precomputed ** star-independent astrometry parameters. ** ** Use of this function is appropriate when efficiency is important and ** where many star positions are to be transformed for one date. The ** star-independent parameters can be obtained by calling one of the ** functions eraApci[13], eraApcg[13], eraApco[13] or eraApcs[13]. ** ** If the parallax and proper motions are zero the eraAtciqz function ** can be used instead. ** ** Given: ** rc,dc double ICRS RA,Dec at J2000.0 (radians) ** pr double RA proper motion (radians/year; Note 3) ** pd double Dec proper motion (radians/year) ** px double parallax (arcsec) ** rv double radial velocity (km/s, +ve if receding) ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double longitude + s' (radians) ** xpl double polar motion xp wrt local meridian (radians) ** ypl double polar motion yp wrt local meridian (radians) ** sphi double sine of geodetic latitude ** cphi double cosine of geodetic latitude ** diurab double magnitude of diurnal aberration vector ** eral double "local" Earth rotation angle (radians) ** refa double refraction constant A (radians) ** refb double refraction constant B (radians) ** ** Returned: ** ri,di double CIRS RA,Dec (radians) ** ** Notes: ** ** 1) All the vectors are with respect to BCRS axes. ** ** 2) Star data for an epoch other than J2000.0 (for example from the ** Hipparcos catalog, which has an epoch of J1991.25) will require a ** preliminary call to eraPmsafe before use. ** ** 3) The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. ** ** Called: ** eraPmpx proper motion and parallax ** eraLdsun light deflection by the Sun ** eraAb stellar aberration ** eraRxp product of r-matrix and pv-vector ** eraC2s p-vector to spherical ** eraAnp normalize angle into range 0 to 2pi ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double pco[3], pnat[3], ppr[3], pi[3], w; /* Proper motion and parallax, giving BCRS coordinate direction. */ eraPmpx(rc, dc, pr, pd, px, rv, astrom->pmt, astrom->eb, pco); /* Light deflection by the Sun, giving BCRS natural direction. */ eraLdsun(pco, astrom->eh, astrom->em, pnat); /* Aberration, giving GCRS proper direction. */ eraAb(pnat, astrom->v, astrom->em, astrom->bm1, ppr); /* Bias-precession-nutation, giving CIRS proper direction. */ eraRxp(astrom->bpn, ppr, pi); /* CIRS RA,Dec. */ eraC2s(pi, &w, di); *ri = eraAnp(w); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/aticqn.c0000644001134200020070000002171012640262015020126 0ustar embrayscience00000000000000#include "erfa.h" void eraAticqn(double ri, double di, eraASTROM *astrom, int n, eraLDBODY b[], double *rc, double *dc) /* ** - - - - - - - - - ** e r a A t i c q n ** - - - - - - - - - ** ** Quick CIRS to ICRS astrometric place transformation, given the star- ** independent astrometry parameters plus a list of light-deflecting ** bodies. ** ** Use of this function is appropriate when efficiency is important and ** where many star positions are all to be transformed for one date. ** The star-independent astrometry parameters can be obtained by ** calling one of the functions eraApci[13], eraApcg[13], eraApco[13] ** or eraApcs[13]. * * If the only light-deflecting body to be taken into account is the * Sun, the eraAticq function can be used instead. ** ** Given: ** ri,di double CIRS RA,Dec (radians) ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double longitude + s' (radians) ** xpl double polar motion xp wrt local meridian (radians) ** ypl double polar motion yp wrt local meridian (radians) ** sphi double sine of geodetic latitude ** cphi double cosine of geodetic latitude ** diurab double magnitude of diurnal aberration vector ** eral double "local" Earth rotation angle (radians) ** refa double refraction constant A (radians) ** refb double refraction constant B (radians) ** n int number of bodies (Note 3) ** b eraLDBODY[n] data for each of the n bodies (Notes 3,4): ** bm double mass of the body (solar masses, Note 5) ** dl double deflection limiter (Note 6) ** pv [2][3] barycentric PV of the body (au, au/day) ** ** Returned: ** rc,dc double ICRS astrometric RA,Dec (radians) ** ** Notes: ** ** 1) Iterative techniques are used for the aberration and light ** deflection corrections so that the functions eraAticqn and ** eraAtciqn are accurate inverses; even at the edge of the Sun's ** disk the discrepancy is only about 1 nanoarcsecond. ** ** 2) If the only light-deflecting body to be taken into account is the ** Sun, the eraAticq function can be used instead. ** ** 3) The struct b contains n entries, one for each body to be ** considered. If n = 0, no gravitational light deflection will be ** applied, not even for the Sun. ** ** 4) The struct b should include an entry for the Sun as well as for ** any planet or other body to be taken into account. The entries ** should be in the order in which the light passes the body. ** ** 5) In the entry in the b struct for body i, the mass parameter ** b[i].bm can, as required, be adjusted in order to allow for such ** effects as quadrupole field. ** ** 6) The deflection limiter parameter b[i].dl is phi^2/2, where phi is ** the angular separation (in radians) between star and body at ** which limiting is applied. As phi shrinks below the chosen ** threshold, the deflection is artificially reduced, reaching zero ** for phi = 0. Example values suitable for a terrestrial ** observer, together with masses, are as follows: ** ** body i b[i].bm b[i].dl ** ** Sun 1.0 6e-6 ** Jupiter 0.00095435 3e-9 ** Saturn 0.00028574 3e-10 ** ** 7) For efficiency, validation of the contents of the b array is ** omitted. The supplied masses must be greater than zero, the ** position and velocity vectors must be right, and the deflection ** limiter greater than zero. ** ** Called: ** eraS2c spherical coordinates to unit vector ** eraTrxp product of transpose of r-matrix and p-vector ** eraZp zero p-vector ** eraAb stellar aberration ** eraLdn light deflection by n bodies ** eraC2s p-vector to spherical ** eraAnp normalize angle into range +/- pi ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int j, i; double pi[3], ppr[3], pnat[3], pco[3], w, d[3], before[3], r2, r, after[3]; /* CIRS RA,Dec to Cartesian. */ eraS2c(ri, di, pi); /* Bias-precession-nutation, giving GCRS proper direction. */ eraTrxp(astrom->bpn, pi, ppr); /* Aberration, giving GCRS natural direction. */ eraZp(d); for (j = 0; j < 2; j++) { r2 = 0.0; for (i = 0; i < 3; i++) { w = ppr[i] - d[i]; before[i] = w; r2 += w*w; } r = sqrt(r2); for (i = 0; i < 3; i++) { before[i] /= r; } eraAb(before, astrom->v, astrom->em, astrom->bm1, after); r2 = 0.0; for (i = 0; i < 3; i++) { d[i] = after[i] - before[i]; w = ppr[i] - d[i]; pnat[i] = w; r2 += w*w; } r = sqrt(r2); for (i = 0; i < 3; i++) { pnat[i] /= r; } } /* Light deflection, giving BCRS coordinate direction. */ eraZp(d); for (j = 0; j < 5; j++) { r2 = 0.0; for (i = 0; i < 3; i++) { w = pnat[i] - d[i]; before[i] = w; r2 += w*w; } r = sqrt(r2); for (i = 0; i < 3; i++) { before[i] /= r; } eraLdn(n, b, astrom->eb, before, after); r2 = 0.0; for (i = 0; i < 3; i++) { d[i] = after[i] - before[i]; w = pnat[i] - d[i]; pco[i] = w; r2 += w*w; } r = sqrt(r2); for (i = 0; i < 3; i++) { pco[i] /= r; } } /* ICRS astrometric RA,Dec. */ eraC2s(pco, &w, dc); *rc = eraAnp(w); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/faur03.c0000644001134200020070000001011212640262015017741 0ustar embrayscience00000000000000#include "erfa.h" double eraFaur03(double t) /* ** - - - - - - - - - - ** e r a F a u r 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Uranus. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double mean longitude of Uranus, radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003) and ** is adapted from Simon et al. (1994). ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* Mean longitude of Uranus (IERS Conventions 2003). */ a = fmod(5.481293872 + 7.4781598567 * t, ERFA_D2PI); return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/taitt.c0000644001134200020070000001044112640262015017773 0ustar embrayscience00000000000000#include "erfa.h" int eraTaitt(double tai1, double tai2, double *tt1, double *tt2) /* ** - - - - - - - - - ** e r a T a i t t ** - - - - - - - - - ** ** Time scale transformation: International Atomic Time, TAI, to ** Terrestrial Time, TT. ** ** Given: ** tai1,tai2 double TAI as a 2-part Julian Date ** ** Returned: ** tt1,tt2 double TT as a 2-part Julian Date ** ** Returned (function value): ** int status: 0 = OK ** ** Note: ** ** tai1+tai2 is Julian Date, apportioned in any convenient way ** between the two arguments, for example where tai1 is the Julian ** Day Number and tai2 is the fraction of a day. The returned ** tt1,tt2 follow suit. ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* TT minus TAI (days). */ static const double dtat = ERFA_TTMTAI/ERFA_DAYSEC; /* Result, safeguarding precision. */ if ( tai1 > tai2 ) { *tt1 = tai1; *tt2 = tai2 + dtat; } else { *tt1 = tai1 + dtat; *tt2 = tai2; } /* Status (always OK). */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/eors.c0000644001134200020070000001101112640262015017610 0ustar embrayscience00000000000000#include "erfa.h" double eraEors(double rnpb[3][3], double s) /* ** - - - - - - - - ** e r a E o r s ** - - - - - - - - ** ** Equation of the origins, given the classical NPB matrix and the ** quantity s. ** ** Given: ** rnpb double[3][3] classical nutation x precession x bias matrix ** s double the quantity s (the CIO locator) ** ** Returned (function value): ** double the equation of the origins in radians. ** ** Notes: ** ** 1) The equation of the origins is the distance between the true ** equinox and the celestial intermediate origin and, equivalently, ** the difference between Earth rotation angle and Greenwich ** apparent sidereal time (ERA-GST). It comprises the precession ** (since J2000.0) in right ascension plus the equation of the ** equinoxes (including the small correction terms). ** ** 2) The algorithm is from Wallace & Capitaine (2006). ** ** References: ** ** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 ** ** Wallace, P. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double x, ax, xs, ys, zs, p, q, eo; /* Evaluate Wallace & Capitaine (2006) expression (16). */ x = rnpb[2][0]; ax = x / (1.0 + rnpb[2][2]); xs = 1.0 - ax * x; ys = -ax * rnpb[2][1]; zs = -x; p = rnpb[0][0] * xs + rnpb[0][1] * ys + rnpb[0][2] * zs; q = rnpb[1][0] * xs + rnpb[1][1] * ys + rnpb[1][2] * zs; eo = ((p != 0) || (q != 0)) ? s - atan2(q, p) : s; return eo; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/sxpv.c0000644001134200020070000000704612640262015017655 0ustar embrayscience00000000000000#include "erfa.h" void eraSxpv(double s, double pv[2][3], double spv[2][3]) /* ** - - - - - - - - ** e r a S x p v ** - - - - - - - - ** ** Multiply a pv-vector by a scalar. ** ** Given: ** s double scalar ** pv double[2][3] pv-vector ** ** Returned: ** spv double[2][3] s * pv ** ** Note: ** It is permissible for pv and spv to be the same array ** ** Called: ** eraS2xpv multiply pv-vector by two scalars ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraS2xpv(s, s, pv, spv); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/gst00b.c0000644001134200020070000001424112640262015017747 0ustar embrayscience00000000000000#include "erfa.h" double eraGst00b(double uta, double utb) /* ** - - - - - - - - - - ** e r a G s t 0 0 b ** - - - - - - - - - - ** ** Greenwich apparent sidereal time (consistent with IAU 2000 ** resolutions but using the truncated nutation model IAU 2000B). ** ** Given: ** uta,utb double UT1 as a 2-part Julian Date (Notes 1,2) ** ** Returned (function value): ** double Greenwich apparent sidereal time (radians) ** ** Notes: ** ** 1) The UT1 date uta+utb is a Julian Date, apportioned in any ** convenient way between the argument pair. For example, ** JD=2450123.7 could be expressed in any of these ways, among ** others: ** ** uta utb ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 and MJD methods are good compromises ** between resolution and convenience. For UT, the date & time ** method is best matched to the algorithm that is used by the Earth ** Rotation Angle function, called internally: maximum precision is ** delivered when the uta argument is for 0hrs UT1 on the day in ** question and the utb argument lies in the range 0 to 1, or vice ** versa. ** ** 2) The result is compatible with the IAU 2000 resolutions, except ** that accuracy has been compromised for the sake of speed and ** convenience in two respects: ** ** . UT is used instead of TDB (or TT) to compute the precession ** component of GMST and the equation of the equinoxes. This ** results in errors of order 0.1 mas at present. ** ** . The IAU 2000B abridged nutation model (McCarthy & Luzum, 2001) ** is used, introducing errors of up to 1 mas. ** ** 3) This GAST is compatible with the IAU 2000 resolutions and must be ** used only in conjunction with other IAU 2000 compatible ** components such as precession-nutation. ** ** 4) The result is returned in the range 0 to 2pi. ** ** 5) The algorithm is from Capitaine et al. (2003) and IERS ** Conventions 2003. ** ** Called: ** eraGmst00 Greenwich mean sidereal time, IAU 2000 ** eraEe00b equation of the equinoxes, IAU 2000B ** eraAnp normalize angle into range 0 to 2pi ** ** References: ** ** Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to ** implement the IAU 2000 definition of UT1", Astronomy & ** Astrophysics, 406, 1135-1149 (2003) ** ** McCarthy, D.D. & Luzum, B.J., "An abridged model of the ** precession-nutation of the celestial pole", Celestial Mechanics & ** Dynamical Astronomy, 85, 37-49 (2003) ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double gmst00, ee00b, gst; gmst00 = eraGmst00(uta, utb, uta, utb); ee00b = eraEe00b(uta, utb); gst = eraAnp(gmst00 + ee00b); return gst; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/gmst00.c0000644001134200020070000001415212640262015017763 0ustar embrayscience00000000000000#include "erfa.h" double eraGmst00(double uta, double utb, double tta, double ttb) /* ** - - - - - - - - - - ** e r a G m s t 0 0 ** - - - - - - - - - - ** ** Greenwich mean sidereal time (model consistent with IAU 2000 ** resolutions). ** ** Given: ** uta,utb double UT1 as a 2-part Julian Date (Notes 1,2) ** tta,ttb double TT as a 2-part Julian Date (Notes 1,2) ** ** Returned (function value): ** double Greenwich mean sidereal time (radians) ** ** Notes: ** ** 1) The UT1 and TT dates uta+utb and tta+ttb respectively, are both ** Julian Dates, apportioned in any convenient way between the ** argument pairs. For example, JD=2450123.7 could be expressed in ** any of these ways, among others: ** ** Part A Part B ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable (in the case of UT; the TT is not at all critical ** in this respect). The J2000 and MJD methods are good compromises ** between resolution and convenience. For UT, the date & time ** method is best matched to the algorithm that is used by the Earth ** Rotation Angle function, called internally: maximum precision is ** delivered when the uta argument is for 0hrs UT1 on the day in ** question and the utb argument lies in the range 0 to 1, or vice ** versa. ** ** 2) Both UT1 and TT are required, UT1 to predict the Earth rotation ** and TT to predict the effects of precession. If UT1 is used for ** both purposes, errors of order 100 microarcseconds result. ** ** 3) This GMST is compatible with the IAU 2000 resolutions and must be ** used only in conjunction with other IAU 2000 compatible ** components such as precession-nutation and equation of the ** equinoxes. ** ** 4) The result is returned in the range 0 to 2pi. ** ** 5) The algorithm is from Capitaine et al. (2003) and IERS ** Conventions 2003. ** ** Called: ** eraEra00 Earth rotation angle, IAU 2000 ** eraAnp normalize angle into range 0 to 2pi ** ** References: ** ** Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to ** implement the IAU 2000 definition of UT1", Astronomy & ** Astrophysics, 406, 1135-1149 (2003) ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t, gmst; /* TT Julian centuries since J2000.0. */ t = ((tta - ERFA_DJ00) + ttb) / ERFA_DJC; /* Greenwich Mean Sidereal Time, IAU 2000. */ gmst = eraAnp(eraEra00(uta, utb) + ( 0.014506 + ( 4612.15739966 + ( 1.39667721 + ( -0.00009344 + ( 0.00001882 ) * t) * t) * t) * t) * ERFA_DAS2R); return gmst; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fame03.c0000644001134200020070000001032712640262015017724 0ustar embrayscience00000000000000#include "erfa.h" double eraFame03(double t) /* ** - - - - - - - - - - ** e r a F a m e 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Mercury. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double mean longitude of Mercury, radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003) and ** comes from Souchay et al. (1999) after Simon et al. (1994). ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, ** Astron.Astrophys.Supp.Ser. 135, 111 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* Mean longitude of Mercury (IERS Conventions 2003). */ a = fmod(4.402608842 + 2608.7903141574 * t, ERFA_D2PI); return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/eo06a.c0000644001134200020070000001263712640262015017571 0ustar embrayscience00000000000000#include "erfa.h" double eraEo06a(double date1, double date2) /* ** - - - - - - - - - ** e r a E o 0 6 a ** - - - - - - - - - ** ** Equation of the origins, IAU 2006 precession and IAU 2000A nutation. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned (function value): ** double equation of the origins in radians ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The equation of the origins is the distance between the true ** equinox and the celestial intermediate origin and, equivalently, ** the difference between Earth rotation angle and Greenwich ** apparent sidereal time (ERA-GST). It comprises the precession ** (since J2000.0) in right ascension plus the equation of the ** equinoxes (including the small correction terms). ** ** Called: ** eraPnm06a classical NPB matrix, IAU 2006/2000A ** eraBpn2xy extract CIP X,Y coordinates from NPB matrix ** eraS06 the CIO locator s, given X,Y, IAU 2006 ** eraEors equation of the origins, given NPB matrix and s ** ** References: ** ** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 ** ** Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double r[3][3], x, y, s, eo; /* Classical nutation x precession x bias matrix. */ eraPnm06a(date1, date2, r); /* Extract CIP coordinates. */ eraBpn2xy(r, &x, &y); /* The CIO locator, s. */ s = eraS06(date1, date2, x, y); /* Solve for the EO. */ eo = eraEors(r, s); return eo; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/sxp.c0000644001134200020070000000675012640262015017470 0ustar embrayscience00000000000000#include "erfa.h" void eraSxp(double s, double p[3], double sp[3]) /* ** - - - - - - - ** e r a S x p ** - - - - - - - ** ** Multiply a p-vector by a scalar. ** ** Given: ** s double scalar ** p double[3] p-vector ** ** Returned: ** sp double[3] s * p ** ** Note: ** It is permissible for p and sp to be the same array. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { sp[0] = s * p[0]; sp[1] = s * p[1]; sp[2] = s * p[2]; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pvup.c0000644001134200020070000000733212640262015017645 0ustar embrayscience00000000000000#include "erfa.h" void eraPvup(double dt, double pv[2][3], double p[3]) /* ** - - - - - - - - ** e r a P v u p ** - - - - - - - - ** ** Update a pv-vector, discarding the velocity component. ** ** Given: ** dt double time interval ** pv double[2][3] pv-vector ** ** Returned: ** p double[3] p-vector ** ** Notes: ** ** 1) "Update" means "refer the position component of the vector to a ** new date dt time units from the existing date". ** ** 2) The time units of dt must match those of the velocity. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { p[0] = pv[0][0] + dt * pv[1][0]; p[1] = pv[0][1] + dt * pv[1][1]; p[2] = pv[0][2] + dt * pv[1][2]; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/s00b.c0000644001134200020070000001424312640262015017416 0ustar embrayscience00000000000000#include "erfa.h" double eraS00b(double date1, double date2) /* ** - - - - - - - - ** e r a S 0 0 b ** - - - - - - - - ** ** The CIO locator s, positioning the Celestial Intermediate Origin on ** the equator of the Celestial Intermediate Pole, using the IAU 2000B ** precession-nutation model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned (function value): ** double the CIO locator s in radians (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The CIO locator s is the difference between the right ascensions ** of the same point in two systems. The two systems are the GCRS ** and the CIP,CIO, and the point is the ascending node of the ** CIP equator. The CIO locator s remains a small fraction of ** 1 arcsecond throughout 1900-2100. ** ** 3) The series used to compute s is in fact for s+XY/2, where X and Y ** are the x and y components of the CIP unit vector; this series ** is more compact than a direct series for s would be. The present ** function uses the IAU 2000B truncated nutation model when ** predicting the CIP position. The function eraS00a uses instead ** the full IAU 2000A model, but with no significant increase in ** accuracy and at some cost in speed. ** ** Called: ** eraPnm00b classical NPB matrix, IAU 2000B ** eraBnp2xy extract CIP X,Y from the BPN matrix ** eraS00 the CIO locator s, given X,Y, IAU 2000A ** ** References: ** ** Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., ** "Expressions for the Celestial Intermediate Pole and Celestial ** Ephemeris Origin consistent with the IAU 2000A precession- ** nutation model", Astron.Astrophys. 400, 1145-1154 (2003) ** ** n.b. The celestial ephemeris origin (CEO) was renamed "celestial ** intermediate origin" (CIO) by IAU 2006 Resolution 2. ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rbpn[3][3], x, y, s; /* Bias-precession-nutation-matrix, IAU 2000B. */ eraPnm00b(date1, date2, rbpn); /* Extract the CIP coordinates. */ eraBpn2xy(rbpn, &x, &y); /* Compute the CIO locator s, given the CIP coordinates. */ s = eraS00(date1, date2, x, y); return s; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pvmpv.c0000644001134200020070000000717012640262015020023 0ustar embrayscience00000000000000#include "erfa.h" void eraPvmpv(double a[2][3], double b[2][3], double amb[2][3]) /* ** - - - - - - - - - ** e r a P v m p v ** - - - - - - - - - ** ** Subtract one pv-vector from another. ** ** Given: ** a double[2][3] first pv-vector ** b double[2][3] second pv-vector ** ** Returned: ** amb double[2][3] a - b ** ** Note: ** It is permissible to re-use the same array for any of the ** arguments. ** ** Called: ** eraPmp p-vector minus p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraPmp(a[0], b[0], amb[0]); eraPmp(a[1], b[1], amb[1]); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/eform.c0000644001134200020070000001222212640262015017755 0ustar embrayscience00000000000000#include "erfa.h" int eraEform ( int n, double *a, double *f ) /* ** - - - - - - - - - ** e r a E f o r m ** - - - - - - - - - ** ** Earth reference ellipsoids. ** ** Given: ** n int ellipsoid identifier (Note 1) ** ** Returned: ** a double equatorial radius (meters, Note 2) ** f double flattening (Note 2) ** ** Returned (function value): ** int status: 0 = OK ** -1 = illegal identifier (Note 3) ** ** Notes: ** ** 1) The identifier n is a number that specifies the choice of ** reference ellipsoid. The following are supported: ** ** n ellipsoid ** ** 1 ERFA_WGS84 ** 2 ERFA_GRS80 ** 3 ERFA_WGS72 ** ** The n value has no significance outside the ERFA software. For ** convenience, symbols ERFA_WGS84 etc. are defined in erfam.h. ** ** 2) The ellipsoid parameters are returned in the form of equatorial ** radius in meters (a) and flattening (f). The latter is a number ** around 0.00335, i.e. around 1/298. ** ** 3) For the case where an unsupported n value is supplied, zero a and ** f are returned, as well as error status. ** ** References: ** ** Department of Defense World Geodetic System 1984, National ** Imagery and Mapping Agency Technical Report 8350.2, Third ** Edition, p3-2. ** ** Moritz, H., Bull. Geodesique 66-2, 187 (1992). ** ** The Department of Defense World Geodetic System 1972, World ** Geodetic System Committee, May 1974. ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992), ** p220. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Look up a and f for the specified reference ellipsoid. */ switch ( n ) { case ERFA_WGS84: *a = 6378137.0; *f = 1.0 / 298.257223563; break; case ERFA_GRS80: *a = 6378137.0; *f = 1.0 / 298.257222101; break; case ERFA_WGS72: *a = 6378135.0; *f = 1.0 / 298.26; break; default: /* Invalid identifier. */ *a = 0.0; *f = 0.0; return -1; } /* OK status. */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/epv00.c0000644001134200020070000044606412640262015017616 0ustar embrayscience00000000000000#include "erfa.h" int eraEpv00(double date1, double date2, double pvh[2][3], double pvb[2][3]) /* ** - - - - - - - - - ** e r a E p v 0 0 ** - - - - - - - - - ** ** Earth position and velocity, heliocentric and barycentric, with ** respect to the Barycentric Celestial Reference System. ** ** Given: ** date1,date2 double TDB date (Note 1) ** ** Returned: ** pvh double[2][3] heliocentric Earth position/velocity ** pvb double[2][3] barycentric Earth position/velocity ** ** Returned (function value): ** int status: 0 = OK ** +1 = warning: date outside ** the range 1900-2100 AD ** ** Notes: ** ** 1) The TDB date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TDB)=2450123.7 could be expressed in any of these ways, among ** others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 method is best matched to the way the ** argument is handled internally and will deliver the optimum ** resolution. The MJD method and the date & time methods are both ** good compromises between resolution and convenience. However, ** the accuracy of the result is more likely to be limited by the ** algorithm itself than the way the date has been expressed. ** ** n.b. TT can be used instead of TDB in most applications. ** ** 2) On return, the arrays pvh and pvb contain the following: ** ** pvh[0][0] x } ** pvh[0][1] y } heliocentric position, AU ** pvh[0][2] z } ** ** pvh[1][0] xdot } ** pvh[1][1] ydot } heliocentric velocity, AU/d ** pvh[1][2] zdot } ** ** pvb[0][0] x } ** pvb[0][1] y } barycentric position, AU ** pvb[0][2] z } ** ** pvb[1][0] xdot } ** pvb[1][1] ydot } barycentric velocity, AU/d ** pvb[1][2] zdot } ** ** The vectors are with respect to the Barycentric Celestial ** Reference System. The time unit is one day in TDB. ** ** 3) The function is a SIMPLIFIED SOLUTION from the planetary theory ** VSOP2000 (X. Moisson, P. Bretagnon, 2001, Celes. Mechanics & ** Dyn. Astron., 80, 3/4, 205-213) and is an adaptation of original ** Fortran code supplied by P. Bretagnon (private comm., 2000). ** ** 4) Comparisons over the time span 1900-2100 with this simplified ** solution and the JPL DE405 ephemeris give the following results: ** ** RMS max ** Heliocentric: ** position error 3.7 11.2 km ** velocity error 1.4 5.0 mm/s ** ** Barycentric: ** position error 4.6 13.4 km ** velocity error 1.4 4.9 mm/s ** ** Comparisons with the JPL DE406 ephemeris show that by 1800 and ** 2200 the position errors are approximately double their 1900-2100 ** size. By 1500 and 2500 the deterioration is a factor of 10 and ** by 1000 and 3000 a factor of 60. The velocity accuracy falls off ** at about half that rate. ** ** 5) It is permissible to use the same array for pvh and pvb, which ** will receive the barycentric values. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* ** Matrix elements for orienting the analytical model to DE405. ** ** The corresponding Euler angles are: ** ** d ' " ** 1st rotation - 23 26 21.4091 about the x-axis (obliquity) ** 2nd rotation + 0.0475 about the z-axis (RA offset) ** ** These were obtained empirically, by comparisons with DE405 over ** 1900-2100. */ static const double am12 = 0.000000211284, am13 = -0.000000091603, am21 = -0.000000230286, am22 = 0.917482137087, am23 = -0.397776982902, am32 = 0.397776982902, am33 = 0.917482137087; /* ** ---------------------- ** Ephemeris Coefficients ** ---------------------- ** ** The ephemeris consists of harmonic terms for predicting (i) the Sun ** to Earth vector and (ii) the Solar-System-barycenter to Sun vector ** respectively. The coefficients are stored in arrays which, although ** 1-demensional, contain groups of three. Each triplet of ** coefficients is the amplitude, phase and frequency for one term in ** the model, and each array contains the number of terms called for by ** the model. ** ** There are eighteen such arrays, named as follows: ** ** array model power of T component ** ** e0x Sun-to-Earth 0 x ** e0y Sun-to-Earth 0 y ** e0z Sun-to-Earth 0 z ** ** e1x Sun-to-Earth 1 x ** e1y Sun-to-Earth 1 y ** e1z Sun-to-Earth 1 z ** ** e2x Sun-to-Earth 2 x ** e2y Sun-to-Earth 2 y ** e2z Sun-to-Earth 2 z ** ** s0x SSB-to-Sun 0 x ** s0y SSB-to-Sun 0 y ** s0z SSB-to-Sun 0 z ** ** s1x SSB-to-Sun 1 x ** s1y SSB-to-Sun 1 y ** s1z SSB-to-Sun 1 z ** ** s2x SSB-to-Sun 2 x ** s2y SSB-to-Sun 2 y ** s2z SSB-to-Sun 2 z */ /* Sun-to-Earth, T^0, X */ static const double e0x[] = { 0.9998292878132e+00, 0.1753485171504e+01, 0.6283075850446e+01, 0.8352579567414e-02, 0.1710344404582e+01, 0.1256615170089e+02, 0.5611445335148e-02, 0.0000000000000e+00, 0.0000000000000e+00, 0.1046664295572e-03, 0.1667225416770e+01, 0.1884922755134e+02, 0.3110842534677e-04, 0.6687513390251e+00, 0.8399684731857e+02, 0.2552413503550e-04, 0.5830637358413e+00, 0.5296909721118e+00, 0.2137207845781e-04, 0.1092330954011e+01, 0.1577343543434e+01, 0.1680240182951e-04, 0.4955366134987e+00, 0.6279552690824e+01, 0.1679012370795e-04, 0.6153014091901e+01, 0.6286599010068e+01, 0.1445526946777e-04, 0.3472744100492e+01, 0.2352866153506e+01, 0.1091038246184e-04, 0.3689845786119e+01, 0.5223693906222e+01, 0.9344399733932e-05, 0.6073934645672e+01, 0.1203646072878e+02, 0.8993182910652e-05, 0.3175705249069e+01, 0.1021328554739e+02, 0.5665546034116e-05, 0.2152484672246e+01, 0.1059381944224e+01, 0.6844146703035e-05, 0.1306964099750e+01, 0.5753384878334e+01, 0.7346610905565e-05, 0.4354980070466e+01, 0.3981490189893e+00, 0.6815396474414e-05, 0.2218229211267e+01, 0.4705732307012e+01, 0.6112787253053e-05, 0.5384788425458e+01, 0.6812766822558e+01, 0.4518120711239e-05, 0.6087604012291e+01, 0.5884926831456e+01, 0.4521963430706e-05, 0.1279424524906e+01, 0.6256777527156e+01, 0.4497426764085e-05, 0.5369129144266e+01, 0.6309374173736e+01, 0.4062190566959e-05, 0.5436473303367e+00, 0.6681224869435e+01, 0.5412193480192e-05, 0.7867838528395e+00, 0.7755226100720e+00, 0.5469839049386e-05, 0.1461440311134e+01, 0.1414349524433e+02, 0.5205264083477e-05, 0.4432944696116e+01, 0.7860419393880e+01, 0.2149759935455e-05, 0.4502237496846e+01, 0.1150676975667e+02, 0.2279109618501e-05, 0.1239441308815e+01, 0.7058598460518e+01, 0.2259282939683e-05, 0.3272430985331e+01, 0.4694002934110e+01, 0.2558950271319e-05, 0.2265471086404e+01, 0.1216800268190e+02, 0.2561581447555e-05, 0.1454740653245e+01, 0.7099330490126e+00, 0.1781441115440e-05, 0.2962068630206e+01, 0.7962980379786e+00, 0.1612005874644e-05, 0.1473255041006e+01, 0.5486777812467e+01, 0.1818630667105e-05, 0.3743903293447e+00, 0.6283008715021e+01, 0.1818601377529e-05, 0.6274174354554e+01, 0.6283142985870e+01, 0.1554475925257e-05, 0.1624110906816e+01, 0.2513230340178e+02, 0.2090948029241e-05, 0.5852052276256e+01, 0.1179062909082e+02, 0.2000176345460e-05, 0.4072093298513e+01, 0.1778984560711e+02, 0.1289535917759e-05, 0.5217019331069e+01, 0.7079373888424e+01, 0.1281135307881e-05, 0.4802054538934e+01, 0.3738761453707e+01, 0.1518229005692e-05, 0.8691914742502e+00, 0.2132990797783e+00, 0.9450128579027e-06, 0.4601859529950e+01, 0.1097707878456e+02, 0.7781119494996e-06, 0.1844352816694e+01, 0.8827390247185e+01, 0.7733407759912e-06, 0.3582790154750e+01, 0.5507553240374e+01, 0.7350644318120e-06, 0.2695277788230e+01, 0.1589072916335e+01, 0.6535928827023e-06, 0.3651327986142e+01, 0.1176985366291e+02, 0.6324624183656e-06, 0.2241302375862e+01, 0.6262300422539e+01, 0.6298565300557e-06, 0.4407122406081e+01, 0.6303851278352e+01, 0.8587037089179e-06, 0.3024307223119e+01, 0.1672837615881e+03, 0.8299954491035e-06, 0.6192539428237e+01, 0.3340612434717e+01, 0.6311263503401e-06, 0.2014758795416e+01, 0.7113454667900e-02, 0.6005646745452e-06, 0.3399500503397e+01, 0.4136910472696e+01, 0.7917715109929e-06, 0.2493386877837e+01, 0.6069776770667e+01, 0.7556958099685e-06, 0.4159491740143e+01, 0.6496374930224e+01, 0.6773228244949e-06, 0.4034162934230e+01, 0.9437762937313e+01, 0.5370708577847e-06, 0.1562219163734e+01, 0.1194447056968e+01, 0.5710804266203e-06, 0.2662730803386e+01, 0.6282095334605e+01, 0.5709824583726e-06, 0.3985828430833e+01, 0.6284056366286e+01, 0.5143950896447e-06, 0.1308144688689e+01, 0.6290189305114e+01, 0.5088010604546e-06, 0.5352817214804e+01, 0.6275962395778e+01, 0.4960369085172e-06, 0.2644267922349e+01, 0.6127655567643e+01, 0.4803137891183e-06, 0.4008844192080e+01, 0.6438496133249e+01, 0.5731747768225e-06, 0.3794550174597e+01, 0.3154687086868e+01, 0.4735947960579e-06, 0.6107118308982e+01, 0.3128388763578e+01, 0.4808348796625e-06, 0.4771458618163e+01, 0.8018209333619e+00, 0.4115073743137e-06, 0.3327111335159e+01, 0.8429241228195e+01, 0.5230575889287e-06, 0.5305708551694e+01, 0.1336797263425e+02, 0.5133977889215e-06, 0.5784230738814e+01, 0.1235285262111e+02, 0.5065815825327e-06, 0.2052064793679e+01, 0.1185621865188e+02, 0.4339831593868e-06, 0.3644994195830e+01, 0.1726015463500e+02, 0.3952928638953e-06, 0.4930376436758e+01, 0.5481254917084e+01, 0.4898498111942e-06, 0.4542084219731e+00, 0.9225539266174e+01, 0.4757490209328e-06, 0.3161126388878e+01, 0.5856477690889e+01, 0.4727701669749e-06, 0.6214993845446e+00, 0.2544314396739e+01, 0.3800966681863e-06, 0.3040132339297e+01, 0.4265981595566e+00, 0.3257301077939e-06, 0.8064977360087e+00, 0.3930209696940e+01, 0.3255810528674e-06, 0.1974147981034e+01, 0.2146165377750e+01, 0.3252029748187e-06, 0.2845924913135e+01, 0.4164311961999e+01, 0.3255505635308e-06, 0.3017900824120e+01, 0.5088628793478e+01, 0.2801345211990e-06, 0.6109717793179e+01, 0.1256967486051e+02, 0.3688987740970e-06, 0.2911550235289e+01, 0.1807370494127e+02, 0.2475153429458e-06, 0.2179146025856e+01, 0.2629832328990e-01, 0.3033457749150e-06, 0.1994161050744e+01, 0.4535059491685e+01, 0.2186743763110e-06, 0.5125687237936e+01, 0.1137170464392e+02, 0.2764777032774e-06, 0.4822646860252e+00, 0.1256262854127e+02, 0.2199028768592e-06, 0.4637633293831e+01, 0.1255903824622e+02, 0.2046482824760e-06, 0.1467038733093e+01, 0.7084896783808e+01, 0.2611209147507e-06, 0.3044718783485e+00, 0.7143069561767e+02, 0.2286079656818e-06, 0.4764220356805e+01, 0.8031092209206e+01, 0.1855071202587e-06, 0.3383637774428e+01, 0.1748016358760e+01, 0.2324669506784e-06, 0.6189088449251e+01, 0.1831953657923e+02, 0.1709528015688e-06, 0.5874966729774e+00, 0.4933208510675e+01, 0.2168156875828e-06, 0.4302994009132e+01, 0.1044738781244e+02, 0.2106675556535e-06, 0.3800475419891e+01, 0.7477522907414e+01, 0.1430213830465e-06, 0.1294660846502e+01, 0.2942463415728e+01, 0.1388396901944e-06, 0.4594797202114e+01, 0.8635942003952e+01, 0.1922258844190e-06, 0.4943044543591e+00, 0.1729818233119e+02, 0.1888460058292e-06, 0.2426943912028e+01, 0.1561374759853e+03, 0.1789449386107e-06, 0.1582973303499e+00, 0.1592596075957e+01, 0.1360803685374e-06, 0.5197240440504e+01, 0.1309584267300e+02, 0.1504038014709e-06, 0.3120360916217e+01, 0.1649636139783e+02, 0.1382769533389e-06, 0.6164702888205e+01, 0.7632943190217e+01, 0.1438059769079e-06, 0.1437423770979e+01, 0.2042657109477e+02, 0.1326303260037e-06, 0.3609688799679e+01, 0.1213955354133e+02, 0.1159244950540e-06, 0.5463018167225e+01, 0.5331357529664e+01, 0.1433118149136e-06, 0.6028909912097e+01, 0.7342457794669e+01, 0.1234623148594e-06, 0.3109645574997e+01, 0.6279485555400e+01, 0.1233949875344e-06, 0.3539359332866e+01, 0.6286666145492e+01, 0.9927196061299e-07, 0.1259321569772e+01, 0.7234794171227e+01, 0.1242302191316e-06, 0.1065949392609e+01, 0.1511046609763e+02, 0.1098402195201e-06, 0.2192508743837e+01, 0.1098880815746e+02, 0.1158191395315e-06, 0.4054411278650e+01, 0.5729506548653e+01, 0.9048475596241e-07, 0.5429764748518e+01, 0.9623688285163e+01, 0.8889853269023e-07, 0.5046586206575e+01, 0.6148010737701e+01, 0.1048694242164e-06, 0.2628858030806e+01, 0.6836645152238e+01, 0.1112308378646e-06, 0.4177292719907e+01, 0.1572083878776e+02, 0.8631729709901e-07, 0.1601345232557e+01, 0.6418140963190e+01, 0.8527816951664e-07, 0.2463888997513e+01, 0.1471231707864e+02, 0.7892139456991e-07, 0.3154022088718e+01, 0.2118763888447e+01, 0.1051782905236e-06, 0.4795035816088e+01, 0.1349867339771e+01, 0.1048219943164e-06, 0.2952983395230e+01, 0.5999216516294e+01, 0.7435760775143e-07, 0.5420547991464e+01, 0.6040347114260e+01, 0.9869574106949e-07, 0.3695646753667e+01, 0.6566935184597e+01, 0.9156886364226e-07, 0.3922675306609e+01, 0.5643178611111e+01, 0.7006834356188e-07, 0.1233968624861e+01, 0.6525804586632e+01, 0.9806170182601e-07, 0.1919542280684e+01, 0.2122839202813e+02, 0.9052289673607e-07, 0.4615902724369e+01, 0.4690479774488e+01, 0.7554200867893e-07, 0.1236863719072e+01, 0.1253985337760e+02, 0.8215741286498e-07, 0.3286800101559e+00, 0.1097355562493e+02, 0.7185178575397e-07, 0.5880942158367e+01, 0.6245048154254e+01, 0.7130726476180e-07, 0.7674871987661e+00, 0.6321103546637e+01, 0.6650894461162e-07, 0.6987129150116e+00, 0.5327476111629e+01, 0.7396888823688e-07, 0.3576824794443e+01, 0.5368044267797e+00, 0.7420588884775e-07, 0.5033615245369e+01, 0.2354323048545e+02, 0.6141181642908e-07, 0.9449927045673e+00, 0.1296430071988e+02, 0.6373557924058e-07, 0.6206342280341e+01, 0.9517183207817e+00, 0.6359474329261e-07, 0.5036079095757e+01, 0.1990745094947e+01, 0.5740173582646e-07, 0.6105106371350e+01, 0.9555997388169e+00, 0.7019864084602e-07, 0.7237747359018e+00, 0.5225775174439e+00, 0.6398054487042e-07, 0.3976367969666e+01, 0.2407292145756e+02, 0.7797092650498e-07, 0.4305423910623e+01, 0.2200391463820e+02, 0.6466760000900e-07, 0.3500136825200e+01, 0.5230807360890e+01, 0.7529417043890e-07, 0.3514779246100e+01, 0.1842262939178e+02, 0.6924571140892e-07, 0.2743457928679e+01, 0.1554202828031e+00, 0.6220798650222e-07, 0.2242598118209e+01, 0.1845107853235e+02, 0.5870209391853e-07, 0.2332832707527e+01, 0.6398972393349e+00, 0.6263953473888e-07, 0.2191105358956e+01, 0.6277552955062e+01, 0.6257781390012e-07, 0.4457559396698e+01, 0.6288598745829e+01, 0.5697304945123e-07, 0.3499234761404e+01, 0.1551045220144e+01, 0.6335438746791e-07, 0.6441691079251e+00, 0.5216580451554e+01, 0.6377258441152e-07, 0.2252599151092e+01, 0.5650292065779e+01, 0.6484841818165e-07, 0.1992812417646e+01, 0.1030928125552e+00, 0.4735551485250e-07, 0.3744672082942e+01, 0.1431416805965e+02, 0.4628595996170e-07, 0.1334226211745e+01, 0.5535693017924e+00, 0.6258152336933e-07, 0.4395836159154e+01, 0.2608790314060e+02, 0.6196171366594e-07, 0.2587043007997e+01, 0.8467247584405e+02, 0.6159556952126e-07, 0.4782499769128e+01, 0.2394243902548e+03, 0.4987741172394e-07, 0.7312257619924e+00, 0.7771377146812e+02, 0.5459280703142e-07, 0.3001376372532e+01, 0.6179983037890e+01, 0.4863461189999e-07, 0.3767222128541e+01, 0.9027992316901e+02, 0.5349912093158e-07, 0.3663594450273e+01, 0.6386168663001e+01, 0.5673725607806e-07, 0.4331187919049e+01, 0.6915859635113e+01, 0.4745485060512e-07, 0.5816195745518e+01, 0.6282970628506e+01, 0.4745379005326e-07, 0.8323672435672e+00, 0.6283181072386e+01, 0.4049002796321e-07, 0.3785023976293e+01, 0.6254626709878e+01, 0.4247084014515e-07, 0.2378220728783e+01, 0.7875671926403e+01, 0.4026912363055e-07, 0.2864103423269e+01, 0.6311524991013e+01, 0.4062935011774e-07, 0.2415408595975e+01, 0.3634620989887e+01, 0.5347771048509e-07, 0.3343479309801e+01, 0.2515860172507e+02, 0.4829494136505e-07, 0.2821742398262e+01, 0.5760498333002e+01, 0.4342554404599e-07, 0.5624662458712e+01, 0.7238675589263e+01, 0.4021599184361e-07, 0.5557250275009e+00, 0.1101510648075e+02, 0.4104900474558e-07, 0.3296691780005e+01, 0.6709674010002e+01, 0.4376532905131e-07, 0.3814443999443e+01, 0.6805653367890e+01, 0.3314590480650e-07, 0.3560229189250e+01, 0.1259245002418e+02, 0.3232421839643e-07, 0.5185389180568e+01, 0.1066495398892e+01, 0.3541176318876e-07, 0.3921381909679e+01, 0.9917696840332e+01, 0.3689831242681e-07, 0.4190658955386e+01, 0.1192625446156e+02, 0.3890605376774e-07, 0.5546023371097e+01, 0.7478166569050e-01, 0.3038559339780e-07, 0.6231032794494e+01, 0.1256621883632e+02, 0.3137083969782e-07, 0.6207063419190e+01, 0.4292330755499e+01, 0.4024004081854e-07, 0.1195257375713e+01, 0.1334167431096e+02, 0.3300234879283e-07, 0.1804694240998e+01, 0.1057540660594e+02, 0.3635399155575e-07, 0.5597811343500e+01, 0.6208294184755e+01, 0.3032668691356e-07, 0.3191059366530e+01, 0.1805292951336e+02, 0.2809652069058e-07, 0.4094348032570e+01, 0.3523159621801e-02, 0.3696955383823e-07, 0.5219282738794e+01, 0.5966683958112e+01, 0.3562894142503e-07, 0.1037247544554e+01, 0.6357857516136e+01, 0.3510598524148e-07, 0.1430020816116e+01, 0.6599467742779e+01, 0.3617736142953e-07, 0.3002911403677e+01, 0.6019991944201e+01, 0.2624524910730e-07, 0.2437046757292e+01, 0.6702560555334e+01, 0.2535824204490e-07, 0.1581594689647e+01, 0.3141537925223e+02, 0.3519787226257e-07, 0.5379863121521e+01, 0.2505706758577e+03, 0.2578406709982e-07, 0.4904222639329e+01, 0.1673046366289e+02, 0.3423887981473e-07, 0.3646448997315e+01, 0.6546159756691e+01, 0.2776083886467e-07, 0.3307829300144e+01, 0.1272157198369e+02, 0.3379592818379e-07, 0.1747541251125e+01, 0.1494531617769e+02, 0.3050255426284e-07, 0.1784689432607e-01, 0.4732030630302e+01, 0.2652378350236e-07, 0.4420055276260e+01, 0.5863591145557e+01, 0.2374498173768e-07, 0.3629773929208e+01, 0.2388894113936e+01, 0.2716451255140e-07, 0.3079623706780e+01, 0.1202934727411e+02, 0.3038583699229e-07, 0.3312487903507e+00, 0.1256608456547e+02, 0.2220681228760e-07, 0.5265520401774e+01, 0.1336244973887e+02, 0.3044156540912e-07, 0.4766664081250e+01, 0.2908881142201e+02, 0.2731859923561e-07, 0.5069146530691e+01, 0.1391601904066e+02, 0.2285603018171e-07, 0.5954935112271e+01, 0.6076890225335e+01, 0.2025006454555e-07, 0.4061789589267e+01, 0.4701116388778e+01, 0.2012597519804e-07, 0.2485047705241e+01, 0.6262720680387e+01, 0.2003406962258e-07, 0.4163779209320e+01, 0.6303431020504e+01, 0.2207863441371e-07, 0.6923839133828e+00, 0.6489261475556e+01, 0.2481374305624e-07, 0.5944173595676e+01, 0.1204357418345e+02, 0.2130923288870e-07, 0.4641013671967e+01, 0.5746271423666e+01, 0.2446370543391e-07, 0.6125796518757e+01, 0.1495633313810e+00, 0.1932492759052e-07, 0.2234572324504e+00, 0.1352175143971e+02, 0.2600122568049e-07, 0.4281012405440e+01, 0.4590910121555e+01, 0.2431754047488e-07, 0.1429943874870e+00, 0.1162474756779e+01, 0.1875902869209e-07, 0.9781803816948e+00, 0.6279194432410e+01, 0.1874381139426e-07, 0.5670368130173e+01, 0.6286957268481e+01, 0.2156696047173e-07, 0.2008985006833e+01, 0.1813929450232e+02, 0.1965076182484e-07, 0.2566186202453e+00, 0.4686889479442e+01, 0.2334816372359e-07, 0.4408121891493e+01, 0.1002183730415e+02, 0.1869937408802e-07, 0.5272745038656e+01, 0.2427287361862e+00, 0.2436236460883e-07, 0.4407720479029e+01, 0.9514313292143e+02, 0.1761365216611e-07, 0.1943892315074e+00, 0.1351787002167e+02, 0.2156289480503e-07, 0.1418570924545e+01, 0.6037244212485e+01, 0.2164748979255e-07, 0.4724603439430e+01, 0.2301353951334e+02, 0.2222286670853e-07, 0.2400266874598e+01, 0.1266924451345e+02, 0.2070901414929e-07, 0.5230348028732e+01, 0.6528907488406e+01, 0.1792745177020e-07, 0.2099190328945e+01, 0.6819880277225e+01, 0.1841802068445e-07, 0.3467527844848e+00, 0.6514761976723e+02, 0.1578401631718e-07, 0.7098642356340e+00, 0.2077542790660e-01, 0.1561690152531e-07, 0.5943349620372e+01, 0.6272439236156e+01, 0.1558591045463e-07, 0.7040653478980e+00, 0.6293712464735e+01, 0.1737356469576e-07, 0.4487064760345e+01, 0.1765478049437e+02, 0.1434755619991e-07, 0.2993391570995e+01, 0.1102062672231e+00, 0.1482187806654e-07, 0.2278049198251e+01, 0.1052268489556e+01, 0.1424812827089e-07, 0.1682114725827e+01, 0.1311972100268e+02, 0.1380282448623e-07, 0.3262668602579e+01, 0.1017725758696e+02, 0.1811481244566e-07, 0.3187771221777e+01, 0.1887552587463e+02, 0.1504446185696e-07, 0.5650162308647e+01, 0.7626583626240e-01, 0.1740776154137e-07, 0.5487068607507e+01, 0.1965104848470e+02, 0.1374339536251e-07, 0.5745688172201e+01, 0.6016468784579e+01, 0.1761377477704e-07, 0.5748060203659e+01, 0.2593412433514e+02, 0.1535138225795e-07, 0.6226848505790e+01, 0.9411464614024e+01, 0.1788140543676e-07, 0.6189318878563e+01, 0.3301902111895e+02, 0.1375002807996e-07, 0.5371812884394e+01, 0.6327837846670e+00, 0.1242115758632e-07, 0.1471687569712e+01, 0.3894181736510e+01, 0.1450977333938e-07, 0.4143836662127e+01, 0.1277945078067e+02, 0.1297579575023e-07, 0.9003477661957e+00, 0.6549682916313e+01, 0.1462667934821e-07, 0.5760505536428e+01, 0.1863592847156e+02, 0.1381774374799e-07, 0.1085471729463e+01, 0.2379164476796e+01, 0.1682333169307e-07, 0.5409870870133e+01, 0.1620077269078e+02, 0.1190812918837e-07, 0.1397205174601e+01, 0.1149965630200e+02, 0.1221434762106e-07, 0.9001804809095e+00, 0.1257326515556e+02, 0.1549934644860e-07, 0.4262528275544e+01, 0.1820933031200e+02, 0.1252138953050e-07, 0.1411642012027e+01, 0.6993008899458e+01, 0.1237078905387e-07, 0.2844472403615e+01, 0.2435678079171e+02, 0.1446953389615e-07, 0.5295835522223e+01, 0.3813291813120e-01, 0.1388446457170e-07, 0.4969428135497e+01, 0.2458316379602e+00, 0.1019339179228e-07, 0.2491369561806e+01, 0.6112403035119e+01, 0.1258880815343e-07, 0.4679426248976e+01, 0.5429879531333e+01, 0.1297768238261e-07, 0.1074509953328e+01, 0.1249137003520e+02, 0.9913505718094e-08, 0.4735097918224e+01, 0.6247047890016e+01, 0.9830453155969e-08, 0.4158649187338e+01, 0.6453748665772e+01, 0.1192615865309e-07, 0.3438208613699e+01, 0.6290122169689e+01, 0.9835874798277e-08, 0.1913300781229e+01, 0.6319103810876e+01, 0.9639087569277e-08, 0.9487683644125e+00, 0.8273820945392e+01, 0.1175716107001e-07, 0.3228141664287e+01, 0.6276029531202e+01, 0.1018926508678e-07, 0.2216607854300e+01, 0.1254537627298e+02, 0.9500087869225e-08, 0.2625116459733e+01, 0.1256517118505e+02, 0.9664192916575e-08, 0.5860562449214e+01, 0.6259197520765e+01, 0.9612858712203e-08, 0.7885682917381e+00, 0.6306954180126e+01, 0.1117645675413e-07, 0.3932148831189e+01, 0.1779695906178e+02, 0.1158864052160e-07, 0.9995605521691e+00, 0.1778273215245e+02, 0.9021043467028e-08, 0.5263769742673e+01, 0.6172869583223e+01, 0.8836134773563e-08, 0.1496843220365e+01, 0.1692165728891e+01, 0.1045872200691e-07, 0.7009039517214e+00, 0.2204125344462e+00, 0.1211463487798e-07, 0.4041544938511e+01, 0.8257698122054e+02, 0.8541990804094e-08, 0.1447586692316e+01, 0.6393282117669e+01, 0.1038720703636e-07, 0.4594249718112e+00, 0.1550861511662e+02, 0.1126722351445e-07, 0.3925550579036e+01, 0.2061856251104e+00, 0.8697373859631e-08, 0.4411341856037e+01, 0.9491756770005e+00, 0.8869380028441e-08, 0.2402659724813e+01, 0.3903911373650e+01, 0.9247014693258e-08, 0.1401579743423e+01, 0.6267823317922e+01, 0.9205062930950e-08, 0.5245978000814e+01, 0.6298328382969e+01, 0.8000745038049e-08, 0.3590803356945e+01, 0.2648454860559e+01, 0.9168973650819e-08, 0.2470150501679e+01, 0.1498544001348e+03, 0.1075444949238e-07, 0.1328606161230e+01, 0.3694923081589e+02, 0.7817298525817e-08, 0.6162256225998e+01, 0.4804209201333e+01, 0.9541469226356e-08, 0.3942568967039e+01, 0.1256713221673e+02, 0.9821910122027e-08, 0.2360246287233e+00, 0.1140367694411e+02, 0.9897822023777e-08, 0.4619805634280e+01, 0.2280573557157e+02, 0.7737289283765e-08, 0.3784727847451e+01, 0.7834121070590e+01, 0.9260204034710e-08, 0.2223352487601e+01, 0.2787043132925e+01, 0.7320252888486e-08, 0.1288694636874e+01, 0.6282655592598e+01, 0.7319785780946e-08, 0.5359869567774e+01, 0.6283496108294e+01, 0.7147219933778e-08, 0.5516616675856e+01, 0.1725663147538e+02, 0.7946502829878e-08, 0.2630459984567e+01, 0.1241073141809e+02, 0.9001711808932e-08, 0.2849815827227e+01, 0.6281591679874e+01, 0.8994041507257e-08, 0.3795244450750e+01, 0.6284560021018e+01, 0.8298582787358e-08, 0.5236413127363e+00, 0.1241658836951e+02, 0.8526596520710e-08, 0.4794605424426e+01, 0.1098419223922e+02, 0.8209822103197e-08, 0.1578752370328e+01, 0.1096996532989e+02, 0.6357049861094e-08, 0.5708926113761e+01, 0.1596186371003e+01, 0.7370473179049e-08, 0.3842402530241e+01, 0.4061219149443e+01, 0.7232154664726e-08, 0.3067548981535e+01, 0.1610006857377e+03, 0.6328765494903e-08, 0.1313930030069e+01, 0.1193336791622e+02, 0.8030064908595e-08, 0.3488500408886e+01, 0.8460828644453e+00, 0.6275464259232e-08, 0.1532061626198e+01, 0.8531963191132e+00, 0.7051897446325e-08, 0.3285859929993e+01, 0.5849364236221e+01, 0.6161593705428e-08, 0.1477341999464e+01, 0.5573142801433e+01, 0.7754683957278e-08, 0.1586118663096e+01, 0.8662240327241e+01, 0.5889928990701e-08, 0.1304887868803e+01, 0.1232342296471e+02, 0.5705756047075e-08, 0.4555333589350e+01, 0.1258692712880e+02, 0.5964178808332e-08, 0.3001762842062e+01, 0.5333900173445e+01, 0.6712446027467e-08, 0.4886780007595e+01, 0.1171295538178e+02, 0.5941809275464e-08, 0.4701509603824e+01, 0.9779108567966e+01, 0.5466993627395e-08, 0.4588357817278e+01, 0.1884211409667e+02, 0.6340512090980e-08, 0.1164543038893e+01, 0.5217580628120e+02, 0.6325505710045e-08, 0.3919171259645e+01, 0.1041998632314e+02, 0.6164789509685e-08, 0.2143828253542e+01, 0.6151533897323e+01, 0.5263330812430e-08, 0.6066564434241e+01, 0.1885275071096e+02, 0.5597087780221e-08, 0.2926316429472e+01, 0.4337116142245e+00, 0.5396556236817e-08, 0.3244303591505e+01, 0.6286362197481e+01, 0.5396615148223e-08, 0.3404304703662e+01, 0.6279789503410e+01, 0.7091832443341e-08, 0.8532377803192e+00, 0.4907302013889e+01, 0.6572352589782e-08, 0.4901966774419e+01, 0.1176433076753e+02, 0.5960236060795e-08, 0.1874672315797e+01, 0.1422690933580e-01, 0.5125480043511e-08, 0.3735726064334e+01, 0.1245594543367e+02, 0.5928241866410e-08, 0.4502033899935e+01, 0.6414617803568e+01, 0.5249600357424e-08, 0.4372334799878e+01, 0.1151388321134e+02, 0.6059171276087e-08, 0.2581617302908e+01, 0.6062663316000e+01, 0.5295235081662e-08, 0.2974811513158e+01, 0.3496032717521e+01, 0.5820561875933e-08, 0.1796073748244e+00, 0.2838593341516e+00, 0.4754696606440e-08, 0.1981998136973e+01, 0.3104930017775e+01, 0.6385053548955e-08, 0.2559174171605e+00, 0.6133512519065e+01, 0.6589828273941e-08, 0.2750967106776e+01, 0.4087944051283e+02, 0.5383376567189e-08, 0.6325947523578e+00, 0.2248384854122e+02, 0.5928941683538e-08, 0.1672304519067e+01, 0.1581959461667e+01, 0.4816060709794e-08, 0.3512566172575e+01, 0.9388005868221e+01, 0.6003381586512e-08, 0.5610932219189e+01, 0.5326786718777e+01, 0.5504225393105e-08, 0.4037501131256e+01, 0.6503488384892e+01, 0.5353772620129e-08, 0.6122774968240e+01, 0.1735668374386e+03, 0.5786253768544e-08, 0.5527984999515e+01, 0.1350651127443e+00, 0.5065706702002e-08, 0.9980765573624e+00, 0.1248988586463e+02, 0.5972838885276e-08, 0.6044489493203e+01, 0.2673594526851e+02, 0.5323585877961e-08, 0.3924265998147e+01, 0.4171425416666e+01, 0.5210772682858e-08, 0.6220111376901e+01, 0.2460261242967e+02, 0.4726549040535e-08, 0.3716043206862e+01, 0.7232251527446e+01, 0.6029425105059e-08, 0.8548704071116e+00, 0.3227113045244e+03, 0.4481542826513e-08, 0.1426925072829e+01, 0.5547199253223e+01, 0.5836024505068e-08, 0.7135651752625e-01, 0.7285056171570e+02, 0.4137046613272e-08, 0.5330767643283e+01, 0.1087398597200e+02, 0.5171977473924e-08, 0.4494262335353e+00, 0.1884570439172e+02, 0.5694429833732e-08, 0.2952369582215e+01, 0.9723862754494e+02, 0.4009158925298e-08, 0.3500003416535e+01, 0.6244942932314e+01, 0.4784939596873e-08, 0.6196709413181e+01, 0.2929661536378e+02, 0.3983725022610e-08, 0.5103690031897e+01, 0.4274518229222e+01, 0.3870535232462e-08, 0.3187569587401e+01, 0.6321208768577e+01, 0.5140501213951e-08, 0.1668924357457e+01, 0.1232032006293e+02, 0.3849034819355e-08, 0.4445722510309e+01, 0.1726726808967e+02, 0.4002383075060e-08, 0.5226224152423e+01, 0.7018952447668e+01, 0.3890719543549e-08, 0.4371166550274e+01, 0.1491901785440e+02, 0.4887084607881e-08, 0.5973556689693e+01, 0.1478866649112e+01, 0.3739939287592e-08, 0.2089084714600e+01, 0.6922973089781e+01, 0.5031925918209e-08, 0.4658371936827e+01, 0.1715706182245e+02, 0.4387748764954e-08, 0.4825580552819e+01, 0.2331413144044e+03, 0.4147398098865e-08, 0.3739003524998e+01, 0.1376059875786e+02, 0.3719089993586e-08, 0.1148941386536e+01, 0.6297302759782e+01, 0.3934238461056e-08, 0.1559893008343e+01, 0.7872148766781e+01, 0.3672471375622e-08, 0.5516145383612e+01, 0.6268848941110e+01, 0.3768911277583e-08, 0.6116053700563e+01, 0.4157198507331e+01, 0.4033388417295e-08, 0.5076821746017e+01, 0.1567108171867e+02, 0.3764194617832e-08, 0.8164676232075e+00, 0.3185192151914e+01, 0.4840628226284e-08, 0.1360479453671e+01, 0.1252801878276e+02, 0.4949443923785e-08, 0.2725622229926e+01, 0.1617106187867e+03, 0.4117393089971e-08, 0.6054459628492e+00, 0.5642198095270e+01, 0.3925754020428e-08, 0.8570462135210e+00, 0.2139354194808e+02, 0.3630551757923e-08, 0.3552067338279e+01, 0.6294805223347e+01, 0.3627274802357e-08, 0.3096565085313e+01, 0.6271346477544e+01, 0.3806143885093e-08, 0.6367751709777e+00, 0.1725304118033e+02, 0.4433254641565e-08, 0.4848461503937e+01, 0.7445550607224e+01, 0.3712319846576e-08, 0.1331950643655e+01, 0.4194847048887e+00, 0.3849847534783e-08, 0.4958368297746e+00, 0.9562891316684e+00, 0.3483955430165e-08, 0.2237215515707e+01, 0.1161697602389e+02, 0.3961912730982e-08, 0.3332402188575e+01, 0.2277943724828e+02, 0.3419978244481e-08, 0.5785600576016e+01, 0.1362553364512e+02, 0.3329417758177e-08, 0.9812676559709e-01, 0.1685848245639e+02, 0.4207206893193e-08, 0.9494780468236e+00, 0.2986433403208e+02, 0.3268548976410e-08, 0.1739332095686e+00, 0.5749861718712e+01, 0.3321880082685e-08, 0.1423354800666e+01, 0.6279143387820e+01, 0.4503173010852e-08, 0.2314972675293e+00, 0.1385561574497e+01, 0.4316599090954e-08, 0.1012646782616e+00, 0.4176041334900e+01, 0.3283493323850e-08, 0.5233306881265e+01, 0.6287008313071e+01, 0.3164033542343e-08, 0.4005597257511e+01, 0.2099539292909e+02, 0.4159720956725e-08, 0.5365676242020e+01, 0.5905702259363e+01, 0.3565176892217e-08, 0.4284440620612e+01, 0.3932462625300e-02, 0.3514440950221e-08, 0.4270562636575e+01, 0.7335344340001e+01, 0.3540596871909e-08, 0.5953553201060e+01, 0.1234573916645e+02, 0.2960769905118e-08, 0.1115180417718e+01, 0.2670964694522e+02, 0.2962213739684e-08, 0.3863811918186e+01, 0.6408777551755e+00, 0.3883556700251e-08, 0.1268617928302e+01, 0.6660449441528e+01, 0.2919225516346e-08, 0.4908605223265e+01, 0.1375773836557e+01, 0.3115158863370e-08, 0.3744519976885e+01, 0.3802769619140e-01, 0.4099438144212e-08, 0.4173244670532e+01, 0.4480965020977e+02, 0.2899531858964e-08, 0.5910601428850e+01, 0.2059724391010e+02, 0.3289733429855e-08, 0.2488050078239e+01, 0.1081813534213e+02, 0.3933075612875e-08, 0.1122363652883e+01, 0.3773735910827e+00, 0.3021403764467e-08, 0.4951973724904e+01, 0.2982630633589e+02, 0.2798598949757e-08, 0.5117057845513e+01, 0.1937891852345e+02, 0.3397421302707e-08, 0.6104159180476e+01, 0.6923953605621e+01, 0.3720398002179e-08, 0.1184933429829e+01, 0.3066615496545e+02, 0.3598484186267e-08, 0.3505282086105e+01, 0.6147450479709e+01, 0.3694594027310e-08, 0.2286651088141e+01, 0.2636725487657e+01, 0.2680444152969e-08, 0.1871816775482e+00, 0.6816289982179e+01, 0.3497574865641e-08, 0.3143251755431e+01, 0.6418701221183e+01, 0.3130274129494e-08, 0.2462167316018e+01, 0.1235996607578e+02, 0.3241119069551e-08, 0.4256374004686e+01, 0.1652265972112e+02, 0.2601960842061e-08, 0.4970362941425e+01, 0.1045450126711e+02, 0.2690601527504e-08, 0.2372657824898e+01, 0.3163918923335e+00, 0.2908688152664e-08, 0.4232652627721e+01, 0.2828699048865e+02, 0.3120456131875e-08, 0.3925747001137e+00, 0.2195415756911e+02, 0.3148855423384e-08, 0.3093478330445e+01, 0.1172006883645e+02, 0.3051044261017e-08, 0.5560948248212e+01, 0.6055599646783e+01, 0.2826006876660e-08, 0.5072790310072e+01, 0.5120601093667e+01, 0.3100034191711e-08, 0.4998530231096e+01, 0.1799603123222e+02, 0.2398771640101e-08, 0.2561739802176e+01, 0.6255674361143e+01, 0.2384002842728e-08, 0.4087420284111e+01, 0.6310477339748e+01, 0.2842146517568e-08, 0.2515048217955e+01, 0.5469525544182e+01, 0.2847674371340e-08, 0.5235326497443e+01, 0.1034429499989e+02, 0.2903722140764e-08, 0.1088200795797e+01, 0.6510552054109e+01, 0.3187610710605e-08, 0.4710624424816e+01, 0.1693792562116e+03, 0.3048869992813e-08, 0.2857975896445e+00, 0.8390110365991e+01, 0.2860216950984e-08, 0.2241619020815e+01, 0.2243449970715e+00, 0.2701117683113e-08, 0.6651573305272e-01, 0.6129297044991e+01, 0.2509891590152e-08, 0.1285135324585e+01, 0.1044027435778e+02, 0.2623200252223e-08, 0.2981229834530e+00, 0.6436854655901e+01, 0.2622541669202e-08, 0.6122470726189e+01, 0.9380959548977e+01, 0.2818435667099e-08, 0.4251087148947e+01, 0.5934151399930e+01, 0.2365196797465e-08, 0.3465070460790e+01, 0.2470570524223e+02, 0.2358704646143e-08, 0.5791603815350e+01, 0.8671969964381e+01, 0.2388299481390e-08, 0.4142483772941e+01, 0.7096626156709e+01, 0.1996041217224e-08, 0.2101901889496e+01, 0.1727188400790e+02, 0.2687593060336e-08, 0.1526689456959e+01, 0.7075506709219e+02, 0.2618913670810e-08, 0.2397684236095e+01, 0.6632000300961e+01, 0.2571523050364e-08, 0.5751929456787e+00, 0.6206810014183e+01, 0.2582135006946e-08, 0.5595464352926e+01, 0.4873985990671e+02, 0.2372530190361e-08, 0.5092689490655e+01, 0.1590676413561e+02, 0.2357178484712e-08, 0.4444363527851e+01, 0.3097883698531e+01, 0.2451590394723e-08, 0.3108251687661e+01, 0.6612329252343e+00, 0.2370045949608e-08, 0.2608133861079e+01, 0.3459636466239e+02, 0.2268997267358e-08, 0.3639717753384e+01, 0.2844914056730e-01, 0.1731432137906e-08, 0.1741898445707e+00, 0.2019909489111e+02, 0.1629869741622e-08, 0.3902225646724e+01, 0.3035599730800e+02, 0.2206215801974e-08, 0.4971131250731e+01, 0.6281667977667e+01, 0.2205469554680e-08, 0.1677462357110e+01, 0.6284483723224e+01, 0.2148792362509e-08, 0.4236259604006e+01, 0.1980482729015e+02, 0.1873733657847e-08, 0.5926814998687e+01, 0.2876692439167e+02, 0.2026573758959e-08, 0.4349643351962e+01, 0.2449240616245e+02, 0.1807770325110e-08, 0.5700940482701e+01, 0.2045286941806e+02, 0.1881174408581e-08, 0.6601286363430e+00, 0.2358125818164e+02, 0.1368023671690e-08, 0.2211098592752e+01, 0.2473415438279e+02, 0.1720017916280e-08, 0.4942488551129e+01, 0.1679593901136e+03, 0.1702427665131e-08, 0.1452233856386e+01, 0.3338575901272e+03, 0.1414032510054e-08, 0.5525357721439e+01, 0.1624205518357e+03, 0.1652626045364e-08, 0.4108794283624e+01, 0.8956999012000e+02, 0.1642957769686e-08, 0.7344335209984e+00, 0.5267006960365e+02, 0.1614952403624e-08, 0.3541213951363e+01, 0.3332657872986e+02, 0.1535988291188e-08, 0.4031094072151e+01, 0.3852657435933e+02, 0.1593193738177e-08, 0.4185136203609e+01, 0.2282781046519e+03, 0.1074569126382e-08, 0.1720485636868e+01, 0.8397383534231e+02, 0.1074408214509e-08, 0.2758613420318e+01, 0.8401985929482e+02, 0.9700199670465e-09, 0.4216686842097e+01, 0.7826370942180e+02, 0.1258433517061e-08, 0.2575068876639e+00, 0.3115650189215e+03, 0.1240303229539e-08, 0.4800844956756e+00, 0.1784300471910e+03, 0.9018345948127e-09, 0.3896756361552e+00, 0.5886454391678e+02, 0.1135301432805e-08, 0.3700805023550e+00, 0.7842370451713e+02, 0.9215887951370e-09, 0.4364579276638e+01, 0.1014262087719e+03, 0.1055401054147e-08, 0.2156564222111e+01, 0.5660027930059e+02, 0.1008725979831e-08, 0.5454015785234e+01, 0.4245678405627e+02, 0.7217398104321e-09, 0.1597772562175e+01, 0.2457074661053e+03, 0.6912033134447e-09, 0.5824090621461e+01, 0.1679936946371e+03, 0.6833881523549e-09, 0.3578778482835e+01, 0.6053048899753e+02, 0.4887304205142e-09, 0.3724362812423e+01, 0.9656299901946e+02, 0.5173709754788e-09, 0.5422427507933e+01, 0.2442876000072e+03, 0.4671353097145e-09, 0.2396106924439e+01, 0.1435713242844e+03, 0.5652608439480e-09, 0.2804028838685e+01, 0.8365903305582e+02, 0.5604061331253e-09, 0.1638816006247e+01, 0.8433466158131e+02, 0.4712723365400e-09, 0.8979003224474e+00, 0.3164282286739e+03, 0.4909967465112e-09, 0.3210426725516e+01, 0.4059982187939e+03, 0.4771358267658e-09, 0.5308027211629e+01, 0.1805255418145e+03, 0.3943451445989e-09, 0.2195145341074e+01, 0.2568537517081e+03, 0.3952109120244e-09, 0.5081189491586e+01, 0.2449975330562e+03, 0.3788134594789e-09, 0.4345171264441e+01, 0.1568131045107e+03, 0.3738330190479e-09, 0.2613062847997e+01, 0.3948519331910e+03, 0.3099866678136e-09, 0.2846760817689e+01, 0.1547176098872e+03, 0.2002962716768e-09, 0.4921360989412e+01, 0.2268582385539e+03, 0.2198291338754e-09, 0.1130360117454e+00, 0.1658638954901e+03, 0.1491958330784e-09, 0.4228195232278e+01, 0.2219950288015e+03, 0.1475384076173e-09, 0.3005721811604e+00, 0.3052819430710e+03, 0.1661626624624e-09, 0.7830125621203e+00, 0.2526661704812e+03, 0.9015823460025e-10, 0.3807792942715e+01, 0.4171445043968e+03 }; /* Sun-to-Earth, T^0, Y */ static const double e0y[] = { 0.9998921098898e+00, 0.1826583913846e+00, 0.6283075850446e+01, -0.2442700893735e-01, 0.0000000000000e+00, 0.0000000000000e+00, 0.8352929742915e-02, 0.1395277998680e+00, 0.1256615170089e+02, 0.1046697300177e-03, 0.9641423109763e-01, 0.1884922755134e+02, 0.3110841876663e-04, 0.5381140401712e+01, 0.8399684731857e+02, 0.2570269094593e-04, 0.5301016407128e+01, 0.5296909721118e+00, 0.2147389623610e-04, 0.2662510869850e+01, 0.1577343543434e+01, 0.1680344384050e-04, 0.5207904119704e+01, 0.6279552690824e+01, 0.1679117312193e-04, 0.4582187486968e+01, 0.6286599010068e+01, 0.1440512068440e-04, 0.1900688517726e+01, 0.2352866153506e+01, 0.1135139664999e-04, 0.5273108538556e+01, 0.5223693906222e+01, 0.9345482571018e-05, 0.4503047687738e+01, 0.1203646072878e+02, 0.9007418719568e-05, 0.1605621059637e+01, 0.1021328554739e+02, 0.5671536712314e-05, 0.5812849070861e+00, 0.1059381944224e+01, 0.7451401861666e-05, 0.2807346794836e+01, 0.3981490189893e+00, 0.6393470057114e-05, 0.6029224133855e+01, 0.5753384878334e+01, 0.6814275881697e-05, 0.6472990145974e+00, 0.4705732307012e+01, 0.6113705628887e-05, 0.3813843419700e+01, 0.6812766822558e+01, 0.4503851367273e-05, 0.4527804370996e+01, 0.5884926831456e+01, 0.4522249141926e-05, 0.5991783029224e+01, 0.6256777527156e+01, 0.4501794307018e-05, 0.3798703844397e+01, 0.6309374173736e+01, 0.5514927480180e-05, 0.3961257833388e+01, 0.5507553240374e+01, 0.4062862799995e-05, 0.5256247296369e+01, 0.6681224869435e+01, 0.5414900429712e-05, 0.5499032014097e+01, 0.7755226100720e+00, 0.5463153987424e-05, 0.6173092454097e+01, 0.1414349524433e+02, 0.5071611859329e-05, 0.2870244247651e+01, 0.7860419393880e+01, 0.2195112094455e-05, 0.2952338617201e+01, 0.1150676975667e+02, 0.2279139233919e-05, 0.5951775132933e+01, 0.7058598460518e+01, 0.2278386100876e-05, 0.4845456398785e+01, 0.4694002934110e+01, 0.2559088003308e-05, 0.6945321117311e+00, 0.1216800268190e+02, 0.2561079286856e-05, 0.6167224608301e+01, 0.7099330490126e+00, 0.1792755796387e-05, 0.1400122509632e+01, 0.7962980379786e+00, 0.1818715656502e-05, 0.4703347611830e+01, 0.6283142985870e+01, 0.1818744924791e-05, 0.5086748900237e+01, 0.6283008715021e+01, 0.1554518791390e-05, 0.5331008042713e-01, 0.2513230340178e+02, 0.2063265737239e-05, 0.4283680484178e+01, 0.1179062909082e+02, 0.1497613520041e-05, 0.6074207826073e+01, 0.5486777812467e+01, 0.2000617940427e-05, 0.2501426281450e+01, 0.1778984560711e+02, 0.1289731195580e-05, 0.3646340599536e+01, 0.7079373888424e+01, 0.1282657998934e-05, 0.3232864804902e+01, 0.3738761453707e+01, 0.1528915968658e-05, 0.5581433416669e+01, 0.2132990797783e+00, 0.1187304098432e-05, 0.5453576453694e+01, 0.9437762937313e+01, 0.7842782928118e-06, 0.2823953922273e+00, 0.8827390247185e+01, 0.7352892280868e-06, 0.1124369580175e+01, 0.1589072916335e+01, 0.6570189360797e-06, 0.2089154042840e+01, 0.1176985366291e+02, 0.6324967590410e-06, 0.6704855581230e+00, 0.6262300422539e+01, 0.6298289872283e-06, 0.2836414855840e+01, 0.6303851278352e+01, 0.6476686465855e-06, 0.4852433866467e+00, 0.7113454667900e-02, 0.8587034651234e-06, 0.1453511005668e+01, 0.1672837615881e+03, 0.8068948788113e-06, 0.9224087798609e+00, 0.6069776770667e+01, 0.8353786011661e-06, 0.4631707184895e+01, 0.3340612434717e+01, 0.6009324532132e-06, 0.1829498827726e+01, 0.4136910472696e+01, 0.7558158559566e-06, 0.2588596800317e+01, 0.6496374930224e+01, 0.5809279504503e-06, 0.5516818853476e+00, 0.1097707878456e+02, 0.5374131950254e-06, 0.6275674734960e+01, 0.1194447056968e+01, 0.5711160507326e-06, 0.1091905956872e+01, 0.6282095334605e+01, 0.5710183170746e-06, 0.2415001635090e+01, 0.6284056366286e+01, 0.5144373590610e-06, 0.6020336443438e+01, 0.6290189305114e+01, 0.5103108927267e-06, 0.3775634564605e+01, 0.6275962395778e+01, 0.4960654697891e-06, 0.1073450946756e+01, 0.6127655567643e+01, 0.4786385689280e-06, 0.2431178012310e+01, 0.6438496133249e+01, 0.6109911263665e-06, 0.5343356157914e+01, 0.3154687086868e+01, 0.4839898944024e-06, 0.5830833594047e-01, 0.8018209333619e+00, 0.4734822623919e-06, 0.4536080134821e+01, 0.3128388763578e+01, 0.4834741473290e-06, 0.2585090489754e+00, 0.7084896783808e+01, 0.5134858581156e-06, 0.4213317172603e+01, 0.1235285262111e+02, 0.5064004264978e-06, 0.4814418806478e+00, 0.1185621865188e+02, 0.3753476772761e-06, 0.1599953399788e+01, 0.8429241228195e+01, 0.4935264014283e-06, 0.2157417556873e+01, 0.2544314396739e+01, 0.3950929600897e-06, 0.3359394184254e+01, 0.5481254917084e+01, 0.4895849789777e-06, 0.5165704376558e+01, 0.9225539266174e+01, 0.4215241688886e-06, 0.2065368800993e+01, 0.1726015463500e+02, 0.3796773731132e-06, 0.1468606346612e+01, 0.4265981595566e+00, 0.3114178142515e-06, 0.3615638079474e+01, 0.2146165377750e+01, 0.3260664220838e-06, 0.4417134922435e+01, 0.4164311961999e+01, 0.3976996123008e-06, 0.4700866883004e+01, 0.5856477690889e+01, 0.2801459672924e-06, 0.4538902060922e+01, 0.1256967486051e+02, 0.3638931868861e-06, 0.1334197991475e+01, 0.1807370494127e+02, 0.2487013269476e-06, 0.3749275558275e+01, 0.2629832328990e-01, 0.3034165481994e-06, 0.4236622030873e+00, 0.4535059491685e+01, 0.2676278825586e-06, 0.5970848007811e+01, 0.3930209696940e+01, 0.2764903818918e-06, 0.5194636754501e+01, 0.1256262854127e+02, 0.2485149930507e-06, 0.1002434207846e+01, 0.5088628793478e+01, 0.2199305540941e-06, 0.3066773098403e+01, 0.1255903824622e+02, 0.2571106500435e-06, 0.7588312459063e+00, 0.1336797263425e+02, 0.2049751817158e-06, 0.3444977434856e+01, 0.1137170464392e+02, 0.2599707296297e-06, 0.1873128542205e+01, 0.7143069561767e+02, 0.1785018072217e-06, 0.5015891306615e+01, 0.1748016358760e+01, 0.2324833891115e-06, 0.4618271239730e+01, 0.1831953657923e+02, 0.1709711119545e-06, 0.5300003455669e+01, 0.4933208510675e+01, 0.2107159351716e-06, 0.2229819815115e+01, 0.7477522907414e+01, 0.1750333080295e-06, 0.6161485880008e+01, 0.1044738781244e+02, 0.2000598210339e-06, 0.2967357299999e+01, 0.8031092209206e+01, 0.1380920248681e-06, 0.3027007923917e+01, 0.8635942003952e+01, 0.1412460470299e-06, 0.6037597163798e+01, 0.2942463415728e+01, 0.1888459803001e-06, 0.8561476243374e+00, 0.1561374759853e+03, 0.1788370542585e-06, 0.4869736290209e+01, 0.1592596075957e+01, 0.1360893296167e-06, 0.3626411886436e+01, 0.1309584267300e+02, 0.1506846530160e-06, 0.1550975377427e+01, 0.1649636139783e+02, 0.1800913376176e-06, 0.2075826033190e+01, 0.1729818233119e+02, 0.1436261390649e-06, 0.6148876420255e+01, 0.2042657109477e+02, 0.1220227114151e-06, 0.4382583879906e+01, 0.7632943190217e+01, 0.1337883603592e-06, 0.2036644327361e+01, 0.1213955354133e+02, 0.1159326650738e-06, 0.3892276994687e+01, 0.5331357529664e+01, 0.1352853128569e-06, 0.1447950649744e+01, 0.1673046366289e+02, 0.1433408296083e-06, 0.4457854692961e+01, 0.7342457794669e+01, 0.1234701666518e-06, 0.1538818147151e+01, 0.6279485555400e+01, 0.1234027192007e-06, 0.1968523220760e+01, 0.6286666145492e+01, 0.1244024091797e-06, 0.5779803499985e+01, 0.1511046609763e+02, 0.1097934945516e-06, 0.6210975221388e+00, 0.1098880815746e+02, 0.1254611329856e-06, 0.2591963807998e+01, 0.1572083878776e+02, 0.1158247286784e-06, 0.2483612812670e+01, 0.5729506548653e+01, 0.9039078252960e-07, 0.3857554579796e+01, 0.9623688285163e+01, 0.9108024978836e-07, 0.5826368512984e+01, 0.7234794171227e+01, 0.8887068108436e-07, 0.3475694573987e+01, 0.6148010737701e+01, 0.8632374035438e-07, 0.3059070488983e-01, 0.6418140963190e+01, 0.7893186992967e-07, 0.1583194837728e+01, 0.2118763888447e+01, 0.8297650201172e-07, 0.8519770534637e+00, 0.1471231707864e+02, 0.1019759578988e-06, 0.1319598738732e+00, 0.1349867339771e+01, 0.1010037696236e-06, 0.9937860115618e+00, 0.6836645152238e+01, 0.1047727548266e-06, 0.1382138405399e+01, 0.5999216516294e+01, 0.7351993881086e-07, 0.3833397851735e+01, 0.6040347114260e+01, 0.9868771092341e-07, 0.2124913814390e+01, 0.6566935184597e+01, 0.7007321959390e-07, 0.5946305343763e+01, 0.6525804586632e+01, 0.6861411679709e-07, 0.4574654977089e+01, 0.7238675589263e+01, 0.7554519809614e-07, 0.5949232686844e+01, 0.1253985337760e+02, 0.9541880448335e-07, 0.3495242990564e+01, 0.2122839202813e+02, 0.7185606722155e-07, 0.4310113471661e+01, 0.6245048154254e+01, 0.7131360871710e-07, 0.5480309323650e+01, 0.6321103546637e+01, 0.6651142021039e-07, 0.5411097713654e+01, 0.5327476111629e+01, 0.8538618213667e-07, 0.1827849973951e+01, 0.1101510648075e+02, 0.8634954288044e-07, 0.5443584943349e+01, 0.5643178611111e+01, 0.7449415051484e-07, 0.2011535459060e+01, 0.5368044267797e+00, 0.7421047599169e-07, 0.3464562529249e+01, 0.2354323048545e+02, 0.6140694354424e-07, 0.5657556228815e+01, 0.1296430071988e+02, 0.6353525143033e-07, 0.3463816593821e+01, 0.1990745094947e+01, 0.6221964013447e-07, 0.1532259498697e+01, 0.9517183207817e+00, 0.5852480257244e-07, 0.1375396598875e+01, 0.9555997388169e+00, 0.6398637498911e-07, 0.2405645801972e+01, 0.2407292145756e+02, 0.7039744069878e-07, 0.5397541799027e+01, 0.5225775174439e+00, 0.6977997694382e-07, 0.4762347105419e+01, 0.1097355562493e+02, 0.7460629558396e-07, 0.2711944692164e+01, 0.2200391463820e+02, 0.5376577536101e-07, 0.2352980430239e+01, 0.1431416805965e+02, 0.7530607893556e-07, 0.1943940180699e+01, 0.1842262939178e+02, 0.6822928971605e-07, 0.4337651846959e+01, 0.1554202828031e+00, 0.6220772380094e-07, 0.6716871369278e+00, 0.1845107853235e+02, 0.6586950799043e-07, 0.2229714460505e+01, 0.5216580451554e+01, 0.5873800565771e-07, 0.7627013920580e+00, 0.6398972393349e+00, 0.6264346929745e-07, 0.6202785478961e+00, 0.6277552955062e+01, 0.6257929115669e-07, 0.2886775596668e+01, 0.6288598745829e+01, 0.5343536033409e-07, 0.1977241012051e+01, 0.4690479774488e+01, 0.5587849781714e-07, 0.1922923484825e+01, 0.1551045220144e+01, 0.6905100845603e-07, 0.3570757164631e+01, 0.1030928125552e+00, 0.6178957066649e-07, 0.5197558947765e+01, 0.5230807360890e+01, 0.6187270224331e-07, 0.8193497368922e+00, 0.5650292065779e+01, 0.5385664291426e-07, 0.5406336665586e+01, 0.7771377146812e+02, 0.6329363917926e-07, 0.2837760654536e+01, 0.2608790314060e+02, 0.4546018761604e-07, 0.2933580297050e+01, 0.5535693017924e+00, 0.6196091049375e-07, 0.4157871494377e+01, 0.8467247584405e+02, 0.6159555108218e-07, 0.3211703561703e+01, 0.2394243902548e+03, 0.4995340539317e-07, 0.1459098102922e+01, 0.4732030630302e+01, 0.5457031243572e-07, 0.1430457676136e+01, 0.6179983037890e+01, 0.4863461418397e-07, 0.2196425916730e+01, 0.9027992316901e+02, 0.5342947626870e-07, 0.2086612890268e+01, 0.6386168663001e+01, 0.5674296648439e-07, 0.2760204966535e+01, 0.6915859635113e+01, 0.4745783120161e-07, 0.4245368971862e+01, 0.6282970628506e+01, 0.4745676961198e-07, 0.5544725787016e+01, 0.6283181072386e+01, 0.4049796869973e-07, 0.2213984363586e+01, 0.6254626709878e+01, 0.4248333596940e-07, 0.8075781952896e+00, 0.7875671926403e+01, 0.4027178070205e-07, 0.1293268540378e+01, 0.6311524991013e+01, 0.4066543943476e-07, 0.3986141175804e+01, 0.3634620989887e+01, 0.4858863787880e-07, 0.1276112738231e+01, 0.5760498333002e+01, 0.5277398263530e-07, 0.4916111741527e+01, 0.2515860172507e+02, 0.4105635656559e-07, 0.1725805864426e+01, 0.6709674010002e+01, 0.4376781925772e-07, 0.2243642442106e+01, 0.6805653367890e+01, 0.3235827894693e-07, 0.3614135118271e+01, 0.1066495398892e+01, 0.3073244740308e-07, 0.2460873393460e+01, 0.5863591145557e+01, 0.3088609271373e-07, 0.5678431771790e+01, 0.9917696840332e+01, 0.3393022279836e-07, 0.3814017477291e+01, 0.1391601904066e+02, 0.3038686508802e-07, 0.4660216229171e+01, 0.1256621883632e+02, 0.4019677752497e-07, 0.5906906243735e+01, 0.1334167431096e+02, 0.3288834998232e-07, 0.9536146445882e+00, 0.1620077269078e+02, 0.3889973794631e-07, 0.3942205097644e+01, 0.7478166569050e-01, 0.3050438987141e-07, 0.1624810271286e+01, 0.1805292951336e+02, 0.3601142564638e-07, 0.4030467142575e+01, 0.6208294184755e+01, 0.3689015557141e-07, 0.3648878818694e+01, 0.5966683958112e+01, 0.3563471893565e-07, 0.5749584017096e+01, 0.6357857516136e+01, 0.2776183170667e-07, 0.2630124187070e+01, 0.3523159621801e-02, 0.2922350530341e-07, 0.1790346403629e+01, 0.1272157198369e+02, 0.3511076917302e-07, 0.6142198301611e+01, 0.6599467742779e+01, 0.3619351007632e-07, 0.1432421386492e+01, 0.6019991944201e+01, 0.2561254711098e-07, 0.2302822475792e+01, 0.1259245002418e+02, 0.2626903942920e-07, 0.8660470994571e+00, 0.6702560555334e+01, 0.2550187397083e-07, 0.6069721995383e+01, 0.1057540660594e+02, 0.2535873526138e-07, 0.1079020331795e-01, 0.3141537925223e+02, 0.3519786153847e-07, 0.3809066902283e+01, 0.2505706758577e+03, 0.3424651492873e-07, 0.2075435114417e+01, 0.6546159756691e+01, 0.2372676630861e-07, 0.2057803120154e+01, 0.2388894113936e+01, 0.2710980779541e-07, 0.1510068488010e+01, 0.1202934727411e+02, 0.3038710889704e-07, 0.5043617528901e+01, 0.1256608456547e+02, 0.2220364130585e-07, 0.3694793218205e+01, 0.1336244973887e+02, 0.3025880825460e-07, 0.5450618999049e-01, 0.2908881142201e+02, 0.2784493486864e-07, 0.3381164084502e+01, 0.1494531617769e+02, 0.2294414142438e-07, 0.4382309025210e+01, 0.6076890225335e+01, 0.2012723294724e-07, 0.9142212256518e+00, 0.6262720680387e+01, 0.2036357831958e-07, 0.5676172293154e+01, 0.4701116388778e+01, 0.2003474823288e-07, 0.2592767977625e+01, 0.6303431020504e+01, 0.2207144900109e-07, 0.5404976271180e+01, 0.6489261475556e+01, 0.2481664905135e-07, 0.4373284587027e+01, 0.1204357418345e+02, 0.2674949182295e-07, 0.5859182188482e+01, 0.4590910121555e+01, 0.2450554720322e-07, 0.4555381557451e+01, 0.1495633313810e+00, 0.2601975986457e-07, 0.3933165584959e+01, 0.1965104848470e+02, 0.2199860022848e-07, 0.5227977189087e+01, 0.1351787002167e+02, 0.2448121172316e-07, 0.4858060353949e+01, 0.1162474756779e+01, 0.1876014864049e-07, 0.5690546553605e+01, 0.6279194432410e+01, 0.1874513219396e-07, 0.4099539297446e+01, 0.6286957268481e+01, 0.2156380842559e-07, 0.4382594769913e+00, 0.1813929450232e+02, 0.1981691240061e-07, 0.1829784152444e+01, 0.4686889479442e+01, 0.2329992648539e-07, 0.2836254278973e+01, 0.1002183730415e+02, 0.1765184135302e-07, 0.2803494925833e+01, 0.4292330755499e+01, 0.2436368366085e-07, 0.2836897959677e+01, 0.9514313292143e+02, 0.2164089203889e-07, 0.6127522446024e+01, 0.6037244212485e+01, 0.1847755034221e-07, 0.3683163635008e+01, 0.2427287361862e+00, 0.1674798769966e-07, 0.3316993867246e+00, 0.1311972100268e+02, 0.2222542124356e-07, 0.8294097805480e+00, 0.1266924451345e+02, 0.2071074505925e-07, 0.3659492220261e+01, 0.6528907488406e+01, 0.1608224471835e-07, 0.4774492067182e+01, 0.1352175143971e+02, 0.1857583439071e-07, 0.2873120597682e+01, 0.8662240327241e+01, 0.1793018836159e-07, 0.5282441177929e+00, 0.6819880277225e+01, 0.1575391221692e-07, 0.1320789654258e+01, 0.1102062672231e+00, 0.1840132009557e-07, 0.1917110916256e+01, 0.6514761976723e+02, 0.1760917288281e-07, 0.2972635937132e+01, 0.5746271423666e+01, 0.1561779518516e-07, 0.4372569261981e+01, 0.6272439236156e+01, 0.1558687885205e-07, 0.5416424926425e+01, 0.6293712464735e+01, 0.1951359382579e-07, 0.3094448898752e+01, 0.2301353951334e+02, 0.1569144275614e-07, 0.2802103689808e+01, 0.1765478049437e+02, 0.1479130389462e-07, 0.2136435020467e+01, 0.2077542790660e-01, 0.1467828510764e-07, 0.7072627435674e+00, 0.1052268489556e+01, 0.1627627337440e-07, 0.3947607143237e+01, 0.6327837846670e+00, 0.1503498479758e-07, 0.4079248909190e+01, 0.7626583626240e-01, 0.1297967708237e-07, 0.6269637122840e+01, 0.1149965630200e+02, 0.1374416896634e-07, 0.4175657970702e+01, 0.6016468784579e+01, 0.1783812325219e-07, 0.1476540547560e+01, 0.3301902111895e+02, 0.1525884228756e-07, 0.4653477715241e+01, 0.9411464614024e+01, 0.1451067396763e-07, 0.2573001128225e+01, 0.1277945078067e+02, 0.1297713111950e-07, 0.5612799618771e+01, 0.6549682916313e+01, 0.1462784012820e-07, 0.4189661623870e+01, 0.1863592847156e+02, 0.1384185980007e-07, 0.2656915472196e+01, 0.2379164476796e+01, 0.1221497599801e-07, 0.5612515760138e+01, 0.1257326515556e+02, 0.1560574525896e-07, 0.4783414317919e+01, 0.1887552587463e+02, 0.1544598372036e-07, 0.2694431138063e+01, 0.1820933031200e+02, 0.1531678928696e-07, 0.4105103489666e+01, 0.2593412433514e+02, 0.1349321503795e-07, 0.3082437194015e+00, 0.5120601093667e+01, 0.1252030290917e-07, 0.6124072334087e+01, 0.6993008899458e+01, 0.1459243816687e-07, 0.3733103981697e+01, 0.3813291813120e-01, 0.1226103625262e-07, 0.1267127706817e+01, 0.2435678079171e+02, 0.1019449641504e-07, 0.4367790112269e+01, 0.1725663147538e+02, 0.1380789433607e-07, 0.3387201768700e+01, 0.2458316379602e+00, 0.1019453421658e-07, 0.9204143073737e+00, 0.6112403035119e+01, 0.1297929434405e-07, 0.5786874896426e+01, 0.1249137003520e+02, 0.9912677786097e-08, 0.3164232870746e+01, 0.6247047890016e+01, 0.9829386098599e-08, 0.2586762413351e+01, 0.6453748665772e+01, 0.1226807746104e-07, 0.6239068436607e+01, 0.5429879531333e+01, 0.1192691755997e-07, 0.1867380051424e+01, 0.6290122169689e+01, 0.9836499227081e-08, 0.3424716293727e+00, 0.6319103810876e+01, 0.9642862564285e-08, 0.5661372990657e+01, 0.8273820945392e+01, 0.1165184404862e-07, 0.5768367239093e+01, 0.1778273215245e+02, 0.1175794418818e-07, 0.1657351222943e+01, 0.6276029531202e+01, 0.1018948635601e-07, 0.6458292350865e+00, 0.1254537627298e+02, 0.9500383606676e-08, 0.1054306140741e+01, 0.1256517118505e+02, 0.1227512202906e-07, 0.2505278379114e+01, 0.2248384854122e+02, 0.9664792009993e-08, 0.4289737277000e+01, 0.6259197520765e+01, 0.9613285666331e-08, 0.5500597673141e+01, 0.6306954180126e+01, 0.1117906736211e-07, 0.2361405953468e+01, 0.1779695906178e+02, 0.9611378640782e-08, 0.2851310576269e+01, 0.2061856251104e+00, 0.8845354852370e-08, 0.6208777705343e+01, 0.1692165728891e+01, 0.1054046966600e-07, 0.5413091423934e+01, 0.2204125344462e+00, 0.1215539124483e-07, 0.5613969479755e+01, 0.8257698122054e+02, 0.9932460955209e-08, 0.1106124877015e+01, 0.1017725758696e+02, 0.8785804715043e-08, 0.2869224476477e+01, 0.9491756770005e+00, 0.8538084097562e-08, 0.6159640899344e+01, 0.6393282117669e+01, 0.8648994369529e-08, 0.1374901198784e+01, 0.4804209201333e+01, 0.1039063219067e-07, 0.5171080641327e+01, 0.1550861511662e+02, 0.8867983926439e-08, 0.8317320304902e+00, 0.3903911373650e+01, 0.8327495955244e-08, 0.3605591969180e+01, 0.6172869583223e+01, 0.9243088356133e-08, 0.6114299196843e+01, 0.6267823317922e+01, 0.9205657357835e-08, 0.3675153683737e+01, 0.6298328382969e+01, 0.1033269714606e-07, 0.3313328813024e+01, 0.5573142801433e+01, 0.8001706275552e-08, 0.2019980960053e+01, 0.2648454860559e+01, 0.9171858254191e-08, 0.8992015524177e+00, 0.1498544001348e+03, 0.1075327150242e-07, 0.2898669963648e+01, 0.3694923081589e+02, 0.9884866689828e-08, 0.4946715904478e+01, 0.1140367694411e+02, 0.9541835576677e-08, 0.2371787888469e+01, 0.1256713221673e+02, 0.7739903376237e-08, 0.2213775190612e+01, 0.7834121070590e+01, 0.7311962684106e-08, 0.3429378787739e+01, 0.1192625446156e+02, 0.9724904869624e-08, 0.6195878564404e+01, 0.2280573557157e+02, 0.9251628983612e-08, 0.6511509527390e+00, 0.2787043132925e+01, 0.7320763787842e-08, 0.6001083639421e+01, 0.6282655592598e+01, 0.7320296650962e-08, 0.3789073265087e+01, 0.6283496108294e+01, 0.7947032271039e-08, 0.1059659582204e+01, 0.1241073141809e+02, 0.9005277053115e-08, 0.1280315624361e+01, 0.6281591679874e+01, 0.8995601652048e-08, 0.2224439106766e+01, 0.6284560021018e+01, 0.8288040568796e-08, 0.5234914433867e+01, 0.1241658836951e+02, 0.6359381347255e-08, 0.4137989441490e+01, 0.1596186371003e+01, 0.8699572228626e-08, 0.1758411009497e+01, 0.6133512519065e+01, 0.6456797542736e-08, 0.5919285089994e+01, 0.1685848245639e+02, 0.7424573475452e-08, 0.5414616938827e+01, 0.4061219149443e+01, 0.7235671196168e-08, 0.1496516557134e+01, 0.1610006857377e+03, 0.8104015182733e-08, 0.1919918242764e+01, 0.8460828644453e+00, 0.8098576535937e-08, 0.3819615855458e+01, 0.3894181736510e+01, 0.6275292346625e-08, 0.6244264115141e+01, 0.8531963191132e+00, 0.6052432989112e-08, 0.5037731872610e+00, 0.1567108171867e+02, 0.5705651535817e-08, 0.2984557271995e+01, 0.1258692712880e+02, 0.5789650115138e-08, 0.6087038140697e+01, 0.1193336791622e+02, 0.5512132153377e-08, 0.5855668994076e+01, 0.1232342296471e+02, 0.7388890819102e-08, 0.2443128574740e+01, 0.4907302013889e+01, 0.5467593991798e-08, 0.3017561234194e+01, 0.1884211409667e+02, 0.6388519802999e-08, 0.5887386712935e+01, 0.5217580628120e+02, 0.6106777149944e-08, 0.3483461059895e+00, 0.1422690933580e-01, 0.7383420275489e-08, 0.5417387056707e+01, 0.2358125818164e+02, 0.5505208141738e-08, 0.2848193644783e+01, 0.1151388321134e+02, 0.6310757462877e-08, 0.2349882520828e+01, 0.1041998632314e+02, 0.6166904929691e-08, 0.5728575944077e+00, 0.6151533897323e+01, 0.5263442042754e-08, 0.4495796125937e+01, 0.1885275071096e+02, 0.5591828082629e-08, 0.1355441967677e+01, 0.4337116142245e+00, 0.5397051680497e-08, 0.1673422864307e+01, 0.6286362197481e+01, 0.5396992745159e-08, 0.1833502206373e+01, 0.6279789503410e+01, 0.6572913000726e-08, 0.3331122065824e+01, 0.1176433076753e+02, 0.5123421866413e-08, 0.2165327142679e+01, 0.1245594543367e+02, 0.5930495725999e-08, 0.2931146089284e+01, 0.6414617803568e+01, 0.6431797403933e-08, 0.4134407994088e+01, 0.1350651127443e+00, 0.5003182207604e-08, 0.3805420303749e+01, 0.1096996532989e+02, 0.5587731032504e-08, 0.1082469260599e+01, 0.6062663316000e+01, 0.5935263407816e-08, 0.8384333678401e+00, 0.5326786718777e+01, 0.4756019827760e-08, 0.3552588749309e+01, 0.3104930017775e+01, 0.6599951172637e-08, 0.4320826409528e+01, 0.4087944051283e+02, 0.5902606868464e-08, 0.4811879454445e+01, 0.5849364236221e+01, 0.5921147809031e-08, 0.9942628922396e-01, 0.1581959461667e+01, 0.5505382581266e-08, 0.2466557607764e+01, 0.6503488384892e+01, 0.5353771071862e-08, 0.4551978748683e+01, 0.1735668374386e+03, 0.5063282210946e-08, 0.5710812312425e+01, 0.1248988586463e+02, 0.5926120403383e-08, 0.1333998428358e+01, 0.2673594526851e+02, 0.5211016176149e-08, 0.4649315360760e+01, 0.2460261242967e+02, 0.5347075084894e-08, 0.5512754081205e+01, 0.4171425416666e+01, 0.4872609773574e-08, 0.1308025299938e+01, 0.5333900173445e+01, 0.4727711321420e-08, 0.2144908368062e+01, 0.7232251527446e+01, 0.6029426018652e-08, 0.5567259412084e+01, 0.3227113045244e+03, 0.4321485284369e-08, 0.5230667156451e+01, 0.9388005868221e+01, 0.4476406760553e-08, 0.6134081115303e+01, 0.5547199253223e+01, 0.5835268277420e-08, 0.4783808492071e+01, 0.7285056171570e+02, 0.5172183602748e-08, 0.5161817911099e+01, 0.1884570439172e+02, 0.5693571465184e-08, 0.1381646203111e+01, 0.9723862754494e+02, 0.4060634965349e-08, 0.3876705259495e+00, 0.4274518229222e+01, 0.3967398770473e-08, 0.5029491776223e+01, 0.3496032717521e+01, 0.3943754005255e-08, 0.1923162955490e+01, 0.6244942932314e+01, 0.4781323427824e-08, 0.4633332586423e+01, 0.2929661536378e+02, 0.3871483781204e-08, 0.1616650009743e+01, 0.6321208768577e+01, 0.5141741733997e-08, 0.9817316704659e-01, 0.1232032006293e+02, 0.4002385978497e-08, 0.3656161212139e+01, 0.7018952447668e+01, 0.4901092604097e-08, 0.4404098713092e+01, 0.1478866649112e+01, 0.3740932630345e-08, 0.5181188732639e+00, 0.6922973089781e+01, 0.4387283718538e-08, 0.3254859566869e+01, 0.2331413144044e+03, 0.5019197802033e-08, 0.3086773224677e+01, 0.1715706182245e+02, 0.3834931695175e-08, 0.2797882673542e+01, 0.1491901785440e+02, 0.3760413942497e-08, 0.2892676280217e+01, 0.1726726808967e+02, 0.3719717204628e-08, 0.5861046025739e+01, 0.6297302759782e+01, 0.4145623530149e-08, 0.2168239627033e+01, 0.1376059875786e+02, 0.3932788425380e-08, 0.6271811124181e+01, 0.7872148766781e+01, 0.3686377476857e-08, 0.3936853151404e+01, 0.6268848941110e+01, 0.3779077950339e-08, 0.1404148734043e+01, 0.4157198507331e+01, 0.4091334550598e-08, 0.2452436180854e+01, 0.9779108567966e+01, 0.3926694536146e-08, 0.6102292739040e+01, 0.1098419223922e+02, 0.4841000253289e-08, 0.6072760457276e+01, 0.1252801878276e+02, 0.4949340130240e-08, 0.1154832815171e+01, 0.1617106187867e+03, 0.3761557737360e-08, 0.5527545321897e+01, 0.3185192151914e+01, 0.3647396268188e-08, 0.1525035688629e+01, 0.6271346477544e+01, 0.3932405074189e-08, 0.5570681040569e+01, 0.2139354194808e+02, 0.3631322501141e-08, 0.1981240601160e+01, 0.6294805223347e+01, 0.4130007425139e-08, 0.2050060880201e+01, 0.2195415756911e+02, 0.4433905965176e-08, 0.3277477970321e+01, 0.7445550607224e+01, 0.3851814176947e-08, 0.5210690074886e+01, 0.9562891316684e+00, 0.3485807052785e-08, 0.6653274904611e+00, 0.1161697602389e+02, 0.3979772816991e-08, 0.1767941436148e+01, 0.2277943724828e+02, 0.3402607460500e-08, 0.3421746306465e+01, 0.1087398597200e+02, 0.4049993000926e-08, 0.1127144787547e+01, 0.3163918923335e+00, 0.3420511182382e-08, 0.4214794779161e+01, 0.1362553364512e+02, 0.3640772365012e-08, 0.5324905497687e+01, 0.1725304118033e+02, 0.3323037987501e-08, 0.6135761838271e+01, 0.6279143387820e+01, 0.4503141663637e-08, 0.1802305450666e+01, 0.1385561574497e+01, 0.4314560055588e-08, 0.4812299731574e+01, 0.4176041334900e+01, 0.3294226949110e-08, 0.3657547059723e+01, 0.6287008313071e+01, 0.3215657197281e-08, 0.4866676894425e+01, 0.5749861718712e+01, 0.4129362656266e-08, 0.3809342558906e+01, 0.5905702259363e+01, 0.3137762976388e-08, 0.2494635174443e+01, 0.2099539292909e+02, 0.3514010952384e-08, 0.2699961831678e+01, 0.7335344340001e+01, 0.3327607571530e-08, 0.3318457714816e+01, 0.5436992986000e+01, 0.3541066946675e-08, 0.4382703582466e+01, 0.1234573916645e+02, 0.3216179847052e-08, 0.5271066317054e+01, 0.3802769619140e-01, 0.2959045059570e-08, 0.5819591585302e+01, 0.2670964694522e+02, 0.3884040326665e-08, 0.5980934960428e+01, 0.6660449441528e+01, 0.2922027539886e-08, 0.3337290282483e+01, 0.1375773836557e+01, 0.4110846382042e-08, 0.5742978187327e+01, 0.4480965020977e+02, 0.2934508411032e-08, 0.2278075804200e+01, 0.6408777551755e+00, 0.3966896193000e-08, 0.5835747858477e+01, 0.3773735910827e+00, 0.3286695827610e-08, 0.5838898193902e+01, 0.3932462625300e-02, 0.3720643094196e-08, 0.1122212337858e+01, 0.1646033343740e+02, 0.3285508906174e-08, 0.9182250996416e+00, 0.1081813534213e+02, 0.3753880575973e-08, 0.5174761973266e+01, 0.5642198095270e+01, 0.3022129385587e-08, 0.3381611020639e+01, 0.2982630633589e+02, 0.2798569205621e-08, 0.3546193723922e+01, 0.1937891852345e+02, 0.3397872070505e-08, 0.4533203197934e+01, 0.6923953605621e+01, 0.3708099772977e-08, 0.2756168198616e+01, 0.3066615496545e+02, 0.3599283541510e-08, 0.1934395469918e+01, 0.6147450479709e+01, 0.3688702753059e-08, 0.7149920971109e+00, 0.2636725487657e+01, 0.2681084724003e-08, 0.4899819493154e+01, 0.6816289982179e+01, 0.3495993460759e-08, 0.1572418915115e+01, 0.6418701221183e+01, 0.3130770324995e-08, 0.8912190180489e+00, 0.1235996607578e+02, 0.2744353821941e-08, 0.3800821940055e+01, 0.2059724391010e+02, 0.2842732906341e-08, 0.2644717440029e+01, 0.2828699048865e+02, 0.3046882682154e-08, 0.3987793020179e+01, 0.6055599646783e+01, 0.2399072455143e-08, 0.9908826440764e+00, 0.6255674361143e+01, 0.2384306274204e-08, 0.2516149752220e+01, 0.6310477339748e+01, 0.2977324500559e-08, 0.5849195642118e+01, 0.1652265972112e+02, 0.3062835258972e-08, 0.1681660100162e+01, 0.1172006883645e+02, 0.3109682589231e-08, 0.5804143987737e+00, 0.2751146787858e+02, 0.2903920355299e-08, 0.5800768280123e+01, 0.6510552054109e+01, 0.2823221989212e-08, 0.9241118370216e+00, 0.5469525544182e+01, 0.3187949696649e-08, 0.3139776445735e+01, 0.1693792562116e+03, 0.2922559771655e-08, 0.3549440782984e+01, 0.2630839062450e+00, 0.2436302066603e-08, 0.4735540696319e+01, 0.3946258593675e+00, 0.3049473043606e-08, 0.4998289124561e+01, 0.8390110365991e+01, 0.2863682575784e-08, 0.6709515671102e+00, 0.2243449970715e+00, 0.2641750517966e-08, 0.5410978257284e+01, 0.2986433403208e+02, 0.2704093466243e-08, 0.4778317207821e+01, 0.6129297044991e+01, 0.2445522177011e-08, 0.6009020662222e+01, 0.1171295538178e+02, 0.2623608810230e-08, 0.5010449777147e+01, 0.6436854655901e+01, 0.2079259704053e-08, 0.5980943768809e+01, 0.2019909489111e+02, 0.2820225596771e-08, 0.2679965110468e+01, 0.5934151399930e+01, 0.2365221950927e-08, 0.1894231148810e+01, 0.2470570524223e+02, 0.2359682077149e-08, 0.4220752950780e+01, 0.8671969964381e+01, 0.2387577137206e-08, 0.2571783940617e+01, 0.7096626156709e+01, 0.1982102089816e-08, 0.5169765997119e+00, 0.1727188400790e+02, 0.2687502389925e-08, 0.6239078264579e+01, 0.7075506709219e+02, 0.2207751669135e-08, 0.2031184412677e+01, 0.4377611041777e+01, 0.2618370214274e-08, 0.8266079985979e+00, 0.6632000300961e+01, 0.2591951887361e-08, 0.8819350522008e+00, 0.4873985990671e+02, 0.2375055656248e-08, 0.3520944177789e+01, 0.1590676413561e+02, 0.2472019978911e-08, 0.1551431908671e+01, 0.6612329252343e+00, 0.2368157127199e-08, 0.4178610147412e+01, 0.3459636466239e+02, 0.1764846605693e-08, 0.1506764000157e+01, 0.1980094587212e+02, 0.2291769608798e-08, 0.2118250611782e+01, 0.2844914056730e-01, 0.2209997316943e-08, 0.3363255261678e+01, 0.2666070658668e+00, 0.2292699097923e-08, 0.4200423956460e+00, 0.1484170571900e-02, 0.1629683015329e-08, 0.2331362582487e+01, 0.3035599730800e+02, 0.2206492862426e-08, 0.3400274026992e+01, 0.6281667977667e+01, 0.2205746568257e-08, 0.1066051230724e+00, 0.6284483723224e+01, 0.2026310767991e-08, 0.2779066487979e+01, 0.2449240616245e+02, 0.1762977622163e-08, 0.9951450691840e+00, 0.2045286941806e+02, 0.1368535049606e-08, 0.6402447365817e+00, 0.2473415438279e+02, 0.1720598775450e-08, 0.2303524214705e+00, 0.1679593901136e+03, 0.1702429015449e-08, 0.6164622655048e+01, 0.3338575901272e+03, 0.1414033197685e-08, 0.3954561185580e+01, 0.1624205518357e+03, 0.1573768958043e-08, 0.2028286308984e+01, 0.3144167757552e+02, 0.1650705184447e-08, 0.2304040666128e+01, 0.5267006960365e+02, 0.1651087618855e-08, 0.2538461057280e+01, 0.8956999012000e+02, 0.1616409518983e-08, 0.5111054348152e+01, 0.3332657872986e+02, 0.1537175173581e-08, 0.5601130666603e+01, 0.3852657435933e+02, 0.1593191980553e-08, 0.2614340453411e+01, 0.2282781046519e+03, 0.1499480170643e-08, 0.3624721577264e+01, 0.2823723341956e+02, 0.1493807843235e-08, 0.4214569879008e+01, 0.2876692439167e+02, 0.1074571199328e-08, 0.1496911744704e+00, 0.8397383534231e+02, 0.1074406983417e-08, 0.1187817671922e+01, 0.8401985929482e+02, 0.9757576855851e-09, 0.2655703035858e+01, 0.7826370942180e+02, 0.1258432887565e-08, 0.4969896184844e+01, 0.3115650189215e+03, 0.1240336343282e-08, 0.5192460776926e+01, 0.1784300471910e+03, 0.9016107005164e-09, 0.1960356923057e+01, 0.5886454391678e+02, 0.1135392360918e-08, 0.5082427809068e+01, 0.7842370451713e+02, 0.9216046089565e-09, 0.2793775037273e+01, 0.1014262087719e+03, 0.1061276615030e-08, 0.3726144311409e+01, 0.5660027930059e+02, 0.1010110596263e-08, 0.7404080708937e+00, 0.4245678405627e+02, 0.7217424756199e-09, 0.2697449980577e-01, 0.2457074661053e+03, 0.6912003846756e-09, 0.4253296276335e+01, 0.1679936946371e+03, 0.6871814664847e-09, 0.5148072412354e+01, 0.6053048899753e+02, 0.4887158016343e-09, 0.2153581148294e+01, 0.9656299901946e+02, 0.5161802866314e-09, 0.3852750634351e+01, 0.2442876000072e+03, 0.5652599559057e-09, 0.1233233356270e+01, 0.8365903305582e+02, 0.4710812608586e-09, 0.5610486976767e+01, 0.3164282286739e+03, 0.4909977500324e-09, 0.1639629524123e+01, 0.4059982187939e+03, 0.4772641839378e-09, 0.3737100368583e+01, 0.1805255418145e+03, 0.4487562567153e-09, 0.1158417054478e+00, 0.8433466158131e+02, 0.3943441230497e-09, 0.6243502862796e+00, 0.2568537517081e+03, 0.3952236913598e-09, 0.3510377382385e+01, 0.2449975330562e+03, 0.3788898363417e-09, 0.5916128302299e+01, 0.1568131045107e+03, 0.3738329328831e-09, 0.1042266763456e+01, 0.3948519331910e+03, 0.2451199165151e-09, 0.1166788435700e+01, 0.1435713242844e+03, 0.2436734402904e-09, 0.3254726114901e+01, 0.2268582385539e+03, 0.2213605274325e-09, 0.1687210598530e+01, 0.1658638954901e+03, 0.1491521204829e-09, 0.2657541786794e+01, 0.2219950288015e+03, 0.1474995329744e-09, 0.5013089805819e+01, 0.3052819430710e+03, 0.1661939475656e-09, 0.5495315428418e+01, 0.2526661704812e+03, 0.9015946748003e-10, 0.2236989966505e+01, 0.4171445043968e+03 }; /* Sun-to-Earth, T^0, Z */ static const double e0z[] = { 0.2796207639075e-05, 0.3198701560209e+01, 0.8433466158131e+02, 0.1016042198142e-05, 0.5422360395913e+01, 0.5507553240374e+01, 0.8044305033647e-06, 0.3880222866652e+01, 0.5223693906222e+01, 0.4385347909274e-06, 0.3704369937468e+01, 0.2352866153506e+01, 0.3186156414906e-06, 0.3999639363235e+01, 0.1577343543434e+01, 0.2272412285792e-06, 0.3984738315952e+01, 0.1047747311755e+01, 0.1645620103007e-06, 0.3565412516841e+01, 0.5856477690889e+01, 0.1815836921166e-06, 0.4984507059020e+01, 0.6283075850446e+01, 0.1447461676364e-06, 0.3702753570108e+01, 0.9437762937313e+01, 0.1430760876382e-06, 0.3409658712357e+01, 0.1021328554739e+02, 0.1120445753226e-06, 0.4829561570246e+01, 0.1414349524433e+02, 0.1090232840797e-06, 0.2080729178066e+01, 0.6812766822558e+01, 0.9715727346551e-07, 0.3476295881948e+01, 0.4694002934110e+01, 0.1036267136217e-06, 0.4056639536648e+01, 0.7109288135493e+02, 0.8752665271340e-07, 0.4448159519911e+01, 0.5753384878334e+01, 0.8331864956004e-07, 0.4991704044208e+01, 0.7084896783808e+01, 0.6901658670245e-07, 0.4325358994219e+01, 0.6275962395778e+01, 0.9144536848998e-07, 0.1141826375363e+01, 0.6620890113188e+01, 0.7205085037435e-07, 0.3624344170143e+01, 0.5296909721118e+00, 0.7697874654176e-07, 0.5554257458998e+01, 0.1676215758509e+03, 0.5197545738384e-07, 0.6251760961735e+01, 0.1807370494127e+02, 0.5031345378608e-07, 0.2497341091913e+01, 0.4705732307012e+01, 0.4527110205840e-07, 0.2335079920992e+01, 0.6309374173736e+01, 0.4753355798089e-07, 0.7094148987474e+00, 0.5884926831456e+01, 0.4296951977516e-07, 0.1101916352091e+01, 0.6681224869435e+01, 0.3855341568387e-07, 0.1825495405486e+01, 0.5486777812467e+01, 0.5253930970990e-07, 0.4424740687208e+01, 0.7860419393880e+01, 0.4024630496471e-07, 0.5120498157053e+01, 0.1336797263425e+02, 0.4061069791453e-07, 0.6029771435451e+01, 0.3930209696940e+01, 0.3797883804205e-07, 0.4435193600836e+00, 0.3154687086868e+01, 0.2933033225587e-07, 0.5124157356507e+01, 0.1059381944224e+01, 0.3503000930426e-07, 0.5421830162065e+01, 0.6069776770667e+01, 0.3670096214050e-07, 0.4582101667297e+01, 0.1219403291462e+02, 0.2905609437008e-07, 0.1926566420072e+01, 0.1097707878456e+02, 0.2466827821713e-07, 0.6090174539834e+00, 0.6496374930224e+01, 0.2691647295332e-07, 0.1393432595077e+01, 0.2200391463820e+02, 0.2150554667946e-07, 0.4308671715951e+01, 0.5643178611111e+01, 0.2237481922680e-07, 0.8133968269414e+00, 0.8635942003952e+01, 0.1817741038157e-07, 0.3755205127454e+01, 0.3340612434717e+01, 0.2227820762132e-07, 0.2759558596664e+01, 0.1203646072878e+02, 0.1944713772307e-07, 0.5699645869121e+01, 0.1179062909082e+02, 0.1527340520662e-07, 0.1986749091746e+01, 0.3981490189893e+00, 0.1577282574914e-07, 0.3205017217983e+01, 0.5088628793478e+01, 0.1424738825424e-07, 0.6256747903666e+01, 0.2544314396739e+01, 0.1616563121701e-07, 0.2601671259394e+00, 0.1729818233119e+02, 0.1401210391692e-07, 0.4686939173506e+01, 0.7058598460518e+01, 0.1488726974214e-07, 0.2815862451372e+01, 0.2593412433514e+02, 0.1692626442388e-07, 0.4956894109797e+01, 0.1564752902480e+03, 0.1123571582910e-07, 0.2381192697696e+01, 0.3738761453707e+01, 0.9903308606317e-08, 0.4294851657684e+01, 0.9225539266174e+01, 0.9174533187191e-08, 0.3075171510642e+01, 0.4164311961999e+01, 0.8645985631457e-08, 0.5477534821633e+00, 0.8429241228195e+01, -0.1085876492688e-07, 0.0000000000000e+00, 0.0000000000000e+00, 0.9264309077815e-08, 0.5968571670097e+01, 0.7079373888424e+01, 0.8243116984954e-08, 0.1489098777643e+01, 0.1044738781244e+02, 0.8268102113708e-08, 0.3512977691983e+01, 0.1150676975667e+02, 0.9043613988227e-08, 0.1290704408221e+00, 0.1101510648075e+02, 0.7432912038789e-08, 0.1991086893337e+01, 0.2608790314060e+02, 0.8586233727285e-08, 0.4238357924414e+01, 0.2986433403208e+02, 0.7612230060131e-08, 0.2911090150166e+01, 0.4732030630302e+01, 0.7097787751408e-08, 0.1908938392390e+01, 0.8031092209206e+01, 0.7640237040175e-08, 0.6129219000168e+00, 0.7962980379786e+00, 0.7070445688081e-08, 0.1380417036651e+01, 0.2146165377750e+01, 0.7690770957702e-08, 0.1680504249084e+01, 0.2122839202813e+02, 0.8051292542594e-08, 0.5127423484511e+01, 0.2942463415728e+01, 0.5902709104515e-08, 0.2020274190917e+01, 0.7755226100720e+00, 0.5134567496462e-08, 0.2606778676418e+01, 0.1256615170089e+02, 0.5525802046102e-08, 0.1613011769663e+01, 0.8018209333619e+00, 0.5880724784221e-08, 0.4604483417236e+01, 0.4690479774488e+01, 0.5211699081370e-08, 0.5718964114193e+01, 0.8827390247185e+01, 0.4891849573562e-08, 0.3689658932196e+01, 0.2132990797783e+00, 0.5150246069997e-08, 0.4099769855122e+01, 0.6480980550449e+02, 0.5102434319633e-08, 0.5660834602509e+01, 0.3379454372902e+02, 0.5083405254252e-08, 0.9842221218974e+00, 0.4136910472696e+01, 0.4206562585682e-08, 0.1341363634163e+00, 0.3128388763578e+01, 0.4663249683579e-08, 0.8130132735866e+00, 0.5216580451554e+01, 0.4099474416530e-08, 0.5791497770644e+01, 0.4265981595566e+00, 0.4628251220767e-08, 0.1249802769331e+01, 0.1572083878776e+02, 0.5024068728142e-08, 0.4795684802743e+01, 0.6290189305114e+01, 0.5120234327758e-08, 0.3810420387208e+01, 0.5230807360890e+01, 0.5524029815280e-08, 0.1029264714351e+01, 0.2397622045175e+03, 0.4757415718860e-08, 0.3528044781779e+01, 0.1649636139783e+02, 0.3915786131127e-08, 0.5593889282646e+01, 0.1589072916335e+01, 0.4869053149991e-08, 0.3299636454433e+01, 0.7632943190217e+01, 0.3649365703729e-08, 0.1286049002584e+01, 0.6206810014183e+01, 0.3992493949002e-08, 0.3100307589464e+01, 0.2515860172507e+02, 0.3320247477418e-08, 0.6212683940807e+01, 0.1216800268190e+02, 0.3287123739696e-08, 0.4699118445928e+01, 0.7234794171227e+01, 0.3472776811103e-08, 0.2630507142004e+01, 0.7342457794669e+01, 0.3423253294767e-08, 0.2946432844305e+01, 0.9623688285163e+01, 0.3896173898244e-08, 0.1224834179264e+01, 0.6438496133249e+01, 0.3388455337924e-08, 0.1543807616351e+01, 0.1494531617769e+02, 0.3062704716523e-08, 0.1191777572310e+01, 0.8662240327241e+01, 0.3270075600400e-08, 0.5483498767737e+01, 0.1194447056968e+01, 0.3101209215259e-08, 0.8000833804348e+00, 0.3772475342596e+02, 0.2780883347311e-08, 0.4077980721888e+00, 0.5863591145557e+01, 0.2903605931824e-08, 0.2617490302147e+01, 0.1965104848470e+02, 0.2682014743119e-08, 0.2634703158290e+01, 0.7238675589263e+01, 0.2534360108492e-08, 0.6102446114873e+01, 0.6836645152238e+01, 0.2392564882509e-08, 0.3681820208691e+01, 0.5849364236221e+01, 0.2656667254856e-08, 0.6216045388886e+01, 0.6133512519065e+01, 0.2331242096773e-08, 0.5864949777744e+01, 0.4535059491685e+01, 0.2287898363668e-08, 0.4566628532802e+01, 0.7477522907414e+01, 0.2336944521306e-08, 0.2442722126930e+01, 0.1137170464392e+02, 0.3156632236269e-08, 0.1626628050682e+01, 0.2509084901204e+03, 0.2982612402766e-08, 0.2803604512609e+01, 0.1748016358760e+01, 0.2774031674807e-08, 0.4654002897158e+01, 0.8223916695780e+02, 0.2295236548638e-08, 0.4326518333253e+01, 0.3378142627421e+00, 0.2190714699873e-08, 0.4519614578328e+01, 0.2908881142201e+02, 0.2191495845045e-08, 0.3012626912549e+01, 0.1673046366289e+02, 0.2492901628386e-08, 0.1290101424052e+00, 0.1543797956245e+03, 0.1993778064319e-08, 0.3864046799414e+01, 0.1778984560711e+02, 0.1898146479022e-08, 0.5053777235891e+01, 0.2042657109477e+02, 0.1918280127634e-08, 0.2222470192548e+01, 0.4165496312290e+02, 0.1916351061607e-08, 0.8719067257774e+00, 0.7737595720538e+02, 0.1834720181466e-08, 0.4031491098040e+01, 0.2358125818164e+02, 0.1249201523806e-08, 0.5938379466835e+01, 0.3301902111895e+02, 0.1477304050539e-08, 0.6544722606797e+00, 0.9548094718417e+02, 0.1264316431249e-08, 0.2059072853236e+01, 0.8399684731857e+02, 0.1203526495039e-08, 0.3644813532605e+01, 0.4558517281984e+02, 0.9221681059831e-09, 0.3241815055602e+01, 0.7805158573086e+02, 0.7849278367646e-09, 0.5043812342457e+01, 0.5217580628120e+02, 0.7983392077387e-09, 0.5000024502753e+01, 0.1501922143975e+03, 0.7925395431654e-09, 0.1398734871821e-01, 0.9061773743175e+02, 0.7640473285886e-09, 0.5067111723130e+01, 0.4951538251678e+02, 0.5398937754482e-09, 0.5597382200075e+01, 0.1613385000004e+03, 0.5626247550193e-09, 0.2601338209422e+01, 0.7318837597844e+02, 0.5525197197855e-09, 0.5814832109256e+01, 0.1432335100216e+03, 0.5407629837898e-09, 0.3384820609076e+01, 0.3230491187871e+03, 0.3856739119801e-09, 0.1072391840473e+01, 0.2334791286671e+03, 0.3856425239987e-09, 0.2369540393327e+01, 0.1739046517013e+03, 0.4350867755983e-09, 0.5255575751082e+01, 0.1620484330494e+03, 0.3844113924996e-09, 0.5482356246182e+01, 0.9757644180768e+02, 0.2854869155431e-09, 0.9573634763143e+00, 0.1697170704744e+03, 0.1719227671416e-09, 0.1887203025202e+01, 0.2265204242912e+03, 0.1527846879755e-09, 0.3982183931157e+01, 0.3341954043900e+03, 0.1128229264847e-09, 0.2787457156298e+01, 0.3119028331842e+03 }; /* Sun-to-Earth, T^1, X */ static const double e1x[] = { 0.1234046326004e-05, 0.0000000000000e+00, 0.0000000000000e+00, 0.5150068824701e-06, 0.6002664557501e+01, 0.1256615170089e+02, 0.1290743923245e-07, 0.5959437664199e+01, 0.1884922755134e+02, 0.1068615564952e-07, 0.2015529654209e+01, 0.6283075850446e+01, 0.2079619142538e-08, 0.1732960531432e+01, 0.6279552690824e+01, 0.2078009243969e-08, 0.4915604476996e+01, 0.6286599010068e+01, 0.6206330058856e-09, 0.3616457953824e+00, 0.4705732307012e+01, 0.5989335313746e-09, 0.3802607304474e+01, 0.6256777527156e+01, 0.5958495663840e-09, 0.2845866560031e+01, 0.6309374173736e+01, 0.4866923261539e-09, 0.5213203771824e+01, 0.7755226100720e+00, 0.4267785823142e-09, 0.4368189727818e+00, 0.1059381944224e+01, 0.4610675141648e-09, 0.1837249181372e-01, 0.7860419393880e+01, 0.3626989993973e-09, 0.2161590545326e+01, 0.5753384878334e+01, 0.3563071194389e-09, 0.1452631954746e+01, 0.5884926831456e+01, 0.3557015642807e-09, 0.4470593393054e+01, 0.6812766822558e+01, 0.3210412089122e-09, 0.5195926078314e+01, 0.6681224869435e+01, 0.2875473577986e-09, 0.5916256610193e+01, 0.2513230340178e+02, 0.2842913681629e-09, 0.1149902426047e+01, 0.6127655567643e+01, 0.2751248215916e-09, 0.5502088574662e+01, 0.6438496133249e+01, 0.2481432881127e-09, 0.2921989846637e+01, 0.5486777812467e+01, 0.2059885976560e-09, 0.3718070376585e+01, 0.7079373888424e+01, 0.2015522342591e-09, 0.5979395259740e+01, 0.6290189305114e+01, 0.1995364084253e-09, 0.6772087985494e+00, 0.6275962395778e+01, 0.1957436436943e-09, 0.2899210654665e+01, 0.5507553240374e+01, 0.1651609818948e-09, 0.6228206482192e+01, 0.1150676975667e+02, 0.1822980550699e-09, 0.1469348746179e+01, 0.1179062909082e+02, 0.1675223159760e-09, 0.3813910555688e+01, 0.7058598460518e+01, 0.1706491764745e-09, 0.3004380506684e+00, 0.7113454667900e-02, 0.1392952362615e-09, 0.1440393973406e+01, 0.7962980379786e+00, 0.1209868266342e-09, 0.4150425791727e+01, 0.4694002934110e+01, 0.1009827202611e-09, 0.3290040429843e+01, 0.3738761453707e+01, 0.1047261388602e-09, 0.4229590090227e+01, 0.6282095334605e+01, 0.1047006652004e-09, 0.2418967680575e+01, 0.6284056366286e+01, 0.9609993143095e-10, 0.4627943659201e+01, 0.6069776770667e+01, 0.9590900593873e-10, 0.1894393939924e+01, 0.4136910472696e+01, 0.9146249188071e-10, 0.2010647519562e+01, 0.6496374930224e+01, 0.8545274480290e-10, 0.5529846956226e-01, 0.1194447056968e+01, 0.8224377881194e-10, 0.1254304102174e+01, 0.1589072916335e+01, 0.6183529510410e-10, 0.3360862168815e+01, 0.8827390247185e+01, 0.6259255147141e-10, 0.4755628243179e+01, 0.8429241228195e+01, 0.5539291694151e-10, 0.5371746955142e+01, 0.4933208510675e+01, 0.7328259466314e-10, 0.4927699613906e+00, 0.4535059491685e+01, 0.6017835843560e-10, 0.5776682001734e-01, 0.1255903824622e+02, 0.7079827775243e-10, 0.4395059432251e+01, 0.5088628793478e+01, 0.5170358878213e-10, 0.5154062619954e+01, 0.1176985366291e+02, 0.4872301838682e-10, 0.6289611648973e+00, 0.6040347114260e+01, 0.5249869411058e-10, 0.5617272046949e+01, 0.3154687086868e+01, 0.4716172354411e-10, 0.3965901800877e+01, 0.5331357529664e+01, 0.4871214940964e-10, 0.4627507050093e+01, 0.1256967486051e+02, 0.4598076850751e-10, 0.6023631226459e+01, 0.6525804586632e+01, 0.4562196089485e-10, 0.4138562084068e+01, 0.3930209696940e+01, 0.4325493872224e-10, 0.1330845906564e+01, 0.7632943190217e+01, 0.5673781176748e-10, 0.2558752615657e+01, 0.5729506548653e+01, 0.3961436642503e-10, 0.2728071734630e+01, 0.7234794171227e+01, 0.5101868209058e-10, 0.4113444965144e+01, 0.6836645152238e+01, 0.5257043167676e-10, 0.6195089830590e+01, 0.8031092209206e+01, 0.5076613989393e-10, 0.2305124132918e+01, 0.7477522907414e+01, 0.3342169352778e-10, 0.5415998155071e+01, 0.1097707878456e+02, 0.3545881983591e-10, 0.3727160564574e+01, 0.4164311961999e+01, 0.3364063738599e-10, 0.2901121049204e+00, 0.1137170464392e+02, 0.3357039670776e-10, 0.1652229354331e+01, 0.5223693906222e+01, 0.4307412268687e-10, 0.4938909587445e+01, 0.1592596075957e+01, 0.3405769115435e-10, 0.2408890766511e+01, 0.3128388763578e+01, 0.3001926198480e-10, 0.4862239006386e+01, 0.1748016358760e+01, 0.2778264787325e-10, 0.5241168661353e+01, 0.7342457794669e+01, 0.2676159480666e-10, 0.3423593942199e+01, 0.2146165377750e+01, 0.2954273399939e-10, 0.1881721265406e+01, 0.5368044267797e+00, 0.3309362888795e-10, 0.1931525677349e+01, 0.8018209333619e+00, 0.2810283608438e-10, 0.2414659495050e+01, 0.5225775174439e+00, 0.3378045637764e-10, 0.4238019163430e+01, 0.1554202828031e+00, 0.2558134979840e-10, 0.1828225235805e+01, 0.5230807360890e+01, 0.2273755578447e-10, 0.5858184283998e+01, 0.7084896783808e+01, 0.2294176037690e-10, 0.4514589779057e+01, 0.1726015463500e+02, 0.2533506099435e-10, 0.2355717851551e+01, 0.5216580451554e+01, 0.2716685375812e-10, 0.2221003625100e+01, 0.8635942003952e+01, 0.2419043435198e-10, 0.5955704951635e+01, 0.4690479774488e+01, 0.2521232544812e-10, 0.1395676848521e+01, 0.5481254917084e+01, 0.2630195021491e-10, 0.5727468918743e+01, 0.2629832328990e-01, 0.2548395840944e-10, 0.2628351859400e-03, 0.1349867339771e+01 }; /* Sun-to-Earth, T^1, Y */ static const double e1y[] = { 0.9304690546528e-06, 0.0000000000000e+00, 0.0000000000000e+00, 0.5150715570663e-06, 0.4431807116294e+01, 0.1256615170089e+02, 0.1290825411056e-07, 0.4388610039678e+01, 0.1884922755134e+02, 0.4645466665386e-08, 0.5827263376034e+01, 0.6283075850446e+01, 0.2079625310718e-08, 0.1621698662282e+00, 0.6279552690824e+01, 0.2078189850907e-08, 0.3344713435140e+01, 0.6286599010068e+01, 0.6207190138027e-09, 0.5074049319576e+01, 0.4705732307012e+01, 0.5989826532569e-09, 0.2231842216620e+01, 0.6256777527156e+01, 0.5961360812618e-09, 0.1274975769045e+01, 0.6309374173736e+01, 0.4874165471016e-09, 0.3642277426779e+01, 0.7755226100720e+00, 0.4283834034360e-09, 0.5148765510106e+01, 0.1059381944224e+01, 0.4652389287529e-09, 0.4715794792175e+01, 0.7860419393880e+01, 0.3751707476401e-09, 0.6617207370325e+00, 0.5753384878334e+01, 0.3559998806198e-09, 0.6155548875404e+01, 0.5884926831456e+01, 0.3558447558857e-09, 0.2898827297664e+01, 0.6812766822558e+01, 0.3211116927106e-09, 0.3625813502509e+01, 0.6681224869435e+01, 0.2875609914672e-09, 0.4345435813134e+01, 0.2513230340178e+02, 0.2843109704069e-09, 0.5862263940038e+01, 0.6127655567643e+01, 0.2744676468427e-09, 0.3926419475089e+01, 0.6438496133249e+01, 0.2481285237789e-09, 0.1351976572828e+01, 0.5486777812467e+01, 0.2060338481033e-09, 0.2147556998591e+01, 0.7079373888424e+01, 0.2015822358331e-09, 0.4408358972216e+01, 0.6290189305114e+01, 0.2001195944195e-09, 0.5385829822531e+01, 0.6275962395778e+01, 0.1953667642377e-09, 0.1304933746120e+01, 0.5507553240374e+01, 0.1839744078713e-09, 0.6173567228835e+01, 0.1179062909082e+02, 0.1643334294845e-09, 0.4635942997523e+01, 0.1150676975667e+02, 0.1768051018652e-09, 0.5086283558874e+01, 0.7113454667900e-02, 0.1674874205489e-09, 0.2243332137241e+01, 0.7058598460518e+01, 0.1421445397609e-09, 0.6186899771515e+01, 0.7962980379786e+00, 0.1255163958267e-09, 0.5730238465658e+01, 0.4694002934110e+01, 0.1013945281961e-09, 0.1726055228402e+01, 0.3738761453707e+01, 0.1047294335852e-09, 0.2658801228129e+01, 0.6282095334605e+01, 0.1047103879392e-09, 0.8481047835035e+00, 0.6284056366286e+01, 0.9530343962826e-10, 0.3079267149859e+01, 0.6069776770667e+01, 0.9604637611690e-10, 0.3258679792918e+00, 0.4136910472696e+01, 0.9153518537177e-10, 0.4398599886584e+00, 0.6496374930224e+01, 0.8562458214922e-10, 0.4772686794145e+01, 0.1194447056968e+01, 0.8232525360654e-10, 0.5966220721679e+01, 0.1589072916335e+01, 0.6150223411438e-10, 0.1780985591923e+01, 0.8827390247185e+01, 0.6272087858000e-10, 0.3184305429012e+01, 0.8429241228195e+01, 0.5540476311040e-10, 0.3801260595433e+01, 0.4933208510675e+01, 0.7331901699361e-10, 0.5205948591865e+01, 0.4535059491685e+01, 0.6018528702791e-10, 0.4770139083623e+01, 0.1255903824622e+02, 0.5150530724804e-10, 0.3574796899585e+01, 0.1176985366291e+02, 0.6471933741811e-10, 0.2679787266521e+01, 0.5088628793478e+01, 0.5317460644174e-10, 0.9528763345494e+00, 0.3154687086868e+01, 0.4832187748783e-10, 0.5329322498232e+01, 0.6040347114260e+01, 0.4716763555110e-10, 0.2395235316466e+01, 0.5331357529664e+01, 0.4871509139861e-10, 0.3056663648823e+01, 0.1256967486051e+02, 0.4598417696768e-10, 0.4452762609019e+01, 0.6525804586632e+01, 0.5674189533175e-10, 0.9879680872193e+00, 0.5729506548653e+01, 0.4073560328195e-10, 0.5939127696986e+01, 0.7632943190217e+01, 0.5040994945359e-10, 0.4549875824510e+01, 0.8031092209206e+01, 0.5078185134679e-10, 0.7346659893982e+00, 0.7477522907414e+01, 0.3769343537061e-10, 0.1071317188367e+01, 0.7234794171227e+01, 0.4980331365299e-10, 0.2500345341784e+01, 0.6836645152238e+01, 0.3458236594757e-10, 0.3825159450711e+01, 0.1097707878456e+02, 0.3578859493602e-10, 0.5299664791549e+01, 0.4164311961999e+01, 0.3370504646419e-10, 0.5002316301593e+01, 0.1137170464392e+02, 0.3299873338428e-10, 0.2526123275282e+01, 0.3930209696940e+01, 0.4304917318409e-10, 0.3368078557132e+01, 0.1592596075957e+01, 0.3402418753455e-10, 0.8385495425800e+00, 0.3128388763578e+01, 0.2778460572146e-10, 0.3669905203240e+01, 0.7342457794669e+01, 0.2782710128902e-10, 0.2691664812170e+00, 0.1748016358760e+01, 0.2711725179646e-10, 0.4707487217718e+01, 0.5296909721118e+00, 0.2981760946340e-10, 0.3190260867816e+00, 0.5368044267797e+00, 0.2811672977772e-10, 0.3196532315372e+01, 0.7084896783808e+01, 0.2863454474467e-10, 0.2263240324780e+00, 0.5223693906222e+01, 0.3333464634051e-10, 0.3498451685065e+01, 0.8018209333619e+00, 0.3312991747609e-10, 0.5839154477412e+01, 0.1554202828031e+00, 0.2813255564006e-10, 0.8268044346621e+00, 0.5225775174439e+00, 0.2665098083966e-10, 0.3934021725360e+01, 0.5216580451554e+01, 0.2349795705216e-10, 0.5197620913779e+01, 0.2146165377750e+01, 0.2330352293961e-10, 0.2984999231807e+01, 0.1726015463500e+02, 0.2728001683419e-10, 0.6521679638544e+00, 0.8635942003952e+01, 0.2484061007669e-10, 0.3468955561097e+01, 0.5230807360890e+01, 0.2646328768427e-10, 0.1013724533516e+01, 0.2629832328990e-01, 0.2518630264831e-10, 0.6108081057122e+01, 0.5481254917084e+01, 0.2421901455384e-10, 0.1651097776260e+01, 0.1349867339771e+01, 0.6348533267831e-11, 0.3220226560321e+01, 0.8433466158131e+02 }; /* Sun-to-Earth, T^1, Z */ static const double e1z[] = { 0.2278290449966e-05, 0.3413716033863e+01, 0.6283075850446e+01, 0.5429458209830e-07, 0.0000000000000e+00, 0.0000000000000e+00, 0.1903240492525e-07, 0.3370592358297e+01, 0.1256615170089e+02, 0.2385409276743e-09, 0.3327914718416e+01, 0.1884922755134e+02, 0.8676928342573e-10, 0.1824006811264e+01, 0.5223693906222e+01, 0.7765442593544e-10, 0.3888564279247e+01, 0.5507553240374e+01, 0.7066158332715e-10, 0.5194267231944e+01, 0.2352866153506e+01, 0.7092175288657e-10, 0.2333246960021e+01, 0.8399684731857e+02, 0.5357582213535e-10, 0.2224031176619e+01, 0.5296909721118e+00, 0.3828035865021e-10, 0.2156710933584e+01, 0.6279552690824e+01, 0.3824857220427e-10, 0.1529755219915e+01, 0.6286599010068e+01, 0.3286995181628e-10, 0.4879512900483e+01, 0.1021328554739e+02 }; /* Sun-to-Earth, T^2, X */ static const double e2x[] = { -0.4143818297913e-10, 0.0000000000000e+00, 0.0000000000000e+00, 0.2171497694435e-10, 0.4398225628264e+01, 0.1256615170089e+02, 0.9845398442516e-11, 0.2079720838384e+00, 0.6283075850446e+01, 0.9256833552682e-12, 0.4191264694361e+01, 0.1884922755134e+02, 0.1022049384115e-12, 0.5381133195658e+01, 0.8399684731857e+02 }; /* Sun-to-Earth, T^2, Y */ static const double e2y[] = { 0.5063375872532e-10, 0.0000000000000e+00, 0.0000000000000e+00, 0.2173815785980e-10, 0.2827805833053e+01, 0.1256615170089e+02, 0.1010231999920e-10, 0.4634612377133e+01, 0.6283075850446e+01, 0.9259745317636e-12, 0.2620612076189e+01, 0.1884922755134e+02, 0.1022202095812e-12, 0.3809562326066e+01, 0.8399684731857e+02 }; /* Sun-to-Earth, T^2, Z */ static const double e2z[] = { 0.9722666114891e-10, 0.5152219582658e+01, 0.6283075850446e+01, -0.3494819171909e-11, 0.0000000000000e+00, 0.0000000000000e+00, 0.6713034376076e-12, 0.6440188750495e+00, 0.1256615170089e+02 }; /* SSB-to-Sun, T^0, X */ static const double s0x[] = { 0.4956757536410e-02, 0.3741073751789e+01, 0.5296909721118e+00, 0.2718490072522e-02, 0.4016011511425e+01, 0.2132990797783e+00, 0.1546493974344e-02, 0.2170528330642e+01, 0.3813291813120e-01, 0.8366855276341e-03, 0.2339614075294e+01, 0.7478166569050e-01, 0.2936777942117e-03, 0.0000000000000e+00, 0.0000000000000e+00, 0.1201317439469e-03, 0.4090736353305e+01, 0.1059381944224e+01, 0.7578550887230e-04, 0.3241518088140e+01, 0.4265981595566e+00, 0.1941787367773e-04, 0.1012202064330e+01, 0.2061856251104e+00, 0.1889227765991e-04, 0.3892520416440e+01, 0.2204125344462e+00, 0.1937896968613e-04, 0.4797779441161e+01, 0.1495633313810e+00, 0.1434506110873e-04, 0.3868960697933e+01, 0.5225775174439e+00, 0.1406659911580e-04, 0.4759766557397e+00, 0.5368044267797e+00, 0.1179022300202e-04, 0.7774961520598e+00, 0.7626583626240e-01, 0.8085864460959e-05, 0.3254654471465e+01, 0.3664874755930e-01, 0.7622752967615e-05, 0.4227633103489e+01, 0.3961708870310e-01, 0.6209171139066e-05, 0.2791828325711e+00, 0.7329749511860e-01, 0.4366435633970e-05, 0.4440454875925e+01, 0.1589072916335e+01, 0.3792124889348e-05, 0.5156393842356e+01, 0.7113454667900e-02, 0.3154548963402e-05, 0.6157005730093e+01, 0.4194847048887e+00, 0.3088359882942e-05, 0.2494567553163e+01, 0.6398972393349e+00, 0.2788440902136e-05, 0.4934318747989e+01, 0.1102062672231e+00, 0.3039928456376e-05, 0.4895077702640e+01, 0.6283075850446e+01, 0.2272258457679e-05, 0.5278394064764e+01, 0.1030928125552e+00, 0.2162007057957e-05, 0.5802978019099e+01, 0.3163918923335e+00, 0.1767632855737e-05, 0.3415346595193e-01, 0.1021328554739e+02, 0.1349413459362e-05, 0.2001643230755e+01, 0.1484170571900e-02, 0.1170141900476e-05, 0.2424750491620e+01, 0.6327837846670e+00, 0.1054355266820e-05, 0.3123311487576e+01, 0.4337116142245e+00, 0.9800822461610e-06, 0.3026258088130e+01, 0.1052268489556e+01, 0.1091203749931e-05, 0.3157811670347e+01, 0.1162474756779e+01, 0.6960236715913e-06, 0.8219570542313e+00, 0.1066495398892e+01, 0.5689257296909e-06, 0.1323052375236e+01, 0.9491756770005e+00, 0.6613172135802e-06, 0.2765348881598e+00, 0.8460828644453e+00, 0.6277702517571e-06, 0.5794064466382e+01, 0.1480791608091e+00, 0.6304884066699e-06, 0.7323555380787e+00, 0.2243449970715e+00, 0.4897850467382e-06, 0.3062464235399e+01, 0.3340612434717e+01, 0.3759148598786e-06, 0.4588290469664e+01, 0.3516457698740e-01, 0.3110520548195e-06, 0.1374299536572e+01, 0.6373574839730e-01, 0.3064708359780e-06, 0.4222267485047e+01, 0.1104591729320e-01, 0.2856347168241e-06, 0.3714202944973e+01, 0.1510475019529e+00, 0.2840945514288e-06, 0.2847972875882e+01, 0.4110125927500e-01, 0.2378951599405e-06, 0.3762072563388e+01, 0.2275259891141e+00, 0.2714229481417e-06, 0.1036049980031e+01, 0.2535050500000e-01, 0.2323551717307e-06, 0.4682388599076e+00, 0.8582758298370e-01, 0.1881790512219e-06, 0.4790565425418e+01, 0.2118763888447e+01, 0.2261353968371e-06, 0.1669144912212e+01, 0.7181332454670e-01, 0.2214546389848e-06, 0.3937717281614e+01, 0.2968341143800e-02, 0.2184915594933e-06, 0.1129169845099e+00, 0.7775000683430e-01, 0.2000164937936e-06, 0.4030009638488e+01, 0.2093666171530e+00, 0.1966105136719e-06, 0.8745955786834e+00, 0.2172315424036e+00, 0.1904742332624e-06, 0.5919743598964e+01, 0.2022531624851e+00, 0.1657399705031e-06, 0.2549141484884e+01, 0.7358765972222e+00, 0.1574070533987e-06, 0.5277533020230e+01, 0.7429900518901e+00, 0.1832261651039e-06, 0.3064688127777e+01, 0.3235053470014e+00, 0.1733615346569e-06, 0.3011432799094e+01, 0.1385174140878e+00, 0.1549124014496e-06, 0.4005569132359e+01, 0.5154640627760e+00, 0.1637044713838e-06, 0.1831375966632e+01, 0.8531963191132e+00, 0.1123420082383e-06, 0.1180270407578e+01, 0.1990721704425e+00, 0.1083754165740e-06, 0.3414101320863e+00, 0.5439178814476e+00, 0.1156638012655e-06, 0.6130479452594e+00, 0.5257585094865e+00, 0.1142548785134e-06, 0.3724761948846e+01, 0.5336234347371e+00, 0.7921463895965e-07, 0.2435425589361e+01, 0.1478866649112e+01, 0.7428600285231e-07, 0.3542144398753e+01, 0.2164800718209e+00, 0.8323211246747e-07, 0.3525058072354e+01, 0.1692165728891e+01, 0.7257595116312e-07, 0.1364299431982e+01, 0.2101180877357e+00, 0.7111185833236e-07, 0.2460478875808e+01, 0.4155522422634e+00, 0.6868090383716e-07, 0.4397327670704e+01, 0.1173197218910e+00, 0.7226419974175e-07, 0.4042647308905e+01, 0.1265567569334e+01, 0.6955642383177e-07, 0.2865047906085e+01, 0.9562891316684e+00, 0.7492139296331e-07, 0.5014278994215e+01, 0.1422690933580e-01, 0.6598363128857e-07, 0.2376730020492e+01, 0.6470106940028e+00, 0.7381147293385e-07, 0.3272990384244e+01, 0.1581959461667e+01, 0.6402909624032e-07, 0.5302290955138e+01, 0.9597935788730e-01, 0.6237454263857e-07, 0.5444144425332e+01, 0.7084920306520e-01, 0.5241198544016e-07, 0.4215359579205e+01, 0.5265099800692e+00, 0.5144463853918e-07, 0.1218916689916e+00, 0.5328719641544e+00, 0.5868164772299e-07, 0.2369402002213e+01, 0.7871412831580e-01, 0.6233195669151e-07, 0.1254922242403e+01, 0.2608790314060e+02, 0.6068463791422e-07, 0.5679713760431e+01, 0.1114304132498e+00, 0.4359361135065e-07, 0.6097219641646e+00, 0.1375773836557e+01, 0.4686510366826e-07, 0.4786231041431e+01, 0.1143987543936e+00, 0.3758977287225e-07, 0.1167368068139e+01, 0.1596186371003e+01, 0.4282051974778e-07, 0.1519471064319e+01, 0.2770348281756e+00, 0.5153765386113e-07, 0.1860532322984e+01, 0.2228608264996e+00, 0.4575129387188e-07, 0.7632857887158e+00, 0.1465949902372e+00, 0.3326844933286e-07, 0.1298219485285e+01, 0.5070101000000e-01, 0.3748617450984e-07, 0.1046510321062e+01, 0.4903339079539e+00, 0.2816756661499e-07, 0.3434522346190e+01, 0.2991266627620e+00, 0.3412750405039e-07, 0.2523766270318e+01, 0.3518164938661e+00, 0.2655796761776e-07, 0.2904422260194e+01, 0.6256703299991e+00, 0.2963597929458e-07, 0.5923900431149e+00, 0.1099462426779e+00, 0.2539523734781e-07, 0.4851947722567e+01, 0.1256615170089e+02, 0.2283087914139e-07, 0.3400498595496e+01, 0.6681224869435e+01, 0.2321309799331e-07, 0.5789099148673e+01, 0.3368040641550e-01, 0.2549657649750e-07, 0.3991856479792e-01, 0.1169588211447e+01, 0.2290462303977e-07, 0.2788567577052e+01, 0.1045155034888e+01, 0.1945398522914e-07, 0.3290896998176e+01, 0.1155361302111e+01, 0.1849171512638e-07, 0.2698060129367e+01, 0.4452511715700e-02, 0.1647199834254e-07, 0.3016735644085e+01, 0.4408250688924e+00, 0.1529530765273e-07, 0.5573043116178e+01, 0.6521991896920e-01, 0.1433199339978e-07, 0.1481192356147e+01, 0.9420622223326e+00, 0.1729134193602e-07, 0.1422817538933e+01, 0.2108507877249e+00, 0.1716463931346e-07, 0.3469468901855e+01, 0.2157473718317e+00, 0.1391206061378e-07, 0.6122436220547e+01, 0.4123712502208e+00, 0.1404746661924e-07, 0.1647765641936e+01, 0.4258542984690e-01, 0.1410452399455e-07, 0.5989729161964e+01, 0.2258291676434e+00, 0.1089828772168e-07, 0.2833705509371e+01, 0.4226656969313e+00, 0.1047374564948e-07, 0.5090690007331e+00, 0.3092784376656e+00, 0.1358279126532e-07, 0.5128990262836e+01, 0.7923417740620e-01, 0.1020456476148e-07, 0.9632772880808e+00, 0.1456308687557e+00, 0.1033428735328e-07, 0.3223779318418e+01, 0.1795258541446e+01, 0.1412435841540e-07, 0.2410271572721e+01, 0.1525316725248e+00, 0.9722759371574e-08, 0.2333531395690e+01, 0.8434341241180e-01, 0.9657334084704e-08, 0.6199270974168e+01, 0.1272681024002e+01, 0.1083641148690e-07, 0.2864222292929e+01, 0.7032915397480e-01, 0.1067318403838e-07, 0.5833458866568e+00, 0.2123349582968e+00, 0.1062366201976e-07, 0.4307753989494e+01, 0.2142632012598e+00, 0.1236364149266e-07, 0.2873917870593e+01, 0.1847279083684e+00, 0.1092759489593e-07, 0.2959887266733e+01, 0.1370332435159e+00, 0.8912069362899e-08, 0.5141213702562e+01, 0.2648454860559e+01, 0.9656467707970e-08, 0.4532182462323e+01, 0.4376440768498e+00, 0.8098386150135e-08, 0.2268906338379e+01, 0.2880807454688e+00, 0.7857714675000e-08, 0.4055544260745e+01, 0.2037373330570e+00, 0.7288455940646e-08, 0.5357901655142e+01, 0.1129145838217e+00, 0.9450595950552e-08, 0.4264926963939e+01, 0.5272426800584e+00, 0.9381718247537e-08, 0.7489366976576e-01, 0.5321392641652e+00, 0.7079052646038e-08, 0.1923311052874e+01, 0.6288513220417e+00, 0.9259004415344e-08, 0.2970256853438e+01, 0.1606092486742e+00, 0.8259801499742e-08, 0.3327056314697e+01, 0.8389694097774e+00, 0.6476334355779e-08, 0.2954925505727e+01, 0.2008557621224e+01, 0.5984021492007e-08, 0.9138753105829e+00, 0.2042657109477e+02, 0.5989546863181e-08, 0.3244464082031e+01, 0.2111650433779e+01, 0.6233108606023e-08, 0.4995232638403e+00, 0.4305306221819e+00, 0.6877299149965e-08, 0.2834987233449e+01, 0.9561746721300e-02, 0.8311234227190e-08, 0.2202951835758e+01, 0.3801276407308e+00, 0.6599472832414e-08, 0.4478581462618e+01, 0.1063314406849e+01, 0.6160491096549e-08, 0.5145858696411e+01, 0.1368660381889e+01, 0.6164772043891e-08, 0.3762976697911e+00, 0.4234171675140e+00, 0.6363248684450e-08, 0.3162246718685e+01, 0.1253008786510e-01, 0.6448587520999e-08, 0.3442693302119e+01, 0.5287268506303e+00, 0.6431662283977e-08, 0.8977549136606e+00, 0.5306550935933e+00, 0.6351223158474e-08, 0.4306447410369e+01, 0.5217580628120e+02, 0.5476721393451e-08, 0.3888529177855e+01, 0.2221856701002e+01, 0.5341772572619e-08, 0.2655560662512e+01, 0.7466759693650e-01, 0.5337055758302e-08, 0.5164990735946e+01, 0.7489573444450e-01, 0.5373120816787e-08, 0.6041214553456e+01, 0.1274714967946e+00, 0.5392351705426e-08, 0.9177763485932e+00, 0.1055449481598e+01, 0.6688495850205e-08, 0.3089608126937e+01, 0.2213766559277e+00, 0.5072003660362e-08, 0.4311316541553e+01, 0.2132517061319e+00, 0.5070726650455e-08, 0.5790675464444e+00, 0.2133464534247e+00, 0.5658012950032e-08, 0.2703945510675e+01, 0.7287631425543e+00, 0.4835509924854e-08, 0.2975422976065e+01, 0.7160067364790e-01, 0.6479821978012e-08, 0.1324168733114e+01, 0.2209183458640e-01, 0.6230636494980e-08, 0.2860103632836e+01, 0.3306188016693e+00, 0.4649239516213e-08, 0.4832259763403e+01, 0.7796265773310e-01, 0.6487325792700e-08, 0.2726165825042e+01, 0.3884652414254e+00, 0.4682823682770e-08, 0.6966602455408e+00, 0.1073608853559e+01, 0.5704230804976e-08, 0.5669634104606e+01, 0.8731175355560e-01, 0.6125413585489e-08, 0.1513386538915e+01, 0.7605151500000e-01, 0.6035825038187e-08, 0.1983509168227e+01, 0.9846002785331e+00, 0.4331123462303e-08, 0.2782892992807e+01, 0.4297791515992e+00, 0.4681107685143e-08, 0.5337232886836e+01, 0.2127790306879e+00, 0.4669105829655e-08, 0.5837133792160e+01, 0.2138191288687e+00, 0.5138823602365e-08, 0.3080560200507e+01, 0.7233337363710e-01, 0.4615856664534e-08, 0.1661747897471e+01, 0.8603097737811e+00, 0.4496916702197e-08, 0.2112508027068e+01, 0.7381754420900e-01, 0.4278479042945e-08, 0.5716528462627e+01, 0.7574578717200e-01, 0.3840525503932e-08, 0.6424172726492e+00, 0.3407705765729e+00, 0.4866636509685e-08, 0.4919244697715e+01, 0.7722995774390e-01, 0.3526100639296e-08, 0.2550821052734e+01, 0.6225157782540e-01, 0.3939558488075e-08, 0.3939331491710e+01, 0.5268983110410e-01, 0.4041268772576e-08, 0.2275337571218e+01, 0.3503323232942e+00, 0.3948761842853e-08, 0.1999324200790e+01, 0.1451108196653e+00, 0.3258394550029e-08, 0.9121001378200e+00, 0.5296435984654e+00, 0.3257897048761e-08, 0.3428428660869e+01, 0.5297383457582e+00, 0.3842559031298e-08, 0.6132927720035e+01, 0.9098186128426e+00, 0.3109920095448e-08, 0.7693650193003e+00, 0.3932462625300e-02, 0.3132237775119e-08, 0.3621293854908e+01, 0.2346394437820e+00, 0.3942189421510e-08, 0.4841863659733e+01, 0.3180992042600e-02, 0.3796972285340e-08, 0.1814174994268e+01, 0.1862120789403e+00, 0.3995640233688e-08, 0.1386990406091e+01, 0.4549093064213e+00, 0.2875013727414e-08, 0.9178318587177e+00, 0.1905464808669e+01, 0.3073719932844e-08, 0.2688923811835e+01, 0.3628624111593e+00, 0.2731016580075e-08, 0.1188259127584e+01, 0.2131850110243e+00, 0.2729549896546e-08, 0.3702160634273e+01, 0.2134131485323e+00, 0.3339372892449e-08, 0.7199163960331e+00, 0.2007689919132e+00, 0.2898833764204e-08, 0.1916709364999e+01, 0.5291709230214e+00, 0.2894536549362e-08, 0.2424043195547e+01, 0.5302110212022e+00, 0.3096872473843e-08, 0.4445894977497e+01, 0.2976424921901e+00, 0.2635672326810e-08, 0.3814366984117e+01, 0.1485980103780e+01, 0.3649302697001e-08, 0.2924200596084e+01, 0.6044726378023e+00, 0.3127954585895e-08, 0.1842251648327e+01, 0.1084620721060e+00, 0.2616040173947e-08, 0.4155841921984e+01, 0.1258454114666e+01, 0.2597395859860e-08, 0.1158045978874e+00, 0.2103781122809e+00, 0.2593286172210e-08, 0.4771850408691e+01, 0.2162200472757e+00, 0.2481823585747e-08, 0.4608842558889e+00, 0.1062562936266e+01, 0.2742219550725e-08, 0.1538781127028e+01, 0.5651155736444e+00, 0.3199558469610e-08, 0.3226647822878e+00, 0.7036329877322e+00, 0.2666088542957e-08, 0.1967991731219e+00, 0.1400015846597e+00, 0.2397067430580e-08, 0.3707036669873e+01, 0.2125476091956e+00, 0.2376570772738e-08, 0.1182086628042e+01, 0.2140505503610e+00, 0.2547228007887e-08, 0.4906256820629e+01, 0.1534957940063e+00, 0.2265575594114e-08, 0.3414949866857e+01, 0.2235935264888e+00, 0.2464381430585e-08, 0.4599122275378e+01, 0.2091065926078e+00, 0.2433408527044e-08, 0.2830751145445e+00, 0.2174915669488e+00, 0.2443605509076e-08, 0.4212046432538e+01, 0.1739420156204e+00, 0.2319779262465e-08, 0.9881978408630e+00, 0.7530171478090e-01, 0.2284622835465e-08, 0.5565347331588e+00, 0.7426161660010e-01, 0.2467268750783e-08, 0.5655708150766e+00, 0.2526561439362e+00, 0.2808513492782e-08, 0.1418405053408e+01, 0.5636314030725e+00, 0.2329528932532e-08, 0.4069557545675e+01, 0.1056200952181e+01, 0.9698639532817e-09, 0.1074134313634e+01, 0.7826370942180e+02 }; /* SSB-to-Sun, T^0, Y */ static const double s0y[] = { 0.4955392320126e-02, 0.2170467313679e+01, 0.5296909721118e+00, 0.2722325167392e-02, 0.2444433682196e+01, 0.2132990797783e+00, 0.1546579925346e-02, 0.5992779281546e+00, 0.3813291813120e-01, 0.8363140252966e-03, 0.7687356310801e+00, 0.7478166569050e-01, 0.3385792683603e-03, 0.0000000000000e+00, 0.0000000000000e+00, 0.1201192221613e-03, 0.2520035601514e+01, 0.1059381944224e+01, 0.7587125720554e-04, 0.1669954006449e+01, 0.4265981595566e+00, 0.1964155361250e-04, 0.5707743963343e+01, 0.2061856251104e+00, 0.1891900364909e-04, 0.2320960679937e+01, 0.2204125344462e+00, 0.1937373433356e-04, 0.3226940689555e+01, 0.1495633313810e+00, 0.1437139941351e-04, 0.2301626908096e+01, 0.5225775174439e+00, 0.1406267683099e-04, 0.5188579265542e+01, 0.5368044267797e+00, 0.1178703080346e-04, 0.5489483248476e+01, 0.7626583626240e-01, 0.8079835186041e-05, 0.1683751835264e+01, 0.3664874755930e-01, 0.7623253594652e-05, 0.2656400462961e+01, 0.3961708870310e-01, 0.6248667483971e-05, 0.4992775362055e+01, 0.7329749511860e-01, 0.4366353695038e-05, 0.2869706279678e+01, 0.1589072916335e+01, 0.3829101568895e-05, 0.3572131359950e+01, 0.7113454667900e-02, 0.3175733773908e-05, 0.4535372530045e+01, 0.4194847048887e+00, 0.3092437902159e-05, 0.9230153317909e+00, 0.6398972393349e+00, 0.2874168812154e-05, 0.3363143761101e+01, 0.1102062672231e+00, 0.3040119321826e-05, 0.3324250895675e+01, 0.6283075850446e+01, 0.2699723308006e-05, 0.2917882441928e+00, 0.1030928125552e+00, 0.2134832683534e-05, 0.4220997202487e+01, 0.3163918923335e+00, 0.1770412139433e-05, 0.4747318496462e+01, 0.1021328554739e+02, 0.1377264209373e-05, 0.4305058462401e+00, 0.1484170571900e-02, 0.1127814538960e-05, 0.8538177240740e+00, 0.6327837846670e+00, 0.1055608090130e-05, 0.1551800742580e+01, 0.4337116142245e+00, 0.9802673861420e-06, 0.1459646735377e+01, 0.1052268489556e+01, 0.1090329461951e-05, 0.1587351228711e+01, 0.1162474756779e+01, 0.6959590025090e-06, 0.5534442628766e+01, 0.1066495398892e+01, 0.5664914529542e-06, 0.6030673003297e+01, 0.9491756770005e+00, 0.6607787763599e-06, 0.4989507233927e+01, 0.8460828644453e+00, 0.6269725742838e-06, 0.4222951804572e+01, 0.1480791608091e+00, 0.6301889697863e-06, 0.5444316669126e+01, 0.2243449970715e+00, 0.4891042662861e-06, 0.1490552839784e+01, 0.3340612434717e+01, 0.3457083123290e-06, 0.3030475486049e+01, 0.3516457698740e-01, 0.3032559967314e-06, 0.2652038793632e+01, 0.1104591729320e-01, 0.2841133988903e-06, 0.1276744786829e+01, 0.4110125927500e-01, 0.2855564444432e-06, 0.2143368674733e+01, 0.1510475019529e+00, 0.2765157135038e-06, 0.5444186109077e+01, 0.6373574839730e-01, 0.2382312465034e-06, 0.2190521137593e+01, 0.2275259891141e+00, 0.2808060365077e-06, 0.5735195064841e+01, 0.2535050500000e-01, 0.2332175234405e-06, 0.9481985524859e-01, 0.7181332454670e-01, 0.2322488199659e-06, 0.5180499361533e+01, 0.8582758298370e-01, 0.1881850258423e-06, 0.3219788273885e+01, 0.2118763888447e+01, 0.2196111392808e-06, 0.2366941159761e+01, 0.2968341143800e-02, 0.2183810335519e-06, 0.4825445110915e+01, 0.7775000683430e-01, 0.2002733093326e-06, 0.2457148995307e+01, 0.2093666171530e+00, 0.1967111767229e-06, 0.5586291545459e+01, 0.2172315424036e+00, 0.1568473250543e-06, 0.3708003123320e+01, 0.7429900518901e+00, 0.1852528314300e-06, 0.4310638151560e+01, 0.2022531624851e+00, 0.1832111226447e-06, 0.1494665322656e+01, 0.3235053470014e+00, 0.1746805502310e-06, 0.1451378500784e+01, 0.1385174140878e+00, 0.1555730966650e-06, 0.1068040418198e+01, 0.7358765972222e+00, 0.1554883462559e-06, 0.2442579035461e+01, 0.5154640627760e+00, 0.1638380568746e-06, 0.2597913420625e+00, 0.8531963191132e+00, 0.1159938593640e-06, 0.5834512021280e+01, 0.1990721704425e+00, 0.1083427965695e-06, 0.5054033177950e+01, 0.5439178814476e+00, 0.1156480369431e-06, 0.5325677432457e+01, 0.5257585094865e+00, 0.1141308860095e-06, 0.2153403923857e+01, 0.5336234347371e+00, 0.7913146470946e-07, 0.8642846847027e+00, 0.1478866649112e+01, 0.7439752463733e-07, 0.1970628496213e+01, 0.2164800718209e+00, 0.7280277104079e-07, 0.6073307250609e+01, 0.2101180877357e+00, 0.8319567719136e-07, 0.1954371928334e+01, 0.1692165728891e+01, 0.7137705549290e-07, 0.8904989440909e+00, 0.4155522422634e+00, 0.6900825396225e-07, 0.2825717714977e+01, 0.1173197218910e+00, 0.7245757216635e-07, 0.2481677513331e+01, 0.1265567569334e+01, 0.6961165696255e-07, 0.1292955312978e+01, 0.9562891316684e+00, 0.7571804456890e-07, 0.3427517575069e+01, 0.1422690933580e-01, 0.6605425721904e-07, 0.8052192701492e+00, 0.6470106940028e+00, 0.7375477357248e-07, 0.1705076390088e+01, 0.1581959461667e+01, 0.7041664951470e-07, 0.4848356967891e+00, 0.9597935788730e-01, 0.6322199535763e-07, 0.3878069473909e+01, 0.7084920306520e-01, 0.5244380279191e-07, 0.2645560544125e+01, 0.5265099800692e+00, 0.5143125704988e-07, 0.4834486101370e+01, 0.5328719641544e+00, 0.5871866319373e-07, 0.7981472548900e+00, 0.7871412831580e-01, 0.6300822573871e-07, 0.5979398788281e+01, 0.2608790314060e+02, 0.6062154271548e-07, 0.4108655402756e+01, 0.1114304132498e+00, 0.4361912339976e-07, 0.5322624319280e+01, 0.1375773836557e+01, 0.4417005920067e-07, 0.6240817359284e+01, 0.2770348281756e+00, 0.4686806749936e-07, 0.3214977301156e+01, 0.1143987543936e+00, 0.3758892132305e-07, 0.5879809634765e+01, 0.1596186371003e+01, 0.5151351332319e-07, 0.2893377688007e+00, 0.2228608264996e+00, 0.4554683578572e-07, 0.5475427144122e+01, 0.1465949902372e+00, 0.3442381385338e-07, 0.5992034796640e+01, 0.5070101000000e-01, 0.2831093954933e-07, 0.5367350273914e+01, 0.3092784376656e+00, 0.3756267090084e-07, 0.5758171285420e+01, 0.4903339079539e+00, 0.2816374679892e-07, 0.1863718700923e+01, 0.2991266627620e+00, 0.3419307025569e-07, 0.9524347534130e+00, 0.3518164938661e+00, 0.2904250494239e-07, 0.5304471615602e+01, 0.1099462426779e+00, 0.2471734511206e-07, 0.1297069793530e+01, 0.6256703299991e+00, 0.2539620831872e-07, 0.3281126083375e+01, 0.1256615170089e+02, 0.2281017868007e-07, 0.1829122133165e+01, 0.6681224869435e+01, 0.2275319473335e-07, 0.5797198160181e+01, 0.3932462625300e-02, 0.2547755368442e-07, 0.4752697708330e+01, 0.1169588211447e+01, 0.2285979669317e-07, 0.1223205292886e+01, 0.1045155034888e+01, 0.1913386560994e-07, 0.1757532993389e+01, 0.1155361302111e+01, 0.1809020525147e-07, 0.4246116108791e+01, 0.3368040641550e-01, 0.1649213300201e-07, 0.1445162890627e+01, 0.4408250688924e+00, 0.1834972793932e-07, 0.1126917567225e+01, 0.4452511715700e-02, 0.1439550648138e-07, 0.6160756834764e+01, 0.9420622223326e+00, 0.1487645457041e-07, 0.4358761931792e+01, 0.4123712502208e+00, 0.1731729516660e-07, 0.6134456753344e+01, 0.2108507877249e+00, 0.1717747163567e-07, 0.1898186084455e+01, 0.2157473718317e+00, 0.1418190430374e-07, 0.4180286741266e+01, 0.6521991896920e-01, 0.1404844134873e-07, 0.7654053565412e-01, 0.4258542984690e-01, 0.1409842846538e-07, 0.4418612420312e+01, 0.2258291676434e+00, 0.1090948346291e-07, 0.1260615686131e+01, 0.4226656969313e+00, 0.1357577323612e-07, 0.3558248818690e+01, 0.7923417740620e-01, 0.1018154061960e-07, 0.5676087241256e+01, 0.1456308687557e+00, 0.1412073972109e-07, 0.8394392632422e+00, 0.1525316725248e+00, 0.1030938326496e-07, 0.1653593274064e+01, 0.1795258541446e+01, 0.1180081567104e-07, 0.1285802592036e+01, 0.7032915397480e-01, 0.9708510575650e-08, 0.7631889488106e+00, 0.8434341241180e-01, 0.9637689663447e-08, 0.4630642649176e+01, 0.1272681024002e+01, 0.1068910429389e-07, 0.5294934032165e+01, 0.2123349582968e+00, 0.1063716179336e-07, 0.2736266800832e+01, 0.2142632012598e+00, 0.1234858713814e-07, 0.1302891146570e+01, 0.1847279083684e+00, 0.8912631189738e-08, 0.3570415993621e+01, 0.2648454860559e+01, 0.1036378285534e-07, 0.4236693440949e+01, 0.1370332435159e+00, 0.9667798501561e-08, 0.2960768892398e+01, 0.4376440768498e+00, 0.8108314201902e-08, 0.6987781646841e+00, 0.2880807454688e+00, 0.7648364324628e-08, 0.2499017863863e+01, 0.2037373330570e+00, 0.7286136828406e-08, 0.3787426951665e+01, 0.1129145838217e+00, 0.9448237743913e-08, 0.2694354332983e+01, 0.5272426800584e+00, 0.9374276106428e-08, 0.4787121277064e+01, 0.5321392641652e+00, 0.7100226287462e-08, 0.3530238792101e+00, 0.6288513220417e+00, 0.9253056659571e-08, 0.1399478925664e+01, 0.1606092486742e+00, 0.6636432145504e-08, 0.3479575438447e+01, 0.1368660381889e+01, 0.6469975312932e-08, 0.1383669964800e+01, 0.2008557621224e+01, 0.7335849729765e-08, 0.1243698166898e+01, 0.9561746721300e-02, 0.8743421205855e-08, 0.3776164289301e+01, 0.3801276407308e+00, 0.5993635744494e-08, 0.5627122113596e+01, 0.2042657109477e+02, 0.5981008479693e-08, 0.1674336636752e+01, 0.2111650433779e+01, 0.6188535145838e-08, 0.5214925208672e+01, 0.4305306221819e+00, 0.6596074017566e-08, 0.2907653268124e+01, 0.1063314406849e+01, 0.6630815126226e-08, 0.2127643669658e+01, 0.8389694097774e+00, 0.6156772830040e-08, 0.5082160803295e+01, 0.4234171675140e+00, 0.6446960563014e-08, 0.1872100916905e+01, 0.5287268506303e+00, 0.6429324424668e-08, 0.5610276103577e+01, 0.5306550935933e+00, 0.6302232396465e-08, 0.1592152049607e+01, 0.1253008786510e-01, 0.6399244436159e-08, 0.2746214421532e+01, 0.5217580628120e+02, 0.5474965172558e-08, 0.2317666374383e+01, 0.2221856701002e+01, 0.5339293190692e-08, 0.1084724961156e+01, 0.7466759693650e-01, 0.5334733683389e-08, 0.3594106067745e+01, 0.7489573444450e-01, 0.5392665782110e-08, 0.5630254365606e+01, 0.1055449481598e+01, 0.6682075673789e-08, 0.1518480041732e+01, 0.2213766559277e+00, 0.5079130495960e-08, 0.2739765115711e+01, 0.2132517061319e+00, 0.5077759793261e-08, 0.5290711290094e+01, 0.2133464534247e+00, 0.4832037368310e-08, 0.1404473217200e+01, 0.7160067364790e-01, 0.6463279674802e-08, 0.6038381695210e+01, 0.2209183458640e-01, 0.6240592771560e-08, 0.1290170653666e+01, 0.3306188016693e+00, 0.4672013521493e-08, 0.3261895939677e+01, 0.7796265773310e-01, 0.6500650750348e-08, 0.1154522312095e+01, 0.3884652414254e+00, 0.6344161389053e-08, 0.6206111545062e+01, 0.7605151500000e-01, 0.4682518370646e-08, 0.5409118796685e+01, 0.1073608853559e+01, 0.5329460015591e-08, 0.1202985784864e+01, 0.7287631425543e+00, 0.5701588675898e-08, 0.4098715257064e+01, 0.8731175355560e-01, 0.6030690867211e-08, 0.4132033218460e+00, 0.9846002785331e+00, 0.4336256312655e-08, 0.1211415991827e+01, 0.4297791515992e+00, 0.4688498808975e-08, 0.3765479072409e+01, 0.2127790306879e+00, 0.4675578609335e-08, 0.4265540037226e+01, 0.2138191288687e+00, 0.4225578112158e-08, 0.5237566010676e+01, 0.3407705765729e+00, 0.5139422230028e-08, 0.1507173079513e+01, 0.7233337363710e-01, 0.4619995093571e-08, 0.9023957449848e-01, 0.8603097737811e+00, 0.4494776255461e-08, 0.5414930552139e+00, 0.7381754420900e-01, 0.4274026276788e-08, 0.4145735303659e+01, 0.7574578717200e-01, 0.5018141789353e-08, 0.3344408829055e+01, 0.3180992042600e-02, 0.4866163952181e-08, 0.3348534657607e+01, 0.7722995774390e-01, 0.4111986020501e-08, 0.4198823597220e+00, 0.1451108196653e+00, 0.3356142784950e-08, 0.5609144747180e+01, 0.1274714967946e+00, 0.4070575554551e-08, 0.7028411059224e+00, 0.3503323232942e+00, 0.3257451857278e-08, 0.5624697983086e+01, 0.5296435984654e+00, 0.3256973703026e-08, 0.1857842076707e+01, 0.5297383457582e+00, 0.3830771508640e-08, 0.4562887279931e+01, 0.9098186128426e+00, 0.3725024005962e-08, 0.2358058692652e+00, 0.1084620721060e+00, 0.3136763921756e-08, 0.2049731526845e+01, 0.2346394437820e+00, 0.3795147256194e-08, 0.2432356296933e+00, 0.1862120789403e+00, 0.2877342229911e-08, 0.5631101279387e+01, 0.1905464808669e+01, 0.3076931798805e-08, 0.1117615737392e+01, 0.3628624111593e+00, 0.2734765945273e-08, 0.5899826516955e+01, 0.2131850110243e+00, 0.2733405296885e-08, 0.2130562964070e+01, 0.2134131485323e+00, 0.2898552353410e-08, 0.3462387048225e+00, 0.5291709230214e+00, 0.2893736103681e-08, 0.8534352781543e+00, 0.5302110212022e+00, 0.3095717734137e-08, 0.2875061429041e+01, 0.2976424921901e+00, 0.2636190425832e-08, 0.2242512846659e+01, 0.1485980103780e+01, 0.3645512095537e-08, 0.1354016903958e+01, 0.6044726378023e+00, 0.2808173547723e-08, 0.6705114365631e-01, 0.6225157782540e-01, 0.2625012866888e-08, 0.4775705748482e+01, 0.5268983110410e-01, 0.2572233995651e-08, 0.2638924216139e+01, 0.1258454114666e+01, 0.2604238824792e-08, 0.4826358927373e+01, 0.2103781122809e+00, 0.2596886385239e-08, 0.3200388483118e+01, 0.2162200472757e+00, 0.3228057304264e-08, 0.5384848409563e+01, 0.2007689919132e+00, 0.2481601798252e-08, 0.5173373487744e+01, 0.1062562936266e+01, 0.2745977498864e-08, 0.6250966149853e+01, 0.5651155736444e+00, 0.2669878833811e-08, 0.4906001352499e+01, 0.1400015846597e+00, 0.3203986611711e-08, 0.5034333010005e+01, 0.7036329877322e+00, 0.3354961227212e-08, 0.6108262423137e+01, 0.4549093064213e+00, 0.2400407324558e-08, 0.2135399294955e+01, 0.2125476091956e+00, 0.2379905859802e-08, 0.5893721933961e+01, 0.2140505503610e+00, 0.2550844302187e-08, 0.3331940762063e+01, 0.1534957940063e+00, 0.2268824211001e-08, 0.1843418461035e+01, 0.2235935264888e+00, 0.2464700891204e-08, 0.3029548547230e+01, 0.2091065926078e+00, 0.2436814726024e-08, 0.4994717970364e+01, 0.2174915669488e+00, 0.2443623894745e-08, 0.2645102591375e+01, 0.1739420156204e+00, 0.2318701783838e-08, 0.5700547397897e+01, 0.7530171478090e-01, 0.2284448700256e-08, 0.5268898905872e+01, 0.7426161660010e-01, 0.2468848123510e-08, 0.5276280575078e+01, 0.2526561439362e+00, 0.2814052350303e-08, 0.6130168623475e+01, 0.5636314030725e+00, 0.2243662755220e-08, 0.6631692457995e+00, 0.8886590321940e-01, 0.2330795855941e-08, 0.2499435487702e+01, 0.1056200952181e+01, 0.9757679038404e-09, 0.5796846023126e+01, 0.7826370942180e+02 }; /* SSB-to-Sun, T^0, Z */ static const double s0z[] = { 0.1181255122986e-03, 0.4607918989164e+00, 0.2132990797783e+00, 0.1127777651095e-03, 0.4169146331296e+00, 0.5296909721118e+00, 0.4777754401806e-04, 0.4582657007130e+01, 0.3813291813120e-01, 0.1129354285772e-04, 0.5758735142480e+01, 0.7478166569050e-01, -0.1149543637123e-04, 0.0000000000000e+00, 0.0000000000000e+00, 0.3298730512306e-05, 0.5978801994625e+01, 0.4265981595566e+00, 0.2733376706079e-05, 0.7665413691040e+00, 0.1059381944224e+01, 0.9426389657270e-06, 0.3710201265838e+01, 0.2061856251104e+00, 0.8187517749552e-06, 0.3390675605802e+00, 0.2204125344462e+00, 0.4080447871819e-06, 0.4552296640088e+00, 0.5225775174439e+00, 0.3169973017028e-06, 0.3445455899321e+01, 0.5368044267797e+00, 0.2438098615549e-06, 0.5664675150648e+01, 0.3664874755930e-01, 0.2601897517235e-06, 0.1931894095697e+01, 0.1495633313810e+00, 0.2314558080079e-06, 0.3666319115574e+00, 0.3961708870310e-01, 0.1962549548002e-06, 0.3167411699020e+01, 0.7626583626240e-01, 0.2180518287925e-06, 0.1544420746580e+01, 0.7113454667900e-02, 0.1451382442868e-06, 0.1583756740070e+01, 0.1102062672231e+00, 0.1358439007389e-06, 0.5239941758280e+01, 0.6398972393349e+00, 0.1050585898028e-06, 0.2266958352859e+01, 0.3163918923335e+00, 0.1050029870186e-06, 0.2711495250354e+01, 0.4194847048887e+00, 0.9934920679800e-07, 0.1116208151396e+01, 0.1589072916335e+01, 0.1048395331560e-06, 0.3408619600206e+01, 0.1021328554739e+02, 0.8370147196668e-07, 0.3810459401087e+01, 0.2535050500000e-01, 0.7989856510998e-07, 0.3769910473647e+01, 0.7329749511860e-01, 0.5441221655233e-07, 0.2416994903374e+01, 0.1030928125552e+00, 0.4610812906784e-07, 0.5858503336994e+01, 0.4337116142245e+00, 0.3923022803444e-07, 0.3354170010125e+00, 0.1484170571900e-02, 0.2610725582128e-07, 0.5410600646324e+01, 0.6327837846670e+00, 0.2455279767721e-07, 0.6120216681403e+01, 0.1162474756779e+01, 0.2375530706525e-07, 0.6055443426143e+01, 0.1052268489556e+01, 0.1782967577553e-07, 0.3146108708004e+01, 0.8460828644453e+00, 0.1581687095238e-07, 0.6255496089819e+00, 0.3340612434717e+01, 0.1594657672461e-07, 0.3782604300261e+01, 0.1066495398892e+01, 0.1563448615040e-07, 0.1997775733196e+01, 0.2022531624851e+00, 0.1463624258525e-07, 0.1736316792088e+00, 0.3516457698740e-01, 0.1331585056673e-07, 0.4331941830747e+01, 0.9491756770005e+00, 0.1130634557637e-07, 0.6152017751825e+01, 0.2968341143800e-02, 0.1028949607145e-07, 0.2101792614637e+00, 0.2275259891141e+00, 0.1024074971618e-07, 0.4071833211074e+01, 0.5070101000000e-01, 0.8826956060303e-08, 0.4861633688145e+00, 0.2093666171530e+00, 0.8572230171541e-08, 0.5268190724302e+01, 0.4110125927500e-01, 0.7649332643544e-08, 0.5134543417106e+01, 0.2608790314060e+02, 0.8581673291033e-08, 0.2920218146681e+01, 0.1480791608091e+00, 0.8430589300938e-08, 0.3604576619108e+01, 0.2172315424036e+00, 0.7776165501012e-08, 0.3772942249792e+01, 0.6373574839730e-01, 0.8311070234408e-08, 0.6200412329888e+01, 0.3235053470014e+00, 0.6927365212582e-08, 0.4543353113437e+01, 0.8531963191132e+00, 0.6791574208598e-08, 0.2882188406238e+01, 0.7181332454670e-01, 0.5593100811839e-08, 0.1776646892780e+01, 0.7429900518901e+00, 0.4553381853021e-08, 0.3949617611240e+01, 0.7775000683430e-01, 0.5758000450068e-08, 0.3859251775075e+01, 0.1990721704425e+00, 0.4281283457133e-08, 0.1466294631206e+01, 0.2118763888447e+01, 0.4206935661097e-08, 0.5421776011706e+01, 0.1104591729320e-01, 0.4213751641837e-08, 0.3412048993322e+01, 0.2243449970715e+00, 0.5310506239878e-08, 0.5421641370995e+00, 0.5154640627760e+00, 0.3827450341320e-08, 0.8887314524995e+00, 0.1510475019529e+00, 0.4292435241187e-08, 0.1405043757194e+01, 0.1422690933580e-01, 0.3189780702289e-08, 0.1060049293445e+01, 0.1173197218910e+00, 0.3226611928069e-08, 0.6270858897442e+01, 0.2164800718209e+00, 0.2893897608830e-08, 0.5117563223301e+01, 0.6470106940028e+00, 0.3239852024578e-08, 0.4079092237983e+01, 0.2101180877357e+00, 0.2956892222200e-08, 0.1594917021704e+01, 0.3092784376656e+00, 0.2980177912437e-08, 0.5258787667564e+01, 0.4155522422634e+00, 0.3163725690776e-08, 0.3854589225479e+01, 0.8582758298370e-01, 0.2662262399118e-08, 0.3561326430187e+01, 0.5257585094865e+00, 0.2766689135729e-08, 0.3180732086830e+00, 0.1385174140878e+00, 0.2411600278464e-08, 0.3324798335058e+01, 0.5439178814476e+00, 0.2483527695131e-08, 0.4169069291947e+00, 0.5336234347371e+00, 0.7788777276590e-09, 0.1900569908215e+01, 0.5217580628120e+02 }; /* SSB-to-Sun, T^1, X */ static const double s1x[] = { -0.1296310361520e-07, 0.0000000000000e+00, 0.0000000000000e+00, 0.8975769009438e-08, 0.1128891609250e+01, 0.4265981595566e+00, 0.7771113441307e-08, 0.2706039877077e+01, 0.2061856251104e+00, 0.7538303866642e-08, 0.2191281289498e+01, 0.2204125344462e+00, 0.6061384579336e-08, 0.3248167319958e+01, 0.1059381944224e+01, 0.5726994235594e-08, 0.5569981398610e+01, 0.5225775174439e+00, 0.5616492836424e-08, 0.5057386614909e+01, 0.5368044267797e+00, 0.1010881584769e-08, 0.3473577116095e+01, 0.7113454667900e-02, 0.7259606157626e-09, 0.3651858593665e+00, 0.6398972393349e+00, 0.8755095026935e-09, 0.1662835408338e+01, 0.4194847048887e+00, 0.5370491182812e-09, 0.1327673878077e+01, 0.4337116142245e+00, 0.5743773887665e-09, 0.4250200846687e+01, 0.2132990797783e+00, 0.4408103140300e-09, 0.3598752574277e+01, 0.1589072916335e+01, 0.3101892374445e-09, 0.4887822983319e+01, 0.1052268489556e+01, 0.3209453713578e-09, 0.9702272295114e+00, 0.5296909721118e+00, 0.3017228286064e-09, 0.5484462275949e+01, 0.1066495398892e+01, 0.3200700038601e-09, 0.2846613338643e+01, 0.1495633313810e+00, 0.2137637279911e-09, 0.5692163292729e+00, 0.3163918923335e+00, 0.1899686386727e-09, 0.2061077157189e+01, 0.2275259891141e+00, 0.1401994545308e-09, 0.4177771136967e+01, 0.1102062672231e+00, 0.1578057810499e-09, 0.5782460597335e+01, 0.7626583626240e-01, 0.1237713253351e-09, 0.5705900866881e+01, 0.5154640627760e+00, 0.1313076837395e-09, 0.5163438179576e+01, 0.3664874755930e-01, 0.1184963304860e-09, 0.3054804427242e+01, 0.6327837846670e+00, 0.1238130878565e-09, 0.2317292575962e+01, 0.3961708870310e-01, 0.1015959527736e-09, 0.2194643645526e+01, 0.7329749511860e-01, 0.9017954423714e-10, 0.2868603545435e+01, 0.1990721704425e+00, 0.8668024955603e-10, 0.4923849675082e+01, 0.5439178814476e+00, 0.7756083930103e-10, 0.3014334135200e+01, 0.9491756770005e+00, 0.7536503401741e-10, 0.2704886279769e+01, 0.1030928125552e+00, 0.5483308679332e-10, 0.6010983673799e+01, 0.8531963191132e+00, 0.5184339620428e-10, 0.1952704573291e+01, 0.2093666171530e+00, 0.5108658712030e-10, 0.2958575786649e+01, 0.2172315424036e+00, 0.5019424524650e-10, 0.1736317621318e+01, 0.2164800718209e+00, 0.4909312625978e-10, 0.3167216416257e+01, 0.2101180877357e+00, 0.4456638901107e-10, 0.7697579923471e+00, 0.3235053470014e+00, 0.4227030350925e-10, 0.3490910137928e+01, 0.6373574839730e-01, 0.4095456040093e-10, 0.5178888984491e+00, 0.6470106940028e+00, 0.4990537041422e-10, 0.3323887668974e+01, 0.1422690933580e-01, 0.4321170010845e-10, 0.4288484987118e+01, 0.7358765972222e+00, 0.3544072091802e-10, 0.6021051579251e+01, 0.5265099800692e+00, 0.3480198638687e-10, 0.4600027054714e+01, 0.5328719641544e+00, 0.3440287244435e-10, 0.4349525970742e+01, 0.8582758298370e-01, 0.3330628322713e-10, 0.2347391505082e+01, 0.1104591729320e-01, 0.2973060707184e-10, 0.4789409286400e+01, 0.5257585094865e+00, 0.2932606766089e-10, 0.5831693799927e+01, 0.5336234347371e+00, 0.2876972310953e-10, 0.2692638514771e+01, 0.1173197218910e+00, 0.2827488278556e-10, 0.2056052487960e+01, 0.2022531624851e+00, 0.2515028239756e-10, 0.7411863262449e+00, 0.9597935788730e-01, 0.2853033744415e-10, 0.3948481024894e+01, 0.2118763888447e+01 }; /* SSB-to-Sun, T^1, Y */ static const double s1y[] = { 0.8989047573576e-08, 0.5840593672122e+01, 0.4265981595566e+00, 0.7815938401048e-08, 0.1129664707133e+01, 0.2061856251104e+00, 0.7550926713280e-08, 0.6196589104845e+00, 0.2204125344462e+00, 0.6056556925895e-08, 0.1677494667846e+01, 0.1059381944224e+01, 0.5734142698204e-08, 0.4000920852962e+01, 0.5225775174439e+00, 0.5614341822459e-08, 0.3486722577328e+01, 0.5368044267797e+00, 0.1028678147656e-08, 0.1877141024787e+01, 0.7113454667900e-02, 0.7270792075266e-09, 0.5077167301739e+01, 0.6398972393349e+00, 0.8734141726040e-09, 0.9069550282609e-01, 0.4194847048887e+00, 0.5377371402113e-09, 0.6039381844671e+01, 0.4337116142245e+00, 0.4729719431571e-09, 0.2153086311760e+01, 0.2132990797783e+00, 0.4458052820973e-09, 0.5059830025565e+01, 0.5296909721118e+00, 0.4406855467908e-09, 0.2027971692630e+01, 0.1589072916335e+01, 0.3101659310977e-09, 0.3317677981860e+01, 0.1052268489556e+01, 0.3016749232545e-09, 0.3913703482532e+01, 0.1066495398892e+01, 0.3198541352656e-09, 0.1275513098525e+01, 0.1495633313810e+00, 0.2142065389871e-09, 0.5301351614597e+01, 0.3163918923335e+00, 0.1902615247592e-09, 0.4894943352736e+00, 0.2275259891141e+00, 0.1613410990871e-09, 0.2449891130437e+01, 0.1102062672231e+00, 0.1576992165097e-09, 0.4211421447633e+01, 0.7626583626240e-01, 0.1241637259894e-09, 0.4140803368133e+01, 0.5154640627760e+00, 0.1313974830355e-09, 0.3591920305503e+01, 0.3664874755930e-01, 0.1181697118258e-09, 0.1506314382788e+01, 0.6327837846670e+00, 0.1238239742779e-09, 0.7461405378404e+00, 0.3961708870310e-01, 0.1010107068241e-09, 0.6271010795475e+00, 0.7329749511860e-01, 0.9226316616509e-10, 0.1259158839583e+01, 0.1990721704425e+00, 0.8664946419555e-10, 0.3353244696934e+01, 0.5439178814476e+00, 0.7757230468978e-10, 0.1447677295196e+01, 0.9491756770005e+00, 0.7693168628139e-10, 0.1120509896721e+01, 0.1030928125552e+00, 0.5487897454612e-10, 0.4439380426795e+01, 0.8531963191132e+00, 0.5196118677218e-10, 0.3788856619137e+00, 0.2093666171530e+00, 0.5110853339935e-10, 0.1386879372016e+01, 0.2172315424036e+00, 0.5027804534813e-10, 0.1647881805466e+00, 0.2164800718209e+00, 0.4922485922674e-10, 0.1594315079862e+01, 0.2101180877357e+00, 0.6155599524400e-10, 0.0000000000000e+00, 0.0000000000000e+00, 0.4447147832161e-10, 0.5480720918976e+01, 0.3235053470014e+00, 0.4144691276422e-10, 0.1931371033660e+01, 0.6373574839730e-01, 0.4099950625452e-10, 0.5229611294335e+01, 0.6470106940028e+00, 0.5060541682953e-10, 0.1731112486298e+01, 0.1422690933580e-01, 0.4293615946300e-10, 0.2714571038925e+01, 0.7358765972222e+00, 0.3545659845763e-10, 0.4451041444634e+01, 0.5265099800692e+00, 0.3479112041196e-10, 0.3029385448081e+01, 0.5328719641544e+00, 0.3438516493570e-10, 0.2778507143731e+01, 0.8582758298370e-01, 0.3297341285033e-10, 0.7898709807584e+00, 0.1104591729320e-01, 0.2972585818015e-10, 0.3218785316973e+01, 0.5257585094865e+00, 0.2931707295017e-10, 0.4260731012098e+01, 0.5336234347371e+00, 0.2897198149403e-10, 0.1120753978101e+01, 0.1173197218910e+00, 0.2832293240878e-10, 0.4597682717827e+00, 0.2022531624851e+00, 0.2864348326612e-10, 0.2169939928448e+01, 0.9597935788730e-01, 0.2852714675471e-10, 0.2377659870578e+01, 0.2118763888447e+01 }; /* SSB-to-Sun, T^1, Z */ static const double s1z[] = { 0.5444220475678e-08, 0.1803825509310e+01, 0.2132990797783e+00, 0.3883412695596e-08, 0.4668616389392e+01, 0.5296909721118e+00, 0.1334341434551e-08, 0.0000000000000e+00, 0.0000000000000e+00, 0.3730001266883e-09, 0.5401405918943e+01, 0.2061856251104e+00, 0.2894929197956e-09, 0.4932415609852e+01, 0.2204125344462e+00, 0.2857950357701e-09, 0.3154625362131e+01, 0.7478166569050e-01, 0.2499226432292e-09, 0.3657486128988e+01, 0.4265981595566e+00, 0.1937705443593e-09, 0.5740434679002e+01, 0.1059381944224e+01, 0.1374894396320e-09, 0.1712857366891e+01, 0.5368044267797e+00, 0.1217248678408e-09, 0.2312090870932e+01, 0.5225775174439e+00, 0.7961052740870e-10, 0.5283368554163e+01, 0.3813291813120e-01, 0.4979225949689e-10, 0.4298290471860e+01, 0.4194847048887e+00, 0.4388552286597e-10, 0.6145515047406e+01, 0.7113454667900e-02, 0.2586835212560e-10, 0.3019448001809e+01, 0.6398972393349e+00 }; /* SSB-to-Sun, T^2, X */ static const double s2x[] = { 0.1603551636587e-11, 0.4404109410481e+01, 0.2061856251104e+00, 0.1556935889384e-11, 0.4818040873603e+00, 0.2204125344462e+00, 0.1182594414915e-11, 0.9935762734472e+00, 0.5225775174439e+00, 0.1158794583180e-11, 0.3353180966450e+01, 0.5368044267797e+00, 0.9597358943932e-12, 0.5567045358298e+01, 0.2132990797783e+00, 0.6511516579605e-12, 0.5630872420788e+01, 0.4265981595566e+00, 0.7419792747688e-12, 0.2156188581957e+01, 0.5296909721118e+00, 0.3951972655848e-12, 0.1981022541805e+01, 0.1059381944224e+01, 0.4478223877045e-12, 0.0000000000000e+00, 0.0000000000000e+00 }; /* SSB-to-Sun, T^2, Y */ static const double s2y[] = { 0.1609114495091e-11, 0.2831096993481e+01, 0.2061856251104e+00, 0.1560330784946e-11, 0.5193058213906e+01, 0.2204125344462e+00, 0.1183535479202e-11, 0.5707003443890e+01, 0.5225775174439e+00, 0.1158183066182e-11, 0.1782400404928e+01, 0.5368044267797e+00, 0.1032868027407e-11, 0.4036925452011e+01, 0.2132990797783e+00, 0.6540142847741e-12, 0.4058241056717e+01, 0.4265981595566e+00, 0.7305236491596e-12, 0.6175401942957e+00, 0.5296909721118e+00, -0.5580725052968e-12, 0.0000000000000e+00, 0.0000000000000e+00, 0.3946122651015e-12, 0.4108265279171e+00, 0.1059381944224e+01 }; /* SSB-to-Sun, T^2, Z */ static const double s2z[] = { 0.3749920358054e-12, 0.3230285558668e+01, 0.2132990797783e+00, 0.2735037220939e-12, 0.6154322683046e+01, 0.5296909721118e+00 }; /* Pointers to coefficient arrays, in x,y,z sets */ static const double *ce0[] = { e0x, e0y, e0z }, *ce1[] = { e1x, e1y, e1z }, *ce2[] = { e2x, e2y, e2z }, *cs0[] = { s0x, s0y, s0z }, *cs1[] = { s1x, s1y, s1z }, *cs2[] = { s2x, s2y, s2z }; const double *coeffs; /* Numbers of terms for each component of the model, in x,y,z sets */ static const int ne0[3] = {(int)(sizeof e0x / sizeof (double) / 3), (int)(sizeof e0y / sizeof (double) / 3), (int)(sizeof e0z / sizeof (double) / 3) }, ne1[3] = {(int)(sizeof e1x / sizeof (double) / 3), (int)(sizeof e1y / sizeof (double) / 3), (int)(sizeof e1z / sizeof (double) / 3) }, ne2[3] = {(int)(sizeof e2x / sizeof (double) / 3), (int)(sizeof e2y / sizeof (double) / 3), (int)(sizeof e2z / sizeof (double) / 3) }, ns0[3] = {(int)(sizeof s0x / sizeof (double) / 3), (int)(sizeof s0y / sizeof (double) / 3), (int)(sizeof s0z / sizeof (double) / 3) }, ns1[3] = {(int)(sizeof s1x / sizeof (double) / 3), (int)(sizeof s1y / sizeof (double) / 3), (int)(sizeof s1z / sizeof (double) / 3) }, ns2[3] = {(int)(sizeof s2x / sizeof (double) / 3), (int)(sizeof s2y / sizeof (double) / 3), (int)(sizeof s2z / sizeof (double) / 3) }; int nterms; /* Miscellaneous */ int jstat, i, j; double t, t2, xyz, xyzd, a, b, c, ct, p, cp, ph[3], vh[3], pb[3], vb[3], x, y, z; /*--------------------------------------------------------------------*/ /* Time since reference epoch, Julian years. */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJY; t2 = t*t; /* Set status. */ jstat = fabs(t) <= 100.0 ? 0 : 1; /* X then Y then Z. */ for (i = 0; i < 3; i++) { /* Initialize position and velocity component. */ xyz = 0.0; xyzd = 0.0; /* ------------------------------------------------ */ /* Obtain component of Sun to Earth ecliptic vector */ /* ------------------------------------------------ */ /* Sun to Earth, T^0 terms. */ coeffs = ce0[i]; nterms = ne0[i]; for (j = 0; j < nterms; j++) { a = *coeffs++; b = *coeffs++; c = *coeffs++; p = b + c*t; xyz += a*cos(p); xyzd -= a*c*sin(p); } /* Sun to Earth, T^1 terms. */ coeffs = ce1[i]; nterms = ne1[i]; for (j = 0; j < nterms; j++) { a = *coeffs++; b = *coeffs++; c = *coeffs++; ct = c*t; p = b + ct; cp = cos(p); xyz += a*t*cp; xyzd += a*( cp - ct*sin(p) ); } /* Sun to Earth, T^2 terms. */ coeffs = ce2[i]; nterms = ne2[i]; for (j = 0; j < nterms; j++) { a = *coeffs++; b = *coeffs++; c = *coeffs++; ct = c*t; p = b + ct; cp = cos(p); xyz += a*t2*cp; xyzd += a*t*( 2.0*cp - ct*sin(p) ); } /* Heliocentric Earth position and velocity component. */ ph[i] = xyz; vh[i] = xyzd / ERFA_DJY; /* ------------------------------------------------ */ /* Obtain component of SSB to Earth ecliptic vector */ /* ------------------------------------------------ */ /* SSB to Sun, T^0 terms. */ coeffs = cs0[i]; nterms = ns0[i]; for (j = 0; j < nterms; j++) { a = *coeffs++; b = *coeffs++; c = *coeffs++; p = b + c*t; xyz += a*cos(p); xyzd -= a*c*sin(p); } /* SSB to Sun, T^1 terms. */ coeffs = cs1[i]; nterms = ns1[i]; for (j = 0; j < nterms; j++) { a = *coeffs++; b = *coeffs++; c = *coeffs++; ct = c*t; p = b + ct; cp = cos(p); xyz += a*t*cp; xyzd += a*(cp - ct*sin(p)); } /* SSB to Sun, T^2 terms. */ coeffs = cs2[i]; nterms = ns2[i]; for (j = 0; j < nterms; j++) { a = *coeffs++; b = *coeffs++; c = *coeffs++; ct = c*t; p = b + ct; cp = cos(p); xyz += a*t2*cp; xyzd += a*t*(2.0*cp - ct*sin(p)); } /* Barycentric Earth position and velocity component. */ pb[i] = xyz; vb[i] = xyzd / ERFA_DJY; /* Next Cartesian component. */ } /* Rotate from ecliptic to BCRS coordinates. */ x = ph[0]; y = ph[1]; z = ph[2]; pvh[0][0] = x + am12*y + am13*z; pvh[0][1] = am21*x + am22*y + am23*z; pvh[0][2] = am32*y + am33*z; x = vh[0]; y = vh[1]; z = vh[2]; pvh[1][0] = x + am12*y + am13*z; pvh[1][1] = am21*x + am22*y + am23*z; pvh[1][2] = am32*y + am33*z; x = pb[0]; y = pb[1]; z = pb[2]; pvb[0][0] = x + am12*y + am13*z; pvb[0][1] = am21*x + am22*y + am23*z; pvb[0][2] = am32*y + am33*z; x = vb[0]; y = vb[1]; z = vb[2]; pvb[1][0] = x + am12*y + am13*z; pvb[1][1] = am21*x + am22*y + am23*z; pvb[1][2] = am32*y + am33*z; /* Return the status. */ return jstat; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/s06.c0000644001134200020070000003325212640262015017263 0ustar embrayscience00000000000000#include "erfa.h" double eraS06(double date1, double date2, double x, double y) /* ** - - - - - - - ** e r a S 0 6 ** - - - - - - - ** ** The CIO locator s, positioning the Celestial Intermediate Origin on ** the equator of the Celestial Intermediate Pole, given the CIP's X,Y ** coordinates. Compatible with IAU 2006/2000A precession-nutation. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** x,y double CIP coordinates (Note 3) ** ** Returned (function value): ** double the CIO locator s in radians (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The CIO locator s is the difference between the right ascensions ** of the same point in two systems: the two systems are the GCRS ** and the CIP,CIO, and the point is the ascending node of the ** CIP equator. The quantity s remains below 0.1 arcsecond ** throughout 1900-2100. ** ** 3) The series used to compute s is in fact for s+XY/2, where X and Y ** are the x and y components of the CIP unit vector; this series ** is more compact than a direct series for s would be. This ** function requires X,Y to be supplied by the caller, who is ** responsible for providing values that are consistent with the ** supplied date. ** ** 4) The model is consistent with the "P03" precession (Capitaine et ** al. 2003), adopted by IAU 2006 Resolution 1, 2006, and the ** IAU 2000A nutation (with P03 adjustments). ** ** Called: ** eraFal03 mean anomaly of the Moon ** eraFalp03 mean anomaly of the Sun ** eraFaf03 mean argument of the latitude of the Moon ** eraFad03 mean elongation of the Moon from the Sun ** eraFaom03 mean longitude of the Moon's ascending node ** eraFave03 mean longitude of Venus ** eraFae03 mean longitude of Earth ** eraFapa03 general accumulated precession in longitude ** ** References: ** ** Capitaine, N., Wallace, P.T. & Chapront, J., 2003, Astron. ** Astrophys. 432, 355 ** ** McCarthy, D.D., Petit, G. (eds.) 2004, IERS Conventions (2003), ** IERS Technical Note No. 32, BKG ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Time since J2000.0, in Julian centuries */ double t; /* Miscellaneous */ int i, j; double a, w0, w1, w2, w3, w4, w5; /* Fundamental arguments */ double fa[8]; /* Returned value */ double s; /* --------------------- */ /* The series for s+XY/2 */ /* --------------------- */ typedef struct { int nfa[8]; /* coefficients of l,l',F,D,Om,LVe,LE,pA */ double s, c; /* sine and cosine coefficients */ } TERM; /* Polynomial coefficients */ static const double sp[] = { /* 1-6 */ 94.00e-6, 3808.65e-6, -122.68e-6, -72574.11e-6, 27.98e-6, 15.62e-6 }; /* Terms of order t^0 */ static const TERM s0[] = { /* 1-10 */ {{ 0, 0, 0, 0, 1, 0, 0, 0}, -2640.73e-6, 0.39e-6 }, {{ 0, 0, 0, 0, 2, 0, 0, 0}, -63.53e-6, 0.02e-6 }, {{ 0, 0, 2, -2, 3, 0, 0, 0}, -11.75e-6, -0.01e-6 }, {{ 0, 0, 2, -2, 1, 0, 0, 0}, -11.21e-6, -0.01e-6 }, {{ 0, 0, 2, -2, 2, 0, 0, 0}, 4.57e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 3, 0, 0, 0}, -2.02e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 1, 0, 0, 0}, -1.98e-6, 0.00e-6 }, {{ 0, 0, 0, 0, 3, 0, 0, 0}, 1.72e-6, 0.00e-6 }, {{ 0, 1, 0, 0, 1, 0, 0, 0}, 1.41e-6, 0.01e-6 }, {{ 0, 1, 0, 0, -1, 0, 0, 0}, 1.26e-6, 0.01e-6 }, /* 11-20 */ {{ 1, 0, 0, 0, -1, 0, 0, 0}, 0.63e-6, 0.00e-6 }, {{ 1, 0, 0, 0, 1, 0, 0, 0}, 0.63e-6, 0.00e-6 }, {{ 0, 1, 2, -2, 3, 0, 0, 0}, -0.46e-6, 0.00e-6 }, {{ 0, 1, 2, -2, 1, 0, 0, 0}, -0.45e-6, 0.00e-6 }, {{ 0, 0, 4, -4, 4, 0, 0, 0}, -0.36e-6, 0.00e-6 }, {{ 0, 0, 1, -1, 1, -8, 12, 0}, 0.24e-6, 0.12e-6 }, {{ 0, 0, 2, 0, 0, 0, 0, 0}, -0.32e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 2, 0, 0, 0}, -0.28e-6, 0.00e-6 }, {{ 1, 0, 2, 0, 3, 0, 0, 0}, -0.27e-6, 0.00e-6 }, {{ 1, 0, 2, 0, 1, 0, 0, 0}, -0.26e-6, 0.00e-6 }, /* 21-30 */ {{ 0, 0, 2, -2, 0, 0, 0, 0}, 0.21e-6, 0.00e-6 }, {{ 0, 1, -2, 2, -3, 0, 0, 0}, -0.19e-6, 0.00e-6 }, {{ 0, 1, -2, 2, -1, 0, 0, 0}, -0.18e-6, 0.00e-6 }, {{ 0, 0, 0, 0, 0, 8,-13, -1}, 0.10e-6, -0.05e-6 }, {{ 0, 0, 0, 2, 0, 0, 0, 0}, -0.15e-6, 0.00e-6 }, {{ 2, 0, -2, 0, -1, 0, 0, 0}, 0.14e-6, 0.00e-6 }, {{ 0, 1, 2, -2, 2, 0, 0, 0}, 0.14e-6, 0.00e-6 }, {{ 1, 0, 0, -2, 1, 0, 0, 0}, -0.14e-6, 0.00e-6 }, {{ 1, 0, 0, -2, -1, 0, 0, 0}, -0.14e-6, 0.00e-6 }, {{ 0, 0, 4, -2, 4, 0, 0, 0}, -0.13e-6, 0.00e-6 }, /* 31-33 */ {{ 0, 0, 2, -2, 4, 0, 0, 0}, 0.11e-6, 0.00e-6 }, {{ 1, 0, -2, 0, -3, 0, 0, 0}, -0.11e-6, 0.00e-6 }, {{ 1, 0, -2, 0, -1, 0, 0, 0}, -0.11e-6, 0.00e-6 } }; /* Terms of order t^1 */ static const TERM s1[] = { /* 1 - 3 */ {{ 0, 0, 0, 0, 2, 0, 0, 0}, -0.07e-6, 3.57e-6 }, {{ 0, 0, 0, 0, 1, 0, 0, 0}, 1.73e-6, -0.03e-6 }, {{ 0, 0, 2, -2, 3, 0, 0, 0}, 0.00e-6, 0.48e-6 } }; /* Terms of order t^2 */ static const TERM s2[] = { /* 1-10 */ {{ 0, 0, 0, 0, 1, 0, 0, 0}, 743.52e-6, -0.17e-6 }, {{ 0, 0, 2, -2, 2, 0, 0, 0}, 56.91e-6, 0.06e-6 }, {{ 0, 0, 2, 0, 2, 0, 0, 0}, 9.84e-6, -0.01e-6 }, {{ 0, 0, 0, 0, 2, 0, 0, 0}, -8.85e-6, 0.01e-6 }, {{ 0, 1, 0, 0, 0, 0, 0, 0}, -6.38e-6, -0.05e-6 }, {{ 1, 0, 0, 0, 0, 0, 0, 0}, -3.07e-6, 0.00e-6 }, {{ 0, 1, 2, -2, 2, 0, 0, 0}, 2.23e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 1, 0, 0, 0}, 1.67e-6, 0.00e-6 }, {{ 1, 0, 2, 0, 2, 0, 0, 0}, 1.30e-6, 0.00e-6 }, {{ 0, 1, -2, 2, -2, 0, 0, 0}, 0.93e-6, 0.00e-6 }, /* 11-20 */ {{ 1, 0, 0, -2, 0, 0, 0, 0}, 0.68e-6, 0.00e-6 }, {{ 0, 0, 2, -2, 1, 0, 0, 0}, -0.55e-6, 0.00e-6 }, {{ 1, 0, -2, 0, -2, 0, 0, 0}, 0.53e-6, 0.00e-6 }, {{ 0, 0, 0, 2, 0, 0, 0, 0}, -0.27e-6, 0.00e-6 }, {{ 1, 0, 0, 0, 1, 0, 0, 0}, -0.27e-6, 0.00e-6 }, {{ 1, 0, -2, -2, -2, 0, 0, 0}, -0.26e-6, 0.00e-6 }, {{ 1, 0, 0, 0, -1, 0, 0, 0}, -0.25e-6, 0.00e-6 }, {{ 1, 0, 2, 0, 1, 0, 0, 0}, 0.22e-6, 0.00e-6 }, {{ 2, 0, 0, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6 }, {{ 2, 0, -2, 0, -1, 0, 0, 0}, 0.20e-6, 0.00e-6 }, /* 21-25 */ {{ 0, 0, 2, 2, 2, 0, 0, 0}, 0.17e-6, 0.00e-6 }, {{ 2, 0, 2, 0, 2, 0, 0, 0}, 0.13e-6, 0.00e-6 }, {{ 2, 0, 0, 0, 0, 0, 0, 0}, -0.13e-6, 0.00e-6 }, {{ 1, 0, 2, -2, 2, 0, 0, 0}, -0.12e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 0, 0, 0, 0}, -0.11e-6, 0.00e-6 } }; /* Terms of order t^3 */ static const TERM s3[] = { /* 1-4 */ {{ 0, 0, 0, 0, 1, 0, 0, 0}, 0.30e-6, -23.42e-6 }, {{ 0, 0, 2, -2, 2, 0, 0, 0}, -0.03e-6, -1.46e-6 }, {{ 0, 0, 2, 0, 2, 0, 0, 0}, -0.01e-6, -0.25e-6 }, {{ 0, 0, 0, 0, 2, 0, 0, 0}, 0.00e-6, 0.23e-6 } }; /* Terms of order t^4 */ static const TERM s4[] = { /* 1-1 */ {{ 0, 0, 0, 0, 1, 0, 0, 0}, -0.26e-6, -0.01e-6 } }; /* Number of terms in the series */ static const int NS0 = (int) (sizeof s0 / sizeof (TERM)); static const int NS1 = (int) (sizeof s1 / sizeof (TERM)); static const int NS2 = (int) (sizeof s2 / sizeof (TERM)); static const int NS3 = (int) (sizeof s3 / sizeof (TERM)); static const int NS4 = (int) (sizeof s4 / sizeof (TERM)); /*--------------------------------------------------------------------*/ /* Interval between fundamental epoch J2000.0 and current date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* Fundamental Arguments (from IERS Conventions 2003) */ /* Mean anomaly of the Moon. */ fa[0] = eraFal03(t); /* Mean anomaly of the Sun. */ fa[1] = eraFalp03(t); /* Mean longitude of the Moon minus that of the ascending node. */ fa[2] = eraFaf03(t); /* Mean elongation of the Moon from the Sun. */ fa[3] = eraFad03(t); /* Mean longitude of the ascending node of the Moon. */ fa[4] = eraFaom03(t); /* Mean longitude of Venus. */ fa[5] = eraFave03(t); /* Mean longitude of Earth. */ fa[6] = eraFae03(t); /* General precession in longitude. */ fa[7] = eraFapa03(t); /* Evaluate s. */ w0 = sp[0]; w1 = sp[1]; w2 = sp[2]; w3 = sp[3]; w4 = sp[4]; w5 = sp[5]; for (i = NS0-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s0[i].nfa[j] * fa[j]; } w0 += s0[i].s * sin(a) + s0[i].c * cos(a); } for (i = NS1-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s1[i].nfa[j] * fa[j]; } w1 += s1[i].s * sin(a) + s1[i].c * cos(a); } for (i = NS2-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s2[i].nfa[j] * fa[j]; } w2 += s2[i].s * sin(a) + s2[i].c * cos(a); } for (i = NS3-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s3[i].nfa[j] * fa[j]; } w3 += s3[i].s * sin(a) + s3[i].c * cos(a); } for (i = NS4-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s4[i].nfa[j] * fa[j]; } w4 += s4[i].s * sin(a) + s4[i].c * cos(a); } s = (w0 + (w1 + (w2 + (w3 + (w4 + w5 * t) * t) * t) * t) * t) * ERFA_DAS2R - x*y/2.0; return s; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/nut80.c0000644001134200020070000003506112640262015017631 0ustar embrayscience00000000000000#include "erfa.h" void eraNut80(double date1, double date2, double *dpsi, double *deps) /* ** - - - - - - - - - ** e r a N u t 8 0 ** - - - - - - - - - ** ** Nutation, IAU 1980 model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** dpsi double nutation in longitude (radians) ** deps double nutation in obliquity (radians) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The nutation components are with respect to the ecliptic of ** date. ** ** Called: ** eraAnpm normalize angle into range +/- pi ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992), ** Section 3.222 (p111). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t, el, elp, f, d, om, dp, de, arg, s, c; int j; /* Units of 0.1 milliarcsecond to radians */ const double U2R = ERFA_DAS2R / 1e4; /* ------------------------------------------------ */ /* Table of multiples of arguments and coefficients */ /* ------------------------------------------------ */ /* The units for the sine and cosine coefficients are 0.1 mas and */ /* the same per Julian century */ static const struct { int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */ double sp,spt; /* longitude sine, 1 and t coefficients */ double ce,cet; /* obliquity cosine, 1 and t coefficients */ } x[] = { /* 1-10 */ { 0, 0, 0, 0, 1, -171996.0, -174.2, 92025.0, 8.9 }, { 0, 0, 0, 0, 2, 2062.0, 0.2, -895.0, 0.5 }, { -2, 0, 2, 0, 1, 46.0, 0.0, -24.0, 0.0 }, { 2, 0, -2, 0, 0, 11.0, 0.0, 0.0, 0.0 }, { -2, 0, 2, 0, 2, -3.0, 0.0, 1.0, 0.0 }, { 1, -1, 0, -1, 0, -3.0, 0.0, 0.0, 0.0 }, { 0, -2, 2, -2, 1, -2.0, 0.0, 1.0, 0.0 }, { 2, 0, -2, 0, 1, 1.0, 0.0, 0.0, 0.0 }, { 0, 0, 2, -2, 2, -13187.0, -1.6, 5736.0, -3.1 }, { 0, 1, 0, 0, 0, 1426.0, -3.4, 54.0, -0.1 }, /* 11-20 */ { 0, 1, 2, -2, 2, -517.0, 1.2, 224.0, -0.6 }, { 0, -1, 2, -2, 2, 217.0, -0.5, -95.0, 0.3 }, { 0, 0, 2, -2, 1, 129.0, 0.1, -70.0, 0.0 }, { 2, 0, 0, -2, 0, 48.0, 0.0, 1.0, 0.0 }, { 0, 0, 2, -2, 0, -22.0, 0.0, 0.0, 0.0 }, { 0, 2, 0, 0, 0, 17.0, -0.1, 0.0, 0.0 }, { 0, 1, 0, 0, 1, -15.0, 0.0, 9.0, 0.0 }, { 0, 2, 2, -2, 2, -16.0, 0.1, 7.0, 0.0 }, { 0, -1, 0, 0, 1, -12.0, 0.0, 6.0, 0.0 }, { -2, 0, 0, 2, 1, -6.0, 0.0, 3.0, 0.0 }, /* 21-30 */ { 0, -1, 2, -2, 1, -5.0, 0.0, 3.0, 0.0 }, { 2, 0, 0, -2, 1, 4.0, 0.0, -2.0, 0.0 }, { 0, 1, 2, -2, 1, 4.0, 0.0, -2.0, 0.0 }, { 1, 0, 0, -1, 0, -4.0, 0.0, 0.0, 0.0 }, { 2, 1, 0, -2, 0, 1.0, 0.0, 0.0, 0.0 }, { 0, 0, -2, 2, 1, 1.0, 0.0, 0.0, 0.0 }, { 0, 1, -2, 2, 0, -1.0, 0.0, 0.0, 0.0 }, { 0, 1, 0, 0, 2, 1.0, 0.0, 0.0, 0.0 }, { -1, 0, 0, 1, 1, 1.0, 0.0, 0.0, 0.0 }, { 0, 1, 2, -2, 0, -1.0, 0.0, 0.0, 0.0 }, /* 31-40 */ { 0, 0, 2, 0, 2, -2274.0, -0.2, 977.0, -0.5 }, { 1, 0, 0, 0, 0, 712.0, 0.1, -7.0, 0.0 }, { 0, 0, 2, 0, 1, -386.0, -0.4, 200.0, 0.0 }, { 1, 0, 2, 0, 2, -301.0, 0.0, 129.0, -0.1 }, { 1, 0, 0, -2, 0, -158.0, 0.0, -1.0, 0.0 }, { -1, 0, 2, 0, 2, 123.0, 0.0, -53.0, 0.0 }, { 0, 0, 0, 2, 0, 63.0, 0.0, -2.0, 0.0 }, { 1, 0, 0, 0, 1, 63.0, 0.1, -33.0, 0.0 }, { -1, 0, 0, 0, 1, -58.0, -0.1, 32.0, 0.0 }, { -1, 0, 2, 2, 2, -59.0, 0.0, 26.0, 0.0 }, /* 41-50 */ { 1, 0, 2, 0, 1, -51.0, 0.0, 27.0, 0.0 }, { 0, 0, 2, 2, 2, -38.0, 0.0, 16.0, 0.0 }, { 2, 0, 0, 0, 0, 29.0, 0.0, -1.0, 0.0 }, { 1, 0, 2, -2, 2, 29.0, 0.0, -12.0, 0.0 }, { 2, 0, 2, 0, 2, -31.0, 0.0, 13.0, 0.0 }, { 0, 0, 2, 0, 0, 26.0, 0.0, -1.0, 0.0 }, { -1, 0, 2, 0, 1, 21.0, 0.0, -10.0, 0.0 }, { -1, 0, 0, 2, 1, 16.0, 0.0, -8.0, 0.0 }, { 1, 0, 0, -2, 1, -13.0, 0.0, 7.0, 0.0 }, { -1, 0, 2, 2, 1, -10.0, 0.0, 5.0, 0.0 }, /* 51-60 */ { 1, 1, 0, -2, 0, -7.0, 0.0, 0.0, 0.0 }, { 0, 1, 2, 0, 2, 7.0, 0.0, -3.0, 0.0 }, { 0, -1, 2, 0, 2, -7.0, 0.0, 3.0, 0.0 }, { 1, 0, 2, 2, 2, -8.0, 0.0, 3.0, 0.0 }, { 1, 0, 0, 2, 0, 6.0, 0.0, 0.0, 0.0 }, { 2, 0, 2, -2, 2, 6.0, 0.0, -3.0, 0.0 }, { 0, 0, 0, 2, 1, -6.0, 0.0, 3.0, 0.0 }, { 0, 0, 2, 2, 1, -7.0, 0.0, 3.0, 0.0 }, { 1, 0, 2, -2, 1, 6.0, 0.0, -3.0, 0.0 }, { 0, 0, 0, -2, 1, -5.0, 0.0, 3.0, 0.0 }, /* 61-70 */ { 1, -1, 0, 0, 0, 5.0, 0.0, 0.0, 0.0 }, { 2, 0, 2, 0, 1, -5.0, 0.0, 3.0, 0.0 }, { 0, 1, 0, -2, 0, -4.0, 0.0, 0.0, 0.0 }, { 1, 0, -2, 0, 0, 4.0, 0.0, 0.0, 0.0 }, { 0, 0, 0, 1, 0, -4.0, 0.0, 0.0, 0.0 }, { 1, 1, 0, 0, 0, -3.0, 0.0, 0.0, 0.0 }, { 1, 0, 2, 0, 0, 3.0, 0.0, 0.0, 0.0 }, { 1, -1, 2, 0, 2, -3.0, 0.0, 1.0, 0.0 }, { -1, -1, 2, 2, 2, -3.0, 0.0, 1.0, 0.0 }, { -2, 0, 0, 0, 1, -2.0, 0.0, 1.0, 0.0 }, /* 71-80 */ { 3, 0, 2, 0, 2, -3.0, 0.0, 1.0, 0.0 }, { 0, -1, 2, 2, 2, -3.0, 0.0, 1.0, 0.0 }, { 1, 1, 2, 0, 2, 2.0, 0.0, -1.0, 0.0 }, { -1, 0, 2, -2, 1, -2.0, 0.0, 1.0, 0.0 }, { 2, 0, 0, 0, 1, 2.0, 0.0, -1.0, 0.0 }, { 1, 0, 0, 0, 2, -2.0, 0.0, 1.0, 0.0 }, { 3, 0, 0, 0, 0, 2.0, 0.0, 0.0, 0.0 }, { 0, 0, 2, 1, 2, 2.0, 0.0, -1.0, 0.0 }, { -1, 0, 0, 0, 2, 1.0, 0.0, -1.0, 0.0 }, { 1, 0, 0, -4, 0, -1.0, 0.0, 0.0, 0.0 }, /* 81-90 */ { -2, 0, 2, 2, 2, 1.0, 0.0, -1.0, 0.0 }, { -1, 0, 2, 4, 2, -2.0, 0.0, 1.0, 0.0 }, { 2, 0, 0, -4, 0, -1.0, 0.0, 0.0, 0.0 }, { 1, 1, 2, -2, 2, 1.0, 0.0, -1.0, 0.0 }, { 1, 0, 2, 2, 1, -1.0, 0.0, 1.0, 0.0 }, { -2, 0, 2, 4, 2, -1.0, 0.0, 1.0, 0.0 }, { -1, 0, 4, 0, 2, 1.0, 0.0, 0.0, 0.0 }, { 1, -1, 0, -2, 0, 1.0, 0.0, 0.0, 0.0 }, { 2, 0, 2, -2, 1, 1.0, 0.0, -1.0, 0.0 }, { 2, 0, 2, 2, 2, -1.0, 0.0, 0.0, 0.0 }, /* 91-100 */ { 1, 0, 0, 2, 1, -1.0, 0.0, 0.0, 0.0 }, { 0, 0, 4, -2, 2, 1.0, 0.0, 0.0, 0.0 }, { 3, 0, 2, -2, 2, 1.0, 0.0, 0.0, 0.0 }, { 1, 0, 2, -2, 0, -1.0, 0.0, 0.0, 0.0 }, { 0, 1, 2, 0, 1, 1.0, 0.0, 0.0, 0.0 }, { -1, -1, 0, 2, 1, 1.0, 0.0, 0.0, 0.0 }, { 0, 0, -2, 0, 1, -1.0, 0.0, 0.0, 0.0 }, { 0, 0, 2, -1, 2, -1.0, 0.0, 0.0, 0.0 }, { 0, 1, 0, 2, 0, -1.0, 0.0, 0.0, 0.0 }, { 1, 0, -2, -2, 0, -1.0, 0.0, 0.0, 0.0 }, /* 101-106 */ { 0, -1, 2, 0, 1, -1.0, 0.0, 0.0, 0.0 }, { 1, 1, 0, -2, 1, -1.0, 0.0, 0.0, 0.0 }, { 1, 0, -2, 2, 0, -1.0, 0.0, 0.0, 0.0 }, { 2, 0, 0, 2, 0, 1.0, 0.0, 0.0, 0.0 }, { 0, 0, 2, 4, 2, -1.0, 0.0, 0.0, 0.0 }, { 0, 1, 0, 1, 0, 1.0, 0.0, 0.0, 0.0 } }; /* Number of terms in the series */ const int NT = (int) (sizeof x / sizeof x[0]); /*--------------------------------------------------------------------*/ /* Interval between fundamental epoch J2000.0 and given date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* --------------------- */ /* Fundamental arguments */ /* --------------------- */ /* Mean longitude of Moon minus mean longitude of Moon's perigee. */ el = eraAnpm( (485866.733 + (715922.633 + (31.310 + 0.064 * t) * t) * t) * ERFA_DAS2R + fmod(1325.0 * t, 1.0) * ERFA_D2PI); /* Mean longitude of Sun minus mean longitude of Sun's perigee. */ elp = eraAnpm( (1287099.804 + (1292581.224 + (-0.577 - 0.012 * t) * t) * t) * ERFA_DAS2R + fmod(99.0 * t, 1.0) * ERFA_D2PI); /* Mean longitude of Moon minus mean longitude of Moon's node. */ f = eraAnpm( (335778.877 + (295263.137 + (-13.257 + 0.011 * t) * t) * t) * ERFA_DAS2R + fmod(1342.0 * t, 1.0) * ERFA_D2PI); /* Mean elongation of Moon from Sun. */ d = eraAnpm( (1072261.307 + (1105601.328 + (-6.891 + 0.019 * t) * t) * t) * ERFA_DAS2R + fmod(1236.0 * t, 1.0) * ERFA_D2PI); /* Longitude of the mean ascending node of the lunar orbit on the */ /* ecliptic, measured from the mean equinox of date. */ om = eraAnpm( (450160.280 + (-482890.539 + (7.455 + 0.008 * t) * t) * t) * ERFA_DAS2R + fmod(-5.0 * t, 1.0) * ERFA_D2PI); /* --------------- */ /* Nutation series */ /* --------------- */ /* Initialize nutation components. */ dp = 0.0; de = 0.0; /* Sum the nutation terms, ending with the biggest. */ for (j = NT-1; j >= 0; j--) { /* Form argument for current term. */ arg = (double)x[j].nl * el + (double)x[j].nlp * elp + (double)x[j].nf * f + (double)x[j].nd * d + (double)x[j].nom * om; /* Accumulate current nutation term. */ s = x[j].sp + x[j].spt * t; c = x[j].ce + x[j].cet * t; if (s != 0.0) dp += s * sin(arg); if (c != 0.0) de += c * cos(arg); } /* Convert results from 0.1 mas units to radians. */ *dpsi = dp * U2R; *deps = de * U2R; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/obl06.c0000644001134200020070000001154512640262015017576 0ustar embrayscience00000000000000#include "erfa.h" double eraObl06(double date1, double date2) /* ** - - - - - - - - - ** e r a O b l 0 6 ** - - - - - - - - - ** ** Mean obliquity of the ecliptic, IAU 2006 precession model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned (function value): ** double obliquity of the ecliptic (radians, Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The result is the angle between the ecliptic and mean equator of ** date date1+date2. ** ** Reference: ** ** Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t, eps0; /* Interval between fundamental date J2000.0 and given date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* Mean obliquity. */ eps0 = (84381.406 + (-46.836769 + ( -0.0001831 + ( 0.00200340 + ( -0.000000576 + ( -0.0000000434) * t) * t) * t) * t) * t) * ERFA_DAS2R; return eps0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/refco.c0000644001134200020070000002377312640262015017760 0ustar embrayscience00000000000000#include "erfa.h" void eraRefco(double phpa, double tc, double rh, double wl, double *refa, double *refb) /* ** - - - - - - - - - ** e r a R e f c o ** - - - - - - - - - ** ** Determine the constants A and B in the atmospheric refraction model ** dZ = A tan Z + B tan^3 Z. ** ** Z is the "observed" zenith distance (i.e. affected by refraction) ** and dZ is what to add to Z to give the "topocentric" (i.e. in vacuo) ** zenith distance. ** ** Given: ** phpa double pressure at the observer (hPa = millibar) ** tc double ambient temperature at the observer (deg C) ** rh double relative humidity at the observer (range 0-1) ** wl double wavelength (micrometers) ** ** Returned: ** refa double* tan Z coefficient (radians) ** refb double* tan^3 Z coefficient (radians) ** ** Notes: ** ** 1) The model balances speed and accuracy to give good results in ** applications where performance at low altitudes is not paramount. ** Performance is maintained across a range of conditions, and ** applies to both optical/IR and radio. ** ** 2) The model omits the effects of (i) height above sea level (apart ** from the reduced pressure itself), (ii) latitude (i.e. the ** flattening of the Earth), (iii) variations in tropospheric lapse ** rate and (iv) dispersive effects in the radio. ** ** The model was tested using the following range of conditions: ** ** lapse rates 0.0055, 0.0065, 0.0075 deg/meter ** latitudes 0, 25, 50, 75 degrees ** heights 0, 2500, 5000 meters ASL ** pressures mean for height -10% to +5% in steps of 5% ** temperatures -10 deg to +20 deg with respect to 280 deg at SL ** relative humidity 0, 0.5, 1 ** wavelengths 0.4, 0.6, ... 2 micron, + radio ** zenith distances 15, 45, 75 degrees ** ** The accuracy with respect to raytracing through a model ** atmosphere was as follows: ** ** worst RMS ** ** optical/IR 62 mas 8 mas ** radio 319 mas 49 mas ** ** For this particular set of conditions: ** ** lapse rate 0.0065 K/meter ** latitude 50 degrees ** sea level ** pressure 1005 mb ** temperature 280.15 K ** humidity 80% ** wavelength 5740 Angstroms ** ** the results were as follows: ** ** ZD raytrace eraRefco Saastamoinen ** ** 10 10.27 10.27 10.27 ** 20 21.19 21.20 21.19 ** 30 33.61 33.61 33.60 ** 40 48.82 48.83 48.81 ** 45 58.16 58.18 58.16 ** 50 69.28 69.30 69.27 ** 55 82.97 82.99 82.95 ** 60 100.51 100.54 100.50 ** 65 124.23 124.26 124.20 ** 70 158.63 158.68 158.61 ** 72 177.32 177.37 177.31 ** 74 200.35 200.38 200.32 ** 76 229.45 229.43 229.42 ** 78 267.44 267.29 267.41 ** 80 319.13 318.55 319.10 ** ** deg arcsec arcsec arcsec ** ** The values for Saastamoinen's formula (which includes terms ** up to tan^5) are taken from Hohenkerk and Sinclair (1985). ** ** 3) A wl value in the range 0-100 selects the optical/IR case and is ** wavelength in micrometers. Any value outside this range selects ** the radio case. ** ** 4) Outlandish input parameters are silently limited to ** mathematically safe values. Zero pressure is permissible, and ** causes zeroes to be returned. ** ** 5) The algorithm draws on several sources, as follows: ** ** a) The formula for the saturation vapour pressure of water as ** a function of temperature and temperature is taken from ** Equations (A4.5-A4.7) of Gill (1982). ** ** b) The formula for the water vapour pressure, given the ** saturation pressure and the relative humidity, is from ** Crane (1976), Equation (2.5.5). ** ** c) The refractivity of air is a function of temperature, ** total pressure, water-vapour pressure and, in the case ** of optical/IR, wavelength. The formulae for the two cases are ** developed from Hohenkerk & Sinclair (1985) and Rueger (2002). ** ** d) The formula for beta, the ratio of the scale height of the ** atmosphere to the geocentric distance of the observer, is ** an adaption of Equation (9) from Stone (1996). The ** adaptations, arrived at empirically, consist of (i) a small ** adjustment to the coefficient and (ii) a humidity term for the ** radio case only. ** ** e) The formulae for the refraction constants as a function of ** n-1 and beta are from Green (1987), Equation (4.31). ** ** References: ** ** Crane, R.K., Meeks, M.L. (ed), "Refraction Effects in the Neutral ** Atmosphere", Methods of Experimental Physics: Astrophysics 12B, ** Academic Press, 1976. ** ** Gill, Adrian E., "Atmosphere-Ocean Dynamics", Academic Press, ** 1982. ** ** Green, R.M., "Spherical Astronomy", Cambridge University Press, ** 1987. ** ** Hohenkerk, C.Y., & Sinclair, A.T., NAO Technical Note No. 63, ** 1985. ** ** Rueger, J.M., "Refractive Index Formulae for Electronic Distance ** Measurement with Radio and Millimetre Waves", in Unisurv Report ** S-68, School of Surveying and Spatial Information Systems, ** University of New South Wales, Sydney, Australia, 2002. ** ** Stone, Ronald C., P.A.S.P. 108, 1051-1058, 1996. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int optic; double p, t, r, w, ps, pw, tk, wlsq, gamma, beta; /* Decide whether optical/IR or radio case: switch at 100 microns. */ optic = ( wl <= 100.0 ); /* Restrict parameters to safe values. */ t = ERFA_GMAX ( tc, -150.0 ); t = ERFA_GMIN ( t, 200.0 ); p = ERFA_GMAX ( phpa, 0.0 ); p = ERFA_GMIN ( p, 10000.0 ); r = ERFA_GMAX ( rh, 0.0 ); r = ERFA_GMIN ( r, 1.0 ); w = ERFA_GMAX ( wl, 0.1 ); w = ERFA_GMIN ( w, 1e6 ); /* Water vapour pressure at the observer. */ if ( p > 0.0 ) { ps = pow ( 10.0, ( 0.7859 + 0.03477*t ) / ( 1.0 + 0.00412*t ) ) * ( 1.0 + p * ( 4.5e-6 + 6e-10*t*t ) ); pw = r * ps / ( 1.0 - (1.0-r)*ps/p ); } else { pw = 0.0; } /* Refractive index minus 1 at the observer. */ tk = t + 273.15; if ( optic ) { wlsq = w * w; gamma = ( ( 77.53484e-6 + ( 4.39108e-7 + 3.666e-9/wlsq ) / wlsq ) * p - 11.2684e-6*pw ) / tk; } else { gamma = ( 77.6890e-6*p - ( 6.3938e-6 - 0.375463/tk ) * pw ) / tk; } /* Formula for beta from Stone, with empirical adjustments. */ beta = 4.4474e-6 * tk; if ( ! optic ) beta -= 0.0074 * pw * beta; /* Refraction constants from Green. */ *refa = gamma * ( 1.0 - beta ); *refb = - gamma * ( beta - gamma / 2.0 ); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pxp.c0000644001134200020070000000725312640262015017464 0ustar embrayscience00000000000000#include "erfa.h" void eraPxp(double a[3], double b[3], double axb[3]) /* ** - - - - - - - ** e r a P x p ** - - - - - - - ** ** p-vector outer (=vector=cross) product. ** ** Given: ** a double[3] first p-vector ** b double[3] second p-vector ** ** Returned: ** axb double[3] a x b ** ** Note: ** It is permissible to re-use the same array for any of the ** arguments. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double xa, ya, za, xb, yb, zb; xa = a[0]; ya = a[1]; za = a[2]; xb = b[0]; yb = b[1]; zb = b[2]; axb[0] = ya*zb - za*yb; axb[1] = za*xb - xa*zb; axb[2] = xa*yb - ya*xb; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/sp00.c0000644001134200020070000001176412640262015017441 0ustar embrayscience00000000000000#include "erfa.h" double eraSp00(double date1, double date2) /* ** - - - - - - - - ** e r a S p 0 0 ** - - - - - - - - ** ** The TIO locator s', positioning the Terrestrial Intermediate Origin ** on the equator of the Celestial Intermediate Pole. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned (function value): ** double the TIO locator s' in radians (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The TIO locator s' is obtained from polar motion observations by ** numerical integration, and so is in essence unpredictable. ** However, it is dominated by a secular drift of about ** 47 microarcseconds per century, which is the approximation ** evaluated by the present function. ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t, sp; /* Interval between fundamental epoch J2000.0 and current date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* Approximate s'. */ sp = -47e-6 * t * ERFA_DAS2R; return sp; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/zr.c0000644001134200020070000000664112640262015017310 0ustar embrayscience00000000000000#include "erfa.h" void eraZr(double r[3][3]) /* ** - - - - - - ** e r a Z r ** - - - - - - ** ** Initialize an r-matrix to the null matrix. ** ** Returned: ** r double[3][3] r-matrix ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { r[0][0] = 0.0; r[0][1] = 0.0; r[0][2] = 0.0; r[1][0] = 0.0; r[1][1] = 0.0; r[1][2] = 0.0; r[2][0] = 0.0; r[2][1] = 0.0; r[2][2] = 0.0; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fama03.c0000644001134200020070000001031512640262015017715 0ustar embrayscience00000000000000#include "erfa.h" double eraFama03(double t) /* ** - - - - - - - - - - ** e r a F a m a 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Mars. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double mean longitude of Mars, radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003) and ** comes from Souchay et al. (1999) after Simon et al. (1994). ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, ** Astron.Astrophys.Supp.Ser. 135, 111 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* Mean longitude of Mars (IERS Conventions 2003). */ a = fmod(6.203480913 + 334.0612426700 * t, ERFA_D2PI); return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2i00a.c0000644001134200020070000001342612640262015017632 0ustar embrayscience00000000000000#include "erfa.h" void eraC2i00a(double date1, double date2, double rc2i[3][3]) /* ** - - - - - - - - - - ** e r a C 2 i 0 0 a ** - - - - - - - - - - ** ** Form the celestial-to-intermediate matrix for a given date using the ** IAU 2000A precession-nutation model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** rc2i double[3][3] celestial-to-intermediate matrix (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix rc2i is the first stage in the transformation from ** celestial to terrestrial coordinates: ** ** [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] ** ** = rc2t * [CRS] ** ** where [CRS] is a vector in the Geocentric Celestial Reference ** System and [TRS] is a vector in the International Terrestrial ** Reference System (see IERS Conventions 2003), ERA is the Earth ** Rotation Angle and RPOM is the polar motion matrix. ** ** 3) A faster, but slightly less accurate result (about 1 mas), can be ** obtained by using instead the eraC2i00b function. ** ** Called: ** eraPnm00a classical NPB matrix, IAU 2000A ** eraC2ibpn celestial-to-intermediate matrix, given NPB matrix ** ** References: ** ** "Expressions for the Celestial Intermediate Pole and Celestial ** Ephemeris Origin consistent with the IAU 2000A precession- ** nutation model", Astron.Astrophys. 400, 1145-1154 ** (2003) ** ** n.b. The celestial ephemeris origin (CEO) was renamed "celestial ** intermediate origin" (CIO) by IAU 2006 Resolution 2. ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rbpn[3][3]; /* Obtain the celestial-to-true matrix (IAU 2000A). */ eraPnm00a(date1, date2, rbpn); /* Form the celestial-to-intermediate matrix. */ eraC2ibpn(date1, date2, rbpn, rc2i); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/bp06.c0000644001134200020070000001327712640262015017427 0ustar embrayscience00000000000000#include "erfa.h" void eraBp06(double date1, double date2, double rb[3][3], double rp[3][3], double rbp[3][3]) /* ** - - - - - - - - ** e r a B p 0 6 ** - - - - - - - - ** ** Frame bias and precession, IAU 2006. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** rb double[3][3] frame bias matrix (Note 2) ** rp double[3][3] precession matrix (Note 3) ** rbp double[3][3] bias-precession matrix (Note 4) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix rb transforms vectors from GCRS to mean J2000.0 by ** applying frame bias. ** ** 3) The matrix rp transforms vectors from mean J2000.0 to mean of ** date by applying precession. ** ** 4) The matrix rbp transforms vectors from GCRS to mean of date by ** applying frame bias then precession. It is the product rp x rb. ** ** 5) It is permissible to re-use the same array in the returned ** arguments. The arrays are filled in the order given. ** ** Called: ** eraPfw06 bias-precession F-W angles, IAU 2006 ** eraFw2m F-W angles to r-matrix ** eraPmat06 PB matrix, IAU 2006 ** eraTr transpose r-matrix ** eraRxr product of two r-matrices ** eraCr copy r-matrix ** ** References: ** ** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 ** ** Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double gamb, phib, psib, epsa, rbpw[3][3], rbt[3][3]; /* B matrix. */ eraPfw06(ERFA_DJM0, ERFA_DJM00, &gamb, &phib, &psib, &epsa); eraFw2m(gamb, phib, psib, epsa, rb); /* PxB matrix (temporary). */ eraPmat06(date1, date2, rbpw); /* P matrix. */ eraTr(rb, rbt); eraRxr(rbpw, rbt, rp); /* PxB matrix. */ eraCr(rbpw, rbp); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/hfk5z.c0000644001134200020070000001607512640262015017706 0ustar embrayscience00000000000000#include "erfa.h" void eraHfk5z(double rh, double dh, double date1, double date2, double *r5, double *d5, double *dr5, double *dd5) /* ** - - - - - - - - - ** e r a H f k 5 z ** - - - - - - - - - ** ** Transform a Hipparcos star position into FK5 J2000.0, assuming ** zero Hipparcos proper motion. ** ** Given: ** rh double Hipparcos RA (radians) ** dh double Hipparcos Dec (radians) ** date1,date2 double TDB date (Note 1) ** ** Returned (all FK5, equinox J2000.0, date date1+date2): ** r5 double RA (radians) ** d5 double Dec (radians) ** dr5 double FK5 RA proper motion (rad/year, Note 4) ** dd5 double Dec proper motion (rad/year, Note 4) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. ** ** 3) The FK5 to Hipparcos transformation is modeled as a pure rotation ** and spin; zonal errors in the FK5 catalogue are not taken into ** account. ** ** 4) It was the intention that Hipparcos should be a close ** approximation to an inertial frame, so that distant objects have ** zero proper motion; such objects have (in general) non-zero ** proper motion in FK5, and this function returns those fictitious ** proper motions. ** ** 5) The position returned by this function is in the FK5 J2000.0 ** reference system but at date date1+date2. ** ** 6) See also eraFk52h, eraH2fk5, eraFk5zhz. ** ** Called: ** eraS2c spherical coordinates to unit vector ** eraFk5hip FK5 to Hipparcos rotation and spin ** eraRxp product of r-matrix and p-vector ** eraSxp multiply p-vector by scalar ** eraRxr product of two r-matrices ** eraTrxp product of transpose of r-matrix and p-vector ** eraPxp vector product of two p-vectors ** eraPv2s pv-vector to spherical ** eraAnp normalize angle into range 0 to 2pi ** ** Reference: ** ** F.Mignard & M.Froeschle, 2000, Astron.Astrophys. 354, 732-739. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t, ph[3], r5h[3][3], s5h[3], sh[3], vst[3], rst[3][3], r5ht[3][3], pv5e[2][3], vv[3], w, r, v; /* Time interval from fundamental epoch J2000.0 to given date (JY). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJY; /* Hipparcos barycentric position vector (normalized). */ eraS2c(rh, dh, ph); /* FK5 to Hipparcos orientation matrix and spin vector. */ eraFk5hip(r5h, s5h); /* Rotate the spin into the Hipparcos system. */ eraRxp(r5h, s5h, sh); /* Accumulated Hipparcos wrt FK5 spin over that interval. */ eraSxp(t, s5h, vst); /* Express the accumulated spin as a rotation matrix. */ eraRv2m(vst, rst); /* Rotation matrix: accumulated spin, then FK5 to Hipparcos. */ eraRxr(r5h, rst, r5ht); /* De-orient & de-spin the Hipparcos position into FK5 J2000.0. */ eraTrxp(r5ht, ph, pv5e[0]); /* Apply spin to the position giving a space motion. */ eraPxp(sh, ph, vv); /* De-orient & de-spin the Hipparcos space motion into FK5 J2000.0. */ eraTrxp(r5ht, vv, pv5e[1]); /* FK5 position/velocity pv-vector to spherical. */ eraPv2s(pv5e, &w, d5, &r, dr5, dd5, &v); *r5 = eraAnp(w); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ttut1.c0000644001134200020070000001035112640262015017727 0ustar embrayscience00000000000000#include "erfa.h" int eraTtut1(double tt1, double tt2, double dt, double *ut11, double *ut12) /* ** - - - - - - - - - ** e r a T t u t 1 ** - - - - - - - - - ** ** Time scale transformation: Terrestrial Time, TT, to Universal Time, ** UT1. ** ** Given: ** tt1,tt2 double TT as a 2-part Julian Date ** dt double TT-UT1 in seconds ** ** Returned: ** ut11,ut12 double UT1 as a 2-part Julian Date ** ** Returned (function value): ** int status: 0 = OK ** ** Notes: ** ** 1) tt1+tt2 is Julian Date, apportioned in any convenient way between ** the two arguments, for example where tt1 is the Julian Day Number ** and tt2 is the fraction of a day. The returned ut11,ut12 follow ** suit. ** ** 2) The argument dt is classical Delta T. ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dtd; /* Result, safeguarding precision. */ dtd = dt / ERFA_DAYSEC; if ( tt1 > tt2 ) { *ut11 = tt1; *ut12 = tt2 - dtd; } else { *ut11 = tt1 - dtd; *ut12 = tt2; } /* Status (always OK). */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/bi00.c0000644001134200020070000001210712640262015017401 0ustar embrayscience00000000000000#include "erfa.h" void eraBi00(double *dpsibi, double *depsbi, double *dra) /* ** - - - - - - - - ** e r a B i 0 0 ** - - - - - - - - ** ** Frame bias components of IAU 2000 precession-nutation models (part ** of MHB2000 with additions). ** ** Returned: ** dpsibi,depsbi double longitude and obliquity corrections ** dra double the ICRS RA of the J2000.0 mean equinox ** ** Notes: ** ** 1) The frame bias corrections in longitude and obliquity (radians) ** are required in order to correct for the offset between the GCRS ** pole and the mean J2000.0 pole. They define, with respect to the ** GCRS frame, a J2000.0 mean pole that is consistent with the rest ** of the IAU 2000A precession-nutation model. ** ** 2) In addition to the displacement of the pole, the complete ** description of the frame bias requires also an offset in right ** ascension. This is not part of the IAU 2000A model, and is from ** Chapront et al. (2002). It is returned in radians. ** ** 3) This is a supplemented implementation of one aspect of the IAU ** 2000A nutation model, formally adopted by the IAU General ** Assembly in 2000, namely MHB2000 (Mathews et al. 2002). ** ** References: ** ** Chapront, J., Chapront-Touze, M. & Francou, G., Astron. ** Astrophys., 387, 700, 2002. ** ** Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation ** and precession New nutation series for nonrigid Earth and ** insights into the Earth's interior", J.Geophys.Res., 107, B4, ** 2002. The MHB2000 code itself was obtained on 9th September 2002 ** from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* The frame bias corrections in longitude and obliquity */ const double DPBIAS = -0.041775 * ERFA_DAS2R, DEBIAS = -0.0068192 * ERFA_DAS2R; /* The ICRS RA of the J2000.0 equinox (Chapront et al., 2002) */ const double DRA0 = -0.0146 * ERFA_DAS2R; /* Return the results (which are fixed). */ *dpsibi = DPBIAS; *depsbi = DEBIAS; *dra = DRA0; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/s00a.c0000644001134200020070000001425412640262015017417 0ustar embrayscience00000000000000#include "erfa.h" double eraS00a(double date1, double date2) /* ** - - - - - - - - ** e r a S 0 0 a ** - - - - - - - - ** ** The CIO locator s, positioning the Celestial Intermediate Origin on ** the equator of the Celestial Intermediate Pole, using the IAU 2000A ** precession-nutation model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned (function value): ** double the CIO locator s in radians (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The CIO locator s is the difference between the right ascensions ** of the same point in two systems. The two systems are the GCRS ** and the CIP,CIO, and the point is the ascending node of the ** CIP equator. The CIO locator s remains a small fraction of ** 1 arcsecond throughout 1900-2100. ** ** 3) The series used to compute s is in fact for s+XY/2, where X and Y ** are the x and y components of the CIP unit vector; this series ** is more compact than a direct series for s would be. The present ** function uses the full IAU 2000A nutation model when predicting ** the CIP position. Faster results, with no significant loss of ** accuracy, can be obtained via the function eraS00b, which uses ** instead the IAU 2000B truncated model. ** ** Called: ** eraPnm00a classical NPB matrix, IAU 2000A ** eraBnp2xy extract CIP X,Y from the BPN matrix ** eraS00 the CIO locator s, given X,Y, IAU 2000A ** ** References: ** ** Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., ** "Expressions for the Celestial Intermediate Pole and Celestial ** Ephemeris Origin consistent with the IAU 2000A precession- ** nutation model", Astron.Astrophys. 400, 1145-1154 (2003) ** ** n.b. The celestial ephemeris origin (CEO) was renamed "celestial ** intermediate origin" (CIO) by IAU 2006 Resolution 2. ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rbpn[3][3], x, y, s; /* Bias-precession-nutation-matrix, IAU 2000A. */ eraPnm00a(date1, date2, rbpn); /* Extract the CIP coordinates. */ eraBpn2xy(rbpn, &x, &y); /* Compute the CIO locator s, given the CIP coordinates. */ s = eraS00(date1, date2, x, y); return s; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/era00.c0000644001134200020070000001262412640262015017562 0ustar embrayscience00000000000000#include "erfa.h" double eraEra00(double dj1, double dj2) /* ** - - - - - - - - - ** e r a E r a 0 0 ** - - - - - - - - - ** ** Earth rotation angle (IAU 2000 model). ** ** Given: ** dj1,dj2 double UT1 as a 2-part Julian Date (see note) ** ** Returned (function value): ** double Earth rotation angle (radians), range 0-2pi ** ** Notes: ** ** 1) The UT1 date dj1+dj2 is a Julian Date, apportioned in any ** convenient way between the arguments dj1 and dj2. For example, ** JD(UT1)=2450123.7 could be expressed in any of these ways, ** among others: ** ** dj1 dj2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 and MJD methods are good compromises ** between resolution and convenience. The date & time method is ** best matched to the algorithm used: maximum precision is ** delivered when the dj1 argument is for 0hrs UT1 on the day in ** question and the dj2 argument lies in the range 0 to 1, or vice ** versa. ** ** 2) The algorithm is adapted from Expression 22 of Capitaine et al. ** 2000. The time argument has been expressed in days directly, ** and, to retain precision, integer contributions have been ** eliminated. The same formulation is given in IERS Conventions ** (2003), Chap. 5, Eq. 14. ** ** Called: ** eraAnp normalize angle into range 0 to 2pi ** ** References: ** ** Capitaine N., Guinot B. and McCarthy D.D, 2000, Astron. ** Astrophys., 355, 398-405. ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double d1, d2, t, f, theta; /* Days since fundamental epoch. */ if (dj1 < dj2) { d1 = dj1; d2 = dj2; } else { d1 = dj2; d2 = dj1; } t = d1 + (d2- ERFA_DJ00); /* Fractional part of T (days). */ f = fmod(d1, 1.0) + fmod(d2, 1.0); /* Earth rotation angle at this UT1. */ theta = eraAnp(ERFA_D2PI * (f + 0.7790572732640 + 0.00273781191135448 * t)); return theta; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/epj2jd.c0000644001134200020070000000744312640262015020034 0ustar embrayscience00000000000000#include "erfa.h" void eraEpj2jd(double epj, double *djm0, double *djm) /* ** - - - - - - - - - - ** e r a E p j 2 j d ** - - - - - - - - - - ** ** Julian Epoch to Julian Date. ** ** Given: ** epj double Julian Epoch (e.g. 1996.8) ** ** Returned: ** djm0 double MJD zero-point: always 2400000.5 ** djm double Modified Julian Date ** ** Note: ** ** The Julian Date is returned in two pieces, in the usual ERFA ** manner, which is designed to preserve time resolution. The ** Julian Date is available as a single number by adding djm0 and ** djm. ** ** Reference: ** ** Lieske, J.H., 1979, Astron.Astrophys. 73, 282. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { *djm0 = ERFA_DJM0; *djm = ERFA_DJM00 + (epj - 2000.0) * 365.25; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/d2tf.c0000644001134200020070000001323612640262015017512 0ustar embrayscience00000000000000#include "erfa.h" void eraD2tf(int ndp, double days, char *sign, int ihmsf[4]) /* ** - - - - - - - - ** e r a D 2 t f ** - - - - - - - - ** ** Decompose days to hours, minutes, seconds, fraction. ** ** Given: ** ndp int resolution (Note 1) ** days double interval in days ** ** Returned: ** sign char '+' or '-' ** ihmsf int[4] hours, minutes, seconds, fraction ** ** Notes: ** ** 1) The argument ndp is interpreted as follows: ** ** ndp resolution ** : ...0000 00 00 ** -7 1000 00 00 ** -6 100 00 00 ** -5 10 00 00 ** -4 1 00 00 ** -3 0 10 00 ** -2 0 01 00 ** -1 0 00 10 ** 0 0 00 01 ** 1 0 00 00.1 ** 2 0 00 00.01 ** 3 0 00 00.001 ** : 0 00 00.000... ** ** 2) The largest positive useful value for ndp is determined by the ** size of days, the format of double on the target platform, and ** the risk of overflowing ihmsf[3]. On a typical platform, for ** days up to 1.0, the available floating-point precision might ** correspond to ndp=12. However, the practical limit is typically ** ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is ** only 16 bits. ** ** 3) The absolute value of days may exceed 1.0. In cases where it ** does not, it is up to the caller to test for and handle the ** case where days is very nearly 1.0 and rounds up to 24 hours, ** by testing for ihmsf[0]=24 and setting ihmsf[0-3] to zero. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int nrs, n; double rs, rm, rh, a, w, ah, am, as, af; /* Handle sign. */ *sign = (char) ( ( days >= 0.0 ) ? '+' : '-' ); /* Interval in seconds. */ a = ERFA_DAYSEC * fabs(days); /* Pre-round if resolution coarser than 1s (then pretend ndp=1). */ if (ndp < 0) { nrs = 1; for (n = 1; n <= -ndp; n++) { nrs *= (n == 2 || n == 4) ? 6 : 10; } rs = (double) nrs; w = a / rs; a = rs * ERFA_DNINT(w); } /* Express the unit of each field in resolution units. */ nrs = 1; for (n = 1; n <= ndp; n++) { nrs *= 10; } rs = (double) nrs; rm = rs * 60.0; rh = rm * 60.0; /* Round the interval and express in resolution units. */ a = ERFA_DNINT(rs * a); /* Break into fields. */ ah = a / rh; ah = ERFA_DINT(ah); a -= ah * rh; am = a / rm; am = ERFA_DINT(am); a -= am * rm; as = a / rs; as = ERFA_DINT(as); af = a - as * rs; /* Return results. */ ihmsf[0] = (int) ah; ihmsf[1] = (int) am; ihmsf[2] = (int) as; ihmsf[3] = (int) af; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/rv2m.c0000644001134200020070000001064312640262015017540 0ustar embrayscience00000000000000#include "erfa.h" void eraRv2m(double w[3], double r[3][3]) /* ** - - - - - - - - ** e r a R v 2 m ** - - - - - - - - ** ** Form the r-matrix corresponding to a given r-vector. ** ** Given: ** w double[3] rotation vector (Note 1) ** ** Returned: ** r double[3][3] rotation matrix ** ** Notes: ** ** 1) A rotation matrix describes a rotation through some angle about ** some arbitrary axis called the Euler axis. The "rotation vector" ** supplied to This function has the same direction as the Euler ** axis, and its magnitude is the angle in radians. ** ** 2) If w is null, the unit matrix is returned. ** ** 3) The reference frame rotates clockwise as seen looking along the ** rotation vector from the origin. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double x, y, z, phi, s, c, f; /* Euler angle (magnitude of rotation vector) and functions. */ x = w[0]; y = w[1]; z = w[2]; phi = sqrt(x*x + y*y + z*z); s = sin(phi); c = cos(phi); f = 1.0 - c; /* Euler axis (direction of rotation vector), perhaps null. */ if (phi > 0.0) { x /= phi; y /= phi; z /= phi; } /* Form the rotation matrix. */ r[0][0] = x*x*f + c; r[0][1] = x*y*f + z*s; r[0][2] = x*z*f - y*s; r[1][0] = y*x*f - z*s; r[1][1] = y*y*f + c; r[1][2] = y*z*f + x*s; r[2][0] = z*x*f + y*s; r[2][1] = z*y*f - x*s; r[2][2] = z*z*f + c; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/atci13.c0000644001134200020070000001521012640262015017731 0ustar embrayscience00000000000000#include "erfa.h" void eraAtci13(double rc, double dc, double pr, double pd, double px, double rv, double date1, double date2, double *ri, double *di, double *eo) /* ** - - - - - - - - - - ** e r a A t c i 1 3 ** - - - - - - - - - - ** ** Transform ICRS star data, epoch J2000.0, to CIRS. ** ** Given: ** rc double ICRS right ascension at J2000.0 (radians, Note 1) ** dc double ICRS declination at J2000.0 (radians, Note 1) ** pr double RA proper motion (radians/year; Note 2) ** pd double Dec proper motion (radians/year) ** px double parallax (arcsec) ** rv double radial velocity (km/s, +ve if receding) ** date1 double TDB as a 2-part... ** date2 double ...Julian Date (Note 3) ** ** Returned: ** ri,di double* CIRS geocentric RA,Dec (radians) ** eo double* equation of the origins (ERA-GST, Note 5) ** ** Notes: ** ** 1) Star data for an epoch other than J2000.0 (for example from the ** Hipparcos catalog, which has an epoch of J1991.25) will require a ** preliminary call to eraPmsafe before use. ** ** 2) The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. ** ** 3) The TDB date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TDB)=2450123.8g could be expressed in any of these ways, among ** others: ** ** date1 date2 ** ** 2450123.8g 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 method is best matched to the way the ** argument is handled internally and will deliver the optimum ** resolution. The MJD method and the date & time methods are both ** good compromises between resolution and convenience. For most ** applications of this function the choice will not be at all ** critical. ** ** TT can be used instead of TDB without any significant impact on ** accuracy. ** ** 4) The available accuracy is better than 1 milliarcsecond, limited ** mainly by the precession-nutation model that is used, namely ** IAU 2000A/2006. Very close to solar system bodies, additional ** errors of up to several milliarcseconds can occur because of ** unmodeled light deflection; however, the Sun's contribution is ** taken into account, to first order. The accuracy limitations of ** the ERFA function eraEpv00 (used to compute Earth position and ** velocity) can contribute aberration errors of up to ** 5 microarcseconds. Light deflection at the Sun's limb is ** uncertain at the 0.4 mas level. ** ** 5) Should the transformation to (equinox based) apparent place be ** required rather than (CIO based) intermediate place, subtract the ** equation of the origins from the returned right ascension: ** RA = RI - EO. (The eraAnp function can then be applied, as ** required, to keep the result in the conventional 0-2pi range.) ** ** Called: ** eraApci13 astrometry parameters, ICRS-CIRS, 2013 ** eraAtciq quick ICRS to CIRS ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Star-independent astrometry parameters */ eraASTROM astrom; /* The transformation parameters. */ eraApci13(date1, date2, &astrom, eo); /* ICRS (epoch J2000.0) to CIRS. */ eraAtciq(rc, dc, pr, pd, px, rv, &astrom, ri, di); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fane03.c0000644001134200020070000001011412640262015017717 0ustar embrayscience00000000000000#include "erfa.h" double eraFane03(double t) /* ** - - - - - - - - - - ** e r a F a n e 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Neptune. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double mean longitude of Neptune, radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003) and ** is adapted from Simon et al. (1994). ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* Mean longitude of Neptune (IERS Conventions 2003). */ a = fmod(5.311886287 + 3.8133035638 * t, ERFA_D2PI); return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/num06a.c0000644001134200020070000001211312640262015017752 0ustar embrayscience00000000000000#include "erfa.h" void eraNum06a(double date1, double date2, double rmatn[3][3]) /* ** - - - - - - - - - - ** e r a N u m 0 6 a ** - - - - - - - - - - ** ** Form the matrix of nutation for a given date, IAU 2006/2000A model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** rmatn double[3][3] nutation matrix ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix operates in the sense V(true) = rmatn * V(mean), where ** the p-vector V(true) is with respect to the true equatorial triad ** of date and the p-vector V(mean) is with respect to the mean ** equatorial triad of date. ** ** Called: ** eraObl06 mean obliquity, IAU 2006 ** eraNut06a nutation, IAU 2006/2000A ** eraNumat form nutation matrix ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992), ** Section 3.222-3 (p114). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double eps, dp, de; /* Mean obliquity. */ eps = eraObl06(date1, date2); /* Nutation components. */ eraNut06a(date1, date2, &dp, &de); /* Nutation matrix. */ eraNumat(eps, dp, de, rmatn); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pvppv.c0000644001134200020070000000716312640262015020030 0ustar embrayscience00000000000000#include "erfa.h" void eraPvppv(double a[2][3], double b[2][3], double apb[2][3]) /* ** - - - - - - - - - ** e r a P v p p v ** - - - - - - - - - ** ** Add one pv-vector to another. ** ** Given: ** a double[2][3] first pv-vector ** b double[2][3] second pv-vector ** ** Returned: ** apb double[2][3] a + b ** ** Note: ** It is permissible to re-use the same array for any of the ** arguments. ** ** Called: ** eraPpp p-vector plus p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraPpp(a[0], b[0], apb[0]); eraPpp(a[1], b[1], apb[1]); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/a2tf.c0000644001134200020070000001144512640262015017507 0ustar embrayscience00000000000000#include "erfa.h" void eraA2tf(int ndp, double angle, char *sign, int ihmsf[4]) /* ** - - - - - - - - ** e r a A 2 t f ** - - - - - - - - ** ** Decompose radians into hours, minutes, seconds, fraction. ** ** Given: ** ndp int resolution (Note 1) ** angle double angle in radians ** ** Returned: ** sign char '+' or '-' ** ihmsf int[4] hours, minutes, seconds, fraction ** ** Called: ** eraD2tf decompose days to hms ** ** Notes: ** ** 1) The argument ndp is interpreted as follows: ** ** ndp resolution ** : ...0000 00 00 ** -7 1000 00 00 ** -6 100 00 00 ** -5 10 00 00 ** -4 1 00 00 ** -3 0 10 00 ** -2 0 01 00 ** -1 0 00 10 ** 0 0 00 01 ** 1 0 00 00.1 ** 2 0 00 00.01 ** 3 0 00 00.001 ** : 0 00 00.000... ** ** 2) The largest positive useful value for ndp is determined by the ** size of angle, the format of doubles on the target platform, and ** the risk of overflowing ihmsf[3]. On a typical platform, for ** angle up to 2pi, the available floating-point precision might ** correspond to ndp=12. However, the practical limit is typically ** ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is ** only 16 bits. ** ** 3) The absolute value of angle may exceed 2pi. In cases where it ** does not, it is up to the caller to test for and handle the ** case where angle is very nearly 2pi and rounds up to 24 hours, ** by testing for ihmsf[0]=24 and setting ihmsf[0-3] to zero. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Scale then use days to h,m,s function. */ eraD2tf(ndp, angle/ERFA_D2PI, sign, ihmsf); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/tf2d.c0000644001134200020070000001077712640262015017521 0ustar embrayscience00000000000000#include "erfa.h" #include int eraTf2d(char s, int ihour, int imin, double sec, double *days) /* ** - - - - - - - - ** e r a T f 2 d ** - - - - - - - - ** ** Convert hours, minutes, seconds to days. ** ** Given: ** s char sign: '-' = negative, otherwise positive ** ihour int hours ** imin int minutes ** sec double seconds ** ** Returned: ** days double interval in days ** ** Returned (function value): ** int status: 0 = OK ** 1 = ihour outside range 0-23 ** 2 = imin outside range 0-59 ** 3 = sec outside range 0-59.999... ** ** Notes: ** ** 1) The result is computed even if any of the range checks fail. ** ** 2) Negative ihour, imin and/or sec produce a warning status, but ** the absolute value is used in the conversion. ** ** 3) If there are multiple errors, the status value reflects only the ** first, the smallest taking precedence. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Compute the interval. */ *days = ( s == '-' ? -1.0 : 1.0 ) * ( 60.0 * ( 60.0 * ( (double) abs(ihour) ) + ( (double) abs(imin) ) ) + fabs(sec) ) / ERFA_DAYSEC; /* Validate arguments and return status. */ if ( ihour < 0 || ihour > 23 ) return 1; if ( imin < 0 || imin > 59 ) return 2; if ( sec < 0.0 || sec >= 60.0 ) return 3; return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/rm2v.c0000644001134200020070000001063412640262015017540 0ustar embrayscience00000000000000#include "erfa.h" void eraRm2v(double r[3][3], double w[3]) /* ** - - - - - - - - ** e r a R m 2 v ** - - - - - - - - ** ** Express an r-matrix as an r-vector. ** ** Given: ** r double[3][3] rotation matrix ** ** Returned: ** w double[3] rotation vector (Note 1) ** ** Notes: ** ** 1) A rotation matrix describes a rotation through some angle about ** some arbitrary axis called the Euler axis. The "rotation vector" ** returned by this function has the same direction as the Euler axis, ** and its magnitude is the angle in radians. (The magnitude and ** direction can be separated by means of the function eraPn.) ** ** 2) If r is null, so is the result. If r is not a rotation matrix ** the result is undefined; r must be proper (i.e. have a positive ** determinant) and real orthogonal (inverse = transpose). ** ** 3) The reference frame rotates clockwise as seen looking along ** the rotation vector from the origin. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double x, y, z, s2, c2, phi, f; x = r[1][2] - r[2][1]; y = r[2][0] - r[0][2]; z = r[0][1] - r[1][0]; s2 = sqrt(x*x + y*y + z*z); if (s2 > 0) { c2 = r[0][0] + r[1][1] + r[2][2] - 1.0; phi = atan2(s2, c2); f = phi / s2; w[0] = x * f; w[1] = y * f; w[2] = z * f; } else { w[0] = 0.0; w[1] = 0.0; w[2] = 0.0; } return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pvstar.c0000644001134200020070000002076112640262015020173 0ustar embrayscience00000000000000#include "erfa.h" int eraPvstar(double pv[2][3], double *ra, double *dec, double *pmr, double *pmd, double *px, double *rv) /* ** - - - - - - - - - - ** e r a P v s t a r ** - - - - - - - - - - ** ** Convert star position+velocity vector to catalog coordinates. ** ** Given (Note 1): ** pv double[2][3] pv-vector (AU, AU/day) ** ** Returned (Note 2): ** ra double right ascension (radians) ** dec double declination (radians) ** pmr double RA proper motion (radians/year) ** pmd double Dec proper motion (radians/year) ** px double parallax (arcsec) ** rv double radial velocity (km/s, positive = receding) ** ** Returned (function value): ** int status: ** 0 = OK ** -1 = superluminal speed (Note 5) ** -2 = null position vector ** ** Notes: ** ** 1) The specified pv-vector is the coordinate direction (and its rate ** of change) for the date at which the light leaving the star ** reached the solar-system barycenter. ** ** 2) The star data returned by this function are "observables" for an ** imaginary observer at the solar-system barycenter. Proper motion ** and radial velocity are, strictly, in terms of barycentric ** coordinate time, TCB. For most practical applications, it is ** permissible to neglect the distinction between TCB and ordinary ** "proper" time on Earth (TT/TAI). The result will, as a rule, be ** limited by the intrinsic accuracy of the proper-motion and ** radial-velocity data; moreover, the supplied pv-vector is likely ** to be merely an intermediate result (for example generated by the ** function eraStarpv), so that a change of time unit will cancel ** out overall. ** ** In accordance with normal star-catalog conventions, the object's ** right ascension and declination are freed from the effects of ** secular aberration. The frame, which is aligned to the catalog ** equator and equinox, is Lorentzian and centered on the SSB. ** ** Summarizing, the specified pv-vector is for most stars almost ** identical to the result of applying the standard geometrical ** "space motion" transformation to the catalog data. The ** differences, which are the subject of the Stumpff paper cited ** below, are: ** ** (i) In stars with significant radial velocity and proper motion, ** the constantly changing light-time distorts the apparent proper ** motion. Note that this is a classical, not a relativistic, ** effect. ** ** (ii) The transformation complies with special relativity. ** ** 3) Care is needed with units. The star coordinates are in radians ** and the proper motions in radians per Julian year, but the ** parallax is in arcseconds; the radial velocity is in km/s, but ** the pv-vector result is in AU and AU/day. ** ** 4) The proper motions are the rate of change of the right ascension ** and declination at the catalog epoch and are in radians per Julian ** year. The RA proper motion is in terms of coordinate angle, not ** true angle, and will thus be numerically larger at high ** declinations. ** ** 5) Straight-line motion at constant speed in the inertial frame is ** assumed. If the speed is greater than or equal to the speed of ** light, the function aborts with an error status. ** ** 6) The inverse transformation is performed by the function eraStarpv. ** ** Called: ** eraPn decompose p-vector into modulus and direction ** eraPdp scalar product of two p-vectors ** eraSxp multiply p-vector by scalar ** eraPmp p-vector minus p-vector ** eraPm modulus of p-vector ** eraPpp p-vector plus p-vector ** eraPv2s pv-vector to spherical ** eraAnp normalize angle into range 0 to 2pi ** ** Reference: ** ** Stumpff, P., 1985, Astron.Astrophys. 144, 232-240. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double r, x[3], vr, ur[3], vt, ut[3], bett, betr, d, w, del, usr[3], ust[3], a, rad, decd, rd; /* Isolate the radial component of the velocity (AU/day, inertial). */ eraPn(pv[0], &r, x); vr = eraPdp(x, pv[1]); eraSxp(vr, x, ur); /* Isolate the transverse component of the velocity (AU/day, inertial). */ eraPmp(pv[1], ur, ut); vt = eraPm(ut); /* Special-relativity dimensionless parameters. */ bett = vt / ERFA_DC; betr = vr / ERFA_DC; /* The inertial-to-observed correction terms. */ d = 1.0 + betr; w = 1.0 - betr*betr - bett*bett; if (d == 0.0 || w < 0) return -1; del = sqrt(w) - 1.0; /* Apply relativistic correction factor to radial velocity component. */ w = (betr != 0) ? (betr - del) / (betr * d) : 1.0; eraSxp(w, ur, usr); /* Apply relativistic correction factor to tangential velocity */ /* component. */ eraSxp(1.0/d, ut, ust); /* Combine the two to obtain the observed velocity vector (AU/day). */ eraPpp(usr, ust, pv[1]); /* Cartesian to spherical. */ eraPv2s(pv, &a, dec, &r, &rad, &decd, &rd); if (r == 0.0) return -2; /* Return RA in range 0 to 2pi. */ *ra = eraAnp(a); /* Return proper motions in radians per year. */ *pmr = rad * ERFA_DJY; *pmd = decd * ERFA_DJY; /* Return parallax in arcsec. */ *px = ERFA_DR2AS / r; /* Return radial velocity in km/s. */ *rv = 1e-3 * rd * ERFA_DAU / ERFA_DAYSEC; /* OK status. */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/p2s.c0000644001134200020070000000732612640262015017362 0ustar embrayscience00000000000000#include "erfa.h" void eraP2s(double p[3], double *theta, double *phi, double *r) /* ** - - - - - - - ** e r a P 2 s ** - - - - - - - ** ** P-vector to spherical polar coordinates. ** ** Given: ** p double[3] p-vector ** ** Returned: ** theta double longitude angle (radians) ** phi double latitude angle (radians) ** r double radial distance ** ** Notes: ** ** 1) If P is null, zero theta, phi and r are returned. ** ** 2) At either pole, zero theta is returned. ** ** Called: ** eraC2s p-vector to spherical ** eraPm modulus of p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraC2s(p, theta, phi); *r = eraPm(p); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/atciqn.c0000644001134200020070000002024312640262015020126 0ustar embrayscience00000000000000#include "erfa.h" void eraAtciqn(double rc, double dc, double pr, double pd, double px, double rv, eraASTROM *astrom, int n, eraLDBODY b[], double *ri, double *di) /* ** - - - - - - - - - - ** e r a A t c i q n ** - - - - - - - - - - ** ** Quick ICRS, epoch J2000.0, to CIRS transformation, given precomputed ** star-independent astrometry parameters plus a list of light- ** deflecting bodies. ** ** Use of this function is appropriate when efficiency is important and ** where many star positions are to be transformed for one date. The ** star-independent parameters can be obtained by calling one of the ** functions eraApci[13], eraApcg[13], eraApco[13] or eraApcs[13]. ** ** If the only light-deflecting body to be taken into account is the ** Sun, the eraAtciq function can be used instead. If in addition the ** parallax and proper motions are zero, the eraAtciqz function can be ** used. ** ** Given: ** rc,dc double ICRS RA,Dec at J2000.0 (radians) ** pr double RA proper motion (radians/year; Note 3) ** pd double Dec proper motion (radians/year) ** px double parallax (arcsec) ** rv double radial velocity (km/s, +ve if receding) ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double longitude + s' (radians) ** xpl double polar motion xp wrt local meridian (radians) ** ypl double polar motion yp wrt local meridian (radians) ** sphi double sine of geodetic latitude ** cphi double cosine of geodetic latitude ** diurab double magnitude of diurnal aberration vector ** eral double "local" Earth rotation angle (radians) ** refa double refraction constant A (radians) ** refb double refraction constant B (radians) ** n int number of bodies (Note 3) ** b eraLDBODY[n] data for each of the n bodies (Notes 3,4): ** bm double mass of the body (solar masses, Note 5) ** dl double deflection limiter (Note 6) ** pv [2][3] barycentric PV of the body (au, au/day) ** ** Returned: ** ri,di double CIRS RA,Dec (radians) ** ** Notes: ** ** 1) Star data for an epoch other than J2000.0 (for example from the ** Hipparcos catalog, which has an epoch of J1991.25) will require a ** preliminary call to eraPmsafe before use. ** ** 2) The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. ** ** 3) The struct b contains n entries, one for each body to be ** considered. If n = 0, no gravitational light deflection will be ** applied, not even for the Sun. ** ** 4) The struct b should include an entry for the Sun as well as for ** any planet or other body to be taken into account. The entries ** should be in the order in which the light passes the body. ** ** 5) In the entry in the b struct for body i, the mass parameter ** b[i].bm can, as required, be adjusted in order to allow for such ** effects as quadrupole field. ** ** 6) The deflection limiter parameter b[i].dl is phi^2/2, where phi is ** the angular separation (in radians) between star and body at ** which limiting is applied. As phi shrinks below the chosen ** threshold, the deflection is artificially reduced, reaching zero ** for phi = 0. Example values suitable for a terrestrial ** observer, together with masses, are as follows: ** ** body i b[i].bm b[i].dl ** ** Sun 1.0 6e-6 ** Jupiter 0.00095435 3e-9 ** Saturn 0.00028574 3e-10 ** ** 7) For efficiency, validation of the contents of the b array is ** omitted. The supplied masses must be greater than zero, the ** position and velocity vectors must be right, and the deflection ** limiter greater than zero. ** ** Called: ** eraPmpx proper motion and parallax ** eraLdn light deflection by n bodies ** eraAb stellar aberration ** eraRxp product of r-matrix and pv-vector ** eraC2s p-vector to spherical ** eraAnp normalize angle into range 0 to 2pi ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double pco[3], pnat[3], ppr[3], pi[3], w; /* Proper motion and parallax, giving BCRS coordinate direction. */ eraPmpx(rc, dc, pr, pd, px, rv, astrom->pmt, astrom->eb, pco); /* Light deflection, giving BCRS natural direction. */ eraLdn(n, b, astrom->eb, pco, pnat); /* Aberration, giving GCRS proper direction. */ eraAb(pnat, astrom->v, astrom->em, astrom->bm1, ppr); /* Bias-precession-nutation, giving CIRS proper direction. */ eraRxp(astrom->bpn, ppr, pi); /* CIRS RA,Dec. */ eraC2s(pi, &w, di); *ri = eraAnp(w); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pnm80.c0000644001134200020070000001230112640262015017605 0ustar embrayscience00000000000000#include "erfa.h" void eraPnm80(double date1, double date2, double rmatpn[3][3]) /* ** - - - - - - - - - ** e r a P n m 8 0 ** - - - - - - - - - ** ** Form the matrix of precession/nutation for a given date, IAU 1976 ** precession model, IAU 1980 nutation model. ** ** Given: ** date1,date2 double TDB date (Note 1) ** ** Returned: ** rmatpn double[3][3] combined precession/nutation matrix ** ** Notes: ** ** 1) The TDB date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TDB)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix operates in the sense V(date) = rmatpn * V(J2000), ** where the p-vector V(date) is with respect to the true equatorial ** triad of date date1+date2 and the p-vector V(J2000) is with ** respect to the mean equatorial triad of epoch J2000.0. ** ** Called: ** eraPmat76 precession matrix, IAU 1976 ** eraNutm80 nutation matrix, IAU 1980 ** eraRxr product of two r-matrices ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992), ** Section 3.3 (p145). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rmatp[3][3], rmatn[3][3]; /* Precession matrix, J2000.0 to date. */ eraPmat76(date1, date2, rmatp); /* Nutation matrix. */ eraNutm80(date1, date2, rmatn); /* Combine the matrices: PN = N x P. */ eraRxr(rmatn, rmatp, rmatpn); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2tpe.c0000644001134200020070000001623112640262015017666 0ustar embrayscience00000000000000#include "erfa.h" void eraC2tpe(double tta, double ttb, double uta, double utb, double dpsi, double deps, double xp, double yp, double rc2t[3][3]) /* ** - - - - - - - - - ** e r a C 2 t p e ** - - - - - - - - - ** ** Form the celestial to terrestrial matrix given the date, the UT1, ** the nutation and the polar motion. IAU 2000. ** ** Given: ** tta,ttb double TT as a 2-part Julian Date (Note 1) ** uta,utb double UT1 as a 2-part Julian Date (Note 1) ** dpsi,deps double nutation (Note 2) ** xp,yp double coordinates of the pole (radians, Note 3) ** ** Returned: ** rc2t double[3][3] celestial-to-terrestrial matrix (Note 4) ** ** Notes: ** ** 1) The TT and UT1 dates tta+ttb and uta+utb are Julian Dates, ** apportioned in any convenient way between the arguments uta and ** utb. For example, JD(UT1)=2450123.7 could be expressed in any of ** these ways, among others: ** ** uta utb ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution is ** acceptable. The J2000 and MJD methods are good compromises ** between resolution and convenience. In the case of uta,utb, the ** date & time method is best matched to the Earth rotation angle ** algorithm used: maximum precision is delivered when the uta ** argument is for 0hrs UT1 on the day in question and the utb ** argument lies in the range 0 to 1, or vice versa. ** ** 2) The caller is responsible for providing the nutation components; ** they are in longitude and obliquity, in radians and are with ** respect to the equinox and ecliptic of date. For high-accuracy ** applications, free core nutation should be included as well as ** any other relevant corrections to the position of the CIP. ** ** 3) The arguments xp and yp are the coordinates (in radians) of the ** Celestial Intermediate Pole with respect to the International ** Terrestrial Reference System (see IERS Conventions 2003), ** measured along the meridians to 0 and 90 deg west respectively. ** ** 4) The matrix rc2t transforms from celestial to terrestrial ** coordinates: ** ** [TRS] = RPOM * R_3(GST) * RBPN * [CRS] ** ** = rc2t * [CRS] ** ** where [CRS] is a vector in the Geocentric Celestial Reference ** System and [TRS] is a vector in the International Terrestrial ** Reference System (see IERS Conventions 2003), RBPN is the ** bias-precession-nutation matrix, GST is the Greenwich (apparent) ** Sidereal Time and RPOM is the polar motion matrix. ** ** 5) Although its name does not include "00", This function is in fact ** specific to the IAU 2000 models. ** ** Called: ** eraPn00 bias/precession/nutation results, IAU 2000 ** eraGmst00 Greenwich mean sidereal time, IAU 2000 ** eraSp00 the TIO locator s', IERS 2000 ** eraEe00 equation of the equinoxes, IAU 2000 ** eraPom00 polar motion matrix ** eraC2teqx form equinox-based celestial-to-terrestrial matrix ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double epsa, rb[3][3], rp[3][3], rbp[3][3], rn[3][3], rbpn[3][3], gmst, ee, sp, rpom[3][3]; /* Form the celestial-to-true matrix for this TT. */ eraPn00(tta, ttb, dpsi, deps, &epsa, rb, rp, rbp, rn, rbpn); /* Predict the Greenwich Mean Sidereal Time for this UT1 and TT. */ gmst = eraGmst00(uta, utb, tta, ttb); /* Predict the equation of the equinoxes given TT and nutation. */ ee = eraEe00(tta, ttb, epsa, dpsi); /* Estimate s'. */ sp = eraSp00(tta, ttb); /* Form the polar motion matrix. */ eraPom00(xp, yp, sp, rpom); /* Combine to form the celestial-to-terrestrial matrix. */ eraC2teqx(rbpn, gmst + ee, rpom, rc2t); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/apco.c0000644001134200020070000002621112640262015017572 0ustar embrayscience00000000000000#include "erfa.h" void eraApco(double date1, double date2, double ebpv[2][3], double ehp[3], double x, double y, double s, double theta, double elong, double phi, double hm, double xp, double yp, double sp, double refa, double refb, eraASTROM *astrom) /* ** - - - - - - - - ** e r a A p c o ** - - - - - - - - ** ** For a terrestrial observer, prepare star-independent astrometry ** parameters for transformations between ICRS and observed ** coordinates. The caller supplies the Earth ephemeris, the Earth ** rotation information and the refraction constants as well as the ** site coordinates. ** ** Given: ** date1 double TDB as a 2-part... ** date2 double ...Julian Date (Note 1) ** ebpv double[2][3] Earth barycentric PV (au, au/day, Note 2) ** ehp double[3] Earth heliocentric P (au, Note 2) ** x,y double CIP X,Y (components of unit vector) ** s double the CIO locator s (radians) ** theta double Earth rotation angle (radians) ** elong double longitude (radians, east +ve, Note 3) ** phi double latitude (geodetic, radians, Note 3) ** hm double height above ellipsoid (m, geodetic, Note 3) ** xp,yp double polar motion coordinates (radians, Note 4) ** sp double the TIO locator s' (radians, Note 4) ** refa double refraction constant A (radians, Note 5) ** refb double refraction constant B (radians, Note 5) ** ** Returned: ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double longitude + s' (radians) ** xpl double polar motion xp wrt local meridian (radians) ** ypl double polar motion yp wrt local meridian (radians) ** sphi double sine of geodetic latitude ** cphi double cosine of geodetic latitude ** diurab double magnitude of diurnal aberration vector ** eral double "local" Earth rotation angle (radians) ** refa double refraction constant A (radians) ** refb double refraction constant B (radians) ** ** Notes: ** ** 1) The TDB date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TDB)=2450123.7 could be expressed in any of these ways, among ** others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 method is best matched to the way the ** argument is handled internally and will deliver the optimum ** resolution. The MJD method and the date & time methods are both ** good compromises between resolution and convenience. For most ** applications of this function the choice will not be at all ** critical. ** ** TT can be used instead of TDB without any significant impact on ** accuracy. ** ** 2) The vectors eb, eh, and all the astrom vectors, are with respect ** to BCRS axes. ** ** 3) The geographical coordinates are with respect to the ERFA_WGS84 ** reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN ** CONVENTION: the longitude required by the present function is ** right-handed, i.e. east-positive, in accordance with geographical ** convention. ** ** 4) xp and yp are the coordinates (in radians) of the Celestial ** Intermediate Pole with respect to the International Terrestrial ** Reference System (see IERS Conventions), measured along the ** meridians 0 and 90 deg west respectively. sp is the TIO locator ** s', in radians, which positions the Terrestrial Intermediate ** Origin on the equator. For many applications, xp, yp and ** (especially) sp can be set to zero. ** ** Internally, the polar motion is stored in a form rotated onto the ** local meridian. ** ** 5) The refraction constants refa and refb are for use in a ** dZ = A*tan(Z)+B*tan^3(Z) model, where Z is the observed ** (i.e. refracted) zenith distance and dZ is the amount of ** refraction. ** ** 6) It is advisable to take great care with units, as even unlikely ** values of the input parameters are accepted and processed in ** accordance with the models used. ** ** 7) In cases where the caller does not wish to provide the Earth ** Ephemeris, the Earth rotation information and refraction ** constants, the function eraApco13 can be used instead of the ** present function. This starts from UTC and weather readings etc. ** and computes suitable values using other ERFA functions. ** ** 8) This is one of several functions that inserts into the astrom ** structure star-independent parameters needed for the chain of ** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. ** ** The various functions support different classes of observer and ** portions of the transformation chain: ** ** functions observer transformation ** ** eraApcg eraApcg13 geocentric ICRS <-> GCRS ** eraApci eraApci13 terrestrial ICRS <-> CIRS ** eraApco eraApco13 terrestrial ICRS <-> observed ** eraApcs eraApcs13 space ICRS <-> GCRS ** eraAper eraAper13 terrestrial update Earth rotation ** eraApio eraApio13 terrestrial CIRS <-> observed ** ** Those with names ending in "13" use contemporary ERFA models to ** compute the various ephemerides. The others accept ephemerides ** supplied by the caller. ** ** The transformation from ICRS to GCRS covers space motion, ** parallax, light deflection, and aberration. From GCRS to CIRS ** comprises frame bias and precession-nutation. From CIRS to ** observed takes account of Earth rotation, polar motion, diurnal ** aberration and parallax (unless subsumed into the ICRS <-> GCRS ** transformation), and atmospheric refraction. ** ** 9) The context structure astrom produced by this function is used by ** eraAtioq, eraAtoiq, eraAtciq* and eraAticq*. ** ** Called: ** eraAper astrometry parameters: update ERA ** eraC2ixys celestial-to-intermediate matrix, given X,Y and s ** eraPvtob position/velocity of terrestrial station ** eraTrxpv product of transpose of r-matrix and pv-vector ** eraApcs astrometry parameters, ICRS-GCRS, space observer ** eraCr copy r-matrix ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double sl, cl, r[3][3], pvc[2][3], pv[2][3]; /* Longitude with adjustment for TIO locator s'. */ astrom->along = elong + sp; /* Polar motion, rotated onto the local meridian. */ sl = sin(astrom->along); cl = cos(astrom->along); astrom->xpl = xp*cl - yp*sl; astrom->ypl = xp*sl + yp*cl; /* Functions of latitude. */ astrom->sphi = sin(phi); astrom->cphi = cos(phi); /* Refraction constants. */ astrom->refa = refa; astrom->refb = refb; /* Local Earth rotation angle. */ eraAper(theta, astrom); /* Disable the (redundant) diurnal aberration step. */ astrom->diurab = 0.0; /* CIO based BPN matrix. */ eraC2ixys(x, y, s, r); /* Observer's geocentric position and velocity (m, m/s, CIRS). */ eraPvtob(elong, phi, hm, xp, yp, sp, theta, pvc); /* Rotate into GCRS. */ eraTrxpv(r, pvc, pv); /* ICRS <-> GCRS parameters. */ eraApcs(date1, date2, pv, ebpv, ehp, astrom); /* Store the CIO based BPN matrix. */ eraCr(r, astrom->bpn ); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/gmst06.c0000644001134200020070000001340012640262015017764 0ustar embrayscience00000000000000#include "erfa.h" double eraGmst06(double uta, double utb, double tta, double ttb) /* ** - - - - - - - - - - ** e r a G m s t 0 6 ** - - - - - - - - - - ** ** Greenwich mean sidereal time (consistent with IAU 2006 precession). ** ** Given: ** uta,utb double UT1 as a 2-part Julian Date (Notes 1,2) ** tta,ttb double TT as a 2-part Julian Date (Notes 1,2) ** ** Returned (function value): ** double Greenwich mean sidereal time (radians) ** ** Notes: ** ** 1) The UT1 and TT dates uta+utb and tta+ttb respectively, are both ** Julian Dates, apportioned in any convenient way between the ** argument pairs. For example, JD=2450123.7 could be expressed in ** any of these ways, among others: ** ** Part A Part B ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable (in the case of UT; the TT is not at all critical ** in this respect). The J2000 and MJD methods are good compromises ** between resolution and convenience. For UT, the date & time ** method is best matched to the algorithm that is used by the Earth ** rotation angle function, called internally: maximum precision is ** delivered when the uta argument is for 0hrs UT1 on the day in ** question and the utb argument lies in the range 0 to 1, or vice ** versa. ** ** 2) Both UT1 and TT are required, UT1 to predict the Earth rotation ** and TT to predict the effects of precession. If UT1 is used for ** both purposes, errors of order 100 microarcseconds result. ** ** 3) This GMST is compatible with the IAU 2006 precession and must not ** be used with other precession models. ** ** 4) The result is returned in the range 0 to 2pi. ** ** Called: ** eraEra00 Earth rotation angle, IAU 2000 ** eraAnp normalize angle into range 0 to 2pi ** ** Reference: ** ** Capitaine, N., Wallace, P.T. & Chapront, J., 2005, ** Astron.Astrophys. 432, 355 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t, gmst; /* TT Julian centuries since J2000.0. */ t = ((tta - ERFA_DJ00) + ttb) / ERFA_DJC; /* Greenwich mean sidereal time, IAU 2006. */ gmst = eraAnp(eraEra00(uta, utb) + ( 0.014506 + ( 4612.156534 + ( 1.3915817 + ( -0.00000044 + ( -0.000029956 + ( -0.0000000368 ) * t) * t) * t) * t) * t) * ERFA_DAS2R); return gmst; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pmat06.c0000644001134200020070000001214212640262015017755 0ustar embrayscience00000000000000#include "erfa.h" void eraPmat06(double date1, double date2, double rbp[3][3]) /* ** - - - - - - - - - - ** e r a P m a t 0 6 ** - - - - - - - - - - ** ** Precession matrix (including frame bias) from GCRS to a specified ** date, IAU 2006 model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** rbp double[3][3] bias-precession matrix (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix operates in the sense V(date) = rbp * V(GCRS), where ** the p-vector V(GCRS) is with respect to the Geocentric Celestial ** Reference System (IAU, 2000) and the p-vector V(date) is with ** respect to the mean equatorial triad of the given date. ** ** Called: ** eraPfw06 bias-precession F-W angles, IAU 2006 ** eraFw2m F-W angles to r-matrix ** ** References: ** ** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 ** ** Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double gamb, phib, psib, epsa; /* Bias-precession Fukushima-Williams angles. */ eraPfw06(date1, date2, &gamb, &phib, &psib, &epsa); /* Form the matrix. */ eraFw2m(gamb, phib, psib, epsa, rbp); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/gmst82.c0000644001134200020070000001423412640262015017776 0ustar embrayscience00000000000000#include "erfa.h" double eraGmst82(double dj1, double dj2) /* ** - - - - - - - - - - ** e r a G m s t 8 2 ** - - - - - - - - - - ** ** Universal Time to Greenwich mean sidereal time (IAU 1982 model). ** ** Given: ** dj1,dj2 double UT1 Julian Date (see note) ** ** Returned (function value): ** double Greenwich mean sidereal time (radians) ** ** Notes: ** ** 1) The UT1 date dj1+dj2 is a Julian Date, apportioned in any ** convenient way between the arguments dj1 and dj2. For example, ** JD(UT1)=2450123.7 could be expressed in any of these ways, ** among others: ** ** dj1 dj2 ** ** 2450123.7 0 (JD method) ** 2451545 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 and MJD methods are good compromises ** between resolution and convenience. The date & time method is ** best matched to the algorithm used: maximum accuracy (or, at ** least, minimum noise) is delivered when the dj1 argument is for ** 0hrs UT1 on the day in question and the dj2 argument lies in the ** range 0 to 1, or vice versa. ** ** 2) The algorithm is based on the IAU 1982 expression. This is ** always described as giving the GMST at 0 hours UT1. In fact, it ** gives the difference between the GMST and the UT, the steady ** 4-minutes-per-day drawing-ahead of ST with respect to UT. When ** whole days are ignored, the expression happens to equal the GMST ** at 0 hours UT1 each day. ** ** 3) In this function, the entire UT1 (the sum of the two arguments ** dj1 and dj2) is used directly as the argument for the standard ** formula, the constant term of which is adjusted by 12 hours to ** take account of the noon phasing of Julian Date. The UT1 is then ** added, but omitting whole days to conserve accuracy. ** ** Called: ** eraAnp normalize angle into range 0 to 2pi ** ** References: ** ** Transactions of the International Astronomical Union, ** XVIII B, 67 (1983). ** ** Aoki et al., Astron. Astrophys. 105, 359-361 (1982). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Coefficients of IAU 1982 GMST-UT1 model */ double A = 24110.54841 - ERFA_DAYSEC / 2.0; double B = 8640184.812866; double C = 0.093104; double D = -6.2e-6; /* Note: the first constant, A, has to be adjusted by 12 hours */ /* because the UT1 is supplied as a Julian date, which begins */ /* at noon. */ double d1, d2, t, f, gmst; /* Julian centuries since fundamental epoch. */ if (dj1 < dj2) { d1 = dj1; d2 = dj2; } else { d1 = dj2; d2 = dj1; } t = (d1 + (d2 - ERFA_DJ00)) / ERFA_DJC; /* Fractional part of JD(UT1), in seconds. */ f = ERFA_DAYSEC * (fmod(d1, 1.0) + fmod(d2, 1.0)); /* GMST at this UT1. */ gmst = eraAnp(ERFA_DS2R * ((A + (B + (C + D * t) * t) * t) + f)); return gmst; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/rx.c0000644001134200020070000001035012640262015017276 0ustar embrayscience00000000000000#include "erfa.h" void eraRx(double phi, double r[3][3]) /* ** - - - - - - ** e r a R x ** - - - - - - ** ** Rotate an r-matrix about the x-axis. ** ** Given: ** phi double angle (radians) ** ** Given and returned: ** r double[3][3] r-matrix, rotated ** ** Notes: ** ** 1) Calling this function with positive phi incorporates in the ** supplied r-matrix r an additional rotation, about the x-axis, ** anticlockwise as seen looking towards the origin from positive x. ** ** 2) The additional rotation can be represented by this matrix: ** ** ( 1 0 0 ) ** ( ) ** ( 0 + cos(phi) + sin(phi) ) ** ( ) ** ( 0 - sin(phi) + cos(phi) ) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double s, c, a10, a11, a12, a20, a21, a22; s = sin(phi); c = cos(phi); a10 = c*r[1][0] + s*r[2][0]; a11 = c*r[1][1] + s*r[2][1]; a12 = c*r[1][2] + s*r[2][2]; a20 = - s*r[1][0] + c*r[2][0]; a21 = - s*r[1][1] + c*r[2][1]; a22 = - s*r[1][2] + c*r[2][2]; r[1][0] = a10; r[1][1] = a11; r[1][2] = a12; r[2][0] = a20; r[2][1] = a21; r[2][2] = a22; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/cr.c0000644001134200020070000000665112640262015017262 0ustar embrayscience00000000000000#include "erfa.h" void eraCr(double r[3][3], double c[3][3]) /* ** - - - - - - ** e r a C r ** - - - - - - ** ** Copy an r-matrix. ** ** Given: ** r double[3][3] r-matrix to be copied ** ** Returned: ** char[] double[3][3] copy ** ** Called: ** eraCp copy p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraCp(r[0], c[0]); eraCp(r[1], c[1]); eraCp(r[2], c[2]); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/apci.c0000644001134200020070000002000712640262015017561 0ustar embrayscience00000000000000#include "erfa.h" void eraApci(double date1, double date2, double ebpv[2][3], double ehp[3], double x, double y, double s, eraASTROM *astrom) /* ** - - - - - - - - ** e r a A p c i ** - - - - - - - - ** ** For a terrestrial observer, prepare star-independent astrometry ** parameters for transformations between ICRS and geocentric CIRS ** coordinates. The Earth ephemeris and CIP/CIO are supplied by the ** caller. ** ** The parameters produced by this function are required in the ** parallax, light deflection, aberration, and bias-precession-nutation ** parts of the astrometric transformation chain. ** ** Given: ** date1 double TDB as a 2-part... ** date2 double ...Julian Date (Note 1) ** ebpv double[2][3] Earth barycentric position/velocity (au, au/day) ** ehp double[3] Earth heliocentric position (au) ** x,y double CIP X,Y (components of unit vector) ** s double the CIO locator s (radians) ** ** Returned: ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double unchanged ** xpl double unchanged ** ypl double unchanged ** sphi double unchanged ** cphi double unchanged ** diurab double unchanged ** eral double unchanged ** refa double unchanged ** refb double unchanged ** ** Notes: ** ** 1) The TDB date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TDB)=2450123.7 could be expressed in any of these ways, among ** others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 method is best matched to the way the ** argument is handled internally and will deliver the optimum ** resolution. The MJD method and the date & time methods are both ** good compromises between resolution and convenience. For most ** applications of this function the choice will not be at all ** critical. ** ** TT can be used instead of TDB without any significant impact on ** accuracy. ** ** 2) All the vectors are with respect to BCRS axes. ** ** 3) In cases where the caller does not wish to provide the Earth ** ephemeris and CIP/CIO, the function eraApci13 can be used instead ** of the present function. This computes the required quantities ** using other ERFA functions. ** ** 4) This is one of several functions that inserts into the astrom ** structure star-independent parameters needed for the chain of ** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. ** ** The various functions support different classes of observer and ** portions of the transformation chain: ** ** functions observer transformation ** ** eraApcg eraApcg13 geocentric ICRS <-> GCRS ** eraApci eraApci13 terrestrial ICRS <-> CIRS ** eraApco eraApco13 terrestrial ICRS <-> observed ** eraApcs eraApcs13 space ICRS <-> GCRS ** eraAper eraAper13 terrestrial update Earth rotation ** eraApio eraApio13 terrestrial CIRS <-> observed ** ** Those with names ending in "13" use contemporary ERFA models to ** compute the various ephemerides. The others accept ephemerides ** supplied by the caller. ** ** The transformation from ICRS to GCRS covers space motion, ** parallax, light deflection, and aberration. From GCRS to CIRS ** comprises frame bias and precession-nutation. From CIRS to ** observed takes account of Earth rotation, polar motion, diurnal ** aberration and parallax (unless subsumed into the ICRS <-> GCRS ** transformation), and atmospheric refraction. ** ** 5) The context structure astrom produced by this function is used by ** eraAtciq* and eraAticq*. ** ** Called: ** eraApcg astrometry parameters, ICRS-GCRS, geocenter ** eraC2ixys celestial-to-intermediate matrix, given X,Y and s ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Star-independent astrometry parameters for geocenter. */ eraApcg(date1, date2, ebpv, ehp, astrom); /* CIO based BPN matrix. */ eraC2ixys(x, y, s, astrom->bpn); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/falp03.c0000644001134200020070000001032012640262015017727 0ustar embrayscience00000000000000#include "erfa.h" double eraFalp03(double t) /* ** - - - - - - - - - - ** e r a F a l p 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean anomaly of the Sun. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double l', radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003) and ** is from Simon et al. (1994). ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* Mean anomaly of the Sun (IERS Conventions 2003). */ a = fmod( 1287104.793048 + t * ( 129596581.0481 + t * ( - 0.5532 + t * ( 0.000136 + t * ( - 0.00001149 ) ) ) ), ERFA_TURNAS ) * ERFA_DAS2R; return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/s2xpv.c0000644001134200020070000000733412640262015017737 0ustar embrayscience00000000000000#include "erfa.h" void eraS2xpv(double s1, double s2, double pv[2][3], double spv[2][3]) /* ** - - - - - - - - - ** e r a S 2 x p v ** - - - - - - - - - ** ** Multiply a pv-vector by two scalars. ** ** Given: ** s1 double scalar to multiply position component by ** s2 double scalar to multiply velocity component by ** pv double[2][3] pv-vector ** ** Returned: ** spv double[2][3] pv-vector: p scaled by s1, v scaled by s2 ** ** Note: ** It is permissible for pv and spv to be the same array. ** ** Called: ** eraSxp multiply p-vector by scalar ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraSxp(s1, pv[0], spv[0]); eraSxp(s2, pv[1], spv[1]); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/apcg13.c0000644001134200020070000001720212640262015017726 0ustar embrayscience00000000000000#include "erfa.h" void eraApcg13(double date1, double date2, eraASTROM *astrom) /* ** - - - - - - - - - - ** e r a A p c g 1 3 ** - - - - - - - - - - ** ** For a geocentric observer, prepare star-independent astrometry ** parameters for transformations between ICRS and GCRS coordinates. ** The caller supplies the date, and ERFA models are used to predict ** the Earth ephemeris. ** ** The parameters produced by this function are required in the ** parallax, light deflection and aberration parts of the astrometric ** transformation chain. ** ** Given: ** date1 double TDB as a 2-part... ** date2 double ...Julian Date (Note 1) ** ** Returned: ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double unchanged ** xpl double unchanged ** ypl double unchanged ** sphi double unchanged ** cphi double unchanged ** diurab double unchanged ** eral double unchanged ** refa double unchanged ** refb double unchanged ** ** Notes: ** ** 1) The TDB date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TDB)=2450123.7 could be expressed in any of these ways, among ** others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 method is best matched to the way the ** argument is handled internally and will deliver the optimum ** resolution. The MJD method and the date & time methods are both ** good compromises between resolution and convenience. For most ** applications of this function the choice will not be at all ** critical. ** ** TT can be used instead of TDB without any significant impact on ** accuracy. ** ** 2) All the vectors are with respect to BCRS axes. ** ** 3) In cases where the caller wishes to supply his own Earth ** ephemeris, the function eraApcg can be used instead of the present ** function. ** ** 4) This is one of several functions that inserts into the astrom ** structure star-independent parameters needed for the chain of ** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. ** ** The various functions support different classes of observer and ** portions of the transformation chain: ** ** functions observer transformation ** ** eraApcg eraApcg13 geocentric ICRS <-> GCRS ** eraApci eraApci13 terrestrial ICRS <-> CIRS ** eraApco eraApco13 terrestrial ICRS <-> observed ** eraApcs eraApcs13 space ICRS <-> GCRS ** eraAper eraAper13 terrestrial update Earth rotation ** eraApio eraApio13 terrestrial CIRS <-> observed ** ** Those with names ending in "13" use contemporary ERFA models to ** compute the various ephemerides. The others accept ephemerides ** supplied by the caller. ** ** The transformation from ICRS to GCRS covers space motion, ** parallax, light deflection, and aberration. From GCRS to CIRS ** comprises frame bias and precession-nutation. From CIRS to ** observed takes account of Earth rotation, polar motion, diurnal ** aberration and parallax (unless subsumed into the ICRS <-> GCRS ** transformation), and atmospheric refraction. ** ** 5) The context structure astrom produced by this function is used by ** eraAtciq* and eraAticq*. ** ** Called: ** eraEpv00 Earth position and velocity ** eraApcg astrometry parameters, ICRS-GCRS, geocenter ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double ehpv[2][3], ebpv[2][3]; /* Earth barycentric & heliocentric position/velocity (au, au/d). */ (void) eraEpv00(date1, date2, ehpv, ebpv); /* Compute the star-independent astrometry parameters. */ eraApcg(date1, date2, ebpv, ehpv[0], astrom); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/xys06a.c0000644001134200020070000001272712640262015020011 0ustar embrayscience00000000000000#include "erfa.h" void eraXys06a(double date1, double date2, double *x, double *y, double *s) /* ** - - - - - - - - - - ** e r a X y s 0 6 a ** - - - - - - - - - - ** ** For a given TT date, compute the X,Y coordinates of the Celestial ** Intermediate Pole and the CIO locator s, using the IAU 2006 ** precession and IAU 2000A nutation models. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** x,y double Celestial Intermediate Pole (Note 2) ** s double the CIO locator s (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The Celestial Intermediate Pole coordinates are the x,y components ** of the unit vector in the Geocentric Celestial Reference System. ** ** 3) The CIO locator s (in radians) positions the Celestial ** Intermediate Origin on the equator of the CIP. ** ** 4) Series-based solutions for generating X and Y are also available: ** see Capitaine & Wallace (2006) and eraXy06. ** ** Called: ** eraPnm06a classical NPB matrix, IAU 2006/2000A ** eraBpn2xy extract CIP X,Y coordinates from NPB matrix ** eraS06 the CIO locator s, given X,Y, IAU 2006 ** ** References: ** ** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 ** ** Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rbpn[3][3]; /* Form the bias-precession-nutation matrix, IAU 2006/2000A. */ eraPnm06a(date1, date2, rbpn); /* Extract X,Y. */ eraBpn2xy(rbpn, x, y); /* Obtain s. */ *s = eraS06(date1, date2, *x, *y); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/aper13.c0000644001134200020070000001707112640262015017747 0ustar embrayscience00000000000000#include "erfa.h" void eraAper13(double ut11, double ut12, eraASTROM *astrom) /* ** - - - - - - - - - - ** e r a A p e r 1 3 ** - - - - - - - - - - ** ** In the star-independent astrometry parameters, update only the ** Earth rotation angle. The caller provides UT1, (n.b. not UTC). ** ** Given: ** ut11 double UT1 as a 2-part... ** ut12 double ...Julian Date (Note 1) ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double not used ** eb double[3] not used ** eh double[3] not used ** em double not used ** v double[3] not used ** bm1 double not used ** bpn double[3][3] not used ** along double longitude + s' (radians) ** xpl double not used ** ypl double not used ** sphi double not used ** cphi double not used ** diurab double not used ** eral double not used ** refa double not used ** refb double not used ** ** Returned: ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double unchanged ** eb double[3] unchanged ** eh double[3] unchanged ** em double unchanged ** v double[3] unchanged ** bm1 double unchanged ** bpn double[3][3] unchanged ** along double unchanged ** xpl double unchanged ** ypl double unchanged ** sphi double unchanged ** cphi double unchanged ** diurab double unchanged ** eral double "local" Earth rotation angle (radians) ** refa double unchanged ** refb double unchanged ** ** Notes: ** ** 1) The UT1 date (n.b. not UTC) ut11+ut12 is a Julian Date, ** apportioned in any convenient way between the arguments ut11 and ** ut12. For example, JD(UT1)=2450123.7 could be expressed in any ** of these ways, among others: ** ** ut11 ut12 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 and MJD methods are good compromises ** between resolution and convenience. The date & time method is ** best matched to the algorithm used: maximum precision is ** delivered when the ut11 argument is for 0hrs UT1 on the day in ** question and the ut12 argument lies in the range 0 to 1, or vice ** versa. ** ** 2) If the caller wishes to provide the Earth rotation angle itself, ** the function eraAper can be used instead. One use of this ** technique is to substitute Greenwich apparent sidereal time and ** thereby to support equinox based transformations directly. ** ** 3) This is one of several functions that inserts into the astrom ** structure star-independent parameters needed for the chain of ** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. ** ** The various functions support different classes of observer and ** portions of the transformation chain: ** ** functions observer transformation ** ** eraApcg eraApcg13 geocentric ICRS <-> GCRS ** eraApci eraApci13 terrestrial ICRS <-> CIRS ** eraApco eraApco13 terrestrial ICRS <-> observed ** eraApcs eraApcs13 space ICRS <-> GCRS ** eraAper eraAper13 terrestrial update Earth rotation ** eraApio eraApio13 terrestrial CIRS <-> observed ** ** Those with names ending in "13" use contemporary ERFA models to ** compute the various ephemerides. The others accept ephemerides ** supplied by the caller. ** ** The transformation from ICRS to GCRS covers space motion, ** parallax, light deflection, and aberration. From GCRS to CIRS ** comprises frame bias and precession-nutation. From CIRS to ** observed takes account of Earth rotation, polar motion, diurnal ** aberration and parallax (unless subsumed into the ICRS <-> GCRS ** transformation), and atmospheric refraction. ** ** Called: ** eraAper astrometry parameters: update ERA ** eraEra00 Earth rotation angle, IAU 2000 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraAper(eraEra00(ut11,ut12), astrom); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fad03.c0000644001134200020070000001035712640262015017551 0ustar embrayscience00000000000000#include "erfa.h" double eraFad03(double t) /* ** - - - - - - - - - ** e r a F a d 0 3 ** - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean elongation of the Moon from the Sun. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double D, radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003) and ** is from Simon et al. (1994). ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* Mean elongation of the Moon from the Sun (IERS Conventions 2003). */ a = fmod( 1072260.703692 + t * ( 1602961601.2090 + t * ( - 6.3706 + t * ( 0.006593 + t * ( - 0.00003169 ) ) ) ), ERFA_TURNAS ) * ERFA_DAS2R; return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/gst06.c0000644001134200020070000001366712640262015017626 0ustar embrayscience00000000000000#include "erfa.h" double eraGst06(double uta, double utb, double tta, double ttb, double rnpb[3][3]) /* ** - - - - - - - - - ** e r a G s t 0 6 ** - - - - - - - - - ** ** Greenwich apparent sidereal time, IAU 2006, given the NPB matrix. ** ** Given: ** uta,utb double UT1 as a 2-part Julian Date (Notes 1,2) ** tta,ttb double TT as a 2-part Julian Date (Notes 1,2) ** rnpb double[3][3] nutation x precession x bias matrix ** ** Returned (function value): ** double Greenwich apparent sidereal time (radians) ** ** Notes: ** ** 1) The UT1 and TT dates uta+utb and tta+ttb respectively, are both ** Julian Dates, apportioned in any convenient way between the ** argument pairs. For example, JD=2450123.7 could be expressed in ** any of these ways, among others: ** ** Part A Part B ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable (in the case of UT; the TT is not at all critical ** in this respect). The J2000 and MJD methods are good compromises ** between resolution and convenience. For UT, the date & time ** method is best matched to the algorithm that is used by the Earth ** rotation angle function, called internally: maximum precision is ** delivered when the uta argument is for 0hrs UT1 on the day in ** question and the utb argument lies in the range 0 to 1, or vice ** versa. ** ** 2) Both UT1 and TT are required, UT1 to predict the Earth rotation ** and TT to predict the effects of precession-nutation. If UT1 is ** used for both purposes, errors of order 100 microarcseconds ** result. ** ** 3) Although the function uses the IAU 2006 series for s+XY/2, it is ** otherwise independent of the precession-nutation model and can in ** practice be used with any equinox-based NPB matrix. ** ** 4) The result is returned in the range 0 to 2pi. ** ** Called: ** eraBpn2xy extract CIP X,Y coordinates from NPB matrix ** eraS06 the CIO locator s, given X,Y, IAU 2006 ** eraAnp normalize angle into range 0 to 2pi ** eraEra00 Earth rotation angle, IAU 2000 ** eraEors equation of the origins, given NPB matrix and s ** ** Reference: ** ** Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double x, y, s, era, eors, gst; /* Extract CIP coordinates. */ eraBpn2xy(rnpb, &x, &y); /* The CIO locator, s. */ s = eraS06(tta, ttb, x, y); /* Greenwich apparent sidereal time. */ era = eraEra00(uta, utb); eors = eraEors(rnpb, s); gst = eraAnp(era - eors); return gst; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/atco13.c0000644001134200020070000002540212640262015017743 0ustar embrayscience00000000000000#include "erfa.h" int eraAtco13(double rc, double dc, double pr, double pd, double px, double rv, double utc1, double utc2, double dut1, double elong, double phi, double hm, double xp, double yp, double phpa, double tc, double rh, double wl, double *aob, double *zob, double *hob, double *dob, double *rob, double *eo) /* ** - - - - - - - - - - ** e r a A t c o 1 3 ** - - - - - - - - - - ** ** ICRS RA,Dec to observed place. The caller supplies UTC, site ** coordinates, ambient air conditions and observing wavelength. ** ** ERFA models are used for the Earth ephemeris, bias-precession- ** nutation, Earth orientation and refraction. ** ** Given: ** rc,dc double ICRS right ascension at J2000.0 (radians, Note 1) ** pr double RA proper motion (radians/year; Note 2) ** pd double Dec proper motion (radians/year) ** px double parallax (arcsec) ** rv double radial velocity (km/s, +ve if receding) ** utc1 double UTC as a 2-part... ** utc2 double ...quasi Julian Date (Notes 3-4) ** dut1 double UT1-UTC (seconds, Note 5) ** elong double longitude (radians, east +ve, Note 6) ** phi double latitude (geodetic, radians, Note 6) ** hm double height above ellipsoid (m, geodetic, Notes 6,8) ** xp,yp double polar motion coordinates (radians, Note 7) ** phpa double pressure at the observer (hPa = mB, Note 8) ** tc double ambient temperature at the observer (deg C) ** rh double relative humidity at the observer (range 0-1) ** wl double wavelength (micrometers, Note 9) ** ** Returned: ** aob double* observed azimuth (radians: N=0,E=90) ** zob double* observed zenith distance (radians) ** hob double* observed hour angle (radians) ** dob double* observed declination (radians) ** rob double* observed right ascension (CIO-based, radians) ** eo double* equation of the origins (ERA-GST) ** ** Returned (function value): ** int status: +1 = dubious year (Note 4) ** 0 = OK ** -1 = unacceptable date ** ** Notes: ** ** 1) Star data for an epoch other than J2000.0 (for example from the ** Hipparcos catalog, which has an epoch of J1991.25) will require ** a preliminary call to eraPmsafe before use. ** ** 2) The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. ** ** 3) utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any ** convenient way between the two arguments, for example where utc1 ** is the Julian Day Number and utc2 is the fraction of a day. ** ** However, JD cannot unambiguously represent UTC during a leap ** second unless special measures are taken. The convention in the ** present function is that the JD day represents UTC days whether ** the length is 86399, 86400 or 86401 SI seconds. ** ** Applications should use the function eraDtf2d to convert from ** calendar date and time of day into 2-part quasi Julian Date, as ** it implements the leap-second-ambiguity convention just ** described. ** ** 4) The warning status "dubious year" flags UTCs that predate the ** introduction of the time scale or that are too far in the ** future to be trusted. See eraDat for further details. ** ** 5) UT1-UTC is tabulated in IERS bulletins. It increases by exactly ** one second at the end of each positive UTC leap second, ** introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This ** practice is under review, and in the future UT1-UTC may grow ** essentially without limit. ** ** 6) The geographical coordinates are with respect to the ERFA_WGS84 ** reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the ** longitude required by the present function is east-positive ** (i.e. right-handed), in accordance with geographical convention. ** ** 7) The polar motion xp,yp can be obtained from IERS bulletins. The ** values are the coordinates (in radians) of the Celestial ** Intermediate Pole with respect to the International Terrestrial ** Reference System (see IERS Conventions 2003), measured along the ** meridians 0 and 90 deg west respectively. For many ** applications, xp and yp can be set to zero. ** ** 8) If hm, the height above the ellipsoid of the observing station ** in meters, is not known but phpa, the pressure in hPa (=mB), ** is available, an adequate estimate of hm can be obtained from ** the expression ** ** hm = -29.3 * tsl * log ( phpa / 1013.25 ); ** ** where tsl is the approximate sea-level air temperature in K ** (See Astrophysical Quantities, C.W.Allen, 3rd edition, section ** 52). Similarly, if the pressure phpa is not known, it can be ** estimated from the height of the observing station, hm, as ** follows: ** ** phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) ); ** ** Note, however, that the refraction is nearly proportional to ** the pressure and that an accurate phpa value is important for ** precise work. ** ** 9) The argument wl specifies the observing wavelength in ** micrometers. The transition from optical to radio is assumed to ** occur at 100 micrometers (about 3000 GHz). ** ** 10) The accuracy of the result is limited by the corrections for ** refraction, which use a simple A*tan(z) + B*tan^3(z) model. ** Providing the meteorological parameters are known accurately and ** there are no gross local effects, the predicted observed ** coordinates should be within 0.05 arcsec (optical) or 1 arcsec ** (radio) for a zenith distance of less than 70 degrees, better ** than 30 arcsec (optical or radio) at 85 degrees and better ** than 20 arcmin (optical) or 30 arcmin (radio) at the horizon. ** ** Without refraction, the complementary functions eraAtco13 and ** eraAtoc13 are self-consistent to better than 1 microarcsecond ** all over the celestial sphere. With refraction included, ** consistency falls off at high zenith distances, but is still ** better than 0.05 arcsec at 85 degrees. ** ** 11) "Observed" Az,ZD means the position that would be seen by a ** perfect geodetically aligned theodolite. (Zenith distance is ** used rather than altitude in order to reflect the fact that no ** allowance is made for depression of the horizon.) This is ** related to the observed HA,Dec via the standard rotation, using ** the geodetic latitude (corrected for polar motion), while the ** observed HA and RA are related simply through the Earth rotation ** angle and the site longitude. "Observed" RA,Dec or HA,Dec thus ** means the position that would be seen by a perfect equatorial ** with its polar axis aligned to the Earth's axis of rotation. ** ** 12) It is advisable to take great care with units, as even unlikely ** values of the input parameters are accepted and processed in ** accordance with the models used. ** ** Called: ** eraApco13 astrometry parameters, ICRS-observed, 2013 ** eraAtciq quick ICRS to CIRS ** eraAtioq quick ICRS to observed ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int j; eraASTROM astrom; double ri, di; /* Star-independent astrometry parameters. */ j = eraApco13(utc1, utc2, dut1, elong, phi, hm, xp, yp, phpa, tc, rh, wl, &astrom, eo); /* Abort if bad UTC. */ if ( j < 0 ) return j; /* Transform ICRS to CIRS. */ eraAtciq(rc, dc, pr, pd, px, rv, &astrom, &ri, &di); /* Transform CIRS to observed. */ eraAtioq(ri, di, &astrom, aob, zob, hob, dob, rob); /* Return OK/warning status. */ return j; /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fw2xy.c0000644001134200020070000001110612640262015017724 0ustar embrayscience00000000000000#include "erfa.h" void eraFw2xy(double gamb, double phib, double psi, double eps, double *x, double *y) /* ** - - - - - - - - - ** e r a F w 2 x y ** - - - - - - - - - ** ** CIP X,Y given Fukushima-Williams bias-precession-nutation angles. ** ** Given: ** gamb double F-W angle gamma_bar (radians) ** phib double F-W angle phi_bar (radians) ** psi double F-W angle psi (radians) ** eps double F-W angle epsilon (radians) ** ** Returned: ** x,y double CIP unit vector X,Y ** ** Notes: ** ** 1) Naming the following points: ** ** e = J2000.0 ecliptic pole, ** p = GCRS pole ** E = ecliptic pole of date, ** and P = CIP, ** ** the four Fukushima-Williams angles are as follows: ** ** gamb = gamma = epE ** phib = phi = pE ** psi = psi = pEP ** eps = epsilon = EP ** ** 2) The matrix representing the combined effects of frame bias, ** precession and nutation is: ** ** NxPxB = R_1(-epsA).R_3(-psi).R_1(phib).R_3(gamb) ** ** The returned values x,y are elements [2][0] and [2][1] of the ** matrix. Near J2000.0, they are essentially angles in radians. ** ** Called: ** eraFw2m F-W angles to r-matrix ** eraBpn2xy extract CIP X,Y coordinates from NPB matrix ** ** Reference: ** ** Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double r[3][3]; /* Form NxPxB matrix. */ eraFw2m(gamb, phib, psi, eps, r); /* Extract CIP X,Y. */ eraBpn2xy(r, x, y); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pn.c0000644001134200020070000000766012640262015017274 0ustar embrayscience00000000000000#include "erfa.h" void eraPn(double p[3], double *r, double u[3]) /* ** - - - - - - ** e r a P n ** - - - - - - ** ** Convert a p-vector into modulus and unit vector. ** ** Given: ** p double[3] p-vector ** ** Returned: ** r double modulus ** u double[3] unit vector ** ** Notes: ** ** 1) If p is null, the result is null. Otherwise the result is a unit ** vector. ** ** 2) It is permissible to re-use the same array for any of the ** arguments. ** ** Called: ** eraPm modulus of p-vector ** eraZp zero p-vector ** eraSxp multiply p-vector by scalar ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double w; /* Obtain the modulus and test for zero. */ w = eraPm(p); if (w == 0.0) { /* Null vector. */ eraZp(u); } else { /* Unit vector. */ eraSxp(1.0/w, p, u); } /* Return the modulus. */ *r = w; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/s2pv.c0000644001134200020070000001007512640262015017543 0ustar embrayscience00000000000000#include "erfa.h" void eraS2pv(double theta, double phi, double r, double td, double pd, double rd, double pv[2][3]) /* ** - - - - - - - - ** e r a S 2 p v ** - - - - - - - - ** ** Convert position/velocity from spherical to Cartesian coordinates. ** ** Given: ** theta double longitude angle (radians) ** phi double latitude angle (radians) ** r double radial distance ** td double rate of change of theta ** pd double rate of change of phi ** rd double rate of change of r ** ** Returned: ** pv double[2][3] pv-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double st, ct, sp, cp, rcp, x, y, rpd, w; st = sin(theta); ct = cos(theta); sp = sin(phi); cp = cos(phi); rcp = r * cp; x = rcp * ct; y = rcp * st; rpd = r * pd; w = rpd*sp - cp*rd; pv[0][0] = x; pv[0][1] = y; pv[0][2] = r * sp; pv[1][0] = -y*td - w*ct; pv[1][1] = x*td - w*st; pv[1][2] = rpd*cp + sp*rd; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/xy06.c0000644001134200020070000040220712640262015017461 0ustar embrayscience00000000000000#include "erfa.h" void eraXy06(double date1, double date2, double *x, double *y) /* ** - - - - - - - - ** e r a X y 0 6 ** - - - - - - - - ** ** X,Y coordinates of celestial intermediate pole from series based ** on IAU 2006 precession and IAU 2000A nutation. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** x,y double CIP X,Y coordinates (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The X,Y coordinates are those of the unit vector towards the ** celestial intermediate pole. They represent the combined effects ** of frame bias, precession and nutation. ** ** 3) The fundamental arguments used are as adopted in IERS Conventions ** (2003) and are from Simon et al. (1994) and Souchay et al. ** (1999). ** ** 4) This is an alternative to the angles-based method, via the ERFA ** function eraFw2xy and as used in eraXys06a for example. The two ** methods agree at the 1 microarcsecond level (at present), a ** negligible amount compared with the intrinsic accuracy of the ** models. However, it would be unwise to mix the two methods ** (angles-based and series-based) in a single application. ** ** Called: ** eraFal03 mean anomaly of the Moon ** eraFalp03 mean anomaly of the Sun ** eraFaf03 mean argument of the latitude of the Moon ** eraFad03 mean elongation of the Moon from the Sun ** eraFaom03 mean longitude of the Moon's ascending node ** eraFame03 mean longitude of Mercury ** eraFave03 mean longitude of Venus ** eraFae03 mean longitude of Earth ** eraFama03 mean longitude of Mars ** eraFaju03 mean longitude of Jupiter ** eraFasa03 mean longitude of Saturn ** eraFaur03 mean longitude of Uranus ** eraFane03 mean longitude of Neptune ** eraFapa03 general accumulated precession in longitude ** ** References: ** ** Capitaine, N., Wallace, P.T. & Chapront, J., 2003, ** Astron.Astrophys., 412, 567 ** ** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 ** ** McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003), ** IERS Technical Note No. 32, BKG ** ** Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G. & Laskar, J., Astron.Astrophys., 1994, 282, 663 ** ** Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M., 1999, ** Astron.Astrophys.Supp.Ser. 135, 111 ** ** Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Maximum power of T in the polynomials for X and Y */ enum { MAXPT = 5 }; /* Polynomial coefficients (arcsec, X then Y). */ static const double xyp[2][MAXPT+1] = { { -0.016617, 2004.191898, -0.4297829, -0.19861834, 0.000007578, 0.0000059285 }, { -0.006951, -0.025896, -22.4072747, 0.00190059, 0.001112526, 0.0000001358 } }; /* Fundamental-argument multipliers: luni-solar terms */ static const int mfals[][5] = { /* 1-10 */ { 0, 0, 0, 0, 1 }, { 0, 0, 2, -2, 2 }, { 0, 0, 2, 0, 2 }, { 0, 0, 0, 0, 2 }, { 0, 1, 0, 0, 0 }, { 0, 1, 2, -2, 2 }, { 1, 0, 0, 0, 0 }, { 0, 0, 2, 0, 1 }, { 1, 0, 2, 0, 2 }, { 0, 1, -2, 2, -2 }, /* 11-20 */ { 0, 0, 2, -2, 1 }, { 1, 0, -2, 0, -2 }, { 1, 0, 0, -2, 0 }, { 1, 0, 0, 0, 1 }, { 1, 0, 0, 0, -1 }, { 1, 0, -2, -2, -2 }, { 1, 0, 2, 0, 1 }, { 2, 0, -2, 0, -1 }, { 0, 0, 0, 2, 0 }, { 0, 0, 2, 2, 2 }, /* 21-30 */ { 2, 0, 0, -2, 0 }, { 0, 2, -2, 2, -2 }, { 2, 0, 2, 0, 2 }, { 1, 0, 2, -2, 2 }, { 1, 0, -2, 0, -1 }, { 2, 0, 0, 0, 0 }, { 0, 0, 2, 0, 0 }, { 0, 1, 0, 0, 1 }, { 1, 0, 0, -2, -1 }, { 0, 2, 2, -2, 2 }, /* 31-40 */ { 0, 0, 2, -2, 0 }, { 1, 0, 0, -2, 1 }, { 0, 1, 0, 0, -1 }, { 0, 2, 0, 0, 0 }, { 1, 0, -2, -2, -1 }, { 1, 0, 2, 2, 2 }, { 0, 1, 2, 0, 2 }, { 2, 0, -2, 0, 0 }, { 0, 0, 2, 2, 1 }, { 0, 1, -2, 0, -2 }, /* 41-50 */ { 0, 0, 0, 2, 1 }, { 1, 0, 2, -2, 1 }, { 2, 0, 0, -2, -1 }, { 2, 0, 2, -2, 2 }, { 2, 0, 2, 0, 1 }, { 0, 0, 0, 2, -1 }, { 0, 1, -2, 2, -1 }, { 1, 1, 0, -2, 0 }, { 2, 0, 0, -2, 1 }, { 1, 0, 0, 2, 0 }, /* 51-60 */ { 0, 1, 2, -2, 1 }, { 1, -1, 0, 0, 0 }, { 0, 1, -1, 1, -1 }, { 2, 0, -2, 0, -2 }, { 0, 1, 0, -2, 0 }, { 1, 0, 0, -1, 0 }, { 3, 0, 2, 0, 2 }, { 0, 0, 0, 1, 0 }, { 1, -1, 2, 0, 2 }, { 1, 1, -2, -2, -2 }, /* 61-70 */ { 1, 0, -2, 0, 0 }, { 2, 0, 0, 0, -1 }, { 0, 1, -2, -2, -2 }, { 1, 1, 2, 0, 2 }, { 2, 0, 0, 0, 1 }, { 1, 1, 0, 0, 0 }, { 1, 0, -2, 2, -1 }, { 1, 0, 2, 0, 0 }, { 1, -1, 0, -1, 0 }, { 1, 0, 0, 0, 2 }, /* 71-80 */ { 1, 0, -1, 0, -1 }, { 0, 0, 2, 1, 2 }, { 1, 0, -2, -4, -2 }, { 1, -1, 0, -1, -1 }, { 1, 0, 2, 2, 1 }, { 0, 2, -2, 2, -1 }, { 1, 0, 0, 0, -2 }, { 2, 0, -2, -2, -2 }, { 1, 1, 2, -2, 2 }, { 2, 0, -2, -4, -2 }, /* 81-90 */ { 1, 0, -4, 0, -2 }, { 2, 0, 2, -2, 1 }, { 1, 0, 0, -1, -1 }, { 2, 0, 2, 2, 2 }, { 3, 0, 0, 0, 0 }, { 1, 0, 0, 2, 1 }, { 0, 0, 2, -2, -1 }, { 3, 0, 2, -2, 2 }, { 0, 0, 4, -2, 2 }, { 1, 0, 0, -4, 0 }, /* 91-100 */ { 0, 1, 2, 0, 1 }, { 2, 0, 0, -4, 0 }, { 1, 1, 0, -2, -1 }, { 2, 0, -2, 0, 1 }, { 0, 0, 2, 0, -1 }, { 0, 1, -2, 0, -1 }, { 0, 1, 0, 0, 2 }, { 0, 0, 2, -1, 2 }, { 0, 0, 2, 4, 2 }, { 2, 1, 0, -2, 0 }, /* 101-110 */ { 1, 1, 0, -2, 1 }, { 1, -1, 0, -2, 0 }, { 1, -1, 0, -1, -2 }, { 1, -1, 0, 0, 1 }, { 0, 1, -2, 2, 0 }, { 0, 1, 0, 0, -2 }, { 1, -1, 2, 2, 2 }, { 1, 0, 0, 2, -1 }, { 1, -1, -2, -2, -2 }, { 3, 0, 2, 0, 1 }, /* 111-120 */ { 0, 1, 2, 2, 2 }, { 1, 0, 2, -2, 0 }, { 1, 1, -2, -2, -1 }, { 1, 0, 2, -4, 1 }, { 0, 1, -2, -2, -1 }, { 2, -1, 2, 0, 2 }, { 0, 0, 0, 2, 2 }, { 1, -1, 2, 0, 1 }, { 1, -1, -2, 0, -2 }, { 0, 1, 0, 2, 0 }, /* 121-130 */ { 0, 1, 2, -2, 0 }, { 0, 0, 0, 1, 1 }, { 1, 0, -2, -2, 0 }, { 0, 3, 2, -2, 2 }, { 2, 1, 2, 0, 2 }, { 1, 1, 0, 0, 1 }, { 2, 0, 0, 2, 0 }, { 1, 1, 2, 0, 1 }, { 1, 0, 0, -2, -2 }, { 1, 0, -2, 2, 0 }, /* 131-140 */ { 1, 0, -1, 0, -2 }, { 0, 1, 0, -2, 1 }, { 0, 1, 0, 1, 0 }, { 0, 0, 0, 1, -1 }, { 1, 0, -2, 2, -2 }, { 1, -1, 0, 0, -1 }, { 0, 0, 0, 4, 0 }, { 1, -1, 0, 2, 0 }, { 1, 0, 2, 1, 2 }, { 1, 0, 2, -1, 2 }, /* 141-150 */ { 0, 0, 2, 1, 1 }, { 1, 0, 0, -2, 2 }, { 1, 0, -2, 0, 1 }, { 1, 0, -2, -4, -1 }, { 0, 0, 2, 2, 0 }, { 1, 1, 2, -2, 1 }, { 1, 0, -2, 1, -1 }, { 0, 0, 1, 0, 1 }, { 2, 0, -2, -2, -1 }, { 4, 0, 2, 0, 2 }, /* 151-160 */ { 2, -1, 0, 0, 0 }, { 2, 1, 2, -2, 2 }, { 0, 1, 2, 1, 2 }, { 1, 0, 4, -2, 2 }, { 1, 1, 0, 0, -1 }, { 2, 0, 2, 0, 0 }, { 2, 0, -2, -4, -1 }, { 1, 0, -1, 0, 0 }, { 1, 0, 0, 1, 0 }, { 0, 1, 0, 2, 1 }, /* 161-170 */ { 1, 0, -4, 0, -1 }, { 1, 0, 0, -4, -1 }, { 2, 0, 2, 2, 1 }, { 2, 1, 0, 0, 0 }, { 0, 0, 2, -3, 2 }, { 1, 2, 0, -2, 0 }, { 0, 3, 0, 0, 0 }, { 0, 0, 4, 0, 2 }, { 0, 0, 2, -4, 1 }, { 2, 0, 0, -2, -2 }, /* 171-180 */ { 1, 1, -2, -4, -2 }, { 0, 1, 0, -2, -1 }, { 0, 0, 0, 4, 1 }, { 3, 0, 2, -2, 1 }, { 1, 0, 2, 4, 2 }, { 1, 1, -2, 0, -2 }, { 0, 0, 4, -2, 1 }, { 2, -2, 0, -2, 0 }, { 2, 1, 0, -2, -1 }, { 0, 2, 0, -2, 0 }, /* 181-190 */ { 1, 0, 0, -1, 1 }, { 1, 1, 2, 2, 2 }, { 3, 0, 0, 0, -1 }, { 2, 0, 0, -4, -1 }, { 3, 0, 2, 2, 2 }, { 0, 0, 2, 4, 1 }, { 0, 2, -2, -2, -2 }, { 1, -1, 0, -2, -1 }, { 0, 0, 2, -1, 1 }, { 2, 0, 0, 2, 1 }, /* 191-200 */ { 1, -1, -2, 2, -1 }, { 0, 0, 0, 2, -2 }, { 2, 0, 0, -4, 1 }, { 1, 0, 0, -4, 1 }, { 2, 0, 2, -4, 1 }, { 4, 0, 2, -2, 2 }, { 2, 1, -2, 0, -1 }, { 2, 1, -2, -4, -2 }, { 3, 0, 0, -4, 0 }, { 1, -1, 2, 2, 1 }, /* 201-210 */ { 1, -1, -2, 0, -1 }, { 0, 2, 0, 0, 1 }, { 1, 2, -2, -2, -2 }, { 1, 1, 0, -4, 0 }, { 2, 0, 0, -2, 2 }, { 0, 2, 2, -2, 1 }, { 1, 0, 2, 0, -1 }, { 2, 1, 0, -2, 1 }, { 2, -1, -2, 0, -1 }, { 1, -1, -2, -2, -1 }, /* 211-220 */ { 0, 1, -2, 1, -2 }, { 1, 0, -4, 2, -2 }, { 0, 1, 2, 2, 1 }, { 3, 0, 0, 0, 1 }, { 2, -1, 2, 2, 2 }, { 0, 1, -2, -4, -2 }, { 1, 0, -2, -3, -2 }, { 2, 0, 0, 0, 2 }, { 1, -1, 0, -2, -2 }, { 2, 0, -2, 2, -1 }, /* 221-230 */ { 0, 2, -2, 0, -2 }, { 3, 0, -2, 0, -1 }, { 2, -1, 2, 0, 1 }, { 1, 0, -2, -1, -2 }, { 0, 0, 2, 0, 3 }, { 2, 0, -4, 0, -2 }, { 2, 1, 0, -4, 0 }, { 1, 1, -2, 1, -1 }, { 0, 2, 2, 0, 2 }, { 1, -1, 2, -2, 2 }, /* 231-240 */ { 1, -1, 0, -2, 1 }, { 2, 1, 2, 0, 1 }, { 1, 0, 2, -4, 2 }, { 1, 1, -2, 0, -1 }, { 1, 1, 0, 2, 0 }, { 1, 0, 0, -3, 0 }, { 2, 0, 2, -1, 2 }, { 0, 2, 0, 0, -1 }, { 2, -1, 0, -2, 0 }, { 4, 0, 0, 0, 0 }, /* 241-250 */ { 2, 1, -2, -2, -2 }, { 0, 2, -2, 2, 0 }, { 1, 0, 2, 1, 1 }, { 1, 0, -1, 0, -3 }, { 3, -1, 2, 0, 2 }, { 2, 0, 2, -2, 0 }, { 1, -2, 0, 0, 0 }, { 2, 0, 0, 0, -2 }, { 1, 0, 0, 4, 0 }, { 0, 1, 0, 1, 1 }, /* 251-260 */ { 1, 0, 2, 2, 0 }, { 0, 1, 0, 2, -1 }, { 0, 1, 0, 1, -1 }, { 0, 0, 2, -2, 3 }, { 3, 1, 2, 0, 2 }, { 1, 1, 2, 1, 2 }, { 1, 1, -2, 2, -1 }, { 2, -1, 2, -2, 2 }, { 1, -2, 2, 0, 2 }, { 1, 0, 2, -4, 0 }, /* 261-270 */ { 0, 0, 1, 0, 0 }, { 1, 0, 2, -3, 1 }, { 1, -2, 0, -2, 0 }, { 2, 0, 0, 2, -1 }, { 1, 1, 2, -4, 1 }, { 4, 0, 2, 0, 1 }, { 0, 1, 2, 1, 1 }, { 1, 2, 2, -2, 2 }, { 2, 0, 2, 1, 2 }, { 2, 1, 2, -2, 1 }, /* 271-280 */ { 1, 0, 2, -1, 1 }, { 1, 0, 4, -2, 1 }, { 1, -1, 2, -2, 1 }, { 0, 1, 0, -4, 0 }, { 3, 0, -2, -2, -2 }, { 0, 0, 4, -4, 2 }, { 2, 0, -4, -2, -2 }, { 2, -2, 0, -2, -1 }, { 1, 0, 2, -2, -1 }, { 2, 0, -2, -6, -2 }, /* 281-290 */ { 1, 0, -2, 1, -2 }, { 1, 0, -2, 2, 1 }, { 1, -1, 0, 2, -1 }, { 1, 0, -2, 1, 0 }, { 2, -1, 0, -2, 1 }, { 1, -1, 0, 2, 1 }, { 2, 0, -2, -2, 0 }, { 1, 0, 2, -3, 2 }, { 0, 0, 0, 4, -1 }, { 2, -1, 0, 0, 1 }, /* 291-300 */ { 2, 0, 4, -2, 2 }, { 0, 0, 2, 3, 2 }, { 0, 1, 4, -2, 2 }, { 0, 1, -2, 2, 1 }, { 1, 1, 0, 2, 1 }, { 1, 0, 0, 4, 1 }, { 0, 0, 4, 0, 1 }, { 2, 0, 0, -3, 0 }, { 1, 0, 0, -1, -2 }, { 1, -2, -2, -2, -2 }, /* 301-310 */ { 3, 0, 0, 2, 0 }, { 2, 0, 2, -4, 2 }, { 1, 1, -2, -4, -1 }, { 1, 0, -2, -6, -2 }, { 2, -1, 0, 0, -1 }, { 2, -1, 0, 2, 0 }, { 0, 1, 2, -2, -1 }, { 1, 1, 0, 1, 0 }, { 1, 2, 0, -2, -1 }, { 1, 0, 0, 1, -1 }, /* 311-320 */ { 0, 0, 1, 0, 2 }, { 3, 1, 2, -2, 2 }, { 1, 0, -4, -2, -2 }, { 1, 0, 2, 4, 1 }, { 1, -2, 2, 2, 2 }, { 1, -1, -2, -4, -2 }, { 0, 0, 2, -4, 2 }, { 0, 0, 2, -3, 1 }, { 2, 1, -2, 0, 0 }, { 3, 0, -2, -2, -1 }, /* 321-330 */ { 2, 0, 2, 4, 2 }, { 0, 0, 0, 0, 3 }, { 2, -1, -2, -2, -2 }, { 2, 0, 0, -1, 0 }, { 3, 0, 2, -4, 2 }, { 2, 1, 2, 2, 2 }, { 0, 0, 3, 0, 3 }, { 1, 1, 2, 2, 1 }, { 2, 1, 0, 0, -1 }, { 1, 2, 0, -2, 1 }, /* 331-340 */ { 3, 0, 2, 2, 1 }, { 1, -1, -2, 2, -2 }, { 1, 1, 0, -1, 0 }, { 1, 2, 0, 0, 0 }, { 1, 0, 4, 0, 2 }, { 1, -1, 2, 4, 2 }, { 2, 1, 0, 0, 1 }, { 1, 0, 0, 2, 2 }, { 1, -1, -2, 2, 0 }, { 0, 2, -2, -2, -1 }, /* 341-350 */ { 2, 0, -2, 0, 2 }, { 5, 0, 2, 0, 2 }, { 3, 0, -2, -6, -2 }, { 1, -1, 2, -1, 2 }, { 3, 0, 0, -4, -1 }, { 1, 0, 0, 1, 1 }, { 1, 0, -4, 2, -1 }, { 0, 1, 2, -4, 1 }, { 1, 2, 2, 0, 2 }, { 0, 1, 0, -2, -2 }, /* 351-360 */ { 0, 0, 2, -1, 0 }, { 1, 0, 1, 0, 1 }, { 0, 2, 0, -2, 1 }, { 3, 0, 2, 0, 0 }, { 1, 1, -2, 1, 0 }, { 2, 1, -2, -4, -1 }, { 3, -1, 0, 0, 0 }, { 2, -1, -2, 0, 0 }, { 4, 0, 2, -2, 1 }, { 2, 0, -2, 2, 0 }, /* 361-370 */ { 1, 1, 2, -2, 0 }, { 1, 0, -2, 4, -1 }, { 1, 0, -2, -2, 1 }, { 2, 0, 2, -4, 0 }, { 1, 1, 0, -2, -2 }, { 1, 1, -2, -2, 0 }, { 1, 0, 1, -2, 1 }, { 2, -1, -2, -4, -2 }, { 3, 0, -2, 0, -2 }, { 0, 1, -2, -2, 0 }, /* 371-380 */ { 3, 0, 0, -2, -1 }, { 1, 0, -2, -3, -1 }, { 0, 1, 0, -4, -1 }, { 1, -2, 2, -2, 1 }, { 0, 1, -2, 1, -1 }, { 1, -1, 0, 0, 2 }, { 2, 0, 0, 1, 0 }, { 1, -2, 0, 2, 0 }, { 1, 2, -2, -2, -1 }, { 0, 0, 4, -4, 1 }, /* 381-390 */ { 0, 1, 2, 4, 2 }, { 0, 1, -4, 2, -2 }, { 3, 0, -2, 0, 0 }, { 2, -1, 2, 2, 1 }, { 0, 1, -2, -4, -1 }, { 4, 0, 2, 2, 2 }, { 2, 0, -2, -3, -2 }, { 2, 0, 0, -6, 0 }, { 1, 0, 2, 0, 3 }, { 3, 1, 0, 0, 0 }, /* 391-400 */ { 3, 0, 0, -4, 1 }, { 1, -1, 2, 0, 0 }, { 1, -1, 0, -4, 0 }, { 2, 0, -2, 2, -2 }, { 1, 1, 0, -2, 2 }, { 4, 0, 0, -2, 0 }, { 2, 2, 0, -2, 0 }, { 0, 1, 2, 0, 0 }, { 1, 1, 0, -4, 1 }, { 1, 0, 0, -4, -2 }, /* 401-410 */ { 0, 0, 0, 1, 2 }, { 3, 0, 0, 2, 1 }, { 1, 1, 0, -4, -1 }, { 0, 0, 2, 2, -1 }, { 1, 1, 2, 0, 0 }, { 1, -1, 2, -4, 1 }, { 1, 1, 0, 0, 2 }, { 0, 0, 2, 6, 2 }, { 4, 0, -2, -2, -1 }, { 2, 1, 0, -4, -1 }, /* 411-420 */ { 0, 0, 0, 3, 1 }, { 1, -1, -2, 0, 0 }, { 0, 0, 2, 1, 0 }, { 1, 0, 0, 2, -2 }, { 3, -1, 2, 2, 2 }, { 3, -1, 2, -2, 2 }, { 1, 0, 0, -1, 2 }, { 1, -2, 2, -2, 2 }, { 0, 1, 0, 2, 2 }, { 0, 1, -2, -1, -2 }, /* 421-430 */ { 1, 1, -2, 0, 0 }, { 0, 2, 2, -2, 0 }, { 3, -1, -2, -1, -2 }, { 1, 0, 0, -6, 0 }, { 1, 0, -2, -4, 0 }, { 2, 1, 0, -4, 1 }, { 2, 0, 2, 0, -1 }, { 2, 0, -4, 0, -1 }, { 0, 0, 3, 0, 2 }, { 2, 1, -2, -2, -1 }, /* 431-440 */ { 1, -2, 0, 0, 1 }, { 2, -1, 0, -4, 0 }, { 0, 0, 0, 3, 0 }, { 5, 0, 2, -2, 2 }, { 1, 2, -2, -4, -2 }, { 1, 0, 4, -4, 2 }, { 0, 0, 4, -1, 2 }, { 3, 1, 0, -4, 0 }, { 3, 0, 0, -6, 0 }, { 2, 0, 0, 2, 2 }, /* 441-450 */ { 2, -2, 2, 0, 2 }, { 1, 0, 0, -3, 1 }, { 1, -2, -2, 0, -2 }, { 1, -1, -2, -3, -2 }, { 0, 0, 2, -2, -2 }, { 2, 0, -2, -4, 0 }, { 1, 0, -4, 0, 0 }, { 0, 1, 0, -1, 0 }, { 4, 0, 0, 0, -1 }, { 3, 0, 2, -1, 2 }, /* 451-460 */ { 3, -1, 2, 0, 1 }, { 2, 0, 2, -1, 1 }, { 1, 2, 2, -2, 1 }, { 1, 1, 0, 2, -1 }, { 0, 2, 2, 0, 1 }, { 3, 1, 2, 0, 1 }, { 1, 1, 2, 1, 1 }, { 1, 1, 0, -1, 1 }, { 1, -2, 0, -2, -1 }, { 4, 0, 0, -4, 0 }, /* 461-470 */ { 2, 1, 0, 2, 0 }, { 1, -1, 0, 4, 0 }, { 0, 1, 0, -2, 2 }, { 0, 0, 2, 0, -2 }, { 1, 0, -1, 0, 1 }, { 3, 0, 2, -2, 0 }, { 2, 0, 2, 2, 0 }, { 1, 2, 0, -4, 0 }, { 1, -1, 0, -3, 0 }, { 0, 1, 0, 4, 0 }, /* 471 - 480 */ { 0, 1, -2, 0, 0 }, { 2, 2, 2, -2, 2 }, { 0, 0, 0, 1, -2 }, { 0, 2, -2, 0, -1 }, { 4, 0, 2, -4, 2 }, { 2, 0, -4, 2, -2 }, { 2, -1, -2, 0, -2 }, { 1, 1, 4, -2, 2 }, { 1, 1, 2, -4, 2 }, { 1, 0, 2, 3, 2 }, /* 481-490 */ { 1, 0, 0, 4, -1 }, { 0, 0, 0, 4, 2 }, { 2, 0, 0, 4, 0 }, { 1, 1, -2, 2, 0 }, { 2, 1, 2, 1, 2 }, { 2, 1, 2, -4, 1 }, { 2, 0, 2, 1, 1 }, { 2, 0, -4, -2, -1 }, { 2, 0, -2, -6, -1 }, { 2, -1, 2, -1, 2 }, /* 491-500 */ { 1, -2, 2, 0, 1 }, { 1, -2, 0, -2, 1 }, { 1, -1, 0, -4, -1 }, { 0, 2, 2, 2, 2 }, { 0, 2, -2, -4, -2 }, { 0, 1, 2, 3, 2 }, { 0, 1, 0, -4, 1 }, { 3, 0, 0, -2, 1 }, { 2, 1, -2, 0, 1 }, { 2, 0, 4, -2, 1 }, /* 501-510 */ { 2, 0, 0, -3, -1 }, { 2, -2, 0, -2, 1 }, { 2, -1, 2, -2, 1 }, { 1, 0, 0, -6, -1 }, { 1, -2, 0, 0, -1 }, { 1, -2, -2, -2, -1 }, { 0, 1, 4, -2, 1 }, { 0, 0, 2, 3, 1 }, { 2, -1, 0, -1, 0 }, { 1, 3, 0, -2, 0 }, /* 511-520 */ { 0, 3, 0, -2, 0 }, { 2, -2, 2, -2, 2 }, { 0, 0, 4, -2, 0 }, { 4, -1, 2, 0, 2 }, { 2, 2, -2, -4, -2 }, { 4, 1, 2, 0, 2 }, { 4, -1, -2, -2, -2 }, { 2, 1, 0, -2, -2 }, { 2, 1, -2, -6, -2 }, { 2, 0, 0, -1, 1 }, /* 521-530 */ { 2, -1, -2, 2, -1 }, { 1, 1, -2, 2, -2 }, { 1, 1, -2, -3, -2 }, { 1, 0, 3, 0, 3 }, { 1, 0, -2, 1, 1 }, { 1, 0, -2, 0, 2 }, { 1, -1, 2, 1, 2 }, { 1, -1, 0, 0, -2 }, { 1, -1, -4, 2, -2 }, { 0, 3, -2, -2, -2 }, /* 531-540 */ { 0, 1, 0, 4, 1 }, { 0, 0, 4, 2, 2 }, { 3, 0, -2, -2, 0 }, { 2, -2, 0, 0, 0 }, { 1, 1, 2, -4, 0 }, { 1, 1, 0, -3, 0 }, { 1, 0, 2, -3, 0 }, { 1, -1, 2, -2, 0 }, { 0, 2, 0, 2, 0 }, { 0, 0, 2, 4, 0 }, /* 541-550 */ { 1, 0, 1, 0, 0 }, { 3, 1, 2, -2, 1 }, { 3, 0, 4, -2, 2 }, { 3, 0, 2, 1, 2 }, { 3, 0, 0, 2, -1 }, { 3, 0, 0, 0, 2 }, { 3, 0, -2, 2, -1 }, { 2, 0, 4, -4, 2 }, { 2, 0, 2, -3, 2 }, { 2, 0, 0, 4, 1 }, /* 551-560 */ { 2, 0, 0, -3, 1 }, { 2, 0, -4, 2, -1 }, { 2, 0, -2, -2, 1 }, { 2, -2, 2, 2, 2 }, { 2, -2, 0, -2, -2 }, { 2, -1, 0, 2, 1 }, { 2, -1, 0, 2, -1 }, { 1, 1, 2, 4, 2 }, { 1, 1, 0, 1, 1 }, { 1, 1, 0, 1, -1 }, /* 561-570 */ { 1, 1, -2, -6, -2 }, { 1, 0, 0, -3, -1 }, { 1, 0, -4, -2, -1 }, { 1, 0, -2, -6, -1 }, { 1, -2, 2, 2, 1 }, { 1, -2, -2, 2, -1 }, { 1, -1, -2, -4, -1 }, { 0, 2, 0, 0, 2 }, { 0, 1, 2, -4, 2 }, { 0, 1, -2, 4, -1 }, /* 571-580 */ { 5, 0, 0, 0, 0 }, { 3, 0, 0, -3, 0 }, { 2, 2, 0, -4, 0 }, { 1, -1, 2, 2, 0 }, { 0, 1, 0, 3, 0 }, { 4, 0, -2, 0, -1 }, { 3, 0, -2, -6, -1 }, { 3, 0, -2, -1, -1 }, { 2, 1, 2, 2, 1 }, { 2, 1, 0, 2, 1 }, /* 581-590 */ { 2, 0, 2, 4, 1 }, { 2, 0, 2, -6, 1 }, { 2, 0, 2, -2, -1 }, { 2, 0, 0, -6, -1 }, { 2, -1, -2, -2, -1 }, { 1, 2, 2, 0, 1 }, { 1, 2, 0, 0, 1 }, { 1, 0, 4, 0, 1 }, { 1, 0, 2, -6, 1 }, { 1, 0, 2, -4, -1 }, /* 591-600 */ { 1, 0, -1, -2, -1 }, { 1, -1, 2, 4, 1 }, { 1, -1, 2, -3, 1 }, { 1, -1, 0, 4, 1 }, { 1, -1, -2, 1, -1 }, { 0, 1, 2, -2, 3 }, { 3, 0, 0, -2, 0 }, { 1, 0, 1, -2, 0 }, { 0, 2, 0, -4, 0 }, { 0, 0, 2, -4, 0 }, /* 601-610 */ { 0, 0, 1, -1, 0 }, { 0, 0, 0, 6, 0 }, { 0, 2, 0, 0, -2 }, { 0, 1, -2, 2, -3 }, { 4, 0, 0, 2, 0 }, { 3, 0, 0, -1, 0 }, { 3, -1, 0, 2, 0 }, { 2, 1, 0, 1, 0 }, { 2, 1, 0, -6, 0 }, { 2, -1, 2, 0, 0 }, /* 611-620 */ { 1, 0, 2, -1, 0 }, { 1, -1, 0, 1, 0 }, { 1, -1, -2, -2, 0 }, { 0, 1, 2, 2, 0 }, { 0, 0, 2, -3, 0 }, { 2, 2, 0, -2, -1 }, { 2, -1, -2, 0, 1 }, { 1, 2, 2, -4, 1 }, { 0, 1, 4, -4, 2 }, { 0, 0, 0, 3, 2 }, /* 621-630 */ { 5, 0, 2, 0, 1 }, { 4, 1, 2, -2, 2 }, { 4, 0, -2, -2, 0 }, { 3, 1, 2, 2, 2 }, { 3, 1, 0, -2, 0 }, { 3, 1, -2, -6, -2 }, { 3, 0, 0, 0, -2 }, { 3, 0, -2, -4, -2 }, { 3, -1, 0, -3, 0 }, { 3, -1, 0, -2, 0 }, /* 631-640 */ { 2, 1, 2, 0, 0 }, { 2, 1, 2, -4, 2 }, { 2, 1, 2, -2, 0 }, { 2, 1, 0, -3, 0 }, { 2, 1, -2, 0, -2 }, { 2, 0, 0, -4, 2 }, { 2, 0, 0, -4, -2 }, { 2, 0, -2, -5, -2 }, { 2, -1, 2, 4, 2 }, { 2, -1, 0, -2, 2 }, /* 641-650 */ { 1, 3, -2, -2, -2 }, { 1, 1, 0, 0, -2 }, { 1, 1, 0, -6, 0 }, { 1, 1, -2, 1, -2 }, { 1, 1, -2, -1, -2 }, { 1, 0, 2, 1, 0 }, { 1, 0, 0, 3, 0 }, { 1, 0, 0, -4, 2 }, { 1, 0, -2, 4, -2 }, { 1, -2, 0, -1, 0 }, /* 651-NFLS */ { 0, 1, -4, 2, -1 }, { 1, 0, -2, 0, -3 }, { 0, 0, 4, -4, 4 } }; /* Number of frequencies: luni-solar */ static const int NFLS = (int) (sizeof mfals / sizeof (int) / 5); /* Fundamental-argument multipliers: planetary terms */ static const int mfapl[][14] = { /* 1-10 */ { 0, 0, 1, -1, 1, 0, 0, -1, 0, -2, 5, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, -2 }, { 0, 0, 1, -1, 1, 0, -8, 12, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, -1, 2, 0, 0, 0, 0, 0 }, /* 11-20 */ { 0, 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, -1 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, 2, -5, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 3, 0, -1, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 2, -8, 3, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 6, -8, 3, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 0 }, /* 21-30 */ { 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 1, 0, 0, -4, 8, -3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2 }, { 0, 0, 1, -1, 1, 0, 0, 0, -2, 0, 0, 0, 0, 0 }, { 2, 0, 0, -2, -1, 0, 0, -2, 0, 2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1 }, { 2, 0, 0, -2, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0 }, /* 31-40 */ { 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 1 }, { 2, 0, 0, -2, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, -1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, -1, 0, 0, 0 }, /* 41-50 */ { 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, -2 }, { 0, 0, 1, -1, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 4, 0, -2, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 2 }, { 1, 0, 0, 0, 0, 0,-18, 16, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2 }, /* 51-60 */ { 0, 0, 1, -1, 1, 0, -5, 7, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, 0, 0, 0,-10, 3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 0, 0, -5, 6, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 2 }, { 1, 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1 }, { 1, 0, -2, 0, -2, 0, 0, 4, -8, 3, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 2, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0 }, /* 61-70 */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, -2 }, { 0, 0, 1, -1, 1, 0, 0, 3, -8, 3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 8,-11, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0 }, /* 71-80 */ { 0, 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 3, 0, -2, 0, 0, 0, 2 }, { 0, 0, 1, -1, 1, 0, 0, -5, 8, -3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 0 }, /* 81-90 */ { 2, 0, 0, -2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, -1 }, { 2, 0, 0, -2, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 8,-13, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 0, 0, -2, 5, 0, 0, 0 }, { 1, 0, 0, -1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2 }, { 1, 0, 0, 0, -1, 0,-18, 16, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, -5, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, /* 91-100 */ { 1, 0, 0, -2, 0, 0, 19,-21, 3, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, -8, 13, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2 }, { 1, 0, 0, 0, 1, 0,-18, 16, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 6,-16, 4, 5, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 3, -7, 0, 0, 0, 0, 0, -2 }, /* 101-110 */ { 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1 }, { 2, 0, 0, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 0 }, { 2, 0, 0, -2, -1, 0, 0, -2, 0, 3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2 }, /* 111-120 */ { 0, 0, 0, 0, 1, 0, 0, 1, -2, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2 }, { 0, 0, 2, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, -3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0 }, { 2, 0, 0, -2, 0, 0, -6, 8, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0 }, /* 121-130 */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 8,-10, 0, 0, 0, 0, 0, -2 }, { 0, 0, 1, -1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, -2 }, { 1, 0, 0, -1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0 }, /* 131-140 */ { 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 4, 0, -3, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 1, 0, 2, -3, 0, 0, 0, 0, 0, 0 }, /* 141-150 */ { 1, 0, 0, -1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 9,-11, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, -4, 5, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 4, 0, -1, 0, 0, 0, 2 }, /* 151-160 */ { 1, 0, 0, -1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, -4, 10, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, -2 }, { 0, 0, 2, -2, 1, 0, -4, 4, 0, 0, 0, 0, 0, 0 }, /* 161-170 */ { 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 2 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 2, 0 }, { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 0, -9, 13, 0, 0, 0, 0, 0 }, { 2, 0, 2, 0, 2, 0, 0, 2, 0, -3, 0, 0, 0, 0 }, /* 171-180 */ { 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, -2 }, { 0, 0, 1, -1, 2, 0, 0, -1, 0, 0, 2, 0, 0, 0 }, { 1, 0, 0, -1, -1, 0, -3, 4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1 }, { 1, 0, 2, 0, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0 }, { 1, 0, -2, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, -2, 4, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0 }, /* 181-190 */ { 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1 }, { 0, 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, -8, 3, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 6,-10, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 7, -8, 3, 0, 0, 0, 2 }, { 0, 0, 0, 0, 1, 0, -3, 5, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, -5, 7, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 1 }, /* 191-200 */ { 0, 0, 0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 7,-10, 0, 0, 0, 0, 0, -2 }, { 1, 0, 0, -2, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, -5, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, -1 }, { 0, 0, 1, -1, 1, 0, 0, -9, 15, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, -1, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0 }, /* 201-210 */ { 0, 0, 0, 0, 0, 0, 0, 1, -4, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -1, 0, 0, 2 }, { 2, 0, 0, -2, 1, 0, -6, 8, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, -1 }, { 0, 0, 1, -1, 1, 0, 3, -6, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 8,-14, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, /* 211-220 */ { 0, 0, 0, 0, 1, 0, 0, 8,-15, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 0, 0 }, { 2, 0, 0, -2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2 }, { 2, 0, -1, -1, 0, 0, 0, 3, -7, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0 }, /* 221-230 */ { 2, 0, 0, -2, 0, 0, 0, -6, 8, 0, 0, 0, 0, 0 }, { 2, 0, 0, -2, 0, 0, 0, -5, 6, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 1, 0, 0, 1, 0, -1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 3, -9, 4, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, -2 }, /* 231-240 */ { 0, 0, 0, 0, 0, 0, 0, 2, 0, -4, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1 }, { 0, 0, 0, 0, 0, 0, 7,-11, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 3, -5, 4, 0, 0, 0, 0, 2 }, { 0, 0, 1, -1, 0, 0, 0, -1, 0, -1, 1, 0, 0, 0 }, { 2, 0, 0, 0, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, -2 }, { 0, 0, 1, -1, 2, 0, 0, -2, 2, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, -1 }, /* 241-250 */ { 0, 0, 1, -1, 1, 0, 0, -1, 0, -1, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 3, -8, 3, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 2, -4, 0, -3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 3, -5, 0, 2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 3, 0, -3, 0, 0, 0, 2 }, { 0, 0, 2, -2, 2, 0, -8, 11, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -2, 0, 0, 0 }, /* 251-260 */ { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 0 }, { 1, 0, -2, -2, -2, 0, 0, -2, 0, 2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 5, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 1 }, /* 261-270 */ { 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, -5, 0, 0, 2 }, { 2, 0, 0, -2, -1, 0, 0, -2, 0, 0, 5, 0, 0, 0 }, { 2, 0, 0, -2, -1, 0, -6, 8, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, -2, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 8, -8, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, -5, 0, 0, 2 }, { 0, 0, 0, 0, 1, 0, 3, -7, 4, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0 }, /* 271-280 */ { 0, 0, 1, -1, 0, 0, 0, -1, 0, -2, 5, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 3, 0, -3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 6,-15, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 2 }, { 1, 0, 0, -1, 0, 0, 0, -3, 4, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, -3, 7, -4, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 5, 0, -2, 0, 0, 0, 2 }, /* 281-290 */ { 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 1 }, { 0, 0, 2, -2, 2, 0, -5, 6, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 6,-11, 0, 0, 0, 0, -2 }, /* 291-300 */ { 0, 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, -2 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, 3, 0, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, 0, -1, 0, 2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 9,-12, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 1 }, { 0, 0, 1, -1, 0, 0, -8, 12, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, -1 }, /* 301-310 */ { 0, 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0, 0, -2 }, { 0, 0, 1, -1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, -1 }, { 0, 0, 1, -1, -1, 0, 0, 0, -2, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, -5, 0, 0, 0, 0, -2 }, { 2, 0, 0, -2, 0, 0, 0, -2, 0, 3, -1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 2 }, /* 311-320 */ { 0, 0, 0, 0, 0, 0, 9, -9, 0, 0, 0, 0, 0, -1 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 3, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 2, -4, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1 }, { 0, 0, 1, -1, 2, 0, 0, -1, 0, 2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2 }, { 0, 0, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0 }, /* 321-330 */ { 0, 0, 2, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 5, 0, -3, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 }, { 2, 0, -1, -1, -1, 0, 0, -1, 0, 3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 5,-10, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 1 }, { 0, 0, 2, -2, 1, -1, 0, 2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 2, 0, 0 }, /* 331-340 */ { 0, 0, 0, 0, 1, 0, 3, -5, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, -2, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0 }, { 0, 0, 2, -2, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 9, -9, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 0, -8, 11, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 0, -2, 0, 0, 2, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, -1, 2, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 2, -6, 0, 0, 0, 0, 0, -2 }, /* 341-350 */ { 0, 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 5, -2, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 7,-13, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 3, 0, -2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 2 }, { 0, 0, 2, -2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 8, -8, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 8,-10, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 1 }, /* 351-360 */ { 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, -4, 0, 0, 0, 0 }, { 2, 0, 0, -2, -1, 0, 0, -5, 6, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0, 0, -2 }, { 2, 0, -1, -1, -1, 0, 0, 3, -7, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0 }, { 0, 0, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0 }, /* 361-370 */ { 2, 0, 0, -2, 0, 0, 0, -2, 0, 4, -3, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 6,-11, 0, 0, 0, 0, 0 }, { 2, 0, 0, -2, 1, 0, 0, -6, 8, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 4, -8, 1, 5, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 6, -5, 0, 0, 0, 0, 2 }, { 1, 0, -2, -2, -2, 0, -3, 3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 2, 0, 0, 0, -2, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1 }, /* 371-380 */ { 0, 0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, -2, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, -2, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 0, 1, -6, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2 }, { 0, 0, 0, 0, 0, 0, 3, -5, 0, 2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 7,-13, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 2 }, /* 381-390 */ { 0, 0, 1, -1, 0, 0, 0, -1, 0, 0, 2, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, -8, 15, 0, 0, 0, 0, 0 }, { 2, 0, 0, -2, -2, 0, -3, 3, 0, 0, 0, 0, 0, 0 }, { 2, 0, -1, -1, -1, 0, 0, -1, 0, 2, 0, 0, 0, 0 }, { 1, 0, 2, -2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0 }, { 1, 0, -1, 1, -1, 0,-18, 17, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, 0, 2, 0, 0, 1, 0, -1, 0, 0, 0, 0 }, { 0, 0, 2, 0, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0 }, { 0, 0, 2, -2, -1, 0, -5, 6, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0 }, /* 391-400 */ { 0, 0, 0, 0, 1, 0, 2, -2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 8,-16, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2 }, { 0, 0, 0, 0, 2, 0, 0, -1, 2, 0, 0, 0, 0, 0 }, { 2, 0, -1, -1, -2, 0, 0, -1, 0, 2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 6,-10, 0, 0, 0, 0, 0, -1 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, -2, 4, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2 }, { 2, 0, 0, -2, -1, 0, 0, -2, 0, 4, -5, 0, 0, 0 }, /* 401-410 */ { 2, 0, 0, -2, -1, 0, -3, 3, 0, 0, 0, 0, 0, 0 }, { 2, 0, -1, -1, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0 }, { 1, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, -1, -1, 0, 0, -2, 2, 0, 0, 0, 0, 0 }, { 1, 0, -1, -1, -1, 0, 20,-20, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 1, -2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, -2, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 5, -8, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0 }, /* 411-420 */ { 0, 0, 0, 0, 0, 0, 9,-11, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1 }, { 0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, -2 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, -2, 0, 0, 0 }, { 0, 0, 1, -1, 2, 0, 0, -1, 0, -2, 5, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0 }, /* 421-430 */ { 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 2, -6, 0, 0, 0, 0, -2 }, { 1, 0, 0, -2, 0, 0, 20,-21, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 8,-12, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 2, 0, 0, -1, 0, -1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 8,-12, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 9,-17, 0, 0, 0, 0, 0 }, /* 431-440 */ { 0, 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 4, -8, 1, 5, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 2, -7, 0, 0, 0, 0, -2 }, { 1, 0, 0, -1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0 }, { 1, 0, -2, 0, -2, 0,-10, 3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, -9, 17, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1, -4, 0, 0, 0, 0, 0, -2 }, { 1, 0, -2, -2, -2, 0, 0, -2, 0, 3, 0, 0, 0, 0 }, { 1, 0, -1, 1, -1, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, /* 441-450 */ { 0, 0, 2, -2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0 }, { 0, 0, 1, -1, 2, 0, 0, -1, 0, 0, 1, 0, 0, 0 }, { 0, 0, 1, -1, 2, 0, -5, 7, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 5,-10, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 4, 0, -4, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, -5, 0, 0, 0, -2 }, /* 451-460 */ { 0, 0, 0, 0, 0, 0, 0, 1, 0, -5, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 5, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 1 }, { 1, 0, 0, -2, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 3, -7, 4, 0, 0, 0, 0, 0 }, { 2, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, -1, 0, 0, -1, 0, -1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 1, 0, -2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 6,-10, 0, 0, 0, 0, -2 }, /* 461-470 */ { 1, 0, 0, -1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 0, 1, 0, -1, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 0, -4, 8, -3, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 0, -3, 0, 3, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, -5, 5, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 1, -3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, -4, 6, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, -1, 0, 0 }, { 0, 0, 1, -1, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0 }, /* 471-480 */ { 0, 0, 0, 0, 1, 0, 3, -4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 7,-10, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 3, -8, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 2 }, /* 481-490 */ { 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 3, -8, 3, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1 }, { 2, 0, 0, -2, -1, 0, 0, -6, 8, 0, 0, 0, 0, 0 }, { 2, 0, -1, -1, 1, 0, 0, 3, -7, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 0, -7, 9, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, -1 }, /* 491-500 */ { 0, 0, 1, -1, 2, 0, -8, 12, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, 0, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0 }, { 1, 0, 0, -2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0 }, { 2, 0, 0, -2, 1, 0, 0, -5, 6, 0, 0, 0, 0, 0 }, { 2, 0, 0, -2, -1, 0, 0, -2, 0, 3, -1, 0, 0, 0 }, { 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0 }, { 1, 0, 0, -2, -1, 0, 0, -2, 0, 2, 0, 0, 0, 0 }, /* 501-510 */ { 1, 0, 0, -1, -1, 0, 0, -3, 4, 0, 0, 0, 0, 0 }, { 1, 0, -1, 0, -1, 0, -3, 5, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 0, -4, 4, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 0, -2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, -8, 11, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 0, 0, 0, -9, 13, 0, 0, 0, 0, 0 }, { 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, 1, -4, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, 0, -1, 0, 1, -3, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 7,-13, 0, 0, 0, 0, 0 }, /* 511-520 */ { 0, 0, 0, 0, 1, 0, 0, 2, 0, -2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 7,-11, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 1 }, /* 521-530 */ { 0, 0, 0, 0, 0, 0, 1, -4, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 9,-17, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0 }, { 2, 0, 0, -2, 0, 0, 0, -4, 8, -3, 0, 0, 0, 0 }, /* 531-540 */ { 2, 0, 0, -2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0 }, { 1, 0, 0, 0, 0, 0, 0, -4, 8, -3, 0, 0, 0, 0 }, { 1, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, -2, 0, 0, 17,-16, 0, -2, 0, 0, 0, 0 }, { 1, 0, 0, -1, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 3, 0, -4, 0, 0, 0, 0 }, /* 541-550 */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, -2 }, { 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2 }, { 2, 0, 0, -2, 0, 0, 0, -4, 4, 0, 0, 0, 0, 0 }, { 2, 0, 0, -2, 0, 0, 0, -2, 0, 2, 2, 0, 0, 0 }, { 1, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0 }, { 1, 0, 0, 0, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, -2, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, -2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0 }, { 1, 0, 0, -2, 0, 0, 0, -4, 8, -3, 0, 0, 0, 0 }, /* 551-560 */ { 1, 0, 0, -2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 0, 0, -4, 4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, -4, 5, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 2, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0 }, /* 561-570 */ { 0, 0, 0, 0, 0, 0, 8, -9, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0 }, { 2, 0, -2, -2, -2, 0, 0, -2, 0, 2, 0, 0, 0, 0 }, { 1, 0, 0, 0, 1, 0,-10, 3, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, 0, -1, 0,-10, 3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, 0, 2, 0, 2, -3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, 0, 2, 0, 2, -2, 0, 0, 0, 0, 0, 0 }, /* 571-580 */ { 0, 0, 2, 0, 2, 0, -2, 3, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, 0, 2, 0, -2, 2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0 }, { 2, 0, 2, -2, 2, 0, 0, -2, 0, 3, 0, 0, 0, 0 }, { 2, 0, 1, -3, 1, 0, -6, 7, 0, 0, 0, 0, 0, 0 }, { 2, 0, 0, -2, 0, 0, 2, -5, 0, 0, 0, 0, 0, 0 }, { 2, 0, 0, -2, 0, 0, 0, -2, 0, 5, -5, 0, 0, 0 }, { 2, 0, 0, -2, 0, 0, 0, -2, 0, 1, 5, 0, 0, 0 }, { 2, 0, 0, -2, 0, 0, 0, -2, 0, 0, 5, 0, 0, 0 }, /* 581-590 */ { 2, 0, 0, -2, 0, 0, 0, -2, 0, 0, 2, 0, 0, 0 }, { 2, 0, 0, -2, 0, 0, -4, 4, 0, 0, 0, 0, 0, 0 }, { 2, 0, -2, 0, -2, 0, 0, 5, -9, 0, 0, 0, 0, 0 }, { 2, 0, -1, -1, 0, 0, 0, -1, 0, 3, 0, 0, 0, 0 }, { 1, 0, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0 }, { 1, 0, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0 }, { 1, 0, 2, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0 }, { 1, 0, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0 }, { 1, 0, 2, -2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0 }, /* 591-600 */ { 1, 0, 0, 0, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0 }, { 1, 0, 0, -2, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0 }, { 1, 0, -2, -2, -2, 0, 0, 1, 0, -1, 0, 0, 0, 0 }, { 1, 0, -1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, { 1, 0, -1, -1, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0 }, { 0, 0, 2, 2, 2, 0, 0, 2, 0, -2, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 0, -2, 0, 1, 0, 0, 0, 0 }, { 0, 0, 2, -2, 1, 0, 0,-10, 15, 0, 0, 0, 0, 0 }, { 0, 0, 2, -2, 0, -1, 0, 2, 0, 0, 0, 0, 0, 0 }, /* 601-610 */ { 0, 0, 1, -1, 2, 0, 0, -1, 0, 0, -1, 0, 0, 0 }, { 0, 0, 1, -1, 2, 0, -3, 4, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, -4, 6, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, 0, -1, 0, 0, -2, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, -1, -1, 0, -5, 7, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 2, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0 }, /* 611-620 */ { 0, 0, 0, 2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 2, 0, -3, 5, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 9,-13, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 8,-14, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 8,-11, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, -2 }, /* 621-630 */ { 0, 0, 0, 0, 0, 0, 5, -6, -4, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 3, -3, 0, 2, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 7,-12, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, -2 }, /* 631-640 */ { 0, 0, 0, 0, 0, 0, 0, 6, -8, 1, 5, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 6,-10, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 5, 0, -4, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 5,-16, 4, 5, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 5,-13, 0, 0, 0, 0, -2 }, /* 641-650 */ { 0, 0, 0, 0, 0, 0, 0, 3, 0, -5, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 3, -9, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 3, -7, 0, 0, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -3, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 2, -8, 1, 5, 0, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, -5, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -3, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 5, 0, 0, 0 }, /* 651-NFPL */ { 0, 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -6, 3, 0, -2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 }, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 } }; /* Number of frequencies: planetary */ static const int NFPL = (int) (sizeof mfapl / sizeof (int) / 14); /* Pointers into amplitudes array, one pointer per frequency */ static const int nc[] = { /* 1-100 */ 1, 21, 37, 51, 65, 79, 91, 103, 115, 127, 139, 151, 163, 172, 184, 196, 207, 219, 231, 240, 252, 261, 273, 285, 297, 309, 318, 327, 339, 351, 363, 372, 384, 396, 405, 415, 423, 435, 444, 452, 460, 467, 474, 482, 490, 498, 506, 513, 521, 528, 536, 543, 551, 559, 566, 574, 582, 590, 597, 605, 613, 620, 628, 636, 644, 651, 658, 666, 674, 680, 687, 695, 702, 710, 717, 725, 732, 739, 746, 753, 760, 767, 774, 782, 790, 798, 805, 812, 819, 826, 833, 840, 846, 853, 860, 867, 874, 881, 888, 895, /* 101-200 */ 901, 908, 914, 921, 928, 934, 941, 948, 955, 962, 969, 976, 982, 989, 996, 1003, 1010, 1017, 1024, 1031, 1037, 1043, 1050, 1057, 1064, 1071, 1078, 1084, 1091, 1098, 1104, 1112, 1118, 1124, 1131, 1138, 1145, 1151, 1157, 1164, 1171, 1178, 1185, 1192, 1199, 1205, 1212, 1218, 1226, 1232, 1239, 1245, 1252, 1259, 1266, 1272, 1278, 1284, 1292, 1298, 1304, 1310, 1316, 1323, 1329, 1335, 1341, 1347, 1353, 1359, 1365, 1371, 1377, 1383, 1389, 1396, 1402, 1408, 1414, 1420, 1426, 1434, 1440, 1446, 1452, 1459, 1465, 1471, 1477, 1482, 1488, 1493, 1499, 1504, 1509, 1514, 1520, 1527, 1532, 1538, /* 201-300 */ 1543, 1548, 1553, 1558, 1564, 1569, 1574, 1579, 1584, 1589, 1594, 1596, 1598, 1600, 1602, 1605, 1608, 1610, 1612, 1617, 1619, 1623, 1625, 1627, 1629, 1632, 1634, 1640, 1642, 1644, 1646, 1648, 1650, 1652, 1654, 1658, 1660, 1662, 1664, 1668, 1670, 1672, 1673, 1675, 1679, 1681, 1683, 1684, 1686, 1688, 1690, 1693, 1695, 1697, 1701, 1703, 1705, 1707, 1709, 1711, 1712, 1715, 1717, 1721, 1723, 1725, 1727, 1729, 1731, 1733, 1735, 1737, 1739, 1741, 1743, 1745, 1747, 1749, 1751, 1753, 1755, 1757, 1759, 1761, 1762, 1764, 1766, 1768, 1769, 1771, 1773, 1775, 1777, 1779, 1781, 1783, 1785, 1787, 1788, 1790, /* 301-400 */ 1792, 1794, 1796, 1798, 1800, 1802, 1804, 1806, 1807, 1809, 1811, 1815, 1817, 1819, 1821, 1823, 1825, 1827, 1829, 1831, 1833, 1835, 1837, 1839, 1840, 1842, 1844, 1848, 1850, 1852, 1854, 1856, 1858, 1859, 1860, 1862, 1864, 1866, 1868, 1869, 1871, 1873, 1875, 1877, 1879, 1881, 1883, 1885, 1887, 1889, 1891, 1892, 1896, 1898, 1900, 1901, 1903, 1905, 1907, 1909, 1910, 1911, 1913, 1915, 1919, 1921, 1923, 1927, 1929, 1931, 1933, 1935, 1937, 1939, 1943, 1945, 1947, 1948, 1949, 1951, 1953, 1955, 1957, 1958, 1960, 1962, 1964, 1966, 1968, 1970, 1971, 1973, 1974, 1975, 1977, 1979, 1980, 1981, 1982, 1984, /* 401-500 */ 1986, 1988, 1990, 1992, 1994, 1995, 1997, 1999, 2001, 2003, 2005, 2007, 2008, 2009, 2011, 2013, 2015, 2017, 2019, 2021, 2023, 2024, 2025, 2027, 2029, 2031, 2033, 2035, 2037, 2041, 2043, 2045, 2046, 2047, 2049, 2051, 2053, 2055, 2056, 2057, 2059, 2061, 2063, 2065, 2067, 2069, 2070, 2071, 2072, 2074, 2076, 2078, 2080, 2082, 2084, 2086, 2088, 2090, 2092, 2094, 2095, 2096, 2097, 2099, 2101, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2113, 2115, 2119, 2121, 2123, 2125, 2127, 2129, 2131, 2133, 2135, 2136, 2137, 2139, 2141, 2143, 2145, 2147, 2149, 2151, 2153, 2155, 2157, 2159, 2161, 2163, 2165, 2167, /* 501-600 */ 2169, 2171, 2173, 2175, 2177, 2179, 2181, 2183, 2185, 2186, 2187, 2188, 2192, 2193, 2195, 2197, 2199, 2201, 2203, 2205, 2207, 2209, 2211, 2213, 2217, 2219, 2221, 2223, 2225, 2227, 2229, 2231, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, 2244, 2246, 2248, 2250, 2252, 2254, 2256, 2258, 2260, 2262, 2264, 2266, 2268, 2270, 2272, 2274, 2276, 2278, 2280, 2282, 2284, 2286, 2288, 2290, 2292, 2294, 2296, 2298, 2300, 2302, 2303, 2304, 2305, 2306, 2307, 2309, 2311, 2313, 2315, 2317, 2319, 2321, 2323, 2325, 2327, 2329, 2331, 2333, 2335, 2337, 2341, 2343, 2345, 2347, 2349, 2351, 2352, 2355, 2356, /* 601-700 */ 2357, 2358, 2359, 2361, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2376, 2378, 2380, 2382, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2417, 2418, 2430, 2438, 2445, 2453, 2460, 2468, 2474, 2480, 2488, 2496, 2504, 2512, 2520, 2527, 2535, 2543, 2550, 2558, 2566, 2574, 2580, 2588, 2596, 2604, 2612, 2619, 2627, 2634, 2642, 2648, 2656, 2664, 2671, 2679, 2685, 2693, 2701, 2709, 2717, 2725, 2733, 2739, 2747, 2753, 2761, 2769, /* 701-800 */ 2777, 2785, 2793, 2801, 2809, 2817, 2825, 2833, 2841, 2848, 2856, 2864, 2872, 2878, 2884, 2892, 2898, 2906, 2914, 2922, 2930, 2938, 2944, 2952, 2958, 2966, 2974, 2982, 2988, 2996, 3001, 3009, 3017, 3025, 3032, 3039, 3045, 3052, 3059, 3067, 3069, 3076, 3083, 3090, 3098, 3105, 3109, 3111, 3113, 3120, 3124, 3128, 3132, 3136, 3140, 3144, 3146, 3150, 3158, 3161, 3165, 3166, 3168, 3172, 3176, 3180, 3182, 3185, 3189, 3193, 3194, 3197, 3200, 3204, 3208, 3212, 3216, 3219, 3221, 3222, 3226, 3230, 3234, 3238, 3242, 3243, 3247, 3251, 3254, 3258, 3262, 3266, 3270, 3274, 3275, 3279, 3283, 3287, 3289, 3293, /* 801-900 */ 3296, 3300, 3303, 3307, 3311, 3315, 3319, 3321, 3324, 3327, 3330, 3334, 3338, 3340, 3342, 3346, 3350, 3354, 3358, 3361, 3365, 3369, 3373, 3377, 3381, 3385, 3389, 3393, 3394, 3398, 3402, 3406, 3410, 3413, 3417, 3421, 3425, 3429, 3433, 3435, 3439, 3443, 3446, 3450, 3453, 3457, 3458, 3461, 3464, 3468, 3472, 3476, 3478, 3481, 3485, 3489, 3493, 3497, 3501, 3505, 3507, 3511, 3514, 3517, 3521, 3524, 3525, 3527, 3529, 3533, 3536, 3540, 3541, 3545, 3548, 3551, 3555, 3559, 3563, 3567, 3569, 3570, 3574, 3576, 3578, 3582, 3586, 3590, 3593, 3596, 3600, 3604, 3608, 3612, 3616, 3620, 3623, 3626, 3630, 3632, /* 901-1000 */ 3636, 3640, 3643, 3646, 3648, 3652, 3656, 3660, 3664, 3667, 3669, 3671, 3675, 3679, 3683, 3687, 3689, 3693, 3694, 3695, 3699, 3703, 3705, 3707, 3710, 3713, 3717, 3721, 3725, 3729, 3733, 3736, 3740, 3744, 3748, 3752, 3754, 3757, 3759, 3763, 3767, 3770, 3773, 3777, 3779, 3783, 3786, 3790, 3794, 3798, 3801, 3805, 3809, 3813, 3817, 3821, 3825, 3827, 3831, 3835, 3836, 3837, 3840, 3844, 3848, 3852, 3856, 3859, 3863, 3867, 3869, 3871, 3875, 3879, 3883, 3887, 3890, 3894, 3898, 3901, 3905, 3909, 3913, 3917, 3921, 3922, 3923, 3924, 3926, 3930, 3932, 3936, 3938, 3940, 3944, 3948, 3952, 3956, 3959, 3963, /* 1001-1100 */ 3965, 3969, 3973, 3977, 3979, 3981, 3982, 3986, 3989, 3993, 3997, 4001, 4004, 4006, 4009, 4012, 4016, 4020, 4024, 4026, 4028, 4032, 4036, 4040, 4044, 4046, 4050, 4054, 4058, 4060, 4062, 4063, 4064, 4068, 4071, 4075, 4077, 4081, 4083, 4087, 4089, 4091, 4095, 4099, 4101, 4103, 4105, 4107, 4111, 4115, 4119, 4123, 4127, 4129, 4131, 4135, 4139, 4141, 4143, 4145, 4149, 4153, 4157, 4161, 4165, 4169, 4173, 4177, 4180, 4183, 4187, 4191, 4195, 4198, 4201, 4205, 4209, 4212, 4213, 4216, 4217, 4221, 4223, 4226, 4230, 4234, 4236, 4240, 4244, 4248, 4252, 4256, 4258, 4262, 4264, 4266, 4268, 4270, 4272, 4276, /* 1101-1200 */ 4279, 4283, 4285, 4287, 4289, 4293, 4295, 4299, 4300, 4301, 4305, 4309, 4313, 4317, 4319, 4323, 4325, 4329, 4331, 4333, 4335, 4337, 4341, 4345, 4349, 4351, 4353, 4357, 4361, 4365, 4367, 4369, 4373, 4377, 4381, 4383, 4387, 4389, 4391, 4395, 4399, 4403, 4407, 4411, 4413, 4414, 4415, 4418, 4419, 4421, 4423, 4427, 4429, 4431, 4433, 4435, 4437, 4439, 4443, 4446, 4450, 4452, 4456, 4458, 4460, 4462, 4466, 4469, 4473, 4477, 4481, 4483, 4487, 4489, 4491, 4493, 4497, 4499, 4501, 4504, 4506, 4510, 4513, 4514, 4515, 4518, 4521, 4522, 4525, 4526, 4527, 4530, 4533, 4534, 4537, 4541, 4542, 4543, 4544, 4545, /* 1201-1300 */ 4546, 4547, 4550, 4553, 4554, 4555, 4558, 4561, 4564, 4567, 4568, 4571, 4574, 4575, 4578, 4581, 4582, 4585, 4586, 4588, 4590, 4592, 4596, 4598, 4602, 4604, 4608, 4612, 4613, 4616, 4619, 4622, 4623, 4624, 4625, 4626, 4629, 4632, 4633, 4636, 4639, 4640, 4641, 4642, 4643, 4644, 4645, 4648, 4649, 4650, 4651, 4652, 4653, 4656, 4657, 4660, 4661, 4664, 4667, 4670, 4671, 4674, 4675, 4676, 4677, 4678, 4681, 4682, 4683, 4684, 4687, 4688, 4689, 4692, 4693, 4696, 4697, 4700, 4701, 4702, 4703, 4704, 4707, 4708, 4711, 4712, 4715, 4716, 4717, 4718, 4719, 4720, 4721, 4722, 4723, 4726, 4729, 4730, 4733, 4736, /* 1301-(NFLS+NFPL) */ 4737, 4740, 4741, 4742, 4745, 4746, 4749, 4752, 4753 }; /* Amplitude coefficients (microarcsec); indexed using the nc array. */ static const double a[] = { /* 1-105 */ -6844318.44, 9205236.26,1328.67,1538.18, 205833.11, 153041.79, -3309.73, 853.32,2037.98, -2301.27, 81.46, 120.56, -20.39, -15.22, 1.73, -1.61, -0.10, 0.11, -0.02, -0.02, -523908.04, 573033.42,-544.75,-458.66, 12814.01, 11714.49, 198.97,-290.91, 155.74,-143.27, -2.75, -1.03, -1.27, -1.16, 0.00, -0.01, -90552.22, 97846.69, 111.23, 137.41,2187.91,2024.68, 41.44, -51.26, 26.92, -24.46, -0.46, -0.28, -0.22, -0.20, 82168.76, -89618.24, -27.64, -29.05, -2004.36, -1837.32, -36.07, 48.00, -24.43, 22.41, 0.47, 0.24, 0.20, 0.18, 58707.02,7387.02, 470.05,-192.40, 164.33, -1312.21, -179.73, -28.93, -17.36, -1.83, -0.50, 3.57, 0.00, 0.13, -20557.78, 22438.42, -20.84, -17.40, 501.82, 459.68, 59.20, -67.30, 6.08, -5.61, -1.36, -1.19, 28288.28, -674.99, -34.69, 35.80, -15.07,-632.54, -11.19, 0.78, -8.41, 0.17, 0.01, 0.07, -15406.85, 20069.50, 15.12, /* 106-219 */ 31.80, 448.76, 344.50, -5.77, 1.41, 4.59, -5.02, 0.17, 0.24, -11991.74, 12902.66, 32.46, 36.70, 288.49, 268.14, 5.70, -7.06, 3.57, -3.23, -0.06, -0.04, -8584.95, -9592.72, 4.42, -13.20,-214.50, 192.06, 23.87, 29.83, 2.54, 2.40, 0.60, -0.48,5095.50, -6918.22, 7.19, 3.92,-154.91,-113.94, 2.86, -1.04, -1.52, 1.73, -0.07, -0.10, -4910.93, -5331.13, 0.76, 0.40,-119.21, 109.81, 2.16, 3.20, 1.46, 1.33, 0.04, -0.02, -6245.02,-123.48, -6.68, -8.20, -2.76, 139.64, 2.71, 0.15, 1.86,2511.85, -3323.89, 1.07, -0.90, -74.33, -56.17, 1.16, -0.01, -0.75, 0.83, -0.02, -0.04,2307.58,3143.98, -7.52, 7.50, 70.31, -51.60, 1.46, 0.16, -0.69, -0.79, 0.02, -0.05,2372.58,2554.51, 5.93, -6.60, 57.12, -53.05, -0.96, -1.24, -0.71, -0.64, -0.01, -2053.16,2636.13, 5.13, 7.80, 58.94, 45.91, -0.42, -0.12, 0.61, -0.66, 0.02, 0.03, -1825.49, /* 220-339 */ -2423.59, 1.23, -2.00, -54.19, 40.82, -1.07, -1.02, 0.54, 0.61, -0.04, 0.04,2521.07,-122.28, -5.97, 2.90, -2.73, -56.37, -0.82, 0.13, -0.75, -1534.09,1645.01, 6.29, 6.80, 36.78, 34.30, 0.92, -1.25, 0.46, -0.41, -0.02, -0.01,1898.27, 47.70, -0.72, 2.50, 1.07, -42.45, -0.94, 0.02, -0.56, -1292.02, -1387.00, 0.00, 0.00, -31.01, 28.89, 0.68, 0.00, 0.38, 0.35, -0.01, -0.01, -1234.96,1323.81, 5.21, 5.90, 29.60, 27.61, 0.74, -1.22, 0.37, -0.33, -0.02, -0.01,1137.48, -1233.89, -0.04, -0.30, -27.59, -25.43, -0.61, 1.00, -0.34, 0.31, 0.01, 0.01,-813.13, -1075.60, 0.40, 0.30, -24.05, 18.18, -0.40, -0.01, 0.24, 0.27, -0.01, 0.01,1163.22, -60.90, -2.94, 1.30, -1.36, -26.01, -0.58, 0.07, -0.35,1029.70, -55.55, -2.63, 1.10, -1.25, -23.02, -0.52, 0.06, -0.31,-556.26, 852.85, 3.16, -4.48, 19.06, 12.44, -0.81, -0.27, 0.17, -0.21, 0.00, 0.02,-603.52, /* 340-467 */ -800.34, 0.44, 0.10, -17.90, 13.49, -0.08, -0.01, 0.18, 0.20, -0.01, 0.01,-628.24, 684.99, -0.64, -0.50, 15.32, 14.05, 3.18, -4.19, 0.19, -0.17, -0.09, -0.07,-866.48, -16.26, 0.52, -1.30, -0.36, 19.37, 0.43, -0.01, 0.26, -512.37, 695.54, -1.47, -1.40, 15.55, 11.46, -0.16, 0.03, 0.15, -0.17, 0.01, 0.01, 506.65, 643.75, 2.54, -2.62, 14.40, -11.33, -0.77, -0.06, -0.15, -0.16, 0.00, 0.01, 664.57, 16.81, -0.40, 1.00, 0.38, -14.86, -3.71, -0.09, -0.20, 405.91, 522.11, 0.99, -1.50, 11.67, -9.08, -0.25, -0.02, -0.12, -0.13,-305.78, 326.60, 1.75, 1.90, 7.30, 6.84, 0.20, -0.04, 300.99,-325.03, -0.44, -0.50, -7.27, -6.73, -1.01, 0.01, 0.00, 0.08, 0.00, 0.02, 438.51, 10.47, -0.56, -0.20, 0.24, -9.81, -0.24, 0.01, -0.13, -264.02, 335.24, 0.99, 1.40, 7.49, 5.90, -0.27, -0.02, 284.09, 307.03, 0.32, -0.40, 6.87, -6.35, -0.99, -0.01, -250.54, 327.11, 0.08, 0.40, 7.31, 5.60, -0.30, 230.72, /* 468-595 */ -304.46, 0.08, -0.10, -6.81, -5.16, 0.27, 229.78, 304.17, -0.60, 0.50, 6.80, -5.14, 0.33, 0.01, 256.30,-276.81, -0.28, -0.40, -6.19, -5.73, -0.14, 0.01,-212.82, 269.45, 0.84, 1.20, 6.02, 4.76, 0.14, -0.02, 196.64, 272.05, -0.84, 0.90, 6.08, -4.40, 0.35, 0.02, 188.95, 272.22, -0.12, 0.30, 6.09, -4.22, 0.34,-292.37, -5.10, -0.32, -0.40, -0.11, 6.54, 0.14, 0.01, 161.79,-220.67, 0.24, 0.10, -4.93, -3.62, -0.08, 261.54, -19.94, -0.95, 0.20, -0.45, -5.85, -0.13, 0.02, 142.16,-190.79, 0.20, 0.10, -4.27, -3.18, -0.07, 187.95, -4.11, -0.24, 0.30, -0.09, -4.20, -0.09, 0.01, 0.00, 0.00, -79.08, 167.90, 0.04, 0.00, 3.75, 1.77, 121.98, 131.04, -0.08, 0.10, 2.93, -2.73, -0.06,-172.95, -8.11, -0.40, -0.20, -0.18, 3.87, 0.09, 0.01,-160.15, -55.30, -14.04, 13.90, -1.23, 3.58, 0.40, 0.31,-115.40, 123.20, 0.60, 0.70, 2.75, 2.58, 0.08, -0.01,-168.26, -2.00, 0.20, -0.20, -0.04, 3.76, /* 596-723 */ 0.08,-114.49, 123.20, 0.32, 0.40, 2.75, 2.56, 0.07, -0.01, 112.14, 120.70, 0.28, -0.30, 2.70, -2.51, -0.07, -0.01, 161.34, 4.03, 0.20, 0.20, 0.09, -3.61, -0.08, 91.31, 126.64, -0.40, 0.40, 2.83, -2.04, -0.04, 0.01, 105.29, 112.90, 0.44, -0.50, 2.52, -2.35, -0.07, -0.01, 98.69,-106.20, -0.28, -0.30, -2.37, -2.21, -0.06, 0.01, 86.74,-112.94, -0.08, -0.20, -2.53, -1.94, -0.05,-134.81, 3.51, 0.20, -0.20, 0.08, 3.01, 0.07, 79.03, 107.31, -0.24, 0.20, 2.40, -1.77, -0.04, 0.01, 132.81, -10.77, -0.52, 0.10, -0.24, -2.97, -0.07, 0.01,-130.31, -0.90, 0.04, 0.00, 0.00, 2.91, -78.56, 85.32, 0.00, 0.00, 1.91, 1.76, 0.04, 0.00, 0.00, -41.53, 89.10, 0.02, 0.00, 1.99, 0.93, 66.03, -71.00, -0.20, -0.20, -1.59, -1.48, -0.04, 60.50, 64.70, 0.36, -0.40, 1.45, -1.35, -0.04, -0.01, -52.27, -70.01, 0.00, 0.00, -1.57, 1.17, 0.03, -52.95, 66.29, 0.32, 0.40, 1.48, 1.18, 0.04, /* 724-851 */ -0.01, 51.02, 67.25, 0.00, 0.00, 1.50, -1.14, -0.03, -55.66, -60.92, 0.16, -0.20, -1.36, 1.24, 0.03, -54.81, -59.20, -0.08, 0.20, -1.32, 1.23, 0.03, 51.32, -55.60, 0.00, 0.00, -1.24, -1.15, -0.03, 48.29, 51.80, 0.20, -0.20, 1.16, -1.08, -0.03, -45.59, -49.00, -0.12, 0.10, -1.10, 1.02, 0.03, 40.54, -52.69, -0.04, -0.10, -1.18, -0.91, -0.02, -40.58, -49.51, -1.00, 1.00, -1.11, 0.91, 0.04, 0.02, -43.76, 46.50, 0.36, 0.40, 1.04, 0.98, 0.03, -0.01, 62.65, -5.00, -0.24, 0.00, -0.11, -1.40, -0.03, 0.01, -38.57, 49.59, 0.08, 0.10, 1.11, 0.86, 0.02, -33.22, -44.04, 0.08, -0.10, -0.98, 0.74, 0.02, 37.15, -39.90, -0.12, -0.10, -0.89, -0.83, -0.02, 36.68, -39.50, -0.04, -0.10, -0.88, -0.82, -0.02, -53.22, -3.91, -0.20, 0.00, -0.09, 1.19, 0.03, 32.43, -42.19, -0.04, -0.10, -0.94, -0.73, -0.02, -51.00, -2.30, -0.12, -0.10, 0.00, 1.14, -29.53, -39.11, 0.04, 0.00, -0.87, 0.66, /* 852-979 */ 0.02, 28.50, -38.92, -0.08, -0.10, -0.87, -0.64, -0.02, 26.54, 36.95, -0.12, 0.10, 0.83, -0.59, -0.01, 26.54, 34.59, 0.04, -0.10, 0.77, -0.59, -0.02, 28.35, -32.55, -0.16, 0.20, -0.73, -0.63, -0.01, -28.00, 30.40, 0.00, 0.00, 0.68, 0.63, 0.01, -27.61, 29.40, 0.20, 0.20, 0.66, 0.62, 0.02, 40.33, 0.40, -0.04, 0.10, 0.00, -0.90, -23.28, 31.61, -0.08, -0.10, 0.71, 0.52, 0.01, 37.75, 0.80, 0.04, 0.10, 0.00, -0.84, 23.66, 25.80, 0.00, 0.00, 0.58, -0.53, -0.01, 21.01, -27.91, 0.00, 0.00, -0.62, -0.47, -0.01, -34.81, 2.89, 0.04, 0.00, 0.00, 0.78, -23.49, -25.31, 0.00, 0.00, -0.57, 0.53, 0.01, -23.47, 25.20, 0.16, 0.20, 0.56, 0.52, 0.02, 19.58, 27.50, -0.12, 0.10, 0.62, -0.44, -0.01, -22.67, -24.40, -0.08, 0.10, -0.55, 0.51, 0.01, -19.97, 25.00, 0.12, 0.20, 0.56, 0.45, 0.01, 21.28, -22.80, -0.08, -0.10, -0.51, -0.48, -0.01, -30.47, 0.91, 0.04, 0.00, /* 980-1107 */ 0.00, 0.68, 18.58, 24.00, 0.04, -0.10, 0.54, -0.42, -0.01, -18.02, 24.40, -0.04, -0.10, 0.55, 0.40, 0.01, 17.74, 22.50, 0.08, -0.10, 0.50, -0.40, -0.01, -19.41, 20.70, 0.08, 0.10, 0.46, 0.43, 0.01, -18.64, 20.11, 0.00, 0.00, 0.45, 0.42, 0.01, -16.75, 21.60, 0.04, 0.10, 0.48, 0.37, 0.01, -18.42, -20.00, 0.00, 0.00, -0.45, 0.41, 0.01, -26.77, 1.41, 0.08, 0.00, 0.00, 0.60, -26.17, -0.19, 0.00, 0.00, 0.00, 0.59, -15.52, 20.51, 0.00, 0.00, 0.46, 0.35, 0.01, -25.42, -1.91, -0.08, 0.00, -0.04, 0.57, 0.45, -17.42, 18.10, 0.00, 0.00, 0.40, 0.39, 0.01, 16.39, -17.60, -0.08, -0.10, -0.39, -0.37, -0.01, -14.37, 18.91, 0.00, 0.00, 0.42, 0.32, 0.01, 23.39, -2.40, -0.12, 0.00, 0.00, -0.52, 14.32, -18.50, -0.04, -0.10, -0.41, -0.32, -0.01, 15.69, 17.08, 0.00, 0.00, 0.38, -0.35, -0.01, -22.99, 0.50, 0.04, 0.00, 0.00, 0.51, 0.00, 0.00, 14.47, -17.60, /* 1108-1235 */ -0.01, 0.00, -0.39, -0.32, -13.33, 18.40, -0.04, -0.10, 0.41, 0.30, 22.47, -0.60, -0.04, 0.00, 0.00, -0.50, -12.78, -17.41, 0.04, 0.00, -0.39, 0.29, 0.01, -14.10, -15.31, 0.04, 0.00, -0.34, 0.32, 0.01, 11.98, 16.21, -0.04, 0.00, 0.36, -0.27, -0.01, 19.65, -1.90, -0.08, 0.00, 0.00, -0.44, 19.61, -1.50, -0.08, 0.00, 0.00, -0.44, 13.41, -14.30, -0.04, -0.10, -0.32, -0.30, -0.01, -13.29, 14.40, 0.00, 0.00, 0.32, 0.30, 0.01, 11.14, -14.40, -0.04, 0.00, -0.32, -0.25, -0.01, 12.24, -13.38, 0.04, 0.00, -0.30, -0.27, -0.01, 10.07, -13.81, 0.04, 0.00, -0.31, -0.23, -0.01, 10.46, 13.10, 0.08, -0.10, 0.29, -0.23, -0.01, 16.55, -1.71, -0.08, 0.00, 0.00, -0.37, 9.75, -12.80, 0.00, 0.00, -0.29, -0.22, -0.01, 9.11, 12.80, 0.00, 0.00, 0.29, -0.20, 0.00, 0.00, -6.44, -13.80, 0.00, 0.00, -0.31, 0.14, -9.19, -12.00, 0.00, 0.00, -0.27, 0.21, -10.30, 10.90, 0.08, 0.10, /* 1236-1363 */ 0.24, 0.23, 0.01, 14.92, -0.80, -0.04, 0.00, 0.00, -0.33, 10.02, -10.80, 0.00, 0.00, -0.24, -0.22, -0.01, -9.75, 10.40, 0.04, 0.00, 0.23, 0.22, 0.01, 9.67, -10.40, -0.04, 0.00, -0.23, -0.22, -0.01, -8.28, -11.20, 0.04, 0.00, -0.25, 0.19, 13.32, -1.41, -0.08, 0.00, 0.00, -0.30, 8.27, 10.50, 0.04, 0.00, 0.23, -0.19, 0.00, 0.00, 13.13, 0.00, 0.00, 0.00, 0.00, -0.29, -12.93, 0.70, 0.04, 0.00, 0.00, 0.29, 7.91, -10.20, 0.00, 0.00, -0.23, -0.18, -7.84, -10.00, -0.04, 0.00, -0.22, 0.18, 7.44, 9.60, 0.00, 0.00, 0.21, -0.17, -7.64, 9.40, 0.08, 0.10, 0.21, 0.17, 0.01, -11.38, 0.60, 0.04, 0.00, 0.00, 0.25, -7.48, 8.30, 0.00, 0.00, 0.19, 0.17, -10.98, -0.20, 0.00, 0.00, 0.00, 0.25, 10.98, 0.20, 0.00, 0.00, 0.00, -0.25, 7.40, -7.90, -0.04, 0.00, -0.18, -0.17, -6.09, 8.40, -0.04, 0.00, 0.19, 0.14, -6.94, -7.49, 0.00, 0.00, -0.17, /* 1364-1491 */ 0.16, 6.92, 7.50, 0.04, 0.00, 0.17, -0.15, 6.20, 8.09, 0.00, 0.00, 0.18, -0.14, -6.12, 7.80, 0.04, 0.00, 0.17, 0.14, 5.85, -7.50, 0.00, 0.00, -0.17, -0.13, -6.48, 6.90, 0.08, 0.10, 0.15, 0.14, 0.01, 6.32, 6.90, 0.00, 0.00, 0.15, -0.14, 5.61, -7.20, 0.00, 0.00, -0.16, -0.13, 9.07, 0.00, 0.00, 0.00, 0.00, -0.20, 5.25, 6.90, 0.00, 0.00, 0.15, -0.12, -8.47, -0.40, 0.00, 0.00, 0.00, 0.19, 6.32, -5.39, -1.11, 1.10, -0.12, -0.14, 0.02, 0.02, 5.73, -6.10, -0.04, 0.00, -0.14, -0.13, 4.70, 6.60, -0.04, 0.00, 0.15, -0.11, -4.90, -6.40, 0.00, 0.00, -0.14, 0.11, -5.33, 5.60, 0.04, 0.10, 0.13, 0.12, 0.01, -4.81, 6.00, 0.04, 0.00, 0.13, 0.11, 5.13, 5.50, 0.04, 0.00, 0.12, -0.11, 4.50, 5.90, 0.00, 0.00, 0.13, -0.10, -4.22, 6.10, 0.00, 0.00, 0.14, -4.53, 5.70, 0.00, 0.00, 0.13, 0.10, 4.18, 5.70, 0.00, 0.00, /* 1492-1619 */ 0.13, -4.75, -5.19, 0.00, 0.00, -0.12, 0.11, -4.06, 5.60, 0.00, 0.00, 0.13, -3.98, 5.60, -0.04, 0.00, 0.13, 4.02, -5.40, 0.00, 0.00, -0.12, 4.49, -4.90, -0.04, 0.00, -0.11, -0.10, -3.62, -5.40, -0.16, 0.20, -0.12, 0.00, 0.01, 4.38, 4.80, 0.00, 0.00, 0.11, -6.40, -0.10, 0.00, 0.00, 0.00, 0.14, -3.98, 5.00, 0.04, 0.00, 0.11, -3.82, -5.00, 0.00, 0.00, -0.11, -3.71, 5.07, 0.00, 0.00, 0.11, 4.14, 4.40, 0.00, 0.00, 0.10, -6.01, -0.50, -0.04, 0.00, 0.00, 0.13, -4.04, 4.39, 0.00, 0.00, 0.10, 3.45, -4.72, 0.00, 0.00, -0.11, 3.31, 4.71, 0.00, 0.00, 0.11, 3.26, -4.50, 0.00, 0.00, -0.10, -3.26, -4.50, 0.00, 0.00, -0.10, -3.34, -4.40, 0.00, 0.00, -0.10, -3.74, -4.00, 3.70, 4.00, 3.34, -4.30, 3.30, -4.30, -3.66, 3.90, 0.04, 3.66, 3.90, 0.04, -3.62, -3.90, -3.61, 3.90, -0.20, 5.30, 0.00, 0.00, 0.12, 3.06, 4.30, 3.30, /* 1620-1747 */ 4.00, 0.40, 0.20, 3.10, 4.10, -3.06, 3.90, -3.30, -3.60, -3.30, 3.36, 0.01, 3.14, 3.40, -4.57, -0.20, 0.00, 0.00, 0.00, 0.10, -2.70, -3.60, 2.94, -3.20, -2.90, 3.20, 2.47, -3.40, 2.55, -3.30, 2.80, -3.08, 2.51, 3.30, -4.10, 0.30, -0.12, -0.10, 4.10, 0.20, -2.74, 3.00, 2.46, 3.23, -3.66, 1.20, -0.20, 0.20, 3.74, -0.40, -2.51, -2.80, -3.74, 2.27, -2.90, 0.00, 0.00, -2.50, 2.70, -2.51, 2.60, -3.50, 0.20, 3.38, -2.22, -2.50, 3.26, -0.40, 1.95, -2.60, 3.22, -0.40, -0.04, -1.79, -2.60, 1.91, 2.50, 0.74, 3.05, -0.04, 0.08, 2.11, -2.30, -2.11, 2.20, -1.87, -2.40, 2.03, -2.20, -2.03, 2.20, 2.98, 0.00, 0.00, 2.98, -1.71, 2.40, 2.94, -0.10, -0.12, 0.10, 1.67, 2.40, -1.79, 2.30, -1.79, 2.20, -1.67, 2.20, 1.79, -2.00, 1.87, -1.90, 1.63, -2.10, -1.59, 2.10, 1.55, -2.10, -1.55, 2.10, -2.59, -0.20, -1.75, -1.90, -1.75, 1.90, -1.83, /* 1748-1875 */ -1.80, 1.51, 2.00, -1.51, -2.00, 1.71, 1.80, 1.31, 2.10, -1.43, 2.00, 1.43, 2.00, -2.43, -1.51, 1.90, -1.47, 1.90, 2.39, 0.20, -2.39, 1.39, 1.90, 1.39, -1.80, 1.47, -1.60, 1.47, -1.60, 1.43, -1.50, -1.31, 1.60, 1.27, -1.60, -1.27, 1.60, 1.27, -1.60, 2.03, 1.35, 1.50, -1.39, -1.40, 1.95, -0.20, -1.27, 1.49, 1.19, 1.50, 1.27, 1.40, 1.15, 1.50, 1.87, -0.10, -1.12, -1.50, 1.87, -1.11, -1.50, -1.11, -1.50, 0.00, 0.00, 1.19, 1.40, 1.27, -1.30, -1.27, -1.30, -1.15, 1.40, -1.23, 1.30, -1.23, -1.30, 1.22, -1.29, 1.07, -1.40, 1.75, -0.20, -1.03, -1.40, -1.07, 1.20, -1.03, 1.15, 1.07, 1.10, 1.51, -1.03, 1.10, 1.03, -1.10, 0.00, 0.00, -1.03, -1.10, 0.91, -1.20, -0.88, -1.20, -0.88, 1.20, -0.95, 1.10, -0.95, -1.10, 1.43, -1.39, 0.95, -1.00, -0.95, 1.00, -0.80, 1.10, 0.91, -1.00, -1.35, 0.88, 1.00, -0.83, 1.00, -0.91, 0.90, 0.91, /* 1876-2003 */ 0.90, 0.88, -0.90, -0.76, -1.00, -0.76, 1.00, 0.76, 1.00, -0.72, 1.00, 0.84, -0.90, 0.84, 0.90, 1.23, 0.00, 0.00, -0.52, -1.10, -0.68, 1.00, 1.19, -0.20, 1.19, 0.76, 0.90, 1.15, -0.10, 1.15, -0.10, 0.72, -0.90, -1.15, -1.15, 0.68, 0.90, -0.68, 0.90, -1.11, 0.00, 0.00, 0.20, 0.79, 0.80, -1.11, -0.10, 0.00, 0.00, -0.48, -1.00, -0.76, -0.80, -0.72, -0.80, -1.07, -0.10, 0.64, 0.80, -0.64, -0.80, 0.64, 0.80, 0.40, 0.60, 0.52, -0.50, -0.60, -0.80, -0.71, 0.70, -0.99, 0.99, 0.56, 0.80, -0.56, 0.80, 0.68, -0.70, 0.68, 0.70, -0.95, -0.64, 0.70, 0.64, 0.70, -0.60, 0.70, -0.60, -0.70, -0.91, -0.10, -0.51, 0.76, -0.91, -0.56, 0.70, 0.88, 0.88, -0.63, -0.60, 0.55, -0.60, -0.80, 0.80, -0.80, -0.52, 0.60, 0.52, 0.60, 0.52, -0.60, -0.48, 0.60, 0.48, 0.60, 0.48, 0.60, -0.76, 0.44, -0.60, 0.52, -0.50, -0.52, 0.50, 0.40, 0.60, -0.40, /* 2004-2131 */ -0.60, 0.40, -0.60, 0.72, -0.72, -0.51, -0.50, -0.48, 0.50, 0.48, -0.50, -0.48, 0.50, -0.48, 0.50, 0.48, -0.50, -0.48, -0.50, -0.68, -0.68, 0.44, 0.50, -0.64, -0.10, -0.64, -0.10, -0.40, 0.50, 0.40, 0.50, 0.40, 0.50, 0.00, 0.00, -0.40, -0.50, -0.36, -0.50, 0.36, -0.50, 0.60, -0.60, 0.40, -0.40, 0.40, 0.40, -0.40, 0.40, -0.40, 0.40, -0.56, -0.56, 0.36, -0.40, -0.36, 0.40, 0.36, -0.40, -0.36, -0.40, 0.36, 0.40, 0.36, 0.40, -0.52, 0.52, 0.52, 0.32, 0.40, -0.32, 0.40, -0.32, 0.40, -0.32, 0.40, 0.32, -0.40, -0.32, -0.40, 0.32, -0.40, 0.28, -0.40, -0.28, 0.40, 0.28, -0.40, 0.28, 0.40, 0.48, -0.48, 0.48, 0.36, -0.30, -0.36, -0.30, 0.00, 0.00, 0.20, 0.40, -0.44, 0.44, -0.44, -0.44, -0.44, -0.44, 0.32, -0.30, 0.32, 0.30, 0.24, 0.30, -0.12, -0.10, -0.28, 0.30, 0.28, 0.30, 0.28, 0.30, 0.28, -0.30, 0.28, -0.30, 0.28, -0.30, 0.28, /* 2132-2259 */ 0.30, -0.28, 0.30, 0.40, 0.40, -0.24, 0.30, 0.24, -0.30, 0.24, -0.30, -0.24, -0.30, 0.24, 0.30, 0.24, -0.30, -0.24, 0.30, 0.24, -0.30, -0.24, -0.30, 0.24, -0.30, 0.24, 0.30, -0.24, 0.30, -0.24, 0.30, 0.20, -0.30, 0.20, -0.30, 0.20, -0.30, 0.20, 0.30, 0.20, -0.30, 0.20, -0.30, 0.20, 0.30, 0.20, 0.30, -0.20, -0.30, 0.20, -0.30, 0.20, -0.30, -0.36, -0.36, -0.36, -0.04, 0.30, 0.12, -0.10, -0.32, -0.24, 0.20, 0.24, 0.20, 0.20, -0.20, -0.20, -0.20, -0.20, -0.20, 0.20, 0.20, 0.20, -0.20, 0.20, 0.20, 0.20, 0.20, -0.20, -0.20, 0.00, 0.00, -0.20, -0.20, -0.20, 0.20, -0.20, 0.20, 0.20, -0.20, -0.20, -0.20, 0.20, 0.20, 0.20, 0.20, 0.20, -0.20, 0.20, -0.20, 0.28, 0.28, 0.28, 0.28, 0.28, 0.28, -0.28, 0.28, 0.12, 0.00, 0.24, 0.16, -0.20, 0.16, -0.20, 0.16, -0.20, 0.16, 0.20, -0.16, 0.20, 0.16, 0.20, -0.16, 0.20, -0.16, 0.20, /* 2260-2387 */ -0.16, 0.20, 0.16, -0.20, 0.16, 0.20, 0.16, -0.20, -0.16, 0.20, -0.16, -0.20, -0.16, 0.20, 0.16, 0.20, 0.16, -0.20, 0.16, -0.20, 0.16, 0.20, 0.16, 0.20, 0.16, 0.20, -0.16, -0.20, 0.16, 0.20, -0.16, 0.20, 0.16, 0.20, -0.16, -0.20, 0.16, -0.20, 0.16, -0.20, -0.16, -0.20, 0.24, -0.24, -0.24, 0.24, 0.24, 0.12, 0.20, 0.12, 0.20, -0.12, -0.20, 0.12, -0.20, 0.12, -0.20, -0.12, 0.20, -0.12, 0.20, -0.12, -0.20, 0.12, 0.20, 0.12, 0.20, 0.12, -0.20, -0.12, 0.20, 0.12, -0.20, -0.12, 0.20, 0.12, 0.20, 0.00, 0.00, -0.12, 0.20, -0.12, 0.20, 0.12, -0.20, -0.12, 0.20, 0.12, 0.20, 0.00, -0.21, -0.20, 0.00, 0.00, 0.20, -0.20, -0.20, -0.20, 0.20, -0.16, -0.10, 0.00, 0.17, 0.16, 0.16, 0.16, 0.16, -0.16, 0.16, 0.16, -0.16, 0.16, -0.16, 0.16, 0.12, 0.10, 0.12, -0.10, -0.12, 0.10, -0.12, 0.10, 0.12, -0.10, -0.12, 0.12, -0.12, 0.12, /* 2388-2515 */ -0.12, 0.12, -0.12, -0.12, -0.12, -0.12, -0.12, -0.12, -0.12, 0.12, 0.12, 0.12, 0.12, -0.12, -0.12, 0.12, 0.12, 0.12, -0.12, 0.12, -0.12, -0.12, -0.12, 0.12, -0.12, -0.12, 0.12, 0.00, 0.11, 0.11,-122.67, 164.70, 203.78, 273.50, 3.58, 2.74, 6.18, -4.56, 0.00, -0.04, 0.00, -0.07, 57.44, -77.10, 95.82, 128.60, -1.77, -1.28, 2.85, -2.14, 82.14, 89.50, 0.00, 0.00, 2.00, -1.84, -0.04, 47.73, -64.10, 23.79, 31.90, -1.45, -1.07, 0.69, -0.53, -46.38, 50.50, 0.00, 0.00, 1.13, 1.04, 0.02, -18.38, 0.00, 63.80, 0.00, 0.00, 0.41, 0.00, -1.43, 59.07, 0.00, 0.00, 0.00, 0.00, -1.32, 57.28, 0.00, 0.00, 0.00, 0.00, -1.28, -48.65, 0.00, -1.15, 0.00, 0.00, 1.09, 0.00, 0.03, -18.30, 24.60, -17.30, -23.20, 0.56, 0.41, -0.51, 0.39, -16.91, 26.90, 8.43, 13.30, 0.60, 0.38, 0.31, -0.19, 1.23, -1.70, -19.13, -25.70, -0.03, -0.03, -0.58, 0.43, -0.72, 0.90, -17.34, -23.30, /* 2516-2643 */ 0.03, 0.02, -0.52, 0.39, -19.49, -21.30, 0.00, 0.00, -0.48, 0.44, 0.01, 20.57, -20.10, 0.64, 0.70, -0.45, -0.46, 0.00, -0.01, 4.89, 5.90, -16.55, 19.90, 0.14, -0.11, 0.44, 0.37, 18.22, 19.80, 0.00, 0.00, 0.44, -0.41, -0.01, 4.89, -5.30, -16.51, -18.00, -0.11, -0.11, -0.41, 0.37, -17.86, 0.00, 17.10, 0.00, 0.00, 0.40, 0.00, -0.38, 0.32, 0.00, 24.42, 0.00, 0.00, -0.01, 0.00, -0.55, -23.79, 0.00, 0.00, 0.00, 0.00, 0.53, 14.72, -16.00, -0.32, 0.00, -0.36, -0.33, -0.01, 0.01, 3.34, -4.50, 11.86, 15.90, -0.11, -0.07, 0.35, -0.27, -3.26, 4.40, 11.62, 15.60, 0.09, 0.07, 0.35, -0.26, -19.53, 0.00, 5.09, 0.00, 0.00, 0.44, 0.00, -0.11, -13.48, 14.70, 0.00, 0.00, 0.33, 0.30, 0.01, 10.86, -14.60, 3.18, 4.30, -0.33, -0.24, 0.09, -0.07, -11.30, -15.10, 0.00, 0.00, -0.34, 0.25, 0.01, 2.03, -2.70, 10.82, 14.50, -0.07, -0.05, 0.32, -0.24, 17.46, 0.00, /* 2644-2771 */ 0.00, 0.00, 0.00, -0.39, 16.43, 0.00, 0.52, 0.00, 0.00, -0.37, 0.00, -0.01, 9.35, 0.00, 13.29, 0.00, 0.00, -0.21, 0.00, -0.30, -10.42, 11.40, 0.00, 0.00, 0.25, 0.23, 0.01, 0.44, 0.50, -10.38, 11.30, 0.02, -0.01, 0.25, 0.23, -14.64, 0.00, 0.00, 0.00, 0.00, 0.33, 0.56, 0.80, -8.67, 11.70, 0.02, -0.01, 0.26, 0.19, 13.88, 0.00, -2.47, 0.00, 0.00, -0.31, 0.00, 0.06, -1.99, 2.70, 7.72, 10.30, 0.06, 0.04, 0.23, -0.17, -0.20, 0.00, 13.05, 0.00, 0.00, 0.00, 0.00, -0.29, 6.92, -9.30, 3.34, 4.50, -0.21, -0.15, 0.10, -0.07, -6.60, 0.00, 10.70, 0.00, 0.00, 0.15, 0.00, -0.24, -8.04, -8.70, 0.00, 0.00, -0.19, 0.18, -10.58, 0.00, -3.10, 0.00, 0.00, 0.24, 0.00, 0.07, -7.32, 8.00, -0.12, -0.10, 0.18, 0.16, 1.63, 1.70, 6.96, -7.60, 0.03, -0.04, -0.17, -0.16, -3.62, 0.00, 9.86, 0.00, 0.00, 0.08, 0.00, -0.22, 0.20, -0.20, -6.88, /* 2772-2899 */ -7.50, 0.00, 0.00, -0.17, 0.15, -8.99, 0.00, 4.02, 0.00, 0.00, 0.20, 0.00, -0.09, -1.07, 1.40, -5.69, -7.70, 0.03, 0.02, -0.17, 0.13, 6.48, -7.20, -0.48, -0.50, -0.16, -0.14, -0.01, 0.01, 5.57, -7.50, 1.07, 1.40, -0.17, -0.12, 0.03, -0.02, 8.71, 0.00, 3.54, 0.00, 0.00, -0.19, 0.00, -0.08, 0.40, 0.00, 9.27, 0.00, 0.00, -0.01, 0.00, -0.21, -6.13, 6.70, -1.19, -1.30, 0.15, 0.14, -0.03, 0.03, 5.21, -5.70, -2.51, -2.60, -0.13, -0.12, -0.06, 0.06, 5.69, -6.20, -0.12, -0.10, -0.14, -0.13, -0.01, 2.03, -2.70, 4.53, 6.10, -0.06, -0.05, 0.14, -0.10, 5.01, 5.50, -2.51, 2.70, 0.12, -0.11, 0.06, 0.06, -1.91, 2.60, -4.38, -5.90, 0.06, 0.04, -0.13, 0.10, 4.65, -6.30, 0.00, 0.00, -0.14, -0.10, -5.29, 5.70, 0.00, 0.00, 0.13, 0.12, -2.23, -4.00, -4.65, 4.20, -0.09, 0.05, 0.10, 0.10, -4.53, 6.10, 0.00, 0.00, 0.14, 0.10, 2.47, 2.70, /* 2900-3027 */ -4.46, 4.90, 0.06, -0.06, 0.11, 0.10, -5.05, 5.50, 0.84, 0.90, 0.12, 0.11, 0.02, -0.02, 4.97, -5.40, -1.71, 0.00, -0.12, -0.11, 0.00, 0.04, -0.99, -1.30, 4.22, -5.70, -0.03, 0.02, -0.13, -0.09, 0.99, 1.40, 4.22, -5.60, 0.03, -0.02, -0.13, -0.09, -4.69, -5.20, 0.00, 0.00, -0.12, 0.10, -3.42, 0.00, 6.09, 0.00, 0.00, 0.08, 0.00, -0.14, -4.65, -5.10, 0.00, 0.00, -0.11, 0.10, 0.00, 0.00, -4.53, -5.00, 0.00, 0.00, -0.11, 0.10, -2.43, -2.70, -3.82, 4.20, -0.06, 0.05, 0.10, 0.09, 0.00, 0.00, -4.53, 4.90, 0.00, 0.00, 0.11, 0.10, -4.49, -4.90, 0.00, 0.00, -0.11, 0.10, 2.67, -2.90, -3.62, -3.90, -0.06, -0.06, -0.09, 0.08, 3.94, -5.30, 0.00, 0.00, -0.12, -3.38, 3.70, -2.78, -3.10, 0.08, 0.08, -0.07, 0.06, 3.18, -3.50, -2.82, -3.10, -0.08, -0.07, -0.07, 0.06, -5.77, 0.00, 1.87, 0.00, 0.00, 0.13, 0.00, -0.04, 3.54, -4.80, -0.64, /* 3028-3155 */ -0.90, -0.11, 0.00, -0.02, -3.50, -4.70, 0.68, -0.90, -0.11, 0.00, -0.02, 5.49, 0.00, 0.00, 0.00, 0.00, -0.12, 1.83, -2.50, 2.63, 3.50, -0.06, 0.00, 0.08, 3.02, -4.10, 0.68, 0.90, -0.09, 0.00, 0.02, 0.00, 0.00, 5.21, 0.00, 0.00, 0.00, 0.00, -0.12, -3.54, 3.80, 2.70, 3.60, -1.35, 1.80, 0.08, 0.00, 0.04, -2.90, 3.90, 0.68, 0.90, 0.09, 0.00, 0.02, 0.80, -1.10, -2.78, -3.70, -0.02, 0.00, -0.08, 4.10, 0.00, -2.39, 0.00, 0.00, -0.09, 0.00, 0.05, -1.59, 2.10, 2.27, 3.00, 0.05, 0.00, 0.07, -2.63, 3.50, -0.48, -0.60, -2.94, -3.20, -2.94, 3.20, 2.27, -3.00, -1.11, -1.50, -0.07, 0.00, -0.03, -0.56, -0.80, -2.35, 3.10, 0.00, -0.60, -3.42, 1.90, -0.12, -0.10, 2.63, -2.90, 2.51, 2.80, -0.64, 0.70, -0.48, -0.60, 2.19, -2.90, 0.24, -0.30, 2.15, 2.90, 2.15, -2.90, 0.52, 0.70, 2.07, -2.80, -3.10, 0.00, 1.79, 0.00, 0.00, 0.07, /* 3156-3283 */ 0.00, -0.04, 0.88, 0.00, -3.46, 2.11, 2.80, -0.36, 0.50, 3.54, -0.20, -3.50, -1.39, 1.50, -1.91, -2.10, -1.47, 2.00, 1.39, 1.90, 2.07, -2.30, 0.91, 1.00, 1.99, -2.70, 3.30, 0.00, 0.60, -0.44, -0.70, -1.95, 2.60, 2.15, -2.40, -0.60, -0.70, 3.30, 0.84, 0.00, -3.10, -3.10, 0.00, -0.72, -0.32, 0.40, -1.87, -2.50, 1.87, -2.50, 0.32, 0.40, -0.24, 0.30, -1.87, -2.50, -0.24, -0.30, 1.87, -2.50, -2.70, 0.00, 1.55, 2.03, 2.20, -2.98, -1.99, -2.20, 0.12, -0.10, -0.40, 0.50, 1.59, 2.10, 0.00, 0.00, -1.79, 2.00, -1.03, 1.40, -1.15, -1.60, 0.32, 0.50, 1.39, -1.90, 2.35, -1.27, 1.70, 0.60, 0.80, -0.32, -0.40, 1.35, -1.80, 0.44, 0.00, 2.23, -0.84, 0.90, -1.27, -1.40, -1.47, 1.60, -0.28, -0.30, -0.28, 0.40, -1.27, -1.70, 0.28, -0.40, -1.43, -1.50, 0.00, 0.00, -1.27, -1.70, 2.11, -0.32, -0.40, -1.23, 1.60, 1.19, -1.30, -0.72, -0.80, 0.72, /* 3284-3411 */ -0.80, -1.15, -1.30, -1.35, -1.50, -1.19, -1.60, -0.12, 0.20, 1.79, 0.00, -0.88, -0.28, 0.40, 1.11, 1.50, -1.83, 0.00, 0.56, -0.12, 0.10, -1.27, -1.40, 0.00, 0.00, 1.15, 1.50, -0.12, 0.20, 1.11, 1.50, 0.36, -0.50, -1.07, -1.40, -1.11, 1.50, 1.67, 0.00, 0.80, -1.11, 0.00, 1.43, 1.23, -1.30, -0.24, -1.19, -1.30, -0.24, 0.20, -0.44, -0.90, -0.95, 1.10, 1.07, -1.40, 1.15, -1.30, 1.03, -1.10, -0.56, -0.60, -0.68, 0.90, -0.76, -1.00, -0.24, -0.30, 0.95, -1.30, 0.56, 0.70, 0.84, -1.10, -0.56, 0.00, -1.55, 0.91, -1.30, 0.28, 0.30, 0.16, -0.20, 0.95, 1.30, 0.40, -0.50, -0.88, -1.20, 0.95, -1.10, -0.48, -0.50, 0.00, 0.00, -1.07, 1.20, 0.44, -0.50, 0.95, 1.10, 0.00, 0.00, 0.92, -1.30, 0.95, 1.00, -0.52, 0.60, 1.59, 0.24, -0.40, 0.91, 1.20, 0.84, -1.10, -0.44, -0.60, 0.84, 1.10, -0.44, 0.60, -0.44, 0.60, -0.84, -1.10, -0.80, 0.00, /* 3412-3539 */ 1.35, 0.76, 0.20, -0.91, -1.00, 0.20, -0.30, -0.91, -1.20, -0.95, 1.00, -0.48, -0.50, 0.88, 1.00, 0.48, -0.50, -0.95, -1.10, 0.20, -0.20, -0.99, 1.10, -0.84, 1.10, -0.24, -0.30, 0.20, -0.30, 0.84, 1.10, -1.39, 0.00, -0.28, -0.16, 0.20, 0.84, 1.10, 0.00, 0.00, 1.39, 0.00, 0.00, -0.95, 1.00, 1.35, -0.99, 0.00, 0.88, -0.52, 0.00, -1.19, 0.20, 0.20, 0.76, -1.00, 0.00, 0.00, 0.76, 1.00, 0.00, 0.00, 0.76, 1.00, -0.76, 1.00, 0.00, 0.00, 1.23, 0.76, 0.80, -0.32, 0.40, -0.72, 0.80, -0.40, -0.40, 0.00, 0.00, -0.80, -0.90, -0.68, 0.90, -0.16, -0.20, -0.16, -0.20, 0.68, -0.90, -0.36, 0.50, -0.56, -0.80, 0.72, -0.90, 0.44, -0.60, -0.48, -0.70, -0.16, 0.00, -1.11, 0.32, 0.00, -1.07, 0.60, -0.80, -0.28, -0.40, -0.64, 0.00, 0.91, 1.11, 0.64, -0.90, 0.76, -0.80, 0.00, 0.00, -0.76, -0.80, 1.03, 0.00, -0.36, -0.64, -0.70, 0.36, -0.40, /* 3540-3667 */ 1.07, 0.36, -0.50, -0.52, -0.70, 0.60, 0.00, 0.88, 0.95, 0.00, 0.48, 0.16, -0.20, 0.60, 0.80, 0.16, -0.20, -0.60, -0.80, 0.00, -1.00, 0.12, 0.20, 0.16, -0.20, 0.68, 0.70, 0.59, -0.80, -0.99, -0.56, -0.60, 0.36, -0.40, -0.68, -0.70, -0.68, -0.70, -0.36, -0.50, -0.44, 0.60, 0.64, 0.70, -0.12, 0.10, -0.52, 0.60, 0.36, 0.40, 0.00, 0.00, 0.95, -0.84, 0.00, 0.44, 0.56, 0.60, 0.32, -0.30, 0.00, 0.00, 0.60, 0.70, 0.00, 0.00, 0.60, 0.70, -0.12, -0.20, 0.52, -0.70, 0.00, 0.00, 0.56, 0.70, -0.12, 0.10, -0.52, -0.70, 0.00, 0.00, 0.88, -0.76, 0.00, -0.44, 0.00, 0.00, -0.52, -0.70, 0.52, -0.70, 0.36, -0.40, -0.44, -0.50, 0.00, 0.00, 0.60, 0.60, 0.84, 0.00, 0.12, -0.24, 0.00, 0.80, -0.56, 0.60, -0.32, -0.30, 0.48, -0.50, 0.28, -0.30, -0.48, -0.50, 0.12, 0.20, 0.48, -0.60, 0.48, 0.60, -0.12, 0.20, 0.24, 0.00, 0.76, -0.52, /* 3668-3795 */ -0.60, -0.52, 0.60, 0.48, -0.50, -0.24, -0.30, 0.12, -0.10, 0.48, 0.60, 0.52, -0.20, 0.36, 0.40, -0.44, 0.50, -0.24, -0.30, -0.48, -0.60, -0.44, -0.60, -0.12, 0.10, 0.76, 0.76, 0.20, -0.20, 0.48, 0.50, 0.40, -0.50, -0.24, -0.30, 0.44, -0.60, 0.44, -0.60, 0.36, 0.00, -0.64, 0.72, 0.00, -0.12, 0.00, -0.10, -0.40, -0.60, -0.20, -0.20, -0.44, 0.50, -0.44, 0.50, 0.20, 0.20, -0.44, -0.50, 0.20, -0.20, -0.20, 0.20, -0.44, -0.50, 0.64, 0.00, 0.32, -0.36, 0.50, -0.20, -0.30, 0.12, -0.10, 0.48, 0.50, -0.12, 0.30, -0.36, -0.50, 0.00, 0.00, 0.48, 0.50, -0.48, 0.50, 0.68, 0.00, -0.12, 0.56, -0.40, 0.44, -0.50, -0.12, -0.10, 0.24, 0.30, -0.40, 0.40, 0.64, 0.00, -0.24, 0.64, 0.00, -0.20, 0.00, 0.00, 0.44, -0.50, 0.44, 0.50, -0.12, 0.20, -0.36, -0.50, 0.12, 0.00, 0.64, -0.40, 0.50, 0.00, 0.10, 0.00, 0.00, -0.40, 0.50, 0.00, 0.00, /* 3796-3923 */ -0.40, -0.50, 0.56, 0.00, 0.28, 0.00, 0.10, 0.36, 0.50, 0.00, -0.10, 0.36, -0.50, 0.36, 0.50, 0.00, -0.10, 0.24, -0.20, -0.36, -0.40, 0.16, 0.20, 0.40, -0.40, 0.00, 0.00, -0.36, -0.50, -0.36, -0.50, -0.32, -0.50, -0.12, 0.10, 0.20, 0.20, -0.36, 0.40, -0.60, 0.60, 0.28, 0.00, 0.52, 0.12, -0.10, 0.40, 0.40, 0.00, -0.50, 0.20, -0.20, -0.32, 0.40, 0.16, 0.20, -0.16, 0.20, 0.32, 0.40, 0.56, 0.00, -0.12, 0.32, -0.40, -0.16, -0.20, 0.00, 0.00, 0.40, 0.40, -0.40, -0.40, -0.40, 0.40, -0.36, 0.40, 0.12, 0.10, 0.00, 0.10, 0.36, 0.40, 0.00, -0.10, 0.36, 0.40, -0.36, 0.40, 0.00, 0.10, 0.32, 0.00, 0.44, 0.12, 0.20, 0.28, -0.40, 0.00, 0.00, 0.36, 0.40, 0.32, -0.40, -0.16, 0.12, 0.10, 0.32, -0.40, 0.20, 0.30, -0.24, 0.30, 0.00, 0.10, 0.32, 0.40, 0.00, -0.10, -0.32, -0.40, -0.32, 0.40, 0.00, 0.10, -0.52, -0.52, 0.52, /* 3924-4051 */ 0.32, -0.40, 0.00, 0.00, 0.32, 0.40, 0.32, -0.40, 0.00, 0.00, -0.32, -0.40, -0.32, 0.40, 0.32, 0.40, 0.00, 0.00, 0.32, 0.40, 0.00, 0.00, -0.32, -0.40, 0.00, 0.00, 0.32, 0.40, 0.16, 0.20, 0.32, -0.30, -0.16, 0.00, -0.48, -0.20, 0.20, -0.28, -0.30, 0.28, -0.40, 0.00, 0.00, 0.28, -0.40, 0.00, 0.00, 0.28, -0.40, 0.00, 0.00, -0.28, -0.40, 0.28, 0.40, -0.28, -0.40, -0.48, -0.20, 0.20, 0.24, 0.30, 0.44, 0.00, 0.16, 0.24, 0.30, 0.16, -0.20, 0.24, 0.30, -0.12, 0.20, 0.20, 0.30, -0.16, 0.20, 0.00, 0.00, 0.44, -0.32, 0.30, 0.24, 0.00, -0.36, 0.36, 0.00, 0.24, 0.12, -0.20, 0.20, 0.30, -0.12, 0.00, -0.28, 0.30, -0.24, 0.30, 0.12, 0.10, -0.28, -0.30, -0.28, 0.30, 0.00, 0.00, -0.28, -0.30, 0.00, 0.00, -0.28, -0.30, 0.00, 0.00, 0.28, 0.30, 0.00, 0.00, -0.28, -0.30, -0.28, 0.30, 0.00, 0.00, -0.28, -0.30, 0.00, 0.00, /* 4052-4179 */ 0.28, 0.30, 0.00, 0.00, -0.28, 0.30, 0.28, -0.30, -0.28, 0.30, 0.40, 0.40, -0.24, 0.30, 0.00, -0.10, 0.16, 0.00, 0.36, -0.20, 0.30, -0.12, -0.10, -0.24, -0.30, 0.00, 0.00, -0.24, 0.30, -0.24, 0.30, 0.00, 0.00, -0.24, 0.30, -0.24, 0.30, 0.24, -0.30, 0.00, 0.00, 0.24, -0.30, 0.00, 0.00, 0.24, 0.30, 0.24, -0.30, 0.24, 0.30, -0.24, 0.30, -0.24, 0.30, -0.20, 0.20, -0.16, -0.20, 0.00, 0.00, -0.32, 0.20, 0.00, 0.10, 0.20, -0.30, 0.20, -0.20, 0.12, 0.20, -0.16, 0.20, 0.16, 0.20, 0.20, 0.30, 0.20, 0.30, 0.00, 0.00, -0.20, 0.30, 0.00, 0.00, 0.20, 0.30, -0.20, -0.30, -0.20, -0.30, 0.20, -0.30, 0.00, 0.00, 0.20, 0.30, 0.00, 0.00, 0.20, 0.30, 0.00, 0.00, 0.20, 0.30, 0.00, 0.00, 0.20, 0.30, 0.00, 0.00, 0.20, -0.30, 0.00, 0.00, -0.20, -0.30, 0.00, 0.00, -0.20, 0.30, 0.00, 0.00, -0.20, 0.30, 0.00, 0.00, 0.36, /* 4180-4307 */ 0.00, 0.00, 0.36, 0.12, 0.10, -0.24, 0.20, 0.12, -0.20, -0.16, -0.20, -0.13, 0.10, 0.22, 0.21, 0.20, 0.00, -0.28, 0.32, 0.00, -0.12, -0.20, -0.20, 0.12, -0.10, 0.12, 0.10, -0.20, 0.20, 0.00, 0.00, -0.32, 0.32, 0.00, 0.00, 0.32, 0.32, 0.00, 0.00, -0.24, -0.20, 0.24, 0.20, 0.20, 0.00, -0.24, 0.00, 0.00, -0.24, -0.20, 0.00, 0.00, 0.24, 0.20, -0.24, -0.20, 0.00, 0.00, -0.24, 0.20, 0.16, -0.20, 0.12, 0.10, 0.20, 0.20, 0.00, -0.10, -0.12, 0.10, -0.16, -0.20, -0.12, -0.10, -0.16, 0.20, 0.20, 0.20, 0.00, 0.00, -0.20, 0.20, -0.20, 0.20, -0.20, 0.20, -0.20, 0.20, 0.20, -0.20, -0.20, -0.20, 0.00, 0.00, -0.20, 0.20, 0.20, 0.00, -0.20, 0.00, 0.00, -0.20, 0.20, -0.20, 0.20, -0.20, -0.20, -0.20, -0.20, 0.00, 0.00, 0.20, 0.20, 0.20, 0.20, 0.12, -0.20, -0.12, -0.10, 0.28, -0.28, 0.16, -0.20, 0.00, -0.10, 0.00, 0.10, -0.16, /* 4308-4435 */ 0.20, 0.00, -0.10, -0.16, -0.20, 0.00, -0.10, 0.16, -0.20, 0.16, -0.20, 0.00, 0.00, 0.16, 0.20, -0.16, 0.20, 0.00, 0.00, 0.16, 0.20, 0.16, -0.20, 0.16, -0.20, -0.16, 0.20, 0.16, -0.20, 0.00, 0.00, 0.16, 0.20, 0.00, 0.00, 0.16, 0.20, 0.00, 0.00, -0.16, -0.20, 0.16, -0.20, -0.16, -0.20, 0.00, 0.00, -0.16, -0.20, 0.00, 0.00, -0.16, 0.20, 0.00, 0.00, 0.16, -0.20, 0.16, 0.20, 0.16, 0.20, 0.00, 0.00, -0.16, -0.20, 0.00, 0.00, -0.16, -0.20, 0.00, 0.00, 0.16, 0.20, 0.16, 0.20, 0.00, 0.00, 0.16, 0.20, 0.16, -0.20, 0.16, 0.20, 0.00, 0.00, -0.16, 0.20, 0.00, 0.10, 0.12, -0.20, 0.12, -0.20, 0.00, -0.10, 0.00, -0.10, 0.12, 0.20, 0.00, -0.10, -0.12, 0.20, -0.15, 0.20, -0.24, 0.24, 0.00, 0.00, 0.24, 0.24, 0.12, -0.20, -0.12, -0.20, 0.00, 0.00, 0.12, 0.20, 0.12, -0.20, 0.12, 0.20, 0.12, 0.20, 0.12, 0.20, 0.12, /* 4436-4563 */ -0.20, -0.12, 0.20, 0.00, 0.00, 0.12, 0.20, 0.12, 0.00, -0.20, 0.00, 0.00, -0.12, -0.20, 0.12, -0.20, 0.00, 0.00, 0.12, 0.20, -0.12, 0.20, -0.12, 0.20, 0.12, -0.20, 0.00, 0.00, 0.12, 0.20, 0.20, 0.00, 0.12, 0.00, 0.00, -0.12, 0.20, 0.00, 0.00, -0.12, -0.20, 0.00, 0.00, -0.12, -0.20, -0.12, -0.20, 0.00, 0.00, 0.12, -0.20, 0.12, -0.20, 0.12, 0.20, -0.12, -0.20, 0.00, 0.00, 0.12, -0.20, 0.12, -0.20, 0.12, 0.20, 0.12, 0.00, 0.20, -0.12, -0.20, 0.00, 0.00, 0.12, 0.20, -0.16, 0.00, 0.16, -0.20, 0.20, 0.00, 0.00, -0.20, 0.00, 0.00, -0.20, 0.20, 0.00, 0.00, 0.20, 0.20, -0.20, 0.00, 0.00, -0.20, 0.12, 0.00, -0.16, 0.20, 0.00, 0.00, 0.20, 0.12, -0.10, 0.00, 0.10, 0.16, -0.16, -0.16, -0.16, -0.16, -0.16, 0.00, 0.00, -0.16, 0.00, 0.00, -0.16, -0.16, -0.16, 0.00, 0.00, -0.16, 0.00, 0.00, 0.16, 0.00, 0.00, 0.16, /* 4564-4691 */ 0.00, 0.00, 0.16, 0.16, 0.00, 0.00, -0.16, 0.00, 0.00, -0.16, -0.16, 0.00, 0.00, 0.16, 0.00, 0.00, -0.16, -0.16, 0.00, 0.00, -0.16, -0.16, 0.12, 0.10, 0.12, -0.10, 0.12, 0.10, 0.00, 0.00, 0.12, 0.10, -0.12, 0.10, 0.00, 0.00, 0.12, 0.10, 0.12, -0.10, 0.00, 0.00, -0.12, -0.10, 0.00, 0.00, 0.12, 0.10, 0.12, 0.00, 0.00, 0.12, 0.00, 0.00, -0.12, 0.00, 0.00, 0.12, 0.12, 0.12, 0.12, 0.12, 0.00, 0.00, 0.12, 0.00, 0.00, 0.12, 0.12, 0.00, 0.00, 0.12, 0.00, 0.00, 0.12, -0.12, -0.12, 0.12, 0.12, -0.12, -0.12, 0.00, 0.00, 0.12, -0.12, 0.12, 0.12, -0.12, -0.12, 0.00, 0.00, -0.12, -0.12, 0.00, 0.00, -0.12, 0.12, 0.00, 0.00, 0.12, 0.00, 0.00, 0.12, 0.00, 0.00, 0.12, -0.12, 0.00, 0.00, -0.12, 0.12, -0.12, -0.12, 0.12, 0.00, 0.00, 0.12, 0.12, 0.12, -0.12, 0.00, 0.00, -0.12, -0.12, -0.12, 0.00, 0.00, -0.12, /* 4692-NA */ -0.12, 0.00, 0.00, 0.12, 0.12, 0.00, 0.00, -0.12, -0.12, -0.12, -0.12, 0.12, 0.00, 0.00, 0.12, -0.12, 0.00, 0.00, -0.12, -0.12, 0.00, 0.00, 0.12, -0.12, -0.12, -0.12, -0.12, 0.12, 0.12, -0.12, -0.12, 0.00, 0.00, -0.12, 0.00, 0.00, -0.12, 0.12, 0.00, 0.00, 0.12, 0.00, 0.00, -0.12, -0.12, 0.00, 0.00, -0.12, -0.12, 0.12, 0.00, 0.00, 0.12, 0.12, 0.00, 0.00, 0.12, 0.00, 0.00, 0.12, 0.12, 0.08, 0.00, 0.04 }; /* Number of amplitude coefficients */ static const int NA = (int) (sizeof a / sizeof (double)); /* Amplitude usage: X or Y, sin or cos, power of T. */ static const int jaxy[] = {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1}; static const int jasc[] = {0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0}; static const int japt[] = {0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4}; /* Miscellaneous */ double t, w, pt[MAXPT+1], fa[14], xypr[2], xypl[2], xyls[2], arg, sc[2]; int jpt, i, j, jxy, ialast, ifreq, m, ia, jsc; /*--------------------------------------------------------------------*/ /* Interval between fundamental date J2000.0 and given date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* Powers of T. */ w = 1.0; for (jpt = 0; jpt <= MAXPT; jpt++) { pt[jpt] = w; w *= t; } /* Initialize totals in X and Y: polynomial, luni-solar, planetary. */ for (jxy = 0; jxy < 2; jxy++) { xypr[jxy] = 0.0; xyls[jxy] = 0.0; xypl[jxy] = 0.0; } /* --------------------------------- */ /* Fundamental arguments (IERS 2003) */ /* --------------------------------- */ /* Mean anomaly of the Moon. */ fa[0] = eraFal03(t); /* Mean anomaly of the Sun. */ fa[1] = eraFalp03(t); /* Mean argument of the latitude of the Moon. */ fa[2] = eraFaf03(t); /* Mean elongation of the Moon from the Sun. */ fa[3] = eraFad03(t); /* Mean longitude of the ascending node of the Moon. */ fa[4] = eraFaom03(t); /* Planetary longitudes, Mercury through Neptune. */ fa[5] = eraFame03(t); fa[6] = eraFave03(t); fa[7] = eraFae03(t); fa[8] = eraFama03(t); fa[9] = eraFaju03(t); fa[10] = eraFasa03(t); fa[11] = eraFaur03(t); fa[12] = eraFane03(t); /* General accumulated precession in longitude. */ fa[13] = eraFapa03(t); /* -------------------------------------- */ /* Polynomial part of precession-nutation */ /* -------------------------------------- */ for (jxy = 0; jxy < 2; jxy++) { for (j = MAXPT; j >= 0; j--) { xypr[jxy] += xyp[jxy][j] * pt[j]; } } /* ---------------------------------- */ /* Nutation periodic terms, planetary */ /* ---------------------------------- */ /* Work backwards through the coefficients per frequency list. */ ialast = NA; for (ifreq = NFPL-1; ifreq >= 0; ifreq--) { /* Obtain the argument functions. */ arg = 0.0; for (i = 0; i < 14; i++) { m = mfapl[ifreq][i]; if (m != 0) arg += (double)m * fa[i]; } sc[0] = sin(arg); sc[1] = cos(arg); /* Work backwards through the amplitudes at this frequency. */ ia = nc[ifreq+NFLS]; for (i = ialast; i >= ia; i--) { /* Coefficient number (0 = 1st). */ j = i-ia; /* X or Y. */ jxy = jaxy[j]; /* Sin or cos. */ jsc = jasc[j]; /* Power of T. */ jpt = japt[j]; /* Accumulate the component. */ xypl[jxy] += a[i-1] * sc[jsc] * pt[jpt]; } ialast = ia-1; } /* ----------------------------------- */ /* Nutation periodic terms, luni-solar */ /* ----------------------------------- */ /* Continue working backwards through the number of coefficients list. */ for (ifreq = NFLS-1; ifreq >= 0; ifreq--) { /* Obtain the argument functions. */ arg = 0.0; for (i = 0; i < 5; i++) { m = mfals[ifreq][i]; if (m != 0) arg += (double)m * fa[i]; } sc[0] = sin(arg); sc[1] = cos(arg); /* Work backwards through the amplitudes at this frequency. */ ia = nc[ifreq]; for (i = ialast; i >= ia; i--) { /* Coefficient number (0 = 1st). */ j = i-ia; /* X or Y. */ jxy = jaxy[j]; /* Sin or cos. */ jsc = jasc[j]; /* Power of T. */ jpt = japt[j]; /* Accumulate the component. */ xyls[jxy] += a[i-1] * sc[jsc] * pt[jpt]; } ialast = ia-1; } /* ------------------------------------ */ /* Results: CIP unit vector components */ /* ------------------------------------ */ *x = ERFA_DAS2R * (xypr[0] + (xyls[0] + xypl[0]) / 1e6); *y = ERFA_DAS2R * (xypr[1] + (xyls[1] + xypl[1]) / 1e6); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2i06a.c0000644001134200020070000001310412640262015017631 0ustar embrayscience00000000000000#include "erfa.h" void eraC2i06a(double date1, double date2, double rc2i[3][3]) /* ** - - - - - - - - - - ** e r a C 2 i 0 6 a ** - - - - - - - - - - ** ** Form the celestial-to-intermediate matrix for a given date using the ** IAU 2006 precession and IAU 2000A nutation models. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** rc2i double[3][3] celestial-to-intermediate matrix (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix rc2i is the first stage in the transformation from ** celestial to terrestrial coordinates: ** ** [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] ** ** = RC2T * [CRS] ** ** where [CRS] is a vector in the Geocentric Celestial Reference ** System and [TRS] is a vector in the International Terrestrial ** Reference System (see IERS Conventions 2003), ERA is the Earth ** Rotation Angle and RPOM is the polar motion matrix. ** ** Called: ** eraPnm06a classical NPB matrix, IAU 2006/2000A ** eraBpn2xy extract CIP X,Y coordinates from NPB matrix ** eraS06 the CIO locator s, given X,Y, IAU 2006 ** eraC2ixys celestial-to-intermediate matrix, given X,Y and s ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003), ** IERS Technical Note No. 32, BKG ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rbpn[3][3], x, y, s; /* Obtain the celestial-to-true matrix (IAU 2006/2000A). */ eraPnm06a(date1, date2, rbpn); /* Extract the X,Y coordinates. */ eraBpn2xy(rbpn, &x, &y); /* Obtain the CIO locator. */ s = eraS06(date1, date2, x, y); /* Form the celestial-to-intermediate matrix. */ eraC2ixys(x, y, s, rc2i); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pn00a.c0000644001134200020070000001630512640262015017571 0ustar embrayscience00000000000000#include "erfa.h" void eraPn00a(double date1, double date2, double *dpsi, double *deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]) /* ** - - - - - - - - - ** e r a P n 0 0 a ** - - - - - - - - - ** ** Precession-nutation, IAU 2000A model: a multi-purpose function, ** supporting classical (equinox-based) use directly and CIO-based ** use indirectly. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** dpsi,deps double nutation (Note 2) ** epsa double mean obliquity (Note 3) ** rb double[3][3] frame bias matrix (Note 4) ** rp double[3][3] precession matrix (Note 5) ** rbp double[3][3] bias-precession matrix (Note 6) ** rn double[3][3] nutation matrix (Note 7) ** rbpn double[3][3] GCRS-to-true matrix (Notes 8,9) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The nutation components (luni-solar + planetary, IAU 2000A) in ** longitude and obliquity are in radians and with respect to the ** equinox and ecliptic of date. Free core nutation is omitted; ** for the utmost accuracy, use the eraPn00 function, where the ** nutation components are caller-specified. For faster but ** slightly less accurate results, use the eraPn00b function. ** ** 3) The mean obliquity is consistent with the IAU 2000 precession. ** ** 4) The matrix rb transforms vectors from GCRS to J2000.0 mean ** equator and equinox by applying frame bias. ** ** 5) The matrix rp transforms vectors from J2000.0 mean equator and ** equinox to mean equator and equinox of date by applying ** precession. ** ** 6) The matrix rbp transforms vectors from GCRS to mean equator and ** equinox of date by applying frame bias then precession. It is ** the product rp x rb. ** ** 7) The matrix rn transforms vectors from mean equator and equinox ** of date to true equator and equinox of date by applying the ** nutation (luni-solar + planetary). ** ** 8) The matrix rbpn transforms vectors from GCRS to true equator and ** equinox of date. It is the product rn x rbp, applying frame ** bias, precession and nutation in that order. ** ** 9) The X,Y,Z coordinates of the IAU 2000A Celestial Intermediate ** Pole are elements (3,1-3) of the GCRS-to-true matrix, ** i.e. rbpn[2][0-2]. ** ** 10) It is permissible to re-use the same array in the returned ** arguments. The arrays are filled in the order given. ** ** Called: ** eraNut00a nutation, IAU 2000A ** eraPn00 bias/precession/nutation results, IAU 2000 ** ** Reference: ** ** Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., ** "Expressions for the Celestial Intermediate Pole and Celestial ** Ephemeris Origin consistent with the IAU 2000A precession- ** nutation model", Astron.Astrophys. 400, 1145-1154 (2003) ** ** n.b. The celestial ephemeris origin (CEO) was renamed "celestial ** intermediate origin" (CIO) by IAU 2006 Resolution 2. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Nutation. */ eraNut00a(date1, date2, dpsi, deps); /* Remaining results. */ eraPn00(date1, date2, *dpsi, *deps, epsa, rb, rp, rbp, rn, rbpn); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/gd2gc.c0000644001134200020070000001232212640262015017634 0ustar embrayscience00000000000000#include "erfa.h" int eraGd2gc ( int n, double elong, double phi, double height, double xyz[3] ) /* ** - - - - - - - - - ** e r a G d 2 g c ** - - - - - - - - - ** ** Transform geodetic coordinates to geocentric using the specified ** reference ellipsoid. ** ** Given: ** n int ellipsoid identifier (Note 1) ** elong double longitude (radians, east +ve) ** phi double latitude (geodetic, radians, Note 3) ** height double height above ellipsoid (geodetic, Notes 2,3) ** ** Returned: ** xyz double[3] geocentric vector (Note 2) ** ** Returned (function value): ** int status: 0 = OK ** -1 = illegal identifier (Note 3) ** -2 = illegal case (Note 3) ** ** Notes: ** ** 1) The identifier n is a number that specifies the choice of ** reference ellipsoid. The following are supported: ** ** n ellipsoid ** ** 1 ERFA_WGS84 ** 2 ERFA_GRS80 ** 3 ERFA_WGS72 ** ** The n value has no significance outside the ERFA software. For ** convenience, symbols ERFA_WGS84 etc. are defined in erfam.h. ** ** 2) The height (height, given) and the geocentric vector (xyz, ** returned) are in meters. ** ** 3) No validation is performed on the arguments elong, phi and ** height. An error status -1 means that the identifier n is ** illegal. An error status -2 protects against cases that would ** lead to arithmetic exceptions. In all error cases, xyz is set ** to zeros. ** ** 4) The inverse transformation is performed in the function eraGc2gd. ** ** Called: ** eraEform Earth reference ellipsoids ** eraGd2gce geodetic to geocentric transformation, general ** eraZp zero p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int j; double a, f; /* Obtain reference ellipsoid parameters. */ j = eraEform ( n, &a, &f ); /* If OK, transform longitude, geodetic latitude, height to x,y,z. */ if ( j == 0 ) { j = eraGd2gce ( a, f, elong, phi, height, xyz ); if ( j != 0 ) j = -2; } /* Deal with any errors. */ if ( j != 0 ) eraZp ( xyz ); /* Return the status. */ return j; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/a2af.c0000644001134200020070000001160212640262015017457 0ustar embrayscience00000000000000#include "erfa.h" void eraA2af(int ndp, double angle, char *sign, int idmsf[4]) /* ** - - - - - - - - ** e r a A 2 a f ** - - - - - - - - ** ** Decompose radians into degrees, arcminutes, arcseconds, fraction. ** ** Given: ** ndp int resolution (Note 1) ** angle double angle in radians ** ** Returned: ** sign char '+' or '-' ** idmsf int[4] degrees, arcminutes, arcseconds, fraction ** ** Called: ** eraD2tf decompose days to hms ** ** Notes: ** ** 1) The argument ndp is interpreted as follows: ** ** ndp resolution ** : ...0000 00 00 ** -7 1000 00 00 ** -6 100 00 00 ** -5 10 00 00 ** -4 1 00 00 ** -3 0 10 00 ** -2 0 01 00 ** -1 0 00 10 ** 0 0 00 01 ** 1 0 00 00.1 ** 2 0 00 00.01 ** 3 0 00 00.001 ** : 0 00 00.000... ** ** 2) The largest positive useful value for ndp is determined by the ** size of angle, the format of doubles on the target platform, and ** the risk of overflowing idmsf[3]. On a typical platform, for ** angle up to 2pi, the available floating-point precision might ** correspond to ndp=12. However, the practical limit is typically ** ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is ** only 16 bits. ** ** 3) The absolute value of angle may exceed 2pi. In cases where it ** does not, it is up to the caller to test for and handle the ** case where angle is very nearly 2pi and rounds up to 360 degrees, ** by testing for idmsf[0]=360 and setting idmsf[0-3] to zero. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Hours to degrees * radians to turns */ const double F = 15.0 / ERFA_D2PI; /* Scale then use days to h,m,s function. */ eraD2tf(ndp, angle*F, sign, idmsf); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/tttdb.c0000644001134200020070000001142012640262015017765 0ustar embrayscience00000000000000#include "erfa.h" int eraTttdb(double tt1, double tt2, double dtr, double *tdb1, double *tdb2) /* ** - - - - - - - - - ** e r a T t t d b ** - - - - - - - - - ** ** Time scale transformation: Terrestrial Time, TT, to Barycentric ** Dynamical Time, TDB. ** ** Given: ** tt1,tt2 double TT as a 2-part Julian Date ** dtr double TDB-TT in seconds ** ** Returned: ** tdb1,tdb2 double TDB as a 2-part Julian Date ** ** Returned (function value): ** int status: 0 = OK ** ** Notes: ** ** 1) tt1+tt2 is Julian Date, apportioned in any convenient way between ** the two arguments, for example where tt1 is the Julian Day Number ** and tt2 is the fraction of a day. The returned tdb1,tdb2 follow ** suit. ** ** 2) The argument dtr represents the quasi-periodic component of the ** GR transformation between TT and TCB. It is dependent upon the ** adopted solar-system ephemeris, and can be obtained by numerical ** integration, by interrogating a precomputed time ephemeris or by ** evaluating a model such as that implemented in the ERFA function ** eraDtdb. The quantity is dominated by an annual term of 1.7 ms ** amplitude. ** ** 3) TDB is essentially the same as Teph, the time argument for the JPL ** solar system ephemerides. ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** IAU 2006 Resolution 3 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dtrd; /* Result, safeguarding precision. */ dtrd = dtr / ERFA_DAYSEC; if ( tt1 > tt2 ) { *tdb1 = tt1; *tdb2 = tt2 + dtrd; } else { *tdb1 = tt1 + dtrd; *tdb2 = tt2; } /* Status (always OK). */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/numat.c0000644001134200020070000001075612640262015020003 0ustar embrayscience00000000000000#include "erfa.h" void eraNumat(double epsa, double dpsi, double deps, double rmatn[3][3]) /* ** - - - - - - - - - ** e r a N u m a t ** - - - - - - - - - ** ** Form the matrix of nutation. ** ** Given: ** epsa double mean obliquity of date (Note 1) ** dpsi,deps double nutation (Note 2) ** ** Returned: ** rmatn double[3][3] nutation matrix (Note 3) ** ** Notes: ** ** 1) The supplied mean obliquity epsa, must be consistent with the ** precession-nutation models from which dpsi and deps were obtained. ** ** 2) The caller is responsible for providing the nutation components; ** they are in longitude and obliquity, in radians and are with ** respect to the equinox and ecliptic of date. ** ** 3) The matrix operates in the sense V(true) = rmatn * V(mean), ** where the p-vector V(true) is with respect to the true ** equatorial triad of date and the p-vector V(mean) is with ** respect to the mean equatorial triad of date. ** ** Called: ** eraIr initialize r-matrix to identity ** eraRx rotate around X-axis ** eraRz rotate around Z-axis ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992), ** Section 3.222-3 (p114). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Build the rotation matrix. */ eraIr(rmatn); eraRx(epsa, rmatn); eraRz(-dpsi, rmatn); eraRx(-(epsa + deps), rmatn); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pmat00.c0000644001134200020070000001177212640262015017757 0ustar embrayscience00000000000000#include "erfa.h" void eraPmat00(double date1, double date2, double rbp[3][3]) /* ** - - - - - - - - - - ** e r a P m a t 0 0 ** - - - - - - - - - - ** ** Precession matrix (including frame bias) from GCRS to a specified ** date, IAU 2000 model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** rbp double[3][3] bias-precession matrix (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix operates in the sense V(date) = rbp * V(GCRS), where ** the p-vector V(GCRS) is with respect to the Geocentric Celestial ** Reference System (IAU, 2000) and the p-vector V(date) is with ** respect to the mean equatorial triad of the given date. ** ** Called: ** eraBp00 frame bias and precession matrices, IAU 2000 ** ** Reference: ** ** IAU: Trans. International Astronomical Union, Vol. XXIVB; Proc. ** 24th General Assembly, Manchester, UK. Resolutions B1.3, B1.6. ** (2000) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rb[3][3], rp[3][3]; /* Obtain the required matrix (discarding others). */ eraBp00(date1, date2, rb, rp, rbp); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/rz.c0000644001134200020070000001036212640262015017303 0ustar embrayscience00000000000000#include "erfa.h" void eraRz(double psi, double r[3][3]) /* ** - - - - - - ** e r a R z ** - - - - - - ** ** Rotate an r-matrix about the z-axis. ** ** Given: ** psi double angle (radians) ** ** Given and returned: ** r double[3][3] r-matrix, rotated ** ** Notes: ** ** 1) Calling this function with positive psi incorporates in the ** supplied r-matrix r an additional rotation, about the z-axis, ** anticlockwise as seen looking towards the origin from positive z. ** ** 2) The additional rotation can be represented by this matrix: ** ** ( + cos(psi) + sin(psi) 0 ) ** ( ) ** ( - sin(psi) + cos(psi) 0 ) ** ( ) ** ( 0 0 1 ) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double s, c, a00, a01, a02, a10, a11, a12; s = sin(psi); c = cos(psi); a00 = c*r[0][0] + s*r[1][0]; a01 = c*r[0][1] + s*r[1][1]; a02 = c*r[0][2] + s*r[1][2]; a10 = - s*r[0][0] + c*r[1][0]; a11 = - s*r[0][1] + c*r[1][1]; a12 = - s*r[0][2] + c*r[1][2]; r[0][0] = a00; r[0][1] = a01; r[0][2] = a02; r[1][0] = a10; r[1][1] = a11; r[1][2] = a12; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/eqeq94.c0000644001134200020070000001261012640262015017756 0ustar embrayscience00000000000000#include "erfa.h" double eraEqeq94(double date1, double date2) /* ** - - - - - - - - - - ** e r a E q e q 9 4 ** - - - - - - - - - - ** ** Equation of the equinoxes, IAU 1994 model. ** ** Given: ** date1,date2 double TDB date (Note 1) ** ** Returned (function value): ** double equation of the equinoxes (Note 2) ** ** Notes: ** ** 1) The date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The result, which is in radians, operates in the following sense: ** ** Greenwich apparent ST = GMST + equation of the equinoxes ** ** Called: ** eraAnpm normalize angle into range +/- pi ** eraNut80 nutation, IAU 1980 ** eraObl80 mean obliquity, IAU 1980 ** ** References: ** ** IAU Resolution C7, Recommendation 3 (1994). ** ** Capitaine, N. & Gontier, A.-M., 1993, Astron. Astrophys., 275, ** 645-650. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t, om, dpsi, deps, eps0, ee; /* Interval between fundamental epoch J2000.0 and given date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* Longitude of the mean ascending node of the lunar orbit on the */ /* ecliptic, measured from the mean equinox of date. */ om = eraAnpm((450160.280 + (-482890.539 + (7.455 + 0.008 * t) * t) * t) * ERFA_DAS2R + fmod(-5.0 * t, 1.0) * ERFA_D2PI); /* Nutation components and mean obliquity. */ eraNut80(date1, date2, &dpsi, &deps); eps0 = eraObl80(date1, date2); /* Equation of the equinoxes. */ ee = dpsi*cos(eps0) + ERFA_DAS2R*(0.00264*sin(om) + 0.000063*sin(om+om)); return ee; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/apcs13.c0000644001134200020070000002003212640262015017735 0ustar embrayscience00000000000000#include "erfa.h" void eraApcs13(double date1, double date2, double pv[2][3], eraASTROM *astrom) /* ** - - - - - - - - - - ** e r a A p c s 1 3 ** - - - - - - - - - - ** ** For an observer whose geocentric position and velocity are known, ** prepare star-independent astrometry parameters for transformations ** between ICRS and GCRS. The Earth ephemeris is from ERFA models. ** ** The parameters produced by this function are required in the space ** motion, parallax, light deflection and aberration parts of the ** astrometric transformation chain. ** ** Given: ** date1 double TDB as a 2-part... ** date2 double ...Julian Date (Note 1) ** pv double[2][3] observer's geocentric pos/vel (Note 3) ** ** Returned: ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double unchanged ** xpl double unchanged ** ypl double unchanged ** sphi double unchanged ** cphi double unchanged ** diurab double unchanged ** eral double unchanged ** refa double unchanged ** refb double unchanged ** ** Notes: ** ** 1) The TDB date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TDB)=2450123.7 could be expressed in any of these ways, among ** others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 method is best matched to the way the ** argument is handled internally and will deliver the optimum ** resolution. The MJD method and the date & time methods are both ** good compromises between resolution and convenience. For most ** applications of this function the choice will not be at all ** critical. ** ** TT can be used instead of TDB without any significant impact on ** accuracy. ** ** 2) All the vectors are with respect to BCRS axes. ** ** 3) The observer's position and velocity pv are geocentric but with ** respect to BCRS axes, and in units of m and m/s. No assumptions ** are made about proximity to the Earth, and the function can be ** used for deep space applications as well as Earth orbit and ** terrestrial. ** ** 4) In cases where the caller wishes to supply his own Earth ** ephemeris, the function eraApcs can be used instead of the present ** function. ** ** 5) This is one of several functions that inserts into the astrom ** structure star-independent parameters needed for the chain of ** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. ** ** The various functions support different classes of observer and ** portions of the transformation chain: ** ** functions observer transformation ** ** eraApcg eraApcg13 geocentric ICRS <-> GCRS ** eraApci eraApci13 terrestrial ICRS <-> CIRS ** eraApco eraApco13 terrestrial ICRS <-> observed ** eraApcs eraApcs13 space ICRS <-> GCRS ** eraAper eraAper13 terrestrial update Earth rotation ** eraApio eraApio13 terrestrial CIRS <-> observed ** ** Those with names ending in "13" use contemporary ERFA models to ** compute the various ephemerides. The others accept ephemerides ** supplied by the caller. ** ** The transformation from ICRS to GCRS covers space motion, ** parallax, light deflection, and aberration. From GCRS to CIRS ** comprises frame bias and precession-nutation. From CIRS to ** observed takes account of Earth rotation, polar motion, diurnal ** aberration and parallax (unless subsumed into the ICRS <-> GCRS ** transformation), and atmospheric refraction. ** ** 6) The context structure astrom produced by this function is used by ** eraAtciq* and eraAticq*. ** ** Called: ** eraEpv00 Earth position and velocity ** eraApcs astrometry parameters, ICRS-GCRS, space observer ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double ehpv[2][3], ebpv[2][3]; /* Earth barycentric & heliocentric position/velocity (au, au/d). */ (void) eraEpv00(date1, date2, ehpv, ebpv); /* Compute the star-independent astrometry parameters. */ eraApcs(date1, date2, pv, ebpv, ehpv[0], astrom); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/trxp.c0000644001134200020070000000730712640262015017652 0ustar embrayscience00000000000000#include "erfa.h" void eraTrxp(double r[3][3], double p[3], double trp[3]) /* ** - - - - - - - - ** e r a T r x p ** - - - - - - - - ** ** Multiply a p-vector by the transpose of an r-matrix. ** ** Given: ** r double[3][3] r-matrix ** p double[3] p-vector ** ** Returned: ** trp double[3] r * p ** ** Note: ** It is permissible for p and trp to be the same array. ** ** Called: ** eraTr transpose r-matrix ** eraRxp product of r-matrix and p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double tr[3][3]; /* Transpose of matrix r. */ eraTr(r, tr); /* Matrix tr * vector p -> vector trp. */ eraRxp(tr, p, trp); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pfw06.c0000644001134200020070000001457512640262015017624 0ustar embrayscience00000000000000#include "erfa.h" void eraPfw06(double date1, double date2, double *gamb, double *phib, double *psib, double *epsa) /* ** - - - - - - - - - ** e r a P f w 0 6 ** - - - - - - - - - ** ** Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation). ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** gamb double F-W angle gamma_bar (radians) ** phib double F-W angle phi_bar (radians) ** psib double F-W angle psi_bar (radians) ** epsa double F-W angle epsilon_A (radians) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) Naming the following points: ** ** e = J2000.0 ecliptic pole, ** p = GCRS pole, ** E = mean ecliptic pole of date, ** and P = mean pole of date, ** ** the four Fukushima-Williams angles are as follows: ** ** gamb = gamma_bar = epE ** phib = phi_bar = pE ** psib = psi_bar = pEP ** epsa = epsilon_A = EP ** ** 3) The matrix representing the combined effects of frame bias and ** precession is: ** ** PxB = R_1(-epsa).R_3(-psib).R_1(phib).R_3(gamb) ** ** 4) The matrix representing the combined effects of frame bias, ** precession and nutation is simply: ** ** NxPxB = R_1(-epsa-dE).R_3(-psib-dP).R_1(phib).R_3(gamb) ** ** where dP and dE are the nutation components with respect to the ** ecliptic of date. ** ** Reference: ** ** Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351 ** ** Called: ** eraObl06 mean obliquity, IAU 2006 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t; /* Interval between fundamental date J2000.0 and given date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* P03 bias+precession angles. */ *gamb = ( -0.052928 + ( 10.556378 + ( 0.4932044 + ( -0.00031238 + ( -0.000002788 + ( 0.0000000260 ) * t) * t) * t) * t) * t) * ERFA_DAS2R; *phib = ( 84381.412819 + ( -46.811016 + ( 0.0511268 + ( 0.00053289 + ( -0.000000440 + ( -0.0000000176 ) * t) * t) * t) * t) * t) * ERFA_DAS2R; *psib = ( -0.041775 + ( 5038.481484 + ( 1.5584175 + ( -0.00018522 + ( -0.000026452 + ( -0.0000000148 ) * t) * t) * t) * t) * t) * ERFA_DAS2R; *epsa = eraObl06(date1, date2); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/atoi13.c0000644001134200020070000002430712640262015017754 0ustar embrayscience00000000000000#include "erfa.h" int eraAtoi13(const char *type, double ob1, double ob2, double utc1, double utc2, double dut1, double elong, double phi, double hm, double xp, double yp, double phpa, double tc, double rh, double wl, double *ri, double *di) /* ** - - - - - - - - - - ** e r a A t o i 1 3 ** - - - - - - - - - - ** ** Observed place to CIRS. The caller supplies UTC, site coordinates, ** ambient air conditions and observing wavelength. ** ** Given: ** type char[] type of coordinates - "R", "H" or "A" (Notes 1,2) ** ob1 double observed Az, HA or RA (radians; Az is N=0,E=90) ** ob2 double observed ZD or Dec (radians) ** utc1 double UTC as a 2-part... ** utc2 double ...quasi Julian Date (Notes 3,4) ** dut1 double UT1-UTC (seconds, Note 5) ** elong double longitude (radians, east +ve, Note 6) ** phi double geodetic latitude (radians, Note 6) ** hm double height above the ellipsoid (meters, Notes 6,8) ** xp,yp double polar motion coordinates (radians, Note 7) ** phpa double pressure at the observer (hPa = mB, Note 8) ** tc double ambient temperature at the observer (deg C) ** rh double relative humidity at the observer (range 0-1) ** wl double wavelength (micrometers, Note 9) ** ** Returned: ** ri double* CIRS right ascension (CIO-based, radians) ** di double* CIRS declination (radians) ** ** Returned (function value): ** int status: +1 = dubious year (Note 2) ** 0 = OK ** -1 = unacceptable date ** ** Notes: ** ** 1) "Observed" Az,ZD means the position that would be seen by a ** perfect geodetically aligned theodolite. (Zenith distance is ** used rather than altitude in order to reflect the fact that no ** allowance is made for depression of the horizon.) This is ** related to the observed HA,Dec via the standard rotation, using ** the geodetic latitude (corrected for polar motion), while the ** observed HA and RA are related simply through the Earth rotation ** angle and the site longitude. "Observed" RA,Dec or HA,Dec thus ** means the position that would be seen by a perfect equatorial ** with its polar axis aligned to the Earth's axis of rotation. ** ** 2) Only the first character of the type argument is significant. ** "R" or "r" indicates that ob1 and ob2 are the observed right ** ascension and declination; "H" or "h" indicates that they are ** hour angle (west +ve) and declination; anything else ("A" or ** "a" is recommended) indicates that ob1 and ob2 are azimuth ** (north zero, east 90 deg) and zenith distance. ** ** 3) utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any ** convenient way between the two arguments, for example where utc1 ** is the Julian Day Number and utc2 is the fraction of a day. ** ** However, JD cannot unambiguously represent UTC during a leap ** second unless special measures are taken. The convention in the ** present function is that the JD day represents UTC days whether ** the length is 86399, 86400 or 86401 SI seconds. ** ** Applications should use the function eraDtf2d to convert from ** calendar date and time of day into 2-part quasi Julian Date, as ** it implements the leap-second-ambiguity convention just ** described. ** ** 4) The warning status "dubious year" flags UTCs that predate the ** introduction of the time scale or that are too far in the ** future to be trusted. See eraDat for further details. ** ** 5) UT1-UTC is tabulated in IERS bulletins. It increases by exactly ** one second at the end of each positive UTC leap second, ** introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This ** practice is under review, and in the future UT1-UTC may grow ** essentially without limit. ** ** 6) The geographical coordinates are with respect to the ERFA_WGS84 ** reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the ** longitude required by the present function is east-positive ** (i.e. right-handed), in accordance with geographical convention. ** ** 7) The polar motion xp,yp can be obtained from IERS bulletins. The ** values are the coordinates (in radians) of the Celestial ** Intermediate Pole with respect to the International Terrestrial ** Reference System (see IERS Conventions 2003), measured along the ** meridians 0 and 90 deg west respectively. For many ** applications, xp and yp can be set to zero. ** ** 8) If hm, the height above the ellipsoid of the observing station ** in meters, is not known but phpa, the pressure in hPa (=mB), is ** available, an adequate estimate of hm can be obtained from the ** expression ** ** hm = -29.3 * tsl * log ( phpa / 1013.25 ); ** ** where tsl is the approximate sea-level air temperature in K ** (See Astrophysical Quantities, C.W.Allen, 3rd edition, section ** 52). Similarly, if the pressure phpa is not known, it can be ** estimated from the height of the observing station, hm, as ** follows: ** ** phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) ); ** ** Note, however, that the refraction is nearly proportional to ** the pressure and that an accurate phpa value is important for ** precise work. ** ** 9) The argument wl specifies the observing wavelength in ** micrometers. The transition from optical to radio is assumed to ** occur at 100 micrometers (about 3000 GHz). ** ** 10) The accuracy of the result is limited by the corrections for ** refraction, which use a simple A*tan(z) + B*tan^3(z) model. ** Providing the meteorological parameters are known accurately and ** there are no gross local effects, the predicted astrometric ** coordinates should be within 0.05 arcsec (optical) or 1 arcsec ** (radio) for a zenith distance of less than 70 degrees, better ** than 30 arcsec (optical or radio) at 85 degrees and better ** than 20 arcmin (optical) or 30 arcmin (radio) at the horizon. ** ** Without refraction, the complementary functions eraAtio13 and ** eraAtoi13 are self-consistent to better than 1 microarcsecond ** all over the celestial sphere. With refraction included, ** consistency falls off at high zenith distances, but is still ** better than 0.05 arcsec at 85 degrees. ** ** 12) It is advisable to take great care with units, as even unlikely ** values of the input parameters are accepted and processed in ** accordance with the models used. ** ** Called: ** eraApio13 astrometry parameters, CIRS-observed, 2013 ** eraAtoiq quick observed to CIRS ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int j; eraASTROM astrom; /* Star-independent astrometry parameters for CIRS->observed. */ j = eraApio13(utc1, utc2, dut1, elong, phi, hm, xp, yp, phpa, tc, rh, wl, &astrom); /* Abort if bad UTC. */ if ( j < 0 ) return j; /* Transform observed to CIRS. */ eraAtoiq(type, ob1, ob2, &astrom, ri, di); /* Return OK/warning status. */ return j; /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/atioq.c0000644001134200020070000002341512640262015017770 0ustar embrayscience00000000000000#include "erfa.h" void eraAtioq(double ri, double di, eraASTROM *astrom, double *aob, double *zob, double *hob, double *dob, double *rob) /* ** - - - - - - - - - ** e r a A t i o q ** - - - - - - - - - ** ** Quick CIRS to observed place transformation. ** ** Use of this function is appropriate when efficiency is important and ** where many star positions are all to be transformed for one date. ** The star-independent astrometry parameters can be obtained by ** calling eraApio[13] or eraApco[13]. ** ** Given: ** ri double CIRS right ascension ** di double CIRS declination ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double longitude + s' (radians) ** xpl double polar motion xp wrt local meridian (radians) ** ypl double polar motion yp wrt local meridian (radians) ** sphi double sine of geodetic latitude ** cphi double cosine of geodetic latitude ** diurab double magnitude of diurnal aberration vector ** eral double "local" Earth rotation angle (radians) ** refa double refraction constant A (radians) ** refb double refraction constant B (radians) ** ** Returned: ** aob double* observed azimuth (radians: N=0,E=90) ** zob double* observed zenith distance (radians) ** hob double* observed hour angle (radians) ** dob double* observed declination (radians) ** rob double* observed right ascension (CIO-based, radians) ** ** Notes: ** ** 1) This function returns zenith distance rather than altitude in ** order to reflect the fact that no allowance is made for ** depression of the horizon. ** ** 2) The accuracy of the result is limited by the corrections for ** refraction, which use a simple A*tan(z) + B*tan^3(z) model. ** Providing the meteorological parameters are known accurately and ** there are no gross local effects, the predicted observed ** coordinates should be within 0.05 arcsec (optical) or 1 arcsec ** (radio) for a zenith distance of less than 70 degrees, better ** than 30 arcsec (optical or radio) at 85 degrees and better ** than 20 arcmin (optical) or 30 arcmin (radio) at the horizon. ** ** Without refraction, the complementary functions eraAtioq and ** eraAtoiq are self-consistent to better than 1 microarcsecond all ** over the celestial sphere. With refraction included, consistency ** falls off at high zenith distances, but is still better than ** 0.05 arcsec at 85 degrees. ** ** 3) It is advisable to take great care with units, as even unlikely ** values of the input parameters are accepted and processed in ** accordance with the models used. ** ** 4) The CIRS RA,Dec is obtained from a star catalog mean place by ** allowing for space motion, parallax, the Sun's gravitational lens ** effect, annual aberration and precession-nutation. For star ** positions in the ICRS, these effects can be applied by means of ** the eraAtci13 (etc.) functions. Starting from classical "mean ** place" systems, additional transformations will be needed first. ** ** 5) "Observed" Az,El means the position that would be seen by a ** perfect geodetically aligned theodolite. This is obtained from ** the CIRS RA,Dec by allowing for Earth orientation and diurnal ** aberration, rotating from equator to horizon coordinates, and ** then adjusting for refraction. The HA,Dec is obtained by ** rotating back into equatorial coordinates, and is the position ** that would be seen by a perfect equatorial with its polar axis ** aligned to the Earth's axis of rotation. Finally, the RA is ** obtained by subtracting the HA from the local ERA. ** ** 6) The star-independent CIRS-to-observed-place parameters in ASTROM ** may be computed with eraApio[13] or eraApco[13]. If nothing has ** changed significantly except the time, eraAper[13] may be used to ** perform the requisite adjustment to the astrom structure. ** ** Called: ** eraS2c spherical coordinates to unit vector ** eraC2s p-vector to spherical ** eraAnp normalize angle into range 0 to 2pi ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Minimum cos(alt) and sin(alt) for refraction purposes */ const double CELMIN = 1e-6; const double SELMIN = 0.05; double v[3], x, y, z, xhd, yhd, zhd, f, xhdt, yhdt, zhdt, xaet, yaet, zaet, azobs, r, tz, w, del, cosdel, xaeo, yaeo, zaeo, zdobs, hmobs, dcobs, raobs; /*--------------------------------------------------------------------*/ /* CIRS RA,Dec to Cartesian -HA,Dec. */ eraS2c(ri-astrom->eral, di, v); x = v[0]; y = v[1]; z = v[2]; /* Polar motion. */ xhd = x + astrom->xpl*z; yhd = y - astrom->ypl*z; zhd = z - astrom->xpl*x + astrom->ypl*y; /* Diurnal aberration. */ f = ( 1.0 - astrom->diurab*yhd ); xhdt = f * xhd; yhdt = f * ( yhd + astrom->diurab ); zhdt = f * zhd; /* Cartesian -HA,Dec to Cartesian Az,El (S=0,E=90). */ xaet = astrom->sphi*xhdt - astrom->cphi*zhdt; yaet = yhdt; zaet = astrom->cphi*xhdt + astrom->sphi*zhdt; /* Azimuth (N=0,E=90). */ azobs = ( xaet != 0.0 || yaet != 0.0 ) ? atan2(yaet,-xaet) : 0.0; /* ---------- */ /* Refraction */ /* ---------- */ /* Cosine and sine of altitude, with precautions. */ r = sqrt(xaet*xaet + yaet*yaet); r = r > CELMIN ? r : CELMIN; z = zaet > SELMIN ? zaet : SELMIN; /* A*tan(z)+B*tan^3(z) model, with Newton-Raphson correction. */ tz = r/z; w = astrom->refb*tz*tz; del = ( astrom->refa + w ) * tz / ( 1.0 + ( astrom->refa + 3.0*w ) / ( z*z ) ); /* Apply the change, giving observed vector. */ cosdel = 1.0 - del*del/2.0; f = cosdel - del*z/r; xaeo = xaet*f; yaeo = yaet*f; zaeo = cosdel*zaet + del*r; /* Observed ZD. */ zdobs = atan2(sqrt(xaeo*xaeo+yaeo*yaeo), zaeo); /* Az/El vector to HA,Dec vector (both right-handed). */ v[0] = astrom->sphi*xaeo + astrom->cphi*zaeo; v[1] = yaeo; v[2] = - astrom->cphi*xaeo + astrom->sphi*zaeo; /* To spherical -HA,Dec. */ eraC2s ( v, &hmobs, &dcobs ); /* Right ascension (with respect to CIO). */ raobs = astrom->eral + hmobs; /* Return the results. */ *aob = eraAnp(azobs); *zob = zdobs; *hob = -hmobs; *dob = dcobs; *rob = eraAnp(raobs); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fk5hz.c0000644001134200020070000001475612640262015017712 0ustar embrayscience00000000000000#include "erfa.h" void eraFk5hz(double r5, double d5, double date1, double date2, double *rh, double *dh) /* ** - - - - - - - - - ** e r a F k 5 h z ** - - - - - - - - - ** ** Transform an FK5 (J2000.0) star position into the system of the ** Hipparcos catalogue, assuming zero Hipparcos proper motion. ** ** Given: ** r5 double FK5 RA (radians), equinox J2000.0, at date ** d5 double FK5 Dec (radians), equinox J2000.0, at date ** date1,date2 double TDB date (Notes 1,2) ** ** Returned: ** rh double Hipparcos RA (radians) ** dh double Hipparcos Dec (radians) ** ** Notes: ** ** 1) This function converts a star position from the FK5 system to ** the Hipparcos system, in such a way that the Hipparcos proper ** motion is zero. Because such a star has, in general, a non-zero ** proper motion in the FK5 system, the function requires the date ** at which the position in the FK5 system was determined. ** ** 2) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 3) The FK5 to Hipparcos transformation is modeled as a pure ** rotation and spin; zonal errors in the FK5 catalogue are not ** taken into account. ** ** 4) The position returned by this function is in the Hipparcos ** reference system but at date date1+date2. ** ** 5) See also eraFk52h, eraH2fk5, eraHfk5z. ** ** Called: ** eraS2c spherical coordinates to unit vector ** eraFk5hip FK5 to Hipparcos rotation and spin ** eraSxp multiply p-vector by scalar ** eraRv2m r-vector to r-matrix ** eraTrxp product of transpose of r-matrix and p-vector ** eraPxp vector product of two p-vectors ** eraC2s p-vector to spherical ** eraAnp normalize angle into range 0 to 2pi ** ** Reference: ** ** F.Mignard & M.Froeschle, 2000, Astron.Astrophys. 354, 732-739. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t, p5e[3], r5h[3][3], s5h[3], vst[3], rst[3][3], p5[3], ph[3], w; /* Interval from given date to fundamental epoch J2000.0 (JY). */ t = - ((date1 - ERFA_DJ00) + date2) / ERFA_DJY; /* FK5 barycentric position vector. */ eraS2c(r5, d5, p5e); /* FK5 to Hipparcos orientation matrix and spin vector. */ eraFk5hip(r5h, s5h); /* Accumulated Hipparcos wrt FK5 spin over that interval. */ eraSxp(t, s5h, vst); /* Express the accumulated spin as a rotation matrix. */ eraRv2m(vst, rst); /* Derotate the vector's FK5 axes back to date. */ eraTrxp(rst, p5e, p5); /* Rotate the vector into the Hipparcos system. */ eraRxp(r5h, p5, ph); /* Hipparcos vector to spherical. */ eraC2s(ph, &w, dh); *rh = eraAnp(w); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/gst06a.c0000644001134200020070000001311612640262015017754 0ustar embrayscience00000000000000#include "erfa.h" double eraGst06a(double uta, double utb, double tta, double ttb) /* ** - - - - - - - - - - ** e r a G s t 0 6 a ** - - - - - - - - - - ** ** Greenwich apparent sidereal time (consistent with IAU 2000 and 2006 ** resolutions). ** ** Given: ** uta,utb double UT1 as a 2-part Julian Date (Notes 1,2) ** tta,ttb double TT as a 2-part Julian Date (Notes 1,2) ** ** Returned (function value): ** double Greenwich apparent sidereal time (radians) ** ** Notes: ** ** 1) The UT1 and TT dates uta+utb and tta+ttb respectively, are both ** Julian Dates, apportioned in any convenient way between the ** argument pairs. For example, JD=2450123.7 could be expressed in ** any of these ways, among others: ** ** Part A Part B ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable (in the case of UT; the TT is not at all critical ** in this respect). The J2000 and MJD methods are good compromises ** between resolution and convenience. For UT, the date & time ** method is best matched to the algorithm that is used by the Earth ** rotation angle function, called internally: maximum precision is ** delivered when the uta argument is for 0hrs UT1 on the day in ** question and the utb argument lies in the range 0 to 1, or vice ** versa. ** ** 2) Both UT1 and TT are required, UT1 to predict the Earth rotation ** and TT to predict the effects of precession-nutation. If UT1 is ** used for both purposes, errors of order 100 microarcseconds ** result. ** ** 3) This GAST is compatible with the IAU 2000/2006 resolutions and ** must be used only in conjunction with IAU 2006 precession and ** IAU 2000A nutation. ** ** 4) The result is returned in the range 0 to 2pi. ** ** Called: ** eraPnm06a classical NPB matrix, IAU 2006/2000A ** eraGst06 Greenwich apparent ST, IAU 2006, given NPB matrix ** ** Reference: ** ** Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rnpb[3][3], gst; /* Classical nutation x precession x bias matrix, IAU 2000A. */ eraPnm06a(tta, ttb, rnpb); /* Greenwich apparent sidereal time. */ gst = eraGst06(uta, utb, tta, ttb, rnpb); return gst; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2t00a.c0000644001134200020070000001473212640262015017646 0ustar embrayscience00000000000000#include "erfa.h" void eraC2t00a(double tta, double ttb, double uta, double utb, double xp, double yp, double rc2t[3][3]) /* ** - - - - - - - - - - ** e r a C 2 t 0 0 a ** - - - - - - - - - - ** ** Form the celestial to terrestrial matrix given the date, the UT1 and ** the polar motion, using the IAU 2000A nutation model. ** ** Given: ** tta,ttb double TT as a 2-part Julian Date (Note 1) ** uta,utb double UT1 as a 2-part Julian Date (Note 1) ** xp,yp double coordinates of the pole (radians, Note 2) ** ** Returned: ** rc2t double[3][3] celestial-to-terrestrial matrix (Note 3) ** ** Notes: ** ** 1) The TT and UT1 dates tta+ttb and uta+utb are Julian Dates, ** apportioned in any convenient way between the arguments uta and ** utb. For example, JD(UT1)=2450123.7 could be expressed in any of ** these ways, among others: ** ** uta utb ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution is ** acceptable. The J2000 and MJD methods are good compromises ** between resolution and convenience. In the case of uta,utb, the ** date & time method is best matched to the Earth rotation angle ** algorithm used: maximum precision is delivered when the uta ** argument is for 0hrs UT1 on the day in question and the utb ** argument lies in the range 0 to 1, or vice versa. ** ** 2) The arguments xp and yp are the coordinates (in radians) of the ** Celestial Intermediate Pole with respect to the International ** Terrestrial Reference System (see IERS Conventions 2003), ** measured along the meridians to 0 and 90 deg west respectively. ** ** 3) The matrix rc2t transforms from celestial to terrestrial ** coordinates: ** ** [TRS] = RPOM * R_3(ERA) * RC2I * [CRS] ** ** = rc2t * [CRS] ** ** where [CRS] is a vector in the Geocentric Celestial Reference ** System and [TRS] is a vector in the International Terrestrial ** Reference System (see IERS Conventions 2003), RC2I is the ** celestial-to-intermediate matrix, ERA is the Earth rotation ** angle and RPOM is the polar motion matrix. ** ** 4) A faster, but slightly less accurate result (about 1 mas), can ** be obtained by using instead the eraC2t00b function. ** ** Called: ** eraC2i00a celestial-to-intermediate matrix, IAU 2000A ** eraEra00 Earth rotation angle, IAU 2000 ** eraSp00 the TIO locator s', IERS 2000 ** eraPom00 polar motion matrix ** eraC2tcio form CIO-based celestial-to-terrestrial matrix ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rc2i[3][3], era, sp, rpom[3][3]; /* Form the celestial-to-intermediate matrix for this TT (IAU 2000A). */ eraC2i00a(tta, ttb, rc2i ); /* Predict the Earth rotation angle for this UT1. */ era = eraEra00(uta, utb); /* Estimate s'. */ sp = eraSp00(tta, ttb); /* Form the polar motion matrix. */ eraPom00(xp, yp, sp, rpom); /* Combine to form the celestial-to-terrestrial matrix. */ eraC2tcio(rc2i, era, rpom, rc2t); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2ixys.c0000644001134200020070000001147412640262015020076 0ustar embrayscience00000000000000#include "erfa.h" void eraC2ixys(double x, double y, double s, double rc2i[3][3]) /* ** - - - - - - - - - - ** e r a C 2 i x y s ** - - - - - - - - - - ** ** Form the celestial to intermediate-frame-of-date matrix given the CIP ** X,Y and the CIO locator s. ** ** Given: ** x,y double Celestial Intermediate Pole (Note 1) ** s double the CIO locator s (Note 2) ** ** Returned: ** rc2i double[3][3] celestial-to-intermediate matrix (Note 3) ** ** Notes: ** ** 1) The Celestial Intermediate Pole coordinates are the x,y ** components of the unit vector in the Geocentric Celestial ** Reference System. ** ** 2) The CIO locator s (in radians) positions the Celestial ** Intermediate Origin on the equator of the CIP. ** ** 3) The matrix rc2i is the first stage in the transformation from ** celestial to terrestrial coordinates: ** ** [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] ** ** = RC2T * [CRS] ** ** where [CRS] is a vector in the Geocentric Celestial Reference ** System and [TRS] is a vector in the International Terrestrial ** Reference System (see IERS Conventions 2003), ERA is the Earth ** Rotation Angle and RPOM is the polar motion matrix. ** ** Called: ** eraIr initialize r-matrix to identity ** eraRz rotate around Z-axis ** eraRy rotate around Y-axis ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double r2, e, d; /* Obtain the spherical angles E and d. */ r2 = x*x + y*y; e = (r2 > 0.0) ? atan2(y, x) : 0.0; d = atan(sqrt(r2 / (1.0 - r2))); /* Form the matrix. */ eraIr(rc2i); eraRz(e, rc2i); eraRy(d, rc2i); eraRz(-(e+s), rc2i); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/starpm.c0000644001134200020070000002201312640262015020152 0ustar embrayscience00000000000000#include "erfa.h" int eraStarpm(double ra1, double dec1, double pmr1, double pmd1, double px1, double rv1, double ep1a, double ep1b, double ep2a, double ep2b, double *ra2, double *dec2, double *pmr2, double *pmd2, double *px2, double *rv2) /* ** - - - - - - - - - - ** e r a S t a r p m ** - - - - - - - - - - ** ** Star proper motion: update star catalog data for space motion. ** ** Given: ** ra1 double right ascension (radians), before ** dec1 double declination (radians), before ** pmr1 double RA proper motion (radians/year), before ** pmd1 double Dec proper motion (radians/year), before ** px1 double parallax (arcseconds), before ** rv1 double radial velocity (km/s, +ve = receding), before ** ep1a double "before" epoch, part A (Note 1) ** ep1b double "before" epoch, part B (Note 1) ** ep2a double "after" epoch, part A (Note 1) ** ep2b double "after" epoch, part B (Note 1) ** ** Returned: ** ra2 double right ascension (radians), after ** dec2 double declination (radians), after ** pmr2 double RA proper motion (radians/year), after ** pmd2 double Dec proper motion (radians/year), after ** px2 double parallax (arcseconds), after ** rv2 double radial velocity (km/s, +ve = receding), after ** ** Returned (function value): ** int status: ** -1 = system error (should not occur) ** 0 = no warnings or errors ** 1 = distance overridden (Note 6) ** 2 = excessive velocity (Note 7) ** 4 = solution didn't converge (Note 8) ** else = binary logical OR of the above warnings ** ** Notes: ** ** 1) The starting and ending TDB dates ep1a+ep1b and ep2a+ep2b are ** Julian Dates, apportioned in any convenient way between the two ** parts (A and B). For example, JD(TDB)=2450123.7 could be ** expressed in any of these ways, among others: ** ** epna epnb ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) In accordance with normal star-catalog conventions, the object's ** right ascension and declination are freed from the effects of ** secular aberration. The frame, which is aligned to the catalog ** equator and equinox, is Lorentzian and centered on the SSB. ** ** The proper motions are the rate of change of the right ascension ** and declination at the catalog epoch and are in radians per TDB ** Julian year. ** ** The parallax and radial velocity are in the same frame. ** ** 3) Care is needed with units. The star coordinates are in radians ** and the proper motions in radians per Julian year, but the ** parallax is in arcseconds. ** ** 4) The RA proper motion is in terms of coordinate angle, not true ** angle. If the catalog uses arcseconds for both RA and Dec proper ** motions, the RA proper motion will need to be divided by cos(Dec) ** before use. ** ** 5) Straight-line motion at constant speed, in the inertial frame, ** is assumed. ** ** 6) An extremely small (or zero or negative) parallax is interpreted ** to mean that the object is on the "celestial sphere", the radius ** of which is an arbitrary (large) value (see the eraStarpv ** function for the value used). When the distance is overridden in ** this way, the status, initially zero, has 1 added to it. ** ** 7) If the space velocity is a significant fraction of c (see the ** constant VMAX in the function eraStarpv), it is arbitrarily set ** to zero. When this action occurs, 2 is added to the status. ** ** 8) The relativistic adjustment carried out in the eraStarpv function ** involves an iterative calculation. If the process fails to ** converge within a set number of iterations, 4 is added to the ** status. ** ** Called: ** eraStarpv star catalog data to space motion pv-vector ** eraPvu update a pv-vector ** eraPdp scalar product of two p-vectors ** eraPvstar space motion pv-vector to star catalog data ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double pv1[2][3], tl1, dt, pv[2][3], r2, rdv, v2, c2mv2, tl2, pv2[2][3]; int j1, j2, j; /* RA,Dec etc. at the "before" epoch to space motion pv-vector. */ j1 = eraStarpv(ra1, dec1, pmr1, pmd1, px1, rv1, pv1); /* Light time when observed (days). */ tl1 = eraPm(pv1[0]) / ERFA_DC; /* Time interval, "before" to "after" (days). */ dt = (ep2a - ep1a) + (ep2b - ep1b); /* Move star along track from the "before" observed position to the */ /* "after" geometric position. */ eraPvu(dt + tl1, pv1, pv); /* From this geometric position, deduce the observed light time (days) */ /* at the "after" epoch (with theoretically unneccessary error check). */ r2 = eraPdp(pv[0], pv[0]); rdv = eraPdp(pv[0], pv[1]); v2 = eraPdp(pv[1], pv[1]); c2mv2 = ERFA_DC*ERFA_DC - v2; if (c2mv2 <= 0) return -1; tl2 = (-rdv + sqrt(rdv*rdv + c2mv2*r2)) / c2mv2; /* Move the position along track from the observed place at the */ /* "before" epoch to the observed place at the "after" epoch. */ eraPvu(dt + (tl1 - tl2), pv1, pv2); /* Space motion pv-vector to RA,Dec etc. at the "after" epoch. */ j2 = eraPvstar(pv2, ra2, dec2, pmr2, pmd2, px2, rv2); /* Final status. */ j = (j2 == 0) ? j1 : -1; return j; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ee00.c0000644001134200020070000001253212640262015017402 0ustar embrayscience00000000000000#include "erfa.h" double eraEe00(double date1, double date2, double epsa, double dpsi) /* ** - - - - - - - - ** e r a E e 0 0 ** - - - - - - - - ** ** The equation of the equinoxes, compatible with IAU 2000 resolutions, ** given the nutation in longitude and the mean obliquity. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** epsa double mean obliquity (Note 2) ** dpsi double nutation in longitude (Note 3) ** ** Returned (function value): ** double equation of the equinoxes (Note 4) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The obliquity, in radians, is mean of date. ** ** 3) The result, which is in radians, operates in the following sense: ** ** Greenwich apparent ST = GMST + equation of the equinoxes ** ** 4) The result is compatible with the IAU 2000 resolutions. For ** further details, see IERS Conventions 2003 and Capitaine et al. ** (2002). ** ** Called: ** eraEect00 equation of the equinoxes complementary terms ** ** References: ** ** Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to ** implement the IAU 2000 definition of UT1", Astronomy & ** Astrophysics, 406, 1135-1149 (2003) ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double ee; /* Equation of the equinoxes. */ ee = dpsi * cos(epsa) + eraEect00(date1, date2); return ee; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pvtob.c0000644001134200020070000001417012640262015020003 0ustar embrayscience00000000000000#include "erfa.h" void eraPvtob(double elong, double phi, double hm, double xp, double yp, double sp, double theta, double pv[2][3]) /* ** - - - - - - - - - ** e r a P v t o b ** - - - - - - - - - ** ** Position and velocity of a terrestrial observing station. ** ** Given: ** elong double longitude (radians, east +ve, Note 1) ** phi double latitude (geodetic, radians, Note 1) ** hm double height above ref. ellipsoid (geodetic, m) ** xp,yp double coordinates of the pole (radians, Note 2) ** sp double the TIO locator s' (radians, Note 2) ** theta double Earth rotation angle (radians, Note 3) ** ** Returned: ** pv double[2][3] position/velocity vector (m, m/s, CIRS) ** ** Notes: ** ** 1) The terrestrial coordinates are with respect to the ERFA_WGS84 ** reference ellipsoid. ** ** 2) xp and yp are the coordinates (in radians) of the Celestial ** Intermediate Pole with respect to the International Terrestrial ** Reference System (see IERS Conventions), measured along the ** meridians 0 and 90 deg west respectively. sp is the TIO locator ** s', in radians, which positions the Terrestrial Intermediate ** Origin on the equator. For many applications, xp, yp and ** (especially) sp can be set to zero. ** ** 3) If theta is Greenwich apparent sidereal time instead of Earth ** rotation angle, the result is with respect to the true equator ** and equinox of date, i.e. with the x-axis at the equinox rather ** than the celestial intermediate origin. ** ** 4) The velocity units are meters per UT1 second, not per SI second. ** This is unlikely to have any practical consequences in the modern ** era. ** ** 5) No validation is performed on the arguments. Error cases that ** could lead to arithmetic exceptions are trapped by the eraGd2gc ** function, and the result set to zeros. ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to ** the Astronomical Almanac, 3rd ed., University Science Books ** (2013), Section 7.4.3.3. ** ** Called: ** eraGd2gc geodetic to geocentric transformation ** eraPom00 polar motion matrix ** eraTrxp product of transpose of r-matrix and p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Earth rotation rate in radians per UT1 second */ const double OM = 1.00273781191135448 * ERFA_D2PI / ERFA_DAYSEC; double xyzm[3], rpm[3][3], xyz[3], x, y, z, s, c; /* Geodetic to geocentric transformation (ERFA_WGS84). */ (void) eraGd2gc(1, elong, phi, hm, xyzm); /* Polar motion and TIO position. */ eraPom00(xp, yp, sp, rpm); eraTrxp(rpm, xyzm, xyz); x = xyz[0]; y = xyz[1]; z = xyz[2]; /* Functions of ERA. */ s = sin(theta); c = cos(theta); /* Position. */ pv[0][0] = c*x - s*y; pv[0][1] = s*x + c*y; pv[0][2] = z; /* Velocity. */ pv[1][0] = OM * ( -s*x - c*y ); pv[1][1] = OM * ( c*x - s*y ); pv[1][2] = 0.0; /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/gc2gde.c0000644001134200020070000001534112640262015020005 0ustar embrayscience00000000000000#include "erfa.h" int eraGc2gde ( double a, double f, double xyz[3], double *elong, double *phi, double *height ) /* ** - - - - - - - - - - ** e r a G c 2 g d e ** - - - - - - - - - - ** ** Transform geocentric coordinates to geodetic for a reference ** ellipsoid of specified form. ** ** Given: ** a double equatorial radius (Notes 2,4) ** f double flattening (Note 3) ** xyz double[3] geocentric vector (Note 4) ** ** Returned: ** elong double longitude (radians, east +ve) ** phi double latitude (geodetic, radians) ** height double height above ellipsoid (geodetic, Note 4) ** ** Returned (function value): ** int status: 0 = OK ** -1 = illegal f ** -2 = illegal a ** ** Notes: ** ** 1) This function is based on the GCONV2H Fortran subroutine by ** Toshio Fukushima (see reference). ** ** 2) The equatorial radius, a, can be in any units, but meters is ** the conventional choice. ** ** 3) The flattening, f, is (for the Earth) a value around 0.00335, ** i.e. around 1/298. ** ** 4) The equatorial radius, a, and the geocentric vector, xyz, ** must be given in the same units, and determine the units of ** the returned height, height. ** ** 5) If an error occurs (status < 0), elong, phi and height are ** unchanged. ** ** 6) The inverse transformation is performed in the function ** eraGd2gce. ** ** 7) The transformation for a standard ellipsoid (such as ERFA_WGS84) can ** more conveniently be performed by calling eraGc2gd, which uses a ** numerical code to identify the required A and F values. ** ** Reference: ** ** Fukushima, T., "Transformation from Cartesian to geodetic ** coordinates accelerated by Halley's method", J.Geodesy (2006) ** 79: 689-693 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double aeps2, e2, e4t, ec2, ec, b, x, y, z, p2, absz, p, s0, pn, zc, c0, c02, c03, s02, s03, a02, a0, a03, d0, f0, b0, s1, cc, s12, cc2; /* ------------- */ /* Preliminaries */ /* ------------- */ /* Validate ellipsoid parameters. */ if ( f < 0.0 || f >= 1.0 ) return -1; if ( a <= 0.0 ) return -2; /* Functions of ellipsoid parameters (with further validation of f). */ aeps2 = a*a * 1e-32; e2 = (2.0 - f) * f; e4t = e2*e2 * 1.5; ec2 = 1.0 - e2; if ( ec2 <= 0.0 ) return -1; ec = sqrt(ec2); b = a * ec; /* Cartesian components. */ x = xyz[0]; y = xyz[1]; z = xyz[2]; /* Distance from polar axis squared. */ p2 = x*x + y*y; /* Longitude. */ *elong = p2 > 0.0 ? atan2(y, x) : 0.0; /* Unsigned z-coordinate. */ absz = fabs(z); /* Proceed unless polar case. */ if ( p2 > aeps2 ) { /* Distance from polar axis. */ p = sqrt(p2); /* Normalization. */ s0 = absz / a; pn = p / a; zc = ec * s0; /* Prepare Newton correction factors. */ c0 = ec * pn; c02 = c0 * c0; c03 = c02 * c0; s02 = s0 * s0; s03 = s02 * s0; a02 = c02 + s02; a0 = sqrt(a02); a03 = a02 * a0; d0 = zc*a03 + e2*s03; f0 = pn*a03 - e2*c03; /* Prepare Halley correction factor. */ b0 = e4t * s02 * c02 * pn * (a0 - ec); s1 = d0*f0 - b0*s0; cc = ec * (f0*f0 - b0*c0); /* Evaluate latitude and height. */ *phi = atan(s1/cc); s12 = s1 * s1; cc2 = cc * cc; *height = (p*cc + absz*s1 - a * sqrt(ec2*s12 + cc2)) / sqrt(s12 + cc2); } else { /* Exception: pole. */ *phi = ERFA_DPI / 2.0; *height = absz - b; } /* Restore sign of latitude. */ if ( z < 0 ) *phi = -*phi; /* OK status. */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/faju03.c0000644001134200020070000001032512640262015017737 0ustar embrayscience00000000000000#include "erfa.h" double eraFaju03(double t) /* ** - - - - - - - - - - ** e r a F a j u 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Jupiter. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double mean longitude of Jupiter, radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003) and ** comes from Souchay et al. (1999) after Simon et al. (1994). ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, ** Astron.Astrophys.Supp.Ser. 135, 111 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* Mean longitude of Jupiter (IERS Conventions 2003). */ a = fmod(0.599546497 + 52.9690962641 * t, ERFA_D2PI); return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/atciqz.c0000644001134200020070000001416512640262015020150 0ustar embrayscience00000000000000#include "erfa.h" void eraAtciqz(double rc, double dc, eraASTROM *astrom, double *ri, double *di) /* ** - - - - - - - - - - ** e r a A t c i q z ** - - - - - - - - - - ** ** Quick ICRS to CIRS transformation, given precomputed star- ** independent astrometry parameters, and assuming zero parallax and ** proper motion. ** ** Use of this function is appropriate when efficiency is important and ** where many star positions are to be transformed for one date. The ** star-independent parameters can be obtained by calling one of the ** functions eraApci[13], eraApcg[13], eraApco[13] or eraApcs[13]. ** ** The corresponding function for the case of non-zero parallax and ** proper motion is eraAtciq. ** ** Given: ** rc,dc double ICRS astrometric RA,Dec (radians) ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double longitude + s' (radians) ** xpl double polar motion xp wrt local meridian (radians) ** ypl double polar motion yp wrt local meridian (radians) ** sphi double sine of geodetic latitude ** cphi double cosine of geodetic latitude ** diurab double magnitude of diurnal aberration vector ** eral double "local" Earth rotation angle (radians) ** refa double refraction constant A (radians) ** refb double refraction constant B (radians) ** ** Returned: ** ri,di double CIRS RA,Dec (radians) ** ** Note: ** ** All the vectors are with respect to BCRS axes. ** ** References: ** ** Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to ** the Astronomical Almanac, 3rd ed., University Science Books ** (2013). ** ** Klioner, Sergei A., "A practical relativistic model for micro- ** arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003). ** ** Called: ** eraS2c spherical coordinates to unit vector ** eraLdsun light deflection due to Sun ** eraAb stellar aberration ** eraRxp product of r-matrix and p-vector ** eraC2s p-vector to spherical ** eraAnp normalize angle into range +/- pi ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double pco[3], pnat[3], ppr[3], pi[3], w; /* BCRS coordinate direction (unit vector). */ eraS2c(rc, dc, pco); /* Light deflection by the Sun, giving BCRS natural direction. */ eraLdsun(pco, astrom->eh, astrom->em, pnat); /* Aberration, giving GCRS proper direction. */ eraAb(pnat, astrom->v, astrom->em, astrom->bm1, ppr); /* Bias-precession-nutation, giving CIRS proper direction. */ eraRxp(astrom->bpn, ppr, pi); /* CIRS RA,Dec. */ eraC2s(pi, &w, di); *ri = eraAnp(w); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/bp00.c0000644001134200020070000001555212640262015017417 0ustar embrayscience00000000000000#include "erfa.h" void eraBp00(double date1, double date2, double rb[3][3], double rp[3][3], double rbp[3][3]) /* ** - - - - - - - - ** e r a B p 0 0 ** - - - - - - - - ** ** Frame bias and precession, IAU 2000. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** rb double[3][3] frame bias matrix (Note 2) ** rp double[3][3] precession matrix (Note 3) ** rbp double[3][3] bias-precession matrix (Note 4) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix rb transforms vectors from GCRS to mean J2000.0 by ** applying frame bias. ** ** 3) The matrix rp transforms vectors from J2000.0 mean equator and ** equinox to mean equator and equinox of date by applying ** precession. ** ** 4) The matrix rbp transforms vectors from GCRS to mean equator and ** equinox of date by applying frame bias then precession. It is ** the product rp x rb. ** ** 5) It is permissible to re-use the same array in the returned ** arguments. The arrays are filled in the order given. ** ** Called: ** eraBi00 frame bias components, IAU 2000 ** eraPr00 IAU 2000 precession adjustments ** eraIr initialize r-matrix to identity ** eraRx rotate around X-axis ** eraRy rotate around Y-axis ** eraRz rotate around Z-axis ** eraCr copy r-matrix ** eraRxr product of two r-matrices ** ** Reference: ** "Expressions for the Celestial Intermediate Pole and Celestial ** Ephemeris Origin consistent with the IAU 2000A precession- ** nutation model", Astron.Astrophys. 400, 1145-1154 (2003) ** ** n.b. The celestial ephemeris origin (CEO) was renamed "celestial ** intermediate origin" (CIO) by IAU 2006 Resolution 2. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* J2000.0 obliquity (Lieske et al. 1977) */ const double EPS0 = 84381.448 * ERFA_DAS2R; double t, dpsibi, depsbi, dra0, psia77, oma77, chia, dpsipr, depspr, psia, oma, rbw[3][3]; /* Interval between fundamental epoch J2000.0 and current date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* Frame bias. */ eraBi00(&dpsibi, &depsbi, &dra0); /* Precession angles (Lieske et al. 1977) */ psia77 = (5038.7784 + (-1.07259 + (-0.001147) * t) * t) * t * ERFA_DAS2R; oma77 = EPS0 + ((0.05127 + (-0.007726) * t) * t) * t * ERFA_DAS2R; chia = ( 10.5526 + (-2.38064 + (-0.001125) * t) * t) * t * ERFA_DAS2R; /* Apply IAU 2000 precession corrections. */ eraPr00(date1, date2, &dpsipr, &depspr); psia = psia77 + dpsipr; oma = oma77 + depspr; /* Frame bias matrix: GCRS to J2000.0. */ eraIr(rbw); eraRz(dra0, rbw); eraRy(dpsibi*sin(EPS0), rbw); eraRx(-depsbi, rbw); eraCr(rbw, rb); /* Precession matrix: J2000.0 to mean of date. */ eraIr(rp); eraRx(EPS0, rp); eraRz(-psia, rp); eraRx(-oma, rp); eraRz(chia, rp); /* Bias-precession matrix: GCRS to mean of date. */ eraRxr(rp, rbw, rbp); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/utcut1.c0000644001134200020070000001355612640262015020105 0ustar embrayscience00000000000000#include "erfa.h" int eraUtcut1(double utc1, double utc2, double dut1, double *ut11, double *ut12) /* ** - - - - - - - - - - ** e r a U t c u t 1 ** - - - - - - - - - - ** ** Time scale transformation: Coordinated Universal Time, UTC, to ** Universal Time, UT1. ** ** Given: ** utc1,utc2 double UTC as a 2-part quasi Julian Date (Notes 1-4) ** dut1 double Delta UT1 = UT1-UTC in seconds (Note 5) ** ** Returned: ** ut11,ut12 double UT1 as a 2-part Julian Date (Note 6) ** ** Returned (function value): ** int status: +1 = dubious year (Note 3) ** 0 = OK ** -1 = unacceptable date ** ** Notes: ** ** 1) utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any ** convenient way between the two arguments, for example where utc1 ** is the Julian Day Number and utc2 is the fraction of a day. ** ** 2) JD cannot unambiguously represent UTC during a leap second unless ** special measures are taken. The convention in the present ** function is that the JD day represents UTC days whether the ** length is 86399, 86400 or 86401 SI seconds. ** ** 3) The warning status "dubious year" flags UTCs that predate the ** introduction of the time scale or that are too far in the future ** to be trusted. See eraDat for further details. ** ** 4) The function eraDtf2d converts from calendar date and time of ** day into 2-part Julian Date, and in the case of UTC implements ** the leap-second-ambiguity convention described above. ** ** 5) Delta UT1 can be obtained from tabulations provided by the ** International Earth Rotation and Reference Systems Service. ** It is the caller's responsibility to supply a dut1 argument ** containing the UT1-UTC value that matches the given UTC. ** ** 6) The returned ut11,ut12 are such that their sum is the UT1 Julian ** Date. ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992) ** ** Called: ** eraJd2cal JD to Gregorian calendar ** eraDat delta(AT) = TAI-UTC ** eraUtctai UTC to TAI ** eraTaiut1 TAI to UT1 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int iy, im, id, js, jw; double w, dat, dta, tai1, tai2; /* Look up TAI-UTC. */ if ( eraJd2cal(utc1, utc2, &iy, &im, &id, &w) ) return -1; js = eraDat ( iy, im, id, 0.0, &dat); if ( js < 0 ) return -1; /* Form UT1-TAI. */ dta = dut1 - dat; /* UTC to TAI to UT1. */ jw = eraUtctai(utc1, utc2, &tai1, &tai2); if ( jw < 0 ) { return -1; } else if ( jw > 0 ) { js = jw; } if ( eraTaiut1(tai1, tai2, dta, ut11, ut12) ) return -1; /* Status. */ return js; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/eect00.c0000644001134200020070000002524612640262015017737 0ustar embrayscience00000000000000#include "erfa.h" double eraEect00(double date1, double date2) /* ** - - - - - - - - - - ** e r a E e c t 0 0 ** - - - - - - - - - - ** ** Equation of the equinoxes complementary terms, consistent with ** IAU 2000 resolutions. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned (function value): ** double complementary terms (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The "complementary terms" are part of the equation of the ** equinoxes (EE), classically the difference between apparent and ** mean Sidereal Time: ** ** GAST = GMST + EE ** ** with: ** ** EE = dpsi * cos(eps) ** ** where dpsi is the nutation in longitude and eps is the obliquity ** of date. However, if the rotation of the Earth were constant in ** an inertial frame the classical formulation would lead to ** apparent irregularities in the UT1 timescale traceable to side- ** effects of precession-nutation. In order to eliminate these ** effects from UT1, "complementary terms" were introduced in 1994 ** (IAU, 1994) and took effect from 1997 (Capitaine and Gontier, ** 1993): ** ** GAST = GMST + CT + EE ** ** By convention, the complementary terms are included as part of ** the equation of the equinoxes rather than as part of the mean ** Sidereal Time. This slightly compromises the "geometrical" ** interpretation of mean sidereal time but is otherwise ** inconsequential. ** ** The present function computes CT in the above expression, ** compatible with IAU 2000 resolutions (Capitaine et al., 2002, and ** IERS Conventions 2003). ** ** Called: ** eraFal03 mean anomaly of the Moon ** eraFalp03 mean anomaly of the Sun ** eraFaf03 mean argument of the latitude of the Moon ** eraFad03 mean elongation of the Moon from the Sun ** eraFaom03 mean longitude of the Moon's ascending node ** eraFave03 mean longitude of Venus ** eraFae03 mean longitude of Earth ** eraFapa03 general accumulated precession in longitude ** ** References: ** ** Capitaine, N. & Gontier, A.-M., Astron. Astrophys., 275, ** 645-650 (1993) ** ** Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to ** implement the IAU 2000 definition of UT1", Astronomy & ** Astrophysics, 406, 1135-1149 (2003) ** ** IAU Resolution C7, Recommendation 3 (1994) ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Time since J2000.0, in Julian centuries */ double t; /* Miscellaneous */ int i, j; double a, s0, s1; /* Fundamental arguments */ double fa[14]; /* Returned value. */ double eect; /* ----------------------------------------- */ /* The series for the EE complementary terms */ /* ----------------------------------------- */ typedef struct { int nfa[8]; /* coefficients of l,l',F,D,Om,LVe,LE,pA */ double s, c; /* sine and cosine coefficients */ } TERM; /* Terms of order t^0 */ static const TERM e0[] = { /* 1-10 */ {{ 0, 0, 0, 0, 1, 0, 0, 0}, 2640.96e-6, -0.39e-6 }, {{ 0, 0, 0, 0, 2, 0, 0, 0}, 63.52e-6, -0.02e-6 }, {{ 0, 0, 2, -2, 3, 0, 0, 0}, 11.75e-6, 0.01e-6 }, {{ 0, 0, 2, -2, 1, 0, 0, 0}, 11.21e-6, 0.01e-6 }, {{ 0, 0, 2, -2, 2, 0, 0, 0}, -4.55e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 3, 0, 0, 0}, 2.02e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 1, 0, 0, 0}, 1.98e-6, 0.00e-6 }, {{ 0, 0, 0, 0, 3, 0, 0, 0}, -1.72e-6, 0.00e-6 }, {{ 0, 1, 0, 0, 1, 0, 0, 0}, -1.41e-6, -0.01e-6 }, {{ 0, 1, 0, 0, -1, 0, 0, 0}, -1.26e-6, -0.01e-6 }, /* 11-20 */ {{ 1, 0, 0, 0, -1, 0, 0, 0}, -0.63e-6, 0.00e-6 }, {{ 1, 0, 0, 0, 1, 0, 0, 0}, -0.63e-6, 0.00e-6 }, {{ 0, 1, 2, -2, 3, 0, 0, 0}, 0.46e-6, 0.00e-6 }, {{ 0, 1, 2, -2, 1, 0, 0, 0}, 0.45e-6, 0.00e-6 }, {{ 0, 0, 4, -4, 4, 0, 0, 0}, 0.36e-6, 0.00e-6 }, {{ 0, 0, 1, -1, 1, -8, 12, 0}, -0.24e-6, -0.12e-6 }, {{ 0, 0, 2, 0, 0, 0, 0, 0}, 0.32e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 2, 0, 0, 0}, 0.28e-6, 0.00e-6 }, {{ 1, 0, 2, 0, 3, 0, 0, 0}, 0.27e-6, 0.00e-6 }, {{ 1, 0, 2, 0, 1, 0, 0, 0}, 0.26e-6, 0.00e-6 }, /* 21-30 */ {{ 0, 0, 2, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6 }, {{ 0, 1, -2, 2, -3, 0, 0, 0}, 0.19e-6, 0.00e-6 }, {{ 0, 1, -2, 2, -1, 0, 0, 0}, 0.18e-6, 0.00e-6 }, {{ 0, 0, 0, 0, 0, 8,-13, -1}, -0.10e-6, 0.05e-6 }, {{ 0, 0, 0, 2, 0, 0, 0, 0}, 0.15e-6, 0.00e-6 }, {{ 2, 0, -2, 0, -1, 0, 0, 0}, -0.14e-6, 0.00e-6 }, {{ 1, 0, 0, -2, 1, 0, 0, 0}, 0.14e-6, 0.00e-6 }, {{ 0, 1, 2, -2, 2, 0, 0, 0}, -0.14e-6, 0.00e-6 }, {{ 1, 0, 0, -2, -1, 0, 0, 0}, 0.14e-6, 0.00e-6 }, {{ 0, 0, 4, -2, 4, 0, 0, 0}, 0.13e-6, 0.00e-6 }, /* 31-33 */ {{ 0, 0, 2, -2, 4, 0, 0, 0}, -0.11e-6, 0.00e-6 }, {{ 1, 0, -2, 0, -3, 0, 0, 0}, 0.11e-6, 0.00e-6 }, {{ 1, 0, -2, 0, -1, 0, 0, 0}, 0.11e-6, 0.00e-6 } }; /* Terms of order t^1 */ static const TERM e1[] = { {{ 0, 0, 0, 0, 1, 0, 0, 0}, -0.87e-6, 0.00e-6 } }; /* Number of terms in the series */ const int NE0 = (int) (sizeof e0 / sizeof (TERM)); const int NE1 = (int) (sizeof e1 / sizeof (TERM)); /*--------------------------------------------------------------------*/ /* Interval between fundamental epoch J2000.0 and current date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* Fundamental Arguments (from IERS Conventions 2003) */ /* Mean anomaly of the Moon. */ fa[0] = eraFal03(t); /* Mean anomaly of the Sun. */ fa[1] = eraFalp03(t); /* Mean longitude of the Moon minus that of the ascending node. */ fa[2] = eraFaf03(t); /* Mean elongation of the Moon from the Sun. */ fa[3] = eraFad03(t); /* Mean longitude of the ascending node of the Moon. */ fa[4] = eraFaom03(t); /* Mean longitude of Venus. */ fa[5] = eraFave03(t); /* Mean longitude of Earth. */ fa[6] = eraFae03(t); /* General precession in longitude. */ fa[7] = eraFapa03(t); /* Evaluate the EE complementary terms. */ s0 = 0.0; s1 = 0.0; for (i = NE0-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)(e0[i].nfa[j]) * fa[j]; } s0 += e0[i].s * sin(a) + e0[i].c * cos(a); } for (i = NE1-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)(e1[i].nfa[j]) * fa[j]; } s1 += e1[i].s * sin(a) + e1[i].c * cos(a); } eect = (s0 + s1 * t ) * ERFA_DAS2R; return eect; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/zp.c0000644001134200020070000000641612640262015017306 0ustar embrayscience00000000000000#include "erfa.h" void eraZp(double p[3]) /* ** - - - - - - ** e r a Z p ** - - - - - - ** ** Zero a p-vector. ** ** Returned: ** p double[3] p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { p[0] = 0.0; p[1] = 0.0; p[2] = 0.0; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2ibpn.c0000644001134200020070000001375712640262015020040 0ustar embrayscience00000000000000#include "erfa.h" void eraC2ibpn(double date1, double date2, double rbpn[3][3], double rc2i[3][3]) /* ** - - - - - - - - - - ** e r a C 2 i b p n ** - - - - - - - - - - ** ** Form the celestial-to-intermediate matrix for a given date given ** the bias-precession-nutation matrix. IAU 2000. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** rbpn double[3][3] celestial-to-true matrix (Note 2) ** ** Returned: ** rc2i double[3][3] celestial-to-intermediate matrix (Note 3) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix rbpn transforms vectors from GCRS to true equator (and ** CIO or equinox) of date. Only the CIP (bottom row) is used. ** ** 3) The matrix rc2i is the first stage in the transformation from ** celestial to terrestrial coordinates: ** ** [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] ** ** = RC2T * [CRS] ** ** where [CRS] is a vector in the Geocentric Celestial Reference ** System and [TRS] is a vector in the International Terrestrial ** Reference System (see IERS Conventions 2003), ERA is the Earth ** Rotation Angle and RPOM is the polar motion matrix. ** ** 4) Although its name does not include "00", This function is in fact ** specific to the IAU 2000 models. ** ** Called: ** eraBpn2xy extract CIP X,Y coordinates from NPB matrix ** eraC2ixy celestial-to-intermediate matrix, given X,Y ** ** References: ** "Expressions for the Celestial Intermediate Pole and Celestial ** Ephemeris Origin consistent with the IAU 2000A precession- ** nutation model", Astron.Astrophys. 400, 1145-1154 (2003) ** ** n.b. The celestial ephemeris origin (CEO) was renamed "celestial ** intermediate origin" (CIO) by IAU 2006 Resolution 2. ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double x, y; /* Extract the X,Y coordinates. */ eraBpn2xy(rbpn, &x, &y); /* Form the celestial-to-intermediate matrix (n.b. IAU 2000 specific). */ eraC2ixy(date1, date2, x, y, rc2i); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/nut00a.c0000644001134200020070000034721012640262015017764 0ustar embrayscience00000000000000#include "erfa.h" void eraNut00a(double date1, double date2, double *dpsi, double *deps) /* ** - - - - - - - - - - ** e r a N u t 0 0 a ** - - - - - - - - - - ** ** Nutation, IAU 2000A model (MHB2000 luni-solar and planetary nutation ** with free core nutation omitted). ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** dpsi,deps double nutation, luni-solar + planetary (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The nutation components in longitude and obliquity are in radians ** and with respect to the equinox and ecliptic of date. The ** obliquity at J2000.0 is assumed to be the Lieske et al. (1977) ** value of 84381.448 arcsec. ** ** Both the luni-solar and planetary nutations are included. The ** latter are due to direct planetary nutations and the ** perturbations of the lunar and terrestrial orbits. ** ** 3) The function computes the MHB2000 nutation series with the ** associated corrections for planetary nutations. It is an ** implementation of the nutation part of the IAU 2000A precession- ** nutation model, formally adopted by the IAU General Assembly in ** 2000, namely MHB2000 (Mathews et al. 2002), but with the free ** core nutation (FCN - see Note 4) omitted. ** ** 4) The full MHB2000 model also contains contributions to the ** nutations in longitude and obliquity due to the free-excitation ** of the free-core-nutation during the period 1979-2000. These FCN ** terms, which are time-dependent and unpredictable, are NOT ** included in the present function and, if required, must be ** independently computed. With the FCN corrections included, the ** present function delivers a pole which is at current epochs ** accurate to a few hundred microarcseconds. The omission of FCN ** introduces further errors of about that size. ** ** 5) The present function provides classical nutation. The MHB2000 ** algorithm, from which it is adapted, deals also with (i) the ** offsets between the GCRS and mean poles and (ii) the adjustments ** in longitude and obliquity due to the changed precession rates. ** These additional functions, namely frame bias and precession ** adjustments, are supported by the ERFA functions eraBi00 and ** eraPr00. ** ** 6) The MHB2000 algorithm also provides "total" nutations, comprising ** the arithmetic sum of the frame bias, precession adjustments, ** luni-solar nutation and planetary nutation. These total ** nutations can be used in combination with an existing IAU 1976 ** precession implementation, such as eraPmat76, to deliver GCRS- ** to-true predictions of sub-mas accuracy at current dates. ** However, there are three shortcomings in the MHB2000 model that ** must be taken into account if more accurate or definitive results ** are required (see Wallace 2002): ** ** (i) The MHB2000 total nutations are simply arithmetic sums, ** yet in reality the various components are successive Euler ** rotations. This slight lack of rigor leads to cross terms ** that exceed 1 mas after a century. The rigorous procedure ** is to form the GCRS-to-true rotation matrix by applying the ** bias, precession and nutation in that order. ** ** (ii) Although the precession adjustments are stated to be with ** respect to Lieske et al. (1977), the MHB2000 model does ** not specify which set of Euler angles are to be used and ** how the adjustments are to be applied. The most literal ** and straightforward procedure is to adopt the 4-rotation ** epsilon_0, psi_A, omega_A, xi_A option, and to add DPSIPR ** to psi_A and DEPSPR to both omega_A and eps_A. ** ** (iii) The MHB2000 model predates the determination by Chapront ** et al. (2002) of a 14.6 mas displacement between the ** J2000.0 mean equinox and the origin of the ICRS frame. It ** should, however, be noted that neglecting this displacement ** when calculating star coordinates does not lead to a ** 14.6 mas change in right ascension, only a small second- ** order distortion in the pattern of the precession-nutation ** effect. ** ** For these reasons, the ERFA functions do not generate the "total ** nutations" directly, though they can of course easily be ** generated by calling eraBi00, eraPr00 and the present function ** and adding the results. ** ** 7) The MHB2000 model contains 41 instances where the same frequency ** appears multiple times, of which 38 are duplicates and three are ** triplicates. To keep the present code close to the original MHB ** algorithm, this small inefficiency has not been corrected. ** ** Called: ** eraFal03 mean anomaly of the Moon ** eraFaf03 mean argument of the latitude of the Moon ** eraFaom03 mean longitude of the Moon's ascending node ** eraFame03 mean longitude of Mercury ** eraFave03 mean longitude of Venus ** eraFae03 mean longitude of Earth ** eraFama03 mean longitude of Mars ** eraFaju03 mean longitude of Jupiter ** eraFasa03 mean longitude of Saturn ** eraFaur03 mean longitude of Uranus ** eraFapa03 general accumulated precession in longitude ** ** References: ** ** Chapront, J., Chapront-Touze, M. & Francou, G. 2002, ** Astron.Astrophys. 387, 700 ** ** Lieske, J.H., Lederle, T., Fricke, W. & Morando, B. 1977, ** Astron.Astrophys. 58, 1-16 ** ** Mathews, P.M., Herring, T.A., Buffet, B.A. 2002, J.Geophys.Res. ** 107, B4. The MHB_2000 code itself was obtained on 9th September ** 2002 from ftp//maia.usno.navy.mil/conv2000/chapter5/IAU2000A. ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, ** Astron.Astrophys.Supp.Ser. 135, 111 ** ** Wallace, P.T., "Software for Implementing the IAU 2000 ** Resolutions", in IERS Workshop 5.1 (2002) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int i; double t, el, elp, f, d, om, arg, dp, de, sarg, carg, al, af, ad, aom, alme, alve, alea, alma, alju, alsa, alur, alne, apa, dpsils, depsls, dpsipl, depspl; /* Units of 0.1 microarcsecond to radians */ const double U2R = ERFA_DAS2R / 1e7; /* ------------------------- */ /* Luni-Solar nutation model */ /* ------------------------- */ /* The units for the sine and cosine coefficients are */ /* 0.1 microarcsecond and the same per Julian century */ static const struct { int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */ double sp,spt,cp; /* longitude sin, t*sin, cos coefficients */ double ce,cet,se; /* obliquity cos, t*cos, sin coefficients */ } xls[] = { /* 1- 10 */ { 0, 0, 0, 0, 1, -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0}, { 0, 0, 2,-2, 2, -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0}, { 0, 0, 2, 0, 2,-2276413.0,-234.0,2796.0,978459.0,-485.0, 1374.0}, { 0, 0, 0, 0, 2,2074554.0, 207.0, -698.0,-897492.0,470.0, -291.0}, { 0, 1, 0, 0, 0,1475877.0,-3633.0,11817.0,73871.0,-184.0,-1924.0}, { 0, 1, 2,-2, 2,-516821.0,1226.0, -524.0,224386.0,-677.0, -174.0}, { 1, 0, 0, 0, 0, 711159.0, 73.0, -872.0, -6750.0, 0.0, 358.0}, { 0, 0, 2, 0, 1,-387298.0,-367.0, 380.0, 200728.0, 18.0, 318.0}, { 1, 0, 2, 0, 2,-301461.0, -36.0, 816.0, 129025.0,-63.0, 367.0}, { 0,-1, 2,-2, 2, 215829.0,-494.0, 111.0, -95929.0,299.0, 132.0}, /* 11-20 */ { 0, 0, 2,-2, 1, 128227.0, 137.0, 181.0, -68982.0, -9.0, 39.0}, {-1, 0, 2, 0, 2, 123457.0, 11.0, 19.0, -53311.0, 32.0, -4.0}, {-1, 0, 0, 2, 0, 156994.0, 10.0, -168.0, -1235.0, 0.0, 82.0}, { 1, 0, 0, 0, 1, 63110.0, 63.0, 27.0, -33228.0, 0.0, -9.0}, {-1, 0, 0, 0, 1, -57976.0, -63.0, -189.0, 31429.0, 0.0, -75.0}, {-1, 0, 2, 2, 2, -59641.0, -11.0, 149.0, 25543.0,-11.0, 66.0}, { 1, 0, 2, 0, 1, -51613.0, -42.0, 129.0, 26366.0, 0.0, 78.0}, {-2, 0, 2, 0, 1, 45893.0, 50.0, 31.0, -24236.0,-10.0, 20.0}, { 0, 0, 0, 2, 0, 63384.0, 11.0, -150.0, -1220.0, 0.0, 29.0}, { 0, 0, 2, 2, 2, -38571.0, -1.0, 158.0, 16452.0,-11.0, 68.0}, /* 21-30 */ { 0,-2, 2,-2, 2, 32481.0, 0.0, 0.0, -13870.0, 0.0, 0.0}, {-2, 0, 0, 2, 0, -47722.0, 0.0, -18.0, 477.0, 0.0, -25.0}, { 2, 0, 2, 0, 2, -31046.0, -1.0, 131.0, 13238.0,-11.0, 59.0}, { 1, 0, 2,-2, 2, 28593.0, 0.0, -1.0, -12338.0, 10.0, -3.0}, {-1, 0, 2, 0, 1, 20441.0, 21.0, 10.0, -10758.0, 0.0, -3.0}, { 2, 0, 0, 0, 0, 29243.0, 0.0, -74.0, -609.0, 0.0, 13.0}, { 0, 0, 2, 0, 0, 25887.0, 0.0, -66.0, -550.0, 0.0, 11.0}, { 0, 1, 0, 0, 1, -14053.0, -25.0, 79.0, 8551.0, -2.0, -45.0}, {-1, 0, 0, 2, 1, 15164.0, 10.0, 11.0, -8001.0, 0.0, -1.0}, { 0, 2, 2,-2, 2, -15794.0, 72.0, -16.0, 6850.0,-42.0, -5.0}, /* 31-40 */ { 0, 0,-2, 2, 0, 21783.0, 0.0, 13.0, -167.0, 0.0, 13.0}, { 1, 0, 0,-2, 1, -12873.0, -10.0, -37.0, 6953.0, 0.0, -14.0}, { 0,-1, 0, 0, 1, -12654.0, 11.0, 63.0, 6415.0, 0.0, 26.0}, {-1, 0, 2, 2, 1, -10204.0, 0.0, 25.0, 5222.0, 0.0, 15.0}, { 0, 2, 0, 0, 0, 16707.0, -85.0, -10.0, 168.0, -1.0, 10.0}, { 1, 0, 2, 2, 2, -7691.0, 0.0, 44.0, 3268.0, 0.0, 19.0}, {-2, 0, 2, 0, 0, -11024.0, 0.0, -14.0, 104.0, 0.0, 2.0}, { 0, 1, 2, 0, 2, 7566.0, -21.0, -11.0, -3250.0, 0.0, -5.0}, { 0, 0, 2, 2, 1, -6637.0, -11.0, 25.0, 3353.0, 0.0, 14.0}, { 0,-1, 2, 0, 2, -7141.0, 21.0, 8.0, 3070.0, 0.0, 4.0}, /* 41-50 */ { 0, 0, 0, 2, 1, -6302.0, -11.0, 2.0, 3272.0, 0.0, 4.0}, { 1, 0, 2,-2, 1, 5800.0, 10.0, 2.0, -3045.0, 0.0, -1.0}, { 2, 0, 2,-2, 2, 6443.0, 0.0, -7.0, -2768.0, 0.0, -4.0}, {-2, 0, 0, 2, 1, -5774.0, -11.0, -15.0, 3041.0, 0.0, -5.0}, { 2, 0, 2, 0, 1, -5350.0, 0.0, 21.0, 2695.0, 0.0, 12.0}, { 0,-1, 2,-2, 1, -4752.0, -11.0, -3.0, 2719.0, 0.0, -3.0}, { 0, 0, 0,-2, 1, -4940.0, -11.0, -21.0, 2720.0, 0.0, -9.0}, {-1,-1, 0, 2, 0, 7350.0, 0.0, -8.0, -51.0, 0.0, 4.0}, { 2, 0, 0,-2, 1, 4065.0, 0.0, 6.0, -2206.0, 0.0, 1.0}, { 1, 0, 0, 2, 0, 6579.0, 0.0, -24.0, -199.0, 0.0, 2.0}, /* 51-60 */ { 0, 1, 2,-2, 1, 3579.0, 0.0, 5.0, -1900.0, 0.0, 1.0}, { 1,-1, 0, 0, 0, 4725.0, 0.0, -6.0, -41.0, 0.0, 3.0}, {-2, 0, 2, 0, 2, -3075.0, 0.0, -2.0, 1313.0, 0.0, -1.0}, { 3, 0, 2, 0, 2, -2904.0, 0.0, 15.0, 1233.0, 0.0, 7.0}, { 0,-1, 0, 2, 0, 4348.0, 0.0, -10.0, -81.0, 0.0, 2.0}, { 1,-1, 2, 0, 2, -2878.0, 0.0, 8.0, 1232.0, 0.0, 4.0}, { 0, 0, 0, 1, 0, -4230.0, 0.0, 5.0, -20.0, 0.0, -2.0}, {-1,-1, 2, 2, 2, -2819.0, 0.0, 7.0, 1207.0, 0.0, 3.0}, {-1, 0, 2, 0, 0, -4056.0, 0.0, 5.0, 40.0, 0.0, -2.0}, { 0,-1, 2, 2, 2, -2647.0, 0.0, 11.0, 1129.0, 0.0, 5.0}, /* 61-70 */ {-2, 0, 0, 0, 1, -2294.0, 0.0, -10.0, 1266.0, 0.0, -4.0}, { 1, 1, 2, 0, 2, 2481.0, 0.0, -7.0, -1062.0, 0.0, -3.0}, { 2, 0, 0, 0, 1, 2179.0, 0.0, -2.0, -1129.0, 0.0, -2.0}, {-1, 1, 0, 1, 0, 3276.0, 0.0, 1.0, -9.0, 0.0, 0.0}, { 1, 1, 0, 0, 0, -3389.0, 0.0, 5.0, 35.0, 0.0, -2.0}, { 1, 0, 2, 0, 0, 3339.0, 0.0, -13.0, -107.0, 0.0, 1.0}, {-1, 0, 2,-2, 1, -1987.0, 0.0, -6.0, 1073.0, 0.0, -2.0}, { 1, 0, 0, 0, 2, -1981.0, 0.0, 0.0, 854.0, 0.0, 0.0}, {-1, 0, 0, 1, 0, 4026.0, 0.0, -353.0, -553.0, 0.0, -139.0}, { 0, 0, 2, 1, 2, 1660.0, 0.0, -5.0, -710.0, 0.0, -2.0}, /* 71-80 */ {-1, 0, 2, 4, 2, -1521.0, 0.0, 9.0, 647.0, 0.0, 4.0}, {-1, 1, 0, 1, 1, 1314.0, 0.0, 0.0, -700.0, 0.0, 0.0}, { 0,-2, 2,-2, 1, -1283.0, 0.0, 0.0, 672.0, 0.0, 0.0}, { 1, 0, 2, 2, 1, -1331.0, 0.0, 8.0, 663.0, 0.0, 4.0}, {-2, 0, 2, 2, 2, 1383.0, 0.0, -2.0, -594.0, 0.0, -2.0}, {-1, 0, 0, 0, 2, 1405.0, 0.0, 4.0, -610.0, 0.0, 2.0}, { 1, 1, 2,-2, 2, 1290.0, 0.0, 0.0, -556.0, 0.0, 0.0}, {-2, 0, 2, 4, 2, -1214.0, 0.0, 5.0, 518.0, 0.0, 2.0}, {-1, 0, 4, 0, 2, 1146.0, 0.0, -3.0, -490.0, 0.0, -1.0}, { 2, 0, 2,-2, 1, 1019.0, 0.0, -1.0, -527.0, 0.0, -1.0}, /* 81-90 */ { 2, 0, 2, 2, 2, -1100.0, 0.0, 9.0, 465.0, 0.0, 4.0}, { 1, 0, 0, 2, 1, -970.0, 0.0, 2.0, 496.0, 0.0, 1.0}, { 3, 0, 0, 0, 0, 1575.0, 0.0, -6.0, -50.0, 0.0, 0.0}, { 3, 0, 2,-2, 2, 934.0, 0.0, -3.0, -399.0, 0.0, -1.0}, { 0, 0, 4,-2, 2, 922.0, 0.0, -1.0, -395.0, 0.0, -1.0}, { 0, 1, 2, 0, 1, 815.0, 0.0, -1.0, -422.0, 0.0, -1.0}, { 0, 0,-2, 2, 1, 834.0, 0.0, 2.0, -440.0, 0.0, 1.0}, { 0, 0, 2,-2, 3, 1248.0, 0.0, 0.0, -170.0, 0.0, 1.0}, {-1, 0, 0, 4, 0, 1338.0, 0.0, -5.0, -39.0, 0.0, 0.0}, { 2, 0,-2, 0, 1, 716.0, 0.0, -2.0, -389.0, 0.0, -1.0}, /* 91-100 */ {-2, 0, 0, 4, 0, 1282.0, 0.0, -3.0, -23.0, 0.0, 1.0}, {-1,-1, 0, 2, 1, 742.0, 0.0, 1.0, -391.0, 0.0, 0.0}, {-1, 0, 0, 1, 1, 1020.0, 0.0, -25.0, -495.0, 0.0, -10.0}, { 0, 1, 0, 0, 2, 715.0, 0.0, -4.0, -326.0, 0.0, 2.0}, { 0, 0,-2, 0, 1, -666.0, 0.0, -3.0, 369.0, 0.0, -1.0}, { 0,-1, 2, 0, 1, -667.0, 0.0, 1.0, 346.0, 0.0, 1.0}, { 0, 0, 2,-1, 2, -704.0, 0.0, 0.0, 304.0, 0.0, 0.0}, { 0, 0, 2, 4, 2, -694.0, 0.0, 5.0, 294.0, 0.0, 2.0}, {-2,-1, 0, 2, 0, -1014.0, 0.0, -1.0, 4.0, 0.0, -1.0}, { 1, 1, 0,-2, 1, -585.0, 0.0, -2.0, 316.0, 0.0, -1.0}, /* 101-110 */ {-1, 1, 0, 2, 0, -949.0, 0.0, 1.0, 8.0, 0.0, -1.0}, {-1, 1, 0, 1, 2, -595.0, 0.0, 0.0, 258.0, 0.0, 0.0}, { 1,-1, 0, 0, 1, 528.0, 0.0, 0.0, -279.0, 0.0, 0.0}, { 1,-1, 2, 2, 2, -590.0, 0.0, 4.0, 252.0, 0.0, 2.0}, {-1, 1, 2, 2, 2, 570.0, 0.0, -2.0, -244.0, 0.0, -1.0}, { 3, 0, 2, 0, 1, -502.0, 0.0, 3.0, 250.0, 0.0, 2.0}, { 0, 1,-2, 2, 0, -875.0, 0.0, 1.0, 29.0, 0.0, 0.0}, {-1, 0, 0,-2, 1, -492.0, 0.0, -3.0, 275.0, 0.0, -1.0}, { 0, 1, 2, 2, 2, 535.0, 0.0, -2.0, -228.0, 0.0, -1.0}, {-1,-1, 2, 2, 1, -467.0, 0.0, 1.0, 240.0, 0.0, 1.0}, /* 111-120 */ { 0,-1, 0, 0, 2, 591.0, 0.0, 0.0, -253.0, 0.0, 0.0}, { 1, 0, 2,-4, 1, -453.0, 0.0, -1.0, 244.0, 0.0, -1.0}, {-1, 0,-2, 2, 0, 766.0, 0.0, 1.0, 9.0, 0.0, 0.0}, { 0,-1, 2, 2, 1, -446.0, 0.0, 2.0, 225.0, 0.0, 1.0}, { 2,-1, 2, 0, 2, -488.0, 0.0, 2.0, 207.0, 0.0, 1.0}, { 0, 0, 0, 2, 2, -468.0, 0.0, 0.0, 201.0, 0.0, 0.0}, { 1,-1, 2, 0, 1, -421.0, 0.0, 1.0, 216.0, 0.0, 1.0}, {-1, 1, 2, 0, 2, 463.0, 0.0, 0.0, -200.0, 0.0, 0.0}, { 0, 1, 0, 2, 0, -673.0, 0.0, 2.0, 14.0, 0.0, 0.0}, { 0,-1,-2, 2, 0, 658.0, 0.0, 0.0, -2.0, 0.0, 0.0}, /* 121-130 */ { 0, 3, 2,-2, 2, -438.0, 0.0, 0.0, 188.0, 0.0, 0.0}, { 0, 0, 0, 1, 1, -390.0, 0.0, 0.0, 205.0, 0.0, 0.0}, {-1, 0, 2, 2, 0, 639.0, -11.0, -2.0, -19.0, 0.0, 0.0}, { 2, 1, 2, 0, 2, 412.0, 0.0, -2.0, -176.0, 0.0, -1.0}, { 1, 1, 0, 0, 1, -361.0, 0.0, 0.0, 189.0, 0.0, 0.0}, { 1, 1, 2, 0, 1, 360.0, 0.0, -1.0, -185.0, 0.0, -1.0}, { 2, 0, 0, 2, 0, 588.0, 0.0, -3.0, -24.0, 0.0, 0.0}, { 1, 0,-2, 2, 0, -578.0, 0.0, 1.0, 5.0, 0.0, 0.0}, {-1, 0, 0, 2, 2, -396.0, 0.0, 0.0, 171.0, 0.0, 0.0}, { 0, 1, 0, 1, 0, 565.0, 0.0, -1.0, -6.0, 0.0, 0.0}, /* 131-140 */ { 0, 1, 0,-2, 1, -335.0, 0.0, -1.0, 184.0, 0.0, -1.0}, {-1, 0, 2,-2, 2, 357.0, 0.0, 1.0, -154.0, 0.0, 0.0}, { 0, 0, 0,-1, 1, 321.0, 0.0, 1.0, -174.0, 0.0, 0.0}, {-1, 1, 0, 0, 1, -301.0, 0.0, -1.0, 162.0, 0.0, 0.0}, { 1, 0, 2,-1, 2, -334.0, 0.0, 0.0, 144.0, 0.0, 0.0}, { 1,-1, 0, 2, 0, 493.0, 0.0, -2.0, -15.0, 0.0, 0.0}, { 0, 0, 0, 4, 0, 494.0, 0.0, -2.0, -19.0, 0.0, 0.0}, { 1, 0, 2, 1, 2, 337.0, 0.0, -1.0, -143.0, 0.0, -1.0}, { 0, 0, 2, 1, 1, 280.0, 0.0, -1.0, -144.0, 0.0, 0.0}, { 1, 0, 0,-2, 2, 309.0, 0.0, 1.0, -134.0, 0.0, 0.0}, /* 141-150 */ {-1, 0, 2, 4, 1, -263.0, 0.0, 2.0, 131.0, 0.0, 1.0}, { 1, 0,-2, 0, 1, 253.0, 0.0, 1.0, -138.0, 0.0, 0.0}, { 1, 1, 2,-2, 1, 245.0, 0.0, 0.0, -128.0, 0.0, 0.0}, { 0, 0, 2, 2, 0, 416.0, 0.0, -2.0, -17.0, 0.0, 0.0}, {-1, 0, 2,-1, 1, -229.0, 0.0, 0.0, 128.0, 0.0, 0.0}, {-2, 0, 2, 2, 1, 231.0, 0.0, 0.0, -120.0, 0.0, 0.0}, { 4, 0, 2, 0, 2, -259.0, 0.0, 2.0, 109.0, 0.0, 1.0}, { 2,-1, 0, 0, 0, 375.0, 0.0, -1.0, -8.0, 0.0, 0.0}, { 2, 1, 2,-2, 2, 252.0, 0.0, 0.0, -108.0, 0.0, 0.0}, { 0, 1, 2, 1, 2, -245.0, 0.0, 1.0, 104.0, 0.0, 0.0}, /* 151-160 */ { 1, 0, 4,-2, 2, 243.0, 0.0, -1.0, -104.0, 0.0, 0.0}, {-1,-1, 0, 0, 1, 208.0, 0.0, 1.0, -112.0, 0.0, 0.0}, { 0, 1, 0, 2, 1, 199.0, 0.0, 0.0, -102.0, 0.0, 0.0}, {-2, 0, 2, 4, 1, -208.0, 0.0, 1.0, 105.0, 0.0, 0.0}, { 2, 0, 2, 0, 0, 335.0, 0.0, -2.0, -14.0, 0.0, 0.0}, { 1, 0, 0, 1, 0, -325.0, 0.0, 1.0, 7.0, 0.0, 0.0}, {-1, 0, 0, 4, 1, -187.0, 0.0, 0.0, 96.0, 0.0, 0.0}, {-1, 0, 4, 0, 1, 197.0, 0.0, -1.0, -100.0, 0.0, 0.0}, { 2, 0, 2, 2, 1, -192.0, 0.0, 2.0, 94.0, 0.0, 1.0}, { 0, 0, 2,-3, 2, -188.0, 0.0, 0.0, 83.0, 0.0, 0.0}, /* 161-170 */ {-1,-2, 0, 2, 0, 276.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 2, 1, 0, 0, 0, -286.0, 0.0, 1.0, 6.0, 0.0, 0.0}, { 0, 0, 4, 0, 2, 186.0, 0.0, -1.0, -79.0, 0.0, 0.0}, { 0, 0, 0, 0, 3, -219.0, 0.0, 0.0, 43.0, 0.0, 0.0}, { 0, 3, 0, 0, 0, 276.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 0, 0, 2,-4, 1, -153.0, 0.0, -1.0, 84.0, 0.0, 0.0}, { 0,-1, 0, 2, 1, -156.0, 0.0, 0.0, 81.0, 0.0, 0.0}, { 0, 0, 0, 4, 1, -154.0, 0.0, 1.0, 78.0, 0.0, 0.0}, {-1,-1, 2, 4, 2, -174.0, 0.0, 1.0, 75.0, 0.0, 0.0}, { 1, 0, 2, 4, 2, -163.0, 0.0, 2.0, 69.0, 0.0, 1.0}, /* 171-180 */ {-2, 2, 0, 2, 0, -228.0, 0.0, 0.0, 1.0, 0.0, 0.0}, {-2,-1, 2, 0, 1, 91.0, 0.0, -4.0, -54.0, 0.0, -2.0}, {-2, 0, 0, 2, 2, 175.0, 0.0, 0.0, -75.0, 0.0, 0.0}, {-1,-1, 2, 0, 2, -159.0, 0.0, 0.0, 69.0, 0.0, 0.0}, { 0, 0, 4,-2, 1, 141.0, 0.0, 0.0, -72.0, 0.0, 0.0}, { 3, 0, 2,-2, 1, 147.0, 0.0, 0.0, -75.0, 0.0, 0.0}, {-2,-1, 0, 2, 1, -132.0, 0.0, 0.0, 69.0, 0.0, 0.0}, { 1, 0, 0,-1, 1, 159.0, 0.0, -28.0, -54.0, 0.0, 11.0}, { 0,-2, 0, 2, 0, 213.0, 0.0, 0.0, -4.0, 0.0, 0.0}, {-2, 0, 0, 4, 1, 123.0, 0.0, 0.0, -64.0, 0.0, 0.0}, /* 181-190 */ {-3, 0, 0, 0, 1, -118.0, 0.0, -1.0, 66.0, 0.0, 0.0}, { 1, 1, 2, 2, 2, 144.0, 0.0, -1.0, -61.0, 0.0, 0.0}, { 0, 0, 2, 4, 1, -121.0, 0.0, 1.0, 60.0, 0.0, 0.0}, { 3, 0, 2, 2, 2, -134.0, 0.0, 1.0, 56.0, 0.0, 1.0}, {-1, 1, 2,-2, 1, -105.0, 0.0, 0.0, 57.0, 0.0, 0.0}, { 2, 0, 0,-4, 1, -102.0, 0.0, 0.0, 56.0, 0.0, 0.0}, { 0, 0, 0,-2, 2, 120.0, 0.0, 0.0, -52.0, 0.0, 0.0}, { 2, 0, 2,-4, 1, 101.0, 0.0, 0.0, -54.0, 0.0, 0.0}, {-1, 1, 0, 2, 1, -113.0, 0.0, 0.0, 59.0, 0.0, 0.0}, { 0, 0, 2,-1, 1, -106.0, 0.0, 0.0, 61.0, 0.0, 0.0}, /* 191-200 */ { 0,-2, 2, 2, 2, -129.0, 0.0, 1.0, 55.0, 0.0, 0.0}, { 2, 0, 0, 2, 1, -114.0, 0.0, 0.0, 57.0, 0.0, 0.0}, { 4, 0, 2,-2, 2, 113.0, 0.0, -1.0, -49.0, 0.0, 0.0}, { 2, 0, 0,-2, 2, -102.0, 0.0, 0.0, 44.0, 0.0, 0.0}, { 0, 2, 0, 0, 1, -94.0, 0.0, 0.0, 51.0, 0.0, 0.0}, { 1, 0, 0,-4, 1, -100.0, 0.0, -1.0, 56.0, 0.0, 0.0}, { 0, 2, 2,-2, 1, 87.0, 0.0, 0.0, -47.0, 0.0, 0.0}, {-3, 0, 0, 4, 0, 161.0, 0.0, 0.0, -1.0, 0.0, 0.0}, {-1, 1, 2, 0, 1, 96.0, 0.0, 0.0, -50.0, 0.0, 0.0}, {-1,-1, 0, 4, 0, 151.0, 0.0, -1.0, -5.0, 0.0, 0.0}, /* 201-210 */ {-1,-2, 2, 2, 2, -104.0, 0.0, 0.0, 44.0, 0.0, 0.0}, {-2,-1, 2, 4, 2, -110.0, 0.0, 0.0, 48.0, 0.0, 0.0}, { 1,-1, 2, 2, 1, -100.0, 0.0, 1.0, 50.0, 0.0, 0.0}, {-2, 1, 0, 2, 0, 92.0, 0.0, -5.0, 12.0, 0.0, -2.0}, {-2, 1, 2, 0, 1, 82.0, 0.0, 0.0, -45.0, 0.0, 0.0}, { 2, 1, 0,-2, 1, 82.0, 0.0, 0.0, -45.0, 0.0, 0.0}, {-3, 0, 2, 0, 1, -78.0, 0.0, 0.0, 41.0, 0.0, 0.0}, {-2, 0, 2,-2, 1, -77.0, 0.0, 0.0, 43.0, 0.0, 0.0}, {-1, 1, 0, 2, 2, 2.0, 0.0, 0.0, 54.0, 0.0, 0.0}, { 0,-1, 2,-1, 2, 94.0, 0.0, 0.0, -40.0, 0.0, 0.0}, /* 211-220 */ {-1, 0, 4,-2, 2, -93.0, 0.0, 0.0, 40.0, 0.0, 0.0}, { 0,-2, 2, 0, 2, -83.0, 0.0, 10.0, 40.0, 0.0, -2.0}, {-1, 0, 2, 1, 2, 83.0, 0.0, 0.0, -36.0, 0.0, 0.0}, { 2, 0, 0, 0, 2, -91.0, 0.0, 0.0, 39.0, 0.0, 0.0}, { 0, 0, 2, 0, 3, 128.0, 0.0, 0.0, -1.0, 0.0, 0.0}, {-2, 0, 4, 0, 2, -79.0, 0.0, 0.0, 34.0, 0.0, 0.0}, {-1, 0,-2, 0, 1, -83.0, 0.0, 0.0, 47.0, 0.0, 0.0}, {-1, 1, 2, 2, 1, 84.0, 0.0, 0.0, -44.0, 0.0, 0.0}, { 3, 0, 0, 0, 1, 83.0, 0.0, 0.0, -43.0, 0.0, 0.0}, {-1, 0, 2, 3, 2, 91.0, 0.0, 0.0, -39.0, 0.0, 0.0}, /* 221-230 */ { 2,-1, 2, 0, 1, -77.0, 0.0, 0.0, 39.0, 0.0, 0.0}, { 0, 1, 2, 2, 1, 84.0, 0.0, 0.0, -43.0, 0.0, 0.0}, { 0,-1, 2, 4, 2, -92.0, 0.0, 1.0, 39.0, 0.0, 0.0}, { 2,-1, 2, 2, 2, -92.0, 0.0, 1.0, 39.0, 0.0, 0.0}, { 0, 2,-2, 2, 0, -94.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1,-1, 2,-1, 1, 68.0, 0.0, 0.0, -36.0, 0.0, 0.0}, { 0,-2, 0, 0, 1, -61.0, 0.0, 0.0, 32.0, 0.0, 0.0}, { 1, 0, 2,-4, 2, 71.0, 0.0, 0.0, -31.0, 0.0, 0.0}, { 1,-1, 0,-2, 1, 62.0, 0.0, 0.0, -34.0, 0.0, 0.0}, {-1,-1, 2, 0, 1, -63.0, 0.0, 0.0, 33.0, 0.0, 0.0}, /* 231-240 */ { 1,-1, 2,-2, 2, -73.0, 0.0, 0.0, 32.0, 0.0, 0.0}, {-2,-1, 0, 4, 0, 115.0, 0.0, 0.0, -2.0, 0.0, 0.0}, {-1, 0, 0, 3, 0, -103.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-2,-1, 2, 2, 2, 63.0, 0.0, 0.0, -28.0, 0.0, 0.0}, { 0, 2, 2, 0, 2, 74.0, 0.0, 0.0, -32.0, 0.0, 0.0}, { 1, 1, 0, 2, 0, -103.0, 0.0, -3.0, 3.0, 0.0, -1.0}, { 2, 0, 2,-1, 2, -69.0, 0.0, 0.0, 30.0, 0.0, 0.0}, { 1, 0, 2, 1, 1, 57.0, 0.0, 0.0, -29.0, 0.0, 0.0}, { 4, 0, 0, 0, 0, 94.0, 0.0, 0.0, -4.0, 0.0, 0.0}, { 2, 1, 2, 0, 1, 64.0, 0.0, 0.0, -33.0, 0.0, 0.0}, /* 241-250 */ { 3,-1, 2, 0, 2, -63.0, 0.0, 0.0, 26.0, 0.0, 0.0}, {-2, 2, 0, 2, 1, -38.0, 0.0, 0.0, 20.0, 0.0, 0.0}, { 1, 0, 2,-3, 1, -43.0, 0.0, 0.0, 24.0, 0.0, 0.0}, { 1, 1, 2,-4, 1, -45.0, 0.0, 0.0, 23.0, 0.0, 0.0}, {-1,-1, 2,-2, 1, 47.0, 0.0, 0.0, -24.0, 0.0, 0.0}, { 0,-1, 0,-1, 1, -48.0, 0.0, 0.0, 25.0, 0.0, 0.0}, { 0,-1, 0,-2, 1, 45.0, 0.0, 0.0, -26.0, 0.0, 0.0}, {-2, 0, 0, 0, 2, 56.0, 0.0, 0.0, -25.0, 0.0, 0.0}, {-2, 0,-2, 2, 0, 88.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-1, 0,-2, 4, 0, -75.0, 0.0, 0.0, 0.0, 0.0, 0.0}, /* 251-260 */ { 1,-2, 0, 0, 0, 85.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 1, 0, 1, 1, 49.0, 0.0, 0.0, -26.0, 0.0, 0.0}, {-1, 2, 0, 2, 0, -74.0, 0.0, -3.0, -1.0, 0.0, -1.0}, { 1,-1, 2,-2, 1, -39.0, 0.0, 0.0, 21.0, 0.0, 0.0}, { 1, 2, 2,-2, 2, 45.0, 0.0, 0.0, -20.0, 0.0, 0.0}, { 2,-1, 2,-2, 2, 51.0, 0.0, 0.0, -22.0, 0.0, 0.0}, { 1, 0, 2,-1, 1, -40.0, 0.0, 0.0, 21.0, 0.0, 0.0}, { 2, 1, 2,-2, 1, 41.0, 0.0, 0.0, -21.0, 0.0, 0.0}, {-2, 0, 0,-2, 1, -42.0, 0.0, 0.0, 24.0, 0.0, 0.0}, { 1,-2, 2, 0, 2, -51.0, 0.0, 0.0, 22.0, 0.0, 0.0}, /* 261-270 */ { 0, 1, 2, 1, 1, -42.0, 0.0, 0.0, 22.0, 0.0, 0.0}, { 1, 0, 4,-2, 1, 39.0, 0.0, 0.0, -21.0, 0.0, 0.0}, {-2, 0, 4, 2, 2, 46.0, 0.0, 0.0, -18.0, 0.0, 0.0}, { 1, 1, 2, 1, 2, -53.0, 0.0, 0.0, 22.0, 0.0, 0.0}, { 1, 0, 0, 4, 0, 82.0, 0.0, 0.0, -4.0, 0.0, 0.0}, { 1, 0, 2, 2, 0, 81.0, 0.0, -1.0, -4.0, 0.0, 0.0}, { 2, 0, 2, 1, 2, 47.0, 0.0, 0.0, -19.0, 0.0, 0.0}, { 3, 1, 2, 0, 2, 53.0, 0.0, 0.0, -23.0, 0.0, 0.0}, { 4, 0, 2, 0, 1, -45.0, 0.0, 0.0, 22.0, 0.0, 0.0}, {-2,-1, 2, 0, 0, -44.0, 0.0, 0.0, -2.0, 0.0, 0.0}, /* 271-280 */ { 0, 1,-2, 2, 1, -33.0, 0.0, 0.0, 16.0, 0.0, 0.0}, { 1, 0,-2, 1, 0, -61.0, 0.0, 0.0, 1.0, 0.0, 0.0}, { 0,-1,-2, 2, 1, 28.0, 0.0, 0.0, -15.0, 0.0, 0.0}, { 2,-1, 0,-2, 1, -38.0, 0.0, 0.0, 19.0, 0.0, 0.0}, {-1, 0, 2,-1, 2, -33.0, 0.0, 0.0, 21.0, 0.0, 0.0}, { 1, 0, 2,-3, 2, -60.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 1, 2,-2, 3, 48.0, 0.0, 0.0, -10.0, 0.0, 0.0}, { 0, 0, 2,-3, 1, 27.0, 0.0, 0.0, -14.0, 0.0, 0.0}, {-1, 0,-2, 2, 1, 38.0, 0.0, 0.0, -20.0, 0.0, 0.0}, { 0, 0, 2,-4, 2, 31.0, 0.0, 0.0, -13.0, 0.0, 0.0}, /* 281-290 */ {-2, 1, 0, 0, 1, -29.0, 0.0, 0.0, 15.0, 0.0, 0.0}, {-1, 0, 0,-1, 1, 28.0, 0.0, 0.0, -15.0, 0.0, 0.0}, { 2, 0, 2,-4, 2, -32.0, 0.0, 0.0, 15.0, 0.0, 0.0}, { 0, 0, 4,-4, 4, 45.0, 0.0, 0.0, -8.0, 0.0, 0.0}, { 0, 0, 4,-4, 2, -44.0, 0.0, 0.0, 19.0, 0.0, 0.0}, {-1,-2, 0, 2, 1, 28.0, 0.0, 0.0, -15.0, 0.0, 0.0}, {-2, 0, 0, 3, 0, -51.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1, 0,-2, 2, 1, -36.0, 0.0, 0.0, 20.0, 0.0, 0.0}, {-3, 0, 2, 2, 2, 44.0, 0.0, 0.0, -19.0, 0.0, 0.0}, {-3, 0, 2, 2, 1, 26.0, 0.0, 0.0, -14.0, 0.0, 0.0}, /* 291-300 */ {-2, 0, 2, 2, 0, -60.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 2,-1, 0, 0, 1, 35.0, 0.0, 0.0, -18.0, 0.0, 0.0}, {-2, 1, 2, 2, 2, -27.0, 0.0, 0.0, 11.0, 0.0, 0.0}, { 1, 1, 0, 1, 0, 47.0, 0.0, 0.0, -1.0, 0.0, 0.0}, { 0, 1, 4,-2, 2, 36.0, 0.0, 0.0, -15.0, 0.0, 0.0}, {-1, 1, 0,-2, 1, -36.0, 0.0, 0.0, 20.0, 0.0, 0.0}, { 0, 0, 0,-4, 1, -35.0, 0.0, 0.0, 19.0, 0.0, 0.0}, { 1,-1, 0, 2, 1, -37.0, 0.0, 0.0, 19.0, 0.0, 0.0}, { 1, 1, 0, 2, 1, 32.0, 0.0, 0.0, -16.0, 0.0, 0.0}, {-1, 2, 2, 2, 2, 35.0, 0.0, 0.0, -14.0, 0.0, 0.0}, /* 301-310 */ { 3, 1, 2,-2, 2, 32.0, 0.0, 0.0, -13.0, 0.0, 0.0}, { 0,-1, 0, 4, 0, 65.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 2,-1, 0, 2, 0, 47.0, 0.0, 0.0, -1.0, 0.0, 0.0}, { 0, 0, 4, 0, 1, 32.0, 0.0, 0.0, -16.0, 0.0, 0.0}, { 2, 0, 4,-2, 2, 37.0, 0.0, 0.0, -16.0, 0.0, 0.0}, {-1,-1, 2, 4, 1, -30.0, 0.0, 0.0, 15.0, 0.0, 0.0}, { 1, 0, 0, 4, 1, -32.0, 0.0, 0.0, 16.0, 0.0, 0.0}, { 1,-2, 2, 2, 2, -31.0, 0.0, 0.0, 13.0, 0.0, 0.0}, { 0, 0, 2, 3, 2, 37.0, 0.0, 0.0, -16.0, 0.0, 0.0}, {-1, 1, 2, 4, 2, 31.0, 0.0, 0.0, -13.0, 0.0, 0.0}, /* 311-320 */ { 3, 0, 0, 2, 0, 49.0, 0.0, 0.0, -2.0, 0.0, 0.0}, {-1, 0, 4, 2, 2, 32.0, 0.0, 0.0, -13.0, 0.0, 0.0}, { 1, 1, 2, 2, 1, 23.0, 0.0, 0.0, -12.0, 0.0, 0.0}, {-2, 0, 2, 6, 2, -43.0, 0.0, 0.0, 18.0, 0.0, 0.0}, { 2, 1, 2, 2, 2, 26.0, 0.0, 0.0, -11.0, 0.0, 0.0}, {-1, 0, 2, 6, 2, -32.0, 0.0, 0.0, 14.0, 0.0, 0.0}, { 1, 0, 2, 4, 1, -29.0, 0.0, 0.0, 14.0, 0.0, 0.0}, { 2, 0, 2, 4, 2, -27.0, 0.0, 0.0, 12.0, 0.0, 0.0}, { 1, 1,-2, 1, 0, 30.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-3, 1, 2, 1, 2, -11.0, 0.0, 0.0, 5.0, 0.0, 0.0}, /* 321-330 */ { 2, 0,-2, 0, 2, -21.0, 0.0, 0.0, 10.0, 0.0, 0.0}, {-1, 0, 0, 1, 2, -34.0, 0.0, 0.0, 15.0, 0.0, 0.0}, {-4, 0, 2, 2, 1, -10.0, 0.0, 0.0, 6.0, 0.0, 0.0}, {-1,-1, 0, 1, 0, -36.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 0,-2, 2, 2, -9.0, 0.0, 0.0, 4.0, 0.0, 0.0}, { 1, 0, 0,-1, 2, -12.0, 0.0, 0.0, 5.0, 0.0, 0.0}, { 0,-1, 2,-2, 3, -21.0, 0.0, 0.0, 5.0, 0.0, 0.0}, {-2, 1, 2, 0, 0, -29.0, 0.0, 0.0, -1.0, 0.0, 0.0}, { 0, 0, 2,-2, 4, -15.0, 0.0, 0.0, 3.0, 0.0, 0.0}, {-2,-2, 0, 2, 0, -20.0, 0.0, 0.0, 0.0, 0.0, 0.0}, /* 331-340 */ {-2, 0,-2, 4, 0, 28.0, 0.0, 0.0, 0.0, 0.0, -2.0}, { 0,-2,-2, 2, 0, 17.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1, 2, 0,-2, 1, -22.0, 0.0, 0.0, 12.0, 0.0, 0.0}, { 3, 0, 0,-4, 1, -14.0, 0.0, 0.0, 7.0, 0.0, 0.0}, {-1, 1, 2,-2, 2, 24.0, 0.0, 0.0, -11.0, 0.0, 0.0}, { 1,-1, 2,-4, 1, 11.0, 0.0, 0.0, -6.0, 0.0, 0.0}, { 1, 1, 0,-2, 2, 14.0, 0.0, 0.0, -6.0, 0.0, 0.0}, {-3, 0, 2, 0, 0, 24.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-3, 0, 2, 0, 2, 18.0, 0.0, 0.0, -8.0, 0.0, 0.0}, {-2, 0, 0, 1, 0, -38.0, 0.0, 0.0, 0.0, 0.0, 0.0}, /* 341-350 */ { 0, 0,-2, 1, 0, -31.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-3, 0, 0, 2, 1, -16.0, 0.0, 0.0, 8.0, 0.0, 0.0}, {-1,-1,-2, 2, 0, 29.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 1, 2,-4, 1, -18.0, 0.0, 0.0, 10.0, 0.0, 0.0}, { 2, 1, 0,-4, 1, -10.0, 0.0, 0.0, 5.0, 0.0, 0.0}, { 0, 2, 0,-2, 1, -17.0, 0.0, 0.0, 10.0, 0.0, 0.0}, { 1, 0, 0,-3, 1, 9.0, 0.0, 0.0, -4.0, 0.0, 0.0}, {-2, 0, 2,-2, 2, 16.0, 0.0, 0.0, -6.0, 0.0, 0.0}, {-2,-1, 0, 0, 1, 22.0, 0.0, 0.0, -12.0, 0.0, 0.0}, {-4, 0, 0, 2, 0, 20.0, 0.0, 0.0, 0.0, 0.0, 0.0}, /* 351-360 */ { 1, 1, 0,-4, 1, -13.0, 0.0, 0.0, 6.0, 0.0, 0.0}, {-1, 0, 2,-4, 1, -17.0, 0.0, 0.0, 9.0, 0.0, 0.0}, { 0, 0, 4,-4, 1, -14.0, 0.0, 0.0, 8.0, 0.0, 0.0}, { 0, 3, 2,-2, 2, 0.0, 0.0, 0.0, -7.0, 0.0, 0.0}, {-3,-1, 0, 4, 0, 14.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-3, 0, 0, 4, 1, 19.0, 0.0, 0.0, -10.0, 0.0, 0.0}, { 1,-1,-2, 2, 0, -34.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1,-1, 0, 2, 2, -20.0, 0.0, 0.0, 8.0, 0.0, 0.0}, { 1,-2, 0, 0, 1, 9.0, 0.0, 0.0, -5.0, 0.0, 0.0}, { 1,-1, 0, 0, 2, -18.0, 0.0, 0.0, 7.0, 0.0, 0.0}, /* 361-370 */ { 0, 0, 0, 1, 2, 13.0, 0.0, 0.0, -6.0, 0.0, 0.0}, {-1,-1, 2, 0, 0, 17.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1,-2, 2,-2, 2, -12.0, 0.0, 0.0, 5.0, 0.0, 0.0}, { 0,-1, 2,-1, 1, 15.0, 0.0, 0.0, -8.0, 0.0, 0.0}, {-1, 0, 2, 0, 3, -11.0, 0.0, 0.0, 3.0, 0.0, 0.0}, { 1, 1, 0, 0, 2, 13.0, 0.0, 0.0, -5.0, 0.0, 0.0}, {-1, 1, 2, 0, 0, -18.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1, 2, 0, 0, 0, -35.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1, 2, 2, 0, 2, 9.0, 0.0, 0.0, -4.0, 0.0, 0.0}, {-1, 0, 4,-2, 1, -19.0, 0.0, 0.0, 10.0, 0.0, 0.0}, /* 371-380 */ { 3, 0, 2,-4, 2, -26.0, 0.0, 0.0, 11.0, 0.0, 0.0}, { 1, 2, 2,-2, 1, 8.0, 0.0, 0.0, -4.0, 0.0, 0.0}, { 1, 0, 4,-4, 2, -10.0, 0.0, 0.0, 4.0, 0.0, 0.0}, {-2,-1, 0, 4, 1, 10.0, 0.0, 0.0, -6.0, 0.0, 0.0}, { 0,-1, 0, 2, 2, -21.0, 0.0, 0.0, 9.0, 0.0, 0.0}, {-2, 1, 0, 4, 0, -15.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-2,-1, 2, 2, 1, 9.0, 0.0, 0.0, -5.0, 0.0, 0.0}, { 2, 0,-2, 2, 0, -29.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1, 0, 0, 1, 1, -19.0, 0.0, 0.0, 10.0, 0.0, 0.0}, { 0, 1, 0, 2, 2, 12.0, 0.0, 0.0, -5.0, 0.0, 0.0}, /* 381-390 */ { 1,-1, 2,-1, 2, 22.0, 0.0, 0.0, -9.0, 0.0, 0.0}, {-2, 0, 4, 0, 1, -10.0, 0.0, 0.0, 5.0, 0.0, 0.0}, { 2, 1, 0, 0, 1, -20.0, 0.0, 0.0, 11.0, 0.0, 0.0}, { 0, 1, 2, 0, 0, -20.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0,-1, 4,-2, 2, -17.0, 0.0, 0.0, 7.0, 0.0, 0.0}, { 0, 0, 4,-2, 4, 15.0, 0.0, 0.0, -3.0, 0.0, 0.0}, { 0, 2, 2, 0, 1, 8.0, 0.0, 0.0, -4.0, 0.0, 0.0}, {-3, 0, 0, 6, 0, 14.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1,-1, 0, 4, 1, -12.0, 0.0, 0.0, 6.0, 0.0, 0.0}, { 1,-2, 0, 2, 0, 25.0, 0.0, 0.0, 0.0, 0.0, 0.0}, /* 391-400 */ {-1, 0, 0, 4, 2, -13.0, 0.0, 0.0, 6.0, 0.0, 0.0}, {-1,-2, 2, 2, 1, -14.0, 0.0, 0.0, 8.0, 0.0, 0.0}, {-1, 0, 0,-2, 2, 13.0, 0.0, 0.0, -5.0, 0.0, 0.0}, { 1, 0,-2,-2, 1, -17.0, 0.0, 0.0, 9.0, 0.0, 0.0}, { 0, 0,-2,-2, 1, -12.0, 0.0, 0.0, 6.0, 0.0, 0.0}, {-2, 0,-2, 0, 1, -10.0, 0.0, 0.0, 5.0, 0.0, 0.0}, { 0, 0, 0, 3, 1, 10.0, 0.0, 0.0, -6.0, 0.0, 0.0}, { 0, 0, 0, 3, 0, -15.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1, 1, 0, 4, 0, -22.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1,-1, 2, 2, 0, 28.0, 0.0, 0.0, -1.0, 0.0, 0.0}, /* 401-410 */ {-2, 0, 2, 3, 2, 15.0, 0.0, 0.0, -7.0, 0.0, 0.0}, { 1, 0, 0, 2, 2, 23.0, 0.0, 0.0, -10.0, 0.0, 0.0}, { 0,-1, 2, 1, 2, 12.0, 0.0, 0.0, -5.0, 0.0, 0.0}, { 3,-1, 0, 0, 0, 29.0, 0.0, 0.0, -1.0, 0.0, 0.0}, { 2, 0, 0, 1, 0, -25.0, 0.0, 0.0, 1.0, 0.0, 0.0}, { 1,-1, 2, 0, 0, 22.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 0, 2, 1, 0, -18.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1, 0, 2, 0, 3, 15.0, 0.0, 0.0, 3.0, 0.0, 0.0}, { 3, 1, 0, 0, 0, -23.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 3,-1, 2,-2, 2, 12.0, 0.0, 0.0, -5.0, 0.0, 0.0}, /* 411-420 */ { 2, 0, 2,-1, 1, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0}, { 1, 1, 2, 0, 0, -19.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 0, 4,-1, 2, -10.0, 0.0, 0.0, 4.0, 0.0, 0.0}, { 1, 2, 2, 0, 2, 21.0, 0.0, 0.0, -9.0, 0.0, 0.0}, {-2, 0, 0, 6, 0, 23.0, 0.0, 0.0, -1.0, 0.0, 0.0}, { 0,-1, 0, 4, 1, -16.0, 0.0, 0.0, 8.0, 0.0, 0.0}, {-2,-1, 2, 4, 1, -19.0, 0.0, 0.0, 9.0, 0.0, 0.0}, { 0,-2, 2, 2, 1, -22.0, 0.0, 0.0, 10.0, 0.0, 0.0}, { 0,-1, 2, 2, 0, 27.0, 0.0, 0.0, -1.0, 0.0, 0.0}, {-1, 0, 2, 3, 1, 16.0, 0.0, 0.0, -8.0, 0.0, 0.0}, /* 421-430 */ {-2, 1, 2, 4, 2, 19.0, 0.0, 0.0, -8.0, 0.0, 0.0}, { 2, 0, 0, 2, 2, 9.0, 0.0, 0.0, -4.0, 0.0, 0.0}, { 2,-2, 2, 0, 2, -9.0, 0.0, 0.0, 4.0, 0.0, 0.0}, {-1, 1, 2, 3, 2, -9.0, 0.0, 0.0, 4.0, 0.0, 0.0}, { 3, 0, 2,-1, 2, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0}, { 4, 0, 2,-2, 1, 18.0, 0.0, 0.0, -9.0, 0.0, 0.0}, {-1, 0, 0, 6, 0, 16.0, 0.0, 0.0, -1.0, 0.0, 0.0}, {-1,-2, 2, 4, 2, -10.0, 0.0, 0.0, 4.0, 0.0, 0.0}, {-3, 0, 2, 6, 2, -23.0, 0.0, 0.0, 9.0, 0.0, 0.0}, {-1, 0, 2, 4, 0, 16.0, 0.0, 0.0, -1.0, 0.0, 0.0}, /* 431-440 */ { 3, 0, 0, 2, 1, -12.0, 0.0, 0.0, 6.0, 0.0, 0.0}, { 3,-1, 2, 0, 1, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0}, { 3, 0, 2, 0, 0, 30.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 1, 0, 4, 0, 2, 24.0, 0.0, 0.0, -10.0, 0.0, 0.0}, { 5, 0, 2,-2, 2, 10.0, 0.0, 0.0, -4.0, 0.0, 0.0}, { 0,-1, 2, 4, 1, -16.0, 0.0, 0.0, 7.0, 0.0, 0.0}, { 2,-1, 2, 2, 1, -16.0, 0.0, 0.0, 7.0, 0.0, 0.0}, { 0, 1, 2, 4, 2, 17.0, 0.0, 0.0, -7.0, 0.0, 0.0}, { 1,-1, 2, 4, 2, -24.0, 0.0, 0.0, 10.0, 0.0, 0.0}, { 3,-1, 2, 2, 2, -12.0, 0.0, 0.0, 5.0, 0.0, 0.0}, /* 441-450 */ { 3, 0, 2, 2, 1, -24.0, 0.0, 0.0, 11.0, 0.0, 0.0}, { 5, 0, 2, 0, 2, -23.0, 0.0, 0.0, 9.0, 0.0, 0.0}, { 0, 0, 2, 6, 2, -13.0, 0.0, 0.0, 5.0, 0.0, 0.0}, { 4, 0, 2, 2, 2, -15.0, 0.0, 0.0, 7.0, 0.0, 0.0}, { 0,-1, 1,-1, 1, 0.0, 0.0,-1988.0, 0.0, 0.0,-1679.0}, {-1, 0, 1, 0, 3, 0.0, 0.0, -63.0, 0.0, 0.0, -27.0}, { 0,-2, 2,-2, 3, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1, 0,-1, 0, 1, 0.0, 0.0, 5.0, 0.0, 0.0, 4.0}, { 2,-2, 0,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, {-1, 0, 1, 0, 2, 0.0, 0.0, 364.0, 0.0, 0.0, 176.0}, /* 451-460 */ {-1, 0, 1, 0, 1, 0.0, 0.0,-1044.0, 0.0, 0.0, -891.0}, {-1,-1, 2,-1, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, {-2, 2, 0, 2, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, {-1, 0, 1, 0, 0, 0.0, 0.0, 330.0, 0.0, 0.0, 0.0}, {-4, 1, 2, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, {-3, 0, 2, 1, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, {-2,-1, 2, 0, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, { 1, 0,-2, 1, 1, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 2,-1,-2, 0, 1, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, {-4, 0, 2, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, /* 461-470 */ {-3, 1, 0, 3, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1, 0,-1, 2, 0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0}, { 0,-2, 0, 0, 2, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0}, { 0,-2, 0, 0, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, {-3, 0, 0, 3, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-2,-1, 0, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, {-1, 0,-2, 3, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-4, 0, 0, 4, 0, -12.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 2, 1,-2, 0, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, { 2,-1, 0,-2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, /* 471-480 */ { 0, 0, 1,-1, 0, -5.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1, 2, 0, 1, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-2, 1, 2, 0, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0}, { 1, 1, 0,-1, 1, 7.0, 0.0, 0.0, -4.0, 0.0, 0.0}, { 1, 0, 1,-2, 1, 0.0, 0.0, -12.0, 0.0, 0.0, -10.0}, { 0, 2, 0, 0, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 1,-1, 2,-3, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, {-1, 1, 2,-1, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-2, 0, 4,-2, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0}, {-2, 0, 4,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, /* 481-490 */ {-2,-2, 0, 2, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, {-2, 0,-2, 4, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1, 2, 2,-4, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, { 1, 1, 2,-4, 2, 7.0, 0.0, 0.0, -3.0, 0.0, 0.0}, {-1, 2, 2,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 2, 0, 0,-3, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, {-1, 2, 0, 0, 1, -5.0, 0.0, 0.0, 3.0, 0.0, 0.0}, { 0, 0, 0,-2, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1,-1, 2,-2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-1, 1, 0, 0, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, /* 491-500 */ { 0, 0, 0,-1, 2, -8.0, 0.0, 0.0, 3.0, 0.0, 0.0}, {-2, 1, 0, 1, 0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1,-2, 0,-2, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, { 1, 0,-2, 0, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-3, 1, 0, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1, 1,-2, 2, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1,-1, 0, 0, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, {-3, 0, 0, 2, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-3,-1, 0, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 2, 0, 2,-6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, /* 501-510 */ { 0, 1, 2,-4, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 2, 0, 0,-4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, {-2, 1, 2,-2, 1, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 0,-1, 2,-4, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 0, 1, 0,-2, 2, 9.0, 0.0, 0.0, -3.0, 0.0, 0.0}, {-1, 0, 0,-2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 2, 0,-2,-2, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, {-4, 0, 2, 0, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-1,-1, 0,-1, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 0, 0,-2, 0, 2, 9.0, 0.0, 0.0, -3.0, 0.0, 0.0}, /* 511-520 */ {-3, 0, 0, 1, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1, 0,-2, 1, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-2, 0,-2, 2, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 0, 0,-4, 2, 0, 8.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-2,-1,-2, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1, 0, 2,-6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-1, 0, 2,-4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, { 1, 0, 0,-4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, { 2, 1, 2,-4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, { 2, 1, 2,-4, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, /* 521-530 */ { 0, 1, 4,-4, 4, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 1, 4,-4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, {-1,-1,-2, 4, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1,-3, 0, 2, 0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1, 0,-2, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-2,-1, 0, 3, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 0,-2, 3, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-2, 0, 0, 3, 1, -5.0, 0.0, 0.0, 3.0, 0.0, 0.0}, { 0,-1, 0, 1, 0, -13.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-3, 0, 2, 2, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, /* 531-540 */ { 1, 1,-2, 2, 0, 10.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1, 1, 0, 2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, { 1,-2, 2,-2, 1, 10.0, 0.0, 13.0, 6.0, 0.0, -5.0}, { 0, 0, 1, 0, 2, 0.0, 0.0, 30.0, 0.0, 0.0, 14.0}, { 0, 0, 1, 0, 1, 0.0, 0.0, -162.0, 0.0, 0.0, -138.0}, { 0, 0, 1, 0, 0, 0.0, 0.0, 75.0, 0.0, 0.0, 0.0}, {-1, 2, 0, 2, 1, -7.0, 0.0, 0.0, 4.0, 0.0, 0.0}, { 0, 0, 2, 0, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-2, 0, 2, 0, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 2, 0, 0,-1, 1, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, /* 541-550 */ { 3, 0, 0,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, { 1, 0, 2,-2, 3, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1, 2, 0, 0, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 2, 0, 2,-3, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-1, 1, 4,-2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-2,-2, 0, 4, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0,-3, 0, 2, 0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 0,-2, 4, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1,-1, 0, 3, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-2, 0, 0, 4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, /* 551-560 */ {-1, 0, 0, 3, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 2,-2, 0, 0, 0, 7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1,-1, 0, 1, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1, 0, 0, 2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0,-2, 2, 0, 1, -6.0, 0.0, -3.0, 3.0, 0.0, 1.0}, {-1, 0, 1, 2, 1, 0.0, 0.0, -3.0, 0.0, 0.0, -2.0}, {-1, 1, 0, 3, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1,-1, 2, 1, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, { 0,-1, 2, 0, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-2, 1, 2, 2, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, /* 561-570 */ { 2,-2, 2,-2, 2, -1.0, 0.0, 3.0, 3.0, 0.0, -1.0}, { 1, 1, 0, 1, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 1, 0, 1, 0, 1, 0.0, 0.0, -13.0, 0.0, 0.0, -11.0}, { 1, 0, 1, 0, 0, 3.0, 0.0, 6.0, 0.0, 0.0, 0.0}, { 0, 2, 0, 2, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 2,-1, 2,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, { 0,-1, 4,-2, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, { 0, 0, 4,-2, 3, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 1, 4,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, { 4, 0, 2,-4, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0}, /* 571-580 */ { 2, 2, 2,-2, 2, 8.0, 0.0, 0.0, -3.0, 0.0, 0.0}, { 2, 0, 4,-4, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-1,-2, 0, 4, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1,-3, 2, 2, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, {-3, 0, 2, 4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, {-3, 0, 2,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-1,-1, 0,-2, 1, 8.0, 0.0, 0.0, -4.0, 0.0, 0.0}, {-3, 0, 0, 0, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, {-3, 0,-2, 2, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 1, 0,-4, 1, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0}, /* 581-590 */ {-2, 1, 0,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-4, 0, 0, 0, 1, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0}, {-1, 0, 0,-4, 1, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0}, {-3, 0, 0,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 0, 0, 0, 3, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, {-1, 1, 0, 4, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, { 1,-2, 2, 0, 1, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0}, { 0, 1, 0, 3, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-1, 0, 2, 2, 3, 6.0, 0.0, 0.0, -1.0, 0.0, 0.0}, { 0, 0, 2, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, /* 591-600 */ {-2, 0, 2, 2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-1, 1, 2, 2, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 3, 0, 0, 0, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 2, 1, 0, 1, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 2,-1, 2,-1, 2, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, { 0, 0, 2, 0, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 0, 0, 3, 0, 3, 0.0, 0.0, -26.0, 0.0, 0.0, -11.0}, { 0, 0, 3, 0, 2, 0.0, 0.0, -10.0, 0.0, 0.0, -5.0}, {-1, 2, 2, 2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, {-1, 0, 4, 0, 0, -13.0, 0.0, 0.0, 0.0, 0.0, 0.0}, /* 601-610 */ { 1, 2, 2, 0, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 3, 1, 2,-2, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 1, 1, 4,-2, 2, 7.0, 0.0, 0.0, -3.0, 0.0, 0.0}, {-2,-1, 0, 6, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0,-2, 0, 4, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-2, 0, 0, 6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-2,-2, 2, 4, 2, -6.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 0,-3, 2, 2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 0, 0, 0, 4, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0}, {-1,-1, 2, 3, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, /* 611-620 */ {-2, 0, 2, 4, 0, 13.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 2,-1, 0, 2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 1, 0, 0, 3, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 1, 0, 4, 1, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 0, 1, 0, 4, 0, -11.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1,-1, 2, 1, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 0, 0, 2, 2, 3, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1, 0, 2, 2, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, {-1, 0, 2, 2, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-2, 0, 4, 2, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, /* 621-630 */ { 2, 1, 0, 2, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 2, 1, 0, 2, 0, -12.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 2,-1, 2, 0, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1, 0, 2, 1, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 1, 2, 2, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 2, 0, 2, 0, 3, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 3, 0, 2, 0, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, { 1, 0, 2, 0, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, { 1, 0, 3, 0, 3, 0.0, 0.0, -5.0, 0.0, 0.0, -2.0}, { 1, 1, 2, 1, 1, -7.0, 0.0, 0.0, 4.0, 0.0, 0.0}, /* 631-640 */ { 0, 2, 2, 2, 2, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, { 2, 1, 2, 0, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 2, 0, 4,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, { 4, 1, 2,-2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, {-1,-1, 0, 6, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {-3,-1, 2, 6, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, {-1, 0, 0, 6, 1, -5.0, 0.0, 0.0, 3.0, 0.0, 0.0}, {-3, 0, 2, 6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 1,-1, 0, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 1,-1, 0, 4, 0, 12.0, 0.0, 0.0, 0.0, 0.0, 0.0}, /* 641-650 */ {-2, 0, 2, 5, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, { 1,-2, 2, 2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 3,-1, 0, 2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1,-1, 2, 2, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 0, 2, 3, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0}, {-1, 1, 2, 4, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 0, 1, 2, 3, 2, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0}, {-1, 0, 4, 2, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 2, 0, 2, 1, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0}, { 5, 0, 0, 0, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0}, /* 651-660 */ { 2, 1, 2, 1, 2, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0}, { 1, 0, 4, 0, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 3, 1, 2, 0, 1, 7.0, 0.0, 0.0, -4.0, 0.0, 0.0}, { 3, 0, 4,-2, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, {-2,-1, 2, 6, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 0, 0, 0, 6, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0,-2, 2, 4, 2, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0}, {-2, 0, 2, 6, 1, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0}, { 2, 0, 0, 4, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 2, 0, 0, 4, 0, 10.0, 0.0, 0.0, 0.0, 0.0, 0.0}, /* 661-670 */ { 2,-2, 2, 2, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 0, 0, 2, 4, 0, 7.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 1, 0, 2, 3, 2, 7.0, 0.0, 0.0, -3.0, 0.0, 0.0}, { 4, 0, 0, 2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 2, 0, 2, 2, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0}, { 0, 0, 4, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 4,-1, 2, 0, 2, -6.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 3, 0, 2, 1, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 2, 1, 2, 2, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 4, 1, 2, 0, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0}, /* 671-678 */ {-1,-1, 2, 6, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, {-1, 0, 2, 6, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 1,-1, 2, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 1, 1, 2, 4, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 3, 1, 2, 2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0}, { 5, 0, 2, 0, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, { 2,-1, 2, 4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0}, { 2, 0, 2, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0} }; /* Number of terms in the luni-solar nutation model */ const int NLS = (int) (sizeof xls / sizeof xls[0]); /* ------------------------ */ /* Planetary nutation model */ /* ------------------------ */ /* The units for the sine and cosine coefficients are */ /* 0.1 microarcsecond */ static const struct { int nl, /* coefficients of l, F, D and Omega */ nf, nd, nom, nme, /* coefficients of planetary longitudes */ nve, nea, nma, nju, nsa, nur, nne, npa; /* coefficient of general precession */ int sp,cp; /* longitude sin, cos coefficients */ int se,ce; /* obliquity sin, cos coefficients */ } xpl[] = { /* 1-10 */ { 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 0, 1440, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, -8, 16,-4,-5, 0, 0, 2, 56,-117, -42, -40}, { 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 2, 125, -43, 0, -54}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,-1, 2, 2, 0, 5, 0, 0}, { 0, 0, 0, 0, 0, 0, -4, 8,-1,-5, 0, 0, 2, 3, -7, -3, 0}, { 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 1, 3, 0, 0, -2}, { 0, 1,-1, 1, 0, 0, 3, -8, 3, 0, 0, 0, 0, -114, 0, 0, 61}, {-1, 0, 0, 0, 0, 10, -3, 0, 0, 0, 0, 0, 0, -219, 89, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0,-2, 6,-3, 0, 2, -3, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, -462,1604, 0, 0}, /* 11-20 */ { 0, 1,-1, 1, 0, 0, -5, 8,-3, 0, 0, 0, 0, 99, 0, 0, -53}, { 0, 0, 0, 0, 0, 0, -4, 8,-3, 0, 0, 0, 1, -3, 0, 0, 2}, { 0, 0, 0, 0, 0, 0, 4, -8, 1, 5, 0, 0, 2, 0, 6, 2, 0}, { 0, 0, 0, 0, 0, -5, 6, 4, 0, 0, 0, 0, 2, 3, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 2,-5, 0, 0, 2, -12, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 2,-5, 0, 0, 1, 14,-218, 117, 8}, { 0, 1,-1, 1, 0, 0, -1, 0, 2,-5, 0, 0, 0, 31,-481, -257, -17}, { 0, 0, 0, 0, 0, 0, 0, 0, 2,-5, 0, 0, 0, -491, 128, 0, 0}, { 0, 1,-1, 1, 0, 0, -1, 0,-2, 5, 0, 0, 0,-3084,5123, 2735,1647}, { 0, 0, 0, 0, 0, 0, 0, 0,-2, 5, 0, 0, 1,-1444,2409,-1286,-771}, /* 21-30 */ { 0, 0, 0, 0, 0, 0, 0, 0,-2, 5, 0, 0, 2, 11, -24, -11, -9}, { 2,-1,-1, 0, 0, 0, 3, -7, 0, 0, 0, 0, 0, 26, -9, 0, 0}, { 1, 0,-2, 0, 0, 19,-21, 3, 0, 0, 0, 0, 0, 103, -60, 0, 0}, { 0, 1,-1, 1, 0, 2, -4, 0,-3, 0, 0, 0, 0, 0, -13, -7, 0}, { 1, 0,-1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0, -26, -29, -16, 14}, { 0, 1,-1, 1, 0, 0, -1, 0,-4,10, 0, 0, 0, 9, -27, -14, -5}, {-2, 0, 2, 1, 0, 0, 2, 0, 0,-5, 0, 0, 0, 12, 0, 0, -6}, { 0, 0, 0, 0, 0, 3, -7, 4, 0, 0, 0, 0, 0, -7, 0, 0, 0}, { 0,-1, 1, 0, 0, 0, 1, 0, 1,-1, 0, 0, 0, 0, 24, 0, 0}, {-2, 0, 2, 1, 0, 0, 2, 0,-2, 0, 0, 0, 0, 284, 0, 0,-151}, /* 31-40 */ {-1, 0, 0, 0, 0, 18,-16, 0, 0, 0, 0, 0, 0, 226, 101, 0, 0}, {-2, 1, 1, 2, 0, 0, 1, 0,-2, 0, 0, 0, 0, 0, -8, -2, 0}, {-1, 1,-1, 1, 0, 18,-17, 0, 0, 0, 0, 0, 0, 0, -6, -3, 0}, {-1, 0, 1, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0, 5, 0, 0, -3}, { 0, 0, 0, 0, 0, -8, 13, 0, 0, 0, 0, 0, 2, -41, 175, 76, 17}, { 0, 2,-2, 2, 0, -8, 11, 0, 0, 0, 0, 0, 0, 0, 15, 6, 0}, { 0, 0, 0, 0, 0, -8, 13, 0, 0, 0, 0, 0, 1, 425, 212, -133, 269}, { 0, 1,-1, 1, 0, -8, 12, 0, 0, 0, 0, 0, 0, 1200, 598, 319,-641}, { 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 0, 235, 334, 0, 0}, { 0, 1,-1, 1, 0, 8,-14, 0, 0, 0, 0, 0, 0, 11, -12, -7, -6}, /* 41-50 */ { 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 1, 5, -6, 3, 3}, {-2, 0, 2, 1, 0, 0, 2, 0,-4, 5, 0, 0, 0, -5, 0, 0, 3}, {-2, 0, 2, 2, 0, 3, -3, 0, 0, 0, 0, 0, 0, 6, 0, 0, -3}, {-2, 0, 2, 0, 0, 0, 2, 0,-3, 1, 0, 0, 0, 15, 0, 0, 0}, { 0, 0, 0, 1, 0, 3, -5, 0, 2, 0, 0, 0, 0, 13, 0, 0, -7}, {-2, 0, 2, 0, 0, 0, 2, 0,-4, 3, 0, 0, 0, -6, -9, 0, 0}, { 0,-1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 266, -78, 0, 0}, { 0, 0, 0, 1, 0, 0, -1, 2, 0, 0, 0, 0, 0, -460,-435, -232, 246}, { 0, 1,-1, 2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0, 15, 7, 0}, {-1, 1, 0, 1, 0, 3, -5, 0, 0, 0, 0, 0, 0, -3, 0, 0, 2}, /* 51-60 */ {-1, 0, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, 131, 0, 0}, {-2, 0, 2, 0, 0, 0, 2, 0,-2,-2, 0, 0, 0, 4, 0, 0, 0}, {-2, 2, 0, 2, 0, 0, -5, 9, 0, 0, 0, 0, 0, 0, 3, 0, 0}, { 0, 1,-1, 1, 0, 0, -1, 0, 0, 0,-1, 0, 0, 0, 4, 2, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0}, { 0, 1,-1, 1, 0, 0, -1, 0, 0, 0, 0, 2, 0, -17, -19, -10, 9}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, -9, -11, 6, -5}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, -6, 0, 0, 3}, {-1, 0, 1, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -16, 8, 0, 0}, { 0,-1, 1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0}, /* 61-70 */ { 0, 1,-1, 2, 0, 0, -1, 0, 0, 2, 0, 0, 0, 11, 24, 11, -5}, { 0, 0, 0, 1, 0, 0, -9, 17, 0, 0, 0, 0, 0, -3, -4, -2, 1}, { 0, 0, 0, 2, 0, -3, 5, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, { 0, 1,-1, 1, 0, 0, -1, 0,-1, 2, 0, 0, 0, 0, -8, -4, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 1,-2, 0, 0, 0, 0, 3, 0, 0}, { 1, 0,-2, 0, 0, 17,-16, 0,-2, 0, 0, 0, 0, 0, 5, 0, 0}, { 0, 1,-1, 1, 0, 0, -1, 0, 1,-3, 0, 0, 0, 0, 3, 2, 0}, {-2, 0, 2, 1, 0, 0, 5, -6, 0, 0, 0, 0, 0, -6, 4, 2, 3}, { 0,-2, 2, 0, 0, 0, 9,-13, 0, 0, 0, 0, 0, -3, -5, 0, 0}, { 0, 1,-1, 2, 0, 0, -1, 0, 0, 1, 0, 0, 0, -5, 0, 0, 2}, /* 71-80 */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 24, 13, -2}, { 0,-1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, -42, 20, 0, 0}, { 0,-2, 2, 0, 0, 5, -6, 0, 0, 0, 0, 0, 0, -10, 233, 0, 0}, { 0,-1, 1, 1, 0, 5, -7, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1}, {-2, 0, 2, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0, 78, -18, 0, 0}, { 2, 1,-3, 1, 0, -6, 7, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0}, { 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -3, -1, 0}, { 0,-1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, -4, -2, 1}, { 0, 1,-1, 1, 0, 0, -1, 0, 0, 0, 2, 0, 0, 0, -8, -4, -1}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, -5, 3, 0}, /* 81-90 */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, -7, 0, 0, 3}, { 0, 0, 0, 0, 0, 0, -8, 15, 0, 0, 0, 0, 2, -14, 8, 3, 6}, { 0, 0, 0, 0, 0, 0, -8, 15, 0, 0, 0, 0, 1, 0, 8, -4, 0}, { 0, 1,-1, 1, 0, 0, -9, 15, 0, 0, 0, 0, 0, 0, 19, 10, 0}, { 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0, 45, -22, 0, 0}, { 1,-1,-1, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0, -3, 0, 0, 0}, { 2, 0,-2, 0, 0, 2, -5, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0}, {-2, 0, 2, 0, 0, 0, 2, 0,-5, 5, 0, 0, 0, 0, 3, 0, 0}, { 2, 0,-2, 1, 0, 0, -6, 8, 0, 0, 0, 0, 0, 3, 5, 3, -2}, { 2, 0,-2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0, 89, -16, -9, -48}, /* 91-100 */ {-2, 1, 1, 0, 0, 0, 1, 0,-3, 0, 0, 0, 0, 0, 3, 0, 0}, {-2, 1, 1, 1, 0, 0, 1, 0,-3, 0, 0, 0, 0, -3, 7, 4, 2}, {-2, 0, 2, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, -349, -62, 0, 0}, {-2, 0, 2, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, -15, 22, 0, 0}, {-2, 0, 2, 0, 0, 0, 2, 0,-1,-5, 0, 0, 0, -3, 0, 0, 0}, {-1, 0, 1, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, -53, 0, 0, 0}, {-1, 1, 1, 1, 0,-20, 20, 0, 0, 0, 0, 0, 0, 5, 0, 0, -3}, { 1, 0,-2, 0, 0, 20,-21, 0, 0, 0, 0, 0, 0, 0, -8, 0, 0}, { 0, 0, 0, 1, 0, 0, 8,-15, 0, 0, 0, 0, 0, 15, -7, -4, -8}, { 0, 2,-2, 1, 0, 0,-10, 15, 0, 0, 0, 0, 0, -3, 0, 0, 1}, /* 101-110 */ { 0,-1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, -21, -78, 0, 0}, { 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 20, -70, -37, -11}, { 0, 1,-1, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, 6, 3, 0}, { 0, 1,-1, 1, 0, 0, -1, 0,-2, 4, 0, 0, 0, 5, 3, 2, -2}, { 2, 0,-2, 1, 0, -6, 8, 0, 0, 0, 0, 0, 0, -17, -4, -2, 9}, { 0,-2, 2, 1, 0, 5, -6, 0, 0, 0, 0, 0, 0, 0, 6, 3, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 0,-1, 0, 0, 1, 32, 15, -8, 17}, { 0, 1,-1, 1, 0, 0, -1, 0, 0,-1, 0, 0, 0, 174, 84, 45, -93}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 11, 56, 0, 0}, { 0, 1,-1, 1, 0, 0, -1, 0, 0, 1, 0, 0, 0, -66, -12, -6, 35}, /* 111-120 */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 47, 8, 4, -25}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 8, 4, 0}, { 0, 2,-2, 1, 0, 0, -9, 13, 0, 0, 0, 0, 0, 10, -22, -12, -5}, { 0, 0, 0, 1, 0, 0, 7,-13, 0, 0, 0, 0, 0, -3, 0, 0, 2}, {-2, 0, 2, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, -24, 12, 0, 0}, { 0, 0, 0, 0, 0, 0, 9,-17, 0, 0, 0, 0, 0, 5, -6, 0, 0}, { 0, 0, 0, 0, 0, 0, -9, 17, 0, 0, 0, 0, 2, 3, 0, 0, -2}, { 1, 0,-1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 4, 3, 1, -2}, { 1, 0,-1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0, 0, 29, 15, 0}, { 0, 0, 0, 2, 0, 0, -1, 2, 0, 0, 0, 0, 0, -5, -4, -2, 2}, /* 121-130 */ { 0,-1, 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 8, -3, -1, -5}, { 0,-2, 2, 0, 1, 0, -2, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0}, { 0, 0, 0, 0, 0, 3, -5, 0, 2, 0, 0, 0, 0, 10, 0, 0, 0}, {-2, 0, 2, 1, 0, 0, 2, 0,-3, 1, 0, 0, 0, 3, 0, 0, -2}, {-2, 0, 2, 1, 0, 3, -3, 0, 0, 0, 0, 0, 0, -5, 0, 0, 3}, { 0, 0, 0, 1, 0, 8,-13, 0, 0, 0, 0, 0, 0, 46, 66, 35, -25}, { 0,-1, 1, 0, 0, 8,-12, 0, 0, 0, 0, 0, 0, -14, 7, 0, 0}, { 0, 2,-2, 1, 0, -8, 11, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0}, {-1, 0, 1, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, -5, 0, 0, 0}, {-1, 0, 0, 1, 0, 18,-16, 0, 0, 0, 0, 0, 0, -68, -34, -18, 36}, /* 131-140 */ { 0, 1,-1, 1, 0, 0, -1, 0,-1, 1, 0, 0, 0, 0, 14, 7, 0}, { 0, 0, 0, 1, 0, 3, -7, 4, 0, 0, 0, 0, 0, 10, -6, -3, -5}, {-2, 1, 1, 1, 0, 0, -3, 7, 0, 0, 0, 0, 0, -5, -4, -2, 3}, { 0, 1,-1, 2, 0, 0, -1, 0,-2, 5, 0, 0, 0, -3, 5, 2, 1}, { 0, 0, 0, 1, 0, 0, 0, 0,-2, 5, 0, 0, 0, 76, 17, 9, -41}, { 0, 0, 0, 1, 0, 0, -4, 8,-3, 0, 0, 0, 0, 84, 298, 159, -45}, { 1, 0, 0, 1, 0,-10, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, { 0, 2,-2, 1, 0, 0, -2, 0, 0, 0, 0, 0, 0, -3, 0, 0, 2}, {-1, 0, 0, 1, 0, 10, -3, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1}, { 0, 0, 0, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0, -82, 292, 156, 44}, /* 141-150 */ { 0, 0, 0, 1, 0, 0, 0, 0, 2,-5, 0, 0, 0, -73, 17, 9, 39}, { 0,-1, 1, 0, 0, 0, 1, 0, 2,-5, 0, 0, 0, -9, -16, 0, 0}, { 2,-1,-1, 1, 0, 0, 3, -7, 0, 0, 0, 0, 0, 3, 0, -1, -2}, {-2, 0, 2, 0, 0, 0, 2, 0, 0,-5, 0, 0, 0, -3, 0, 0, 0}, { 0, 0, 0, 1, 0, -3, 7, -4, 0, 0, 0, 0, 0, -9, -5, -3, 5}, {-2, 0, 2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, -439, 0, 0, 0}, { 1, 0, 0, 1, 0,-18, 16, 0, 0, 0, 0, 0, 0, 57, -28, -15, -30}, {-2, 1, 1, 1, 0, 0, 1, 0,-2, 0, 0, 0, 0, 0, -6, -3, 0}, { 0, 1,-1, 2, 0, -8, 12, 0, 0, 0, 0, 0, 0, -4, 0, 0, 2}, { 0, 0, 0, 1, 0, -8, 13, 0, 0, 0, 0, 0, 0, -40, 57, 30, 21}, /* 151-160 */ { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 1, 23, 7, 3, -13}, { 0, 1,-1, 1, 0, 0, 0, -2, 0, 0, 0, 0, 0, 273, 80, 43,-146}, { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, -449, 430, 0, 0}, { 0, 1,-1, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0, -8, -47, -25, 4}, { 0, 0, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 1, 6, 47, 25, -3}, {-1, 0, 1, 1, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, 23, 13, 0}, {-1, 0, 1, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, -3, 0, 0, 2}, { 0, 1,-1, 1, 0, 0, -1, 0, 0,-2, 0, 0, 0, 3, -4, -2, -2}, { 0, 1,-1, 1, 0, 0, -1, 0, 0, 2, 0, 0, 0, -48,-110, -59, 26}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 51, 114, 61, -27}, /* 161-170 */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, -133, 0, 0, 57}, { 0, 1,-1, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0}, { 0, 0, 0, 1, 0, -3, 5, 0, 0, 0, 0, 0, 0, -21, -6, -3, 11}, { 0, 1,-1, 2, 0, -3, 4, 0, 0, 0, 0, 0, 0, 0, -3, -1, 0}, { 0, 0, 0, 1, 0, 0, -2, 4, 0, 0, 0, 0, 0, -11, -21, -11, 6}, { 0, 2,-2, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0, -18,-436, -233, 9}, { 0,-1, 1, 0, 0, 5, -7, 0, 0, 0, 0, 0, 0, 35, -7, 0, 0}, { 0, 0, 0, 1, 0, 5, -8, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0}, {-2, 0, 2, 1, 0, 6, -8, 0, 0, 0, 0, 0, 0, 11, -3, -1, -6}, { 0, 0, 0, 1, 0, 0, -8, 15, 0, 0, 0, 0, 0, -5, -3, -1, 3}, /* 171-180 */ {-2, 0, 2, 1, 0, 0, 2, 0,-3, 0, 0, 0, 0, -53, -9, -5, 28}, {-2, 0, 2, 1, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0, 3, 2, 1}, { 1, 0,-1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 4, 0, 0, -2}, { 0, 0, 0, 0, 0, 0, 0, 0, 3,-5, 0, 0, 0, 0, -4, 0, 0}, { 0, 1,-1, 1, 0, 0, -1, 0,-1, 0, 0, 0, 0, -50, 194, 103, 27}, { 0, 0, 0, 0, 0, 0, 0, 0,-1, 0, 0, 0, 1, -13, 52, 28, 7}, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, -91, 248, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 6, 49, 26, -3}, { 0, 1,-1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, -6, -47, -25, 3}, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 3, 0}, /* 181-190 */ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 52, 23, 10, -23}, { 0, 1,-1, 2, 0, 0, -1, 0, 0,-1, 0, 0, 0, -3, 0, 0, 1}, { 0, 0, 0, 1, 0, 0, 0, 0, 0,-1, 0, 0, 0, 0, 5, 3, 0}, { 0,-1, 1, 0, 0, 0, 1, 0, 0,-1, 0, 0, 0, -4, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, -7, 13, 0, 0, 0, 0, 2, -4, 8, 3, 2}, { 0, 0, 0, 0, 0, 0, 7,-13, 0, 0, 0, 0, 0, 10, 0, 0, 0}, { 2, 0,-2, 1, 0, 0, -5, 6, 0, 0, 0, 0, 0, 3, 0, 0, -2}, { 0, 2,-2, 1, 0, 0, -8, 11, 0, 0, 0, 0, 0, 0, 8, 4, 0}, { 0, 2,-2, 1,-1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 8, 4, 1}, {-2, 0, 2, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, -4, 0, 0, 0}, /* 191-200 */ { 0, 0, 0, 0, 0, 0, 0, 0, 2,-2, 0, 0, 0, -4, 0, 0, 0}, { 0, 1,-1, 1, 0, 0, -1, 0, 0, 3, 0, 0, 0, -8, 4, 2, 4}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1, 8, -4, -2, -4}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 2, 0, 15, 7, 0}, {-2, 0, 2, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, -138, 0, 0, 0}, { 0, 0, 0, 2, 0, 0, -4, 8,-3, 0, 0, 0, 0, 0, -7, -3, 0}, { 0, 0, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -7, -3, 0}, { 2, 0,-2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0, 54, 0, 0, -29}, { 0, 1,-1, 2, 0, 0, -1, 0, 2, 0, 0, 0, 0, 0, 10, 4, 0}, { 0, 1,-1, 2, 0, 0, 0, -2, 0, 0, 0, 0, 0, -7, 0, 0, 3}, /* 201-210 */ { 0, 0, 0, 1, 0, 0, 1, -2, 0, 0, 0, 0, 0, -37, 35, 19, 20}, { 0,-1, 1, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 4, 0, 0}, { 0,-1, 1, 0, 0, 0, 1, 0, 0,-2, 0, 0, 0, -4, 9, 0, 0}, { 0, 2,-2, 1, 0, 0, -2, 0, 0, 2, 0, 0, 0, 8, 0, 0, -4}, { 0, 1,-1, 1, 0, 3, -6, 0, 0, 0, 0, 0, 0, -9, -14, -8, 5}, { 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 1, -3, -9, -5, 3}, { 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 0, -145, 47, 0, 0}, { 0, 1,-1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0, -10, 40, 21, 5}, { 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 1, 11, -49, -26, -7}, { 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 2,-2150, 0, 0, 932}, /* 211-220 */ { 0, 2,-2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0, -12, 0, 0, 5}, { 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 2, 85, 0, 0, -37}, { 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 1, 4, 0, 0, -2}, { 0, 1,-1, 1, 0, 0, 1, -4, 0, 0, 0, 0, 0, 3, 0, 0, -2}, { 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, -86, 153, 0, 0}, { 0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 1, -6, 9, 5, 3}, { 0, 1,-1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 9, -13, -7, -5}, { 0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 1, -8, 12, 6, 4}, { 0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 2, -51, 0, 0, 22}, { 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 2, -11,-268, -116, 5}, /* 221-230 */ { 0, 2,-2, 2, 0, -5, 6, 0, 0, 0, 0, 0, 0, 0, 12, 5, 0}, { 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 2, 0, 7, 3, 0}, { 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 1, 31, 6, 3, -17}, { 0, 1,-1, 1, 0, -5, 7, 0, 0, 0, 0, 0, 0, 140, 27, 14, -75}, { 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 1, 57, 11, 6, -30}, { 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, 0, -14, -39, 0, 0}, { 0, 1,-1, 2, 0, 0, -1, 0,-1, 0, 0, 0, 0, 0, -6, -2, 0}, { 0, 0, 0, 1, 0, 0, 0, 0,-1, 0, 0, 0, 0, 4, 15, 8, -2}, { 0,-1, 1, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 0, 4, 0, 0}, { 0, 2,-2, 1, 0, 0, -2, 0, 1, 0, 0, 0, 0, -3, 0, 0, 1}, /* 231-240 */ { 0, 0, 0, 0, 0, 0, -6, 11, 0, 0, 0, 0, 2, 0, 11, 5, 0}, { 0, 0, 0, 0, 0, 0, 6,-11, 0, 0, 0, 0, 0, 9, 6, 0, 0}, { 0, 0, 0, 0,-1, 0, 4, 0, 0, 0, 0, 0, 2, -4, 10, 4, 2}, { 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0}, { 2, 0,-2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0, 16, 0, 0, -9}, {-2, 0, 2, 0, 0, 0, 2, 0, 0,-2, 0, 0, 0, -3, 0, 0, 0}, { 0, 2,-2, 1, 0, 0, -7, 9, 0, 0, 0, 0, 0, 0, 3, 2, -1}, { 0, 0, 0, 0, 0, 0, 0, 0, 4,-5, 0, 0, 2, 7, 0, 0, -3}, { 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, -25, 22, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 42, 223, 119, -22}, /* 241-250 */ { 0, 1,-1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0, -27,-143, -77, 14}, { 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 9, 49, 26, -5}, { 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2,-1166, 0, 0, 505}, { 0, 2,-2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0, -5, 0, 0, 2}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 2, -6, 0, 0, 3}, { 0, 0, 0, 1, 0, 3, -5, 0, 0, 0, 0, 0, 0, -8, 0, 1, 4}, { 0,-1, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0}, { 0, 2,-2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0, 117, 0, 0, -63}, { 0, 0, 0, 1, 0, 0, 2, -4, 0, 0, 0, 0, 0, -4, 8, 4, 2}, { 0, 2,-2, 1, 0, 0, -4, 4, 0, 0, 0, 0, 0, 3, 0, 0, -2}, /* 251-260 */ { 0, 1,-1, 2, 0, -5, 7, 0, 0, 0, 0, 0, 0, -5, 0, 0, 2}, { 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0, 31, 0, 0}, { 0, 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 1, -5, 0, 1, 3}, { 0, 1,-1, 1, 0, 0, -4, 6, 0, 0, 0, 0, 0, 4, 0, 0, -2}, { 0, 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 1, -4, 0, 0, 2}, { 0, 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 2, -24, -13, -6, 10}, { 0,-1, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0}, { 0, 0, 0, 1, 0, 2, -3, 0, 0, 0, 0, 0, 0, 0, -32, -17, 0}, { 0, 0, 0, 0, 0, 0, -5, 9, 0, 0, 0, 0, 2, 8, 12, 5, -3}, { 0, 0, 0, 0, 0, 0, -5, 9, 0, 0, 0, 0, 1, 3, 0, 0, -1}, /* 261-270 */ { 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, 0, 7, 13, 0, 0}, { 0,-1, 1, 0, 0, 0, 1, 0,-2, 0, 0, 0, 0, -3, 16, 0, 0}, { 0, 2,-2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0, 50, 0, 0, -27}, {-2, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -5, -3, 0}, { 0,-2, 2, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0}, { 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 0, 1, 0, 5, 3, 1}, { 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 0, 2, 24, 5, 2, -11}, { 0, 0, 0, 0, 0, -2, 3, 0, 0, 0, 0, 0, 2, 5, -11, -5, -2}, { 0, 0, 0, 0, 0, -2, 3, 0, 0, 0, 0, 0, 1, 30, -3, -2, -16}, { 0, 1,-1, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0, 18, 0, 0, -9}, /* 271-280 */ { 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 0, 8, 614, 0, 0}, { 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 1, 3, -3, -1, -2}, { 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 6, 17, 9, -3}, { 0, 1,-1, 1, 0, 0, -1, 0, 3, 0, 0, 0, 0, -3, -9, -5, 2}, { 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 6, 3, -1}, { 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 2, -127, 21, 9, 55}, { 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, 0, 3, 5, 0, 0}, { 0, 0, 0, 0, 0, 0, -4, 8, 0, 0, 0, 0, 2, -6, -10, -4, 3}, { 0,-2, 2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, 5, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 2, 16, 9, 4, -7}, /* 281-290 */ { 0, 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 1, 3, 0, 0, -2}, { 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0, 0, 22, 0, 0}, { 0, 0, 0, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0, 0, 19, 10, 0}, { 0, 2,-2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0, 7, 0, 0, -4}, { 0, 0, 0, 0, 0, 0, -5, 10, 0, 0, 0, 0, 2, 0, -5, -2, 0}, { 0, 0, 0, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, -9, 3, 1, 4}, { 0, 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 2, 17, 0, 0, -7}, { 0, 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 1, 0, -3, -2, -1}, { 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, -20, 34, 0, 0}, /* 291-300 */ { 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 1, -10, 0, 1, 5}, { 0, 1,-1, 1, 0, 1, -3, 0, 0, 0, 0, 0, 0, -4, 0, 0, 2}, { 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 0, 22, -87, 0, 0}, { 0, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 1, -4, 0, 0, 2}, { 0, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 2, -3, -6, -2, 1}, { 0, 0, 0, 0, 0, -7, 11, 0, 0, 0, 0, 0, 2, -16, -3, -1, 7}, { 0, 0, 0, 0, 0, -7, 11, 0, 0, 0, 0, 0, 1, 0, -3, -2, 0}, { 0,-2, 2, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, -68, 39, 0, 0}, { 0, 2,-2, 1, 0, -4, 4, 0, 0, 0, 0, 0, 0, 27, 0, 0, -14}, /* 301-310 */ { 0,-1, 1, 0, 0, 4, -5, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0}, { 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -25, 0, 0, 0}, { 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 0, 1, -12, -3, -2, 6}, { 0, 1,-1, 1, 0, -4, 6, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, { 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 0, 2, 3, 66, 29, -1}, { 0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 0, 2, 490, 0, 0,-213}, { 0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 0, 1, -22, 93, 49, 12}, { 0, 1,-1, 1, 0, -4, 5, 0, 0, 0, 0, 0, 0, -7, 28, 15, 4}, { 0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 0, 1, -3, 13, 7, 2}, { 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, 0, -46, 14, 0, 0}, /* 311-320 */ {-2, 0, 2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 1, 0, 0}, { 0,-1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0}, { 0, 0, 0, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0, -28, 0, 0, 15}, { 0, 0, 0, 0, 0, 0, -1, 0, 5, 0, 0, 0, 2, 5, 0, 0, -2}, { 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, 0, 3, 0, 0}, { 0, 0, 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, 2, -11, 0, 0, 5}, { 0, 0, 0, 0, 0, 0, -7, 12, 0, 0, 0, 0, 2, 0, 3, 1, 0}, { 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1}, { 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 1, 25, 106, 57, -13}, /* 321-330 */ { 0, 1,-1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 5, 21, 11, -3}, { 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1485, 0, 0, 0}, { 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1, -7, -32, -17, 4}, { 0, 1,-1, 1, 0, 1, -2, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0}, { 0, 0, 0, 0, 0, 0, -2, 5, 0, 0, 0, 0, 2, -6, -3, -2, 3}, { 0, 0, 0, 0, 0, 0, -1, 0, 4, 0, 0, 0, 2, 30, -6, -2, -13}, { 0, 0, 0, 0, 0, 0, 1, 0,-4, 0, 0, 0, 0, -4, 4, 0, 0}, { 0, 0, 0, 1, 0, -1, 1, 0, 0, 0, 0, 0, 0, -19, 0, 0, 10}, { 0, 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 2, 0, 4, 2, -1}, { 0, 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 0, 0, 3, 0, 0}, /* 331-340 */ { 0, 2,-2, 1, 0, 0, -3, 0, 3, 0, 0, 0, 0, 4, 0, 0, -2}, { 0, 0, 0, 0, 0, 0, -3, 7, 0, 0, 0, 0, 2, 0, -3, -1, 0}, {-2, 0, 2, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 2, 5, 3, 1, -2}, { 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, 0, 11, 0, 0}, { 0, 0, 0, 0, 0, 0, -1, 0, 3, 0, 0, 0, 2, 118, 0, 0, -52}, { 0, 0, 0, 0, 0, 0, -1, 0, 3, 0, 0, 0, 1, 0, -5, -3, 0}, { 0, 0, 0, 0, 0, 0, 1, 0,-3, 0, 0, 0, 0, -28, 36, 0, 0}, { 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, 0, 5, -5, 0, 0}, { 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 0, 1, 14, -59, -31, -8}, /* 341-350 */ { 0, 1,-1, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0, 0, 9, 5, 1}, { 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 0, 2, -458, 0, 0, 198}, { 0, 0, 0, 0, 0, -6, 9, 0, 0, 0, 0, 0, 2, 0, -45, -20, 0}, { 0, 0, 0, 0, 0, -6, 9, 0, 0, 0, 0, 0, 1, 9, 0, 0, -5}, { 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0}, { 0, 0, 0, 1, 0, 0, 1, 0,-2, 0, 0, 0, 0, 0, -4, -2, -1}, { 0, 2,-2, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0, 11, 0, 0, -6}, { 0, 0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 2, 6, 0, 0, -2}, { 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, -16, 23, 0, 0}, { 0, 0, 0, 1, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, -4, -2, 0}, /* 351-360 */ { 0, 0, 0, 0, 0, 0, -1, 0, 2, 0, 0, 0, 2, -5, 0, 0, 2}, { 0, 0, 0, 0, 0, 0, 1, 0,-2, 0, 0, 0, 0, -166, 269, 0, 0}, { 0, 0, 0, 1, 0, 0, 1, 0,-1, 0, 0, 0, 0, 15, 0, 0, -8}, { 0, 0, 0, 0, 0, -5, 9, 0, 0, 0, 0, 0, 2, 10, 0, 0, -4}, { 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -78, 45, 0, 0}, { 0, 0, 0, 0, 0, -3, 4, 0, 0, 0, 0, 0, 2, 0, -5, -2, 0}, { 0, 0, 0, 0, 0, -3, 4, 0, 0, 0, 0, 0, 1, 7, 0, 0, -4}, { 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0, -5, 328, 0, 0}, { 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 1, 3, 0, 0, -2}, { 0, 0, 0, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0, 5, 0, 0, -2}, /* 361-370 */ { 0, 0, 0, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0, 0, 3, 1, 0}, { 0, 0, 0, 0, 0, 0, 1, 0, 0,-3, 0, 0, 0, -3, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 1, 0, 1,-5, 0, 0, 0, -3, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, -4, -2, 0}, { 0, 0, 0, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0,-1223, -26, 0, 0}, { 0, 0, 0, 0, 0, 0, 1, 0,-1, 0, 0, 0, 1, 0, 7, 3, 0}, { 0, 0, 0, 0, 0, 0, 1, 0,-3, 5, 0, 0, 0, 3, 0, 0, 0}, { 0, 0, 0, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0}, { 0, 0, 0, 0, 0, 0, 1, 0, 0,-2, 0, 0, 0, -6, 20, 0, 0}, { 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, -368, 0, 0, 0}, /* 371-380 */ { 0, 0, 0, 0, 0, 0, 1, 0, 0,-1, 0, 0, 0, -75, 0, 0, 0}, { 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 11, 0, 0, -6}, { 0, 0, 0, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0, 3, 0, 0, -2}, { 0, 0, 0, 0, 0, -8, 14, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1}, { 0, 0, 0, 0, 0, 0, 1, 0, 2,-5, 0, 0, 0, -13, -30, 0, 0}, { 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 0, 21, 3, 0, 0}, { 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 2, -3, 0, 0, 1}, { 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, -4, 0, 0, 2}, { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 8, -27, 0, 0}, { 0, 0, 0, 0, 0, 0, 3, -8, 3, 0, 0, 0, 0, -19, -11, 0, 0}, /* 381-390 */ { 0, 0, 0, 0, 0, 0, -3, 8,-3, 0, 0, 0, 2, -4, 0, 0, 2}, { 0, 0, 0, 0, 0, 0, 1, 0,-2, 5, 0, 0, 2, 0, 5, 2, 0}, { 0, 0, 0, 0, 0, -8, 12, 0, 0, 0, 0, 0, 2, -6, 0, 0, 2}, { 0, 0, 0, 0, 0, -8, 12, 0, 0, 0, 0, 0, 0, -8, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 1, 0, 1,-2, 0, 0, 0, -1, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2, -14, 0, 0, 6}, { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 6, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, -74, 0, 0, 32}, { 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 2, 0, -3, -1, 0}, { 0, 2,-2, 1, 0, -5, 5, 0, 0, 0, 0, 0, 0, 4, 0, 0, -2}, /* 391-400 */ { 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 8, 11, 0, 0}, { 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 3, 2, 0}, { 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, -262, 0, 0, 114}, { 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0}, { 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 0, 1, -7, 0, 0, 4}, { 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 0, 2, 0, -27, -12, 0}, { 0, 0, 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, 2, -19, -8, -4, 8}, { 0, 0, 0, 0, 0, -5, 7, 0, 0, 0, 0, 0, 2, 202, 0, 0, -87}, { 0, 0, 0, 0, 0, -5, 7, 0, 0, 0, 0, 0, 1, -8, 35, 19, 5}, { 0, 1,-1, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0}, /* 401-410 */ { 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, 0, 16, -5, 0, 0}, { 0, 2,-2, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 5, 0, 0, -3}, { 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, -3, 0, 0}, { 0, 0, 0, 0,-1, 0, 3, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, -35, -48, -21, 15}, { 0, 0, 0, 0, 0, 0, -2, 6, 0, 0, 0, 0, 2, -3, -5, -2, 1}, { 0, 0, 0, 1, 0, 2, -2, 0, 0, 0, 0, 0, 0, 6, 0, 0, -3}, { 0, 0, 0, 0, 0, 0, -6, 9, 0, 0, 0, 0, 2, 3, 0, 0, -1}, { 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, 0, -5, 0, 0}, { 0, 0, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0, 1, 12, 55, 29, -6}, /* 411-420 */ { 0, 1,-1, 1, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0}, { 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, -598, 0, 0, 0}, { 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 1, -3, -13, -7, 1}, { 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 2, -5, -7, -3, 2}, { 0, 0, 0, 0, 0, 0, -5, 7, 0, 0, 0, 0, 2, 3, 0, 0, -1}, { 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, 5, -7, 0, 0}, { 0, 0, 0, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0, 4, 0, 0, -2}, { 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, 16, -6, 0, 0}, { 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, 0, 8, -3, 0, 0}, { 0, 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, 0, 1, 8, -31, -16, -4}, /* 421-430 */ { 0, 1,-1, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0}, { 0, 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, 0, 2, 113, 0, 0, -49}, { 0, 0, 0, 0, 0, -7, 10, 0, 0, 0, 0, 0, 2, 0, -24, -10, 0}, { 0, 0, 0, 0, 0, -7, 10, 0, 0, 0, 0, 0, 1, 4, 0, 0, -2}, { 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 27, 0, 0, 0}, { 0, 0, 0, 0, 0, -4, 8, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1}, { 0, 0, 0, 0, 0, -4, 5, 0, 0, 0, 0, 0, 2, 0, -4, -2, 0}, { 0, 0, 0, 0, 0, -4, 5, 0, 0, 0, 0, 0, 1, 5, 0, 0, -2}, { 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0}, { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2, -13, 0, 0, 6}, /* 431-440 */ { 0, 0, 0, 0, 0, 0, -2, 0, 5, 0, 0, 0, 2, 5, 0, 0, -2}, { 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 2, -18, -10, -4, 8}, { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -4, -28, 0, 0}, { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, -5, 6, 3, 2}, { 0, 0, 0, 0, 0, -9, 13, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1}, { 0, 0, 0, 0, 0, 0, -1, 5, 0, 0, 0, 0, 2, -5, -9, -4, 2}, { 0, 0, 0, 0, 0, 0, -2, 0, 4, 0, 0, 0, 2, 17, 0, 0, -7}, { 0, 0, 0, 0, 0, 0, 2, 0,-4, 0, 0, 0, 0, 11, 4, 0, 0}, { 0, 0, 0, 0, 0, 0, -2, 7, 0, 0, 0, 0, 2, 0, -6, -2, 0}, { 0, 0, 0, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, 83, 15, 0, 0}, /* 441-450 */ { 0, 0, 0, 0, 0, -2, 5, 0, 0, 0, 0, 0, 1, -4, 0, 0, 2}, { 0, 0, 0, 0, 0, -2, 5, 0, 0, 0, 0, 0, 2, 0,-114, -49, 0}, { 0, 0, 0, 0, 0, -6, 8, 0, 0, 0, 0, 0, 2, 117, 0, 0, -51}, { 0, 0, 0, 0, 0, -6, 8, 0, 0, 0, 0, 0, 1, -5, 19, 10, 2}, { 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0}, { 0, 0, 0, 1, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 2}, { 0, 0, 0, 0, 0, 0, -3, 9, 0, 0, 0, 0, 2, 0, -3, -1, 0}, { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 3, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 2, 0, -6, -2, 0}, { 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, 393, 3, 0, 0}, /* 451-460 */ { 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 1, -4, 21, 11, 2}, { 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 2, -6, 0, -1, 3}, { 0, 0, 0, 0, 0, -5, 10, 0, 0, 0, 0, 0, 2, -3, 8, 4, 1}, { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 8, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 2, 18, -29, -13, -8}, { 0, 0, 0, 0, 0, -3, 3, 0, 0, 0, 0, 0, 1, 8, 34, 18, -4}, { 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0}, { 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 1, 3, 12, 6, -1}, { 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 2, 54, -15, -7, -24}, { 0, 0, 0, 0, 0, 0, 2, 0, 0,-3, 0, 0, 0, 0, 3, 0, 0}, /* 461-470 */ { 0, 0, 0, 0, 0, 0, -5, 13, 0, 0, 0, 0, 2, 3, 0, 0, -1}, { 0, 0, 0, 0, 0, 0, 2, 0,-1, 0, 0, 0, 0, 0, 35, 0, 0}, { 0, 0, 0, 0, 0, 0, 2, 0,-1, 0, 0, 0, 2, -154, -30, -13, 67}, { 0, 0, 0, 0, 0, 0, 2, 0, 0,-2, 0, 0, 0, 15, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 2, 0, 0,-2, 0, 0, 1, 0, 4, 2, 0}, { 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 0, 9, 0, 0}, { 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 2, 80, -71, -31, -35}, { 0, 0, 0, 0, 0, 0, 2, 0, 0,-1, 0, 0, 2, 0, -20, -9, 0}, { 0, 0, 0, 0, 0, 0, -6, 15, 0, 0, 0, 0, 2, 11, 5, 2, -5}, { 0, 0, 0, 0, 0, -8, 15, 0, 0, 0, 0, 0, 2, 61, -96, -42, -27}, /* 471-480 */ { 0, 0, 0, 0, 0, -3, 9, -4, 0, 0, 0, 0, 2, 14, 9, 4, -6}, { 0, 0, 0, 0, 0, 0, 2, 0, 2,-5, 0, 0, 2, -11, -6, -3, 5}, { 0, 0, 0, 0, 0, 0, -2, 8,-1,-5, 0, 0, 2, 0, -3, -1, 0}, { 0, 0, 0, 0, 0, 0, 6, -8, 3, 0, 0, 0, 2, 123,-415, -180, -53}, { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, -35}, { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 7, -32, -17, -4}, { 0, 1,-1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -9, -5, 0}, { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, -4, 2, 0}, { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, -89, 0, 0, 38}, /* 481-490 */ { 0, 0, 0, 0, 0, 0, -6, 16,-4,-5, 0, 0, 2, 0, -86, -19, -6}, { 0, 0, 0, 0, 0, 0, -2, 8,-3, 0, 0, 0, 2, 0, 0, -19, 6}, { 0, 0, 0, 0, 0, 0, -2, 8,-3, 0, 0, 0, 2, -123,-416, -180, 53}, { 0, 0, 0, 0, 0, 0, 6, -8, 1, 5, 0, 0, 2, 0, -3, -1, 0}, { 0, 0, 0, 0, 0, 0, 2, 0,-2, 5, 0, 0, 2, 12, -6, -3, -5}, { 0, 0, 0, 0, 0, 3, -5, 4, 0, 0, 0, 0, 2, -13, 9, 4, 6}, { 0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 2, 0, -15, -7, 0}, { 0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 1, 3, 0, 0, -1}, { 0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 2, -62, -97, -42, 27}, { 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 2, -11, 5, 2, 5}, /* 491-500 */ { 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2, 0, -19, -8, 0}, { 0, 0, 0, 0, 0, 3, -3, 0, 2, 0, 0, 0, 2, -3, 0, 0, 1}, { 0, 2,-2, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, 4, 2, 0}, { 0, 1,-1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0}, { 0, 2,-2, 1, 0, 0, -4, 8,-3, 0, 0, 0, 0, 0, 4, 2, 0}, { 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 2, -85, -70, -31, 37}, { 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 163, -12, -5, -72}, { 0, 0, 0, 0, 0, -3, 7, 0, 0, 0, 0, 0, 2, -63, -16, -7, 28}, { 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 2, -21, -32, -14, 9}, { 0, 0, 0, 0, 0, -5, 6, 0, 0, 0, 0, 0, 2, 0, -3, -1, 0}, /* 501-510 */ { 0, 0, 0, 0, 0, -5, 6, 0, 0, 0, 0, 0, 1, 3, 0, 0, -2}, { 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0}, { 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 2, 3, 10, 4, -1}, { 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 3, 0, 0, -1}, { 0, 0, 0, 0, 0, 0, -1, 6, 0, 0, 0, 0, 2, 0, -7, -3, 0}, { 0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 2, 0, -4, -2, 0}, { 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 0, 6, 19, 0, 0}, { 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 2, 5,-173, -75, -2}, { 0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 2, 0, -7, -3, 0}, { 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 2, 7, -12, -5, -3}, /* 511-520 */ { 0, 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 1, -3, 0, 0, 2}, { 0, 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 2, 3, -4, -2, -1}, { 0, 0, 0, 0, 0, -7, 9, 0, 0, 0, 0, 0, 2, 74, 0, 0, -32}, { 0, 0, 0, 0, 0, -7, 9, 0, 0, 0, 0, 0, 1, -3, 12, 6, 2}, { 0, 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 2, 26, -14, -6, -11}, { 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 2, 19, 0, 0, -8}, { 0, 0, 0, 0, 0, -4, 4, 0, 0, 0, 0, 0, 1, 6, 24, 13, -3}, { 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0}, { 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 1, 0, -10, -5, 0}, { 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 2, 11, -3, -1, -5}, /* 521-530 */ { 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 3, 0, 1, -1}, { 0, 0, 0, 0, 0, 0, -3, 0, 5, 0, 0, 0, 2, 3, 0, 0, -1}, { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0}, { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 5, -23, -12, -3}, { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2, -339, 0, 0, 147}, { 0, 0, 0, 0, 0, -9, 12, 0, 0, 0, 0, 0, 2, 0, -10, -5, 0}, { 0, 0, 0, 0, 0, 0, 3, 0,-4, 0, 0, 0, 0, 5, 0, 0, 0}, { 0, 2,-2, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, { 0, 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 2, 0, -4, -2, 0}, { 0, 0, 0, 0, 0, 0, 3, 0,-3, 0, 0, 0, 0, 18, -3, 0, 0}, /* 531-540 */ { 0, 0, 0, 0, 0, 0, 3, 0,-3, 0, 0, 0, 2, 9, -11, -5, -4}, { 0, 0, 0, 0, 0, -2, 6, 0, 0, 0, 0, 0, 2, -8, 0, 0, 4}, { 0, 0, 0, 0, 0, -6, 7, 0, 0, 0, 0, 0, 1, 3, 0, 0, -1}, { 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0}, { 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 2, 6, -9, -4, -2}, { 0, 0, 0, 0, 0, 0, 3, 0,-2, 0, 0, 0, 0, -4, -12, 0, 0}, { 0, 0, 0, 0, 0, 0, 3, 0,-2, 0, 0, 0, 2, 67, -91, -39, -29}, { 0, 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 2, 30, -18, -8, -13}, { 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 2, 0,-114, -50, 0}, /* 541-550 */ { 0, 0, 0, 0, 0, 0, 3, 0,-1, 0, 0, 0, 2, 0, 0, 0, 23}, { 0, 0, 0, 0, 0, 0, 3, 0,-1, 0, 0, 0, 2, 517, 16, 7,-224}, { 0, 0, 0, 0, 0, 0, 3, 0, 0,-2, 0, 0, 2, 0, -7, -3, 0}, { 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 2, 143, -3, -1, -62}, { 0, 0, 0, 0, 0, 0, 3, 0, 0,-1, 0, 0, 2, 29, 0, 0, -13}, { 0, 2,-2, 1, 0, 0, 1, 0,-1, 0, 0, 0, 0, -4, 0, 0, 2}, { 0, 0, 0, 0, 0, -8, 16, 0, 0, 0, 0, 0, 2, -6, 0, 0, 3}, { 0, 0, 0, 0, 0, 0, 3, 0, 2,-5, 0, 0, 2, 5, 12, 5, -2}, { 0, 0, 0, 0, 0, 0, 7, -8, 3, 0, 0, 0, 2, -25, 0, 0, 11}, { 0, 0, 0, 0, 0, 0, -5, 16,-4,-5, 0, 0, 2, -3, 0, 0, 1}, /* 551-560 */ { 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 4, 2, 0}, { 0, 0, 0, 0, 0, 0, -1, 8,-3, 0, 0, 0, 2, -22, 12, 5, 10}, { 0, 0, 0, 0, 0, -8, 10, 0, 0, 0, 0, 0, 2, 50, 0, 0, -22}, { 0, 0, 0, 0, 0, -8, 10, 0, 0, 0, 0, 0, 1, 0, 7, 4, 0}, { 0, 0, 0, 0, 0, -8, 10, 0, 0, 0, 0, 0, 2, 0, 3, 1, 0}, { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, -4, 4, 2, 2}, { 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 2, -5, -11, -5, 2}, { 0, 0, 0, 0, 0, -3, 8, 0, 0, 0, 0, 0, 2, 0, 4, 2, 0}, { 0, 0, 0, 0, 0, -5, 5, 0, 0, 0, 0, 0, 1, 4, 17, 9, -2}, { 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0}, /* 561-570 */ { 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 1, 0, -4, -2, 0}, { 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 2, -8, 0, 0, 4}, { 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0}, { 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 4, -15, -8, -2}, { 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 370, -8, 0,-160}, { 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 2, 0, 0, -3, 0}, { 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 2, 0, 3, 1, 0}, { 0, 0, 0, 0, 0, 0, 6, -5, 0, 0, 0, 0, 2, -6, 3, 1, 3}, { 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0}, { 0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 2, -10, 0, 0, 4}, /* 571-580 */ { 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 0, 2, 0, 9, 4, 0}, { 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 2, 4, 17, 7, -2}, { 0, 0, 0, 0, 0, -9, 11, 0, 0, 0, 0, 0, 2, 34, 0, 0, -15}, { 0, 0, 0, 0, 0, -9, 11, 0, 0, 0, 0, 0, 1, 0, 5, 3, 0}, { 0, 0, 0, 0, 0, 0, 4, 0,-4, 0, 0, 0, 2, -5, 0, 0, 2}, { 0, 0, 0, 0, 0, 0, 4, 0,-3, 0, 0, 0, 2, -37, -7, -3, 16}, { 0, 0, 0, 0, 0, -6, 6, 0, 0, 0, 0, 0, 1, 3, 13, 7, -2}, { 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0}, { 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 1, 0, -3, -2, 0}, { 0, 0, 0, 0, 0, 0, 4, 0,-2, 0, 0, 0, 2, -184, -3, -1, 80}, /* 581-590 */ { 0, 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 2, -3, 0, 0, 1}, { 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0}, { 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 1, 0, -10, -6, -1}, { 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 2, 31, -6, 0, -13}, { 0, 0, 0, 0, 0, 0, 4, 0,-1, 0, 0, 0, 2, -3, -32, -14, 1}, { 0, 0, 0, 0, 0, 0, 4, 0, 0,-2, 0, 0, 2, -7, 0, 0, 3}, { 0, 0, 0, 0, 0, 0, 5, -2, 0, 0, 0, 0, 2, 0, -8, -4, 0}, { 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 3, -4, 0, 0}, { 0, 0, 0, 0, 0, 8, -9, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0}, { 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 0, 2, 0, 3, 1, 0}, /* 591-600 */ { 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 2, 19, -23, -10, 2}, { 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, -10}, { 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1, 0, 3, 2, 0}, { 0, 0, 0, 0, 0, -7, 7, 0, 0, 0, 0, 0, 1, 0, 9, 5, -1}, { 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0}, { 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 1, 0, -7, -4, 0}, { 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 2, 8, -4, 0, -4}, { 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0}, { 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0}, { 0, 0, 0, 0, 0, 0, 5, 0,-4, 0, 0, 0, 2, -3, 0, 0, 1}, /* 601-610 */ { 0, 0, 0, 0, 0, 0, 5, 0,-3, 0, 0, 0, 2, -9, 0, 1, 4}, { 0, 0, 0, 0, 0, 0, 5, 0,-2, 0, 0, 0, 2, 3, 12, 5, -1}, { 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 2, 17, -3, -1, 0}, { 0, 0, 0, 0, 0, -8, 8, 0, 0, 0, 0, 0, 1, 0, 7, 4, 0}, { 0, 0, 0, 0, 0, 8, -8, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0}, { 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 1, 0, -5, -3, 0}, { 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 2, 14, -3, 0, -1}, { 0, 0, 0, 0, 0, -9, 9, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0}, { 0, 0, 0, 0, 0, -9, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, -5}, { 0, 0, 0, 0, 0, -9, 9, 0, 0, 0, 0, 0, 1, 0, 5, 3, 0}, /* 611-620 */ { 0, 0, 0, 0, 0, 9, -9, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0}, { 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 0, 1, 0, -3, -2, 0}, { 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 2, 9, 4, 3}, { 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4}, { 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1, 0, 4, 2, 0}, { 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 6, 0, 0, -3}, { 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1, 0, 3, 1, 0}, { 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 5, 0, 0, -2}, /* 621-630 */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, -1}, { 1, 0,-2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 0}, { 1, 0,-2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0}, { 1, 0,-2, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 7, 0, 0, 0}, { 1, 0,-2, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0}, {-1, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, {-1, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, 6, 0, 0, 0}, {-1, 0, 2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -4, 0, 0}, { 1, 0,-2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -4, 0, 0}, {-2, 0, 2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 5, 0, 0, 0}, /* 631-640 */ {-1, 0, 0, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, -3, 0, 0, 0}, {-1, 0, 0, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 4, 0, 0, 0}, {-1, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0}, {-1, 0, 2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, { 1,-1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0}, {-1, 0, 2, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, 13, 0, 0, 0}, {-2, 0, 0, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, 21, 11, 0, 0}, { 1, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -5, 0, 0}, {-1, 1,-1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -5, -2, 0}, { 1, 1,-1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0}, /* 641-650 */ {-1, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -5, 0, 0}, {-1, 0, 2, 1, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 2}, { 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, 20, 10, 0, 0}, {-1, 0, 2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, -34, 0, 0, 0}, {-1, 0, 2, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, -19, 0, 0, 0}, { 1, 0,-2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0, 3, 0, 0, -2}, { 1, 2,-2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1}, { 1, 2,-2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0, -6, 0, 0, 3}, { 1, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0}, { 1, 0, 0, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 3, 0, 0, 0}, /* 651-660 */ { 0, 0,-2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0}, { 0, 0,-2, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 4, 0, 0, 0}, { 0, 2, 0, 2, 0, -2, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, { 0, 2, 0, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0, 6, 0, 0, -3}, { 0, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0, -8, 0, 0, 3}, { 0, 2, 0, 2, 0, -2, 3, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0}, { 0, 0, 2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 0}, { 0, 1, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -3, -2, 0}, { 1, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 126, -63, -27, -55}, {-1, 2, 0, 2, 0, 10, -3, 0, 0, 0, 0, 0, 0, -5, 0, 1, 2}, /* 661-670 */ { 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, -3, 28, 15, 2}, { 1, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 5, 0, 1, -2}, { 0, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, 9, 4, 1}, { 0, 2, 0, 2, 0, 0, -4, 8,-3, 0, 0, 0, 0, 0, 9, 4, -1}, {-1, 2, 0, 2, 0, 0, -4, 8,-3, 0, 0, 0, 0, -126, -63, -27, 55}, { 2, 2,-2, 2, 0, 0, -2, 0, 3, 0, 0, 0, 0, 3, 0, 0, -1}, { 1, 2, 0, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0, 21, -11, -6, -11}, { 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0}, {-1, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, -21, -11, -6, 11}, {-2, 2, 2, 2, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 1}, /* 671-680 */ { 0, 2, 0, 2, 0, 2, -3, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0}, { 0, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0, 8, 0, 0, -4}, { 0, 2, 0, 2, 0, 0, 1, 0,-1, 0, 0, 0, 0, -6, 0, 0, 3}, { 0, 2, 0, 2, 0, 2, -2, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1}, {-1, 2, 2, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0, 3, 0, 0, -1}, { 1, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1}, {-1, 2, 2, 2, 0, 0, 2, 0,-3, 0, 0, 0, 0, -5, 0, 0, 2}, { 2, 2, 0, 2, 0, 0, 2, 0,-3, 0, 0, 0, 0, 24, -12, -5, -11}, { 1, 2, 0, 2, 0, 0, -4, 8,-3, 0, 0, 0, 0, 0, 3, 1, 0}, { 1, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, 3, 1, 0}, /* 681-687 */ { 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0}, { 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, -24, -12, -5, 10}, { 2, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 4, 0, -1, -2}, {-1, 2, 2, 2, 0, 0, 2, 0,-2, 0, 0, 0, 0, 13, 0, 0, -6}, {-1, 2, 2, 2, 0, 3, -3, 0, 0, 0, 0, 0, 0, 7, 0, 0, -3}, { 1, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, { 0, 2, 2, 2, 0, 0, 2, 0,-2, 0, 0, 0, 0, 3, 0, 0, -1} }; /* Number of terms in the planetary nutation model */ const int NPL = (int) (sizeof xpl / sizeof xpl[0]); /*--------------------------------------------------------------------*/ /* Interval between fundamental date J2000.0 and given date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* ------------------- */ /* LUNI-SOLAR NUTATION */ /* ------------------- */ /* Fundamental (Delaunay) arguments */ /* Mean anomaly of the Moon (IERS 2003). */ el = eraFal03(t); /* Mean anomaly of the Sun (MHB2000). */ elp = fmod(1287104.79305 + t * (129596581.0481 + t * (-0.5532 + t * (0.000136 + t * (-0.00001149)))), ERFA_TURNAS) * ERFA_DAS2R; /* Mean longitude of the Moon minus that of the ascending node */ /* (IERS 2003. */ f = eraFaf03(t); /* Mean elongation of the Moon from the Sun (MHB2000). */ d = fmod(1072260.70369 + t * (1602961601.2090 + t * (-6.3706 + t * (0.006593 + t * (-0.00003169)))), ERFA_TURNAS) * ERFA_DAS2R; /* Mean longitude of the ascending node of the Moon (IERS 2003). */ om = eraFaom03(t); /* Initialize the nutation values. */ dp = 0.0; de = 0.0; /* Summation of luni-solar nutation series (in reverse order). */ for (i = NLS-1; i >= 0; i--) { /* Argument and functions. */ arg = fmod((double)xls[i].nl * el + (double)xls[i].nlp * elp + (double)xls[i].nf * f + (double)xls[i].nd * d + (double)xls[i].nom * om, ERFA_D2PI); sarg = sin(arg); carg = cos(arg); /* Term. */ dp += (xls[i].sp + xls[i].spt * t) * sarg + xls[i].cp * carg; de += (xls[i].ce + xls[i].cet * t) * carg + xls[i].se * sarg; } /* Convert from 0.1 microarcsec units to radians. */ dpsils = dp * U2R; depsls = de * U2R; /* ------------------ */ /* PLANETARY NUTATION */ /* ------------------ */ /* n.b. The MHB2000 code computes the luni-solar and planetary nutation */ /* in different functions, using slightly different Delaunay */ /* arguments in the two cases. This behaviour is faithfully */ /* reproduced here. Use of the IERS 2003 expressions for both */ /* cases leads to negligible changes, well below */ /* 0.1 microarcsecond. */ /* Mean anomaly of the Moon (MHB2000). */ al = fmod(2.35555598 + 8328.6914269554 * t, ERFA_D2PI); /* Mean longitude of the Moon minus that of the ascending node */ /*(MHB2000). */ af = fmod(1.627905234 + 8433.466158131 * t, ERFA_D2PI); /* Mean elongation of the Moon from the Sun (MHB2000). */ ad = fmod(5.198466741 + 7771.3771468121 * t, ERFA_D2PI); /* Mean longitude of the ascending node of the Moon (MHB2000). */ aom = fmod(2.18243920 - 33.757045 * t, ERFA_D2PI); /* General accumulated precession in longitude (IERS 2003). */ apa = eraFapa03(t); /* Planetary longitudes, Mercury through Uranus (IERS 2003). */ alme = eraFame03(t); alve = eraFave03(t); alea = eraFae03(t); alma = eraFama03(t); alju = eraFaju03(t); alsa = eraFasa03(t); alur = eraFaur03(t); /* Neptune longitude (MHB2000). */ alne = fmod(5.321159000 + 3.8127774000 * t, ERFA_D2PI); /* Initialize the nutation values. */ dp = 0.0; de = 0.0; /* Summation of planetary nutation series (in reverse order). */ for (i = NPL-1; i >= 0; i--) { /* Argument and functions. */ arg = fmod((double)xpl[i].nl * al + (double)xpl[i].nf * af + (double)xpl[i].nd * ad + (double)xpl[i].nom * aom + (double)xpl[i].nme * alme + (double)xpl[i].nve * alve + (double)xpl[i].nea * alea + (double)xpl[i].nma * alma + (double)xpl[i].nju * alju + (double)xpl[i].nsa * alsa + (double)xpl[i].nur * alur + (double)xpl[i].nne * alne + (double)xpl[i].npa * apa, ERFA_D2PI); sarg = sin(arg); carg = cos(arg); /* Term. */ dp += (double)xpl[i].sp * sarg + (double)xpl[i].cp * carg; de += (double)xpl[i].se * sarg + (double)xpl[i].ce * carg; } /* Convert from 0.1 microarcsec units to radians. */ dpsipl = dp * U2R; depspl = de * U2R; /* ------- */ /* RESULTS */ /* ------- */ /* Add luni-solar and planetary components. */ *dpsi = dpsils + dpsipl; *deps = depsls + depspl; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ppsp.c0000644001134200020070000000732412640262015017636 0ustar embrayscience00000000000000#include "erfa.h" void eraPpsp(double a[3], double s, double b[3], double apsb[3]) /* ** - - - - - - - - ** e r a P p s p ** - - - - - - - - ** ** P-vector plus scaled p-vector. ** ** Given: ** a double[3] first p-vector ** s double scalar (multiplier for b) ** b double[3] second p-vector ** ** Returned: ** apsb double[3] a + s*b ** ** Note: ** It is permissible for any of a, b and apsb to be the same array. ** ** Called: ** eraSxp multiply p-vector by scalar ** eraPpp p-vector plus p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double sb[3]; /* s*b. */ eraSxp(s, b, sb); /* a + s*b. */ eraPpp(a, sb, apsb); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pnm00a.c0000644001134200020070000001233112640262015017741 0ustar embrayscience00000000000000#include "erfa.h" void eraPnm00a(double date1, double date2, double rbpn[3][3]) /* ** - - - - - - - - - - ** e r a P n m 0 0 a ** - - - - - - - - - - ** ** Form the matrix of precession-nutation for a given date (including ** frame bias), equinox-based, IAU 2000A model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** rbpn double[3][3] classical NPB matrix (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix operates in the sense V(date) = rbpn * V(GCRS), where ** the p-vector V(date) is with respect to the true equatorial triad ** of date date1+date2 and the p-vector V(GCRS) is with respect to ** the Geocentric Celestial Reference System (IAU, 2000). ** ** 3) A faster, but slightly less accurate result (about 1 mas), can be ** obtained by using instead the eraPnm00b function. ** ** Called: ** eraPn00a bias/precession/nutation, IAU 2000A ** ** Reference: ** ** IAU: Trans. International Astronomical Union, Vol. XXIVB; Proc. ** 24th General Assembly, Manchester, UK. Resolutions B1.3, B1.6. ** (2000) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dpsi, deps, epsa, rb[3][3], rp[3][3], rbp[3][3], rn[3][3]; /* Obtain the required matrix (discarding other results). */ eraPn00a(date1, date2, &dpsi, &deps, &epsa, rb, rp, rbp, rn, rbpn); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2s.c0000644001134200020070000000740112640262015017337 0ustar embrayscience00000000000000#include "erfa.h" void eraC2s(double p[3], double *theta, double *phi) /* ** - - - - - - - ** e r a C 2 s ** - - - - - - - ** ** P-vector to spherical coordinates. ** ** Given: ** p double[3] p-vector ** ** Returned: ** theta double longitude angle (radians) ** phi double latitude angle (radians) ** ** Notes: ** ** 1) The vector p can have any magnitude; only its direction is used. ** ** 2) If p is null, zero theta and phi are returned. ** ** 3) At either pole, zero theta is returned. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double x, y, z, d2; x = p[0]; y = p[1]; z = p[2]; d2 = x*x + y*y; *theta = (d2 == 0.0) ? 0.0 : atan2(y, x); *phi = (z == 0.0) ? 0.0 : atan2(z, sqrt(d2)); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ut1utc.c0000644001134200020070000001624412640262015020102 0ustar embrayscience00000000000000#include "erfa.h" int eraUt1utc(double ut11, double ut12, double dut1, double *utc1, double *utc2) /* ** - - - - - - - - - - ** e r a U t 1 u t c ** - - - - - - - - - - ** ** Time scale transformation: Universal Time, UT1, to Coordinated ** Universal Time, UTC. ** ** Given: ** ut11,ut12 double UT1 as a 2-part Julian Date (Note 1) ** dut1 double Delta UT1: UT1-UTC in seconds (Note 2) ** ** Returned: ** utc1,utc2 double UTC as a 2-part quasi Julian Date (Notes 3,4) ** ** Returned (function value): ** int status: +1 = dubious year (Note 5) ** 0 = OK ** -1 = unacceptable date ** ** Notes: ** ** 1) ut11+ut12 is Julian Date, apportioned in any convenient way ** between the two arguments, for example where ut11 is the Julian ** Day Number and ut12 is the fraction of a day. The returned utc1 ** and utc2 form an analogous pair, except that a special convention ** is used, to deal with the problem of leap seconds - see Note 3. ** ** 2) Delta UT1 can be obtained from tabulations provided by the ** International Earth Rotation and Reference Systems Service. The ** value changes abruptly by 1s at a leap second; however, close to ** a leap second the algorithm used here is tolerant of the "wrong" ** choice of value being made. ** ** 3) JD cannot unambiguously represent UTC during a leap second unless ** special measures are taken. The convention in the present ** function is that the returned quasi JD day UTC1+UTC2 represents ** UTC days whether the length is 86399, 86400 or 86401 SI seconds. ** ** 4) The function eraD2dtf can be used to transform the UTC quasi-JD ** into calendar date and clock time, including UTC leap second ** handling. ** ** 5) The warning status "dubious year" flags UTCs that predate the ** introduction of the time scale or that are too far in the future ** to be trusted. See eraDat for further details. ** ** Called: ** eraJd2cal JD to Gregorian calendar ** eraDat delta(AT) = TAI-UTC ** eraCal2jd Gregorian calendar to JD ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int big1; int i, iy, im, id, js; double duts, u1, u2, d1, dats1, d2, fd, dats2, ddats, us1, us2, du; /* UT1-UTC in seconds. */ duts = dut1; /* Put the two parts of the UT1 into big-first order. */ big1 = ( ut11 >= ut12 ); if ( big1 ) { u1 = ut11; u2 = ut12; } else { u1 = ut12; u2 = ut11; } /* See if the UT1 can possibly be in a leap-second day. */ d1 = u1; dats1 = 0; for ( i = -1; i <= 3; i++ ) { d2 = u2 + (double) i; if ( eraJd2cal(d1, d2, &iy, &im, &id, &fd) ) return -1; js = eraDat(iy, im, id, 0.0, &dats2); if ( js < 0 ) return -1; if ( i == - 1 ) dats1 = dats2; ddats = dats2 - dats1; if ( fabs(ddats) >= 0.5 ) { /* Yes, leap second nearby: ensure UT1-UTC is "before" value. */ if ( ddats * duts >= 0 ) duts -= ddats; /* UT1 for the start of the UTC day that ends in a leap. */ if ( eraCal2jd(iy, im, id, &d1, &d2) ) return -1; us1 = d1; us2 = d2 - 1.0 + duts/ERFA_DAYSEC; /* Is the UT1 after this point? */ du = u1 - us1; du += u2 - us2; if ( du > 0 ) { /* Yes: fraction of the current UTC day that has elapsed. */ fd = du * ERFA_DAYSEC / ( ERFA_DAYSEC + ddats ); /* Ramp UT1-UTC to bring about ERFA's JD(UTC) convention. */ duts += ddats * ( fd <= 1.0 ? fd : 1.0 ); } /* Done. */ break; } dats1 = dats2; } /* Subtract the (possibly adjusted) UT1-UTC from UT1 to give UTC. */ u2 -= duts / ERFA_DAYSEC; /* Result, safeguarding precision. */ if ( big1 ) { *utc1 = u1; *utc2 = u2; } else { *utc1 = u2; *utc2 = u1; } /* Status. */ return js; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pvdpv.c0000644001134200020070000001001412640262015020001 0ustar embrayscience00000000000000#include "erfa.h" void eraPvdpv(double a[2][3], double b[2][3], double adb[2]) /* ** - - - - - - - - - ** e r a P v d p v ** - - - - - - - - - ** ** Inner (=scalar=dot) product of two pv-vectors. ** ** Given: ** a double[2][3] first pv-vector ** b double[2][3] second pv-vector ** ** Returned: ** adb double[2] a . b (see note) ** ** Note: ** ** If the position and velocity components of the two pv-vectors are ** ( ap, av ) and ( bp, bv ), the result, a . b, is the pair of ** numbers ( ap . bp , ap . bv + av . bp ). The two numbers are the ** dot-product of the two p-vectors and its derivative. ** ** Called: ** eraPdp scalar product of two p-vectors ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double adbd, addb; /* a . b = constant part of result. */ adb[0] = eraPdp(a[0], b[0]); /* a . bdot */ adbd = eraPdp(a[0], b[1]); /* adot . b */ addb = eraPdp(a[1], b[0]); /* Velocity part of result. */ adb[1] = adbd + addb; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/zpv.c0000644001134200020070000000650412640262015017472 0ustar embrayscience00000000000000#include "erfa.h" void eraZpv(double pv[2][3]) /* ** - - - - - - - ** e r a Z p v ** - - - - - - - ** ** Zero a pv-vector. ** ** Returned: ** pv double[2][3] pv-vector ** ** Called: ** eraZp zero p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraZp(pv[0]); eraZp(pv[1]); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/rxr.c0000644001134200020070000000742212640262015017466 0ustar embrayscience00000000000000#include "erfa.h" void eraRxr(double a[3][3], double b[3][3], double atb[3][3]) /* ** - - - - - - - ** e r a R x r ** - - - - - - - ** ** Multiply two r-matrices. ** ** Given: ** a double[3][3] first r-matrix ** b double[3][3] second r-matrix ** ** Returned: ** atb double[3][3] a * b ** ** Note: ** It is permissible to re-use the same array for any of the ** arguments. ** ** Called: ** eraCr copy r-matrix ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int i, j, k; double w, wm[3][3]; for (i = 0; i < 3; i++) { for (j = 0; j < 3; j++) { w = 0.0; for (k = 0; k < 3; k++) { w += a[i][k] * b[k][j]; } wm[i][j] = w; } } eraCr(wm, atb); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/gst00a.c0000644001134200020070000001356612640262015017757 0ustar embrayscience00000000000000#include "erfa.h" double eraGst00a(double uta, double utb, double tta, double ttb) /* ** - - - - - - - - - - ** e r a G s t 0 0 a ** - - - - - - - - - - ** ** Greenwich apparent sidereal time (consistent with IAU 2000 ** resolutions). ** ** Given: ** uta,utb double UT1 as a 2-part Julian Date (Notes 1,2) ** tta,ttb double TT as a 2-part Julian Date (Notes 1,2) ** ** Returned (function value): ** double Greenwich apparent sidereal time (radians) ** ** Notes: ** ** 1) The UT1 and TT dates uta+utb and tta+ttb respectively, are both ** Julian Dates, apportioned in any convenient way between the ** argument pairs. For example, JD=2450123.7 could be expressed in ** any of these ways, among others: ** ** Part A Part B ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable (in the case of UT; the TT is not at all critical ** in this respect). The J2000 and MJD methods are good compromises ** between resolution and convenience. For UT, the date & time ** method is best matched to the algorithm that is used by the Earth ** Rotation Angle function, called internally: maximum precision is ** delivered when the uta argument is for 0hrs UT1 on the day in ** question and the utb argument lies in the range 0 to 1, or vice ** versa. ** ** 2) Both UT1 and TT are required, UT1 to predict the Earth rotation ** and TT to predict the effects of precession-nutation. If UT1 is ** used for both purposes, errors of order 100 microarcseconds ** result. ** ** 3) This GAST is compatible with the IAU 2000 resolutions and must be ** used only in conjunction with other IAU 2000 compatible ** components such as precession-nutation. ** ** 4) The result is returned in the range 0 to 2pi. ** ** 5) The algorithm is from Capitaine et al. (2003) and IERS ** Conventions 2003. ** ** Called: ** eraGmst00 Greenwich mean sidereal time, IAU 2000 ** eraEe00a equation of the equinoxes, IAU 2000A ** eraAnp normalize angle into range 0 to 2pi ** ** References: ** ** Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to ** implement the IAU 2000 definition of UT1", Astronomy & ** Astrophysics, 406, 1135-1149 (2003) ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double gmst00, ee00a, gst; gmst00 = eraGmst00(uta, utb, tta, ttb); ee00a = eraEe00a(tta, ttb); gst = eraAnp(gmst00 + ee00a); return gst; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/dat.c0000644001134200020070000002654412640262015017431 0ustar embrayscience00000000000000#include "erfa.h" int eraDat(int iy, int im, int id, double fd, double *deltat ) /* ** - - - - - - - ** e r a D a t ** - - - - - - - ** ** For a given UTC date, calculate delta(AT) = TAI-UTC. ** ** :------------------------------------------: ** : : ** : IMPORTANT : ** : : ** : A new version of this function must be : ** : produced whenever a new leap second is : ** : announced. There are four items to : ** : change on each such occasion: : ** : : ** : 1) A new line must be added to the set : ** : of statements that initialize the : ** : array "changes". : ** : : ** : 2) The constant IYV must be set to the : ** : current year. : ** : : ** : 3) The "Latest leap second" comment : ** : below must be set to the new leap : ** : second date. : ** : : ** : 4) The "This revision" comment, later, : ** : must be set to the current date. : ** : : ** : Change (2) must also be carried out : ** : whenever the function is re-issued, : ** : even if no leap seconds have been : ** : added. : ** : : ** : Latest leap second: 2015 June 30 : ** : : ** :__________________________________________: ** ** Given: ** iy int UTC: year (Notes 1 and 2) ** im int month (Note 2) ** id int day (Notes 2 and 3) ** fd double fraction of day (Note 4) ** ** Returned: ** deltat double TAI minus UTC, seconds ** ** Returned (function value): ** int status (Note 5): ** 1 = dubious year (Note 1) ** 0 = OK ** -1 = bad year ** -2 = bad month ** -3 = bad day (Note 3) ** -4 = bad fraction (Note 4) ** -5 = internal error (Note 5) ** ** Notes: ** ** 1) UTC began at 1960 January 1.0 (JD 2436934.5) and it is improper ** to call the function with an earlier date. If this is attempted, ** zero is returned together with a warning status. ** ** Because leap seconds cannot, in principle, be predicted in ** advance, a reliable check for dates beyond the valid range is ** impossible. To guard against gross errors, a year five or more ** after the release year of the present function (see the constant ** IYV) is considered dubious. In this case a warning status is ** returned but the result is computed in the normal way. ** ** For both too-early and too-late years, the warning status is +1. ** This is distinct from the error status -1, which signifies a year ** so early that JD could not be computed. ** ** 2) If the specified date is for a day which ends with a leap second, ** the UTC-TAI value returned is for the period leading up to the ** leap second. If the date is for a day which begins as a leap ** second ends, the UTC-TAI returned is for the period following the ** leap second. ** ** 3) The day number must be in the normal calendar range, for example ** 1 through 30 for April. The "almanac" convention of allowing ** such dates as January 0 and December 32 is not supported in this ** function, in order to avoid confusion near leap seconds. ** ** 4) The fraction of day is used only for dates before the ** introduction of leap seconds, the first of which occurred at the ** end of 1971. It is tested for validity (0 to 1 is the valid ** range) even if not used; if invalid, zero is used and status -4 ** is returned. For many applications, setting fd to zero is ** acceptable; the resulting error is always less than 3 ms (and ** occurs only pre-1972). ** ** 5) The status value returned in the case where there are multiple ** errors refers to the first error detected. For example, if the ** month and day are 13 and 32 respectively, status -2 (bad month) ** will be returned. The "internal error" status refers to a ** case that is impossible but causes some compilers to issue a ** warning. ** ** 6) In cases where a valid result is not available, zero is returned. ** ** References: ** ** 1) For dates from 1961 January 1 onwards, the expressions from the ** file ftp://maia.usno.navy.mil/ser7/tai-utc.dat are used. ** ** 2) The 5ms timestep at 1961 January 1 is taken from 2.58.1 (p87) of ** the 1992 Explanatory Supplement. ** ** Called: ** eraCal2jd Gregorian calendar to JD ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Release year for this version of eraDat */ enum { IYV = 2015}; /* Reference dates (MJD) and drift rates (s/day), pre leap seconds */ static const double drift[][2] = { { 37300.0, 0.0012960 }, { 37300.0, 0.0012960 }, { 37300.0, 0.0012960 }, { 37665.0, 0.0011232 }, { 37665.0, 0.0011232 }, { 38761.0, 0.0012960 }, { 38761.0, 0.0012960 }, { 38761.0, 0.0012960 }, { 38761.0, 0.0012960 }, { 38761.0, 0.0012960 }, { 38761.0, 0.0012960 }, { 38761.0, 0.0012960 }, { 39126.0, 0.0025920 }, { 39126.0, 0.0025920 } }; /* Number of Delta(AT) expressions before leap seconds were introduced */ enum { NERA1 = (int) (sizeof drift / sizeof (double) / 2) }; /* Dates and Delta(AT)s */ static const struct { int iyear, month; double delat; } changes[] = { { 1960, 1, 1.4178180 }, { 1961, 1, 1.4228180 }, { 1961, 8, 1.3728180 }, { 1962, 1, 1.8458580 }, { 1963, 11, 1.9458580 }, { 1964, 1, 3.2401300 }, { 1964, 4, 3.3401300 }, { 1964, 9, 3.4401300 }, { 1965, 1, 3.5401300 }, { 1965, 3, 3.6401300 }, { 1965, 7, 3.7401300 }, { 1965, 9, 3.8401300 }, { 1966, 1, 4.3131700 }, { 1968, 2, 4.2131700 }, { 1972, 1, 10.0 }, { 1972, 7, 11.0 }, { 1973, 1, 12.0 }, { 1974, 1, 13.0 }, { 1975, 1, 14.0 }, { 1976, 1, 15.0 }, { 1977, 1, 16.0 }, { 1978, 1, 17.0 }, { 1979, 1, 18.0 }, { 1980, 1, 19.0 }, { 1981, 7, 20.0 }, { 1982, 7, 21.0 }, { 1983, 7, 22.0 }, { 1985, 7, 23.0 }, { 1988, 1, 24.0 }, { 1990, 1, 25.0 }, { 1991, 1, 26.0 }, { 1992, 7, 27.0 }, { 1993, 7, 28.0 }, { 1994, 7, 29.0 }, { 1996, 1, 30.0 }, { 1997, 7, 31.0 }, { 1999, 1, 32.0 }, { 2006, 1, 33.0 }, { 2009, 1, 34.0 }, { 2012, 7, 35.0 }, { 2015, 7, 36.0 } }; /* Number of Delta(AT) changes */ enum { NDAT = (int) (sizeof changes / sizeof changes[0]) }; /* Miscellaneous local variables */ int j, i, m; double da, djm0, djm; /* Initialize the result to zero. */ *deltat = da = 0.0; /* If invalid fraction of a day, set error status and give up. */ if (fd < 0.0 || fd > 1.0) return -4; /* Convert the date into an MJD. */ j = eraCal2jd(iy, im, id, &djm0, &djm); /* If invalid year, month, or day, give up. */ if (j < 0) return j; /* If pre-UTC year, set warning status and give up. */ if (iy < changes[0].iyear) return 1; /* If suspiciously late year, set warning status but proceed. */ if (iy > IYV + 5) j = 1; /* Combine year and month to form a date-ordered integer... */ m = 12*iy + im; /* ...and use it to find the preceding table entry. */ for (i = NDAT-1; i >=0; i--) { if (m >= (12 * changes[i].iyear + changes[i].month)) break; } /* Prevent underflow warnings. */ if (i < 0) return -5; /* Get the Delta(AT). */ da = changes[i].delat; /* If pre-1972, adjust for drift. */ if (i < NERA1) da += (djm + fd - drift[i][0]) * drift[i][1]; /* Return the Delta(AT) value. */ *deltat = da; /* Return the status. */ return j; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/anpm.c0000644001134200020070000000670412640262015017610 0ustar embrayscience00000000000000#include "erfa.h" double eraAnpm(double a) /* ** - - - - - - - - ** e r a A n p m ** - - - - - - - - ** ** Normalize angle into the range -pi <= a < +pi. ** ** Given: ** a double angle (radians) ** ** Returned (function value): ** double angle in range +/-pi ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double w; w = fmod(a, ERFA_D2PI); if (fabs(w) >= ERFA_DPI) w -= ERFA_DSIGN(ERFA_D2PI, a); return w; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pmat76.c0000644001134200020070000001371012640262015017766 0ustar embrayscience00000000000000#include "erfa.h" void eraPmat76(double date1, double date2, double rmatp[3][3]) /* ** - - - - - - - - - - ** e r a P m a t 7 6 ** - - - - - - - - - - ** ** Precession matrix from J2000.0 to a specified date, IAU 1976 model. ** ** Given: ** date1,date2 double ending date, TT (Note 1) ** ** Returned: ** rmatp double[3][3] precession matrix, J2000.0 -> date1+date2 ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix operates in the sense V(date) = RMATP * V(J2000), ** where the p-vector V(J2000) is with respect to the mean ** equatorial triad of epoch J2000.0 and the p-vector V(date) ** is with respect to the mean equatorial triad of the given ** date. ** ** 3) Though the matrix method itself is rigorous, the precession ** angles are expressed through canonical polynomials which are ** valid only for a limited time span. In addition, the IAU 1976 ** precession rate is known to be imperfect. The absolute accuracy ** of the present formulation is better than 0.1 arcsec from ** 1960AD to 2040AD, better than 1 arcsec from 1640AD to 2360AD, ** and remains below 3 arcsec for the whole of the period ** 500BC to 3000AD. The errors exceed 10 arcsec outside the ** range 1200BC to 3900AD, exceed 100 arcsec outside 4200BC to ** 5600AD and exceed 1000 arcsec outside 6800BC to 8200AD. ** ** Called: ** eraPrec76 accumulated precession angles, IAU 1976 ** eraIr initialize r-matrix to identity ** eraRz rotate around Z-axis ** eraRy rotate around Y-axis ** eraCr copy r-matrix ** ** References: ** ** Lieske, J.H., 1979, Astron.Astrophys. 73, 282. ** equations (6) & (7), p283. ** ** Kaplan,G.H., 1981. USNO circular no. 163, pA2. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double zeta, z, theta, wmat[3][3]; /* Precession Euler angles, J2000.0 to specified date. */ eraPrec76(ERFA_DJ00, 0.0, date1, date2, &zeta, &z, &theta); /* Form the rotation matrix. */ eraIr( wmat); eraRz( -zeta, wmat); eraRy( theta, wmat); eraRz( -z, wmat); eraCr( wmat, rmatp); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/p06e.c0000644001134200020070000002756412640262015017436 0ustar embrayscience00000000000000#include "erfa.h" void eraP06e(double date1, double date2, double *eps0, double *psia, double *oma, double *bpa, double *bqa, double *pia, double *bpia, double *epsa, double *chia, double *za, double *zetaa, double *thetaa, double *pa, double *gam, double *phi, double *psi) /* ** - - - - - - - - ** e r a P 0 6 e ** - - - - - - - - ** ** Precession angles, IAU 2006, equinox based. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned (see Note 2): ** eps0 double epsilon_0 ** psia double psi_A ** oma double omega_A ** bpa double P_A ** bqa double Q_A ** pia double pi_A ** bpia double Pi_A ** epsa double obliquity epsilon_A ** chia double chi_A ** za double z_A ** zetaa double zeta_A ** thetaa double theta_A ** pa double p_A ** gam double F-W angle gamma_J2000 ** phi double F-W angle phi_J2000 ** psi double F-W angle psi_J2000 ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) This function returns the set of equinox based angles for the ** Capitaine et al. "P03" precession theory, adopted by the IAU in ** 2006. The angles are set out in Table 1 of Hilton et al. (2006): ** ** eps0 epsilon_0 obliquity at J2000.0 ** psia psi_A luni-solar precession ** oma omega_A inclination of equator wrt J2000.0 ecliptic ** bpa P_A ecliptic pole x, J2000.0 ecliptic triad ** bqa Q_A ecliptic pole -y, J2000.0 ecliptic triad ** pia pi_A angle between moving and J2000.0 ecliptics ** bpia Pi_A longitude of ascending node of the ecliptic ** epsa epsilon_A obliquity of the ecliptic ** chia chi_A planetary precession ** za z_A equatorial precession: -3rd 323 Euler angle ** zetaa zeta_A equatorial precession: -1st 323 Euler angle ** thetaa theta_A equatorial precession: 2nd 323 Euler angle ** pa p_A general precession ** gam gamma_J2000 J2000.0 RA difference of ecliptic poles ** phi phi_J2000 J2000.0 codeclination of ecliptic pole ** psi psi_J2000 longitude difference of equator poles, J2000.0 ** ** The returned values are all radians. ** ** 3) Hilton et al. (2006) Table 1 also contains angles that depend on ** models distinct from the P03 precession theory itself, namely the ** IAU 2000A frame bias and nutation. The quoted polynomials are ** used in other ERFA functions: ** ** . eraXy06 contains the polynomial parts of the X and Y series. ** ** . eraS06 contains the polynomial part of the s+XY/2 series. ** ** . eraPfw06 implements the series for the Fukushima-Williams ** angles that are with respect to the GCRS pole (i.e. the variants ** that include frame bias). ** ** 4) The IAU resolution stipulated that the choice of parameterization ** was left to the user, and so an IAU compliant precession ** implementation can be constructed using various combinations of ** the angles returned by the present function. ** ** 5) The parameterization used by ERFA is the version of the Fukushima- ** Williams angles that refers directly to the GCRS pole. These ** angles may be calculated by calling the function eraPfw06. ERFA ** also supports the direct computation of the CIP GCRS X,Y by ** series, available by calling eraXy06. ** ** 6) The agreement between the different parameterizations is at the ** 1 microarcsecond level in the present era. ** ** 7) When constructing a precession formulation that refers to the GCRS ** pole rather than the dynamical pole, it may (depending on the ** choice of angles) be necessary to introduce the frame bias ** explicitly. ** ** 8) It is permissible to re-use the same variable in the returned ** arguments. The quantities are stored in the stated order. ** ** Reference: ** ** Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351 ** ** Called: ** eraObl06 mean obliquity, IAU 2006 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t; /* Interval between fundamental date J2000.0 and given date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* Obliquity at J2000.0. */ *eps0 = 84381.406 * ERFA_DAS2R; /* Luni-solar precession. */ *psia = ( 5038.481507 + ( -1.0790069 + ( -0.00114045 + ( 0.000132851 + ( -0.0000000951 ) * t) * t) * t) * t) * t * ERFA_DAS2R; /* Inclination of mean equator with respect to the J2000.0 ecliptic. */ *oma = *eps0 + ( -0.025754 + ( 0.0512623 + ( -0.00772503 + ( -0.000000467 + ( 0.0000003337 ) * t) * t) * t) * t) * t * ERFA_DAS2R; /* Ecliptic pole x, J2000.0 ecliptic triad. */ *bpa = ( 4.199094 + ( 0.1939873 + ( -0.00022466 + ( -0.000000912 + ( 0.0000000120 ) * t) * t) * t) * t) * t * ERFA_DAS2R; /* Ecliptic pole -y, J2000.0 ecliptic triad. */ *bqa = ( -46.811015 + ( 0.0510283 + ( 0.00052413 + ( -0.000000646 + ( -0.0000000172 ) * t) * t) * t) * t) * t * ERFA_DAS2R; /* Angle between moving and J2000.0 ecliptics. */ *pia = ( 46.998973 + ( -0.0334926 + ( -0.00012559 + ( 0.000000113 + ( -0.0000000022 ) * t) * t) * t) * t) * t * ERFA_DAS2R; /* Longitude of ascending node of the moving ecliptic. */ *bpia = ( 629546.7936 + ( -867.95758 + ( 0.157992 + ( -0.0005371 + ( -0.00004797 + ( 0.000000072 ) * t) * t) * t) * t) * t) * ERFA_DAS2R; /* Mean obliquity of the ecliptic. */ *epsa = eraObl06(date1, date2); /* Planetary precession. */ *chia = ( 10.556403 + ( -2.3814292 + ( -0.00121197 + ( 0.000170663 + ( -0.0000000560 ) * t) * t) * t) * t) * t * ERFA_DAS2R; /* Equatorial precession: minus the third of the 323 Euler angles. */ *za = ( -2.650545 + ( 2306.077181 + ( 1.0927348 + ( 0.01826837 + ( -0.000028596 + ( -0.0000002904 ) * t) * t) * t) * t) * t) * ERFA_DAS2R; /* Equatorial precession: minus the first of the 323 Euler angles. */ *zetaa = ( 2.650545 + ( 2306.083227 + ( 0.2988499 + ( 0.01801828 + ( -0.000005971 + ( -0.0000003173 ) * t) * t) * t) * t) * t) * ERFA_DAS2R; /* Equatorial precession: second of the 323 Euler angles. */ *thetaa = ( 2004.191903 + ( -0.4294934 + ( -0.04182264 + ( -0.000007089 + ( -0.0000001274 ) * t) * t) * t) * t) * t * ERFA_DAS2R; /* General precession. */ *pa = ( 5028.796195 + ( 1.1054348 + ( 0.00007964 + ( -0.000023857 + ( 0.0000000383 ) * t) * t) * t) * t) * t * ERFA_DAS2R; /* Fukushima-Williams angles for precession. */ *gam = ( 10.556403 + ( 0.4932044 + ( -0.00031238 + ( -0.000002788 + ( 0.0000000260 ) * t) * t) * t) * t) * t * ERFA_DAS2R; *phi = *eps0 + ( -46.811015 + ( 0.0511269 + ( 0.00053289 + ( -0.000000440 + ( -0.0000000176 ) * t) * t) * t) * t) * t * ERFA_DAS2R; *psi = ( 5038.481507 + ( 1.5584176 + ( -0.00018522 + ( -0.000026452 + ( -0.0000000148 ) * t) * t) * t) * t) * t * ERFA_DAS2R; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pn00.c0000644001134200020070000001700112640262015017422 0ustar embrayscience00000000000000#include "erfa.h" void eraPn00(double date1, double date2, double dpsi, double deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]) /* ** - - - - - - - - ** e r a P n 0 0 ** - - - - - - - - ** ** Precession-nutation, IAU 2000 model: a multi-purpose function, ** supporting classical (equinox-based) use directly and CIO-based ** use indirectly. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** dpsi,deps double nutation (Note 2) ** ** Returned: ** epsa double mean obliquity (Note 3) ** rb double[3][3] frame bias matrix (Note 4) ** rp double[3][3] precession matrix (Note 5) ** rbp double[3][3] bias-precession matrix (Note 6) ** rn double[3][3] nutation matrix (Note 7) ** rbpn double[3][3] GCRS-to-true matrix (Note 8) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The caller is responsible for providing the nutation components; ** they are in longitude and obliquity, in radians and are with ** respect to the equinox and ecliptic of date. For high-accuracy ** applications, free core nutation should be included as well as ** any other relevant corrections to the position of the CIP. ** ** 3) The returned mean obliquity is consistent with the IAU 2000 ** precession-nutation models. ** ** 4) The matrix rb transforms vectors from GCRS to J2000.0 mean ** equator and equinox by applying frame bias. ** ** 5) The matrix rp transforms vectors from J2000.0 mean equator and ** equinox to mean equator and equinox of date by applying ** precession. ** ** 6) The matrix rbp transforms vectors from GCRS to mean equator and ** equinox of date by applying frame bias then precession. It is ** the product rp x rb. ** ** 7) The matrix rn transforms vectors from mean equator and equinox of ** date to true equator and equinox of date by applying the nutation ** (luni-solar + planetary). ** ** 8) The matrix rbpn transforms vectors from GCRS to true equator and ** equinox of date. It is the product rn x rbp, applying frame ** bias, precession and nutation in that order. ** ** 9) It is permissible to re-use the same array in the returned ** arguments. The arrays are filled in the order given. ** ** Called: ** eraPr00 IAU 2000 precession adjustments ** eraObl80 mean obliquity, IAU 1980 ** eraBp00 frame bias and precession matrices, IAU 2000 ** eraCr copy r-matrix ** eraNumat form nutation matrix ** eraRxr product of two r-matrices ** ** Reference: ** ** Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., ** "Expressions for the Celestial Intermediate Pole and Celestial ** Ephemeris Origin consistent with the IAU 2000A precession- ** nutation model", Astron.Astrophys. 400, 1145-1154 (2003) ** ** n.b. The celestial ephemeris origin (CEO) was renamed "celestial ** intermediate origin" (CIO) by IAU 2006 Resolution 2. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dpsipr, depspr, rbpw[3][3], rnw[3][3]; /* IAU 2000 precession-rate adjustments. */ eraPr00(date1, date2, &dpsipr, &depspr); /* Mean obliquity, consistent with IAU 2000 precession-nutation. */ *epsa = eraObl80(date1, date2) + depspr; /* Frame bias and precession matrices and their product. */ eraBp00(date1, date2, rb, rp, rbpw); eraCr(rbpw, rbp); /* Nutation matrix. */ eraNumat(*epsa, dpsi, deps, rnw); eraCr(rnw, rn); /* Bias-precession-nutation matrix (classical). */ eraRxr(rnw, rbpw, rbpn); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pdp.c0000644001134200020070000000671112640262015017436 0ustar embrayscience00000000000000#include "erfa.h" double eraPdp(double a[3], double b[3]) /* ** - - - - - - - ** e r a P d p ** - - - - - - - ** ** p-vector inner (=scalar=dot) product. ** ** Given: ** a double[3] first p-vector ** b double[3] second p-vector ** ** Returned (function value): ** double a . b ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double w; w = a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; return w; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pvxpv.c0000644001134200020070000001041312640262015020030 0ustar embrayscience00000000000000#include "erfa.h" void eraPvxpv(double a[2][3], double b[2][3], double axb[2][3]) /* ** - - - - - - - - - ** e r a P v x p v ** - - - - - - - - - ** ** Outer (=vector=cross) product of two pv-vectors. ** ** Given: ** a double[2][3] first pv-vector ** b double[2][3] second pv-vector ** ** Returned: ** axb double[2][3] a x b ** ** Notes: ** ** 1) If the position and velocity components of the two pv-vectors are ** ( ap, av ) and ( bp, bv ), the result, a x b, is the pair of ** vectors ( ap x bp, ap x bv + av x bp ). The two vectors are the ** cross-product of the two p-vectors and its derivative. ** ** 2) It is permissible to re-use the same array for any of the ** arguments. ** ** Called: ** eraCpv copy pv-vector ** eraPxp vector product of two p-vectors ** eraPpp p-vector plus p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double wa[2][3], wb[2][3], axbd[3], adxb[3]; /* Make copies of the inputs. */ eraCpv(a, wa); eraCpv(b, wb); /* a x b = position part of result. */ eraPxp(wa[0], wb[0], axb[0]); /* a x bdot + adot x b = velocity part of result. */ eraPxp(wa[0], wb[1], axbd); eraPxp(wa[1], wb[0], adxb); eraPpp(axbd, adxb, axb[1]); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/apcg.c0000644001134200020070000001703112640262015017562 0ustar embrayscience00000000000000#include "erfa.h" void eraApcg(double date1, double date2, double ebpv[2][3], double ehp[3], eraASTROM *astrom) /* ** - - - - - - - - ** e r a A p c g ** - - - - - - - - ** ** For a geocentric observer, prepare star-independent astrometry ** parameters for transformations between ICRS and GCRS coordinates. ** The Earth ephemeris is supplied by the caller. ** ** The parameters produced by this function are required in the ** parallax, light deflection and aberration parts of the astrometric ** transformation chain. ** ** Given: ** date1 double TDB as a 2-part... ** date2 double ...Julian Date (Note 1) ** ebpv double[2][3] Earth barycentric pos/vel (au, au/day) ** ehp double[3] Earth heliocentric position (au) ** ** Returned: ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double unchanged ** xpl double unchanged ** ypl double unchanged ** sphi double unchanged ** cphi double unchanged ** diurab double unchanged ** eral double unchanged ** refa double unchanged ** refb double unchanged ** ** Notes: ** ** 1) The TDB date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TDB)=2450123.7 could be expressed in any of these ways, among ** others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 method is best matched to the way the ** argument is handled internally and will deliver the optimum ** resolution. The MJD method and the date & time methods are both ** good compromises between resolution and convenience. For most ** applications of this function the choice will not be at all ** critical. ** ** TT can be used instead of TDB without any significant impact on ** accuracy. ** ** 2) All the vectors are with respect to BCRS axes. ** ** 3) This is one of several functions that inserts into the astrom ** structure star-independent parameters needed for the chain of ** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. ** ** The various functions support different classes of observer and ** portions of the transformation chain: ** ** functions observer transformation ** ** eraApcg eraApcg13 geocentric ICRS <-> GCRS ** eraApci eraApci13 terrestrial ICRS <-> CIRS ** eraApco eraApco13 terrestrial ICRS <-> observed ** eraApcs eraApcs13 space ICRS <-> GCRS ** eraAper eraAper13 terrestrial update Earth rotation ** eraApio eraApio13 terrestrial CIRS <-> observed ** ** Those with names ending in "13" use contemporary ERFA models to ** compute the various ephemerides. The others accept ephemerides ** supplied by the caller. ** ** The transformation from ICRS to GCRS covers space motion, ** parallax, light deflection, and aberration. From GCRS to CIRS ** comprises frame bias and precession-nutation. From CIRS to ** observed takes account of Earth rotation, polar motion, diurnal ** aberration and parallax (unless subsumed into the ICRS <-> GCRS ** transformation), and atmospheric refraction. ** ** 4) The context structure astrom produced by this function is used by ** eraAtciq* and eraAticq*. ** ** Called: ** eraApcs astrometry parameters, ICRS-GCRS, space observer ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Geocentric observer */ double pv[2][3] = { { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 } }; /* Compute the star-independent astrometry parameters. */ eraApcs(date1, date2, pv, ebpv, ehp, astrom); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pmpx.c0000644001134200020070000001276512640262015017645 0ustar embrayscience00000000000000#include "erfa.h" void eraPmpx(double rc, double dc, double pr, double pd, double px, double rv, double pmt, double pob[3], double pco[3]) /* ** - - - - - - - - ** e r a P m p x ** - - - - - - - - ** ** Proper motion and parallax. ** ** Given: ** rc,dc double ICRS RA,Dec at catalog epoch (radians) ** pr double RA proper motion (radians/year; Note 1) ** pd double Dec proper motion (radians/year) ** px double parallax (arcsec) ** rv double radial velocity (km/s, +ve if receding) ** pmt double proper motion time interval (SSB, Julian years) ** pob double[3] SSB to observer vector (au) ** ** Returned: ** pco double[3] coordinate direction (BCRS unit vector) ** ** Notes: ** ** 1) The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt. ** ** 2) The proper motion time interval is for when the starlight ** reaches the solar system barycenter. ** ** 3) To avoid the need for iteration, the Roemer effect (i.e. the ** small annual modulation of the proper motion coming from the ** changing light time) is applied approximately, using the ** direction of the star at the catalog epoch. ** ** References: ** ** 1984 Astronomical Almanac, pp B39-B41. ** ** Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to ** the Astronomical Almanac, 3rd ed., University Science Books ** (2013), Section 7.2. ** ** Called: ** eraPdp scalar product of two p-vectors ** eraPn decompose p-vector into modulus and direction ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Km/s to au/year */ const double VF = ERFA_DAYSEC*ERFA_DJM/ERFA_DAU; /* Light time for 1 au, Julian years */ const double AULTY = ERFA_AULT/ERFA_DAYSEC/ERFA_DJY; int i; double sr, cr, sd, cd, x, y, z, p[3], dt, pxr, w, pdz, pm[3]; /* Spherical coordinates to unit vector (and useful functions). */ sr = sin(rc); cr = cos(rc); sd = sin(dc); cd = cos(dc); p[0] = x = cr*cd; p[1] = y = sr*cd; p[2] = z = sd; /* Proper motion time interval (y) including Roemer effect. */ dt = pmt + eraPdp(p,pob)*AULTY; /* Space motion (radians per year). */ pxr = px * ERFA_DAS2R; w = VF * rv * pxr; pdz = pd * z; pm[0] = - pr*y - pdz*cr + w*x; pm[1] = pr*x - pdz*sr + w*y; pm[2] = pd*cd + w*z; /* Coordinate direction of star (unit vector, BCRS). */ for (i = 0; i < 3; i++) { p[i] += dt*pm[i] - pxr*pob[i]; } eraPn(p, &w, pco); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2t06a.c0000644001134200020070000001455112640262015017653 0ustar embrayscience00000000000000#include "erfa.h" void eraC2t06a(double tta, double ttb, double uta, double utb, double xp, double yp, double rc2t[3][3]) /* ** - - - - - - - - - - ** e r a C 2 t 0 6 a ** - - - - - - - - - - ** ** Form the celestial to terrestrial matrix given the date, the UT1 and ** the polar motion, using the IAU 2006 precession and IAU 2000A ** nutation models. ** ** Given: ** tta,ttb double TT as a 2-part Julian Date (Note 1) ** uta,utb double UT1 as a 2-part Julian Date (Note 1) ** xp,yp double coordinates of the pole (radians, Note 2) ** ** Returned: ** rc2t double[3][3] celestial-to-terrestrial matrix (Note 3) ** ** Notes: ** ** 1) The TT and UT1 dates tta+ttb and uta+utb are Julian Dates, ** apportioned in any convenient way between the arguments uta and ** utb. For example, JD(UT1)=2450123.7 could be expressed in any of ** these ways, among others: ** ** uta utb ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution is ** acceptable. The J2000 and MJD methods are good compromises ** between resolution and convenience. In the case of uta,utb, the ** date & time method is best matched to the Earth rotation angle ** algorithm used: maximum precision is delivered when the uta ** argument is for 0hrs UT1 on the day in question and the utb ** argument lies in the range 0 to 1, or vice versa. ** ** 2) The arguments xp and yp are the coordinates (in radians) of the ** Celestial Intermediate Pole with respect to the International ** Terrestrial Reference System (see IERS Conventions 2003), ** measured along the meridians to 0 and 90 deg west respectively. ** ** 3) The matrix rc2t transforms from celestial to terrestrial ** coordinates: ** ** [TRS] = RPOM * R_3(ERA) * RC2I * [CRS] ** ** = rc2t * [CRS] ** ** where [CRS] is a vector in the Geocentric Celestial Reference ** System and [TRS] is a vector in the International Terrestrial ** Reference System (see IERS Conventions 2003), RC2I is the ** celestial-to-intermediate matrix, ERA is the Earth rotation ** angle and RPOM is the polar motion matrix. ** ** Called: ** eraC2i06a celestial-to-intermediate matrix, IAU 2006/2000A ** eraEra00 Earth rotation angle, IAU 2000 ** eraSp00 the TIO locator s', IERS 2000 ** eraPom00 polar motion matrix ** eraC2tcio form CIO-based celestial-to-terrestrial matrix ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003), ** IERS Technical Note No. 32, BKG ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rc2i[3][3], era, sp, rpom[3][3]; /* Form the celestial-to-intermediate matrix for this TT. */ eraC2i06a(tta, ttb, rc2i); /* Predict the Earth rotation angle for this UT1. */ era = eraEra00(uta, utb); /* Estimate s'. */ sp = eraSp00(tta, ttb); /* Form the polar motion matrix. */ eraPom00(xp, yp, sp, rpom); /* Combine to form the celestial-to-terrestrial matrix. */ eraC2tcio(rc2i, era, rpom, rc2t); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/atoc13.c0000644001134200020070000002445412640262015017751 0ustar embrayscience00000000000000#include "erfa.h" int eraAtoc13(const char *type, double ob1, double ob2, double utc1, double utc2, double dut1, double elong, double phi, double hm, double xp, double yp, double phpa, double tc, double rh, double wl, double *rc, double *dc) /* ** - - - - - - - - - - ** e r a A t o c 1 3 ** - - - - - - - - - - ** ** Observed place at a groundbased site to to ICRS astrometric RA,Dec. ** The caller supplies UTC, site coordinates, ambient air conditions ** and observing wavelength. ** ** Given: ** type char[] type of coordinates - "R", "H" or "A" (Notes 1,2) ** ob1 double observed Az, HA or RA (radians; Az is N=0,E=90) ** ob2 double observed ZD or Dec (radians) ** utc1 double UTC as a 2-part... ** utc2 double ...quasi Julian Date (Notes 3,4) ** dut1 double UT1-UTC (seconds, Note 5) ** elong double longitude (radians, east +ve, Note 6) ** phi double geodetic latitude (radians, Note 6) ** hm double height above ellipsoid (m, geodetic Notes 6,8) ** xp,yp double polar motion coordinates (radians, Note 7) ** phpa double pressure at the observer (hPa = mB, Note 8) ** tc double ambient temperature at the observer (deg C) ** rh double relative humidity at the observer (range 0-1) ** wl double wavelength (micrometers, Note 9) ** ** Returned: ** rc,dc double ICRS astrometric RA,Dec (radians) ** ** Returned (function value): ** int status: +1 = dubious year (Note 4) ** 0 = OK ** -1 = unacceptable date ** ** Notes: ** ** 1) "Observed" Az,ZD means the position that would be seen by a ** perfect geodetically aligned theodolite. (Zenith distance is ** used rather than altitude in order to reflect the fact that no ** allowance is made for depression of the horizon.) This is ** related to the observed HA,Dec via the standard rotation, using ** the geodetic latitude (corrected for polar motion), while the ** observed HA and RA are related simply through the Earth rotation ** angle and the site longitude. "Observed" RA,Dec or HA,Dec thus ** means the position that would be seen by a perfect equatorial ** with its polar axis aligned to the Earth's axis of rotation. ** ** 2) Only the first character of the type argument is significant. ** "R" or "r" indicates that ob1 and ob2 are the observed right ** ascension and declination; "H" or "h" indicates that they are ** hour angle (west +ve) and declination; anything else ("A" or ** "a" is recommended) indicates that ob1 and ob2 are azimuth ** (north zero, east 90 deg) and zenith distance. ** ** 3) utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any ** convenient way between the two arguments, for example where utc1 ** is the Julian Day Number and utc2 is the fraction of a day. ** ** However, JD cannot unambiguously represent UTC during a leap ** second unless special measures are taken. The convention in the ** present function is that the JD day represents UTC days whether ** the length is 86399, 86400 or 86401 SI seconds. ** ** Applications should use the function eraDtf2d to convert from ** calendar date and time of day into 2-part quasi Julian Date, as ** it implements the leap-second-ambiguity convention just ** described. ** ** 4) The warning status "dubious year" flags UTCs that predate the ** introduction of the time scale or that are too far in the ** future to be trusted. See eraDat for further details. ** ** 5) UT1-UTC is tabulated in IERS bulletins. It increases by exactly ** one second at the end of each positive UTC leap second, ** introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This ** practice is under review, and in the future UT1-UTC may grow ** essentially without limit. ** ** 6) The geographical coordinates are with respect to the ERFA_WGS84 ** reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the ** longitude required by the present function is east-positive ** (i.e. right-handed), in accordance with geographical convention. ** ** 7) The polar motion xp,yp can be obtained from IERS bulletins. The ** values are the coordinates (in radians) of the Celestial ** Intermediate Pole with respect to the International Terrestrial ** Reference System (see IERS Conventions 2003), measured along the ** meridians 0 and 90 deg west respectively. For many ** applications, xp and yp can be set to zero. ** ** 8) If hm, the height above the ellipsoid of the observing station ** in meters, is not known but phpa, the pressure in hPa (=mB), is ** available, an adequate estimate of hm can be obtained from the ** expression ** ** hm = -29.3 * tsl * log ( phpa / 1013.25 ); ** ** where tsl is the approximate sea-level air temperature in K ** (See Astrophysical Quantities, C.W.Allen, 3rd edition, section ** 52). Similarly, if the pressure phpa is not known, it can be ** estimated from the height of the observing station, hm, as ** follows: ** ** phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) ); ** ** Note, however, that the refraction is nearly proportional to ** the pressure and that an accurate phpa value is important for ** precise work. ** ** 9) The argument wl specifies the observing wavelength in ** micrometers. The transition from optical to radio is assumed to ** occur at 100 micrometers (about 3000 GHz). ** ** 10) The accuracy of the result is limited by the corrections for ** refraction, which use a simple A*tan(z) + B*tan^3(z) model. ** Providing the meteorological parameters are known accurately and ** there are no gross local effects, the predicted astrometric ** coordinates should be within 0.05 arcsec (optical) or 1 arcsec ** (radio) for a zenith distance of less than 70 degrees, better ** than 30 arcsec (optical or radio) at 85 degrees and better ** than 20 arcmin (optical) or 30 arcmin (radio) at the horizon. ** ** Without refraction, the complementary functions eraAtco13 and ** eraAtoc13 are self-consistent to better than 1 microarcsecond ** all over the celestial sphere. With refraction included, ** consistency falls off at high zenith distances, but is still ** better than 0.05 arcsec at 85 degrees. ** ** 11) It is advisable to take great care with units, as even unlikely ** values of the input parameters are accepted and processed in ** accordance with the models used. ** ** Called: ** eraApco13 astrometry parameters, ICRS-observed ** eraAtoiq quick observed to CIRS ** eraAticq quick CIRS to ICRS ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int j; eraASTROM astrom; double eo, ri, di; /* Star-independent astrometry parameters. */ j = eraApco13(utc1, utc2, dut1, elong, phi, hm, xp, yp, phpa, tc, rh, wl, &astrom, &eo); /* Abort if bad UTC. */ if ( j < 0 ) return j; /* Transform observed to CIRS. */ eraAtoiq(type, ob1, ob2, &astrom, &ri, &di); /* Transform CIRS to ICRS. */ eraAticq(ri, di, &astrom, rc, dc); /* Return OK/warning status. */ return j; /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ee06a.c0000644001134200020070000001206012640262015017545 0ustar embrayscience00000000000000#include "erfa.h" double eraEe06a(double date1, double date2) /* ** - - - - - - - - - ** e r a E e 0 6 a ** - - - - - - - - - ** ** Equation of the equinoxes, compatible with IAU 2000 resolutions and ** IAU 2006/2000A precession-nutation. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned (function value): ** double equation of the equinoxes (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The result, which is in radians, operates in the following sense: ** ** Greenwich apparent ST = GMST + equation of the equinoxes ** ** Called: ** eraAnpm normalize angle into range +/- pi ** eraGst06a Greenwich apparent sidereal time, IAU 2006/2000A ** eraGmst06 Greenwich mean sidereal time, IAU 2006 ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003), ** IERS Technical Note No. 32, BKG ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double gst06a, gmst06, ee; /* Apparent and mean sidereal times. */ gst06a = eraGst06a(0.0, 0.0, date1, date2); gmst06 = eraGmst06(0.0, 0.0, date1, date2); /* Equation of the equinoxes. */ ee = eraAnpm(gst06a - gmst06); return ee; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/s2c.c0000644001134200020070000000701212640262015017335 0ustar embrayscience00000000000000#include "erfa.h" void eraS2c(double theta, double phi, double c[3]) /* ** - - - - - - - ** e r a S 2 c ** - - - - - - - ** ** Convert spherical coordinates to Cartesian. ** ** Given: ** theta double longitude angle (radians) ** phi double latitude angle (radians) ** ** Returned: ** c double[3] direction cosines ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double cp; cp = cos(phi); c[0] = cos(theta) * cp; c[1] = sin(theta) * cp; c[2] = sin(phi); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/tf2a.c0000644001134200020070000001077312640262015017512 0ustar embrayscience00000000000000#include "erfa.h" #include int eraTf2a(char s, int ihour, int imin, double sec, double *rad) /* ** - - - - - - - - ** e r a T f 2 a ** - - - - - - - - ** ** Convert hours, minutes, seconds to radians. ** ** Given: ** s char sign: '-' = negative, otherwise positive ** ihour int hours ** imin int minutes ** sec double seconds ** ** Returned: ** rad double angle in radians ** ** Returned (function value): ** int status: 0 = OK ** 1 = ihour outside range 0-23 ** 2 = imin outside range 0-59 ** 3 = sec outside range 0-59.999... ** ** Notes: ** ** 1) The result is computed even if any of the range checks fail. ** ** 2) Negative ihour, imin and/or sec produce a warning status, but ** the absolute value is used in the conversion. ** ** 3) If there are multiple errors, the status value reflects only the ** first, the smallest taking precedence. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Compute the interval. */ *rad = ( s == '-' ? -1.0 : 1.0 ) * ( 60.0 * ( 60.0 * ( (double) abs(ihour) ) + ( (double) abs(imin) ) ) + fabs(sec) ) * ERFA_DS2R; /* Validate arguments and return status. */ if ( ihour < 0 || ihour > 23 ) return 1; if ( imin < 0 || imin > 59 ) return 2; if ( sec < 0.0 || sec >= 60.0 ) return 3; return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/tcbtdb.c0000644001134200020070000001266512640262015020122 0ustar embrayscience00000000000000#include "erfa.h" int eraTcbtdb(double tcb1, double tcb2, double *tdb1, double *tdb2) /* ** - - - - - - - - - - ** e r a T c b t d b ** - - - - - - - - - - ** ** Time scale transformation: Barycentric Coordinate Time, TCB, to ** Barycentric Dynamical Time, TDB. ** ** Given: ** tcb1,tcb2 double TCB as a 2-part Julian Date ** ** Returned: ** tdb1,tdb2 double TDB as a 2-part Julian Date ** ** Returned (function value): ** int status: 0 = OK ** ** Notes: ** ** 1) tcb1+tcb2 is Julian Date, apportioned in any convenient way ** between the two arguments, for example where tcb1 is the Julian ** Day Number and tcb2 is the fraction of a day. The returned ** tdb1,tdb2 follow suit. ** ** 2) The 2006 IAU General Assembly introduced a conventional linear ** transformation between TDB and TCB. This transformation ** compensates for the drift between TCB and terrestrial time TT, ** and keeps TDB approximately centered on TT. Because the ** relationship between TT and TCB depends on the adopted solar ** system ephemeris, the degree of alignment between TDB and TT over ** long intervals will vary according to which ephemeris is used. ** Former definitions of TDB attempted to avoid this problem by ** stipulating that TDB and TT should differ only by periodic ** effects. This is a good description of the nature of the ** relationship but eluded precise mathematical formulation. The ** conventional linear relationship adopted in 2006 sidestepped ** these difficulties whilst delivering a TDB that in practice was ** consistent with values before that date. ** ** 3) TDB is essentially the same as Teph, the time argument for the ** JPL solar system ephemerides. ** ** Reference: ** ** IAU 2006 Resolution B3 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */ static const double t77td = ERFA_DJM0 + ERFA_DJM77; static const double t77tf = ERFA_TTMTAI/ERFA_DAYSEC; /* TDB (days) at TAI 1977 Jan 1.0 */ static const double tdb0 = ERFA_TDB0/ERFA_DAYSEC; double d; /* Result, safeguarding precision. */ if ( tcb1 > tcb2 ) { d = tcb1 - t77td; *tdb1 = tcb1; *tdb2 = tcb2 + tdb0 - ( d + ( tcb2 - t77tf ) ) * ERFA_ELB; } else { d = tcb2 - t77td; *tdb1 = tcb1 + tdb0 - ( d + ( tcb1 - t77tf ) ) * ERFA_ELB; *tdb2 = tcb2; } /* Status (always OK). */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/h2fk5.c0000644001134200020070000001400212640262015017562 0ustar embrayscience00000000000000#include "erfa.h" void eraH2fk5(double rh, double dh, double drh, double ddh, double pxh, double rvh, double *r5, double *d5, double *dr5, double *dd5, double *px5, double *rv5) /* ** - - - - - - - - - ** e r a H 2 f k 5 ** - - - - - - - - - ** ** Transform Hipparcos star data into the FK5 (J2000.0) system. ** ** Given (all Hipparcos, epoch J2000.0): ** rh double RA (radians) ** dh double Dec (radians) ** drh double proper motion in RA (dRA/dt, rad/Jyear) ** ddh double proper motion in Dec (dDec/dt, rad/Jyear) ** pxh double parallax (arcsec) ** rvh double radial velocity (km/s, positive = receding) ** ** Returned (all FK5, equinox J2000.0, epoch J2000.0): ** r5 double RA (radians) ** d5 double Dec (radians) ** dr5 double proper motion in RA (dRA/dt, rad/Jyear) ** dd5 double proper motion in Dec (dDec/dt, rad/Jyear) ** px5 double parallax (arcsec) ** rv5 double radial velocity (km/s, positive = receding) ** ** Notes: ** ** 1) This function transforms Hipparcos star positions and proper ** motions into FK5 J2000.0. ** ** 2) The proper motions in RA are dRA/dt rather than ** cos(Dec)*dRA/dt, and are per year rather than per century. ** ** 3) The FK5 to Hipparcos transformation is modeled as a pure ** rotation and spin; zonal errors in the FK5 catalog are not ** taken into account. ** ** 4) See also eraFk52h, eraFk5hz, eraHfk5z. ** ** Called: ** eraStarpv star catalog data to space motion pv-vector ** eraFk5hip FK5 to Hipparcos rotation and spin ** eraRv2m r-vector to r-matrix ** eraRxp product of r-matrix and p-vector ** eraTrxp product of transpose of r-matrix and p-vector ** eraPxp vector product of two p-vectors ** eraPmp p-vector minus p-vector ** eraPvstar space motion pv-vector to star catalog data ** ** Reference: ** ** F.Mignard & M.Froeschle, Astron. Astrophys. 354, 732-739 (2000). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int i; double pvh[2][3], r5h[3][3], s5h[3], sh[3], wxp[3], vv[3], pv5[2][3]; /* Hipparcos barycentric position/velocity pv-vector (normalized). */ eraStarpv(rh, dh, drh, ddh, pxh, rvh, pvh); /* FK5 to Hipparcos orientation matrix and spin vector. */ eraFk5hip(r5h, s5h); /* Make spin units per day instead of per year. */ for ( i = 0; i < 3; s5h[i++] /= 365.25 ); /* Orient the spin into the Hipparcos system. */ eraRxp(r5h, s5h, sh); /* De-orient the Hipparcos position into the FK5 system. */ eraTrxp(r5h, pvh[0], pv5[0]); /* Apply spin to the position giving an extra space motion component. */ eraPxp(pvh[0], sh, wxp); /* Subtract this component from the Hipparcos space motion. */ eraPmp(pvh[1], wxp, vv); /* De-orient the Hipparcos space motion into the FK5 system. */ eraTrxp(r5h, vv, pv5[1]); /* FK5 pv-vector to spherical. */ eraPvstar(pv5, r5, d5, dr5, dd5, px5, rv5); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pv2s.c0000644001134200020070000001240612640262015017543 0ustar embrayscience00000000000000#include "erfa.h" void eraPv2s(double pv[2][3], double *theta, double *phi, double *r, double *td, double *pd, double *rd) /* ** - - - - - - - - ** e r a P v 2 s ** - - - - - - - - ** ** Convert position/velocity from Cartesian to spherical coordinates. ** ** Given: ** pv double[2][3] pv-vector ** ** Returned: ** theta double longitude angle (radians) ** phi double latitude angle (radians) ** r double radial distance ** td double rate of change of theta ** pd double rate of change of phi ** rd double rate of change of r ** ** Notes: ** ** 1) If the position part of pv is null, theta, phi, td and pd ** are indeterminate. This is handled by extrapolating the ** position through unit time by using the velocity part of ** pv. This moves the origin without changing the direction ** of the velocity component. If the position and velocity ** components of pv are both null, zeroes are returned for all ** six results. ** ** 2) If the position is a pole, theta, td and pd are indeterminate. ** In such cases zeroes are returned for all three. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double x, y, z, xd, yd, zd, rxy2, rxy, r2, rtrue, rw, xyp; /* Components of position/velocity vector. */ x = pv[0][0]; y = pv[0][1]; z = pv[0][2]; xd = pv[1][0]; yd = pv[1][1]; zd = pv[1][2]; /* Component of r in XY plane squared. */ rxy2 = x*x + y*y; /* Modulus squared. */ r2 = rxy2 + z*z; /* Modulus. */ rtrue = sqrt(r2); /* If null vector, move the origin along the direction of movement. */ rw = rtrue; if (rtrue == 0.0) { x = xd; y = yd; z = zd; rxy2 = x*x + y*y; r2 = rxy2 + z*z; rw = sqrt(r2); } /* Position and velocity in spherical coordinates. */ rxy = sqrt(rxy2); xyp = x*xd + y*yd; if (rxy2 != 0.0) { *theta = atan2(y, x); *phi = atan2(z, rxy); *td = (x*yd - y*xd) / rxy2; *pd = (zd*rxy2 - z*xyp) / (r2*rxy); } else { *theta = 0.0; *phi = (z != 0.0) ? atan2(z, rxy) : 0.0; *td = 0.0; *pd = 0.0; } *r = rtrue; *rd = (rw != 0.0) ? (xyp + z*zd) / rw : 0.0; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2teqx.c0000644001134200020070000001213412640262015020055 0ustar embrayscience00000000000000#include "erfa.h" void eraC2teqx(double rbpn[3][3], double gst, double rpom[3][3], double rc2t[3][3]) /* ** - - - - - - - - - - ** e r a C 2 t e q x ** - - - - - - - - - - ** ** Assemble the celestial to terrestrial matrix from equinox-based ** components (the celestial-to-true matrix, the Greenwich Apparent ** Sidereal Time and the polar motion matrix). ** ** Given: ** rbpn double[3][3] celestial-to-true matrix ** gst double Greenwich (apparent) Sidereal Time (radians) ** rpom double[3][3] polar-motion matrix ** ** Returned: ** rc2t double[3][3] celestial-to-terrestrial matrix (Note 2) ** ** Notes: ** ** 1) This function constructs the rotation matrix that transforms ** vectors in the celestial system into vectors in the terrestrial ** system. It does so starting from precomputed components, namely ** the matrix which rotates from celestial coordinates to the ** true equator and equinox of date, the Greenwich Apparent Sidereal ** Time and the polar motion matrix. One use of the present function ** is when generating a series of celestial-to-terrestrial matrices ** where only the Sidereal Time changes, avoiding the considerable ** overhead of recomputing the precession-nutation more often than ** necessary to achieve given accuracy objectives. ** ** 2) The relationship between the arguments is as follows: ** ** [TRS] = rpom * R_3(gst) * rbpn * [CRS] ** ** = rc2t * [CRS] ** ** where [CRS] is a vector in the Geocentric Celestial Reference ** System and [TRS] is a vector in the International Terrestrial ** Reference System (see IERS Conventions 2003). ** ** Called: ** eraCr copy r-matrix ** eraRz rotate around Z-axis ** eraRxr product of two r-matrices ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double r[3][3]; /* Construct the matrix. */ eraCr(rbpn, r); eraRz(gst, r); eraRxr(rpom, r, rc2t); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ut1tai.c0000644001134200020070000001052112640262015020054 0ustar embrayscience00000000000000#include "erfa.h" int eraUt1tai(double ut11, double ut12, double dta, double *tai1, double *tai2) /* ** - - - - - - - - - - ** e r a U t 1 t a i ** - - - - - - - - - - ** ** Time scale transformation: Universal Time, UT1, to International ** Atomic Time, TAI. ** ** Given: ** ut11,ut12 double UT1 as a 2-part Julian Date ** dta double UT1-TAI in seconds ** ** Returned: ** tai1,tai2 double TAI as a 2-part Julian Date ** ** Returned (function value): ** int status: 0 = OK ** ** Notes: ** ** 1) ut11+ut12 is Julian Date, apportioned in any convenient way ** between the two arguments, for example where ut11 is the Julian ** Day Number and ut12 is the fraction of a day. The returned ** tai1,tai2 follow suit. ** ** 2) The argument dta, i.e. UT1-TAI, is an observed quantity, and is ** available from IERS tabulations. ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dtad; /* Result, safeguarding precision. */ dtad = dta / ERFA_DAYSEC; if ( ut11 > ut12 ) { *tai1 = ut11; *tai2 = ut12 - dtad; } else { *tai1 = ut11 - dtad; *tai2 = ut12; } /* Status (always OK). */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fk52h.c0000644001134200020070000001350212640262015017566 0ustar embrayscience00000000000000#include "erfa.h" void eraFk52h(double r5, double d5, double dr5, double dd5, double px5, double rv5, double *rh, double *dh, double *drh, double *ddh, double *pxh, double *rvh) /* ** - - - - - - - - - ** e r a F k 5 2 h ** - - - - - - - - - ** ** Transform FK5 (J2000.0) star data into the Hipparcos system. ** ** Given (all FK5, equinox J2000.0, epoch J2000.0): ** r5 double RA (radians) ** d5 double Dec (radians) ** dr5 double proper motion in RA (dRA/dt, rad/Jyear) ** dd5 double proper motion in Dec (dDec/dt, rad/Jyear) ** px5 double parallax (arcsec) ** rv5 double radial velocity (km/s, positive = receding) ** ** Returned (all Hipparcos, epoch J2000.0): ** rh double RA (radians) ** dh double Dec (radians) ** drh double proper motion in RA (dRA/dt, rad/Jyear) ** ddh double proper motion in Dec (dDec/dt, rad/Jyear) ** pxh double parallax (arcsec) ** rvh double radial velocity (km/s, positive = receding) ** ** Notes: ** ** 1) This function transforms FK5 star positions and proper motions ** into the system of the Hipparcos catalog. ** ** 2) The proper motions in RA are dRA/dt rather than ** cos(Dec)*dRA/dt, and are per year rather than per century. ** ** 3) The FK5 to Hipparcos transformation is modeled as a pure ** rotation and spin; zonal errors in the FK5 catalog are not ** taken into account. ** ** 4) See also eraH2fk5, eraFk5hz, eraHfk5z. ** ** Called: ** eraStarpv star catalog data to space motion pv-vector ** eraFk5hip FK5 to Hipparcos rotation and spin ** eraRxp product of r-matrix and p-vector ** eraPxp vector product of two p-vectors ** eraPpp p-vector plus p-vector ** eraPvstar space motion pv-vector to star catalog data ** ** Reference: ** ** F.Mignard & M.Froeschle, Astron. Astrophys. 354, 732-739 (2000). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int i; double pv5[2][3], r5h[3][3], s5h[3], wxp[3], vv[3], pvh[2][3]; /* FK5 barycentric position/velocity pv-vector (normalized). */ eraStarpv(r5, d5, dr5, dd5, px5, rv5, pv5); /* FK5 to Hipparcos orientation matrix and spin vector. */ eraFk5hip(r5h, s5h); /* Make spin units per day instead of per year. */ for ( i = 0; i < 3; s5h[i++] /= 365.25 ); /* Orient the FK5 position into the Hipparcos system. */ eraRxp(r5h, pv5[0], pvh[0]); /* Apply spin to the position giving an extra space motion component. */ eraPxp(pv5[0], s5h, wxp); /* Add this component to the FK5 space motion. */ eraPpp(wxp, pv5[1], vv); /* Orient the FK5 space motion into the Hipparcos system. */ eraRxp(r5h, vv, pvh[1]); /* Hipparcos pv-vector to spherical. */ eraPvstar(pvh, rh, dh, drh, ddh, pxh, rvh); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ldsun.c0000644001134200020070000001020212640262015017766 0ustar embrayscience00000000000000#include "erfa.h" void eraLdsun(double p[3], double e[3], double em, double p1[3]) /* ** - - - - - - - - - ** e r a L d s u n ** - - - - - - - - - ** ** Deflection of starlight by the Sun. ** ** Given: ** p double[3] direction from observer to star (unit vector) ** e double[3] direction from Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** ** Returned: ** p1 double[3] observer to deflected star (unit vector) ** ** Notes: ** ** 1) The source is presumed to be sufficiently distant that its ** directions seen from the Sun and the observer are essentially ** the same. ** ** 2) The deflection is restrained when the angle between the star and ** the center of the Sun is less than about 9 arcsec, falling to ** zero for zero separation. (The chosen threshold is within the ** solar limb for all solar-system applications.) ** ** 3) The arguments p and p1 can be the same array. ** ** Called: ** eraLd light deflection by a solar-system body ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraLd(1.0, p, p, e, em, 1e-9, p1); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pmsafe.c0000644001134200020070000002106312640262015020123 0ustar embrayscience00000000000000#include "erfa.h" int eraPmsafe(double ra1, double dec1, double pmr1, double pmd1, double px1, double rv1, double ep1a, double ep1b, double ep2a, double ep2b, double *ra2, double *dec2, double *pmr2, double *pmd2, double *px2, double *rv2) /* ** - - - - - - - - - - ** e r a P m s a f e ** - - - - - - - - - - ** ** Star proper motion: update star catalog data for space motion, with ** special handling to handle the zero parallax case. ** ** Given: ** ra1 double right ascension (radians), before ** dec1 double declination (radians), before ** pmr1 double RA proper motion (radians/year), before ** pmd1 double Dec proper motion (radians/year), before ** px1 double parallax (arcseconds), before ** rv1 double radial velocity (km/s, +ve = receding), before ** ep1a double "before" epoch, part A (Note 1) ** ep1b double "before" epoch, part B (Note 1) ** ep2a double "after" epoch, part A (Note 1) ** ep2b double "after" epoch, part B (Note 1) ** ** Returned: ** ra2 double right ascension (radians), after ** dec2 double declination (radians), after ** pmr2 double RA proper motion (radians/year), after ** pmd2 double Dec proper motion (radians/year), after ** px2 double parallax (arcseconds), after ** rv2 double radial velocity (km/s, +ve = receding), after ** ** Returned (function value): ** int status: ** -1 = system error (should not occur) ** 0 = no warnings or errors ** 1 = distance overridden (Note 6) ** 2 = excessive velocity (Note 7) ** 4 = solution didn't converge (Note 8) ** else = binary logical OR of the above warnings ** ** Notes: ** ** 1) The starting and ending TDB epochs ep1a+ep1b and ep2a+ep2b are ** Julian Dates, apportioned in any convenient way between the two ** parts (A and B). For example, JD(TDB)=2450123.7 could be ** expressed in any of these ways, among others: ** ** epNa epNb ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 method is best matched to the way the ** argument is handled internally and will deliver the optimum ** resolution. The MJD method and the date & time methods are both ** good compromises between resolution and convenience. ** ** 2) In accordance with normal star-catalog conventions, the object's ** right ascension and declination are freed from the effects of ** secular aberration. The frame, which is aligned to the catalog ** equator and equinox, is Lorentzian and centered on the SSB. ** ** The proper motions are the rate of change of the right ascension ** and declination at the catalog epoch and are in radians per TDB ** Julian year. ** ** The parallax and radial velocity are in the same frame. ** ** 3) Care is needed with units. The star coordinates are in radians ** and the proper motions in radians per Julian year, but the ** parallax is in arcseconds. ** ** 4) The RA proper motion is in terms of coordinate angle, not true ** angle. If the catalog uses arcseconds for both RA and Dec proper ** motions, the RA proper motion will need to be divided by cos(Dec) ** before use. ** ** 5) Straight-line motion at constant speed, in the inertial frame, is ** assumed. ** ** 6) An extremely small (or zero or negative) parallax is overridden ** to ensure that the object is at a finite but very large distance, ** but not so large that the proper motion is equivalent to a large ** but safe speed (about 0.1c using the chosen constant). A warning ** status of 1 is added to the status if this action has been taken. ** ** 7) If the space velocity is a significant fraction of c (see the ** constant VMAX in the function eraStarpv), it is arbitrarily set ** to zero. When this action occurs, 2 is added to the status. ** ** 8) The relativistic adjustment carried out in the eraStarpv function ** involves an iterative calculation. If the process fails to ** converge within a set number of iterations, 4 is added to the ** status. ** ** Called: ** eraSeps angle between two points ** eraStarpm update star catalog data for space motion ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Minimum allowed parallax (arcsec) */ const double PXMIN = 5e-7; /* Factor giving maximum allowed transverse speed of about 1% c */ const double F = 326.0; int jpx, j; double pm, px1a; /* Proper motion in one year (radians). */ pm = eraSeps(ra1, dec1, ra1+pmr1, dec1+pmd1); /* Override the parallax to reduce the chances of a warning status. */ jpx = 0; px1a = px1; pm *= F; if (px1a < pm) {jpx = 1; px1a = pm;} if (px1a < PXMIN) {jpx = 1; px1a = PXMIN;} /* Carry out the transformation using the modified parallax. */ j = eraStarpm(ra1, dec1, pmr1, pmd1, px1a, rv1, ep1a, ep1b, ep2a, ep2b, ra2, dec2, pmr2, pmd2, px2, rv2); /* Revise and return the status. */ if ( !(j%2) ) j += jpx; return j; /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pmp.c0000644001134200020070000000703412640262015017446 0ustar embrayscience00000000000000#include "erfa.h" void eraPmp(double a[3], double b[3], double amb[3]) /* ** - - - - - - - ** e r a P m p ** - - - - - - - ** ** P-vector subtraction. ** ** Given: ** a double[3] first p-vector ** b double[3] second p-vector ** ** Returned: ** amb double[3] a - b ** ** Note: ** It is permissible to re-use the same array for any of the ** arguments. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { amb[0] = a[0] - b[0]; amb[1] = a[1] - b[1]; amb[2] = a[2] - b[2]; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/nut06a.c0000644001134200020070000001455312640262015017773 0ustar embrayscience00000000000000#include "erfa.h" void eraNut06a(double date1, double date2, double *dpsi, double *deps) /* ** - - - - - - - - - - ** e r a N u t 0 6 a ** - - - - - - - - - - ** ** IAU 2000A nutation with adjustments to match the IAU 2006 ** precession. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** dpsi,deps double nutation, luni-solar + planetary (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The nutation components in longitude and obliquity are in radians ** and with respect to the mean equinox and ecliptic of date, ** IAU 2006 precession model (Hilton et al. 2006, Capitaine et al. ** 2005). ** ** 3) The function first computes the IAU 2000A nutation, then applies ** adjustments for (i) the consequences of the change in obliquity ** from the IAU 1980 ecliptic to the IAU 2006 ecliptic and (ii) the ** secular variation in the Earth's dynamical form factor J2. ** ** 4) The present function provides classical nutation, complementing ** the IAU 2000 frame bias and IAU 2006 precession. It delivers a ** pole which is at current epochs accurate to a few tens of ** microarcseconds, apart from the free core nutation. ** ** Called: ** eraNut00a nutation, IAU 2000A ** ** References: ** ** Chapront, J., Chapront-Touze, M. & Francou, G. 2002, ** Astron.Astrophys. 387, 700 ** ** Lieske, J.H., Lederle, T., Fricke, W. & Morando, B. 1977, ** Astron.Astrophys. 58, 1-16 ** ** Mathews, P.M., Herring, T.A., Buffet, B.A. 2002, J.Geophys.Res. ** 107, B4. The MHB_2000 code itself was obtained on 9th September ** 2002 from ftp//maia.usno.navy.mil/conv2000/chapter5/IAU2000A. ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, ** Astron.Astrophys.Supp.Ser. 135, 111 ** ** Wallace, P.T., "Software for Implementing the IAU 2000 ** Resolutions", in IERS Workshop 5.1 (2002) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double t, fj2, dp, de; /* Interval between fundamental date J2000.0 and given date (JC). */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC; /* Factor correcting for secular variation of J2. */ fj2 = -2.7774e-6 * t; /* Obtain IAU 2000A nutation. */ eraNut00a(date1, date2, &dp, &de); /* Apply P03 adjustments (Wallace & Capitaine, 2006, Eqs.5). */ *dpsi = dp + dp * (0.4697e-6 + fj2); *deps = de + de * fj2; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/sepp.c0000644001134200020070000001045612640262015017623 0ustar embrayscience00000000000000#include "erfa.h" double eraSepp(double a[3], double b[3]) /* ** - - - - - - - - ** e r a S e p p ** - - - - - - - - ** ** Angular separation between two p-vectors. ** ** Given: ** a double[3] first p-vector (not necessarily unit length) ** b double[3] second p-vector (not necessarily unit length) ** ** Returned (function value): ** double angular separation (radians, always positive) ** ** Notes: ** ** 1) If either vector is null, a zero result is returned. ** ** 2) The angular separation is most simply formulated in terms of ** scalar product. However, this gives poor accuracy for angles ** near zero and pi. The present algorithm uses both cross product ** and dot product, to deliver full accuracy whatever the size of ** the angle. ** ** Called: ** eraPxp vector product of two p-vectors ** eraPm modulus of p-vector ** eraPdp scalar product of two p-vectors ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double axb[3], ss, cs, s; /* Sine of angle between the vectors, multiplied by the two moduli. */ eraPxp(a, b, axb); ss = eraPm(axb); /* Cosine of the angle, multiplied by the two moduli. */ cs = eraPdp(a, b); /* The angle. */ s = ((ss != 0.0) || (cs != 0.0)) ? atan2(ss, cs) : 0.0; return s; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pnm06a.c0000644001134200020070000001237212640262015017754 0ustar embrayscience00000000000000#include "erfa.h" void eraPnm06a(double date1, double date2, double rnpb[3][3]) /* ** - - - - - - - - - - ** e r a P n m 0 6 a ** - - - - - - - - - - ** ** Form the matrix of precession-nutation for a given date (including ** frame bias), IAU 2006 precession and IAU 2000A nutation models. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** rnpb double[3][3] bias-precession-nutation matrix (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix operates in the sense V(date) = rnpb * V(GCRS), where ** the p-vector V(date) is with respect to the true equatorial triad ** of date date1+date2 and the p-vector V(GCRS) is with respect to ** the Geocentric Celestial Reference System (IAU, 2000). ** ** Called: ** eraPfw06 bias-precession F-W angles, IAU 2006 ** eraNut06a nutation, IAU 2006/2000A ** eraFw2m F-W angles to r-matrix ** ** Reference: ** ** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double gamb, phib, psib, epsa, dp, de; /* Fukushima-Williams angles for frame bias and precession. */ eraPfw06(date1, date2, &gamb, &phib, &psib, &epsa); /* Nutation components. */ eraNut06a(date1, date2, &dp, &de); /* Equinox based nutation x precession x bias matrix. */ eraFw2m(gamb, phib, psib + dp, epsa + de, rnpb); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pn00b.c0000644001134200020070000001627512640262015017600 0ustar embrayscience00000000000000#include "erfa.h" void eraPn00b(double date1, double date2, double *dpsi, double *deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]) /* ** - - - - - - - - - ** e r a P n 0 0 b ** - - - - - - - - - ** ** Precession-nutation, IAU 2000B model: a multi-purpose function, ** supporting classical (equinox-based) use directly and CIO-based ** use indirectly. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** dpsi,deps double nutation (Note 2) ** epsa double mean obliquity (Note 3) ** rb double[3][3] frame bias matrix (Note 4) ** rp double[3][3] precession matrix (Note 5) ** rbp double[3][3] bias-precession matrix (Note 6) ** rn double[3][3] nutation matrix (Note 7) ** rbpn double[3][3] GCRS-to-true matrix (Notes 8,9) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The nutation components (luni-solar + planetary, IAU 2000B) in ** longitude and obliquity are in radians and with respect to the ** equinox and ecliptic of date. For more accurate results, but ** at the cost of increased computation, use the eraPn00a function. ** For the utmost accuracy, use the eraPn00 function, where the ** nutation components are caller-specified. ** ** 3) The mean obliquity is consistent with the IAU 2000 precession. ** ** 4) The matrix rb transforms vectors from GCRS to J2000.0 mean ** equator and equinox by applying frame bias. ** ** 5) The matrix rp transforms vectors from J2000.0 mean equator and ** equinox to mean equator and equinox of date by applying ** precession. ** ** 6) The matrix rbp transforms vectors from GCRS to mean equator and ** equinox of date by applying frame bias then precession. It is ** the product rp x rb. ** ** 7) The matrix rn transforms vectors from mean equator and equinox ** of date to true equator and equinox of date by applying the ** nutation (luni-solar + planetary). ** ** 8) The matrix rbpn transforms vectors from GCRS to true equator and ** equinox of date. It is the product rn x rbp, applying frame ** bias, precession and nutation in that order. ** ** 9) The X,Y,Z coordinates of the IAU 2000B Celestial Intermediate ** Pole are elements (3,1-3) of the GCRS-to-true matrix, ** i.e. rbpn[2][0-2]. ** ** 10) It is permissible to re-use the same array in the returned ** arguments. The arrays are filled in the stated order. ** ** Called: ** eraNut00b nutation, IAU 2000B ** eraPn00 bias/precession/nutation results, IAU 2000 ** ** Reference: ** ** Capitaine, N., Chapront, J., Lambert, S. and Wallace, P., ** "Expressions for the Celestial Intermediate Pole and Celestial ** Ephemeris Origin consistent with the IAU 2000A precession- ** nutation model", Astron.Astrophys. 400, 1145-1154 (2003). ** ** n.b. The celestial ephemeris origin (CEO) was renamed "celestial ** intermediate origin" (CIO) by IAU 2006 Resolution 2. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Nutation. */ eraNut00b(date1, date2, dpsi, deps); /* Remaining results. */ eraPn00(date1, date2, *dpsi, *deps, epsa, rb, rp, rbp, rn, rbpn); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/atio13.c0000644001134200020070000002344512640262015017756 0ustar embrayscience00000000000000#include "erfa.h" int eraAtio13(double ri, double di, double utc1, double utc2, double dut1, double elong, double phi, double hm, double xp, double yp, double phpa, double tc, double rh, double wl, double *aob, double *zob, double *hob, double *dob, double *rob) /* ** - - - - - - - - - - ** e r a A t i o 1 3 ** - - - - - - - - - - ** ** CIRS RA,Dec to observed place. The caller supplies UTC, site ** coordinates, ambient air conditions and observing wavelength. ** ** Given: ** ri double CIRS right ascension (CIO-based, radians) ** di double CIRS declination (radians) ** utc1 double UTC as a 2-part... ** utc2 double ...quasi Julian Date (Notes 1,2) ** dut1 double UT1-UTC (seconds, Note 3) ** elong double longitude (radians, east +ve, Note 4) ** phi double geodetic latitude (radians, Note 4) ** hm double height above ellipsoid (m, geodetic Notes 4,6) ** xp,yp double polar motion coordinates (radians, Note 5) ** phpa double pressure at the observer (hPa = mB, Note 6) ** tc double ambient temperature at the observer (deg C) ** rh double relative humidity at the observer (range 0-1) ** wl double wavelength (micrometers, Note 7) ** ** Returned: ** aob double* observed azimuth (radians: N=0,E=90) ** zob double* observed zenith distance (radians) ** hob double* observed hour angle (radians) ** dob double* observed declination (radians) ** rob double* observed right ascension (CIO-based, radians) ** ** Returned (function value): ** int status: +1 = dubious year (Note 2) ** 0 = OK ** -1 = unacceptable date ** ** Notes: ** ** 1) utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any ** convenient way between the two arguments, for example where utc1 ** is the Julian Day Number and utc2 is the fraction of a day. ** ** However, JD cannot unambiguously represent UTC during a leap ** second unless special measures are taken. The convention in the ** present function is that the JD day represents UTC days whether ** the length is 86399, 86400 or 86401 SI seconds. ** ** Applications should use the function eraDtf2d to convert from ** calendar date and time of day into 2-part quasi Julian Date, as ** it implements the leap-second-ambiguity convention just ** described. ** ** 2) The warning status "dubious year" flags UTCs that predate the ** introduction of the time scale or that are too far in the ** future to be trusted. See eraDat for further details. ** ** 3) UT1-UTC is tabulated in IERS bulletins. It increases by exactly ** one second at the end of each positive UTC leap second, ** introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This ** practice is under review, and in the future UT1-UTC may grow ** essentially without limit. ** ** 4) The geographical coordinates are with respect to the ERFA_WGS84 ** reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the ** longitude required by the present function is east-positive ** (i.e. right-handed), in accordance with geographical convention. ** ** 5) The polar motion xp,yp can be obtained from IERS bulletins. The ** values are the coordinates (in radians) of the Celestial ** Intermediate Pole with respect to the International Terrestrial ** Reference System (see IERS Conventions 2003), measured along the ** meridians 0 and 90 deg west respectively. For many ** applications, xp and yp can be set to zero. ** ** 6) If hm, the height above the ellipsoid of the observing station ** in meters, is not known but phpa, the pressure in hPa (=mB), is ** available, an adequate estimate of hm can be obtained from the ** expression ** ** hm = -29.3 * tsl * log ( phpa / 1013.25 ); ** ** where tsl is the approximate sea-level air temperature in K ** (See Astrophysical Quantities, C.W.Allen, 3rd edition, section ** 52). Similarly, if the pressure phpa is not known, it can be ** estimated from the height of the observing station, hm, as ** follows: ** ** phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) ); ** ** Note, however, that the refraction is nearly proportional to ** the pressure and that an accurate phpa value is important for ** precise work. ** ** 7) The argument wl specifies the observing wavelength in ** micrometers. The transition from optical to radio is assumed to ** occur at 100 micrometers (about 3000 GHz). ** ** 8) "Observed" Az,ZD means the position that would be seen by a ** perfect geodetically aligned theodolite. (Zenith distance is ** used rather than altitude in order to reflect the fact that no ** allowance is made for depression of the horizon.) This is ** related to the observed HA,Dec via the standard rotation, using ** the geodetic latitude (corrected for polar motion), while the ** observed HA and RA are related simply through the Earth rotation ** angle and the site longitude. "Observed" RA,Dec or HA,Dec thus ** means the position that would be seen by a perfect equatorial ** with its polar axis aligned to the Earth's axis of rotation. ** ** 9) The accuracy of the result is limited by the corrections for ** refraction, which use a simple A*tan(z) + B*tan^3(z) model. ** Providing the meteorological parameters are known accurately and ** there are no gross local effects, the predicted astrometric ** coordinates should be within 0.05 arcsec (optical) or 1 arcsec ** (radio) for a zenith distance of less than 70 degrees, better ** than 30 arcsec (optical or radio) at 85 degrees and better ** than 20 arcmin (optical) or 30 arcmin (radio) at the horizon. ** ** 10) The complementary functions eraAtio13 and eraAtoi13 are self- ** consistent to better than 1 microarcsecond all over the ** celestial sphere. ** ** 11) It is advisable to take great care with units, as even unlikely ** values of the input parameters are accepted and processed in ** accordance with the models used. ** ** Called: ** eraApio13 astrometry parameters, CIRS-observed, 2013 ** eraAtioq quick ICRS to observed ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int j; eraASTROM astrom; /* Star-independent astrometry parameters for CIRS->observed. */ j = eraApio13(utc1, utc2, dut1, elong, phi, hm, xp, yp, phpa, tc, rh, wl, &astrom); /* Abort if bad UTC. */ if ( j < 0 ) return j; /* Transform CIRS to observed. */ eraAtioq(ri, di, &astrom, aob, zob, hob, dob, rob); /* Return OK/warning status. */ return j; /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pom00.c0000644001134200020070000001157512640262015017612 0ustar embrayscience00000000000000#include "erfa.h" void eraPom00(double xp, double yp, double sp, double rpom[3][3]) /* ** - - - - - - - - - - ** e r a P o m 0 0 ** - - - - - - - - - - ** ** Form the matrix of polar motion for a given date, IAU 2000. ** ** Given: ** xp,yp double coordinates of the pole (radians, Note 1) ** sp double the TIO locator s' (radians, Note 2) ** ** Returned: ** rpom double[3][3] polar-motion matrix (Note 3) ** ** Notes: ** ** 1) The arguments xp and yp are the coordinates (in radians) of the ** Celestial Intermediate Pole with respect to the International ** Terrestrial Reference System (see IERS Conventions 2003), ** measured along the meridians to 0 and 90 deg west respectively. ** ** 2) The argument sp is the TIO locator s', in radians, which ** positions the Terrestrial Intermediate Origin on the equator. It ** is obtained from polar motion observations by numerical ** integration, and so is in essence unpredictable. However, it is ** dominated by a secular drift of about 47 microarcseconds per ** century, and so can be taken into account by using s' = -47*t, ** where t is centuries since J2000.0. The function eraSp00 ** implements this approximation. ** ** 3) The matrix operates in the sense V(TRS) = rpom * V(CIP), meaning ** that it is the final rotation when computing the pointing ** direction to a celestial source. ** ** Called: ** eraIr initialize r-matrix to identity ** eraRz rotate around Z-axis ** eraRy rotate around Y-axis ** eraRx rotate around X-axis ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Construct the matrix. */ eraIr(rpom); eraRz(sp, rpom); eraRy(-xp, rpom); eraRx(-yp, rpom); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/seps.c0000644001134200020070000000755112640262015017630 0ustar embrayscience00000000000000#include "erfa.h" double eraSeps(double al, double ap, double bl, double bp) /* ** - - - - - - - - ** e r a S e p s ** - - - - - - - - ** ** Angular separation between two sets of spherical coordinates. ** ** Given: ** al double first longitude (radians) ** ap double first latitude (radians) ** bl double second longitude (radians) ** bp double second latitude (radians) ** ** Returned (function value): ** double angular separation (radians) ** ** Called: ** eraS2c spherical coordinates to unit vector ** eraSepp angular separation between two p-vectors ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double ac[3], bc[3], s; /* Spherical to Cartesian. */ eraS2c(al, ap, ac); eraS2c(bl, bp, bc); /* Angle between the vectors. */ s = eraSepp(ac, bc); return s; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ee00b.c0000644001134200020070000001352412640262015017546 0ustar embrayscience00000000000000#include "erfa.h" double eraEe00b(double date1, double date2) /* ** - - - - - - - - - ** e r a E e 0 0 b ** - - - - - - - - - ** ** Equation of the equinoxes, compatible with IAU 2000 resolutions but ** using the truncated nutation model IAU 2000B. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned (function value): ** double equation of the equinoxes (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The result, which is in radians, operates in the following sense: ** ** Greenwich apparent ST = GMST + equation of the equinoxes ** ** 3) The result is compatible with the IAU 2000 resolutions except ** that accuracy has been compromised for the sake of speed. For ** further details, see McCarthy & Luzum (2001), IERS Conventions ** 2003 and Capitaine et al. (2003). ** ** Called: ** eraPr00 IAU 2000 precession adjustments ** eraObl80 mean obliquity, IAU 1980 ** eraNut00b nutation, IAU 2000B ** eraEe00 equation of the equinoxes, IAU 2000 ** ** References: ** ** Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to ** implement the IAU 2000 definition of UT1", Astronomy & ** Astrophysics, 406, 1135-1149 (2003) ** ** McCarthy, D.D. & Luzum, B.J., "An abridged model of the ** precession-nutation of the celestial pole", Celestial Mechanics & ** Dynamical Astronomy, 85, 37-49 (2003) ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dpsipr, depspr, epsa, dpsi, deps, ee; /* IAU 2000 precession-rate adjustments. */ eraPr00(date1, date2, &dpsipr, &depspr); /* Mean obliquity, consistent with IAU 2000 precession-nutation. */ epsa = eraObl80(date1, date2) + depspr; /* Nutation in longitude. */ eraNut00b(date1, date2, &dpsi, &deps); /* Equation of the equinoxes. */ ee = eraEe00(date1, date2, epsa, dpsi); return ee; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/d2dtf.c0000644001134200020070000002021212640262015017646 0ustar embrayscience00000000000000#include "erfa.h" #include int eraD2dtf(const char *scale, int ndp, double d1, double d2, int *iy, int *im, int *id, int ihmsf[4]) /* ** - - - - - - - - - ** e r a D 2 d t f ** - - - - - - - - - ** ** Format for output a 2-part Julian Date (or in the case of UTC a ** quasi-JD form that includes special provision for leap seconds). ** ** Given: ** scale char[] time scale ID (Note 1) ** ndp int resolution (Note 2) ** d1,d2 double time as a 2-part Julian Date (Notes 3,4) ** ** Returned: ** iy,im,id int year, month, day in Gregorian calendar (Note 5) ** ihmsf int[4] hours, minutes, seconds, fraction (Note 1) ** ** Returned (function value): ** int status: +1 = dubious year (Note 5) ** 0 = OK ** -1 = unacceptable date (Note 6) ** ** Notes: ** ** 1) scale identifies the time scale. Only the value "UTC" (in upper ** case) is significant, and enables handling of leap seconds (see ** Note 4). ** ** 2) ndp is the number of decimal places in the seconds field, and can ** have negative as well as positive values, such as: ** ** ndp resolution ** -4 1 00 00 ** -3 0 10 00 ** -2 0 01 00 ** -1 0 00 10 ** 0 0 00 01 ** 1 0 00 00.1 ** 2 0 00 00.01 ** 3 0 00 00.001 ** ** The limits are platform dependent, but a safe range is -5 to +9. ** ** 3) d1+d2 is Julian Date, apportioned in any convenient way between ** the two arguments, for example where d1 is the Julian Day Number ** and d2 is the fraction of a day. In the case of UTC, where the ** use of JD is problematical, special conventions apply: see the ** next note. ** ** 4) JD cannot unambiguously represent UTC during a leap second unless ** special measures are taken. The ERFA internal convention is that ** the quasi-JD day represents UTC days whether the length is 86399, ** 86400 or 86401 SI seconds. In the 1960-1972 era there were ** smaller jumps (in either direction) each time the linear UTC(TAI) ** expression was changed, and these "mini-leaps" are also included ** in the ERFA convention. ** ** 5) The warning status "dubious year" flags UTCs that predate the ** introduction of the time scale or that are too far in the future ** to be trusted. See eraDat for further details. ** ** 6) For calendar conventions and limitations, see eraCal2jd. ** ** Called: ** eraJd2cal JD to Gregorian calendar ** eraD2tf decompose days to hms ** eraDat delta(AT) = TAI-UTC ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int leap; char s; int iy1, im1, id1, js, iy2, im2, id2, ihmsf1[4], i; double a1, b1, fd, dat0, dat12, w, dat24, dleap; /* The two-part JD. */ a1 = d1; b1 = d2; /* Provisional calendar date. */ js = eraJd2cal(a1, b1, &iy1, &im1, &id1, &fd); if ( js ) return -1; /* Is this a leap second day? */ leap = 0; if ( ! strcmp(scale,"UTC") ) { /* TAI-UTC at 0h today. */ js = eraDat(iy1, im1, id1, 0.0, &dat0); if ( js < 0 ) return -1; /* TAI-UTC at 12h today (to detect drift). */ js = eraDat(iy1, im1, id1, 0.5, &dat12); if ( js < 0 ) return -1; /* TAI-UTC at 0h tomorrow (to detect jumps). */ js = eraJd2cal(a1+1.5, b1-fd, &iy2, &im2, &id2, &w); if ( js ) return -1; js = eraDat(iy2, im2, id2, 0.0, &dat24); if ( js < 0 ) return -1; /* Any sudden change in TAI-UTC (seconds). */ dleap = dat24 - (2.0*dat12 - dat0); /* If leap second day, scale the fraction of a day into SI. */ leap = (dleap != 0.0); if (leap) fd += fd * dleap/ERFA_DAYSEC; } /* Provisional time of day. */ eraD2tf ( ndp, fd, &s, ihmsf1 ); /* Has the (rounded) time gone past 24h? */ if ( ihmsf1[0] > 23 ) { /* Yes. We probably need tomorrow's calendar date. */ js = eraJd2cal(a1+1.5, b1-fd, &iy2, &im2, &id2, &w); if ( js ) return -1; /* Is today a leap second day? */ if ( ! leap ) { /* No. Use 0h tomorrow. */ iy1 = iy2; im1 = im2; id1 = id2; ihmsf1[0] = 0; ihmsf1[1] = 0; ihmsf1[2] = 0; } else { /* Yes. Are we past the leap second itself? */ if ( ihmsf1[2] > 0 ) { /* Yes. Use tomorrow but allow for the leap second. */ iy1 = iy2; im1 = im2; id1 = id2; ihmsf1[0] = 0; ihmsf1[1] = 0; ihmsf1[2] = 0; } else { /* No. Use 23 59 60... today. */ ihmsf1[0] = 23; ihmsf1[1] = 59; ihmsf1[2] = 60; } /* If rounding to 10s or coarser always go up to new day. */ if ( ndp < 0 && ihmsf1[2] == 60 ) { iy1 = iy2; im1 = im2; id1 = id2; ihmsf1[0] = 0; ihmsf1[1] = 0; ihmsf1[2] = 0; } } } /* Results. */ *iy = iy1; *im = im1; *id = id1; for ( i = 0; i < 4; i++ ) { ihmsf[i] = ihmsf1[i]; } /* Status. */ return js; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/plan94.c0000644001134200020070000005236712640262015017772 0ustar embrayscience00000000000000#include "erfa.h" int eraPlan94(double date1, double date2, int np, double pv[2][3]) /* ** - - - - - - - - - - ** e r a P l a n 9 4 ** - - - - - - - - - - ** ** Approximate heliocentric position and velocity of a nominated major ** planet: Mercury, Venus, EMB, Mars, Jupiter, Saturn, Uranus or ** Neptune (but not the Earth itself). ** ** Given: ** date1 double TDB date part A (Note 1) ** date2 double TDB date part B (Note 1) ** np int planet (1=Mercury, 2=Venus, 3=EMB, 4=Mars, ** 5=Jupiter, 6=Saturn, 7=Uranus, 8=Neptune) ** ** Returned (argument): ** pv double[2][3] planet p,v (heliocentric, J2000.0, AU,AU/d) ** ** Returned (function value): ** int status: -1 = illegal NP (outside 1-8) ** 0 = OK ** +1 = warning: year outside 1000-3000 ** +2 = warning: failed to converge ** ** Notes: ** ** 1) The date date1+date2 is in the TDB time scale (in practice TT can ** be used) and is a Julian Date, apportioned in any convenient way ** between the two arguments. For example, JD(TDB)=2450123.7 could ** be expressed in any of these ways, among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 method is best matched to the way the ** argument is handled internally and will deliver the optimum ** resolution. The MJD method and the date & time methods are both ** good compromises between resolution and convenience. The limited ** accuracy of the present algorithm is such that any of the methods ** is satisfactory. ** ** 2) If an np value outside the range 1-8 is supplied, an error status ** (function value -1) is returned and the pv vector set to zeroes. ** ** 3) For np=3 the result is for the Earth-Moon Barycenter. To obtain ** the heliocentric position and velocity of the Earth, use instead ** the ERFA function eraEpv00. ** ** 4) On successful return, the array pv contains the following: ** ** pv[0][0] x } ** pv[0][1] y } heliocentric position, AU ** pv[0][2] z } ** ** pv[1][0] xdot } ** pv[1][1] ydot } heliocentric velocity, AU/d ** pv[1][2] zdot } ** ** The reference frame is equatorial and is with respect to the ** mean equator and equinox of epoch J2000.0. ** ** 5) The algorithm is due to J.L. Simon, P. Bretagnon, J. Chapront, ** M. Chapront-Touze, G. Francou and J. Laskar (Bureau des ** Longitudes, Paris, France). From comparisons with JPL ** ephemeris DE102, they quote the following maximum errors ** over the interval 1800-2050: ** ** L (arcsec) B (arcsec) R (km) ** ** Mercury 4 1 300 ** Venus 5 1 800 ** EMB 6 1 1000 ** Mars 17 1 7700 ** Jupiter 71 5 76000 ** Saturn 81 13 267000 ** Uranus 86 7 712000 ** Neptune 11 1 253000 ** ** Over the interval 1000-3000, they report that the accuracy is no ** worse than 1.5 times that over 1800-2050. Outside 1000-3000 the ** accuracy declines. ** ** Comparisons of the present function with the JPL DE200 ephemeris ** give the following RMS errors over the interval 1960-2025: ** ** position (km) velocity (m/s) ** ** Mercury 334 0.437 ** Venus 1060 0.855 ** EMB 2010 0.815 ** Mars 7690 1.98 ** Jupiter 71700 7.70 ** Saturn 199000 19.4 ** Uranus 564000 16.4 ** Neptune 158000 14.4 ** ** Comparisons against DE200 over the interval 1800-2100 gave the ** following maximum absolute differences. (The results using ** DE406 were essentially the same.) ** ** L (arcsec) B (arcsec) R (km) Rdot (m/s) ** ** Mercury 7 1 500 0.7 ** Venus 7 1 1100 0.9 ** EMB 9 1 1300 1.0 ** Mars 26 1 9000 2.5 ** Jupiter 78 6 82000 8.2 ** Saturn 87 14 263000 24.6 ** Uranus 86 7 661000 27.4 ** Neptune 11 2 248000 21.4 ** ** 6) The present ERFA re-implementation of the original Simon et al. ** Fortran code differs from the original in the following respects: ** ** * C instead of Fortran. ** ** * The date is supplied in two parts. ** ** * The result is returned only in equatorial Cartesian form; ** the ecliptic longitude, latitude and radius vector are not ** returned. ** ** * The result is in the J2000.0 equatorial frame, not ecliptic. ** ** * More is done in-line: there are fewer calls to subroutines. ** ** * Different error/warning status values are used. ** ** * A different Kepler's-equation-solver is used (avoiding ** use of double precision complex). ** ** * Polynomials in t are nested to minimize rounding errors. ** ** * Explicit double constants are used to avoid mixed-mode ** expressions. ** ** None of the above changes affects the result significantly. ** ** 7) The returned status indicates the most serious condition ** encountered during execution of the function. Illegal np is ** considered the most serious, overriding failure to converge, ** which in turn takes precedence over the remote date warning. ** ** Called: ** eraAnp normalize angle into range 0 to 2pi ** ** Reference: Simon, J.L, Bretagnon, P., Chapront, J., ** Chapront-Touze, M., Francou, G., and Laskar, J., ** Astron. Astrophys. 282, 663 (1994). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Gaussian constant */ static const double GK = 0.017202098950; /* Sin and cos of J2000.0 mean obliquity (IAU 1976) */ static const double SINEPS = 0.3977771559319137; static const double COSEPS = 0.9174820620691818; /* Maximum number of iterations allowed to solve Kepler's equation */ static const int KMAX = 10; int jstat, i, k; double t, da, dl, de, dp, di, dom, dmu, arga, argl, am, ae, dae, ae2, at, r, v, si2, xq, xp, tl, xsw, xcw, xm2, xf, ci2, xms, xmc, xpxq2, x, y, z; /* Planetary inverse masses */ static const double amas[] = { 6023600.0, /* Mercury */ 408523.5, /* Venus */ 328900.5, /* EMB */ 3098710.0, /* Mars */ 1047.355, /* Jupiter */ 3498.5, /* Saturn */ 22869.0, /* Uranus */ 19314.0 }; /* Neptune */ /* ** Tables giving the mean Keplerian elements, limited to t^2 terms: ** ** a semi-major axis (AU) ** dlm mean longitude (degree and arcsecond) ** e eccentricity ** pi longitude of the perihelion (degree and arcsecond) ** dinc inclination (degree and arcsecond) ** omega longitude of the ascending node (degree and arcsecond) */ static const double a[][3] = { { 0.3870983098, 0.0, 0.0 }, /* Mercury */ { 0.7233298200, 0.0, 0.0 }, /* Venus */ { 1.0000010178, 0.0, 0.0 }, /* EMB */ { 1.5236793419, 3e-10, 0.0 }, /* Mars */ { 5.2026032092, 19132e-10, -39e-10 }, /* Jupiter */ { 9.5549091915, -0.0000213896, 444e-10 }, /* Saturn */ { 19.2184460618, -3716e-10, 979e-10 }, /* Uranus */ { 30.1103868694, -16635e-10, 686e-10 } /* Neptune */ }; static const double dlm[][3] = { { 252.25090552, 5381016286.88982, -1.92789 }, { 181.97980085, 2106641364.33548, 0.59381 }, { 100.46645683, 1295977422.83429, -2.04411 }, { 355.43299958, 689050774.93988, 0.94264 }, { 34.35151874, 109256603.77991, -30.60378 }, { 50.07744430, 43996098.55732, 75.61614 }, { 314.05500511, 15424811.93933, -1.75083 }, { 304.34866548, 7865503.20744, 0.21103 } }; static const double e[][3] = { { 0.2056317526, 0.0002040653, -28349e-10 }, { 0.0067719164, -0.0004776521, 98127e-10 }, { 0.0167086342, -0.0004203654, -0.0000126734 }, { 0.0934006477, 0.0009048438, -80641e-10 }, { 0.0484979255, 0.0016322542, -0.0000471366 }, { 0.0555481426, -0.0034664062, -0.0000643639 }, { 0.0463812221, -0.0002729293, 0.0000078913 }, { 0.0094557470, 0.0000603263, 0.0 } }; static const double pi[][3] = { { 77.45611904, 5719.11590, -4.83016 }, { 131.56370300, 175.48640, -498.48184 }, { 102.93734808, 11612.35290, 53.27577 }, { 336.06023395, 15980.45908, -62.32800 }, { 14.33120687, 7758.75163, 259.95938 }, { 93.05723748, 20395.49439, 190.25952 }, { 173.00529106, 3215.56238, -34.09288 }, { 48.12027554, 1050.71912, 27.39717 } }; static const double dinc[][3] = { { 7.00498625, -214.25629, 0.28977 }, { 3.39466189, -30.84437, -11.67836 }, { 0.0, 469.97289, -3.35053 }, { 1.84972648, -293.31722, -8.11830 }, { 1.30326698, -71.55890, 11.95297 }, { 2.48887878, 91.85195, -17.66225 }, { 0.77319689, -60.72723, 1.25759 }, { 1.76995259, 8.12333, 0.08135 } }; static const double omega[][3] = { { 48.33089304, -4515.21727, -31.79892 }, { 76.67992019, -10008.48154, -51.32614 }, { 174.87317577, -8679.27034, 15.34191 }, { 49.55809321, -10620.90088, -230.57416 }, { 100.46440702, 6362.03561, 326.52178 }, { 113.66550252, -9240.19942, -66.23743 }, { 74.00595701, 2669.15033, 145.93964 }, { 131.78405702, -221.94322, -0.78728 } }; /* Tables for trigonometric terms to be added to the mean elements of */ /* the semi-major axes */ static const double kp[][9] = { { 69613, 75645, 88306, 59899, 15746, 71087, 142173, 3086, 0 }, { 21863, 32794, 26934, 10931, 26250, 43725, 53867, 28939, 0 }, { 16002, 21863, 32004, 10931, 14529, 16368, 15318, 32794, 0 }, { 6345, 7818, 15636, 7077, 8184, 14163, 1107, 4872, 0 }, { 1760, 1454, 1167, 880, 287, 2640, 19, 2047, 1454 }, { 574, 0, 880, 287, 19, 1760, 1167, 306, 574 }, { 204, 0, 177, 1265, 4, 385, 200, 208, 204 }, { 0, 102, 106, 4, 98, 1367, 487, 204, 0 } }; static const double ca[][9] = { { 4, -13, 11, -9, -9, -3, -1, 4, 0 }, { -156, 59, -42, 6, 19, -20, -10, -12, 0 }, { 64, -152, 62, -8, 32, -41, 19, -11, 0 }, { 124, 621, -145, 208, 54, -57, 30, 15, 0 }, { -23437, -2634, 6601, 6259, -1507,-1821, 2620, -2115, -1489 }, { 62911,-119919, 79336,17814,-24241,12068, 8306, -4893, 8902 }, { 389061,-262125,-44088, 8387,-22976,-2093, -615, -9720, 6633 }, { -412235,-157046,-31430,37817, -9740, -13, -7449, 9644, 0 } }; static const double sa[][9] = { { -29, -1, 9, 6, -6, 5, 4, 0, 0 }, { -48, -125, -26, -37, 18, -13, -20, -2, 0 }, { -150, -46, 68, 54, 14, 24, -28, 22, 0 }, { -621, 532, -694, -20, 192, -94, 71, -73, 0 }, { -14614,-19828, -5869, 1881, -4372, -2255, 782, 930, 913 }, { 139737, 0, 24667, 51123, -5102, 7429, -4095, -1976, -9566 }, { -138081, 0, 37205,-49039,-41901,-33872,-27037,-12474, 18797 }, { 0, 28492,133236, 69654, 52322,-49577,-26430, -3593, 0 } }; /* Tables giving the trigonometric terms to be added to the mean */ /* elements of the mean longitudes */ static const double kq[][10] = { { 3086,15746,69613,59899,75645,88306, 12661, 2658, 0, 0 }, { 21863,32794,10931, 73, 4387,26934, 1473, 2157, 0, 0 }, { 10,16002,21863,10931, 1473,32004, 4387, 73, 0, 0 }, { 10, 6345, 7818, 1107,15636, 7077, 8184, 532, 10, 0 }, { 19, 1760, 1454, 287, 1167, 880, 574, 2640, 19, 1454 }, { 19, 574, 287, 306, 1760, 12, 31, 38, 19, 574 }, { 4, 204, 177, 8, 31, 200, 1265, 102, 4, 204 }, { 4, 102, 106, 8, 98, 1367, 487, 204, 4, 102 } }; static const double cl[][10] = { { 21, -95, -157, 41, -5, 42, 23, 30, 0, 0 }, { -160, -313, -235, 60, -74, -76, -27, 34, 0, 0 }, { -325, -322, -79, 232, -52, 97, 55, -41, 0, 0 }, { 2268, -979, 802, 602, -668, -33, 345, 201, -55, 0 }, { 7610, -4997,-7689,-5841,-2617, 1115,-748,-607, 6074, 354 }, { -18549, 30125,20012, -730, 824, 23,1289,-352, -14767, -2062 }, { -135245,-14594, 4197,-4030,-5630,-2898,2540,-306, 2939, 1986 }, { 89948, 2103, 8963, 2695, 3682, 1648, 866,-154, -1963, -283 } }; static const double sl[][10] = { { -342, 136, -23, 62, 66, -52, -33, 17, 0, 0 }, { 524, -149, -35, 117, 151, 122, -71, -62, 0, 0 }, { -105, -137, 258, 35, -116, -88,-112, -80, 0, 0 }, { 854, -205, -936, -240, 140, -341, -97, -232, 536, 0 }, { -56980, 8016, 1012, 1448,-3024,-3710, 318, 503, 3767, 577 }, { 138606,-13478,-4964, 1441,-1319,-1482, 427, 1236, -9167, -1918 }, { 71234,-41116, 5334,-4935,-1848, 66, 434, -1748, 3780, -701 }, { -47645, 11647, 2166, 3194, 679, 0,-244, -419, -2531, 48 } }; /*--------------------------------------------------------------------*/ /* Validate the planet number. */ if ((np < 1) || (np > 8)) { jstat = -1; /* Reset the result in case of failure. */ for (k = 0; k < 2; k++) { for (i = 0; i < 3; i++) { pv[k][i] = 0.0; } } } else { /* Decrement the planet number to start at zero. */ np--; /* Time: Julian millennia since J2000.0. */ t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJM; /* OK status unless remote date. */ jstat = fabs(t) <= 1.0 ? 0 : 1; /* Compute the mean elements. */ da = a[np][0] + (a[np][1] + a[np][2] * t) * t; dl = (3600.0 * dlm[np][0] + (dlm[np][1] + dlm[np][2] * t) * t) * ERFA_DAS2R; de = e[np][0] + ( e[np][1] + e[np][2] * t) * t; dp = eraAnpm((3600.0 * pi[np][0] + (pi[np][1] + pi[np][2] * t) * t) * ERFA_DAS2R); di = (3600.0 * dinc[np][0] + (dinc[np][1] + dinc[np][2] * t) * t) * ERFA_DAS2R; dom = eraAnpm((3600.0 * omega[np][0] + (omega[np][1] + omega[np][2] * t) * t) * ERFA_DAS2R); /* Apply the trigonometric terms. */ dmu = 0.35953620 * t; for (k = 0; k < 8; k++) { arga = kp[np][k] * dmu; argl = kq[np][k] * dmu; da += (ca[np][k] * cos(arga) + sa[np][k] * sin(arga)) * 1e-7; dl += (cl[np][k] * cos(argl) + sl[np][k] * sin(argl)) * 1e-7; } arga = kp[np][8] * dmu; da += t * (ca[np][8] * cos(arga) + sa[np][8] * sin(arga)) * 1e-7; for (k = 8; k < 10; k++) { argl = kq[np][k] * dmu; dl += t * (cl[np][k] * cos(argl) + sl[np][k] * sin(argl)) * 1e-7; } dl = fmod(dl, ERFA_D2PI); /* Iterative soln. of Kepler's equation to get eccentric anomaly. */ am = dl - dp; ae = am + de * sin(am); k = 0; dae = 1.0; while (k < KMAX && fabs(dae) > 1e-12) { dae = (am - ae + de * sin(ae)) / (1.0 - de * cos(ae)); ae += dae; k++; if (k == KMAX-1) jstat = 2; } /* True anomaly. */ ae2 = ae / 2.0; at = 2.0 * atan2(sqrt((1.0 + de) / (1.0 - de)) * sin(ae2), cos(ae2)); /* Distance (AU) and speed (radians per day). */ r = da * (1.0 - de * cos(ae)); v = GK * sqrt((1.0 + 1.0 / amas[np]) / (da * da * da)); si2 = sin(di / 2.0); xq = si2 * cos(dom); xp = si2 * sin(dom); tl = at + dp; xsw = sin(tl); xcw = cos(tl); xm2 = 2.0 * (xp * xcw - xq * xsw); xf = da / sqrt(1 - de * de); ci2 = cos(di / 2.0); xms = (de * sin(dp) + xsw) * xf; xmc = (de * cos(dp) + xcw) * xf; xpxq2 = 2 * xp * xq; /* Position (J2000.0 ecliptic x,y,z in AU). */ x = r * (xcw - xm2 * xp); y = r * (xsw + xm2 * xq); z = r * (-xm2 * ci2); /* Rotate to equatorial. */ pv[0][0] = x; pv[0][1] = y * COSEPS - z * SINEPS; pv[0][2] = y * SINEPS + z * COSEPS; /* Velocity (J2000.0 ecliptic xdot,ydot,zdot in AU/d). */ x = v * (( -1.0 + 2.0 * xp * xp) * xms + xpxq2 * xmc); y = v * (( 1.0 - 2.0 * xq * xq) * xmc - xpxq2 * xms); z = v * (2.0 * ci2 * (xp * xms + xq * xmc)); /* Rotate to equatorial. */ pv[1][0] = x; pv[1][1] = y * COSEPS - z * SINEPS; pv[1][2] = y * SINEPS + z * COSEPS; } /* Return the status. */ return jstat; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2txy.c0000644001134200020070000001520012640262015017715 0ustar embrayscience00000000000000#include "erfa.h" void eraC2txy(double tta, double ttb, double uta, double utb, double x, double y, double xp, double yp, double rc2t[3][3]) /* ** - - - - - - - - - ** e r a C 2 t x y ** - - - - - - - - - ** ** Form the celestial to terrestrial matrix given the date, the UT1, ** the CIP coordinates and the polar motion. IAU 2000. ** ** Given: ** tta,ttb double TT as a 2-part Julian Date (Note 1) ** uta,utb double UT1 as a 2-part Julian Date (Note 1) ** x,y double Celestial Intermediate Pole (Note 2) ** xp,yp double coordinates of the pole (radians, Note 3) ** ** Returned: ** rc2t double[3][3] celestial-to-terrestrial matrix (Note 4) ** ** Notes: ** ** 1) The TT and UT1 dates tta+ttb and uta+utb are Julian Dates, ** apportioned in any convenient way between the arguments uta and ** utb. For example, JD(UT1)=2450123.7 could be expressed in any o ** these ways, among others: ** ** uta utb ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution is ** acceptable. The J2000 and MJD methods are good compromises ** between resolution and convenience. In the case of uta,utb, the ** date & time method is best matched to the Earth rotation angle ** algorithm used: maximum precision is delivered when the uta ** argument is for 0hrs UT1 on the day in question and the utb ** argument lies in the range 0 to 1, or vice versa. ** ** 2) The Celestial Intermediate Pole coordinates are the x,y ** components of the unit vector in the Geocentric Celestial ** Reference System. ** ** 3) The arguments xp and yp are the coordinates (in radians) of the ** Celestial Intermediate Pole with respect to the International ** Terrestrial Reference System (see IERS Conventions 2003), ** measured along the meridians to 0 and 90 deg west respectively. ** ** 4) The matrix rc2t transforms from celestial to terrestrial ** coordinates: ** ** [TRS] = RPOM * R_3(ERA) * RC2I * [CRS] ** ** = rc2t * [CRS] ** ** where [CRS] is a vector in the Geocentric Celestial Reference ** System and [TRS] is a vector in the International Terrestrial ** Reference System (see IERS Conventions 2003), ERA is the Earth ** Rotation Angle and RPOM is the polar motion matrix. ** ** 5) Although its name does not include "00", This function is in fact ** specific to the IAU 2000 models. ** ** Called: ** eraC2ixy celestial-to-intermediate matrix, given X,Y ** eraEra00 Earth rotation angle, IAU 2000 ** eraSp00 the TIO locator s', IERS 2000 ** eraPom00 polar motion matrix ** eraC2tcio form CIO-based celestial-to-terrestrial matrix ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rc2i[3][3], era, sp, rpom[3][3]; /* Form the celestial-to-intermediate matrix for this TT. */ eraC2ixy(tta, ttb, x, y, rc2i); /* Predict the Earth rotation angle for this UT1. */ era = eraEra00(uta, utb); /* Estimate s'. */ sp = eraSp00(tta, ttb); /* Form the polar motion matrix. */ eraPom00(xp, yp, sp, rpom); /* Combine to form the celestial-to-terrestrial matrix. */ eraC2tcio(rc2i, era, rpom, rc2t); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/gst94.c0000644001134200020070000001300312640262015017615 0ustar embrayscience00000000000000#include "erfa.h" double eraGst94(double uta, double utb) /* ** - - - - - - - - - ** e r a G s t 9 4 ** - - - - - - - - - ** ** Greenwich apparent sidereal time (consistent with IAU 1982/94 ** resolutions). ** ** Given: ** uta,utb double UT1 as a 2-part Julian Date (Notes 1,2) ** ** Returned (function value): ** double Greenwich apparent sidereal time (radians) ** ** Notes: ** ** 1) The UT1 date uta+utb is a Julian Date, apportioned in any ** convenient way between the argument pair. For example, ** JD=2450123.7 could be expressed in any of these ways, among ** others: ** ** uta utb ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 and MJD methods are good compromises ** between resolution and convenience. For UT, the date & time ** method is best matched to the algorithm that is used by the Earth ** Rotation Angle function, called internally: maximum precision is ** delivered when the uta argument is for 0hrs UT1 on the day in ** question and the utb argument lies in the range 0 to 1, or vice ** versa. ** ** 2) The result is compatible with the IAU 1982 and 1994 resolutions, ** except that accuracy has been compromised for the sake of ** convenience in that UT is used instead of TDB (or TT) to compute ** the equation of the equinoxes. ** ** 3) This GAST must be used only in conjunction with contemporaneous ** IAU standards such as 1976 precession, 1980 obliquity and 1982 ** nutation. It is not compatible with the IAU 2000 resolutions. ** ** 4) The result is returned in the range 0 to 2pi. ** ** Called: ** eraGmst82 Greenwich mean sidereal time, IAU 1982 ** eraEqeq94 equation of the equinoxes, IAU 1994 ** eraAnp normalize angle into range 0 to 2pi ** ** References: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992) ** ** IAU Resolution C7, Recommendation 3 (1994) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double gmst82, eqeq94, gst; gmst82 = eraGmst82(uta, utb); eqeq94 = eraEqeq94(uta, utb); gst = eraAnp(gmst82 + eqeq94); return gst; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2i00b.c0000644001134200020070000001341112640262015017625 0ustar embrayscience00000000000000#include "erfa.h" void eraC2i00b(double date1, double date2, double rc2i[3][3]) /* ** - - - - - - - - - - ** e r a C 2 i 0 0 b ** - - - - - - - - - - ** ** Form the celestial-to-intermediate matrix for a given date using the ** IAU 2000B precession-nutation model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** rc2i double[3][3] celestial-to-intermediate matrix (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix rc2i is the first stage in the transformation from ** celestial to terrestrial coordinates: ** ** [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] ** ** = rc2t * [CRS] ** ** where [CRS] is a vector in the Geocentric Celestial Reference ** System and [TRS] is a vector in the International Terrestrial ** Reference System (see IERS Conventions 2003), ERA is the Earth ** Rotation Angle and RPOM is the polar motion matrix. ** ** 3) The present function is faster, but slightly less accurate (about ** 1 mas), than the eraC2i00a function. ** ** Called: ** eraPnm00b classical NPB matrix, IAU 2000B ** eraC2ibpn celestial-to-intermediate matrix, given NPB matrix ** ** References: ** ** "Expressions for the Celestial Intermediate Pole and Celestial ** Ephemeris Origin consistent with the IAU 2000A precession- ** nutation model", Astron.Astrophys. 400, 1145-1154 ** (2003) ** ** n.b. The celestial ephemeris origin (CEO) was renamed "celestial ** intermediate origin" (CIO) by IAU 2006 Resolution 2. ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double rbpn[3][3]; /* Obtain the celestial-to-true matrix (IAU 2000B). */ eraPnm00b(date1, date2, rbpn); /* Form the celestial-to-intermediate matrix. */ eraC2ibpn(date1, date2, rbpn, rc2i); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/c2ixy.c0000644001134200020070000001310212640262015017701 0ustar embrayscience00000000000000#include "erfa.h" void eraC2ixy(double date1, double date2, double x, double y, double rc2i[3][3]) /* ** - - - - - - - - - ** e r a C 2 i x y ** - - - - - - - - - ** ** Form the celestial to intermediate-frame-of-date matrix for a given ** date when the CIP X,Y coordinates are known. IAU 2000. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** x,y double Celestial Intermediate Pole (Note 2) ** ** Returned: ** rc2i double[3][3] celestial-to-intermediate matrix (Note 3) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The Celestial Intermediate Pole coordinates are the x,y components ** of the unit vector in the Geocentric Celestial Reference System. ** ** 3) The matrix rc2i is the first stage in the transformation from ** celestial to terrestrial coordinates: ** ** [TRS] = RPOM * R_3(ERA) * rc2i * [CRS] ** ** = RC2T * [CRS] ** ** where [CRS] is a vector in the Geocentric Celestial Reference ** System and [TRS] is a vector in the International Terrestrial ** Reference System (see IERS Conventions 2003), ERA is the Earth ** Rotation Angle and RPOM is the polar motion matrix. ** ** 4) Although its name does not include "00", This function is in fact ** specific to the IAU 2000 models. ** ** Called: ** eraC2ixys celestial-to-intermediate matrix, given X,Y and s ** eraS00 the CIO locator s, given X,Y, IAU 2000A ** ** Reference: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Compute s and then the matrix. */ eraC2ixys(x, y, eraS00(date1, date2, x, y), rc2i); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/tdbtcb.c0000644001134200020070000001305712640262015020116 0ustar embrayscience00000000000000#include "erfa.h" int eraTdbtcb(double tdb1, double tdb2, double *tcb1, double *tcb2) /* ** - - - - - - - - - - ** e r a T d b t c b ** - - - - - - - - - - ** ** Time scale transformation: Barycentric Dynamical Time, TDB, to ** Barycentric Coordinate Time, TCB. ** ** Given: ** tdb1,tdb2 double TDB as a 2-part Julian Date ** ** Returned: ** tcb1,tcb2 double TCB as a 2-part Julian Date ** ** Returned (function value): ** int status: 0 = OK ** ** Notes: ** ** 1) tdb1+tdb2 is Julian Date, apportioned in any convenient way ** between the two arguments, for example where tdb1 is the Julian ** Day Number and tdb2 is the fraction of a day. The returned ** tcb1,tcb2 follow suit. ** ** 2) The 2006 IAU General Assembly introduced a conventional linear ** transformation between TDB and TCB. This transformation ** compensates for the drift between TCB and terrestrial time TT, ** and keeps TDB approximately centered on TT. Because the ** relationship between TT and TCB depends on the adopted solar ** system ephemeris, the degree of alignment between TDB and TT over ** long intervals will vary according to which ephemeris is used. ** Former definitions of TDB attempted to avoid this problem by ** stipulating that TDB and TT should differ only by periodic ** effects. This is a good description of the nature of the ** relationship but eluded precise mathematical formulation. The ** conventional linear relationship adopted in 2006 sidestepped ** these difficulties whilst delivering a TDB that in practice was ** consistent with values before that date. ** ** 3) TDB is essentially the same as Teph, the time argument for the ** JPL solar system ephemerides. ** ** Reference: ** ** IAU 2006 Resolution B3 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */ static const double t77td = ERFA_DJM0 + ERFA_DJM77; static const double t77tf = ERFA_TTMTAI/ERFA_DAYSEC; /* TDB (days) at TAI 1977 Jan 1.0 */ static const double tdb0 = ERFA_TDB0/ERFA_DAYSEC; /* TDB to TCB rate */ static const double elbb = ERFA_ELB/(1.0-ERFA_ELB); double d, f; /* Result, preserving date format but safeguarding precision. */ if ( tdb1 > tdb2 ) { d = t77td - tdb1; f = tdb2 - tdb0; *tcb1 = tdb1; *tcb2 = f - ( d - ( f - t77tf ) ) * elbb; } else { d = t77td - tdb2; f = tdb1 - tdb0; *tcb1 = f + ( d - ( f - t77tf ) ) * elbb; *tcb2 = tdb2; } /* Status (always OK). */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/tdbtt.c0000644001134200020070000001142512640262015017772 0ustar embrayscience00000000000000#include "erfa.h" int eraTdbtt(double tdb1, double tdb2, double dtr, double *tt1, double *tt2 ) /* ** - - - - - - - - - ** e r a T d b t t ** - - - - - - - - - ** ** Time scale transformation: Barycentric Dynamical Time, TDB, to ** Terrestrial Time, TT. ** ** Given: ** tdb1,tdb2 double TDB as a 2-part Julian Date ** dtr double TDB-TT in seconds ** ** Returned: ** tt1,tt2 double TT as a 2-part Julian Date ** ** Returned (function value): ** int status: 0 = OK ** ** Notes: ** ** 1) tdb1+tdb2 is Julian Date, apportioned in any convenient way ** between the two arguments, for example where tdb1 is the Julian ** Day Number and tdb2 is the fraction of a day. The returned ** tt1,tt2 follow suit. ** ** 2) The argument dtr represents the quasi-periodic component of the ** GR transformation between TT and TCB. It is dependent upon the ** adopted solar-system ephemeris, and can be obtained by numerical ** integration, by interrogating a precomputed time ephemeris or by ** evaluating a model such as that implemented in the ERFA function ** eraDtdb. The quantity is dominated by an annual term of 1.7 ms ** amplitude. ** ** 3) TDB is essentially the same as Teph, the time argument for the ** JPL solar system ephemerides. ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** IAU 2006 Resolution 3 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dtrd; /* Result, safeguarding precision. */ dtrd = dtr / ERFA_DAYSEC; if ( tdb1 > tdb2 ) { *tt1 = tdb1; *tt2 = tdb2 - dtrd; } else { *tt1 = tdb1 - dtrd; *tt2 = tdb2; } /* Status (always OK). */ return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pv2p.c0000644001134200020070000000663012640262015017542 0ustar embrayscience00000000000000#include "erfa.h" void eraPv2p(double pv[2][3], double p[3]) /* ** - - - - - - - - ** e r a P v 2 p ** - - - - - - - - ** ** Discard velocity component of a pv-vector. ** ** Given: ** pv double[2][3] pv-vector ** ** Returned: ** p double[3] p-vector ** ** Called: ** eraCp copy p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraCp(pv[0], p); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ee00a.c0000644001134200020070000001301112640262015017534 0ustar embrayscience00000000000000#include "erfa.h" double eraEe00a(double date1, double date2) /* ** - - - - - - - - - ** e r a E e 0 0 a ** - - - - - - - - - ** ** Equation of the equinoxes, compatible with IAU 2000 resolutions. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned (function value): ** double equation of the equinoxes (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The result, which is in radians, operates in the following sense: ** ** Greenwich apparent ST = GMST + equation of the equinoxes ** ** 3) The result is compatible with the IAU 2000 resolutions. For ** further details, see IERS Conventions 2003 and Capitaine et al. ** (2002). ** ** Called: ** eraPr00 IAU 2000 precession adjustments ** eraObl80 mean obliquity, IAU 1980 ** eraNut00a nutation, IAU 2000A ** eraEe00 equation of the equinoxes, IAU 2000 ** ** References: ** ** Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to ** implement the IAU 2000 definition of UT1", Astronomy & ** Astrophysics, 406, 1135-1149 (2003). ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dpsipr, depspr, epsa, dpsi, deps, ee; /* IAU 2000 precession-rate adjustments. */ eraPr00(date1, date2, &dpsipr, &depspr); /* Mean obliquity, consistent with IAU 2000 precession-nutation. */ epsa = eraObl80(date1, date2) + depspr; /* Nutation in longitude. */ eraNut00a(date1, date2, &dpsi, &deps); /* Equation of the equinoxes. */ ee = eraEe00(date1, date2, epsa, dpsi); return ee; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/bpn2xy.c0000644001134200020070000001040612640262015020071 0ustar embrayscience00000000000000#include "erfa.h" void eraBpn2xy(double rbpn[3][3], double *x, double *y) /* ** - - - - - - - - - - ** e r a B p n 2 x y ** - - - - - - - - - - ** ** Extract from the bias-precession-nutation matrix the X,Y coordinates ** of the Celestial Intermediate Pole. ** ** Given: ** rbpn double[3][3] celestial-to-true matrix (Note 1) ** ** Returned: ** x,y double Celestial Intermediate Pole (Note 2) ** ** Notes: ** ** 1) The matrix rbpn transforms vectors from GCRS to true equator (and ** CIO or equinox) of date, and therefore the Celestial Intermediate ** Pole unit vector is the bottom row of the matrix. ** ** 2) The arguments x,y are components of the Celestial Intermediate ** Pole unit vector in the Geocentric Celestial Reference System. ** ** Reference: ** ** "Expressions for the Celestial Intermediate Pole and Celestial ** Ephemeris Origin consistent with the IAU 2000A precession- ** nutation model", Astron.Astrophys. 400, 1145-1154 ** (2003) ** ** n.b. The celestial ephemeris origin (CEO) was renamed "celestial ** intermediate origin" (CIO) by IAU 2006 Resolution 2. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Extract the X,Y coordinates. */ *x = rbpn[2][0]; *y = rbpn[2][1]; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/atoiq.c0000644001134200020070000002307112640262015017766 0ustar embrayscience00000000000000#include "erfa.h" void eraAtoiq(const char *type, double ob1, double ob2, eraASTROM *astrom, double *ri, double *di) /* ** - - - - - - - - - ** e r a A t o i q ** - - - - - - - - - ** ** Quick observed place to CIRS, given the star-independent astrometry ** parameters. ** ** Use of this function is appropriate when efficiency is important and ** where many star positions are all to be transformed for one date. ** The star-independent astrometry parameters can be obtained by ** calling eraApio[13] or eraApco[13]. ** ** Given: ** type char[] type of coordinates: "R", "H" or "A" (Note 1) ** ob1 double observed Az, HA or RA (radians; Az is N=0,E=90) ** ob2 double observed ZD or Dec (radians) ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double longitude + s' (radians) ** xpl double polar motion xp wrt local meridian (radians) ** ypl double polar motion yp wrt local meridian (radians) ** sphi double sine of geodetic latitude ** cphi double cosine of geodetic latitude ** diurab double magnitude of diurnal aberration vector ** eral double "local" Earth rotation angle (radians) ** refa double refraction constant A (radians) ** refb double refraction constant B (radians) ** ** Returned: ** ri double* CIRS right ascension (CIO-based, radians) ** di double* CIRS declination (radians) ** ** Notes: ** ** 1) "Observed" Az,El means the position that would be seen by a ** perfect geodetically aligned theodolite. This is related to ** the observed HA,Dec via the standard rotation, using the geodetic ** latitude (corrected for polar motion), while the observed HA and ** RA are related simply through the Earth rotation angle and the ** site longitude. "Observed" RA,Dec or HA,Dec thus means the ** position that would be seen by a perfect equatorial with its ** polar axis aligned to the Earth's axis of rotation. By removing ** from the observed place the effects of atmospheric refraction and ** diurnal aberration, the CIRS RA,Dec is obtained. ** ** 2) Only the first character of the type argument is significant. ** "R" or "r" indicates that ob1 and ob2 are the observed right ** ascension and declination; "H" or "h" indicates that they are ** hour angle (west +ve) and declination; anything else ("A" or ** "a" is recommended) indicates that ob1 and ob2 are azimuth (north ** zero, east 90 deg) and zenith distance. (Zenith distance is used ** rather than altitude in order to reflect the fact that no ** allowance is made for depression of the horizon.) ** ** 3) The accuracy of the result is limited by the corrections for ** refraction, which use a simple A*tan(z) + B*tan^3(z) model. ** Providing the meteorological parameters are known accurately and ** there are no gross local effects, the predicted observed ** coordinates should be within 0.05 arcsec (optical) or 1 arcsec ** (radio) for a zenith distance of less than 70 degrees, better ** than 30 arcsec (optical or radio) at 85 degrees and better than ** 20 arcmin (optical) or 30 arcmin (radio) at the horizon. ** ** Without refraction, the complementary functions eraAtioq and ** eraAtoiq are self-consistent to better than 1 microarcsecond all ** over the celestial sphere. With refraction included, consistency ** falls off at high zenith distances, but is still better than ** 0.05 arcsec at 85 degrees. ** ** 4) It is advisable to take great care with units, as even unlikely ** values of the input parameters are accepted and processed in ** accordance with the models used. ** ** Called: ** eraS2c spherical coordinates to unit vector ** eraC2s p-vector to spherical ** eraAnp normalize angle into range 0 to 2pi ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int c; double c1, c2, sphi, cphi, ce, xaeo, yaeo, zaeo, v[3], xmhdo, ymhdo, zmhdo, az, sz, zdo, refa, refb, tz, dref, zdt, xaet, yaet, zaet, xmhda, ymhda, zmhda, f, xhd, yhd, zhd, xpl, ypl, w, hma; /* Coordinate type. */ c = (int) type[0]; /* Coordinates. */ c1 = ob1; c2 = ob2; /* Sin, cos of latitude. */ sphi = astrom->sphi; cphi = astrom->cphi; /* Standardize coordinate type. */ if ( c == 'r' || c == 'R' ) { c = 'R'; } else if ( c == 'h' || c == 'H' ) { c = 'H'; } else { c = 'A'; } /* If Az,ZD, convert to Cartesian (S=0,E=90). */ if ( c == 'A' ) { ce = sin(c2); xaeo = - cos(c1) * ce; yaeo = sin(c1) * ce; zaeo = cos(c2); } else { /* If RA,Dec, convert to HA,Dec. */ if ( c == 'R' ) c1 = astrom->eral - c1; /* To Cartesian -HA,Dec. */ eraS2c ( -c1, c2, v ); xmhdo = v[0]; ymhdo = v[1]; zmhdo = v[2]; /* To Cartesian Az,El (S=0,E=90). */ xaeo = sphi*xmhdo - cphi*zmhdo; yaeo = ymhdo; zaeo = cphi*xmhdo + sphi*zmhdo; } /* Azimuth (S=0,E=90). */ az = ( xaeo != 0.0 || yaeo != 0.0 ) ? atan2(yaeo,xaeo) : 0.0; /* Sine of observed ZD, and observed ZD. */ sz = sqrt ( xaeo*xaeo + yaeo*yaeo ); zdo = atan2 ( sz, zaeo ); /* ** Refraction ** ---------- */ /* Fast algorithm using two constant model. */ refa = astrom->refa; refb = astrom->refb; tz = sz / zaeo; dref = ( refa + refb*tz*tz ) * tz; zdt = zdo + dref; /* To Cartesian Az,ZD. */ ce = sin(zdt); xaet = cos(az) * ce; yaet = sin(az) * ce; zaet = cos(zdt); /* Cartesian Az,ZD to Cartesian -HA,Dec. */ xmhda = sphi*xaet + cphi*zaet; ymhda = yaet; zmhda = - cphi*xaet + sphi*zaet; /* Diurnal aberration. */ f = ( 1.0 + astrom->diurab*ymhda ); xhd = f * xmhda; yhd = f * ( ymhda - astrom->diurab ); zhd = f * zmhda; /* Polar motion. */ xpl = astrom->xpl; ypl = astrom->ypl; w = xpl*xhd - ypl*yhd + zhd; v[0] = xhd - xpl*w; v[1] = yhd + ypl*w; v[2] = w - ( xpl*xpl + ypl*ypl ) * zhd; /* To spherical -HA,Dec. */ eraC2s(v, &hma, di); /* Right ascension. */ *ri = eraAnp(astrom->eral + hma); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ldn.c0000644001134200020070000001632112640262015017426 0ustar embrayscience00000000000000#include "erfa.h" void eraLdn(int n, eraLDBODY b[], double ob[3], double sc[3], double sn[3]) /*+ ** - - - - - - - ** e r a L d n ** - - - - - - - ** ** For a star, apply light deflection by multiple solar-system bodies, ** as part of transforming coordinate direction into natural direction. ** ** Given: ** n int number of bodies (note 1) ** b eraLDBODY[n] data for each of the n bodies (Notes 1,2): ** bm double mass of the body (solar masses, Note 3) ** dl double deflection limiter (Note 4) ** pv [2][3] barycentric PV of the body (au, au/day) ** ob double[3] barycentric position of the observer (au) ** sc double[3] observer to star coord direction (unit vector) ** ** Returned: ** sn double[3] observer to deflected star (unit vector) ** ** 1) The array b contains n entries, one for each body to be ** considered. If n = 0, no gravitational light deflection will be ** applied, not even for the Sun. ** ** 2) The array b should include an entry for the Sun as well as for ** any planet or other body to be taken into account. The entries ** should be in the order in which the light passes the body. ** ** 3) In the entry in the b array for body i, the mass parameter ** b[i].bm can, as required, be adjusted in order to allow for such ** effects as quadrupole field. ** ** 4) The deflection limiter parameter b[i].dl is phi^2/2, where phi is ** the angular separation (in radians) between star and body at ** which limiting is applied. As phi shrinks below the chosen ** threshold, the deflection is artificially reduced, reaching zero ** for phi = 0. Example values suitable for a terrestrial ** observer, together with masses, are as follows: ** ** body i b[i].bm b[i].dl ** ** Sun 1.0 6e-6 ** Jupiter 0.00095435 3e-9 ** Saturn 0.00028574 3e-10 ** ** 5) For cases where the starlight passes the body before reaching the ** observer, the body is placed back along its barycentric track by ** the light time from that point to the observer. For cases where ** the body is "behind" the observer no such shift is applied. If ** a different treatment is preferred, the user has the option of ** instead using the eraLd function. Similarly, eraLd can be used ** for cases where the source is nearby, not a star. ** ** 6) The returned vector sn is not normalized, but the consequential ** departure from unit magnitude is always negligible. ** ** 7) The arguments sc and sn can be the same array. ** ** 8) For efficiency, validation is omitted. The supplied masses must ** be greater than zero, the position and velocity vectors must be ** right, and the deflection limiter greater than zero. ** ** Reference: ** ** Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to ** the Astronomical Almanac, 3rd ed., University Science Books ** (2013), Section 7.2.4. ** ** Called: ** eraCp copy p-vector ** eraPdp scalar product of two p-vectors ** eraPmp p-vector minus p-vector ** eraPpsp p-vector plus scaled p-vector ** eraPn decompose p-vector into modulus and direction ** eraLd light deflection by a solar-system body ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Light time for 1 AU (days) */ const double CR = ERFA_AULT/ERFA_DAYSEC; int i; double v[3], dt, ev[3], em, e[3]; /* Star direction prior to deflection. */ eraCp(sc, sn); /* Body by body. */ for ( i = 0; i < n; i++ ) { /* Body to observer vector at epoch of observation (au). */ eraPmp ( ob, b[i].pv[0], v ); /* Minus the time since the light passed the body (days). */ dt = eraPdp(sn,v) * CR; /* Neutralize if the star is "behind" the observer. */ dt = ERFA_GMIN(dt, 0.0); /* Backtrack the body to the time the light was passing the body. */ eraPpsp(v, -dt, b[i].pv[1], ev); /* Body to observer vector as magnitude and direction. */ eraPn(ev, &em, e); /* Apply light deflection for this body. */ eraLd ( b[i].bm, sn, sn, e, em, b[i].dl, sn ); /* Next body. */ } /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ir.c0000644001134200020070000000664412640262015017272 0ustar embrayscience00000000000000#include "erfa.h" void eraIr(double r[3][3]) /* ** - - - - - - ** e r a I r ** - - - - - - ** ** Initialize an r-matrix to the identity matrix. ** ** Returned: ** r double[3][3] r-matrix ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { r[0][0] = 1.0; r[0][1] = 0.0; r[0][2] = 0.0; r[1][0] = 0.0; r[1][1] = 1.0; r[1][2] = 0.0; r[2][0] = 0.0; r[2][1] = 0.0; r[2][2] = 1.0; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pn06a.c0000644001134200020070000001523612640262015017601 0ustar embrayscience00000000000000#include "erfa.h" void eraPn06a(double date1, double date2, double *dpsi, double *deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]) /* ** - - - - - - - - - ** e r a P n 0 6 a ** - - - - - - - - - ** ** Precession-nutation, IAU 2006/2000A models: a multi-purpose function, ** supporting classical (equinox-based) use directly and CIO-based use ** indirectly. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** dpsi,deps double nutation (Note 2) ** epsa double mean obliquity (Note 3) ** rb double[3][3] frame bias matrix (Note 4) ** rp double[3][3] precession matrix (Note 5) ** rbp double[3][3] bias-precession matrix (Note 6) ** rn double[3][3] nutation matrix (Note 7) ** rbpn double[3][3] GCRS-to-true matrix (Notes 8,9) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The nutation components (luni-solar + planetary, IAU 2000A) in ** longitude and obliquity are in radians and with respect to the ** equinox and ecliptic of date. Free core nutation is omitted; ** for the utmost accuracy, use the eraPn06 function, where the ** nutation components are caller-specified. ** ** 3) The mean obliquity is consistent with the IAU 2006 precession. ** ** 4) The matrix rb transforms vectors from GCRS to mean J2000.0 by ** applying frame bias. ** ** 5) The matrix rp transforms vectors from mean J2000.0 to mean of ** date by applying precession. ** ** 6) The matrix rbp transforms vectors from GCRS to mean of date by ** applying frame bias then precession. It is the product rp x rb. ** ** 7) The matrix rn transforms vectors from mean of date to true of ** date by applying the nutation (luni-solar + planetary). ** ** 8) The matrix rbpn transforms vectors from GCRS to true of date ** (CIP/equinox). It is the product rn x rbp, applying frame bias, ** precession and nutation in that order. ** ** 9) The X,Y,Z coordinates of the IAU 2006/2000A Celestial ** Intermediate Pole are elements (3,1-3) of the GCRS-to-true ** matrix, i.e. rbpn[2][0-2]. ** ** 10) It is permissible to re-use the same array in the returned ** arguments. The arrays are filled in the stated order. ** ** Called: ** eraNut06a nutation, IAU 2006/2000A ** eraPn06 bias/precession/nutation results, IAU 2006 ** ** Reference: ** ** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Nutation. */ eraNut06a(date1, date2, dpsi, deps); /* Remaining results. */ eraPn06(date1, date2, *dpsi, *deps, epsa, rb, rp, rbp, rn, rbpn); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pas.c0000644001134200020070000001007712640262015017436 0ustar embrayscience00000000000000#include "erfa.h" double eraPas(double al, double ap, double bl, double bp) /* ** - - - - - - - ** e r a P a s ** - - - - - - - ** ** Position-angle from spherical coordinates. ** ** Given: ** al double longitude of point A (e.g. RA) in radians ** ap double latitude of point A (e.g. Dec) in radians ** bl double longitude of point B ** bp double latitude of point B ** ** Returned (function value): ** double position angle of B with respect to A ** ** Notes: ** ** 1) The result is the bearing (position angle), in radians, of point ** B with respect to point A. It is in the range -pi to +pi. The ** sense is such that if B is a small distance "east" of point A, ** the bearing is approximately +pi/2. ** ** 2) Zero is returned if the two points are coincident. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dl, x, y, pa; dl = bl - al; y = sin(dl) * cos(bp); x = sin(bp) * cos(ap) - cos(bp) * sin(ap) * cos(dl); pa = ((x != 0.0) || (y != 0.0)) ? atan2(y, x) : 0.0; return pa; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/ab.c0000644001134200020070000001203412640262015017230 0ustar embrayscience00000000000000#include "erfa.h" void eraAb(double pnat[3], double v[3], double s, double bm1, double ppr[3]) /* ** - - - - - - ** e r a A b ** - - - - - - ** ** Apply aberration to transform natural direction into proper ** direction. ** ** Given: ** pnat double[3] natural direction to the source (unit vector) ** v double[3] observer barycentric velocity in units of c ** s double distance between the Sun and the observer (au) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** ** Returned: ** ppr double[3] proper direction to source (unit vector) ** ** Notes: ** ** 1) The algorithm is based on Expr. (7.40) in the Explanatory ** Supplement (Urban & Seidelmann 2013), but with the following ** changes: ** ** o Rigorous rather than approximate normalization is applied. ** ** o The gravitational potential term from Expr. (7) in ** Klioner (2003) is added, taking into account only the Sun's ** contribution. This has a maximum effect of about ** 0.4 microarcsecond. ** ** 2) In almost all cases, the maximum accuracy will be limited by the ** supplied velocity. For example, if the ERFA eraEpv00 function is ** used, errors of up to 5 microarcseconds could occur. ** ** References: ** ** Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to ** the Astronomical Almanac, 3rd ed., University Science Books ** (2013). ** ** Klioner, Sergei A., "A practical relativistic model for micro- ** arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003). ** ** Called: ** eraPdp scalar product of two p-vectors ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int i; double pdv, w1, w2, r2, w, p[3], r; pdv = eraPdp(pnat, v); w1 = 1.0 + pdv/(1.0 + bm1); w2 = ERFA_SRS/s; r2 = 0.0; for (i = 0; i < 3; i++) { w = pnat[i]*bm1 + w1*v[i] + w2*(v[i] - pdv*pnat[i]); p[i] = w; r2 = r2 + w*w; } r = sqrt(r2); for (i = 0; i < 3; i++) { ppr[i] = p[i]/r; } /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/pvu.c0000644001134200020070000000746712640262015017476 0ustar embrayscience00000000000000#include "erfa.h" void eraPvu(double dt, double pv[2][3], double upv[2][3]) /* ** - - - - - - - ** e r a P v u ** - - - - - - - ** ** Update a pv-vector. ** ** Given: ** dt double time interval ** pv double[2][3] pv-vector ** ** Returned: ** upv double[2][3] p updated, v unchanged ** ** Notes: ** ** 1) "Update" means "refer the position component of the vector ** to a new date dt time units from the existing date". ** ** 2) The time units of dt must match those of the velocity. ** ** 3) It is permissible for pv and upv to be the same array. ** ** Called: ** eraPpsp p-vector plus scaled p-vector ** eraCp copy p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraPpsp(pv[0], dt, pv[1], upv[0]); eraCp(pv[1], upv[1]); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/epj.c0000644001134200020070000000743712640262015017437 0ustar embrayscience00000000000000#include "erfa.h" double eraEpj(double dj1, double dj2) /* ** - - - - - - - ** e r a E p j ** - - - - - - - ** ** Julian Date to Julian Epoch. ** ** Given: ** dj1,dj2 double Julian Date (see note) ** ** Returned (function value): ** double Julian Epoch ** ** Note: ** ** The Julian Date is supplied in two pieces, in the usual ERFA ** manner, which is designed to preserve time resolution. The ** Julian Date is available as a single number by adding dj1 and ** dj2. The maximum resolution is achieved if dj1 is 2451545.0 ** (J2000.0). ** ** Reference: ** ** Lieske, J.H., 1979, Astron.Astrophys. 73, 282. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double epj; epj = 2000.0 + ((dj1 - ERFA_DJ00) + dj2) / ERFA_DJY; return epj; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/p2pv.c0000644001134200020070000000673712640262015017552 0ustar embrayscience00000000000000#include "erfa.h" void eraP2pv(double p[3], double pv[2][3]) /* ** - - - - - - - - ** e r a P 2 p v ** - - - - - - - - ** ** Extend a p-vector to a pv-vector by appending a zero velocity. ** ** Given: ** p double[3] p-vector ** ** Returned: ** pv double[2][3] pv-vector ** ** Called: ** eraCp copy p-vector ** eraZp zero p-vector ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { eraCp(p, pv[0]); eraZp(pv[1]); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/apci13.c0000644001134200020070000002044612640262015017734 0ustar embrayscience00000000000000#include "erfa.h" void eraApci13(double date1, double date2, eraASTROM *astrom, double *eo) /* ** - - - - - - - - - - ** e r a A p c i 1 3 ** - - - - - - - - - - ** ** For a terrestrial observer, prepare star-independent astrometry ** parameters for transformations between ICRS and geocentric CIRS ** coordinates. The caller supplies the date, and ERFA models are used ** to predict the Earth ephemeris and CIP/CIO. ** ** The parameters produced by this function are required in the ** parallax, light deflection, aberration, and bias-precession-nutation ** parts of the astrometric transformation chain. ** ** Given: ** date1 double TDB as a 2-part... ** date2 double ...Julian Date (Note 1) ** ** Returned: ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double unchanged ** xpl double unchanged ** ypl double unchanged ** sphi double unchanged ** cphi double unchanged ** diurab double unchanged ** eral double unchanged ** refa double unchanged ** refb double unchanged ** eo double* equation of the origins (ERA-GST) ** ** Notes: ** ** 1) The TDB date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TDB)=2450123.7 could be expressed in any of these ways, among ** others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 method is best matched to the way the ** argument is handled internally and will deliver the optimum ** resolution. The MJD method and the date & time methods are both ** good compromises between resolution and convenience. For most ** applications of this function the choice will not be at all ** critical. ** ** TT can be used instead of TDB without any significant impact on ** accuracy. ** ** 2) All the vectors are with respect to BCRS axes. ** ** 3) In cases where the caller wishes to supply his own Earth ** ephemeris and CIP/CIO, the function eraApci can be used instead ** of the present function. ** ** 4) This is one of several functions that inserts into the astrom ** structure star-independent parameters needed for the chain of ** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. ** ** The various functions support different classes of observer and ** portions of the transformation chain: ** ** functions observer transformation ** ** eraApcg eraApcg13 geocentric ICRS <-> GCRS ** eraApci eraApci13 terrestrial ICRS <-> CIRS ** eraApco eraApco13 terrestrial ICRS <-> observed ** eraApcs eraApcs13 space ICRS <-> GCRS ** eraAper eraAper13 terrestrial update Earth rotation ** eraApio eraApio13 terrestrial CIRS <-> observed ** ** Those with names ending in "13" use contemporary ERFA models to ** compute the various ephemerides. The others accept ephemerides ** supplied by the caller. ** ** The transformation from ICRS to GCRS covers space motion, ** parallax, light deflection, and aberration. From GCRS to CIRS ** comprises frame bias and precession-nutation. From CIRS to ** observed takes account of Earth rotation, polar motion, diurnal ** aberration and parallax (unless subsumed into the ICRS <-> GCRS ** transformation), and atmospheric refraction. ** ** 5) The context structure astrom produced by this function is used by ** eraAtciq* and eraAticq*. ** ** Called: ** eraEpv00 Earth position and velocity ** eraPnm06a classical NPB matrix, IAU 2006/2000A ** eraBpn2xy extract CIP X,Y coordinates from NPB matrix ** eraS06 the CIO locator s, given X,Y, IAU 2006 ** eraApci astrometry parameters, ICRS-CIRS ** eraEors equation of the origins, given NPB matrix and s ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double ehpv[2][3], ebpv[2][3], r[3][3], x, y, s; /* Earth barycentric & heliocentric position/velocity (au, au/d). */ (void) eraEpv00(date1, date2, ehpv, ebpv); /* Form the equinox based BPN matrix, IAU 2006/2000A. */ eraPnm06a(date1, date2, r); /* Extract CIP X,Y. */ eraBpn2xy(r, &x, &y); /* Obtain CIO locator s. */ s = eraS06(date1, date2, x, y); /* Compute the star-independent astrometry parameters. */ eraApci(date1, date2, ebpv, ehpv[0], x, y, s, astrom); /* Equation of the origins. */ *eo = eraEors(r, s); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fasa03.c0000644001134200020070000001032212640262015017721 0ustar embrayscience00000000000000#include "erfa.h" double eraFasa03(double t) /* ** - - - - - - - - - - ** e r a F a s a 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Saturn. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double mean longitude of Saturn, radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003) and ** comes from Souchay et al. (1999) after Simon et al. (1994). ** ** References: ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M., ** Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683 ** ** Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999, ** Astron.Astrophys.Supp.Ser. 135, 111 ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* Mean longitude of Saturn (IERS Conventions 2003). */ a = fmod(0.874016757 + 21.3299104960 * t, ERFA_D2PI); return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fk5hip.c0000644001134200020070000001123012640262015020031 0ustar embrayscience00000000000000#include "erfa.h" void eraFk5hip(double r5h[3][3], double s5h[3]) /* ** - - - - - - - - - - ** e r a F k 5 h i p ** - - - - - - - - - - ** ** FK5 to Hipparcos rotation and spin. ** ** Returned: ** r5h double[3][3] r-matrix: FK5 rotation wrt Hipparcos (Note 2) ** s5h double[3] r-vector: FK5 spin wrt Hipparcos (Note 3) ** ** Notes: ** ** 1) This function models the FK5 to Hipparcos transformation as a ** pure rotation and spin; zonal errors in the FK5 catalogue are ** not taken into account. ** ** 2) The r-matrix r5h operates in the sense: ** ** P_Hipparcos = r5h x P_FK5 ** ** where P_FK5 is a p-vector in the FK5 frame, and P_Hipparcos is ** the equivalent Hipparcos p-vector. ** ** 3) The r-vector s5h represents the time derivative of the FK5 to ** Hipparcos rotation. The units are radians per year (Julian, ** TDB). ** ** Called: ** eraRv2m r-vector to r-matrix ** ** Reference: ** ** F.Mignard & M.Froeschle, Astron. Astrophys. 354, 732-739 (2000). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double v[3]; /* FK5 wrt Hipparcos orientation and spin (radians, radians/year) */ double epx, epy, epz; double omx, omy, omz; epx = -19.9e-3 * ERFA_DAS2R; epy = -9.1e-3 * ERFA_DAS2R; epz = 22.9e-3 * ERFA_DAS2R; omx = -0.30e-3 * ERFA_DAS2R; omy = 0.60e-3 * ERFA_DAS2R; omz = 0.70e-3 * ERFA_DAS2R; /* FK5 to Hipparcos orientation expressed as an r-vector. */ v[0] = epx; v[1] = epy; v[2] = epz; /* Re-express as an r-matrix. */ eraRv2m(v, r5h); /* Hipparcos wrt FK5 spin expressed as an r-vector. */ s5h[0] = omx; s5h[1] = omy; s5h[2] = omz; return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/apco13.c0000644001134200020070000003064412640262015017743 0ustar embrayscience00000000000000#include "erfa.h" int eraApco13(double utc1, double utc2, double dut1, double elong, double phi, double hm, double xp, double yp, double phpa, double tc, double rh, double wl, eraASTROM *astrom, double *eo) /* ** - - - - - - - - - - ** e r a A p c o 1 3 ** - - - - - - - - - - ** ** For a terrestrial observer, prepare star-independent astrometry ** parameters for transformations between ICRS and observed ** coordinates. The caller supplies UTC, site coordinates, ambient air ** conditions and observing wavelength, and ERFA models are used to ** obtain the Earth ephemeris, CIP/CIO and refraction constants. ** ** The parameters produced by this function are required in the ** parallax, light deflection, aberration, and bias-precession-nutation ** parts of the ICRS/CIRS transformations. ** ** Given: ** utc1 double UTC as a 2-part... ** utc2 double ...quasi Julian Date (Notes 1,2) ** dut1 double UT1-UTC (seconds, Note 3) ** elong double longitude (radians, east +ve, Note 4) ** phi double latitude (geodetic, radians, Note 4) ** hm double height above ellipsoid (m, geodetic, Notes 4,6) ** xp,yp double polar motion coordinates (radians, Note 5) ** phpa double pressure at the observer (hPa = mB, Note 6) ** tc double ambient temperature at the observer (deg C) ** rh double relative humidity at the observer (range 0-1) ** wl double wavelength (micrometers, Note 7) ** ** Returned: ** astrom eraASTROM* star-independent astrometry parameters: ** pmt double PM time interval (SSB, Julian years) ** eb double[3] SSB to observer (vector, au) ** eh double[3] Sun to observer (unit vector) ** em double distance from Sun to observer (au) ** v double[3] barycentric observer velocity (vector, c) ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor ** bpn double[3][3] bias-precession-nutation matrix ** along double longitude + s' (radians) ** xpl double polar motion xp wrt local meridian (radians) ** ypl double polar motion yp wrt local meridian (radians) ** sphi double sine of geodetic latitude ** cphi double cosine of geodetic latitude ** diurab double magnitude of diurnal aberration vector ** eral double "local" Earth rotation angle (radians) ** refa double refraction constant A (radians) ** refb double refraction constant B (radians) ** eo double* equation of the origins (ERA-GST) ** ** Returned (function value): ** int status: +1 = dubious year (Note 2) ** 0 = OK ** -1 = unacceptable date ** ** Notes: ** ** 1) utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any ** convenient way between the two arguments, for example where utc1 ** is the Julian Day Number and utc2 is the fraction of a day. ** ** However, JD cannot unambiguously represent UTC during a leap ** second unless special measures are taken. The convention in the ** present function is that the JD day represents UTC days whether ** the length is 86399, 86400 or 86401 SI seconds. ** ** Applications should use the function eraDtf2d to convert from ** calendar date and time of day into 2-part quasi Julian Date, as ** it implements the leap-second-ambiguity convention just ** described. ** ** 2) The warning status "dubious year" flags UTCs that predate the ** introduction of the time scale or that are too far in the ** future to be trusted. See eraDat for further details. ** ** 3) UT1-UTC is tabulated in IERS bulletins. It increases by exactly ** one second at the end of each positive UTC leap second, ** introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This ** practice is under review, and in the future UT1-UTC may grow ** essentially without limit. ** ** 4) The geographical coordinates are with respect to the ERFA_WGS84 ** reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the ** longitude required by the present function is east-positive ** (i.e. right-handed), in accordance with geographical convention. ** ** 5) The polar motion xp,yp can be obtained from IERS bulletins. The ** values are the coordinates (in radians) of the Celestial ** Intermediate Pole with respect to the International Terrestrial ** Reference System (see IERS Conventions 2003), measured along the ** meridians 0 and 90 deg west respectively. For many ** applications, xp and yp can be set to zero. ** ** Internally, the polar motion is stored in a form rotated onto ** the local meridian. ** ** 6) If hm, the height above the ellipsoid of the observing station ** in meters, is not known but phpa, the pressure in hPa (=mB), is ** available, an adequate estimate of hm can be obtained from the ** expression ** ** hm = -29.3 * tsl * log ( phpa / 1013.25 ); ** ** where tsl is the approximate sea-level air temperature in K ** (See Astrophysical Quantities, C.W.Allen, 3rd edition, section ** 52). Similarly, if the pressure phpa is not known, it can be ** estimated from the height of the observing station, hm, as ** follows: ** ** phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) ); ** ** Note, however, that the refraction is nearly proportional to ** the pressure and that an accurate phpa value is important for ** precise work. ** ** 7) The argument wl specifies the observing wavelength in ** micrometers. The transition from optical to radio is assumed to ** occur at 100 micrometers (about 3000 GHz). ** ** 8) It is advisable to take great care with units, as even unlikely ** values of the input parameters are accepted and processed in ** accordance with the models used. ** ** 9) In cases where the caller wishes to supply his own Earth ** ephemeris, Earth rotation information and refraction constants, ** the function eraApco can be used instead of the present function. ** ** 10) This is one of several functions that inserts into the astrom ** structure star-independent parameters needed for the chain of ** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed. ** ** The various functions support different classes of observer and ** portions of the transformation chain: ** ** functions observer transformation ** ** eraApcg eraApcg13 geocentric ICRS <-> GCRS ** eraApci eraApci13 terrestrial ICRS <-> CIRS ** eraApco eraApco13 terrestrial ICRS <-> observed ** eraApcs eraApcs13 space ICRS <-> GCRS ** eraAper eraAper13 terrestrial update Earth rotation ** eraApio eraApio13 terrestrial CIRS <-> observed ** ** Those with names ending in "13" use contemporary ERFA models to ** compute the various ephemerides. The others accept ephemerides ** supplied by the caller. ** ** The transformation from ICRS to GCRS covers space motion, ** parallax, light deflection, and aberration. From GCRS to CIRS ** comprises frame bias and precession-nutation. From CIRS to ** observed takes account of Earth rotation, polar motion, diurnal ** aberration and parallax (unless subsumed into the ICRS <-> GCRS ** transformation), and atmospheric refraction. ** ** 11) The context structure astrom produced by this function is used ** by eraAtioq, eraAtoiq, eraAtciq* and eraAticq*. ** ** Called: ** eraUtctai UTC to TAI ** eraTaitt TAI to TT ** eraUtcut1 UTC to UT1 ** eraEpv00 Earth position and velocity ** eraPnm06a classical NPB matrix, IAU 2006/2000A ** eraBpn2xy extract CIP X,Y coordinates from NPB matrix ** eraS06 the CIO locator s, given X,Y, IAU 2006 ** eraEra00 Earth rotation angle, IAU 2000 ** eraSp00 the TIO locator s', IERS 2000 ** eraRefco refraction constants for given ambient conditions ** eraApco astrometry parameters, ICRS-observed ** eraEors equation of the origins, given NPB matrix and s ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { int j; double tai1, tai2, tt1, tt2, ut11, ut12, ehpv[2][3], ebpv[2][3], r[3][3], x, y, s, theta, sp, refa, refb; /* UTC to other time scales. */ j = eraUtctai(utc1, utc2, &tai1, &tai2); if ( j < 0 ) return -1; j = eraTaitt(tai1, tai2, &tt1, &tt2); j = eraUtcut1(utc1, utc2, dut1, &ut11, &ut12); if ( j < 0 ) return -1; /* Earth barycentric & heliocentric position/velocity (au, au/d). */ (void) eraEpv00(tt1, tt2, ehpv, ebpv); /* Form the equinox based BPN matrix, IAU 2006/2000A. */ eraPnm06a(tt1, tt2, r); /* Extract CIP X,Y. */ eraBpn2xy(r, &x, &y); /* Obtain CIO locator s. */ s = eraS06(tt1, tt2, x, y); /* Earth rotation angle. */ theta = eraEra00(ut11, ut12); /* TIO locator s'. */ sp = eraSp00(tt1, tt2); /* Refraction constants A and B. */ eraRefco(phpa, tc, rh, wl, &refa, &refb); /* Compute the star-independent astrometry parameters. */ eraApco(tt1, tt2, ebpv, ehpv[0], x, y, s, theta, elong, phi, hm, xp, yp, sp, refa, refb, astrom); /* Equation of the origins. */ *eo = eraEors(r, s); /* Return any warning status. */ return j; /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/num00b.c0000644001134200020070000001220012640262015017742 0ustar embrayscience00000000000000#include "erfa.h" void eraNum00b(double date1, double date2, double rmatn[3][3]) /* ** - - - - - - - - - - ** e r a N u m 0 0 b ** - - - - - - - - - - ** ** Form the matrix of nutation for a given date, IAU 2000B model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** ** Returned: ** rmatn double[3][3] nutation matrix ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The matrix operates in the sense V(true) = rmatn * V(mean), where ** the p-vector V(true) is with respect to the true equatorial triad ** of date and the p-vector V(mean) is with respect to the mean ** equatorial triad of date. ** ** 3) The present function is faster, but slightly less accurate (about ** 1 mas), than the eraNum00a function. ** ** Called: ** eraPn00b bias/precession/nutation, IAU 2000B ** ** Reference: ** ** Explanatory Supplement to the Astronomical Almanac, ** P. Kenneth Seidelmann (ed), University Science Books (1992), ** Section 3.222-3 (p114). ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double dpsi, deps, epsa, rb[3][3], rp[3][3], rbp[3][3], rbpn[3][3]; /* Obtain the required matrix (discarding other results). */ eraPn00b(date1, date2, &dpsi, &deps, &epsa, rb, rp, rbp, rmatn, rbpn); return; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/af2a.c0000644001134200020070000001102412640262015017455 0ustar embrayscience00000000000000#include "erfa.h" #include int eraAf2a(char s, int ideg, int iamin, double asec, double *rad) /* ** - - - - - - - - ** e r a A f 2 a ** - - - - - - - - ** ** Convert degrees, arcminutes, arcseconds to radians. ** ** Given: ** s char sign: '-' = negative, otherwise positive ** ideg int degrees ** iamin int arcminutes ** asec double arcseconds ** ** Returned: ** rad double angle in radians ** ** Returned (function value): ** int status: 0 = OK ** 1 = ideg outside range 0-359 ** 2 = iamin outside range 0-59 ** 3 = asec outside range 0-59.999... ** ** Notes: ** ** 1) The result is computed even if any of the range checks fail. ** ** 2) Negative ideg, iamin and/or asec produce a warning status, but ** the absolute value is used in the conversion. ** ** 3) If there are multiple errors, the status value reflects only the ** first, the smallest taking precedence. ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Compute the interval. */ *rad = ( s == '-' ? -1.0 : 1.0 ) * ( 60.0 * ( 60.0 * ( (double) abs(ideg) ) + ( (double) abs(iamin) ) ) + fabs(asec) ) * ERFA_DAS2R; /* Validate arguments and return status. */ if ( ideg < 0 || ideg > 359 ) return 1; if ( iamin < 0 || iamin > 59 ) return 2; if ( asec < 0.0 || asec >= 60.0 ) return 3; return 0; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/atic13.c0000644001134200020070000001446312640262015017742 0ustar embrayscience00000000000000#include "erfa.h" void eraAtic13(double ri, double di, double date1, double date2, double *rc, double *dc, double *eo) /* ** - - - - - - - - - - ** e r a A t i c 1 3 ** - - - - - - - - - - ** ** Transform star RA,Dec from geocentric CIRS to ICRS astrometric. ** ** Given: ** ri,di double CIRS geocentric RA,Dec (radians) ** date1 double TDB as a 2-part... ** date2 double ...Julian Date (Note 1) ** ** Returned: ** rc,dc double ICRS astrometric RA,Dec (radians) ** eo double equation of the origins (ERA-GST, Note 4) ** ** Notes: ** ** 1) The TDB date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TDB)=2450123.7 could be expressed in any of these ways, among ** others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in cases ** where the loss of several decimal digits of resolution is ** acceptable. The J2000 method is best matched to the way the ** argument is handled internally and will deliver the optimum ** resolution. The MJD method and the date & time methods are both ** good compromises between resolution and convenience. For most ** applications of this function the choice will not be at all ** critical. ** ** TT can be used instead of TDB without any significant impact on ** accuracy. ** ** 2) Iterative techniques are used for the aberration and light ** deflection corrections so that the functions eraAtic13 (or ** eraAticq) and eraAtci13 (or eraAtciq) are accurate inverses; ** even at the edge of the Sun's disk the discrepancy is only about ** 1 nanoarcsecond. ** ** 3) The available accuracy is better than 1 milliarcsecond, limited ** mainly by the precession-nutation model that is used, namely ** IAU 2000A/2006. Very close to solar system bodies, additional ** errors of up to several milliarcseconds can occur because of ** unmodeled light deflection; however, the Sun's contribution is ** taken into account, to first order. The accuracy limitations of ** the ERFA function eraEpv00 (used to compute Earth position and ** velocity) can contribute aberration errors of up to ** 5 microarcseconds. Light deflection at the Sun's limb is ** uncertain at the 0.4 mas level. ** ** 4) Should the transformation to (equinox based) J2000.0 mean place ** be required rather than (CIO based) ICRS coordinates, subtract the ** equation of the origins from the returned right ascension: ** RA = RI - EO. (The eraAnp function can then be applied, as ** required, to keep the result in the conventional 0-2pi range.) ** ** Called: ** eraApci13 astrometry parameters, ICRS-CIRS, 2013 ** eraAticq quick CIRS to ICRS astrometric ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { /* Star-independent astrometry parameters */ eraASTROM astrom; /* Star-independent astrometry parameters. */ eraApci13(date1, date2, &astrom, eo); /* CIRS to ICRS astrometric. */ eraAticq(ri, di, &astrom, rc, dc); /* Finished. */ } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/cextern/erfa/fapa03.c0000644001134200020070000001030212640262015017714 0ustar embrayscience00000000000000#include "erfa.h" double eraFapa03(double t) /* ** - - - - - - - - - - ** e r a F a p a 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** general accumulated precession in longitude. ** ** Given: ** t double TDB, Julian centuries since J2000.0 (Note 1) ** ** Returned (function value): ** double general precession in longitude, radians (Note 2) ** ** Notes: ** ** 1) Though t is strictly TDB, it is usually more convenient to use ** TT, which makes no significant difference. ** ** 2) The expression used is as adopted in IERS Conventions (2003). It ** is taken from Kinoshita & Souchay (1990) and comes originally ** from Lieske et al. (1977). ** ** References: ** ** Kinoshita, H. and Souchay J. 1990, Celest.Mech. and Dyn.Astron. ** 48, 187 ** ** Lieske, J.H., Lederle, T., Fricke, W. & Morando, B. 1977, ** Astron.Astrophys. 58, 1-16 ** ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), ** IERS Technical Note No. 32, BKG (2004) ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** Derived, with permission, from the SOFA library. See notes at end of file. */ { double a; /* General accumulated precession in longitude. */ a = (0.024381750 + 0.00000538691 * t) * t; return a; } /*---------------------------------------------------------------------- ** ** ** Copyright (C) 2013-2015, NumFOCUS Foundation. ** All rights reserved. ** ** This library is derived, with permission, from the International ** Astronomical Union's "Standards of Fundamental Astronomy" library, ** available from http://www.iausofa.org. ** ** The ERFA version is intended to retain identical functionality to ** the SOFA library, but made distinct through different function and ** file names, as set out in the SOFA license conditions. The SOFA ** original has a role as a reference standard for the IAU and IERS, ** and consequently redistribution is permitted only in its unaltered ** state. The ERFA version is not subject to this restriction and ** therefore can be included in distributions which do not support the ** concept of "read only" software. ** ** Although the intent is to replicate the SOFA API (other than ** replacement of prefix names) and results (with the exception of ** bugs; any that are discovered will be fixed), SOFA is not ** responsible for any errors found in this version of the library. ** ** If you wish to acknowledge the SOFA heritage, please acknowledge ** that you are using a library derived from SOFA, rather than SOFA ** itself. ** ** ** TERMS AND CONDITIONS ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1 Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** ** 2 Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** 3 Neither the name of the Standards Of Fundamental Astronomy Board, ** the International Astronomical Union nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ** POSSIBILITY OF SUCH DAMAGE. ** */ astropy-1.1.1/astropy/0000755001134200020070000000000012644022135015617 5ustar embrayscience00000000000000astropy-1.1.1/astropy/time/0000755001134200020070000000000012644022135016555 5ustar embrayscience00000000000000astropy-1.1.1/astropy/time/erfa_time.py0000644001134200020070000000172212644020323021061 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module is a compatibility layer, mapping the `astropy._erfa` function names to the names used in the ``astropy/time/erfa_time.pyx`` wrapper that was used before `astropy._erfa` was implemented. This module will probably remove in a future version - either `time` will be changed to use names fully compatible with `astropy._erfa`, or `astropy._erfa` will gain the ability to have "official" aliases to match these names. """ from .._erfa import * d_tai_utc = dat jd_dtf = d2dtf dtf_jd = dtf2d tai_tt = taitt tcb_tdb = tcbtdb tcg_tt = tcgtt tdb_tcb = tdbtcb tt_tai = tttai tt_tcg = tttcg utc_tai = utctai tai_utc = taiutc tai_ut1 = taiut1 ut1_tai = ut1tai tt_ut1 = ttut1 ut1_tt = ut1tt tdb_tt = tdbtt tt_tdb = tttdb ut1_utc = ut1utc utc_ut1 = utcut1 d_tdb_tt = dtdb era_gd2gc = gd2gc era_gc2gd = gc2gd jd_julian_epoch = epj julian_epoch_jd = epj2jd jd_besselian_epoch = epb besselian_epoch_jd = epb2jd astropy-1.1.1/astropy/time/tests/0000755001134200020070000000000012644022135017717 5ustar embrayscience00000000000000astropy-1.1.1/astropy/time/tests/test_basic.py0000644001134200020070000012433012644020323022411 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS import copy import functools import sys import datetime import numpy as np from ...tests.helper import pytest, catch_warnings from ...extern import six from ...utils import isiterable from .. import (Time, ScaleValueError, erfa_time, TIME_SCALES, TimeString, TimezoneInfo) from ...coordinates import EarthLocation from ... import units as u try: import pytz HAS_PYTZ = True except ImportError: HAS_PYTZ = False allclose_jd = functools.partial(np.allclose, rtol=2. ** -52, atol=0) allclose_jd2 = functools.partial(np.allclose, rtol=2. ** -52, atol=2. ** -52) # 20 ps atol allclose_sec = functools.partial(np.allclose, rtol=2. ** -52, atol=2. ** -52 * 24 * 3600) # 20 ps atol allclose_year = functools.partial(np.allclose, rtol=2. ** -52, atol=0.) # 14 microsec at current epoch class TestBasic(): """Basic tests stemming from initial example and API reference""" def test_simple(self): times = ['1999-01-01 00:00:00.123456789', '2010-01-01 00:00:00'] t = Time(times, format='iso', scale='utc') assert (repr(t) == "

i!g>NCV>À>Éõ=ƒj)¼M8½¤“Á½¿|ç½Í˜Ã¾3¸¾J½Ê:ì¾"¾ ¾’½çW2½µRSÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>f5Y>*<¦üQ< ;Ò *> $¥>H=îÖG=Â’ñ=˜øg=̳=’o5>o>Yr>ƒÕR>Y²B=öI>=ɽ~=·]‡=Û ù=Ü ¬=– ?=Kï=…K=tõ9=uz[=­Hq=©¿i=°³c=1Þ=XÌ­<˜v±9¬ÑQºÖ·×»¯ëß;Èå><©j< "<Ϫ;2"ü¼r‰}¼×Kä¼U¾X¼…bá¼È༑¬Z¼Á¶‘½]–½ 3A½»·C½È. ½»̽kZ½[°ñ½ýļ2D;•| ¹¤<%Aº<’—u<¹Ì¬»E¿¼ƒ—x¼ÖQ¼é©<@¤>Ø+>˜¸>À[ç>”ÞO>&êà=Œ<¹ˆi½XÝ×½\¹*½Z_T½“罜Ám½›ï½xc½qꣽv®f½±‡¼z¤?¼btþ½CÔN½Å‹’½Ê9k½§ºv½iÂN½;ð½dí½V3¼Í/4¼˜™¼.¨»À†#;$6:æäY»f »›U:d£»œõº?9’;7¯Æ¼lÄr¼¸ì¼þÓ<–žÊ=‚uÕ>þS>Ò–>x&=çè=ã= nd¼¾ÐŒ½ÔÖ½ñŸp½ù¬¾ d¾¾(Ea¾hà¾giå¾~¸ï¾‰ó)¾©GÏ¿.zÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>yÞyLÔ>Ã|>ÖÖ}>²q8>_¬Á=ú=É"#=Ľ=²Ï=0g$=,=ŽÀ=(T=—÷=<=¢=(ž=G´=å<ŸXú ÿºÐ#ûº/V/;Œ <åö5<ìf´<¬b}»ò ¼©Pýyhʽ7m”½^а¼ç ޼ƽ–O½:”½¬õ*½®‘Ƚϙë½ä½ÝjÕ½—‰¿½¡¼ËQ,<. È<¿—­<×Y<³æ=·=A=²n;Õì¼¼ËÕ¼¤#˜»ïV <‚=Ágq=ì)8=ðåš=´PÁ<²D'»dQç;‰æ–<÷ž=š<&=‚\1<Íõ;Ü@®¼CX½»½a¿½QÞM½Q¦Õ½PGt½é3½…Bd½”l½Ê9ýÛĽÌý6½¥ƒ¦½%p½Ö@¼A„½8àǽ“Y½Þ½í)w½ÆëS½‘ꕽmï×½€:G½ZŸ½ML¯¼÷’¼ ô ;(༉é+¼ã1'²¼:ª¼—<̼ºl¼Ø ¼kļ³X¼ÙÙͽ} ¼½º»g’3={=NœH=¶©=Hõz<ë_!h>ÔÈH?7n?'×Å>û>™D@=ù™ô=¯Ü¨=ª#b=¯‡3=@fN<Å«<èÅ<›äó<0ªd<_Â<Šî¥;)þ½%Xp¼Q_-;…ÞØ=šzL=’§‘=,©;Éȼ.ÚE¼‡_‹6ãÇÙ<ðf‰=/ÄH=oç=ž›<0±l¼¨^·½îý½:TD½Q°B½Kܽ 4)½(ƽT¾Ÿ½—gF½Õ‘ǽ୽Ѭɽÿø“½”f½P¥¼í,ý½Šà½ØT¾¡Ð¾ ¢~½ÐËš½ŸØg½m‹z½[Ä*½G圼øÓL¼¼¼=)í]=#2Â<ýO»í*i¼Qb(¼Kye¼P¾Ÿ¼…¥x¼Ò$*¼:eq¼^» ¼’K¸½-½ ˽#âY¼ ~<'»=æl<œÒz<…Qo¼M©Þ¼X•Û½ À»çŒ¤¼ôžù¼º_ݽ#Zé½cø½˜\ƾ‡S¾gÌ;¾}…¾Ùò§ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½Ž‚U½|¼ ¼½¸Y¼×ÇL½9Ž–›½öY½æ¦´½Ç˜J½y–½jær¼ïëû|бU)>ÿåè?M È?X:Ý?'ì–>Ó4f>0‘î=‘œW=jð5=I»<Ën®;­5;ãß·< ò< 纲ç]»¾X'ºÞo'º»8Õ;xÄ/¼»s̼Χ޼Ëô˼²&¼kºw¿æº*c±¼×þH½Uå½—¯s½³/‚½›'½})d½€G(¼Ö¶¼½({½{…ñ½¥ͽßÁ¬½¤ËZ½“c½›ƒÉ½4X¼ó{¯<€ME=‹)=º–=V爼6=­¼T$¼¾;-:´óß<¡œ <·*²=´<²ÐO;‘ê꼛ϼ’Eƒ¼­Ñ>½€äí>ÿ-¹?8à‘?O”?)l>ÒÙ³>&’o=nˆx=' =3U¯¼ iÔ¼8^€»”]ô»5˜›»QÔ¼%î#¼tì¼™pk¼{޼ØܼYb,½ð¾¼íSټ¯-½n³¼œð¼¢ r¼ýa½ö½]ƒ§½o_½TìZ½>½2ëϼî:«½$iç½En[½ŠÚ&½šʽqîQ½„ù‹½J ¯½,v·¼å5?=Ä=™ò=µV„=wÚ´;¥]Ÿ»å†4¼5Ǽ{Ë@¹>û\<\ÃÃ<+»»ûÇR:¹éj;1–k»‹B8¼˜îQ¼ÏMô¼»»ó;-ñË<¬=„~»S˜ã¼·v;»ŒËù¼Œ@À¼[2‰¼íJU½I:Á½``K½–$“½«„ä½ÁµA½ê=’½ÀZ½Â“½¸~n½¯v¬½¾Iq½ß­ê½}´½Åq½Ù/:½ãÖ½’´Û½tĽS~¼ØŽ¥¼¥;V=w÷¸> „>Ù³>&=Ýœ0=ª¤)=bzÒ=a„µ<ÒÓ¼–X ½&!¼H] ½DÅg½UZ¾½%Å»¯q+»’_ ;P­ÉD}™>È¢‚>ï@?Ì•>á )> b>E=‚ó<椢;ïM®¼-P¼¤ý¼×çö¼LxȽ ++¼îÓº¼ú)»½N ǽhF½©¼—(ڼƵ½ o´½H…6½h¦ ½-C'½÷©½º×¼ù¾”½áá½B³á½9ý…½]Ö¬½X‰¸½1å¼¾*¼)ó^¼•Ýô½H/¨½/¿Ù½„¨œ½l=½ nɼ(¼=ùá=?„¸=“&‡=~3;pW¼m„ͼ¨qæ¼òh^»ŒÐÈ;Ì"n<†&<š4<†å<Ÿñ<^›x¼ç¼¾¦ ;€/;¹X<Ì7”5à>@.>nhG>Gúw=òG—=²¯ã=üH=*C^<Õ»Ò»Fá¼Ù¥:¼„÷©½%iͽ;Ræ½}ã弞üܼç^ˆ¼-D†8†a¨»®§¼œ‰O½  p½9ØØ½–E¼ÐƒJ½ ¦s½Žt¼é±Þ¼¦v¼‹Ê—½9”¹½Oܽi̼<$¼¡¼þ%ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½TY½¯i½ v½-zc½µ­ô½ˆßs½VTR¼ô@§¼ÔA¥¼i”²½æó½$Œ;;¤=:=PL=×Õ-=¸–I=ž 9=‹¿†<ÇI}¼m‹½B½\d“½?ä³½]U½aêÖ¼¶bS<ò¢Û=µ‚ =êýN>(L>cBð>­A\>Ê¥Æ> )­>iÇT>i¬=`ŒN<­.;pÞ鼚Œ¼œ¥x½7Ͻ½Šƒb½qið½T6¬½/oç½æ½ ü¼ÆÌ%¼`*´¼¨ŒÆ½#æ½q‰…½‰N÷½‘ïͽ‚+«½Ì3½­¼Ïƒ.½e C½LÂv½v` ½Ö½$L;*¾£;ÎUr=†)ºJTò¼ö ~½`~轆–ͽZ °¼[½<T9<Ö){<²J¡<ˆæf:ê&=¼"'æ¼æa¼Â¼y»ã†Þº‹<TÒ<¥8ø<ÀšH<ÆÍ<ÁVP;„]Ü;É»m<]ô=1OÃ=<=<k伎ðÚ¼]´I;ý—¼.Ø¼Žˆ¶¼‘T¼„Â×¼º¼Rd¼É<½F€½‡áѽ¤}\½ÈÅJ½ÉKˆ½²ÉJ¾> ¾ x ½÷¡C½Ò5½t¥ó½a ¼íUî½û¶»ùêâ<ªÇÑÄ>HaÚ>_ŸB>&vü=߯=ÂaF=”=I“¥<:˜ º§Ë(¼±…½0}ï½6G\½.ºÉ½Q¼Š¡«½MÊ©½Kòͼ+À”¼oy޽H8ƒ½fϽ®Q¼ÐŠä<$²'½Âƽ'ž¼çͼ®bu¼·€•½"Ûz¼ Q.=M,<–s<»Õ6B¼„¼çr‹ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=aR=•Ö=¥ ¾ŒsÚ½X¡A½«½¥¥½™É½w~½`Ÿ6½Zσ¼±‰¼°ë”¼üC³¼Óݼ5 …>MÆ>‹x©>Žu>ZÚM=æNÃ=E á<íÁ¼®È½3'½CJ½ˆÿ%½˜£5½°1þ½…E¯½A¼ ¼zÏý<Š÷Y<™Ëö;²ÕíºãJ»¼„§½@Âö½†8½½c f½% þ½[œe¼¢¶Ø¼òؽ{à°½s»G½‹ƒ½‘©ñ½ '&<Öá=ƒ~=‹*=:¸Ÿ:î'½$Hu»:½Ǫ»É7jºC½¼:{¼ »ìÅ»·´Ù¼{У½eæ¼VmX»,¶»?õÑ<I <Ï#Ž=x<þ·=/®¾=p}ú=‰,[=ˆ(Q=•B9=9Õ¼]Ó¼µ z¼š;»<¼¼›&¼º=ë¼H?]¼¿‘Ѽﲂ¼¼‚Ͻ-@¼Í&‘½6Ub½¡úñ½Ê]%½®,~½áuî¾оú½æ]H½™8÷½]Å> ß\>1û¥>*¶ž>f1=Û`S=±¼<=/-W<ã•»úý@¼`­½m+%½‰j½Léù½)w¼¾¥u¼ix̽' ¸½zA½€=ü½yÇG½˜$G½›§¼±…o¼«ïP¼âûè½?S"½+Û½™xh½ha¼¨,¼”ïÒ¼¤Ö=c•ß<êm¼@t¼Ž’¢¼äË¡ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=°Ý1=ovž=sû¡=]y=F¿/¼¬"Ô¼ÞfU¼Ï‘ǽP½/íO½M‰_½òR»Ë#;¡«:m¼;r”;ú9®<ÀÊ¢< à2<²ñO=/öè=€¯ÿ=¶›Ô=Þ„à=ò«¿=CîV<¿eE¼¨ÆÞ½ Ð^½|ž½ô¼ëýÒò>hÌ>q R>MÈì=çi°<µ©v¼GáU½49½>í^½W—k½¥þ½f½xÃ2½„W¡½'|r¼kÒ <œ=~<”Ô\ {[=㔥=–ÔN=Phç»áÀ¦¼Y²'¼º]Ó¼ŸY­¼ Ù~½¹™¼Ëtܼãð½0`ƒ½~¯j½A÷E¼ì ¨¼øZI½‹Êš½«\(½™P¥½ë›”½øuô¾ ­½²Æi½Š×ʼúÆl=]g=Ùºv><²=ã>CŸ=ðß>jì>5²±>JÌ=ê1Z=µË€=¬&M=xêU=¾Œ=­ ì<±¿7;ÜL8¼ÊƼòL¿½|½²Àó½ay¿¼.^Å<6N<ž¹ª#ò¼ë·¼…»(½&V½:T½²¤»ô_¼¾©½Bó©½9å.½rµQ¾a¾4Má¾zµ¾.P½eþé¼’f„ÿÿÿÿ¼Í?½;n½s¢ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¼ÆA¢=…âß=…¥=eŠF=7gè=6Mí=Mút¼¿`ͽAмîéØÙ[=¼a2=Aý»ª—¼Is¼™×B¼ßÞ¥½Ø—»g<è8‹=J³==/Ù=`ôÓ=ÆIe>^ä˜>‡°x>zŽ>þ<ç¼ë<¼û0N½VV­½Hì7½Léø½G ú½‡r½mbç½?l¼©G;c—<7Ò<Òi…<Ê<Ù<ÌP<g»%ªÇ»Uße¼+Ý(¼×+2¼K̼Π¼ÍÁÁ½iÙ½ô½œ÷¼‹ì˜<·Á=6˜=šØ=~Mf<*ñ¼ƒùw¼¼©<˜»£Ì<ˆ ð=æ<(»VÀ©¼ o2¼>~e¼,ò+<ž(î<Ãê=%’Å=K‰ =8=©µ«=µÚý=²ä%>’¹>'>WŽ=’±=*Ö¸<´Å¼‹½”¼žÈI¼`S¼XÙW»°­$»¡ Q½al½;×ß½ŒÉ½w…›½'XY¼½#†ž½‡'…½¦U½¼s!½ÞYk½ÇÑØ½œÐF½ƒÆa:'bW=Sª>"í >V‘>CY/> ˆ=ÿ¦> â¡>n¾>.Æ=ÀRÈ=2Ä; È;+“ð½6†º½šÔ¼½« ǽžA¼gýa<Ãx®=Ye=7ª<Ñ9:ÎEܺ•që:®w”¼7¬O¼ÉNª¼Pƒ»òÛ(¼v‰ê¼·2½¥ ‰½è¢½Ëññ¾ µ¾ £Y½F­©½+²½ ýý8mî½]Uÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¼’‘¼E#=¬á½=IHà;ÐÕ=]­=Џ=‡=;¡¹â<ÌW<”­=†½<Øm¼<ŒÓY;Zd»îæ*<„=o=ó¸:VXÓ»e­D;K¾<˜âû<¯fL=i=³y…=‚ ð=!èÞ<‘ûº/ªò¼–μðK½'¡}¼Q‰˜»r™< ;:]E3Á¹>f/°>s¸ >>`;<¥ ¼[!5½" ½¡Ä¼â‡Ï½£4½*"¶½Eµl½Kü¼ídí½úÊ<E'<ÀŽ-<Ö<ï¸â= jô<ƒvM;ÁR :CÞ–»gÊz¼íɼ›Ä„¼‘1ù¼­²+¼äI\½|€»«÷»£Æ‚;¬<Ê<Í`Æ=5P=? 0;Tâ%¼¼½Ó¼ÁÒô¼I1æ»ë N:£“Ê<¿"e<öA<$ÒL»‹&è»ÝPj¼j3Ï<^Pû<ÿÊû=8“N==NÆ=SšB=´Óø=Ù€¥=ð„•>³·>²=ÿ2= Ê}<Ïx¾<Ë@¼8\¼‡»äúºÚV¼w2‘¼AÕõ¼ºc½]Xݽ…J„½}[U½c ½Y¹½/ž‚½K_¢½|Jž½aâ½|Z‡½F홽¬ÿ\½ª¼¥>©=I<>>8ˆ>JÀŽ>YÒÅ>U€>_> pæ=ÐvÃ=“˜[=O¼9ôÚ¼«p2¼òœD½!v½&#½ fº½ y…½•;½uн]/ô¼òÊ< +c=léY=¦9F=µ>=²ü/=gâ=&áO=eç!=«¨=_Þ±=‚¿Û=Ê߯=ȼ|¼5Ãl½)Þ½–Y½½n©¾¹m¾@ÛU½!Þ™½ ë ½. ¼ì"æÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=੊=Ìm¦=ßѼåêS<¿s<º^=±? =¹Oð=ÞmX=ôT= ÛÌ==ä‡=cg<*3:¿ž¼+¼y»ž@:M°†;Û\ƒ<ÏòQ<Ó³ 0?>E{>1l='º<¼ž½7S™½r˜q½3ì_½x­ç½gÓ‹½~.½Êæ½+Ä;r±=·˜=x‘=´A¼oꔼÙ&›¼™£Œ½à¼ÿí®½?ú¼ }·¼m ï:à²Ú;áê¾<ðœã3b>GÜ>…=Ï8¶=˜Ò-=Ÿñ=38ð>»¤=¢×=“)µ= 3­=š’€=ÞJ >*=ß ˜;÷®ºÅ>®½qƒ½TQ0½Õò†½­¼¤½Ý7ö¾ Ã%¾;Ê ½ß S¼ø<)ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=æ4=åMÒ=ï\=†Š=¯©ä=°3µ=¼íu>f=óxÐ=ëH=Ð/=¼«G=)óÁ<¦Y<\¬¬¼ŒÒ¼Hs9#Ðû:SQ<ô K=6Ïç<¼/ =6YÃ=[§=†Ã÷=kn=Û¼.ú;ˆì;¿4«<ò<(}| ¤=ÛèÞ=NyS»kZm½MU*½ˆ3Ž›¼"½†N½‡µ¾½¤µo½¤bν`i½f¼rþÍ;Ì¢=Pm]=W †=J5=?ÄIR¡>!"W=×”œ=z4=ă=Û{=ØWG>*²Ê=F 9<“»½Œme½c¥U½‰2½û_—½—.¾6›7¾!óä¾52z¾'6G¾³þ¾UŒ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾!=ÎÄ=åŽ@=ñ<ƒ=ÜgË=®—(=½Öã=¶›=Ç2=Ñ%M=öªõ=Ê3=ݲ=Ô¼y=¯uN=\ñ½Yš ½€ô½‚ï½sa½:WE½™Ã¥½v,L½Ð˽ Ѽ¹Ø¿¼A95Q¼»Ùr~¼ì4Ѽúvž¼âûô¼Èá:`ß<{žê<µ©L<évç=aFï=2];øŽ¼>l/½:›¼øÆm¼ßˆÍ½šg½îã¼²™Ê¼›ê£¼×'#½)º½9 C½m%ý"ò;Ά<èš™=Ucä>$=Þ8K=¬B­=eÖ1<£Jî=êæ=¾Š=‡À=A“¶<˜Ð½œwM½= ’½Âíl½Û¡½§…y¾&—$¾*é¾5N ¾ò'¾$R£¾7‰Ïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾JÁ¾ÞK=¨2¶=Üù5=­h=ŸÇ=Ä—^>4ù= §B=“²¬=£J¬=ïU>j >šÐ=ôä=A¢Õ`>H²s>?h>-¾=’¥±»CN»wÒ(;>[‘<’¨ù=./è<úÒP¼›x‚½º€ê½ö‘¬¾ö°¾w¡¾Úþà$½ÑÅQ½Ãó)½Ý½º«.½nKÿ»£u:ºA<µ™,=ë¯=Ç;<;T:±Ä;¼€J<Rå¼°'ü¼ÿ½½Î’¼Ý¼ø[T»ù‹f»l+'¼œd«¼‘̼¸ÖE½“®¼³ý€¼š#ž¼ó¥®½ ü½½,µL½QÔ;½j¥¼Ý‡?¼Š»í»¢Às<[;íÕÊ»»L(¼ˆè¼r±Ž:òÕ¼<‰Ù9<9¾0;‚!6;w¼;kÛ輺hœ¼®üs¼«Þë»ö‡¼¼Öܼ-§»>™¼°ßæ½’~½k½Ó½V܆½9C¼ýjv½ ûÛ½J˜Ô¼Ï„¼Ó­Ð¼Ê–è;8Ñ;-;ét´¼½”w¼ÙùǼèóÔ¼ÉLŒ¼ƒ45¼ÌöR¼Ç0ø<§Yø<‰™T: ɼV1Ø»ƒ»÷Ôð¼4‰ì¼Û§h¼çSé:ÿƒ±è6>'r>S>5=·Ão=0‘á<‡L€;ö¯<”=ç¼<¯zÙ<—«<ç'à=TïE=qéÞ<÷rh=ÑÕ=0êÑ<½¹WGø%>†Ç>™!ù>ƒpk>6ä<Å^¼)Àñ»0Ó»Œ0;}rC¼%Áy¼Ö®W½­·Õ½ô°§¾¯¾Î¾4$¾!8ç½îlཽ…½ã^‡½àŽ½Ï‡½(~»Ú¡g;û.=bŠ=ŒëÐ=Vc8=+½í=;h_=Š;Ű»’½¼ŠÀ¹XBsºEß;|´e;òag¼_蘼y½t¼Ý»½Ô¼ï€[¼¤ÕP¼Ä®½°”½/:½K!¼½ šÓ½@J¼Õ k»wä‹;òâî:ºpÀ¼A¼T0L»(áæ=:ìx=4<µ*u;i <»ÉbC¼•9“½{Ðì½gê¼íH»ûüʼ‚x¼ÊV÷»èX¨»REL»wÚ(¼^ü:ˆÍD½´Í¼’Ô¼"¼îH ½D‹¼äÑó¼Ñ±¼ÿz•¼æQ˼¸„¼H ô¼HH$½i ϽGð(½"3¼¤› ¼zƒ:¼²VP¼€•;Í¥<9r»$Y;E~º»Äîï;LJ¼c­¼¼9•¼ÏdÞf!=èoG=ôà´=듦>˜„=õ=>õÆ>Ol=ÅD=ªÐv=dœ<ë4ºS=Ù;ÿ›<òKñEÿC>™>§Ã>‰9“>t…=¾¹…œ§¼92½EÚb½IÁϽ9¨Ô½t¼½‡uõ½ÁÇÀ½ôçþ©¾°Ä¾!&¾”÷¾x¼½égĽիC½õ½X½¦6à½DÆ:Ý­=‹)-> ³Ü>5•m>h=ñè³=qª=J£Î=3Ž<ù”Î=òô=W°¨=V܃ެ^>/RF>'Ll½X•i½†z­ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾‚ɽR£ öŸ=ì˜=Í+„=À%F=sð 7}9>1:>“•Ê>d±º=ïé=øµ;œÊ¼Ç‡ß½ŸŸ½£ 3½ˆ+@½˜¶¶½î%½² ѽÇ\½ãŸ§½éú¾e”½íÂÆ½ì}b½ÚLþ¾½ðT+½–æd¼ÀÜ=ø@>S>uÇ>›->—G >gÝ+=òx·=|5%=C¾=€ñ*=ªSM=š™9=’—6=O½<(2¶:Ññ¼‰nu¼ÐCX½ý#á%»JZ»m Û½ i½|ví½)e¯½d_¼®¼€Â:.—:ÏC…< Ùª<-W<µÿH=I‹D=jIY=%S¹c9¼ü];u±<=tºÑÛCºQÀ¸\sÓ¼•…F¼Yʼ'r«<ˆÿB=¯CÑ=Ûw=è ==ÃÌS<•É;p¹HRß»9öb¼@!ð¼3BB< O=v°»=$ ¼¼}>¼n)<5é<1bh¹ÙX¼èâº+ÊÎ<8j<Ülw=XçÍ=‘= ÁÚ=½kî=ë­>T±#>(nî>l ˆÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ<í2ó<6»Ü£\»7¾º»"»ë<Û–>•E><Œ[>5 Â>=÷dì= Úh;Ý¿¼Ñß(½‘J½Ç~½ßò2½‰Ôâ½w±Ö½zih½—g½•̽¸‘½Ã÷M½Ê~#½Ï™ ½ì(½ê@º½æǽ#ø‘<%λ=£mI>k"µ>Ñ=Æ>ÿ'‚>ðÚ>œF>*ûM=»Bn=‘=¾WÙ=Ï£$=ý =ÓFF=™h,=Ë«<;ȼdz^¼œ’¼Üá½5Åô¼ùÝ»Cû0¼¥“‘½[4Œ½6eF½5üC¼ßp7¼"¬¦9‡…¸õè•< Ãõ<§V£<èÆ=öH=<ÀÕ<ºÀºñ›%¼ô©½Zqy½F™½#®Õ¼{½+Œ½v+½” ø½ƒ×:½E»¹•¶=„H=> Ê>D]>OqÛ>(TÒ= ¢q¼(•7¼Œ„§¼óZæ½I“½*Æ^¼¬Eb¼L<[»Án¦¼Ç^ѽG­è½L‚¼àt×½ý½«5¼çÐH¼˜äü»°†;‘Ké<‚Ct<™]Ï< Hc<•ì<¨ºn=`$Š=ÌYw>Ÿè> é~=Æ(=–Ó<Ïþû;[û¤;2nˆ»ã\0¼i÷½í–»UµT»•¬¼Üaÿ¼=ìà¼R!= Žº…iù¼"†©9¾^=Šsë=YL#<»>=-Ç=®ý*=ºÜ=ø#W>NÇ>WÀ4>K°%>—ž"ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=Ný<_6&=Dž=,Ð=ky"=Cq=«ñ=†™=„±4=?t= *­=:×\=Ël =¯×S=7)^<â÷„:Åâl<á…½=%h<Ãy<,w9<ªÿ<¼ò»„0²¼©B¢¼@ž$¼z+¼¥¤ê¼äì9¼¡òk»#" = œ6=‹X´=Á=€’=! = Îͽө9½N&)<¹ê.=€Œ>ˆúM>äû’?½?é–>Çæ&>uZ’>=³l7=˜‹Â=ͳ‚=÷´=Ü ³=oÁ=;ÿ¤ºq¾à¼Äpw¼™Ç'¼âLϽ"„½2uõ»JØ"¼­~;½‚M½HMƽK‚̼ºm?¼"¿üº¢?_»1ò<»™%w;ð­œ;ã&;ú«=e‡<ŸÈ·<>L­¼g°¼Õ#½8~Ö½Juü½ ¥¼ü5m½že½l÷*½L¥½r ½U0q¼zq•= +Ü>6x)>™Zõ>¥¬<>ó™>¼<^I¼½v)¼ÛTļݰ½¼Ñð¼)3_¼Lؼk¼'6½*½;ܦ¼±æù¼Æ÷¼ð©¨¼ªo¼Œº&vä<¶ƒþÉ=®H°=}f>€ j>gÇ”ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=.0=Ô=|ý¿=§±=´L¯=ÒNe=«ä =!ñ¬=sÑ='qg=‚bX=™÷Ó=%¯<ëªI<­l<¤,<<žj<]ÆB¼EgͼL©¼c_z¼ÑÖ½&óI½<ßн`i@½8Ðr½¸½)¢S¼ùÜͼÎ0:![q<„8kgë¬>®XÌ>ã–±>Ø·Ù>­ 0>^aF=ü‡´=‚mø=9à}=x*Ê=€?c=•~=f¢<«»È¸žºùry»·^g¼K‚¼ÅéH¼bá$»Ìÿ²»2“Ô¼7á½(î<½$¸@½’_¼¬Ì@¼m拽)o÷¼jö¼0*q¹„Vôº®â<‚hÕbQ>Øñl?õ'>Æ U>CÉ=Fe¼Vμ‰Q¡¼Í?¼öv¼¨•,¼óu¼%ͼƒÅ;½R7¼Ó ¼ã?Q¼ÍÓ—¼"hä»ÌÜ»tºN=¢<š÷°õ¼³N¼­ž¼0¦E»ØDÇ»©Jæ¼…«!¼û1¼»e̼ 8½Z£¼Òñ ¼Â¹É¼Ú¼Å¾¥¼›…(¼þŸÒ½4⽊f‡½¤kë½üŒ½Ê6ç½€ÔK¼´Ç<©¶9=Ø0|>`4Ò>—aÙ>›L{>fô>4nù=ž[<Ó@4¹Ô‹º§»Js¨<…!<=@ó»€×´¼Ä|m¼Òx ¼.(g»pY$¼V¶¼MC÷»Ùšæ¼Jo¼í³¼œL«½¢¼ÿæÍ½®Õ½%\½< ½ n ½—ª½ÊμÆ¤»£‡›;²–2;ÍÆ»ªÑ¢»A£‚»J „¼@gT¼žÊk¼Ý¸¼xHR½[Ͻ3­\½d…Ó½hX¦»†\¢=ý@ >„‡>ìì—? @Í>üwë>Œ;{=M#KºQμª(B¼Go¼Êâ~½ Gÿ½!¢Ñ½}„®½l+½e=½ #y¼ß8S;4›;+í.< ÷Ã= <-î»(ݺˆu³:™xë:€.—9ñKš»'¥‡ÑF>9µ‹=·¡¬=O¬<Ûû)<;Õà<\ þ=—«=W‰ª=t& <¥6<àÜ=7¯=Z3ï=Ró=,c<þ„…<Ñq[= ²q<´¨ »ýʼDw½/h½(½Ÿ a½À…;½Û5½¾;ƒ½|ɽ® Z½¨r‰½´;ʽ{öW½2ÿݼñšW¼ci¼¦^!¼ÊˆC½ ü²¼Ì5¼U¡¼¬ü½#ãa½v ½+ÚŽÈ2½…@½NÕ½¦*x½t½²úw½¬¿K½°Ì9½‘‘½ • ¼³*=|~=çM›>4í>A¤ó=÷øÙ=™›<Üû:‡«€»€ê»œ,м¡ÌG¼Á—¼7¿¼Æn¼¼‚}½¡?¼:àмs¥e¼pú"¼NKL¼«廘”a»ïò9¼2ÌĽjäâ½T•A½9/M½.}½CÞ’½JXš½$%½9ɽB{à¼Ñ2ú¼eÕºxÍS¼ïbº™õé:öc>»ÄËM¼á<½í ½G)½3.b½‡8=½ªŒß½D²½6Vo=^ít>I3r>¬ñ>øßo>Ú×W>qJ)=gîQ»ÃKÞ¼“ B¼ß"d½‚¶½ª¼2½¬w½˜ùf½²o½‘ ²½OɃ¼°<…¼£Iò;+ò<§è<‹Ì;¿w±¼Óöó½íݼ·´M:#x¼I{¼bS»Â)<¥<™=#Òu=!:d;İ <Ãï<-1Ü<ÝC;[š^¼@m¼€^¼^vT»&w²¼ˆ¸E¼Î÷½g7½\Ñf¼å§»|hN¼w^-½kw}½ØJš½ôIؾU¾ ÞØ¾"€¾ë¼ô©Mÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>^Ì>#Ç>>Yÿÿÿÿÿÿÿÿ>½W±>gj>4g=·c·<]ïT;Ú~Õ<ý~<„ _=TÞ¯=w¡Œ<œ=ã<å ñ=%âu=[ë=4$ˆ=Y¶<•,à=d[<ë%—>jª!>‘¡p>™æ£>44™=5R鼜ª,½- «½Š½E½¾½Þ¥R½ø„¾E¾DR½ÚG„½šÖ=½:©Õ¼ûa;/Gm=Ť<¿¬|½ ˜Æ½%ͽ ÉT½J;½Åu½z˼‰ÁÓ:9î9{M8<ëôÝ=r´=;ûÚ= dŽ=%‡= `;„ÛÆ¼P›¦¼d j¼Ûæ}¼Ø½ ¼åļÑp½á콆½*v¶;ÍÙž¼b*”½……½Â}ã½ãL}½â­Â¾Êc¾+-èÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=Œ¾=®šÓ> &>$K>HL>€Y>ø7>+&L>ïκ€±<è1í¼7*Ð;©<ªä#<©Ù;Åþê<”³;ßki<<Ù<°º úÙ¼M:^¼¶½WÙ½‘S½¿—½× ú½¶ÿÔ½¨Í9½¨Pb½ó*š¾=è¾ §Ú½³ƒR½e|½QP½s¼¾½ª–W½m؃½ ãØ½%òâ½4º½lî½¼€)¼Q \½³ ½}vͽf]·½†L.½‚;Y½f„½•Š[½œ†æ½p(.¼‚&Ù;©“(<É”u<½Æ7<ÎØò<ä ;%G´¼šÞ¼¦ZѼ–É@½—l½*s»½GJ¼èƽ,f½E¡¼ºùã:ÐY;Hâ ¼f•^¼· 4½6z½ ÷нÓµ½Zz½¡˽›u|½| ½™èæ½›t½ra2½ŸfU½©;p½øÖ½i)­½d½i,潘Œq½ª§ ½Ã >½®Áó½Þ¿½³Õ¦½¢Ãì½—f÷½¡±½¯L½'ºW¼F”~=£yE>’>J×Ð>(ã=ää <ñœ_¼Å6½'ν—[(½ÄI¾½é矾ŽM¾úݾO½üË·½À¼½D\½P6¼Û=ºC=ŒÉ½(6½@ 9½rfÙ½­ͽƒc½G ó¼ˆeþ<6Ó=8ïü=’Ø=‘ƒe=œ¶£=uòk=Dë¸<Ýh5;^ͼ˜µE¼.‚¼»°iz;ÈÀ弫UF½1¨v½[:y½Šè¼Š7ð¼ïJy½@Ñ ½­÷Ÿ½Þ£½ÝÃнe\”½Œº'½vú¾½áò•ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ;!¬<|M=3û/=ÊtS>£Û>â'=ƒÏ¶=/¼ 弋¬<ÏsX;Æz<—û¼¾Í{»íe»5¨n¼ñ#ݼڴR½:¶ˆ¼Þt¼?§#¼ ud»¨0u¼=V@; i˜:߉Wº¢c¼´Ö¨¼¦$s¼¹À½mê2½ŠÜ¢½°~:½Š> ½+὎ ½¾èy½ÿgˆ½Ål½•ÃÔ½71ä½—›½:K3½D²"½w ß½J£·¼ªÁ‰½ÖA¼½-ø»^ë–<Ò?Lr> pp=Ðä¥<ÈT"¼tZ5½)œ¢½eªÐ½~§½¬³x½ùvj¾aI¾wè½ÿ³¡½ÈÎZ¼ó:¼Œ9=L†õ=Á\=È‚<ó!ä¼×ð½«åº½¥“ç½~㤽½º®>>=Q¸Y=õ³>%?9>:=C=ÝÏÁ=ŸR=<Ë<†J¼4®¼‚°*»ÿ¬<;Œ|§;Ö´i¼FY½)¨½? $½|ɽœËܼ¹+©¼\þ±¼l‘Ľ‘ˆ½¡ª€½‡šË½|9`½pgGÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾–ü½Æ¼öºÖ=’·ƒ>š7>5W=dÙr<$Á™»žˆÕ¼¢”½w§*½˜S½š:¼Þfw¼†m¦¼‡"Á½¢7¼põ ¼Lß:”áå»:‘S¼Ï¯É½ç%½'º`½‚‹½G^H½Wq½"uª½iØÛ¼œ:É`>¢â=õ'¸=´Ð<×”B;¾ ¼ u½{ì¼îެ¼¶:À½‚í½Ü'*½èòK½Ò᛽›ƒå¸¸ÑY=©Hd> /¿>ló>h¶>‰è<Ú‡Ô½R†½Ì¨ ½A_<¼?u¦1†)>fj>pö»>d˜é>è¶=œË¨˜>K<³=äJr=}åN<‚Y7<: "½Ä/§¼ÁL ½«5½'N^½pyǻń¼sЏ¼¬\H½Q@á½5Îâ½Bk‰½AðR½4&½Wå½tÚG½VZ’½˜ª¼áÏÿ¼] d¼ÏòÙ¼ú)Ö½;l½»&¼-®’¼c¼¹4r™¼q\0½ Yü½2so½¼l¨›»ÿÆq½ ²ò½PLZ½ió:½M½$¶¼¾o¹¿nN=%6=ÅDr=ÏFñ=± D=?¬n<[½"W8½&“E½8tÁ½´¿½>f¼ÚP[¼ýjp¼èÜR½¸B½/œ3½ã´¼£D¨:2";>¹¼D6¶¼® /½\i&½v2½{iS½=Õ¼ÏA½ç ¼'*a<³å=*r8=( ý<Îò‰;綺ØÞ¼¹ŸÌ½F»S½c]½3x·¼œî˼s¼uÚ½畽¢P½Tö½%Ô½aÑݽ•½~‘â½7_ê½(½fù+½BVѽ‡ŒÓ½¼†‚½ÑG½uK¼’˜q»14»‚ñú<(=qÅù>§>Bþ˜>&\ =”ä<Úû;ŸîÆ»®œí½ ã½&ðC¼µM_¼ÞT<½D>‡½EO½ˆÂp¼c`U=Ôóq>JÒÁ>ž¤>ï…â>¼ó‹>[Ž=ˆ9†»×«½[ŽÒ½¶”¼%3=@¾=ö;c>q¤­>‘—>‰Üs>m~`>“Ý=¾Å%=?>J<žÎ+<ÕÆ<æjº+öÁ¼¡øÛ½¨Y½5½®$µ½ì<½ŠÔ½‚-S½zà½há_¼é^麶H =[ùo=cÙ¨=‰¦=“¾›ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=ýuW>W¡>9|Ò> «~>ÔØ>08o>!Ø=Él=Æ·ž=(+â<è˃¼µ¶<œì<ð°r<5<­ôô:§D¼Ó3$½QØ]½~Ì;½—¦á½‰% ½g. ½]k½’hU½±q[½£êy½Iwǽ[¦½)‹¸½"yò½M\¼óÐA¼‚š1º€Ú;¯l0;4¾V¼iE¼T×o:Ïh‘Zü=ý…Ï=¿ê½=€üÎ=7¤R¼{¾’»agv»F¨˜¼å@½g,½$§½JO½â½C,Þ½%Œ¼®È¥»…à'»ä)¼x¼IˆG½¾½[ؽqñ·¼Ÿ­»€¼`œ!<;a=uþ?=¤-±=­­=c'·<»:6:èô¯¼)y½G60½lÌ¢¼·™:Øôè;­N(».áû¼ÕÌ̽QÏŸ½Sfô¼és®¼ËEмÕðu½=æV»­ì³¼CN‘½&½J²½–F2½’ï\½‚|‹½ t¼Øµ;æ§¡;N¸/=ÝÜ=Ââë>0tš>~ˆû>QT=¼ÿY= ©;ìE×»@‘¹¼Dnq¼Ë•¸¼µŸz¼=$¼â ½Öú½ùØ»©l„>o>·ì?Dï?pÉ4?`LF?±Ø>D¬;ÍsZ½%½}m¼ `=^¯®>¤×>h:>‹MÁ>‚së>@©>ºp=Øq=+Êÿ<–±¼<î˜=†õÍ=œÕ­½¸x½i½Ë×'½q½@D(»DÕ@=,ãË=ÃÆ = í0=¤”ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>\³>e©–=³¨>m;>*ô¢>'ø> Ã/>Xœ=õUÂ=Õ6=# x<Àp}<°m¡==I¡ó=*›<^Õ×½ r¿½ˆ]U½«€½½´¿¶½ÜD½Ÿ_C½ÆÆ†½ÖÙ6½Ô¥.½Æ;ß½¡o¹½|ÌÆ½^製t±û¼ã‘Z¼‹|à9s&Ý:¸§;2ã; “P»¸¾»B/<[7•<îI<Ž-ä¼Ë½0Ïg½‘“¼þ޳¼þ/ ½žô¼´; ÀÉ>•> =ﯩ=—g¼=2<ˆ‚<¼:¾o½Ôͽ B-½>µh½4QŒ½ÝĽs3|½4áç½`_N½…nv½:ûü¼…99½ mä½v±o½d’›»(pi;†xœˆ>H6¦>6hI=ÌÙ•<À¦?»Zž¼mܽ0MU½Vüb¼Úr^ºïúŠ;˜Ê×9˜ä%¼3ì¼ô曽r¼b}ë¼UKC¼»£ú¼Âù[¼.qƒ;U+»Òž§½pï4½‹ò½Õ›½K]~¼Ê‚¼ ‡\%O>u¾>‘@Ü>m§W=Ûw}=€Ü³==b =!F»oÓ…»øé¼"E½ºéŠz:Œ¼ 8ã¼å;Ïäà>/>øGÎ?fâ§?‘J?1‘?0‰•>¢õ{=maÓ½5ZQ½ /¼ÐÚ}<¤o=Úªv>>\¿>[>+]=íé;=þa =œ<Ô–u:'õ\=YU=„%B= %B=g `;È%e¼§z¤¼¢<ã½uÒ ½±"½·ê½ÜJ:½»zÚ½5X×»{o=L™ =¨ÿU=8T©ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>º£ö>“Wœ>€„‡=ÎÔ=T9=•¬·=+ D=”¨=˜²I=½«§=¼C <63»-¼µ‹<–O1=†B>ßÒ>/^8>;¿>:ý >ÛÁ=²vÅ=N5:õ;ô¼Ó"¼¿'ä½õ¥¼äõh¼í`½3~Ó½is ½‚ŒB½‡•-½nt`¼žž£¼k »šºÓ»Ñm¸ÎÇ;æ “=~½q>6®>„¦>HM>}ì>7¹´=%—qœN>6h‡>pÉÛ>¥>_\f=÷:é=³ÓË=€~==+ù<4B<#k;1 ";ª@¶<‡œ&<ƒu;ê|JMŒ>ò à?UUâ?„²…?‚È?O>¦"<çw1½¼½ƒ˜›½M´½íH=Oçñ> €Z>e =®Q=Ϭí=…{Ð< Î< j¼]ÑÂ<›œ°=9cý=íM¸=Ú½–=3ø¼;Á e¼ë}½ßž½Ô²¾½âG?½²cZ½Á?â½ÞD»Ð<+Ó>"”@>KdÒ=¿S„=ž¿e=( ºN¢é4WZ>R<ì>VU¨>1ï>œ½=_Äc;›ë켃 ‰¼v«É¼ä¤¼KH¼rO®¼¤8½)ã½~ Ô½q@½fÂ8ÂêK»§±O»t|o» ‚Õ;A•î=r±k> }™>´òÙ?À‰?O_€?Ö>˜±-=¶ë«<àùš<Kú»Ž4œ¼Ì‚ó¼sž"¼º<°”<ÉÛ=Éß;„Ú´¼m:÷¼rm2¼1R¼•µ¼©Ö“½ ‹í½rÓŽK ǽAè?¼÷åB¼¡V¶¼°®ýº•øU<@N=;ä=¸mö> àz>3ä>fq>l\Í>‚4=ì4l=¥d=NÜC=Tg<ˆR¶™Ù+? áY?0d1?8¥>ö¶=ôc¸:²¼ó½OƧ½¨5¥½p ¾½K0¸;A»­>;¢ù>ö <ûÇ ½ ”×¾ŠK½ú*Ú¾º›½ÇŠz½›³n½V«½_²½%U*¼Ú8ž¼'ó>„X·>“ÿ=>nÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>3šì>øŠ=ú'q>Jþ=y•4=†ßd=|æ<—';¹<;•³ê¼/¸¯½€·½$x ¼â[E¼Œ»¹q<)¨k¼‰ 8½8"²½½uû½¸3Ô½£Ud½·¾‡½¼B¡½çñ¾ Û¾Ú~½Ætô½‰!è½ßT¼ƒº<Ð=¥³2>9Â> Šç=Å ï=‰ü«=‡2=…”=aêŒ=ƒ'G=/á„=1øÐ<ñ¹‘<#Ì×¼@À>¼£–¼¼¦×¯¼­î ¼ì¦¼˜Iè¼?Èÿ<}¤x=uQ> žg>F÷u>WÚ>)ø=鯆=:ùT¹ö«µ¼kʼ? ¼Wf<`Á<Öe;êa\»îÄ~¼óš‚¼þñÕ»µ aÁî?Öh?ˆ]s?™oI?£(?K­>NAL=Z¬H<§¥A;ðiç»®ð0»~쨻Ÿko<Hc]=ülÀ>-}¹>&‰‘>XÙ=á²Ä=•}=G$<³(E½$¥;3o"=C^~=ò*>|ÍH>–[¯>¦?5>o³= ?ô½¿¥½zù½ÿi½v=3½v)€¼žµŒ¼hÎx»ÊǼP]^¼q󯼉ɴ¼D?¥¼Í;ÛÄ=`=‚O>/ñV>j‚>zÆ=æÇ‹»Å½úd¾W\½ê½ëŒ—½¡½Hgñ½’t½)»a½-X ¼Gjy>QKß>xï>tç>ŽÁÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>df3>3Ú">áX>ýŠ>@¢= þå=4ªu=j<|Ì|;‰”¼H†¼cá´½T1½ù²½rH½7T8¼Ü™Û½ Êû½Q‡½ '佌$º½gb^½ ½–"½¿oF½ési½Ø­;½»¹3½’w³¼¸úò»^‘=ø ¼>.d >ig>P%p>/F>Áè=ôp=É£h=­î•=eôí=&ëE<®Q§;4O?»1ð ¼5à)¼u@ÿ¼:¸Ø¼‚μ´•’¼°ö¼9¯;oÖâ=$æ=Þ|T=ûÜÔ=Ùõ=Š™<«q4¹ýë¼¼á}”¼DïÅ…?%1è? mƒ?·W?¨Ÿq?8=>X=ÌÐd<¹âÍ=?4T<ûþͽ,½p÷¼ G0<ªO=Ûê=½o³=ÎÖ=Ëè€=½»©Ë½Šo½m3‚½ƒʽ ; ½_ôê½k L½B„2½Ù&½;î\½ Õƒ¼²J“¼U‚ô»ãqÞ;£—=Y=yÄß>â`>TûM>bÿ>YŠ<ˆ· ¼d+,¾&°¾]bâ¾f÷a¾)5"¾Í#¾*w#¾‰Ú½lר¼Vçs>ï>ˆÐw>ƒe>ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=ói=Ñ7@=ú]¢=´*Æ="É<öªC½Ê2½¢ã›½£ {¼ÅÞ¹=3Æh>~,>xã®>n>|üx>Ur>.ûà>; Ž>K°ô>HìÖ=ôB=l=â”Q7T?Å`?”Üt?©Œ­?Ÿõ4?8w>ë=2^<9ñ›< ;óQ鼬Ú_»ÄM;Þ‚;x$¾»´8»‘»äEʼ”Â.½)“%½,³8½œgŒ½S€½t¬¼„ÅàH>4@=²Lo;û⺼9²ì½ãƒ¡¾N`/¾sTë¾Qº¾…<þ[!9¾v"¾‹•f¾gÿ¾áèÿÿÿÿ> 6ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=ûf:=Ñ;=—]<ú1=[¼__ºƒ³¼Ž+Å»¬î¿¼Àܼ¾K(½=P¼Èú½»û†Œ»­”ý»Îaü;êåÔ=/b=¼G==Øp—=ÒÏ2ºBO½H6?½£X½«øµ½Äùˆ½‹ ¼›‚=TFj>Zz§>“ãÊ>¨`û>•”>gø½>H×I>Ob¼>a‰ >f©~>šR=X—º={;à6è;£d;ɦ:f1ºÑ͹»„¼®7¼ÚºÑ¼÷«½Þi½RÄ™¼ìæ7:íá1<Ä{˜=.V3==û<€Ã\;ðݳ¼G€”¼˜WA¼}sø<Å*<â´=!S=Ð/=¥<™½Ë;;cÃ;¾PË<^dÃ:aõ{;”¸­<Ú —<Ô"Ò=¿•W>°˜è?ÄÏ?{ò?<òÈ?kò>~t£½ ü¼Àœy½6½˜ó8½‹ó¡½6¯Ž½ry»÷›*;ò+–=Dàf=™^ò=rô(;¨H©¼[º ¼£ X¼›9„»·43;áŠpë=ŠÅL= Ž=1p“< Ùå¼þƒ ½ ѽZm¾½ðh¼üô±»à Ô¼Ù·ì½w4²½ƒ[½LlȽm¿:½=NL¼Ÿc™¼—dE¼ºd_¼ÊLݼÜÓ½=ž‡½6­1½¢Û¼ù0›¼oä¶Q‡<Œ/5=9Ã)=”€=°Ò>·î=/B<†Ó»Î<ͽ&Q¾ ©P¾ ì8½ó„¾Jˆ"¾o?E¾q¢¾i÷­¾gÜ>¾P v¾E4W¾F/ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ<éç‘<ÿÉ<ª‰e<íe¼¹‚ü½›óì½e3½½ :½a‹Æ½0âe¼Ž=¼eN» ™¼õÿ;F“<£6ñ=“ÇO>•>PÙ>°ƒ=$]X½½°ª'½å{½¼_&½˜¡½jî=L5>4=‚>‰X¸>¤ÿÎ>Ÿ~>’ˆÄ>dÓþ>M€>H‡>1κ=ýnr=xòÓ=k¦»ÂG»‰W[»<@)¹î÷¼'{¼Bõ‘½H½<Å2½"½GËt½›%ˆ½€Z½ö¥¼l]²»“sJ= .œ<çiÑ<„ ã;fbª:s‹ð;8õ=å²=,v=Fî^=¤·ó=JR<ãÛ*<ƒÌÇ<’šE»3±þ»9¿‡ºÓúM=J¬<ÑË«=YÞê>b$?>ÊX‰>л±>Ë^â>Y &=™[C¸ƒE¼š¼§p9Œ¥ë»µ”Ä»ŽÔ ¼YRv¼U<œ¼±Ñ½0ÛW½m D½lB½S ½Žä†½‡0N½+¬?¼†Í/¼”üL<de=Q=¬‰ÿ=…ú>;¥ºn¼©|¼¯}ß¼ô竼ۦ¦¼”ÛŒ:ÕÔh°$½½‘º²½¯:Y½¤ž«½GHž½;b“½a¼½?}|½&¬¼é¼{©Ò<ŽøÆ=Î_…>[ëÈ>@ði>£7=}Àr¼ëÛŒ½œÖ½­ò)½ÇØÁ½ÓE½>qƒ=f J>7éZ>…0Ô>šYÅ>›i¾>šhÅ>‚Ús>N7O>=7Ý> É=¦Â =jÎú<§ý¼Bõa¼ á ¼~ÝÖ¼¢ãν&o9½^ø½€`j½Oß½n™V½—$н» m½ ËU½‰¦½-“.¼‘»’< "=ïU='ç=Á“='ön= Þ<õʦ=-†å=ˆ¸N=¥*?=n´J=*fë<`·ž»ÐÖ¼ÅEؼ»Þ;1<™ñì<å£ú=Èl=žb¥>%Wü>NØ>0R±=šÙc<ˆ8`½M½W“¼OÉE:êÏ<f¼:ãA¼$9¼‚¦x½H´½D¬›½…žO½ú½Aºÿ½Xôÿ½3ʸ½k€¼,q’:Qœ×<ã†=oÿà=•-=ƒý¼wiø¼»D£¼Ã‘¼Ó›½Œ¼ç3³¼`Ø»Œ!G¼´`»œpu;¡dË<©×1=,ax=¡f9=žã|=Žõ:=AöÁ= †w:Ȩ>@Œ¦> ¬W=õU¼ïZp½ø.½—›õ½¾Ùn½“Ûø»»|=c>Ò·>~/>“ð>˜c¶>¢Îi>ˆŠƒ>I€=>™=uL<Œ-û<˜)<Â%»X­¼_¶g»±»®œ:¼¼R:½§&½}’ˆ½†t#½Rݽ†d½ *8½•VÛ½z4ú½IŠ ¼Åâ¹»Wì©=,}=Z„m=u=€=oø,=qWÄ=CÍ=ž=’=cÖÔ<ìDhºQ é¼Šï½ ²Ã½E}Ó¼Üf¼[f`»õÀ;M8<@´Ô<Âü<4tÝ;·0<¢\=;4¼µ^¼þ½]_«½?M‹½jÂÿ½="_½ ¯~¼œÕ&¼F ?:/,%»Í…Ø<9Ò=(AÜÝ<ýï§<èAŽ<§»<‰º?¼ù¶Z½²ê†½ÇŸ<½Ð ½®B½¶å…½µ¦½eÌŽèֽܓE½Óju½¹<˜½¡®—ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>’­ÿÿÿÿÿÿÿÿ={”ž=4H—=MK ¼%js;œî=Oîò»š½4µQ½gžT½£? ½9½*~›¼¿ï5½ ;ª½Mד½.Kä¼Õý¦="^­=Æ"N>Ir>$½Ÿ=ïã"=&ÉͼÍqO¼ûǽh â½_óâ½­»¬}=uS=ÎÝ >Jøã>„%>гï>‘iX>…àK>Dâ&=Ͼ<þ5pº¥)í¼¢<¨< 4Ú½j_˜½u4¼Èï9½$¶=6!=œØ=¬`X=—Ÿâ=®z==¤á<å“= °»<®j;Ùnc¼-E¼òy)½ ¢µ¼þý»ím|»ÊÚ7»¼•»Ý% ;жë<œ<ÿ޼e»‰€‹:ÖT<¨SŠ»Tl÷¼ÉÜÔ¼ÏGN»·¿ò;¹‘:ãæ»^> ¼ó^¼B¢ ½Ѫ½>kK½/ʽ*/½”ì¼PŽY»Ü¬c:Û+º¶·¼°J³»6ªé»ÖЗ¼‹%ѽ$,^½YéN½8Z2½¼ŒØA¼ð…U½ „¼” ¼ný:æ…g=<·=tÍ=QÜ><Ö*+<]º½¢­}½iÖ½a/Ÿ½W¡<½‚ؾnJ¾ ™®¾.G½ø·¯½à÷˽Ãôú½£‘U½‡èhÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>—á=àaœ> RÜ>*(-=’$•<ÕA<¯¥›½ÂyνJËi¼V±¾¼*»h¼*êÚ½I3&½ƒY ½…¡Z½ù~½-–±½X§½S?Y½'ß¼¼;Óú¦=¢wÏ=ðÂÍ>Àþ=³¨i=Ó¼¢Ï×¼þùˆ½'÷¼ø7{¼þ3¼Ë=1¾Ã=¼´=ú¦>18N>YJ>^Ó|>YîF>0™=¾ðê<¡ ˆ¼kg¼/ªÛºR ˜<¤ùù=õ¼=&<1笽¼˜‹¼Ýšb½üô¼¤Z¼Œ9ï¼Nªr= ¦=qVg=šäe=D®â;¶n콟¡Œ½±ƽú¼üeJ¼¥ôսГ7¾!H¬¾%p#¾ Õ˜½ó|½ð}/½ðO½–Eÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=ÇR=È3T=±kÂ=ï+Û»ž&½Yo½XÀE½æ,8½Ó†«½2¯õ¼Ðéܼrg½?_¤½(-À½4н&97½Y"w½+CF½d’¶½˜µ»Í·ë=ýÒÏ> ’À> %a=æ—;=‚Þ<Â4¼oŸ¼4‰tºŒøB<Üë=>JA=*%­<¹,A¼•»½BM½+Û½8~4½y¹½q2½8°½SBø½„)½IÆ‚¼yöU»+†#<œ((=•Mb=šÁ=j£"=+Q <‡ëg<-W»SIμˆ ½o˜½9þ½1u.¼r¬R»”†;2+-»y°f»Š}»¶=í¼n”;“¨]:hZÏ3½‘Ó‡½š é½‹¸½ 彑2½ ݽ„ ½œš½p¯¾x¾,Õྠk¾éȽ¼i¥½ÆÙ¸½Ï»i¾tùÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=Í=ÝßÈ=Å´=¦é<ù®<^|*¼pX ¼¸Yн…V¦½…ag¼¤þ<½­c½òѼùžÇ½ û½mr¼½‚âɽ‚•k½"Þ¼êá;iåD<ª=O£/=”07=½:=4ü£¼Ž+O½÷p¼´æÖ¼v±Ð= HÂ=Ï/x>GK>l0Ð>d¦h>yÔ=N3Œ=,J¼M+–¼†êö¼Šȼ~¡ºšâûº&"̼ê7ù»ü¸×¼@¥¼-ôó¼×Ø0»­Y·»Óßu<~c»ƒ‘½R§-½M+¯½p½J5ö½*ÿZ¼Îã¿<˜ÃÞ½º&¾ qX½Ý‡k½×™Ü½Ólè¾ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ> 2Ò=×&Í=SC©=]±õ=@ÙI=MÅ–p½¥qé½R†[½«Û#½˜K½£/`½#]»ÿ–<Ÿ©M i>Ïu\?kè>ÒÇÁ>‹Ó0>Žd=#ËT;?`T»ä÷6¼‰"¿¼Nv´»X? ;£¦¥¼…ñ™»¼—T¼sšw¼à>Þ¼ ໜ(»(jºÈy[¼€¿W½1W=½b/½Ž¬]½ª>½Œ_~½î¼-ßn;ã”F<Šë¬»ÑK.¼ó5 ¼˜³k½ŒXV½ÔÀ½­Ü¦½°Y7¼õ)½"œù½4³½ä­U½çB ¾ âØÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ> ¼^=¼ˆw=Ép=_D= ¯š=B*=‡Ú=jÁD=¯Þ¼¢Pš¼Ë(å¼’mÓ¼‹^ô½MhX½X"¢½”âd½Òµ ½Äè½§Å·½f7¼0¡å;5'=97h=<Ÿ9»ÏU}¼ÆÄνºÕïùº=­š» õÜ=iv=¹êÈ=Î>)–=õ â=É>ù<þRðºæD.¼ý鼊¢e¼‚«4¼ì±J½’­½Ys½kU½ '¼—Ì~¼ZŽ6;K`g;ž›W½(ã¾¼ÜkÞ¼ÍN±¼Þ3=¼@íƒ;ù ¹<ùÊõ=CË¥=Wqœ=zðç=‚¬Æ=âö= <´˜ó?§?5ó9?=àK>Þ‡}>W$z=Ž„D<²>­¼DÞë¼®¬¼vß_¼TÔY»©`#¼F{å¼X±Ò¼d­¶¼¦Ób¼´ŒF»¯Îd;F6 ¼eR¼þƒZ½Vµ÷½<4½‚´½y×½m¹½kb»‚G;(B¼yf•¼ô´H¼Ý[ò¼£çæ½+þ彦X ½»&«½„þÙ:Ú³½ ½'ƒS½ÀD½¦¦Ù½¿oÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=4©=‘’w=šX=¦±;½Oƒ¼áÐÕ= ÖÒ=°œ<0Iš¼Ìh¼»m¼<#ã<‘¸k¼ó ò½K˽žï¯½¨¡•½¹b|½U:¼€˜,º¢Òá<3* <>细‘Ÿ»-0Õ<—q:±Zvº›“”ºdÞ⺰-€:$fl»ñ1Ú½£½Mó­½;ut¼ïôS¼e]¬¼7z»¦«¼uw¼Q?§»°úfº9s%<§V=Ye³=Ü)>Ñá>®å>1Æ=¥ Û9<&¢<öŠñ=Ûœ>œ¦?gŽ?Jßä?IÒM? —>|‚Ý=º] <òim¼ó*½'«s½0ô¼Œ”ô»÷¸¼bL¼ zl¼VV»yv º†EÜ7Äߺ…h×½(P'½ Ué½J'½ ý#¼øô»ƒǼØw-¼ut½ ÷i¼%Y„¼ó”?¼çïõ½*:¼õ–ë½AÒ¼ï„= ©=10Â=}0x=iÔO¼Ð9õ½ó¤½¾¾Ç½Û'ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ6ó>ó®=âi0=WiŠ<€» ë¼)÷7¼½m¼ä]c¼ØÌ¼°BʼÅ/ð½ç2¼Æ| ¼ÀüÔ¼?96¼Nè#;¡Ûü¼*BKº3{Ë< q{ó<¨Ô+< }ö¼S:ÑŠ»wº¼2[°¼ñ…½ ŽÜ½X¹‰¼Á0Ƽž÷<-‡Ê=ç—Â>F¾>î>A=âm¼E’ê¼ó÷µ¼²¯é½3¼Ö’¹¹h`ˆÙË>é~f?&[Î?.B? lU>s]Ë=¦-'<Õ§€½0^]½xÁ¼ÇC¦¼O{7¼!Pä¼)Îû»ÚÍÿ»Æå<NX<r<<Ãæ;œ"×½%…²½yz§½Pm½)äż«P¹;;Ñl¼`$Ò½*#©¼Î^Z¼/‰Î½T˜½Phú½ATƒ¼ÿÆŸ½Áç½;ì<ÈÆ=LWË=9Ã=Jޏÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=:¨˜=!ò<Šõ»§9Ô½_ì°½fp»‚¸¼ö°ß½B"ž½!–í½FÖˆ¼ªOÅ»]´[»GZ¼ÊЬ½?c¶½}_½€†ä½˜Z½~¸½mì½>¦¶¼½„X¼êñÁ½ @Ï»˜\¼Tѽ ¡*¼Ÿ4û¼‚©¼Ñ·þ¼º §¼îþ ½,{P½[Ã!½Lé}½T„r½[¼þ¼ºW%<‚¡€ó»¼ßé¼b­¼›„D»ÀÀ¼u‡:¼wû¨¼Ž$ô»ŒËÔ¹ãÑŠ»>,Å>DÍN>]Q=?+·¼db¼ï÷ª¼Ž¿.¼ºÊ‚»ì"+8 >¤ê5>ãþ0>ôó>·ó³>)«=>9»\bE¼úï ¼çNC¼‹“P¼­~â¼Åíá¼`Ð绤涻¶‹Pâß½5þ•½u~½|‘a½^¼š_è¼–2Ò¼ãíU¼` ­;î<¦Ú<ÎA$=Cæ=$ò<Ìæ“=á‘=HÊ4=C[ï=K‚}=)Æ—ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=1?å=EÉå<¥ys<ˆNÙ½¼½nô_½)ôù½|9¿½Å ·½ª%½]¡ì¼²™»ÈÁ®¼ˆàѼØû„¼¥ØÎ½šcu½7„W½dÉb½ŒG½›¬,½ܽ?×(½8À»è°;Šv»iõÚ¼Éñæ½dݽU–½X .½‹'&½zj½€:­½7‡½:h½3ù½'pp¼ˆöÙ¼Eî㻄‡;©y<$iÿÀa>+½_>7¿c> ­=—î\»ÙƼ̮´¼6¾È»ç?(:Íòn<çµþ<ßV]<Í2C:×ÿ;”*a<èü5=Àÿ=‹z3=V¢ÿ=Y|<,{ÿ;˜qº€Mͼ‘‘²»¼¼é¼RÏÞ<Ñ$<“ÛP<šÝ¿»è±ï¼-eç½4ë½'m½7³]½Fð¼½-ؽ›c½![s¼Â˼h/<†;G{é’>†`8>K‰m=¾‘Ç<¤L%¼ÕѼ#-¼Qø¼i‚Ó¼Œ<â¼îž¼€¨â9üUÄ»üb’»›í*¼áu¼è)P½68 ½@‰<½/aϽr R½´51½0`½¨£½û“¼—Ɖ<‹=x²<þ£S=Lt=ÂÒC>@UŸ=óݺ=¢"À=§Kq=¡‰£=„ö©=N_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=_†•= <³ä¨<Ø5ò=Ö½¤"½;I½uZ½«‰K½¡ ½t0U¼`Æ9’lI=ju<ÞþÇ»¿Ôؼüy½'ô‡½cÆN½†ÐJ½“·î½KeŽ zL¼žÔ»Ž4WººÐ2»îÖ¼‘î|½7µ½O$‹½‚?ï½|#½»`ܽqw`¼¡U–¼,M¼¤`ʼ¿cܼøZÓ¼ÚE¼ª]¼{Êâ»R ;b<Ð<˜ š e=ÇÔ=rüd<Á¼y L¼aW»×ç½¼ɳ¼¯ )½ …´¼³=G¼zýý»K59¼·©¼ÔN½K£Í½F ½v¼½#a½%É›½¥½–ó½:”½æÏ½ §å:.€<òyŽ=J)Õ=ÍÝ>^à>Gn >N„=ÅÍ=ÍÕÄ=Øslºa7²½0kÓÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=É='‘:X)½ ï&½Ï@½b0½LÖ4½ON½0@¸¼Ø=.-–=3ë=wrå=2%~¼Î˜ù¼âÖð¼ã/ž¼Ø[~¼Ô­ ¼×X]¼¶Ó̼>£<¢ÚÊ<‘¼D<ÆBºþ,üÍx»rÊf¹Âe“»ˆ6W¼.òÙ¼¯“ë¼\•¼=_ ¼ƒo¼;Ò¼î‹Î½*<•½Z@þ½\”á¼±(»½ z¼,nì»Íg<¸J;ÿ¶¼ ¼R‚²»Òa£ô:>¢>€–Ø>Š/> 7=÷ê¯> 0Ã>7 Vÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=bi1¼ë|ø½œN¼¨yȼ/°¼T鼡¶Ì¼þôi½ø¼Á}\<Ö¬=™È=~÷C=¢ÉK=#Oä;èJ½2L‘¼±*H» öS½Ÿ)½«Ò`½„äy¼ÛI¸<;|ñ=a|<ñ•<ƒ>=³V²=Œ8=¾·=üƒP>°Øÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=š‚ü½Z ý:òe½9øu½Byåe¹>&/>Üœ>S=†§ö;ù`•<ÅP(;ݦ¼¼æc½ZrÁ½vèÕ½@Þ‚½»¤¼Œb›;y/Ý;­ŠÃ;bÇ^;Pk<0e™;¶á¼x§¼‰êÚ½4„¼¿+Ò¼„¯È¼P¡<»ïùw¼”M¼:ÇØ¼O-G¼¯®¼­6¼ºà^¼Fœ®¼iÅÖ¼¯Dô½ ¥‘½ ¼‹ºä»„I­< *©;2NȼK§¼3l¤»õV;Ïá»rWf»bC»dÛ¦¼£~½T½AÔ½wŽH½ÏǽbtĽ)¸/¼ÜÂQ¼<¾9»ZÑÜ;‡§æ<{Â=<§ûÅ;`sé<Ïw>{ÿ¶>¥Ð>•Öd>oHš>)¿=¿Y=bh_=¸Ö¼IžE¼ôüê½*»K½F©¨½!-x¼©§õ¼}Nm;\Õ:½Y‘;œI_;ŽRŸ;QFÄ»‹ºÄ½xj½½!V‡¼ž~<¼u¼ ©»­:½‰Ï;:»ß´j¼•žð¼¼÷”¼Ÿ}u¼Û¯²½ Ǩ½%š½SŠu¼·Eo¼b¨ ¼@8ü¼‡Á½¼­ç³¼Ÿy; ª<7Ö‹;²¯»b=@»Ç>Á¼ ɼú5_½ S ½wOU½O¦÷½»”¼Àؼ™ÜÛ¼Dq» Oe<™m<í×¾<Ø w»t î»Ðš¼ö{H¼Î£Ó»º¹‚¼n*¼D¶þ¼ ,¼8š_¼ŸÞ¼€y€¼ýa‘¼®¼ ¼R%<¼ß´¯½篽@6í½…æ'½& A½rÏû½< ¼ôšà<$õ<×Ïê<ìÈ×»œ&+:eùA<¬Õ<ÛEa<ÉÞP<ÜHß<Ó <â3ê<£<²<¡<Æ~ï;ó\¼Ì'½)ã½3-+½>H½‚G…½Vš€½uK½ j¼±½+Õ‰½O‘;½J ½~A½n}‡½„Dm¼ßܤ¼ œ=£j=p¶è=4k«=?´3=*IÂ=’K=a}>T?ñÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ==Ù<öð¼ÀT½°!½9ÁF¼‰ø‰<Á]=#t:ËÒ¼eZ/<'Ñc<ûDŒ< 2<ÏuB)cŸ>™:Ç>ÆY:>Ô>œw>Pl5>IÍ=Õm=Š%;®±…¼ËP«¼æ´X½M¶s½æV½y½Øj»Ž‡È¼Å7o¼fm¼£¨:c |¼懽 <¿½H7À½n¬·¼¿ÿƒ¼‚‡‘»âcƒ;5À;óÞ÷;§d¼¶¼Šó#¼Ôo½&.ܽ&nï½- ½P-½jÞî½€ßå½E+¼¨ ©½ мšU¼$`Ó;oЧ=^±÷=„p„=Ä›=@Šã=FÜ =PÀœ=V»Þæ½ÃJ½mž¼»õx+½7}ï½QÛ¼þŸH»nżوA½ÓH¼ýX<½H(ñ½Niܼ„Û¿»žLì<=Ú=æ<ç,o<9ªp;m…‡<´õè=+„®=2!ðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>µÚÿÿÿÿÿÿÿÿÿÿÿÿ=Xs=l =MŽ¼åˆ…½XÓL½%Ôj¼âœ<Fm»«'Ó¼a>}½ƒ±6¼Ì»·è"¼AÌÿ»ƒÊ8<¶Î_< ê>¼â<½Wªƒ½± ½h¼´å€¼ke¼µ·¼È1¼.ø…=QÕ=DéW=pj»=¢m=Ó$±>Tf>˜ûî>Ì0p>ÌßK>¨¢š>lQý> ³Q=æ‡.=€Š<Èw3¼·µ€¼æ5ʽ€')½§ÚÞ½ipɽSå½ÿS½&ù†½;ˆz¼ÑÞC»ÒøU½†w½Ad¥½L)ó½`T’½mɽ8¯¼—_…¼N’®;ñ—ù¼;:»š±¤¼tzî¼éÙ{½(Oã½vðI½OöŸ½®g½rúN½h<þ½ƒ>̽jZç¼2ÖM¼ßÛ¼(¨M¼,¨–;Ö:ã»S»Ñ}¼ÊÝâ½ þ÷½ο½B±Â½cúȽ”"7½fâê½(áQ¼±»¼_Ã(:Ó?;·ÍÕ<¾uƒ<ó<äy¢= R<ËzE<4¶oö”>xE!> _p>¸;,>rçá<œsg=M~Ü="ʆ¼€ù½öʽ)r¼ïö ¼³k¼°ÉE½½;Ü©½’!s¼Ø®)¼ÙÆs¼¿1Ò¼¡ˆ¼µôƽ,$¼½cw½8-®½Tú½¼È¼¼2 ¯»ÔG¼²†÷¼yÓ<Þã=f¼ù=‰y‰=&=¯Ëá=ä|>v‘Ð>¢|>«…N>Œ1>ÖË=×ý©=¬=š><±¡þ¼ˆ l¼õ½ Æ‹½:퟽„-Ú½z'3½\ƒB½tL‚½†\¬½H•#½/~½Ñ!½Q A½x±3½PÏ ½F½$¼Éõ½ €Õ¼<;ؼ»$¦¼¦ô¼¢NŸ¼Æ²/½#V½)3½O`0¼Æz™½ý=½EÃï½Uø3½O؆½7 z½H¦¼Ð=*¼º)o¼ã¡v¼]Ÿ¼‰k¦¼Áe¼ó¨î½$l½Ÿ½FsĽ@8¬½A~¨½;¥á½ vú¼ƒ-¾»V8ÕË;»w©<ìçe=T=!ë†=Ò±<Ç}p<°<S ;a"4<¬6<éí= ù5gܽon¼×<'O9=ÖÍ>> ôy>,Ò>åõ=ï’:=iÎ;Ôö0b>qÖ<>:ïÓÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>u¥C>q$Ù>`´>t¦>Dµ>©=†Á:=H<;ð8Ѽ¦_ë¼þØ@½v©¼Äš¼“ö½6ÿ±½~«m½pÔ ¼ð›v¼îFø¼ë„´½Q ½0‹ ½K ½€Äe½mç½h¾F½Ro¼¡Âg¼l†ø¼ê¤ž¼r;©<¸†w=Cã=4+š=3=h•=—xI=õSn>WðU>21>ó©=¯”ó=>ÈÇ<þjì<Ší,½Yí}½Qà[½Loê½NÞ½^Ná½Y~Þ½ „ø½ã/½ ÖJ¼œï ¼ŠŠ;:úŒ¼Ï}‰¼ì)½@·½(j÷½c~½6S‚½7W¼Ý쉼ž„W¼•ùfº"{Š;hIç<ËÙú=!y=4 =¬=Sq<ÚU'<‹áºï 2ç>gÞ>DÙÎ> q=¤µ ¼.…e»ò$|¹‚qó;ªA¼xïù¼u÷¼·Àá¼÷­¼‚aV¼™3o¼ƒÍL¼~Ö¡¼¹ö…¼¥w¼H I¼/£,¼Z_Æ7áË<ý©Z<ãô½<=°ë=qÐl>–>©•>5Ün>±«\>ÒqÇ>Ö§R>ôn=ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>6zZ>j¾e>|«>jû>J ƒ=ûpú<ðíL="kÑ<å³6=&ä ¼\0´¼ÒóE½ F½+ù1½D½‹W½9 ¼Ó—«¼ )E½Á¬½"ª¸½e*½®ê4½‡½ù½¢c ½¬EÒ½i»¼Ó”м›° ¼«X¼ÿ¸=­Âù=‚ûC=;;à®P¼/Þ,¼—>”½&Ÿƒ½YËG½Xѱ½ýÙ½ '½róc½ŒJ|½ˆÔí½¨‰½ãBà½âÞý ûé½’¯‰½líÖ½†D½l™Ê½Rv½ë¼Ž”–¼¤z½š‰¼Ò%9¼eð¼Bª½uW ½ý*½X­½]¼ÀxȽ)c7½âI¼‡+ï¼y$н ØÑ½I/b½nÈɽMk½!5Ƚ  ½ÎI»²»±演簽¨w½ Ò¼}8Q¼¶'ͼð½Ç¼­f¼¹Ÿ¼uí»vu;Æé<ÝL=qÓ<#eÖ<Úé+=Ò¥= ™=37Ü<÷Ûü<›z¥;™ß~:yYí;Ÿ5":Îì¼ÔÊ)½*1J½ƒhN½}É ½f“[½X0½ž/˜½"½z¯½QÛû½_PŽmçò½–°;½`¾±½Xñ½=J¼øò¼Çê,»ìrû¼ Ô¼S…u¼ý>½ Z½ —¼xéO¼ »ŠKG=•^x>:²Î>YÒâ>9SP>ç=›Áâ¼Bu[¼|*@»{'¨¹ézXºÃq&¼ZL«¼I®ª¼Â°¼ I¼¾©©¼©é¿¼‚…¤¼R{Õ¼^Ëy¼5åG»s¬º;7¹Ô;À%\<‡|Ü<‚ö<€+Ì=¤•„>å>'*f>]þw>¦ŸI>¸ª©>¯…×>¼ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=ˆ\S=ÉlÆ=ë<5>€ž>dƒš>A9?>A½¦½6íq¼øìî¼úË ½x‚½9нb¦ë½. @¼à„]»õÞ7¼¿[¼º;ö¼Ô¯ø½„hù½—Ù½¥«$½˜M–½ŒBy½>‡½*tˆ¼ÞÆä¼%ø˜:ÚØ;ÏçV<ÏJ­=:§<ªhR;Ø4Ÿ;§· ;‘_< ØÑ<²%ö¼€‘޼À‹Ö½?9½fr½]Û½a-½ƒã ½ é}½U¼~½eìܽo~.½—Wö½ËÛo½þÒŒ½å•"½Ã2½µß½âÙ½ O½‡ÆM½¦I¼“©¼S.¬¼ëÔ½$¼¯ Š»¸H3¼99¼¬†¼¡va½!äF¼¢£¼‰Å¶¼qw¼¿Ó„»¬áš¼ˆ‡¼rí¼Ýw†¼È^н+‹¦½ʹ½ ˆ9½"b¼ç¼0¼RXؼÈjà¼Ñrȼ”漃*¬¼Bλƒ¼ýм£u*¼€Ð`¼u <å=>y= Q,;G¬••i>/¡Ï=ì¿k=ž×:¤•¼4C¼xÁ»¿é<ØE<úoÀ=7E<[hÖ»RÐa¼¹=½&zï¼(ɼqe#;Áô=)4=*aÒ;G㺊°3;þq…<ˆÖ =¾t=¿ÿ—>òî>G8>|lŠ>ÌåÄ>®¡>¼1x>½c†ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=‡mH=–v„=šü‹=ëÂ>B‹¥>AL> A=õ'<ºŒ…½0˜ø½x¯½®^½!ß½óö½•+–½•ɽ’¥½“âW¼ë‡ù¼ € »®!x¼q”õ¼Î÷}½’½j¨½²`l½­Zw½™"°½I^Œ½:°(¼Àk¯¼ÅDß¼¸Èš»¡?: ˜r<0­;¶ru;ý…";Žmк3¼,p€¼‰M–¼‡©<½Cü©½à¶½oPï½ì½JŽ9¼ö#H½Np¼ƒ¬@½ G¤½ƒ½@½Wê½Éú¾'o½Ô!½â߽윲½²ÍE½ ˽käڼ®ñ¼s9 ¼vͼÁK˜½R'¼ÌI¼"%`< èÐ9M·R;ï«æ<³Ï"=ÎT§=Çï«<êä×¼ó–<,7.=+ué<Ê­lºÓ^É9¦£ò;ìø<€ÆŒ<Û³<¥\â;û.;¥ý»«¾à¼$ùV;â.H»î; ¼¦¿ˆ½AZ½‹Ü½l‰Ý½} ½aÁ ½:ƽcË-½*|z¼Up¼gd»½ˆ®Ý½Ž¼ã½“¹.½SAƒ¼vN¼;ãÜJ;¦œC:Öùq¼T$í¼¿`꼕ȴ¼;Ø ¼á.<9'ð<<:=[Ðv=³(s=¹H=©ñ=µa=gK]<º=È<¦:Õ= èW=75á=÷´=‚9§=©´;âKÒ¼dh.¼ðî¼Ö¬P¼‡ÑÓ¼ä=ÉŽ=n;æTa;„ã;²Z<‚h†<è <0£>3º/>8}â>œá>…rH>•Å4>Þê‘>ùmÊÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=¯;£=¼²Þ= À@=­Wc=î?—>-1u>*˜={"<=:¼ß°½ÙCº(®þºÎï@½à ½ÈW½ºZ²½Ã]3½Žµ¼é]¼ÔG»Ì¾ ¼NÐ#¼”.H¼¬Dæ¼™TÞ½F‹ù½Ž6½—ö¨½`Œ¨½„Qð½DäϽaLë½;?}¼ß7»®œÈ9-Y:«’(;é 1;­†Æ»]¦œ;:Ké¼¢=‡½3?G½)3ѽ]‚ ½b ¿½‰ Ƚ. 鼬m‡;m¿;•L¯¼9½$?l½*m½¡”ð½Ä6½èé ½ÿr ¾ ½¼J€½£sÙ½’›»½«¼»´¼³Æ£¼æØb½ °Ò½ÜÀ¼T9¼ä5<?i=RH> ÿ>Š£%>™d‚>Yôþ=ÐÑ4<È0ü<ªdí<ž¬<”vb»€.ʼ7eM¼¹YA¼¥Üˆ½ ¼Ð«&¼£ R¼ê:^½û£¼YÞ†º¯­›<ÒÁÏ=tFH=n_³=¤ã<,–K<0ó<—C†<¦ë&;/+¼2» ªk¼9<:M<˳ó<“Qœ<Ûß;nµ;Q4H;¥à!< ‘:G›(¼,•­½'½uô¦½„îg½jIö½)$¯¼‹Ú¾¼ò´< ó;ñÇ9ܾ½2¹½on佄j£½m)‹½>|¼Rj»š´Ä:óÍ{¼tÅø½B¼˜RR¼n–Y¼U%E¼34»¿;»¾I»¼‚zô<êO=—Ï=¸=ÝGm=»=´mÙ=£Qu=“úM=¯(,=„cW=hjJ<Ê]¼7B¿>‡ï3>Jö|>h,>u›ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿºItr=tæ1>~=Û•x=³„¯>áß> ÐF=þÔf=ñÂî=1ðþ<ÿ¾µ<¤¬=<ÊsE<¶W ¼!d?½”½×¨:½ÕØì½½—&½rô¼·ý£¹'{[»ˆU]¼hõO¼¡Ï¼°‘¼/c켯i½Eïé½{½±, ½„}½’#Z½o*¼Ùzd¼SV»Él»<ïß<ß÷û<5Â;ÚÉ«¼Ç¶;¼ïu½"0½⑽:k¤½œ×?½‘Ô¤¼ôh¿»ûk;%€¿:´êN¼hzs½1+½kô½mX7½ªWÿ½tù½ÂÎL½Ä}¾½Àòº½¾0M½Ÿ"½\8ýÒê¼ÚÎb½€˜½ ŸÛ½eW¼¶x‹»¸D¥<Nf=eɃ>l¥>Þ­>àU˜>°%ã>j8œ=‘+=(²Z=\t<¥ÁDºYŒ=¼|€ ¼nWQ½Pϼî㼘KM¼­Ñ½¼õß¼ÝÍϹ4™÷<à¦=Êš@=äÚ=×X-==—h<ác^Ö>-w> §Ä=Áëƒ=™ö(=WÒÄ=>¹=DÃ=&Xö<<ýn;ºü[¼3M™¼ŽÒ5¼²μ¸Sv¼‡µ¥»·!:?«¦¼qÃ{;ò¢Ä=E e<Öü<è’ž=@>2 ì>‹8½>OÅÊ>Z°>RE•>šIÃÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿº4YºõTÄ=WÈ/=«Ü0>Mà >+\.>L2=øau=ÔX =žß=6¥ò=` ¬=qŸÔ=HC=7`ª»‹&½”LÛ½˜qº½¬5*½‡T‚½ckÛ½|H<Þs¶Óc?5g?.u'>úîO>¨Ñ >ý²=v,È<™ð»Ãº«¼/øx¼Nÿ—¼P“½*FŽHó¼ì$-¼ðãl¼Òˆn¼‹'ѻك<ŸÞî=ðk =î¶b=¸+ý=,TÕ<ôõy<ß»<§ ê<†é»m'Ú¼q@Ô¼9Ã;î ç<¸ˆð=‚þê=g ^<ú¨ä„ª<ƒÑA¼„FO¼}; À =[A_=¿Ïb=ÜÇþ=² <¯:!Û39嵺·;™\U»3ún½(~=½1ó¥½N˜½^}l½× ¼"ïì;{G¼€Mq¼–àÆ»': ;ÐHÓ»^Ä9;û™ <Ïœþ=Åñ8>7^>_ïJ>LBŸ=ü±È=Š‘=;=Íi= ’"=<âF>>=Åþ>Z#>pjQÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿº&º÷0†»ƒ‘£=ž?>fO–>´É‹>[•r>†N=ÐG=Ôæt=哦=´JÍ=º”Ó=ª¢<àaº:î»ñ—x½T%Ž€ä6½¡z½M[½Vâî¼5¼eMk<î%5=¤Ò>œŠ®?«“?6ã?¸È>£"¼>þ*=I®<˜˜€¼NVn¼Özú¼{»íм΂½>@†½áѽYñˆ½BL¯¼Š8g9 r=KÊ=›ÇÔ>"6=µ¼=F´<ë= TF<£<ß›»Ÿë´¼a|¹¸*Ï<1«r<ØŒ|=‰ð=nÆ={õ<8<è’?<¾¡<Öo±<—¹Ì= TÎ<—‹»—ü×¼ÈÃ/¼Ä,šÔ¼>,³> =o¿»»s<<‰èýÿB>Yjá>‡>„=°><õä=Ÿ<<¥šf<¦3'<¡Æö<É6<5$º[·¸»Ãìɼ'G²¼~ý1»Z%¼ƒû—»©Z»»{¿Æ9’Ï<Ûc@<÷él=æ\=.Ñ=+1\=VŠZ> ¾a>:„_>3µ>e?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ»'Hû»iÏî=Èí>Kwƒ>‘Ê›>ÉÀ”>¿Y> ¸ÿ> jé>¨þ>)…ÿ>%¨=уý=UÒ ;úäÔ¼&œH½+±½c­`½Ë½D¯³½ñÕ<‘F=ÏBÒ> ÂH>€=ûsz=³ÏR ¸>=éJ»<´}ð;Õ8ö<-›M<"Í»ˆe¼ÃU&½p”佃df½³{Y½Ç°Þ½Ÿ—8½‹ܽG”½–‘½yAg½fǨ½x½ ½@Ñx¼%$½½)ÕQ½­5]½À¾©½¼Ì½’¨à½š’u½€Ͻ±ïÒ½búx½wƽEƒð¼bcºë k+¼>»;¿>óÂß>Í5>„ãa=ç­=D‚ç=íðºð»d¼{Ît¼OÖü¼ú¹¼»½Hå½Xf㽄j½@ã¼Øše:‰ÙK=%¿x=‰7å=¸Ó=Œz:=*س=Š“<Ö4¿ô]¼ðÁ¼ž¸»ªD=-Ñ>ª˜>¼î>Ù=­óý<Ù¦;S„o;ÐJÔ<Ÿ4~<²¼:h:¼ÔF·½3áä½.Aݽ}Ž;Ä}<-#9ÓwÙ;8] ºƒ6z<šG<Ö$t<›™=âD>7/>k¼>Öv>’®;>kÑû> YŽ<ÏÈd;ÕP[»>e¼MZ;Ä$«9¾D »¾¹ ¼œ” ¼Â_j¼h,õ½]xŽ ’Ú¼S‰»n«<÷øî<þþó=‰==Õ<èèW<âŒÒ=»W<=Ãp{>ï»ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>Ã4=£g>\w;>¯>¤CÇ>p©>*|û>$îî=éÖé>-7>Ò!=ÊXí=IpºLF¼–`D½+Ð-½lžT½=¨¶¼ð\<6ßd=Œ¾>/F¨>tzt>‹ >g°Ï=ü8=TŽs¬‚>ƒñØ>t}Ð>èv=§‘=%Ù4=Ü <áM»¸5ûºäf¼z ý¼Y ½Û½@èѽ^mè¼Ó ¼ø<ðn=÷Z=CoÎ=‰Ly=Yè-='ütb;Rƒ¤<^™ =D=vÜ=dC)=Mg¨;ÞRñ»Ûy:ÁÜm<¨Q·ùî> Oî=­Ë–<ß<þ$çœ>tg>‘c>¡ãq>‡>ry<³W¶¼q&”¼ùG̽:ù¼ìL¼Š!§¼(Äî½­€½&Õ ½,°½2_½8½?1î½iÖñ¼† =N™F=ƒ3¨<Ó•L<ä¬= u=³¦ô=µSš=¶=åÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>¯=ôIÉ=Û=~>Eþn>`è;>[ï.>—ª=âo=›F`=P÷ë=z[=Å÷Ë<ª„h¼i#`¼£”½\½ ~£¼¹øv¼Y¡0= «=§M!>†U>ÌôM>п¿>¡ãÝ>&q\=‘ \<]Hï<®¾;ÝUX<1ÚEŽ>¿I=†?-=M¶4=«ç<œ§=RÞ;¶Dˆ»F~D»¡¼• ï¼ê‚¾¼ÙTt½'þºÕ‘¯;æón<ÑY=="ÃÂ=1_=S«ª=r„<¬¤–<>™9;ˆð“:çý`;j\‹<~÷û=>f¿=KΊ=0ô<)òQº®EV¼bÉ»Æô»¿¼ ý;—£þ;¾¾©;6QV¼HKl»¬@x¼M˜ð¼)O>¼é F>O4}>Žþ^>§1>„<@>(kÓ=/¹q¼¢è#½+j^½%Š®¼ã«/¼Ò•p¼¹¼#º-¼Ÿ@¼”_v½VI½ä½Ùν-è¼€r¼ú"Ø=@U×=‘Z!>4ê=È:ï=ÔÅ¥=Ø,<=µÔ =ó¶øÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=Çɽ=˜¥)=¢rž=Ÿ‘r>5Ç=æ|ü=êöò=Øó;[û[¼‘B<ÀÒ<0±¼e‰2½Êé½="2½‘#»ÊLY;ÛWÕ=#uP=çèî>•Ô¨>ã°O>ä²Ë>Çå‰>) Ò=ŒÌ™)®>n¥ã>‰?>j¸¤>À =•n‘< ¡Ÿ¼ý ‹½0nµ¼‰ýë¼äb»¼ZÒ¼“ʽ&ö+¼Lf¼[j»¼\WG½ U ½JnFº½NºPj={Ì=}¯È=¢º=ˆ…\=¦øâ=Ðâ>£œÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ9_[d<5óW=7 Ò=NÁ=4Kð=T`=V15¼Q;é½1c½%êî½P¬ù½ ð8½aAA½Š#;½HÄ4½-\ò¼-!=<ìdQ=ÝÍ>mš>»f´>Ä Œ>¯^1>@¯= Ž<+tJ³u½\S½RFJ¼x·Ë» ¹Å³ ¼Òb½ “½Al’½Ÿ=“½w½?+ ½|뼸ÀW½aÖ½žð:½•l½w¸¼öRž;É‚ž<çÃÛ=%p<²–»L1<{üL;¦IN;ÿÈ:fe,<-¸pº…e»Óõœ¼:M»¼{Nt¼k,´¼.í¼§º#¼"ĺkØ<3…÷=rä<´Ž;ÿ$3»d×»ö‚».(.;+Û8<©ñ¥<ºaÙ=‹¹=*ð<•U <¯R¼"õ¼'¸Ê<÷W<ž 1¼G7½cœd½>*|¼ê0½c½/6ö½%𠼾콭༣F ½ £a¼Ÿm!=8ëÔ=Ù¯û>2 >hƒQ>GMK> /ö=}m<ÛþT»¢òd¼\"/="{cÈ?>~°‘>xZ>‚¢¤>Þ9=Pw<çB8<“ͺÜ@»3‡-:Û¬<(øh¼ý“»½b$¼¨ ܼáðϽbÅh½PƉ½QõS½Ytb¼ü‹¼™Óâ¸Ë _¼/[ݼÒ9½/©_½]›Ë½Ù‹¼Â<“l;ºüÒ¼3¤.½DÒH½™U½½uã¼-ª<Ó#+=˜V&=®s™=lr=F)<×=>Ð=œm‰=…p¦=KE×;òN <ù;˜X¤»²#D»V÷ºܰ<‡1<¿—c";=¶Z;= ’=ªåC=¢¬Î=§Ž9=ûÍøÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>6.Q>2›pÿÿÿÿÿÿÿÿ=É‘=ü5hܽ"¡î¼½Þ¨¼ßH½·“½”î½&›Ž½ƒº[½¬½½‰½˜¢u½‹Ši½_}½1š7½6Ô»½uºwâ~=ܪ=r>N=`fG=¿[=ד*>7> Ä~=D÷ ;Ð+â="öÄJؼ]ÕÞ=Væ]=Úó=ÂZ’=ìÉø=j¯0=H›=.;1Ññ;ÂÑá)Ê„>c\ù=†Ø¢=Ž»Ð<„£[»é@g¼T¡?¼»çl½ºÆ¾­÷½Ö¸½Æ{²½à¤.½Ç(ó½Þ)#½ù%¯½Š#I½N§Ó½^b½›í¼ë•s<åSÆ=x:{=aÿ¯=U+¿=8“ =#U<ŸEÝ<&Q<TÑ@¹=öüÉ=W‰N9ÚÙj½hõ½ƒc½fÒn¼ÿÉP½ «É½®ß¼ðyý¼ƒr»ðGƒ<)+i<$Ö4»ž"¼S›.:„è;,í¥;k ®;{+;Î#´< ‘¼Sϼ ý§½FÚâ½ 3½FÔß½‹fX½ ¥S¼¬í†¼·2‰¼ä ½'_£½"Ô‹½п½!•K¼ÎW4»ý J»ò!¸»Þp(¼2R²»QöŸ=/§‘=@€ø<º=»›n¼Hx½%NT½ 40¼+ÔO»ª=ä=ko=R†á=l×Ì<¿:Ÿ<{{ˆ="Í=€=eÃÝ=_o%<èïÃ<ÖÝ»¾(>y,>­¯=fyÄ;¾‚¥¼ú`½.Á ½F$Ô½‚nl½6­I¼É¶u»èHÁ<,Gp¹!F;³r<:º±/:-<Äóê=ñ<Ã)z<ÂøÒ–½¯`µÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ<È®=Sš#=“,Ð=˜bï=‘B(=‰Ñ…=ªìÉ=Ê®\=µ¹C=€e¿$’‡>3R'>´=”0a½!ô.½Y¾½I·¼Ý+j¼ívŸ¼—ļ‰f‘¼È(¼Ð×}¼µî½ mԽɔ½Z6¼°ç”¼“Ku½9Ù1½cüh½P®I¼á¾î¼Ð°ì»Šþ¤¼TŠœ½Z&Á½›u(½ C<úè< ãs<îi<ì´=ZXè=Âl=ó===dg<¡_<Ç n<òæ<+ü<” ‹»¦¤¡¼¸ÿû½r½Åsä½Íów½Ž– ½Ó¢½ [D½ ‡½1œl½È“½ªq×ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>91Œ<÷x¶=} =a‰a=Þg=»±ˆ=µq¹=ÞN³=ß™·=¿ÌŽ=±s-=åµ»^ðƒ:çè¶¼Õ:gl<žzï:ȨսyDZ½­3„½Èv˜½Ì±\½€0½*Û9¼ô¸½:ù̽9h½#Ê ½1(u½FK€¼¬p<16<½;©=r÷<鮼ž_¼¨€ý½|¼ñ|«½Jʼóõƒ¼"æ;‰ Æã>;ÉK>:ð!=ÿŒ=œCö; Oj¼ÿ¼K<׊;<äŽý‡ºÞk;,/ò<ƒ–)½N.½dë½Ïó~½|²¼Ã4¬½!Üd¼òpȽäZ½'–ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>¿6i>”*È>¬¼>/#Š=™ =_ Â=ßÜ=À@³>bq>35º>Aÿõ>>}=RdÕ=7¿«<ŸÑ=AÊö=(/³=ÊÆ˜=}8¬<–¦o½>¥Ë½¨$ž½§Ú½Œyv½"µÕ½EÈŽŠ˜½¹ª½ Ûð½3æY½>å³½€ÃA½ECÍ»½ß<ÃŒé<—PÔ<«”;‰Ÿ¼<ð}¼ô‹¼âÑ4½(K;¼×‰U¼G£ú…> —=²{=Î;©+½~ó;#»QÇ(»œ{<_Lè=ï²=Ë<;S!1;èd=ˆ=Ê^0>Gc>:pú>"zn=í_ž<Ýó»ºêS¼ÛÿP½;V™½¥½&§G½•÷¼ªùºÔ/–;¸“­X_¼&ø‡¼!¥ø¼}bT»B«û<}ϼõq¼Qðè=ê(=2P=j„‹=hÿ—<$<qO<ã˜o<-þ;ŒÎ;óÃa<¿W-=0ñ¼Ò*¼”‘]¼£Ç7¼¯;ݼ£Æ–¼æG¼ãY¼C±:—e}¸Í3·½Ê[½˽S®üÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>ºÁK>–ŽÁ>“6B>•õ€>2&®>&Ó=–t>fÖ>]P>}º> c·=Ð-!=#ØC•=¸°Ò=³}½Gœ½VI½·ïÀ½Bwh½KuX½™î{½è¦±½úRñ½¯èʽ§ây½upM½šQ~½Kj¼£{ ; \;å­Üv"½_…½x_¼¾8F¼æno½3ËM½@¼@Q…¼ˆ—Y¼á›ß½&•¼»ãh;ÑpT=;LS¸»ÉIļòD¼?™Â<‹uã<¸…ª=ì…=  <±UY<œ þ<˜Ö=2A=ðì~>Iqœ>xƒE>)ò<=ò¸à=@k&<¿P<Ÿ˜\=!R†>€.=ÞÊ\=;O¶<  »ÃnA¼_c¼ó6—¼˜X½~¼å·°¼!9μ1¢ƒ»ñïî¹­²¼Â p½¢~¼€ˆ$¼ËuÇ£œ>Âu¿>Þ›ž>” €>GÊ,>€®%>V=Ùà{=íªß=Ôk=ß­ü=+Ï<оÅ;¦°L¼ HºÀ±=Ýçí>þ= ñP;ëk¼Ö §½½v'½²öˆ½c«q½›Þ½»”¾‘õ¾ ¯¾a½Î N½©j½”…y½6ðμ…Œ<¦ƒg;‰ô¹;¤Á8:< C:¾Üú¼GA;¹º<±Ô À†>`Ž<>x/à>?(Ñ=÷”<ÿ >=,ûî=P@=<à¶;éb¶¼ÂI4¼Ã$m¼^ ¯ºóµ»›Ü¼ ê%= ë¥=dÍ=«çg=¬§A=®'+<ÄKƒ;*Z»‡_ÿ¼Ñ¼í‚¼¨…*¼?­E¼í*¼Š˜?¼Šº¼ÀæÙ¼†2»¼·äy½'‚=½Ý™¼–úô< ¬»Œõļê:¼5¼` ¼0<½¼ö ÷¼ýg9¼#»Ú>HL,>2P=­Z€=]ºQ<ñ³V;%v1<#g= ª<Œß¼ªc¼ƒ‹¼Lîs¼éXv½³½7\Ú½|ƒ5½ŸlT½§Ð‘½3<®¼ÝÓ»mù⽯Q½ U½5w½´Žÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>¨Ô¥>©6u>ÅÿA>ס>H;«>_žb>Z³=Ûáš=±Æ‡=OK=¢$=“U.<1’o;bÔù¼›7¼¿›˜<ŽÈ˜=¯ ={f„½@V罆⽸ Y½™Ý£½£!3½°t½à‰V½è~#½ýSs½ôÐ彯hÒ½ AE½Ql®¼ŠÊ.=rƒÎ>ëø=Á=»=@ôô<Æa¼HòE¼@;`¼Šý÷»Ô£ »„Œ»<ém=’r=Á×=üõ¼(»½a€½„ÕØ½\P£½‘O½‹˜«½k­…½@ë}¼¾5¹¼`ž¼š$ϼ ÇZ¼Ýr¼ d«¼‡[9ŒoþºàÕç»°Ç·<4&m<â=[ì:ñÕV¼„ǼÅtͼ‹ZºxRÍ<~=‹rà>wç>W¹Û>Åš=ª-·=*ã¼±5€¼š)¶¼5 J»·™¼ô¥a¼•ÄE¼•¦1»¾Ô6»±Äs¼¦…;<¦æô=̱<æçU<ÉLN=7Úô<™î°»ÿƒ¤»ˆ”¨»¢ø®¼’¯-½Ž®¼Õqš¼(`¼!!˽½NÇ+½=<½P ¸½"§_½©i¼Žh,»ÏSÞ;Ï«D;ÒH';£»Áu¼ÝC$¼Ù Ú¼Ï4ã½–½ºì¼Ð´¦¼`Xƒ»}PJº“Ò¼PÚ{½“–d½!V¶½ –o¼÷™h½,ǼîÞ_½4¬š½g^¥¼±¥áå>gˆM>î>˜Oç>F¹=ëN<¡ûLm½¦pX½d“-¼Ž^ɼrP½6ѽiá½h´ã½tÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>¼~%>¯•~>¾Îq>¥i?>Œ^X>}Ð>'8=Тˆ=—|1=…ˆ=‰ˆq=P<æ¯è¼ÁYS¼òòb½?׈¼>â>9ÔÎV»Ñÿ½ró,½€y~½’x½¨óT½©l½ÈUȽϩ,½ßGq½åa9¾w½¬ ½že4½C+=Fs>ƒ&ç>í'á>ïÊÔ>‹¤Š>ßß="M®¼Lk½$0¼ðg·½»¼Š° »ŽÅ=ðE=¥G=àÄ8=¸7< z\¼ÊÈN½oR½†›µ½%Ľrݽ""z½2=ϼ\e ¼Ýý¼3ÑF¼'<þ:$‹ :ŒY.;ŒÈ;Ù"+<¡q¨<…Vn;¾þÉ»eN¼•¼½¯Ð½!× ½éݽâä¼ààÓ½$q½eço½‰•á½l\ ¼Äßö:ãg ;>°;;Hd»ñÈN»Ò °»˜Q»¥w@¼0̼Þ%]¼#€è¼Üy½1Â’½K(á¼òË ¼i´Å¼È©¼Kð½6Χ½„ª…½›Ú¦½‹}˽-Jø½–½? ½€º½‚1â½…×®¼€*|=9P<=[%=‚ J<Œùö<ŒÜ< ¦»= =âj >-ÒŽ>‘4>£+p>¡È>S›ø=õc=5ú¦<î8='œE=Œ8Í=dö¡<0¼Ô)½4 t½l]ú½`˜K½†Âz½…'ͽœÊý½‹sá½Zã¼°*;¼—+©½#Cµ½´½A`þ<¹Ø‰ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>Ô|O>ºwy>” Q>mÛB>3ìð>DŸµ=shù=[BX=Ç€=§<ÈnÄ;Ø;X½d˽[(³½îw½ŸÑ¼@¼ò±µ½G[[½WZ\½Xª½‡Fp½¯/ǽÅÕ¥½ž¥9½Çq½¥¸½H<=jzŽ<û!ˆ<ÃY£=! ¢=j£=<6<·à9;Ö¡«¼ª:½¤ùÕ½° K½‘ÞÒ½ja!½lö"½y5,½0b˼Üöɼæ,i½ݼºý½Û†½,#Ͻ­u9Éܼ8Xƒ:^ >‚~F>PÍ>…Tˆ>LHI=Ó”2=±"= 9Ø<ë‰=J÷==|M <,Ox»-88½>·«½Šÿ½‰¶P½‡µ½g½Cá½IÁ6½…‡Q½©#½¬ î¼ÂƒÒ½¹E½X‰’<Ç,²ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>¢,>^®­>&A¿=èš•=¦4=ŸÜ=iæ³= U<×à÷¼*!¼°Œi¼ßÓô;ûý¼2À$º·/¼ëd&½s«½Á6»¥yò»íû%½Gu"½Ãs½·ïмêZõ¼h³¼Bô¿»ªáн Ò=—4?:/‰?£-D?¦)œ?‚aÒ>÷÷0>…¿=‚zÂ=F&Æ=JLa=t[0=sµF=uýÔ=KÁb=-Æ=-²=xY»£Én½/‰ë½½ke©½€¼†½À ½Wža½Ul½‹½ðp½?½.ʽB,½C¾µ¼ë¢˜¼?Ý ¼Îú:›<;;á<‚¬ý¼ûƼJ‘û¼Oƒ=¼³R¼Šå¼Ç»»¹ú¹ ^¾¼,Ç#¼8ÿĽBÆk½Œó»½ÅÒS½’†½›B½M ½}¼›Ì¼¢[»½¼r½$½;”Z¼Þ¿-½m…³½–í9½b¿X½A )½2¶¼™`G¼“— ¼!„J»Mx<¼¨l¼pße¼ "%¼Hƒ¶¼T¨¼< n»´¯²;yÒbÝ>`TÙ>du>Fh>t=üI<˜ < Eºÿóø<¨O<¤[ƒº–‚ù½!_š½‰h/½§p]¾ (V½…K½Iù¨»1½/+½y@½‡—±½—½-Ì»¼»÷(=‰8cÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>†ˆ>H¸=Èög=,Iª=a=Qé<ï:–¹™M;†OÏ<'!½ƒº /D<é»Ô´K¼îv/¼®¾_»»>L:öZ*9ð,°¼… Ú½7f2½}½§¼ý»…j´;™ƒœ¯~?l¬?«¥?²¨Ú?ÞØ?pì>3 È=€™ê=‰8ý=¤ïÙ=ÌDm=Á ?=­¦û=Û“=E…=FÎQ=hv;“B½‰Ë½+BÀ½@6õ½r½¹<½cõ¯½)A>=M2>5 =•?þ©>(Ó³> ¼‹=ÎR¤<å¤b½6gp½;û}½iªá½1¸'¹íHŒ;Ëɽ&&½‹ô½ÿ¹¾®¯¾Aؽ%ºë»ÄÙ¼ P󽑳ž½“.+¼¾Žm<@8o<›CF:0 6½™Û½·~Þ½–Þ`ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>1=°"¦=©fÍ=ÆÃ=ª=µ¼? ×y?’—ã?¡š_?]8?ÚP>"ÌÓ=®— =¥ä>}ª> ,N=Úpê=»ù—=‰"8=¡’…=¨ØT=—-[=‘¼Â1½ $¼ÿ¢a½'T½“ ½:àϽP³½2Ó½0ý½8bú½nX^½±ú·½‡X½I¬…¼\;Y;d ;†H<쩨í½2~½Ïm½LSì½]R¼`¥…¼a¦¼àÖÛ½aW‹½n˜s½C‚?¼Ê@}¼to¼zg¦¼uJŸ¼vF½ +¼ïOe¼’Šý;YÓ¡=Ú.Ð>>~±>{*U>N™‰=ÇAq<â¼J͉:Â8•=s—Ø=°Gt=Ê<±=A›=@3e:†‡½8‚;½P½…ün½²‹½¶Å‚½nj¹½m;t½š—ß½­rz½êaξ¥2½Tì½&h0½H^¢¼Ü¯%<Œ¼„µ=S©F¼æ?½¨%½‰W½”Pè½™u½wÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=ÿ¥=ñ’>$xœ>+kÓ>}¾=ÊÄÛÚ>ô×?Š|?(ã•?&{Š>/=ÉÑ2=‡ÿ=êÝÌ>!1>=áéV=Â16=‘g=¬²è=¯Ï%=–-%=f¼gpD¼¹>S¼¶xø¼õdȽ4c̽3i„½G­6½‚Ëܽ$ô¼Ýw_½x-)½‹:º½’'½>áÚ»Ì;æWÞ;rÍ;ãÉYÂ>@Ó;>Š4ò>}8÷>{]&½=•qý»gÔ½¦“ؽ¡L½”Ù½Žtß½Yn¨ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>&0>@øÈ><+˜>Pk®>2Ý+=Ðwe=5©:œ¤»¹NU»ï3 î¼狼©÷+½ó»½¼[uå<šÜ¼§sf½ Ý|½ü弬3ª¼’k¡¼v¼El<ñ€d=¨Ye>É>qð“>•+ñ>uAØ>ôÝ=œ¼´=°ðJ=äÌÝ>ÿ˜>”¹=}J%=8²¡=JH&=¸ªï=ºÜº=žr<ÂÝ;ÉÅ3º±×Ä;r„ø:,”¼úbj½u½^ T½V"½RAF½­G½‚¡Í½–(`½Uœu¼ŒTﻂ»¾;ü2;ŠÙ“;‹Ø<¬ Y='5&=näj=sÑ<úÑvºâ·»ªJö¼<¼Dt¾¼8v‡;:=1ée=|Mª=kfH=rÚ¼L¥E¼¾r‰½&½‚të½ ð½-1ͼÂ_¼¥Âh¼¯“x½=½H¥ª½)¹½!%¹¼ëñ?½ z»ï·7<šœå=RI=2z¶=…Ò;¨L½ËX½4]μݳó¼sÞ;VX:óõ¼éÚȼЗü¼@ V¼A¤•¼ŽÆS¼=¢Á»ÝŠ—¼èï¼k¾3½5¼ûÞv½Ù½$½a½+°]½ ª½fØü½‘7ð½3h¼·¡ÿ< á<86¸<ÜT<%r]9'" ¼Š½x¼yÀ*»q’4¤ž>eX>OŲ=÷›ç<Žc¼¦,h¼iÏ–=é?=”¤`=Äp=¡=<Ò<ñ»»v÷½/¾ ½J<¬½„rĽGH½b„“½PBÛ½DÁÙ½#Z»_»Ÿ¼¡}¼Ó:;ô*¥=VÐ'9ý×¼¸í>=³µS=ª¾´½”›ó½œ¹(½ŒE°½‹¶œ½•½yçÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>Ñ‚ >¶Ùé>Às´>ÝÇ>‡>> f=g£<6{«;ù,»¶•5<ôc<¤Ò)s½¬Ù»ùÀ»¼¥§·¼ý†£¼Ö»˜¼Žç¼?ã°¼~¹¼‰Û¼ˆ#h<—½=>³e=T…=|Ðé> ªk=¹_=u§B=D²ã=}?Š=µc>^R=#=2x< ‚;ÊÊ~<ä­¾=‰Çè={ŸtÍ“>`==P¼véĽBd¼ÂKN¼y¸Ñ=_¿=|â¨=¬¤=²(<¤º:ÖH¤¼Ke½E'̽o¤o½0V)½ú=½2²U½)˜É¼‹b-½û¼Å²=í=û=zÞ¹=6÷=pô=ŸV%=¬&=³4»y¢>½§ïö½Œé½‚Wÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ø>>¶'d>àg)>¨‹b>¹{¿>±Ý>:r=~æK=q+.<.i×;Â…¿<×ð<­C¶<A<Ù+¶=+Ò“<ù+òé®>Õ~K>´b>¾¡>¶Mü>ªR”>˜:«=›w0=|èÑ=Rh ¼ô'½SÄG½:"X½0"ݼ÷„¼½ñƼ°¯·¼®·,¼Œe3¼8HZ;aê¢<ñ¨><ÄwU<¸Ò¹WYU=>%6 .Ó>Xç=£ñq=‚äf:н,н5åä½–hP½¢Ae½0ÿ¼“P4»ÜǼH¶Ò½"Âã¼Ýq½¼R©¼_»,2;îo°:ª?¼l˜¥½ ¥½j7±½±¤"½Í*½Ÿi=½|µF½;û;ïÙÉ<¢¸ˆÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ãÚ>¼…2>̈/>²Y>³•¥>’©ã>Mp°=ÀAv=xô=<¾Óm»<C= ^v=IsÖ<¤¨~;Á/~½Lù½qk¦½4½.·ú½ˆõ½~–½wó¼Ú= »ôJ;öì<¦J<‡Äý=ZÊ=Yü}=‹¦ž<ÖòW<9a-;ô. ;<Þ<[Ô¼L˜·½ ´°½l³½CÖõ½5«C½Aæ¼è2¼Î=ˆ¼B‡–»ÁÖ@»¾p»?"¼vï¼KF޼d«½ ‰$¼ú–f½¼~½6Wñ½ ç’¼ T¼²qX¼£=]¼ÄH³¼·N»%u¼«jñ¼ {¼˜ê ¼)f«º/f:5 =$ e=Ž4=kž=,\q<‡Z³<1”;ýº4<(Wž3I>$¢D>G·®=éÆÓ=|±3<3¾½A"½‹å½¹,d¾«â½ˆÖ™½µÍ¼ùPž»ÁB–¼SçJ¼Þ£Ç¼®¼+R¨;_Á;Ÿ-O¼‰D:¼åvü½DéݽoÞ6½ÊD¦½îX̽µ§z½jK"½ý‰¼;=Ö¢=.…Ü;‘­½ ƒo;‚ ܼho<’»2<›ŒS=.Ýþ<Ì!Ý:ò…Ð=WÏÊ={/=€×ö=„MD>8ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>"}>‹Þµ>,i€>²Æ;>Ùˆ>Àp>`N=ä›=hà·;à ½Óó½[×ü="]4=`ž<¥µS¼j—½/l½j±½}üI½A„½‹¢î½a}½@À{½Iô_¼bÃ;®¼<›Š$<›°d=böß=Ë‚=¶}x=0„®<ž{$<2¬ ¼/H$¼µòϼ{õ×¼÷M/¼ý?í½9ó‚½gɽw®½.Ó(;>T^;ì3¼»7¼ÕPU¼âaê½ ÁɼCå1º»IÞ»ˆÚF¼„‹¤½_‰¼èü´¼Â?´¼Òv\½Ä-½ìÓ¼ÒÕš¼H†ç¼IOç¼ús<¹ "='Ã<œ—ä< Ó¼€)½‘p½†f¼èèR½",è¼Mxe¼òÅ»‰€õº‹Ò¼t <: <‹¼wJ±¼ð¢¤½ɪ½„…½c¼L½¥wh½^-Õ¼+ݼ–J¼ª¬¢¼‡\‚¼šY`;–5MçI=5¿<´ö;&žŽ:î@7EÊ>mwÙ>hŽÑ=í<É=`²;Çjڼƚ[½‰"U½Ñi»½Ýoè½÷¹½{Bž½°Ñ½ 0¼÷i¼ð£²»¡9¸è;À<詺0mº“¥¼·J½.¶æ½t^½­B"½èÙ½ïUB½½¹½Í«¼êo¾9e/=#J>õ@=+p<ø"–=bß<+vn<é@=P<ÄÂô;¾Þ¯<ο<é& =R((=Pô¤ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>%Í=ØŽø=÷€°>q>£­z>Úm>Hlé=Ú ­=˜îpb½w©½$2¼y; ¼”ùq¼”[¼cˆ¼`q¼1ÁżŸ†¼ÄIL¼Û©v½(²Ö½ *潘R½OŠ‹½ ×®½p¹‹½‹¼È,¼Î÷>»ä‡}¼1¯o<‡˜Œ<«$@=?Ú2=aÓ¿=,W ;²e»¹9«;ûø;¨B±<‡¾%<ñÕR=p»= :=¡½<Ÿdã;„'?¼)ʼ5ÿ´»î}û¼kĺû×J<ˆf[<Õå=ó=Û‹»e¨¥¼¿^¼°Ñ-¼íŒ¼Ç¨4<Í=cJ =©C>„Ü>žÃ>œWð>{{º>ë=-Ð-»÷l ¼åȽ¬B½Í¬½á™=½¸[ ½Ä¸½–¤u½bŒç½ØL†ÿ'>rÒ>kjJ=‡³>*\Ú=§ª0:÷é$½ˆLƒ¼é½½4HϼáS…½¡½xe_½šq½™¶°½TB½–þѽÃD½}fk½Ÿ½v]¼ª÷¡;Æ…×=Bß=hè<Øõ3< y§;Á輡óH¼ýÈ‚½2™Ê½äU½!Y´½n²½<˜ç½FSé½b'½y\¹½8JX½ƺ¼Õ¾#¼åeá¼ó±­¼®mϼDd<€I›==Ò”=F‰X=N®‘=Nõ½<¬N¦¼?ß»(B;RjåŠ>“ã >ÙÄÇ>ƧÀ>”ßZ>7z=)ª»ñí½'NG½£=Õ½¿™|½¸Pt¾Óõ¾G?½Ÿ@½#>¼ =ƒà¯=Å+ =§¦=±î_=8"V<-îk<’;]]¼¼í§½ae(½f®0?½Y‰½ttô¼ÇR<µëº=+0q=,=;<ìQ=1K4=:=bÊz=Mά˜f=ì<ÚÙó<à@±ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½ëˆR½Î c½»¤x½²B¥=Š #> ¹0>`€$>8§>0Ç>@‡ß>ó=Rý’нa?½Ÿ!½N|½½A‡ý½y’j½‡ÙE½›²½žý½¬s½ž3P½ \½²ÿc¼Ý’c½ ˆ=¼åŠy¼Qç߻҂I¼fSÖ¼" ¼f•¼âÓ˜½vq½twý@­F½Iúô½CD¨½ …¦½‘X½i:½n=½cjB½8X½Lnr¼ÿö¼ÝÆ´¼©™:6ªj=n‡=Õç>Jdþ>?$?>ˆÑ=˜P:<÷G(¼áJJ¼ì˼ϕҼÍ{c½B*¼¨ÅA;F߉;øŠLìÎ>¾¸t>Ý-‚>È¡>“7>?=*þÜ»&Äf¼ƒÞ½‰.ܽ†|½nœ¢½äßš½ú—J½¯§¼½EH=JwÌ>%¦ó>\IB>Iâ>,¼2=¤œ¶<¦êć»óȼ0,<ô=«[=Kìæ=§À=r·?=yê=R»8¨±nÐÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½ý¸½ËÂ⽸©¼ùí=ŠP>um>c>>sr>l÷³>A¸Œòмp/»½‚•Ͻ¬“½` ½Z·;½=o½šbн—Ëõ½Xܲ½›'e½³"®½›R½‹‘ʽ ν~¿½9Ó½y½ÔÛ¼Z$ü»Çµˆ¼5üÛ¼òH½S½b'½…Zæ½k!½1j½‚ϼé{r½ªI½8ù`½H¡½9¿µ½A—„½zA½òþ¼´âC¸AD…=½éO>Y‡€>–ÖM>û_>g$$=×N(=-Ü%¼Îàt¼·ËÛ½,™]¼È)½Àx¼ÖÎL:«Ã5<•ìƒ=ø=ƒÐí=!õá;µšV½ít½ |;È <Ãu<Ój<ói=wœ= è¾;·óº»\,ºÿw»÷l#¼­é¤¼»:i¼© ;Èž-<Ö99<‰ÝžßݼÔÒ§=6x=ß“(>¦ùH>Çói>¯á&>þ…=çU®=ZáD<2û™¼á·Z½FPÕ½_¶½5M½Ï,5½í…½‹A ¼”Yz=²Ö>S?Í>“æ9>ˆ‚@>eGN>í*=‰¸ä=.ìX:ʼy¡9½_˜¼™y>¼Àà¼õÍ;ËÀã¼ ¹ô<4隺´Q»ÐN2= 8ã=‡ÍK=ëš^=ð2Ø=ý/=–·¥»¦L;Ì|“=Á`!=Í1 =Þzi>ØÐÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾É?½ä¥e½¾‹Ž½K3=è«¿>2á>x™È>Cb‹=m¿ø<Ý?q<5õl½£Dç½Ïç²½à¸;½›¼×l”½˜óU½›Ør½z½¸½‚ཥ—t½¬R?½nŒ½šµ®½H/{½h©½"ñ½ 9B<3W:uY¼9¶ê¼À4½G0j½Œ‡ñ½E,½RžU½+-!½òq¼µæÓ½2`½6¼çŠ©¼¾_¼ÇÇm½É3½ h½",?<¶yŒ=Ô¤³>Š >º[>¾Sä>ŸHs>L±=S,„»Ú2T½*O3½“†F½fn ½J½%š½9¹N<ŽÐê<£g<®ä± ¡>4•1>8F>l]=í&ì=Áõ;D(½z"½.uл*æ<:Þ|<™eŒ<t<¤,H7~%>r5n>„t>A×$=»t²=ßk‡&Œ>¤Á)>­¯Ú>€ûj>7Ê=åë[=/ðØ<,Pi»…æ¼-•;T<£“§<ïå2<î¸P<-êÒ<¤åN<ƒLû‹t< >þ=­I{>)-O>(s®=ù!u=g…{»s–:;¢:½=Þí;=Þ%`=×=þëkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½•Ùø½VßÛ<º)3=ýê>]é>]=`;<*Þ½¼ý޽ëuܾM]¾ ½Îƒé½¯÷…½äÍ ½“¼Ï½§T¥½~`½§Q½–⮽ŒW½_듽 ÔL¼û>%¼©Ì½¼fV<©V,;îâ;Ÿr¼þÇw½ ÛͽVm4½#Û5½ˆ›½’k¼ÙÙñ¼¬¼œ¼)¼×<¼¼¡}Ì»…i2¼òuÿ½O½c6½£æ»O¡Ã=½ðG>oýI>­\P>¹Ž+>ŸZ>Ej=2ñÄòÝ>c‰>¢‡>Ž@=>5o=¦ª,=ø »­¿ÿ¼ðý6m½ 6¼¬­;ê2Ë»­ÿ¦;9 ϼw¾*¼ÅªÇ¼;¼¼Äõ½›¼ð-þ¼{þ¨¼W|¼ mÿ¼£ÁD¼Ž^㼞Ë>¼÷u½Oy€½„|½›î€½yà{½+†5½ <1öN=ˆØW=Æq„>þo=Šê=naù<Ë£º9•½DI¼íoÿ¼ÆÞ+¼ Q˽,<ê½Y;-½4nT»®Qa=žf >YÀ >˜ª>•vÍ>€¼Š>½Í>ô=¤Œœ<-+…»—¨¼4ƒÑ»v/= O=+.ã= ¨$=IŒ= Ë|<°Eô<£mG»¤á9òV"=’uý=üÔ=¡e=—ËÙ:ý\ÿÿÿÿÿÿÿÿ>1>ž¶>b½ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=Û>¬¼¯S'=‰£ »m!½]e9½x¾F¼Ü=Ľ޷‹¾#¼½ßR*½´‚[½Ó–0½úÕ˜½¶½Á ’½¿ž½œüg½‹ÏL½ŽÎi½‚—í½Ž‹¼yp9Œ(š¹tÖ».ä7»ä?€»šÐg»žÂ€¼Í‰ð½G§¼—¦p:<–=µ†x>2å^>—0á>‡­€>^èp>’B=œF»‚!i½q5ƒ½Ÿ;½±*:½ ¿À½ƒƒ½€.ˆ¼<„U=M=¬æn>!xm>œ‰a>Ö¼>ØÚÌ>’I=á´T<‘J¼/a¼\~ù¼û]½M;/.&»0Ó:»ˆ<;¼Ü »_ÊѼæ:н‹¼î³*½O0:¼g¯f¼;ÃQ»Â° ¼*—¼lÈ ¼¯'ɼȲԽOŸ›½1ö½¾9½¢ÔC½®<ñ½'þå½ih½Jë<¾–=¶*<¯‘»|¹§»¤L¼oá¼øEѽ2×û¼ÛC$¼éë—¼Îî0¼Éé½¼>a_Æ>t 1>Jo!>ø(=å¿Ì=Ÿ1J<œÿ¾»Eôé¼¼[¼Ôϼ<‚š;åDÅ»µLÿ<®½ž='3!<ÞO<LÛ:“-“½àå½U$¼Å¿H<’Eç<¤†ó½…;н½Hÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¼†oš½# ½À»½ÑŸˆ½Óä½½a5ܼE¡V½_½ìºQ½ª0)½«Wƒ½ÑA‹½ÞV£½ÈMµ½‰±½Ý‡£½ÃïD½•™ž½¹O½ïò½‘Y#p >1V!=Ý<å=½ŽÍ=4޼gíF½DB0½Sx½§Ð̽Ý.⽪2¼½§¢D½]Y¼x—½a¸½)p…½ îô¼òH¡½S' ½•e½@ü/½#–¨½*·¼Bo‹<"É·=;ã= ¢u<®š'<ô `=@^=Vùr=^Ú=}<¹=Ÿ5Ú=§Ä=­ñ7>0Qa>¤þu>ÞM>÷/M>³ð>1\Û=q¼€ø<¥J#¼i»m«M¼«¼3A¼(ºÄLZ-&£>Á„=ç×4=ÆÝ=™Ô¾<¯›¸»Dµ¤½Ò½oC½ku.¼u›½,/½5½¼ê|¼d͆»>¹^¼OVXºXu½eú•¼’h†;{&Ó<ØÑS<éǽ»¦!ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½A»º½ñum½Ïh½Ð½‚ É¼¸9¨¼ÞUé½m·½—mܽ^÷§½áðÚ¾ò½è)½½{í½×ÖÚ½¯L¾s½¶®”½‘Ž 8Á<·¨y<i‘¼Ì ¼@^½ ½yyS½Qõi½:‚¼Ô)¼±ø»‘»iDf»qþð¼ Œ»ÅL­»ƒ+»0_–¼îsH½<‡,¼¦Ì=6Ã=Yž=¯Ï =×Óe=äYÃ=ÇÛ=F¿;â•“»áåc½Ί½põ½ÜüÒ½ú0œ¾dĽ¬Þº½¶e“½Œ ½Eäà½idA½Hû¼ÆP}½˳½pO†½;ï½6t/½B©½gñ½¼]6Ø<$$û=#µ<«vÕ;[> >À­>Ìf@>›Aô>0—ø=Yo<7$<Ü3X<[Êæ<›:n»æ5¼ÏÜé¼íšþ»!tÝ=\ÝD=^H¿=+´˜€>LÝE>iƒ>ty>0rŽ=Ìj»åbm;ÒdÊ<„¨¦= Ü<Àü;jMR¼½ <…­=•pÂ=²ØÎ=¼Ää= .=L ù<šuÄ»¬j= Xÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½'1d¼Å-‡<æÖt½œ<Î3i=…HܽNAJ½ùùø½¢2³¼E~h<“Bf¼…O*¼·Á¼Ê¡“½mm½8Dè=$ÿn=œh½Qؽó¼ù½„W½3­¼ -• ƒt=í$z=²`ý<¼“)¼Ï×ã¼ej<.$G=Ò™<÷lP<™Ѽ˜%¼â;‚k˜=³6X=ïêC=Þµ.=â«=»Æµ=ŠúSº©Te<$Š=4a–=g‰ñ=Ÿ…¨=ïàb>Yë>„^„>@J`=˜ v»—Ü<½WTu½{ž!½Rºt¼¢S~½:ܽ‰d‹½ª¨½®’˽9»·<׊ù=ªàa>AÍ>f™>pC÷=ðI©=Ͻgã½]µ‰½‡rd½I¡‰¼Þê­;™¶§=6—Ö=‹J=(b;ÝÞ3;Þ ò¼š­ë¼«L½=Ú9½ƒÈ˜½zßý½FÓ½`®ú½Šº»½¿“4¾©¾A@:¾O¾“ÿ'¾ g«¾£Â“½¢uè=$ Þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½€ Z= ð¼–Ôa=ã%ü=bŸì¼ï½;'%½”ѽlν‘ê ½©q ½¦1¼ô‘¼õ裼r<ÏŒã<Ëcs½“—$½Wõí½(ß»ƒ|¸½¬Ô<Œh=l  =ÕÑ=3é;<îg2=)<Ä=!;°<”I¼=œ©¼1m—½$”s¼¦Ôg;’ý3<ùA=…d‚=ÂØ¦=—m¤=›Hª=¢q‘=Ý=\ÕË=9y;=tQ9® ¼z#Ó½ Šž½~Öþ½  ½Ï+ ½ôg½ÃÒ~½´ñ½¶Ä?½Ý`½€|x¼ö缈Œ,½?ª6½“m›½‡„ï½7hj¼ÉýѺâÏûºåü—=!ÉU=‘ñ›=ée§> ˆé>'=¾]h=Æý=ž=ƒØŒ<ŠAï;ôÀ”<ºŽ÷ò`>tÞ>¸­Þ>œ >0|H=o¥ª¼µ À½Lïø½yÍl¼»ØŸ½8¿+½-~=½œÁ½¢_Û;ª](=•Ï–>e®j>ò€]?^y>ó>™®=ÓÏ:§=îÙ¼=˜©<¦öp¼Baݼvö¼cˆ¸¼¤n¶½9“½ uM½$ðá½Iþl½¨ˆ½£‘|½_å½cÍ·¾M9 ¾¹€¥¾´R¾¦)¾Ì:†ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¼Ç×> ©=Àù«=–z½Al¡½Ç9½”$нèȽÏS¥½°P½Š·{½lñ¼(© <î»Éë)½ ïw½¡É4¼i3,¼³¥Ö1qç>Wì¬>19N>.7=ê ð=ÂþQ=uM0<-¸8»Æ„`¼OEÙ»"¼¼î˼ÃFS½"Ü'¼¦o•¼CŽ‚»ÄËX;Á‚™<z:;9Ló;ñGê=+Ís=–ÄŒ=¼ÿ¾=èf=¼t‚=fCÕ<ÿ©‡<£ÿ¼=ŠÚ=м€=…QÀ=îJD>j/Ë>±ó>¬ù>tŒv=ØE®¼äÜT½yM½ð½[Šç½J6'½N ½†<Ú½CK =}è>1E>ù•?f+?ôŽ?@X£>ì%>#š´=mØ)· Ú¯¼Óÿj»¼ê=›­ð>tõö>‘„>qxa>] <²ùR¼tͼO¬O¼S 2¼¾º¼Þ ½ÁÓ»¢Sg¼}uI½F¼;½¹‘½¿$¼ô`²½(MH½)‰½Ìí?¾–£Ê¾¤/ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=õžÇ¼tŸ±½yC#½So¾½L“–¼£<½@H½T}è¼O3m<"Ù ;¶0h:~w¦¼š|S½0ô¸¼zo =åé<€]¤<…íA=Q´È=²ÇØ=²4=›º==ÃP=|½=S»9Eß½1H+;8M;OëI¼’­Ç7þÉ=×¼= 2Z=ˆA=\¼=C÷R=”~=j&“=+m¤0´Q>['Ù>1».> «>‚Â=¾=|^;ŸRG¼\m­¼ÌˆÞ¼®ÿœ¼ ©«¼¼El¼C®9¼¬Zl½| ¼¿×°¼ŸƒØ»Ðx1<¤g<”‡='Q'=;ãM=°t"=•†=›~o=ï<ÉÞ¦:¡B,;#”—;Ådå<÷X“=qhº>,>‹¼%>[‰>^/=PvM¼éÀ%½l5D½‡·Ê½»­O½ºýt½Æ¹½»þ=½<ø=Nun>šgô?Uõt?³[Ñ?©S]?°?˜ç>3›Ý=«%ý<}ØÅ¼…¥ü<Ì©ž=³\A>ƒ/´>¨Š½>¬V>RFc=oâ;W .»‘Qd»»Ó=¼Ü#½]‰»Ì/ž:“HX¼ ‚S½ô§¼ùK¼xߌ¼þŸX¼åÃê¼ëɾ¼Þ r½Tß½¿Z©ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½˜Y0»©¨»¢}Ù=Ôy¼Ïˆ<~r…º(# <ÇÙž;f·~½qM¼¿â½~~><¤¬3=Rþ=<¦&:<³Òò=’ìç=ÅoQ=ò÷™=ƒ7ˆ=[0†=­09æa}¼š«(¼ï.l;”£ç<Á<Ù»¥­þ<²‹l=HÄ<îªÁ;ÅüÕ<ÿ±‰=’=#à=¹"³>'ð=îÉ%=Ѧh=®äB<Ð;¦Ý‚½—½/HǽYvâ½Me?¼›0¼'$-¼…‚½$sؽUòY½S6ö¼Q¿m;9ž…<нÇ=+":=3ø=š =y. =*þI<­X3:þLœºÜµÆ¼P–¹»‰<;¯¡<ÓÍà=ËŽö>0Ù>+‹S=é'<›Ëþ½0U½O‹ ½Ðì½Á©Š½ê8>½ï/ö½Ù8‹½…Ðñ=¶SE?IÙ?ws?Ú² ?×ç”?¯s,?A>hLÍ=™æ^;©N:¼ é©;äÅ}=“Ž">DM!>£±>¨ÕN>rÙë=»öW<ª[˺Ì#ö»±¹ì½¿½Š¾U»¹8»V œ¼C†;½Œ¨¾½–f—¼à%6½Eu´½,÷½¼ëÃC¼Ó$¼ÜÒ}½»Íiÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½ž3&=“°ø=0@=“„<‹1 <¿‹V=t½•Öþ¾(Ú¾$9†½8›$=¼€Ç>ŽH=àÎ8=°Q‡=Ðæø=ý×>'UÌ>Wß >µj<¾i+ºòñܼ¥›½ ÚÒºi&V<‡÷Ò»= ®<èÚ8<ýMÁ=Dª== Ð~=gV<¹è=w‘=8= <]T<ʺ#<› <¤N‡¼Av༥„¼éK½!DR½¦±½D…½7¥`½#ö¼+J<E-<ÇÓp=T¥=ÄÉ=îÚB=×ÞR=4y¼âÛ¼¨†ó¼‡Aâ»âà÷=:Œ}=è¼1>..=âË:=øJ‘=º(É=…÷d:qõ¼¨²½1)ª½Z¯Á½s²Þ½BI¼£¾§¼S߯¼Bd¡½(ôM½f©½#“›¼ä/¼g”V;6Åü=*Qü=…. =¨ˆ =‡>=&ù*<ˆ(™<~ìŠ:¿(ɼx@S»r)–;›“Ê<¡ð=q =:>¹=F¾;ð'2¼œxÖ½#GT½CªÙ½‚JF½™^½×ì<½×³½ ô½5YÝ=å? EU?˜c?Ýb ?æ–Ù?¬'ç?‘~>—x9=“æ;æˆë¼¹:øà[<â6{>bo>+@À>‚EÉ>)=¿3=dÆù<€µ—»ÿ^»¥Áž8°Ô¼…0ã»·ïdº¨ßL½ƒ:+½ÇN¯½²â½Ã|ø¼öÕè;Ký <Ï}ǽ倽ïXÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=HÒ¾=@bû;M´=:¬4=5ÌǼór¤¾@½ø°½¦Œˆ<‰x&>0B¸=ÄD=îW…=é>• >k€½>YH>EÓ‚=^Ç<‡Ó#»t k¼¤‡v:Và+C>+ëD=ý«‹=gͼ»x[ò¼¥…¼âôN¼"Û»º°Ó=/,Â=üÆ…=øÍ’=à8=—ú®=:$ ;u„J¼¦?½O޽–²P½‹ÁÓ½LÍ«¼tˆ¼²¼ƒJ¶½.‡½+”½…¼ù()»³(;\2!<¤oÑ=_7=”¶D=†¥®O°?niY?¶B?Ä9ô?œø[?;¹>•j[=BEI¼Ìš½Œ ¼5ܺàI„<ˆ33=¦7>Wt>ÆÅ=qY=`ÉÑ<cÊ;y’ð; '¤4» >ˆB—>’.Õ>_{™=åè€7ƒ…>-Wd>¢V=_|õ¼w]ó¼×È5½VK¼ý‚V»d=׳=Õ>Ôw>£+=¶ú¦=ér;Gã=¼kÜ‹½ü¸½Ž\¿½wɆ½7=¼¬”9¼JX»à‡À½:#½"yY½‘V¼¤Ü1¼ž ¼Eñì; »S= “= 3Ö==fì~¦>Êâ"?Z´?‚ª?YIè>¯kþ=ç ;ÛŸ¼½Q3½3Mâ½#¼$[;Ÿâh=—=J¡Þ=E‹<÷Û<.Á.<*h »ça.<¦!Ž=¦=•ÍN<Á6i¼”Ú@½}Õ?½‡\½>Š+¼”ªÂ;’¬$»¹u^½Ígœ¾:0¾â)¾˜ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ»óqò<­ü":ÿ¥Ù=ìg»ö”“½6żo =—·©=‚`2=ytè=ü]Ð>%ÚH>;X>=égÐ=7n<íR2<¬;J»„â;S¹7<†Ü¡<¶ü<Þò8<Éh!<ÄÕú<ÐBY=:êñ<»u[»åh]<‚N;ÂLmf¸°Éå=“Šš=å\N>[Â>Bø>‘=ïÆJ<ëzI¼“l½uÞ½+Zº¼éáI:”=¥U6=ô T>$æ>|a=ÖW°=h3<j̼&/¶¼Ýf½@N&½cç½,/¼µ“û¼AiQ¼`3Õ½ÑA½J÷½Ì¢¼_v¼™áǼ†§ƒ¼Q,+‡†>͆6>â³À>»½>aŒÓ<õÚˆ¼p0¼¦2Û½ <½†-Û½TÒ¼ ¯´»¥Ç<’(ûT=H1š¼3+š½Z$½[-½Ž¼´4È<˜·Å<’ü×:uÝØ½*!ì½ÿ m½Ø§l½Ëèÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½Þ JÍ=Én=¨‰=Îõr=ÓÍ=pÅë=3T'=€Y¸=$¢_< }(Ç->/¸>û=Úº=©+ß<ÎD ¼'•=¼Ö{½I]Þ½fe½4¤Ã½qr¼´ƒ¼£¢Û½šÔ½K[V½Fd¼È–R¼ó+½,²Ë¼Úl¼J(:j@l»¦]E¼žÅn½YÎ:½mÓ½ªP:½~Jh½RF_¼Ûo­¼¡†£¼.¢¼ç×½Z°³½HAËÃ>tÕg=ôɶ=FôC;êu]½ˆŸ¼ì‹¡½ Y½—²½‰¡è½}Èœ½|Ó)½7<¼Ïýì¼|˜\¼}¾³¼?µè»³˜(=fà>E„t>gI>8\•=Ãaà;¹æ>ºW@v»¢Í¼Ìo&=fGÚ=OuI=?d.½G1½]—½»c½É­­ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¼‚Tн>Åc½Äùr½›ì‰½(›þ¼Óþ’¼á<l3=Ñd[=·-<–'`» Š»²îQ<ìÜ|=[øˆ={>‰=xÉU=.yƒ<¡—à=²Ì>‰>ž¡>0=Ðî‘=€P =ñ¼ö,¼òD¨½°G½y½v"(½:‹½e$X½ý½,ѽ}½5ù¼½7°½i>£½€WU½U4Q½Ü޼¿|¼æ˜˜½'-½Y½–0½¦`u½ˆäã½a̰½8ÁѼÏë=¼( ¼ç“½)†¤½œõ¼Ö Á¼r1;½–„½Kå½Xå½’ä½›-ѽ•§€½±"d½¹`Ö½¬f’½jcC<±¬<Þõ<˜>Rº0K½_ͽ¬å½£"½µF¿½ºÆ½³ÑW½F‘±½.äþ½N5i¼ÐVˆ¼É  ½+ ½OŽ¼Ç‘˜<Ã<÷>;">T">é>å¥=¹B;×*àºKî½gk½qÿ<äÖX<¥u:<¯¸j<ƒO;½Dþa½“cÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½ò‚ô½¢Ap½,½A¼§I;<åØî=0š²=c ß<ÿ¾ ¼¿c‡½|«½@Aí=&U=lØÏ=†=|=`Å<·Ò' > _â>oÚ=»à{=± <‹)»¹e¹½µñw½‡àˆ½ßtW¾2«Ç¾DæÇ<œ‰ñ½Ž&½cà½Q ½1,³½Aw¨½€¶í½©œÚ½•^꼺9]»s«Ä= t)=Uï=1b<ƒÄñ»sÐü{ÞŸ½@×½”Ww½è”ž¾#-u¾H»¦¾MG¾aŠVÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾ i½AÏ<¦Ö=b—h=QºR=—þ=º„à=Û]<—<›I=&[«=y8=%);îçÚ½—bv½@‰½¡ë¼ßò½4ܽ>P¼¶íu:Œàá»m¸»Ë먻É;B:C¾<Æh<e»ö†;Õ„<³3 <¼Xy<ãü„<Þ³;Í¿ºR0¼°Ù,»§}¼oðżµÐa½v¤;Õ·i<ževËÕÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ= Ë=ˆ‚q={ “=¡¹:=ÅÞå=§n1=9˜=§=|Œc»‹úºUN¤½6ÅÛ½T€\½}x<½“Œ|½4^¼›>U¼$©;qíV¼¿ª½_z½ýa½ Þ½ßì½'Dç½?p÷½C‘j½4KN¼ïÓ¼Ô~¬¼§½ ½L°t½ƒÿK½ºN©½'­½lžâ½?Kü½Ž·½ ¾€½%éß»§3 <±‚Ž=ì8[>™ö=Ü”2=÷´¿>IlC>Igû>MÒO>/`¹=¶å#<×t+;Pôõ½´ß»‰»’‡»Ä²½ŠT”½Äû½°/«ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¼‚u>øi=øÏ>= ÷~=·L4=Wö«,»ç>A ò>9]>eÏ>¸Éè>®a>˜Þ >…ƒ >Ê=–Ù7<.ëo»#4L<·•ä=ŒIL=û.ž=ç":=N§Ä»Lºl½Wðå½j‹Š½ÜQ½g˜ˆ½.b½0ëĽ$žR¼îz̼ˆá¼‚̈¼?e<[<Õ=%t=EŸ =_ö»=ϼ[”M¼Œ¦ú¼ eܽ.Yy¼Ó¸y¼ÕTˆ½8C°½.:0½žûs½[^'½-ꎼ”ŸV¼ Qýº”’Á$½y×ÿÿÿÿ½ÂÃŽ½ª¡½¿Ïøÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=Èk=¹Qä=\¨=ò‚°=¿`ñ½– ½À4½°9½ÇìĽÈâ9½œH•½6<ú½ æƒ½Q0½y>½‘µ¼ªÈ|¼B*»îJáHH¼d•¼»6ÕἚ!`¼‘}½C]ú¼Í`§¼Ìv#¼ˆáL;F/P¼;/v½:¦½?¸Z½ fò¼£•ļœ‹4¼KÍŸ¼uɼxar¼H»Ð£¼çb¼ææx¼ùw ½>ö½žk\½Àš<½áU½½Ÿà½pš¼¸÷È<¡‰M>Ã&>™Ó¹?'gò?K‡ê?u/¤?H-?"Ñ>Ýg>ª^>e×=¬Ìq;ß µ¼"Ã¥9þSƒ=¶=|<=ºk¥<_Ò»ÿ9»½$$½EŒY½r|,½}àü½'ÆN½j¼ÁÄ'¼’6Ô¼”.Á¼ëzÁ½Õ:¼ &F•ó>ÙD?§–N@60½@5mÏ@6,‡?‡z¬?7˜>º:Ó>n™¾=²…4<pN¼½]ä½®»N ƒ¼±€(;.`}»¼S¼Æóì¼Î“°½? ½ÿ˼d ʼ½±x¼½iâ¼é»Í½ÜC½Â=µ½qi<ÍSÝ=iæ=”ZË=¦ge=fϱ¼°›É½„õH½! z½ ]¼ˆ[¼“E=¼šÞ­ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>HGÿ=çý =Py&»÷O ½g¥¾˜Û¾žø¼Žö » ɶ½0,½ËÂÒ¼“W!¼ÈŒR½¤9Ù½¥ûn½d<~½E¬Ö¼–’Î¼óØ®¼¦2‚»)ˆi»ÉÓ(¼ {—¼¯r6¼3[?¢Ò+?¦W@5÷U@µÒp@×=R@œ a@]H?‡=;>Òé>yå«=Ù\i<"^û¼©ǽYf½6n÷¼ù€¼È×ø½sö«½Í!½c ù½_‘½cǽW‹»½˜¹¼ŸÓ2¼ˆ“i¼€/×¼“—¼¼’xå½-W½ž¡½¥·½&¾¼à[l¼À n¼Ê‚b½P½PÑv½Gß;¦<ùYì©=Û,=÷ ¨<–ž½@Ám¼z¢¨¼€F¼€þ0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=){¼Cë½…¾)yè½ëÊ|½4¾¼i>Ѽ“\?½Ijè¼þ$!½8ùê½ÕB½°oª½~Sq½C»z½)Ñ­½Qí½ î¼tm¼´qí½4£ð½!øø½Ù¼ÖOö»}c6¼kf<_Ø;;øpÿ;rþP¼b8뽆ð½—ôU¼¸^½Dû¼Ïâg¼”¿Â¼„n÷¼ ‡?è?ÐOÁ@®áŒA ³¬A0ÜSA-½@¨£Â?ÕºT?ß">t¡=µ¨:êkÚ½7ÖȽº{½æ„½–— ½·Í½È ³½¤aܽ”Àw½µƒ½,퇽†±ž½1X¼Â3¼—#¼“VºІ;¦h…¼ü3½¶½f" ½ «²¼éEY¼¹¥ù¼ºa‰½ £¼î¼Ðs^<˜S);8¼f<ú½×<´üë<œ1g½"A*¼Öñ½v;S]’=v ¼=ÄEM>:õ•>îj>g•Ùÿÿÿÿ½*º,¼–w¼U¹Â¼Šýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾ŸÏ¾G 価½t=a¼ Ò7½C½‰Ã ½IPÒ½&qA¾Šö½Ègr½M2µ½Å;Zt~¼Üþ¼ùC7¼ñ£À½%$½S¼^½4µ½^#:½N…¼û—¼­yu¼©°®½ø`½¶û½´›Þ½‡û½µµS½’[½D²¡½%Þ¼õ€Ö¼‰w¶¼0Ï*»–g¼~õà¼e®¸<£‡n=ZÂ)=Yü=hQõ=P´“=Iñ=4gQ<”:º}Ù¼®¤¼ÜB½•Lü½¨ìu½–0N½>AD¼1ý=%ö>5?ÎD@©Î.A,£‡AY6ºA2FAê@b©?'µ>8;š=þ”Œ»¶Ø ½&s齪u½ºÕ÷½“¦Æ½ÍBk½âer½ÈÆÏ>p4’>U¨³>ƒ†Ìÿÿÿÿÿÿÿÿÿÿÿÿ¼˜!ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾ž¸©¾í½½὎8ø½8Ai½Œß^½bûü=yíF½Óå½qB+½C k¼…¯8<=»‚Y»î@®¼£>Ö½f×½ s½øŠ½³½•êϽl‡ð½5X¼ü³ ½[2½¬½§4ܽ͗o½Ö#¨½²vÕ½‡)©½š½„Í^¼’TS¼.öX¼ÊQżáød¼Ò[N;5ÎT=$a=Oç×=M3=Q²>=Gèn=Z¾<޶g:ʼ©@³¼á»¹½™ ½Ððc½‡ÖH½JûT:%Ô^=D/Z=Ú ¼?¶îâ@°µ8AœpAHEñAIŽ@Ü’@'$d?NJ½>M¬=—`ð:Bl>¼–ýñ½L ʽš~½²Uä½»ö­½à"½·¿‡½›\ê½d&½~Í©½'°¼5ýF¹ô·•»¾»Cñ¼;—¾ñ=,†= Iû=3ò1<ƒ¦H™ä>fQ>Äÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ<^V"½PU½GM½Šª×¼‘šï¼U:ê½}á½:’»QùÕ=Èë=Ôg¥<׆g<¹ó¼Œ˜J¼fÙ¼ŠF¼-Xb½í=½;òX½..²½Bö¯½·a޽® ½ªQ½×¾½ÒÄ`½˜×J½…Æ–½•T£½¹n½…ªo½ $½>"½l•¼ÚcL»÷Q< Ž+=bÞ=RŽ:=x|ç=)–< <ú*;€ÉG¼'Çq½ÕV½Á%'½¹â½—»s½'Ãê;ÓÎ=.^¢=Ø„9?k^@g¢$@ÀlÍAÅñAÂo@½•Í@¥?âc>3É•=ÜYDj1=ü×,=æ ö=±±Äÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½Ön뽜¦!=/z=H½S&¼ôð <ÍÍ|=™¥Ò=›4ɼ7‘„<šŽ=Éx='œò¼’aÏ;už²:‰ ü¼±*½Hû²½SìR½XZ½Æþ<½ÆZú½’Ľ‚þ½­L½F™½™˜Ã½œÁѽœ×t½¯²½`™×½>E ½OÃJ¼ðˆ‡¼2Ïœ:¯æ†;îVï<ñuÂ=üv<¯³„ºŸ2;îA¼jߺ?¯’Â@jý;@´Þ¶@˜u@6(?¢VE>ò±d>5=ÈÒ<„s¤¼þå½RØb½„{½Œ$Y½˜¦½šÑ½‹»\½¯*½êÀ‚½ŒZƒ¼ëÖ:;ë=qq<¶“\;áu’<‰êŸ<Ámø<ÂÉM=Ç =,¡±<¢,¶»|>¼ÁüK¼N";<áŸ">¹Ëa>¯Ž÷=èÝ{=«>ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ=ñòl=Yš¼ýß3¼×wÜ<Ão =Îé=ø3½j®½²³=ŽO=8 <];E=÷лù‰¼Z)½ƒhK>¤÷?7 ?½ù ?çž¿?ºw>ì>HD–>*¥•=ÅQ»<†Qè½ ±¿½_9Ƚ†]½ˆˆÁ½•^;½Žö½¤fu½·ð½ÐK ½¥åD½Foï¼ko<Ì/W¼I¼Éc[;-n+;_ )Nc<»N!=Ù6k>Ÿ¦t>ÆZf>ÑÂ>ˆ™ =ÕJCÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½“܆½ ¾¼PA8¼vÃ<˜ <œiS»7I½Ìbã½k±ò½ ]‹<¦æ<ðsð<üq0½O㽕Ä\¼ïöWå|>qt>†Ø…>zé>®›ÿ>š‡Á>)¾¸>Rg=ºá®<Ýì%»ÏÈ•½ƒLὊɢ½“Un½ƒ~нžuJ½¨*½ÊÖ½øŠâ½÷íÔ½ŠNà½ä­¼ÙE›½÷]½Eº½0¾ƒ½K—¼2Û¢;ÅyÅ<Àçß;*ï[»ÄŒ0½!ÿϼϔ-ºÆÀ®;—Wo><É=–ºm=µªª>¡Ow>Ðsù>¡ó#=ð+÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿastropy-1.1.1/astropy/modeling/tests/data/irac_sip.hdr0000644001134200020070000004610012640262015023760 0ustar embrayscience00000000000000SIMPLE = T BITPIX = -32 / FOUR-BYTE SINGLE PRECISION FLOATING POINT NAXIS = 2 / STANDARD FITS FORMAT NAXIS1 = 256 / STANDARD FITS FORMAT NAXIS2 = 256 / STANDARD FITS FORMAT EXTEND = T / TAPE MAY HAVE STANDARD FITS EXTENSIONS ORIGIN = 'SIRTF Science Center' / Organization generating this FITS file CREATOR = 'S8.9.0' / SW version used to create this FITS file TELESCOP= 'SIRTF ' / SIRTF spacecraft INSTRUME= 'IRAC ' / SIRTF instrument ID COMMENT Controlled data files (CDFs) used: COMMENT w_bqd_files_to_copy_to_sandbox.nl, fileID = 2 COMMENT w_bqd_pointrefine.nl, fileID = 120903 CHNLNUM = 1 / 1 digit instrument channel number EXPTYPE = 'sci ' / Exposure Type REQTYPE = 'AOR ' / Request type (AOR, IER, or SER) AOT_TYPE= 'IracMap ' / Observation template type AORLABEL= 'NSMLT-0013 HP' / AOR Label FOVID = 74 / Field of View ID FOVNAME = 'IRAC_Center_of_4.5&8.0umArray' / Field of View Name / PROPOSAL INFORMATION OBSRVR = 'Giovanni Fazio' / Observer Name (Last, First) OBSRVRID= 2 / Observer ID of Principal Investigator PROCYCL = 1 / Proposal Cycle PROGID = 35 / Program ID PROTITLE= 'MULTIPLICTY AND INFRARED COLORS OF NEARBY MLT DWARFS' / Program Title PROGCAT = 29 / Program Category / TIME AND EXPOSURE INFORMATION DATE_OBS= '2003-12-06T10:46:35.021' / Date & time at DCE start MJD_OBS = 52979.449 / [days] MJD at DCE start (,JD-2400000.05) UTCS_OBS= 123979595.021 / [sec] J2000 ephem. time at DCE start SCLK_OBS= 755174834.035 / [sec] SCLK time (since 1/1/1980) at DCE start SAMPTIME= 0.2 / [sec] Sample integration time FRAMTIME= 30. / [sec] Time spent integrating (whole array) COMMENT Photons in Well = Flux[photons/sec/pixel] * FRAMTIME EXPTIME = 26.8 / [sec] Effective integration time per pixel COMMENT DN per pixel = Flux[photons/sec/pixel] / GAIN * EXPTIME AINTBEG = 43146779. / [Secs since IRAC turn-on] Time of integ. start ATIMEEND= 431497.75 / [Secs since IRAC turn-on] Time of integ. end AFOWLNUM= 16 / Fowler number AWAITPER= 118 / [0.2 sec] Wait period ANUMREPS= 1 / Number of repeat integrations AREADMOD= 0 / Full (0) or subarray (1) ABARREL = 4 / Barrel shift APEDSIG = 0 / 0=Normal, 1=Pedestal, 2=Signal / TARGET AND POINTING INFORMATION OBJECT = 'BRI0021-02' / Target Name OBJTYPE = 'TargetFixedSingle' / Object Type CRVAL1 = 6.15501347619052 / [deg] RA at CRPIX1,CRPIX2 averaged over DCE CRVAL2 = -2.07230798888938 / [deg] DEC at CRPIX1,CRPIX2 averaged over DCE RA_HMS = '00h24m37.2s' / [hh:mm:ss.s] CRVAL1 as sexagesimal DEC_DMS = '-02d04m20s' / [dd:mm:ss] CRVAL2 as sexagesimal RADESYS = 'ICRS ' / International Celestial Reference System EQUINOX = 2000. / Equinox for ICRF celestial coord. system CD1_1 = -0.000147943581033529 CD1_2 = 0.000305150643914974 CD2_1 = 0.000305100010374518 CD2_2 = 0.000147710276207053 CTYPE1 = 'RA---TAN-SIP' / RA---TAN with distortion in pixel space CTYPE2 = 'DEC--TAN-SIP' / DEC--TAN with distortion in pixel space CRPIX1 = 128. / Reference pixel along axis 1 CRPIX2 = 128. / Reference pixel along axis 2 CRDER1 = 0.000630078723280563 / [deg] Uncertainty in CRVAL1 CRDER2 = 0.000630066308654874 / [deg] Uncertainty in CRVAL2 UNCRTPA = 0.00186634833181778 / [deg] Uncertainty in position angle CSDRADEC= 5.27382080384386E-06 / [deg] Costandard deviation in RA and Dec SIGRA = 0.141175326515381 / [arcsec] RMS dispersion of RA over DCE SIGDEC = 0.0260011516228373 / [arcsec] RMS dispersion of DEC over DCE SIGPA = 0.786707814443969 / [arcsec] RMS dispersion of PA over DCE PA = 64.170376337596 / [deg] Position angle of axis 2 (E of N) (was OR RA_RQST = 6.15510111508666 / [deg] Requested RA at CRPIX1, CRPIX2 DEC_RQST= -2.07249338178042 / [deg] Requested Dec at CRPIX1, CRPIX2 PM_RA = -1.4108 / [arcsec/yr] Proper Motion in RA (J2000) PM_DEC = 1.50775 / [arcsec/yr] Proper Motion in Dec (J200) RMS_JIT = 0.00840644136311876 / [arcsec] RMS jitter during DCE RMS_JITY= 0.00544908399993541 / [arcsec] RMS jitter during DCE along Y RMS_JITZ= 0.00640122956573203 / [arcsec] RMS jitter during DCE along Z SIG_JTYZ= 0.00350446005496643 / [arcsec] Costadard deviation of jitter in YZ PTGDIFF = 0.738140521808859 / [arcsec] Offset btwn actual and rqsted pntng RA_REF = 6.10241222222221 / [deg] Commanded RA (J2000) of ref. position DEC_REF = -1.97235500000001 / [deg] Commanded Dec (J2000) of ref. position USEDBPHF= T / T if Boresight Pointing History File was used / DISTORTION KEYWORDS A_ORDER = 2 / polynomial order, axis 1, detector to sky A_0_2 = 6.666E-06 / distortion coefficient A_1_1 = 1.801E-05 / distortion coefficient A_2_0 = -2.353E-05 / distortion coefficient A_DMAX = 0.58 / [pixel] maximum correction B_ORDER = 2 / polynomial order, axis 2, detector to sky B_0_2 = 2.601E-05 / distortion coefficient B_1_1 = -2.944E-05 / distortion coefficient B_2_0 = -1.226E-06 / distortion coefficient B_DMAX = 0.902 / [pixel] maximum correction AP_ORDER= 2 / polynomial order, axis 1, sky to detector AP_0_1 = -5.463E-06 / distortion coefficient AP_0_2 = -6.666E-06 / distortion coefficient AP_1_0 = 1.14E-05 / distortion coefficient AP_1_1 = -1.801E-05 / distortion coefficient AP_2_0 = 2.353E-05 / distortion coefficient BP_ORDER= 2 / polynomial order, axis 2, sky to detector BP_0_1 = 1.975E-05 / distortion coefficient BP_0_2 = -2.601E-05 / distortion coefficient BP_1_0 = -1.495E-05 / distortion coefficient BP_1_1 = 2.944E-05 / distortion coefficient BP_2_0 = 1.225E-06 / distortion coefficient / PHOTOMETRY BUNIT = 'MJy/sr ' / Units of image data FLUXCONV= 0.111 / Flux Conv. factor (MJy/Str per DN/sec) GAIN = 3.3 / e/DN conversion / GENERAL MAPPING KEYWORDS CYCLENUM= 6 / Current cycle number DITHPOS = 1 / Current dither position / IRAC MAPPING KEYWORDS READMODE= 'FULL ' / Readout mode DITHSCAL= 'small ' / Dither scale (small, medium, large) / INSTRUMENT TELEMETRY DATA ASHTCON = 2 / Shutter condition (1:closed, 2: open) AWEASIDE= 0 / WEA side in use (0:B, 1:A) ACTXSTAT= 0 / Cmded transcal status ATXSTAT = 0 / transcal status ACFLSTAT= 0 / Cmded floodcal status AFLSTAT = 0 / floodcal status AVRSTUCC= -3.5 / [Volts] Cmded VRSTUC Bias AVRSTBEG= -3.51078391 / [Volts] VRSTUC Bias at start integration AVDETC = -2.75 / [Volts] Cmded VDET Bias AVDETBEG= -2.75721574 / [Volts] VDET Bias at start of integration AVGG1C = -3.6500001 / [Volts] Cmded VGG1 Bias AVGG1BEG= -3.2065742 / [Volts] VGG1 Bias at start of integration AVDDUCC = -3 / [Volts] Cmded VDDUC Bias AVDDUBEG= -3 / [Volts] VDDUC Bias at start integration AVGGCLC = 1 / [Volts] Cmnded VGGCL clock rail voltage AVGGCBEG= 1 / [Volts] VGGCL clock rail voltage AHTRIBEG= 204.70100403 / [uAmps] Heater current at start of integ AHTRVBEG= 2.39006352 / [Volts] Heater Voltage at start integ. AFPAT2B = 15.02370644 / [Deg_K] FPA Temp sensor #2 at start integ. AFPAT2BT= 431446.8125 / [Sec] FPA Temp sensor #2 time tag AFPAT2E = 15.02312088 / [Deg_K] FPA temp sensor #2, end integ. AFPAT2ET= 431476.9375 / [Sec] FPA temp sensor #2 time tag ACTENDT = 20.46821594 / [Deg_C] C&T board thermistor AFPECTE = 18.34936523 / [Deg_C] FPE control board thermistor AFPEATE = 21.90242577 / [Deg_C] FPE analog board thermistor ASHTEMPE= 21.59600639 / [Deg_C] Shutter board thermistor ATCTEMPE= 22.81523895 / [Deg_C] Temp. controller board thermistor ACETEMPE= 20.49869537 / [Deg_C] Calib. electronics board thermistor APDTEMPE= 21.47408295 / [Deg_C] PDU board thermistor ACATMP1E= 1.31549275 / [Deg_K] CA Temp, end integration for temp1 ACATMP2E= 1.29850066 / [Deg_K] CA Temp, end integration for temp2 ACATMP3E= 1.33064687 / [Deg_K] CA Temp, end integration for temp3 ACATMP4E= 1.3274169 / [Deg_K] CA Temp, end integration for temp4 ACATMP5E= 1.3255291 / [Deg_K] CA Temp, end integration for temp5 ACATMP6E= 1.32403958 / [Deg_K] CA Temp, end integration for temp6 ACATMP7E= 1.32282794 / [Deg_K] CA Temp, end integration for temp7 ACATMP8E= 1.31592035 / [Deg_K] CA Temp, end integration for temp8 / DATA FLOW KEYWORDS ORIGIN0 = 'JPL_FOS ' / Site where RAW FITS file was written CREATOR0= 'J5.1.0 ' / SW system that created RAW FITS DATE = '2003-12-17T00:52:57' / [YYYY-MM-DDThh:mm:ss UTC] file creation date AORKEY = 3937792 / AOR or EIR key. Astrnmy Obs Req/Instr Eng Req EXPID = 11 / Exposure ID (0-9999) DCENUM = 0 / DCE number (0-9999) TLMGRPS = 1 / expected number of groups FILE_VER= 1 / Version of the raw file made by SIS RAWFILE = 'IRAC.1.0003937792.0011.0000.01.mipl.fits' / Raw data file name CPT_VER = '3.0.94 ' / Channel Param Table FOS versioN CTD_VER = '3.0.94S ' / Cmded telemetry data version EXPDFLAG= F / (T/F) expedited DCE MISS_LCT= 0 / Total Missed Line Cnt in this FITS MANCPKT = F / T if this FITS is Missing Ancillary Data MISSDATA= F / T if this FITS is Missing Image Data PAONUM = 206 / PAO Number CAMPAIGN= 'IRAC003500' / Campaign DCEID = 6086781 / Data-Collection-Event ID DCEINSID= 626089 / DCE Instance ID DPID = 2631728 / Data Product Instance ID PIPENUM = 107 / Pipeline Script Number SOS_VER = 2 / Data-Product Version PLVID = 4 / Pipeline Version ID CALID = 6 / CalTrans Version ID SDRKEPID= 28809 / Sky Dark ensemble product ID PMSKFBID= 341 / Pixel mask ID LINCFBID= 357 / Fall-back Linearity correction ID FLATFBID= 718 / Fall-back flat ID FLXCFBID= 349 / Flux conversion ID MBLTFBID= 696 / Muxbleed Lookup Table ID MBCFFBID= 704 / Muxbleed Coefficients ID / PROCESSING HISTORY HISTORY job.c ver: 1.000000 HISTORY TRANHEAD v. 11.9, ran Tue Dec 16 16:52:35 2003 HISTORY CALTRANS v. 2.7, ran Tue Dec 16 16:52:44 2003 HISTORY cvti2r4 v. 1.25 A30501, generated 12/16/03 at 16:52:44 HISTORY FFCORR v. 1.000, ran Tue Dec 16 16:52:46 2003 HISTORY MUXBLEEDCORR v. 1.600, ran Tue Dec 16 16:52:50 2003 HISTORY FOWLINEARIZE v. 4.800000, ran Tue Dec 16 16:52:50 2003 HISTORY DARKSUBNG v. 1.000, ran Tue Dec 16 16:52:51 2003 HISTORY DARKDRIFT v. 3.5, ran Tue Dec 16 16:52:52 2003 HISTORY FLATAP v. 1.300 Tue Dec 16 16:52:53 2003 HISTORY DNTOFLUX v. 3.7, ran Tue Dec 16 16:52:57 2003 HISTORY PREDICTSAT v. 3.500000, ran Tue Dec 16 16:57:59 2003 HISTORY CALTRANS v. 2.7, ran Tue Dec 16 17:07:31 2003 HISTORY PTNTRAN v. 1.2, ran Tue Dec 16 17:07:32 2003 HISTORY FPGen v. 1.22, ran Tue Dec 16 17:07:33 2003 HISTORY CALTRANS v. 2.7, ran Wed Dec 17 06:14:18 2003 SOFTWARE= 'pointingrefine' / Pointing refinement using pnt-src correlation PTGVERSN= 5.3 / Version number of pointingrefine program RARFND = 6.15526023786181 / [deg] Refined RA DECRFND = -2.07244250543341 / [deg] Refined DEC CT2RFND = -64.5569826743286 / [deg] Refined CROTA2 PA_RFND = 64.5569826743286 / [deg] Refined PA (= -CROTA2_refined) ERARFND = 0.000535377007940228 / [deg] Error in refined RA EDECRFND= 0.00123072014833503 / [deg] Error in refined DEC EPA_RFND= 2.28015678741471 / [deg] Error in refined PA or CROTA2 NASTROM = 6 / # Astrometric sources for absolute refinement RARESID = -0.887761029918005 / [arcsec] Residual: Observed-Refined RA DECRESID= 0.484259558515454 / [arcsec] Residual: Observed-Refined DEC PA_RESID= -1391.7828122373 / [arcsec] Residual: Observed-Refined PA CD11RFND= -0.000145881550132727 / [deg/pix] Refined CD matrix element 1_1 CD12RFND= 0.000306140372692502 / [deg/pix] Refined CD matrix element 1_2 CD21RFND= 0.00030609131452955 / [deg/pix] Refined CD matrix element 2_1 CD22RFND= 0.000145647908967425 / [deg/pix] Refined CD matrix element 2_2 astropy-1.1.1/astropy/modeling/tests/data/__init__.py0000644001134200020070000000020012640262015023570 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst import os dpath = os.path.split(os.path.abspath(__file__))[0] astropy-1.1.1/astropy/modeling/tests/test_rotations.py0000644001134200020070000001223012644017723024217 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, unicode_literals, division, print_function) from math import cos, sin import numpy as np from numpy.testing import utils from .. import models from ...tests.helper import pytest def test_RotateNative2Celestial(): lon, lat, lon_pole = 42, 43, 44 model = models.RotateNative2Celestial(lon, lat, lon_pole) model.lon = model.lon + 1 model.lon_pole = model.lon_pole + 1 model.lat = model.lat + 1 assert model.lon == lon + 1 assert model.lat == lat + 1 assert model.lon_pole == lon_pole + 1 def test_native_celestial_native(): lon, lat, lon_pole = 42, 43, 44 n2c = models.RotateNative2Celestial(lon, lat, lon_pole) c2n = models.RotateCelestial2Native(lon, lat, lon_pole) nnphi, ntheta = 33, 44 calpha, cdelta = n2c(nnphi, ntheta) nnphi2, ntheta2 = c2n(calpha, cdelta) utils.assert_allclose(nnphi2, nnphi) utils.assert_allclose(ntheta2, ntheta) assert n2c.inverse(nnphi, ntheta) == c2n(nnphi, ntheta) assert c2n.inverse(nnphi, ntheta) == n2c(nnphi, ntheta) def test_native_celestial_lat90(): n2c = models.RotateNative2Celestial(1, 90, 0) alpha, delta = n2c(1, 1) utils.assert_allclose( delta, 1) utils.assert_allclose(alpha, 182) def test_Rotation2D(): model = models.Rotation2D(angle=90) x, y = model(1, 0) utils.assert_allclose([x, y], [0, 1], atol=1e-10) def test_Rotation2D_inverse(): model = models.Rotation2D(angle=234.23494) x, y = model.inverse(*model(1, 0)) utils.assert_allclose([x, y], [1, 0], atol=1e-10) def test_euler_angle_rotations(): x = (0, 0) y = (90, 0) z = (0, 90) negx = (180, 0) negy = (-90, 0) # rotate y into minus z model = models.EulerAngleRotation(0, 90, 0, 'zxz') utils.assert_allclose(model(*z), y, atol=10**-12) # rotate z into minus x model = models.EulerAngleRotation(0, 90, 0, 'zyz') utils.assert_allclose(model(*z), negx, atol=10**-12) # rotate x into minus y model = models.EulerAngleRotation(0, 90, 0, 'yzy') utils.assert_allclose(model(*x), negy, atol=10**-12) def test_euler_against_sky(): """ Test sky transformations against euler angle rotations """ # Write the Euler angles in terms of FITS WCS angles on the sky # This corresponds to FITS WCS CRVAL1 = 5.63 deg phi = 5.63 + 90 # This corresponds to FITS WCS CRVAL2 = -72.63 deg theta = 90 - -72.63 # This corresponds to FITS WCS LONPOLE = 180 deg psi = 180 - 90 # Create rotations between celestial and Native systems c2n = models.RotateCelestial2Native(5.63, -72.63, 180) n2c = models.RotateNative2Celestial(5.63, -72.63, 180) # And the corresponding rotation in terms of Euler angles # This corresponds to c2n since it's rotating coordinate systems, # not vectors model= models.EulerAngleRotation(phi, theta, -psi, 'zxz') utils.assert_allclose(model(1, 23.1), c2n(1, 23.1)) ra, dec = model.inverse(1, 23.1) if ra < 0: ra += 360 utils.assert_allclose((ra, dec), n2c(1, 23.1)) euler_axes_order = ['zxz', 'zyz', 'yzy', 'yxy', 'xyx', 'xzx'] @pytest.mark.parametrize(('axes_order'), euler_axes_order) def test_euler_angles(axes_order): """ Tests against all Euler sequences. The rotation matrices definitions come from Wikipedia. """ phi = np.deg2rad(23.4) theta = np.deg2rad(12.2) psi = np.deg2rad(34) c1 =cos(phi) c2 = cos(theta) c3 = cos(psi) s1 = sin(phi) s2 = sin(theta) s3 = sin(psi) matrices = {'zxz': np.array([[(c1*c3 - c2*s1*s3), (-c1*s3 - c2*c3*s1), (s1*s2)], [(c3*s1 + c1*c2*s3), (c1*c2*c3 - s1*s3), (-c1*s2)], [(s2*s3), (c3*s2), (c2) ]]), 'zyz': np.array([[(c1*c2*c3 -s1*s3), (-c3*s1 - c1*c2*s3), (c1*s2)], [(c1*s3 +c2*c3*s1), (c1*c3 - c2*s1*s3), (s1*s2)], [(-c3*s2), (s2*s3), (c2)]]), 'yzy': np.array([[(c1*c2*c3 - s1*s3), (-c1*s2), (c3*s1+c1*c2*s3)], [(c3*s2), (c2), (s2*s3)], [(-c1*s3 - c2*c3*s1), (s1*s2), (c1*c3-c2*s1*s3)]]), 'yxy': np.array([[(c1*c3 - c2*s1*s3), (s1*s2), (c1*s3+c2*c3*s1)], [(s2*s3), (c2), (-c3*s2)], [(-c3*s1 - c1*c2*s3), (c1*s2), (c1*c2*c3 - s1*s3)]]), 'xyx': np.array([[(c2), (s2*s3), (c3*s2)], [(s1*s2), (c1*c3 - c2*s1*s3), (-c1*s3 - c2*c3*s1)], [(-c1*s2), (c3*s1 + c1*c2*s3), (c1*c2*c3 - s1*s3)]]), 'xzx': np.array([[(c2), (-c3*s2), (s2*s3)], [(c1*s2), (c1*c2*c3 - s1*s3), (-c3*s1 - c1*c2*s3)], [(s1*s2), (c1*s3 + c2*c3*s1), (c1*c3 - c2*s1*s3)]]) } model = models.EulerAngleRotation(23.4, 12.2, 34, axes_order) mat = model._create_matrix(phi, theta, psi, axes_order) utils.assert_allclose(mat.T, matrices[axes_order])#get_rotation_matrix(axes_order)) astropy-1.1.1/astropy/modeling/tests/test_projections.py0000644001134200020070000001766312644017723024553 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """Test sky projections defined in WCS Paper II""" from __future__ import (absolute_import, unicode_literals, division, print_function) import os import numpy as np from numpy.testing import utils from .. import projections from ..parameters import InputParameterError from ...io import fits from ... import wcs from ...utils.data import get_pkg_data_filename from ...tests.helper import pytest def test_Projection_properties(): projection = projections.Sky2Pix_PlateCarree() assert projection.n_inputs == 2 assert projection.n_outputs == 2 PIX_COORDINATES = [-10, 30] pars = [(x,) for x in projections.projcodes] # There is no groundtruth file for the XPH projection available here: # http://www.atnf.csiro.au/people/mcalabre/WCS/example_data.html pars.remove(('XPH',)) @pytest.mark.parametrize(('code',), pars) def test_Sky2Pix(code): """Check astropy model eval against wcslib eval""" wcs_map = os.path.join(os.pardir, os.pardir, "wcs", "tests", "maps", "1904-66_{0}.hdr".format(code)) test_file = get_pkg_data_filename(wcs_map) header = fits.Header.fromfile(test_file, endcard=False, padding=False) params = [] for i in range(3): key = 'PV2_{0}'.format(i + 1) if key in header: params.append(header[key]) w = wcs.WCS(header) w.wcs.crval = [0., 0.] w.wcs.crpix = [0, 0] w.wcs.cdelt = [1, 1] wcslibout = w.wcs.p2s([PIX_COORDINATES], 1) wcs_pix = w.wcs.s2p(wcslibout['world'], 1)['pixcrd'] model = getattr(projections, 'Sky2Pix_' + code) tinv = model(*params) x, y = tinv(wcslibout['phi'], wcslibout['theta']) utils.assert_almost_equal(np.asarray(x), wcs_pix[:, 0]) utils.assert_almost_equal(np.asarray(y), wcs_pix[:, 1]) @pytest.mark.parametrize(('code',), pars) def test_Pix2Sky(code): """Check astropy model eval against wcslib eval""" wcs_map = os.path.join(os.pardir, os.pardir, "wcs", "tests", "maps", "1904-66_{0}.hdr".format(code)) test_file = get_pkg_data_filename(wcs_map) header = fits.Header.fromfile(test_file, endcard=False, padding=False) params = [] for i in range(3): key = 'PV2_{0}'.format(i + 1) if key in header: params.append(header[key]) w = wcs.WCS(header) w.wcs.crval = [0., 0.] w.wcs.crpix = [0, 0] w.wcs.cdelt = [1, 1] wcslibout = w.wcs.p2s([PIX_COORDINATES], 1) wcs_phi = wcslibout['phi'] wcs_theta = wcslibout['theta'] model = getattr(projections, 'Pix2Sky_' + code) tanprj = model(*params) phi, theta = tanprj(*PIX_COORDINATES) utils.assert_almost_equal(np.asarray(phi), wcs_phi) utils.assert_almost_equal(np.asarray(theta), wcs_theta) @pytest.mark.parametrize(('code',), pars) def test_projection_default(code): """Check astropy model eval with default parameters""" # Just makes sure that the default parameter values are reasonable # and accepted by wcslib. model = getattr(projections, 'Sky2Pix_' + code) tinv = model() x, y = tinv(45, 45) model = getattr(projections, 'Pix2Sky_' + code) tinv = model() x, y = tinv(0, 0) class TestZenithalPerspective(object): """Test Zenithal Perspective projection""" def setup_class(self): ID = 'AZP' wcs_map = os.path.join(os.pardir, os.pardir, "wcs", "tests", "maps", "1904-66_{0}.hdr".format(ID)) test_file = get_pkg_data_filename(wcs_map) header = fits.Header.fromfile(test_file, endcard=False, padding=False) self.wazp = wcs.WCS(header) self.wazp.wcs.crpix = np.array([0., 0.]) self.wazp.wcs.crval = np.array([0., 0.]) self.wazp.wcs.cdelt = np.array([1., 1.]) self.pv_kw = [kw[2] for kw in self.wazp.wcs.get_pv()] self.azp = projections.Pix2Sky_ZenithalPerspective(*self.pv_kw) def test_AZP_p2s(self): wcslibout = self.wazp.wcs.p2s([[-10, 30]], 1) wcs_phi = wcslibout['phi'] wcs_theta = wcslibout['theta'] phi, theta = self.azp(-10, 30) utils.assert_almost_equal(np.asarray(phi), wcs_phi) utils.assert_almost_equal(np.asarray(theta), wcs_theta) def test_AZP_s2p(self): wcslibout = self.wazp.wcs.p2s([[-10, 30]], 1) wcs_pix = self.wazp.wcs.s2p(wcslibout['world'], 1)['pixcrd'] x, y = self.azp.inverse(wcslibout['phi'], wcslibout['theta']) utils.assert_almost_equal(np.asarray(x), wcs_pix[:, 0]) utils.assert_almost_equal(np.asarray(y), wcs_pix[:, 1]) class TestCylindricalPerspective(object): """Test cylindrical perspective projection""" def setup_class(self): ID = "CYP" wcs_map = os.path.join(os.pardir, os.pardir, "wcs", "tests", "maps", "1904-66_{0}.hdr".format(ID)) test_file = get_pkg_data_filename(wcs_map) header = fits.Header.fromfile(test_file, endcard=False, padding=False) self.wazp = wcs.WCS(header) self.wazp.wcs.crpix = np.array([0., 0.]) self.wazp.wcs.crval = np.array([0., 0.]) self.wazp.wcs.cdelt = np.array([1., 1.]) self.pv_kw = [kw[2] for kw in self.wazp.wcs.get_pv()] self.azp = projections.Pix2Sky_CylindricalPerspective(*self.pv_kw) def test_CYP_p2s(self): wcslibout = self.wazp.wcs.p2s([[-10, 30]], 1) wcs_phi = wcslibout['phi'] wcs_theta = wcslibout['theta'] phi, theta = self.azp(-10, 30) utils.assert_almost_equal(np.asarray(phi), wcs_phi) utils.assert_almost_equal(np.asarray(theta), wcs_theta) def test_CYP_s2p(self): wcslibout = self.wazp.wcs.p2s([[-10, 30]], 1) wcs_pix = self.wazp.wcs.s2p(wcslibout['world'], 1)['pixcrd'] x, y = self.azp.inverse(wcslibout['phi'], wcslibout['theta']) utils.assert_almost_equal(np.asarray(x), wcs_pix[:, 0]) utils.assert_almost_equal(np.asarray(y), wcs_pix[:, 1]) def test_AffineTransformation2D(): # Simple test with a scale and translation model = projections.AffineTransformation2D( matrix=[[2, 0], [0, 2]], translation=[1, 1]) # Coordinates for vertices of a rectangle rect = [[0, 0], [1, 0], [0, 3], [1, 3]] x, y = zip(*rect) new_rect = np.vstack(model(x, y)).T assert np.all(new_rect == [[1, 1], [3, 1], [1, 7], [3, 7]]) def test_AffineTransformation2D_inverse(): # Test non-invertible model model1 = projections.AffineTransformation2D( matrix=[[1, 1], [1, 1]]) with pytest.raises(InputParameterError): model1.inverse model2 = projections.AffineTransformation2D( matrix=[[1.2, 3.4], [5.6, 7.8]], translation=[9.1, 10.11]) # Coordinates for vertices of a rectangle rect = [[0, 0], [1, 0], [0, 3], [1, 3]] x, y = zip(*rect) x_new, y_new = model2.inverse(*model2(x, y)) utils.assert_allclose([x, y], [x_new, y_new], atol=1e-10) def test_c_projection_striding(): # This is just a simple test to make sure that the striding is # handled correctly in the projection C extension coords = np.arange(10).reshape((5, 2)) model = projections.Sky2Pix_ZenithalPerspective(2, 30) phi, theta = model(coords[:, 0], coords[:, 1]) utils.assert_almost_equal( phi, [0., 2.2790416, 4.4889294, 6.6250643, 8.68301]) utils.assert_almost_equal( theta, [-76.4816918, -75.3594654, -74.1256332, -72.784558, -71.3406629]) def test_c_projections_shaped(): nx, ny = (5, 2) x = np.linspace(0, 1, nx) y = np.linspace(0, 1, ny) xv, yv = np.meshgrid(x, y) model = projections.Pix2Sky_TAN() phi, theta = model(xv, yv) utils.assert_allclose( phi, [[0., 90., 90., 90., 90.,], [180., 165.96375653, 153.43494882, 143.13010235, 135.]]) utils.assert_allclose( theta, [[90., 89.75000159, 89.50001269, 89.25004283, 89.00010152], [89.00010152, 88.96933478, 88.88210788, 88.75019826, 88.58607353]]) astropy-1.1.1/astropy/modeling/tests/utils.py0000644001134200020070000000123512640262015022271 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals, print_function import contextlib import warnings from ...tests.helper import catch_warnings @contextlib.contextmanager def ignore_non_integer_warning(): # We need to ignore this warning on Scipy < 0.14. # When our minimum version of Scipy is bumped up, this can be # removed. with catch_warnings(): warnings.filterwarnings( "always", "using a non-integer number instead of an integer " "will result in an error in the future", DeprecationWarning) yield astropy-1.1.1/astropy/modeling/tests/test_mappings.py0000644001134200020070000000374212640262015024013 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, unicode_literals, division, print_function) from ...tests.helper import pytest from ..models import Shift, Rotation2D, Identity, Mapping import numpy as np from numpy.testing.utils import (assert_allclose, assert_array_equal) def test_swap_axes(): x = np.zeros((2, 3)) y = np.ones((2, 3)) mapping = Mapping((1, 0)) assert(mapping(1, 2) == (2.0, 1.0)) assert(mapping.inverse(2, 1) == (1, 2)) assert_array_equal(mapping(x, y), (y, x)) assert_array_equal(mapping.inverse(y, x), (x, y)) def test_duplicate_axes(): mapping = Mapping((0, 1, 0, 1)) assert(mapping(1, 2) == (1.0, 2., 1., 2)) assert(mapping.inverse(1, 2, 1, 2) == (1, 2)) assert(mapping.inverse.n_inputs == 4) assert(mapping.inverse.n_outputs == 2) def test_drop_axes_1(): mapping = Mapping((0,), n_inputs=2) assert(mapping(1, 2) == (1.)) def test_drop_axes_2(): mapping = Mapping((1, )) assert(mapping(1, 2) == (2.)) with pytest.raises(NotImplementedError): mapping.inverse def test_drop_axes_3(): mapping = Mapping((1,), n_inputs=2) assert(mapping.n_inputs == 2) rotation = Rotation2D(60) model = rotation | mapping assert_allclose(model(1, 2), 1.86602540378) def test_identity(): x = np.zeros((2, 3)) y = np.ones((2, 3)) ident1 = Identity(1) shift = Shift(1) rotation = Rotation2D(angle=60) model = ident1 & shift | rotation assert_allclose(model(1, 2), (-2.098076211353316, 2.3660254037844393)) res_x, res_y = model(x, y) assert_allclose((res_x, res_y), (np.array([[-1.73205081, -1.73205081, -1.73205081], [-1.73205081, -1.73205081, -1.73205081]]), np.array([[ 1., 1., 1.], [ 1., 1., 1.]]))) assert_allclose(model.inverse(res_x, res_y), (x, y), atol=1.e-10) astropy-1.1.1/astropy/modeling/tests/test_core.py0000644001134200020070000002453612644017723023141 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, unicode_literals, division, print_function) import numpy as np from numpy.testing.utils import assert_allclose from ..core import Model, InputParameterError, custom_model from ..parameters import Parameter from .. import models from ...tests.helper import pytest, catch_warnings from ...utils.compat.funcsigs import signature from ...utils.exceptions import AstropyDeprecationWarning class NonFittableModel(Model): """An example class directly subclassing Model for testing.""" a = Parameter() def __init__(self, a, model_set_axis=None): super(NonFittableModel, self).__init__( a, model_set_axis=model_set_axis) @staticmethod def evaluate(): pass def test_Model_instance_repr_and_str(): m = NonFittableModel(42) assert repr(m) == "" assert (str(m) == "Model: NonFittableModel\n" "Inputs: ()\n" "Outputs: ()\n" "Model set size: 1\n" "Parameters:\n" " a \n" " ----\n" " 42.0") assert len(m) == 1 def test_Model_array_parameter(): m = NonFittableModel([[42, 43], [1,2]]) m = NonFittableModel([42, 43, 44, 45]) phi, theta, psi = 42, 43, 44 model = models.RotateNative2Celestial(phi, theta, psi) assert_allclose(model.param_sets, [[42], [43], [44]]) def test_inputless_model(): """ Regression test for https://github.com/astropy/astropy/pull/3772#issuecomment-101821641 """ class TestModel(Model): inputs = () outputs = ('y',) a = Parameter() @staticmethod def evaluate(a): return a m = TestModel(1) assert m.a == 1 assert m() == 1 # Test array-like output m = TestModel([1, 2, 3], model_set_axis=False) assert len(m) == 1 assert np.all(m() == [1, 2, 3]) # Test a model set m = TestModel(a=[1, 2, 3], model_set_axis=0) assert len(m) == 3 assert np.all(m() == [1, 2, 3]) # Test a model set m = TestModel(a=[[1, 2, 3], [4, 5, 6]], model_set_axis=0) assert len(m) == 2 assert np.all(m() == [[1, 2, 3], [4, 5, 6]]) def test_Model_add_model(): m = models.Gaussian1D(1,2,3) m.add_model(m, 'p') m.add_model(m, 's') with pytest.raises(InputParameterError): m.add_model(m, 'q') m.add_model(m, 42) def test_ParametericModel(): with pytest.raises(TypeError): models.Gaussian1D(1, 2, 3, wrong=4) def test_custom_model_signature(): """ Tests that the signatures for the __init__ and __call__ methods of custom models are useful. """ @custom_model def model_a(x): return x assert model_a.param_names == () assert model_a.n_inputs == 1 sig = signature(model_a.__init__) assert list(sig.parameters.keys()) == ['self', 'args', 'kwargs'] sig = signature(model_a.__call__) assert list(sig.parameters.keys()) == ['self', 'x', 'model_set_axis'] @custom_model def model_b(x, a=1, b=2): return x + a + b assert model_b.param_names == ('a', 'b') assert model_b.n_inputs == 1 sig = signature(model_b.__init__) assert list(sig.parameters.keys()) == ['self', 'a', 'b', 'kwargs'] assert [x.default for x in sig.parameters.values()] == [sig.empty, 1, 2, sig.empty] sig = signature(model_b.__call__) assert list(sig.parameters.keys()) == ['self', 'x', 'model_set_axis'] @custom_model def model_c(x, y, a=1, b=2): return x + y + a + b assert model_c.param_names == ('a', 'b') assert model_c.n_inputs == 2 sig = signature(model_c.__init__) assert list(sig.parameters.keys()) == ['self', 'a', 'b', 'kwargs'] assert [x.default for x in sig.parameters.values()] == [sig.empty, 1, 2, sig.empty] sig = signature(model_c.__call__) assert list(sig.parameters.keys()) == ['self', 'x', 'y', 'model_set_axis'] def test_custom_model_subclass(): """Test that custom models can be subclassed.""" @custom_model def model_a(x, a=1): return x * a class model_b(model_a): # Override the evaluate from model_a @classmethod def evaluate(cls, x, a): return -super(model_b, cls).evaluate(x, a) b = model_b() assert b.param_names == ('a',) assert b.a == 1 assert b(1) == -1 sig = signature(model_b.__init__) assert list(sig.parameters.keys()) == ['self', 'a', 'kwargs'] sig = signature(model_b.__call__) assert list(sig.parameters.keys()) == ['self', 'x', 'model_set_axis'] def test_custom_model_parametrized_decorator(): """Tests using custom_model as a decorator with parameters.""" def cosine(x, amplitude=1): return [amplitude * np.cos(x)] @custom_model(fit_deriv=cosine) def sine(x, amplitude=1): return amplitude * np.sin(x) assert issubclass(sine, Model) s = sine(2) assert_allclose(s(np.pi / 2), 2) assert_allclose(s.fit_deriv(0, 2), 2) def test_custom_inverse(): """Test setting a custom inverse on a model.""" p = models.Polynomial1D(1, c0=-2, c1=3) # A trivial inverse for a trivial polynomial inv = models.Polynomial1D(1, c0=(2./3.), c1=(1./3.)) with pytest.raises(NotImplementedError): p.inverse p.inverse = inv x = np.arange(100) assert_allclose(x, p(p.inverse(x))) assert_allclose(x, p.inverse(p(x))) with catch_warnings(AstropyDeprecationWarning) as w: p.inverse = None # TODO: This can be removed after Astropy v1.1 or so assert len(w) == 1 with pytest.raises(NotImplementedError): p.inverse def test_custom_inverse_reset(): """Test resetting a custom inverse to the model's default inverse.""" class TestModel(Model): inputs = () outputs = ('y',) @property def inverse(self): return models.Shift() @staticmethod def evaluate(): return 0 # The above test model has no meaning, nor does its inverse--this just # tests that setting an inverse and resetting to the default inverse works m = TestModel() assert isinstance(m.inverse, models.Shift) m.inverse = models.Scale() assert isinstance(m.inverse, models.Scale) del m.inverse assert isinstance(m.inverse, models.Shift) def test_render_model_2d(): imshape = (71, 141) image = np.zeros(imshape) coords = y, x = np.indices(imshape) model = models.Gaussian2D(x_stddev=6.1, y_stddev=3.9, theta=np.pi / 3) # test points for edges ye, xe = [0, 35, 70], [0, 70, 140] # test points for floating point positions yf, xf = [35.1, 35.5, 35.9], [70.1, 70.5, 70.9] test_pts = [(a, b) for a in xe for b in ye] test_pts += [(a, b) for a in xf for b in yf] for x0, y0 in test_pts: model.x_mean = x0 model.y_mean = y0 expected = model(x, y) for xy in [coords, None]: for im in [image.copy(), None]: if (im is None) & (xy is None): # this case is tested in Fittable2DModelTester continue actual = model.render(out=im, coords=xy) if im is None: assert_allclose(actual, model.render(coords=xy)) # assert images match assert_allclose(expected, actual, atol=3e-7) # assert model fully captured if (x0, y0) == (70, 35): boxed = model.render() flux = np.sum(expected) assert ((flux - np.sum(boxed)) / flux) < 1e-7 # test an error is raised when the bounding box is larger than the input array try: actual = model.render(out=np.zeros((1, 1))) except ValueError: pass def test_render_model_1d(): npix = 101 image = np.zeros(npix) coords = np.arange(npix) model = models.Gaussian1D() # test points test_pts = [0, 49.1, 49.5, 49.9, 100] # test widths test_stdv = np.arange(5.5, 6.7, .2) for x0, stdv in [(p, s) for p in test_pts for s in test_stdv]: model.mean = x0 model.stddev = stdv expected = model(coords) for x in [coords, None]: for im in [image.copy(), None]: if (im is None) & (x is None): # this case is tested in Fittable1DModelTester continue actual = model.render(out=im, coords=x) # assert images match assert_allclose(expected, actual, atol=3e-7) # assert model fully captured if (x0, stdv) == (49.5, 5.5): boxed = model.render() flux = np.sum(expected) assert ((flux - np.sum(boxed)) / flux) < 1e-7 def test_render_model_3d(): imshape = (17, 21, 27) image = np.zeros(imshape) coords = np.indices(imshape) def ellipsoid(x, y, z, x0=13., y0=10., z0=8., a=4., b=3., c=2., amp=1.): rsq = ((x - x0) / a) ** 2 + ((y - y0) / b) ** 2 + ((z - z0) / c) ** 2 val = (rsq < 1) * amp return val class Ellipsoid3D(custom_model(ellipsoid)): @property def bounding_box(self): return ((self.z0 - self.c, self.z0 + self.c), (self.y0 - self.b, self.y0 + self.b), (self.x0 - self.a, self.x0 + self.a)) model = Ellipsoid3D() # test points for edges ze, ye, xe = [0, 8, 16], [0, 10, 20], [0, 13, 26] # test points for floating point positions zf, yf, xf = [8.1, 8.5, 8.9], [10.1, 10.5, 10.9], [13.1, 13.5, 13.9] test_pts = [(x, y, z) for x in xe for y in ye for z in ze] test_pts += [(x, y, z) for x in xf for y in yf for z in zf] for x0, y0, z0 in test_pts: model.x0 = x0 model.y0 = y0 model.z0 = z0 expected = model(*coords[::-1]) for c in [coords, None]: for im in [image.copy(), None]: if (im is None) & (c is None): continue actual = model.render(out=im, coords=c) boxed = model.render() # assert images match assert_allclose(expected, actual) # assert model fully captured if (z0, y0, x0) == (8, 10, 13): boxed = model.render() assert (np.sum(expected) - np.sum(boxed)) == 0 astropy-1.1.1/astropy/modeling/tests/test_parameters.py0000644001134200020070000005033612644017723024351 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests models.parameters """ from __future__ import (absolute_import, division, print_function, unicode_literals) import itertools import numpy as np from numpy.testing import utils from . import irafutil from .. import models, fitting from ..core import Model, FittableModel, ModelDefinitionError from ..parameters import Parameter, InputParameterError from ...utils.data import get_pkg_data_filename from ...tests.helper import pytest class TParModel(Model): """ A toy model to test parameters machinery """ coeff = Parameter() e = Parameter() def __init__(self, coeff, e, **kwargs): super(TParModel, self).__init__(coeff=coeff, e=e, **kwargs) @staticmethod def evaluate(coeff, e): pass class MockModel(FittableModel): alpha = Parameter(name='alpha', default=42) @staticmethod def evaluate(*args): pass def test_parameter_properties(): """Test if getting / setting of Parameter properties works.""" m = MockModel() p = m.alpha assert p.name == 'alpha' # Parameter names are immutable with pytest.raises(AttributeError): p.name = 'beta' assert p.fixed == False p.fixed = True assert p.fixed == True assert p.tied == False p.tied = lambda _: 0 p.tied = False assert p.tied == False assert p.min == None p.min = 42 assert p.min == 42 p.min = None assert p.min == None assert p.max == None # TODO: shouldn't setting a max < min give an error? p.max = 41 assert p.max == 41 def test_parameter_operators(): """Test if the parameter arithmetic operators work.""" m = MockModel() par = m.alpha num = 42. val = 3 assert par - val == num - val assert val - par == val - num assert par / val == num / val assert val / par == val / num assert par ** val == num ** val assert val ** par == val ** num assert par < 45 assert par > 41 assert par <= par assert par >= par assert par == par assert -par == -num assert abs(par) == abs(num) class TestParameters(object): def setup_class(self): """ Unit tests for parameters Read an iraf database file created by onedspec.identify. Use the information to create a 1D Chebyshev model and perform the same fit. Create also a gausian model. """ test_file = get_pkg_data_filename('data/idcompspec.fits') f = open(test_file) lines = f.read() reclist = lines.split("begin") f.close() record = irafutil.IdentifyRecord(reclist[1]) self.icoeff = record.coeff order = int(record.fields['order']) self.model = models.Chebyshev1D(order - 1) self.gmodel = models.Gaussian1D(2, mean=3, stddev=4) self.linear_fitter = fitting.LinearLSQFitter() self.x = record.x self.y = record.z self.yy = np.array([record.z, record.z]) def test_set_slice(self): """ Tests updating the parameters attribute with a slice. This is what fitters internally do. """ self.model.parameters[:] = np.array([3, 4, 5, 6, 7]) assert (self.model.parameters == [3., 4., 5., 6., 7.]).all() def test_set_parameters_as_list(self): """Tests updating parameters using a list.""" self.model.parameters = [30, 40, 50, 60, 70] assert (self.model.parameters == [30., 40., 50., 60, 70]).all() def test_set_parameters_as_array(self): """Tests updating parameters using an array.""" self.model.parameters = np.array([3, 4, 5, 6, 7]) assert (self.model.parameters == [3., 4., 5., 6., 7.]).all() def test_set_as_tuple(self): """Tests updating parameters using a tuple.""" self.model.parameters = (1, 2, 3, 4, 5) assert (self.model.parameters == [1, 2, 3, 4, 5]).all() def test_set_model_attr_seq(self): """ Tests updating the parameters attribute when a model's parameter (in this case coeff) is updated. """ self.model.parameters = [0, 0., 0., 0, 0] self.model.c0 = 7 assert (self.model.parameters == [7, 0., 0., 0, 0]).all() def test_set_model_attr_num(self): """Update the parameter list when a model's parameter is updated.""" self.gmodel.amplitude = 7 assert (self.gmodel.parameters == [7, 3, 4]).all() def test_set_item(self): """Update the parameters using indexing.""" self.model.parameters = [1, 2, 3, 4, 5] self.model.parameters[0] = 10. assert (self.model.parameters == [10, 2, 3, 4, 5]).all() assert self.model.c0 == 10 def test_wrong_size1(self): """ Tests raising an error when attempting to reset the parameters using a list of a different size. """ with pytest.raises(InputParameterError): self.model.parameters = [1, 2, 3] def test_wrong_size2(self): """ Tests raising an exception when attempting to update a model's parameter (in this case coeff) with a sequence of the wrong size. """ with pytest.raises(InputParameterError): self.model.c0 = [1, 2, 3] def test_wrong_shape(self): """ Tests raising an exception when attempting to update a model's parameter and the new value has the wrong shape. """ with pytest.raises(InputParameterError): self.gmodel.amplitude = [1, 2] def test_par_against_iraf(self): """ Test the fitter modifies model.parameters. Uses an iraf example. """ new_model = self.linear_fitter(self.model, self.x, self.y) print(self.y, self.x) utils.assert_allclose(new_model.parameters, np.array( [4826.1066602783685, 952.8943813407858, 12.641236013982386, -1.7910672553339604, 0.90252884366711317]), rtol=10 ** (-2)) def testPolynomial1D(self): d = {'c0': 11, 'c1': 12, 'c2': 13, 'c3': 14} p1 = models.Polynomial1D(3, **d) utils.assert_equal(p1.parameters, [11, 12, 13, 14]) def test_poly1d_multiple_sets(self): p1 = models.Polynomial1D(3, n_models=3) utils.assert_equal(p1.parameters, [0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) utils.assert_array_equal(p1.c0, [0, 0, 0]) p1.c0 = [10, 10, 10] utils.assert_equal(p1.parameters, [10.0, 10.0, 10.0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) def test_par_slicing(self): """ Test assigning to a parameter slice """ p1 = models.Polynomial1D(3, n_models=3) p1.c0[:2] = [10, 10] utils.assert_equal(p1.parameters, [10.0, 10.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) def test_poly2d(self): p2 = models.Polynomial2D(degree=3) p2.c0_0 = 5 utils.assert_equal(p2.parameters, [5, 0, 0, 0, 0, 0, 0, 0, 0, 0]) def test_poly2d_multiple_sets(self): kw = {'c0_0': [2, 3], 'c1_0': [1, 2], 'c2_0': [4, 5], 'c0_1': [1, 1], 'c0_2': [2, 2], 'c1_1': [5, 5]} p2 = models.Polynomial2D(2, **kw) utils.assert_equal(p2.parameters, [2, 3, 1, 2, 4, 5, 1, 1, 2, 2, 5, 5]) def test_shift_model_parameters1d(self): sh1 = models.Shift(2) sh1.offset = 3 assert sh1.offset == 3 assert sh1.offset.value == 3 def test_scale_model_parametersnd(self): sc1 = models.Scale([2, 2]) sc1.factor = [3, 3] assert np.all(sc1.factor == [3, 3]) utils.assert_array_equal(sc1.factor.value, [3, 3]) def test_parameters_wrong_shape(self): sh1 = models.Shift(2) with pytest.raises(InputParameterError): sh1.offset = [3, 3] class TestMultipleParameterSets(object): def setup_class(self): self.x1 = np.arange(1, 10, .1) self.y, self.x = np.mgrid[:10, :7] self.x11 = np.array([self.x1, self.x1]).T self.gmodel = models.Gaussian1D([12, 10], [3.5, 5.2], stddev=[.4, .7], n_models=2) def test_change_par(self): """ Test that a change to one parameter as a set propagates to param_sets. """ self.gmodel.amplitude = [1, 10] utils.assert_almost_equal( self.gmodel.param_sets, np.array([[1., 10], [3.5, 5.2], [0.4, 0.7]])) np.all(self.gmodel.parameters == [1.0, 10.0, 3.5, 5.2, 0.4, 0.7]) def test_change_par2(self): """ Test that a change to one single parameter in a set propagates to param_sets. """ self.gmodel.amplitude[0] = 11 utils.assert_almost_equal( self.gmodel.param_sets, np.array([[11., 10], [3.5, 5.2], [0.4, 0.7]])) np.all(self.gmodel.parameters == [11.0, 10.0, 3.5, 5.2, 0.4, 0.7]) def test_change_parameters(self): self.gmodel.parameters = [13, 10, 9, 5.2, 0.4, 0.7] utils.assert_almost_equal(self.gmodel.amplitude.value, [13., 10.]) utils.assert_almost_equal(self.gmodel.mean.value, [9., 5.2]) class TestParameterInitialization(object): """ This suite of tests checks most if not all cases if instantiating a model with parameters of different shapes/sizes and with different numbers of parameter sets. """ def test_single_model_scalar_parameters(self): t = TParModel(10, 1) assert len(t) == 1 assert t.model_set_axis is False assert np.all(t.param_sets == [[10], [1]]) assert np.all(t.parameters == [10, 1]) assert t.coeff.shape == () assert t.e.shape == () def test_single_model_scalar_and_array_parameters(self): t = TParModel(10, [1, 2]) assert len(t) == 1 assert t.model_set_axis is False assert np.issubdtype(t.param_sets.dtype, object) assert len(t.param_sets) == 2 assert np.all(t.param_sets[0] == [10]) assert np.all(t.param_sets[1] == [[1, 2]]) assert np.all(t.parameters == [10, 1, 2]) assert t.coeff.shape == () assert t.e.shape == (2,) def test_single_model_1d_array_parameters(self): t = TParModel([10, 20], [1, 2]) assert len(t) == 1 assert t.model_set_axis is False assert np.all(t.param_sets == [[[10, 20]], [[1, 2]]]) assert np.all(t.parameters == [10, 20, 1, 2]) assert t.coeff.shape == (2,) assert t.e.shape == (2,) def test_single_model_1d_array_different_length_parameters(self): with pytest.raises(InputParameterError): # Not broadcastable t = TParModel([1, 2], [3, 4, 5]) def test_single_model_2d_array_parameters(self): t = TParModel([[10, 20], [30, 40]], [[1, 2], [3, 4]]) assert len(t) == 1 assert t.model_set_axis is False assert np.all(t.param_sets == [[[[10, 20], [30, 40]]], [[[1, 2], [3, 4]]]]) assert np.all(t.parameters == [10, 20, 30, 40, 1, 2, 3, 4]) assert t.coeff.shape == (2, 2) assert t.e.shape == (2, 2) def test_single_model_2d_non_square_parameters(self): coeff = np.array([[10, 20], [30, 40], [50, 60]]) e = np.array([[1, 2], [3, 4], [5, 6]]) t = TParModel(coeff, e) assert len(t) == 1 assert t.model_set_axis is False assert np.all(t.param_sets == [[[[10, 20], [30, 40], [50, 60]]], [[[1, 2], [3, 4], [5, 6]]]]) assert np.all(t.parameters == [10, 20, 30, 40, 50, 60, 1, 2, 3, 4, 5, 6]) assert t.coeff.shape == (3, 2) assert t.e.shape == (3, 2) t2 = TParModel(coeff.T, e.T) assert len(t2) == 1 assert t2.model_set_axis is False assert np.all(t2.param_sets == [[[[10, 30, 50], [20, 40, 60]]], [[[1, 3, 5], [2, 4, 6]]]]) assert np.all(t2.parameters == [10, 30, 50, 20, 40, 60, 1, 3, 5, 2, 4, 6]) assert t2.coeff.shape == (2, 3) assert t2.e.shape == (2, 3) # Not broadcastable with pytest.raises(InputParameterError): TParModel(coeff, e.T) with pytest.raises(InputParameterError): TParModel(coeff.T, e) def test_single_model_2d_broadcastable_parameters(self): t = TParModel([[10, 20, 30], [40, 50, 60]], [1, 2, 3]) assert len(t) == 1 assert t.model_set_axis is False assert len(t.param_sets) == 2 assert np.issubdtype(t.param_sets.dtype, object) assert np.all(t.param_sets[0] == [[[10, 20, 30], [40, 50, 60]]]) assert np.all(t.param_sets[1] == [[1, 2, 3]]) assert np.all(t.parameters == [10, 20, 30, 40, 50, 60, 1, 2, 3]) @pytest.mark.parametrize(('p1', 'p2'), [ (1, 2), (1, [2, 3]), ([1, 2], 3), ([1, 2, 3], [4, 5]), ([1, 2], [3, 4, 5])]) def test_two_model_incorrect_scalar_parameters(self, p1, p2): with pytest.raises(InputParameterError): TParModel(p1, p2, n_models=2) @pytest.mark.parametrize('kwargs', [ {'n_models': 2}, {'model_set_axis': 0}, {'n_models': 2, 'model_set_axis': 0}]) def test_two_model_scalar_parameters(self, kwargs): t = TParModel([10, 20], [1, 2], **kwargs) assert len(t) == 2 assert t.model_set_axis == 0 assert np.all(t.param_sets == [[10, 20], [1, 2]]) assert np.all(t.parameters == [10, 20, 1, 2]) assert t.coeff.shape == () assert t.e.shape == () @pytest.mark.parametrize('kwargs', [ {'n_models': 2}, {'model_set_axis': 0}, {'n_models': 2, 'model_set_axis': 0}]) def test_two_model_scalar_and_array_parameters(self, kwargs): t = TParModel([10, 20], [[1, 2], [3, 4]], **kwargs) assert len(t) == 2 assert t.model_set_axis == 0 assert len(t.param_sets) == 2 assert np.issubdtype(t.param_sets.dtype, object) assert np.all(t.param_sets[0] == [[10], [20]]) assert np.all(t.param_sets[1] == [[1, 2], [3, 4]]) assert np.all(t.parameters == [10, 20, 1, 2, 3, 4]) assert t.coeff.shape == () assert t.e.shape == (2,) def test_two_model_1d_array_parameters(self): t = TParModel([[10, 20], [30, 40]], [[1, 2], [3, 4]], n_models=2) assert len(t) == 2 assert t.model_set_axis == 0 assert np.all(t.param_sets == [[[10, 20], [30, 40]], [[1, 2], [3, 4]]]) assert np.all(t.parameters == [10, 20, 30, 40, 1, 2, 3, 4]) assert t.coeff.shape == (2,) assert t.e.shape == (2,) t2 = TParModel([[10, 20, 30], [40, 50, 60]], [[1, 2, 3], [4, 5, 6]], n_models=2) assert len(t2) == 2 assert t2.model_set_axis == 0 assert np.all(t2.param_sets == [[[10, 20, 30], [40, 50, 60]], [[1, 2, 3], [4, 5, 6]]]) assert np.all(t2.parameters == [10, 20, 30, 40, 50, 60, 1, 2, 3, 4, 5, 6]) assert t2.coeff.shape == (3,) assert t2.e.shape == (3,) def test_two_model_mixed_dimension_array_parameters(self): with pytest.raises(InputParameterError): # Can't broadcast different array shapes TParModel([[[1, 2], [3, 4]], [[5, 6], [7, 8]]], [[9, 10, 11], [12, 13, 14]], n_models=2) t = TParModel([[[10, 20], [30, 40]], [[50, 60], [70, 80]]], [[1, 2], [3, 4]], n_models=2) assert len(t) == 2 assert t.model_set_axis == 0 assert len(t.param_sets) == 2 assert np.issubdtype(t.param_sets.dtype, object) assert np.all(t.param_sets[0] == [[[10, 20], [30, 40]], [[50, 60], [70, 80]]]) assert np.all(t.param_sets[1] == [[[1, 2]], [[3, 4]]]) assert np.all(t.parameters == [10, 20, 30, 40, 50, 60, 70, 80, 1, 2, 3, 4]) assert t.coeff.shape == (2, 2) assert t.e.shape == (2,) def test_two_model_2d_array_parameters(self): t = TParModel([[[10, 20], [30, 40]], [[50, 60], [70, 80]]], [[[1, 2], [3, 4]], [[5, 6], [7, 8]]], n_models=2) assert len(t) == 2 assert t.model_set_axis == 0 assert np.all(t.param_sets == [[[[10, 20], [30, 40]], [[50, 60], [70, 80]]], [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]]) assert np.all(t.parameters == [10, 20, 30, 40, 50, 60, 70, 80, 1, 2, 3, 4, 5, 6, 7, 8]) assert t.coeff.shape == (2, 2) assert t.e.shape == (2, 2) def test_two_model_nonzero_model_set_axis(self): # An example where the model set axis is the *last* axis of the # parameter arrays coeff = np.array([[[10, 20], [30, 40]], [[50, 60], [70, 80]]]) coeff = np.rollaxis(coeff, 0, 3) e = np.array([[1, 2], [3, 4]]) e = np.rollaxis(e, 0, 2) t = TParModel(coeff, e, model_set_axis=-1) assert len(t) == 2 assert t.model_set_axis == -1 assert len(t.param_sets) == 2 assert np.issubdtype(t.param_sets.dtype, object) assert np.all(t.param_sets[0] == [[[10, 50], [20, 60]], [[30, 70], [40, 80]]]) assert np.all(t.param_sets[1] == [[[1, 3], [2, 4]]]) assert np.all(t.parameters == [10, 50, 20, 60, 30, 70, 40, 80, 1, 3, 2, 4]) assert t.coeff.shape == (2, 2) assert t.e.shape == (2,) def test_wrong_number_of_params(self): with pytest.raises(InputParameterError): TParModel(coeff=[[1, 2], [3, 4]], e=(2, 3, 4), n_models=2) with pytest.raises(InputParameterError): TParModel(coeff=[[1, 2], [3, 4]], e=(2, 3, 4), model_set_axis=0) def test_wrong_number_of_params2(self): with pytest.raises(InputParameterError): m = TParModel(coeff=[[1, 2], [3, 4]], e=4, n_models=2) with pytest.raises(InputParameterError): m = TParModel(coeff=[[1, 2], [3, 4]], e=4, model_set_axis=0) def test_array_parameter1(self): with pytest.raises(InputParameterError): t = TParModel(np.array([[1, 2], [3, 4]]), 1, model_set_axis=0) def test_array_parameter2(self): with pytest.raises(InputParameterError): m = TParModel(np.array([[1, 2], [3, 4]]), (1, 1, 11), model_set_axis=0) def test_array_parameter4(self): """ Test multiple parameter model with array-valued parameters of the same size as the number of parameter sets. """ t4 = TParModel([[1, 2], [3, 4]], [5, 6], model_set_axis=False) assert len(t4) == 1 assert t4.coeff.shape == (2, 2) assert t4.e.shape == (2,) assert np.issubdtype(t4.param_sets.dtype, object) assert np.all(t4.param_sets[0] == [[1, 2], [3, 4]]) assert np.all(t4.param_sets[1] == [5, 6]) def test_non_broadcasting_parameters(): """ Tests that in a model with 3 parameters that do not all mutually broadcast, this is determined correctly regardless of what order the parameters are in. """ a = 3 b = np.array([[1, 2, 3], [4, 5, 6]]) c = np.array([[1, 2, 3, 4], [1, 2, 3, 4]]) class TestModel(Model): p1 = Parameter() p2 = Parameter() p3 = Parameter() def evaluate(self, *args): return # a broadcasts with both b and c, but b does not broadcast with c for args in itertools.permutations((a, b, c)): with pytest.raises(InputParameterError): TestModel(*args) astropy-1.1.1/astropy/modeling/tests/test_fitters.py0000644001134200020070000003151512640262015023654 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Module to test fitting routines """ from __future__ import (absolute_import, unicode_literals, division, print_function) import os.path import numpy as np from numpy import linalg from numpy.testing.utils import assert_allclose, assert_almost_equal from . import irafutil from .. import models from ..core import Fittable2DModel, Parameter from ..fitting import * from ...utils import NumpyRNGContext from ...utils.data import get_pkg_data_filename from ...tests.helper import pytest from .utils import ignore_non_integer_warning try: from scipy import optimize HAS_SCIPY = True except ImportError: HAS_SCIPY = False fitters = [SimplexLSQFitter, SLSQPLSQFitter] _RANDOM_SEED = 0x1337 class TestPolynomial2D(object): """Tests for 2D polynomail fitting.""" def setup_class(self): self.model = models.Polynomial2D(2) self.y, self.x = np.mgrid[:5, :5] def poly2(x, y): return 1 + 2 * x + 3 * x ** 2 + 4 * y + 5 * y ** 2 + 6 * x * y self.z = poly2(self.x, self.y) self.fitter = LinearLSQFitter() def test_poly2D_fitting(self): v = self.model.fit_deriv(x=self.x, y=self.y) p = linalg.lstsq(v, self.z.flatten())[0] new_model = self.fitter(self.model, self.x, self.y, self.z) assert_allclose(new_model.parameters, p) def test_eval(self): new_model = self.fitter(self.model, self.x, self.y, self.z) assert_allclose(new_model(self.x, self.y), self.z) @pytest.mark.skipif('not HAS_SCIPY') def test_polynomial2D_nonlinear_fitting(self): self.model.parameters = [.6, 1.8, 2.9, 3.7, 4.9, 6.7] nlfitter = LevMarLSQFitter() new_model = nlfitter(self.model, self.x, self.y, self.z) assert_allclose(new_model.parameters, [1, 2, 3, 4, 5, 6]) class TestICheb2D(object): """ Tests 2D Chebyshev polynomial fitting Create a 2D polynomial (z) using Polynomial2DModel and default coefficients Fit z using a ICheb2D model Evaluate the ICheb2D polynomial and compare with the initial z """ def setup_class(self): self.pmodel = models.Polynomial2D(2) self.y, self.x = np.mgrid[:5, :5] self.z = self.pmodel(self.x, self.y) self.cheb2 = models.Chebyshev2D(2, 2) self.fitter = LinearLSQFitter() def test_default_params(self): self.cheb2.parameters = np.arange(9) p = np.array([1344., 1772., 400., 1860., 2448., 552., 432., 568., 128.]) z = self.cheb2(self.x, self.y) model = self.fitter(self.cheb2, self.x, self.y, z) assert_almost_equal(model.parameters, p) def test_poly2D_cheb2D(self): model = self.fitter(self.cheb2, self.x, self.y, self.z) z1 = model(self.x, self.y) assert_almost_equal(self.z, z1) @pytest.mark.skipif('not HAS_SCIPY') def test_chebyshev2D_nonlinear_fitting(self): cheb2d = models.Chebyshev2D(2, 2) cheb2d.parameters = np.arange(9) z = cheb2d(self.x, self.y) cheb2d.parameters = [0.1, .6, 1.8, 2.9, 3.7, 4.9, 6.7, 7.5, 8.9] nlfitter = LevMarLSQFitter() model = nlfitter(cheb2d, self.x, self.y, z) assert_allclose(model.parameters, [0, 1, 2, 3, 4, 5, 6, 7, 8], atol=10**-9) @pytest.mark.skipif('not HAS_SCIPY') class TestJointFitter(object): """ Tests the joint fitting routine using 2 gaussian models """ def setup_class(self): """ Create 2 gaussian models and some data with noise. Create a fitter for the two models keeping the amplitude parameter common for the two models. """ self.g1 = models.Gaussian1D(10, mean=14.9, stddev=.3) self.g2 = models.Gaussian1D(10, mean=13, stddev=.4) self.jf = JointFitter([self.g1, self.g2], {self.g1: ['amplitude'], self.g2: ['amplitude']}, [9.8]) self.x = np.arange(10, 20, .1) y1 = self.g1(self.x) y2 = self.g2(self.x) with NumpyRNGContext(_RANDOM_SEED): n = np.random.randn(100) self.ny1 = y1 + 2 * n self.ny2 = y2 + 2 * n self.jf(self.x, self.ny1, self.x, self.ny2) def test_joint_parameter(self): """ Tests that the amplitude of the two models is the same """ assert_allclose(self.jf.fitparams[0], self.g1.parameters[0]) assert_allclose(self.jf.fitparams[0], self.g2.parameters[0]) def test_joint_fitter(self): """ Tests the fitting routine with similar procedure. Compares the fitted parameters. """ p1 = [14.9, .3] p2 = [13, .4] A = 9.8 p = np.r_[A, p1, p2] def model(A, p, x): return A * np.exp(-0.5 / p[1] ** 2 * (x - p[0]) ** 2) def errfunc(p, x1, y1, x2, y2): return np.ravel(np.r_[model(p[0], p[1:3], x1) - y1, model(p[0], p[3:], x2) - y2]) coeff, _ = optimize.leastsq(errfunc, p, args=(self.x, self.ny1, self.x, self.ny2)) assert_allclose(coeff, self.jf.fitparams, rtol=10 ** (-2)) class TestLinearLSQFitter(object): def test_chebyshev1D(self): """Tests fitting a 1D Chebyshev polynomial to some real world data.""" test_file = get_pkg_data_filename(os.path.join('data', 'idcompspec.fits')) with open(test_file) as f: lines = f.read() reclist = lines.split('begin') record = irafutil.IdentifyRecord(reclist[1]) coeffs = record.coeff order = int(record.fields['order']) initial_model = models.Chebyshev1D(order - 1, domain=record.get_range()) fitter = LinearLSQFitter() fitted_model = fitter(initial_model, record.x, record.z) assert_allclose(fitted_model.parameters, np.array(coeffs), rtol=10e-2) def test_linear_fit_model_set(self): """Tests fitting multiple models simultaneously.""" init_model = models.Polynomial1D(degree=2, c0=[1, 1], n_models=2) x = np.arange(10) y_expected = init_model(x, model_set_axis=False) assert y_expected.shape == (2, 10) # Add a bit of random noise with NumpyRNGContext(_RANDOM_SEED): y = y_expected + np.random.normal(0, 0.01, size=y_expected.shape) fitter = LinearLSQFitter() fitted_model = fitter(init_model, x, y) assert_allclose(fitted_model(x, model_set_axis=False), y_expected, rtol=1e-1) def test_linear_fit_2d_model_set(self): """Tests fitted multiple 2-D models simultaneously.""" init_model = models.Polynomial2D(degree=2, c0_0=[1, 1], n_models=2) x = np.arange(10) y = np.arange(10) z_expected = init_model(x, y, model_set_axis=False) assert z_expected.shape == (2, 10) # Add a bit of random noise with NumpyRNGContext(_RANDOM_SEED): z = z_expected + np.random.normal(0, 0.01, size=z_expected.shape) fitter = LinearLSQFitter() fitted_model = fitter(init_model, x, y, z) assert_allclose(fitted_model(x, y, model_set_axis=False), z_expected, rtol=1e-1) @pytest.mark.skipif('not HAS_SCIPY') class TestNonLinearFitters(object): """Tests non-linear least squares fitting and the SLSQP algorithm.""" def setup_class(self): self.initial_values = [100, 5, 1] self.xdata = np.arange(0, 10, 0.1) sigma = 4. * np.ones_like(self.xdata) with NumpyRNGContext(_RANDOM_SEED): yerror = np.random.normal(0, sigma) def func(p, x): return p[0] * np.exp(-0.5 / p[2] ** 2 * (x - p[1]) ** 2) self.ydata = func(self.initial_values, self.xdata) + yerror self.gauss = models.Gaussian1D(100, 5, stddev=1) def test_estimated_vs_analytic_deriv(self): """ Runs `LevMarLSQFitter` with estimated and analytic derivatives of a `Gaussian1D`. """ fitter = LevMarLSQFitter() model = fitter(self.gauss, self.xdata, self.ydata) g1e = models.Gaussian1D(100, 5.0, stddev=1) efitter = LevMarLSQFitter() emodel = efitter(g1e, self.xdata, self.ydata, estimate_jacobian=True) assert_allclose(model.parameters, emodel.parameters, rtol=10 ** (-3)) def test_with_optimize(self): """ Tests results from `LevMarLSQFitter` against `scipy.optimize.leastsq`. """ fitter = LevMarLSQFitter() model = fitter(self.gauss, self.xdata, self.ydata, estimate_jacobian=True) def func(p, x): return p[0] * np.exp(-0.5 / p[2] ** 2 * (x - p[1]) ** 2) def errfunc(p, x, y): return func(p, x) - y result = optimize.leastsq(errfunc, self.initial_values, args=(self.xdata, self.ydata)) assert_allclose(model.parameters, result[0], rtol=10 ** (-3)) def test_with_weights(self): """ Tests results from `LevMarLSQFitter` with weights. """ # part 1: weights are equal to 1 fitter = LevMarLSQFitter() model = fitter(self.gauss, self.xdata, self.ydata, estimate_jacobian=True) withw = fitter(self.gauss, self.xdata, self.ydata, estimate_jacobian=True, weights=np.ones_like(self.xdata)) assert_allclose(model.parameters, withw.parameters, rtol=10 ** (-4)) # part 2: weights are 0 or 1 (effectively, they are a mask) weights = np.zeros_like(self.xdata) weights[::2] = 1. mask = weights >= 1. model = fitter(self.gauss, self.xdata[mask], self.ydata[mask], estimate_jacobian=True) withw = fitter(self.gauss, self.xdata, self.ydata, estimate_jacobian=True, weights=weights) assert_allclose(model.parameters, withw.parameters, rtol=10 ** (-4)) @pytest.mark.parametrize('fitter_class', fitters) def test_fitter_against_LevMar(self, fitter_class): """Tests results from non-linear fitters against `LevMarLSQFitter`.""" levmar = LevMarLSQFitter() fitter = fitter_class() with ignore_non_integer_warning(): new_model = fitter(self.gauss, self.xdata, self.ydata) model = levmar(self.gauss, self.xdata, self.ydata) assert_allclose(model.parameters, new_model.parameters, rtol=10 ** (-4)) def test_LSQ_SLSQP_with_constraints(self): """ Runs `LevMarLSQFitter` and `SLSQPLSQFitter` on a model with constraints. """ g1 = models.Gaussian1D(100, 5, stddev=1) g1.mean.fixed = True fitter = LevMarLSQFitter() fslsqp = SLSQPLSQFitter() with ignore_non_integer_warning(): slsqp_model = fslsqp(g1, self.xdata, self.ydata) model = fitter(g1, self.xdata, self.ydata) assert_allclose(model.parameters, slsqp_model.parameters, rtol=10 ** (-4)) def test_simplex_lsq_fitter(self): """A basic test for the `SimplexLSQ` fitter.""" class Rosenbrock(Fittable2DModel): a = Parameter() b = Parameter() @staticmethod def evaluate(x, y, a, b): return (a - x) ** 2 + b * (y - x ** 2) ** 2 x = y = np.linspace(-3.0, 3.0, 100) with NumpyRNGContext(_RANDOM_SEED): z = Rosenbrock.evaluate(x, y, 1.0, 100.0) z += np.random.normal(0., 0.1, size=z.shape) fitter = SimplexLSQFitter() r_i = Rosenbrock(1, 100) r_f = fitter(r_i, x, y, z) assert_allclose(r_f.parameters, [1.0, 100.0], rtol=1e-2) def test_param_cov(self): """ Tests that the 'param_cov' fit_info entry gets the right answer for *linear* least squares, where the answer is exact """ a = 2 b = 100 with NumpyRNGContext(_RANDOM_SEED): x = np.linspace(0, 1, 100) # y scatter is amplitude ~1 to make sure covarience is # non-negligible y = x*a + b + np.random.randn(len(x)) #first compute the ordinary least squares covariance matrix X = np.matrix(np.vstack([x, np.ones(len(x))]).T) beta = np.linalg.inv(X.T * X) * X.T * np.matrix(y).T s2 = np.sum((y - (X * beta).A.ravel())**2) / (len(y) - len(beta)) olscov = np.linalg.inv(X.T * X) * s2 #now do the non-linear least squares fit mod = models.Linear1D(a, b) fitter = LevMarLSQFitter() fmod = fitter(mod, x, y) assert_allclose(fmod.parameters, beta.A.ravel()) assert_allclose(olscov, fitter.fit_info['param_cov']) astropy-1.1.1/astropy/modeling/tests/test_compound.py0000644001134200020070000007000212640262015024012 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, unicode_literals, division, print_function) import inspect import numpy as np from numpy.testing.utils import (assert_allclose, assert_array_equal, assert_almost_equal) from ...extern.six.moves import cPickle as pickle from ...tests.helper import pytest from ..core import Model, ModelDefinitionError from ..parameters import Parameter from ..models import (Const1D, Shift, Scale, Rotation2D, Gaussian1D, Gaussian2D, Polynomial1D, Polynomial2D, Chebyshev2D, Legendre2D, Chebyshev1D, Legendre1D, AffineTransformation2D, Identity, Mapping) @pytest.mark.parametrize(('expr', 'result'), [(lambda x, y: x + y, 5.0), (lambda x, y: x - y, -1.0), (lambda x, y: x * y, 6.0), (lambda x, y: x / y, 2.0 / 3.0), (lambda x, y: x ** y, 8.0)]) def test_two_model_class_arithmetic_1d(expr, result): # Const1D is perhaps the simplest model to test basic arithmetic with. # TODO: Should define more tests later on for more complicated # combinations of models S = expr(Const1D, Const1D) assert issubclass(S, Model) assert S.n_inputs == 1 assert S.n_outputs == 1 # Initialize an instance of the model, providing values for the two # "amplitude" parameters s = S(2, 3) # It shouldn't matter what input we evaluate on since this is a constant # function out = s(0) assert out == result assert isinstance(out, float) @pytest.mark.parametrize(('expr', 'result'), [(lambda x, y: x + y, 5.0), (lambda x, y: x - y, -1.0), (lambda x, y: x * y, 6.0), (lambda x, y: x / y, 2.0 / 3.0), (lambda x, y: x ** y, 8.0)]) def test_two_model_instance_arithmetic_1d(expr, result): """ Like test_two_model_class_arithmetic_1d, but creates a new model from two model *instances* with fixed parameters. """ s = expr(Const1D(2), Const1D(3)) assert isinstance(s, Model) assert s.n_inputs == 1 assert s.n_outputs == 1 out = s(0) assert out == result assert isinstance(out, float) @pytest.mark.parametrize(('expr', 'result'), [(lambda x, y: x + y, 5.0), (lambda x, y: x - y, -1.0), (lambda x, y: x * y, 6.0), (lambda x, y: x / y, 2.0 / 3.0), (lambda x, y: x ** y, 8.0)]) def test_two_model_mixed_arithmetic_1d(expr, result): """ Like test_two_model_class_arithmetic_1d, but creates a new model from an expression of one model class with one model instance (and vice-versa). """ S1 = expr(Const1D, Const1D(3)) S2 = expr(Const1D(2), Const1D) for cls in (S1, S2): assert issubclass(cls, Model) assert cls.n_inputs == 1 assert cls.n_outputs == 1 # Requires values for both amplitudes even though one of them them has a # default # TODO: We may wish to fix that eventually, so that if a parameter has a # default it doesn't *have* to be given in the init s1 = S1(2, 3) s2 = S2(2, 3) for out in (s1(0), s2(0)): assert out == result assert isinstance(out, float) def test_simple_two_model_class_compose_1d(): """ Shift and Scale are two of the simplest models to test model composition with. """ S1 = Shift | Scale # First shift then scale assert issubclass(S1, Model) assert S1.n_inputs == 1 assert S1.n_outputs == 1 s1 = S1(2, 3) # Shift by 2 and scale by 3 assert s1(1) == 9.0 S2 = Scale | Shift # First scale then shift assert issubclass(S2, Model) assert S2.n_inputs == 1 assert S2.n_outputs == 1 s2 = S2(2, 3) # Scale by 2 then shift by 3 assert s2(1) == 5.0 # Test with array inputs assert_array_equal(s2([1, 2, 3]), [5.0, 7.0, 9.0]) def test_simple_two_model_class_compose_2d(): """ A simple example consisting of two rotations. """ R = Rotation2D | Rotation2D assert issubclass(R, Model) assert R.n_inputs == 2 assert R.n_outputs == 2 r1 = R(45, 45) # Rotate twice by 45 degrees assert_allclose(r1(0, 1), (-1, 0), atol=1e-10) r2 = R(90, 90) # Rotate twice by 90 degrees assert_allclose(r2(0, 1), (0, -1), atol=1e-10) # Compose R with itself to produce 4 rotations R2 = R | R r3 = R2(45, 45, 45, 45) assert_allclose(r3(0, 1), (0, -1), atol=1e-10) class TestCompositeLegacy(object): """ Tests inspired by the original _CompositeModel tests in test_core.py, this implements the equivalent tests implemented in the new framework. Note: These aren't *exactly* the same as the original tests, as they used overly trivial models (polynomials with all coeffs 0). """ def setup_class(self): self.y, self.x = np.mgrid[:5, :5] def test_single_array_input(self): p1 = Polynomial1D(3, c0=1, c1=2, c2=3, c3=4) p2 = Polynomial1D(3, c0=2, c1=3, c2=4, c3=5) m = p1 | p2 assert_almost_equal(p2(p1(self.x)), m(self.x)) def test_labeledinput_1(self): # Note: No actual use of LabeledInput in this test; this just uses the # same name for symmetry with the old tests p1 = Polynomial1D(3, c0=1, c1=2, c2=3, c3=4) p2 = Polynomial2D(3, c0_0=1, c2_0=2, c0_1=3, c2_1=4) m = p2 | p1 assert_almost_equal(p1(p2(self.x, self.y)), m(self.x, self.y)) def test_labledinput_2(self): rot = Rotation2D(angle=23.4) offx = Shift(-2) offy = Shift(1.2) m = rot | (offx & Identity(1)) | (Identity(1) & offy) x, y = rot(self.x, self.y) x = offx(x) y = offy(y) assert_almost_equal(x, m(self.x, self.y)[0]) assert_almost_equal(y, m(self.x, self.y)[1]) a = np.deg2rad(23.4) # For kicks matrix = [[np.cos(a), -np.sin(a)], [np.sin(a), np.cos(a)]] x, y = AffineTransformation2D(matrix, [-2, 1.2])(self.x, self.y) assert_almost_equal(x, m(self.x, self.y)[0]) assert_almost_equal(y, m(self.x, self.y)[1]) def test_multiple_input(self): """ Despite the name, this actually tests inverting composite models, which is not yet supported in the new framework (but should be). """ rot = Rotation2D(-60) m = rot | rot xx, yy = m(self.x, self.y) x0, y0 = m.inverse(xx, yy) assert_almost_equal(x0, self.x) assert_almost_equal(y0, self.y) def test_expression_formatting(): """ Test that the expression strings from compound models are formatted correctly. """ # For the purposes of this test it doesn't matter a great deal what # model(s) are used in the expression, I don't think G = Gaussian1D G2 = Gaussian2D M = G + G assert M._format_expression() == '[0] + [1]' M = G + G + G assert M._format_expression() == '[0] + [1] + [2]' M = G + G * G assert M._format_expression() == '[0] + [1] * [2]' M = G * G + G assert M._format_expression() == '[0] * [1] + [2]' M = G + G * G + G assert M._format_expression() == '[0] + [1] * [2] + [3]' M = (G + G) * (G + G) assert M._format_expression() == '([0] + [1]) * ([2] + [3])' # This example uses parentheses in the expression, but those won't be # preserved in the expression formatting since they technically aren't # necessary, and there's no way to know that they were originally # parenthesized (short of some deep, and probably not worthwhile # introspection) M = (G * G) + (G * G) assert M._format_expression() == '[0] * [1] + [2] * [3]' M = G ** G assert M._format_expression() == '[0] ** [1]' M = G + G ** G assert M._format_expression() == '[0] + [1] ** [2]' M = (G + G) ** G assert M._format_expression() == '([0] + [1]) ** [2]' M = G + G | G assert M._format_expression() == '[0] + [1] | [2]' M = G + (G | G) assert M._format_expression() == '[0] + ([1] | [2])' M = G & G | G2 assert M._format_expression() == '[0] & [1] | [2]' M = G & (G | G) assert M._format_expression() == '[0] & ([1] | [2])' def test_indexing_on_class(): """ Test indexing on compound model class objects, including cases where the submodels are classes, as well as instances, or both. """ g = Gaussian1D(1, 2, 3, name='g') p = Polynomial1D(2, name='p') M = Gaussian1D + Const1D assert M[0] is Gaussian1D assert M[1] is Const1D assert M['Gaussian1D'] is M[0] assert M['Const1D'] is M[1] M = Gaussian1D + p assert M[0] is Gaussian1D assert M[1] is p assert M['Gaussian1D'] is M[0] assert M['p'] is M[1] m = g + p assert isinstance(m[0], Gaussian1D) assert isinstance(m[1], Polynomial1D) assert isinstance(m['g'], Gaussian1D) assert isinstance(m['p'], Polynomial1D) # Test negative indexing assert isinstance(m[-1], Polynomial1D) assert isinstance(m[-2], Gaussian1D) with pytest.raises(IndexError): m[42] with pytest.raises(IndexError): m['foobar'] # TODO: It would be good if there were an easier way to interrogate a compound # model class for what expression it represents. Not sure what that would look # like though. def test_slicing_on_class(): """ Test slicing a simple compound model class using integers. """ A = Const1D.rename('A') B = Const1D.rename('B') C = Const1D.rename('C') D = Const1D.rename('D') E = Const1D.rename('E') F = Const1D.rename('F') M = A + B - C * D / E ** F assert M[0:1] is A # This test will also check that the correct parameter names are generated # for each slice (fairly trivial in this case since all the submodels have # the same parameter, but if any corner cases are found that aren't covered # by this test we can do something different...) assert M[0:1].param_names == ('amplitude',) # This looks goofy but if you slice by name to the sub-model of the same # name it should just return that model, logically. assert M['A':'A'] is A assert M['A':'A'].param_names == ('amplitude',) assert M[5:6] is F assert M[5:6].param_names == ('amplitude',) assert M['F':'F'] is F assert M['F':'F'].param_names == ('amplitude',) # 1 + 2 assert M[:2](1, 2)(0) == 3 assert M[:2].param_names == ('amplitude_0', 'amplitude_1') assert M[:'B'](1, 2)(0) == 3 assert M[:'B'].param_names == ('amplitude_0', 'amplitude_1') # 2 - 3 assert M[1:3](2, 3)(0) == -1 assert M[1:3].param_names == ('amplitude_1', 'amplitude_2') assert M['B':'C'](2, 3)(0) == -1 assert M['B':'C'].param_names == ('amplitude_1', 'amplitude_2') # 3 * 4 assert M[2:4](3, 4)(0) == 12 assert M[2:4].param_names == ('amplitude_2', 'amplitude_3') assert M['C':'D'](3, 4)(0) == 12 assert M['C':'D'].param_names == ('amplitude_2', 'amplitude_3') # 4 / 5 assert M[3:5](4, 5)(0) == 0.8 assert M[3:5].param_names == ('amplitude_3', 'amplitude_4') assert M['D':'E'](4, 5)(0) == 0.8 assert M['D':'E'].param_names == ('amplitude_3', 'amplitude_4') # 5 ** 6 assert M[4:6](5, 6)(0) == 15625 assert M[4:6].param_names == ('amplitude_4', 'amplitude_5') assert M['E':'F'](5, 6)(0) == 15625 assert M['E':'F'].param_names == ('amplitude_4', 'amplitude_5') def test_slicing_on_instance(): """ Test slicing a simple compound model class using integers. """ A = Const1D.rename('A') B = Const1D.rename('B') C = Const1D.rename('C') D = Const1D.rename('D') E = Const1D.rename('E') F = Const1D.rename('F') M = A + B - C * D / E ** F m = M(1, 2, 3, 4, 5, 6) assert isinstance(m[0:1], A) assert isinstance(m['A':'A'], A) assert isinstance(m[5:6], F) assert isinstance(m['F':'F'], F) # 1 + 2 assert m[:'B'](0) == 3 assert m[:'B'].param_names == ('amplitude_0', 'amplitude_1') assert np.all(m[:'B'].parameters == [1, 2]) # 2 - 3 assert m['B':'C'](0) == -1 assert m['B':'C'].param_names == ('amplitude_1', 'amplitude_2') assert np.all(m['B':'C'].parameters == [2, 3]) # 3 * 4 assert m['C':'D'](0) == 12 assert m['C':'D'].param_names == ('amplitude_2', 'amplitude_3') assert np.all(m['C':'D'].parameters == [3, 4]) # 4 / 5 assert m['D':'E'](0) == 0.8 assert m['D':'E'].param_names == ('amplitude_3', 'amplitude_4') assert np.all(m['D':'E'].parameters == [4, 5]) # 5 ** 6 assert m['E':'F'](0) == 15625 assert m['E':'F'].param_names == ('amplitude_4', 'amplitude_5') assert np.all(m['E':'F'].parameters == [5, 6]) def test_indexing_on_instance(): """Test indexing on compound model instances.""" M = Gaussian1D + Const1D m = M(1, 0, 0.1, 2) assert isinstance(m[0], Gaussian1D) assert isinstance(m[1], Const1D) assert isinstance(m['Gaussian1D'], Gaussian1D) assert isinstance(m['Const1D'], Const1D) # Test parameter equivalence assert m[0].amplitude == 1 == m.amplitude_0 assert m[0].mean == 0 == m.mean_0 assert m[0].stddev == 0.1 == m.stddev_0 assert m[1].amplitude == 2 == m.amplitude_1 # Test that parameter value updates are symmetric between the compound # model and the submodel returned by indexing const = m[1] m.amplitude_1 = 42 assert const.amplitude == 42 const.amplitude = 137 assert m.amplitude_1 == 137 # Similar couple of tests, but now where the compound model was created # from model instances g = Gaussian1D(1, 2, 3, name='g') p = Polynomial1D(2, name='p') m = g + p assert m[0].name == 'g' assert m[1].name == 'p' assert m['g'].name == 'g' assert m['p'].name == 'p' poly = m[1] m.c0_1 = 12345 assert poly.c0 == 12345 poly.c1 = 6789 assert m.c1_1 == 6789 # Ensure this did *not* modify the original models we used as templates assert p.c0 == 0 assert p.c1 == 0 # Test negative indexing assert isinstance(m[-1], Polynomial1D) assert isinstance(m[-2], Gaussian1D) with pytest.raises(IndexError): m[42] with pytest.raises(IndexError): m['foobar'] def test_basic_compound_inverse(): """ Test basic inversion of compound models in the limited sense supported for models made from compositions and joins only. """ t = (Shift(2) & Shift(3)) | (Scale(2) & Scale(3)) | Rotation2D(90) assert_allclose(t.inverse(*t(0, 1)), (0, 1)) @pytest.mark.parametrize('model', [ Shift(0) + Shift(0) | Shift(0), Shift(0) - Shift(0) | Shift(0), Shift(0) * Shift(0) | Shift(0), Shift(0) / Shift(0) | Shift(0), Shift(0) ** Shift(0) | Shift(0), Gaussian1D(1, 2, 3) | Gaussian1D(4, 5, 6)]) def test_compound_unsupported_inverse(model): """ Ensure inverses aren't supported in cases where it shouldn't be. """ with pytest.raises(NotImplementedError): model.inverse def test_mapping_basic_permutations(): """ Tests a couple basic examples of the Mapping model--specifically examples that merely permute the outputs. """ x, y = Rotation2D(90)(1, 2) RS = Rotation2D | Mapping((1, 0)) x_prime, y_prime = RS(90)(1, 2) assert_allclose((x, y), (y_prime, x_prime)) # A more complicated permutation M = Rotation2D & Scale m = M(90, 2) x, y, z = m(1, 2, 3) MS = M | Mapping((2, 0, 1)) ms = MS(90, 2) x_prime, y_prime, z_prime = ms(1, 2, 3) assert_allclose((x, y, z), (y_prime, z_prime, x_prime)) def test_mapping_inverse(): """Tests inverting a compound model that includes a `Mapping`.""" RS = Rotation2D & Scale # Rotates 2 of the coordinates and scales the third--then rotates on a # different axis and scales on the axis of rotation. No physical meaning # here just a simple test M = RS | Mapping([2, 0, 1]) | RS m = M(12.1, 13.2, 14.3, 15.4) assert_allclose((0, 1, 2), m.inverse(*m(0, 1, 2)), atol=1e-08) def test_identity_input(): """ Test a case where an Identity (or Mapping) model is the first in a chain of composite models and thus is responsible for handling input broadcasting properly. Regression test for https://github.com/astropy/astropy/pull/3362 """ ident1 = Identity(1) shift = Shift(1) rotation = Rotation2D(angle=90) model = ident1 & shift | rotation assert_allclose(model(1, 2), [-3.0, 1.0]) # Same test case but using class composition TestModel = ident1 & Shift | Rotation2D model = TestModel(offset_1=1, angle_2=90) assert_allclose(model(1, 2), [-3.0, 1.0]) def test_slicing_on_instances_2(): """ More slicing tests. Regression test for https://github.com/embray/astropy/pull/10 """ model_a = Shift(1, name='a') model_b = Shift(2, name='b') model_c = Rotation2D(3, name='c') model_d = Scale(2, name='d') model_e = Scale(3, name='e') m = (model_a & model_b) | model_c | (model_d & model_e) with pytest.raises(ModelDefinitionError): # The slice can't actually be taken since the resulting model cannot be # evaluated assert m[1:].submodel_names == ('b', 'c', 'd', 'e') assert m[:].submodel_names == ('a', 'b', 'c', 'd', 'e') assert m['a':].submodel_names == ('a', 'b', 'c', 'd', 'e') with pytest.raises(ModelDefinitionError): assert m['c':'d'].submodel_names == ('c', 'd') assert m[1:2].name == 'b' assert m[2:7].submodel_names == ('c', 'd', 'e') with pytest.raises(IndexError): m['x'] with pytest.raises(IndexError): m['a' : 'r'] with pytest.raises(ModelDefinitionError): assert m[-4:4].submodel_names == ('b', 'c', 'd') with pytest.raises(ModelDefinitionError): assert m[-4:-2].submodel_names == ('b', 'c') def test_slicing_on_instances_3(): """ Like `test_slicing_on_instances_2` but uses a compound model that does not have any invalid slices due to the resulting model being invalid (originally test_slicing_on_instances_2 passed without any ModelDefinitionErrors being raised, but that was before we prevented invalid models from being created). """ model_a = Shift(1, name='a') model_b = Shift(2, name='b') model_c = Gaussian1D(3, 0, 0.1, name='c') model_d = Scale(2, name='d') model_e = Scale(3, name='e') m = (model_a + model_b) | model_c | (model_d + model_e) assert m[1:].submodel_names == ('b', 'c', 'd', 'e') assert m[:].submodel_names == ('a', 'b', 'c', 'd', 'e') assert m['a':].submodel_names == ('a', 'b', 'c', 'd', 'e') assert m['c':'d'].submodel_names == ('c', 'd') assert m[1:2].name == 'b' assert m[2:7].submodel_names == ('c', 'd', 'e') with pytest.raises(IndexError): m['x'] with pytest.raises(IndexError): m['a' : 'r'] assert m[-4:4].submodel_names == ('b', 'c', 'd') assert m[-4:-2].submodel_names == ('b', 'c') def test_slicing_on_instance_with_parameterless_model(): """ Regression test to fix an issue where the indices attached to parameter names on a compound model were not handled properly when one or more submodels have no parameters. This was especially evident in slicing. """ p2 = Polynomial2D(1, c0_0=1, c1_0=2, c0_1=3) p1 = Polynomial2D(1, c0_0=1, c1_0=2, c0_1=3) mapping = Mapping((0, 1, 0, 1)) offx = Shift(-2, name='x_translation') offy = Shift(-1, name='y_translation') aff = AffineTransformation2D(matrix=[[1, 2], [3, 4]], name='rotation') model = mapping | (p1 & p2) | (offx & offy) | aff assert model.param_names == ('c0_0_1', 'c1_0_1', 'c0_1_1', 'c0_0_2', 'c1_0_2', 'c0_1_2', 'offset_3', 'offset_4', 'matrix_5', 'translation_5') assert model(1, 2) == (23.0, 53.0) m = model[3:] assert m.param_names == ('offset_3', 'offset_4', 'matrix_5', 'translation_5') assert m(1, 2) == (1.0, 1.0) def test_compound_model_with_nonstandard_broadcasting(): """ Ensure that the ``standard_broadcasting`` flag is properly propagated when creating compound models. See the commit message for the commit in which this was added for more details. """ offx = Shift(1) offy = Shift(2) rot = AffineTransformation2D([[0, -1], [1, 0]]) m = (offx & offy) | rot x, y = m(0, 0) assert x == -2 assert y == 1 # make sure conversion back to scalars is working properly assert isinstance(x, float) assert isinstance(y, float) x, y = m([0, 1, 2], [0, 1, 2]) assert np.all(x == [-2, -3, -4]) assert np.all(y == [1, 2, 3]) def test_compound_model_classify_attributes(): """ Regression test for an issue raised here: https://github.com/astropy/astropy/pull/3231#discussion_r22221123 The issue is that part of the `help` implementation calls a utility function called `inspect.classify_class_attrs`, which was leading to an infinite recursion. This is a useful test in its own right just in that it tests that compound models can be introspected in some useful way without crashing--this works as sort of a test of its somewhat complicated internal state management. This test does not check any of the results of `~inspect.classify_class_attrs`, though it might be useful to at some point. """ inspect.classify_class_attrs(Gaussian1D + Gaussian1D) def test_invalid_operands(): """ Test that certain operators do not work with models whose inputs/outputs do not match up correctly. """ with pytest.raises(ModelDefinitionError): Rotation2D | Gaussian1D with pytest.raises(ModelDefinitionError): Rotation2D(90) | Gaussian1D(1, 0, 0.1) with pytest.raises(ModelDefinitionError): Rotation2D + Gaussian1D with pytest.raises(ModelDefinitionError): Rotation2D(90) + Gaussian1D(1, 0, 0.1) class _ConstraintsTestA(Model): stddev = Parameter(default=0, min=0, max=0.3) mean = Parameter(default=0, fixed=True) @staticmethod def evaluate(stddev, mean): return stddev, mean class _ConstraintsTestB(Model): mean = Parameter(default=0, fixed=True) @staticmethod def evaluate(mean): return mean @pytest.mark.parametrize('model', [Gaussian1D(bounds={'stddev': (0, 0.3)}, fixed={'mean': True}) + Gaussian1D(fixed={'mean': True}), (_ConstraintsTestA + _ConstraintsTestB)()]) def test_inherit_constraints(model): """ Various tests for copying of constraint values between compound models and their members. There are two versions of this test: One where a compound model is created from two model instances, and another where a compound model is created from two model classes that have default constraints set on some of their parameters. Regression test for https://github.com/astropy/astropy/issues/3481 """ # Lots of assertions in this test as there are multiple interfaces to # parameter constraints assert 'stddev_0' in model.bounds assert model.bounds['stddev_0'] == (0, 0.3) assert model.stddev_0.bounds == (0, 0.3) assert 'mean_0' in model.fixed assert model.fixed['mean_0'] is True assert model.mean_0.fixed is True assert 'mean_1' in model.fixed assert model.fixed['mean_1'] is True assert model.mean_1.fixed is True # Great, all the constraints were inherited properly # Now what about if we update them through the sub-models? model[0].stddev.bounds = (0, 0.4) assert model.bounds['stddev_0'] == (0, 0.4) assert model.stddev_0.bounds == (0, 0.4) assert model[0].stddev.bounds == (0, 0.4) assert model[0].bounds['stddev'] == (0, 0.4) model[0].bounds['stddev'] = (0.1, 0.5) assert model.bounds['stddev_0'] == (0.1, 0.5) assert model.stddev_0.bounds == (0.1, 0.5) assert model[0].stddev.bounds == (0.1, 0.5) assert model[0].bounds['stddev'] == (0.1, 0.5) model[1].mean.fixed = False assert model.fixed['mean_1'] is False assert model.mean_1.fixed is False assert model[1].mean.fixed is False assert model[1].fixed['mean'] is False model[1].fixed['mean'] = True assert model.fixed['mean_1'] is True assert model.mean_1.fixed is True assert model[1].mean.fixed is True assert model[1].fixed['mean'] is True def test_compound_custom_inverse(): """ Test that a compound model with a custom inverse has that inverse applied when the inverse of another model, of which it is a component, is computed. Regression test for https://github.com/astropy/astropy/issues/3542 """ poly = Polynomial1D(1, c0=1, c1=2) scale = Scale(1) shift = Shift(1) model1 = poly | scale model1.inverse = poly # model1 now has a custom inverse (the polynomial itself, ignoring the # trivial scale factor) model2 = shift | model1 assert_allclose(model2.inverse(1), (poly | shift.inverse)(1)) # Make sure an inverse is not allowed if the models were combined with the # wrong operator, or if one of the models doesn't have an inverse defined with pytest.raises(NotImplementedError): (shift + model1).inverse with pytest.raises(NotImplementedError): (model1 & poly).inverse @pytest.mark.parametrize('poly', [Chebyshev2D(1, 2), Polynomial2D(2), Legendre2D(1, 2), Chebyshev1D(5), Legendre1D(5), Polynomial1D(5)]) def test_compound_with_polynomials(poly): """ Tests that polynomials are scaled when used in compound models. Issue #3699 """ poly.parameters = [1, 2, 3, 4, 1, 2] shift = Shift(3) model = poly | shift x, y = np.mgrid[:20, :37] result_compound = model(x, y) result = shift(poly(x, y)) assert_allclose(result, result_compound) # has to be defined at module level since pickling doesn't work right (in # general) for classes defined in functions class _TestPickleModel(Gaussian1D + Gaussian1D): pass @pytest.mark.skipif(str("sys.version_info < (2, 7, 3)")) def test_pickle_compound(): """ Regression test for https://github.com/astropy/astropy/issues/3867#issuecomment-114547228 """ # Test pickling a compound model class GG = Gaussian1D + Gaussian1D GG2 = pickle.loads(pickle.dumps(GG)) assert GG.param_names == GG2.param_names assert GG.__name__ == GG2.__name__ # Test that it works, or at least evaluates successfully assert GG()(0.12345) == GG2()(0.12345) # Test pickling a compound model instance g1 = Gaussian1D(1.0, 0.0, 0.1) g2 = Gaussian1D([2.0, 3.0], [0.0, 0.0], [0.2, 0.3]) m = g1 + g2 m2 = pickle.loads(pickle.dumps(m)) assert m.param_names == m2.param_names assert m.__class__.__name__ == m2.__class__.__name__ assert np.all(m.parameters == m2.parameters) assert np.all(m(0) == m2(0)) # Test pickling a concrete class p = pickle.dumps(_TestPickleModel, protocol=0) # Note: This is very dependent on the specific protocol, but the point of # this test is that the "concrete" model is pickled in a very simple way # that only specifies the module and class name, and is unpickled by # re-importing the class from the module in which it was defined. This # should still work for concrete subclasses of compound model classes that # were dynamically generated through an expression exp = b'castropy.modeling.tests.test_compound\n_TestPickleModel\np0\n.' # When testing against the expected value we drop the memo length field # at the end, which may differ between runs assert p[:p.rfind(b'p')] == exp[:exp.rfind(b'p')] assert pickle.loads(p) is _TestPickleModel @pytest.mark.skipif(str("sys.version_info >= (2, 7, 3)")) def test_pickle_compound_fallback(): """ Test fallback for pickling compound model on old versions of Python affected by http://bugs.python.org/issue7689 """ gg = (Gaussian1D + Gaussian1D)() with pytest.raises(RuntimeError): pickle.dumps(gg) astropy-1.1.1/astropy/modeling/tests/test_polynomial.py0000644001134200020070000002722712640262015024364 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """Tests for polynomial models.""" from __future__ import (absolute_import, division, print_function, unicode_literals) import os from itertools import product import numpy as np from numpy.testing.utils import assert_allclose from .. import fitting from ...tests.helper import pytest from ... import wcs from ...io import fits from ..polynomial import (Chebyshev1D, Legendre1D, Polynomial1D, Chebyshev2D, Legendre2D, Polynomial2D, SIP, PolynomialBase, OrthoPolynomialBase) from ..functional_models import Linear1D from ...utils.data import get_pkg_data_filename try: from scipy import optimize # pylint: disable=W0611 HAS_SCIPY = True except ImportError: HAS_SCIPY = False linear1d = { Chebyshev1D: { 'args': (3,), 'kwargs': {'domain': [1, 10]}, 'parameters': {'c0': 1.2, 'c1': 2, 'c2': 2.3, 'c3': 0.2}, 'constraints': {'fixed': {'c0': 1.2}} }, Legendre1D: { 'args': (3,), 'kwargs': {'domain': [1, 10]}, 'parameters': {'c0': 1.2, 'c1': 2, 'c2': 2.3, 'c3': 0.2}, 'constraints': {'fixed': {'c0': 1.2}} }, Polynomial1D: { 'args': (3,), 'kwargs': {'domain': [1, 10]}, 'parameters': {'c0': 1.2, 'c1': 2, 'c2': 2.3, 'c3': 0.2}, 'constraints': {'fixed': {'c0': 1.2}} }, Linear1D: { 'args': (), 'kwargs': {}, 'parameters': {'intercept': 1.2, 'slope': 23.1}, 'constraints': {'fixed': {'intercept': 1.2}} } } linear2d = { Chebyshev2D: { 'args': (1, 1), 'kwargs': {'x_domain': [0, 99], 'y_domain': [0, 82]}, 'parameters': {'c0_0': 1.2, 'c1_0': 2, 'c0_1': 2.3, 'c1_1': 0.2}, 'constraints': {'fixed': {'c0_0': 1.2}} }, Legendre2D: { 'args': (1, 1), 'kwargs': {'x_domain': [0, 99], 'y_domain': [0, 82]}, 'parameters': {'c0_0': 1.2, 'c1_0': 2, 'c0_1': 2.3, 'c1_1': 0.2}, 'constraints': {'fixed': {'c0_0': 1.2}} }, Polynomial2D: { 'args': (1,), 'kwargs': {}, 'parameters': {'c0_0': 1.2, 'c1_0': 2, 'c0_1': 2.3}, 'constraints': {'fixed': {'c0_0': 1.2}} } } @pytest.mark.skipif('not HAS_SCIPY') class TestFitting(object): """Test linear fitter with polynomial models.""" def setup_class(self): self.N = 100 self.M = 100 self.x1 = np.linspace(1, 10, 100) self.y2, self.x2 = np.mgrid[:100, :83] rsn = np.random.RandomState(0) self.n1 = rsn.randn(self.x1.size) * .1 self.n2 = rsn.randn(self.x2.size) self.n2.shape = self.x2.shape self.linear_fitter = fitting.LinearLSQFitter() self.non_linear_fitter = fitting.LevMarLSQFitter() # TODO: Most of these test cases have some pretty repetitive setup that we # could probably factor out @pytest.mark.parametrize(('model_class','constraints'), list(product(linear1d.keys(), (False, True)))) def test_linear_fitter_1D(self, model_class, constraints): """Test fitting with LinearLSQFitter""" model_args = linear1d[model_class] kwargs = {} kwargs.update(model_args['kwargs']) kwargs.update(model_args['parameters']) if constraints: kwargs.update(model_args['constraints']) model = model_class(*model_args['args'], **kwargs) y1 = model(self.x1) model_lin = self.linear_fitter(model, self.x1, y1 + self.n1) if constraints: # For the constraints tests we're not checking the overall fit, # just that the constraint was maintained fixed = model_args['constraints'].get('fixed', None) if fixed: for param, value in fixed.items(): expected = model_args['parameters'][param] assert getattr(model_lin, param).value == expected else: assert_allclose(model_lin.parameters, model.parameters, atol=0.2) @pytest.mark.parametrize(('model_class','constraints'), list(product(linear1d.keys(), (False, True)))) def test_non_linear_fitter_1D(self, model_class, constraints): """Test fitting with non-linear LevMarLSQFitter""" model_args = linear1d[model_class] kwargs = {} kwargs.update(model_args['kwargs']) kwargs.update(model_args['parameters']) if constraints: kwargs.update(model_args['constraints']) model = model_class(*model_args['args'], **kwargs) y1 = model(self.x1) model_nlin = self.non_linear_fitter(model, self.x1, y1 + self.n1) if constraints: fixed = model_args['constraints'].get('fixed', None) if fixed: for param, value in fixed.items(): expected = model_args['parameters'][param] assert getattr(model_nlin, param).value == expected else: assert_allclose(model_nlin.parameters, model.parameters, atol=0.2) @pytest.mark.parametrize(('model_class','constraints'), list(product(linear2d.keys(), (False, True)))) def test_linear_fitter_2D(self, model_class, constraints): """Test fitting with LinearLSQFitter""" model_args = linear2d[model_class] kwargs = {} kwargs.update(model_args['kwargs']) kwargs.update(model_args['parameters']) if constraints: kwargs.update(model_args['constraints']) model = model_class(*model_args['args'], **kwargs) z = model(self.x2, self.y2) model_lin = self.linear_fitter(model, self.x2, self.y2, z + self.n2) if constraints: fixed = model_args['constraints'].get('fixed', None) if fixed: for param, value in fixed.items(): expected = model_args['parameters'][param] assert getattr(model_lin, param).value == expected else: assert_allclose(model_lin.parameters, model.parameters, atol=0.2) @pytest.mark.parametrize(('model_class','constraints'), list(product(linear2d.keys(), (False, True)))) def test_non_linear_fitter_2D(self, model_class, constraints): """Test fitting with non-linear LevMarLSQFitter""" model_args = linear2d[model_class] kwargs = {} kwargs.update(model_args['kwargs']) kwargs.update(model_args['parameters']) if constraints: kwargs.update(model_args['constraints']) model = model_class(*model_args['args'], **kwargs) z = model(self.x2, self.y2) model_nlin = self.non_linear_fitter(model, self.x2, self.y2, z + self.n2) if constraints: fixed = model_args['constraints'].get('fixed', None) if fixed: for param, value in fixed.items(): expected = model_args['parameters'][param] assert getattr(model_nlin, param).value == expected else: assert_allclose(model_nlin.parameters, model.parameters, atol=0.2) @pytest.mark.parametrize('model_class', [cls for cls in list(linear1d) + list(linear2d) if isinstance(cls, PolynomialBase)]) def test_polynomial_init_with_constraints(model_class): """ Test that polynomial models can be instantiated with constraints, but no parameters specified. Regression test for https://github.com/astropy/astropy/issues/3606 """ # Just determine which parameter to place a constraint on; it doesn't # matter which parameter it is to exhibit the problem so long as it's a # valid parameter for the model if '1D' in model_class.__name__: param = 'c0' else: param = 'c0_0' if issubclass(model_class, OrthoPolynomialBase): degree = (2, 2) else: degree = (2,) m = model_class(*degree, fixed={param: True}) assert m.fixed[param] is True assert getattr(m, param).fixed is True def test_sip_hst(): """Test SIP against astropy.wcs""" test_file = get_pkg_data_filename(os.path.join('data', 'hst_sip.hdr')) hdr = fits.Header.fromtextfile(test_file) crpix1 = hdr['CRPIX1'] crpix2 = hdr['CRPIX2'] wobj = wcs.WCS(hdr) a_pars = dict(**hdr['A_*']) b_pars = dict(**hdr['B_*']) a_order = a_pars.pop('A_ORDER') b_order = b_pars.pop('B_ORDER') sip = SIP([crpix1, crpix2], a_order, b_order, a_pars, b_pars) coords = [1, 1] rel_coords = [1 - crpix1, 1 - crpix2] astwcs_result = wobj.sip_pix2foc([coords], 1)[0] - rel_coords assert_allclose(sip(1, 1), astwcs_result) def test_sip_irac(): """Test forward and inverse SIP againts astropy.wcs""" test_file = get_pkg_data_filename(os.path.join('data', 'irac_sip.hdr')) hdr = fits.Header.fromtextfile(test_file) crpix1 = hdr['CRPIX1'] crpix2 = hdr['CRPIX2'] wobj = wcs.WCS(hdr) a_pars = dict(**hdr['A_*']) b_pars = dict(**hdr['B_*']) ap_pars = dict(**hdr['AP_*']) bp_pars = dict(**hdr['BP_*']) a_order = a_pars.pop('A_ORDER') b_order = b_pars.pop('B_ORDER') ap_order = ap_pars.pop('AP_ORDER') bp_order = bp_pars.pop('BP_ORDER') del a_pars['A_DMAX'] del b_pars['B_DMAX'] pix = [200, 200] rel_pix = [200 - crpix1, 200 - crpix2] sip = SIP([crpix1, crpix2], a_order, b_order, a_pars, b_pars, ap_order=ap_order, ap_coeff=ap_pars, bp_order=bp_order, bp_coeff=bp_pars) foc = wobj.sip_pix2foc([pix], 1) newpix = wobj.sip_foc2pix(foc, 1)[0] assert_allclose(sip(*pix), foc[0] - rel_pix) assert_allclose(sip.inverse(*foc[0]) + foc[0] - rel_pix, newpix - pix) def test_sip_no_coeff(): sip = SIP([10,12], 2, 2) assert_allclose(sip.sip1d_a.parameters, [0., 0., 0]) assert_allclose(sip.sip1d_b.parameters, [0., 0., 0]) with pytest.raises(NotImplementedError): sip.inverse @pytest.mark.parametrize('cls', (Polynomial1D, Chebyshev1D, Legendre1D, Polynomial2D, Chebyshev2D, Legendre2D)) def test_zero_degree_polynomial(cls): """ A few tests that degree=0 polynomials are correctly evaluated and fitted. Regression test for https://github.com/astropy/astropy/pull/3589 """ if cls.n_inputs == 1: # Test 1D polynomials p1 = cls(degree=0, c0=1) assert p1(0) == 1 assert np.all(p1(np.zeros(5)) == np.ones(5)) x = np.linspace(0, 1, 100) # Add a little noise along a straight line y = 1 + np.random.uniform(0, 0.1, len(x)) p1_init = cls(degree=0) fitter = fitting.LinearLSQFitter() p1_fit = fitter(p1_init, x, y) # The fit won't be exact of course, but it should get close to within # 1% assert_allclose(p1_fit.c0, 1, atol=0.10) elif cls.n_inputs == 2: # Test 2D polynomials if issubclass(cls, OrthoPolynomialBase): p2 = cls(x_degree=0, y_degree=0, c0_0=1) else: p2 = cls(degree=0, c0_0=1) assert p2(0, 0) == 1 assert np.all(p2(np.zeros(5), np.zeros(5)) == np.ones(5)) y, x = np.mgrid[0:1:100j,0:1:100j] z = (1 + np.random.uniform(0, 0.1, x.size)).reshape(100, 100) if issubclass(cls, OrthoPolynomialBase): p2_init = cls(x_degree=0, y_degree=0) else: p2_init = cls(degree=0) fitter = fitting.LinearLSQFitter() p2_fit = fitter(p2_init, x, y, z) assert_allclose(p2_fit.c0_0, 1, atol=0.10) astropy-1.1.1/astropy/modeling/tests/test_input.py0000644001134200020070000007220112640262015023330 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module tests fitting and model evaluation with various inputs """ from __future__ import (absolute_import, unicode_literals, division, print_function) import numpy as np from numpy.testing.utils import assert_allclose from .. import models from .. import fitting from ..core import Model, FittableModel, Fittable1DModel from ..parameters import Parameter from ...tests.helper import pytest try: from scipy import optimize # pylint: disable=W0611 HAS_SCIPY = True except ImportError: HAS_SCIPY = False model1d_params = [ (models.Polynomial1D, [2]), (models.Legendre1D, [2]), (models.Chebyshev1D, [2]), (models.Shift, [2]), (models.Scale, [2]) ] model2d_params = [ (models.Polynomial2D, [2]), (models.Legendre2D, [1, 2]), (models.Chebyshev2D, [1, 2]) ] class TestInputType(object): """ This class tests that models accept numbers, lists and arrays. Add new models to one of the lists above to test for this. """ def setup_class(self): self.x = 5.3 self.y = 6.7 self.x1 = np.arange(1, 10, .1) self.y1 = np.arange(1, 10, .1) self.y2, self.x2 = np.mgrid[:10, :8] @pytest.mark.parametrize(('model', 'params'), model1d_params) def test_input1D(self, model, params): m = model(*params) m(self.x) m(self.x1) m(self.x2) @pytest.mark.parametrize(('model', 'params'), model2d_params) def test_input2D(self, model, params): m = model(*params) m(self.x, self.y) m(self.x1, self.y1) m(self.x2, self.y2) class TestFitting(object): """Test various input options to fitting routines.""" def setup_class(self): self.x1 = np.arange(10) self.y, self.x = np.mgrid[:10, :10] def test_linear_fitter_1set(self): """1 set 1D x, 1pset""" expected = np.array([0, 1, 1, 1]) p1 = models.Polynomial1D(3) p1.parameters = [0, 1, 1, 1] y1 = p1(self.x1) pfit = fitting.LinearLSQFitter() model = pfit(p1, self.x1, y1) assert_allclose(model.parameters, expected, atol=10 ** (-7)) def test_linear_fitter_Nset(self): """1 set 1D x, 2 sets 1D y, 2 param_sets""" expected = np.array([[0, 0], [1, 1], [2, 2], [3, 3]]) p1 = models.Polynomial1D(3, n_models=2) p1.parameters = [0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0] params = {} for i in range(4): params[p1.param_names[i]] = [i, i] p1 = models.Polynomial1D(3, model_set_axis=0, **params) y1 = p1(self.x1, model_set_axis=False) pfit = fitting.LinearLSQFitter() model = pfit(p1, self.x1, y1) assert_allclose(model.param_sets, expected, atol=10 ** (-7)) def test_linear_fitter_1dcheb(self): """1 pset, 1 set 1D x, 1 set 1D y, Chebyshev 1D polynomial""" expected = np.array( [[2817.2499999999995, 4226.6249999999991, 1680.7500000000009, 273.37499999999926]]).T ch1 = models.Chebyshev1D(3) ch1.parameters = [0, 1, 2, 3] y1 = ch1(self.x1) pfit = fitting.LinearLSQFitter() model = pfit(ch1, self.x1, y1) assert_allclose(model.param_sets, expected, atol=10 ** (-2)) def test_linear_fitter_1dlegend(self): """ 1 pset, 1 set 1D x, 1 set 1D y, Legendre 1D polynomial """ expected = np.array( [[1925.5000000000011, 3444.7500000000005, 1883.2500000000014, 364.4999999999996]]).T leg1 = models.Legendre1D(3) leg1.parameters = [1, 2, 3, 4] y1 = leg1(self.x1) pfit = fitting.LinearLSQFitter() model = pfit(leg1, self.x1, y1) assert_allclose(model.param_sets, expected, atol=10 ** (-12)) def test_linear_fitter_1set2d(self): p2 = models.Polynomial2D(2) p2.parameters = [0, 1, 2, 3, 4, 5] expected = [0, 1, 2, 3, 4, 5] z = p2(self.x, self.y) pfit = fitting.LinearLSQFitter() model = pfit(p2, self.x, self.y, z) assert_allclose(model.parameters, expected, atol=10 ** (-12)) assert_allclose(model(self.x, self.y), z, atol=10 ** (-12)) def test_wrong_numpset(self): """ A ValueError is raised if a 1 data set (1d x, 1d y) is fit with a model with multiple parameter sets. """ with pytest.raises(ValueError): p1 = models.Polynomial1D(5) y1 = p1(self.x1) p1 = models.Polynomial1D(5, n_models=2) pfit = fitting.LinearLSQFitter() model = pfit(p1, self.x1, y1) def test_wrong_pset(self): """A case of 1 set of x and multiple sets of y and parameters.""" expected = np.array([[1., 0], [1, 1], [1, 2], [1, 3], [1, 4], [1, 5]]) p1 = models.Polynomial1D(5, n_models=2) params = {} for i in range(6): params[p1.param_names[i]] = [1, i] p1 = models.Polynomial1D(5, model_set_axis=0, **params) y1 = p1(self.x1, model_set_axis=False) pfit = fitting.LinearLSQFitter() model = pfit(p1, self.x1, y1) assert_allclose(model.param_sets, expected, atol=10 ** (-7)) @pytest.mark.skipif('not HAS_SCIPY') def test_nonlinear_lsqt_1set_1d(self): """1 set 1D x, 1 set 1D y, 1 pset NonLinearFitter""" g1 = models.Gaussian1D(10, mean=3, stddev=.2) y1 = g1(self.x1) gfit = fitting.LevMarLSQFitter() model = gfit(g1, self.x1, y1) assert_allclose(model.parameters, [10, 3, .2]) @pytest.mark.skipif('not HAS_SCIPY') def test_nonlinear_lsqt_Nset_1d(self): """1 set 1D x, 1 set 1D y, 2 param_sets, NonLinearFitter""" with pytest.raises(ValueError): g1 = models.Gaussian1D([10.2, 10], mean=[3, 3.2], stddev=[.23, .2], n_models=2) y1 = g1(self.x1, model_set_axis=False) gfit = fitting.LevMarLSQFitter() model = gfit(g1, self.x1, y1) @pytest.mark.skipif('not HAS_SCIPY') def test_nonlinear_lsqt_1set_2d(self): """1 set 2d x, 1set 2D y, 1 pset, NonLinearFitter""" g2 = models.Gaussian2D(10, x_mean=3, y_mean=4, x_stddev=.3, y_stddev=.2, theta=0) z = g2(self.x, self.y) gfit = fitting.LevMarLSQFitter() model = gfit(g2, self.x, self.y, z) assert_allclose(model.parameters, [10, 3, 4, .3, .2, 0]) @pytest.mark.skipif('not HAS_SCIPY') def test_nonlinear_lsqt_Nset_2d(self): """1 set 2d x, 1set 2D y, 2 param_sets, NonLinearFitter""" with pytest.raises(ValueError): g2 = models.Gaussian2D([10, 10], [3, 3], [4, 4], x_stddev=[.3, .3], y_stddev=[.2, .2], theta=[0, 0], n_models=2) z = g2(self.x.flatten(), self.y.flatten()) gfit = fitting.LevMarLSQFitter() model = gfit(g2, self.x, self.y, z) class TestEvaluation(object): """ Test various input options to model evaluation TestFitting actually covers evaluation of polynomials """ def setup_class(self): self.x1 = np.arange(20) self.y, self.x = np.mgrid[:10, :10] def test_non_linear_NYset(self): """ This case covers: N param sets , 1 set 1D x --> N 1D y data """ g1 = models.Gaussian1D([10, 10], [3, 3], [.2, .2], n_models=2) y1 = g1(self.x1, model_set_axis=False) assert np.all((y1[0, :] - y1[1, :]).nonzero() == np.array([])) def test_non_linear_NXYset(self): """ This case covers: N param sets , N sets 1D x --> N N sets 1D y data """ g1 = models.Gaussian1D([10, 10], [3, 3], [.2, .2], n_models=2) xx = np.array([self.x1, self.x1]) y1 = g1(xx) assert_allclose(y1[:, 0], y1[:, 1], atol=10 ** (-12)) def test_p1_1set_1pset(self): """1 data set, 1 pset, Polynomial1D""" p1 = models.Polynomial1D(4) y1 = p1(self.x1) assert y1.shape == (20,) def test_p1_nset_npset(self): """N data sets, N param_sets, Polynomial1D""" p1 = models.Polynomial1D(4, n_models=2) y1 = p1(np.array([self.x1, self.x1]).T, model_set_axis=-1) assert y1.shape == (2, 20) assert_allclose(y1[0, :], y1[1, :], atol=10 ** (-12)) def test_p2_1set_1pset(self): """1 pset, 1 2D data set, Polynomial2D""" p2 = models.Polynomial2D(5) z = p2(self.x, self.y) assert z.shape == (10, 10) def test_p2_nset_npset(self): """N param_sets, N 2D data sets, Poly2d""" p2 = models.Polynomial2D(5, n_models=2) xx = np.array([self.x, self.x]) yy = np.array([self.y, self.y]) z = p2(xx, yy) assert z.shape == (2, 10, 10) def test_nset_domain(self): """ Polynomial evaluation of multiple data sets with different domain """ xx = np.array([self.x1, self.x1]).T xx[0, 0] = 100 xx[1, 0] = 100 xx[2, 0] = 99 p1 = models.Polynomial1D(5, n_models=2) yy = p1(xx, model_set_axis=-1) x1 = xx[:, 0] x2 = xx[:, 1] p1 = models.Polynomial1D(5) assert_allclose(p1(x1), yy[0, :], atol=10 ** (-12)) p1 = models.Polynomial1D(5) assert_allclose(p1(x2), yy[1, :], atol=10 ** (-12)) def test_evaluate_gauss2d(self): cov = np.array([[1., 0.8], [0.8, 3]]) g = models.Gaussian2D(1., 5., 4., cov_matrix=cov) y, x = np.mgrid[:10, :10] g(x, y) class TModel_1_1(Fittable1DModel): p1 = Parameter() p2 = Parameter() @staticmethod def evaluate(x, p1, p2): return x + p1 + p2 class TestSingleInputSingleOutputSingleModel(object): """ A suite of tests to check various cases of parameter and input combinations on models with n_input = n_output = 1 on a toy model with n_models=1. Many of these tests mirror test cases in ``astropy.modeling.tests.test_parameters.TestParameterInitialization``, except that this tests how different parameter arrangements interact with different types of model inputs. """ def test_scalar_parameters_scalar_input(self): """ Scalar parameters with a scalar input should return a scalar. """ t = TModel_1_1(1, 10) y = t(100) assert isinstance(y, float) assert np.ndim(y) == 0 assert y == 111 def test_scalar_parameters_1d_array_input(self): """ Scalar parameters should broadcast with an array input to result in an array output of the same shape as the input. """ t = TModel_1_1(1, 10) y = t(np.arange(5) * 100) assert isinstance(y, np.ndarray) assert np.shape(y) == (5,) assert np.all(y == [11, 111, 211, 311, 411]) def test_scalar_parameters_2d_array_input(self): """ Scalar parameters should broadcast with an array input to result in an array output of the same shape as the input. """ t = TModel_1_1(1, 10) y = t(np.arange(6).reshape(2, 3) * 100) assert isinstance(y, np.ndarray) assert np.shape(y) == (2, 3) assert np.all(y == [[11, 111, 211], [311, 411, 511]]) def test_scalar_parameters_3d_array_input(self): """ Scalar parameters should broadcast with an array input to result in an array output of the same shape as the input. """ t = TModel_1_1(1, 10) y = t(np.arange(12).reshape(2, 3, 2) * 100) assert isinstance(y, np.ndarray) assert np.shape(y) == (2, 3, 2) assert np.all(y == [[[11, 111], [211, 311], [411, 511]], [[611, 711], [811, 911], [1011, 1111]]]) def test_1d_array_parameters_scalar_input(self): """ Array parameters should all be broadcastable with each other, and with a scalar input the output should be broadcast to the maximum dimensions of the parameters. """ t = TModel_1_1([1, 2], [10, 20]) y = t(100) assert isinstance(y, np.ndarray) assert np.shape(y) == (2,) assert np.all(y == [111, 122]) def test_1d_array_parameters_1d_array_input(self): """ When given an array input it must be broadcastable with all the parameters. """ t = TModel_1_1([1, 2], [10, 20]) y1 = t([100, 200]) assert np.shape(y1) == (2,) assert np.all(y1 == [111, 222]) y2 = t([[100], [200]]) assert np.shape(y2) == (2, 2) assert np.all(y2 == [[111, 122], [211, 222]]) with pytest.raises(ValueError): # Doesn't broadcast y3 = t([100, 200, 300]) def test_2d_array_parameters_2d_array_input(self): """ When given an array input it must be broadcastable with all the parameters. """ t = TModel_1_1([[1, 2], [3, 4]], [[10, 20], [30, 40]]) y1 = t([[100, 200], [300, 400]]) assert np.shape(y1) == (2, 2) assert np.all(y1 == [[111, 222], [333, 444]]) y2 = t([[[[100]], [[200]]], [[[300]], [[400]]]]) assert np.shape(y2) == (2, 2, 2, 2) assert np.all(y2 == [[[[111, 122], [133, 144]], [[211, 222], [233, 244]]], [[[311, 322], [333, 344]], [[411, 422], [433, 444]]]]) with pytest.raises(ValueError): # Doesn't broadcast y3 = t([[100, 200, 300], [400, 500, 600]]) def test_mixed_array_parameters_1d_array_input(self): """ When given an array input it must be broadcastable with all the parameters. """ t = TModel_1_1([[[0.01, 0.02, 0.03], [0.04, 0.05, 0.06]], [[0.07, 0.08, 0.09], [0.10, 0.11, 0.12]]], [1, 2, 3]) y1 = t([10, 20, 30]) assert np.shape(y1) == (2, 2, 3) assert_allclose(y1, [[[11.01, 22.02, 33.03], [11.04, 22.05, 33.06]], [[11.07, 22.08, 33.09], [11.10, 22.11, 33.12]]]) y2 = t([[[[10]]], [[[20]]], [[[30]]]]) assert np.shape(y2) == (3, 2, 2, 3) assert_allclose(y2, [[[[11.01, 12.02, 13.03], [11.04, 12.05, 13.06]], [[11.07, 12.08, 13.09], [11.10, 12.11, 13.12]]], [[[21.01, 22.02, 23.03], [21.04, 22.05, 23.06]], [[21.07, 22.08, 23.09], [21.10, 22.11, 23.12]]], [[[31.01, 32.02, 33.03], [31.04, 32.05, 33.06]], [[31.07, 32.08, 33.09], [31.10, 32.11, 33.12]]]]) class TestSingleInputSingleOutputTwoModel(object): """ A suite of tests to check various cases of parameter and input combinations on models with n_input = n_output = 1 on a toy model with n_models=2. Many of these tests mirror test cases in ``astropy.modeling.tests.test_parameters.TestParameterInitialization``, except that this tests how different parameter arrangements interact with different types of model inputs. With n_models=2 all outputs should have a first dimension of size 2 (unless defined with model_set_axis != 0). """ def test_scalar_parameters_scalar_input(self): """ Scalar parameters with a scalar input should return a 1-D array with size equal to the number of models. """ t = TModel_1_1([1, 2], [10, 20], n_models=2) y = t(100) assert np.shape(y) == (2,) assert np.all(y == [111, 122]) def test_scalar_parameters_1d_array_input(self): """ The dimension of the input should match the number of models unless model_set_axis=False is given, in which case the input is copied across all models. """ t = TModel_1_1([1, 2], [10, 20], n_models=2) with pytest.raises(ValueError): y = t(np.arange(5) * 100) y1 = t([100, 200]) assert np.shape(y1) == (2,) assert np.all(y1 == [111, 222]) y2 = t([100, 200], model_set_axis=False) # In this case the value [100, 200, 300] should be evaluated on each # model rather than evaluating the first model with 100 and the second # model with 200 assert np.shape(y2) == (2, 2) assert np.all(y2 == [[111, 211], [122, 222]]) y3 = t([100, 200, 300], model_set_axis=False) assert np.shape(y3) == (2, 3) assert np.all(y3 == [[111, 211, 311], [122, 222, 322]]) def test_scalar_parameters_2d_array_input(self): """ The dimension of the input should match the number of models unless model_set_axis=False is given, in which case the input is copied across all models. """ t = TModel_1_1([1, 2], [10, 20], n_models=2) y1 = t(np.arange(6).reshape(2, 3) * 100) assert np.shape(y1) == (2, 3) assert np.all(y1 == [[11, 111, 211], [322, 422, 522]]) y2 = t(np.arange(6).reshape(2, 3) * 100, model_set_axis=False) assert np.shape(y2) == (2, 2, 3) assert np.all(y2 == [[[11, 111, 211], [311, 411, 511]], [[22, 122, 222], [322, 422, 522]]]) def test_scalar_parameters_3d_array_input(self): """ The dimension of the input should match the number of models unless model_set_axis=False is given, in which case the input is copied across all models. """ t = TModel_1_1([1, 2], [10, 20], n_models=2) data = np.arange(12).reshape(2, 3, 2) * 100 y1 = t(data) assert np.shape(y1) == (2, 3, 2) assert np.all(y1 == [[[11, 111], [211, 311], [411, 511]], [[622, 722], [822, 922], [1022, 1122]]]) y2 = t(data, model_set_axis=False) assert np.shape(y2) == (2, 2, 3, 2) assert np.all(y2 == np.array([data + 11, data + 22])) def test_1d_array_parameters_scalar_input(self): """ Array parameters should all be broadcastable with each other, and with a scalar input the output should be broadcast to the maximum dimensions of the parameters. """ t = TModel_1_1([[1, 2, 3], [4, 5, 6]], [[10, 20, 30], [40, 50, 60]], n_models=2) y = t(100) assert np.shape(y) == (2, 3) assert np.all(y == [[111, 122, 133], [144, 155, 166]]) def test_1d_array_parameters_1d_array_input(self): """ When the input is an array, if model_set_axis=False then it must broadcast with the shapes of the parameters (excluding the model_set_axis). Otherwise all dimensions must be broadcastable. """ t = TModel_1_1([[1, 2, 3], [4, 5, 6]], [[10, 20, 30], [40, 50, 60]], n_models=2) with pytest.raises(ValueError): y1 = t([100, 200, 300]) y1 = t([100, 200]) assert np.shape(y1) == (2, 3) assert np.all(y1 == [[111, 122, 133], [244, 255, 266]]) with pytest.raises(ValueError): # Doesn't broadcast with the shape of the parameters, (3,) y2 = t([100, 200], model_set_axis=False) y2 = t([100, 200, 300], model_set_axis=False) assert np.shape(y2) == (2, 3) assert np.all(y2 == [[111, 222, 333], [144, 255, 366]]) def test_2d_array_parameters_2d_array_input(self): t = TModel_1_1([[[1, 2], [3, 4]], [[5, 6], [7, 8]]], [[[10, 20], [30, 40]], [[50, 60], [70, 80]]], n_models=2) y1 = t([[100, 200], [300, 400]]) assert np.shape(y1) == (2, 2, 2) assert np.all(y1 == [[[111, 222], [133, 244]], [[355, 466], [377, 488]]]) with pytest.raises(ValueError): y2 = t([[100, 200, 300], [400, 500, 600]]) y2 = t([[[100, 200], [300, 400]], [[500, 600], [700, 800]]]) assert np.shape(y2) == (2, 2, 2) assert np.all(y2 == [[[111, 222], [333, 444]], [[555, 666], [777, 888]]]) def test_mixed_array_parameters_1d_array_input(self): t = TModel_1_1([[[0.01, 0.02, 0.03], [0.04, 0.05, 0.06]], [[0.07, 0.08, 0.09], [0.10, 0.11, 0.12]]], [[1, 2, 3], [4, 5, 6]], n_models=2) with pytest.raises(ValueError): y = t([10, 20, 30]) y = t([10, 20, 30], model_set_axis=False) assert np.shape(y) == (2, 2, 3) assert_allclose(y, [[[11.01, 22.02, 33.03], [11.04, 22.05, 33.06]], [[14.07, 25.08, 36.09], [14.10, 25.11, 36.12]]]) class TModel_1_2(FittableModel): inputs = ('x',) outputs = ('y', 'z') p1 = Parameter() p2 = Parameter() p3 = Parameter() @staticmethod def evaluate(x, p1, p2, p3): return (x + p1 + p2, x + p1 + p2 + p3) class TestSingleInputDoubleOutputSingleModel(object): """ A suite of tests to check various cases of parameter and input combinations on models with n_input = 1 but n_output = 2 on a toy model with n_models=1. As of writing there are not enough controls to adjust how outputs from such a model should be formatted (currently the shapes of outputs are assumed to be directly associated with the shapes of corresponding inputs when n_inputs == n_outputs). For now, the approach taken for cases like this is to assume all outputs should have the same format. """ def test_scalar_parameters_scalar_input(self): """ Scalar parameters with a scalar input should return a scalar. """ t = TModel_1_2(1, 10, 1000) y, z = t(100) assert isinstance(y, float) assert isinstance(z, float) assert np.ndim(y) == np.ndim(z) == 0 assert y == 111 assert z == 1111 def test_scalar_parameters_1d_array_input(self): """ Scalar parameters should broadcast with an array input to result in an array output of the same shape as the input. """ t = TModel_1_2(1, 10, 1000) y, z = t(np.arange(5) * 100) assert isinstance(y, np.ndarray) assert isinstance(z, np.ndarray) assert np.shape(y) == np.shape(z) == (5,) assert np.all(y == [11, 111, 211, 311, 411]) assert np.all(z == (y + 1000)) def test_scalar_parameters_2d_array_input(self): """ Scalar parameters should broadcast with an array input to result in an array output of the same shape as the input. """ t = TModel_1_2(1, 10, 1000) y, z = t(np.arange(6).reshape(2, 3) * 100) assert isinstance(y, np.ndarray) assert isinstance(z, np.ndarray) assert np.shape(y) == np.shape(z) == (2, 3) assert np.all(y == [[11, 111, 211], [311, 411, 511]]) assert np.all(z == (y + 1000)) def test_scalar_parameters_3d_array_input(self): """ Scalar parameters should broadcast with an array input to result in an array output of the same shape as the input. """ t = TModel_1_2(1, 10, 1000) y, z = t(np.arange(12).reshape(2, 3, 2) * 100) assert isinstance(y, np.ndarray) assert isinstance(z, np.ndarray) assert np.shape(y) == np.shape(z) == (2, 3, 2) assert np.all(y == [[[11, 111], [211, 311], [411, 511]], [[611, 711], [811, 911], [1011, 1111]]]) assert np.all(z == (y + 1000)) def test_1d_array_parameters_scalar_input(self): """ Array parameters should all be broadcastable with each other, and with a scalar input the output should be broadcast to the maximum dimensions of the parameters. """ t = TModel_1_2([1, 2], [10, 20], [1000, 2000]) y, z = t(100) assert isinstance(y, np.ndarray) assert isinstance(z, np.ndarray) assert np.shape(y) == np.shape(z) == (2,) assert np.all(y == [111, 122]) assert np.all(z == [1111, 2122]) def test_1d_array_parameters_1d_array_input(self): """ When given an array input it must be broadcastable with all the parameters. """ t = TModel_1_2([1, 2], [10, 20], [1000, 2000]) y1, z1 = t([100, 200]) assert np.shape(y1) == np.shape(z1) == (2,) assert np.all(y1 == [111, 222]) assert np.all(z1 == [1111, 2222]) y2, z2 = t([[100], [200]]) assert np.shape(y2) == np.shape(z2) == (2, 2) assert np.all(y2 == [[111, 122], [211, 222]]) assert np.all(z2 == [[1111, 2122], [1211, 2222]]) with pytest.raises(ValueError): # Doesn't broadcast y3, z3 = t([100, 200, 300]) def test_2d_array_parameters_2d_array_input(self): """ When given an array input it must be broadcastable with all the parameters. """ t = TModel_1_2([[1, 2], [3, 4]], [[10, 20], [30, 40]], [[1000, 2000], [3000, 4000]]) y1, z1 = t([[100, 200], [300, 400]]) assert np.shape(y1) == np.shape(z1) == (2, 2) assert np.all(y1 == [[111, 222], [333, 444]]) assert np.all(z1 == [[1111, 2222], [3333, 4444]]) y2, z2 = t([[[[100]], [[200]]], [[[300]], [[400]]]]) assert np.shape(y2) == np.shape(z2) == (2, 2, 2, 2) assert np.all(y2 == [[[[111, 122], [133, 144]], [[211, 222], [233, 244]]], [[[311, 322], [333, 344]], [[411, 422], [433, 444]]]]) assert np.all(z2 == [[[[1111, 2122], [3133, 4144]], [[1211, 2222], [3233, 4244]]], [[[1311, 2322], [3333, 4344]], [[1411, 2422], [3433, 4444]]]]) with pytest.raises(ValueError): # Doesn't broadcast y3, z3 = t([[100, 200, 300], [400, 500, 600]]) def test_mixed_array_parameters_1d_array_input(self): """ When given an array input it must be broadcastable with all the parameters. """ t = TModel_1_2([[[0.01, 0.02, 0.03], [0.04, 0.05, 0.06]], [[0.07, 0.08, 0.09], [0.10, 0.11, 0.12]]], [1, 2, 3], [100, 200, 300]) y1, z1 = t([10, 20, 30]) assert np.shape(y1) == np.shape(z1) == (2, 2, 3) assert_allclose(y1, [[[11.01, 22.02, 33.03], [11.04, 22.05, 33.06]], [[11.07, 22.08, 33.09], [11.10, 22.11, 33.12]]]) assert_allclose(z1, [[[111.01, 222.02, 333.03], [111.04, 222.05, 333.06]], [[111.07, 222.08, 333.09], [111.10, 222.11, 333.12]]]) y2, z2 = t([[[[10]]], [[[20]]], [[[30]]]]) assert np.shape(y2) == np.shape(z2) == (3, 2, 2, 3) assert_allclose(y2, [[[[11.01, 12.02, 13.03], [11.04, 12.05, 13.06]], [[11.07, 12.08, 13.09], [11.10, 12.11, 13.12]]], [[[21.01, 22.02, 23.03], [21.04, 22.05, 23.06]], [[21.07, 22.08, 23.09], [21.10, 22.11, 23.12]]], [[[31.01, 32.02, 33.03], [31.04, 32.05, 33.06]], [[31.07, 32.08, 33.09], [31.10, 32.11, 33.12]]]]) assert_allclose(z2, [[[[111.01, 212.02, 313.03], [111.04, 212.05, 313.06]], [[111.07, 212.08, 313.09], [111.10, 212.11, 313.12]]], [[[121.01, 222.02, 323.03], [121.04, 222.05, 323.06]], [[121.07, 222.08, 323.09], [121.10, 222.11, 323.12]]], [[[131.01, 232.02, 333.03], [131.04, 232.05, 333.06]], [[131.07, 232.08, 333.09], [131.10, 232.11, 333.12]]]]) class TInputFormatter(Model): """ A toy model to test input/output formatting. """ inputs = ('x', 'y') outputs = ('x', 'y') @staticmethod def evaluate(x, y): return x, y def test_format_input_scalars(): model = TInputFormatter() result = model(1, 2) assert result == (1, 2) def test_format_input_arrays(): model = TInputFormatter() result = model([1, 1], [2, 2]) assert_allclose(result, (np.array([1, 1]), np.array([2, 2]))) def test_format_input_arrays_transposed(): model = TInputFormatter() input = np.array([[1, 1]]).T, np.array([[2, 2]]).T result = model(*input) assert_allclose(result, input) astropy-1.1.1/astropy/modeling/tests/test_constraints.py0000644001134200020070000003573512640262015024553 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import types from ..core import Fittable1DModel from ..parameters import Parameter from .. import models from .. import fitting import numpy as np from numpy.testing import utils from numpy.random import RandomState from ...tests.helper import pytest from .utils import ignore_non_integer_warning try: from scipy import optimize HAS_SCIPY = True except ImportError: HAS_SCIPY = False class TestNonLinearConstraints(object): def setup_class(self): self.g1 = models.Gaussian1D(10, 14.9, stddev=.3) self.g2 = models.Gaussian1D(10, 13, stddev=.4) self.x = np.arange(10, 20, .1) self.y1 = self.g1(self.x) self.y2 = self.g2(self.x) rsn = RandomState(1234567890) self.n = rsn.randn(100) self.ny1 = self.y1 + 2 * self.n self.ny2 = self.y2 + 2 * self.n @pytest.mark.skipif('not HAS_SCIPY') def test_fixed_par(self): g1 = models.Gaussian1D(10, mean=14.9, stddev=.3, fixed={'amplitude': True}) fitter = fitting.LevMarLSQFitter() model = fitter(g1, self.x, self.ny1) assert model.amplitude.value == 10 @pytest.mark.skipif('not HAS_SCIPY') def test_tied_par(self): def tied(model): mean = 50 * model.stddev return mean g1 = models.Gaussian1D(10, mean=14.9, stddev=.3, tied={'mean': tied}) fitter = fitting.LevMarLSQFitter() model = fitter(g1, self.x, self.ny1) utils.assert_allclose(model.mean.value, 50 * model.stddev, rtol=10 ** (-5)) @pytest.mark.skipif('not HAS_SCIPY') def test_joint_fitter(self): g1 = models.Gaussian1D(10, 14.9, stddev=.3) g2 = models.Gaussian1D(10, 13, stddev=.4) jf = fitting.JointFitter([g1, g2], {g1: ['amplitude'], g2: ['amplitude']}, [9.8]) x = np.arange(10, 20, .1) y1 = g1(x) y2 = g2(x) n = np.random.randn(100) ny1 = y1 + 2 * n ny2 = y2 + 2 * n jf(x, ny1, x, ny2) p1 = [14.9, .3] p2 = [13, .4] A = 9.8 p = np.r_[A, p1, p2] def compmodel(A, p, x): return A * np.exp(-0.5 / p[1] ** 2 * (x - p[0]) ** 2) def errf(p, x1, y1, x2, y2): return np.ravel( np.r_[compmodel(p[0], p[1:3], x1) - y1, compmodel(p[0], p[3:], x2) - y2]) fitparams, _ = optimize.leastsq(errf, p, args=(x, ny1, x, ny2)) utils.assert_allclose(jf.fitparams, fitparams, rtol=10 ** (-5)) utils.assert_allclose(g1.amplitude.value, g2.amplitude.value) @pytest.mark.skipif('not HAS_SCIPY') def test_no_constraints(self): g1 = models.Gaussian1D(9.9, 14.5, stddev=.3) def func(p, x): return p[0] * np.exp(-0.5 / p[2] ** 2 * (x - p[1]) ** 2) def errf(p, x, y): return func(p, x) - y p0 = [9.9, 14.5, 0.3] y = g1(self.x) n = np.random.randn(100) ny = y + n fitpar, s = optimize.leastsq(errf, p0, args=(self.x, ny)) fitter = fitting.LevMarLSQFitter() model = fitter(g1, self.x, ny) utils.assert_allclose(model.parameters, fitpar, rtol=5 * 10 ** (-3)) @pytest.mark.skipif('not HAS_SCIPY') class TestBounds(object): def setup_class(self): A = -2.0 B = 0.5 self.x = np.linspace(-1.0, 1.0, 100) self.y = A * self.x + B + np.random.normal(scale=0.1, size=100) data = np.array([505.0, 556.0, 630.0, 595.0, 561.0, 553.0, 543.0, 496.0, 460.0, 469.0, 426.0, 518.0, 684.0, 798.0, 830.0, 794.0, 649.0, 706.0, 671.0, 545.0, 479.0, 454.0, 505.0, 700.0, 1058.0, 1231.0, 1325.0, 997.0, 1036.0, 884.0, 610.0, 487.0, 453.0, 527.0, 780.0, 1094.0, 1983.0, 1993.0, 1809.0, 1525.0, 1056.0, 895.0, 604.0, 466.0, 510.0, 678.0, 1130.0, 1986.0, 2670.0, 2535.0, 1878.0, 1450.0, 1200.0, 663.0, 511.0, 474.0, 569.0, 848.0, 1670.0, 2611.0, 3129.0, 2507.0, 1782.0, 1211.0, 723.0, 541.0, 511.0, 518.0, 597.0, 1137.0, 1993.0, 2925.0, 2438.0, 1910.0, 1230.0, 738.0, 506.0, 461.0, 486.0, 597.0, 733.0, 1262.0, 1896.0, 2342.0, 1792.0, 1180.0, 667.0, 482.0, 454.0, 482.0, 504.0, 566.0, 789.0, 1194.0, 1545.0, 1361.0, 933.0, 562.0, 418.0, 463.0, 435.0, 466.0, 528.0, 487.0, 664.0, 799.0, 746.0, 550.0, 478.0, 535.0, 443.0, 416.0, 439.0, 472.0, 472.0, 492.0, 523.0, 569.0, 487.0, 441.0, 428.0]) self.data = data.reshape(11, 11) def test_bounds_lsq(self): guess_slope = 1.1 guess_intercept = 0.0 bounds = {'slope': (-1.5, 5.0), 'intercept': (-1.0, 1.0)} line_model = models.Linear1D(guess_slope, guess_intercept, bounds=bounds) fitter = fitting.LevMarLSQFitter() model = fitter(line_model, self.x, self.y) slope = model.slope.value intercept = model.intercept.value assert slope + 10 ** -5 >= bounds['slope'][0] assert slope - 10 ** -5 <= bounds['slope'][1] assert intercept + 10 ** -5 >= bounds['intercept'][0] assert intercept - 10 ** -5 <= bounds['intercept'][1] def test_bounds_slsqp(self): guess_slope = 1.1 guess_intercept = 0.0 bounds = {'slope': (-1.5, 5.0), 'intercept': (-1.0, 1.0)} line_model = models.Linear1D(guess_slope, guess_intercept, bounds=bounds) fitter = fitting.SLSQPLSQFitter() with ignore_non_integer_warning(): model = fitter(line_model, self.x, self.y) slope = model.slope.value intercept = model.intercept.value assert slope + 10 ** -5 >= bounds['slope'][0] assert slope - 10 ** -5 <= bounds['slope'][1] assert intercept + 10 ** -5 >= bounds['intercept'][0] assert intercept - 10 ** -5 <= bounds['intercept'][1] def test_bounds_gauss2d_lsq(self): X, Y = np.meshgrid(np.arange(11), np.arange(11)) bounds = {"x_mean": [0., 11.], "y_mean": [0., 11.], "x_stddev": [1., 4], "y_stddev": [1., 4]} gauss = models.Gaussian2D(amplitude=10., x_mean=5., y_mean=5., x_stddev=4., y_stddev=4., theta=0.5, bounds=bounds) gauss_fit = fitting.LevMarLSQFitter() model = gauss_fit(gauss, X, Y, self.data) x_mean = model.x_mean.value y_mean = model.y_mean.value x_stddev = model.x_stddev.value y_stddev = model.y_stddev.value assert x_mean + 10 ** -5 >= bounds['x_mean'][0] assert x_mean - 10 ** -5 <= bounds['x_mean'][1] assert y_mean + 10 ** -5 >= bounds['y_mean'][0] assert y_mean - 10 ** -5 <= bounds['y_mean'][1] assert x_stddev + 10 ** -5 >= bounds['x_stddev'][0] assert x_stddev - 10 ** -5 <= bounds['x_stddev'][1] assert y_stddev + 10 ** -5 >= bounds['y_stddev'][0] assert y_stddev - 10 ** -5 <= bounds['y_stddev'][1] def test_bounds_gauss2d_slsqp(self): X, Y = np.meshgrid(np.arange(11), np.arange(11)) bounds = {"x_mean": [0., 11.], "y_mean": [0., 11.], "x_stddev": [1., 4], "y_stddev": [1., 4]} gauss = models.Gaussian2D(amplitude=10., x_mean=5., y_mean=5., x_stddev=4., y_stddev=4., theta=0.5, bounds=bounds) gauss_fit = fitting.SLSQPLSQFitter() with ignore_non_integer_warning(): model = gauss_fit(gauss, X, Y, self.data) x_mean = model.x_mean.value y_mean = model.y_mean.value x_stddev = model.x_stddev.value y_stddev = model.y_stddev.value assert x_mean + 10 ** -5 >= bounds['x_mean'][0] assert x_mean - 10 ** -5 <= bounds['x_mean'][1] assert y_mean + 10 ** -5 >= bounds['y_mean'][0] assert y_mean - 10 ** -5 <= bounds['y_mean'][1] assert x_stddev + 10 ** -5 >= bounds['x_stddev'][0] assert x_stddev - 10 ** -5 <= bounds['x_stddev'][1] assert y_stddev + 10 ** -5 >= bounds['y_stddev'][0] assert y_stddev - 10 ** -5 <= bounds['y_stddev'][1] class TestLinearConstraints(object): def setup_class(self): self.p1 = models.Polynomial1D(4) self.p1.c0 = 0 self.p1.c1 = 0 self.p1.window = [0., 9.] self.x = np.arange(10) self.y = self.p1(self.x) rsn = RandomState(1234567890) self.n = rsn.randn(10) self.ny = self.y + self.n def test(self): self.p1.c0.fixed = True self.p1.c1.fixed = True pfit = fitting.LinearLSQFitter() model = pfit(self.p1, self.x, self.y) utils.assert_allclose(self.y, model(self.x)) # Test constraints as parameter properties def test_set_fixed_1(): gauss = models.Gaussian1D(amplitude=20, mean=2, stddev=1) gauss.mean.fixed = True assert gauss.fixed == {'amplitude': False, 'mean': True, 'stddev': False} def test_set_fixed_2(): gauss = models.Gaussian1D(amplitude=20, mean=2, stddev=1, fixed={'mean': True}) assert gauss.mean.fixed is True def test_set_tied_1(): def tie_amplitude(model): return 50 * model.stddev gauss = models.Gaussian1D(amplitude=20, mean=2, stddev=1) gauss.amplitude.tied = tie_amplitude assert gauss.amplitude.tied is not False assert isinstance(gauss.tied['amplitude'], types.FunctionType) def test_set_tied_2(): def tie_amplitude(model): return 50 * model.stddev gauss = models.Gaussian1D(amplitude=20, mean=2, stddev=1, tied={'amplitude': tie_amplitude}) assert gauss.amplitude.tied != False def test_unset_fixed(): gauss = models.Gaussian1D(amplitude=20, mean=2, stddev=1, fixed={'mean': True}) gauss.mean.fixed = False assert gauss.fixed == {'amplitude': False, 'mean': False, 'stddev': False} def test_unset_tied(): def tie_amplitude(model): return 50 * model.stddev gauss = models.Gaussian1D(amplitude=20, mean=2, stddev=1, tied={'amplitude': tie_amplitude}) gauss.amplitude.tied = False assert gauss.tied == {'amplitude': False, 'mean': False, 'stddev': False} def test_set_bounds_1(): gauss = models.Gaussian1D(amplitude=20, mean=2, stddev=1, bounds={'stddev': (0, None)}) assert gauss.bounds == {'amplitude': (None, None), 'mean': (None, None), 'stddev': (0.0, None)} def test_set_bounds_2(): gauss = models.Gaussian1D(amplitude=20, mean=2, stddev=1) gauss.stddev.min = 0. assert gauss.bounds == {'amplitude': (None, None), 'mean': (None, None), 'stddev': (0.0, None)} def test_unset_bounds(): gauss = models.Gaussian1D(amplitude=20, mean=2, stddev=1, bounds={'stddev': (0, 2)}) gauss.stddev.min = None gauss.stddev.max = None assert gauss.bounds == {'amplitude': (None, None), 'mean': (None, None), 'stddev': (None, None)} def test_default_constraints(): """Regression test for https://github.com/astropy/astropy/issues/2396 Ensure that default constraints defined on parameters are carried through to instances of the models those parameters are defined for. """ class MyModel(Fittable1DModel): a = Parameter(default=1) b = Parameter(default=0, min=0, fixed=True) @staticmethod def evaluate(x, a, b): return x * a + b assert MyModel.a.default == 1 assert MyModel.b.default == 0 assert MyModel.b.min == 0 assert MyModel.b.bounds == (0, None) assert MyModel.b.fixed is True m = MyModel() assert m.a.value == 1 assert m.b.value == 0 assert m.b.min == 0 assert m.b.bounds == (0, None) assert m.b.fixed is True assert m.bounds == {'a': (None, None), 'b': (0, None)} assert m.fixed == {'a': False, 'b': True} # Make a model instance that overrides the default constraints and values m = MyModel(3, 4, bounds={'a': (1, None), 'b': (2, None)}, fixed={'a': True, 'b': False}) assert m.a.value == 3 assert m.b.value == 4 assert m.a.min == 1 assert m.b.min == 2 assert m.a.bounds == (1, None) assert m.b.bounds == (2, None) assert m.a.fixed is True assert m.b.fixed is False assert m.bounds == {'a': (1, None), 'b': (2, None)} assert m.fixed == {'a': True, 'b': False} @pytest.mark.skipif('not HAS_SCIPY') def test_fit_with_fixed_and_bound_constraints(): """ Regression test for https://github.com/astropy/astropy/issues/2235 Currently doesn't test that the fit is any *good*--just that parameters stay within their given constraints. """ m = models.Gaussian1D(amplitude=3, mean=4, stddev=1, bounds={'mean': (4, 5)}, fixed={'amplitude': True}) x = np.linspace(0, 10, 10) y = np.exp(-x ** 2 / 2) f = fitting.LevMarLSQFitter() fitted_1 = f(m, x, y) assert fitted_1.mean >= 4 assert fitted_1.mean <= 5 assert fitted_1.amplitude == 3.0 m.amplitude.fixed = False fitted_2 = f(m, x, y) # It doesn't matter anymore what the amplitude ends up as so long as the # bounds constraint was still obeyed assert fitted_1.mean >= 4 assert fitted_1.mean <= 5 @pytest.mark.skipif('not HAS_SCIPY') def test_fit_with_bound_constraints_estimate_jacobian(): """ Regression test for https://github.com/astropy/astropy/issues/2400 Checks that bounds constraints are obeyed on a custom model that does not define fit_deriv (and thus its Jacobian must be estimated for non-linear fitting). """ class MyModel(Fittable1DModel): a = Parameter(default=1) b = Parameter(default=2) @staticmethod def evaluate(x, a, b): return a * x + b m_real = MyModel(a=1.5, b=-3) x = np.arange(100) y = m_real(x) m = MyModel() f = fitting.LevMarLSQFitter() fitted_1 = f(m, x, y) # This fit should be trivial so even without constraints on the bounds it # should be right assert np.allclose(fitted_1.a, 1.5) assert np.allclose(fitted_1.b, -3) m2 = MyModel() m2.a.bounds = (-2, 2) f2 = fitting.LevMarLSQFitter() fitted_2 = f2(m2, x, y) assert np.allclose(fitted_1.a, 1.5) assert np.allclose(fitted_1.b, -3) # Check that the estimated Jacobian was computed (it doesn't matter what # the values are so long as they're not all zero. assert np.any(f2.fit_info['fjac'] != 0) astropy-1.1.1/astropy/modeling/tests/irafutil.py0000644001134200020070000001602512640262015022753 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module provides functions to help with testing against iraf tasks """ from __future__ import (absolute_import, division, print_function, unicode_literals) from ...logger import log import numpy as np iraf_models_map = {1.: 'Chebyshev', 2.: 'Legendre', 3.: 'Spline3', 4.: 'Spline1'} def get_records(fname): """ Read the records of an IRAF database file into a python list Parameters ---------- fname : str name of an IRAF database file Returns ------- A list of records """ f = open(fname) dtb = f.read() f.close() recs = dtb.split('begin')[1:] records = [Record(r) for r in recs] return records def get_database_string(fname): """ Read an IRAF database file Parameters ---------- fname : str name of an IRAF database file Returns ------- the database file as a string """ f = open(fname) dtb = f.read() f.close() return dtb class Record(object): """ A base class for all records - represents an IRAF database record Attributes ---------- recstr: string the record as a string fields: dict the fields in the record taskname: string the name of the task which created the database file """ def __init__(self, recstr): self.recstr = recstr self.fields = self.get_fields() self.taskname = self.get_task_name() def aslist(self): reclist = self.recstr.split('\n') reclist = [l.strip() for l in reclist] [reclist.remove(l) for l in reclist if len(l) == 0] return reclist def get_fields(self): # read record fields as an array fields = {} flist = self.aslist() numfields = len(flist) for i in range(numfields): line = flist[i] if line and line[0].isalpha(): field = line.split() if i + 1 < numfields: if not flist[i + 1][0].isalpha(): fields[field[0]] = self.read_array_field( flist[i:i + int(field[1]) + 1]) else: fields[field[0]] = " ".join(s for s in field[1:]) else: fields[field[0]] = " ".join(s for s in field[1:]) else: continue return fields def get_task_name(self): try: return self.fields['task'] except KeyError: return None def read_array_field(self, fieldlist): # Turn an iraf record array field into a numpy array fieldline = [l.split() for l in fieldlist[1:]] # take only the first 3 columns # identify writes also strings at the end of some field lines xyz = [l[:3] for l in fieldline] try: farr = np.array(xyz) except: log.debug("Could not read array field %s" % fieldlist[0].split()[0]) return farr.astype(np.float64) class IdentifyRecord(Record): """ Represents a database record for the onedspec.identify task Attributes ---------- x: array the X values of the identified features this represents values on axis1 (image rows) y: int the Y values of the identified features (image columns) z: array the values which X maps into modelname: string the function used to fit the data nterms: int degree of the polynomial which was fit to the data in IRAF this is the number of coefficients, not the order mrange: list the range of the data coeff: array function (modelname) coefficients """ def __init__(self, recstr): super(IdentifyRecord, self).__init__(recstr) self._flatcoeff = self.fields['coefficients'].flatten() self.x = self.fields['features'][:, 0] self.y = self.get_ydata() self.z = self.fields['features'][:, 1] self.modelname = self.get_model_name() self.nterms = self.get_nterms() self.mrange = self.get_range() self.coeff = self.get_coeff() def get_model_name(self): return iraf_models_map[self._flatcoeff[0]] def get_nterms(self): return self._flatcoeff[1] def get_range(self): low = self._flatcoeff[2] high = self._flatcoeff[3] return [low, high] def get_coeff(self): return self._flatcoeff[4:] def get_ydata(self): image = self.fields['image'] left = image.find('[') + 1 right = image.find(']') section = image[left:right] if ',' in section: yind = image.find(',') + 1 return int(image[yind:-1]) else: return int(section) class FitcoordsRecord(Record): """ Represents a database record for the longslit.fitccords task Attributes ---------- modelname: string the function used to fit the data xorder: int number of terms in x yorder: int number of terms in y xbounds: list data range in x ybounds: list data range in y coeff: array function coefficients """ def __init__(self, recstr): super(FitcoordsRecord, self).__init__(recstr) self._surface = self.fields['surface'].flatten() self.modelname = iraf_models_map[self._surface[0]] self.xorder = self._surface[1] self.yorder = self._surface[2] self.xbounds = [self._surface[4], self._surface[5]] self.ybounds = [self._surface[6], self._surface[7]] self.coeff = self.get_coeff() def get_coeff(self): return self._surface[8:] class IDB(object): """ Base class for an IRAF identify database Attributes ---------- records: list a list of all `IdentifyRecord` in the database numrecords: int number of records """ def __init__(self, dtbstr): self.records = [IdentifyRecord(rstr) for rstr in self.aslist(dtbstr)] self.numrecords = len(self.records) def aslist(self, dtb): # return a list of records # if the first one is a comment remove it from the list rl = dtb.split('begin') try: rl0 = rl[0].split('\n') except: return rl if len(rl0) == 2 and rl0[0].startswith('#') and not rl0[1].strip(): return rl[1:] else: return rl class ReidentifyRecord(IDB): """ Represents a database record for the onedspec.reidentify task """ def __init__(self, databasestr): super(ReidentifyRecord, self).__init__(databasestr) self.x = np.array([r.x for r in self.records]) self.y = self.get_ydata() self.z = np.array([r.z for r in self.records]) def get_ydata(self): y = np.ones(self.x.shape) y = y * np.array([r.y for r in self.records])[:, np.newaxis] return y astropy-1.1.1/astropy/modeling/tests/example_models.py0000644001134200020070000002211712644017723024141 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Here are all the test parameters and values for the each `~astropy.modeling.FittableModel` defined. There is a dictionary for 1D and a dictionary for 2D models. Explanation of keywords of the dictionaries: "parameters" : list or dict Model parameters, the model is tested with. Make sure you keep the right order. For polynomials you can also use a dict to specify the coefficients. See examples below. "x_values" : list x values where the model is evaluated. "y_values" : list Reference y values for the in x_values given positions. "z_values" : list Reference z values for the in x_values and y_values given positions. (2D model option) "x_lim" : list x test range for the model fitter. Depending on the model this can differ e.g. the PowerLaw model should be tested over a few magnitudes. "y_lim" : list y test range for the model fitter. Depending on the model this can differ e.g. the PowerLaw model should be tested over a few magnitudes. (2D model option) "log_fit" : bool PowerLaw models should be tested over a few magnitudes. So log_fit should be true. "requires_scipy" : bool If a model requires scipy (Bessel functions etc.) set this flag. "integral" : float Approximate value of the integral in the range x_lim (and y_lim). "deriv_parameters" : list If given the test of the derivative will use these parameters to create a model (optional) "deriv_initial" : list If given the test of the derivative will use these parameters as initial values for the fit (optional) """ from __future__ import (absolute_import, division, print_function, unicode_literals) from ..functional_models import ( Gaussian1D, Sine1D, Box1D, Linear1D, Lorentz1D, MexicanHat1D, Trapezoid1D, Const1D, Moffat1D, Gaussian2D, Const2D, Box2D, MexicanHat2D, TrapezoidDisk2D, AiryDisk2D, Moffat2D, Disk2D, Ring2D, Sersic1D, Sersic2D, Voigt1D) from ..polynomial import Polynomial1D, Polynomial2D from ..powerlaws import ( PowerLaw1D, BrokenPowerLaw1D, ExponentialCutoffPowerLaw1D, LogParabola1D) import numpy as np #1D Models models_1D = { Gaussian1D: { 'parameters': [1, 0, 1], 'x_values': [0, np.sqrt(2), -np.sqrt(2)], 'y_values': [1.0, 0.367879, 0.367879], 'x_lim': [-10, 10], 'integral': np.sqrt(2 * np.pi) }, Sine1D: { 'parameters': [1, 0.1, 0], 'x_values': [0, 2.5], 'y_values': [0, 1], 'x_lim': [-10, 10], 'integral': 0 }, Box1D: { 'parameters': [1, 0, 10], 'x_values': [-5, 5, 0, -10, 10], 'y_values': [1, 1, 1, 0, 0], 'x_lim': [-10, 10], 'integral': 10 }, Linear1D: { 'parameters': [1, 0], 'x_values': [0, np.pi, 42, -1], 'y_values': [0, np.pi, 42, -1], 'x_lim': [-10, 10], 'integral': 0 }, Lorentz1D: { 'parameters': [1, 0, 1], 'x_values': [0, -1, 1, 0.5, -0.5], 'y_values': [1., 0.2, 0.2, 0.5, 0.5], 'x_lim': [-10, 10], 'integral': 1 }, MexicanHat1D: { 'parameters': [1, 0, 1], 'x_values': [0, 1, -1, 3, -3], 'y_values': [1.0, 0.0, 0.0, -0.088872, -0.088872], 'x_lim': [-20, 20], 'integral': 0 }, Trapezoid1D: { 'parameters': [1, 0, 2, 1], 'x_values': [0, 1, -1, 1.5, -1.5, 2, 2], 'y_values': [1, 1, 1, 0.5, 0.5, 0, 0], 'x_lim': [-10, 10], 'integral': 3 }, Const1D: { 'parameters': [1], 'x_values': [-1, 1, np.pi, -42., 0], 'y_values': [1, 1, 1, 1, 1], 'x_lim': [-10, 10], 'integral': 20 }, Moffat1D: { 'parameters': [1, 0, 1, 2], 'x_values': [0, 1, -1, 3, -3], 'y_values': [1.0, 0.25, 0.25, 0.01, 0.01], 'x_lim': [-10, 10], 'integral': 1, 'deriv_parameters': [23.4, 1.2, 2.1, 2.3], 'deriv_initial': [10, 1, 1, 1] }, PowerLaw1D: { 'parameters': [1, 1, 2], 'constraints': {'fixed': {'x_0': True}}, 'x_values': [1, 10, 100], 'y_values': [1.0, 0.01, 0.0001], 'x_lim': [1, 10], 'log_fit': True, 'integral': 0.99 }, BrokenPowerLaw1D: { 'parameters': [1, 1, 2, 3], 'constraints': {'fixed': {'x_break': True}}, 'x_values': [0.1, 1, 10, 100], 'y_values': [1e2, 1.0, 1e-3, 1e-6], 'x_lim': [0.1, 100], 'log_fit': True }, ExponentialCutoffPowerLaw1D: { 'parameters': [1, 1, 2, 3], 'constraints': {'fixed': {'x_0': True}}, 'x_values': [0.1, 1, 10, 100], 'y_values': [9.67216100e+01, 7.16531311e-01, 3.56739933e-04, 3.33823780e-19], 'x_lim': [0.01, 100], 'log_fit': True }, LogParabola1D: { 'parameters': [1, 2, 3, 0.1], 'constraints': {'fixed': {'x_0': True}}, 'x_values': [0.1, 1, 10, 100], 'y_values': [3.26089063e+03, 7.62472488e+00, 6.17440488e-03, 1.73160572e-06], 'x_lim': [0.1, 100], 'log_fit': True }, Polynomial1D: { 'parameters': {'degree': 2, 'c0': 1., 'c1': 1., 'c2': 1.}, 'x_values': [1, 10, 100], 'y_values': [3, 111, 10101], 'x_lim': [-3, 3] }, Sersic1D: { 'parameters': [1, 20, 4], 'x_values': [0.1, 1, 10, 100], 'y_values': [2.78629391e+02, 5.69791430e+01, 3.38788244e+00, 2.23941982e-02], 'requires_scipy': True, 'x_lim': [0,10], 'log_fit': True }, Voigt1D: { 'parameters': [0, 1, 0.5, 0.9], 'x_values': [0, 2, 4, 8, 10], 'y_values': [0.520935, 0.017205, 0.003998, 0.000983, 0.000628], 'x_lim': [-3, 3] } } # 2D Models models_2D = { Gaussian2D: { 'parameters': [1, 0, 0, 1, 1], 'constraints': {'fixed': {'theta': True}}, 'x_values': [0, np.sqrt(2), -np.sqrt(2)], 'y_values': [0, np.sqrt(2), -np.sqrt(2)], 'z_values': [1, 1. / np.exp(1) ** 2, 1. / np.exp(1) ** 2], 'x_lim': [-10, 10], 'y_lim': [-10, 10], 'integral': 2 * np.pi, 'deriv_parameters': [137., 5.1, 5.4, 1.5, 2., np.pi/4], 'deriv_initial': [10, 5, 5, 4, 4, .5] }, Const2D: { 'parameters': [1], 'x_values': [-1, 1, np.pi, -42., 0], 'y_values': [0, 1, 42, np.pi, -1], 'z_values': [1, 1, 1, 1, 1], 'x_lim': [-10, 10], 'y_lim': [-10, 10], 'integral': 400 }, Box2D: { 'parameters': [1, 0, 0, 10, 10], 'x_values': [-5, 5, -5, 5, 0, -10, 10], 'y_values': [-5, 5, 0, 0, 0, -10, 10], 'z_values': [1, 1, 1, 1, 1, 0, 0], 'x_lim': [-10, 10], 'y_lim': [-10, 10], 'integral': 100 }, MexicanHat2D: { 'parameters': [1, 0, 0, 1], 'x_values': [0, 0, 0, 0, 0, 1, -1, 3, -3], 'y_values': [0, 1, -1, 3, -3, 0, 0, 0, 0], 'z_values': [1.0, 0.303265, 0.303265, -0.038881, -0.038881, 0.303265, 0.303265, -0.038881, -0.038881], 'x_lim': [-10, 11], 'y_lim': [-10, 11], 'integral': 0 }, TrapezoidDisk2D: { 'parameters': [1, 0, 0, 1, 1], 'x_values': [0, 0.5, 0, 1.5], 'y_values': [0, 0.5, 1.5, 0], 'z_values': [1, 1, 0.5, 0.5], 'x_lim': [-3, 3], 'y_lim': [-3, 3] }, AiryDisk2D: { 'parameters': [7, 0, 0, 10], 'x_values': [0, 1, -1, -0.5, -0.5], 'y_values': [0, -1, 0.5, 0.5, -0.5], 'z_values': [7., 6.50158267, 6.68490643, 6.87251093, 6.87251093], 'x_lim': [-10, 10], 'y_lim': [-10, 10], 'requires_scipy': True }, Moffat2D: { 'parameters': [1, 0, 0, 1, 2], 'x_values': [0, 1, -1, 3, -3], 'y_values': [0, -1, 3, 1, -3], 'z_values': [1.0, 0.111111, 0.008264, 0.008264, 0.00277], 'x_lim': [-3, 3], 'y_lim': [-3, 3] }, Polynomial2D: { 'parameters': {'degree': 1, 'c0_0': 1., 'c1_0': 1., 'c0_1': 1.}, 'x_values': [1, 2, 3], 'y_values': [1, 3, 2], 'z_values': [3, 6, 6], 'x_lim': [1, 100], 'y_lim': [1, 100] }, Disk2D: { 'parameters': [1, 0, 0, 5], 'x_values': [-5, 5, -5, 5, 0, -10, 10], 'y_values': [-5, 5, 0, 0, 0, -10, 10], 'z_values': [0, 0, 1, 1, 1, 0, 0], 'x_lim': [-10, 10], 'y_lim': [-10, 10], 'integral': np.pi * 5 ** 2 }, Ring2D: { 'parameters': [1, 0, 0, 5, 5], 'x_values': [-5, 5, -5, 5, 0, -10, 10], 'y_values': [-5, 5, 0, 0, 0, -10, 10], 'z_values': [1, 1, 1, 1, 0, 0, 0], 'x_lim': [-10, 10], 'y_lim': [-10, 10], 'integral': np.pi * (10 ** 2 - 5 ** 2) }, Sersic2D: { 'parameters': [1, 25, 4, 50, 50, 0.5, -1], 'x_values': [0.0, 1, 10, 100], 'y_values': [1, 100, 0.0, 10], 'z_values': [1.686398e-02, 9.095221e-02, 2.341879e-02, 9.419231e-02], 'requires_scipy': True, 'x_lim': [1, 1e10], 'y_lim': [1, 1e10] } } astropy-1.1.1/astropy/modeling/tests/__init__.py0000644001134200020070000000000012602615522022660 0ustar embrayscience00000000000000astropy-1.1.1/astropy/modeling/tests/test_models.py0000644001134200020070000005362412644017723023474 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests for model evaluation. Compare the results of some models with other programs. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import types try: import cPickle as pickle except ImportError: import pickle import numpy as np from numpy.testing import utils from .example_models import models_1D, models_2D from .. import (fitting, models, LabeledInput, SerialCompositeModel, SummedCompositeModel) from ..core import FittableModel from ..polynomial import PolynomialBase from ...tests.helper import pytest from ...extern import six try: from scipy import optimize # pylint: disable=W0611 HAS_SCIPY = True except ImportError: HAS_SCIPY = False class TestSerialComposite(object): """ Test composite models evaluation in series """ def setup_class(self): self.y, self.x = np.mgrid[:5, :5] self.p1 = models.Polynomial1D(3) self.p11 = models.Polynomial1D(3) self.p2 = models.Polynomial2D(3) def test_single_array_input(self): model = SerialCompositeModel([self.p1, self.p11]) result = model(self.x) xx = self.p11(self.p1(self.x)) utils.assert_almost_equal(xx, result) def test_labeledinput_1(self): labeled_input = LabeledInput([self.x, self.y], ['x', 'y']) model = SerialCompositeModel([self.p2, self.p1], [['x', 'y'], ['z']], [['z'], ['z']]) result = model(labeled_input) z = self.p2(self.x, self.y) z1 = self.p1(z) utils.assert_almost_equal(z1, result.z) def test_labeledinput_2(self): labeled_input = LabeledInput([self.x, self.y], ['x', 'y']) rot = models.Rotation2D(angle=23.4) offx = models.Shift(-2) offy = models.Shift(1.2) model = SerialCompositeModel([rot, offx, offy], [['x', 'y'], ['x'], ['y']], [['x', 'y'], ['x'], ['y']]) result = model(labeled_input) x, y = rot(self.x, self.y) x = offx(x) y = offy(y) utils.assert_almost_equal(x, result.x) utils.assert_almost_equal(y, result.y) def test_labeledinput_3(self): labeled_input = LabeledInput([2, 4.5], ['x', 'y']) rot = models.Rotation2D(angle=23.4) offx = models.Shift(-2) offy = models.Shift(1.2) model = SerialCompositeModel([rot, offx, offy], [['x', 'y'], ['x'], ['y']], [['x', 'y'], ['x'], ['y']]) result = model(labeled_input) x, y = rot(2, 4.5) x = offx(x) y = offy(y) utils.assert_almost_equal(x, result.x) utils.assert_almost_equal(y, result.y) def test_multiple_input(self): rot = models.Rotation2D(angle=-60) model = SerialCompositeModel([rot, rot]) xx, yy = model(self.x, self.y) x1, y1 = model.inverse(xx, yy) utils.assert_almost_equal(x1, self.x) utils.assert_almost_equal(y1, self.y) class TestSummedComposite(object): """Test legacy composite models evaluation.""" def setup_class(self): self.x = np.linspace(1, 10, 100) self.y = np.linspace(1, 10, 100) self.p1 = models.Polynomial1D(3) self.p11 = models.Polynomial1D(3) self.p2 = models.Polynomial2D(3) self.p1.parameters = [1.4, 2.2, 3.1, 4] self.p2.c0_0 = 100 def test_single_array_input(self): model = SummedCompositeModel([self.p1, self.p11]) result = model(self.x) delta11 = self.p11(self.x) delta1 = self.p1(self.x) xx = delta1 + delta11 utils.assert_almost_equal(xx, result) def test_labeledinput(self): labeled_input = LabeledInput([self.x, self.y], ['x', 'y']) model = SummedCompositeModel([self.p1, self.p11], inmap=['x'], outmap=['x']) result = model(labeled_input) delta11 = self.p11(self.x) delta1 = self.p1(self.x) xx = delta1 + delta11 utils.assert_almost_equal(xx, result.x) def test_inputs_outputs_mismatch(self): p2 = models.Polynomial2D(1) ch2 = models.Chebyshev2D(1, 1) with pytest.raises(ValueError): SummedCompositeModel([p2, ch2]) def test_pickle(): p1 = models.Polynomial1D(3) p11 = models.Polynomial1D(4) g1 = models.Gaussian1D(10.3, 5.4, 1.2) serial_composite_model = SerialCompositeModel([p1, g1]) parallel_composite_model = SummedCompositeModel([serial_composite_model, p11]) s = pickle.dumps(parallel_composite_model) s1 = pickle.loads(s) assert s1(3) == parallel_composite_model(3) @pytest.mark.skipif('not HAS_SCIPY') def test_custom_model(amplitude=4, frequency=1): def sine_model(x, amplitude=4, frequency=1): """ Model function """ return amplitude * np.sin(2 * np.pi * frequency * x) def sine_deriv(x, amplitude=4, frequency=1): """ Jacobian of model function, e.g. derivative of the function with respect to the *parameters* """ da = np.sin(2 * np.pi * frequency * x) df = 2 * np.pi * x * amplitude * np.cos(2 * np.pi * frequency * x) return np.vstack((da, df)) SineModel = models.custom_model_1d(sine_model, func_fit_deriv=sine_deriv) x = np.linspace(0, 4, 50) sin_model = SineModel() y = sin_model.evaluate(x, 5., 2.) y_prime = sin_model.fit_deriv(x, 5., 2.) np.random.seed(0) data = sin_model(x) + np.random.rand(len(x)) - 0.5 fitter = fitting.LevMarLSQFitter() model = fitter(sin_model, x, data) assert np.all((np.array([model.amplitude.value, model.frequency.value]) - np.array([amplitude, frequency])) < 0.001) def test_custom_model_init(): @models.custom_model_1d def SineModel(x, amplitude=4, frequency=1): """Model function""" return amplitude * np.sin(2 * np.pi * frequency * x) sin_model = SineModel(amplitude=2., frequency=0.5) assert sin_model.amplitude == 2. assert sin_model.frequency == 0.5 def test_custom_model_defaults(): @models.custom_model_1d def SineModel(x, amplitude=4, frequency=1): """Model function""" return amplitude * np.sin(2 * np.pi * frequency * x) sin_model = SineModel() assert SineModel.amplitude.default == 4 assert SineModel.frequency.default == 1 assert sin_model.amplitude == 4 assert sin_model.frequency == 1 def test_custom_model_bounding_box(): """Test bounding box evaluation for a 3D model""" def ellipsoid(x, y, z, x0=13, y0=10, z0=8, a=4, b=3, c=2, amp=1): rsq = ((x - x0) / a) ** 2 + ((y - y0) / b) ** 2 + ((z - z0) / c) ** 2 val = (rsq < 1) * amp return val class Ellipsoid3D(models.custom_model(ellipsoid)): @property def bounding_box(self): return ((self.z0 - self.c, self.z0 + self.c), (self.y0 - self.b, self.y0 + self.b), (self.x0 - self.a, self.x0 + self.a)) model = Ellipsoid3D() bbox = model.bounding_box zlim, ylim, xlim = bbox dz, dy, dx = np.diff(bbox) / 2 z1, y1, x1 = np.mgrid[slice(zlim[0], zlim[1] + 1), slice(ylim[0], ylim[1] + 1), slice(xlim[0], xlim[1] + 1)] z2, y2, x2 = np.mgrid[slice(zlim[0] - dz, zlim[1] + dz + 1), slice(ylim[0] - dy, ylim[1] + dy + 1), slice(xlim[0] - dx, xlim[1] + dx + 1)] arr = model(x2, y2, z2) sub_arr = model(x1, y1, z1) # check for flux agreement assert abs(arr.sum() - sub_arr.sum()) < arr.sum() * 1e-7 class Fittable2DModelTester(object): """ Test class for all two dimensional parametric models. Test values have to be defined in example_models.py. It currently test the model with different input types, evaluates the model at different positions and assures that it gives the correct values. And tests if the model works with non-linear fitters. This can be used as a base class for user defined model testing. """ def setup_class(self): self.N = 100 self.M = 100 self.eval_error = 0.0001 self.fit_error = 0.1 self.x = 5.3 self.y = 6.7 self.x1 = np.arange(1, 10, .1) self.y1 = np.arange(1, 10, .1) self.y2, self.x2 = np.mgrid[:10, :8] def test_input2D(self, model_class, test_parameters): """Test model with different input types.""" model = create_model(model_class, test_parameters) model(self.x, self.y) model(self.x1, self.y1) model(self.x2, self.y2) def test_eval2D(self, model_class, test_parameters): """Test model values add certain given points""" model = create_model(model_class, test_parameters) x = test_parameters['x_values'] y = test_parameters['y_values'] z = test_parameters['z_values'] assert np.all((np.abs(model(x, y) - z) < self.eval_error)) def test_bounding_box2D(self, model_class, test_parameters): """Test bounding box evaluation""" model = create_model(model_class, test_parameters) # testing setter model.bounding_box = ((-5, 5), (-5, 5)) assert model.bounding_box == ((-5, 5), (-5, 5)) model.bounding_box = None with pytest.raises(NotImplementedError): model.bounding_box # test the exception of dimensions don't match with pytest.raises(ValueError): model.bounding_box = (-5, 5) del model.bounding_box try: bbox = model.bounding_box except NotImplementedError: pytest.skip("Bounding_box is not defined for model.") ylim, xlim = bbox dy, dx = np.diff(bbox)/2 y1, x1 = np.mgrid[slice(ylim[0], ylim[1] + 1), slice(xlim[0], xlim[1] + 1)] y2, x2 = np.mgrid[slice(ylim[0] - dy, ylim[1] + dy + 1), slice(xlim[0] - dx, xlim[1] + dx + 1)] arr = model(x2, y2) sub_arr = model(x1, y1) # check for flux agreement assert abs(arr.sum() - sub_arr.sum()) < arr.sum() * 1e-7 @pytest.mark.skipif('not HAS_SCIPY') def test_fitter2D(self, model_class, test_parameters): """Test if the parametric model works with the fitter.""" x_lim = test_parameters['x_lim'] y_lim = test_parameters['y_lim'] parameters = test_parameters['parameters'] model = create_model(model_class, test_parameters) if isinstance(parameters, dict): parameters = [parameters[name] for name in model.param_names] if "log_fit" in test_parameters: if test_parameters['log_fit']: x = np.logspace(x_lim[0], x_lim[1], self.N) y = np.logspace(y_lim[0], y_lim[1], self.N) else: x = np.linspace(x_lim[0], x_lim[1], self.N) y = np.linspace(y_lim[0], y_lim[1], self.N) xv, yv = np.meshgrid(x, y) np.random.seed(0) # add 10% noise to the amplitude noise = np.random.rand(self.N, self.N) - 0.5 data = model(xv, yv) + 0.1 * parameters[0] * noise fitter = fitting.LevMarLSQFitter() new_model = fitter(model, xv, yv, data) params = [getattr(new_model, name) for name in new_model.param_names] fixed = [param.fixed for param in params] expected = np.array([val for val, fixed in zip(parameters, fixed) if not fixed]) fitted = np.array([param.value for param in params if not param.fixed]) utils.assert_allclose(fitted, expected, atol=self.fit_error) @pytest.mark.skipif('not HAS_SCIPY') def test_deriv_2D(self, model_class, test_parameters): """ Test the derivative of a model by fitting with an estimated and analytical derivative. """ x_lim = test_parameters['x_lim'] y_lim = test_parameters['y_lim'] if model_class.fit_deriv is None: pytest.skip("Derivative function is not defined for model.") if issubclass(model_class, PolynomialBase): pytest.skip("Skip testing derivative of polynomials.") if "log_fit" in test_parameters: if test_parameters['log_fit']: x = np.logspace(x_lim[0], x_lim[1], self.N) y = np.logspace(y_lim[0], y_lim[1], self.M) else: x = np.linspace(x_lim[0], x_lim[1], self.N) y = np.linspace(y_lim[0], y_lim[1], self.M) xv, yv = np.meshgrid(x, y) try: model_with_deriv = create_model(model_class, test_parameters, use_constraints=False, parameter_key='deriv_initial') model_no_deriv = create_model(model_class, test_parameters, use_constraints=False, parameter_key='deriv_initial') model = create_model(model_class, test_parameters, use_constraints=False, parameter_key='deriv_initial') except KeyError: model_with_deriv = create_model(model_class, test_parameters, use_constraints=False) model_no_deriv = create_model(model_class, test_parameters, use_constraints=False) model = create_model(model_class, test_parameters, use_constraints=False) # add 10% noise to the amplitude rsn = np.random.RandomState(1234567890) amplitude = test_parameters['parameters'][0] n = 0.1 * amplitude * (rsn.rand(self.M, self.N) - 0.5) data = model(xv, yv) + n fitter_with_deriv = fitting.LevMarLSQFitter() new_model_with_deriv = fitter_with_deriv(model_with_deriv, xv, yv, data) fitter_no_deriv = fitting.LevMarLSQFitter() new_model_no_deriv = fitter_no_deriv(model_no_deriv, xv, yv, data, estimate_jacobian=True) utils.assert_allclose(new_model_with_deriv.parameters, new_model_no_deriv.parameters, rtol=0.1) class Fittable1DModelTester(object): """ Test class for all one dimensional parametric models. Test values have to be defined in example_models.py. It currently test the model with different input types, evaluates the model at different positions and assures that it gives the correct values. And tests if the model works with non-linear fitters. This can be used as a base class for user defined model testing. """ def setup_class(self): self.N = 100 self.M = 100 self.eval_error = 0.0001 self.fit_error = 0.1 self.x = 5.3 self.y = 6.7 self.x1 = np.arange(1, 10, .1) self.y1 = np.arange(1, 10, .1) self.y2, self.x2 = np.mgrid[:10, :8] def test_input1D(self, model_class, test_parameters): """Test model with different input types.""" model = create_model(model_class, test_parameters) model(self.x) model(self.x1) model(self.x2) def test_eval1D(self, model_class, test_parameters): """ Test model values at certain given points """ model = create_model(model_class, test_parameters) x = test_parameters['x_values'] y = test_parameters['y_values'] utils.assert_allclose(model(x), y, atol=self.eval_error) def test_bounding_box1D(self, model_class, test_parameters): """Test bounding box evaluation""" model = create_model(model_class, test_parameters) # testing setter model.bounding_box = (-5, 5) model.bounding_box = None with pytest.raises(NotImplementedError): model.bounding_box del model.bounding_box # test exception if dimensions don't match with pytest.raises(ValueError): model.bounding_box = 5 try: bbox = model.bounding_box except NotImplementedError: pytest.skip("Bounding_box is not defined for model.") dx = np.diff(bbox) / 2 x1 = np.mgrid[slice(bbox[0], bbox[1] + 1)] x2 = np.mgrid[slice(bbox[0] - dx, bbox[1] + dx + 1)] arr = model(x2) sub_arr = model(x1) # check for flux agreement assert abs(arr.sum() - sub_arr.sum()) < arr.sum() * 1e-7 @pytest.mark.skipif('not HAS_SCIPY') def test_fitter1D(self, model_class, test_parameters): """ Test if the parametric model works with the fitter. """ x_lim = test_parameters['x_lim'] parameters = test_parameters['parameters'] model = create_model(model_class, test_parameters) if isinstance(parameters, dict): parameters = [parameters[name] for name in model.param_names] if "log_fit" in test_parameters: if test_parameters['log_fit']: x = np.logspace(x_lim[0], x_lim[1], self.N) else: x = np.linspace(x_lim[0], x_lim[1], self.N) np.random.seed(0) # add 10% noise to the amplitude relative_noise_amplitude = 0.01 data = ((1 + relative_noise_amplitude * np.random.randn(len(x))) * model(x)) fitter = fitting.LevMarLSQFitter() new_model = fitter(model, x, data) # Only check parameters that were free in the fit params = [getattr(new_model, name) for name in new_model.param_names] fixed = [param.fixed for param in params] expected = np.array([val for val, fixed in zip(parameters, fixed) if not fixed]) fitted = np.array([param.value for param in params if not param.fixed]) utils.assert_allclose(fitted, expected, atol=self.fit_error) @pytest.mark.skipif('not HAS_SCIPY') def test_deriv_1D(self, model_class, test_parameters): """ Test the derivative of a model by comparing results with an estimated derivative. """ x_lim = test_parameters['x_lim'] if model_class.fit_deriv is None: pytest.skip("Derivative function is not defined for model.") if issubclass(model_class, PolynomialBase): pytest.skip("Skip testing derivative of polynomials.") if "log_fit" in test_parameters: if test_parameters['log_fit']: x = np.logspace(x_lim[0], x_lim[1], self.N) else: x = np.linspace(x_lim[0], x_lim[1], self.N) parameters = test_parameters['parameters'] model_with_deriv = create_model(model_class, test_parameters, use_constraints=False) model_no_deriv = create_model(model_class, test_parameters, use_constraints=False) # add 10% noise to the amplitude rsn = np.random.RandomState(1234567890) n = 0.1 * parameters[0] * (rsn.rand(self.N) - 0.5) data = model_with_deriv(x) + n fitter_with_deriv = fitting.LevMarLSQFitter() new_model_with_deriv = fitter_with_deriv(model_with_deriv, x, data) fitter_no_deriv = fitting.LevMarLSQFitter() new_model_no_deriv = fitter_no_deriv(model_no_deriv, x, data, estimate_jacobian=True) utils.assert_allclose(new_model_with_deriv.parameters, new_model_no_deriv.parameters, atol=0.15) def create_model(model_class, test_parameters, use_constraints=True, parameter_key='parameters'): """Create instance of model class.""" constraints = {} if issubclass(model_class, PolynomialBase): return model_class(**test_parameters[parameter_key]) elif issubclass(model_class, FittableModel): if "requires_scipy" in test_parameters and not HAS_SCIPY: pytest.skip("SciPy not found") if use_constraints: if 'constraints' in test_parameters: constraints = test_parameters['constraints'] return model_class(*test_parameters[parameter_key], **constraints) @pytest.mark.parametrize(('model_class', 'test_parameters'), models_1D.items()) class TestFittable1DModels(Fittable1DModelTester): pass @pytest.mark.parametrize(('model_class', 'test_parameters'), models_2D.items()) class TestFittable2DModels(Fittable2DModelTester): pass def test_ShiftModel(): # Shift by a scalar m = models.Shift(42) assert m(0) == 42 utils.assert_equal(m([1, 2]), [43, 44]) # Shift by a list m = models.Shift([42, 43], n_models=2) utils.assert_equal(m(0), [42, 43]) utils.assert_equal(m([1, 2], model_set_axis=False), [[ 43, 44], [ 44, 45]]) def test_ScaleModel(): # Scale by a scalar m = models.Scale(42) assert m(0) == 0 utils.assert_equal(m([1, 2]), [42, 84]) # Scale by a list m = models.Scale([42, 43], n_models=2) utils.assert_equal(m(0), [0, 0]) utils.assert_equal(m([1, 2], model_set_axis=False), [[ 42, 84], [ 43, 86]]) def test_voigt_model(): """ Currently just tests that the model peaks at its origin. Regression test for https://github.com/astropy/astropy/issues/3942 """ m = models.Voigt1D(x_0=5, amplitude_L=10, fwhm_L=0.5, fwhm_G=0.9) x = np.arange(0, 10, 0.01) y = m(x) assert y[500] == y.max() # y[500] is right at the center def test_model_instance_repr(): m = models.Gaussian1D(1, 2, 3) assert repr(m) == '' astropy-1.1.1/astropy/modeling/core.py0000644001134200020070000033721012644017723020734 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module defines base classes for all models. The base class of all models is `~astropy.modeling.Model`. `~astropy.modeling.FittableModel` is the base class for all fittable models. Fittable models can be linear or nonlinear in a regression analysis sense. All models provide a `__call__` method which performs the transformation in a purely mathematical way, i.e. the models are unitless. Model instances can represent either a single model, or a "model set" representing multiple copies of the same type of model, but with potentially different values of the parameters in each model making up the set. """ from __future__ import (absolute_import, unicode_literals, division, print_function) import abc import copy import inspect import functools import operator import sys import types import warnings from collections import defaultdict from itertools import chain, islice import numpy as np from ..utils import indent, isinstancemethod, metadata from ..extern import six from ..extern.six.moves import copyreg from ..table import Table from ..utils import (deprecated, sharedmethod, find_current_module, InheritDocstrings, OrderedDescriptorContainer) from ..utils.codegen import make_function_with_signature from ..utils.compat import ignored from ..utils.compat.funcsigs import signature from ..utils.compat.odict import OrderedDict from ..utils.exceptions import AstropyDeprecationWarning from .utils import (array_repr_oneline, check_broadcast, combine_labels, make_binary_operator_eval, ExpressionTree, IncompatibleShapeError, AliasDict, get_inputs_and_params, _BoundingBox) from ..nddata.utils import add_array, extract_array from .parameters import Parameter, InputParameterError __all__ = ['Model', 'FittableModel', 'Fittable1DModel', 'Fittable2DModel', 'custom_model', 'ModelDefinitionError'] class ModelDefinitionError(TypeError): """Used for incorrect models definitions""" def _model_oper(oper, **kwargs): """ Returns a function that evaluates a given Python arithmetic operator between two models. The operator should be given as a string, like ``'+'`` or ``'**'``. Any additional keyword arguments passed in are passed to `_CompoundModelMeta._from_operator`. """ # Note: Originally this used functools.partial, but that won't work when # used in the class definition of _CompoundModelMeta since # _CompoundModelMeta has not been defined yet. # Perform an arithmetic operation on two models. return lambda left, right: _CompoundModelMeta._from_operator(oper, left, right, **kwargs) class _ModelMeta(OrderedDescriptorContainer, InheritDocstrings, abc.ABCMeta): """ Metaclass for Model. Currently just handles auto-generating the param_names list based on Parameter descriptors declared at the class-level of Model subclasses. """ registry = set() """ A registry of all known concrete (non-abstract) Model subclasses. """ _is_dynamic = False """ This flag signifies whether this class was created in the "normal" way, with a class statement in the body of a module, as opposed to a call to `type` or some other metaclass constructor, such that the resulting class does not belong to a specific module. This is important for pickling of dynamic classes. This flag is always forced to False for new classes, so code that creates dynamic classes should manually set it to True on those classes when creating them. """ # Default empty dict for _parameters_, which will be empty on model # classes that don't have any Parameters _parameters_ = OrderedDict() def __new__(mcls, name, bases, members): # See the docstring for _is_dynamic above if '_is_dynamic' not in members: members['_is_dynamic'] = mcls._is_dynamic return super(_ModelMeta, mcls).__new__(mcls, name, bases, members) def __init__(cls, name, bases, members): # Make sure OrderedDescriptorContainer gets to run before doing # anything else super(_ModelMeta, cls).__init__(name, bases, members) if cls._parameters_: if hasattr(cls, '_param_names'): # Slight kludge to support compound models, where # cls.param_names is a property; could be improved with a # little refactoring but fine for now cls._param_names = tuple(cls._parameters_) else: cls.param_names = tuple(cls._parameters_) cls._create_inverse_property(members) cls._create_bounding_box_property(members) cls._handle_backwards_compat(name, members) cls._handle_special_methods(members) if not inspect.isabstract(cls) and not name.startswith('_'): cls.registry.add(cls) def __repr__(cls): """ Custom repr for Model subclasses. """ return cls._format_cls_repr() def _repr_pretty_(cls, p, cycle): """ Repr for IPython's pretty printer. By default IPython "pretty prints" classes, so we need to implement this so that IPython displays the custom repr for Models. """ p.text(repr(cls)) def __reduce__(cls): if not cls._is_dynamic: # Just return a string specifying where the class can be imported # from return cls.__name__ else: members = dict(cls.__dict__) # Delete any ABC-related attributes--these will be restored when # the class is reconstructed: for key in list(members): if key.startswith('_abc_'): del members[key] # Delete custom __init__ and __call__ if they exist: for key in ('__init__', '__call__'): if key in members: del members[key] return (type(cls), (cls.__name__, cls.__bases__, members)) @property def name(cls): """ The name of this model class--equivalent to ``cls.__name__``. This attribute is provided for symmetry with the `Model.name` attribute of model instances. """ return cls.__name__ @property def n_inputs(cls): return len(cls.inputs) @property def n_outputs(cls): return len(cls.outputs) @property def _is_concrete(cls): """ A class-level property that determines whether the class is a concrete implementation of a Model--i.e. it is not some abstract base class or internal implementation detail (i.e. begins with '_'). """ return not (cls.__name__.startswith('_') or inspect.isabstract(cls)) def rename(cls, name): """ Creates a copy of this model class with a new name. The new class is technically a subclass of the original class, so that instance and type checks will still work. For example:: >>> from astropy.modeling.models import Rotation2D >>> SkyRotation = Rotation2D.rename('SkyRotation') >>> SkyRotation Name: SkyRotation (Rotation2D) Inputs: ('x', 'y') Outputs: ('x', 'y') Fittable parameters: ('angle',) >>> issubclass(SkyRotation, Rotation2D) True >>> r = SkyRotation(90) >>> isinstance(r, Rotation2D) True """ if six.PY2 and isinstance(name, six.text_type): # Unicode names are not allowed in Python 2, so just convert to # ASCII. As such, for cross-compatibility all model names should # just be ASCII for now. name = name.encode('ascii') mod = find_current_module(2) if mod: modname = mod.__name__ else: modname = '__main__' new_cls = type(name, (cls,), {}) # On Python 2 __module__ must be a str, not unicode new_cls.__module__ = str(modname) if hasattr(cls, '__qualname__'): if new_cls.__module__ == '__main__': # __main__ is not added to a class's qualified name new_cls.__qualname__ = name else: new_cls.__qualname__ = '{0}.{1}'.format(modname, name) return new_cls def _create_inverse_property(cls, members): inverse = members.get('inverse') if inverse is None or cls.__bases__[0] is object: # The latter clause is the prevent the below code from running on # the Model base class, which implements the default getter and # setter for .inverse return if isinstance(inverse, property): # We allow the @property decorator to be omitted entirely from # the class definition, though its use should be encouraged for # clarity inverse = inverse.fget # Store the inverse getter internally, then delete the given .inverse # attribute so that cls.inverse resolves to Model.inverse instead cls._inverse = inverse del cls.inverse def _create_bounding_box_property(cls, members): """ Takes any bounding_box defined on a concrete Model subclass (either as a fixed tuple or a property or method) and wraps it in the generic getter/setter interface for the bounding_box attribute. """ # TODO: Much of this is verbatim from _create_inverse_property--I feel # like there could be a way to generify properties that work this way, # but for the time being that would probably only confuse things more. bounding_box = members.get('bounding_box') if bounding_box is None or cls.__bases__[0] is object: return if isinstance(bounding_box, property): bounding_box = bounding_box.fget if not callable(bounding_box): # See if it's a hard-coded bounding_box (as a sequence) and # normalize it try: bounding_box = _BoundingBox.validate(cls, bounding_box) except AssertionError as exc: raise ModelDefinitionError(exc.args[0]) else: sig = signature(bounding_box) # May be a method that only takes 'self' as an argument (like a # property, but the @property decorator was forgotten) # TODO: Maybe warn in the above case? # # However, if the method takes additional arguments then this is a # parameterized bounding box and should be callable if len(sig.parameters) > 1: bounding_box = \ cls._create_bounding_box_subclass(bounding_box, sig) if six.PY2 and isinstance(bounding_box, types.MethodType): bounding_box = bounding_box.__func__ # See the Model.bounding_box getter definition for how this attribute # is used cls._bounding_box = bounding_box del cls.bounding_box def _create_bounding_box_subclass(cls, func, sig): """ For Models that take optional arguments for defining their bounding box, we create a subclass of _BoundingBox with a ``__call__`` method that supports those additional arguments. Takes the function's Signature as an argument since that is already computed in _create_bounding_box_property, so no need to duplicate that effort. """ # TODO: Might be convenient if calling the bounding box also # automatically sets the _user_bounding_box. So that # # >>> model.bounding_box(arg=1) # # in addition to returning the computed bbox, also sets it, so that # it's a shortcut for # # >>> model.bounding_box = model.bounding_box(arg=1) # # Not sure if that would be non-obvious / confusing though... def __call__(self, **kwargs): return func(self._model, **kwargs) kwargs = [] for idx, param in enumerate(sig.parameters.values()): if idx == 0: # Presumed to be a 'self' argument continue if param.default is param.empty: raise ModelDefinitionError( 'The bounding_box method for {0} is not correctly ' 'defined: If defined as a method all arguments to that ' 'method (besides self) must be keyword arguments with ' 'default values that can be used to compute a default ' 'bounding box.'.format(cls.name)) kwargs.append((param.name, param.default)) __call__ = make_function_with_signature(__call__, ('self',), kwargs) return type(str('_{0}BoundingBox'.format(cls.name)), (_BoundingBox,), {'__call__': __call__}) def _handle_backwards_compat(cls, name, members): # Backwards compatibility check for 'eval' -> 'evaluate' # TODO: Remove sometime after Astropy 1.0 release. if 'eval' in members and 'evaluate' not in members: warnings.warn( "Use of an 'eval' method when defining subclasses of " "FittableModel is deprecated; please rename this method to " "'evaluate'. Otherwise its semantics remain the same.", AstropyDeprecationWarning) cls.evaluate = members['eval'] elif ('evaluate' in members and callable(members['evaluate']) and not getattr(members['evaluate'], '__isabstractmethod__', False)): # Don't bother making a deprecated eval() except for concrete # implementations of evaluate, so that we don't end up with an eval # abstractmethod as well alt = '.'.join((name, 'evaluate')) deprecate = deprecated('1.0', alternative=alt, name='eval') cls.eval = deprecate(members['evaluate']) def _handle_special_methods(cls, members): # Handle init creation from inputs def update_wrapper(wrapper, cls): # Set up the new __call__'s metadata attributes as though it were # manually defined in the class definition # A bit like functools.update_wrapper but uses the class instead of # the wrapped function wrapper.__module__ = cls.__module__ wrapper.__doc__ = getattr(cls, wrapper.__name__).__doc__ if hasattr(cls, '__qualname__'): wrapper.__qualname__ = '{0}.{1}'.format( cls.__qualname__, wrapper.__name__) if ('__call__' not in members and 'inputs' in members and isinstance(members['inputs'], tuple)): inputs = members['inputs'] # Done create a custom __call__ for classes that already have one # explicitly defined (this includes the Model base class, and any # other classes that manually override __call__ def __call__(self, *inputs, **kwargs): """Evaluate this model on the supplied inputs.""" return super(cls, self).__call__(*inputs, **kwargs) args = ('self',) + inputs new_call = make_function_with_signature( __call__, args, [('model_set_axis', None)]) update_wrapper(new_call, cls) cls.__call__ = new_call if ('__init__' not in members and not inspect.isabstract(cls) and cls._parameters_): # If *all* the parameters have default values we can make them # keyword arguments; otherwise they must all be positional # arguments if all(p.default is not None for p in six.itervalues(cls._parameters_)): args = ('self',) kwargs = [(name, cls._parameters_[name].default) for name in cls.param_names] else: args = ('self',) + cls.param_names kwargs = {} def __init__(self, *params, **kwargs): return super(cls, self).__init__(*params, **kwargs) new_init = make_function_with_signature( __init__, args, kwargs, varkwargs='kwargs') update_wrapper(new_init, cls) cls.__init__ = new_init # *** Arithmetic operators for creating compound models *** __add__ = _model_oper('+') __sub__ = _model_oper('-') __mul__ = _model_oper('*') __truediv__ = _model_oper('/') __pow__ = _model_oper('**') __or__ = _model_oper('|') __and__ = _model_oper('&') if not six.PY3: # The classic __div__ operator need only be implemented for Python 2 # without from __future__ import division __div__ = _model_oper('/') # *** Other utilities *** def _format_cls_repr(cls, keywords=[]): """ Internal implementation of ``__repr__``. This is separated out for ease of use by subclasses that wish to override the default ``__repr__`` while keeping the same basic formatting. """ # For the sake of familiarity start the output with the standard class # __repr__ parts = [super(_ModelMeta, cls).__repr__()] if not cls._is_concrete: return parts[0] def format_inheritance(cls): bases = [] for base in cls.mro()[1:]: if not issubclass(base, Model): continue elif (inspect.isabstract(base) or base.__name__.startswith('_')): break bases.append(base.name) if bases: return '{0} ({1})'.format(cls.name, ' -> '.join(bases)) else: return cls.name try: default_keywords = [ ('Name', format_inheritance(cls)), ('Inputs', cls.inputs), ('Outputs', cls.outputs), ] if cls.param_names: default_keywords.append(('Fittable parameters', cls.param_names)) for keyword, value in default_keywords + keywords: if value is not None: parts.append('{0}: {1}'.format(keyword, value)) return '\n'.join(parts) except: # If any of the above formatting fails fall back on the basic repr # (this is particularly useful in debugging) return parts[0] @six.add_metaclass(_ModelMeta) class Model(object): """ Base class for all models. This is an abstract class and should not be instantiated directly. This class sets the constraints and other properties for all individual parameters and performs parameter validation. The following initialization arguments apply to the majority of Model subclasses by default (exceptions include specialized utility models like `~astropy.modeling.mappings.Mapping`). Parametric models take all their parameters as arguments, followed by any of the following optional keyword arguments: Parameters ---------- name : str, optional A human-friendly name associated with this model instance (particularly useful for identifying the individual components of a compound model). meta : dict, optional An optional dict of user-defined metadata to attach to this model. How this is used and interpreted is up to the user or individual use case. n_models : int, optional If given an integer greater than 1, a *model set* is instantiated instead of a single model. This affects how the parameter arguments are interpreted. In this case each parameter must be given as a list or array--elements of this array are taken along the first axis (or ``model_set_axis`` if specified), such that the Nth element is the value of that parameter for the Nth model in the set. See the section on model sets in the documentation for more details. model_set_axis : int, optional This argument only applies when creating a model set (i.e. ``n_models > 1``). It changes how parameter values are interpreted. Normally the first axis of each input parameter array (properly the 0th axis) is taken as the axis corresponding to the model sets. However, any axis of an input array may be taken as this "model set axis". This accepts negative integers as well--for example use ``model_set_axis=-1`` if the last (most rapidly changing) axis should be associated with the model sets. fixed : dict, optional Dictionary ``{parameter_name: bool}`` setting the fixed constraint for one or more parameters. `True` means the parameter is held fixed during fitting and is prevented from updates once an instance of the model has been created. Alternatively the `~astropy.modeling.Parameter.fixed` property of a parameter may be used to lock or unlock individual parameters. tied : dict, optional Dictionary ``{parameter_name: callable}`` of parameters which are linked to some other parameter. The dictionary values are callables providing the linking relationship. Alternatively the `~astropy.modeling.Parameter.tied` property of a parameter may be used to set the ``tied`` constraint on individual parameters. bounds : dict, optional Dictionary ``{parameter_name: value}`` of lower and upper bounds of parameters. Keys are parameter names. Values are a list of length 2 giving the desired range for the parameter. Alternatively the `~astropy.modeling.Parameter.min` and `~astropy.modeling.Parameter.max` or ~astropy.modeling.Parameter.bounds` properties of a parameter may be used to set bounds on individual parameters. eqcons : list, optional List of functions of length n such that ``eqcons[j](x0, *args) == 0.0`` in a successfully optimized problem. ineqcons : list, optional List of functions of length n such that ``ieqcons[j](x0, *args) >= 0.0`` is a successfully optimized problem. Examples -------- >>> from astropy.modeling import models >>> def tie_center(model): ... mean = 50 * model.stddev ... return mean >>> tied_parameters = {'mean': tie_center} Specify that ``'mean'`` is a tied parameter in one of two ways: >>> g1 = models.Gaussian1D(amplitude=10, mean=5, stddev=.3, ... tied=tied_parameters) or >>> g1 = models.Gaussian1D(amplitude=10, mean=5, stddev=.3) >>> g1.mean.tied False >>> g1.mean.tied = tie_center >>> g1.mean.tied Fixed parameters: >>> g1 = models.Gaussian1D(amplitude=10, mean=5, stddev=.3, ... fixed={'stddev': True}) >>> g1.stddev.fixed True or >>> g1 = models.Gaussian1D(amplitude=10, mean=5, stddev=.3) >>> g1.stddev.fixed False >>> g1.stddev.fixed = True >>> g1.stddev.fixed True """ parameter_constraints = Parameter.constraints """ Primarily for informational purposes, these are the types of constraints that can be set on a model's parameters. """ model_constraints = ('eqcons', 'ineqcons') """ Primarily for informational purposes, these are the types of constraints that constrain model evaluation. """ param_names = () """ Names of the parameters that describe models of this type. The parameters in this tuple are in the same order they should be passed in when initializing a model of a specific type. Some types of models, such as polynomial models, have a different number of parameters depending on some other property of the model, such as the degree. When defining a custom model class the value of this attribute is automatically set by the `~astropy.modeling.Parameter` attributes defined in the class body. """ inputs = () """The name(s) of the input variable(s) on which a model is evaluated.""" outputs = () """The name(s) of the output(s) of the model.""" standard_broadcasting = True fittable = False linear = True meta = metadata.MetaData() """A dict-like object to store optional information.""" # By default models either use their own inverse property or have no # inverse at all, but users may also assign a custom inverse to a model, # optionally; in that case it is of course up to the user to determine # whether their inverse is *actually* an inverse to the model they assign # it to. _inverse = None _user_inverse = None _bounding_box = None _user_bounding_box = None # Default n_models attribute, so that __len__ is still defined even when a # model hasn't completed initialization yet _n_models = 1 def __init__(self, *args, **kwargs): super(Model, self).__init__() meta = kwargs.pop('meta', None) if meta is not None: self.meta = meta self._name = kwargs.pop('name', None) self._initialize_constraints(kwargs) # Remaining keyword args are either parameter values or invalid # Parameter values must be passed in as keyword arguments in order to # distinguish them self._initialize_parameters(args, kwargs) def __repr__(self): return self._format_repr() def __str__(self): return self._format_str() def __len__(self): return self._n_models def __call__(self, *inputs, **kwargs): """ Evaluate this model using the given input(s) and the parameter values that were specified when the model was instantiated. """ inputs, format_info = self.prepare_inputs(*inputs, **kwargs) parameters = self._param_sets(raw=True) outputs = self.evaluate(*chain(inputs, parameters)) if self.n_outputs == 1: outputs = (outputs,) return self.prepare_outputs(format_info, *outputs, **kwargs) # *** Arithmetic operators for creating compound models *** __add__ = _model_oper('+') __sub__ = _model_oper('-') __mul__ = _model_oper('*') __truediv__ = _model_oper('/') __pow__ = _model_oper('**') __or__ = _model_oper('|') __and__ = _model_oper('&') if not six.PY3: __div__ = _model_oper('/') # *** Properties *** @property def name(self): """User-provided name for this model instance.""" return self._name @property @deprecated('0.4', alternative='len(model)') def param_dim(self): return self._n_models @property def n_inputs(self): """ The number of inputs to this model. Equivalent to ``len(model.inputs)``. """ return len(self.inputs) @property def n_outputs(self): """ The number of outputs from this model. Equivalent to ``len(model.outputs)``. """ return len(self.outputs) @property def model_set_axis(self): """ The index of the model set axis--that is the axis of a parameter array that pertains to which model a parameter value pertains to--as specified when the model was initialized. See the documentation on `Model Sets `_ for more details. """ return self._model_set_axis @property def param_sets(self): """ Return parameters as a pset. This is a list with one item per parameter set, which is an array of that parameter's values across all parameter sets, with the last axis associated with the parameter set. """ return self._param_sets() @property def parameters(self): """ A flattened array of all parameter values in all parameter sets. Fittable parameters maintain this list and fitters modify it. """ # Currently the sequence of a model's parameters must be contiguous # within the _parameters array (which may be a view of a larger array, # for example when taking a sub-expression of a compound model), so # the assumption here is reliable: if not self.param_names: # Trivial, but not unheard of return self._parameters start = self._param_metrics[self.param_names[0]]['slice'].start stop = self._param_metrics[self.param_names[-1]]['slice'].stop return self._parameters[start:stop] @parameters.setter def parameters(self, value): """ Assigning to this attribute updates the parameters array rather than replacing it. """ if not self.param_names: return start = self._param_metrics[self.param_names[0]]['slice'].start stop = self._param_metrics[self.param_names[-1]]['slice'].stop try: value = np.array(value).flatten() self._parameters[start:stop] = value except ValueError as e: raise InputParameterError( "Input parameter values not compatible with the model " "parameters array: {0}".format(e)) @property def fixed(self): """ A `dict` mapping parameter names to their fixed constraint. """ return self._constraints['fixed'] @property def tied(self): """ A `dict` mapping parameter names to their tied constraint. """ return self._constraints['tied'] @property def bounds(self): """ A `dict` mapping parameter names to their upper and lower bounds as ``(min, max)`` tuples. """ return self._constraints['bounds'] @property def eqcons(self): """List of parameter equality constraints.""" return self._constraints['eqcons'] @property def ineqcons(self): """List of parameter inequality constraints.""" return self._constraints['ineqcons'] @property def inverse(self): """ Returns a new `~astropy.modeling.Model` instance which performs the inverse transform, if an analytic inverse is defined for this model. Even on models that don't have an inverse defined, this property can be set with a manually-defined inverse, such a pre-computed or experimentally determined inverse (often given as a `~astropy.modeling.polynomial.PolynomialModel`, but not by requirement). A custom inverse can be deleted with ``del model.inverse``. In this case the model's inverse is reset to its default, if a default exists (otherwise the default is to raise `NotImplementedError`). Note to authors of `~astropy.modeling.Model` subclasses: To define an inverse for a model simply override this property to return the appropriate model representing the inverse. The machinery that will make the inverse manually-overridable is added automatically by the base class. """ if self._user_inverse is not None: return self._user_inverse elif self._inverse is not None: return self._inverse() raise NotImplementedError("An analytical inverse transform has not " "been implemented for this model.") @inverse.setter def inverse(self, value): if not isinstance(value, (Model, type(None))): raise ValueError( "The ``inverse`` attribute may be assigned a `Model` " "instance or `None` (where `None` restores the default " "inverse for this model if one is defined.") if value is None: warnings.warn( "Currently setting `model.inverse = None` resets the inverse " "to the default inverse (if one exists). However, starting " "in Astropy 1.2, setting `model.inverse = None` explicitly " "forces a model to have no inverse (such that accessing " "`model.inverse` raises a NotImplementedError) even if that " "model's class has a default inverse.\n\n" "Instead, call `del model.inverse` to reset the inverse to " "its default (if a default exists for that model's class--" "otherwise the model is reset to having no inverse.", AstropyDeprecationWarning) self._user_inverse = value @inverse.deleter def inverse(self): """ Resets the model's inverse to its default (if one exists, otherwise the model will have no inverse). """ del self._user_inverse @property def has_user_inverse(self): """ A flag indicating whether or not a custom inverse model has been assigned to this model by a user, via assignment to ``model.inverse``. """ return self._user_inverse is not None @property def _custom_inverse(self): # Deprecated alias for _user_inverse--included solely for temporary # backwards compatibility for pyasdf--remove after Astropy v1.1 # release. return self._user_inverse @property def bounding_box(self): """ A `tuple` of length `n_inputs` defining the bounding box limits, or `None` for no bounding box. The default limits are given by a ``bounding_box`` property or method defined in the class body of a specific model. If not defined then this property just raises `NotImplementedError` by default (but may be assigned a custom value by a user). ``bounding_box`` can be set manually to an array-like object of shape ``(model.n_inputs, 2)``. For further usage, see :ref:`bounding-boxes` The limits are ordered according to the `numpy` indexing convention, and are the reverse of the model input order, e.g. for inputs ``('x', 'y', 'z')``, ``bounding_box`` is defined: * for 1D: ``(x_low, x_high)`` * for 2D: ``((y_low, y_high), (x_low, x_high))`` * for 3D: ``((z_low, z_high), (y_low, y_high), (x_low, x_high))`` Examples -------- Setting the ``bounding_box`` limits for a 1D and 2D model: >>> from astropy.modeling.models import Gaussian1D, Gaussian2D >>> model_1d = Gaussian1D() >>> model_2d = Gaussian2D(x_stddev=1, y_stddev=1) >>> model_1d.bounding_box = (-5, 5) >>> model_2d.bounding_box = ((-6, 6), (-5, 5)) Setting the bounding_box limits for a user-defined 3D `custom_model`: >>> from astropy.modeling.models import custom_model >>> def const3d(x, y, z, amp=1): ... return amp ... >>> Const3D = custom_model(const3d) >>> model_3d = Const3D() >>> model_3d.bounding_box = ((-6, 6), (-5, 5), (-4, 4)) To reset ``bounding_box`` to its default limits just delete the user-defined value--this will reset it back to the default defined on the class: >>> del model_1d.bounding_box To disable the bounding box entirely (including the default), set ``bounding_box`` to `None`: >>> model_1d.bounding_box = None >>> model_1d.bounding_box # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): File "", line 1, in File "astropy\modeling\core.py", line 980, in bounding_box "No bounding box is defined for this model (note: the " NotImplementedError: No bounding box is defined for this model (note: the bounding box was explicitly disabled for this model; use `del model.bounding_box` to restore the default bounding box, if one is defined for this model). """ if self._user_bounding_box is not None: if self._user_bounding_box is NotImplemented: raise NotImplementedError( "No bounding box is defined for this model (note: the " "bounding box was explicitly disabled for this model; " "use `del model.bounding_box` to restore the default " "bounding box, if one is defined for this model).") return self._user_bounding_box elif self._bounding_box is None: raise NotImplementedError( "No bounding box is defined for this model.") elif isinstance(self._bounding_box, _BoundingBox): # This typically implies a hard-coded bounding box. This will # probably be rare, but it is an option return self._bounding_box elif isinstance(self._bounding_box, types.MethodType): return self._bounding_box() else: # The only other allowed possibility is that it's a _BoundingBox # subclass, so we call it with its default arguments and return an # instance of it (that can be called to recompute the bounding box # with any optional parameters) # (In other words, in this case self._bounding_box is a *class*) bounding_box = self._bounding_box((), _model=self)() return self._bounding_box(bounding_box, _model=self) @bounding_box.setter def bounding_box(self, bounding_box): """ Assigns the bounding box limits. """ if bounding_box is None: cls = None # We use this to explicitly set an unimplemented bounding box (as # opposed to no user bounding box defined) bounding_box = NotImplemented elif (isinstance(self._bounding_box, type) and issubclass(self._bounding_box, _BoundingBox)): cls = self._bounding_box else: cls = _BoundingBox if cls is not None: try: bounding_box = cls.validate(self, bounding_box) except AssertionError as exc: raise ValueError(exc.args[0]) self._user_bounding_box = bounding_box @bounding_box.deleter def bounding_box(self): self._user_bounding_box = None @property def has_user_bounding_box(self): """ A flag indicating whether or not a custom bounding_box has been assigned to this model by a user, via assignment to ``model.bounding_box``. """ return self._user_bounding_box is not None # *** Public methods *** @abc.abstractmethod def evaluate(self, *args, **kwargs): """Evaluate the model on some input variables.""" def render(self, out=None, coords=None): """ Evaluates a model on an input array. Evaluation is limited to a bounding box if the `Model.bounding_box` attribute is set. Parameters ---------- out : `numpy.ndarray`, optional The array on which the model is to be evaluated. coords : array-like, optional Coordinate arrays mapping to ``arr``, such that ``arr[coords] == arr``. Returns ------- out : `numpy.ndarray` The model evaluated on the input array if given, or else a new array from ``coords``. If ``out`` and ``coords`` are both `None`, the returned array is limited to the `Model.bounding_box` limits. If `Model.bounding_box` is `None`, ``arr`` or ``coords`` must be passed. Examples -------- :ref:`bounding-boxes` """ try: bbox = self.bounding_box except NotImplementedError: bbox = None ndim = self.n_inputs if (coords is None) and (out is None) and (bbox is None): raise ValueError('If no bounding_box is set, ' 'coords or out must be input.') # for consistent indexing if ndim == 1: if coords is not None: coords = [coords] if bbox is not None: bbox = [bbox] if coords is not None: # Check dimensions match out and model assert len(coords) == ndim if out is not None: assert coords[0].shape == out.shape else: out = np.zeros(coords[0].shape) if out is not None: try: assert out.ndim == ndim except AssertionError: raise AssertionError( 'The array and model must have the same number ' 'of dimensions.') if bbox is not None: # assures position is at center pixel, important when using add_array pd = np.array([(np.mean(bb), np.ceil((bb[1] - bb[0]) / 2)) for bb in bbox]).astype(int).T pos, delta = pd if coords is not None: sub_shape = tuple(delta * 2 + 1) sub_coords = np.array([extract_array(c, sub_shape, pos) for c in coords]) else: limits = [slice(p - d, p + d + 1, 1) for p, d in pd.T] sub_coords = np.mgrid[limits] sub_coords = sub_coords[::-1] if out is None: out = self(*sub_coords) else: try: out = add_array(out, self(*sub_coords), pos) except ValueError: raise ValueError( 'The `bounding_box` is larger than the input out in ' 'one or more dimensions. Set ' '`model.bounding_box = None`.') else: if coords is None: im_shape = out.shape limits = [slice(i) for i in im_shape] coords = np.mgrid[limits] coords = coords[::-1] out += self(*coords) return out def prepare_inputs(self, *inputs, **kwargs): """ This method is used in `~astropy.modeling.Model.__call__` to ensure that all the inputs to the model can be broadcast into compatible shapes (if one or both of them are input as arrays), particularly if there are more than one parameter sets. """ model_set_axis = kwargs.pop('model_set_axis', None) if model_set_axis is None: # By default the model_set_axis for the input is assumed to be the # same as that for the parameters the model was defined with # TODO: Ensure that negative model_set_axis arguments are respected model_set_axis = self.model_set_axis n_models = len(self) params = [getattr(self, name) for name in self.param_names] inputs = [np.asanyarray(_input, dtype=float) for _input in inputs] _validate_input_shapes(inputs, self.inputs, n_models, model_set_axis, self.standard_broadcasting) # The input formatting required for single models versus a multiple # model set are different enough that they've been split into separate # subroutines if n_models == 1: return _prepare_inputs_single_model(self, params, inputs, **kwargs) else: return _prepare_inputs_model_set(self, params, inputs, n_models, model_set_axis, **kwargs) def prepare_outputs(self, format_info, *outputs, **kwargs): if len(self) == 1: return _prepare_outputs_single_model(self, outputs, format_info) else: return _prepare_outputs_model_set(self, outputs, format_info) @deprecated('1.0', alternative='Use Model operators (TODO: link to compound ' 'model docs') def add_model(self, model, mode): """ Create a CompositeModel by chaining the current model with the new one using the specified mode. Parameters ---------- model : an instance of a subclass of Model mode : string 'parallel', 'serial', 'p' or 's' a flag indicating whether to combine the models in series or in parallel Returns ------- model : CompositeModel an instance of CompositeModel """ from ._compound_deprecated import (SummedCompositeModel, SerialCompositeModel) if mode in ['parallel', 'p']: return SummedCompositeModel([self, model]) elif mode in ['serial', 's']: return SerialCompositeModel([self, model]) else: raise InputParameterError("Unrecognized mode {0}".format(mode)) def copy(self): """ Return a copy of this model. Uses a deep copy so that all model attributes, including parameter values, are copied as well. """ return copy.deepcopy(self) @sharedmethod def rename(self, name): """ Return a copy of this model with a new name. """ new_model = self.copy() new_model._name = name return new_model # *** Internal methods *** @sharedmethod def _from_existing(self, existing, param_names): """ Creates a new instance of ``cls`` that shares its underlying parameter values with an existing model instance given by ``existing``. This is used primarily by compound models to return a view of an individual component of a compound model. ``param_names`` should be the names of the parameters in the *existing* model to use as the parameters in this new model. Its length should equal the number of parameters this model takes, so that it can map parameters on the existing model to parameters on this model one-to-one. """ # Basically this is an alternative __init__ if isinstance(self, type): # self is a class, not an instance needs_initialization = True dummy_args = (0,) * len(param_names) self = self.__new__(self, *dummy_args) else: needs_initialization = False self = self.copy() aliases = dict(zip(self.param_names, param_names)) # This is basically an alternative _initialize_constraints constraints = {} for cons_type in self.parameter_constraints: orig = existing._constraints[cons_type] constraints[cons_type] = AliasDict(orig, aliases) self._constraints = constraints self._n_models = existing._n_models self._model_set_axis = existing._model_set_axis self._parameters = existing._parameters self._param_metrics = defaultdict(dict) for param_a, param_b in six.iteritems(aliases): # Take the param metrics info for the giving parameters in the # existing model, and hand them to the appropriate parameters in # the new model self._param_metrics[param_a] = existing._param_metrics[param_b] if needs_initialization: self.__init__(*dummy_args) return self def _initialize_constraints(self, kwargs): """ Pop parameter constraint values off the keyword arguments passed to `Model.__init__` and store them in private instance attributes. """ if hasattr(self, '_constraints'): # Skip constraint initialization if it has already been handled via # an alternate initialization return self._constraints = {} # Pop any constraints off the keyword arguments for constraint in self.parameter_constraints: values = kwargs.pop(constraint, {}) self._constraints[constraint] = values.copy() # Update with default parameter constraints for param_name in self.param_names: param = getattr(self, param_name) # Parameters don't have all constraint types value = getattr(param, constraint) if value is not None: self._constraints[constraint][param_name] = value for constraint in self.model_constraints: values = kwargs.pop(constraint, []) self._constraints[constraint] = values def _initialize_parameters(self, args, kwargs): """ Initialize the _parameters array that stores raw parameter values for all parameter sets for use with vectorized fitting algorithms; on FittableModels the _param_name attributes actually just reference slices of this array. """ if hasattr(self, '_parameters'): # Skip parameter initialization if it has already been handled via # an alternate initialization return n_models = None # Pop off param_dim and handle backwards compatibility if 'param_dim' in kwargs: n_models = kwargs.pop('param_dim') warnings.warn( 'The param_dim argument to {0}.__init__ is deprecated; ' 'use n_models instead. See also the model_set_axis argument ' 'and related discussion in the docstring for Model.'.format( self.__class__.__name__), AstropyDeprecationWarning) if 'n_models' in kwargs: raise TypeError( "param_dim and n_models cannot both be specified; use " "n_models, as param_dim is deprecated") else: n_models = kwargs.pop('n_models', None) if not (n_models is None or (isinstance(n_models, int) and n_models >=1)): raise ValueError( "n_models must be either None (in which case it is " "determined from the model_set_axis of the parameter initial " "values) or it must be a positive integer " "(got {0!r})".format(n_models)) model_set_axis = kwargs.pop('model_set_axis', None) if model_set_axis is None: if n_models is not None and n_models > 1: # Default to zero model_set_axis = 0 else: # Otherwise disable model_set_axis = False else: if not (model_set_axis is False or (isinstance(model_set_axis, int) and not isinstance(model_set_axis, bool))): raise ValueError( "model_set_axis must be either False or an integer " "specifying the parameter array axis to map to each " "model in a set of models (got {0!r}).".format( model_set_axis)) # Process positional arguments by matching them up with the # corresponding parameters in self.param_names--if any also appear as # keyword arguments this presents a conflict params = {} if len(args) > len(self.param_names): raise TypeError( "{0}.__init__() takes at most {1} positional arguments ({2} " "given)".format(self.__class__.__name__, len(self.param_names), len(args))) for idx, arg in enumerate(args): if arg is None: # A value of None implies using the default value, if exists continue params[self.param_names[idx]] = np.asanyarray(arg, dtype=np.float) # At this point the only remaining keyword arguments should be # parameter names; any others are in error. for param_name in self.param_names: if param_name in kwargs: if param_name in params: raise TypeError( "{0}.__init__() got multiple values for parameter " "{1!r}".format(self.__class__.__name__, param_name)) value = kwargs.pop(param_name) if value is None: continue params[param_name] = np.asanyarray(value, dtype=np.float) if kwargs: # If any keyword arguments were left over at this point they are # invalid--the base class should only be passed the parameter # values, constraints, and param_dim for kwarg in kwargs: # Just raise an error on the first unrecognized argument raise TypeError( '{0}.__init__() got an unrecognized parameter ' '{1!r}'.format(self.__class__.__name__, kwarg)) self._model_set_axis = model_set_axis self._param_metrics = defaultdict(dict) # Determine the number of model sets: If the model_set_axis is # None then there is just one parameter set; otherwise it is determined # by the size of that axis on the first parameter--if the other # parameters don't have the right number of axes or the sizes of their # model_set_axis don't match an error is raised if model_set_axis is not False and n_models != 1 and params: max_ndim = 0 if model_set_axis < 0: min_ndim = abs(model_set_axis) else: min_ndim = model_set_axis + 1 for name, value in six.iteritems(params): param_ndim = np.ndim(value) if param_ndim < min_ndim: raise InputParameterError( "All parameter values must be arrays of dimension " "at least {0} for model_set_axis={1} (the value " "given for {2!r} is only {3}-dimensional)".format( min_ndim, model_set_axis, name, param_ndim)) max_ndim = max(max_ndim, param_ndim) if n_models is None: # Use the dimensions of the first parameter to determine # the number of model sets n_models = value.shape[model_set_axis] elif value.shape[model_set_axis] != n_models: raise InputParameterError( "Inconsistent dimensions for parameter {0!r} for " "{1} model sets. The length of axis {2} must be the " "same for all input parameter values".format( name, n_models, model_set_axis)) self._check_param_broadcast(params, max_ndim) else: if n_models is None: n_models = 1 self._check_param_broadcast(params, None) self._n_models = n_models self._initialize_parameter_values(params) def _initialize_parameter_values(self, params): # self._param_metrics should have been initialized in # self._initialize_parameters param_metrics = self._param_metrics total_size = 0 for name in self.param_names: if params.get(name) is None: default = getattr(self, name).default if default is None: # No value was supplied for the parameter, and the # parameter does not have a default--therefor the model is # underspecified raise TypeError( "{0}.__init__() requires a value for parameter " "{1!r}".format(self.__class__.__name__, name)) value = params[name] = default else: value = params[name] param_size = np.size(value) param_shape = np.shape(value) param_slice = slice(total_size, total_size + param_size) param_metrics[name]['slice'] = param_slice param_metrics[name]['shape'] = param_shape total_size += param_size self._param_metrics = param_metrics self._parameters = np.empty(total_size, dtype=np.float64) # Now set the parameter values (this will also fill # self._parameters) # TODO: This is a bit ugly, but easier to deal with than how this was # done previously. There's still lots of opportunity for refactoring # though, in particular once we move the _get/set_model_value methods # out of Parameter and into Model (renaming them # _get/set_parameter_value) for name, value in params.items(): param_descr = getattr(self, name) value = np.array(value) if param_descr._setter is not None: value = param_descr._setter(value) self._parameters[param_metrics[name]['slice']] = value.ravel() # Finally validate all the parameters; we do this last so that # validators that depend on one of the other parameters' values will # work for name in params: param_descr = getattr(self, name) param_descr.validator(param_descr.value) def _check_param_broadcast(self, params, max_ndim): """ This subroutine checks that all parameter arrays can be broadcast against each other, and determines the shapes parameters must have in order to broadcast correctly. If model_set_axis is None this merely checks that the parameters broadcast and returns an empty dict if so. This mode is only used for single model sets. """ all_shapes = [] param_names = [] model_set_axis = self._model_set_axis for name in self.param_names: # Previously this just used iteritems(params), but we loop over all # param_names instead just to ensure some determinism in the # ordering behavior if name not in params: continue value = params[name] param_names.append(name) # We've already checked that each parameter array is compatible in # the model_set_axis dimension, but now we need to check the # dimensions excluding that axis # Split the array dimensions into the axes before model_set_axis # and after model_set_axis param_shape = np.shape(value) param_ndim = len(param_shape) if max_ndim is not None and param_ndim < max_ndim: # All arrays have the same number of dimensions up to the # model_set_axis dimension, but after that they may have a # different number of trailing axes. The number of trailing # axes must be extended for mutual compatibility. For example # if max_ndim = 3 and model_set_axis = 0, an array with the # shape (2, 2) must be extended to (2, 1, 2). However, an # array with shape (2,) is extended to (2, 1). new_axes = (1,) * (max_ndim - param_ndim) if model_set_axis < 0: # Just need to prepend axes to make up the difference broadcast_shape = new_axes + param_shape else: broadcast_shape = (param_shape[:model_set_axis + 1] + new_axes + param_shape[model_set_axis + 1:]) self._param_metrics[name]['broadcast_shape'] = broadcast_shape all_shapes.append(broadcast_shape) else: all_shapes.append(param_shape) # Now check mutual broadcastability of all shapes try: check_broadcast(*all_shapes) except IncompatibleShapeError as exc: shape_a, shape_a_idx, shape_b, shape_b_idx = exc.args param_a = param_names[shape_a_idx] param_b = param_names[shape_b_idx] raise InputParameterError( "Parameter {0!r} of shape {1!r} cannot be broadcast with " "parameter {2!r} of shape {3!r}. All parameter arrays " "must have shapes that are mutually compatible according " "to the broadcasting rules.".format(param_a, shape_a, param_b, shape_b)) def _param_sets(self, raw=False): """ Implementation of the Model.param_sets property. This internal implementation has a ``raw`` argument which controls whether or not to return the raw parameter values (i.e. the values that are actually stored in the ._parameters array, as opposed to the values displayed to users. In most cases these are one in the same but there are currently a few exceptions. Note: This is notably an overcomplicated device and may be removed entirely in the near future. """ param_metrics = self._param_metrics values = [] for name in self.param_names: if raw: value = getattr(self, name)._raw_value else: value = getattr(self, name).value broadcast_shape = param_metrics[name].get('broadcast_shape') if broadcast_shape is not None: value = value.reshape(broadcast_shape) values.append(value) shapes = [np.shape(value) for value in values] if len(self) == 1: # Add a single param set axis to the parameter's value (thus # converting scalars to shape (1,) array values) for consistency values = [np.array([value]) for value in values] if len(set(shapes)) != 1: # If the parameters are not all the same shape, converting to an # array is going to produce an object array # However the way Numpy creates object arrays is tricky in that it # will recurse into array objects in the list and break them up # into separate objects. Doing things this way ensures a 1-D # object array the elements of which are the individual parameter # arrays. There's not much reason to do this over returning a list # except for consistency psets = np.empty(len(values), dtype=object) psets[:] = values return psets return np.array(values) def _format_repr(self, args=[], kwargs={}, defaults={}): """ Internal implementation of ``__repr__``. This is separated out for ease of use by subclasses that wish to override the default ``__repr__`` while keeping the same basic formatting. """ # TODO: I think this could be reworked to preset model sets better parts = [repr(a) for a in args] parts.extend( "{0}={1}".format(name, array_repr_oneline(getattr(self, name).value)) for name in self.param_names) if self.name is not None: parts.append('name={0!r}'.format(self.name)) for kwarg, value in kwargs.items(): if kwarg in defaults and defaults[kwarg] != value: continue parts.append('{0}={1!r}'.format(kwarg, value)) if len(self) > 1: parts.append("n_models={0}".format(len(self))) return '<{0}({1})>'.format(self.__class__.__name__, ', '.join(parts)) def _format_str(self, keywords=[]): """ Internal implementation of ``__str__``. This is separated out for ease of use by subclasses that wish to override the default ``__str__`` while keeping the same basic formatting. """ default_keywords = [ ('Model', self.__class__.__name__), ('Name', self.name), ('Inputs', self.inputs), ('Outputs', self.outputs), ('Model set size', len(self)) ] parts = ['{0}: {1}'.format(keyword, value) for keyword, value in default_keywords + keywords if value is not None] parts.append('Parameters:') if len(self) == 1: columns = [[getattr(self, name).value] for name in self.param_names] else: columns = [getattr(self, name).value for name in self.param_names] if columns: param_table = Table(columns, names=self.param_names) parts.append(indent(str(param_table), width=4)) return '\n'.join(parts) class FittableModel(Model): """ Base class for models that can be fitted using the built-in fitting algorithms. """ linear = False # derivative with respect to parameters fit_deriv = None """ Function (similar to the model's `~Model.evaluate`) to compute the derivatives of the model with respect to its parameters, for use by fitting algorithms. In other words, this computes the Jacobian matrix with respect to the model's parameters. """ # Flag that indicates if the model derivatives with respect to parameters # are given in columns or rows col_fit_deriv = True fittable = True class Fittable1DModel(FittableModel): """ Base class for one-dimensional fittable models. This class provides an easier interface to defining new models. Examples can be found in `astropy.modeling.functional_models`. """ inputs = ('x',) outputs = ('y',) class Fittable2DModel(FittableModel): """ Base class for two-dimensional fittable models. This class provides an easier interface to defining new models. Examples can be found in `astropy.modeling.functional_models`. """ inputs = ('x', 'y') outputs = ('z',) def _make_arithmetic_operator(oper): # We don't bother with tuple unpacking here for efficiency's sake, but for # documentation purposes: # # f_eval, f_n_inputs, f_n_outputs = f # # and similarly for g def op(f, g): return (make_binary_operator_eval(oper, f[0], g[0]), f[1], f[2]) return op def _composition_operator(f, g): # We don't bother with tuple unpacking here for efficiency's sake, but for # documentation purposes: # # f_eval, f_n_inputs, f_n_outputs = f # # and similarly for g return (lambda inputs, params: g[0](f[0](inputs, params), params), f[1], g[2]) def _join_operator(f, g): # We don't bother with tuple unpacking here for efficiency's sake, but for # documentation purposes: # # f_eval, f_n_inputs, f_n_outputs = f # # and similarly for g return (lambda inputs, params: (f[0](inputs[:f[1]], params) + g[0](inputs[f[1]:], params)), f[1] + g[1], f[2] + g[2]) # TODO: Support a couple unary operators--at least negation? BINARY_OPERATORS = { '+': _make_arithmetic_operator(operator.add), '-': _make_arithmetic_operator(operator.sub), '*': _make_arithmetic_operator(operator.mul), '/': _make_arithmetic_operator(operator.truediv), '**': _make_arithmetic_operator(operator.pow), '|': _composition_operator, '&': _join_operator } _ORDER_OF_OPERATORS = [('|',), ('&',), ('+', '-'), ('*', '/'), ('**',)] OPERATOR_PRECEDENCE = {} for idx, ops in enumerate(_ORDER_OF_OPERATORS): for op in ops: OPERATOR_PRECEDENCE[op] = idx del idx, op, ops class _CompoundModelMeta(_ModelMeta): _tree = None _submodels = None _submodel_names = None _nextid = 0 _param_names = None # _param_map is a mapping of the compound model's generated param names to # the parameters of submodels they are associated with. The values in this # mapping are (idx, name) tuples were idx is the index of the submodel this # parameter is associated with, and name is the same parameter's name on # the submodel # In principle this will allow compound models to give entirely new names # to parameters that don't have to be the same as their original names on # the submodels, but right now that isn't taken advantage of _param_map = None _slice_offset = 0 # When taking slices of a compound model, this keeps track of how offset # the first model in the slice is from the first model in the original # compound model it was taken from # This just inverts _param_map, swapping keys with values. This is also # useful to have. _param_map_inverse = None _fittable = None _evaluate = None def __getitem__(cls, index): index = cls._normalize_index(index) if isinstance(index, int): return cls._get_submodels()[index] else: return cls._get_slice(index.start, index.stop) def __getattr__(cls, attr): # Make sure the _tree attribute is set; otherwise we are not looking up # an attribute on a concrete compound model class and should just raise # the AttributeError if cls._tree is not None and attr in cls.param_names: cls._init_param_descriptors() return getattr(cls, attr) raise AttributeError(attr) def __repr__(cls): if cls._tree is None: # This case is mostly for debugging purposes return cls._format_cls_repr() expression = cls._format_expression() components = '\n\n'.join('[{0}]: {1!r}'.format(idx, m) for idx, m in enumerate(cls._get_submodels())) keywords = [ ('Expression', expression), ('Components', '\n' + indent(components)) ] return cls._format_cls_repr(keywords=keywords) def __dir__(cls, *args): """ Returns a list of attributes defined on a compound model, including all of its parameters. """ # The *args is to address a bug (?) on Python 2.6 where the dir() # builtin calls __dir__ with an additional (unused) argument try: # Annoyingly, this will only work for Python 3.3+ basedir = super(_CompoundModelMeta, cls).__dir__() except AttributeError: basedir = list(set((dir(type(cls)) + list(cls.__dict__)))) if cls._tree is not None: for name in cls.param_names: basedir.append(name) basedir.sort() return basedir def __reduce__(cls): rv = super(_CompoundModelMeta, cls).__reduce__() if isinstance(rv, tuple): # Delete _evaluate from the members dict with ignored(KeyError): del rv[1][2]['_evaluate'] return rv @property def submodel_names(cls): if cls._submodel_names is not None: return cls._submodel_names by_name = defaultdict(list) for idx, submodel in enumerate(cls._get_submodels()): # Keep track of the original sort order of the submodels by_name[submodel.name].append(idx) names = [] for basename, indices in six.iteritems(by_name): if len(indices) == 1: # There is only one model with this name, so it doesn't need an # index appended to its name names.append((basename, indices[0])) else: for idx in indices: names.append(('{0}_{1}'.format(basename, idx), idx)) # Sort according to the models' original sort orders names.sort(key=lambda k: k[1]) names = tuple(k[0] for k in names) cls._submodels_names = names return names @property def param_names(cls): if cls._param_names is None: cls._init_param_names() return cls._param_names @property def fittable(cls): if cls._fittable is None: cls._fittable = all(m.fittable for m in cls._get_submodels()) return cls._fittable # TODO: Maybe we could use make_function_with_signature for evaluate, but # it's probably not worth it (and I'm not sure what the limit is on number # of function arguments/local variables but we could break that limit for # complicated compound models... def evaluate(cls, *args): if cls._evaluate is None: func = cls._tree.evaluate(BINARY_OPERATORS, getter=cls._model_evaluate_getter)[0] # Making this a staticmethod isn't strictly necessary for Python 3, # but it is necessary on Python 2 since looking up cls._evaluate # will return an unbound method otherwise cls._evaluate = staticmethod(func) inputs = args[:cls.n_inputs] params = iter(args[cls.n_inputs:]) result = cls._evaluate(inputs, params) if cls.n_outputs == 1: return result[0] else: return result # TODO: This supports creating a new compound model from two existing # compound models (or normal models) and a single operator. However, it # ought also to be possible to create a new model from an *entire* # expression, represented as a sequence of operators and their operands (or # an exiting ExpressionTree) and build that into a compound model without # creating an intermediate _CompoundModel class for every single operator # in the expression. This will prove to be a useful optimization in many # cases @classmethod def _from_operator(mcls, operator, left, right, additional_members={}): """ Given a Python operator (represented by a string, such as ``'+'`` or ``'*'``, and two model classes or instances, return a new compound model that evaluates the given operator on the outputs of the left and right input models. If either of the input models are a model *class* (i.e. a subclass of `~astropy.modeling.Model`) then the returned model is a new subclass of `~astropy.modeling.Model` that may be instantiated with any parameter values. If both input models are *instances* of a model, a new class is still created, but this method returns an *instance* of that class, taking the parameter values from the parameters of the input model instances. If given, the ``additional_members`` `dict` may provide additional class members that should be added to the generated `~astropy.modeling.Model` subclass. Some members that are generated by this method should not be provided by ``additional_members``. These include ``_tree``, ``inputs``, ``outputs``, ``linear``, ``standard_broadcasting``, and ``__module__`. This is currently for internal use only. """ # Note, currently this only supports binary operators, but could be # easily extended to support unary operators (namely '-') if/when # needed children = [] for child in (left, right): if isinstance(child, (_CompoundModelMeta, _CompoundModel)): children.append(child._tree) else: children.append(ExpressionTree(child)) tree = ExpressionTree(operator, left=children[0], right=children[1]) name = str('CompoundModel{0}'.format(_CompoundModelMeta._nextid)) _CompoundModelMeta._nextid += 1 mod = find_current_module(3) if mod: modname = mod.__name__ else: modname = '__main__' # TODO: These aren't the full rules for handling inputs and outputs, but # this will handle most basic cases correctly if operator == '|': inputs = left.inputs outputs = right.outputs if left.n_outputs != right.n_inputs: raise ModelDefinitionError( "Unsupported operands for |: {0} (n_inputs={1}, " "n_outputs={2}) and {3} (n_inputs={4}, n_outputs={5}); " "n_outputs for the left-hand model must match n_inputs " "for the right-hand model.".format( left.name, left.n_inputs, left.n_outputs, right.name, right.n_inputs, right.n_outputs)) elif operator == '&': inputs = combine_labels(left.inputs, right.inputs) outputs = combine_labels(left.outputs, right.outputs) else: # Without loss of generality inputs = left.inputs outputs = left.outputs if (left.n_inputs != right.n_inputs or left.n_outputs != right.n_outputs): raise ModelDefinitionError( "Unsupported operands for {0}: {1} (n_inputs={2}, " "n_outputs={3}) and {4} (n_inputs={5}, n_outputs={6}); " "models must have the same n_inputs and the same " "n_outputs for this operator".format( operator, left.name, left.n_inputs, left.n_outputs, right.name, right.n_inputs, right.n_outputs)) if operator in ('|', '+', '-'): linear = left.linear and right.linear else: # Which is not to say it is *definitely* not linear but it would be # trickier to determine linear = False standard_broadcasting = \ left.standard_broadcasting and right.standard_broadcasting # Note: If any other members are added here, make sure to mention them # in the docstring of this method. members = additional_members members.update({ '_tree': tree, '_is_dynamic': True, # See docs for _ModelMeta._is_dynamic 'inputs': inputs, 'outputs': outputs, 'linear': linear, 'standard_broadcasting': standard_broadcasting, '__module__': str(modname)}) new_cls = mcls(name, (_CompoundModel,), members) if isinstance(left, Model) and isinstance(right, Model): # Both models used in the operator were already instantiated models, # not model *classes*. As such it's not particularly useful to return # the class itself, but to instead produce a new instance: instance = new_cls() # Workaround for https://github.com/astropy/astropy/issues/3542 # TODO: Any effort to restructure the tree-like data structure for # compound models should try to obviate this workaround--if # intermediate compound models are stored in the tree as well then # we can immediately check for custom inverses on sub-models when # computing the inverse instance._user_inverse = mcls._make_user_inverse( operator, left, right) return instance # Otherwise return the new uninstantiated class itself return new_cls @classmethod def _handle_backwards_compat(mcls, name, members): # Override _handle_backwards_compat from _ModelMeta to be a no-op; it # is not needed since compound models did not exist before version 1.0 # anyways. # TODO: Remove this at the same time as removing # _ModelMeta._handle_backwards_compat return @classmethod def _make_user_inverse(mcls, operator, left, right): """ Generates an inverse `Model` for this `_CompoundModel` when either model in the operation has a *custom inverse* that was manually assigned by the user. If either model has a custom inverse, and in particular if another `_CompoundModel` has a custom inverse, then none of that model's sub-models should be considered at all when computing the inverse. So in that case we just compute the inverse ahead of time and set it as the new compound model's custom inverse. Note, this use case only applies when combining model instances, since model classes don't currently have a notion of a "custom inverse" (though it could probably be supported by overriding the class's inverse property). TODO: Consider fixing things so the aforementioned class-based case works as well. However, for the present purposes this is good enough. """ if not (operator in ('&', '|') and (left._user_inverse or right._user_inverse)): # These are the only operators that support an inverse right now return None try: left_inv = left.inverse right_inv = right.inverse except NotImplementedError: # If either inverse is undefined then just return False; this # means the normal _CompoundModel.inverse routine will fail # naturally anyways, since it requires all sub-models to have # an inverse defined return None if operator == '&': return left_inv & right_inv else: return right_inv | left_inv # TODO: Perhaps, just perhaps, the post-order (or ???-order) ordering of # leaf nodes is something the ExpressionTree class itself could just know def _get_submodels(cls): # Would make this a lazyproperty but those don't currently work with # type objects if cls._submodels is not None: return cls._submodels submodels = [c.value for c in cls._tree.traverse_postorder() if c.isleaf] cls._submodels = submodels return submodels def _init_param_descriptors(cls): """ This routine sets up the names for all the parameters on a compound model, including figuring out unique names for those parameters and also mapping them back to their associated parameters of the underlying submodels. Setting this all up is costly, and only necessary for compound models that a user will directly interact with. For example when building an expression like:: >>> M = (Model1 + Model2) * Model3 # doctest: +SKIP the user will generally never interact directly with the temporary result of the subexpression ``(Model1 + Model2)``. So there's no need to setup all the parameters for that temporary throwaway. Only once the full expression is built and the user initializes or introspects ``M`` is it necessary to determine its full parameterization. """ # Accessing cls.param_names will implicitly call _init_param_names if # needed and thus also set up the _param_map; I'm not crazy about that # design but it stands for now for param_name in cls.param_names: submodel_idx, submodel_param = cls._param_map[param_name] submodel = cls[submodel_idx] orig_param = getattr(submodel, submodel_param, None) if not isinstance(orig_param, Parameter): # This is just a pathological case that is only really needed # to support the deprecated _CompositeModel--composite models # claim to have some parameters, but don't actually implement # the parameter descriptors, so we just make one up basically, # with a default value of zero. This value will just be thrown # away, basically. # TODO: Remove this special case once the legacy interfaces # have been removed (basically this entire if statement--keep # only the parts in the else: clause. new_param = Parameter(name=param_name, default=0) else: if isinstance(submodel, Model): # Take the parameter's default from the model's value for that # parameter default = orig_param.value else: default = orig_param.default # Copy constraints constraints = dict((key, getattr(orig_param, key)) for key in Model.parameter_constraints) # Note: Parameter.copy() returns a new unbound Parameter, never # a bound Parameter even if submodel is a Model instance (as # opposed to a Model subclass) new_param = orig_param.copy(name=param_name, default=default, **constraints) setattr(cls, param_name, new_param) def _init_param_names(cls): """ This subroutine is solely for setting up the ``param_names`` attribute itself. See ``_init_param_descriptors`` for the full parameter setup. """ # Currently this skips over Model *instances* in the expression tree; # basically these are treated as constants and do not add # fittable/tunable parameters to the compound model. # TODO: I'm not 100% happy with this design, and maybe we need some # interface for distinguishing fittable/settable parameters with # *constant* parameters (which would be distinct from parameters with # fixed constraints since they're permanently locked in place). But I'm # not sure if this is really the best way to treat the issue. names = [] param_map = {} # Start counting the suffix indices to put on parameter names from the # slice_offset. Usually this will just be zero, but for compound # models that were sliced from another compound model this may be > 0 param_suffix = cls._slice_offset for idx, model in enumerate(cls._get_submodels()): if not model.param_names: # Skip models that don't have parameters in the numbering # TODO: Reevaluate this if it turns out to be confusing, though # parameter-less models are not very common in practice (there # are a few projections that don't take parameters) continue for param_name in model.param_names: # This is sort of heuristic, but we want to check that # model.param_name *actually* returns a Parameter descriptor, # and that the model isn't some inconsistent type that happens # to have a param_names attribute but does not actually # implement settable parameters. # In the future we can probably remove this check, but this is # here specifically to support the legacy compat # _CompositeModel which can be considered a pathological case # in the context of the new framework #if not isinstance(getattr(model, param_name, None), # Parameter): # break name = '{0}_{1}'.format(param_name, param_suffix + idx) names.append(name) param_map[name] = (idx, param_name) cls._param_names = tuple(names) cls._param_map = param_map cls._param_map_inverse = dict((v, k) for k, v in param_map.items()) def _format_expression(cls): # TODO: At some point might be useful to make a public version of this, # albeit with more formatting options return cls._tree.format_expression(OPERATOR_PRECEDENCE) def _normalize_index(cls, index): """ Converts an index given to __getitem__ to either an integer, or a slice with integer start and stop values. If the length of the slice is exactly 1 this converts the index to a simple integer lookup. Negative integers are converted to positive integers. """ def get_index_from_name(name): try: return cls.submodel_names.index(name) except ValueError: raise IndexError( 'Compound model {0} does not have a component named ' '{1}'.format(cls.name, name)) def check_for_negative_index(index): if index < 0: new_index = len(cls.submodel_names) + index if new_index < 0: # If still < 0 then this is an invalid index raise IndexError( "Model index {0} out of range.".format(index)) else: index = new_index return index if isinstance(index, six.string_types): return get_index_from_name(index) elif isinstance(index, slice): if index.step not in (1, None): # In principle it could be but I can scarcely imagine a case # where it would be useful. If someone can think of one then # we can enable it. raise ValueError( "Step not supported for compound model slicing.") start = index.start if index.start is not None else 0 stop = (index.stop if index.stop is not None else len(cls.submodel_names)) if isinstance(start, int): start = check_for_negative_index(start) if isinstance(stop, int): stop = check_for_negative_index(stop) if isinstance(start, six.string_types): start = get_index_from_name(start) if isinstance(stop, six.string_types): stop = get_index_from_name(stop) + 1 length = stop - start if length == 1: return start elif length <= 0: raise ValueError("Empty slice of a compound model.") return slice(start, stop) elif isinstance(index, int): if index >= len(cls.submodel_names): raise IndexError( "Model index {0} out of range.".format(index)) return check_for_negative_index(index) raise TypeError( 'Submodels can be indexed either by their integer order or ' 'their name (got {0!r}).'.format(index)) def _get_slice(cls, start, stop): """ Return a new model build from a sub-expression of the expression represented by this model. Right now this is highly inefficient, as it creates a new temporary model for each operator that appears in the sub-expression. It would be better if this just built a new expression tree, and the new model instantiated directly from that tree. Once tree -> model instantiation is possible this should be fixed to use that instead. """ members = {'_slice_offset': cls._slice_offset + start} operators = dict((oper, _model_oper(oper, additional_members=members)) for oper in BINARY_OPERATORS) return cls._tree.evaluate(operators, start=start, stop=stop) @staticmethod def _model_evaluate_getter(idx, model): n_params = len(model.param_names) n_inputs = model.n_inputs n_outputs = model.n_outputs # There is currently an unfortunate inconsistency in some models, which # requires them to be instantiated for their evaluate to work. I think # that needs to be reconsidered and fixed somehow, but in the meantime # we need to check for that case if (not isinstance(model, Model) and isinstancemethod(model, model.evaluate)): if n_outputs == 1: # Where previously model was a class, now make an instance def f(inputs, params): param_values = tuple(islice(params, n_params)) return (model(*param_values).evaluate( *chain(inputs, param_values)),) else: def f(inputs, params): param_values = tuple(islice(params, n_params)) return model(*param_values).evaluate( *chain(inputs, param_values)) else: evaluate = model.evaluate if n_outputs == 1: f = lambda inputs, params: \ (evaluate(*chain(inputs, islice(params, n_params))),) else: f = lambda inputs, params: \ evaluate(*chain(inputs, islice(params, n_params))) return (f, n_inputs, n_outputs) @six.add_metaclass(_CompoundModelMeta) class _CompoundModel(Model): fit_deriv = None col_fit_deriv = False _submodels = None def __getattr__(self, attr): value = getattr(self.__class__, attr) if hasattr(value, '__get__'): # Object is a descriptor, so we should really return the result of # its __get__ value = value.__get__(self, self.__class__) return value def __getitem__(self, index): index = self.__class__._normalize_index(index) model = self.__class__[index] if isinstance(index, slice): param_names = model.param_names else: param_map = self.__class__._param_map_inverse param_names = tuple(param_map[index, name] for name in model.param_names) return model._from_existing(self, param_names) if sys.version_info[:3] < (2, 7, 3): def __reduce__(self): # _CompoundModel classes have a generated evaluate() that is cached # off in the _evaluate attribute. This can't be pickled, and so # should be regenerated after unpickling (alas) if find_current_module(2) is not copy: # The copy module also uses __reduce__, but there's no problem # there. raise RuntimeError( "Pickling of compound models is not possible using Python " "versions less than 2.7.3 due to a bug in Python. See " "http://docs.astropy.org/en/v1.0.4/known_issues.html#" "pickling-error-on-compound-models for more information (" "tried to pickle {0!r}).".format(self)) else: return super(_CompoundModel, self).__reduce__() @property def submodel_names(self): return self.__class__.submodel_names @property def param_names(self): return self.__class__.param_names @property def fittable(self): return self.__class__.fittable @sharedmethod def evaluate(self, *args): return self.__class__.evaluate(*args) # TODO: The way this works is highly inefficient--the inverse is created by # making a new model for each operator in the compound model, which could # potentially mean creating a large number of temporary throwaway model # classes. This can definitely be optimized in the future by implementing # a way to construct a single model class from an existing tree @property def inverse(self): def _not_implemented(oper): def _raise(x, y): raise NotImplementedError( "The inverse is not currently defined for compound " "models created using the {0} operator.".format(oper)) return _raise operators = dict((oper, _not_implemented(oper)) for oper in ('+', '-', '*', '/', '**')) operators['&'] = operator.and_ # Reverse the order of compositions operators['|'] = lambda x, y: operator.or_(y, x) leaf_idx = -1 def getter(idx, model): try: # By indexing on self[] this will return an instance of the # model, with all the appropriate parameters set, which is # currently required to return an inverse return self[idx].inverse except NotImplementedError: raise NotImplementedError( "All models in a composite model must have an inverse " "defined in order for the composite model to have an " "inverse. {0!r} does not have an inverse.".format(model)) return self._tree.evaluate(operators, getter=getter) @sharedmethod def _get_submodels(self): return self.__class__._get_submodels() def custom_model(*args, **kwargs): """ Create a model from a user defined function. The inputs and parameters of the model will be inferred from the arguments of the function. This can be used either as a function or as a decorator. See below for examples of both usages. .. note:: All model parameters have to be defined as keyword arguments with default values in the model function. Use `None` as a default argument value if you do not want to have a default value for that parameter. Parameters ---------- func : function Function which defines the model. It should take N positional arguments where ``N`` is dimensions of the model (the number of independent variable in the model), and any number of keyword arguments (the parameters). It must return the value of the model (typically as an array, but can also be a scalar for scalar inputs). This corresponds to the `~astropy.modeling.Model.evaluate` method. fit_deriv : function, optional Function which defines the Jacobian derivative of the model. I.e., the derivative with respect to the *parameters* of the model. It should have the same argument signature as ``func``, but should return a sequence where each element of the sequence is the derivative with respect to the corresponding argument. This corresponds to the :meth:`~astropy.modeling.FittableModel.fit_deriv` method. Examples -------- Define a sinusoidal model function as a custom 1D model:: >>> from astropy.modeling.models import custom_model >>> import numpy as np >>> def sine_model(x, amplitude=1., frequency=1.): ... return amplitude * np.sin(2 * np.pi * frequency * x) >>> def sine_deriv(x, amplitude=1., frequency=1.): ... return 2 * np.pi * amplitude * np.cos(2 * np.pi * frequency * x) >>> SineModel = custom_model(sine_model, fit_deriv=sine_deriv) Create an instance of the custom model and evaluate it:: >>> model = SineModel() >>> model(0.25) 1.0 This model instance can now be used like a usual astropy model. The next example demonstrates a 2D Moffat function model, and also demonstrates the support for docstrings (this example could also include a derivative, but it has been omitted for simplicity):: >>> @custom_model ... def Moffat2D(x, y, amplitude=1.0, x_0=0.0, y_0=0.0, gamma=1.0, ... alpha=1.0): ... \"\"\"Two dimensional Moffat function.\"\"\" ... rr_gg = ((x - x_0) ** 2 + (y - y_0) ** 2) / gamma ** 2 ... return amplitude * (1 + rr_gg) ** (-alpha) ... >>> print(Moffat2D.__doc__) Two dimensional Moffat function. >>> model = Moffat2D() >>> model(1, 1) # doctest: +FLOAT_CMP 0.3333333333333333 """ fit_deriv = kwargs.get('fit_deriv', None) if len(args) == 1 and six.callable(args[0]): return _custom_model_wrapper(args[0], fit_deriv=fit_deriv) elif not args: return functools.partial(_custom_model_wrapper, fit_deriv=fit_deriv) else: raise TypeError( "{0} takes at most one positional argument (the callable/" "function to be turned into a model. When used as a decorator " "it should be passed keyword arguments only (if " "any).".format(__name__)) def _custom_model_wrapper(func, fit_deriv=None): """ Internal implementation `custom_model`. When `custom_model` is called as a function its arguments are passed to this function, and the result of this function is returned. When `custom_model` is used as a decorator a partial evaluation of this function is returned by `custom_model`. """ if not six.callable(func): raise ModelDefinitionError( "func is not callable; it must be a function or other callable " "object") if fit_deriv is not None and not six.callable(fit_deriv): raise ModelDefinitionError( "fit_deriv not callable; it must be a function or other " "callable object") model_name = func.__name__ inputs, params = get_inputs_and_params(func) if (fit_deriv is not None and len(six.get_function_defaults(fit_deriv)) != len(params)): raise ModelDefinitionError("derivative function should accept " "same number of parameters as func.") # TODO: Maybe have a clever scheme for default output name? if inputs: output_names = (inputs[0].name,) else: output_names = ('x',) params = dict((param.name, Parameter(param.name, default=param.default)) for param in params) mod = find_current_module(2) if mod: modname = mod.__name__ else: modname = '__main__' members = { '__module__': str(modname), '__doc__': func.__doc__, 'inputs': tuple(x.name for x in inputs), 'outputs': output_names, 'evaluate': staticmethod(func), } if fit_deriv is not None: members['fit_deriv'] = staticmethod(fit_deriv) members.update(params) return type(model_name, (FittableModel,), members) def render_model(model, arr=None, coords=None): """ Evaluates a model on an input array. Evaluation is limited to a bounding box if the `Model.bounding_box` attribute is set. Parameters ---------- model : `Model` Model to be evaluated. arr : `numpy.ndarray`, optional Array on which the model is evaluated. coords : array-like, optional Coordinate arrays mapping to ``arr``, such that ``arr[coords] == arr``. Returns ------- array : `numpy.ndarray` The model evaluated on the input ``arr`` or a new array from ``coords``. If ``arr`` and ``coords`` are both `None`, the returned array is limited to the `Model.bounding_box` limits. If `Model.bounding_box` is `None`, ``arr`` or ``coords`` must be passed. Examples -------- :ref:`bounding-boxes` """ bbox = model.bounding_box if (coords is None) & (arr is None) & (bbox is None): raise AssertionError('If no bounding_box is set, coords or arr must be input.') # for consistent indexing if model.n_inputs == 1: if coords is not None: coords = [coords] if bbox is not None: bbox = [bbox] if arr is not None: arr = arr.copy() # Check dimensions match model assert arr.ndim == model.n_inputs if coords is not None: # Check dimensions match arr and model coords = np.array(coords) assert len(coords) == model.n_inputs if arr is not None: assert coords[0].shape == arr.shape else: arr = np.zeros(coords[0].shape) if bbox is not None: # assures position is at center pixel, important when using add_array pd = pos, delta = np.array([(np.mean(bb), np.ceil((bb[1] - bb[0]) / 2)) for bb in bbox]).astype(int).T if coords is not None: sub_shape = tuple(delta * 2 + 1) sub_coords = np.array([extract_array(c, sub_shape, pos) for c in coords]) else: limits = [slice(p - d, p + d + 1, 1) for p, d in pd.T] sub_coords = np.mgrid[limits] sub_coords = sub_coords[::-1] if arr is None: arr = model(*sub_coords) else: try: arr = add_array(arr, model(*sub_coords), pos) except ValueError: raise ValueError('The `bounding_box` is larger than the input' ' arr in one or more dimensions. Set ' '`model.bounding_box = None`.') else: if coords is None: im_shape = arr.shape limits = [slice(i) for i in im_shape] coords = np.mgrid[limits] arr += model(*coords[::-1]) return arr def _prepare_inputs_single_model(model, params, inputs, **kwargs): broadcasts = [] for idx, _input in enumerate(inputs): input_shape = _input.shape # Ensure that array scalars are always upgrade to 1-D arrays for the # sake of consistency with how parameters work. They will be cast back # to scalars at the end if not input_shape: inputs[idx] = _input.reshape((1,)) if not params: max_broadcast = input_shape else: max_broadcast = () for param in params: try: if model.standard_broadcasting: broadcast = check_broadcast(input_shape, param.shape) else: broadcast = input_shape except IncompatibleShapeError: raise ValueError( "Model input argument {0!r} of shape {1!r} cannot be " "broadcast with parameter {2!r} of shape " "{3!r}.".format(model.inputs[idx], input_shape, param.name, param.shape)) if len(broadcast) > len(max_broadcast): max_broadcast = broadcast elif len(broadcast) == len(max_broadcast): max_broadcast = max(max_broadcast, broadcast) broadcasts.append(max_broadcast) if model.n_outputs > model.n_inputs: if len(set(broadcasts)) > 1: raise ValueError( "For models with n_outputs > n_inputs, the combination of " "all inputs and parameters must broadcast to the same shape, " "which will be used as the shape of all outputs. In this " "case some of the inputs had different shapes, so it is " "ambiguous how to format outputs for this model. Try using " "inputs that are all the same size and shape.") else: # Extend the broadcasts list to include shapes for all outputs extra_outputs = model.n_outputs - model.n_inputs if not broadcasts: # If there were no inputs then the broadcasts list is empty # just add a None since there is no broadcasting of outputs and # inputs necessary (see _prepare_outputs_single_model) broadcasts.append(None) broadcasts.extend([broadcasts[0]] * extra_outputs) return inputs, (broadcasts,) def _prepare_outputs_single_model(model, outputs, format_info): broadcasts = format_info[0] outputs = list(outputs) for idx, output in enumerate(outputs): broadcast_shape = broadcasts[idx] if broadcast_shape is not None: if not broadcast_shape: # Shape is (), i.e. a scalar should be returned outputs[idx] = np.asscalar(output) else: outputs[idx] = output.reshape(broadcast_shape) if model.n_outputs == 1: return outputs[0] else: return tuple(outputs) def _prepare_inputs_model_set(model, params, inputs, n_models, model_set_axis, **kwargs): reshaped = [] pivots = [] for idx, _input in enumerate(inputs): max_param_shape = () if n_models > 1 and model_set_axis is not False: # Use the shape of the input *excluding* the model axis input_shape = (_input.shape[:model_set_axis] + _input.shape[model_set_axis + 1:]) else: input_shape = _input.shape for param in params: try: check_broadcast(input_shape, param.shape) except IncompatibleShapeError: raise ValueError( "Model input argument {0!r} of shape {1!r} cannot be " "broadcast with parameter {2!r} of shape " "{3!r}.".format(model.inputs[idx], input_shape, param.name, param.shape)) if len(param.shape) > len(max_param_shape): max_param_shape = param.shape # We've now determined that, excluding the model_set_axis, the # input can broadcast with all the parameters input_ndim = len(input_shape) if model_set_axis is False: if len(max_param_shape) > input_ndim: # Just needs to prepend new axes to the input n_new_axes = 1 + len(max_param_shape) - input_ndim new_axes = (1,) * n_new_axes new_shape = new_axes + _input.shape pivot = model.model_set_axis else: pivot = input_ndim - len(max_param_shape) new_shape = (_input.shape[:pivot] + (1,) + _input.shape[pivot:]) new_input = _input.reshape(new_shape) else: if len(max_param_shape) >= input_ndim: n_new_axes = len(max_param_shape) - input_ndim pivot = model.model_set_axis new_axes = (1,) * n_new_axes new_shape = (_input.shape[:pivot + 1] + new_axes + _input.shape[pivot + 1:]) new_input = _input.reshape(new_shape) else: pivot = _input.ndim - len(max_param_shape) - 1 new_input = np.rollaxis(_input, model_set_axis, pivot + 1) pivots.append(pivot) reshaped.append(new_input) if model.n_inputs < model.n_outputs: pivots.extend([model_set_axis] * (model.n_outputs - model.n_inputs)) return reshaped, (pivots,) def _prepare_outputs_model_set(model, outputs, format_info): pivots = format_info[0] outputs = list(outputs) for idx, output in enumerate(outputs): pivot = pivots[idx] if pivot < output.ndim and pivot != model.model_set_axis: outputs[idx] = np.rollaxis(output, pivot, model.model_set_axis) if model.n_outputs == 1: return outputs[0] else: return tuple(outputs) def _validate_input_shapes(inputs, argnames, n_models, model_set_axis, validate_broadcasting): """ Perform basic validation of model inputs--that they are mutually broadcastable and that they have the minimum dimensions for the given model_set_axis. If validation succeeds, returns the total shape that will result from broadcasting the input arrays with each other. """ check_model_set_axis = n_models > 1 and model_set_axis is not False if not (validate_broadcasting or check_model_set_axis): # Nothing else needed here return all_shapes = [] for idx, _input in enumerate(inputs): input_shape = np.shape(_input) # Ensure that the input's model_set_axis matches the model's # n_models if input_shape and check_model_set_axis: # Note: Scalar inputs *only* get a pass on this if len(input_shape) < model_set_axis + 1: raise ValueError( "For model_set_axis={0}, all inputs must be at " "least {1}-dimensional.".format( model_set_axis, model_set_axis + 1)) elif input_shape[model_set_axis] != n_models: raise ValueError( "Input argument {0!r} does not have the correct " "dimensions in model_set_axis={1} for a model set with " "n_models={2}.".format(argnames[idx], model_set_axis, n_models)) all_shapes.append(input_shape) if not validate_broadcasting: return try: input_broadcast = check_broadcast(*all_shapes) except IncompatibleShapeError as exc: shape_a, shape_a_idx, shape_b, shape_b_idx = exc.args arg_a = argnames[shape_a_idx] arg_b = argnames[shape_b_idx] raise ValueError( "Model input argument {0!r} of shape {1!r} cannot " "be broadcast with input {2!r} of shape {3!r}".format( arg_a, shape_a, arg_b, shape_b)) return input_broadcast copyreg.pickle(_ModelMeta, _ModelMeta.__reduce__) copyreg.pickle(_CompoundModelMeta, _CompoundModelMeta.__reduce__) astropy-1.1.1/astropy/modeling/powerlaws.py0000644001134200020070000001461312640262015022016 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Power law model variants """ from __future__ import (absolute_import, unicode_literals, division, print_function) import numpy as np from .core import Fittable1DModel from .parameters import Parameter __all__ = sorted(['PowerLaw1D', 'BrokenPowerLaw1D', 'ExponentialCutoffPowerLaw1D', 'LogParabola1D']) class PowerLaw1D(Fittable1DModel): """ One dimensional power law model. Parameters ---------- amplitude : float Model amplitude at the reference point x_0 : float Reference point alpha : float Power law index See Also -------- BrokenPowerLaw1D, ExponentialCutoffPowerLaw1D, LogParabola1D Notes ----- Model formula (with :math:`A` for ``amplitude`` and :math:`\\alpha` for ``alpha``): .. math:: f(x) = A (x / x_0) ^ {-\\alpha} """ amplitude = Parameter(default=1) x_0 = Parameter(default=1) alpha = Parameter(default=1) @staticmethod def evaluate(x, amplitude, x_0, alpha): """One dimensional power law model function""" xx = x / x_0 return amplitude * xx ** (-alpha) @staticmethod def fit_deriv(x, amplitude, x_0, alpha): """One dimensional power law derivative with respect to parameters""" xx = x / x_0 d_amplitude = xx ** (-alpha) d_x_0 = amplitude * alpha * d_amplitude / x_0 d_alpha = -amplitude * d_amplitude * np.log(xx) return [d_amplitude, d_x_0, d_alpha] class BrokenPowerLaw1D(Fittable1DModel): """ One dimensional power law model with a break. Parameters ---------- amplitude : float Model amplitude at the break point x_break : float Break point alpha_1 : float Power law index for x < x_break alpha_2 : float Power law index for x > x_break See Also -------- PowerLaw1D, ExponentialCutoffPowerLaw1D, LogParabola1D Notes ----- Model formula (with :math:`A` for ``amplitude`` and :math:`\\alpha_1` for ``alpha_1`` and :math:`\\alpha_2` for ``alpha_2``): .. math:: f(x) = \\left \\{ \\begin{array}{ll} A (x / x_{break}) ^ {-\\alpha_1} & : x < x_{break} \\\\ A (x / x_{break}) ^ {-\\alpha_2} & : x > x_{break} \\\\ \\end{array} \\right. """ amplitude = Parameter(default=1) x_break = Parameter(default=1) alpha_1 = Parameter(default=1) alpha_2 = Parameter(default=1) @staticmethod def evaluate(x, amplitude, x_break, alpha_1, alpha_2): """One dimensional broken power law model function""" alpha = np.where(x < x_break, alpha_1, alpha_2) xx = x / x_break return amplitude * xx ** (-alpha) @staticmethod def fit_deriv(x, amplitude, x_break, alpha_1, alpha_2): """One dimensional broken power law derivative with respect to parameters""" alpha = np.where(x < x_break, alpha_1, alpha_2) xx = x / x_break d_amplitude = xx ** (-alpha) d_x_break = amplitude * alpha * d_amplitude / x_break d_alpha = -amplitude * d_amplitude * np.log(xx) d_alpha_1 = np.where(x < x_break, d_alpha, 0) d_alpha_2 = np.where(x >= x_break, d_alpha, 0) return [d_amplitude, d_x_break, d_alpha_1, d_alpha_2] class ExponentialCutoffPowerLaw1D(Fittable1DModel): """ One dimensional power law model with an exponential cutoff. Parameters ---------- amplitude : float Model amplitude x_0 : float Reference point alpha : float Power law index x_cutoff : float Cutoff point See Also -------- PowerLaw1D, BrokenPowerLaw1D, LogParabola1D Notes ----- Model formula (with :math:`A` for ``amplitude`` and :math:`\\alpha` for ``alpha``): .. math:: f(x) = A (x / x_0) ^ {-\\alpha} \\exp (-x / x_{cutoff}) """ amplitude = Parameter(default=1) x_0 = Parameter(default=1) alpha = Parameter(default=1) x_cutoff = Parameter(default=1) @staticmethod def evaluate(x, amplitude, x_0, alpha, x_cutoff): """One dimensional exponential cutoff power law model function""" xx = x / x_0 return amplitude * xx ** (-alpha) * np.exp(-x / x_cutoff) @staticmethod def fit_deriv(x, amplitude, x_0, alpha, x_cutoff): """One dimensional exponential cutoff power law derivative with respect to parameters""" xx = x / x_0 xc = x / x_cutoff d_amplitude = xx ** (-alpha) * np.exp(-xc) d_x_0 = alpha * amplitude * d_amplitude / x_0 d_alpha = -amplitude * d_amplitude * np.log(xx) d_x_cutoff = amplitude * x * d_amplitude / x_cutoff ** 2 return [d_amplitude, d_x_0, d_alpha, d_x_cutoff] class LogParabola1D(Fittable1DModel): """ One dimensional log parabola model (sometimes called curved power law). Parameters ---------- amplitude : float Model amplitude x_0 : float Reference point alpha : float Power law index beta : float Power law curvature See Also -------- PowerLaw1D, BrokenPowerLaw1D, ExponentialCutoffPowerLaw1D Notes ----- Model formula (with :math:`A` for ``amplitude`` and :math:`\\alpha` for ``alpha`` and :math:`\\beta` for ``beta``): .. math:: f(x) = A \\left(\\frac{x}{x_{0}}\\right)^{- \\alpha - \\beta \\log{\\left (\\frac{x}{x_{0}} \\right )}} """ amplitude = Parameter(default=1) x_0 = Parameter(default=1) alpha = Parameter(default=1) beta = Parameter(default=0) @staticmethod def evaluate(x, amplitude, x_0, alpha, beta): """One dimensional log parabola model function""" xx = x / x_0 exponent = -alpha - beta * np.log(xx) return amplitude * xx ** exponent @staticmethod def fit_deriv(x, amplitude, x_0, alpha, beta): """One dimensional log parabola derivative with respect to parameters""" xx = x / x_0 log_xx = np.log(xx) exponent = -alpha - beta * log_xx d_amplitude = xx ** exponent d_beta = -amplitude * d_amplitude * log_xx ** 2 d_x_0 = amplitude * d_amplitude * (beta * log_xx / x_0 - exponent / x_0) d_alpha = -amplitude * d_amplitude * log_xx return [d_amplitude, d_x_0, d_alpha, d_beta] astropy-1.1.1/astropy/modeling/utils.py0000644001134200020070000005112312644017723021140 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module provides utility functions for the models package """ from __future__ import (absolute_import, unicode_literals, division, print_function) from collections import deque, MutableMapping import numpy as np from ..extern import six from ..extern.six.moves import xrange, zip_longest from ..utils import isiterable from ..utils.compat.funcsigs import signature __all__ = ['ExpressionTree', 'AliasDict', 'check_broadcast', 'poly_map_domain', 'comb', 'ellipse_extent'] class ExpressionTree(object): __slots__ = ['left', 'right', 'value'] def __init__(self, value, left=None, right=None): self.value = value self.left = left # Two subtrees can't be the same *object* or else traverse_postorder # breaks, so we just always copy the right subtree to subvert that. if right is not None and left is right: right = right.copy() self.right = right def __getstate__(self): # For some reason the default pickle protocol on Python 2 does not just # do this. On Python 3 it's not a problem. return dict((slot, getattr(self, slot)) for slot in self.__slots__) def __setstate__(self, state): for slot, value in state.items(): setattr(self, slot, value) @property def isleaf(self): return self.left is None and self.right is None def traverse_preorder(self): stack = deque([self]) while stack: node = stack.pop() yield node if node.right is not None: stack.append(node.right) if node.left is not None: stack.append(node.left) def traverse_inorder(self): stack = deque() node = self while stack or node is not None: if node is not None: stack.append(node) node = node.left else: node = stack.pop() yield node node = node.right def traverse_postorder(self): stack = deque([self]) last = None while stack: node = stack[-1] if last is None or node is last.left or node is last.right: if node.left is not None: stack.append(node.left) elif node.right is not None: stack.append(node.right) elif node.left is last and node.right is not None: stack.append(node.right) else: yield stack.pop() last = node def evaluate(self, operators, getter=None, start=0, stop=None): """Evaluate the expression represented by this tree. ``Operators`` should be a dictionary mapping operator names ('tensor', 'product', etc.) to a function that implements that operator for the correct number of operands. If given, ``getter`` is a function evaluated on each *leaf* node's value before applying the operator between them. This could be used, for example, to operate on an attribute of the node values rather than directly on the node values. The ``getter`` is passed both the index of the leaf (a count starting at 0 that is incremented after each leaf is found) and the leaf node itself. The ``start`` and ``stop`` arguments allow evaluating a sub-expression within the expression tree. TODO: Document this better. """ stack = deque() if getter is None: getter = lambda idx, value: value if start is None: start = 0 leaf_idx = 0 for node in self.traverse_postorder(): if node.isleaf: # For a "tree" containing just a single operator at the root # Also push the index of this leaf onto the stack, which will # prove useful for evaluating subexpressions stack.append((getter(leaf_idx, node.value), leaf_idx)) leaf_idx += 1 else: operator = operators[node.value] if len(stack) < 2: # Skip this operator if there are not enough operands on # the stack; this can happen if some operands were skipped # when evaluating a sub-expression continue right = stack.pop() left = stack.pop() operands = [] for operand in (left, right): # idx is the leaf index; -1 if not a leaf node if operand[-1] == -1: operands.append(operand) else: operand, idx = operand if start <= idx and (stop is None or idx < stop): operands.append((operand, idx)) if len(operands) == 2: # evaluate the operator with the given operands and place # the result on the stack (with -1 for the "leaf index" # since this result is not a leaf node left, right = operands stack.append((operator(left[0], right[0]), -1)) elif len(operands) == 0: # Just push the left one back on the stack # TODO: Explain and/or refactor this better # This is here because even if both operands were "skipped" # due to being outside the (start, stop) range, we've only # skipped one operator. But there should be at least 2 # operators involving these operands, so we push the one # from the left back onto the stack so that the next # operator will be skipped as well. Should probably come # up with an easier to follow way to write this algorithm stack.append(left) else: # one or more of the operands was not included in the # sub-expression slice, so don't evaluate the operator; # instead place left over operands (if any) back on the # stack for later use stack.extend(operands) return stack.pop()[0] def copy(self): # Hopefully this won't blow the stack for any practical case; if such a # case arises that this won't work then I suppose we can find an # iterative approach. children = [] for child in (self.left, self.right): if isinstance(child, ExpressionTree): children.append(child.copy()) else: children.append(child) return self.__class__(self.value, left=children[0], right=children[1]) def format_expression(self, operator_precedence, format_leaf=None): leaf_idx = 0 operands = deque() if format_leaf is None: format_leaf = lambda i, l: '[{0}]'.format(i) for node in self.traverse_postorder(): if node.isleaf: operands.append(format_leaf(leaf_idx, node)) leaf_idx += 1 continue oper_order = operator_precedence[node.value] right = operands.pop() left = operands.pop() if (node.left is not None and not node.left.isleaf and operator_precedence[node.left.value] < oper_order): left = '({0})'.format(left) if (node.right is not None and not node.right.isleaf and operator_precedence[node.right.value] < oper_order): right = '({0})'.format(right) operands.append(' '.join((left, node.value, right))) return ''.join(operands) class AliasDict(MutableMapping): """ Creates a `dict` like object that wraps an existing `dict` or other `MutableMapping`, along with a `dict` of *key aliases* that translate between specific keys in this dict to different keys in the underlying dict. In other words, keys that do not have an associated alias are accessed and stored like a normal `dict`. However, a key that has an alias is accessed and stored to the "parent" dict via the alias. Parameters ---------- parent : dict-like The parent `dict` that aliased keys and accessed from and stored to. aliases : dict-like Maps keys in this dict to their associated keys in the parent dict. Examples -------- >>> parent = {'a': 1, 'b': 2, 'c': 3} >>> aliases = {'foo': 'a', 'bar': 'c'} >>> alias_dict = AliasDict(parent, aliases) >>> alias_dict['foo'] 1 >>> alias_dict['bar'] 3 Keys in the original parent dict are not visible if they were not aliased:: >>> alias_dict['b'] Traceback (most recent call last): ... KeyError: 'b' Likewise, updates to aliased keys are reflected back in the parent dict:: >>> alias_dict['foo'] = 42 >>> alias_dict['foo'] 42 >>> parent['a'] 42 However, updates/insertions to keys that are *not* aliased are not reflected in the parent dict:: >>> alias_dict['qux'] = 99 >>> alias_dict['qux'] 99 >>> 'qux' in parent False In particular, updates on the `AliasDict` to a key that is equal to one of the aliased keys in the parent dict does *not* update the parent dict. For example, ``alias_dict`` aliases ``'foo'`` to ``'a'``. But assigning to a key ``'a'`` on the `AliasDict` does not impact the parent:: >>> alias_dict['a'] = 'nope' >>> alias_dict['a'] 'nope' >>> parent['a'] 42 """ _store_type = dict """ Subclasses may override this to use other mapping types as the underlying storage, for example an `OrderedDict`. However, even in this case additional work may be needed to get things like the ordering right. """ def __init__(self, parent, aliases): self._parent = parent self._store = self._store_type() self._aliases = dict(aliases) def __getitem__(self, key): if key in self._aliases: try: return self._parent[self._aliases[key]] except KeyError: raise KeyError(key) return self._store[key] def __setitem__(self, key, value): if key in self._aliases: self._parent[self._aliases[key]] = value else: self._store[key] = value def __delitem__(self, key): if key in self._aliases: try: del self._parent[self._aliases[key]] except KeyError: raise KeyError(key) else: del self._store[key] def __iter__(self): """ First iterates over keys from the parent dict (if the aliased keys are present in the parent), followed by any keys in the local store. """ for key, alias in six.iteritems(self._aliases): if alias in self._parent: yield key for key in self._store: yield key def __len__(self): # TODO: # This could be done more efficiently, but at present the use case for # it is narrow if non-existent. return len(list(iter(self))) def __repr__(self): # repr() just like any other dict--this should look transparent store_copy = self._store_type() for key, alias in six.iteritems(self._aliases): if alias in self._parent: store_copy[key] = self._parent[alias] store_copy.update(self._store) return repr(store_copy) class _BoundingBox(tuple): """ Base class for models with custom bounding box templates (methods that return an actual bounding box tuple given some adjustable parameters--see for example `~astropy.modeling.models.Gaussian1D.bounding_box`). On these classes the ``bounding_box`` property still returns a `tuple` giving the default bounding box for that instance of the model. But that tuple may also be a subclass of this class that is callable, and allows a new tuple to be returned using a user-supplied value for any adjustable parameters to the bounding box. """ _model = None def __new__(cls, input_, _model=None): self = super(_BoundingBox, cls).__new__(cls, input_) if _model is not None: # Bind this _BoundingBox (most likely a subclass) to a Model # instance so that its __call__ can access the model self._model = _model return self def __call__(self, *args, **kwargs): raise NotImplementedError( "This bounding box is fixed by the model and does not have " "adjustable parameters.") @classmethod def validate(cls, model, bounding_box): """ Validate a given bounding box sequence against the given model (which may be either a subclass of `~astropy.modeling.Model` or an instance thereof, so long as the ``.inputs`` attribute is defined. Currently this just checks that the bounding_box is either a 2-tuple of lower and upper bounds for 1-D models, or an N-tuple of 2-tuples for N-D models. This also returns a normalized version of the bounding_box input to ensure it is always an N-tuple (even for the 1-D case). """ nd = model.n_inputs if nd == 1: msg = ("Bounding box for {0} model must be a sequence of length " "2 consisting of a lower and upper bound, or a 1-tuple " "containing such a sequence as its sole element.").format( model.name) assert (isiterable(bounding_box) and np.shape(bounding_box) in ((2,), (1, 2))), msg if len(bounding_box) == 1: return cls((tuple(bounding_box[0]),)) else: return cls((tuple(bounding_box),)) else: msg = ("Bounding box for {0} model must be a sequence of length " "{1} (the number of model inputs) consisting of pairs of " "lower and upper bounds for those inputs on which to " "evaluate the model.").format(model.name, nd) assert (isiterable(bounding_box) and np.shape(bounding_box) == (nd, 2)), msg return cls(tuple(bounds) for bounds in bounding_box) def make_binary_operator_eval(oper, f, g): """ Given a binary operator (as a callable of two arguments) ``oper`` and two callables ``f`` and ``g`` which accept the same arguments, returns a *new* function that takes the same arguments as ``f`` and ``g``, but passes the outputs of ``f`` and ``g`` in the given ``oper``. ``f`` and ``g`` are assumed to return tuples (which may be 1-tuples). The given operator is applied element-wise to tuple outputs). Example ------- >>> from operator import add >>> def prod(x, y): ... return (x * y,) ... >>> sum_of_prod = make_binary_operator_eval(add, prod, prod) >>> sum_of_prod(3, 5) (30,) """ return lambda inputs, params: \ tuple(oper(x, y) for x, y in zip(f(inputs, params), g(inputs, params))) class IncompatibleShapeError(ValueError): def __init__(self, shape_a, shape_a_idx, shape_b, shape_b_idx): super(IncompatibleShapeError, self).__init__( shape_a, shape_a_idx, shape_b, shape_b_idx) def check_broadcast(*shapes): """ Determines whether two or more Numpy arrays can be broadcast with each other based on their shape tuple alone. Parameters ---------- *shapes : tuple All shapes to include in the comparison. If only one shape is given it is passed through unmodified. If no shapes are given returns an empty `tuple`. Returns ------- broadcast : `tuple` If all shapes are mutually broadcastable, returns a tuple of the full broadcast shape. """ if len(shapes) == 0: return () elif len(shapes) == 1: return shapes[0] reversed_shapes = (reversed(shape) for shape in shapes) full_shape = [] for dims in zip_longest(*reversed_shapes, fillvalue=1): max_dim = 1 max_dim_idx = None for idx, dim in enumerate(dims): if dim == 1: continue if max_dim == 1: # The first dimension of size greater than 1 max_dim = dim max_dim_idx = idx elif dim != max_dim: raise IncompatibleShapeError( shapes[max_dim_idx], max_dim_idx, shapes[idx], idx) full_shape.append(max_dim) return tuple(full_shape[::-1]) def poly_map_domain(oldx, domain, window): """ Map domain into window by shifting and scaling. Parameters ---------- oldx : array original coordinates domain : list or tuple of length 2 function domain window : list or tuple of length 2 range into which to map the domain """ domain = np.array(domain, dtype=np.float64) window = np.array(window, dtype=np.float64) scl = (window[1] - window[0]) / (domain[1] - domain[0]) off = (window[0] * domain[1] - window[1] * domain[0]) / (domain[1] - domain[0]) return off + scl * oldx def comb(N, k): """ The number of combinations of N things taken k at a time. Parameters ---------- N : int, array Number of things. k : int, array Number of elements taken. """ if (k > N) or (N < 0) or (k < 0): return 0 val = 1 for j in xrange(min(k, N - k)): val = (val * (N - j)) / (j + 1) return val def array_repr_oneline(array): """ Represents a multi-dimensional Numpy array flattened onto a single line. """ r = np.array2string(array, separator=',', suppress_small=True) return ' '.join(l.strip() for l in r.splitlines()) def combine_labels(left, right): """ For use with the join operator &: Combine left input/output labels with right input/output labels. If none of the labels conflict then this just returns a sum of tuples. However if *any* of the labels conflict, this appends '0' to the left-hand labels and '1' to the right-hand labels so there is no ambiguity). """ if set(left).intersection(right): left = tuple(l + '0' for l in left) right = tuple(r + '1' for r in right) return left + right def ellipse_extent(a, b, theta): """ Calculates the extent of a box encapsulating a rotated 2D ellipse. Parameters ---------- a : float Major axis. b : float Minor axis. theta : float Rotation angle in radians. Returns ------- offsets : tuple The absolute value of the offset distances from the ellipse center that define its bounding box region, ``(dx, dy)``. Examples -------- .. plot:: :include-source: import numpy as np import matplotlib.pyplot as plt from astropy.modeling.models import Ellipse2D from astropy.modeling.utils import ellipse_extent, render_model amplitude = 1 x0 = 50 y0 = 50 a = 30 b = 10 theta = np.pi/4 model = Ellipse2D(amplitude, x0, y0, a, b, theta) dx, dy = ellipse_extent(a, b, theta) limits = [x0 - dx, x0 + dx, y0 - dy, y0 + dy] model.bounding_box = limits image = render_model(model) plt.imshow(image, cmap='binary', interpolation='nearest', alpha=.5, extent = limits) plt.show() """ t = np.arctan2(-b * np.tan(theta), a) dx = a * np.cos(t) * np.cos(theta) - b * np.sin(t) * np.sin(theta) t = np.arctan2(b, a * np.tan(theta)) dy = b * np.sin(t) * np.cos(theta) + a * np.cos(t) * np.sin(theta) return np.abs([dx, dy]) def get_inputs_and_params(func): """ Given a callable, determine the input variables and the parameters. Parameters ---------- func : callable Returns ------- inputs, params : tuple Each entry is a list of inspect.Parameter objects """ sig = signature(func) inputs = [] params = [] for param in sig.parameters.values(): if param.kind in (param.VAR_POSITIONAL, param.VAR_KEYWORD): raise ValueError("Signature must not have *args or **kwargs") if param.default == param.empty: inputs.append(param) else: params.append(param) return inputs, params astropy-1.1.1/astropy/modeling/fitting.py0000644001134200020070000010352612640262015021441 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module implements classes (called Fitters) which combine optimization algorithms (typically from `scipy.optimize`) with statistic functions to perform fitting. Fitters are implemented as callable classes. In addition to the data to fit, the ``__call__`` method takes an instance of `~astropy.modeling.core.FittableModel` as input, and returns a copy of the model with its parameters determined by the optimizer. Optimization algorithms, called "optimizers" are implemented in `~astropy.modeling.optimizers` and statistic functions are in `~astropy.modeling.statistic`. The goal is to provide an easy to extend framework and allow users to easily create new fitters by combining statistics with optimizers. There are two exceptions to the above scheme. `~astropy.modeling.fitting.LinearLSQFitter` uses Numpy's `~numpy.linalg.lstsq` function. `~astropy.modeling.fitting.LevMarLSQFitter` uses `~scipy.optimize.leastsq` which combines optimization and statistic in one implementation. """ from __future__ import (absolute_import, unicode_literals, division, print_function) import abc import inspect import operator import warnings from functools import reduce import numpy as np from .utils import poly_map_domain from ..utils.exceptions import AstropyUserWarning from ..extern import six from .optimizers import (SLSQP, Simplex) from .statistic import (leastsquare) __all__ = ['LinearLSQFitter', 'LevMarLSQFitter', 'SLSQPLSQFitter', 'SimplexLSQFitter', 'JointFitter', 'Fitter'] # Statistic functions implemented in `astropy.modeling.statistic.py STATISTICS = [leastsquare] # Optimizers implemented in `astropy.modeling.optimizers.py OPTIMIZERS = [Simplex, SLSQP] from .optimizers import (DEFAULT_MAXITER, DEFAULT_EPS, DEFAULT_ACC) class ModelsError(Exception): """Base class for model exceptions""" class ModelLinearityError(ModelsError): """ Raised when a non-linear model is passed to a linear fitter.""" class UnsupportedConstraintError(ModelsError, ValueError): """ Raised when a fitter does not support a type of constraint. """ class _FitterMeta(abc.ABCMeta): """ Currently just provides a registry for all Fitter classes. """ registry = set() def __new__(mcls, name, bases, members): cls = super(_FitterMeta, mcls).__new__(mcls, name, bases, members) if not inspect.isabstract(cls) and not name.startswith('_'): mcls.registry.add(cls) return cls @six.add_metaclass(_FitterMeta) class Fitter(object): """ Base class for all fitters. Parameters ---------- optimizer : callable A callable implementing an optimization algorithm statistic : callable Statistic function """ def __init__(self, optimizer, statistic): if optimizer is None: raise ValueError("Expected an optimizer.") if statistic is None: raise ValueError("Expected a statistic function.") if inspect.isclass(optimizer): # a callable class self._opt_method = optimizer() elif inspect.isfunction(optimizer): self._opt_method = optimizer else: raise ValueError("Expected optimizer to be a callable class or a function.") if inspect.isclass(statistic): self._stat_method = statistic() else: self._stat_method = statistic def objective_function(self, fps, *args): """ Function to minimize. Parameters ---------- fps : list parameters returned by the fitter args : list [model, [other_args], [input coordinates]] other_args may include weights or any other quantities specific for a statistic Notes ----- The list of arguments (args) is set in the `__call__` method. Fitters may overwrite this method, e.g. when statistic functions require other arguments. """ model = args[0] meas = args[-1] _fitter_to_model_params(model, fps) res = self._stat_method(meas, model, *args[1:-1]) return res @abc.abstractmethod def __call__(self): """ This method performs the actual fitting and modifies the parameter list of a model. Fitter subclasses should implement this method. """ raise NotImplementedError("Subclasses should implement this method.") # TODO: I have ongoing branch elsewhere that's refactoring this module so that # all the fitter classes in here are Fitter subclasses. In the meantime we # need to specify that _FitterMeta is its metaclass. @six.add_metaclass(_FitterMeta) class LinearLSQFitter(object): """ A class performing a linear least square fitting. Uses `numpy.linalg.lstsq` to do the fitting. Given a model and data, fits the model to the data and changes the model's parameters. Keeps a dictionary of auxiliary fitting information. """ supported_constraints = ['fixed'] def __init__(self): self.fit_info = {'residuals': None, 'rank': None, 'singular_values': None, 'params': None } @staticmethod def _deriv_with_constraints(model, param_indices, x=None, y=None): if y is None: d = np.array(model.fit_deriv(x, *model.parameters)) else: d = np.array(model.fit_deriv(x, y, *model.parameters)) if model.col_fit_deriv: return d[param_indices] else: return d[:, param_indices] def _map_domain_window(self, model, x, y=None): """ Maps domain into window for a polynomial model which has these attributes. """ if y is None: if hasattr(model, 'domain') and model.domain is None: model.domain = [x.min(), x.max()] if hasattr(model, 'window') and model.window is None: model.window = [-1, 1] return poly_map_domain(x, model.domain, model.window) else: if hasattr(model, 'x_domain') and model.x_domain is None: model.x_domain = [x.min(), x.max()] if hasattr(model, 'y_domain') and model.y_domain is None: model.y_domain = [y.min(), y.max()] if hasattr(model, 'x_window') and model.x_window is None: model.x_window = [-1., 1.] if hasattr(model, 'y_window') and model.y_window is None: model.y_window = [-1., 1.] xnew = poly_map_domain(x, model.x_domain, model.x_window) ynew = poly_map_domain(y, model.y_domain, model.y_window) return xnew, ynew def __call__(self, model, x, y, z=None, weights=None, rcond=None): """ Fit data to this model. Parameters ---------- model : `~astropy.modeling.FittableModel` model to fit to x, y, z x : array input coordinates y : array input coordinates z : array (optional) input coordinates weights : array (optional) weights rcond : float, optional Cut-off ratio for small singular values of ``a``. Singular values are set to zero if they are smaller than ``rcond`` times the largest singular value of ``a``. Returns ------- model_copy : `~astropy.modeling.FittableModel` a copy of the input model with parameters set by the fitter """ if not model.fittable: raise ValueError("Model must be a subclass of FittableModel") if not model.linear: raise ModelLinearityError('Model is not linear in parameters, ' 'linear fit methods should not be used.') _validate_constraints(self.supported_constraints, model) model_copy = model.copy() _, fitparam_indices = _model_to_fit_params(model_copy) if model_copy.n_inputs == 2 and z is None: raise ValueError("Expected x, y and z for a 2 dimensional model.") farg = _convert_input(x, y, z, n_models=len(model_copy), model_set_axis=model_copy.model_set_axis) if len(farg) == 2: x, y = farg # map domain into window if hasattr(model_copy, 'domain'): x = self._map_domain_window(model_copy, x) if any(model_copy.fixed.values()): lhs = self._deriv_with_constraints(model_copy, fitparam_indices, x=x) else: lhs = model_copy.fit_deriv(x, *model_copy.parameters) if len(y.shape) == 2: rhs = y else: rhs = y else: x, y, z = farg # map domain into window if hasattr(model_copy, 'x_domain'): x, y = self._map_domain_window(model_copy, x, y) if any(model_copy.fixed.values()): lhs = self._deriv_with_constraints(model_copy, fitparam_indices, x=x, y=y) else: lhs = model_copy.fit_deriv(x, y, *model_copy.parameters) if len(model_copy) > 1: if z.ndim > 2: # Basically this code here is making the assumption that if # z has 3 dimensions it represents multiple models where # the value of z is one plane per model. It's then # flattening each plane and transposing so that the model # axis is *last*. That's fine, but this could be # generalized for other dimensionalities of z. # TODO: See above comment rhs = np.array([i.flatten() for i in z]).T else: rhs = z.T else: rhs = z.flatten() # If the derivative is defined along rows (as with non-linear models) if model_copy.col_fit_deriv: lhs = np.asarray(lhs).T if weights is not None: weights = np.asarray(weights, dtype=np.float) if len(x) != len(weights): raise ValueError("x and weights should have the same length") if rhs.ndim == 2: lhs *= weights[:, np.newaxis] # Don't modify in-place in case rhs was the original dependent # variable array rhs = rhs * weights[:, np.newaxis] else: lhs *= weights[:, np.newaxis] rhs = rhs * weights if rcond is None: rcond = len(x) * np.finfo(x.dtype).eps scl = (lhs * lhs).sum(0) lacoef, resids, rank, sval = np.linalg.lstsq(lhs / scl, rhs, rcond) self.fit_info['residuals'] = resids self.fit_info['rank'] = rank self.fit_info['singular_values'] = sval lacoef = (lacoef.T / scl).T self.fit_info['params'] = lacoef # TODO: Only Polynomial models currently have an _order attribute; # maybe change this to read isinstance(model, PolynomialBase) if hasattr(model_copy, '_order') and rank != model_copy._order: warnings.warn("The fit may be poorly conditioned\n", AstropyUserWarning) _fitter_to_model_params(model_copy, lacoef.flatten()) return model_copy @six.add_metaclass(_FitterMeta) class LevMarLSQFitter(object): """ Levenberg-Marquardt algorithm and least squares statistic. Attributes ---------- fit_info : dict The `scipy.optimize.leastsq` result for the most recent fit (see notes). Notes ----- The ``fit_info`` dictionary contains the values returned by `scipy.optimize.leastsq` for the most recent fit, including the values from the ``infodict`` dictionary it returns. See the `scipy.optimize.leastsq` documentation for details on the meaning of these values. Note that the ``x`` return value is *not* included (as it is instead the parameter values of the returned model). Additionally, one additional element of ``fit_info`` is computed whenever a model is fit, with the key 'param_cov'. The corresponding value is the covariance matrix of the parameters as a 2D numpy array. The order of the matrix elements matches the order of the parameters in the fitted model (i.e., the same order as ``model.param_names``). """ supported_constraints = ['fixed', 'tied', 'bounds'] """ The constraint types supported by this fitter type. """ def __init__(self): self.fit_info = {'nfev': None, 'fvec': None, 'fjac': None, 'ipvt': None, 'qtf': None, 'message': None, 'ierr': None, 'param_jac': None, 'param_cov': None} super(LevMarLSQFitter, self).__init__() def objective_function(self, fps, *args): """ Function to minimize. Parameters ---------- fps : list parameters returned by the fitter args : list [model, [weights], [input coordinates]] """ model = args[0] weights = args[1] _fitter_to_model_params(model, fps) meas = args[-1] if weights is None: return np.ravel(model(*args[2 : -1]) - meas) else: return np.ravel(weights * (model(*args[2 : -1]) - meas)) def __call__(self, model, x, y, z=None, weights=None, maxiter=DEFAULT_MAXITER, acc=DEFAULT_ACC, epsilon=DEFAULT_EPS, estimate_jacobian=False): """ Fit data to this model. Parameters ---------- model : `~astropy.modeling.FittableModel` model to fit to x, y, z x : array input coordinates y : array input coordinates z : array (optional) input coordinates weights : array (optional) weights maxiter : int maximum number of iterations acc : float Relative error desired in the approximate solution epsilon : float A suitable step length for the forward-difference approximation of the Jacobian (if model.fjac=None). If epsfcn is less than the machine precision, it is assumed that the relative errors in the functions are of the order of the machine precision. estimate_jacobian : bool If False (default) and if the model has a fit_deriv method, it will be used. Otherwise the Jacobian will be estimated. If True, the Jacobian will be estimated in any case. Returns ------- model_copy : `~astropy.modeling.FittableModel` a copy of the input model with parameters set by the fitter """ from scipy import optimize model_copy = _validate_model(model, self.supported_constraints) farg = (model_copy, weights, ) + _convert_input(x, y, z) if model_copy.fit_deriv is None or estimate_jacobian: dfunc = None else: dfunc = self._wrap_deriv init_values, _ = _model_to_fit_params(model_copy) fitparams, cov_x, dinfo, mess, ierr = optimize.leastsq( self.objective_function, init_values, args=farg, Dfun=dfunc, col_deriv=model_copy.col_fit_deriv, maxfev=maxiter, epsfcn=epsilon, xtol=acc, full_output=True) _fitter_to_model_params(model_copy, fitparams) self.fit_info.update(dinfo) self.fit_info['cov_x'] = cov_x self.fit_info['message'] = mess self.fit_info['ierr'] = ierr if ierr not in [1, 2, 3, 4]: warnings.warn("The fit may be unsuccessful; check " "fit_info['message'] for more information.", AstropyUserWarning) # now try to compute the true covariance matrix if (len(y) > len(init_values)) and cov_x is not None: sum_sqrs = np.sum(self.objective_function(fitparams, *farg)**2) dof = len(y) - len(init_values) self.fit_info['param_cov'] = cov_x * sum_sqrs / dof else: self.fit_info['param_cov'] = None return model_copy @staticmethod def _wrap_deriv(params, model, weights, x, y, z=None): """ Wraps the method calculating the Jacobian of the function to account for model constraints. `scipy.optimize.leastsq` expects the function derivative to have the above signature (parlist, (argtuple)). In order to accommodate model constraints, instead of using p directly, we set the parameter list in this function. """ if any(model.fixed.values()) or any(model.tied.values()): if z is None: full_deriv = np.array(model.fit_deriv(x, *model.parameters)) else: full_deriv = np.array(model.fit_deriv(x, y, *model.parameters)) pars = [getattr(model, name) for name in model.param_names] fixed = [par.fixed for par in pars] tied = [par.tied for par in pars] tied = list(np.where([par.tied is not False for par in pars], True, tied)) fix_and_tie = np.logical_or(fixed, tied) ind = np.logical_not(fix_and_tie) if not model.col_fit_deriv: full_deriv = np.asarray(full_deriv).T residues = np.asarray(full_deriv[np.nonzero(ind)]).T else: residues = full_deriv[np.nonzero(ind)] return [np.ravel(_) for _ in residues] else: if z is None: return model.fit_deriv(x, *params) else: return [np.ravel(_) for _ in model.fit_deriv(x, y, *params)] class SLSQPLSQFitter(Fitter): """ SLSQP optimization algorithm and least squares statistic. Raises ------ ModelLinearityError A linear model is passed to a nonlinear fitter """ supported_constraints = SLSQP.supported_constraints def __init__(self): super(SLSQPLSQFitter, self).__init__(optimizer=SLSQP, statistic=leastsquare) self.fit_info = {} def __call__(self, model, x, y, z=None, weights=None, **kwargs): """ Fit data to this model. Parameters ---------- model : `~astropy.modeling.FittableModel` model to fit to x, y, z x : array input coordinates y : array input coordinates z : array (optional) input coordinates weights : array (optional) weights kwargs : dict optional keyword arguments to be passed to the optimizer or the statistic verblevel : int 0-silent 1-print summary upon completion, 2-print summary after each iteration maxiter : int maximum number of iterations epsilon : float the step size for finite-difference derivative estimates acc : float Requested accuracy Returns ------- model_copy : `~astropy.modeling.FittableModel` a copy of the input model with parameters set by the fitter """ model_copy = _validate_model(model, self._opt_method.supported_constraints) farg = _convert_input(x, y, z) farg = (model_copy, weights, ) + farg p0, _ = _model_to_fit_params(model_copy) fitparams, self.fit_info = self._opt_method( self.objective_function, p0, farg, **kwargs) _fitter_to_model_params(model_copy, fitparams) return model_copy class SimplexLSQFitter(Fitter): """ Simplex algorithm and least squares statistic. Raises ------ ModelLinearityError A linear model is passed to a nonlinear fitter """ supported_constraints = Simplex.supported_constraints def __init__(self): super(SimplexLSQFitter, self).__init__(optimizer=Simplex, statistic=leastsquare) self.fit_info = {} def __call__(self, model, x, y, z=None, weights=None, **kwargs): """ Fit data to this model. Parameters ---------- model : `~astropy.modeling.FittableModel` model to fit to x, y, z x : array input coordinates y : array input coordinates z : array (optional) input coordinates weights : array (optional) weights kwargs : dict optional keyword arguments to be passed to the optimizer or the statistic maxiter : int maximum number of iterations epsilon : float the step size for finite-difference derivative estimates acc : float Relative error in approximate solution Returns ------- model_copy : `~astropy.modeling.FittableModel` a copy of the input model with parameters set by the fitter """ model_copy = _validate_model(model, self._opt_method.supported_constraints) farg = _convert_input(x, y, z) farg = (model_copy, weights, ) + farg p0, _ = _model_to_fit_params(model_copy) fitparams, self.fit_info = self._opt_method( self.objective_function, p0, farg, **kwargs) _fitter_to_model_params(model_copy, fitparams) return model_copy @six.add_metaclass(_FitterMeta) class JointFitter(object): """ Fit models which share a parameter. For example, fit two gaussians to two data sets but keep the FWHM the same. Parameters ---------- models : list a list of model instances jointparameters : list a list of joint parameters initvals : list a list of initial values """ def __init__(self, models, jointparameters, initvals): self.models = list(models) self.initvals = list(initvals) self.jointparams = jointparameters self._verify_input() self.fitparams = self._model_to_fit_params() # a list of model.n_inputs self.modeldims = [m.n_inputs for m in self.models] # sum all model dimensions self.ndim = np.sum(self.modeldims) def _model_to_fit_params(self): fparams = [] fparams.extend(self.initvals) for model in self.models: params = [p.flatten() for p in model.parameters] joint_params = self.jointparams[model] param_metrics = model._param_metrics for param_name in joint_params: slice_ = param_metrics[param_name]['slice'] del params[slice_] fparams.extend(params) return fparams def objective_function(self, fps, *args): """ Function to minimize. Parameters ---------- fps : list the fitted parameters - result of an one iteration of the fitting algorithm args : dict tuple of measured and input coordinates args is always passed as a tuple from optimize.leastsq """ lstsqargs = list(args) fitted = [] fitparams = list(fps) numjp = len(self.initvals) # make a separate list of the joint fitted parameters jointfitparams = fitparams[:numjp] del fitparams[:numjp] for model in self.models: joint_params = self.jointparams[model] margs = lstsqargs[:model.n_inputs + 1] del lstsqargs[:model.n_inputs + 1] # separate each model separately fitted parameters numfp = len(model._parameters) - len(joint_params) mfparams = fitparams[:numfp] del fitparams[:numfp] # recreate the model parameters mparams = [] param_metrics = model._param_metrics for param_name in model.param_names: if param_name in joint_params: index = joint_params.index(param_name) # should do this with slices in case the # parameter is not a number mparams.extend([jointfitparams[index]]) else: slice_ = param_metrics[param_name]['slice'] plen = slice_.stop - slice_.start mparams.extend(mfparams[:plen]) del mfparams[:plen] modelfit = model.evaluate(margs[:-1], *mparams) fitted.extend(modelfit - margs[-1]) return np.ravel(fitted) def _verify_input(self): if len(self.models) <= 1: raise TypeError("Expected >1 models, %d is given" % len(self.models)) if len(self.jointparams.keys()) < 2: raise TypeError("At least two parameters are expected, " "%d is given" % len(self.jointparams.keys())) for j in self.jointparams.keys(): if len(self.jointparams[j]) != len(self.initvals): raise TypeError("%d parameter(s) provided but %d expected" % (len(self.jointparams[j]), len(self.initvals))) def __call__(self, *args): """ Fit data to these models keeping some of the parameters common to the two models. """ from scipy import optimize if len(args) != reduce(lambda x, y: x + 1 + y + 1, self.modeldims): raise ValueError("Expected %d coordinates in args but %d provided" % (reduce(lambda x, y: x + 1 + y + 1, self.modeldims), len(args))) self.fitparams[:], _ = optimize.leastsq(self.objective_function, self.fitparams, args=args) fparams = self.fitparams[:] numjp = len(self.initvals) # make a separate list of the joint fitted parameters jointfitparams = fparams[:numjp] del fparams[:numjp] for model in self.models: # extract each model's fitted parameters joint_params = self.jointparams[model] numfp = len(model._parameters) - len(joint_params) mfparams = fparams[:numfp] del fparams[:numfp] # recreate the model parameters mparams = [] param_metrics = model._param_metrics for param_name in model.param_names: if param_name in joint_params: index = joint_params.index(param_name) # should do this with slices in case the parameter # is not a number mparams.extend([jointfitparams[index]]) else: slice_ = param_metrics[param_name]['slice'] plen = slice_.stop - slice_.start mparams.extend(mfparams[:plen]) del mfparams[:plen] model.parameters = np.array(mparams) def _convert_input(x, y, z=None, n_models=1, model_set_axis=0): """Convert inputs to float arrays.""" x = np.asarray(x, dtype=np.float) y = np.asarray(y, dtype=np.float) if z is not None: z = np.asarray(z, dtype=np.float) # For compatibility with how the linear fitter code currently expects to # work, shift the dependent variable's axes to the expected locations if n_models > 1: if z is None: if y.shape[model_set_axis] != n_models: raise ValueError( "Number of data sets (y array is expected to equal " "the number of parameter sets)") # For a 1-D model the y coordinate's model-set-axis is expected to # be last, so that its first dimension is the same length as the x # coordinates. This is in line with the expectations of # numpy.linalg.lstsq: # http://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.lstsq.html # That is, each model should be represented by a column. TODO: # Obviously this is a detail of np.linalg.lstsq and should be # handled specifically by any fitters that use it... y = np.rollaxis(y, model_set_axis, y.ndim) else: # Shape of z excluding model_set_axis z_shape = z.shape[:model_set_axis] + z.shape[model_set_axis + 1:] if not (x.shape == y.shape == z_shape): raise ValueError("x, y and z should have the same shape") if z is None: farg = (x, y) else: farg = (x, y, z) return farg # TODO: These utility functions are really particular to handling # bounds/tied/fixed constraints for scipy.optimize optimizers that do not # support them inherently; this needs to be reworked to be clear about this # distinction (and the fact that these are not necessarily applicable to any # arbitrary fitter--as evidenced for example by the fact that JointFitter has # its own versions of these) # TODO: Most of this code should be entirely rewritten; it should not be as # inefficient as it is. def _fitter_to_model_params(model, fps): """ Constructs the full list of model parameters from the fitted and constrained parameters. """ _, fit_param_indices = _model_to_fit_params(model) has_tied = any(model.tied.values()) has_fixed = any(model.fixed.values()) has_bound = any(b != (None, None) for b in model.bounds.values()) if not (has_tied or has_fixed or has_bound): # We can just assign directly model.parameters = fps return fit_param_indices = set(fit_param_indices) offset = 0 param_metrics = model._param_metrics for idx, name in enumerate(model.param_names): if idx not in fit_param_indices: continue slice_ = param_metrics[name]['slice'] shape = param_metrics[name]['shape'] # This is determining which range of fps (the fitted parameters) maps # to parameters of the model size = reduce(operator.mul, shape, 1) values = fps[offset:offset + size] # Check bounds constraints if model.bounds[name] != (None, None): _min, _max = model.bounds[name] if _min is not None: values = np.fmax(values, _min) if _max is not None: values = np.fmin(values, _max) model.parameters[slice_] = values offset += size # This has to be done in a separate loop due to how tied parameters are # currently evaluated (the fitted parameters need to actually be *set* on # the model first, for use in evaluating the "tied" expression--it might be # better to change this at some point if has_tied: for idx, name in enumerate(model.param_names): if model.tied[name] != False: value = model.tied[name](model) slice_ = param_metrics[name]['slice'] model.parameters[slice_] = value def _model_to_fit_params(model): """ Convert a model instance's parameter array to an array that can be used with a fitter that doesn't natively support fixed or tied parameters. In particular, it removes fixed/tied parameters from the parameter array. These may be a subset of the model parameters, if some of them are held constant or tied. """ fitparam_indices = list(range(len(model.param_names))) if any(model.fixed.values()) or any(model.tied.values()): params = list(model.parameters) param_metrics = model._param_metrics for idx, name in list(enumerate(model.param_names))[::-1]: if model.fixed[name] or model.tied[name]: slice_ = param_metrics[name]['slice'] del params[slice_] del fitparam_indices[idx] return (np.array(params), fitparam_indices) else: return (model.parameters, fitparam_indices) def _validate_constraints(supported_constraints, model): """Make sure model constraints are supported by the current fitter.""" message = 'Optimizer cannot handle {0} constraints.' if (any(model.fixed.values()) and 'fixed' not in supported_constraints): raise UnsupportedConstraintError( message.format('fixed parameter')) if (any(model.tied.values()) and 'tied' not in supported_constraints): raise UnsupportedConstraintError( message.format('tied parameter')) if (any([tuple(b) != (None, None) for b in model.bounds.values()]) and 'bounds' not in supported_constraints): raise UnsupportedConstraintError( message.format('bound parameter')) if model.eqcons and 'eqcons' not in supported_constraints: raise UnsupportedConstraintError(message.format('equality')) if (model.ineqcons and 'ineqcons' not in supported_constraints): raise UnsupportedConstraintError(message.format('inequality')) def _validate_model(model, supported_constraints): """ Check that model and fitter are compatible and return a copy of the model. """ if not model.fittable: raise ValueError("Model does not appear to be fittable.") if model.linear: warnings.warn('Model is linear in parameters; ' 'consider using linear fitting methods.', AstropyUserWarning) elif len(model) != 1: # for now only single data sets ca be fitted raise ValueError("Non-linear fitters can only fit " "one data set at a time.") _validate_constraints(supported_constraints, model) model_copy = model.copy() return model_copy astropy-1.1.1/astropy/modeling/polynomial.py0000644001134200020070000011117412644017723022166 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains predefined polynomial models. """ from __future__ import (absolute_import, unicode_literals, division, print_function) import numpy as np from .core import FittableModel, Model from .functional_models import Shift from .parameters import Parameter from .utils import poly_map_domain, comb, check_broadcast from ..utils import indent __all__ = [ 'Chebyshev1D', 'Chebyshev2D', 'InverseSIP', 'Legendre1D', 'Legendre2D', 'Polynomial1D', 'Polynomial2D', 'SIP', 'OrthoPolynomialBase', 'PolynomialModel' ] class PolynomialBase(FittableModel): """ Base class for all polynomial-like models with an arbitrary number of parameters in the form of coefficients. In this case Parameter instances are returned through the class's ``__getattr__`` rather than through class descriptors. """ # Default _param_names list; this will be filled in by the implementation's # __init__ _param_names = () linear = True col_fit_deriv = False @property def param_names(self): """Coefficient names generated based on the model's polynomial degree and number of dimensions. Subclasses should implement this to return parameter names in the desired format. On most `Model` classes this is a class attribute, but for polynomial models it is an instance attribute since each polynomial model instance can have different parameters depending on the degree of the polynomial and the number of dimensions, for example. """ return self._param_names def __getattr__(self, attr): if self._param_names and attr in self._param_names: return Parameter(attr, default=0.0, model=self) raise AttributeError(attr) def __setattr__(self, attr, value): # TODO: Support a means of specifying default values for coefficients # Check for self._ndim first--if it hasn't been defined then the # instance hasn't been initialized yet and self.param_names probably # won't work. # This has to vaguely duplicate the functionality of # Parameter.__set__. # TODO: I wonder if there might be a way around that though... if attr[0] != '_' and self._param_names and attr in self._param_names: param = Parameter(attr, default=0.0, model=self) # This is a little hackish, but we can actually reuse the # Parameter.__set__ method here param.__set__(self, value) else: super(PolynomialBase, self).__setattr__(attr, value) class PolynomialModel(PolynomialBase): """ Base class for polynomial models. Its main purpose is to determine how many coefficients are needed based on the polynomial order and dimension and to provide their default values, names and ordering. """ def __init__(self, degree, n_models=None, model_set_axis=None, name=None, meta=None, **params): self._degree = degree self._order = self.get_num_coeff(self.n_inputs) self._param_names = self._generate_coeff_names(self.n_inputs) super(PolynomialModel, self).__init__( n_models=n_models, model_set_axis=model_set_axis, name=name, meta=meta, **params) def __repr__(self): return self._format_repr([self.degree]) def __str__(self): return self._format_str([('Degree', self.degree)]) @property def degree(self): """Degree of polynomial.""" return self._degree def get_num_coeff(self, ndim): """ Return the number of coefficients in one parameter set """ if self.degree < 0: raise ValueError("Degree of polynomial must be positive or null") # deg+1 is used to account for the difference between iraf using # degree and numpy using exact degree if ndim != 1: nmixed = comb(self.degree, ndim) else: nmixed = 0 numc = self.degree * ndim + nmixed + 1 return numc def _invlex(self): c = [] lencoeff = self.degree + 1 for i in range(lencoeff): for j in range(lencoeff): if i + j <= self.degree: c.append((j, i)) return c[::-1] def _generate_coeff_names(self, ndim): names = [] if ndim == 1: for n in range(self._order): names.append('c{0}'.format(n)) else: for i in range(self.degree + 1): names.append('c{0}_{1}'.format(i, 0)) for i in range(1, self.degree + 1): names.append('c{0}_{1}'.format(0, i)) for i in range(1, self.degree): for j in range(1, self.degree): if i + j < self.degree + 1: names.append('c{0}_{1}'.format(i, j)) return tuple(names) class OrthoPolynomialBase(PolynomialBase): """ This is a base class for the 2D Chebyshev and Legendre models. The polynomials implemented here require a maximum degree in x and y. Parameters ---------- x_degree : int degree in x y_degree : int degree in y x_domain : list or None, optional domain of the x independent variable x_window : list or None, optional range of the x independent variable y_domain : list or None, optional domain of the y independent variable y_window : list or None, optional range of the y independent variable **params : dict {keyword: value} pairs, representing {parameter_name: value} """ inputs = ('x', 'y') outputs = ('z',) def __init__(self, x_degree, y_degree, x_domain=None, x_window=None, y_domain=None, y_window=None, n_models=None, model_set_axis=None, name=None, meta=None, **params): # TODO: Perhaps some of these other parameters should be properties? # TODO: An awful lot of the functionality in this method is still # shared by PolynomialModel; perhaps some of it can be generalized in # PolynomialBase self.x_degree = x_degree self.y_degree = y_degree self._order = self.get_num_coeff() self.x_domain = x_domain self.y_domain = y_domain self.x_window = x_window self.y_window = y_window self._param_names = self._generate_coeff_names() super(OrthoPolynomialBase, self).__init__( n_models=n_models, model_set_axis=model_set_axis, name=name, meta=meta, **params) def __repr__(self): return self._format_repr([self.x_degree, self.y_degree]) def __str__(self): return self._format_str( [('X-Degree', self.x_degree), ('Y-Degree', self.y_degree)]) def get_num_coeff(self): """ Determine how many coefficients are needed Returns ------- numc : int number of coefficients """ return (self.x_degree + 1) * (self.y_degree + 1) def _invlex(self): # TODO: This is a very slow way to do this; fix it and related methods # like _alpha c = [] xvar = np.arange(self.x_degree + 1) yvar = np.arange(self.y_degree + 1) for j in yvar: for i in xvar: c.append((i, j)) return np.array(c[::-1]) def invlex_coeff(self): coeff = [] xvar = np.arange(self.x_degree + 1) yvar = np.arange(self.y_degree + 1) for j in yvar: for i in xvar: name = 'c{0}_{1}'.format(i, j) coeff.append(getattr(self, name)) return np.array(coeff[::-1]) def _alpha(self): invlexdeg = self._invlex() invlexdeg[:, 1] = invlexdeg[:, 1] + self.x_degree + 1 nx = self.x_degree + 1 ny = self.y_degree + 1 alpha = np.zeros((ny * nx + 3, ny + nx)) for n in range(len(invlexdeg)): alpha[n][invlexdeg[n]] = [1, 1] alpha[-2, 0] = 1 alpha[-3, nx] = 1 return alpha def imhorner(self, x, y, coeff): _coeff = list(coeff) _coeff.extend([0, 0, 0]) alpha = self._alpha() r0 = _coeff[0] nalpha = len(alpha) karr = np.diff(alpha, axis=0) kfunc = self._fcache(x, y) x_terms = self.x_degree + 1 y_terms = self.y_degree + 1 nterms = x_terms + y_terms for n in range(1, nterms + 1 + 3): setattr(self, 'r' + str(n), 0.) for n in range(1, nalpha): k = karr[n - 1].nonzero()[0].max() + 1 rsum = 0 for i in range(1, k + 1): rsum = rsum + getattr(self, 'r' + str(i)) val = kfunc[k - 1] * (r0 + rsum) setattr(self, 'r' + str(k), val) r0 = _coeff[n] for i in range(1, k): setattr(self, 'r' + str(i), 0.) result = r0 for i in range(1, nterms + 1 + 3): result = result + getattr(self, 'r' + str(i)) return result def _generate_coeff_names(self): names = [] for j in range(self.y_degree + 1): for i in range(self.x_degree + 1): names.append('c{0}_{1}'.format(i, j)) return tuple(names) def _fcache(self, x, y): # TODO: Write a docstring explaining the actual purpose of this method """To be implemented by subclasses""" raise NotImplementedError("Subclasses should implement this") def evaluate(self, x, y, *coeffs): if self.x_domain is not None: x = poly_map_domain(x, self.x_domain, self.x_window) if self.y_domain is not None: y = poly_map_domain(y, self.y_domain, self.y_window) invcoeff = self.invlex_coeff() return self.imhorner(x, y, invcoeff) def prepare_inputs(self, x, y, **kwargs): inputs, format_info = \ super(OrthoPolynomialBase, self).prepare_inputs(x, y, **kwargs) x, y = inputs if x.shape != y.shape: raise ValueError("Expected input arrays to have the same shape") return (x, y), format_info class Chebyshev1D(PolynomialModel): """ 1D Chebyshev polynomial of the 1st kind. Parameters ---------- degree : int degree of the series domain : list or None, optional window : list or None, optional If None, it is set to [-1,1] Fitters will remap the domain to this window **params : dict keyword : value pairs, representing parameter_name: value """ inputs = ('x',) outputs = ('y',) def __init__(self, degree, domain=None, window=[-1, 1], n_models=None, model_set_axis=None, name=None, meta=None, **params): self.domain = domain self.window = window super(Chebyshev1D, self).__init__( degree, n_models=n_models, model_set_axis=model_set_axis, name=name, meta=meta, **params) def fit_deriv(self, x, *params): """ Computes the Vandermonde matrix. Parameters ---------- x : ndarray input params : throw away parameter parameter list returned by non-linear fitters Returns ------- result : ndarray The Vandermonde matrix """ x = np.array(x, dtype=np.float, copy=False, ndmin=1) v = np.empty((self.degree + 1,) + x.shape, dtype=x.dtype) v[0] = 1 if self.degree > 0: x2 = 2 * x v[1] = x for i in range(2, self.degree + 1): v[i] = v[i - 1] * x2 - v[i - 2] return np.rollaxis(v, 0, v.ndim) def prepare_inputs(self, x, **kwargs): inputs, format_info = \ super(PolynomialModel, self).prepare_inputs(x, **kwargs) x = inputs[0] return (x,), format_info def evaluate(self, x, *coeffs): if self.domain is not None: x = poly_map_domain(x, self.domain, self.window) return self.clenshaw(x, coeffs) @staticmethod def clenshaw(x, coeffs): """Evaluates the polynomial using Clenshaw's algorithm.""" if len(coeffs) == 1: c0 = coeffs[0] c1 = 0 elif len(coeffs) == 2: c0 = coeffs[0] c1 = coeffs[1] else: x2 = 2 * x c0 = coeffs[-2] c1 = coeffs[-1] for i in range(3, len(coeffs) + 1): tmp = c0 c0 = coeffs[-i] - c1 c1 = tmp + c1 * x2 return c0 + c1 * x class Legendre1D(PolynomialModel): """ 1D Legendre polynomial. Parameters ---------- degree : int degree of the series domain : list or None, optional window : list or None, optional If None, it is set to [-1,1] Fitters will remap the domain to this window **params : dict keyword: value pairs, representing parameter_name: value """ inputs = ('x',) outputs = ('y',) def __init__(self, degree, domain=None, window=[-1, 1], n_models=None, model_set_axis=None, name=None, meta=None, **params): self.domain = domain self.window = window super(Legendre1D, self).__init__( degree, n_models=n_models, model_set_axis=model_set_axis, name=name, meta=meta, **params) def prepare_inputs(self, x, **kwargs): inputs, format_info = \ super(PolynomialModel, self).prepare_inputs(x, **kwargs) x = inputs[0] return (x,), format_info def evaluate(self, x, *coeffs): if self.domain is not None: x = poly_map_domain(x, self.domain, self.window) return self.clenshaw(x, coeffs) def fit_deriv(self, x, *params): """ Computes the Vandermonde matrix. Parameters ---------- x : ndarray input params : throw away parameter parameter list returned by non-linear fitters Returns ------- result : ndarray The Vandermonde matrix """ x = np.array(x, dtype=np.float, copy=False, ndmin=1) v = np.empty((self.degree + 1,) + x.shape, dtype=x.dtype) v[0] = 1 if self.degree > 0: v[1] = x for i in range(2, self.degree + 1): v[i] = (v[i - 1] * x * (2 * i - 1) - v[i - 2] * (i - 1)) / i return np.rollaxis(v, 0, v.ndim) @staticmethod def clenshaw(x, coeffs): if len(coeffs) == 1: c0 = coeffs[0] c1 = 0 elif len(coeffs) == 2: c0 = coeffs[0] c1 = coeffs[1] else: nd = len(coeffs) c0 = coeffs[-2] c1 = coeffs[-1] for i in range(3, len(coeffs) + 1): tmp = c0 nd = nd - 1 c0 = coeffs[-i] - (c1 * (nd - 1)) / nd c1 = tmp + (c1 * x * (2 * nd - 1)) / nd return c0 + c1 * x class Polynomial1D(PolynomialModel): """ 1D Polynomial model. Parameters ---------- degree : int degree of the series domain : list or None, optional window : list or None, optional If None, it is set to [-1,1] Fitters will remap the domain to this window **params : dict keyword: value pairs, representing parameter_name: value """ inputs = ('x',) outputs = ('y',) def __init__(self, degree, domain=[-1, 1], window=[-1, 1], n_models=None, model_set_axis=None, name=None, meta=None, **params): self.domain = domain self.window = window super(Polynomial1D, self).__init__( degree, n_models=n_models, model_set_axis=model_set_axis, name=name, meta=meta, **params) def prepare_inputs(self, x, **kwargs): inputs, format_info = \ super(Polynomial1D, self).prepare_inputs(x, **kwargs) x = inputs[0] return (x,), format_info def evaluate(self, x, *coeffs): if self.domain is not None: x = poly_map_domain(x, self.domain, self.window) return self.horner(x, coeffs) def fit_deriv(self, x, *params): """ Computes the Vandermonde matrix. Parameters ---------- x : ndarray input params : throw away parameter parameter list returned by non-linear fitters Returns ------- result : ndarray The Vandermonde matrix """ v = np.empty((self.degree + 1,) + x.shape, dtype=np.float) v[0] = 1 if self.degree > 0: v[1] = x for i in range(2, self.degree + 1): v[i] = v[i - 1] * x return np.rollaxis(v, 0, v.ndim) @staticmethod def horner(x, coeffs): c0 = coeffs[-1] + x * 0 for i in range(2, len(coeffs) + 1): c0 = coeffs[-i] + c0 * x return c0 class Polynomial2D(PolynomialModel): """ 2D Polynomial model. Represents a general polynomial of degree n: .. math:: P(x,y) = c_{00} + c_{10}x + ...+ c_{n0}x^n + c_{01}y + ...+ c_{0n}y^n + c_{11}xy + c_{12}xy^2 + ... + c_{1(n-1)}xy^{n-1}+ ... + c_{(n-1)1}x^{n-1}y Parameters ---------- degree : int highest power of the polynomial, the number of terms is degree+1 x_domain : list or None, optional domain of the x independent variable y_domain : list or None, optional domain of the y independent variable x_window : list or None, optional range of the x independent variable y_window : list or None, optional range of the y independent variable **params : dict keyword: value pairs, representing parameter_name: value """ inputs = ('x', 'y') outputs = ('z',) def __init__(self, degree, x_domain=[-1, 1], y_domain=[-1, 1], x_window=[-1, 1], y_window=[-1, 1], n_models=None, model_set_axis=None, name=None, meta=None, **params): super(Polynomial2D, self).__init__( degree, n_models=n_models, model_set_axis=model_set_axis, name=name, meta=meta, **params) self.x_domain = x_domain self.y_domain = y_domain self.x_window = x_window self.y_window = y_window def prepare_inputs(self, x, y, **kwargs): inputs, format_info = \ super(Polynomial2D, self).prepare_inputs(x, y, **kwargs) x, y = inputs if x.shape != y.shape: raise ValueError("Expected input arrays to have the same shape") return (x, y), format_info def evaluate(self, x, y, *coeffs): if self.x_domain is not None: x = poly_map_domain(x, self.x_domain, self.x_window) if self.y_domain is not None: y = poly_map_domain(y, self.y_domain, self.y_window) invcoeff = self.invlex_coeff(coeffs) result = self.multivariate_horner(x, y, invcoeff) # Special case for degree==0 to ensure that the shape of the output is # still as expected by the broadcasting rules, even though the x and y # inputs are not used in the evaluation if self.degree == 0: output_shape = check_broadcast(np.shape(coeffs[0]), x.shape) if output_shape: new_result = np.empty(output_shape) new_result[:] = result result = new_result return result def fit_deriv(self, x, y, *params): """ Computes the Vandermonde matrix. Parameters ---------- x : ndarray input y : ndarray input params : throw away parameter parameter list returned by non-linear fitters Returns ------- result : ndarray The Vandermonde matrix """ if x.ndim == 2: x = x.flatten() if y.ndim == 2: y = y.flatten() if x.size != y.size: raise ValueError('Expected x and y to be of equal size') designx = x[:, None] ** np.arange(self.degree + 1) designy = y[:, None] ** np.arange(1, self.degree + 1) designmixed = [] for i in range(1, self.degree): for j in range(1, self.degree): if i + j <= self.degree: designmixed.append((x ** i) * (y ** j)) designmixed = np.array(designmixed).T if designmixed.any(): v = np.hstack([designx, designy, designmixed]) else: v = np.hstack([designx, designy]) return v def invlex_coeff(self, coeffs): invlex_coeffs = [] lencoeff = range(self.degree + 1) for i in lencoeff: for j in lencoeff: if i + j <= self.degree: name = 'c{0}_{1}'.format(j, i) coeff = coeffs[self.param_names.index(name)] invlex_coeffs.append(coeff) return invlex_coeffs[::-1] def multivariate_horner(self, x, y, coeffs): """ Multivariate Horner's scheme Parameters ---------- x, y : array coeff : array of coefficients in inverse lexical order """ alpha = self._invlex() r0 = coeffs[0] r1 = r0 * 0.0 r2 = r0 * 0.0 karr = np.diff(alpha, axis=0) for n in range(len(karr)): if karr[n, 1] != 0: r2 = y * (r0 + r1 + r2) r1 = coeffs[0] * 0. else: r1 = x * (r0 + r1) r0 = coeffs[n + 1] return r0 + r1 + r2 class Chebyshev2D(OrthoPolynomialBase): """ 2D Chebyshev polynomial of the 1st kind. It is defined as .. math:: P_{n_m}(x,y) = \sum C_{n_m} T_n(x) T_m(y) Parameters ---------- x_degree : int degree in x y_degree : int degree in y x_domain : list or None, optional domain of the x independent variable y_domain : list or None, optional domain of the y independent variable x_window : list or None, optional range of the x independent variable y_window : list or None, optional range of the y independent variable **params : dict keyword: value pairs, representing parameter_name: value """ def __init__(self, x_degree, y_degree, x_domain=None, x_window=[-1, 1], y_domain=None, y_window=[-1,1], n_models=None, model_set_axis=None, name=None, meta=None, **params): super(Chebyshev2D, self).__init__( x_degree, y_degree, x_domain=x_domain, y_domain=y_domain, x_window=x_window, y_window=y_window, n_models=n_models, model_set_axis=model_set_axis, name=name, meta=meta, **params) def _fcache(self, x, y): """ Calculate the individual Chebyshev functions once and store them in a dictionary to be reused. """ x_terms = self.x_degree + 1 y_terms = self.y_degree + 1 kfunc = {} kfunc[0] = np.ones(x.shape) kfunc[1] = x.copy() kfunc[x_terms] = np.ones(y.shape) kfunc[x_terms + 1] = y.copy() for n in range(2, x_terms): kfunc[n] = 2 * x * kfunc[n - 1] - kfunc[n - 2] for n in range(x_terms + 2, x_terms + y_terms): kfunc[n] = 2 * y * kfunc[n - 1] - kfunc[n - 2] return kfunc def fit_deriv(self, x, y, *params): """ Derivatives with respect to the coefficients. This is an array with Chebyshev polynomials: .. math:: T_{x_0}T_{y_0}, T_{x_1}T_{y_0}...T_{x_n}T_{y_0}...T_{x_n}T_{y_m} Parameters ---------- x : ndarray input y : ndarray input params : throw away parameter parameter list returned by non-linear fitters Returns ------- result : ndarray The Vandermonde matrix """ if x.shape != y.shape: raise ValueError("x and y must have the same shape") x = x.flatten() y = y.flatten() x_deriv = self._chebderiv1d(x, self.x_degree + 1).T y_deriv = self._chebderiv1d(y, self.y_degree + 1).T ij = [] for i in range(self.y_degree + 1): for j in range(self.x_degree + 1): ij.append(x_deriv[j] * y_deriv[i]) v = np.array(ij) return v.T def _chebderiv1d(self, x, deg): """ Derivative of 1D Chebyshev series """ x = np.array(x, dtype=np.float, copy=False, ndmin=1) d = np.empty((deg + 1, len(x)), dtype=x.dtype) d[0] = x * 0 + 1 if deg > 0: x2 = 2 * x d[1] = x for i in range(2, deg + 1): d[i] = d[i - 1] * x2 - d[i - 2] return np.rollaxis(d, 0, d.ndim) class Legendre2D(OrthoPolynomialBase): """ Legendre 2D polynomial. Defined as: .. math:: P_{nm}(x,y) = C_{n_m} L_n(x ) L_m(y) Parameters ---------- x_degree : int degree in x y_degree : int degree in y x_domain : list or None, optional domain of the x independent variable y_domain : list or None, optional domain of the y independent variable x_window : list or None, optional range of the x independent variable y_window : list or None, optional range of the y independent variable **params : dict keyword: value pairs, representing parameter_name: value """ def __init__(self, x_degree, y_degree, x_domain=None, x_window=[-1, 1], y_domain=None, y_window=[-1, 1], n_models=None, model_set_axis=None, name=None, meta=None, **params): super(Legendre2D, self).__init__( x_degree, y_degree, x_domain=x_domain, y_domain=y_domain, x_window=x_window, y_window=y_window, n_models=n_models, model_set_axis=model_set_axis, name=name, meta=meta, **params) def _fcache(self, x, y): """ Calculate the individual Legendre functions once and store them in a dictionary to be reused. """ x_terms = self.x_degree + 1 y_terms = self.y_degree + 1 kfunc = {} kfunc[0] = np.ones(x.shape) kfunc[1] = x.copy() kfunc[x_terms] = np.ones(y.shape) kfunc[x_terms + 1] = y.copy() for n in range(2, x_terms): kfunc[n] = (((2 * (n - 1) + 1) * x * kfunc[n - 1] - (n - 1) * kfunc[n - 2]) / n) for n in range(2, y_terms): kfunc[n + x_terms] = ((2 * (n - 1) + 1) * y * kfunc[n + x_terms - 1] - (n - 1) * kfunc[n + x_terms - 2]) / (n) return kfunc def fit_deriv(self, x, y, *params): """ Derivatives with respect to the coefficients. This is an array with Legendre polynomials: Lx0Ly0 Lx1Ly0...LxnLy0...LxnLym Parameters ---------- x : ndarray input y : ndarray input params : throw away parameter parameter list returned by non-linear fitters Returns ------- result : ndarray The Vandermonde matrix """ if x.shape != y.shape: raise ValueError("x and y must have the same shape") x = x.flatten() y = y.flatten() x_deriv = self._legendderiv1d(x, self.x_degree + 1).T y_deriv = self._legendderiv1d(y, self.y_degree + 1).T ij = [] for i in range(self.y_degree + 1): for j in range(self.x_degree + 1): ij.append(x_deriv[j] * y_deriv[i]) v = np.array(ij) return v.T def _legendderiv1d(self, x, deg): """Derivative of 1D Legendre polynomial""" x = np.array(x, dtype=np.float, copy=False, ndmin=1) d = np.empty((deg + 1,) + x.shape, dtype=x.dtype) d[0] = x * 0 + 1 if deg > 0: d[1] = x for i in range(2, deg + 1): d[i] = (d[i - 1] * x * (2 * i - 1) - d[i - 2] * (i - 1)) / i return np.rollaxis(d, 0, d.ndim) class _SIP1D(PolynomialBase): """ This implements the Simple Imaging Polynomial Model (SIP) in 1D. It's unlikely it will be used in 1D so this class is private and SIP should be used instead. """ inputs = ('u', 'v') outputs = ('w',) def __init__(self, order, coeff_prefix, n_models=None, model_set_axis=None, name=None, meta=None, **params): self.order = order self.coeff_prefix = coeff_prefix self._param_names = self._generate_coeff_names(coeff_prefix) super(_SIP1D, self).__init__(n_models=n_models, model_set_axis=model_set_axis, name=name, meta=meta, **params) def __repr__(self): return self._format_repr(args=[self.order, self.coeff_prefix]) def __str__(self): return self._format_str( [('Order', self.order), ('Coeff. Prefix', self.coeff_prefix)]) def evaluate(self, x, y, *coeffs): # TODO: Rewrite this so that it uses a simpler method of determining # the matrix based on the number of given coefficients. mcoef = self._coeff_matrix(self.coeff_prefix, coeffs) return self._eval_sip(x, y, mcoef) def get_num_coeff(self, ndim): """ Return the number of coefficients in one param set """ if self.order < 2 or self.order > 9: raise ValueError("Degree of polynomial must be 2< deg < 9") nmixed = comb(self.order, ndim) # remove 3 terms because SIP deg >= 2 numc = self.order * ndim + nmixed - 2 return numc def _generate_coeff_names(self, coeff_prefix): names = [] for i in range(2, self.order + 1): names.append('{0}_{1}_{2}'.format(coeff_prefix, i, 0)) for i in range(2, self.order + 1): names.append('{0}_{1}_{2}'.format(coeff_prefix, 0, i)) for i in range(1, self.order): for j in range(1, self.order): if i + j < self.order + 1: names.append('{0}_{1}_{2}'.format(coeff_prefix, i, j)) return names def _coeff_matrix(self, coeff_prefix, coeffs): mat = np.zeros((self.order + 1, self.order + 1)) for i in range(2, self.order + 1): attr = '{0}_{1}_{2}'.format(coeff_prefix, i, 0) mat[i, 0] = coeffs[self.param_names.index(attr)] for i in range(2, self.order + 1): attr = '{0}_{1}_{2}'.format(coeff_prefix, 0, i) mat[0, i] = coeffs[self.param_names.index(attr)] for i in range(1, self.order): for j in range(1, self.order): if i + j < self.order + 1: attr = '{0}_{1}_{2}'.format(coeff_prefix, i, j) mat[i, j] = coeffs[self.param_names.index(attr)] return mat def _eval_sip(self, x, y, coef): x = np.asarray(x, dtype=np.float64) y = np.asarray(y, dtype=np.float64) if self.coeff_prefix == 'A': result = np.zeros(x.shape) else: result = np.zeros(y.shape) for i in range(coef.shape[0]): for j in range(coef.shape[1]): if i + j > 1 and i + j < self.order + 1: result = result + coef[i, j] * x ** i * y ** j return result class SIP(Model): """ Simple Imaging Polynomial (SIP) model. The SIP convention is used to represent distortions in FITS image headers. See [1]_ for a description of the SIP convention. Parameters ---------- crpix : list or ndarray of length(2) CRPIX values a_order : int SIP polynomial order for first axis b_order : int SIP order for second axis a_coeff : dict SIP coefficients for first axis b_coeff : dict SIP coefficients for the second axis ap_order : int order for the inverse transformation (AP coefficients) bp_order : int order for the inverse transformation (BP coefficients) ap_coeff : dict coefficients for the inverse transform bp_coeff : dict coefficients for the inverse transform References ---------- .. [1] `David Shupe, et al, ADASS, ASP Conference Series, Vol. 347, 2005 `_ """ inputs = ('u', 'v') outputs = ('x', 'y') def __init__(self, crpix, a_order, b_order, a_coeff={}, b_coeff={}, ap_order=None, bp_order=None, ap_coeff={}, bp_coeff={}, n_models=None, model_set_axis=None, name=None, meta=None): self._crpix = crpix self._a_order = a_order self._b_order = b_order self._a_coeff = a_coeff self._b_coeff = b_coeff self._ap_order = ap_order self._bp_order = bp_order self._ap_coeff = ap_coeff self._bp_coeff = bp_coeff self.shift_a = Shift(-crpix[0]) self.shift_b = Shift(-crpix[1]) self.sip1d_a = _SIP1D(a_order, coeff_prefix='A', n_models=n_models, model_set_axis=model_set_axis, **a_coeff) self.sip1d_b = _SIP1D(b_order, coeff_prefix='B', n_models=n_models, model_set_axis=model_set_axis, **b_coeff) super(SIP, self).__init__(n_models=n_models, model_set_axis=model_set_axis, name=name, meta=meta) def __repr__(self): return '<{0}({1!r})>'.format(self.__class__.__name__, [self.shift_a, self.shift_b, self.sip1d_a, self.sip1d_b]) def __str__(self): parts = ['Model: {0}'.format(self.__class__.__name__)] for model in [self.shift_a, self.shift_b, self.sip1d_a, self.sip1d_b]: parts.append(indent(str(model), width=4)) parts.append('') return '\n'.join(parts) @property def inverse(self): if (self._ap_order is not None and self._bp_order is not None): return InverseSIP(self._ap_order, self._bp_order, self._ap_coeff, self._bp_coeff) else: raise NotImplementedError("SIP inverse coefficients are not available.") def evaluate(self, x, y): u = self.shift_a.evaluate(x, *self.shift_a.param_sets) v = self.shift_b.evaluate(y, *self.shift_b.param_sets) f = self.sip1d_a.evaluate(u, v, *self.sip1d_a.param_sets) g = self.sip1d_b.evaluate(u, v, *self.sip1d_b.param_sets) return f, g class InverseSIP(Model): """ Inverse Simple Imaging Polynomial Parameters ---------- ap_order : int order for the inverse transformation (AP coefficients) bp_order : int order for the inverse transformation (BP coefficients) ap_coeff : dict coefficients for the inverse transform bp_coeff : dict coefficients for the inverse transform """ inputs = ('x', 'y') outputs = ('u', 'v') def __init__(self, ap_order, bp_order, ap_coeff={}, bp_coeff={}, n_models=None, model_set_axis=None, name=None, meta=None): self._ap_order = ap_order self._bp_order = bp_order self._ap_coeff = ap_coeff self._bp_coeff = bp_coeff # define the 0th term in order to use Polynomial2D ap_coeff.setdefault('AP_0_0', 0) bp_coeff.setdefault('BP_0_0', 0) ap_coeff_params = dict((k.replace('AP_', 'c'), v) for k, v in ap_coeff.items()) bp_coeff_params = dict((k.replace('BP_', 'c'), v) for k, v in bp_coeff.items()) self.sip1d_ap = Polynomial2D(degree=ap_order, model_set_axis=model_set_axis, **ap_coeff_params) self.sip1d_bp = Polynomial2D(degree=bp_order, model_set_axis=model_set_axis, **bp_coeff_params) super(InverseSIP, self).__init__(n_models=n_models, model_set_axis=model_set_axis, name=name, meta=meta) def __repr__(self): return '<{0}({1!r})>'.format(self.__class__.__name__, [self.sip1d_ap, self.sip1d_bp]) def __str__(self): parts = ['Model: {0}'.format(self.__class__.__name__)] for model in [self.sip1d_ap, self.sip1d_bp]: parts.append(indent(str(model), width=4)) parts.append('') return '\n'.join(parts) def evaluate(self, x, y): x1 = self.sip1d_ap.evaluate(x, y, *self.sip1d_ap.param_sets) y1 = self.sip1d_bp.evaluate(x, y, *self.sip1d_bp.param_sets) return x1, y1 astropy-1.1.1/astropy/modeling/setup_package.py0000644001134200020070000001074212644017723022615 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import import os from os.path import join from distutils.core import Extension from distutils import log from astropy.extern import six from astropy_helpers import setup_helpers, utils from astropy_helpers.version_helpers import get_pkg_version_module wcs_setup_package = utils.import_file(join('astropy', 'wcs', 'setup_package.py')) MODELING_ROOT = os.path.relpath(os.path.dirname(__file__)) MODELING_SRC = join(MODELING_ROOT, 'src') SRC_FILES = [join(MODELING_SRC, 'projections.c.templ'), __file__] GEN_FILES = [join(MODELING_SRC, 'projections.c')] # This defines the set of projection functions that we want to wrap. # The key is the projection name, and the value is the number of # parameters. # (These are in the order that the appear in the WCS coordinate # systems paper). projections = { 'azp': 2, 'szp': 3, 'tan': 0, 'stg': 0, 'sin': 2, 'arc': 0, 'zea': 0, 'air': 1, 'cyp': 2, 'cea': 1, 'mer': 0, 'sfl': 0, 'par': 0, 'mol': 0, 'ait': 0, 'cop': 2, 'coe': 2, 'cod': 2, 'coo': 2, 'bon': 1, 'pco': 0, 'tsc': 0, 'csc': 0, 'qsc': 0, 'hpx': 2, 'xph': 0, } def pre_build_py_hook(cmd_obj): preprocess_source() def pre_build_ext_hook(cmd_obj): preprocess_source() def pre_sdist_hook(cmd_obj): preprocess_source() def preprocess_source(): # TODO: Move this to setup_helpers # Generating the wcslib wrappers should only be done if needed. This also # ensures that it is not done for any release tarball since those will # include core.py and core.c. if all(os.path.exists(filename) for filename in GEN_FILES): # Determine modification times src_mtime = max(os.path.getmtime(filename) for filename in SRC_FILES) gen_mtime = min(os.path.getmtime(filename) for filename in GEN_FILES) version = get_pkg_version_module('astropy') if gen_mtime > src_mtime: # If generated source is recent enough, don't update return elif version.release: # or, if we're on a release, issue a warning, but go ahead and use # the wrappers anyway log.warn('WARNING: The autogenerated wrappers in ' 'astropy.modeling._projections seem to be older ' 'than the source templates used to create ' 'them. Because this is a release version we will ' 'use them anyway, but this might be a sign of ' 'some sort of version mismatch or other ' 'tampering. Or it might just mean you moved ' 'some files around or otherwise accidentally ' 'changed timestamps.') return # otherwise rebuild the autogenerated files # If jinja2 isn't present, then print a warning and use existing files try: import jinja2 except: log.warn("WARNING: jinja2 could not be imported, so the existing " "modeling _projections.c file will be used") return from jinja2 import Environment, FileSystemLoader #Prepare the jinja2 templating environment env = Environment(loader=FileSystemLoader(MODELING_SRC)) c_in = env.get_template('projections.c.templ') c_out = c_in.render(projections=projections) with open(join(MODELING_SRC, 'projections.c'), 'w') as fd: fd.write(c_out) def get_package_data(): return { 'astropy.modeling.tests': ['data/*.fits', 'data/*.hdr', '../../wcs/tests/maps/*.hdr'] } def requires_2to3(): return False def get_extensions(): wcslib_files = [ # List of wcslib files to compile 'prj.c', 'wcserr.c', 'wcsprintf.c', 'wcsutil.c' ] wcslib_config_paths = [ join(MODELING_SRC, 'wcsconfig.h') ] cfg = setup_helpers.DistutilsExtensionArgs() wcs_setup_package.get_wcslib_cfg(cfg, wcslib_files, wcslib_config_paths) cfg['include_dirs'].append(MODELING_SRC) astropy_files = [ # List of astropy.modeling files to compile 'projections.c' ] cfg['sources'].extend(join(MODELING_SRC, x) for x in astropy_files) cfg['sources'] = [str(x) for x in cfg['sources']] cfg = dict((str(key), val) for key, val in six.iteritems(cfg)) return [Extension(str('astropy.modeling._projections'), **cfg)] astropy-1.1.1/astropy/modeling/rotations.py0000644001134200020070000002272612644017723022031 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Implements rotations, including spherical rotations as defined in WCS Paper II [1]_ `RotateNative2Celestial` and `RotateCelestial2Native` follow the convention in WCS Paper II to rotate to/from a native sphere and the celestial sphere. The user interface sets and displays angles in degrees but the values are stored internally in radians. This is managed through the parameter setters/getters. References ---------- .. [1] Calabretta, M.R., Greisen, E.W., 2002, A&A, 395, 1077 (Paper II) """ from __future__ import (absolute_import, unicode_literals, division, print_function) import math import numpy as np from .core import Model from .parameters import Parameter __all__ = ['RotateCelestial2Native', 'RotateNative2Celestial', 'Rotation2D', 'EulerAngleRotation'] class EulerAngleRotation(Model): """ Implements Euler angle intrinsic rotations. Rotates one coordinate system into another (fixed) coordinate system. All coordinate systems are right-handed. The sign of the angles is determined by the right-hand rule.. Parameters ---------- phi, theta, psi : float "proper" Euler angles in deg axes_order : str A 3 character string, a combination of 'x', 'y' and 'z', where each character denotes an axis in 3D space. """ inputs = ('alpha', 'delta') outputs = ('alpha', 'delta') phi = Parameter(default=0, getter=np.rad2deg, setter=np.deg2rad) theta = Parameter(default=0, getter=np.rad2deg, setter=np.deg2rad) psi = Parameter(default=0, getter=np.rad2deg, setter=np.deg2rad) def __init__(self, phi, theta, psi, axes_order): self.axes = ['x', 'y', 'z'] if len(axes_order) != 3: raise TypeError( "Expected axes_order to be a character sequence of length 3," "got {0}".format(axes_order)) unrecognized = set(axes_order).difference(self.axes) if unrecognized: raise ValueError("Unrecognized axis label {0}; " "should be one of {1} ".format(unrecognized, self.axes)) self.axes_order = axes_order super(EulerAngleRotation, self).__init__(phi=phi, theta=theta, psi=psi) def _create_matrix(self, phi, theta, psi, axes_order): matrices = [] for angle, axis in zip([phi, theta, psi], axes_order): matrix = np.zeros((3, 3), dtype=np.float) if axis == 'x': mat = self._rotation_matrix_from_angle(angle) matrix[0, 0] = 1 matrix[1:, 1:] = mat elif axis == 'y': mat = self._rotation_matrix_from_angle(-angle) matrix[1, 1] = 1 matrix[0, 0] = mat[0, 0] matrix[0, 2] = mat[0, 1] matrix[2, 0] = mat[1, 0] matrix[2, 2] = mat[1, 1] elif axis == 'z': mat = self._rotation_matrix_from_angle(angle) matrix[2, 2] = 1 matrix[:2, :2] = mat else: raise ValueError("Expected axes_order to be a combination of characters" "'x', 'y' and 'z', got {0}".format( set(axes_order).difference(self.axes))) matrices.append(matrix) return np.dot(matrices[2], np.dot(matrices[1], matrices[0])) def _rotation_matrix_from_angle(self, angle): """ Clockwise rotation matrix. """ return np.array([[math.cos(angle), math.sin(angle)], [-math.sin(angle), math.cos(angle)]]) @staticmethod def spherical2cartesian(alpha, delta): alpha = np.deg2rad(alpha) delta = np.deg2rad(delta) x = np.cos(alpha) * np.cos(delta) y = np.cos(delta) * np.sin(alpha) z = np.sin(delta) return np.array([x, y, z]) def inverse(self): return self.__class__(phi=-self.psi, theta=-self.theta, psi=-self.phi, axes_order=self.axes_order[::-1]) def evaluate(self, alpha, delta, phi, theta, psi): inp = self.spherical2cartesian(alpha, delta) matrix = self._create_matrix(phi, theta, psi, self.axes_order) result = np.dot(matrix, inp) return (np.rad2deg(np.arctan2(result[1], result[0])), np.rad2deg(np.arcsin(result[2]))) class _SkyRotation(Model): """ Base class for FITS WCS sky rotations. Parameters ---------- lon : float Celestial longitude of the fiducial point. lat : float Celestial latitude of the fiducial point. lon_pole : float Longitude of the celestial pole in the native system. """ lon = Parameter(default=0, getter=np.rad2deg, setter=np.deg2rad) lat = Parameter(default=0, getter=np.rad2deg, setter=np.deg2rad) lon_pole = Parameter(default=0, getter=np.rad2deg, setter=np.deg2rad) @staticmethod def _rotate_zxz(phi_i, theta_i, lon, lat, lon_pole): """ Defines a ZXZ rotation from initial coordinates phi_i, theta_i. All inputs and outputs are in radians. """ cos_theta_i = np.cos(theta_i) sin_theta_i = np.sin(theta_i) cos_lat = np.cos(lat) sin_lat = np.sin(lat) delta = phi_i - lon_pole cos_delta = np.cos(delta) phi_f = lon + np.arctan2(-cos_theta_i * np.sin(delta), sin_theta_i * cos_lat - cos_theta_i * sin_lat * cos_delta) theta_f = np.arcsin(sin_theta_i * sin_lat + cos_theta_i * cos_lat * cos_delta) return phi_f, theta_f class RotateNative2Celestial(_SkyRotation): """ Transform from Native to Celestial Spherical Coordinates. Parameters ---------- lon : float Celestial longitude of the fiducial point. lat : float Celestial latitude of the fiducial point. lon_pole : float Longitude of the celestial pole in the native system. """ inputs = ('phi_N', 'theta_N') outputs = ('alpha_C', 'delta_C') @property def inverse(self): return RotateCelestial2Native(self.lon, self.lat, self.lon_pole) @classmethod def evaluate(cls, phi_N, theta_N, lon, lat, lon_pole): """ Rotate native spherical coordinates into celestial coordinates. """ phi_N = np.deg2rad(phi_N) theta_N = np.deg2rad(theta_N) alpha_C, delta_C = cls._rotate_zxz(phi_N, theta_N, lon, lat, lon_pole) alpha_C = np.rad2deg(alpha_C) delta_C = np.rad2deg(delta_C) mask = alpha_C < 0 if isinstance(mask, np.ndarray): alpha_C[mask] += 360 elif mask: alpha_C += 360 return alpha_C, delta_C class RotateCelestial2Native(_SkyRotation): """ Transform from Celestial to Native to Spherical Coordinates. Parameters ---------- lon : float Celestial longitude of the fiducial point. lat : float Celestial latitude of the fiducial point. lon_pole : float Longitude of the celestial pole in the native system. """ inputs = ('alpha_C', 'delta_C') outputs = ('phi_N', 'theta_N') @property def inverse(self): return RotateNative2Celestial(self.lon, self.lat, self.lon_pole) @classmethod def evaluate(cls, alpha_C, delta_C, lon, lat, lon_pole): """ Rotate celestial coordinates into native spherical coordinates. This is the inverse transformation of RotateNative2Celestial. """ alpha_C = np.deg2rad(alpha_C) delta_C = np.deg2rad(delta_C) phi_N, theta_N = cls._rotate_zxz(alpha_C, delta_C, lon_pole, lat, lon) phi_N = np.rad2deg(phi_N) theta_N = np.rad2deg(theta_N) mask = phi_N > 180 if isinstance(mask, np.ndarray): phi_N[mask] -= 360 elif mask: phi_N -= 360 return phi_N, theta_N class Rotation2D(Model): """ Perform a 2D rotation given an angle in degrees. Positive angles represent a counter-clockwise rotation and vice-versa. Parameters ---------- angle : float angle of rotation in deg """ inputs = ('x', 'y') outputs = ('x', 'y') angle = Parameter(default=0.0, getter=np.rad2deg, setter=np.deg2rad) @property def inverse(self): """Inverse rotation.""" return self.__class__(angle=-self.angle) @classmethod def evaluate(cls, x, y, angle): """ Apply the rotation to a set of 2D Cartesian coordinates given as two lists--one for the x coordinates and one for a y coordinates--or a single coordinate pair. """ if x.shape != y.shape: raise ValueError("Expected input arrays to have the same shape") # Note: If the original shape was () (an array scalar) convert to a # 1-element 1-D array on output for consistency with most other models orig_shape = x.shape or (1,) inarr = np.array([x.flatten(), y.flatten()]) result = np.dot(cls._compute_matrix(angle), inarr) x, y = result[0], result[1] x.shape = y.shape = orig_shape return x, y @staticmethod def _compute_matrix(angle): return np.array([[math.cos(angle), -math.sin(angle)], [math.sin(angle), math.cos(angle)]], dtype=np.float64) astropy-1.1.1/astropy/modeling/statistic.py0000644001134200020070000000235512640262015022002 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Statistic functions used in `~astropy.modeling.fitting`. """ from __future__ import (absolute_import, unicode_literals, division, print_function) import numpy as np __all__ = ['leastsquare'] def leastsquare(measured_vals, updated_model, weights, x, y=None): """ Least square statistic with optional weights. Parameters ---------- measured_vals : `~numpy.ndarray` Measured data values. updated_model : `~astropy.modeling.Model` Model with parameters set by the current iteration of the optimizer. weights : `~numpy.ndarray` Array of weights to apply to each residual. x : `~numpy.ndarray` Independent variable "x" to evaluate the model on. y : `~numpy.ndarray`, optional Independent variable "y" to evaluate the model on, for 2D models. Returns ------- res : float The sum of least squares. """ if y is None: model_vals = updated_model(x) else: model_vals = updated_model(x, y) if weights is None: return np.sum((model_vals - measured_vals) ** 2) else: return np.sum((weights * (model_vals - measured_vals)) ** 2) astropy-1.1.1/astropy/modeling/_compound_deprecated.py0000644001134200020070000003236712640262015024144 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains implementations of the old compound model interfaces that are now deprecated. The classes exported by this module should be imported from `astropy.modeling` rather than from `astropy.modeling.core` or from this module directly. """ from __future__ import (absolute_import, unicode_literals, division, print_function) import functools import operator import warnings import numpy as np from ..utils import deprecated, indent from ..utils.compat.odict import OrderedDict from ..utils.exceptions import AstropyDeprecationWarning from .core import Model __all__ = ['LabeledInput', 'SerialCompositeModel', 'SummedCompositeModel'] @deprecated('1.0', alternative=':ref:`compound-models` as described in the ' 'Astropy documentation') class LabeledInput(OrderedDict): """ Used by `SerialCompositeModel` and `SummedCompositeModel` to choose input data using labels. This is a container assigning labels (names) to all input data arrays to a composite model. Parameters ---------- data : list List of all input data labels : list of strings names matching each coordinate in data Examples -------- >>> y, x = np.mgrid[:5, :5] >>> l = np.arange(10) >>> labeled_input = LabeledInput([x, y, l], ['x', 'y', 'pixel']) >>> labeled_input.x array([[0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4]]) >>> labeled_input['x'] array([[0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4]]) """ def __init__(self, data, labels): if len(labels) != len(data): raise TypeError("Number of labels and data doesn't match") super(LabeledInput, self).__init__(zip(labels, data)) def __getattr__(self, label): try: return self[label] except KeyError: raise AttributeError(label) def __setattr__(self, label, data): if label.startswith('_'): super(LabeledInput, self).__setattr__(label, data) else: self[label] = data def __delattr__(self, label): try: del self[label] except KeyError: raise AttributeError(label) @property def labels(self): return tuple(self.keys()) def add(self, label=None, value=None, **kw): """ Add input data to a LabeledInput object Parameters -------------- label : str coordinate label value : numerical type coordinate value kw : dictionary if given this is a dictionary of ``{label: value}`` pairs """ if ((label is None and value is not None) or (label is not None and value is None)): raise TypeError("Expected label and value to be defined") kw[label] = value self.update(kw) def copy(self): return LabeledInput(self.values(), self.labels) class _LabeledInputMapping(Model): def __init__(self, labeled_input, inmap, outmap): self._labeled_input = labeled_input self._inmap = tuple(inmap) self._outmap = tuple(outmap) super(_LabeledInputMapping, self).__init__() def __repr__(self): return '<{0}>'.format(self.name) @property def inputs(self): return self._outmap @property def outputs(self): return self._inmap @property def name(self): return '{0}({1} -> {2})'.format(self.__class__.__name__, self._outmap, self._inmap) def evaluate(self, *inputs): for idx, label in enumerate(self._outmap): self._labeled_input[label] = inputs[idx] result = tuple(self._labeled_input[label] for label in self._inmap) if len(result) == 1: return result[0] else: return result class _CompositeModel(Model): """Base class for all composite models.""" _operator = None fittable = False def __init__(self, transforms, n_inputs, n_outputs, inmap=None, outmap=None): self._transforms = transforms param_names = [] for tr in self._transforms: param_names.extend(tr.param_names) super(_CompositeModel, self).__init__() self.param_names = param_names self._n_inputs = n_inputs self._n_outputs = n_outputs self._basic_transform = None self._inmap = inmap self._outmap = outmap def __repr__(self): return '<{0}([\n{1}\n])>'.format( self.__class__.__name__, indent(',\n'.join(repr(tr) for tr in self._transforms), width=4)) def __str__(self): parts = ['Model: {0}'.format(self.__class__.__name__)] for tr in self._transforms: parts.append(indent(str(tr), width=4)) return '\n'.join(parts) @property def inputs(self): return self._transforms[0].inputs @property def outputs(self): return self._transforms[-1].outputs @property def n_inputs(self): return self._n_inputs @n_inputs.setter def n_inputs(self, val): warnings.warn( 'Setting n_inputs on {0} objects is undefined and should not ' 'be used.'.format(self.__class__.__name__), AstropyDeprecationWarning) self._n_inputs = val @property def n_outputs(self): return self._n_outputs @n_outputs.setter def n_outputs(self, val): warnings.warn( 'Setting n_outputs on {0} objects is undefined and should not ' 'be used.'.format(self.__class__.__name__), AstropyDeprecationWarning) self._n_outputs = val def invert(self): raise NotImplementedError("Subclasses should implement this") @property def parameters(self): raise NotImplementedError( "Composite models do not currently support the .parameters " "array.") def evaluate(self, *inputs): """ Specialized `Model.evaluate` implementation that allows `LabeledInput` inputs to be handled when calling this model. This ignores any passed in parameter values, as _CompositeModels can't be fitted anyways. """ # Drop parameter arguments inputs = inputs[:self.n_inputs] if len(inputs) == 1 and isinstance(inputs[0], LabeledInput): labeled_input = inputs[0].copy() transform = self._make_labeled_transform(labeled_input) inputs = [labeled_input[label] for label in self._inmap[0]] result = transform(*inputs) if self._transforms[-1].n_outputs == 1: labeled_input[self._outmap[-1][0]] = result else: for label, output in zip(self._outmap[-1], result): labeled_input[label] = output return labeled_input else: if self._basic_transform is None: transform = self._transforms[0] for t in self._transforms[1:]: transform = self._operator(transform, t) self._basic_transform = transform return self._basic_transform(*inputs) def __call__(self, *inputs): """ Specialized `Model.__call__` implementation that allows `LabeledInput` inputs to be handled when calling this model. """ return self.evaluate(*inputs) def _param_sets(self, raw=False): all_params = tuple(m._param_sets(raw=raw) for m in self._transforms) return np.vstack(all_params) def _make_labeled_transform(self, labeled_input): """ Build up a transformation graph that incorporates the instructions encoded in the `LabeledInput` object. This requires use of the ``_inmap`` and ``_outmap`` attributes set when instantiating this `_CompositeModel`. """ if self._inmap is None: raise TypeError("Parameter 'inmap' must be provided when " "input is a labeled object.") if self._outmap is None: raise TypeError("Parameter 'outmap' must be provided when " "input is a labeled object") transforms = [self._transforms[0]] previous_outmap = self._outmap[0] for model, inmap, outmap in zip(self._transforms[1:], self._inmap[1:], self._outmap[1:]): mapping = _LabeledInputMapping(labeled_input, inmap, previous_outmap) transforms.append(mapping | model) previous_outmap = outmap return functools.reduce(self._operator, transforms) @deprecated('1.0', alternative=':ref:`compound-models` as described in the ' 'Astropy documentation') class SerialCompositeModel(_CompositeModel): """ Composite model that evaluates models in series. Parameters ---------- transforms : list a list of transforms in the order to be executed inmap : list of lists or None labels in an input instance of LabeledInput if None, the number of input coordinates is exactly what the transforms expect outmap : list or None labels in an input instance of LabeledInput if None, the number of output coordinates is exactly what the transforms expect n_inputs : int dimension of input space (e.g. 2 for a spatial model) n_outputs : int dimension of output Notes ----- Output values of one model are used as input values of another. Obviously the order of the models matters. Examples -------- Apply a 2D rotation followed by a shift in x and y:: >>> import numpy as np >>> from astropy.modeling import models, LabeledInput, SerialCompositeModel >>> y, x = np.mgrid[:5, :5] >>> rotation = models.Rotation2D(angle=23.5) >>> offset_x = models.Shift(-4.23) >>> offset_y = models.Shift(2) >>> labeled_input = LabeledInput([x, y], ["x", "y"]) >>> transform = SerialCompositeModel([rotation, offset_x, offset_y], ... inmap=[['x', 'y'], ['x'], ['y']], ... outmap=[['x', 'y'], ['x'], ['y']]) >>> result = transform(labeled_input) """ _operator = operator.or_ def __init__(self, transforms, inmap=None, outmap=None, n_inputs=None, n_outputs=None): if n_inputs is None: n_inputs = max([tr.n_inputs for tr in transforms]) # the output dimension is equal to the output dim of the last # transform n_outputs = transforms[-1].n_outputs else: if n_outputs is None: raise TypeError("Expected n_inputs and n_outputs") if transforms and inmap and outmap: if not (len(transforms) == len(inmap) == len(outmap)): raise ValueError("Expected sequences of transform, " "inmap and outmap to have the same length") super(SerialCompositeModel, self).__init__( transforms, n_inputs, n_outputs, inmap=inmap, outmap=outmap) def inverse(self): try: transforms = [] for transform in self._transforms[::-1]: transforms.append(transform.inverse) except NotImplementedError: raise NotImplementedError( "An analytical inverse has not been implemented for " "{0} models.".format(transform.__class__.__name__)) if self._inmap is not None: inmap = self._inmap[::-1] outmap = self._outmap[::-1] else: inmap = None outmap = None return SerialCompositeModel(transforms, inmap, outmap) @deprecated('1.0', alternative=':ref:`compound-models` as described in the ' 'Astropy documentation') class SummedCompositeModel(_CompositeModel): """ Composite model that evaluates models in parallel. Parameters -------------- transforms : list transforms to be executed in parallel inmap : list or None labels in an input instance of LabeledInput if None, the number of input coordinates is exactly what the transforms expect outmap : list or None Notes ----- Evaluate each model separately and add the results to the input_data. """ _operator = operator.add def __init__(self, transforms, inmap=None, outmap=None): n_inputs = transforms[0].n_inputs n_outputs = n_inputs for transform in transforms: if not (transform.n_inputs == transform.n_outputs == n_inputs): raise ValueError("A SummedCompositeModel expects n_inputs = " "n_outputs for all transforms") super(SummedCompositeModel, self).__init__(transforms, n_inputs, n_outputs, inmap=inmap, outmap=outmap) astropy-1.1.1/astropy/modeling/__init__.py0000644001134200020070000000065212640262015021530 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This subpackage provides a framework for representing models and performing model evaluation and fitting. It supports 1D and 2D models and fitting with parameter constraints. It has some predefined models and fitting routines. """ from . import fitting from . import models from .core import * from .parameters import * from ._compound_deprecated import * astropy-1.1.1/astropy/modeling/mappings.py0000644001134200020070000001244012640262015021605 0ustar embrayscience00000000000000""" Special models useful for complex compound models where control is needed over which outputs from a source model are mapped to which inputs of a target model. """ from .core import Model __all__ = ['Mapping', 'Identity'] class Mapping(Model): """ Allows inputs to be reordered, duplicated or dropped. Parameters ---------- mapping : tuple A tuple of integers representing indices of the inputs to this model to return and in what order to return them. See :ref:`compound-model-mappings` for more details. n_inputs : int Number of inputs; if `None` (default) then ``max(mapping) + 1`` is used (i.e. the highest input index used in the mapping). name : str, optional A human-friendly name associated with this model instance (particularly useful for identifying the individual components of a compound model). meta : dict-like Free-form metadata to associate with this model. Raises ------ TypeError Raised when number of inputs is less that ``max(mapping)``. Examples -------- >>> from astropy.modeling.models import Polynomial2D, Shift, Mapping >>> poly1 = Polynomial2D(1, c0_0=1, c1_0=2, c0_1=3) >>> poly2 = Polynomial2D(1, c0_0=1, c1_0=2.4, c0_1=2.1) >>> model = (Shift(1) & Shift(2)) | Mapping((0, 1, 0, 1)) | (poly1 & poly2) >>> model(1, 2) # doctest: +FLOAT_CMP (17.0, 14.2) """ def __init__(self, mapping, n_inputs=None, name=None, meta=None): if n_inputs is None: self._inputs = tuple('x' + str(idx) for idx in range(max(mapping) + 1)) else: self._inputs = tuple('x' + str(idx) for idx in range(n_inputs)) self._outputs = tuple('x' + str(idx) for idx in range(len(mapping))) self._mapping = mapping super(Mapping, self).__init__(name=name, meta=meta) @property def inputs(self): """ The name(s) of the input variable(s) on which a model is evaluated. """ return self._inputs @property def outputs(self): """The name(s) of the output(s) of the model.""" return self._outputs @property def mapping(self): """Integers representing indices of the inputs.""" return self._mapping def __repr__(self): if self.name is None: return ''.format(self.mapping) else: return ''.format(self.mapping, self.name) def evaluate(self, *args): if len(args) != self.n_inputs: name = self.name if self.name is not None else "Mapping" raise TypeError('{0} expects {1} inputs; got {2}'.format( name, self.n_inputs, len(args))) result = tuple(args[idx] for idx in self._mapping) if self.n_outputs == 1: return result[0] return result @property def inverse(self): """ A `Mapping` representing the inverse of the current mapping. Raises ------ `NotImplementedError` An inverse does no exist on mappings that drop some of its inputs (there is then no way to reconstruct the inputs that were dropped). """ try: mapping = tuple(self.mapping.index(idx) for idx in range(self.n_inputs)) except ValueError: raise NotImplementedError( "Mappings such as {0} that drop one or more of their inputs " "are not invertible at this time.".format(self.mapping)) inv = self.__class__(mapping) inv._inputs = self._outputs inv._outputs = self._inputs return inv class Identity(Mapping): """ Returns inputs unchanged. This class is useful in compound models when some of the inputs must be passed unchanged to the next model. Parameters ---------- n_inputs : int Specifies the number of inputs this identity model accepts. name : str, optional A human-friendly name associated with this model instance (particularly useful for identifying the individual components of a compound model). meta : dict-like Free-form metadata to associate with this model. Examples -------- Transform ``(x, y)`` by a shift in x, followed by scaling the two inputs:: >>> from astropy.modeling.models import (Polynomial1D, Shift, Scale, ... Identity) >>> model = (Shift(1) & Identity(1)) | Scale(1.2) & Scale(2) >>> model(1,1) # doctest: +FLOAT_CMP (2.4, 2.0) >>> model.inverse(2.4, 2) # doctest: +FLOAT_CMP (1.0, 1.0) """ def __init__(self, n_inputs, name=None, meta=None): mapping = tuple(range(n_inputs)) super(Identity, self).__init__(mapping, name=name, meta=meta) def __repr__(self): if self.name is None: return ''.format(self.n_inputs) else: return ''.format(self.n_inputs, self.name) @property def inverse(self): """ The inverse transformation. In this case of `Identity`, ``self.inverse is self``. """ return self astropy-1.1.1/astropy/modeling/functional_models.py0000644001134200020070000014602012644017723023506 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """Mathematical models.""" from __future__ import (absolute_import, unicode_literals, division, print_function) import inspect import numpy as np from .core import (Fittable1DModel, Fittable2DModel, Model, ModelDefinitionError, custom_model) from .parameters import Parameter, InputParameterError from .utils import ellipse_extent from ..utils import deprecated from ..utils.compat.funcsigs import signature from ..extern import six from .utils import get_inputs_and_params __all__ = sorted([ 'AiryDisk2D', 'Moffat1D', 'Moffat2D', 'Box1D', 'Box2D', 'Const1D', 'Const2D', 'Ellipse2D', 'Disk2D', 'Gaussian1D', 'GaussianAbsorption1D', 'Gaussian2D', 'Linear1D', 'Lorentz1D', 'MexicanHat1D', 'MexicanHat2D', 'Redshift', 'Scale', 'Sersic1D', 'Sersic2D', 'Shift', 'Sine1D', 'Trapezoid1D', 'TrapezoidDisk2D', 'Ring2D', 'custom_model_1d', 'Voigt1D' ]) class Gaussian1D(Fittable1DModel): """ One dimensional Gaussian model. Parameters ---------- amplitude : float Amplitude of the Gaussian. mean : float Mean of the Gaussian. stddev : float Standard deviation of the Gaussian. Notes ----- Model formula: .. math:: f(x) = A e^{- \\frac{\\left(x - x_{0}\\right)^{2}}{2 \\sigma^{2}}} Examples -------- >>> from astropy.modeling import models >>> def tie_center(model): ... mean = 50 * model.stddev ... return mean >>> tied_parameters = {'mean': tie_center} Specify that 'mean' is a tied parameter in one of two ways: >>> g1 = models.Gaussian1D(amplitude=10, mean=5, stddev=.3, ... tied=tied_parameters) or >>> g1 = models.Gaussian1D(amplitude=10, mean=5, stddev=.3) >>> g1.mean.tied False >>> g1.mean.tied = tie_center >>> g1.mean.tied Fixed parameters: >>> g1 = models.Gaussian1D(amplitude=10, mean=5, stddev=.3, ... fixed={'stddev': True}) >>> g1.stddev.fixed True or >>> g1 = models.Gaussian1D(amplitude=10, mean=5, stddev=.3) >>> g1.stddev.fixed False >>> g1.stddev.fixed = True >>> g1.stddev.fixed True See Also -------- Gaussian2D, Box1D, Moffat1D, Lorentz1D """ amplitude = Parameter(default=1) mean = Parameter(default=0) stddev = Parameter(default=1) def bounding_box(self, factor=5.5): """ Tuple defining the default ``bounding_box`` limits, ``(x_low, x_high)`` Parameters ---------- factor : float The multiple of `stddev` used to define the limits. The default is 5.5, corresponding to a relative error < 1e-7. Examples -------- >>> from astropy.modeling.models import Gaussian1D >>> model = Gaussian1D(mean=0, stddev=2) >>> model.bounding_box (-11.0, 11.0) This range can be set directly (see: `Model.bounding_box `) or by using a different factor, like: >>> model.bounding_box = model.bounding_box(factor=2) >>> model.bounding_box (-4.0, 4.0) """ x0 = self.mean.value dx = factor * self.stddev return (x0 - dx, x0 + dx) @staticmethod def evaluate(x, amplitude, mean, stddev): """ Gaussian1D model function. """ return amplitude * np.exp(- 0.5 * (x - mean) ** 2 / stddev ** 2) @staticmethod def fit_deriv(x, amplitude, mean, stddev): """ Gaussian1D model function derivatives. """ d_amplitude = np.exp(-0.5 / stddev ** 2 * (x - mean) ** 2) d_mean = amplitude * d_amplitude * (x - mean) / stddev ** 2 d_stddev = amplitude * d_amplitude * (x - mean) ** 2 / stddev ** 3 return [d_amplitude, d_mean, d_stddev] class GaussianAbsorption1D(Fittable1DModel): """ One dimensional Gaussian absorption line model. Parameters ---------- amplitude : float Amplitude of the gaussian absorption. mean : float Mean of the gaussian. stddev : float Standard deviation of the gaussian. Notes ----- Model formula: .. math:: f(x) = 1 - A e^{- \\frac{\\left(x - x_{0}\\right)^{2}}{2 \\sigma^{2}}} See Also -------- Gaussian1D """ amplitude = Parameter(default=1) mean = Parameter(default=0) stddev = Parameter(default=1) def bounding_box(self, factor=5.5): """ Tuple defining the default ``bounding_box`` limits, ``(x_low, x_high)`` Parameters ---------- factor : float The multiple of `stddev` used to define the limits. The default is 5.5, corresponding to a relative error < 1e-7. Examples -------- >>> from astropy.modeling.models import Gaussian1D >>> model = Gaussian1D(mean=0, stddev=2) >>> model.bounding_box (-11.0, 11.0) This range can be set directly (see: ``help(model.bounding_box)``) or by using a different factor, like: >>> model.bounding_box = model.bounding_box(factor=2) >>> model.bounding_box (-4.0, 4.0) """ x0 = self.mean.value dx = factor * self.stddev return (x0 - dx, x0 + dx) @staticmethod def evaluate(x, amplitude, mean, stddev): """ GaussianAbsorption1D model function. """ return 1.0 - Gaussian1D.evaluate(x, amplitude, mean, stddev) @staticmethod def fit_deriv(x, amplitude, mean, stddev): """ GaussianAbsorption1D model function derivatives. """ import operator return list(six.moves.map( operator.neg, Gaussian1D.fit_deriv(x, amplitude, mean, stddev))) class Gaussian2D(Fittable2DModel): """ Two dimensional Gaussian model. Parameters ---------- amplitude : float Amplitude of the Gaussian. x_mean : float Mean of the Gaussian in x. y_mean : float Mean of the Gaussian in y. x_stddev : float Standard deviation of the Gaussian in x before rotating by theta. ``x_stddev`` and ``y_stddev`` must be specified unless a covariance matrix (``cov_matrix``) is input. y_stddev : float Standard deviation of the Gaussian in y before rotating by theta. ``x_stddev`` and ``y_stddev`` must be specified unless a covariance matrix (``cov_matrix``) is input. theta : float, optional Rotation angle in radians. The rotation angle increases counterclockwise, from the positive x-axis. cov_matrix : ndarray, optional A 2x2 covariance matrix. If specified, overrides the ``x_stddev``, ``y_stddev``, and ``theta`` specification. Notes ----- Model formula: .. math:: f(x, y) = A e^{-a\\left(x - x_{0}\\right)^{2} -b\\left(x - x_{0}\\right) \\left(y - y_{0}\\right) -c\\left(y - y_{0}\\right)^{2}} Using the following definitions: .. math:: a = \\left(\\frac{\\cos^{2}{\\left (\\theta \\right )}}{2 \\sigma_{x}^{2}} + \\frac{\\sin^{2}{\\left (\\theta \\right )}}{2 \\sigma_{y}^{2}}\\right) b = \\left(\\frac{\\sin{\\left (2 \\theta \\right )}}{2 \\sigma_{x}^{2}} - \\frac{\\sin{\\left (2 \\theta \\right )}}{2 \\sigma_{y}^{2}}\\right) c = \\left(\\frac{\\sin^{2}{\\left (\\theta \\right )}}{2 \\sigma_{x}^{2}} + \\frac{\\cos^{2}{\\left (\\theta \\right )}}{2 \\sigma_{y}^{2}}\\right) If using a ``cov_matrix``, the model is of the form: .. math:: f(x, y) = A e^{-0.5 \\left(\\vec{x} - \\vec{x}_{0}\\right)^{T} \\Sigma^{-1} \\left(\\vec{x} - \\vec{x}_{0}\\right)} where :math:`\\vec{x} = [x, y]`, :math:`\\vec{x}_{0} = [x_{0}, y_{0}]`, and :math:`\\Sigma` is the covariance matrix: .. math:: \\Sigma = \\left(\\begin{array}{ccc} \\sigma_x^2 & \\rho \\sigma_x \\sigma_y \\\\ \\rho \\sigma_x \\sigma_y & \\sigma_y^2 \end{array}\\right) :math:`\\rho` is the correlation between ``x`` and ``y``, which should be between -1 and +1. Positive correlation corresponds to a ``theta`` in the range 0 to 90 degrees. Negative correlation corresponds to a ``theta`` in the range of 0 to -90 degrees. See [1]_ for more details about the 2D Gaussian function. See Also -------- Gaussian1D, Box2D, Moffat2D References ---------- .. [1] http://en.wikipedia.org/wiki/Gaussian_function """ amplitude = Parameter(default=1) x_mean = Parameter(default=0) y_mean = Parameter(default=0) x_stddev = Parameter(default=1) y_stddev = Parameter(default=1) theta = Parameter(default=0) def __init__(self, amplitude=amplitude.default, x_mean=x_mean.default, y_mean=y_mean.default, x_stddev=None, y_stddev=None, theta=0.0, cov_matrix=None, **kwargs): if y_stddev is None and cov_matrix is None: raise InputParameterError( "Either x/y_stddev must be specified, or a " "covariance matrix.") elif x_stddev is None and cov_matrix is None: raise InputParameterError( "Either x/y_stddev must be specified, or a " "covariance matrix.") elif cov_matrix is not None and (x_stddev is not None or y_stddev is not None): raise InputParameterError( "Cannot specify both cov_matrix and x/y_stddev") # Compute principle coordinate system transformation elif cov_matrix is not None: if (x_stddev is not None or y_stddev is not None): raise InputParameterError( "Cannot specify both cov_matrix and x/y_stddev") # Compute principle coordinate system transformation cov_matrix = np.array(cov_matrix) if cov_matrix.shape != (2, 2): # TODO: Maybe it should be possible for the covariance matrix # to be some (x, y, ..., z, 2, 2) array to be broadcast with # other parameters of shape (x, y, ..., z) # But that's maybe a special case to work out if/when needed raise ValueError("Covariance matrix must be 2x2") eig_vals, eig_vecs = np.linalg.eig(cov_matrix) x_stddev, y_stddev = np.sqrt(eig_vals) y_vec = eig_vecs[:, 0] theta = np.arctan2(y_vec[1], y_vec[0]) super(Gaussian2D, self).__init__( amplitude=amplitude, x_mean=x_mean, y_mean=y_mean, x_stddev=x_stddev, y_stddev=y_stddev, theta=theta, **kwargs) def bounding_box(self, factor=5.5): """ Tuple defining the default ``bounding_box`` limits in each dimension, ``((y_low, y_high), (x_low, x_high))`` The default offset from the mean is 5.5-sigma, corresponding to a relative error < 1e-7. The limits are adjusted for rotation. Parameters ---------- factor : float, optional The multiple of `x_stddev` and `y_stddev` used to define the limits. The default is 5.5. Examples -------- >>> from astropy.modeling.models import Gaussian2D >>> model = Gaussian2D(x_mean=0, y_mean=0, x_stddev=1, y_stddev=2) >>> model.bounding_box ((-11.0, 11.0), (-5.5, 5.5)) This range can be set directly (see: `Model.bounding_box `) or by using a different factor like: >>> model.bounding_box = model.bounding_box(factor=2) >>> model.bounding_box ((-4.0, 4.0), (-2.0, 2.0)) """ a = factor * self.x_stddev b = factor * self.y_stddev theta = self.theta.value dx, dy = ellipse_extent(a, b, theta) return ((self.y_mean - dy, self.y_mean + dy), (self.x_mean - dx, self.x_mean + dx)) @staticmethod def evaluate(x, y, amplitude, x_mean, y_mean, x_stddev, y_stddev, theta): """Two dimensional Gaussian function""" cost2 = np.cos(theta) ** 2 sint2 = np.sin(theta) ** 2 sin2t = np.sin(2. * theta) xstd2 = x_stddev ** 2 ystd2 = y_stddev ** 2 xdiff = x - x_mean ydiff = y - y_mean a = 0.5 * ((cost2 / xstd2) + (sint2 / ystd2)) b = 0.5 * ((sin2t / xstd2) - (sin2t / ystd2)) c = 0.5 * ((sint2 / xstd2) + (cost2 / ystd2)) return amplitude * np.exp(-((a * xdiff ** 2) + (b * xdiff * ydiff) + (c * ydiff ** 2))) @staticmethod def fit_deriv(x, y, amplitude, x_mean, y_mean, x_stddev, y_stddev, theta): """Two dimensional Gaussian function derivative with respect to parameters""" cost = np.cos(theta) sint = np.sin(theta) cost2 = np.cos(theta) ** 2 sint2 = np.sin(theta) ** 2 cos2t = np.cos(2. * theta) sin2t = np.sin(2. * theta) xstd2 = x_stddev ** 2 ystd2 = y_stddev ** 2 xstd3 = x_stddev ** 3 ystd3 = y_stddev ** 3 xdiff = x - x_mean ydiff = y - y_mean xdiff2 = xdiff ** 2 ydiff2 = ydiff ** 2 a = 0.5 * ((cost2 / xstd2) + (sint2 / ystd2)) b = 0.5 * ((sin2t / xstd2) - (sin2t / ystd2)) c = 0.5 * ((sint2 / xstd2) + (cost2 / ystd2)) g = amplitude * np.exp(-((a * xdiff2) + (b * xdiff * ydiff) + (c * ydiff2))) da_dtheta = (sint * cost * ((1. / ystd2) - (1. / xstd2))) da_dx_stddev = -cost2 / xstd3 da_dy_stddev = -sint2 / ystd3 db_dtheta = (cos2t / xstd2) - (cos2t / ystd2) db_dx_stddev = -sin2t / xstd3 db_dy_stddev = sin2t / ystd3 dc_dtheta = -da_dtheta dc_dx_stddev = -sint2 / xstd3 dc_dy_stddev = -cost2 / ystd3 dg_dA = g / amplitude dg_dx_mean = g * ((2. * a * xdiff) + (b * ydiff)) dg_dy_mean = g * ((b * xdiff) + (2. * c * ydiff)) dg_dx_stddev = g * (-(da_dx_stddev * xdiff2 + db_dx_stddev * xdiff * ydiff + dc_dx_stddev * ydiff2)) dg_dy_stddev = g * (-(da_dy_stddev * xdiff2 + db_dy_stddev * xdiff * ydiff + dc_dy_stddev * ydiff2)) dg_dtheta = g * (-(da_dtheta * xdiff2 + db_dtheta * xdiff * ydiff + dc_dtheta * ydiff2)) return [dg_dA, dg_dx_mean, dg_dy_mean, dg_dx_stddev, dg_dy_stddev, dg_dtheta] class Shift(Model): """ Shift a coordinate. Parameters ---------- offset : float Offset to add to a coordinate. """ inputs = ('x',) outputs = ('x',) offset = Parameter(default=0) @property def inverse(self): inv = self.copy() inv.offset *= -1 return inv @staticmethod def evaluate(x, offset): return x + offset class Scale(Model): """ Multiply a model by a factor. Parameters ---------- factor : float Factor by which to scale a coordinate. """ inputs = ('x',) outputs = ('x',) factor = Parameter(default=1) linear = True @property def inverse(self): inv = self.copy() inv.factor = 1 / self.factor return inv @staticmethod def evaluate(x, factor): return factor * x class Redshift(Fittable1DModel): """ One dimensional redshift model. Parameters ---------- z : float or a list of floats Redshift value(s). Notes ----- Model formula: .. math:: \\lambda_{obs} = (1 + z) \\lambda_{rest} """ z = Parameter(description='redshift', default=0) @staticmethod def evaluate(x, z): """One dimensional Redshift model function""" return (1 + z) * x @staticmethod def fit_deriv(x, z): """One dimensional Redshift model derivative""" d_z = x return [d_z] @property def inverse(self): """Inverse Redshift model""" inv = self.copy() inv.z = 1.0 / (1.0 + self.z) - 1.0 return inv class Sersic1D(Fittable1DModel): r""" One dimensional Sersic surface brightness profile. Parameters ---------- amplitude : float Central surface brightness, within r_eff. r_eff : float Effective (half-light) radius n : float Sersic Index. See Also -------- Gaussian1D, Moffat1D, Lorentz1D Notes ----- Model formula: .. math:: I(r)=I_e exp\left[-b_n\left(\frac{r}{r_{e}}\right)^{(1/n)}-1\right] The constant :math:`b_n` is defined such that :math:`r_e` contains half the total luminosity, and can be solved for numerically. .. math:: \Gamma(2n) = 2\gamma (b_n,2n) Examples -------- .. plot:: :include-source: import numpy as np from astropy.modeling.models import Sersic1D import matplotlib.pyplot as plt plt.figure() plt.subplot(111, xscale='log', yscale='log') s1 = Sersic1D(amplitude=1, r_eff=5) r=np.arange(0, 100, .01) for n in range(1, 10): s1.n = n plt.plot(r, s1(r), color=str(float(n) / 15)) plt.axis([1e-1, 30, 1e-2, 1e3]) plt.xlabel('log Radius') plt.ylabel('log Surface Brightness') plt.text(.25, 1.5, 'n=1') plt.text(.25, 300, 'n=10') plt.xticks([]) plt.yticks([]) plt.show() References ---------- .. [1] http://ned.ipac.caltech.edu/level5/March05/Graham/Graham2.html """ amplitude = Parameter(default=1) r_eff = Parameter(default=1) n = Parameter(default=4) _gammaincinv = None def __init__(self, amplitude=amplitude.default, r_eff=r_eff.default, n=n.default, **kwargs): try: from scipy.special import gammaincinv self.__class__._gammaincinv = gammaincinv except ValueError: raise ImportError("Sersic1D model requires scipy > 0.11.") super(Sersic1D, self).__init__( amplitude=amplitude, r_eff=r_eff, n=n, **kwargs) @classmethod def evaluate(cls, r, amplitude, r_eff, n): """One dimensional Sersic profile function.""" return amplitude * np.exp(-cls._gammaincinv(2 * n, 0.5) * ((r / r_eff) ** (1 / n) - 1)) class Sine1D(Fittable1DModel): """ One dimensional Sine model. Parameters ---------- amplitude : float Oscillation amplitude frequency : float Oscillation frequency phase : float Oscillation phase See Also -------- Const1D, Linear1D Notes ----- Model formula: .. math:: f(x) = A \\sin(2 \\pi f x + 2 \\pi p) """ amplitude = Parameter(default=1) frequency = Parameter(default=1) phase = Parameter(default=0) @staticmethod def evaluate(x, amplitude, frequency, phase): """One dimensional Sine model function""" return amplitude * np.sin(2 * np.pi * frequency * x + 2 * np.pi * phase) @staticmethod def fit_deriv(x, amplitude, frequency, phase): """One dimensional Sine model derivative""" d_amplitude = np.sin(2 * np.pi * frequency * x + 2 * np.pi * phase) d_frequency = (2 * np.pi * x * amplitude * np.cos(2 * np.pi * frequency * x + 2 * np.pi * phase)) d_phase = (2 * np.pi * amplitude * np.cos(2 * np.pi * frequency * x + 2 * np.pi * phase)) return [d_amplitude, d_frequency, d_phase] class Linear1D(Fittable1DModel): """ One dimensional Line model. Parameters ---------- slope : float Slope of the straight line intercept : float Intercept of the straight line See Also -------- Const1D Notes ----- Model formula: .. math:: f(x) = a x + b """ slope = Parameter(default=1) intercept = Parameter(default=0) linear = True @staticmethod def evaluate(x, slope, intercept): """One dimensional Line model function""" return slope * x + intercept @staticmethod def fit_deriv(x, slope, intercept): """One dimensional Line model derivative with respect to parameters""" d_slope = x d_intercept = np.ones_like(x) return [d_slope, d_intercept] @property def inverse(self): new_slope = self.slope ** -1 new_intercept = -self.intercept / self.slope return self.__class__(slope=new_slope, intercept=new_intercept) class Lorentz1D(Fittable1DModel): """ One dimensional Lorentzian model. Parameters ---------- amplitude : float Peak value x_0 : float Position of the peak fwhm : float Full width at half maximum See Also -------- Gaussian1D, Box1D, MexicanHat1D Notes ----- Model formula: .. math:: f(x) = \\frac{A \\gamma^{2}}{\\gamma^{2} + \\left(x - x_{0}\\right)^{2}} """ amplitude = Parameter(default=1) x_0 = Parameter(default=0) fwhm = Parameter(default=1) @staticmethod def evaluate(x, amplitude, x_0, fwhm): """One dimensional Lorentzian model function""" return (amplitude * ((fwhm / 2.) ** 2) / ((x - x_0) ** 2 + (fwhm / 2.) ** 2)) @staticmethod def fit_deriv(x, amplitude, x_0, fwhm): """One dimensional Lorentzian model derivative with respect to parameters""" d_amplitude = fwhm ** 2 / (fwhm ** 2 + (x - x_0) ** 2) d_x_0 = (amplitude * d_amplitude * (2 * x - 2 * x_0) / (fwhm ** 2 + (x - x_0) ** 2)) d_fwhm = 2 * amplitude * d_amplitude / fwhm * (1 - d_amplitude) return [d_amplitude, d_x_0, d_fwhm] class Voigt1D(Fittable1DModel): """ One dimensional model for the Voigt profile. Parameters ---------- x_0 : float Position of the peak amplitude_L : float The Lorentzian amplitude fwhm_L : float The Lorentzian full width at half maximum fwhm_G : float The Gaussian full width at half maximum See Also -------- Gaussian1D, Lorentz1D Notes ----- Algorithm for the computation taken from McLean, A. B., Mitchell, C. E. J. & Swanston, D. M. Implementation of an efficient analytical approximation to the Voigt function for photoemission lineshape analysis. Journal of Electron Spectroscopy and Related Phenomena 69, 125-132 (1994) Examples -------- .. plot:: :include-source: import numpy as np from astropy.modeling.models import Voigt1D import matplotlib.pyplot as plt plt.figure() x = np.arange(0, 10, 0.01) v1 = Voigt1D(x_0=5, amplitude_L=10, fwhm_L=0.5, fwhm_G=0.9) plt.plot(x, v1(x)) plt.show() """ x_0 = Parameter(default=0) amplitude_L = Parameter(default=1) fwhm_L = Parameter(default=2/np.pi) fwhm_G = Parameter(default=np.log(2)) _abcd = np.array([ [-1.2150, -1.3509, -1.2150, -1.3509], # A [1.2359, 0.3786, -1.2359, -0.3786], # B [-0.3085, 0.5906, -0.3085, 0.5906], # C [0.0210, -1.1858, -0.0210, 1.1858]]) # D @classmethod def evaluate(cls, x, x_0, amplitude_L, fwhm_L, fwhm_G): A, B, C, D = cls._abcd sqrt_ln2 = np.sqrt(np.log(2)) X = (x - x_0) * 2 * sqrt_ln2 / fwhm_G X = np.atleast_1d(X)[..., np.newaxis] Y = fwhm_L * sqrt_ln2 / fwhm_G Y = np.atleast_1d(Y)[..., np.newaxis] V = np.sum((C * (Y - A) + D * (X - B))/(((Y - A) ** 2 + (X - B) ** 2)), axis=-1) return (fwhm_L * amplitude_L * np.sqrt(np.pi) * sqrt_ln2 / fwhm_G) * V @classmethod def fit_deriv(cls, x, x_0, amplitude_L, fwhm_L, fwhm_G): A, B, C, D = cls._abcd sqrt_ln2 = np.sqrt(np.log(2)) X = (x - x_0) * 2 * sqrt_ln2 / fwhm_G X = np.atleast_1d(X)[:, np.newaxis] Y = fwhm_L * sqrt_ln2 / fwhm_G Y = np.atleast_1d(Y)[:, np.newaxis] constant = fwhm_L * amplitude_L * np.sqrt(np.pi) * sqrt_ln2 / fwhm_G alpha = C * (Y - A) + D * (X - B) beta = (Y - A) ** 2 + (X - B) ** 2 V = np.sum((alpha / beta), axis=-1) dVdx = np.sum((D/beta - 2 * (X - B) * alpha / np.square(beta)), axis=-1) dVdy = np.sum((C/beta - 2 * (Y - A) * alpha / np.square(beta)), axis=-1) dyda = [-constant * dVdx * 2 * sqrt_ln2 / fwhm_G, constant * V / amplitude_L, constant * (V / fwhm_L + dVdy * sqrt_ln2 / fwhm_G), -constant * (V + (sqrt_ln2 / fwhm_G) * (2 * (x - x_0) * dVdx + fwhm_L * dVdy)) / fwhm_G] return dyda class Const1D(Fittable1DModel): """ One dimensional Constant model. Parameters ---------- amplitude : float Value of the constant function See Also -------- Const2D Notes ----- Model formula: .. math:: f(x) = A """ amplitude = Parameter(default=1) linear = True @staticmethod def evaluate(x, amplitude): """One dimensional Constant model function""" if amplitude.size == 1: # This is slightly faster than using ones_like and multiplying x = np.empty_like(x) x.fill(amplitude.item()) else: # This case is less likely but could occur if the amplitude # parameter is given an array-like value x = amplitude * np.ones_like(x) return x @staticmethod def fit_deriv(x, amplitude): """One dimensional Constant model derivative with respect to parameters""" d_amplitude = np.ones_like(x) return [d_amplitude] class Const2D(Fittable2DModel): """ Two dimensional Constant model. Parameters ---------- amplitude : float Value of the constant function See Also -------- Const1D Notes ----- Model formula: .. math:: f(x, y) = A """ amplitude = Parameter(default=1) linear = True @staticmethod def evaluate(x, y, amplitude): """Two dimensional Constant model function""" if amplitude.size == 1: # This is slightly faster than using ones_like and multiplying x = np.empty_like(x) x.fill(amplitude.item()) else: # This case is less likely but could occur if the amplitude # parameter is given an array-like value x = amplitude * np.ones_like(x) return x class Ellipse2D(Fittable2DModel): """ A 2D Ellipse model. Parameters ---------- amplitude : float Value of the ellipse. x_0 : float x position of the center of the disk. y_0 : float y position of the center of the disk. a : float The length of the semimajor axis. b : float The length of the semiminor axis. theta : float The rotation angle in radians of the semimajor axis. The rotation angle increases counterclockwise from the positive x axis. See Also -------- Disk2D, Box2D Notes ----- Model formula: .. math:: f(x, y) = \\left \\{ \\begin{array}{ll} \\mathrm{amplitude} & : \\left[\\frac{(x - x_0) \\cos \\theta + (y - y_0) \\sin \\theta}{a}\\right]^2 + \\left[\\frac{-(x - x_0) \\sin \\theta + (y - y_0) \\cos \\theta}{b}\\right]^2 \\leq 1 \\\\ 0 & : \\mathrm{otherwise} \\end{array} \\right. Examples -------- .. plot:: :include-source: import numpy as np from astropy.modeling.models import Ellipse2D from astropy.coordinates import Angle import matplotlib.pyplot as plt import matplotlib.patches as mpatches x0, y0 = 25, 25 a, b = 20, 10 theta = Angle(30, 'deg') e = Ellipse2D(amplitude=100., x_0=x0, y_0=y0, a=a, b=b, theta=theta.radian) y, x = np.mgrid[0:50, 0:50] fig, ax = plt.subplots(1, 1) ax.imshow(e(x, y), origin='lower', interpolation='none', cmap='Greys_r') e2 = mpatches.Ellipse((x0, y0), 2*a, 2*b, theta.degree, edgecolor='red', facecolor='none') ax.add_patch(e2) plt.show() """ amplitude = Parameter(default=1) x_0 = Parameter(default=0) y_0 = Parameter(default=0) a = Parameter(default=1) b = Parameter(default=1) theta = Parameter(default=0) @staticmethod def evaluate(x, y, amplitude, x_0, y_0, a, b, theta): """Two dimensional Ellipse model function.""" xx = x - x_0 yy = y - y_0 cost = np.cos(theta) sint = np.sin(theta) numerator1 = (xx * cost) + (yy * sint) numerator2 = -(xx * sint) + (yy * cost) in_ellipse = (((numerator1 / a) ** 2 + (numerator2 / b) ** 2) <= 1.) return np.select([in_ellipse], [amplitude]) @property def bounding_box(self): """ Tuple defining the default ``bounding_box`` limits. ``((y_low, y_high), (x_low, x_high))`` """ a = self.a b = self.b theta = self.theta.value dx, dy = ellipse_extent(a, b, theta) return ((self.y_0 - dy, self.y_0 + dy), (self.x_0 - dx, self.x_0 + dx)) class Disk2D(Fittable2DModel): """ Two dimensional radial symmetric Disk model. Parameters ---------- amplitude : float Value of the disk function x_0 : float x position center of the disk y_0 : float y position center of the disk R_0 : float Radius of the disk See Also -------- Box2D, TrapezoidDisk2D Notes ----- Model formula: .. math:: f(r) = \\left \\{ \\begin{array}{ll} A & : r \\leq R_0 \\\\ 0 & : r > R_0 \\end{array} \\right. """ amplitude = Parameter(default=1) x_0 = Parameter(default=0) y_0 = Parameter(default=0) R_0 = Parameter(default=1) @staticmethod def evaluate(x, y, amplitude, x_0, y_0, R_0): """Two dimensional Disk model function""" rr = (x - x_0) ** 2 + (y - y_0) ** 2 return np.select([rr <= R_0 ** 2], [amplitude]) @property def bounding_box(self): """ Tuple defining the default ``bounding_box`` limits. ``((y_low, y_high), (x_low, x_high))`` """ return ((self.y_0 - self.R_0, self.y_0 + self.R_0), (self.x_0 - self.R_0, self.x_0 + self.R_0)) class Ring2D(Fittable2DModel): """ Two dimensional radial symmetric Ring model. Parameters ---------- amplitude : float Value of the disk function x_0 : float x position center of the disk y_0 : float y position center of the disk r_in : float Inner radius of the ring width : float Width of the ring. r_out : float Outer Radius of the ring. Can be specified instead of width. See Also -------- Disk2D, TrapezoidDisk2D Notes ----- Model formula: .. math:: f(r) = \\left \\{ \\begin{array}{ll} A & : r_{in} \\leq r \\leq r_{out} \\\\ 0 & : \\textnormal{else} \\end{array} \\right. Where :math:`r_{out} = r_{in} + r_{width}`. """ amplitude = Parameter(default=1) x_0 = Parameter(default=0) y_0 = Parameter(default=0) r_in = Parameter(default=1) width = Parameter(default=1) def __init__(self, amplitude=amplitude.default, x_0=x_0.default, y_0=y_0.default, r_in=r_in.default, width=width.default, r_out=None, **kwargs): if r_out is not None: if width is not None: raise InputParameterError( "Cannot specify both width and outer radius separately.") width = r_out - r_in elif width is None: width = self.width.default super(Ring2D, self).__init__( amplitude=amplitude, x_0=x_0, y_0=y_0, r_in=r_in, width=width, **kwargs) @staticmethod def evaluate(x, y, amplitude, x_0, y_0, r_in, width): """Two dimensional Ring model function.""" rr = (x - x_0) ** 2 + (y - y_0) ** 2 r_range = np.logical_and(rr >= r_in ** 2, rr <= (r_in + width) ** 2) return np.select([r_range], [amplitude]) @property def bounding_box(self): """ Tuple defining the default ``bounding_box``. ``((y_low, y_high), (x_low, x_high))`` """ dr = self.r_in + self.width return ((self.y_0 - dr, self.y_0 + dr), (self.x_0 - dr, self.x_0 + dr)) class Delta1D(Fittable1DModel): """One dimensional Dirac delta function.""" def __init__(self): raise ModelDefinitionError("Not implemented") class Delta2D(Fittable2DModel): """Two dimensional Dirac delta function.""" def __init__(self): raise ModelDefinitionError("Not implemented") class Box1D(Fittable1DModel): """ One dimensional Box model. Parameters ---------- amplitude : float Amplitude A x_0 : float Position of the center of the box function width : float Width of the box See Also -------- Box2D, TrapezoidDisk2D Notes ----- Model formula: .. math:: f(x) = \\left \\{ \\begin{array}{ll} A & : x_0 - w/2 \\geq x \\geq x_0 + w/2 \\\\ 0 & : \\textnormal{else} \\end{array} \\right. """ amplitude = Parameter(default=1) x_0 = Parameter(default=0) width = Parameter(default=1) @staticmethod def evaluate(x, amplitude, x_0, width): """One dimensional Box model function""" return np.select([np.logical_and(x >= x_0 - width / 2., x <= x_0 + width / 2.)], [amplitude], 0) @classmethod def fit_deriv(cls, x, amplitude, x_0, width): """One dimensional Box model derivative with respect to parameters""" d_amplitude = cls.evaluate(x, 1, x_0, width) d_x_0 = np.zeros_like(x) d_width = np.zeros_like(x) return [d_amplitude, d_x_0, d_width] @property def bounding_box(self): """ Tuple defining the default ``bounding_box`` limits. ``(x_low, x_high))`` """ dx = self.width / 2 return (self.x_0 - dx, self.x_0 + dx) class Box2D(Fittable2DModel): """ Two dimensional Box model. Parameters ---------- amplitude : float Amplitude A x_0 : float x position of the center of the box function x_width : float Width in x direction of the box y_0 : float y position of the center of the box function y_width : float Width in y direction of the box See Also -------- Box1D, Gaussian2D, Moffat2D Notes ----- Model formula: .. math:: f(x, y) = \\left \\{ \\begin{array}{ll} A & : x_0 - w_x/2 \\geq x \\geq x_0 + w_x/2 \\\\ A & : y_0 - w_y/2 \\geq y \\geq y_0 + w_y/2 \\\\ 0 & : \\textnormal{else} \\end{array} \\right. """ amplitude = Parameter(default=1) x_0 = Parameter(default=0) y_0 = Parameter(default=0) x_width = Parameter(default=1) y_width = Parameter(default=1) @staticmethod def evaluate(x, y, amplitude, x_0, y_0, x_width, y_width): """Two dimensional Box model function""" x_range = np.logical_and(x >= x_0 - x_width / 2., x <= x_0 + x_width / 2.) y_range = np.logical_and(y >= y_0 - y_width / 2., y <= y_0 + y_width / 2.) return np.select([np.logical_and(x_range, y_range)], [amplitude], 0) @property def bounding_box(self): """ Tuple defining the default ``bounding_box``. ``((y_low, y_high), (x_low, x_high))`` """ dx = self.x_width / 2 dy = self.y_width / 2 return ((self.y_0 - dy, self.y_0 + dy), (self.x_0 - dx, self.x_0 + dx)) class Trapezoid1D(Fittable1DModel): """ One dimensional Trapezoid model. Parameters ---------- amplitude : float Amplitude of the trapezoid x_0 : float Center position of the trapezoid width : float Width of the constant part of the trapezoid. slope : float Slope of the tails of the trapezoid See Also -------- Box1D, Gaussian1D, Moffat1D """ amplitude = Parameter(default=1) x_0 = Parameter(default=0) width = Parameter(default=1) slope = Parameter(default=1) @staticmethod def evaluate(x, amplitude, x_0, width, slope): """One dimensional Trapezoid model function""" # Compute the four points where the trapezoid changes slope # x1 <= x2 <= x3 <= x4 x2 = x_0 - width / 2. x3 = x_0 + width / 2. x1 = x2 - amplitude / slope x4 = x3 + amplitude / slope # Compute model values in pieces between the change points range_a = np.logical_and(x >= x1, x < x2) range_b = np.logical_and(x >= x2, x < x3) range_c = np.logical_and(x >= x3, x < x4) val_a = slope * (x - x1) val_b = amplitude val_c = slope * (x4 - x) return np.select([range_a, range_b, range_c], [val_a, val_b, val_c]) @property def bounding_box(self): """ Tuple defining the default ``bounding_box`` limits. ``(x_low, x_high))`` """ dx = self.width / 2 + self.amplitude / self.slope return (self.x_0 - dx, self.x_0 + dx) class TrapezoidDisk2D(Fittable2DModel): """ Two dimensional circular Trapezoid model. Parameters ---------- amplitude : float Amplitude of the trapezoid x_0 : float x position of the center of the trapezoid y_0 : float y position of the center of the trapezoid R_0 : float Radius of the constant part of the trapezoid. slope : float Slope of the tails of the trapezoid in x direction. See Also -------- Disk2D, Box2D """ amplitude = Parameter(default=1) x_0 = Parameter(default=0) y_0 = Parameter(default=0) R_0 = Parameter(default=1) slope = Parameter(default=1) @staticmethod def evaluate(x, y, amplitude, x_0, y_0, R_0, slope): """Two dimensional Trapezoid Disk model function""" r = np.sqrt((x - x_0) ** 2 + (y - y_0) ** 2) range_1 = r <= R_0 range_2 = np.logical_and(r > R_0, r <= R_0 + amplitude / slope) val_1 = amplitude val_2 = amplitude + slope * (R_0 - r) return np.select([range_1, range_2], [val_1, val_2]) @property def bounding_box(self): """ Tuple defining the default ``bounding_box``. ``((y_low, y_high), (x_low, x_high))`` """ dr = self.R_0 + self.amplitude / self.slope return ((self.y_0 - dr, self.y_0 + dr), (self.x_0 - dr, self.x_0 + dr)) class MexicanHat1D(Fittable1DModel): """ One dimensional Mexican Hat model. Parameters ---------- amplitude : float Amplitude x_0 : float Position of the peak sigma : float Width of the Mexican hat See Also -------- MexicanHat2D, Box1D, Gaussian1D, Trapezoid1D Notes ----- Model formula: .. math:: f(x) = {A \\left(1 - \\frac{\\left(x - x_{0}\\right)^{2}}{\\sigma^{2}}\\right) e^{- \\frac{\\left(x - x_{0}\\right)^{2}}{2 \\sigma^{2}}}} """ amplitude = Parameter(default=1) x_0 = Parameter(default=0) sigma = Parameter(default=1) @staticmethod def evaluate(x, amplitude, x_0, sigma): """One dimensional Mexican Hat model function""" xx_ww = (x - x_0) ** 2 / (2 * sigma ** 2) return amplitude * (1 - 2 * xx_ww) * np.exp(-xx_ww) class MexicanHat2D(Fittable2DModel): """ Two dimensional symmetric Mexican Hat model. Parameters ---------- amplitude : float Amplitude x_0 : float x position of the peak y_0 : float y position of the peak sigma : float Width of the Mexican hat See Also -------- MexicanHat1D, Gaussian2D Notes ----- Model formula: .. math:: f(x, y) = A \\left(1 - \\frac{\\left(x - x_{0}\\right)^{2} + \\left(y - y_{0}\\right)^{2}}{\\sigma^{2}}\\right) e^{\\frac{- \\left(x - x_{0}\\right)^{2} - \\left(y - y_{0}\\right)^{2}}{2 \\sigma^{2}}} """ amplitude = Parameter(default=1) x_0 = Parameter(default=0) y_0 = Parameter(default=0) sigma = Parameter(default=1) @staticmethod def evaluate(x, y, amplitude, x_0, y_0, sigma): """Two dimensional Mexican Hat model function""" rr_ww = ((x - x_0) ** 2 + (y - y_0) ** 2) / (2 * sigma ** 2) return amplitude * (1 - rr_ww) * np.exp(- rr_ww) class AiryDisk2D(Fittable2DModel): """ Two dimensional Airy disk model. Parameters ---------- amplitude : float Amplitude of the Airy function. x_0 : float x position of the maximum of the Airy function. y_0 : float y position of the maximum of the Airy function. radius : float The radius of the Airy disk (radius of the first zero). See Also -------- Box2D, TrapezoidDisk2D, Gaussian2D Notes ----- Model formula: .. math:: f(r) = A \\left[\\frac{2 J_1(\\frac{\\pi r}{R/R_z})}{\\frac{\\pi r}{R/R_z}}\\right]^2 Where :math:`J_1` is the first order Bessel function of the first kind, :math:`r` is radial distance from the maximum of the Airy function (:math:`r = \\sqrt{(x - x_0)^2 + (y - y_0)^2}`), :math:`R` is the input ``radius`` parameter, and :math:`R_z = 1.2196698912665045`). For an optical system, the radius of the first zero represents the limiting angular resolution and is approximately 1.22 * lambda / D, where lambda is the wavelength of the light and D is the diameter of the aperture. See [1]_ for more details about the Airy disk. References ---------- .. [1] http://en.wikipedia.org/wiki/Airy_disk """ amplitude = Parameter(default=1) x_0 = Parameter(default=0) y_0 = Parameter(default=0) radius = Parameter(default=1) _j1 = None def __init__(self, amplitude=amplitude.default, x_0=x_0.default, y_0=y_0.default, radius=radius.default, **kwargs): if self._j1 is None: try: from scipy.special import j1, jn_zeros self.__class__._j1 = j1 self.__class__._rz = jn_zeros(1, 1)[0] / np.pi # add a ValueError here for python3 + scipy < 0.12 except ValueError: raise ImportError("AiryDisk2D model requires scipy > 0.11.") super(AiryDisk2D, self).__init__( amplitude=amplitude, x_0=x_0, y_0=y_0, radius=radius, **kwargs) # TODO: Why does this particular model have its own special __deepcopy__ # and __copy__? If it has anything to do with the use of the j_1 function # that should be reworked. def __deepcopy__(self, memo): new_model = self.__class__(self.amplitude.value, self.x_0.value, self.y_0.value, self.radius.value) return new_model def __copy__(self): new_model = self.__class__(self.amplitude.value, self.x_0.value, self.y_0.value, self.radius.value) return new_model @classmethod def evaluate(cls, x, y, amplitude, x_0, y_0, radius): """Two dimensional Airy model function""" r = np.sqrt((x - x_0) ** 2 + (y - y_0) ** 2) / (radius / cls._rz) # Since r can be zero, we have to take care to treat that case # separately so as not to raise a numpy warning z = np.ones(r.shape) rt = np.pi * r[r > 0] z[r > 0] = (2.0 * cls._j1(rt) / rt) ** 2 z *= amplitude return z class Moffat1D(Fittable1DModel): """ One dimensional Moffat model. Parameters ---------- amplitude : float Amplitude of the model. x_0 : float x position of the maximum of the Moffat model. gamma : float Core width of the Moffat model. alpha : float Power index of the Moffat model. See Also -------- Gaussian1D, Box1D Notes ----- Model formula: .. math:: f(x) = A \\left(1 + \\frac{\\left(x - x_{0}\\right)^{2}}{\\gamma^{2}}\\right)^{- \\alpha} """ amplitude = Parameter(default=1) x_0 = Parameter(default=0) gamma = Parameter(default=1) alpha = Parameter(default=1) @staticmethod def evaluate(x, amplitude, x_0, gamma, alpha): """One dimensional Moffat model function""" return amplitude * (1 + ((x - x_0) / gamma) ** 2) ** (-alpha) @staticmethod def fit_deriv(x, amplitude, x_0, gamma, alpha): """One dimensional Moffat model derivative with respect to parameters""" d_A = (1 + (x - x_0) ** 2 / gamma ** 2) ** (-alpha) d_x_0 = (-amplitude * alpha * d_A * (-2 * x + 2 * x_0) / (gamma ** 2 * d_A ** alpha)) d_gamma = (2 * amplitude * alpha * d_A * (x - x_0) ** 2 / (gamma ** 3 * d_A ** alpha)) d_alpha = -amplitude * d_A * np.log(1 + (x - x_0) ** 2 / gamma ** 2) return [d_A, d_x_0, d_gamma, d_alpha] class Moffat2D(Fittable2DModel): """ Two dimensional Moffat model. Parameters ---------- amplitude : float Amplitude of the model. x_0 : float x position of the maximum of the Moffat model. y_0 : float y position of the maximum of the Moffat model. gamma : float Core width of the Moffat model. alpha : float Power index of the Moffat model. See Also -------- Gaussian2D, Box2D Notes ----- Model formula: .. math:: f(x, y) = A \\left(1 + \\frac{\\left(x - x_{0}\\right)^{2} + \\left(y - y_{0}\\right)^{2}}{\\gamma^{2}}\\right)^{- \\alpha} """ amplitude = Parameter(default=1) x_0 = Parameter(default=0) y_0 = Parameter(default=0) gamma = Parameter(default=1) alpha = Parameter(default=1) @staticmethod def evaluate(x, y, amplitude, x_0, y_0, gamma, alpha): """Two dimensional Moffat model function""" rr_gg = ((x - x_0) ** 2 + (y - y_0) ** 2) / gamma ** 2 return amplitude * (1 + rr_gg) ** (-alpha) @staticmethod def fit_deriv(x, y, amplitude, x_0, y_0, gamma, alpha): """Two dimensional Moffat model derivative with respect to parameters""" rr_gg = ((x - x_0) ** 2 + (y - y_0) ** 2) / gamma ** 2 d_A = (1 + rr_gg) ** (-alpha) d_x_0 = (-amplitude * alpha * d_A * (-2 * x + 2 * x_0) / (gamma ** 2 * (1 + rr_gg))) d_y_0 = (-amplitude * alpha * d_A * (-2 * y + 2 * y_0) / (gamma ** 2 * (1 + rr_gg))) d_alpha = -amplitude * d_A * np.log(1 + rr_gg) d_gamma = 2 * amplitude * alpha * d_A * (rr_gg / (gamma * (1 + rr_gg))) return [d_A, d_x_0, d_y_0, d_gamma, d_alpha] class Sersic2D(Fittable2DModel): r""" Two dimensional Sersic surface brightness profile. Parameters ---------- amplitude : float Central surface brightness, within r_eff. r_eff : float Effective (half-light) radius n : float Sersic Index. x_0 : float, optional x position of the center. y_0 : float, optional y position of the center. ellip : float, optional Ellipticity. theta : float, optional Rotation angle in radians, counterclockwise from the positive x-axis. See Also -------- Gaussian2D, Moffat2D Notes ----- Model formula: .. math:: I(x,y) = I(r) = I_e\exp\left[-b_n\left(\frac{r}{r_{e}}\right)^{(1/n)}-1\right] The constant :math:`b_n` is defined such that :math:`r_e` contains half the total luminosity, and can be solved for numerically. .. math:: \Gamma(2n) = 2\gamma (b_n,2n) Examples -------- .. plot:: :include-source: import numpy as np from astropy.modeling.models import Sersic2D import matplotlib.pyplot as plt x,y = np.meshgrid(np.arange(100), np.arange(100)) mod = Sersic2D(amplitude = 1, r_eff = 25, n=4, x_0=50, y_0=50, ellip=.5, theta=-1) img = mod(x, y) log_img = np.log10(img) plt.figure() plt.imshow(log_img, origin='lower', interpolation='nearest', vmin=-1, vmax=2) plt.xlabel('x') plt.ylabel('y') cbar = plt.colorbar() cbar.set_label('Log Brightness', rotation=270, labelpad=25) cbar.set_ticks([-1, 0, 1, 2], update_ticks=True) plt.show() References ---------- .. [1] http://ned.ipac.caltech.edu/level5/March05/Graham/Graham2.html """ amplitude = Parameter(default=1) r_eff = Parameter(default=1) n = Parameter(default=4) x_0 = Parameter(default=0) y_0 = Parameter(default=0) ellip = Parameter(default=0) theta = Parameter(default=0) _gammaincinv = None def __init__(self, amplitude=amplitude.default, r_eff=r_eff.default, n=n.default, x_0=x_0.default, y_0=y_0.default, ellip=ellip.default, theta=theta.default, **kwargs): try: from scipy.special import gammaincinv self.__class__._gammaincinv = gammaincinv except ValueError: raise ImportError("Sersic2D model requires scipy > 0.11.") super(Sersic2D, self).__init__( amplitude=amplitude, r_eff=r_eff, n=n, x_0=x_0, y_0=y_0, ellip=ellip, theta=theta, **kwargs) @classmethod def evaluate(cls, x, y, amplitude, r_eff, n, x_0, y_0, ellip, theta): """Two dimensional Sersic profile function.""" bn = cls._gammaincinv(2. * n, 0.5) a, b = r_eff, (1 - ellip) * r_eff cos_theta, sin_theta = np.cos(theta), np.sin(theta) x_maj = (x - x_0) * cos_theta + (y - y_0) * sin_theta x_min = -(x - x_0) * sin_theta + (y - y_0) * cos_theta z = np.sqrt((x_maj / a) ** 2 + (x_min / b) ** 2) return amplitude * np.exp(-bn * (z ** (1 / n) - 1)) @deprecated('1.0', alternative='astropy.modeling.models.custom_model', pending=True) def custom_model_1d(func, func_fit_deriv=None): inputs, params = get_inputs_and_params(func) if len(inputs) != 1: raise ModelDefinitionError( "All parameters must be keyword arguments") return custom_model(func, fit_deriv=func_fit_deriv) astropy-1.1.1/astropy/tests/0000755001134200020070000000000012644022135016761 5ustar embrayscience00000000000000astropy-1.1.1/astropy/tests/pytest_plugins.py0000644001134200020070000007372512644020323022437 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ These plugins modify the behavior of py.test and are meant to be imported into conftest.py in the root directory. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import __future__ from ..extern import six from ..extern.six.moves import filter import ast import doctest import datetime import fnmatch import imp import io import locale import math import os import re import sys import types from ..config.paths import set_temp_config, set_temp_cache from .helper import ( pytest, treat_deprecations_as_exceptions, enable_deprecations_as_exceptions, ignore_warnings) from .disable_internet import turn_off_internet, turn_on_internet from .output_checker import AstropyOutputChecker, FIX, FLOAT_CMP from ..utils import OrderedDict from ..utils.argparse import writeable_directory from ..utils.introspection import resolve_name # Needed for Python 2.6 compatibility try: import importlib.machinery as importlib_machinery except ImportError: importlib_machinery = None # these pytest hooks allow us to mark tests and run the marked tests with # specific command line options. def pytest_addoption(parser): parser.addoption("--remote-data", action="store_true", help="run tests with online data") parser.addoption("--open-files", action="store_true", help="fail if any test leaves files open") parser.addoption("--doctest-plus", action="store_true", help="enable running doctests with additional " "features not found in the normal doctest " "plugin") parser.addoption("--doctest-rst", action="store_true", help="enable running doctests in .rst documentation") parser.addoption("--config-dir", nargs='?', type=writeable_directory, help="specify directory for storing and retrieving the " "Astropy configuration during tests (default is " "to use a temporary directory created by the test " "runner); be aware that using an Astropy config " "file other than the default can cause some tests " "to fail unexpectedly") parser.addoption("--cache-dir", nargs='?', type=writeable_directory, help="specify directory for storing and retrieving the " "Astropy cache during tests (default is " "to use a temporary directory created by the test " "runner)") parser.addini("doctest_plus", "enable running doctests with additional " "features not found in the normal doctest plugin") parser.addini("doctest_norecursedirs", "like the norecursedirs option but applies only to doctest " "collection", type="args", default=()) parser.addini("doctest_rst", "Run the doctests in the rst documentation", default=False) parser.addini("config_dir", "specify directory for storing and retrieving the " "Astropy configuration during tests (default is " "to use a temporary directory created by the test " "runner); be aware that using an Astropy config " "file other than the default can cause some tests " "to fail unexpectedly", default=None) parser.addini("cache_dir", "specify directory for storing and retrieving the " "Astropy cache during tests (default is " "to use a temporary directory created by the test " "runner)", default=None) parser.addini("open_files_ignore", "when used with the --open-files option, allows " "specifying names of files that may be ignored when " "left open between tests--files in this list are matched " "may be specified by their base name (ignoring their full " "path) or by absolute path", type="args", default=()) parser.addoption('--repeat', action='store', help='Number of times to repeat each test') def pytest_generate_tests(metafunc): # If the repeat option is set, we add a fixture for the repeat count and # parametrize the tests over the repeats. Solution adapted from: # http://stackoverflow.com/q/21764473/180783 if metafunc.config.option.repeat is not None: count = int(metafunc.config.option.repeat) metafunc.fixturenames.append('tmp_ct') metafunc.parametrize('tmp_ct', range(count)) # We monkey-patch in our replacement doctest OutputChecker. Not # great, but there isn't really an API to replace the checker when # using doctest.testfile, unfortunately. doctest.OutputChecker = AstropyOutputChecker REMOTE_DATA = doctest.register_optionflag('REMOTE_DATA') def pytest_configure(config): treat_deprecations_as_exceptions() config.getini('markers').append( 'remote_data: Run tests that require data from remote servers') # Monkeypatch to deny access to remote resources unless explicitly told # otherwise if not config.getoption('remote_data'): turn_off_internet(verbose=config.option.verbose) doctest_plugin = config.pluginmanager.getplugin('doctest') if (doctest_plugin is None or config.option.doctestmodules or not (config.getini('doctest_plus') or config.option.doctest_plus)): return # These are the default doctest options we use for everything. # There shouldn't be any need to manually put them in doctests # themselves. opts = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE | FIX) class DocTestModulePlus(doctest_plugin.DoctestModule): # pytest 2.4.0 defines "collect". Prior to that, it defined # "runtest". The "collect" approach is better, because we can # skip modules altogether that have no doctests. However, we # need to continue to override "runtest" so that the built-in # behavior (which doesn't do whitespace normalization or # handling __doctest_skip__) doesn't happen. def collect(self): if self.fspath.basename == "conftest.py": module = self.config._conftest.importconftest(self.fspath) else: try: module = self.fspath.pyimport() # Just ignore searching modules that can't be imported when # collecting doctests except ImportError: raise StopIteration # uses internal doctest module parsing mechanism finder = DocTestFinderPlus() runner = doctest.DebugRunner(verbose=False, optionflags=opts) for test in finder.find(module): if test.examples: # skip empty doctests if not config.getvalue("remote_data"): for example in test.examples: if example.options.get(REMOTE_DATA): example.options[doctest.SKIP] = True yield doctest_plugin.DoctestItem( test.name, self, runner, test) # This is for py.test prior to 2.4.0 def runtest(self): return class DocTestTextfilePlus(doctest_plugin.DoctestTextfile): def runtest(self): # satisfy `FixtureRequest` constructor... self.funcargs = {} self._fixtureinfo = doctest_plugin.FuncFixtureInfo((), [], {}) fixture_request = doctest_plugin.FixtureRequest(self) failed, tot = doctest.testfile( str(self.fspath), module_relative=False, optionflags=opts, parser=DocTestParserPlus(), extraglobs=dict(getfixture=fixture_request.getfuncargvalue), raise_on_error=True, verbose=False, encoding='utf-8') class DocTestParserPlus(doctest.DocTestParser): """ An extension to the builtin DocTestParser that handles the special directives for skipping tests. The directives are: - ``.. doctest-skip::``: Skip the next doctest chunk. - ``.. doctest-requires:: module1, module2``: Skip the next doctest chunk if the given modules/packages are not installed. - ``.. doctest-skip-all``: Skip all subsequent doctests. """ def parse(self, s, name=None): result = doctest.DocTestParser.parse(self, s, name=name) # result is a sequence of alternating text chunks and # doctest.Example objects. We need to look in the text # chunks for the special directives that help us determine # whether the following examples should be skipped. required = [] skip_next = False skip_all = False for entry in result: if isinstance(entry, six.string_types) and entry: required = [] skip_next = False lines = entry.strip().splitlines() if '.. doctest-skip-all' in (x.strip() for x in lines): skip_all = True continue if not len(lines): continue last_line = lines[-1] match = re.match( r'\.\.\s+doctest-skip\s*::(\s+.*)?', last_line) if match: marker = match.group(1) if (marker is None or (marker.strip() == 'win32' and sys.platform == 'win32')): skip_next = True continue match = re.match( r'\.\.\s+doctest-requires\s*::\s+(.*)', last_line) if match: required = re.split(r'\s*,?\s*', match.group(1)) elif isinstance(entry, doctest.Example): if (skip_all or skip_next or not DocTestFinderPlus.check_required_modules(required)): entry.options[doctest.SKIP] = True if (not config.getvalue('remote_data') and entry.options.get(REMOTE_DATA)): entry.options[doctest.SKIP] = True return result config.pluginmanager.register( DoctestPlus(DocTestModulePlus, DocTestTextfilePlus, config.getini('doctest_rst') or config.option.doctest_rst), 'doctestplus') # Remove the doctest_plugin, or we'll end up testing the .rst # files twice. config.pluginmanager.unregister(doctest_plugin) class DoctestPlus(object): def __init__(self, doctest_module_item_cls, doctest_textfile_item_cls, run_rst_doctests): """ doctest_module_item_cls should be a class inheriting `pytest.doctest.DoctestItem` and `pytest.File`. This class handles running of a single doctest found in a Python module. This is passed in as an argument because the actual class to be used may not be available at import time, depending on whether or not the doctest plugin for py.test is available. """ self._doctest_module_item_cls = doctest_module_item_cls self._doctest_textfile_item_cls = doctest_textfile_item_cls self._run_rst_doctests = run_rst_doctests # Directories to ignore when adding doctests self._ignore_paths = [] if run_rst_doctests and six.PY3: self._run_rst_doctests = False def pytest_ignore_collect(self, path, config): """Skip paths that match any of the doctest_norecursedirs patterns.""" for pattern in config.getini("doctest_norecursedirs"): if path.check(fnmatch=pattern): # Apparently pytest_ignore_collect causes files not to be # collected by any test runner; for DoctestPlus we only want to # avoid creating doctest nodes for them self._ignore_paths.append(path) break return False def pytest_collect_file(self, path, parent): """Implements an enhanced version of the doctest module from py.test (specifically, as enabled by the --doctest-modules option) which supports skipping all doctests in a specific docstring by way of a special ``__doctest_skip__`` module-level variable. It can also skip tests that have special requirements by way of ``__doctest_requires__``. ``__doctest_skip__`` should be a list of functions, classes, or class methods whose docstrings should be ignored when collecting doctests. This also supports wildcard patterns. For example, to run doctests in a class's docstring, but skip all doctests in its modules use, at the module level:: __doctest_skip__ = ['ClassName.*'] You may also use the string ``'.'`` in ``__doctest_skip__`` to refer to the module itself, in case its module-level docstring contains doctests. ``__doctest_requires__`` should be a dictionary mapping wildcard patterns (in the same format as ``__doctest_skip__``) to a list of one or more modules that should be *importable* in order for the tests to run. For example, if some tests require the scipy module to work they will be skipped unless ``import scipy`` is possible. It is also possible to use a tuple of wildcard patterns as a key in this dict:: __doctest_requires__ = {('func1', 'func2'): ['scipy']} """ for ignore_path in self._ignore_paths: if ignore_path.common(path) == ignore_path: return None if path.ext == '.py': if path.basename == 'conf.py': return None # Don't override the built-in doctest plugin return self._doctest_module_item_cls(path, parent) elif self._run_rst_doctests and path.ext == '.rst': # Ignore generated .rst files parts = bytes(path).split(os.path.sep) if (path.basename.startswith(b'_') or any(x.startswith(b'_') for x in parts) or any(x == b'api' for x in parts)): return None # TODO: Get better names on these items when they are # displayed in py.test output return self._doctest_textfile_item_cls(path, parent) class DocTestFinderPlus(doctest.DocTestFinder): """Extension to the default `doctest.DoctestFinder` that supports ``__doctest_skip__`` magic. See `pytest_collect_file` for more details. """ # Caches the results of import attempts _import_cache = {} @classmethod def check_required_modules(cls, mods): for mod in mods: if mod in cls._import_cache: if not cls._import_cache[mod]: return False try: imp.find_module(mod) except ImportError: cls._import_cache[mod] = False return False else: cls._import_cache[mod] = True return True def find(self, obj, name=None, module=None, globs=None, extraglobs=None): tests = doctest.DocTestFinder.find(self, obj, name, module, globs, extraglobs) if (hasattr(obj, '__doctest_skip__') or hasattr(obj, '__doctest_requires__')): if name is None and hasattr(obj, '__name__'): name = obj.__name__ else: raise ValueError("DocTestFinder.find: name must be given " "when obj.__name__ doesn't exist: %r" % (type(obj),)) def test_filter(test): for pat in getattr(obj, '__doctest_skip__', []): if pat == '*': return False elif pat == '.' and test.name == name: return False elif fnmatch.fnmatch(test.name, '.'.join((name, pat))): return False reqs = getattr(obj, '__doctest_requires__', {}) for pats, mods in list(six.iteritems(reqs)): if not isinstance(pats, tuple): pats = (pats,) for pat in pats: if not fnmatch.fnmatch(test.name, '.'.join((name, pat))): continue if not self.check_required_modules(mods): return False return True tests = list(filter(test_filter, tests)) return tests # Open file detection. # # This works by calling out to psutil to get the list of open files # held by the process both before and after the test. If something is # still open after the test that wasn't open before the test, an # AssertionError is raised. # # This is not thread-safe. We're not currently running our tests # multi-threaded, but that is worth noting. def _get_open_file_list(): import psutil files = [] p = psutil.Process() if importlib_machinery is not None: suffixes = tuple(importlib_machinery.all_suffixes()) else: suffixes = tuple(info[0] for info in imp.get_suffixes()) files = [x.path for x in p.open_files() if not x.path.endswith(suffixes)] return set(files) def pytest_runtest_setup(item): config_dir = item.config.getini('config_dir') cache_dir = item.config.getini('cache_dir') # Command-line options can override, however config_dir = item.config.getoption('config_dir') or config_dir cache_dir = item.config.getoption('cache_dir') or cache_dir # We can't really use context managers directly in py.test (although # py.test 2.7 adds the capability), so this may look a bit hacky if config_dir: item.set_temp_config = set_temp_config(config_dir) item.set_temp_config.__enter__() if cache_dir: item.set_temp_cache = set_temp_cache(cache_dir) item.set_temp_cache.__enter__() # Store a list of the currently opened files so we can compare # against them when the test is done. if item.config.getvalue('open_files'): item.open_files = _get_open_file_list() if ('remote_data' in item.keywords and not item.config.getvalue("remote_data")): pytest.skip("need --remote-data option to run") def pytest_runtest_teardown(item, nextitem): if hasattr(item, 'set_temp_cache'): item.set_temp_cache.__exit__() if hasattr(item, 'set_temp_config'): item.set_temp_config.__exit__() # a "skipped" test will not have been called with # pytest_runtest_setup, so therefore won't have an # "open_files" member if (not item.config.getvalue('open_files') or not hasattr(item, 'open_files')): return start_open_files = item.open_files del item.open_files open_files = _get_open_file_list() # This works in tandem with the test_open_file_detection test to # ensure that it creates one extra open file. if item.name == 'test_open_file_detection': assert len(start_open_files) + 1 == len(open_files) return not_closed = set() open_files_ignore = item.config.getini('open_files_ignore') for filename in open_files: ignore = False for ignored in open_files_ignore: if not os.path.isabs(ignored): if os.path.basename(filename) == ignored: ignore = True break else: if filename == ignored: ignore = True break if ignore: continue if filename not in start_open_files: not_closed.add(filename) if len(not_closed): msg = ['File(s) not closed:'] for name in not_closed: msg.append(' {0}'.format(name)) raise AssertionError('\n'.join(msg)) PYTEST_HEADER_MODULES = OrderedDict([('Numpy', 'numpy'), ('Scipy', 'scipy'), ('Matplotlib', 'matplotlib'), ('h5py', 'h5py'), ('Pandas', 'pandas')]) # This always returns with Astropy's version from .. import __version__ TESTED_VERSIONS = OrderedDict([('Astropy', __version__)]) def pytest_report_header(config): stdoutencoding = getattr(sys.stdout, 'encoding') or 'ascii' if six.PY2: args = [x.decode('utf-8') for x in config.args] elif six.PY3: args = config.args # TESTED_VERSIONS can contain the affiliated package version, too if len(TESTED_VERSIONS) > 1: for pkg, version in TESTED_VERSIONS.items(): if pkg != 'Astropy': s = "\nRunning tests with {0} version {1}.\n".format( pkg, version) else: s = "\nRunning tests with Astropy version {0}.\n".format( TESTED_VERSIONS['Astropy']) # Per https://github.com/astropy/astropy/pull/4204, strip the rootdir from # each directory argument if hasattr(config, 'rootdir'): rootdir = str(config.rootdir) if not rootdir.endswith(os.sep): rootdir += os.sep dirs = [arg[len(rootdir):] if arg.startswith(rootdir) else arg for arg in args] else: dirs = args s += "Running tests in {0}.\n\n".format(" ".join(dirs)) s += "Date: {0}\n\n".format(datetime.datetime.now().isoformat()[:19]) from platform import platform plat = platform() if isinstance(plat, bytes): plat = plat.decode(stdoutencoding, 'replace') s += "Platform: {0}\n\n".format(plat) s += "Executable: {0}\n\n".format(sys.executable) s += "Full Python Version: \n{0}\n\n".format(sys.version) s += "encodings: sys: {0}, locale: {1}, filesystem: {2}".format( sys.getdefaultencoding(), locale.getpreferredencoding(), sys.getfilesystemencoding()) if sys.version_info < (3, 3, 0): s += ", unicode bits: {0}".format( int(math.log(sys.maxunicode, 2))) s += '\n' s += "byteorder: {0}\n".format(sys.byteorder) s += "float info: dig: {0.dig}, mant_dig: {0.dig}\n\n".format( sys.float_info) for module_display, module_name in six.iteritems(PYTEST_HEADER_MODULES): try: with ignore_warnings(DeprecationWarning): module = resolve_name(module_name) except ImportError: s += "{0}: not available\n".format(module_display) else: try: version = module.__version__ except AttributeError: version = 'unknown (no __version__ attribute)' s += "{0}: {1}\n".format(module_display, version) special_opts = ["remote_data", "pep8"] opts = [] for op in special_opts: if getattr(config.option, op, None): opts.append(op) if opts: s += "Using Astropy options: {0}.\n".format(" ".join(opts)) if six.PY3 and (config.getini('doctest_rst') or config.option.doctest_rst): s += "Running doctests in .rst files is not supported on Python 3.x\n" if not six.PY3: s = s.encode(stdoutencoding, 'replace') return s def pytest_pycollect_makemodule(path, parent): # This is where we set up testing both with and without # from __future__ import unicode_literals # On Python 3, just do the regular thing that py.test does if six.PY3: return pytest.Module(path, parent) elif six.PY2: return Pair(path, parent) class Pair(pytest.File): """ This class treats a given test .py file as a pair of .py files where one has __future__ unicode_literals and the other does not. """ def collect(self): # First, just do the regular import of the module to make # sure it's sane and valid. This block is copied directly # from py.test try: mod = self.fspath.pyimport(ensuresyspath=True) except SyntaxError: import py excinfo = py.code.ExceptionInfo() raise self.CollectError(excinfo.getrepr(style="short")) except self.fspath.ImportMismatchError: e = sys.exc_info()[1] raise self.CollectError( "import file mismatch:\n" "imported module %r has this __file__ attribute:\n" " %s\n" "which is not the same as the test file we want to collect:\n" " %s\n" "HINT: remove __pycache__ / .pyc files and/or use a " "unique basename for your test file modules" % e.args ) # Now get the file's content. with io.open(six.text_type(self.fspath), 'rb') as fd: content = fd.read() # If the file contains the special marker, only test it both ways. if b'TEST_UNICODE_LITERALS' in content: # Return the file in both unicode_literal-enabled and disabled forms return [ UnicodeLiteralsModule(mod.__name__, content, self.fspath, self), NoUnicodeLiteralsModule(mod.__name__, content, self.fspath, self) ] else: return [pytest.Module(self.fspath, self)] _RE_FUTURE_IMPORTS = re.compile(br'from __future__ import ((\(.*?\))|([^\n]+))', flags=re.DOTALL) class ModifiedModule(pytest.Module): def __init__(self, mod_name, content, path, parent): self.mod_name = mod_name self.content = content super(ModifiedModule, self).__init__(path, parent) def _importtestmodule(self): # We have to remove the __future__ statements *before* parsing # with compile, otherwise the flags are ignored. content = re.sub(_RE_FUTURE_IMPORTS, b'\n', self.content) new_mod = types.ModuleType(self.mod_name) new_mod.__file__ = six.text_type(self.fspath) if hasattr(self, '_transform_ast'): # ast.parse doesn't let us hand-select the __future__ # statements, but built-in compile, with the PyCF_ONLY_AST # flag does. tree = compile( content, six.text_type(self.fspath), 'exec', self.flags | ast.PyCF_ONLY_AST, True) tree = self._transform_ast(tree) # Now that we've transformed the tree, recompile it code = compile( tree, six.text_type(self.fspath), 'exec') else: # If we don't need to transform the AST, we can skip # parsing/compiling in two steps code = compile( content, six.text_type(self.fspath), 'exec', self.flags, True) pwd = os.getcwd() try: os.chdir(os.path.dirname(six.text_type(self.fspath))) six.exec_(code, new_mod.__dict__) finally: os.chdir(pwd) self.config.pluginmanager.consider_module(new_mod) return new_mod class UnicodeLiteralsModule(ModifiedModule): flags = ( __future__.absolute_import.compiler_flag | __future__.division.compiler_flag | __future__.print_function.compiler_flag | __future__.unicode_literals.compiler_flag ) class NoUnicodeLiteralsModule(ModifiedModule): flags = ( __future__.absolute_import.compiler_flag | __future__.division.compiler_flag | __future__.print_function.compiler_flag ) def _transform_ast(self, tree): # When unicode_literals is disabled, we still need to convert any # byte string containing non-ascii characters into a Unicode string. # If it doesn't decode as utf-8, we assume it's some other kind # of byte string and just ultimately leave it alone. # Note that once we drop support for Python 3.2, we should be # able to remove this transformation and just put explicit u'' # prefixes in the test source code. class NonAsciiLiteral(ast.NodeTransformer): def visit_Str(self, node): s = node.s if isinstance(s, bytes): try: s.decode('ascii') except UnicodeDecodeError: try: s = s.decode('utf-8') except UnicodeDecodeError: pass else: return ast.copy_location(ast.Str(s=s), node) return node return NonAsciiLiteral().visit(tree) def pytest_unconfigure(): """ Cleanup post-testing """ # restore internet connectivity (only lost if remote_data=False and # turn_off_internet previously called) # this is harmless / does nothing if socket connections were never disabled turn_on_internet() def pytest_terminal_summary(terminalreporter): """Output a warning to IPython users in case any tests failed.""" try: get_ipython() except NameError: return if not terminalreporter.stats.get('failed'): # Only issue the warning when there are actually failures return terminalreporter.ensure_newline() terminalreporter.write_line( 'Some tests are known to fail when run from the IPython prompt; ' 'especially, but not limited to tests involving logging and warning ' 'handling. Unless you are certain as to the cause of the failure, ' 'please check that the failure occurs outside IPython as well. See ' 'http://docs.astropy.org/en/stable/known_issues.html#failing-logging-' 'tests-when-running-the-tests-in-ipython for more information.', yellow=True, bold=True) astropy-1.1.1/astropy/tests/tests/0000755001134200020070000000000012644022135020123 5ustar embrayscience00000000000000astropy-1.1.1/astropy/tests/tests/test_run_tests.py0000644001134200020070000000372212644017723023575 0ustar embrayscience00000000000000# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS from __future__ import (absolute_import, division, print_function, unicode_literals) import doctest from textwrap import dedent # test helper.run_tests function from ... import test as run_tests from ... extern import six from .. import helper from ..helper import pytest # run_tests should raise ValueError when asked to run on a module it can't find def test_module_not_found(): with helper.pytest.raises(ValueError): run_tests('fake.module') # run_tests should raise ValueError when passed an invalid pastebin= option def test_pastebin_keyword(): with helper.pytest.raises(ValueError): run_tests(pastebin='not_an_option') # TODO: Temporarily disabled, as this seems to non-deterministically fail # def test_deprecation_warning(): # with pytest.raises(DeprecationWarning): # warnings.warn('test warning', DeprecationWarning) def test_unicode_literal_conversion(): assert isinstance('Ã¥ngström', six.text_type) def test_doctest_float_replacement(tmpdir): test1 = dedent(""" This will demonstrate a doctest that fails due to a few extra decimal places:: >>> 1.0 / 3.0 0.333333333333333311 """) test2 = dedent(""" This is the same test, but it should pass with use of +FLOAT_CMP:: >>> 1.0 / 3.0 # doctest: +FLOAT_CMP 0.333333333333333311 """) test1_rst = tmpdir.join('test1.rst') test2_rst = tmpdir.join('test2.rst') test1_rst.write(test1) test2_rst.write(test2) with pytest.raises(doctest.DocTestFailure): doctest.testfile(str(test1_rst), module_relative=False, raise_on_error=True, verbose=False, encoding='utf-8') doctest.testfile(str(test2_rst), module_relative=False, raise_on_error=True, verbose=False, encoding='utf-8') astropy-1.1.1/astropy/tests/tests/data/0000755001134200020070000000000012644022135021034 5ustar embrayscience00000000000000astropy-1.1.1/astropy/tests/tests/data/open_file_detection.txt0000644001134200020070000000001112602615521025564 0ustar embrayscience00000000000000CONTENTS astropy-1.1.1/astropy/tests/tests/test_imports.py0000644001134200020070000000425512640262015023236 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from ...extern import six import pkgutil import os import types # Compatibility subpackages that should only be used on Python 2 _py2_packages = set([ 'astropy.extern.configobj_py2', 'astropy.utils.compat._fractions_py2', 'astropy.utils.compat._gzip_py2', 'astropy.utils.compat._odict_py2', 'astropy.utils.compat._subprocess_py2' ]) # Same but for Python 3 _py3_packages = set([ 'astropy.extern.configobj_py3', 'astropy.utils.compat._gzip_py3' ]) def test_imports(): """ This just imports all modules in astropy, making sure they don't have any dependencies that sneak through """ from ...utils import find_current_module pkgornm = find_current_module(1).__name__.split('.')[0] if isinstance(pkgornm, six.string_types): package = pkgutil.get_loader(pkgornm).load_module(pkgornm) elif (isinstance(pkgornm, types.ModuleType) and '__init__' in pkgornm.__file__): package = pkgornm else: msg = 'test_imports is not determining a valid package/package name' raise TypeError(msg) if hasattr(package, '__path__'): pkgpath = package.__path__ elif hasattr(package, '__file__'): pkgpath = os.path.split(package.__file__)[0] else: raise AttributeError('package to generate config items for does not ' 'have __file__ or __path__') if six.PY3: excludes = _py2_packages else: excludes = _py3_packages prefix = package.__name__ + '.' def onerror(name): if not any(name.startswith(excl) for excl in excludes): # A legitimate error occurred in a module that wasn't excluded raise for imper, nm, ispkg in pkgutil.walk_packages(pkgpath, prefix, onerror=onerror): imper.find_module(nm) def test_toplevel_namespace(): import astropy d = dir(astropy) assert 'os' not in d assert 'log' in d assert 'test' in d assert 'sys' not in d astropy-1.1.1/astropy/tests/tests/test_skip_remote_data.py0000644001134200020070000000173212602615521025052 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # this test doesn't actually use any online data, it should just be skipped # by run_tests because it has the remote_data decorator. from __future__ import (absolute_import, division, print_function, unicode_literals) from ..helper import remote_data from ..helper import pytest @remote_data def test_skip_remote_data(pytestconfig): # this test was called from the command line and it should behave as if # astropy.test() has remote_data=True if not hasattr(pytestconfig.option, 'remotedata'): assert True # astropy.test() has remote_data=False but we still got here somehow, # so fail with a helpful message elif not getattr(pytestconfig.option, 'remotedata'): pytest.fail('@remote_data was not skipped with remote_data=False') # astropy.test() has remote_data=True, so pass elif getattr(pytestconfig.option, 'remotedata'): assert True astropy-1.1.1/astropy/tests/tests/test_socketblocker.py0000644001134200020070000000471012640262015024367 0ustar embrayscience00000000000000from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import time from threading import Thread from ..helper import pytest from ..disable_internet import no_internet from astropy.extern.six.moves import BaseHTTPServer, SimpleHTTPServer from astropy.extern.six.moves.urllib.request import urlopen def test_outgoing_fails(): with pytest.raises(IOError): with no_internet(): urlopen('http://www.astropy.org') class StoppableHTTPServer(BaseHTTPServer.HTTPServer,object): def __init__(self, *args): super(StoppableHTTPServer, self).__init__(*args) self.stop = False def handle_request(self): self.stop = True super(StoppableHTTPServer, self).handle_request() def serve_forever(self): """ Serve until stop set, which will happen if any request is handled """ while not self.stop: self.handle_request() @pytest.mark.parametrize(('localhost'), ('localhost', '127.0.0.1')) def test_localconnect_succeeds(localhost): """ Ensure that connections to localhost are allowed, since these are genuinely not remotedata. """ # port "0" means find open port # see http://stackoverflow.com/questions/1365265/on-localhost-how-to-pick-a-free-port-number httpd = StoppableHTTPServer(('localhost', 0), SimpleHTTPServer.SimpleHTTPRequestHandler) port = httpd.socket.getsockname()[1] server = Thread(target=httpd.serve_forever) server.setDaemon(True) server.start() time.sleep(0.1) urlopen('http://{localhost:s}:{port:d}'.format(localhost=localhost,port=port)).close() PY3_4 = sys.version_info[:2] >= (3, 4) # Used for the below test--inline functions aren't pickleable # by multiprocessing? def _square(x): return x ** 2 @pytest.mark.skipif('not PY3_4 or sys.platform == "win32" or sys.platform.startswith("gnu0")') def test_multiprocessing_forkserver(): """ Test that using multiprocessing with forkserver works. Perhaps a simpler more direct test would be to just open some local sockets and pass something through them. Regression test for https://github.com/astropy/astropy/pull/3713 """ import multiprocessing ctx = multiprocessing.get_context('forkserver') pool = ctx.Pool(1) result = pool.map(_square, [1, 2, 3, 4, 5]) pool.close() pool.join() assert result == [1, 4, 9, 16, 25] astropy-1.1.1/astropy/tests/tests/test_quantity_helpers.py0000644001134200020070000000275012640262015025137 0ustar embrayscience00000000000000from ... import units as u from ..helper import assert_quantity_allclose, pytest def test_assert_quantity_allclose(): assert_quantity_allclose([1,2], [1,2]) assert_quantity_allclose([1,2] * u.m, [100,200] * u.cm) assert_quantity_allclose([1,2] * u.m, [101,201] * u.cm, atol=2 * u.cm) with pytest.raises(AssertionError): assert_quantity_allclose([1,2] * u.m, [90,200] * u.cm) with pytest.raises(AssertionError): assert_quantity_allclose([1,2] * u.m, [101,201] * u.cm, atol=0.5 * u.cm) with pytest.raises(u.UnitsError) as exc: assert_quantity_allclose([1,2] * u.m, [100,200]) assert exc.value.args[0] == "Units for 'desired' () and 'actual' (m) are not convertible" with pytest.raises(u.UnitsError) as exc: assert_quantity_allclose([1,2], [100,200] * u.cm) assert exc.value.args[0] == "Units for 'desired' (cm) and 'actual' () are not convertible" with pytest.raises(u.UnitsError) as exc: assert_quantity_allclose([1,2] * u.m, [100,200] * u.cm, atol=0.3) assert exc.value.args[0] == "Units for 'atol' () and 'actual' (m) are not convertible" with pytest.raises(u.UnitsError) as exc: assert_quantity_allclose([1,2], [1, 2], atol=0.3 * u.m) assert exc.value.args[0] == "Units for 'atol' (m) and 'actual' () are not convertible" with pytest.raises(u.UnitsError) as exc: assert_quantity_allclose([1,2], [1, 2], rtol=0.3 * u.m) assert exc.value.args[0] == "`rtol` should be dimensionless" astropy-1.1.1/astropy/tests/tests/__init__.py0000644001134200020070000000015512602615521022236 0ustar embrayscience00000000000000from __future__ import (absolute_import, division, print_function, unicode_literals) astropy-1.1.1/astropy/tests/tests/test_open_file_detection.py0000644001134200020070000000054612602615521025540 0ustar embrayscience00000000000000from __future__ import (absolute_import, division, print_function, unicode_literals) import sys from ...utils.data import get_pkg_data_filename fd = None def test_open_file_detection(): global fd fd = open(get_pkg_data_filename('data/open_file_detection.txt')) def teardown(): if fd is not None: fd.close() astropy-1.1.1/astropy/tests/runner.py0000644001134200020070000002516212644017723020661 0ustar embrayscience00000000000000"""Implements the Astropy TestRunner which is a thin wrapper around py.test.""" from __future__ import (absolute_import, division, print_function, unicode_literals) import multiprocessing import os import shlex import sys import tempfile import warnings from ..config.paths import set_temp_config, set_temp_cache from ..extern import six from ..utils import wraps, find_current_module class TestRunner(object): def __init__(self, base_path): self.base_path = os.path.abspath(base_path) def run_tests(self, package=None, test_path=None, args=None, plugins=None, verbose=False, pastebin=None, remote_data=False, pep8=False, pdb=False, coverage=False, open_files=False, parallel=0, docs_path=None, skip_docs=False, repeat=None): """ Run Astropy tests using py.test. A proper set of arguments is constructed and passed to `pytest.main`. Parameters ---------- package : str, optional The name of a specific package to test, e.g. 'io.fits' or 'utils'. If nothing is specified all default Astropy tests are run. test_path : str, optional Specify location to test by path. May be a single file or directory. Must be specified absolutely or relative to the calling directory. args : str, optional Additional arguments to be passed to `pytest.main` in the `args` keyword argument. plugins : list, optional Plugins to be passed to `pytest.main` in the `plugins` keyword argument. verbose : bool, optional Convenience option to turn on verbose output from py.test. Passing True is the same as specifying `-v` in `args`. pastebin : {'failed','all',None}, optional Convenience option for turning on py.test pastebin output. Set to 'failed' to upload info for failed tests, or 'all' to upload info for all tests. remote_data : bool, optional Controls whether to run tests marked with @remote_data. These tests use online data and are not run by default. Set to True to run these tests. pep8 : bool, optional Turn on PEP8 checking via the pytest-pep8 plugin and disable normal tests. Same as specifying `--pep8 -k pep8` in `args`. pdb : bool, optional Turn on PDB post-mortem analysis for failing tests. Same as specifying `--pdb` in `args`. open_files : bool, optional Fail when any tests leave files open. Off by default, because this adds extra run time to the test suite. Requires the ``psutil`` package. parallel : int, optional When provided, run the tests in parallel on the specified number of CPUs. If parallel is negative, it will use the all the cores on the machine. Requires the `pytest-xdist` plugin. docs_path : str, optional The path to the documentation .rst files. skip_docs : bool, optional When `True`, skips running the doctests in the .rst files. repeat : int, optional If set, specifies how many times each test should be run. This is useful for diagnosing sporadic failures. See Also -------- pytest.main : py.test function wrapped by `run_tests`. """ # Don't import pytest until it's actually needed to run the tests from .helper import pytest if coverage: warnings.warn( "The coverage option is ignored on run_tests, since it " "can not be made to work in that context. Use " "'python setup.py test --coverage' instead.", AstropyWarning) all_args = [] if package is None: package_path = self.base_path else: package_path = os.path.join(self.base_path, package.replace('.', os.path.sep)) if not os.path.isdir(package_path): raise ValueError('Package not found: {0}'.format(package)) if docs_path is not None and not skip_docs: if package is not None: docs_path = os.path.join( docs_path, package.replace('.', os.path.sep)) if not os.path.exists(docs_path): warnings.warn( "Can not test .rst docs, since docs path " "({0}) does not exist.".format(docs_path)) docs_path = None if test_path: base, ext = os.path.splitext(test_path) if ext in ('.rst', ''): if docs_path is None: # This shouldn't happen from "python setup.py test" raise ValueError( "Can not test .rst files without a docs_path " "specified.") abs_docs_path = os.path.abspath(docs_path) abs_test_path = os.path.abspath( os.path.join(abs_docs_path, os.pardir, test_path)) common = os.path.commonprefix((abs_docs_path, abs_test_path)) if os.path.exists(abs_test_path) and common == abs_docs_path: # Since we aren't testing any Python files within # the astropy tree, we need to forcibly load the # astropy py.test plugins, and then turn on the # doctest_rst plugin. all_args.extend(['-p', 'astropy.tests.pytest_plugins', '--doctest-rst']) test_path = abs_test_path if not (os.path.isdir(test_path) or ext in ('.py', '.rst')): raise ValueError("Test path must be a directory or a path to " "a .py or .rst file") all_args.append(test_path) else: all_args.append(package_path) if docs_path is not None and not skip_docs: all_args.extend([docs_path, '--doctest-rst']) # add any additional args entered by the user if args is not None: all_args.extend( shlex.split(args, posix=not sys.platform.startswith('win'))) # add verbosity flag if verbose: all_args.append('-v') # turn on pastebin output if pastebin is not None: if pastebin in ['failed', 'all']: all_args.append('--pastebin={0}'.format(pastebin)) else: raise ValueError("pastebin should be 'failed' or 'all'") # run @remote_data tests if remote_data: all_args.append('--remote-data') if pep8: try: import pytest_pep8 except ImportError: raise ImportError('PEP8 checking requires pytest-pep8 plugin: ' 'http://pypi.python.org/pypi/pytest-pep8') else: all_args.extend(['--pep8', '-k', 'pep8']) # activate post-mortem PDB for failing tests if pdb: all_args.append('--pdb') # check for opened files after each test if open_files: if parallel != 0: raise SystemError( "open file detection may not be used in conjunction with " "parallel testing.") try: import psutil except ImportError: raise SystemError( "open file detection requested, but psutil package " "is not installed.") all_args.append('--open-files') print("Checking for unclosed files") if parallel != 0: try: import xdist except ImportError: raise ImportError( 'Parallel testing requires the pytest-xdist plugin ' 'https://pypi.python.org/pypi/pytest-xdist') try: parallel = int(parallel) except ValueError: raise ValueError( "parallel must be an int, got {0}".format(parallel)) if parallel < 0: parallel = multiprocessing.cpu_count() all_args.extend(['-n', six.text_type(parallel)]) if repeat: all_args.append('--repeat={0}'.format(repeat)) if six.PY2: all_args = [x.encode('utf-8') for x in all_args] # override the config locations to not make a new directory nor use # existing cache or config astropy_config = tempfile.mkdtemp('astropy_config') astropy_cache = tempfile.mkdtemp('astropy_cache') # This prevents cyclical import problems that make it # impossible to test packages that define Table types on their # own. from ..table import Table # Have to use nested with statements for cross-Python support # Note, using these context managers here is superfluous if the # config_dir or cache_dir options to py.test are in use, but it's # also harmless to nest the contexts with set_temp_config(astropy_config, delete=True): with set_temp_cache(astropy_cache, delete=True): return pytest.main(args=all_args, plugins=plugins) @classmethod def make_test_runner_in(cls, path): """ Constructs a `TestRunner` to run in the given path, and returns a ``test()`` function which takes the same arguments as `TestRunner.run_tests`. The returned ``test()`` function will be defined in the module this was called from. This is used to implement the ``astropy.test()`` function (or the equivalent for affiliated packages). """ runner = cls(path) @wraps(runner.run_tests, ('__doc__',), exclude_args=('self',)) def test(*args, **kwargs): return runner.run_tests(*args, **kwargs) module = find_current_module(2) if module is not None: test.__module__ = module.__name__ # A somewhat unusual hack, but delete the attached __wrapped__ # attribute--although this is normally used to tell if the function # was wrapped with wraps, on some version of Python this is also # used to determine the signature to display in help() which is # not useful in this case. We don't really care in this case if the # function was wrapped either if hasattr(test, '__wrapped__'): del test.__wrapped__ return test astropy-1.1.1/astropy/tests/command.py0000644001134200020070000002412112644017723020760 0ustar embrayscience00000000000000""" Implements the wrapper for the Astropy test runner in the form of the ``./setup.py test`` distutils command. """ import os import shutil import subprocess import sys import tempfile from setuptools import Command from ..extern import six def _fix_user_options(options): """ This is for Python 2.x and 3.x compatibility. distutils expects Command options to all be byte strings on Python 2 and Unicode strings on Python 3. """ def to_str_or_none(x): if x is None: return None return str(x) return [tuple(to_str_or_none(x) for x in y) for y in options] class AstropyTest(Command, object): description = 'Run the tests for this package' user_options = [ ('package=', 'P', "The name of a specific package to test, e.g. 'io.fits' or 'utils'. " "If nothing is specified, all default tests are run."), ('test-path=', 't', 'Specify a test location by path. If a relative path to a .py file, ' 'it is relative to the built package, so e.g., a leading "astropy/" ' 'is necessary. If a relative path to a .rst file, it is relative to ' 'the directory *below* the --docs-path directory, so a leading ' '"docs/" is usually necessary. May also be an absolute path.'), ('verbose-results', 'V', 'Turn on verbose output from pytest.'), ('plugins=', 'p', 'Plugins to enable when running pytest.'), ('pastebin=', 'b', "Enable pytest pastebin output. Either 'all' or 'failed'."), ('args=', 'a', 'Additional arguments to be passed to pytest.'), ('remote-data', 'R', 'Run tests that download remote data.'), ('pep8', '8', 'Enable PEP8 checking and disable regular tests. ' 'Requires the pytest-pep8 plugin.'), ('pdb', 'd', 'Start the interactive Python debugger on errors.'), ('coverage', 'c', 'Create a coverage report. Requires the coverage package.'), ('open-files', 'o', 'Fail if any tests leave files open. Requires the ' 'psutil package.'), ('parallel=', 'j', 'Run the tests in parallel on the specified number of ' 'CPUs. If negative, all the cores on the machine will be ' 'used. Requires the pytest-xdist plugin.'), ('docs-path=', None, 'The path to the documentation .rst files. If not provided, and ' 'the current directory contains a directory called "docs", that ' 'will be used.'), ('skip-docs', None, "Don't test the documentation .rst files."), ('repeat=', None, 'How many times to repeat each test (can be used to check for ' 'sporadic failures).'), ('temp-root=', None, 'The root directory in which to create the temporary testing files. ' 'If unspecified the system default is used (e.g. /tmp) as explained ' 'in the documentation for tempfile.mkstemp.') ] user_options = _fix_user_options(user_options) package_name = '' def initialize_options(self): self.package = None self.test_path = None self.verbose_results = False self.plugins = None self.pastebin = None self.args = None self.remote_data = False self.pep8 = False self.pdb = False self.coverage = False self.open_files = False self.parallel = 0 self.docs_path = None self.skip_docs = False self.repeat = None self.temp_root = None def finalize_options(self): # Normally we would validate the options here, but that's handled in # run_tests pass def generate_testing_command(self): """ Build a Python script to run the tests. """ cmd_pre = '' # Commands to run before the test function cmd_post = '' # Commands to run after the test function if self.coverage: pre, post = self._generate_coverage_commands() cmd_pre += pre cmd_post += post if six.PY3: set_flag = "import builtins; builtins._ASTROPY_TEST_ = True" else: set_flag = "import __builtin__; __builtin__._ASTROPY_TEST_ = True" cmd = ('{cmd_pre}{0}; import {1.package_name}, sys; result = (' '{1.package_name}.test(' 'package={1.package!r}, ' 'test_path={1.test_path!r}, ' 'args={1.args!r}, ' 'plugins={1.plugins!r}, ' 'verbose={1.verbose_results!r}, ' 'pastebin={1.pastebin!r}, ' 'remote_data={1.remote_data!r}, ' 'pep8={1.pep8!r}, ' 'pdb={1.pdb!r}, ' 'open_files={1.open_files!r}, ' 'parallel={1.parallel!r}, ' 'docs_path={1.docs_path!r}, ' 'skip_docs={1.skip_docs!r}, ' 'repeat={1.repeat!r})); ' '{cmd_post}' 'sys.exit(result)') return cmd.format(set_flag, self, cmd_pre=cmd_pre, cmd_post=cmd_post) def run(self): """ Run the tests! """ # Ensure there is a doc path if self.docs_path is None: if os.path.exists('docs'): self.docs_path = os.path.abspath('docs') # Build a testing install of the package self._build_temp_install() # Run everything in a try: finally: so that the tmp dir gets deleted. try: # Construct this modules testing command cmd = self.generate_testing_command() # Run the tests in a subprocess--this is necessary since # new extension modules may have appeared, and this is the # easiest way to set up a new environment # On Python 3.x prior to 3.3, the creation of .pyc files # is not atomic. py.test jumps through some hoops to make # this work by parsing import statements and carefully # importing files atomically. However, it can't detect # when __import__ is used, so its carefulness still fails. # The solution here (admittedly a bit of a hack), is to # turn off the generation of .pyc files altogether by # passing the `-B` switch to `python`. This does mean # that each core will have to compile .py file to bytecode # itself, rather than getting lucky and borrowing the work # already done by another core. Compilation is an # insignificant fraction of total testing time, though, so # it's probably not worth worrying about. retcode = subprocess.call([sys.executable, '-B', '-c', cmd], cwd=self.testing_path, close_fds=False) finally: # Remove temporary directory shutil.rmtree(self.tmp_dir) raise SystemExit(retcode) def _build_temp_install(self): """ Build the package and copy the build to a temporary directory for the purposes of testing this avoids creating pyc and __pycache__ directories inside the build directory """ self.reinitialize_command('build', inplace=True) self.run_command('build') build_cmd = self.get_finalized_command('build') new_path = os.path.abspath(build_cmd.build_lib) # On OSX the default path for temp files is under /var, but in most # cases on OSX /var is actually a symlink to /private/var; ensure we # dereference that link, because py.test is very sensitive to relative # paths... tmp_dir = tempfile.mkdtemp(prefix=self.package_name + '-test-', dir=self.temp_root) self.tmp_dir = os.path.realpath(tmp_dir) self.testing_path = os.path.join(self.tmp_dir, os.path.basename(new_path)) shutil.copytree(new_path, self.testing_path) new_docs_path = os.path.join(self.tmp_dir, os.path.basename(self.docs_path)) shutil.copytree(self.docs_path, new_docs_path) self.docs_path = new_docs_path shutil.copy('setup.cfg', self.tmp_dir) def _generate_coverage_commands(self): """ This method creates the post and pre commands if coverage is to be generated """ if self.parallel != 0: raise ValueError( "--coverage can not be used with --parallel") try: import coverage except ImportError: raise ImportError( "--coverage requires that the coverage package is " "installed.") # Don't use get_pkg_data_filename here, because it # requires importing astropy.config and thus screwing # up coverage results for those packages. coveragerc = os.path.join( self.testing_path, self.package_name, 'tests', 'coveragerc') # We create a coveragerc that is specific to the version # of Python we're running, so that we can mark branches # as being specifically for Python 2 or Python 3 with open(coveragerc, 'r') as fd: coveragerc_content = fd.read() if six.PY3: ignore_python_version = '2' else: ignore_python_version = '3' coveragerc_content = coveragerc_content.replace( "{ignore_python_version}", ignore_python_version).replace( "{packagename}", self.package_name) tmp_coveragerc = os.path.join(self.tmp_dir, 'coveragerc') with open(tmp_coveragerc, 'wb') as tmp: tmp.write(coveragerc_content.encode('utf-8')) cmd_pre = ( 'import coverage; ' 'cov = coverage.coverage(data_file="{0}", config_file="{1}"); ' 'cov.start();'.format( os.path.abspath(".coverage"), tmp_coveragerc)) cmd_post = ( 'cov.stop(); ' 'from astropy.tests.helper import _save_coverage; ' '_save_coverage(cov, result, "{0}", "{1}");'.format( os.path.abspath('.'), self.testing_path)) return cmd_pre, cmd_post astropy-1.1.1/astropy/tests/setup_package.py0000644001134200020070000000037112602615521022150 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst def get_package_data(): return { 'astropy.tests': ['coveragerc'], 'astropy.tests.tests': ['data/open_file_detection.txt']} def requires_2to3(): return False astropy-1.1.1/astropy/tests/output_checker.py0000644001134200020070000001440012644020323022353 0ustar embrayscience00000000000000""" Implements a replacement for `doctest.OutputChecker` that handles certain normalizations of Python expression output. See the docstring on `AstropyOutputChecker` for more details. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import doctest import re # Much of this code, particularly the parts of floating point handling, is # borrowed from the SymPy project with permission. See licenses/SYMPY.rst # for the full SymPy license. FIX = doctest.register_optionflag('FIX') FLOAT_CMP = doctest.register_optionflag('FLOAT_CMP') class AstropyOutputChecker(doctest.OutputChecker): """ - Removes u'' prefixes on string literals - Ignores the 'L' suffix on long integers - In Numpy dtype strings, removes the leading pipe, i.e. '|S9' -> 'S9'. Numpy 1.7 no longer includes it in display. - Supports the FLOAT_CMP flag, which parses floating point values out of the output and compares their numerical values rather than their string representation. This naturally supports complex numbers as well (simply by comparing their real and imaginary parts separately). """ _original_output_checker = doctest.OutputChecker _str_literal_re = re.compile( r"(\W|^)[uU]([rR]?[\'\"])", re.UNICODE) _byteorder_re = re.compile( r"([\'\"])[|<>]([biufcSaUV][0-9]+)([\'\"])", re.UNICODE) _fix_32bit_re = re.compile( r"([\'\"])([iu])[48]([\'\"])", re.UNICODE) _long_int_re = re.compile( r"([0-9]+)L", re.UNICODE) def __init__(self): # NOTE OutputChecker is an old-style class with no __init__ method, # so we can't call the base class version of __init__ here exp = r'(?:e[+-]?\d+)' got_floats = r'(\d+\.\d*%s?|\.\d+%s?|\d+%s)' % (exp, exp, exp) # floats in the 'want' string may contain ellipses want_floats = got_floats + r'(\.{3})?' front_sep = r'\s|[+*,(<=-]' back_sep = front_sep + r'|[)>j]' fbeg = r'^%s(?=%s|$)' % (got_floats, back_sep) fmidend = r'(?<=%s)%s(?=%s|$)' % (front_sep, got_floats, back_sep) self.num_got_rgx = re.compile(r'(%s|%s)' %(fbeg, fmidend)) fbeg = r'^%s(?=%s|$)' % (want_floats, back_sep) fmidend = r'(?<=%s)%s(?=%s|$)' % (front_sep, want_floats, back_sep) self.num_want_rgx = re.compile(r'(%s|%s)' %(fbeg, fmidend)) def do_fixes(self, want, got): want = re.sub(self._str_literal_re, r'\1\2', want) want = re.sub(self._byteorder_re, r'\1\2\3', want) want = re.sub(self._fix_32bit_re, r'\1\2\3', want) want = re.sub(self._long_int_re, r'\1', want) got = re.sub(self._str_literal_re, r'\1\2', got) got = re.sub(self._byteorder_re, r'\1\2\3', got) got = re.sub(self._fix_32bit_re, r'\1\2\3', got) got = re.sub(self._long_int_re, r'\1', got) return want, got def normalize_floats(self, want, got, flags): """ Alternative to the built-in check_output that also handles parsing float values and comparing their numeric values rather than their string representations. This requires rewriting enough of the basic check_output that, when FLOAT_CMP is enabled, it totally takes over for check_output. """ # Handle the common case first, for efficiency: # if they're string-identical, always return true. if got == want: return True # TODO parse integers as well ? # Parse floats and compare them. If some of the parsed floats contain # ellipses, skip the comparison. matches = self.num_got_rgx.finditer(got) numbers_got = [match.group(1) for match in matches] # list of strs matches = self.num_want_rgx.finditer(want) numbers_want = [match.group(1) for match in matches] # list of strs if len(numbers_got) != len(numbers_want): return False if len(numbers_got) > 0: nw_ = [] for ng, nw in zip(numbers_got, numbers_want): if '...' in nw: nw_.append(ng) continue else: nw_.append(nw) if abs(float(ng)-float(nw)) > 1e-5: return False got = self.num_got_rgx.sub(r'%s', got) got = got % tuple(nw_) # can be used as a special sequence to signify a # blank line, unless the DONT_ACCEPT_BLANKLINE flag is used. if not (flags & doctest.DONT_ACCEPT_BLANKLINE): # Replace in want with a blank line. want = re.sub('(?m)^%s\s*?$' % re.escape(doctest.BLANKLINE_MARKER), '', want) # If a line in got contains only spaces, then remove the # spaces. got = re.sub('(?m)^\s*?$', '', got) if got == want: return True # This flag causes doctest to ignore any differences in the # contents of whitespace strings. Note that this can be used # in conjunction with the ELLIPSIS flag. if flags & doctest.NORMALIZE_WHITESPACE: got = ' '.join(got.split()) want = ' '.join(want.split()) if got == want: return True # The ELLIPSIS flag says to let the sequence "..." in `want` # match any substring in `got`. if flags & doctest.ELLIPSIS: if doctest._ellipsis_match(want, got): return True # We didn't find any match; return false. return False def check_output(self, want, got, flags): if flags & FIX: want, got = self.do_fixes(want, got) if flags & FLOAT_CMP: return self.normalize_floats(want, got, flags) # Can't use super here because doctest.OutputChecker is not a # new-style class. return self._original_output_checker.check_output( self, want, got, flags) def output_difference(self, want, got, flags): if flags & FIX: want, got = self.do_fixes(want, got) # Can't use super here because doctest.OutputChecker is not a # new-style class. return self._original_output_checker.output_difference( self, want, got, flags) astropy-1.1.1/astropy/tests/test_logger.py0000644001134200020070000003604012640262015021653 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import imp import sys import warnings from .helper import pytest, catch_warnings from .. import log from ..logger import LoggingError, conf from ..utils.exceptions import AstropyWarning, AstropyUserWarning # Save original values of hooks. These are not the system values, but the # already overwritten values since the logger already gets imported before # this file gets executed. _excepthook = sys.__excepthook__ _showwarning = warnings.showwarning try: ip = get_ipython() except NameError: ip = None def setup_function(function): # Reset modules to default imp.reload(warnings) imp.reload(sys) # Reset internal original hooks log._showwarning_orig = None log._excepthook_orig = None # Set up the logger log._set_defaults() # Reset hooks if log.warnings_logging_enabled(): log.disable_warnings_logging() if log.exception_logging_enabled(): log.disable_exception_logging() teardown_module = setup_function def test_warnings_logging_disable_no_enable(): with pytest.raises(LoggingError) as e: log.disable_warnings_logging() assert e.value.args[0] == 'Warnings logging has not been enabled' def test_warnings_logging_enable_twice(): log.enable_warnings_logging() with pytest.raises(LoggingError) as e: log.enable_warnings_logging() assert e.value.args[0] == 'Warnings logging has already been enabled' def test_warnings_logging_overridden(): log.enable_warnings_logging() warnings.showwarning = lambda: None with pytest.raises(LoggingError) as e: log.disable_warnings_logging() assert e.value.args[0] == 'Cannot disable warnings logging: warnings.showwarning was not set by this logger, or has been overridden' def test_warnings_logging(): # Without warnings logging with catch_warnings() as warn_list: with log.log_to_list() as log_list: warnings.warn("This is a warning", AstropyUserWarning) assert len(log_list) == 0 assert len(warn_list) == 1 assert warn_list[0].message.args[0] == "This is a warning" # With warnings logging with catch_warnings() as warn_list: log.enable_warnings_logging() with log.log_to_list() as log_list: warnings.warn("This is a warning", AstropyUserWarning) log.disable_warnings_logging() assert len(log_list) == 1 assert len(warn_list) == 0 assert log_list[0].levelname == 'WARNING' assert log_list[0].message.startswith('This is a warning') assert log_list[0].origin == 'astropy.tests.test_logger' # With warnings logging (differentiate between Astropy and non-Astropy) with catch_warnings() as warn_list: log.enable_warnings_logging() with log.log_to_list() as log_list: warnings.warn("This is a warning", AstropyUserWarning) warnings.warn("This is another warning, not from Astropy") log.disable_warnings_logging() assert len(log_list) == 1 assert len(warn_list) == 1 assert log_list[0].levelname == 'WARNING' assert log_list[0].message.startswith('This is a warning') assert log_list[0].origin == 'astropy.tests.test_logger' assert warn_list[0].message.args[0] == "This is another warning, not from Astropy" # Without warnings logging with catch_warnings() as warn_list: with log.log_to_list() as log_list: warnings.warn("This is a warning", AstropyUserWarning) assert len(log_list) == 0 assert len(warn_list) == 1 assert warn_list[0].message.args[0] == "This is a warning" def test_warnings_logging_with_custom_class(): class CustomAstropyWarningClass(AstropyWarning): pass # With warnings logging with catch_warnings() as warn_list: log.enable_warnings_logging() with log.log_to_list() as log_list: warnings.warn("This is a warning", CustomAstropyWarningClass) log.disable_warnings_logging() assert len(log_list) == 1 assert len(warn_list) == 0 assert log_list[0].levelname == 'WARNING' assert log_list[0].message.startswith('CustomAstropyWarningClass: This is a warning') assert log_list[0].origin == 'astropy.tests.test_logger' def test_warning_logging_with_io_votable_warning(): from ..io.votable.exceptions import W02, vo_warn with catch_warnings() as warn_list: log.enable_warnings_logging() with log.log_to_list() as log_list: vo_warn(W02, ('a', 'b')) log.disable_warnings_logging() assert len(log_list) == 1 assert len(warn_list) == 0 assert log_list[0].levelname == 'WARNING' x = log_list[0].message.startswith(("W02: ?:?:?: W02: a attribute 'b' is " "invalid. Must be a standard XML id")) assert x assert log_list[0].origin == 'astropy.tests.test_logger' def test_import_error_in_warning_logging(): """ Regression test for https://github.com/astropy/astropy/issues/2671 This test actually puts a goofy fake module into ``sys.modules`` to test this problem. """ class FakeModule(object): def __getattr__(self, attr): raise ImportError('_showwarning should ignore any exceptions ' 'here') log.enable_warnings_logging() sys.modules[''] = FakeModule() try: warnings.showwarning(AstropyWarning('Regression test for #2671'), AstropyWarning, '', 1) finally: del sys.modules[''] def test_exception_logging_disable_no_enable(): with pytest.raises(LoggingError) as e: log.disable_exception_logging() assert e.value.args[0] == 'Exception logging has not been enabled' def test_exception_logging_enable_twice(): log.enable_exception_logging() with pytest.raises(LoggingError) as e: log.enable_exception_logging() assert e.value.args[0] == 'Exception logging has already been enabled' # You can't really override the exception handler in IPython this way, so # this test doesn't really make sense in the IPython context. @pytest.mark.skipif(str("ip is not None")) def test_exception_logging_overridden(): log.enable_exception_logging() sys.excepthook = lambda etype, evalue, tb: None with pytest.raises(LoggingError) as e: log.disable_exception_logging() assert e.value.args[0] == 'Cannot disable exception logging: sys.excepthook was not set by this logger, or has been overridden' @pytest.mark.xfail(str("ip is not None")) def test_exception_logging(): # Without exception logging try: with log.log_to_list() as log_list: raise Exception("This is an Exception") except Exception as exc: sys.excepthook(*sys.exc_info()) assert exc.args[0] == "This is an Exception" else: assert False # exception should have been raised assert len(log_list) == 0 # With exception logging try: log.enable_exception_logging() with log.log_to_list() as log_list: raise Exception("This is an Exception") except Exception as exc: sys.excepthook(*sys.exc_info()) assert exc.args[0] == "This is an Exception" else: assert False # exception should have been raised assert len(log_list) == 1 assert log_list[0].levelname == 'ERROR' assert log_list[0].message.startswith('Exception: This is an Exception') assert log_list[0].origin == 'astropy.tests.test_logger' # Without exception logging log.disable_exception_logging() try: with log.log_to_list() as log_list: raise Exception("This is an Exception") except Exception as exc: sys.excepthook(*sys.exc_info()) assert exc.args[0] == "This is an Exception" else: assert False # exception should have been raised assert len(log_list) == 0 @pytest.mark.xfail(str("ip is not None")) def test_exception_logging_origin(): # The point here is to get an exception raised from another location # and make sure the error's origin is reported correctly from ..utils.collections import HomogeneousList l = HomogeneousList(int) try: log.enable_exception_logging() with log.log_to_list() as log_list: l.append('foo') except TypeError as exc: sys.excepthook(*sys.exc_info()) assert exc.args[0].startswith( "homogeneous list must contain only objects of type ") else: assert False assert len(log_list) == 1 assert log_list[0].levelname == 'ERROR' assert log_list[0].message.startswith( "TypeError: homogeneous list must contain only objects of type ") assert log_list[0].origin == 'astropy.utils.collections' @pytest.mark.skipif("sys.version_info[:2] >= (3, 5)", reason="Infinite recursion on Python 3.5") @pytest.mark.xfail(str("ip is not None")) def test_exception_logging_argless_exception(): """ Regression test for a crash that occurred on Python 3 when logging an exception that was instantiated with no arguments (no message, etc.) Regression test for https://github.com/astropy/astropy/pull/4056 """ try: log.enable_exception_logging() with log.log_to_list() as log_list: raise Exception() except Exception as exc: sys.excepthook(*sys.exc_info()) else: assert False # exception should have been raised assert len(log_list) == 1 assert log_list[0].levelname == 'ERROR' assert log_list[0].message == 'Exception [astropy.tests.test_logger]' assert log_list[0].origin == 'astropy.tests.test_logger' @pytest.mark.parametrize(('level'), [None, 'DEBUG', 'INFO', 'WARN', 'ERROR']) def test_log_to_list(level): orig_level = log.level try: if level is not None: log.setLevel(level) with log.log_to_list() as log_list: log.error("Error message") log.warning("Warning message") log.info("Information message") log.debug("Debug message") finally: log.setLevel(orig_level) if level is None: # The log level *should* be set to whatever it was in the config level = conf.log_level # Check list length if level == 'DEBUG': assert len(log_list) == 4 elif level == 'INFO': assert len(log_list) == 3 elif level == 'WARN': assert len(log_list) == 2 elif level == 'ERROR': assert len(log_list) == 1 # Check list content assert log_list[0].levelname == 'ERROR' assert log_list[0].message.startswith('Error message') assert log_list[0].origin == 'astropy.tests.test_logger' if len(log_list) >= 2: assert log_list[1].levelname == 'WARNING' assert log_list[1].message.startswith('Warning message') assert log_list[1].origin == 'astropy.tests.test_logger' if len(log_list) >= 3: assert log_list[2].levelname == 'INFO' assert log_list[2].message.startswith('Information message') assert log_list[2].origin == 'astropy.tests.test_logger' if len(log_list) >= 4: assert log_list[3].levelname == 'DEBUG' assert log_list[3].message.startswith('Debug message') assert log_list[3].origin == 'astropy.tests.test_logger' def test_log_to_list_level(): with log.log_to_list(filter_level='ERROR') as log_list: log.error("Error message") log.warning("Warning message") assert len(log_list) == 1 and log_list[0].levelname == 'ERROR' def test_log_to_list_origin1(): with log.log_to_list(filter_origin='astropy.tests') as log_list: log.error("Error message") log.warning("Warning message") assert len(log_list) == 2 def test_log_to_list_origin2(): with log.log_to_list(filter_origin='astropy.wcs') as log_list: log.error("Error message") log.warning("Warning message") assert len(log_list) == 0 @pytest.mark.parametrize(('level'), [None, 'DEBUG', 'INFO', 'WARN', 'ERROR']) def test_log_to_file(tmpdir, level): local_path = tmpdir.join('test.log') log_file = local_path.open('wb') log_path = str(local_path.realpath()) orig_level = log.level try: if level is not None: log.setLevel(level) with log.log_to_file(log_path): log.error("Error message") log.warning("Warning message") log.info("Information message") log.debug("Debug message") log_file.close() finally: log.setLevel(orig_level) log_file = local_path.open('rb') log_entries = log_file.readlines() log_file.close() if level is None: # The log level *should* be set to whatever it was in the config level = conf.log_level # Check list length if level == 'DEBUG': assert len(log_entries) == 4 elif level == 'INFO': assert len(log_entries) == 3 elif level == 'WARN': assert len(log_entries) == 2 elif level == 'ERROR': assert len(log_entries) == 1 # Check list content assert eval(log_entries[0].strip())[-3:] == ( 'astropy.tests.test_logger', 'ERROR', 'Error message') if len(log_entries) >= 2: assert eval(log_entries[1].strip())[-3:] == ( 'astropy.tests.test_logger', 'WARNING', 'Warning message') if len(log_entries) >= 3: assert eval(log_entries[2].strip())[-3:] == ( 'astropy.tests.test_logger', 'INFO', 'Information message') if len(log_entries) >= 4: assert eval(log_entries[3].strip())[-3:] == ( 'astropy.tests.test_logger', 'DEBUG', 'Debug message') def test_log_to_file_level(tmpdir): local_path = tmpdir.join('test.log') log_file = local_path.open('wb') log_path = str(local_path.realpath()) with log.log_to_file(log_path, filter_level='ERROR'): log.error("Error message") log.warning("Warning message") log_file.close() log_file = local_path.open('rb') log_entries = log_file.readlines() log_file.close() assert len(log_entries) == 1 assert eval(log_entries[0].strip())[-2:] == ( 'ERROR', 'Error message') def test_log_to_file_origin1(tmpdir): local_path = tmpdir.join('test.log') log_file = local_path.open('wb') log_path = str(local_path.realpath()) with log.log_to_file(log_path, filter_origin='astropy.tests'): log.error("Error message") log.warning("Warning message") log_file.close() log_file = local_path.open('rb') log_entries = log_file.readlines() log_file.close() assert len(log_entries) == 2 def test_log_to_file_origin2(tmpdir): local_path = tmpdir.join('test.log') log_file = local_path.open('wb') log_path = str(local_path.realpath()) with log.log_to_file(log_path, filter_origin='astropy.wcs'): log.error("Error message") log.warning("Warning message") log_file.close() log_file = local_path.open('rb') log_entries = log_file.readlines() log_file.close() assert len(log_entries) == 0 astropy-1.1.1/astropy/tests/disable_internet.py0000644001134200020070000001126512640262015022652 0ustar embrayscience00000000000000from __future__ import (absolute_import, division, print_function, unicode_literals) import contextlib import socket from ..extern.six.moves import urllib # save original socket method for restoration # These are global so that re-calling the turn_off_internet function doesn't # overwrite them again socket_original = socket.socket socket_create_connection = socket.create_connection socket_bind = socket.socket.bind socket_connect = socket.socket.connect INTERNET_OFF = False # urllib2 uses a global variable to cache its default "opener" for opening # connections for various protocols; we store it off here so we can restore to # the default after re-enabling internet use _orig_opener = None # ::1 is apparently another valid name for localhost? # it is returned by getaddrinfo when that function is given localhost def check_internet_off(original_function): """ Wraps ``original_function``, which in most cases is assumed to be a `socket.socket` method, to raise an `IOError` for any operations on non-local AF_INET sockets. """ def new_function(*args, **kwargs): if isinstance(args[0], socket.socket): if not args[0].family in (socket.AF_INET, socket.AF_INET6): # Should be fine in all but some very obscure cases # More to the point, we don't want to affect AF_UNIX # sockets. return original_function(*args, **kwargs) host = args[1][0] addr_arg = 1 valid_hosts = ('localhost', '127.0.0.1', '::1') else: # The only other function this is used to wrap currently is # socket.create_connection, which should be passed a 2-tuple, but # we'll check just in case if not (isinstance(args[0], tuple) and len(args[0]) == 2): return original_function(*args, **kwargs) host = args[0][0] addr_arg = 0 valid_hosts = ('localhost', '127.0.0.1') hostname = socket.gethostname() fqdn = socket.getfqdn() if host in (hostname, fqdn): host = 'localhost' new_addr = (host, args[addr_arg][1]) args = args[:addr_arg] + (new_addr,) + args[addr_arg + 1:] if any([h in host for h in valid_hosts]): return original_function(*args, **kwargs) else: raise IOError("An attempt was made to connect to the internet " "by a test that was not marked `remote_data`.") return new_function def turn_off_internet(verbose=False): """ Disable internet access via python by preventing connections from being created using the socket module. Presumably this could be worked around by using some other means of accessing the internet, but all default python modules (urllib, requests, etc.) use socket [citation needed]. """ global INTERNET_OFF global _orig_opener if INTERNET_OFF: return INTERNET_OFF = True __tracebackhide__ = True if verbose: print("Internet access disabled") # Update urllib2 to force it not to use any proxies # Must use {} here (the default of None will kick off an automatic search # for proxies) _orig_opener = urllib.request.build_opener() no_proxy_handler = urllib.request.ProxyHandler({}) opener = urllib.request.build_opener(no_proxy_handler) urllib.request.install_opener(opener) socket.create_connection = check_internet_off(socket_create_connection) socket.socket.bind = check_internet_off(socket_bind) socket.socket.connect = check_internet_off(socket_connect) return socket def turn_on_internet(verbose=False): """ Restore internet access. Not used, but kept in case it is needed. """ global INTERNET_OFF global _orig_opener if not INTERNET_OFF: return INTERNET_OFF = False if verbose: print("Internet access enabled") urllib.request.install_opener(_orig_opener) socket.create_connection = socket_create_connection socket.socket.bind = socket_bind socket.socket.connect = socket_connect return socket @contextlib.contextmanager def no_internet(verbose=False): """Context manager to temporarily disable internet access (if not already disabled). If it was already disabled before entering the context manager (i.e. `turn_off_internet` was called previously) then this is a no-op and leaves internet access disabled until a manual call to `turn_on_internet`. """ already_disabled = INTERNET_OFF turn_off_internet(verbose=verbose) try: yield finally: if not already_disabled: turn_on_internet(verbose=verbose) astropy-1.1.1/astropy/tests/helper.py0000644001134200020070000004407412644017723020632 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module provides the tools used to internally run the astropy test suite from the installed astropy. It makes use of the `pytest` testing framework. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import base64 import errno import functools import os import sys import types import warnings import zlib from ..extern import six from ..extern.six.moves import cPickle as pickle try: # Import pkg_resources to prevent it from issuing warnings upon being # imported from within py.test. See # https://github.com/astropy/astropy/pull/537 for a detailed explanation. import pkg_resources except ImportError: pass from .. import test from ..utils.exceptions import (AstropyWarning, AstropyDeprecationWarning, AstropyPendingDeprecationWarning) # For backward-compatibility with affiliated packages from .runner import TestRunner __all__ = ['raises', 'enable_deprecations_as_exceptions', 'remote_data', 'treat_deprecations_as_exceptions', 'catch_warnings', 'assert_follows_unicode_guidelines', 'quantity_allclose', 'assert_quantity_allclose', 'check_pickling_recovery', 'pickle_protocol', 'generic_recursive_equality_test'] if os.environ.get('ASTROPY_USE_SYSTEM_PYTEST') or '_pytest' in sys.modules: import pytest else: from ..extern import pytest as extern_pytest if six.PY3: exec("def do_exec_def(co, loc): exec(co, loc)\n") extern_pytest.do_exec = do_exec_def unpacked_sources = extern_pytest.sources.encode("ascii") unpacked_sources = pickle.loads( zlib.decompress(base64.decodebytes(unpacked_sources)), encoding='utf-8') elif six.PY2: exec("def do_exec_def(co, loc): exec co in loc\n") extern_pytest.do_exec = do_exec_def unpacked_sources = pickle.loads( zlib.decompress(base64.decodestring(extern_pytest.sources))) importer = extern_pytest.DictImporter(unpacked_sources) sys.meta_path.insert(0, importer) pytest = importer.load_module(str('pytest')) # Monkey-patch py.test to work around issue #811 # https://github.com/astropy/astropy/issues/811 from _pytest.assertion import rewrite as _rewrite _orig_write_pyc = _rewrite._write_pyc def _write_pyc_wrapper(*args): """Wraps the internal _write_pyc method in py.test to recognize PermissionErrors and just stop trying to cache its generated pyc files if it can't write them to the __pycache__ directory. When py.test scans for test modules, it actually rewrites the bytecode of each test module it discovers--this is how it manages to add extra instrumentation to the assert builtin. Normally it caches these rewritten bytecode files--``_write_pyc()`` is just a function that handles writing the rewritten pyc file to the cache. If it returns ``False`` for any reason py.test will stop trying to cache the files altogether. The original function catches some cases, but it has a long-standing bug of not catching permission errors on the ``__pycache__`` directory in Python 3. Hence this patch. """ try: return _orig_write_pyc(*args) except IOError as e: if e.errno == errno.EACCES: return False _rewrite._write_pyc = _write_pyc_wrapper # pytest marker to mark tests which get data from the web remote_data = pytest.mark.remote_data # This is for Python 2.x and 3.x compatibility. distutils expects # options to all be byte strings on Python 2 and Unicode strings on # Python 3. def _fix_user_options(options): def to_str_or_none(x): if x is None: return None return str(x) return [tuple(to_str_or_none(x) for x in y) for y in options] def _save_coverage(cov, result, rootdir, testing_path): """ This method is called after the tests have been run in coverage mode to cleanup and then save the coverage data and report. """ from ..utils.console import color_print if result != 0: return # The coverage report includes the full path to the temporary # directory, so we replace all the paths with the true source # path. This means that the coverage line-by-line report will only # be correct for Python 2 code (since the Python 3 code will be # different in the build directory from the source directory as # long as 2to3 is needed). Therefore we only do this fix for # Python 2.x. if six.PY2: try: # Coverage 4.0: _harvest_data has been renamed to get_data, the # lines dict is private cov.get_data() except AttributeError: # Coverage < 4.0 cov._harvest_data() lines = cov.data.lines else: lines = cov.data._lines for key in lines.keys(): new_path = os.path.relpath( os.path.realpath(key), os.path.realpath(testing_path)) new_path = os.path.abspath( os.path.join(rootdir, new_path)) lines[new_path] = lines.pop(key) color_print('Saving coverage data in .coverage...', 'green') cov.save() color_print('Saving HTML coverage report in htmlcov...', 'green') cov.html_report(directory=os.path.join(rootdir, 'htmlcov')) class raises(object): """ A decorator to mark that a test should raise a given exception. Use as follows:: @raises(ZeroDivisionError) def test_foo(): x = 1/0 This can also be used a context manager, in which case it is just an alias for the ``pytest.raises`` context manager (because the two have the same name this help avoid confusion by being flexible). """ # pep-8 naming exception -- this is a decorator class def __init__(self, exc): self._exc = exc self._ctx = None def __call__(self, func): @functools.wraps(func) def run_raises_test(*args, **kwargs): pytest.raises(self._exc, func, *args, **kwargs) return run_raises_test def __enter__(self): self._ctx = pytest.raises(self._exc) return self._ctx.__enter__() def __exit__(self, *exc_info): return self._ctx.__exit__(*exc_info) _deprecations_as_exceptions = False _include_astropy_deprecations = True def enable_deprecations_as_exceptions(include_astropy_deprecations=True): """ Turn on the feature that turns deprecations into exceptions. """ global _deprecations_as_exceptions _deprecations_as_exceptions = True global _include_astropy_deprecations _include_astropy_deprecations = include_astropy_deprecations def treat_deprecations_as_exceptions(): """ Turn all DeprecationWarnings (which indicate deprecated uses of Python itself or Numpy, but not within Astropy, where we use our own deprecation warning class) into exceptions so that we find out about them early. This completely resets the warning filters and any "already seen" warning state. """ # First, totally reset the warning state for module in list(six.itervalues(sys.modules)): # We don't want to deal with six.MovedModules, only "real" # modules. if (isinstance(module, types.ModuleType) and hasattr(module, '__warningregistry__')): del module.__warningregistry__ if not _deprecations_as_exceptions: return warnings.resetwarnings() # Hide the next couple of DeprecationWarnings warnings.simplefilter('ignore', DeprecationWarning) # Here's the wrinkle: a couple of our third-party dependencies # (py.test and scipy) are still using deprecated features # themselves, and we'd like to ignore those. Fortunately, those # show up only at import time, so if we import those things *now*, # before we turn the warnings into exceptions, we're golden. try: # A deprecated stdlib module used by py.test import compiler except ImportError: pass try: import scipy except ImportError: pass # Now, start over again with the warning filters warnings.resetwarnings() # Now, turn DeprecationWarnings into exceptions warnings.filterwarnings("error", ".*", DeprecationWarning) # Only turn astropy deprecation warnings into exceptions if requested if _include_astropy_deprecations: warnings.filterwarnings("error", ".*", AstropyDeprecationWarning) warnings.filterwarnings("error", ".*", AstropyPendingDeprecationWarning) if sys.version_info[:2] == (2, 6): # py.test's warning.showwarning does not include the line argument # on Python 2.6, so we need to explicitly ignore this warning. warnings.filterwarnings( "ignore", r"functions overriding warnings\.showwarning\(\) must support " r"the 'line' argument", DeprecationWarning) if sys.version_info[:2] >= (3, 4): # py.test reads files with the 'U' flag, which is now # deprecated in Python 3.4. warnings.filterwarnings( "ignore", r"'U' mode is deprecated", DeprecationWarning) # BeautifulSoup4 triggers a DeprecationWarning in stdlib's # html module.x warnings.filterwarnings( "ignore", r"The strict argument and mode are deprecated\.", DeprecationWarning) warnings.filterwarnings( "ignore", r"The value of convert_charrefs will become True in 3\.5\. " r"You are encouraged to set the value explicitly\.", DeprecationWarning) if sys.version_info[:2] >= (3, 5): # py.test raises this warning on Python 3.5. # This can be removed when fixed in py.test. # See https://github.com/pytest-dev/pytest/pull/1009 warnings.filterwarnings( "ignore", r"inspect\.getargspec\(\) is deprecated, use " r"inspect\.signature\(\) instead", DeprecationWarning) class catch_warnings(warnings.catch_warnings): """ A high-powered version of warnings.catch_warnings to use for testing and to make sure that there is no dependence on the order in which the tests are run. This completely blitzes any memory of any warnings that have appeared before so that all warnings will be caught and displayed. ``*args`` is a set of warning classes to collect. If no arguments are provided, all warnings are collected. Use as follows:: with catch_warnings(MyCustomWarning) as w: do.something.bad() assert len(w) > 0 """ def __init__(self, *classes): super(catch_warnings, self).__init__(record=True) self.classes = classes def __enter__(self): warning_list = super(catch_warnings, self).__enter__() treat_deprecations_as_exceptions() if len(self.classes) == 0: warnings.simplefilter('always') else: warnings.simplefilter('ignore') for cls in self.classes: warnings.simplefilter('always', cls) return warning_list def __exit__(self, type, value, traceback): treat_deprecations_as_exceptions() class ignore_warnings(catch_warnings): """ This can be used either as a context manager or function decorator to ignore all warnings that occur within a function or block of code. An optional category option can be supplied to only ignore warnings of a certain category or categories (if a list is provided). """ def __init__(self, category=None): super(ignore_warnings, self).__init__() if isinstance(category, type) and issubclass(category, Warning): self.category = [category] else: self.category = category def __call__(self, func): @functools.wraps(func) def wrapper(*args, **kwargs): # Originally this just reused self, but that doesn't work if the # function is called more than once so we need to make a new # context manager instance for each call with self.__class__(category=self.category): return func(*args, **kwargs) return wrapper def __enter__(self): retval = super(ignore_warnings, self).__enter__() if self.category is not None: for category in self.category: warnings.simplefilter('ignore', category) else: warnings.simplefilter('ignore') return retval def assert_follows_unicode_guidelines( x, roundtrip=None): """ Test that an object follows our Unicode policy. See "Unicode guidelines" in the coding guidelines. Parameters ---------- x : object The instance to test roundtrip : module, optional When provided, this namespace will be used to evaluate ``repr(x)`` and ensure that it roundtrips. It will also ensure that ``__bytes__(x)`` and ``__unicode__(x)`` roundtrip. If not provided, no roundtrip testing will be performed. """ from .. import conf from ..extern import six with conf.set_temp('unicode_output', False): bytes_x = bytes(x) unicode_x = six.text_type(x) repr_x = repr(x) assert isinstance(bytes_x, bytes) bytes_x.decode('ascii') assert isinstance(unicode_x, six.text_type) unicode_x.encode('ascii') assert isinstance(repr_x, six.string_types) if isinstance(repr_x, bytes): repr_x.decode('ascii') else: repr_x.encode('ascii') if roundtrip is not None: assert x.__class__(bytes_x) == x assert x.__class__(unicode_x) == x assert eval(repr_x, roundtrip) == x with conf.set_temp('unicode_output', True): bytes_x = bytes(x) unicode_x = six.text_type(x) repr_x = repr(x) assert isinstance(bytes_x, bytes) bytes_x.decode('ascii') assert isinstance(unicode_x, six.text_type) assert isinstance(repr_x, six.string_types) if isinstance(repr_x, bytes): repr_x.decode('ascii') else: repr_x.encode('ascii') if roundtrip is not None: assert x.__class__(bytes_x) == x assert x.__class__(unicode_x) == x assert eval(repr_x, roundtrip) == x @pytest.fixture(params=[0, 1, -1]) def pickle_protocol(request): """ Fixture to run all the tests for protocols 0 and 1, and -1 (most advanced). (Originally from astropy.table.tests.test_pickle) """ return request.param def generic_recursive_equality_test(a, b, class_history): """ Check if the attributes of a and b are equal. Then, check if the attributes of the attributes are equal. """ dict_a = a.__dict__ dict_b = b.__dict__ for key in dict_a: assert key in dict_b,\ "Did not pickle {0}".format(key) if hasattr(dict_a[key], '__eq__'): eq = (dict_a[key] == dict_b[key]) if '__iter__' in dir(eq): eq = (False not in eq) assert eq, "Value of {0} changed by pickling".format(key) if hasattr(dict_a[key], '__dict__'): if dict_a[key].__class__ in class_history: #attempt to prevent infinite recursion pass else: new_class_history = [dict_a[key].__class__] new_class_history.extend(class_history) generic_recursive_equality_test(dict_a[key], dict_b[key], new_class_history) def check_pickling_recovery(original, protocol): """ Try to pickle an object. If successful, make sure the object's attributes survived pickling and unpickling. """ f = pickle.dumps(original, protocol=protocol) unpickled = pickle.loads(f) class_history = [original.__class__] generic_recursive_equality_test(original, unpickled, class_history) def assert_quantity_allclose(actual, desired, rtol=1.e-7, atol=None, **kwargs): """ Raise an assertion if two objects are not equal up to desired tolerance. This is a :class:`~astropy.units.Quantity`-aware version of :func:`numpy.testing.assert_allclose`. """ import numpy as np np.testing.assert_allclose(*_unquantify_allclose_arguments(actual, desired, rtol, atol), **kwargs) def quantity_allclose(a, b, rtol=1.e-5, atol=None, **kwargs): """ Returns True if two arrays are element-wise equal within a tolerance. This is a :class:`~astropy.units.Quantity`-aware version of :func:`numpy.allclose`. """ import numpy as np return np.allclose(*_unquantify_allclose_arguments(a, b, rtol, atol), **kwargs) def _unquantify_allclose_arguments(actual, desired, rtol, atol): from .. import units as u actual = u.Quantity(actual, subok=True, copy=False) desired = u.Quantity(desired, subok=True, copy=False) try: desired = desired.to(actual.unit) except u.UnitsError: raise u.UnitsError("Units for 'desired' ({0}) and 'actual' ({1}) " "are not convertible" .format(desired.unit, actual.unit)) if atol is None: # by default, we assume an absolute tolerance of 0 atol = u.Quantity(0) else: atol = u.Quantity(atol, subok=True, copy=False) try: atol = atol.to(actual.unit) except u.UnitsError: raise u.UnitsError("Units for 'atol' ({0}) and 'actual' ({1}) " "are not convertible" .format(atol.unit, actual.unit)) rtol = u.Quantity(rtol, subok=True, copy=False) try: rtol = rtol.to(u.dimensionless_unscaled) except: raise u.UnitsError("`rtol` should be dimensionless") return actual.value, desired.value, rtol.value, atol.value astropy-1.1.1/astropy/tests/__init__.py0000644001134200020070000000034512644017723021103 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This package contains utilities to run the astropy test suite, tools for writing tests, and general tests that are not associated with a particular package. """ astropy-1.1.1/astropy/tests/coveragerc0000644001134200020070000000132512640262015021024 0ustar embrayscience00000000000000[run] source = astropy omit = astropy/__init__* astropy/conftest.py astropy/*setup* astropy/*tests/* astropy/extern/* astropy/sphinx/* astropy/utils/compat/* astropy/version* astropy/wcs/docstrings* astropy/_erfa/erfa_generator.py [report] exclude_lines = # Have to re-enable the standard pragma pragma: no cover # Don't complain about packages we have installed except ImportError # Don't complain if tests don't hit assertions raise AssertionError raise NotImplementedError # Don't complain about script hooks def main\(.*\): # Ignore branches that don't pertain to this version of Python pragma: py{ignore_python_version} six.PY{ignore_python_version}astropy-1.1.1/astropy/table/0000755001134200020070000000000012644022135016706 5ustar embrayscience00000000000000astropy-1.1.1/astropy/table/info.py0000644001134200020070000000724512644017723020232 0ustar embrayscience00000000000000""" Table property for providing information about table. """ # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import os import numpy as np from ..extern import six from ..utils.data_info import DataInfo __all__ = ['table_info', 'TableInfo'] def table_info(tbl, option='attributes', out=''): """ Write summary information about column to the ``out`` filehandle. By default this prints to standard output via sys.stdout. The ``option`` argument specifies what type of information to include. This can be a string, a function, or a list of strings or functions. Built-in options are: - ``attributes``: basic column meta data like ``dtype`` or ``format`` - ``stats``: basic statistics: minimum, mean, and maximum If a function is specified then that function will be called with the column as its single argument. The function must return an OrderedDict containing the information attributes. If a list is provided then the information attributes will be appended for each of the options, in order. Examples -------- >>> from astropy.table.table_helpers import simple_table >>> t = simple_table(size=2, kinds='if') >>> t['a'].unit = 'm' >>> t.info() name dtype unit ---- ------- ---- a int64 m b float64 >>> t.info('stats')
name mean std min max ---- ---- --- --- --- a 1.5 0.5 1 2 b 1.5 0.5 1.0 2.0 Parameters ---------- option: str, function, list of (str or function) Info option (default='attributes') out: file-like object, None Output destination (default=sys.stdout). If None then a Table with information attributes is returned Returns ------- info: `~astropy.table.Table` if out==None else None """ from .table import Table if out == '': out = sys.stdout descr_vals = [tbl.__class__.__name__] if tbl.masked: descr_vals.append('masked=True') descr_vals.append('length={0}'.format(len(tbl))) outlines = ['<' + ' '.join(descr_vals) + '>'] cols = tbl.columns.values() if tbl.colnames: infos = [] for col in cols: infos.append(col.info(option, out=None)) info = Table(infos, names=list(infos[0])) else: info = Table() if out is None: return info # Since info is going to a filehandle for viewing then remove uninteresting # columns. for name in info.colnames: if np.all(info[name] == ''): del info[name] if 'class' in info.colnames: # Remove 'class' info column if all table columns are the same class # and they are the default column class for that table. uniq_types = set(type(col) for col in cols) if len(uniq_types) == 1 and isinstance(cols[0], tbl.ColumnClass): del info['class'] if 'n_bad' in info.colnames and np.all(info['n_bad'] == 0): del info['n_bad'] # Standard attributes has 'length' but this is typically redundant if 'length' in info.colnames and np.all(info['length'] == len(tbl)): del info['length'] if tbl.colnames: outlines.extend(info.pformat(max_width=-1, max_lines=-1, show_unit=False)) else: outlines.append('') out.writelines(outline + os.linesep for outline in outlines) class TableInfo(DataInfo): _parent = None def __call__(self, option='attributes', out=''): return table_info(self._parent, option, out) __call__.__doc__ = table_info.__doc__ astropy-1.1.1/astropy/table/pprint.py0000644001134200020070000006150612644017723020613 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six from ..extern.six import text_type from ..extern.six.moves import zip as izip from ..extern.six.moves import xrange import os import sys import re import numpy as np from .. import log # Note, in numpy <= 1.6, some classes do not properly represent themselves. from ..utils.compat import NUMPY_LT_1_6_1 from ..utils.console import Getch, color_print, terminal_size, conf from ..utils.data_info import dtype_info_name if six.PY3: def default_format_func(format_, val): if isinstance(val, bytes): return val.decode('utf-8') else: return str(val) _format_funcs = {None: default_format_func} elif six.PY2: _format_funcs = {None: lambda format_, val: text_type(val)} ### The first three functions are helpers for _auto_format_func def _use_val_tolist(format_func): """Wrap format function to work with values converted to python equivalents. In numpy <= 1.6, classes such as np.float32 do not properly represent themselves as floats, and hence cannot easily be formatted; see https://github.com/astropy/astropy/issues/148#issuecomment-3930809 Hence, we force the value to a python type using tolist() (except for np.ma.masked, since np.ma.masked.tolist() is None). """ return lambda format_, val: format_func(format_, val if val is np.ma.masked else val.tolist()) def _use_str_for_masked_values(format_func): """Wrap format function to trap masked values. String format functions and most user functions will not be able to deal with masked values, so we wrap them to ensure they are passed to str(). """ return lambda format_, val: (str(val) if val is np.ma.masked else format_func(format_, val)) def _possible_string_format_functions(format_): """Iterate through possible string-derived format functions. A string can either be a format specifier for the format built-in, a new-style format string, or an old-style format string. """ yield lambda format_, val: format(val, format_) yield lambda format_, val: format_.format(val) yield lambda format_, val: format_ % val def _auto_format_func(format_, val): """Format ``val`` according to ``format_`` for a plain format specifier, old- or new-style format strings, or using a user supplied function. More importantly, determine and cache (in _format_funcs) a function that will do this subsequently. In this way this complicated logic is only done for the first value. Returns the formatted value. """ if format_ in _format_funcs: return _format_funcs[format_](format_, val) if six.callable(format_): format_func = lambda format_, val: format_(val) if NUMPY_LT_1_6_1: format_func = _use_val_tolist(format_func) try: out = format_func(format_, val) if not isinstance(out, six.string_types): raise ValueError('Format function for value {0} returned {1} ' 'instead of string type' .format(val, type(val))) except Exception as err: # For a masked element, the format function call likely failed # to handle it. Just return the string representation for now, # and retry when a non-masked value comes along. if val is np.ma.masked: return str(val) raise ValueError('Format function for value {0} failed: {1}' .format(val, err)) # If the user-supplied function handles formatting masked elements, use # it directly. Otherwise, wrap it in a function that traps them. try: format_func(format_, np.ma.masked) except: format_func = _use_str_for_masked_values(format_func) else: # For a masked element, we cannot set string-based format functions yet, # as all tests below will fail. Just return the string representation # of masked for now, and retry when a non-masked value comes along. if val is np.ma.masked: return str(val) for format_func in _possible_string_format_functions(format_): if NUMPY_LT_1_6_1: format_func = _use_val_tolist(format_func) try: # Does this string format method work? out = format_func(format_, val) # Require that the format statement actually did something. assert out != format_ except: continue else: break else: # None of the possible string functions passed muster. raise ValueError('Unable to parse format string {0}' .format(format_)) # String-based format functions will fail on masked elements; # wrap them in a function that traps them. format_func = _use_str_for_masked_values(format_func) _format_funcs[format_] = format_func return out class TableFormatter(object): @staticmethod def _get_pprint_size(max_lines=None, max_width=None): """Get the output size (number of lines and character width) for Column and Table pformat/pprint methods. If no value of ``max_lines`` is supplied then the height of the screen terminal is used to set ``max_lines``. If the terminal height cannot be determined then the default will be determined using the ``astropy.table.conf.max_lines`` configuration item. If a negative value of ``max_lines`` is supplied then there is no line limit applied. The same applies for max_width except the configuration item is ``astropy.table.conf.max_width``. Parameters ---------- max_lines : int or None Maximum lines of output (header + data rows) max_width : int or None Maximum width (characters) output Returns ------- max_lines, max_width : int """ if max_lines is None: max_lines = conf.max_lines if max_width is None: max_width = conf.max_width if max_lines is None or max_width is None: lines, width = terminal_size() if max_lines is None: max_lines = lines elif max_lines < 0: max_lines = sys.maxsize if max_lines < 8: max_lines = 8 if max_width is None: max_width = width elif max_width < 0: max_width = sys.maxsize if max_width < 10: max_width = 10 return max_lines, max_width def _pformat_col(self, col, max_lines=None, show_name=True, show_unit=None, show_dtype=False, show_length=None, html=False, align=None): """Return a list of formatted string representation of column values. Parameters ---------- max_lines : int Maximum lines of output (header + data rows) show_name : bool Include column name (default=True) show_unit : bool Include a header row for unit. Default is to show a row for units only if one or more columns has a defined value for the unit. show_dtype : bool Include column dtype (default=False) show_length : bool Include column length at end. Default is to show this only if the column is not shown completely. html : bool Output column as HTML align : str Left/right alignment of columns. Default is '>' (right) for all columns. Other allowed values are '<', '^', and '0=' for left, centered, and 0-padded, respectively. Returns ------- lines : list List of lines with formatted column values outs : dict Dict which is used to pass back additional values defined within the iterator. """ if show_unit is None: show_unit = col.info.unit is not None outs = {} # Some values from _pformat_col_iter iterator that are needed here col_strs_iter = self._pformat_col_iter(col, max_lines, show_name=show_name, show_unit=show_unit, show_dtype=show_dtype, show_length=show_length, outs=outs) col_strs = list(col_strs_iter) if len(col_strs) > 0: col_width = max(len(x) for x in col_strs) if html: from ..utils.xml.writer import xml_escape n_header = outs['n_header'] for i, col_str in enumerate(col_strs): # _pformat_col output has a header line '----' which is not needed here if i == n_header - 1: continue td = 'th' if i < n_header else 'td' val = '<{0}>{1}'.format(td, xml_escape(col_str.strip()), td) row = ('' + val + '') if i < n_header: row = ('' + row + '') col_strs[i] = row if n_header > 0: # Get rid of '---' header line col_strs.pop(n_header - 1) col_strs.insert(0, '
') col_strs.append('
') # Now bring all the column string values to the same fixed width else: col_width = max(len(x) for x in col_strs) if col_strs else 1 # Center line header content and generate dashed headerline for i in outs['i_centers']: col_strs[i] = col_strs[i].center(col_width) if outs['i_dashes'] is not None: col_strs[outs['i_dashes']] = '-' * col_width # Format columns according to alignment. `align` arg has precedent, otherwise # use `col.format` if it starts as a legal alignment string. If neither applies # then right justify. re_fill_align = re.compile(r'(?P.?)(?P[<^>=])') match = None if align: # If there is an align specified then it must match match = re_fill_align.match(align) if not match: raise ValueError("column align must be one of '<', '^', '>', or '='") elif isinstance(col.info.format, six.string_types): # col.info.format need not match, in which case rjust gets used match = re_fill_align.match(col.info.format) if match: fill_char = match.group('fill') align_char = match.group('align') if align_char == '=': if fill_char != '0': raise ValueError("fill character must be '0' for '=' align") fill_char = '' # str.zfill gets used which does not take fill char arg else: fill_char = '' align_char = '>' justify_methods = {'<': 'ljust', '^': 'center', '>': 'rjust', '=': 'zfill'} justify_method = justify_methods[align_char] justify_args = (col_width, fill_char) if fill_char else (col_width,) for i, col_str in enumerate(col_strs): col_strs[i] = getattr(col_str, justify_method)(*justify_args) if outs['show_length']: col_strs.append('Length = {0} rows'.format(len(col))) return col_strs, outs def _pformat_col_iter(self, col, max_lines, show_name, show_unit, outs, show_dtype=False, show_length=None): """Iterator which yields formatted string representation of column values. Parameters ---------- max_lines : int Maximum lines of output (header + data rows) show_name : bool Include column name (default=True) show_unit : bool Include a header row for unit. Default is to show a row for units only if one or more columns has a defined value for the unit. outs : dict Must be a dict which is used to pass back additional values defined within the iterator. show_dtype : bool Include column dtype (default=False) show_length : bool Include column length at end. Default is to show this only if the column is not shown completely. """ max_lines, _ = self._get_pprint_size(max_lines, -1) multidims = getattr(col, 'shape', [0])[1:] if multidims: multidim0 = tuple(0 for n in multidims) multidim1 = tuple(n - 1 for n in multidims) trivial_multidims = np.prod(multidims) == 1 i_dashes = None i_centers = [] # Line indexes where content should be centered n_header = 0 if show_name: i_centers.append(n_header) # Get column name (or 'None' if not set) col_name = six.text_type(col.info.name) if multidims: col_name += ' [{0}]'.format( ','.join(six.text_type(n) for n in multidims)) n_header += 1 yield col_name if show_unit: i_centers.append(n_header) n_header += 1 yield six.text_type(col.info.unit or '') if show_dtype: i_centers.append(n_header) n_header += 1 try: dtype = dtype_info_name(col.dtype) except AttributeError: dtype = 'object' yield six.text_type(dtype) if show_unit or show_name or show_dtype: i_dashes = n_header n_header += 1 yield '---' max_lines -= n_header n_print2 = max_lines // 2 n_rows = len(col) col_format = col.info.format or getattr(col.info, 'default_format', None) format_func = _format_funcs.get(col_format, _auto_format_func) if len(col) > max_lines: if show_length is None: show_length = True i0 = n_print2 - (1 if show_length else 0) i1 = n_rows - n_print2 - max_lines % 2 ii = np.concatenate([np.arange(0, i0 + 1), np.arange(i1 + 1, len(col))]) else: i0 = -1 ii = np.arange(len(col)) # Add formatted values if within bounds allowed by max_lines for i in ii: if i == i0: yield '...' else: if multidims: # Prevents columns like Column(data=[[(1,)],[(2,)]], name='a') # with shape (n,1,...,1) from being printed as if there was # more than one element in a row if trivial_multidims: col_str = format_func(col_format, col[(i,) + multidim0]) else: col_str = (format_func(col_format, col[(i,) + multidim0]) + ' .. ' + format_func(col_format, col[(i,) + multidim1])) else: col_str = format_func(col_format, col[i]) yield col_str outs['show_length'] = show_length outs['n_header'] = n_header outs['i_centers'] = i_centers outs['i_dashes'] = i_dashes def _pformat_table(self, table, max_lines=None, max_width=None, show_name=True, show_unit=None, show_dtype=False, html=False, tableid=None, tableclass=None, align=None): """Return a list of lines for the formatted string representation of the table. Parameters ---------- max_lines : int or None Maximum number of rows to output max_width : int or None Maximum character width of output show_name : bool Include a header row for column names (default=True) show_unit : bool Include a header row for unit. Default is to show a row for units only if one or more columns has a defined value for the unit. show_dtype : bool Include a header row for column dtypes (default=False) html : bool Format the output as an HTML table (default=False) tableid : str or None An ID tag for the table; only used if html is set. Default is "table{id}", where id is the unique integer id of the table object, id(table) tableclass : str or list of str or `None` CSS classes for the table; only used if html is set. Default is none align : str or list or tuple Left/right alignment of columns. Default is '>' (right) for all columns. Other allowed values are '<', '^', and '0=' for left, centered, and 0-padded, respectively. A list of strings can be provided for alignment of tables with multiple columns. Returns ------- rows : list Formatted table as a list of strings outs : dict Dict which is used to pass back additional values defined within the iterator. """ # "Print" all the values into temporary lists by column for subsequent # use and to determine the width max_lines, max_width = self._get_pprint_size(max_lines, max_width) cols = [] if show_unit is None: show_unit = any([col.info.unit for col in six.itervalues(table.columns)]) # Coerce align into a correctly-sized list of alignments (if possible) n_cols = len(table.columns) if align is None or isinstance(align, six.string_types): align = [align] * n_cols elif isinstance(align, (list, tuple)): if len(align) != n_cols: raise ValueError('got {0} alignment values instead of ' 'the number of columns ({1})' .format(len(align), n_cols)) else: raise TypeError('align keyword must be str or list or tuple (got {0})' .format(type(align))) for align_, col in izip(align, table.columns.values()): lines, outs = self._pformat_col(col, max_lines, show_name=show_name, show_unit=show_unit, show_dtype=show_dtype, align=align_) if outs['show_length']: lines = lines[:-1] cols.append(lines) if not cols: return [''], {'show_length': False} # Use the values for the last column since they are all the same n_header = outs['n_header'] n_rows = len(cols[0]) outwidth = lambda cols: sum(len(c[0]) for c in cols) + len(cols) - 1 dots_col = ['...'] * n_rows middle = len(cols) // 2 while outwidth(cols) > max_width: if len(cols) == 1: break if len(cols) == 2: cols[1] = dots_col break if cols[middle] is dots_col: cols.pop(middle) middle = len(cols) // 2 cols[middle] = dots_col # Now "print" the (already-stringified) column values into a # row-oriented list. rows = [] if html: from ..utils.xml.writer import xml_escape if tableid is None: tableid = 'table{id}'.format(id=id(table)) if tableclass is not None: if isinstance(tableclass, list): tableclass = ' '.join(tableclass) rows.append(''.format( tid=tableid, tcls=tableclass)) else: rows.append('
'.format(tid=tableid)) for i in range(n_rows): # _pformat_col output has a header line '----' which is not needed here if i == n_header - 1: continue td = 'th' if i < n_header else 'td' vals = ('<{0}>{1}'.format(td, xml_escape(col[i].strip()), td) for col in cols) row = ('' + ''.join(vals) + '') if i < n_header: row = ('' + row + '') rows.append(row) rows.append('
') else: for i in range(n_rows): row = ' '.join(col[i] for col in cols) rows.append(row) return rows, outs def _more_tabcol(self, tabcol, max_lines=None, max_width=None, show_name=True, show_unit=None, show_dtype=False): """Interactive "more" of a table or column. Parameters ---------- max_lines : int or None Maximum number of rows to output max_width : int or None Maximum character width of output show_name : bool Include a header row for column names (default=True) show_unit : bool Include a header row for unit. Default is to show a row for units only if one or more columns has a defined value for the unit. show_dtype : bool Include a header row for column dtypes (default=False) """ allowed_keys = 'f br<>qhpn' # Count the header lines n_header = 0 if show_name: n_header += 1 if show_unit: n_header += 1 if show_dtype: n_header += 1 if show_name or show_unit or show_dtype: n_header += 1 # Set up kwargs for pformat call. Only Table gets max_width. kwargs = dict(max_lines=-1, show_name=show_name, show_unit=show_unit, show_dtype=show_dtype) if hasattr(tabcol, 'columns'): # tabcol is a table kwargs['max_width'] = max_width # If max_lines is None (=> query screen size) then increase by 2. # This is because get_pprint_size leaves 6 extra lines so that in # ipython you normally see the last input line. max_lines1, max_width = self._get_pprint_size(max_lines, max_width) if max_lines is None: max_lines1 += 2 delta_lines = max_lines1 - n_header # Set up a function to get a single character on any platform inkey = Getch() i0 = 0 # First table/column row to show showlines = True while True: i1 = i0 + delta_lines # Last table/col row to show if showlines: # Don't always show the table (e.g. after help) try: os.system('cls' if os.name == 'nt' else 'clear') except: pass # No worries if clear screen call fails lines = tabcol[i0:i1].pformat(**kwargs) colors = ('red' if i < n_header else 'default' for i in xrange(len(lines))) for color, line in izip(colors, lines): color_print(line, color) showlines = True print() print("-- f, , b, r, p, n, <, >, q h (help) --", end=' ') # Get a valid key while True: try: key = inkey().lower() except: print("\n") log.error('Console does not support getting a character' ' as required by more(). Use pprint() instead.') return if key in allowed_keys: break print(key) if key.lower() == 'q': break elif key == ' ' or key == 'f': i0 += delta_lines elif key == 'b': i0 = i0 - delta_lines elif key == 'r': pass elif key == '<': i0 = 0 elif key == '>': i0 = len(tabcol) elif key == 'p': i0 -= 1 elif key == 'n': i0 += 1 elif key == 'h': showlines = False print(""" Browsing keys: f, : forward one page b : back one page r : refresh same page n : next row p : previous row < : go to beginning > : go to end q : quit browsing h : print this help""", end=' ') if i0 < 0: i0 = 0 if i0 >= len(tabcol) - delta_lines: i0 = len(tabcol) - delta_lines print("\n") astropy-1.1.1/astropy/table/_np_utils.c0000644001134200020070000122021212644022121021041 0ustar embrayscience00000000000000/* Generated by Cython 0.23.4 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else #define CYTHON_ABI "0_23_4" #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__astropy__table___np_utils #define __PYX_HAVE_API__astropy__table___np_utils #include "string.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) && defined (_M_X64) #define __Pyx_sst_abs(value) _abs64(value) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #if !defined(CYTHON_CCOMPLEX) #if defined(__cplusplus) #define CYTHON_CCOMPLEX 1 #elif defined(_Complex_I) #define CYTHON_CCOMPLEX 1 #else #define CYTHON_CCOMPLEX 0 #endif #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus #include #else #include #endif #endif #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) #undef _Complex_I #define _Complex_I 1.0fj #endif static const char *__pyx_f[] = { "astropy/table/_np_utils.pyx", "__init__.pxd", "type.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; struct __Pyx_StructField_* fields; size_t size; size_t arraysize[8]; int ndim; char typegroup; char is_unsigned; int flags; } __Pyx_TypeInfo; typedef struct __Pyx_StructField_ { __Pyx_TypeInfo* type; const char* name; size_t offset; } __Pyx_StructField; typedef struct { __Pyx_StructField* field; size_t parent_offset; } __Pyx_BufFmt_StackElem; typedef struct { __Pyx_StructField root; __Pyx_BufFmt_StackElem* head; size_t fmt_offset; size_t new_count, enc_count; size_t struct_alignment; int is_complex; char enc_type; char new_packmode; char enc_packmode; char is_valid_array; } __Pyx_BufFmt_Context; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":725 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t */ typedef npy_int8 __pyx_t_5numpy_int8_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":726 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t */ typedef npy_int16 __pyx_t_5numpy_int16_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":727 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< * ctypedef npy_int64 int64_t * #ctypedef npy_int96 int96_t */ typedef npy_int32 __pyx_t_5numpy_int32_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":728 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< * #ctypedef npy_int96 int96_t * #ctypedef npy_int128 int128_t */ typedef npy_int64 __pyx_t_5numpy_int64_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":732 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":733 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":734 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< * ctypedef npy_uint64 uint64_t * #ctypedef npy_uint96 uint96_t */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":735 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< * #ctypedef npy_uint96 uint96_t * #ctypedef npy_uint128 uint128_t */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":739 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":740 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< * #ctypedef npy_float80 float80_t * #ctypedef npy_float128 float128_t */ typedef npy_float64 __pyx_t_5numpy_float64_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":749 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t */ typedef npy_long __pyx_t_5numpy_int_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":750 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< * ctypedef npy_longlong longlong_t * */ typedef npy_longlong __pyx_t_5numpy_long_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":751 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< * * ctypedef npy_ulong uint_t */ typedef npy_longlong __pyx_t_5numpy_longlong_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":753 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t */ typedef npy_ulong __pyx_t_5numpy_uint_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":754 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":755 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< * * ctypedef npy_intp intp_t */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":757 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":758 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":760 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t */ typedef npy_double __pyx_t_5numpy_float_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":761 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":762 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cfloat cfloat_t */ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; /* "astropy/table/_np_utils.pyx":15 * cimport numpy as np * DTYPE = np.int * ctypedef np.intp_t DTYPE_t # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ typedef __pyx_t_5numpy_intp_t __pyx_t_7astropy_5table_9_np_utils_DTYPE_t; #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< float > __pyx_t_float_complex; #else typedef float _Complex __pyx_t_float_complex; #endif #else typedef struct { float real, imag; } __pyx_t_float_complex; #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< double > __pyx_t_double_complex; #else typedef double _Complex __pyx_t_double_complex; #endif #else typedef struct { double real, imag; } __pyx_t_double_complex; #endif /*--- Type declarations ---*/ /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":764 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":765 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":766 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cdouble complex_t */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":768 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; /* --- Runtime support code (head) --- */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { PyObject* args = PyTuple_Pack(1, key); if (likely(args)) PyErr_SetObject(PyExc_KeyError, args); Py_XDECREF(args); } return NULL; } Py_INCREF(value); return value; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); typedef struct { int code_line; PyCodeObject* code_object; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); typedef struct { Py_ssize_t shape, strides, suboffsets; } __Pyx_Buf_DimInfo; typedef struct { size_t refcount; Py_buffer pybuffer; } __Pyx_Buffer; typedef struct { __Pyx_Buffer *rcbuffer; char *data; __Pyx_Buf_DimInfo diminfo[8]; } __Pyx_LocalBuf_ND; #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); static void __Pyx_ReleaseBuffer(Py_buffer *view); #else #define __Pyx_GetBuffer PyObject_GetBuffer #define __Pyx_ReleaseBuffer PyBuffer_Release #endif static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE Py_intptr_t __Pyx_PyInt_As_Py_intptr_t(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); #if CYTHON_CCOMPLEX #ifdef __cplusplus #define __Pyx_CREAL(z) ((z).real()) #define __Pyx_CIMAG(z) ((z).imag()) #else #define __Pyx_CREAL(z) (__real__(z)) #define __Pyx_CIMAG(z) (__imag__(z)) #endif #else #define __Pyx_CREAL(z) ((z).real) #define __Pyx_CIMAG(z) ((z).imag) #endif #if (defined(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX #define __Pyx_SET_CREAL(z,x) ((z).real(x)) #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) #else #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) #endif static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static int __Pyx_check_binary_version(void); #if !defined(__Pyx_PyIdentifier_FromString) #if PY_MAJOR_VERSION < 3 #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) #else #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) #endif #endif static PyObject *__Pyx_ImportModule(const char *name); static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'cython' */ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.stdlib' */ /* Module declarations from 'numpy' */ /* Module declarations from 'numpy' */ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ /* Module declarations from 'astropy.table._np_utils' */ static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_7astropy_5table_9_np_utils_DTYPE_t = { "DTYPE_t", NULL, sizeof(__pyx_t_7astropy_5table_9_np_utils_DTYPE_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_7astropy_5table_9_np_utils_DTYPE_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_7astropy_5table_9_np_utils_DTYPE_t), 0 }; #define __Pyx_MODULE_NAME "astropy.table._np_utils" int __pyx_module_is_main_astropy__table___np_utils = 0; /* Implementation of 'astropy.table._np_utils' */ static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_RuntimeError; static char __pyx_k_B[] = "B"; static char __pyx_k_H[] = "H"; static char __pyx_k_I[] = "I"; static char __pyx_k_L[] = "L"; static char __pyx_k_O[] = "O"; static char __pyx_k_Q[] = "Q"; static char __pyx_k_b[] = "b"; static char __pyx_k_d[] = "d"; static char __pyx_k_f[] = "f"; static char __pyx_k_g[] = "g"; static char __pyx_k_h[] = "h"; static char __pyx_k_i[] = "i"; static char __pyx_k_l[] = "l"; static char __pyx_k_q[] = "q"; static char __pyx_k_Zd[] = "Zd"; static char __pyx_k_Zf[] = "Zf"; static char __pyx_k_Zg[] = "Zg"; static char __pyx_k__7[] = "*"; static char __pyx_k_ii[] = "ii"; static char __pyx_k_ma[] = "ma"; static char __pyx_k_np[] = "np"; static char __pyx_k_idx[] = "idx"; static char __pyx_k_int[] = "int"; static char __pyx_k_bool[] = "bool"; static char __pyx_k_idx0[] = "idx0"; static char __pyx_k_idx1[] = "idx1"; static char __pyx_k_idxs[] = "idxs"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_DTYPE[] = "DTYPE"; static char __pyx_k_dtype[] = "dtype"; static char __pyx_k_empty[] = "empty"; static char __pyx_k_i_out[] = "i_out"; static char __pyx_k_n_out[] = "n_out"; static char __pyx_k_numpy[] = "numpy"; static char __pyx_k_range[] = "range"; static char __pyx_k_zeros[] = "zeros"; static char __pyx_k_i_left[] = "i_left"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_masked[] = "masked"; static char __pyx_k_n_left[] = "n_left"; static char __pyx_k_i_right[] = "i_right"; static char __pyx_k_n_right[] = "n_right"; static char __pyx_k_idx_sort[] = "idx_sort"; static char __pyx_k_jointype[] = "jointype"; static char __pyx_k_key_idxs[] = "key_idxs"; static char __pyx_k_left_out[] = "left_out"; static char __pyx_k_len_left[] = "len_left"; static char __pyx_k_numpy_ma[] = "numpy.ma"; static char __pyx_k_left_idxs[] = "left_idxs"; static char __pyx_k_left_mask[] = "left_mask"; static char __pyx_k_right_out[] = "right_out"; static char __pyx_k_ValueError[] = "ValueError"; static char __pyx_k_join_inner[] = "join_inner"; static char __pyx_k_right_idxs[] = "right_idxs"; static char __pyx_k_right_mask[] = "right_mask"; static char __pyx_k_drop_fields[] = "drop_fields"; static char __pyx_k_RuntimeError[] = "RuntimeError"; static char __pyx_k_max_key_idxs[] = "max_key_idxs"; static char __pyx_k_numpy_lib_recfunctions[] = "numpy.lib.recfunctions"; static char __pyx_k_astropy_table__np_utils[] = "astropy.table._np_utils"; static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static char __pyx_k_Cython_utilities_for_numpy_stru[] = "\nCython utilities for numpy structured arrays.\n\njoin_inner(): Do the inner-loop cartesian product for np_utils.join() processing.\n (The \"inner\" is about the inner loop, not inner join).\n"; static char __pyx_k_internal_1_root_home_embray_src[] = "/internal/1/root/home/embray/src/astropy/astropy/astropy/table/_np_utils.pyx"; static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; static PyObject *__pyx_n_s_DTYPE; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s__7; static PyObject *__pyx_n_s_astropy_table__np_utils; static PyObject *__pyx_n_s_bool; static PyObject *__pyx_n_s_drop_fields; static PyObject *__pyx_n_s_dtype; static PyObject *__pyx_n_s_empty; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_i_left; static PyObject *__pyx_n_s_i_out; static PyObject *__pyx_n_s_i_right; static PyObject *__pyx_n_s_idx; static PyObject *__pyx_n_s_idx0; static PyObject *__pyx_n_s_idx1; static PyObject *__pyx_n_s_idx_sort; static PyObject *__pyx_n_s_idxs; static PyObject *__pyx_n_s_ii; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_int; static PyObject *__pyx_kp_s_internal_1_root_home_embray_src; static PyObject *__pyx_n_s_join_inner; static PyObject *__pyx_n_s_jointype; static PyObject *__pyx_n_s_key_idxs; static PyObject *__pyx_n_s_left_idxs; static PyObject *__pyx_n_s_left_mask; static PyObject *__pyx_n_s_left_out; static PyObject *__pyx_n_s_len_left; static PyObject *__pyx_n_s_ma; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_masked; static PyObject *__pyx_n_s_max_key_idxs; static PyObject *__pyx_n_s_n_left; static PyObject *__pyx_n_s_n_out; static PyObject *__pyx_n_s_n_right; static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; static PyObject *__pyx_n_s_np; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_numpy_lib_recfunctions; static PyObject *__pyx_n_s_numpy_ma; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_right_idxs; static PyObject *__pyx_n_s_right_mask; static PyObject *__pyx_n_s_right_out; static PyObject *__pyx_n_s_test; static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_zeros; static PyObject *__pyx_pf_7astropy_5table_9_np_utils_join_inner(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_idxs, PyArrayObject *__pyx_v_idx_sort, int __pyx_v_len_left, int __pyx_v_jointype); /* proto */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ static PyObject *__pyx_int_1; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__8; static PyObject *__pyx_codeobj__9; /* "astropy/table/_np_utils.pyx":19 * @cython.wraparound(False) * @cython.boundscheck(False) * def join_inner(np.ndarray[DTYPE_t, ndim=1] idxs, # <<<<<<<<<<<<<< * np.ndarray[DTYPE_t, ndim=1] idx_sort, * int len_left, */ /* Python wrapper */ static PyObject *__pyx_pw_7astropy_5table_9_np_utils_1join_inner(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_7astropy_5table_9_np_utils_join_inner[] = "\n Do the inner-loop cartesian product for np_utils.join() processing.\n (The \"inner\" is about the inner loop, not inner join).\n "; static PyMethodDef __pyx_mdef_7astropy_5table_9_np_utils_1join_inner = {"join_inner", (PyCFunction)__pyx_pw_7astropy_5table_9_np_utils_1join_inner, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7astropy_5table_9_np_utils_join_inner}; static PyObject *__pyx_pw_7astropy_5table_9_np_utils_1join_inner(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_idxs = 0; PyArrayObject *__pyx_v_idx_sort = 0; int __pyx_v_len_left; int __pyx_v_jointype; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("join_inner (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_idxs,&__pyx_n_s_idx_sort,&__pyx_n_s_len_left,&__pyx_n_s_jointype,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idxs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idx_sort)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("join_inner", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_len_left)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("join_inner", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_jointype)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("join_inner", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "join_inner") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_idxs = ((PyArrayObject *)values[0]); __pyx_v_idx_sort = ((PyArrayObject *)values[1]); __pyx_v_len_left = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_len_left == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_jointype = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_jointype == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("join_inner", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("astropy.table._np_utils.join_inner", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idxs), __pyx_ptype_5numpy_ndarray, 1, "idxs", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idx_sort), __pyx_ptype_5numpy_ndarray, 1, "idx_sort", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_7astropy_5table_9_np_utils_join_inner(__pyx_self, __pyx_v_idxs, __pyx_v_idx_sort, __pyx_v_len_left, __pyx_v_jointype); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7astropy_5table_9_np_utils_join_inner(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_idxs, PyArrayObject *__pyx_v_idx_sort, int __pyx_v_len_left, int __pyx_v_jointype) { int __pyx_v_n_out; int __pyx_v_max_key_idxs; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_v_ii; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_v_key_idxs; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_v_n_left; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_v_n_right; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_v_idx0; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_v_idx1; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_v_idx; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_v_i; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_v_i_left; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_v_i_right; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_v_i_out; int __pyx_v_masked; PyArrayObject *__pyx_v_left_out = 0; PyArrayObject *__pyx_v_right_out = 0; PyArrayObject *__pyx_v_left_mask = 0; PyArrayObject *__pyx_v_right_mask = 0; PyArrayObject *__pyx_v_left_idxs = 0; PyArrayObject *__pyx_v_right_idxs = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_idx_sort; __Pyx_Buffer __pyx_pybuffer_idx_sort; __Pyx_LocalBuf_ND __pyx_pybuffernd_idxs; __Pyx_Buffer __pyx_pybuffer_idxs; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations long __pyx_t_1; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_t_6; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_t_17; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_t_18; __pyx_t_7astropy_5table_9_np_utils_DTYPE_t __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("join_inner", 0); __pyx_pybuffer_idxs.pybuffer.buf = NULL; __pyx_pybuffer_idxs.refcount = 0; __pyx_pybuffernd_idxs.data = NULL; __pyx_pybuffernd_idxs.rcbuffer = &__pyx_pybuffer_idxs; __pyx_pybuffer_idx_sort.pybuffer.buf = NULL; __pyx_pybuffer_idx_sort.refcount = 0; __pyx_pybuffernd_idx_sort.data = NULL; __pyx_pybuffernd_idx_sort.rcbuffer = &__pyx_pybuffer_idx_sort; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idxs.rcbuffer->pybuffer, (PyObject*)__pyx_v_idxs, &__Pyx_TypeInfo_nn___pyx_t_7astropy_5table_9_np_utils_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_idxs.diminfo[0].strides = __pyx_pybuffernd_idxs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idxs.diminfo[0].shape = __pyx_pybuffernd_idxs.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx_sort.rcbuffer->pybuffer, (PyObject*)__pyx_v_idx_sort, &__Pyx_TypeInfo_nn___pyx_t_7astropy_5table_9_np_utils_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_idx_sort.diminfo[0].strides = __pyx_pybuffernd_idx_sort.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx_sort.diminfo[0].shape = __pyx_pybuffernd_idx_sort.rcbuffer->pybuffer.shape[0]; /* "astropy/table/_np_utils.pyx":27 * (The "inner" is about the inner loop, not inner join). * """ * cdef int n_out = 0 # <<<<<<<<<<<<<< * cdef int max_key_idxs = 0 * cdef DTYPE_t ii, key_idxs, n_left, n_right, idx0, idx1, idx, i */ __pyx_v_n_out = 0; /* "astropy/table/_np_utils.pyx":28 * """ * cdef int n_out = 0 * cdef int max_key_idxs = 0 # <<<<<<<<<<<<<< * cdef DTYPE_t ii, key_idxs, n_left, n_right, idx0, idx1, idx, i * cdef DTYPE_t i_left, i_right, i_out */ __pyx_v_max_key_idxs = 0; /* "astropy/table/_np_utils.pyx":35 * # First count the final number of rows and max number of indexes * # for a single key * masked = 0 # <<<<<<<<<<<<<< * for ii in range(idxs.shape[0] - 1): * idx0 = idxs[ii] */ __pyx_v_masked = 0; /* "astropy/table/_np_utils.pyx":36 * # for a single key * masked = 0 * for ii in range(idxs.shape[0] - 1): # <<<<<<<<<<<<<< * idx0 = idxs[ii] * idx1 = idxs[ii + 1] */ __pyx_t_1 = ((__pyx_v_idxs->dimensions[0]) - 1); for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_ii = __pyx_t_2; /* "astropy/table/_np_utils.pyx":37 * masked = 0 * for ii in range(idxs.shape[0] - 1): * idx0 = idxs[ii] # <<<<<<<<<<<<<< * idx1 = idxs[ii + 1] * */ __pyx_t_3 = __pyx_v_ii; __pyx_v_idx0 = (*__Pyx_BufPtrStrided1d(__pyx_t_7astropy_5table_9_np_utils_DTYPE_t *, __pyx_pybuffernd_idxs.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_idxs.diminfo[0].strides)); /* "astropy/table/_np_utils.pyx":38 * for ii in range(idxs.shape[0] - 1): * idx0 = idxs[ii] * idx1 = idxs[ii + 1] # <<<<<<<<<<<<<< * * # Number of indexes for this key */ __pyx_t_4 = (__pyx_v_ii + 1); __pyx_v_idx1 = (*__Pyx_BufPtrStrided1d(__pyx_t_7astropy_5table_9_np_utils_DTYPE_t *, __pyx_pybuffernd_idxs.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_idxs.diminfo[0].strides)); /* "astropy/table/_np_utils.pyx":41 * * # Number of indexes for this key * key_idxs = idx1 - idx0 # <<<<<<<<<<<<<< * if key_idxs > max_key_idxs: * max_key_idxs = key_idxs */ __pyx_v_key_idxs = (__pyx_v_idx1 - __pyx_v_idx0); /* "astropy/table/_np_utils.pyx":42 * # Number of indexes for this key * key_idxs = idx1 - idx0 * if key_idxs > max_key_idxs: # <<<<<<<<<<<<<< * max_key_idxs = key_idxs * */ __pyx_t_5 = ((__pyx_v_key_idxs > __pyx_v_max_key_idxs) != 0); if (__pyx_t_5) { /* "astropy/table/_np_utils.pyx":43 * key_idxs = idx1 - idx0 * if key_idxs > max_key_idxs: * max_key_idxs = key_idxs # <<<<<<<<<<<<<< * * # Number of rows for this key */ __pyx_v_max_key_idxs = __pyx_v_key_idxs; /* "astropy/table/_np_utils.pyx":42 * # Number of indexes for this key * key_idxs = idx1 - idx0 * if key_idxs > max_key_idxs: # <<<<<<<<<<<<<< * max_key_idxs = key_idxs * */ } /* "astropy/table/_np_utils.pyx":46 * * # Number of rows for this key * n_left = 0 # <<<<<<<<<<<<<< * n_right = 0 * for idx in range(idx0, idx1): */ __pyx_v_n_left = 0; /* "astropy/table/_np_utils.pyx":47 * # Number of rows for this key * n_left = 0 * n_right = 0 # <<<<<<<<<<<<<< * for idx in range(idx0, idx1): * i = idx_sort[idx] */ __pyx_v_n_right = 0; /* "astropy/table/_np_utils.pyx":48 * n_left = 0 * n_right = 0 * for idx in range(idx0, idx1): # <<<<<<<<<<<<<< * i = idx_sort[idx] * if i < len_left: */ __pyx_t_6 = __pyx_v_idx1; for (__pyx_t_7 = __pyx_v_idx0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_idx = __pyx_t_7; /* "astropy/table/_np_utils.pyx":49 * n_right = 0 * for idx in range(idx0, idx1): * i = idx_sort[idx] # <<<<<<<<<<<<<< * if i < len_left: * n_left += 1 */ __pyx_t_8 = __pyx_v_idx; __pyx_v_i = (*__Pyx_BufPtrStrided1d(__pyx_t_7astropy_5table_9_np_utils_DTYPE_t *, __pyx_pybuffernd_idx_sort.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_idx_sort.diminfo[0].strides)); /* "astropy/table/_np_utils.pyx":50 * for idx in range(idx0, idx1): * i = idx_sort[idx] * if i < len_left: # <<<<<<<<<<<<<< * n_left += 1 * else: */ __pyx_t_5 = ((__pyx_v_i < __pyx_v_len_left) != 0); if (__pyx_t_5) { /* "astropy/table/_np_utils.pyx":51 * i = idx_sort[idx] * if i < len_left: * n_left += 1 # <<<<<<<<<<<<<< * else: * n_right += 1 */ __pyx_v_n_left = (__pyx_v_n_left + 1); /* "astropy/table/_np_utils.pyx":50 * for idx in range(idx0, idx1): * i = idx_sort[idx] * if i < len_left: # <<<<<<<<<<<<<< * n_left += 1 * else: */ goto __pyx_L8; } /* "astropy/table/_np_utils.pyx":53 * n_left += 1 * else: * n_right += 1 # <<<<<<<<<<<<<< * * # Fix n_left and n_right for different join types */ /*else*/ { __pyx_v_n_right = (__pyx_v_n_right + 1); } __pyx_L8:; } /* "astropy/table/_np_utils.pyx":56 * * # Fix n_left and n_right for different join types * if jointype == 0: # <<<<<<<<<<<<<< * pass * elif jointype == 1: */ switch (__pyx_v_jointype) { case 0: break; /* "astropy/table/_np_utils.pyx":58 * if jointype == 0: * pass * elif jointype == 1: # <<<<<<<<<<<<<< * if n_left == 0: * masked = 1 */ case 1: /* "astropy/table/_np_utils.pyx":59 * pass * elif jointype == 1: * if n_left == 0: # <<<<<<<<<<<<<< * masked = 1 * n_left = 1 */ __pyx_t_5 = ((__pyx_v_n_left == 0) != 0); if (__pyx_t_5) { /* "astropy/table/_np_utils.pyx":60 * elif jointype == 1: * if n_left == 0: * masked = 1 # <<<<<<<<<<<<<< * n_left = 1 * if n_right == 0: */ __pyx_v_masked = 1; /* "astropy/table/_np_utils.pyx":61 * if n_left == 0: * masked = 1 * n_left = 1 # <<<<<<<<<<<<<< * if n_right == 0: * masked = 1 */ __pyx_v_n_left = 1; /* "astropy/table/_np_utils.pyx":59 * pass * elif jointype == 1: * if n_left == 0: # <<<<<<<<<<<<<< * masked = 1 * n_left = 1 */ } /* "astropy/table/_np_utils.pyx":62 * masked = 1 * n_left = 1 * if n_right == 0: # <<<<<<<<<<<<<< * masked = 1 * n_right = 1 */ __pyx_t_5 = ((__pyx_v_n_right == 0) != 0); if (__pyx_t_5) { /* "astropy/table/_np_utils.pyx":63 * n_left = 1 * if n_right == 0: * masked = 1 # <<<<<<<<<<<<<< * n_right = 1 * elif jointype == 2: */ __pyx_v_masked = 1; /* "astropy/table/_np_utils.pyx":64 * if n_right == 0: * masked = 1 * n_right = 1 # <<<<<<<<<<<<<< * elif jointype == 2: * if n_right == 0: */ __pyx_v_n_right = 1; /* "astropy/table/_np_utils.pyx":62 * masked = 1 * n_left = 1 * if n_right == 0: # <<<<<<<<<<<<<< * masked = 1 * n_right = 1 */ } /* "astropy/table/_np_utils.pyx":58 * if jointype == 0: * pass * elif jointype == 1: # <<<<<<<<<<<<<< * if n_left == 0: * masked = 1 */ break; /* "astropy/table/_np_utils.pyx":65 * masked = 1 * n_right = 1 * elif jointype == 2: # <<<<<<<<<<<<<< * if n_right == 0: * masked = 1 */ case 2: /* "astropy/table/_np_utils.pyx":66 * n_right = 1 * elif jointype == 2: * if n_right == 0: # <<<<<<<<<<<<<< * masked = 1 * n_right = 1 */ __pyx_t_5 = ((__pyx_v_n_right == 0) != 0); if (__pyx_t_5) { /* "astropy/table/_np_utils.pyx":67 * elif jointype == 2: * if n_right == 0: * masked = 1 # <<<<<<<<<<<<<< * n_right = 1 * elif jointype == 3: */ __pyx_v_masked = 1; /* "astropy/table/_np_utils.pyx":68 * if n_right == 0: * masked = 1 * n_right = 1 # <<<<<<<<<<<<<< * elif jointype == 3: * if n_left == 0: */ __pyx_v_n_right = 1; /* "astropy/table/_np_utils.pyx":66 * n_right = 1 * elif jointype == 2: * if n_right == 0: # <<<<<<<<<<<<<< * masked = 1 * n_right = 1 */ } /* "astropy/table/_np_utils.pyx":65 * masked = 1 * n_right = 1 * elif jointype == 2: # <<<<<<<<<<<<<< * if n_right == 0: * masked = 1 */ break; /* "astropy/table/_np_utils.pyx":69 * masked = 1 * n_right = 1 * elif jointype == 3: # <<<<<<<<<<<<<< * if n_left == 0: * masked = 1 */ case 3: /* "astropy/table/_np_utils.pyx":70 * n_right = 1 * elif jointype == 3: * if n_left == 0: # <<<<<<<<<<<<<< * masked = 1 * n_left = 1 */ __pyx_t_5 = ((__pyx_v_n_left == 0) != 0); if (__pyx_t_5) { /* "astropy/table/_np_utils.pyx":71 * elif jointype == 3: * if n_left == 0: * masked = 1 # <<<<<<<<<<<<<< * n_left = 1 * */ __pyx_v_masked = 1; /* "astropy/table/_np_utils.pyx":72 * if n_left == 0: * masked = 1 * n_left = 1 # <<<<<<<<<<<<<< * * n_out += n_left * n_right */ __pyx_v_n_left = 1; /* "astropy/table/_np_utils.pyx":70 * n_right = 1 * elif jointype == 3: * if n_left == 0: # <<<<<<<<<<<<<< * masked = 1 * n_left = 1 */ } /* "astropy/table/_np_utils.pyx":69 * masked = 1 * n_right = 1 * elif jointype == 3: # <<<<<<<<<<<<<< * if n_left == 0: * masked = 1 */ break; default: break; } /* "astropy/table/_np_utils.pyx":74 * n_left = 1 * * n_out += n_left * n_right # <<<<<<<<<<<<<< * * cdef np.ndarray left_out = np.empty(n_out, dtype=DTYPE) */ __pyx_v_n_out = (__pyx_v_n_out + (__pyx_v_n_left * __pyx_v_n_right)); } /* "astropy/table/_np_utils.pyx":76 * n_out += n_left * n_right * * cdef np.ndarray left_out = np.empty(n_out, dtype=DTYPE) # <<<<<<<<<<<<<< * cdef np.ndarray right_out = np.empty(n_out, dtype=DTYPE) * cdef np.ndarray left_mask = np.zeros(n_out, dtype=np.bool) */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_n_out); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_left_out = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "astropy/table/_np_utils.pyx":77 * * cdef np.ndarray left_out = np.empty(n_out, dtype=DTYPE) * cdef np.ndarray right_out = np.empty(n_out, dtype=DTYPE) # <<<<<<<<<<<<<< * cdef np.ndarray left_mask = np.zeros(n_out, dtype=np.bool) * cdef np.ndarray right_mask = np.zeros(n_out, dtype=np.bool) */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_n_out); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_right_out = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "astropy/table/_np_utils.pyx":78 * cdef np.ndarray left_out = np.empty(n_out, dtype=DTYPE) * cdef np.ndarray right_out = np.empty(n_out, dtype=DTYPE) * cdef np.ndarray left_mask = np.zeros(n_out, dtype=np.bool) # <<<<<<<<<<<<<< * cdef np.ndarray right_mask = np.zeros(n_out, dtype=np.bool) * cdef np.ndarray left_idxs = np.empty(max_key_idxs, dtype=DTYPE) */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_zeros); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_n_out); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_bool); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_left_mask = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "astropy/table/_np_utils.pyx":79 * cdef np.ndarray right_out = np.empty(n_out, dtype=DTYPE) * cdef np.ndarray left_mask = np.zeros(n_out, dtype=np.bool) * cdef np.ndarray right_mask = np.zeros(n_out, dtype=np.bool) # <<<<<<<<<<<<<< * cdef np.ndarray left_idxs = np.empty(max_key_idxs, dtype=DTYPE) * cdef np.ndarray right_idxs = np.empty(max_key_idxs, dtype=DTYPE) */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_zeros); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_n_out); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_bool); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_right_mask = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "astropy/table/_np_utils.pyx":80 * cdef np.ndarray left_mask = np.zeros(n_out, dtype=np.bool) * cdef np.ndarray right_mask = np.zeros(n_out, dtype=np.bool) * cdef np.ndarray left_idxs = np.empty(max_key_idxs, dtype=DTYPE) # <<<<<<<<<<<<<< * cdef np.ndarray right_idxs = np.empty(max_key_idxs, dtype=DTYPE) * */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_max_key_idxs); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_left_idxs = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "astropy/table/_np_utils.pyx":81 * cdef np.ndarray right_mask = np.zeros(n_out, dtype=np.bool) * cdef np.ndarray left_idxs = np.empty(max_key_idxs, dtype=DTYPE) * cdef np.ndarray right_idxs = np.empty(max_key_idxs, dtype=DTYPE) # <<<<<<<<<<<<<< * * i_out = 0 */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_max_key_idxs); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_right_idxs = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "astropy/table/_np_utils.pyx":83 * cdef np.ndarray right_idxs = np.empty(max_key_idxs, dtype=DTYPE) * * i_out = 0 # <<<<<<<<<<<<<< * for ii in range(idxs.shape[0] - 1): * idx0 = idxs[ii] */ __pyx_v_i_out = 0; /* "astropy/table/_np_utils.pyx":84 * * i_out = 0 * for ii in range(idxs.shape[0] - 1): # <<<<<<<<<<<<<< * idx0 = idxs[ii] * idx1 = idxs[ii + 1] */ __pyx_t_1 = ((__pyx_v_idxs->dimensions[0]) - 1); for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_ii = __pyx_t_2; /* "astropy/table/_np_utils.pyx":85 * i_out = 0 * for ii in range(idxs.shape[0] - 1): * idx0 = idxs[ii] # <<<<<<<<<<<<<< * idx1 = idxs[ii + 1] * */ __pyx_t_14 = __pyx_v_ii; __pyx_v_idx0 = (*__Pyx_BufPtrStrided1d(__pyx_t_7astropy_5table_9_np_utils_DTYPE_t *, __pyx_pybuffernd_idxs.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_idxs.diminfo[0].strides)); /* "astropy/table/_np_utils.pyx":86 * for ii in range(idxs.shape[0] - 1): * idx0 = idxs[ii] * idx1 = idxs[ii + 1] # <<<<<<<<<<<<<< * * # Number of rows for this key */ __pyx_t_15 = (__pyx_v_ii + 1); __pyx_v_idx1 = (*__Pyx_BufPtrStrided1d(__pyx_t_7astropy_5table_9_np_utils_DTYPE_t *, __pyx_pybuffernd_idxs.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_idxs.diminfo[0].strides)); /* "astropy/table/_np_utils.pyx":89 * * # Number of rows for this key * n_left = 0 # <<<<<<<<<<<<<< * n_right = 0 * for idx in range(idx0, idx1): */ __pyx_v_n_left = 0; /* "astropy/table/_np_utils.pyx":90 * # Number of rows for this key * n_left = 0 * n_right = 0 # <<<<<<<<<<<<<< * for idx in range(idx0, idx1): * i = idx_sort[idx] */ __pyx_v_n_right = 0; /* "astropy/table/_np_utils.pyx":91 * n_left = 0 * n_right = 0 * for idx in range(idx0, idx1): # <<<<<<<<<<<<<< * i = idx_sort[idx] * if i < len_left: */ __pyx_t_6 = __pyx_v_idx1; for (__pyx_t_7 = __pyx_v_idx0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_idx = __pyx_t_7; /* "astropy/table/_np_utils.pyx":92 * n_right = 0 * for idx in range(idx0, idx1): * i = idx_sort[idx] # <<<<<<<<<<<<<< * if i < len_left: * left_idxs[n_left] = i */ __pyx_t_16 = __pyx_v_idx; __pyx_v_i = (*__Pyx_BufPtrStrided1d(__pyx_t_7astropy_5table_9_np_utils_DTYPE_t *, __pyx_pybuffernd_idx_sort.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_idx_sort.diminfo[0].strides)); /* "astropy/table/_np_utils.pyx":93 * for idx in range(idx0, idx1): * i = idx_sort[idx] * if i < len_left: # <<<<<<<<<<<<<< * left_idxs[n_left] = i * n_left += 1 */ __pyx_t_5 = ((__pyx_v_i < __pyx_v_len_left) != 0); if (__pyx_t_5) { /* "astropy/table/_np_utils.pyx":94 * i = idx_sort[idx] * if i < len_left: * left_idxs[n_left] = i # <<<<<<<<<<<<<< * n_left += 1 * else: */ __pyx_t_13 = __Pyx_PyInt_From_Py_intptr_t(__pyx_v_i); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_left_idxs), __pyx_v_n_left, __pyx_t_13, __pyx_t_7astropy_5table_9_np_utils_DTYPE_t, 1, __Pyx_PyInt_From_Py_intptr_t, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "astropy/table/_np_utils.pyx":95 * if i < len_left: * left_idxs[n_left] = i * n_left += 1 # <<<<<<<<<<<<<< * else: * right_idxs[n_right] = i - len_left */ __pyx_v_n_left = (__pyx_v_n_left + 1); /* "astropy/table/_np_utils.pyx":93 * for idx in range(idx0, idx1): * i = idx_sort[idx] * if i < len_left: # <<<<<<<<<<<<<< * left_idxs[n_left] = i * n_left += 1 */ goto __pyx_L17; } /* "astropy/table/_np_utils.pyx":97 * n_left += 1 * else: * right_idxs[n_right] = i - len_left # <<<<<<<<<<<<<< * n_right += 1 * */ /*else*/ { __pyx_t_13 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_i - __pyx_v_len_left)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_right_idxs), __pyx_v_n_right, __pyx_t_13, __pyx_t_7astropy_5table_9_np_utils_DTYPE_t, 1, __Pyx_PyInt_From_Py_intptr_t, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "astropy/table/_np_utils.pyx":98 * else: * right_idxs[n_right] = i - len_left * n_right += 1 # <<<<<<<<<<<<<< * * if jointype == 0: */ __pyx_v_n_right = (__pyx_v_n_right + 1); } __pyx_L17:; } /* "astropy/table/_np_utils.pyx":100 * n_right += 1 * * if jointype == 0: # <<<<<<<<<<<<<< * pass * elif jointype == 1: */ switch (__pyx_v_jointype) { case 0: break; /* "astropy/table/_np_utils.pyx":102 * if jointype == 0: * pass * elif jointype == 1: # <<<<<<<<<<<<<< * if n_left == 0: * left_idxs[0] = -1 */ case 1: /* "astropy/table/_np_utils.pyx":103 * pass * elif jointype == 1: * if n_left == 0: # <<<<<<<<<<<<<< * left_idxs[0] = -1 * n_left = 1 */ __pyx_t_5 = ((__pyx_v_n_left == 0) != 0); if (__pyx_t_5) { /* "astropy/table/_np_utils.pyx":104 * elif jointype == 1: * if n_left == 0: * left_idxs[0] = -1 # <<<<<<<<<<<<<< * n_left = 1 * if n_right == 0: */ if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_left_idxs), 0, __pyx_int_neg_1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "astropy/table/_np_utils.pyx":105 * if n_left == 0: * left_idxs[0] = -1 * n_left = 1 # <<<<<<<<<<<<<< * if n_right == 0: * right_idxs[0] = -1 */ __pyx_v_n_left = 1; /* "astropy/table/_np_utils.pyx":103 * pass * elif jointype == 1: * if n_left == 0: # <<<<<<<<<<<<<< * left_idxs[0] = -1 * n_left = 1 */ } /* "astropy/table/_np_utils.pyx":106 * left_idxs[0] = -1 * n_left = 1 * if n_right == 0: # <<<<<<<<<<<<<< * right_idxs[0] = -1 * n_right = 1 */ __pyx_t_5 = ((__pyx_v_n_right == 0) != 0); if (__pyx_t_5) { /* "astropy/table/_np_utils.pyx":107 * n_left = 1 * if n_right == 0: * right_idxs[0] = -1 # <<<<<<<<<<<<<< * n_right = 1 * elif jointype == 2: */ if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_right_idxs), 0, __pyx_int_neg_1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "astropy/table/_np_utils.pyx":108 * if n_right == 0: * right_idxs[0] = -1 * n_right = 1 # <<<<<<<<<<<<<< * elif jointype == 2: * if n_right == 0: */ __pyx_v_n_right = 1; /* "astropy/table/_np_utils.pyx":106 * left_idxs[0] = -1 * n_left = 1 * if n_right == 0: # <<<<<<<<<<<<<< * right_idxs[0] = -1 * n_right = 1 */ } /* "astropy/table/_np_utils.pyx":102 * if jointype == 0: * pass * elif jointype == 1: # <<<<<<<<<<<<<< * if n_left == 0: * left_idxs[0] = -1 */ break; /* "astropy/table/_np_utils.pyx":109 * right_idxs[0] = -1 * n_right = 1 * elif jointype == 2: # <<<<<<<<<<<<<< * if n_right == 0: * right_idxs[0] = -1 */ case 2: /* "astropy/table/_np_utils.pyx":110 * n_right = 1 * elif jointype == 2: * if n_right == 0: # <<<<<<<<<<<<<< * right_idxs[0] = -1 * n_right = 1 */ __pyx_t_5 = ((__pyx_v_n_right == 0) != 0); if (__pyx_t_5) { /* "astropy/table/_np_utils.pyx":111 * elif jointype == 2: * if n_right == 0: * right_idxs[0] = -1 # <<<<<<<<<<<<<< * n_right = 1 * elif jointype == 3: */ if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_right_idxs), 0, __pyx_int_neg_1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "astropy/table/_np_utils.pyx":112 * if n_right == 0: * right_idxs[0] = -1 * n_right = 1 # <<<<<<<<<<<<<< * elif jointype == 3: * if n_left == 0: */ __pyx_v_n_right = 1; /* "astropy/table/_np_utils.pyx":110 * n_right = 1 * elif jointype == 2: * if n_right == 0: # <<<<<<<<<<<<<< * right_idxs[0] = -1 * n_right = 1 */ } /* "astropy/table/_np_utils.pyx":109 * right_idxs[0] = -1 * n_right = 1 * elif jointype == 2: # <<<<<<<<<<<<<< * if n_right == 0: * right_idxs[0] = -1 */ break; /* "astropy/table/_np_utils.pyx":113 * right_idxs[0] = -1 * n_right = 1 * elif jointype == 3: # <<<<<<<<<<<<<< * if n_left == 0: * left_idxs[0] = -1 */ case 3: /* "astropy/table/_np_utils.pyx":114 * n_right = 1 * elif jointype == 3: * if n_left == 0: # <<<<<<<<<<<<<< * left_idxs[0] = -1 * n_left = 1 */ __pyx_t_5 = ((__pyx_v_n_left == 0) != 0); if (__pyx_t_5) { /* "astropy/table/_np_utils.pyx":115 * elif jointype == 3: * if n_left == 0: * left_idxs[0] = -1 # <<<<<<<<<<<<<< * n_left = 1 * */ if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_left_idxs), 0, __pyx_int_neg_1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "astropy/table/_np_utils.pyx":116 * if n_left == 0: * left_idxs[0] = -1 * n_left = 1 # <<<<<<<<<<<<<< * * for i_left in range(n_left): */ __pyx_v_n_left = 1; /* "astropy/table/_np_utils.pyx":114 * n_right = 1 * elif jointype == 3: * if n_left == 0: # <<<<<<<<<<<<<< * left_idxs[0] = -1 * n_left = 1 */ } /* "astropy/table/_np_utils.pyx":113 * right_idxs[0] = -1 * n_right = 1 * elif jointype == 3: # <<<<<<<<<<<<<< * if n_left == 0: * left_idxs[0] = -1 */ break; default: break; } /* "astropy/table/_np_utils.pyx":118 * n_left = 1 * * for i_left in range(n_left): # <<<<<<<<<<<<<< * for i_right in range(n_right): * idx = left_idxs[i_left] */ __pyx_t_6 = __pyx_v_n_left; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i_left = __pyx_t_7; /* "astropy/table/_np_utils.pyx":119 * * for i_left in range(n_left): * for i_right in range(n_right): # <<<<<<<<<<<<<< * idx = left_idxs[i_left] * if idx < 0: */ __pyx_t_17 = __pyx_v_n_right; for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { __pyx_v_i_right = __pyx_t_18; /* "astropy/table/_np_utils.pyx":120 * for i_left in range(n_left): * for i_right in range(n_right): * idx = left_idxs[i_left] # <<<<<<<<<<<<<< * if idx < 0: * idx = 0 */ __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_left_idxs), __pyx_v_i_left, __pyx_t_7astropy_5table_9_np_utils_DTYPE_t, 1, __Pyx_PyInt_From_Py_intptr_t, 0, 0, 0); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_19 = __Pyx_PyInt_As_Py_intptr_t(__pyx_t_13); if (unlikely((__pyx_t_19 == (npy_intp)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_idx = __pyx_t_19; /* "astropy/table/_np_utils.pyx":121 * for i_right in range(n_right): * idx = left_idxs[i_left] * if idx < 0: # <<<<<<<<<<<<<< * idx = 0 * left_mask[i_out] = 1 */ __pyx_t_5 = ((__pyx_v_idx < 0) != 0); if (__pyx_t_5) { /* "astropy/table/_np_utils.pyx":122 * idx = left_idxs[i_left] * if idx < 0: * idx = 0 # <<<<<<<<<<<<<< * left_mask[i_out] = 1 * left_out[i_out] = idx */ __pyx_v_idx = 0; /* "astropy/table/_np_utils.pyx":123 * if idx < 0: * idx = 0 * left_mask[i_out] = 1 # <<<<<<<<<<<<<< * left_out[i_out] = idx * */ if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_left_mask), __pyx_v_i_out, __pyx_int_1, __pyx_t_7astropy_5table_9_np_utils_DTYPE_t, 1, __Pyx_PyInt_From_Py_intptr_t, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "astropy/table/_np_utils.pyx":121 * for i_right in range(n_right): * idx = left_idxs[i_left] * if idx < 0: # <<<<<<<<<<<<<< * idx = 0 * left_mask[i_out] = 1 */ } /* "astropy/table/_np_utils.pyx":124 * idx = 0 * left_mask[i_out] = 1 * left_out[i_out] = idx # <<<<<<<<<<<<<< * * idx = right_idxs[i_right] */ __pyx_t_13 = __Pyx_PyInt_From_Py_intptr_t(__pyx_v_idx); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_left_out), __pyx_v_i_out, __pyx_t_13, __pyx_t_7astropy_5table_9_np_utils_DTYPE_t, 1, __Pyx_PyInt_From_Py_intptr_t, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "astropy/table/_np_utils.pyx":126 * left_out[i_out] = idx * * idx = right_idxs[i_right] # <<<<<<<<<<<<<< * if idx < 0: * idx = 0 */ __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_right_idxs), __pyx_v_i_right, __pyx_t_7astropy_5table_9_np_utils_DTYPE_t, 1, __Pyx_PyInt_From_Py_intptr_t, 0, 0, 0); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_19 = __Pyx_PyInt_As_Py_intptr_t(__pyx_t_13); if (unlikely((__pyx_t_19 == (npy_intp)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_idx = __pyx_t_19; /* "astropy/table/_np_utils.pyx":127 * * idx = right_idxs[i_right] * if idx < 0: # <<<<<<<<<<<<<< * idx = 0 * right_mask[i_out] = 1 */ __pyx_t_5 = ((__pyx_v_idx < 0) != 0); if (__pyx_t_5) { /* "astropy/table/_np_utils.pyx":128 * idx = right_idxs[i_right] * if idx < 0: * idx = 0 # <<<<<<<<<<<<<< * right_mask[i_out] = 1 * right_out[i_out] = idx */ __pyx_v_idx = 0; /* "astropy/table/_np_utils.pyx":129 * if idx < 0: * idx = 0 * right_mask[i_out] = 1 # <<<<<<<<<<<<<< * right_out[i_out] = idx * */ if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_right_mask), __pyx_v_i_out, __pyx_int_1, __pyx_t_7astropy_5table_9_np_utils_DTYPE_t, 1, __Pyx_PyInt_From_Py_intptr_t, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "astropy/table/_np_utils.pyx":127 * * idx = right_idxs[i_right] * if idx < 0: # <<<<<<<<<<<<<< * idx = 0 * right_mask[i_out] = 1 */ } /* "astropy/table/_np_utils.pyx":130 * idx = 0 * right_mask[i_out] = 1 * right_out[i_out] = idx # <<<<<<<<<<<<<< * * i_out += 1 */ __pyx_t_13 = __Pyx_PyInt_From_Py_intptr_t(__pyx_v_idx); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_right_out), __pyx_v_i_out, __pyx_t_13, __pyx_t_7astropy_5table_9_np_utils_DTYPE_t, 1, __Pyx_PyInt_From_Py_intptr_t, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "astropy/table/_np_utils.pyx":132 * right_out[i_out] = idx * * i_out += 1 # <<<<<<<<<<<<<< * * return masked, n_out, left_out, left_mask, right_out, right_mask */ __pyx_v_i_out = (__pyx_v_i_out + 1); } } } /* "astropy/table/_np_utils.pyx":134 * i_out += 1 * * return masked, n_out, left_out, left_mask, right_out, right_mask # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_masked); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_n_out); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyTuple_New(6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_left_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_out)); PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_v_left_out)); __Pyx_INCREF(((PyObject *)__pyx_v_left_mask)); __Pyx_GIVEREF(((PyObject *)__pyx_v_left_mask)); PyTuple_SET_ITEM(__pyx_t_11, 3, ((PyObject *)__pyx_v_left_mask)); __Pyx_INCREF(((PyObject *)__pyx_v_right_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_out)); PyTuple_SET_ITEM(__pyx_t_11, 4, ((PyObject *)__pyx_v_right_out)); __Pyx_INCREF(((PyObject *)__pyx_v_right_mask)); __Pyx_GIVEREF(((PyObject *)__pyx_v_right_mask)); PyTuple_SET_ITEM(__pyx_t_11, 5, ((PyObject *)__pyx_v_right_mask)); __pyx_t_13 = 0; __pyx_t_10 = 0; __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; /* "astropy/table/_np_utils.pyx":19 * @cython.wraparound(False) * @cython.boundscheck(False) * def join_inner(np.ndarray[DTYPE_t, ndim=1] idxs, # <<<<<<<<<<<<<< * np.ndarray[DTYPE_t, ndim=1] idx_sort, * int len_left, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_sort.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idxs.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("astropy.table._np_utils.join_inner", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_sort.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idxs.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_left_out); __Pyx_XDECREF((PyObject *)__pyx_v_right_out); __Pyx_XDECREF((PyObject *)__pyx_v_left_mask); __Pyx_XDECREF((PyObject *)__pyx_v_right_mask); __Pyx_XDECREF((PyObject *)__pyx_v_left_idxs); __Pyx_XDECREF((PyObject *)__pyx_v_right_idxs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< * # This implementation of getbuffer is geared towards Cython * # requirements, and does not yet fullfill the PEP. */ /* Python wrapper */ static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_copy_shape; int __pyx_v_i; int __pyx_v_ndim; int __pyx_v_endian_detector; int __pyx_v_little_endian; int __pyx_v_t; char *__pyx_v_f; PyArray_Descr *__pyx_v_descr = 0; int __pyx_v_offset; int __pyx_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; char *__pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":203 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":206 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":207 * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< * * ndim = PyArray_NDIM(self) */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":209 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":212 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ goto __pyx_L4; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":214 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ /*else*/ { __pyx_v_copy_shape = 0; } __pyx_L4:; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L6_bool_binop_done; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":217 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not C contiguous") * */ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L6_bool_binop_done:; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ if (__pyx_t_1) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L9_bool_binop_done; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":221 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not Fortran contiguous") * */ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L9_bool_binop_done:; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ if (__pyx_t_1) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":224 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":225 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_1 = (__pyx_v_copy_shape != 0); if (__pyx_t_1) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":229 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":230 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":231 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] */ __pyx_t_4 = __pyx_v_ndim; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":232 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< * info.shape[i] = PyArray_DIMS(self)[i] * else: */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":233 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< * else: * info.strides = PyArray_STRIDES(self) */ (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ goto __pyx_L11; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":235 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ /*else*/ { __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":236 * else: * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) */ __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); } __pyx_L11:; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":237 * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) */ __pyx_v_info->suboffsets = NULL; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":238 * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< * info.readonly = not PyArray_ISWRITEABLE(self) * */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":239 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< * * cdef int t */ __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":242 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef int offset */ __pyx_v_f = NULL; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":243 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef int offset * */ __pyx_t_3 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_3); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); __pyx_t_3 = 0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L15_bool_binop_done; } __pyx_t_2 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L15_bool_binop_done:; if (__pyx_t_1) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ goto __pyx_L14; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ /*else*/ { __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = ((PyObject *)__pyx_v_self); } __pyx_L14:; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): */ __pyx_t_4 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_4; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); if (!__pyx_t_2) { goto __pyx_L20_next_or; } else { } __pyx_t_2 = (__pyx_v_little_endian != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L19_bool_binop_done; } __pyx_L20_next_or:; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L19_bool_binop_done; } __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L19_bool_binop_done:; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ if (__pyx_t_1) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":260 * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" */ switch (__pyx_v_t) { case NPY_BYTE: __pyx_v_f = __pyx_k_b; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":261 * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" */ case NPY_UBYTE: __pyx_v_f = __pyx_k_B; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":262 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" */ case NPY_SHORT: __pyx_v_f = __pyx_k_h; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":263 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" */ case NPY_USHORT: __pyx_v_f = __pyx_k_H; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":264 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" */ case NPY_INT: __pyx_v_f = __pyx_k_i; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":265 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" */ case NPY_UINT: __pyx_v_f = __pyx_k_I; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":266 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" */ case NPY_LONG: __pyx_v_f = __pyx_k_l; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":267 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" */ case NPY_ULONG: __pyx_v_f = __pyx_k_L; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":268 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" */ case NPY_LONGLONG: __pyx_v_f = __pyx_k_q; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":269 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" */ case NPY_ULONGLONG: __pyx_v_f = __pyx_k_Q; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" */ case NPY_FLOAT: __pyx_v_f = __pyx_k_f; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":271 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" */ case NPY_DOUBLE: __pyx_v_f = __pyx_k_d; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" */ case NPY_LONGDOUBLE: __pyx_v_f = __pyx_k_g; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":273 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" */ case NPY_CFLOAT: __pyx_v_f = __pyx_k_Zf; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" */ case NPY_CDOUBLE: __pyx_v_f = __pyx_k_Zd; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":275 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f = "O" * else: */ case NPY_CLONGDOUBLE: __pyx_v_f = __pyx_k_Zg; break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ case NPY_OBJECT: __pyx_v_f = __pyx_k_O; break; default: /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or */ } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 */ /*else*/ { __pyx_v_info->format = ((char *)malloc(0xFF)); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":285 * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_7; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = '\x00'; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< * # This implementation of getbuffer is geared towards Cython * # requirements, and does not yet fullfill the PEP. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* Python wrapper */ static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__releasebuffer__", 0); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.free(info.strides) * # info.shape was stored after info.strides in the same block */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.free(info.strides) * # info.shape was stored after info.strides in the same block */ } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew2(a, b): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(2, a, b) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew3(a, b, c): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(2, a, b) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(3, a, b, c) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(3, a, b, c) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(4, a, b, c, d) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(4, a, b, c, d) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(5, a, b, c, d, e) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(5, a, b, c, d, e) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { PyArray_Descr *__pyx_v_child = 0; int __pyx_v_endian_detector; int __pyx_v_little_endian; PyObject *__pyx_v_fields = 0; PyObject *__pyx_v_childname = NULL; PyObject *__pyx_v_new_offset = NULL; PyObject *__pyx_v_t = NULL; char *__pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; long __pyx_t_8; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":790 * * cdef dtype child * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":791 * cdef dtype child * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< * cdef tuple fields * */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(__pyx_v_descr->names == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":795 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ if (unlikely(__pyx_v_descr->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":796 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(__pyx_v_fields != Py_None)) { PyObject* sequence = __pyx_v_fields; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); __pyx_t_4 = 0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); if (__pyx_t_6) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); if (!__pyx_t_7) { goto __pyx_L8_next_or; } else { } __pyx_t_7 = (__pyx_v_little_endian != 0); if (!__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L7_bool_binop_done; } __pyx_L8_next_or:; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802 * * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * # One could encode it in the format string and have Cython */ __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L7_bool_binop_done; } __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_6 = __pyx_t_7; __pyx_L7_bool_binop_done:; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ if (__pyx_t_6) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":813 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_6) break; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":814 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 0x78; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":815 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":816 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":818 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_6) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); __pyx_t_4 = 0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_6) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":826 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":827 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":828 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x68; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":829 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x69; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":832 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x6C; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x71; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":835 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x66; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x64; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":838 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x67; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":839 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x66; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":840 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x64; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":841 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x67; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L15; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":844 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ /*else*/ { __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L15:; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":845 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< * else: * # Cython ignores struct boundary information ("T{...}"), */ __pyx_v_f = (__pyx_v_f + 1); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ goto __pyx_L13; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":849 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ /*else*/ { __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; } __pyx_L13:; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":850 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_child); __Pyx_XDECREF(__pyx_v_fields); __Pyx_XDECREF(__pyx_v_childname); __Pyx_XDECREF(__pyx_v_new_offset); __Pyx_XDECREF(__pyx_v_t); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { PyObject *__pyx_v_baseptr; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("set_array_base", 0); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968 * cdef inline void set_array_base(ndarray arr, object base): * cdef PyObject* baseptr * if base is None: # <<<<<<<<<<<<<< * baseptr = NULL * else: */ __pyx_t_1 = (__pyx_v_base == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":969 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968 * cdef inline void set_array_base(ndarray arr, object base): * cdef PyObject* baseptr * if base is None: # <<<<<<<<<<<<<< * baseptr = NULL * else: */ goto __pyx_L3; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":971 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ /*else*/ { Py_INCREF(__pyx_v_base); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":972 * else: * Py_INCREF(base) # important to do this before decref below! * baseptr = base # <<<<<<<<<<<<<< * Py_XDECREF(arr.base) * arr.base = baseptr */ __pyx_v_baseptr = ((PyObject *)__pyx_v_base); } __pyx_L3:; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":973 * Py_INCREF(base) # important to do this before decref below! * baseptr = base * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< * arr.base = baseptr * */ Py_XDECREF(__pyx_v_arr->base); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":974 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 0); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977 * * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: # <<<<<<<<<<<<<< * return None * else: */ __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0); if (__pyx_t_1) { /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":978 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977 * * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: # <<<<<<<<<<<<<< * return None * else: */ } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":980 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif "_np_utils", __pyx_k_Cython_utilities_for_numpy_stru, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_DTYPE, __pyx_k_DTYPE, sizeof(__pyx_k_DTYPE), 0, 0, 1, 1}, {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 1}, {&__pyx_n_s_astropy_table__np_utils, __pyx_k_astropy_table__np_utils, sizeof(__pyx_k_astropy_table__np_utils), 0, 0, 1, 1}, {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1}, {&__pyx_n_s_drop_fields, __pyx_k_drop_fields, sizeof(__pyx_k_drop_fields), 0, 0, 1, 1}, {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_i_left, __pyx_k_i_left, sizeof(__pyx_k_i_left), 0, 0, 1, 1}, {&__pyx_n_s_i_out, __pyx_k_i_out, sizeof(__pyx_k_i_out), 0, 0, 1, 1}, {&__pyx_n_s_i_right, __pyx_k_i_right, sizeof(__pyx_k_i_right), 0, 0, 1, 1}, {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1}, {&__pyx_n_s_idx0, __pyx_k_idx0, sizeof(__pyx_k_idx0), 0, 0, 1, 1}, {&__pyx_n_s_idx1, __pyx_k_idx1, sizeof(__pyx_k_idx1), 0, 0, 1, 1}, {&__pyx_n_s_idx_sort, __pyx_k_idx_sort, sizeof(__pyx_k_idx_sort), 0, 0, 1, 1}, {&__pyx_n_s_idxs, __pyx_k_idxs, sizeof(__pyx_k_idxs), 0, 0, 1, 1}, {&__pyx_n_s_ii, __pyx_k_ii, sizeof(__pyx_k_ii), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1}, {&__pyx_kp_s_internal_1_root_home_embray_src, __pyx_k_internal_1_root_home_embray_src, sizeof(__pyx_k_internal_1_root_home_embray_src), 0, 0, 1, 0}, {&__pyx_n_s_join_inner, __pyx_k_join_inner, sizeof(__pyx_k_join_inner), 0, 0, 1, 1}, {&__pyx_n_s_jointype, __pyx_k_jointype, sizeof(__pyx_k_jointype), 0, 0, 1, 1}, {&__pyx_n_s_key_idxs, __pyx_k_key_idxs, sizeof(__pyx_k_key_idxs), 0, 0, 1, 1}, {&__pyx_n_s_left_idxs, __pyx_k_left_idxs, sizeof(__pyx_k_left_idxs), 0, 0, 1, 1}, {&__pyx_n_s_left_mask, __pyx_k_left_mask, sizeof(__pyx_k_left_mask), 0, 0, 1, 1}, {&__pyx_n_s_left_out, __pyx_k_left_out, sizeof(__pyx_k_left_out), 0, 0, 1, 1}, {&__pyx_n_s_len_left, __pyx_k_len_left, sizeof(__pyx_k_len_left), 0, 0, 1, 1}, {&__pyx_n_s_ma, __pyx_k_ma, sizeof(__pyx_k_ma), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_masked, __pyx_k_masked, sizeof(__pyx_k_masked), 0, 0, 1, 1}, {&__pyx_n_s_max_key_idxs, __pyx_k_max_key_idxs, sizeof(__pyx_k_max_key_idxs), 0, 0, 1, 1}, {&__pyx_n_s_n_left, __pyx_k_n_left, sizeof(__pyx_k_n_left), 0, 0, 1, 1}, {&__pyx_n_s_n_out, __pyx_k_n_out, sizeof(__pyx_k_n_out), 0, 0, 1, 1}, {&__pyx_n_s_n_right, __pyx_k_n_right, sizeof(__pyx_k_n_right), 0, 0, 1, 1}, {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_numpy_lib_recfunctions, __pyx_k_numpy_lib_recfunctions, sizeof(__pyx_k_numpy_lib_recfunctions), 0, 0, 1, 1}, {&__pyx_n_s_numpy_ma, __pyx_k_numpy_ma, sizeof(__pyx_k_numpy_ma), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_right_idxs, __pyx_k_right_idxs, sizeof(__pyx_k_right_idxs), 0, 0, 1, 1}, {&__pyx_n_s_right_mask, __pyx_k_right_mask, sizeof(__pyx_k_right_mask), 0, 0, 1, 1}, {&__pyx_n_s_right_out, __pyx_k_right_out, sizeof(__pyx_k_right_out), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "astropy/table/_np_utils.pyx":19 * @cython.wraparound(False) * @cython.boundscheck(False) * def join_inner(np.ndarray[DTYPE_t, ndim=1] idxs, # <<<<<<<<<<<<<< * np.ndarray[DTYPE_t, ndim=1] idx_sort, * int len_left, */ __pyx_tuple__8 = PyTuple_Pack(24, __pyx_n_s_idxs, __pyx_n_s_idx_sort, __pyx_n_s_len_left, __pyx_n_s_jointype, __pyx_n_s_n_out, __pyx_n_s_max_key_idxs, __pyx_n_s_ii, __pyx_n_s_key_idxs, __pyx_n_s_n_left, __pyx_n_s_n_right, __pyx_n_s_idx0, __pyx_n_s_idx1, __pyx_n_s_idx, __pyx_n_s_i, __pyx_n_s_i_left, __pyx_n_s_i_right, __pyx_n_s_i_out, __pyx_n_s_masked, __pyx_n_s_left_out, __pyx_n_s_right_out, __pyx_n_s_left_mask, __pyx_n_s_right_mask, __pyx_n_s_left_idxs, __pyx_n_s_right_idxs); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(4, 0, 24, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_internal_1_root_home_embray_src, __pyx_n_s_join_inner, 19, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC init_np_utils(void); /*proto*/ PyMODINIT_FUNC init_np_utils(void) #else PyMODINIT_FUNC PyInit__np_utils(void); /*proto*/ PyMODINIT_FUNC PyInit__np_utils(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__np_utils(void)", 0); if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("_np_utils", __pyx_methods, __pyx_k_Cython_utilities_for_numpy_stru, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_astropy__table___np_utils) { if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "astropy.table._np_utils")) { if (unlikely(PyDict_SetItemString(modules, "astropy.table._np_utils", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ /*--- Type import code ---*/ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /* "astropy/table/_np_utils.pyx":8 * """ * * import numpy as np # <<<<<<<<<<<<<< * import numpy.ma as ma * from numpy.lib.recfunctions import drop_fields */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "astropy/table/_np_utils.pyx":9 * * import numpy as np * import numpy.ma as ma # <<<<<<<<<<<<<< * from numpy.lib.recfunctions import drop_fields * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s__7); __Pyx_GIVEREF(__pyx_n_s__7); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__7); __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy_ma, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_ma, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "astropy/table/_np_utils.pyx":10 * import numpy as np * import numpy.ma as ma * from numpy.lib.recfunctions import drop_fields # <<<<<<<<<<<<<< * * cimport cython */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_drop_fields); __Pyx_GIVEREF(__pyx_n_s_drop_fields); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_drop_fields); __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy_lib_recfunctions, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_drop_fields); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_drop_fields, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "astropy/table/_np_utils.pyx":14 * cimport cython * cimport numpy as np * DTYPE = np.int # <<<<<<<<<<<<<< * ctypedef np.intp_t DTYPE_t * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_DTYPE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "astropy/table/_np_utils.pyx":19 * @cython.wraparound(False) * @cython.boundscheck(False) * def join_inner(np.ndarray[DTYPE_t, ndim=1] idxs, # <<<<<<<<<<<<<< * np.ndarray[DTYPE_t, ndim=1] idx_sort, * int len_left, */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7astropy_5table_9_np_utils_1join_inner, NULL, __pyx_n_s_astropy_table__np_utils); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_join_inner, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "astropy/table/_np_utils.pyx":1 * """ # <<<<<<<<<<<<<< * Cython utilities for numpy structured arrays. * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "../../../../../usr/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init astropy.table._np_utils", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init astropy.table._np_utils"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* --- Runtime support code --- */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule((char *)modname); if (!m) goto end; p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type) { stack[0].field = &ctx->root; stack[0].parent_offset = 0; ctx->root.type = type; ctx->root.name = "buffer dtype"; ctx->root.offset = 0; ctx->head = stack; ctx->head->field = &ctx->root; ctx->fmt_offset = 0; ctx->head->parent_offset = 0; ctx->new_packmode = '@'; ctx->enc_packmode = '@'; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->is_complex = 0; ctx->is_valid_array = 0; ctx->struct_alignment = 0; while (type->typegroup == 'S') { ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = 0; type = type->fields->type; } } static int __Pyx_BufFmt_ParseNumber(const char** ts) { int count; const char* t = *ts; if (*t < '0' || *t > '9') { return -1; } else { count = *t++ - '0'; while (*t >= '0' && *t < '9') { count *= 10; count += *t++ - '0'; } } *ts = t; return count; } static int __Pyx_BufFmt_ExpectNumber(const char **ts) { int number = __Pyx_BufFmt_ParseNumber(ts); if (number == -1) PyErr_Format(PyExc_ValueError,\ "Does not understand character buffer dtype format string ('%c')", **ts); return number; } static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { PyErr_Format(PyExc_ValueError, "Unexpected format string character: '%c'", ch); } static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { switch (ch) { case 'c': return "'char'"; case 'b': return "'signed char'"; case 'B': return "'unsigned char'"; case 'h': return "'short'"; case 'H': return "'unsigned short'"; case 'i': return "'int'"; case 'I': return "'unsigned int'"; case 'l': return "'long'"; case 'L': return "'unsigned long'"; case 'q': return "'long long'"; case 'Q': return "'unsigned long long'"; case 'f': return (is_complex ? "'complex float'" : "'float'"); case 'd': return (is_complex ? "'complex double'" : "'double'"); case 'g': return (is_complex ? "'complex long double'" : "'long double'"); case 'T': return "a struct"; case 'O': return "Python object"; case 'P': return "a pointer"; case 's': case 'p': return "a string"; case 0: return "end"; default: return "unparseable format string"; } } static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return 2; case 'i': case 'I': case 'l': case 'L': return 4; case 'q': case 'Q': return 8; case 'f': return (is_complex ? 8 : 4); case 'd': return (is_complex ? 16 : 8); case 'g': { PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); return 0; } case 'O': case 'P': return sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { switch (ch) { case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(short); case 'i': case 'I': return sizeof(int); case 'l': case 'L': return sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(float) * (is_complex ? 2 : 1); case 'd': return sizeof(double) * (is_complex ? 2 : 1); case 'g': return sizeof(long double) * (is_complex ? 2 : 1); case 'O': case 'P': return sizeof(void*); default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } typedef struct { char c; short x; } __Pyx_st_short; typedef struct { char c; int x; } __Pyx_st_int; typedef struct { char c; long x; } __Pyx_st_long; typedef struct { char c; float x; } __Pyx_st_float; typedef struct { char c; double x; } __Pyx_st_double; typedef struct { char c; long double x; } __Pyx_st_longdouble; typedef struct { char c; void *x; } __Pyx_st_void_p; #ifdef HAVE_LONG_LONG typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_st_float) - sizeof(float); case 'd': return sizeof(__Pyx_st_double) - sizeof(double); case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } /* These are for computing the padding at the end of the struct to align on the first member of the struct. This will probably the same as above, but we don't have any guarantees. */ typedef struct { short x; char c; } __Pyx_pad_short; typedef struct { int x; char c; } __Pyx_pad_int; typedef struct { long x; char c; } __Pyx_pad_long; typedef struct { float x; char c; } __Pyx_pad_float; typedef struct { double x; char c; } __Pyx_pad_double; typedef struct { long double x; char c; } __Pyx_pad_longdouble; typedef struct { void *x; char c; } __Pyx_pad_void_p; #ifdef HAVE_LONG_LONG typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { switch (ch) { case 'c': return 'H'; case 'b': case 'h': case 'i': case 'l': case 'q': case 's': case 'p': return 'I'; case 'B': case 'H': case 'I': case 'L': case 'Q': return 'U'; case 'f': case 'd': case 'g': return (is_complex ? 'C' : 'R'); case 'O': return 'O'; case 'P': return 'P'; default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { if (ctx->head == NULL || ctx->head->field == &ctx->root) { const char* expected; const char* quote; if (ctx->head == NULL) { expected = "end"; quote = ""; } else { expected = ctx->head->field->type->name; quote = "'"; } PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected %s%s%s but got %s", quote, expected, quote, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); } else { __Pyx_StructField* field = ctx->head->field; __Pyx_StructField* parent = (ctx->head - 1)->field; PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), parent->type->name, field->name); } } static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { char group; size_t size, offset, arraysize = 1; if (ctx->enc_type == 0) return 0; if (ctx->head->field->type->arraysize[0]) { int i, ndim = 0; if (ctx->enc_type == 's' || ctx->enc_type == 'p') { ctx->is_valid_array = ctx->head->field->type->ndim == 1; ndim = 1; if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %zu", ctx->head->field->type->arraysize[0], ctx->enc_count); return -1; } } if (!ctx->is_valid_array) { PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", ctx->head->field->type->ndim, ndim); return -1; } for (i = 0; i < ctx->head->field->type->ndim; i++) { arraysize *= ctx->head->field->type->arraysize[i]; } ctx->is_valid_array = 0; ctx->enc_count = 1; } group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); do { __Pyx_StructField* field = ctx->head->field; __Pyx_TypeInfo* type = field->type; if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); } else { size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); } if (ctx->enc_packmode == '@') { size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); size_t align_mod_offset; if (align_at == 0) return -1; align_mod_offset = ctx->fmt_offset % align_at; if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; if (ctx->struct_alignment == 0) ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, ctx->is_complex); } if (type->size != size || type->typegroup != group) { if (type->typegroup == 'C' && type->fields != NULL) { size_t parent_offset = ctx->head->parent_offset + field->offset; ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = parent_offset; continue; } if ((type->typegroup == 'H' || group == 'H') && type->size == size) { } else { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } } offset = ctx->head->parent_offset + field->offset; if (ctx->fmt_offset != offset) { PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); return -1; } ctx->fmt_offset += size; if (arraysize) ctx->fmt_offset += (arraysize - 1) * size; --ctx->enc_count; while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; } ctx->head->field = ++field; if (field->type == NULL) { --ctx->head; field = ctx->head->field; continue; } else if (field->type->typegroup == 'S') { size_t parent_offset = ctx->head->parent_offset + field->offset; if (field->type->fields->type == NULL) continue; field = field->type->fields; ++ctx->head; ctx->head->field = field; ctx->head->parent_offset = parent_offset; break; } else { break; } } } while (ctx->enc_count); ctx->enc_type = 0; ctx->is_complex = 0; return 0; } static CYTHON_INLINE PyObject * __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) { const char *ts = *tsp; int i = 0, number; int ndim = ctx->head->field->type->ndim; ; ++ts; if (ctx->new_count != 1) { PyErr_SetString(PyExc_ValueError, "Cannot handle repeated arrays in format string"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; while (*ts && *ts != ')') { switch (*ts) { case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; default: break; } number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) return PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %d", ctx->head->field->type->arraysize[i], number); if (*ts != ',' && *ts != ')') return PyErr_Format(PyExc_ValueError, "Expected a comma in format string, got '%c'", *ts); if (*ts == ',') ts++; i++; } if (i != ndim) return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", ctx->head->field->type->ndim, i); if (!*ts) { PyErr_SetString(PyExc_ValueError, "Unexpected end of format string, expected ')'"); return NULL; } ctx->is_valid_array = 1; ctx->new_count = 1; *tsp = ++ts; return Py_None; } static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { int got_Z = 0; while (1) { switch(*ts) { case 0: if (ctx->enc_type != 0 && ctx->head == NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; if (ctx->head != NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } return ts; case ' ': case '\r': case '\n': ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '=': case '@': case '^': ctx->new_packmode = *ts++; break; case 'T': { const char* ts_after_sub; size_t i, struct_count = ctx->new_count; size_t struct_alignment = ctx->struct_alignment; ctx->new_count = 1; ++ts; if (*ts != '{') { PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; ctx->enc_count = 0; ctx->struct_alignment = 0; ++ts; ts_after_sub = ts; for (i = 0; i != struct_count; ++i) { ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); if (!ts_after_sub) return NULL; } ts = ts_after_sub; if (struct_alignment) ctx->struct_alignment = struct_alignment; } break; case '}': { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; if (alignment && ctx->fmt_offset % alignment) { ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); } } return ts; case 'x': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->fmt_offset += ctx->new_count; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->enc_packmode = ctx->new_packmode; ++ts; break; case 'Z': got_Z = 1; ++ts; if (*ts != 'f' && *ts != 'd' && *ts != 'g') { __Pyx_BufFmt_RaiseUnexpectedChar('Z'); return NULL; } case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': case 'l': case 'L': case 'q': case 'Q': case 'f': case 'd': case 'g': case 'O': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; ctx->new_count = 1; got_Z = 0; ++ts; break; } case 's': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_count = ctx->new_count; ctx->enc_packmode = ctx->new_packmode; ctx->enc_type = *ts; ctx->is_complex = got_Z; ++ts; ctx->new_count = 1; got_Z = 0; break; case ':': ++ts; while(*ts != ':') ++ts; ++ts; break; case '(': if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; break; default: { int number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; ctx->new_count = (size_t)number; } } } } static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { buf->buf = NULL; buf->obj = NULL; buf->strides = __Pyx_zeros; buf->shape = __Pyx_zeros; buf->suboffsets = __Pyx_minusones; } static CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (buf->ndim != nd) { PyErr_Format(PyExc_ValueError, "Buffer has wrong number of dimensions (expected %d, got %d)", nd, buf->ndim); goto fail; } if (!cast) { __Pyx_BufFmt_Context ctx; __Pyx_BufFmt_Init(&ctx, stack, dtype); if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; } if ((unsigned)buf->itemsize != dtype->size) { PyErr_Format(PyExc_ValueError, "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", buf->itemsize, (buf->itemsize > 1) ? "s" : "", dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); goto fail; } if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; return 0; fail:; __Pyx_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (likely(result)) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return -1; } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { #else if (is_list || PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if CYTHON_COMPILING_IN_PYPY PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #endif } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } Py_DECREF(obj); view->obj = NULL; } #endif #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } static CYTHON_INLINE Py_intptr_t __Pyx_PyInt_As_Py_intptr_t(PyObject *x) { const Py_intptr_t neg_one = (Py_intptr_t) -1, const_zero = (Py_intptr_t) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(Py_intptr_t) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(Py_intptr_t, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (Py_intptr_t) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (Py_intptr_t) 0; case 1: __PYX_VERIFY_RETURN_INT(Py_intptr_t, digit, digits[0]) case 2: if (8 * sizeof(Py_intptr_t) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(Py_intptr_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(Py_intptr_t) >= 2 * PyLong_SHIFT) { return (Py_intptr_t) (((((Py_intptr_t)digits[1]) << PyLong_SHIFT) | (Py_intptr_t)digits[0])); } } break; case 3: if (8 * sizeof(Py_intptr_t) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(Py_intptr_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(Py_intptr_t) >= 3 * PyLong_SHIFT) { return (Py_intptr_t) (((((((Py_intptr_t)digits[2]) << PyLong_SHIFT) | (Py_intptr_t)digits[1]) << PyLong_SHIFT) | (Py_intptr_t)digits[0])); } } break; case 4: if (8 * sizeof(Py_intptr_t) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(Py_intptr_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(Py_intptr_t) >= 4 * PyLong_SHIFT) { return (Py_intptr_t) (((((((((Py_intptr_t)digits[3]) << PyLong_SHIFT) | (Py_intptr_t)digits[2]) << PyLong_SHIFT) | (Py_intptr_t)digits[1]) << PyLong_SHIFT) | (Py_intptr_t)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (Py_intptr_t) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(Py_intptr_t) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(Py_intptr_t, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(Py_intptr_t) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(Py_intptr_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (Py_intptr_t) 0; case -1: __PYX_VERIFY_RETURN_INT(Py_intptr_t, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(Py_intptr_t, digit, +digits[0]) case -2: if (8 * sizeof(Py_intptr_t) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(Py_intptr_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(Py_intptr_t) - 1 > 2 * PyLong_SHIFT) { return (Py_intptr_t) (((Py_intptr_t)-1)*(((((Py_intptr_t)digits[1]) << PyLong_SHIFT) | (Py_intptr_t)digits[0]))); } } break; case 2: if (8 * sizeof(Py_intptr_t) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(Py_intptr_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(Py_intptr_t) - 1 > 2 * PyLong_SHIFT) { return (Py_intptr_t) ((((((Py_intptr_t)digits[1]) << PyLong_SHIFT) | (Py_intptr_t)digits[0]))); } } break; case -3: if (8 * sizeof(Py_intptr_t) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(Py_intptr_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(Py_intptr_t) - 1 > 3 * PyLong_SHIFT) { return (Py_intptr_t) (((Py_intptr_t)-1)*(((((((Py_intptr_t)digits[2]) << PyLong_SHIFT) | (Py_intptr_t)digits[1]) << PyLong_SHIFT) | (Py_intptr_t)digits[0]))); } } break; case 3: if (8 * sizeof(Py_intptr_t) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(Py_intptr_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(Py_intptr_t) - 1 > 3 * PyLong_SHIFT) { return (Py_intptr_t) ((((((((Py_intptr_t)digits[2]) << PyLong_SHIFT) | (Py_intptr_t)digits[1]) << PyLong_SHIFT) | (Py_intptr_t)digits[0]))); } } break; case -4: if (8 * sizeof(Py_intptr_t) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(Py_intptr_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(Py_intptr_t) - 1 > 4 * PyLong_SHIFT) { return (Py_intptr_t) (((Py_intptr_t)-1)*(((((((((Py_intptr_t)digits[3]) << PyLong_SHIFT) | (Py_intptr_t)digits[2]) << PyLong_SHIFT) | (Py_intptr_t)digits[1]) << PyLong_SHIFT) | (Py_intptr_t)digits[0]))); } } break; case 4: if (8 * sizeof(Py_intptr_t) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(Py_intptr_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(Py_intptr_t) - 1 > 4 * PyLong_SHIFT) { return (Py_intptr_t) ((((((((((Py_intptr_t)digits[3]) << PyLong_SHIFT) | (Py_intptr_t)digits[2]) << PyLong_SHIFT) | (Py_intptr_t)digits[1]) << PyLong_SHIFT) | (Py_intptr_t)digits[0]))); } } break; } #endif if (sizeof(Py_intptr_t) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(Py_intptr_t, long, PyLong_AsLong(x)) } else if (sizeof(Py_intptr_t) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(Py_intptr_t, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else Py_intptr_t val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (Py_intptr_t) -1; } } else { Py_intptr_t val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (Py_intptr_t) -1; val = __Pyx_PyInt_As_Py_intptr_t(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to Py_intptr_t"); return (Py_intptr_t) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to Py_intptr_t"); return (Py_intptr_t) -1; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value) { const Py_intptr_t neg_one = (Py_intptr_t) -1, const_zero = (Py_intptr_t) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(Py_intptr_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(Py_intptr_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(Py_intptr_t) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(Py_intptr_t) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(Py_intptr_t) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(Py_intptr_t), little, !is_unsigned); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return ::std::complex< float >(x, y); } #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return x + y*(__pyx_t_float_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { __pyx_t_float_complex z; z.real = x; z.imag = y; return z; } #endif #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrtf(z.real*z.real + z.imag*z.imag); #else return hypotf(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { float denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(a); theta = atan2f(a.imag, a.real); } lnr = logf(r); z_r = expf(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cosf(z_theta); z.imag = z_r * sinf(z_theta); return z; } #endif #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return ::std::complex< double >(x, y); } #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return x + y*(__pyx_t_double_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { __pyx_t_double_complex z; z.real = x; z.imag = y; return z; } #endif #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrt(z.real*z.real + z.imag*z.imag); #else return hypot(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { double denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(a); theta = atan2(a.imag, a.real); } lnr = log(r); z_r = exp(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cos(z_theta); z.imag = z_r * sin(z_theta); return z; } #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(enum NPY_TYPES) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(enum NPY_TYPES) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), little, !is_unsigned); } } static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } #ifndef __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule static PyObject *__Pyx_ImportModule(const char *name) { PyObject *py_name = 0; PyObject *py_module = 0; py_name = __Pyx_PyIdentifier_FromString(name); if (!py_name) goto bad; py_module = PyImport_Import(py_name); Py_DECREF(py_name); return py_module; bad: Py_XDECREF(py_name); return 0; } #endif #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; char warning[200]; Py_ssize_t basicsize; #ifdef Py_LIMITED_API PyObject *py_basicsize; #endif py_module = __Pyx_ImportModule(module_name); if (!py_module) goto bad; py_name = __Pyx_PyIdentifier_FromString(class_name); if (!py_name) goto bad; result = PyObject_GetAttr(py_module, py_name); Py_DECREF(py_name); py_name = 0; Py_DECREF(py_module); py_module = 0; if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #ifndef Py_LIMITED_API basicsize = ((PyTypeObject *)result)->tp_basicsize; #else py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if (!strict && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility", module_name, class_name); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else if (__Pyx_PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif #endif } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return __Pyx_NewRef(x); m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(x); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ astropy-1.1.1/astropy/table/tests/0000755001134200020070000000000012644022135020050 5ustar embrayscience00000000000000astropy-1.1.1/astropy/table/tests/test_groups.py0000644001134200020070000004720712644017723023021 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS import numpy as np from ...tests.helper import pytest, catch_warnings from ...table import Table, Column from ...utils.exceptions import AstropyUserWarning def sort_eq(list1, list2): return sorted(list1) == sorted(list2) def test_column_group_by(T1): for masked in (False, True): t1 = Table(T1, masked=masked) t1a = t1['a'].copy() # Group by a Column (i.e. numpy array) t1ag = t1a.group_by(t1['a']) assert np.all(t1ag.groups.indices == np.array([0, 1, 4, 8])) # Group by a Table t1ag = t1a.group_by(t1['a', 'b']) assert np.all(t1ag.groups.indices == np.array([0, 1, 3, 4, 5, 7, 8])) # Group by a numpy structured array t1ag = t1a.group_by(t1['a', 'b'].as_array()) assert np.all(t1ag.groups.indices == np.array([0, 1, 3, 4, 5, 7, 8])) def test_table_group_by(T1): """ Test basic table group_by functionality for possible key types and for masked/unmasked tables. """ for masked in (False, True): t1 = Table(T1, masked=masked) # Group by a single column key specified by name tg = t1.group_by('a') assert np.all(tg.groups.indices == np.array([0, 1, 4, 8])) assert str(tg.groups) == "" assert str(tg['a'].groups) == "" # Sorted by 'a' and in original order for rest assert tg.pformat() == [' a b c d ', '--- --- --- ---', ' 0 a 0.0 4', ' 1 b 3.0 5', ' 1 a 2.0 6', ' 1 a 1.0 7', ' 2 c 7.0 0', ' 2 b 5.0 1', ' 2 b 6.0 2', ' 2 a 4.0 3'] assert tg.meta['ta'] == 1 assert tg['c'].meta['a'] == 1 assert tg['c'].description == 'column c' # Group by a table column tg2 = t1.group_by(t1['a']) assert tg.pformat() == tg2.pformat() # Group by two columns spec'd by name for keys in (['a', 'b'], ('a', 'b')): tg = t1.group_by(keys) assert np.all(tg.groups.indices == np.array([0, 1, 3, 4, 5, 7, 8])) # Sorted by 'a', 'b' and in original order for rest assert tg.pformat() == [' a b c d ', '--- --- --- ---', ' 0 a 0.0 4', ' 1 a 2.0 6', ' 1 a 1.0 7', ' 1 b 3.0 5', ' 2 a 4.0 3', ' 2 b 5.0 1', ' 2 b 6.0 2', ' 2 c 7.0 0'] # Group by a Table tg2 = t1.group_by(t1['a', 'b']) assert tg.pformat() == tg2.pformat() # Group by a structured array tg2 = t1.group_by(t1['a', 'b'].as_array()) assert tg.pformat() == tg2.pformat() # Group by a simple ndarray tg = t1.group_by(np.array([0, 1, 0, 1, 2, 1, 0, 0])) assert np.all(tg.groups.indices == np.array([0, 4, 7, 8])) assert tg.pformat() == [' a b c d ', '--- --- --- ---', ' 2 c 7.0 0', ' 2 b 6.0 2', ' 1 a 2.0 6', ' 1 a 1.0 7', ' 2 b 5.0 1', ' 2 a 4.0 3', ' 1 b 3.0 5', ' 0 a 0.0 4'] def test_groups_keys(T1): tg = T1.group_by('a') keys = tg.groups.keys assert keys.dtype.names == ('a',) assert np.all(keys['a'] == np.array([0, 1, 2])) tg = T1.group_by(['a', 'b']) keys = tg.groups.keys assert keys.dtype.names == ('a', 'b') assert np.all(keys['a'] == np.array([0, 1, 1, 2, 2, 2])) assert np.all(keys['b'] == np.array(['a', 'a', 'b', 'a', 'b', 'c'])) # Grouping by Column ignores column name tg = T1.group_by(T1['b']) keys = tg.groups.keys assert keys.dtype.names is None def test_groups_iterator(T1): tg = T1.group_by('a') for ii, group in enumerate(tg.groups): assert group.pformat() == tg.groups[ii].pformat() assert group['a'][0] == tg['a'][tg.groups.indices[ii]] def test_grouped_copy(T1): """ Test that copying a table or column copies the groups properly """ for masked in (False, True): t1 = Table(T1, masked=masked) tg = t1.group_by('a') tgc = tg.copy() assert np.all(tgc.groups.indices == tg.groups.indices) assert np.all(tgc.groups.keys == tg.groups.keys) tac = tg['a'].copy() assert np.all(tac.groups.indices == tg['a'].groups.indices) c1 = t1['a'].copy() gc1 = c1.group_by(t1['a']) gc1c = gc1.copy() assert np.all(gc1c.groups.indices == np.array([0, 1, 4, 8])) def test_grouped_slicing(T1): """ Test that slicing a table removes previous grouping """ for masked in (False, True): t1 = Table(T1, masked=masked) # Regular slice of a table tg = t1.group_by('a') tg2 = tg[3:5] assert np.all(tg2.groups.indices == np.array([0, len(tg2)])) assert tg2.groups.keys is None def test_group_column_from_table(T1): """ Group a column that is part of a table """ cg = T1['c'].group_by(np.array(T1['a'])) assert np.all(cg.groups.keys == np.array([0, 1, 2])) assert np.all(cg.groups.indices == np.array([0, 1, 4, 8])) def test_table_groups_mask_index(T1): """ Use boolean mask as item in __getitem__ for groups """ for masked in (False, True): t1 = Table(T1, masked=masked).group_by('a') t2 = t1.groups[np.array([True, False, True])] assert len(t2.groups) == 2 assert t2.groups[0].pformat() == t1.groups[0].pformat() assert t2.groups[1].pformat() == t1.groups[2].pformat() assert np.all(t2.groups.keys['a'] == np.array([0, 2])) def test_table_groups_array_index(T1): """ Use numpy array as item in __getitem__ for groups """ for masked in (False, True): t1 = Table(T1, masked=masked).group_by('a') t2 = t1.groups[np.array([0, 2])] assert len(t2.groups) == 2 assert t2.groups[0].pformat() == t1.groups[0].pformat() assert t2.groups[1].pformat() == t1.groups[2].pformat() assert np.all(t2.groups.keys['a'] == np.array([0, 2])) def test_table_groups_slicing(T1): """ Test that slicing table groups works """ for masked in (False, True): t1 = Table(T1, masked=masked).group_by('a') # slice(0, 2) t2 = t1.groups[0:2] assert len(t2.groups) == 2 assert t2.groups[0].pformat() == t1.groups[0].pformat() assert t2.groups[1].pformat() == t1.groups[1].pformat() assert np.all(t2.groups.keys['a'] == np.array([0, 1])) # slice(1, 2) t2 = t1.groups[1:2] assert len(t2.groups) == 1 assert t2.groups[0].pformat() == t1.groups[1].pformat() assert np.all(t2.groups.keys['a'] == np.array([1])) # slice(0, 3, 2) t2 = t1.groups[0:3:2] assert len(t2.groups) == 2 assert t2.groups[0].pformat() == t1.groups[0].pformat() assert t2.groups[1].pformat() == t1.groups[2].pformat() assert np.all(t2.groups.keys['a'] == np.array([0, 2])) def test_grouped_item_access(T1): """ Test that column slicing preserves grouping """ for masked in (False, True): t1 = Table(T1, masked=masked) # Regular slice of a table tg = t1.group_by('a') tgs = tg['a', 'c', 'd'] assert np.all(tgs.groups.keys == tg.groups.keys) assert np.all(tgs.groups.indices == tg.groups.indices) tgsa = tgs.groups.aggregate(np.sum) assert tgsa.pformat() == [' a c d ', '--- ---- ---', ' 0 0.0 4', ' 1 6.0 18', ' 2 22.0 6'] tgs = tg['c', 'd'] assert np.all(tgs.groups.keys == tg.groups.keys) assert np.all(tgs.groups.indices == tg.groups.indices) tgsa = tgs.groups.aggregate(np.sum) assert tgsa.pformat() == [' c d ', '---- ---', ' 0.0 4', ' 6.0 18', '22.0 6'] def test_mutable_operations(T1): """ Operations like adding or deleting a row should removing grouping, but adding or removing or renaming a column should retain grouping. """ for masked in (False, True): t1 = Table(T1, masked=masked) # add row tg = t1.group_by('a') tg.add_row((0, 'a', 3.0, 4)) assert np.all(tg.groups.indices == np.array([0, len(tg)])) assert tg.groups.keys is None # remove row tg = t1.group_by('a') tg.remove_row(4) assert np.all(tg.groups.indices == np.array([0, len(tg)])) assert tg.groups.keys is None # add column tg = t1.group_by('a') indices = tg.groups.indices.copy() tg.add_column(Column(name='e', data=np.arange(len(tg)))) assert np.all(tg.groups.indices == indices) assert np.all(tg['e'].groups.indices == indices) assert np.all(tg['e'].groups.keys == tg.groups.keys) # remove column (not key column) tg = t1.group_by('a') tg.remove_column('b') assert np.all(tg.groups.indices == indices) # Still has original key col names assert tg.groups.keys.dtype.names == ('a',) assert np.all(tg['a'].groups.indices == indices) # remove key column tg = t1.group_by('a') tg.remove_column('a') assert np.all(tg.groups.indices == indices) assert tg.groups.keys.dtype.names == ('a',) assert np.all(tg['b'].groups.indices == indices) # rename key column tg = t1.group_by('a') tg.rename_column('a', 'aa') assert np.all(tg.groups.indices == indices) assert tg.groups.keys.dtype.names == ('a',) assert np.all(tg['aa'].groups.indices == indices) def test_group_by_masked(T1): t1m = Table(T1, masked=True) t1m['c'].mask[4] = True t1m['d'].mask[5] = True assert t1m.group_by('a').pformat() == [' a b c d ', '--- --- --- ---', ' 0 a -- 4', ' 1 b 3.0 --', ' 1 a 2.0 6', ' 1 a 1.0 7', ' 2 c 7.0 0', ' 2 b 5.0 1', ' 2 b 6.0 2', ' 2 a 4.0 3'] def test_group_by_errors(T1): """ Appropriate errors get raised. """ # Bad column name as string with pytest.raises(ValueError): T1.group_by('f') # Bad column names in list with pytest.raises(ValueError): T1.group_by(['f', 'g']) # Wrong length array with pytest.raises(ValueError): T1.group_by(np.array([1, 2])) # Wrong type with pytest.raises(TypeError): T1.group_by(None) # Masked key column t1 = Table(T1, masked=True) t1['a'].mask[4] = True with pytest.raises(ValueError): t1.group_by('a') def test_groups_keys_meta(T1): """ Make sure the keys meta['grouped_by_table_cols'] is working. """ # Group by column in this table tg = T1.group_by('a') assert tg.groups.keys.meta['grouped_by_table_cols'] is True assert tg['c'].groups.keys.meta['grouped_by_table_cols'] is True assert tg.groups[1].groups.keys.meta['grouped_by_table_cols'] is True assert (tg['d'].groups[np.array([False, True, True])] .groups.keys.meta['grouped_by_table_cols'] is True) # Group by external Table tg = T1.group_by(T1['a', 'b']) assert tg.groups.keys.meta['grouped_by_table_cols'] is False assert tg['c'].groups.keys.meta['grouped_by_table_cols'] is False assert tg.groups[1].groups.keys.meta['grouped_by_table_cols'] is False # Group by external numpy array tg = T1.group_by(T1['a', 'b'].as_array()) assert not hasattr(tg.groups.keys, 'meta') assert not hasattr(tg['c'].groups.keys, 'meta') # Group by Column tg = T1.group_by(T1['a']) assert 'grouped_by_table_cols' not in tg.groups.keys.meta assert 'grouped_by_table_cols' not in tg['c'].groups.keys.meta def test_table_aggregate(T1): """ Aggregate a table """ # Table with only summable cols t1 = T1['a', 'c', 'd'] tg = t1.group_by('a') tga = tg.groups.aggregate(np.sum) assert tga.pformat() == [' a c d ', '--- ---- ---', ' 0 0.0 4', ' 1 6.0 18', ' 2 22.0 6'] # Reverts to default groups assert np.all(tga.groups.indices == np.array([0, 3])) assert tga.groups.keys is None # metadata survives assert tga.meta['ta'] == 1 assert tga['c'].meta['a'] == 1 assert tga['c'].description == 'column c' # Aggregate with np.sum with masked elements. This results # in one group with no elements, hence a nan result and conversion # to float for the 'd' column. t1m = Table(t1, masked=True) t1m['c'].mask[4:6] = True t1m['d'].mask[4:6] = True tg = t1m.group_by('a') with catch_warnings(Warning) as warning_lines: tga = tg.groups.aggregate(np.sum) assert warning_lines[0].category == UserWarning assert "converting a masked element to nan" in str(warning_lines[0].message) assert tga.pformat() == [' a c d ', '--- ---- ----', ' 0 nan nan', ' 1 3.0 13.0', ' 2 22.0 6.0'] # Aggregrate with np.sum with masked elements, but where every # group has at least one remaining (unmasked) element. Then # the int column stays as an int. t1m = Table(t1, masked=True) t1m['c'].mask[5] = True t1m['d'].mask[5] = True tg = t1m.group_by('a') tga = tg.groups.aggregate(np.sum) assert tga.pformat() == [' a c d ', '--- ---- ---', ' 0 0.0 4', ' 1 3.0 13', ' 2 22.0 6'] # Aggregate with a column type that cannot by supplied to the aggregating # function. This raises a warning but still works. tg = T1.group_by('a') with catch_warnings(Warning) as warning_lines: tga = tg.groups.aggregate(np.sum) assert warning_lines[0].category == AstropyUserWarning assert "Cannot aggregate column" in str(warning_lines[0].message) assert tga.pformat() == [' a c d ', '--- ---- ---', ' 0 0.0 4', ' 1 6.0 18', ' 2 22.0 6'] def test_table_aggregate_reduceat(T1): """ Aggregate table with functions which have a reduceat method """ # Comparison functions without reduceat def np_mean(x): return np.mean(x) def np_sum(x): return np.sum(x) def np_add(x): return np.add(x) # Table with only summable cols t1 = T1['a', 'c', 'd'] tg = t1.group_by('a') # Comparison tga_r = tg.groups.aggregate(np.sum) tga_a = tg.groups.aggregate(np.add) tga_n = tg.groups.aggregate(np_sum) assert np.all(tga_r == tga_n) assert np.all(tga_a == tga_n) assert tga_n.pformat() == [' a c d ', '--- ---- ---', ' 0 0.0 4', ' 1 6.0 18', ' 2 22.0 6'] tga_r = tg.groups.aggregate(np.mean) tga_n = tg.groups.aggregate(np_mean) assert np.all(tga_r == tga_n) assert tga_n.pformat() == [' a c d ', '--- --- ---', ' 0 0.0 4.0', ' 1 2.0 6.0', ' 2 5.5 1.5'] # Binary ufunc np_add should raise warning without reduceat t2 = T1['a', 'c'] tg = t2.group_by('a') with catch_warnings(Warning) as warning_lines: tga = tg.groups.aggregate(np_add) assert warning_lines[0].category == AstropyUserWarning assert "Cannot aggregate column" in str(warning_lines[0].message) assert tga.pformat() == [' a ', '---', ' 0', ' 1', ' 2'] def test_column_aggregate(T1): """ Aggregate a single table column """ for masked in (False, True): tg = Table(T1, masked=masked).group_by('a') tga = tg['c'].groups.aggregate(np.sum) assert tga.pformat() == [' c ', '----', ' 0.0', ' 6.0', '22.0'] def test_table_filter(): """ Table groups filtering """ def all_positive(table, key_colnames): colnames = [name for name in table.colnames if name not in key_colnames] for colname in colnames: if np.any(table[colname] < 0): return False return True # Negative value in 'a' column should not filter because it is a key col t = Table.read([' a c d', ' -2 7.0 0', ' -2 5.0 1', ' 0 0.0 4', ' 1 3.0 5', ' 1 2.0 -6', ' 1 1.0 7', ' 3 3.0 5', ' 3 -2.0 6', ' 3 1.0 7', ], format='ascii') tg = t.group_by('a') t2 = tg.groups.filter(all_positive) assert t2.groups[0].pformat() == [' a c d ', '--- --- ---', ' -2 7.0 0', ' -2 5.0 1'] assert t2.groups[1].pformat() == [' a c d ', '--- --- ---', ' 0 0.0 4'] def test_column_filter(): """ Table groups filtering """ def all_positive(column): if np.any(column < 0): return False return True # Negative value in 'a' column should not filter because it is a key col t = Table.read([' a c d', ' -2 7.0 0', ' -2 5.0 1', ' 0 0.0 4', ' 1 3.0 5', ' 1 2.0 -6', ' 1 1.0 7', ' 3 3.0 5', ' 3 -2.0 6', ' 3 1.0 7', ], format='ascii') tg = t.group_by('a') c2 = tg['c'].groups.filter(all_positive) assert len(c2.groups) == 3 assert c2.groups[0].pformat() == [' c ', '---', '7.0', '5.0'] assert c2.groups[1].pformat() == [' c ', '---', '0.0'] assert c2.groups[2].pformat() == [' c ', '---', '3.0', '2.0', '1.0'] astropy-1.1.1/astropy/table/tests/test_np_utils.py0000644001134200020070000000400612640262015023315 0ustar embrayscience00000000000000import numpy as np from .. import np_utils def test_common_dtype(): """ Test that allowed combinations are those expected. """ dtype = [(str('int'), np.int), (str('uint8'), np.uint8), (str('float32'), np.float32), (str('float64'), np.float64), (str('str'), 'S2'), (str('uni'), 'U2'), (str('bool'), np.bool), (str('object'), np.object_)] arr = np.empty(1, dtype=dtype) fail = set() succeed = set() for name1, type1 in dtype: for name2, type2 in dtype: try: np_utils.common_dtype([arr[name1], arr[name2]]) succeed.add('{0} {1}'.format(name1, name2)) except np_utils.TableMergeError: fail.add('{0} {1}'.format(name1, name2)) # known bad combinations bad = set(['str int', 'str bool', 'uint8 bool', 'uint8 str', 'object float32', 'bool object', 'uni uint8', 'int str', 'bool str', 'bool float64', 'bool uni', 'str float32', 'uni float64', 'uni object', 'bool uint8', 'object float64', 'float32 bool', 'str uint8', 'uni bool', 'float64 bool', 'float64 object', 'int bool', 'uni int', 'uint8 object', 'int uni', 'uint8 uni', 'float32 uni', 'object uni', 'bool float32', 'uni float32', 'object str', 'int object', 'str float64', 'object int', 'float64 uni', 'bool int', 'object bool', 'object uint8', 'float32 object', 'str object', 'float64 str', 'float32 str']) assert fail == bad good = set(['float64 int', 'int int', 'uint8 float64', 'uint8 int', 'str uni', 'float32 float32', 'float64 float64', 'float64 uint8', 'float64 float32', 'int uint8', 'int float32', 'uni str', 'int float64', 'uint8 float32', 'float32 int', 'float32 uint8', 'bool bool', 'uint8 uint8', 'str str', 'float32 float64', 'object object', 'uni uni']) assert succeed == good astropy-1.1.1/astropy/table/tests/test_column.py0000644001134200020070000004563512644017723023002 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS import operator import numpy as np from ...tests.helper import pytest, assert_follows_unicode_guidelines from ... import table from ... import units as u from ...extern import six from ...utils.compat import NUMPY_LT_1_8 class TestColumn(): def test_subclass(self, Column): c = Column(name='a') assert isinstance(c, np.ndarray) c2 = c * 2 assert isinstance(c2, Column) assert isinstance(c2, np.ndarray) def test_numpy_ops(self, Column): """Show that basic numpy operations with Column behave sensibly""" arr = np.array([1, 2, 3]) c = Column(arr, name='a') for op, test_equal in ((operator.eq, True), (operator.ne, False), (operator.ge, True), (operator.gt, False), (operator.le, True), (operator.lt, False)): for eq in (op(c, arr), op(arr, c)): assert np.all(eq) if test_equal else not np.any(eq) assert len(eq) == 3 if Column is table.Column: assert type(eq) == np.ndarray else: assert type(eq) == np.ma.core.MaskedArray assert eq.dtype.str == '|b1' lt = c - 1 < arr assert np.all(lt) def test_numpy_boolean_ufuncs(self, Column): """Show that basic numpy operations with Column behave sensibly""" arr = np.array([1, 2, 3]) c = Column(arr, name='a') for ufunc, test_true in ((np.isfinite, True), (np.isinf, False), (np.isnan, False), (np.sign, True), (np.signbit, False)): result = ufunc(c) assert len(result) == len(c) assert np.all(result) if test_true else not np.any(result) if Column is table.Column: assert type(result) == np.ndarray else: assert type(result) == np.ma.core.MaskedArray if ufunc is not np.sign: assert result.dtype.str == '|b1' def test_view(self, Column): c = np.array([1, 2, 3], dtype=np.int64).view(Column) assert repr(c) == "<{0} dtype='int64' length=3>\n1\n2\n3".format(Column.__name__) def test_format(self, Column): """Show that the formatted output from str() works""" from ... import conf with conf.set_temp('max_lines', 8): c1 = Column(np.arange(2000), name='a', dtype=float, format='%6.2f') assert str(c1).splitlines() == [' a ', '-------', ' 0.00', ' 1.00', ' ...', '1998.00', '1999.00', 'Length = 2000 rows'] def test_convert_numpy_array(self, Column): d = Column([1, 2, 3], name='a', dtype='i8') np_data = np.array(d) assert np.all(np_data == d) np_data = np.array(d, copy=False) assert np.all(np_data == d) np_data = np.array(d, dtype='i4') assert np.all(np_data == d) def test_convert_unit(self, Column): d = Column([1, 2, 3], name='a', dtype="f8", unit="m") d.convert_unit_to("km") assert np.all(d.data == [0.001, 0.002, 0.003]) def test_array_wrap(self): """Test that the __array_wrap__ method converts a reduction ufunc output that has a different shape into an ndarray view. Without this a method call like c.mean() returns a Column array object with length=1.""" # Mean and sum for a 1-d float column c = table.Column(name='a', data=[1., 2., 3.]) assert np.allclose(c.mean(), 2.0) assert isinstance(c.mean(), (np.floating, float)) assert np.allclose(c.sum(), 6.) assert isinstance(c.sum(), (np.floating, float)) # Non-reduction ufunc preserves Column class assert isinstance(np.cos(c), table.Column) # Sum for a 1-d int column c = table.Column(name='a', data=[1, 2, 3]) assert np.allclose(c.sum(), 6) assert isinstance(c.sum(), (np.integer, int)) # Sum for a 2-d int column c = table.Column(name='a', data=[[1, 2, 3], [4, 5, 6]]) assert c.sum() == 21 assert isinstance(c.sum(), (np.integer, int)) assert np.all(c.sum(axis=0) == [5, 7, 9]) assert c.sum(axis=0).shape == (3,) assert isinstance(c.sum(axis=0), np.ndarray) # Sum and mean for a 1-d masked column c = table.MaskedColumn(name='a', data=[1., 2., 3.], mask=[0, 0, 1]) assert np.allclose(c.mean(), 1.5) assert isinstance(c.mean(), (np.floating, float)) assert np.allclose(c.sum(), 3.) assert isinstance(c.sum(), (np.floating, float)) def test_name_none(self, Column): """Can create a column without supplying name, which defaults to None""" c = Column([1, 2]) assert c.name is None assert np.all(c == np.array([1, 2])) def test_quantity_init(self, Column): c = Column(data=np.array([1, 2, 3]) * u.m) assert np.all(c.data == np.array([1, 2, 3])) assert np.all(c.unit == u.m) c = Column(data=np.array([1, 2, 3]) * u.m, unit=u.cm) assert np.all(c.data == np.array([100, 200, 300])) assert np.all(c.unit == u.cm) def test_attrs_survive_getitem_after_change(self, Column): """ Test for issue #3023: when calling getitem with a MaskedArray subclass the original object attributes are not copied. """ c1 = Column([1, 2, 3], name='a', unit='m', format='i', description='aa', meta={'a': 1}) c1.name = 'b' c1.unit = 'km' c1.format = 'i2' c1.description = 'bb' c1.meta = {'bbb': 2} for item in (slice(None, None), slice(None, 1), np.array([0, 2]), np.array([False, True, False])): c2 = c1[item] assert c2.name == 'b' assert c2.unit is u.km assert c2.format == 'i2' assert c2.description == 'bb' assert c2.meta == {'bbb': 2} # Make sure that calling getitem resulting in a scalar does # not copy attributes. val = c1[1] for attr in ('name', 'unit', 'format', 'description', 'meta'): assert not hasattr(val, attr) def test_to_quantity(self, Column): d = Column([1, 2, 3], name='a', dtype="f8", unit="m") assert np.all(d.quantity == ([1, 2, 3.] * u.m)) assert np.all(d.quantity.value == ([1, 2, 3.] * u.m).value) assert np.all(d.quantity == d.to('m')) assert np.all(d.quantity.value == d.to('m').value) np.testing.assert_allclose(d.to(u.km).value, ([.001, .002, .003] * u.km).value) np.testing.assert_allclose(d.to('km').value, ([.001, .002, .003] * u.km).value) np.testing.assert_allclose(d.to(u.MHz,u.equivalencies.spectral()).value, [299.792458, 149.896229, 99.93081933]) d_nounit = Column([1, 2, 3], name='a', dtype="f8", unit=None) with pytest.raises(u.UnitsError): d_nounit.to(u.km) assert np.all(d_nounit.to(u.dimensionless_unscaled) == np.array([1, 2, 3])) #make sure the correct copy/no copy behavior is happening q = [1, 3, 5]*u.km # to should always make a copy d.to(u.km)[:] = q np.testing.assert_allclose(d, [1, 2, 3]) # explcit copying of the quantity should not change the column d.quantity.copy()[:] = q np.testing.assert_allclose(d, [1, 2, 3]) # but quantity directly is a "view", accessing the underlying column d.quantity[:] = q np.testing.assert_allclose(d, [1000, 3000, 5000]) #view should also work for integers d2 = Column([1, 2, 3], name='a', dtype=int, unit="m") d2.quantity[:] = q np.testing.assert_allclose(d2, [1000, 3000, 5000]) #but it should fail for strings or other non-numeric tables d3 = Column(['arg', 'name', 'stuff'], name='a', unit="m") with pytest.raises(TypeError): d3.quantity def test_item_access_type(self, Column): """ Tests for #3095, which forces integer item access to always return a plain ndarray or MaskedArray, even in the case of a multi-dim column. """ integer_types = (int, long, np.int) if six.PY2 else (int, np.int) for int_type in integer_types: c = Column([[1, 2], [3, 4]]) i0 = int_type(0) i1 = int_type(1) assert np.all(c[i0] == [1, 2]) assert type(c[i0]) == (np.ma.MaskedArray if hasattr(Column, 'mask') else np.ndarray) assert c[i0].shape == (2,) c01 = c[i0:i1] assert np.all(c01 == [[1, 2]]) assert isinstance(c01, Column) assert c01.shape == (1, 2) c = Column([1, 2]) assert np.all(c[i0] == 1) assert isinstance(c[i0], np.integer) assert c[i0].shape == () c01 = c[i0:i1] assert np.all(c01 == [1]) assert isinstance(c01, Column) assert c01.shape == (1,) def test_insert_basic(self, Column): c = Column([0, 1, 2], name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) # Basic insert c1 = c.insert(1, 100) assert np.all(c1 == [0, 100, 1, 2]) assert c1.attrs_equal(c) assert type(c) is type(c1) if hasattr(c1, 'mask'): assert c1.data.shape == c1.mask.shape c1 = c.insert(-1, 100) assert np.all(c1 == [0, 1, 100, 2]) c1 = c.insert(3, 100) assert np.all(c1 == [0, 1, 2, 100]) c1 = c.insert(-3, 100) assert np.all(c1 == [100, 0, 1, 2]) c1 = c.insert(1, [100, 200, 300]) if hasattr(c1, 'mask'): assert c1.data.shape == c1.mask.shape # Out of bounds index with pytest.raises((ValueError, IndexError)): c1 = c.insert(-4, 100) with pytest.raises((ValueError,IndexError)): c1 = c.insert(4, 100) def test_insert_multidim(self, Column): c = Column([[1, 2], [3, 4]], name='a', dtype=int) # Basic insert c1 = c.insert(1, [100, 200]) assert np.all(c1 == [[1, 2], [100, 200], [3, 4]]) # Broadcast c1 = c.insert(1, 100) assert np.all(c1 == [[1, 2], [100, 100], [3, 4]]) # Wrong shape with pytest.raises(ValueError): c1 = c.insert(1, [100, 200, 300]) def test_insert_object(self, Column): c = Column(['a', 1, None], name='a', dtype=object) # Basic insert c1 = c.insert(1, [100, 200]) assert np.all(c1 == ['a', [100, 200], 1, None]) def test_insert_masked(self): c = table.MaskedColumn([0, 1, 2], name='a', mask=[False, True, False]) # Basic insert c1 = c.insert(1, 100) assert np.all(c1.data.data == [0, 100, 1, 2]) assert np.all(c1.data.mask == [False, False, True, False]) assert type(c) is type(c1) for mask in (False, True): c1 = c.insert(1, 100, mask=mask) assert np.all(c1.data.data == [0, 100, 1, 2]) assert np.all(c1.data.mask == [False, mask, True, False]) def test_insert_masked_multidim(self): c = table.MaskedColumn([[1, 2], [3, 4]], name='a', dtype=int) c1 = c.insert(1, [100, 200], mask=True) assert np.all(c1.data.data == [[1, 2], [100, 200], [3, 4]]) assert np.all(c1.data.mask == [[False, False], [True, True], [False, False]]) c1 = c.insert(1, [100, 200], mask=[True, False]) assert np.all(c1.data.data == [[1, 2], [100, 200], [3, 4]]) assert np.all(c1.data.mask == [[False, False], [True, False], [False, False]]) with pytest.raises(ValueError): c1 = c.insert(1, [100, 200], mask=[True, False, True]) class TestAttrEqual(): """Bunch of tests originally from ATpy that test the attrs_equal method.""" def test_5(self, Column): c1 = Column(name='a', dtype=int, unit='mJy') c2 = Column(name='a', dtype=int, unit='mJy') assert c1.attrs_equal(c2) def test_6(self, Column): c1 = Column(name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) c2 = Column(name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) assert c1.attrs_equal(c2) def test_7(self, Column): c1 = Column(name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) c2 = Column(name='b', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) assert not c1.attrs_equal(c2) def test_8(self, Column): c1 = Column(name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) c2 = Column(name='a', dtype=float, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) assert not c1.attrs_equal(c2) def test_9(self, Column): c1 = Column(name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) c2 = Column(name='a', dtype=int, unit='erg.cm-2.s-1.Hz-1', format='%i', description='test column', meta={'c': 8, 'd': 12}) assert not c1.attrs_equal(c2) def test_10(self, Column): c1 = Column(name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) c2 = Column(name='a', dtype=int, unit='mJy', format='%g', description='test column', meta={'c': 8, 'd': 12}) assert not c1.attrs_equal(c2) def test_11(self, Column): c1 = Column(name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) c2 = Column(name='a', dtype=int, unit='mJy', format='%i', description='another test column', meta={'c': 8, 'd': 12}) assert not c1.attrs_equal(c2) def test_12(self, Column): c1 = Column(name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) c2 = Column(name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'e': 8, 'd': 12}) assert not c1.attrs_equal(c2) def test_13(self, Column): c1 = Column(name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) c2 = Column(name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 9, 'd': 12}) assert not c1.attrs_equal(c2) def test_col_and_masked_col(self): c1 = table.Column(name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) c2 = table.MaskedColumn(name='a', dtype=int, unit='mJy', format='%i', description='test column', meta={'c': 8, 'd': 12}) assert c1.attrs_equal(c2) assert c2.attrs_equal(c1) # Check that the meta descriptor is working as expected. The MetaBaseTest class # takes care of defining all the tests, and we simply have to define the class # and any minimal set of args to pass. from ...utils.tests.test_metadata import MetaBaseTest class TestMetaColumn(MetaBaseTest): test_class = table.Column args = () class TestMetaMaskedColumn(MetaBaseTest): test_class = table.MaskedColumn args = () def test_getitem_metadata_regression(): """ Regression test for #1471: MaskedArray does not call __array_finalize__ so the meta-data was not getting copied over. By overloading _update_from we are able to work around this bug. """ # Make sure that meta-data gets propagated with __getitem__ c = table.Column(data=[1,2], name='a', description='b', unit='m', format="%i", meta={'c': 8}) assert c[1:2].name == 'a' assert c[1:2].description == 'b' assert c[1:2].unit == 'm' assert c[1:2].format == '%i' assert c[1:2].meta['c'] == 8 c = table.MaskedColumn(data=[1,2], name='a', description='b', unit='m', format="%i", meta={'c': 8}) assert c[1:2].name == 'a' assert c[1:2].description == 'b' assert c[1:2].unit == 'm' assert c[1:2].format == '%i' assert c[1:2].meta['c'] == 8 # As above, but with take() - check the method and the function c = table.Column(data=[1,2,3], name='a', description='b', unit='m', format="%i", meta={'c': 8}) for subset in [c.take([0, 1]), np.take(c, [0, 1])]: assert subset.name == 'a' assert subset.description == 'b' assert subset.unit == 'm' assert subset.format == '%i' assert subset.meta['c'] == 8 # Metadata isn't copied for scalar values if NUMPY_LT_1_8: with pytest.raises(ValueError): c.take(0) with pytest.raises(ValueError): np.take(c, 0) else: for subset in [c.take(0), np.take(c, 0)]: assert subset == 1 assert subset.shape == () assert not isinstance(subset, table.Column) c = table.MaskedColumn(data=[1,2,3], name='a', description='b', unit='m', format="%i", meta={'c': 8}) for subset in [c.take([0, 1]), np.take(c, [0, 1])]: assert subset.name == 'a' assert subset.description == 'b' assert subset.unit == 'm' assert subset.format == '%i' assert subset.meta['c'] == 8 # Metadata isn't copied for scalar values if NUMPY_LT_1_8: with pytest.raises(ValueError): c.take(0) with pytest.raises(ValueError): np.take(c, 0) else: for subset in [c.take(0), np.take(c, 0)]: assert subset == 1 assert subset.shape == () assert not isinstance(subset, table.MaskedColumn) def test_unicode_guidelines(): arr = np.array([1, 2, 3]) c = table.Column(arr, name='a') assert_follows_unicode_guidelines(c) def test_scalar_column(): """ Column is not designed to hold scalars, but for numpy 1.6 this can happen: >> type(np.std(table.Column([1, 2]))) astropy.table.column.Column """ c = table.Column(1.5) assert repr(c) == '1.5' assert str(c) == '1.5' astropy-1.1.1/astropy/table/tests/test_index.py0000644001134200020070000003715212644017723022607 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from .test_table import SetupData from ..bst import BST, FastBST, FastRBT from ..sorted_array import SortedArray from ..table import Table, QTable, NdarrayMixin, Row from ...table import table_helpers from ... import units as u from ...coordinates import SkyCoord from ...time import Time from ..column import BaseColumn @pytest.fixture(params=[BST, FastRBT, SortedArray]) def engine(request): return request.param _col = [1, 2, 3, 4, 5] @pytest.fixture(params=[ _col, u.Quantity(_col), Time(_col, format='jyear'), ]) def main_col(request): return request.param def assert_col_equal(col, array): if isinstance(col, Time): assert np.all(col == Time(array, format='jyear')) else: assert np.all(col == col.__class__(array)) @pytest.mark.usefixtures('table_types') class TestIndex(SetupData): def _setup(self, main_col, table_types): super(TestIndex, self)._setup(table_types) self.main_col = main_col if isinstance(main_col, u.Quantity): self._table_type = QTable if not isinstance(main_col, list): self._column_type = lambda x: x # don't change mixin type self.mutable = isinstance(main_col, (list, u.Quantity)) def make_col(self, name, lst): return self._column_type(lst, name=name) def make_val(self, val): if isinstance(self.main_col, Time): return Time(val, format='jyear') return val @property def t(self): if not hasattr(self, '_t'): self._t = self._table_type() self._t['a'] = self._column_type(self.main_col) self._t['b'] = self._column_type([4.0, 5.1, 6.2, 7.0, 1.1]) self._t['c'] = self._column_type(['7', '8', '9', '10', '11']) return self._t @pytest.mark.parametrize("composite", [False, True]) def test_table_index(self, main_col, table_types, composite, engine): self._setup(main_col, table_types) t = self.t t.add_index(('a', 'b') if composite else 'a', engine=engine) assert np.all(t.indices[0].sorted_data() == [0, 1, 2, 3, 4]) if not self.mutable: return # test altering table columns t['a'][0] = 4 t.add_row((6, 6.0, '7')) t['a'][3] = 10 t.remove_row(2) t.add_row((4, 5.0, '9')) assert_col_equal(t['a'], np.array([4, 2, 10, 5, 6, 4])) assert np.allclose(t['b'], np.array([4.0, 5.1, 7.0, 1.1, 6.0, 5.0])) assert np.all(t['c'].data == np.array(['7', '8', '10', '11', '7', '9'])) index = t.indices[0] l = list(index.data.items()) if composite: assert np.all(l == [((2, 5.1), [1]), ((4, 4.0), [0]), ((4, 5.0), [5]), ((5, 1.1), [3]), ((6, 6.0), [4]), ((10, 7.0), [2])]) else: assert np.all(l == [((2,), [1]), ((4,), [0, 5]), ((5,), [3]), ((6,), [4]), ((10,), [2])]) t.remove_indices('a') assert len(t.indices) == 0 def test_table_slicing(self, main_col, table_types, engine): self._setup(main_col, table_types) t = self.t t.add_index('a', engine=engine) assert np.all(t.indices[0].sorted_data() == [0, 1, 2, 3, 4]) for slice_ in ([0, 2], np.array([0, 2])): t2 = t[slice_] # t2 should retain an index on column 'a' assert len(t2.indices) == 1 assert_col_equal(t2['a'], [1, 3]) # the index in t2 should reorder row numbers after slicing assert np.all(t2.indices[0].sorted_data() == [0, 1]) # however, this index should be a deep copy of t1's index assert np.all(t.indices[0].sorted_data() == [0, 1, 2, 3, 4]) def test_remove_rows(self, main_col, table_types, engine): self._setup(main_col, table_types) if not self.mutable: return t = self.t t.add_index('a', engine=engine) # remove individual row t2 = t.copy() t2.remove_rows(2) assert_col_equal(t2['a'], [1, 2, 4, 5]) assert np.all(t2.indices[0].sorted_data() == [0, 1, 2, 3]) # remove by list, ndarray, or slice for cut in ([0, 2, 4], np.array([0, 2, 4]), slice(0, 5, 2)): t2 = t.copy() t2.remove_rows(cut) assert_col_equal(t2['a'], [2, 4]) assert np.all(t2.indices[0].sorted_data() == [0, 1]) with pytest.raises(ValueError): t.remove_rows((0, 2, 4)) def test_col_get_slice(self, main_col, table_types, engine): self._setup(main_col, table_types) t = self.t t.add_index('a', engine=engine) # get slice t2 = t[1:3] # table slice assert_col_equal(t2['a'], [2, 3]) assert np.all(t2.indices[0].sorted_data() == [0, 1]) col_slice = t['a'][1:3] assert_col_equal(col_slice, [2, 3]) # true column slices discard indices if isinstance(t['a'], BaseColumn): assert len(col_slice.info.indices) == 0 # take slice of slice t2 = t[::2] assert_col_equal(t2['a'], np.array([1, 3, 5])) t3 = t2[::-1] assert_col_equal(t3['a'], np.array([5, 3, 1])) assert np.all(t3.indices[0].sorted_data() == [2, 1, 0]) t3 = t2[:2] assert_col_equal(t3['a'], np.array([1, 3])) assert np.all(t3.indices[0].sorted_data() == [0, 1]) # out-of-bound slices for t_empty in (t2[3:], t2[2:1], t3[2:]): assert len(t_empty['a']) == 0 assert np.all(t_empty.indices[0].sorted_data() == []) if self.mutable: # get boolean mask mask = t['a'] % 2 == 1 t2 = t[mask] assert_col_equal(t2['a'], [1, 3, 5]) assert np.all(t2.indices[0].sorted_data() == [0, 1, 2]) def test_col_set_slice(self, main_col, table_types, engine): self._setup(main_col, table_types) if not self.mutable: return t = self.t t.add_index('a', engine=engine) # set slice t2 = t.copy() t2['a'][1:3] = np.array([6, 7]) assert_col_equal(t2['a'], np.array([1, 6, 7, 4, 5])) assert np.all(t2.indices[0].sorted_data() == [0, 3, 4, 1, 2]) # change original table via slice reference t2 = t.copy() t3 = t2[1:3] assert_col_equal(t3['a'], np.array([2, 3])) assert np.all(t3.indices[0].sorted_data() == [0, 1]) t3['a'][0] = 5 assert_col_equal(t3['a'], np.array([5, 3])) assert_col_equal(t2['a'], np.array([1, 5, 3, 4, 5])) assert np.all(t3.indices[0].sorted_data() == [1, 0]) assert np.all(t2.indices[0].sorted_data() == [0, 2, 3, 1, 4]) # set boolean mask t2 = t.copy() mask = t['a'] % 2 == 1 t2['a'][mask] = 0. assert_col_equal(t2['a'], [0, 2, 0, 4, 0]) assert np.all(t2.indices[0].sorted_data() == [0, 2, 4, 1, 3]) def test_multiple_slices(self, main_col, table_types, engine): self._setup(main_col, table_types) if not self.mutable: return t = self.t t.add_index('a', engine=engine) for i in range(6, 51): t.add_row((i, 1.0, 'A')) assert_col_equal(t['a'], [i for i in range(1, 51)]) assert np.all(t.indices[0].sorted_data() == [i for i in range(50)]) evens = t[::2] assert np.all(evens.indices[0].sorted_data() == [i for i in range(25)]) reverse = evens[::-1] index = reverse.indices[0] assert (index.start, index.stop, index.step) == (48, -2, -2) assert np.all(index.sorted_data() == [i for i in range(24, -1, -1)]) # modify slice of slice reverse[-10:] = 0 expected = np.array([i for i in range(1, 51)]) expected[:20][expected[:20] % 2 == 1] = 0 assert_col_equal(t['a'], expected) assert_col_equal(evens['a'], expected[::2]) assert_col_equal(reverse['a'], expected[::2][::-1]) # first ten evens are now zero assert np.all(t.indices[0].sorted_data() == [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19] + [i for i in range(20, 50)]) assert np.all(evens.indices[0].sorted_data() == [i for i in range(25)]) assert np.all(reverse.indices[0].sorted_data() == [i for i in range(24, -1, -1)]) # try different step sizes of slice t2 = t[1:20:2] assert_col_equal(t2['a'], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) assert np.all(t2.indices[0].sorted_data() == [i for i in range(10)]) t3 = t2[::3] assert_col_equal(t3['a'], [2, 8, 14, 20]) assert np.all(t3.indices[0].sorted_data() == [0, 1, 2, 3]) t4 = t3[2::-1] assert_col_equal(t4['a'], [14, 8, 2]) assert np.all(t4.indices[0].sorted_data() == [2, 1, 0]) def test_sort(self, main_col, table_types, engine): self._setup(main_col, table_types) t = self.t[::-1] # reverse table assert_col_equal(t['a'], [5, 4, 3, 2, 1]) t.add_index('a', engine=engine) assert np.all(t.indices[0].sorted_data() == [4, 3, 2, 1, 0]) if not self.mutable: return # sort table by column a t2 = t.copy() t2.sort('a') assert_col_equal(t2['a'], [1, 2, 3, 4, 5]) assert np.all(t2.indices[0].sorted_data() == [0, 1, 2, 3, 4]) # sort table by primary key t2 = t.copy() t2.sort() assert_col_equal(t2['a'], [1, 2, 3, 4, 5]) assert np.all(t2.indices[0].sorted_data() == [0, 1, 2, 3, 4]) def test_insert_row(self, main_col, table_types, engine): self._setup(main_col, table_types) if not self.mutable: return t = self.t t.add_index('a', engine=engine) t.insert_row(2, (6, 1.0, '12')) assert_col_equal(t['a'], [1, 2, 6, 3, 4, 5]) assert np.all(t.indices[0].sorted_data() == [0, 1, 3, 4, 5, 2]) t.insert_row(1, (0, 4.0, '13')) assert_col_equal(t['a'], [1, 0, 2, 6, 3, 4, 5]) assert np.all(t.indices[0].sorted_data() == [1, 0, 2, 4, 5, 6, 3]) def test_index_modes(self, main_col, table_types, engine): self._setup(main_col, table_types) t = self.t t.add_index('a', engine=engine) # first, no special mode assert len(t[[1, 3]].indices) == 1 assert len(t[::-1].indices) == 1 assert len(self._table_type(t).indices) == 1 assert np.all(t.indices[0].sorted_data() == [0, 1, 2, 3, 4]) t2 = t.copy() # non-copy mode with t.index_mode('discard_on_copy'): assert len(t[[1, 3]].indices) == 0 assert len(t[::-1].indices) == 0 assert len(self._table_type(t).indices) == 0 assert len(t2.copy().indices) == 1 # mode should only affect t # make sure non-copy mode is exited correctly assert len(t[[1, 3]].indices) == 1 if not self.mutable: return # non-modify mode with t.index_mode('freeze'): assert np.all(t.indices[0].sorted_data() == [0, 1, 2, 3, 4]) t['a'][0] = 6 assert np.all(t.indices[0].sorted_data() == [0, 1, 2, 3, 4]) t.add_row((2, 1.5, '12')) assert np.all(t.indices[0].sorted_data() == [0, 1, 2, 3, 4]) t.remove_rows([1, 3]) assert np.all(t.indices[0].sorted_data() == [0, 1, 2, 3, 4]) assert_col_equal(t['a'], [6, 3, 5, 2]) # mode should only affect t assert np.all(t2.indices[0].sorted_data() == [0, 1, 2, 3, 4]) t2['a'][0] = 6 assert np.all(t2.indices[0].sorted_data() == [1, 2, 3, 4, 0]) # make sure non-modify mode is exited correctly assert np.all(t.indices[0].sorted_data() == [3, 1, 2, 0]) if isinstance(t['a'], BaseColumn): assert len(t['a'][::-1].info.indices) == 0 with t.index_mode('copy_on_getitem'): assert len(t['a'][[1, 2]].info.indices) == 1 # mode should only affect t assert len(t2['a'][[1, 2]].info.indices) == 0 assert len(t['a'][::-1].info.indices) == 0 assert len(t2['a'][::-1].info.indices) == 0 def test_index_retrieval(self, main_col, table_types, engine): self._setup(main_col, table_types) t = self.t t.add_index('a', engine=engine) t.add_index(['a', 'c'], engine=engine) assert len(t.indices) == 2 assert len(t.indices['a'].columns) == 1 assert len(t.indices['a', 'c'].columns) == 2 with pytest.raises(IndexError): t.indices['b'] def test_col_rename(self, main_col, table_types, engine): ''' Checks for a previous bug in which copying a Table with different column names raised an exception. ''' self._setup(main_col, table_types) t = self.t t.add_index('a', engine=engine) t2 = self._table_type(self.t, names=['d', 'e', 'f']) assert len(t2.indices) == 1 def test_table_loc(self, main_col, table_types, engine): self._setup(main_col, table_types) t = self.t t.add_index('a', engine=engine) t.add_index('b', engine=engine) t2 = t.loc[self.make_val(3)] # single label, with primary key 'a' assert_col_equal(t2['a'], [3]) assert isinstance(t2, Row) # list search t2 = t.loc[[self.make_val(1), self.make_val(4), self.make_val(2)]] assert_col_equal(t2['a'], [1, 4, 2]) # same order as input list if not isinstance(main_col, Time): # ndarray search t2 = t.loc[np.array([1, 4, 2])] assert_col_equal(t2['a'], [1, 4, 2]) assert_col_equal(t2['a'], [1, 4, 2]) t2 = t.loc[self.make_val(3): self.make_val(5)] # range search assert_col_equal(t2['a'], [3, 4, 5]) t2 = t.loc['b', 5.0:7.0] assert_col_equal(t2['b'], [5.1, 6.2, 7.0]) # search by sorted index t2 = t.iloc[0:2] # two smallest rows by column 'a' assert_col_equal(t2['a'], [1, 2]) t2 = t.iloc['b', 2:] # exclude two smallest rows in column 'b' assert_col_equal(t2['b'], [5.1, 6.2, 7.0]) for t2 in (t.loc[:], t.iloc[:]): assert_col_equal(t2['a'], [1, 2, 3, 4, 5]) def test_invalid_search(self, main_col, table_types, engine): # using .loc with a value not present should raise an exception self._setup(main_col, table_types) t = self.t t.add_index('a') with pytest.raises(KeyError): t.loc[self.make_val(6)] def test_copy_index_references(self, main_col, table_types, engine): # check against a bug in which indices were given an incorrect # column reference when copied self._setup(main_col, table_types) t = self.t t.add_index('a') t.add_index('b') t2 = t.copy() assert t2.indices['a'].columns[0] is t2['a'] assert t2.indices['b'].columns[0] is t2['b'] def test_unique_index(self, main_col, table_types, engine): self._setup(main_col, table_types) t = self.t t.add_index('a', engine=engine, unique=True) assert np.all(t.indices['a'].sorted_data() == [0, 1, 2, 3, 4]) if self.mutable: with pytest.raises(ValueError): t.add_row((5, 5.0, '9')) astropy-1.1.1/astropy/table/tests/test_pickle.py0000644001134200020070000000633612644017723022747 0ustar embrayscience00000000000000from ...extern.six.moves import cPickle as pickle import numpy as np import pytest from ...table import Table, Column, MaskedColumn, QTable from ...units import Quantity, deg from ...time import Time from ...coordinates import SkyCoord def test_pickle_column(protocol): c = Column(data=[1, 2], name='a', format='%05d', description='col a', unit='cm', meta={'a': 1}) cs = pickle.dumps(c) cp = pickle.loads(cs) assert np.all(cp == c) assert cp.attrs_equal(c) assert cp._parent_table is None assert repr(c) == repr(cp) def test_pickle_masked_column(protocol): c = MaskedColumn(data=[1, 2], name='a', format='%05d', description='col a', unit='cm', meta={'a': 1}) c.mask[1] = True c.fill_value = -99 cs = pickle.dumps(c) cp = pickle.loads(cs) assert np.all(cp._data == c._data) assert np.all(cp.mask == c.mask) assert cp.attrs_equal(c) assert cp.fill_value == -99 assert cp._parent_table is None assert repr(c) == repr(cp) def test_pickle_multidimensional_column(protocol): """Regression test for https://github.com/astropy/astropy/issues/4098""" a = np.zeros((3, 2)) c = Column(a, name='a') cs = pickle.dumps(c) cp = pickle.loads(cs) assert np.all(c == cp) assert c.shape == cp.shape assert cp.attrs_equal(c) assert repr(c) == repr(cp) def test_pickle_table(protocol): a = Column(data=[1, 2], name='a', format='%05d', description='col a', unit='cm', meta={'a': 1}) b = Column(data=[3.0, 4.0], name='b', format='%05d', description='col b', unit='cm', meta={'b': 1}) for table_class in Table, QTable: t = table_class([a, b], meta={'a': 1, 'b': Quantity(10, unit='s')}) t['c'] = Quantity([1, 2], unit='m') t['d'] = Time(['2001-01-02T12:34:56', '2001-02-03T00:01:02']) t['e'] = SkyCoord([125.0,180.0]*deg, [-45.0,36.5]*deg) ts = pickle.dumps(t) tp = pickle.loads(ts) assert tp.__class__ is table_class assert np.all(tp['a'] == t['a']) assert np.all(tp['b'] == t['b']) # test mixin columns assert np.all(tp['c'] == t['c']) assert np.all(tp['d'] == t['d']) assert np.all(tp['e'].ra == t['e'].ra) assert np.all(tp['e'].dec == t['e'].dec) assert type(tp['c']) == type(t['c']) assert type(tp['d']) == type(t['d']) assert type(tp['e']) == type(t['e']) assert tp.meta == t.meta assert type(tp) == type(t) assert isinstance(tp['c'], Quantity if (table_class is QTable) else Column) def test_pickle_masked_table(protocol): a = Column(data=[1, 2], name='a', format='%05d', description='col a', unit='cm', meta={'a': 1}) b = Column(data=[3.0, 4.0], name='b', format='%05d', description='col b', unit='cm', meta={'b': 1}) t = Table([a, b], meta={'a': 1}, masked=True) t['a'].mask[1] = True t['a'].fill_value = -99 ts = pickle.dumps(t) tp = pickle.loads(ts) for colname in ('a', 'b'): for attr in ('_data', 'mask', 'fill_value'): assert np.all(getattr(tp[colname], attr) == getattr(tp[colname], attr)) assert tp['a'].attrs_equal(t['a']) assert tp['b'].attrs_equal(t['b']) assert tp.meta == t.meta astropy-1.1.1/astropy/table/tests/test_array.py0000644001134200020070000000244412644017723022612 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from ..sorted_array import SortedArray from ..table import Table import pytest import numpy as np @pytest.fixture def array(): # composite index col0 = np.array([x % 2 for x in range(1, 11)]) col1 = np.array([x for x in range(1, 11)]) t = Table([col0, col1]) t = t[t.argsort()] return SortedArray(t, t['col1'].copy()) @pytest.fixture def wide_array(): # array with 100 columns t = Table([[x] * 10 for x in np.arange(100)]) return SortedArray(t, t['col0'].copy()) def test_array_find(array): for i in range(1, 11): print("Searching for {0}".format(i)) assert array.find((i % 2, i)) == [i] assert array.find((1, 4)) == [] def test_array_range(array): assert np.all(array.range((0, 8), (1, 3), (True, True)) == [8, 10, 1, 3]) assert np.all(array.range((0, 8), (1, 3), (False, True)) == [10, 1, 3]) assert np.all(array.range((0, 8), (1, 3), (True, False)) == [8, 10, 1]) def test_wide_array(wide_array): # checks for a previous bug in which the length of a # sliced SortedArray was set to the number of columns # instead of the number of elements in each column first_row = wide_array[:1].data assert np.all(first_row == Table([[x] for x in np.arange(100)])) astropy-1.1.1/astropy/table/tests/test_subclass.py0000644001134200020070000000466412640262015023311 0ustar embrayscience00000000000000# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS from ... import table from .. import pprint class MyRow(table.Row): def __str__(self): return str(self.as_void()) class MyColumn(table.Column): pass class MyMaskedColumn(table.MaskedColumn): pass class MyTableColumns(table.TableColumns): pass class MyTableFormatter(pprint.TableFormatter): pass class MyTable(table.Table): Row = MyRow Column = MyColumn MaskedColumn = MyMaskedColumn TableColumns = MyTableColumns TableFormatter = MyTableFormatter def test_simple_subclass(): t = MyTable([[1, 2], [3, 4]]) row = t[0] assert isinstance(row, MyRow) assert isinstance(t['col0'], MyColumn) assert isinstance(t.columns, MyTableColumns) assert isinstance(t.formatter, MyTableFormatter) t2 = MyTable(t) row = t2[0] assert isinstance(row, MyRow) assert str(row) == '(1, 3)' t3 = table.Table(t) row = t3[0] assert not isinstance(row, MyRow) assert str(row) != '(1, 3)' t = MyTable([[1, 2], [3, 4]], masked=True) row = t[0] assert isinstance(row, MyRow) assert str(row) == '(1, 3)' assert isinstance(t['col0'], MyMaskedColumn) assert isinstance(t.formatter, MyTableFormatter) class ParamsRow(table.Row): """ Row class that allows access to an arbitrary dict of parameters stored as a dict object in the ``params`` column. """ def __getitem__(self, item): if item not in self.colnames: return super(ParamsRow, self).__getitem__('params')[item] else: return super(ParamsRow, self).__getitem__(item) def keys(self): out = [name for name in self.colnames if name != 'params'] params = [key.lower() for key in sorted(self['params'])] return out + params def values(self): return [self[key] for key in self.keys()] class ParamsTable(table.Table): Row = ParamsRow def test_params_table(): t = ParamsTable(names=['a', 'b', 'params'], dtype=['i', 'f', 'O']) t.add_row((1, 2.0, {'x': 1.5, 'y': 2.5})) t.add_row((2, 3.0, {'z': 'hello', 'id': 123123})) assert t['params'][0] == {'x': 1.5, 'y': 2.5} assert t[0]['params'] == {'x': 1.5, 'y': 2.5} assert t[0]['y'] == 2.5 assert t[1]['id'] == 123123 assert list(t[1].keys()) == ['a', 'b', 'id', 'z'] assert list(t[1].values()) == [2, 3.0, 123123, 'hello'] astropy-1.1.1/astropy/table/tests/notebook_repr_html.ipynb0000644001134200020070000017213112602615521025015 0ustar embrayscience00000000000000{ "metadata": { "astropy_comment": "This file is for manual testing of the table _html_repr_ functionality in IPython notebook. Load and run this notebook to verify that the cell tables are represented correctly as formatted HTML.", "name": "notebook_repr_html" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "from astropy.table import Table" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "t = Table([[1,2],[3,4]], names=['a','b'])" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "t" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
ab
13
24
" ], "output_type": "pyout", "prompt_number": 3, "text": [ "\n", "array([(1, 3), (2, 4)], \n", " dtype=[('a', '
col0 [2]col1 [2]col2 [2]
1 .. 23 .. 45 .. 6
10 .. 2030 .. 4050 .. 60
" ], "output_type": "pyout", "prompt_number": 5, "text": [ "\n", "array([([1, 2], [3, 4], [5, 6]), ([10, 20], [30, 40], [50, 60])], \n", " dtype=[('col0', '
col0col1col2col3col4col5col6...col93col94col95col96col97col98col99
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
.............................................
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
1.01.01.01.01.01.01.0...1.01.01.01.01.01.01.0
" ], "output_type": "pyout", "prompt_number": 6, "text": [ "\n", "array([ (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0),\n", " (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)], \n", " dtype=[('col0', ' Table => QTable """ qt = QTable(MIXIN_COLS) names = qt.colnames for name in names: qt[name].info.description = name t = Table(qt) for name in names: assert t[name].info.description == name if name == 'quantity': assert np.all(t['quantity'] == qt['quantity'].value) assert np.all(t['quantity'].unit is qt['quantity'].unit) assert isinstance(t['quantity'], t.ColumnClass) else: assert_table_name_col_equal(t, name, qt[name]) qt2 = QTable(qt) for name in names: assert qt2[name].info.description == name assert_table_name_col_equal(qt2, name, qt[name]) @pytest.mark.xfail def test_column_rename(): qt = QTable(MIXIN_COLS) names = qt.colnames for name in names: qt.rename_column(name, name + '2') assert qt.colnames == [name + '2' for name in names] def test_setitem_as_column_name(): """ Test for mixin-related regression described in #3321. """ t = Table() t['a'] = ['x', 'y'] t['b'] = 'b' # Previously was failing with KeyError assert np.all(t['a'] == ['x', 'y']) assert np.all(t['b'] == ['b', 'b']) def test_quantity_representation(): """ Test that table representation of quantities does not have unit """ t = QTable([[1, 2] * u.m]) assert t.pformat() == ['col0', ' m ', '----', ' 1.0', ' 2.0'] def test_skycoord_representation(): """ Test that skycoord representation works, both in the way that the values are output and in changing the frame representation. """ # With no unit we get "None" in the unit row c = coordinates.SkyCoord([0], [1], [0], representation='cartesian') t = Table([c]) assert t.pformat() == [' col0 ', 'None,None,None', '--------------', ' 0.0,1.0,0.0'] # Test that info works with a dynamically changed representation c = coordinates.SkyCoord([0], [1], [0], unit='m', representation='cartesian') t = Table([c]) assert t.pformat() == [' col0 ', ' m,m,m ', '-----------', '0.0,1.0,0.0'] t['col0'].representation = 'unitspherical' assert t.pformat() == [' col0 ', 'deg,deg ', '--------', '90.0,0.0'] t['col0'].representation = 'cylindrical' assert t.pformat() == [' col0 ', ' m,deg,m ', '------------', '1.0,90.0,0.0'] def test_ndarray_mixin(): """ Test directly adding a plain structured array into a table instead of the view as an NdarrayMixin. Once added as an NdarrayMixin then all the previous tests apply. """ a = np.array([(1, 'a'), (2, 'b'), (3, 'c'), (4, 'd')], dtype='', '<') native_order = byte_orders[sys.byteorder == 'little'] for order in byte_orders: col = table_types.Column([1.0, 2.0], name='a', dtype=order + 'f8') t = table_types.Table([col]) arr = t.as_array() assert arr['a'].dtype.byteorder in (native_order, '=') arr = t.as_array(keep_byteorder=True) if order == native_order: assert arr['a'].dtype.byteorder in (order, '=') else: assert arr['a'].dtype.byteorder == order def test_byteswap_fits_array(self, table_types): """ Test for https://github.com/astropy/astropy/pull/4080, demonstrating that FITS tables are converted to native byte order. """ non_native_order = ('>', '<')[sys.byteorder != 'little'] filename = get_pkg_data_filename('data/tb.fits', 'astropy.io.fits.tests') t = table_types.Table.read(filename) arr = t.as_array() for idx in range(len(arr.dtype)): assert arr.dtype[idx].byteorder != non_native_order with fits.open(filename) as hdul: data = hdul[1].data for colname in data.columns.names: assert np.all(data[colname] == arr[colname]) arr2 = t.as_array(keep_byteorder=True) for colname in data.columns.names: assert (data[colname].dtype.byteorder == arr2[colname].dtype.byteorder) def _assert_copies(t, t2, deep=True): assert t.colnames == t2.colnames np.testing.assert_array_equal(t.as_array(), t2.as_array()) assert t.meta == t2.meta for col, col2 in zip(t.columns.values(), t2.columns.values()): if deep: assert not np.may_share_memory(col, col2) else: assert np.may_share_memory(col, col2) def test_copy(): t = table.Table([[1, 2, 3], [2, 3, 4]], names=['x', 'y']) t2 = t.copy() _assert_copies(t, t2) def test_copy_masked(): t = table.Table([[1, 2, 3], [2, 3, 4]], names=['x', 'y'], masked=True, meta={'name': 'test'}) t['x'].mask == [True, False, True] t2 = t.copy() _assert_copies(t, t2) def test_copy_protocol(): t = table.Table([[1, 2, 3], [2, 3, 4]], names=['x', 'y']) t2 = copy.copy(t) t3 = copy.deepcopy(t) _assert_copies(t, t2, deep=False) _assert_copies(t, t3) def test_disallow_inequality_comparisons(): """ Regression test for #828 - disallow comparison operators on whole Table """ t = table.Table() with pytest.raises(TypeError): t > 2 with pytest.raises(TypeError): t < 1.1 with pytest.raises(TypeError): t >= 5.5 with pytest.raises(TypeError): t <= -1.1 def test_equality(): t = table.Table.read([' a b c d', ' 2 c 7.0 0', ' 2 b 5.0 1', ' 2 b 6.0 2', ' 2 a 4.0 3', ' 0 a 0.0 4', ' 1 b 3.0 5', ' 1 a 2.0 6', ' 1 a 1.0 7', ], format='ascii') # All rows are equal assert np.all(t==t) # Assert no rows are different assert not np.any(t!=t) # Check equality result for a given row assert np.all((t == t[3]) == np.array([0,0,0,1,0,0,0,0], dtype=bool)) # Check inequality result for a given row assert np.all((t != t[3]) == np.array([1,1,1,0,1,1,1,1], dtype=bool)) t2 = table.Table.read([' a b c d', ' 2 c 7.0 0', ' 2 b 5.0 1', ' 3 b 6.0 2', ' 2 a 4.0 3', ' 0 a 1.0 4', ' 1 b 3.0 5', ' 1 c 2.0 6', ' 1 a 1.0 7', ], format='ascii') # In the above cases, Row.__eq__ gets called, but now need to make sure # Table.__eq__ also gets called. assert np.all((t == t2) == np.array([1,1,0,1,0,1,0,1], dtype=bool)) assert np.all((t != t2) == np.array([0,0,1,0,1,0,1,0], dtype=bool)) # Check that comparing to a structured array works assert np.all((t == t2.as_array()) == np.array([1,1,0,1,0,1,0,1], dtype=bool)) assert np.all((t.as_array() == t2) == np.array([1,1,0,1,0,1,0,1], dtype=bool)) def test_equality_masked(): t = table.Table.read([' a b c d', ' 2 c 7.0 0', ' 2 b 5.0 1', ' 2 b 6.0 2', ' 2 a 4.0 3', ' 0 a 0.0 4', ' 1 b 3.0 5', ' 1 a 2.0 6', ' 1 a 1.0 7', ], format='ascii') # Make into masked table t = table.Table(t, masked=True) # All rows are equal assert np.all(t==t) # Assert no rows are different assert not np.any(t!=t) # Check equality result for a given row assert np.all((t == t[3]) == np.array([0,0,0,1,0,0,0,0], dtype=bool)) # Check inequality result for a given row assert np.all((t != t[3]) == np.array([1,1,1,0,1,1,1,1], dtype=bool)) t2 = table.Table.read([' a b c d', ' 2 c 7.0 0', ' 2 b 5.0 1', ' 3 b 6.0 2', ' 2 a 4.0 3', ' 0 a 1.0 4', ' 1 b 3.0 5', ' 1 c 2.0 6', ' 1 a 1.0 7', ], format='ascii') # In the above cases, Row.__eq__ gets called, but now need to make sure # Table.__eq__ also gets called. assert np.all((t == t2) == np.array([1,1,0,1,0,1,0,1], dtype=bool)) assert np.all((t != t2) == np.array([0,0,1,0,1,0,1,0], dtype=bool)) # Check that masking a value causes the row to differ t.mask['a'][0] = True assert np.all((t == t2) == np.array([0,1,0,1,0,1,0,1], dtype=bool)) assert np.all((t != t2) == np.array([1,0,1,0,1,0,1,0], dtype=bool)) # Check that comparing to a structured array works assert np.all((t == t2.as_array()) == np.array([0,1,0,1,0,1,0,1], dtype=bool)) @pytest.mark.xfail def test_equality_masked_bug(): """ This highlights a Numpy bug. Once it works, it can be moved into the test_equality_masked test. Related Numpy bug report: https://github.com/numpy/numpy/issues/3840 """ t = table.Table.read([' a b c d', ' 2 c 7.0 0', ' 2 b 5.0 1', ' 2 b 6.0 2', ' 2 a 4.0 3', ' 0 a 0.0 4', ' 1 b 3.0 5', ' 1 a 2.0 6', ' 1 a 1.0 7', ], format='ascii') t = table.Table(t, masked=True) t2 = table.Table.read([' a b c d', ' 2 c 7.0 0', ' 2 b 5.0 1', ' 3 b 6.0 2', ' 2 a 4.0 3', ' 0 a 1.0 4', ' 1 b 3.0 5', ' 1 c 2.0 6', ' 1 a 1.0 7', ], format='ascii') assert np.all((t.as_array() == t2) == np.array([0,1,0,1,0,1,0,1], dtype=bool)) # Check that the meta descriptor is working as expected. The MetaBaseTest class # takes care of defining all the tests, and we simply have to define the class # and any minimal set of args to pass. from ...utils.tests.test_metadata import MetaBaseTest class TestMetaTable(MetaBaseTest): test_class = table.Table args = () def test_unicode_column_names(table_types): """ Test that unicode column names are accepted. Only do this for Python 2 since strings are unicode already in Python 3. """ if six.PY2: t = table_types.Table([[1]], names=(six.text_type('a'),)) assert t.colnames == ['a'] t[six.text_type('b')] = 0.0 assert t.colnames == ['a', 'b'] def test_unicode_content(): # If we don't have unicode literals then return if isinstance('', bytes): return # Define unicode literals string_a = 'аÑтрономичеÑÐºÐ°Ñ Ð¿Ð¸Ñ‚Ð¾Ð½Ð°' string_b = 'миллиарды Ñветовых лет' a = table.Table( [[string_a, 2], [string_b, 3]], names=('a', 'b')) assert string_a in six.text_type(a) # This only works because the coding of this file is utf-8, which # matches the default encoding of Table.__str__ assert string_a.encode('utf-8') in bytes(a) def test_unicode_policy(): t = table.Table.read([' a b c d', ' 2 c 7.0 0', ' 2 b 5.0 1', ' 2 b 6.0 2', ' 2 a 4.0 3', ' 0 a 0.0 4', ' 1 b 3.0 5', ' 1 a 2.0 6', ' 1 a 1.0 7', ], format='ascii') assert_follows_unicode_guidelines(t) def test_unicode_bytestring_conversion(table_types): t = table_types.Table([['abc'], ['def'], [1]], dtype=('S', 'U', 'i')) assert t['col0'].dtype.kind == 'S' assert t['col1'].dtype.kind == 'U' assert t['col2'].dtype.kind == 'i' t1 = t.copy() t1.convert_unicode_to_bytestring() assert t1['col0'].dtype.kind == 'S' assert t1['col1'].dtype.kind == 'S' assert t1['col2'].dtype.kind == 'i' assert t1['col0'][0] == 'abc'.encode('ascii') assert t1['col1'][0] == 'def'.encode('ascii') assert t1['col2'][0] == 1 t1 = t.copy() t1.convert_bytestring_to_unicode() assert t1['col0'].dtype.kind == 'U' assert t1['col1'].dtype.kind == 'U' assert t1['col2'].dtype.kind == 'i' assert t1['col0'][0] == six.text_type('abc') assert t1['col1'][0] == six.text_type('def') assert t1['col2'][0] == 1 def test_table_deletion(): """ Regression test for the reference cycle discussed in https://github.com/astropy/astropy/issues/2877 """ deleted = set() # A special table subclass which leaves a record when it is finalized class TestTable(table.Table): def __del__(self): deleted.add(id(self)) t = TestTable({'a': [1, 2, 3]}) the_id = id(t) assert t['a'].parent_table is t del t # Cleanup gc.collect() assert the_id in deleted def test_nested_iteration(): """ Regression test for issue 3358 where nested iteration over a single table fails. """ t = table.Table([[0, 1]], names=['a']) out = [] for r1 in t: for r2 in t: out.append((r1['a'], r2['a'])) assert out == [(0, 0), (0, 1), (1, 0), (1, 1)] def test_table_init_from_degenerate_arrays(table_types): t = table_types.Table(np.array([])) assert len(t.columns) == 0 with pytest.raises(ValueError): t = table_types.Table(np.array(0)) t = table_types.Table(np.array([1, 2, 3])) assert len(t.columns) == 3 @pytest.mark.skipif('not HAS_PANDAS') class TestPandas(object): def test_simple(self): t = table.Table() for endian in ['<', '>']: for kind in ['f', 'i']: for byte in ['2','4','8']: dtype = np.dtype(endian + kind + byte) x = np.array([1,2,3], dtype=dtype) t[endian + kind + byte] = x t['u'] = ['a','b','c'] t['s'] = [b'a', b'b', b'c'] d = t.to_pandas() for column in t.columns: if column == 'u': assert np.all(t['u'] == np.array(['a','b','c'])) assert d[column].dtype == np.dtype("O") # upstream feature of pandas elif column == 's': assert np.all(t['s'] == np.array([b'a',b'b',b'c'])) assert d[column].dtype == np.dtype("O") # upstream feature of pandas else: # We should be able to compare exact values here assert np.all(t[column] == d[column]) if t[column].dtype.byteorder in ('=', '|'): assert d[column].dtype == t[column].dtype else: assert d[column].dtype == t[column].byteswap().newbyteorder().dtype # Regression test for astropy/astropy#1156 - the following code gave a # ValueError: Big-endian buffer not supported on little-endian # compiler. We now automatically swap the endian-ness to native order # upon adding the arrays to the data frame. d[['i4']] d[['f4']] t2 = table.Table.from_pandas(d) for column in t.columns: if column in ('u', 's'): assert np.all(t[column] == t2[column]) else: assert_allclose(t[column], t2[column]) if t[column].dtype.byteorder in ('=', '|'): assert t[column].dtype == t2[column].dtype else: assert t[column].byteswap().newbyteorder().dtype == t2[column].dtype def test_2d(self): t = table.Table() t['a'] = [1,2,3] t['b'] = np.ones((3,2)) with pytest.raises(ValueError) as exc: t.to_pandas() assert exc.value.args[0] == "Cannot convert a table with multi-dimensional columns to a pandas DataFrame" def test_mixin(self): from ...coordinates import SkyCoord t = table.Table() t['c'] = SkyCoord([1,2,3], [4,5,6], unit='deg') with pytest.raises(ValueError) as exc: t.to_pandas() assert exc.value.args[0] == "Cannot convert a table with mixin columns to a pandas DataFrame" def test_masking(self): t = table.Table(masked=True) t['a'] = [1, 2, 3] t['a'].mask = [True, False, True] t['b'] = [1., 2., 3.] t['b'].mask = [False, False, True] t['u'] = ['a','b','c'] t['u'].mask = [False, True, False] t['s'] = [b'a', b'b', b'c'] t['s'].mask = [False, True, False] d = t.to_pandas() t2 = table.Table.from_pandas(d) for name, column in t.columns.items(): assert np.all(column.data == t2[name].data) assert np.all(column.mask == t2[name].mask) # Masked integer type comes back as float. Nothing we can do about this. if column.dtype.kind == 'i': assert t2[name].dtype.kind == 'f' else: if column.dtype.byteorder in ('=', '|'): assert column.dtype == t2[name].dtype else: assert column.byteswap().newbyteorder().dtype == t2[name].dtype @pytest.mark.usefixtures('table_types') class TestReplaceColumn(SetupData): def test_fail_replace_column(self, table_types): """Raise exception when trying to replace column via table.columns object""" self._setup(table_types) t = table_types.Table([self.a, self.b]) with pytest.raises(ValueError): t.columns['a'] = [1, 2, 3] with pytest.raises(ValueError): t.replace_column('not there', [1, 2, 3]) def test_replace_column(self, table_types): """Replace existing column with a new column""" self._setup(table_types) t = table_types.Table([self.a, self.b]) ta = t['a'] tb = t['b'] vals = [1.2, 3.4, 5.6] for col in (vals, table_types.Column(vals), table_types.Column(vals, name='a'), table_types.Column(vals, name='b')): t.replace_column('a', col) assert np.all(t['a'] == vals) assert t['a'] is not ta # New a column assert t['b'] is tb # Original b column unchanged assert t.colnames == ['a', 'b'] assert t['a'].meta == {} assert t['a'].format is None def test_replace_index_column(self, table_types): """Replace index column and generate expected exception""" self._setup(table_types) t = table_types.Table([self.a, self.b]) t.add_index('a') with pytest.raises(ValueError) as err: t.replace_column('a', [1, 2, 3]) assert err.value.args[0] == 'cannot replace a table index column' astropy-1.1.1/astropy/table/tests/test_masked.py0000644001134200020070000004031712640262015022731 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS """Test behavior related to masked tables""" from distutils import version import numpy as np import numpy.ma as ma from ...tests.helper import pytest from ...table import Column, MaskedColumn, Table class SetupData(object): def setup_method(self, method): self.a = MaskedColumn(name='a', data=[1, 2, 3], fill_value=1) self.b = MaskedColumn(name='b', data=[4, 5, 6], mask=True) self.c = MaskedColumn(name='c', data=[7, 8, 9], mask=False) self.d_mask = np.array([False, True, False]) self.d = MaskedColumn(name='d', data=[7, 8, 7], mask=self.d_mask) self.t = Table([self.a, self.b], masked=True) self.ca = Column(name='ca', data=[1, 2, 3]) class TestPprint(SetupData): def test_pformat(self): assert self.t.pformat() == [' a b ', '--- ---', ' 1 --', ' 2 --', ' 3 --'] class TestFilled(object): """Test the filled method in MaskedColumn and Table""" def setup_method(self, method): mask = [True, False, False] self.meta = {'a': 1, 'b': [2, 3]} a = self.a = MaskedColumn(name='a', data=[1, 2, 3], fill_value=10, mask=mask, meta={'a': 1}) b = self.b = MaskedColumn(name='b', data=[4.0, 5.0, 6.0], fill_value=10.0, mask=mask) c = self.c = MaskedColumn(name='c', data=['7', '8', '9'], fill_value='1', mask=mask) def test_filled_column(self): f = self.a.filled() assert np.all(f == [10, 2, 3]) assert isinstance(f, Column) assert not isinstance(f, MaskedColumn) # Confirm copy, not ref assert f.meta['a'] == 1 f.meta['a'] = 2 f[1] = 100 assert self.a[1] == 2 assert self.a.meta['a'] == 1 # Fill with arg fill_value not column fill_value f = self.a.filled(20) assert np.all(f == [20, 2, 3]) f = self.b.filled() assert np.all(f == [10.0, 5.0, 6.0]) assert isinstance(f, Column) f = self.c.filled() assert np.all(f == ['1', '8', '9']) assert isinstance(f, Column) def test_filled_masked_table(self, tableclass): t = tableclass([self.a, self.b, self.c], meta=self.meta) f = t.filled() assert isinstance(f, Table) assert f.masked is False assert np.all(f['a'] == [10, 2, 3]) assert np.allclose(f['b'], [10.0, 5.0, 6.0]) assert np.all(f['c'] == ['1', '8', '9']) # Confirm copy, not ref assert f.meta['b'] == [2, 3] f.meta['b'][0] = 20 assert t.meta['b'] == [2, 3] f['a'][2] = 100 assert t['a'][2] == 3 def test_filled_unmasked_table(self, tableclass): t = tableclass([(1, 2), ('3', '4')], names=('a', 'b'), meta=self.meta) f = t.filled() assert isinstance(f, Table) assert f.masked is False assert np.all(f['a'] == t['a']) assert np.all(f['b'] == t['b']) # Confirm copy, not ref assert f.meta['b'] == [2, 3] f.meta['b'][0] = 20 assert t.meta['b'] == [2, 3] f['a'][1] = 100 assert t['a'][1] == 2 class TestFillValue(SetupData): """Test setting and getting fill value in MaskedColumn and Table""" def test_init_set_fill_value(self): """Check that setting fill_value in the MaskedColumn init works""" assert self.a.fill_value == 1 c = MaskedColumn(name='c', data=['xxxx', 'yyyy'], fill_value='none') assert c.fill_value == 'none' def test_set_get_fill_value_for_bare_column(self): """Check set and get of fill value works for bare Column""" self.d.fill_value = -999 assert self.d.fill_value == -999 assert np.all(self.d.filled() == [7, -999, 7]) def test_set_get_fill_value_for_str_column(self): c = MaskedColumn(name='c', data=['xxxx', 'yyyy'], mask=[True, False]) # assert np.all(c.filled() == ['N/A', 'yyyy']) c.fill_value = 'ABCDEF' assert c.fill_value == 'ABCD' # string truncated to dtype length assert np.all(c.filled() == ['ABCD', 'yyyy']) assert np.all(c.filled('XY') == ['XY', 'yyyy']) def test_table_column_mask_not_ref(self): """Table column mask is not ref of original column mask""" self.b.fill_value = -999 assert self.t['b'].fill_value != -999 def test_set_get_fill_value_for_table_column(self): """Check set and get of fill value works for Column in a Table""" self.t['b'].fill_value = 1 assert self.t['b'].fill_value == 1 assert np.all(self.t['b'].filled() == [1, 1, 1]) def test_data_attribute_fill_and_mask(self): """Check that .data attribute preserves fill_value and mask""" self.t['b'].fill_value = 1 self.t['b'].mask = [True, False, True] assert self.t['b'].data.fill_value == 1 assert np.all(self.t['b'].data.mask == [True, False, True]) class TestMaskedColumnInit(SetupData): """Initialization of a masked column""" def test_set_mask_and_not_ref(self): """Check that mask gets set properly and that it is a copy, not ref""" assert np.all(~self.a.mask) assert np.all(self.b.mask) assert np.all(~self.c.mask) assert np.all(self.d.mask == self.d_mask) self.d.mask[0] = True assert not np.all(self.d.mask == self.d_mask) def test_set_mask_from_list(self): """Set mask from a list""" mask_list = [False, True, False] a = MaskedColumn(name='a', data=[1, 2, 3], mask=mask_list) assert np.all(a.mask == mask_list) def test_override_existing_mask(self): """Override existing mask values""" mask_list = [False, True, False] b = MaskedColumn(name='b', data=self.b, mask=mask_list) assert np.all(b.mask == mask_list) def test_incomplete_mask_spec(self): """Incomplete mask specification raises MaskError""" mask_list = [False, True] with pytest.raises(ma.MaskError): MaskedColumn(name='b', length=4, mask=mask_list) class TestTableInit(SetupData): """Initializing a table""" def test_mask_true_if_any_input_masked(self): """Masking is True if any input is masked""" t = Table([self.ca, self.a]) assert t.masked is True t = Table([self.ca]) assert t.masked is False t = Table([self.ca, ma.array([1, 2, 3])]) assert t.masked is True def test_mask_false_if_no_input_masked(self): """Masking not true if not (requested or input requires mask)""" t0 = Table([[3,4]], masked=False) t1 = Table(t0, masked=True) t2 = Table(t1, masked=False) assert not t0.masked assert t1.masked assert not t2.masked def test_mask_property(self): t = self.t # Access table mask (boolean structured array) by column name assert np.all(t.mask['a'] == np.array([False, False, False])) assert np.all(t.mask['b'] == np.array([True, True, True])) # Check that setting mask from table mask has the desired effect on column t.mask['b'] = np.array([False, True, False]) assert np.all(t['b'].mask == np.array([False, True, False])) # Non-masked table returns None for mask attribute t2 = Table([self.ca], masked=False) assert t2.mask is None # Set mask property globally and verify local correctness for mask in (True, False): t.mask = mask for name in ('a', 'b'): assert np.all(t[name].mask == mask) class TestAddColumn(object): def test_add_masked_column_to_masked_table(self): t = Table(masked=True) assert t.masked t.add_column(MaskedColumn(name='a', data=[1, 2, 3], mask=[0, 1, 0])) assert t.masked t.add_column(MaskedColumn(name='b', data=[4, 5, 6], mask=[1, 0, 1])) assert t.masked assert np.all(t['a'] == np.array([1, 2, 3])) assert np.all(t['a'].mask == np.array([0, 1, 0], bool)) assert np.all(t['b'] == np.array([4, 5, 6])) assert np.all(t['b'].mask == np.array([1, 0, 1], bool)) def test_add_masked_column_to_non_masked_table(self): t = Table(masked=False) assert not t.masked t.add_column(Column(name='a', data=[1, 2, 3])) assert not t.masked t.add_column(MaskedColumn(name='b', data=[4, 5, 6], mask=[1, 0, 1])) assert t.masked assert np.all(t['a'] == np.array([1, 2, 3])) assert np.all(t['a'].mask == np.array([0, 0, 0], bool)) assert np.all(t['b'] == np.array([4, 5, 6])) assert np.all(t['b'].mask == np.array([1, 0, 1], bool)) def test_add_non_masked_column_to_masked_table(self): t = Table(masked=True) assert t.masked t.add_column(Column(name='a', data=[1, 2, 3])) assert t.masked t.add_column(MaskedColumn(name='b', data=[4, 5, 6], mask=[1, 0, 1])) assert t.masked assert np.all(t['a'] == np.array([1, 2, 3])) assert np.all(t['a'].mask == np.array([0, 0, 0], bool)) assert np.all(t['b'] == np.array([4, 5, 6])) assert np.all(t['b'].mask == np.array([1, 0, 1], bool)) def test_convert_to_masked_table_only_if_necessary(self): # Do not convert to masked table, if new column has no masked value. # See #1185 for details. t = Table(masked=False) assert not t.masked t.add_column(Column(name='a', data=[1, 2, 3])) assert not t.masked t.add_column(MaskedColumn(name='b', data=[4, 5, 6], mask=[0, 0, 0])) assert not t.masked assert np.all(t['a'] == np.array([1, 2, 3])) assert np.all(t['b'] == np.array([4, 5, 6])) class TestRenameColumn(object): def test_rename_masked_column(self): t = Table(masked=True) t.add_column(MaskedColumn(name='a', data=[1,2,3], mask=[0,1,0])) t['a'].fill_value = 42 t.rename_column('a', 'b') assert t.masked assert np.all(t['b'] == np.array([1,2,3])) assert np.all(t['b'].mask == np.array([0,1,0], bool)) assert t['b'].fill_value == 42 assert t.colnames == ['b'] class TestRemoveColumn(object): def test_remove_masked_column(self): t = Table(masked=True) t.add_column(MaskedColumn(name='a', data=[1,2,3], mask=[0,1,0])) t['a'].fill_value = 42 t.add_column(MaskedColumn(name='b', data=[4,5,6], mask=[1,0,1])) t.remove_column('b') assert t.masked assert np.all(t['a'] == np.array([1,2,3])) assert np.all(t['a'].mask == np.array([0,1,0], bool)) assert t['a'].fill_value == 42 assert t.colnames == ['a'] class TestAddRow(object): def test_add_masked_row_to_masked_table_iterable(self): t = Table(masked=True) t.add_column(MaskedColumn(name='a', data=[1], mask=[0])) t.add_column(MaskedColumn(name='b', data=[4], mask=[1])) t.add_row([2, 5], mask=[1, 0]) t.add_row([3, 6], mask=[0, 1]) assert t.masked assert np.all(np.array(t['a']) == np.array([1, 2, 3])) assert np.all(t['a'].mask == np.array([0, 1, 0], bool)) assert np.all(np.array(t['b']) == np.array([4, 5, 6])) assert np.all(t['b'].mask == np.array([1, 0, 1], bool)) def test_add_masked_row_to_masked_table_mapping1(self): t = Table(masked=True) t.add_column(MaskedColumn(name='a', data=[1], mask=[0])) t.add_column(MaskedColumn(name='b', data=[4], mask=[1])) t.add_row({'b': 5, 'a': 2}, mask={'a': 1, 'b': 0}) t.add_row({'a': 3, 'b': 6}, mask={'b': 1, 'a': 0}) assert t.masked assert np.all(np.array(t['a']) == np.array([1, 2, 3])) assert np.all(t['a'].mask == np.array([0, 1, 0], bool)) assert np.all(np.array(t['b']) == np.array([4, 5, 6])) assert np.all(t['b'].mask == np.array([1, 0, 1], bool)) def test_add_masked_row_to_masked_table_mapping2(self): # When adding values to a masked table, if the mask is specified as a # dict, then values not specified will have mask values set to True t = Table(masked=True) t.add_column(MaskedColumn(name='a', data=[1], mask=[0])) t.add_column(MaskedColumn(name='b', data=[4], mask=[1])) t.add_row({'b': 5}, mask={'b': 0}) t.add_row({'a': 3}, mask={'a': 0}) assert t.masked assert t['a'][0] == 1 and t['a'][2] == 3 assert np.all(t['a'].mask == np.array([0, 1, 0], bool)) assert t['b'][1] == 5 assert np.all(t['b'].mask == np.array([1, 0, 1], bool)) def test_add_masked_row_to_masked_table_mapping3(self): # When adding values to a masked table, if mask is not passed to # add_row, then the mask should be set to False if values are present # and True if not. t = Table(masked=True) t.add_column(MaskedColumn(name='a', data=[1], mask=[0])) t.add_column(MaskedColumn(name='b', data=[4], mask=[1])) t.add_row({'b': 5}) t.add_row({'a': 3}) assert t.masked assert t['a'][0] == 1 and t['a'][2] == 3 assert np.all(t['a'].mask == np.array([0, 1, 0], bool)) assert t['b'][1] == 5 assert np.all(t['b'].mask == np.array([1, 0, 1], bool)) def test_add_masked_row_to_masked_table_mapping4(self): # When adding values to a masked table, if the mask is specified as a # dict, then keys in values should match keys in mask t = Table(masked=True) t.add_column(MaskedColumn(name='a', data=[1], mask=[0])) t.add_column(MaskedColumn(name='b', data=[4], mask=[1])) with pytest.raises(ValueError) as exc: t.add_row({'b': 5}, mask={'a': True}) assert exc.value.args[0] == 'keys in mask should match keys in vals' def test_add_masked_row_to_masked_table_mismatch(self): t = Table(masked=True) t.add_column(MaskedColumn(name='a', data=[1], mask=[0])) t.add_column(MaskedColumn(name='b', data=[4], mask=[1])) with pytest.raises(TypeError) as exc: t.add_row([2, 5], mask={'a': 1, 'b': 0}) assert exc.value.args[0] == "Mismatch between type of vals and mask" with pytest.raises(TypeError) as exc: t.add_row({'b': 5, 'a': 2}, mask=[1, 0]) assert exc.value.args[0] == "Mismatch between type of vals and mask" def test_add_masked_row_to_non_masked_table_iterable(self): t = Table(masked=False) t.add_column(Column(name='a', data=[1])) t.add_column(Column(name='b', data=[4])) assert not t.masked t.add_row([2, 5]) assert not t.masked t.add_row([3, 6], mask=[0, 1]) assert t.masked assert np.all(np.array(t['a']) == np.array([1, 2, 3])) assert np.all(t['a'].mask == np.array([0, 0, 0], bool)) assert np.all(np.array(t['b']) == np.array([4, 5, 6])) assert np.all(t['b'].mask == np.array([0, 0, 1], bool)) def test_setting_from_masked_column(): """Test issue in #2997""" mask_b = np.array([True, True, False, False]) for select in (mask_b, slice(0, 2)): t = Table(masked=True) t['a'] = Column([1, 2, 3, 4]) t['b'] = MaskedColumn([11, 22, 33, 44], mask=mask_b) t['c'] = MaskedColumn([111, 222, 333, 444], mask=[True, False, True, False]) t['b'][select] = t['c'][select] assert t['b'][1] == t[1]['b'] assert t['b'][0] is np.ma.masked # Original state since t['c'][0] is masked assert t['b'][1] == 222 # New from t['c'] since t['c'][1] is unmasked assert t['b'][2] == 33 assert t['b'][3] == 44 assert np.all(t['b'].mask == t.mask['b']) # Avoid t.mask in general, this is for testing mask_before_add = t.mask.copy() t['d'] = np.arange(len(t)) assert np.all(t.mask['b'] == mask_before_add['b']) def test_coercing_fill_value_type(): """ Test that masked column fill_value is coerced into the correct column type. """ # This is the original example posted on the astropy@scipy mailing list t = Table({'a': ['1']}, masked=True) t['a'].set_fill_value('0') t2 = Table(t, names=['a'], dtype=[np.int32]) assert isinstance(t2['a'].fill_value, np.int32) # Unit test the same thing. c = MaskedColumn(['1']) c.set_fill_value('0') c2 = MaskedColumn(c, dtype=np.int32) assert isinstance(c2.fill_value, np.int32) astropy-1.1.1/astropy/table/tests/test_pprint.py0000644001134200020070000006403712644017723023016 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS import numpy as np from ...tests.helper import pytest from ... import table from ...table import Table from ...table.table_helpers import simple_table from ...extern.six import PY3 from ...utils import console BIG_WIDE_ARR = np.arange(2000, dtype=np.float64).reshape(100, 20) SMALL_ARR = np.arange(18, dtype=np.int64).reshape(6, 3) @pytest.mark.usefixtures('table_type') class TestMultiD(): def test_multidim(self, table_type): """Test printing with multidimensional column""" arr = [np.array([[1, 2], [10, 20]], dtype=np.int64), np.array([[3, 4], [30, 40]], dtype=np.int64), np.array([[5, 6], [50, 60]], dtype=np.int64)] t = table_type(arr) lines = t.pformat() assert lines == ['col0 [2] col1 [2] col2 [2]', '-------- -------- --------', ' 1 .. 2 3 .. 4 5 .. 6', '10 .. 20 30 .. 40 50 .. 60'] lines = t.pformat(html=True) assert lines == ['
'.format(id=id(t)), '', '', '', '
col0 [2]col1 [2]col2 [2]
1 .. 23 .. 45 .. 6
10 .. 2030 .. 4050 .. 60
'] assert t._repr_html_().splitlines() == [ '<{0} masked={1} length=2>'.format(table_type.__name__, t.masked), ''.format(tid=id(t)), '', '', '', '', '
col0 [2]col1 [2]col2 [2]
int64int64int64
1 .. 23 .. 45 .. 6
10 .. 2030 .. 4050 .. 60
'] t = table_type([arr]) lines = t.pformat() assert lines == ['col0 [2,2]', '----------', ' 1 .. 20', ' 3 .. 40', ' 5 .. 60'] def test_fake_multidim(self, table_type): """Test printing with 'fake' multidimensional column""" arr = [np.array([[(1,)], [(10,)]], dtype=np.int64), np.array([[(3,)], [(30,)]], dtype=np.int64), np.array([[(5,)], [(50,)]], dtype=np.int64)] t = table_type(arr) lines = t.pformat() assert lines == ['col0 [1,1] col1 [1,1] col2 [1,1]', '---------- ---------- ----------', ' 1 3 5', ' 10 30 50'] lines = t.pformat(html=True) assert lines == [''.format(id=id(t)), '', '', '', '
col0 [1,1]col1 [1,1]col2 [1,1]
135
103050
'] assert t._repr_html_().splitlines() == [ '<{0} masked={1} length=2>'.format(table_type.__name__, t.masked), ''.format(id=id(t)), '', '', '', u'', '
col0 [1,1]col1 [1,1]col2 [1,1]
int64int64int64
135
103050
'] t = table_type([arr]) lines = t.pformat() assert lines == ['col0 [2,1,1]', '------------', ' 1 .. 10', ' 3 .. 30', ' 5 .. 50'] def test_html_escaping(): t = table.Table([(str(''), 2, 3)]) assert t._repr_html_().splitlines() == [ '<Table length=3>', ''.format(id=id(t)), '', '', '', '', '', '
col0
str33
<script>alert("gotcha");</script>
2
3
'] @pytest.mark.usefixtures('table_type') class TestPprint(): def _setup(self, table_type): self.tb = table_type(BIG_WIDE_ARR) self.tb['col0'].format = 'e' self.tb['col1'].format = '.6f' self.tb['col0'].unit = 'km**2' self.tb['col19'].unit = 'kg s m**-2' self.ts = table_type(SMALL_ARR) def test_empty_table(self, table_type): t = table_type() lines = t.pformat() assert lines == [''] c = repr(t) assert c.splitlines() == ['<{0} masked={1} length=0>'.format(table_type.__name__, t.masked), ''] def test_format0(self, table_type): """Try getting screen size but fail to defaults because testing doesn't have access to screen (fcntl.ioctl fails). """ self._setup(table_type) arr = np.arange(4000, dtype=np.float64).reshape(100, 40) lines = table_type(arr).pformat() nlines, width = console.terminal_size() assert len(lines) == nlines for line in lines[:-1]: # skip last "Length = .. rows" line assert (len(line) > width - 10 and len(line) <= width) def test_format1(self, table_type): """Basic test of formatting, unit header row included""" self._setup(table_type) lines = self.tb.pformat(max_lines=8, max_width=40) assert lines == [' col0 col1 ... col19 ', ' km2 ... kg s / m2', '------------ ----------- ... ---------', '0.000000e+00 1.000000 ... 19.0', ' ... ... ... ...', '1.960000e+03 1961.000000 ... 1979.0', '1.980000e+03 1981.000000 ... 1999.0', 'Length = 100 rows'] def test_format2(self, table_type): """Basic test of formatting, unit header row excluded""" self._setup(table_type) lines = self.tb.pformat(max_lines=8, max_width=40, show_unit=False) assert lines == [' col0 col1 ... col19 ', '------------ ----------- ... ------', '0.000000e+00 1.000000 ... 19.0', '2.000000e+01 21.000000 ... 39.0', ' ... ... ... ...', '1.960000e+03 1961.000000 ... 1979.0', '1.980000e+03 1981.000000 ... 1999.0', 'Length = 100 rows'] def test_format3(self, table_type): """Include the unit header row""" self._setup(table_type) lines = self.tb.pformat(max_lines=8, max_width=40, show_unit=True) assert lines == [' col0 col1 ... col19 ', ' km2 ... kg s / m2', '------------ ----------- ... ---------', '0.000000e+00 1.000000 ... 19.0', ' ... ... ... ...', '1.960000e+03 1961.000000 ... 1979.0', '1.980000e+03 1981.000000 ... 1999.0', 'Length = 100 rows'] def test_format4(self, table_type): """Do not include the name header row""" self._setup(table_type) lines = self.tb.pformat(max_lines=8, max_width=40, show_name=False) assert lines == [' km2 ... kg s / m2', '------------ ----------- ... ---------', '0.000000e+00 1.000000 ... 19.0', '2.000000e+01 21.000000 ... 39.0', ' ... ... ... ...', '1.960000e+03 1961.000000 ... 1979.0', '1.980000e+03 1981.000000 ... 1999.0', 'Length = 100 rows'] def test_noclip(self, table_type): """Basic table print""" self._setup(table_type) lines = self.ts.pformat(max_lines=-1, max_width=-1) assert lines == ['col0 col1 col2', '---- ---- ----', ' 0 1 2', ' 3 4 5', ' 6 7 8', ' 9 10 11', ' 12 13 14', ' 15 16 17'] def test_clip1(self, table_type): """max lines below hard limit of 8 """ self._setup(table_type) lines = self.ts.pformat(max_lines=3, max_width=-1) assert lines == ['col0 col1 col2', '---- ---- ----', ' 0 1 2', ' 3 4 5', ' 6 7 8', ' 9 10 11', ' 12 13 14', ' 15 16 17'] def test_clip2(self, table_type): """max lines below hard limit of 8 and output longer than 8 """ self._setup(table_type) lines = self.ts.pformat(max_lines=3, max_width=-1, show_unit=True, show_dtype=True) assert lines == [' col0 col1 col2', ' ', 'int64 int64 int64', '----- ----- -----', ' 0 1 2', ' ... ... ...', ' 15 16 17', 'Length = 6 rows'] def test_clip3(self, table_type): """Max lines below hard limit of 8 and max width below hard limit of 10 """ self._setup(table_type) lines = self.ts.pformat(max_lines=3, max_width=1, show_unit=True) assert lines == ['col0 ...', ' ...', '---- ...', ' 0 ...', ' ... ...', ' 12 ...', ' 15 ...', 'Length = 6 rows'] def test_clip4(self, table_type): """Test a range of max_lines""" self._setup(table_type) for max_lines in (0, 1, 4, 5, 6, 7, 8, 100, 101, 102, 103, 104, 130): lines = self.tb.pformat(max_lines=max_lines, show_unit=False) assert len(lines) == max(8, min(102, max_lines)) @pytest.mark.usefixtures('table_type') class TestFormat(): def test_column_format(self, table_type): t = table_type([[1, 2], [3, 4]], names=('a', 'b')) # default (format=None) assert str(t['a']) == ' a \n---\n 1\n 2' # just a plain format string t['a'].format = '5.2f' assert str(t['a']) == ' a \n-----\n 1.00\n 2.00' # Old-style that is almost new-style t['a'].format = '{ %4.2f }' assert str(t['a']) == ' a \n--------\n{ 1.00 }\n{ 2.00 }' # New-style that is almost old-style t['a'].format = '%{0:}' assert str(t['a']) == ' a \n---\n %1\n %2' # New-style with extra spaces t['a'].format = ' {0:05d} ' assert str(t['a']) == ' a \n-------\n 00001 \n 00002 ' # New-style has precedence t['a'].format = '%4.2f {0:}' assert str(t['a']) == ' a \n-------\n%4.2f 1\n%4.2f 2' # Invalid format spec t['a'].format = 'fail' with pytest.raises(ValueError): str(t['a']) def test_column_format_with_threshold(self, table_type): from ... import conf with conf.set_temp('max_lines', 8): t = table_type([np.arange(20)], names=['a']) t['a'].format = '%{0:}' assert str(t['a']).splitlines() == [' a ', '---', ' %0', ' %1', '...', '%18', '%19', 'Length = 20 rows'] t['a'].format = '{ %4.2f }' assert str(t['a']).splitlines() == [' a ', '---------', ' { 0.00 }', ' { 1.00 }', ' ...', '{ 18.00 }', '{ 19.00 }', 'Length = 20 rows'] def test_column_format_func(self, table_type): # run most of functions twice # 1) astropy.table.pprint._format_funcs gets populated # 2) astropy.table.pprint._format_funcs gets used t = table_type([[1., 2.], [3, 4]], names=('a', 'b')) # mathematical function t['a'].format = lambda x: str(x * 3.) assert str(t['a']) == ' a \n---\n3.0\n6.0' assert str(t['a']) == ' a \n---\n3.0\n6.0' def test_column_format_callable(self, table_type): # run most of functions twice # 1) astropy.table.pprint._format_funcs gets populated # 2) astropy.table.pprint._format_funcs gets used t = table_type([[1., 2.], [3, 4]], names=('a', 'b')) # mathematical function class format(object): def __call__(self, x): return str(x * 3.) t['a'].format = format() assert str(t['a']) == ' a \n---\n3.0\n6.0' assert str(t['a']) == ' a \n---\n3.0\n6.0' def test_column_format_func_wrong_number_args(self, table_type): t = table_type([[1., 2.], [3, 4]], names=('a', 'b')) # function that expects wrong number of arguments def func(a, b): pass t['a'].format = func with pytest.raises(ValueError): str(t['a']) def test_column_format_func_multiD(self, table_type): arr = [np.array([[1, 2], [10, 20]])] t = table_type(arr, names=['a']) # mathematical function t['a'].format = lambda x: str(x * 3.) outstr = ' a [2] \n------------\n 3.0 .. 6.0\n30.0 .. 60.0' assert str(t['a']) == outstr assert str(t['a']) == outstr def test_column_format_func_not_str(self, table_type): t = table_type([[1., 2.], [3, 4]], names=('a', 'b')) # mathematical function t['a'].format = lambda x: x * 3 with pytest.raises(ValueError): str(t['a']) def test_column_alignment(self, table_type): t = table_type([[1], [2], [3], [4]], names=('long title a', 'long title b', 'long title c', 'long title d')) t['long title a'].format = '<' t['long title b'].format = '^' t['long title c'].format = '>' t['long title d'].format = '0=' assert str(t['long title a']) == 'long title a\n------------\n1 ' assert str(t['long title b']) == 'long title b\n------------\n 2 ' assert str(t['long title c']) == 'long title c\n------------\n 3' assert str(t['long title d']) == 'long title d\n------------\n000000000004' class TestFormatWithMaskedElements(): def test_column_format(self): t = Table([[1, 2, 3], [3, 4, 5]], names=('a', 'b'), masked=True) t['a'].mask = [True, False, True] # default (format=None) assert str(t['a']) == ' a \n---\n --\n 2\n --' # just a plain format string t['a'].format = '5.2f' assert str(t['a']) == ' a \n-----\n --\n 2.00\n --' # Old-style that is almost new-style t['a'].format = '{ %4.2f }' assert str(t['a']) == ' a \n--------\n --\n{ 2.00 }\n --' # New-style that is almost old-style t['a'].format = '%{0:}' assert str(t['a']) == ' a \n---\n --\n %2\n --' # New-style with extra spaces t['a'].format = ' {0:05d} ' assert str(t['a']) == ' a \n-------\n --\n 00002 \n --' # New-style has precedence t['a'].format = '%4.2f {0:}' assert str(t['a']) == ' a \n-------\n --\n%4.2f 2\n --' def test_column_format_with_threshold(self, table_type): from ... import conf with conf.set_temp('max_lines', 8): t = table_type([np.arange(20)], names=['a']) t['a'].format = '%{0:}' t['a'].mask[0] = True t['a'].mask[-1] = True assert str(t['a']).splitlines() == [' a ', '---', ' --', ' %1', '...', '%18', ' --', 'Length = 20 rows'] t['a'].format = '{ %4.2f }' assert str(t['a']).splitlines() == [' a ', '---------', ' --', ' { 1.00 }', ' ...', '{ 18.00 }', ' --', 'Length = 20 rows'] def test_column_format_func(self): # run most of functions twice # 1) astropy.table.pprint._format_funcs gets populated # 2) astropy.table.pprint._format_funcs gets used t = Table([[1., 2., 3.], [3, 4, 5]], names=('a', 'b'), masked=True) t['a'].mask = [True, False, True] # mathematical function t['a'].format = lambda x: str(x * 3.) assert str(t['a']) == ' a \n---\n --\n6.0\n --' assert str(t['a']) == ' a \n---\n --\n6.0\n --' def test_column_format_func_with_special_masked(self): # run most of functions twice # 1) astropy.table.pprint._format_funcs gets populated # 2) astropy.table.pprint._format_funcs gets used t = Table([[1., 2., 3.], [3, 4, 5]], names=('a', 'b'), masked=True) t['a'].mask = [True, False, True] # mathematical function def format_func(x): if x is np.ma.masked: return '!!' else: return str(x * 3.) t['a'].format = format_func assert str(t['a']) == ' a \n---\n !!\n6.0\n !!' assert str(t['a']) == ' a \n---\n !!\n6.0\n !!' def test_column_format_callable(self): # run most of functions twice # 1) astropy.table.pprint._format_funcs gets populated # 2) astropy.table.pprint._format_funcs gets used t = Table([[1., 2., 3.], [3, 4, 5]], names=('a', 'b'), masked=True) t['a'].mask = [True, False, True] # mathematical function class format(object): def __call__(self, x): return str(x * 3.) t['a'].format = format() assert str(t['a']) == ' a \n---\n --\n6.0\n --' assert str(t['a']) == ' a \n---\n --\n6.0\n --' def test_column_format_func_wrong_number_args(self): t = Table([[1., 2.], [3, 4]], names=('a', 'b'), masked=True) t['a'].mask = [True, False] # function that expects wrong number of arguments def func(a, b): pass t['a'].format = func with pytest.raises(ValueError): str(t['a']) # but if all are masked, it never gets called t['a'].mask = [True, True] assert str(t['a']) == ' a \n---\n --\n --' def test_column_format_func_multiD(self): arr = [np.array([[1, 2], [10, 20]])] t = Table(arr, names=['a'], masked=True) t['a'].mask[0, 1] = True t['a'].mask[1, 1] = True # mathematical function t['a'].format = lambda x: str(x * 3.) outstr = ' a [2] \n----------\n 3.0 .. --\n30.0 .. --' assert str(t['a']) == outstr assert str(t['a']) == outstr def test_pprint_npfloat32(): """ Test for #148, that np.float32 cannot by itself be formatted as float, but has to be converted to a python float. """ dat = np.array([1., 2.], dtype=np.float32) t = Table([dat], names=['a']) t['a'].format = '5.2f' assert str(t['a']) == ' a \n-----\n 1.00\n 2.00' def test_pprint_py3_bytes(): """ Test for #1346. Make sure a bytestring (dtype=S) in Python 3 is printed correctly (without the "b" prefix like b'string'). """ val = bytes('val', encoding='utf-8') if PY3 else 'val' dat = np.array([(val,)], dtype=[(str('col'), 'S3')]) t = table.Table(dat) assert t['col'].pformat() == ['col', '---', 'val'] def test_pprint_nameless_col(): """Regression test for #2213, making sure a nameless column can be printed using None as the name. """ col = table.Column([1., 2.]) assert str(col).startswith('None') def test_html(): """Test HTML printing""" dat = np.array([1., 2.], dtype=np.float32) t = Table([dat], names=['a']) lines = t.pformat(html=True) assert lines == [''.format(id=id(t)), u'', u'', u'', u'
a
1.0
2.0
'] lines = t.pformat(html=True, tableclass='table-striped') assert lines == [ ''.format(id=id(t)), u'', u'', u'', u'
a
1.0
2.0
'] lines = t.pformat(html=True, tableclass=['table', 'table-striped']) assert lines == [ ''.format(id=id(t)), u'', u'', u'', u'
a
1.0
2.0
'] def test_align(): t = simple_table(2, kinds='iS') assert t.pformat() == [' a b ', '--- ---', ' 1 b', ' 2 c'] # Use column format attribute t['a'].format = '<' assert t.pformat() == [' a b ', '--- ---', '1 b', '2 c'] # Now override column format attribute with various combinations of align tpf = [' a b ', '--- ---', ' 1 b ', ' 2 c '] for align in ('^', ['^', '^'], ('^', '^')): assert tpf == t.pformat(align=align) assert t.pformat(align='<') == [' a b ', '--- ---', '1 b ', '2 c '] assert t.pformat(align='0=') == [' a b ', '--- ---', '001 00b', '002 00c'] assert t.pformat(align=['<', '^']) == [' a b ', '--- ---', '1 b ', '2 c '] # Now use fill characters. Stress the system using a fill # character that is the same as an align character. t = simple_table(2, kinds='iS') assert t.pformat(align='^^') == [' a b ', '--- ---', '^1^ ^b^', '^2^ ^c^'] assert t.pformat(align='^>') == [' a b ', '--- ---', '^^1 ^^b', '^^2 ^^c'] assert t.pformat(align='^<') == [' a b ', '--- ---', '1^^ b^^', '2^^ c^^'] # Complicated interaction (same as narrative docs example) t1 = Table([[1.0, 2.0], [1, 2]], names=['column1', 'column2']) t1['column1'].format = '#^.2f' assert t1.pformat() == ['column1 column2', '------- -------', '##1.00# 1', '##2.00# 2'] assert t1.pformat(align='!<') == ['column1 column2', '------- -------', '1.00!!! 1!!!!!!', '2.00!!! 2!!!!!!'] assert t1.pformat(align=[None, '!<']) == ['column1 column2', '------- -------', '##1.00# 1!!!!!!', '##2.00# 2!!!!!!'] # Zero fill t['a'].format = '+d' assert t.pformat(align='0=') == [' a b ', '--- ---', '+01 00b', '+02 00c'] with pytest.raises(ValueError): t.pformat(align=['fail']) with pytest.raises(TypeError): t.pformat(align=0) with pytest.raises(TypeError): t.pprint(align=0) # Make sure pprint() does not raise an exception t.pprint() with pytest.raises(ValueError): t.pprint(align=['<', '<', '<']) with pytest.raises(ValueError): t.pprint(align='x=') astropy-1.1.1/astropy/table/tests/test_row.py0000644001134200020070000002101412644017723022275 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS import sys import numpy as np from ...tests.helper import pytest, catch_warnings from ... import table from ...table import Row from ...utils.compat import NUMPY_LT_1_8 from ...utils.exceptions import AstropyDeprecationWarning from .conftest import MaskedTable def test_masked_row_with_object_col(): """ Numpy < 1.8 has a bug in masked array that prevents access a row if there is a column with object type. """ t = table.Table([[1]], dtype=['O'], masked=True) if NUMPY_LT_1_8: with pytest.raises(ValueError): t['col0'].mask = False t[0].as_void() with pytest.raises(ValueError): t['col0'].mask = True t[0].as_void() else: t['col0'].mask = False assert t[0]['col0'] == 1 t['col0'].mask = True assert t[0]['col0'] is np.ma.masked @pytest.mark.usefixtures('table_types') class TestRow(): def _setup(self, table_types): self._table_type = table_types.Table self._column_type = table_types.Column @property def t(self): # py.test wants to run this method once before table_types is run # to set Table and Column. In this case just return None, which would # cause any downstream test to fail if this happened in any other context. if self._column_type is None: return None if not hasattr(self, '_t'): a = self._column_type(name='a', data=[1, 2, 3], dtype='i8') b = self._column_type(name='b', data=[4, 5, 6], dtype='i8') self._t = self._table_type([a, b]) return self._t def test_subclass(self, table_types): """Row is subclass of ndarray and Row""" self._setup(table_types) c = Row(self.t, 2) assert isinstance(c, Row) def test_values(self, table_types): """Row accurately reflects table values and attributes""" self._setup(table_types) table = self.t row = table[1] assert row['a'] == 2 assert row['b'] == 5 assert row[0] == 2 assert row[1] == 5 assert row.meta is table.meta assert row.colnames == table.colnames assert row.columns is table.columns with pytest.raises(IndexError): row[2] if sys.byteorder == 'little': assert str(row.dtype) == "[('a', 'i8'), ('b', '>i8')]" def test_ref(self, table_types): """Row is a reference into original table data""" self._setup(table_types) table = self.t row = table[1] row['a'] = 10 if table_types.Table is not MaskedTable: assert table['a'][1] == 10 def test_left_equal(self, table_types): """Compare a table row to the corresponding structured array row""" self._setup(table_types) np_t = self.t.as_array() if table_types.Table is MaskedTable: with pytest.raises(ValueError): self.t[0] == np_t[0] else: for row, np_row in zip(self.t, np_t): assert np.all(row == np_row) def test_left_not_equal(self, table_types): """Compare a table row to the corresponding structured array row""" self._setup(table_types) np_t = self.t.as_array() np_t['a'] = [0, 0, 0] if table_types.Table is MaskedTable: with pytest.raises(ValueError): self.t[0] == np_t[0] else: for row, np_row in zip(self.t, np_t): assert np.all(row != np_row) def test_right_equal(self, table_types): """Test right equal""" self._setup(table_types) np_t = self.t.as_array() if table_types.Table is MaskedTable: with pytest.raises(ValueError): self.t[0] == np_t[0] else: for row, np_row in zip(self.t, np_t): assert np.all(np_row == row) def test_convert_numpy_array(self, table_types): self._setup(table_types) d = self.t[1] np_data = np.array(d) if table_types.Table is not MaskedTable: assert np.all(np_data == d.as_void()) assert not np_data is d.as_void() assert d.colnames == list(np_data.dtype.names) np_data = np.array(d, copy=False) if table_types.Table is not MaskedTable: assert np.all(np_data == d.as_void()) assert not np_data is d.as_void() assert d.colnames == list(np_data.dtype.names) with pytest.raises(ValueError): np_data = np.array(d, dtype=[(str('c'), 'i8'), (str('d'), 'i8')]) def test_format_row(self, table_types): """Test formatting row""" self._setup(table_types) table = self.t row = table[0] assert repr(row).splitlines() == ['<{0} {1}{2}>' .format(row.__class__.__name__, 'index=0', ' masked=True' if table.masked else ''), ' a b ', 'int64 int64', '----- -----', ' 1 4'] assert str(row).splitlines() == [' a b ', '--- ---', ' 1 4'] assert row._repr_html_().splitlines() == ['<{0} {1}{2}>' .format(row.__class__.__name__, 'index=0', ' masked=True' if table.masked else ''), ''.format(id(table)), '', '', '', '
ab
int64int64
14
'] def test_data_and_as_void(self, table_types): """Test the deprecated data property and as_void() method""" self._setup(table_types) table = self.t row = table[0] # row.data is now deprecated because it is slow, generic and abusable with catch_warnings(AstropyDeprecationWarning) as warning_lines: row_data = row.data assert isinstance(row_data, (np.void, np.ma.mvoid)) assert warning_lines[0].category == AstropyDeprecationWarning assert ("The data function is deprecated" in str(warning_lines[0].message)) # If masked then with no masks, issue numpy/numpy#483 should come into play. # Make sure as_void() code is working. row_void = row.as_void() if table.masked: assert isinstance(row_void, np.ma.mvoid) else: assert isinstance(row_void, np.void) assert row_void['a'] == 1 assert row_void['b'] == 4 # Confirm row is a view of table but row_void is not. table['a'][0] = -100 assert row['a'] == -100 assert row_void['a'] == 1 # Make sure it works for a table that has masked elements if table.masked: table['a'].mask = True # row_void is not a view, need to re-make assert row_void['a'] == 1 row_void = row.as_void() # but row is a view assert row['a'] is np.ma.masked def test_row_and_as_void_with_objects(self, table_types): """Test the deprecated data property and as_void() method""" t = table_types.Table([[{'a': 1}, {'b': 2}]], names=('a',)) assert t[0][0] == {'a': 1} assert t[0]['a'] == {'a': 1} if NUMPY_LT_1_8 and t.masked: # With numpy < 1.8 there is a bug setting mvoid with # an object. with pytest.raises(ValueError): t[0].as_void() else: assert t[0].as_void()[0] == {'a': 1} assert t[0].as_void()['a'] == {'a': 1} def test_bounds_checking(self, table_types): """Row gives index error upon creation for out-of-bounds index""" self._setup(table_types) for ibad in (-5, -4, 3, 4): with pytest.raises(IndexError): self.t[ibad] astropy-1.1.1/astropy/table/tests/conftest.py0000644001134200020070000001277712644017723022274 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ All of the py.test fixtures used by astropy.table are defined here. The fixtures can not be defined in the modules that use them, because those modules are imported twice: once with `from __future__ import unicode_literals` and once without. py.test complains when the same fixtures are defined more than once. `conftest.py` is a "special" module name for py.test that is always imported, but is not looked in for tests, and it is the recommended place to put fixtures that are shared between modules. These fixtures can not be defined in a module by a different name and still be shared between modules. """ from copy import deepcopy import numpy as np from ...tests.helper import pytest from ... import table from ...table import table_helpers, Table from ... import time from ... import units as u from ... import coordinates from .. import pprint from ...utils import OrderedDict @pytest.fixture(params=[table.Column, table.MaskedColumn]) def Column(request): # Fixture to run all the Column tests for both an unmasked (ndarray) # and masked (MaskedArray) column. return request.param class MaskedTable(table.Table): def __init__(self, *args, **kwargs): kwargs['masked'] = True table.Table.__init__(self, *args, **kwargs) class MyRow(table.Row): pass class MyColumn(table.Column): pass class MyMaskedColumn(table.MaskedColumn): pass class MyTableColumns(table.TableColumns): pass class MyTableFormatter(pprint.TableFormatter): pass class MyTable(table.Table): Row = MyRow Column = MyColumn MaskedColumn = MyMaskedColumn TableColumns = MyTableColumns TableFormatter = MyTableFormatter # Fixture to run all the Column tests for both an unmasked (ndarray) # and masked (MaskedArray) column. @pytest.fixture(params=['unmasked', 'masked', 'subclass']) def table_types(request): class TableTypes: def __init__(self, request): if request.param == 'unmasked': self.Table = table.Table self.Column = table.Column elif request.param == 'masked': self.Table = MaskedTable self.Column = table.MaskedColumn elif request.param == 'subclass': self.Table = MyTable self.Column = MyColumn return TableTypes(request) # Fixture to run all the Column tests for both an unmasked (ndarray) # and masked (MaskedArray) column. @pytest.fixture(params=[False, True]) def table_data(request): class TableData: def __init__(self, request): self.Table = MaskedTable if request.param else table.Table self.Column = table.MaskedColumn if request.param else table.Column self.COLS = [ self.Column(name='a', data=[1, 2, 3], description='da', format='fa', meta={'ma': 1}, unit='ua'), self.Column(name='b', data=[4, 5, 6], description='db', format='fb', meta={'mb': 1}, unit='ub'), self.Column(name='c', data=[7, 8, 9], description='dc', format='fc', meta={'mc': 1}, unit='ub')] self.DATA = self.Table(self.COLS) return TableData(request) class SubclassTable(table.Table): pass @pytest.fixture(params=[True, False]) def tableclass(request): return table.Table if request.param else SubclassTable @pytest.fixture(params=[0, 1, -1]) def protocol(request): """ Fixture to run all the tests for protocols 0 and 1, and -1 (most advanced). """ return request.param # Fixture to run all tests for both an unmasked (ndarray) and masked # (MaskedArray) column. @pytest.fixture(params=[False, True]) def table_type(request): # return MaskedTable if request.param else table.Table try: request.param return MaskedTable except AttributeError: return table.Table # Stuff for testing mixin columns MIXIN_COLS = {'quantity': [0, 1, 2, 3] * u.m, 'time': time.Time([2000, 2001, 2002, 2003], format='jyear'), 'skycoord': coordinates.SkyCoord(ra=[0, 1, 2, 3] * u.deg, dec=[0, 1, 2, 3] * u.deg), 'arraywrap': table_helpers.ArrayWrapper([0, 1, 2, 3]), 'ndarray': np.array([(7, 'a'), (8, 'b'), (9, 'c'), (9, 'c')], dtype='', ''] assert out.getvalue().splitlines() == exp def test_class_attribute(): """ Test that class info column is suppressed only for identical non-mixin columns. """ vals = [[1] * u.m, [2] * u.m] texp = ['', 'name dtype unit', '---- ------- ----', 'col0 float64 m', 'col1 float64 m'] qexp = ['', 'name dtype unit class ', '---- ------- ---- --------', 'col0 float64 m Quantity', 'col1 float64 m Quantity'] for table_cls, exp in ((table.Table, texp), (table.QTable, qexp)): t = table_cls(vals) out = six.moves.cStringIO() t.info(out=out) assert out.getvalue().splitlines() == exp def test_ignore_warnings(): t = table.Table([[np.nan, np.nan]]) with warnings.catch_warnings(record=True) as warns: t.info('stats', out=None) assert len(warns) == 0 astropy-1.1.1/astropy/table/tests/test_operations.py0000644001134200020070000010267612644017723023667 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS import numpy as np from ...tests.helper import pytest, catch_warnings from ...table import Table, TableMergeError from ...utils import OrderedDict, metadata from ...utils.metadata import MergeConflictError from ... import table def sort_eq(list1, list2): return sorted(list1) == sorted(list2) class TestJoin(): def setup_method(self, method): lines1 = [' a b c ', ' 0 foo L1', ' 1 foo L2', ' 1 bar L3', ' 2 bar L4'] lines2 = [' a b d ', ' 1 foo R1', ' 1 foo R2', ' 2 bar R3', ' 4 bar R4'] self.t1 = Table.read(lines1, format='ascii') self.t2 = Table.read(lines2, format='ascii') self.t3 = Table(self.t2, copy=True) self.t1.meta.update(OrderedDict([('b', [1, 2]), ('c', {'a': 1}), ('d', 1)])) self.t2.meta.update(OrderedDict([('b', [3, 4]), ('c', {'b': 1}), ('a', 1)])) self.t3.meta.update(OrderedDict([('b', 3), ('c', [1, 2]), ('d', 2), ('a', 1)])) self.meta_merge = OrderedDict([('b', [1, 2, 3, 4]), ('c', {'a': 1, 'b': 1}), ('d', 1), ('a', 1)]) def test_table_meta_merge(self): out = table.join(self.t1, self.t2, join_type='inner') assert out.meta == self.meta_merge def test_table_meta_merge_conflict(self): with catch_warnings() as w: out = table.join(self.t1, self.t3, join_type='inner') assert len(w) == 3 assert out.meta == self.t3.meta with catch_warnings() as w: out = table.join(self.t1, self.t3, join_type='inner', metadata_conflicts='warn') assert len(w) == 3 assert out.meta == self.t3.meta with catch_warnings() as w: out = table.join(self.t1, self.t3, join_type='inner', metadata_conflicts='silent') assert len(w) == 0 assert out.meta == self.t3.meta with pytest.raises(MergeConflictError): out = table.join(self.t1, self.t3, join_type='inner', metadata_conflicts='error') with pytest.raises(ValueError): out = table.join(self.t1, self.t3, join_type='inner', metadata_conflicts='nonsense') def test_both_unmasked_inner(self): t1 = self.t1 t2 = self.t2 # Basic join with default parameters (inner join on common keys) t12 = table.join(t1, t2) assert t12.masked is False assert sort_eq(t12.pformat(), [' a b c d ', '--- --- --- ---', ' 1 foo L2 R1', ' 1 foo L2 R2', ' 2 bar L4 R3']) # Table meta merged properly assert t12.meta == self.meta_merge def test_both_unmasked_left_right_outer(self): t1 = self.t1 t2 = self.t2 # Left join t12 = table.join(t1, t2, join_type='left') assert t12.masked is True assert sort_eq(t12.pformat(), [' a b c d ', '--- --- --- ---', ' 0 foo L1 --', ' 1 bar L3 --', ' 1 foo L2 R1', ' 1 foo L2 R2', ' 2 bar L4 R3']) # Right join t12 = table.join(t1, t2, join_type='right') assert t12.masked is True assert sort_eq(t12.pformat(), [' a b c d ', '--- --- --- ---', ' 1 foo L2 R1', ' 1 foo L2 R2', ' 2 bar L4 R3', ' 4 bar -- R4']) # Outer join t12 = table.join(t1, t2, join_type='outer') assert t12.masked is True assert sort_eq(t12.pformat(), [' a b c d ', '--- --- --- ---', ' 0 foo L1 --', ' 1 bar L3 --', ' 1 foo L2 R1', ' 1 foo L2 R2', ' 2 bar L4 R3', ' 4 bar -- R4']) # Check that the common keys are 'a', 'b' t12a = table.join(t1, t2, join_type='outer') t12b = table.join(t1, t2, join_type='outer', keys=['a', 'b']) assert np.all(t12a.as_array() == t12b.as_array()) def test_both_unmasked_single_key_inner(self): t1 = self.t1 t2 = self.t2 # Inner join on 'a' column t12 = table.join(t1, t2, keys='a') assert t12.masked is False assert sort_eq(t12.pformat(), [' a b_1 c b_2 d ', '--- --- --- --- ---', ' 1 foo L2 foo R1', ' 1 foo L2 foo R2', ' 1 bar L3 foo R1', ' 1 bar L3 foo R2', ' 2 bar L4 bar R3']) def test_both_unmasked_single_key_left_right_outer(self): t1 = self.t1 t2 = self.t2 # Left join t12 = table.join(t1, t2, join_type='left', keys='a') assert t12.masked is True assert sort_eq(t12.pformat(), [' a b_1 c b_2 d ', '--- --- --- --- ---', ' 0 foo L1 -- --', ' 1 foo L2 foo R1', ' 1 foo L2 foo R2', ' 1 bar L3 foo R1', ' 1 bar L3 foo R2', ' 2 bar L4 bar R3']) # Right join t12 = table.join(t1, t2, join_type='right', keys='a') assert t12.masked is True assert sort_eq(t12.pformat(), [' a b_1 c b_2 d ', '--- --- --- --- ---', ' 1 foo L2 foo R1', ' 1 foo L2 foo R2', ' 1 bar L3 foo R1', ' 1 bar L3 foo R2', ' 2 bar L4 bar R3', ' 4 -- -- bar R4']) # Outer join t12 = table.join(t1, t2, join_type='outer', keys='a') assert t12.masked is True assert sort_eq(t12.pformat(), [' a b_1 c b_2 d ', '--- --- --- --- ---', ' 0 foo L1 -- --', ' 1 foo L2 foo R1', ' 1 foo L2 foo R2', ' 1 bar L3 foo R1', ' 1 bar L3 foo R2', ' 2 bar L4 bar R3', ' 4 -- -- bar R4']) def test_masked_unmasked(self): t1 = self.t1 t1m = Table(self.t1, masked=True) t2 = self.t2 # Result should be masked even though not req'd by inner join t1m2 = table.join(t1m, t2, join_type='inner') assert t1m2.masked is True # Result should match non-masked result t12 = table.join(t1, t2) assert np.all(t12.as_array() == np.array(t1m2)) # Mask out some values in left table and make sure they propagate t1m['b'].mask[1] = True t1m['c'].mask[2] = True t1m2 = table.join(t1m, t2, join_type='inner', keys='a') assert sort_eq(t1m2.pformat(), [' a b_1 c b_2 d ', '--- --- --- --- ---', ' 1 -- L2 foo R1', ' 1 -- L2 foo R2', ' 1 bar -- foo R1', ' 1 bar -- foo R2', ' 2 bar L4 bar R3']) t21m = table.join(t2, t1m, join_type='inner', keys='a') assert sort_eq(t21m.pformat(), [' a b_1 d b_2 c ', '--- --- --- --- ---', ' 1 foo R2 -- L2', ' 1 foo R2 bar --', ' 1 foo R1 -- L2', ' 1 foo R1 bar --', ' 2 bar R3 bar L4']) def test_masked_masked(self): """Two masked tables""" t1 = self.t1 t1m = Table(self.t1, masked=True) t2 = self.t2 t2m = Table(self.t2, masked=True) # Result should be masked even though not req'd by inner join t1m2m = table.join(t1m, t2m, join_type='inner') assert t1m2m.masked is True # Result should match non-masked result t12 = table.join(t1, t2) assert np.all(t12.as_array() == np.array(t1m2m)) # Mask out some values in both tables and make sure they propagate t1m['b'].mask[1] = True t1m['c'].mask[2] = True t2m['d'].mask[2] = True t1m2m = table.join(t1m, t2m, join_type='inner', keys='a') assert sort_eq(t1m2m.pformat(), [' a b_1 c b_2 d ', '--- --- --- --- ---', ' 1 -- L2 foo R1', ' 1 -- L2 foo R2', ' 1 bar -- foo R1', ' 1 bar -- foo R2', ' 2 bar L4 bar --']) def test_col_rename(self): """ Test auto col renaming when there is a conflict. Use non-default values of uniq_col_name and table_names. """ t1 = self.t1 t2 = self.t2 t12 = table.join(t1, t2, uniq_col_name='x_{table_name}_{col_name}_y', table_names=['L', 'R'], keys='a') assert t12.colnames == ['a', 'x_L_b_y', 'c', 'x_R_b_y', 'd'] def test_rename_conflict(self): """ Test that auto-column rename fails because of a conflict with an existing column """ t1 = self.t1 t2 = self.t2 t1['b_1'] = 1 # Add a new column b_1 that will conflict with auto-rename with pytest.raises(TableMergeError): table.join(t1, t2, keys='a') def test_missing_keys(self): """Merge on a key column that doesn't exist""" t1 = self.t1 t2 = self.t2 with pytest.raises(TableMergeError): table.join(t1, t2, keys=['a', 'not there']) def test_bad_join_type(self): """Bad join_type input""" t1 = self.t1 t2 = self.t2 with pytest.raises(ValueError): table.join(t1, t2, join_type='illegal value') def test_no_common_keys(self): """Merge tables with no common keys""" t1 = self.t1 t2 = self.t2 del t1['a'] del t1['b'] del t2['a'] del t2['b'] with pytest.raises(TableMergeError): table.join(t1, t2) def test_masked_key_column(self): """Merge on a key column that has a masked element""" t1 = self.t1 t2 = Table(self.t2, masked=True) table.join(t1, t2) # OK t2['a'].mask[0] = True with pytest.raises(TableMergeError): table.join(t1, t2) def test_col_meta_merge(self): t1 = self.t1 t2 = self.t2 t2.rename_column('d', 'c') # force col conflict and renaming meta1 = OrderedDict([('b', [1, 2]), ('c', {'a': 1}), ('d', 1)]) meta2 = OrderedDict([('b', [3, 4]), ('c', {'b': 1}), ('a', 1)]) # Key col 'a', should first value ('cm') t1['a'].unit = 'cm' t2['a'].unit = 'm' # Key col 'b', take first value 't1_b' t1['b'].description = 't1_b' # Key col 'b', take first non-empty value 't1_b' t2['b'].format = '%6s' # Key col 'a', should be merged meta t1['a'].meta = meta1 t2['a'].meta = meta2 # Key col 'b', should be meta2 t2['b'].meta = meta2 # All these should pass through t1['c'].unit = 'cm' t1['c'].format = '%3s' t1['c'].description = 't1_c' t2['c'].unit = 'm' t2['c'].format = '%6s' t2['c'].description = 't2_c' with catch_warnings(metadata.MergeConflictWarning) as warning_lines: t12 = table.join(t1, t2, keys=['a', 'b']) assert t12['a'].unit == 'm' assert t12['b'].description == 't1_b' assert t12['b'].format == '%6s' assert t12['a'].meta == self.meta_merge assert t12['b'].meta == meta2 assert t12['c_1'].unit == 'cm' assert t12['c_1'].format == '%3s' assert t12['c_1'].description == 't1_c' assert t12['c_2'].unit == 'm' assert t12['c_2'].format == '%6s' assert t12['c_2'].description == 't2_c' assert warning_lines[0].category == metadata.MergeConflictWarning assert ("In merged column 'a' the 'unit' attribute does not match (cm != m)" in str(warning_lines[0].message)) def test_join_multidimensional(self): # Regression test for #2984, which was an issue where join did not work # on multi-dimensional columns. t1 = Table() t1['a'] = [1,2,3] t1['b'] = np.ones((3,4)) t2 = Table() t2['a'] = [1,2,3] t2['c'] = [4,5,6] t3 = table.join(t1, t2) np.testing.assert_allclose(t3['a'], t1['a']) np.testing.assert_allclose(t3['b'], t1['b']) np.testing.assert_allclose(t3['c'], t2['c']) def test_join_multidimensional_masked(self): """ Test for outer join with multidimensional columns where masking is required. (Issue #4059). """ a = table.MaskedColumn([1, 2, 3], name='a') a2 = table.Column([1, 3, 4], name='a') b = table.MaskedColumn([[1, 2], [3, 4], [5, 6]], name='b', mask=[[1, 0], [0, 1], [0, 0]]) c = table.Column([[1, 1], [2, 2], [3, 3]], name='c') t1 = Table([a, b]) t2 = Table([a2, c]) t12 = table.join(t1, t2, join_type='inner') assert np.all(t12['b'].mask == [[ True, False], [False, False]]) assert np.all(t12['c'].mask == [[False, False], [False, False]]) t12 = table.join(t1, t2, join_type='outer') assert np.all(t12['b'].mask == [[True, False], [False, True], [False, False], [ True, True]]) assert np.all(t12['c'].mask == [[False, False], [True, True], [False, False], [False, False]]) class TestVStack(): def setup_method(self, method): self.t1 = Table.read([' a b', ' 0 foo', ' 1 bar'], format='ascii') self.t2 = Table.read([' a b c', ' 2 pez 4', ' 3 sez 5'], format='ascii') self.t3 = Table.read([' a b', ' 4 7', ' 5 8', ' 6 9'], format='ascii') self.t4 = Table(self.t1, copy=True, masked=True) # The following table has meta-data that conflicts with t1 self.t5 = Table(self.t1, copy=True) self.t1.meta.update(OrderedDict([('b', [1, 2]), ('c', {'a': 1}), ('d', 1)])) self.t2.meta.update(OrderedDict([('b', [3, 4]), ('c', {'b': 1}), ('a', 1)])) self.t4.meta.update(OrderedDict([('b', [5, 6]), ('c', {'c': 1}), ('e', 1)])) self.t5.meta.update(OrderedDict([('b', 3), ('c', 'k'), ('d', 1)])) self.meta_merge = OrderedDict([('b', [1, 2, 3, 4, 5, 6]), ('c', {'a': 1, 'b': 1, 'c': 1}), ('d', 1), ('a', 1), ('e', 1)]) def test_stack_rows(self): t2 = self.t1.copy() t2.meta.clear() out = table.vstack([self.t1, t2[1]]) assert out.pformat() == [' a b ', '--- ---', ' 0 foo', ' 1 bar', ' 1 bar'] def test_table_meta_merge(self): out = table.vstack([self.t1, self.t2, self.t4], join_type='inner') assert out.meta == self.meta_merge def test_table_meta_merge_conflict(self): with catch_warnings() as w: out = table.vstack([self.t1, self.t5], join_type='inner') assert len(w) == 2 assert out.meta == self.t5.meta with catch_warnings() as w: out = table.vstack([self.t1, self.t5], join_type='inner', metadata_conflicts='warn') assert len(w) == 2 assert out.meta == self.t5.meta with catch_warnings() as w: out = table.vstack([self.t1, self.t5], join_type='inner', metadata_conflicts='silent') assert len(w) == 0 assert out.meta == self.t5.meta with pytest.raises(MergeConflictError): out = table.vstack([self.t1, self.t5], join_type='inner', metadata_conflicts='error') with pytest.raises(ValueError): out = table.vstack([self.t1, self.t5], join_type='inner', metadata_conflicts='nonsense') def test_bad_input_type(self): with pytest.raises(TypeError): table.vstack([]) with pytest.raises(TypeError): table.vstack(1) with pytest.raises(TypeError): table.vstack([self.t2, 1]) with pytest.raises(ValueError): table.vstack([self.t1, self.t2], join_type='invalid join type') def test_stack_basic(self): t1 = self.t1 t2 = self.t2 t4 = self.t4 t12 = table.vstack([t1, t2], join_type='inner') assert t12.masked is False assert t12.pformat() == [' a b ', '--- ---', ' 0 foo', ' 1 bar', ' 2 pez', ' 3 sez'] t12 = table.vstack([t1, t2], join_type='outer') assert t12.pformat() == [' a b c ', '--- --- ---', ' 0 foo --', ' 1 bar --', ' 2 pez 4', ' 3 sez 5'] t124 = table.vstack([t1, t2, t4], join_type='outer') assert t124.pformat() == [' a b c ', '--- --- ---', ' 0 foo --', ' 1 bar --', ' 2 pez 4', ' 3 sez 5', ' 0 foo --', ' 1 bar --'] t124 = table.vstack([t1, t2, t4], join_type='inner') assert t124.pformat() == [' a b ', '--- ---', ' 0 foo', ' 1 bar', ' 2 pez', ' 3 sez', ' 0 foo', ' 1 bar'] def test_stack_incompatible(self): with pytest.raises(TableMergeError) as excinfo: table.vstack([self.t1, self.t3], join_type='inner') assert ("The 'b' columns have incompatible types: {0}" .format([self.t1['b'].dtype.name, self.t3['b'].dtype.name]) in str(excinfo)) with pytest.raises(TableMergeError) as excinfo: table.vstack([self.t1, self.t3], join_type='outer') assert "The 'b' columns have incompatible types:" in str(excinfo) with pytest.raises(TableMergeError): table.vstack([self.t1, self.t2], join_type='exact') t1_reshape = self.t1.copy() t1_reshape['b'].shape = [2, 1] with pytest.raises(TableMergeError) as excinfo: table.vstack([self.t1, t1_reshape]) assert "have different shape" in str(excinfo) def test_vstack_one_masked(self): t1 = self.t1 t4 = self.t4 t4['b'].mask[1] = True assert table.vstack([t1, t4]).pformat() == [' a b ', '--- ---', ' 0 foo', ' 1 bar', ' 0 foo', ' 1 --'] def test_col_meta_merge(self): t1 = self.t1 t2 = self.t2 t4 = self.t4 # Key col 'a', should last value ('km') t1['a'].unit = 'cm' t2['a'].unit = 'm' t4['a'].unit = 'km' # Key col 'a' format should take last when all match t1['a'].format = '%0d' t2['a'].format = '%0d' t4['a'].format = '%0d' # Key col 'b', take first value 't1_b' t1['b'].description = 't1_b' # Key col 'b', take first non-empty value '%6s' t4['b'].format = '%6s' # Key col 'a', should be merged meta t1['a'].meta.update(OrderedDict([('b', [1, 2]), ('c', {'a': 1}), ('d', 1)])) t2['a'].meta.update(OrderedDict([('b', [3, 4]), ('c', {'b': 1}), ('a', 1)])) t4['a'].meta.update(OrderedDict([('b', [5, 6]), ('c', {'c': 1}), ('e', 1)])) # Key col 'b', should be meta2 t2['b'].meta.update(OrderedDict([('b', [3, 4]), ('c', {'b': 1}), ('a', 1)])) # All these should pass through t2['c'].unit = 'm' t2['c'].format = '%6s' t2['c'].description = 't2_c' with catch_warnings(metadata.MergeConflictWarning) as warning_lines: out = table.vstack([t1, t2, t4], join_type='outer') assert out['a'].unit == 'km' assert out['a'].format == '%0d' assert out['b'].description == 't1_b' assert out['b'].format == '%6s' assert out['a'].meta == self.meta_merge assert out['b'].meta == OrderedDict([('b', [3, 4]), ('c', {'b': 1}), ('a', 1)]) assert out['c'].unit == 'm' assert out['c'].format == '%6s' assert out['c'].description == 't2_c' assert warning_lines[0].category == metadata.MergeConflictWarning assert ("In merged column 'a' the 'unit' attribute does not match (cm != m)" in str(warning_lines[0].message)) assert warning_lines[1].category == metadata.MergeConflictWarning assert ("In merged column 'a' the 'unit' attribute does not match (m != km)" in str(warning_lines[1].message)) def test_vstack_one_table(self): """Regression test for issue #3313""" assert (self.t1 == table.vstack(self.t1)).all() assert (self.t1 == table.vstack([self.t1])).all() class TestHStack(): def setup_method(self, method): self.t1 = Table.read([' a b', ' 0 foo', ' 1 bar'], format='ascii') self.t2 = Table.read([' a b c', ' 2 pez 4', ' 3 sez 5'], format='ascii') self.t3 = Table.read([' d e', ' 4 7', ' 5 8', ' 6 9'], format='ascii') self.t4 = Table(self.t1, copy=True, masked=True) self.t4['a'].name = 'f' self.t4['b'].name = 'g' # The following table has meta-data that conflicts with t1 self.t5 = Table(self.t1, copy=True) self.t1.meta.update(OrderedDict([('b', [1, 2]), ('c', {'a': 1}), ('d', 1)])) self.t2.meta.update(OrderedDict([('b', [3, 4]), ('c', {'b': 1}), ('a', 1)])) self.t4.meta.update(OrderedDict([('b', [5, 6]), ('c', {'c': 1}), ('e', 1)])) self.t5.meta.update(OrderedDict([('b', 3), ('c', 'k'), ('d', 1)])) self.meta_merge = OrderedDict([('b', [1, 2, 3, 4, 5, 6]), ('c', {'a': 1, 'b': 1, 'c': 1}), ('d', 1), ('a', 1), ('e', 1)]) def test_stack_same_table(self): """ From #2995, test that hstack'ing references to the same table has the expected output. """ out = table.hstack([self.t1, self.t1]) assert out.pformat() == ['a_1 b_1 a_2 b_2', '--- --- --- ---', ' 0 foo 0 foo', ' 1 bar 1 bar'] def test_stack_rows(self): out = table.hstack([self.t1[0], self.t2[1]]) assert out.pformat() == ['a_1 b_1 a_2 b_2 c ', '--- --- --- --- ---', ' 0 foo 3 sez 5'] def test_table_meta_merge(self): out = table.hstack([self.t1, self.t2, self.t4], join_type='inner') assert out.meta == self.meta_merge def test_table_meta_merge_conflict(self): with catch_warnings() as w: out = table.hstack([self.t1, self.t5], join_type='inner') assert len(w) == 2 assert out.meta == self.t5.meta with catch_warnings() as w: out = table.hstack([self.t1, self.t5], join_type='inner', metadata_conflicts='warn') assert len(w) == 2 assert out.meta == self.t5.meta with catch_warnings() as w: out = table.hstack([self.t1, self.t5], join_type='inner', metadata_conflicts='silent') assert len(w) == 0 assert out.meta == self.t5.meta with pytest.raises(MergeConflictError): out = table.hstack([self.t1, self.t5], join_type='inner', metadata_conflicts='error') with pytest.raises(ValueError): out = table.hstack([self.t1, self.t5], join_type='inner', metadata_conflicts='nonsense') def test_bad_input_type(self): with pytest.raises(TypeError): table.hstack([]) with pytest.raises(TypeError): table.hstack(1) with pytest.raises(TypeError): table.hstack([self.t2, 1]) with pytest.raises(ValueError): table.hstack([self.t1, self.t2], join_type='invalid join type') def test_stack_basic(self): t1 = self.t1 t2 = self.t2 t3 = self.t3 t4 = self.t4 out = table.hstack([t1, t2], join_type='inner') assert out.masked is False assert out.pformat() == ['a_1 b_1 a_2 b_2 c ', '--- --- --- --- ---', ' 0 foo 2 pez 4', ' 1 bar 3 sez 5'] # stacking as a list gives same result out_list = table.hstack([t1, t2], join_type='inner') assert out.pformat() == out_list.pformat() out = table.hstack([t1, t2], join_type='outer') assert out.pformat() == out_list.pformat() out = table.hstack([t1, t2, t3, t4], join_type='outer') assert out.pformat() == ['a_1 b_1 a_2 b_2 c d e f g ', '--- --- --- --- --- --- --- --- ---', ' 0 foo 2 pez 4 4 7 0 foo', ' 1 bar 3 sez 5 5 8 1 bar', ' -- -- -- -- -- 6 9 -- --'] out = table.hstack([t1, t2, t3, t4], join_type='inner') assert out.pformat() == ['a_1 b_1 a_2 b_2 c d e f g ', '--- --- --- --- --- --- --- --- ---', ' 0 foo 2 pez 4 4 7 0 foo', ' 1 bar 3 sez 5 5 8 1 bar'] def test_stack_incompatible(self): # For join_type exact, which will fail here because n_rows # does not match with pytest.raises(TableMergeError): table.hstack([self.t1, self.t3], join_type='exact') def test_hstack_one_masked(self): t1 = self.t1 t2 = Table(t1, copy=True, masked=True) t2.meta.clear() t2['b'].mask[1] = True assert table.hstack([t1, t2]).pformat() == ['a_1 b_1 a_2 b_2', '--- --- --- ---', ' 0 foo 0 foo', ' 1 bar 1 --'] def test_table_col_rename(self): out = table.hstack([self.t1, self.t2], join_type='inner', uniq_col_name='{table_name}_{col_name}', table_names=('left', 'right')) assert out.masked is False assert out.pformat() == ['left_a left_b right_a right_b c ', '------ ------ ------- ------- ---', ' 0 foo 2 pez 4', ' 1 bar 3 sez 5'] def test_col_meta_merge(self): t1 = self.t1 t3 = self.t3 t4 = self.t4 # Just set a bunch of meta and make sure it is the same in output meta1 = OrderedDict([('b', [1, 2]), ('c', {'a': 1}), ('d', 1)]) t1['a'].unit = 'cm' t1['b'].description = 't1_b' t4['f'].format = '%6s' t1['b'].meta.update(meta1) t3['d'].meta.update(OrderedDict([('b', [3, 4]), ('c', {'b': 1}), ('a', 1)])) t4['g'].meta.update(OrderedDict([('b', [5, 6]), ('c', {'c': 1}), ('e', 1)])) t3['e'].meta.update(OrderedDict([('b', [3, 4]), ('c', {'b': 1}), ('a', 1)])) t3['d'].unit = 'm' t3['d'].format = '%6s' t3['d'].description = 't3_c' with catch_warnings(metadata.MergeConflictWarning) as warning_lines: out = table.vstack([t1, t3, t4], join_type='outer') for t in [t1, t3, t4]: for name in t.colnames: for attr in ('meta', 'unit', 'format', 'description'): assert getattr(out[name], attr) == getattr(t[name], attr) assert len(warning_lines) == 0 # Make sure we got a copy of meta, not ref t1['b'].meta['b'] = None assert out['b'].meta['b'] == [1, 2] def test_hstack_one_table(self): """Regression test for issue #3313""" assert (self.t1 == table.hstack(self.t1)).all() assert (self.t1 == table.hstack([self.t1])).all() def test_unique(): t = table.Table.read([' a b c d', ' 2 b 7.0 0', ' 1 c 3.0 5', ' 2 b 6.0 2', ' 2 a 4.0 3', ' 1 a 1.0 7', ' 2 b 5.0 1', ' 0 a 0.0 4', ' 1 a 2.0 6', ' 1 c 3.0 5', ], format='ascii') tu = table.Table(np.sort(t[:-1])) t_all = table.unique(t) assert sort_eq(t_all.pformat(), tu.pformat()) key1 = 'a' t1 = table.unique(t, key1) assert sort_eq(t1.pformat(), [' a b c d ', '--- --- --- ---', ' 0 a 0.0 4', ' 1 c 3.0 5', ' 2 b 7.0 0']) key2 = ['a', 'b'] t2 = table.unique(t, key2) assert sort_eq(t2.pformat(), [' a b c d ', '--- --- --- ---', ' 0 a 0.0 4', ' 1 a 1.0 7', ' 1 c 3.0 5', ' 2 a 4.0 3', ' 2 b 7.0 0']) t1_m = table.Table(t1, masked=True) t1_m['a'].mask[1] = True with pytest.raises(ValueError) as e: t1_mu = table.unique(t1_m) assert e.value.args[0] == ("Cannot unique masked value key columns, remove " "column 'a' from keys and rerun unique.") t1_mu = table.unique(t1_m, silent=True) assert t1_mu.pformat() == [' a b c d ', '--- --- --- ---', ' 0 a 0.0 4', ' 2 b 7.0 0', ' -- c 3.0 5'] with pytest.raises(ValueError) as e: t1_mu = table.unique(t1_m, silent=True, keys='a') astropy-1.1.1/astropy/table/tests/test_jsviewer.py0000644001134200020070000000731512644017723023334 0ustar embrayscience00000000000000from os.path import abspath, dirname, join from ..table import Table from ... import extern EXTERN_DIR = abspath(dirname(extern.__file__)) REFERENCE = """
%(lines)s
a b
""" TPL = (' \n' ' {0}\n' ' {1}\n' ' ') def format_lines(col1, col2): return '\n'.join(TPL.format(a, b) for a, b in zip(col1, col2)) def test_write_jsviewer_default(tmpdir): t = Table() t['a'] = [1, 2, 3, 4, 5] t['b'] = ['a', 'b', 'c', 'd', 'e'] t['a'].unit = 'm' tmpfile = tmpdir.join('test.html').strpath t.write(tmpfile, format='jsviewer') ref = REFERENCE % dict( lines=format_lines(t['a'], t['b']), table_class='display compact', table_id='table%s' % id(t), length='50', display_length='10, 25, 50, 100, 500, 1000', datatables_css_url='https://cdn.datatables.net/1.10.9/css/jquery.dataTables.css', datatables_js_url='https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js', jquery_url='https://code.jquery.com/jquery-1.11.3.min.js' ) with open(tmpfile) as f: assert f.read().strip() == ref.strip() def test_write_jsviewer_options(tmpdir): t = Table() t['a'] = [1, 2, 3, 4, 5] t['b'] = ['a', 'b', 'c', 'd', 'e'] t['a'].unit = 'm' tmpfile = tmpdir.join('test.html').strpath t.write(tmpfile, format='jsviewer', table_id='test', max_lines=3, jskwargs={'display_length': 5}, table_class='display hover') ref = REFERENCE % dict( lines=format_lines(t['a'][:3], t['b'][:3]), table_class='display hover', table_id='test', length='5', display_length='5, 10, 25, 50, 100, 500, 1000', datatables_css_url='https://cdn.datatables.net/1.10.9/css/jquery.dataTables.css', datatables_js_url='https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js', jquery_url='https://code.jquery.com/jquery-1.11.3.min.js' ) with open(tmpfile) as f: assert f.read().strip() == ref.strip() def test_write_jsviewer_local(tmpdir): t = Table() t['a'] = [1, 2, 3, 4, 5] t['b'] = ['a', 'b', 'c', 'd', 'e'] t['a'].unit = 'm' tmpfile = tmpdir.join('test.html').strpath t.write(tmpfile, format='jsviewer', table_id='test', jskwargs={'use_local_files': True}) ref = REFERENCE % dict( lines=format_lines(t['a'], t['b']), table_class='display compact', table_id='test', length='50', display_length='10, 25, 50, 100, 500, 1000', datatables_css_url='file://' + join(EXTERN_DIR, 'css', 'jquery.dataTables.css'), datatables_js_url='file://' + join(EXTERN_DIR, 'js', 'jquery.dataTables.min.js'), jquery_url='file://' + join(EXTERN_DIR, 'js', 'jquery-1.11.3.min.js') ) with open(tmpfile) as f: assert f.read().strip() == ref.strip() astropy-1.1.1/astropy/table/tests/test_bst.py0000644001134200020070000000511112644017723022256 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from ..bst import BST import pytest import random import math def get_tree(TreeType): b = TreeType([], []) for val in [5, 2, 9, 3, 4, 1, 6, 10, 8, 7]: b.add(val) return b @pytest.fixture def tree(): return get_tree(BST) ''' 5 / \ 2 9 / \ / \ 1 3 6 10 \ \ 4 8 / 7 ''' @pytest.fixture def bst(): return tree() def test_bst_add(bst): root = bst.root assert root.data == [5] assert root.left.data == [2] assert root.right.data == [9] assert root.left.left.data == [1] assert root.left.right.data == [3] assert root.right.left.data == [6] assert root.right.right.data == [10] assert root.left.right.right.data == [4] assert root.right.left.right.data == [8] assert root.right.left.right.left.data == [7] def test_bst_dimensions(bst): assert bst.size == 10 assert bst.height == 4 def test_bst_find(tree): bst = tree for i in range(1, 11): node = bst.find(i) assert node == [i] assert bst.find(0) == [] assert bst.find(11) == [] assert bst.find('1') == [] def test_bst_traverse(bst): preord = [5, 2, 1, 3, 4, 9, 6, 8, 7, 10] inord = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] postord = [1, 4, 3, 2, 7, 8, 6, 10, 9, 5] traversals = {} for order in ('preorder', 'inorder', 'postorder'): traversals[order] = [x.key for x in bst.traverse(order)] assert traversals['preorder'] == preord assert traversals['inorder'] == inord assert traversals['postorder'] == postord def test_bst_remove(bst): order = (6, 9, 1, 3, 7, 2, 10, 5, 4, 8) vals = set(range(1, 11)) for i, val in enumerate(order): assert bst.remove(val) is True assert bst.is_valid() assert set([x.key for x in bst.traverse('inorder')]) == \ vals.difference(order[:i+1]) assert bst.size == 10 - i - 1 assert bst.remove(-val) is False def test_bst_duplicate(bst): bst.add(10, 11) assert bst.find(10) == [10, 11] assert bst.remove(10, data=10) is True assert bst.find(10) == [11] with pytest.raises(ValueError): bst.remove(10, data=30) # invalid data assert bst.remove(10) is True assert bst.remove(10) is False def test_bst_range(tree): bst = tree lst = bst.range_nodes(4, 8) assert sorted(x.key for x in lst) == [4, 5, 6, 7, 8] lst = bst.range_nodes(10, 11) assert [x.key for x in lst] == [10] lst = bst.range_nodes(11, 20) assert len(lst) == 0 astropy-1.1.1/astropy/table/tests/__init__.py0000644001134200020070000000000012602615521022150 0ustar embrayscience00000000000000astropy-1.1.1/astropy/table/tests/test_item_access.py0000644001134200020070000002214212640262015023740 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS """ Verify item access API in: https://github.com/astropy/astropy/wiki/Table-item-access-definition """ from distutils import version import numpy as np from ...tests.helper import pytest from ... import table from .conftest import MaskedTable @pytest.mark.usefixtures('table_data') class BaseTestItems(): pass @pytest.mark.usefixtures('table_data') class TestTableColumnsItems(BaseTestItems): def test_by_name(self, table_data): """Access TableColumns by name and show that item access returns a Column that refers to underlying table data""" self.t = table_data.Table(table_data.COLS) self.tc = self.t.columns assert self.tc['a'].name == 'a' assert self.tc['a'][1] == 2 assert self.tc['a'].description == 'da' assert self.tc['a'].format == 'fa' assert self.tc['a'].meta == {'ma': 1} assert self.tc['a'].unit == 'ua' assert self.tc['a'].attrs_equal(table_data.COLS[0]) assert isinstance(self.tc['a'], table_data.Column) self.tc['b'][1] = 0 assert self.t['b'][1] == 0 def test_by_position(self, table_data): """Access TableColumns by position and show that item access returns a Column that refers to underlying table data""" self.t = table_data.Table(table_data.COLS) self.tc = self.t.columns assert self.tc[1].name == 'b' assert np.all(self.tc[1].data == table_data.COLS[1].data) assert self.tc[1].description == 'db' assert self.tc[1].format == 'fb' assert self.tc[1].meta == {'mb': 1} assert self.tc[1].unit == 'ub' assert self.tc[1].attrs_equal(table_data.COLS[1]) assert isinstance(self.tc[1], table_data.Column) assert self.tc[2].unit == 'ub' self.tc[1][1] = 0 assert self.t['b'][1] == 0 def test_mult_columns(self, table_data): """Access TableColumns with "fancy indexing" and showed that returned TableColumns object still references original data""" self.t = table_data.Table(table_data.COLS) self.tc = self.t.columns tc2 = self.tc['b', 'c'] assert tc2[1].name == 'c' assert tc2[1][1] == 8 assert tc2[0].name == 'b' assert tc2[0][1] == 5 tc2['c'][1] = 0 assert self.tc['c'][1] == 0 assert self.t['c'][1] == 0 def test_column_slice(self, table_data): """Access TableColumns with slice and showed that returned TableColumns object still references original data""" self.t = table_data.Table(table_data.COLS) self.tc = self.t.columns tc2 = self.tc[1:3] assert tc2[1].name == 'c' assert tc2[1][1] == 8 assert tc2[0].name == 'b' assert tc2[0][1] == 5 tc2['c'][1] = 0 assert self.tc['c'][1] == 0 assert self.t['c'][1] == 0 @pytest.mark.usefixtures('table_data') class TestTableItems(BaseTestItems): def test_column(self, table_data): """Column access returns REFERENCE to data""" self.t = table_data.Table(table_data.COLS) self.tc = self.t.columns a = self.t['a'] assert a[1] == 2 a[1] = 0 assert self.t['a'][1] == 0 def test_row(self, table_data): """Row access returns REFERENCE to data""" self.t = table_data.Table(table_data.COLS) self.tc = self.t.columns row = self.t[1] assert row['a'] == 2 assert row[1] == 5 assert row.columns['a'].attrs_equal(table_data.COLS[0]) assert row.columns['b'].attrs_equal(table_data.COLS[1]) assert row.columns['c'].attrs_equal(table_data.COLS[2]) # Check that setting by col index sets the table and row value row[1] = 0 assert row[1] == 0 assert row['b'] == 0 assert self.t['b'][1] == 0 assert self.t[1]['b'] == 0 # Check that setting by col name sets the table and row value row['a'] = 0 assert row[0] == 0 assert row['a'] == 0 assert self.t['a'][1] == 0 assert self.t[1]['a'] == 0 def test_empty_iterable_item(self, table_data): """ Table item access with [], (), or np.array([]) returns the same table with no rows. """ self.t = table_data.Table(table_data.COLS) for item in [], (), np.array([]): t2 = self.t[item] assert not t2 assert len(t2) == 0 assert t2['a'].attrs_equal(table_data.COLS[0]) assert t2['b'].attrs_equal(table_data.COLS[1]) assert t2['c'].attrs_equal(table_data.COLS[2]) def test_table_slice(self, table_data): """Table slice returns REFERENCE to data""" self.t = table_data.Table(table_data.COLS) self.tc = self.t.columns t2 = self.t[1:3] assert np.all(t2['a'] == table_data.DATA['a'][1:3]) assert t2['a'].attrs_equal(table_data.COLS[0]) assert t2['b'].attrs_equal(table_data.COLS[1]) assert t2['c'].attrs_equal(table_data.COLS[2]) t2['a'][0] = 0 assert np.all(self.t['a'] == np.array([1, 0, 3])) assert t2.masked == self.t.masked assert t2._column_class == self.t._column_class assert isinstance(t2, table_data.Table) def test_fancy_index_slice(self, table_data): """Table fancy slice returns COPY of data""" self.t = table_data.Table(table_data.COLS) self.tc = self.t.columns slice = np.array([0, 2]) t2 = self.t[slice] assert np.all(t2['a'] == table_data.DATA['a'][slice]) assert t2['a'].attrs_equal(table_data.COLS[0]) assert t2['b'].attrs_equal(table_data.COLS[1]) assert t2['c'].attrs_equal(table_data.COLS[2]) t2['a'][0] = 0 assert np.all(self.t.as_array() == table_data.DATA) assert np.any(t2['a'] != table_data.DATA['a'][slice]) assert t2.masked == self.t.masked assert t2._column_class == self.t._column_class assert isinstance(t2, table_data.Table) def test_list_index_slice(self, table_data): """Table list index slice returns COPY of data""" self.t = table_data.Table(table_data.COLS) self.tc = self.t.columns slice = [0, 2] t2 = self.t[slice] assert np.all(t2['a'] == table_data.DATA['a'][slice]) assert t2['a'].attrs_equal(table_data.COLS[0]) assert t2['b'].attrs_equal(table_data.COLS[1]) assert t2['c'].attrs_equal(table_data.COLS[2]) t2['a'][0] = 0 assert np.all(self.t.as_array() == table_data.DATA) assert np.any(t2['a'] != table_data.DATA['a'][slice]) assert t2.masked == self.t.masked assert t2._column_class == self.t._column_class assert isinstance(t2, table_data.Table) def test_select_columns(self, table_data): """Select columns returns COPY of data and all column attributes""" self.t = table_data.Table(table_data.COLS) self.tc = self.t.columns # try both lists and tuples for columns in (('a', 'c'), ['a', 'c']): t2 = self.t[columns] assert np.all(t2['a'] == table_data.DATA['a']) assert np.all(t2['c'] == table_data.DATA['c']) assert t2['a'].attrs_equal(table_data.COLS[0]) assert t2['c'].attrs_equal(table_data.COLS[2]) t2['a'][0] = 0 assert np.all(self.t.as_array() == table_data.DATA) assert np.any(t2['a'] != table_data.DATA['a']) assert t2.masked == self.t.masked assert t2._column_class == self.t._column_class def test_select_columns_fail(self, table_data): """Selecting a column that doesn't exist fails""" self.t = table_data.Table(table_data.COLS) with pytest.raises(ValueError) as err: self.t[['xxxx']] assert 'Slice name(s) xxxx not valid column name(s)' in str(err) with pytest.raises(ValueError) as err: self.t[['xxxx', 'yyyy']] assert 'Slice name(s) xxxx, yyyy not valid column name(s)' in str(err) def test_np_where(self, table_data): """Select rows using output of np.where""" t = table_data.Table(table_data.COLS) # Select last two rows rows = np.where(t['a'] > 1.5) t2 = t[rows] assert np.all(t2['a'] == [2, 3]) assert np.all(t2['b'] == [5, 6]) assert isinstance(t2, table_data.Table) # Select no rows rows = np.where(t['a'] > 100) t2 = t[rows] assert len(t2) == 0 assert isinstance(t2, table_data.Table) def test_np_integers(self, table_data): """ Select rows using numpy integers. This is a regression test for a py 3.3 failure mode """ t = table_data.Table(table_data.COLS) idxs = np.random.randint(len(t), size=2) item = t[idxs[1]] def test_select_bad_column(self, table_data): """Select column name that does not exist""" self.t = table_data.Table(table_data.COLS) self.tc = self.t.columns with pytest.raises(ValueError): self.t['a', 1] astropy-1.1.1/astropy/table/operations.py0000644001134200020070000010146212644017723021456 0ustar embrayscience00000000000000""" High-level table operations: - join() - hstack() - vstack() """ # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six from ..extern.six.moves import zip from copy import deepcopy import warnings import collections import itertools import numpy as np from numpy import ma from ..utils import OrderedDict, metadata from . import _np_utils from .np_utils import fix_column_name, TableMergeError __all__ = ['join', 'hstack', 'vstack', 'unique'] def _merge_col_meta(out, tables, col_name_map, idx_left=0, idx_right=1, metadata_conflicts='warn'): """ Merge column meta data for the ``out`` table. This merges column meta, which includes attributes unit, format, and description, as well as the actual `meta` attribute. It is assumed that the ``out`` table was created by merging ``tables``. The ``col_name_map`` provides the mapping from col name in ``out`` back to the original name (which may be different). """ # Set column meta attrs = ('unit', 'format', 'description') for out_col in six.itervalues(out.columns): for idx_table, table in enumerate(tables): left_col = out_col right_name = col_name_map[out_col.info.name][idx_table] if right_name: right_col = table[right_name] out_col.info.meta = metadata.merge(left_col.info.meta or {}, right_col.info.meta or {}, metadata_conflicts=metadata_conflicts) for attr in attrs: # Pick the metadata item that is not None, or they are both # not None, then if they are equal, there is no conflict, # and if they are different, there is a conflict and we # pick the one on the right (or raise an error). left_attr = getattr(left_col, attr, None) right_attr = getattr(right_col, attr, None) if left_attr is None: # This may not seem necessary since merge_attr gets set # to right_attr, but not all objects support != which is # needed for one of the if clauses. merge_attr = right_attr elif right_attr is None: merge_attr = left_attr elif left_attr != right_attr: if metadata_conflicts == 'warn': warnings.warn("In merged column '{0}' the '{1}' attribute does not match " "({2} != {3}). Using {3} for merged output" .format(out_col.info.name, attr, left_attr, right_attr), metadata.MergeConflictWarning) elif metadata_conflicts == 'error': raise metadata.MergeConflictError( 'In merged column {0!r} the {1!r} attribute does not match ' '({2} != {3})'.format(out_col.info.name, attr, left_attr, right_attr)) elif metadata_conflicts != 'silent': raise ValueError('metadata_conflicts argument must be one of "silent",' ' "warn", or "error"') merge_attr = right_attr else: # left_attr == right_attr merge_attr = right_attr try: # It may not be allowed to set attributes, for instance `unit` # in a Quantity column. setattr(out_col, attr, merge_attr) except AttributeError: pass def _merge_table_meta(out, tables, metadata_conflicts='warn'): out_meta = deepcopy(tables[0].meta) for table in tables[1:]: out_meta = metadata.merge(out_meta, table.meta, metadata_conflicts=metadata_conflicts) out.meta.update(out_meta) def _get_list_of_tables(tables): """ Check that tables is a Table or sequence of Tables. Returns the corresponding list of Tables. """ from .table import Table, Row # Make sure we have a list of things if not isinstance(tables, collections.Sequence): tables = [tables] # Make sure each thing is a Table or Row if any(not isinstance(x, (Table, Row)) for x in tables) or len(tables) == 0: raise TypeError('`tables` arg must be a Table or sequence of Tables or Rows') # Convert any Rows to Tables tables = [(x if isinstance(x, Table) else Table(x)) for x in tables] return tables def _get_out_class(tables): """ From a list of table instances get the merged output table class. This is just taken as the deepest subclass. It is assumed that `tables` is a list of at least one element and that they are all Table (subclass) instances. This doesn't handle complicated inheritance schemes. """ out_class = tables[0].__class__ for t in tables[1:]: if issubclass(t.__class__, out_class): out_class = t.__class__ return out_class def join(left, right, keys=None, join_type='inner', uniq_col_name='{col_name}_{table_name}', table_names=['1', '2'], metadata_conflicts='warn'): """ Perform a join of the left table with the right table on specified keys. Parameters ---------- left : Table object or a value that will initialize a Table object Left side table in the join right : Table object or a value that will initialize a Table object Right side table in the join keys : str or list of str Name(s) of column(s) used to match rows of left and right tables. Default is to use all columns which are common to both tables. join_type : str Join type ('inner' | 'outer' | 'left' | 'right'), default is 'inner' uniq_col_name : str or None String generate a unique output column name in case of a conflict. The default is '{col_name}_{table_name}'. table_names : list of str or None Two-element list of table names used when generating unique output column names. The default is ['1', '2']. metadata_conflicts : str How to proceed with metadata conflicts. This should be one of: * ``'silent'``: silently pick the last conflicting meta-data value * ``'warn'``: pick the last conflicting meta-data value, but emit a warning (default) * ``'error'``: raise an exception. Returns ------- joined_table : `~astropy.table.Table` object New table containing the result of the join operation. """ from .table import Table # Try converting inputs to Table as needed if not isinstance(left, Table): left = Table(left) if not isinstance(right, Table): right = Table(right) col_name_map = OrderedDict() out = _join(left, right, keys, join_type, uniq_col_name, table_names, col_name_map) # Merge the column and table meta data. Table subclasses might override # these methods for custom merge behavior. _merge_col_meta(out, [left, right], col_name_map, metadata_conflicts=metadata_conflicts) _merge_table_meta(out, [left, right], metadata_conflicts=metadata_conflicts) return out def vstack(tables, join_type='outer', metadata_conflicts='warn'): """ Stack tables vertically (along rows) A ``join_type`` of 'exact' means that the tables must all have exactly the same column names (though the order can vary). If ``join_type`` is 'inner' then the intersection of common columns will be the output. A value of 'outer' (default) means the output will have the union of all columns, with table values being masked where no common values are available. Parameters ---------- tables : Table or list of Table objects Table(s) to stack along rows (vertically) with the current table join_type : str Join type ('inner' | 'exact' | 'outer'), default is 'outer' metadata_conflicts : str How to proceed with metadata conflicts. This should be one of: * ``'silent'``: silently pick the last conflicting meta-data value * ``'warn'``: pick the last conflicting meta-data value, but emit a warning (default) * ``'error'``: raise an exception. Returns ------- stacked_table : `~astropy.table.Table` object New table containing the stacked data from the input tables. Examples -------- To stack two tables along rows do:: >>> from astropy.table import vstack, Table >>> t1 = Table({'a': [1, 2], 'b': [3, 4]}, names=('a', 'b')) >>> t2 = Table({'a': [5, 6], 'b': [7, 8]}, names=('a', 'b')) >>> print(t1) a b --- --- 1 3 2 4 >>> print(t2) a b --- --- 5 7 6 8 >>> print(vstack([t1, t2])) a b --- --- 1 3 2 4 5 7 6 8 """ tables = _get_list_of_tables(tables) # validates input if len(tables) == 1: return tables[0] # no point in stacking a single table col_name_map = OrderedDict() out = _vstack(tables, join_type, col_name_map) # Merge column and table metadata _merge_col_meta(out, tables, col_name_map, metadata_conflicts=metadata_conflicts) _merge_table_meta(out, tables, metadata_conflicts=metadata_conflicts) return out def hstack(tables, join_type='outer', uniq_col_name='{col_name}_{table_name}', table_names=None, metadata_conflicts='warn'): """ Stack tables along columns (horizontally) A ``join_type`` of 'exact' means that the tables must all have exactly the same number of rows. If ``join_type`` is 'inner' then the intersection of rows will be the output. A value of 'outer' (default) means the output will have the union of all rows, with table values being masked where no common values are available. Parameters ---------- tables : List of Table objects Tables to stack along columns (horizontally) with the current table join_type : str Join type ('inner' | 'exact' | 'outer'), default is 'outer' uniq_col_name : str or None String generate a unique output column name in case of a conflict. The default is '{col_name}_{table_name}'. table_names : list of str or None Two-element list of table names used when generating unique output column names. The default is ['1', '2', ..]. metadata_conflicts : str How to proceed with metadata conflicts. This should be one of: * ``'silent'``: silently pick the last conflicting meta-data value * ``'warn'``: pick the last conflicting meta-data value, but emit a warning (default) * ``'error'``: raise an exception. Returns ------- stacked_table : `~astropy.table.Table` object New table containing the stacked data from the input tables. Examples -------- To stack two tables horizontally (along columns) do:: >>> from astropy.table import Table, hstack >>> t1 = Table({'a': [1, 2], 'b': [3, 4]}, names=('a', 'b')) >>> t2 = Table({'c': [5, 6], 'd': [7, 8]}, names=('c', 'd')) >>> print(t1) a b --- --- 1 3 2 4 >>> print(t2) c d --- --- 5 7 6 8 >>> print(hstack([t1, t2])) a b c d --- --- --- --- 1 3 5 7 2 4 6 8 """ tables = _get_list_of_tables(tables) # validates input if len(tables) == 1: return tables[0] # no point in stacking a single table col_name_map = OrderedDict() out = _hstack(tables, join_type, uniq_col_name, table_names, col_name_map) _merge_col_meta(out, tables, col_name_map, metadata_conflicts=metadata_conflicts) _merge_table_meta(out, tables, metadata_conflicts=metadata_conflicts) return out def unique(input_table, keys=None, silent=False): """ Returns the unique rows of a table. Parameters ---------- input_table : `~astropy.table.Table` object or a value that will initialize a `~astropy.table.Table` object Input table. keys : str or list of str Name(s) of column(s) used to unique rows. Default is to use all columns. silent : boolean If `True` masked value column(s) are silently removed from ``keys``. If `False` an exception is raised when ``keys`` contains masked value column(s). Default is `False`. Returns ------- unique_table : `~astropy.table.Table` object Table containing only the unique rays of ``input_table``. """ if keys is None: keys = input_table.colnames if input_table.masked: if isinstance(keys, six.string_types): keys = [keys, ] for i, key in enumerate(keys): if np.any(input_table[key].mask): if not silent: raise ValueError("Cannot unique masked value key columns, " "remove column '{0}' from keys and rerun " "unique.".format(key)) del keys[i] if len(keys) == 0: raise ValueError("No column remained in ``keys``, unique cannot " "work with masked value key columns.") grouped_table = input_table.group_by(keys) unique_table = grouped_table[grouped_table.groups.indices[:-1]] return unique_table def _counter(iterable): """ Count instances of each unique value in ``iterable``. Returns a dict with the counts. Would use collections.Counter but this isn't available in 2.6. """ counts = collections.defaultdict(int) for val in iterable: counts[val] += 1 return counts def get_col_name_map(arrays, common_names, uniq_col_name='{col_name}_{table_name}', table_names=None): """ Find the column names mapping when merging the list of tables ``arrays``. It is assumed that col names in ``common_names`` are to be merged into a single column while the rest will be uniquely represented in the output. The args ``uniq_col_name`` and ``table_names`` specify how to rename columns in case of conflicts. Returns a dict mapping each output column name to the input(s). This takes the form {outname : (col_name_0, col_name_1, ...), ... }. For key columns all of input names will be present, while for the other non-key columns the value will be (col_name_0, None, ..) or (None, col_name_1, ..) etc. """ col_name_map = collections.defaultdict(lambda: [None] * len(arrays)) col_name_list = [] if table_names is None: table_names = [six.text_type(ii + 1) for ii in range(len(arrays))] for idx, array in enumerate(arrays): table_name = table_names[idx] for name in array.colnames: out_name = name if name in common_names: # If name is in the list of common_names then insert into # the column name list, but just once. if name not in col_name_list: col_name_list.append(name) else: # If name is not one of the common column outputs, and it collides # with the names in one of the other arrays, then rename others = list(arrays) others.pop(idx) if any(name in other.colnames for other in others): out_name = uniq_col_name.format(table_name=table_name, col_name=name) col_name_list.append(out_name) col_name_map[out_name][idx] = name # Check for duplicate output column names col_name_count = _counter(col_name_list) repeated_names = [name for name, count in six.iteritems(col_name_count) if count > 1] if repeated_names: raise TableMergeError('Merging column names resulted in duplicates: {0}. ' 'Change uniq_col_name or table_names args to fix this.' .format(repeated_names)) # Convert col_name_map to a regular dict with tuple (immutable) values col_name_map = OrderedDict((name, col_name_map[name]) for name in col_name_list) return col_name_map def get_descrs(arrays, col_name_map): """ Find the dtypes descrs resulting from merging the list of arrays' dtypes, using the column name mapping ``col_name_map``. Return a list of descrs for the output. """ out_descrs = [] for out_name, in_names in six.iteritems(col_name_map): # List of input arrays that contribute to this output column in_cols = [arr[name] for arr, name in zip(arrays, in_names) if name is not None] # List of names of the columns that contribute to this output column. names = [name for name in in_names if name is not None] # Output dtype is the superset of all dtypes in in_arrays try: dtype = common_dtype(in_cols) except TableMergeError as tme: # Beautify the error message when we are trying to merge columns with incompatible # types by including the name of the columns that originated the error. raise TableMergeError("The '{0}' columns have incompatible types: {1}" .format(names[0], tme._incompat_types)) # Make sure all input shapes are the same uniq_shapes = set(col.shape[1:] for col in in_cols) if len(uniq_shapes) != 1: raise TableMergeError('Key columns {0!r} have different shape'.format(names)) shape = uniq_shapes.pop() out_descrs.append((fix_column_name(out_name), dtype, shape)) return out_descrs def common_dtype(cols): """ Use numpy to find the common dtype for a list of columns. Only allow columns within the following fundamental numpy data types: np.bool_, np.object_, np.number, np.character, np.void """ def dtype(col): return getattr(col, 'dtype', np.dtype('O')) np_types = (np.bool_, np.object_, np.number, np.character, np.void) uniq_types = set(tuple(issubclass(dtype(col).type, np_type) for np_type in np_types) for col in cols) if len(uniq_types) > 1: # Embed into the exception the actual list of incompatible types. incompat_types = [dtype(col).name for col in cols] tme = TableMergeError('Columns have incompatible types {0}' .format(incompat_types)) tme._incompat_types = incompat_types raise tme arrs = [np.empty(1, dtype=dtype(col)) for col in cols] # For string-type arrays need to explicitly fill in non-zero # values or the final arr_common = .. step is unpredictable. for arr in arrs: if arr.dtype.kind in ('S', 'U'): arr[0] = '0' * arr.itemsize arr_common = np.array([arr[0] for arr in arrs]) return arr_common.dtype.str def _join(left, right, keys=None, join_type='inner', uniq_col_name='{col_name}_{table_name}', table_names=['1', '2'], col_name_map=None): """ Perform a join of the left and right Tables on specified keys. Parameters ---------- left : Table Left side table in the join right : Table Right side table in the join keys : str or list of str Name(s) of column(s) used to match rows of left and right tables. Default is to use all columns which are common to both tables. join_type : str Join type ('inner' | 'outer' | 'left' | 'right'), default is 'inner' uniq_col_name : str or None String generate a unique output column name in case of a conflict. The default is '{col_name}_{table_name}'. table_names : list of str or None Two-element list of table names used when generating unique output column names. The default is ['1', '2']. col_name_map : empty dict or None If passed as a dict then it will be updated in-place with the mapping of output to input column names. Returns ------- joined_table : `~astropy.table.Table` object New table containing the result of the join operation. """ # Store user-provided col_name_map until the end _col_name_map = col_name_map if join_type not in ('inner', 'outer', 'left', 'right'): raise ValueError("The 'join_type' argument should be in 'inner', " "'outer', 'left' or 'right' (got '{0}' instead)". format(join_type)) # If we have a single key, put it in a tuple if keys is None: keys = tuple(name for name in left.colnames if name in right.colnames) if len(keys) == 0: raise TableMergeError('No keys in common between left and right tables') elif isinstance(keys, six.string_types): keys = (keys,) # Check the key columns for arr, arr_label in ((left, 'Left'), (right, 'Right')): for name in keys: if name not in arr.colnames: raise TableMergeError('{0} table does not have key column {1!r}' .format(arr_label, name)) if hasattr(arr[name], 'mask') and np.any(arr[name].mask): raise TableMergeError('{0} key column {1!r} has missing values' .format(arr_label, name)) if not isinstance(arr[name], np.ndarray): raise ValueError("non-ndarray column '{0}' not allowed as a key column") len_left, len_right = len(left), len(right) if len_left == 0 or len_right == 0: raise ValueError('input tables for join must both have at least one row') # Joined array dtype as a list of descr (name, type_str, shape) tuples col_name_map = get_col_name_map([left, right], keys, uniq_col_name, table_names) out_descrs = get_descrs([left, right], col_name_map) # Make an array with just the key columns. This uses a temporary # structured array for efficiency. out_keys_dtype = [descr for descr in out_descrs if descr[0] in keys] out_keys = np.empty(len_left + len_right, dtype=out_keys_dtype) for key in keys: out_keys[key][:len_left] = left[key] out_keys[key][len_left:] = right[key] idx_sort = out_keys.argsort(order=keys) out_keys = out_keys[idx_sort] # Get all keys diffs = np.concatenate(([True], out_keys[1:] != out_keys[:-1], [True])) idxs = np.flatnonzero(diffs) # Main inner loop in Cython to compute the cartesion product # indices for the given join type int_join_type = {'inner': 0, 'outer': 1, 'left': 2, 'right': 3}[join_type] masked, n_out, left_out, left_mask, right_out, right_mask = \ _np_utils.join_inner(idxs, idx_sort, len_left, int_join_type) # If either of the inputs are masked then the output is masked if left.masked or right.masked: masked = True masked = bool(masked) out = _get_out_class([left, right])(masked=masked) for out_name, dtype, shape in out_descrs: left_name, right_name = col_name_map[out_name] if left_name and right_name: # this is a key which comes from left and right out[out_name] = out.ColumnClass(length=n_out, name=out_name, dtype=dtype, shape=shape) out[out_name] = np.where(right_mask, left[left_name].take(left_out), right[right_name].take(right_out)) continue elif left_name: # out_name came from the left table name, array, array_out, array_mask = left_name, left, left_out, left_mask elif right_name: name, array, array_out, array_mask = right_name, right, right_out, right_mask else: raise TableMergeError('Unexpected column names (maybe one is ""?)') # Finally add the joined column to the output table. out[out_name] = array[name][array_out] # If the output table is masked then set the output column masking # accordingly. Check for columns that don't support a mask attribute. if masked: # array_mask is 1-d corresponding to length of output column. We need # make it have the correct shape for broadcasting, i.e. (length, 1, 1, ..). # Mixin columns might not have ndim attribute so use len(col.shape). array_mask.shape = (out[out_name].shape[0],) + (1,) * (len(out[out_name].shape) - 1) if array.masked: array_mask = array_mask | array[name].mask[array_out] try: out[out_name].mask[:] = array_mask except ValueError: raise ValueError("join requires masking column '{0}' but column" " type {1} does not support masking" .format(out_name, out[out_name].__class__.__name__)) # If col_name_map supplied as a dict input, then update. if isinstance(_col_name_map, collections.Mapping): _col_name_map.update(col_name_map) return out def _vstack(arrays, join_type='outer', col_name_map=None): """ Stack Tables vertically (by rows) A ``join_type`` of 'exact' (default) means that the arrays must all have exactly the same column names (though the order can vary). If ``join_type`` is 'inner' then the intersection of common columns will be the output. A value of 'outer' means the output will have the union of all columns, with array values being masked where no common values are available. Parameters ---------- arrays : list of Tables Tables to stack by rows (vertically) join_type : str Join type ('inner' | 'exact' | 'outer'), default is 'outer' col_name_map : empty dict or None If passed as a dict then it will be updated in-place with the mapping of output to input column names. Returns ------- stacked_table : `~astropy.table.Table` object New table containing the stacked data from the input tables. """ # Store user-provided col_name_map until the end _col_name_map = col_name_map # Input validation if join_type not in ('inner', 'exact', 'outer'): raise ValueError("`join_type` arg must be one of 'inner', 'exact' or 'outer'") # Trivial case of one input array if len(arrays) == 1: return arrays[0] for arr in arrays: if arr.has_mixin_columns: raise NotImplementedError('vstack not available for tables with mixin columns') # Start by assuming an outer match where all names go to output names = set(itertools.chain(*[arr.colnames for arr in arrays])) col_name_map = get_col_name_map(arrays, names) # If require_match is True then the output must have exactly the same # number of columns as each input array if join_type == 'exact': for names in six.itervalues(col_name_map): if any(x is None for x in names): raise TableMergeError('Inconsistent columns in input arrays ' "(use 'inner' or 'outer' join_type to " "allow non-matching columns)") join_type = 'outer' # For an inner join, keep only columns where all input arrays have that column if join_type == 'inner': col_name_map = OrderedDict((name, in_names) for name, in_names in six.iteritems(col_name_map) if all(x is not None for x in in_names)) if len(col_name_map) == 0: raise TableMergeError('Input arrays have no columns in common') # If there are any output columns where one or more input arrays are missing # then the output must be masked. If any input arrays are masked then # output is masked. masked = any(getattr(arr, 'masked', False) for arr in arrays) for names in six.itervalues(col_name_map): if any(x is None for x in names): masked = True break lens = [len(arr) for arr in arrays] n_rows = sum(lens) out = _get_out_class(arrays)(masked=masked) out_descrs = get_descrs(arrays, col_name_map) for out_descr in out_descrs: name = out_descr[0] dtype = out_descr[1:] if masked: out[name] = ma.array(data=np.zeros(n_rows, dtype), mask=np.ones(n_rows, ma.make_mask_descr(dtype))) else: out[name] = np.empty(n_rows, dtype=dtype) for out_name, in_names in six.iteritems(col_name_map): idx0 = 0 for name, array in zip(in_names, arrays): idx1 = idx0 + len(array) if name in array.colnames: out[out_name][idx0:idx1] = array[name] idx0 = idx1 # If col_name_map supplied as a dict input, then update. if isinstance(_col_name_map, collections.Mapping): _col_name_map.update(col_name_map) return out def _hstack(arrays, join_type='outer', uniq_col_name='{col_name}_{table_name}', table_names=None, col_name_map=None): """ Stack tables horizontally (by columns) A ``join_type`` of 'exact' (default) means that the arrays must all have exactly the same number of rows. If ``join_type`` is 'inner' then the intersection of rows will be the output. A value of 'outer' means the output will have the union of all rows, with array values being masked where no common values are available. Parameters ---------- arrays : List of tables Tables to stack by columns (horizontally) join_type : str Join type ('inner' | 'exact' | 'outer'), default is 'outer' uniq_col_name : str or None String generate a unique output column name in case of a conflict. The default is '{col_name}_{table_name}'. table_names : list of str or None Two-element list of table names used when generating unique output column names. The default is ['1', '2', ..]. Returns ------- stacked_table : `~astropy.table.Table` object New table containing the stacked data from the input tables. """ # Store user-provided col_name_map until the end _col_name_map = col_name_map # Input validation if join_type not in ('inner', 'exact', 'outer'): raise ValueError("join_type arg must be either 'inner', 'exact' or 'outer'") if table_names is None: table_names = ['{0}'.format(ii + 1) for ii in range(len(arrays))] if len(arrays) != len(table_names): raise ValueError('Number of arrays must match number of table_names') # Trivial case of one input arrays if len(arrays) == 1: return arrays[0] col_name_map = get_col_name_map(arrays, [], uniq_col_name, table_names) # If require_match is True then all input arrays must have the same length arr_lens = [len(arr) for arr in arrays] if join_type == 'exact': if len(set(arr_lens)) > 1: raise TableMergeError("Inconsistent number of rows in input arrays " "(use 'inner' or 'outer' join_type to allow " "non-matching rows)") join_type = 'outer' # For an inner join, keep only the common rows if join_type == 'inner': min_arr_len = min(arr_lens) if len(set(arr_lens)) > 1: arrays = [arr[:min_arr_len] for arr in arrays] arr_lens = [min_arr_len for arr in arrays] # If there are any output rows where one or more input arrays are missing # then the output must be masked. If any input arrays are masked then # output is masked. masked = any(getattr(arr, 'masked', False) for arr in arrays) or len(set(arr_lens)) > 1 n_rows = max(arr_lens) out = _get_out_class(arrays)(masked=masked) for out_name, in_names in six.iteritems(col_name_map): for name, array, arr_len in zip(in_names, arrays, arr_lens): if name is None: continue if n_rows > arr_len: indices = np.arange(n_rows) indices[arr_len:] = 0 out[out_name] = array[name][indices] try: out[out_name].mask[arr_len:] = True except ValueError: raise ValueError("hstack requires masking column '{0}' but column" " type {1} does not support masking" .format(out_name, out[out_name].__class__.__name__)) else: out[out_name] = array[name][:n_rows] # If col_name_map supplied as a dict input, then update. if isinstance(_col_name_map, collections.Mapping): _col_name_map.update(col_name_map) return out astropy-1.1.1/astropy/table/groups.py0000644001134200020070000003307312644017723020614 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six from ..extern.six.moves import zip as izip import platform import warnings import numpy as np from .index import get_index from ..utils.exceptions import AstropyUserWarning __all__ = ['TableGroups', 'ColumnGroups'] def table_group_by(table, keys): # index copies are unnecessary and slow down _table_group_by with table.index_mode('discard_on_copy'): return _table_group_by(table, keys) def _table_group_by(table, keys): """ Get groups for ``table`` on specified ``keys``. Parameters ---------- table : `Table` Table to group keys : str, list of str, `Table`, or Numpy array Grouping key specifier Returns ------- grouped_table : Table object with groups attr set accordingly """ from .table import Table # Pre-convert string to tuple of strings, or Table to the underlying structured array if isinstance(keys, six.string_types): keys = (keys,) if isinstance(keys, (list, tuple)): for name in keys: if name not in table.colnames: raise ValueError('Table does not have key column {0!r}'.format(name)) if table.masked and np.any(table[name].mask): raise ValueError('Missing values in key column {0!r} are not allowed'.format(name)) keys = tuple(keys) table_keys = table[keys] grouped_by_table_cols = True # Grouping keys are columns from the table being grouped elif isinstance(keys, (np.ndarray, Table)): table_keys = keys if len(table_keys) != len(table): raise ValueError('Input keys array length {0} does not match table length {1}' .format(len(table_keys), len(table))) grouped_by_table_cols = False # Grouping key(s) are external else: raise TypeError('Keys input must be string, list, tuple or numpy array, but got {0}' .format(type(keys))) try: # take advantage of index internal sort if possible table_index = get_index(table, table_keys) if \ isinstance(table_keys, Table) else None if table_index is not None: idx_sort = table_index.sorted_data() else: idx_sort = table_keys.argsort(kind='mergesort') stable_sort = True except TypeError: # Some versions (likely 1.6 and earlier) of numpy don't support # 'mergesort' for all data types. MacOSX (Darwin) doesn't have a stable # sort by default, nor does Windows, while Linux does (or appears to). idx_sort = table_keys.argsort() stable_sort = platform.system() not in ('Darwin', 'Windows') table_keys = table_keys[idx_sort] # Get all keys diffs = np.concatenate(([True], table_keys[1:] != table_keys[:-1], [True])) indices = np.flatnonzero(diffs) # If the sort is not stable (preserves original table order) then sort idx_sort in # place within each group. if not stable_sort: for i0, i1 in izip(indices[:-1], indices[1:]): idx_sort[i0:i1].sort() # Make a new table and set the _groups to the appropriate TableGroups object. # Take the subset of the original keys at the indices values (group boundaries). out = table.__class__(table[idx_sort]) out_keys = table_keys[indices[:-1]] if isinstance(out_keys, Table): out_keys.meta['grouped_by_table_cols'] = grouped_by_table_cols out._groups = TableGroups(out, indices=indices, keys=out_keys) return out def column_group_by(column, keys): """ Get groups for ``column`` on specified ``keys`` Parameters ---------- column : Column object Column to group keys : Table or Numpy array of same length as col Grouping key specifier Returns ------- grouped_column : Column object with groups attr set accordingly """ from .table import Table from .column import Column if isinstance(keys, Table): keys = keys.as_array() if not isinstance(keys, np.ndarray): raise TypeError('Keys input must be numpy array, but got {0}' .format(type(keys))) if len(keys) != len(column): raise ValueError('Input keys array length {0} does not match column length {1}' .format(len(keys), len(column))) # take advantage of table or column indices, if possible index = None if isinstance(keys, Table): index = get_index(keys) elif hasattr(keys, 'indices') and keys.indices: index = keys.indices[0] if index is not None: idx_sort = index.sorted_data() else: idx_sort = keys.argsort() keys = keys[idx_sort] # Get all keys diffs = np.concatenate(([True], keys[1:] != keys[:-1], [True])) indices = np.flatnonzero(diffs) # Make a new column and set the _groups to the appropriate ColumnGroups object. # Take the subset of the original keys at the indices values (group boundaries). out = column.__class__(column[idx_sort]) out._groups = ColumnGroups(out, indices=indices, keys=keys[indices[:-1]]) return out class BaseGroups(object): """ A class to represent groups within a table of heterogeneous data. - ``keys``: key values corresponding to each group - ``indices``: index values in parent table or column corresponding to group boundaries - ``aggregate()``: method to create new table by aggregating within groups """ @property def parent(self): return self.parent_column if isinstance(self, ColumnGroups) else self.parent_table def __iter__(self): self._iter_index = 0 return self def next(self): ii = self._iter_index if ii < len(self.indices) - 1: i0, i1 = self.indices[ii], self.indices[ii + 1] self._iter_index += 1 return self.parent[i0:i1] else: raise StopIteration __next__ = next def __getitem__(self, item): parent = self.parent if isinstance(item, int): i0, i1 = self.indices[item], self.indices[item + 1] out = parent[i0:i1] out.groups._keys = parent.groups.keys[item] else: indices0, indices1 = self.indices[:-1], self.indices[1:] try: i0s, i1s = indices0[item], indices1[item] except: raise TypeError('Index item for groups attribute must be a slice, ' 'numpy mask or int array') mask = np.zeros(len(parent), dtype=np.bool) # Is there a way to vectorize this in numpy? for i0, i1 in izip(i0s, i1s): mask[i0:i1] = True out = parent[mask] out.groups._keys = parent.groups.keys[item] out.groups._indices = np.concatenate([[0], np.cumsum(i1s - i0s)]) return out def __repr__(self): return '<{0} indices={1}>'.format(self.__class__.__name__, self.indices) def __len__(self): return len(self.indices) - 1 class ColumnGroups(BaseGroups): def __init__(self, parent_column, indices=None, keys=None): self.parent_column = parent_column # parent Column self.parent_table = parent_column.parent_table self._indices = indices self._keys = keys @property def indices(self): # If the parent column is in a table then use group indices from table if self.parent_table: return self.parent_table.groups.indices else: if self._indices is None: return np.array([0, len(self.parent_column)]) else: return self._indices @property def keys(self): # If the parent column is in a table then use group indices from table if self.parent_table: return self.parent_table.groups.keys else: return self._keys def aggregate(self, func): from .column import MaskedColumn i0s, i1s = self.indices[:-1], self.indices[1:] par_col = self.parent_column masked = isinstance(par_col, MaskedColumn) reduceat = hasattr(func, 'reduceat') sum_case = func is np.sum mean_case = func is np.mean try: if not masked and (reduceat or sum_case or mean_case): if mean_case: vals = np.add.reduceat(par_col, i0s) / np.diff(self.indices) else: if sum_case: func = np.add vals = func.reduceat(par_col, i0s) else: vals = np.array([func(par_col[i0: i1]) for i0, i1 in izip(i0s, i1s)]) except Exception: raise TypeError("Cannot aggregate column '{0}' with type '{1}'" .format(par_col.info.name, par_col.info.dtype)) out = par_col.__class__(data=vals, name=par_col.info.name, description=par_col.info.description, unit=par_col.info.unit, format=par_col.info.format, meta=par_col.info.meta) return out def filter(self, func): """ Filter groups in the Column based on evaluating function ``func`` on each group sub-table. The function which is passed to this method must accept one argument: - ``column`` : `Column` object It must then return either `True` or `False`. As an example, the following will select all column groups with only positive values:: def all_positive(column): if np.any(column < 0): return False return True Parameters ---------- func : function Filter function Returns ------- out : Column New column with the aggregated rows. """ mask = np.empty(len(self), dtype=np.bool) for i, group_column in enumerate(self): mask[i] = func(group_column) return self[mask] class TableGroups(BaseGroups): def __init__(self, parent_table, indices=None, keys=None): self.parent_table = parent_table # parent Table self._indices = indices self._keys = keys @property def key_colnames(self): """ Return the names of columns in the parent table that were used for grouping. """ # If the table was grouped by key columns *in* the table then treat those columns # differently in aggregation. In this case keys will be a Table with # keys.meta['grouped_by_table_cols'] == True. Keys might not be a Table so we # need to handle this. grouped_by_table_cols = getattr(self.keys, 'meta', {}).get('grouped_by_table_cols', False) return self.keys.colnames if grouped_by_table_cols else () @property def indices(self): if self._indices is None: return np.array([0, len(self.parent_table)]) else: return self._indices def aggregate(self, func): """ Aggregate each group in the Table into a single row by applying the reduction function ``func`` to group values in each column. Parameters ---------- func : function Function that reduces an array of values to a single value Returns ------- out : Table New table with the aggregated rows. """ i0s, i1s = self.indices[:-1], self.indices[1:] out_cols = [] parent_table = self.parent_table for col in six.itervalues(parent_table.columns): # For key columns just pick off first in each group since they are identical if col.info.name in self.key_colnames: new_col = col.take(i0s) else: try: new_col = col.groups.aggregate(func) except TypeError as err: warnings.warn(six.text_type(err), AstropyUserWarning) continue out_cols.append(new_col) return parent_table.__class__(out_cols, meta=parent_table.meta) def filter(self, func): """ Filter groups in the Table based on evaluating function ``func`` on each group sub-table. The function which is passed to this method must accept two arguments: - ``table`` : `Table` object - ``key_colnames`` : tuple of column names in ``table`` used as keys for grouping It must then return either `True` or `False`. As an example, the following will select all table groups with only positive values in the non-key columns:: def all_positive(table, key_colnames): colnames = [name for name in table.colnames if name not in key_colnames] for colname in colnames: if np.any(table[colname] < 0): return False return True Parameters ---------- func : function Filter function Returns ------- out : Table New table with the aggregated rows. """ mask = np.empty(len(self), dtype=np.bool) key_colnames = self.key_colnames for i, group_table in enumerate(self): mask[i] = func(group_table, key_colnames) return self[mask] @property def keys(self): return self._keys astropy-1.1.1/astropy/table/_np_utils.pyx0000644001134200020070000000752112640262015021450 0ustar embrayscience00000000000000""" Cython utilities for numpy structured arrays. join_inner(): Do the inner-loop cartesian product for np_utils.join() processing. (The "inner" is about the inner loop, not inner join). """ import numpy as np import numpy.ma as ma from numpy.lib.recfunctions import drop_fields cimport cython cimport numpy as np DTYPE = np.int ctypedef np.intp_t DTYPE_t @cython.wraparound(False) @cython.boundscheck(False) def join_inner(np.ndarray[DTYPE_t, ndim=1] idxs, np.ndarray[DTYPE_t, ndim=1] idx_sort, int len_left, int jointype): """ Do the inner-loop cartesian product for np_utils.join() processing. (The "inner" is about the inner loop, not inner join). """ cdef int n_out = 0 cdef int max_key_idxs = 0 cdef DTYPE_t ii, key_idxs, n_left, n_right, idx0, idx1, idx, i cdef DTYPE_t i_left, i_right, i_out cdef int masked # First count the final number of rows and max number of indexes # for a single key masked = 0 for ii in range(idxs.shape[0] - 1): idx0 = idxs[ii] idx1 = idxs[ii + 1] # Number of indexes for this key key_idxs = idx1 - idx0 if key_idxs > max_key_idxs: max_key_idxs = key_idxs # Number of rows for this key n_left = 0 n_right = 0 for idx in range(idx0, idx1): i = idx_sort[idx] if i < len_left: n_left += 1 else: n_right += 1 # Fix n_left and n_right for different join types if jointype == 0: pass elif jointype == 1: if n_left == 0: masked = 1 n_left = 1 if n_right == 0: masked = 1 n_right = 1 elif jointype == 2: if n_right == 0: masked = 1 n_right = 1 elif jointype == 3: if n_left == 0: masked = 1 n_left = 1 n_out += n_left * n_right cdef np.ndarray left_out = np.empty(n_out, dtype=DTYPE) cdef np.ndarray right_out = np.empty(n_out, dtype=DTYPE) cdef np.ndarray left_mask = np.zeros(n_out, dtype=np.bool) cdef np.ndarray right_mask = np.zeros(n_out, dtype=np.bool) cdef np.ndarray left_idxs = np.empty(max_key_idxs, dtype=DTYPE) cdef np.ndarray right_idxs = np.empty(max_key_idxs, dtype=DTYPE) i_out = 0 for ii in range(idxs.shape[0] - 1): idx0 = idxs[ii] idx1 = idxs[ii + 1] # Number of rows for this key n_left = 0 n_right = 0 for idx in range(idx0, idx1): i = idx_sort[idx] if i < len_left: left_idxs[n_left] = i n_left += 1 else: right_idxs[n_right] = i - len_left n_right += 1 if jointype == 0: pass elif jointype == 1: if n_left == 0: left_idxs[0] = -1 n_left = 1 if n_right == 0: right_idxs[0] = -1 n_right = 1 elif jointype == 2: if n_right == 0: right_idxs[0] = -1 n_right = 1 elif jointype == 3: if n_left == 0: left_idxs[0] = -1 n_left = 1 for i_left in range(n_left): for i_right in range(n_right): idx = left_idxs[i_left] if idx < 0: idx = 0 left_mask[i_out] = 1 left_out[i_out] = idx idx = right_idxs[i_right] if idx < 0: idx = 0 right_mask[i_out] = 1 right_out[i_out] = idx i_out += 1 return masked, n_out, left_out, left_mask, right_out, right_mask astropy-1.1.1/astropy/table/table.py0000644001134200020070000026563112644017723020373 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six from ..extern.six.moves import zip as izip from ..extern.six.moves import range as xrange from .sorted_array import SortedArray from .index import QueryError, TableIndices, TableLoc, TableILoc import re import sys from copy import deepcopy import numpy as np from numpy import ma from .. import log from ..io import registry as io_registry from ..units import Quantity from ..utils import OrderedDict, isiterable, deprecated, minversion from ..utils.console import color_print from ..utils.metadata import MetaData from ..utils.data_info import BaseColumnInfo, MixinInfo, ParentDtypeInfo from . import groups from .pprint import TableFormatter from .column import (BaseColumn, Column, MaskedColumn, _auto_names, FalseArray, col_copy) from .row import Row from .np_utils import fix_column_name, recarray_fromrecords from .info import TableInfo from .index import Index, _IndexModeContext, get_index # Prior to Numpy 1.6.2, there was a bug (in Numpy) that caused # sorting of structured arrays containing Unicode columns to # silently fail. _BROKEN_UNICODE_TABLE_SORT = not minversion(np, '1.6.2') __doctest_skip__ = ['Table.read', 'Table.write', 'Table.convert_bytestring_to_unicode', 'Table.convert_unicode_to_bytestring', ] def descr(col): """Array-interface compliant full description of a column. This returns a 3-tuple (name, type, shape) that can always be used in a structured array dtype definition. """ col_dtype = 'O' if (col.info.dtype is None) else col.info.dtype col_shape = col.shape[1:] if hasattr(col, 'shape') else () return (col.info.name, col_dtype, col_shape) def has_info_class(obj, cls): return hasattr(obj, 'info') and isinstance(obj.info, cls) class TableColumns(OrderedDict): """OrderedDict subclass for a set of columns. This class enhances item access to provide convenient access to columns by name or index, including slice access. It also handles renaming of columns. The initialization argument ``cols`` can be a list of ``Column`` objects or any structure that is valid for initializing a Python dict. This includes a dict, list of (key, val) tuples or [key, val] lists, etc. Parameters ---------- cols : dict, list, tuple; optional Column objects as data structure that can init dict (see above) """ def __init__(self, cols={}): if isinstance(cols, (list, tuple)): # `cols` should be a list of two-tuples, but it is allowed to have # columns (BaseColumn or mixins) in the list. newcols = [] for col in cols: if has_info_class(col, BaseColumnInfo): newcols.append((col.info.name, col)) else: newcols.append(col) cols = newcols super(TableColumns, self).__init__(cols) def __getitem__(self, item): """Get items from a TableColumns object. :: tc = TableColumns(cols=[Column(name='a'), Column(name='b'), Column(name='c')]) tc['a'] # Column('a') tc[1] # Column('b') tc['a', 'b'] # tc[1:3] # """ if isinstance(item, six.string_types): return OrderedDict.__getitem__(self, item) elif isinstance(item, int): return self.values()[item] elif isinstance(item, tuple): return self.__class__([self[x] for x in item]) elif isinstance(item, slice): return self.__class__([self[x] for x in list(self)[item]]) else: raise IndexError('Illegal key or index value for {} object' .format(self.__class__.__name__)) def __setitem__(self, item, value): if item in self: raise ValueError("Cannot replace column '{0}'. Use Table.replace_column() instead." .format(item)) super(TableColumns, self).__setitem__(item, value) def __repr__(self): names = ("'{0}'".format(x) for x in six.iterkeys(self)) return "<{1} names=({0})>".format(",".join(names), self.__class__.__name__) def _rename_column(self, name, new_name): if new_name in self: raise KeyError("Column {0} already exists".format(new_name)) mapper = {name: new_name} new_names = [mapper.get(name, name) for name in self] cols = list(six.itervalues(self)) self.clear() self.update(list(izip(new_names, cols))) # Define keys and values for Python 2 and 3 source compatibility def keys(self): return list(OrderedDict.keys(self)) def values(self): return list(OrderedDict.values(self)) class Table(object): """A class to represent tables of heterogeneous data. `Table` provides a class for heterogeneous tabular data, making use of a `numpy` structured array internally to store the data values. A key enhancement provided by the `Table` class is the ability to easily modify the structure of the table by adding or removing columns, or adding new rows of data. In addition table and column metadata are fully supported. `Table` differs from `~astropy.nddata.NDData` by the assumption that the input data consists of columns of homogeneous data, where each column has a unique identifier and may contain additional metadata such as the data unit, format, and description. Parameters ---------- data : numpy ndarray, dict, list, or Table, optional Data to initialize table. masked : bool, optional Specify whether the table is masked. names : list, optional Specify column names dtype : list, optional Specify column data types meta : dict, optional Metadata associated with the table. copy : bool, optional Copy the input data (default=True). rows : numpy ndarray, list of lists, optional Row-oriented data for table instead of ``data`` argument copy_indices : bool, optional Copy any indices in the input data (default=True) """ meta = MetaData() # Define class attributes for core container objects to allow for subclass # customization. Row = Row Column = Column MaskedColumn = MaskedColumn TableColumns = TableColumns TableFormatter = TableFormatter @property @deprecated('0.4', alternative=':attr:`Table.as_array`') def _data(self): """ Return a new copy of the table in the form of a structured np.ndarray or np.ma.MaskedArray object (as appropriate). Prior to version 1.0 of astropy this private property was a modifiable view of the table data, but since 1.0 it is a copy. """ return self.as_array() def as_array(self, keep_byteorder=False): """ Return a new copy of the table in the form of a structured np.ndarray or np.ma.MaskedArray object (as appropriate). Parameters ---------- keep_byteorder : bool, optional By default the returned array has all columns in native byte order. However, if this option is `True` this preserves the byte order of all columns (if any are non-native). Returns ------- table_array : np.ndarray (unmasked) or np.ma.MaskedArray (masked) Copy of table as a numpy structured array """ if len(self.columns) == 0: return None sys_byteorder = ('>', '<')[sys.byteorder == 'little'] native_order = ('=', sys_byteorder) dtype = [] cols = self.columns.values() for col in cols: col_descr = descr(col) byteorder = col.info.dtype.byteorder if not keep_byteorder and byteorder not in native_order: new_dt = np.dtype(col_descr[1]).newbyteorder('=') col_descr = (col_descr[0], new_dt, col_descr[2]) dtype.append(col_descr) empty_init = ma.empty if self.masked else np.empty data = empty_init(len(self), dtype=dtype) for col in cols: # When assigning from one array into a field of a structured array, # Numpy will automatically swap those columns to their destination # byte order where applicable data[col.info.name] = col return data def __init__(self, data=None, masked=None, names=None, dtype=None, meta=None, copy=True, rows=None, copy_indices=True): # Set up a placeholder empty table self._set_masked(masked) self.columns = self.TableColumns() self.meta = meta self.formatter = self.TableFormatter() self._copy_indices = True # copy indices from this Table by default self._init_indices = copy_indices # whether to copy indices in init self.primary_key = None # Must copy if dtype are changing if not copy and dtype is not None: raise ValueError('Cannot specify dtype when copy=False') # Row-oriented input, e.g. list of lists or list of tuples, list of # dict, Row instance. Set data to something that the subsequent code # will parse correctly. is_list_of_dict = False if rows is not None: if data is not None: raise ValueError('Cannot supply both `data` and `rows` values') if all(isinstance(row, dict) for row in rows): is_list_of_dict = True # Avoid doing the all(...) test twice. data = rows elif isinstance(rows, self.Row): data = rows else: rec_data = recarray_fromrecords(rows) data = [rec_data[name] for name in rec_data.dtype.names] # Infer the type of the input data and set up the initialization # function, number of columns, and potentially the default col names default_names = None if (isinstance(data, np.ndarray) and data.shape == (0,) and not data.dtype.names): data = None if isinstance(data, self.Row): data = data._table[data._index:data._index + 1] if isinstance(data, (list, tuple)): init_func = self._init_from_list if data and (is_list_of_dict or all(isinstance(row, dict) for row in data)): n_cols = len(data[0]) else: n_cols = len(data) elif isinstance(data, np.ndarray): if data.dtype.names: init_func = self._init_from_ndarray # _struct n_cols = len(data.dtype.names) default_names = data.dtype.names else: init_func = self._init_from_ndarray # _homog if data.shape == (): raise ValueError('Can not initialize a Table with a scalar') elif len(data.shape) == 1: data = data[np.newaxis, :] n_cols = data.shape[1] elif isinstance(data, dict): init_func = self._init_from_dict default_names = list(data) n_cols = len(default_names) elif isinstance(data, Table): init_func = self._init_from_table n_cols = len(data.colnames) default_names = data.colnames # don't copy indices if the input Table is in non-copy mode self._init_indices = self._init_indices and data._copy_indices elif data is None: if names is None: if dtype is None: return # Empty table try: # No data nor names but dtype is available. This must be # valid to initialize a structured array. dtype = np.dtype(dtype) names = dtype.names dtype = [dtype[name] for name in names] except: raise ValueError('dtype was specified but could not be ' 'parsed for column names') # names is guaranteed to be set at this point init_func = self._init_from_list n_cols = len(names) data = [[]] * n_cols else: raise ValueError('Data type {0} not allowed to init Table' .format(type(data))) # Set up defaults if names and/or dtype are not specified. # A value of None means the actual value will be inferred # within the appropriate initialization routine, either from # existing specification or auto-generated. if names is None: names = default_names or [None] * n_cols if dtype is None: dtype = [None] * n_cols # Numpy does not support Unicode column names on Python 2, or # bytes column names on Python 3, so fix them up now. names = [fix_column_name(name) for name in names] self._check_names_dtype(names, dtype, n_cols) # Finally do the real initialization init_func(data, names, dtype, n_cols, copy) # Whatever happens above, the masked property should be set to a boolean if type(self.masked) != bool: raise TypeError("masked property has not been set to True or False") def __getstate__(self): columns = OrderedDict((key, col if isinstance(col, BaseColumn) else col_copy(col)) for key, col in self.columns.items()) return (columns, self.meta) def __setstate__(self, state): columns, meta = state self.__init__(columns, meta=meta) @property def mask(self): # Dynamic view of available masks if self.masked: return Table([col.mask for col in self.columns.values()], names=self.colnames, copy=False) else: return None @mask.setter def mask(self, val): self.mask[:] = val @property def _mask(self): """This is needed so that comparison of a masked Table and a MaskedArray works. The requirement comes from numpy.ma.core so don't remove this property.""" return self.as_array().mask def filled(self, fill_value=None): """Return a copy of self, with masked values filled. If input ``fill_value`` supplied then that value is used for all masked entries in the table. Otherwise the individual ``fill_value`` defined for each table column is used. Parameters ---------- fill_value : str If supplied, this ``fill_value`` is used for all masked entries in the entire table. Returns ------- filled_table : Table New table with masked values filled """ if self.masked: data = [col.filled(fill_value) for col in six.itervalues(self.columns)] else: data = self return self.__class__(data, meta=deepcopy(self.meta)) @property def indices(self): ''' Return the indices associated with columns of the table as a TableIndices object. ''' lst = [] for column in self.columns.values(): for index in column.info.indices: if sum([index is x for x in lst]) == 0: # ensure uniqueness lst.append(index) return TableIndices(lst) @property def loc(self): ''' Return a TableLoc object that can be used for retrieving rows by index in a given data range. Note that both loc and iloc work only with single-column indices. ''' return TableLoc(self) @property def iloc(self): ''' Return a TableILoc object that can be used for retrieving indexed rows in the order they appear in the index. ''' return TableILoc(self) def add_index(self, colnames, engine=None, unique=False): ''' Insert a new index among one or more columns. If there are no indices, make this index the primary table index. Parameters ---------- colnames : str or list List of column names (or a single column name) to index engine : type or None Indexing engine class to use, from among SortedArray, BST, FastBST, and FastRBT. If the supplied argument is None (by default), use SortedArray. unique : bool (defaults to False) Whether the values of the index must be unique ''' if isinstance(colnames, six.string_types): colnames = (colnames,) columns = self.columns[tuple(colnames)].values() # make sure all columns support indexing for col in columns: if not getattr(col.info, '_supports_indexing', False): raise ValueError('Cannot create an index on column "{0}", of ' 'type "{1}"'.format(col.info.name, type(col))) index = Index(columns, engine=engine, unique=unique) if not self.indices: self.primary_key = colnames for col in columns: col.info.indices.append(index) def remove_indices(self, colname): ''' Remove all indices involving the given column. If the primary index is removed, the new primary index will be the most recently added remaining index. Parameters ---------- colname : str Name of column ''' col = self.columns[colname] for index in self.indices: try: index.col_position(col.info.name) except ValueError: pass else: for c in index.columns: c.info.indices.remove(index) def index_mode(self, mode): ''' Return a context manager for an indexing mode. Parameters ---------- mode : str Either 'freeze', 'copy_on_getitem', or 'discard_on_copy'. In 'discard_on_copy' mode, indices are not copied whenever columns or tables are copied. In 'freeze' mode, indices are not modified whenever columns are modified; at the exit of the context, indices refresh themselves based on column values. This mode is intended for scenarios in which one intends to make many additions or modifications in an indexed column. In 'copy_on_getitem' mode, indices are copied when taking column slices as well as table slices, so col[i0:i1] will preserve indices. ''' return _IndexModeContext(self, mode) def __array__(self, dtype=None): """Support converting Table to np.array via np.array(table). Coercion to a different dtype via np.array(table, dtype) is not supported and will raise a ValueError. """ if dtype is not None: raise ValueError('Datatype coercion is not allowed') # This limitation is because of the following unexpected result that # should have made a table copy while changing the column names. # # >>> d = astropy.table.Table([[1,2],[3,4]]) # >>> np.array(d, dtype=[('a', 'i8'), ('b', 'i8')]) # array([(0, 0), (0, 0)], # dtype=[('a', ' 1: col = col.view(NdarrayMixin) if isinstance(col, (Column, MaskedColumn)): col = self.ColumnClass(name=(name or col.info.name or def_name), data=col, dtype=dtype, copy=copy, copy_indices=self._init_indices) elif self._add_as_mixin_column(col): # Copy the mixin column attributes if they exist since the copy below # may not get this attribute. if copy: col = col_copy(col, copy_indices=self._init_indices) col.info.name = name or col.info.name or def_name elif isinstance(col, np.ndarray) or isiterable(col): col = self.ColumnClass(name=(name or def_name), data=col, dtype=dtype, copy=copy, copy_indices=self._init_indices) else: raise ValueError('Elements in list initialization must be ' 'either Column or list-like') cols.append(col) self._init_from_cols(cols) def _init_from_ndarray(self, data, names, dtype, n_cols, copy): """Initialize table from an ndarray structured array""" data_names = data.dtype.names or _auto_names(n_cols) struct = data.dtype.names is not None names = [name or data_names[i] for i, name in enumerate(names)] cols = ([data[name] for name in data_names] if struct else [data[:, i] for i in range(n_cols)]) # Set self.masked appropriately, then get class to create column instances. self._set_masked_from_cols(cols) if copy: self._init_from_list(cols, names, dtype, n_cols, copy) else: dtype = [(name, col.dtype, col.shape[1:]) for name, col in zip(names, cols)] newdata = data.view(dtype).ravel() columns = self.TableColumns() for name in names: columns[name] = self.ColumnClass(name=name, data=newdata[name]) columns[name].info.parent_table = self self.columns = columns def _init_from_dict(self, data, names, dtype, n_cols, copy): """Initialize table from a dictionary of columns""" # TODO: is this restriction still needed with no ndarray? if not copy: raise ValueError('Cannot use copy=False with a dict data input') data_list = [data[name] for name in names] self._init_from_list(data_list, names, dtype, n_cols, copy) def _init_from_table(self, data, names, dtype, n_cols, copy): """Initialize table from an existing Table object """ table = data # data is really a Table, rename for clarity self.meta.clear() self.meta.update(deepcopy(table.meta)) cols = list(table.columns.values()) self._init_from_list(cols, names, dtype, n_cols, copy) def _convert_col_for_table(self, col): """ Make sure that all Column objects have correct class for this type of Table. For a base Table this most commonly means setting to MaskedColumn if the table is masked. Table subclasses like QTable override this method. """ if isinstance(col, Column) and not col.__class__ is self.ColumnClass: col = self.ColumnClass(col) # copy attributes and reference data return col def _init_from_cols(self, cols): """Initialize table from a list of Column or mixin objects""" lengths = set(len(col) for col in cols) if len(lengths) != 1: raise ValueError('Inconsistent data column lengths: {0}' .format(lengths)) # Set the table masking self._set_masked_from_cols(cols) # Make sure that all Column-based objects have correct class. For # plain Table this is self.ColumnClass, but for instance QTable will # convert columns with units to a Quantity mixin. newcols = [self._convert_col_for_table(col) for col in cols] self._make_table_from_cols(self, newcols) def _new_from_slice(self, slice_): """Create a new table as a referenced slice from self.""" table = self.__class__(masked=self.masked) table.meta.clear() table.meta.update(deepcopy(self.meta)) cols = self.columns.values() newcols = [] for col in cols: col.info._copy_indices = self._copy_indices newcol = col[slice_] if col.info.indices: newcol = col.info.slice_indices(newcol, slice_, len(col)) newcols.append(newcol) col.info._copy_indices = True self._make_table_from_cols(table, newcols) return table @staticmethod def _make_table_from_cols(table, cols): """ Make ``table`` in-place so that it represents the given list of ``cols``. """ colnames = set(col.info.name for col in cols) if None in colnames: raise TypeError('Cannot have None for column name') if len(colnames) != len(cols): raise ValueError('Duplicate column names') columns = table.TableColumns((col.info.name, col) for col in cols) for col in cols: col.info.parent_table = table if table.masked and not hasattr(col, 'mask'): col.mask = FalseArray(col.shape) table.columns = columns def _base_repr_(self, html=False, descr_vals=None, max_width=None, tableid=None, show_dtype=True, max_lines=None, tableclass=None): if descr_vals is None: descr_vals = [self.__class__.__name__] if self.masked: descr_vals.append('masked=True') descr_vals.append('length={0}'.format(len(self))) descr = '<' + ' '.join(descr_vals) + '>\n' if html: from ..utils.xml.writer import xml_escape descr = xml_escape(descr) if tableid is None: tableid = 'table{id}'.format(id=id(self)) data_lines, outs = self.formatter._pformat_table( self, tableid=tableid, html=html, max_width=max_width, show_name=True, show_unit=None, show_dtype=show_dtype, max_lines=max_lines, tableclass=tableclass) out = descr + '\n'.join(data_lines) if six.PY2 and isinstance(out, six.text_type): out = out.encode('utf-8') return out def _repr_html_(self): return self._base_repr_(html=True, max_width=-1) def __repr__(self): return self._base_repr_(html=False, max_width=None) def __unicode__(self): return '\n'.join(self.pformat()) if six.PY3: __str__ = __unicode__ def __bytes__(self): return six.text_type(self).encode('utf-8') if six.PY2: __str__ = __bytes__ @property def has_mixin_columns(self): """ True if table has any mixin columns (defined as columns that are not Column subclasses) """ return any(has_info_class(col, MixinInfo) for col in self.columns.values()) def _add_as_mixin_column(self, col): """ Determine if ``col`` should be added to the table directly as a mixin column. """ if isinstance(col, BaseColumn): return False # Is it a mixin but not not Quantity (which gets converted to Column with # unit set). return has_info_class(col, MixinInfo) and not isinstance(col, Quantity) def pprint(self, max_lines=None, max_width=None, show_name=True, show_unit=None, show_dtype=False, align=None): """Print a formatted string representation of the table. If no value of ``max_lines`` is supplied then the height of the screen terminal is used to set ``max_lines``. If the terminal height cannot be determined then the default is taken from the configuration item ``astropy.conf.max_lines``. If a negative value of ``max_lines`` is supplied then there is no line limit applied. The same applies for max_width except the configuration item is ``astropy.conf.max_width``. Parameters ---------- max_lines : int Maximum number of lines in table output max_width : int or `None` Maximum character width of output show_name : bool Include a header row for column names (default=True) show_unit : bool Include a header row for unit. Default is to show a row for units only if one or more columns has a defined value for the unit. show_dtype : bool Include a header row for column dtypes (default=True) align : str or list or tuple or `None` Left/right alignment of columns. Default is right (None) for all columns. Other allowed values are '>', '<', '^', and '0=' for right, left, centered, and 0-padded, respectively. A list of strings can be provided for alignment of tables with multiple columns. """ lines, outs = self.formatter._pformat_table(self, max_lines, max_width, show_name=show_name, show_unit=show_unit, show_dtype=show_dtype, align=align) if outs['show_length']: lines.append('Length = {0} rows'.format(len(self))) n_header = outs['n_header'] for i, line in enumerate(lines): if i < n_header: color_print(line, 'red') else: print(line) def show_in_notebook(self, tableid=None, css=None, display_length=50, table_class='table table-striped table-bordered ' 'table-condensed'): """Render the table in HTML and show it in the IPython notebook. Parameters ---------- tableid : str or `None` An html ID tag for the table. Default is ``table{id}-XXX``, where id is the unique integer id of the table object, id(self), and XXX is a random number to avoid conflicts when printing the same table multiple times. table_class : str or `None` A string with a list of HTML classes used to style the table. Default is "table table-striped table-bordered table-condensed", using Bootstrap which is available in the notebook. See `this page `_ for the list of classes. css : string A valid CSS string declaring the formatting for the table. Default to ``astropy.table.jsviewer.DEFAULT_CSS_NB``. display_length : int, optional Number or rows to show. Default to 50. Notes ----- Currently, unlike `show_in_browser` (with ``jsviewer=True``), this method needs to access online javascript code repositories. This is due to modern browsers' limitations on accessing local files. Hence, if you call this method while offline (and don't have a cached version of jquery and jquery.dataTables), you will not get the jsviewer features. """ from .jsviewer import JSViewer from IPython.display import HTML if tableid is None: tableid = 'table{0}-{1}'.format(id(self), np.random.randint(1, 1e6)) jsv = JSViewer(display_length=display_length) html = self._base_repr_(html=True, max_width=-1, tableid=tableid, max_lines=-1, show_dtype=False, tableclass=table_class) html += jsv.ipynb(tableid, css=css) return HTML(html) def show_in_browser(self, max_lines=5000, jsviewer=False, browser='default', jskwargs={'use_local_files': True}, tableid=None, table_class="display compact", css=None): """Render the table in HTML and show it in a web browser. Parameters ---------- css : string A valid CSS string declaring the formatting for the table. Default to ``astropy.table.jsviewer.DEFAULT_CSS``. max_lines : int Maximum number of rows to export to the table (set low by default to avoid memory issues, since the browser view requires duplicating the table in memory). A negative value of ``max_lines`` indicates no row limit. jsviewer : bool If `True`, prepends some javascript headers so that the table is rendered as a `DataTables `_ data table. This allows in-browser searching & sorting. jskwargs : dict Passed to the `astropy.table.JSViewer` init. Default to ``{'use_local_files': True}`` which means that the JavaScript libraries will be served from local copies. tableid : str or `None` An html ID tag for the table. Default is ``table{id}``, where id is the unique integer id of the table object, id(self). table_class : str or `None` A string with a list of HTML classes used to style the table. Default is "display compact", and other possible values can be found in http://www.datatables.net/manual/styling/classes browser : str Any legal browser name, e.g. ``'firefox'``, ``'chrome'``, ``'safari'`` (for mac, you may need to use ``'open -a "/Applications/Google Chrome.app" %s'`` for Chrome). If ``'default'``, will use the system default browser. """ import os import webbrowser import tempfile from ..extern.six.moves.urllib.parse import urljoin from ..extern.six.moves.urllib.request import pathname2url from .jsviewer import DEFAULT_CSS if css is None: css = DEFAULT_CSS # We can't use NamedTemporaryFile here because it gets deleted as # soon as it gets garbage collected. tmpdir = tempfile.mkdtemp() path = os.path.join(tmpdir, 'table.html') with open(path, 'w') as tmp: if jsviewer: self.write(tmp, format='jsviewer', css=css, max_lines=max_lines, jskwargs=jskwargs, table_id=tableid, table_class=table_class) else: self.write(tmp, format='html') try: br = webbrowser.get(None if browser == 'default' else browser) except webbrowser.Error: log.error("Browser '%s' not found." % browser) else: br.open(urljoin('file:', pathname2url(path))) def pformat(self, max_lines=None, max_width=None, show_name=True, show_unit=None, show_dtype=False, html=False, tableid=None, align=None, tableclass=None): """Return a list of lines for the formatted string representation of the table. If no value of ``max_lines`` is supplied then the height of the screen terminal is used to set ``max_lines``. If the terminal height cannot be determined then the default is taken from the configuration item ``astropy.conf.max_lines``. If a negative value of ``max_lines`` is supplied then there is no line limit applied. The same applies for ``max_width`` except the configuration item is ``astropy.conf.max_width``. Parameters ---------- max_lines : int or `None` Maximum number of rows to output max_width : int or `None` Maximum character width of output show_name : bool Include a header row for column names (default=True) show_unit : bool Include a header row for unit. Default is to show a row for units only if one or more columns has a defined value for the unit. show_dtype : bool Include a header row for column dtypes (default=True) html : bool Format the output as an HTML table (default=False) tableid : str or `None` An ID tag for the table; only used if html is set. Default is "table{id}", where id is the unique integer id of the table object, id(self) align : str or list or tuple or `None` Left/right alignment of columns. Default is right (None) for all columns. Other allowed values are '>', '<', '^', and '0=' for right, left, centered, and 0-padded, respectively. A list of strings can be provided for alignment of tables with multiple columns. tableclass : str or list of str or `None` CSS classes for the table; only used if html is set. Default is none Returns ------- lines : list Formatted table as a list of strings """ lines, outs = self.formatter._pformat_table( self, max_lines, max_width, show_name=show_name, show_unit=show_unit, show_dtype=show_dtype, html=html, tableid=tableid, tableclass=tableclass, align=align) if outs['show_length']: lines.append('Length = {0} rows'.format(len(self))) return lines def more(self, max_lines=None, max_width=None, show_name=True, show_unit=None, show_dtype=False): """Interactively browse table with a paging interface. Supported keys:: f, : forward one page b : back one page r : refresh same page n : next row p : previous row < : go to beginning > : go to end q : quit browsing h : print this help Parameters ---------- max_lines : int Maximum number of lines in table output max_width : int or `None` Maximum character width of output show_name : bool Include a header row for column names (default=True) show_unit : bool Include a header row for unit. Default is to show a row for units only if one or more columns has a defined value for the unit. show_dtype : bool Include a header row for column dtypes (default=True) """ self.formatter._more_tabcol(self, max_lines, max_width, show_name=show_name, show_unit=show_unit, show_dtype=show_dtype) def __getitem__(self, item): if isinstance(item, six.string_types): return self.columns[item] elif isinstance(item, (int, np.integer)): return self.Row(self, item) elif (isinstance(item, (tuple, list)) and item and all(isinstance(x, six.string_types) for x in item)): bad_names = [x for x in item if x not in self.colnames] if bad_names: raise ValueError('Slice name(s) {0} not valid column name(s)' .format(', '.join(bad_names))) out = self.__class__([self[x] for x in item], meta=deepcopy(self.meta), copy_indices=self._copy_indices) out._groups = groups.TableGroups(out, indices=self.groups._indices, keys=self.groups._keys) return out elif ((isinstance(item, np.ndarray) and len(item) == 0) or (isinstance(item, (tuple, list)) and not item)): # If item is an empty array/list/tuple then return the table with no rows return self._new_from_slice([]) elif (isinstance(item, slice) or isinstance(item, np.ndarray) or isinstance(item, list) or isinstance(item, tuple) and all(isinstance(x, np.ndarray) for x in item)): # here for the many ways to give a slice; a tuple of ndarray # is produced by np.where, as in t[np.where(t['a'] > 2)] # For all, a new table is constructed with slice of all columns return self._new_from_slice(item) else: raise ValueError('Illegal type {0} for table item access' .format(type(item))) def __setitem__(self, item, value): # If the item is a string then it must be the name of a column. # If that column doesn't already exist then create it now. if isinstance(item, six.string_types) and item not in self.colnames: NewColumn = self.MaskedColumn if self.masked else self.Column # If value doesn't have a dtype and won't be added as a mixin then # convert to a numpy array. if not hasattr(value, 'dtype') and not self._add_as_mixin_column(value): value = np.asarray(value) # Structured ndarray gets viewed as a mixin if isinstance(value, np.ndarray) and len(value.dtype) > 1: value = value.view(NdarrayMixin) # Make new column and assign the value. If the table currently # has no rows (len=0) of the value is already a Column then # define new column directly from value. In the latter case # this allows for propagation of Column metadata. Otherwise # define a new column with the right length and shape and then # set it from value. This allows for broadcasting, e.g. t['a'] # = 1. name = item # If this is a column-like object that could be added directly to table if isinstance(value, BaseColumn) or self._add_as_mixin_column(value): new_column = col_copy(value) new_column.info.name = name elif len(self) == 0: new_column = NewColumn(value, name=name) else: new_column = NewColumn(name=name, length=len(self), dtype=value.dtype, shape=value.shape[1:]) new_column[:] = value if isinstance(value, Quantity): new_column.unit = value.unit # Now add new column to the table self.add_columns([new_column], copy=False) else: n_cols = len(self.columns) if isinstance(item, six.string_types): # Set an existing column self.columns[item][:] = value elif isinstance(item, (int, np.integer)): # Set the corresponding row assuming value is an iterable. if not hasattr(value, '__len__'): raise TypeError('Right side value must be iterable') if len(value) != n_cols: raise ValueError('Right side value needs {0} elements (one for each column)' .format(n_cols)) for col, val in izip(self.columns.values(), value): col[item] = val elif (isinstance(item, slice) or isinstance(item, np.ndarray) or isinstance(item, list) or (isinstance(item, tuple) and # output from np.where all(isinstance(x, np.ndarray) for x in item))): if isinstance(value, Table): vals = (col for col in value.columns.values()) elif isinstance(value, np.ndarray) and value.dtype.names: vals = (value[name] for name in value.dtype.names) elif np.isscalar(value): import itertools vals = itertools.repeat(value, n_cols) else: # Assume this is an iterable that will work if len(value) != n_cols: raise ValueError('Right side value needs {0} elements (one for each column)' .format(n_cols)) vals = value for col, val in izip(self.columns.values(), vals): col[item] = val else: raise ValueError('Illegal type {0} for table item access' .format(type(item))) def __delitem__(self, item): if isinstance(item, six.string_types): self.remove_column(item) elif isinstance(item, tuple): self.remove_columns(item) def field(self, item): """Return column[item] for recarray compatibility.""" return self.columns[item] @property def masked(self): return self._masked @masked.setter def masked(self, masked): raise Exception('Masked attribute is read-only (use t = Table(t, masked=True)' ' to convert to a masked table)') def _set_masked(self, masked): """ Set the table masked property. Parameters ---------- masked : bool State of table masking (`True` or `False`) """ if hasattr(self, '_masked'): # The only allowed change is from None to False or True, or False to True if self._masked is None and masked in [False, True]: self._masked = masked elif self._masked is False and masked is True: log.info("Upgrading Table to masked Table. Use Table.filled() to convert to unmasked table.") self._masked = masked elif self._masked is masked: raise Exception("Masked attribute is already set to {0}".format(masked)) else: raise Exception("Cannot change masked attribute to {0} once it is set to {1}" .format(masked, self._masked)) else: if masked in [True, False, None]: self._masked = masked else: raise ValueError("masked should be one of True, False, None") if self._masked: self._column_class = self.MaskedColumn else: self._column_class = self.Column @property def ColumnClass(self): if self._column_class is None: return self.Column else: return self._column_class @property def dtype(self): return np.dtype([descr(col) for col in self.columns.values()]) @property def colnames(self): return list(self.columns.keys()) def keys(self): return list(self.columns.keys()) def __len__(self): if len(self.columns) == 0: return 0 lengths = set(len(col) for col in self.columns.values()) if len(lengths) != 1: len_strs = [' {0} : {1}'.format(name, len(col)) for name, col in self.columns.items()] raise ValueError('Column length mismatch:\n{0}'.format('\n'.join(len_strs))) return lengths.pop() def index_column(self, name): """ Return the positional index of column ``name``. Parameters ---------- name : str column name Returns ------- index : int Positional index of column ``name``. Examples -------- Create a table with three columns 'a', 'b' and 'c':: >>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3], ['x', 'y', 'z']], ... names=('a', 'b', 'c')) >>> print(t) a b c --- --- --- 1 0.1 x 2 0.2 y 3 0.3 z Get index of column 'b' of the table:: >>> t.index_column('b') 1 """ try: return self.colnames.index(name) except ValueError: raise ValueError("Column {0} does not exist".format(name)) def add_column(self, col, index=None, rename_duplicate=False): """ Add a new Column object ``col`` to the table. If ``index`` is supplied then insert column before ``index`` position in the list of columns, otherwise append column to the end of the list. Parameters ---------- col : Column Column object to add. index : int or `None` Insert column before this position or at end (default) rename_duplicate : bool Uniquify column name if it already exist (default=False) Examples -------- Create a table with two columns 'a' and 'b':: >>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3]], names=('a', 'b')) >>> print(t) a b --- --- 1 0.1 2 0.2 3 0.3 Create a third column 'c' and append it to the end of the table:: >>> col_c = Column(name='c', data=['x', 'y', 'z']) >>> t.add_column(col_c) >>> print(t) a b c --- --- --- 1 0.1 x 2 0.2 y 3 0.3 z Add column 'd' at position 1. Note that the column is inserted before the given index:: >>> col_d = Column(name='d', data=['a', 'b', 'c']) >>> t.add_column(col_d, 1) >>> print(t) a d b c --- --- --- --- 1 a 0.1 x 2 b 0.2 y 3 c 0.3 z Add second column named 'b' with rename_duplicate:: >>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3]], names=('a', 'b')) >>> col_b = Column(name='b', data=[1.1, 1.2, 1.3]) >>> t.add_column(col_b, rename_duplicate=True) >>> print(t) a b b_1 --- --- --- 1 0.1 1.1 2 0.2 1.2 3 0.3 1.3 To add several columns use add_columns. """ if index is None: index = len(self.columns) self.add_columns([col], [index], rename_duplicate=rename_duplicate) def add_columns(self, cols, indexes=None, copy=True, rename_duplicate=False): """ Add a list of new Column objects ``cols`` to the table. If a corresponding list of ``indexes`` is supplied then insert column before each ``index`` position in the *original* list of columns, otherwise append columns to the end of the list. Parameters ---------- cols : list of Columns Column objects to add. indexes : list of ints or `None` Insert column before this position or at end (default) copy : bool Make a copy of the new columns (default=True) rename_duplicate : bool Uniquify new column names if they duplicate the existing ones (default=False) Examples -------- Create a table with two columns 'a' and 'b':: >>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3]], names=('a', 'b')) >>> print(t) a b --- --- 1 0.1 2 0.2 3 0.3 Create column 'c' and 'd' and append them to the end of the table:: >>> col_c = Column(name='c', data=['x', 'y', 'z']) >>> col_d = Column(name='d', data=['u', 'v', 'w']) >>> t.add_columns([col_c, col_d]) >>> print(t) a b c d --- --- --- --- 1 0.1 x u 2 0.2 y v 3 0.3 z w Add column 'c' at position 0 and column 'd' at position 1. Note that the columns are inserted before the given position:: >>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3]], names=('a', 'b')) >>> col_c = Column(name='c', data=['x', 'y', 'z']) >>> col_d = Column(name='d', data=['u', 'v', 'w']) >>> t.add_columns([col_c, col_d], [0, 1]) >>> print(t) c a d b --- --- --- --- x 1 u 0.1 y 2 v 0.2 z 3 w 0.3 Add second column 'b' and column 'c' with ``rename_duplicate``:: >>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3]], names=('a', 'b')) >>> col_b = Column(name='b', data=[1.1, 1.2, 1.3]) >>> col_c = Column(name='c', data=['x', 'y', 'z']) >>> t.add_columns([col_b, col_c], rename_duplicate=True) >>> print(t) a b b_1 c --- --- --- --- 1 0.1 1.1 x 2 0.2 1.2 y 3 0.3 1.3 z """ if indexes is None: indexes = [len(self.columns)] * len(cols) elif len(indexes) != len(cols): raise ValueError('Number of indexes must match number of cols') if copy: cols = [col_copy(col) for col in cols] if len(self.columns) == 0: # No existing table data, init from cols newcols = cols else: newcols = list(self.columns.values()) new_indexes = list(range(len(newcols) + 1)) for col, index in zip(cols, indexes): i = new_indexes.index(index) new_indexes.insert(i, None) newcols.insert(i, col) if rename_duplicate: existing_names = set(self.colnames) for col in cols: i = 1 orig_name = col.info.name while col.info.name in existing_names: # If the column belongs to another table then copy it # before renaming if col.info.parent_table is not None: col = col_copy(col) new_name = '{0}_{1}'.format(orig_name, i) col.info.name = new_name i += 1 existing_names.add(new_name) self._init_from_cols(newcols) def replace_column(self, name, col): """ Replace column ``name`` with the new ``col`` object. Parameters ---------- name : str Name of column to replace col : column object (list, ndarray, Column, etc) New column object to replace the existing column Examples -------- Replace column 'a' with a float version of itself:: >>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3]], names=('a', 'b')) >>> float_a = t['a'].astype(float) >>> t.replace_column('a', float_a) """ if name not in self.colnames: raise ValueError('column name {0} is not in the table'.format(name)) if self[name].indices: raise ValueError('cannot replace a table index column') t = self.__class__([col], names=[name]) cols = OrderedDict(self.columns) cols[name] = t[name] self._init_from_cols(cols.values()) def remove_row(self, index): """ Remove a row from the table. Parameters ---------- index : int Index of row to remove Examples -------- Create a table with three columns 'a', 'b' and 'c':: >>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3], ['x', 'y', 'z']], ... names=('a', 'b', 'c')) >>> print(t) a b c --- --- --- 1 0.1 x 2 0.2 y 3 0.3 z Remove row 1 from the table:: >>> t.remove_row(1) >>> print(t) a b c --- --- --- 1 0.1 x 3 0.3 z To remove several rows at the same time use remove_rows. """ # check the index against the types that work with np.delete if not isinstance(index, (six.integer_types, np.integer)): raise TypeError("Row index must be an integer") self.remove_rows(index) def remove_rows(self, row_specifier): """ Remove rows from the table. Parameters ---------- row_specifier : slice, int, or array of ints Specification for rows to remove Examples -------- Create a table with three columns 'a', 'b' and 'c':: >>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3], ['x', 'y', 'z']], ... names=('a', 'b', 'c')) >>> print(t) a b c --- --- --- 1 0.1 x 2 0.2 y 3 0.3 z Remove rows 0 and 2 from the table:: >>> t.remove_rows([0, 2]) >>> print(t) a b c --- --- --- 2 0.2 y Note that there are no warnings if the slice operator extends outside the data:: >>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3], ['x', 'y', 'z']], ... names=('a', 'b', 'c')) >>> t.remove_rows(slice(10, 20, 1)) >>> print(t) a b c --- --- --- 1 0.1 x 2 0.2 y 3 0.3 z """ # Update indices for index in self.indices: index.remove_rows(row_specifier) keep_mask = np.ones(len(self), dtype=np.bool) keep_mask[row_specifier] = False columns = self.TableColumns() for name, col in self.columns.items(): newcol = col[keep_mask] newcol.info.parent_table = self columns[name] = newcol self._replace_cols(columns) # Revert groups to default (ungrouped) state if hasattr(self, '_groups'): del self._groups def remove_column(self, name): """ Remove a column from the table. This can also be done with:: del table[name] Parameters ---------- name : str Name of column to remove Examples -------- Create a table with three columns 'a', 'b' and 'c':: >>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3], ['x', 'y', 'z']], ... names=('a', 'b', 'c')) >>> print(t) a b c --- --- --- 1 0.1 x 2 0.2 y 3 0.3 z Remove column 'b' from the table:: >>> t.remove_column('b') >>> print(t) a c --- --- 1 x 2 y 3 z To remove several columns at the same time use remove_columns. """ self.remove_columns([name]) def remove_columns(self, names): ''' Remove several columns from the table. Parameters ---------- names : list A list containing the names of the columns to remove Examples -------- Create a table with three columns 'a', 'b' and 'c':: >>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3], ['x', 'y', 'z']], ... names=('a', 'b', 'c')) >>> print(t) a b c --- --- --- 1 0.1 x 2 0.2 y 3 0.3 z Remove columns 'b' and 'c' from the table:: >>> t.remove_columns(['b', 'c']) >>> print(t) a --- 1 2 3 Specifying only a single column also works. Remove column 'b' from the table:: >>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3], ['x', 'y', 'z']], ... names=('a', 'b', 'c')) >>> t.remove_columns('b') >>> print(t) a c --- --- 1 x 2 y 3 z This gives the same as using remove_column. ''' if isinstance(names, six.string_types): names = [names] for name in names: if name not in self.columns: raise KeyError("Column {0} does not exist".format(name)) for name in names: self.columns.pop(name) def _convert_string_dtype(self, in_kind, out_kind, python3_only): """ Convert string-like columns to/from bytestring and unicode (internal only). Parameters ---------- in_kind : str Input dtype.kind out_kind : str Output dtype.kind python3_only : bool Only do this operation for Python 3 """ if python3_only and not six.PY3: return # If there are no `in_kind` columns then do nothing cols = self.columns.values() if not any(col.dtype.kind == in_kind for col in cols): return newcols = [] for col in cols: if col.dtype.kind == in_kind: newdtype = re.sub(in_kind, out_kind, col.dtype.str) newcol = col.__class__(col, dtype=newdtype) else: newcol = col newcols.append(newcol) self._init_from_cols(newcols) def convert_bytestring_to_unicode(self, python3_only=False): """ Convert bytestring columns (dtype.kind='S') to unicode (dtype.kind='U') assuming ASCII encoding. Internally this changes string columns to represent each character in the string with a 4-byte UCS-4 equivalent, so it is inefficient for memory but allows Python 3 scripts to manipulate string arrays with natural syntax. The ``python3_only`` parameter is provided as a convenience so that code can be written in a Python 2 / 3 compatible way:: >>> t = Table.read('my_data.fits') >>> t.convert_bytestring_to_unicode(python3_only=True) Parameters ---------- python3_only : bool Only do this operation for Python 3 """ self._convert_string_dtype('S', 'U', python3_only) def convert_unicode_to_bytestring(self, python3_only=False): """ Convert ASCII-only unicode columns (dtype.kind='U') to bytestring (dtype.kind='S'). When exporting a unicode string array to a file in Python 3, it may be desirable to encode unicode columns as bytestrings. This routine takes advantage of numpy automated conversion which works for strings that are pure ASCII. The ``python3_only`` parameter is provided as a convenience so that code can be written in a Python 2 / 3 compatible way:: >>> t.convert_unicode_to_bytestring(python3_only=True) >>> t.write('my_data.fits') Parameters ---------- python3_only : bool Only do this operation for Python 3 """ self._convert_string_dtype('U', 'S', python3_only) def keep_columns(self, names): ''' Keep only the columns specified (remove the others). Parameters ---------- names : list A list containing the names of the columns to keep. All other columns will be removed. Examples -------- Create a table with three columns 'a', 'b' and 'c':: >>> t = Table([[1, 2, 3],[0.1, 0.2, 0.3],['x', 'y', 'z']], ... names=('a', 'b', 'c')) >>> print(t) a b c --- --- --- 1 0.1 x 2 0.2 y 3 0.3 z Specifying only a single column name keeps only this column. Keep only column 'a' of the table:: >>> t.keep_columns('a') >>> print(t) a --- 1 2 3 Specifying a list of column names is keeps is also possible. Keep columns 'a' and 'c' of the table:: >>> t = Table([[1, 2, 3],[0.1, 0.2, 0.3],['x', 'y', 'z']], ... names=('a', 'b', 'c')) >>> t.keep_columns(['a', 'c']) >>> print(t) a c --- --- 1 x 2 y 3 z ''' if isinstance(names, six.string_types): names = [names] for name in names: if name not in self.columns: raise KeyError("Column {0} does not exist".format(name)) remove = list(set(self.keys()) - set(names)) self.remove_columns(remove) def rename_column(self, name, new_name): ''' Rename a column. This can also be done directly with by setting the ``name`` attribute for a column:: table[name].name = new_name TODO: this won't work for mixins Parameters ---------- name : str The current name of the column. new_name : str The new name for the column Examples -------- Create a table with three columns 'a', 'b' and 'c':: >>> t = Table([[1,2],[3,4],[5,6]], names=('a','b','c')) >>> print(t) a b c --- --- --- 1 3 5 2 4 6 Renaming column 'a' to 'aa':: >>> t.rename_column('a' , 'aa') >>> print(t) aa b c --- --- --- 1 3 5 2 4 6 ''' if name not in self.keys(): raise KeyError("Column {0} does not exist".format(name)) if not isinstance(self.columns[name], BaseColumn): raise NotImplementedError('cannot rename a mixin column') self.columns[name].info.name = new_name def add_row(self, vals=None, mask=None): """Add a new row to the end of the table. The ``vals`` argument can be: sequence (e.g. tuple or list) Column values in the same order as table columns. mapping (e.g. dict) Keys corresponding to column names. Missing values will be filled with np.zeros for the column dtype. `None` All values filled with np.zeros for the column dtype. This method requires that the Table object "owns" the underlying array data. In particular one cannot add a row to a Table that was initialized with copy=False from an existing array. The ``mask`` attribute should give (if desired) the mask for the values. The type of the mask should match that of the values, i.e. if ``vals`` is an iterable, then ``mask`` should also be an iterable with the same length, and if ``vals`` is a mapping, then ``mask`` should be a dictionary. Parameters ---------- vals : tuple, list, dict or `None` Use the specified values in the new row mask : tuple, list, dict or `None` Use the specified mask values in the new row Examples -------- Create a table with three columns 'a', 'b' and 'c':: >>> t = Table([[1,2],[4,5],[7,8]], names=('a','b','c')) >>> print(t) a b c --- --- --- 1 4 7 2 5 8 Adding a new row with entries '3' in 'a', '6' in 'b' and '9' in 'c':: >>> t.add_row([3,6,9]) >>> print(t) a b c --- --- --- 1 4 7 2 5 8 3 6 9 """ self.insert_row(len(self), vals, mask) def insert_row(self, index, vals=None, mask=None): """Add a new row before the given ``index`` position in the table. The ``vals`` argument can be: sequence (e.g. tuple or list) Column values in the same order as table columns. mapping (e.g. dict) Keys corresponding to column names. Missing values will be filled with np.zeros for the column dtype. `None` All values filled with np.zeros for the column dtype. The ``mask`` attribute should give (if desired) the mask for the values. The type of the mask should match that of the values, i.e. if ``vals`` is an iterable, then ``mask`` should also be an iterable with the same length, and if ``vals`` is a mapping, then ``mask`` should be a dictionary. Parameters ---------- vals : tuple, list, dict or `None` Use the specified values in the new row mask : tuple, list, dict or `None` Use the specified mask values in the new row """ colnames = self.colnames N = len(self) if index < -N or index > N: raise IndexError("Index {0} is out of bounds for table with length {1}" .format(index, N)) if index < 0: index += N def _is_mapping(obj): """Minimal checker for mapping (dict-like) interface for obj""" attrs = ('__getitem__', '__len__', '__iter__', 'keys', 'values', 'items') return all(hasattr(obj, attr) for attr in attrs) if mask is not None and not self.masked: # Possibly issue upgrade warning and update self.ColumnClass. This # does not change the existing columns. self._set_masked(True) if _is_mapping(vals) or vals is None: # From the vals and/or mask mappings create the corresponding lists # that have entries for each table column. if mask is not None and not _is_mapping(mask): raise TypeError("Mismatch between type of vals and mask") # Now check that the mask is specified for the same keys as the # values, otherwise things get really confusing. if mask is not None and set(vals.keys()) != set(mask.keys()): raise ValueError('keys in mask should match keys in vals') if vals and any(name not in colnames for name in vals): raise ValueError('Keys in vals must all be valid column names') vals_list = [] mask_list = [] for name in colnames: if vals and name in vals: vals_list.append(vals[name]) mask_list.append(False if mask is None else mask[name]) else: col = self[name] if hasattr(col, 'dtype'): # Make a placeholder zero element of the right type which is masked. # This assumes the appropriate insert() method will broadcast a # numpy scalar to the right shape. vals_list.append(np.zeros(shape=(), dtype=col.dtype)) # For masked table any unsupplied values are masked by default. mask_list.append(self.masked and vals is not None) else: raise ValueError("Value must be supplied for column '{0}'".format(name)) vals = vals_list mask = mask_list if isiterable(vals): if mask is not None and (not isiterable(mask) or _is_mapping(mask)): raise TypeError("Mismatch between type of vals and mask") if len(self.columns) != len(vals): raise ValueError('Mismatch between number of vals and columns') if mask is not None: if len(self.columns) != len(mask): raise ValueError('Mismatch between number of masks and columns') else: mask = [False] * len(self.columns) else: raise TypeError('Vals must be an iterable or mapping or None') columns = self.TableColumns() try: # Insert val at index for each column for name, col, val, mask_ in izip(colnames, self.columns.values(), vals, mask): # If the new row caused a change in self.ColumnClass then # Column-based classes need to be converted first. This is # typical for adding a row with mask values to an unmasked table. if isinstance(col, Column) and not isinstance(col, self.ColumnClass): col = self.ColumnClass(col, copy=False) newcol = col.insert(index, val) if not isinstance(newcol, BaseColumn): newcol.info.name = name if self.masked: newcol.mask = FalseArray(newcol.shape) if len(newcol) != N + 1: raise ValueError('Incorrect length for column {0} after inserting {1}' ' (expected {2}, got {3})' .format(name, val, len(newcol), N + 1)) newcol.info.parent_table = self # Set mask if needed if self.masked: newcol.mask[index] = mask_ columns[name] = newcol # insert row in indices for table_index in self.indices: table_index.insert_row(index, vals, self.columns.values()) except Exception as err: raise ValueError("Unable to insert row because of exception in column '{0}':\n{1}" .format(name, err)) else: self._replace_cols(columns) # Revert groups to default (ungrouped) state if hasattr(self, '_groups'): del self._groups def _replace_cols(self, columns): for col, new_col in zip(self.columns.values(), columns.values()): new_col.info.indices = [] for index in col.info.indices: index.columns[index.col_position(col.info.name)] = new_col new_col.info.indices.append(index) self.columns = columns def argsort(self, keys=None, kind=None): """ Return the indices which would sort the table according to one or more key columns. This simply calls the `numpy.argsort` function on the table with the ``order`` parameter set to ``keys``. Parameters ---------- keys : str or list of str The column name(s) to order the table by kind : {'quicksort', 'mergesort', 'heapsort'}, optional Sorting algorithm. Returns ------- index_array : ndarray, int Array of indices that sorts the table by the specified key column(s). """ if isinstance(keys, six.string_types): keys = [keys] # use index sorted order if possible if keys is not None: index = get_index(self, self[keys]) if index is not None: return index.sorted_data() kwargs = {} if keys: kwargs['order'] = keys if kind: kwargs['kind'] = kind if keys: data = self[keys].as_array() else: data = self.as_array() if _BROKEN_UNICODE_TABLE_SORT and keys is not None and any( data.dtype[i].kind == 'U' for i in xrange(len(data.dtype))): return np.lexsort([data[key] for key in keys[::-1]]) else: return data.argsort(**kwargs) def sort(self, keys=None): ''' Sort the table according to one or more keys. This operates on the existing table and does not return a new table. Parameters ---------- keys : str or list of str The key(s) to order the table by. If None, use the primary index of the Table. Examples -------- Create a table with 3 columns:: >>> t = Table([['Max', 'Jo', 'John'], ['Miller','Miller','Jackson'], ... [12,15,18]], names=('firstname','name','tel')) >>> print(t) firstname name tel --------- ------- --- Max Miller 12 Jo Miller 15 John Jackson 18 Sorting according to standard sorting rules, first 'name' then 'firstname':: >>> t.sort(['name','firstname']) >>> print(t) firstname name tel --------- ------- --- John Jackson 18 Jo Miller 15 Max Miller 12 ''' if keys is None: if not self.indices: raise ValueError("Table sort requires input keys or a table index") keys = [x.info.name for x in self.indices[0].columns] if type(keys) is not list: keys = [keys] indexes = self.argsort(keys) sort_index = get_index(self, self[keys]) if sort_index is not None: # avoid inefficient relabelling of sorted index prev_frozen = sort_index._frozen sort_index._frozen = True for col in self.columns.values(): col[:] = col.take(indexes, axis=0) if sort_index is not None: # undo index freeze sort_index._frozen = prev_frozen # now relabel the sort index appropriately sort_index.sort() def reverse(self): ''' Reverse the row order of table rows. The table is reversed in place and there are no function arguments. Examples -------- Create a table with three columns:: >>> t = Table([['Max', 'Jo', 'John'], ['Miller','Miller','Jackson'], ... [12,15,18]], names=('firstname','name','tel')) >>> print(t) firstname name tel --------- ------- --- Max Miller 12 Jo Miller 15 John Jackson 18 Reversing order:: >>> t.reverse() >>> print(t) firstname name tel --------- ------- --- John Jackson 18 Jo Miller 15 Max Miller 12 ''' for col in self.columns.values(): col[:] = col[::-1] for index in self.indices: index.reverse() @classmethod def read(cls, *args, **kwargs): """ Read and parse a data table and return as a Table. This function provides the Table interface to the astropy unified I/O layer. This allows easily reading a file in many supported data formats using syntax such as:: >>> from astropy.table import Table >>> dat = Table.read('table.dat', format='ascii') >>> events = Table.read('events.fits', format='fits') The arguments and keywords (other than ``format``) provided to this function are passed through to the underlying data reader (e.g. `~astropy.io.ascii.read`). """ return io_registry.read(cls, *args, **kwargs) def write(self, *args, **kwargs): """ Write this Table object out in the specified format. This function provides the Table interface to the astropy unified I/O layer. This allows easily writing a file in many supported data formats using syntax such as:: >>> from astropy.table import Table >>> dat = Table([[1, 2], [3, 4]], names=('a', 'b')) >>> dat.write('table.dat', format='ascii') The arguments and keywords (other than ``format``) provided to this function are passed through to the underlying data reader (e.g. `~astropy.io.ascii.write`). """ io_registry.write(self, *args, **kwargs) def copy(self, copy_data=True): ''' Return a copy of the table. Parameters ---------- copy_data : bool If `True` (the default), copy the underlying data array. Otherwise, use the same data array ''' out = self.__class__(self, copy=copy_data) # If the current table is grouped then do the same in the copy if hasattr(self, '_groups'): out._groups = groups.TableGroups(out, indices=self._groups._indices, keys=self._groups._keys) return out def __deepcopy__(self, memo=None): return self.copy(True) def __copy__(self): return self.copy(False) def __lt__(self, other): if six.PY3: return super(Table, self).__lt__(other) elif six.PY2: raise TypeError("unorderable types: Table() < {0}". format(str(type(other)))) def __gt__(self, other): if six.PY3: return super(Table, self).__gt__(other) elif six.PY2: raise TypeError("unorderable types: Table() > {0}". format(str(type(other)))) def __le__(self, other): if six.PY3: return super(Table, self).__le__(other) elif six.PY2: raise TypeError("unorderable types: Table() <= {0}". format(str(type(other)))) def __ge__(self, other): if six.PY3: return super(Table, self).__ge__(other) else: raise TypeError("unorderable types: Table() >= {0}". format(str(type(other)))) def __eq__(self, other): if isinstance(other, Table): other = other.as_array() if self.masked: if isinstance(other, np.ma.MaskedArray): result = self.as_array() == other else: # If mask is True, then by definition the row doesn't match # because the other array is not masked. false_mask = np.zeros(1, dtype=[(n, bool) for n in self.dtype.names]) result = (self.as_array().data == other) & (self.mask == false_mask) else: if isinstance(other, np.ma.MaskedArray): # If mask is True, then by definition the row doesn't match # because the other array is not masked. false_mask = np.zeros(1, dtype=[(n, bool) for n in other.dtype.names]) result = (self.as_array() == other.data) & (other.mask == false_mask) else: result = self.as_array() == other return result def __ne__(self, other): return ~self.__eq__(other) @property def groups(self): if not hasattr(self, '_groups'): self._groups = groups.TableGroups(self) return self._groups def group_by(self, keys): """ Group this table by the specified ``keys`` This effectively splits the table into groups which correspond to unique values of the ``keys`` grouping object. The output is a new `TableGroups` which contains a copy of this table but sorted by row according to ``keys``. The ``keys`` input to `group_by` can be specified in different ways: - String or list of strings corresponding to table column name(s) - Numpy array (homogeneous or structured) with same length as this table - `Table` with same length as this table Parameters ---------- keys : str, list of str, numpy array, or `Table` Key grouping object Returns ------- out : `Table` New table with groups set """ if self.has_mixin_columns: raise NotImplementedError('group_by not available for tables with mixin columns') return groups.table_group_by(self, keys) def to_pandas(self): """ Return a :class:`pandas.DataFrame` instance Returns ------- dataframe : :class:`pandas.DataFrame` A pandas :class:`pandas.DataFrame` instance Raises ------ ImportError If pandas is not installed ValueError If the Table contains mixin or multi-dimensional columns """ from pandas import DataFrame if self.has_mixin_columns: raise ValueError("Cannot convert a table with mixin columns to a pandas DataFrame") if any(getattr(col, 'ndim', 1) > 1 for col in self.columns.values()): raise ValueError("Cannot convert a table with multi-dimensional columns to a pandas DataFrame") out = OrderedDict() for name, column in self.columns.items(): if isinstance(column, MaskedColumn): if column.dtype.kind in ['i', 'u']: out[name] = column.astype(float).filled(np.nan) elif column.dtype.kind in ['f', 'c']: out[name] = column.filled(np.nan) else: out[name] = column.astype(np.object).filled(np.nan) else: out[name] = column if out[name].dtype.byteorder not in ('=', '|'): out[name] = out[name].byteswap().newbyteorder() return DataFrame(out) @classmethod def from_pandas(cls, dataframe): """ Create a `Table` from a :class:`pandas.DataFrame` instance Parameters ---------- dataframe : :class:`pandas.DataFrame` The pandas :class:`pandas.DataFrame` instance Returns ------- table : `Table` A `Table` (or subclass) instance """ out = OrderedDict() for name in dataframe.columns: column = dataframe[name] mask = np.array(column.isnull()) data = np.array(column) if data.dtype.kind == 'O': # If all elements of an object array are string-like or np.nan # then coerce back to a native numpy str/unicode array. string_types = six.string_types if six.PY3: string_types += (bytes,) nan = np.nan if all(isinstance(x, string_types) or x is nan for x in data): # Force any missing (null) values to b''. Numpy will # upcast to str/unicode as needed. data[mask] = b'' # When the numpy object array is represented as a list then # numpy initializes to the correct string or unicode type. data = np.array([x for x in data]) if np.any(mask): out[name] = MaskedColumn(data=data, name=name, mask=mask) else: out[name] = Column(data=data, name=name) return cls(out) info = TableInfo() class QTable(Table): """A class to represent tables of heterogeneous data. `QTable` provides a class for heterogeneous tabular data which can be easily modified, for instance adding columns or new rows. The `QTable` class is identical to `Table` except that columns with an associated ``unit`` attribute are converted to `~astropy.units.Quantity` objects. Parameters ---------- data : numpy ndarray, dict, list, or Table, optional Data to initialize table. masked : bool, optional Specify whether the table is masked. names : list, optional Specify column names dtype : list, optional Specify column data types meta : dict, optional Metadata associated with the table. copy : bool, optional Copy the input data (default=True). rows : numpy ndarray, list of lists, optional Row-oriented data for table instead of ``data`` argument """ def __init__(self, data=None, masked=None, names=None, dtype=None, meta=None, copy=True, rows=None, copy_indices=True): super(QTable, self).__init__(data, masked, names, dtype, meta, copy, rows, copy_indices) def _add_as_mixin_column(self, col): """ Determine if ``col`` should be added to the table directly as a mixin column. """ return has_info_class(col, MixinInfo) def _convert_col_for_table(self, col): if (isinstance(col, Column) and getattr(col, 'unit', None) is not None): qcol = Quantity(col, unit=col.unit, copy=False) qcol.info = col.info col = qcol else: col = super(QTable, self)._convert_col_for_table(col) return col class NdarrayMixin(np.ndarray): """ Mixin column class to allow storage of arbitrary numpy ndarrays within a Table. This is a subclass of numpy.ndarray and has the same initialization options as ndarray(). """ info = ParentDtypeInfo() def __new__(cls, obj, *args, **kwargs): self = np.array(obj, *args, **kwargs).view(cls) if 'info' in getattr(obj, '__dict__', ()): self.info = obj.info return self def __array_finalize__(self, obj): if obj is None: return if six.callable(super(NdarrayMixin, self).__array_finalize__): super(NdarrayMixin, self).__array_finalize__(obj) # Self was created from template (e.g. obj[slice] or (obj * 2)) # or viewcast e.g. obj.view(Column). In either case we want to # init Column attributes for self from obj if possible. if 'info' in getattr(obj, '__dict__', ()): self.info = obj.info def __reduce__(self): # patch to pickle Quantity objects (ndarray subclasses), see # http://www.mail-archive.com/numpy-discussion@scipy.org/msg02446.html object_state = list(super(NdarrayMixin, self).__reduce__()) object_state[2] = (object_state[2], self.__dict__) return tuple(object_state) def __setstate__(self, state): # patch to unpickle NdarrayMixin objects (ndarray subclasses), see # http://www.mail-archive.com/numpy-discussion@scipy.org/msg02446.html nd_state, own_state = state super(NdarrayMixin, self).__setstate__(nd_state) self.__dict__.update(own_state) astropy-1.1.1/astropy/table/index.py0000644001134200020070000006610712644017723020410 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ The Index class can use several implementations as its engine. Any implementation should implement the following: __init__(data, row_index) : initialize index based on key/row list pairs add(key, row) -> None : add (key, row) to existing data remove(key, data=None) -> boolean : remove data from self[key], or all of self[key] if data is None shift_left(row) -> None : decrement row numbers after row shift_right(row) -> None : increase row numbers >= row find(key) -> list : list of rows corresponding to key range(lower, upper, bounds) -> list : rows in self[k] where k is between lower and upper (<= or < based on bounds) sort() -> None : make row order align with key order sorted_data() -> list of rows in sorted order (by key) replace_rows(row_map) -> None : replace row numbers based on slice items() -> list of tuples of the form (key, data) Notes ----- When a Table is initialized from another Table, indices are (deep) copied and their columns are set to the columns of the new Table. Column creation: Column(c) -> deep copy of indices c[[1, 2]] -> deep copy and reordering of indices c[1:2] -> reference array.view(Column) -> no indices """ from __future__ import (absolute_import, division, print_function, unicode_literals) from copy import deepcopy import numpy as np from ..extern import six from .bst import BST, FastBST, FastRBT, MinValue, MaxValue from .sorted_array import SortedArray from ..time import Time class QueryError(ValueError): ''' Indicates that a given index cannot handle the supplied query. ''' pass class Index(object): ''' The Index class makes it possible to maintain indices on columns of a Table, so that column values can be queried quickly and efficiently. Column values are stored in lexicographic sorted order, which allows for binary searching in O(log n). Parameters ---------- columns : list or None List of columns on which to create an index. If None, create an empty index for purposes of deep copying. engine : type, instance, or None Indexing engine class to use (from among SortedArray, BST, FastBST, and FastRBT) or actual engine instance. If the supplied argument is None (by default), use SortedArray. unique : bool (defaults to False) Whether the values of the index must be unique ''' def __new__(cls, *args, **kwargs): self = super(Index, cls).__new__(cls) self.__init__(*args, **kwargs) return SlicedIndex(self, slice(0, 0, None), original=True) def __init__(self, columns, engine=None, unique=False): from .table import Table, Column if engine is not None and not isinstance(engine, type): # create from data self.engine = engine.__class__ self.data = engine self.columns = columns return # by default, use SortedArray self.engine = engine or SortedArray if columns is None: # this creates a special exception for deep copying columns = [] data = [] row_index = [] elif len(columns) == 0: raise ValueError("Cannot create index without at least one column") elif len(columns) == 1: col = columns[0] row_index = Column(col.argsort()) data = Table([col[row_index]]) else: num_rows = len(columns[0]) # replace Time columns with approximate form and remainder new_columns = [] for col in columns: if isinstance(col, Time): new_columns.append(col.jd) remainder = col - col.__class__(col.jd, format='jd') new_columns.append(remainder.jd) else: new_columns.append(col) # sort the table lexicographically and keep row numbers table = Table(columns + [np.arange(num_rows)], copy_indices=False) sort_columns = new_columns[::-1] try: lines = table[np.lexsort(sort_columns)] except TypeError: # arbitrary mixins might not work with lexsort lines = table[table.argsort()] data = lines[lines.colnames[:-1]] row_index = lines[lines.colnames[-1]] self.data = self.engine(data, row_index, unique=unique) self.columns = columns def __len__(self): ''' Number of rows in index. ''' return len(self.columns[0]) def replace_col(self, prev_col, new_col): ''' Replace an indexed column with an updated reference. Parameters ---------- prev_col : Column Column reference to replace new_col : Column New column reference ''' self.columns[self.col_position(prev_col.info.name)] = new_col def reload(self): ''' Recreate the index based on data in self.columns. ''' self.__init__(self.columns, engine=self.engine) def col_position(self, col_name): ''' Return the position of col_name in self.columns. Parameters ---------- col_name : str Name of column to look up ''' for i, c in enumerate(self.columns): if c.info.name == col_name: return i raise ValueError("Column does not belong to index: {0}".format(col_name)) def insert_row(self, pos, vals, columns): ''' Insert a new row from the given values. Parameters ---------- pos : int Position at which to insert row vals : list or tuple List of values to insert into a new row columns : list Table column references ''' key = [None] * len(self.columns) for i, col in enumerate(columns): try: key[i] = vals[self.col_position(col.info.name)] except ValueError: # not a member of index continue num_rows = len(self.columns[0]) if pos < num_rows: # shift all rows >= pos to the right self.data.shift_right(pos) self.data.add(tuple(key), pos) def get_row_specifier(self, row_specifier): ''' Return an iterable corresponding to the input row specifier. Parameters ---------- row_specifier : int, list, ndarray, or slice ''' if isinstance(row_specifier, int): # single row return (row_specifier,) elif isinstance(row_specifier, (list, np.ndarray)): return row_specifier elif isinstance(row_specifier, slice): col_len = len(self.columns[0]) return range(*row_specifier.indices(col_len)) raise ValueError("Expected int, array of ints, or slice but " "got {0} in remove_rows".format(row_specifier)) def remove_rows(self, row_specifier): ''' Remove the given rows from the index. Parameters ---------- row_specifier : int, list, ndarray, or slice Indicates which row(s) to remove ''' rows = [] # To maintain the correct row order, we loop twice, # deleting rows first and then reordering the remaining rows for row in self.get_row_specifier(row_specifier): self.remove_row(row, reorder=False) rows.append(row) # second pass - row order is reversed to maintain # correct row numbers for row in reversed(sorted(rows)): self.data.shift_left(row) def remove_row(self, row, reorder=True): ''' Remove the given row from the index. Parameters ---------- row : int Position of row to remove reorder : bool Whether to reorder indices after removal ''' # for removal, form a key consisting of column values in this row if not self.data.remove(tuple([col[row] for col in self.columns]), row): raise ValueError("Could not remove row {0} from index".format(row)) # decrement the row number of all later rows if reorder: self.data.shift_left(row) def find(self, key): ''' Return the row values corresponding to key, in sorted order. Parameters ---------- key : tuple Values to search for in each column ''' return self.data.find(key) def same_prefix(self, key): ''' Return rows whose keys contain the supplied key as a prefix. Parameters ---------- key : tuple Prefix for which to search ''' return self.same_prefix_range(key, key, (True, True)) def same_prefix_range(self, lower, upper, bounds=(True, True)): ''' Return rows whose keys have a prefix in the given range. Parameters ---------- lower : tuple Lower prefix bound upper : tuple Upper prefix bound bounds : tuple (x, y) of bools Indicates whether the search should be inclusive or exclusive with respect to the endpoints. The first argument x corresponds to an inclusive lower bound, and the second argument y to an inclusive upper bound. ''' n = len(lower) ncols = len(self.columns) a = MinValue() if bounds[0] else MaxValue() b = MaxValue() if bounds[1] else MinValue() # [x, y] search corresponds to [(x, min), (y, max)] # (x, y) search corresponds to ((x, max), (x, min)) lower = lower + tuple((ncols - n) * [a]) upper = upper + tuple((ncols - n) * [b]) return self.data.range(lower, upper, bounds) def range(self, lower, upper, bounds=(True, True)): ''' Return rows within the given range. Parameters ---------- lower : tuple Lower prefix bound upper : tuple Upper prefix bound bounds : tuple (x, y) of bools Indicates whether the search should be inclusive or exclusive with respect to the endpoints. The first argument x corresponds to an inclusive lower bound, and the second argument y to an inclusive upper bound. ''' return self.data.range(lower, upper, bounds) def replace(self, row, col_name, val): ''' Replace the value of a column at a given position. Parameters ---------- row : int Row number to modify col_name : str Name of the Column to modify val : col.info.dtype Value to insert at specified row of col ''' self.remove_row(row, reorder=False) key = [c[row] for c in self.columns] key[self.col_position(col_name)] = val self.data.add(tuple(key), row) def replace_rows(self, col_slice): ''' Modify rows in this index to agree with the specified slice. For example, given an index {'5': 1, '2': 0, '3': 2} on a column ['2', '5', '3'], an input col_slice of [2, 0] will result in the relabeling {'3': 0, '2': 1} on the sliced column ['3', '2']. Parameters ---------- col_slice : list Indices to slice ''' row_map = dict((row, i) for i, row in enumerate(col_slice)) self.data.replace_rows(row_map) def sort(self): ''' Make row numbers follow the same sort order as the keys of the index. ''' self.data.sort() def sorted_data(self): ''' Returns a list of rows in sorted order based on keys; essentially acts as an argsort() on columns. ''' return self.data.sorted_data() def __getitem__(self, item): ''' Returns a sliced version of this index. Parameters ---------- item : slice Input slice Returns ------- SlicedIndex A sliced reference to this index. ''' return SlicedIndex(self, item) def __str__(self): return str(self.data) def __repr__(self): return str(self) def __deepcopy__(self, memo): ''' Return a deep copy of this index. Notes ----- The default deep copy must be overridden to perform a shallow copy of the index columns, avoiding infinite recursion. Parameters ---------- memo : dict ''' num_cols = self.data.num_cols if self.engine == SortedArray else None # create an actual Index, not a SlicedIndex index = super(Index, Index).__new__(Index) index.__init__(None, engine=self.engine) index.data = deepcopy(self.data, memo) index.columns = self.columns[:] # new list, same columns memo[id(self)] = index return index class SlicedIndex(object): ''' This class provides a wrapper around an actual Index object to make index slicing function correctly. Since numpy expects array slices to provide an actual data view, a SlicedIndex should retrieve data directly from the original index and then adapt it to the sliced coordinate system as appropriate. Parameters ---------- index : Index The original Index reference index_slice : slice The slice to which this SlicedIndex corresponds original : bool Whether this SlicedIndex represents the original index itself. For the most part this is similar to index[:] but certain copying operations are avoided, and the slice retains the length of the actual index despite modification. ''' def __init__(self, index, index_slice, original=False): self.index = index self.original = original self._frozen = False if isinstance(index_slice, tuple): self.start, self._stop, self.step = index_slice else: # index_slice is an actual slice num_rows = len(index.columns[0]) self.start, self._stop, self.step = index_slice.indices(num_rows) @property def length(self): return 1 + (self.stop - self.start - 1) // self.step @property def stop(self): ''' The stopping position of the slice, or the end of the index if this is an original slice. ''' return len(self.index) if self.original else self._stop def __getitem__(self, item): ''' Returns another slice of this Index slice. Parameters ---------- item : slice Index slice ''' if self.length <= 0: # empty slice return SlicedIndex(self.index, slice(1, 0)) start, stop, step = item.indices(self.length) new_start = self.orig_coords(start) new_stop = self.orig_coords(stop) new_step = self.step * step return SlicedIndex(self.index, (new_start, new_stop, new_step)) def sliced_coords(self, rows): ''' Convert the input rows to the sliced coordinate system. Parameters ---------- rows : list Rows in the original coordinate system Returns ------- sliced_rows : list Rows in the sliced coordinate system ''' if self.original: return rows else: rows = np.array(rows) row0 = rows - self.start if self.step != 1: correct_mod = np.mod(row0, self.step) == 0 row0 = row0[correct_mod] if self.step > 0: ok = (row0 >= 0) & (row0 < self.stop - self.start) else: ok = (row0 <= 0) & (row0 > self.stop - self.start) return row0[ok] // self.step def orig_coords(self, row): ''' Convert the input row from sliced coordinates back to original coordinates. Parameters ---------- row : int Row in the sliced coordinate system Returns ------- orig_row : int Row in the original coordinate system ''' return row if self.original else self.start + row * self.step def find(self, key): return self.sliced_coords(self.index.find(key)) def where(self, col_map): return self.sliced_coords(self.index.where(col_map)) def range(self, lower, upper): return self.sliced_coords(self.index.range(lower, upper)) def same_prefix(self, key): return self.sliced_coords(self.index.same_prefix(key)) def sorted_data(self): return self.sliced_coords(self.index.sorted_data()) def replace(self, row, col, val): if not self._frozen: self.index.replace(self.orig_coords(row), col, val) def copy(self): if not self.original: # replace self.index with a new object reference self.index = deepcopy(self.index) return self.index def insert_row(self, pos, vals, columns): if not self._frozen: self.copy().insert_row(self.orig_coords(pos), vals, columns) def get_row_specifier(self, row_specifier): return [self.orig_coords(x) for x in self.index.get_row_specifier(row_specifier)] def remove_rows(self, row_specifier): if not self._frozen: self.copy().remove_rows(row_specifier) def replace_rows(self, col_slice): if not self._frozen: self.index.replace_rows([self.orig_coords(x) for x in col_slice]) def sort(self): if not self._frozen: self.copy().sort() def __repr__(self): if self.original: return repr(self.index) return 'Index slice {0} of\n{1}'.format( (self.start, self.stop, self.step), self.index) def __str__(self): return repr(self) def replace_col(self, prev_col, new_col): self.index.replace_col(prev_col, new_col) def reload(self): self.index.reload() def col_position(self, col_name): return self.index.col_position(col_name) def get_slice(self, col_slice, item): ''' Return a newly created index from the given slice. Parameters ---------- col_slice : Column object Already existing slice of a single column item : list or ndarray Slice for retrieval ''' from .table import Table if len(self.columns) == 1: return Index([col_slice], engine=self.data.__class__) t = Table(self.columns, copy_indices=False) with t.index_mode('discard_on_copy'): new_cols = t[item].columns.values() return Index(new_cols, engine=self.data.__class__) @property def columns(self): return self.index.columns @property def data(self): return self.index.data def get_index(table, table_copy): ''' Inputs a table and some subset of its columns, and returns an index corresponding to this subset or None if no such index exists. Parameters ---------- table : `Table` Input table table_copy : `Table` Subset of the columns in the table argument ''' cols = set(table_copy.columns) indices = set() for column in cols: for index in table[column].info.indices: if set([x.info.name for x in index.columns]) == cols: return index return None class _IndexModeContext(object): ''' A context manager that allows for special indexing modes, which are intended to improve performance. Currently the allowed modes are "freeze", in which indices are not modified upon column modification, "copy_on_getitem", in which indices are copied upon column slicing, and "discard_on_copy", in which indices are discarded upon table copying/slicing. ''' _col_subclasses = {} def __init__(self, table, mode): ''' Parameters ---------- table : Table The table to which the mode should be applied mode : str Either 'freeze', 'copy_on_getitem', or 'discard_on_copy'. In 'discard_on_copy' mode, indices are not copied whenever columns or tables are copied. In 'freeze' mode, indices are not modified whenever columns are modified; at the exit of the context, indices refresh themselves based on column values. This mode is intended for scenarios in which one intends to make many additions or modifications on an indexed column. In 'copy_on_getitem' mode, indices are copied when taking column slices as well as table slices, so col[i0:i1] will preserve indices. ''' self.table = table self.mode = mode # Used by copy_on_getitem self._orig_classes = [] if mode not in ('freeze', 'discard_on_copy', 'copy_on_getitem'): raise ValueError("Expected a mode of either 'freeze', " "'discard_on_copy', or 'copy_on_getitem', got " "'{0}'".format(mode)) def __enter__(self): if self.mode == 'discard_on_copy': self.table._copy_indices = False elif self.mode == 'copy_on_getitem': for col in self.table.columns.values(): self._orig_classes.append(col.__class__) col.__class__ = self._get_copy_on_getitem_shim(col.__class__) else: for index in self.table.indices: index._frozen = True def __exit__(self, exc_type, exc_value, traceback): if self.mode == 'discard_on_copy': self.table._copy_indices = True elif self.mode == 'copy_on_getitem': for col in reversed(self.table.columns.values()): col.__class__ = self._orig_classes.pop() else: for index in self.table.indices: index._frozen = False index.reload() def _get_copy_on_getitem_shim(self, cls): """ This creates a subclass of the column's class which overrides that class's ``__getitem__``, such that when returning a slice of the column, the relevant indices are also copied over to the slice. Ideally, rather than shimming in a new ``__class__`` we would be able to just flip a flag that is checked by the base class's ``__getitem__``. Unfortunately, since the flag needs to be a Python variable, this slows down ``__getitem__`` too much in the more common case where a copy of the indices is not needed. See the docstring for ``astropy.table._column_mixins`` for more information on that. """ if cls in self._col_subclasses: return self._col_subclasses[cls] def __getitem__(self, item): value = cls.__getitem__(self, item) if type(value) is type(self): value = self.info.slice_indices(value, item, len(self)) return value clsname = '_{0}WithIndexCopy'.format(cls.__name__) new_cls = type(str(clsname), (cls,), {'__getitem__': __getitem__}) self._col_subclasses[cls] = new_cls return new_cls class TableIndices(list): ''' A special list of table indices allowing for retrieval by column name(s). Parameters ---------- lst : list List of indices ''' def __init__(self, lst): super(TableIndices, self).__init__(lst) def __getitem__(self, item): ''' Retrieve an item from the list of indices. Parameters ---------- item : int, str, tuple, or list Position in list or name(s) of indexed column(s) ''' if isinstance(item, six.string_types): item = [item] if isinstance(item, (list, tuple)): item = list(item) for index in self: try: for name in item: index.col_position(name) if len(index.columns) == len(item): return index except ValueError: pass # index search failed raise IndexError("No index found for {0}".format(item)) return super(TableIndices, self).__getitem__(item) class TableLoc(object): ''' A pseudo-list of Table rows allowing for retrieval of rows by indexed column values. Parameters ---------- table : Table Indexed table to use ''' def __init__(self, table): self.table = table self.indices = table.indices if len(self.indices) == 0: raise ValueError("Cannot create TableLoc object with no indices") def __getitem__(self, item): ''' Retrieve Table rows by value slice. Parameters ---------- item : column element, list, ndarray, slice or tuple Can be a value of the table primary index, a list/ndarray of such values, or a value slice (both endpoints are included). If a tuple is provided, the first element must be an index to use instead of the primary key, and the second element must be as above. ''' if isinstance(item, tuple): key, item = item else: key = self.table.primary_key index = self.indices[key] if len(index.columns) > 1: raise ValueError("Cannot use .loc on multi-column indices") if isinstance(item, slice): # None signifies no upper/lower bound start = MinValue() if item.start is None else item.start stop = MaxValue() if item.stop is None else item.stop rows = index.range((start,), (stop,)) else: if not isinstance(item, (list, np.ndarray)): # single element item = [item] # item should be a list or ndarray of values rows = [] for key in item: rows.extend(index.find((key,))) if len(rows) == 0: # no matches found raise KeyError('No matches found for key {0}'.format(item)) elif len(rows) == 1: # single row return self.table[rows[0]] return self.table[rows] class TableILoc(TableLoc): ''' A variant of TableLoc allowing for row retrieval by indexed order rather than data values. Parameters ---------- table : Table Indexed table to use ''' def __init__(self, table): super(TableILoc, self).__init__(table) def __getitem__(self, item): if isinstance(item, tuple): key, item = item else: key = self.table.primary_key index = self.indices[key] rows = index.sorted_data()[item] table_slice = self.table[rows] if len(table_slice) == 0: # no matches found raise IndexError('Invalid index for iloc: {0}'.format(item)) return table_slice astropy-1.1.1/astropy/table/table_helpers.py0000644001134200020070000001253312644017723022104 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Helper functions for table development, mostly creating useful tables for testing. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from itertools import cycle import string import numpy as np from .table import Table, Column from ..extern.six.moves import zip, range from ..utils.data_info import ParentDtypeInfo class TimingTables(object): """ Object which contains two tables and various other attributes that are useful for timing and other API tests. """ def __init__(self, size=1000, masked=False): self.masked = masked # Initialize table self.table = Table(masked=self.masked) # Create column with mixed types np.random.seed(12345) self.table['i'] = np.arange(size) self.table['a'] = np.random.random(size) # float self.table['b'] = np.random.random(size) > 0.5 # bool self.table['c'] = np.random.random((size,10)) # 2d column self.table['d'] = np.random.choice(np.array(list(string.ascii_letters)),size) self.extra_row = {'a':1.2, 'b':True, 'c':np.repeat(1, 10), 'd':'Z'} self.extra_column = np.random.randint(0, 100, size) self.row_indices = np.where(self.table['a'] > 0.9)[0] self.table_grouped = self.table.group_by('d') # Another table for testing joining self.other_table = Table(masked=self.masked) self.other_table['i'] = np.arange(1,size,3) self.other_table['f'] = np.random.random() self.other_table.sort('f') # Another table for testing hstack self.other_table_2 = Table(masked=self.masked) self.other_table_2['g'] = np.random.random(size) self.other_table_2['h'] = np.random.random((size, 10)) self.bool_mask = self.table['a'] > 0.6 def simple_table(size=3, cols=None, kinds='ifS', masked=False): """ Return a simple table for testing. Example -------- :: >>> from astropy.table.table_helpers import simple_table >>> print(simple_table(3, 6, masked=True, kinds='ifOS')) a b c d e f --- --- -------- --- --- --- -- 1.0 {'c': 2} -- 5 5.0 2 2.0 -- e 6 -- 3 -- {'e': 4} f -- 7.0 Parameters ---------- size : int Number of table rows cols : int, default=number of kinds Number of table columns kinds : str String consisting of the column dtype.kinds. This string will be cycled through to generate the column dtype. The allowed values are 'i', 'f', 'S', 'O'. Returns ------- out : `Table` New table with appropriate characteristics """ if cols is None: cols = len(kinds) if cols > 26: raise ValueError("Max 26 columns in SimpleTable") columns = [] names = [chr(ord('a') + ii) for ii in range(cols)] letters = np.array([c for c in string.ascii_letters]) for jj, kind in zip(range(cols), cycle(kinds)): if kind == 'i': data = np.arange(1, size + 1, dtype=np.int64) + jj elif kind == 'f': data = np.arange(size, dtype=np.float64) + jj elif kind == 'S': indices = (np.arange(size) + jj) % len(letters) data = letters[indices] elif kind == 'O': indices = (np.arange(size) + jj) % len(letters) vals = letters[indices] data = [{val: index} for val, index in zip(vals, indices)] else: raise ValueError('Unknown data kind') columns.append(Column(data)) table = Table(columns, names=names, masked=masked) if masked: for ii, col in enumerate(table.columns.values()): mask = np.array((np.arange(size) + ii) % 3, dtype=bool) col.mask = ~mask return table def complex_table(): """ Return a masked table from the io.votable test set that has a wide variety of stressing types. """ from ..utils.data import get_pkg_data_filename from ..io.votable.table import parse import warnings with warnings.catch_warnings(): warnings.simplefilter("ignore") votable = parse(get_pkg_data_filename('../io/votable/tests/data/regression.xml'), pedantic=False) first_table = votable.get_first_table() table = first_table.to_table() return table class ArrayWrapper(object): """ Minimal mixin using a simple wrapper around a numpy array """ info = ParentDtypeInfo() def __init__(self, data): self.data = np.array(data) if 'info' in getattr(data, '__dict__', ()): self.info = data.info def __getitem__(self, item): if isinstance(item, (int, np.integer)): out = self.data[item] else: out = self.__class__(self.data[item]) if 'info' in self.__dict__: out.info = self.info return out def __setitem__(self, item, value): self.data[item] = value def __len__(self): return len(self.data) @property def dtype(self): return self.data.dtype @property def shape(self): return self.data.shape def __repr__(self): return ("<{0} name='{1}' data={2}>" .format(self.__class__.__name__, self.info.name, self.data)) astropy-1.1.1/astropy/table/setup_package.py0000644001134200020070000000112112644017723022075 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import import os from distutils.extension import Extension ROOT = os.path.relpath(os.path.dirname(__file__)) def get_extensions(): sources = ["_np_utils.pyx", "_column_mixins.pyx"] include_dirs = ['numpy'] exts = [ Extension(name='astropy.table.' + os.path.splitext(source)[0], sources=[os.path.join(ROOT, source)], include_dirs=include_dirs) for source in sources ] return exts def requires_2to3(): return False astropy-1.1.1/astropy/table/_column_mixins.pyx0000644001134200020070000000550612644017723022510 0ustar embrayscience00000000000000""" This module provides mixin bases classes for the Column and MaskedColumn classes to provide those classes with their custom __getitem__ implementations. The reason for this is that implementing a __getitem__ in pure Python actually significantly slows down the array subscript operation, especially if it needs to call the subclass's __getitem__ (i.e. ndarray.__getitem__ in this case). By providing __getitem__ through a base type implemented in C, the __getitem__ implementation will go straight into the class's tp_as_mapping->mp_subscript slot, rather than going through a class __dict__ and calling a pure Python method. Furthermore, the C implementation of __getitem__ can easily directly call the base class's implementation (as seen in _ColumnGetitemShim, which directly calls to ndarray->tp_as_mapping->mp_subscript). The main reason for overriding __getitem__ in the Column class is for returning elements out of a multi-dimensional column. That is, if the elements of a Column are themselves arrays, the default ndarray.__getitem__ applies the subclass to those arrays, so they are returned as Column instances (when really they're just an array that was in a Column). This overrides that behavior in the case where the element returned from a single row of the Column is itself an array. """ import sys import numpy as np if sys.version_info[0] == 3: INTEGER_TYPES = (int, np.integer) else: INTEGER_TYPES = (int, long, np.integer) # Annoying boilerplate that we shouldn't have to write; Cython should # have this built in (some versions do, but the ctypedefs are still lacking, # or what is available is Cython version dependent) ctypedef object (*binaryfunc)(object, object) cdef extern from "Python.h": ctypedef struct PyMappingMethods: binaryfunc mp_subscript ctypedef struct PyTypeObject: PyMappingMethods* tp_as_mapping cdef extern from "numpy/arrayobject.h": ctypedef class numpy.ndarray [object PyArrayObject]: cdef int ndim "nd" ctypedef object (*item_getter)(object, object) cdef inline object base_getitem(object self, object item, item_getter getitem): if (self).ndim > 1 and isinstance(item, INTEGER_TYPES): return self.data[item] return getitem(self, item) cdef inline object column_getitem(object self, object item): return (ndarray).tp_as_mapping.mp_subscript(self, item) cdef class _ColumnGetitemShim: def __getitem__(self, item): return base_getitem(self, item, column_getitem) MaskedArray = np.ma.MaskedArray cdef inline object masked_column_getitem(object self, object item): value = MaskedArray.__getitem__(self, item) return self._copy_attrs_slice(value) cdef class _MaskedColumnGetitemShim(_ColumnGetitemShim): def __getitem__(self, item): return base_getitem(self, item, masked_column_getitem) astropy-1.1.1/astropy/table/bst.py0000644001134200020070000004611112644017723020062 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import operator import numpy as np from ..extern.six.moves import zip class MaxValue(object): ''' Represents an infinite value for purposes of tuple comparison. ''' def __gt__(self, other): return True def __ge__(self, other): return True def __lt__(self, other): return False def __le__(self, other): return False def __repr__(self): return "MAX" __le__ = __lt__ __ge__ = __gt__ __str__ = __repr__ class MinValue(object): ''' The opposite of MaxValue, i.e. a representation of negative infinity. ''' def __lt__(self, other): return True def __le__(self, other): return True def __gt__(self, other): return False def __ge__(self, other): return False def __repr__(self): return "MIN" __le__ = __lt__ __ge__ = __gt__ __str__ = __repr__ class Epsilon(object): ''' Represents the "next largest" version of a given value, so that for all valid comparisons we have x < y < Epsilon(y) < z whenever x < y < z and x, z are not Epsilon objects. Parameters ---------- val : object Original value ''' __slots__ = ('val',) def __init__(self, val): self.val = val def __lt__(self, other): if self.val == other: return False return self.val < other def __gt__(self, other): if self.val == other: return True return self.val > other def __eq__(self, other): return False def __repr__(self): return repr(self.val) + " + epsilon" class Node(object): ''' An element in a binary search tree, containing a key, data, and references to children nodes and a parent node. Parameters ---------- key : tuple Node key data : list or int Node data ''' __lt__ = lambda x, y: x.key < y.key __le__ = lambda x, y: x.key <= y.key __eq__ = lambda x, y: x.key == y.key __ge__ = lambda x, y: x.key >= y.key __gt__ = lambda x, y: x.key > y.key __ne__ = lambda x, y: x.key != y.key __slots__ = ('key', 'data', 'left', 'right') # each node has a key and data list def __init__(self, key, data): self.key = key self.data = data if isinstance(data, list) else [data] self.left = None self.right = None def replace(self, child, new_child): ''' Replace this node's child with a new child. ''' if self.left is not None and self.left == child: self.left = new_child elif self.right is not None and self.right == child: self.right = new_child else: raise ValueError("Cannot call replace() on non-child") def remove(self, child): ''' Remove the given child. ''' self.replace(child, None) def set(self, other): ''' Copy the given node. ''' self.key = other.key self.data = other.data[:] def __str__(self): return str((self.key, self.data)) def __repr__(self): return str(self) class BST(object): ''' A basic binary search tree in pure Python, used as an engine for indexing. Parameters ---------- data : Table Sorted columns of the original table row_index : Column object Row numbers corresponding to data columns unique : bool (defaults to False) Whether the values of the index must be unique ''' NodeClass = Node def __init__(self, data, row_index, unique=False): self.root = None self.size = 0 self.unique = unique for key, row in zip(data, row_index): self.add(tuple(key), row) def add(self, key, data=None): ''' Add a key, data pair. ''' if data is None: data = key self.size += 1 node = self.NodeClass(key, data) curr_node = self.root if curr_node is None: self.root = node return while True: if node < curr_node: if curr_node.left is None: curr_node.left = node break curr_node = curr_node.left elif node > curr_node: if curr_node.right is None: curr_node.right = node break curr_node = curr_node.right elif self.unique: raise ValueError("Cannot insert non-unique value") else: # add data to node curr_node.data.extend(node.data) curr_node.data = sorted(curr_node.data) return def find(self, key): ''' Return all data values corresponding to a given key. Parameters ---------- key : tuple Input key Returns ------- data_vals : list List of rows corresponding to the input key ''' node, parent = self.find_node(key) return node.data if node is not None else [] def find_node(self, key): ''' Find the node associated with the given key. ''' if self.root is None: return (None, None) return self._find_recursive(key, self.root, None) def shift_left(self, row): ''' Decrement all rows larger than the given row. ''' for node in self.traverse(): node.data = [x - 1 if x > row else x for x in node.data] def shift_right(self, row): ''' Increment all rows greater than or equal to the given row. ''' for node in self.traverse(): node.data = [x + 1 if x >= row else x for x in node.data] def _find_recursive(self, key, node, parent): try: if key == node.key: return (node, parent) elif key > node.key: if node.right is None: return (None, None) return self._find_recursive(key, node.right, node) else: if node.left is None: return (None, None) return self._find_recursive(key, node.left, node) except TypeError: # wrong key type return (None, None) def traverse(self, order='inorder'): ''' Return nodes of the BST in the given order. Parameters ---------- order : str The order in which to recursively search the BST. Possible values are: "preorder": current node, left subtree, right subtree "inorder": left subtree, current node, right subtree "postorder": left subtree, right subtree, current node ''' if order == 'preorder': return self._preorder(self.root, []) elif order == 'inorder': return self._inorder(self.root, []) elif order == 'postorder': return self._postorder(self.root, []) raise ValueError("Invalid traversal method: \"{0}\"".format(order)) def items(self): ''' Return BST items in order as (key, data) pairs. ''' return [(x.key, x.data) for x in self.traverse()] def sort(self): ''' Make row order align with key order. ''' i = 0 for node in self.traverse(): num_rows = len(node.data) node.data = [x for x in range(i, i + num_rows)] i += num_rows def sorted_data(self): ''' Return BST rows sorted by key values. ''' return [x for node in self.traverse() for x in node.data] def _preorder(self, node, lst): if node is None: return lst lst.append(node) self._preorder(node.left, lst) self._preorder(node.right, lst) return lst def _inorder(self, node, lst): if node is None: return lst self._inorder(node.left, lst) lst.append(node) self._inorder(node.right, lst) return lst def _postorder(self, node, lst): if node is None: return lst self._postorder(node.left, lst) self._postorder(node.right, lst) lst.append(node) return lst def _substitute(self, node, parent, new_node): if node is self.root: self.root = new_node else: parent.replace(node, new_node) def remove(self, key, data=None): ''' Remove data corresponding to the given key. Parameters ---------- key : tuple The key to remove data : int or None If None, remove the node corresponding to the given key. If not None, remove only the given data value from the node. Returns ------- successful : bool True if removal was successful, false otherwise ''' node, parent = self.find_node(key) if node is None: return False if data is not None: if data not in node.data: raise ValueError("Data does not belong to correct node") elif len(node.data) > 1: node.data.remove(data) return True if node.left is None and node.right is None: self._substitute(node, parent, None) elif node.left is None and node.right is not None: self._substitute(node, parent, node.right) elif node.right is None and node.left is not None: self._substitute(node, parent, node.left) else: # find largest element of left subtree curr_node = node.left parent = node while curr_node.right is not None: parent = curr_node curr_node = curr_node.right self._substitute(curr_node, parent, curr_node.left) node.set(curr_node) self.size -= 1 return True def is_valid(self): ''' Returns whether this is a valid BST. ''' return self._is_valid(self.root) def _is_valid(self, node): if node is None: return True return (node.left is None or node.left <= node) and \ (node.right is None or node.right >= node) and \ self._is_valid(node.left) and self._is_valid(node.right) def range(self, lower, upper, bounds=(True, True)): ''' Return all nodes with keys in the given range. Parameters ---------- lower : tuple Lower bound upper : tuple Upper bound bounds : tuple (x, y) of bools Indicates whether the search should be inclusive or exclusive with respect to the endpoints. The first argument x corresponds to an inclusive lower bound, and the second argument y to an inclusive upper bound. ''' nodes = self.range_nodes(lower, upper, bounds) return [x for node in nodes for x in node.data] def range_nodes(self, lower, upper, bounds=(True, True)): ''' Return nodes in the given range. ''' if self.root is None: return [] # op1 is <= or <, op2 is >= or > op1 = operator.le if bounds[0] else operator.lt op2 = operator.ge if bounds[1] else operator.gt return self._range(lower, upper, op1, op2, self.root, []) def same_prefix(self, val): ''' Assuming the given value has smaller length than keys, return nodes whose keys have this value as a prefix. ''' if self.root is None: return [] nodes = self._same_prefix(val, self.root, []) return [x for node in nodes for x in node.data] def _range(self, lower, upper, op1, op2, node, lst): if op1(lower, node.key) and op2(upper, node.key): lst.append(node) if upper > node.key and node.right is not None: self._range(lower, upper, op1, op2, node.right, lst) if lower < node.key and node.left is not None: self._range(lower, upper, op1, op2, node.left, lst) return lst def _same_prefix(self, val, node, lst): prefix = node.key[:len(val)] if prefix == val: lst.append(node) if prefix <= val and node.right is not None: self._same_prefix(val, node.right, lst) if prefix >= val and node.left is not None: self._same_prefix(val, node.left, lst) return lst def __str__(self): if self.root is None: return 'Empty' return self._print(self.root, 0) def __repr__(self): return str(self) def _print(self, node, level): line = '\t'*level + str(node) + '\n' if node.left is not None: line += self._print(node.left, level + 1) if node.right is not None: line += self._print(node.right, level + 1) return line @property def height(self): ''' Return the BST height. ''' return self._height(self.root) def _height(self, node): if node is None: return -1 return max(self._height(node.left), self._height(node.right)) + 1 def replace_rows(self, row_map): ''' Replace all rows with the values they map to in the given dictionary. Any rows not present as keys in the dictionary will have their nodes deleted. Parameters ---------- row_map : dict Mapping of row numbers to new row numbers ''' for key, data in self.items(): data[:] = [row_map[x] for x in data if x in row_map] class FastBase(object): ''' A fast binary search tree implementation for indexing, using the bintrees library. Parameters ---------- data : Table Sorted columns of the original table row_index : Column object Row numbers corresponding to data columns unique : bool (defaults to False) Whether the values of the index must be unique ''' def __init__(self, data, row_index, unique=False): self.data = self.engine() self.unique = unique for key, row in zip(data, row_index): self.add(tuple(key), row) def add(self, key, val): ''' Add a key, value pair. ''' if self.unique: if key in self.data: # already exists raise ValueError('Cannot add duplicate value "{0}" in a ' 'unique index'.format(key)) self.data[key] = val else: rows = self.data.set_default(key, []) rows.insert(np.searchsorted(rows, val), val) def find(self, key): ''' Find rows corresponding to the given key. ''' rows = self.data.get(key, []) if self.unique: # only one row rows = [rows] return rows def remove(self, key, data=None): ''' Remove data from the given key. ''' if self.unique: try: self.data.pop(key) except KeyError: return False else: node = self.data.get(key, None) if node is None or len(node) == 0: return False if data is None: self.data.pop(key) return True if data not in node: if len(node) == 0: return False raise ValueError("Data does not belong to correct node") node.remove(data) return True def shift_left(self, row): ''' Decrement rows larger than the given row. ''' if self.unique: for key, x in self.data.items(): if x > row: self.data[key] = x - 1 else: for key, node in self.data.items(): self.data[key] = [x - 1 if x > row else x for x in node] def shift_right(self, row): ''' Increment rows greater than or equal to the given row. ''' if self.unique: for key, x in self.data.items(): if x >= row: self.data[key] = x + 1 else: for key, node in self.data.items(): self.data[key] = [x + 1 if x >= row else x for x in node] def traverse(self): ''' Return all nodes in this BST. ''' l = [] for key, data in self.data.items(): n = Node(key, key) n.data = data l.append(n) return l def items(self): ''' Return a list of key, data tuples. ''' if self.unique: return self.data.items() return [x for x in self.data.items() if len(x[1]) > 0] def sort(self): ''' Make row order align with key order. ''' if self.unique: for i, (key, row) in enumerate(self.data.items()): self.data[key] = i else: i = 0 for key, rows in self.data.items(): num_rows = len(rows) self.data[key] = [x for x in range(i, i + num_rows)] i += num_rows def sorted_data(self): ''' Return a list of rows in order sorted by key. ''' if self.unique: return [x for x in self.data.values()] return [x for node in self.data.values() for x in node] def range(self, lower, upper, bounds=(True, True)): ''' Return row values in the given range. ''' # we need Epsilon since bintrees searches for # lower <= key < upper, while we might want lower <= key <= upper # or similar if not bounds[0]: # lower < key lower = Epsilon(lower) if bounds[1]: # key <= upper upper = Epsilon(upper) l = [v for v in self.data.value_slice(lower, upper)] if self.unique: return l return [x for sublist in l for x in sublist] def replace_rows(self, row_map): ''' Replace rows with the values in row_map. ''' if self.unique: del_keys = [] for key, data in self.data.items(): if data in row_map: self.data[key] = row_map[data] else: del_keys.append(key) for key in del_keys: self.data.pop(key) else: for data in self.data.values(): data[:] = [row_map[x] for x in data if x in row_map] def __str__(self): return str(self.data) def __repr__(self): return str(self) try: # bintrees is an optional dependency from bintrees import FastBinaryTree, FastRBTree class FastBST(FastBase): engine = FastBinaryTree class FastRBT(FastBase): engine = FastRBTree except ImportError: FastBST = BST FastRBT = BST astropy-1.1.1/astropy/table/_column_mixins.c0000644001134200020070000035062212644022121022100 0ustar embrayscience00000000000000/* Generated by Cython 0.23.4 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else #define CYTHON_ABI "0_23_4" #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__astropy__table___column_mixins #define __PYX_HAVE_API__astropy__table___column_mixins #include "numpy/arrayobject.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) && defined (_M_X64) #define __Pyx_sst_abs(value) _abs64(value) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char *__pyx_f[] = { "astropy/table/_column_mixins.pyx", }; /*--- Type declarations ---*/ struct __pyx_obj_7astropy_5table_14_column_mixins__ColumnGetitemShim; struct __pyx_obj_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim; /* "astropy/table/_column_mixins.pyx":38 * # have this built in (some versions do, but the ctypedefs are still lacking, * # or what is available is Cython version dependent) * ctypedef object (*binaryfunc)(object, object) # <<<<<<<<<<<<<< * * */ typedef PyObject *(*__pyx_t_7astropy_5table_14_column_mixins_binaryfunc)(PyObject *, PyObject *); /* "astropy/table/_column_mixins.pyx":54 * * * ctypedef object (*item_getter)(object, object) # <<<<<<<<<<<<<< * * */ typedef PyObject *(*__pyx_t_7astropy_5table_14_column_mixins_item_getter)(PyObject *, PyObject *); /* "astropy/table/_column_mixins.pyx":68 * * * cdef class _ColumnGetitemShim: # <<<<<<<<<<<<<< * def __getitem__(self, item): * return base_getitem(self, item, column_getitem) */ struct __pyx_obj_7astropy_5table_14_column_mixins__ColumnGetitemShim { PyObject_HEAD }; /* "astropy/table/_column_mixins.pyx":81 * * * cdef class _MaskedColumnGetitemShim(_ColumnGetitemShim): # <<<<<<<<<<<<<< * def __getitem__(self, item): * return base_getitem(self, item, masked_column_getitem) */ struct __pyx_obj_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim { struct __pyx_obj_7astropy_5table_14_column_mixins__ColumnGetitemShim __pyx_base; }; /* --- Runtime support code (head) --- */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace); #else #define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\ PyObject_RichCompare(op1, op2, Py_EQ) #endif #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); typedef struct { int code_line; PyCodeObject* code_object; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static int __Pyx_check_binary_version(void); #if !defined(__Pyx_PyIdentifier_FromString) #if PY_MAJOR_VERSION < 3 #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) #else #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) #endif #endif static PyObject *__Pyx_ImportModule(const char *name); static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'numpy' */ /* Module declarations from 'astropy.table._column_mixins' */ static PyTypeObject *__pyx_ptype_7astropy_5table_14_column_mixins_ndarray = 0; static PyTypeObject *__pyx_ptype_7astropy_5table_14_column_mixins__ColumnGetitemShim = 0; static PyTypeObject *__pyx_ptype_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim = 0; static CYTHON_INLINE PyObject *__pyx_f_7astropy_5table_14_column_mixins_base_getitem(PyObject *, PyObject *, __pyx_t_7astropy_5table_14_column_mixins_item_getter); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_7astropy_5table_14_column_mixins_column_getitem(PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_7astropy_5table_14_column_mixins_masked_column_getitem(PyObject *, PyObject *); /*proto*/ #define __Pyx_MODULE_NAME "astropy.table._column_mixins" int __pyx_module_is_main_astropy__table___column_mixins = 0; /* Implementation of 'astropy.table._column_mixins' */ static char __pyx_k_ma[] = "ma"; static char __pyx_k_np[] = "np"; static char __pyx_k_sys[] = "sys"; static char __pyx_k_data[] = "data"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_numpy[] = "numpy"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_getitem[] = "__getitem__"; static char __pyx_k_integer[] = "integer"; static char __pyx_k_MaskedArray[] = "MaskedArray"; static char __pyx_k_version_info[] = "version_info"; static char __pyx_k_INTEGER_TYPES[] = "INTEGER_TYPES"; static char __pyx_k_copy_attrs_slice[] = "_copy_attrs_slice"; static char __pyx_k_This_module_provides_mixin_base[] = "\nThis module provides mixin bases classes for the Column and MaskedColumn\nclasses to provide those classes with their custom __getitem__ implementations.\n\nThe reason for this is that implementing a __getitem__ in pure Python actually\nsignificantly slows down the array subscript operation, especially if it needs\nto call the subclass's __getitem__ (i.e. ndarray.__getitem__ in this case). By\nproviding __getitem__ through a base type implemented in C, the __getitem__\nimplementation will go straight into the class's tp_as_mapping->mp_subscript\nslot, rather than going through a class __dict__ and calling a pure Python\nmethod. Furthermore, the C implementation of __getitem__ can easily directly\ncall the base class's implementation (as seen in _ColumnGetitemShim, which\ndirectly calls to ndarray->tp_as_mapping->mp_subscript).\n\nThe main reason for overriding __getitem__ in the Column class is for\nreturning elements out of a multi-dimensional column. That is, if the\nelements of a Column are themselves arrays, the default ndarray.__getitem__\napplies the subclass to those arrays, so they are returned as Column instances\n(when really they're just an array that was in a Column). This overrides that\nbehavior in the case where the element returned from a single row of the\nColumn is itself an array.\n"; static PyObject *__pyx_n_s_INTEGER_TYPES; static PyObject *__pyx_n_s_MaskedArray; static PyObject *__pyx_n_s_copy_attrs_slice; static PyObject *__pyx_n_s_data; static PyObject *__pyx_n_s_getitem; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_integer; static PyObject *__pyx_n_s_ma; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_np; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_sys; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_version_info; static PyObject *__pyx_pf_7astropy_5table_14_column_mixins_18_ColumnGetitemShim___getitem__(struct __pyx_obj_7astropy_5table_14_column_mixins__ColumnGetitemShim *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static PyObject *__pyx_pf_7astropy_5table_14_column_mixins_24_MaskedColumnGetitemShim___getitem__(struct __pyx_obj_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static PyObject *__pyx_tp_new_7astropy_5table_14_column_mixins__ColumnGetitemShim(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_int_3; /* "astropy/table/_column_mixins.pyx":57 * * * cdef inline object base_getitem(object self, object item, item_getter getitem): # <<<<<<<<<<<<<< * if (self).ndim > 1 and isinstance(item, INTEGER_TYPES): * return self.data[item] */ static CYTHON_INLINE PyObject *__pyx_f_7astropy_5table_14_column_mixins_base_getitem(PyObject *__pyx_v_self, PyObject *__pyx_v_item, __pyx_t_7astropy_5table_14_column_mixins_item_getter __pyx_v_getitem) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("base_getitem", 0); /* "astropy/table/_column_mixins.pyx":58 * * cdef inline object base_getitem(object self, object item, item_getter getitem): * if (self).ndim > 1 and isinstance(item, INTEGER_TYPES): # <<<<<<<<<<<<<< * return self.data[item] * */ __pyx_t_2 = ((((PyArrayObject *)__pyx_v_self)->nd > 1) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_INTEGER_TYPES); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_IsInstance(__pyx_v_item, __pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "astropy/table/_column_mixins.pyx":59 * cdef inline object base_getitem(object self, object item, item_getter getitem): * if (self).ndim > 1 and isinstance(item, INTEGER_TYPES): * return self.data[item] # <<<<<<<<<<<<<< * * return getitem(self, item) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_v_item); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "astropy/table/_column_mixins.pyx":58 * * cdef inline object base_getitem(object self, object item, item_getter getitem): * if (self).ndim > 1 and isinstance(item, INTEGER_TYPES): # <<<<<<<<<<<<<< * return self.data[item] * */ } /* "astropy/table/_column_mixins.pyx":61 * return self.data[item] * * return getitem(self, item) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_v_getitem(__pyx_v_self, __pyx_v_item); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "astropy/table/_column_mixins.pyx":57 * * * cdef inline object base_getitem(object self, object item, item_getter getitem): # <<<<<<<<<<<<<< * if (self).ndim > 1 and isinstance(item, INTEGER_TYPES): * return self.data[item] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("astropy.table._column_mixins.base_getitem", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "astropy/table/_column_mixins.pyx":64 * * * cdef inline object column_getitem(object self, object item): # <<<<<<<<<<<<<< * return (ndarray).tp_as_mapping.mp_subscript(self, item) * */ static CYTHON_INLINE PyObject *__pyx_f_7astropy_5table_14_column_mixins_column_getitem(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("column_getitem", 0); /* "astropy/table/_column_mixins.pyx":65 * * cdef inline object column_getitem(object self, object item): * return (ndarray).tp_as_mapping.mp_subscript(self, item) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyTypeObject *)__pyx_ptype_7astropy_5table_14_column_mixins_ndarray)->tp_as_mapping->mp_subscript(__pyx_v_self, __pyx_v_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "astropy/table/_column_mixins.pyx":64 * * * cdef inline object column_getitem(object self, object item): # <<<<<<<<<<<<<< * return (ndarray).tp_as_mapping.mp_subscript(self, item) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("astropy.table._column_mixins.column_getitem", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "astropy/table/_column_mixins.pyx":69 * * cdef class _ColumnGetitemShim: * def __getitem__(self, item): # <<<<<<<<<<<<<< * return base_getitem(self, item, column_getitem) * */ /* Python wrapper */ static PyObject *__pyx_pw_7astropy_5table_14_column_mixins_18_ColumnGetitemShim_1__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static PyObject *__pyx_pw_7astropy_5table_14_column_mixins_18_ColumnGetitemShim_1__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_r = __pyx_pf_7astropy_5table_14_column_mixins_18_ColumnGetitemShim___getitem__(((struct __pyx_obj_7astropy_5table_14_column_mixins__ColumnGetitemShim *)__pyx_v_self), ((PyObject *)__pyx_v_item)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7astropy_5table_14_column_mixins_18_ColumnGetitemShim___getitem__(struct __pyx_obj_7astropy_5table_14_column_mixins__ColumnGetitemShim *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); /* "astropy/table/_column_mixins.pyx":70 * cdef class _ColumnGetitemShim: * def __getitem__(self, item): * return base_getitem(self, item, column_getitem) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_7astropy_5table_14_column_mixins_base_getitem(((PyObject *)__pyx_v_self), __pyx_v_item, __pyx_f_7astropy_5table_14_column_mixins_column_getitem); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "astropy/table/_column_mixins.pyx":69 * * cdef class _ColumnGetitemShim: * def __getitem__(self, item): # <<<<<<<<<<<<<< * return base_getitem(self, item, column_getitem) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("astropy.table._column_mixins._ColumnGetitemShim.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "astropy/table/_column_mixins.pyx":76 * * * cdef inline object masked_column_getitem(object self, object item): # <<<<<<<<<<<<<< * value = MaskedArray.__getitem__(self, item) * return self._copy_attrs_slice(value) */ static CYTHON_INLINE PyObject *__pyx_f_7astropy_5table_14_column_mixins_masked_column_getitem(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_v_value = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("masked_column_getitem", 0); /* "astropy/table/_column_mixins.pyx":77 * * cdef inline object masked_column_getitem(object self, object item): * value = MaskedArray.__getitem__(self, item) # <<<<<<<<<<<<<< * return self._copy_attrs_slice(value) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MaskedArray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getitem); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; __pyx_t_4 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self); __Pyx_INCREF(__pyx_v_item); __Pyx_GIVEREF(__pyx_v_item); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_item); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_value = __pyx_t_1; __pyx_t_1 = 0; /* "astropy/table/_column_mixins.pyx":78 * cdef inline object masked_column_getitem(object self, object item): * value = MaskedArray.__getitem__(self, item) * return self._copy_attrs_slice(value) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_copy_attrs_slice); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_value); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "astropy/table/_column_mixins.pyx":76 * * * cdef inline object masked_column_getitem(object self, object item): # <<<<<<<<<<<<<< * value = MaskedArray.__getitem__(self, item) * return self._copy_attrs_slice(value) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("astropy.table._column_mixins.masked_column_getitem", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "astropy/table/_column_mixins.pyx":82 * * cdef class _MaskedColumnGetitemShim(_ColumnGetitemShim): * def __getitem__(self, item): # <<<<<<<<<<<<<< * return base_getitem(self, item, masked_column_getitem) */ /* Python wrapper */ static PyObject *__pyx_pw_7astropy_5table_14_column_mixins_24_MaskedColumnGetitemShim_1__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static PyObject *__pyx_pw_7astropy_5table_14_column_mixins_24_MaskedColumnGetitemShim_1__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_r = __pyx_pf_7astropy_5table_14_column_mixins_24_MaskedColumnGetitemShim___getitem__(((struct __pyx_obj_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim *)__pyx_v_self), ((PyObject *)__pyx_v_item)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7astropy_5table_14_column_mixins_24_MaskedColumnGetitemShim___getitem__(struct __pyx_obj_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); /* "astropy/table/_column_mixins.pyx":83 * cdef class _MaskedColumnGetitemShim(_ColumnGetitemShim): * def __getitem__(self, item): * return base_getitem(self, item, masked_column_getitem) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_7astropy_5table_14_column_mixins_base_getitem(((PyObject *)__pyx_v_self), __pyx_v_item, __pyx_f_7astropy_5table_14_column_mixins_masked_column_getitem); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "astropy/table/_column_mixins.pyx":82 * * cdef class _MaskedColumnGetitemShim(_ColumnGetitemShim): * def __getitem__(self, item): # <<<<<<<<<<<<<< * return base_getitem(self, item, masked_column_getitem) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("astropy.table._column_mixins._MaskedColumnGetitemShim.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_7astropy_5table_14_column_mixins__ColumnGetitemShim(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_7astropy_5table_14_column_mixins__ColumnGetitemShim(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_sq_item_7astropy_5table_14_column_mixins__ColumnGetitemShim(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; } static PyMethodDef __pyx_methods_7astropy_5table_14_column_mixins__ColumnGetitemShim[] = { {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence__ColumnGetitemShim = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ __pyx_sq_item_7astropy_5table_14_column_mixins__ColumnGetitemShim, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping__ColumnGetitemShim = { 0, /*mp_length*/ __pyx_pw_7astropy_5table_14_column_mixins_18_ColumnGetitemShim_1__getitem__, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_7astropy_5table_14_column_mixins__ColumnGetitemShim = { PyVarObject_HEAD_INIT(0, 0) "astropy.table._column_mixins._ColumnGetitemShim", /*tp_name*/ sizeof(struct __pyx_obj_7astropy_5table_14_column_mixins__ColumnGetitemShim), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_7astropy_5table_14_column_mixins__ColumnGetitemShim, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence__ColumnGetitemShim, /*tp_as_sequence*/ &__pyx_tp_as_mapping__ColumnGetitemShim, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_7astropy_5table_14_column_mixins__ColumnGetitemShim, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_7astropy_5table_14_column_mixins__ColumnGetitemShim, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_7astropy_5table_14_column_mixins__ColumnGetitemShim(t, a, k); if (unlikely(!o)) return 0; return o; } static PyObject *__pyx_sq_item_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; } static PyMethodDef __pyx_methods_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim[] = { {0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence__MaskedColumnGetitemShim = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ __pyx_sq_item_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping__MaskedColumnGetitemShim = { 0, /*mp_length*/ __pyx_pw_7astropy_5table_14_column_mixins_24_MaskedColumnGetitemShim_1__getitem__, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim = { PyVarObject_HEAD_INIT(0, 0) "astropy.table._column_mixins._MaskedColumnGetitemShim", /*tp_name*/ sizeof(struct __pyx_obj_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_7astropy_5table_14_column_mixins__ColumnGetitemShim, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence__MaskedColumnGetitemShim, /*tp_as_sequence*/ &__pyx_tp_as_mapping__MaskedColumnGetitemShim, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif "_column_mixins", __pyx_k_This_module_provides_mixin_base, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_INTEGER_TYPES, __pyx_k_INTEGER_TYPES, sizeof(__pyx_k_INTEGER_TYPES), 0, 0, 1, 1}, {&__pyx_n_s_MaskedArray, __pyx_k_MaskedArray, sizeof(__pyx_k_MaskedArray), 0, 0, 1, 1}, {&__pyx_n_s_copy_attrs_slice, __pyx_k_copy_attrs_slice, sizeof(__pyx_k_copy_attrs_slice), 0, 0, 1, 1}, {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_integer, __pyx_k_integer, sizeof(__pyx_k_integer), 0, 0, 1, 1}, {&__pyx_n_s_ma, __pyx_k_ma, sizeof(__pyx_k_ma), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { return 0; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC init_column_mixins(void); /*proto*/ PyMODINIT_FUNC init_column_mixins(void) #else PyMODINIT_FUNC PyInit__column_mixins(void); /*proto*/ PyMODINIT_FUNC PyInit__column_mixins(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__column_mixins(void)", 0); if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("_column_mixins", __pyx_methods, __pyx_k_This_module_provides_mixin_base, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_astropy__table___column_mixins) { if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "astropy.table._column_mixins")) { if (unlikely(PyDict_SetItemString(modules, "astropy.table._column_mixins", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_ptype_7astropy_5table_14_column_mixins_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_7astropy_5table_14_column_mixins_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyType_Ready(&__pyx_type_7astropy_5table_14_column_mixins__ColumnGetitemShim) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7astropy_5table_14_column_mixins__ColumnGetitemShim.tp_print = 0; if (PyObject_SetAttrString(__pyx_m, "_ColumnGetitemShim", (PyObject *)&__pyx_type_7astropy_5table_14_column_mixins__ColumnGetitemShim) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7astropy_5table_14_column_mixins__ColumnGetitemShim = &__pyx_type_7astropy_5table_14_column_mixins__ColumnGetitemShim; __pyx_type_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim.tp_base = __pyx_ptype_7astropy_5table_14_column_mixins__ColumnGetitemShim; if (PyType_Ready(&__pyx_type_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim.tp_print = 0; if (PyObject_SetAttrString(__pyx_m, "_MaskedColumnGetitemShim", (PyObject *)&__pyx_type_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim = &__pyx_type_7astropy_5table_14_column_mixins__MaskedColumnGetitemShim; /*--- Type import code ---*/ /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /* "astropy/table/_column_mixins.pyx":25 * * * import sys # <<<<<<<<<<<<<< * import numpy as np * */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "astropy/table/_column_mixins.pyx":26 * * import sys * import numpy as np # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "astropy/table/_column_mixins.pyx":29 * * * if sys.version_info[0] == 3: # <<<<<<<<<<<<<< * INTEGER_TYPES = (int, np.integer) * else: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "astropy/table/_column_mixins.pyx":30 * * if sys.version_info[0] == 3: * INTEGER_TYPES = (int, np.integer) # <<<<<<<<<<<<<< * else: * INTEGER_TYPES = (int, long, np.integer) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_integer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)(&PyInt_Type))); __Pyx_GIVEREF(((PyObject *)(&PyInt_Type))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&PyInt_Type))); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTEGER_TYPES, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "astropy/table/_column_mixins.pyx":29 * * * if sys.version_info[0] == 3: # <<<<<<<<<<<<<< * INTEGER_TYPES = (int, np.integer) * else: */ goto __pyx_L2; } /* "astropy/table/_column_mixins.pyx":32 * INTEGER_TYPES = (int, np.integer) * else: * INTEGER_TYPES = (int, long, np.integer) # <<<<<<<<<<<<<< * * */ /*else*/ { __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_integer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)(&PyInt_Type))); __Pyx_GIVEREF(((PyObject *)(&PyInt_Type))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&PyInt_Type))); __Pyx_INCREF(((PyObject *)(&PyLong_Type))); __Pyx_GIVEREF(((PyObject *)(&PyLong_Type))); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)(&PyLong_Type))); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTEGER_TYPES, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L2:; /* "astropy/table/_column_mixins.pyx":73 * * * MaskedArray = np.ma.MaskedArray # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ma); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_MaskedArray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_MaskedArray, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "astropy/table/_column_mixins.pyx":1 * """ # <<<<<<<<<<<<<< * This module provides mixin bases classes for the Column and MaskedColumn * classes to provide those classes with their custom __getitem__ implementations. */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init astropy.table._column_mixins", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init astropy.table._column_mixins"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* --- Runtime support code --- */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule((char *)modname); if (!m) goto end; p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (likely(result)) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = PyCFunction_GET_FUNCTION(func); self = PyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); if (unlikely(!args)) return NULL; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); } } return __Pyx__PyObject_CallOneArg(func, arg); } #else static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_Pack(1, arg); if (unlikely(!args)) return NULL; result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } #endif static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { if (op1 == op2) { Py_RETURN_TRUE; } #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); if (a == b) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } } #endif #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a; const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15 default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ); #else default: Py_RETURN_FALSE; #endif } } if (a == b) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); if ((double)a == (double)b) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } } return PyObject_RichCompare(op1, op2, Py_EQ); } #endif static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } #ifndef __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule static PyObject *__Pyx_ImportModule(const char *name) { PyObject *py_name = 0; PyObject *py_module = 0; py_name = __Pyx_PyIdentifier_FromString(name); if (!py_name) goto bad; py_module = PyImport_Import(py_name); Py_DECREF(py_name); return py_module; bad: Py_XDECREF(py_name); return 0; } #endif #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; char warning[200]; Py_ssize_t basicsize; #ifdef Py_LIMITED_API PyObject *py_basicsize; #endif py_module = __Pyx_ImportModule(module_name); if (!py_module) goto bad; py_name = __Pyx_PyIdentifier_FromString(class_name); if (!py_name) goto bad; result = PyObject_GetAttr(py_module, py_name); Py_DECREF(py_name); py_name = 0; Py_DECREF(py_module); py_module = 0; if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #ifndef Py_LIMITED_API basicsize = ((PyTypeObject *)result)->tp_basicsize; #else py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if (!strict && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility", module_name, class_name); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else if (__Pyx_PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif #endif } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return __Pyx_NewRef(x); m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(x); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ astropy-1.1.1/astropy/table/row.py0000644001134200020070000001606212644017723020103 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import collections import numpy as np from numpy import ma from ..extern import six from ..utils import deprecated from ..utils.compat import NUMPY_LT_1_8 class Row(object): """A class to represent one row of a Table object. A Row object is returned when a Table object is indexed with an integer or when iterating over a table:: >>> from astropy.table import Table >>> table = Table([(1, 2), (3, 4)], names=('a', 'b'), ... dtype=('int32', 'int32')) >>> row = table[1] >>> row a b int32 int32 ----- ----- 2 4 >>> row['a'] 2 >>> row[1] 4 """ def __init__(self, table, index): self._table = table self._index = index n = len(table) if index < -n or index >= n: raise IndexError('index {0} out of range for table with length {1}' .format(index, len(table))) def __getitem__(self, item): return self._table.columns[item][self._index] def __setitem__(self, item, val): self._table.columns[item][self._index] = val def __eq__(self, other): if self._table.masked: # Sent bug report to numpy-discussion group on 2012-Oct-21, subject: # "Comparing rows in a structured masked array raises exception" # No response, so this is still unresolved. raise ValueError('Unable to compare rows for masked table due to numpy.ma bug') return self.as_void() == other def __ne__(self, other): if self._table.masked: raise ValueError('Unable to compare rows for masked table due to numpy.ma bug') return self.as_void() != other def __array__(self, dtype=None): """Support converting Row to np.array via np.array(table). Coercion to a different dtype via np.array(table, dtype) is not supported and will raise a ValueError. If the parent table is masked then the mask information is dropped. """ if dtype is not None: raise ValueError('Datatype coercion is not allowed') return np.asarray(self.as_void()) def __len__(self): return len(self._table.columns) def __iter__(self): index = self._index for col in six.itervalues(self._table.columns): yield col[index] @property def table(self): return self._table @property def index(self): return self._index @property @deprecated('0.4', alternative=':attr:`Row.as_void`') def data(self): """ Returns a *read-only* copy of the row values in the form of np.void or np.ma.mvoid objects. This corresponds to the object types returned for row indexing of a pure numpy structured array or masked array. This method is slow and its use is deprecated. """ return self.as_void() def as_void(self): """ Returns a *read-only* copy of the row values in the form of np.void or np.ma.mvoid objects. This corresponds to the object types returned for row indexing of a pure numpy structured array or masked array. This method is slow and its use is discouraged when possible. Returns ------- void_row : np.void (unmasked) or np.ma.mvoid (masked) Copy of row values """ index = self._index cols = self._table.columns.values() vals = tuple(np.asarray(col)[index] for col in cols) if self._table.masked: # The logic here is a little complicated to work around # bug in numpy < 1.8 (numpy/numpy#483). Need to build up # a np.ma.mvoid object by hand. from .table import descr # Make np.void version of masks. Use the table dtype but # substitute bool for data type masks = tuple(col.mask[index] if hasattr(col, 'mask') else False for col in cols) descrs = (descr(col) for col in cols) mask_dtypes = [(name, np.bool, shape) for name, type_, shape in descrs] row_mask = np.array([masks], dtype=mask_dtypes)[0] # Make np.void version of values, and then the final mvoid row row_vals = np.array([vals], dtype=self.dtype)[0] try: void_row = np.ma.mvoid(data=row_vals, mask=row_mask) except ValueError as err: # Another bug (or maybe same?) that is fixed in 1.8 prevents # accessing a row in masked array if it has object-type members. # >>> x = np.ma.empty(1, dtype=[('a', 'O')]) # >>> x['a'] = 1 # >>> x['a'].mask = True # >>> x[0] # ValueError: Setting void-array with object members using buffer. [numpy.ma.core] # # All we do here is re-raise with a more informative message msg = six.text_type(err) if ('Setting void-array with object members' in msg and NUMPY_LT_1_8): raise ValueError( 'Cannot convert masked table row with Object type ' 'columns using as_void(), due to a bug in Numpy ' '{0}. Please upgrade to Numpy 1.8 or newer.'.format( np.__version__)) else: raise else: void_row = np.array([vals], dtype=self.dtype)[0] return void_row @property def meta(self): return self._table.meta @property def columns(self): return self._table.columns @property def colnames(self): return self._table.colnames @property def dtype(self): return self._table.dtype def _base_repr_(self, html=False): """ Display row as a single-line table but with appropriate header line. """ index = self.index if (self.index >= 0) else self.index + len(self._table) table = self._table[index:index + 1] descr_vals = [self.__class__.__name__, 'index={0}'.format(self.index)] if table.masked: descr_vals.append('masked=True') return table._base_repr_(html, descr_vals, max_width=-1, tableid='table{0}'.format(id(self._table))) def _repr_html_(self): return self._base_repr_(html=True) def __repr__(self): return self._base_repr_(html=False) def __unicode__(self): index = self.index if (self.index >= 0) else self.index + len(self._table) return '\n'.join(self.table[index:index + 1].pformat(max_width=-1)) if six.PY3: __str__ = __unicode__ def __bytes__(self): return six.text_type(self).encode('utf-8') if six.PY2: __str__ = __bytes__ collections.Sequence.register(Row) astropy-1.1.1/astropy/table/np_utils.py0000644001134200020070000005705312640262015021126 0ustar embrayscience00000000000000""" High-level operations for numpy structured arrays. join(): Perform a database join of two numpy ndarrays. hstack(): Horizontally stack a list of numpy ndarrays. vstack(): Vertically stack a list of numpy ndarrays. Some code and inspiration taken from numpy.lib.recfunctions.join_by(). Redistribution license restrictions apply. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six from ..extern.six.moves import zip as izip from ..utils.decorators import deprecated from itertools import chain import collections import numpy as np import numpy.ma as ma from . import _np_utils from ..utils import OrderedDict __all__ = ['join', 'hstack', 'vstack', 'TableMergeError'] DEPRECATION_MESSAGE = ('The %(func)s %(obj_type)s is deprecated and may ' 'be removed in a future version. ' 'Contact the Astropy developers if you need ' 'continued support for this function.') class TableMergeError(ValueError): pass def _counter(iterable): """ Count instances of each unique value in ``iterable``. Returns a dict with the counts. Would use collections.Counter but this isn't available in 2.6. """ counts = collections.defaultdict(int) for val in iterable: counts[val] += 1 return counts def get_col_name_map(arrays, common_names, uniq_col_name='{col_name}_{table_name}', table_names=None): """ Find the column names mapping when merging the list of structured ndarrays ``arrays``. It is assumed that col names in ``common_names`` are to be merged into a single column while the rest will be uniquely represented in the output. The args ``uniq_col_name`` and ``table_names`` specify how to rename columns in case of conflicts. Returns a dict mapping each output column name to the input(s). This takes the form {outname : (col_name_0, col_name_1, ...), ... }. For key columns all of input names will be present, while for the other non-key columns the value will be (col_name_0, None, ..) or (None, col_name_1, ..) etc. """ col_name_map = collections.defaultdict(lambda: [None] * len(arrays)) col_name_list = [] if table_names is None: table_names = [six.text_type(ii + 1) for ii in range(len(arrays))] for idx, array in enumerate(arrays): table_name = table_names[idx] for name in array.dtype.names: out_name = name if name in common_names: # If name is in the list of common_names then insert into # the column name list, but just once. if name not in col_name_list: col_name_list.append(name) else: # If name is not one of the common column outputs, and it collides # with the names in one of the other arrays, then rename others = list(arrays) others.pop(idx) if any(name in other.dtype.names for other in others): out_name = uniq_col_name.format(table_name=table_name, col_name=name) col_name_list.append(out_name) col_name_map[out_name][idx] = name # Check for duplicate output column names col_name_count = _counter(col_name_list) repeated_names = [name for name, count in six.iteritems(col_name_count) if count > 1] if repeated_names: raise TableMergeError('Merging column names resulted in duplicates: {0}. ' 'Change uniq_col_name or table_names args to fix this.' .format(repeated_names)) # Convert col_name_map to a regular dict with tuple (immutable) values col_name_map = OrderedDict((name, col_name_map[name]) for name in col_name_list) return col_name_map def get_descrs(arrays, col_name_map): """ Find the dtypes descrs resulting from merging the list of arrays' dtypes, using the column name mapping ``col_name_map``. Return a list of descrs for the output. """ out_descrs = [] for out_name, in_names in six.iteritems(col_name_map): # List of input arrays that contribute to this output column in_cols = [arr[name] for arr, name in izip(arrays, in_names) if name is not None] # List of names of the columns that contribute to this output column. names = [name for name in in_names if name is not None] # Output dtype is the superset of all dtypes in in_arrays try: dtype = common_dtype(in_cols) except TableMergeError as tme: # Beautify the error message when we are trying to merge columns with incompatible # types by including the name of the columns that originated the error. raise TableMergeError("The '{0}' columns have incompatible types: {1}" .format(names[0], tme._incompat_types)) # Make sure all input shapes are the same uniq_shapes = set(col.shape[1:] for col in in_cols) if len(uniq_shapes) != 1: raise TableMergeError('Key columns {0!r} have different shape'.format(name)) shape = uniq_shapes.pop() out_descrs.append((fix_column_name(out_name), dtype, shape)) return out_descrs def common_dtype(cols): """ Use numpy to find the common dtype for a list of structured ndarray columns. Only allow columns within the following fundamental numpy data types: np.bool_, np.object_, np.number, np.character, np.void """ np_types = (np.bool_, np.object_, np.number, np.character, np.void) uniq_types = set(tuple(issubclass(col.dtype.type, np_type) for np_type in np_types) for col in cols) if len(uniq_types) > 1: # Embed into the exception the actual list of incompatible types. incompat_types = [col.dtype.name for col in cols] tme = TableMergeError('Columns have incompatible types {0}' .format(incompat_types)) tme._incompat_types = incompat_types raise tme arrs = [np.empty(1, dtype=col.dtype) for col in cols] # For string-type arrays need to explicitly fill in non-zero # values or the final arr_common = .. step is unpredictable. for arr in arrs: if arr.dtype.kind in ('S', 'U'): arr[0] = '0' * arr.itemsize arr_common = np.array([arr[0] for arr in arrs]) return arr_common.dtype.str @deprecated('1.0', message=DEPRECATION_MESSAGE) def join(left, right, keys=None, join_type='inner', uniq_col_name='{col_name}_{table_name}', table_names=['1', '2'], col_name_map=None): """ Perform a join of the left and right numpy structured array on specified keys. Parameters ---------- left : structured array Left side table in the join right : structured array Right side table in the join keys : str or list of str Name(s) of column(s) used to match rows of left and right tables. Default is to use all columns which are common to both tables. join_type : str Join type ('inner' | 'outer' | 'left' | 'right'), default is 'inner' uniq_col_name : str or None String generate a unique output column name in case of a conflict. The default is '{col_name}_{table_name}'. table_names : list of str or None Two-element list of table names used when generating unique output column names. The default is ['1', '2']. col_name_map : empty dict or None If passed as a dict then it will be updated in-place with the mapping of output to input column names. """ # Store user-provided col_name_map until the end _col_name_map = col_name_map if join_type not in ('inner', 'outer', 'left', 'right'): raise ValueError("The 'join_type' argument should be in 'inner', " "'outer', 'left' or 'right' (got '{0}' instead)". format(join_type)) # If we have a single key, put it in a tuple if keys is None: keys = tuple(name for name in left.dtype.names if name in right.dtype.names) if len(keys) == 0: raise TableMergeError('No keys in common between left and right tables') elif isinstance(keys, six.string_types): keys = (keys,) # Check the key columns for arr, arr_label in ((left, 'Left'), (right, 'Right')): for name in keys: if name not in arr.dtype.names: raise TableMergeError('{0} table does not have key column {1!r}' .format(arr_label, name)) if hasattr(arr[name], 'mask') and np.any(arr[name].mask): raise TableMergeError('{0} key column {1!r} has missing values' .format(arr_label, name)) # Make sure we work with ravelled arrays left = left.ravel() right = right.ravel() len_left, len_right = len(left), len(right) left_names, right_names = left.dtype.names, right.dtype.names # Joined array dtype as a list of descr (name, type_str, shape) tuples col_name_map = get_col_name_map([left, right], keys, uniq_col_name, table_names) out_descrs = get_descrs([left, right], col_name_map) # Make an array with just the key columns out_keys_dtype = [descr for descr in out_descrs if descr[0] in keys] out_keys = np.empty(len_left + len_right, dtype=out_keys_dtype) for key in keys: out_keys[key][:len_left] = left[key] out_keys[key][len_left:] = right[key] idx_sort = out_keys.argsort(order=keys) out_keys = out_keys[idx_sort] # Get all keys diffs = np.concatenate(([True], out_keys[1:] != out_keys[:-1], [True])) idxs = np.flatnonzero(diffs) # Main inner loop in Cython to compute the cartesion product # indices for the given join type int_join_type = {'inner': 0, 'outer': 1, 'left': 2, 'right': 3}[join_type] masked, n_out, left_out, left_mask, right_out, right_mask = \ _np_utils.join_inner(idxs, idx_sort, len_left, int_join_type) # If either of the inputs are masked then the output is masked if any(isinstance(array, ma.MaskedArray) for array in (left, right)): masked = True if masked: out = ma.empty(n_out, dtype=out_descrs) else: out = np.empty(n_out, dtype=out_descrs) # If either input array was zero length then stub a new version # with one row. In this case the corresponding left_out or right_out # will contain all zeros with mask set to true. This allows the # take(*_out) method calls to work as expected. if len(left) == 0: left = left.__class__(1, dtype=left.dtype) if len(right) == 0: right = right.__class__(1, dtype=right.dtype) for out_name, left_right_names in six.iteritems(col_name_map): left_name, right_name = left_right_names if left_name and right_name: # this is a key which comes from left and right out[out_name] = np.where(right_mask, left[left_name].take(left_out), right[right_name].take(right_out)) continue elif left_name: # out_name came from the left table name, array, array_out, array_mask = left_name, left, left_out, left_mask elif right_name: name, array, array_out, array_mask = right_name, right, right_out, right_mask else: raise TableMergeError('Unexpected column names (maybe one is ""?)') out[out_name] = array[name].take(array_out, axis=0) if masked: if isinstance(array, ma.MaskedArray): array_mask = array_mask | array[name].mask.take(array_out) out[out_name].mask = array_mask # If col_name_map supplied as a dict input, then update. if isinstance(_col_name_map, collections.Mapping): _col_name_map.update(col_name_map) return out def _check_for_sequence_of_structured_arrays(arrays): err = '`arrays` arg must be a sequence (e.g. list) of structured arrays' if not isinstance(arrays, collections.Sequence): raise TypeError(err) for array in arrays: # Must be structured array if not isinstance(array, np.ndarray) or array.dtype.names is None: raise TypeError(err) if len(arrays) == 0: raise ValueError('`arrays` arg must include at least one array') @deprecated('1.0', message=DEPRECATION_MESSAGE) def vstack(arrays, join_type='inner', col_name_map=None): """ Stack structured arrays vertically (by rows) A ``join_type`` of 'exact' (default) means that the arrays must all have exactly the same column names (though the order can vary). If ``join_type`` is 'inner' then the intersection of common columns will be output. A value of 'outer' means the output will have the union of all columns, with array values being masked where no common values are available. Parameters ---------- arrays : list of structured arrays Structured array(s) to stack by rows (vertically) join_type : str Join type ('inner' | 'exact' | 'outer'), default is 'exact' col_name_map : empty dict or None If passed as a dict then it will be updated in-place with the mapping of output to input column names. Examples -------- To stack two structured arrays by rows do:: >>> from astropy.table import np_utils >>> t1 = np.array([(1, 2), ... (3, 4)], dtype=[(str('a'), 'i4'), (str('b'), 'i4')]) >>> t2 = np.array([(5, 6), ... (7, 8)], dtype=[(str('a'), 'i4'), (str('b'), 'i4')]) >>> np_utils.vstack([t1, t2]) array([(1, 2), (3, 4), (5, 6), (7, 8)], dtype=[('a', '>> from astropy.table import np_utils >>> t1 = np.array([(1, 2), ... (3, 4)], dtype=[(str('a'), 'i4'), (str('b'), 'i4')]) >>> t2 = np.array([(5, 6), ... (7, 8)], dtype=[(str('c'), 'i4'), (str('d'), 'i4')]) >>> np_utils.hstack([t1, t2]) array([(1, 2, 5, 6), (3, 4, 7, 8)], dtype=[('a', ' 1: raise TableMergeError("Inconsistent number of rows in input arrays " "(use 'inner' or 'outer' join_type to allow " "non-matching rows)") join_type = 'outer' # For an inner join, keep only columns where all input arrays have that column if join_type == 'inner': min_arr_len = min(arr_lens) arrays = [arr[:min_arr_len] for arr in arrays] arr_lens = [min_arr_len for arr in arrays] # If there are any output rows where one or more input arrays are missing # then the output must be masked. If any input arrays are masked then # output is masked. masked = (any(isinstance(arr, ma.MaskedArray) for arr in arrays) or len(set(arr_lens)) > 1) n_rows = max(arr_lens) out_descrs = get_descrs(arrays, col_name_map) if masked: # Adapted from ma.all_masked() code. Here the array is filled with # zeros instead of empty. This avoids the bug reported here: # https://github.com/numpy/numpy/issues/3276 out = ma.masked_array(np.zeros(n_rows, out_descrs), mask=np.ones(n_rows, ma.make_mask_descr(out_descrs))) else: out = np.empty(n_rows, dtype=out_descrs) for out_name, in_names in six.iteritems(col_name_map): for name, array, arr_len in izip(in_names, arrays, arr_lens): if name is not None: out[out_name][:arr_len] = array[name] # If col_name_map supplied as a dict input, then update. if isinstance(_col_name_map, collections.Mapping): _col_name_map.update(col_name_map) return out @deprecated('1.0', message=DEPRECATION_MESSAGE) def get_groups(table, keys): """ Get groups for numpy structured array on specified keys. Parameters ---------- table : structured array Table to group keys : str or list of str Name(s) of column(s) used to match rows of table. """ if isinstance(keys, six.string_types): keys = (keys,) # Check the key columns for name in keys: if name not in table.dtype.names: raise TableMergeError('Table does not have key column {1!r}' .format(name)) if hasattr(table[name], 'mask') and np.any(table[name].mask): raise TableMergeError('{0} key column {1!r} has missing values' .format(name)) # Make sure we work with ravelled arrays table = table.ravel() len_table = len(table) # joined array dtype as a list of descr (name, type_str, shape) tuples col_name_map = get_col_name_map([table], keys) out_descrs = get_descrs([table], col_name_map) # Make an array with just the key columns out_keys_dtype = [descr for descr in out_descrs if descr[0] in keys] out_keys = np.empty(len_table, dtype=out_keys_dtype) for key in keys: out_keys[key] = table[key] idx_sort = out_keys.argsort(order=keys) out_keys = out_keys[idx_sort] # Get all keys diffs = np.concatenate(([True], out_keys[1:] != out_keys[:-1], [True])) idxs = np.flatnonzero(diffs) return idxs, out_keys def fix_column_name(val): """ Fixes column names so that they are compatible with Numpy on Python 2. Raises a ValueError exception if the column name contains Unicode characters, which can not reasonably be used as a column name. """ if val is not None: try: val = str(val) except UnicodeEncodeError: if not six.PY3: raise ValueError( "Column names must not contain Unicode characters " "on Python 2") raise return val def recarray_fromrecords(rec_list): """ Partial replacement for `~numpy.core.records.fromrecords` which includes a workaround for the bug with unicode arrays described at: https://github.com/astropy/astropy/issues/3052 This should not serve as a full replacement for the original function; this only does enough to fulfill the needs of the table module. """ # Note: This is just copying what Numpy does for converting arbitrary rows # to column arrays in the recarray module; it could be there is a better # way nfields = len(rec_list[0]) obj = np.array(rec_list, dtype=object) array_list = [np.array(obj[..., i].tolist()) for i in range(nfields)] formats = [] for obj in array_list: formats.append(obj.dtype.str) formats = ','.join(formats) return np.rec.fromarrays(array_list, formats=formats) astropy-1.1.1/astropy/table/meta.py0000644001134200020070000002534512644017723020226 0ustar embrayscience00000000000000import textwrap import copy from ..utils import OrderedDict from ..extern import six __all__ = ['get_header_from_yaml', 'get_yaml_from_header', 'get_yaml_from_table'] class ColumnOrderList(list): """ List of tuples that sorts in a specific order that makes sense for astropy table column attributes. """ def sort(self, *args, **kwargs): super(ColumnOrderList, self).sort() column_keys = ['name', 'unit', 'datatype', 'format', 'description', 'meta'] in_dict = dict(self) out_list = [] for key in column_keys: if key in in_dict: out_list.append((key, in_dict[key])) for key, val in self: if key not in column_keys: out_list.append((key, val)) # Clear list in-place del self[:] self.extend(out_list) class ColumnDict(dict): """ Specialized dict subclass to represent attributes of a Column and return items() in a preferred order. This is only for use in generating a YAML map representation that has a fixed order. """ def items(self): """ Return items as a ColumnOrderList, which sorts in the preferred way for column attributes. """ return ColumnOrderList(super(ColumnDict, self).items()) def _construct_odict(load, node): """ Construct OrderedDict from !!omap in yaml safe load. Source: https://gist.github.com/weaver/317164 License: Unspecified This is the same as SafeConstructor.construct_yaml_omap(), except the data type is changed to OrderedDict() and setitem is used instead of append in the loop Examples -------- :: >>> yaml.load(''' # doctest: +SKIP ... !!omap ... - foo: bar ... - mumble: quux ... - baz: gorp ... ''') OrderedDict([('foo', 'bar'), ('mumble', 'quux'), ('baz', 'gorp')]) >>> yaml.load('''!!omap [ foo: bar, mumble: quux, baz : gorp ]''') # doctest: +SKIP OrderedDict([('foo', 'bar'), ('mumble', 'quux'), ('baz', 'gorp')]) """ import yaml omap = OrderedDict() yield omap if not isinstance(node, yaml.SequenceNode): raise yaml.constructor.ConstructorError( "while constructing an ordered map", node.start_mark, "expected a sequence, but found %s" % node.id, node.start_mark ) for subnode in node.value: if not isinstance(subnode, yaml.MappingNode): raise yaml.constructor.ConstructorError( "while constructing an ordered map", node.start_mark, "expected a mapping of length 1, but found %s" % subnode.id, subnode.start_mark ) if len(subnode.value) != 1: raise yaml.constructor.ConstructorError( "while constructing an ordered map", node.start_mark, "expected a single mapping item, but found %d items" % len(subnode.value), subnode.start_mark ) key_node, value_node = subnode.value[0] key = load.construct_object(key_node) value = load.construct_object(value_node) omap[key] = value def _repr_pairs(dump, tag, sequence, flow_style=None): """ This is the same code as BaseRepresenter.represent_sequence(), but the value passed to dump.represent_data() in the loop is a dictionary instead of a tuple. Source: https://gist.github.com/weaver/317164 License: Unspecified """ import yaml value = [] node = yaml.SequenceNode(tag, value, flow_style=flow_style) if dump.alias_key is not None: dump.represented_objects[dump.alias_key] = node best_style = True for (key, val) in sequence: item = dump.represent_data({key: val}) if not (isinstance(item, yaml.ScalarNode) and not item.style): best_style = False value.append(item) if flow_style is None: if dump.default_flow_style is not None: node.flow_style = dump.default_flow_style else: node.flow_style = best_style return node def _repr_odict(dumper, data): """ Represent OrderedDict in yaml dump. Source: https://gist.github.com/weaver/317164 License: Unspecified >>> data = OrderedDict([('foo', 'bar'), ('mumble', 'quux'), ('baz', 'gorp')]) >>> yaml.dump(data, default_flow_style=False) # doctest: +SKIP '!!omap\\n- foo: bar\\n- mumble: quux\\n- baz: gorp\\n' >>> yaml.dump(data, default_flow_style=True) # doctest: +SKIP '!!omap [foo: bar, mumble: quux, baz: gorp]\\n' """ return _repr_pairs(dumper, u'tag:yaml.org,2002:omap', six.iteritems(data)) def _repr_column_dict(dumper, data): """ Represent ColumnDict in yaml dump. This is the same as an ordinary mapping except that the keys are written in a fixed order that makes sense for astropy table columns. """ return dumper.represent_mapping(u'tag:yaml.org,2002:map', data) def _get_col_attributes(col): """ Extract information from a column (apart from the values) that is required to fully serialize the column. """ attrs = ColumnDict() attrs['name'] = col.info.name type_name = col.info.dtype.type.__name__ if six.PY3 and (type_name.startswith('bytes') or type_name.startswith('str')): type_name = 'string' if type_name.endswith('_'): type_name = type_name[:-1] # string_ and bool_ lose the final _ for ECSV attrs['datatype'] = type_name # Set the output attributes for attr, nontrivial, xform in (('unit', lambda x: x is not None, str), ('format', lambda x: x is not None, None), ('description', lambda x: x is not None, None), ('meta', lambda x: x, None)): col_attr = getattr(col.info, attr) if nontrivial(col_attr): attrs[attr] = xform(col_attr) if xform else col_attr return attrs def get_yaml_from_table(table): """ Return lines with a YAML representation of header content from the ``table``. Parameters ---------- table : `~astropy.table.Table` object Table for which header content is output Returns ------- lines : list List of text lines with YAML header content """ header = {'cols': list(six.itervalues(table.columns))} if table.meta: header['meta'] = table.meta return get_yaml_from_header(header) def get_yaml_from_header(header): """ Return lines with a YAML representation of header content from a Table. The ``header`` dict must contain these keys: - 'cols' : list of table column objects (required) - 'meta' : table 'meta' attribute (optional) Other keys included in ``header`` will be serialized in the output YAML representation. Parameters ---------- header : dict Table header content Returns ------- lines : list List of text lines with YAML header content """ try: import yaml except ImportError: raise ImportError('`import yaml` failed, PyYAML package is required for ECSV format') class TableDumper(yaml.Dumper): """ Custom Dumper that represents OrderedDict as an !!omap object. """ def represent_mapping(self, tag, mapping, flow_style=None): """ This is a combination of the Python 2 and 3 versions of this method in the PyYAML library to allow the required key ordering via the ColumnOrderList object. The Python 3 version insists on turning the items() mapping into a list object and sorting, which results in alphabetical order for the column keys. """ value = [] node = yaml.MappingNode(tag, value, flow_style=flow_style) if self.alias_key is not None: self.represented_objects[self.alias_key] = node best_style = True if hasattr(mapping, 'items'): mapping = mapping.items() if hasattr(mapping, 'sort'): mapping.sort() else: mapping = list(mapping) try: mapping = sorted(mapping) except TypeError: pass for item_key, item_value in mapping: node_key = self.represent_data(item_key) node_value = self.represent_data(item_value) if not (isinstance(node_key, yaml.ScalarNode) and not node_key.style): best_style = False if not (isinstance(node_value, yaml.ScalarNode) and not node_value.style): best_style = False value.append((node_key, node_value)) if flow_style is None: if self.default_flow_style is not None: node.flow_style = self.default_flow_style else: node.flow_style = best_style return node TableDumper.add_representer(OrderedDict, _repr_odict) TableDumper.add_representer(ColumnDict, _repr_column_dict) header = copy.copy(header) # Don't overwrite original header['datatype'] = [_get_col_attributes(col) for col in header['cols']] del header['cols'] lines = yaml.dump(header, Dumper=TableDumper).splitlines() return lines class YamlParseError(Exception): pass def get_header_from_yaml(lines): """ Get a header dict from input ``lines`` which should be valid YAML in the ECSV meta format. This input will typically be created by get_yaml_from_header. The output is a dictionary which describes all the table and column meta. The get_cols() method in the io/ascii/ecsv.py file should be used as a guide to using the information when constructing a table using this header dict information. Parameters ---------- lines : list List of text lines with YAML header content Returns ------- header : dict Dictionary describing table and column meta """ try: import yaml except ImportError: raise ImportError('`import yaml` failed, PyYAML package is required for ECSV format') class TableLoader(yaml.SafeLoader): """ Custom Loader that constructs OrderedDict from an !!omap object. This does nothing but provide a namespace for adding the custom odict constructor. """ TableLoader.add_constructor(u'tag:yaml.org,2002:omap', _construct_odict) # Now actually load the YAML data structure into `meta` header_yaml = textwrap.dedent('\n'.join(lines)) try: header = yaml.load(header_yaml, Loader=TableLoader) except Exception as err: raise YamlParseError(str(err)) return header astropy-1.1.1/astropy/table/column.py0000644001134200020070000011737312644017723020600 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six import weakref from copy import deepcopy import numpy as np from numpy import ma from ..units import Unit, Quantity from ..utils.compat import NUMPY_LT_1_8 from ..utils.console import color_print from ..utils.metadata import MetaData from ..utils.data_info import BaseColumnInfo, dtype_info_name from . import groups from . import pprint from .np_utils import fix_column_name # These "shims" provide __getitem__ implementations for Column and MaskedColumn from ._column_mixins import _ColumnGetitemShim, _MaskedColumnGetitemShim from ..config import ConfigAlias AUTO_COLNAME = ConfigAlias( '0.4', 'AUTO_COLNAME', 'auto_colname', 'astropy.table.column', 'astropy.table') # Create a generic TableFormatter object for use by bare columns with no # parent table. FORMATTER = pprint.TableFormatter() INTEGER_TYPES = (int, long, np.integer) if six.PY2 else (int, np.integer) def _auto_names(n_cols): from . import conf return [str(conf.auto_colname).format(i) for i in range(n_cols)] # list of one and two-dimensional comparison functions, which sometimes return # a Column class and sometimes a plain array. Used in __array_wrap__ to ensure # they only return plain (masked) arrays (see #1446 and #1685) _comparison_functions = set( [np.greater, np.greater_equal, np.less, np.less_equal, np.not_equal, np.equal, np.isfinite, np.isinf, np.isnan, np.sign, np.signbit]) def col_copy(col, copy_indices=True): """ This is a mixin-safe version of Column.copy() (with copy_data=True). """ if isinstance(col, BaseColumn): return col.copy() # The new column should have None for the parent_table ref. If the # original parent_table weakref there at the point of copying then it # generates an infinite recursion. Instead temporarily remove the weakref # on the original column and restore after the copy in an exception-safe # manner. parent_table = col.info.parent_table indices = col.info.indices col.info.parent_table = None col.info.indices = [] try: newcol = col.copy() if hasattr(col, 'copy') else deepcopy(col) newcol.info = col.info newcol.info.indices = deepcopy(indices or []) if copy_indices else [] for index in newcol.info.indices: index.replace_col(col, newcol) finally: col.info.parent_table = parent_table col.info.indices = indices return newcol class FalseArray(np.ndarray): def __new__(cls, shape): obj = np.zeros(shape, dtype=np.bool).view(cls) return obj def __setitem__(self, item, val): val = np.asarray(val) if np.any(val): raise ValueError('Cannot set any element of {0} class to True' .format(self.__class__.__name__)) def __setslice__(self, start, stop, val): val = np.asarray(val) if np.any(val): raise ValueError('Cannot set any element of {0} class to True' .format(self.__class__.__name__)) class ColumnInfo(BaseColumnInfo): attrs_from_parent = BaseColumnInfo.attr_names _supports_indexing = True class BaseColumn(_ColumnGetitemShim, np.ndarray): meta = MetaData() def __new__(cls, data=None, name=None, dtype=None, shape=(), length=0, description=None, unit=None, format=None, meta=None, copy=False, copy_indices=True): if data is None: dtype = (np.dtype(dtype).str, shape) self_data = np.zeros(length, dtype=dtype) elif isinstance(data, BaseColumn) and hasattr(data, '_name'): # When unpickling a MaskedColumn, ``data`` will be a bare # BaseColumn with none of the expected attributes. In this case # do NOT execute this block which initializes from ``data`` # attributes. self_data = np.array(data.data, dtype=dtype, copy=copy) if description is None: description = data.description if unit is None: unit = unit or data.unit if format is None: format = data.format if meta is None: meta = deepcopy(data.meta) if name is None: name = data.name elif isinstance(data, Quantity): if unit is None: self_data = np.array(data, dtype=dtype, copy=copy) unit = data.unit else: self_data = np.array(data.to(unit), dtype=dtype, copy=copy) if description is None: description = data.info.description if format is None: format = data.info.format if meta is None: meta = deepcopy(data.info.meta) else: self_data = np.array(data, dtype=dtype, copy=copy) self = self_data.view(cls) self._name = fix_column_name(name) self.unit = unit self.format = format self.description = description self.meta = meta self._parent_table = None self.indices = deepcopy(getattr(data, 'indices', [])) if \ copy_indices else [] for index in self.indices: index.replace_col(data, self) return self @property def data(self): return self.view(np.ndarray) @property def parent_table(self): if self._parent_table is None: return None else: return self._parent_table() @parent_table.setter def parent_table(self, table): if table is None: self._parent_table = None else: self._parent_table = weakref.ref(table) info = ColumnInfo() def copy(self, order='C', data=None, copy_data=True): """ Return a copy of the current instance. If ``data`` is supplied then a view (reference) of ``data`` is used, and ``copy_data`` is ignored. Parameters ---------- order : {'C', 'F', 'A', 'K'}, optional Controls the memory layout of the copy. 'C' means C-order, 'F' means F-order, 'A' means 'F' if ``a`` is Fortran contiguous, 'C' otherwise. 'K' means match the layout of ``a`` as closely as possible. (Note that this function and :func:numpy.copy are very similar, but have different default values for their order= arguments.) Default is 'C'. data : array, optional If supplied then use a view of ``data`` instead of the instance data. This allows copying the instance attributes and meta. copy_data : bool, optional Make a copy of the internal numpy array instead of using a reference. Default is True. Returns ------- col : Column or MaskedColumn Copy of the current column (same type as original) """ if data is None: data = self.data if copy_data: data = data.copy(order) out = data.view(self.__class__) out.__array_finalize__(self) # for MaskedColumn, MaskedArray.__array_finalize__ also copies mask # from self, which is not the idea here, so undo if isinstance(self, MaskedColumn): out._mask = data._mask self._copy_groups(out) return out def __setstate__(self, state): """ Restore the internal state of the Column/MaskedColumn for pickling purposes. This requires that the last element of ``state`` is a 5-tuple that has Column-specific state values. """ # Get the Column attributes and meta name, unit, format, description, meta = state[-1] state = state[:-1] # Using super(type(self), self).__setstate__() gives an infinite # recursion. Manually call the right super class to actually set up # the array object. super_class = ma.MaskedArray if isinstance(self, ma.MaskedArray) else np.ndarray super_class.__setstate__(self, state) # Set the Column attributes and meta self._name = name self.unit = unit self.format = format self.description = description self.meta = meta self._parent_table = None def __reduce__(self): """ Return a 3-tuple for pickling a Column. Use the super-class functionality but then add in a 5-tuple of Column-specific values that get used in __setstate__. """ super_class = ma.MaskedArray if isinstance(self, ma.MaskedArray) else np.ndarray reconstruct_func, reconstruct_func_args, state = super_class.__reduce__(self) # Define Column-specific attrs and meta that gets added to state. column_state = (self.name, self.unit, self.format, self.description, self.meta) state = state + (column_state,) return reconstruct_func, reconstruct_func_args, state # avoid == and != to be done based on type of subclass # (helped solve #1446; see also __array_wrap__) def __eq__(self, other): return self.data.__eq__(other) def __ne__(self, other): return self.data.__ne__(other) def __array_finalize__(self, obj): # Obj will be none for direct call to Column() creator if obj is None: return if six.callable(super(BaseColumn, self).__array_finalize__): super(BaseColumn, self).__array_finalize__(obj) # Self was created from template (e.g. obj[slice] or (obj * 2)) # or viewcast e.g. obj.view(Column). In either case we want to # init Column attributes for self from obj if possible. self.parent_table = None if not hasattr(self, 'indices'): # may have been copied in __new__ self.indices = [] self._copy_attrs(obj) def __array_wrap__(self, out_arr, context=None): """ __array_wrap__ is called at the end of every ufunc. Normally, we want a Column object back and do not have to do anything special. But there are two exceptions: 1) If the output shape is different (e.g. for reduction ufuncs like sum() or mean()), a Column still linking to a parent_table makes little sense, so we return the output viewed as the column content (ndarray or MaskedArray). For this case, we use "[()]" to select everything, and to ensure we convert a zero rank array to a scalar. (For some reason np.sum() returns a zero rank scalar array while np.mean() returns a scalar; So the [()] is needed for this case. 2) When the output is created by any function that returns a boolean we also want to consistently return an array rather than a column (see #1446 and #1685) """ out_arr = super(BaseColumn, self).__array_wrap__(out_arr, context) if (self.shape != out_arr.shape or (isinstance(out_arr, BaseColumn) and (context is not None and context[0] in _comparison_functions))): return out_arr.data[()] else: return out_arr @property def name(self): """ The name of this column. """ return self._name @name.setter def name(self, val): val = fix_column_name(val) if self.parent_table is not None: table = self.parent_table table.columns._rename_column(self.name, val) self._name = val @property def descr(self): """Array-interface compliant full description of the column. This returns a 3-tuple (name, type, shape) that can always be used in a structured array dtype definition. """ return (self.name, self.dtype.str, self.shape[1:]) def iter_str_vals(self): """ Return an iterator that yields the string-formatted values of this column. Returns ------- str_vals : iterator Column values formatted as strings """ # Iterate over formatted values with no max number of lines, no column # name, no unit, and ignoring the returned header info in outs. _pformat_col_iter = self._formatter._pformat_col_iter for str_val in _pformat_col_iter(self, -1, show_name=False, show_unit=False, show_dtype=False, outs={}): yield str_val def attrs_equal(self, col): """Compare the column attributes of ``col`` to this object. The comparison attributes are: ``name``, ``unit``, ``dtype``, ``format``, ``description``, and ``meta``. Parameters ---------- col : Column Comparison column Returns ------- equal : boolean True if all attributes are equal """ if not isinstance(col, BaseColumn): raise ValueError('Comparison `col` must be a Column or ' 'MaskedColumn object') attrs = ('name', 'unit', 'dtype', 'format', 'description', 'meta') equal = all(getattr(self, x) == getattr(col, x) for x in attrs) return equal @property def _formatter(self): return FORMATTER if (self.parent_table is None) else self.parent_table.formatter def pformat(self, max_lines=None, show_name=True, show_unit=False, show_dtype=False, html=False): """Return a list of formatted string representation of column values. If no value of ``max_lines`` is supplied then the height of the screen terminal is used to set ``max_lines``. If the terminal height cannot be determined then the default will be determined using the ``astropy.conf.max_lines`` configuration item. If a negative value of ``max_lines`` is supplied then there is no line limit applied. Parameters ---------- max_lines : int Maximum lines of output (header + data rows) show_name : bool Include column name (default=True) show_unit : bool Include a header row for unit (default=False) show_dtype : bool Include column dtype (default=False) html : bool Format the output as an HTML table (default=False) Returns ------- lines : list List of lines with header and formatted column values """ _pformat_col = self._formatter._pformat_col lines, outs = _pformat_col(self, max_lines, show_name=show_name, show_unit=show_unit, show_dtype=show_dtype, html=html) return lines def pprint(self, max_lines=None, show_name=True, show_unit=False, show_dtype=False): """Print a formatted string representation of column values. If no value of ``max_lines`` is supplied then the height of the screen terminal is used to set ``max_lines``. If the terminal height cannot be determined then the default will be determined using the ``astropy.conf.max_lines`` configuration item. If a negative value of ``max_lines`` is supplied then there is no line limit applied. Parameters ---------- max_lines : int Maximum number of values in output show_name : bool Include column name (default=True) show_unit : bool Include a header row for unit (default=False) show_dtype : bool Include column dtype (default=True) """ _pformat_col = self._formatter._pformat_col lines, outs = _pformat_col(self, max_lines, show_name=show_name, show_unit=show_unit, show_dtype=show_dtype) n_header = outs['n_header'] for i, line in enumerate(lines): if i < n_header: color_print(line, 'red') else: print(line) def more(self, max_lines=None, show_name=True, show_unit=False): """Interactively browse column with a paging interface. Supported keys:: f, : forward one page b : back one page r : refresh same page n : next row p : previous row < : go to beginning > : go to end q : quit browsing h : print this help Parameters ---------- max_lines : int Maximum number of lines in table output show_name : bool Include a header row for column names (default=True) show_unit : bool Include a header row for unit (default=False) """ _more_tabcol = self._formatter._more_tabcol _more_tabcol(self, max_lines=max_lines, show_name=show_name, show_unit=show_unit) @property def unit(self): """ The unit associated with this column. May be a string or a `astropy.units.UnitBase` instance. Setting the ``unit`` property does not change the values of the data. To perform a unit conversion, use ``convert_unit_to``. """ return self._unit @unit.setter def unit(self, unit): if unit is None: self._unit = None else: self._unit = Unit(unit, parse_strict='silent') @unit.deleter def unit(self): self._unit = None def convert_unit_to(self, new_unit, equivalencies=[]): """ Converts the values of the column in-place from the current unit to the given unit. To change the unit associated with this column without actually changing the data values, simply set the ``unit`` property. Parameters ---------- new_unit : str or `astropy.units.UnitBase` instance The unit to convert to. equivalencies : list of equivalence pairs, optional A list of equivalence pairs to try if the unit are not directly convertible. See :ref:`unit_equivalencies`. Raises ------ astropy.units.UnitsError If units are inconsistent """ if self.unit is None: raise ValueError("No unit set on column") self.data[:] = self.unit.to( new_unit, self.data, equivalencies=equivalencies) self.unit = new_unit @property def groups(self): if not hasattr(self, '_groups'): self._groups = groups.ColumnGroups(self) return self._groups def group_by(self, keys): """ Group this column by the specified ``keys`` This effectively splits the column into groups which correspond to unique values of the ``keys`` grouping object. The output is a new `Column` or `MaskedColumn` which contains a copy of this column but sorted by row according to ``keys``. The ``keys`` input to ``group_by`` must be a numpy array with the same length as this column. Parameters ---------- keys : numpy array Key grouping object Returns ------- out : Column New column with groups attribute set accordingly """ return groups.column_group_by(self, keys) def _copy_groups(self, out): """ Copy current groups into a copy of self ``out`` """ if self.parent_table: if hasattr(self.parent_table, '_groups'): out._groups = groups.ColumnGroups(out, indices=self.parent_table._groups._indices) elif hasattr(self, '_groups'): out._groups = groups.ColumnGroups(out, indices=self._groups._indices) # Strip off the BaseColumn-ness for repr and str so that # MaskedColumn.data __repr__ does not include masked_BaseColumn(data = # [1 2], ...). def __repr__(self): return np.asarray(self).__repr__() @property def quantity(self): """ A view of this table column as a `~astropy.units.Quantity` object with units given by the Column's `unit` parameter. """ # the Quantity initializer is used here because it correctly fails # if the column's values are non-numeric (like strings), while .view # will happily return a quantity with gibberish for numerical values return Quantity(self, copy=False, dtype=self.dtype, order='A') def to(self, unit, equivalencies=[], **kwargs): """ Converts this table column to a `~astropy.units.Quantity` object with the requested units. Parameters ---------- unit : `~astropy.units.Unit` or str The unit to convert to (i.e., a valid argument to the :meth:`astropy.units.Quantity.to` method). equivalencies : list of equivalence pairs, optional Equivalencies to use for this conversion. See :meth:`astropy.units.Quantity.to` for more details. Returns ------- quantity : `~astropy.units.Quantity` A quantity object with the contents of this column in the units ``unit``. """ return self.quantity.to(unit, equivalencies) def _copy_attrs(self, obj): """ Copy key column attributes from ``obj`` to self """ for attr in ('name', 'unit', 'format', 'description'): val = getattr(obj, attr, None) setattr(self, attr, val) self.meta = deepcopy(getattr(obj, 'meta', {})) class Column(BaseColumn): """Define a data column for use in a Table object. Parameters ---------- data : list, ndarray or None Column data values name : str Column name and key for reference within Table dtype : numpy.dtype compatible value Data type for column shape : tuple or () Dimensions of a single row element in the column data length : int or 0 Number of row elements in column data description : str or None Full description of column unit : str or None Physical unit format : str or None or function or callable Format string for outputting column values. This can be an "old-style" (``format % value``) or "new-style" (`str.format`) format specification string or a function or any callable object that accepts a single value and returns a string. meta : dict-like or None Meta-data associated with the column Examples -------- A Column can be created in two different ways: - Provide a ``data`` value but not ``shape`` or ``length`` (which are inferred from the data). Examples:: col = Column(data=[1, 2], name='name') # shape=(2,) col = Column(data=[[1, 2], [3, 4]], name='name') # shape=(2, 2) col = Column(data=[1, 2], name='name', dtype=float) col = Column(data=np.array([1, 2]), name='name') col = Column(data=['hello', 'world'], name='name') The ``dtype`` argument can be any value which is an acceptable fixed-size data-type initializer for the numpy.dtype() method. See ``_. Examples include: - Python non-string type (float, int, bool) - Numpy non-string type (e.g. np.float32, np.int64, np.bool) - Numpy.dtype array-protocol type strings (e.g. 'i4', 'f8', 'S15') If no ``dtype`` value is provide then the type is inferred using ``np.array(data)``. - Provide ``length`` and optionally ``shape``, but not ``data`` Examples:: col = Column(name='name', length=5) col = Column(name='name', dtype=int, length=10, shape=(3,4)) The default ``dtype`` is ``np.float64``. The ``shape`` argument is the array shape of a single cell in the column. """ def __new__(cls, data=None, name=None, dtype=None, shape=(), length=0, description=None, unit=None, format=None, meta=None, copy=False, copy_indices=True): if isinstance(data, MaskedColumn) and np.any(data.mask): raise TypeError("Cannot convert a MaskedColumn with masked value to a Column") self = super(Column, cls).__new__(cls, data=data, name=name, dtype=dtype, shape=shape, length=length, description=description, unit=unit, format=format, meta=meta, copy=copy, copy_indices=copy_indices) return self def _base_repr_(self, html=False): # If scalar then just convert to correct numpy type and use numpy repr if self.ndim == 0: return repr(self.item()) descr_vals = [self.__class__.__name__] unit = None if self.unit is None else str(self.unit) shape = None if self.ndim <= 1 else self.shape[1:] for attr, val in (('name', self.name), ('dtype', dtype_info_name(self.dtype)), ('shape', shape), ('unit', unit), ('format', self.format), ('description', self.description), ('length', len(self))): if val is not None: descr_vals.append('{0}={1}'.format(attr, repr(val))) descr = '<' + ' '.join(descr_vals) + '>\n' if html: from ..utils.xml.writer import xml_escape descr = xml_escape(descr) data_lines, outs = self._formatter._pformat_col( self, show_name=False, show_unit=False, show_length=False, html=html) out = descr + '\n'.join(data_lines) if six.PY2 and isinstance(out, six.text_type): out = out.encode('utf-8') return out def _repr_html_(self): return self._base_repr_(html=True) def __repr__(self): return self._base_repr_(html=False) def __unicode__(self): # If scalar then just convert to correct numpy type and use numpy repr if self.ndim == 0: return str(self.item()) lines, outs = self._formatter._pformat_col(self) return '\n'.join(lines) if six.PY3: __str__ = __unicode__ def __bytes__(self): return six.text_type(self).encode('utf-8') if six.PY2: __str__ = __bytes__ # Set items using a view of the underlying data, as it gives an # order-of-magnitude speed-up. [#2994] def __setitem__(self, index, value): # update indices self.info.adjust_indices(index, value, len(self)) self.data[index] = value # # Set slices using a view of the underlying data, as it gives an # # order-of-magnitude speed-up. Only gets called in Python 2. [#3020] def __setslice__(self, start, stop, value): self.info.adjust_indices(slice(start, stop), value, len(self)) self.data.__setslice__(start, stop, value) def insert(self, obj, values): """ Insert values before the given indices in the column and return a new `~astropy.table.Column` object. Parameters ---------- obj : int, slice or sequence of ints Object that defines the index or indices before which ``values`` is inserted. values : array_like Value(s) to insert. If the type of ``values`` is different from that of quantity, ``values`` is converted to the matching type. ``values`` should be shaped so that it can be broadcast appropriately Returns ------- out : `~astropy.table.Column` A copy of column with ``values`` and ``mask`` inserted. Note that the insertion does not occur in-place: a new column is returned. """ if self.dtype.kind == 'O': # Even if values is array-like (e.g. [1,2,3]), insert as a single # object. Numpy.insert instead inserts each element in an array-like # input individually. data = np.insert(self, obj, None, axis=0) data[obj] = values else: # Explicitly convert to dtype of this column. Needed because numpy 1.7 # enforces safe casting by default, so . This isn't the case for 1.6 or 1.8+. values = np.asarray(values, dtype=self.dtype) data = np.insert(self, obj, values, axis=0) out = data.view(self.__class__) out.__array_finalize__(self) return out # We do this to make the methods show up in the API docs name = BaseColumn.name unit = BaseColumn.unit copy = BaseColumn.copy more = BaseColumn.more pprint = BaseColumn.pprint pformat = BaseColumn.pformat convert_unit_to = BaseColumn.convert_unit_to quantity = BaseColumn.quantity to = BaseColumn.to class MaskedColumn(Column, _MaskedColumnGetitemShim, ma.MaskedArray): """Define a masked data column for use in a Table object. Parameters ---------- data : list, ndarray or None Column data values name : str Column name and key for reference within Table mask : list, ndarray or None Boolean mask for which True indicates missing or invalid data fill_value : float, int, str or None Value used when filling masked column elements dtype : numpy.dtype compatible value Data type for column shape : tuple or () Dimensions of a single row element in the column data length : int or 0 Number of row elements in column data description : str or None Full description of column unit : str or None Physical unit format : str or None or function or callable Format string for outputting column values. This can be an "old-style" (``format % value``) or "new-style" (`str.format`) format specification string or a function or any callable object that accepts a single value and returns a string. meta : dict-like or None Meta-data associated with the column Examples -------- A MaskedColumn is similar to a Column except that it includes ``mask`` and ``fill_value`` attributes. It can be created in two different ways: - Provide a ``data`` value but not ``shape`` or ``length`` (which are inferred from the data). Examples:: col = MaskedColumn(data=[1, 2], name='name') col = MaskedColumn(data=[1, 2], name='name', mask=[True, False]) col = MaskedColumn(data=[1, 2], name='name', dtype=float, fill_value=99) The ``mask`` argument will be cast as a boolean array and specifies which elements are considered to be missing or invalid. The ``dtype`` argument can be any value which is an acceptable fixed-size data-type initializer for the numpy.dtype() method. See ``_. Examples include: - Python non-string type (float, int, bool) - Numpy non-string type (e.g. np.float32, np.int64, np.bool) - Numpy.dtype array-protocol type strings (e.g. 'i4', 'f8', 'S15') If no ``dtype`` value is provide then the type is inferred using ``np.array(data)``. When ``data`` is provided then the ``shape`` and ``length`` arguments are ignored. - Provide ``length`` and optionally ``shape``, but not ``data`` Examples:: col = MaskedColumn(name='name', length=5) col = MaskedColumn(name='name', dtype=int, length=10, shape=(3,4)) The default ``dtype`` is ``np.float64``. The ``shape`` argument is the array shape of a single cell in the column. """ def __new__(cls, data=None, name=None, mask=None, fill_value=None, dtype=None, shape=(), length=0, description=None, unit=None, format=None, meta=None, copy=False, copy_indices=True): if mask is None and hasattr(data, 'mask'): mask = data.mask else: mask = deepcopy(mask) # Create self using MaskedArray as a wrapper class, following the example of # class MSubArray in # https://github.com/numpy/numpy/blob/maintenance/1.8.x/numpy/ma/tests/test_subclassing.py # This pattern makes it so that __array_finalize__ is called as expected (e.g. #1471 and # https://github.com/astropy/astropy/commit/ff6039e8) # First just pass through all args and kwargs to BaseColumn, then wrap that object # with MaskedArray. self_data = BaseColumn(data, dtype=dtype, shape=shape, length=length, name=name, unit=unit, format=format, description=description, meta=meta, copy=copy, copy_indices=copy_indices) self = ma.MaskedArray.__new__(cls, data=self_data, mask=mask) # Note: do not set fill_value in the MaskedArray constructor because this does not # go through the fill_value workarounds (see _fix_fill_value below). if fill_value is None and hasattr(data, 'fill_value') and data.fill_value is not None: # Coerce the fill_value to the correct type since `data` may be a # different dtype than self. fill_value = self.dtype.type(data.fill_value) self.fill_value = fill_value self.parent_table = None # needs to be done here since self doesn't come from BaseColumn.__new__ for index in self.indices: index.replace_col(self_data, self) return self def _fix_fill_value(self, val): """Fix a fill value (if needed) to work around a bug with setting the fill value of a string array in MaskedArray with Python 3.x. See https://github.com/numpy/numpy/pull/2733. This mimics the check in numpy.ma.core._check_fill_value() (version < 1.8) which incorrectly sets fill_value to a default if self.dtype.char is 'U' (which is the case for Python 3). Here we change the string to a byte string so that in Python 3 the isinstance(val, basestring) part fails. """ if (NUMPY_LT_1_8 and isinstance(val, six.string_types) and (self.dtype.char not in 'SV')): val = val.encode() return val @property def fill_value(self): return self.get_fill_value() # defer to native ma.MaskedArray method @fill_value.setter def fill_value(self, val): """Set fill value both in the masked column view and in the parent table if it exists. Setting one or the other alone doesn't work.""" val = self._fix_fill_value(val) # Yet another ma bug workaround: If the value of fill_value for a string array is # requested but not yet set then it gets created as 'N/A'. From this point onward # any new fill_values are truncated to 3 characters. Note that this does not # occur if the masked array is a structured array (as in the previous block that # deals with the parent table). # # >>> x = ma.array(['xxxx']) # >>> x.fill_value # fill_value now gets represented as an 'S3' array # 'N/A' # >>> x.fill_value='yyyy' # >>> x.fill_value # 'yyy' # # To handle this we are forced to reset a private variable first: self._fill_value = None self.set_fill_value(val) # defer to native ma.MaskedArray method @property def data(self): out = self.view(ma.MaskedArray) # The following is necessary because of a bug in Numpy, which was # fixed in numpy/numpy#2703. The fix should be included in Numpy 1.8.0. out.fill_value = self.fill_value return out def filled(self, fill_value=None): """Return a copy of self, with masked values filled with a given value. Parameters ---------- fill_value : scalar; optional The value to use for invalid entries (`None` by default). If `None`, the ``fill_value`` attribute of the array is used instead. Returns ------- filled_column : Column A copy of ``self`` with masked entries replaced by `fill_value` (be it the function argument or the attribute of ``self``). """ if fill_value is None: fill_value = self.fill_value fill_value = self._fix_fill_value(fill_value) data = super(MaskedColumn, self).filled(fill_value) # Use parent table definition of Column if available column_cls = self.parent_table.Column if (self.parent_table is not None) else Column out = column_cls(name=self.name, data=data, unit=self.unit, format=self.format, description=self.description, meta=deepcopy(self.meta)) return out def insert(self, obj, values, mask=None): """ Insert values along the given axis before the given indices and return a new `~astropy.table.MaskedColumn` object. Parameters ---------- obj : int, slice or sequence of ints Object that defines the index or indices before which ``values`` is inserted. values : array_like Value(s) to insert. If the type of ``values`` is different from that of quantity, ``values`` is converted to the matching type. ``values`` should be shaped so that it can be broadcast appropriately mask : boolean array_like Mask value(s) to insert. If not supplied then False is used. Returns ------- out : `~astropy.table.MaskedColumn` A copy of column with ``values`` and ``mask`` inserted. Note that the insertion does not occur in-place: a new masked column is returned. """ self_ma = self.data # self viewed as MaskedArray if self.dtype.kind == 'O': # Even if values is array-like (e.g. [1,2,3]), insert as a single # object. Numpy.insert instead inserts each element in an array-like # input individually. new_data = np.insert(self_ma.data, obj, None, axis=0) new_data[obj] = values else: # Explicitly convert to dtype of this column. Needed because numpy 1.7 # enforces safe casting by default, so . This isn't the case for 1.6 or 1.8+. values = np.asarray(values, dtype=self.dtype) new_data = np.insert(self_ma.data, obj, values, axis=0) if mask is None: if self.dtype.kind == 'O': mask = False else: mask = np.zeros(values.shape, dtype=np.bool) new_mask = np.insert(self_ma.mask, obj, mask, axis=0) new_ma = np.ma.array(new_data, mask=new_mask, copy=False) out = new_ma.view(self.__class__) out.parent_table = None out.indices = [] out._copy_attrs(self) return out def _copy_attrs_slice(self, out): # Fixes issue #3023: when calling getitem with a MaskedArray subclass # the original object attributes are not copied. if out.__class__ is self.__class__: out.parent_table = None # we need this because __getitem__ does a shallow copy of indices if out.indices is self.indices: out.indices = [] out._copy_attrs(self) return out def __setitem__(self, index, value): # update indices self.info.adjust_indices(index, value, len(self)) ma.MaskedArray.__setitem__(self, index, value) def __setslice__(self, start, stop, value): # defers to __setitem__, so we don't adjust indices here ma.MaskedArray.__setslice__(self, start, stop, value) # We do this to make the methods show up in the API docs name = BaseColumn.name copy = BaseColumn.copy more = BaseColumn.more pprint = BaseColumn.pprint pformat = BaseColumn.pformat convert_unit_to = BaseColumn.convert_unit_to astropy-1.1.1/astropy/table/__init__.py0000644001134200020070000000222612644017723021030 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six from .. import config as _config class Conf(_config.ConfigNamespace): """ Configuration parameters for `astropy.table`. """ auto_colname = _config.ConfigItem( 'col{0}', 'The template that determines the name of a column if it cannot be ' 'determined. Uses new-style (format method) string formatting.', aliases=['astropy.table.column.auto_colname']) conf = Conf() from .column import Column, MaskedColumn from .groups import TableGroups, ColumnGroups from .table import Table, QTable, TableColumns, Row, TableFormatter, NdarrayMixin from .operations import join, hstack, vstack, unique, TableMergeError from .jsviewer import JSViewer from .bst import BST, FastBST, FastRBT from .sorted_array import SortedArray # Import routines that connect readers/writers to astropy.table from ..io.ascii import connect from ..io.fits import connect from ..io.misc import connect from ..io.votable import connect from . import jsviewer astropy-1.1.1/astropy/table/sorted_array.py0000644001134200020070000002236612644017723021776 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from ..time import Time def _searchsorted(array, val, side='left'): ''' Call np.searchsorted or use a custom binary search if necessary. ''' if hasattr(array, 'searchsorted'): return array.searchsorted(val, side=side) # Python binary search begin = 0 end = len(array) while begin < end: mid = (begin + end) // 2 if val > array[mid]: begin = mid + 1 elif val < array[mid]: end = mid elif side == 'right': begin = mid + 1 else: end = mid return begin class SortedArray(object): ''' Implements a sorted array container using a list of numpy arrays. Parameters ---------- data : Table Sorted columns of the original table row_index : Column object Row numbers corresponding to data columns unique : bool (defaults to False) Whether the values of the index must be unique ''' def __init__(self, data, row_index, unique=False): self.data = data self.row_index = row_index self.num_cols = len(getattr(data, 'colnames', [])) self.unique = unique @property def cols(self): return self.data.columns.values() def add(self, key, row): ''' Add a new entry to the sorted array. Parameters ---------- key : tuple Column values at the given row row : int Row number ''' pos = self.find_pos(key, row) # first >= key if self.unique and 0 <= pos < len(self.row_index) and \ all(self.data[pos][i] == key[i] for i in range(len(key))): # already exists raise ValueError('Cannot add duplicate value "{0}" in a ' 'unique index'.format(key)) self.data.insert_row(pos, key) self.row_index = self.row_index.insert(pos, row) def _get_key_slice(self, i, begin, end): ''' Retrieve the ith slice of the sorted array from begin to end. ''' if i < self.num_cols: return self.cols[i][begin:end] else: return self.row_index[begin:end] def find_pos(self, key, data, exact=False): ''' Return the index of the largest key in data greater than or equal to the given key, data pair. Parameters ---------- key : tuple Column key data : int Row number exact : bool If True, return the index of the given key in data or -1 if the key is not present. ''' begin = 0 end = len(self.row_index) num_cols = self.num_cols if not self.unique: # consider the row value as well key = key + (data,) num_cols += 1 # search through keys in lexicographic order for i in range(num_cols): key_slice = self._get_key_slice(i, begin, end) t = _searchsorted(key_slice, key[i]) # t is the smallest index >= key[i] if exact and (t == len(key_slice) or key_slice[t] != key[i]): # no match return -1 elif t == len(key_slice) or (t == 0 and len(key_slice) > 0 and key[i] < key_slice[0]): # too small or too large return begin + t end = begin + _searchsorted(key_slice, key[i], side='right') begin += t if begin >= len(self.row_index): # greater than all keys return begin return begin def find(self, key): ''' Find all rows matching the given key. Parameters ---------- key : tuple Column values Returns ------- matching_rows : list List of rows matching the input key ''' begin = 0 end = len(self.row_index) # search through keys in lexicographic order for i in range(self.num_cols): key_slice = self._get_key_slice(i, begin, end) t = _searchsorted(key_slice, key[i]) # t is the smallest index >= key[i] if t == len(key_slice) or key_slice[t] != key[i]: # no match return [] elif t == 0 and len(key_slice) > 0 and key[i] < key_slice[0]: # too small or too large return [] end = begin + _searchsorted(key_slice, key[i], side='right') begin += t if begin >= len(self.row_index): # greater than all keys return [] return self.row_index[begin:end] def range(self, lower, upper, bounds): ''' Find values in the given range. Parameters ---------- lower : tuple Lower search bound upper : tuple Upper search bound bounds : tuple (x, y) of bools Indicates whether the search should be inclusive or exclusive with respect to the endpoints. The first argument x corresponds to an inclusive lower bound, and the second argument y to an inclusive upper bound. ''' lower_pos = self.find_pos(lower, 0) upper_pos = self.find_pos(upper, 0) if lower_pos == len(self.row_index): return [] lower_bound = tuple([col[lower_pos] for col in self.cols]) if not bounds[0] and lower_bound == lower: lower_pos += 1 # data[lower_pos] > lower # data[lower_pos] >= lower # data[upper_pos] >= upper if upper_pos < len(self.row_index): upper_bound = tuple([col[upper_pos] for col in self.cols]) if not bounds[1] and upper_bound == upper: upper_pos -= 1 # data[upper_pos] < upper elif upper_bound > upper: upper_pos -= 1 # data[upper_pos] <= upper return self.row_index[lower_pos:upper_pos + 1] def remove(self, key, data): ''' Remove the given entry from the sorted array. Parameters ---------- key : tuple Column values data : int Row number Returns ------- successful : bool Whether the entry was successfully removed ''' pos = self.find_pos(key, data, exact=True) if pos == -1: # key not found return False self.data.remove_row(pos) keep_mask = np.ones(len(self.row_index), dtype=np.bool) keep_mask[pos] = False self.row_index = self.row_index[keep_mask] return True def shift_left(self, row): ''' Decrement all row numbers greater than the input row. Parameters ---------- row : int Input row number ''' self.row_index[self.row_index > row] -= 1 def shift_right(self, row): ''' Increment all row numbers greater than or equal to the input row. Parameters ---------- row : int Input row number ''' self.row_index[self.row_index >= row] += 1 def replace_rows(self, row_map): ''' Replace all rows with the values they map to in the given dictionary. Any rows not present as keys in the dictionary will have their entries deleted. Parameters ---------- row_map : dict Mapping of row numbers to new row numbers ''' num_rows = len(row_map) keep_rows = np.zeros(len(self.row_index), dtype=np.bool) tagged = 0 for i, row in enumerate(self.row_index): if row in row_map: keep_rows[i] = True tagged += 1 if tagged == num_rows: break self.data = self.data[keep_rows] self.row_index = np.array( [row_map[x] for x in self.row_index[keep_rows]]) def items(self): ''' Retrieve all array items as a list of pairs of the form [(key, [row 1, row 2, ...]), ...] ''' array = [] last_key = None for i, key in enumerate(zip(*self.data.columns.values())): row = self.row_index[i] if key == last_key: array[-1][1].append(row) else: last_key = key array.append((key, [row])) return array def sort(self): ''' Make row order align with key order. ''' self.row_index = np.arange(len(self.row_index)) def sorted_data(self): ''' Return rows in sorted order. ''' return self.row_index def __getitem__(self, item): ''' Return a sliced reference to this sorted array. Parameters ---------- item : slice Slice to use for referencing ''' return SortedArray(self.data[item], self.row_index[item]) def __repr__(self): t = self.data.copy() t['rows'] = self.row_index return str(t) def __str__(self): return repr(self) astropy-1.1.1/astropy/table/jsviewer.py0000644001134200020070000001257012644017723021132 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from os.path import abspath, dirname, join from .table import Table from ..io import registry as io_registry from .. import config as _config from .. import extern class Conf(_config.ConfigNamespace): """ Configuration parameters for `astropy.table.jsviewer`. """ jquery_url = _config.ConfigItem( 'https://code.jquery.com/jquery-1.11.3.min.js', 'The URL to the jquery library.') datatables_url = _config.ConfigItem( 'https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js', 'The URL to the jquery datatables library.') css_urls = _config.ConfigItem( ['https://cdn.datatables.net/1.10.9/css/jquery.dataTables.css'], 'The URLs to the css file(s) to include.', cfgtype='list') conf = Conf() JQUERY_URL = _config.ConfigAlias( '0.4', 'JQUERY_URL', 'jquery_url', 'astropy.table.jsviewer', 'astropy.table.jsviewer') DATATABLES_URL = _config.ConfigAlias( '0.4', 'DATATABLES_URL', 'datatables_url', 'astropy.table.jsviewer', 'astropy.table.jsviewer') EXTERN_JS_DIR = abspath(join(dirname(extern.__file__), 'js')) EXTERN_CSS_DIR = abspath(join(dirname(extern.__file__), 'css')) IPYNB_JS_SCRIPT = """ """ HTML_JS_SCRIPT = """ $(document).ready(function() {{ $('#{tid}').dataTable({{ "iDisplayLength": {display_length}, "aLengthMenu": {display_length_menu}, "pagingType": "full_numbers" }}); }} ); """ # Default CSS for the JSViewer writer DEFAULT_CSS = """\ body {font-family: sans-serif;} table.dataTable {width: auto !important; margin: 0 !important;} .dataTables_filter, .dataTables_paginate {float: left !important; margin-left:1em} """ # Default CSS used when rendering a table in the IPython notebook DEFAULT_CSS_NB = """\ table.dataTable {clear: both; width: auto !important; margin: 0 !important;} .dataTables_info, .dataTables_length, .dataTables_filter, .dataTables_paginate{ display: inline-block; margin-right: 1em; } .paginate_button { margin-right: 5px; } """ class JSViewer(object): """Provides an interactive HTML export of a Table. This class provides an interface to the `DataTables `_ library, which allow to visualize interactively an HTML table. It is used by the `~astropy.table.Table.show_in_browser` method. Parameters ---------- use_local_files : bool, optional Use local files or a CDN for JavaScript libraries. Default False. display_length : int, optional Number or rows to show. Default to 50. """ def __init__(self, use_local_files=False, display_length=50): self._use_local_files = use_local_files self.display_length_menu = [[10, 25, 50, 100, 500, 1000, -1], [10, 25, 50, 100, 500, 1000, "All"]] self.display_length = display_length for L in self.display_length_menu: if display_length not in L: L.insert(0, display_length) @property def jquery_urls(self): if self._use_local_files: return ['file://' + join(EXTERN_JS_DIR, 'jquery-1.11.3.min.js'), 'file://' + join(EXTERN_JS_DIR, 'jquery.dataTables.min.js')] else: return [conf.jquery_url, conf.datatables_url] @property def css_urls(self): if self._use_local_files: return ['file://' + join(EXTERN_CSS_DIR, 'jquery.dataTables.css')] else: return conf.css_urls def _jstable_file(self): if self._use_local_files: return 'file://' + join(EXTERN_JS_DIR, 'jquery.dataTables.min') else: return conf.datatables_url[:-3] def ipynb(self, table_id, css=None): html = ''.format(css if css is not None else DEFAULT_CSS_NB) html += IPYNB_JS_SCRIPT.format( display_length=self.display_length, display_length_menu=self.display_length_menu, datatables_url=self._jstable_file(), tid=table_id) return html def html_js(self, table_id='table0'): return HTML_JS_SCRIPT.format( display_length=self.display_length, display_length_menu=self.display_length_menu, tid=table_id).strip() def write_table_jsviewer(table, filename, table_id=None, max_lines=5000, table_class="display compact", jskwargs=None, css=DEFAULT_CSS): if table_id is None: table_id = 'table{id}'.format(id=id(table)) jskwargs = jskwargs or {} jsv = JSViewer(**jskwargs) htmldict = { 'table_id': table_id, 'table_class': table_class, 'css': css, 'cssfiles': jsv.css_urls, 'jsfiles': jsv.jquery_urls, 'js': jsv.html_js(table_id=table_id) } if max_lines < len(table): table = table[:max_lines] table.write(filename, format='html', htmldict=htmldict) io_registry.register_writer('jsviewer', Table, write_table_jsviewer) astropy-1.1.1/astropy/nddata/0000755001134200020070000000000012644022135017052 5ustar embrayscience00000000000000astropy-1.1.1/astropy/nddata/nduncertainty.py0000644001134200020070000002762612640262015022327 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import abc import numpy as np from ..utils.compat import ignored from ..units import Quantity from ..extern import six __all__ = ['MissingDataAssociationException', 'IncompatibleUncertaintiesException', 'NDUncertainty', 'StdDevUncertainty'] class IncompatibleUncertaintiesException(Exception): """ This exception should be used to indicate cases in which uncertainties with two different classes can not be propagated. """ class MissingDataAssociationException(Exception): """ This exception should be used to indicate that an uncertainty instance has not been associated with a parent `~astropy.nddata.NDData` object. """ class NDUncertainty(object): """ This is the base class for uncertainty classes used with NDData. It is implemented as an abstract class and should never be directly instantiated. Classes inheriting from NDData should overload the ``propagate_*`` methods, keeping the call signature the same. The propagate methods can assume that a `parent_nddata` attribute is present which links to the parent_nddata dataset, and take an `~astropy.nddata.NDData` instance as the positional argument, *not* an `~astropy.nddata.NDUncertainty` instance, because the `~astropy.nddata.NDData` instance can be used to access both the data and the uncertainties (some propagations require the data values). """ __metaclass__ = abc.ABCMeta # Indicates whether the class supports the propagation of correlated # uncertainties supports_correlated = False @property def parent_nddata(self): if self._parent_nddata is None: message = "uncertainty is not associated with an NDData object" raise MissingDataAssociationException(message) else: return self._parent_nddata @parent_nddata.setter def parent_nddata(self, value): self._parent_nddata = value @property def uncertainty_type(self): return self._uncertainty_type @uncertainty_type.setter def uncertainty_type(self, value): if not isinstance(value, six.string_types): raise ValueError('uncertainty_type must be a string.') self._uncertainty_type = value @abc.abstractmethod def propagate_add(self, other_nddata, result_data): """ Propagate uncertainties for addition. Parameters ---------- other_nddata : NDData instance The data for the second other_nddata in a + b result_data : `~numpy.ndarray` instance The data array that is the result of the addition Returns ------- result_uncertainty : NDUncertainty instance The resulting uncertainty Raises ------ IncompatibleUncertaintiesException Raised if the method does not know how to add the uncertainties """ @abc.abstractmethod def propagate_subtract(self, other_nddata, result_data): """ Propagate uncertainties for subtraction. Parameters ---------- other_nddata : NDData instance The data for the second other_nddata in a + b result_data : `~numpy.ndarray` instance The data array that is the result of the addition Returns ------- result_uncertainty : NDUncertainty instance The resulting uncertainty Raises ------ IncompatibleUncertaintiesException Raised if the method does not know how to add the uncertainties """ @abc.abstractmethod def propagate_multiply(self, other_nddata, result_data): """ Propagate uncertainties for multiplication. Parameters ---------- other_nddata : NDData instance The data for the second other_nddata in a + b result_data : `~numpy.ndarray` instance The data array that is the result of the addition Returns ------- result_uncertainty : NDUncertainty instance The resulting uncertainty """ @abc.abstractmethod def propagate_divide(self, other_nddata, result_data): """ Propagate uncertainties for division. Parameters ---------- other_nddata : NDData instance The data for the second other_nddata in a + b result_data : `~numpy.ndarray` instance The data array that is the result of the addition Returns ------- result_uncertainty : NDUncertainty instance The resulting uncertainty """ class StdDevUncertainty(NDUncertainty): """ A class for standard deviation uncertainties """ support_correlated = False def __init__(self, array=None, copy=True): self._unit = None self.uncertainty_type = 'std' if array is None: self.array = None elif isinstance(array, StdDevUncertainty): self.array = np.array(array.array, copy=copy, subok=True) elif isinstance(array, Quantity): self.array = np.array(array.value, copy=copy, subok=True) self._unit = array.unit else: self.array = np.array(array, copy=copy, subok=True) @property def parent_nddata(self): message = "Uncertainty is not associated with an NDData object" try: if self._parent_nddata is None: raise MissingDataAssociationException(message) else: return self._parent_nddata except AttributeError: raise MissingDataAssociationException(message) @parent_nddata.setter def parent_nddata(self, value): if self.array is None or value is None: self._parent_nddata = value else: if value.data.shape != self.array.shape: raise ValueError("parent shape does not match " "array data shape") self._parent_nddata = value @property def array(self): return self._array @array.setter def array(self, value): if value is not None: with ignored(MissingDataAssociationException): if value.shape != self.parent_nddata.data.shape: raise ValueError("array shape does not match " "parent data shape") self._array = value def propagate_add(self, other_nddata, result_data): """ Propagate uncertainties for addition. Parameters ---------- other_nddata : NDData instance The data for the second other_nddata in a + b result_data : `~numpy.ndarray` instance The data array that is the result of the addition Returns ------- result_uncertainty : NDUncertainty instance The resulting uncertainty Raises ------ IncompatibleUncertaintiesException Raised if the method does not know how to propagate the uncertainties. """ if not isinstance(other_nddata.uncertainty, StdDevUncertainty): raise IncompatibleUncertaintiesException if self.array is None: raise ValueError("standard deviation values are not set") if other_nddata.uncertainty.array is None: raise ValueError("standard deviation values are not set " "in other_nddata") result_uncertainty = StdDevUncertainty() result_uncertainty.array = np.sqrt(self.array**2 + other_nddata.uncertainty.array**2) return result_uncertainty def __getitem__(self, item): """ Slice the standard deviation array using standard numpy slicing """ new_array = self.array[item] return self.__class__(new_array, copy=False) def propagate_subtract(self, other_nddata, result_data): """ Propagate uncertainties for subtraction. Parameters ---------- other_nddata : NDData instance The data for the second other_nddata in a + b result_data : `~numpy.ndarray` instance The data array that is the result of the addition Returns ------- result_uncertainty : NDUncertainty instance The resulting uncertainty Raises ------ IncompatibleUncertaintiesException Raised if the method does not know how to propagate the uncertainties. """ if not isinstance(other_nddata.uncertainty, StdDevUncertainty): raise IncompatibleUncertaintiesException if self.array is None: raise ValueError("standard deviation values are not set") if other_nddata.uncertainty.array is None: raise ValueError("standard deviation values are not set " "in other_nddata") result_uncertainty = StdDevUncertainty() result_uncertainty.array = np.sqrt(self.array**2 + other_nddata.uncertainty.array**2) return result_uncertainty def propagate_multiply(self, other_nddata, result_data): """ Propagate uncertainties for multiplication. Parameters ---------- other_nddata : NDData instance The data for the second other_nddata in a + b result_data : `~numpy.ndarray` instance The data array that is the result of the addition Returns ------- result_uncertainty : NDUncertainty instance The resulting uncertainty Raises ------ IncompatibleUncertaintiesException Raised if the method does not know how to propagate the uncertainties. """ if not isinstance(other_nddata.uncertainty, StdDevUncertainty): raise IncompatibleUncertaintiesException if self.array is None: raise ValueError("standard deviation values are not set") if other_nddata.uncertainty.array is None: raise ValueError("standard deviation values are not set in " "other_nddata") result_uncertainty = StdDevUncertainty() result_uncertainty.array = \ (np.sqrt((self.array/self.parent_nddata.data)**2 + (other_nddata.uncertainty.array/other_nddata.data)**2) * result_data) return result_uncertainty def propagate_divide(self, other_nddata, result_data): """ Propagate uncertainties for division. Parameters ---------- other_nddata : NDData instance The data for the second other_nddata in a + b result_data : `~numpy.ndarray` instance The data array that is the result of the addition Returns ------- result_uncertainty : NDUncertainty instance The resulting uncertainty Raises ------ IncompatibleUncertaintiesException Raised if the method does not know how to propagate the uncertainties. """ if not isinstance(other_nddata.uncertainty, StdDevUncertainty): raise IncompatibleUncertaintiesException if self.array is None: raise ValueError("standard deviation values are not set") if other_nddata.uncertainty.array is None: raise ValueError("standard deviation values are not set " "in other_nddata") result_uncertainty = StdDevUncertainty() result_uncertainty.array = \ (np.sqrt((self.array/self.parent_nddata.data)**2 + (other_nddata.uncertainty.array/other_nddata.data)**2) * result_data) return result_uncertainty astropy-1.1.1/astropy/nddata/tests/0000755001134200020070000000000012644022135020214 5ustar embrayscience00000000000000astropy-1.1.1/astropy/nddata/tests/test_utils.py0000644001134200020070000004207512644017723023004 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from numpy.testing import assert_allclose from ...tests.helper import pytest, assert_quantity_allclose from ..utils import (extract_array, add_array, subpixel_indices, block_reduce, block_replicate, overlap_slices, NoOverlapError, PartialOverlapError, Cutout2D) from ...wcs import WCS from ...coordinates import SkyCoord from ... import units as u try: import skimage HAS_SKIMAGE = True except ImportError: HAS_SKIMAGE = False test_positions = [(10.52, 3.12), (5.62, 12.97), (31.33, 31.77), (0.46, 0.94), (20.45, 12.12), (42.24, 24.42)] test_position_indices = [(0, 3), (0, 2), (4, 1), (4, 2), (4, 3), (3, 4)] test_slices = [slice(10.52, 3.12), slice(5.62, 12.97), slice(31.33, 31.77), slice(0.46, 0.94), slice(20.45, 12.12), slice(42.24, 24.42)] subsampling = 5 test_pos_bad = [(-1, -4), (-1, 0), (6, 2), (6, 6)] def test_slices_different_dim(): '''Overlap from arrays with different number of dim is undefined.''' with pytest.raises(ValueError) as e: overlap_slices((4, 5, 6), (1, 2), (0, 0)) assert "the same number of dimensions" in str(e.value) def test_slices_pos_different_dim(): '''Position must have same dim as arrays.''' with pytest.raises(ValueError) as e: overlap_slices((4, 5), (1, 2), (0, 0, 3)) assert "the same number of dimensions" in str(e.value) @pytest.mark.parametrize('pos', test_pos_bad) def test_slices_no_overlap(pos): '''If there is no overlap between arrays, an error should be raised.''' with pytest.raises(NoOverlapError): overlap_slices((5, 5), (2, 2), pos) def test_slices_partial_overlap(): '''Compute a slice for partially overlapping arrays.''' temp = overlap_slices((5,), (3,), (0,)) assert temp == ((slice(0, 2, None),), (slice(1, 3, None),)) temp = overlap_slices((5,), (3,), (0,), mode='partial') assert temp == ((slice(0, 2, None),), (slice(1, 3, None),)) for pos in [0, 4]: with pytest.raises(PartialOverlapError) as e: temp = overlap_slices((5,), (3,), (pos,), mode='strict') assert 'Arrays overlap only partially.' in str(e.value) def test_slices_overlap_wrong_mode(): '''Call overlap_slices with non-existing mode.''' with pytest.raises(ValueError) as e: overlap_slices((5,), (3,), (0,), mode='full') assert "Mode can be only" in str(e.value) def test_extract_array_wrong_mode(): '''Call extract_array with non-existing mode.''' with pytest.raises(ValueError) as e: extract_array(np.arange(4), (2, ), (0, ), mode='full') assert "Valid modes are 'partial', 'trim', and 'strict'." == str(e.value) def test_extract_array_1d_even(): '''Extract 1 d arrays. All dimensions are treated the same, so we can test in 1 dim. ''' assert np.all(extract_array(np.arange(4), (2, ), (0, ), fill_value=-99) == np.array([-99, 0])) for i in [1, 2, 3]: assert np.all(extract_array(np.arange(4), (2, ), (i, )) == np.array([i -1 , i])) assert np.all(extract_array(np.arange(4.), (2, ), (4, ), fill_value=np.inf) == np.array([3, np.inf])) def test_extract_array_1d_odd(): '''Extract 1 d arrays. All dimensions are treated the same, so we can test in 1 dim. The first few lines test the most error-prone part: Extraction of an array on the boundaries. Additional tests (e.g. dtype of return array) are done for the last case only. ''' assert np.all(extract_array(np.arange(4), (3,), (-1, ), fill_value=-99) == np.array([-99, -99, 0])) assert np.all(extract_array(np.arange(4), (3,), (0, ), fill_value=-99) == np.array([-99, 0, 1])) for i in [1,2]: assert np.all(extract_array(np.arange(4), (3,), (i, )) == np.array([i-1, i, i+1])) assert np.all(extract_array(np.arange(4), (3,), (3, ), fill_value=-99) == np.array([2, 3, -99])) arrayin = np.arange(4.) extracted = extract_array(arrayin, (3,), (4, )) assert extracted[0] == 3 assert np.isnan(extracted[1]) # since I cannot use `==` to test for nan assert extracted.dtype == arrayin.dtype def test_extract_array_1d(): """In 1d, shape can be int instead of tuple""" assert np.all(extract_array(np.arange(4), 3, (-1, ), fill_value=-99) == np.array([-99, -99, 0])) assert np.all(extract_array(np.arange(4), 3, -1, fill_value=-99) == np.array([-99, -99, 0])) def test_extract_Array_float(): """integer is at bin center""" for a in np.arange(2.51, 3.49, 0.1): assert np.all(extract_array(np.arange(5), 3, a) == np.array([2, 3, 4])) def test_extract_array_1d_trim(): '''Extract 1 d arrays. All dimensions are treated the same, so we can test in 1 dim. ''' assert np.all(extract_array(np.arange(4), (2, ), (0, ), mode='trim') == np.array([0])) for i in [1, 2, 3]: assert np.all(extract_array(np.arange(4), (2, ), (i, ), mode='trim') == np.array([i -1 , i])) assert np.all(extract_array(np.arange(4.), (2, ), (4, ), mode='trim') == np.array([3])) @pytest.mark.parametrize('mode', ['partial', 'trim', 'strict']) def test_extract_array_easy(mode): """ Test extract_array utility function. Test by extracting an array of ones out of an array of zeros. """ large_test_array = np.zeros((11, 11)) small_test_array = np.ones((5, 5)) large_test_array[3:8, 3:8] = small_test_array extracted_array = extract_array(large_test_array, (5, 5), (5, 5), mode=mode) assert np.all(extracted_array == small_test_array) def test_extract_array_return_pos(): '''Check that the return position is calculated correctly. The result will differ by mode. All test here are done in 1d because it's easier to construct correct test cases. ''' large_test_array = np.arange(5) for i in np.arange(-1, 6): extracted, new_pos = extract_array(large_test_array, 3, i, mode='partial', return_position=True) assert new_pos == (1, ) # Now check an array with an even number for i, expected in zip([1.49, 1.51, 3], [1.49, 0.51, 1]): extracted, new_pos = extract_array(large_test_array, (2,), (i,), mode='strict', return_position=True) assert new_pos == (expected, ) # For mode='trim' the answer actually depends for i, expected in zip(np.arange(-1, 6), (-1, 0, 1, 1, 1, 1, 1)): extracted, new_pos = extract_array(large_test_array, (3,), (i,), mode='trim', return_position=True) assert new_pos == (expected, ) def test_add_array_odd_shape(): """ Test add_array utility function. Test by adding an array of ones out of an array of zeros. """ large_test_array = np.zeros((11, 11)) small_test_array = np.ones((5, 5)) large_test_array_ref = large_test_array.copy() large_test_array_ref[3:8, 3:8] += small_test_array added_array = add_array(large_test_array, small_test_array, (5, 5)) assert np.all(added_array == large_test_array_ref) def test_add_array_even_shape(): """ Test add_array_2D utility function. Test by adding an array of ones out of an array of zeros. """ large_test_array = np.zeros((11, 11)) small_test_array = np.ones((4, 4)) large_test_array_ref = large_test_array.copy() large_test_array_ref[0:2, 0:2] += small_test_array[2:4, 2:4] added_array = add_array(large_test_array, small_test_array, (0, 0)) assert np.all(added_array == large_test_array_ref) @pytest.mark.parametrize(('position', 'subpixel_index'), zip(test_positions, test_position_indices)) def test_subpixel_indices(position, subpixel_index): """ Test subpixel_indices utility function. Test by asserting that the function returns correct results for given test values. """ assert np.all(subpixel_indices(position, subsampling) == subpixel_index) @pytest.mark.skipif('not HAS_SKIMAGE') class TestBlockReduce(object): def test_1d(self): """Test 1D array.""" data = np.arange(4) expected = np.array([1, 5]) result = block_reduce(data, 2) assert np.all(result == expected) def test_1d_mean(self): """Test 1D array with func=np.mean.""" data = np.arange(4) block_size = 2. expected = block_reduce(data, block_size, func=np.sum) / block_size result_mean = block_reduce(data, block_size, func=np.mean) assert np.all(result_mean == expected) def test_2d(self): """Test 2D array.""" data = np.arange(4).reshape(2, 2) expected = np.array([[6]]) result = block_reduce(data, 2) assert np.all(result == expected) def test_2d_mean(self): """Test 2D array with func=np.mean.""" data = np.arange(4).reshape(2, 2) block_size = 2. expected = (block_reduce(data, block_size, func=np.sum) / block_size**2) result = block_reduce(data, block_size, func=np.mean) assert np.all(result == expected) def test_2d_trim(self): """ Test trimming of 2D array when size is not perfectly divisible by block_size. """ data1 = np.arange(15).reshape(5, 3) result1 = block_reduce(data1, 2) data2 = data1[0:4, 0:2] result2 = block_reduce(data2, 2) assert np.all(result1 == result2) def test_block_size_broadcasting(self): """Test scalar block_size broadcasting.""" data = np.arange(16).reshape(4, 4) result1 = block_reduce(data, 2) result2 = block_reduce(data, (2, 2)) assert np.all(result1 == result2) def test_block_size_len(self): """Test block_size length.""" data = np.ones((2, 2)) with pytest.raises(ValueError): block_reduce(data, (2, 2, 2)) @pytest.mark.skipif('not HAS_SKIMAGE') class TestBlockReplicate(object): def test_1d(self): """Test 1D array.""" data = np.arange(2) expected = np.array([0, 0, 0.5, 0.5]) result = block_replicate(data, 2) assert np.all(result == expected) def test_1d_conserve_sum(self): """Test 1D array with conserve_sum=False.""" data = np.arange(2) block_size = 2. expected = block_replicate(data, block_size) * block_size result = block_replicate(data, block_size, conserve_sum=False) assert np.all(result == expected) def test_2d(self): """Test 2D array.""" data = np.arange(2).reshape(2, 1) expected = np.array([[0, 0], [0, 0], [0.25, 0.25], [0.25, 0.25]]) result = block_replicate(data, 2) assert np.all(result == expected) def test_2d_conserve_sum(self): """Test 2D array with conserve_sum=False.""" data = np.arange(6).reshape(2, 3) block_size = 2. expected = block_replicate(data, block_size) * block_size**2 result = block_replicate(data, block_size, conserve_sum=False) assert np.all(result == expected) def test_block_size_broadcasting(self): """Test scalar block_size broadcasting.""" data = np.arange(4).reshape(2, 2) result1 = block_replicate(data, 2) result2 = block_replicate(data, (2, 2)) assert np.all(result1 == result2) def test_block_size_len(self): """Test block_size length.""" data = np.arange(5) with pytest.raises(ValueError): block_replicate(data, (2, 2)) class TestCutout2D(object): def setup_class(self): self.data = np.arange(20.).reshape(5, 4) self.position = SkyCoord('13h11m29.96s -01d19m18.7s', frame='icrs') wcs = WCS(naxis=2) rho = np.pi / 3. scale = 0.05 / 3600. wcs.wcs.cd = [[scale*np.cos(rho), -scale*np.sin(rho)], [scale*np.sin(rho), scale*np.cos(rho)]] wcs.wcs.ctype = ['RA---TAN', 'DEC--TAN'] wcs.wcs.crval = [self.position.ra.value, self.position.dec.value] wcs.wcs.crpix = [3, 3] self.wcs = wcs def test_cutout(self): sizes = [3, 3*u.pixel, (3, 3), (3*u.pixel, 3*u.pix), (3., 3*u.pixel), (2.9, 3.3)] for size in sizes: position = (2.1, 1.9) c = Cutout2D(self.data, position, size) assert c.data.shape == (3, 3) assert c.data[1, 1] == 10 assert c.origin_original == (1, 1) assert c.origin_cutout == (0, 0) assert c.input_position_original == position assert_allclose(c.input_position_cutout, (1.1, 0.9)) assert c.position_original == (2., 2.) assert c.position_cutout == (1., 1.) assert c.center_original == (2., 2.) assert c.center_cutout == (1., 1.) assert c.bbox_original == ((1, 3), (1, 3)) assert c.bbox_cutout == ((0, 2), (0, 2)) assert c.slices_original == (slice(1, 4), slice(1, 4)) assert c.slices_cutout == (slice(0, 3), slice(0, 3)) def test_size_length(self): with pytest.raises(ValueError): Cutout2D(self.data, (2, 2), (1, 1, 1)) def test_size_units(self): for size in [3 * u.cm, (3, 3 * u.K)]: with pytest.raises(ValueError): Cutout2D(self.data, (2, 2), size) def test_size_pixel(self): """ Check size in derived pixel units. """ size = 0.3*u.arcsec / (0.1*u.arcsec/u.pixel) c = Cutout2D(self.data, (2, 2), size) assert c.data.shape == (3, 3) assert c.data[0, 0] == 5 assert c.slices_original == (slice(1, 4), slice(1, 4)) assert c.slices_cutout == (slice(0, 3), slice(0, 3)) def test_size_angle(self): c = Cutout2D(self.data, (2, 2), (0.1*u.arcsec), wcs=self.wcs) assert c.data.shape == (2, 2) assert c.data[0, 0] == 5 assert c.slices_original == (slice(1, 3), slice(1, 3)) assert c.slices_cutout == (slice(0, 2), slice(0, 2)) def test_size_angle_without_wcs(self): with pytest.raises(ValueError): Cutout2D(self.data, (2, 2), (3, 3* u.arcsec)) def test_cutout_trim_overlap(self): c = Cutout2D(self.data, (0, 0), (3, 3), mode='trim') assert c.data.shape == (2, 2) assert c.data[0, 0] == 0 assert c.slices_original == (slice(0, 2), slice(0, 2)) assert c.slices_cutout == (slice(0, 2), slice(0, 2)) def test_cutout_partial_overlap(self): c = Cutout2D(self.data, (0, 0), (3, 3), mode='partial') assert c.data.shape == (3, 3) assert c.data[1, 1] == 0 assert c.slices_original == (slice(0, 2), slice(0, 2)) assert c.slices_cutout == (slice(1, 3), slice(1, 3)) def test_cutout_partial_overlap_fill_value(self): fill_value = -99 c = Cutout2D(self.data, (0, 0), (3, 3), mode='partial', fill_value=fill_value) assert c.data.shape == (3, 3) assert c.data[1, 1] == 0 assert c.data[0, 0] == fill_value def test_copy(self): data = np.copy(self.data) c = Cutout2D(data, (2, 3), (3, 3)) xy = (0, 0) value = 100. c.data[xy] = value xy_orig = c.to_original_position(xy) yx = xy_orig[::-1] assert data[yx] == value data = np.copy(self.data) c2 = Cutout2D(self.data, (2, 3), (3, 3), copy=True) c2.data[xy] = value assert data[yx] != value def test_to_from_large(self): position = (2, 2) c = Cutout2D(self.data, position, (3, 3)) xy = (0, 0) result = c.to_cutout_position(c.to_original_position(xy)) assert_allclose(result, xy) def test_skycoord_without_wcs(self): with pytest.raises(ValueError): Cutout2D(self.data, self.position, (3, 3)) def test_skycoord(self): c = Cutout2D(self.data, self.position, (3, 3), wcs=self.wcs) skycoord_original = self.position.from_pixel(c.center_original[1], c.center_original[0], self.wcs) skycoord_cutout = self.position.from_pixel(c.center_cutout[1], c.center_cutout[0], c.wcs) assert_quantity_allclose(skycoord_original.ra, skycoord_cutout.ra) assert_quantity_allclose(skycoord_original.dec, skycoord_cutout.dec) def test_skycoord_partial(self): c = Cutout2D(self.data, self.position, (3, 3), wcs=self.wcs, mode='partial') skycoord_original = self.position.from_pixel(c.center_original[1], c.center_original[0], self.wcs) skycoord_cutout = self.position.from_pixel(c.center_cutout[1], c.center_cutout[0], c.wcs) assert_quantity_allclose(skycoord_original.ra, skycoord_cutout.ra) assert_quantity_allclose(skycoord_original.dec, skycoord_cutout.dec) astropy-1.1.1/astropy/nddata/tests/test_nddata_base.py0000644001134200020070000000266712640262015024064 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # Tests of NDDataBase from __future__ import (absolute_import, division, print_function, unicode_literals) from ..nddata_base import NDDataBase from ...tests.helper import pytest class MinimalSubclass(NDDataBase): def __init__(self): super(MinimalSubclass, self).__init__() @property def data(self): return None @property def mask(self): return super(MinimalSubclass, self).mask @property def unit(self): return super(MinimalSubclass, self).unit @property def wcs(self): return super(MinimalSubclass, self).wcs @property def meta(self): return super(MinimalSubclass, self).meta class MinimalUncertainty(object): """ Define the minimum attributes acceptable as an uncertainty object. """ def __init__(self, value): self._uncertainty = value @property def uncertainty_type(self): return "totally and completely fake" def test_nddata_base_subclass(): a = MinimalSubclass() assert a.meta is None assert a.data is None assert a.mask is None assert a.unit is None assert a.wcs is None good_uncertainty = MinimalUncertainty(5) a.uncertainty = good_uncertainty assert a.uncertainty is good_uncertainty bad_uncertainty = 5 with pytest.raises(TypeError): a.uncertainty = bad_uncertainty astropy-1.1.1/astropy/nddata/tests/test_nddata.py0000644001134200020070000001536012640262015023064 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS from __future__ import (absolute_import, division, print_function, unicode_literals) import textwrap import numpy as np from numpy.testing import assert_array_equal from ..nddata import NDData from ..nduncertainty import StdDevUncertainty, NDUncertainty from ...tests.helper import pytest, raises from ... import units as u from ...utils import NumpyRNGContext class FakeUncertainty(NDUncertainty): def __init__(self, *arg, **kwd): self._unit = None pass def propagate_add(self, data, final_data): pass def propagate_subtract(self, data, final_data): pass def propagate_multiply(self, data, final_data): pass def propagate_divide(self, data, final_data): pass def array(self): pass class FakeNumpyArray(object): """ Class that has a few of the attributes of a numpy array. These attributes are checked for by NDData. """ def __init__(self): super(FakeNumpyArray, self).__init__() def shape(self): pass def __getitem__(self): pass def __array__(self): pass def test_nddata_empty(): with pytest.raises(TypeError): NDData() # empty initializer should fail def test_nddata_init_with_nonarray(): inp = [1, 2, 3] nd = NDData(inp) assert (np.array(inp) == nd.data).all() def test_nddata_simple(): with NumpyRNGContext(123): nd = NDData(np.random.random((10, 10))) assert nd.data.shape == (10, 10) assert nd.data.size == 100 assert nd.data.dtype == np.dtype(float) def test_nddata_data_properties(): # First one is slicable but has no shape, so should fail. with pytest.raises(TypeError): NDData({'a': 'dict'}) # This has a shape but is not slicable class Shape(object): def __init__(self): self.shape = 5 def __repr__(self): return '7' with pytest.raises(TypeError): NDData(Shape()) def test_nddata_str(): arr1d = NDData(np.array([1, 2, 3])) assert str(arr1d) == '[1 2 3]' arr2d = NDData(np.array([[1, 2], [3, 4]])) assert str(arr2d) == textwrap.dedent(""" [[1 2] [3 4]]"""[1:]) arr3d = NDData(np.array([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])) assert str(arr3d) == textwrap.dedent(""" [[[1 2] [3 4]] [[5 6] [7 8]]]"""[1:]) def test_nddata_repr(): arr1d = NDData(np.array([1, 2, 3])) assert repr(arr1d) == 'NDData([1, 2, 3])' arr2d = NDData(np.array([[1, 2], [3, 4]])) assert repr(arr2d) == textwrap.dedent(""" NDData([[1, 2], [3, 4]])"""[1:]) arr3d = NDData(np.array([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])) assert repr(arr3d) == textwrap.dedent(""" NDData([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])"""[1:]) def test_nddata_mask_valid(): with NumpyRNGContext(456): NDData(np.random.random((10, 10)), mask=np.random.random((10, 10)) > 0.5) def test_nddata_uncertainty_init(): u = StdDevUncertainty(array=np.ones((5, 5))) d = NDData(np.ones((5, 5)), uncertainty=u) # Expect a TypeError if the uncertainty is missing # attribute uncertainty_type. with pytest.raises(TypeError): NDData(np.array([1]), uncertainty=5) # Expect a TypeError if the uncertainty has attribute uncertainty_type # but it is not a string. class BadUncertainty(object): def __init__(self): self.uncertainty_type = 5 with pytest.raises(TypeError): NDData(np.array([1]), uncertainty=BadUncertainty()) def test_nddata_init_from_nddata_data_argument_only(): ndd1 = NDData(np.array([1])) ndd2 = NDData(ndd1) assert ndd2.wcs == ndd1.wcs assert ndd2.uncertainty == ndd1.uncertainty assert ndd2.mask == ndd1.mask assert ndd2.unit == ndd1.unit assert ndd2.meta == ndd1.meta def test_nddata_init_from_nddata_does_not_convert_data(): ndd1 = NDData(FakeNumpyArray()) # First make sure that NDData isn't converting its data to a numpy array. assert isinstance(ndd1.data, FakeNumpyArray) # Make a new NDData initialized from an NDData ndd2 = NDData(ndd1) # Check that the data wasn't converted to numpy assert isinstance(ndd2.data, FakeNumpyArray) def test_nddata_copy_ref(): """ Tests to ensure that creating a new NDData object copies by *reference*. """ a = np.ones((10, 10)) nd_ref = NDData(a) a[0, 0] = 0 assert nd_ref.data[0, 0] == 0 def test_nddata_conversion(): nd = NDData(np.array([[1, 2, 3], [4, 5, 6]])) assert nd.data.size == 6 assert nd.data.dtype == np.dtype(int) @raises(ValueError) def test_invalid_unit(): d = NDData(np.ones((5, 5)), unit="NotAValidUnit") def test_slicing_not_supported(): ndd = NDData(np.ones((5, 5))) with pytest.raises(TypeError): ndd[0] def test_initializing_from_nddata(): d1 = NDData(np.ones((5, 5))) d2 = NDData(d1) assert d1.data is d2.data def test_initializing_from_nduncertainty(): u1 = StdDevUncertainty(np.ones((5, 5)) * 3) u2 = StdDevUncertainty(u1, copy=False) assert u1.array is u2.array # Test an array and a scalar because a scalar Quantity does not always # behaves the same way as an array. @pytest.mark.parametrize('data', [np.array([1, 2, 3]), 5]) def test_initializing_nddata_from_quantity(data): # Until nddata and quantity are integrated initializing with a quantity # should raise an error. unit = u.adu ndd = NDData(data * unit) assert ndd.unit == unit np.testing.assert_array_equal(ndd.data, np.array(data)) def test_initializing_nddata_from_quantity_and_unit_raises_error(): # Should raise an error if a Quantity is provided for the data and # an explicit unit is given. with pytest.raises(ValueError): NDData([1, 2, 3] * u.adu, unit=u.adu) def test_masked_array_input(): with NumpyRNGContext(12345): a = np.random.randn(100) marr = np.ma.masked_where(a > 0, a) nd = NDData(marr) # check that masks and data match assert_array_equal(nd.mask, marr.mask) assert_array_equal(nd.data, marr.data) # check that they are both by reference marr.mask[10] = ~marr.mask[10] marr.data[11] = 123456789 assert_array_equal(nd.mask, marr.mask) assert_array_equal(nd.data, marr.data) # Check that the meta descriptor is working as expected. The MetaBaseTest class # takes care of defining all the tests, and we simply have to define the class # and any minimal set of args to pass. from ...utils.tests.test_metadata import MetaBaseTest class TestMetaNDData(MetaBaseTest): test_class = NDData args = np.array([[1.]]) astropy-1.1.1/astropy/nddata/tests/test_compat.py0000644001134200020070000001030412640262015023105 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # This module contains tests of a class equivalent to pre-1.0 NDData. from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from ...tests.helper import pytest from ..nddata import NDData from ..compat import NDDataArray from ..nduncertainty import StdDevUncertainty from ... import units as u NDDATA_ATTRIBUTES = ['mask', 'flags', 'uncertainty', 'unit', 'shape', 'size', 'dtype', 'ndim', 'wcs', 'convert_unit_to'] def test_nddataarray_has_attributes_of_old_nddata(): ndd = NDDataArray([1, 2, 3]) for attr in NDDATA_ATTRIBUTES: assert hasattr(ndd, attr) def test_nddata_simple(): nd = NDDataArray(np.zeros((10, 10))) assert nd.shape == (10, 10) assert nd.size == 100 assert nd.dtype == np.dtype(float) def test_nddata_conversion(): nd = NDDataArray(np.array([[1, 2, 3], [4, 5, 6]])) assert nd.size == 6 assert nd.dtype == np.dtype(int) @pytest.mark.parametrize('flags_in', [ np.array([True, False]), np.array([1, 0]), [True, False], [1, 0], np.array(['a', 'b']), ['a', 'b']]) def test_nddata_flags_init_without_np_array(flags_in): ndd = NDDataArray([1, 1], flags=flags_in) assert (ndd.flags == flags_in).all() @pytest.mark.parametrize(('shape'), [(10,), (5, 5), (3, 10, 10)]) def test_nddata_flags_invalid_shape(shape): with pytest.raises(ValueError) as exc: NDDataArray(np.zeros((10, 10)), flags=np.ones(shape)) assert exc.value.args[0] == 'dimensions of flags do not match data' def test_convert_unit_to(): # convert_unit_to should return a copy of its input d = NDDataArray(np.ones((5, 5))) d.unit = 'km' d.uncertainty = StdDevUncertainty(0.1 + np.zeros_like(d)) # workaround because zeros_like does not support dtype arg until v1.6 # and NDData accepts only bool ndarray as mask tmp = np.zeros_like(d.data) d.mask = np.array(tmp, dtype=np.bool) d1 = d.convert_unit_to('m') assert np.all(d1.data == np.array(1000.0)) assert np.all(d1.uncertainty.array == 1000.0 * d.uncertainty.array) assert d1.unit == u.m # changing the output mask should not change the original d1.mask[0, 0] = True assert d.mask[0, 0] != d1.mask[0, 0] d.flags = np.zeros_like(d.data) d1 = d.convert_unit_to('m') # check that subclasses can require wcs and/or unit to be present and use # _arithmetic and convert_unit_to class SubNDData(NDDataArray): """ Subclass for test initialization of subclasses in NDData._arithmetic and NDData.convert_unit_to """ def __init__(self, *arg, **kwd): super(SubNDData, self).__init__(*arg, **kwd) if self.unit is None: raise ValueError("Unit for subclass must be specified") if self.wcs is None: raise ValueError("WCS for subclass must be specified") def test_init_of_subclass_in_convert_unit_to(): data = np.ones([10, 10]) arr1 = SubNDData(data, unit='m', wcs=5) result = arr1.convert_unit_to('km') np.testing.assert_array_equal(arr1.data, 1000 * result.data) # Test for issue #4129: def test_nddataarray_from_nddataarray(): ndd1 = NDDataArray([1., 4., 9.], uncertainty=StdDevUncertainty([1., 2., 3.]), flags=[0, 1, 0]) ndd2 = NDDataArray(ndd1) # Test that the 2 instances point to the same objects and aren't just # equal; this is explicitly documented for the main data array and we # probably want to catch any future change in behaviour for the other # attributes too and ensure they are intentional. assert ndd2.data is ndd1.data assert ndd2.uncertainty is ndd1.uncertainty assert ndd2.flags is ndd1.flags assert ndd2.meta is ndd1.meta # Test for issue #4137: def test_nddataarray_from_nddata(): ndd1 = NDData([1., 4., 9.], uncertainty=StdDevUncertainty([1., 2., 3.])) ndd2 = NDDataArray(ndd1) assert ndd2.data is ndd1.data assert ndd2.uncertainty is ndd1.uncertainty assert ndd2.meta is ndd1.meta astropy-1.1.1/astropy/nddata/tests/test_flag_collection.py0000644001134200020070000000326612644020323024755 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS from __future__ import (absolute_import, division, print_function, unicode_literals) import os import numpy as np from ...tests.helper import pytest from .. import FlagCollection def test_init(): FlagCollection(shape=(1, 2, 3)) def test_init_noshape(): with pytest.raises(Exception) as exc: FlagCollection() assert exc.value.args[0] == ('FlagCollection should be initialized with ' 'the shape of the data') def test_init_notiterable(): with pytest.raises(Exception) as exc: FlagCollection(shape=1.) assert exc.value.args[0] == ('FlagCollection shape should be ' 'an iterable object') def test_setitem(): f = FlagCollection(shape=(1, 2, 3)) f['a'] = np.ones((1, 2, 3)).astype(float) f['b'] = np.ones((1, 2, 3)).astype(int) f['c'] = np.ones((1, 2, 3)).astype(bool) f['d'] = np.ones((1, 2, 3)).astype(str) @pytest.mark.parametrize(('value'), [1, 1., 'spam', [1, 2, 3], (1., 2., 3.)]) def test_setitem_invalid_type(value): f = FlagCollection(shape=(1, 2, 3)) with pytest.raises(Exception) as exc: f['a'] = value assert exc.value.args[0] == 'flags should be given as a Numpy array' @pytest.mark.skipif("os.environ.get('APPVEYOR')", reason="fails on AppVeyor") def test_setitem_invalid_shape(): f = FlagCollection(shape=(1, 2, 3)) with pytest.raises(ValueError) as exc: f['a'] = np.ones((3, 2, 1)) assert exc.value.args[0].startswith('flags array shape') assert exc.value.args[0].endswith('does not match data shape (1, 2, 3)') astropy-1.1.1/astropy/nddata/tests/test_decorators.py0000644001134200020070000001164512640262015024000 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import inspect import numpy as np from ...extern import six from ...tests.helper import catch_warnings, pytest from ... import units as u from ..nddata import NDData from ..decorators import support_nddata @support_nddata def wrapped_function_1(data, wcs=None, unit=None): return data, wcs, unit def test_pass_numpy(): data_in = np.array([1, 2, 3]) data_out, wcs_out, unit_out = wrapped_function_1(data=data_in) assert data_out is data_in assert wcs_out is None assert unit_out is None def test_pass_all_separate(): data_in = np.array([1, 2, 3]) wcs_in = "the wcs" unit_in = u.Jy data_out, wcs_out, unit_out = wrapped_function_1(data=data_in, wcs=wcs_in, unit=unit_in) assert data_out is data_in assert wcs_out is wcs_in assert unit_out is unit_in def test_pass_nddata(): data_in = np.array([1, 2, 3]) wcs_in = "the wcs" unit_in = u.Jy nddata_in = NDData(data_in, wcs=wcs_in, unit=unit_in) data_out, wcs_out, unit_out = wrapped_function_1(nddata_in) assert data_out is data_in assert wcs_out is wcs_in assert unit_out is unit_in def test_pass_nddata_and_explicit(): data_in = np.array([1, 2, 3]) wcs_in = "the wcs" unit_in = u.Jy unit_in_alt = u.mJy nddata_in = NDData(data_in, wcs=wcs_in, unit=unit_in) with catch_warnings() as w: data_out, wcs_out, unit_out = wrapped_function_1(nddata_in, unit=unit_in_alt) assert data_out is data_in assert wcs_out is wcs_in assert unit_out is unit_in_alt assert len(w) == 1 assert str(w[0].message) == ("Property unit has been passed explicitly and as " "an NDData property, using explicitly specified value") def test_pass_nddata_ignored(): data_in = np.array([1, 2, 3]) wcs_in = "the wcs" unit_in = u.Jy nddata_in = NDData(data_in, wcs=wcs_in, unit=unit_in, mask=[0, 1, 0]) with catch_warnings() as w: data_out, wcs_out, unit_out = wrapped_function_1(nddata_in) assert data_out is data_in assert wcs_out is wcs_in assert unit_out is unit_in assert len(w) == 1 assert str(w[0].message) == ("The following attributes were set on the data " "object, but will be ignored by the function: mask") def test_incorrect_first_argument(): with pytest.raises(ValueError) as exc: @support_nddata def wrapped_function_2(something, wcs=None, unit=None): pass assert exc.value.args[0] == "Can only wrap functions whose first positional argument is `data`" with pytest.raises(ValueError) as exc: @support_nddata def wrapped_function_3(something, data, wcs=None, unit=None): pass assert exc.value.args[0] == "Can only wrap functions whose first positional argument is `data`" with pytest.raises(ValueError) as exc: @support_nddata def wrapped_function_4(wcs=None, unit=None): pass assert exc.value.args[0] == "Can only wrap functions whose first positional argument is `data`" def test_wrap_function_no_kwargs(): @support_nddata def wrapped_function_5(data, other_data): return data data_in = np.array([1, 2, 3]) nddata_in = NDData(data_in) assert wrapped_function_5(nddata_in, [1, 2, 3]) is data_in def test_wrap_function_repack_valid(): @support_nddata(repack=True, returns=['data']) def wrapped_function_5(data, other_data): return data data_in = np.array([1, 2, 3]) nddata_in = NDData(data_in) nddata_out = wrapped_function_5(nddata_in, [1, 2, 3]) assert isinstance(nddata_out, NDData) assert nddata_out.data is data_in def test_wrap_function_accepts(): class MyData(NDData): pass @support_nddata(accepts=MyData) def wrapped_function_5(data, other_data): return data data_in = np.array([1, 2, 3]) nddata_in = NDData(data_in) mydata_in = MyData(data_in) assert wrapped_function_5(mydata_in, [1, 2, 3]) is data_in with pytest.raises(TypeError) as exc: wrapped_function_5(nddata_in, [1, 2, 3]) assert exc.value.args[0] == "Only NDData sub-classes that inherit from MyData can be used by this function" def test_wrap_preserve_signature_docstring(): @support_nddata def wrapped_function_6(data, wcs=None, unit=None): """ An awesome function """ pass if wrapped_function_6.__doc__ is not None: assert wrapped_function_6.__doc__.strip() == "An awesome function" if six.PY3: signature = inspect.formatargspec( *inspect.getfullargspec(wrapped_function_6)) else: signature = inspect.formatargspec( *inspect.getargspec(wrapped_function_6)) assert signature == "(data, wcs=None, unit=None)" astropy-1.1.1/astropy/nddata/tests/__init__.py0000644001134200020070000000000012602615531022315 0ustar embrayscience00000000000000astropy-1.1.1/astropy/nddata/utils.py0000644001134200020070000007776312644017723020617 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module includes helper functions for array operations. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from copy import deepcopy from .decorators import support_nddata from astropy.utils import lazyproperty from astropy.coordinates import SkyCoord from astropy.wcs.utils import skycoord_to_pixel, proj_plane_pixel_scales from astropy import units as u __all__ = ['extract_array', 'add_array', 'subpixel_indices', 'overlap_slices', 'block_reduce', 'block_replicate', 'NoOverlapError', 'PartialOverlapError', 'Cutout2D'] class NoOverlapError(ValueError): '''Raised when determining the overlap of non-overlapping arrays.''' pass class PartialOverlapError(ValueError): '''Raised when arrays only partially overlap.''' pass def _round(a): '''Always round up. ``np.round`` cannot be used here, because it rounds .5 to the nearest even number. ''' return int(np.floor(a + 0.5)) def _offset(a): '''Offset by 0.5 for an even array. For an array with an odd number of elements, the center is symmetric, e.g. for 3 elements, it's center +/-1 elements, but for four elements it's center -2 / +1 This function introduces that offset. ''' if np.mod(a, 2) == 0: return -0.5 else: return 0. def overlap_slices(large_array_shape, small_array_shape, position, mode='partial'): """ Get slices for the overlapping part of a small and a large array. Given a certain position of the center of the small array, with respect to the large array, tuples of slices are returned which can be used to extract, add or subtract the small array at the given position. This function takes care of the correct behavior at the boundaries, where the small array is cut of appropriately. Integer positions are at the pixel centers. Parameters ---------- large_array_shape : tuple or int The shape of the large array (for 1D arrays, this can be an `int`). small_array_shape : tuple or int The shape of the small array (for 1D arrays, this can be an `int`). See the ``mode`` keyword for additional details. position : tuple of numbers or number The position of the small array's center with respect to the large array. The pixel coordinates should be in the same order as the array shape. Integer positions are at the pixel centers. For any axis where ``small_array_shape`` is even, the position is rounded up, e.g. extracting two elements with a center of ``1`` will define the extracted region as ``[0, 1]``. mode : {'partial', 'trim', 'strict'}, optional In ``'partial'`` mode, a partial overlap of the small and the large array is sufficient. The ``'trim'`` mode is similar to the ``'partial'`` mode, but ``slices_small`` will be adjusted to return only the overlapping elements. In the ``'strict'`` mode, the small array has to be fully contained in the large array, otherwise an `~astropy.nddata.utils.PartialOverlapError` is raised. In all modes, non-overlapping arrays will raise a `~astropy.nddata.utils.NoOverlapError`. Returns ------- slices_large : tuple of slices A tuple of slice objects for each axis of the large array, such that ``large_array[slices_large]`` extracts the region of the large array that overlaps with the small array. slices_small : slice A tuple of slice objects for each axis of the small array, such that ``small_array[slices_small]`` extracts the region that is inside the large array. """ if mode not in ['partial', 'trim', 'strict']: raise ValueError('Mode can be only "partial", "trim", or "strict".') if np.isscalar(small_array_shape): small_array_shape = (small_array_shape, ) if np.isscalar(large_array_shape): large_array_shape = (large_array_shape, ) if np.isscalar(position): position = (position, ) if len(small_array_shape) != len(large_array_shape): raise ValueError('"large_array_shape" and "small_array_shape" must ' 'have the same number of dimensions.') if len(small_array_shape) != len(position): raise ValueError('"position" must have the same number of dimensions ' 'as "small_array_shape".') # Get edge coordinates edges_min = [_round(pos + 0.5 - small_shape / 2. + _offset(small_shape)) for (pos, small_shape) in zip(position, small_array_shape)] edges_max = [_round(pos + 0.5 + small_shape / 2. + _offset(small_shape)) for (pos, small_shape) in zip(position, small_array_shape)] for e_max in edges_max: if e_max <= 0: raise NoOverlapError('Arrays do not overlap.') for e_min, large_shape in zip(edges_min, large_array_shape): if e_min >= large_shape: raise NoOverlapError('Arrays do not overlap.') if mode == 'strict': for e_min in edges_min: if e_min < 0: raise PartialOverlapError('Arrays overlap only partially.') for e_max, large_shape in zip(edges_max, large_array_shape): if e_max >= large_shape: raise PartialOverlapError('Arrays overlap only partially.') # Set up slices slices_large = tuple(slice(max(0, edge_min), min(large_shape, edge_max)) for (edge_min, edge_max, large_shape) in zip(edges_min, edges_max, large_array_shape)) if mode == 'trim': slices_small = tuple(slice(0, slc.stop - slc.start) for slc in slices_large) else: slices_small = tuple(slice(max(0, -edge_min), min(large_shape - edge_min, edge_max - edge_min)) for (edge_min, edge_max, large_shape) in zip(edges_min, edges_max, large_array_shape)) return slices_large, slices_small def extract_array(array_large, shape, position, mode='partial', fill_value=np.nan, return_position=False): """ Extract a smaller array of the given shape and position from a larger array. Parameters ---------- array_large : `~numpy.ndarray` The array from which to extract the small array. shape : tuple or int The shape of the extracted array (for 1D arrays, this can be an `int`). See the ``mode`` keyword for additional details. position : tuple of numbers or number The position of the small array's center with respect to the large array. The pixel coordinates should be in the same order as the array shape. Integer positions are at the pixel centers (for 1D arrays, this can be a number). mode : {'partial', 'trim', 'strict'}, optional The mode used for extracting the small array. For the ``'partial'`` and ``'trim'`` modes, a partial overlap of the small array and the large array is sufficient. For the ``'strict'`` mode, the small array has to be fully contained within the large array, otherwise an `~astropy.nddata.utils.PartialOverlapError` is raised. In all modes, non-overlapping arrays will raise a `~astropy.nddata.utils.NoOverlapError`. In ``'partial'`` mode, positions in the small array that do not overlap with the large array will be filled with ``fill_value``. In ``'trim'`` mode only the overlapping elements are returned, thus the resulting small array may be smaller than the requested ``shape``. fill_value : number, optional If ``mode='partial'``, the value to fill pixels in the extracted small array that do not overlap with the input ``array_large``. ``fill_value`` must have the same ``dtype`` as the ``array_large`` array. return_position : boolean, optional If `True`, return the coordinates of ``position`` in the coordinate system of the returned array. Returns ------- array_small : `~numpy.ndarray` The extracted array. new_position : tuple If ``return_position`` is true, this tuple will contain the coordinates of the input ``position`` in the coordinate system of ``array_small``. Note that for partially overlapping arrays, ``new_position`` might actually be outside of the ``array_small``; ``array_small[new_position]`` might give wrong results if any element in ``new_position`` is negative. Examples -------- We consider a large array with the shape 11x10, from which we extract a small array of shape 3x5: >>> import numpy as np >>> from astropy.nddata.utils import extract_array >>> large_array = np.arange(110).reshape((11, 10)) >>> extract_array(large_array, (3, 5), (7, 7)) array([[65, 66, 67, 68, 69], [75, 76, 77, 78, 79], [85, 86, 87, 88, 89]]) """ if np.isscalar(shape): shape = (shape, ) if np.isscalar(position): position = (position, ) if mode not in ['partial', 'trim', 'strict']: raise ValueError("Valid modes are 'partial', 'trim', and 'strict'.") large_slices, small_slices = overlap_slices(array_large.shape, shape, position, mode=mode) extracted_array = array_large[large_slices] if return_position: new_position = [i - s.start for i, s in zip(position, large_slices)] # Extracting on the edges is presumably a rare case, so treat special here if (extracted_array.shape != shape) and (mode == 'partial'): extracted_array = np.zeros(shape, dtype=array_large.dtype) extracted_array[:] = fill_value extracted_array[small_slices] = array_large[large_slices] if return_position: new_position = [i + s.start for i, s in zip(new_position, small_slices)] if return_position: return extracted_array, tuple(new_position) else: return extracted_array def add_array(array_large, array_small, position): """ Add a smaller array at a given position in a larger array. Parameters ---------- array_large : `~numpy.ndarray` Large array. array_small : `~numpy.ndarray` Small array to add. position : tuple Position of the small array's center, with respect to the large array. Coordinates should be in the same order as the array shape. Returns ------- new_array : `~numpy.ndarray` The new array formed from the sum of ``array_large`` and ``array_small``. Notes ----- The addition is done in-place. Examples -------- We consider a large array of zeros with the shape 5x5 and a small array of ones with a shape of 3x3: >>> import numpy as np >>> from astropy.nddata.utils import add_array >>> large_array = np.zeros((5, 5)) >>> small_array = np.ones((3, 3)) >>> add_array(large_array, small_array, (1, 2)) array([[ 0., 1., 1., 1., 0.], [ 0., 1., 1., 1., 0.], [ 0., 1., 1., 1., 0.], [ 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0.]]) """ # Check if large array is really larger if all(large_shape > small_shape for (large_shape, small_shape) in zip(array_large.shape, array_small.shape)): large_slices, small_slices = overlap_slices(array_large.shape, array_small.shape, position) array_large[large_slices] += array_small[small_slices] return array_large else: raise ValueError("Can't add array. Small array too large.") def subpixel_indices(position, subsampling): """ Convert decimal points to indices, given a subsampling factor. This discards the integer part of the position and uses only the decimal place, and converts this to a subpixel position depending on the subsampling specified. The center of a pixel corresponds to an integer position. Parameters ---------- position : `~numpy.ndarray` or array-like Positions in pixels. subsampling : int Subsampling factor per pixel. Returns ------- indices : `~numpy.ndarray` The integer subpixel indices corresponding to the input positions. Examples -------- If no subsampling is used, then the subpixel indices returned are always 0: >>> from astropy.nddata.utils import subpixel_indices >>> subpixel_indices([1.2, 3.4, 5.6],1) array([ 0., 0., 0.]) If instead we use a subsampling of 2, we see that for the two first values (1.1 and 3.4) the subpixel position is 1, while for 5.6 it is 0. This is because the values of 1, 3, and 6 lie in the center of pixels, and 1.1 and 3.4 lie in the left part of the pixels and 5.6 lies in the right part. >>> subpixel_indices([1.2, 3.4, 5.5],2) array([ 1., 1., 0.]) """ # Get decimal points fractions = np.modf(np.asanyarray(position) + 0.5)[0] return np.floor(fractions * subsampling) @support_nddata def block_reduce(data, block_size, func=np.sum): """ Downsample a data array by applying a function to local blocks. If ``data`` is not perfectly divisible by ``block_size`` along a given axis then the data will be trimmed (from the end) along that axis. Parameters ---------- data : array_like The data to be resampled. block_size : int or array_like (int) The integer block size along each axis. If ``block_size`` is a scalar and ``data`` has more than one dimension, then ``block_size`` will be used for for every axis. func : callable, optional The method to use to downsample the data. Must be a callable that takes in a `~numpy.ndarray` along with an ``axis`` keyword, which defines the axis along which the function is applied. The default is `~numpy.sum`, which provides block summation (and conserves the data sum). Returns ------- output : array-like The resampled data. Examples -------- >>> import numpy as np >>> from astropy.nddata.utils import block_reduce >>> data = np.arange(16).reshape(4, 4) >>> block_reduce(data, 2) # doctest: +SKIP array([[10, 18], [42, 50]]) >>> block_reduce(data, 2, func=np.mean) # doctest: +SKIP array([[ 2.5, 4.5], [ 10.5, 12.5]]) """ from skimage.measure import block_reduce data = np.asanyarray(data) block_size = np.atleast_1d(block_size) if data.ndim > 1 and len(block_size) == 1: block_size = np.repeat(block_size, data.ndim) if len(block_size) != data.ndim: raise ValueError('`block_size` must be a scalar or have the same ' 'length as `data.shape`') block_size = np.array([int(i) for i in block_size]) size_resampled = np.array(data.shape) // block_size size_init = size_resampled * block_size # trim data if necessary for i in range(data.ndim): if data.shape[i] != size_init[i]: data = data.swapaxes(0, i) data = data[:size_init[i]] data = data.swapaxes(0, i) return block_reduce(data, tuple(block_size), func=func) @support_nddata def block_replicate(data, block_size, conserve_sum=True): """ Upsample a data array by block replication. Parameters ---------- data : array_like The data to be block replicated. block_size : int or array_like (int) The integer block size along each axis. If ``block_size`` is a scalar and ``data`` has more than one dimension, then ``block_size`` will be used for for every axis. conserve_sum : bool, optional If `True` (the default) then the sum of the output block-replicated data will equal the sum of the input ``data``. Returns ------- output : array_like The block-replicated data. Examples -------- >>> import numpy as np >>> from astropy.nddata.utils import block_replicate >>> data = np.array([[0., 1.], [2., 3.]]) >>> block_replicate(data, 2) array([[ 0. , 0. , 0.25, 0.25], [ 0. , 0. , 0.25, 0.25], [ 0.5 , 0.5 , 0.75, 0.75], [ 0.5 , 0.5 , 0.75, 0.75]]) >>> block_replicate(data, 2, conserve_sum=False) array([[ 0., 0., 1., 1.], [ 0., 0., 1., 1.], [ 2., 2., 3., 3.], [ 2., 2., 3., 3.]]) """ data = np.asanyarray(data) block_size = np.atleast_1d(block_size) if data.ndim > 1 and len(block_size) == 1: block_size = np.repeat(block_size, data.ndim) if len(block_size) != data.ndim: raise ValueError('`block_size` must be a scalar or have the same ' 'length as `data.shape`') for i in range(data.ndim): data = np.repeat(data, block_size[i], axis=i) if conserve_sum: data = data / float(np.prod(block_size)) return data class Cutout2D(object): """ Create a cutout object from a 2D array. The returned object will contain a 2D cutout array. If ``copy=False`` (default), the cutout array is a view into the original ``data`` array, otherwise the cutout array will contain a copy of the original data. If a `~astropy.wcs.WCS` object is input, then the returned object will also contain a copy of the original WCS, but updated for the cutout array. For example usage, see :ref:`cutout_images`. .. warning:: The cutout WCS object does not currently handle cases where the input WCS object contains distortion lookup tables described in the `FITS WCS distortion paper `__. """ def __init__(self, data, position, size, wcs=None, mode='trim', fill_value=np.nan, copy=False): """ Parameters ---------- data : `~numpy.ndarray` The 2D data array from which to extract the cutout array. position : tuple or `~astropy.coordinates.SkyCoord` The position of the cutout array's center with respect to the ``data`` array. The position can be specified either as a ``(x, y)`` tuple of pixel coordinates or a `~astropy.coordinates.SkyCoord`, in which case ``wcs`` is a required input. size : int, array-like, `~astropy.units.Quantity` The size of the cutout array along each axis. If ``size`` is a scalar number or a scalar `~astropy.units.Quantity`, then a square cutout of ``size`` will be created. If ``size`` has two elements, they should be in ``(ny, nx)`` order. Scalar numbers in ``size`` are assumed to be in units of pixels. ``size`` can also be a `~astropy.units.Quantity` object or contain `~astropy.units.Quantity` objects. Such `~astropy.units.Quantity` objects must be in pixel or angular units. For all cases, ``size`` will be converted to an integer number of pixels, rounding the the nearest integer. See the ``mode`` keyword for additional details on the final cutout size. .. note:: If ``size`` is in angular units, the cutout size is converted to pixels using the pixel scales along each axis of the image at the ``CRPIX`` location. Projection and other non-linear distortions are not taken into account. wcs : `~astropy.wcs.WCS`, optional A WCS object associated with the input ``data`` array. If ``wcs`` is not `None`, then the returned cutout object will contain a copy of the updated WCS for the cutout data array. mode : {'trim', 'partial', 'strict'}, optional The mode used for creating the cutout data array. For the ``'partial'`` and ``'trim'`` modes, a partial overlap of the cutout array and the input ``data`` array is sufficient. For the ``'strict'`` mode, the cutout array has to be fully contained within the ``data`` array, otherwise an `~astropy.nddata.utils.PartialOverlapError` is raised. In all modes, non-overlapping arrays will raise a `~astropy.nddata.utils.NoOverlapError`. In ``'partial'`` mode, positions in the cutout array that do not overlap with the ``data`` array will be filled with ``fill_value``. In ``'trim'`` mode only the overlapping elements are returned, thus the resulting cutout array may be smaller than the requested ``shape``. fill_value : number, optional If ``mode='partial'``, the value to fill pixels in the cutout array that do not overlap with the input ``data``. ``fill_value`` must have the same ``dtype`` as the input ``data`` array. copy : bool, optional If `False` (default), then the cutout data will be a view into the original ``data`` array. If `True`, then the cutout data will hold a copy of the original ``data`` array. Returns ------- result : `~astropy.nddata.utils.Cutout2D` A cutout object containing the 2D cutout data array and the updated WCS, if ``wcs`` is input. Examples -------- >>> import numpy as np >>> from astropy.nddata.utils import Cutout2D >>> from astropy import units as u >>> data = np.arange(20.).reshape(5, 4) >>> cutout1 = Cutout2D(data, (2, 2), (3, 3)) >>> print(cutout1.data) [[ 5. 6. 7.] [ 9. 10. 11.] [ 13. 14. 15.]] >>> print(cutout1.center_original) (2.0, 2.0) >>> print(cutout1.center_cutout) (1.0, 1.0) >>> print(cutout1.origin_original) (1, 1) >>> cutout2 = Cutout2D(data, (2, 2), 3) >>> print(cutout2.data) [[ 5. 6. 7.] [ 9. 10. 11.] [ 13. 14. 15.]] >>> size = u.Quantity([3, 3], u.pixel) >>> cutout3 = Cutout2D(data, (0, 0), size) >>> print(cutout3.data) [[ 0. 1.] [ 4. 5.]] >>> cutout4 = Cutout2D(data, (0, 0), (3 * u.pixel, 3)) >>> print(cutout4.data) [[ 0. 1.] [ 4. 5.]] >>> cutout5 = Cutout2D(data, (0, 0), (3, 3), mode='partial') >>> print(cutout5.data) [[ nan nan nan] [ nan 0. 1.] [ nan 4. 5.]] """ if isinstance(position, SkyCoord): if wcs is None: raise ValueError('wcs must be input if position is a ' 'SkyCoord') position = skycoord_to_pixel(position, wcs, mode='all') # (x, y) if np.isscalar(size): size = np.repeat(size, 2) # special handling for a scalar Quantity if isinstance(size, u.Quantity): size = np.atleast_1d(size) if len(size) == 1: size = np.repeat(size, 2) if len(size) > 2: raise ValueError('size must have at most two elements') shape = np.zeros(2).astype(int) pixel_scales = None # ``size`` can have a mixture of int and Quantity (and even units), # so evaluate each axis separately for axis, side in enumerate(size): if not isinstance(side, u.Quantity): shape[axis] = np.int(np.round(size[axis])) # pixels else: if side.unit == u.pixel: shape[axis] = np.int(np.round(side.value)) elif side.unit.physical_type == 'angle': if wcs is None: raise ValueError('wcs must be input if any element ' 'of size has angular units') if pixel_scales is None: pixel_scales = u.Quantity( proj_plane_pixel_scales(wcs), wcs.wcs.cunit[axis]) shape[axis] = np.int(np.round( (side / pixel_scales[axis]).decompose())) else: raise ValueError('shape can contain Quantities with only ' 'pixel or angular units') data = np.asanyarray(data) # reverse position because extract_array and overlap_slices # use (y, x), but keep the input position pos_yx = position[::-1] cutout_data, input_position_cutout = extract_array( data, tuple(shape), pos_yx, mode=mode, fill_value=fill_value, return_position=True) if copy: cutout_data = np.copy(cutout_data) self.data = cutout_data self.input_position_cutout = input_position_cutout[::-1] # (x, y) slices_original, slices_cutout = overlap_slices( data.shape, shape, pos_yx, mode=mode) self.slices_original = slices_original self.slices_cutout = slices_cutout self.shape = self.data.shape self.input_position_original = position self.shape_input = shape ((self.ymin_original, self.ymax_original), (self.xmin_original, self.xmax_original)) = self.bbox_original ((self.ymin_cutout, self.ymax_cutout), (self.xmin_cutout, self.xmax_cutout)) = self.bbox_cutout # the true origin pixel of the cutout array, including any # filled cutout values self._origin_original_true = ( self.origin_original[0] - self.slices_cutout[1].start, self.origin_original[1] - self.slices_cutout[0].start) if wcs is not None: self.wcs = deepcopy(wcs) self.wcs.wcs.crpix -= self._origin_original_true else: self.wcs = None def to_original_position(self, cutout_position): """ Convert an ``(x, y)`` position in the cutout array to the original ``(x, y)`` position in the original large array. Parameters ---------- cutout_position : tuple The ``(x, y)`` pixel position in the cutout array. Returns ------- original_position : tuple The corresponding ``(x, y)`` pixel position in the original large array. """ return tuple(cutout_position[i] + self.origin_original[i] for i in [0, 1]) def to_cutout_position(self, original_position): """ Convert an ``(x, y)`` position in the original large array to the ``(x, y)`` position in the cutout array. Parameters ---------- original_position : tuple The ``(x, y)`` pixel position in the original large array. Returns ------- cutout_position : tuple The corresponding ``(x, y)`` pixel position in the cutout array. """ return tuple(original_position[i] - self.origin_original[i] for i in [0, 1]) def plot_on_original(self, ax=None, fill=False, **kwargs): """ Plot the cutout region on a matplotlib Axes instance. Parameters ---------- ax : `matplotlib.axes.Axes` instance, optional If `None`, then the current `matplotlib.axes.Axes` instance is used. fill : bool, optional Set whether to fill the cutout patch. The default is `False`. kwargs : optional Any keyword arguments accepted by `matplotlib.patches.Patch`. Returns ------- ax : `matplotlib.axes.Axes` instance The matplotlib Axes instance constructed in the method if ``ax=None``. Otherwise the output ``ax`` is the same as the input ``ax``. """ import matplotlib.pyplot as plt import matplotlib.patches as mpatches kwargs['fill'] = fill if ax is None: ax = plt.gca() height, width = self.shape hw, hh = width / 2., height / 2. pos_xy = self.position_original - np.array([hw, hh]) patch = mpatches.Rectangle(pos_xy, width, height, 0., **kwargs) ax.add_patch(patch) return ax @staticmethod def _calc_center(slices): """ Calculate the center position. The center position will be fractional for even-sized arrays. For ``mode='partial'``, the central position is calculated for the valid (non-filled) cutout values. """ return tuple(0.5 * (slices[i].start + slices[i].stop - 1) for i in [1, 0]) @staticmethod def _calc_bbox(slices): """ Calculate a minimal bounding box in the form ``((ymin, ymax), (xmin, xmax))``. Note these are pixel locations, not slice indices. For ``mode='partial'``, the bounding box indices are for the valid (non-filled) cutout values. """ # (stop - 1) to return the max pixel location, not the slice index return ((slices[0].start, slices[0].stop - 1), (slices[1].start, slices[1].stop - 1)) @lazyproperty def origin_original(self): """ The ``(x, y)`` index of the origin pixel of the cutout with respect to the original array. For ``mode='partial'``, the origin pixel is calculated for the valid (non-filled) cutout values. """ return (self.slices_original[1].start, self.slices_original[0].start) @lazyproperty def origin_cutout(self): """ The ``(x, y)`` index of the origin pixel of the cutout with respect to the cutout array. For ``mode='partial'``, the origin pixel is calculated for the valid (non-filled) cutout values. """ return (self.slices_cutout[1].start, self.slices_cutout[0].start) @lazyproperty def position_original(self): """ The ``(x, y)`` position index (rounded to the nearest pixel) in the original array. """ return (_round(self.input_position_original[0]), _round(self.input_position_original[1])) @lazyproperty def position_cutout(self): """ The ``(x, y)`` position index (rounded to the nearest pixel) in the cutout array. """ return (_round(self.input_position_cutout[0]), _round(self.input_position_cutout[1])) @lazyproperty def center_original(self): """ The central ``(x, y)`` position of the cutout array with respect to the original array. For ``mode='partial'``, the central position is calculated for the valid (non-filled) cutout values. """ return self._calc_center(self.slices_original) @lazyproperty def center_cutout(self): """ The central ``(x, y)`` position of the cutout array with respect to the cutout array. For ``mode='partial'``, the central position is calculated for the valid (non-filled) cutout values. """ return self._calc_center(self.slices_cutout) @lazyproperty def bbox_original(self): """ The bounding box ``((ymin, ymax), (xmin, xmax))`` of the minimal rectangular region of the cutout array with respect to the original array. For ``mode='partial'``, the bounding box indices are for the valid (non-filled) cutout values. """ return self._calc_bbox(self.slices_original) @lazyproperty def bbox_cutout(self): """ The bounding box ``((ymin, ymax), (xmin, xmax))`` of the minimal rectangular region of the cutout array with respect to the cutout array. For ``mode='partial'``, the bounding box indices are for the valid (non-filled) cutout values. """ return self._calc_bbox(self.slices_cutout) astropy-1.1.1/astropy/nddata/mixins/0000755001134200020070000000000012644022135020361 5ustar embrayscience00000000000000astropy-1.1.1/astropy/nddata/mixins/ndslicing.py0000644001134200020070000000226712640262015022713 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # This module implements the Slicing mixin to the NDData class. from __future__ import (absolute_import, division, print_function, unicode_literals) __all__ = ['NDSlicingMixin'] class NDSlicingMixin(object): """ Mixin to provide slicing on objects using the NDData interface. When subclassing, be sure to list the superclasses in the correct order so that the subclass sees NDData as the main superclass. See `~astropy.nddata.NDDataArray` for an example. """ def __getitem__(self, item): new_data = self.data[item] if self.uncertainty is not None: new_uncertainty = self.uncertainty[item] else: new_uncertainty = None if self.mask is not None: new_mask = self.mask[item] else: new_mask = None if self.wcs is not None: new_wcs = self.wcs[item] else: new_wcs = None return self.__class__(new_data, uncertainty=new_uncertainty, mask=new_mask, wcs=new_wcs, meta=self.meta, unit=self.unit) astropy-1.1.1/astropy/nddata/mixins/ndio.py0000644001134200020070000000235012640262015021663 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # This module implements the I/O mixin to the NDData class. from __future__ import (absolute_import, division, print_function, unicode_literals) from ...io import registry as io_registry __all__ = ['NDIOMixin'] class NDIOMixin(object): """ Mixin class to connect NDData to the astropy input/output registry. This mixin adds two methods to its subclasses, ``read`` and ``write``. """ @classmethod def read(cls, *args, **kwargs): """ Read and parse gridded N-dimensional data and return as an NDData-derived object. This function provides the NDDataBase interface to the astropy unified I/O layer. This allows easily reading a file in the supported data formats. """ return io_registry.read(cls, *args, **kwargs) def write(self, *args, **kwargs): """ Write a gridded N-dimensional data object out in specified format. This function provides the NDDataBase interface to the astropy unified I/O layer. This allows easily writing a file in the supported data formats. """ io_registry.write(self, *args, **kwargs) astropy-1.1.1/astropy/nddata/mixins/tests/0000755001134200020070000000000012644022135021523 5ustar embrayscience00000000000000astropy-1.1.1/astropy/nddata/mixins/tests/test_ndio.py0000644001134200020070000000062212640262015024064 0ustar embrayscience00000000000000from __future__ import (absolute_import, division, print_function, unicode_literals) from ...nddata import NDData from ...mixins.ndio import NDIOMixin # Define minimal class that uses the I/O mixin class NDDataIO(NDIOMixin, NDData): pass def test_simple_write_read(tmpdir): ndd = NDDataIO([1, 2, 3]) assert hasattr(ndd, 'read') assert hasattr(ndd, 'write') astropy-1.1.1/astropy/nddata/mixins/tests/test_ndarithmetic.py0000644001134200020070000004206612640262015025616 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from numpy.testing import assert_array_equal from ...compat import NDDataArray from ...nduncertainty import (StdDevUncertainty, IncompatibleUncertaintiesException, NDUncertainty) from ....tests.helper import pytest from .... import units as u from ....utils import NumpyRNGContext class FakeUncertainty(NDUncertainty): def __init__(self, *arg, **kwd): self._unit = None pass def propagate_add(self, data, final_data): pass def propagate_subtract(self, data, final_data): pass def propagate_multiply(self, data, final_data): pass def propagate_divide(self, data, final_data): pass def array(self): pass # Uncertainty tests def test_nddata_uncertainty_init_invalid_shape_1(): u = StdDevUncertainty(array=np.ones((6, 6))) with pytest.raises(ValueError) as exc: NDDataArray(np.ones((5, 5)), uncertainty=u) assert exc.value.args[0] == 'parent shape does not match array data shape' def test_nddata_uncertainty_init_invalid_shape_2(): u = StdDevUncertainty() NDDataArray(np.ones((5, 5)), uncertainty=u) with pytest.raises(ValueError) as exc: u.array = np.ones((6, 6)) assert exc.value.args[0] == 'array shape does not match parent data shape' @pytest.mark.parametrize(('uncertainty'), [1., 'spam', np.ones((5, 5))]) def test_nddata_uncertainty_invalid_type(uncertainty): with pytest.raises(TypeError) as exc: NDDataArray(np.ones((5, 5)), uncertainty=uncertainty) assert exc.value.args[0] == ('Uncertainty must be an instance of ' 'a NDUncertainty object') # slicing tests def test_simple_slicing(): u1 = StdDevUncertainty(array=np.ones((5, 5)) * 3) d1 = NDDataArray(np.ones((5, 5)), uncertainty=u1) assert d1.data.shape == (5, 5) d2 = d1[2:3, 2:3] assert d2.data.shape == (1, 1) d3 = d1[2, 2] assert d3.data.shape == () def test_slicing_reference(): u1 = StdDevUncertainty(array=np.ones((5, 5)) * 3) d1 = NDDataArray(np.ones((5, 5)), uncertainty=u1) d2 = d1[2:3, 2:3] # asserting that the new nddata contains references to the original nddata assert d2.data.base is d1.data assert d2.uncertainty.array.base is d1.uncertainty.array def test_slicing_with_mask_or_flag(): # Regression test for #2170 ndd = NDDataArray(np.array([1, 2, 3]), mask=np.array([False, False, False])) assert ndd[0].data.shape == () assert not ndd[0].mask def test_nddata_add(): d1 = NDDataArray(np.ones((5, 5))) d2 = NDDataArray(np.ones((5, 5))) d3 = d1.add(d2) assert np.all(d3.data == 2.) def test_nddata_add_mismatch_wcs(): d1 = NDDataArray(np.ones((5, 5)), wcs=1.) d2 = NDDataArray(np.ones((5, 5)), wcs=2.) with pytest.raises(ValueError) as exc: d1.add(d2) assert exc.value.args[0] == "WCS properties do not match" def test_nddata_add_mismatch_units(): d1 = NDDataArray(np.ones((5, 5)), unit='Jy') d2 = NDDataArray(np.ones((5, 5)), unit='erg/s') with pytest.raises(ValueError) as exc: d1.add(d2) assert exc.value.args[0] == "operand units do not match" def test_nddata_add_mismatch_shape(): d1 = NDDataArray(np.ones((5, 5))) d2 = NDDataArray(np.ones((6, 6))) with pytest.raises(ValueError) as exc: d1.add(d2) assert exc.value.args[0] == "operand shapes do not match" def test_nddata_add_with_masks(): # numpy masked arrays mask the result of binary operations if the # mask of either operand is set. # Does NDData? ndd1 = NDDataArray(np.array([1, 2]), mask=np.array([True, False])) other_mask = ~ ndd1.mask ndd2 = NDDataArray(np.array([1, 2]), mask=other_mask) result = ndd1.add(ndd2) # The result should have all entries masked... assert result.mask.all() def test_nddata_add_uncertainties(): u1 = StdDevUncertainty(array=np.ones((5, 5)) * 3) u2 = StdDevUncertainty(array=np.ones((5, 5))) d1 = NDDataArray(np.ones((5, 5)), uncertainty=u1) d2 = NDDataArray(np.ones((5, 5)), uncertainty=u2) d3 = d1.add(d2) assert np.all(d3.data == 2.) assert_array_equal(d3.uncertainty.array, np.sqrt(10.)) def test_nddata_add_uncertainties_mismatch(): u1 = StdDevUncertainty(array=np.ones((5, 5)) * 3) u2 = FakeUncertainty() d1 = NDDataArray(np.ones((5, 5)), uncertainty=u1) d2 = NDDataArray(np.ones((5, 5)), uncertainty=u2) with pytest.raises(IncompatibleUncertaintiesException) as exc: d3 = d1.add(d2) assert exc.value.args[0] == ('Cannot propagate uncertainties of type ' 'StdDevUncertainty with uncertainties of ' 'type FakeUncertainty for addition') def test_initializing_nduncertainty_from_quantity(): # Until nddata and quantity are integrated initializing with a quantity # should raise an error. input_ndd_unit = u.kg ndd = NDDataArray(np.array([1, 2, 3]), unit=input_ndd_unit) std_data = np.array([1, 2, 3]) # Unit of the uncertainty not convertible to unit of ndd, should raise # an error. std_error = StdDevUncertainty(u.adu * std_data) assert std_error._unit is u.adu with pytest.raises(u.UnitsError): ndd.uncertainty = std_error # Uncertainty should be settable without any change in its values # because uncertainty unit is same as data unit. std_error = StdDevUncertainty(u.kg * std_data) ndd.uncertainty = std_error assert_array_equal(std_data, ndd.uncertainty.array) # If the uncertainty unit is grams there should be no error, but the # values of the uncertainty should be scaled. std_error = StdDevUncertainty(u.g * std_data) ndd.uncertainty = std_error assert_array_equal(std_data, 1000 * ndd.uncertainty.array) # If ndd has no unit but the uncertainty does an error should be raised. ndd = NDDataArray(np.array([1, 2, 3]), unit=None) with pytest.raises(ValueError): ndd.uncertainty = std_error # Mask tests def test_unmasked_masked_array_input(): # Test for #2784 marr = np.ma.array([1, 2, 5]) # Masked array with no masked entries nd = NDDataArray(marr) # Before fix this raised a ValueError # Check that masks are correct assert marr.mask is np.ma.nomask # Internal representation is np.ma.nomask but getter returns None. assert nd.mask is None def test_nddata_unmasked_in_operation_with_masked_numpy_array(): # test for #2417 ndd = NDDataArray(np.array([1, 2, 3])) np_data = -np.ones_like(ndd) np_mask = np.array([True, False, True]) np_arr_masked = np.ma.masked_array(np_data, mask=np_mask, copy=True) # check multiplication in both orders as in test above result1 = ndd * np_arr_masked result2 = np_arr_masked * ndd for result in [result1, result2]: # multiplying by a masked numpy array should return a masked array assert isinstance(result, np.ma.MaskedArray) assert np.all(result.mask == np_mask) assert np.all(result[~result.mask] == -ndd.data[~np_mask]) @pytest.mark.parametrize(('shape'), [(10,), (5, 5), (3, 10, 10)]) def test_nddata_mask_invalid_shape(shape): with pytest.raises(ValueError) as exc: with NumpyRNGContext(789): NDDataArray(np.random.random((10, 10)), mask=np.random.random(shape) > 0.5) assert exc.value.args[0] == 'dimensions of mask do not match data' @pytest.mark.parametrize('mask_in', [ np.array([True, False]), np.array([1, 0]), [True, False], [1, 0]]) def test_nddata_mask_init_without_np_array(mask_in): ndd = NDDataArray(np.array([1, 1]), mask=mask_in) assert (ndd.mask == mask_in).all() def test_ndddata_with_mask_acts_like_masked_array(): # test for #2414 input_mask = np.array([True, False, False]) input_data = np.array([1, 2, 3]) ndd_masked = NDDataArray(input_data.copy(), mask=input_mask.copy()) other = - np.ones_like(input_data) result1 = ndd_masked * other result2 = other * ndd_masked # Test for both orders of multiplication -- if multiplication is # eventually overridden for NDData the result can depend on order. for result in [result1, result2]: # Result should be a masked array because input NDData was masked assert isinstance(result, np.ma.MaskedArray) # Result mask should match input mask because other has no mask assert np.all(result.mask == input_mask) assert np.all(result[~result.mask] == - input_data[~input_mask]) # Arithmetic tests def test_nddata_subtract(): d1 = NDDataArray(np.ones((5, 5))) d2 = NDDataArray(np.ones((5, 5)) * 2.) d3 = d1.subtract(d2) assert np.all(d3.data == -1.) def test_nddata_subtract_mismatch_wcs(): d1 = NDDataArray(np.ones((5, 5)), wcs=1.) d2 = NDDataArray(np.ones((5, 5)) * 2., wcs=2.) with pytest.raises(ValueError) as exc: d1.subtract(d2) assert exc.value.args[0] == "WCS properties do not match" def test_nddata_subtract_mismatch_units(): d1 = NDDataArray(np.ones((5, 5)), unit='Jy') d2 = NDDataArray(np.ones((5, 5)) * 2., unit='erg/s') with pytest.raises(ValueError) as exc: d1.subtract(d2) assert exc.value.args[0] == "operand units do not match" def test_nddata_subtract_mismatch_shape(): d1 = NDDataArray(np.ones((5, 5))) d2 = NDDataArray(np.ones((6, 6)) * 2.) with pytest.raises(ValueError) as exc: d1.subtract(d2) assert exc.value.args[0] == "operand shapes do not match" def test_nddata_subtract_uncertainties(): u1 = StdDevUncertainty(array=np.ones((5, 5)) * 3) u2 = StdDevUncertainty(array=np.ones((5, 5))) d1 = NDDataArray(np.ones((5, 5)), uncertainty=u1) d2 = NDDataArray(np.ones((5, 5)) * 2., uncertainty=u2) d3 = d1.subtract(d2) assert np.all(d3.data == -1.) assert_array_equal(d3.uncertainty.array, np.sqrt(10.)) def test_nddata_multiply_uncertainties(): u1 = StdDevUncertainty(array=np.ones((5, 5)) * 3) u2 = StdDevUncertainty(array=np.ones((5, 5))) d1 = NDDataArray(np.ones((5, 5)), uncertainty=u1) d2 = NDDataArray(np.ones((5, 5)) * 2., uncertainty=u2) d3 = d1.multiply(d2) assert np.all(d3.data == 2.) assert_array_equal(d3.uncertainty.array, 2 * np.sqrt(9.25)) def test_nddata_divide_uncertainties(): u1 = StdDevUncertainty(array=np.ones((5, 5)) * 3) u2 = StdDevUncertainty(array=np.ones((5, 5))) d1 = NDDataArray(np.ones((5, 5)), uncertainty=u1) d2 = NDDataArray(np.ones((5, 5)) * 2., uncertainty=u2) d3 = d1.divide(d2) assert np.all(d3.data == 0.5) assert_array_equal(d3.uncertainty.array, 0.5 * np.sqrt(9.25)) def test_nddata_subtract_uncertainties_mismatch(): u1 = StdDevUncertainty(array=np.ones((5, 5)) * 3) u2 = FakeUncertainty() d1 = NDDataArray(np.ones((5, 5)), uncertainty=u1) d2 = NDDataArray(np.ones((5, 5)) * 2., uncertainty=u2) with pytest.raises(IncompatibleUncertaintiesException) as exc: d3 = d1.subtract(d2) assert exc.value.args[0] == ('Cannot propagate uncertainties of type ' 'StdDevUncertainty with uncertainties of ' 'type FakeUncertainty for subtraction') @pytest.mark.parametrize(('op1_unc','op2_unc'), [ (None, None), (StdDevUncertainty([1]), None), (None, StdDevUncertainty([1])), (StdDevUncertainty([1]), StdDevUncertainty([1])) ]) def test_arithmetic_result_not_tied_to_operands_uncertainty(op1_unc, op2_unc): # Expectation is that the result of an arithmetic operation should be a # new object whose members are not tied to the members of the operand. # The only reliable test of this is to change elements of the result and # see if the corresponding elements of the operands change. # All four of the cases parametrized in this test do need to be checked # because each of the four cases is handled separately in the code (well, # except for the None, None case). # Only one of the arithmetic operations need to be checked because the # logic for propagating the uncertainties is common to all of the # operations. op1 = NDDataArray(np.array([1]), uncertainty=op1_unc) op2 = NDDataArray(np.array([1]), uncertainty=op2_unc) result = op1.add(op2) if result.uncertainty: result.uncertainty.array[0] = 0 if op1_unc: assert op1.uncertainty.array[0] == 1 if op2_unc: assert op2.uncertainty.array[0] == 1 result.data[0] = np.pi assert op1.data[0] == 1 assert op2.data[0] == 1 @pytest.mark.parametrize(('op1_mask','op2_mask'), [ (None, None), (None, np.array([False])), (np.array([False]), None), (np.array([False]), np.array([False]))]) def test_arithmetic_result_not_tied_to_operands_mask(op1_mask, op2_mask): # See test_arithmetic_result_not_tied_to_operands_uncertainty for comments op1 = NDDataArray(np.array([1]), mask=op1_mask) op2 = NDDataArray(np.array([1]), mask=op2_mask) result = op1.add(op2) if result.mask is not None: result.mask[0] = True if op1_mask is not None: assert op1.mask[0] == (not result.mask[0]) if op2_mask is not None: assert op2.mask[0] == (not result.mask[0]) def test_arithmetic_result_not_tied_to_operands_wcs(): # unit is no longer settable, so test that result unit is different object # than operands was removed. # Unlike the previous two tests, we only need to check a case where both # operands have the same wcs because operands with different wcs is not # supported op1 = NDDataArray(np.array([1]), wcs=np.array([1]), unit='m') op2 = NDDataArray(np.array([1]), wcs=np.array([1]), unit='m') result = op1.add(op2) result.wcs[0] = 12345 assert op1.wcs[0] != result.wcs[0] assert op2.wcs[0] != result.wcs[0] # first operand has unit km, second has unit m @pytest.mark.parametrize(('operation','result_unit'), [ ('add', u.km), ('subtract', u.km), ('multiply', u.km * u.m), ('divide', u.km / u.m)]) def test_uncertainty_unit_conversion_add_subtract(operation, result_unit): in_km = NDDataArray(np.array([1, 1]), unit=u.km, uncertainty=StdDevUncertainty([.1, .1])) in_m = NDDataArray(in_km.data * 1000, unit=u.m) in_m.uncertainty = StdDevUncertainty(in_km.uncertainty.array * 1000) operator_km = in_km.__getattribute__(operation) combined = operator_km(in_m) assert combined.unit == result_unit if operation in ['add', 'subtract']: # uncertainty is not scaled by result values assert_array_equal(combined.uncertainty.array, np.sqrt(2) * in_km.uncertainty.array) else: # uncertainty is scaled by result assert_array_equal(combined.uncertainty.array, np.sqrt(2) * in_km.uncertainty.array * combined.data) @pytest.mark.parametrize(('unit1','unit2','op','result_unit'), [ (None, None, 'add', None), (None, None, 'multiply', None), (None, u.m, 'multiply', u.m), (u.dimensionless_unscaled, None, 'multiply', u.dimensionless_unscaled), (u.adu, u.adu, 'add', u.adu), (u.adu, u.adu, 'subtract', u.adu), (u.adu, u.adu, 'divide', u.dimensionless_unscaled), (u.adu, u.m, 'multiply', u.m * u.adu) ]) def test_arithmetic_unit_calculation(unit1, unit2, op, result_unit): # Test for #2413 ndd1 = NDDataArray(np.array([1]), unit=unit1) ndd2 = NDDataArray(np.array([1]), unit=unit2) ndd1_method = ndd1.__getattribute__(op) result = ndd1_method(ndd2) assert result.unit == result_unit # check that subclasses can require wcs and/or unit to be present and use # _arithmetic and convert_unit_to class SubNDData(NDDataArray): """ Subclass for test initialization of subclasses in NDData._arithmetic and NDData.convert_unit_to """ def __init__(self, *arg, **kwd): super(SubNDData, self).__init__(*arg, **kwd) if self.unit is None: raise ValueError("Unit for subclass must be specified") if self.wcs is None: raise ValueError("WCS for subclass must be specified") def test_init_of_subclasses_in_arithmetic(): with NumpyRNGContext(12345): data = np.ones([10, 10]) # The wcs only needs to be not None for this test to succeed arr1 = SubNDData(data, unit='adu', wcs=5) arr2 = SubNDData(data, unit='adu', wcs=5) result = arr1.add(arr2) assert result.unit == arr1.unit assert result.wcs == arr1.wcs astropy-1.1.1/astropy/nddata/mixins/tests/__init__.py0000644001134200020070000000000012640262015023621 0ustar embrayscience00000000000000astropy-1.1.1/astropy/nddata/mixins/ndarithmetic.py0000644001134200020070000002415412640262015023413 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # This module implements the Arithmetic mixin to the NDData class. from __future__ import (absolute_import, division, print_function, unicode_literals) from copy import deepcopy import numpy as np from ... units import dimensionless_unscaled, UnitsError from ... import log from ...extern.six import string_types from ..nduncertainty import IncompatibleUncertaintiesException __all__ = ['NDArithmeticMixin'] class NDArithmeticMixin(object): """ Mixin class to add arithmetic to an NDData object. When subclassing, be sure to list the superclasses in the correct order so that the subclass sees NDData as the main superclass. See `~astropy.nddata.NDDataArray` for an example. """ def _arithmetic(self, operand, propagate_uncertainties, name, operation): """ {name} another dataset (``operand``) to this dataset. Parameters ---------- operand : `~astropy.nddata.NDData` The second operand in the operation a {operator} b propagate_uncertainties : bool Whether to propagate uncertainties following the propagation rules defined by the class used for the ``uncertainty`` attribute. Returns ------- result : `~astropy.nddata.NDData` The resulting dataset Notes ----- This method requires the datasets to have identical WCS properties, equivalent units, and identical shapes. Meta-data get set to None in the resulting dataset. The unit in the result is the same as the unit in ``self``. Uncertainties are propagated, although correlated errors are not supported by any of the built-in uncertainty classes. If uncertainties are assumed to be correlated, a warning is issued by default (though this can be disabled via the ``astropy.nddata.conf.warn_unsupported_correlated`` configuration item). Values masked in either dataset before the operation are masked in the resulting dataset. """ from .. import conf if self.wcs != operand.wcs: raise ValueError("WCS properties do not match") # get a sensible placeholder if .unit is None self_unit = self.unit or dimensionless_unscaled operand_unit = operand.unit or dimensionless_unscaled # This check could be rolled into the calculation of the result # but checking now avoids a potentially expensive calculation that # would fail anyway. try: # Quantity is designed to work with numpy ufuncs, but plain # Unit is not, so convert units to quantities result_unit = operation(1 * self_unit, 1 * operand_unit).unit except UnitsError: # current API raises ValueError in this case, not UnitError raise ValueError("operand units do not match") if self.data.shape != operand.data.shape: raise ValueError("operand shapes do not match") # Instead of manually scaling the operand data just let Quantity # handle it. # Order of the arguments is important here if the operation is # addition or subtraction and the units of the operands are different # but compatible. NDData follows the convention that Quantity follows # in that case, with the units of the first operand (i.e. self) # determining the units of the result. data = operation(self.data * self_unit, operand.data * operand_unit) result_unit = data.unit # If neither self nor operand had units then should return a result # that has no unit. A check that the result_unit is dimensionless # should not be necessary, but also does no harm. if self.unit is None and operand.unit is None: if result_unit is dimensionless_unscaled: result_unit = None else: raise ValueError("arithmetic result was not unitless even " "though operands were unitless") data = data.value new_wcs = deepcopy(self.wcs) # Call __class__ in case we are dealing with an inherited type result = self.__class__(data, uncertainty=None, mask=None, wcs=new_wcs, meta=None, unit=result_unit) # Prepare to scale uncertainty if it is needed if operand.uncertainty: operand_uncert_value = operand.uncertainty.array # By this point the arithmetic has succeeded, so the input units were # consistent with each other given the operation. # # If the operation is addition or subtraction then need to ensure that # the uncertainty of the operand is the same units as the result # (which will be the same as self.unit). # The data ought to also be scaled in this case -- for addition of # a StdDevUncertainty this isn't really necessary but other # uncertainties when added/subtracted may depend on both the operand # uncertainty and the operand data. # Since the .unit.to methods create a copy, avoid the conversion # unless it is necessary. if (operation in [np.add, np.subtract] and self.unit != operand.unit): operand_data = operand.unit.to(self.unit, operand.data) if operand.uncertainty: operand_uncert_value = operand.unit.to(self.unit, operand_uncert_value) else: operand_data = operand.data if operand.uncertainty: # Create a copy here in case this is returned as the uncertainty # of the result. operand_uncertainty = \ operand.uncertainty.__class__(operand_uncert_value, copy=True) else: operand_uncertainty = None if propagate_uncertainties is None: result.uncertainty = None elif self.uncertainty is None and operand.uncertainty is None: result.uncertainty = None elif self.uncertainty is None: result.uncertainty = operand_uncertainty elif operand.uncertainty is None: result.uncertainty = self.uncertainty.__class__(self.uncertainty, copy=True) else: # both self and operand have uncertainties if (conf.warn_unsupported_correlated and (not self.uncertainty.support_correlated or not operand.uncertainty.support_correlated)): log.info("The uncertainty classes used do not support the " "propagation of correlated errors, so uncertainties" " will be propagated assuming they are uncorrelated") operand_scaled = operand.__class__(operand_data, uncertainty=operand_uncertainty, unit=operand.unit, wcs=operand.wcs, mask=operand.mask, meta=operand.meta) try: method = getattr(self.uncertainty, propagate_uncertainties) result.uncertainty = method(operand_scaled, result.data) except IncompatibleUncertaintiesException: raise IncompatibleUncertaintiesException( "Cannot propagate uncertainties of type {0:s} with " "uncertainties of type {1:s} for {2:s}".format( self.uncertainty.__class__.__name__, operand.uncertainty.__class__.__name__, name)) if self.mask is None and operand.mask is None: result.mask = None elif self.mask is None: result.mask = operand.mask.copy() elif operand.mask is None: result.mask = self.mask.copy() else: # combine masks as for Numpy masked arrays result.mask = self.mask | operand.mask # copy implied by operator return result def add(self, operand, propagate_uncertainties=True): if propagate_uncertainties: propagate_uncertainties = "propagate_add" else: propagate_uncertainties = None return self._arithmetic( operand, propagate_uncertainties, "addition", np.add) if isinstance(_arithmetic.__doc__, string_types): add.__doc__ = _arithmetic.__doc__.format(name="Add", operator="+") def subtract(self, operand, propagate_uncertainties=True): if propagate_uncertainties: propagate_uncertainties = "propagate_subtract" else: propagate_uncertainties = None return self._arithmetic( operand, propagate_uncertainties, "subtraction", np.subtract) if isinstance(_arithmetic.__doc__, string_types): subtract.__doc__ = _arithmetic.__doc__.format(name="Subtract", operator="-") def multiply(self, operand, propagate_uncertainties=True): if propagate_uncertainties: propagate_uncertainties = "propagate_multiply" else: propagate_uncertainties = None return self._arithmetic( operand, propagate_uncertainties, "multiplication", np.multiply) if isinstance(_arithmetic.__doc__, string_types): multiply.__doc__ = _arithmetic.__doc__.format(name="Multiply", operator="*") def divide(self, operand, propagate_uncertainties=True): if propagate_uncertainties: propagate_uncertainties = "propagate_divide" else: propagate_uncertainties = None return self._arithmetic( operand, propagate_uncertainties, "division", np.divide) if isinstance(_arithmetic.__doc__, string_types): divide.__doc__ = _arithmetic.__doc__.format(name="Divide", operator="/") astropy-1.1.1/astropy/nddata/mixins/__init__.py0000644001134200020070000000000012640262015022457 0ustar embrayscience00000000000000astropy-1.1.1/astropy/nddata/nddata_base.py0000644001134200020070000000504312640262015021652 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # This module implements the base NDDataBase class. from __future__ import (absolute_import, division, print_function, unicode_literals) from abc import ABCMeta, abstractproperty, abstractmethod from ..extern import six __all__ = ['NDDataBase'] @six.add_metaclass(ABCMeta) class NDDataBase(object): """ Base metaclass that defines the interface for NDData Classes that wish to use this interface without inheriting from `~astropy.nddata.NDData` should subclass ``NDDataBase`` instead. All properties and methods except uncertainty must be override by derived classes. """ @abstractmethod def __init__(self): self._uncertainty = None @abstractproperty def data(self): """ The data; should be capable of behaving like a numpy array, though it need not actually be a numpy array. """ pass @abstractproperty def mask(self): """ Mask for the data, following the numpy convention that ``True`` means the data should not be used. """ return None @abstractproperty def unit(self): """ Unit for the data, if any. """ return None @abstractproperty def wcs(self): """ WCS for the data, if any. """ return None @abstractproperty def meta(self): """ Metadata, if any, must be dict-like. """ return None # uncertainty and its setter are implemented as concrete to enforce the # logic in the uncertainty setter. For a long discussion of the problems # with trying to implement them as abstract (particularly the setter but # not the getter), see http://bugs.python.org/issue11610 # # In python >= 3.3 it would be easy to decorate one of these (setter or # getter) as abstract but not the other. @property def uncertainty(self): """ Uncertainty in the data. Uncertainty must have an attribute ``uncertainty_type`` that is a string. """ return self._uncertainty @uncertainty.setter def uncertainty(self, value): if value is not None: if (not hasattr(value, 'uncertainty_type') or not isinstance(value.uncertainty_type, six.string_types)): raise TypeError('Uncertainty must have attribute ' 'uncertainty_type whose type is string.') self._uncertainty = value astropy-1.1.1/astropy/nddata/compat.py0000644001134200020070000002455012640262015020714 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # This module contains a class equivalent to pre-1.0 NDData. from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from ..units import UnitsError, UnitConversionError, Unit from .. import log from .nddata import NDData from .nduncertainty import NDUncertainty from .mixins.ndslicing import NDSlicingMixin from .mixins.ndarithmetic import NDArithmeticMixin from .mixins.ndio import NDIOMixin from .flag_collection import FlagCollection __all__ = ['NDDataArray'] class NDDataArray(NDArithmeticMixin, NDSlicingMixin, NDIOMixin, NDData): """ An ``NDData`` object with arithmetic. This class is functionally equivalent to ``NDData`` in astropy versions prior to 1.0. The key distinction from raw numpy arrays is the presence of additional metadata such as uncertainties, a mask, units, flags, and/or a coordinate system. Parameters ----------- data : `~numpy.ndarray` or `NDData` The actual data contained in this `NDData` object. Not that this will always be copies by *reference* , so you should make copy the ``data`` before passing it in if that's the desired behavior. uncertainty : `~astropy.nddata.NDUncertainty`, optional Uncertainties on the data. mask : `~numpy.ndarray`-like, optional Mask for the data, given as a boolean Numpy array or any object that can be converted to a boolean Numpy array with a shape matching that of the data. The values must be ``False`` where the data is *valid* and ``True`` when it is not (like Numpy masked arrays). If ``data`` is a numpy masked array, providing ``mask`` here will causes the mask from the masked array to be ignored. flags : `~numpy.ndarray`-like or `~astropy.nddata.FlagCollection`, optional Flags giving information about each pixel. These can be specified either as a Numpy array of any type (or an object which can be converted to a Numpy array) with a shape matching that of the data, or as a `~astropy.nddata.FlagCollection` instance which has a shape matching that of the data. wcs : undefined, optional WCS-object containing the world coordinate system for the data. .. warning:: This is not yet defind because the discussion of how best to represent this class's WCS system generically is still under consideration. For now just leave it as None meta : `dict`-like object, optional Metadata for this object. "Metadata" here means all information that is included with this object but not part of any other attribute of this particular object. e.g., creation date, unique identifier, simulation parameters, exposure time, telescope name, etc. unit : `~astropy.units.UnitBase` instance or str, optional The units of the data. Raises ------ ValueError : If the `uncertainty` or `mask` inputs cannot be broadcast (e.g., match shape) onto ``data``. """ def __init__(self, *arg, **kwd): # Remove the flag argument from input. flags = kwd.pop('flags', None) # Initialize with the parent... super(NDDataArray, self).__init__(*arg, **kwd) # ...then reset uncertainty to force it to go through the # setter logic below. In base NDData all that is done is to # set self._uncertainty to whatever uncertainty is passed in. self.uncertainty = self._uncertainty # Same thing for mask. self.mask = self._mask # Initial flags because it is no longer handled in NDData # or NDDataBase. data = arg[0] # do this after parent __init__, to validate the args if isinstance(data, NDDataArray): if flags is None: flags = data.flags else: log.info("Overwriting NDDataArrays's current " "flags with specified flags") self.flags = flags # Implement uncertainty as NDUncertainty to support propagation of # uncertainties in arithmetic operations @property def uncertainty(self): return self._uncertainty @uncertainty.setter def uncertainty(self, value): if value is not None: if isinstance(value, NDUncertainty): class_name = self.__class__.__name__ if self.unit and value._unit: try: scaling = (1 * value._unit).to(self.unit) except UnitsError: raise UnitConversionError( 'Cannot convert unit of uncertainty to unit of ' '{0} object.'.format(class_name)) value.array *= scaling elif not self.unit and value._unit: # Raise an error if uncertainty has unit and data does not raise ValueError("Cannot assign an uncertainty with unit " "to {0} without " "a unit".format(class_name)) self._uncertainty = value self._uncertainty.parent_nddata = self else: raise TypeError("Uncertainty must be an instance of " "a NDUncertainty object") else: self._uncertainty = value # Override unit so that we can add a setter. @property def unit(self): return self._unit @unit.setter def unit(self, value): from . import conf try: if self._unit is not None and conf.warn_setting_unit_directly: log.info('Setting the unit directly changes the unit without ' 'updating the data or uncertainty. Use the ' '.convert_unit_to() method to change the unit and ' 'scale values appropriately.') except AttributeError: # raised if self._unit has not been set yet, in which case the # warning is irrelevant pass if value is None: self._unit = None else: self._unit = Unit(value) # Implement mask in a way that converts nicely to a numpy masked array @property def mask(self): if self._mask is np.ma.nomask: return None else: return self._mask @mask.setter def mask(self, value): # Check that value is not either type of null mask. if (value is not None) and (value is not np.ma.nomask): mask = np.array(value, dtype=np.bool_, copy=False) if mask.shape != self.data.shape: raise ValueError("dimensions of mask do not match data") else: self._mask = mask else: # internal representation should be one numpy understands self._mask = np.ma.nomask @property def shape(self): """ shape tuple of this object's data. """ return self.data.shape @property def size(self): """ integer size of this object's data. """ return self.data.size @property def dtype(self): """ `numpy.dtype` of this object's data. """ return self.data.dtype @property def ndim(self): """ integer dimensions of this object's data """ return self.data.ndim @property def flags(self): return self._flags @flags.setter def flags(self, value): if value is not None: if isinstance(value, FlagCollection): if value.shape != self.shape: raise ValueError("dimensions of FlagCollection does not match data") else: self._flags = value else: flags = np.array(value, copy=False) if flags.shape != self.shape: raise ValueError("dimensions of flags do not match data") else: self._flags = flags else: self._flags = value def __array__(self): """ This allows code that requests a Numpy array to use an NDData object as a Numpy array. """ if self.mask is not None: return np.ma.masked_array(self.data, self.mask) else: return np.array(self.data) def __array_prepare__(self, array, context=None): """ This ensures that a masked array is returned if self is masked. """ if self.mask is not None: return np.ma.masked_array(array, self.mask) else: return array def convert_unit_to(self, unit, equivalencies=[]): """ Returns a new `NDData` object whose values have been converted to a new unit. Parameters ---------- unit : `astropy.units.UnitBase` instance or str The unit to convert to. equivalencies : list of equivalence pairs, optional A list of equivalence pairs to try if the units are not directly convertible. See :ref:`unit_equivalencies`. Returns ------- result : `~astropy.nddata.NDData` The resulting dataset Raises ------ UnitsError If units are inconsistent. """ if self.unit is None: raise ValueError("No unit specified on source data") data = self.unit.to(unit, self.data, equivalencies=equivalencies) if self.uncertainty is not None: uncertainty_values = self.unit.to(unit, self.uncertainty.array, equivalencies=equivalencies) # should work for any uncertainty class uncertainty = self.uncertainty.__class__(uncertainty_values) else: uncertainty = None if self.mask is not None: new_mask = self.mask.copy() else: new_mask = None # Call __class__ in case we are dealing with an inherited type result = self.__class__(data, uncertainty=uncertainty, mask=new_mask, wcs=self.wcs, meta=self.meta, unit=unit) return result astropy-1.1.1/astropy/nddata/flag_collection.py0000644001134200020070000000335712640262015022557 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from ..utils.compat.odict import OrderedDict from ..utils.misc import isiterable __all__ = ['FlagCollection'] class FlagCollection(OrderedDict): """ The purpose of this class is to provide a dictionary for containing arrays of flags for the `NDData` class. Flags should be stored in Numpy arrays that have the same dimensions as the parent data, so the `FlagCollection` class adds shape checking to an ordered dictionary class. The `FlagCollection` should be initialized like an `~collections.OrderedDict`, but with the addition of a ``shape=`` keyword argument used to pass the NDData shape. """ def __init__(self, *args, **kwargs): if 'shape' in kwargs: self.shape = kwargs.pop('shape') if not isiterable(self.shape): raise ValueError("FlagCollection shape should be " "an iterable object") else: raise Exception("FlagCollection should be initialized with " "the shape of the data") OrderedDict.__init__(self, *args, **kwargs) def __setitem__(self, item, value, **kwargs): if isinstance(value, np.ndarray): if value.shape == self.shape: OrderedDict.__setitem__(self, item, value, **kwargs) else: raise ValueError("flags array shape {0} does not match data " "shape {1}".format(value.shape, self.shape)) else: raise TypeError("flags should be given as a Numpy array") astropy-1.1.1/astropy/nddata/setup_package.py0000644001134200020070000000004612602615531022241 0ustar embrayscience00000000000000def requires_2to3(): return False astropy-1.1.1/astropy/nddata/nddata.py0000644001134200020070000001566412640262015020672 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # This module implements the base NDData class. from __future__ import (absolute_import, division, print_function, unicode_literals) import collections import numpy as np from .nddata_base import NDDataBase from ..units import Unit, Quantity from .. import log from ..utils.compat.odict import OrderedDict from ..config import ConfigAlias __all__ = ['NDData'] __doctest_skip__ = ['NDData'] WARN_UNSUPPORTED_CORRELATED = ConfigAlias( '0.4', 'WARN_UNSUPPORTED_CORRELATED', 'warn_unsupported_correlated', 'astropy.nddata.nddata', 'astropy.nddata') class NDData(NDDataBase): """ A basic class for array-based data. The key distinction from raw numpy arrays is the presence of additional metadata such as uncertainties, a mask, units, and/or a coordinate system. Parameters ----------- data : `~numpy.ndarray`, `~numpy.ndarray`-like, or `NDData` The actual data contained in this `NDData` object. If possible, data will not be copied`data`, so you should make copy the ``data`` before passing it in if that's the desired behavior. uncertainty : any type, optional Uncertainty on the data. The uncertainty *must* have a string attribute named ``uncertainty_type``, but there is otherwise no restriction. mask : `~numpy.ndarray`-like, optional Mask for the data. The values must be ``False`` where the data is *valid* and ``True`` when it is not (like Numpy masked arrays). If ``data`` is a numpy masked array, providing ``mask`` here will causes the mask from the masked array to be ignored. wcs : undefined, optional WCS-object containing the world coordinate system for the data. meta : `dict`-like object, optional Metadata for this object. Must be dict-like but no further restriction is placed on meta. unit : `~astropy.units.UnitBase` instance or str, optional The units of the data. If data is an `~astropy.units.Quantity` then ``unit`` is set to the unit of the data; is a unit is also explicitly provided an error is raised. Notes ----- The data in a `NDData` object should be accessed through the data attribute. For example:: >>> from astropy.nddata import NDData >>> x = NDData([1,2,3]) >>> x.data array([1, 2, 3]) """ def __init__(self, data, uncertainty=None, mask=None, wcs=None, meta=None, unit=None): super(NDData, self).__init__() if isinstance(data, NDData): # don't use self.__class__ (issue #4137) # No need to check the data because data must have successfully # initialized. self._data = data._data self._unit = data.unit # must set before uncert for NDDataArray self.uncertainty = data.uncertainty self._mask = data.mask self._wcs = data.wcs self._meta = data.meta if uncertainty is not None: self._uncertainty = uncertainty log.info("Overwriting NDData's current uncertainty being" " overwritten with specified uncertainty") if mask is not None: self._mask = mask log.info("Overwriting NDData's current " "mask with specified mask") if wcs is not None: self._wcs = wcs log.info("Overwriting NDData's current wcs with specified wcs") if meta is not None: self._meta = meta log.info("Overwriting NDData's current meta " "with specified meta") if unit is not None and unit is not data.unit: raise ValueError('Unit provided in initializer does not ' 'match data unit.') else: if hasattr(data, 'mask'): self._data = np.array(data.data, subok=True, copy=False) if mask is not None: self._mask = mask log.info("NDData was created with a masked array, and a " "mask was explicitly provided to NDData. The " "explicitly passed-in mask will be used and the " "masked array's mask will be ignored.") else: self._mask = data.mask elif isinstance(data, Quantity): self._data = np.array(data.value, subok=True, copy=False) self._mask = mask elif (not hasattr(data, 'shape') or not hasattr(data, '__getitem__') or not hasattr(data, '__array__')): # Data doesn't look like a numpy array, try converting it to # one. self._data = np.array(data, subok=True, copy=False) # Quick check to see if what we got out looks like an array # rather than an object (since numpy will convert a # non-numerical input to an array of objects). if self._data.dtype == 'O': raise TypeError("Could not convert data to numpy array.") self._mask = mask else: self._data = data # np.array(data, subok=True, copy=False) self._mask = mask self._wcs = wcs if meta is None: self._meta = OrderedDict() elif not isinstance(meta, collections.Mapping): raise TypeError("meta attribute must be dict-like") else: self._meta = meta if isinstance(data, Quantity): if unit is not None: raise ValueError("Cannot use the unit argument when data " "is a Quantity") else: self._unit = data.unit else: if unit is not None: self._unit = Unit(unit) else: self._unit = None # This must come after self's unit has been set so that the unit # of the uncertainty, if any, can be converted to the unit of the # unit of self. self.uncertainty = uncertainty def __str__(self): return str(self.data) def __repr__(self): prefix = self.__class__.__name__ + '(' body = np.array2string(self.data, separator=', ', prefix=prefix) return ''.join([prefix, body, ')']) @property def data(self): return self._data @property def mask(self): return self._mask @mask.setter def mask(self, value): self._mask = value @property def unit(self): return self._unit @property def wcs(self): return self._wcs @property def meta(self): return self._meta astropy-1.1.1/astropy/nddata/decorators.py0000644001134200020070000001475612640262015021605 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import warnings from ..utils import wraps from ..utils.exceptions import AstropyUserWarning from ..utils.compat.funcsigs import signature from .nddata import NDData __all__ = ['support_nddata'] def support_nddata(_func=None, accepts=NDData, repack=False, returns=None): """ Decorator to split NDData properties into function arguments. This is a decorator to allow functions to take NDData objects as their first arguments and split up the properties into kwargs as required by the function. For example, if you consider the following function:: def downsample(data, wcs=None): # downsample data and optionally WCS here pass This function takes a Numpy array for the data, and some WCS information with the ``data`` keyword argument. However, you might have an NDData instance that has the ``wcs`` property set and you would like to be able to call the function with ``downsample(my_nddata)`` and have the WCS information, if present, automatically be passed to the ``wcs`` keyword argument. This decorator can be used to make this possible:: @support_nddata def downsample(data, wcs=None): # downsample data and optionally WCS here pass This function can now either be called as before, specifying the data and WCS separately, or an NDData instance can be passed to the ``data`` argument. The restrictions on functions to use this function are: * The first positional argument should be ``data`` and take a Numpy array. * The following arguments can optionally be specified in the function signature, but if they are specified they should be keyword arguments: ``uncertainty``, ``mask``, ``meta``, ``unit``, and ``wcs``. If you are making use of this decorator, you should be prepared for these keyword arguments to be set to the properties of the NDData object (if present). The behavior of the decorator is to check through the NDData properties and if they are set, it checks if the function accepts them as keyword arguments. If an NDData property is set but cannot be passed to a keyword argument, a warning is emitted to tell the user that the NDData property in question will not be used by the function (to ensure that they know when e.g. uncertainties cannot be used). If the user passes an NDData object *and* explicitly sets a keyword argument that is one of the valid NDData properties, a warning is emitted to inform the user that the explicitly specified value will take priority. """ if returns is not None and not repack: raise ValueError('returns should only be set if repack=True') if returns is None and repack: raise ValueError('returns should be set if repack=True') def support_nddata_decorator(func): # Find out args and kwargs sig = signature(func) func_args = [] func_kwargs = [] for param in sig.parameters.values(): if param.kind in (param.VAR_POSITIONAL, param.VAR_KEYWORD): raise ValueError("func may not have *args or **kwargs") elif param.default == param.empty: func_args.append(param.name) else: func_kwargs.append(param.name) # First argument should be data if len(func_args) == 0 or func_args[0] != 'data': raise ValueError("Can only wrap functions whose first positional argument is `data`") supported_properties = ['uncertainty', 'mask', 'meta', 'unit', 'wcs'] @wraps(func) def wrapper(data, *args, **kwargs): unpack = isinstance(data, accepts) input_data = data if not unpack and isinstance(data, NDData): raise TypeError("Only NDData sub-classes that inherit from {0}" " can be used by this function".format(accepts.__name__)) # If data is an NDData instance, we can try and find properties that # can be passed as kwargs. if unpack: ignored = [] # We loop over a list of pre-defined properties for prop in supported_properties: # We only need to do something if the property exists on the # NDData object if hasattr(data, prop): value = getattr(data, prop) if (prop == 'meta' and len(value) > 0) or (prop != 'meta' and value is not None): if prop in func_kwargs: if prop in kwargs and kwargs[prop] is not None: warnings.warn("Property {0} has been passed explicitly and as an " "NDData property, using explicitly specified value".format(prop), AstropyUserWarning) else: kwargs[prop] = value else: ignored.append(prop) if ignored: warnings.warn("The following attributes were set on the data object, " "but will be ignored by the function: " + ", ".join(ignored), AstropyUserWarning) # Finally, replace data by the data itself data = data.data result = func(data, *args, **kwargs) if unpack: if repack: if len(returns) > 1 and len(returns) != len(result): raise ValueError("Function did not return the expected number of arguments") elif len(returns) == 1: result = [result] return input_data.__class__(**dict(zip(returns, result))) else: return result else: return result return wrapper # If _func is set, this means that the decorator was used without # parameters so we have to return the result of the support_nddata_decorator # decorator rather than the decorator itself if _func is not None: return support_nddata_decorator(_func) else: return support_nddata_decorator astropy-1.1.1/astropy/nddata/__init__.py0000644001134200020070000000261312644017723021174 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ The `astropy.nddata` subpackage provides the `~astropy.nddata.NDData` class and related tools to manage n-dimensional array-based data (e.g. CCD images, IFU Data, grid-based simulation data, ...). This is more than just `numpy.ndarray` objects, because it provides metadata that cannot be easily provided by a single array. """ from .nddata import * from .nddata_base import * from .nduncertainty import * from .flag_collection import * from .decorators import * from .mixins.ndarithmetic import * from .mixins.ndslicing import * from .mixins.ndio import * from .compat import * from .utils import * from .. import config as _config class Conf(_config.ConfigNamespace): """ Configuration parameters for `astropy.nddata`. """ warn_unsupported_correlated = _config.ConfigItem( True, 'Whether to issue a warning if `~astropy.nddata.NDData` arithmetic ' 'is performed with uncertainties and the uncertainties do not ' 'support the propagation of correlated uncertainties.' ) warn_setting_unit_directly = _config.ConfigItem( True, 'Whether to issue a warning when the `~astropy.nddata.NDData` unit ' 'attribute is changed from a non-``None`` value to another value ' 'that data values/uncertainties are not scaled with the unit change.' ) conf = Conf() astropy-1.1.1/astropy/config/0000755001134200020070000000000012644022135017064 5ustar embrayscience00000000000000astropy-1.1.1/astropy/config/tests/0000755001134200020070000000000012644022135020226 5ustar embrayscience00000000000000astropy-1.1.1/astropy/config/tests/data/0000755001134200020070000000000012644022135021137 5ustar embrayscience00000000000000astropy-1.1.1/astropy/config/tests/data/not_empty.cfg0000644001134200020070000000064412640262015023641 0ustar embrayscience00000000000000## Use Unicode characters when outputting values, and writing widgets to the ## console. #unicode_output = False [utils.console] ## When True, use ANSI color escape sequences when writing to the console. # use_color = True [logger] ## Threshold for the logging messages. Logging messages that are less severe ## than this level will be ignored. The levels are 'DEBUG', 'INFO', 'WARNING', ## 'ERROR' log_level = INFO astropy-1.1.1/astropy/config/tests/data/astropy.0.3.windows.cfg0000644001134200020070000001554412640262015025321 0ustar embrayscience00000000000000 # Use Unicode characters when outputting values, and writing widgets to the # console. unicode_output = False [utils.console] # When True, use ANSI color escape sequences when writing to the console. use_color = True [logger] # Threshold for the logging messages. Logging messages that are less severe # than this level will be ignored. The levels are 'DEBUG', 'INFO', 'WARNING', # 'ERROR' log_level = INFO # Whether to use color for the level names use_color = True # Whether to log warnings.warn calls log_warnings = True # Whether to log exceptions before raising them log_exceptions = False # Whether to always log messages to a log file log_to_file = False # The file to log messages to. When '', it defaults to a file 'astropy.log' in # the astropy config directory. log_file_path = "" # Threshold for logging messages to log_file_path log_file_level = INFO # Format for log file entries log_file_format = "%(asctime)r, %(origin)r, %(levelname)r, %(message)r" [coordinates.name_resolve] # The URL to Sesame's web-queryable database. sesame_url = http://cdsweb.u-strasbg.fr/cgi-bin/nph-sesame/, http://vizier.cfa.harvard.edu/viz-bin/nph-sesame/ # This specifies the default database that SESAME will query when using the # name resolve mechanism in the coordinates subpackage. Default is to search # all databases, but this can be 'all', 'simbad', 'ned', or 'vizier'. # Options: all, simbad, ned, vizier sesame_database = all # This is the maximum time to wait for a response from a name resolve query to # SESAME in seconds. name_resolve_timeout = 5 [table.pprint] # Maximum number of lines for the pretty-printer to use if it cannot determine # the terminal size. Negative numbers mean no limit. max_lines = 25 # Maximum number of characters for the pretty-printer to use per line if it # cannot determine the terminal size. Negative numbers mean no limit. max_width = 80 [table.table] # The template that determines the name of a column if it cannot be # determined. Uses new-style (format method) string formatting auto_colname = col{0} [utils.data] # URL for astropy remote data site. dataurl = http://data.astropy.org/ # Time to wait for remote data query (in seconds). remote_timeout = 3.0 # Block size for computing MD5 file hashes. hash_block_size = 65536 # Number of bytes of remote data to download per step. download_block_size = 65536 # Number of times to try to get the lock while accessing the data cache before # giving up. download_cache_lock_attempts = 5 # If True, temporary download files created when the cache is inacessible will # be deleted at the end of the python session. delete_temporary_downloads_at_exit = True [io.fits] # If True, enable support for record-valued keywords as described by FITS WCS # Paper IV. Otherwise they are treated as normal keywords. enabled_record_valued_keyword_cards = True # If True, extension names (i.e. the EXTNAME keyword) should be treated as # case-sensitive. extension_name_case_sensitive = False # If True, automatically remove trailing whitespace for string values in # headers. Otherwise the values are returned verbatim, with all whitespace # intact. strip_header_whitespace = True # If True, use memory-mapped file access to read/write the data in FITS files. # This generally provides better performance, especially for large files, but # may affect performance in I/O-heavy applications. use_memmap = True [io.votable.table] # When True, treat fixable violations of the VOTable spec as exceptions. pedantic = False [cosmology.core] # The default cosmology to use. Note this is only read on import, so changing # this value at runtime has no effect. default_cosmology = no_default [nddata.nddata] # Whether to issue a warning if NDData arithmetic is performed with # uncertainties and the uncertainties do not support the propagation of # correlated uncertainties. warn_unsupported_correlated = True [vo.client.vos_catalog] # URL where VO Service database file is stored. vos_baseurl = http://stsdas.stsci.edu/astrolib/vo_databases/ [vo.client.conesearch] # Conesearch database name. conesearch_dbname = conesearch_good [vo.validator.validate] # Cone Search services master list for validation. cs_mstr_list = http://vao.stsci.edu/directory/NVORegInt.asmx/VOTCapabilityPredOpt?predicate=1%3D1&capability=conesearch&VOTStyleOption=2 # Only check these Cone Search URLs. cs_urls = http://archive.noao.edu/nvo/usno.php?cat=a&, http://gsss.stsci.edu/webservices/vo/ConeSearch.aspx?CAT=GSC23&, http://irsa.ipac.caltech.edu/cgi-bin/Oasis/CatSearch/nph-catsearch?CAT=fp_psc&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=I/220/out&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=I/243/out&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=I/252/out&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=I/254/out&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=I/255/out&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=I/284/out&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=II/246/out&, http://vo.astronet.ru/sai_cas/conesearch?cat=sdssdr7&tab=field&, http://vo.astronet.ru/sai_cas/conesearch?cat=sdssdr7&tab=photoobjall&, http://vo.astronet.ru/sai_cas/conesearch?cat=sdssdr7&tab=phototag&, http://vo.astronet.ru/sai_cas/conesearch?cat=sdssdr7&tab=specobjall&, http://vo.astronet.ru/sai_cas/conesearch?cat=sdssdr7&tab=specphotoall&, http://vo.astronet.ru/sai_cas/conesearch?cat=sdssdr7&tab=sppparams&, http://vo.astronet.ru/sai_cas/conesearch?cat=twomass&tab=psc&, http://vo.astronet.ru/sai_cas/conesearch?cat=twomass&tab=xsc&, http://vo.astronet.ru/sai_cas/conesearch?cat=usnoa2&tab=main&, http://vo.astronet.ru/sai_cas/conesearch?cat=usnob1&tab=main&, http://wfaudata.roe.ac.uk/sdssdr7-dsa/DirectCone?DSACAT=SDSS_DR7&DSATAB=Galaxy&, http://wfaudata.roe.ac.uk/sdssdr7-dsa/DirectCone?DSACAT=SDSS_DR7&DSATAB=PhotoObj&, http://wfaudata.roe.ac.uk/sdssdr7-dsa/DirectCone?DSACAT=SDSS_DR7&DSATAB=PhotoObjAll&, http://wfaudata.roe.ac.uk/sdssdr7-dsa/DirectCone?DSACAT=SDSS_DR7&DSATAB=Star&, http://wfaudata.roe.ac.uk/sdssdr8-dsa/DirectCone?DSACAT=SDSS_DR8&DSATAB=PhotoObjAll&, http://wfaudata.roe.ac.uk/sdssdr8-dsa/DirectCone?DSACAT=SDSS_DR8&DSATAB=SpecObjAll&, http://wfaudata.roe.ac.uk/twomass-dsa/DirectCone?DSACAT=TWOMASS&DSATAB=twomass_psc&, http://wfaudata.roe.ac.uk/twomass-dsa/DirectCone?DSACAT=TWOMASS&DSATAB=twomass_xsc&, http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-A2&, http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-B1& # VO Table warning codes that are considered non-critical noncrit_warnings = W03, W06, W07, W09, W10, W15, W17, W20, W21, W22, W27, W28, W29, W41, W42, W48, W50 astropy-1.1.1/astropy/config/tests/data/deprecated.cfg0000644001134200020070000000003612640262015023716 0ustar embrayscience00000000000000[table.pprint] max_lines = 25 astropy-1.1.1/astropy/config/tests/data/alias.cfg0000644001134200020070000000006612640262015022712 0ustar embrayscience00000000000000[coordinates.name_resolve] name_resolve_timeout = 42.0astropy-1.1.1/astropy/config/tests/data/astropy.0.3.cfg0000644001134200020070000001531712640262015023626 0ustar embrayscience00000000000000 # Use Unicode characters when outputting values, and writing widgets to the # console. unicode_output = False [utils.console] # When True, use ANSI color escape sequences when writing to the console. use_color = True [logger] # Threshold for the logging messages. Logging messages that are less severe # than this level will be ignored. The levels are 'DEBUG', 'INFO', 'WARNING', # 'ERROR' log_level = INFO # Whether to use color for the level names use_color = True # Whether to log warnings.warn calls log_warnings = True # Whether to log exceptions before raising them log_exceptions = False # Whether to always log messages to a log file log_to_file = False # The file to log messages to. When '', it defaults to a file 'astropy.log' in # the astropy config directory. log_file_path = "" # Threshold for logging messages to log_file_path log_file_level = INFO # Format for log file entries log_file_format = "%(asctime)r, %(origin)r, %(levelname)r, %(message)r" [coordinates.name_resolve] # The URL to Sesame's web-queryable database. sesame_url = http://cdsweb.u-strasbg.fr/cgi-bin/nph-sesame/, http://vizier.cfa.harvard.edu/viz-bin/nph-sesame/ # This specifies the default database that SESAME will query when using the # name resolve mechanism in the coordinates subpackage. Default is to search # all databases, but this can be 'all', 'simbad', 'ned', or 'vizier'. # Options: all, simbad, ned, vizier sesame_database = all # This is the maximum time to wait for a response from a name resolve query to # SESAME in seconds. name_resolve_timeout = 5 [table.pprint] # Maximum number of lines for the pretty-printer to use if it cannot determine # the terminal size. Negative numbers mean no limit. max_lines = 25 # Maximum number of characters for the pretty-printer to use per line if it # cannot determine the terminal size. Negative numbers mean no limit. max_width = 80 [table.table] # The template that determines the name of a column if it cannot be # determined. Uses new-style (format method) string formatting auto_colname = col{0} [utils.data] # URL for astropy remote data site. dataurl = http://data.astropy.org/ # Time to wait for remote data query (in seconds). remote_timeout = 3.0 # Block size for computing MD5 file hashes. hash_block_size = 65536 # Number of bytes of remote data to download per step. download_block_size = 65536 # Number of times to try to get the lock while accessing the data cache before # giving up. download_cache_lock_attempts = 5 # If True, temporary download files created when the cache is inacessible will # be deleted at the end of the python session. delete_temporary_downloads_at_exit = True [io.fits] # If True, enable support for record-valued keywords as described by FITS WCS # Paper IV. Otherwise they are treated as normal keywords. enabled_record_valued_keyword_cards = True # If True, extension names (i.e. the EXTNAME keyword) should be treated as # case-sensitive. extension_name_case_sensitive = False # If True, automatically remove trailing whitespace for string values in # headers. Otherwise the values are returned verbatim, with all whitespace # intact. strip_header_whitespace = True # If True, use memory-mapped file access to read/write the data in FITS files. # This generally provides better performance, especially for large files, but # may affect performance in I/O-heavy applications. use_memmap = True [io.votable.table] # When True, treat fixable violations of the VOTable spec as exceptions. pedantic = False [cosmology.core] # The default cosmology to use. Note this is only read on import, so changing # this value at runtime has no effect. default_cosmology = no_default [nddata.nddata] # Whether to issue a warning if NDData arithmetic is performed with # uncertainties and the uncertainties do not support the propagation of # correlated uncertainties. warn_unsupported_correlated = True [vo.client.vos_catalog] # URL where VO Service database file is stored. vos_baseurl = http://stsdas.stsci.edu/astrolib/vo_databases/ [vo.client.conesearch] # Conesearch database name. conesearch_dbname = conesearch_good [vo.validator.validate] # Cone Search services master list for validation. cs_mstr_list = http://vao.stsci.edu/directory/NVORegInt.asmx/VOTCapabilityPredOpt?predicate=1%3D1&capability=conesearch&VOTStyleOption=2 # Only check these Cone Search URLs. cs_urls = http://archive.noao.edu/nvo/usno.php?cat=a&, http://gsss.stsci.edu/webservices/vo/ConeSearch.aspx?CAT=GSC23&, http://irsa.ipac.caltech.edu/cgi-bin/Oasis/CatSearch/nph-catsearch?CAT=fp_psc&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=I/220/out&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=I/243/out&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=I/252/out&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=I/254/out&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=I/255/out&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=I/284/out&, http://vizier.u-strasbg.fr/viz-bin/votable/-A?-source=II/246/out&, http://vo.astronet.ru/sai_cas/conesearch?cat=sdssdr7&tab=field&, http://vo.astronet.ru/sai_cas/conesearch?cat=sdssdr7&tab=photoobjall&, http://vo.astronet.ru/sai_cas/conesearch?cat=sdssdr7&tab=phototag&, http://vo.astronet.ru/sai_cas/conesearch?cat=sdssdr7&tab=specobjall&, http://vo.astronet.ru/sai_cas/conesearch?cat=sdssdr7&tab=specphotoall&, http://vo.astronet.ru/sai_cas/conesearch?cat=sdssdr7&tab=sppparams&, http://vo.astronet.ru/sai_cas/conesearch?cat=twomass&tab=psc&, http://vo.astronet.ru/sai_cas/conesearch?cat=twomass&tab=xsc&, http://vo.astronet.ru/sai_cas/conesearch?cat=usnoa2&tab=main&, http://vo.astronet.ru/sai_cas/conesearch?cat=usnob1&tab=main&, http://wfaudata.roe.ac.uk/sdssdr7-dsa/DirectCone?DSACAT=SDSS_DR7&DSATAB=Galaxy&, http://wfaudata.roe.ac.uk/sdssdr7-dsa/DirectCone?DSACAT=SDSS_DR7&DSATAB=PhotoObj&, http://wfaudata.roe.ac.uk/sdssdr7-dsa/DirectCone?DSACAT=SDSS_DR7&DSATAB=PhotoObjAll&, http://wfaudata.roe.ac.uk/sdssdr7-dsa/DirectCone?DSACAT=SDSS_DR7&DSATAB=Star&, http://wfaudata.roe.ac.uk/sdssdr8-dsa/DirectCone?DSACAT=SDSS_DR8&DSATAB=PhotoObjAll&, http://wfaudata.roe.ac.uk/sdssdr8-dsa/DirectCone?DSACAT=SDSS_DR8&DSATAB=SpecObjAll&, http://wfaudata.roe.ac.uk/twomass-dsa/DirectCone?DSACAT=TWOMASS&DSATAB=twomass_psc&, http://wfaudata.roe.ac.uk/twomass-dsa/DirectCone?DSACAT=TWOMASS&DSATAB=twomass_xsc&, http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-A2&, http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-B1& # VO Table warning codes that are considered non-critical noncrit_warnings = W03, W06, W07, W09, W10, W15, W17, W20, W21, W22, W27, W28, W29, W41, W42, W48, W50 astropy-1.1.1/astropy/config/tests/data/empty.cfg0000644001134200020070000000064612640262015022763 0ustar embrayscience00000000000000## Use Unicode characters when outputting values, and writing widgets to the ## console. #unicode_output = False [utils.console] ## When True, use ANSI color escape sequences when writing to the console. # use_color = True [logger] ## Threshold for the logging messages. Logging messages that are less severe ## than this level will be ignored. The levels are 'DEBUG', 'INFO', 'WARNING', ## 'ERROR' # log_level = INFO astropy-1.1.1/astropy/config/tests/test_configs.py0000644001134200020070000002674412644017723023313 0ustar embrayscience00000000000000# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import io import os import sys from ...tests.helper import catch_warnings from ...extern import six from ...utils.compat import subprocess from ...utils.data import get_pkg_data_filename from .. import configuration from .. import paths from ...utils.exceptions import AstropyDeprecationWarning def test_paths(): assert 'astropy' in paths.get_config_dir() assert 'astropy' in paths.get_cache_dir() def test_set_temp_config(tmpdir, monkeypatch): monkeypatch.setattr(paths.set_temp_config, '_temp_path', None) orig_config_dir = paths.get_config_dir() temp_config_dir = str(tmpdir.mkdir('config')) temp_astropy_config = os.path.join(temp_config_dir, 'astropy') # Test decorator mode @paths.set_temp_config(temp_config_dir) def test_func(): assert paths.get_config_dir() == temp_astropy_config # Test temporary restoration of original default with paths.set_temp_config() as d: assert d == orig_config_dir == paths.get_config_dir() test_func() # Test context manager mode (with cleanup) with paths.set_temp_config(temp_config_dir, delete=True): assert paths.get_config_dir() == temp_astropy_config assert not os.path.exists(temp_config_dir) def test_set_temp_cache(tmpdir, monkeypatch): monkeypatch.setattr(paths.set_temp_cache, '_temp_path', None) orig_cache_dir = paths.get_cache_dir() temp_cache_dir = str(tmpdir.mkdir('cache')) temp_astropy_cache = os.path.join(temp_cache_dir, 'astropy') # Test decorator mode @paths.set_temp_cache(temp_cache_dir) def test_func(): assert paths.get_cache_dir() == temp_astropy_cache # Test temporary restoration of original default with paths.set_temp_cache() as d: assert d == orig_cache_dir == paths.get_cache_dir() test_func() # Test context manager mode (with cleanup) with paths.set_temp_cache(temp_cache_dir, delete=True): assert paths.get_cache_dir() == temp_astropy_cache assert not os.path.exists(temp_cache_dir) def test_config_file(): from ..configuration import get_config, reload_config apycfg = get_config('astropy') assert apycfg.filename.endswith('astropy.cfg') cfgsec = get_config('astropy.config') assert cfgsec.depth == 1 assert cfgsec.name == 'config' assert cfgsec.parent.filename.endswith('astropy.cfg') reload_config('astropy') def test_configitem(): from ..configuration import ConfigurationItem, get_config ci = ConfigurationItem('tstnm', 34, 'this is a Description') assert ci.module == 'astropy.config.tests.test_configs' assert ci() == 34 assert ci.description == 'this is a Description' sec = get_config(ci.module) assert sec['tstnm'] == 34 ci.description = 'updated Descr' ci.set(32) assert ci() == 32 # It's useful to go back to the default to allow other test functions to # call this one and still be in the default configuration. ci.description = 'this is a Description' ci.set(34) assert ci() == 34 def test_configitem_types(): from ..configuration import ConfigurationItem from ...tests.helper import pytest ci1 = ConfigurationItem('tstnm1', 34) assert isinstance(ci1(), int) ci2 = ConfigurationItem('tstnm2', 34.3) assert isinstance(ci2(), float) ci3 = ConfigurationItem('tstnm3', True) assert isinstance(ci3(), bool) ci4 = ConfigurationItem('tstnm4', 'astring') assert isinstance(ci4(), six.text_type) with pytest.raises(TypeError): ci1.set(34.3) ci2.set(12) # this would should succeed as up-casting with pytest.raises(TypeError): ci3.set('fasd') with pytest.raises(TypeError): ci4.set(546.245) def test_configitem_options(tmpdir): from ..configuration import ConfigurationItem, get_config from ...tests.helper import pytest cio = ConfigurationItem('tstnmo', ['op1', 'op2', 'op3']) sec = get_config(cio.module) assert isinstance(cio(), six.text_type) assert cio() == 'op1' assert sec['tstnmo'] == 'op1' cio.set('op2') with pytest.raises(TypeError): cio.set('op5') assert sec['tstnmo'] == 'op2' # now try saving apycfg = sec while apycfg.parent is not apycfg: apycfg = apycfg.parent f = tmpdir.join('astropy.cfg') with io.open(f.strpath, 'wb') as fd: apycfg.write(fd) with io.open(f.strpath, 'rU', encoding='utf-8') as fd: lns = [x.strip() for x in f.readlines()] assert 'tstnmo = op2' in lns def test_config_noastropy_fallback(monkeypatch): """ Tests to make sure configuration items fall back to their defaults when there's a problem accessing the astropy directory """ from ...tests.helper import pytest # make sure the config directory is not searched monkeypatch.setenv(str('XDG_CONFIG_HOME'), 'foo') monkeypatch.delenv(str('XDG_CONFIG_HOME')) monkeypatch.setattr(paths.set_temp_config, '_temp_path', None) # make sure the _find_or_create_astropy_dir function fails as though the # astropy dir could not be accessed def osraiser(dirnm, linkto): raise OSError monkeypatch.setattr(paths, '_find_or_create_astropy_dir', osraiser) # also have to make sure the stored configuration objects are cleared monkeypatch.setattr(configuration, '_cfgobjs', {}) with pytest.raises(OSError): # make sure the config dir search fails paths.get_config_dir() # now run the basic tests, and make sure the warning about no astropy # is present with catch_warnings(configuration.ConfigurationMissingWarning) as w: test_configitem() assert len(w) == 1 w = w[0] assert 'Configuration defaults will be used' in str(w.message) def test_configitem_setters(): from ..configuration import ConfigurationItem ci = ConfigurationItem('tstnm12', 42, 'this is another Description') assert ci() == 42 with ci.set_temp(45): assert ci() == 45 assert ci() == 42 ci.set(43) assert ci() == 43 with ci.set_temp(46): assert ci() == 46 # Make sure it is reset even with Exception try: with ci.set_temp(47): raise Exception except: pass assert ci() == 43 def test_empty_config_file(): from ..configuration import is_unedited_config_file def get_content(fn): with io.open(get_pkg_data_filename(fn), 'rt', encoding='latin-1') as fd: return fd.read() content = get_content('data/empty.cfg') assert is_unedited_config_file(content) content = get_content('data/not_empty.cfg') assert not is_unedited_config_file(content) content = get_content('data/astropy.0.3.cfg') assert is_unedited_config_file(content) content = get_content('data/astropy.0.3.windows.cfg') assert is_unedited_config_file(content) def test_alias(): import astropy with catch_warnings() as w: with astropy.UNICODE_OUTPUT.set_temp(False): pass assert len(w) == 1 assert str(w[0].message) == ( "Since 0.4, config parameter 'astropy.UNICODE_OUTPUT' is deprecated. " "Use 'astropy.conf.unicode_output' instead.") def test_alias2(): from ...coordinates import name_resolve from ...utils.data import conf # REMOVE in astropy 0.5 with catch_warnings() as w: x = name_resolve.NAME_RESOLVE_TIMEOUT() assert x == 3 assert len(w) == 1 assert str(w[0].message) == ( "Since 0.4, config parameter " "'astropy.coordinates.name_resolve.NAME_RESOLVE_TIMEOUT' is deprecated. " "Use 'astropy.utils.data.conf.remote_timeout' instead.") with catch_warnings() as w: name_resolve.NAME_RESOLVE_TIMEOUT.set(10) assert conf.remote_timeout == 10 assert len(w) == 1 assert str(w[0].message) == ( "Since 0.4, config parameter " "'astropy.coordinates.name_resolve.NAME_RESOLVE_TIMEOUT' is deprecated. " "Use 'astropy.utils.data.conf.remote_timeout' instead.") with catch_warnings() as w: with name_resolve.NAME_RESOLVE_TIMEOUT.set_temp(42): assert conf.remote_timeout == 42 assert len(w) == 1 assert str(w[0].message) == ( "Since 0.4, config parameter " "'astropy.coordinates.name_resolve.NAME_RESOLVE_TIMEOUT' is deprecated. " "Use 'astropy.utils.data.conf.remote_timeout' instead.") assert name_resolve.NAME_RESOLVE_TIMEOUT() == 10 assert conf.remote_timeout == 10 with catch_warnings() as w: name_resolve.NAME_RESOLVE_TIMEOUT.reload() assert len(w) == 1 assert str(w[0].message) == ( "Since 0.4, config parameter " "'astropy.coordinates.name_resolve.NAME_RESOLVE_TIMEOUT' is deprecated. " "Use 'astropy.utils.data.conf.remote_timeout' instead.") assert x == 3 assert name_resolve.NAME_RESOLVE_TIMEOUT() == 3 class TestAliasRead(object): def setup_class(self): configuration._override_config_file = get_pkg_data_filename('data/alias.cfg') def test_alias_read(self): from astropy.utils.data import conf with catch_warnings() as w: conf.reload() assert conf.remote_timeout == 42 assert len(w) == 1 assert str(w[0].message).startswith( "Config parameter 'name_resolve_timeout' in section " "[coordinates.name_resolve]") def teardown_class(self): from astropy.utils.data import conf configuration._override_config_file = None conf.reload() def test_configitem_unicode(tmpdir): from ..configuration import ConfigurationItem, get_config cio = ConfigurationItem('аÑтрономиÑ', 'áƒáƒ¡áƒ¢áƒ áƒáƒœáƒáƒ›áƒ˜áƒ˜áƒ¡') sec = get_config(cio.module) assert isinstance(cio(), six.text_type) assert cio() == 'áƒáƒ¡áƒ¢áƒ áƒáƒœáƒáƒ›áƒ˜áƒ˜áƒ¡' assert sec['аÑтрономиÑ'] == 'áƒáƒ¡áƒ¢áƒ áƒáƒœáƒáƒ›áƒ˜áƒ˜áƒ¡' def test_warning_move_to_top_level(): # Check that the warning about deprecation config items in the # file works. See #2514 from ... import conf configuration._override_config_file = get_pkg_data_filename('data/deprecated.cfg') try: with catch_warnings(AstropyDeprecationWarning) as w: conf.reload() conf.max_lines assert len(w) == 1 finally: configuration._override_config_file = None conf.reload() def test_no_home(): # "import astropy" fails when neither $HOME or $XDG_CONFIG_HOME # are set. To test, we unset those environment variables for a # subprocess and try to import astropy. test_path = os.path.dirname(__file__) astropy_path = os.path.abspath( os.path.join(test_path, '..', '..', '..')) env = os.environ.copy() paths = [astropy_path] if env.get('PYTHONPATH'): paths.append(env.get('PYTHONPATH')) env[str('PYTHONPATH')] = str(os.pathsep.join(paths)) for val in ['HOME', 'XDG_CONFIG_HOME']: if val in env: del env[val] retcode = subprocess.check_call( [sys.executable, '-c', 'import astropy'], env=env) assert retcode == 0 def test_unedited_template(): # Test that the config file is written at most once config_dir = os.path.join(os.path.dirname(__file__), '..', '..') configuration.update_default_config('astropy', config_dir) assert configuration.update_default_config('astropy', config_dir) is False astropy-1.1.1/astropy/config/tests/__init__.py0000644001134200020070000000015512602615521022341 0ustar embrayscience00000000000000from __future__ import (absolute_import, division, print_function, unicode_literals) astropy-1.1.1/astropy/config/affiliated.py0000644001134200020070000000046512602615521021534 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """This module contains functions and classes for finding information about affiliated packages and installing them. """ from __future__ import (absolute_import, division, print_function, unicode_literals) __all__ = [] astropy-1.1.1/astropy/config/paths.py0000644001134200020070000002476712644017723020604 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains functions to determine where configuration and data/cache files used by Astropy should be placed. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six from ..utils.decorators import wraps import os import shutil import sys __all__ = ['get_config_dir', 'get_cache_dir', 'set_temp_config', 'set_temp_cache'] def _find_home(): """ Locates and return the home directory (or best approximation) on this system. Raises ------ OSError If the home directory cannot be located - usually means you are running Astropy on some obscure platform that doesn't have standard home directories. """ # this is used below to make fix up encoding issues that sometimes crop up # in py2.x but not in py3.x if six.PY2: decodepath = lambda pth: pth.decode(sys.getfilesystemencoding()) elif six.PY3: decodepath = lambda pth: pth # First find the home directory - this is inspired by the scheme ipython # uses to identify "home" if os.name == 'posix': # Linux, Unix, AIX, OS X if 'HOME' in os.environ: homedir = decodepath(os.environ['HOME']) else: raise OSError('Could not find unix home directory to search for ' 'astropy config dir') elif os.name == 'nt': # This is for all modern Windows (NT or after) if 'MSYSTEM' in os.environ and os.environ.get('HOME'): # Likely using an msys shell; use whatever it is using for its # $HOME directory homedir = decodepath(os.environ['HOME']) # Next try for a network home elif 'HOMESHARE' in os.environ: homedir = decodepath(os.environ['HOMESHARE']) # See if there's a local home elif 'HOMEDRIVE' in os.environ and 'HOMEPATH' in os.environ: homedir = os.path.join(os.environ['HOMEDRIVE'], os.environ['HOMEPATH']) homedir = decodepath(homedir) # Maybe a user profile? elif 'USERPROFILE' in os.environ: homedir = decodepath(os.path.join(os.environ['USERPROFILE'])) else: try: from ..extern.six.moves import winreg as wreg shell_folders = r'Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders' key = wreg.OpenKey(wreg.HKEY_CURRENT_USER, shell_folders) homedir = wreg.QueryValueEx(key, 'Personal')[0] homedir = decodepath(homedir) key.Close() except: # As a final possible resort, see if HOME is present if 'HOME' in os.environ: homedir = decodepath(os.environ['HOME']) else: raise OSError('Could not find windows home directory to ' 'search for astropy config dir') else: # for other platforms, try HOME, although it probably isn't there if 'HOME' in os.environ: homedir = decodepath(os.environ['HOME']) else: raise OSError('Could not find a home directory to search for ' 'astropy config dir - are you on an unspported ' 'platform?') return homedir def get_config_dir(create=True): """ Determines the Astropy configuration directory name and creates the directory if it doesn't exist. This directory is typically ``$HOME/.astropy/config``, but if the XDG_CONFIG_HOME environment variable is set and the ``$XDG_CONFIG_HOME/astropy`` directory exists, it will be that directory. If neither exists, the former will be created and symlinked to the latter. Returns ------- configdir : str The absolute path to the configuration directory. """ # symlink will be set to this if the directory is created linkto = None # If using set_temp_config, that overrides all if set_temp_config._temp_path is not None: xch = set_temp_config._temp_path config_path = os.path.join(xch, 'astropy') if not os.path.exists(config_path): os.mkdir(config_path) return os.path.abspath(config_path) # first look for XDG_CONFIG_HOME xch = os.environ.get('XDG_CONFIG_HOME') if xch is not None and os.path.exists(xch): xchpth = os.path.join(xch, 'astropy') if not os.path.islink(xchpth): if os.path.exists(xchpth): return os.path.abspath(xchpth) else: linkto = xchpth return os.path.abspath(_find_or_create_astropy_dir('config', linkto)) def get_cache_dir(): """ Determines the Astropy cache directory name and creates the directory if it doesn't exist. This directory is typically ``$HOME/.astropy/cache``, but if the XDG_CACHE_HOME environment variable is set and the ``$XDG_CACHE_HOME/astropy`` directory exists, it will be that directory. If neither exists, the former will be created and symlinked to the latter. Returns ------- cachedir : str The absolute path to the cache directory. """ # symlink will be set to this if the directory is created linkto = None # If using set_temp_cache, that overrides all if set_temp_cache._temp_path is not None: xch = set_temp_cache._temp_path cache_path = os.path.join(xch, 'astropy') if not os.path.exists(cache_path): os.mkdir(cache_path) return os.path.abspath(cache_path) # first look for XDG_CACHE_HOME xch = os.environ.get('XDG_CACHE_HOME') if xch is not None and os.path.exists(xch): xchpth = os.path.join(xch, 'astropy') if not os.path.islink(xchpth): if os.path.exists(xchpth): return os.path.abspath(xchpth) else: linkto = xchpth return os.path.abspath(_find_or_create_astropy_dir('cache', linkto)) class _SetTempPath(object): _temp_path = None _default_path_getter = None def __init__(self, path=None, delete=False): if path is not None: path = os.path.abspath(path) self._path = path self._delete = delete self._prev_path = self.__class__._temp_path def __enter__(self): self.__class__._temp_path = self._path return self._default_path_getter() def __exit__(self, *args): self.__class__._temp_path = self._prev_path if self._delete and self._path is not None: shutil.rmtree(self._path) def __call__(self, func): """Implements use as a decorator.""" @wraps(func) def wrapper(*args, **kwargs): with self: func(*args, **kwargs) return wrapper class set_temp_config(_SetTempPath): """ Context manager to set a temporary path for the Astropy config, primarily for use with testing. If the path set by this context manager does not already exist it will be created, if possible. This may also be used as a decorator on a function to set the config path just within that function. Parameters ---------- path : str, optional The directory (which must exist) in which to find the Astropy config files, or create them if they do not already exist. If None, this restores the config path to the user's default config path as returned by `get_config_dir` as though this context manager were not in effect (this is useful for testing). In this case the ``delete`` argument is always ignored. delete : bool, optional If True, cleans up the temporary directory after exiting the temp context (default: False). """ _default_path_getter = staticmethod(get_config_dir) def __enter__(self): # Special case for the config case, where we need to reset all the # cached config objects from .configuration import _cfgobjs path = super(set_temp_config, self).__enter__() _cfgobjs.clear() return path def __exit__(self, *args): from .configuration import _cfgobjs super(set_temp_config, self).__exit__(*args) _cfgobjs.clear() class set_temp_cache(_SetTempPath): """ Context manager to set a temporary path for the Astropy download cache, primarily for use with testing (though there may be other applications for setting a different cache directory, for example to switch to a cache dedicated to large files). If the path set by this context manager does not already exist it will be created, if possible. This may also be used as a decorator on a function to set the cache path just within that function. Parameters ---------- path : str The directory (which must exist) in which to find the Astropy cache files, or create them if they do not already exist. If None, this restores the cache path to the user's default cache path as returned by `get_cache_dir` as though this context manager were not in effect (this is useful for testing). In this case the ``delete`` argument is always ignored. delete : bool, optional If True, cleans up the temporary directory after exiting the temp context (default: False). """ _default_path_getter = staticmethod(get_cache_dir) def _find_or_create_astropy_dir(dirnm, linkto): innerdir = os.path.join(_find_home(), '.astropy') maindir = os.path.join(_find_home(), '.astropy', dirnm) if not os.path.exists(maindir): # first create .astropy dir if needed if not os.path.exists(innerdir): try: os.mkdir(innerdir) except OSError: if not os.path.isdir(innerdir): raise elif not os.path.isdir(innerdir): msg = 'Intended Astropy directory {0} is actually a file.' raise IOError(msg.format(innerdir)) try: os.mkdir(maindir) except OSError: if not os.path.isdir(maindir): raise if (not sys.platform.startswith('win') and linkto is not None and not os.path.exists(linkto)): os.symlink(maindir, linkto) elif not os.path.isdir(maindir): msg = 'Intended Astropy {0} directory {1} is actually a file.' raise IOError(msg.format(dirnm, maindir)) return os.path.abspath(maindir) astropy-1.1.1/astropy/config/setup_package.py0000644001134200020070000000031112640262015022243 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst def get_package_data(): return { str('astropy.config.tests'): ['data/*.cfg'] } def requires_2to3(): return False astropy-1.1.1/astropy/config/configuration.py0000644001134200020070000011056612644017723022325 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """This module contains classes and functions to standardize access to configuration files for Astropy and affiliated packages. .. note:: The configuration system makes use of the 'configobj' package, which stores configuration in a text format like that used in the standard library `ConfigParser`. More information and documentation for configobj can be found at http://www.voidspace.org.uk/python/configobj.html. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six from contextlib import contextmanager import hashlib import inspect import io from os import path import pkgutil import re import sys import types from warnings import warn from ..extern.configobj import configobj, validate from ..utils.exceptions import AstropyWarning, AstropyDeprecationWarning from ..utils import find_current_module from ..utils.introspection import resolve_name from ..utils.misc import InheritDocstrings from .paths import get_config_dir __all__ = ['ConfigurationItem', 'InvalidConfigurationItemWarning', 'ConfigurationMissingWarning', 'get_config', 'save_config', 'reload_config', 'ConfigNamespace', 'ConfigItem', 'ConfigAlias'] class InvalidConfigurationItemWarning(AstropyWarning): """ A Warning that is issued when the configuration value specified in the astropy configuration file does not match the type expected for that configuration value. """ class ConfigurationMissingWarning(AstropyWarning): """ A Warning that is issued when the configuration directory cannot be accessed (usually due to a permissions problem). If this warning appears, configuration items will be set to their defaults rather than read from the configuration file, and no configuration will persist across sessions. """ # these are not in __all__ because it's not intended that a user ever see them class ConfigurationDefaultMissingError(ValueError): """ An exception that is raised when the configuration defaults (which should be generated at build-time) are missing. """ # this is used in astropy/__init__.py class ConfigurationDefaultMissingWarning(AstropyWarning): """ A warning that is issued when the configuration defaults (which should be generated at build-time) are missing. """ class ConfigurationChangedWarning(AstropyWarning): """ A warning that the configuration options have changed. """ class _ConfigNamespaceMeta(type): def __init__(cls, name, bases, dict): if cls.__bases__[0] is object: return for key, val in six.iteritems(dict): if isinstance(val, ConfigItem): val.name = key @six.add_metaclass(_ConfigNamespaceMeta) class ConfigNamespace(object): """ A namespace of configuration items. Each subpackage with configuration items should define a subclass of this class, containing `ConfigItem` instances as members. For example:: class Conf(_config.ConfigNamespace): unicode_output = _config.ConfigItem( False, 'Use Unicode characters when outputting values, ...') use_color = _config.ConfigItem( sys.platform != 'win32', 'When True, use ANSI color escape sequences when ...', aliases=['astropy.utils.console.USE_COLOR']) conf = Conf() """ def set_temp(self, attr, value): """ Temporarily set a configuration value. Parameters ---------- attr : str Configuration item name value : object The value to set temporarily. Examples -------- >>> import astropy >>> with astropy.conf.set_temp('use_color', False): ... pass ... # console output will not contain color >>> # console output contains color again... """ if hasattr(self, attr): return self.__class__.__dict__[attr].set_temp(value) raise AttributeError("No configuration parameter '{0}'".format(attr)) def reload(self, attr=None): """ Reload a configuration item from the configuration file. Parameters ---------- attr : str, optional The name of the configuration parameter to reload. If not provided, reload all configuration parameters. """ if attr is not None: if hasattr(self, attr): return self.__class__.__dict__[attr].reload() raise AttributeError("No configuration parameter '{0}'".format(attr)) for item in six.itervalues(self.__class__.__dict__): if isinstance(item, ConfigItem): item.reload() def reset(self, attr=None): """ Reset a configuration item to its default. Parameters ---------- attr : str, optional The name of the configuration parameter to reload. If not provided, reset all configuration parameters. """ if attr is not None: if hasattr(self, attr): prop = self.__class__.__dict__[attr] prop.set(prop.defaultvalue) return raise AttributeError("No configuration parameter '{0}'".format(attr)) for item in six.itervalues(self.__class__.__dict__): if isinstance(item, ConfigItem): item.set(item.defaultvalue) @six.add_metaclass(InheritDocstrings) class ConfigItem(object): """ A setting and associated value stored in a configuration file. These objects should be created as members of `ConfigNamespace` subclasses, for example:: class _Conf(config.ConfigNamespace): unicode_output = config.ConfigItem( False, 'Use Unicode characters when outputting values, and writing widgets ' 'to the console.') conf = _Conf() Parameters ---------- defaultvalue : object, optional The default value for this item. If this is a list of strings, this item will be interpreted as an 'options' value - this item must be one of those values, and the first in the list will be taken as the default value. description : str or None, optional A description of this item (will be shown as a comment in the configuration file) cfgtype : str or None, optional A type specifier like those used as the *values* of a particular key in a ``configspec`` file of ``configobj``. If None, the type will be inferred from the default value. module : str or None, optional The full module name that this item is associated with. The first element (e.g. 'astropy' if this is 'astropy.config.configuration') will be used to determine the name of the configuration file, while the remaining items determine the section. If None, the package will be inferred from the package within whiich this object's initializer is called. aliases : str, or list of str, optional The deprecated location(s) of this configuration item. If the config item is not found at the new location, it will be searched for at all of the old locations. Raises ------ RuntimeError If ``module`` is `None`, but the module this item is created from cannot be determined. """ # this is used to make validation faster so a Validator object doesn't # have to be created every time _validator = validate.Validator() cfgtype = None """ A type specifier like those used as the *values* of a particular key in a ``configspec`` file of ``configobj``. """ def __init__(self, defaultvalue='', description=None, cfgtype=None, module=None, aliases=None): from ..utils import isiterable if module is None: module = find_current_module(2) if module is None: msg1 = 'Cannot automatically determine get_config module, ' msg2 = 'because it is not called from inside a valid module' raise RuntimeError(msg1 + msg2) else: module = module.__name__ self.module = module self.description = description self.__doc__ = description # now determine cfgtype if it is not given if cfgtype is None: if (isiterable(defaultvalue) and not isinstance(defaultvalue, six.string_types)): # it is an options list dvstr = [six.text_type(v) for v in defaultvalue] cfgtype = 'option(' + ', '.join(dvstr) + ')' defaultvalue = dvstr[0] elif isinstance(defaultvalue, bool): cfgtype = 'boolean' elif isinstance(defaultvalue, int): cfgtype = 'integer' elif isinstance(defaultvalue, float): cfgtype = 'float' elif isinstance(defaultvalue, six.string_types): cfgtype = 'string' defaultvalue = six.text_type(defaultvalue) self.cfgtype = cfgtype self._validate_val(defaultvalue) self.defaultvalue = defaultvalue if aliases is None: self.aliases = [] elif isinstance(aliases, six.string_types): self.aliases = [aliases] else: self.aliases = aliases def __set__(self, obj, value): return self.set(value) def __get__(self, obj, objtype=None): if obj is None: return self return self() def set(self, value): """ Sets the current value of this ``ConfigItem``. This also updates the comments that give the description and type information. Parameters ---------- value The value this item should be set to. Raises ------ TypeError If the provided ``value`` is not valid for this ``ConfigItem``. """ try: value = self._validate_val(value) except validate.ValidateError as e: msg = 'Provided value for configuration item {0} not valid: {1}' raise TypeError(msg.format(self.name, e.args[0])) sec = get_config(self.module) sec[self.name] = value @contextmanager def set_temp(self, value): """ Sets this item to a specified value only inside a with block. Use as:: ITEM = ConfigItem('ITEM', 'default', 'description') with ITEM.set_temp('newval'): #... do something that wants ITEM's value to be 'newval' ... print(ITEM) # ITEM is now 'default' after the with block Parameters ---------- value The value to set this item to inside the with block. """ initval = self() self.set(value) try: yield finally: self.set(initval) def reload(self): """ Reloads the value of this ``ConfigItem`` from the relevant configuration file. Returns ------- val The new value loaded from the configuration file. """ self.set(self.defaultvalue) baseobj = get_config(self.module, True) secname = baseobj.name cobj = baseobj # a ConfigObj's parent is itself, so we look for the parent with that while cobj.parent is not cobj: cobj = cobj.parent newobj = configobj.ConfigObj(cobj.filename, interpolation=False) if secname is not None: if secname not in newobj: return baseobj.get(self.name) newobj = newobj[secname] if self.name in newobj: baseobj[self.name] = newobj[self.name] return baseobj.get(self.name) def __repr__(self): out = '<{0}: name={1!r} value={2!r} at 0x{3:x}>'.format( self.__class__.__name__, self.name, self(), id(self)) return out def __str__(self): out = '\n'.join(('{0}: {1}', ' cfgtype={2!r}', ' defaultvalue={3!r}', ' description={4!r}', ' module={5}', ' value={6!r}')) out = out.format(self.__class__.__name__, self.name, self.cfgtype, self.defaultvalue, self.description, self.module, self()) return out def __call__(self): """ Returns the value of this ``ConfigItem`` Returns ------- val This item's value, with a type determined by the ``cfgtype`` attribute. Raises ------ TypeError If the configuration value as stored is not this item's type. """ def section_name(section): if section == '': return 'at the top-level' else: return 'in section [{0}]'.format(section) options = [] sec = get_config(self.module) if self.name in sec: options.append((sec[self.name], self.module, self.name)) for alias in self.aliases: module, name = alias.rsplit('.', 1) sec = get_config(module) if '.' in module: filename, module = module.split('.', 1) else: filename = module module = '' if name in sec: if '.' in self.module: new_module = self.module.split('.', 1)[1] else: new_module = '' warn( "Config parameter '{0}' {1} of the file '{2}' " "is deprecated. Use '{3}' {4} instead.".format( name, section_name(module), get_config_filename(filename), self.name, section_name(new_module)), AstropyDeprecationWarning) options.append((sec[name], module, name)) if len(options) == 0: self.set(self.defaultvalue) options.append((self.defaultvalue, None, None)) if len(options) > 1: filename, sec = self.module.split('.', 1) warn( "Config parameter '{0}' {1} of the file '{2}' is " "given by more than one alias ({3}). Using the first.".format( self.name, section_name(sec), get_config_filename(filename), ', '.join([ '.'.join(x[1:3]) for x in options if x[1] is not None])), AstropyDeprecationWarning) val = options[0][0] try: return self._validate_val(val) except validate.ValidateError as e: raise TypeError('Configuration value not valid:' + e.args[0]) def _validate_val(self, val): """ Validates the provided value based on cfgtype and returns the type-cast value throws the underlying configobj exception if it fails """ # note that this will normally use the *class* attribute `_validator`, # but if some arcane reason is needed for making a special one for an # instance or sub-class, it will be used return self._validator.check(self.cfgtype, val) class ConfigurationItem(ConfigItem): """ A backward-compatibility layer to support the old `ConfigurationItem` API. The only difference between this and ``ConfigItem`` is that this requires an explicit name to be set as the first argument. """ # REMOVE in astropy 0.5 def __init__(self, name, defaultvalue='', description=None, cfgtype=None, module=None, aliases=None): warn( "ConfigurationItem has been deprecated in astropy 0.4. " "Use ConfigItem objects as members of ConfigNamespace subclasses " "instead. See ConfigNamespace for an example.", AstropyDeprecationWarning) # We have to do the automatic module determination here, not # just in ConfigItem, otherwise the extra stack frame will # make it come up with the wrong answer. if module is None: module = find_current_module(2) if module is None: msg1 = 'Cannot automatically determine get_config module, ' msg2 = 'because it is not called from inside a valid module' raise RuntimeError(msg1 + msg2) else: module = module.__name__ super(ConfigurationItem, self).__init__( defaultvalue=defaultvalue, description=description, cfgtype=cfgtype, module=module, aliases=aliases) self.name = name def save(self, value=None): """ Removed in astropy 0.4. """ raise NotImplementedError( "The ability to save config options was removed in astropy 0.4. " "To change config settings, edit '{0}' directly.". format(get_config_filename(self.module))) class ConfigAlias(ConfigItem): """ A class that exists to support backward compatibility only. This is an alias for a `ConfigItem` that has been moved elsewhere. It inherits from `ConfigItem` only because it implements the same interface, not because any of the methods are reused. Parameters ---------- since : str The version in which the configuration item was moved. old_name : str The old name of the configuration item. This should be the name of the variable in Python, not in the configuration file. new_name : str The new name of the configuration item. This is both the name of the item in Python and in the configuration file (since as of astropy 0.4, those are always the same thing). old_module : str, optional A fully-qualified, dot-separated path to the module in which the configuration item used to be defined. If not provided, it is the name of the module in which `ConfigAlias` is called. new_module : str, optional A fully-qualified, dot-separated path to the module in which the configuration item is now defined. If not provided, it is the name of the module in which `ConfigAlias` is called. This string should not contain the ``.conf`` object. For example, if the new configuration item is in ``astropy.conf.use_unicode``, this value only needs to be ``'astropy'``. """ # REMOVE in astropy 0.5 def __init__(self, since, old_name, new_name, old_module=None, new_module=None): if old_module is None: old_module = find_current_module(2) if old_module is None: msg1 = 'Cannot automatically determine get_config module, ' msg2 = 'because it is not called from inside a valid module' raise RuntimeError(msg1 + msg2) else: old_module = old_module.__name__ if new_module is None: new_module = old_module self._since = since self._old_name = old_name self._new_name = new_name self._old_module = old_module self._new_module = new_module def _deprecation_warning(self): warn( "Since {0}, config parameter '{1}.{2}' is deprecated. " "Use '{3}.conf.{4}' instead.".format( self._since, self._old_module, self._old_name, self._new_module, self._new_name), AstropyDeprecationWarning) def _get_target(self): return resolve_name(self._new_module, 'conf') def set(self, value): self._deprecation_warning() setattr(self._get_target(), self._new_name, value) def set_temp(self, value): self._deprecation_warning() return self._get_target().set_temp(self._new_name, value) def save(self, value=None): self._deprecation_warning() return self._get_target().save(value) def reload(self): self._deprecation_warning() return self._get_target().reload(self._new_name) def __repr__(self): return repr(getattr(self._get_target().__class__, self._new_name)) def __str__(self): return str(getattr(self._get_target().__class__, self._new_name)) def __call__(self): self._deprecation_warning() return getattr(self._get_target(), self._new_name) # this dictionary stores the master copy of the ConfigObj's for each # root package _cfgobjs = {} def get_config_filename(packageormod=None): """ Get the filename of the config file associated with the given package or module. """ cfg = get_config(packageormod) while cfg.parent is not cfg: cfg = cfg.parent return cfg.filename # This is used by testing to override the config file, so we can test # with various config files that exercise different features of the # config system. _override_config_file = None def get_config(packageormod=None, reload=False): """ Gets the configuration object or section associated with a particular package or module. Parameters ----------- packageormod : str or None The package for which to retrieve the configuration object. If a string, it must be a valid package name, or if `None`, the package from which this function is called will be used. reload : bool, optional Reload the file, even if we have it cached. Returns ------- cfgobj : ``configobj.ConfigObj`` or ``configobj.Section`` If the requested package is a base package, this will be the ``configobj.ConfigObj`` for that package, or if it is a subpackage or module, it will return the relevant ``configobj.Section`` object. Raises ------ RuntimeError If ``packageormod`` is `None`, but the package this item is created from cannot be determined. """ if packageormod is None: packageormod = find_current_module(2) if packageormod is None: msg1 = 'Cannot automatically determine get_config module, ' msg2 = 'because it is not called from inside a valid module' raise RuntimeError(msg1 + msg2) else: packageormod = packageormod.__name__ packageormodspl = packageormod.split('.') rootname = packageormodspl[0] secname = '.'.join(packageormodspl[1:]) cobj = _cfgobjs.get(rootname, None) if cobj is None or reload: if _ASTROPY_SETUP_: # There's no reason to use anything but the default config cobj = configobj.ConfigObj(interpolation=False) else: cfgfn = None try: # This feature is intended only for use by the unit tests if _override_config_file is not None: cfgfn = _override_config_file else: cfgfn = path.join(get_config_dir(), rootname + '.cfg') cobj = configobj.ConfigObj(cfgfn, interpolation=False) except (IOError, OSError) as e: msg = ('Configuration defaults will be used due to ') errstr = '' if len(e.args) < 1 else (':' + str(e.args[0])) msg += e.__class__.__name__ + errstr msg += ' on {0}'.format(cfgfn) warn(ConfigurationMissingWarning(msg)) # This caches the object, so if the file becomes accessible, this # function won't see it unless the module is reloaded cobj = configobj.ConfigObj(interpolation=False) _cfgobjs[rootname] = cobj if secname: # not the root package if secname not in cobj: cobj[secname] = {} return cobj[secname] else: return cobj def save_config(packageormod=None, filename=None): """ Removed in astropy 0.4. """ raise NotImplementedError( "The ability to save config options was removed in astropy 0.4. " "To change config settings, edit '{0}' directly.". format(get_config_filename(packageormod))) def reload_config(packageormod=None): """ Reloads configuration settings from a configuration file for the root package of the requested package/module. This overwrites any changes that may have been made in `ConfigItem` objects. This applies for any items that are based on this file, which is determined by the *root* package of ``packageormod`` (e.g. ``'astropy.cfg'`` for the ``'astropy.config.configuration'`` module). Parameters ---------- packageormod : str or None The package or module name - see `get_config` for details. """ sec = get_config(packageormod, True) # look for the section that is its own parent - that's the base object while sec.parent is not sec: sec = sec.parent sec.reload() def is_unedited_config_file(content, template_content=None): """ Determines if a config file can be safely replaced because it doesn't actually contain any meaningful content. To meet this criteria, the config file must be either: - All comments or completely empty - An exact match to a "legacy" version of the config file prior to Astropy 0.4, when APE3 was implemented and the config file contained commented-out values by default. """ # We want to calculate the md5sum using universal line endings, so # that even if the files had their line endings converted to \r\n # on Windows, this will still work. content = content.encode('latin-1') # The jquery_url setting, present in 0.3.2 and later only, is # effectively auto-generated by the build system, so we need to # ignore it in the md5sum calculation for 0.3.2. content = re.sub(b'\njquery_url\s*=\s*[^\n]+', b'', content) # First determine if the config file has any effective content buffer = io.BytesIO(content) buffer.seek(0) raw_cfg = configobj.ConfigObj(buffer, interpolation=True) for v in six.itervalues(raw_cfg): if len(v): break else: return True # Now determine if it matches the md5sum of a known, unedited # config file. known_configs = set([ '7d4b4f1120304b286d71f205975b1286', # v0.3.2 '5df7e409425e5bfe7ed041513fda3288', # v0.3 '8355f99a01b3bdfd8761ef45d5d8b7e5', # v0.2 '4ea5a84de146dc3fcea2a5b93735e634' # v0.2.1, v0.2.2, v0.2.3, v0.2.4, v0.2.5 ]) md5 = hashlib.md5() md5.update(content) digest = md5.hexdigest() return digest in known_configs # this is not in __all__ because it's not intended that a user uses it def update_default_config(pkg, default_cfg_dir_or_fn, version=None): """ Checks if the configuration file for the specified package exists, and if not, copy over the default configuration. If the configuration file looks like it has already been edited, we do not write over it, but instead write a file alongside it named ``pkg.version.cfg`` as a "template" for the user. Parameters ---------- pkg : str The package to be updated. default_cfg_dir_or_fn : str The filename or directory name where the default configuration file is. If a directory name, ``'pkg.cfg'`` will be used in that directory. version : str, optional The current version of the given package. If not provided, it will be obtained from ``pkg.__version__``. Returns ------- updated : bool If the profile was updated, `True`, otherwise `False`. Raises ------ AttributeError If the version number of the package could not determined. """ if path.isdir(default_cfg_dir_or_fn): default_cfgfn = path.join(default_cfg_dir_or_fn, pkg + '.cfg') else: default_cfgfn = default_cfg_dir_or_fn if not path.isfile(default_cfgfn): # There is no template configuration file, which basically # means the affiliated package is not using the configuration # system, so just return. return False cfgfn = get_config(pkg).filename with io.open(default_cfgfn, 'rt', encoding='latin-1') as fr: template_content = fr.read() doupdate = False if cfgfn is not None: if path.exists(cfgfn): with io.open(cfgfn, 'rt', encoding='latin-1') as fd: content = fd.read() identical = (content == template_content) if not identical: doupdate = is_unedited_config_file( content, template_content) elif path.exists(path.dirname(cfgfn)): doupdate = True identical = False if version is None: version = resolve_name(pkg, '__version__') # Don't install template files for dev versions, or we'll end up # spamming `~/.astropy/config`. if not 'dev' in version and cfgfn is not None: template_path = path.join( get_config_dir(), '{0}.{1}.cfg'.format(pkg, version)) needs_template = not path.exists(template_path) else: needs_template = False if doupdate or needs_template: if needs_template: with io.open(template_path, 'wt', encoding='latin-1') as fw: fw.write(template_content) # If we just installed a new template file and we can't # update the main configuration file because it has user # changes, display a warning. if not identical and not doupdate: warn( "The configuration options in {0} {1} may have changed, " "your configuration file was not updated in order to " "preserve local changes. A new configuration template " "has been saved to '{2}'.".format( pkg, version, template_path), ConfigurationChangedWarning) if doupdate and not identical: with io.open(cfgfn, 'wt', encoding='latin-1') as fw: fw.write(template_content) return True return False # DEPRECATED FUNCTIONALITY ---------------------------------------- # Everything below this point should be removed in astropy 0.5 def get_config_items(packageormod=None): """ Returns the `ConfigurationItem` objects associated with a particular module. Parameters ---------- packageormod : str or None The package or module name or None to get the current module's items. Returns ------- configitems : dict A dictionary where the keys are the name of the items as the are named in the module, and the values are the associated `ConfigurationItem` objects. """ from ..utils import find_current_module if packageormod is None: packageormod = find_current_module(2) if packageormod is None: msg1 = 'Cannot automatically determine get_config module, ' msg2 = 'because it is not called from inside a valid module' raise RuntimeError(msg1 + msg2) elif isinstance(packageormod, six.string_types): __import__(packageormod) packageormod = sys.modules[packageormod] elif inspect.ismodule(packageormod): pass else: raise TypeError('packageormod in get_config_items is invalid') configitems = {} for n, obj in six.iteritems(packageormod.__dict__): # if it's not a new-style object, it's certainly not a ConfigurationItem if hasattr(obj, '__class__'): fqn = obj.__class__.__module__ + '.' + obj.__class__.__name__ if fqn == 'astropy.config.configuration.ConfigurationItem': configitems[n] = obj return configitems def _fix_section_blank_lines(sec, recurse=True, gotoroot=True): """ Adds a blank line to the comments of any sections in the requested sections, recursing into subsections if `recurse` is True. If `gotoroot` is True, this first goes to the root of the requested section, just like `save_config` and `reload_config` - this does nothing if `sec` is a configobj already. """ if not hasattr(sec, 'sections'): sec = get_config(sec) # look for the section that is its own parent - that's the base object if gotoroot: while sec.parent is not sec: sec = sec.parent for isec, snm in enumerate(sec.sections): comm = sec.comments[snm] if len(comm) == 0 or comm[-1] != '': if sec.parent is sec and isec == 0: pass # don't do it for first section else: comm.append('') if recurse: _fix_section_blank_lines(sec[snm], True, False) def _save_config(packageormod=None, filename=None): """ Saves all configuration settings to the configuration file for the root package of the requested package/module. This overwrites any configuration items that have been changed in `ConfigurationItem` objects that are based on the configuration file determined by the *root* package of ``packageormod`` (e.g. 'astropy.cfg' for the 'astropy.config.configuration' module). .. note:: To save only a single item, use the `ConfigurationItem.save` method - this will save all options in the current session that may have been changed. Parameters ---------- packageormod : str or None The package or module name - see `get_config` for details. filename : str, optional Save the config to a given filename instead of to the default location. """ sec = get_config(packageormod) # look for the section that is its own parent - that's the base object while sec.parent is not sec: sec = sec.parent if filename is not None: with io.open(filename, 'w', encoding='utf-8') as f: sec.write(outfile=f) else: sec.write() def generate_all_config_items(pkgornm=None, reset_to_default=False, filename=None): """ Given a root package name or package, this function walks through all the subpackages and modules, which should populate any ConfigurationItem objects defined at the module level. If `reset_to_default` is True, it also sets all of the items to their default values, regardless of what the file's value currently is. It then saves the `ConfigObj`. Parameters ---------- pkgname : str, module, or None The package for which to generate configuration items. If None, the package of the function that calls this one will be used. reset_to_default : bool If True, the configuration items will all be set to their defaults. filename : str, optional Save the generated config items to the given filename instead of to the default config file path. Returns ------- cfgfn : str The filename of the generated configuration item. """ from ..utils import find_current_module unsafe_import_regex = [r'.*.setup_package'] unsafe_import_regex = [('(' + pat + ')') for pat in _unsafe_import_regex] unsafe_import_regex = re.compile('|'.join(_unsafe_import_regex)) if pkgornm is None: pkgornm = find_current_module(1).__name__.split('.')[0] if isinstance(pkgornm, six.string_types): package = pkgutil.get_loader(pkgornm).load_module(pkgornm) elif (isinstance(pkgornm, types.ModuleType) and '__init__' in pkgornm.__file__): package = pkgornm else: msg = 'generate_all_config_items was not given a package/package name' raise TypeError(msg) if hasattr(package, '__path__'): pkgpath = package.__path__ elif hasattr(package, '__file__'): pkgpath = path.split(package.__file__)[0] else: raise AttributeError('package to generate config items for does not ' 'have __file__ or __path__') prefix = package.__name__ + '.' for imper, nm, ispkg in pkgutil.walk_packages(pkgpath, prefix): if nm == 'astropy.config.tests.test_configs': continue if not unsafe_import_regex.match(nm): imper.find_module(nm) if reset_to_default: for cfgitem in six.itervalues(get_config_items(nm)): cfgitem.set(cfgitem.defaultvalue) _fix_section_blank_lines(package.__name__, True, True) _save_config(package.__name__, filename=filename) if filename is None: return get_config(package.__name__).filename else: return filename astropy-1.1.1/astropy/config/__init__.py0000644001134200020070000000063412640262015021177 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains configuration and setup utilities for the Astropy project. This includes all functionality related to the affiliated package index. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from .paths import * from .configuration import * from .affiliated import * astropy-1.1.1/astropy/utils/0000755001134200020070000000000012644022135016757 5ustar embrayscience00000000000000astropy-1.1.1/astropy/utils/src/0000755001134200020070000000000012644022135017546 5ustar embrayscience00000000000000astropy-1.1.1/astropy/utils/src/compiler.c0000644001134200020070000000573112602615527021541 0ustar embrayscience00000000000000#include /*************************************************************************** * Macros for determining the compiler version. * * These are borrowed from boost, and majorly abridged to include only * the compilers we care about. ***************************************************************************/ #ifndef PY3K #if PY_MAJOR_VERSION >= 3 #define PY3K 1 #else #define PY3K 0 #endif #endif #define STRINGIZE(X) DO_STRINGIZE(X) #define DO_STRINGIZE(X) #X #if defined __clang__ /* Clang C++ emulates GCC, so it has to appear early. */ # define COMPILER "Clang version " __clang_version__ #elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) /* Intel */ # if defined(__INTEL_COMPILER) # define INTEL_VERSION __INTEL_COMPILER # elif defined(__ICL) # define INTEL_VERSION __ICL # elif defined(__ICC) # define INTEL_VERSION __ICC # elif defined(__ECC) # define INTEL_VERSION __ECC # endif # define COMPILER "Intel C compiler version " STRINGIZE(INTEL_VERSION) #elif defined(__GNUC__) /* gcc */ # define COMPILER "GCC version " __VERSION__ #elif defined(__SUNPRO_CC) /* Sun Workshop Compiler */ # define COMPILER "Sun compiler version " STRINGIZE(__SUNPRO_CC) #elif defined(_MSC_VER) /* Microsoft Visual C/C++ Must be last since other compilers define _MSC_VER for compatibility as well */ # if _MSC_VER < 1200 # define COMPILER_VERSION 5.0 # elif _MSC_VER < 1300 # define COMPILER_VERSION 6.0 # elif _MSC_VER == 1300 # define COMPILER_VERSION 7.0 # elif _MSC_VER == 1310 # define COMPILER_VERSION 7.1 # elif _MSC_VER == 1400 # define COMPILER_VERSION 8.0 # elif _MSC_VER == 1500 # define COMPILER_VERSION 9.0 # elif _MSC_VER == 1600 # define COMPILER_VERSION 10.0 # else # define COMPILER_VERSION _MSC_VER # endif # define COMPILER "Microsoft Visual C++ version " STRINGIZE(COMPILER_VERSION) #else /* Fallback */ # define COMPILER "Unknown compiler" #endif /*************************************************************************** * Module-level ***************************************************************************/ struct module_state { /* The Sun compiler can't handle empty structs */ #if defined(__SUNPRO_C) || defined(_MSC_VER) int _dummy; #endif }; #if PY3K static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, "_compiler", NULL, sizeof(struct module_state), NULL, NULL, NULL, NULL, NULL }; #define INITERROR return NULL PyMODINIT_FUNC PyInit__compiler(void) #else #define INITERROR return PyMODINIT_FUNC init_compiler(void) #endif { PyObject* m; #if PY3K m = PyModule_Create(&moduledef); #else m = Py_InitModule3("_compiler", NULL, NULL); #endif if (m == NULL) INITERROR; PyModule_AddStringConstant(m, "compiler", COMPILER); #if PY3K return m; #endif } astropy-1.1.1/astropy/utils/codegen.py0000644001134200020070000001115012640262015020732 0ustar embrayscience00000000000000# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """Utilities for generating new Python code at runtime.""" from __future__ import (absolute_import, division, print_function, unicode_literals) import inspect import itertools import keyword import os import re import textwrap from .introspection import find_current_module from ..extern import six __all__ = ['make_function_with_signature'] _ARGNAME_RE = re.compile(r'^[A-Za-z][A-Za-z_]*') """ Regular expression used my make_func which limits the allowed argument names for the created function. Only valid Python variable names in the ASCII range and not beginning with '_' are allowed, currently. """ def make_function_with_signature(func, args=(), kwargs={}, varargs=None, varkwargs=None, name=None): """ Make a new function from an existing function but with the desired signature. The desired signature must of course be compatible with the arguments actually accepted by the input function. The ``args`` are strings that should be the names of the positional arguments. ``kwargs`` can map names of keyword arguments to their default values. It may be either a ``dict`` or a list of ``(keyword, default)`` tuples. If ``varargs`` is a string it is added to the positional arguments as ``*``. Likewise ``varkwargs`` can be the name for a variable keyword argument placeholder like ``**``. If not specified the name of the new function is taken from the original function. Otherwise, the ``name`` argument can be used to specify a new name. Note, the names may only be valid Python variable names. """ pos_args = [] key_args = [] if six.PY2 and varargs and kwargs: raise SyntaxError('keyword arguments not allowed after ' '*{0}'.format(varargs)) if isinstance(kwargs, dict): iter_kwargs = six.iteritems(kwargs) else: iter_kwargs = iter(kwargs) # Check that all the argument names are valid for item in itertools.chain(args, iter_kwargs): if isinstance(item, tuple): argname = item[0] key_args.append(item) else: argname = item pos_args.append(item) if keyword.iskeyword(argname) or not _ARGNAME_RE.match(argname): raise SyntaxError('invalid argument name: {0}'.format(argname)) for item in (varargs, varkwargs): if item is not None: if keyword.iskeyword(item) or not _ARGNAME_RE.match(item): raise SyntaxError('invalid argument name: {0}'.format(item)) def_signature = [', '.join(pos_args)] if varargs: def_signature.append(', *{0}'.format(varargs)) call_signature = def_signature[:] if name is None: name = func.__name__ global_vars = {'__{0}__func'.format(name): func} local_vars = {} # Make local variables to handle setting the default args for idx, item in enumerate(key_args): key, value = item default_var = '_kwargs{0}'.format(idx) local_vars[default_var] = value def_signature.append(', {0}={1}'.format(key, default_var)) call_signature.append(', {0}={0}'.format(key)) if varkwargs: def_signature.append(', **{0}'.format(varkwargs)) call_signature.append(', **{0}'.format(varkwargs)) def_signature = ''.join(def_signature).lstrip(', ') call_signature = ''.join(call_signature).lstrip(', ') mod = find_current_module(2) frm = inspect.currentframe().f_back if mod: filename = mod.__file__ modname = mod.__name__ if filename.endswith('.pyc'): filename = os.path.splitext(filename)[0] + '.py' else: filename = '' modname = '__main__' # Subtract 2 from the line number since the length of the template itself # is two lines. Therefore we have to subtract those off in order for the # pointer in tracebacks from __{name}__func to point to the right spot. lineno = frm.f_lineno - 2 # The lstrip is in case there were *no* positional arguments (a rare case) # in any context this will actually be used... template = textwrap.dedent("""{0}\ def {name}({sig1}): return __{name}__func({sig2}) """.format('\n' * lineno, name=name, sig1=def_signature, sig2=call_signature)) code = compile(template, filename, 'single') eval(code, global_vars, local_vars) new_func = local_vars[name] new_func.__module__ = modname new_func.__doc__ = func.__doc__ return new_func astropy-1.1.1/astropy/utils/xml/0000755001134200020070000000000012644022135017557 5ustar embrayscience00000000000000astropy-1.1.1/astropy/utils/xml/src/0000755001134200020070000000000012644022135020346 5ustar embrayscience00000000000000astropy-1.1.1/astropy/utils/xml/src/iterparse.c0000644001134200020070000011415512644017723022526 0ustar embrayscience00000000000000/****************************************************************************** * C extension code for astropy.utils.xml.iterparse * * Everything in this file has an alternate Python implementation and * is included for performance reasons only. * * It has two main parts: * * - An IterParser object which parses an XML file using the expat * library, feeding expat events through a Python iterator. It is * faster and more memory efficient than the alternatives in the * Python standard library because it does not build a tree of * objects, and also throws away most text nodes, since for * astropy.io.votable (the primary user of this library) we only * care about simple text nodes contained between a single pair of * open/close element nodes. It also has an optimization for * recognizing the most commonly occuring element in a VO file, * "TD". * * - Two functions, escape_xml() and escape_xml_cdata() that escape * XML much faster than the alternatives in the Python standard * library. ******************************************************************************/ #include #include "structmember.h" #include "expat.h" /****************************************************************************** * Convenience macros and functions ******************************************************************************/ #ifdef _MSC_VER #define inline #endif #undef CLAMP #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) static Py_ssize_t next_power_of_2(Py_ssize_t n) { /* Calculate the next-highest power of two */ n--; n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; n++; return n; } /****************************************************************************** * Python version compatibility macros ******************************************************************************/ #if PY_MAJOR_VERSION >= 3 # define IS_PY3K #endif # ifndef Py_TYPE # define Py_TYPE(o) ((o)->ob_type) # endif #if BYTEORDER == 1234 # define TD_AS_INT 0x00004454 # define TD_AS_INT_MASK 0x00ffffff #else # define TD_AS_INT 0x54440000 # define TD_AS_INT_MASK 0xffffff00 #endif /* Clang doesn't like the hackish stuff PyTuple_SET_ITEM does... */ #ifdef __clang__ #undef PyTuple_SET_ITEM #define PyTuple_SET_ITEM(a, b, c) PyTuple_SetItem((a), (b), (c)) #endif /****************************************************************************** * IterParser type ******************************************************************************/ typedef struct { PyObject_HEAD XML_Parser parser; /* The expat parser */ int done; /* True when expat parser has read to EOF */ /* File-like object reading */ PyObject* fd; /* Python file object */ int file; /* C file descriptor */ PyObject* read; /* The read method on the file object */ ssize_t buffersize; /* The size of the read buffer */ XML_Char* buffer; /* The read buffer */ /* Text nodes */ Py_ssize_t text_alloc; /* The allocated size of the text buffer */ Py_ssize_t text_size; /* The size of the content in the text buffer */ XML_Char* text; /* Text buffer (for returning text nodes) */ int keep_text; /* Flag: keep appending text chunks to the current text node */ /* XML event queue */ PyObject** queue; Py_ssize_t queue_size; Py_ssize_t queue_read_idx; Py_ssize_t queue_write_idx; /* Store the last Python exception so it can be returned when dequeing events */ PyObject* error_type; PyObject* error_value; PyObject* error_traceback; /* Store the position for any XML exceptions that may be returned later */ unsigned long last_line; unsigned long last_col; /* "Constants" for efficiency */ PyObject* dict_singleton; /* Empty dict */ PyObject* td_singleton; /* String "TD" */ PyObject* read_args; /* (buffersize) */ } IterParser; /****************************************************************************** * Text buffer ******************************************************************************/ /** * Reallocate text buffer to the next highest power of two that fits the * requested size. */ static int text_realloc(IterParser *self, Py_ssize_t req_size) { Py_ssize_t n = req_size; char *new_mem = NULL; if (req_size < self->text_alloc) { return 0; } /* Calculate the next-highest power of two */ n = next_power_of_2(n); if (n < req_size) { PyErr_SetString(PyExc_MemoryError, "Out of memory for XML text."); return -1; } new_mem = malloc(n * sizeof(XML_Char)); if (new_mem == NULL) { PyErr_SetString(PyExc_MemoryError, "Out of memory for XML text."); return -1; } memcpy(new_mem, self->text, (size_t)(self->text_size + 1) * sizeof(XML_Char)); free(self->text); self->text = new_mem; self->text_alloc = n; return 0; } #define IS_WHITESPACE(c) ((c) == (XML_Char)0x20 || \ (c) == (XML_Char)0x0d || \ (c) == (XML_Char)0x0a || \ (c) == (XML_Char)0x09) /* * Append text to the text buffer. * * For the first chunk of text, all whitespace characters before the * first non-whitespace character are stripped. This saves time * stripping on the Python side later. */ static int text_append(IterParser *self, const XML_Char *data, Py_ssize_t len) { Py_ssize_t new_size; if (len == 0) { return 0; } /* If this is the first chunk, handle whitespace */ if (self->text_size == 0) { while (len && IS_WHITESPACE(*data)) { ++data; --len; } } /* Grow text buffer if necessary */ new_size = self->text_size + len; if (text_realloc(self, new_size + 1)) { return -1; } memcpy(self->text + self->text_size, data, (size_t)len * sizeof(XML_Char)); self->text_size = new_size; self->text[self->text_size] = (XML_Char)0x0; return 0; } /* * Erase all content from the text buffer. */ static void text_clear(IterParser *self) { self->text[0] = (XML_Char)0; self->text_size = 0; } /****************************************************************************** * XML event handling ******************************************************************************/ /* * Make a "position tuple" from the current expat parser state. This * is used to communicate the position of the parser within the file * to the Python side for generation of meaningful error messages. * * It is of the form (line, col), where line and col are both PyInts. */ static inline PyObject* make_pos(const IterParser *self) { return Py_BuildValue( "(nn)", (size_t)self->last_line, (size_t)self->last_col); } /* * Removes the namespace from an element or attribute name, that is, * remove everything before the first colon. The namespace is not * needed to parse standards-compliant VOTable files. * * The returned pointer is an internal pointer to the buffer passed * in. */ static const XML_Char * remove_namespace(const XML_Char *name) { const XML_Char* name_start = NULL; /* If there is a namespace specifier, just chop it off */ for (name_start = name; *name_start != '\0'; ++name_start) { if (*name_start == ':') { break; } } if (*name_start == ':') { ++name_start; } else { name_start = name; } return name_start; } /* * Handle the expat startElement event. */ static void startElement(IterParser *self, const XML_Char *name, const XML_Char **atts) { PyObject* pyname = NULL; PyObject* pyatts = NULL; const XML_Char** att_ptr = atts; const XML_Char* name_start = NULL; PyObject* tuple = NULL; PyObject* key = NULL; PyObject* val = NULL; PyObject* pos = NULL; /* If we've already had an error in a previous call, don't make things worse. */ if (PyErr_Occurred() != NULL) { XML_StopParser(self->parser, 0); return; } /* Don't overflow the queue -- in practice this should *never* happen */ if (self->queue_write_idx < self->queue_size) { tuple = PyTuple_New(4); if (tuple == NULL) { goto fail; } Py_INCREF(Py_True); PyTuple_SET_ITEM(tuple, 0, Py_True); /* This is an egregious but effective optimization. Since by far the most frequently occurring element name in a large VOTABLE file is TD, we explicitly check for it here with integer comparison to avoid the lookup in the interned string table in PyString_InternFromString, and return a singleton string for "TD" */ if ((*(int*)name & TD_AS_INT_MASK) == TD_AS_INT) { Py_INCREF(self->td_singleton); PyTuple_SetItem(tuple, 1, self->td_singleton); } else { name_start = remove_namespace(name); pyname = PyUnicode_FromString(name_start); if (pyname == NULL) { goto fail; } PyTuple_SetItem(tuple, 1, pyname); pyname = NULL; } if (*att_ptr) { pyatts = PyDict_New(); if (pyatts == NULL) { goto fail; } do { if (*(*(att_ptr + 1)) != 0) { /* Python < 2.6.5 can't handle unicode keyword arguments. Since those were coming from here (the dictionary of attributes), we use byte strings for the keys instead. Should be fine for VOTable, since it has ascii attribute names, but that's not true of XML in general. */ #if PY_VERSION_HEX < 0x02060500 /* Due to Python issue #4978 */ key = PyBytes_FromString(*att_ptr); #else key = PyUnicode_FromString(*att_ptr); #endif if (key == NULL) { goto fail; } val = PyUnicode_FromString(*(att_ptr + 1)); if (val == NULL) { Py_DECREF(key); goto fail; } if (PyDict_SetItem(pyatts, key, val)) { Py_DECREF(key); Py_DECREF(val); goto fail; } Py_DECREF(key); Py_DECREF(val); key = val = NULL; } att_ptr += 2; } while (*att_ptr); } else { Py_INCREF(self->dict_singleton); pyatts = self->dict_singleton; } PyTuple_SetItem(tuple, 2, pyatts); pyatts = NULL; self->last_line = (unsigned long)XML_GetCurrentLineNumber( self->parser); self->last_col = (unsigned long)XML_GetCurrentColumnNumber( self->parser); pos = make_pos(self); if (pos == NULL) { goto fail; } PyTuple_SetItem(tuple, 3, pos); pos = NULL; text_clear(self); self->keep_text = 1; self->queue[self->queue_write_idx++] = tuple; } else { PyErr_SetString( PyExc_RuntimeError, "XML queue overflow in startElement. This most likely indicates an internal bug."); goto fail; } return; fail: Py_XDECREF(tuple); Py_XDECREF(pyatts); XML_StopParser(self->parser, 0); } /* * Handle the expat endElement event. */ static void endElement(IterParser *self, const XML_Char *name) { PyObject* pyname = NULL; PyObject* tuple = NULL; PyObject* pytext = NULL; const XML_Char* name_start = NULL; XML_Char* end; PyObject* pos = NULL; /* If we've already had an error in a previous call, don't make things worse. */ if (PyErr_Occurred() != NULL) { XML_StopParser(self->parser, 0); return; } /* Don't overflow the queue -- in practice this should *never* happen */ if (self->queue_write_idx < self->queue_size) { tuple = PyTuple_New(4); if (tuple == NULL) { goto fail; } Py_INCREF(Py_False); PyTuple_SET_ITEM(tuple, 0, Py_False); /* This is an egregious but effective optimization. Since by far the most frequently occurring element name in a large VOTABLE file is TD, we explicitly check for it here with integer comparison to avoid the lookup in the interned string table in PyString_InternFromString, and return a singleton string for "TD" */ if ((*(int*)name & TD_AS_INT_MASK) == TD_AS_INT) { Py_INCREF(self->td_singleton); PyTuple_SetItem(tuple, 1, self->td_singleton); } else { name_start = remove_namespace(name); pyname = PyUnicode_FromString(name_start); if (pyname == NULL) { goto fail; } PyTuple_SetItem(tuple, 1, pyname); pyname = NULL; } /* Cut whitespace off the end of the string */ end = self->text + self->text_size - 1; while (end >= self->text && IS_WHITESPACE(*end)) { --end; --self->text_size; } pytext = PyUnicode_FromStringAndSize(self->text, self->text_size); if (pytext == NULL) { goto fail; } PyTuple_SetItem(tuple, 2, pytext); pytext = NULL; pos = make_pos(self); if (pos == NULL) { goto fail; } PyTuple_SetItem(tuple, 3, pos); pos = NULL; self->keep_text = 0; self->queue[self->queue_write_idx++] = tuple; } else { PyErr_SetString( PyExc_RuntimeError, "XML queue overflow in endElement. This most likely indicates an internal bug."); goto fail; } return; fail: Py_XDECREF(tuple); XML_StopParser(self->parser, 0); } /* * Handle the expat characterData event. */ static void characterData(IterParser *self, const XML_Char *text, int len) { /* If we've already had an error in a previous call, don't make things worse. */ if (PyErr_Occurred() != NULL) { XML_StopParser(self->parser, 0); return; } if (self->text_size == 0) { self->last_line = (unsigned long)XML_GetCurrentLineNumber( self->parser); self->last_col = (unsigned long)XML_GetCurrentColumnNumber( self->parser); } if (self->keep_text) { (void)text_append(self, text, (Py_ssize_t)len); } } /* * Handle the XML declaration so that we can determine its encoding. */ static void xmlDecl(IterParser *self, const XML_Char *version, const XML_Char *encoding, int standalone) { PyObject* tuple = NULL; PyObject* xml_str = NULL; PyObject* attrs = NULL; PyObject* encoding_str = NULL; PyObject* version_str = NULL; PyObject* pos = NULL; if (self->queue_write_idx < self->queue_size) { tuple = PyTuple_New(4); if (tuple == NULL) { goto fail; } Py_INCREF(Py_True); PyTuple_SET_ITEM(tuple, 0, Py_True); xml_str = PyUnicode_FromString("xml"); if (xml_str == NULL) { goto fail; } PyTuple_SET_ITEM(tuple, 1, xml_str); xml_str = NULL; attrs = PyDict_New(); if (attrs == NULL) { goto fail; } if (encoding) { encoding_str = PyUnicode_FromString(encoding); } else { encoding_str = PyUnicode_FromString(""); } if (encoding_str == NULL) { goto fail; } if (PyDict_SetItemString(attrs, "encoding", encoding_str)) { Py_DECREF(encoding_str); goto fail; } Py_DECREF(encoding_str); encoding_str = NULL; if (version) { version_str = PyUnicode_FromString(version); } else { version_str = PyUnicode_FromString(""); } if (version_str == NULL) { goto fail; } if (PyDict_SetItemString(attrs, "version", version_str)) { Py_DECREF(version_str); goto fail; } Py_DECREF(version_str); version_str = NULL; PyTuple_SET_ITEM(tuple, 2, attrs); attrs = NULL; self->last_line = (unsigned long)XML_GetCurrentLineNumber( self->parser); self->last_col = (unsigned long)XML_GetCurrentColumnNumber( self->parser); pos = make_pos(self); if (pos == NULL) { goto fail; } PyTuple_SetItem(tuple, 3, pos); pos = NULL; self->queue[self->queue_write_idx++] = tuple; } else { PyErr_SetString( PyExc_RuntimeError, "XML queue overflow in xmlDecl. This most likely indicates an internal bug."); goto fail; } return; fail: Py_XDECREF(tuple); Py_XDECREF(attrs); XML_StopParser(self->parser, 0); } /* * The object itself is an iterator, just return self for "iter(self)" * on the Python side. */ static PyObject * IterParser_iter(IterParser* self) { Py_INCREF(self); return (PyObject*) self; } /* * Get the next element from the iterator. * * The expat event handlers above (startElement, endElement, characterData) add * elements to the queue, which are then dequeued by this method. * * Care must be taken to store and later raise exceptions. Any * exceptions raised in the expat callbacks must be stored and then * later thrown once the queue is emptied, otherwise the exception is * raised "too early" in queue order. */ static PyObject * IterParser_next(IterParser* self) { PyObject* data = NULL; XML_Char* buf; Py_ssize_t buflen; /* Is there anything in the queue to return? */ if (self->queue_read_idx < self->queue_write_idx) { return self->queue[self->queue_read_idx++]; } /* Now that the queue is empty, is there an error we need to raise? */ if (self->error_type) { PyErr_Restore(self->error_type, self->error_value, self->error_traceback); self->error_type = NULL; self->error_value = NULL; self->error_traceback = NULL; return NULL; } /* The queue is empty -- have we already fed the entire file to expat? If so, we are done and indicate the end of the iterator by simply returning NULL. */ if (self->done) { return NULL; } self->queue_read_idx = 0; self->queue_write_idx = 0; do { /* Handle a generic Python read method */ if (self->read) { data = PyObject_CallObject(self->read, self->read_args); if (data == NULL) { goto fail; } if (PyBytes_AsStringAndSize(data, &buf, &buflen) == -1) { Py_DECREF(data); goto fail; } if (buflen < self->buffersize) { self->done = 1; } /* Handle a real C file descriptor or handle -- this is faster if we've got one. */ } else { buflen = (Py_ssize_t)read( self->file, self->buffer, (size_t)self->buffersize); if (buflen == -1) { PyErr_SetFromErrno(PyExc_IOError); goto fail; } else if (buflen < self->buffersize) { self->done = 1; } buf = self->buffer; } /* Feed the read buffer to expat, which will call the event handlers */ if (XML_Parse(self->parser, buf, (int)buflen, self->done) == XML_STATUS_ERROR) { /* One of the event handlers raised a Python error, make note of it -- it won't be thrown until the queue is emptied. */ if (PyErr_Occurred() != NULL) { goto fail; } /* expat raised an error, make note of it -- it won't be thrown until the queue is emptied. */ Py_XDECREF(data); PyErr_Format( PyExc_ValueError, "%lu:%lu: %s", XML_GetCurrentLineNumber(self->parser), XML_GetCurrentColumnNumber(self->parser), XML_ErrorString(XML_GetErrorCode(self->parser))); goto fail; } Py_XDECREF(data); if (PyErr_Occurred() != NULL) { goto fail; } } while (self->queue_write_idx == 0 && self->done == 0); if (self->queue_write_idx == 0) { return NULL; } if (self->queue_write_idx >= self->queue_size) { PyErr_SetString( PyExc_RuntimeError, "XML queue overflow. This most likely indicates an internal bug."); return NULL; } return self->queue[self->queue_read_idx++]; fail: /* We got an exception somewhere along the way. Store the exception in the IterParser object, but clear the exception in the Python interpreter, so we can empty the event queue and raise the exception later. */ PyErr_Fetch(&self->error_type, &self->error_value, &self->error_traceback); PyErr_Clear(); if (self->queue_read_idx < self->queue_write_idx) { return self->queue[self->queue_read_idx++]; } PyErr_Restore(self->error_type, self->error_value, self->error_traceback); self->error_type = NULL; self->error_value = NULL; self->error_traceback = NULL; return NULL; } /****************************************************************************** * IterParser object lifetime ******************************************************************************/ /* To support cyclical garbage collection, all PyObject's must be visited. */ static int IterParser_traverse(IterParser *self, visitproc visit, void *arg) { int vret; Py_ssize_t read_index; read_index = self->queue_read_idx; while (read_index < self->queue_write_idx) { vret = visit(self->queue[read_index++], arg); if (vret != 0) return vret; } if (self->fd) { vret = visit(self->fd, arg); if (vret != 0) return vret; } if (self->read) { vret = visit(self->read, arg); if (vret != 0) return vret; } if (self->read_args) { vret = visit(self->read_args, arg); if (vret != 0) return vret; } if (self->dict_singleton) { vret = visit(self->dict_singleton, arg); if (vret != 0) return vret; } if (self->td_singleton) { vret = visit(self->td_singleton, arg); if (vret != 0) return vret; } if (self->error_type) { vret = visit(self->error_type, arg); if (vret != 0) return vret; } if (self->error_value) { vret = visit(self->error_value, arg); if (vret != 0) return vret; } if (self->error_traceback) { vret = visit(self->error_traceback, arg); if (vret != 0) return vret; } return 0; } /* To support cyclical garbage collection */ static int IterParser_clear(IterParser *self) { PyObject *tmp; while (self->queue_read_idx < self->queue_write_idx) { tmp = self->queue[self->queue_read_idx]; self->queue[self->queue_read_idx] = NULL; Py_XDECREF(tmp); self->queue_read_idx++; } tmp = self->fd; self->fd = NULL; Py_XDECREF(tmp); tmp = self->read; self->read = NULL; Py_XDECREF(tmp); tmp = self->read_args; self->read_args = NULL; Py_XDECREF(tmp); tmp = self->dict_singleton; self->dict_singleton = NULL; Py_XDECREF(tmp); tmp = self->td_singleton; self->td_singleton = NULL; Py_XDECREF(tmp); tmp = self->error_type; self->error_type = NULL; Py_XDECREF(tmp); tmp = self->error_value; self->error_value = NULL; Py_XDECREF(tmp); tmp = self->error_traceback; self->error_traceback = NULL; Py_XDECREF(tmp); return 0; } /* * Deallocate the IterParser object. For the internal PyObject*, just * punt to IterParser_clear. */ static void IterParser_dealloc(IterParser* self) { IterParser_clear(self); free(self->buffer); self->buffer = NULL; free(self->queue); self->queue = NULL; free(self->text); self->text = NULL; if (self->parser != NULL) { XML_ParserFree(self->parser); self->parser = NULL; } Py_TYPE(self)->tp_free((PyObject*)self); } /* * Initialize the memory for an IterParser object */ static PyObject * IterParser_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { IterParser *self = NULL; self = (IterParser *)type->tp_alloc(type, 0); if (self != NULL) { self->parser = NULL; self->fd = NULL; self->file = -1; self->read = NULL; self->read_args = NULL; self->dict_singleton = NULL; self->td_singleton = NULL; self->buffersize = 0; self->buffer = NULL; self->queue_read_idx = 0; self->queue_write_idx = 0; self->text_alloc = 0; self->text_size = 0; self->text = NULL; self->keep_text = 0; self->done = 0; self->queue_size = 0; self->queue = NULL; self->error_type = NULL; self->error_value = NULL; self->error_traceback = NULL; } return (PyObject *)self; } /* * Initialize an IterParser object * * The Python arguments are: * * *fd*: A Python file object or a callable object * *buffersize*: The size of the read buffer */ static int IterParser_init(IterParser *self, PyObject *args, PyObject *kwds) { PyObject* fd = NULL; PyObject* read = NULL; ssize_t buffersize = 1 << 14; static char *kwlist[] = {"fd", "buffersize", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|n:IterParser.__init__", kwlist, &fd, &buffersize)) { return -1; } /* Keep the buffersize within a reasonable range */ self->buffersize = CLAMP(buffersize, (ssize_t)(1 << 10), (ssize_t)(1 << 24)); #ifdef __clang__ /* Clang can't handle the file descriptors Python gives us, so in that case, we just call the object's read method. */ read = PyObject_GetAttrString(fd, "read"); if (read != NULL) { fd = read; } #else self->file = PyObject_AsFileDescriptor(fd); if (self->file != -1) { /* This is a real C file handle or descriptor. We therefore need to allocate our own read buffer, and get the real C object. */ self->buffer = malloc((size_t)self->buffersize); if (self->buffer == NULL) { PyErr_SetString(PyExc_MemoryError, "Out of memory"); goto fail; } self->fd = fd; Py_INCREF(self->fd); lseek(self->file, 0, SEEK_SET); } else #endif if (PyCallable_Check(fd)) { /* fd is a Python callable */ self->fd = fd; Py_INCREF(self->fd); self->read = fd; Py_INCREF(self->read); } else { PyErr_SetString( PyExc_TypeError, "Arg 1 to iterparser must be a file object or callable object"); goto fail; } PyErr_Clear(); self->queue_read_idx = 0; self->queue_write_idx = 0; self->done = 0; self->text = malloc((size_t)buffersize * sizeof(XML_Char)); self->text_alloc = buffersize; if (self->text == NULL) { PyErr_SetString(PyExc_MemoryError, "Out of memory"); goto fail; } text_clear(self); self->read_args = Py_BuildValue("(n)", buffersize); if (self->read_args == NULL) { goto fail; } self->dict_singleton = PyDict_New(); if (self->dict_singleton == NULL) { goto fail; } self->td_singleton = PyUnicode_FromString("TD"); if (self->td_singleton == NULL) { goto fail; } self->queue_size = buffersize / 2; self->queue = malloc(sizeof(PyObject*) * (size_t)self->queue_size); if (self->queue == NULL) { PyErr_SetString(PyExc_MemoryError, "Out of memory"); goto fail; } /* Set up an expat parser with our callbacks */ self->parser = XML_ParserCreate(NULL); if (self->parser == NULL) { PyErr_SetString(PyExc_MemoryError, "Out of memory"); goto fail; } XML_SetUserData(self->parser, self); XML_SetElementHandler( self->parser, (XML_StartElementHandler)startElement, (XML_EndElementHandler)endElement); XML_SetCharacterDataHandler( self->parser, (XML_CharacterDataHandler)characterData); XML_SetXmlDeclHandler( self->parser, (XML_XmlDeclHandler)xmlDecl); Py_XDECREF(read); return 0; fail: Py_XDECREF(read); Py_XDECREF(self->fd); Py_XDECREF(self->read); free(self->text); Py_XDECREF(self->dict_singleton); Py_XDECREF(self->td_singleton); Py_XDECREF(self->read_args); free(self->queue); return -1; } static PyMemberDef IterParser_members[] = { {NULL} /* Sentinel */ }; static PyMethodDef IterParser_methods[] = { {NULL} /* Sentinel */ }; static PyTypeObject IterParserType = { #ifdef IS_PY3K PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ #endif "astropy.utils.xml._iterparser.IterParser", /*tp_name*/ sizeof(IterParser), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor)IterParser_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash */ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "IterParser objects", /* tp_doc */ (traverseproc)IterParser_traverse, /* tp_traverse */ (inquiry)IterParser_clear, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc)IterParser_iter, /* tp_iter */ (iternextfunc)IterParser_next, /* tp_iternext */ IterParser_methods, /* tp_methods */ IterParser_members, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ (initproc)IterParser_init, /* tp_init */ 0, /* tp_alloc */ IterParser_new, /* tp_new */ }; /****************************************************************************** * XML escaping ******************************************************************************/ /* These are in reverse order by input character */ static const char* escapes_cdata[] = { ">", ">", "<", "<", "&", "&", "\0", "\0", }; /* These are in reverse order by input character */ static const char* escapes[] = { ">", ">", "<", "<", "'", "'", "&", "&", "\"", """, "\0", "\0" }; /* * Returns a copy of the given string (8-bit or Unicode) with the XML * control characters converted to XML character entities. * * If an 8-bit string is passed in, an 8-bit string is returned. If a * Unicode string is passed in, a Unicode string is returned. */ static PyObject* _escape_xml(PyObject* self, PyObject *args, const char** escapes) { PyObject* input_obj; PyObject* input_coerce = NULL; PyObject* output_obj; int count = 0; Py_UNICODE* uinput = NULL; char* input = NULL; Py_ssize_t input_len; Py_UNICODE* uoutput = NULL; char* output = NULL; Py_UNICODE* up = NULL; char* p = NULL; Py_ssize_t i; const char** esc; const char* ent; if (!PyArg_ParseTuple(args, "O:escape_xml", &input_obj)) { return NULL; } /* First, try as Unicode */ #ifdef IS_PY3K if (!PyBytes_Check(input_obj)) { input_coerce = PyObject_Str(input_obj); } #else if (PyUnicode_Check(input_obj)) { input_coerce = PyObject_Unicode(input_obj); } #endif if (input_coerce) { uinput = PyUnicode_AsUnicode(input_coerce); if (uinput == NULL) { Py_DECREF(input_coerce); return NULL; } input_len = PyUnicode_GetSize(input_coerce); for (i = 0; i < input_len; ++i) { for (esc = escapes; ; esc += 2) { if (uinput[i] > (Py_UNICODE)**esc) { break; } else if (uinput[i] == (Py_UNICODE)**esc) { ++count; break; } } } if (count) { uoutput = malloc((input_len + 1 + count * 5) * sizeof(Py_UNICODE)); if (uoutput == NULL) { Py_DECREF(input_coerce); PyErr_SetString(PyExc_MemoryError, "Out of memory"); return NULL; } up = uoutput; for (i = 0; i < input_len; ++i) { for (esc = escapes; ; esc += 2) { if (uinput[i] > (Py_UNICODE)**esc) { *(up++) = uinput[i]; break; } else if (uinput[i] == (Py_UNICODE)**esc) { for (ent = *(esc + 1); *ent != '\0'; ++ent) { *(up++) = (Py_UNICODE)*ent; } break; } } } *up = 0; Py_DECREF(input_coerce); output_obj = PyUnicode_FromUnicode(uoutput, up - uoutput); free(uoutput); return output_obj; } else { return input_coerce; } } /* Now try as bytes */ input_coerce = PyObject_Bytes(input_obj); if (input_coerce) { if (PyBytes_AsStringAndSize(input_coerce, &input, &input_len) == -1) { Py_DECREF(input_coerce); return NULL; } for (i = 0; i < input_len; ++i) { for (esc = escapes; ; esc += 2) { if (input[i] > **esc) { break; } else if (input[i] == **esc) { ++count; break; } } } if (count) { output = malloc((input_len + 1 + count * 5) * sizeof(char)); if (output == NULL) { Py_DECREF(input_coerce); PyErr_SetString(PyExc_MemoryError, "Out of memory"); return NULL; } p = output; for (i = 0; i < input_len; ++i) { for (esc = escapes; ; esc += 2) { if (input[i] > **esc) { *(p++) = input[i]; break; } else if (input[i] == **esc) { for (ent = *(esc + 1); *ent != '\0'; ++ent) { *(p++) = *ent; } break; } } } *p = 0; Py_DECREF(input_coerce); output_obj = PyBytes_FromStringAndSize(output, p - output); free(output); return output_obj; } else { return input_coerce; } } #ifdef IS_PY3K PyErr_SetString(PyExc_TypeError, "must be convertible to str or bytes"); #else PyErr_SetString(PyExc_TypeError, "must be convertible to str or unicode"); #endif return NULL; } static PyObject* escape_xml(PyObject* self, PyObject *args) { return _escape_xml(self, args, escapes); } static PyObject* escape_xml_cdata(PyObject* self, PyObject *args) { return _escape_xml(self, args, escapes_cdata); } /****************************************************************************** * Module setup ******************************************************************************/ static PyMethodDef module_methods[] = { {"escape_xml", (PyCFunction)escape_xml, METH_VARARGS, "Fast method to escape XML strings"}, {"escape_xml_cdata", (PyCFunction)escape_xml_cdata, METH_VARARGS, "Fast method to escape XML strings"}, {NULL} /* Sentinel */ }; struct module_state { void* none; }; #ifdef IS_PY3K static int module_traverse(PyObject* m, visitproc visit, void* arg) { return 0; } static int module_clear(PyObject* m) { return 0; } static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, "_iterparser", "Fast XML parser", sizeof(struct module_state), module_methods, NULL, module_traverse, module_clear, NULL }; # define INITERROR return NULL PyMODINIT_FUNC PyInit__iterparser(void) #else /* Not PY3K */ # define INITERROR return # ifndef PyMODINIT_FUNC /* declarations for DLL import/export */ # define PyMODINIT_FUNC void # endif PyMODINIT_FUNC init_iterparser(void) #endif { PyObject* m; #ifdef IS_PY3K m = PyModule_Create(&moduledef); #else m = Py_InitModule3("_iterparser", module_methods, "Fast XML parser"); #endif if (m == NULL) INITERROR; if (PyType_Ready(&IterParserType) < 0) INITERROR; Py_INCREF(&IterParserType); PyModule_AddObject(m, "IterParser", (PyObject *)&IterParserType); #ifdef IS_PY3K return m; #endif } astropy-1.1.1/astropy/utils/xml/src/iterparse.map0000644001134200020070000000013512602615530023043 0ustar embrayscience00000000000000VERS_1.0 { global: init_iterparser; PyInit__iterparser; local: *; }; astropy-1.1.1/astropy/utils/xml/src/expat_config.h0000644001134200020070000000520112602615530023164 0ustar embrayscience00000000000000/* expat_config.h. Generated by configure. */ /* expat_config.h.in. Generated from configure.in by autoheader. */ /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ /* #define BYTEORDER 1234 */ /* Define to 1 if you have the `bcopy' function. */ #define HAVE_BCOPY 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the header file. */ /* #define HAVE_UNISTD_H 1 */ /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "expat-bugs@libexpat.org" /* Define to the full name of this package. */ #define PACKAGE_NAME "expat" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "expat 2.0.1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "expat" /* Define to the version of this package. */ #define PACKAGE_VERSION "2.0.1" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* whether byteorder is bigendian */ /* #undef WORDS_BIGENDIAN */ /* Define to specify how much context to retain around the current parse point. */ #define XML_CONTEXT_BYTES 1024 /* Define to make parameter entity parsing functionality available. */ #define XML_DTD 0 /* Define to make XML Namespaces functionality available. */ #define XML_NS 0 /* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */ /* #undef __func__ */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `long' if does not define. */ /* #undef off_t */ /* Define to `unsigned' if does not define. */ /* #undef size_t */ astropy-1.1.1/astropy/utils/xml/unescaper.py0000644001134200020070000000255512602615530022126 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """URL unescaper functions.""" from __future__ import (absolute_import, division, print_function, unicode_literals) # STDLIB from xml.sax import saxutils __all__ = ['unescape_all'] _bytes_entities = {b'&': b'&', b'<': b'<', b'>': b'>', b'&&': b'&'} _bytes_keys = [b'&&', b'&', b'<', b'>'] _str_entities = {'&&': '&'} _str_keys = ['&', '<', '>'] def unescape_all(url): """Recursively unescape a given URL. .. note:: '&&' becomes a single '&'. Parameters ---------- url : str or bytes URL to unescape. Returns ------- clean_url : str or bytes Unescaped URL. """ if isinstance(url, bytes): func2use = _unescape_bytes keys2use = _bytes_keys else: func2use = _unescape_str keys2use = _str_keys clean_url = func2use(url) not_done = [clean_url.count(key) > 0 for key in keys2use] if True in not_done: return unescape_all(clean_url) else: return clean_url def _unescape_str(url): return saxutils.unescape(url, _str_entities) def _unescape_bytes(url): clean_url = url for key in _bytes_keys: clean_url = clean_url.replace(key, _bytes_entities[key]) return clean_url astropy-1.1.1/astropy/utils/xml/iterparser.py0000644001134200020070000001400512640262015022310 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module includes a fast iterator-based XML parser. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from ...extern import six # STDLIB import contextlib import io import sys # ASTROPY from .. import data __all__ = ['get_xml_iterator', 'get_xml_encoding', 'xml_readlines'] @contextlib.contextmanager def _convert_to_fd_or_read_function(fd): """ Returns a function suitable for streaming input, or a file object. This function is only useful if passing off to C code where: - If it's a real file object, we want to use it as a real C file object to avoid the Python overhead. - If it's not a real file object, it's much handier to just have a Python function to call. This is somewhat quirky behavior, of course, which is why it is private. For a more useful version of similar behavior, see `astropy.utils.misc.get_readable_fileobj`. Parameters ---------- fd : object May be: - a file object. If the file is uncompressed, this raw file object is returned verbatim. Otherwise, the read method is returned. - a function that reads from a stream, in which case it is returned verbatim. - a file path, in which case it is opened. Again, like a file object, if it's uncompressed, a raw file object is returned, otherwise its read method. - an object with a :meth:`read` method, in which case that method is returned. Returns ------- fd : context-dependent See above. """ if six.callable(fd): yield fd return with data.get_readable_fileobj(fd, encoding='binary') as new_fd: if sys.platform.startswith('win'): yield new_fd.read else: if six.PY3: if isinstance(new_fd, io.FileIO): yield new_fd else: yield new_fd.read elif six.PY2: if isinstance(new_fd, file): yield new_fd else: yield new_fd.read def _fast_iterparse(fd, buffersize=2 ** 10): from xml.parsers import expat if not six.callable(fd): read = fd.read else: read = fd queue = [] text = [] def start(name, attr): queue.append((True, name, attr, (parser.CurrentLineNumber, parser.CurrentColumnNumber))) del text[:] if sys.version_info[:3] < (2, 6, 5): # pragma py2 # Due to Python issue #4978, convert all keys to byte strings _start = start def start(name, attr): attr = dict((k.encode('utf-8'), v) for (k, v) in six.iteritems(attr)) return _start(name, attr) def end(name): queue.append((False, name, ''.join(text).strip(), (parser.CurrentLineNumber, parser.CurrentColumnNumber))) parser = expat.ParserCreate() if six.PY2: parser.returns_unicode = True parser.specified_attributes = True parser.StartElementHandler = start parser.EndElementHandler = end parser.CharacterDataHandler = text.append Parse = parser.Parse data = read(buffersize) while data: Parse(data, False) for elem in queue: yield elem del queue[:] data = read(buffersize) Parse('', True) for elem in queue: yield elem # Try to import the C version of the iterparser, otherwise fall back # to the Python implementation above. _slow_iterparse = _fast_iterparse try: from . import _iterparser _fast_iterparse = _iterparser.IterParser except ImportError: pass @contextlib.contextmanager def get_xml_iterator(source, _debug_python_based_parser=False): """ Returns an iterator over the elements of an XML file. The iterator doesn't ever build a tree, so it is much more memory and time efficient than the alternative in ``cElementTree``. Parameters ---------- fd : readable file-like object or read function Returns ------- parts : iterator The iterator returns 4-tuples (*start*, *tag*, *data*, *pos*): - *start*: when `True` is a start element event, otherwise an end element event. - *tag*: The name of the element - *data*: Depends on the value of *event*: - if *start* == `True`, data is a dictionary of attributes - if *start* == `False`, data is a string containing the text content of the element - *pos*: Tuple (*line*, *col*) indicating the source of the event. """ with _convert_to_fd_or_read_function(source) as fd: if _debug_python_based_parser: context = _slow_iterparse(fd) else: context = _fast_iterparse(fd) yield iter(context) def get_xml_encoding(source): """ Determine the encoding of an XML file by reading its header. Parameters ---------- source : readable file-like object, read function or str path Returns ------- encoding : str """ with get_xml_iterator(source) as iterator: start, tag, data, pos = six.next(iterator) if not start or tag != 'xml': raise IOError('Invalid XML file') # The XML spec says that no encoding === utf-8 return data.get('encoding') or 'utf-8' def xml_readlines(source): """ Get the lines from a given XML file. Correctly determines the encoding and always returns unicode. Parameters ---------- source : readable file-like object, read function or str path Returns ------- lines : list of unicode """ encoding = get_xml_encoding(source) with data.get_readable_fileobj(source, encoding=encoding) as input: input.seek(0) xml_lines = input.readlines() return xml_lines astropy-1.1.1/astropy/utils/xml/setup_package.py0000644001134200020070000000313012640262015022740 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import from distutils.core import Extension from os.path import join import sys from astropy_helpers import setup_helpers def get_external_libraries(): return ['expat'] def get_extensions(build_type='release'): XML_DIR = 'astropy/utils/xml/src' cfg = setup_helpers.DistutilsExtensionArgs({ 'sources': [join(XML_DIR, "iterparse.c")] }) if setup_helpers.use_system_library('expat'): cfg.update(setup_helpers.pkg_config(['expat'], ['expat'])) else: EXPAT_DIR = 'cextern/expat/lib' cfg['sources'].extend([ join(EXPAT_DIR, fn) for fn in ["xmlparse.c", "xmlrole.c", "xmltok.c", "xmltok_impl.c"]]) cfg['include_dirs'].extend([XML_DIR, EXPAT_DIR]) if sys.platform.startswith('linux'): # This is to ensure we only export the Python entry point # symbols and the linker won't try to use the system expat in # place of ours. cfg['extra_link_args'].extend([ '-Wl,--version-script={0}'.format( join(XML_DIR, 'iterparse.map')) ]) cfg['define_macros'].append(("HAVE_EXPAT_CONFIG_H", 1)) if sys.byteorder == 'big': cfg['define_macros'].append(('BYTEORDER', '4321')) else: cfg['define_macros'].append(('BYTEORDER', '1234')) if sys.platform != 'win32': cfg['define_macros'].append(('HAVE_UNISTD_H', None)) return [Extension("astropy.utils.xml._iterparser", **cfg)] astropy-1.1.1/astropy/utils/xml/writer.py0000644001134200020070000001767212640262015021461 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Contains a class that makes it simple to stream out well-formed and nicely-indented XML. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from ...extern import six # STDLIB import contextlib import textwrap try: from . import _iterparser except ImportError: def xml_escape_cdata(s): """ Escapes &, < and > in an XML CDATA string. """ s = s.replace("&", "&") s = s.replace("<", "<") s = s.replace(">", ">") return s def xml_escape(s): """ Escapes &, ', ", < and > in an XML attribute value. """ s = s.replace("&", "&") s = s.replace("'", "'") s = s.replace("\"", """) s = s.replace("<", "<") s = s.replace(">", ">") return s else: xml_escape_cdata = _iterparser.escape_xml_cdata xml_escape = _iterparser.escape_xml class XMLWriter: """ A class to write well-formed and nicely indented XML. Use like this:: w = XMLWriter(fh) with w.tag('html'): with w.tag('body'): w.data('This is the content') Which produces:: This is the content """ def __init__(self, file): """ Parameters ---------- file : writable file-like object. """ self.write = file.write if hasattr(file, "flush"): self.flush = file.flush self._open = 0 # true if start tag is open self._tags = [] self._data = [] self._indentation = " " * 64 self.xml_escape_cdata = xml_escape_cdata self.xml_escape = xml_escape def _flush(self, indent=True, wrap=False): """ Flush internal buffers. """ if self._open: if indent: self.write(">\n") else: self.write(">") self._open = 0 if self._data: data = ''.join(self._data) if wrap: indent = self.get_indentation_spaces(1) data = textwrap.fill( data, initial_indent=indent, subsequent_indent=indent) self.write('\n') self.write(self.xml_escape_cdata(data)) self.write('\n') self.write(self.get_indentation_spaces()) else: self.write(self.xml_escape_cdata(data)) self._data = [] def start(self, tag, attrib={}, **extra): """ Opens a new element. Attributes can be given as keyword arguments, or as a string/string dictionary. The method returns an opaque identifier that can be passed to the :meth:`close` method, to close all open elements up to and including this one. Parameters ---------- tag : str The element name attrib : dict of str -> str Attribute dictionary. Alternatively, attributes can be given as keyword arguments. Returns ------- id : int Returns an element identifier. """ self._flush() # This is just busy work -- we know our tag names are clean # tag = xml_escape_cdata(tag) self._data = [] self._tags.append(tag) self.write(self.get_indentation_spaces(-1)) self.write("<%s" % tag) if attrib or extra: attrib = attrib.copy() attrib.update(extra) attrib = list(six.iteritems(attrib)) attrib.sort() for k, v in attrib: if v is not None: # This is just busy work -- we know our keys are clean # k = xml_escape_cdata(k) v = self.xml_escape(v) self.write(" %s=\"%s\"" % (k, v)) self._open = 1 return len(self._tags) @contextlib.contextmanager def tag(self, tag, attrib={}, **extra): """ A convenience method for creating wrapper elements using the ``with`` statement. Examples -------- >>> with writer.tag('foo'): # doctest: +SKIP ... writer.element('bar') ... # is implicitly closed here ... Parameters are the same as to `start`. """ self.start(tag, attrib, **extra) yield self.end(tag) def comment(self, comment): """ Adds a comment to the output stream. Parameters ---------- comment : str Comment text, as a Unicode string. """ self._flush() self.write(self.get_indentation_spaces()) self.write("\n" % self.xml_escape_cdata(comment)) def data(self, text): """ Adds character data to the output stream. Parameters ---------- text : str Character data, as a Unicode string. """ self._data.append(text) def end(self, tag=None, indent=True, wrap=False): """ Closes the current element (opened by the most recent call to `start`). Parameters ---------- tag : str Element name. If given, the tag must match the start tag. If omitted, the current element is closed. """ if tag: assert self._tags, "unbalanced end(%s)" % tag assert tag == self._tags[-1],\ "expected end(%s), got %s" % (self._tags[-1], tag) else: assert self._tags, "unbalanced end()" tag = self._tags.pop() if self._data: self._flush(indent, wrap) elif self._open: self._open = 0 self.write("/>\n") return if indent: self.write(self.get_indentation_spaces()) self.write("\n" % tag) def close(self, id): """ Closes open elements, up to (and including) the element identified by the given identifier. Parameters ---------- id : int Element identifier, as returned by the `start` method. """ while len(self._tags) > id: self.end() def element(self, tag, text=None, wrap=False, attrib={}, **extra): """ Adds an entire element. This is the same as calling `start`, `data`, and `end` in sequence. The ``text`` argument can be omitted. """ self.start(tag, attrib, **extra) if text: self.data(text) self.end(indent=False, wrap=wrap) def flush(self): pass # replaced by the constructor def get_indentation(self): """ Returns the number of indentation levels the file is currently in. """ return len(self._tags) def get_indentation_spaces(self, offset=0): """ Returns a string of spaces that matches the current indentation level. """ return self._indentation[:len(self._tags) + offset] @staticmethod def object_attrs(obj, attrs): """ Converts an object with a bunch of attributes on an object into a dictionary for use by the `XMLWriter`. Parameters ---------- obj : object Any Python object attrs : sequence of str Attribute names to pull from the object Returns ------- attrs : dict Maps attribute names to the values retrieved from ``obj.attr``. If any of the attributes is `None`, it will not appear in the output dictionary. """ d = {} for attr in attrs: if getattr(obj, attr) is not None: d[attr.replace('_', '-')] = six.text_type(getattr(obj, attr)) return d astropy-1.1.1/astropy/utils/xml/validate.py0000644001134200020070000000325212640262015021723 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Functions to do XML schema and DTD validation. At the moment, this makes a subprocess call to xmllint. This could use a Python-based library at some point in the future, if something appropriate could be found. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import os import subprocess def validate_schema(filename, schema_file): """ Validates an XML file against a schema or DTD. Parameters ---------- filename : str The path to the XML file to validate schema_file : str The path to the XML schema or DTD Returns ------- returncode, stdout, stderr : int, str, str Returns the returncode from xmllint and the stdout and stderr as strings """ base, ext = os.path.splitext(schema_file) if ext == '.xsd': schema_part = '--schema ' + schema_file elif ext == '.dtd': schema_part = '--dtdvalid ' + schema_file else: raise TypeError("schema_file must be a path to an XML Schema or DTD") p = subprocess.Popen( "xmllint --noout --nonet %s %s" % (schema_part, filename), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate() if p.returncode == 127: raise OSError( "xmllint not found, so can not validate schema") elif p.returncode < 0: from ..misc import signal_number_to_name raise OSError( "xmllint was terminated by signal '{0}'".format( signal_number_to_name(-p.returncode))) return p.returncode, stdout, stderr astropy-1.1.1/astropy/utils/xml/__init__.py0000644001134200020070000000015512602615530021672 0ustar embrayscience00000000000000from __future__ import (absolute_import, division, print_function, unicode_literals) astropy-1.1.1/astropy/utils/xml/check.py0000644001134200020070000000432012602615530021206 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ A collection of functions for checking various XML-related strings for standards compliance. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from ...extern.six.moves import xrange, urllib import re def check_id(ID): """ Returns `True` if *ID* is a valid XML ID. """ return re.match(r"^[A-Za-z_][A-Za-z0-9_\.\-]*$", ID) is not None def fix_id(ID): """ Given an arbitrary string, create one that can be used as an xml id. This is rather simplistic at the moment, since it just replaces non-valid characters with underscores. """ if re.match(r"^[A-Za-z_][A-Za-z0-9_\.\-]*$", ID): return ID if len(ID): corrected = ID if not len(corrected) or re.match('^[^A-Za-z_]$', corrected[0]): corrected = '_' + corrected corrected = (re.sub(r"[^A-Za-z_]", '_', corrected[0]) + re.sub(r"[^A-Za-z0-9_\.\-]", "_", corrected[1:])) return corrected return '' _token_regex = r"(?![\r\l\t ])[^\r\l\t]*(?![\r\l\t ])" def check_token(token): """ Returns `True` if *token* is a valid XML token, as defined by XML Schema Part 2. """ return (token == '' or re.match( "[^\r\n\t ]?([^\r\n\t ]| [^\r\n\t ])*[^\r\n\t ]?$", token) is not None) def check_mime_content_type(content_type): """ Returns `True` if *content_type* is a valid MIME content type (syntactically at least), as defined by RFC 2045. """ ctrls = ''.join(chr(x) for x in xrange(0, 0x20)) token_regex = '[^()<>@,;:\\\"/[\]?= %s\x7f]+' % ctrls return re.match( r'(?P%s)/(?P%s)$' % (token_regex, token_regex), content_type) is not None def check_anyuri(uri): """ Returns `True` if *uri* is a valid URI as defined in RFC 2396. """ if (re.match( (r"(([a-zA-Z][0-9a-zA-Z+\-\.]*:)?/{0,2}[0-9a-zA-Z;" + r"/?:@&=+$\.\-_!~*'()%]+)?(#[0-9a-zA-Z;/?:@&=+$\.\-_!~*'()%]+)?"), uri) is None): return False try: urllib.parse.urlparse(uri) except: return False return True astropy-1.1.1/astropy/utils/data_info.py0000644001134200020070000004046412644017723021274 0ustar embrayscience00000000000000# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """This module contains functions and methods that relate to the DataInfo class which provides a container for informational attributes as well as summary info methods. A DataInfo object is attached to the Quantity, SkyCoord, and Time classes in astropy. Here it allows those classes to be used in Tables and uniformly carry table column attributes such as name, format, dtype, meta, and description. """ # Note: these functions and classes are tested extensively in astropy table # tests via their use in providing mixin column info, and in # astropy/tests/test_info for providing table and column info summary data. from __future__ import absolute_import, division, print_function import os import sys import weakref from copy import deepcopy import numpy as np from functools import partial import warnings import re from ..extern import six from ..utils import OrderedDict from ..utils.compat import NUMPY_LT_1_8 # Tuple of filterwarnings kwargs to ignore when calling info IGNORE_WARNINGS = (dict(category=RuntimeWarning, module=r'numpy\.lib\.nanfunctions'),) STRING_TYPE_NAMES = {(False, 'S'): 'str', # not PY3 (False, 'U'): 'unicode', (True, 'S'): 'bytes', # PY3 (True, 'U'): 'str'} def dtype_info_name(dtype): """Return a human-oriented string name of the ``dtype`` arg. This can be use by astropy methods that present type information about a data object. The output is mostly equivalent to ``dtype.name`` which takes the form [B] where is like ``int`` or ``bool`` and [B] is an optional number of bits which gets included only for numeric types. For bytes, string and unicode types, the output is shown below, where is the number of characters. This representation corresponds to the Python type that matches the dtype:: Numpy S U Python 2 str unicode Python 3 bytes str Parameters ---------- dtype: str, np.dtype, type Input dtype as an object that can be converted via np.dtype() Returns ------- dtype_info_name: str String name of ``dtype`` """ dtype = np.dtype(dtype) if dtype.kind in ('S', 'U'): length = re.search(r'(\d+)', dtype.str).group(1) type_name = STRING_TYPE_NAMES[(six.PY3, dtype.kind)] out = type_name + length else: out = dtype.name return out def data_info_factory(names, funcs): """ Factory to create a function that can be used as an ``option`` for outputting data object summary information. Examples -------- >>> from astropy.utils.data_info import data_info_factory >>> from astropy.table import Column >>> c = Column([4., 3., 2., 1.]) >>> mystats = data_info_factory(names=['min', 'median', 'max'], ... funcs=[np.min, np.median, np.max]) >>> c.info(option=mystats) min = 1.0 median = 2.5 max = 4.0 n_bad = 0 length = 4 Parameters ---------- names: list List of information attribute names funcs: list List of functions that compute the corresponding information attribute Returns ------- func: function Function that can be used as a data info option """ def func(dat): outs = [] for name, func in zip(names, funcs): try: if isinstance(func, six.string_types): out = getattr(dat, func)() else: out = func(dat) except: outs.append('--') else: outs.append(str(out)) return OrderedDict(zip(names, outs)) return func def _get_data_attribute(dat, attr=None): """ Get a data object attribute for the ``attributes`` info summary method """ if attr == 'class': val = type(dat).__name__ elif attr == 'dtype': val = dtype_info_name(dat.info.dtype) elif attr == 'shape': datshape = dat.shape[1:] val = datshape if datshape else '' else: val = getattr(dat.info, attr) if val is None: val = '' return str(val) class DataInfo(object): """ Descriptor that data classes use to add an ``info`` attribute for storing data attributes in a uniform and portable way. Note that it *must* be called ``info`` so that the DataInfo() object can be stored in the ``instance`` using the ``info`` key. Because owner_cls.x is a descriptor, Python doesn't use __dict__['x'] normally, and the descriptor can safely store stuff there. Thanks to http://nbviewer.ipython.org/urls/ gist.github.com/ChrisBeaumont/5758381/raw/descriptor_writeup.ipynb for this trick that works for non-hashable classes. Parameters ---------- bound : bool, default=False If True this is a descriptor attribute in a class definition, else it is a DataInfo() object that is bound to a data object instance. """ _stats = ['mean', 'std', 'min', 'max'] attrs_from_parent = set() attr_names = set(['name', 'unit', 'dtype', 'format', 'description', 'meta']) _attrs_no_copy = set() _info_summary_attrs = ('dtype', 'shape', 'unit', 'format', 'description', 'class') _parent = None def __init__(self, bound=False): # If bound to a data object instance then create the dict of attributes # which stores the info attribute values. if bound: self._attrs = dict((attr, None) for attr in self.attr_names) def __get__(self, instance, owner_cls): if instance is None: # This is an unbound descriptor on the class info = self else: info = instance.__dict__.get('info') if info is None: info = instance.__dict__['info'] = self.__class__(bound=True) info._parent = instance return info def __set__(self, instance, value): if instance is None: # This is an unbound descriptor on the class raise ValueError('cannot set unbound descriptor') if isinstance(value, DataInfo): info = instance.__dict__['info'] = self.__class__(bound=True) for attr in info.attr_names - info.attrs_from_parent - info._attrs_no_copy: info._attrs[attr] = deepcopy(getattr(value, attr)) else: raise TypeError('info must be set with a DataInfo instance') def __getstate__(self): return self._attrs def __setstate__(self, state): self._attrs = state def __getattr__(self, attr): if attr.startswith('_'): return super(DataInfo, self).__getattribute__(attr) if attr in self.attrs_from_parent: return getattr(self._parent, attr) try: value = self._attrs[attr] except KeyError: super(DataInfo, self).__getattribute__(attr) # Generate AttributeError # Weak ref for parent table if attr == 'parent_table' and callable(value): value = value() # Mixins have a default dtype of Object if nothing else was set if attr == 'dtype' and value is None: value = np.dtype('O') return value def __setattr__(self, attr, value): propobj = getattr(self.__class__, attr, None) # If attribute is taken from parent properties and there is not a # class property (getter/setter) for this attribute then set # attribute directly in parent. if attr in self.attrs_from_parent and not isinstance(propobj, property): setattr(self._parent, attr, value) return # Check if there is a property setter and use it if possible. if isinstance(propobj, property): if propobj.fset is None: raise AttributeError("can't set attribute") propobj.fset(self, value) return # Private attr names get directly set if attr.startswith('_'): super(DataInfo, self).__setattr__(attr, value) return # Finally this must be an actual data attribute that this class is handling. if attr not in self.attr_names: raise AttributeError("attribute must be one of {0}".format(self.attr_names)) if attr == 'parent_table': value = None if value is None else weakref.ref(value) self._attrs[attr] = value info_summary_attributes = staticmethod( data_info_factory(names=_info_summary_attrs, funcs=[partial(_get_data_attribute, attr=attr) for attr in _info_summary_attrs])) # No nan* methods in numpy < 1.8 info_summary_stats = staticmethod( data_info_factory(names=_stats, funcs=[getattr(np, ('' if NUMPY_LT_1_8 else 'nan') + stat) for stat in _stats])) def __call__(self, option='attributes', out=''): """ Write summary information about data object to the ``out`` filehandle. By default this prints to standard output via sys.stdout. The ``option` argument specifies what type of information to include. This can be a string, a function, or a list of strings or functions. Built-in options are: - ``attributes``: data object attributes like ``dtype`` and ``format`` - ``stats``: basic statistics: min, mean, and max If a function is specified then that function will be called with the data object as its single argument. The function must return an OrderedDict containing the information attributes. If a list is provided then the information attributes will be appended for each of the options, in order. Examples -------- >>> from astropy.table import Column >>> c = Column([1, 2], unit='m', dtype='int32') >>> c.info() dtype = int32 unit = m class = Column n_bad = 0 length = 2 >>> c.info(['attributes', 'stats']) dtype = int32 unit = m class = Column mean = 1.5 std = 0.5 min = 1 max = 2 n_bad = 0 length = 2 Parameters ---------- option: str, function, list of (str or function) Info option (default='attributes') out: file-like object, None Output destination (default=sys.stdout). If None then the OrderedDict with information attributes is returned Returns ------- info: OrderedDict if out==None else None """ if out == '': out = sys.stdout dat = self._parent info = OrderedDict() name = dat.info.name if name is not None: info['name'] = name options = option if isinstance(option, (list, tuple)) else [option] for option in options: if isinstance(option, six.string_types): if hasattr(self, 'info_summary_' + option): option = getattr(self, 'info_summary_' + option) else: raise ValueError('option={0} is not an allowed information type' .format(option)) with warnings.catch_warnings(): for ignore_kwargs in IGNORE_WARNINGS: warnings.filterwarnings('ignore', **ignore_kwargs) info.update(option(dat)) if hasattr(dat, 'mask'): n_bad = np.count_nonzero(dat.mask) else: try: n_bad = np.count_nonzero(np.isinf(dat) | np.isnan(dat)) except: n_bad = 0 info['n_bad'] = n_bad try: info['length'] = len(dat) except TypeError: pass if out is None: return info for key, val in info.items(): if val != '': out.write('{0} = {1}'.format(key, val) + os.linesep) def __repr__(self): if self._parent is None: return super(DataInfo, self).__repr__() out = six.moves.cStringIO() self.__call__(out=out) return out.getvalue() class BaseColumnInfo(DataInfo): """ Base info class for anything that can be a column in an astropy Table. There are at least two classes that inherit from this: ColumnInfo: for native astropy Column / MaskedColumn objects MixinInfo: for mixin column objects Note that this class is defined here so that mixins can use it without importing the table package. """ attr_names = DataInfo.attr_names.union(['parent_table', 'indices']) _attrs_no_copy = set(['parent_table']) def iter_str_vals(self): """ This is a mixin-safe version of Column.iter_str_vals. """ col = self._parent if self.parent_table is None: from ..table.column import FORMATTER as formatter else: formatter = self.parent_table.formatter _pformat_col_iter = formatter._pformat_col_iter for str_val in _pformat_col_iter(col, -1, False, False, {}): yield str_val def adjust_indices(self, index, value, col_len): ''' Adjust info indices after column modification. Parameters ---------- index : slice, int, list, or ndarray Element(s) of column to modify. This parameter can be a single row number, a list of row numbers, an ndarray of row numbers, a boolean ndarray (a mask), or a column slice. value : int, list, or ndarray New value(s) to insert col_len : int Length of the column ''' if not self.indices: return if isinstance(index, slice): # run through each key in slice t = index.indices(col_len) keys = list(range(*t)) elif isinstance(index, np.ndarray) and index.dtype.kind == 'b': # boolean mask keys = np.where(index)[0] else: # single int keys = [index] value = np.atleast_1d(value) # turn array(x) into array([x]) if value.size == 1: # repeat single value value = list(value) * len(keys) for key, val in zip(keys, value): for col_index in self.indices: col_index.replace(key, self.name, val) def slice_indices(self, col_slice, item, col_len): ''' Given a sliced object, modify its indices to correctly represent the slice. Parameters ---------- col_slice : Column or mixin Sliced object item : slice, list, or ndarray Slice used to create col_slice col_len : int Length of original object ''' from ..table.index import Index from ..table.sorted_array import SortedArray if not getattr(self, '_copy_indices', True): # Necessary because MaskedArray will perform a shallow copy col_slice.info.indices = [] return col_slice elif isinstance(item, slice): col_slice.info.indices = [x[item] for x in self.indices] elif self.indices: if isinstance(item, np.ndarray) and item.dtype.kind == 'b': # boolean mask item = np.where(item)[0] threshold = 0.6 # Empirical testing suggests that recreating a BST/RBT index is # more effective than relabelling when less than ~60% of # the total number of rows are involved, and is in general # more effective for SortedArray. small = len(item) <= 0.6 * col_len col_slice.info.indices = [] for index in self.indices: if small or isinstance(index, SortedArray): new_index = index.get_slice(col_slice, item) else: new_index = deepcopy(index) new_index.replace_rows(item) col_slice.info.indices.append(new_index) return col_slice class MixinInfo(BaseColumnInfo): pass class ParentDtypeInfo(MixinInfo): """Mixin that gets info.dtype from parent""" attrs_from_parent = set(['dtype']) # dtype and unit taken from parent astropy-1.1.1/astropy/utils/tests/0000755001134200020070000000000012644022135020121 5ustar embrayscience00000000000000astropy-1.1.1/astropy/utils/tests/test_gzip.py0000644001134200020070000000105412640262015022502 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import io from ...extern import six from ...tests.helper import pytest from ..compat import gzip pytestmark = pytest.mark.skipif(str("six.PY2")) def test_gzip(tmpdir): fd = gzip.GzipFile(str(tmpdir.join("test.gz")), 'wb') fd = io.TextIOWrapper(fd, encoding='utf8') def test_gzip2(tmpdir): with gzip.GzipFile(str(tmpdir.join("test.gz")), 'wb') as fd: pass astropy-1.1.1/astropy/utils/tests/test_introspection.py0000644001134200020070000000622112640262015024432 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) #namedtuple is needed for find_mod_objs so it can have a non-local module from collections import namedtuple from ...extern import six from ...tests.helper import pytest from .. import introspection from ..introspection import (find_current_module, find_mod_objs, isinstancemethod) def test_pkg_finder(): """ Tests that the `find_current_module` function works. Note that this also implicitly tests compat.misc._patched_getmodule """ mod1 = 'astropy.utils.introspection' mod2 = 'astropy.utils.tests.test_introspection' mod3 = 'astropy.utils.tests.test_introspection' assert find_current_module(0).__name__ == mod1 assert find_current_module(1).__name__ == mod2 assert find_current_module(0, True).__name__ == mod3 def test_find_current_mod(): from sys import getrecursionlimit thismodnm = __name__ assert find_current_module(0) is introspection assert find_current_module(1).__name__ == thismodnm assert find_current_module(getrecursionlimit() + 1) is None assert find_current_module(0, True).__name__ == thismodnm assert find_current_module(0, [introspection]).__name__ == thismodnm assert find_current_module(0, ['astropy.utils.introspection']).__name__ == thismodnm with pytest.raises(ImportError): find_current_module(0, ['faddfdsasewrweriopunjlfiurrhujnkflgwhu']) def test_find_mod_objs(): lnms, fqns, objs = find_mod_objs('astropy') # this import is after the above call intentionally to make sure # find_mod_objs properly imports astropy on its own import astropy # just check for astropy.test ... other things might be added, so we # shouldn't check that it's the only thing assert 'test' in lnms assert astropy.test in objs lnms, fqns, objs = find_mod_objs(__name__, onlylocals=False) assert 'namedtuple' in lnms assert 'collections.namedtuple' in fqns assert namedtuple in objs lnms, fqns, objs = find_mod_objs(__name__, onlylocals=True) assert 'namedtuple' not in lnms assert 'collections.namedtuple' not in fqns assert namedtuple not in objs def test_isinstancemethod(): """ Note, this is an exact copy of the doctest in `isinstancemethod`'s docstring. It is included here as well so that it can be tested on Python 2 and 3 which require very different implementations. Once we enable running doctests on Python 3 this extra test can be dropped. """ class MetaClass(type): def a_classmethod(cls): pass @six.add_metaclass(MetaClass) class MyClass(object): def an_instancemethod(self): pass @classmethod def another_classmethod(cls): pass @staticmethod def a_staticmethod(): pass assert not isinstancemethod(MyClass, MyClass.a_classmethod) assert not isinstancemethod(MyClass, MyClass.another_classmethod) assert not isinstancemethod(MyClass, MyClass.a_staticmethod) assert isinstancemethod(MyClass, MyClass.an_instancemethod) astropy-1.1.1/astropy/utils/tests/test_console.py0000644001134200020070000001422312644017723023205 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- # TEST_UNICODE_LITERALS from __future__ import (absolute_import, division, print_function, unicode_literals) from ...extern import six from ...extern.six import next from ...extern.six.moves import xrange import io import locale from ...tests.helper import pytest from .. import console from ... import units as u class FakeTTY(io.StringIO): """IOStream that fakes a TTY; provide an encoding to emulate an output stream with a specific encoding. """ def __new__(cls, encoding=None): # Return a new subclass of FakeTTY with the requested encoding if encoding is None: return super(FakeTTY, cls).__new__(cls) # Since we're using unicode_literals in this module ensure that this is # a 'str' object (since a class name can't be unicode in Python 2.7) encoding = str(encoding) cls = type(encoding.title() + cls.__name__, (cls,), {'encoding': encoding}) return cls.__new__(cls) def __init__(self, encoding=None): super(FakeTTY, self).__init__() def write(self, s): if isinstance(s, bytes): # Just allow this case to work s = s.decode('latin-1') elif self.encoding is not None: s.encode(self.encoding) return super(FakeTTY, self).write(s) def isatty(self): return True def test_fake_tty(): # First test without a specified encoding; we should be able to write # arbitrary unicode strings f1 = FakeTTY() assert f1.isatty() f1.write('☃') assert f1.getvalue() == '☃' # Now test an ASCII-only TTY--it should raise a UnicodeEncodeError when # trying to write a string containing non-ASCII characters f2 = FakeTTY('ascii') assert f2.isatty() assert f2.__class__.__name__ == 'AsciiFakeTTY' assert pytest.raises(UnicodeEncodeError, f2.write, '☃') assert f2.getvalue() == '' @pytest.mark.skipif(str("sys.platform.startswith('win')")) def test_color_text(): assert console._color_text("foo", "green") == '\033[0;32mfoo\033[0m' def test_color_print(): # This stuff is hard to test, at least smoke test it console.color_print("foo", "green") console.color_print("foo", "green", "bar", "red") def test_color_print2(): # Test that this automatically detects that io.StringIO is # not a tty stream = io.StringIO() console.color_print("foo", "green", file=stream) assert stream.getvalue() == 'foo\n' stream = io.StringIO() console.color_print("foo", "green", "bar", "red", "baz", file=stream) assert stream.getvalue() == 'foobarbaz\n' @pytest.mark.skipif(str("sys.platform.startswith('win')")) def test_color_print3(): # Test that this thinks the FakeTTY is a tty and applies colors. stream = FakeTTY() console.color_print("foo", "green", file=stream) assert stream.getvalue() == '\x1b[0;32mfoo\x1b[0m\n' stream = FakeTTY() console.color_print("foo", "green", "bar", "red", "baz", file=stream) assert stream.getvalue() == '\x1b[0;32mfoo\x1b[0m\x1b[0;31mbar\x1b[0mbaz\n' def test_color_print_unicode(): console.color_print("überbær", "red") def test_color_print_invalid_color(): console.color_print("foo", "unknown") @pytest.mark.skipif(str('six.PY3')) def test_color_print_no_default_encoding(): """Regression test for #1244 In some environments `locale.getpreferredencoding` can return ``''``; make sure there are some reasonable fallbacks. """ # Not sure of a reliable way to force getpreferredencoding() to return # an empty string other than to temporarily patch it orig_func = locale.getpreferredencoding locale.getpreferredencoding = lambda: '' try: # Try printing a string that can be utf-8 decoded (the default) stream = io.StringIO() console.color_print(b'\xe2\x98\x83', 'white', file=stream) assert stream.getvalue() == '☃\n' # Test the latin-1 fallback stream = io.StringIO() console.color_print(b'\xcd\xef', 'red', file=stream) assert stream.getvalue() == 'Ãï\n' finally: locale.getpreferredencoding = orig_func def test_spinner_non_unicode_console(): """Regression test for #1760 Ensures that the spinner can fall go into fallback mode when using the unicode spinner on a terminal whose default encoding cannot encode the unicode characters. """ stream = FakeTTY('ascii') chars = console.Spinner._default_unicode_chars with console.Spinner("Reticulating splines", file=stream, chars=chars) as s: next(s) def test_progress_bar(): # This stuff is hard to test, at least smoke test it with console.ProgressBar(50) as bar: for i in range(50): bar.update() def test_progress_bar2(): for x in console.ProgressBar(xrange(50)): pass def test_progress_bar3(): def do_nothing(*args, **kwargs): pass console.ProgressBar.map(do_nothing, xrange(50)) def test_zero_progress_bar(): with console.ProgressBar(0) as bar: pass def test_progress_bar_as_generator(): sum = 0 for x in console.ProgressBar(xrange(50)): sum += x assert sum == 1225 sum = 0 for x in console.ProgressBar(50): sum += x assert sum == 1225 @pytest.mark.parametrize(("seconds","string"), [(864088," 1w 3d"), (187213, " 2d 4h"), (3905, " 1h 5m"), (64, " 1m 4s"), (15, " 15s"), (2, " 2s")] ) def test_human_time(seconds, string): human_time = console.human_time(seconds) assert human_time == string @pytest.mark.parametrize(("size","string"), [(8640882,"8.6M"), (187213, "187k"), (3905, "3.9k"), (64, " 64 "), (2, " 2 "), (10*u.GB, " 10G")] ) def test_human_file_size(size, string): human_time = console.human_file_size(size) assert human_time == string @pytest.mark.parametrize("size", (50*u.km, 100*u.g)) def test_bad_human_file_size(size): assert pytest.raises(u.UnitConversionError, console.human_file_size, size) astropy-1.1.1/astropy/utils/tests/test_data.py0000644001134200020070000003063312644017723022457 0ustar embrayscience00000000000000# -*- coding: utf-8 -*- # TEST_UNICODE_LITERALS # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from ...extern import six from ...tests.helper import remote_data, raises, pytest, catch_warnings import hashlib import io import os import sys import tempfile from ...extern.six.moves.urllib.request import pathname2url from ..data import (_get_download_cache_locs, CacheMissingWarning, get_pkg_data_filename, get_readable_fileobj) TESTURL = 'http://www.astropy.org' # General file object function try: import bz2 except ImportError: HAS_BZ2 = False else: HAS_BZ2 = True try: if sys.version_info >= (3,3,0): import lzma else: from backports import lzma except ImportError: HAS_XZ = False else: HAS_XZ = True @remote_data def test_download_nocache(): from ..data import download_file fnout = download_file(TESTURL) assert os.path.isfile(fnout) @remote_data def test_download_noprogress(): from ..data import download_file fnout = download_file(TESTURL, show_progress=False) assert os.path.isfile(fnout) @remote_data def test_download_cache(): from ..data import download_file, clear_download_cache fnout = download_file(TESTURL, cache=True) assert os.path.isfile(fnout) clear_download_cache(TESTURL) assert not os.path.isfile(fnout) lockdir = os.path.join(_get_download_cache_locs()[0], 'lock') assert not os.path.isdir(lockdir), 'Cache dir lock was not released!' @remote_data def test_url_nocache(): from ..data import get_readable_fileobj with get_readable_fileobj(TESTURL, cache=False, encoding='utf-8') as page: assert page.read().find('Astropy') > -1 @remote_data def test_find_by_hash(): from ..data import get_readable_fileobj, get_pkg_data_filename, clear_download_cache with get_readable_fileobj(TESTURL, encoding="binary", cache=True) as page: hash = hashlib.md5(page.read()) hashstr = 'hash/' + hash.hexdigest() fnout = get_pkg_data_filename(hashstr) assert os.path.isfile(fnout) clear_download_cache(hashstr[5:]) assert not os.path.isfile(fnout) lockdir = os.path.join(_get_download_cache_locs()[0], 'lock') assert not os.path.isdir(lockdir), 'Cache dir lock was not released!' @remote_data def test_find_by_hash(): from ..data import get_pkg_data_filename #this is of course not a real data file and not on any remote server, but it should *try* to go to the remote server with pytest.raises(six.moves.urllib.error.URLError): get_pkg_data_filename('kjfrhgjklahgiulrhgiuraehgiurhgiuhreglhurieghruelighiuerahiulruli') # Package data functions @pytest.mark.parametrize(('filename'), ['local.dat', 'local.dat.gz', 'local.dat.bz2', 'local.dat.xz']) def test_local_data_obj(filename): from ..data import get_pkg_data_fileobj if (not HAS_BZ2 and 'bz2' in filename) or (not HAS_XZ and 'xz' in filename): with pytest.raises(ValueError) as e: with get_pkg_data_fileobj(os.path.join('data', filename), encoding='binary') as f: f.readline() # assert f.read().rstrip() == b'CONTENT' assert ' format files are not supported' in str(e) else: with get_pkg_data_fileobj(os.path.join('data', filename), encoding='binary') as f: f.readline() assert f.read().rstrip() == b'CONTENT' @pytest.mark.parametrize(('filename'), ['invalid.dat.gz', 'invalid.dat.bz2']) def test_local_data_obj_invalid(filename): from ..data import get_pkg_data_fileobj if (not HAS_BZ2 and 'bz2' in filename) or (not HAS_XZ and 'xz' in filename): with pytest.raises(ValueError) as e: with get_pkg_data_fileobj(os.path.join('data', filename), encoding='binary') as f: f.read() assert ' format files are not supported' in str(e) else: with get_pkg_data_fileobj(os.path.join('data', filename), encoding='binary') as f: assert f.read().rstrip().endswith(b'invalid') def test_local_data_name(): from ..data import get_pkg_data_filename fnout = get_pkg_data_filename('data/local.dat') assert os.path.isfile(fnout) and fnout.endswith('local.dat') #TODO: if in the future, the root data/ directory is added in, the below #test should be uncommented and the README.rst should be replaced with #whatever file is there #get something in the astropy root #fnout2 = get_pkg_data_filename('../../data/README.rst') #assert os.path.isfile(fnout2) and fnout2.endswith('README.rst') def test_data_name_third_party_package(): """Regression test for issue #1256 Tests that `get_pkg_data_filename` works in a third-party package that doesn't make any relative imports from the module it's used from. Uses a test package under ``data/test_package``. """ # Get the actual data dir: data_dir = os.path.join(os.path.dirname(__file__), 'data') sys.path.insert(0, data_dir) try: import test_package filename = test_package.get_data_filename() assert filename == os.path.join(data_dir, 'test_package', 'data', 'foo.txt') finally: sys.path.pop(0) @raises(AssertionError) def test_local_data_nonlocalfail(): from ..data import get_pkg_data_filename #this would go *outside* the atropy tree get_pkg_data_filename('../../../data/README.rst') def test_compute_hash(tmpdir): from ..data import compute_hash rands = b'1234567890abcdefghijklmnopqrstuvwxyz' filename = tmpdir.join('tmp.dat').strpath with io.open(filename, 'wb') as ntf: ntf.write(rands) ntf.flush() chhash = compute_hash(filename) shash = hashlib.md5(rands).hexdigest() assert chhash == shash def test_get_pkg_data_contents(): from ..data import get_pkg_data_fileobj, get_pkg_data_contents with get_pkg_data_fileobj('data/local.dat') as f: contents1 = f.read() contents2 = get_pkg_data_contents('data/local.dat') assert contents1 == contents2 @remote_data def test_data_noastropy_fallback(monkeypatch): """ Tests to make sure the default behavior when the cache directory can't be located is correct """ from .. import data from ...config import paths # needed for testing the *real* lock at the end lockdir = os.path.join(_get_download_cache_locs()[0], 'lock') # better yet, set the configuration to make sure the temp files are deleted data.DELETE_TEMPORARY_DOWNLOADS_AT_EXIT.set(True) # make sure the config and cache directories are not searched monkeypatch.setenv(str('XDG_CONFIG_HOME'), 'foo') monkeypatch.delenv(str('XDG_CONFIG_HOME')) monkeypatch.setenv(str('XDG_CACHE_HOME'), 'bar') monkeypatch.delenv(str('XDG_CACHE_HOME')) monkeypatch.setattr(paths.set_temp_config, '_temp_path', None) monkeypatch.setattr(paths.set_temp_cache, '_temp_path', None) # make sure the _find_or_create_astropy_dir function fails as though the # astropy dir could not be accessed def osraiser(dirnm, linkto): raise OSError monkeypatch.setattr(paths, '_find_or_create_astropy_dir', osraiser) with pytest.raises(OSError): # make sure the config dir search fails paths.get_cache_dir() # first try with cache with catch_warnings(CacheMissingWarning) as w: fnout = data.download_file(TESTURL, cache=True) assert os.path.isfile(fnout) assert len(w) > 1 w1 = w.pop(0) w2 = w.pop(0) assert w1.category == CacheMissingWarning assert 'Remote data cache could not be accessed' in w1.message.args[0] assert w2.category == CacheMissingWarning assert 'File downloaded to temporary location' in w2.message.args[0] assert fnout == w2.message.args[1] # clearing the cache should be a no-up that doesn't affect fnout with catch_warnings(CacheMissingWarning) as w: data.clear_download_cache(TESTURL) assert os.path.isfile(fnout) # now remove it so tests don't clutter up the temp dir this should get # called at exit, anyway, but we do it here just to make sure it's working # correctly data._deltemps() assert not os.path.isfile(fnout) assert len(w) > 0 w3 = w.pop() assert w3.category == data.CacheMissingWarning assert 'Not clearing data cache - cache inacessable' in str(w3.message) #now try with no cache with catch_warnings(CacheMissingWarning) as w: fnnocache = data.download_file(TESTURL, cache=False) with open(fnnocache, 'rb') as page: assert page.read().decode('utf-8').find('Astropy') > -1 # no warnings should be raise in fileobj because cache is unnecessary assert len(w) == 0 # lockdir determined above as the *real* lockdir, not the temp one assert not os.path.isdir(lockdir), 'Cache dir lock was not released!' @pytest.mark.parametrize(('filename'), [ 'unicode.txt', 'unicode.txt.gz', pytest.mark.xfail(not HAS_BZ2, reason='no bz2 support')('unicode.txt.bz2'), pytest.mark.xfail(not HAS_XZ, reason='no lzma support')('unicode.txt.xz') ]) def test_read_unicode(filename): from ..data import get_pkg_data_contents contents = get_pkg_data_contents(os.path.join('data', filename), encoding='utf-8') assert isinstance(contents, six.text_type) contents = contents.splitlines()[1] assert contents == "×”×סטרונומי פייתון" contents = get_pkg_data_contents(os.path.join('data', filename), encoding='binary') assert isinstance(contents, bytes) x = contents.splitlines()[1] assert x == b"\xff\xd7\x94\xd7\x90\xd7\xa1\xd7\x98\xd7\xa8\xd7\x95\xd7\xa0\xd7\x95\xd7\x9e\xd7\x99 \xd7\xa4\xd7\x99\xd7\x99\xd7\xaa\xd7\x95\xd7\x9f"[1:] def test_compressed_stream(): import base64 from ..data import get_readable_fileobj gzipped_data = b"H4sICIxwG1AAA2xvY2FsLmRhdAALycgsVkjLzElVANKlxakpCpl5CiUZqQolqcUl8Tn5yYk58SmJJYnxWmCRzLx0hbTSvOSSzPy8Yi5nf78QV78QLgAlLytnRQAAAA==" gzipped_data = base64.b64decode(gzipped_data) assert isinstance(gzipped_data, bytes) class FakeStream: """ A fake stream that has `read`, but no `seek`. """ def __init__(self, data): self.data = data def read(self, nbytes=None): if nbytes is None: result = self.data self.data = b'' else: result = self.data[:nbytes] self.data = self.data[nbytes:] return result stream = FakeStream(gzipped_data) with get_readable_fileobj(stream, encoding='binary') as f: f.readline() assert f.read().rstrip() == b'CONTENT' @remote_data def test_invalid_location_download(): """ checks that download_file gives a URLError and not an AttributeError, as its code pathway involves some fiddling with the exception. """ from ...extern.six.moves.urllib_error import URLError from ..data import download_file with pytest.raises(URLError): download_file('http://astropy.org/nonexistentfile') def test_invalid_location_download_noconnect(): """ checks that download_file gives an IOError if the socket is blocked """ from ..data import download_file # This should invoke socket's monkeypatched failure with pytest.raises(IOError): download_file('http://astropy.org/nonexistentfile') @remote_data def test_is_url_in_cache(): from ..data import download_file, is_url_in_cache assert not is_url_in_cache('http://astropy.org/nonexistentfile') download_file(TESTURL, cache=True, show_progress=False) assert is_url_in_cache(TESTURL) def test_get_readable_fileobj_cleans_up_temporary_files(tmpdir, monkeypatch): """checks that get_readable_fileobj leaves no temporary files behind""" # Create a 'file://' URL pointing to a path on the local filesystem local_filename = get_pkg_data_filename(os.path.join('data', 'local.dat')) url = 'file://' + pathname2url(local_filename) # Save temporary files to a known location monkeypatch.setattr(tempfile, 'tempdir', str(tmpdir)) # Call get_readable_fileobj() as a context manager with get_readable_fileobj(url) as fileobj: pass # Get listing of files in temporary directory tempdir_listing = tmpdir.listdir() # Assert that the temporary file was empty after get_readable_fileobj() # context manager finished running assert len(tempdir_listing) == 0 astropy-1.1.1/astropy/utils/tests/test_state.py0000644001134200020070000000477412640262015022665 0ustar embrayscience00000000000000from __future__ import (absolute_import, division, print_function, unicode_literals) from ...tests.helper import catch_warnings from ..data import get_pkg_data_filename from ...config import configuration def test_alias(): from ...cosmology import core, WMAP9, WMAP7 # REMOVE in astropy 0.5 with catch_warnings() as w: x = core.DEFAULT_COSMOLOGY() assert x == WMAP9 assert len(w) == 1 assert str(w[0].message) == ( "'astropy.cosmology.core.DEFAULT_COSMOLOGY' is deprecated, " "and is no longer defined as a configuration item. Use " "'astropy.cosmology.core.default_cosmology.get()' instead.") with catch_warnings() as w: core.DEFAULT_COSMOLOGY.set('WMAP7') assert core.default_cosmology.get() == WMAP7 assert len(w) == 1 assert str(w[0].message) == ( "'astropy.cosmology.core.DEFAULT_COSMOLOGY' is deprecated, " "and is no longer defined as a configuration item. Use " "'astropy.cosmology.core.default_cosmology.set()' instead.") with catch_warnings() as w: with core.DEFAULT_COSMOLOGY.set_temp('WMAP9'): assert core.default_cosmology.get() == WMAP9 assert core.default_cosmology.get() == WMAP7 assert len(w) == 1 assert str(w[0].message) == ( "'astropy.cosmology.core.DEFAULT_COSMOLOGY' is deprecated, " "and is no longer defined as a configuration item. Use " "'astropy.cosmology.core.default_cosmology.set_temp()' instead.") with catch_warnings() as w: core.DEFAULT_COSMOLOGY.reload() assert core.default_cosmology.get() == WMAP9 assert len(w) == 1 assert str(w[0].message) == ( "'astropy.cosmology.core.DEFAULT_COSMOLOGY' is deprecated, " "and is no longer defined as a configuration item.") class TestAliasRead(object): def setup_class(self): configuration._override_config_file = get_pkg_data_filename('data/alias.cfg') def test_alias_read(self): from ...cosmology import core, WMAP9, WMAP7 with catch_warnings() as w: core.DEFAULT_COSMOLOGY.reload() assert core.default_cosmology.get() == WMAP7 assert len(w) == 1 assert str(w[0].message) == ( "'astropy.cosmology.core.DEFAULT_COSMOLOGY' is deprecated, and is " "no longer defined as a configuration item.") def teardown_class(self): from astropy.utils.data import conf configuration._override_config_file = None conf.reload() astropy-1.1.1/astropy/utils/tests/data/0000755001134200020070000000000012644022135021032 5ustar embrayscience00000000000000astropy-1.1.1/astropy/utils/tests/data/invalid.dat.gz0000644001134200020070000000001212602615527023571 0ustar embrayscience00000000000000‹invalidastropy-1.1.1/astropy/utils/tests/data/local.dat.gz0000644001134200020070000000013612602615527023244 0ustar embrayscience00000000000000‹ŒpPlocal.dat ÉÈ,VHËÌIUҥũ) ™y %© %©Å%ñ9ùɉ9ñ)‰%‰ñZ`‘̼t…´Ò¼ä’Ìü¼b.g¿W¿.%/+gEastropy-1.1.1/astropy/utils/tests/data/unicode.txt.xz0000644001134200020070000000016412644017723023671 0ustar embrayscience00000000000000ý7zXZæÖ´F!t/å£9# -*- coding: utf-8 -*- ×”×סטרונומי פייתון ãY+¬áBl6R:OSn¶ó}YZastropy-1.1.1/astropy/utils/tests/data/local.dat.bz20000644001134200020070000000014012602615527023314 0ustar embrayscience00000000000000BZh91AY&SYa”fc W€@ „¯åŽ Hj™yCzBx ‰j!i‚ÁÅWÃr,Ï#X–Ë$g á+¨ãqÍL÷OŒ*TÉÀ„¦Ä¸oÅÜ‘N$e˜Àastropy-1.1.1/astropy/utils/tests/data/unicode.txt.bz20000644001134200020070000000013112644017723023717 0ustar embrayscience00000000000000BZh91AY&SY:kôÅÙ²HP ¡†FaäP€ 1@ÐÕSÈÚƒFjxç»(Uè""$“J*ÑWˆï{ÌjØ4ÎwrE8P:kôÅastropy-1.1.1/astropy/utils/tests/data/alias.cfg0000644001134200020070000000005212640262015022600 0ustar embrayscience00000000000000[cosmology.core] default_cosmology = WMAP7astropy-1.1.1/astropy/utils/tests/data/.hidden_file.txt0000644001134200020070000000004412602615527024110 0ustar embrayscience00000000000000This is a deliberately hidden file. astropy-1.1.1/astropy/utils/tests/data/invalid.dat.bz20000644001134200020070000000001212602615527023646 0ustar embrayscience00000000000000BZhinvalidastropy-1.1.1/astropy/utils/tests/data/test_package/0000755001134200020070000000000012644022135023464 5ustar embrayscience00000000000000astropy-1.1.1/astropy/utils/tests/data/test_package/data/0000755001134200020070000000000012644022135024375 5ustar embrayscience00000000000000astropy-1.1.1/astropy/utils/tests/data/test_package/data/foo.txt0000644001134200020070000000000012602615527025716 0ustar embrayscience00000000000000astropy-1.1.1/astropy/utils/tests/data/test_package/__init__.py0000644001134200020070000000020012602615527025574 0ustar embrayscience00000000000000from astropy.utils.data import get_pkg_data_filename def get_data_filename(): return get_pkg_data_filename('data/foo.txt') astropy-1.1.1/astropy/utils/tests/data/local.dat0000644001134200020070000000010512602615527022621 0ustar embrayscience00000000000000This file is used in the test_local_data_* testing functions CONTENT astropy-1.1.1/astropy/utils/tests/data/unicode.txt0000644001134200020070000000007212602615527023227 0ustar embrayscience00000000000000# -*- coding: utf-8 -*- ×”×סטרונומי פייתון astropy-1.1.1/astropy/utils/tests/data/local.dat.xz0000644001134200020070000000020012644017723023255 0ustar embrayscience00000000000000ý7zXZæÖ´F!t/å£àDB]* 'd°8sÊ‹ Ñp@B¦2N™I4ܯ¹´ÒDx˜wäÿEF•·*—ùêæÿº BEO/¿Ð÷€’le•µîŽÔ^Eîp¶ó}YZastropy-1.1.1/astropy/utils/tests/data/unicode.txt.gz0000644001134200020070000000012612644017723023646 0ustar embrayscience00000000000000‹0gQunicode.txtSVÐÕÒUHÎOÉÌK·R(-IÓµ‰p]Ÿr}Âõ…×g\_q}êõ@<ïúL…ëK®ÏÂU@î|.AFØ:astropy-1.1.1/astropy/utils/tests/test_codegen.py0000644001134200020070000000273112640262015023140 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import traceback from ..codegen import make_function_with_signature from ...tests.helper import pytest def test_make_function_with_signature_lineno(): """ Tests that a function made with ``make_function_with_signature`` is give the correct line number into the module it was created from (i.e. the line ``make_function_with_signature`` was called from). """ def crashy_function(*args, **kwargs): 1 / 0 # Make a wrapper around this function with the signature: # crashy_function(a, b) # Note: the signature is not really relevant to this test wrapped = make_function_with_signature(crashy_function, ('a', 'b')) line = """ wrapped = make_function_with_signature(crashy_function, ('a', 'b')) """.strip() try: wrapped(1, 2) except: exc_cls, exc, tb = sys.exc_info() assert exc_cls is ZeroDivisionError # The *last* line in the traceback should be the 1 / 0 line in # crashy_function; the next line up should be the line that the # make_function_with_signature call was one tb_lines = traceback.format_tb(tb) assert '1 / 0' in tb_lines[-1] assert line in tb_lines[-2] and 'line =' not in tb_lines[-2] else: pytest.fail('This should have caused an exception') astropy-1.1.1/astropy/utils/tests/test_collections.py0000644001134200020070000000136212602615527024061 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from ...tests.helper import raises from .. import collections @raises(TypeError) def test_homogeneous_list(): l = collections.HomogeneousList(int) l.append(5.0) @raises(TypeError) def test_homogeneous_list2(): l = collections.HomogeneousList(int) l.extend([5.0]) def test_homogeneous_list3(): l = collections.HomogeneousList(int) l.append(5) def test_homogeneous_list4(): l = collections.HomogeneousList(int) l.extend([5]) @raises(TypeError) def test_homogeneous_list5(): l = collections.HomogeneousList(int, [1,2,3]) l[1] = 5.0 astropy-1.1.1/astropy/utils/tests/test_compat.py0000644001134200020070000000006712640262015023017 0ustar embrayscience00000000000000def test_argparse(): from ..compat import argparse astropy-1.1.1/astropy/utils/tests/odict_support.py0000644001134200020070000000606712602615527023411 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """Supporting definitions for the Python regression tests.""" import contextlib import sys import warnings import re __all__ = ["check_py3k_warnings"] class WarningsRecorder(object): """Convenience wrapper for the warnings list returned on entry to the warnings.catch_warnings() context manager. """ def __init__(self, warnings_list): self._warnings = warnings_list self._last = 0 def __getattr__(self, attr): if len(self._warnings) > self._last: return getattr(self._warnings[-1], attr) elif attr in warnings.WarningMessage._WARNING_DETAILS: return None raise AttributeError("%r has no attribute %r" % (self, attr)) @property def warnings(self): return self._warnings[self._last:] def reset(self): self._last = len(self._warnings) def _filterwarnings(filters, quiet=False): """Catch the warnings, then check if all the expected warnings have been raised and re-raise unexpected warnings. If 'quiet' is True, only re-raise the unexpected warnings. """ # Clear the warning registry of the calling module # in order to re-raise the warnings. frame = sys._getframe(2) registry = frame.f_globals.get('__warningregistry__') if registry: registry.clear() with warnings.catch_warnings(record=True) as w: # Set filter "always" to record all warnings. Because # test_warnings swap the module, we need to look up in # the sys.modules dictionary. sys.modules['warnings'].simplefilter("always") yield WarningsRecorder(w) # Filter the recorded warnings reraise = [warning.message for warning in w] missing = [] for msg, cat in filters: seen = False for exc in reraise[:]: message = str(exc) # Filter out the matching messages if (re.match(msg, message, re.I) and issubclass(exc.__class__, cat)): seen = True reraise.remove(exc) if not seen and not quiet: # This filter caught nothing missing.append((msg, cat.__name__)) if reraise: raise AssertionError("unhandled warning %r" % reraise[0]) if missing: raise AssertionError("filter (%r, %s) did not catch any warning" % missing[0]) @contextlib.contextmanager def check_py3k_warnings(*filters, **kwargs): """Context manager to silence py3k warnings. Accept 2-tuples as positional arguments: ("message regexp", WarningCategory) Optional argument: - if 'quiet' is True, it does not fail if a filter catches nothing (default False) Without argument, it defaults to: check_py3k_warnings(("", DeprecationWarning), quiet=False) """ if sys.py3kwarning: if not filters: filters = (("", DeprecationWarning),) else: # It should not raise any py3k warning filters = () return _filterwarnings(filters, kwargs.get('quiet')) astropy-1.1.1/astropy/utils/tests/odict_mapping.py0000644001134200020070000002507412602615527023327 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst import unittest from . import odict_support as test_support class BasicTestMappingProtocol(unittest.TestCase): # This base class can be used to check that an object conforms to the # mapping protocol # Functions that can be useful to override to adapt to dictionary # semantics type2test = None # which class is being tested (overwrite in subclasses) def _reference(self): """Return a dictionary of values which are invariant by storage in the object under test.""" return {1:2, "key1":"value1", "key2":(1,2,3)} def _empty_mapping(self): """Return an empty mapping object""" return self.type2test() def _full_mapping(self, data): """Return a mapping object with the value contained in data dictionary""" x = self._empty_mapping() for key, value in data.items(): x[key] = value return x def __init__(self, *args, **kw): unittest.TestCase.__init__(self, *args, **kw) self.reference = self._reference().copy() # A (key, value) pair not in the mapping key, value = self.reference.popitem() self.other = {key:value} # A (key, value) pair in the mapping key, value = self.reference.popitem() self.inmapping = {key:value} self.reference[key] = value def test_read(self): # Test for read only operations on mapping p = self._empty_mapping() p1 = dict(p) #workaround for singleton objects d = self._full_mapping(self.reference) if d is p: p = p1 #Indexing for key, value in self.reference.items(): self.assertEqual(d[key], value) knownkey = self.other.keys()[0] self.assertRaises(KeyError, lambda:d[knownkey]) #len self.assertEqual(len(p), 0) self.assertEqual(len(d), len(self.reference)) #in for k in self.reference: self.assertIn(k, d) for k in self.other: self.assertNotIn(k, d) #has_key with test_support.check_py3k_warnings(quiet=True): for k in self.reference: self.assertTrue(d.has_key(k)) for k in self.other: self.assertFalse(d.has_key(k)) #cmp self.assertEqual(cmp(p,p), 0) self.assertEqual(cmp(d,d), 0) self.assertEqual(cmp(p,d), -1) self.assertEqual(cmp(d,p), 1) #__non__zero__ if p: self.fail("Empty mapping must compare to False") if not d: self.fail("Full mapping must compare to True") # keys(), items(), iterkeys() ... def check_iterandlist(iter, lst, ref): self.assertTrue(hasattr(iter, 'next')) self.assertTrue(hasattr(iter, '__iter__')) x = list(iter) self.assertTrue(set(x)==set(lst)==set(ref)) check_iterandlist(d.iterkeys(), d.keys(), self.reference.keys()) check_iterandlist(iter(d), d.keys(), self.reference.keys()) check_iterandlist(d.itervalues(), d.values(), self.reference.values()) check_iterandlist(d.iteritems(), d.items(), self.reference.items()) #get key, value = d.iteritems().next() knownkey, knownvalue = self.other.iteritems().next() self.assertEqual(d.get(key, knownvalue), value) self.assertEqual(d.get(knownkey, knownvalue), knownvalue) self.assertNotIn(knownkey, d) def test_write(self): # Test for write operations on mapping p = self._empty_mapping() #Indexing for key, value in self.reference.items(): p[key] = value self.assertEqual(p[key], value) for key in self.reference.keys(): del p[key] self.assertRaises(KeyError, lambda:p[key]) p = self._empty_mapping() #update p.update(self.reference) self.assertEqual(dict(p), self.reference) items = p.items() p = self._empty_mapping() p.update(items) self.assertEqual(dict(p), self.reference) d = self._full_mapping(self.reference) #setdefault key, value = d.iteritems().next() knownkey, knownvalue = self.other.iteritems().next() self.assertEqual(d.setdefault(key, knownvalue), value) self.assertEqual(d[key], value) self.assertEqual(d.setdefault(knownkey, knownvalue), knownvalue) self.assertEqual(d[knownkey], knownvalue) #pop self.assertEqual(d.pop(knownkey), knownvalue) self.assertNotIn(knownkey, d) self.assertRaises(KeyError, d.pop, knownkey) default = 909 d[knownkey] = knownvalue self.assertEqual(d.pop(knownkey, default), knownvalue) self.assertNotIn(knownkey, d) self.assertEqual(d.pop(knownkey, default), default) #popitem key, value = d.popitem() self.assertNotIn(key, d) self.assertEqual(value, self.reference[key]) p=self._empty_mapping() self.assertRaises(KeyError, p.popitem) def test_constructor(self): self.assertEqual(self._empty_mapping(), self._empty_mapping()) def test_bool(self): self.assertTrue(not self._empty_mapping()) self.assertTrue(self.reference) self.assertTrue(bool(self._empty_mapping()) is False) self.assertTrue(bool(self.reference) is True) def test_keys(self): d = self._empty_mapping() self.assertEqual(d.keys(), []) d = self.reference self.assertIn(self.inmapping.keys()[0], d.keys()) self.assertNotIn(self.other.keys()[0], d.keys()) self.assertRaises(TypeError, d.keys, None) def test_values(self): d = self._empty_mapping() self.assertEqual(d.values(), []) self.assertRaises(TypeError, d.values, None) def test_items(self): d = self._empty_mapping() self.assertEqual(d.items(), []) self.assertRaises(TypeError, d.items, None) def test_len(self): d = self._empty_mapping() self.assertEqual(len(d), 0) def test_getitem(self): d = self.reference self.assertEqual(d[self.inmapping.keys()[0]], self.inmapping.values()[0]) self.assertRaises(TypeError, d.__getitem__) def test_update(self): # mapping argument d = self._empty_mapping() d.update(self.other) self.assertEqual(d.items(), self.other.items()) # No argument d = self._empty_mapping() d.update() self.assertEqual(d, self._empty_mapping()) # item sequence d = self._empty_mapping() d.update(self.other.items()) self.assertEqual(d.items(), self.other.items()) # Iterator d = self._empty_mapping() d.update(self.other.iteritems()) self.assertEqual(d.items(), self.other.items()) # FIXME: Doesn't work with UserDict # self.assertRaises((TypeError, AttributeError), d.update, None) self.assertRaises((TypeError, AttributeError), d.update, 42) outerself = self class SimpleUserDict: def __init__(self): self.d = outerself.reference def keys(self): return self.d.keys() def __getitem__(self, i): return self.d[i] d.clear() d.update(SimpleUserDict()) i1 = d.items() i2 = self.reference.items() i1.sort() i2.sort() self.assertEqual(i1, i2) class Exc(Exception): pass d = self._empty_mapping() class FailingUserDict: def keys(self): raise Exc self.assertRaises(Exc, d.update, FailingUserDict()) d.clear() class FailingUserDict2: def keys(self): class BogonIter: def __init__(self): self.i = 1 def __iter__(self): return self def next(self): if self.i: self.i = 0 return 'a' raise Exc return BogonIter() def __getitem__(self, key): return key self.assertRaises(Exc, d.update, FailingUserDict2()) class FailingUserDict3: def keys(self): class BogonIter: def __init__(self): self.i = ord('a') def __iter__(self): return self def next(self): if self.i <= ord('z'): rtn = chr(self.i) self.i += 1 return rtn raise StopIteration return BogonIter() def __getitem__(self, key): raise Exc self.assertRaises(Exc, d.update, FailingUserDict3()) d = self._empty_mapping() class badseq(object): def __iter__(self): return self def next(self): raise Exc() self.assertRaises(Exc, d.update, badseq()) self.assertRaises(ValueError, d.update, [(1, 2, 3)]) # no test_fromkeys or test_copy as both os.environ and selves don't support it def test_get(self): d = self._empty_mapping() self.assertTrue(d.get(self.other.keys()[0]) is None) self.assertEqual(d.get(self.other.keys()[0], 3), 3) d = self.reference self.assertTrue(d.get(self.other.keys()[0]) is None) self.assertEqual(d.get(self.other.keys()[0], 3), 3) self.assertEqual(d.get(self.inmapping.keys()[0]), self.inmapping.values()[0]) self.assertEqual(d.get(self.inmapping.keys()[0], 3), self.inmapping.values()[0]) self.assertRaises(TypeError, d.get) self.assertRaises(TypeError, d.get, None, None, None) def test_setdefault(self): d = self._empty_mapping() self.assertRaises(TypeError, d.setdefault) def test_popitem(self): d = self._empty_mapping() self.assertRaises(KeyError, d.popitem) self.assertRaises(TypeError, d.popitem, 42) def test_pop(self): d = self._empty_mapping() k, v = self.inmapping.items()[0] d[k] = v self.assertRaises(KeyError, d.pop, self.other.keys()[0]) self.assertEqual(d.pop(k), v) self.assertEqual(len(d), 0) self.assertRaises(KeyError, d.pop, k) def assertIn(self, key, d): self.assertTrue(key in d) def assertNotIn(self, key, d): self.assertFalse(key in d) astropy-1.1.1/astropy/utils/tests/test_xml.py0000644001134200020070000000412212644017723022340 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from ...extern import six import io from ..xml import check, unescaper, writer def test_writer(): fh = io.StringIO() w = writer.XMLWriter(fh) with w.tag("html"): with w.tag("body"): w.data("This is the content") w.comment("comment") value = ''.join(fh.getvalue().split()) assert value == 'Thisisthecontent' def test_check_id(): assert check.check_id("Fof32") assert check.check_id("_Fof32") assert not check.check_id("32Fof") def test_fix_id(): assert check.fix_id("Fof32") == "Fof32" assert check.fix_id("@#f") == "___f" def test_check_token(): assert check.check_token("token") assert not check.check_token("token\rtoken") def test_check_mime_content_type(): assert check.check_mime_content_type("image/jpeg") assert not check.check_mime_content_type("image") def test_check_anyuri(): assert check.check_anyuri("https://github.com/astropy/astropy") def test_unescape_all(): # str url_in = 'http://casu.ast.cam.ac.uk/ag/iphas-dsa/SubmitCone?' \ 'DSACAT=IDR&amp;DSATAB=Emitters&amp;' url_out = 'http://casu.ast.cam.ac.uk/ag/iphas-dsa/SubmitCone?' \ 'DSACAT=IDR&DSATAB=Emitters&' assert unescaper.unescape_all(url_in) == url_out # bytes url_in = b'http://casu.ast.cam.ac.uk/ag/iphas-dsa/SubmitCone?' \ b'DSACAT=IDR&amp;DSATAB=Emitters&amp;' url_out = b'http://casu.ast.cam.ac.uk/ag/iphas-dsa/SubmitCone?' \ b'DSACAT=IDR&DSATAB=Emitters&' assert unescaper.unescape_all(url_in) == url_out def test_escape_xml(): s = writer.xml_escape('This & That') assert type(s) == six.text_type assert s == 'This & That' s = writer.xml_escape(1) assert type(s) == str assert s == '1' s = writer.xml_escape(b'This & That') assert type(s) == bytes assert s == b'This & That' astropy-1.1.1/astropy/utils/tests/test_data_info.py0000644001134200020070000000305212644017723023465 0ustar embrayscience00000000000000# -*- coding: utf-8 -*- # TEST_UNICODE_LITERALS # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function import numpy as np from ...extern import six from ..data_info import dtype_info_name from ...tests.helper import pytest STRING_TYPE_NAMES = {(False, 'S'): 'str', # not PY3 (False, 'U'): 'unicode', (True, 'S'): 'bytes', # PY3 (True, 'U'): 'str'} DTYPE_TESTS = ((np.array(b'abcd').dtype, STRING_TYPE_NAMES[(six.PY3, 'S')] + '4'), (np.array(u'abcd').dtype, STRING_TYPE_NAMES[(six.PY3, 'U')] + '4'), ('S4', STRING_TYPE_NAMES[(six.PY3, 'S')] + '4'), ('U4', STRING_TYPE_NAMES[(six.PY3, 'U')] + '4'), (np.void, 'void'), (np.int32, 'int32'), (np.bool, 'bool'), (bool, 'bool'), (float, 'float64'), ('= (2,7)")) class TestOrderedDict(unittest.TestCase): def test_init(self): try: OrderedDict([('a', 1), ('b', 2)], None) # too many args assert False except TypeError: pass else: assert False pairs = [('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', 5)] self.assertEqual(sorted(OrderedDict(dict(pairs)).items()), pairs) # dict input self.assertEqual(sorted(OrderedDict(**dict(pairs)).items()), pairs) # kwds input self.assertEqual(list(OrderedDict(pairs).items()), pairs) # pairs input self.assertEqual(list(OrderedDict([('a', 1), ('b', 2), ('c', 9), ('d', 4)], c=3, e=5).items()), pairs) # mixed input # make sure no positional args conflict with possible kwdargs self.assertEqual(inspect.getargspec(OrderedDict.__dict__['__init__']).args, ['self']) # Make sure that direct calls to __init__ do not clear previous contents d = OrderedDict([('a', 1), ('b', 2), ('c', 3), ('d', 44), ('e', 55)]) d.__init__([('e', 5), ('f', 6)], g=7, d=4) self.assertEqual(list(d.items()), [('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', 5), ('f', 6), ('g', 7)]) def test_update(self): try: OrderedDict().update([('a', 1), ('b', 2)], None) # too many args assert False except TypeError: pass else: assert False pairs = [('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', 5)] od = OrderedDict() od.update(dict(pairs)) self.assertEqual(sorted(od.items()), pairs) # dict input od = OrderedDict() od.update(**dict(pairs)) self.assertEqual(sorted(od.items()), pairs) # kwds input od = OrderedDict() od.update(pairs) self.assertEqual(list(od.items()), pairs) # pairs input od = OrderedDict() od.update([('a', 1), ('b', 2), ('c', 9), ('d', 4)], c=3, e=5) self.assertEqual(list(od.items()), pairs) # mixed input # Make sure that direct calls to update do not clear previous contents # add that updates items are not moved to the end d = OrderedDict([('a', 1), ('b', 2), ('c', 3), ('d', 44), ('e', 55)]) d.update([('e', 5), ('f', 6)], g=7, d=4) self.assertEqual(list(d.items()), [('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', 5), ('f', 6), ('g', 7)]) def test_clear(self): pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)] shuffle(pairs) od = OrderedDict(pairs) self.assertEqual(len(od), len(pairs)) od.clear() self.assertEqual(len(od), 0) def test_delitem(self): pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)] od = OrderedDict(pairs) del od['a'] self.assertNotIn('a', od) try: del od['a'] assert False except KeyError: pass else: assert False self.assertEqual(list(od.items()), pairs[:2] + pairs[3:]) def test_setitem(self): od = OrderedDict([('d', 1), ('b', 2), ('c', 3), ('a', 4), ('e', 5)]) od['c'] = 10 # existing element od['f'] = 20 # new element self.assertEqual(list(od.items()), [('d', 1), ('b', 2), ('c', 10), ('a', 4), ('e', 5), ('f', 20)]) def test_iterators(self): pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)] shuffle(pairs) od = OrderedDict(pairs) self.assertEqual(list(od), [t[0] for t in pairs]) self.assertEqual(od.keys()[:], [t[0] for t in pairs]) self.assertEqual(od.values()[:], [t[1] for t in pairs]) self.assertEqual(od.items()[:], pairs) self.assertEqual(list(six.iterkeys(od)), [t[0] for t in pairs]) self.assertEqual(list(six.itervalues(od)), [t[1] for t in pairs]) self.assertEqual(list(six.iteritems(od)), pairs) self.assertEqual(list(reversed(od)), [t[0] for t in reversed(pairs)]) def test_popitem(self): pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)] shuffle(pairs) od = OrderedDict(pairs) while pairs: self.assertEqual(od.popitem(), pairs.pop()) try: od.popitem() assert False except: pass else: assert False self.assertEqual(len(od), 0) def test_pop(self): pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)] shuffle(pairs) od = OrderedDict(pairs) shuffle(pairs) while pairs: k, v = pairs.pop() self.assertEqual(od.pop(k), v) try: od.pop('xyz') assert False except KeyError: pass else: assert False self.assertEqual(len(od), 0) self.assertEqual(od.pop(k, 12345), 12345) def test_equality(self): pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)] shuffle(pairs) od1 = OrderedDict(pairs) od2 = OrderedDict(pairs) self.assertEqual(od1, od2) # same order implies equality pairs = pairs[2:] + pairs[:2] od2 = OrderedDict(pairs) self.assertNotEqual(od1, od2) # different order implies inequality # comparison to regular dict is not order sensitive self.assertEqual(od1, dict(od2)) self.assertEqual(dict(od2), od1) # different length implied inequality self.assertNotEqual(od1, OrderedDict(pairs[:-1])) def test_copying(self): # Check that ordered dicts are copyable, deepcopyable, picklable, # and have a repr/eval round-trip pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)] od = OrderedDict(pairs) update_test = OrderedDict() update_test.update(od) for i, dup in enumerate([ od.copy(), copy.copy(od), copy.deepcopy(od), pickle.loads(pickle.dumps(od, 0)), pickle.loads(pickle.dumps(od, 1)), pickle.loads(pickle.dumps(od, 2)), pickle.loads(pickle.dumps(od, -1)), eval(repr(od)), update_test, OrderedDict(od), ]): self.assertTrue(dup is not od) self.assertEquals(dup, od) self.assertEquals(list(dup.items()), list(od.items())) self.assertEquals(len(dup), len(od)) self.assertEquals(type(dup), type(od)) def test_yaml_linkage(self): # Verify that __reduce__ is setup in a way that supports PyYAML's dump() feature. # In yaml, lists are native but tuples are not. pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)] od = OrderedDict(pairs) # yaml.dump(od) --> # '!!python/object/apply:__main__.OrderedDict\n- - [a, 1]\n - [b, 2]\n' self.assertTrue(all(type(pair)==list for pair in od.__reduce__()[1])) def test_reduce_not_too_fat(self): # do not save instance dictionary if not needed pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)] od = OrderedDict(pairs) self.assertEqual(len(od.__reduce__()), 2) od.x = 10 self.assertEqual(len(od.__reduce__()), 3) def test_repr(self): od = OrderedDict([('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)]) self.assertEqual(repr(od), "OrderedDict([(u'c', 1), (u'b', 2), (u'a', 3), (u'd', 4), (u'e', 5), (u'f', 6)])") self.assertEqual(eval(repr(od)), od) self.assertEqual(repr(OrderedDict()), "OrderedDict()") def test_setdefault(self): pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)] shuffle(pairs) od = OrderedDict(pairs) pair_order = list(od.items()) self.assertEqual(od.setdefault('a', 10), 3) # make sure order didn't change self.assertEqual(list(od.items()), pair_order) self.assertEqual(od.setdefault('x', 10), 10) # make sure 'x' is added to the end self.assertEqual(list(od.items())[-1], ('x', 10)) def test_reinsert(self): # Given insert a, insert b, delete a, re-insert a, # verify that a is now later than b. od = OrderedDict() od['a'] = 1 od['b'] = 2 del od['a'] od['a'] = 1 self.assertEqual(list(od.items()), [('b', 2), ('a', 1)]) def assertIn(self, key, d): self.assertTrue(key in d) def assertNotIn(self, key, d): self.assertFalse(key in d) class GeneralMappingTests(mapping_tests.BasicTestMappingProtocol): type2test = OrderedDict def test_popitem(self): d = self._empty_mapping() self.assertRaises(KeyError, d.popitem) class MyOrderedDict(OrderedDict): pass class SubclassMappingTests(mapping_tests.BasicTestMappingProtocol): type2test = MyOrderedDict def test_popitem(self): d = self._empty_mapping() self.assertRaises(KeyError, d.popitem) astropy-1.1.1/astropy/utils/data.py0000644001134200020070000013740312644017723020261 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains helper functions for accessing, downloading, and caching data files. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six from ..extern.six.moves import urllib import atexit import contextlib import fnmatch import hashlib import os import io import shutil import socket import sys import time from tempfile import NamedTemporaryFile, gettempdir from warnings import warn from .. import config as _config from ..utils.exceptions import AstropyWarning from ..utils.introspection import find_current_module, resolve_name __all__ = [ 'Conf', 'conf', 'get_readable_fileobj', 'get_file_contents', 'get_pkg_data_fileobj', 'get_pkg_data_filename', 'get_pkg_data_contents', 'get_pkg_data_fileobjs', 'get_pkg_data_filenames', 'compute_hash', 'clear_download_cache', 'CacheMissingWarning', 'get_free_space_in_dir', 'check_free_space_in_dir', 'download_file', 'download_files_in_parallel', 'is_url_in_cache'] class Conf(_config.ConfigNamespace): """ Configuration parameters for `astropy.utils.data`. """ dataurl = _config.ConfigItem( 'http://data.astropy.org/', 'URL for astropy remote data site.') remote_timeout = _config.ConfigItem( 3., 'Time to wait for remote data queries (in seconds).', aliases=['astropy.coordinates.name_resolve.name_resolve_timeout']) compute_hash_block_size = _config.ConfigItem( 2 ** 16, # 64K 'Block size for computing MD5 file hashes.') download_block_size = _config.ConfigItem( 2 ** 16, # 64K 'Number of bytes of remote data to download per step.') download_cache_lock_attempts = _config.ConfigItem( 5, 'Number of times to try to get the lock ' + 'while accessing the data cache before giving up.') delete_temporary_downloads_at_exit = _config.ConfigItem( True, 'If True, temporary download files created when the cache is ' 'inaccessible will be deleted at the end of the python session.') conf = Conf() DATAURL = _config.ConfigAlias( '0.4', 'DATAURL', 'dataurl') REMOTE_TIMEOUT = _config.ConfigAlias( '0.4', 'REMOTE_TIMEOUT', 'remote_timeout') COMPUTE_HASH_BLOCK_SIZE = _config.ConfigAlias( '0.4', 'COMPUTE_HASH_BLOCK_SIZE', 'compute_hash_block_size') DOWNLOAD_CACHE_BLOCK_SIZE = _config.ConfigAlias( '0.4', 'DOWNLOAD_CACHE_BLOCK_SIZE', 'download_block_size') DOWNLOAD_CACHE_LOCK_ATTEMPTS = _config.ConfigAlias( '0.4', 'DOWNLOAD_CACHE_LOCK_ATTEMPTS', 'download_cache_lock_attempts') DELETE_TEMPORARY_DOWNLOADS_AT_EXIT = _config.ConfigAlias( '0.4', 'DELETE_TEMPORARY_DOWNLOADS_AT_EXIT', 'delete_temporary_downloads_at_exit') class CacheMissingWarning(AstropyWarning): """ This warning indicates the standard cache directory is not accessible, with the first argument providing the warning message. If args[1] is present, it is a filename indicating the path to a temporary file that was created to store a remote data download in the absence of the cache. """ def _is_url(string): """ Test whether a string is a valid URL Parameters ---------- string : str The string to test """ url = urllib.parse.urlparse(string) # url[0]==url.scheme, but url[0] is py 2.6-compat # we can't just check that url[0] is not an empty string, because # file paths in windows would return a non-empty scheme (e.g. e:\\ # returns 'e'). return url[0].lower() in ['http', 'https', 'ftp', 'sftp', 'ssh', 'file'] def _is_inside(path, parent_path): # We have to try realpath too to avoid issues with symlinks, but we leave # abspath because some systems like debian have the absolute path (with no # symlinks followed) match, but the real directories in different # locations, so need to try both cases. return os.path.abspath(path).startswith(os.path.abspath(parent_path)) \ or os.path.realpath(path).startswith(os.path.realpath(parent_path)) @contextlib.contextmanager def get_readable_fileobj(name_or_obj, encoding=None, cache=False, show_progress=True, remote_timeout=None): """ Given a filename or a readable file-like object, return a context manager that yields a readable file-like object. This supports passing filenames, URLs, and readable file-like objects, any of which can be compressed in gzip, bzip2 or lzma (xz) if the appropriate compression libraries are provided by the Python installation. Notes ----- This function is a context manager, and should be used for example as:: with get_readable_fileobj('file.dat') as f: contents = f.read() Parameters ---------- name_or_obj : str or file-like object The filename of the file to access (if given as a string), or the file-like object to access. If a file-like object, it must be opened in binary mode. encoding : str, optional When `None` (default), returns a file-like object with a ``read`` method that on Python 2.x returns `bytes` objects and on Python 3.x returns `str` (`unicode`) objects, using `locale.getpreferredencoding` as an encoding. This matches the default behavior of the built-in `open` when no ``mode`` argument is provided. When ``'binary'``, returns a file-like object where its ``read`` method returns `bytes` objects. When another string, it is the name of an encoding, and the file-like object's ``read`` method will return `str` (`unicode`) objects, decoded from binary using the given encoding. cache : bool, optional Whether to cache the contents of remote URLs. show_progress : bool, optional Whether to display a progress bar if the file is downloaded from a remote server. Default is `True`. remote_timeout : float Timeout for remote requests in seconds (default is the configurable REMOTE_TIMEOUT, which is 3s by default) Returns ------- file : readable file-like object """ # close_fds is a list of file handles created by this function # that need to be closed. We don't want to always just close the # returned file handle, because it may simply be the file handle # passed in. In that case it is not the responsibility of this # function to close it: doing so could result in a "double close" # and an "invalid file descriptor" exception. close_fds = [] delete_fds = [] if remote_timeout is None: # use configfile default remote_timeout = conf.remote_timeout # Get a file object to the content if isinstance(name_or_obj, six.string_types): is_url = _is_url(name_or_obj) if is_url: name_or_obj = download_file( name_or_obj, cache=cache, show_progress=show_progress, timeout=remote_timeout) if six.PY3: fileobj = io.FileIO(name_or_obj, 'r') elif six.PY2: fileobj = open(name_or_obj, 'rb') if is_url and not cache: delete_fds.append(fileobj) close_fds.append(fileobj) else: fileobj = name_or_obj # Check if the file object supports random access, and if not, # then wrap it in a BytesIO buffer. It would be nicer to use a # BufferedReader to avoid reading loading the whole file first, # but that is not compatible with streams or urllib2.urlopen # objects on Python 2.x. if not hasattr(fileobj, 'seek'): fileobj = io.BytesIO(fileobj.read()) # Now read enough bytes to look at signature signature = fileobj.read(4) fileobj.seek(0) if signature[:3] == b'\x1f\x8b\x08': # gzip import struct try: from .compat import gzip fileobj_new = gzip.GzipFile(fileobj=fileobj, mode='rb') fileobj_new.read(1) # need to check that the file is really gzip except (IOError, EOFError): # invalid gzip file fileobj.seek(0) fileobj_new.close() except struct.error: # invalid gzip file on Python 3 fileobj.seek(0) fileobj_new.close() else: fileobj_new.seek(0) fileobj = fileobj_new elif signature[:3] == b'BZh': # bzip2 try: import bz2 except ImportError: for fd in close_fds: fd.close() raise ValueError( ".bz2 format files are not supported since the Python " "interpreter does not include the bz2 module") try: # bz2.BZ2File does not support file objects, only filenames, so we # need to write the data to a temporary file with NamedTemporaryFile("wb", delete=False) as tmp: tmp.write(fileobj.read()) tmp.close() fileobj_new = bz2.BZ2File(tmp.name, mode='rb') fileobj_new.read(1) # need to check that the file is really bzip2 except IOError: # invalid bzip2 file fileobj.seek(0) fileobj_new.close() # raise else: fileobj_new.seek(0) close_fds.append(fileobj_new) fileobj = fileobj_new elif signature[:3] == b'\xfd7z': # xz try: # for Python < 3.3 try backports.lzma; pyliblzma installs as lzma, # but does not support TextIOWrapper if sys.version_info >= (3,3,0): import lzma fileobj_new = lzma.LZMAFile(fileobj, mode='rb') else: from backports import lzma from backports.lzma import LZMAFile # when called with file object, returns a non-seekable instance # need a filename here, too, so have to write the data to a # temporary file with NamedTemporaryFile("wb", delete=False) as tmp: tmp.write(fileobj.read()) tmp.close() fileobj_new = LZMAFile(tmp.name, mode='rb') fileobj_new.read(1) # need to check that the file is really xz except ImportError: for fd in close_fds: fd.close() raise ValueError( ".xz format files are not supported since the Python " "interpreter does not include the lzma module. " "On Python versions < 3.3 consider installing backports.lzma") except (IOError, EOFError) as e: # invalid xz file fileobj.seek(0) fileobj_new.close() # should we propagate this to the caller to signal bad content? # raise ValueError(e) else: fileobj_new.seek(0) fileobj = fileobj_new # By this point, we have a file, io.FileIO, gzip.GzipFile, bz2.BZ2File # or lzma.LZMAFile instance opened in binary mode (that is, read # returns bytes). Now we need to, if requested, wrap it in a # io.TextIOWrapper so read will return unicode based on the # encoding parameter. if six.PY3: needs_textio_wrapper = encoding != 'binary' elif six.PY2: needs_textio_wrapper = encoding != 'binary' and encoding is not None if needs_textio_wrapper: # A bz2.BZ2File can not be wrapped by a TextIOWrapper, # so we decompress it to a temporary file and then # return a handle to that. try: import bz2 except ImportError: pass else: if isinstance(fileobj, bz2.BZ2File): tmp = NamedTemporaryFile("wb", delete=False) data = fileobj.read() tmp.write(data) tmp.close() delete_fds.append(tmp) if six.PY3: fileobj = io.FileIO(tmp.name, 'r') elif six.PY2: fileobj = open(tmp.name, 'rb') close_fds.append(fileobj) # On Python 2.x, we need to first wrap the regular `file` # instance in a `io.FileIO` object before it can be # wrapped in a `TextIOWrapper`. We don't just create an # `io.FileIO` object in the first place, because we can't # get a raw file descriptor out of it on Python 2.x, which # is required for the XML iterparser. if six.PY2 and isinstance(fileobj, file): fileobj = io.FileIO(fileobj.fileno()) fileobj = io.BufferedReader(fileobj) fileobj = io.TextIOWrapper(fileobj, encoding=encoding) # Ensure that file is at the start - io.FileIO will for # example not always be at the start: # >>> import io # >>> f = open('test.fits', 'rb') # >>> f.read(4) # 'SIMP' # >>> f.seek(0) # >>> fileobj = io.FileIO(f.fileno()) # >>> fileobj.tell() # 4096L fileobj.seek(0) try: yield fileobj finally: for fd in close_fds: fd.close() for fd in delete_fds: os.remove(fd.name) def get_file_contents(*args, **kwargs): """ Retrieves the contents of a filename or file-like object. See the `get_readable_fileobj` docstring for details on parameters. Returns ------- content The content of the file (as requested by ``encoding``). """ with get_readable_fileobj(*args, **kwargs) as f: return f.read() def get_pkg_data_fileobj(data_name, package=None, encoding=None, cache=True): """ Retrieves a data file from the standard locations for the package and provides the file as a file-like object that reads bytes. Parameters ---------- data_name : str Name/location of the desired data file. One of the following: * The name of a data file included in the source distribution. The path is relative to the module calling this function. For example, if calling from ``astropy.pkname``, use ``'data/file.dat'`` to get the file in ``astropy/pkgname/data/file.dat``. Double-dots can be used to go up a level. In the same example, use ``'../data/file.dat'`` to get ``astropy/data/file.dat``. * If a matching local file does not exist, the Astropy data server will be queried for the file. * A hash like that produced by `compute_hash` can be requested, prefixed by 'hash/' e.g. 'hash/34c33b3eb0d56eb9462003af249eff28'. The hash will first be searched for locally, and if not found, the Astropy data server will be queried. package : str, optional If specified, look for a file relative to the given package, rather than the default of looking relative to the calling module's package. encoding : str, optional When `None` (default), returns a file-like object with a ``read`` method that on Python 2.x returns `bytes` objects and on Python 3.x returns `str` (`unicode`) objects, using `locale.getpreferredencoding` as an encoding. This matches the default behavior of the built-in `open` when no ``mode`` argument is provided. When ``'binary'``, returns a file-like object where its ``read`` method returns `bytes` objects. When another string, it is the name of an encoding, and the file-like object's ``read`` method will return `str` (`unicode`) objects, decoded from binary using the given encoding. cache : bool If True, the file will be downloaded and saved locally or the already-cached local copy will be accessed. If False, the file-like object will directly access the resource (e.g. if a remote URL is accessed, an object like that from `urllib2.urlopen` on Python 2 or `urllib.request.urlopen` on Python 3 is returned). Returns ------- fileobj : file-like An object with the contents of the data file available via ``read`` function. Can be used as part of a ``with`` statement, automatically closing itself after the ``with`` block. Raises ------ urllib2.URLError, urllib.error.URLError If a remote file cannot be found. IOError If problems occur writing or reading a local file. Examples -------- This will retrieve a data file and its contents for the `astropy.wcs` tests:: >>> from astropy.utils.data import get_pkg_data_fileobj >>> with get_pkg_data_fileobj('data/3d_cd.hdr', ... package='astropy.wcs.tests') as fobj: ... fcontents = fobj.read() ... This next example would download a data file from the astropy data server because the ``allsky/allsky_rosat.fits`` file is not present in the source distribution. It will also save the file locally so the next time it is accessed it won't need to be downloaded.:: >>> from astropy.utils.data import get_pkg_data_fileobj >>> with get_pkg_data_fileobj('allsky/allsky_rosat.fits', ... encoding='binary') as fobj: # doctest: +REMOTE_DATA ... fcontents = fobj.read() ... Downloading http://data.astropy.org/allsky/allsky_rosat.fits [Done] This does the same thing but does *not* cache it locally:: >>> with get_pkg_data_fileobj('allsky/allsky_rosat.fits', ... encoding='binary', cache=False) as fobj: # doctest: +REMOTE_DATA ... fcontents = fobj.read() ... Downloading http://data.astropy.org/allsky/allsky_rosat.fits [Done] See Also -------- get_pkg_data_contents : returns the contents of a file or url as a bytes object get_pkg_data_filename : returns a local name for a file containing the data """ datafn = _find_pkg_data_path(data_name, package=package) if os.path.isdir(datafn): raise IOError("Tried to access a data file that's actually " "a package data directory") elif os.path.isfile(datafn): # local file return get_readable_fileobj(datafn, encoding=encoding) else: # remote file return get_readable_fileobj(conf.dataurl + datafn, encoding=encoding, cache=cache) def get_pkg_data_filename(data_name, package=None, show_progress=True, remote_timeout=None): """ Retrieves a data file from the standard locations for the package and provides a local filename for the data. This function is similar to `get_pkg_data_fileobj` but returns the file *name* instead of a readable file-like object. This means that this function must always cache remote files locally, unlike `get_pkg_data_fileobj`. Parameters ---------- data_name : str Name/location of the desired data file. One of the following: * The name of a data file included in the source distribution. The path is relative to the module calling this function. For example, if calling from ``astropy.pkname``, use ``'data/file.dat'`` to get the file in ``astropy/pkgname/data/file.dat``. Double-dots can be used to go up a level. In the same example, use ``'../data/file.dat'`` to get ``astropy/data/file.dat``. * If a matching local file does not exist, the Astropy data server will be queried for the file. * A hash like that produced by `compute_hash` can be requested, prefixed by 'hash/' e.g. 'hash/34c33b3eb0d56eb9462003af249eff28'. The hash will first be searched for locally, and if not found, the Astropy data server will be queried. package : str, optional If specified, look for a file relative to the given package, rather than the default of looking relative to the calling module's package. show_progress : bool, optional Whether to display a progress bar if the file is downloaded from a remote server. Default is `True`. remote_timeout : float Timeout for the requests in seconds (default is the configurable `astropy.utils.data.Conf.remote_timeout`, which is 3s by default) Raises ------ urllib2.URLError, urllib.error.URLError If a remote file cannot be found. IOError If problems occur writing or reading a local file. Returns ------- filename : str A file path on the local file system corresponding to the data requested in ``data_name``. Examples -------- This will retrieve the contents of the data file for the `astropy.wcs` tests:: >>> from astropy.utils.data import get_pkg_data_filename >>> fn = get_pkg_data_filename('data/3d_cd.hdr', ... package='astropy.wcs.tests') >>> with open(fn) as f: ... fcontents = f.read() ... This retrieves a data file by hash either locally or from the astropy data server:: >>> from astropy.utils.data import get_pkg_data_filename >>> fn = get_pkg_data_filename('hash/34c33b3eb0d56eb9462003af249eff28') # doctest: +SKIP >>> with open(fn) as f: ... fcontents = f.read() ... See Also -------- get_pkg_data_contents : returns the contents of a file or url as a bytes object get_pkg_data_fileobj : returns a file-like object with the data """ data_name = os.path.normpath(data_name) if remote_timeout is None: # use configfile default remote_timeout = conf.remote_timeout if data_name.startswith('hash/'): # first try looking for a local version if a hash is specified hashfn = _find_hash_fn(data_name[5:]) if hashfn is None: return download_file( conf.dataurl + data_name, cache=True, show_progress=show_progress, timeout=remote_timeout) else: return hashfn else: datafn = _find_pkg_data_path(data_name, package=package) if os.path.isdir(datafn): raise IOError("Tried to access a data file that's actually " "a package data directory") elif os.path.isfile(datafn): # local file return datafn else: # remote file return download_file( conf.dataurl + data_name, cache=True, show_progress=show_progress, timeout=remote_timeout) def get_pkg_data_contents(data_name, package=None, encoding=None, cache=True): """ Retrieves a data file from the standard locations and returns its contents as a bytes object. Parameters ---------- data_name : str Name/location of the desired data file. One of the following: * The name of a data file included in the source distribution. The path is relative to the module calling this function. For example, if calling from ``astropy.pkname``, use ``'data/file.dat'`` to get the file in ``astropy/pkgname/data/file.dat``. Double-dots can be used to go up a level. In the same example, use ``'../data/file.dat'`` to get ``astropy/data/file.dat``. * If a matching local file does not exist, the Astropy data server will be queried for the file. * A hash like that produced by `compute_hash` can be requested, prefixed by 'hash/' e.g. 'hash/34c33b3eb0d56eb9462003af249eff28'. The hash will first be searched for locally, and if not found, the Astropy data server will be queried. * A URL to some other file. package : str, optional If specified, look for a file relative to the given package, rather than the default of looking relative to the calling module's package. encoding : str, optional When `None` (default), returns a file-like object with a ``read`` method that on Python 2.x returns `bytes` objects and on Python 3.x returns `str` (`unicode`) objects, using `locale.getpreferredencoding` as an encoding. This matches the default behavior of the built-in `open` when no ``mode`` argument is provided. When ``'binary'``, returns a file-like object where its ``read`` method returns `bytes` objects. When another string, it is the name of an encoding, and the file-like object's ``read`` method will return `str` (`unicode`) objects, decoded from binary using the given encoding. cache : bool If True, the file will be downloaded and saved locally or the already-cached local copy will be accessed. If False, the file-like object will directly access the resource (e.g. if a remote URL is accessed, an object like that from `urllib2.urlopen` on Python 2 or `urllib.request.urlopen` on Python 3 is returned). Returns ------- contents : bytes The complete contents of the file as a bytes object. Raises ------ urllib2.URLError, urllib.error.URLError If a remote file cannot be found. IOError If problems occur writing or reading a local file. See Also -------- get_pkg_data_fileobj : returns a file-like object with the data get_pkg_data_filename : returns a local name for a file containing the data """ with get_pkg_data_fileobj(data_name, package=package, encoding=encoding, cache=cache) as fd: contents = fd.read() return contents def get_pkg_data_filenames(datadir, package=None, pattern='*'): """ Returns the path of all of the data files in a given directory that match a given glob pattern. Parameters ---------- datadir : str Name/location of the desired data files. One of the following: * The name of a directory included in the source distribution. The path is relative to the module calling this function. For example, if calling from ``astropy.pkname``, use ``'data'`` to get the files in ``astropy/pkgname/data``. * Remote URLs are not currently supported. package : str, optional If specified, look for a file relative to the given package, rather than the default of looking relative to the calling module's package. pattern : str, optional A UNIX-style filename glob pattern to match files. See the `glob` module in the standard library for more information. By default, matches all files. Returns ------- filenames : iterator of str Paths on the local filesystem in *datadir* matching *pattern*. Examples -------- This will retrieve the contents of the data file for the `astropy.wcs` tests:: >>> from astropy.utils.data import get_pkg_data_filenames >>> for fn in get_pkg_data_filenames('maps', 'astropy.wcs.tests', ... '*.hdr'): ... with open(fn) as f: ... fcontents = f.read() ... """ path = _find_pkg_data_path(datadir, package=package) if os.path.isfile(path): raise IOError( "Tried to access a data directory that's actually " "a package data file") elif os.path.isdir(path): for filename in os.listdir(path): if fnmatch.fnmatch(filename, pattern): yield os.path.join(path, filename) else: raise IOError("Path not found") def get_pkg_data_fileobjs(datadir, package=None, pattern='*', encoding=None): """ Returns readable file objects for all of the data files in a given directory that match a given glob pattern. Parameters ---------- datadir : str Name/location of the desired data files. One of the following: * The name of a directory included in the source distribution. The path is relative to the module calling this function. For example, if calling from ``astropy.pkname``, use ``'data'`` to get the files in ``astropy/pkgname/data`` * Remote URLs are not currently supported package : str, optional If specified, look for a file relative to the given package, rather than the default of looking relative to the calling module's package. pattern : str, optional A UNIX-style filename glob pattern to match files. See the `glob` module in the standard library for more information. By default, matches all files. encoding : str, optional When `None` (default), returns a file-like object with a ``read`` method that on Python 2.x returns `bytes` objects and on Python 3.x returns `str` (`unicode`) objects, using `locale.getpreferredencoding` as an encoding. This matches the default behavior of the built-in `open` when no ``mode`` argument is provided. When ``'binary'``, returns a file-like object where its ``read`` method returns `bytes` objects. When another string, it is the name of an encoding, and the file-like object's ``read`` method will return `str` (`unicode`) objects, decoded from binary using the given encoding. Returns ------- fileobjs : iterator of file objects File objects for each of the files on the local filesystem in *datadir* matching *pattern*. Examples -------- This will retrieve the contents of the data file for the `astropy.wcs` tests:: >>> from astropy.utils.data import get_pkg_data_filenames >>> for fd in get_pkg_data_fileobjs('maps', 'astropy.wcs.tests', ... '*.hdr'): ... fcontents = fd.read() ... """ for fn in get_pkg_data_filenames(datadir, package=package, pattern=pattern): with get_readable_fileobj(fn, encoding=encoding) as fd: yield fd def compute_hash(localfn): """ Computes the MD5 hash for a file. The hash for a data file is used for looking up data files in a unique fashion. This is of particular use for tests; a test may require a particular version of a particular file, in which case it can be accessed via hash to get the appropriate version. Typically, if you wish to write a test that requires a particular data file, you will want to submit that file to the astropy data servers, and use e.g. ``get_pkg_data_filename('hash/34c33b3eb0d56eb9462003af249eff28')``, but with the hash for your file in place of the hash in the example. Parameters ---------- localfn : str The path to the file for which the hash should be generated. Returns ------- md5hash : str The hex digest of the MD5 hash for the contents of the ``localfn`` file. """ with open(localfn, 'rb') as f: h = hashlib.md5() block = f.read(conf.compute_hash_block_size) while block: h.update(block) block = f.read(conf.compute_hash_block_size) return h.hexdigest() def _find_pkg_data_path(data_name, package=None): """ Look for data in the source-included data directories and return the path. """ if package is None: module = find_current_module(1, True) if module is None: # not called from inside an astropy package. So just pass name # through return data_name if not hasattr(module, '__package__') or not module.__package__: # The __package__ attribute may be missing or set to None; see # PEP-366, also astropy issue #1256 if '.' in module.__name__: package = module.__name__.rpartition('.')[0] else: package = module.__name__ else: package = module.__package__ else: module = resolve_name(package) rootpkgname = package.partition('.')[0] rootpkg = resolve_name(rootpkgname) module_path = os.path.dirname(module.__file__) path = os.path.join(module_path, data_name) root_dir = os.path.dirname(rootpkg.__file__) assert _is_inside(path, root_dir), \ ("attempted to get a local data file outside " "of the " + rootpkgname + " tree") return path def _find_hash_fn(hash): """ Looks for a local file by hash - returns file name if found and a valid file, otherwise returns None. """ try: dldir, urlmapfn = _get_download_cache_locs() except (IOError, OSError) as e: msg = 'Could not access cache directory to search for data file: ' warn(CacheMissingWarning(msg + str(e))) return None hashfn = os.path.join(dldir, hash) if os.path.isfile(hashfn): return hashfn else: return None def get_free_space_in_dir(path): """ Given a path to a directory, returns the amount of free space (in bytes) on that filesystem. Parameters ---------- path : str The path to a directory Returns ------- bytes : int The amount of free space on the partition that the directory is on. """ if sys.platform.startswith('win'): import ctypes free_bytes = ctypes.c_ulonglong(0) retval = ctypes.windll.kernel32.GetDiskFreeSpaceExW( ctypes.c_wchar_p(path), None, None, ctypes.pointer(free_bytes)) if retval == 0: raise IOError('Checking free space on %r failed unexpectedly.' % path) return free_bytes.value else: stat = os.statvfs(path) return stat.f_bavail * stat.f_frsize def check_free_space_in_dir(path, size): """ Determines if a given directory has enough space to hold a file of a given size. Raises an IOError if the file would be too large. Parameters ---------- path : str The path to a directory size : int A proposed filesize (in bytes) Raises ------- IOError : There is not enough room on the filesystem """ from ..utils.console import human_file_size space = get_free_space_in_dir(path) if space < size: raise IOError( "Not enough free space in '{0}' " "to download a {1} file".format( path, human_file_size(size))) def download_file(remote_url, cache=False, show_progress=True, timeout=None): """ Accepts a URL, downloads and optionally caches the result returning the filename, with a name determined by the file's MD5 hash. If ``cache=True`` and the file is present in the cache, just returns the filename. Parameters ---------- remote_url : str The URL of the file to download cache : bool, optional Whether to use the cache show_progress : bool, optional Whether to display a progress bar during the download (default is `True`) timeout : float, optional The timeout, in seconds. Otherwise, use `astropy.utils.data.Conf.remote_timeout`. Returns ------- local_path : str Returns the local path that the file was download to. Raises ------ urllib2.URLError, urllib.error.URLError Whenever there's a problem getting the remote file. """ from ..utils.console import ProgressBarOrSpinner if timeout is None: timeout = conf.remote_timeout missing_cache = False if timeout is None: # use configfile default timeout = REMOTE_TIMEOUT() if cache: try: dldir, urlmapfn = _get_download_cache_locs() except (IOError, OSError) as e: msg = 'Remote data cache could not be accessed due to ' estr = '' if len(e.args) < 1 else (': ' + str(e)) warn(CacheMissingWarning(msg + e.__class__.__name__ + estr)) cache = False missing_cache = True # indicates that the cache is missing to raise a warning later if six.PY2 and isinstance(remote_url, six.text_type): # shelve DBs don't accept unicode strings in Python 2 url_key = remote_url.encode('utf-8') else: url_key = remote_url try: if cache: # We don't need to acquire the lock here, since we are only reading with _open_shelve(urlmapfn, True) as url2hash: if url_key in url2hash: return url2hash[url_key] with contextlib.closing(urllib.request.urlopen( remote_url, timeout=timeout)) as remote: #keep a hash to rename the local file to the hashed name hash = hashlib.md5() info = remote.info() if 'Content-Length' in info: try: size = int(info['Content-Length']) except ValueError: size = None else: size = None if size is not None: check_free_space_in_dir(gettempdir(), size) if cache: check_free_space_in_dir(dldir, size) if show_progress: progress_stream = sys.stdout else: progress_stream = io.StringIO() dlmsg = "Downloading {0}".format(remote_url) with ProgressBarOrSpinner(size, dlmsg, file=progress_stream) as p: with NamedTemporaryFile(delete=False) as f: try: bytes_read = 0 block = remote.read(conf.download_block_size) while block: f.write(block) hash.update(block) bytes_read += len(block) p.update(bytes_read) block = remote.read(conf.download_block_size) except: if os.path.exists(f.name): os.remove(f.name) raise if cache: _acquire_download_cache_lock() try: with _open_shelve(urlmapfn, True) as url2hash: # We check now to see if another process has # inadvertently written the file underneath us # already if url_key in url2hash: return url2hash[url_key] local_path = os.path.join(dldir, hash.hexdigest()) shutil.move(f.name, local_path) url2hash[url_key] = local_path finally: _release_download_cache_lock() else: local_path = f.name if missing_cache: msg = ('File downloaded to temporary location due to problem ' 'with cache directory and will not be cached.') warn(CacheMissingWarning(msg, local_path)) if conf.delete_temporary_downloads_at_exit: global _tempfilestodel _tempfilestodel.append(local_path) except urllib.error.URLError as e: if hasattr(e, 'reason') and hasattr(e.reason, 'errno') and e.reason.errno == 8: e.reason.strerror = e.reason.strerror + '. requested URL: ' + remote_url e.reason.args = (e.reason.errno, e.reason.strerror) raise e except socket.timeout as e: # this isn't supposed to happen, but occasionally a socket.timeout gets # through. It's supposed to be caught in `urrlib2` and raised in this # way, but for some reason in mysterious circumstances it doesn't. So # we'll just re-raise it here instead raise urllib.error.URLError(e) return local_path def is_url_in_cache(url_key): """ Check if a download from ``url_key`` is in the cache. Parameters ---------- url_key : string The URL retrieved Returns ------- in_cache : bool `True` if a download from ``url_key`` is in the cache """ # The code below is modified from astropy.utils.data.download_file() try: dldir, urlmapfn = _get_download_cache_locs() except (IOError, OSError) as e: msg = 'Remote data cache could not be accessed due to ' estr = '' if len(e.args) < 1 else (': ' + str(e)) warn(CacheMissingWarning(msg + e.__class__.__name__ + estr)) return False if six.PY2 and isinstance(url_key, six.text_type): # shelve DBs don't accept unicode strings in Python 2 url_key = url_key.encode('utf-8') with _open_shelve(urlmapfn, True) as url2hash: if url_key in url2hash: return True return False def _do_download_files_in_parallel(args): return download_file(*args, show_progress=False) def download_files_in_parallel(urls, cache=False, show_progress=True, timeout=None): """ Downloads multiple files in parallel from the given URLs. Blocks until all files have downloaded. The result is a list of local file paths corresponding to the given urls. Parameters ---------- urls : list of str The URLs to retrieve. cache : bool, optional Whether to use the cache show_progress : bool, optional Whether to display a progress bar during the download (default is `True`) timeout : float, optional Timeout for the requests in seconds (default is the configurable `astropy.utils.data.Conf.remote_timeout`). Returns ------- paths : list of str The local file paths corresponding to the downloaded URLs. """ from .console import ProgressBar if timeout is None: timeout = conf.remote_timeout if show_progress: progress = sys.stdout else: progress = io.BytesIO() if timeout is None: # use configfile default timeout = REMOTE_TIMEOUT() # Combine duplicate URLs combined_urls = list(set(urls)) combined_paths = ProgressBar.map( _do_download_files_in_parallel, [(x, cache) for x in combined_urls], file=progress, multiprocess=True) paths = [] for url in urls: paths.append(combined_paths[combined_urls.index(url)]) return paths # This is used by download_file and _deltemps to determine the files to delete # when the interpreter exits _tempfilestodel = [] @atexit.register def _deltemps(): global _tempfilestodel if _tempfilestodel is not None: while len(_tempfilestodel) > 0: fn = _tempfilestodel.pop() if os.path.isfile(fn): os.remove(fn) def clear_download_cache(hashorurl=None): """ Clears the data file cache by deleting the local file(s). Parameters ---------- hashorurl : str or None If None, the whole cache is cleared. Otherwise, either specifies a hash for the cached file that is supposed to be deleted, or a URL that has previously been downloaded to the cache. Raises ------ OSEerror If the requested filename is not present in the data directory. """ try: dldir, urlmapfn = _get_download_cache_locs() except (IOError, OSError) as e: msg = 'Not clearing data cache - cache inacessable due to ' estr = '' if len(e.args) < 1 else (': ' + str(e)) warn(CacheMissingWarning(msg + e.__class__.__name__ + estr)) return _acquire_download_cache_lock() try: if hashorurl is None: if os.path.exists(dldir): shutil.rmtree(dldir) if os.path.exists(urlmapfn): os.unlink(urlmapfn) else: with _open_shelve(urlmapfn, True) as url2hash: filepath = os.path.join(dldir, hashorurl) assert _is_inside(filepath, dldir), \ ("attempted to use clear_download_cache on a path " "outside the data cache directory") # shelve DBs don't accept unicode strings as keys in Python 2 if six.PY2 and isinstance(hashorurl, six.text_type): hash_key = hashorurl.encode('utf-8') else: hash_key = hashorurl if os.path.exists(filepath): for k, v in list(six.iteritems(url2hash)): if v == filepath: del url2hash[k] os.unlink(filepath) elif hash_key in url2hash: filepath = url2hash[hash_key] del url2hash[hash_key] os.unlink(filepath) else: msg = 'Could not find file or url {0}' raise OSError(msg.format(hashorurl)) finally: # the lock will be gone if rmtree was used above, but release otherwise if os.path.exists(os.path.join(_get_download_cache_locs()[0], 'lock')): _release_download_cache_lock() def _get_download_cache_locs(): """ Finds the path to the data cache directory and makes them if they don't exist. Returns ------- datadir : str The path to the data cache directory. shelveloc : str The path to the shelve object that stores the cache info. """ from ..config.paths import get_cache_dir datadir = os.path.join(get_cache_dir(), 'download') shelveloc = os.path.join(get_cache_dir(), 'download_urlmap') if not os.path.exists(datadir): try: os.mkdir(datadir) except OSError as e: if not os.path.exists(datadir): raise elif not os.path.isdir(datadir): msg = 'Data cache directory {0} is not a directory' raise IOError(msg.format(datadir)) if os.path.isdir(shelveloc): msg = 'Data cache shelve object location {0} is a directory' raise IOError(msg.format(shelveloc)) return datadir, shelveloc def _open_shelve(shelffn, withclosing=False): """ opens a shelf in a way that is py3.x and py2.x compatible. If `withclosing` is True, it will be opened with closing, allowing use like: with _open_shelve('somefile',True) as s: ... """ import shelve if six.PY2: shelf = shelve.open(shelffn, protocol=2) elif six.PY3: shelf = shelve.open(shelffn + '.db', protocol=2) if withclosing: return contextlib.closing(shelf) else: return shelf #the cache directory must be locked before any writes are performed. Same for #the hash shelve, so this should be used for both. def _acquire_download_cache_lock(): """ Uses the lock directory method. This is good because `mkdir` is atomic at the system call level, so it's thread-safe. """ lockdir = os.path.join(_get_download_cache_locs()[0], 'lock') for i in range(conf.download_cache_lock_attempts): try: os.mkdir(lockdir) #write the pid of this process for informational purposes with open(os.path.join(lockdir, 'pid'), 'w') as f: f.write(str(os.getpid())) except OSError: time.sleep(1) else: return msg = ("Unable to acquire lock for cache directory ({0} exists). " "You may need to delete the lock if the python interpreter wasn't " "shut down properly.") raise RuntimeError(msg.format(lockdir)) def _release_download_cache_lock(): lockdir = os.path.join(_get_download_cache_locs()[0], 'lock') if os.path.isdir(lockdir): #if the pid file is present, be sure to remove it pidfn = os.path.join(lockdir, 'pid') if os.path.exists(pidfn): os.remove(pidfn) os.rmdir(lockdir) else: msg = 'Error releasing lock. "{0}" either does not exist or is not ' +\ 'a directory.' raise RuntimeError(msg.format(lockdir)) astropy-1.1.1/astropy/utils/state.py0000644001134200020070000001350312640262015020452 0ustar embrayscience00000000000000""" A simple class to manage a piece of global science state. See :ref:`config-developer` for more details. """ from contextlib import contextmanager import warnings from ..config import ConfigItem from .exceptions import AstropyDeprecationWarning from ..utils import find_current_module __all__ = ['ScienceState', 'ScienceStateAlias'] class ScienceState(object): """ Science state subclasses are used to manage global items that can affect science results. Subclasses will generally override `validate` to convert from any of the acceptable inputs (such as strings) to the appropriate internal objects, and set an initial value to the ``_value`` member so it has a default. Examples -------- :: class MyState(ScienceState): @classmethod def validate(cls, value): if value not in ('A', 'B', 'C'): raise ValueError("Must be one of A, B, C") return value """ def __init__(self): raise RuntimeError( "This class is a singleton. Do not instantiate.") @classmethod def get(cls): """ Get the current science state value. """ return cls.validate(cls._value) @classmethod def set(cls, value): """ Set the current science state value. """ class _Context(object): def __init__(self, parent, value): self._value = value self._parent = parent def __enter__(self): pass def __exit__(self, type, value, tb): self._parent._value = self._value ctx = _Context(cls, cls._value) value = cls.validate(value) cls._value = value return ctx @classmethod def validate(cls, value): """ Validate the value and convert it to its native type, if necessary. """ return value class ScienceStateAlias(ConfigItem): """ This is a backward compatibility layer for configuration items that moved to ScienceState classes in astropy 0.4. Parameters ---------- since : str The version in which the configuration item was converted into science state. python_name : str The old name of the Python variable for the configuration item. config_name : str The old name of the configuration item in the configuration file. science_state : ScienceState subclass The science state class that now manages this information. cfgtype : str or `None`, optional A type specifier like those used as the *values* of a particular key in a ``configspec`` file of ``configobj``. If `None`, the type will be inferred from the default value. module : str, optional The module containing the old configuration item. """ # REMOVE in astropy 0.5 def __init__(self, since, python_name, config_name, science_state, cfgtype=None, module=None): # We have to do the automatic module determination here, not # just in ConfigItem, otherwise the extra stack frame will # make it come up with the wrong answer. if module is None: module = find_current_module(2) if module is None: msg1 = 'Cannot automatically determine get_config module, ' msg2 = 'because it is not called from inside a valid module' raise RuntimeError(msg1 + msg2) else: module = module.__name__ self._dont_warn = True self._since = since self._python_name = python_name self._config_name = config_name self._science_state = science_state super(ScienceStateAlias, self).__init__( science_state._value, science_state.__doc__, cfgtype=cfgtype, module=module) self.name = config_name # Set the default value of the science state from the config # file, if defined. This is what pulls any old values in the # config file and applies them to the science state. value = super(ScienceStateAlias, self).__call__() # We got a value in the config file if science_state.validate(value) != science_state._value: warnings.warn( "Config parameter '{0}' in section [{1}] is deprecated. " "Use science state {2}.{3} instead.".format( self.name, self.module, self._science_state.__module__, self._science_state.__name__), AstropyDeprecationWarning) del self._dont_warn def _deprecation_warning(self, extra=None): if hasattr(self, '_dont_warn'): return message = ("'{0}.{1}' is deprecated, and is no longer defined " "as a configuration item.".format( self.module, self._python_name)) if extra is not None: message += " Use '{0}.{1}{2}' instead.".format( self._science_state.__module__, self._science_state.__name__, extra) warnings.warn(message, AstropyDeprecationWarning) def set(self, value): self._deprecation_warning('.set()') self._science_state.set(value) @contextmanager def set_temp(self, value): self._deprecation_warning('.set_temp()') with self._science_state.set(value): yield def reload(self): self._deprecation_warning() self._dont_warn = True try: result = super(ScienceStateAlias, self).reload() finally: del self._dont_warn if result is not None: self._science_state.set(result) def __call__(self): self._deprecation_warning('.get()') return self._science_state.get() astropy-1.1.1/astropy/utils/misc.py0000644001134200020070000006723712644017723020312 0ustar embrayscience00000000000000# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ A "grab bag" of relatively small general-purpose utilities that don't have a clear module/package to live in. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import abc import contextlib import difflib import inspect import json import os import re import signal import sys import traceback import unicodedata from collections import defaultdict from ..extern import six from ..extern.six.moves import urllib from ..utils.compat.odict import OrderedDict __all__ = ['isiterable', 'silence', 'format_exception', 'NumpyRNGContext', 'find_api_page', 'is_path_hidden', 'walk_skip_hidden', 'JsonCustomEncoder', 'indent', 'InheritDocstrings', 'OrderedDescriptor', 'OrderedDescriptorContainer'] def isiterable(obj): """Returns `True` if the given object is iterable.""" try: iter(obj) return True except TypeError: return False def indent(s, shift=1, width=4): """Indent a block of text. The indentation is applied to each line.""" indented = '\n'.join(' ' * (width * shift) + l if l else '' for l in s.splitlines()) if s[-1] == '\n': indented += '\n' return indented class _DummyFile(object): """A noop writeable object.""" def write(self, s): pass @contextlib.contextmanager def silence(): """A context manager that silences sys.stdout and sys.stderr.""" old_stdout = sys.stdout old_stderr = sys.stderr sys.stdout = _DummyFile() sys.stderr = _DummyFile() yield sys.stdout = old_stdout sys.stderr = old_stderr def format_exception(msg, *args, **kwargs): """ Given an exception message string, uses new-style formatting arguments ``{filename}``, ``{lineno}``, ``{func}`` and/or ``{text}`` to fill in information about the exception that occurred. For example: try: 1/0 except: raise ZeroDivisionError( format_except('A divide by zero occurred in {filename} at ' 'line {lineno} of function {func}.')) Any additional positional or keyword arguments passed to this function are also used to format the message. .. note:: This uses `sys.exc_info` to gather up the information needed to fill in the formatting arguments. Python 2.x and 3.x have slightly different behavior regarding `sys.exc_info` (the latter will not carry it outside a handled exception), so it's not wise to use this outside of an ``except`` clause - if it is, this will substitute '' for the 4 formatting arguments. """ tb = traceback.extract_tb(sys.exc_info()[2], limit=1) if len(tb) > 0: filename, lineno, func, text = tb[0] else: filename = lineno = func = text = '' return msg.format(*args, filename=filename, lineno=lineno, func=func, text=text, **kwargs) class NumpyRNGContext(object): """ A context manager (for use with the ``with`` statement) that will seed the numpy random number generator (RNG) to a specific value, and then restore the RNG state back to whatever it was before. This is primarily intended for use in the astropy testing suit, but it may be useful in ensuring reproducibility of Monte Carlo simulations in a science context. Parameters ---------- seed : int The value to use to seed the numpy RNG Examples -------- A typical use case might be:: with NumpyRNGContext(): from numpy import random randarr = random.randn(100) ... run your test using `randarr` ... #Any code using numpy.random at this indent level will act just as it #would have if it had been before the with statement - e.g. whatever #the default seed is. """ def __init__(self, seed): self.seed = seed def __enter__(self): from numpy import random self.startstate = random.get_state() random.seed(self.seed) def __exit__(self, exc_type, exc_value, traceback): from numpy import random random.set_state(self.startstate) def find_api_page(obj, version=None, openinbrowser=True, timeout=None): """ Determines the URL of the API page for the specified object, and optionally open that page in a web browser. .. note:: You must be connected to the internet for this to function even if ``openinbrowser`` is `False`, unless you provide a local version of the documentation to ``version`` (e.g., ``file:///path/to/docs``). Parameters ---------- obj The object to open the docs for or its fully-qualified name (as a str). version : str The doc version - either a version number like '0.1', 'dev' for the development/latest docs, or a URL to point to a specific location that should be the *base* of the documentation. Defaults to latest if you are on aren't on a release, otherwise, the version you are on. openinbrowser : bool If `True`, the `webbrowser` package will be used to open the doc page in a new web browser window. timeout : number, optional The number of seconds to wait before timing-out the query to the astropy documentation. If not given, the default python stdlib timeout will be used. Returns ------- url : str The loaded URL Raises ------ ValueError If the documentation can't be found """ import webbrowser from zlib import decompress if (not isinstance(obj, six.string_types) and hasattr(obj, '__module__') and hasattr(obj, '__name__')): obj = obj.__module__ + '.' + obj.__name__ elif inspect.ismodule(obj): obj = obj.__name__ if version is None: from .. import version if version.release: version = 'v' + version.version else: version = 'dev' if '://' in version: if version.endswith('index.html'): baseurl = version[:-10] elif version.endswith('/'): baseurl = version else: baseurl = version + '/' elif version == 'dev' or version == 'latest': baseurl = 'http://devdocs.astropy.org/' else: baseurl = 'http://docs.astropy.org/en/{vers}/'.format(vers=version) if timeout is None: uf = urllib.request.urlopen(baseurl + 'objects.inv') else: uf = urllib.request.urlopen(baseurl + 'objects.inv', timeout=timeout) try: oiread = uf.read() # need to first read/remove the first four lines, which have info before # the compressed section with the actual object inventory idx = -1 headerlines = [] for _ in range(4): oldidx = idx idx = oiread.index(b'\n', oldidx + 1) headerlines.append(oiread[(oldidx+1):idx].decode('utf-8')) # intersphinx version line, project name, and project version ivers, proj, vers, compr = headerlines if not 'The remainder of this file is compressed using zlib' in compr: raise ValueError('The file downloaded from {0} does not seem to be' 'the usal Sphinx objects.inv format. Maybe it ' 'has changed?'.format(baseurl + 'objects.inv')) compressed = oiread[(idx+1):] finally: uf.close() decompressed = decompress(compressed).decode('utf-8') resurl = None for l in decompressed.strip().splitlines(): ls = l.split() name = ls[0] loc = ls[3] if loc.endswith('$'): loc = loc[:-1] + name if name == obj: resurl = baseurl + loc break if resurl is None: raise ValueError('Could not find the docs for the object {obj}'.format(obj=obj)) elif openinbrowser: webbrowser.open(resurl) return resurl def signal_number_to_name(signum): """ Given an OS signal number, returns a signal name. If the signal number is unknown, returns ``'UNKNOWN'``. """ # Since these numbers and names are platform specific, we use the # builtin signal module and build a reverse mapping. signal_to_name_map = dict( (k, v) for v, k in signal.__dict__.iteritems() if v.startswith('SIG')) return signal_to_name_map.get(signum, 'UNKNOWN') if sys.platform == 'win32': import ctypes def _has_hidden_attribute(filepath): """ Returns True if the given filepath has the hidden attribute on MS-Windows. Based on a post here: http://stackoverflow.com/questions/284115/cross-platform-hidden-file-detection """ if isinstance(filepath, bytes): filepath = filepath.decode(sys.getfilesystemencoding()) try: attrs = ctypes.windll.kernel32.GetFileAttributesW(filepath) assert attrs != -1 result = bool(attrs & 2) except (AttributeError, AssertionError): result = False return result else: def _has_hidden_attribute(filepath): return False def is_path_hidden(filepath): """ Determines if a given file or directory is hidden. Parameters ---------- filepath : str The path to a file or directory Returns ------- hidden : bool Returns `True` if the file is hidden """ name = os.path.basename(os.path.abspath(filepath)) if isinstance(name, bytes): is_dotted = name.startswith(b'.') else: is_dotted = name.startswith('.') return is_dotted or _has_hidden_attribute(filepath) def walk_skip_hidden(top, onerror=None, followlinks=False): """ A wrapper for `os.walk` that skips hidden files and directories. This function does not have the parameter ``topdown`` from `os.walk`: the directories must always be recursed top-down when using this function. See also -------- os.walk : For a description of the parameters """ for root, dirs, files in os.walk( top, topdown=True, onerror=onerror, followlinks=followlinks): # These lists must be updated in-place so os.walk will skip # hidden directories dirs[:] = [d for d in dirs if not is_path_hidden(d)] files[:] = [f for f in files if not is_path_hidden(f)] yield root, dirs, files class JsonCustomEncoder(json.JSONEncoder): """Support for data types that JSON default encoder does not do. This includes: * Numpy array or number * Complex number * Set * Bytes (Python 3) Examples -------- >>> import json >>> import numpy as np >>> from astropy.utils.misc import JsonCustomEncoder >>> json.dumps(np.arange(3), cls=JsonCustomEncoder) '[0, 1, 2]' """ def default(self, obj): import numpy as np if isinstance(obj, (np.ndarray, np.number)): return obj.tolist() elif isinstance(obj, (complex, np.complex)): return [obj.real, obj.imag] elif isinstance(obj, set): return list(obj) elif isinstance(obj, bytes): # pragma: py3 return obj.decode() return json.JSONEncoder.default(self, obj) def strip_accents(s): """ Remove accents from a Unicode string. This helps with matching "Ã¥ngström" to "angstrom", for example. """ return ''.join( c for c in unicodedata.normalize('NFD', s) if unicodedata.category(c) != 'Mn') def did_you_mean(s, candidates, n=3, cutoff=0.8, fix=None): """ When a string isn't found in a set of candidates, we can be nice to provide a list of alternatives in the exception. This convenience function helps to format that part of the exception. Parameters ---------- s : str candidates : sequence of str or dict of str keys n : int The maximum number of results to include. See `difflib.get_close_matches`. cutoff : float In the range [0, 1]. Possibilities that don't score at least that similar to word are ignored. See `difflib.get_close_matches`. fix : callable A callable to modify the results after matching. It should take a single string and return a sequence of strings containing the fixed matches. Returns ------- message : str Returns the string "Did you mean X, Y, or Z?", or the empty string if no alternatives were found. """ if isinstance(s, six.text_type): s = strip_accents(s) s_lower = s.lower() # Create a mapping from the lower case name to all capitalization # variants of that name. candidates_lower = {} for candidate in candidates: candidate_lower = candidate.lower() candidates_lower.setdefault(candidate_lower, []) candidates_lower[candidate_lower].append(candidate) # The heuristic here is to first try "singularizing" the word. If # that doesn't match anything use difflib to find close matches in # original, lower and upper case. if s_lower.endswith('s') and s_lower[:-1] in candidates_lower: matches = [s_lower[:-1]] else: matches = difflib.get_close_matches( s_lower, candidates_lower, n=n, cutoff=cutoff) if len(matches): capitalized_matches = set() for match in matches: capitalized_matches.update(candidates_lower[match]) matches = capitalized_matches if fix is not None: mapped_matches = [] for match in matches: mapped_matches.extend(fix(match)) matches = mapped_matches matches = list(set(matches)) matches = sorted(matches) if len(matches) == 1: matches = matches[0] else: matches = (', '.join(matches[:-1]) + ' or ' + matches[-1]) return 'Did you mean {0}?'.format(matches) return '' class InheritDocstrings(type): """ This metaclass makes methods of a class automatically have their docstrings filled in from the methods they override in the base class. If the class uses multiple inheritance, the docstring will be chosen from the first class in the bases list, in the same way as methods are normally resolved in Python. If this results in selecting the wrong docstring, the docstring will need to be explicitly included on the method. For example:: >>> from astropy.utils.misc import InheritDocstrings >>> from astropy.extern import six >>> @six.add_metaclass(InheritDocstrings) ... class A(object): ... def wiggle(self): ... "Wiggle the thingamajig" ... pass >>> class B(A): ... def wiggle(self): ... pass >>> B.wiggle.__doc__ u'Wiggle the thingamajig' """ def __init__(cls, name, bases, dct): def is_public_member(key): return ( (key.startswith('__') and key.endswith('__') and len(key) > 4) or not key.startswith('_')) for key, val in six.iteritems(dct): if (inspect.isfunction(val) and is_public_member(key) and val.__doc__ is None): for base in cls.__mro__[1:]: super_method = getattr(base, key, None) if super_method is not None: val.__doc__ = super_method.__doc__ break super(InheritDocstrings, cls).__init__(name, bases, dct) @six.add_metaclass(abc.ABCMeta) class OrderedDescriptor(object): """ Base class for descriptors whose order in the class body should be preserved. Intended for use in concert with the `OrderedDescriptorContainer` metaclass. Subclasses of `OrderedDescriptor` must define a value for a class attribute called ``_class_attribute_``. This is the name of a class attribute on the *container* class for these descriptors, which will be set to an `~collections.OrderedDict` at class creation time. This `~collections.OrderedDict` will contain a mapping of all class attributes that were assigned instances of the `OrderedDescriptor` subclass, to the instances themselves. See the documentation for `OrderedDescriptorContainer` for a concrete example. Optionally, subclasses of `OrderedDescriptor` may define a value for a class attribute called ``_name_attribute_``. This should be the name of an attribute on instances of the subclass. When specified, during creation of a class containing these descriptors, the name attribute on each instance will be set to the name of the class attribute it was assigned to on the class. .. note:: Although this class is intended for use with *descriptors* (i.e. classes that define any of the ``__get__``, ``__set__``, or ``__delete__`` magic methods), this base class is not itself a descriptor, and technically this could be used for classes that are not descriptors too. However, use with descriptors is the original intended purpose. """ # This id increments for each OrderedDescriptor instance created, so they # are always ordered in the order they were created. Class bodies are # guaranteed to be executed from top to bottom. Not sure if this is # thread-safe though. _nextid = 1 _class_attribute_ = abc.abstractproperty() """ Subclasses should define this attribute to the name of an attribute on classes containing this subclass. That attribute will contain the mapping of all instances of that `OrderedDescriptor` subclass defined in the class body. If the same descriptor needs to be used with different classes, each with different names of this attribute, multiple subclasses will be needed. """ _name_attribute_ = None """ Subclasses may optionally define this attribute to specify the name of an attribute on instances of the class that should be filled with the instance's attribute name at class creation time. """ def __init__(self, *args, **kwargs): # The _nextid attribute is shared across all subclasses so that # different subclasses of OrderedDescriptors can be sorted correctly # between themselves self.__order = OrderedDescriptor._nextid OrderedDescriptor._nextid += 1 super(OrderedDescriptor, self).__init__() def __lt__(self, other): """ Defined for convenient sorting of `OrderedDescriptor` instances, which are defined to sort in their creation order. """ if (isinstance(self, OrderedDescriptor) and isinstance(other, OrderedDescriptor)): try: return self.__order < other.__order except AttributeError: raise RuntimeError( 'Could not determine ordering for {0} and {1}; at least ' 'one of them is not calling super().__init__ in its ' '__init__.'.format(self, other)) else: return NotImplemented class OrderedDescriptorContainer(type): """ Classes should use this metaclass if they wish to use `OrderedDescriptor` attributes, which are class attributes that "remember" the order in which they were defined in the class body. Every subclass of `OrderedDescriptor` has an attribute called ``_class_attribute_``. For example, if we have .. code:: python class ExampleDecorator(OrderedDescriptor): _class_attribute_ = '_examples_' Then when a class with the `OrderedDescriptorContainer` metaclass is created, it will automatically be assigned a class attribute ``_examples_`` referencing an `~collections.OrderedDict` containing all instances of ``ExampleDecorator`` defined in the class body, mapped to by the names of the attributes they were assigned to. When subclassing a class with this metaclass, the descriptor dict (i.e. ``_examples_`` in the above example) will *not* contain descriptors inherited from the base class. That is, this only works by default with decorators explicitly defined in the class body. However, the subclass *may* define an attribute ``_inherit_decorators_`` which lists `OrderedDescriptor` classes that *should* be added from base classes. See the examples section below for an example of this. Examples -------- >>> from astropy.extern import six >>> from astropy.utils import OrderedDescriptor, OrderedDescriptorContainer >>> class TypedAttribute(OrderedDescriptor): ... \"\"\" ... Attributes that may only be assigned objects of a specific type, ... or subclasses thereof. For some reason we care about their order. ... \"\"\" ... ... _class_attribute_ = 'typed_attributes' ... _name_attribute_ = 'name' ... # A default name so that instances not attached to a class can ... # still be repr'd; useful for debugging ... name = '' ... ... def __init__(self, type): ... # Make sure not to forget to call the super __init__ ... super(TypedAttribute, self).__init__() ... self.type = type ... ... def __get__(self, obj, objtype=None): ... if obj is None: ... return self ... if self.name in obj.__dict__: ... return obj.__dict__[self.name] ... else: ... raise AttributeError(self.name) ... ... def __set__(self, obj, value): ... if not isinstance(value, self.type): ... raise ValueError('{0}.{1} must be of type {2!r}'.format( ... obj.__class__.__name__, self.name, self.type)) ... obj.__dict__[self.name] = value ... ... def __delete__(self, obj): ... if self.name in obj.__dict__: ... del obj.__dict__[self.name] ... else: ... raise AttributeError(self.name) ... ... def __repr__(self): ... if isinstance(self.type, tuple) and len(self.type) > 1: ... typestr = '({0})'.format( ... ', '.join(t.__name__ for t in self.type)) ... else: ... typestr = self.type.__name__ ... return '<{0}(name={1}, type={2})>'.format( ... self.__class__.__name__, self.name, typestr) ... Now let's create an example class that uses this ``TypedAttribute``:: >>> @six.add_metaclass(OrderedDescriptorContainer) ... class Point2D(object): ... x = TypedAttribute((float, int)) ... y = TypedAttribute((float, int)) ... ... def __init__(self, x, y): ... self.x, self.y = x, y ... >>> p1 = Point2D(1.0, 2.0) >>> p1.x 1.0 >>> p1.y 2.0 >>> p2 = Point2D('a', 'b') # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValueError: Point2D.x must be of type (float, int>) We see that ``TypedAttribute`` works more or less as advertised, but there's nothing special about that. Let's see what `OrderedDescriptorContainer` did for us:: >>> Point2D.typed_attributes OrderedDict([('x', ), ('y', )]) If we create a subclass, it does *not* by default add inherited descriptors to ``typed_attributes``:: >>> class Point3D(Point2D): ... z = TypedAttribute((float, int)) ... >>> Point3D.typed_attributes OrderedDict([('z', )]) However, if we specify ``_inherit_descriptors_`` from ``Point2D`` then it will do so:: >>> class Point3D(Point2D): ... _inherit_descriptors_ = (TypedAttribute,) ... z = TypedAttribute((float, int)) ... >>> Point3D.typed_attributes OrderedDict([('x', ), ('y', ), ('z', )]) .. note:: Hopefully it is clear from these examples that this construction also allows a class of type `OrderedDescriptorContainer` to use multiple different `OrderedDescriptor` classes simultaneously. """ _inherit_descriptors_ = () def __init__(cls, cls_name, bases, members): descriptors = defaultdict(list) seen = set() inherit_descriptors = () descr_bases = {} for mro_cls in cls.__mro__: for name, obj in mro_cls.__dict__.items(): if name in seen: # Checks if we've already seen an attribute of the given # name (if so it will override anything of the same name in # any base class) continue seen.add(name) if (not isinstance(obj, OrderedDescriptor) or (inherit_descriptors and not isinstance(obj, inherit_descriptors))): # The second condition applies when checking any # subclasses, to see if we can inherit any descriptors of # the given type from subclasses (by default inheritance is # disabled unless the class has _inherit_descriptors_ # defined) continue if obj._name_attribute_ is not None: setattr(obj, obj._name_attribute_, name) # Don't just use the descriptor's class directly; instead go # through its MRO and find the class on which _class_attribute_ # is defined directly. This way subclasses of some # OrderedDescriptor *may* override _class_attribute_ and have # its own _class_attribute_, but by default all subclasses of # some OrderedDescriptor are still grouped together # TODO: It might be worth clarifying this in the docs if obj.__class__ not in descr_bases: for obj_cls_base in obj.__class__.__mro__: if '_class_attribute_' in obj_cls_base.__dict__: descr_bases[obj.__class__] = obj_cls_base descriptors[obj_cls_base].append((obj, name)) break else: # Make sure to put obj first for sorting purposes obj_cls_base = descr_bases[obj.__class__] descriptors[obj_cls_base].append((obj, name)) if not (isinstance(mro_cls, type(cls)) and mro_cls._inherit_descriptors_): # If _inherit_descriptors_ is undefined then we don't inherit # any OrderedDescriptors from any of the base classes, and # there's no reason to continue through the MRO break else: inherit_descriptors = mro_cls._inherit_descriptors_ for descriptor_cls, instances in descriptors.items(): instances.sort() instances = OrderedDict((key, value) for value, key in instances) setattr(cls, descriptor_cls._class_attribute_, instances) super(OrderedDescriptorContainer, cls).__init__(cls_name, bases, members) astropy-1.1.1/astropy/utils/collections.py0000644001134200020070000000256212640262015021653 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ A module containing specialized collection classes. """ class HomogeneousList(list): """ A subclass of list that contains only elements of a given type or types. If an item that is not of the specified type is added to the list, a `~.exceptions.TypeError` is raised. """ def __init__(self, types, values=[]): """ Parameters ---------- types : sequence of types The types to accept. values : sequence, optional An initial set of values. """ self._types = types list.__init__(self, values) def _assert(self, x): if not isinstance(x, self._types): raise TypeError( "homogeneous list must contain only objects of type '%s'" % (self._types)) def __iadd__(self, other): for x in other: self._assert(x) return list.__iadd__(self, other) def __setitem__(self, x): self._assert(x) return list.__setitem__(self, x) def append(self, x): self._assert(x) return list.append(self, x) def insert(self, i, x): self._assert(x) return list.insert(self, i, x) def extend(self, x): for item in x: self._assert(item) return list.extend(self, x) astropy-1.1.1/astropy/utils/setup_package.py0000644001134200020070000000176112644017723022160 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import from distutils.core import Extension from os.path import dirname, join, relpath ASTROPY_UTILS_ROOT = dirname(__file__) def get_extensions(): return [ Extension('astropy.utils._compiler', [relpath(join(ASTROPY_UTILS_ROOT, 'src', 'compiler.c'))]) ] def get_package_data(): # Installs the testing data files return { 'astropy.utils.tests': [ 'data/test_package/*.py', 'data/test_package/data/*.txt', 'data/*.dat', 'data/*.txt', 'data/*.gz', 'data/*.bz2', 'data/*.xz', 'data/.hidden_file.txt', 'data/*.cfg'], 'astropy.utils.iers': [ 'data/ReadMe.eopc04_IAU2000', 'data/ReadMe.finals2000A', 'data/eopc04_IAU2000.62-now', 'tests/iers_a_excerpt'] } def requires_2to3(): return False astropy-1.1.1/astropy/utils/timer.py0000644001134200020070000002533712640262015020462 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """General purpose timer related functions.""" from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six # STDLIB import time import warnings from collections import Iterable from functools import partial, wraps # THIRD-PARTY import numpy as np # LOCAL from . import OrderedDict from .. import units as u from .. import log from .. import modeling from .exceptions import AstropyUserWarning __all__ = ['timefunc', 'RunTimePredictor'] __doctest_skip__ = ['timefunc'] def timefunc(num_tries=1, verbose=True): """Decorator to time a function or method. Parameters ---------- num_tries : int, optional Number of calls to make. Timer will take the average run time. verbose : bool, optional Extra log information. Returns ------- tt : float Average run time in seconds. result Output(s) from the function. Examples -------- To add timer to time `numpy.log` for 100 times with verbose output:: import numpy as np from astropy.utils.timer import timefunc @timefunc(100) def timed_log(x): return np.log(x) To run the decorated function above: >>> t, y = timed_log(100) INFO: timed_log took 9.29832458496e-06 s on AVERAGE for 100 call(s). [...] >>> t 9.298324584960938e-06 >>> y 4.6051701859880918 """ def real_decorator(function): @wraps(function) def wrapper(*args, **kwargs): ts = time.time() for i in range(num_tries): result = function(*args, **kwargs) te = time.time() tt = (te - ts) / num_tries if verbose: # pragma: no cover log.info('{0} took {1} s on AVERAGE for {2} call(s).'.format( function.__name__, tt, num_tries)) return tt, result return wrapper return real_decorator class RunTimePredictor(object): """Class to predict run time. .. note:: Only predict for single varying numeric input parameter. Parameters ---------- func : function Function to time. args : tuple Fixed positional argument(s) for the function. kwargs : dict Fixed keyword argument(s) for the function. Examples -------- >>> from astropy.utils.timer import RunTimePredictor Set up a predictor for :math:`10^{x}`: >>> p = RunTimePredictor(pow, 10) Give it baseline data to use for prediction and get the function output values: >>> p.time_func(range(10, 1000, 200)) >>> for input, result in sorted(p.results.items()): ... print("pow(10, {0})\\n{1}".format(input, result)) pow(10, 10) 10000000000 pow(10, 210) 10000000000... pow(10, 410) 10000000000... pow(10, 610) 10000000000... pow(10, 810) 10000000000... Fit a straight line assuming :math:`\\textnormal{arg}^{1}` relationship (coefficients are returned): >>> p.do_fit() # doctest: +SKIP array([1.16777420e-05, 1.00135803e-08]) Predict run time for :math:`10^{5000}`: >>> p.predict_time(5000) # doctest: +SKIP 6.174564361572262e-05 Plot the prediction: >>> p.plot(xlabeltext='Power of 10') # doctest: +SKIP .. image:: /_static/timer_prediction_pow10.png :width: 450px :alt: Example plot from `astropy.utils.timer.RunTimePredictor` When the changing argument is not the last, e.g., :math:`x^{2}`, something like this might work: >>> p = RunTimePredictor(lambda x: pow(x, 2)) >>> p.time_func([2, 3, 5]) >>> sorted(p.results.items()) [(2, 4), (3, 9), (5, 25)] """ def __init__(self, func, *args, **kwargs): self._funcname = func.__name__ self._pfunc = partial(func, *args, **kwargs) self._cache_good = OrderedDict() self._cache_bad = [] self._cache_est = OrderedDict() self._cache_out = OrderedDict() self._fit_func = None self._power = None @property def results(self): """Function outputs from `time_func`. A dictionary mapping input arguments (fixed arguments are not included) to their respective output values. """ return self._cache_out @timefunc(num_tries=1, verbose=False) def _timed_pfunc(self, arg): """Run partial func once for single arg and time it.""" return self._pfunc(arg) def _cache_time(self, arg): """Cache timing results without repetition.""" if arg not in self._cache_good and arg not in self._cache_bad: try: result = self._timed_pfunc(arg) except Exception as e: warnings.warn(str(e), AstropyUserWarning) self._cache_bad.append(arg) else: self._cache_good[arg] = result[0] # Run time self._cache_out[arg] = result[1] # Function output def time_func(self, arglist): """Time the partial function for a list of single args and store run time in a cache. This forms a baseline for the prediction. This also stores function outputs in `results`. Parameters ---------- arglist : list of numbers List of input arguments to time. """ if not isinstance(arglist, Iterable): arglist = [arglist] # Preserve arglist order for arg in arglist: self._cache_time(arg) # FUTURE: Implement N^x * O(log(N)) fancy fitting. def do_fit(self, model=None, fitter=None, power=1, min_datapoints=3): """Fit a function to the lists of arguments and their respective run time in the cache. By default, this does a linear least-square fitting to a straight line on run time w.r.t. argument values raised to the given power, and returns the optimal intercept and slope. Parameters ---------- model : `astropy.modeling.Model` Model for the expected trend of run time (Y-axis) w.r.t. :math:`\\textnormal{arg}^{\\textnormal{power}}` (X-axis). If `None`, will use `~astropy.modeling.polynomial.Polynomial1D` with ``degree=1``. fitter : `astropy.modeling.fitting.Fitter` Fitter for the given model to extract optimal coefficient values. If `None`, will use `~astropy.modeling.fitting.LinearLSQFitter`. power : int, optional Power of values to fit. min_datapoints : int, optional Minimum number of data points required for fitting. They can be built up with `time_func`. Returns ------- a : array-like Fitted `~astropy.modeling.FittableModel` parameters. Raises ------ AssertionError Insufficient data points for fitting. ModelsError Invalid model or fitter. """ # Reset related attributes self._power = power self._cache_est = OrderedDict() x_arr = np.array(list(six.iterkeys(self._cache_good))) assert x_arr.size >= min_datapoints, \ 'Requires {0} points but has {1}'.format(min_datapoints, x_arr.size) if model is None: model = modeling.models.Polynomial1D(1) elif not isinstance(model, modeling.core.Model): raise modeling.fitting.ModelsError( '{0} is not a model.'.format(model)) if fitter is None: fitter = modeling.fitting.LinearLSQFitter() elif not isinstance(fitter, modeling.fitting.Fitter): raise modeling.fitting.ModelsError( '{0} is not a fitter.'.format(fitter)) self._fit_func = fitter( model, x_arr**power, list(six.itervalues(self._cache_good))) return self._fit_func.parameters def predict_time(self, arg): """Predict run time for given argument. If prediction is already cached, cached value is returned. Parameters ---------- arg : number Input argument to predict run time for. Returns ------- t_est : float Estimated run time for given argument. Raises ------ AssertionError No fitted data for prediction. """ if arg in self._cache_est: t_est = self._cache_est[arg] else: assert self._fit_func is not None, 'No fitted data for prediction' t_est = self._fit_func(arg**self._power) self._cache_est[arg] = t_est return t_est def plot(self, xscale='linear', yscale='linear', xlabeltext='args', save_as=''): # pragma: no cover """Plot prediction. .. note:: Uses `matplotlib `_. Parameters ---------- xscale, yscale : {'linear', 'log', 'symlog'} Scaling for `matplotlib.axes.Axes`. xlabeltext : str, optional Text for X-label. save_as : str, optional Save plot as given filename. Raises ------ AssertionError Insufficient data for plotting. """ import matplotlib.pyplot as plt # Actual data x_arr = sorted(self._cache_good) y_arr = np.array([self._cache_good[x] for x in x_arr]) assert len(x_arr) > 1, 'Insufficient data for plotting' # Auto-ranging qmean = y_arr.mean() * u.second for cur_u in (u.minute, u.second, u.millisecond, u.microsecond, u.nanosecond): val = qmean.to(cur_u).value if 1000 > val >= 1: break y_arr = (y_arr * u.second).to(cur_u).value fig, ax = plt.subplots() ax.plot(x_arr, y_arr, 'kx-', label='Actual') # Fitted data if self._fit_func is not None: x_est = list(six.iterkeys(self._cache_est)) y_est = (np.array(list(six.itervalues(self._cache_est))) * u.second).to(cur_u).value ax.scatter(x_est, y_est, marker='o', c='r', label='Predicted') x_fit = np.array(sorted(x_arr + x_est)) y_fit = (self._fit_func(x_fit**self._power) * u.second).to(cur_u).value ax.plot(x_fit, y_fit, 'b--', label='Fit') ax.set_xscale(xscale) ax.set_yscale(yscale) ax.set_xlabel(xlabeltext) ax.set_ylabel('Run time ({})'.format(cur_u.to_string())) ax.set_title(self._funcname) ax.legend(loc='best', numpoints=1) plt.draw() if save_as: plt.savefig(save_as) astropy-1.1.1/astropy/utils/exceptions.py0000644001134200020070000000252212640262015021512 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains errors/exceptions and warnings of general use for astropy. Exceptions that are specific to a given subpackage should *not* be here, but rather in the particular subpackage. """ from __future__ import (absolute_import, division, print_function, unicode_literals) class AstropyWarning(Warning): """ The base warning class from which all Astropy warnings should inherit. Any warning inheriting from this class is handled by the Astropy logger. """ class AstropyUserWarning(UserWarning, AstropyWarning): """ The primary warning class for Astropy. Use this if you do not need a specific sub-class. """ class AstropyDeprecationWarning(AstropyWarning): """ A warning class to indicate a deprecated feature. """ class AstropyPendingDeprecationWarning(PendingDeprecationWarning, AstropyWarning): """ A warning class to indicate a soon-to-be deprecated feature. """ class AstropyBackwardsIncompatibleChangeWarning(AstropyWarning): """ A warning class indicating a change in astropy that is incompatible with previous versions. The suggested procedure is to issue this warning for the version in which the change occurs, and remove it for all following versions. """ astropy-1.1.1/astropy/utils/introspection.py0000644001134200020070000003157512644017723022253 0ustar embrayscience00000000000000# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """Functions related to Python runtime introspection.""" from __future__ import (absolute_import, division, print_function, unicode_literals) import inspect import sys import types from ..extern import six __all__ = ['resolve_name', 'minversion', 'find_current_module', 'isinstancemethod'] __doctest_skip__ = ['find_current_module'] def resolve_name(name, *additional_parts): """Resolve a name like ``module.object`` to an object and return it. This ends up working like ``from module import object`` but is easier to deal with than the `__import__` builtin and supports digging into submodules. Parameters ---------- name : `str` A dotted path to a Python object--that is, the name of a function, class, or other object in a module with the full path to that module, including parent modules, separated by dots. Also known as the fully qualified name of the object. additional_parts : iterable, optional If more than one positional arguments are given, those arguments are automatically dotted together with ``name``. Examples -------- >>> resolve_name('astropy.utils.introspection.resolve_name') >>> resolve_name('astropy', 'utils', 'introspection', 'resolve_name') Raises ------ `ImportError` If the module or named object is not found. """ additional_parts = '.'.join(additional_parts) if additional_parts: name = name + '.' + additional_parts # Note: On python 2 these must be str objects and not unicode parts = [str(part) for part in name.split('.')] if len(parts) == 1: # No dots in the name--just a straight up module import cursor = 1 fromlist=[] else: cursor = len(parts) - 1 fromlist = [parts[-1]] module_name = parts[:cursor] while cursor > 0: try: ret = __import__(str('.'.join(module_name)), fromlist=fromlist) break except ImportError: if cursor == 0: raise cursor -= 1 module_name = parts[:cursor] fromlist = [parts[cursor]] ret = '' for part in parts[cursor:]: try: ret = getattr(ret, part) except AttributeError: raise ImportError(name) return ret def minversion(module, version, inclusive=True, version_path='__version__'): """ Returns `True` if the specified Python module satisfies a minimum version requirement, and `False` if not. By default this uses `pkg_resources.parse_version` to do the version comparison if available. Otherwise it falls back on `distutils.version.LooseVersion`. Parameters ---------- module : module or `str` An imported module of which to check the version, or the name of that module (in which case an import of that module is attempted-- if this fails `False` is returned). version : `str` The version as a string that this module must have at a minimum (e.g. ``'0.12'``). inclusive : `bool` The specified version meets the requirement inclusively (i.e. ``>=``) as opposed to strictly greater than (default: `True`). version_path : `str` A dotted attribute path to follow in the module for the version. Defaults to just ``'__version__'``, which should work for most Python modules. Examples -------- >>> import astropy >>> minversion(astropy, '0.4.4') True """ if isinstance(module, types.ModuleType): module_name = module.__name__ elif isinstance(module, six.string_types): module_name = module try: module = resolve_name(module_name) except ImportError: return False else: raise ValueError('module argument must be an actual imported ' 'module, or the import name of the module; ' 'got {0!r}'.format(module)) if '.' not in version_path: have_version = getattr(module, version_path) else: have_version = resolve_name(module.__name__, version_path) try: from pkg_resources import parse_version except ImportError: from distutils.version import LooseVersion as parse_version if inclusive: return parse_version(have_version) >= parse_version(version) else: return parse_version(have_version) > parse_version(version) def find_current_module(depth=1, finddiff=False): """ Determines the module/package from which this function is called. This function has two modes, determined by the ``finddiff`` option. it will either simply go the requested number of frames up the call stack (if ``finddiff`` is False), or it will go up the call stack until it reaches a module that is *not* in a specified set. Parameters ---------- depth : int Specifies how far back to go in the call stack (0-indexed, so that passing in 0 gives back `astropy.utils.misc`). finddiff : bool or list If False, the returned ``mod`` will just be ``depth`` frames up from the current frame. Otherwise, the function will start at a frame ``depth`` up from current, and continue up the call stack to the first module that is *different* from those in the provided list. In this case, ``finddiff`` can be a list of modules or modules names. Alternatively, it can be True, which will use the module ``depth`` call stack frames up as the module the returned module most be different from. Returns ------- mod : module or None The module object or None if the package cannot be found. The name of the module is available as the ``__name__`` attribute of the returned object (if it isn't None). Raises ------ ValueError If ``finddiff`` is a list with an invalid entry. Examples -------- The examples below assume that there are two modules in a package named ``pkg``. ``mod1.py``:: def find1(): from astropy.utils import find_current_module print find_current_module(1).__name__ def find2(): from astropy.utils import find_current_module cmod = find_current_module(2) if cmod is None: print 'None' else: print cmod.__name__ def find_diff(): from astropy.utils import find_current_module print find_current_module(0,True).__name__ ``mod2.py``:: def find(): from .mod1 import find2 find2() With these modules in place, the following occurs:: >>> from pkg import mod1, mod2 >>> from astropy.utils import find_current_module >>> mod1.find1() pkg.mod1 >>> mod1.find2() None >>> mod2.find() pkg.mod2 >>> find_current_module(0) >>> mod1.find_diff() pkg.mod1 """ frm = inspect.currentframe() for i in range(depth): frm = frm.f_back if frm is None: return None if finddiff: currmod = inspect.getmodule(frm) if finddiff is True: diffmods = [currmod] else: diffmods = [] for fd in finddiff: if inspect.ismodule(fd): diffmods.append(fd) elif isinstance(fd, six.string_types): diffmods.append(__import__(fd)) elif fd is True: diffmods.append(currmod) else: raise ValueError('invalid entry in finddiff') while frm: frmb = frm.f_back modb = inspect.getmodule(frmb) if modb not in diffmods: return modb frm = frmb else: return inspect.getmodule(frm) def find_mod_objs(modname, onlylocals=False): """ Returns all the public attributes of a module referenced by name. .. note:: The returned list *not* include subpackages or modules of ``modname``, nor does it include private attributes (those that begin with '_' or are not in `__all__`). Parameters ---------- modname : str The name of the module to search. onlylocals : bool or list of str If `True`, only attributes that are either members of ``modname`` OR one of its modules or subpackages will be included. If it is a list of strings, those specify the possible packages that will be considered "local". Returns ------- localnames : list of str A list of the names of the attributes as they are named in the module ``modname`` . fqnames : list of str A list of the full qualified names of the attributes (e.g., ``astropy.utils.introspection.find_mod_objs``). For attributes that are simple variables, this is based on the local name, but for functions or classes it can be different if they are actually defined elsewhere and just referenced in ``modname``. objs : list of objects A list of the actual attributes themselves (in the same order as the other arguments) """ mod = resolve_name(modname) if hasattr(mod, '__all__'): pkgitems = [(k, mod.__dict__[k]) for k in mod.__all__] else: pkgitems = [(k, mod.__dict__[k]) for k in dir(mod) if k[0] != '_'] # filter out modules and pull the names and objs out ismodule = inspect.ismodule localnames = [k for k, v in pkgitems if not ismodule(v)] objs = [v for k, v in pkgitems if not ismodule(v)] # fully qualified names can be determined from the object's module fqnames = [] for obj, lnm in zip(objs, localnames): if hasattr(obj, '__module__') and hasattr(obj, '__name__'): fqnames.append(obj.__module__ + '.' + obj.__name__) else: fqnames.append(modname + '.' + lnm) if onlylocals: if onlylocals is True: onlylocals = [modname] valids = [any([fqn.startswith(nm) for nm in onlylocals]) for fqn in fqnames] localnames = [e for i, e in enumerate(localnames) if valids[i]] fqnames = [e for i, e in enumerate(fqnames) if valids[i]] objs = [e for i, e in enumerate(objs) if valids[i]] return localnames, fqnames, objs # Note: I would have preferred call this is_instancemethod, but this naming is # for consistency with other functions in the `inspect` module def isinstancemethod(cls, obj): """ Returns `True` if the given object is an instance method of the class it is defined on (as opposed to a `staticmethod` or a `classmethod`). This requires both the class the object is a member of as well as the object itself in order to make this determination. Parameters ---------- cls : `type` The class on which this method was defined. obj : `object` A member of the provided class (the membership is not checked directly, but this function will always return `False` if the given object is not a member of the given class). Examples -------- >>> from astropy.extern import six >>> class MetaClass(type): ... def a_classmethod(cls): pass ... >>> @six.add_metaclass(MetaClass) ... class MyClass(object): ... __metaclass__ = MetaClass ... def an_instancemethod(self): pass ... @classmethod ... def another_classmethod(cls): pass ... @staticmethod ... def a_staticmethod(): pass ... >>> isinstancemethod(MyClass, MyClass.a_classmethod) False >>> isinstancemethod(MyClass, MyClass.another_classmethod) False >>> isinstancemethod(MyClass, MyClass.a_staticmethod) False >>> isinstancemethod(MyClass, MyClass.an_instancemethod) True """ return _isinstancemethod(cls, obj) if six.PY3: def _isinstancemethod(cls, obj): if not isinstance(obj, types.FunctionType): return False # Unfortunately it seems the easiest way to get to the original # staticmethod object is to look in the class's __dict__, though we # also need to look up the MRO in case the method is not in the given # class's dict name = obj.__name__ for basecls in cls.mro(): # This includes cls if name in basecls.__dict__: return not isinstance(basecls.__dict__[name], staticmethod) # This shouldn't happen, though this is the most sensible response if # it does. raise AttributeError(name) else: def _isinstancemethod(cls, obj): return isinstance(obj, types.MethodType) and obj.im_class is cls astropy-1.1.1/astropy/utils/decorators.py0000644001134200020070000006252112644017723021513 0ustar embrayscience00000000000000# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """Sundry function and class decorators.""" from __future__ import print_function import functools import inspect import sys import textwrap import types import warnings from .codegen import make_function_with_signature from .exceptions import (AstropyDeprecationWarning, AstropyPendingDeprecationWarning) from ..extern import six __all__ = ['deprecated', 'deprecated_attribute', 'classproperty', 'lazyproperty', 'sharedmethod', 'wraps'] def deprecated(since, message='', name='', alternative='', pending=False, obj_type=None): """ Used to mark a function or class as deprecated. To mark an attribute as deprecated, use `deprecated_attribute`. Parameters ------------ since : str The release at which this API became deprecated. This is required. message : str, optional Override the default deprecation message. The format specifier ``func`` may be used for the name of the function, and ``alternative`` may be used in the deprecation message to insert the name of an alternative to the deprecated function. ``obj_type`` may be used to insert a friendly name for the type of object being deprecated. name : str, optional The name of the deprecated function or class; if not provided the name is automatically determined from the passed in function or class, though this is useful in the case of renamed functions, where the new function is just assigned to the name of the deprecated function. For example:: def new_function(): ... oldFunction = new_function alternative : str, optional An alternative function or class name that the user may use in place of the deprecated object. The deprecation warning will tell the user about this alternative if provided. pending : bool, optional If True, uses a AstropyPendingDeprecationWarning instead of a AstropyDeprecationWarning. obj_type : str, optional The type of this object, if the automatically determined one needs to be overridden. """ method_types = (classmethod, staticmethod, types.MethodType) def deprecate_doc(old_doc, message): """ Returns a given docstring with a deprecation message prepended to it. """ if not old_doc: old_doc = '' old_doc = textwrap.dedent(old_doc).strip('\n') new_doc = (('\n.. deprecated:: %(since)s' '\n %(message)s\n\n' % {'since': since, 'message': message.strip()}) + old_doc) if not old_doc: # This is to prevent a spurious 'unexpected unindent' warning from # docutils when the original docstring was blank. new_doc += r'\ ' return new_doc def get_function(func): """ Given a function or classmethod (or other function wrapper type), get the function object. """ if isinstance(func, method_types): try: func = func.__func__ except AttributeError: # classmethods in Python2.6 and below lack the __func__ # attribute so we need to hack around to get it method = func.__get__(None, object) if isinstance(method, types.FunctionType): # For staticmethods anyways the wrapped object is just a # plain function (not a bound method or anything like that) func = method elif hasattr(method, '__func__'): func = method.__func__ elif hasattr(method, 'im_func'): func = method.im_func else: # Nothing we can do really... just return the original # classmethod, etc. return func return func def deprecate_function(func, message): """ Returns a wrapped function that displays an ``AstropyDeprecationWarning`` when it is called. """ if isinstance(func, method_types): func_wrapper = type(func) else: func_wrapper = lambda f: f func = get_function(func) def deprecated_func(*args, **kwargs): if pending: category = AstropyPendingDeprecationWarning else: category = AstropyDeprecationWarning warnings.warn(message, category, stacklevel=2) return func(*args, **kwargs) # If this is an extension function, we can't call # functools.wraps on it, but we normally don't care. # This crazy way to get the type of a wrapper descriptor is # straight out of the Python 3.3 inspect module docs. if type(func) != type(str.__dict__['__add__']): deprecated_func = functools.wraps(func)(deprecated_func) deprecated_func.__doc__ = deprecate_doc( deprecated_func.__doc__, message) return func_wrapper(deprecated_func) def deprecate_class(cls, message): """ Returns a wrapper class with the docstrings updated and an __init__ function that will raise an ``AstropyDeprectationWarning`` warning when called. """ # Creates a new class with the same name and bases as the # original class, but updates the dictionary with a new # docstring and a wrapped __init__ method. __module__ needs # to be manually copied over, since otherwise it will be set # to *this* module (astropy.utils.misc). # This approach seems to make Sphinx happy (the new class # looks enough like the original class), and works with # extension classes (which functools.wraps does not, since # it tries to modify the original class). # We need to add a custom pickler or you'll get # Can't pickle : it's not found as ... # errors. Picklability is required for any class that is # documented by Sphinx. members = cls.__dict__.copy() members.update({ '__doc__': deprecate_doc(cls.__doc__, message), '__init__': deprecate_function(get_function(cls.__init__), message), }) return type(cls)(cls.__name__, cls.__bases__, members) def deprecate(obj, message=message, name=name, alternative=alternative, pending=pending): if obj_type is None: if isinstance(obj, type): obj_type_name = 'class' elif inspect.isfunction(obj): obj_type_name = 'function' elif inspect.ismethod(obj) or isinstance(obj, method_types): obj_type_name = 'method' else: obj_type_name = 'object' else: obj_type_name = obj_type if not name: name = get_function(obj).__name__ altmessage = '' if not message or type(message) == type(deprecate): if pending: message = ('The %(func)s %(obj_type)s will be deprecated in a ' 'future version.') else: message = ('The %(func)s %(obj_type)s is deprecated and may ' 'be removed in a future version.') if alternative: altmessage = '\n Use %s instead.' % alternative message = ((message % { 'func': name, 'name': name, 'alternative': alternative, 'obj_type': obj_type_name}) + altmessage) if isinstance(obj, type): return deprecate_class(obj, message) else: return deprecate_function(obj, message) if type(message) == type(deprecate): return deprecate(message) return deprecate def deprecated_attribute(name, since, message=None, alternative=None, pending=False): """ Used to mark a public attribute as deprecated. This creates a property that will warn when the given attribute name is accessed. To prevent the warning (i.e. for internal code), use the private name for the attribute by prepending an underscore (i.e. ``self._name``). Parameters ---------- name : str The name of the deprecated attribute. since : str The release at which this API became deprecated. This is required. message : str, optional Override the default deprecation message. The format specifier ``name`` may be used for the name of the attribute, and ``alternative`` may be used in the deprecation message to insert the name of an alternative to the deprecated function. alternative : str, optional An alternative attribute that the user may use in place of the deprecated attribute. The deprecation warning will tell the user about this alternative if provided. pending : bool, optional If True, uses a AstropyPendingDeprecationWarning instead of a AstropyDeprecationWarning. Examples -------- :: class MyClass: # Mark the old_name as deprecated old_name = misc.deprecated_attribute('old_name', '0.1') def method(self): self._old_name = 42 """ private_name = '_' + name @deprecated(since, name=name, obj_type='attribute') def get(self): return getattr(self, private_name) @deprecated(since, name=name, obj_type='attribute') def set(self, val): setattr(self, private_name, val) @deprecated(since, name=name, obj_type='attribute') def delete(self): delattr(self, private_name) return property(get, set, delete) # TODO: This can still be made to work for setters by implementing an # accompanying metaclass that supports it; we just don't need that right this # second class classproperty(property): """ Similar to `property`, but allows class-level properties. That is, a property whose getter is like a `classmethod`. The wrapped method may explicitly use the `classmethod` decorator (which must become before this decorator), or the `classmethod` may be omitted (it is implicit through use of this decorator). .. note:: classproperty only works for *read-only* properties. It does not currently allow writeable/deleteable properties, due to subtleties of how Python descriptors work. In order to implement such properties on a class a metaclass for that class must be implemented. Parameters ---------- fget : callable The function that computes the value of this property (in particular, the function when this is used as a decorator) a la `property`. doc : str, optional The docstring for the property--by default inherited from the getter function. lazy : bool, optional If True, caches the value returned by the first call to the getter function, so that it is only called once (used for lazy evaluation of an attribute). This is analogous to `lazyproperty`. The ``lazy`` argument can also be used when `classproperty` is used as a decorator (see the third example below). When used in the decorator syntax this *must* be passed in as a keyword argument. Examples -------- :: >>> class Foo(object): ... _bar_internal = 1 ... @classproperty ... def bar(cls): ... return cls._bar_internal + 1 ... >>> Foo.bar 2 >>> foo_instance = Foo() >>> foo_instance.bar 2 >>> foo_instance._bar_internal = 2 >>> foo_instance.bar # Ignores instance attributes 2 As previously noted, a `classproperty` is limited to implementing read-only attributes:: >>> class Foo(object): ... _bar_internal = 1 ... @classproperty ... def bar(cls): ... return cls._bar_internal ... @bar.setter ... def bar(cls, value): ... cls._bar_internal = value ... Traceback (most recent call last): ... NotImplementedError: classproperty can only be read-only; use a metaclass to implement modifiable class-level properties When the ``lazy`` option is used, the getter is only called once:: >>> class Foo(object): ... @classproperty(lazy=True) ... def bar(cls): ... print("Performing complicated calculation") ... return 1 ... >>> Foo.bar Performing complicated calculation 1 >>> Foo.bar 1 If a subclass inherits a lazy `classproperty` the property is still re-evaluated for the subclass:: >>> class FooSub(Foo): ... pass ... >>> FooSub.bar Performing complicated calculation 1 >>> FooSub.bar 1 """ def __new__(cls, fget=None, doc=None, lazy=False): if fget is None: # Being used as a decorator--return a wrapper that implements # decorator syntax def wrapper(func): return cls(func, lazy=lazy) return wrapper return super(classproperty, cls).__new__(cls) def __init__(self, fget, doc=None, lazy=False): self._lazy = lazy if lazy: self._cache = {} fget = self._wrap_fget(fget) super(classproperty, self).__init__(fget=fget, doc=doc) # There is a buglet in Python where self.__doc__ doesn't # get set properly on instances of property subclasses if # the doc argument was used rather than taking the docstring # from fget if doc is not None: self.__doc__ = doc def __get__(self, obj, objtype=None): if self._lazy and objtype in self._cache: return self._cache[objtype] if objtype is not None: # The base property.__get__ will just return self here; # instead we pass objtype through to the original wrapped # function (which takes the class as its sole argument) val = self.fget.__wrapped__(objtype) else: val = super(classproperty, self).__get__(obj, objtype=objtype) if self._lazy: if objtype is None: objtype = obj.__class__ self._cache[objtype] = val return val def getter(self, fget): return super(classproperty, self).getter(self._wrap_fget(fget)) def setter(self, fset): raise NotImplementedError( "classproperty can only be read-only; use a metaclass to " "implement modifiable class-level properties") def deleter(self, fdel): raise NotImplementedError( "classproperty can only be read-only; use a metaclass to " "implement modifiable class-level properties") @staticmethod def _wrap_fget(orig_fget): if isinstance(orig_fget, classmethod): orig_fget = orig_fget.__func__ # Using stock functools.wraps instead of the fancier version # found later in this module, which is overkill for this purpose @functools.wraps(orig_fget) def fget(obj): return orig_fget(obj.__class__) # Set the __wrapped__ attribute manually for support on Python 2 fget.__wrapped__ = orig_fget return fget class lazyproperty(property): """ Works similarly to property(), but computes the value only once. This essentially memorizes the value of the property by storing the result of its computation in the ``__dict__`` of the object instance. This is useful for computing the value of some property that should otherwise be invariant. For example:: >>> class LazyTest(object): ... @lazyproperty ... def complicated_property(self): ... print('Computing the value for complicated_property...') ... return 42 ... >>> lt = LazyTest() >>> lt.complicated_property Computing the value for complicated_property... 42 >>> lt.complicated_property 42 As the example shows, the second time ``complicated_property`` is accessed, the ``print`` statement is not executed. Only the return value from the first access off ``complicated_property`` is returned. If a setter for this property is defined, it will still be possible to manually update the value of the property, if that capability is desired. Adapted from the recipe at http://code.activestate.com/recipes/363602-lazy-property-evaluation """ def __init__(self, fget, fset=None, fdel=None, doc=None): super(lazyproperty, self).__init__(fget, fset, fdel, doc) self._key = self.fget.__name__ def __get__(self, obj, owner=None): try: return obj.__dict__[self._key] except KeyError: val = self.fget(obj) obj.__dict__[self._key] = val return val except AttributeError: if obj is None: return self raise def __set__(self, obj, val): obj_dict = obj.__dict__ if self.fset: ret = self.fset(obj, val) if ret is not None and obj_dict.get(self._key) is ret: # By returning the value set the setter signals that it took # over setting the value in obj.__dict__; this mechanism allows # it to override the input value return obj_dict[self._key] = val def __delete__(self, obj): if self.fdel: self.fdel(obj) if self._key in obj.__dict__: del obj.__dict__[self._key] class sharedmethod(classmethod): """ This is a method decorator that allows both an instancemethod and a `classmethod` to share the same name. When using `sharedmethod` on a method defined in a class's body, it may be called on an instance, or on a class. In the former case it behaves like a normal instance method (a reference to the instance is automatically passed as the first ``self`` argument of the method):: >>> class Example(object): ... @sharedmethod ... def identify(self, *args): ... print('self was', self) ... print('additional args were', args) ... >>> ex = Example() >>> ex.identify(1, 2) self was additional args were (1, 2) In the latter case, when the `sharedmethod` is called directly from a class, it behaves like a `classmethod`:: >>> Example.identify(3, 4) self was additional args were (3, 4) This also supports a more advanced usage, where the `classmethod` implementation can be written separately. If the class's *metaclass* has a method of the same name as the `sharedmethod`, the version on the metaclass is delegated to:: >>> from astropy.extern.six import add_metaclass >>> class ExampleMeta(type): ... def identify(self): ... print('this implements the {0}.identify ' ... 'classmethod'.format(self.__name__)) ... >>> @add_metaclass(ExampleMeta) ... class Example(object): ... @sharedmethod ... def identify(self): ... print('this implements the instancemethod') ... >>> Example().identify() this implements the instancemethod >>> Example.identify() this implements the Example.identify classmethod """ if sys.version_info[:2] < (2, 7): # Workaround for Python 2.6 which does not have classmethod.__func__ @property def __func__(self): try: meth = classmethod.__get__(self, self.__obj__, self.__objtype__) except AttributeError: # self.__obj__ not set when called from __get__, but then it # doesn't matter anyways meth = classmethod.__get__(self, None, object) return meth.__func__ def __getobjwrapper(orig_get): """ Used to temporarily set/unset self.__obj__ and self.__objtype__ for use by __func__. """ def __get__(self, obj, objtype=None): self.__obj__ = obj self.__objtype__ = objtype try: return orig_get(self, obj, objtype) finally: del self.__obj__ del self.__objtype__ return __get__ else: def __getobjwrapper(func): return func @__getobjwrapper def __get__(self, obj, objtype=None): if obj is None: mcls = type(objtype) clsmeth = getattr(mcls, self.__func__.__name__, None) if callable(clsmeth): if isinstance(clsmeth, types.MethodType): # This case will generally only apply on Python 2, which # uses MethodType for unbound methods; Python 3 has no # particular concept of unbound methods and will just # return a function func = clsmeth.__func__ else: func = clsmeth else: func = self.__func__ return self._make_method(func, objtype) else: return self._make_method(self.__func__, obj) del __getobjwrapper if six.PY3: # The 'instancemethod' type of Python 2 and the method type of # Python 3 have slightly different constructors @staticmethod def _make_method(func, instance): return types.MethodType(func, instance) else: @staticmethod def _make_method(func, instance): return types.MethodType(func, instance, type(instance)) def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, updated=functools.WRAPPER_UPDATES, exclude_args=()): """ An alternative to `functools.wraps` which also preserves the original function's call signature by way of `~astropy.utils.codegen.make_function_with_signature`. This also adds an optional ``exclude_args`` argument. If given it should be a sequence of argument names that should not be copied from the wrapped function (either positional or keyword arguments). The documentation for the original `functools.wraps` follows: """ wrapped_args = _get_function_args(wrapped, exclude_args=exclude_args) def wrapper(func): if '__name__' in assigned: name = wrapped.__name__ else: name = func.__name__ func = make_function_with_signature(func, name=name, **wrapped_args) func = functools.update_wrapper(func, wrapped, assigned=assigned, updated=updated) return func return wrapper if isinstance(wraps.__doc__, six.string_types): wraps.__doc__ += functools.wraps.__doc__ if six.PY3: def _get_function_args_internal(func): """ Utility function for `wraps`. Reads the argspec for the given function and converts it to arguments for `make_function_with_signature`. This requires different implementations on Python 2 versus Python 3. """ argspec = inspect.getfullargspec(func) if argspec.defaults: args = argspec.args[:-len(argspec.defaults)] kwargs = zip(argspec.args[len(args):], argspec.defaults) else: args = argspec.args kwargs = [] if argspec.kwonlyargs: kwargs.extend((argname, argspec.kwonlydefaults[argname]) for argname in argspec.kwonlyargs) return {'args': args, 'kwargs': kwargs, 'varargs': argspec.varargs, 'varkwargs': argspec.varkw} else: def _get_function_args_internal(func): """ Utility function for `wraps`. Reads the argspec for the given function and converts it to arguments for `make_function_with_signature`. This requires different implementations on Python 2 versus Python 3. """ argspec = inspect.getargspec(func) if argspec.defaults: args = argspec.args[:-len(argspec.defaults)] kwargs = zip(argspec.args[len(args):], argspec.defaults) else: args = argspec.args kwargs = {} return {'args': args, 'kwargs': kwargs, 'varargs': argspec.varargs, 'varkwargs': argspec.keywords} def _get_function_args(func, exclude_args=()): all_args = _get_function_args_internal(func) if exclude_args: exclude_args = set(exclude_args) for arg_type in ('args', 'kwargs'): all_args[arg_type] = [arg for arg in all_args[arg_type] if arg not in exclude_args] for arg_type in ('varargs', 'varkwargs'): if all_args[arg_type] in exclude_args: all_args[arg_type] = None return all_args astropy-1.1.1/astropy/utils/console.py0000644001134200020070000007755012644017723021020 0ustar embrayscience00000000000000# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Utilities for console input and output. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import codecs import locale import re import math import multiprocessing import os import struct import sys import threading import time try: import fcntl import termios import signal _CAN_RESIZE_TERMINAL = True except ImportError: _CAN_RESIZE_TERMINAL = False try: from IPython import get_ipython except ImportError: pass try: get_ipython() except NameError: OutStream = None IPythonIOStream = None else: from IPython import version_info ipython_major_version = version_info[0] try: from ipykernel.iostream import OutStream except ImportError: try: from IPython.zmq.iostream import OutStream except ImportError: if ipython_major_version < 4: try: from IPython.kernel.zmq.iostream import OutStream except ImportError: OutStream = None else: OutStream = None if OutStream is not None: from IPython.utils import io as ipyio # On Windows in particular this is necessary, as the io.stdout stream # in IPython gets hooked up to some pyreadline magic to handle colors IPythonIOStream = ipyio.IOStream else: OutStream = None IPythonIOStream = None # On Windows, in IPython 2 the standard I/O streams will wrap # pyreadline.Console objects if pyreadline is available; this should # be considered a TTY try: from pyreadyline.console import Console as PyreadlineConsole except ImportError: # Just define a dummy class class PyreadlineConsole(object): pass from ..config import ConfigAlias from ..extern import six from ..extern.six.moves import range from .. import conf from .. import units as u from .decorators import deprecated from .misc import isiterable __all__ = [ 'isatty', 'color_print', 'human_time', 'human_file_size', 'ProgressBar', 'Spinner', 'print_code_line', 'ProgressBarOrSpinner', 'terminal_size'] # Only use color by default on Windows if IPython is installed. USE_COLOR = ConfigAlias( '0.4', 'USE_COLOR', 'use_color', 'astropy.utils.console', 'astropy') _DEFAULT_ENCODING = 'utf-8' def _get_stdout(stderr=False): """ This utility function contains the logic to determine what streams to use by default for standard out/err. Typically this will just return `sys.stdout`, but it contains additional logic for use in IPython on Windows to determine the correct stream to use (usually ``IPython.util.io.stdout`` but only if sys.stdout is a TTY). """ if stderr: stream = 'stderr' else: stream = 'stdout' sys_stream = getattr(sys, stream) if IPythonIOStream is None: return sys_stream ipyio_stream = getattr(ipyio, stream) if isatty(sys_stream) and isatty(ipyio_stream): # Use the IPython console output stream return ipyio_stream else: # sys.stdout was set to some other non-TTY stream (a file perhaps) # so just use it directly return sys_stream def isatty(file): """ Returns `True` if `file` is a tty. Most built-in Python file-like objects have an `isatty` member, but some user-defined types may not, so this assumes those are not ttys. """ if (multiprocessing.current_process().name != 'MainProcess' or threading.current_thread().getName() != 'MainThread'): return False if hasattr(file, 'isatty'): return file.isatty() elif (OutStream is not None and isinstance(file, (OutStream, IPythonIOStream)) and ((hasattr(file, 'name') and file.name == 'stdout') or (hasattr(file, 'stream') and isinstance(file.stream, PyreadlineConsole)))): # File is an IPython OutStream or IOStream and # File name is 'stdout' or # File wraps a Console return True return False def terminal_size(file=None): """ Returns a tuple (height, width) containing the height and width of the terminal. This function will look for the width in height in multiple areas before falling back on the width and height in astropy's configuration. """ if file is None: file = _get_stdout() try: s = struct.pack(str("HHHH"), 0, 0, 0, 0) x = fcntl.ioctl(file, termios.TIOCGWINSZ, s) (lines, width, xpixels, ypixels) = struct.unpack(str("HHHH"), x) if lines > 12: lines -= 6 if width > 10: width -= 1 return (lines, width) except: try: # see if POSIX standard variables will work return (int(os.environ.get('LINES')), int(os.environ.get('COLUMNS'))) except TypeError: # fall back on configuration variables, or if not # set, (25, 80) lines = conf.max_lines width = conf.max_width if lines is None: lines = 25 if width is None: width = 80 return lines, width def _color_text(text, color): """ Returns a string wrapped in ANSI color codes for coloring the text in a terminal:: colored_text = color_text('Here is a message', 'blue') This won't actually effect the text until it is printed to the terminal. Parameters ---------- text : str The string to return, bounded by the color codes. color : str An ANSI terminal color name. Must be one of: black, red, green, brown, blue, magenta, cyan, lightgrey, default, darkgrey, lightred, lightgreen, yellow, lightblue, lightmagenta, lightcyan, white, or '' (the empty string). """ color_mapping = { 'black': '0;30', 'red': '0;31', 'green': '0;32', 'brown': '0;33', 'blue': '0;34', 'magenta': '0;35', 'cyan': '0;36', 'lightgrey': '0;37', 'default': '0;39', 'darkgrey': '1;30', 'lightred': '1;31', 'lightgreen': '1;32', 'yellow': '1;33', 'lightblue': '1;34', 'lightmagenta': '1;35', 'lightcyan': '1;36', 'white': '1;37'} if sys.platform == 'win32' and OutStream is None: # On Windows do not colorize text unless in IPython return text color_code = color_mapping.get(color, '0;39') return '\033[{0}m{1}\033[0m'.format(color_code, text) def _decode_preferred_encoding(s): """Decode the supplied byte string using the preferred encoding for the locale (`locale.getpreferredencoding`) or, if the default encoding is invalid, fall back first on utf-8, then on latin-1 if the message cannot be decoded with utf-8. """ enc = locale.getpreferredencoding() try: try: return s.decode(enc) except LookupError: enc = _DEFAULT_ENCODING return s.decode(enc) except UnicodeDecodeError: return s.decode('latin-1') def _write_with_fallback(s, write, fileobj): """Write the supplied string with the given write function like ``write(s)``, but use a writer for the locale's preferred encoding in case of a UnicodeEncodeError. Failing that attempt to write with 'utf-8' or 'latin-1'. """ if IPythonIOStream is not None and isinstance(fileobj, IPythonIOStream): # If the output stream is an IPython.utils.io.IOStream object that's # not going to be very helpful to us since it doesn't raise any # exceptions when an error occurs writing to its underlying stream. # There's no advantage to us using IOStream.write directly though; # instead just write directly to its underlying stream: write = fileobj.stream.write try: write(s) return write except UnicodeEncodeError: # Let's try the next approach... pass enc = locale.getpreferredencoding() try: Writer = codecs.getwriter(enc) except LookupError: Writer = codecs.getwriter(_DEFAULT_ENCODING) f = Writer(fileobj) write = f.write try: write(s) return write except UnicodeEncodeError: Writer = codecs.getwriter('latin-1') f = Writer(fileobj) write = f.write # If this doesn't work let the exception bubble up; I'm out of ideas write(s) return write def color_print(*args, **kwargs): """ Prints colors and styles to the terminal uses ANSI escape sequences. :: color_print('This is the color ', 'default', 'GREEN', 'green') Parameters ---------- positional args : str The positional arguments come in pairs (*msg*, *color*), where *msg* is the string to display and *color* is the color to display it in. *color* is an ANSI terminal color name. Must be one of: black, red, green, brown, blue, magenta, cyan, lightgrey, default, darkgrey, lightred, lightgreen, yellow, lightblue, lightmagenta, lightcyan, white, or '' (the empty string). file : writeable file-like object, optional Where to write to. Defaults to `sys.stdout`. If file is not a tty (as determined by calling its `isatty` member, if one exists), no coloring will be included. end : str, optional The ending of the message. Defaults to ``\\n``. The end will be printed after resetting any color or font state. """ file = kwargs.get('file', _get_stdout()) end = kwargs.get('end', '\n') write = file.write if isatty(file) and conf.use_color: for i in range(0, len(args), 2): msg = args[i] if i + 1 == len(args): color = '' else: color = args[i + 1] if color: msg = _color_text(msg, color) # Some file objects support writing unicode sensibly on some Python # versions; if this fails try creating a writer using the locale's # preferred encoding. If that fails too give up. if not six.PY3 and isinstance(msg, bytes): msg = _decode_preferred_encoding(msg) write = _write_with_fallback(msg, write, file) write(end) else: for i in range(0, len(args), 2): msg = args[i] if not six.PY3 and isinstance(msg, bytes): # Support decoding bytes to unicode on Python 2; use the # preferred encoding for the locale (which is *sometimes* # sensible) msg = _decode_preferred_encoding(msg) write(msg) write(end) def strip_ansi_codes(s): """ Remove ANSI color codes from the string. """ return re.sub('\033\[([0-9]+)(;[0-9]+)*m', '', s) def human_time(seconds): """ Returns a human-friendly time string that is always exactly 6 characters long. Depending on the number of seconds given, can be one of:: 1w 3d 2d 4h 1h 5m 1m 4s 15s Will be in color if console coloring is turned on. Parameters ---------- seconds : int The number of seconds to represent Returns ------- time : str A human-friendly representation of the given number of seconds that is always exactly 6 characters. """ units = [ ('y', 60 * 60 * 24 * 7 * 52), ('w', 60 * 60 * 24 * 7), ('d', 60 * 60 * 24), ('h', 60 * 60), ('m', 60), ('s', 1), ] seconds = int(seconds) if seconds < 60: return ' {0:2d}s'.format(seconds) for i in range(len(units) - 1): unit1, limit1 = units[i] unit2, limit2 = units[i + 1] if seconds >= limit1: return '{0:2d}{1}{2:2d}{3}'.format( seconds // limit1, unit1, (seconds % limit1) // limit2, unit2) return ' ~inf' def human_file_size(size): """ Returns a human-friendly string representing a file size that is 2-4 characters long. For example, depending on the number of bytes given, can be one of:: 256b 64k 1.1G Parameters ---------- size : int The size of the file (in bytes) Returns ------- size : str A human-friendly representation of the size of the file """ if hasattr(size, 'unit'): size = size.to(u.byte).value suffixes = ' kMGTPEZY' if size == 0: num_scale = 0 else: num_scale = int(math.floor(math.log(size) / math.log(1000))) if num_scale > 7: suffix = '?' else: suffix = suffixes[num_scale] num_scale = int(math.pow(1000, num_scale)) value = size / num_scale str_value = str(value) if suffix == ' ': str_value = str_value[:str_value.index('.')] elif str_value[2] == '.': str_value = str_value[:2] else: str_value = str_value[:3] return "{0:>3s}{1}".format(str_value, suffix) class ProgressBar(six.Iterator): """ A class to display a progress bar in the terminal. It is designed to be used either with the ``with`` statement:: with ProgressBar(len(items)) as bar: for item in enumerate(items): bar.update() or as a generator:: for item in ProgressBar(items): item.process() """ def __init__(self, total_or_items, ipython_widget=False, file=None): """ Parameters ---------- total_or_items : int or sequence If an int, the number of increments in the process being tracked. If a sequence, the items to iterate over. ipython_widget : bool, optional If `True`, the progress bar will display as an IPython notebook widget. file : writable file-like object, optional The file to write the progress bar to. Defaults to `sys.stdout`. If `file` is not a tty (as determined by calling its `isatty` member, if any, or special case hacks to detect the IPython console), the progress bar will be completely silent. """ if ipython_widget: # Import only if ipython_widget, i.e., widget in IPython # notebook if ipython_major_version < 4: from IPython.html import widgets else: from ipywidgets import widgets from IPython.display import display if file is None: file = _get_stdout() if not isatty(file) and not ipython_widget: self.update = self._silent_update self._silent = True else: self._silent = False if isiterable(total_or_items): self._items = iter(total_or_items) self._total = len(total_or_items) else: try: self._total = int(total_or_items) except TypeError: raise TypeError("First argument must be int or sequence") else: self._items = iter(range(self._total)) self._file = file self._start_time = time.time() self._human_total = human_file_size(self._total) self._ipython_widget = ipython_widget self._signal_set = False if not ipython_widget: self._should_handle_resize = ( _CAN_RESIZE_TERMINAL and self._file.isatty()) self._handle_resize() if self._should_handle_resize: signal.signal(signal.SIGWINCH, self._handle_resize) self._signal_set = True self.update(0) def _handle_resize(self, signum=None, frame=None): terminal_width = terminal_size(self._file)[1] self._bar_length = terminal_width - 37 def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): if not self._silent: if exc_type is None: self.update(self._total) self._file.write('\n') self._file.flush() if self._signal_set: signal.signal(signal.SIGWINCH, signal.SIG_DFL) def __iter__(self): return self def __next__(self): try: rv = next(self._items) except StopIteration: self.__exit__(None, None, None) raise else: self.update() return rv def update(self, value=None): """ Update progress bar via the console or notebook accordingly. """ # Update self.value if value is None: value = self._current_value + 1 self._current_value = value # Choose the appropriate environment if self._ipython_widget: self._update_ipython_widget(value) else: self._update_console(value) def _update_console(self, value=None): """ Update the progress bar to the given value (out of the total given to the constructor). """ if self._total == 0: frac = 1.0 else: frac = float(value) / float(self._total) file = self._file write = file.write if frac > 1: bar_fill = int(self._bar_length) else: bar_fill = int(float(self._bar_length) * frac) write('\r|') color_print('=' * bar_fill, 'blue', file=file, end='') if bar_fill < self._bar_length: color_print('>', 'green', file=file, end='') write('-' * (self._bar_length - bar_fill - 1)) write('|') if value >= self._total: t = time.time() - self._start_time prefix = ' ' elif value <= 0: t = None prefix = '' else: t = ((time.time() - self._start_time) * (1.0 - frac)) / frac prefix = ' ETA ' write(' {0:>4s}/{1:>4s}'.format( human_file_size(value), self._human_total)) write(' ({0:>6s}%)'.format('{0:.2f}'.format(frac * 100.0))) write(prefix) if t is not None: write(human_time(t)) self._file.flush() def _update_ipython_widget(self, value=None): """ Update the progress bar to the given value (out of a total given to the constructor). This method is for use in the IPython notebook 2+. """ # Create and display an empty progress bar widget, # if none exists. if not hasattr(self, '_widget'): # Import only if an IPython widget, i.e., widget in iPython NB if ipython_major_version < 4: from IPython.html import widgets self._widget = widgets.FloatProgressWidget() else: from ipywidgets import widgets self._widget = widgets.FloatProgress() from IPython.display import display display(self._widget) self._widget.value = 0 # Calculate percent completion, and update progress bar percent = (value/self._total) * 100 self._widget.value = percent self._widget.description =' ({0:>6s}%)'.format('{0:.2f}'.format(percent)) def _silent_update(self, value=None): pass @classmethod def map(cls, function, items, multiprocess=False, file=None, step=100): """ Does a `map` operation while displaying a progress bar with percentage complete. :: def work(i): print(i) ProgressBar.map(work, range(50)) Parameters ---------- function : function Function to call for each step items : sequence Sequence where each element is a tuple of arguments to pass to *function*. multiprocess : bool, optional If `True`, use the `multiprocessing` module to distribute each task to a different processor core. file : writeable file-like object, optional The file to write the progress bar to. Defaults to `sys.stdout`. If `file` is not a tty (as determined by calling its `isatty` member, if any), the scrollbar will be completely silent. step : int, optional Update the progress bar at least every *step* steps (default: 100). If ``multiprocess`` is `True`, this will affect the size of the chunks of ``items`` that are submitted as separate tasks to the process pool. A large step size may make the job complete faster if ``items`` is very long. """ results = [] if file is None: file = _get_stdout() with cls(len(items), file=file) as bar: default_step = max(int(float(len(items)) / bar._bar_length), 1) chunksize = min(default_step, step) if not multiprocess: for i, item in enumerate(items): results.append(function(item)) if (i % chunksize) == 0: bar.update(i) else: p = multiprocessing.Pool() for i, result in enumerate( p.imap_unordered(function, items, chunksize=chunksize)): bar.update(i) results.append(result) p.close() p.join() return results class Spinner(object): """ A class to display a spinner in the terminal. It is designed to be used with the ``with`` statement:: with Spinner("Reticulating splines", "green") as s: for item in enumerate(items): s.next() """ _default_unicode_chars = "â—“â—‘â—’â—" _default_ascii_chars = "-/|\\" def __init__(self, msg, color='default', file=None, step=1, chars=None): """ Parameters ---------- msg : str The message to print color : str, optional An ANSI terminal color name. Must be one of: black, red, green, brown, blue, magenta, cyan, lightgrey, default, darkgrey, lightred, lightgreen, yellow, lightblue, lightmagenta, lightcyan, white. file : writeable file-like object, optional The file to write the spinner to. Defaults to `sys.stdout`. If `file` is not a tty (as determined by calling its `isatty` member, if any, or special case hacks to detect the IPython console), the spinner will be completely silent. step : int, optional Only update the spinner every *step* steps chars : str, optional The character sequence to use for the spinner """ if file is None: file = _get_stdout() self._msg = msg self._color = color self._file = file self._step = step if chars is None: if conf.unicode_output: chars = self._default_unicode_chars else: chars = self._default_ascii_chars self._chars = chars self._silent = not isatty(file) def _iterator(self): chars = self._chars index = 0 file = self._file write = file.write flush = file.flush try_fallback = True while True: write('\r') color_print(self._msg, self._color, file=file, end='') write(' ') try: if try_fallback: write = _write_with_fallback(chars[index], write, file) else: write(chars[index]) except UnicodeError: # If even _write_with_fallback failed for any reason just give # up on trying to use the unicode characters chars = self._default_ascii_chars write(chars[index]) try_fallback = False # No good will come of using this again flush() yield for i in range(self._step): yield index = (index + 1) % len(chars) def __enter__(self): if self._silent: return self._silent_iterator() else: return self._iterator() def __exit__(self, exc_type, exc_value, traceback): file = self._file write = file.write flush = file.flush if not self._silent: write('\r') color_print(self._msg, self._color, file=file, end='') if exc_type is None: color_print(' [Done]', 'green', file=file) else: color_print(' [Failed]', 'red', file=file) flush() def _silent_iterator(self): color_print(self._msg, self._color, file=self._file, end='') self._file.flush() while True: yield class ProgressBarOrSpinner(object): """ A class that displays either a `ProgressBar` or `Spinner` depending on whether the total size of the operation is known or not. It is designed to be used with the ``with`` statement:: if file.has_length(): length = file.get_length() else: length = None bytes_read = 0 with ProgressBarOrSpinner(length) as bar: while file.read(blocksize): bytes_read += blocksize bar.update(bytes_read) """ def __init__(self, total, msg, color='default', file=None): """ Parameters ---------- total : int or None If an int, the number of increments in the process being tracked and a `ProgressBar` is displayed. If `None`, a `Spinner` is displayed. msg : str The message to display above the `ProgressBar` or alongside the `Spinner`. color : str, optional The color of ``msg``, if any. Must be an ANSI terminal color name. Must be one of: black, red, green, brown, blue, magenta, cyan, lightgrey, default, darkgrey, lightred, lightgreen, yellow, lightblue, lightmagenta, lightcyan, white. file : writable file-like object, optional The file to write the to. Defaults to `sys.stdout`. If `file` is not a tty (as determined by calling its `isatty` member, if any), only ``msg`` will be displayed: the `ProgressBar` or `Spinner` will be silent. """ if file is None: file = _get_stdout() if total is None or not isatty(file): self._is_spinner = True self._obj = Spinner(msg, color=color, file=file) else: self._is_spinner = False color_print(msg, color, file=file) self._obj = ProgressBar(total, file=file) def __enter__(self): self._iter = self._obj.__enter__() return self def __exit__(self, exc_type, exc_value, traceback): return self._obj.__exit__(exc_type, exc_value, traceback) def update(self, value): """ Update the progress bar to the given value (out of the total given to the constructor. """ if self._is_spinner: next(self._iter) else: self._obj.update(value) def print_code_line(line, col=None, file=None, tabwidth=8, width=70): """ Prints a line of source code, highlighting a particular character position in the line. Useful for displaying the context of error messages. If the line is more than ``width`` characters, the line is truncated accordingly and '…' characters are inserted at the front and/or end. It looks like this:: there_is_a_syntax_error_here : ^ Parameters ---------- line : unicode The line of code to display col : int, optional The character in the line to highlight. ``col`` must be less than ``len(line)``. file : writeable file-like object, optional Where to write to. Defaults to `sys.stdout`. tabwidth : int, optional The number of spaces per tab (``'\\t'``) character. Default is 8. All tabs will be converted to spaces to ensure that the caret lines up with the correct column. width : int, optional The width of the display, beyond which the line will be truncated. Defaults to 70 (this matches the default in the standard library's `textwrap` module). """ if file is None: file = _get_stdout() if conf.unicode_output: ellipsis = '…' else: ellipsis = '...' write = file.write if col is not None: assert col < len(line) ntabs = line[:col].count('\t') col += ntabs * (tabwidth - 1) line = line.rstrip('\n') line = line.replace('\t', ' ' * tabwidth) if col is not None and col > width: new_col = min(width // 2, len(line) - col) offset = col - new_col line = line[offset + len(ellipsis):] width -= len(ellipsis) new_col = col col -= offset color_print(ellipsis, 'darkgrey', file=file, end='') if len(line) > width: write(line[:width - len(ellipsis)]) color_print(ellipsis, 'darkgrey', file=file) else: write(line) write('\n') if col is not None: write(' ' * col) color_print('^', 'red', file=file) # The following four Getch* classes implement unbuffered character reading from # stdin on Windows, linux, MacOSX. This is taken directly from ActiveState # Code Recipes: # http://code.activestate.com/recipes/134892-getch-like-unbuffered-character-reading-from-stdin/ # class Getch(object): """Get a single character from standard input without screen echo. Returns ------- char : str (one character) """ def __init__(self): try: self.impl = _GetchWindows() except ImportError: try: self.impl = _GetchMacCarbon() except (ImportError, AttributeError): self.impl = _GetchUnix() def __call__(self): return self.impl() class _GetchUnix(object): def __init__(self): import tty import sys # import termios now or else you'll get the Unix # version on the Mac import termios def __call__(self): import sys import tty import termios fd = sys.stdin.fileno() old_settings = termios.tcgetattr(fd) try: tty.setraw(sys.stdin.fileno()) ch = sys.stdin.read(1) finally: termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) return ch class _GetchWindows(object): def __init__(self): import msvcrt def __call__(self): import msvcrt return msvcrt.getch() class _GetchMacCarbon(object): """ A function which returns the current ASCII key that is down; if no ASCII key is down, the null string is returned. The page http://www.mactech.com/macintosh-c/chap02-1.html was very helpful in figuring out how to do this. """ def __init__(self): import Carbon Carbon.Evt # see if it has this (in Unix, it doesn't) def __call__(self): import Carbon if Carbon.Evt.EventAvail(0x0008)[0] == 0: # 0x0008 is the keyDownMask return '' else: # # The event contains the following info: # (what,msg,when,where,mod)=Carbon.Evt.GetNextEvent(0x0008)[1] # # The message (msg) contains the ASCII char which is # extracted with the 0x000000FF charCodeMask; this # number is converted to an ASCII character with chr() and # returned # (what, msg, when, where, mod) = Carbon.Evt.GetNextEvent(0x0008)[1] return chr(msg & 0x000000FF) astropy-1.1.1/astropy/utils/iers/0000755001134200020070000000000012644022135017721 5ustar embrayscience00000000000000astropy-1.1.1/astropy/utils/iers/data/0000755001134200020070000000000012644022135020632 5ustar embrayscience00000000000000astropy-1.1.1/astropy/utils/iers/data/eopc04_IAU2000.62-now0000644001134200020070001340714012640262015023707 0ustar embrayscience00000000000000 INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE EARTH ORIENTATION PARAMETERS EOP (IERS) 08 C04 FORMAT(3(I4),I7,2(F11.6),2(F12.7),2(F11.6),2(F11.6),2(F11.7),2F12.6) ********************************************************************************** Date MJD x y UT1-UTC LOD dX dY x Err y Err UT1-UTC Err LOD Err dX Err dY Err " " s s " " " " s s " " (0h UTC) 1962 1 1 37665 -0.012700 0.213000 0.0326338 0.0017230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 2 37666 -0.015900 0.214100 0.0320547 0.0016690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 3 37667 -0.019000 0.215200 0.0315526 0.0015820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 4 37668 -0.021999 0.216301 0.0311435 0.0014960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 5 37669 -0.024799 0.217301 0.0308154 0.0014160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 6 37670 -0.027599 0.218301 0.0305353 0.0013820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 7 37671 -0.030199 0.219301 0.0302682 0.0014130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 8 37672 -0.032798 0.220202 0.0299280 0.0015050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 9 37673 -0.035198 0.221102 0.0294869 0.0016280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 10 37674 -0.037498 0.222002 0.0289268 0.0017380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 11 37675 -0.039697 0.222803 0.0282797 0.0017940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 12 37676 -0.041797 0.223703 0.0276136 0.0017740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 13 37677 -0.043797 0.224503 0.0270075 0.0016670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 14 37678 -0.045697 0.225203 0.0265403 0.0015100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 15 37679 -0.047496 0.226004 0.0262572 0.0013120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 16 37680 -0.049196 0.226704 0.0261751 0.0011120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 17 37681 -0.050796 0.227404 0.0262740 0.0009360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 18 37682 -0.052295 0.228005 0.0265299 0.0008110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 19 37683 -0.053595 0.228705 0.0268868 0.0007330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 20 37684 -0.054895 0.229305 0.0273077 0.0006810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 21 37685 -0.055995 0.229905 0.0277506 0.0006780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 22 37686 -0.057094 0.230506 0.0281834 0.0007210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 23 37687 -0.057994 0.231006 0.0285533 0.0007900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 24 37688 -0.058794 0.231606 0.0288522 0.0008620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 25 37689 -0.059594 0.232106 0.0290721 0.0009440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 26 37690 -0.060193 0.232607 0.0292210 0.0010040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 27 37691 -0.060693 0.233207 0.0293239 0.0010370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 28 37692 -0.061093 0.233707 0.0294068 0.0010520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 29 37693 -0.061392 0.234208 0.0294776 0.0010520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 30 37694 -0.061692 0.234708 0.0295585 0.0010440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 1 31 37695 -0.061792 0.235208 0.0296424 0.0010370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 1 37696 -0.061792 0.235708 0.0297323 0.0010170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 2 37697 -0.061691 0.236209 0.0298362 0.0010410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 3 37698 -0.061491 0.236709 0.0298791 0.0011250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 4 37699 -0.061191 0.237309 0.0298030 0.0012890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 5 37700 -0.060791 0.237809 0.0295339 0.0015060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 6 37701 -0.060390 0.238410 0.0290467 0.0017140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 7 37702 -0.059790 0.239010 0.0283596 0.0018790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 8 37703 -0.059190 0.239610 0.0275575 0.0019590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 9 37704 -0.058389 0.240211 0.0267354 0.0019300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 10 37705 -0.057589 0.240811 0.0259753 0.0018180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 11 37706 -0.056689 0.241511 0.0253542 0.0016500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 12 37707 -0.055689 0.242211 0.0249181 0.0014740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 13 37708 -0.054588 0.242912 0.0246570 0.0013030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 14 37709 -0.053488 0.243612 0.0245359 0.0011660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 15 37710 -0.052288 0.244312 0.0245467 0.0010810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 16 37711 -0.050988 0.245112 0.0246076 0.0010560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 17 37712 -0.049587 0.245813 0.0246695 0.0010640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 18 37713 -0.048187 0.246613 0.0247074 0.0011130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 19 37714 -0.046687 0.247413 0.0246873 0.0011600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 20 37715 -0.045186 0.248214 0.0246352 0.0012130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 21 37716 -0.043486 0.249014 0.0245041 0.0012870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 22 37717 -0.041786 0.249814 0.0243170 0.0013330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 23 37718 -0.040086 0.250614 0.0240879 0.0013590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 24 37719 -0.038285 0.251415 0.0238487 0.0013740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 25 37720 -0.036385 0.252115 0.0236096 0.0013510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 26 37721 -0.034485 0.252915 0.0234035 0.0013080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 27 37722 -0.032585 0.253715 0.0232364 0.0012560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 2 28 37723 -0.030584 0.254416 0.0231283 0.0012210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 1 37724 -0.028484 0.255116 0.0230452 0.0012020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 2 37725 -0.026384 0.255816 0.0229381 0.0012430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 3 37726 -0.024283 0.256517 0.0227770 0.0013520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 4 37727 -0.022083 0.257117 0.0224709 0.0015200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 5 37728 -0.019983 0.257717 0.0219628 0.0017300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 6 37729 -0.017683 0.258317 0.0212546 0.0019290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 7 37730 -0.015482 0.258818 0.0203775 0.0020600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 8 37731 -0.013282 0.259218 0.0194214 0.0020840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 9 37732 -0.010982 0.259618 0.0184953 0.0019990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 10 37733 -0.008682 0.260018 0.0176992 0.0018350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 11 37734 -0.006381 0.260319 0.0170871 0.0016380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 12 37735 -0.004081 0.260519 0.0166690 0.0014540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 13 37736 -0.001781 0.260719 0.0164149 0.0013130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 14 37737 0.000420 0.260820 0.0162728 0.0012200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 15 37738 0.002720 0.260920 0.0161857 0.0011940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 16 37739 0.005020 0.260920 0.0161086 0.0012170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 17 37740 0.007320 0.260820 0.0159894 0.0012770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 18 37741 0.009621 0.260621 0.0157963 0.0013510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 19 37742 0.011921 0.260421 0.0155242 0.0014440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 20 37743 0.014121 0.260121 0.0151601 0.0015220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 21 37744 0.016421 0.259721 0.0147350 0.0015840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 22 37745 0.018622 0.259322 0.0142509 0.0016100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 23 37746 0.020822 0.258822 0.0137668 0.0016110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 24 37747 0.023122 0.258222 0.0132897 0.0015690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 25 37748 0.025323 0.257623 0.0128686 0.0015090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 26 37749 0.027423 0.256923 0.0125245 0.0014170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 27 37750 0.029623 0.256123 0.0122734 0.0013380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 28 37751 0.031823 0.255323 0.0120923 0.0012910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 29 37752 0.033924 0.254424 0.0119371 0.0012770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 30 37753 0.036024 0.253524 0.0117570 0.0013340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 3 31 37754 0.038124 0.252524 0.0114859 0.0014700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 1 37755 0.040224 0.251524 0.0110478 0.0016640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 2 37756 0.042225 0.250525 0.0103997 0.0018730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 3 37757 0.044225 0.249425 0.0095526 0.0020600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 4 37758 0.046225 0.248325 0.0085585 0.0021620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 5 37759 0.048226 0.247126 0.0075064 0.0021510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 6 37760 0.050126 0.246026 0.0065313 0.0020430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 7 37761 0.052026 0.244826 0.0057022 0.0018580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 8 37762 0.053926 0.243626 0.0050701 0.0016570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 9 37763 0.055727 0.242427 0.0046280 0.0014860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 10 37764 0.057627 0.241227 0.0043199 0.0013800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 11 37765 0.059327 0.240027 0.0040768 0.0013360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 12 37766 0.061128 0.238828 0.0038687 0.0013390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 13 37767 0.062828 0.237628 0.0036235 0.0013860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 14 37768 0.064428 0.236428 0.0033174 0.0014620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 15 37769 0.066028 0.235228 0.0029343 0.0015530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 16 37770 0.067629 0.234029 0.0024602 0.0016440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 17 37771 0.069129 0.232929 0.0019101 0.0017130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 18 37772 0.070629 0.231729 0.0012930 0.0017470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 19 37773 0.072129 0.230629 0.0006559 0.0017600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 20 37774 0.073530 0.229530 0.0000338 0.0017280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 21 37775 0.074830 0.228430 -0.0005283 0.0016520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 22 37776 0.076230 0.227330 -0.0010234 0.0015640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 23 37777 0.077431 0.226231 -0.0014155 0.0014820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 24 37778 0.078631 0.225231 -0.0017436 0.0014070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 25 37779 0.079831 0.224131 -0.0020127 0.0013810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 26 37780 0.080931 0.223131 -0.0022728 0.0014090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 27 37781 0.082032 0.222132 -0.0026029 0.0015010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 28 37782 0.083132 0.221132 -0.0030440 0.0016510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 29 37783 0.084032 0.220132 -0.0036681 0.0018400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 4 30 37784 0.085032 0.219132 -0.0044842 0.0020370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 1 37785 0.085933 0.218133 -0.0054853 0.0021840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 2 37786 0.086733 0.217133 -0.0065815 0.0022400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 3 37787 0.087533 0.216033 -0.0076706 0.0021800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 4 37788 0.088334 0.215034 -0.0086607 0.0020190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 5 37789 0.089034 0.214034 -0.0094528 0.0018120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 6 37790 0.089734 0.212934 -0.0100369 0.0016090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 7 37791 0.090334 0.211834 -0.0104360 0.0014490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 8 37792 0.090935 0.210735 -0.0107141 0.0013580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 9 37793 0.091535 0.209635 -0.0109342 0.0013290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 10 37794 0.092035 0.208435 -0.0111503 0.0013500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 11 37795 0.092535 0.207235 -0.0114064 0.0014070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 12 37796 0.092936 0.205936 -0.0117305 0.0014940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 13 37797 0.093336 0.204636 -0.0121366 0.0015760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 14 37798 0.093736 0.203336 -0.0126307 0.0016490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 15 37799 0.094137 0.201937 -0.0131878 0.0017110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 16 37800 0.094437 0.200437 -0.0138029 0.0017440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 17 37801 0.094737 0.198937 -0.0144260 0.0017350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 18 37802 0.095037 0.197437 -0.0150221 0.0016930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 19 37803 0.095338 0.195738 -0.0155522 0.0016120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 20 37804 0.095538 0.194138 -0.0159923 0.0015270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 21 37805 0.095738 0.192338 -0.0163584 0.0014400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 22 37806 0.095938 0.190638 -0.0166415 0.0013740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 23 37807 0.096139 0.188739 -0.0168846 0.0013520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 24 37808 0.096339 0.186839 -0.0171257 0.0013910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 25 37809 0.096439 0.184939 -0.0174358 0.0014660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 26 37810 0.096640 0.182940 -0.0178309 0.0015780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 27 37811 0.096740 0.180940 -0.0183450 0.0016970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 28 37812 0.096840 0.178840 -0.0189741 0.0017850 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 29 37813 0.096940 0.176740 -0.0196522 0.0017960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 30 37814 0.097041 0.174641 -0.0202983 0.0017100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 5 31 37815 0.097241 0.172441 -0.0207934 0.0015370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 1 37816 0.097341 0.170241 -0.0210925 0.0013130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 2 37817 0.097441 0.168041 -0.0211636 0.0010800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 3 37818 0.097542 0.165842 -0.0210097 0.0008690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 4 37819 0.097642 0.163642 -0.0206698 0.0007010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 5 37820 0.097742 0.161442 -0.0201919 0.0006030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 6 37821 0.097843 0.159243 -0.0196530 0.0005790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 7 37822 0.097943 0.157043 -0.0191031 0.0005950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 8 37823 0.098043 0.154843 -0.0185932 0.0006380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 9 37824 0.098143 0.152643 -0.0181413 0.0007090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 10 37825 0.098244 0.150544 -0.0177694 0.0007860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 11 37826 0.098244 0.148444 -0.0174565 0.0008240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 12 37827 0.098344 0.146344 -0.0171686 0.0008450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 13 37828 0.098444 0.144344 -0.0168878 0.0008260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 14 37829 0.098545 0.142345 -0.0165709 0.0007870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 15 37830 0.098645 0.140345 -0.0162110 0.0007200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 16 37831 0.098645 0.138445 -0.0157641 0.0006340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 17 37832 0.098746 0.136546 -0.0152182 0.0005350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 18 37833 0.098746 0.134746 -0.0145923 0.0004580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 19 37834 0.098846 0.132946 -0.0139104 0.0004270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 20 37835 0.098846 0.131246 -0.0132284 0.0004600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 21 37836 0.098947 0.129547 -0.0126115 0.0005550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 22 37837 0.098947 0.127947 -0.0121126 0.0007010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 23 37838 0.098947 0.126347 -0.0117647 0.0008510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 24 37839 0.098947 0.124847 -0.0115558 0.0009710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 25 37840 0.098948 0.123348 -0.0114269 0.0010290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 26 37841 0.098948 0.121948 -0.0113290 0.0010110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 27 37842 0.098848 0.120548 -0.0111831 0.0009250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 28 37843 0.098849 0.119249 -0.0109102 0.0007720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 29 37844 0.098749 0.117949 -0.0104783 0.0006120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 6 30 37845 0.098649 0.116749 -0.0098784 0.0004530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 1 37846 0.098549 0.115549 -0.0091475 0.0003450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 2 37847 0.098450 0.114450 -0.0083366 0.0002820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 3 37848 0.098350 0.113350 -0.0074917 0.0002860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 4 37849 0.098150 0.112350 -0.0066738 0.0003340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 5 37850 0.097951 0.111351 -0.0059299 0.0004210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 6 37851 0.097651 0.110351 -0.0052700 0.0005110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 7 37852 0.097351 0.109351 -0.0046921 0.0006000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 8 37853 0.097051 0.108451 -0.0042052 0.0006730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 9 37854 0.096752 0.107552 -0.0037803 0.0007220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 10 37855 0.096352 0.106652 -0.0033884 0.0007390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 11 37856 0.095952 0.105852 -0.0029995 0.0007280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 12 37857 0.095552 0.104952 -0.0025956 0.0006910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 13 37858 0.095053 0.104153 -0.0021357 0.0006370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 14 37859 0.094553 0.103253 -0.0016268 0.0005850 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 15 37860 0.094053 0.102353 -0.0010599 0.0005340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 16 37861 0.093454 0.101554 -0.0004580 0.0005200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 17 37862 0.092854 0.100654 0.0001199 0.0005750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 18 37863 0.092254 0.099754 0.0006178 0.0006900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 19 37864 0.091654 0.098854 0.0009717 0.0008700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 20 37865 0.090955 0.097855 0.0011216 0.0010680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 21 37866 0.090255 0.096855 0.0010945 0.0012270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 22 37867 0.089455 0.095855 0.0009414 0.0013160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 23 37868 0.088755 0.094855 0.0007423 0.0013170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 24 37869 0.087956 0.093756 0.0005942 0.0012260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 25 37870 0.087156 0.092656 0.0005491 0.0010870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 26 37871 0.086356 0.091556 0.0006690 0.0009120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 27 37872 0.085457 0.090357 0.0009619 0.0007560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 28 37873 0.084657 0.089157 0.0013938 0.0006280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 29 37874 0.083757 0.087957 0.0019367 0.0005540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 30 37875 0.082857 0.086657 0.0025156 0.0005370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 7 31 37876 0.081858 0.085358 0.0030976 0.0005670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 1 37877 0.080958 0.084058 0.0036315 0.0006200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 2 37878 0.079958 0.082658 0.0040924 0.0006880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 3 37879 0.079058 0.081358 0.0044943 0.0007580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 4 37880 0.078059 0.079959 0.0048302 0.0008160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 5 37881 0.076959 0.078559 0.0051201 0.0008500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 6 37882 0.075959 0.077159 0.0053910 0.0008440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 7 37883 0.074860 0.075760 0.0056829 0.0008160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 8 37884 0.073860 0.074360 0.0060068 0.0007530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 9 37885 0.072660 0.072960 0.0064237 0.0006720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 10 37886 0.071560 0.071460 0.0069146 0.0005950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 11 37887 0.070361 0.070061 0.0074805 0.0005250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 12 37888 0.069261 0.068661 0.0081054 0.0004810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 13 37889 0.067961 0.067261 0.0087413 0.0004970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 14 37890 0.066761 0.065861 0.0093282 0.0005820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 15 37891 0.065462 0.064462 0.0098031 0.0007370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 16 37892 0.064162 0.063162 0.0100980 0.0009260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 17 37893 0.062762 0.061762 0.0101939 0.0011160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 18 37894 0.061463 0.060463 0.0101269 0.0012330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 19 37895 0.060063 0.059163 0.0099918 0.0012600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 20 37896 0.058563 0.057863 0.0098937 0.0011800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 21 37897 0.057063 0.056663 0.0099086 0.0010290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 22 37898 0.055564 0.055464 0.0100875 0.0008410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 23 37899 0.054064 0.054264 0.0104634 0.0006700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 24 37900 0.052464 0.053164 0.0109733 0.0005490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 25 37901 0.050864 0.052164 0.0115962 0.0004750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 26 37902 0.049265 0.051065 0.0122621 0.0004630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 27 37903 0.047565 0.050165 0.0128930 0.0005130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 28 37904 0.045965 0.049265 0.0134739 0.0006000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 29 37905 0.044166 0.048366 0.0139448 0.0007080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 30 37906 0.042466 0.047566 0.0143057 0.0008200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 8 31 37907 0.040666 0.046866 0.0145486 0.0009310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 1 37908 0.038866 0.046166 0.0147006 0.0010110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 2 37909 0.037067 0.045567 0.0147765 0.0010810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 3 37910 0.035267 0.044967 0.0147984 0.0011180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 4 37911 0.033467 0.044467 0.0148003 0.0011150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 5 37912 0.031567 0.044067 0.0148262 0.0010910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 6 37913 0.029668 0.043668 0.0148711 0.0010590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 7 37914 0.027768 0.043368 0.0149550 0.0010340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 8 37915 0.025868 0.043168 0.0150359 0.0010310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 9 37916 0.023869 0.042969 0.0151198 0.0010580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 10 37917 0.021969 0.042869 0.0151477 0.0011370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 11 37918 0.019969 0.042769 0.0150616 0.0012880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 12 37919 0.017969 0.042769 0.0147995 0.0014940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 13 37920 0.015970 0.042770 0.0143155 0.0017150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 14 37921 0.013970 0.042870 0.0136304 0.0019040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 15 37922 0.011970 0.043070 0.0127863 0.0020030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 16 37923 0.009870 0.043170 0.0119142 0.0019710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 17 37924 0.007871 0.043471 0.0111231 0.0018150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 18 37925 0.005771 0.043671 0.0105470 0.0015880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 19 37926 0.003671 0.043971 0.0101909 0.0013560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 20 37927 0.001572 0.044272 0.0100638 0.0011570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 21 37928 -0.000628 0.044672 0.0101057 0.0010200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 22 37929 -0.002728 0.045072 0.0102506 0.0009410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 23 37930 -0.004928 0.045472 0.0104526 0.0009240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 24 37931 -0.007127 0.045873 0.0106375 0.0009620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 25 37932 -0.009427 0.046373 0.0107694 0.0010260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 26 37933 -0.011627 0.046873 0.0108313 0.0010990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 27 37934 -0.013926 0.047374 0.0108222 0.0011660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 28 37935 -0.016226 0.047974 0.0107561 0.0012220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 29 37936 -0.018526 0.048474 0.0106380 0.0012500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 9 30 37937 -0.020926 0.049074 0.0105179 0.0012440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 1 37938 -0.023225 0.049675 0.0104208 0.0012050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 2 37939 -0.025625 0.050375 0.0103578 0.0011480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 3 37940 -0.028025 0.050975 0.0103797 0.0010770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 4 37941 -0.030425 0.051675 0.0104526 0.0010080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 5 37942 -0.032824 0.052376 0.0105955 0.0009700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 6 37943 -0.035224 0.053176 0.0107504 0.0009690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 7 37944 -0.037724 0.053976 0.0108803 0.0010300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 8 37945 -0.040123 0.054777 0.0109162 0.0011590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 9 37946 -0.042523 0.055577 0.0107901 0.0013550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 10 37947 -0.044923 0.056477 0.0104390 0.0016020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 11 37948 -0.047323 0.057377 0.0098240 0.0018640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 12 37949 -0.049722 0.058278 0.0089789 0.0020720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 13 37950 -0.052122 0.059278 0.0079758 0.0021750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 14 37951 -0.054422 0.060278 0.0069227 0.0021500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 15 37952 -0.056822 0.061378 0.0059606 0.0020100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 16 37953 -0.059121 0.062479 0.0051615 0.0018250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 17 37954 -0.061321 0.063579 0.0045484 0.0016460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 18 37955 -0.063521 0.064779 0.0040923 0.0015290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 19 37956 -0.065720 0.066080 0.0037263 0.0014640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 20 37957 -0.067920 0.067280 0.0033892 0.0014710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 21 37958 -0.070020 0.068680 0.0030171 0.0015220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 22 37959 -0.072020 0.069980 0.0025740 0.0016180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 23 37960 -0.074019 0.071381 0.0020369 0.0017190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 24 37961 -0.076019 0.072881 0.0013878 0.0018080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 25 37962 -0.077919 0.074381 0.0006657 0.0018810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 26 37963 -0.079819 0.075881 -0.0001163 0.0019180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 27 37964 -0.081618 0.077482 -0.0009184 0.0019110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 28 37965 -0.083318 0.079082 -0.0016875 0.0018710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 29 37966 -0.085018 0.080682 -0.0024096 0.0017990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 30 37967 -0.086717 0.082383 -0.0030377 0.0017050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 10 31 37968 -0.088317 0.084083 -0.0035678 0.0015950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 1 37969 -0.089817 0.085783 -0.0039819 0.0014790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 2 37970 -0.091317 0.087583 -0.0042959 0.0014060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 3 37971 -0.092816 0.089284 -0.0045610 0.0013930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 4 37972 -0.094216 0.091084 -0.0048531 0.0014410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 5 37973 -0.095616 0.092884 -0.0052152 0.0015520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 6 37974 -0.096916 0.094684 -0.0057163 0.0017170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 7 37975 -0.098215 0.096585 -0.0064094 0.0019090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 8 37976 -0.099515 0.098385 -0.0072885 0.0020920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 9 37977 -0.100715 0.100285 -0.0083195 0.0022050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 10 37978 -0.101914 0.102186 -0.0094216 0.0022200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 11 37979 -0.103114 0.104086 -0.0104707 0.0021200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 12 37980 -0.104314 0.105986 -0.0113928 0.0019440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 13 37981 -0.105514 0.107886 -0.0120979 0.0017270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 14 37982 -0.106813 0.109787 -0.0126060 0.0015360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 15 37983 -0.108013 0.111787 -0.0129420 0.0014090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 16 37984 -0.109213 0.113687 -0.0131991 0.0013560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 17 37985 -0.110413 0.115687 -0.0134262 0.0013570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 18 37986 -0.111712 0.117688 -0.0136873 0.0014110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 19 37987 -0.113012 0.119788 -0.0140154 0.0014870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 20 37988 -0.114312 0.121788 -0.0144125 0.0015660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 21 37989 -0.115711 0.123889 -0.0148935 0.0016230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 22 37990 -0.117111 0.125889 -0.0154206 0.0016670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 23 37991 -0.118511 0.127989 -0.0159767 0.0016800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 24 37992 -0.120011 0.130089 -0.0165288 0.0016690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 25 37993 -0.121510 0.132290 -0.0170549 0.0016270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 26 37994 -0.123110 0.134390 -0.0175250 0.0015700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 27 37995 -0.124710 0.136590 -0.0179400 0.0015000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 28 37996 -0.126410 0.138690 -0.0182851 0.0014230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 29 37997 -0.128209 0.140891 -0.0185552 0.0013830 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 11 30 37998 -0.130009 0.143091 -0.0188063 0.0013780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 1 37999 -0.131809 0.145391 -0.0190924 0.0014330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 2 38000 -0.133708 0.147592 -0.0194534 0.0015600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 3 38001 -0.135608 0.149892 -0.0199685 0.0017270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 4 38002 -0.137608 0.152092 -0.0206666 0.0019210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 5 38003 -0.139608 0.154392 -0.0215587 0.0021090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 6 38004 -0.141707 0.156693 -0.0226198 0.0022530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 7 38005 -0.143807 0.158993 -0.0237879 0.0023170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 8 38006 -0.146007 0.161293 -0.0249709 0.0022720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 9 38007 -0.148107 0.163693 -0.0260530 0.0021390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 10 38008 -0.150306 0.165994 -0.0269811 0.0019430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 11 38009 -0.152506 0.168394 -0.0277082 0.0017550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 12 38010 -0.154806 0.170694 -0.0282553 0.0016010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 13 38011 -0.157005 0.173095 -0.0286823 0.0015150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 14 38012 -0.159305 0.175495 -0.0290594 0.0014880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 15 38013 -0.161505 0.177895 -0.0294355 0.0015110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 16 38014 -0.163805 0.180295 -0.0298416 0.0015430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 17 38015 -0.166004 0.182696 -0.0302847 0.0015930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 18 38016 -0.168204 0.185096 -0.0307747 0.0016340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 19 38017 -0.170404 0.187496 -0.0312948 0.0016530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 20 38018 -0.172603 0.189897 -0.0318209 0.0016430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 21 38019 -0.174803 0.192297 -0.0323200 0.0016000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 22 38020 -0.176903 0.194697 -0.0327601 0.0015160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 23 38021 -0.179003 0.196997 -0.0331041 0.0014170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 24 38022 -0.181102 0.199398 -0.0333402 0.0013040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 25 38023 -0.183102 0.201798 -0.0334703 0.0011880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 26 38024 -0.185002 0.204198 -0.0334714 0.0010790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 27 38025 -0.186902 0.206598 -0.0334015 0.0010190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 28 38026 -0.188801 0.208999 -0.0332875 0.0010160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 29 38027 -0.190501 0.211299 -0.0332046 0.0010780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 30 38028 -0.192201 0.213699 -0.0332137 0.0011960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1962 12 31 38029 -0.193800 0.216000 -0.0333558 0.0013410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 1 38030 -0.195400 0.218400 -0.0336428 0.0014780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 2 38031 -0.196800 0.220700 -0.0340579 0.0015820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 3 38032 -0.198100 0.223100 -0.0345420 0.0016140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 4 38033 -0.199399 0.225401 -0.0350281 0.0015720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 5 38034 -0.200499 0.227701 -0.0354112 0.0014530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 6 38035 -0.201599 0.230001 -0.0356652 0.0012800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 7 38036 -0.202499 0.232401 -0.0357273 0.0010940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 8 38037 -0.203298 0.234702 -0.0356134 0.0009360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 9 38038 -0.203998 0.236902 -0.0353695 0.0008370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 10 38039 -0.204498 0.239202 -0.0350606 0.0008050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 11 38040 -0.204997 0.241503 -0.0347596 0.0008410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 12 38041 -0.205297 0.243803 -0.0345147 0.0009020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 13 38042 -0.205497 0.246003 -0.0343188 0.0009660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 14 38043 -0.205597 0.248303 -0.0342049 0.0010340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 15 38044 -0.205496 0.250504 -0.0341289 0.0010710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 16 38045 -0.205396 0.252704 -0.0340870 0.0010780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 17 38046 -0.205096 0.254904 -0.0340241 0.0010520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 18 38047 -0.204796 0.257104 -0.0339292 0.0009920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 19 38048 -0.204295 0.259305 -0.0337602 0.0009070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 20 38049 -0.203695 0.261405 -0.0334983 0.0008070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 21 38050 -0.202995 0.263505 -0.0331344 0.0007050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 22 38051 -0.202194 0.265606 -0.0326715 0.0006230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 23 38052 -0.201294 0.267606 -0.0321315 0.0005720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 24 38053 -0.200394 0.269606 -0.0315836 0.0005730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 25 38054 -0.199294 0.271606 -0.0310607 0.0006520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 26 38055 -0.198093 0.273607 -0.0306498 0.0007960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 27 38056 -0.196893 0.275507 -0.0304168 0.0009830 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 28 38057 -0.195593 0.277307 -0.0303759 0.0011800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 29 38058 -0.194193 0.279207 -0.0305120 0.0013300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 30 38059 -0.192792 0.281008 -0.0307591 0.0014090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 1 31 38060 -0.191292 0.282808 -0.0310581 0.0014030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 1 38061 -0.189692 0.284508 -0.0312982 0.0013060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 2 38062 -0.187991 0.286209 -0.0314123 0.0011660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 3 38063 -0.186391 0.287909 -0.0313674 0.0010040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 4 38064 -0.184591 0.289609 -0.0311884 0.0008860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 5 38065 -0.182891 0.291209 -0.0309185 0.0008230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 6 38066 -0.180990 0.292810 -0.0305966 0.0008060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 7 38067 -0.179190 0.294410 -0.0303107 0.0008610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 8 38068 -0.177290 0.296010 -0.0300937 0.0009500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 9 38069 -0.175390 0.297610 -0.0299778 0.0010690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 10 38070 -0.173489 0.299111 -0.0299719 0.0011760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 11 38071 -0.171489 0.300611 -0.0300740 0.0012640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 12 38072 -0.169589 0.302111 -0.0302400 0.0013130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 13 38073 -0.167588 0.303612 -0.0304481 0.0013260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 14 38074 -0.165588 0.305112 -0.0306402 0.0013030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 15 38075 -0.163588 0.306612 -0.0307833 0.0012390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 16 38076 -0.161588 0.308012 -0.0308623 0.0011670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 17 38077 -0.159487 0.309513 -0.0308654 0.0010810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 18 38078 -0.157487 0.311013 -0.0307865 0.0010040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 19 38079 -0.155387 0.312413 -0.0306435 0.0009540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 20 38080 -0.153387 0.313913 -0.0304596 0.0009370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 21 38081 -0.151286 0.315314 -0.0302987 0.0010030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 22 38082 -0.149186 0.316714 -0.0302308 0.0011430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 23 38083 -0.147086 0.318214 -0.0303458 0.0013460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 24 38084 -0.144985 0.319615 -0.0306809 0.0015840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 25 38085 -0.142885 0.321015 -0.0312550 0.0017940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 26 38086 -0.140685 0.322415 -0.0319921 0.0019120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 27 38087 -0.138485 0.323715 -0.0328001 0.0019360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 2 28 38088 -0.136284 0.325116 -0.0335682 0.0018430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 1 38089 -0.134084 0.326516 -0.0342123 0.0016870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 2 38090 -0.131784 0.327816 -0.0346843 0.0014970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 3 38091 -0.129484 0.329116 -0.0349754 0.0013410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 4 38092 -0.127183 0.330417 -0.0351255 0.0012310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 5 38093 -0.124783 0.331817 -0.0352105 0.0011910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 6 38094 -0.122383 0.333017 -0.0352806 0.0012080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 7 38095 -0.119982 0.334318 -0.0354047 0.0012870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 8 38096 -0.117482 0.335618 -0.0356148 0.0013850 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 9 38097 -0.114982 0.336818 -0.0359358 0.0014980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 10 38098 -0.112482 0.338118 -0.0363549 0.0015870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 11 38099 -0.109881 0.339319 -0.0368600 0.0016480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 12 38100 -0.107281 0.340519 -0.0373990 0.0016730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 13 38101 -0.104581 0.341719 -0.0379541 0.0016600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 14 38102 -0.101880 0.342820 -0.0384682 0.0016120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 15 38103 -0.099180 0.344020 -0.0389203 0.0015380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 16 38104 -0.096480 0.345120 -0.0392923 0.0014450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 17 38105 -0.093680 0.346220 -0.0395624 0.0013580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 18 38106 -0.090779 0.347321 -0.0397755 0.0013040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 19 38107 -0.087979 0.348321 -0.0399425 0.0012880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 20 38108 -0.085079 0.349321 -0.0401306 0.0013280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 21 38109 -0.082079 0.350221 -0.0403817 0.0014370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 22 38110 -0.079078 0.351222 -0.0407887 0.0016290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 23 38111 -0.076078 0.352022 -0.0414078 0.0018650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 24 38112 -0.073078 0.352922 -0.0422809 0.0021190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 25 38113 -0.069977 0.353723 -0.0433859 0.0023170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 26 38114 -0.066877 0.354423 -0.0446290 0.0024170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 27 38115 -0.063777 0.355123 -0.0459171 0.0023770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 28 38116 -0.060577 0.355723 -0.0471071 0.0022280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 29 38117 -0.057476 0.356324 -0.0481232 0.0020210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 30 38118 -0.054176 0.356924 -0.0489213 0.0018190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 3 31 38119 -0.050976 0.357324 -0.0495393 0.0016790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 1 38120 -0.047676 0.357724 -0.0500454 0.0016060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 2 38121 -0.044375 0.358125 -0.0505165 0.0015980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 3 38122 -0.041075 0.358325 -0.0510216 0.0016500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 4 38123 -0.037675 0.358625 -0.0515886 0.0017380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 5 38124 -0.034274 0.358726 -0.0522417 0.0018290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 6 38125 -0.030874 0.358826 -0.0529938 0.0019130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 7 38126 -0.027474 0.358826 -0.0538098 0.0019630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 8 38127 -0.023974 0.358726 -0.0546689 0.0019900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 9 38128 -0.020573 0.358627 -0.0555260 0.0019680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 10 38129 -0.016973 0.358427 -0.0563430 0.0018890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 11 38130 -0.013473 0.358127 -0.0570551 0.0017900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 12 38131 -0.009873 0.357827 -0.0576562 0.0016720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 13 38132 -0.006372 0.357428 -0.0581482 0.0015640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 14 38133 -0.002772 0.356928 -0.0585503 0.0014740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 15 38134 0.000928 0.356428 -0.0588693 0.0014200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 16 38135 0.004529 0.355829 -0.0591674 0.0014250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 17 38136 0.008229 0.355229 -0.0594895 0.0014810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 18 38137 0.011929 0.354429 -0.0599115 0.0016160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 19 38138 0.015629 0.353729 -0.0605026 0.0018150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 20 38139 0.019330 0.352930 -0.0613057 0.0020620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 21 38140 0.023030 0.352030 -0.0623617 0.0022840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 22 38141 0.026730 0.351130 -0.0636078 0.0024310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 23 38142 0.030530 0.350130 -0.0649439 0.0024680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 24 38143 0.034231 0.349131 -0.0662489 0.0023630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 25 38144 0.038031 0.348131 -0.0673870 0.0021610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 26 38145 0.041831 0.347031 -0.0683111 0.0019260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 27 38146 0.045532 0.345932 -0.0690091 0.0017310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 28 38147 0.049332 0.344832 -0.0695462 0.0015980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 29 38148 0.053132 0.343632 -0.0699933 0.0015590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 4 30 38149 0.056832 0.342432 -0.0704373 0.0015900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 1 38150 0.060633 0.341233 -0.0709484 0.0016770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 2 38151 0.064333 0.339933 -0.0715484 0.0017630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 3 38152 0.068033 0.338733 -0.0722345 0.0018470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 4 38153 0.071733 0.337433 -0.0729956 0.0019110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 5 38154 0.075434 0.336134 -0.0738056 0.0019440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 6 38155 0.079134 0.334834 -0.0746317 0.0019420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 7 38156 0.082734 0.333434 -0.0754268 0.0018920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 8 38157 0.086335 0.332135 -0.0761538 0.0018090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 9 38158 0.089835 0.330735 -0.0767869 0.0016930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 10 38159 0.093435 0.329335 -0.0772980 0.0015700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 11 38160 0.096935 0.327935 -0.0776900 0.0014580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 12 38161 0.100336 0.326536 -0.0779841 0.0013760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 13 38162 0.103736 0.325136 -0.0782181 0.0013410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 14 38163 0.107136 0.323736 -0.0784452 0.0013620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 15 38164 0.110436 0.322236 -0.0787043 0.0014260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 16 38165 0.113737 0.320737 -0.0790763 0.0015590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 17 38166 0.116937 0.319337 -0.0795964 0.0017450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 18 38167 0.120137 0.317837 -0.0803114 0.0019340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 19 38168 0.123238 0.316338 -0.0812005 0.0020850 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 20 38169 0.126338 0.314738 -0.0822016 0.0021380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 21 38170 0.129438 0.313238 -0.0831966 0.0020820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 22 38171 0.132438 0.311738 -0.0840877 0.0019220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 23 38172 0.135339 0.310139 -0.0847678 0.0016920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 24 38173 0.138239 0.308539 -0.0852088 0.0014550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 25 38174 0.141139 0.306939 -0.0854459 0.0012710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 26 38175 0.143939 0.305339 -0.0855379 0.0011790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 27 38176 0.146740 0.303640 -0.0855910 0.0011780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 28 38177 0.149440 0.301940 -0.0856641 0.0012250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 29 38178 0.152140 0.300240 -0.0858111 0.0013100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 30 38179 0.154841 0.298541 -0.0860342 0.0014050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 5 31 38180 0.157441 0.296841 -0.0863542 0.0014720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 1 38181 0.160041 0.295041 -0.0867393 0.0015210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 2 38182 0.162541 0.293241 -0.0871344 0.0015240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 3 38183 0.165042 0.291442 -0.0875334 0.0015000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 4 38184 0.167542 0.289642 -0.0878825 0.0014430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 5 38185 0.169942 0.287742 -0.0881715 0.0013720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 6 38186 0.172343 0.285943 -0.0883626 0.0012690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 7 38187 0.174743 0.284043 -0.0884607 0.0011700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 8 38188 0.177043 0.282043 -0.0884607 0.0010860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 9 38189 0.179343 0.280143 -0.0884068 0.0010440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 10 38190 0.181644 0.278144 -0.0883278 0.0010570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 11 38191 0.183844 0.276144 -0.0882929 0.0011320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 12 38192 0.186044 0.274044 -0.0883609 0.0012530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 13 38193 0.188244 0.272044 -0.0885710 0.0014230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 14 38194 0.190345 0.269945 -0.0889511 0.0015960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 15 38195 0.192345 0.267845 -0.0895061 0.0017490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 16 38196 0.194445 0.265745 -0.0901782 0.0018410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 17 38197 0.196446 0.263546 -0.0909072 0.0018310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 18 38198 0.198346 0.261346 -0.0915643 0.0017170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 19 38199 0.200246 0.259146 -0.0920744 0.0015220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 20 38200 0.202046 0.256946 -0.0923464 0.0012810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 21 38201 0.203847 0.254647 -0.0923955 0.0010750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 22 38202 0.205647 0.252347 -0.0922795 0.0009470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 23 38203 0.207247 0.250047 -0.0920676 0.0008930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 24 38204 0.208947 0.247747 -0.0918386 0.0009190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 25 38205 0.210448 0.245348 -0.0916687 0.0009840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 26 38206 0.211948 0.242948 -0.0915697 0.0010570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 27 38207 0.213348 0.240548 -0.0915368 0.0011240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 28 38208 0.214749 0.238149 -0.0915469 0.0011500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 29 38209 0.215949 0.235649 -0.0915749 0.0011600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 6 30 38210 0.217149 0.233249 -0.0916040 0.0011210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 1 38211 0.218349 0.230749 -0.0915660 0.0010490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 2 38212 0.219350 0.228250 -0.0914421 0.0009400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 3 38213 0.220350 0.225750 -0.0912021 0.0008290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 4 38214 0.221250 0.223250 -0.0908502 0.0007090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 5 38215 0.222050 0.220750 -0.0903763 0.0006070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 6 38216 0.222751 0.218251 -0.0898163 0.0005310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 7 38217 0.223451 0.215751 -0.0892174 0.0005190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 8 38218 0.224051 0.213251 -0.0886354 0.0005590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 9 38219 0.224552 0.210752 -0.0881165 0.0006610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 10 38220 0.224952 0.208152 -0.0877115 0.0007950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 11 38221 0.225252 0.205652 -0.0874696 0.0009600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 12 38222 0.225452 0.203152 -0.0873836 0.0011020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 13 38223 0.225653 0.200653 -0.0874147 0.0011970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 14 38224 0.225753 0.198053 -0.0875007 0.0012110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 15 38225 0.225753 0.195553 -0.0875668 0.0011480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 16 38226 0.225653 0.193053 -0.0875209 0.0009990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 17 38227 0.225454 0.190454 -0.0873119 0.0008200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 18 38228 0.225254 0.187954 -0.0869320 0.0006560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 19 38229 0.224954 0.185354 -0.0863910 0.0005440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 20 38230 0.224455 0.182755 -0.0857951 0.0005080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 21 38231 0.223955 0.180155 -0.0851931 0.0005490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 22 38232 0.223355 0.177555 -0.0846712 0.0006430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 23 38233 0.222755 0.174955 -0.0842552 0.0007660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 24 38234 0.221956 0.172356 -0.0839493 0.0008670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 25 38235 0.221156 0.169656 -0.0837293 0.0009380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 26 38236 0.220156 0.167056 -0.0835714 0.0009790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 27 38237 0.219156 0.164356 -0.0834244 0.0009690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 28 38238 0.218057 0.161657 -0.0832575 0.0009310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 29 38239 0.216857 0.158857 -0.0830275 0.0008550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 30 38240 0.215657 0.156157 -0.0827216 0.0007730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 7 31 38241 0.214258 0.153358 -0.0823326 0.0006900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 1 38242 0.212858 0.150658 -0.0818677 0.0006340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 2 38243 0.211258 0.147858 -0.0813597 0.0005980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 3 38244 0.209658 0.145058 -0.0808388 0.0006300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 4 38245 0.207959 0.142259 -0.0803899 0.0007230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 5 38246 0.206259 0.139359 -0.0800579 0.0008740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 6 38247 0.204359 0.136559 -0.0799060 0.0010700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 7 38248 0.202459 0.133759 -0.0799650 0.0012990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 8 38249 0.200460 0.130860 -0.0802481 0.0015090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 9 38250 0.198360 0.128060 -0.0807121 0.0016460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 10 38251 0.196260 0.125160 -0.0812692 0.0016920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 11 38252 0.194061 0.122261 -0.0818152 0.0016350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 12 38253 0.191761 0.119461 -0.0822733 0.0015020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 13 38254 0.189361 0.116561 -0.0825653 0.0013200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 14 38255 0.186961 0.113661 -0.0826734 0.0011410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 15 38256 0.184562 0.110862 -0.0826124 0.0010070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 16 38257 0.182062 0.107962 -0.0824515 0.0009430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 17 38258 0.179462 0.105062 -0.0822755 0.0009570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 18 38259 0.176862 0.102162 -0.0821456 0.0010320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 19 38260 0.174263 0.099363 -0.0821096 0.0011390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 20 38261 0.171563 0.096463 -0.0821727 0.0012450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 21 38262 0.168763 0.093563 -0.0823407 0.0013250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 22 38263 0.166064 0.090764 -0.0825678 0.0013630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 23 38264 0.163264 0.087864 -0.0828018 0.0013470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 24 38265 0.160464 0.084964 -0.0829969 0.0012880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 25 38266 0.157664 0.082164 -0.0831259 0.0012040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 26 38267 0.154765 0.079265 -0.0831589 0.0011100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 27 38268 0.151965 0.076465 -0.0830940 0.0010120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 28 38269 0.149065 0.073665 -0.0829470 0.0009270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 29 38270 0.146166 0.070766 -0.0827281 0.0008820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 30 38271 0.143266 0.067966 -0.0824741 0.0008790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 8 31 38272 0.140366 0.065266 -0.0822542 0.0009320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 1 38273 0.137466 0.062466 -0.0821102 0.0010520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 2 38274 0.134567 0.059667 -0.0821313 0.0012390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 3 38275 0.131667 0.056967 -0.0823643 0.0014810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 4 38276 0.128767 0.054267 -0.0828454 0.0017260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 5 38277 0.125867 0.051567 -0.0835494 0.0019200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 6 38278 0.122968 0.048868 -0.0844025 0.0020160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 7 38279 0.120068 0.046268 -0.0852925 0.0020060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 8 38280 0.117168 0.043668 -0.0861316 0.0018980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 9 38281 0.114269 0.041069 -0.0868106 0.0017150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 10 38282 0.111369 0.038469 -0.0873207 0.0015400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 11 38283 0.108469 0.035969 -0.0876547 0.0013990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 12 38284 0.105569 0.033469 -0.0878928 0.0013210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 13 38285 0.102670 0.031070 -0.0880828 0.0013230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 14 38286 0.099770 0.028570 -0.0883208 0.0014020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 15 38287 0.096870 0.026270 -0.0886519 0.0015140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 16 38288 0.093970 0.023870 -0.0891029 0.0016370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 17 38289 0.091071 0.021571 -0.0896800 0.0017420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 18 38290 0.088071 0.019271 -0.0903240 0.0017990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 19 38291 0.085171 0.017071 -0.0910221 0.0018200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 20 38292 0.082172 0.014872 -0.0917191 0.0017950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 21 38293 0.079172 0.012772 -0.0923592 0.0017300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 22 38294 0.076172 0.010672 -0.0929292 0.0016460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 23 38295 0.073172 0.008572 -0.0933983 0.0015420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 24 38296 0.070073 0.006573 -0.0937753 0.0014450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 25 38297 0.066973 0.004673 -0.0940573 0.0013750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 26 38298 0.063873 0.002773 -0.0942894 0.0013360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 27 38299 0.060673 0.000973 -0.0945064 0.0013480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 28 38300 0.057474 -0.000826 -0.0947555 0.0014120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 29 38301 0.054174 -0.002526 -0.0951135 0.0015640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 9 30 38302 0.050874 -0.004226 -0.0956536 0.0017660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 1 38303 0.047575 -0.005825 -0.0964166 0.0020100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 2 38304 0.044175 -0.007425 -0.0974286 0.0022360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 3 38305 0.040775 -0.008825 -0.0986217 0.0023930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 4 38306 0.037275 -0.010225 -0.0999137 0.0024180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 5 38307 0.033776 -0.011624 -0.1011758 0.0023270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 6 38308 0.030176 -0.012924 -0.1022868 0.0021430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 7 38309 0.026576 -0.014124 -0.1032029 0.0019290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 8 38310 0.022876 -0.015224 -0.1039259 0.0017570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 9 38311 0.019177 -0.016223 -0.1045029 0.0016500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 10 38312 0.015377 -0.017223 -0.1050160 0.0016410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 11 38313 0.011577 -0.018123 -0.1055510 0.0017000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 12 38314 0.007678 -0.019022 -0.1061821 0.0017990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 13 38315 0.003778 -0.019722 -0.1069151 0.0019270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 14 38316 -0.000122 -0.020422 -0.1077842 0.0020470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 15 38317 -0.004122 -0.021022 -0.1087692 0.0021470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 16 38318 -0.008121 -0.021521 -0.1098242 0.0022040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 17 38319 -0.012121 -0.022021 -0.1109023 0.0022150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 18 38320 -0.016221 -0.022321 -0.1119783 0.0021820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 19 38321 -0.020221 -0.022621 -0.1130034 0.0021150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 20 38322 -0.024320 -0.022820 -0.1139514 0.0020290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 21 38323 -0.028420 -0.022920 -0.1148114 0.0019420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 22 38324 -0.032620 -0.022920 -0.1156025 0.0018860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 23 38325 -0.036719 -0.022919 -0.1163555 0.0018660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 24 38326 -0.040819 -0.022719 -0.1171026 0.0018870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 25 38327 -0.044919 -0.022519 -0.1178976 0.0019640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 26 38328 -0.049019 -0.022219 -0.1188016 0.0020950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 27 38329 -0.053118 -0.021818 -0.1198677 0.0022970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 28 38330 -0.057118 -0.021318 -0.1211727 0.0025470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 29 38331 -0.061218 -0.020718 -0.1227178 0.0027920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 30 38332 -0.065118 -0.020118 -0.1244928 0.0029960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 10 31 38333 -0.069117 -0.019317 -0.1264278 0.0030950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 1 38334 -0.073017 -0.018517 -0.0283989 0.0030640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 2 38335 -0.076817 -0.017717 -0.0302639 0.0029000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 3 38336 -0.080616 -0.016816 -0.0319240 0.0026520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 4 38337 -0.084316 -0.015816 -0.0333380 0.0024010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 5 38338 -0.088016 -0.014716 -0.0345060 0.0022000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 6 38339 -0.091616 -0.013616 -0.0355291 0.0020810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 7 38340 -0.095115 -0.012515 -0.0364491 0.0020420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 8 38341 -0.098515 -0.011315 -0.0373852 0.0020760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 9 38342 -0.101915 -0.010015 -0.0383712 0.0021380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 10 38343 -0.105115 -0.008715 -0.0394102 0.0021960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 11 38344 -0.108414 -0.007414 -0.0405053 0.0022190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 12 38345 -0.111514 -0.006014 -0.0415853 0.0022040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 13 38346 -0.114514 -0.004614 -0.0426483 0.0021540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 14 38347 -0.117513 -0.003213 -0.0436504 0.0020820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 15 38348 -0.120413 -0.001813 -0.0445514 0.0019650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 16 38349 -0.123213 -0.000313 -0.0453315 0.0018430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 17 38350 -0.125913 0.001187 -0.0459845 0.0017130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 18 38351 -0.128612 0.002688 -0.0465225 0.0015950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 19 38352 -0.131212 0.004188 -0.0469556 0.0015180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 20 38353 -0.133712 0.005688 -0.0473236 0.0014770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 21 38354 -0.136112 0.007288 -0.0476876 0.0015110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 22 38355 -0.138511 0.008789 -0.0481257 0.0016050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 23 38356 -0.140811 0.010389 -0.0486767 0.0017460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 24 38357 -0.143111 0.011889 -0.0493837 0.0019340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 25 38358 -0.145310 0.013490 -0.0503038 0.0021490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 26 38359 -0.147410 0.015090 -0.0514288 0.0023550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 27 38360 -0.149510 0.016590 -0.0527349 0.0024930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 28 38361 -0.151510 0.018190 -0.0541399 0.0025390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 29 38362 -0.153509 0.019691 -0.0555209 0.0024530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 11 30 38363 -0.155409 0.021291 -0.0567710 0.0022650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 1 38364 -0.157309 0.022891 -0.0577960 0.0020430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 2 38365 -0.159208 0.024492 -0.0586060 0.0018370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 3 38366 -0.161008 0.025992 -0.0592481 0.0017110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 4 38367 -0.162908 0.027592 -0.0598211 0.0016810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 5 38368 -0.164708 0.029192 -0.0603961 0.0017400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 6 38369 -0.166507 0.030793 -0.0610552 0.0018200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 7 38370 -0.168307 0.032393 -0.0618072 0.0019120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 8 38371 -0.170207 0.033993 -0.0626312 0.0019890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 9 38372 -0.172007 0.035693 -0.0635223 0.0020170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 10 38373 -0.173806 0.037294 -0.0644093 0.0020110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 11 38374 -0.175706 0.038994 -0.0652793 0.0019630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 12 38375 -0.177606 0.040694 -0.0660734 0.0018800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 13 38376 -0.179505 0.042395 -0.0667804 0.0017720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 14 38377 -0.181505 0.044095 -0.0673634 0.0016530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 15 38378 -0.183505 0.045895 -0.0678385 0.0015400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 16 38379 -0.185505 0.047695 -0.0682105 0.0014510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 17 38380 -0.187604 0.049496 -0.0685125 0.0014130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 18 38381 -0.189804 0.051396 -0.0688036 0.0014190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 19 38382 -0.192004 0.053296 -0.0691306 0.0014940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 20 38383 -0.194204 0.055196 -0.0695606 0.0016250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 21 38384 -0.196503 0.057097 -0.0701457 0.0018000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 22 38385 -0.198903 0.059097 -0.0709187 0.0019980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 23 38386 -0.201303 0.061197 -0.0718907 0.0021940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 24 38387 -0.203802 0.063198 -0.0730338 0.0023430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 25 38388 -0.206302 0.065398 -0.0743018 0.0024280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 26 38389 -0.208902 0.067598 -0.0756078 0.0024060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 27 38390 -0.211602 0.069798 -0.0768409 0.0022860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 28 38391 -0.214301 0.072099 -0.0779169 0.0021100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 29 38392 -0.217001 0.074399 -0.0788089 0.0019280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 30 38393 -0.219801 0.076799 -0.0795510 0.0018090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1963 12 31 38394 -0.222601 0.079299 -0.0802090 0.0017810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 1 38395 -0.225500 0.081800 -0.0808950 0.0018440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 2 38396 -0.228400 0.084400 -0.0814970 0.0019660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 3 38397 -0.231300 0.087000 -0.0822311 0.0021030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 4 38398 -0.234299 0.089701 -0.0831141 0.0022270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 5 38399 -0.237299 0.092501 -0.0840911 0.0023170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 6 38400 -0.240199 0.095401 -0.0851432 0.0023580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 7 38401 -0.243199 0.098301 -0.0862012 0.0023420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 8 38402 -0.246198 0.101302 -0.0872232 0.0022880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 9 38403 -0.249198 0.104302 -0.0881673 0.0021970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 10 38404 -0.252198 0.107502 -0.0890143 0.0020950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 11 38405 -0.255198 0.110702 -0.0897703 0.0019980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 12 38406 -0.258097 0.113903 -0.0904373 0.0019210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 13 38407 -0.260997 0.117203 -0.0910244 0.0018610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 14 38408 -0.263897 0.120603 -0.0915864 0.0018620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 15 38409 -0.266696 0.124004 -0.0921794 0.0019030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 16 38410 -0.269496 0.127504 -0.0928335 0.0020140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 17 38411 -0.272196 0.131004 -0.0936235 0.0021630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 18 38412 -0.274896 0.134604 -0.0945765 0.0023350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 19 38413 -0.277495 0.138205 -0.0956915 0.0024910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 20 38414 -0.279995 0.141805 -0.0969546 0.0025980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 21 38415 -0.282395 0.145505 -0.0982746 0.0026380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 22 38416 -0.284795 0.149305 -0.0996026 0.0026040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 23 38417 -0.286994 0.153006 -0.1008537 0.0024960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 24 38418 -0.289094 0.156806 -0.1019747 0.0023270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 25 38419 -0.291194 0.160606 -0.1029107 0.0021470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 26 38420 -0.293093 0.164507 -0.1036897 0.0020000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 27 38421 -0.294893 0.168407 -0.1043468 0.0019190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 28 38422 -0.296593 0.172307 -0.1049688 0.0019400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 29 38423 -0.298193 0.176207 -0.1056518 0.0020270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 30 38424 -0.299592 0.180108 -0.1064438 0.0021390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 1 31 38425 -0.300892 0.184108 -0.1073469 0.0022510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 1 38426 -0.301992 0.188008 -0.1083319 0.0023210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 2 38427 -0.303092 0.191908 -0.1093689 0.0023330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 3 38428 -0.303891 0.195909 -0.1103889 0.0022780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 4 38429 -0.304691 0.199809 -0.1113300 0.0021870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 5 38430 -0.305291 0.203809 -0.1121430 0.0020540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 6 38431 -0.305690 0.207710 -0.1128330 0.0019140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 7 38432 -0.305990 0.211610 -0.1133821 0.0017770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 8 38433 -0.306190 0.215510 -0.1138031 0.0016590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 9 38434 -0.306190 0.219410 -0.1141221 0.0015870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 10 38435 -0.306089 0.223311 -0.1144031 0.0015630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 11 38436 -0.305789 0.227111 -0.1146882 0.0015980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 12 38437 -0.305389 0.230911 -0.1150302 0.0016970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 13 38438 -0.304889 0.234711 -0.1155012 0.0018430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 14 38439 -0.304188 0.238412 -0.1161382 0.0020360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 15 38440 -0.303388 0.242112 -0.1169723 0.0022190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 16 38441 -0.302488 0.245812 -0.1179833 0.0023720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 17 38442 -0.301387 0.249513 -0.1191013 0.0024490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 18 38443 -0.300187 0.253113 -0.1202503 0.0024230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 19 38444 -0.298887 0.256713 -0.1213283 0.0023100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 20 38445 -0.297487 0.260213 -0.1222494 0.0021350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 21 38446 -0.295986 0.263714 -0.1229914 0.0019500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 22 38447 -0.294286 0.267214 -0.1235574 0.0017900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 23 38448 -0.292586 0.270614 -0.1240044 0.0016970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 24 38449 -0.290785 0.274015 -0.1244015 0.0017020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 25 38450 -0.288785 0.277315 -0.1248365 0.0017800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 26 38451 -0.286785 0.280615 -0.1253895 0.0019320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 27 38452 -0.284685 0.283915 -0.1261035 0.0020940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 28 38453 -0.282484 0.287216 -0.1269686 0.0022270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 2 29 38454 -0.280284 0.290416 -0.1279386 0.0023130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 1 38455 -0.277984 0.293616 -0.1289826 0.0023350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 2 38456 -0.275584 0.296716 -0.1300096 0.0023000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 3 38457 -0.273083 0.299817 -0.1309776 0.0022220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 4 38458 -0.270583 0.302917 -0.1318447 0.0021080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 5 38459 -0.268083 0.306017 -0.1326027 0.0020000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 6 38460 -0.265382 0.309118 -0.1332687 0.0019070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 7 38461 -0.262782 0.312118 -0.1338477 0.0018470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 8 38462 -0.260082 0.315118 -0.1343797 0.0018250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 9 38463 -0.257282 0.318118 -0.1349278 0.0018600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 10 38464 -0.254481 0.321119 -0.1355318 0.0019590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 11 38465 -0.251581 0.324119 -0.1362758 0.0021210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 12 38466 -0.248681 0.327119 -0.1372108 0.0023350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 13 38467 -0.245781 0.330019 -0.1383539 0.0025620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 14 38468 -0.242780 0.333020 -0.1397269 0.0027570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 15 38469 -0.239780 0.335920 -0.1412529 0.0028790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 16 38470 -0.236680 0.338820 -0.1428499 0.0028850 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 17 38471 -0.233579 0.341721 -0.1444069 0.0027910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 18 38472 -0.230379 0.344621 -0.1458150 0.0026050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 19 38473 -0.227279 0.347521 -0.1470260 0.0023960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 20 38474 -0.223979 0.350421 -0.1480150 0.0021890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 21 38475 -0.220678 0.353222 -0.1488250 0.0020460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 22 38476 -0.217378 0.356122 -0.1495470 0.0020010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 23 38477 -0.214078 0.358922 -0.1502670 0.0020430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 24 38478 -0.210678 0.361722 -0.1510631 0.0021470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 25 38479 -0.207177 0.364523 -0.1519811 0.0022890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 26 38480 -0.203777 0.367223 -0.1530271 0.0024080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 27 38481 -0.200277 0.370023 -0.1541911 0.0024920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 28 38482 -0.196676 0.372724 -0.1553901 0.0025050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 29 38483 -0.193176 0.375424 -0.1565912 0.0024660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 30 38484 -0.189576 0.378024 -0.1577242 0.0023840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 3 31 38485 -0.185876 0.380724 -0.1587572 0.0022660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 1 38486 -0.182275 0.383325 -0.0596522 0.0021140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 2 38487 -0.178575 0.385925 -0.0603972 0.0019680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 3 38488 -0.174875 0.388425 -0.0610082 0.0018500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 4 38489 -0.171175 0.390925 -0.0615333 0.0017770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 5 38490 -0.167474 0.393426 -0.0620013 0.0017590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 6 38491 -0.163774 0.395926 -0.0624723 0.0017920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 7 38492 -0.160074 0.398326 -0.0630073 0.0018780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 8 38493 -0.156273 0.400727 -0.0636583 0.0020340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 9 38494 -0.152573 0.403027 -0.0644883 0.0022110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 10 38495 -0.148873 0.405427 -0.0654834 0.0023860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 11 38496 -0.145073 0.407627 -0.0666554 0.0025460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 12 38497 -0.141372 0.409928 -0.0679434 0.0026110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 13 38498 -0.137572 0.412128 -0.0692344 0.0025510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 14 38499 -0.133872 0.414328 -0.0704174 0.0023680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 15 38500 -0.130172 0.416428 -0.0713684 0.0021390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 16 38501 -0.126471 0.418529 -0.0720945 0.0019190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 17 38502 -0.122771 0.420629 -0.0726255 0.0017670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 18 38503 -0.119071 0.422629 -0.0730595 0.0017170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 19 38504 -0.115470 0.424630 -0.0734915 0.0017800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 20 38505 -0.111870 0.426530 -0.0740445 0.0019150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 21 38506 -0.108270 0.428430 -0.0747425 0.0020840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 22 38507 -0.104670 0.430330 -0.0756115 0.0022410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 23 38508 -0.101069 0.432131 -0.0766236 0.0023750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 24 38509 -0.097569 0.433931 -0.0777546 0.0024660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 25 38510 -0.094069 0.435631 -0.0789466 0.0024980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 26 38511 -0.090569 0.437331 -0.0801326 0.0024550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 27 38512 -0.087168 0.438932 -0.0812536 0.0023710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 28 38513 -0.083768 0.440532 -0.0822866 0.0022630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 29 38514 -0.080368 0.442032 -0.0831886 0.0021520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 4 30 38515 -0.076967 0.443533 -0.0840067 0.0020600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 1 38516 -0.073667 0.444933 -0.0847217 0.0019880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 2 38517 -0.070367 0.446333 -0.0853997 0.0019580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 3 38518 -0.067067 0.447633 -0.0860677 0.0019870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 4 38519 -0.063766 0.448934 -0.0867937 0.0020560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 5 38520 -0.060466 0.450134 -0.0875987 0.0021720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 6 38521 -0.057266 0.451234 -0.0885637 0.0023560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 7 38522 -0.054066 0.452234 -0.0897187 0.0025460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 8 38523 -0.050865 0.453235 -0.0910728 0.0027350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 9 38524 -0.047665 0.454135 -0.0925788 0.0028420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 10 38525 -0.044565 0.455035 -0.0941398 0.0028510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 11 38526 -0.041364 0.455836 -0.0956468 0.0027330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 12 38527 -0.038264 0.456536 -0.0969818 0.0025240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 13 38528 -0.035164 0.457136 -0.0980908 0.0022840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 14 38529 -0.031964 0.457736 -0.0989608 0.0020670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 15 38530 -0.028863 0.458237 -0.0996638 0.0019460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 16 38531 -0.025763 0.458737 -0.1002888 0.0019290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 17 38532 -0.022663 0.459037 -0.1009519 0.0019980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 18 38533 -0.019562 0.459338 -0.1017189 0.0021210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 19 38534 -0.016462 0.459638 -0.1026129 0.0022560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 20 38535 -0.013362 0.459738 -0.1036289 0.0023600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 21 38536 -0.010262 0.459838 -0.1047259 0.0024150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 22 38537 -0.007161 0.459939 -0.1058409 0.0024050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 23 38538 -0.004061 0.459939 -0.1069279 0.0023520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 24 38539 -0.000961 0.459839 -0.1079409 0.0022680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 25 38540 0.002139 0.459739 -0.1088649 0.0021460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 26 38541 0.005340 0.459540 -0.1096510 0.0020160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 27 38542 0.008440 0.459240 -0.1103000 0.0018770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 28 38543 0.011640 0.458940 -0.1108360 0.0017800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 29 38544 0.014741 0.458541 -0.1112870 0.0017320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 30 38545 0.017941 0.458141 -0.1117180 0.0017310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 5 31 38546 0.021141 0.457641 -0.1121780 0.0017790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 1 38547 0.024341 0.457141 -0.1127050 0.0018720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 2 38548 0.027542 0.456542 -0.1133360 0.0019980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 3 38549 0.030742 0.455842 -0.1141200 0.0021430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 4 38550 0.033942 0.455142 -0.1150250 0.0022840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 5 38551 0.037142 0.454342 -0.1160770 0.0023920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 6 38552 0.040343 0.453543 -0.1172030 0.0024340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 7 38553 0.043643 0.452643 -0.1183091 0.0023580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 8 38554 0.046843 0.451743 -0.1192921 0.0021710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 9 38555 0.050144 0.450744 -0.1200361 0.0019090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 10 38556 0.053344 0.449644 -0.1204971 0.0016300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 11 38557 0.056644 0.448544 -0.1207261 0.0014230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 12 38558 0.059944 0.447444 -0.1207891 0.0013100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 13 38559 0.063145 0.446245 -0.1207911 0.0012890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 14 38560 0.066445 0.444945 -0.1207891 0.0013330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 15 38561 0.069745 0.443645 -0.1208711 0.0014100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 16 38562 0.072945 0.442245 -0.1210091 0.0014570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 17 38563 0.076246 0.440846 -0.1211761 0.0014480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 18 38564 0.079546 0.439346 -0.1213051 0.0013800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 19 38565 0.082746 0.437846 -0.1213181 0.0012580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 20 38566 0.086047 0.436347 -0.1212171 0.0011240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 21 38567 0.089247 0.434747 -0.1209671 0.0009630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 22 38568 0.092547 0.433147 -0.1205602 0.0008120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 23 38569 0.095747 0.431447 -0.1200042 0.0006800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 24 38570 0.098948 0.429748 -0.1193482 0.0005930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 25 38571 0.102148 0.428048 -0.1186052 0.0005400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 26 38572 0.105348 0.426248 -0.1178472 0.0005430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 27 38573 0.108548 0.424448 -0.1171212 0.0006150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 28 38574 0.111749 0.422649 -0.1164962 0.0007530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 29 38575 0.114949 0.420749 -0.1160522 0.0009440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 6 30 38576 0.118049 0.418849 -0.1157932 0.0011410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 1 38577 0.121250 0.416950 -0.1157452 0.0013510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 2 38578 0.124350 0.415050 -0.1158882 0.0015280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 3 38579 0.127450 0.413050 -0.1161932 0.0016610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 4 38580 0.130650 0.411050 -0.1165932 0.0017120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 5 38581 0.133751 0.409051 -0.1169862 0.0016470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 6 38582 0.136851 0.407051 -0.1172792 0.0014990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 7 38583 0.139851 0.404951 -0.1173822 0.0013060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 8 38584 0.142951 0.402851 -0.1173112 0.0011320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 9 38585 0.145952 0.400752 -0.1170962 0.0010450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 10 38586 0.149052 0.398552 -0.1168372 0.0010650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 11 38587 0.152052 0.396452 -0.1166572 0.0011640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 12 38588 0.155053 0.394153 -0.1165982 0.0013090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 13 38589 0.158053 0.391953 -0.1166692 0.0014060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 14 38590 0.160953 0.389653 -0.1168002 0.0014540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 15 38591 0.163953 0.387353 -0.1169632 0.0014500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 16 38592 0.166854 0.385054 -0.1170782 0.0013810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 17 38593 0.169754 0.382654 -0.1171082 0.0012630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 18 38594 0.172554 0.380254 -0.1170152 0.0011360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 19 38595 0.175454 0.377854 -0.1167872 0.0009980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 20 38596 0.178255 0.375355 -0.1164132 0.0008580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 21 38597 0.181055 0.372755 -0.1159212 0.0007530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 22 38598 0.183755 0.370255 -0.1153422 0.0006880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 23 38599 0.186456 0.367556 -0.1147142 0.0006760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 24 38600 0.189156 0.364956 -0.1141142 0.0007240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 25 38601 0.191756 0.362156 -0.1135922 0.0008310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 26 38602 0.194356 0.359356 -0.1132022 0.0009960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 27 38603 0.196957 0.356557 -0.1129932 0.0011800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 28 38604 0.199457 0.353657 -0.1129722 0.0013850 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 29 38605 0.201957 0.350657 -0.1131552 0.0015540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 30 38606 0.204357 0.347657 -0.1134722 0.0016690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 7 31 38607 0.206658 0.344658 -0.1138792 0.0017110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 1 38608 0.209058 0.341458 -0.1142872 0.0016720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 2 38609 0.211258 0.338258 -0.1146182 0.0015690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 3 38610 0.213459 0.335059 -0.1148222 0.0014260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 4 38611 0.215559 0.331759 -0.1148822 0.0012710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 5 38612 0.217659 0.328359 -0.1148062 0.0011800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 6 38613 0.219659 0.324959 -0.1146862 0.0011880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 7 38614 0.221560 0.321460 -0.1146262 0.0012860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 8 38615 0.223460 0.317860 -0.1147012 0.0014480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 9 38616 0.225160 0.314260 -0.1149352 0.0016060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 10 38617 0.226861 0.310561 -0.1153082 0.0017180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 11 38618 0.228461 0.306861 -0.1157442 0.0017410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 12 38619 0.229961 0.303061 -0.1161632 0.0016640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 13 38620 0.231461 0.299161 -0.1164592 0.0015210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 14 38621 0.232762 0.295262 -0.1165912 0.0013480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 15 38622 0.234062 0.291262 -0.1165502 0.0011590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 16 38623 0.235262 0.287262 -0.1163112 0.0009750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 17 38624 0.236362 0.283162 -0.1159092 0.0008060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 18 38625 0.237263 0.279063 -0.1153362 0.0006770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 19 38626 0.238263 0.274863 -0.1146912 0.0006210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 20 38627 0.239063 0.270663 -0.1140082 0.0006240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 21 38628 0.239764 0.266364 -0.1133592 0.0006970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 22 38629 0.240364 0.262064 -0.1128212 0.0008250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 23 38630 0.240964 0.257764 -0.1124232 0.0009920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 24 38631 0.241364 0.253364 -0.1122192 0.0011800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 25 38632 0.241765 0.248965 -0.1121952 0.0013540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 26 38633 0.241965 0.244465 -0.1123182 0.0014800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 27 38634 0.242165 0.239965 -0.1125272 0.0015240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 28 38635 0.242265 0.235565 -0.1127562 0.0015000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 29 38636 0.242266 0.230966 -0.1129032 0.0013940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 30 38637 0.242166 0.226466 -0.1129302 0.0012480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 8 31 38638 0.242066 0.221966 -0.1128102 0.0011170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 1 38639 0.241767 0.217367 -0.0125822 0.0010390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 2 38640 0.241467 0.212767 -0.0123272 0.0010580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 3 38641 0.241067 0.208267 -0.0121311 0.0011660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 4 38642 0.240567 0.203667 -0.0120961 0.0013640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 5 38643 0.239968 0.199168 -0.0122791 0.0015940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 6 38644 0.239368 0.194568 -0.0126771 0.0018020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 7 38645 0.238568 0.190068 -0.0132621 0.0019440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 8 38646 0.237768 0.185568 -0.0139451 0.0019980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 9 38647 0.236969 0.181069 -0.0146311 0.0019620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 10 38648 0.235969 0.176569 -0.0152591 0.0018770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 11 38649 0.234969 0.172169 -0.0157851 0.0017720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 12 38650 0.233970 0.167770 -0.0162021 0.0016540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 13 38651 0.232770 0.163370 -0.0165091 0.0015460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 14 38652 0.231670 0.159070 -0.0167171 0.0014770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 15 38653 0.230370 0.154770 -0.0168921 0.0014620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 16 38654 0.229071 0.150571 -0.0170611 0.0014970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 17 38655 0.227771 0.146371 -0.0173061 0.0015930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 18 38656 0.226371 0.142271 -0.0176670 0.0017370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 19 38657 0.224871 0.138171 -0.0182070 0.0019290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 20 38658 0.223372 0.134072 -0.0189540 0.0021470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 21 38659 0.221872 0.130072 -0.0199200 0.0023590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 22 38660 0.220272 0.126172 -0.0210570 0.0025030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 23 38661 0.218673 0.122273 -0.0223070 0.0025810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 24 38662 0.216973 0.118473 -0.0235930 0.0025550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 25 38663 0.215273 0.114673 -0.0247860 0.0024260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 26 38664 0.213573 0.110973 -0.0258380 0.0022430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 27 38665 0.211774 0.107374 -0.0266910 0.0020670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 28 38666 0.209974 0.103774 -0.0273890 0.0019310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 29 38667 0.208074 0.100274 -0.0279910 0.0018900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 9 30 38668 0.206174 0.096874 -0.0286129 0.0019480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 1 38669 0.204175 0.093475 -0.0293259 0.0020900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 2 38670 0.202175 0.090175 -0.0302179 0.0022800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 3 38671 0.200175 0.086975 -0.0313049 0.0024700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 4 38672 0.198076 0.083776 -0.0325519 0.0026140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 5 38673 0.195976 0.080676 -0.0339059 0.0026710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 6 38674 0.193776 0.077676 -0.0352759 0.0026540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 7 38675 0.191576 0.074676 -0.0365909 0.0025550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 8 38676 0.189377 0.071877 -0.0377809 0.0024100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 9 38677 0.187077 0.069077 -0.0388148 0.0022470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 10 38678 0.184777 0.066277 -0.0396878 0.0020940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 11 38679 0.182377 0.063677 -0.0404238 0.0019740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 12 38680 0.179978 0.061078 -0.0410628 0.0019040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 13 38681 0.177478 0.058578 -0.0416518 0.0018850 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 14 38682 0.174978 0.056078 -0.0422638 0.0019400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 15 38683 0.172479 0.053679 -0.0429518 0.0020440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 16 38684 0.169879 0.051379 -0.0437698 0.0021990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 17 38685 0.167279 0.049079 -0.0447638 0.0023820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 18 38686 0.164679 0.046879 -0.0459487 0.0025880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 19 38687 0.161980 0.044780 -0.0473327 0.0027610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 20 38688 0.159280 0.042680 -0.0488587 0.0028660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 21 38689 0.156480 0.040680 -0.0504287 0.0028560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 22 38690 0.153680 0.038680 -0.0519327 0.0027330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 23 38691 0.150881 0.036681 -0.0532767 0.0025230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 24 38692 0.147981 0.034881 -0.0543897 0.0022940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 25 38693 0.145081 0.032981 -0.0552857 0.0020990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 26 38694 0.142182 0.031182 -0.0560166 0.0019900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 27 38695 0.139182 0.029382 -0.0566896 0.0019740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 28 38696 0.136182 0.027582 -0.0574056 0.0020610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 29 38697 0.133182 0.025882 -0.0582396 0.0022030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 30 38698 0.130083 0.024183 -0.0592246 0.0023550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 10 31 38699 0.126983 0.022583 -0.0603496 0.0024760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 1 38700 0.123783 0.020883 -0.0615556 0.0025250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 2 38701 0.120584 0.019284 -0.0627935 0.0025170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 3 38702 0.117384 0.017684 -0.0639755 0.0024370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 4 38703 0.114184 0.016084 -0.0650495 0.0022930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 5 38704 0.110884 0.014584 -0.0659715 0.0021390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 6 38705 0.107585 0.012985 -0.0667365 0.0019820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 7 38706 0.104285 0.011485 -0.0673435 0.0018370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 8 38707 0.100885 0.009985 -0.0678354 0.0017460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 9 38708 0.097585 0.008485 -0.0682644 0.0017110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 10 38709 0.094186 0.006986 -0.0686794 0.0017410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 11 38710 0.090786 0.005486 -0.0691664 0.0018320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 12 38711 0.087386 0.003986 -0.0697714 0.0019650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 13 38712 0.083987 0.002587 -0.0705304 0.0021480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 14 38713 0.080487 0.001187 -0.0714754 0.0023450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 15 38714 0.077087 -0.000213 -0.0726303 0.0025510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 16 38715 0.073687 -0.001613 -0.0739643 0.0027070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 17 38716 0.070188 -0.002912 -0.0754183 0.0027840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 18 38717 0.066788 -0.004312 -0.0768933 0.0027490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 19 38718 0.063288 -0.005612 -0.0782793 0.0025960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 20 38719 0.059888 -0.006812 -0.0794823 0.0023850 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 21 38720 0.056489 -0.008011 -0.0804592 0.0021750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 22 38721 0.052989 -0.009211 -0.0812552 0.0020230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 23 38722 0.049589 -0.010411 -0.0819512 0.0019800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 24 38723 0.046190 -0.011510 -0.0826602 0.0020520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 25 38724 0.042790 -0.012610 -0.0834792 0.0021740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 26 38725 0.039390 -0.013610 -0.0844241 0.0023240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 27 38726 0.035990 -0.014610 -0.0855171 0.0024440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 28 38727 0.032691 -0.015509 -0.0867131 0.0025250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 29 38728 0.029291 -0.016309 -0.0879431 0.0025240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 11 30 38729 0.025891 -0.017109 -0.0891491 0.0024770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 1 38730 0.022591 -0.017909 -0.0902890 0.0023760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 2 38731 0.019292 -0.018508 -0.0913000 0.0022330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 3 38732 0.015992 -0.019108 -0.0921620 0.0020910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 4 38733 0.012592 -0.019708 -0.0928860 0.0019610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 5 38734 0.009393 -0.020107 -0.0934960 0.0018660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 6 38735 0.006093 -0.020507 -0.0940450 0.0018320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 7 38736 0.002793 -0.020907 -0.0945909 0.0018390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 8 38737 -0.000507 -0.021107 -0.0951639 0.0019180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 9 38738 -0.003706 -0.021306 -0.0958449 0.0020300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 10 38739 -0.006906 -0.021406 -0.0966589 0.0021930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 11 38740 -0.010206 -0.021406 -0.0976489 0.0023800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 12 38741 -0.013406 -0.021306 -0.0988298 0.0025620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 13 38742 -0.016605 -0.021205 -0.1001768 0.0027150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 14 38743 -0.019805 -0.021005 -0.1016528 0.0028150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 15 38744 -0.023005 -0.020805 -0.1031778 0.0028200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 16 38745 -0.026104 -0.020404 -0.1046567 0.0027110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 17 38746 -0.029304 -0.020004 -0.1059807 0.0025250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 18 38747 -0.032504 -0.019504 -0.1071047 0.0023020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 19 38748 -0.035604 -0.019004 -0.1080067 0.0021040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 20 38749 -0.038803 -0.018403 -0.1087547 0.0020010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 21 38750 -0.042003 -0.017703 -0.1094586 0.0020150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 22 38751 -0.045103 -0.017003 -0.1102166 0.0021230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 23 38752 -0.048303 -0.016203 -0.1111156 0.0022660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 24 38753 -0.051502 -0.015302 -0.1121516 0.0023860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 25 38754 -0.054602 -0.014402 -0.1132755 0.0024300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 26 38755 -0.057802 -0.013402 -0.1144035 0.0024020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 27 38756 -0.061001 -0.012301 -0.1154655 0.0023010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 28 38757 -0.064201 -0.011201 -0.1163875 0.0021460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 29 38758 -0.067401 -0.010001 -0.1171475 0.0019600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 30 38759 -0.070601 -0.008801 -0.1177154 0.0017660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1964 12 31 38760 -0.073900 -0.007500 -0.1180924 0.0015830 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 1 38761 -0.077100 -0.006200 -0.0182914 0.0014300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 2 38762 -0.080300 -0.004800 -0.0183784 0.0013330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 3 38763 -0.083600 -0.003300 -0.0183863 0.0012940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 4 38764 -0.086799 -0.001799 -0.0183853 0.0013150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 5 38765 -0.090099 -0.000199 -0.0184453 0.0013930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 6 38766 -0.093299 0.001401 -0.0185953 0.0015230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 7 38767 -0.096598 0.003002 -0.0188992 0.0016770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 8 38768 -0.099898 0.004802 -0.0193612 0.0018340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 9 38769 -0.103098 0.006502 -0.0199712 0.0019730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 10 38770 -0.106398 0.008302 -0.0207022 0.0020810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 11 38771 -0.109697 0.010203 -0.0215121 0.0021250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 12 38772 -0.112997 0.012103 -0.0223351 0.0020970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 13 38773 -0.116297 0.014103 -0.0230871 0.0019960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 14 38774 -0.119497 0.016103 -0.0237181 0.0018510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 15 38775 -0.122796 0.018104 -0.0241900 0.0017100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 16 38776 -0.126096 0.020204 -0.0245600 0.0016360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 17 38777 -0.129296 0.022304 -0.0249000 0.0016750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 18 38778 -0.132595 0.024405 -0.0253480 0.0018260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 19 38779 -0.135795 0.026605 -0.0259959 0.0020670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 20 38780 -0.138995 0.028805 -0.0268909 0.0023070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 21 38781 -0.142195 0.031105 -0.0279879 0.0024650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 22 38782 -0.145294 0.033406 -0.0291979 0.0025370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 23 38783 -0.148394 0.035706 -0.0304308 0.0025060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 24 38784 -0.151494 0.038006 -0.0315958 0.0024040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 25 38785 -0.154493 0.040307 -0.0326358 0.0022630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 26 38786 -0.157493 0.042707 -0.0335277 0.0021120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 27 38787 -0.160493 0.045007 -0.0342747 0.0019650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 28 38788 -0.163393 0.047407 -0.0348777 0.0018390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 29 38789 -0.166192 0.049808 -0.0353777 0.0017590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 30 38790 -0.168992 0.052108 -0.0358156 0.0017260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 1 31 38791 -0.171792 0.054508 -0.0362596 0.0017630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 1 38792 -0.174492 0.056908 -0.0367716 0.0018500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 2 38793 -0.177091 0.059309 -0.0373945 0.0019940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 3 38794 -0.179691 0.061709 -0.0381685 0.0021570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 4 38795 -0.182191 0.064109 -0.0391095 0.0023240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 5 38796 -0.184690 0.066510 -0.0402085 0.0024600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 6 38797 -0.187090 0.068810 -0.0414244 0.0025610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 7 38798 -0.189490 0.071210 -0.0427104 0.0025900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 8 38799 -0.191790 0.073610 -0.0439894 0.0025350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 9 38800 -0.194089 0.076011 -0.0451773 0.0024200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 10 38801 -0.196289 0.078411 -0.0462123 0.0022540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 11 38802 -0.198389 0.080811 -0.0470813 0.0020770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 12 38803 -0.200489 0.083211 -0.0477803 0.0019440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 13 38804 -0.202488 0.085612 -0.0484012 0.0019050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 14 38805 -0.204488 0.088112 -0.0490312 0.0019730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 15 38806 -0.206488 0.090512 -0.0498002 0.0021570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 16 38807 -0.208387 0.093013 -0.0507671 0.0023780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 17 38808 -0.210187 0.095513 -0.0519431 0.0025640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 18 38809 -0.211987 0.098013 -0.0532731 0.0026590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 19 38810 -0.213787 0.100613 -0.0546330 0.0026430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 20 38811 -0.215486 0.103214 -0.0559360 0.0025390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 21 38812 -0.217086 0.105814 -0.0571010 0.0023730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 22 38813 -0.218686 0.108414 -0.0580849 0.0021940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 23 38814 -0.220286 0.111114 -0.0588909 0.0020230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 24 38815 -0.221785 0.113815 -0.0595509 0.0018940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 25 38816 -0.223285 0.116515 -0.0601048 0.0018030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 26 38817 -0.224685 0.119315 -0.0605868 0.0017810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 27 38818 -0.226084 0.122116 -0.0610888 0.0018120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 2 28 38819 -0.227484 0.124916 -0.0616527 0.0019250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 1 38820 -0.228784 0.127816 0.0376433 0.0020820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 2 38821 -0.229984 0.130716 0.0367723 0.0022750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 3 38822 -0.231183 0.133717 0.0356874 0.0024830 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 4 38823 -0.232383 0.136717 0.0344104 0.0026760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 5 38824 -0.233483 0.139717 0.0329514 0.0028230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 6 38825 -0.234583 0.142817 0.0313795 0.0028990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 7 38826 -0.235582 0.145918 0.0297815 0.0028940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 8 38827 -0.236582 0.149018 0.0282175 0.0028030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 9 38828 -0.237482 0.152218 0.0267726 0.0026710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 10 38829 -0.238281 0.155419 0.0254696 0.0025270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 11 38830 -0.239081 0.158619 0.0242976 0.0024060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 12 38831 -0.239881 0.161819 0.0232207 0.0023650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 13 38832 -0.240481 0.165119 0.0221317 0.0024220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 14 38833 -0.241080 0.168320 0.0209217 0.0025820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 15 38834 -0.241680 0.171620 0.0195248 0.0028090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 16 38835 -0.242080 0.174920 0.0179038 0.0030280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 17 38836 -0.242480 0.178220 0.0160898 0.0031840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 18 38837 -0.242779 0.181621 0.0141699 0.0032350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 19 38838 -0.243079 0.184921 0.0122479 0.0031730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 20 38839 -0.243179 0.188221 0.0104349 0.0030210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 21 38840 -0.243278 0.191622 0.0088120 0.0028200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 22 38841 -0.243278 0.194922 0.0073970 0.0026120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 23 38842 -0.243178 0.198322 0.0061800 0.0024280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 24 38843 -0.243078 0.201622 0.0051161 0.0022900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 25 38844 -0.242777 0.204923 0.0041591 0.0022230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 26 38845 -0.242477 0.208223 0.0032472 0.0022120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 27 38846 -0.242077 0.211623 0.0023042 0.0022760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 28 38847 -0.241577 0.214923 0.0012762 0.0023880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 29 38848 -0.241076 0.218224 0.0001023 0.0025450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 30 38849 -0.240376 0.221424 -0.0012417 0.0027370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 3 31 38850 -0.239676 0.224724 -0.0027807 0.0029280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 1 38851 -0.238875 0.228025 -0.0044866 0.0030760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 2 38852 -0.238075 0.231225 -0.0063096 0.0031570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 3 38853 -0.237175 0.234425 -0.0081805 0.0031480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 4 38854 -0.236175 0.237625 -0.0099845 0.0030470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 5 38855 -0.235174 0.240826 -0.0116505 0.0028770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 6 38856 -0.234074 0.244026 -0.0131304 0.0026730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 7 38857 -0.232974 0.247226 -0.0144264 0.0025070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 8 38858 -0.231874 0.250326 -0.0155804 0.0024060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 9 38859 -0.230573 0.253427 -0.0166823 0.0024160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 10 38860 -0.229373 0.256527 -0.0178463 0.0025180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 11 38861 -0.228073 0.259627 -0.0191642 0.0026960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 12 38862 -0.226772 0.262728 -0.0206682 0.0029010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 13 38863 -0.225372 0.265728 -0.0223642 0.0030720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 14 38864 -0.223972 0.268728 -0.0241851 0.0031530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 15 38865 -0.222572 0.271828 -0.0260441 0.0031270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 16 38866 -0.221171 0.274729 -0.0278150 0.0030000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 17 38867 -0.219671 0.277729 -0.0294210 0.0027930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 18 38868 -0.218171 0.280729 -0.0308010 0.0025570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 19 38869 -0.216670 0.283630 -0.0319469 0.0023180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 20 38870 -0.215070 0.286530 -0.0328599 0.0021170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 21 38871 -0.213570 0.289430 -0.0335988 0.0019730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 22 38872 -0.211970 0.292230 -0.0342368 0.0019050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 23 38873 -0.210369 0.295131 -0.0348428 0.0019060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 24 38874 -0.208869 0.297931 -0.0354807 0.0019590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 25 38875 -0.207269 0.300631 -0.0361967 0.0020700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 26 38876 -0.205569 0.303431 -0.0370416 0.0022140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 27 38877 -0.203968 0.306132 -0.0380386 0.0023790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 28 38878 -0.202368 0.308832 -0.0392056 0.0025290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 29 38879 -0.200768 0.311532 -0.0404905 0.0026310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 4 30 38880 -0.199067 0.314233 -0.0418505 0.0026620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 1 38881 -0.197467 0.316833 -0.0431914 0.0025930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 2 38882 -0.195867 0.319433 -0.0444254 0.0024420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 3 38883 -0.194167 0.322033 -0.0454583 0.0022310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 4 38884 -0.192566 0.324534 -0.0462993 0.0020470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 5 38885 -0.190866 0.327134 -0.0469863 0.0019310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 6 38886 -0.189266 0.329634 -0.0476062 0.0019080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 7 38887 -0.187666 0.332034 -0.0482492 0.0019930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 8 38888 -0.185965 0.334535 -0.0490281 0.0021660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 9 38889 -0.184365 0.336935 -0.0500031 0.0023730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 10 38890 -0.182765 0.339335 -0.0511680 0.0025510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 11 38891 -0.181064 0.341636 -0.0524930 0.0026650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 12 38892 -0.179464 0.343936 -0.0538880 0.0026990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 13 38893 -0.177764 0.346236 -0.0552599 0.0026290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 14 38894 -0.176064 0.348536 -0.0565209 0.0024730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 15 38895 -0.174463 0.350737 -0.0576008 0.0022830 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 16 38896 -0.172763 0.352937 -0.0584948 0.0020850 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 17 38897 -0.170963 0.355137 -0.0591897 0.0019120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 18 38898 -0.169263 0.357237 -0.0597347 0.0017770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 19 38899 -0.167462 0.359338 -0.0601756 0.0017050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 20 38900 -0.165762 0.361438 -0.0605786 0.0017120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 21 38901 -0.163962 0.363438 -0.0610216 0.0017740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 22 38902 -0.162061 0.365439 -0.0615535 0.0018980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 23 38903 -0.160161 0.367439 -0.0622285 0.0020470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 24 38904 -0.158261 0.369439 -0.0630724 0.0022230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 25 38905 -0.156361 0.371339 -0.0640824 0.0023940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 26 38906 -0.154360 0.373240 -0.0652523 0.0025270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 27 38907 -0.152360 0.375140 -0.0665273 0.0026110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 28 38908 -0.150260 0.377040 -0.0678442 0.0025970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 29 38909 -0.148060 0.378840 -0.0691092 0.0024960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 30 38910 -0.145859 0.380741 -0.0702101 0.0023070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 5 31 38911 -0.143659 0.382541 -0.0711241 0.0021030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 1 38912 -0.141359 0.384341 -0.0718310 0.0019340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 2 38913 -0.138958 0.386142 -0.0724250 0.0018630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 3 38914 -0.136558 0.387942 -0.0730170 0.0019210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 4 38915 -0.134058 0.389742 -0.0736989 0.0020650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 5 38916 -0.131458 0.391542 -0.0745709 0.0022510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 6 38917 -0.128757 0.393343 -0.0756158 0.0024310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 7 38918 -0.126057 0.395143 -0.0768118 0.0025370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 8 38919 -0.123257 0.396843 -0.0780707 0.0025650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 9 38920 -0.120357 0.398643 -0.0793327 0.0025050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 10 38921 -0.117356 0.400344 -0.0804766 0.0023630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 11 38922 -0.114256 0.402044 -0.0814536 0.0021750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 12 38923 -0.111156 0.403744 -0.0822325 0.0019740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 13 38924 -0.107955 0.405445 -0.0828165 0.0017880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 14 38925 -0.104655 0.407145 -0.0832224 0.0016320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 15 38926 -0.101255 0.408745 -0.0834994 0.0015220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 16 38927 -0.097855 0.410345 -0.0837083 0.0014880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 17 38928 -0.094354 0.411946 -0.0838973 0.0015000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 18 38929 -0.090754 0.413546 -0.0841372 0.0015670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 19 38930 -0.087054 0.415046 -0.0844552 0.0016630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 20 38931 -0.083354 0.416446 -0.0848801 0.0017880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 21 38932 -0.079553 0.417947 -0.0854301 0.0019000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 22 38933 -0.075753 0.419247 -0.0860940 0.0020020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 23 38934 -0.071853 0.420647 -0.0868200 0.0020320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 24 38935 -0.067952 0.421848 -0.0875449 0.0020050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 25 38936 -0.063952 0.423148 -0.0882219 0.0019140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 26 38937 -0.059952 0.424248 -0.0887638 0.0017390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 27 38938 -0.055852 0.425348 -0.0891028 0.0015230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 28 38939 -0.051751 0.426449 -0.0892237 0.0013170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 29 38940 -0.047651 0.427449 -0.0891617 0.0011870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 6 30 38941 -0.043551 0.428349 -0.0890396 0.0011980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 1 38942 -0.039451 0.429149 0.0110014 0.0013280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 2 38943 -0.035250 0.429950 0.0108725 0.0015370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 3 38944 -0.031150 0.430650 0.0105275 0.0017560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 4 38945 -0.027050 0.431350 0.0099826 0.0019180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 5 38946 -0.022849 0.431951 0.0093256 0.0019700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 6 38947 -0.018749 0.432451 0.0086577 0.0019300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 7 38948 -0.014649 0.432851 0.0080827 0.0018110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 8 38949 -0.010649 0.433251 0.0076518 0.0016460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 9 38950 -0.006648 0.433552 0.0073838 0.0014800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 10 38951 -0.002648 0.433852 0.0072769 0.0013190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 11 38952 0.001352 0.433952 0.0073239 0.0011950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 12 38953 0.005152 0.434052 0.0074600 0.0011340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 13 38954 0.009053 0.434153 0.0076361 0.0011250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 14 38955 0.012753 0.434153 0.0077691 0.0011900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 15 38956 0.016453 0.434053 0.0078272 0.0013030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 16 38957 0.020154 0.433854 0.0077492 0.0014490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 17 38958 0.023654 0.433654 0.0075123 0.0016170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 18 38959 0.027154 0.433354 0.0071063 0.0017740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 19 38960 0.030554 0.433054 0.0065524 0.0019190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 20 38961 0.033855 0.432655 0.0058814 0.0020150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 21 38962 0.037055 0.432155 0.0051495 0.0020470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 22 38963 0.040155 0.431655 0.0044005 0.0020200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 23 38964 0.043156 0.431056 0.0037236 0.0019020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 24 38965 0.046056 0.430356 0.0032056 0.0017260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 25 38966 0.048956 0.429656 0.0028677 0.0015540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 26 38967 0.051656 0.428856 0.0026828 0.0014180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 27 38968 0.054357 0.427957 0.0025858 0.0013960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 28 38969 0.056857 0.427057 0.0024479 0.0015010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 29 38970 0.059357 0.426057 0.0021489 0.0017100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 30 38971 0.061757 0.424957 0.0016160 0.0019440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 7 31 38972 0.064058 0.423858 0.0008660 0.0021430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 1 38973 0.066258 0.422658 -0.0000339 0.0022260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 2 38974 0.068358 0.421358 -0.0009629 0.0021920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 3 38975 0.070359 0.419959 -0.0017938 0.0020440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 4 38976 0.072359 0.418559 -0.0024497 0.0018430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 5 38977 0.074259 0.417059 -0.0028827 0.0016240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 6 38978 0.076059 0.415459 -0.0031036 0.0014130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 7 38979 0.077860 0.413860 -0.0031326 0.0012430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 8 38980 0.079560 0.412160 -0.0030175 0.0011380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 9 38981 0.081260 0.410360 -0.0028295 0.0010960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 10 38982 0.082860 0.408460 -0.0026424 0.0011180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 11 38983 0.084461 0.406461 -0.0024963 0.0012000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 12 38984 0.085961 0.404461 -0.0024673 0.0013380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 13 38985 0.087561 0.402361 -0.0025922 0.0015040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 14 38986 0.089062 0.400162 -0.0028872 0.0016740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 15 38987 0.090462 0.397962 -0.0033421 0.0018320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 16 38988 0.091962 0.395562 -0.0039361 0.0019480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 17 38989 0.093362 0.393162 -0.0046290 0.0020070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 18 38990 0.094863 0.390663 -0.0053379 0.0020110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 19 38991 0.096263 0.388163 -0.0060289 0.0019420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 20 38992 0.097663 0.385563 -0.0066238 0.0018310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 21 38993 0.099063 0.382863 -0.0070838 0.0016890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 22 38994 0.100564 0.380064 -0.0074197 0.0015820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 23 38995 0.101964 0.377264 -0.0076836 0.0015530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 24 38996 0.103464 0.374364 -0.0079766 0.0016430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 25 38997 0.104965 0.371365 -0.0084205 0.0018420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 26 38998 0.106465 0.368365 -0.0091065 0.0021270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 27 38999 0.107965 0.365265 -0.0100834 0.0024080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 28 39000 0.109465 0.362165 -0.0112953 0.0025960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 29 39001 0.111066 0.358966 -0.0126313 0.0026520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 30 39002 0.112666 0.355666 -0.0139632 0.0025730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 8 31 39003 0.114266 0.352366 -0.0151632 0.0023960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 1 39004 0.115866 0.349066 0.0838499 0.0021760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 2 39005 0.117467 0.345667 0.0830830 0.0019530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 3 39006 0.119167 0.342267 0.0825200 0.0017730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 4 39007 0.120867 0.338867 0.0821081 0.0016630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 5 39008 0.122668 0.335368 0.0817711 0.0016120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 6 39009 0.124368 0.331868 0.0814612 0.0016190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 7 39010 0.126168 0.328368 0.0811033 0.0016990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 8 39011 0.127968 0.324768 0.0806473 0.0018190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 9 39012 0.129869 0.321169 0.0800424 0.0019840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 10 39013 0.131669 0.317669 0.0792655 0.0021590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 11 39014 0.133569 0.314069 0.0783185 0.0023100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 12 39015 0.135469 0.310369 0.0772386 0.0024310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 13 39016 0.137370 0.306770 0.0760776 0.0024910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 14 39017 0.139270 0.303170 0.0748817 0.0024780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 15 39018 0.141170 0.299570 0.0737348 0.0024050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 16 39019 0.143071 0.295871 0.0726898 0.0022790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 17 39020 0.144971 0.292271 0.0717839 0.0021320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 18 39021 0.146871 0.288671 0.0710200 0.0020030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 19 39022 0.148771 0.284971 0.0703560 0.0019390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 20 39023 0.150672 0.281372 0.0696981 0.0019770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 21 39024 0.152572 0.277772 0.0689441 0.0021410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 22 39025 0.154472 0.274172 0.0679642 0.0024000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 23 39026 0.156272 0.270672 0.0667113 0.0026960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 24 39027 0.158073 0.267073 0.0651853 0.0029520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 25 39028 0.159973 0.263473 0.0634444 0.0030880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 26 39029 0.161673 0.259973 0.0616365 0.0030940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 27 39030 0.163474 0.256474 0.0598895 0.0029820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 28 39031 0.165174 0.252974 0.0583086 0.0027710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 29 39032 0.166874 0.249474 0.0569547 0.0025280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 9 30 39033 0.168574 0.246074 0.0558227 0.0023240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 1 39034 0.170175 0.242575 0.0548868 0.0021690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 2 39035 0.171775 0.239175 0.0540599 0.0020780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 3 39036 0.173375 0.235775 0.0532969 0.0020610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 4 39037 0.174875 0.232475 0.0525050 0.0021130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 5 39038 0.176376 0.229076 0.0516410 0.0022130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 6 39039 0.177776 0.225776 0.0506461 0.0023420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 7 39040 0.179176 0.222476 0.0495402 0.0024910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 8 39041 0.180577 0.219277 0.0482652 0.0026440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 9 39042 0.181877 0.215977 0.0468613 0.0027580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 10 39043 0.183077 0.212777 0.0453584 0.0028250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 11 39044 0.184277 0.209577 0.0438254 0.0028170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 12 39045 0.185478 0.206478 0.0423415 0.0027280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 13 39046 0.186578 0.203378 0.0409926 0.0025700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 14 39047 0.187578 0.200278 0.0398136 0.0023770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 15 39048 0.188479 0.197179 0.0388347 0.0021960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 16 39049 0.189379 0.194179 0.0380008 0.0020650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 17 39050 0.190279 0.191179 0.0372538 0.0020380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 18 39051 0.190979 0.188279 0.0364769 0.0021320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 19 39052 0.191680 0.185280 0.0355570 0.0023220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 20 39053 0.192280 0.182480 0.0344151 0.0025670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 21 39054 0.192780 0.179580 0.0330251 0.0028150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 22 39055 0.193180 0.176780 0.0314102 0.0029890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 23 39056 0.193481 0.174081 0.0296873 0.0030340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 24 39057 0.193781 0.171281 0.0279653 0.0029600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 25 39058 0.193881 0.168681 0.0263824 0.0027920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 26 39059 0.193982 0.165982 0.0249995 0.0025600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 27 39060 0.193982 0.163382 0.0238515 0.0023410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 28 39061 0.193882 0.160782 0.0228936 0.0021550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 29 39062 0.193682 0.158182 0.0220967 0.0020500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 30 39063 0.193383 0.155683 0.0213677 0.0020120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 10 31 39064 0.192983 0.153183 0.0206488 0.0020490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 1 39065 0.192583 0.150683 0.0198489 0.0021500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 2 39066 0.191983 0.148183 0.0189229 0.0022980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 3 39067 0.191384 0.145784 0.0178330 0.0024720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 4 39068 0.190684 0.143284 0.0165661 0.0026600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 5 39069 0.189884 0.140884 0.0151192 0.0028290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 6 39070 0.189085 0.138485 0.0135212 0.0029460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 7 39071 0.188085 0.136085 0.0118283 0.0030070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 8 39072 0.187085 0.133585 0.0101254 0.0029760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 9 39073 0.185985 0.131185 0.0084944 0.0028720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 10 39074 0.184786 0.128786 0.0070095 0.0027010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 11 39075 0.183586 0.126386 0.0056856 0.0025300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 12 39076 0.182186 0.123886 0.0045137 0.0023960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 13 39077 0.180786 0.121486 0.0034517 0.0023450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 14 39078 0.179287 0.119087 0.0023748 0.0024170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 15 39079 0.177787 0.116587 0.0011839 0.0025690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 16 39080 0.176187 0.114087 -0.0002031 0.0027890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 17 39081 0.174488 0.111688 -0.0017960 0.0030030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 18 39082 0.172688 0.109188 -0.0035909 0.0031630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 19 39083 0.170888 0.106688 -0.0055008 0.0032180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 20 39084 0.168988 0.104188 -0.0074078 0.0031580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 21 39085 0.167089 0.101689 -0.0091917 0.0029950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 22 39086 0.165089 0.099189 -0.0107756 0.0027550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 23 39087 0.162989 0.096689 -0.0121046 0.0025040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 24 39088 0.160889 0.094189 -0.0132025 0.0022780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 25 39089 0.158690 0.091690 -0.0141004 0.0021090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 26 39090 0.156490 0.089290 -0.0148543 0.0020130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 27 39091 0.154190 0.086790 -0.0155513 0.0019930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 28 39092 0.151791 0.084291 -0.0162632 0.0020310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 29 39093 0.149391 0.081891 -0.0170511 0.0021330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 11 30 39094 0.146991 0.079391 -0.0179590 0.0022770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 1 39095 0.144491 0.076991 -0.0190180 0.0024200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 2 39096 0.141892 0.074592 -0.0202059 0.0025520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 3 39097 0.139392 0.072192 -0.0215118 0.0026430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 4 39098 0.136692 0.069792 -0.0228947 0.0026930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 5 39099 0.134092 0.067392 -0.0242847 0.0026540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 6 39100 0.131393 0.065093 -0.0255866 0.0025450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 7 39101 0.128693 0.062793 -0.0267505 0.0023540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 8 39102 0.125893 0.060493 -0.0277014 0.0021360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 9 39103 0.123094 0.058294 -0.0284294 0.0019380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 10 39104 0.120294 0.056094 -0.0290053 0.0018000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 11 39105 0.117394 0.053894 -0.0294892 0.0017900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 12 39106 0.114494 0.051694 -0.0300331 0.0019040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 13 39107 0.111595 0.049595 -0.0307331 0.0021010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 14 39108 0.108695 0.047495 -0.0316470 0.0023160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 15 39109 0.105695 0.045495 -0.0327549 0.0024770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 16 39110 0.102695 0.043495 -0.0339698 0.0025440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 17 39111 0.099796 0.041496 -0.0352168 0.0025120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 18 39112 0.096796 0.039596 -0.0363817 0.0023940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 19 39113 0.093796 0.037696 -0.0373936 0.0022110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 20 39114 0.090797 0.035897 -0.0382055 0.0020220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 21 39115 0.087697 0.034097 -0.0388525 0.0018470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 22 39116 0.084697 0.032397 -0.0393354 0.0017180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 23 39117 0.081697 0.030697 -0.0397103 0.0016440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 24 39118 0.078698 0.029098 -0.0400582 0.0016530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 25 39119 0.075698 0.027598 -0.0404491 0.0017410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 26 39120 0.072698 0.026098 -0.0409691 0.0018860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 27 39121 0.069798 0.024698 -0.0416350 0.0020490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 28 39122 0.066799 0.023399 -0.0424829 0.0022260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 29 39123 0.063899 0.022099 -0.0434948 0.0023950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 30 39124 0.060999 0.020899 -0.0446628 0.0025260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1965 12 31 39125 0.058100 0.019800 -0.0459337 0.0026050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 1 39126 0.055200 0.018800 -0.0472656 0.0026390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 2 39127 0.052400 0.017900 -0.0472975 0.0025960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 3 39128 0.049600 0.017000 -0.0472524 0.0024830 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 4 39129 0.046801 0.016201 -0.0470674 0.0023100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 5 39130 0.044101 0.015501 -0.0466903 0.0021390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 6 39131 0.041301 0.014901 -0.0461732 0.0020210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 7 39132 0.038602 0.014302 -0.0455791 0.0020120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 8 39133 0.036002 0.013902 -0.0450500 0.0021320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 9 39134 0.033302 0.013502 -0.0446960 0.0023620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 10 39135 0.030702 0.013102 -0.0445859 0.0026160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 11 39136 0.028103 0.012903 -0.0447328 0.0028340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 12 39137 0.025503 0.012703 -0.0450377 0.0029360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 13 39138 0.023003 0.012603 -0.0453816 0.0029220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 14 39139 0.020403 0.012503 -0.0456636 0.0027970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 15 39140 0.017904 0.012504 -0.0457715 0.0025910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 16 39141 0.015404 0.012604 -0.0456584 0.0023710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 17 39142 0.012904 0.012704 -0.0453303 0.0021670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 18 39143 0.010505 0.012805 -0.0448272 0.0020080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 19 39144 0.008005 0.013005 -0.0441862 0.0019110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 20 39145 0.005605 0.013305 -0.0434841 0.0018860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 21 39146 0.003105 0.013605 -0.0427900 0.0019280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 22 39147 0.000706 0.013906 -0.0421799 0.0020300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 23 39148 -0.001694 0.014206 -0.0416848 0.0021750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 24 39149 -0.004094 0.014606 -0.0413557 0.0023390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 25 39150 -0.006494 0.015006 -0.0411807 0.0024980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 26 39151 -0.008993 0.015407 -0.0411616 0.0026400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 27 39152 -0.011393 0.015907 -0.0412555 0.0027290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 28 39153 -0.013793 0.016407 -0.0414214 0.0027750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 29 39154 -0.016292 0.016908 -0.0416053 0.0027730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 30 39155 -0.018692 0.017408 -0.0417583 0.0027030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 1 31 39156 -0.021192 0.017908 -0.0418152 0.0025830 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 1 39157 -0.023592 0.018508 -0.0417281 0.0024320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 2 39158 -0.026091 0.019009 -0.0414980 0.0023070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 3 39159 -0.028591 0.019609 -0.0411809 0.0022580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 4 39160 -0.031091 0.020209 -0.0408748 0.0023350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 5 39161 -0.033591 0.020909 -0.0407128 0.0025490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 6 39162 -0.036090 0.021510 -0.0407977 0.0028280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 7 39163 -0.038690 0.022210 -0.0411746 0.0030970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 8 39164 -0.041190 0.022910 -0.0417695 0.0032600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 9 39165 -0.043789 0.023611 -0.0424654 0.0032890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 10 39166 -0.046289 0.024411 -0.0431173 0.0031730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 11 39167 -0.048889 0.025111 -0.0435872 0.0029450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 12 39168 -0.051489 0.025911 -0.0438132 0.0026760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 13 39169 -0.053988 0.026712 -0.0437631 0.0024190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 14 39170 -0.056588 0.027512 -0.0434790 0.0022130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 15 39171 -0.059188 0.028312 -0.0430219 0.0020660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 16 39172 -0.061688 0.029212 -0.0424558 0.0019930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 17 39173 -0.064187 0.030113 -0.0418527 0.0019920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 18 39174 -0.066687 0.031013 -0.0412697 0.0020320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 19 39175 -0.069187 0.031913 -0.0407526 0.0021290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 20 39176 -0.071686 0.032814 -0.0403465 0.0022620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 21 39177 -0.074086 0.033714 -0.0400874 0.0023870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 22 39178 -0.076486 0.034714 -0.0399423 0.0025070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 23 39179 -0.078786 0.035714 -0.0398872 0.0025640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 24 39180 -0.081185 0.036715 -0.0398701 0.0025830 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 25 39181 -0.083485 0.037715 -0.0398430 0.0025410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 26 39182 -0.085685 0.038715 -0.0397540 0.0024530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 27 39183 -0.087885 0.039815 -0.0395519 0.0023290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 2 28 39184 -0.090084 0.040816 -0.0392028 0.0021920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 1 39185 -0.092184 0.041916 -0.0387397 0.0020680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 2 39186 -0.094284 0.043016 -0.0381796 0.0020060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 3 39187 -0.096383 0.044217 -0.0375985 0.0020530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 4 39188 -0.098383 0.045317 -0.0371384 0.0022300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 5 39189 -0.100283 0.046517 -0.0369144 0.0025260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 6 39190 -0.102183 0.047717 -0.0370243 0.0028620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 7 39191 -0.104082 0.049018 -0.0374522 0.0031470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 8 39192 -0.105882 0.050218 -0.0380931 0.0033000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 9 39193 -0.107682 0.051518 -0.0388050 0.0032870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 10 39194 -0.109382 0.052918 -0.0394289 0.0031310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 11 39195 -0.111081 0.054219 -0.0398578 0.0028910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 12 39196 -0.112781 0.055619 -0.0400267 0.0026390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 13 39197 -0.114381 0.057019 -0.0399596 0.0024100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 14 39198 -0.115980 0.058420 -0.0397016 0.0022660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 15 39199 -0.117480 0.059920 -0.0393305 0.0021860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 16 39200 -0.118980 0.061420 -0.0389094 0.0021840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 17 39201 -0.120480 0.063020 -0.0385313 0.0022610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 18 39202 -0.121879 0.064521 -0.0382572 0.0023790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 19 39203 -0.123279 0.066121 -0.0381291 0.0025390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 20 39204 -0.124679 0.067821 -0.0381580 0.0026980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 21 39205 -0.126079 0.069521 -0.0383499 0.0028510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 22 39206 -0.127478 0.071222 -0.0386658 0.0029640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 23 39207 -0.128778 0.072922 -0.0390578 0.0030090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 24 39208 -0.130078 0.074722 -0.0394807 0.0029970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 25 39209 -0.131377 0.076523 -0.0398586 0.0029290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 26 39210 -0.132677 0.078423 -0.0401325 0.0028010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 27 39211 -0.133977 0.080323 -0.0402724 0.0026470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 28 39212 -0.135277 0.082223 -0.0402493 0.0025020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 29 39213 -0.136576 0.084224 -0.0401132 0.0024070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 30 39214 -0.137876 0.086224 -0.0399131 0.0024010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 3 31 39215 -0.139176 0.088224 -0.0397550 0.0025040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 1 39216 -0.140375 0.090225 -0.0397789 0.0027320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 2 39217 -0.141675 0.092325 -0.0400538 0.0030250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 3 39218 -0.142975 0.094425 -0.0406388 0.0033170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 4 39219 -0.144175 0.096525 -0.0414887 0.0035220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 5 39220 -0.145474 0.098626 -0.0424526 0.0035780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 6 39221 -0.146674 0.100826 -0.0433985 0.0034700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 7 39222 -0.147874 0.102926 -0.0441794 0.0032460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 8 39223 -0.149074 0.105126 -0.0446923 0.0029670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 9 39224 -0.150273 0.107327 -0.0449192 0.0027040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 10 39225 -0.151473 0.109427 -0.0449321 0.0025070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 11 39226 -0.152573 0.111627 -0.0447820 0.0023980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 12 39227 -0.153672 0.113828 -0.0445679 0.0023780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 13 39228 -0.154772 0.116028 -0.0443738 0.0024350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 14 39229 -0.155772 0.118128 -0.0442667 0.0025500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 15 39230 -0.156772 0.120328 -0.0443066 0.0027140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 16 39231 -0.157771 0.122429 -0.0445095 0.0028730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 17 39232 -0.158771 0.124529 -0.0448795 0.0030340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 18 39233 -0.159571 0.126729 -0.0453774 0.0031540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 19 39234 -0.160471 0.128829 -0.0459803 0.0032120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 20 39235 -0.161270 0.130830 -0.0465982 0.0032040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 21 39236 -0.161970 0.132930 -0.0471831 0.0031240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 22 39237 -0.162670 0.134930 -0.0476450 0.0029910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 23 39238 -0.163269 0.137031 -0.0479519 0.0028100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 24 39239 -0.163769 0.138931 -0.0480748 0.0026200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 25 39240 -0.164269 0.140931 -0.0480247 0.0024720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 26 39241 -0.164669 0.142931 -0.0478666 0.0024170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 27 39242 -0.165068 0.144832 -0.0477145 0.0024690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 28 39243 -0.165368 0.146732 -0.0476714 0.0026400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 29 39244 -0.165668 0.148632 -0.0478323 0.0028830 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 4 30 39245 -0.165768 0.150432 -0.0482652 0.0031610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 1 39246 -0.165867 0.152233 -0.0489601 0.0033950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 2 39247 -0.165967 0.154033 -0.0498270 0.0035060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 3 39248 -0.165967 0.155833 -0.0507429 0.0034800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 4 39249 -0.165866 0.157634 -0.0515498 0.0033140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 5 39250 -0.165766 0.159334 -0.0521497 0.0030570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 6 39251 -0.165566 0.161034 -0.0524656 0.0027680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 7 39252 -0.165366 0.162734 -0.0525196 0.0025210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 8 39253 -0.165065 0.164435 -0.0523545 0.0023530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 9 39254 -0.164665 0.166035 -0.0520774 0.0022790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 10 39255 -0.164265 0.167735 -0.0517613 0.0022910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 11 39256 -0.163765 0.169335 -0.0514922 0.0023600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 12 39257 -0.163264 0.171036 -0.0513161 0.0024750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 13 39258 -0.162664 0.172636 -0.0512580 0.0026110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 14 39259 -0.162064 0.174236 -0.0513469 0.0027350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 15 39260 -0.161463 0.175937 -0.0515298 0.0028250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 16 39261 -0.160663 0.177537 -0.0518027 0.0028920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 17 39262 -0.159963 0.179237 -0.0521036 0.0028890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 18 39263 -0.159163 0.180837 -0.0523685 0.0028190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 19 39264 -0.158362 0.182538 -0.0525374 0.0026790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 20 39265 -0.157462 0.184238 -0.0525193 0.0024770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 21 39266 -0.156562 0.186038 -0.0523062 0.0022780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 22 39267 -0.155662 0.187738 -0.0518941 0.0020980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 23 39268 -0.154661 0.189539 -0.0513370 0.0019950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 24 39269 -0.153661 0.191339 -0.0507399 0.0020090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 25 39270 -0.152661 0.193139 -0.0502118 0.0021330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 26 39271 -0.151660 0.195040 -0.0498537 0.0023390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 27 39272 -0.150560 0.196940 -0.0497096 0.0025640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 28 39273 -0.149460 0.198940 -0.0497915 0.0027690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 29 39274 -0.148360 0.200940 -0.0500394 0.0028870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 30 39275 -0.147259 0.202941 -0.0503433 0.0028810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 5 31 39276 -0.146159 0.204941 -0.0505772 0.0027470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 1 39277 -0.145059 0.207041 -0.0506241 0.0025140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 2 39278 -0.143859 0.209241 -0.0504090 0.0022350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 3 39279 -0.142758 0.211442 -0.0499289 0.0019710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 4 39280 -0.141658 0.213642 -0.0491928 0.0017690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 5 39281 -0.140458 0.215942 -0.0483057 0.0016640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 6 39282 -0.139357 0.218243 -0.0473596 0.0016380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 7 39283 -0.138157 0.220543 -0.0464365 0.0017080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 8 39284 -0.137057 0.222943 -0.0456024 0.0018210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 9 39285 -0.135857 0.225343 -0.0449083 0.0019730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 10 39286 -0.134756 0.227744 -0.0443692 0.0021280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 11 39287 -0.133556 0.230244 -0.0439771 0.0022630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 12 39288 -0.132456 0.232744 -0.0436930 0.0023610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 13 39289 -0.131256 0.235244 -0.0434809 0.0024060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 14 39290 -0.130155 0.237745 -0.0433048 0.0024010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 15 39291 -0.129055 0.240345 -0.0430717 0.0023120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 16 39292 -0.127855 0.242845 -0.0427286 0.0021740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 17 39293 -0.126754 0.245446 -0.0422175 0.0019920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 18 39294 -0.125554 0.248046 -0.0415244 0.0018180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 19 39295 -0.124454 0.250546 -0.0406833 0.0016950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 20 39296 -0.123254 0.253146 -0.0397702 0.0016780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 21 39297 -0.122153 0.255647 -0.0389001 0.0017820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 22 39298 -0.120953 0.258247 -0.0381850 0.0019810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 23 39299 -0.119753 0.260747 -0.0376959 0.0022110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 24 39300 -0.118652 0.263148 -0.0374168 0.0024100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 25 39301 -0.117452 0.265648 -0.0373057 0.0025310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 26 39302 -0.116252 0.268048 -0.0372476 0.0025310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 27 39303 -0.115052 0.270448 -0.0371385 0.0024110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 28 39304 -0.113851 0.272749 -0.0368474 0.0021960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 29 39305 -0.112551 0.275049 -0.0363342 0.0019430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 6 30 39306 -0.111351 0.277349 -0.0355551 0.0016830 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 1 39307 -0.110151 0.279549 -0.0345360 0.0014810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 2 39308 -0.108850 0.281650 -0.0333529 0.0013460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 3 39309 -0.107550 0.283750 -0.0320668 0.0012870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 4 39310 -0.106250 0.285850 -0.0307727 0.0013170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 5 39311 -0.104949 0.287851 -0.0295406 0.0014070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 6 39312 -0.103649 0.289751 -0.0284195 0.0015330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 7 39313 -0.102249 0.291651 -0.0274204 0.0016590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 8 39314 -0.100949 0.293451 -0.0265513 0.0017690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 9 39315 -0.099548 0.295152 -0.0257662 0.0018430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 10 39316 -0.098148 0.296852 -0.0250311 0.0018780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 11 39317 -0.096748 0.298452 -0.0243130 0.0018570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 12 39318 -0.095348 0.300052 -0.0235459 0.0017890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 13 39319 -0.093847 0.301553 -0.0226818 0.0016670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 14 39320 -0.092447 0.303053 -0.0216747 0.0015040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 15 39321 -0.090947 0.304453 -0.0204966 0.0013310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 16 39322 -0.089546 0.305754 -0.0191785 0.0012040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 17 39323 -0.088046 0.307154 -0.0177544 0.0011680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 18 39324 -0.086546 0.308354 -0.0163753 0.0012670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 19 39325 -0.085046 0.309554 -0.0151391 0.0014770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 20 39326 -0.083445 0.310755 -0.0141720 0.0017660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 21 39327 -0.081945 0.311955 -0.0134869 0.0020450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 22 39328 -0.080345 0.313055 -0.0130508 0.0022340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 23 39329 -0.078845 0.314055 -0.0127287 0.0022860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 24 39330 -0.077244 0.315156 -0.0123956 0.0022080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 25 39331 -0.075744 0.316156 -0.0119185 0.0020140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 26 39332 -0.074144 0.317056 -0.0112254 0.0017780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 27 39333 -0.072543 0.318057 -0.0102953 0.0015460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 28 39334 -0.070943 0.318957 -0.0091642 0.0013830 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 29 39335 -0.069343 0.319857 -0.0078951 0.0012830 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 30 39336 -0.067643 0.320757 -0.0065580 0.0012580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 7 31 39337 -0.066042 0.321658 -0.0052469 0.0013120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 1 39338 -0.064442 0.322458 -0.0040228 0.0014290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 2 39339 -0.062742 0.323258 -0.0029396 0.0015890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 3 39340 -0.061142 0.324058 -0.0020155 0.0017540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 4 39341 -0.059441 0.324859 -0.0012634 0.0019190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 5 39342 -0.057741 0.325659 -0.0006523 0.0020510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 6 39343 -0.056141 0.326359 -0.0001492 0.0021240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 7 39344 -0.054440 0.327160 0.0002999 0.0021500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 8 39345 -0.052740 0.327860 0.0007500 0.0021200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 9 39346 -0.051040 0.328560 0.0012671 0.0020300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 10 39347 -0.049340 0.329160 0.0018832 0.0019130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 11 39348 -0.047639 0.329861 0.0026273 0.0017780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 12 39349 -0.045939 0.330461 0.0035114 0.0016610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 13 39350 -0.044239 0.331061 0.0044726 0.0016000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 14 39351 -0.042539 0.331561 0.0054427 0.0016610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 15 39352 -0.040838 0.332162 0.0062848 0.0018550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 16 39353 -0.039138 0.332662 0.0068869 0.0021550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 17 39354 -0.037438 0.333162 0.0071550 0.0024780 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 18 39355 -0.035737 0.333563 0.0071321 0.0027400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 19 39356 -0.034037 0.334063 0.0069012 0.0028730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 20 39357 -0.032337 0.334463 0.0066223 0.0028370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 21 39358 -0.030637 0.334763 0.0064454 0.0026680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 22 39359 -0.028936 0.335064 0.0065045 0.0024170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 23 39360 -0.027136 0.335364 0.0068037 0.0021590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 24 39361 -0.025436 0.335564 0.0073488 0.0019410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 25 39362 -0.023736 0.335764 0.0080629 0.0018060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 26 39363 -0.022035 0.335965 0.0088770 0.0017610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 27 39364 -0.020335 0.336065 0.0097021 0.0017910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 28 39365 -0.018635 0.336165 0.0104632 0.0018880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 29 39366 -0.016934 0.336166 0.0111023 0.0020310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 30 39367 -0.015234 0.336166 0.0115844 0.0021850 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 8 31 39368 -0.013434 0.336066 0.0119025 0.0023460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 1 39369 -0.011734 0.335966 0.0120817 0.0024690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 2 39370 -0.010033 0.335867 0.0121718 0.0025430 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 3 39371 -0.008233 0.335667 0.0122069 0.0025580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 4 39372 -0.006533 0.335467 0.0122560 0.0025220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 5 39373 -0.004733 0.335167 0.0123691 0.0024240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 6 39374 -0.003032 0.334868 0.0125902 0.0022990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 7 39375 -0.001232 0.334468 0.0129573 0.0021570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 8 39376 0.000568 0.334068 0.0134634 0.0020250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 9 39377 0.002369 0.333569 0.0140816 0.0019410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 10 39378 0.004169 0.333069 0.0147407 0.0019480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 11 39379 0.005969 0.332569 0.0153248 0.0020770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 12 39380 0.007869 0.331969 0.0157249 0.0023400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 13 39381 0.009670 0.331370 0.0158170 0.0026720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 14 39382 0.011570 0.330670 0.0155641 0.0029950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 15 39383 0.013470 0.329970 0.0150322 0.0032250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 16 39384 0.015271 0.329271 0.0143624 0.0032740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 17 39385 0.017171 0.328471 0.0137245 0.0031540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 18 39386 0.019171 0.327671 0.0132896 0.0028920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 19 39387 0.021071 0.326771 0.0131367 0.0025930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 20 39388 0.022972 0.325972 0.0132728 0.0023250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 21 39389 0.024972 0.324972 0.0136489 0.0021310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 22 39390 0.026972 0.324072 0.0141560 0.0020520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 23 39391 0.028872 0.323072 0.0146932 0.0020680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 24 39392 0.030873 0.322073 0.0151833 0.0021620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 25 39393 0.032873 0.320973 0.0155424 0.0023080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 26 39394 0.034873 0.319873 0.0157395 0.0024810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 27 39395 0.036874 0.318774 0.0157596 0.0026660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 28 39396 0.038874 0.317674 0.0156147 0.0028090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 29 39397 0.040874 0.316474 0.0153358 0.0029190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 9 30 39398 0.042874 0.315274 0.0149770 0.0029700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 1 39399 0.044875 0.314075 0.0146071 0.0029570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 2 39400 0.046875 0.312775 0.0142732 0.0028730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 3 39401 0.048875 0.311575 0.0140553 0.0027450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 4 39402 0.050775 0.310175 0.0139804 0.0025850 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 5 39403 0.052776 0.308876 0.0140735 0.0024330 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 6 39404 0.054676 0.307576 0.0143007 0.0023020 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 7 39405 0.056676 0.306176 0.0146348 0.0022460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 8 39406 0.058577 0.304777 0.0149629 0.0023060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 9 39407 0.060477 0.303277 0.0151630 0.0024840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 10 39408 0.062377 0.301877 0.0151421 0.0027600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 11 39409 0.064177 0.300377 0.0148102 0.0030740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 12 39410 0.066078 0.298878 0.0141914 0.0033380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 13 39411 0.067878 0.297278 0.0133595 0.0034790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 14 39412 0.069578 0.295778 0.0124636 0.0034510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 15 39413 0.071378 0.294178 0.0117037 0.0032470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 16 39414 0.073079 0.292579 0.0111848 0.0029610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 17 39415 0.074779 0.290979 0.0109669 0.0026610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 18 39416 0.076379 0.289279 0.0110311 0.0024150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 19 39417 0.077980 0.287580 0.0112912 0.0022740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 20 39418 0.079580 0.285880 0.0116353 0.0022440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 21 39419 0.081080 0.284180 0.0119634 0.0023050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 22 39420 0.082580 0.282380 0.0121855 0.0024390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 23 39421 0.084081 0.280581 0.0122647 0.0025970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 24 39422 0.085481 0.278781 0.0121778 0.0027650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 25 39423 0.086881 0.276981 0.0119309 0.0029060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 26 39424 0.088181 0.275081 0.0115490 0.0030200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 27 39425 0.089582 0.273282 0.0110981 0.0030710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 28 39426 0.090782 0.271282 0.0106082 0.0030680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 29 39427 0.092082 0.269382 0.0101634 0.0029910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 30 39428 0.093383 0.267383 0.0098245 0.0028700 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 10 31 39429 0.094583 0.265383 0.0096156 0.0027160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 1 39430 0.095783 0.263383 0.0095847 0.0025500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 2 39431 0.096983 0.261383 0.0096948 0.0024290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 3 39432 0.098084 0.259284 0.0098940 0.0023670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 4 39433 0.099284 0.257184 0.0100971 0.0024130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 5 39434 0.100384 0.255084 0.0102112 0.0025660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 6 39435 0.101584 0.252884 0.0101233 0.0028140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 7 39436 0.102685 0.250785 0.0097554 0.0031060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 8 39437 0.103785 0.248585 0.0090946 0.0033870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 9 39438 0.104885 0.246385 0.0081907 0.0035810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 10 39439 0.105986 0.244186 0.0071708 0.0036200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 11 39440 0.107086 0.241986 0.0061959 0.0034950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 12 39441 0.108186 0.239786 0.0054160 0.0032390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 13 39442 0.109286 0.237586 0.0049182 0.0029230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 14 39443 0.110287 0.235287 0.0047423 0.0026300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 15 39444 0.111387 0.233087 0.0048194 0.0024130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 16 39445 0.112487 0.230787 0.0050695 0.0023070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 17 39446 0.113487 0.228587 0.0053697 0.0023060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 18 39447 0.114488 0.226388 0.0056108 0.0023930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 19 39448 0.115488 0.224188 0.0057589 0.0025150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 20 39449 0.116488 0.221988 0.0057660 0.0026610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 21 39450 0.117489 0.219789 0.0056201 0.0027980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 22 39451 0.118389 0.217589 0.0053613 0.0028920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 23 39452 0.119289 0.215389 0.0050224 0.0029480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 24 39453 0.120189 0.213289 0.0046755 0.0029360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 25 39454 0.120990 0.211190 0.0043626 0.0028510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 26 39455 0.121790 0.209090 0.0041728 0.0027190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 27 39456 0.122590 0.206990 0.0041389 0.0025450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 28 39457 0.123290 0.204990 0.0042790 0.0023540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 29 39458 0.123991 0.202991 0.0046021 0.0021860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 11 30 39459 0.124591 0.201091 0.0050662 0.0020800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 1 39460 0.125091 0.199191 0.0056014 0.0020680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 2 39461 0.125592 0.197292 0.0060735 0.0021750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 3 39462 0.125992 0.195492 0.0063906 0.0023740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 4 39463 0.126292 0.193792 0.0064877 0.0026380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 5 39464 0.126592 0.192092 0.0063069 0.0028980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 6 39465 0.126693 0.190493 0.0058930 0.0030940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 7 39466 0.126793 0.188893 0.0053481 0.0031740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 8 39467 0.126793 0.187293 0.0047822 0.0031240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 9 39468 0.126694 0.185894 0.0043324 0.0029470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 10 39469 0.126494 0.184494 0.0041055 0.0027010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 11 39470 0.126194 0.183094 0.0041146 0.0024550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 12 39471 0.125894 0.181794 0.0043667 0.0022350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 13 39472 0.125395 0.180595 0.0047919 0.0021140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 14 39473 0.124795 0.179395 0.0052840 0.0021000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 15 39474 0.124095 0.178295 0.0057531 0.0021650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 16 39475 0.123395 0.177295 0.0061162 0.0022880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 17 39476 0.122496 0.176296 0.0063514 0.0024240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 18 39477 0.121596 0.175296 0.0064495 0.0025550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 19 39478 0.120496 0.174396 0.0064306 0.0026580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 20 39479 0.119397 0.173497 0.0063297 0.0027040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 21 39480 0.118097 0.172697 0.0062199 0.0026960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 22 39481 0.116797 0.171897 0.0061480 0.0026290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 23 39482 0.115397 0.171097 0.0061711 0.0024970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 24 39483 0.113998 0.170398 0.0063502 0.0023300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 25 39484 0.112398 0.169698 0.0067094 0.0021190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 26 39485 0.110798 0.169098 0.0072815 0.0019230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 27 39486 0.109098 0.168498 0.0080286 0.0017740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 28 39487 0.107399 0.167899 0.0088837 0.0017240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 29 39488 0.105599 0.167299 0.0097229 0.0017870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 30 39489 0.103699 0.166699 0.0104540 0.0019560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1966 12 31 39490 0.101800 0.166200 0.0109891 0.0021800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 1 39491 0.099900 0.165700 0.0112652 0.0024240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 2 39492 0.097900 0.165200 0.0113344 0.0026120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 3 39493 0.095900 0.164700 0.0112605 0.0026950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 4 39494 0.093901 0.164301 0.0111796 0.0026440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 5 39495 0.091901 0.163801 0.0112018 0.0024840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 6 39496 0.089801 0.163401 0.0114269 0.0022380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 7 39497 0.087801 0.163001 0.0119130 0.0019930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 8 39498 0.085702 0.162502 0.0126181 0.0017770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 9 39499 0.083602 0.162102 0.0135003 0.0016650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 10 39500 0.081602 0.161702 0.0144434 0.0016540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 11 39501 0.079503 0.161303 0.0153395 0.0017280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 12 39502 0.077403 0.160903 0.0161347 0.0018800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 13 39503 0.075403 0.160503 0.0167578 0.0020570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 14 39504 0.073403 0.160103 0.0172009 0.0022450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 15 39505 0.071404 0.159704 0.0174460 0.0024080 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 16 39506 0.069404 0.159304 0.0175692 0.0025270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 17 39507 0.067504 0.158904 0.0176013 0.0025790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 18 39508 0.065604 0.158504 0.0176204 0.0025730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 19 39509 0.063705 0.158105 0.0176636 0.0025120 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 20 39510 0.061905 0.157705 0.0177997 0.0023990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 21 39511 0.060105 0.157305 0.0180558 0.0022680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 22 39512 0.058406 0.157006 0.0184559 0.0021230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 23 39513 0.056706 0.156606 0.0189891 0.0020090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 24 39514 0.055006 0.156206 0.0196032 0.0019680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 25 39515 0.053406 0.155906 0.0202063 0.0020260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 26 39516 0.051807 0.155507 0.0206895 0.0022160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 27 39517 0.050307 0.155207 0.0209326 0.0024790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 28 39518 0.048807 0.154807 0.0208927 0.0027790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 29 39519 0.047407 0.154507 0.0205849 0.0030010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 30 39520 0.046008 0.154208 0.0201230 0.0030990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 1 31 39521 0.044708 0.153908 0.0196301 0.0030520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 1 39522 0.043408 0.153608 0.0192562 0.0028670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 2 39523 0.042209 0.153309 0.0191154 0.0026060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 3 39524 0.041009 0.153009 0.0192405 0.0023140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 4 39525 0.039909 0.152709 0.0196636 0.0020610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 5 39526 0.038809 0.152409 0.0202818 0.0018990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 6 39527 0.037710 0.152110 0.0210029 0.0018460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 7 39528 0.036710 0.151910 0.0217270 0.0019000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 8 39529 0.035810 0.151610 0.0223682 0.0020280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 9 39530 0.034810 0.151310 0.0228463 0.0022110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 10 39531 0.033911 0.151111 0.0231324 0.0023950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 11 39532 0.033111 0.150811 0.0232316 0.0025720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 12 39533 0.032211 0.150611 0.0231837 0.0027060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 13 39534 0.031412 0.150312 0.0230288 0.0027930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 14 39535 0.030712 0.150112 0.0227979 0.0028180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 15 39536 0.029912 0.149812 0.0225831 0.0027750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 16 39537 0.029212 0.149612 0.0224442 0.0026860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 17 39538 0.028513 0.149313 0.0224013 0.0025680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 18 39539 0.027913 0.149013 0.0224905 0.0024440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 19 39540 0.027213 0.148813 0.0226776 0.0023390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 20 39541 0.026613 0.148513 0.0229637 0.0022800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 21 39542 0.026014 0.148214 0.0232769 0.0023040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 22 39543 0.025414 0.147914 0.0234940 0.0024520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 23 39544 0.024914 0.147614 0.0235131 0.0026980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 24 39545 0.024315 0.147315 0.0232553 0.0030230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 25 39546 0.023715 0.146915 0.0226624 0.0033230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 26 39547 0.023215 0.146615 0.0218165 0.0035230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 27 39548 0.022715 0.146215 0.0208627 0.0035440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 2 28 39549 0.022216 0.145916 0.0199778 0.0033800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 1 39550 0.021616 0.145516 0.0193259 0.0031000 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 2 39551 0.021116 0.145116 0.0189841 0.0027720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 3 39552 0.020617 0.144717 0.0189602 0.0024770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 4 39553 0.020117 0.144317 0.0191813 0.0022670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 5 39554 0.019617 0.143917 0.0195705 0.0021640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 6 39555 0.019217 0.143417 0.0199986 0.0021650 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 7 39556 0.018718 0.143018 0.0203937 0.0022570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 8 39557 0.018218 0.142618 0.0206579 0.0023910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 9 39558 0.017718 0.142218 0.0207760 0.0025550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 10 39559 0.017318 0.141718 0.0207311 0.0027200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 11 39560 0.016819 0.141319 0.0205373 0.0028400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 12 39561 0.016319 0.140919 0.0202394 0.0029160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 13 39562 0.015819 0.140519 0.0199176 0.0029170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 14 39563 0.015420 0.140120 0.0196167 0.0028550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 15 39564 0.014920 0.139720 0.0194168 0.0027400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 16 39565 0.014420 0.139420 0.0193490 0.0025810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 17 39566 0.013920 0.139020 0.0194281 0.0024320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 18 39567 0.013421 0.138721 0.0196702 0.0022870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 19 39568 0.012921 0.138421 0.0200284 0.0021970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 20 39569 0.012421 0.138221 0.0204425 0.0021720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 21 39570 0.011921 0.137921 0.0208286 0.0022660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 22 39571 0.011422 0.137722 0.0210608 0.0024810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 23 39572 0.010922 0.137622 0.0210219 0.0027980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 24 39573 0.010422 0.137522 0.0206420 0.0031510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 25 39574 0.009923 0.137423 0.0199192 0.0034470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 26 39575 0.009323 0.137423 0.0189683 0.0036060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 27 39576 0.008823 0.137423 0.0179635 0.0035630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 28 39577 0.008223 0.137423 0.0170916 0.0033460 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 29 39578 0.007724 0.137524 0.0164847 0.0030300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 30 39579 0.007124 0.137724 0.0162039 0.0027200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 3 31 39580 0.006524 0.137924 0.0162100 0.0024840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 1 39581 0.005924 0.138124 0.0163951 0.0023550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 2 39582 0.005425 0.138425 0.0166503 0.0023440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 3 39583 0.004825 0.138725 0.0168674 0.0024260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 4 39584 0.004225 0.139125 0.0169686 0.0025590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 5 39585 0.003626 0.139426 0.0169107 0.0027290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 6 39586 0.003026 0.139826 0.0166918 0.0028860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 7 39587 0.002526 0.140226 0.0163290 0.0030350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 8 39588 0.002026 0.140626 0.0158391 0.0031260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 9 39589 0.001527 0.141127 0.0152872 0.0031660 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 10 39590 0.001027 0.141627 0.0147294 0.0031300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 11 39591 0.000527 0.142127 0.0142475 0.0030250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 12 39592 -0.000073 0.142627 0.0138737 0.0028890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 13 39593 -0.000672 0.143128 0.0136568 0.0027340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 14 39594 -0.001272 0.143628 0.0135919 0.0025790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 15 39595 -0.001872 0.144128 0.0136671 0.0024520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 16 39596 -0.002471 0.144629 0.0138372 0.0023910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 17 39597 -0.003071 0.145129 0.0140253 0.0024310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 18 39598 -0.003671 0.145629 0.0141185 0.0025710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 19 39599 -0.004271 0.146129 0.0140186 0.0028250 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 20 39600 -0.004870 0.146630 0.0136268 0.0031470 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 21 39601 -0.005470 0.147130 0.0129169 0.0034540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 22 39602 -0.005970 0.147630 0.0119290 0.0036680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 23 39603 -0.006470 0.148130 0.0108062 0.0037160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 24 39604 -0.006969 0.148631 0.0097313 0.0035750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 25 39605 -0.007369 0.149031 0.0088865 0.0032870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 26 39606 -0.007669 0.149431 0.0083586 0.0029480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 27 39607 -0.007968 0.149832 0.0081687 0.0026350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 28 39608 -0.008268 0.150232 0.0082329 0.0024390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 29 39609 -0.008568 0.150632 0.0084380 0.0023620 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 4 30 39610 -0.008768 0.151032 0.0086512 0.0024090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 1 39611 -0.008967 0.151433 0.0087763 0.0025300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 2 39612 -0.009167 0.151833 0.0087594 0.0026870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 3 39613 -0.009367 0.152133 0.0085926 0.0028450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 4 39614 -0.009467 0.152433 0.0082677 0.0029790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 5 39615 -0.009566 0.152734 0.0078299 0.0030690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 6 39616 -0.009666 0.153034 0.0073290 0.0031030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 7 39617 -0.009766 0.153334 0.0068251 0.0030640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 8 39618 -0.009765 0.153635 0.0064013 0.0029640 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 9 39619 -0.009765 0.153935 0.0061024 0.0028070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 10 39620 -0.009665 0.154235 0.0059776 0.0026320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 11 39621 -0.009665 0.154535 0.0060287 0.0024480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 12 39622 -0.009564 0.154836 0.0062508 0.0022970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 13 39623 -0.009364 0.155036 0.0066050 0.0022060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 14 39624 -0.009264 0.155336 0.0070091 0.0021910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 15 39625 -0.009064 0.155436 0.0073803 0.0022740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 16 39626 -0.008863 0.155637 0.0076204 0.0024520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 17 39627 -0.008663 0.155737 0.0076336 0.0027090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 18 39628 -0.008463 0.155937 0.0073847 0.0029770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 19 39629 -0.008162 0.156038 0.0068778 0.0032040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 20 39630 -0.007962 0.156138 0.0061990 0.0033100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 21 39631 -0.007662 0.156138 0.0055031 0.0032420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 22 39632 -0.007362 0.156238 0.0049483 0.0030240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 23 39633 -0.007061 0.156339 0.0046704 0.0026930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 24 39634 -0.006761 0.156339 0.0047366 0.0023600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 25 39635 -0.006461 0.156439 0.0051067 0.0020990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 26 39636 -0.006061 0.156539 0.0056878 0.0019510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 27 39637 -0.005760 0.156640 0.0063420 0.0019400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 28 39638 -0.005460 0.156740 0.0069661 0.0020160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 29 39639 -0.005160 0.156840 0.0074843 0.0021420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 30 39640 -0.004859 0.156941 0.0078694 0.0022760 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 5 31 39641 -0.004559 0.157141 0.0081396 0.0023790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 1 39642 -0.004359 0.157341 0.0083067 0.0024480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 2 39643 -0.004059 0.157541 0.0084418 0.0024630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 3 39644 -0.003758 0.157742 0.0085920 0.0024070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 4 39645 -0.003558 0.158042 0.0088381 0.0022910 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 5 39646 -0.003358 0.158242 0.0092173 0.0021350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 6 39647 -0.003157 0.158643 0.0097704 0.0019360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 7 39648 -0.002957 0.158943 0.0105176 0.0017400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 8 39649 -0.002757 0.159343 0.0114637 0.0015560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 9 39650 -0.002657 0.159743 0.0125788 0.0014270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 10 39651 -0.002556 0.160144 0.0137630 0.0014010 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 11 39652 -0.002456 0.160644 0.0149241 0.0014740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 12 39653 -0.002356 0.161144 0.0159743 0.0016400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 13 39654 -0.002256 0.161644 0.0168124 0.0018820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 14 39655 -0.002255 0.162245 0.0173946 0.0021440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 15 39656 -0.002255 0.162745 0.0177177 0.0023690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 16 39657 -0.002255 0.163345 0.0178589 0.0025090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 17 39658 -0.002254 0.163946 0.0179350 0.0025040 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 18 39659 -0.002354 0.164646 0.0180801 0.0023750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 19 39660 -0.002454 0.165246 0.0184023 0.0021360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 20 39661 -0.002554 0.165946 0.0190024 0.0018440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 21 39662 -0.002653 0.166647 0.0198826 0.0015870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 22 39663 -0.002753 0.167347 0.0209847 0.0014190 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 23 39664 -0.002953 0.168047 0.0221829 0.0013870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 24 39665 -0.003053 0.168847 0.0233530 0.0014580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 25 39666 -0.003252 0.169548 0.0244242 0.0015990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 26 39667 -0.003452 0.170348 0.0253283 0.0017630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 27 39668 -0.003652 0.171048 0.0260845 0.0019100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 28 39669 -0.003851 0.171849 0.0267126 0.0020050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 29 39670 -0.004051 0.172649 0.0272747 0.0020520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 6 30 39671 -0.004251 0.173349 0.0278189 0.0020280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 1 39672 -0.004451 0.174149 0.0284190 0.0019530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 2 39673 -0.004650 0.174950 0.0291102 0.0018280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 3 39674 -0.004950 0.175650 0.0299563 0.0016670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 4 39675 -0.005150 0.176450 0.0309615 0.0014920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 5 39676 -0.005350 0.177150 0.0321476 0.0013300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 6 39677 -0.005649 0.177851 0.0334668 0.0012230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 7 39678 -0.005849 0.178551 0.0348669 0.0011820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 8 39679 -0.006049 0.179251 0.0362591 0.0012420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 9 39680 -0.006348 0.179952 0.0375292 0.0014150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 10 39681 -0.006548 0.180652 0.0385834 0.0016560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 11 39682 -0.006748 0.181252 0.0393875 0.0019240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 12 39683 -0.006948 0.181952 0.0399287 0.0021630 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 13 39684 -0.007247 0.182553 0.0402848 0.0022860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 14 39685 -0.007447 0.183153 0.0405710 0.0022880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 15 39686 -0.007647 0.183653 0.0409341 0.0021550 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 16 39687 -0.007847 0.184153 0.0414762 0.0019280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 17 39688 -0.008046 0.184754 0.0422844 0.0016420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 18 39689 -0.008246 0.185154 0.0433655 0.0013750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 19 39690 -0.008446 0.185654 0.0446877 0.0011870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 20 39691 -0.008645 0.186055 0.0461338 0.0011220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 21 39692 -0.008845 0.186455 0.0475860 0.0011720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 22 39693 -0.008945 0.186855 0.0489411 0.0013090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 23 39694 -0.009145 0.187155 0.0501343 0.0014870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 24 39695 -0.009344 0.187456 0.0511484 0.0016710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 25 39696 -0.009544 0.187756 0.0520056 0.0018070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 26 39697 -0.009644 0.188056 0.0527447 0.0018940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 27 39698 -0.009844 0.188256 0.0534299 0.0019150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 28 39699 -0.009943 0.188557 0.0541260 0.0018720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 29 39700 -0.010143 0.188757 0.0548942 0.0017740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 30 39701 -0.010243 0.188857 0.0557813 0.0016390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 7 31 39702 -0.010342 0.189058 0.0568035 0.0014860 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 1 39703 -0.010542 0.189158 0.0579866 0.0013510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 2 39704 -0.010642 0.189358 0.0592808 0.0012490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 3 39705 -0.010742 0.189458 0.0606479 0.0012110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 4 39706 -0.010841 0.189559 0.0620181 0.0012570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 5 39707 -0.010941 0.189559 0.0632762 0.0014240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 6 39708 -0.011141 0.189659 0.0643164 0.0016900 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 7 39709 -0.011241 0.189759 0.0650685 0.0019990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 8 39710 -0.011340 0.189760 0.0655047 0.0022980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 9 39711 -0.011440 0.189760 0.0656938 0.0024920 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 10 39712 -0.011640 0.189760 0.0657510 0.0025490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 11 39713 -0.011739 0.189761 0.0658381 0.0024420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 12 39714 -0.011839 0.189761 0.0660863 0.0022270 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 13 39715 -0.012039 0.189761 0.0665814 0.0019580 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 14 39716 -0.012139 0.189761 0.0673546 0.0016950 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 15 39717 -0.012338 0.189762 0.0683577 0.0015060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 16 39718 -0.012438 0.189662 0.0694859 0.0014260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 17 39719 -0.012638 0.189662 0.0706470 0.0014600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 18 39720 -0.012838 0.189662 0.0717242 0.0015880 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 19 39721 -0.013137 0.189563 0.0726433 0.0017600 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 20 39722 -0.013337 0.189563 0.0733815 0.0019540 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 21 39723 -0.013637 0.189463 0.0739366 0.0021090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 22 39724 -0.013836 0.189364 0.0743608 0.0022100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 23 39725 -0.014136 0.189364 0.0747189 0.0022530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 24 39726 -0.014536 0.189264 0.0750691 0.0022160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 25 39727 -0.014836 0.189164 0.0754882 0.0021170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 26 39728 -0.015235 0.189065 0.0760304 0.0019850 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 27 39729 -0.015635 0.189065 0.0767155 0.0018220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 28 39730 -0.016035 0.188965 0.0775657 0.0016610 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 29 39731 -0.016434 0.188866 0.0785638 0.0015280 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 30 39732 -0.016934 0.188866 0.0796720 0.0014480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 8 31 39733 -0.017334 0.188766 0.0808221 0.0014490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 1 39734 -0.017834 0.188666 0.0819303 0.0015440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 2 39735 -0.018333 0.188567 0.0828874 0.0017490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 3 39736 -0.018833 0.188567 0.0835826 0.0020500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 4 39737 -0.019433 0.188467 0.0839707 0.0023720 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 5 39738 -0.019933 0.188367 0.0840619 0.0026180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 6 39739 -0.020532 0.188368 0.0839531 0.0027300 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 7 39740 -0.021032 0.188268 0.0838422 0.0026530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 8 39741 -0.021632 0.188268 0.0838804 0.0024390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 9 39742 -0.022131 0.188169 0.0841855 0.0021350 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 10 39743 -0.022731 0.188169 0.0847917 0.0018400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 11 39744 -0.023231 0.188069 0.0856698 0.0016200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 12 39745 -0.023731 0.188069 0.0867040 0.0015150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 13 39746 -0.024330 0.187970 0.0877701 0.0015420 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 14 39747 -0.024830 0.187970 0.0887763 0.0016590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 15 39748 -0.025330 0.187870 0.0896104 0.0018500 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 16 39749 -0.025830 0.187870 0.0902486 0.0020730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 17 39750 -0.026329 0.187871 0.0906497 0.0022800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 18 39751 -0.026829 0.187871 0.0908849 0.0024310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 19 39752 -0.027229 0.187871 0.0910000 0.0025170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 20 39753 -0.027728 0.187872 0.0910662 0.0025210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 21 39754 -0.028128 0.187872 0.0911623 0.0024680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 22 39755 -0.028528 0.187872 0.0913385 0.0023530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 23 39756 -0.028928 0.187872 0.0916567 0.0021980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 24 39757 -0.029327 0.187973 0.0921248 0.0020490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 25 39758 -0.029627 0.187973 0.0927310 0.0019140 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 26 39759 -0.030027 0.188073 0.0934601 0.0018160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 27 39760 -0.030327 0.188173 0.0942563 0.0017970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 28 39761 -0.030626 0.188274 0.0950264 0.0018590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 29 39762 -0.030826 0.188374 0.0956836 0.0020260 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 9 30 39763 -0.031126 0.188574 0.0961217 0.0023030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 1 39764 -0.031325 0.188675 0.0962479 0.0026200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 2 39765 -0.031625 0.188875 0.0960670 0.0029220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 3 39766 -0.031825 0.189075 0.0956192 0.0031400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 4 39767 -0.031925 0.189275 0.0950464 0.0031740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 5 39768 -0.032124 0.189576 0.0945255 0.0030180 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 6 39769 -0.032224 0.189776 0.0942277 0.0027310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 7 39770 -0.032324 0.190076 0.0942608 0.0023940 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 8 39771 -0.032424 0.190376 0.0946140 0.0021060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 9 39772 -0.032523 0.190677 0.0952001 0.0019340 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 10 39773 -0.032623 0.191077 0.0958803 0.0019090 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 11 39774 -0.032623 0.191377 0.0965224 0.0020030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 12 39775 -0.032722 0.191778 0.0970296 0.0021810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 13 39776 -0.032722 0.192178 0.0973408 0.0023790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 14 39777 -0.032722 0.192578 0.0974549 0.0025680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 15 39778 -0.032722 0.192978 0.0973971 0.0027290 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 16 39779 -0.032721 0.193379 0.0972062 0.0028320 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 17 39780 -0.032621 0.193779 0.0969464 0.0028670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 18 39781 -0.032621 0.194279 0.0966865 0.0028230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 19 39782 -0.032621 0.194679 0.0965007 0.0027210 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 20 39783 -0.032520 0.195180 0.0964388 0.0025800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 21 39784 -0.032520 0.195580 0.0965260 0.0024360 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 22 39785 -0.032420 0.196080 0.0967612 0.0022990 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 23 39786 -0.032319 0.196581 0.0971153 0.0021930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 24 39787 -0.032219 0.196981 0.0975345 0.0021510 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 25 39788 -0.032119 0.197481 0.0979766 0.0021800 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 26 39789 -0.032119 0.197981 0.0983228 0.0023030 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 27 39790 -0.032018 0.198382 0.0985189 0.0025200 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 28 39791 -0.031918 0.198882 0.0984491 0.0028110 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 29 39792 -0.031718 0.199382 0.0980793 0.0031170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 30 39793 -0.031618 0.199782 0.0974114 0.0033820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 10 31 39794 -0.031517 0.200283 0.0965386 0.0035060 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 1 39795 -0.031417 0.200683 0.0956507 0.0034390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 2 39796 -0.031317 0.201183 0.0948999 0.0032170 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 3 39797 -0.031116 0.201584 0.0944430 0.0028890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 4 39798 -0.031016 0.202084 0.0943142 0.0025570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 5 39799 -0.030816 0.202484 0.0944794 0.0023230 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 6 39800 -0.030716 0.202884 0.0947995 0.0022310 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 7 39801 -0.030615 0.203385 0.0951517 0.0022770 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 8 39802 -0.030415 0.203785 0.0954048 0.0024100 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 9 39803 -0.030315 0.204185 0.0954870 0.0025970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 10 39804 -0.030115 0.204585 0.0953931 0.0027790 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 11 39805 -0.030014 0.204986 0.0951223 0.0029240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 12 39806 -0.029814 0.205486 0.0947435 0.0030050 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 13 39807 -0.029714 0.205886 0.0943146 0.0030220 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 14 39808 -0.029513 0.206287 0.0939008 0.0029740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 15 39809 -0.029413 0.206787 0.0935659 0.0028570 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 16 39810 -0.029313 0.207187 0.0933821 0.0026960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 17 39811 -0.029113 0.207687 0.0933622 0.0025130 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 18 39812 -0.029012 0.208088 0.0935234 0.0023370 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 19 39813 -0.028912 0.208588 0.0938556 0.0021970 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 20 39814 -0.028812 0.209088 0.0943107 0.0020960 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 21 39815 -0.028711 0.209689 0.0948189 0.0020820 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 22 39816 -0.028611 0.210189 0.0952970 0.0021560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 23 39817 -0.028511 0.210689 0.0956492 0.0023240 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 24 39818 -0.028411 0.211289 0.0958164 0.0025520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 25 39819 -0.028410 0.211890 0.0957125 0.0028160 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 26 39820 -0.028310 0.212490 0.0953597 0.0030710 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 27 39821 -0.028310 0.213090 0.0947898 0.0032400 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 28 39822 -0.028310 0.213790 0.0941180 0.0032670 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 29 39823 -0.028209 0.214391 0.0934922 0.0031380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 11 30 39824 -0.028209 0.215091 0.0930673 0.0028750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 1 39825 -0.028209 0.215791 0.0929415 0.0025560 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 2 39826 -0.028308 0.216492 0.0931206 0.0022890 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 3 39827 -0.028308 0.217292 0.0935128 0.0021410 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 4 39828 -0.028308 0.217992 0.0939810 0.0021380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 5 39829 -0.028408 0.218792 0.0943771 0.0022680 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 6 39830 -0.028407 0.219493 0.0946043 0.0024750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 7 39831 -0.028507 0.220293 0.0946154 0.0026690 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 8 39832 -0.028607 0.221093 0.0944476 0.0028380 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 9 39833 -0.028607 0.221893 0.0941488 0.0029490 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 10 39834 -0.028706 0.222694 0.0937729 0.0029930 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 11 39835 -0.028806 0.223494 0.0933641 0.0029730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 12 39836 -0.028806 0.224294 0.0930262 0.0028850 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 13 39837 -0.028905 0.225095 0.0927994 0.0027520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 14 39838 -0.029005 0.225895 0.0927206 0.0025840 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 15 39839 -0.029005 0.226695 0.0928127 0.0024150 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 16 39840 -0.029105 0.227495 0.0930519 0.0022730 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 17 39841 -0.029104 0.228296 0.0934290 0.0021750 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 18 39842 -0.029104 0.228996 0.0938572 0.0021530 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 19 39843 -0.029104 0.229796 0.0942744 0.0022070 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 20 39844 -0.029104 0.230496 0.0945935 0.0023480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 21 39845 -0.029103 0.231197 0.0947477 0.0025450 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 22 39846 -0.029003 0.231797 0.0946838 0.0027740 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 23 39847 -0.028903 0.232497 0.0943850 0.0029980 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 24 39848 -0.028802 0.233098 0.0939012 0.0031440 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 25 39849 -0.028702 0.233698 0.0933153 0.0031870 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 26 39850 -0.028602 0.234298 0.0927645 0.0030810 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 27 39851 -0.028402 0.234798 0.0923866 0.0028480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 28 39852 -0.028201 0.235399 0.0922758 0.0025480 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 29 39853 -0.028001 0.235899 0.0924700 0.0022520 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 30 39854 -0.027701 0.236299 0.0929241 0.0020390 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1967 12 31 39855 -0.027401 0.236799 0.0935273 0.0019590 0.000000 0.000000 0.030000 0.030000 0.0020000 0.0014000 0.004774 0.002000 1968 1 1 39856 -0.027100 0.237200 0.0941515 0.0020150 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 2 39857 -0.026700 0.237500 0.0946476 0.0021840 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 3 39858 -0.026400 0.237900 0.0949628 0.0023760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 4 39859 -0.025999 0.238201 0.0950949 0.0025520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 5 39860 -0.025599 0.238501 0.0950691 0.0026680 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 6 39861 -0.025099 0.238801 0.0949553 0.0027190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 7 39862 -0.024699 0.239101 0.0948464 0.0026870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 8 39863 -0.024198 0.239302 0.0947816 0.0026040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 9 39864 -0.023698 0.239502 0.0948348 0.0024730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 10 39865 -0.023198 0.239702 0.0950239 0.0023250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 11 39866 -0.022698 0.239902 0.0953661 0.0021630 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 12 39867 -0.022197 0.240103 0.0958722 0.0020220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 13 39868 -0.021697 0.240203 0.0964974 0.0019270 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 14 39869 -0.021197 0.240403 0.0971836 0.0018940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 15 39870 -0.020696 0.240504 0.0978607 0.0019590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 16 39871 -0.020196 0.240604 0.0984259 0.0021060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 17 39872 -0.019696 0.240704 0.0987931 0.0023400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 18 39873 -0.019196 0.240804 0.0989212 0.0026040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 19 39874 -0.018695 0.240905 0.0987694 0.0028540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 20 39875 -0.018195 0.241005 0.0984085 0.0030330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 21 39876 -0.017695 0.241105 0.0979227 0.0031070 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 22 39877 -0.017095 0.241205 0.0974289 0.0030500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 23 39878 -0.016594 0.241206 0.0970530 0.0028740 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 24 39879 -0.016094 0.241306 0.0968972 0.0026230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 25 39880 -0.015594 0.241406 0.0970014 0.0023630 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 26 39881 -0.015093 0.241407 0.0973405 0.0021630 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 27 39882 -0.014593 0.241507 0.0978167 0.0020880 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 28 39883 -0.014093 0.241507 0.0983108 0.0021350 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 29 39884 -0.013493 0.241607 0.0986910 0.0023030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 30 39885 -0.012992 0.241608 0.0988772 0.0025290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 1 31 39886 -0.012392 0.241608 0.0988233 0.0027440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 1 39887 -0.011792 0.241708 -0.0014225 0.0029160 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 2 39888 -0.011192 0.241708 -0.0018033 0.0030110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 3 39889 -0.010591 0.241709 -0.0022262 0.0030220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 4 39890 -0.009991 0.241709 -0.0026420 0.0029700 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 5 39891 -0.009291 0.241709 -0.0029578 0.0028430 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 6 39892 -0.008590 0.241710 -0.0031467 0.0026920 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 7 39893 -0.007890 0.241710 -0.0031575 0.0025320 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 8 39894 -0.007190 0.241610 -0.0030163 0.0023790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 9 39895 -0.006390 0.241610 -0.0027592 0.0022770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 10 39896 -0.005689 0.241611 -0.0024110 0.0022300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 11 39897 -0.004889 0.241511 -0.0020569 0.0022560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 12 39898 -0.004089 0.241411 -0.0017757 0.0023790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 13 39899 -0.003288 0.241412 -0.0016645 0.0025930 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 14 39900 -0.002388 0.241312 -0.0017924 0.0028600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 15 39901 -0.001588 0.241212 -0.0021962 0.0031330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 16 39902 -0.000688 0.241112 -0.0028470 0.0033340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 17 39903 0.000213 0.241013 -0.0036529 0.0034230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 18 39904 0.001113 0.240913 -0.0044537 0.0033420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 19 39905 0.002013 0.240713 -0.0050915 0.0031250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 20 39906 0.002913 0.240613 -0.0054834 0.0028210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 21 39907 0.003814 0.240414 -0.0055592 0.0025130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 22 39908 0.004814 0.240314 -0.0053390 0.0022600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 23 39909 0.005714 0.240114 -0.0049259 0.0021040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 24 39910 0.006615 0.240015 -0.0044087 0.0020850 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 25 39911 0.007615 0.239815 -0.0039445 0.0021820 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 26 39912 0.008515 0.239615 -0.0036184 0.0023640 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 27 39913 0.009515 0.239415 -0.0034892 0.0025580 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 28 39914 0.010416 0.239216 -0.0035430 0.0027310 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 2 29 39915 0.011416 0.239016 -0.0037469 0.0028440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 1 39916 0.012316 0.238816 -0.0040207 0.0028610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 2 39917 0.013216 0.238616 -0.0042696 0.0028040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 3 39918 0.014117 0.238417 -0.0044264 0.0026800 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 4 39919 0.015017 0.238217 -0.0044352 0.0025220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 5 39920 0.015817 0.238017 -0.0042841 0.0023450 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 6 39921 0.016718 0.237818 -0.0039489 0.0021790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 7 39922 0.017518 0.237618 -0.0034637 0.0020390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 8 39923 0.018318 0.237418 -0.0028656 0.0019660 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 9 39924 0.019018 0.237218 -0.0022314 0.0019710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 10 39925 0.019819 0.237019 -0.0016472 0.0020660 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 11 39926 0.020519 0.236919 -0.0012061 0.0022480 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 12 39927 0.021119 0.236719 -0.0009909 0.0025140 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 13 39928 0.021819 0.236619 -0.0010667 0.0028200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 14 39929 0.022420 0.236420 -0.0014516 0.0031000 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 15 39930 0.023020 0.236320 -0.0020604 0.0032750 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 16 39931 0.023520 0.236120 -0.0027572 0.0032900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 17 39932 0.024121 0.236021 -0.0033931 0.0031370 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 18 39933 0.024621 0.235921 -0.0037979 0.0028590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 19 39934 0.025021 0.235821 -0.0039067 0.0025290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 20 39935 0.025521 0.235721 -0.0036916 0.0022430 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 21 39936 0.026022 0.235622 -0.0032494 0.0020740 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 22 39937 0.026422 0.235522 -0.0027042 0.0020490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 23 39938 0.026822 0.235422 -0.0021971 0.0021350 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 24 39939 0.027322 0.235422 -0.0018229 0.0023060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 25 39940 0.027723 0.235323 -0.0016397 0.0025200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 26 39941 0.028123 0.235223 -0.0016676 0.0027200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 27 39942 0.028523 0.235223 -0.0018824 0.0028770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 28 39943 0.029024 0.235124 -0.0022052 0.0029550 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 29 39944 0.029424 0.235024 -0.0025841 0.0029600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 30 39945 0.029924 0.235024 -0.0029299 0.0029000 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 3 31 39946 0.030424 0.234924 -0.0031747 0.0027730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 1 39947 0.030925 0.234825 -0.0032865 0.0026280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 2 39948 0.031425 0.234825 -0.0032504 0.0024830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 3 39949 0.032025 0.234725 -0.0030822 0.0023870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 4 39950 0.032525 0.234625 -0.0028610 0.0023430 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 5 39951 0.033226 0.234526 -0.0026099 0.0023590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 6 39952 0.033826 0.234426 -0.0024157 0.0024470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 7 39953 0.034426 0.234326 -0.0023445 0.0026260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 8 39954 0.035127 0.234227 -0.0025064 0.0028930 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 9 39955 0.035827 0.234127 -0.0029812 0.0032340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 10 39956 0.036627 0.234027 -0.0037900 0.0035600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 11 39957 0.037327 0.233827 -0.0048909 0.0038260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 12 39958 0.038128 0.233728 -0.0062057 0.0039370 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 13 39959 0.038928 0.233528 -0.0075355 0.0038710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 14 39960 0.039828 0.233328 -0.0087034 0.0036310 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 15 39961 0.040628 0.233128 -0.0095752 0.0032960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 16 39962 0.041429 0.232829 -0.0101060 0.0029570 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 17 39963 0.042329 0.232629 -0.0103409 0.0027120 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 18 39964 0.043129 0.232329 -0.0103977 0.0026080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 19 39965 0.044030 0.232030 -0.0104135 0.0026230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 20 39966 0.044830 0.231730 -0.0105074 0.0027560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 21 39967 0.045730 0.231330 -0.0107502 0.0029220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 22 39968 0.046530 0.231030 -0.0111580 0.0030800 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 23 39969 0.047331 0.230631 -0.0117028 0.0031910 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 24 39970 0.048131 0.230231 -0.0123257 0.0032230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 25 39971 0.048931 0.229831 -0.0129435 0.0031890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 26 39972 0.049731 0.229331 -0.0134983 0.0030900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 27 39973 0.050432 0.228832 -0.0139132 0.0029210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 28 39974 0.051132 0.228432 -0.0141370 0.0027140 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 29 39975 0.051832 0.227832 -0.0141558 0.0024970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 4 30 39976 0.052433 0.227333 -0.0139667 0.0023100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 1 39977 0.053033 0.226833 -0.0136115 0.0021690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 2 39978 0.053633 0.226233 -0.0131363 0.0020940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 3 39979 0.054133 0.225633 -0.0126342 0.0021060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 4 39980 0.054634 0.225034 -0.0121850 0.0021900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 5 39981 0.055034 0.224434 -0.0118608 0.0023640 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 6 39982 0.055534 0.223734 -0.0117456 0.0026050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 7 39983 0.055835 0.223135 -0.0118935 0.0028730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 8 39984 0.056235 0.222435 -0.0123163 0.0031320 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 9 39985 0.056535 0.221735 -0.0129491 0.0033130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 10 39986 0.056735 0.221035 -0.0136920 0.0033350 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 11 39987 0.057036 0.220336 -0.0143798 0.0031840 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 12 39988 0.057236 0.219636 -0.0148336 0.0028970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 13 39989 0.057336 0.218836 -0.0149765 0.0025690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 14 39990 0.057536 0.218036 -0.0147993 0.0022850 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 15 39991 0.057637 0.217337 -0.0144191 0.0021410 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 16 39992 0.057737 0.216537 -0.0139539 0.0021530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 17 39993 0.057837 0.215737 -0.0135778 0.0022890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 18 39994 0.057938 0.214938 -0.0133726 0.0024970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 19 39995 0.057938 0.214138 -0.0133794 0.0026930 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 20 39996 0.058038 0.213338 -0.0135613 0.0028410 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 21 39997 0.058038 0.212438 -0.0138671 0.0029280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 22 39998 0.058039 0.211639 -0.0142019 0.0029300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 23 39999 0.058039 0.210839 -0.0145128 0.0028610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 24 40000 0.058039 0.209939 -0.0147136 0.0027330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 25 40001 0.058039 0.209139 -0.0147744 0.0025650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 26 40002 0.058140 0.208240 -0.0146472 0.0023700 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 27 40003 0.058140 0.207440 -0.0143371 0.0021960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 28 40004 0.058140 0.206540 -0.0138719 0.0020620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 29 40005 0.058141 0.205641 -0.0133027 0.0019900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 30 40006 0.058141 0.204741 -0.0126886 0.0019840 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 5 31 40007 0.058141 0.203941 -0.0121074 0.0020580 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 1 40008 0.058241 0.203041 -0.0116382 0.0021960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 2 40009 0.058242 0.202142 -0.0113490 0.0024040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 3 40010 0.058342 0.201242 -0.0112679 0.0026380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 4 40011 0.058442 0.200342 -0.0114247 0.0028600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 5 40012 0.058542 0.199442 -0.0117895 0.0030370 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 6 40013 0.058643 0.198543 -0.0122824 0.0031050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 7 40014 0.058843 0.197643 -0.0127712 0.0030160 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 8 40015 0.058943 0.196643 -0.0130850 0.0027830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 9 40016 0.059144 0.195744 -0.0131259 0.0024600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 10 40017 0.059344 0.194844 -0.0128247 0.0021390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 11 40018 0.059544 0.193844 -0.0122455 0.0019140 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 12 40019 0.059744 0.192944 -0.0115133 0.0018390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 13 40020 0.059945 0.191945 -0.0107832 0.0019030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 14 40021 0.060245 0.191045 -0.0101800 0.0020610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 15 40022 0.060545 0.190045 -0.0097428 0.0022400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 16 40023 0.060745 0.189045 -0.0094656 0.0023760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 17 40024 0.061046 0.188046 -0.0092765 0.0024120 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 18 40025 0.061346 0.187046 -0.0090803 0.0023720 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 19 40026 0.061646 0.186146 -0.0087931 0.0022550 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 20 40027 0.061947 0.185147 -0.0083790 0.0020780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 21 40028 0.062347 0.184147 -0.0077568 0.0018720 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 22 40029 0.062647 0.183147 -0.0069256 0.0016360 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 23 40030 0.062947 0.182147 -0.0058404 0.0014080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 24 40031 0.063248 0.181148 -0.0045613 0.0012220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 25 40032 0.063548 0.180148 -0.0031241 0.0011040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 26 40033 0.063848 0.179148 -0.0016039 0.0010600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 27 40034 0.064148 0.178148 -0.0000808 0.0010980 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 28 40035 0.064449 0.177149 0.0013544 0.0012230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 29 40036 0.064749 0.176149 0.0026326 0.0014190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 6 30 40037 0.065049 0.175249 0.0036958 0.0016480 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 1 40038 0.065350 0.174250 0.0045179 0.0018820 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 2 40039 0.065550 0.173250 0.0051271 0.0020890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 3 40040 0.065750 0.172350 0.0055513 0.0022060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 4 40041 0.065950 0.171350 0.0059264 0.0022020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 5 40042 0.066151 0.170451 0.0063796 0.0020720 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 6 40043 0.066351 0.169551 0.0070058 0.0018450 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 7 40044 0.066451 0.168651 0.0078710 0.0016080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 8 40045 0.066551 0.167751 0.0089611 0.0014170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 9 40046 0.066552 0.166852 0.0101843 0.0013410 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 10 40047 0.066652 0.166052 0.0114085 0.0014270 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 11 40048 0.066652 0.165152 0.0124797 0.0016270 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 12 40049 0.066553 0.164353 0.0133158 0.0018930 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 13 40050 0.066453 0.163553 0.0138810 0.0021390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 14 40051 0.066353 0.162653 0.0142552 0.0022870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 15 40052 0.066153 0.161853 0.0145203 0.0023470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 16 40053 0.065954 0.161154 0.0147735 0.0023020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 17 40054 0.065754 0.160354 0.0151087 0.0021870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 18 40055 0.065454 0.159554 0.0155949 0.0020260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 19 40056 0.065154 0.158854 0.0162550 0.0018340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 20 40057 0.064755 0.158155 0.0171062 0.0016570 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 21 40058 0.064355 0.157455 0.0181214 0.0014990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 22 40059 0.063855 0.156755 0.0192716 0.0013830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 23 40060 0.063356 0.156056 0.0205017 0.0013490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 24 40061 0.062856 0.155356 0.0217359 0.0013970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 25 40062 0.062256 0.154656 0.0228701 0.0015290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 26 40063 0.061656 0.154056 0.0238362 0.0017400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 27 40064 0.060957 0.153457 0.0245664 0.0019830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 28 40065 0.060257 0.152757 0.0250416 0.0022340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 29 40066 0.059557 0.152157 0.0252848 0.0024470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 30 40067 0.058758 0.151658 0.0253689 0.0025670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 7 31 40068 0.057958 0.151058 0.0253821 0.0025690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 1 40069 0.057158 0.150458 0.0254523 0.0024710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 2 40070 0.056258 0.149958 0.0256595 0.0022730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 3 40071 0.055359 0.149459 0.0260886 0.0020500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 4 40072 0.054359 0.148959 0.0267398 0.0018500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 5 40073 0.053459 0.148459 0.0275450 0.0017500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 6 40074 0.052459 0.148059 0.0283722 0.0018100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 7 40075 0.051360 0.147560 0.0290713 0.0019930 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 8 40076 0.050360 0.147160 0.0295375 0.0022520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 9 40077 0.049260 0.146760 0.0297417 0.0025260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 10 40078 0.048161 0.146361 0.0296949 0.0027340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 11 40079 0.047061 0.145961 0.0294870 0.0028440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 12 40080 0.045961 0.145561 0.0292232 0.0028460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 13 40081 0.044761 0.145161 0.0290154 0.0027370 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 14 40082 0.043662 0.144762 0.0289505 0.0025660 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 15 40083 0.042462 0.144362 0.0290727 0.0023670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 16 40084 0.041262 0.144062 0.0294079 0.0021460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 17 40085 0.040062 0.143662 0.0299611 0.0019520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 18 40086 0.038863 0.143263 0.0306762 0.0018080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 19 40087 0.037563 0.142963 0.0315034 0.0017300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 20 40088 0.036363 0.142563 0.0323686 0.0017340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 21 40089 0.035164 0.142164 0.0331888 0.0018120 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 22 40090 0.033864 0.141764 0.0339089 0.0019690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 23 40091 0.032664 0.141464 0.0344211 0.0021940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 24 40092 0.031364 0.141064 0.0346953 0.0024370 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 25 40093 0.030165 0.140665 0.0347405 0.0026530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 26 40094 0.028865 0.140265 0.0346006 0.0027870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 27 40095 0.027665 0.139865 0.0343998 0.0027820 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 28 40096 0.026465 0.139465 0.0342630 0.0026510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 29 40097 0.025166 0.138966 0.0343132 0.0024170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 30 40098 0.023966 0.138566 0.0346233 0.0021510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 8 31 40099 0.022766 0.138066 0.0351925 0.0019130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 1 40100 0.021567 0.137667 0.0359377 0.0017750 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 2 40101 0.020367 0.137167 0.0367779 0.0017670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 3 40102 0.019167 0.136667 0.0375590 0.0018810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 4 40103 0.017967 0.136167 0.0381532 0.0021050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 5 40104 0.016768 0.135568 0.0385064 0.0023790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 6 40105 0.015568 0.135068 0.0385926 0.0026280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 7 40106 0.014468 0.134468 0.0384677 0.0027870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 8 40107 0.013268 0.133868 0.0382349 0.0028490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 9 40108 0.012169 0.133269 0.0379941 0.0027970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 10 40109 0.010969 0.132669 0.0378483 0.0026750 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 11 40110 0.009869 0.132069 0.0378504 0.0025060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 12 40111 0.008770 0.131370 0.0380306 0.0023150 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 13 40112 0.007670 0.130670 0.0383948 0.0021440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 14 40113 0.006570 0.130070 0.0389090 0.0020170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 15 40114 0.005470 0.129370 0.0395181 0.0019560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 16 40115 0.004371 0.128571 0.0401613 0.0019710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 17 40116 0.003271 0.127871 0.0407385 0.0020600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 18 40117 0.002271 0.127171 0.0411947 0.0022300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 19 40118 0.001171 0.126371 0.0414458 0.0024690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 20 40119 0.000072 0.125672 0.0414340 0.0027380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 21 40120 -0.000928 0.124872 0.0411522 0.0030100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 22 40121 -0.002028 0.124072 0.0406274 0.0032030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 23 40122 -0.003127 0.123373 0.0399685 0.0032710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 24 40123 -0.004227 0.122573 0.0393177 0.0031840 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 25 40124 -0.005327 0.121773 0.0388259 0.0029620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 26 40125 -0.006427 0.121073 0.0386081 0.0026570 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 27 40126 -0.007526 0.120274 0.0386992 0.0023710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 28 40127 -0.008626 0.119474 0.0390384 0.0021610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 29 40128 -0.009826 0.118774 0.0395126 0.0020940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 9 30 40129 -0.011026 0.118074 0.0399848 0.0021540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 1 40130 -0.012225 0.117375 0.0403399 0.0023290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 2 40131 -0.013425 0.116675 0.0404981 0.0025480 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 3 40132 -0.014725 0.115975 0.0404273 0.0027700 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 4 40133 -0.016024 0.115376 0.0401595 0.0029330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 5 40134 -0.017324 0.114776 0.0397826 0.0029940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 6 40135 -0.018724 0.114176 0.0393958 0.0029540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 7 40136 -0.020124 0.113676 0.0390960 0.0028340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 8 40137 -0.021623 0.113177 0.0389392 0.0026520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 9 40138 -0.023123 0.112677 0.0389814 0.0024530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 10 40139 -0.024723 0.112277 0.0392125 0.0022600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 11 40140 -0.026323 0.111977 0.0396297 0.0021140 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 12 40141 -0.027922 0.111678 0.0401649 0.0020180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 13 40142 -0.029622 0.111478 0.0407501 0.0020060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 14 40143 -0.031422 0.111278 0.0413162 0.0020650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 15 40144 -0.033221 0.111079 0.0417744 0.0022220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 16 40145 -0.035021 0.111079 0.0420386 0.0024400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 17 40146 -0.037021 0.111079 0.0420568 0.0027110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 18 40147 -0.038921 0.111179 0.0417899 0.0030010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 19 40148 -0.040920 0.111280 0.0412451 0.0032490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 20 40149 -0.043020 0.111480 0.0404953 0.0034110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 21 40150 -0.045120 0.111680 0.0396525 0.0034280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 22 40151 -0.047319 0.112081 0.0388836 0.0032770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 23 40152 -0.049519 0.112381 0.0383288 0.0030080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 24 40153 -0.051719 0.112881 0.0380690 0.0027050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 25 40154 -0.054019 0.113381 0.0380882 0.0024540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 26 40155 -0.056418 0.113982 0.0382883 0.0023420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 27 40156 -0.058818 0.114582 0.0385425 0.0023720 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 28 40157 -0.061218 0.115282 0.0386927 0.0025240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 29 40158 -0.063618 0.116082 0.0386629 0.0027310 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 30 40159 -0.066117 0.116883 0.0384110 0.0029390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 10 31 40160 -0.068617 0.117783 0.0379732 0.0030950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 1 40161 -0.071217 0.118683 0.0374284 0.0031800 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 2 40162 -0.073716 0.119684 0.0368446 0.0031630 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 3 40163 -0.076316 0.120684 0.0363128 0.0030700 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 4 40164 -0.078816 0.121784 0.0359079 0.0029110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 5 40165 -0.081416 0.122884 0.0356931 0.0027140 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 6 40166 -0.083915 0.124085 0.0356823 0.0025110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 7 40167 -0.086515 0.125285 0.0358535 0.0023340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 8 40168 -0.089015 0.126585 0.0361676 0.0022180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 9 40169 -0.091515 0.127885 0.0365838 0.0021730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 10 40170 -0.094014 0.129186 0.0369760 0.0022160 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 11 40171 -0.096514 0.130586 0.0373162 0.0023150 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 12 40172 -0.098914 0.131986 0.0375123 0.0024920 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 13 40173 -0.101313 0.133387 0.0375045 0.0027120 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 14 40174 -0.103713 0.134887 0.0372597 0.0029610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 15 40175 -0.105913 0.136287 0.0367649 0.0032030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 16 40176 -0.108213 0.137887 0.0360521 0.0033890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 17 40177 -0.110312 0.139388 0.0352052 0.0034630 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 18 40178 -0.112412 0.140888 0.0343574 0.0033890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 19 40179 -0.114412 0.142488 0.0336656 0.0031650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 20 40180 -0.116412 0.144088 0.0332448 0.0028590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 21 40181 -0.118211 0.145689 0.0331229 0.0025650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 22 40182 -0.120011 0.147289 0.0332601 0.0023760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 23 40183 -0.121711 0.148989 0.0334993 0.0023420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 24 40184 -0.123310 0.150590 0.0336955 0.0024570 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 25 40185 -0.124810 0.152290 0.0337256 0.0026620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 26 40186 -0.126210 0.153990 0.0335478 0.0028800 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 27 40187 -0.127510 0.155690 0.0331730 0.0030470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 28 40188 -0.128709 0.157291 0.0326722 0.0031180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 29 40189 -0.129909 0.158991 0.0321494 0.0031040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 11 30 40190 -0.130909 0.160791 0.0316815 0.0029980 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 1 40191 -0.131809 0.162491 0.0313547 0.0028290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 2 40192 -0.132708 0.164192 0.0312179 0.0026310 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 3 40193 -0.133408 0.165892 0.0312861 0.0024230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 4 40194 -0.134108 0.167592 0.0315562 0.0022210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 5 40195 -0.134707 0.169293 0.0319994 0.0020730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 6 40196 -0.135207 0.171093 0.0325686 0.0019900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 7 40197 -0.135607 0.172793 0.0331848 0.0019830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 8 40198 -0.136007 0.174493 0.0337679 0.0020620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 9 40199 -0.136306 0.176194 0.0342271 0.0021990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 10 40200 -0.136506 0.177894 0.0345243 0.0023950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 11 40201 -0.136606 0.179594 0.0346085 0.0026180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 12 40202 -0.136706 0.181294 0.0344687 0.0028410 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 13 40203 -0.136805 0.182995 0.0341198 0.0030260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 14 40204 -0.136705 0.184695 0.0336230 0.0031430 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 15 40205 -0.136705 0.186395 0.0330542 0.0031420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 16 40206 -0.136504 0.187996 0.0325624 0.0030010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 17 40207 -0.136404 0.189696 0.0322675 0.0027570 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 18 40208 -0.136204 0.191396 0.0322407 0.0024800 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 19 40209 -0.135904 0.193096 0.0324689 0.0022620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 20 40210 -0.135603 0.194697 0.0328601 0.0021820 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 21 40211 -0.135303 0.196397 0.0332503 0.0022520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 22 40212 -0.134903 0.197997 0.0334924 0.0024490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 23 40213 -0.134503 0.199697 0.0335086 0.0026910 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 24 40214 -0.134102 0.201298 0.0333038 0.0028970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 25 40215 -0.133702 0.202998 0.0329360 0.0029990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 26 40216 -0.133202 0.204598 0.0325241 0.0029990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 27 40217 -0.132701 0.206199 0.0321613 0.0029010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 28 40218 -0.132201 0.207899 0.0319345 0.0027250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 29 40219 -0.131601 0.209499 0.0318957 0.0025210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 30 40220 -0.131101 0.211199 0.0320869 0.0022970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1968 12 31 40221 -0.130500 0.212800 0.0324860 0.0020990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 1 40222 -0.129900 0.214400 0.0330652 0.0019400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 2 40223 -0.129300 0.216100 0.0337654 0.0018510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 3 40224 -0.128700 0.217700 0.0345286 0.0018370 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 4 40225 -0.127999 0.219401 0.0352557 0.0019010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 5 40226 -0.127399 0.221001 0.0358829 0.0020360 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 6 40227 -0.126699 0.222701 0.0363471 0.0022230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 7 40228 -0.125998 0.224302 0.0366083 0.0024370 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 8 40229 -0.125298 0.226002 0.0366545 0.0026480 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 9 40230 -0.124598 0.227602 0.0365046 0.0028320 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 10 40231 -0.123898 0.229302 0.0362138 0.0029370 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 11 40232 -0.123197 0.231003 0.0358550 0.0029440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 12 40233 -0.122497 0.232603 0.0355522 0.0028410 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 13 40234 -0.121797 0.234303 0.0353953 0.0026400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 14 40235 -0.121097 0.236003 0.0354795 0.0023790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 15 40236 -0.120396 0.237704 0.0358107 0.0021510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 16 40237 -0.119696 0.239404 0.0363129 0.0020350 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 17 40238 -0.118996 0.241204 0.0368781 0.0020620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 18 40239 -0.118295 0.242905 0.0373302 0.0022360 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 19 40240 -0.117595 0.244605 0.0375574 0.0025090 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 20 40241 -0.116895 0.246405 0.0375016 0.0027730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 21 40242 -0.116195 0.248205 0.0372178 0.0029670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 22 40243 -0.115594 0.250006 0.0368009 0.0030270 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 23 40244 -0.114894 0.251806 0.0363871 0.0029730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 24 40245 -0.114194 0.253606 0.0360863 0.0028170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 25 40246 -0.113593 0.255407 0.0359505 0.0026190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 26 40247 -0.112893 0.257307 0.0360327 0.0024180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 27 40248 -0.112293 0.259107 0.0362998 0.0022330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 28 40249 -0.111693 0.261007 0.0367350 0.0020960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 29 40250 -0.111092 0.262908 0.0372782 0.0020080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 30 40251 -0.110492 0.264808 0.0378744 0.0020030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 1 31 40252 -0.109892 0.266708 0.0384355 0.0020680 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 1 40253 -0.109292 0.268708 0.0388817 0.0022200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 2 40254 -0.108691 0.270609 0.0391549 0.0024330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 3 40255 -0.108191 0.272609 0.0391941 0.0026820 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 4 40256 -0.107591 0.274609 0.0389713 0.0029330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 5 40257 -0.107090 0.276610 0.0385214 0.0031470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 6 40258 -0.106590 0.278610 0.0379026 0.0032770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 7 40259 -0.105990 0.280610 0.0371818 0.0033270 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 8 40260 -0.105490 0.282610 0.0364750 0.0032600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 9 40261 -0.104989 0.284611 0.0358831 0.0030910 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 10 40262 -0.104489 0.286711 0.0355013 0.0028600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 11 40263 -0.103889 0.288711 0.0353405 0.0026480 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 12 40264 -0.103389 0.290711 0.0353697 0.0025030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 13 40265 -0.102888 0.292712 0.0354809 0.0024790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 14 40266 -0.102388 0.294712 0.0355420 0.0026030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 15 40267 -0.101888 0.296712 0.0354172 0.0028430 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 16 40268 -0.101287 0.298713 0.0350214 0.0031280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 17 40269 -0.100787 0.300713 0.0343646 0.0033510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 18 40270 -0.100187 0.302613 0.0335457 0.0034650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 19 40271 -0.099587 0.304513 0.0326709 0.0034520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 20 40272 -0.099086 0.306414 0.0318621 0.0033290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 21 40273 -0.098386 0.308314 0.0312303 0.0031250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 22 40274 -0.097786 0.310114 0.0308025 0.0028990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 23 40275 -0.097086 0.311814 0.0306086 0.0026810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 24 40276 -0.096385 0.313615 0.0306078 0.0025000 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 25 40277 -0.095685 0.315315 0.0307700 0.0023770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 26 40278 -0.094885 0.316915 0.0310112 0.0023360 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 27 40279 -0.094084 0.318516 0.0312624 0.0023750 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 2 28 40280 -0.093284 0.320116 0.0314235 0.0024950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 1 40281 -0.092384 0.321616 0.0314387 0.0026740 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 2 40282 -0.091384 0.323016 0.0312389 0.0029130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 3 40283 -0.090383 0.324417 0.0307881 0.0031690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 4 40284 -0.089383 0.325817 0.0300982 0.0034020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 5 40285 -0.088283 0.327117 0.0291974 0.0035560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 6 40286 -0.087183 0.328417 0.0281916 0.0036150 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 7 40287 -0.085982 0.329618 0.0271978 0.0035430 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 8 40288 -0.084682 0.330718 0.0263220 0.0033740 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 9 40289 -0.083382 0.331918 0.0256601 0.0031340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 10 40290 -0.082081 0.332919 0.0252343 0.0028940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 11 40291 -0.080681 0.334019 0.0250295 0.0027220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 12 40292 -0.079181 0.335019 0.0249317 0.0026770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 13 40293 -0.077681 0.335919 0.0248188 0.0027620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 14 40294 -0.076180 0.336820 0.0245570 0.0029690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 15 40295 -0.074480 0.337720 0.0240482 0.0032470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 16 40296 -0.072880 0.338520 0.0232564 0.0035210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 17 40297 -0.071180 0.339320 0.0222216 0.0037200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 18 40298 -0.069379 0.340121 0.0210377 0.0037960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 19 40299 -0.067579 0.340821 0.0198639 0.0037420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 20 40300 -0.065779 0.341521 0.0187901 0.0035730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 21 40301 -0.063878 0.342222 0.0179083 0.0033540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 22 40302 -0.061878 0.342822 0.0172654 0.0031130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 23 40303 -0.059878 0.343422 0.0168526 0.0029090 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 24 40304 -0.057878 0.344022 0.0166198 0.0027490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 25 40305 -0.055877 0.344623 0.0165130 0.0026590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 26 40306 -0.053777 0.345223 0.0164552 0.0026500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 27 40307 -0.051677 0.345723 0.0163663 0.0027210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 28 40308 -0.049577 0.346323 0.0161695 0.0028650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 29 40309 -0.047376 0.346824 0.0157977 0.0030780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 30 40310 -0.045176 0.347324 0.0151939 0.0033130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 3 31 40311 -0.042976 0.347824 0.0143611 0.0035380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 1 40312 -0.040775 0.348225 0.0133142 0.0037260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 2 40313 -0.038475 0.348725 0.0121214 0.0038200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 3 40314 -0.036275 0.349225 0.0109066 0.0037780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 4 40315 -0.033975 0.349625 0.0097898 0.0036070 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 5 40316 -0.031674 0.350126 0.0088929 0.0033560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 6 40317 -0.029374 0.350526 0.0082751 0.0030720 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 7 40318 -0.027074 0.350926 0.0079103 0.0028530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 8 40319 -0.024774 0.351326 0.0077205 0.0027390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 9 40320 -0.022473 0.351727 0.0075757 0.0027640 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 10 40321 -0.020073 0.352127 0.0073298 0.0029240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 11 40322 -0.017773 0.352527 0.0068910 0.0031520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 12 40323 -0.015372 0.352928 0.0062012 0.0034050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 13 40324 -0.012972 0.353228 0.0052784 0.0036080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 14 40325 -0.010672 0.353628 0.0042096 0.0037030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 15 40326 -0.008272 0.353928 0.0030927 0.0036900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 16 40327 -0.005871 0.354229 0.0020569 0.0035570 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 17 40328 -0.003471 0.354529 0.0011851 0.0033560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 18 40329 -0.001071 0.354729 0.0005353 0.0031220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 19 40330 0.001330 0.355030 0.0001184 0.0028970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 20 40331 0.003730 0.355230 -0.0000834 0.0027060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 21 40332 0.006130 0.355330 -0.0001252 0.0025810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 22 40333 0.008530 0.355530 -0.0000800 0.0025240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 23 40334 0.010931 0.355531 -0.0000198 0.0025480 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 24 40335 0.013431 0.355631 -0.0000197 0.0026450 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 25 40336 0.015831 0.355631 -0.0001495 0.0028020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 26 40337 0.018231 0.355531 -0.0004573 0.0030000 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 27 40338 0.020732 0.355432 -0.0009631 0.0032020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 28 40339 0.023132 0.355332 -0.0016630 0.0033720 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 29 40340 0.025632 0.355032 -0.0025048 0.0034760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 4 30 40341 0.028133 0.354833 -0.0033986 0.0034910 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 1 40342 0.030533 0.354433 -0.0042414 0.0033640 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 2 40343 0.033033 0.354033 -0.0049052 0.0031170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 3 40344 0.035433 0.353633 -0.0052861 0.0028200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 4 40345 0.037934 0.353034 -0.0053629 0.0025360 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 5 40346 0.040334 0.352434 -0.0052117 0.0023650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 6 40347 0.042834 0.351834 -0.0049615 0.0023500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 7 40348 0.045234 0.351034 -0.0047684 0.0024640 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 8 40349 0.047635 0.350235 -0.0047392 0.0026780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 9 40350 0.050035 0.349435 -0.0049400 0.0029130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 10 40351 0.052435 0.348535 -0.0053588 0.0031030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 11 40352 0.054836 0.347536 -0.0059266 0.0032060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 12 40353 0.057236 0.346436 -0.0065535 0.0032010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 13 40354 0.059636 0.345436 -0.0071243 0.0031050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 14 40355 0.061936 0.344236 -0.0075461 0.0029300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 15 40356 0.064237 0.343037 -0.0077799 0.0027130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 16 40357 0.066537 0.341737 -0.0077897 0.0024900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 17 40358 0.068837 0.340537 -0.0075996 0.0023080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 18 40359 0.071037 0.339137 -0.0072444 0.0021840 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 19 40360 0.073238 0.337738 -0.0068122 0.0021450 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 20 40361 0.075438 0.336338 -0.0063710 0.0021760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 21 40362 0.077638 0.334838 -0.0059979 0.0022810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 22 40363 0.079739 0.333439 -0.0057627 0.0024460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 23 40364 0.081839 0.331839 -0.0057145 0.0026530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 24 40365 0.083939 0.330339 -0.0058833 0.0028770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 25 40366 0.086039 0.328739 -0.0062751 0.0030830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 26 40367 0.088040 0.327140 -0.0068650 0.0032560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 27 40368 0.089940 0.325540 -0.0075708 0.0033390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 28 40369 0.091940 0.323840 -0.0083146 0.0033080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 29 40370 0.093840 0.322240 -0.0089654 0.0031550 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 30 40371 0.095741 0.320541 -0.0094123 0.0028990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 5 31 40372 0.097541 0.318841 -0.0095871 0.0026240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 1 40373 0.099341 0.317141 -0.0095029 0.0024180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 2 40374 0.101142 0.315442 -0.0092787 0.0023410 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 3 40375 0.102842 0.313742 -0.0090475 0.0024210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 4 40376 0.104542 0.312042 -0.0089704 0.0026110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 5 40377 0.106142 0.310342 -0.0091022 0.0028420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 6 40378 0.107843 0.308643 -0.0094500 0.0030230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 7 40379 0.109343 0.306843 -0.0099348 0.0031080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 8 40380 0.110943 0.305143 -0.0104367 0.0030670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 9 40381 0.112443 0.303343 -0.0108535 0.0029320 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 10 40382 0.113844 0.301644 -0.0110953 0.0027110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 11 40383 0.115344 0.299944 -0.0110921 0.0024590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 12 40384 0.116744 0.298144 -0.0108199 0.0021890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 13 40385 0.118045 0.296445 -0.0102878 0.0019330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 14 40386 0.119345 0.294645 -0.0095226 0.0017470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 15 40387 0.120645 0.292945 -0.0086144 0.0016200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 16 40388 0.121845 0.291145 -0.0076172 0.0015810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 17 40389 0.123046 0.289446 -0.0066121 0.0016090 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 18 40390 0.124146 0.287646 -0.0056759 0.0017100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 19 40391 0.125246 0.285846 -0.0048657 0.0018540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 20 40392 0.126346 0.284146 -0.0042095 0.0020250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 21 40393 0.127347 0.282347 -0.0037223 0.0021880 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 22 40394 0.128347 0.280647 -0.0033922 0.0023160 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 23 40395 0.129347 0.278847 -0.0031430 0.0023830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 24 40396 0.130248 0.277148 -0.0029388 0.0023700 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 25 40397 0.131048 0.275348 -0.0026776 0.0022610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 26 40398 0.131948 0.273648 -0.0022465 0.0020650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 27 40399 0.132748 0.271848 -0.0015993 0.0018180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 28 40400 0.133449 0.270049 -0.0007121 0.0016090 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 29 40401 0.134249 0.268249 0.0003361 0.0014980 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 6 30 40402 0.134949 0.266549 0.0014083 0.0015560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 1 40403 0.135549 0.264749 0.0023554 0.0017630 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 2 40404 0.136150 0.262950 0.0030456 0.0020530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 3 40405 0.136750 0.261150 0.0034328 0.0023310 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 4 40406 0.137350 0.259250 0.0035950 0.0025160 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 5 40407 0.137851 0.257451 0.0036281 0.0025750 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 6 40408 0.138351 0.255551 0.0036773 0.0024960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 7 40409 0.138751 0.253751 0.0038465 0.0023450 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 8 40410 0.139251 0.251851 0.0041927 0.0021380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 9 40411 0.139552 0.249952 0.0047519 0.0019160 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 10 40412 0.139952 0.248052 0.0055220 0.0017300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 11 40413 0.140252 0.246152 0.0064662 0.0015820 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 12 40414 0.140553 0.244153 0.0075264 0.0014890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 13 40415 0.140753 0.242253 0.0086426 0.0014830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 14 40416 0.140953 0.240253 0.0097257 0.0015540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 15 40417 0.141153 0.238253 0.0107009 0.0016840 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 16 40418 0.141254 0.236254 0.0115221 0.0018610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 17 40419 0.141354 0.234154 0.0121533 0.0020590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 18 40420 0.141354 0.232154 0.0125964 0.0022500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 19 40421 0.141454 0.230054 0.0128546 0.0023950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 20 40422 0.141455 0.228055 0.0129968 0.0024900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 21 40423 0.141355 0.225955 0.0130920 0.0024960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 22 40424 0.141355 0.223855 0.0132162 0.0024100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 23 40425 0.141256 0.221656 0.0134713 0.0022380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 24 40426 0.141056 0.219556 0.0139305 0.0020090 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 25 40427 0.140956 0.217456 0.0146347 0.0017790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 26 40428 0.140756 0.215256 0.0155289 0.0016220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 27 40429 0.140557 0.213057 0.0165250 0.0015910 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 28 40430 0.140257 0.210957 0.0174722 0.0017290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 29 40431 0.139957 0.208757 0.0182154 0.0019790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 30 40432 0.139657 0.206557 0.0186826 0.0022760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 7 31 40433 0.139358 0.204358 0.0188738 0.0025020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 1 40434 0.139058 0.202158 0.0189029 0.0025940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 2 40435 0.138658 0.199958 0.0189291 0.0025310 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 3 40436 0.138259 0.197759 0.0190753 0.0023500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 4 40437 0.137859 0.195559 0.0194425 0.0020980 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 5 40438 0.137359 0.193359 0.0200646 0.0018300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 6 40439 0.136859 0.191159 0.0209538 0.0015880 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 7 40440 0.136360 0.188960 0.0220510 0.0014080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 8 40441 0.135860 0.186760 0.0232952 0.0012970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 9 40442 0.135360 0.184560 0.0246133 0.0012710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 10 40443 0.134760 0.182360 0.0259165 0.0013240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 11 40444 0.134161 0.180161 0.0271307 0.0014490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 12 40445 0.133461 0.177961 0.0281809 0.0016390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 13 40446 0.132861 0.175861 0.0290221 0.0018600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 14 40447 0.132162 0.173662 0.0296422 0.0020790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 15 40448 0.131462 0.171562 0.0300554 0.0022760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 16 40449 0.130762 0.169462 0.0303016 0.0024100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 17 40450 0.129962 0.167362 0.0304538 0.0024610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 18 40451 0.129163 0.165263 0.0305899 0.0024200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 19 40452 0.128363 0.163163 0.0308211 0.0022970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 20 40453 0.127463 0.161163 0.0312063 0.0021170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 21 40454 0.126563 0.159063 0.0317695 0.0019390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 22 40455 0.125664 0.157064 0.0324906 0.0018030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 23 40456 0.124764 0.155064 0.0333058 0.0017880 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 24 40457 0.123764 0.153064 0.0340660 0.0019080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 25 40458 0.122765 0.151165 0.0346352 0.0021650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 26 40459 0.121765 0.149265 0.0348893 0.0025020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 27 40460 0.120665 0.147365 0.0348255 0.0028170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 28 40461 0.119565 0.145465 0.0344697 0.0030520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 29 40462 0.118466 0.143566 0.0339649 0.0031220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 30 40463 0.117266 0.141766 0.0334691 0.0030370 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 8 31 40464 0.116066 0.139966 0.0331092 0.0028500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 1 40465 0.114866 0.138166 0.0329654 0.0026150 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 2 40466 0.113567 0.136467 0.0330646 0.0023820 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 3 40467 0.112267 0.134667 0.0333748 0.0021990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 4 40468 0.110967 0.132967 0.0338229 0.0020880 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 5 40469 0.109568 0.131268 0.0343521 0.0020580 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 6 40470 0.108168 0.129668 0.0348713 0.0021080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 7 40471 0.106768 0.127968 0.0352905 0.0022340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 8 40472 0.105268 0.126368 0.0355736 0.0024110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 9 40473 0.103669 0.124769 0.0356458 0.0026280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 10 40474 0.102169 0.123169 0.0354930 0.0028570 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 11 40475 0.100569 0.121669 0.0351302 0.0030530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 12 40476 0.098869 0.120169 0.0345853 0.0032040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 13 40477 0.097170 0.118570 0.0339295 0.0032610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 14 40478 0.095470 0.117070 0.0332677 0.0032170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 15 40479 0.093770 0.115670 0.0327089 0.0030780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 16 40480 0.091871 0.114171 0.0323140 0.0028740 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 17 40481 0.090071 0.112671 0.0321472 0.0026540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 18 40482 0.088171 0.111271 0.0321834 0.0024670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 19 40483 0.086271 0.109871 0.0323606 0.0023780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 20 40484 0.084272 0.108372 0.0325637 0.0024210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 21 40485 0.082372 0.106972 0.0326549 0.0025970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 22 40486 0.080272 0.105572 0.0325171 0.0028700 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 23 40487 0.078272 0.104172 0.0320963 0.0031690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 24 40488 0.076173 0.102873 0.0313985 0.0034020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 25 40489 0.074073 0.101473 0.0305146 0.0035100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 26 40490 0.071873 0.100073 0.0296098 0.0034650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 27 40491 0.069774 0.098674 0.0288220 0.0032830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 28 40492 0.067574 0.097374 0.0282432 0.0030260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 29 40493 0.065374 0.095974 0.0279473 0.0027490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 9 30 40494 0.063074 0.094674 0.0279155 0.0025050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 1 40495 0.060875 0.093375 0.0280947 0.0023290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 2 40496 0.058675 0.091975 0.0284099 0.0022460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 3 40497 0.056375 0.090675 0.0287640 0.0022490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 4 40498 0.054076 0.089376 0.0290762 0.0023300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 5 40499 0.051876 0.088076 0.0292714 0.0024780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 6 40500 0.049576 0.086876 0.0292936 0.0026830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 7 40501 0.047376 0.085576 0.0290877 0.0029000 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 8 40502 0.045177 0.084377 0.0286749 0.0031200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 9 40503 0.042877 0.083177 0.0280601 0.0032900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 10 40504 0.040677 0.081977 0.0272993 0.0033970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 11 40505 0.038477 0.080777 0.0264804 0.0034050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 12 40506 0.036278 0.079678 0.0257166 0.0032960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 13 40507 0.034178 0.078578 0.0251078 0.0031090 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 14 40508 0.031978 0.077478 0.0247100 0.0028750 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 15 40509 0.029879 0.076379 0.0245291 0.0026790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 16 40510 0.027679 0.075379 0.0245123 0.0025630 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 17 40511 0.025679 0.074479 0.0245385 0.0025780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 18 40512 0.023579 0.073479 0.0244927 0.0027250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 19 40513 0.021480 0.072580 0.0242448 0.0029620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 20 40514 0.019480 0.071780 0.0237250 0.0032490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 21 40515 0.017380 0.070880 0.0229482 0.0034950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 22 40516 0.015380 0.070180 0.0219574 0.0036380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 23 40517 0.013381 0.069381 0.0208965 0.0036500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 24 40518 0.011381 0.068681 0.0198817 0.0035300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 25 40519 0.009381 0.068081 0.0190409 0.0033080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 26 40520 0.007382 0.067482 0.0184721 0.0030270 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 27 40521 0.005382 0.066882 0.0181852 0.0027530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 28 40522 0.003482 0.066382 0.0181394 0.0025310 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 29 40523 0.001482 0.065882 0.0182876 0.0023770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 30 40524 -0.000517 0.065483 0.0185378 0.0023190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 10 31 40525 -0.002517 0.065083 0.0188129 0.0023340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 1 40526 -0.004517 0.064683 0.0190361 0.0024190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 2 40527 -0.006617 0.064383 0.0191373 0.0025660 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 3 40528 -0.008616 0.064084 0.0190745 0.0027420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 4 40529 -0.010716 0.063884 0.0188326 0.0029100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 5 40530 -0.012716 0.063684 0.0184528 0.0030540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 6 40531 -0.014815 0.063485 0.0179330 0.0031640 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 7 40532 -0.017015 0.063385 0.0173331 0.0031900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 8 40533 -0.019115 0.063285 0.0167673 0.0031240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 9 40534 -0.021315 0.063285 0.0163105 0.0029660 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 10 40535 -0.023514 0.063186 0.0160487 0.0027410 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 11 40536 -0.025814 0.063186 0.0160098 0.0025140 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 12 40537 -0.028014 0.063286 0.0161770 0.0023680 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 13 40538 -0.030414 0.063286 0.0164312 0.0023500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 14 40539 -0.032713 0.063387 0.0166194 0.0024850 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 15 40540 -0.035113 0.063487 0.0166025 0.0027330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 16 40541 -0.037513 0.063687 0.0163177 0.0030180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 17 40542 -0.039912 0.063788 0.0157549 0.0032890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 18 40543 -0.042412 0.063988 0.0149601 0.0034640 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 19 40544 -0.045012 0.064288 0.0140462 0.0035330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 20 40545 -0.047512 0.064488 0.0131244 0.0034710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 21 40546 -0.050111 0.064789 0.0123166 0.0033130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 22 40547 -0.052711 0.065089 0.0117088 0.0030870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 23 40548 -0.055411 0.065389 0.0113249 0.0028530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 24 40549 -0.058111 0.065789 0.0111621 0.0026520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 25 40550 -0.060810 0.066190 0.0111893 0.0025080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 26 40551 -0.063610 0.066590 0.0112995 0.0024450 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 27 40552 -0.066410 0.066990 0.0114416 0.0024650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 28 40553 -0.069209 0.067491 0.0115248 0.0025590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 29 40554 -0.072109 0.067991 0.0114840 0.0027090 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 11 30 40555 -0.075009 0.068591 0.0112761 0.0028910 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 1 40556 -0.077909 0.069191 0.0108913 0.0030700 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 2 40557 -0.080808 0.069892 0.0103335 0.0032310 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 3 40558 -0.083708 0.070592 0.0096227 0.0033520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 4 40559 -0.086708 0.071392 0.0088408 0.0033980 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 5 40560 -0.089708 0.072192 0.0080450 0.0033590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 6 40561 -0.092707 0.072993 0.0073362 0.0032230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 7 40562 -0.095707 0.073993 0.0068064 0.0030060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 8 40563 -0.098707 0.074993 0.0065155 0.0027540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 9 40564 -0.101806 0.075994 0.0064657 0.0025390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 10 40565 -0.104806 0.077094 0.0065909 0.0024240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 11 40566 -0.107906 0.078294 0.0067471 0.0024690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 12 40567 -0.110906 0.079594 0.0067962 0.0026520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 13 40568 -0.114005 0.080895 0.0066094 0.0029080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 14 40569 -0.117005 0.082295 0.0061756 0.0031510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 15 40570 -0.120005 0.083795 0.0055277 0.0033060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 16 40571 -0.123105 0.085295 0.0047869 0.0033320 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 17 40572 -0.126104 0.086896 0.0040861 0.0032410 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 18 40573 -0.129104 0.088596 0.0035193 0.0030520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 19 40574 -0.132104 0.090396 0.0031714 0.0028190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 20 40575 -0.135003 0.092297 0.0030736 0.0025670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 21 40576 -0.138003 0.094197 0.0032068 0.0023540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 22 40577 -0.140903 0.096197 0.0035260 0.0021990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 23 40578 -0.143803 0.098297 0.0039641 0.0021290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 24 40579 -0.146602 0.100498 0.0044313 0.0021300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 25 40580 -0.149402 0.102698 0.0048585 0.0022170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 26 40581 -0.152202 0.104998 0.0051586 0.0023630 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 27 40582 -0.155001 0.107399 0.0053008 0.0025460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 28 40583 -0.157701 0.109799 0.0052430 0.0027490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 29 40584 -0.160301 0.112299 0.0049992 0.0029360 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 30 40585 -0.162901 0.114799 0.0045843 0.0030750 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1969 12 31 40586 -0.165500 0.117400 0.0040385 0.0031680 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 1 40587 -0.168000 0.120100 0.0034537 0.0031890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 2 40588 -0.170400 0.122700 0.0028768 0.0031300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 3 40589 -0.172800 0.125500 0.0024100 0.0029930 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 4 40590 -0.175099 0.128201 0.0020982 0.0027960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 5 40591 -0.177399 0.131001 0.0019874 0.0026130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 6 40592 -0.179499 0.133901 0.0020255 0.0025080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 7 40593 -0.181598 0.136702 0.0020947 0.0025510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 8 40594 -0.183698 0.139602 0.0020619 0.0027490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 9 40595 -0.185598 0.142502 0.0017580 0.0030510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 10 40596 -0.187498 0.145402 0.0011312 0.0033790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 11 40597 -0.189297 0.148303 0.0002054 0.0036250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 12 40598 -0.190997 0.151303 -0.0009004 0.0037300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 13 40599 -0.192597 0.154203 -0.0020213 0.0036780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 14 40600 -0.194097 0.157203 -0.0030251 0.0034920 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 15 40601 -0.195496 0.160204 -0.0038119 0.0032380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 16 40602 -0.196896 0.163204 -0.0043268 0.0029730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 17 40603 -0.198096 0.166104 -0.0045796 0.0027310 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 18 40604 -0.199195 0.169105 -0.0046194 0.0025400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 19 40605 -0.200295 0.172105 -0.0045052 0.0024240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 20 40606 -0.201195 0.175105 -0.0043141 0.0023870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 21 40607 -0.201995 0.178105 -0.0041249 0.0024380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 22 40608 -0.202794 0.181006 -0.0040207 0.0025530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 23 40609 -0.203394 0.184006 -0.0040546 0.0027000 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 24 40610 -0.203894 0.187006 -0.0042464 0.0028640 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 25 40611 -0.204294 0.190006 -0.0045982 0.0030250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 26 40612 -0.204593 0.192907 -0.0051040 0.0031480 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 27 40613 -0.204793 0.195907 -0.0056949 0.0032140 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 28 40614 -0.204893 0.198907 -0.0063277 0.0032090 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 29 40615 -0.204892 0.201808 -0.0069185 0.0031410 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 30 40616 -0.204792 0.204808 -0.0073964 0.0030040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 1 31 40617 -0.204592 0.207808 -0.0077092 0.0028070 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 1 40618 -0.204292 0.210808 -0.0078360 0.0026180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 2 40619 -0.203891 0.213709 -0.0077718 0.0024680 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 3 40620 -0.203391 0.216709 -0.0076177 0.0024380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 4 40621 -0.202891 0.219709 -0.0075085 0.0025600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 5 40622 -0.202191 0.222709 -0.0075953 0.0028230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 6 40623 -0.201490 0.225710 -0.0079912 0.0031640 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 7 40624 -0.200690 0.228710 -0.0087440 0.0035000 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 8 40625 -0.199790 0.231710 -0.0097708 0.0037070 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 9 40626 -0.198789 0.234711 -0.0109197 0.0037510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 10 40627 -0.197789 0.237811 -0.0120165 0.0036190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 11 40628 -0.196689 0.240811 -0.0129313 0.0033780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 12 40629 -0.195589 0.243811 -0.0135811 0.0031110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 13 40630 -0.194388 0.246912 -0.0139820 0.0028710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 14 40631 -0.193088 0.249912 -0.0141648 0.0026870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 15 40632 -0.191888 0.252912 -0.0141926 0.0025840 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 16 40633 -0.190588 0.256012 -0.0141595 0.0025550 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 17 40634 -0.189287 0.259013 -0.0141503 0.0026060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 18 40635 -0.187887 0.262013 -0.0142251 0.0027260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 19 40636 -0.186587 0.265013 -0.0144380 0.0028960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 20 40637 -0.185186 0.268014 -0.0148348 0.0030810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 21 40638 -0.183786 0.271014 -0.0154076 0.0032520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 22 40639 -0.182486 0.274014 -0.0161464 0.0033890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 23 40640 -0.181086 0.277014 -0.0169763 0.0034590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 24 40641 -0.179685 0.279915 -0.0178601 0.0034660 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 25 40642 -0.178385 0.282815 -0.0187009 0.0033940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 26 40643 -0.177085 0.285715 -0.0194448 0.0032510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 27 40644 -0.175785 0.288615 -0.0200056 0.0030470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 2 28 40645 -0.174484 0.291516 -0.0203424 0.0028280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 1 40646 -0.173184 0.294316 -0.0204913 0.0026510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 2 40647 -0.171984 0.297116 -0.0205041 0.0025720 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 3 40648 -0.170783 0.299817 -0.0204879 0.0026130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 4 40649 -0.169583 0.302617 -0.0205968 0.0028080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 5 40650 -0.168383 0.305317 -0.0209506 0.0031030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 6 40651 -0.167283 0.307917 -0.0216334 0.0034390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 7 40652 -0.166182 0.310618 -0.0226263 0.0037070 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 8 40653 -0.165082 0.313218 -0.0238261 0.0038340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 9 40654 -0.163982 0.315718 -0.0250429 0.0037810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 10 40655 -0.162882 0.318318 -0.0261357 0.0035640 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 11 40656 -0.161881 0.320819 -0.0269736 0.0032740 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 12 40657 -0.160781 0.323219 -0.0275134 0.0029900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 13 40658 -0.159781 0.325619 -0.0277832 0.0027520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 14 40659 -0.158680 0.328020 -0.0278671 0.0026100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 15 40660 -0.157680 0.330320 -0.0278449 0.0025610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 16 40661 -0.156680 0.332620 -0.0278167 0.0025870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 17 40662 -0.155580 0.334920 -0.0278636 0.0026970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 18 40663 -0.154479 0.337121 -0.0280484 0.0028620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 19 40664 -0.153479 0.339221 -0.0284192 0.0030620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 20 40665 -0.152279 0.341421 -0.0289941 0.0032680 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 21 40666 -0.151178 0.343522 -0.0297669 0.0034510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 22 40667 -0.149978 0.345522 -0.0306997 0.0035850 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 23 40668 -0.148778 0.347522 -0.0317326 0.0036470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 24 40669 -0.147578 0.349522 -0.0327954 0.0036260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 25 40670 -0.146277 0.351423 -0.0337862 0.0035240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 26 40671 -0.144977 0.353323 -0.0346421 0.0033610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 27 40672 -0.143577 0.355123 -0.0353199 0.0031740 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 28 40673 -0.142177 0.356923 -0.0358067 0.0030000 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 29 40674 -0.140676 0.358624 -0.0361546 0.0029120 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 30 40675 -0.139176 0.360424 -0.0364784 0.0029280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 3 31 40676 -0.137576 0.362024 -0.0368742 0.0030760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 1 40677 -0.135875 0.363625 -0.0374681 0.0033280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 2 40678 -0.134175 0.365225 -0.0383619 0.0036420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 3 40679 -0.132375 0.366725 -0.0395647 0.0039250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 4 40680 -0.130575 0.368225 -0.0409965 0.0041050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 5 40681 -0.128674 0.369726 -0.0425404 0.0041250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 6 40682 -0.126674 0.371126 -0.0440112 0.0039910 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 7 40683 -0.124674 0.372426 -0.0452810 0.0037240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 8 40684 -0.122674 0.373726 -0.0462539 0.0034100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 9 40685 -0.120473 0.375027 -0.0469197 0.0031110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 10 40686 -0.118373 0.376227 -0.0473315 0.0028980 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 11 40687 -0.116073 0.377427 -0.0475574 0.0027710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 12 40688 -0.113772 0.378628 -0.0477252 0.0027480 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 13 40689 -0.111472 0.379728 -0.0479010 0.0027960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 14 40690 -0.109072 0.380828 -0.0481459 0.0029040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 15 40691 -0.106672 0.381828 -0.0485307 0.0030520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 16 40692 -0.104171 0.382829 -0.0490735 0.0032140 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 17 40693 -0.101671 0.383829 -0.0497754 0.0033650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 18 40694 -0.099071 0.384729 -0.0506112 0.0034880 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 19 40695 -0.096471 0.385629 -0.0515410 0.0035390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 20 40696 -0.093870 0.386530 -0.0524819 0.0035210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 21 40697 -0.091170 0.387430 -0.0533627 0.0034070 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 22 40698 -0.088470 0.388230 -0.0540915 0.0032300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 23 40699 -0.085769 0.389031 -0.0546174 0.0030110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 24 40700 -0.083069 0.389731 -0.0549252 0.0028010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 25 40701 -0.080269 0.390531 -0.0550521 0.0026460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 26 40702 -0.077469 0.391231 -0.0550739 0.0026100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 27 40703 -0.074668 0.391932 -0.0551337 0.0027100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 28 40704 -0.071868 0.392632 -0.0553426 0.0029130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 29 40705 -0.068968 0.393232 -0.0558004 0.0031910 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 4 30 40706 -0.066168 0.393932 -0.0565332 0.0034580 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 1 40707 -0.063267 0.394533 -0.0575021 0.0036540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 2 40708 -0.060367 0.395133 -0.0586069 0.0037240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 3 40709 -0.057467 0.395733 -0.0597197 0.0036460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 4 40710 -0.054566 0.396334 -0.0606756 0.0034400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 5 40711 -0.051666 0.396834 -0.0613934 0.0031580 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 6 40712 -0.048666 0.397434 -0.0618092 0.0028570 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 7 40713 -0.045766 0.397934 -0.0619461 0.0026180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 8 40714 -0.042765 0.398435 -0.0618749 0.0024460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 9 40715 -0.039765 0.398935 -0.0616907 0.0023820 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 10 40716 -0.036865 0.399435 -0.0614876 0.0024050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 11 40717 -0.033865 0.399935 -0.0613444 0.0024970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 12 40718 -0.030864 0.400336 -0.0613062 0.0026330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 13 40719 -0.027864 0.400736 -0.0614171 0.0027790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 14 40720 -0.024864 0.401136 -0.0616819 0.0029300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 15 40721 -0.021763 0.401537 -0.0620757 0.0030510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 16 40722 -0.018763 0.401937 -0.0625666 0.0031210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 17 40723 -0.015663 0.402237 -0.0631044 0.0031230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 18 40724 -0.012663 0.402637 -0.0635953 0.0030450 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 19 40725 -0.009562 0.402838 -0.0639891 0.0029000 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 20 40726 -0.006462 0.403138 -0.0641849 0.0026870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 21 40727 -0.003362 0.403338 -0.0641678 0.0024700 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 22 40728 -0.000162 0.403538 -0.0639506 0.0022890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 23 40729 0.002939 0.403739 -0.0635994 0.0022190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 24 40730 0.006039 0.403939 -0.0632423 0.0022710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 25 40731 0.009239 0.404039 -0.0630021 0.0024550 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 26 40732 0.012440 0.404040 -0.0629859 0.0027010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 27 40733 0.015640 0.404140 -0.0632248 0.0029610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 28 40734 0.018840 0.404040 -0.0636956 0.0031440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 29 40735 0.022040 0.404040 -0.0642934 0.0032220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 30 40736 0.025241 0.403941 -0.0649153 0.0031680 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 5 31 40737 0.028541 0.403841 -0.0654091 0.0029940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 1 40738 0.031741 0.403641 -0.0656870 0.0027420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 2 40739 0.035041 0.403441 -0.0656948 0.0024760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 3 40740 0.038342 0.403142 -0.0654586 0.0022400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 4 40741 0.041542 0.402842 -0.0650195 0.0020660 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 5 40742 0.044842 0.402442 -0.0644423 0.0019840 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 6 40743 0.048143 0.402043 -0.0638391 0.0019940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 7 40744 0.051443 0.401643 -0.0632740 0.0020780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 8 40745 0.054743 0.401143 -0.0628328 0.0022150 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 9 40746 0.058043 0.400543 -0.0625327 0.0023760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 10 40747 0.061344 0.399944 -0.0623935 0.0025260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 11 40748 0.064644 0.399244 -0.0623843 0.0026400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 12 40749 0.067944 0.398544 -0.0624682 0.0027090 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 13 40750 0.071245 0.397745 -0.0625910 0.0027080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 14 40751 0.074445 0.396945 -0.0626788 0.0026480 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 15 40752 0.077745 0.396045 -0.0626817 0.0025250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 16 40753 0.081045 0.395145 -0.0625185 0.0023300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 17 40754 0.084246 0.394146 -0.0621414 0.0021030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 18 40755 0.087446 0.393046 -0.0615502 0.0018950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 19 40756 0.090646 0.391946 -0.0607780 0.0017780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 20 40757 0.093846 0.390746 -0.0599599 0.0017900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 21 40758 0.096947 0.389547 -0.0592147 0.0019430 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 22 40759 0.100047 0.388247 -0.0586875 0.0021950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 23 40760 0.103147 0.386847 -0.0584224 0.0024690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 24 40761 0.106248 0.385448 -0.0584152 0.0026800 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 25 40762 0.109248 0.383948 -0.0585601 0.0027760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 26 40763 0.112248 0.382448 -0.0587379 0.0027270 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 27 40764 0.115148 0.380848 -0.0587907 0.0025620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 28 40765 0.118149 0.379149 -0.0586466 0.0023200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 29 40766 0.120949 0.377449 -0.0582324 0.0020440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 6 30 40767 0.123849 0.375649 -0.0575622 0.0018040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 1 40768 0.126649 0.373749 -0.0566821 0.0016280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 2 40769 0.129350 0.371850 -0.0556659 0.0015360 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 3 40770 0.132050 0.369850 -0.0546038 0.0015440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 4 40771 0.134750 0.367850 -0.0535906 0.0016210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 5 40772 0.137351 0.365751 -0.0526744 0.0017560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 6 40773 0.139951 0.363551 -0.0519243 0.0019240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 7 40774 0.142451 0.361351 -0.0513341 0.0020950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 8 40775 0.144951 0.359051 -0.0509070 0.0022440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 9 40776 0.147352 0.356752 -0.0506178 0.0023390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 10 40777 0.149752 0.354352 -0.0503956 0.0023870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 11 40778 0.152152 0.351952 -0.0501795 0.0023610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 12 40779 0.154452 0.349552 -0.0499143 0.0022790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 13 40780 0.156653 0.347053 -0.0495272 0.0021290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 14 40781 0.158853 0.344453 -0.0489700 0.0019400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 15 40782 0.161053 0.341853 -0.0482178 0.0017400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 16 40783 0.163154 0.339254 -0.0472867 0.0016030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 17 40784 0.165254 0.336554 -0.0462805 0.0015770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 18 40785 0.167254 0.333854 -0.0452984 0.0016850 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 19 40786 0.169154 0.331154 -0.0445142 0.0019340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 20 40787 0.171055 0.328355 -0.0439980 0.0022380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 21 40788 0.172955 0.325555 -0.0437999 0.0025200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 22 40789 0.174755 0.322755 -0.0438077 0.0026700 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 23 40790 0.176555 0.319855 -0.0439026 0.0026620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 24 40791 0.178256 0.317056 -0.0438974 0.0024850 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 25 40792 0.179856 0.314156 -0.0436582 0.0022050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 26 40793 0.181456 0.311256 -0.0431171 0.0019020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 27 40794 0.183057 0.308257 -0.0422829 0.0016080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 28 40795 0.184557 0.305357 -0.0411848 0.0013910 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 29 40796 0.185957 0.302357 -0.0399136 0.0012710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 30 40797 0.187357 0.299457 -0.0385574 0.0012310 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 7 31 40798 0.188758 0.296458 -0.0372223 0.0012800 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 1 40799 0.190058 0.293458 -0.0359591 0.0013930 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 2 40800 0.191258 0.290458 -0.0348310 0.0015350 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 3 40801 0.192458 0.287458 -0.0338628 0.0017090 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 4 40802 0.193559 0.284559 -0.0330526 0.0018650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 5 40803 0.194659 0.281559 -0.0323895 0.0019900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 6 40804 0.195759 0.278559 -0.0318233 0.0020570 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 7 40805 0.196660 0.275560 -0.0312912 0.0020590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 8 40806 0.197660 0.272560 -0.0307280 0.0019960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 9 40807 0.198560 0.269560 -0.0300849 0.0018880 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 10 40808 0.199360 0.266560 -0.0293117 0.0017420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 11 40809 0.200161 0.263661 -0.0283955 0.0015970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 12 40810 0.200861 0.260661 -0.0273354 0.0014840 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 13 40811 0.201561 0.257661 -0.0262112 0.0014550 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 14 40812 0.202261 0.254661 -0.0251001 0.0015460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 15 40813 0.202862 0.251662 -0.0241709 0.0017890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 16 40814 0.203362 0.248662 -0.0235327 0.0021380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 17 40815 0.203862 0.245662 -0.0232736 0.0025090 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 18 40816 0.204363 0.242663 -0.0233434 0.0027870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 19 40817 0.204763 0.239663 -0.0236133 0.0029120 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 20 40818 0.205163 0.236663 -0.0239121 0.0028370 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 21 40819 0.205463 0.233663 -0.0240560 0.0026010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 22 40820 0.205764 0.230564 -0.0239108 0.0022920 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 23 40821 0.206064 0.227564 -0.0234636 0.0019930 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 24 40822 0.206264 0.224464 -0.0227495 0.0017640 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 25 40823 0.206464 0.221364 -0.0218543 0.0016320 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 26 40824 0.206565 0.218265 -0.0208672 0.0015990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 27 40825 0.206665 0.215165 -0.0198900 0.0016510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 28 40826 0.206765 0.211965 -0.0190009 0.0017690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 29 40827 0.206766 0.208866 -0.0182537 0.0019330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 30 40828 0.206766 0.205666 -0.0176815 0.0021150 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 8 31 40829 0.206666 0.202466 -0.0172894 0.0022890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 1 40830 0.206566 0.199266 -0.0170662 0.0024270 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 2 40831 0.206467 0.195967 -0.0169441 0.0025190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 3 40832 0.206267 0.192767 -0.0168809 0.0025330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 4 40833 0.206067 0.189467 -0.0168078 0.0024790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 5 40834 0.205768 0.186168 -0.0166396 0.0023660 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 6 40835 0.205468 0.182868 -0.0163464 0.0022120 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 7 40836 0.205168 0.179568 -0.0158903 0.0020560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 8 40837 0.204768 0.176268 -0.0152761 0.0019140 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 9 40838 0.204269 0.172869 -0.0145590 0.0018470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 10 40839 0.203869 0.169569 -0.0138248 0.0018870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 11 40840 0.203269 0.166169 -0.0131977 0.0020600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 12 40841 0.202769 0.162869 -0.0127955 0.0023450 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 13 40842 0.202070 0.159470 -0.0127284 0.0027060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 14 40843 0.201470 0.156070 -0.0130192 0.0030420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 15 40844 0.200670 0.152670 -0.0135910 0.0032670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 16 40845 0.199971 0.149271 -0.0142999 0.0032990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 17 40846 0.199071 0.145871 -0.0149467 0.0031460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 18 40847 0.198171 0.142571 -0.0153696 0.0028670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 19 40848 0.197271 0.139171 -0.0154874 0.0025600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 20 40849 0.196272 0.135772 -0.0153163 0.0022900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 21 40850 0.195172 0.132472 -0.0149301 0.0021280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 22 40851 0.194072 0.129172 -0.0144290 0.0020670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 23 40852 0.192872 0.125772 -0.0139068 0.0021040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 24 40853 0.191673 0.122473 -0.0134706 0.0022160 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 25 40854 0.190373 0.119173 -0.0131645 0.0023680 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 26 40855 0.188973 0.115973 -0.0130343 0.0025550 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 27 40856 0.187474 0.112674 -0.0130922 0.0027310 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 28 40857 0.185974 0.109474 -0.0133070 0.0028810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 29 40858 0.184474 0.106274 -0.0136469 0.0029710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 9 30 40859 0.182774 0.103174 -0.0140467 0.0029960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 1 40860 0.181075 0.099975 -0.0144246 0.0029390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 2 40861 0.179275 0.096875 -0.0147224 0.0028260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 3 40862 0.177375 0.093875 -0.0148813 0.0026650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 4 40863 0.175475 0.090875 -0.0148651 0.0024930 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 5 40864 0.173476 0.087876 -0.0146829 0.0023180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 6 40865 0.171376 0.084976 -0.0143398 0.0022100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 7 40866 0.169276 0.082076 -0.0139526 0.0022050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 8 40867 0.167077 0.079277 -0.0136195 0.0023280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 9 40868 0.164777 0.076477 -0.0134583 0.0025680 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 10 40869 0.162377 0.073777 -0.0135922 0.0028790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 11 40870 0.159977 0.071077 -0.0140520 0.0032260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 12 40871 0.157478 0.068478 -0.0148319 0.0034950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 13 40872 0.154878 0.065978 -0.0158127 0.0036300 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 14 40873 0.152278 0.063578 -0.0168526 0.0035880 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 15 40874 0.149578 0.061178 -0.0177574 0.0033900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 16 40875 0.146779 0.058779 -0.0184123 0.0031040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 17 40876 0.143879 0.056579 -0.0187761 0.0028200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 18 40877 0.140979 0.054379 -0.0188870 0.0025990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 19 40878 0.138080 0.052280 -0.0188408 0.0024990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 20 40879 0.135080 0.050280 -0.0187417 0.0025110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 21 40880 0.131980 0.048280 -0.0186915 0.0026000 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 22 40881 0.128880 0.046380 -0.0187723 0.0027490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 23 40882 0.125681 0.044581 -0.0190202 0.0029190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 24 40883 0.122481 0.042781 -0.0194410 0.0031030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 25 40884 0.119181 0.041181 -0.0200199 0.0032490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 26 40885 0.115981 0.039481 -0.0207347 0.0033530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 27 40886 0.112582 0.037982 -0.0215266 0.0034090 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 28 40887 0.109282 0.036482 -0.0223314 0.0033870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 29 40888 0.105882 0.035082 -0.0230973 0.0033060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 30 40889 0.102483 0.033683 -0.0237431 0.0031580 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 10 31 40890 0.098983 0.032383 -0.0242210 0.0029870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 1 40891 0.095583 0.031083 -0.0245278 0.0028200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 2 40892 0.092083 0.029883 -0.0246967 0.0027000 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 3 40893 0.088684 0.028684 -0.0247775 0.0026690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 4 40894 0.085184 0.027484 -0.0248814 0.0027490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 5 40895 0.081684 0.026384 -0.0251212 0.0029390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 6 40896 0.078184 0.025284 -0.0255971 0.0032010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 7 40897 0.074685 0.024285 -0.0263529 0.0034900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 8 40898 0.071185 0.023185 -0.0273738 0.0037380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 9 40899 0.067785 0.022185 -0.0286026 0.0038700 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 10 40900 0.064286 0.021186 -0.0298945 0.0038660 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 11 40901 0.060786 0.020186 -0.0310953 0.0036930 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 12 40902 0.057386 0.019286 -0.0320642 0.0034220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 13 40903 0.053986 0.018286 -0.0327370 0.0031030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 14 40904 0.050487 0.017287 -0.0331039 0.0028220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 15 40905 0.047087 0.016387 -0.0332317 0.0026330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 16 40906 0.043687 0.015387 -0.0332256 0.0025550 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 17 40907 0.040287 0.014487 -0.0331844 0.0025770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 18 40908 0.036988 0.013588 -0.0332153 0.0026710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 19 40909 0.033588 0.012588 -0.0333491 0.0028040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 20 40910 0.030288 0.011688 -0.0336360 0.0029470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 21 40911 0.026989 0.010789 -0.0340578 0.0030840 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 22 40912 0.023689 0.009889 -0.0346117 0.0031870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 23 40913 0.020389 0.009089 -0.0352345 0.0032380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 24 40914 0.017089 0.008189 -0.0358764 0.0032260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 25 40915 0.013890 0.007390 -0.0364742 0.0031490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 26 40916 0.010690 0.006590 -0.0369651 0.0030040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 27 40917 0.007490 0.005790 -0.0372989 0.0028270 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 28 40918 0.004390 0.005090 -0.0374348 0.0026380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 29 40919 0.001191 0.004291 -0.0374046 0.0024810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 11 30 40920 -0.001909 0.003691 -0.0372435 0.0024020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 1 40921 -0.005009 0.002991 -0.0370663 0.0024340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 2 40922 -0.008108 0.002392 -0.0369702 0.0025830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 3 40923 -0.011208 0.001892 -0.0370710 0.0028100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 4 40924 -0.014208 0.001392 -0.0374199 0.0030780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 5 40925 -0.017208 0.000992 -0.0380237 0.0032970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 6 40926 -0.020207 0.000593 -0.0388016 0.0034200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 7 40927 -0.023207 0.000293 -0.0396394 0.0034120 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 8 40928 -0.026207 -0.000007 -0.0404023 0.0032710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 9 40929 -0.029106 -0.000206 -0.0409671 0.0030280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 10 40930 -0.032106 -0.000306 -0.0412510 0.0027360 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 11 40931 -0.035006 -0.000306 -0.0412448 0.0024490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 12 40932 -0.037806 -0.000306 -0.0409917 0.0022410 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 13 40933 -0.040705 -0.000205 -0.0405805 0.0021230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 14 40934 -0.043605 -0.000005 -0.0401024 0.0021170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 15 40935 -0.046405 0.000295 -0.0396423 0.0021840 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 16 40936 -0.049305 0.000595 -0.0392971 0.0023120 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 17 40937 -0.052104 0.001096 -0.0390900 0.0024560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 18 40938 -0.054904 0.001596 -0.0390248 0.0025990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 19 40939 -0.057704 0.002196 -0.0390867 0.0027180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 20 40940 -0.060503 0.002797 -0.0392635 0.0027980 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 21 40941 -0.063303 0.003597 -0.0394834 0.0028200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 22 40942 -0.066103 0.004397 -0.0397032 0.0027910 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 23 40943 -0.068903 0.005397 -0.0398551 0.0026950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 24 40944 -0.071602 0.006398 -0.0398989 0.0025760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 25 40945 -0.074402 0.007398 -0.0398198 0.0024360 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 26 40946 -0.077202 0.008598 -0.0395856 0.0023000 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 27 40947 -0.079902 0.009898 -0.0392505 0.0022250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 28 40948 -0.082701 0.011199 -0.0388893 0.0022530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 29 40949 -0.085501 0.012599 -0.0386082 0.0024060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 30 40950 -0.088201 0.014099 -0.0385581 0.0026790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1970 12 31 40951 -0.091000 0.015600 -0.0387929 0.0029840 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 1 40952 -0.093700 0.017300 -0.0393358 0.0032610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 2 40953 -0.096500 0.019000 -0.0401116 0.0034370 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 3 40954 -0.099200 0.020800 -0.0409825 0.0034690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 4 40955 -0.101999 0.022601 -0.0418123 0.0033490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 5 40956 -0.104799 0.024501 -0.0424642 0.0031230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 6 40957 -0.107499 0.026501 -0.0428610 0.0028490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 7 40958 -0.110199 0.028601 -0.0429859 0.0025880 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 8 40959 -0.112998 0.030702 -0.0428777 0.0023790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 9 40960 -0.115698 0.032902 -0.0425946 0.0022600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 10 40961 -0.118498 0.035102 -0.0422525 0.0022510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 11 40962 -0.121197 0.037403 -0.0419353 0.0023190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 12 40963 -0.123997 0.039703 -0.0417292 0.0024470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 13 40964 -0.126697 0.042103 -0.0416590 0.0026130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 14 40965 -0.129397 0.044503 -0.0417639 0.0027650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 15 40966 -0.132196 0.047004 -0.0419977 0.0028860 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 16 40967 -0.134896 0.049504 -0.0423386 0.0029580 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 17 40968 -0.137596 0.052104 -0.0427144 0.0029710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 18 40969 -0.140296 0.054704 -0.0430813 0.0029330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 19 40970 -0.142995 0.057305 -0.0433712 0.0028290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 20 40971 -0.145795 0.060005 -0.0435340 0.0026820 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 21 40972 -0.148495 0.062705 -0.0435359 0.0025100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 22 40973 -0.151194 0.065406 -0.0433647 0.0023420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 23 40974 -0.153894 0.068106 -0.0430436 0.0022060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 24 40975 -0.156594 0.070906 -0.0426344 0.0021650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 25 40976 -0.159294 0.073706 -0.0422343 0.0022460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 26 40977 -0.161993 0.076507 -0.0419791 0.0024450 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 27 40978 -0.164593 0.079407 -0.0419730 0.0027430 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 28 40979 -0.167293 0.082207 -0.0422789 0.0030410 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 29 40980 -0.169893 0.085107 -0.0428477 0.0032560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 30 40981 -0.172492 0.088008 -0.0435596 0.0033170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 1 31 40982 -0.175092 0.090908 -0.0442434 0.0032140 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 1 40983 -0.177692 0.093808 -0.0447403 0.0029620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 2 40984 -0.180291 0.096809 -0.0449541 0.0026410 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 3 40985 -0.182791 0.099709 -0.0448450 0.0023380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 4 40986 -0.185291 0.102709 -0.0444619 0.0020990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 5 40987 -0.187791 0.105609 -0.0438847 0.0019550 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 6 40988 -0.190190 0.108610 -0.0432156 0.0019130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 7 40989 -0.192690 0.111610 -0.0425604 0.0019700 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 8 40990 -0.194990 0.114610 -0.0419873 0.0020930 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 9 40991 -0.197390 0.117610 -0.0415702 0.0022440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 10 40992 -0.199689 0.120711 -0.0413080 0.0024120 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 11 40993 -0.201989 0.123711 -0.0412049 0.0025560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 12 40994 -0.204189 0.126811 -0.0412247 0.0026650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 13 40995 -0.206388 0.129812 -0.0413136 0.0027040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 14 40996 -0.208488 0.132912 -0.0414204 0.0026780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 15 40997 -0.210588 0.135912 -0.0414793 0.0025930 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 16 40998 -0.212588 0.139012 -0.0414202 0.0024720 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 17 40999 -0.214587 0.142113 -0.0412240 0.0023040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 18 41000 -0.216487 0.145213 -0.0408469 0.0021440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 19 41001 -0.218287 0.148413 -0.0403297 0.0020220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 20 41002 -0.220087 0.151513 -0.0397226 0.0019560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 21 41003 -0.221886 0.154614 -0.0390985 0.0020060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 22 41004 -0.223486 0.157814 -0.0385973 0.0021830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 23 41005 -0.225086 0.161014 -0.0383242 0.0024770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 24 41006 -0.226585 0.164115 -0.0383810 0.0028400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 25 41007 -0.228085 0.167415 -0.0387929 0.0031690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 26 41008 -0.229485 0.170615 -0.0394858 0.0033810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 27 41009 -0.230785 0.173815 -0.0403006 0.0034060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 2 28 41010 -0.231984 0.177116 -0.0410565 0.0032600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 1 41011 -0.233084 0.180316 -0.0416003 0.0029950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 2 41012 -0.234184 0.183616 -0.0418482 0.0027020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 3 41013 -0.235083 0.186917 -0.0418231 0.0024630 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 4 41014 -0.235983 0.190317 -0.0416169 0.0023350 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 5 41015 -0.236783 0.193617 -0.0413508 0.0023200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 6 41016 -0.237483 0.197017 -0.0410996 0.0023940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 7 41017 -0.238082 0.200418 -0.0409725 0.0025500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 8 41018 -0.238682 0.203918 -0.0410244 0.0027390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 9 41019 -0.239082 0.207318 -0.0412642 0.0029420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 10 41020 -0.239382 0.210818 -0.0417231 0.0031330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 11 41021 -0.239681 0.214319 -0.0423469 0.0032860 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 12 41022 -0.239881 0.217819 -0.0430968 0.0033830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 13 41023 -0.239881 0.221419 -0.0439007 0.0034050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 14 41024 -0.239880 0.224920 -0.0446955 0.0033540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 15 41025 -0.239780 0.228520 -0.0454114 0.0032500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 16 41026 -0.239680 0.232120 -0.0460053 0.0031040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 17 41027 -0.239380 0.235720 -0.0464471 0.0029610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 18 41028 -0.238979 0.239321 -0.0467430 0.0028280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 19 41029 -0.238579 0.243021 -0.0469308 0.0027390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 20 41030 -0.238079 0.246621 -0.0470687 0.0027350 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 21 41031 -0.237579 0.250221 -0.0472596 0.0028540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 22 41032 -0.236978 0.253822 -0.0476264 0.0030810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 23 41033 -0.236278 0.257522 -0.0482703 0.0034070 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 24 41034 -0.235478 0.261122 -0.0492471 0.0037430 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 25 41035 -0.234677 0.264723 -0.0505520 0.0040160 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 26 41036 -0.233877 0.268323 -0.0520369 0.0041230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 27 41037 -0.232977 0.271823 -0.0535437 0.0040390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 28 41038 -0.231977 0.275423 -0.0548786 0.0037890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 29 41039 -0.231076 0.278924 -0.0559035 0.0034450 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 30 41040 -0.230076 0.282424 -0.0565833 0.0031130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 3 31 41041 -0.228976 0.285924 -0.0569792 0.0028800 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 1 41042 -0.227976 0.289424 -0.0571931 0.0027580 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 2 41043 -0.226875 0.292825 -0.0573539 0.0027510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 3 41044 -0.225775 0.296125 -0.0575438 0.0028290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 4 41045 -0.224675 0.299525 -0.0578476 0.0029560 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 5 41046 -0.223474 0.302826 -0.0582805 0.0031010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 6 41047 -0.222374 0.306026 -0.0588664 0.0032400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 7 41048 -0.221174 0.309226 -0.0595802 0.0033500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 8 41049 -0.220074 0.312326 -0.0603691 0.0034110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 9 41050 -0.218873 0.315427 -0.0612010 0.0034210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 10 41051 -0.217673 0.318527 -0.0619998 0.0033570 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 11 41052 -0.216473 0.321527 -0.0627157 0.0032360 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 12 41053 -0.215373 0.324427 -0.0632786 0.0030760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 13 41054 -0.214172 0.327328 -0.0636824 0.0029010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 14 41055 -0.212972 0.330228 -0.0639153 0.0027500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 15 41056 -0.211772 0.333028 -0.0640082 0.0026350 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 16 41057 -0.210571 0.335729 -0.0640210 0.0025960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 17 41058 -0.209371 0.338429 -0.0640409 0.0026530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 18 41059 -0.208171 0.341129 -0.0641727 0.0028060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 19 41060 -0.206971 0.343729 -0.0645046 0.0030600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 20 41061 -0.205770 0.346230 -0.0651265 0.0033590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 21 41062 -0.204470 0.348830 -0.0660423 0.0036420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 22 41063 -0.203270 0.351230 -0.0671852 0.0038210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 23 41064 -0.201970 0.353730 -0.0684391 0.0038370 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 24 41065 -0.200669 0.356131 -0.0696299 0.0036900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 25 41066 -0.199369 0.358531 -0.0705958 0.0034170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 26 41067 -0.198069 0.360931 -0.0712607 0.0031030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 27 41068 -0.196668 0.363332 -0.0716295 0.0028390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 28 41069 -0.195268 0.365632 -0.0717954 0.0026950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 29 41070 -0.193868 0.367932 -0.0718823 0.0026770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 4 30 41071 -0.192368 0.370232 -0.0719931 0.0027520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 1 41072 -0.190867 0.372533 -0.0722260 0.0029010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 2 41073 -0.189267 0.374833 -0.0726219 0.0030740 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 3 41074 -0.187667 0.377133 -0.0731917 0.0032420 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 4 41075 -0.186067 0.379433 -0.0739076 0.0033740 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 5 41076 -0.184266 0.381634 -0.0747455 0.0034730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 6 41077 -0.182566 0.383934 -0.0756443 0.0035060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 7 41078 -0.180666 0.386234 -0.0765462 0.0034780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 8 41079 -0.178765 0.388435 -0.0773911 0.0033820 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 9 41080 -0.176765 0.390735 -0.0781159 0.0032520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 10 41081 -0.174765 0.393035 -0.0786888 0.0030900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 11 41082 -0.172565 0.395235 -0.0791087 0.0029340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 12 41083 -0.170364 0.397536 -0.0793895 0.0028170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 13 41084 -0.168064 0.399736 -0.0795744 0.0027590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 14 41085 -0.165664 0.402036 -0.0797563 0.0028030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 15 41086 -0.163264 0.404236 -0.0800341 0.0029370 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 16 41087 -0.160663 0.406437 -0.0804880 0.0031540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 17 41088 -0.158063 0.408637 -0.0811769 0.0034170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 18 41089 -0.155363 0.410937 -0.0821278 0.0036600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 19 41090 -0.152562 0.413138 -0.0832916 0.0038310 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 20 41091 -0.149662 0.415338 -0.0845675 0.0038660 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 21 41092 -0.146662 0.417438 -0.0858024 0.0037610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 22 41093 -0.143662 0.419638 -0.0868532 0.0035150 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 23 41094 -0.140461 0.421739 -0.0876271 0.0031950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 24 41095 -0.137261 0.423839 -0.0880670 0.0028940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 25 41096 -0.133961 0.425939 -0.0882408 0.0026620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 26 41097 -0.130560 0.428040 -0.0882417 0.0025500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 27 41098 -0.127060 0.430040 -0.0881906 0.0025440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 28 41099 -0.123460 0.432040 -0.0881864 0.0026310 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 29 41100 -0.119860 0.433940 -0.0882743 0.0027470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 30 41101 -0.116159 0.435941 -0.0884912 0.0028730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 5 31 41102 -0.112359 0.437741 -0.0888221 0.0029730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 1 41103 -0.108559 0.439641 -0.0892429 0.0030400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 2 41104 -0.104559 0.441341 -0.0896938 0.0030440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 3 41105 -0.100658 0.443142 -0.0901297 0.0029980 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 4 41106 -0.096558 0.444742 -0.0904915 0.0028960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 5 41107 -0.092458 0.446442 -0.0907164 0.0027470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 6 41108 -0.088357 0.447943 -0.0907863 0.0025710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 7 41109 -0.084157 0.449543 -0.0906762 0.0024020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 8 41110 -0.079857 0.450943 -0.0904100 0.0022520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 9 41111 -0.075557 0.452343 -0.0900219 0.0021750 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 10 41112 -0.071256 0.453644 -0.0895908 0.0021790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 11 41113 -0.066856 0.454944 -0.0892246 0.0022860 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 12 41114 -0.062556 0.456144 -0.0890115 0.0024810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 13 41115 -0.058056 0.457244 -0.0890234 0.0027260 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 14 41116 -0.053655 0.458245 -0.0892692 0.0029610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 15 41117 -0.049155 0.459245 -0.0897311 0.0031270 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 16 41118 -0.044655 0.460145 -0.0903050 0.0031790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 17 41119 -0.040154 0.460946 -0.0908639 0.0030970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 18 41120 -0.035654 0.461746 -0.0912777 0.0028950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 19 41121 -0.031154 0.462346 -0.0914476 0.0026180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 20 41122 -0.026654 0.462946 -0.0913305 0.0023290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 21 41123 -0.022153 0.463447 -0.0909444 0.0021030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 22 41124 -0.017553 0.463947 -0.0903792 0.0019670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 23 41125 -0.013053 0.464247 -0.0897271 0.0019460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 24 41126 -0.008553 0.464547 -0.0891240 0.0020330 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 25 41127 -0.004052 0.464748 -0.0886308 0.0021760 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 26 41128 0.000448 0.464848 -0.0882917 0.0023240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 27 41129 0.004848 0.464848 -0.0881016 0.0024600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 28 41130 0.009349 0.464849 -0.0880165 0.0025530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 29 41131 0.013749 0.464649 -0.0879973 0.0025890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 6 30 41132 0.018249 0.464449 -0.0879842 0.0025650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 1 41133 0.022549 0.464149 -0.0879291 0.0024950 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 2 41134 0.026950 0.463750 -0.0877780 0.0023770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 3 41135 0.031250 0.463250 -0.0874908 0.0022270 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 4 41136 0.035550 0.462650 -0.0870487 0.0020790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 5 41137 0.039850 0.462050 -0.0864636 0.0019390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 6 41138 0.044051 0.461351 -0.0857635 0.0018610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 7 41139 0.048251 0.460551 -0.0850223 0.0018660 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 8 41140 0.052451 0.459651 -0.0843502 0.0019770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 9 41141 0.056552 0.458652 -0.0838411 0.0022020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 10 41142 0.060652 0.457652 -0.0835870 0.0024860 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 11 41143 0.064652 0.456552 -0.0836358 0.0027860 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 12 41144 0.068652 0.455352 -0.0839467 0.0030190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 13 41145 0.072553 0.454053 -0.0844526 0.0031290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 14 41146 0.076453 0.452753 -0.0849755 0.0030940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 15 41147 0.080353 0.451353 -0.0854073 0.0029220 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 16 41148 0.084153 0.449853 -0.0856142 0.0026740 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 17 41149 0.087954 0.448354 -0.0855611 0.0024120 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 18 41150 0.091754 0.446854 -0.0852650 0.0021870 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 19 41151 0.095454 0.445154 -0.0847838 0.0020500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 20 41152 0.099055 0.443555 -0.0842197 0.0020210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 21 41153 0.102755 0.441755 -0.0836676 0.0020810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 22 41154 0.106355 0.440055 -0.0832145 0.0022020 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 23 41155 0.109955 0.438255 -0.0828923 0.0023530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 24 41156 0.113456 0.436356 -0.0827282 0.0025050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 25 41157 0.116956 0.434456 -0.0826981 0.0026070 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 26 41158 0.120456 0.432556 -0.0827430 0.0026630 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 27 41159 0.123856 0.430556 -0.0828128 0.0026450 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 28 41160 0.127357 0.428557 -0.0828227 0.0025670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 29 41161 0.130757 0.426557 -0.0827486 0.0024480 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 30 41162 0.134057 0.424557 -0.0825165 0.0022940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 7 31 41163 0.137358 0.422458 -0.0821333 0.0021180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 1 41164 0.140658 0.420358 -0.0815852 0.0019620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 2 41165 0.143958 0.418258 -0.0808891 0.0018450 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 3 41166 0.147258 0.416158 -0.0801190 0.0018090 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 4 41167 0.150459 0.413959 -0.0793499 0.0018620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 5 41168 0.153559 0.411759 -0.0787007 0.0020360 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 6 41169 0.156759 0.409559 -0.0782736 0.0023140 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 7 41170 0.159859 0.407359 -0.0781525 0.0026240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 8 41171 0.162960 0.405160 -0.0783294 0.0029050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 9 41172 0.165960 0.402860 -0.0787432 0.0030680 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 10 41173 0.168960 0.400560 -0.0792291 0.0030670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 11 41174 0.171861 0.398261 -0.0796340 0.0029080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 12 41175 0.174761 0.395961 -0.0798199 0.0026440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 13 41176 0.177661 0.393661 -0.0797318 0.0023620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 14 41177 0.180461 0.391261 -0.0793796 0.0021250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 15 41178 0.183162 0.388862 -0.0788445 0.0019910 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 16 41179 0.185862 0.386462 -0.0782184 0.0019670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 17 41180 0.188462 0.384062 -0.0776213 0.0020430 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 18 41181 0.191063 0.381563 -0.0771412 0.0021960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 19 41182 0.193563 0.379063 -0.0768360 0.0023890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 20 41183 0.196063 0.376563 -0.0767289 0.0025860 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 21 41184 0.198463 0.373963 -0.0768088 0.0027540 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 22 41185 0.200764 0.371364 -0.0770407 0.0028710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 23 41186 0.202964 0.368764 -0.0773476 0.0029230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 24 41187 0.205164 0.366064 -0.0776854 0.0029110 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 25 41188 0.207264 0.363364 -0.0779603 0.0028320 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 26 41189 0.209265 0.360565 -0.0781562 0.0027240 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 27 41190 0.211165 0.357765 -0.0782121 0.0025880 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 28 41191 0.213065 0.354965 -0.0781540 0.0024580 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 29 41192 0.214766 0.352066 -0.0779698 0.0023590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 30 41193 0.216466 0.349066 -0.0777117 0.0023170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 8 31 41194 0.218066 0.346066 -0.0774516 0.0023600 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 1 41195 0.219566 0.343066 -0.0772865 0.0024970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 2 41196 0.221067 0.339967 -0.0773004 0.0027400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 3 41197 0.222367 0.336767 -0.0776002 0.0030470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 4 41198 0.223667 0.333567 -0.0782181 0.0033630 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 5 41199 0.224867 0.330267 -0.0791190 0.0035990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 6 41200 0.225968 0.326968 -0.0801739 0.0036800 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 7 41201 0.226968 0.323568 -0.0812178 0.0035690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 8 41202 0.227868 0.320168 -0.0820797 0.0033160 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 9 41203 0.228669 0.316669 -0.0826455 0.0029900 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 10 41204 0.229469 0.313169 -0.0828774 0.0026750 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 11 41205 0.230169 0.309569 -0.0828463 0.0024510 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 12 41206 0.230769 0.305969 -0.0826492 0.0023580 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 13 41207 0.231270 0.302270 -0.0824201 0.0023790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 14 41208 0.231770 0.298570 -0.0822549 0.0024830 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 15 41209 0.232070 0.294870 -0.0822218 0.0026340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 16 41210 0.232370 0.291070 -0.0823467 0.0027960 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 17 41211 0.232571 0.287271 -0.0826266 0.0029490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 18 41212 0.232771 0.283371 -0.0830395 0.0030590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 19 41213 0.232871 0.279471 -0.0835444 0.0031200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 20 41214 0.232872 0.275572 -0.0840782 0.0031170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 21 41215 0.232772 0.271672 -0.0845681 0.0030530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 22 41216 0.232672 0.267672 -0.0849790 0.0029530 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 23 41217 0.232472 0.263772 -0.0852749 0.0028280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 24 41218 0.232173 0.259773 -0.0854448 0.0027040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 25 41219 0.231873 0.255773 -0.0854997 0.0026150 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 26 41220 0.231473 0.251773 -0.0854996 0.0025750 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 27 41221 0.231073 0.247873 -0.0854934 0.0026060 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 28 41222 0.230574 0.243874 -0.0855623 0.0027280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 29 41223 0.230074 0.239874 -0.0857932 0.0029400 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 9 30 41224 0.229474 0.235974 -0.0862921 0.0032500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 1 41225 0.228875 0.231975 -0.0871270 0.0036040 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 2 41226 0.228175 0.228075 -0.0882999 0.0039190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 3 41227 0.227475 0.224175 -0.0897287 0.0041150 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 4 41228 0.226675 0.220275 -0.0912916 0.0041500 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 5 41229 0.225876 0.216376 -0.0927785 0.0039970 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 6 41230 0.224976 0.212476 -0.0940634 0.0037190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 7 41231 0.224076 0.208676 -0.0950353 0.0034080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 8 41232 0.223176 0.204876 -0.0957112 0.0031590 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 9 41233 0.222177 0.201077 -0.0961941 0.0030200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 10 41234 0.221177 0.197277 -0.0966039 0.0030010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 11 41235 0.220077 0.193577 -0.0970498 0.0030850 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 12 41236 0.219078 0.189878 -0.0976117 0.0032250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 13 41237 0.217878 0.186178 -0.0983246 0.0033910 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 14 41238 0.216778 0.182578 -0.0991985 0.0035320 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 15 41239 0.215578 0.178978 -0.1001964 0.0036350 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 16 41240 0.214379 0.175379 -0.1012623 0.0036780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 17 41241 0.213079 0.171879 -0.1023511 0.0036800 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 18 41242 0.211879 0.168379 -0.1034120 0.0036120 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 19 41243 0.210579 0.164979 -0.1043779 0.0035030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 20 41244 0.209180 0.161480 -0.1052178 0.0033630 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 21 41245 0.207880 0.158180 -0.1059107 0.0032170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 22 41246 0.206480 0.154780 -0.1064766 0.0030890 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 23 41247 0.205081 0.151481 -0.1069245 0.0030050 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 24 41248 0.203681 0.148281 -0.1073184 0.0029860 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 25 41249 0.202181 0.145081 -0.1077312 0.0030470 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 26 41250 0.200781 0.141981 -0.1082611 0.0032070 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 27 41251 0.199282 0.138882 -0.1089830 0.0034380 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 28 41252 0.197782 0.135782 -0.1099669 0.0037250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 29 41253 0.196282 0.132782 -0.1112448 0.0040170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 30 41254 0.194682 0.129882 -0.1127987 0.0042460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 10 31 41255 0.193183 0.126983 -0.1145136 0.0043480 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 1 41256 0.191583 0.124183 -0.1162485 0.0042850 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 2 41257 0.189983 0.121383 -0.1178534 0.0040730 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 3 41258 0.188284 0.118684 -0.1191862 0.0037790 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 4 41259 0.186684 0.115984 -0.1202131 0.0034850 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 5 41260 0.184984 0.113384 -0.1209970 0.0032930 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 6 41261 0.183284 0.110784 -0.1216549 0.0032230 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 7 41262 0.181585 0.108285 -0.1223158 0.0032860 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 8 41263 0.179785 0.105785 -0.1230727 0.0034170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 9 41264 0.177985 0.103385 -0.1239776 0.0035850 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 10 41265 0.176186 0.100986 -0.1250365 0.0037290 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 11 41266 0.174286 0.098686 -0.1262324 0.0038250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 12 41267 0.172486 0.096386 -0.1274883 0.0038710 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 13 41268 0.170486 0.094186 -0.1287741 0.0038610 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 14 41269 0.168587 0.091987 -0.1300110 0.0037940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 15 41270 0.166587 0.089887 -0.1311669 0.0036780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 16 41271 0.164587 0.087787 -0.1321648 0.0035150 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 17 41272 0.162487 0.085787 -0.1330007 0.0033390 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 18 41273 0.160388 0.083688 -0.1336556 0.0031650 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 19 41274 0.158288 0.081788 -0.1341535 0.0030190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 20 41275 0.156088 0.079788 -0.1345434 0.0029440 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 21 41276 0.153889 0.077889 -0.1348853 0.0029460 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 22 41277 0.151589 0.075989 -0.1352622 0.0030210 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 23 41278 0.149289 0.074189 -0.1357731 0.0031820 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 24 41279 0.146989 0.072389 -0.1364629 0.0033940 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 25 41280 0.144590 0.070590 -0.1373748 0.0036080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 26 41281 0.142190 0.068790 -0.1384947 0.0038010 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 27 41282 0.139690 0.066990 -0.1397546 0.0038910 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 28 41283 0.137190 0.065290 -0.1410415 0.0038490 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 29 41284 0.134591 0.063591 -0.1422264 0.0036810 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 11 30 41285 0.131991 0.061791 -0.1431903 0.0034130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 1 41286 0.129391 0.060091 -0.1438632 0.0031150 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 2 41287 0.126692 0.058492 -0.1442481 0.0028690 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 3 41288 0.123992 0.056792 -0.1444490 0.0027340 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 4 41289 0.121192 0.055092 -0.1445799 0.0027280 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 5 41290 0.118392 0.053492 -0.1447678 0.0028320 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 6 41291 0.115493 0.051893 -0.1450797 0.0029850 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 7 41292 0.112593 0.050293 -0.1455376 0.0031250 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 8 41293 0.109693 0.048693 -0.1461374 0.0032360 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 9 41294 0.106693 0.047093 -0.1468013 0.0032820 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 10 41295 0.103694 0.045494 -0.1475012 0.0032780 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 11 41296 0.100694 0.043994 -0.1481581 0.0032180 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 12 41297 0.097594 0.042394 -0.1487310 0.0030990 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 13 41298 0.094495 0.040895 -0.1491629 0.0029520 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 14 41299 0.091295 0.039495 -0.1494378 0.0027770 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 15 41300 0.088095 0.037995 -0.1495377 0.0026170 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 16 41301 0.084895 0.036595 -0.1494826 0.0024800 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 17 41302 0.081696 0.035196 -0.1493365 0.0024080 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 18 41303 0.078396 0.033796 -0.1491444 0.0024030 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 19 41304 0.075096 0.032496 -0.1489903 0.0024920 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 20 41305 0.071796 0.031196 -0.1489652 0.0026620 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 21 41306 0.068397 0.029897 -0.1491511 0.0028850 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 22 41307 0.065097 0.028697 -0.1495580 0.0031190 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 23 41308 0.061697 0.027497 -0.1501849 0.0033130 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 24 41309 0.058198 0.026298 -0.1509658 0.0034200 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 25 41310 0.054798 0.025198 -0.1517957 0.0034100 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 26 41311 0.051298 0.024198 -0.1525556 0.0032800 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 27 41312 0.047898 0.023098 -0.1531444 0.0030670 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 28 41313 0.044399 0.022099 -0.1534953 0.0028140 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 29 41314 0.040899 0.021199 -0.1535992 0.0025860 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 30 41315 0.037399 0.020299 -0.1535161 0.0024550 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1971 12 31 41316 0.033899 0.019499 -0.1533590 0.0024410 0.000000 0.000000 0.020000 0.020000 0.0015000 0.0010000 0.003580 0.002000 1972 1 1 41317 0.030400 0.018700 -0.0454859 0.0025390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 2 41318 0.026900 0.017900 -0.0481008 0.0027080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 3 41319 0.023300 0.017200 -0.0509077 0.0028970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 4 41320 0.019801 0.016501 -0.0538936 0.0030650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 5 41321 0.016301 0.015901 -0.0570195 0.0031770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 6 41322 0.012801 0.015301 -0.0602134 0.0032200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 7 41323 0.009301 0.014801 -0.0634283 0.0032010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 8 41324 0.005902 0.014302 -0.0665972 0.0031370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 9 41325 0.002402 0.013902 -0.0696791 0.0030330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 10 41326 -0.001098 0.013502 -0.0726460 0.0028980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 11 41327 -0.004498 0.013202 -0.0754839 0.0027720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 12 41328 -0.007897 0.012903 -0.0782088 0.0026720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 13 41329 -0.011297 0.012703 -0.0808457 0.0026210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 14 41330 -0.014597 0.012503 -0.0834756 0.0026420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 15 41331 -0.017996 0.012304 -0.0861595 0.0027400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 16 41332 -0.021296 0.012204 -0.0889954 0.0029370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 17 41333 -0.024596 0.012104 -0.0920563 0.0031830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 18 41334 -0.027796 0.012104 -0.0953802 0.0034650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 19 41335 -0.030995 0.012105 -0.0989651 0.0037040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 20 41336 -0.034195 0.012105 -0.1027570 0.0038620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 21 41337 -0.037295 0.012205 -0.1066459 0.0038820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 22 41338 -0.040395 0.012305 -0.1104778 0.0037730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 23 41339 -0.043494 0.012406 -0.1141587 0.0035680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 24 41340 -0.046494 0.012606 -0.1176086 0.0033210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 25 41341 -0.049494 0.012806 -0.1208075 0.0030950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 26 41342 -0.052393 0.013007 -0.1238134 0.0029340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 27 41343 -0.055293 0.013307 -0.1267113 0.0028890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 28 41344 -0.058193 0.013607 -0.1296192 0.0029450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 29 41345 -0.060993 0.013907 -0.1326401 0.0030960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 30 41346 -0.063692 0.014208 -0.1358340 0.0032870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 1 31 41347 -0.066392 0.014608 -0.1392209 0.0034690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 1 41348 -0.069092 0.015008 -0.1427668 0.0036140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 2 41349 -0.071791 0.015509 -0.1464147 0.0036790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 3 41350 -0.074491 0.016009 -0.1501106 0.0036820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 4 41351 -0.077091 0.016609 -0.1537675 0.0036120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 5 41352 -0.079591 0.017109 -0.1573194 0.0034950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 6 41353 -0.082090 0.017810 -0.1607483 0.0033500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 7 41354 -0.084590 0.018510 -0.1640172 0.0031890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 8 41355 -0.087090 0.019210 -0.1671311 0.0030460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 9 41356 -0.089490 0.020010 -0.1701220 0.0029350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 10 41357 -0.091889 0.020811 -0.1730219 0.0028780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 11 41358 -0.094189 0.021811 -0.1759038 0.0029130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 12 41359 -0.096489 0.022811 -0.1788787 0.0030400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 13 41360 -0.098688 0.023812 -0.1820136 0.0032430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 14 41361 -0.100888 0.024912 -0.1853935 0.0035100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 15 41362 -0.103088 0.026112 -0.1890314 0.0037720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 16 41363 -0.105288 0.027412 -0.1929123 0.0039600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 17 41364 -0.107487 0.028813 -0.1969072 0.0040150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 18 41365 -0.109687 0.030213 -0.2008901 0.0039160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 19 41366 -0.111887 0.031713 -0.2047060 0.0037000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 20 41367 -0.114087 0.033413 -0.2082679 0.0034110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 21 41368 -0.116286 0.035014 -0.2115408 0.0031420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 22 41369 -0.118386 0.036814 -0.2145778 0.0029480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 23 41370 -0.120486 0.038714 -0.2174737 0.0028720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 24 41371 -0.122585 0.040615 -0.2203586 0.0029070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 25 41372 -0.124685 0.042715 -0.2233065 0.0030310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 26 41373 -0.126785 0.044915 -0.2264074 0.0032070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 27 41374 -0.128885 0.047215 -0.2296923 0.0033910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 28 41375 -0.130984 0.049616 -0.2331582 0.0035450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 2 29 41376 -0.133084 0.052016 -0.2367521 0.0036500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 1 41377 -0.135284 0.054516 -0.2403950 0.0036530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 2 41378 -0.137584 0.057016 -0.2440249 0.0036070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 3 41379 -0.139883 0.059517 -0.2475898 0.0035050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 4 41380 -0.142083 0.062117 -0.2510217 0.0033660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 5 41381 -0.144383 0.064817 -0.2543156 0.0032130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 6 41382 -0.146582 0.067518 -0.2574615 0.0030720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 7 41383 -0.148682 0.070418 -0.2604714 0.0029640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 8 41384 -0.150882 0.073318 -0.2633983 0.0029010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 9 41385 -0.152882 0.076218 -0.2662972 0.0029110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 10 41386 -0.154981 0.079219 -0.2692491 0.0030080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 11 41387 -0.156981 0.082319 -0.2723520 0.0032030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 12 41388 -0.158881 0.085419 -0.2756800 0.0034630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 13 41389 -0.160781 0.088619 -0.2792889 0.0037550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 14 41390 -0.162580 0.091820 -0.2831778 0.0040120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 15 41391 -0.164380 0.095020 -0.2872767 0.0041620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 16 41392 -0.166080 0.098320 -0.2914486 0.0041550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 17 41393 -0.167679 0.101621 -0.2955415 0.0039880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 18 41394 -0.169279 0.105021 -0.2993964 0.0037120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 19 41395 -0.170879 0.108321 -0.3029563 0.0034110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 20 41396 -0.172379 0.111721 -0.3062392 0.0031690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 21 41397 -0.173778 0.115122 -0.3093421 0.0030380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 22 41398 -0.175078 0.118622 -0.3123650 0.0030290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 23 41399 -0.176478 0.122022 -0.3154329 0.0031190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 24 41400 -0.177678 0.125522 -0.3186218 0.0032660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 25 41401 -0.178877 0.128923 -0.3219687 0.0034290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 26 41402 -0.180077 0.132423 -0.3254717 0.0035710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 27 41403 -0.181077 0.135923 -0.3290956 0.0036670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 28 41404 -0.182176 0.139424 -0.3327855 0.0037120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 29 41405 -0.183176 0.142824 -0.3364864 0.0036790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 30 41406 -0.184076 0.146324 -0.3401333 0.0035960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 3 31 41407 -0.184976 0.149824 -0.3436732 0.0034690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 1 41408 -0.185775 0.153225 -0.3470731 0.0033310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 2 41409 -0.186575 0.156725 -0.3503250 0.0031860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 3 41410 -0.187275 0.160125 -0.3534539 0.0030780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 4 41411 -0.187975 0.163525 -0.3564968 0.0030180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 5 41412 -0.188574 0.167026 -0.3595117 0.0030230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 6 41413 -0.189074 0.170326 -0.3625677 0.0031020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 7 41414 -0.189574 0.173726 -0.3657436 0.0032630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 8 41415 -0.190073 0.177127 -0.3691205 0.0034910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 9 41416 -0.190473 0.180427 -0.3727434 0.0037710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 10 41417 -0.190773 0.183727 -0.3766533 0.0040550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 11 41418 -0.191073 0.187027 -0.3808232 0.0042680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 12 41419 -0.191372 0.190328 -0.3851471 0.0043550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 13 41420 -0.191572 0.193528 -0.3894780 0.0042790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 14 41421 -0.191672 0.196728 -0.3936569 0.0040500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 15 41422 -0.191772 0.199928 -0.3975619 0.0037450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 16 41423 -0.191771 0.203029 -0.4011628 0.0034570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 17 41424 -0.191771 0.206129 -0.4045077 0.0032530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 18 41425 -0.191671 0.209229 -0.4077136 0.0031800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 19 41426 -0.191570 0.212330 -0.4109075 0.0032250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 20 41427 -0.191370 0.215330 -0.4141874 0.0033420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 21 41428 -0.191170 0.218330 -0.4175983 0.0034800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 22 41429 -0.190870 0.221230 -0.4211392 0.0035980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 23 41430 -0.190569 0.224231 -0.4247781 0.0036720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 24 41431 -0.190169 0.227131 -0.4284641 0.0036900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 25 41432 -0.189769 0.229931 -0.4321390 0.0036480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 26 41433 -0.189268 0.232732 -0.4357519 0.0035590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 27 41434 -0.188668 0.235532 -0.4392418 0.0034240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 28 41435 -0.188168 0.238332 -0.4425917 0.0032620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 29 41436 -0.187468 0.241032 -0.4457746 0.0031070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 4 30 41437 -0.186867 0.243733 -0.4488115 0.0029730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 1 41438 -0.186067 0.246433 -0.4517355 0.0028830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 2 41439 -0.185267 0.249033 -0.4545874 0.0028520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 3 41440 -0.184467 0.251633 -0.4574613 0.0029000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 4 41441 -0.183566 0.254134 -0.4604112 0.0030200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 5 41442 -0.182666 0.256734 -0.4635241 0.0032180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 6 41443 -0.181666 0.259234 -0.4668640 0.0034590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 7 41444 -0.180665 0.261635 -0.4704579 0.0037300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 8 41445 -0.179565 0.264035 -0.4743259 0.0039740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 9 41446 -0.178365 0.266435 -0.4783888 0.0041340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 10 41447 -0.177165 0.268835 -0.4825487 0.0041620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 11 41448 -0.175964 0.271136 -0.4866536 0.0040360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 12 41449 -0.174664 0.273436 -0.4905835 0.0038110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 13 41450 -0.173264 0.275736 -0.4942744 0.0035530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 14 41451 -0.171864 0.278036 -0.4977083 0.0033320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 15 41452 -0.170363 0.280237 -0.5009773 0.0032280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 16 41453 -0.168863 0.282437 -0.5042002 0.0032470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 17 41454 -0.167263 0.284637 -0.5074951 0.0033440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 18 41455 -0.165562 0.286838 -0.5109020 0.0034810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 19 41456 -0.163862 0.288938 -0.5144409 0.0036020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 20 41457 -0.162162 0.291038 -0.5180888 0.0036830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 21 41458 -0.160362 0.293138 -0.5217768 0.0036930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 22 41459 -0.158461 0.295239 -0.5254537 0.0036420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 23 41460 -0.156561 0.297339 -0.5290426 0.0035270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 24 41461 -0.154561 0.299439 -0.5325015 0.0033770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 25 41462 -0.152561 0.301539 -0.5357864 0.0031980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 26 41463 -0.150460 0.303540 -0.5388853 0.0030020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 27 41464 -0.148360 0.305640 -0.5418043 0.0028310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 28 41465 -0.146160 0.307640 -0.5445712 0.0027000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 29 41466 -0.143959 0.309641 -0.5472231 0.0026260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 30 41467 -0.141759 0.311741 -0.5498350 0.0026210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 5 31 41468 -0.139359 0.313741 -0.5524879 0.0026860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 1 41469 -0.137059 0.315741 -0.5552298 0.0028150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 2 41470 -0.134658 0.317742 -0.5581348 0.0030010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 3 41471 -0.132258 0.319842 -0.5612377 0.0031960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 4 41472 -0.129758 0.321842 -0.5645296 0.0033820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 5 41473 -0.127358 0.323842 -0.5679805 0.0034970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 6 41474 -0.124757 0.325843 -0.5714994 0.0035210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 7 41475 -0.122257 0.327843 -0.5749814 0.0034240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 8 41476 -0.119657 0.329843 -0.5783093 0.0032170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 9 41477 -0.117056 0.331844 -0.5813852 0.0029510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 10 41478 -0.114356 0.333744 -0.5842071 0.0026910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 11 41479 -0.111756 0.335744 -0.5868070 0.0025280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 12 41480 -0.109056 0.337744 -0.5893159 0.0024920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 13 41481 -0.106355 0.339745 -0.5918409 0.0025750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 14 41482 -0.103555 0.341645 -0.5944888 0.0027270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 15 41483 -0.100755 0.343645 -0.5972967 0.0028840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 16 41484 -0.098055 0.345545 -0.6002416 0.0029850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 17 41485 -0.095254 0.347446 -0.6032425 0.0030250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 18 41486 -0.092354 0.349346 -0.6062565 0.0029820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 19 41487 -0.089554 0.351346 -0.6091954 0.0028880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 20 41488 -0.086653 0.353147 -0.6120173 0.0027480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 21 41489 -0.083753 0.355047 -0.6146922 0.0025790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 22 41490 -0.080853 0.356947 -0.6171812 0.0023980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 23 41491 -0.077953 0.358747 -0.6194931 0.0022390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 24 41492 -0.075052 0.360648 -0.6216600 0.0021140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 25 41493 -0.072052 0.362448 -0.6237279 0.0020440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 26 41494 -0.069152 0.364248 -0.6257598 0.0020420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 27 41495 -0.066152 0.366048 -0.6278378 0.0021250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 28 41496 -0.063151 0.367749 -0.6300337 0.0022760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 29 41497 -0.060151 0.369549 -0.6324066 0.0024770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 6 30 41498 -0.057151 0.371249 -0.6349935 0.0027070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 1 41499 -0.054050 0.372950 0.3621956 0.0029080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 2 41500 -0.051050 0.374550 0.3592006 0.0030580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 3 41501 -0.047950 0.376250 0.3561097 0.0031050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 4 41502 -0.044950 0.377850 0.3530268 0.0030450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 5 41503 -0.041849 0.379451 0.3500439 0.0028870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 6 41504 -0.038749 0.380951 0.3472639 0.0026670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 7 41505 -0.035649 0.382451 0.3447110 0.0024350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 8 41506 -0.032549 0.383951 0.3423751 0.0022620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 9 41507 -0.029448 0.385352 0.3401592 0.0021880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 10 41508 -0.026348 0.386752 0.3379592 0.0022230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 11 41509 -0.023248 0.388152 0.3356723 0.0023310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 12 41510 -0.020147 0.389453 0.3332844 0.0024750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 13 41511 -0.016947 0.390653 0.3307405 0.0026140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 14 41512 -0.013847 0.391953 0.3280816 0.0027040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 15 41513 -0.010747 0.393053 0.3253726 0.0027000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 16 41514 -0.007646 0.394254 0.3226967 0.0026500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 17 41515 -0.004546 0.395354 0.3201008 0.0025340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 18 41516 -0.001446 0.396354 0.3176409 0.0023930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 19 41517 0.001654 0.397354 0.3153199 0.0022370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 20 41518 0.004655 0.398355 0.3131630 0.0020880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 21 41519 0.007755 0.399255 0.3111441 0.0019780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 22 41520 0.010755 0.400055 0.3092012 0.0019180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 23 41521 0.013756 0.400856 0.3072862 0.0019240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 24 41522 0.016756 0.401656 0.3053273 0.0020160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 25 41523 0.019756 0.402356 0.3032384 0.0021730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 26 41524 0.022656 0.402956 0.3009495 0.0024020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 27 41525 0.025557 0.403557 0.2984135 0.0026630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 28 41526 0.028457 0.404157 0.2956176 0.0029230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 29 41527 0.031257 0.404657 0.2925977 0.0031140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 30 41528 0.034058 0.405058 0.2894227 0.0032060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 7 31 41529 0.036758 0.405458 0.2862148 0.0031910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 1 41530 0.039458 0.405858 0.2830859 0.0030540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 2 41531 0.042158 0.406158 0.2801290 0.0028530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 3 41532 0.044759 0.406459 0.2773810 0.0026460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 4 41533 0.047359 0.406659 0.2748301 0.0024790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 5 41534 0.049859 0.406759 0.2723912 0.0023960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 6 41535 0.052359 0.406859 0.2700003 0.0024060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 7 41536 0.054760 0.406960 0.2675373 0.0025240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 8 41537 0.057160 0.406960 0.2649414 0.0026910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 9 41538 0.059460 0.406860 0.2621645 0.0028500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 10 41539 0.061761 0.406761 0.2592475 0.0029600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 11 41540 0.063961 0.406561 0.2562806 0.0029800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 12 41541 0.066161 0.406361 0.2533167 0.0029230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 13 41542 0.068261 0.406061 0.2504588 0.0027950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 14 41543 0.070262 0.405762 0.2477338 0.0026290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 15 41544 0.072362 0.405362 0.2452079 0.0024300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 16 41545 0.074262 0.404862 0.2428730 0.0022330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 17 41546 0.076162 0.404362 0.2407260 0.0020790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 18 41547 0.078063 0.403763 0.2387111 0.0019590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 19 41548 0.079863 0.403163 0.2367862 0.0019110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 20 41549 0.081663 0.402363 0.2348643 0.0019460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 21 41550 0.083364 0.401664 0.2328693 0.0020570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 22 41551 0.085064 0.400764 0.2307274 0.0022490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 23 41552 0.086664 0.399864 0.2283655 0.0024910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 24 41553 0.088264 0.398864 0.2257515 0.0027450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 25 41554 0.089865 0.397765 0.2228886 0.0029690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 26 41555 0.091365 0.396665 0.2198547 0.0031000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 27 41556 0.092865 0.395465 0.2167317 0.0031120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 28 41557 0.094265 0.394265 0.2136628 0.0029980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 29 41558 0.095666 0.392966 0.2107649 0.0027980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 30 41559 0.097066 0.391566 0.2080740 0.0025770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 8 31 41560 0.098466 0.390166 0.2055960 0.0024000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 1 41561 0.099767 0.388667 0.2032421 0.0023170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 2 41562 0.101067 0.387067 0.2009152 0.0023450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 3 41563 0.102267 0.385467 0.1985182 0.0024730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 4 41564 0.103567 0.383767 0.1959473 0.0026680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 5 41565 0.104768 0.382068 0.1931764 0.0028820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 6 41566 0.105968 0.380368 0.1901914 0.0030690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 7 41567 0.107168 0.378568 0.1870595 0.0031830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 8 41568 0.108268 0.376668 0.1838536 0.0032240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 9 41569 0.109469 0.374769 0.1806376 0.0031870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 10 41570 0.110569 0.372869 0.1775007 0.0030780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 11 41571 0.111669 0.370969 0.1744928 0.0029350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 12 41572 0.112770 0.368970 0.1716338 0.0027940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 13 41573 0.113870 0.366870 0.1688999 0.0026690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 14 41574 0.114970 0.364870 0.1662820 0.0025740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 15 41575 0.116070 0.362770 0.1637230 0.0025440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 16 41576 0.117171 0.360671 0.1611721 0.0025800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 17 41577 0.118271 0.358471 0.1585382 0.0026900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 18 41578 0.119371 0.356371 0.1557772 0.0028620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 19 41579 0.120471 0.354171 0.1527943 0.0031040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 20 41580 0.121572 0.351972 0.1495584 0.0033700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 21 41581 0.122672 0.349672 0.1460474 0.0036370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 22 41582 0.123772 0.347472 0.1423065 0.0038290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 23 41583 0.124873 0.345173 0.1384286 0.0039040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 24 41584 0.125973 0.342873 0.1345356 0.0038470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 25 41585 0.127173 0.340573 0.1307847 0.0036610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 26 41586 0.128273 0.338273 0.1272448 0.0034150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 27 41587 0.129474 0.335974 0.1239578 0.0031790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 28 41588 0.130574 0.333574 0.1208569 0.0030410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 29 41589 0.131774 0.331274 0.1178350 0.0030120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 9 30 41590 0.132974 0.328874 0.1147850 0.0030930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 1 41591 0.134075 0.326475 0.1116131 0.0032480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 2 41592 0.135275 0.324075 0.1082811 0.0034280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 3 41593 0.136475 0.321675 0.1047742 0.0035800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 4 41594 0.137676 0.319276 0.1011273 0.0036830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 5 41595 0.138876 0.316776 0.0974223 0.0037160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 6 41596 0.140076 0.314376 0.0937204 0.0036660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 7 41597 0.141276 0.311876 0.0901025 0.0035610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 8 41598 0.142477 0.309377 0.0866235 0.0034020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 9 41599 0.143577 0.306877 0.0833036 0.0032250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 10 41600 0.144777 0.304377 0.0801607 0.0030550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 11 41601 0.145977 0.301877 0.0771827 0.0029180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 12 41602 0.147078 0.299378 0.0743188 0.0028300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 13 41603 0.148178 0.296878 0.0715018 0.0028050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 14 41604 0.149278 0.294378 0.0686849 0.0028480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 15 41605 0.150279 0.291879 0.0657940 0.0029470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 16 41606 0.151379 0.289379 0.0627610 0.0031160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 17 41607 0.152379 0.286779 0.0595471 0.0033290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 18 41608 0.153279 0.284279 0.0560992 0.0035560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 19 41609 0.154280 0.281780 0.0524442 0.0037530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 20 41610 0.155080 0.279280 0.0486223 0.0038650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 21 41611 0.155980 0.276780 0.0447563 0.0038520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 22 41612 0.156781 0.274281 0.0409634 0.0037040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 23 41613 0.157481 0.271781 0.0373825 0.0034470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 24 41614 0.158181 0.269281 0.0340675 0.0031760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 25 41615 0.158781 0.266781 0.0310106 0.0029640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 26 41616 0.159382 0.264382 0.0281106 0.0028570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 27 41617 0.159882 0.261882 0.0252537 0.0028850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 28 41618 0.160382 0.259482 0.0223188 0.0029950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 29 41619 0.160782 0.257082 0.0192408 0.0031510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 30 41620 0.161183 0.254683 0.0160329 0.0032810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 10 31 41621 0.161483 0.252383 0.0126969 0.0033700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 1 41622 0.161683 0.250083 0.0093150 0.0033940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 2 41623 0.161884 0.247784 0.0059321 0.0033610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 3 41624 0.162084 0.245484 0.0026121 0.0032610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 4 41625 0.162184 0.243284 -0.0005848 0.0031260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 5 41626 0.162184 0.241084 -0.0036308 0.0029660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 6 41627 0.162185 0.238885 -0.0065167 0.0028160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 7 41628 0.162085 0.236685 -0.0092726 0.0026910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 8 41629 0.161985 0.234585 -0.0119246 0.0026210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 9 41630 0.161885 0.232485 -0.0145245 0.0026100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 10 41631 0.161686 0.230486 -0.0171555 0.0026530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 11 41632 0.161486 0.228486 -0.0198624 0.0027690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 12 41633 0.161186 0.226486 -0.0227224 0.0029390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 13 41634 0.160887 0.224487 -0.0257643 0.0031520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 14 41635 0.160487 0.222587 -0.0290322 0.0033940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 15 41636 0.160187 0.220587 -0.0325392 0.0036170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 16 41637 0.159787 0.218687 -0.0362481 0.0037880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 17 41638 0.159388 0.216888 -0.0400841 0.0038650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 18 41639 0.158888 0.214988 -0.0439390 0.0038230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 19 41640 0.158388 0.213088 -0.0476940 0.0036700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 20 41641 0.157888 0.211288 -0.0512579 0.0034560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 21 41642 0.157389 0.209389 -0.0546098 0.0032560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 22 41643 0.156889 0.207589 -0.0578008 0.0031460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 23 41644 0.156389 0.205689 -0.0609437 0.0031630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 24 41645 0.155790 0.203890 -0.0641647 0.0032930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 25 41646 0.155190 0.201990 -0.0675406 0.0034750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 26 41647 0.154590 0.200190 -0.0711126 0.0036520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 27 41648 0.153990 0.198290 -0.0748375 0.0037750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 28 41649 0.153391 0.196391 -0.0786364 0.0038120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 29 41650 0.152791 0.194491 -0.0824264 0.0037670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 11 30 41651 0.152191 0.192591 -0.0861503 0.0036630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 1 41652 0.151491 0.190691 -0.0897383 0.0035080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 2 41653 0.150892 0.188792 -0.0931682 0.0033410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 3 41654 0.150192 0.186792 -0.0964192 0.0031500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 4 41655 0.149492 0.184892 -0.0994761 0.0029790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 5 41656 0.148893 0.182893 -0.1023891 0.0028570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 6 41657 0.148193 0.180893 -0.1052090 0.0027920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 7 41658 0.147493 0.178793 -0.1079840 0.0027810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 8 41659 0.146793 0.176793 -0.1107919 0.0028320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 9 41660 0.146094 0.174694 -0.1136778 0.0029380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 10 41661 0.145294 0.172594 -0.1166898 0.0031020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 11 41662 0.144594 0.170494 -0.1198767 0.0032730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 12 41663 0.143894 0.168394 -0.1232337 0.0034460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 13 41664 0.143095 0.166295 -0.1267456 0.0035800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 14 41665 0.142295 0.164095 -0.1303706 0.0036440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 15 41666 0.141595 0.161995 -0.1340125 0.0036240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 16 41667 0.140796 0.159796 -0.1375735 0.0034950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 17 41668 0.139896 0.157596 -0.1409774 0.0033030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 18 41669 0.139096 0.155396 -0.1441854 0.0031060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 19 41670 0.138196 0.153196 -0.1472073 0.0029630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 20 41671 0.137397 0.150997 -0.1501363 0.0029180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 21 41672 0.136397 0.148797 -0.1530952 0.0030080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 22 41673 0.135497 0.146597 -0.1561932 0.0031870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 23 41674 0.134597 0.144297 -0.1594781 0.0033920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 24 41675 0.133598 0.142098 -0.1629631 0.0035560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 25 41676 0.132598 0.139898 -0.1665510 0.0036260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 26 41677 0.131598 0.137798 -0.1701840 0.0036150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 27 41678 0.130499 0.135599 -0.1737559 0.0035190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 28 41679 0.129399 0.133399 -0.1771979 0.0033760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 29 41680 0.128299 0.131299 -0.1804908 0.0032100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 30 41681 0.127199 0.129199 -0.1836158 0.0030410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1972 12 31 41682 0.126000 0.127100 -0.1865687 0.0028890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 1 41683 0.124800 0.125000 0.8105944 0.0027730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 2 41684 0.123500 0.123000 0.8078584 0.0027100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 3 41685 0.122300 0.121000 0.8051525 0.0027220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 4 41686 0.120901 0.119001 0.8024015 0.0027910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 5 41687 0.119601 0.117101 0.7995416 0.0029280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 6 41688 0.118201 0.115201 0.7965306 0.0031080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 7 41689 0.116802 0.113402 0.7933287 0.0033170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 8 41690 0.115302 0.111602 0.7899097 0.0035070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 9 41691 0.113802 0.109802 0.7863177 0.0036550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 10 41692 0.112202 0.108102 0.7826208 0.0037260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 11 41693 0.110603 0.106503 0.7788958 0.0037110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 12 41694 0.109003 0.105003 0.7752289 0.0035990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 13 41695 0.107303 0.103403 0.7717109 0.0034200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 14 41696 0.105604 0.102004 0.7683970 0.0031970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 15 41697 0.103804 0.100604 0.7653050 0.0030060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 16 41698 0.102004 0.099304 0.7623651 0.0029000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 17 41699 0.100104 0.098004 0.7594751 0.0029000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 18 41700 0.098205 0.096805 0.7565292 0.0030070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 19 41701 0.096305 0.095705 0.7534322 0.0031820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 20 41702 0.094305 0.094605 0.7501683 0.0033480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 21 41703 0.092305 0.093605 0.7467603 0.0034550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 22 41704 0.090306 0.092606 0.7432924 0.0034720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 23 41705 0.088306 0.091806 0.7398474 0.0034030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 24 41706 0.086206 0.090906 0.7365095 0.0032640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 25 41707 0.084107 0.090107 0.7333215 0.0030990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 26 41708 0.082007 0.089407 0.7303046 0.0029270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 27 41709 0.079907 0.088807 0.7274526 0.0027890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 28 41710 0.077707 0.088207 0.7247257 0.0026740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 29 41711 0.075608 0.087608 0.7220887 0.0026200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 30 41712 0.073408 0.087108 0.7194757 0.0026190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 1 31 41713 0.071308 0.086608 0.7168188 0.0026970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 1 41714 0.069108 0.086208 0.7140608 0.0028500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 2 41715 0.067009 0.085809 0.7111109 0.0030460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 3 41716 0.064909 0.085509 0.7079499 0.0032710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 4 41717 0.062809 0.085209 0.7045700 0.0034960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 5 41718 0.060610 0.085010 0.7009800 0.0036740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 6 41719 0.058510 0.084810 0.6972361 0.0037910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 7 41720 0.056410 0.084710 0.6934291 0.0038140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 8 41721 0.054410 0.084510 0.6896492 0.0037340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 9 41722 0.052311 0.084511 0.6859972 0.0035720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 10 41723 0.050211 0.084411 0.6825032 0.0033930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 11 41724 0.048211 0.084411 0.6792013 0.0032290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 12 41725 0.046111 0.084411 0.6760223 0.0031370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 13 41726 0.044112 0.084412 0.6728844 0.0031480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 14 41727 0.042112 0.084512 0.6696794 0.0032660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 15 41728 0.040112 0.084612 0.6663255 0.0034620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 16 41729 0.038013 0.084713 0.6627585 0.0036710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 17 41730 0.036013 0.084813 0.6590055 0.0038320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 18 41731 0.034013 0.085013 0.6551316 0.0038990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 19 41732 0.032013 0.085213 0.6512426 0.0038730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 20 41733 0.030014 0.085414 0.6474257 0.0037470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 21 41734 0.028014 0.085614 0.6437687 0.0035520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 22 41735 0.025914 0.085814 0.6403188 0.0033440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 23 41736 0.023914 0.086014 0.6370878 0.0031320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 24 41737 0.021915 0.086315 0.6340458 0.0029490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 25 41738 0.019815 0.086515 0.6311749 0.0028120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 26 41739 0.017815 0.086815 0.6284009 0.0027350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 27 41740 0.015716 0.087116 0.6256820 0.0027350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 2 28 41741 0.013616 0.087416 0.6229080 0.0028140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 1 41742 0.011616 0.087716 0.6200251 0.0029520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 2 41743 0.009516 0.088016 0.6169801 0.0031440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 3 41744 0.007417 0.088417 0.6137421 0.0033420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 4 41745 0.005317 0.088717 0.6103022 0.0035310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 5 41746 0.003117 0.089017 0.6067022 0.0036690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 6 41747 0.001017 0.089417 0.6030073 0.0037120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 7 41748 -0.001082 0.089818 0.5993143 0.0036560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 8 41749 -0.003182 0.090118 0.5957253 0.0035190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 9 41750 -0.005382 0.090518 0.5922824 0.0033460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 10 41751 -0.007481 0.091019 0.5890194 0.0031860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 11 41752 -0.009581 0.091419 0.5858875 0.0030930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 12 41753 -0.011681 0.091819 0.5828015 0.0030990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 13 41754 -0.013881 0.092319 0.5796535 0.0032110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 14 41755 -0.015980 0.092820 0.5763516 0.0034130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 15 41756 -0.018080 0.093320 0.5728156 0.0036640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 16 41757 -0.020180 0.093920 0.5690297 0.0038920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 17 41758 -0.022280 0.094520 0.5650497 0.0040620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 18 41759 -0.024279 0.095121 0.5609337 0.0041340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 19 41760 -0.026379 0.095721 0.5568028 0.0041040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 20 41761 -0.028479 0.096421 0.5527518 0.0039800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 21 41762 -0.030478 0.097222 0.5488569 0.0038140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 22 41763 -0.032578 0.098022 0.5451369 0.0036290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 23 41764 -0.034578 0.098822 0.5415929 0.0034440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 24 41765 -0.036578 0.099722 0.5382250 0.0033000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 25 41766 -0.038577 0.100623 0.5349760 0.0032100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 26 41767 -0.040577 0.101623 0.5317740 0.0031940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 27 41768 -0.042577 0.102723 0.5285651 0.0032340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 28 41769 -0.044577 0.103823 0.5252851 0.0033350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 29 41770 -0.046576 0.104924 0.5218782 0.0034860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 30 41771 -0.048576 0.106124 0.5182932 0.0036780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 3 31 41772 -0.050476 0.107424 0.5145222 0.0038610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 1 41773 -0.052475 0.108725 0.5105833 0.0040180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 2 41774 -0.054475 0.110125 0.5065233 0.0040970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 3 41775 -0.056375 0.111525 0.5024243 0.0040690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 4 41776 -0.058375 0.113025 0.4984214 0.0039310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 5 41777 -0.060274 0.114626 0.4945984 0.0037070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 6 41778 -0.062174 0.116226 0.4910034 0.0034770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 7 41779 -0.064174 0.117826 0.4876275 0.0032880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 8 41780 -0.066073 0.119527 0.4844035 0.0031990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 9 41781 -0.067973 0.121227 0.4812026 0.0032200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 10 41782 -0.069873 0.123027 0.4779246 0.0033370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 11 41783 -0.071673 0.124827 0.4745136 0.0034980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 12 41784 -0.073572 0.126728 0.4709417 0.0036420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 13 41785 -0.075372 0.128628 0.4672347 0.0037520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 14 41786 -0.077172 0.130528 0.4634527 0.0037900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 15 41787 -0.078972 0.132428 0.4596818 0.0037480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 16 41788 -0.080671 0.134429 0.4559808 0.0036340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 17 41789 -0.082471 0.136329 0.4524208 0.0034790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 18 41790 -0.084171 0.138329 0.4490389 0.0032930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 19 41791 -0.085770 0.140330 0.4458319 0.0031150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 20 41792 -0.087470 0.142330 0.4427969 0.0029700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 21 41793 -0.089070 0.144330 0.4398850 0.0028750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 22 41794 -0.090570 0.146330 0.4370380 0.0028410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 23 41795 -0.092069 0.148231 0.4341930 0.0028680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 24 41796 -0.093569 0.150231 0.4312921 0.0029540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 25 41797 -0.095069 0.152131 0.4282781 0.0030890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 26 41798 -0.096469 0.154131 0.4251011 0.0032590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 27 41799 -0.097768 0.156032 0.4217562 0.0034520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 28 41800 -0.099168 0.157932 0.4182122 0.0036300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 29 41801 -0.100468 0.159832 0.4145122 0.0037680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 4 30 41802 -0.101667 0.161733 0.4107153 0.0038200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 1 41803 -0.102867 0.163633 0.4069183 0.0037650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 2 41804 -0.104067 0.165433 0.4032163 0.0036340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 3 41805 -0.105267 0.167333 0.3996674 0.0034530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 4 41806 -0.106366 0.169134 0.3962954 0.0032810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 5 41807 -0.107466 0.170934 0.3930764 0.0031830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 6 41808 -0.108466 0.172634 0.3898895 0.0032010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 7 41809 -0.109466 0.174434 0.3866395 0.0033130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 8 41810 -0.110465 0.176135 0.3832445 0.0034710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 9 41811 -0.111365 0.177835 0.3796995 0.0036260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 10 41812 -0.112265 0.179535 0.3760196 0.0037130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 11 41813 -0.113164 0.181236 0.3722876 0.0037370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 12 41814 -0.113964 0.182936 0.3685706 0.0036660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 13 41815 -0.114764 0.184536 0.3649667 0.0035310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 14 41816 -0.115564 0.186236 0.3615247 0.0033480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 15 41817 -0.116263 0.187837 0.3582797 0.0031400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 16 41818 -0.117063 0.189437 0.3552538 0.0029240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 17 41819 -0.117663 0.191037 0.3524238 0.0027320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 18 41820 -0.118363 0.192537 0.3497638 0.0025960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 19 41821 -0.119062 0.194138 0.3472129 0.0025170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 20 41822 -0.119662 0.195638 0.3447089 0.0025000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 21 41823 -0.120162 0.197238 0.3421939 0.0025500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 22 41824 -0.120761 0.198739 0.3395929 0.0026570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 23 41825 -0.121261 0.200239 0.3368690 0.0027960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 24 41826 -0.121761 0.201739 0.3339860 0.0029600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 25 41827 -0.122161 0.203239 0.3309410 0.0031270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 26 41828 -0.122560 0.204840 0.3277531 0.0032520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 27 41829 -0.122960 0.206340 0.3244481 0.0033360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 28 41830 -0.123260 0.207840 0.3211101 0.0033330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 29 41831 -0.123560 0.209340 0.3178141 0.0032370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 30 41832 -0.123759 0.210841 0.3146612 0.0030610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 5 31 41833 -0.123959 0.212441 0.3116972 0.0028800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 1 41834 -0.124059 0.213941 0.3088922 0.0027530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 2 41835 -0.124058 0.215442 0.3061542 0.0027330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 3 41836 -0.124058 0.217042 0.3033863 0.0028210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 4 41837 -0.124058 0.218642 0.3004843 0.0029920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 5 41838 -0.123958 0.220142 0.2973873 0.0031800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 6 41839 -0.123757 0.221743 0.2941294 0.0033230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 7 41840 -0.123557 0.223343 0.2907594 0.0033820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 8 41841 -0.123257 0.224943 0.2873864 0.0033410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 9 41842 -0.122957 0.226543 0.2841024 0.0032270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 10 41843 -0.122556 0.228144 0.2809475 0.0030670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 11 41844 -0.122056 0.229844 0.2779655 0.0028760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 12 41845 -0.121556 0.231444 0.2751855 0.0026860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 13 41846 -0.121055 0.233145 0.2725865 0.0025080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 14 41847 -0.120455 0.234745 0.2701476 0.0023690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 15 41848 -0.119755 0.236445 0.2678286 0.0022870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 16 41849 -0.119055 0.238145 0.2655536 0.0022650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 17 41850 -0.118254 0.239846 0.2632776 0.0022940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 18 41851 -0.117454 0.241646 0.2609497 0.0023710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 19 41852 -0.116554 0.243346 0.2585257 0.0024710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 20 41853 -0.115654 0.245146 0.2559937 0.0025940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 21 41854 -0.114753 0.246947 0.2533407 0.0027090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 22 41855 -0.113753 0.248747 0.2505848 0.0027860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 23 41856 -0.112653 0.250547 0.2477848 0.0028220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 24 41857 -0.111552 0.252348 0.2449728 0.0027900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 25 41858 -0.110452 0.254248 0.2422308 0.0026800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 26 41859 -0.109352 0.256148 0.2396369 0.0025010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 27 41860 -0.108152 0.258048 0.2372319 0.0023100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 28 41861 -0.106851 0.259949 0.2349999 0.0021520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 29 41862 -0.105651 0.261849 0.2328999 0.0020760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 6 30 41863 -0.104351 0.263849 0.2308099 0.0021160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 1 41864 -0.103050 0.265850 0.2286230 0.0022720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 2 41865 -0.101650 0.267750 0.2262580 0.0024710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 3 41866 -0.100250 0.269750 0.2236880 0.0026600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 4 41867 -0.098850 0.271750 0.2209650 0.0027690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 5 41868 -0.097449 0.273751 0.2181871 0.0027690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 6 41869 -0.095949 0.275751 0.2154591 0.0026820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 7 41870 -0.094449 0.277751 0.2128531 0.0025320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 8 41871 -0.092949 0.279751 0.2104131 0.0023460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 9 41872 -0.091448 0.281752 0.2081511 0.0021710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 10 41873 -0.089948 0.283652 0.2060532 0.0020190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 11 41874 -0.088448 0.285652 0.2040902 0.0019170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 12 41875 -0.086947 0.287553 0.2022032 0.0018770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 13 41876 -0.085347 0.289353 0.2003262 0.0018880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 14 41877 -0.083847 0.291253 0.1984063 0.0019720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 15 41878 -0.082347 0.293053 0.1963743 0.0021000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 16 41879 -0.080746 0.294754 0.1941833 0.0022760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 17 41880 -0.079246 0.296454 0.1918163 0.0024690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 18 41881 -0.077746 0.298154 0.1892473 0.0026560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 19 41882 -0.076246 0.299754 0.1865164 0.0028020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 20 41883 -0.074745 0.301355 0.1836504 0.0029080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 21 41884 -0.073245 0.302855 0.1807224 0.0029570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 22 41885 -0.071745 0.304255 0.1777604 0.0029360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 23 41886 -0.070244 0.305656 0.1748724 0.0028230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 24 41887 -0.068744 0.306956 0.1721265 0.0026650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 25 41888 -0.067244 0.308156 0.1695385 0.0025060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 26 41889 -0.065844 0.309356 0.1670945 0.0023860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 27 41890 -0.064343 0.310457 0.1647325 0.0023660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 28 41891 -0.062843 0.311557 0.1623235 0.0024570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 29 41892 -0.061343 0.312457 0.1597815 0.0026390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 30 41893 -0.059943 0.313457 0.1570406 0.0028300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 7 31 41894 -0.058442 0.314258 0.1541386 0.0029490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 1 41895 -0.056942 0.315058 0.1511876 0.0029640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 2 41896 -0.055542 0.315758 0.1482516 0.0028820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 3 41897 -0.054041 0.316459 0.1454456 0.0027170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 4 41898 -0.052541 0.317059 0.1428337 0.0025110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 5 41899 -0.051041 0.317659 0.1404357 0.0022870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 6 41900 -0.049541 0.318159 0.1382427 0.0021050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 7 41901 -0.048040 0.318660 0.1362127 0.0019620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 8 41902 -0.046540 0.319060 0.1343097 0.0018720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 9 41903 -0.044940 0.319460 0.1324477 0.0018520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 10 41904 -0.043440 0.319760 0.1305748 0.0019060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 11 41905 -0.041939 0.320061 0.1286168 0.0020290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 12 41906 -0.040339 0.320361 0.1265108 0.0021880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 13 41907 -0.038839 0.320661 0.1242328 0.0023830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 14 41908 -0.037238 0.320862 0.1217448 0.0025790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 15 41909 -0.035738 0.321062 0.1190738 0.0027600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 16 41910 -0.034138 0.321362 0.1162539 0.0028800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 17 41911 -0.032538 0.321562 0.1133479 0.0029290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 18 41912 -0.030937 0.321763 0.1104209 0.0029030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 19 41913 -0.029337 0.321963 0.1075549 0.0028090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 20 41914 -0.027737 0.322163 0.1048049 0.0026790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 21 41915 -0.026137 0.322363 0.1021959 0.0025520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 22 41916 -0.024536 0.322564 0.0996949 0.0024630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 23 41917 -0.022936 0.322764 0.0972420 0.0024600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 24 41918 -0.021336 0.322964 0.0947310 0.0025590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 25 41919 -0.019735 0.323265 0.0920820 0.0027490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 26 41920 -0.018035 0.323465 0.0892270 0.0029670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 27 41921 -0.016435 0.323765 0.0861540 0.0031790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 28 41922 -0.014735 0.324065 0.0828940 0.0033160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 29 41923 -0.013034 0.324366 0.0795610 0.0033310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 30 41924 -0.011434 0.324566 0.0762701 0.0032350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 8 31 41925 -0.009734 0.324866 0.0731071 0.0030700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 1 41926 -0.008034 0.325266 0.0701501 0.0028510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 2 41927 -0.006233 0.325567 0.0673921 0.0026490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 3 41928 -0.004533 0.325867 0.0648301 0.0024740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 4 41929 -0.002833 0.326167 0.0624181 0.0023510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 5 41930 -0.001032 0.326568 0.0600981 0.0022880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 6 41931 0.000668 0.326868 0.0578212 0.0022880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 7 41932 0.002468 0.327168 0.0555122 0.0023500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 8 41933 0.004268 0.327468 0.0531152 0.0024530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 9 41934 0.005969 0.327869 0.0505842 0.0026120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 10 41935 0.007769 0.328169 0.0478872 0.0027830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 11 41936 0.009569 0.328469 0.0450222 0.0029420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 12 41937 0.011369 0.328769 0.0420062 0.0030690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 13 41938 0.013170 0.328970 0.0389052 0.0031290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 14 41939 0.014970 0.329270 0.0357853 0.0031070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 15 41940 0.016770 0.329470 0.0327283 0.0030050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 16 41941 0.018571 0.329771 0.0297933 0.0028590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 17 41942 0.020371 0.329871 0.0270033 0.0027050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 18 41943 0.022171 0.330071 0.0243603 0.0026010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 19 41944 0.023971 0.330171 0.0217843 0.0025680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 20 41945 0.025772 0.330272 0.0191813 0.0026430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 21 41946 0.027572 0.330272 0.0164683 0.0027970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 22 41947 0.029272 0.330272 0.0135693 0.0030170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 23 41948 0.030973 0.330273 0.0104413 0.0032350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 24 41949 0.032773 0.330173 0.0071054 0.0034170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 25 41950 0.034473 0.330073 0.0036264 0.0035120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 26 41951 0.036173 0.329873 0.0001144 0.0034940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 27 41952 0.037774 0.329674 -0.0033406 0.0033930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 28 41953 0.039474 0.329374 -0.0066416 0.0032150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 29 41954 0.041074 0.328974 -0.0097736 0.0030310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 9 30 41955 0.042674 0.328574 -0.0127216 0.0028690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 1 41956 0.044275 0.328175 -0.0155186 0.0027450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 2 41957 0.045775 0.327675 -0.0182206 0.0026690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 3 41958 0.047375 0.327075 -0.0208776 0.0026560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 4 41959 0.048876 0.326476 -0.0235626 0.0027050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 5 41960 0.050276 0.325776 -0.0262955 0.0027970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 6 41961 0.051776 0.325076 -0.0291615 0.0029310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 7 41962 0.053176 0.324376 -0.0321735 0.0030860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 8 41963 0.054577 0.323577 -0.0353425 0.0032510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 9 41964 0.055877 0.322677 -0.0386575 0.0033810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 10 41965 0.057277 0.321777 -0.0420775 0.0034580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 11 41966 0.058577 0.320877 -0.0455475 0.0034590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 12 41967 0.059778 0.319978 -0.0489655 0.0033840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 13 41968 0.061078 0.318978 -0.0522815 0.0032270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 14 41969 0.062278 0.317978 -0.0554185 0.0030460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 15 41970 0.063479 0.316879 -0.0583805 0.0028870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 16 41971 0.064579 0.315879 -0.0612165 0.0028110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 17 41972 0.065779 0.314779 -0.0640255 0.0028240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 18 41973 0.066879 0.313679 -0.0669075 0.0029420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 19 41974 0.067880 0.312580 -0.0699394 0.0031190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 20 41975 0.068980 0.311380 -0.0731494 0.0033090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 21 41976 0.069980 0.310280 -0.0765554 0.0034750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 22 41977 0.070980 0.309180 -0.0800764 0.0035720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 23 41978 0.071981 0.307981 -0.0836604 0.0035720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 24 41979 0.072881 0.306881 -0.0872024 0.0034980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 25 41980 0.073781 0.305681 -0.0906454 0.0033610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 26 41981 0.074682 0.304582 -0.0939234 0.0031930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 27 41982 0.075482 0.303382 -0.0970334 0.0030300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 28 41983 0.076282 0.302282 -0.0999864 0.0028930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 29 41984 0.077082 0.301182 -0.1028374 0.0028090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 30 41985 0.077883 0.300083 -0.1056244 0.0027870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 10 31 41986 0.078583 0.298983 -0.1084214 0.0028250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 1 41987 0.079283 0.297883 -0.1112934 0.0029180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 2 41988 0.079983 0.296783 -0.1142804 0.0030620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 3 41989 0.080684 0.295784 -0.1174254 0.0032220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 4 41990 0.081284 0.294684 -0.1207274 0.0034000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 5 41991 0.081984 0.293684 -0.1242104 0.0035640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 6 41992 0.082585 0.292685 -0.1278434 0.0036930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 7 41993 0.083185 0.291685 -0.1315774 0.0037640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 8 41994 0.083785 0.290685 -0.1353444 0.0037580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 9 41995 0.084385 0.289785 -0.1390764 0.0036840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 10 41996 0.084986 0.288786 -0.1426943 0.0035440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 11 41997 0.085486 0.287886 -0.1461533 0.0033880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 12 41998 0.086086 0.286986 -0.1494883 0.0032940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 13 41999 0.086686 0.286086 -0.1527733 0.0032850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 14 42000 0.087287 0.285187 -0.1560923 0.0033600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 15 42001 0.087787 0.284387 -0.1595283 0.0035090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 16 42002 0.088387 0.283487 -0.1631173 0.0036790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 17 42003 0.088988 0.282688 -0.1668623 0.0038030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 18 42004 0.089588 0.281888 -0.1706893 0.0038360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 19 42005 0.090188 0.281088 -0.1745073 0.0037850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 20 42006 0.090788 0.280288 -0.1782333 0.0036560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 21 42007 0.091489 0.279489 -0.1818003 0.0034710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 22 42008 0.092089 0.278689 -0.1851653 0.0032570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 23 42009 0.092689 0.277889 -0.1883233 0.0030400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 24 42010 0.093389 0.277089 -0.1912653 0.0028490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 25 42011 0.094090 0.276290 -0.1940353 0.0027030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 26 42012 0.094790 0.275490 -0.1966903 0.0026250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 27 42013 0.095490 0.274690 -0.1993063 0.0026080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 28 42014 0.096191 0.273891 -0.2019243 0.0026350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 29 42015 0.096891 0.273091 -0.2046013 0.0027250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 11 30 42016 0.097591 0.272291 -0.2073823 0.0028410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 1 42017 0.098291 0.271491 -0.2102863 0.0029760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 2 42018 0.099092 0.270592 -0.2133323 0.0031020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 3 42019 0.099792 0.269692 -0.2164933 0.0032130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 4 42020 0.100592 0.268792 -0.2197423 0.0032790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 5 42021 0.101292 0.267892 -0.2230213 0.0032860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 6 42022 0.102093 0.266893 -0.2262823 0.0032250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 7 42023 0.102793 0.265893 -0.2294513 0.0031140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 8 42024 0.103593 0.264893 -0.2324903 0.0029640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 9 42025 0.104294 0.263794 -0.2353963 0.0028480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 10 42026 0.104994 0.262694 -0.2382213 0.0028080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 11 42027 0.105694 0.261494 -0.2410503 0.0028760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 12 42028 0.106394 0.260394 -0.2439953 0.0030290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 13 42029 0.107095 0.259095 -0.2471313 0.0032360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 14 42030 0.107795 0.257895 -0.2504603 0.0034100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 15 42031 0.108395 0.256595 -0.2539163 0.0034970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 16 42032 0.109096 0.255196 -0.2574283 0.0034920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 17 42033 0.109596 0.253796 -0.2608694 0.0033850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 18 42034 0.110196 0.252396 -0.2641794 0.0032180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 19 42035 0.110696 0.250996 -0.2672954 0.0030030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 20 42036 0.111197 0.249497 -0.2701864 0.0027910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 21 42037 0.111697 0.247997 -0.2728754 0.0025930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 22 42038 0.112097 0.246397 -0.2753864 0.0024370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 23 42039 0.112497 0.244897 -0.2777674 0.0023250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 24 42040 0.112798 0.243298 -0.2800674 0.0022730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 25 42041 0.113098 0.241598 -0.2823434 0.0022980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 26 42042 0.113298 0.239998 -0.2846674 0.0023680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 27 42043 0.113499 0.238399 -0.2870884 0.0024660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 28 42044 0.113599 0.236699 -0.2896134 0.0025850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 29 42045 0.113699 0.235099 -0.2922654 0.0027050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 30 42046 0.113699 0.233399 -0.2950164 0.0027900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1973 12 31 42047 0.113600 0.231800 -0.2978324 0.0028560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 1 42048 0.113500 0.230100 0.6992996 0.0028610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 2 42049 0.113400 0.228500 0.6964546 0.0028300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 3 42050 0.113200 0.226800 0.6936686 0.0027350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 4 42051 0.112901 0.225201 0.6909966 0.0026060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 5 42052 0.112601 0.223601 0.6884556 0.0024820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 6 42053 0.112201 0.222001 0.6860146 0.0024010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 7 42054 0.111802 0.220402 0.6836126 0.0024140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 8 42055 0.111302 0.218802 0.6811506 0.0025250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 9 42056 0.110702 0.217302 0.6785365 0.0027120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 10 42057 0.110202 0.215702 0.6757235 0.0029090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 11 42058 0.109503 0.214203 0.6727395 0.0030340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 12 42059 0.108803 0.212703 0.6696825 0.0030590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 13 42060 0.108103 0.211203 0.6666705 0.0029560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 14 42061 0.107403 0.209703 0.6638005 0.0027640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 15 42062 0.106604 0.208304 0.6611475 0.0025380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 16 42063 0.105804 0.206904 0.6587335 0.0023110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 17 42064 0.104904 0.205404 0.6565245 0.0021130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 18 42065 0.104005 0.204005 0.6544935 0.0019790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 19 42066 0.103105 0.202705 0.6525595 0.0018990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 20 42067 0.102205 0.201305 0.6506765 0.0018780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 21 42068 0.101305 0.200005 0.6487825 0.0019270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 22 42069 0.100306 0.198606 0.6468045 0.0020360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 23 42070 0.099406 0.197306 0.6446894 0.0021900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 24 42071 0.098406 0.196006 0.6424204 0.0023590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 25 42072 0.097506 0.194806 0.6399744 0.0025320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 26 42073 0.096507 0.193507 0.6373754 0.0026800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 27 42074 0.095607 0.192307 0.6346374 0.0028070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 28 42075 0.094707 0.191107 0.6317774 0.0028840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 29 42076 0.093808 0.190008 0.6288794 0.0028950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 30 42077 0.092908 0.188808 0.6260054 0.0028360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 1 31 42078 0.092008 0.187708 0.6232074 0.0027550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 1 42079 0.091108 0.186608 0.6205064 0.0026600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 2 42080 0.090309 0.185609 0.6178754 0.0025820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 3 42081 0.089509 0.184509 0.6153063 0.0025720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 4 42082 0.088709 0.183509 0.6126973 0.0026630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 5 42083 0.087909 0.182609 0.6099583 0.0028390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 6 42084 0.087110 0.181610 0.6070043 0.0030730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 7 42085 0.086410 0.180710 0.6038293 0.0032760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 8 42086 0.085710 0.179810 0.6004823 0.0033990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 9 42087 0.085011 0.179011 0.5970833 0.0033860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 10 42088 0.084311 0.178111 0.5937513 0.0032620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 11 42089 0.083611 0.177311 0.5905853 0.0030600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 12 42090 0.082911 0.176611 0.5876392 0.0028320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 13 42091 0.082312 0.175812 0.5849132 0.0026240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 14 42092 0.081612 0.175112 0.5823852 0.0024630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 15 42093 0.080912 0.174312 0.5799802 0.0023580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 16 42094 0.080212 0.173712 0.5776482 0.0023140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 17 42095 0.079513 0.173013 0.5753322 0.0023400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 18 42096 0.078813 0.172313 0.5729602 0.0024110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 19 42097 0.078113 0.171713 0.5704952 0.0025240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 20 42098 0.077414 0.171114 0.5678932 0.0026720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 21 42099 0.076614 0.170514 0.5651601 0.0028120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 22 42100 0.075914 0.169914 0.5622751 0.0029320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 23 42101 0.075114 0.169314 0.5592991 0.0030240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 24 42102 0.074215 0.168815 0.5562451 0.0030630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 25 42103 0.073415 0.168315 0.5531931 0.0030420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 26 42104 0.072515 0.167815 0.5501911 0.0029650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 27 42105 0.071615 0.167315 0.5472851 0.0028500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 2 28 42106 0.070616 0.166916 0.5444930 0.0027260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 1 42107 0.069616 0.166516 0.5418140 0.0026410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 2 42108 0.068616 0.166116 0.5391900 0.0026190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 3 42109 0.067617 0.165717 0.5365450 0.0026880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 4 42110 0.066517 0.165417 0.5337820 0.0028610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 5 42111 0.065417 0.165117 0.5308100 0.0030930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 6 42112 0.064217 0.164917 0.5275810 0.0033510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 7 42113 0.063118 0.164718 0.5241239 0.0035600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 8 42114 0.061918 0.164618 0.5204959 0.0036660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 9 42115 0.060718 0.164518 0.5168239 0.0036460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 10 42116 0.059519 0.164419 0.5132389 0.0035200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 11 42117 0.058219 0.164419 0.5098049 0.0033320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 12 42118 0.057019 0.164519 0.5065759 0.0031280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 13 42119 0.055719 0.164719 0.5035369 0.0029590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 14 42120 0.054520 0.164820 0.5006488 0.0028370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 15 42121 0.053220 0.165120 0.4978518 0.0027680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 16 42122 0.052020 0.165420 0.4950828 0.0027600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 17 42123 0.050820 0.165820 0.4923028 0.0028090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 18 42124 0.049621 0.166221 0.4894498 0.0028940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 19 42125 0.048421 0.166621 0.4865028 0.0030020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 20 42126 0.047321 0.167221 0.4834317 0.0031320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 21 42127 0.046122 0.167722 0.4802427 0.0032420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 22 42128 0.045022 0.168322 0.4769567 0.0033330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 23 42129 0.044022 0.169022 0.4736037 0.0033650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 24 42130 0.042922 0.169722 0.4702557 0.0033280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 25 42131 0.041923 0.170423 0.4669587 0.0032370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 26 42132 0.041023 0.171223 0.4637886 0.0030970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 27 42133 0.040023 0.172023 0.4607716 0.0029360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 28 42134 0.039223 0.172823 0.4579106 0.0027920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 29 42135 0.038324 0.173624 0.4551686 0.0027040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 30 42136 0.037524 0.174424 0.4524856 0.0026890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 3 31 42137 0.036724 0.175224 0.4497516 0.0027720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 1 42138 0.036025 0.176025 0.4469075 0.0029260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 2 42139 0.035225 0.176825 0.4438905 0.0031010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 3 42140 0.034625 0.177625 0.4407115 0.0032670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 4 42141 0.033925 0.178425 0.4373895 0.0033630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 5 42142 0.033326 0.179126 0.4340105 0.0033760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 6 42143 0.032726 0.179826 0.4306734 0.0032900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 7 42144 0.032126 0.180526 0.4274674 0.0031240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 8 42145 0.031626 0.181226 0.4244394 0.0029310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 9 42146 0.031127 0.181827 0.4216014 0.0027600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 10 42147 0.030627 0.182327 0.4189124 0.0026360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 11 42148 0.030127 0.182927 0.4162993 0.0025930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 12 42149 0.029628 0.183328 0.4137043 0.0026350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 13 42150 0.029128 0.183828 0.4110093 0.0027340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 14 42151 0.028628 0.184228 0.4082213 0.0028710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 15 42152 0.028228 0.184528 0.4052663 0.0030340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 16 42153 0.027729 0.184829 0.4021472 0.0032150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 17 42154 0.027229 0.185029 0.3988352 0.0034070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 18 42155 0.026729 0.185229 0.3953302 0.0035780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 19 42156 0.026229 0.185429 0.3916922 0.0036920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 20 42157 0.025730 0.185530 0.3879752 0.0037430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 21 42158 0.025130 0.185530 0.3842271 0.0037320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 22 42159 0.024630 0.185630 0.3805301 0.0036550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 23 42160 0.024031 0.185631 0.3769211 0.0035400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 24 42161 0.023431 0.185531 0.3734491 0.0034160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 25 42162 0.022831 0.185431 0.3700831 0.0033170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 26 42163 0.022231 0.185331 0.3667790 0.0033060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 27 42164 0.021532 0.185232 0.3634510 0.0033540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 28 42165 0.020832 0.185032 0.3600470 0.0034730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 29 42166 0.020132 0.184932 0.3564940 0.0036360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 4 30 42167 0.019432 0.184732 0.3527799 0.0037760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 1 42168 0.018633 0.184533 0.3489619 0.0038600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 2 42169 0.017833 0.184333 0.3450979 0.0038520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 3 42170 0.017033 0.184033 0.3412889 0.0037520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 4 42171 0.016234 0.183834 0.3376118 0.0035830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 5 42172 0.015334 0.183634 0.3341398 0.0033560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 6 42173 0.014434 0.183434 0.3309008 0.0031320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 7 42174 0.013534 0.183134 0.3278758 0.0029280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 8 42175 0.012635 0.182935 0.3250278 0.0027870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 9 42176 0.011735 0.182735 0.3222797 0.0027110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 10 42177 0.010735 0.182535 0.3195767 0.0026940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 11 42178 0.009835 0.182335 0.3168647 0.0027380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 12 42179 0.008836 0.182136 0.3140887 0.0028180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 13 42180 0.007936 0.181936 0.3112306 0.0029200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 14 42181 0.006936 0.181836 0.3082576 0.0030250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 15 42182 0.006037 0.181637 0.3051746 0.0031180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 16 42183 0.005037 0.181537 0.3020226 0.0031910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 17 42184 0.004137 0.181337 0.2988155 0.0032220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 18 42185 0.003237 0.181237 0.2955945 0.0032000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 19 42186 0.002238 0.181138 0.2924235 0.0031230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 20 42187 0.001338 0.181138 0.2893645 0.0030010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 21 42188 0.000538 0.181038 0.2864374 0.0028620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 22 42189 -0.000362 0.181038 0.2836404 0.0027490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 23 42190 -0.001161 0.180939 0.2809174 0.0027040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 24 42191 -0.001961 0.181039 0.2782024 0.0027510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 25 42192 -0.002761 0.181039 0.2753953 0.0028720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 26 42193 -0.003560 0.181040 0.2724443 0.0030360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 27 42194 -0.004260 0.181140 0.2693293 0.0031880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 28 42195 -0.004960 0.181240 0.2660873 0.0032820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 29 42196 -0.005560 0.181340 0.2628032 0.0032800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 30 42197 -0.006159 0.181541 0.2595572 0.0031900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 5 31 42198 -0.006759 0.181741 0.2564382 0.0030290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 1 42199 -0.007259 0.181941 0.2535041 0.0028240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 2 42200 -0.007659 0.182141 0.2507921 0.0025980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 3 42201 -0.008058 0.182442 0.2482901 0.0024020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 4 42202 -0.008358 0.182742 0.2459831 0.0022300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 5 42203 -0.008658 0.183042 0.2438000 0.0021280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 6 42204 -0.008857 0.183343 0.2416970 0.0020870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 7 42205 -0.008957 0.183743 0.2396180 0.0020890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 8 42206 -0.009057 0.184043 0.2375059 0.0021410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 9 42207 -0.009057 0.184543 0.2353279 0.0022160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 10 42208 -0.008956 0.184944 0.2330809 0.0022870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 11 42209 -0.008756 0.185344 0.2307459 0.0023680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 12 42210 -0.008456 0.185844 0.2283538 0.0024130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 13 42211 -0.008155 0.186345 0.2259228 0.0024420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 14 42212 -0.007755 0.186845 0.2234948 0.0024160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 15 42213 -0.007255 0.187345 0.2211077 0.0023520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 16 42214 -0.006755 0.187945 0.2188057 0.0022540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 17 42215 -0.006054 0.188446 0.2166087 0.0021300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 18 42216 -0.005454 0.189046 0.2145437 0.0020130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 19 42217 -0.004654 0.189646 0.2125746 0.0019480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 20 42218 -0.003854 0.190246 0.2106296 0.0019690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 21 42219 -0.002953 0.190847 0.2086146 0.0020850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 22 42220 -0.002353 0.191447 0.2064465 0.0022590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 23 42221 -0.001753 0.192147 0.2040845 0.0024610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 24 42222 -0.001052 0.192848 0.2015525 0.0025980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 25 42223 -0.000352 0.193448 0.1989214 0.0026370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 26 42224 0.000248 0.194148 0.1963144 0.0025690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 27 42225 0.000948 0.194848 0.1938204 0.0024170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 28 42226 0.001549 0.195549 0.1914954 0.0022190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 29 42227 0.002149 0.196349 0.1893763 0.0020230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 6 30 42228 0.002749 0.197049 0.1874433 0.0018380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 1 42229 0.003349 0.197749 0.1856753 0.0017060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 2 42230 0.003850 0.198450 0.1840222 0.0016290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 3 42231 0.004250 0.199250 0.1824082 0.0016110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 4 42232 0.004650 0.199950 0.1807812 0.0016500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 5 42233 0.005051 0.200751 0.1790921 0.0017340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 6 42234 0.005351 0.201451 0.1772941 0.0018550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 7 42235 0.005751 0.202151 0.1753791 0.0019750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 8 42236 0.006151 0.202951 0.1733370 0.0020860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 9 42237 0.006552 0.203652 0.1712050 0.0021720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 10 42238 0.006952 0.204352 0.1689940 0.0022230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 11 42239 0.007352 0.204952 0.1667629 0.0022330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 12 42240 0.007652 0.205552 0.1645529 0.0021790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 13 42241 0.007953 0.206153 0.1624069 0.0020960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 14 42242 0.008153 0.206653 0.1603698 0.0019750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 15 42243 0.008253 0.207053 0.1584568 0.0018520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 16 42244 0.008354 0.207354 0.1566548 0.0017610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 17 42245 0.008454 0.207654 0.1549207 0.0017320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 18 42246 0.008554 0.207854 0.1531587 0.0018090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 19 42247 0.008554 0.207954 0.1512627 0.0019740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 20 42248 0.008555 0.207955 0.1491866 0.0021820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 21 42249 0.008555 0.207955 0.1469086 0.0023630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 22 42250 0.008555 0.207955 0.1445006 0.0024440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 23 42251 0.008555 0.207955 0.1420525 0.0024290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 24 42252 0.008556 0.207956 0.1396895 0.0023000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 25 42253 0.008556 0.207956 0.1374875 0.0020980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 26 42254 0.008556 0.207956 0.1354914 0.0018950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 27 42255 0.008557 0.207957 0.1336894 0.0017140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 28 42256 0.008557 0.207957 0.1320374 0.0015910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 29 42257 0.008557 0.207957 0.1304983 0.0015160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 30 42258 0.008557 0.207957 0.1289843 0.0015110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 7 31 42259 0.008558 0.207958 0.1274463 0.0015740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 1 42260 0.008558 0.207958 0.1258212 0.0016840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 2 42261 0.008558 0.207958 0.1240662 0.0018190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 3 42262 0.008558 0.207958 0.1221691 0.0019780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 4 42263 0.008559 0.207959 0.1201121 0.0021320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 5 42264 0.008559 0.207959 0.1179211 0.0022640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 6 42265 0.008559 0.207959 0.1156060 0.0023500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 7 42266 0.008560 0.207960 0.1132360 0.0023940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 8 42267 0.008560 0.207960 0.1108320 0.0024040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 9 42268 0.008560 0.207960 0.1084499 0.0023550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 10 42269 0.008560 0.207960 0.1061209 0.0022790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 11 42270 0.008561 0.207961 0.1038849 0.0021850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 12 42271 0.008561 0.207961 0.1017428 0.0021140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 13 42272 0.008561 0.207961 0.0996378 0.0020980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 14 42273 0.008561 0.207961 0.0975187 0.0021570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 15 42274 0.008562 0.207962 0.0952837 0.0023190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 16 42275 0.008562 0.207962 0.0928577 0.0025410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 17 42276 0.008562 0.207962 0.0901956 0.0027780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 18 42277 0.008563 0.207963 0.0873206 0.0029580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 19 42278 0.008563 0.207963 0.0843186 0.0030240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 20 42279 0.008563 0.207963 0.0813185 0.0029550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 21 42280 0.008563 0.207963 0.0784555 0.0027660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 22 42281 0.008564 0.207964 0.0757954 0.0025310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 23 42282 0.008564 0.207964 0.0733834 0.0022990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 24 42283 0.008564 0.207964 0.0711914 0.0021020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 25 42284 0.008564 0.207964 0.0691553 0.0019800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 26 42285 0.008565 0.207965 0.0672103 0.0019220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 27 42286 0.008565 0.207965 0.0653002 0.0019150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 28 42287 0.008565 0.207965 0.0633632 0.0019590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 29 42288 0.008566 0.207966 0.0613692 0.0020420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 30 42289 0.008566 0.207966 0.0592811 0.0021470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 8 31 42290 0.008566 0.207966 0.0570851 0.0022540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 1 42291 0.008566 0.207966 0.0547800 0.0023530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 2 42292 0.008567 0.207967 0.0523900 0.0024200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 3 42293 0.008567 0.207967 0.0499540 0.0024440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 4 42294 0.008567 0.207967 0.0475079 0.0024320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 5 42295 0.008568 0.207968 0.0451049 0.0023770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 6 42296 0.008568 0.207968 0.0427638 0.0023000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 7 42297 0.008568 0.207968 0.0404998 0.0022210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 8 42298 0.008568 0.207968 0.0383178 0.0021470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 9 42299 0.008569 0.207969 0.0361907 0.0021290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 10 42300 0.008569 0.208069 0.0340367 0.0021830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 11 42301 0.008569 0.208169 0.0317856 0.0023330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 12 42302 0.008569 0.208269 0.0293446 0.0025510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 13 42303 0.008370 0.208370 0.0266595 0.0028210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 14 42304 0.008170 0.208470 0.0237165 0.0030660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 15 42305 0.008070 0.208670 0.0205535 0.0032430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 16 42306 0.007871 0.208771 0.0172814 0.0032780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 17 42307 0.007671 0.208971 0.0140394 0.0031860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 18 42308 0.007471 0.209271 0.0109303 0.0030020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 19 42309 0.007271 0.209671 0.0080373 0.0027730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 20 42310 0.006972 0.210272 0.0053663 0.0025670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 21 42311 0.006672 0.210872 0.0028842 0.0024190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 22 42312 0.006272 0.211472 0.0005042 0.0023430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 23 42313 0.005872 0.212172 -0.0018249 0.0023230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 24 42314 0.005473 0.212973 -0.0041619 0.0023590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 25 42315 0.004973 0.213673 -0.0065560 0.0024360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 26 42316 0.004373 0.214473 -0.0090430 0.0025410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 27 42317 0.003874 0.215374 -0.0116520 0.0026660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 28 42318 0.003274 0.216174 -0.0143611 0.0027710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 29 42319 0.002574 0.217074 -0.0171851 0.0028600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 9 30 42320 0.001974 0.217874 -0.0200792 0.0029200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 1 42321 0.001275 0.218775 -0.0230102 0.0029230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 2 42322 0.000575 0.219675 -0.0259203 0.0028910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 3 42323 -0.000225 0.220575 -0.0287783 0.0028200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 4 42324 -0.000925 0.221475 -0.0315524 0.0027380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 5 42325 -0.001724 0.222276 -0.0342454 0.0026520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 6 42326 -0.002524 0.223176 -0.0368794 0.0026130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 7 42327 -0.003324 0.224076 -0.0395055 0.0026400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 8 42328 -0.004123 0.224877 -0.0421955 0.0027450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 9 42329 -0.004923 0.225777 -0.0450186 0.0029240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 10 42330 -0.005723 0.226577 -0.0480596 0.0031530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 11 42331 -0.006523 0.227377 -0.0513377 0.0033890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 12 42332 -0.007322 0.228178 -0.0548127 0.0035700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 13 42333 -0.008122 0.228978 -0.0584388 0.0036620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 14 42334 -0.008922 0.229778 -0.0620988 0.0036310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 15 42335 -0.009622 0.230478 -0.0656749 0.0035060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 16 42336 -0.010421 0.231179 -0.0690799 0.0032970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 17 42337 -0.011121 0.231979 -0.0722760 0.0030780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 18 42338 -0.011921 0.232679 -0.0752600 0.0028970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 19 42339 -0.012620 0.233380 -0.0780840 0.0027620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 20 42340 -0.013320 0.233980 -0.0808081 0.0026980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 21 42341 -0.014020 0.234680 -0.0835001 0.0026950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 22 42342 -0.014720 0.235280 -0.0862032 0.0027370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 23 42343 -0.015419 0.235981 -0.0889742 0.0028000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 24 42344 -0.016019 0.236581 -0.0918073 0.0028780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 25 42345 -0.016719 0.237181 -0.0947193 0.0029530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 26 42346 -0.017319 0.237781 -0.0977084 0.0030200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 27 42347 -0.017918 0.238382 -0.1007384 0.0030540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 28 42348 -0.018618 0.238982 -0.1038015 0.0030560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 29 42349 -0.019218 0.239482 -0.1068355 0.0030130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 30 42350 -0.019817 0.240083 -0.1098146 0.0029390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 10 31 42351 -0.020417 0.240583 -0.1127036 0.0028360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 1 42352 -0.021017 0.241183 -0.1154847 0.0027370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 2 42353 -0.021617 0.241683 -0.1181767 0.0026640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 3 42354 -0.022116 0.242184 -0.1208208 0.0026480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 4 42355 -0.022716 0.242684 -0.1235068 0.0027280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 5 42356 -0.023316 0.243184 -0.1263019 0.0028720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 6 42357 -0.023916 0.243684 -0.1292669 0.0030660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 7 42358 -0.024415 0.244085 -0.1324360 0.0032700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 8 42359 -0.025015 0.244585 -0.1357960 0.0034410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 9 42360 -0.025615 0.244985 -0.1392951 0.0035420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 10 42361 -0.026114 0.245486 -0.1428491 0.0035530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 11 42362 -0.026714 0.245886 -0.1463692 0.0034620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 12 42363 -0.027214 0.246286 -0.1497512 0.0033030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 13 42364 -0.027814 0.246686 -0.1529563 0.0031160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 14 42365 -0.028313 0.247087 -0.1559773 0.0029330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 15 42366 -0.028913 0.247487 -0.1588394 0.0028000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 16 42367 -0.029413 0.247787 -0.1616104 0.0027450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 17 42368 -0.029913 0.248187 -0.1643505 0.0027440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 18 42369 -0.030512 0.248488 -0.1671155 0.0027940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 19 42370 -0.031012 0.248888 -0.1699486 0.0028780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 20 42371 -0.031512 0.249188 -0.1728766 0.0029780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 21 42372 -0.032111 0.249489 -0.1758967 0.0030810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 22 42373 -0.032611 0.249889 -0.1790237 0.0031590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 23 42374 -0.033111 0.250189 -0.1822158 0.0032210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 24 42375 -0.033611 0.250489 -0.1854418 0.0032360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 25 42376 -0.034210 0.250790 -0.1886739 0.0032110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 26 42377 -0.034710 0.251190 -0.1918609 0.0031470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 27 42378 -0.035210 0.251490 -0.1949570 0.0030510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 28 42379 -0.035709 0.251791 -0.1979490 0.0029310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 29 42380 -0.036209 0.252191 -0.2008341 0.0028330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 11 30 42381 -0.036709 0.252491 -0.2036301 0.0027710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 1 42382 -0.037109 0.252891 -0.2063892 0.0027810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 2 42383 -0.037608 0.253192 -0.2092102 0.0028610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 3 42384 -0.038108 0.253592 -0.2121423 0.0030100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 4 42385 -0.038508 0.253992 -0.2152243 0.0031740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 5 42386 -0.038908 0.254392 -0.2184684 0.0032940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 6 42387 -0.039407 0.254693 -0.2217974 0.0033510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 7 42388 -0.039807 0.255193 -0.2251495 0.0033280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 8 42389 -0.040207 0.255593 -0.2284266 0.0032230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 9 42390 -0.040606 0.255994 -0.2315746 0.0030570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 10 42391 -0.041006 0.256394 -0.2345297 0.0028620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 11 42392 -0.041406 0.256894 -0.2373027 0.0026750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 12 42393 -0.041806 0.257294 -0.2399048 0.0025270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 13 42394 -0.042205 0.257795 -0.2423758 0.0024360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 14 42395 -0.042505 0.258195 -0.2447979 0.0024090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 15 42396 -0.042905 0.258695 -0.2472219 0.0024380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 16 42397 -0.043305 0.259195 -0.2496960 0.0025060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 17 42398 -0.043604 0.259696 -0.2522410 0.0025940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 18 42399 -0.044004 0.260196 -0.2548761 0.0026750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 19 42400 -0.044404 0.260796 -0.2575871 0.0027540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 20 42401 -0.044703 0.261297 -0.2603752 0.0027980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 21 42402 -0.045103 0.261897 -0.2631833 0.0028200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 22 42403 -0.045403 0.262497 -0.2660033 0.0028050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 23 42404 -0.045803 0.262997 -0.2687794 0.0027440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 24 42405 -0.046102 0.263598 -0.2714904 0.0026630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 25 42406 -0.046502 0.264298 -0.2740985 0.0025640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 26 42407 -0.046802 0.264898 -0.2766195 0.0024690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 27 42408 -0.047202 0.265498 -0.2790476 0.0024060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 28 42409 -0.047501 0.266199 -0.2814426 0.0023970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 29 42410 -0.047801 0.266799 -0.2838697 0.0024800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 30 42411 -0.048101 0.267499 -0.2864298 0.0026390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1974 12 31 42412 -0.048400 0.268200 -0.2891688 0.0028430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 1 42413 -0.048700 0.268900 0.7078931 0.0030250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 2 42414 -0.049000 0.269600 0.7048071 0.0031300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 3 42415 -0.049200 0.270400 0.7016570 0.0031400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 4 42416 -0.049499 0.271101 0.6985700 0.0030400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 5 42417 -0.049699 0.271901 0.6956009 0.0028790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 6 42418 -0.049899 0.272601 0.6928118 0.0026900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 7 42419 -0.049999 0.273401 0.6902078 0.0025210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 8 42420 -0.050098 0.274202 0.6877557 0.0023910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 9 42421 -0.050198 0.275002 0.6854077 0.0023160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 10 42422 -0.050298 0.275802 0.6831036 0.0023020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 11 42423 -0.050297 0.276703 0.6807936 0.0023360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 12 42424 -0.050297 0.277503 0.6784155 0.0024260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 13 42425 -0.050197 0.278403 0.6759234 0.0025520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 14 42426 -0.050097 0.279203 0.6733104 0.0026650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 15 42427 -0.049996 0.280104 0.6705873 0.0027770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 16 42428 -0.049796 0.281004 0.6677733 0.0028560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 17 42429 -0.049596 0.281904 0.6648852 0.0029030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 18 42430 -0.049296 0.282704 0.6619791 0.0029130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 19 42431 -0.048995 0.283605 0.6590711 0.0028880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 20 42432 -0.048595 0.284505 0.6562140 0.0028330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 21 42433 -0.048195 0.285405 0.6534220 0.0027590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 22 42434 -0.047794 0.286306 0.6507059 0.0026750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 23 42435 -0.047294 0.287306 0.6480649 0.0026020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 24 42436 -0.046694 0.288206 0.6454728 0.0025910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 25 42437 -0.046094 0.289106 0.6428557 0.0026580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 26 42438 -0.045493 0.290107 0.6401287 0.0027990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 27 42439 -0.044893 0.291007 0.6372266 0.0030040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 28 42440 -0.044193 0.292007 0.6341176 0.0032190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 29 42441 -0.043393 0.293007 0.6308075 0.0033880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 30 42442 -0.042692 0.293908 0.6273794 0.0034570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 1 31 42443 -0.041892 0.294908 0.6239354 0.0034010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 1 42444 -0.040992 0.296008 0.6206013 0.0032620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 2 42445 -0.040191 0.297009 0.6174183 0.0030710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 3 42446 -0.039291 0.298009 0.6144482 0.0028720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 4 42447 -0.038391 0.299109 0.6116611 0.0027220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 5 42448 -0.037491 0.300209 0.6089931 0.0026230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 6 42449 -0.036590 0.301310 0.6063930 0.0025980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 7 42450 -0.035590 0.302410 0.6037769 0.0026320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 8 42451 -0.034590 0.303610 0.6011129 0.0027050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 9 42452 -0.033590 0.304710 0.5983668 0.0028010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 10 42453 -0.032589 0.305911 0.5955048 0.0029130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 11 42454 -0.031589 0.307111 0.5925307 0.0030210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 12 42455 -0.030589 0.308311 0.5894696 0.0031080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 13 42456 -0.029488 0.309612 0.5863366 0.0031530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 14 42457 -0.028488 0.310812 0.5831875 0.0031500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 15 42458 -0.027388 0.312112 0.5800485 0.0031100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 16 42459 -0.026288 0.313312 0.5769774 0.0030280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 17 42460 -0.025187 0.314613 0.5739993 0.0029250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 18 42461 -0.024087 0.315813 0.5711293 0.0028160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 19 42462 -0.022987 0.317113 0.5683632 0.0027120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 20 42463 -0.021786 0.318314 0.5656821 0.0026480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 21 42464 -0.020586 0.319514 0.5630341 0.0026500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 22 42465 -0.019386 0.320714 0.5603550 0.0027250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 23 42466 -0.018186 0.321914 0.5575489 0.0028880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 24 42467 -0.016985 0.323115 0.5545629 0.0030960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 25 42468 -0.015685 0.324215 0.5513728 0.0032890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 26 42469 -0.014485 0.325315 0.5480238 0.0034010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 27 42470 -0.013185 0.326415 0.5446127 0.0033960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 2 28 42471 -0.011884 0.327516 0.5412646 0.0032710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 1 42472 -0.010484 0.328516 0.5381126 0.0030430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 2 42473 -0.009184 0.329516 0.5351785 0.0028030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 3 42474 -0.007783 0.330517 0.5324964 0.0025880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 4 42475 -0.006383 0.331417 0.5299814 0.0024440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 5 42476 -0.004983 0.332217 0.5275853 0.0023700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 6 42477 -0.003483 0.333117 0.5252212 0.0023700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 7 42478 -0.002082 0.333918 0.5228372 0.0024120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 8 42479 -0.000582 0.334618 0.5203731 0.0025120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 9 42480 0.000918 0.335318 0.5178050 0.0026340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 10 42481 0.002418 0.336018 0.5151120 0.0027610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 11 42482 0.004019 0.336619 0.5122879 0.0028730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 12 42483 0.005519 0.337119 0.5093759 0.0029580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 13 42484 0.007119 0.337719 0.5063748 0.0030260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 14 42485 0.008720 0.338120 0.5033357 0.0030460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 15 42486 0.010320 0.338520 0.5003037 0.0030210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 16 42487 0.011920 0.338920 0.4973026 0.0029700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 17 42488 0.013520 0.339220 0.4943575 0.0029070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 18 42489 0.015221 0.339521 0.4914845 0.0028520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 19 42490 0.016921 0.339721 0.4886424 0.0028190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 20 42491 0.018621 0.339921 0.4858193 0.0028400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 21 42492 0.020321 0.340021 0.4829383 0.0029240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 22 42493 0.022022 0.340122 0.4799352 0.0030840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 23 42494 0.023722 0.340122 0.4767401 0.0032950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 24 42495 0.025422 0.340022 0.4733281 0.0035260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 25 42496 0.027223 0.340023 0.4697100 0.0037080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 26 42497 0.028923 0.339823 0.4659439 0.0037950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 27 42498 0.030723 0.339623 0.4621619 0.0037460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 28 42499 0.032523 0.339423 0.4584918 0.0035780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 29 42500 0.034224 0.339124 0.4550297 0.0033290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 30 42501 0.036024 0.338724 0.4518277 0.0030790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 3 31 42502 0.037824 0.338324 0.4488576 0.0028620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 1 42503 0.039524 0.337924 0.4460695 0.0027260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 2 42504 0.041225 0.337325 0.4433814 0.0026610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 3 42505 0.043025 0.336825 0.4407284 0.0026540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 4 42506 0.044725 0.336125 0.4380493 0.0026980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 5 42507 0.046426 0.335426 0.4353232 0.0027670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 6 42508 0.048126 0.334726 0.4325122 0.0028450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 7 42509 0.049726 0.333926 0.4296341 0.0029080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 8 42510 0.051326 0.333026 0.4267030 0.0029590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 9 42511 0.052927 0.332127 0.4237270 0.0029870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 10 42512 0.054527 0.331227 0.4207509 0.0029780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 11 42513 0.056127 0.330227 0.4177818 0.0029440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 12 42514 0.057627 0.329127 0.4148638 0.0029000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 13 42515 0.059028 0.328128 0.4119867 0.0028400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 14 42516 0.060528 0.326928 0.4091936 0.0027600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 15 42517 0.061928 0.325728 0.4064586 0.0027140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 16 42518 0.063329 0.324529 0.4037495 0.0027140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 17 42519 0.064629 0.323329 0.4010094 0.0027780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 18 42520 0.065929 0.322029 0.3981803 0.0029010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 19 42521 0.067229 0.320729 0.3951873 0.0030930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 20 42522 0.068430 0.319430 0.3919832 0.0033060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 21 42523 0.069630 0.318030 0.3885781 0.0035080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 22 42524 0.070830 0.316730 0.3849781 0.0036600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 23 42525 0.072030 0.315330 0.3812920 0.0036940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 24 42526 0.073131 0.313931 0.3776269 0.0036270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 25 42527 0.074231 0.312531 0.3740778 0.0034600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 26 42528 0.075231 0.311131 0.3707218 0.0032490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 27 42529 0.076332 0.309732 0.3675657 0.0030510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 28 42530 0.077332 0.308432 0.3645926 0.0029080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 29 42531 0.078332 0.307032 0.3617346 0.0028280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 4 30 42532 0.079332 0.305632 0.3589235 0.0028050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 1 42533 0.080333 0.304233 0.3561094 0.0028280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 2 42534 0.081233 0.302833 0.3532573 0.0028790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 3 42535 0.082233 0.301533 0.3503573 0.0029320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 4 42536 0.083133 0.300133 0.3473952 0.0029810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 5 42537 0.084034 0.298834 0.3444001 0.0030040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 6 42538 0.084934 0.297534 0.3413951 0.0030100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 7 42539 0.085834 0.296234 0.3383920 0.0029810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 8 42540 0.086635 0.294935 0.3354359 0.0029260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 9 42541 0.087535 0.293635 0.3325488 0.0028420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 10 42542 0.088435 0.292335 0.3297578 0.0027380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 11 42543 0.089235 0.291135 0.3270837 0.0026300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 12 42544 0.090136 0.289836 0.3245006 0.0025380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 13 42545 0.090936 0.288636 0.3219935 0.0024850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 14 42546 0.091836 0.287436 0.3195105 0.0025010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 15 42547 0.092637 0.286237 0.3169784 0.0025740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 16 42548 0.093437 0.285037 0.3143443 0.0027130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 17 42549 0.094337 0.283837 0.3115423 0.0028830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 18 42550 0.095237 0.282637 0.3085812 0.0030450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 19 42551 0.096038 0.281438 0.3054681 0.0031710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 20 42552 0.096938 0.280338 0.3022640 0.0032110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 21 42553 0.097838 0.279138 0.2990760 0.0031610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 22 42554 0.098738 0.278038 0.2959809 0.0030270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 23 42555 0.099739 0.276839 0.2930398 0.0028390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 24 42556 0.100639 0.275739 0.2902967 0.0026410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 25 42557 0.101639 0.274539 0.2877467 0.0024770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 26 42558 0.102640 0.273440 0.2853216 0.0023760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 27 42559 0.103640 0.272340 0.2829715 0.0023340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 28 42560 0.104740 0.271140 0.2806234 0.0023590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 29 42561 0.105840 0.270040 0.2782514 0.0023990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 30 42562 0.106941 0.268941 0.2758113 0.0024620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 5 31 42563 0.108141 0.267841 0.2733182 0.0025220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 1 42564 0.109241 0.266641 0.2707721 0.0025680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 2 42565 0.110441 0.265541 0.2682001 0.0025890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 3 42566 0.111642 0.264442 0.2656130 0.0025680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 4 42567 0.112942 0.263342 0.2630649 0.0025230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 5 42568 0.114242 0.262242 0.2605778 0.0024570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 6 42569 0.115443 0.261043 0.2581698 0.0023600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 7 42570 0.116843 0.259943 0.2558617 0.0022650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 8 42571 0.118143 0.258843 0.2536456 0.0021700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 9 42572 0.119443 0.257743 0.2515005 0.0021180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 10 42573 0.120744 0.256544 0.2493825 0.0021300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 11 42574 0.122044 0.255444 0.2472284 0.0022000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 12 42575 0.123344 0.254344 0.2449613 0.0023430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 13 42576 0.124644 0.253144 0.2425302 0.0025220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 14 42577 0.125945 0.252045 0.2399191 0.0026950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 15 42578 0.127245 0.250845 0.2371561 0.0028200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 16 42579 0.128445 0.249745 0.2343150 0.0028670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 17 42580 0.129746 0.248546 0.2314619 0.0028270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 18 42581 0.130846 0.247346 0.2286868 0.0027010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 19 42582 0.132046 0.246246 0.2260758 0.0025270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 20 42583 0.133046 0.245046 0.2236377 0.0023390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 21 42584 0.134147 0.243747 0.2213806 0.0021730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 22 42585 0.135047 0.242547 0.2192645 0.0020580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 23 42586 0.136047 0.241347 0.2172524 0.0019880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 24 42587 0.136847 0.240047 0.2152684 0.0019800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 25 42588 0.137648 0.238748 0.2132683 0.0020150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 26 42589 0.138448 0.237448 0.2112302 0.0020720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 27 42590 0.139048 0.236148 0.2091351 0.0021190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 28 42591 0.139649 0.234849 0.2069981 0.0021510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 29 42592 0.140249 0.233449 0.2048410 0.0021590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 6 30 42593 0.140749 0.232149 0.2026909 0.0021350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 1 42594 0.141149 0.230749 0.2005818 0.0020780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 2 42595 0.141450 0.229250 0.1985457 0.0019990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 3 42596 0.141750 0.227850 0.1965907 0.0018980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 4 42597 0.141950 0.226450 0.1947436 0.0017860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 5 42598 0.142150 0.224950 0.1930075 0.0016890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 6 42599 0.142251 0.223451 0.1913674 0.0016180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 7 42600 0.142251 0.222051 0.1897663 0.0015940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 8 42601 0.142251 0.220551 0.1881473 0.0016360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 9 42602 0.142252 0.218952 0.1864592 0.0017600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 10 42603 0.142152 0.217452 0.1846181 0.0019270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 11 42604 0.141952 0.215952 0.1825900 0.0021160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 12 42605 0.141752 0.214452 0.1804119 0.0022510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 13 42606 0.141553 0.212853 0.1781169 0.0023110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 14 42607 0.141253 0.211353 0.1758128 0.0022780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 15 42608 0.140953 0.209753 0.1736007 0.0021450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 16 42609 0.140653 0.208253 0.1715406 0.0019680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 17 42610 0.140254 0.206654 0.1696785 0.0017770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 18 42611 0.139854 0.205054 0.1679885 0.0016110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 19 42612 0.139454 0.203454 0.1664314 0.0015020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 20 42613 0.139055 0.201955 0.1649633 0.0014450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 21 42614 0.138555 0.200355 0.1635202 0.0014590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 22 42615 0.138155 0.198755 0.1620271 0.0015330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 23 42616 0.137655 0.197155 0.1604541 0.0016270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 24 42617 0.137156 0.195556 0.1587700 0.0017290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 25 42618 0.136756 0.193956 0.1569889 0.0018300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 26 42619 0.136256 0.192456 0.1551188 0.0019070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 27 42620 0.135756 0.190856 0.1531867 0.0019510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 28 42621 0.135257 0.189257 0.1512366 0.0019620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 29 42622 0.134757 0.187657 0.1492846 0.0019400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 30 42623 0.134257 0.186057 0.1473745 0.0018940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 7 31 42624 0.133858 0.184558 0.1455114 0.0018230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 1 42625 0.133358 0.182958 0.1437173 0.0017640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 2 42626 0.132858 0.181458 0.1419662 0.0017240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 3 42627 0.132358 0.179858 0.1402571 0.0017220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 4 42628 0.131859 0.178359 0.1385121 0.0017710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 5 42629 0.131459 0.176759 0.1366810 0.0018920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 6 42630 0.130959 0.175259 0.1347139 0.0020720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 7 42631 0.130460 0.173760 0.1325248 0.0023100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 8 42632 0.129960 0.172260 0.1300997 0.0025320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 9 42633 0.129460 0.170760 0.1274856 0.0026810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 10 42634 0.128960 0.169260 0.1247766 0.0027260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 11 42635 0.128561 0.167861 0.1220715 0.0026560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 12 42636 0.128061 0.166361 0.1194934 0.0024910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 13 42637 0.127561 0.164861 0.1170993 0.0022960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 14 42638 0.126961 0.163461 0.1148952 0.0021190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 15 42639 0.126462 0.162062 0.1128431 0.0020050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 16 42640 0.125962 0.160662 0.1108741 0.0019460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 17 42641 0.125362 0.159262 0.1089310 0.0019400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 18 42642 0.124763 0.157863 0.1069669 0.0019960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 19 42643 0.124263 0.156463 0.1049258 0.0020790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 20 42644 0.123563 0.155063 0.1028127 0.0021680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 21 42645 0.122963 0.153663 0.1006016 0.0022530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 22 42646 0.122264 0.152364 0.0983136 0.0023190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 23 42647 0.121564 0.150964 0.0959745 0.0023530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 24 42648 0.120764 0.149664 0.0936194 0.0023510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 25 42649 0.120064 0.148364 0.0912833 0.0023170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 26 42650 0.119265 0.147065 0.0890042 0.0022450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 27 42651 0.118365 0.145665 0.0867981 0.0021560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 28 42652 0.117465 0.144365 0.0846940 0.0020640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 29 42653 0.116566 0.143066 0.0826660 0.0019850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 30 42654 0.115566 0.141766 0.0807039 0.0019370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 8 31 42655 0.114566 0.140566 0.0787648 0.0019490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 1 42656 0.113466 0.139266 0.0767817 0.0020290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 2 42657 0.112367 0.137967 0.0746836 0.0021800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 3 42658 0.111267 0.136667 0.0723925 0.0023990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 4 42659 0.110067 0.135467 0.0698794 0.0026370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 5 42660 0.108767 0.134167 0.0671334 0.0028360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 6 42661 0.107468 0.132968 0.0642403 0.0029400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 7 42662 0.106168 0.131768 0.0612952 0.0029280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 8 42663 0.104768 0.130468 0.0584231 0.0028000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 9 42664 0.103369 0.129269 0.0557280 0.0026030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 10 42665 0.101869 0.128069 0.0532199 0.0024080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 11 42666 0.100369 0.126869 0.0509078 0.0022460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 12 42667 0.098869 0.125669 0.0487137 0.0021540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 13 42668 0.097270 0.124570 0.0465757 0.0021330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 14 42669 0.095670 0.123370 0.0444286 0.0021700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 15 42670 0.093970 0.122170 0.0422135 0.0022560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 16 42671 0.092270 0.121070 0.0399194 0.0023540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 17 42672 0.090571 0.119971 0.0375143 0.0024560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 18 42673 0.088771 0.118871 0.0350022 0.0025550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 19 42674 0.086971 0.117771 0.0324131 0.0026170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 20 42675 0.085172 0.116672 0.0297780 0.0026560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 21 42676 0.083372 0.115572 0.0271240 0.0026590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 22 42677 0.081472 0.114572 0.0244809 0.0026330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 23 42678 0.079472 0.113472 0.0218748 0.0025760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 24 42679 0.077573 0.112473 0.0193207 0.0025220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 25 42680 0.075573 0.111473 0.0168176 0.0024760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 26 42681 0.073573 0.110473 0.0143605 0.0024530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 27 42682 0.071573 0.109473 0.0118964 0.0024740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 28 42683 0.069474 0.108474 0.0093943 0.0025410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 29 42684 0.067374 0.107574 0.0067912 0.0026850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 9 30 42685 0.065274 0.106574 0.0040132 0.0028810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 1 42686 0.063175 0.105675 0.0010151 0.0031170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 2 42687 0.060975 0.104775 -0.0022200 0.0033490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 3 42688 0.058775 0.103975 -0.0056741 0.0035240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 4 42689 0.056575 0.103075 -0.0092432 0.0036050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 5 42690 0.054276 0.102276 -0.0128333 0.0035540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 6 42691 0.051976 0.101476 -0.0163184 0.0034020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 7 42692 0.049676 0.100776 -0.0196205 0.0032020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 8 42693 0.047276 0.100076 -0.0227256 0.0030050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 9 42694 0.044877 0.099377 -0.0256597 0.0028770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 10 42695 0.042477 0.098677 -0.0284947 0.0028150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 11 42696 0.040077 0.098077 -0.0313018 0.0028200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 12 42697 0.037578 0.097478 -0.0341399 0.0028610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 13 42698 0.035078 0.096978 -0.0370430 0.0029370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 14 42699 0.032478 0.096478 -0.0400161 0.0030090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 15 42700 0.029978 0.096078 -0.0430692 0.0030850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 16 42701 0.027379 0.095679 -0.0461693 0.0031320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 17 42702 0.024679 0.095279 -0.0493124 0.0031480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 18 42703 0.022079 0.094979 -0.0524555 0.0031300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 19 42704 0.019379 0.094779 -0.0555536 0.0030710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 20 42705 0.016680 0.094580 -0.0585897 0.0029990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 21 42706 0.013880 0.094480 -0.0615377 0.0029060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 22 42707 0.011080 0.094380 -0.0644038 0.0028260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 23 42708 0.008381 0.094281 -0.0671859 0.0027540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 24 42709 0.005581 0.094381 -0.0699240 0.0027280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 25 42710 0.002681 0.094381 -0.0726581 0.0027410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 26 42711 -0.000119 0.094581 -0.0754362 0.0028240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 27 42712 -0.002918 0.094682 -0.0783273 0.0029650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 28 42713 -0.005818 0.094982 -0.0813904 0.0031580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 29 42714 -0.008718 0.095282 -0.0846465 0.0033540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 30 42715 -0.011517 0.095583 -0.0880886 0.0035320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 10 31 42716 -0.014417 0.095983 -0.0916877 0.0036410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 1 42717 -0.017217 0.096483 -0.0953478 0.0036500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 2 42718 -0.020017 0.096983 -0.0989519 0.0035560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 3 42719 -0.022816 0.097484 -0.1024339 0.0033880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 4 42720 -0.025616 0.098184 -0.1057220 0.0031990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 5 42721 -0.028416 0.098784 -0.1088331 0.0030420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 6 42722 -0.031116 0.099584 -0.1118182 0.0029420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 7 42723 -0.033915 0.100285 -0.1147503 0.0029140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 8 42724 -0.036515 0.101185 -0.1176754 0.0029530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 9 42725 -0.039215 0.101985 -0.1206575 0.0030130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 10 42726 -0.041814 0.102986 -0.1237036 0.0030810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 11 42727 -0.044314 0.103886 -0.1268167 0.0031430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 12 42728 -0.046914 0.104986 -0.1299738 0.0031780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 13 42729 -0.049414 0.105986 -0.1331649 0.0031990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 14 42730 -0.051813 0.107187 -0.1363610 0.0031780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 15 42731 -0.054213 0.108287 -0.1395121 0.0031270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 16 42732 -0.056613 0.109487 -0.1426072 0.0030610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 17 42733 -0.058913 0.110787 -0.1456283 0.0029710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 18 42734 -0.061212 0.111988 -0.1485484 0.0028700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 19 42735 -0.063512 0.113388 -0.1513734 0.0027940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 20 42736 -0.065812 0.114688 -0.1541465 0.0027470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 21 42737 -0.068011 0.116089 -0.1568826 0.0027360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 22 42738 -0.070211 0.117489 -0.1596367 0.0027900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 23 42739 -0.072511 0.118989 -0.1624708 0.0028880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 24 42740 -0.074611 0.120489 -0.1654259 0.0030360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 25 42741 -0.076810 0.121990 -0.1685390 0.0031890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 26 42742 -0.079010 0.123490 -0.1718071 0.0033320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 27 42743 -0.081210 0.125090 -0.1751752 0.0034120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 28 42744 -0.083410 0.126690 -0.1786063 0.0034260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 29 42745 -0.085509 0.128391 -0.1819994 0.0033550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 11 30 42746 -0.087709 0.129991 -0.1852935 0.0032020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 1 42747 -0.089909 0.131691 -0.1884006 0.0030220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 2 42748 -0.092008 0.133492 -0.1913287 0.0028390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 3 42749 -0.094208 0.135192 -0.1940948 0.0027040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 4 42750 -0.096308 0.136992 -0.1967589 0.0026370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 5 42751 -0.098508 0.138792 -0.1994000 0.0026340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 6 42752 -0.100607 0.140593 -0.2020501 0.0026720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 7 42753 -0.102707 0.142393 -0.2047592 0.0027350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 8 42754 -0.104807 0.144293 -0.2075083 0.0027820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 9 42755 -0.106907 0.146193 -0.2103064 0.0028100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 10 42756 -0.108906 0.148094 -0.2131205 0.0028230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 11 42757 -0.110906 0.149994 -0.2159436 0.0028180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 12 42758 -0.112906 0.151994 -0.2187556 0.0027930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 13 42759 -0.114805 0.153895 -0.2215097 0.0027310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 14 42760 -0.116705 0.155895 -0.2242138 0.0026740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 15 42761 -0.118605 0.157895 -0.2268559 0.0026030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 16 42762 -0.120405 0.159895 -0.2294230 0.0025430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 17 42763 -0.122204 0.161996 -0.2319521 0.0025210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 18 42764 -0.123904 0.163996 -0.2344782 0.0025290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 19 42765 -0.125504 0.166096 -0.2370283 0.0025810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 20 42766 -0.127104 0.168096 -0.2396594 0.0026900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 21 42767 -0.128703 0.170197 -0.2424235 0.0028330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 22 42768 -0.130203 0.172297 -0.2453416 0.0030030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 23 42769 -0.131603 0.174397 -0.2484117 0.0031330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 24 42770 -0.133002 0.176598 -0.2515988 0.0032180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 25 42771 -0.134302 0.178698 -0.2548229 0.0032270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 26 42772 -0.135602 0.180898 -0.2580170 0.0031490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 27 42773 -0.136802 0.183098 -0.2611001 0.0030080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 28 42774 -0.138001 0.185299 -0.2640112 0.0028210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 29 42775 -0.139101 0.187499 -0.2667423 0.0026450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 30 42776 -0.140201 0.189699 -0.2693124 0.0025040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1975 12 31 42777 -0.141201 0.191999 -0.2717695 0.0024220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 1 42778 -0.142200 0.194300 0.7258224 0.0024030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 2 42779 -0.143200 0.196600 0.7233963 0.0024470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 3 42780 -0.144100 0.199000 0.7209292 0.0025060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 4 42781 -0.144899 0.201301 0.7183831 0.0025760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 5 42782 -0.145799 0.203701 0.7157740 0.0026370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 6 42783 -0.146599 0.206201 0.7131179 0.0026700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 7 42784 -0.147299 0.208601 0.7104348 0.0026810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 8 42785 -0.147998 0.211102 0.7077667 0.0026620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 9 42786 -0.148698 0.213602 0.7051216 0.0026150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 10 42787 -0.149398 0.216102 0.7025425 0.0025490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 11 42788 -0.149998 0.218602 0.7000254 0.0024860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 12 42789 -0.150597 0.221203 0.6975683 0.0024210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 13 42790 -0.151097 0.223803 0.6951652 0.0023890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 14 42791 -0.151697 0.226403 0.6927751 0.0024060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 15 42792 -0.152096 0.229004 0.6903350 0.0024750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 16 42793 -0.152596 0.231604 0.6877959 0.0026030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 17 42794 -0.152996 0.234204 0.6850998 0.0027970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 18 42795 -0.153396 0.236804 0.6822017 0.0030110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 19 42796 -0.153795 0.239405 0.6790806 0.0032160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 20 42797 -0.154195 0.242005 0.6757775 0.0033770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 21 42798 -0.154495 0.244605 0.6723654 0.0034420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 22 42799 -0.154795 0.247305 0.6689343 0.0034140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 23 42800 -0.154994 0.249906 0.6655612 0.0033120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 24 42801 -0.155194 0.252506 0.6623221 0.0031620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 25 42802 -0.155394 0.255106 0.6592360 0.0030130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 26 42803 -0.155593 0.257607 0.6562849 0.0028970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 27 42804 -0.155693 0.260207 0.6534228 0.0028270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 28 42805 -0.155793 0.262707 0.6506107 0.0028090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 29 42806 -0.155893 0.265307 0.6477876 0.0028360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 30 42807 -0.155892 0.267808 0.6449255 0.0029010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 1 31 42808 -0.155892 0.270308 0.6419804 0.0029780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 1 42809 -0.155792 0.272808 0.6389723 0.0030340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 2 42810 -0.155691 0.275309 0.6359212 0.0030730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 3 42811 -0.155591 0.277709 0.6328471 0.0030680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 4 42812 -0.155391 0.280209 0.6297960 0.0030380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 5 42813 -0.155191 0.282609 0.6267819 0.0029780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 6 42814 -0.154990 0.285010 0.6238478 0.0028960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 7 42815 -0.154690 0.287410 0.6210037 0.0028020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 8 42816 -0.154290 0.289810 0.6182526 0.0027000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 9 42817 -0.153990 0.292110 0.6155855 0.0026270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 10 42818 -0.153489 0.294411 0.6129773 0.0025870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 11 42819 -0.153089 0.296811 0.6103852 0.0025950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 12 42820 -0.152589 0.299111 0.6077681 0.0026620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 13 42821 -0.151988 0.301312 0.6050400 0.0027920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 14 42822 -0.151388 0.303612 0.6021659 0.0029620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 15 42823 -0.150788 0.305912 0.5991008 0.0031570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 16 42824 -0.150088 0.308112 0.5958627 0.0033090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 17 42825 -0.149387 0.310313 0.5925106 0.0033900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 18 42826 -0.148687 0.312513 0.5891295 0.0033530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 19 42827 -0.147887 0.314713 0.5858384 0.0032240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 20 42828 -0.147087 0.316913 0.5827123 0.0030220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 21 42829 -0.146286 0.319014 0.5797892 0.0028260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 22 42830 -0.145386 0.321214 0.5770501 0.0026700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 23 42831 -0.144486 0.323314 0.5744390 0.0025720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 24 42832 -0.143585 0.325415 0.5718939 0.0025380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 25 42833 -0.142585 0.327415 0.5693428 0.0025620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 26 42834 -0.141585 0.329515 0.5667447 0.0026390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 27 42835 -0.140585 0.331515 0.5640576 0.0027380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 28 42836 -0.139584 0.333516 0.5612685 0.0028370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 2 29 42837 -0.138584 0.335516 0.5583884 0.0029280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 1 42838 -0.137484 0.337416 0.5554223 0.0029870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 2 42839 -0.136484 0.339316 0.5524262 0.0030110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 3 42840 -0.135383 0.341217 0.5494011 0.0030110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 4 42841 -0.134183 0.343117 0.5464020 0.0029760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 5 42842 -0.133083 0.344917 0.5434559 0.0029240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 6 42843 -0.131982 0.346718 0.5405537 0.0028700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 7 42844 -0.130782 0.348518 0.5377126 0.0028260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 8 42845 -0.129582 0.350318 0.5349025 0.0027990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 9 42846 -0.128382 0.352018 0.5320894 0.0028140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 10 42847 -0.127181 0.353719 0.5292463 0.0028820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 11 42848 -0.125981 0.355419 0.5263042 0.0030120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 12 42849 -0.124681 0.357119 0.5232021 0.0031910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 13 42850 -0.123381 0.358719 0.5199000 0.0034090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 14 42851 -0.122080 0.360420 0.5163739 0.0036370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 15 42852 -0.120780 0.362020 0.5126528 0.0037930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 16 42853 -0.119480 0.363720 0.5088207 0.0038610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 17 42854 -0.118079 0.365321 0.5049686 0.0038140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 18 42855 -0.116679 0.366921 0.5012245 0.0036700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 19 42856 -0.115279 0.368521 0.4976554 0.0034670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 20 42857 -0.113779 0.370221 0.4942783 0.0032830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 21 42858 -0.112278 0.371822 0.4910722 0.0031500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 22 42859 -0.110778 0.373422 0.4879550 0.0030870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 23 42860 -0.109178 0.375122 0.4848779 0.0030860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 24 42861 -0.107578 0.376722 0.4817668 0.0031420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 25 42862 -0.105977 0.378423 0.4785847 0.0032130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 26 42863 -0.104277 0.380123 0.4753376 0.0032920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 27 42864 -0.102477 0.381823 0.4719945 0.0033710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 28 42865 -0.100776 0.383524 0.4685924 0.0034270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 29 42866 -0.098876 0.385224 0.4651513 0.0034410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 30 42867 -0.097076 0.387024 0.4617122 0.0034310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 3 31 42868 -0.095076 0.388724 0.4583081 0.0033830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 1 42869 -0.093175 0.390525 0.4549620 0.0033160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 2 42870 -0.091075 0.392225 0.4516779 0.0032530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 3 42871 -0.089075 0.394025 0.4484658 0.0031750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 4 42872 -0.086975 0.395725 0.4453107 0.0031170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 5 42873 -0.084774 0.397526 0.4422085 0.0030930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 6 42874 -0.082574 0.399326 0.4390984 0.0031150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 7 42875 -0.080374 0.401026 0.4359603 0.0031820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 8 42876 -0.078073 0.402827 0.4327152 0.0033150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 9 42877 -0.075773 0.404527 0.4293221 0.0034870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 10 42878 -0.073373 0.406227 0.4257340 0.0036710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 11 42879 -0.070973 0.407927 0.4219749 0.0038480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 12 42880 -0.068572 0.409628 0.4180688 0.0039500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 13 42881 -0.066172 0.411228 0.4140997 0.0039510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 14 42882 -0.063672 0.412828 0.4101926 0.0038440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 15 42883 -0.061172 0.414428 0.4064285 0.0036550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 16 42884 -0.058671 0.415929 0.4028803 0.0034400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 17 42885 -0.056071 0.417429 0.3995382 0.0032530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 18 42886 -0.053571 0.418929 0.3963531 0.0031300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 19 42887 -0.050970 0.420330 0.3932540 0.0030770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 20 42888 -0.048370 0.421730 0.3901699 0.0030780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 21 42889 -0.045770 0.423030 0.3870788 0.0031180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 22 42890 -0.043170 0.424230 0.3839317 0.0031660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 23 42891 -0.040569 0.425431 0.3807486 0.0032160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 24 42892 -0.037969 0.426531 0.3775145 0.0032490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 25 42893 -0.035369 0.427631 0.3742604 0.0032550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 26 42894 -0.032668 0.428632 0.3710243 0.0032310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 27 42895 -0.030068 0.429632 0.3678071 0.0031880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 28 42896 -0.027468 0.430432 0.3646550 0.0031150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 29 42897 -0.024768 0.431232 0.3615709 0.0030420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 4 30 42898 -0.022167 0.432033 0.3585688 0.0029730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 1 42899 -0.019567 0.432633 0.3556297 0.0029200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 2 42900 -0.016867 0.433233 0.3527196 0.0028960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 3 42901 -0.014267 0.433733 0.3498155 0.0029110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 4 42902 -0.011566 0.434234 0.3468824 0.0029740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 5 42903 -0.008966 0.434534 0.3438503 0.0030880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 6 42904 -0.006266 0.434834 0.3406901 0.0032370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 7 42905 -0.003665 0.435135 0.3373660 0.0034240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 8 42906 -0.000965 0.435235 0.3338529 0.0036010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 9 42907 0.001635 0.435335 0.3301858 0.0037320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 10 42908 0.004335 0.435335 0.3264027 0.0038020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 11 42909 0.007036 0.435336 0.3226036 0.0037790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 12 42910 0.009736 0.435136 0.3188745 0.0036670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 13 42911 0.012436 0.434936 0.3152964 0.0034920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 14 42912 0.015136 0.434736 0.3118903 0.0033150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 15 42913 0.017837 0.434337 0.3086521 0.0031720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 16 42914 0.020537 0.433937 0.3055240 0.0031070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 17 42915 0.023237 0.433537 0.3024259 0.0030960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 18 42916 0.026038 0.432938 0.2993168 0.0031150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 19 42917 0.028838 0.432438 0.2961827 0.0031550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 20 42918 0.031638 0.431738 0.2930106 0.0031850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 21 42919 0.034438 0.431038 0.2898275 0.0031860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 22 42920 0.037239 0.430339 0.2866564 0.0031610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 23 42921 0.040039 0.429539 0.2835142 0.0031090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 24 42922 0.042939 0.428639 0.2804581 0.0030190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 25 42923 0.045839 0.427739 0.2774830 0.0029170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 26 42924 0.048740 0.426740 0.2746189 0.0028020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 27 42925 0.051640 0.425740 0.2718788 0.0026790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 28 42926 0.054540 0.424740 0.2692547 0.0025810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 29 42927 0.057541 0.423641 0.2667066 0.0025100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 30 42928 0.060541 0.422541 0.2642225 0.0024750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 5 31 42929 0.063541 0.421341 0.2617413 0.0024960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 1 42930 0.066541 0.420141 0.2592152 0.0025540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 2 42931 0.069542 0.418842 0.2566191 0.0026540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 3 42932 0.072642 0.417542 0.2538980 0.0027800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 4 42933 0.075642 0.416242 0.2510469 0.0029180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 5 42934 0.078742 0.414942 0.2480808 0.0030180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 6 42935 0.081743 0.413543 0.2450287 0.0030650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 7 42936 0.084843 0.412143 0.2419756 0.0030380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 8 42937 0.087943 0.410643 0.2389874 0.0029370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 9 42938 0.091044 0.409144 0.2361213 0.0027780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 10 42939 0.094144 0.407744 0.2334382 0.0025970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 11 42940 0.097144 0.406144 0.2309181 0.0024390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 12 42941 0.100244 0.404644 0.2285410 0.0023270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 13 42942 0.103345 0.403045 0.2262319 0.0022920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 14 42943 0.106345 0.401545 0.2239398 0.0023090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 15 42944 0.109445 0.399945 0.2216076 0.0023490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 16 42945 0.112445 0.398345 0.2192445 0.0023840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 17 42946 0.115446 0.396646 0.2168584 0.0023950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 18 42947 0.118446 0.395046 0.2144753 0.0023750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 19 42948 0.121446 0.393346 0.2121162 0.0023260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 20 42949 0.124347 0.391647 0.2098221 0.0022590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 21 42950 0.127347 0.389947 0.2076060 0.0021780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 22 42951 0.130247 0.388247 0.2054808 0.0020720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 23 42952 0.133147 0.386547 0.2034517 0.0019840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 24 42953 0.135948 0.384748 0.2015176 0.0018980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 25 42954 0.138848 0.382948 0.1996475 0.0018370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 26 42955 0.141648 0.381248 0.1978204 0.0018230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 27 42956 0.144448 0.379348 0.1959863 0.0018540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 28 42957 0.147249 0.377549 0.1940961 0.0019430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 29 42958 0.149949 0.375749 0.1920850 0.0020770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 6 30 42959 0.152649 0.373849 0.1899319 0.0022500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 1 42960 0.155350 0.371950 0.1875928 0.0024160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 2 42961 0.158050 0.370050 0.1850987 0.0025630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 3 42962 0.160750 0.368150 0.1824836 0.0026550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 4 42963 0.163350 0.366150 0.1798115 0.0026770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 5 42964 0.165951 0.364251 0.1771613 0.0026320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 6 42965 0.168551 0.362251 0.1745752 0.0025350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 7 42966 0.171151 0.360251 0.1720991 0.0024160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 8 42967 0.173751 0.358251 0.1697390 0.0023080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 9 42968 0.176252 0.356252 0.1674679 0.0022440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 10 42969 0.178752 0.354252 0.1652418 0.0022310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 11 42970 0.181252 0.352252 0.1629966 0.0022670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 12 42971 0.183653 0.350153 0.1606935 0.0023410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 13 42972 0.186153 0.348153 0.1583024 0.0024220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 14 42973 0.188553 0.346153 0.1558463 0.0024850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 15 42974 0.190853 0.344053 0.1533442 0.0025130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 16 42975 0.193154 0.342054 0.1508421 0.0024950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 17 42976 0.195454 0.340054 0.1483649 0.0024540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 18 42977 0.197754 0.337954 0.1459528 0.0023770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 19 42978 0.199955 0.335955 0.1436077 0.0022920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 20 42979 0.202155 0.333855 0.1413616 0.0022000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 21 42980 0.204255 0.331855 0.1392145 0.0021160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 22 42981 0.206255 0.329755 0.1371314 0.0020440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 23 42982 0.208356 0.327656 0.1351032 0.0020270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 24 42983 0.210256 0.325556 0.1330721 0.0020440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 25 42984 0.212156 0.323456 0.1309980 0.0021120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 26 42985 0.214056 0.321356 0.1288319 0.0022390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 27 42986 0.215857 0.319257 0.1265168 0.0023950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 28 42987 0.217557 0.317057 0.1240266 0.0025750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 29 42988 0.219257 0.314857 0.1213825 0.0027240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 30 42989 0.220958 0.312658 0.1185974 0.0028250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 7 31 42990 0.222458 0.310458 0.1157603 0.0028360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 1 42991 0.223958 0.308158 0.1129422 0.0027780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 2 42992 0.225458 0.305858 0.1102241 0.0026520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 3 42993 0.226759 0.303559 0.1076469 0.0025010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 4 42994 0.228159 0.301159 0.1052168 0.0023630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 5 42995 0.229359 0.298759 0.1029087 0.0022540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 6 42996 0.230559 0.296359 0.1006906 0.0022020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 7 42997 0.231660 0.293860 0.0984935 0.0021890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 8 42998 0.232660 0.291360 0.0962863 0.0022330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 9 42999 0.233660 0.288860 0.0940212 0.0022980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 10 43000 0.234561 0.286261 0.0916921 0.0023470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 11 43001 0.235361 0.283661 0.0893270 0.0023780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 12 43002 0.236161 0.281061 0.0869499 0.0023690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 13 43003 0.236861 0.278361 0.0846018 0.0023210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 14 43004 0.237462 0.275662 0.0823086 0.0022510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 15 43005 0.238062 0.272962 0.0800955 0.0021600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 16 43006 0.238462 0.270262 0.0779814 0.0020690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 17 43007 0.238862 0.267462 0.0759583 0.0019800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 18 43008 0.239263 0.264663 0.0740162 0.0019170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 19 43009 0.239463 0.261863 0.0721220 0.0018850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 20 43010 0.239663 0.258963 0.0702319 0.0018950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 21 43011 0.239764 0.256164 0.0683058 0.0019640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 22 43012 0.239864 0.253264 0.0662857 0.0020960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 23 43013 0.239764 0.250364 0.0640986 0.0022750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 24 43014 0.239664 0.247464 0.0617254 0.0024850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 25 43015 0.239565 0.244565 0.0591283 0.0027030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 26 43016 0.239265 0.241665 0.0563432 0.0028670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 27 43017 0.238965 0.238765 0.0534111 0.0029620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 28 43018 0.238565 0.235865 0.0504420 0.0029600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 29 43019 0.238166 0.232866 0.0475178 0.0028780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 30 43020 0.237566 0.229966 0.0447017 0.0027510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 8 31 43021 0.237066 0.227066 0.0420046 0.0026270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 1 43022 0.236367 0.224067 0.0394245 0.0025420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 2 43023 0.235667 0.221167 0.0369004 0.0025150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 3 43024 0.234867 0.218267 0.0343632 0.0025490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 4 43025 0.234067 0.215367 0.0317761 0.0026330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 5 43026 0.233168 0.212468 0.0290880 0.0027460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 6 43027 0.232268 0.209568 0.0262909 0.0028650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 7 43028 0.231268 0.206668 0.0233717 0.0029680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 8 43029 0.230268 0.203768 0.0203646 0.0030380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 9 43030 0.229169 0.200969 0.0173095 0.0030670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 10 43031 0.228069 0.198169 0.0142434 0.0030600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 11 43032 0.226869 0.195269 0.0112083 0.0030260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 12 43033 0.225670 0.192570 0.0082061 0.0029670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 13 43034 0.224470 0.189770 0.0052650 0.0029160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 14 43035 0.223170 0.187070 0.0023809 0.0028560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 15 43036 0.221970 0.184370 -0.0004562 0.0028210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 16 43037 0.220671 0.181671 -0.0032853 0.0028230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 17 43038 0.219271 0.179071 -0.0061265 0.0028700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 18 43039 0.217971 0.176371 -0.0090316 0.0029580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 19 43040 0.216571 0.173871 -0.0120597 0.0031060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 20 43041 0.215172 0.171272 -0.0152578 0.0032860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 21 43042 0.213772 0.168872 -0.0186400 0.0034860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 22 43043 0.212372 0.166372 -0.0222151 0.0036700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 23 43044 0.210873 0.163973 -0.0259592 0.0037930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 24 43045 0.209373 0.161573 -0.0297713 0.0038140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 25 43046 0.207973 0.159273 -0.0335634 0.0037450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 26 43047 0.206473 0.156973 -0.0372376 0.0036020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 27 43048 0.204974 0.154774 -0.0407487 0.0034220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 28 43049 0.203374 0.152574 -0.0440998 0.0032760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 29 43050 0.201874 0.150374 -0.0473209 0.0031780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 9 30 43051 0.200274 0.148274 -0.0504771 0.0031460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 1 43052 0.198775 0.146175 -0.0536302 0.0031680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 2 43053 0.197175 0.144175 -0.0568343 0.0032230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 3 43054 0.195575 0.142175 -0.0600904 0.0032890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 4 43055 0.193976 0.140276 -0.0634105 0.0033480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 5 43056 0.192376 0.138376 -0.0667777 0.0033820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 6 43057 0.190676 0.136476 -0.0701538 0.0033740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 7 43058 0.188976 0.134676 -0.0735139 0.0033400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 8 43059 0.187377 0.132877 -0.0768240 0.0032750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 9 43060 0.185677 0.131077 -0.0800482 0.0031810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 10 43061 0.183877 0.129377 -0.0831943 0.0030900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 11 43062 0.182178 0.127678 -0.0862404 0.0030070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 12 43063 0.180378 0.125978 -0.0892135 0.0029430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 13 43064 0.178578 0.124378 -0.0921367 0.0029190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 14 43065 0.176778 0.122678 -0.0950658 0.0029360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 15 43066 0.174879 0.121079 -0.0980239 0.0029880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 16 43067 0.172979 0.119579 -0.1010690 0.0030990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 17 43068 0.171079 0.117979 -0.1042362 0.0032540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 18 43069 0.169079 0.116479 -0.1075863 0.0034390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 19 43070 0.167080 0.114980 -0.1111074 0.0036210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 20 43071 0.165080 0.113480 -0.1148185 0.0037820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 21 43072 0.162980 0.111980 -0.1186497 0.0038660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 22 43073 0.160881 0.110481 -0.1225198 0.0038670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 23 43074 0.158781 0.109081 -0.1263529 0.0037770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 24 43075 0.156581 0.107681 -0.1300540 0.0036180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 25 43076 0.154381 0.106281 -0.1335871 0.0034520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 26 43077 0.152082 0.104982 -0.1369813 0.0033270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 27 43078 0.149782 0.103682 -0.1402724 0.0032670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 28 43079 0.147382 0.102382 -0.1435265 0.0032590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 29 43080 0.144982 0.101082 -0.1468146 0.0033020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 30 43081 0.142583 0.099883 -0.1501348 0.0033480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 10 31 43082 0.140083 0.098683 -0.1534989 0.0033760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 1 43083 0.137583 0.097483 -0.1568820 0.0033850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 2 43084 0.135084 0.096384 -0.1602691 0.0033660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 3 43085 0.132484 0.095284 -0.1636143 0.0033170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 4 43086 0.129884 0.094184 -0.1668944 0.0032400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 5 43087 0.127184 0.093184 -0.1700765 0.0031300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 6 43088 0.124585 0.092185 -0.1731516 0.0030100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 7 43089 0.121785 0.091285 -0.1761078 0.0029040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 8 43090 0.119085 0.090285 -0.1789559 0.0028050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 9 43091 0.116285 0.089385 -0.1817260 0.0027310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 10 43092 0.113486 0.088586 -0.1844302 0.0026930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 11 43093 0.110586 0.087786 -0.1871273 0.0027060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 12 43094 0.107686 0.086886 -0.1898584 0.0027530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 13 43095 0.104787 0.086187 -0.1926465 0.0028400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 14 43096 0.101787 0.085387 -0.1955487 0.0029690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 15 43097 0.098787 0.084687 -0.1985998 0.0031220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 16 43098 0.095787 0.083987 -0.2017899 0.0032640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 17 43099 0.092688 0.083288 -0.2051050 0.0033660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 18 43100 0.089588 0.082588 -0.2084982 0.0034090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 19 43101 0.086488 0.081988 -0.2118953 0.0033690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 20 43102 0.083288 0.081388 -0.2152134 0.0032590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 21 43103 0.080189 0.080789 -0.2184005 0.0031140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 22 43104 0.076889 0.080189 -0.2214477 0.0029930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 23 43105 0.073689 0.079589 -0.2243948 0.0029240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 24 43106 0.070390 0.079090 -0.2273079 0.0029110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 25 43107 0.067090 0.078490 -0.2302440 0.0029580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 26 43108 0.063690 0.077990 -0.2332312 0.0030270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 27 43109 0.060390 0.077490 -0.2362843 0.0030880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 28 43110 0.056991 0.077091 -0.2393994 0.0031250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 29 43111 0.053491 0.076591 -0.2425256 0.0031320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 11 30 43112 0.049991 0.076191 -0.2456437 0.0031000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 1 43113 0.046491 0.075791 -0.2487168 0.0030420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 2 43114 0.042992 0.075392 -0.2517309 0.0029740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 3 43115 0.039392 0.074992 -0.2546611 0.0028830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 4 43116 0.035792 0.074692 -0.2574982 0.0027930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 5 43117 0.032193 0.074293 -0.2602513 0.0027070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 6 43118 0.028493 0.074093 -0.2629314 0.0026560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 7 43119 0.024793 0.073793 -0.2655656 0.0026290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 8 43120 0.021093 0.073593 -0.2681927 0.0026300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 9 43121 0.017294 0.073394 -0.2708398 0.0026820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 10 43122 0.013494 0.073294 -0.2735600 0.0027620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 11 43123 0.009694 0.073094 -0.2763751 0.0028720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 12 43124 0.005894 0.073094 -0.2793082 0.0029850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 13 43125 0.001995 0.073095 -0.2823333 0.0030910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 14 43126 -0.001905 0.073095 -0.2854705 0.0031660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 15 43127 -0.005805 0.073195 -0.2886586 0.0032000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 16 43128 -0.009704 0.073296 -0.2918387 0.0031600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 17 43129 -0.013604 0.073496 -0.2949678 0.0030680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 18 43130 -0.017604 0.073696 -0.2979610 0.0029250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 19 43131 -0.021504 0.073996 -0.3008261 0.0027960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 20 43132 -0.025503 0.074297 -0.3035542 0.0026900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 21 43133 -0.029503 0.074697 -0.3062154 0.0026430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 22 43134 -0.033403 0.075197 -0.3088705 0.0026650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 23 43135 -0.037403 0.075697 -0.3115666 0.0027230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 24 43136 -0.041402 0.076298 -0.3143167 0.0027830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 25 43137 -0.045302 0.076898 -0.3171259 0.0028290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 26 43138 -0.049202 0.077598 -0.3199610 0.0028360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 27 43139 -0.053201 0.078399 -0.3227861 0.0028070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 28 43140 -0.057101 0.079199 -0.3255753 0.0027570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 29 43141 -0.060901 0.080099 -0.3282924 0.0026850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 30 43142 -0.064801 0.081099 -0.3309315 0.0026010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1976 12 31 43143 -0.068600 0.082100 -0.3334846 0.0025150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 1 43144 -0.072400 0.083200 0.6640352 0.0024390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 2 43145 -0.076200 0.084400 0.6616291 0.0023880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 3 43146 -0.079899 0.085701 0.6592480 0.0023700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 4 43147 -0.083599 0.087001 0.6568658 0.0024020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 5 43148 -0.087299 0.088401 0.6544407 0.0024650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 6 43149 -0.090899 0.089901 0.6519226 0.0025680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 7 43150 -0.094498 0.091502 0.6492834 0.0027130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 8 43151 -0.098098 0.093102 0.6465003 0.0028630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 9 43152 -0.101598 0.094802 0.6435602 0.0030050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 10 43153 -0.105098 0.096602 0.6405021 0.0031140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 11 43154 -0.108497 0.098403 0.6373489 0.0031720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 12 43155 -0.111897 0.100303 0.6341788 0.0031700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 13 43156 -0.115297 0.102303 0.6310277 0.0031130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 14 43157 -0.118596 0.104404 0.6279635 0.0030100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 15 43158 -0.121896 0.106504 0.6250104 0.0029070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 16 43159 -0.125196 0.108704 0.6221523 0.0028170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 17 43160 -0.128396 0.111004 0.6193602 0.0027760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 18 43161 -0.131595 0.113305 0.6165790 0.0027850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 19 43162 -0.134795 0.115705 0.6137639 0.0028520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 20 43163 -0.137895 0.118105 0.6108678 0.0029300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 21 43164 -0.140995 0.120605 0.6078976 0.0030050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 22 43165 -0.144094 0.123106 0.6048795 0.0030330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 23 43166 -0.147094 0.125806 0.6018584 0.0030140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 24 43167 -0.150094 0.128406 0.5988762 0.0029530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 25 43168 -0.152993 0.131107 0.5959701 0.0028540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 26 43169 -0.155893 0.133907 0.5931640 0.0027470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 27 43170 -0.158793 0.136707 0.5904778 0.0026340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 28 43171 -0.161693 0.139607 0.5878927 0.0025280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 29 43172 -0.164492 0.142508 0.5854146 0.0024430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 30 43173 -0.167292 0.145408 0.5829965 0.0023890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 1 31 43174 -0.169992 0.148408 0.5806223 0.0023770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 1 43175 -0.172692 0.151408 0.5782372 0.0024090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 2 43176 -0.175391 0.154509 0.5757991 0.0024740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 3 43177 -0.177991 0.157709 0.5732659 0.0025880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 4 43178 -0.180591 0.160809 0.5706048 0.0027250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 5 43179 -0.183190 0.164010 0.5678047 0.0028630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 6 43180 -0.185690 0.167310 0.5648885 0.0029710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 7 43181 -0.188190 0.170610 0.5618814 0.0030230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 8 43182 -0.190590 0.173910 0.5588563 0.0030140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 9 43183 -0.192989 0.177311 0.5558831 0.0029320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 10 43184 -0.195289 0.180711 0.5530070 0.0028070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 11 43185 -0.197589 0.184111 0.5502639 0.0026810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 12 43186 -0.199889 0.187611 0.5476487 0.0025650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 13 43187 -0.202088 0.191112 0.5451186 0.0025040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 14 43188 -0.204188 0.194712 0.5426215 0.0025000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 15 43189 -0.206288 0.198212 0.5400904 0.0025600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 16 43190 -0.208287 0.201813 0.5374792 0.0026550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 17 43191 -0.210287 0.205413 0.5347681 0.0027660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 18 43192 -0.212187 0.209113 0.5319660 0.0028420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 19 43193 -0.214087 0.212713 0.5290978 0.0028850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 20 43194 -0.215886 0.216414 0.5262117 0.0028800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 21 43195 -0.217586 0.220114 0.5233516 0.0028340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 22 43196 -0.219286 0.223814 0.5205614 0.0027630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 23 43197 -0.220886 0.227514 0.5178393 0.0026790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 24 43198 -0.222385 0.231215 0.5152112 0.0025870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 25 43199 -0.223785 0.235015 0.5126590 0.0025200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 26 43200 -0.225185 0.238715 0.5101619 0.0024790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 27 43201 -0.226484 0.242416 0.5076868 0.0024670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 2 28 43202 -0.227684 0.246116 0.5052026 0.0025100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 1 43203 -0.228884 0.249816 0.5026605 0.0025900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 2 43204 -0.229884 0.253516 0.5000074 0.0027130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 3 43205 -0.230883 0.257217 0.4972222 0.0028710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 4 43206 -0.231783 0.260817 0.4942701 0.0030340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 5 43207 -0.232583 0.264517 0.4911490 0.0031940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 6 43208 -0.233283 0.268217 0.4878888 0.0033060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 7 43209 -0.233982 0.271818 0.4845607 0.0033450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 8 43210 -0.234482 0.275518 0.4812376 0.0033020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 9 43211 -0.234882 0.279118 0.4779884 0.0031960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 10 43212 -0.235281 0.282719 0.4748543 0.0030620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 11 43213 -0.235581 0.286419 0.4718602 0.0029510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 12 43214 -0.235781 0.290019 0.4689480 0.0028830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 13 43215 -0.235781 0.293619 0.4660659 0.0028910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 14 43216 -0.235780 0.297220 0.4631568 0.0029450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 15 43217 -0.235680 0.300820 0.4601616 0.0030480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 16 43218 -0.235480 0.304320 0.4570435 0.0031800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 17 43219 -0.235280 0.307920 0.4538154 0.0033030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 18 43220 -0.234879 0.311521 0.4504472 0.0033970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 19 43221 -0.234379 0.315021 0.4470271 0.0034370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 20 43222 -0.233879 0.318521 0.4435880 0.0034330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 21 43223 -0.233178 0.322022 0.4401718 0.0033850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 22 43224 -0.232478 0.325522 0.4368237 0.0033180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 23 43225 -0.231678 0.329022 0.4335376 0.0032360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 24 43226 -0.230778 0.332522 0.4303494 0.0031430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 25 43227 -0.229777 0.335923 0.4272443 0.0030710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 26 43228 -0.228677 0.339323 0.4242062 0.0030210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 27 43229 -0.227477 0.342623 0.4211980 0.0030030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 28 43230 -0.226276 0.345924 0.4181859 0.0030300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 29 43231 -0.224876 0.349224 0.4151228 0.0031020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 30 43232 -0.223476 0.352424 0.4119776 0.0032040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 3 31 43233 -0.221976 0.355624 0.4087055 0.0033340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 1 43234 -0.220375 0.358825 0.4052984 0.0034700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 2 43235 -0.218775 0.361925 0.4017732 0.0035820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 3 43236 -0.217075 0.364925 0.3981631 0.0036250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 4 43237 -0.215275 0.367925 0.3945510 0.0035950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 5 43238 -0.213374 0.370926 0.3910098 0.0034840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 6 43239 -0.211474 0.373826 0.3876107 0.0033080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 7 43240 -0.209474 0.376726 0.3843966 0.0031420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 8 43241 -0.207473 0.379627 0.3813254 0.0030170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 9 43242 -0.205373 0.382427 0.3783423 0.0029590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 10 43243 -0.203173 0.385127 0.3753792 0.0029580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 11 43244 -0.200973 0.387827 0.3724020 0.0030210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 12 43245 -0.198772 0.390528 0.3693299 0.0031130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 13 43246 -0.196472 0.393228 0.3661757 0.0032040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 14 43247 -0.194172 0.395828 0.3629276 0.0032760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 15 43248 -0.191772 0.398328 0.3596345 0.0033140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 16 43249 -0.189471 0.400829 0.3563023 0.0033350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 17 43250 -0.187071 0.403329 0.3529772 0.0033200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 18 43251 -0.184571 0.405829 0.3496791 0.0032610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 19 43252 -0.182170 0.408230 0.3464569 0.0031830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 20 43253 -0.179670 0.410630 0.3433028 0.0031180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 21 43254 -0.177270 0.412930 0.3402147 0.0030610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 22 43255 -0.174770 0.415230 0.3371705 0.0030310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 23 43256 -0.172269 0.417531 0.3341514 0.0030260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 24 43257 -0.169769 0.419831 0.3311153 0.0030520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 25 43258 -0.167269 0.422031 0.3280321 0.0031210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 26 43259 -0.164669 0.424231 0.3248700 0.0032100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 27 43260 -0.162168 0.426432 0.3215919 0.0033300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 28 43261 -0.159668 0.428532 0.3181937 0.0034680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 29 43262 -0.157068 0.430632 0.3146576 0.0036010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 4 30 43263 -0.154567 0.432733 0.3109924 0.0037010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 1 43264 -0.152067 0.434833 0.3072673 0.0037370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 2 43265 -0.149467 0.436833 0.3035552 0.0036930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 3 43266 -0.146867 0.438933 0.2999150 0.0035680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 4 43267 -0.144266 0.440934 0.2964229 0.0034140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 5 43268 -0.141666 0.442834 0.2930838 0.0032680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 6 43269 -0.139066 0.444834 0.2898796 0.0031590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 7 43270 -0.136366 0.446734 0.2867445 0.0031200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 8 43271 -0.133665 0.448635 0.2836324 0.0031320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 9 43272 -0.130965 0.450535 0.2804842 0.0031570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 10 43273 -0.128165 0.452335 0.2773091 0.0031900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 11 43274 -0.125364 0.454136 0.2740999 0.0032020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 12 43275 -0.122464 0.455936 0.2709038 0.0031850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 13 43276 -0.119564 0.457636 0.2677417 0.0031350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 14 43277 -0.116564 0.459336 0.2646545 0.0030540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 15 43278 -0.113563 0.460937 0.2616514 0.0029390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 16 43279 -0.110463 0.462537 0.2587703 0.0028210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 17 43280 -0.107263 0.464137 0.2560071 0.0027050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 18 43281 -0.104063 0.465637 0.2533560 0.0025920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 19 43282 -0.100762 0.467138 0.2508149 0.0025050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 20 43283 -0.097462 0.468538 0.2483347 0.0024600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 21 43284 -0.094062 0.469938 0.2458916 0.0024320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 22 43285 -0.090561 0.471239 0.2434464 0.0024540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 23 43286 -0.086961 0.472539 0.2409613 0.0025130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 24 43287 -0.083361 0.473739 0.2384002 0.0026020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 25 43288 -0.079661 0.474939 0.2357500 0.0027100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 26 43289 -0.075860 0.476040 0.2329889 0.0028210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 27 43290 -0.072060 0.477140 0.2301248 0.0029150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 28 43291 -0.068160 0.478140 0.2271736 0.0029670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 29 43292 -0.064160 0.479040 0.2242005 0.0029680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 30 43293 -0.060159 0.480041 0.2212593 0.0029010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 5 31 43294 -0.056159 0.480841 0.2184252 0.0027820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 1 43295 -0.051959 0.481741 0.2157001 0.0026470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 2 43296 -0.047758 0.482442 0.2131109 0.0025490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 3 43297 -0.043558 0.483242 0.2105848 0.0025050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 4 43298 -0.039258 0.483842 0.2080907 0.0025100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 5 43299 -0.034958 0.484542 0.2055515 0.0025610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 6 43300 -0.030557 0.485143 0.2029674 0.0026050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 7 43301 -0.026157 0.485643 0.2003492 0.0026250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 8 43302 -0.021757 0.486143 0.1977301 0.0026080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 9 43303 -0.017257 0.486543 0.1951570 0.0025530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 10 43304 -0.012656 0.486944 0.1926448 0.0024570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 11 43305 -0.008156 0.487244 0.1902397 0.0023490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 12 43306 -0.003556 0.487544 0.1879506 0.0022180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 13 43307 0.001045 0.487845 0.1857934 0.0020960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 14 43308 0.005645 0.487945 0.1837543 0.0019750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 15 43309 0.010345 0.488045 0.1818351 0.0018780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 16 43310 0.014945 0.488145 0.1799870 0.0018240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 17 43311 0.019646 0.488146 0.1781749 0.0017960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 18 43312 0.024346 0.488046 0.1763817 0.0018070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 19 43313 0.028946 0.487946 0.1745486 0.0018530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 20 43314 0.033647 0.487647 0.1726545 0.0019390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 21 43315 0.038347 0.487447 0.1706743 0.0020340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 22 43316 0.042947 0.487047 0.1685962 0.0021310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 23 43317 0.047547 0.486647 0.1664170 0.0022130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 24 43318 0.052148 0.486148 0.1641699 0.0022740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 25 43319 0.056748 0.485648 0.1618958 0.0022770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 26 43320 0.061348 0.485048 0.1596236 0.0022360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 27 43321 0.065848 0.484348 0.1574295 0.0021470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 28 43322 0.070349 0.483549 0.1553383 0.0020320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 29 43323 0.074849 0.482749 0.1533612 0.0019360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 6 30 43324 0.079249 0.481849 0.1514621 0.0018710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 1 43325 0.083650 0.480850 0.1495879 0.0018750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 2 43326 0.087950 0.479850 0.1476938 0.0019300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 3 43327 0.092250 0.478750 0.1457227 0.0020030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 4 43328 0.096450 0.477550 0.1436925 0.0020610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 5 43329 0.100651 0.476351 0.1416254 0.0020760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 6 43330 0.104851 0.475051 0.1395562 0.0020520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 7 43331 0.108851 0.473651 0.1375351 0.0019770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 8 43332 0.112951 0.472251 0.1356020 0.0018840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 9 43333 0.116952 0.470752 0.1337718 0.0017760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 10 43334 0.120852 0.469252 0.1320497 0.0016760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 11 43335 0.124752 0.467652 0.1304165 0.0015850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 12 43336 0.128553 0.466053 0.1288634 0.0015250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 13 43337 0.132253 0.464353 0.1273543 0.0014880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 14 43338 0.136053 0.462653 0.1258641 0.0014990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 15 43339 0.139653 0.460853 0.1243430 0.0015600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 16 43340 0.143354 0.459054 0.1227308 0.0016480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 17 43341 0.146854 0.457154 0.1210257 0.0017680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 18 43342 0.150354 0.455254 0.1191886 0.0019080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 19 43343 0.153854 0.453354 0.1172074 0.0020530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 20 43344 0.157255 0.451355 0.1150873 0.0021730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 21 43345 0.160655 0.449355 0.1128631 0.0022690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 22 43346 0.163955 0.447255 0.1105750 0.0022980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 23 43347 0.167256 0.445156 0.1082829 0.0022770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 24 43348 0.170456 0.443056 0.1060357 0.0022140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 25 43349 0.173656 0.440956 0.1038636 0.0021170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 26 43350 0.176756 0.438756 0.1017914 0.0020220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 27 43351 0.179857 0.436457 0.0997993 0.0019580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 28 43352 0.182957 0.434257 0.0978572 0.0019370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 29 43353 0.185957 0.431957 0.0959070 0.0019710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 30 43354 0.188857 0.429657 0.0938919 0.0020430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 7 31 43355 0.191858 0.427258 0.0918097 0.0021180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 1 43356 0.194658 0.424858 0.0896656 0.0021600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 2 43357 0.197558 0.422458 0.0874965 0.0021600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 3 43358 0.200359 0.420059 0.0853653 0.0020940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 4 43359 0.203059 0.417559 0.0833322 0.0019860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 5 43360 0.205759 0.415059 0.0814000 0.0018650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 6 43361 0.208459 0.412559 0.0796029 0.0017370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 7 43362 0.211160 0.409960 0.0779328 0.0016160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 8 43363 0.213760 0.407360 0.0763646 0.0015230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 9 43364 0.216260 0.404760 0.0748755 0.0014710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 10 43365 0.218860 0.402060 0.0734103 0.0014560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 11 43366 0.221361 0.399361 0.0719482 0.0014940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 12 43367 0.223761 0.396661 0.0704171 0.0015630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 13 43368 0.226261 0.393861 0.0687999 0.0016870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 14 43369 0.228662 0.391162 0.0670448 0.0018270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 15 43370 0.230962 0.388362 0.0651316 0.0019880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 16 43371 0.233362 0.385462 0.0630715 0.0021400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 17 43372 0.235662 0.382662 0.0608624 0.0022580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 18 43373 0.237863 0.379763 0.0585622 0.0023350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 19 43374 0.240163 0.376863 0.0562231 0.0023430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 20 43375 0.242363 0.373963 0.0538919 0.0023120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 21 43376 0.244463 0.370963 0.0515968 0.0022550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 22 43377 0.246664 0.367964 0.0493717 0.0022080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 23 43378 0.248664 0.364964 0.0471815 0.0021790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 24 43379 0.250764 0.361964 0.0449964 0.0022090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 25 43380 0.252765 0.358965 0.0427552 0.0022930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 26 43381 0.254665 0.355865 0.0404051 0.0024230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 27 43382 0.256565 0.352865 0.0379020 0.0025740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 28 43383 0.258465 0.349765 0.0352608 0.0027040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 29 43384 0.260266 0.346566 0.0325087 0.0028110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 30 43385 0.261966 0.343466 0.0296675 0.0028410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 8 31 43386 0.263666 0.340266 0.0268344 0.0028270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 1 43387 0.265366 0.337166 0.0240352 0.0027550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 2 43388 0.266867 0.333867 0.0213191 0.0026760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 3 43389 0.268367 0.330667 0.0186920 0.0025880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 4 43390 0.269867 0.327467 0.0161378 0.0025140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 5 43391 0.271168 0.324168 0.0136557 0.0024660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 6 43392 0.272468 0.320868 0.0111935 0.0024550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 7 43393 0.273668 0.317468 0.0087314 0.0024760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 8 43394 0.274868 0.314168 0.0062273 0.0025500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 9 43395 0.275869 0.310769 0.0036291 0.0026430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 10 43396 0.276869 0.307369 0.0009200 0.0027690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 11 43397 0.277769 0.303869 -0.0019162 0.0029130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 12 43398 0.278670 0.300370 -0.0048973 0.0030500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 13 43399 0.279370 0.296870 -0.0080084 0.0031740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 14 43400 0.279970 0.293270 -0.0112206 0.0032410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 15 43401 0.280570 0.289670 -0.0144687 0.0032430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 16 43402 0.280971 0.286071 -0.0176849 0.0031800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 17 43403 0.281371 0.282371 -0.0208150 0.0030740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 18 43404 0.281671 0.278571 -0.0238402 0.0029580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 19 43405 0.281871 0.274871 -0.0267373 0.0028650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 20 43406 0.281972 0.271072 -0.0295754 0.0028190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 21 43407 0.281972 0.267172 -0.0323946 0.0028180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 22 43408 0.281972 0.263272 -0.0352377 0.0028750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 23 43409 0.281773 0.259373 -0.0381439 0.0029620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 24 43410 0.281573 0.255473 -0.0411530 0.0030420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 25 43411 0.281273 0.251473 -0.0442321 0.0031080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 26 43412 0.280873 0.247473 -0.0473533 0.0031280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 27 43413 0.280374 0.243374 -0.0504684 0.0030950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 28 43414 0.279774 0.239374 -0.0535286 0.0030060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 29 43415 0.279174 0.235274 -0.0564817 0.0028970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 9 30 43416 0.278474 0.231174 -0.0593189 0.0027880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 1 43417 0.277675 0.226975 -0.0620520 0.0026790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 2 43418 0.276775 0.222875 -0.0646931 0.0026000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 3 43419 0.275775 0.218675 -0.0672623 0.0025530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 4 43420 0.274776 0.214576 -0.0698134 0.0025560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 5 43421 0.273676 0.210376 -0.0723796 0.0025910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 6 43422 0.272476 0.206176 -0.0750197 0.0026770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 7 43423 0.271176 0.202076 -0.0777549 0.0028000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 8 43424 0.269877 0.197877 -0.0806270 0.0029680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 9 43425 0.268477 0.193777 -0.0836851 0.0031380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 10 43426 0.266977 0.189677 -0.0869123 0.0033020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 11 43427 0.265477 0.185577 -0.0902884 0.0034350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 12 43428 0.263878 0.181478 -0.0937736 0.0035210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 13 43429 0.262178 0.177378 -0.0972997 0.0035280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 14 43430 0.260478 0.173378 -0.1008089 0.0034720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 15 43431 0.258579 0.169379 -0.1042320 0.0033820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 16 43432 0.256779 0.165479 -0.1075741 0.0032990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 17 43433 0.254779 0.161579 -0.1108333 0.0032460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 18 43434 0.252779 0.157779 -0.1140864 0.0032480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 19 43435 0.250680 0.153980 -0.1173586 0.0033030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 20 43436 0.248580 0.150180 -0.1207027 0.0033800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 21 43437 0.246380 0.146580 -0.1241309 0.0034650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 22 43438 0.244180 0.142880 -0.1276270 0.0035250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 23 43439 0.241781 0.139381 -0.1311691 0.0035420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 24 43440 0.239481 0.135881 -0.1347063 0.0035160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 25 43441 0.236981 0.132481 -0.1381964 0.0034470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 26 43442 0.234582 0.129082 -0.1415896 0.0033330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 27 43443 0.231982 0.125882 -0.1448677 0.0032130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 28 43444 0.229382 0.122682 -0.1480149 0.0030830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 29 43445 0.226782 0.119482 -0.1510290 0.0029690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 30 43446 0.224083 0.116483 -0.1539521 0.0028720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 10 31 43447 0.221383 0.113483 -0.1567963 0.0028190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 1 43448 0.218583 0.110583 -0.1596034 0.0028060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 2 43449 0.215783 0.107683 -0.1624306 0.0028430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 3 43450 0.212984 0.104984 -0.1653027 0.0029160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 4 43451 0.210084 0.102284 -0.1682729 0.0030180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 5 43452 0.207184 0.099584 -0.1713450 0.0031390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 6 43453 0.204185 0.097085 -0.1745521 0.0032640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 7 43454 0.201185 0.094585 -0.1778783 0.0033840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 8 43455 0.198185 0.092185 -0.1813194 0.0034680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 9 43456 0.195185 0.089785 -0.1848046 0.0034940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 10 43457 0.192086 0.087586 -0.1882837 0.0034540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 11 43458 0.188986 0.085286 -0.1916959 0.0033630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 12 43459 0.185786 0.083086 -0.1950050 0.0032530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 13 43460 0.182586 0.080986 -0.1982091 0.0031640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 14 43461 0.179387 0.078887 -0.2013493 0.0031260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 15 43462 0.176187 0.076887 -0.2044794 0.0031440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 16 43463 0.172887 0.074987 -0.2076516 0.0031910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 17 43464 0.169588 0.072988 -0.2108767 0.0032580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 18 43465 0.166288 0.071088 -0.2141629 0.0032990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 19 43466 0.162888 0.069288 -0.2174640 0.0033080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 20 43467 0.159488 0.067488 -0.2207572 0.0032690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 21 43468 0.156089 0.065689 -0.2239883 0.0031920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 22 43469 0.152589 0.063989 -0.2271404 0.0030950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 23 43470 0.149089 0.062189 -0.2301746 0.0029710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 24 43471 0.145589 0.060489 -0.2330817 0.0028420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 25 43472 0.141990 0.058890 -0.2358629 0.0027250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 26 43473 0.138390 0.057190 -0.2385380 0.0026310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 27 43474 0.134790 0.055590 -0.2411352 0.0025790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 28 43475 0.131091 0.053991 -0.2437093 0.0025620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 29 43476 0.127391 0.052491 -0.2462824 0.0025930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 11 30 43477 0.123691 0.050891 -0.2488956 0.0026480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 1 43478 0.119991 0.049391 -0.2515897 0.0027430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 2 43479 0.116192 0.047892 -0.2543879 0.0028470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 3 43480 0.112392 0.046392 -0.2572970 0.0029690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 4 43481 0.108592 0.044992 -0.2603252 0.0030950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 5 43482 0.104692 0.043592 -0.2634793 0.0031980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 6 43483 0.100893 0.042193 -0.2667095 0.0032730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 7 43484 0.096993 0.040893 -0.2699986 0.0033050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 8 43485 0.093093 0.039493 -0.2732927 0.0032850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 9 43486 0.089194 0.038294 -0.2765679 0.0032410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 10 43487 0.085294 0.036994 -0.2797760 0.0031980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 11 43488 0.081394 0.035894 -0.2829652 0.0031900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 12 43489 0.077494 0.034694 -0.2861733 0.0032470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 13 43490 0.073595 0.033595 -0.2894775 0.0033540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 14 43491 0.069695 0.032595 -0.2928796 0.0034620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 15 43492 0.065695 0.031595 -0.2964058 0.0035660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 16 43493 0.061796 0.030696 -0.2999979 0.0036200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 17 43494 0.057896 0.029796 -0.3036210 0.0036170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 18 43495 0.053996 0.028996 -0.3072182 0.0035630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 19 43496 0.050096 0.028196 -0.3107373 0.0034690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 20 43497 0.046197 0.027597 -0.3141505 0.0033480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 21 43498 0.042297 0.026897 -0.3174416 0.0032240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 22 43499 0.038397 0.026397 -0.3206028 0.0031000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 23 43500 0.034597 0.025897 -0.3236489 0.0029970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 24 43501 0.030698 0.025598 -0.3265971 0.0029150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 25 43502 0.026898 0.025198 -0.3295002 0.0028790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 26 43503 0.022998 0.024998 -0.3323783 0.0028790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 27 43504 0.019199 0.024899 -0.3352605 0.0029030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 28 43505 0.015399 0.024799 -0.3381936 0.0029650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 29 43506 0.011599 0.024799 -0.3411978 0.0030480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 30 43507 0.007899 0.024899 -0.3442809 0.0031280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1977 12 31 43508 0.004100 0.025000 -0.3474531 0.0032130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 1 43509 0.000400 0.025300 0.6492998 0.0032780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 2 43510 -0.003400 0.025600 0.6459906 0.0033130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 3 43511 -0.007100 0.025900 0.6426775 0.0033170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 4 43512 -0.010799 0.026401 0.6393814 0.0032710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 5 43513 -0.014499 0.026901 0.6361472 0.0032010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 6 43514 -0.018199 0.027501 0.6329911 0.0031210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 7 43515 -0.021898 0.028202 0.6298989 0.0030620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 8 43516 -0.025598 0.028902 0.6268418 0.0030600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 9 43517 -0.029298 0.029702 0.6237586 0.0031250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 10 43518 -0.032898 0.030602 0.6205895 0.0032170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 11 43519 -0.036597 0.031503 0.6173233 0.0033110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 12 43520 -0.040297 0.032503 0.6139692 0.0033800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 13 43521 -0.043997 0.033603 0.6105830 0.0033820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 14 43522 -0.047697 0.034703 0.6072239 0.0033350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 15 43523 -0.051396 0.035804 0.6039358 0.0032460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 16 43524 -0.055196 0.037004 0.6007496 0.0031340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 17 43525 -0.058896 0.038304 0.5976695 0.0030170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 18 43526 -0.062595 0.039605 0.5947233 0.0028990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 19 43527 -0.066395 0.041005 0.5918642 0.0028010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 20 43528 -0.070095 0.042405 0.5891000 0.0027440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 21 43529 -0.073895 0.043805 0.5863729 0.0027150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 22 43530 -0.077594 0.045306 0.5836677 0.0027140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 23 43531 -0.081394 0.046906 0.5809336 0.0027600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 24 43532 -0.085094 0.048406 0.5781365 0.0028260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 25 43533 -0.088894 0.050006 0.5752633 0.0029240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 26 43534 -0.092593 0.051707 0.5722862 0.0030320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 27 43535 -0.096393 0.053307 0.5692010 0.0031350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 28 43536 -0.100093 0.055007 0.5660219 0.0032280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 29 43537 -0.103792 0.056708 0.5627657 0.0032880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 30 43538 -0.107492 0.058408 0.5594696 0.0033070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 1 31 43539 -0.111092 0.060208 0.5561644 0.0032870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 1 43540 -0.114692 0.061908 0.5528953 0.0032490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 2 43541 -0.118291 0.063709 0.5496701 0.0032000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 3 43542 -0.121891 0.065509 0.5464890 0.0031660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 4 43543 -0.125391 0.067409 0.5433149 0.0031810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 5 43544 -0.128791 0.069209 0.5401087 0.0032510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 6 43545 -0.132190 0.071110 0.5367946 0.0033920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 7 43546 -0.135590 0.073010 0.5333264 0.0035480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 8 43547 -0.138890 0.074910 0.5296943 0.0036880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 9 43548 -0.142189 0.076811 0.5259551 0.0037890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 10 43549 -0.145289 0.078811 0.5221490 0.0038210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 11 43550 -0.148489 0.080711 0.5183328 0.0037920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 12 43551 -0.151489 0.082711 0.5145787 0.0037120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 13 43552 -0.154488 0.084812 0.5109255 0.0036150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 14 43553 -0.157388 0.086812 0.5073584 0.0035120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 15 43554 -0.160288 0.088912 0.5038952 0.0034370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 16 43555 -0.163088 0.091012 0.5004831 0.0033810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 17 43556 -0.165787 0.093213 0.4971110 0.0033620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 18 43557 -0.168487 0.095413 0.4937468 0.0033750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 19 43558 -0.171087 0.097613 0.4903477 0.0034280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 20 43559 -0.173586 0.099914 0.4868775 0.0035070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 21 43560 -0.176086 0.102214 0.4833234 0.0035830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 22 43561 -0.178486 0.104514 0.4797062 0.0036540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 23 43562 -0.180886 0.106914 0.4760161 0.0037260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 24 43563 -0.183185 0.109415 0.4722489 0.0037810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 25 43564 -0.185485 0.111915 0.4684548 0.0038020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 26 43565 -0.187685 0.114415 0.4646716 0.0037750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 27 43566 -0.189885 0.117015 0.4609295 0.0037020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 2 28 43567 -0.191984 0.119716 0.4572814 0.0036030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 1 43568 -0.193984 0.122416 0.4537292 0.0034900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 2 43569 -0.195984 0.125216 0.4502961 0.0033890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 3 43570 -0.197983 0.128017 0.4469499 0.0033230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 4 43571 -0.199883 0.130917 0.4436448 0.0033080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 5 43572 -0.201683 0.133817 0.4403166 0.0033560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 6 43573 -0.203483 0.136817 0.4369185 0.0034350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 7 43574 -0.205282 0.139818 0.4334333 0.0035430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 8 43575 -0.206982 0.142918 0.4298412 0.0036330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 9 43576 -0.208582 0.146018 0.4261880 0.0036650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 10 43577 -0.210181 0.149219 0.4225339 0.0036290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 11 43578 -0.211681 0.152419 0.4189387 0.0035450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 12 43579 -0.213081 0.155719 0.4154566 0.0034150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 13 43580 -0.214481 0.159019 0.4121095 0.0032870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 14 43581 -0.215780 0.162420 0.4088783 0.0031700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 15 43582 -0.217080 0.165820 0.4057622 0.0030680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 16 43583 -0.218180 0.169220 0.4027210 0.0030100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 17 43584 -0.219280 0.172720 0.3997279 0.0029920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 18 43585 -0.220379 0.176221 0.3967217 0.0030270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 19 43586 -0.221279 0.179821 0.3936706 0.0030830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 20 43587 -0.222179 0.183421 0.3905354 0.0031800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 21 43588 -0.222978 0.187022 0.3872923 0.0033000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 22 43589 -0.223678 0.190722 0.3839231 0.0034290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 23 43590 -0.224378 0.194522 0.3804380 0.0035500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 24 43591 -0.224978 0.198222 0.3768408 0.0036350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 25 43592 -0.225477 0.202023 0.3731727 0.0036850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 26 43593 -0.225877 0.205923 0.3694896 0.0036700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 27 43594 -0.226277 0.209723 0.3658494 0.0036050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 28 43595 -0.226577 0.213623 0.3622893 0.0035110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 29 43596 -0.226776 0.217624 0.3588361 0.0034090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 30 43597 -0.226876 0.221624 0.3554600 0.0033480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 3 31 43598 -0.226976 0.225624 0.3521228 0.0033260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 1 43599 -0.226975 0.229625 0.3487807 0.0033660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 2 43600 -0.226975 0.233725 0.3453855 0.0034390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 3 43601 -0.226875 0.237825 0.3418944 0.0035440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 4 43602 -0.226675 0.242025 0.3383022 0.0036400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 5 43603 -0.226474 0.246126 0.3346281 0.0036990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 6 43604 -0.226274 0.250326 0.3309219 0.0037010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 7 43605 -0.225974 0.254526 0.3272448 0.0036530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 8 43606 -0.225574 0.258826 0.3236417 0.0035470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 9 43607 -0.225173 0.263127 0.3201575 0.0034180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 10 43608 -0.224773 0.267327 0.3168054 0.0032890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 11 43609 -0.224273 0.271627 0.3135832 0.0031780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 12 43610 -0.223772 0.276028 0.3104491 0.0030860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 13 43611 -0.223172 0.280328 0.3073879 0.0030420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 14 43612 -0.222572 0.284628 0.3043518 0.0030380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 15 43613 -0.221972 0.288928 0.3013086 0.0030660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 16 43614 -0.221271 0.293229 0.2982085 0.0031390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 17 43615 -0.220571 0.297529 0.2950213 0.0032300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 18 43616 -0.219771 0.301829 0.2917442 0.0033360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 19 43617 -0.219071 0.306129 0.2883590 0.0034330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 20 43618 -0.218270 0.310330 0.2848809 0.0035170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 21 43619 -0.217370 0.314530 0.2813337 0.0035680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 22 43620 -0.216570 0.318630 0.2777516 0.0035690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 23 43621 -0.215669 0.322731 0.2742145 0.0035040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 24 43622 -0.214669 0.326831 0.2707583 0.0034030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 25 43623 -0.213769 0.330831 0.2674132 0.0032760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 26 43624 -0.212769 0.334731 0.2641900 0.0031760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 27 43625 -0.211768 0.338632 0.2610569 0.0031100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 28 43626 -0.210668 0.342432 0.2579517 0.0031080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 29 43627 -0.209668 0.346132 0.2548256 0.0031400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 4 30 43628 -0.208568 0.349732 0.2516524 0.0032050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 1 43629 -0.207467 0.353333 0.2484253 0.0032680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 2 43630 -0.206267 0.356733 0.2451361 0.0033140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 3 43631 -0.205067 0.360133 0.2418130 0.0033260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 4 43632 -0.203866 0.363434 0.2384998 0.0032980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 5 43633 -0.202666 0.366534 0.2352397 0.0032140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 6 43634 -0.201466 0.369634 0.2320805 0.0031090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 7 43635 -0.200166 0.372634 0.2290244 0.0029950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 8 43636 -0.198865 0.375535 0.2260883 0.0028910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 9 43637 -0.197465 0.378335 0.2232431 0.0028120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 10 43638 -0.196065 0.381135 0.2204610 0.0027570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 11 43639 -0.194665 0.383735 0.2177058 0.0027490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 12 43640 -0.193264 0.386336 0.2149387 0.0027810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 13 43641 -0.191764 0.388836 0.2121325 0.0028380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 14 43642 -0.190164 0.391236 0.2092534 0.0029250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 15 43643 -0.188563 0.393637 0.2062742 0.0030310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 16 43644 -0.186963 0.395937 0.2031771 0.0031440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 17 43645 -0.185263 0.398137 0.1999789 0.0032510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 18 43646 -0.183563 0.400337 0.1966798 0.0033290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 19 43647 -0.181662 0.402438 0.1933326 0.0033710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 20 43648 -0.179862 0.404538 0.1899555 0.0033640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 21 43649 -0.177862 0.406538 0.1866223 0.0033070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 22 43650 -0.175862 0.408538 0.1833622 0.0032060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 23 43651 -0.173761 0.410439 0.1802001 0.0031140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 24 43652 -0.171661 0.412439 0.1771229 0.0030440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 25 43653 -0.169461 0.414239 0.1740938 0.0030270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 26 43654 -0.167160 0.416140 0.1710426 0.0030710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 27 43655 -0.164760 0.417940 0.1679425 0.0031320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 28 43656 -0.162260 0.419740 0.1647893 0.0031800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 29 43657 -0.159660 0.421540 0.1616022 0.0031900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 30 43658 -0.157059 0.423241 0.1584150 0.0031660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 5 31 43659 -0.154359 0.424941 0.1552859 0.0030860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 1 43660 -0.151559 0.426641 0.1522577 0.0029650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 2 43661 -0.148658 0.428342 0.1493756 0.0028050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 3 43662 -0.145758 0.430042 0.1466504 0.0026440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 4 43663 -0.142658 0.431642 0.1440873 0.0024770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 5 43664 -0.139558 0.433242 0.1416781 0.0023420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 6 43665 -0.136457 0.434843 0.1393900 0.0022390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 7 43666 -0.133157 0.436443 0.1371988 0.0021710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 8 43667 -0.129857 0.438043 0.1350457 0.0021310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 9 43668 -0.126557 0.439643 0.1329166 0.0021350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 10 43669 -0.123156 0.441244 0.1307554 0.0021690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 11 43670 -0.119756 0.442744 0.1285593 0.0022240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 12 43671 -0.116256 0.444344 0.1263051 0.0022880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 13 43672 -0.112755 0.445845 0.1239760 0.0023590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 14 43673 -0.109255 0.447445 0.1215908 0.0024060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 15 43674 -0.105755 0.448945 0.1191717 0.0024380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 16 43675 -0.102155 0.450445 0.1167275 0.0024340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 17 43676 -0.098654 0.451946 0.1143154 0.0023990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 18 43677 -0.095054 0.453446 0.1119502 0.0023170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 19 43678 -0.091554 0.454946 0.1096791 0.0022280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 20 43679 -0.087954 0.456446 0.1074899 0.0021550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 21 43680 -0.084453 0.457947 0.1053518 0.0021370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 22 43681 -0.080853 0.459447 0.1032056 0.0021650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 23 43682 -0.077353 0.460847 0.1009985 0.0022440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 24 43683 -0.073852 0.462248 0.0987053 0.0023300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 25 43684 -0.070352 0.463748 0.0963492 0.0023960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 26 43685 -0.066852 0.465148 0.0939421 0.0024100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 27 43686 -0.063452 0.466448 0.0915379 0.0023670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 28 43687 -0.059951 0.467849 0.0892108 0.0022880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 29 43688 -0.056551 0.469149 0.0869796 0.0021700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 6 30 43689 -0.053151 0.470449 0.0848755 0.0020400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 1 43690 -0.049651 0.471749 0.0828973 0.0019160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 2 43691 -0.046250 0.472950 0.0810352 0.0018120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 3 43692 -0.042750 0.474150 0.0792540 0.0017370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 4 43693 -0.039350 0.475350 0.0775379 0.0016990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 5 43694 -0.035849 0.476451 0.0758527 0.0016790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 6 43695 -0.032349 0.477551 0.0741696 0.0016930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 7 43696 -0.028849 0.478551 0.0724564 0.0017370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 8 43697 -0.025349 0.479551 0.0706783 0.0018030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 9 43698 -0.021748 0.480552 0.0688361 0.0018790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 10 43699 -0.018148 0.481452 0.0669190 0.0019550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 11 43700 -0.014448 0.482252 0.0649418 0.0020070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 12 43701 -0.010748 0.483152 0.0629137 0.0020460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 13 43702 -0.007047 0.483853 0.0608616 0.0020450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 14 43703 -0.003247 0.484553 0.0588254 0.0020210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 15 43704 0.000553 0.485253 0.0568393 0.0019560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 16 43705 0.004454 0.485754 0.0549291 0.0018730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 17 43706 0.008354 0.486354 0.0530820 0.0018040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 18 43707 0.012354 0.486754 0.0513008 0.0017670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 19 43708 0.016354 0.487154 0.0495287 0.0017950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 20 43709 0.020355 0.487455 0.0477015 0.0018750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 21 43710 0.024455 0.487755 0.0457694 0.0019830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 22 43711 0.028555 0.487855 0.0437332 0.0020860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 23 43712 0.032655 0.487955 0.0416131 0.0021380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 24 43713 0.036756 0.487956 0.0394699 0.0021300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 25 43714 0.040956 0.487856 0.0373758 0.0020560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 26 43715 0.045156 0.487756 0.0353826 0.0019290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 27 43716 0.049357 0.487457 0.0335155 0.0018040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 28 43717 0.053557 0.487157 0.0317713 0.0016840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 29 43718 0.057757 0.486757 0.0301502 0.0015830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 30 43719 0.061857 0.486257 0.0286041 0.0015130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 7 31 43720 0.066058 0.485658 0.0271009 0.0014910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 1 43721 0.070158 0.485058 0.0256088 0.0015080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 2 43722 0.074258 0.484258 0.0240816 0.0015630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 3 43723 0.078258 0.483458 0.0224835 0.0016490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 4 43724 0.082259 0.482559 0.0207753 0.0017590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 5 43725 0.086259 0.481559 0.0189502 0.0018920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 6 43726 0.090059 0.480459 0.0170000 0.0020160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 7 43727 0.093960 0.479260 0.0149229 0.0021280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 8 43728 0.097660 0.478060 0.0127447 0.0022250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 9 43729 0.101360 0.476760 0.0104936 0.0022800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 10 43730 0.104960 0.475360 0.0081834 0.0023120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 11 43731 0.108561 0.473861 0.0058783 0.0023060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 12 43732 0.111961 0.472361 0.0035871 0.0022740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 13 43733 0.115361 0.470761 0.0013290 0.0022430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 14 43734 0.118661 0.469061 -0.0009172 0.0022480 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 15 43735 0.121962 0.467362 -0.0031723 0.0022790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 16 43736 0.125162 0.465562 -0.0055064 0.0023760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 17 43737 0.128262 0.463762 -0.0079396 0.0025080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 18 43738 0.131263 0.461863 -0.0105157 0.0026510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 19 43739 0.134263 0.459963 -0.0132319 0.0027630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 20 43740 0.137163 0.457963 -0.0160190 0.0028060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 21 43741 0.139963 0.455963 -0.0188192 0.0027710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 22 43742 0.142764 0.453864 -0.0215373 0.0026680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 23 43743 0.145464 0.451864 -0.0241325 0.0025290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 24 43744 0.148164 0.449664 -0.0266026 0.0023920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 25 43745 0.150765 0.447565 -0.0289228 0.0022710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 26 43746 0.153365 0.445365 -0.0311449 0.0021710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 27 43747 0.155965 0.443065 -0.0332871 0.0021190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 28 43748 0.158465 0.440865 -0.0353982 0.0021090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 29 43749 0.160866 0.438566 -0.0375204 0.0021410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 30 43750 0.163366 0.436266 -0.0396925 0.0021990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 8 31 43751 0.165766 0.433966 -0.0419286 0.0022840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 1 43752 0.168066 0.431666 -0.0442568 0.0023860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 2 43753 0.170467 0.429267 -0.0466919 0.0024820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 3 43754 0.172767 0.426967 -0.0492171 0.0025690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 4 43755 0.174967 0.424567 -0.0518222 0.0026250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 5 43756 0.177268 0.422168 -0.0544564 0.0026460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 6 43757 0.179468 0.419768 -0.0571035 0.0026280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 7 43758 0.181668 0.417268 -0.0597107 0.0025740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 8 43759 0.183868 0.414868 -0.0622538 0.0024900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 9 43760 0.185969 0.412369 -0.0647010 0.0024060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 10 43761 0.188069 0.409969 -0.0670751 0.0023440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 11 43762 0.190169 0.407469 -0.0694053 0.0023340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 12 43763 0.192269 0.404969 -0.0717524 0.0023680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 13 43764 0.194270 0.402370 -0.0741676 0.0024620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 14 43765 0.196170 0.399870 -0.0766857 0.0025870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 15 43766 0.198170 0.397270 -0.0793409 0.0027370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 16 43767 0.200071 0.394671 -0.0821360 0.0028310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 17 43768 0.201871 0.392071 -0.0849891 0.0028620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 18 43769 0.203771 0.389471 -0.0878433 0.0028430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 19 43770 0.205471 0.386771 -0.0906464 0.0027650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 20 43771 0.207272 0.384072 -0.0933536 0.0026580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 21 43772 0.208972 0.381372 -0.0959517 0.0025540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 22 43773 0.210572 0.378572 -0.0984589 0.0024740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 23 43774 0.212172 0.375772 -0.1009140 0.0024420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 24 43775 0.213773 0.372973 -0.1033552 0.0024510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 25 43776 0.215273 0.370073 -0.1058203 0.0024950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 26 43777 0.216773 0.367073 -0.1083495 0.0025690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 27 43778 0.218174 0.364074 -0.1109706 0.0026860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 28 43779 0.219474 0.361074 -0.1137198 0.0028150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 29 43780 0.220874 0.357974 -0.1166129 0.0029640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 9 30 43781 0.222074 0.354874 -0.1196471 0.0030890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 1 43782 0.223275 0.351675 -0.1227972 0.0031980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 2 43783 0.224475 0.348475 -0.1260323 0.0032780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 3 43784 0.225575 0.345175 -0.1293295 0.0032960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 4 43785 0.226575 0.341875 -0.1326106 0.0032600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 5 43786 0.227576 0.338476 -0.1358468 0.0032010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 6 43787 0.228476 0.334976 -0.1390089 0.0031200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 7 43788 0.229376 0.331476 -0.1420931 0.0030460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 8 43789 0.230177 0.327977 -0.1451242 0.0030100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 9 43790 0.230877 0.324377 -0.1481434 0.0030270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 10 43791 0.231577 0.320777 -0.1511945 0.0030940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 11 43792 0.232177 0.317077 -0.1543447 0.0031990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 12 43793 0.232678 0.313378 -0.1575968 0.0033040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 13 43794 0.233178 0.309578 -0.1609440 0.0033970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 14 43795 0.233578 0.305778 -0.1643631 0.0034270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 15 43796 0.233878 0.301978 -0.1677763 0.0033960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 16 43797 0.234179 0.298079 -0.1711224 0.0032980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 17 43798 0.234379 0.294279 -0.1743475 0.0031440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 18 43799 0.234579 0.290379 -0.1774157 0.0029830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 19 43800 0.234680 0.286480 -0.1803268 0.0028440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 20 43801 0.234680 0.282680 -0.1831050 0.0027260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 21 43802 0.234680 0.278780 -0.1858041 0.0026580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 22 43803 0.234580 0.274980 -0.1884463 0.0026320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 23 43804 0.234481 0.271081 -0.1910824 0.0026490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 24 43805 0.234181 0.267281 -0.1937556 0.0027020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 25 43806 0.233981 0.263481 -0.1964947 0.0027830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 26 43807 0.233681 0.259781 -0.1993259 0.0028790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 27 43808 0.233282 0.255982 -0.2022550 0.0029780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 28 43809 0.232882 0.252382 -0.2052682 0.0030670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 29 43810 0.232382 0.248682 -0.2083723 0.0031350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 30 43811 0.231883 0.245083 -0.2115385 0.0031690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 10 31 43812 0.231383 0.241583 -0.2147056 0.0031700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 1 43813 0.230783 0.238083 -0.2178537 0.0031190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 2 43814 0.230183 0.234683 -0.2209349 0.0030500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 3 43815 0.229584 0.231284 -0.2239440 0.0029710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 4 43816 0.228884 0.227984 -0.2268882 0.0029330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 5 43817 0.228184 0.224684 -0.2298163 0.0029340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 6 43818 0.227384 0.221484 -0.2327755 0.0029890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 7 43819 0.226685 0.218385 -0.2358166 0.0030910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 8 43820 0.225885 0.215285 -0.2389628 0.0032080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 9 43821 0.225085 0.212185 -0.2422199 0.0033020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 10 43822 0.224186 0.209186 -0.2455541 0.0033670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 11 43823 0.223386 0.206186 -0.2489352 0.0033770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 12 43824 0.222486 0.203286 -0.2522994 0.0033290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 13 43825 0.221586 0.200386 -0.2555765 0.0032310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 14 43826 0.220587 0.197487 -0.2587516 0.0031170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 15 43827 0.219687 0.194587 -0.2617988 0.0029920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 16 43828 0.218687 0.191787 -0.2647419 0.0028880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 17 43829 0.217588 0.188988 -0.2675971 0.0028280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 18 43830 0.216588 0.186188 -0.2704032 0.0027990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 19 43831 0.215488 0.183388 -0.2732074 0.0028090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 20 43832 0.214288 0.180588 -0.2760415 0.0028660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 21 43833 0.213089 0.177789 -0.2789407 0.0029430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 22 43834 0.211889 0.174989 -0.2819258 0.0030310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 23 43835 0.210589 0.172289 -0.2850030 0.0031260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 24 43836 0.209289 0.169489 -0.2881761 0.0032070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 25 43837 0.207990 0.166690 -0.2914233 0.0032740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 26 43838 0.206590 0.163990 -0.2947264 0.0033270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 27 43839 0.205090 0.161190 -0.2980565 0.0033260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 28 43840 0.203591 0.158491 -0.3013647 0.0032950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 29 43841 0.202091 0.155791 -0.3046348 0.0032300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 11 30 43842 0.200491 0.153091 -0.3078100 0.0031390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 1 43843 0.198891 0.150391 -0.3109181 0.0030710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 2 43844 0.197292 0.147792 -0.3139673 0.0030360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 3 43845 0.195592 0.145192 -0.3170074 0.0030650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 4 43846 0.193892 0.142592 -0.3201016 0.0031290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 5 43847 0.192192 0.139992 -0.3232717 0.0032110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 6 43848 0.190393 0.137493 -0.3265209 0.0032890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 7 43849 0.188593 0.134993 -0.3298280 0.0033170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 8 43850 0.186793 0.132493 -0.3331352 0.0032920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 9 43851 0.184894 0.130094 -0.3364043 0.0032250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 10 43852 0.182994 0.127694 -0.3395724 0.0031150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 11 43853 0.181194 0.125394 -0.3426146 0.0029690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 12 43854 0.179294 0.123094 -0.3455077 0.0028280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 13 43855 0.177295 0.120895 -0.3482659 0.0026920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 14 43856 0.175395 0.118695 -0.3509030 0.0025960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 15 43857 0.173395 0.116495 -0.3534612 0.0025280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 16 43858 0.171495 0.114395 -0.3559803 0.0025070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 17 43859 0.169496 0.112296 -0.3584985 0.0025220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 18 43860 0.167496 0.110296 -0.3610356 0.0025670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 19 43861 0.165496 0.108296 -0.3636308 0.0026340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 20 43862 0.163597 0.106297 -0.3663079 0.0027120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 21 43863 0.161597 0.104397 -0.3690641 0.0027980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 22 43864 0.159497 0.102497 -0.3718902 0.0028740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 23 43865 0.157497 0.100597 -0.3748043 0.0029400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 24 43866 0.155498 0.098798 -0.3777635 0.0029710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 25 43867 0.153498 0.096998 -0.3807476 0.0029930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 26 43868 0.151398 0.095198 -0.3837288 0.0029730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 27 43869 0.149398 0.093398 -0.3866879 0.0029420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 28 43870 0.147299 0.091699 -0.3896031 0.0029110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 29 43871 0.145199 0.089999 -0.3925102 0.0029090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 30 43872 0.143099 0.088299 -0.3954394 0.0029590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1978 12 31 43873 0.140900 0.086600 -0.3984455 0.0030620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 1 43874 0.138800 0.085000 0.5984263 0.0031970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 2 43875 0.136500 0.083400 0.5951622 0.0033250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 3 43876 0.134300 0.081800 0.5918001 0.0034000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 4 43877 0.132001 0.080201 0.5883829 0.0034110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 5 43878 0.129601 0.078701 0.5849888 0.0033570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 6 43879 0.127201 0.077101 0.5816736 0.0032560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 7 43880 0.124701 0.075601 0.5784855 0.0031180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 8 43881 0.122102 0.074202 0.5754283 0.0029770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 9 43882 0.119502 0.072702 0.5725162 0.0028510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 10 43883 0.116902 0.071302 0.5697150 0.0027440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 11 43884 0.114103 0.070003 0.5670139 0.0026650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 12 43885 0.111303 0.068603 0.5643717 0.0026360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 13 43886 0.108503 0.067303 0.5617396 0.0026330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 14 43887 0.105603 0.066103 0.5590965 0.0026590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 15 43888 0.102604 0.064904 0.5564233 0.0027080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 16 43889 0.099504 0.063704 0.5536742 0.0027800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 17 43890 0.096504 0.062604 0.5508620 0.0028430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 18 43891 0.093304 0.061604 0.5479819 0.0029160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 19 43892 0.090105 0.060605 0.5450467 0.0029590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 20 43893 0.086905 0.059605 0.5420616 0.0029990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 21 43894 0.083705 0.058705 0.5390594 0.0030120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 22 43895 0.080406 0.057906 0.5360443 0.0030110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 23 43896 0.077106 0.057106 0.5330532 0.0029820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 24 43897 0.073806 0.056406 0.5300820 0.0029490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 25 43898 0.070506 0.055806 0.5271489 0.0029340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 26 43899 0.067207 0.055207 0.5242107 0.0029730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 27 43900 0.063807 0.054707 0.5211946 0.0030590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 28 43901 0.060607 0.054307 0.5180644 0.0031940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 29 43902 0.057307 0.053907 0.5148003 0.0033450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 30 43903 0.054008 0.053608 0.5113961 0.0034560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 1 31 43904 0.050808 0.053408 0.5079010 0.0035090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 1 43905 0.047608 0.053308 0.5044128 0.0034600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 2 43906 0.044509 0.053209 0.5010037 0.0033410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 3 43907 0.041409 0.053209 0.4977356 0.0031790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 4 43908 0.038309 0.053309 0.4946474 0.0030060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 5 43909 0.035309 0.053409 0.4917293 0.0028370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 6 43910 0.032410 0.053710 0.4889641 0.0027000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 7 43911 0.029510 0.054010 0.4863160 0.0026010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 8 43912 0.026610 0.054310 0.4837458 0.0025460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 9 43913 0.023811 0.054811 0.4812007 0.0025310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 10 43914 0.021111 0.055311 0.4786625 0.0025600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 11 43915 0.018411 0.055811 0.4760814 0.0026050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 12 43916 0.015711 0.056511 0.4734463 0.0026630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 13 43917 0.013112 0.057212 0.4707521 0.0027260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 14 43918 0.010512 0.058012 0.4679880 0.0027910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 15 43919 0.007912 0.058812 0.4651758 0.0028370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 16 43920 0.005312 0.059712 0.4623327 0.0028550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 17 43921 0.002813 0.060713 0.4594745 0.0028440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 18 43922 0.000313 0.061813 0.4566424 0.0028070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 19 43923 -0.002187 0.062913 0.4538572 0.0027620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 20 43924 -0.004686 0.064114 0.4511191 0.0027140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 21 43925 -0.007186 0.065314 0.4484250 0.0026800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 22 43926 -0.009586 0.066614 0.4457468 0.0026920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 23 43927 -0.012086 0.067914 0.4430207 0.0027580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 24 43928 -0.014585 0.069415 0.4402005 0.0028930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 25 43929 -0.017085 0.070815 0.4372324 0.0030570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 26 43930 -0.019585 0.072315 0.4340862 0.0032210 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 27 43931 -0.022085 0.073915 0.4307961 0.0033460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 2 28 43932 -0.024584 0.075516 0.4274319 0.0033780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 1 43933 -0.027084 0.077116 0.4240708 0.0033190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 2 43934 -0.029684 0.078716 0.4208067 0.0031900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 3 43935 -0.032183 0.080417 0.4176905 0.0030380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 4 43936 -0.034683 0.082117 0.4147414 0.0028770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 5 43937 -0.037283 0.083817 0.4119392 0.0027420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 6 43938 -0.039783 0.085517 0.4092521 0.0026490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 7 43939 -0.042382 0.087218 0.4066359 0.0026000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 8 43940 -0.044882 0.088918 0.4040348 0.0025970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 9 43941 -0.047482 0.090718 0.4014276 0.0026330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 10 43942 -0.049982 0.092418 0.3987685 0.0027000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 11 43943 -0.052581 0.094119 0.3960324 0.0027860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 12 43944 -0.055181 0.095819 0.3932032 0.0028800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 13 43945 -0.057681 0.097419 0.3902821 0.0029700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 14 43946 -0.060280 0.099120 0.3872689 0.0030440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 15 43947 -0.062780 0.100820 0.3841948 0.0031020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 16 43948 -0.065280 0.102420 0.3810876 0.0031160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 17 43949 -0.067780 0.104120 0.3779725 0.0030960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 18 43950 -0.070279 0.105721 0.3748934 0.0030520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 19 43951 -0.072779 0.107321 0.3718622 0.0029990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 20 43952 -0.075179 0.109021 0.3688811 0.0029570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 21 43953 -0.077679 0.110621 0.3659369 0.0029470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 22 43954 -0.080078 0.112222 0.3629808 0.0029760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 23 43955 -0.082478 0.113822 0.3599646 0.0030620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 24 43956 -0.084778 0.115522 0.3568385 0.0031980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 25 43957 -0.087077 0.117123 0.3535613 0.0033590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 26 43958 -0.089377 0.118823 0.3501152 0.0035030 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 27 43959 -0.091677 0.120523 0.3465651 0.0035870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 28 43960 -0.093877 0.122223 0.3429729 0.0035830 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 29 43961 -0.096176 0.123924 0.3394278 0.0034920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 30 43962 -0.098276 0.125724 0.3359986 0.0033400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 3 31 43963 -0.100476 0.127524 0.3327445 0.0031750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 1 43964 -0.102576 0.129324 0.3296543 0.0030130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 2 43965 -0.104775 0.131225 0.3267072 0.0028960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 3 43966 -0.106775 0.133125 0.3238571 0.0028140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 4 43967 -0.108875 0.135125 0.3210639 0.0027790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 5 43968 -0.110874 0.137126 0.3182738 0.0027970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 6 43969 -0.112974 0.139226 0.3154566 0.0028420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 7 43970 -0.114874 0.141326 0.3125715 0.0029220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 8 43971 -0.116874 0.143426 0.3096073 0.0030150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 9 43972 -0.118773 0.145627 0.3065412 0.0031080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 10 43973 -0.120673 0.147927 0.3033951 0.0031910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 11 43974 -0.122473 0.150127 0.3001669 0.0032610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 12 43975 -0.124273 0.152527 0.2968818 0.0032910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 13 43976 -0.125972 0.154828 0.2935866 0.0032940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 14 43977 -0.127672 0.157228 0.2903145 0.0032540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 15 43978 -0.129372 0.159728 0.2870843 0.0031930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 16 43979 -0.130971 0.162229 0.2839172 0.0031350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 17 43980 -0.132471 0.164729 0.2807971 0.0030920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 18 43981 -0.133971 0.167229 0.2777079 0.0030940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 19 43982 -0.135371 0.169829 0.2745898 0.0031410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 20 43983 -0.136670 0.172330 0.2713986 0.0032470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 21 43984 -0.137970 0.174930 0.2680945 0.0033660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 22 43985 -0.139170 0.177530 0.2646663 0.0034880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 23 43986 -0.140370 0.180130 0.2611182 0.0035870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 24 43987 -0.141469 0.182631 0.2575231 0.0036110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 25 43988 -0.142469 0.185231 0.2539339 0.0035530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 26 43989 -0.143469 0.187731 0.2504418 0.0034130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 27 43990 -0.144368 0.190232 0.2471146 0.0032380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 28 43991 -0.145168 0.192732 0.2439785 0.0030560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 29 43992 -0.145968 0.195132 0.2410043 0.0028860 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 4 30 43993 -0.146768 0.197632 0.2381802 0.0027670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 1 43994 -0.147367 0.200033 0.2354451 0.0027040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 2 43995 -0.148067 0.202333 0.2327589 0.0026850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 3 43996 -0.148667 0.204733 0.2300708 0.0026950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 4 43997 -0.149166 0.207034 0.2273566 0.0027450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 5 43998 -0.149666 0.209334 0.2245825 0.0028140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 6 43999 -0.150066 0.211534 0.2217363 0.0028780 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 7 44000 -0.150466 0.213834 0.2188202 0.0029450 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 8 44001 -0.150865 0.216035 0.2158541 0.0030050 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 9 44002 -0.151165 0.218235 0.2128279 0.0030290 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 10 44003 -0.151465 0.220435 0.2097948 0.0030320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 11 44004 -0.151665 0.222635 0.2067846 0.0030000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 12 44005 -0.151964 0.224836 0.2038135 0.0029390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 13 44006 -0.152064 0.227036 0.2009103 0.0028570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 14 44007 -0.152264 0.229136 0.1980842 0.0028000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 15 44008 -0.152363 0.231337 0.1952971 0.0027720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 16 44009 -0.152563 0.233537 0.1925219 0.0027970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 17 44010 -0.152563 0.235737 0.1896938 0.0028630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 18 44011 -0.152663 0.237937 0.1867946 0.0029510 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 19 44012 -0.152662 0.240038 0.1837805 0.0030560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 20 44013 -0.152762 0.242338 0.1806884 0.0031280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 21 44014 -0.152762 0.244538 0.1775412 0.0031500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 22 44015 -0.152662 0.246738 0.1744101 0.0031080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 23 44016 -0.152661 0.248939 0.1713559 0.0029900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 24 44017 -0.152561 0.251239 0.1684358 0.0028320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 25 44018 -0.152561 0.253439 0.1656986 0.0026420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 26 44019 -0.152460 0.255740 0.1631375 0.0024720 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 27 44020 -0.152360 0.258040 0.1607544 0.0023230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 28 44021 -0.152160 0.260240 0.1584872 0.0022180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 29 44022 -0.152060 0.262540 0.1562941 0.0021560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 30 44023 -0.151859 0.264841 0.1541529 0.0021430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 5 31 44024 -0.151659 0.267241 0.1520078 0.0021530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 1 44025 -0.151459 0.269541 0.1498397 0.0021940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 2 44026 -0.151259 0.271841 0.1476235 0.0022360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 3 44027 -0.151058 0.274142 0.1453594 0.0022840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 4 44028 -0.150758 0.276542 0.1430512 0.0023280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 5 44029 -0.150458 0.278842 0.1407201 0.0023410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 6 44030 -0.150157 0.281243 0.1383860 0.0023390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 7 44031 -0.149857 0.283543 0.1360518 0.0023170 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 8 44032 -0.149457 0.285943 0.1337537 0.0022760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 9 44033 -0.149157 0.288243 0.1315165 0.0022160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 10 44034 -0.148656 0.290644 0.1293314 0.0021570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 11 44035 -0.148256 0.292944 0.1271922 0.0021260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 12 44036 -0.147756 0.295244 0.1250511 0.0021570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 13 44037 -0.147256 0.297644 0.1228610 0.0022430 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 14 44038 -0.146655 0.299945 0.1205618 0.0023680 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 15 44039 -0.146055 0.302245 0.1181307 0.0025010 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 16 44040 -0.145355 0.304545 0.1155685 0.0026090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 17 44041 -0.144654 0.306846 0.1129294 0.0026670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 18 44042 -0.143854 0.309146 0.1102653 0.0026520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 19 44043 -0.143054 0.311446 0.1076441 0.0025890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 20 44044 -0.142254 0.313746 0.1051020 0.0024790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 21 44045 -0.141353 0.316047 0.1026928 0.0023370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 22 44046 -0.140353 0.318347 0.1004267 0.0022080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 23 44047 -0.139353 0.320547 0.0982776 0.0020930 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 24 44048 -0.138253 0.322847 0.0962264 0.0020190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 25 44049 -0.137152 0.325048 0.0942163 0.0019970 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 26 44050 -0.136052 0.327348 0.0922181 0.0020060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 27 44051 -0.134752 0.329548 0.0901940 0.0020360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 28 44052 -0.133451 0.331749 0.0881379 0.0020900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 29 44053 -0.132151 0.333949 0.0860197 0.0021460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 6 30 44054 -0.130751 0.336149 0.0838356 0.0022040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 1 44055 -0.129251 0.338349 0.0816164 0.0022400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 2 44056 -0.127750 0.340450 0.0793623 0.0022660 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 3 44057 -0.126150 0.342650 0.0771012 0.0022590 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 4 44058 -0.124550 0.344750 0.0748520 0.0022370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 5 44059 -0.122850 0.346850 0.0726349 0.0021820 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 6 44060 -0.121149 0.349051 0.0704827 0.0021180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 7 44061 -0.119349 0.351051 0.0684006 0.0020380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 8 44062 -0.117449 0.353151 0.0664025 0.0019740 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 9 44063 -0.115548 0.355252 0.0644293 0.0019620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 10 44064 -0.113648 0.357252 0.0624592 0.0019980 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 11 44065 -0.111648 0.359252 0.0604150 0.0020960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 12 44066 -0.109648 0.361252 0.0582589 0.0022070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 13 44067 -0.107547 0.363253 0.0560078 0.0023090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 14 44068 -0.105447 0.365153 0.0536706 0.0023440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 15 44069 -0.103247 0.367153 0.0513345 0.0023140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 16 44070 -0.101047 0.369053 0.0490643 0.0022150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 17 44071 -0.098746 0.370854 0.0469312 0.0020650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 18 44072 -0.096446 0.372754 0.0449531 0.0018920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 19 44073 -0.094146 0.374554 0.0431459 0.0017220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 20 44074 -0.091745 0.376255 0.0415008 0.0015870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 21 44075 -0.089245 0.378055 0.0399696 0.0014800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 22 44076 -0.086745 0.379655 0.0385145 0.0014380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 23 44077 -0.084245 0.381355 0.0370804 0.0014280 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 24 44078 -0.081644 0.382956 0.0356382 0.0014610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 25 44079 -0.079044 0.384556 0.0341491 0.0015190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 26 44080 -0.076344 0.386056 0.0325949 0.0016000 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 27 44081 -0.073644 0.387556 0.0309578 0.0016750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 28 44082 -0.070943 0.388957 0.0292367 0.0017520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 29 44083 -0.068143 0.390257 0.0274485 0.0018100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 30 44084 -0.065343 0.391657 0.0256134 0.0018550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 7 31 44085 -0.062442 0.392858 0.0237382 0.0018840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 1 44086 -0.059542 0.394058 0.0218541 0.0018920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 2 44087 -0.056642 0.395258 0.0199700 0.0018840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 3 44088 -0.053742 0.396358 0.0180868 0.0018710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 4 44089 -0.050741 0.397459 0.0162237 0.0018670 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 5 44090 -0.047741 0.398459 0.0143425 0.0018940 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 6 44091 -0.044741 0.399359 0.0124074 0.0019850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 7 44092 -0.041740 0.400260 0.0103613 0.0021260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 8 44093 -0.038740 0.401060 0.0081381 0.0023110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 9 44094 -0.035740 0.401860 0.0057360 0.0024900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 10 44095 -0.032740 0.402660 0.0031729 0.0026340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 11 44096 -0.029739 0.403361 0.0005067 0.0026850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 12 44097 -0.026739 0.403961 -0.0021664 0.0026460 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 13 44098 -0.023739 0.404561 -0.0047596 0.0025330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 14 44099 -0.020839 0.405161 -0.0072187 0.0023710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 15 44100 -0.017838 0.405662 -0.0095028 0.0021880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 16 44101 -0.014838 0.406062 -0.0116140 0.0020390 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 17 44102 -0.011938 0.406562 -0.0135841 0.0019220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 18 44103 -0.009037 0.406963 -0.0154743 0.0018530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 19 44104 -0.006137 0.407263 -0.0173164 0.0018300 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 20 44105 -0.003337 0.407663 -0.0191465 0.0018350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 21 44106 -0.000437 0.407963 -0.0209957 0.0018770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 22 44107 0.002364 0.408164 -0.0228968 0.0019260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 23 44108 0.005164 0.408464 -0.0248489 0.0019790 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 24 44109 0.007864 0.408664 -0.0268531 0.0020260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 25 44110 0.010664 0.408964 -0.0288972 0.0020470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 26 44111 0.013365 0.409165 -0.0309514 0.0020640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 27 44112 0.015965 0.409365 -0.0330065 0.0020440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 28 44113 0.018665 0.409465 -0.0350286 0.0020080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 29 44114 0.021266 0.409666 -0.0370168 0.0019550 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 30 44115 0.023866 0.409866 -0.0389479 0.0019060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 8 31 44116 0.026366 0.409966 -0.0408430 0.0018770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 1 44117 0.028866 0.410066 -0.0427092 0.0018730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 2 44118 0.031367 0.410267 -0.0446043 0.0019140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 3 44119 0.033867 0.410367 -0.0465685 0.0020340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 4 44120 0.036267 0.410467 -0.0486826 0.0022020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 5 44121 0.038667 0.410467 -0.0509827 0.0024110 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 6 44122 0.040968 0.410568 -0.0534889 0.0026040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 7 44123 0.043268 0.410568 -0.0561580 0.0027220 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 8 44124 0.045568 0.410568 -0.0589101 0.0027520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 9 44125 0.047769 0.410569 -0.0616393 0.0026840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 10 44126 0.049969 0.410469 -0.0642544 0.0025470 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 11 44127 0.052069 0.410469 -0.0667156 0.0023750 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 12 44128 0.054169 0.410369 -0.0689987 0.0022070 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 13 44129 0.056270 0.410170 -0.0711428 0.0020900 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 14 44130 0.058270 0.409970 -0.0731970 0.0020150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 15 44131 0.060170 0.409770 -0.0751901 0.0019910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 16 44132 0.062070 0.409570 -0.0771932 0.0020120 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 17 44133 0.063971 0.409271 -0.0792264 0.0020560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 18 44134 0.065771 0.408971 -0.0813125 0.0021320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 19 44135 0.067371 0.408571 -0.0834837 0.0022060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 20 44136 0.069072 0.408172 -0.0857348 0.0022950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 21 44137 0.070772 0.407772 -0.0880699 0.0023710 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 22 44138 0.072372 0.407272 -0.0904591 0.0024240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 23 44139 0.073972 0.406772 -0.0928972 0.0024490 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 24 44140 0.075573 0.406173 -0.0953563 0.0024540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 25 44141 0.077173 0.405673 -0.0977975 0.0024350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 26 44142 0.078773 0.405073 -0.1002226 0.0024140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 27 44143 0.080273 0.404373 -0.1026177 0.0023890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 28 44144 0.081774 0.403774 -0.1049979 0.0023870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 29 44145 0.083274 0.403074 -0.1074050 0.0024260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 9 30 44146 0.084674 0.402374 -0.1098792 0.0025190 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 1 44147 0.085975 0.401675 -0.1124633 0.0026700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 2 44148 0.087275 0.400975 -0.1152234 0.0028570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 3 44149 0.088475 0.400175 -0.1181816 0.0030580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 4 44150 0.089675 0.399375 -0.1213397 0.0032260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 5 44151 0.090776 0.398576 -0.1246198 0.0033180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 6 44152 0.091776 0.397776 -0.1279320 0.0033080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 7 44153 0.092876 0.396976 -0.1311931 0.0031950 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 8 44154 0.093676 0.396176 -0.1343112 0.0030350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 9 44155 0.094477 0.395277 -0.1372514 0.0028530 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 10 44156 0.095277 0.394377 -0.1400185 0.0026990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 11 44157 0.095977 0.393477 -0.1426566 0.0025850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 12 44158 0.096678 0.392478 -0.1452078 0.0025350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 13 44159 0.097478 0.391478 -0.1477339 0.0025250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 14 44160 0.098278 0.390478 -0.1502721 0.0025560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 15 44161 0.099178 0.389478 -0.1528442 0.0026040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 16 44162 0.100079 0.388479 -0.1554943 0.0026770 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 17 44163 0.101079 0.387479 -0.1581995 0.0027400 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 18 44164 0.102179 0.386479 -0.1609706 0.0027920 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 19 44165 0.103379 0.385479 -0.1637867 0.0028230 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 20 44166 0.104680 0.384480 -0.1666199 0.0028080 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 21 44167 0.105980 0.383580 -0.1694130 0.0027730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 22 44168 0.107380 0.382680 -0.1721551 0.0027090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 23 44169 0.108881 0.381681 -0.1748223 0.0026240 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 24 44170 0.110481 0.380681 -0.1774014 0.0025340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 25 44171 0.112281 0.379681 -0.1798975 0.0024620 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 26 44172 0.113981 0.378581 -0.1823267 0.0024260 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 27 44173 0.115782 0.377382 -0.1847558 0.0024420 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 28 44174 0.117682 0.376182 -0.1872299 0.0025130 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 29 44175 0.119482 0.374882 -0.1897981 0.0026410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 30 44176 0.121283 0.373583 -0.1925102 0.0027960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 10 31 44177 0.123083 0.372183 -0.1953784 0.0029330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 1 44178 0.124783 0.370683 -0.1983705 0.0030330 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 2 44179 0.126383 0.369083 -0.2014256 0.0030630 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 3 44180 0.127884 0.367484 -0.2044558 0.0029910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 4 44181 0.129284 0.365884 -0.2073829 0.0028440 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 5 44182 0.130484 0.364084 -0.2101320 0.0026580 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 6 44183 0.131684 0.362284 -0.2127112 0.0024870 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 7 44184 0.132585 0.360485 -0.2151193 0.0023520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 8 44185 0.133385 0.358585 -0.2174344 0.0022800 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 9 44186 0.134085 0.356685 -0.2196866 0.0022500 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 10 44187 0.134586 0.354686 -0.2219497 0.0022730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 11 44188 0.134986 0.352586 -0.2242328 0.0023200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 12 44189 0.135286 0.350486 -0.2265940 0.0023960 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 13 44190 0.135386 0.348386 -0.2290291 0.0024690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 14 44191 0.135387 0.346287 -0.2315232 0.0025360 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 15 44192 0.135287 0.344087 -0.2340844 0.0025850 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 16 44193 0.135187 0.341987 -0.2366845 0.0026100 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 17 44194 0.134987 0.339787 -0.2392866 0.0025990 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 18 44195 0.134788 0.337588 -0.2418818 0.0025690 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 19 44196 0.134488 0.335388 -0.2444159 0.0025140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 20 44197 0.134188 0.333188 -0.2468960 0.0024340 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 21 44198 0.133889 0.330989 -0.2492952 0.0023700 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 22 44199 0.133589 0.328689 -0.2516363 0.0023250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 23 44200 0.133389 0.326489 -0.2539624 0.0023380 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 24 44201 0.133189 0.324289 -0.2563306 0.0024060 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 25 44202 0.132990 0.322090 -0.2587997 0.0025310 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 26 44203 0.132890 0.319890 -0.2614018 0.0026730 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 27 44204 0.132790 0.317690 -0.2641470 0.0028140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 28 44205 0.132790 0.315590 -0.2670301 0.0029320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 29 44206 0.132791 0.313491 -0.2699922 0.0029910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 11 30 44207 0.132791 0.311391 -0.2729864 0.0029760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 1 44208 0.132891 0.309291 -0.2759295 0.0028890 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 2 44209 0.132992 0.307192 -0.2787596 0.0027640 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 3 44210 0.133092 0.305192 -0.2814428 0.0026140 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 4 44211 0.133192 0.303192 -0.2839849 0.0024760 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 5 44212 0.133292 0.301192 -0.2864190 0.0023910 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 6 44213 0.133493 0.299293 -0.2887822 0.0023560 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 7 44214 0.133693 0.297393 -0.2911353 0.0023570 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 8 44215 0.133893 0.295493 -0.2935174 0.0024020 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 9 44216 0.134093 0.293593 -0.2959496 0.0024610 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 10 44217 0.134294 0.291794 -0.2984327 0.0025200 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 11 44218 0.134594 0.289994 -0.3009998 0.0025880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 12 44219 0.134894 0.288194 -0.3036140 0.0026320 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 13 44220 0.135295 0.286395 -0.3062551 0.0026540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 14 44221 0.135695 0.284695 -0.3089152 0.0026520 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 15 44222 0.136095 0.282995 -0.3115504 0.0026150 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 16 44223 0.136495 0.281295 -0.3141475 0.0025650 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 17 44224 0.136996 0.279696 -0.3166746 0.0024880 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 18 44225 0.137496 0.278096 -0.3191318 0.0024180 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 19 44226 0.138096 0.276496 -0.3215149 0.0023540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 20 44227 0.138596 0.274896 -0.3238650 0.0023410 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 21 44228 0.139197 0.273297 -0.3262171 0.0023840 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 22 44229 0.139697 0.271697 -0.3286413 0.0024810 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 23 44230 0.140197 0.270197 -0.3311794 0.0026090 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 24 44231 0.140698 0.268598 -0.3338485 0.0027350 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 25 44232 0.141098 0.266998 -0.3366387 0.0028270 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 26 44233 0.141398 0.265498 -0.3394808 0.0028600 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 27 44234 0.141698 0.263898 -0.3423349 0.0028250 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 28 44235 0.141899 0.262399 -0.3451201 0.0027370 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 29 44236 0.141999 0.260799 -0.3477952 0.0026040 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 30 44237 0.141999 0.259299 -0.3503143 0.0024540 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1979 12 31 44238 0.141899 0.257699 -0.3526975 0.0023160 0.000000 0.000000 0.015000 0.015000 0.0019000 0.0007000 0.001989 0.002000 1980 1 1 44239 0.141700 0.256100 0.6450414 0.0022150 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 2 44240 0.141300 0.254500 0.6428473 0.0021710 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 3 44241 0.140800 0.252800 0.6406841 0.0021740 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 4 44242 0.140201 0.251201 0.6384880 0.0022130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 5 44243 0.139501 0.249501 0.6362489 0.0022770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 6 44244 0.138701 0.247801 0.6339388 0.0023540 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 7 44245 0.137701 0.246101 0.6315316 0.0024410 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 8 44246 0.136702 0.244402 0.6290515 0.0025170 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 9 44247 0.135602 0.242602 0.6265034 0.0025740 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 10 44248 0.134502 0.240802 0.6239112 0.0026060 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 11 44249 0.133302 0.239002 0.6213091 0.0026040 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 12 44250 0.132003 0.237103 0.6187000 0.0025910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 13 44251 0.130703 0.235103 0.6161208 0.0025650 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 14 44252 0.129303 0.233103 0.6135817 0.0025230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 15 44253 0.127904 0.231104 0.6110716 0.0025010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 16 44254 0.126404 0.229104 0.6085694 0.0024990 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 17 44255 0.124904 0.227104 0.6060563 0.0025390 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 18 44256 0.123404 0.225004 0.6034802 0.0026200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 19 44257 0.121805 0.222905 0.6007981 0.0027570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 20 44258 0.120205 0.220905 0.5979729 0.0028950 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 21 44259 0.118605 0.218905 0.5950198 0.0030010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 22 44260 0.116906 0.217006 0.5919927 0.0030390 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 23 44261 0.115206 0.215106 0.5889685 0.0030050 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 24 44262 0.113506 0.213306 0.5860064 0.0028880 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 25 44263 0.111806 0.211606 0.5831983 0.0027220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 26 44264 0.110007 0.210007 0.5805671 0.0025290 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 27 44265 0.108307 0.208607 0.5781250 0.0023590 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 28 44266 0.106507 0.207307 0.5758479 0.0022140 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 29 44267 0.104707 0.206107 0.5736818 0.0021170 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 30 44268 0.102908 0.205008 0.5715946 0.0020700 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 1 31 44269 0.101208 0.203908 0.5695265 0.0020640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 1 44270 0.099408 0.202808 0.5674584 0.0020850 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 2 44271 0.097709 0.201809 0.5653602 0.0021110 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 3 44272 0.096009 0.200909 0.5631961 0.0021700 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 4 44273 0.094309 0.200109 0.5609840 0.0022390 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 5 44274 0.092609 0.199309 0.5587229 0.0022910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 6 44275 0.090910 0.198510 0.5564517 0.0022870 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 7 44276 0.089210 0.197710 0.5541976 0.0022270 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 8 44277 0.087610 0.196910 0.5519955 0.0021640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 9 44278 0.086010 0.196010 0.5498833 0.0020860 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 10 44279 0.084411 0.195211 0.5478242 0.0020350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 11 44280 0.082911 0.194311 0.5458231 0.0020010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 12 44281 0.081511 0.193411 0.5438250 0.0020110 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 13 44282 0.080012 0.192512 0.5417948 0.0020860 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 14 44283 0.078612 0.191612 0.5396317 0.0022410 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 15 44284 0.077312 0.190612 0.5372916 0.0024470 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 16 44285 0.075812 0.189712 0.5347254 0.0026990 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 17 44286 0.074513 0.188813 0.5319073 0.0029320 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 18 44287 0.073113 0.188013 0.5288722 0.0031040 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 19 44288 0.071813 0.187113 0.5257211 0.0031810 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 20 44289 0.070513 0.186313 0.5225509 0.0031510 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 21 44290 0.069214 0.185614 0.5194428 0.0030570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 22 44291 0.067914 0.184814 0.5164487 0.0029110 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 23 44292 0.066714 0.184014 0.5136095 0.0027410 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 24 44293 0.065515 0.183315 0.5109424 0.0025890 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 25 44294 0.064315 0.182615 0.5084233 0.0024580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 26 44295 0.063215 0.182015 0.5060082 0.0023710 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 27 44296 0.062015 0.181415 0.5036660 0.0023220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 28 44297 0.060916 0.180916 0.5013529 0.0023070 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 2 29 44298 0.059816 0.180416 0.4990458 0.0023120 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 1 44299 0.058816 0.180016 0.4967296 0.0023220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 2 44300 0.057716 0.179716 0.4943945 0.0023350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 3 44301 0.056717 0.179417 0.4920534 0.0023420 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 4 44302 0.055617 0.179217 0.4897273 0.0023250 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 5 44303 0.054517 0.179017 0.4874211 0.0022800 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 6 44304 0.053518 0.178918 0.4851660 0.0022370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 7 44305 0.052418 0.178818 0.4829639 0.0021850 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 8 44306 0.051218 0.178818 0.4807998 0.0021340 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 9 44307 0.050018 0.178818 0.4786916 0.0020900 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 10 44308 0.048719 0.178819 0.4766125 0.0020770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 11 44309 0.047419 0.178919 0.4745264 0.0021010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 12 44310 0.046019 0.179019 0.4723893 0.0021810 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 13 44311 0.044519 0.179119 0.4701431 0.0023340 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 14 44312 0.043020 0.179220 0.4677030 0.0025440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 15 44313 0.041320 0.179320 0.4650469 0.0027760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 16 44314 0.039620 0.179520 0.4621707 0.0029790 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 17 44315 0.037821 0.179821 0.4591076 0.0031200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 18 44316 0.036021 0.180121 0.4559655 0.0031430 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 19 44317 0.034221 0.180421 0.4528554 0.0030620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 20 44318 0.032321 0.180721 0.4498732 0.0029050 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 21 44319 0.030422 0.181122 0.4470511 0.0027420 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 22 44320 0.028522 0.181622 0.4443910 0.0025960 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 23 44321 0.026722 0.182022 0.4418309 0.0025120 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 24 44322 0.024822 0.182522 0.4393467 0.0024780 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 25 44323 0.023023 0.183023 0.4368586 0.0024970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 26 44324 0.021323 0.183523 0.4343385 0.0025580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 27 44325 0.019523 0.184123 0.4317434 0.0026360 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 28 44326 0.017924 0.184624 0.4290712 0.0027150 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 29 44327 0.016224 0.185224 0.4263231 0.0027810 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 30 44328 0.014624 0.185824 0.4235130 0.0028340 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 3 31 44329 0.013024 0.186524 0.4206639 0.0028540 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 1 44330 0.011425 0.187125 0.4178067 0.0028460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 2 44331 0.009825 0.187825 0.4149706 0.0028100 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 3 44332 0.008225 0.188425 0.4121945 0.0027370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 4 44333 0.006625 0.189125 0.4095004 0.0026400 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 5 44334 0.005026 0.189926 0.4069052 0.0025320 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 6 44335 0.003426 0.190626 0.4044211 0.0024410 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 7 44336 0.001726 0.191326 0.4020120 0.0023840 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 8 44337 0.000027 0.192127 0.3996249 0.0023860 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 9 44338 -0.001673 0.192827 0.3972197 0.0024460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 10 44339 -0.003373 0.193627 0.3947126 0.0025660 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 11 44340 -0.005173 0.194427 0.3920625 0.0027390 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 12 44341 -0.006972 0.195228 0.3892234 0.0029260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 13 44342 -0.008872 0.196128 0.3862142 0.0030770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 14 44343 -0.010672 0.196928 0.3831091 0.0031370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 15 44344 -0.012471 0.197729 0.3799870 0.0030970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 16 44345 -0.014371 0.198629 0.3769469 0.0029810 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 17 44346 -0.016271 0.199529 0.3740427 0.0028050 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 18 44347 -0.018071 0.200329 0.3713256 0.0026300 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 19 44348 -0.019970 0.201230 0.3687575 0.0024960 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 20 44349 -0.021770 0.202130 0.3663044 0.0024220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 21 44350 -0.023570 0.203130 0.3638942 0.0024070 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 22 44351 -0.025270 0.204030 0.3614641 0.0024510 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 23 44352 -0.027069 0.205031 0.3589800 0.0025180 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 24 44353 -0.028669 0.206031 0.3564309 0.0025820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 25 44354 -0.030269 0.207031 0.3538157 0.0026490 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 26 44355 -0.031868 0.208032 0.3511376 0.0026950 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 27 44356 -0.033268 0.209132 0.3484235 0.0027210 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 28 44357 -0.034668 0.210232 0.3457044 0.0027010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 29 44358 -0.035968 0.211332 0.3430293 0.0026320 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 4 30 44359 -0.037167 0.212433 0.3404381 0.0025570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 1 44360 -0.038367 0.213633 0.3379320 0.0024610 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 2 44361 -0.039367 0.214833 0.3355279 0.0023570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 3 44362 -0.040467 0.215933 0.3332068 0.0022810 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 4 44363 -0.041366 0.217134 0.3309556 0.0022350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 5 44364 -0.042266 0.218234 0.3287305 0.0022230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 6 44365 -0.043066 0.219334 0.3264904 0.0022760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 7 44366 -0.043865 0.220535 0.3241703 0.0023740 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 8 44367 -0.044565 0.221635 0.3217271 0.0025160 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 9 44368 -0.045265 0.222735 0.3191210 0.0026980 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 10 44369 -0.046065 0.223835 0.3163369 0.0028530 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 11 44370 -0.046764 0.225036 0.3134248 0.0029580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 12 44371 -0.047464 0.226036 0.3104507 0.0029720 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 13 44372 -0.048164 0.227136 0.3075135 0.0028870 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 14 44373 -0.048764 0.228236 0.3047014 0.0027290 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 15 44374 -0.049363 0.229337 0.3020653 0.0025520 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 16 44375 -0.049863 0.230437 0.2995992 0.0023940 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 17 44376 -0.050363 0.231437 0.2972680 0.0022770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 18 44377 -0.050862 0.232538 0.2950249 0.0022110 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 19 44378 -0.051262 0.233538 0.2928178 0.0022100 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 20 44379 -0.051562 0.234638 0.2905937 0.0022360 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 21 44380 -0.051962 0.235638 0.2883276 0.0022950 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 22 44381 -0.052261 0.236639 0.2860004 0.0023600 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 23 44382 -0.052561 0.237639 0.2836203 0.0023990 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 24 44383 -0.052861 0.238639 0.2812102 0.0024000 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 25 44384 -0.053061 0.239639 0.2788181 0.0023760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 26 44385 -0.053260 0.240640 0.2764659 0.0023150 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 27 44386 -0.053460 0.241640 0.2741968 0.0022280 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 28 44387 -0.053660 0.242640 0.2720267 0.0021190 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 29 44388 -0.053859 0.243741 0.2699636 0.0020080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 30 44389 -0.054059 0.244741 0.2680115 0.0018970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 5 31 44390 -0.054259 0.245741 0.2661613 0.0018080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 1 44391 -0.054459 0.246741 0.2643932 0.0017580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 2 44392 -0.054558 0.247742 0.2626371 0.0017620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 3 44393 -0.054758 0.248842 0.2608490 0.0018210 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 4 44394 -0.054858 0.249842 0.2589699 0.0019320 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 5 44395 -0.054958 0.250842 0.2569677 0.0020720 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 6 44396 -0.055157 0.251843 0.2548296 0.0022020 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 7 44397 -0.055257 0.252743 0.2525695 0.0022990 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 8 44398 -0.055357 0.253743 0.2502544 0.0023370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 9 44399 -0.055456 0.254744 0.2479223 0.0023230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 10 44400 -0.055556 0.255644 0.2456431 0.0022250 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 11 44401 -0.055656 0.256644 0.2434860 0.0020730 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 12 44402 -0.055856 0.257644 0.2414869 0.0019300 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 13 44403 -0.055955 0.258545 0.2396238 0.0018110 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 14 44404 -0.055955 0.259545 0.2378437 0.0017490 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 15 44405 -0.056055 0.260545 0.2360965 0.0017540 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 16 44406 -0.056155 0.261645 0.2343224 0.0017930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 17 44407 -0.056254 0.262646 0.2325023 0.0018480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 18 44408 -0.056254 0.263746 0.2306232 0.0019130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 19 44409 -0.056354 0.264846 0.2286781 0.0019650 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 20 44410 -0.056353 0.266047 0.2266979 0.0020010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 21 44411 -0.056253 0.267147 0.2246928 0.0020040 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 22 44412 -0.056253 0.268347 0.2226997 0.0019790 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 23 44413 -0.056153 0.269547 0.2207436 0.0019280 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 24 44414 -0.055952 0.270848 0.2188595 0.0018570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 25 44415 -0.055752 0.272048 0.2170443 0.0017620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 26 44416 -0.055552 0.273348 0.2153262 0.0016640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 27 44417 -0.055252 0.274648 0.2137101 0.0015800 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 28 44418 -0.054951 0.275949 0.2121650 0.0015180 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 29 44419 -0.054551 0.277349 0.2106569 0.0015070 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 6 30 44420 -0.054051 0.278649 0.2091317 0.0015540 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 1 44421 -0.053550 0.280050 0.2075326 0.0016500 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 2 44422 -0.053050 0.281350 0.2058245 0.0017780 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 3 44423 -0.052450 0.282750 0.2039804 0.0018950 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 4 44424 -0.051750 0.284050 0.2020393 0.0019760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 5 44425 -0.051049 0.285351 0.2000492 0.0020010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 6 44426 -0.050349 0.286551 0.1980640 0.0019510 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 7 44427 -0.049549 0.287851 0.1961599 0.0018460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 8 44428 -0.048748 0.289052 0.1943838 0.0017090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 9 44429 -0.047948 0.290252 0.1927437 0.0015730 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 10 44430 -0.047048 0.291452 0.1912296 0.0014500 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 11 44431 -0.046248 0.292552 0.1898264 0.0013770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 12 44432 -0.045447 0.293653 0.1884583 0.0013600 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 13 44433 -0.044647 0.294653 0.1870792 0.0013920 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 14 44434 -0.043847 0.295753 0.1856631 0.0014550 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 15 44435 -0.043147 0.296853 0.1841650 0.0015320 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 16 44436 -0.042546 0.297854 0.1825999 0.0016070 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 17 44437 -0.041946 0.298954 0.1809647 0.0016690 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 18 44438 -0.041546 0.299954 0.1792796 0.0017090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 19 44439 -0.041045 0.300955 0.1775665 0.0017110 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 20 44440 -0.040645 0.302055 0.1758584 0.0016950 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 21 44441 -0.040245 0.302955 0.1741753 0.0016570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 22 44442 -0.039945 0.303955 0.1725482 0.0015960 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 23 44443 -0.039644 0.304856 0.1709830 0.0015420 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 24 44444 -0.039444 0.305756 0.1694679 0.0014880 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 25 44445 -0.039144 0.306656 0.1679888 0.0014680 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 26 44446 -0.038944 0.307456 0.1665267 0.0014830 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 27 44447 -0.038643 0.308257 0.1650136 0.0015460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 28 44448 -0.038443 0.308957 0.1634065 0.0016690 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 29 44449 -0.038243 0.309657 0.1616533 0.0018190 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 30 44450 -0.038042 0.310258 0.1597562 0.0019680 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 7 31 44451 -0.037842 0.310958 0.1577421 0.0020620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 1 44452 -0.037642 0.311558 0.1556700 0.0020680 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 2 44453 -0.037442 0.312058 0.1536259 0.0019970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 3 44454 -0.037241 0.312659 0.1516898 0.0018630 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 4 44455 -0.037041 0.313159 0.1499126 0.0016860 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 5 44456 -0.036841 0.313759 0.1483125 0.0015190 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 6 44457 -0.036641 0.314259 0.1468674 0.0013760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 7 44458 -0.036440 0.314860 0.1455553 0.0012890 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 8 44459 -0.036240 0.315460 0.1442792 0.0012690 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 9 44460 -0.036040 0.316060 0.1430091 0.0012910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 10 44461 -0.035739 0.316661 0.1416760 0.0013610 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 11 44462 -0.035539 0.317361 0.1402698 0.0014500 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 12 44463 -0.035239 0.318061 0.1387757 0.0015490 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 13 44464 -0.034939 0.318761 0.1371856 0.0016370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 14 44465 -0.034638 0.319462 0.1355185 0.0017030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 15 44466 -0.034238 0.320262 0.1337874 0.0017520 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 16 44467 -0.033838 0.321162 0.1320323 0.0017620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 17 44468 -0.033438 0.321962 0.1302701 0.0017470 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 18 44469 -0.033137 0.322863 0.1285440 0.0017150 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 19 44470 -0.032737 0.323663 0.1268409 0.0016890 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 20 44471 -0.032437 0.324563 0.1251718 0.0016620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 21 44472 -0.032236 0.325364 0.1235007 0.0016660 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 22 44473 -0.032136 0.326164 0.1218276 0.0016970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 23 44474 -0.031936 0.326964 0.1200975 0.0017710 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 24 44475 -0.031836 0.327764 0.1182533 0.0019090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 25 44476 -0.031835 0.328465 0.1162522 0.0021020 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 26 44477 -0.031735 0.329165 0.1140391 0.0023090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 27 44478 -0.031835 0.329765 0.1116410 0.0024800 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 28 44479 -0.031935 0.330265 0.1091049 0.0025760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 29 44480 -0.032034 0.330866 0.1065238 0.0025690 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 30 44481 -0.032134 0.331366 0.1040107 0.0024530 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 8 31 44482 -0.032334 0.331766 0.1016295 0.0022910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 1 44483 -0.032433 0.332267 0.0994354 0.0021080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 2 44484 -0.032533 0.332667 0.0974073 0.0019460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 3 44485 -0.032533 0.333067 0.0955172 0.0018440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 4 44486 -0.032633 0.333467 0.0937001 0.0018020 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 5 44487 -0.032632 0.333868 0.0918830 0.0018290 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 6 44488 -0.032632 0.334368 0.0900159 0.0019100 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 7 44489 -0.032532 0.334768 0.0880538 0.0020170 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 8 44490 -0.032332 0.335168 0.0859906 0.0021200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 9 44491 -0.032131 0.335569 0.0838155 0.0022140 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 10 44492 -0.031931 0.336069 0.0815584 0.0022970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 11 44493 -0.031731 0.336469 0.0792403 0.0023440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 12 44494 -0.031430 0.336870 0.0768822 0.0023700 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 13 44495 -0.031130 0.337270 0.0745191 0.0023590 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 14 44496 -0.030830 0.337770 0.0721720 0.0023150 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 15 44497 -0.030530 0.338170 0.0698829 0.0022630 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 16 44498 -0.030229 0.338571 0.0676547 0.0022050 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 17 44499 -0.029829 0.339071 0.0654636 0.0021680 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 18 44500 -0.029529 0.339471 0.0633165 0.0021440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 19 44501 -0.029129 0.339871 0.0611604 0.0021680 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 20 44502 -0.028728 0.340372 0.0589613 0.0022400 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 21 44503 -0.028428 0.340772 0.0566482 0.0023750 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 22 44504 -0.028028 0.341172 0.0541871 0.0025560 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 23 44505 -0.027627 0.341573 0.0515240 0.0027540 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 24 44506 -0.027227 0.342073 0.0486928 0.0029050 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 25 44507 -0.026827 0.342473 0.0457547 0.0029710 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 26 44508 -0.026327 0.342973 0.0428006 0.0029190 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 27 44509 -0.025926 0.343474 0.0399405 0.0027780 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 28 44510 -0.025426 0.343974 0.0372624 0.0025820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 29 44511 -0.024926 0.344474 0.0347853 0.0023880 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 9 30 44512 -0.024525 0.345075 0.0324722 0.0022380 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 1 44513 -0.024025 0.345675 0.0302861 0.0021440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 2 44514 -0.023625 0.346275 0.0281620 0.0021250 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 3 44515 -0.023225 0.346875 0.0260268 0.0021500 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 4 44516 -0.022724 0.347576 0.0238407 0.0022080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 5 44517 -0.022324 0.348176 0.0215976 0.0022890 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 6 44518 -0.021824 0.348876 0.0192635 0.0023670 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 7 44519 -0.021324 0.349676 0.0168594 0.0024380 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 8 44520 -0.020823 0.350377 0.0143953 0.0024820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 9 44521 -0.020223 0.351177 0.0119042 0.0024960 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 10 44522 -0.019623 0.351977 0.0094141 0.0024810 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 11 44523 -0.019022 0.352678 0.0069510 0.0024400 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 12 44524 -0.018422 0.353478 0.0045499 0.0023830 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 13 44525 -0.017722 0.354278 0.0021967 0.0023240 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 14 44526 -0.017122 0.355078 -0.0001054 0.0022810 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 15 44527 -0.016421 0.355879 -0.0023645 0.0022480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 16 44528 -0.015721 0.356579 -0.0046236 0.0022680 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 17 44529 -0.015021 0.357379 -0.0069107 0.0023330 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 18 44530 -0.014421 0.358079 -0.0093008 0.0024560 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 19 44531 -0.013720 0.358680 -0.0118519 0.0026440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 20 44532 -0.013020 0.359280 -0.0145990 0.0028640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 21 44533 -0.012420 0.359880 -0.0175661 0.0030720 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 22 44534 -0.011719 0.360481 -0.0207212 0.0032170 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 23 44535 -0.011019 0.360981 -0.0239754 0.0032570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 24 44536 -0.010319 0.361481 -0.0271985 0.0031810 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 25 44537 -0.009619 0.361981 -0.0302976 0.0030070 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 26 44538 -0.008918 0.362382 -0.0331997 0.0027960 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 27 44539 -0.008218 0.362782 -0.0358988 0.0026070 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 28 44540 -0.007518 0.363182 -0.0384339 0.0024660 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 29 44541 -0.006818 0.363582 -0.0408540 0.0023960 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 30 44542 -0.006017 0.363983 -0.0432471 0.0023880 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 10 31 44543 -0.005317 0.364383 -0.0456562 0.0024230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 1 44544 -0.004617 0.364683 -0.0481093 0.0024770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 2 44545 -0.003916 0.365084 -0.0506104 0.0025240 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 3 44546 -0.003216 0.365384 -0.0531525 0.0025680 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 4 44547 -0.002416 0.365684 -0.0557397 0.0025790 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 5 44548 -0.001716 0.366084 -0.0583118 0.0025610 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 6 44549 -0.000915 0.366385 -0.0608529 0.0025130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 7 44550 -0.000115 0.366785 -0.0633290 0.0024380 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 8 44551 0.000685 0.367185 -0.0657111 0.0023430 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 9 44552 0.001585 0.367585 -0.0680042 0.0022400 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 10 44553 0.002486 0.367986 -0.0701933 0.0021540 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 11 44554 0.003486 0.368386 -0.0723084 0.0020820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 12 44555 0.004386 0.368786 -0.0743815 0.0020600 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 13 44556 0.005487 0.369187 -0.0764576 0.0020900 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 14 44557 0.006587 0.369587 -0.0785807 0.0021840 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 15 44558 0.007787 0.369987 -0.0808328 0.0023300 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 16 44559 0.008987 0.370387 -0.0832609 0.0025230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 17 44560 0.010288 0.370688 -0.0858910 0.0027350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 18 44561 0.011588 0.371088 -0.0887222 0.0029260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 19 44562 0.012888 0.371488 -0.0917103 0.0030450 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 20 44563 0.014288 0.371788 -0.0947874 0.0030620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 21 44564 0.015789 0.372089 -0.0978095 0.0029790 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 22 44565 0.017289 0.372389 -0.1007126 0.0028210 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 23 44566 0.018789 0.372589 -0.1034467 0.0026500 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 24 44567 0.020290 0.372890 -0.1060158 0.0024870 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 25 44568 0.021990 0.373090 -0.1084429 0.0023800 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 26 44569 0.023590 0.373290 -0.1107880 0.0023410 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 27 44570 0.025290 0.373390 -0.1131301 0.0023420 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 28 44571 0.026891 0.373591 -0.1154812 0.0023700 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 29 44572 0.028491 0.373691 -0.1178743 0.0024050 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 11 30 44573 0.030191 0.373791 -0.1202874 0.0024200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 1 44574 0.031691 0.373891 -0.1227065 0.0024250 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 2 44575 0.033292 0.373992 -0.1251286 0.0024020 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 3 44576 0.034792 0.374092 -0.1275107 0.0023700 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 4 44577 0.036292 0.374192 -0.1298498 0.0023110 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 5 44578 0.037693 0.374193 -0.1321379 0.0022520 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 6 44579 0.038993 0.374293 -0.1343501 0.0021800 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 7 44580 0.040293 0.374193 -0.1364992 0.0021200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 8 44581 0.041493 0.374193 -0.1385873 0.0020770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 9 44582 0.042794 0.374094 -0.1406564 0.0020690 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 10 44583 0.043994 0.373994 -0.1427405 0.0021080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 11 44584 0.045194 0.373794 -0.1448916 0.0022030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 12 44585 0.046394 0.373494 -0.1471637 0.0023480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 13 44586 0.047595 0.373095 -0.1495988 0.0025170 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 14 44587 0.048895 0.372795 -0.1522099 0.0027060 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 15 44588 0.050095 0.372295 -0.1549940 0.0028560 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 16 44589 0.051396 0.371796 -0.1579061 0.0029440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 17 44590 0.052696 0.371196 -0.1608672 0.0029550 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 18 44591 0.054096 0.370596 -0.1637773 0.0028610 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 19 44592 0.055496 0.369896 -0.1665554 0.0026950 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 20 44593 0.056997 0.369197 -0.1691585 0.0024870 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 21 44594 0.058397 0.368397 -0.1715446 0.0023030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 22 44595 0.059897 0.367497 -0.1737807 0.0021800 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 23 44596 0.061398 0.366698 -0.1759178 0.0021250 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 24 44597 0.062798 0.365798 -0.1780399 0.0021270 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 25 44598 0.064298 0.364798 -0.1801930 0.0021740 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 26 44599 0.065698 0.363798 -0.1823911 0.0022430 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 27 44600 0.067099 0.362899 -0.1846662 0.0023030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 28 44601 0.068399 0.361899 -0.1869903 0.0023430 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 29 44602 0.069599 0.360999 -0.1893524 0.0023750 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 30 44603 0.070699 0.360099 -0.1917225 0.0023780 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1980 12 31 44604 0.071700 0.359200 -0.1941006 0.0023630 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 1 44605 0.072600 0.358400 -0.1964497 0.0023250 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 2 44606 0.073400 0.357600 -0.1987358 0.0022560 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 3 44607 0.074101 0.356901 -0.2009620 0.0021870 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 4 44608 0.074701 0.356301 -0.2031241 0.0021300 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 5 44609 0.075201 0.355701 -0.2052312 0.0020910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 6 44610 0.075601 0.355101 -0.2073213 0.0020970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 7 44611 0.076002 0.354602 -0.2094434 0.0021580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 8 44612 0.076402 0.354102 -0.2116565 0.0022740 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 9 44613 0.076702 0.353602 -0.2140046 0.0024290 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 10 44614 0.076902 0.353102 -0.2165177 0.0025950 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 11 44615 0.077103 0.352603 -0.2191768 0.0027370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 12 44616 0.077303 0.352103 -0.2219649 0.0028270 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 13 44617 0.077503 0.351603 -0.2248060 0.0028450 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 14 44618 0.077604 0.350904 -0.2276201 0.0027880 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 15 44619 0.077704 0.350304 -0.2303522 0.0026690 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 16 44620 0.077804 0.349504 -0.2329463 0.0025250 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 17 44621 0.077904 0.348804 -0.2353934 0.0023750 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 18 44622 0.078005 0.348005 -0.2377095 0.0022650 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 19 44623 0.078105 0.347105 -0.2399446 0.0022160 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 20 44624 0.078205 0.346205 -0.2421727 0.0022390 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 21 44625 0.078305 0.345305 -0.2444388 0.0022970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 22 44626 0.078406 0.344306 -0.2467739 0.0023740 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 23 44627 0.078506 0.343406 -0.2491940 0.0024360 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 24 44628 0.078806 0.342306 -0.2516401 0.0024580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 25 44629 0.079107 0.341307 -0.2540912 0.0024400 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 26 44630 0.079607 0.340207 -0.2565103 0.0023900 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 27 44631 0.080207 0.339207 -0.2588614 0.0023090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 28 44632 0.080907 0.338107 -0.2611195 0.0021920 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 29 44633 0.081808 0.337008 -0.2632416 0.0020510 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 30 44634 0.082808 0.336008 -0.2652217 0.0019090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 1 31 44635 0.083808 0.334908 -0.2670718 0.0018080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 1 44636 0.084908 0.333908 -0.2688349 0.0017220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 2 44637 0.086009 0.333009 -0.2705390 0.0016850 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 3 44638 0.087009 0.332109 -0.2722341 0.0017120 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 4 44639 0.088109 0.331309 -0.2739722 0.0018190 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 5 44640 0.089110 0.330510 -0.2758783 0.0020180 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 6 44641 0.090010 0.329710 -0.2780274 0.0022710 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 7 44642 0.090810 0.329010 -0.2804145 0.0024980 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 8 44643 0.091610 0.328410 -0.2830126 0.0026760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 9 44644 0.092211 0.327711 -0.2857387 0.0027700 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 10 44645 0.092711 0.327111 -0.2885138 0.0027780 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 11 44646 0.093011 0.326511 -0.2912729 0.0027080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 12 44647 0.093111 0.325911 -0.2939090 0.0025720 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 13 44648 0.093012 0.325212 -0.2964181 0.0024400 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 14 44649 0.092712 0.324512 -0.2988092 0.0023340 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 15 44650 0.092312 0.323812 -0.3011143 0.0022670 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 16 44651 0.091813 0.323113 -0.3033554 0.0022350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 17 44652 0.091213 0.322313 -0.3056024 0.0022460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 18 44653 0.090613 0.321513 -0.3078685 0.0022770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 19 44654 0.089913 0.320613 -0.3101576 0.0022910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 20 44655 0.089214 0.319714 -0.3124537 0.0022980 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 21 44656 0.088514 0.318814 -0.3147348 0.0022860 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 22 44657 0.087714 0.317914 -0.3170149 0.0022690 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 23 44658 0.086914 0.317114 -0.3192710 0.0022470 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 24 44659 0.086215 0.316215 -0.3214981 0.0022150 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 25 44660 0.085615 0.315415 -0.3236942 0.0022010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 26 44661 0.085015 0.314715 -0.3258893 0.0021920 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 27 44662 0.084616 0.313916 -0.3280904 0.0022110 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 2 28 44663 0.084216 0.313316 -0.3303205 0.0022440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 1 44664 0.084016 0.312616 -0.3325926 0.0023030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 2 44665 0.083916 0.312016 -0.3349447 0.0023910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 3 44666 0.083917 0.311417 -0.3374038 0.0025390 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 4 44667 0.084017 0.310917 -0.3400339 0.0027280 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 5 44668 0.084317 0.310317 -0.3428670 0.0029440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 6 44669 0.084717 0.309817 -0.3459241 0.0031570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 7 44670 0.085218 0.309218 -0.3491752 0.0033380 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 8 44671 0.085718 0.308618 -0.3525693 0.0034310 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 9 44672 0.086318 0.308018 -0.3560014 0.0034060 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 10 44673 0.086919 0.307319 -0.3593595 0.0032970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 11 44674 0.087619 0.306719 -0.3625676 0.0031220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 12 44675 0.088319 0.305919 -0.3656017 0.0029510 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 13 44676 0.089119 0.305219 -0.3684808 0.0027940 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 14 44677 0.089820 0.304420 -0.3712119 0.0026600 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 15 44678 0.090520 0.303620 -0.3738220 0.0025830 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 16 44679 0.091320 0.302720 -0.3763880 0.0025560 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 17 44680 0.092121 0.301921 -0.3789601 0.0025790 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 18 44681 0.092921 0.301021 -0.3815412 0.0026060 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 19 44682 0.093621 0.300221 -0.3841673 0.0026330 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 20 44683 0.094421 0.299321 -0.3867994 0.0026360 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 21 44684 0.095222 0.298522 -0.3894175 0.0026030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 22 44685 0.096022 0.297722 -0.3919946 0.0025440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 23 44686 0.096722 0.296922 -0.3945047 0.0024610 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 24 44687 0.097522 0.296122 -0.3969178 0.0023610 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 25 44688 0.098223 0.295323 -0.3992119 0.0022480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 26 44689 0.098823 0.294523 -0.4014040 0.0021370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 27 44690 0.099523 0.293723 -0.4035031 0.0020640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 28 44691 0.100124 0.292924 -0.4055332 0.0020260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 29 44692 0.100624 0.292124 -0.4075603 0.0020420 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 30 44693 0.101124 0.291324 -0.4096464 0.0021230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 3 31 44694 0.101524 0.290424 -0.4118355 0.0022660 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 1 44695 0.101925 0.289525 -0.4142086 0.0024670 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 2 44696 0.102225 0.288625 -0.4167926 0.0027130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 3 44697 0.102425 0.287625 -0.4196227 0.0029400 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 4 44698 0.102625 0.286525 -0.4226618 0.0031230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 5 44699 0.102726 0.285526 -0.4258339 0.0032000 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 6 44700 0.102826 0.284326 -0.4290220 0.0031580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 7 44701 0.102826 0.283126 -0.4321191 0.0030160 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 8 44702 0.102727 0.281927 -0.4350502 0.0028460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 9 44703 0.102627 0.280727 -0.4378183 0.0026840 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 10 44704 0.102427 0.279427 -0.4404494 0.0025930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 11 44705 0.102127 0.278227 -0.4430285 0.0025660 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 12 44706 0.101828 0.277028 -0.4455936 0.0025860 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 13 44707 0.101328 0.275828 -0.4482257 0.0026630 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 14 44708 0.100828 0.274628 -0.4509278 0.0027520 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 15 44709 0.100328 0.273528 -0.4537188 0.0028390 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 16 44710 0.099729 0.272429 -0.4565899 0.0028980 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 17 44711 0.099029 0.271429 -0.4595040 0.0029250 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 18 44712 0.098429 0.270429 -0.4624281 0.0029170 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 19 44713 0.097830 0.269630 -0.4653262 0.0028740 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 20 44714 0.097230 0.268730 -0.4681683 0.0027920 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 21 44715 0.096630 0.268030 -0.4709154 0.0027000 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 22 44716 0.096030 0.267330 -0.4735555 0.0025930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 23 44717 0.095531 0.266631 -0.4760956 0.0024880 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 24 44718 0.095031 0.266031 -0.4785517 0.0024220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 25 44719 0.094531 0.265431 -0.4809528 0.0023870 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 26 44720 0.094231 0.264931 -0.4833429 0.0024030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 27 44721 0.093932 0.264332 -0.4857869 0.0024750 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 28 44722 0.093732 0.263732 -0.4883240 0.0026040 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 29 44723 0.093632 0.263032 -0.4910021 0.0027700 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 4 30 44724 0.093533 0.262433 -0.4938592 0.0029440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 1 44725 0.093533 0.261833 -0.4968823 0.0030920 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 2 44726 0.093633 0.261133 -0.5000184 0.0031720 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 3 44727 0.093733 0.260433 -0.5031785 0.0031280 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 4 44728 0.093834 0.259734 -0.5062456 0.0029820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 5 44729 0.093934 0.259034 -0.5091167 0.0027410 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 6 44730 0.094034 0.258334 -0.5117328 0.0025040 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 7 44731 0.094134 0.257634 -0.5141308 0.0023200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 8 44732 0.094135 0.256935 -0.5163879 0.0022090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 9 44733 0.094235 0.256135 -0.5185840 0.0021950 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 10 44734 0.094335 0.255435 -0.5207871 0.0022370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 11 44735 0.094336 0.254736 -0.5230682 0.0023180 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 12 44736 0.094436 0.254036 -0.5254243 0.0023930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 13 44737 0.094436 0.253236 -0.5278494 0.0024620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 14 44738 0.094436 0.252536 -0.5303385 0.0025030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 15 44739 0.094437 0.251737 -0.5328526 0.0025200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 16 44740 0.094337 0.250937 -0.5353686 0.0024940 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 17 44741 0.094337 0.250137 -0.5378307 0.0024470 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 18 44742 0.094237 0.249337 -0.5402468 0.0023590 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 19 44743 0.094138 0.248438 -0.5425569 0.0022710 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 20 44744 0.093938 0.247538 -0.5447800 0.0021790 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 21 44745 0.093838 0.246738 -0.5469211 0.0020990 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 22 44746 0.093539 0.245839 -0.5490002 0.0020660 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 23 44747 0.093339 0.244839 -0.5510603 0.0020530 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 24 44748 0.092939 0.243939 -0.5531333 0.0020920 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 25 44749 0.092539 0.243039 -0.5552524 0.0021630 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 26 44750 0.091940 0.242040 -0.5574755 0.0022880 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 27 44751 0.091340 0.241140 -0.5598366 0.0024290 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 28 44752 0.090640 0.240140 -0.5623417 0.0025860 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 29 44753 0.089840 0.239240 -0.5649858 0.0026990 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 30 44754 0.089041 0.238241 -0.5677009 0.0027370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 5 31 44755 0.088141 0.237341 -0.5704230 0.0026790 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 1 44756 0.087341 0.236441 -0.5730380 0.0025390 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 2 44757 0.086442 0.235542 -0.5754961 0.0023500 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 3 44758 0.085642 0.234642 -0.5777522 0.0021720 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 4 44759 0.084742 0.233742 -0.5798593 0.0020640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 5 44760 0.083942 0.232942 -0.5819074 0.0020350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 6 44761 0.083143 0.232243 -0.5839635 0.0020740 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 7 44762 0.082343 0.231443 -0.5860686 0.0021430 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 8 44763 0.081543 0.230743 -0.5882526 0.0022210 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 9 44764 0.080743 0.230043 -0.5905167 0.0022840 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 10 44765 0.080044 0.229444 -0.5928198 0.0023180 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 11 44766 0.079344 0.228744 -0.5951519 0.0023090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 12 44767 0.078644 0.227944 -0.5974380 0.0022560 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 13 44768 0.077945 0.227245 -0.5996431 0.0021610 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 14 44769 0.077345 0.226445 -0.6017532 0.0020350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 15 44770 0.076745 0.225645 -0.6037202 0.0018970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 16 44771 0.076245 0.224745 -0.6055373 0.0017510 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 17 44772 0.075746 0.223946 -0.6072274 0.0016230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 18 44773 0.075146 0.223046 -0.6087845 0.0014970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 19 44774 0.074646 0.222146 -0.6102476 0.0014270 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 20 44775 0.074147 0.221247 -0.6116477 0.0013910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 21 44776 0.073647 0.220247 -0.6130477 0.0014170 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 22 44777 0.073147 0.219347 -0.6144948 0.0014840 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 23 44778 0.072647 0.218447 -0.6160229 0.0015840 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 24 44779 0.072148 0.217548 -0.6176620 0.0016910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 25 44780 0.071548 0.216548 -0.6193951 0.0017770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 26 44781 0.070948 0.215648 -0.6211862 0.0018120 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 27 44782 0.070348 0.214748 -0.6229823 0.0017840 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 28 44783 0.069749 0.213749 -0.6247153 0.0016800 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 29 44784 0.069149 0.212849 -0.6263314 0.0015360 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 6 30 44785 0.068549 0.211849 -0.6277815 0.0013770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 1 44786 0.068050 0.210950 0.3709024 0.0012550 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 2 44787 0.067450 0.209950 0.3696753 0.0012130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 3 44788 0.066950 0.208950 0.3684492 0.0012480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 4 44789 0.066350 0.207950 0.3671722 0.0013160 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 5 44790 0.065951 0.206851 0.3658111 0.0014040 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 6 44791 0.065451 0.205851 0.3643760 0.0014710 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 7 44792 0.065051 0.204851 0.3628899 0.0014970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 8 44793 0.064651 0.203851 0.3613858 0.0014850 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 9 44794 0.064252 0.202752 0.3599317 0.0014160 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 10 44795 0.063952 0.201752 0.3585557 0.0013230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 11 44796 0.063652 0.200852 0.3573046 0.0011860 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 12 44797 0.063353 0.199853 0.3561855 0.0010360 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 13 44798 0.063053 0.198953 0.3552214 0.0008970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 14 44799 0.062653 0.198053 0.3543883 0.0007730 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 15 44800 0.062353 0.197153 0.3536653 0.0006980 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 16 44801 0.061854 0.196354 0.3529872 0.0006850 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 17 44802 0.061354 0.195654 0.3522871 0.0007350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 18 44803 0.060754 0.194954 0.3514990 0.0008500 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 19 44804 0.060154 0.194354 0.3505609 0.0010320 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 20 44805 0.059355 0.193755 0.3494169 0.0012500 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 21 44806 0.058555 0.193155 0.3480738 0.0014530 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 22 44807 0.057555 0.192655 0.3465307 0.0016220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 23 44808 0.056556 0.192156 0.3448506 0.0017300 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 24 44809 0.055456 0.191656 0.3430865 0.0017730 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 25 44810 0.054256 0.191156 0.3413274 0.0017340 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 26 44811 0.053056 0.190756 0.3396374 0.0016480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 27 44812 0.051757 0.190257 0.3380493 0.0015310 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 28 44813 0.050357 0.189757 0.3365682 0.0014360 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 29 44814 0.048857 0.189257 0.3351461 0.0013980 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 30 44815 0.047357 0.188757 0.3337350 0.0014350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 7 31 44816 0.045858 0.188258 0.3322650 0.0015160 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 1 44817 0.044258 0.187858 0.3306819 0.0016420 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 2 44818 0.042558 0.187358 0.3289818 0.0017480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 3 44819 0.040959 0.186959 0.3271957 0.0018150 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 4 44820 0.039259 0.186559 0.3253746 0.0018310 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 5 44821 0.037559 0.186159 0.3235486 0.0018020 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 6 44822 0.035859 0.185759 0.3217815 0.0017350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 7 44823 0.034160 0.185460 0.3200894 0.0016490 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 8 44824 0.032460 0.185160 0.3184913 0.0015350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 9 44825 0.030760 0.184860 0.3170073 0.0014300 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 10 44826 0.029060 0.184660 0.3156152 0.0013390 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 11 44827 0.027361 0.184461 0.3143121 0.0012750 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 12 44828 0.025661 0.184261 0.3130530 0.0012500 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 13 44829 0.023961 0.184061 0.3118049 0.0012650 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 14 44830 0.022162 0.183962 0.3105049 0.0013570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 15 44831 0.020462 0.183862 0.3090828 0.0014930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 16 44832 0.018762 0.183762 0.3074947 0.0016580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 17 44833 0.017162 0.183662 0.3057546 0.0018190 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 18 44834 0.015463 0.183663 0.3038655 0.0019380 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 19 44835 0.013763 0.183663 0.3018905 0.0019880 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 20 44836 0.012163 0.183763 0.2999194 0.0019430 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 21 44837 0.010563 0.183763 0.2980443 0.0018050 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 22 44838 0.008964 0.183964 0.2963272 0.0016210 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 23 44839 0.007464 0.184064 0.2948192 0.0014160 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 24 44840 0.005964 0.184364 0.2934981 0.0012400 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 25 44841 0.004465 0.184565 0.2923210 0.0011260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 26 44842 0.003065 0.184965 0.2912219 0.0010930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 27 44843 0.001665 0.185265 0.2901009 0.0011590 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 28 44844 0.000265 0.185765 0.2888868 0.0012830 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 29 44845 -0.001134 0.186166 0.2875397 0.0014010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 30 44846 -0.002534 0.186666 0.2860806 0.0015100 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 8 31 44847 -0.003934 0.187266 0.2845315 0.0015800 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 1 44848 -0.005334 0.187766 0.2829375 0.0016010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 2 44849 -0.006833 0.188267 0.2813454 0.0015770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 3 44850 -0.008233 0.188767 0.2797853 0.0015260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 4 44851 -0.009633 0.189267 0.2782902 0.0014620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 5 44852 -0.011032 0.189768 0.2768742 0.0013800 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 6 44853 -0.012532 0.190168 0.2755251 0.0013080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 7 44854 -0.013932 0.190668 0.2742400 0.0012710 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 8 44855 -0.015432 0.191168 0.2729709 0.0012630 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 9 44856 -0.016931 0.191669 0.2716869 0.0013120 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 10 44857 -0.018531 0.192169 0.2703278 0.0014160 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 11 44858 -0.020131 0.192669 0.2688447 0.0015770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 12 44859 -0.021830 0.193170 0.2671566 0.0017890 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 13 44860 -0.023430 0.193770 0.2652476 0.0020380 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 14 44861 -0.025230 0.194270 0.2630935 0.0022750 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 15 44862 -0.026930 0.194970 0.2607284 0.0024410 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 16 44863 -0.028829 0.195571 0.2582333 0.0025220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 17 44864 -0.030629 0.196271 0.2557193 0.0025000 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 18 44865 -0.032529 0.196971 0.2532692 0.0023870 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 19 44866 -0.034429 0.197671 0.2509461 0.0022480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 20 44867 -0.036428 0.198472 0.2487681 0.0021130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 21 44868 -0.038428 0.199272 0.2467020 0.0020310 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 22 44869 -0.040528 0.200072 0.2446799 0.0020220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 23 44870 -0.042627 0.200973 0.2426318 0.0020770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 24 44871 -0.044827 0.201873 0.2404988 0.0021960 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 25 44872 -0.047027 0.202773 0.2382307 0.0023220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 26 44873 -0.049227 0.203773 0.2358466 0.0024430 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 27 44874 -0.051526 0.204774 0.2333645 0.0025130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 28 44875 -0.053726 0.205774 0.2308345 0.0025460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 29 44876 -0.056026 0.206774 0.2282874 0.0025210 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 9 30 44877 -0.058226 0.207774 0.2257983 0.0024540 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 1 44878 -0.060325 0.208775 0.2233912 0.0023450 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 2 44879 -0.062525 0.209775 0.2211122 0.0022200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 3 44880 -0.064525 0.210775 0.2189581 0.0020980 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 4 44881 -0.066424 0.211876 0.2169090 0.0019960 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 5 44882 -0.068224 0.212876 0.2149570 0.0019290 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 6 44883 -0.069924 0.214076 0.2130449 0.0018990 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 7 44884 -0.071524 0.215176 0.2111408 0.0019220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 8 44885 -0.072923 0.216377 0.2091727 0.0020100 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 9 44886 -0.074223 0.217677 0.2071107 0.0021430 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 10 44887 -0.075523 0.219077 0.2048716 0.0023390 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 11 44888 -0.076723 0.220477 0.2024175 0.0025590 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 12 44889 -0.077922 0.222078 0.1997645 0.0027480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 13 44890 -0.078922 0.223678 0.1969584 0.0028560 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 14 44891 -0.080022 0.225378 0.1940903 0.0028530 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 15 44892 -0.081021 0.227179 0.1912802 0.0027510 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 16 44893 -0.082021 0.228979 0.1886202 0.0025680 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 17 44894 -0.083021 0.230779 0.1861451 0.0023840 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 18 44895 -0.084021 0.232579 0.1838380 0.0022330 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 19 44896 -0.085120 0.234480 0.1816550 0.0021580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 20 44897 -0.086120 0.236380 0.1794949 0.0021640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 21 44898 -0.087220 0.238180 0.1773048 0.0022240 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 22 44899 -0.088320 0.240080 0.1750348 0.0023190 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 23 44900 -0.089419 0.241881 0.1726657 0.0024170 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 24 44901 -0.090619 0.243581 0.1702096 0.0024930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 25 44902 -0.091719 0.245381 0.1676935 0.0025300 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 26 44903 -0.092818 0.246982 0.1651635 0.0025220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 27 44904 -0.094018 0.248682 0.1626644 0.0024690 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 28 44905 -0.095118 0.250282 0.1602363 0.0023810 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 29 44906 -0.096218 0.251782 0.1579193 0.0022610 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 30 44907 -0.097217 0.253283 0.1557162 0.0021440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 10 31 44908 -0.098317 0.254783 0.1536271 0.0020300 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 1 44909 -0.099317 0.256283 0.1516481 0.0019440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 2 44910 -0.100317 0.257683 0.1497240 0.0019030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 3 44911 -0.101316 0.259184 0.1478149 0.0019130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 4 44912 -0.102216 0.260584 0.1458689 0.0019860 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 5 44913 -0.103116 0.262084 0.1438348 0.0021020 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 6 44914 -0.104015 0.263485 0.1416597 0.0022640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 7 44915 -0.104915 0.264985 0.1392857 0.0024760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 8 44916 -0.105715 0.266485 0.1367176 0.0026760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 9 44917 -0.106515 0.267885 0.1339585 0.0028310 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 10 44918 -0.107314 0.269386 0.1310884 0.0029040 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 11 44919 -0.108014 0.270986 0.1281994 0.0028620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 12 44920 -0.108614 0.272486 0.1253863 0.0027310 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 13 44921 -0.109214 0.274186 0.1227442 0.0025390 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 14 44922 -0.109613 0.275787 0.1203042 0.0023400 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 15 44923 -0.110013 0.277587 0.1180411 0.0021970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 16 44924 -0.110313 0.279387 0.1158810 0.0021410 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 17 44925 -0.110412 0.281288 0.1137360 0.0021510 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 18 44926 -0.110512 0.283188 0.1115749 0.0021850 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 19 44927 -0.110512 0.285188 0.1093618 0.0022380 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 20 44928 -0.110512 0.287188 0.1071038 0.0022630 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 21 44929 -0.110511 0.289189 0.1048367 0.0022630 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 22 44930 -0.110411 0.291289 0.1026026 0.0022200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 23 44931 -0.110411 0.293489 0.1004216 0.0021350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 24 44932 -0.110411 0.295689 0.0983335 0.0020260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 25 44933 -0.110410 0.297790 0.0963784 0.0019110 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 26 44934 -0.110410 0.299990 0.0945144 0.0018160 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 27 44935 -0.110510 0.302190 0.0927343 0.0017360 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 28 44936 -0.110709 0.304391 0.0910253 0.0016780 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 29 44937 -0.110909 0.306491 0.0893652 0.0016580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 11 30 44938 -0.111209 0.308691 0.0876931 0.0016860 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 1 44939 -0.111509 0.310791 0.0859661 0.0017780 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 2 44940 -0.111908 0.312892 0.0841310 0.0019100 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 3 44941 -0.112308 0.314992 0.0821399 0.0020760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 4 44942 -0.112708 0.317092 0.0799779 0.0022620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 5 44943 -0.113007 0.319193 0.0776138 0.0024580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 6 44944 -0.113307 0.321393 0.0750677 0.0026350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 7 44945 -0.113507 0.323593 0.0723737 0.0027530 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 8 44946 -0.113607 0.325793 0.0696036 0.0027690 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 9 44947 -0.113706 0.327994 0.0668695 0.0026930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 10 44948 -0.113806 0.330194 0.0642535 0.0025310 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 11 44949 -0.113706 0.332394 0.0618164 0.0023460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 12 44950 -0.113606 0.334694 0.0595474 0.0021990 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 13 44951 -0.113405 0.336895 0.0573893 0.0021330 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 14 44952 -0.113205 0.339195 0.0552522 0.0021530 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 15 44953 -0.112805 0.341395 0.0530722 0.0022340 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 16 44954 -0.112304 0.343596 0.0507881 0.0023240 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 17 44955 -0.111804 0.345796 0.0484200 0.0024070 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 18 44956 -0.111204 0.347996 0.0459990 0.0024300 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 19 44957 -0.110404 0.350196 0.0435649 0.0024180 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 20 44958 -0.109603 0.352297 0.0411758 0.0023630 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 21 44959 -0.108603 0.354497 0.0388608 0.0022730 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 22 44960 -0.107603 0.356597 0.0366377 0.0021590 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 23 44961 -0.106503 0.358697 0.0345467 0.0020330 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 24 44962 -0.105302 0.360798 0.0325716 0.0019190 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 25 44963 -0.104002 0.362798 0.0307005 0.0018140 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 26 44964 -0.102602 0.364898 0.0289205 0.0017520 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 27 44965 -0.101101 0.366899 0.0271834 0.0017250 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 28 44966 -0.099601 0.368999 0.0254454 0.0017600 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 29 44967 -0.098101 0.370999 0.0236553 0.0018460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 30 44968 -0.096501 0.372999 0.0217482 0.0019660 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1981 12 31 44969 -0.094800 0.375000 0.0197032 0.0021240 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 1 44970 -0.093100 0.377000 0.0174851 0.0023000 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 2 44971 -0.091300 0.378900 0.0151090 0.0024500 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 3 44972 -0.089500 0.380800 0.0125990 0.0025690 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 4 44973 -0.087599 0.382701 0.0100039 0.0026090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 5 44974 -0.085699 0.384501 0.0074079 0.0025670 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 6 44975 -0.083699 0.386301 0.0048848 0.0024590 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 7 44976 -0.081798 0.388102 0.0025047 0.0022990 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 8 44977 -0.079798 0.389802 0.0002927 0.0021310 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 9 44978 -0.077798 0.391402 -0.0017894 0.0020340 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 10 44979 -0.075798 0.393002 -0.0038054 0.0020230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 11 44980 -0.073797 0.394503 -0.0058605 0.0020890 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 12 44981 -0.071897 0.396003 -0.0079956 0.0021930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 13 44982 -0.069897 0.397403 -0.0102366 0.0022810 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 14 44983 -0.067897 0.398803 -0.0125537 0.0023380 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 15 44984 -0.065996 0.400204 -0.0148927 0.0023400 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 16 44985 -0.063996 0.401504 -0.0172048 0.0022790 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 17 44986 -0.062096 0.402804 -0.0194349 0.0021760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 18 44987 -0.060295 0.404105 -0.0215359 0.0020350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 19 44988 -0.058395 0.405405 -0.0235000 0.0018910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 20 44989 -0.056595 0.406805 -0.0253210 0.0017490 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 21 44990 -0.054795 0.408205 -0.0269951 0.0016150 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 22 44991 -0.053094 0.409606 -0.0285601 0.0015130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 23 44992 -0.051494 0.411006 -0.0300452 0.0014730 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 24 44993 -0.049794 0.412406 -0.0315143 0.0014850 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 25 44994 -0.048294 0.413906 -0.0330223 0.0015500 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 26 44995 -0.046693 0.415407 -0.0346314 0.0016740 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 27 44996 -0.045193 0.416907 -0.0363704 0.0018310 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 28 44997 -0.043793 0.418307 -0.0382935 0.0020050 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 29 44998 -0.042292 0.419808 -0.0403855 0.0021700 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 30 44999 -0.040892 0.421208 -0.0426286 0.0022890 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 1 31 45000 -0.039392 0.422608 -0.0449497 0.0023430 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 1 45001 -0.037892 0.423808 -0.0472897 0.0023240 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 2 45002 -0.036291 0.425009 -0.0495878 0.0022510 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 3 45003 -0.034691 0.426109 -0.0517778 0.0021260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 4 45004 -0.032991 0.427209 -0.0538389 0.0019910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 5 45005 -0.031191 0.428109 -0.0557749 0.0019000 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 6 45006 -0.029290 0.428910 -0.0576650 0.0018860 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 7 45007 -0.027390 0.429710 -0.0595651 0.0019460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 8 45008 -0.025290 0.430410 -0.0615771 0.0020650 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 9 45009 -0.023189 0.431011 -0.0637102 0.0021990 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 10 45010 -0.020989 0.431511 -0.0659652 0.0023130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 11 45011 -0.018789 0.432011 -0.0683183 0.0023700 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 12 45012 -0.016389 0.432511 -0.0706923 0.0023720 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 13 45013 -0.013988 0.433012 -0.0730324 0.0023190 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 14 45014 -0.011588 0.433512 -0.0753174 0.0022260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 15 45015 -0.009088 0.434112 -0.0774895 0.0021240 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 16 45016 -0.006488 0.434612 -0.0795536 0.0020090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 17 45017 -0.003887 0.435213 -0.0815226 0.0019110 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 18 45018 -0.001287 0.435713 -0.0833967 0.0018530 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 19 45019 0.001413 0.436413 -0.0852437 0.0018390 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 20 45020 0.004114 0.437014 -0.0871028 0.0018860 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 21 45021 0.006814 0.437714 -0.0890338 0.0019880 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 22 45022 0.009614 0.438314 -0.0910849 0.0021440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 23 45023 0.012414 0.439014 -0.0933359 0.0023520 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 24 45024 0.015115 0.439715 -0.0957970 0.0025710 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 25 45025 0.017915 0.440415 -0.0984740 0.0027960 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 26 45026 0.020615 0.441115 -0.1013631 0.0029520 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 27 45027 0.023416 0.441716 -0.1043622 0.0030440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 2 28 45028 0.026116 0.442316 -0.1074132 0.0030320 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 1 45029 0.028816 0.442816 -0.1103923 0.0028980 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 2 45030 0.031416 0.443316 -0.1132053 0.0026930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 3 45031 0.034017 0.443617 -0.1157884 0.0024860 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 4 45032 0.036617 0.443817 -0.1181794 0.0023070 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 5 45033 0.039117 0.443817 -0.1204265 0.0021880 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 6 45034 0.041517 0.443817 -0.1225955 0.0021620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 7 45035 0.043918 0.443618 -0.1247646 0.0022060 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 8 45036 0.046318 0.443318 -0.1270196 0.0022960 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 9 45037 0.048818 0.442918 -0.1293647 0.0023890 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 10 45038 0.051319 0.442419 -0.1317697 0.0024250 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 11 45039 0.053819 0.441819 -0.1341908 0.0024150 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 12 45040 0.056319 0.441119 -0.1365778 0.0023790 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 13 45041 0.058919 0.440419 -0.1389319 0.0023100 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 14 45042 0.061520 0.439620 -0.1411869 0.0022090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 15 45043 0.064220 0.438820 -0.1433460 0.0020960 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 16 45044 0.066820 0.438120 -0.1453930 0.0019920 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 17 45045 0.069520 0.437320 -0.1473511 0.0019160 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 18 45046 0.072221 0.436521 -0.1492391 0.0018620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 19 45047 0.074921 0.435821 -0.1510922 0.0018600 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 20 45048 0.077621 0.435121 -0.1529882 0.0019330 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 21 45049 0.080222 0.434422 -0.1549763 0.0020520 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 22 45050 0.082822 0.433922 -0.1571004 0.0022220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 23 45051 0.085322 0.433322 -0.1594224 0.0024260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 24 45052 0.087822 0.432922 -0.1619545 0.0026370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 25 45053 0.090223 0.432423 -0.1646855 0.0028250 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 26 45054 0.092723 0.432023 -0.1675696 0.0029290 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 27 45055 0.095123 0.431723 -0.1705206 0.0029450 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 28 45056 0.097523 0.431323 -0.1734397 0.0028690 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 29 45057 0.099824 0.431024 -0.1762457 0.0027400 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 30 45058 0.102124 0.430624 -0.1789047 0.0025870 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 3 31 45059 0.104424 0.430224 -0.1814228 0.0024590 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 1 45060 0.106725 0.429825 -0.1838558 0.0024100 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 2 45061 0.108925 0.429325 -0.1862709 0.0024340 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 3 45062 0.111025 0.428825 -0.1887589 0.0025330 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 4 45063 0.113225 0.428225 -0.1913630 0.0026780 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 5 45064 0.115326 0.427626 -0.1941180 0.0028240 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 6 45065 0.117326 0.426926 -0.1970091 0.0029400 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 7 45066 0.119326 0.426126 -0.1999821 0.0030020 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 8 45067 0.121326 0.425226 -0.2029822 0.0029680 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 9 45068 0.123227 0.424327 -0.2059062 0.0028640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 10 45069 0.125127 0.423327 -0.2086953 0.0027170 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 11 45070 0.126927 0.422227 -0.2113233 0.0025370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 12 45071 0.128728 0.421028 -0.2137784 0.0023650 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 13 45072 0.130528 0.419828 -0.2160694 0.0022130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 14 45073 0.132328 0.418628 -0.2182265 0.0021080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 15 45074 0.134028 0.417328 -0.2203035 0.0020640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 16 45075 0.135829 0.416029 -0.2223746 0.0020760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 17 45076 0.137629 0.414729 -0.2244726 0.0021430 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 18 45077 0.139429 0.413329 -0.2266767 0.0022710 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 19 45078 0.141229 0.412029 -0.2290307 0.0024430 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 20 45079 0.143030 0.410630 -0.2315598 0.0026480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 21 45080 0.144830 0.409230 -0.2343148 0.0028470 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 22 45081 0.146630 0.407730 -0.2372478 0.0030050 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 23 45082 0.148431 0.406231 -0.2402959 0.0030930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 24 45083 0.150231 0.404731 -0.2433869 0.0030730 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 25 45084 0.152031 0.403231 -0.2464010 0.0029520 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 26 45085 0.153831 0.401631 -0.2492860 0.0027960 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 27 45086 0.155532 0.400032 -0.2520091 0.0026670 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 28 45087 0.157232 0.398332 -0.2546311 0.0025820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 29 45088 0.158932 0.396632 -0.2572022 0.0025660 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 4 30 45089 0.160632 0.394932 -0.2597902 0.0026100 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 1 45090 0.162233 0.393133 -0.2624513 0.0026980 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 2 45091 0.163933 0.391433 -0.2652033 0.0028030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 3 45092 0.165533 0.389533 -0.2680524 0.0028800 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 4 45093 0.167234 0.387634 -0.2709484 0.0029020 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 5 45094 0.168834 0.385734 -0.2738374 0.0028570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 6 45095 0.170534 0.383734 -0.2766425 0.0027430 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 7 45096 0.172134 0.381734 -0.2793075 0.0025820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 8 45097 0.173835 0.379735 -0.2817966 0.0023820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 9 45098 0.175435 0.377535 -0.2840786 0.0021810 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 10 45099 0.177035 0.375435 -0.2861527 0.0019820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 11 45100 0.178735 0.373235 -0.2880517 0.0018220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 12 45101 0.180336 0.371036 -0.2898107 0.0017070 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 13 45102 0.181936 0.368736 -0.2914918 0.0016660 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 14 45103 0.183636 0.366436 -0.2931518 0.0016820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 15 45104 0.185237 0.364137 -0.2948639 0.0017580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 16 45105 0.186837 0.361737 -0.2966729 0.0018870 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 17 45106 0.188337 0.359337 -0.2986480 0.0020760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 18 45107 0.189937 0.356937 -0.3008280 0.0022940 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 19 45108 0.191438 0.354438 -0.3032390 0.0025110 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 20 45109 0.192938 0.352038 -0.3058191 0.0026450 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 21 45110 0.194438 0.349538 -0.3084971 0.0026830 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 22 45111 0.195839 0.347039 -0.3111612 0.0026260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 23 45112 0.197239 0.344539 -0.3137232 0.0024920 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 24 45113 0.198739 0.342039 -0.3161293 0.0023210 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 25 45114 0.200039 0.339439 -0.3183813 0.0021840 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 26 45115 0.201440 0.336940 -0.3205243 0.0021230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 27 45116 0.202840 0.334440 -0.3226574 0.0021460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 28 45117 0.204240 0.331840 -0.3248504 0.0022460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 29 45118 0.205540 0.329340 -0.3271475 0.0023490 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 30 45119 0.206941 0.326741 -0.3295425 0.0024260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 5 31 45120 0.208241 0.324141 -0.3319845 0.0024480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 1 45121 0.209641 0.321541 -0.3344306 0.0024250 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 2 45122 0.211042 0.318842 -0.3368176 0.0023370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 3 45123 0.212342 0.316142 -0.3390907 0.0022140 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 4 45124 0.213742 0.313342 -0.3412347 0.0020700 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 5 45125 0.215142 0.310642 -0.3432258 0.0019130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 6 45126 0.216643 0.307743 -0.3450618 0.0017700 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 7 45127 0.218043 0.304943 -0.3467738 0.0016510 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 8 45128 0.219343 0.302043 -0.3483779 0.0015710 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 9 45129 0.220743 0.299143 -0.3499249 0.0015420 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 10 45130 0.222044 0.296244 -0.3514710 0.0015590 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 11 45131 0.223244 0.293344 -0.3530600 0.0016270 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 12 45132 0.224344 0.290444 -0.3547390 0.0017370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 13 45133 0.225345 0.287545 -0.3565431 0.0018760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 14 45134 0.226145 0.284645 -0.3584941 0.0020260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 15 45135 0.226945 0.281745 -0.3605931 0.0021690 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 16 45136 0.227545 0.278945 -0.3628302 0.0022730 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 17 45137 0.228046 0.276046 -0.3651272 0.0023080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 18 45138 0.228346 0.273246 -0.3674143 0.0022500 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 19 45139 0.228646 0.270546 -0.3696083 0.0021060 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 20 45140 0.228846 0.267746 -0.3716193 0.0019120 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 21 45141 0.228847 0.265047 -0.3734254 0.0017200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 22 45142 0.228847 0.262447 -0.3750824 0.0016080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 23 45143 0.228747 0.259747 -0.3766745 0.0015840 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 24 45144 0.228448 0.257148 -0.3782875 0.0016450 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 25 45145 0.228248 0.254548 -0.3799785 0.0017490 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 26 45146 0.227948 0.251948 -0.3817836 0.0018450 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 27 45147 0.227548 0.249348 -0.3836516 0.0018920 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 28 45148 0.227249 0.246649 -0.3855456 0.0018740 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 29 45149 0.226849 0.243949 -0.3873897 0.0017950 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 6 30 45150 0.226449 0.241249 -0.3891197 0.0016670 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 1 45151 0.225949 0.238549 0.6092862 0.0015200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 2 45152 0.225550 0.235850 0.6078552 0.0013590 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 3 45153 0.225050 0.233050 0.6065772 0.0012130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 4 45154 0.224450 0.230250 0.6054231 0.0010870 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 5 45155 0.223951 0.227451 0.6043801 0.0010070 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 6 45156 0.223351 0.224651 0.6033951 0.0009730 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 7 45157 0.222851 0.221751 0.6024070 0.0010040 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 8 45158 0.222151 0.218951 0.6013590 0.0010980 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 9 45159 0.221552 0.216052 0.6002040 0.0012270 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 10 45160 0.220852 0.213152 0.5988939 0.0013950 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 11 45161 0.220152 0.210252 0.5974219 0.0015620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 12 45162 0.219452 0.207352 0.5957739 0.0017300 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 13 45163 0.218653 0.204553 0.5939718 0.0018560 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 14 45164 0.217753 0.201753 0.5920888 0.0019200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 15 45165 0.216853 0.198953 0.5901657 0.0019020 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 16 45166 0.215854 0.196154 0.5882997 0.0018090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 17 45167 0.214854 0.193354 0.5865787 0.0016370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 18 45168 0.213754 0.190654 0.5850306 0.0014520 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 19 45169 0.212554 0.187954 0.5836596 0.0012990 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 20 45170 0.211355 0.185355 0.5824016 0.0012350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 21 45171 0.210155 0.182655 0.5811485 0.0012780 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 22 45172 0.208855 0.180055 0.5798135 0.0013990 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 23 45173 0.207455 0.177555 0.5783565 0.0015230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 24 45174 0.206056 0.174956 0.5767804 0.0016280 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 25 45175 0.204656 0.172456 0.5751354 0.0016490 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 26 45176 0.203256 0.169956 0.5735084 0.0016030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 27 45177 0.201957 0.167457 0.5719503 0.0014940 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 28 45178 0.200557 0.164957 0.5705233 0.0013570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 29 45179 0.199157 0.162557 0.5692423 0.0012140 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 30 45180 0.197857 0.160057 0.5681022 0.0010760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 7 31 45181 0.196558 0.157658 0.5670832 0.0009590 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 1 45182 0.195258 0.155258 0.5661832 0.0008680 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 2 45183 0.193958 0.152958 0.5653301 0.0008330 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 3 45184 0.192658 0.150558 0.5644991 0.0008510 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 4 45185 0.191459 0.148259 0.5636211 0.0009130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 5 45186 0.190259 0.145859 0.5626571 0.0010330 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 6 45187 0.188959 0.143559 0.5615440 0.0011880 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 7 45188 0.187560 0.141260 0.5602760 0.0013560 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 8 45189 0.186160 0.138860 0.5588250 0.0015230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 9 45190 0.184760 0.136560 0.5572429 0.0016540 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 10 45191 0.183160 0.134260 0.5555469 0.0017310 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 11 45192 0.181561 0.131961 0.5538029 0.0017420 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 12 45193 0.179861 0.129661 0.5520848 0.0016870 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 13 45194 0.178061 0.127461 0.5504358 0.0015920 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 14 45195 0.176062 0.125162 0.5488978 0.0014760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 15 45196 0.174062 0.122962 0.5474747 0.0013960 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 16 45197 0.171862 0.120762 0.5460817 0.0013850 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 17 45198 0.169662 0.118562 0.5446717 0.0014690 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 18 45199 0.167363 0.116463 0.5431137 0.0016490 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 19 45200 0.164963 0.114363 0.5413606 0.0018610 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 20 45201 0.162563 0.112363 0.5394086 0.0020470 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 21 45202 0.160063 0.110363 0.5372786 0.0021790 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 22 45203 0.157464 0.108464 0.5350695 0.0022230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 23 45204 0.154864 0.106564 0.5328695 0.0021740 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 24 45205 0.152264 0.104764 0.5307505 0.0020570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 25 45206 0.149565 0.103065 0.5287544 0.0019130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 26 45207 0.146865 0.101365 0.5269144 0.0017780 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 27 45208 0.144065 0.099765 0.5251924 0.0016530 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 28 45209 0.141365 0.098165 0.5235974 0.0015640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 29 45210 0.138466 0.096666 0.5220473 0.0015340 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 30 45211 0.135666 0.095166 0.5205013 0.0015680 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 8 31 45212 0.132766 0.093766 0.5188923 0.0016570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 1 45213 0.129766 0.092366 0.5171682 0.0018080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 2 45214 0.126867 0.090967 0.5152742 0.0020090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 3 45215 0.123767 0.089667 0.5131522 0.0022340 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 4 45216 0.120767 0.088367 0.5107952 0.0024550 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 5 45217 0.117668 0.087068 0.5082631 0.0026230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 6 45218 0.114568 0.085868 0.5055811 0.0027200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 7 45219 0.111368 0.084568 0.5028391 0.0027420 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 8 45220 0.108168 0.083368 0.5001321 0.0026810 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 9 45221 0.104969 0.082169 0.4975060 0.0025260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 10 45222 0.101769 0.081069 0.4950760 0.0023220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 11 45223 0.098469 0.079869 0.4928540 0.0021300 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 12 45224 0.095169 0.078769 0.4908070 0.0019870 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 13 45225 0.091870 0.077670 0.4888509 0.0019400 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 14 45226 0.088570 0.076570 0.4868859 0.0020030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 15 45227 0.085170 0.075570 0.4848339 0.0021370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 16 45228 0.081771 0.074571 0.4826068 0.0023240 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 17 45229 0.078471 0.073571 0.4801988 0.0024810 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 18 45230 0.074971 0.072671 0.4776718 0.0025480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 19 45231 0.071571 0.071871 0.4751238 0.0025330 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 20 45232 0.068172 0.071172 0.4726217 0.0024410 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 21 45233 0.064672 0.070472 0.4702487 0.0023010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 22 45234 0.061172 0.069872 0.4680247 0.0021350 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 23 45235 0.057672 0.069372 0.4659637 0.0019900 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 24 45236 0.054173 0.068973 0.4640326 0.0018790 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 25 45237 0.050573 0.068573 0.4621996 0.0018060 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 26 45238 0.047073 0.068373 0.4604006 0.0018010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 27 45239 0.043474 0.068274 0.4585796 0.0018430 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 28 45240 0.039874 0.068274 0.4566955 0.0019410 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 29 45241 0.036374 0.068274 0.4546815 0.0020930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 9 30 45242 0.032774 0.068374 0.4524985 0.0022670 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 1 45243 0.029175 0.068575 0.4501445 0.0024520 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 2 45244 0.025575 0.068775 0.4476105 0.0026180 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 3 45245 0.021875 0.069075 0.4449244 0.0027310 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 4 45246 0.018275 0.069475 0.4421654 0.0027640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 5 45247 0.014676 0.069876 0.4394264 0.0027070 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 6 45248 0.011076 0.070376 0.4367864 0.0025670 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 7 45249 0.007476 0.070876 0.4343163 0.0023820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 8 45250 0.003877 0.071377 0.4320153 0.0022130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 9 45251 0.000277 0.071977 0.4298693 0.0020910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 10 45252 -0.003223 0.072577 0.4278053 0.0020540 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 11 45253 -0.006823 0.073177 0.4257223 0.0021060 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 12 45254 -0.010322 0.073778 0.4235612 0.0022260 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 13 45255 -0.013722 0.074478 0.4212602 0.0023770 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 14 45256 -0.017222 0.075078 0.4188222 0.0025000 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 15 45257 -0.020622 0.075778 0.4162802 0.0025740 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 16 45258 -0.023921 0.076479 0.4137041 0.0025750 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 17 45259 -0.027221 0.077079 0.4111691 0.0024920 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 18 45260 -0.030521 0.077779 0.4087511 0.0023460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 19 45261 -0.033720 0.078480 0.4064881 0.0021660 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 20 45262 -0.036920 0.079180 0.4044101 0.0019930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 21 45263 -0.040020 0.079880 0.4024940 0.0018630 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 22 45264 -0.043120 0.080680 0.4006790 0.0017760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 23 45265 -0.046219 0.081381 0.3989230 0.0017450 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 24 45266 -0.049319 0.082181 0.3971590 0.0017850 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 25 45267 -0.052319 0.082981 0.3953340 0.0018830 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 26 45268 -0.055319 0.083781 0.3933879 0.0020200 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 27 45269 -0.058318 0.084682 0.3912819 0.0021830 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 28 45270 -0.061218 0.085582 0.3890029 0.0023580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 29 45271 -0.064218 0.086482 0.3865669 0.0025110 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 30 45272 -0.067217 0.087583 0.3839829 0.0026420 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 10 31 45273 -0.070217 0.088683 0.3812958 0.0027160 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 1 45274 -0.073317 0.089983 0.3785808 0.0026880 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 2 45275 -0.076317 0.091283 0.3759418 0.0025760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 3 45276 -0.079416 0.092684 0.3734498 0.0024220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 4 45277 -0.082516 0.094084 0.3711118 0.0022570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 5 45278 -0.085716 0.095684 0.3689187 0.0021490 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 6 45279 -0.088815 0.097385 0.3667837 0.0021280 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 7 45280 -0.092015 0.099085 0.3646217 0.0022010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 8 45281 -0.095115 0.100885 0.3623557 0.0023390 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 9 45282 -0.098215 0.102785 0.3599317 0.0025130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 10 45283 -0.101314 0.104686 0.3573327 0.0026800 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 11 45284 -0.104314 0.106686 0.3545966 0.0027920 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 12 45285 -0.107214 0.108786 0.3517816 0.0028240 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 13 45286 -0.110014 0.110886 0.3489726 0.0027910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 14 45287 -0.112813 0.113087 0.3462226 0.0026820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 15 45288 -0.115613 0.115387 0.3436156 0.0025300 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 16 45289 -0.118313 0.117587 0.3411785 0.0023620 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 17 45290 -0.121012 0.119888 0.3388955 0.0022060 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 18 45291 -0.123712 0.122188 0.3367545 0.0020830 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 19 45292 -0.126312 0.124488 0.3347235 0.0020090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 20 45293 -0.129012 0.126888 0.3327175 0.0020040 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 21 45294 -0.131711 0.129189 0.3306955 0.0020480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 22 45295 -0.134411 0.131489 0.3286035 0.0021450 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 23 45296 -0.137111 0.133789 0.3263914 0.0022820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 24 45297 -0.139811 0.136089 0.3240304 0.0024440 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 25 45298 -0.142510 0.138390 0.3215004 0.0026130 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 26 45299 -0.145210 0.140690 0.3188184 0.0027580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 27 45300 -0.147910 0.143090 0.3159994 0.0028710 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 28 45301 -0.150609 0.145391 0.3130994 0.0029100 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 29 45302 -0.153209 0.147791 0.3102203 0.0028460 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 11 30 45303 -0.155909 0.150191 0.3074373 0.0027080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 1 45304 -0.158509 0.152691 0.3048183 0.0025270 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 2 45305 -0.161008 0.155192 0.3023773 0.0023640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 3 45306 -0.163508 0.157792 0.3000533 0.0022760 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 4 45307 -0.166008 0.160592 0.2977793 0.0023000 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 5 45308 -0.168308 0.163492 0.2954343 0.0024030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 6 45309 -0.170607 0.166593 0.2929492 0.0025640 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 7 45310 -0.172807 0.169793 0.2903172 0.0027120 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 8 45311 -0.174907 0.173193 0.2875402 0.0028240 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 9 45312 -0.177006 0.176694 0.2846932 0.0028570 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 10 45313 -0.179006 0.180194 0.2818502 0.0028270 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 11 45314 -0.180906 0.183894 0.2790682 0.0027270 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 12 45315 -0.182806 0.187694 0.2764102 0.0025940 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 13 45316 -0.184505 0.191595 0.2738961 0.0024340 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 14 45317 -0.186205 0.195595 0.2715421 0.0022880 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 15 45318 -0.187805 0.199595 0.2693201 0.0021590 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 16 45319 -0.189305 0.203595 0.2672101 0.0020710 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 17 45320 -0.190804 0.207596 0.2651621 0.0020370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 18 45321 -0.192104 0.211696 0.2631171 0.0020600 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 19 45322 -0.193304 0.215696 0.2610111 0.0021380 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 20 45323 -0.194503 0.219697 0.2588171 0.0022590 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 21 45324 -0.195603 0.223597 0.2564851 0.0024050 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 22 45325 -0.196503 0.227397 0.2539940 0.0025610 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 23 45326 -0.197403 0.230997 0.2513570 0.0027080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 24 45327 -0.198202 0.234598 0.2485770 0.0028380 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 25 45328 -0.198902 0.237998 0.2457090 0.0029060 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 26 45329 -0.199502 0.241398 0.2428000 0.0029010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 27 45330 -0.200102 0.244498 0.2399350 0.0028140 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 28 45331 -0.200701 0.247599 0.2371910 0.0026660 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 29 45332 -0.201301 0.250599 0.2346080 0.0025030 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 30 45333 -0.201801 0.253399 0.2321700 0.0023890 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1982 12 31 45334 -0.202300 0.256100 0.2298089 0.0023600 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 1 45335 -0.202900 0.258900 0.2274139 0.0024463 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 2 45336 -0.203600 0.261700 0.2248920 0.0026048 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 3 45337 -0.204300 0.264600 0.2221998 0.0027665 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 4 45338 -0.204999 0.267501 0.2193742 0.0028935 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 5 45339 -0.205799 0.270501 0.2164497 0.0029306 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 6 45340 -0.206699 0.273501 0.2135318 0.0028918 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 7 45341 -0.207499 0.276701 0.2106995 0.0027831 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 8 45342 -0.208298 0.279902 0.2079900 0.0026310 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 9 45343 -0.208998 0.283102 0.2054331 0.0024722 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 10 45344 -0.209598 0.286502 0.2030334 0.0023300 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 11 45345 -0.210097 0.289903 0.2007747 0.0022029 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 12 45346 -0.210597 0.293403 0.1986043 0.0021456 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 13 45347 -0.210897 0.296903 0.1964667 0.0021487 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 14 45348 -0.210997 0.300603 0.1942883 0.0022175 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 15 45349 -0.210996 0.304304 0.1920135 0.0023408 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 16 45350 -0.210896 0.308004 0.1895914 0.0025097 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 17 45351 -0.210696 0.311804 0.1869842 0.0027080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 18 45352 -0.210296 0.315604 0.1841722 0.0029159 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 19 45353 -0.209695 0.319405 0.1811458 0.0031036 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 20 45354 -0.209095 0.323305 0.1779643 0.0032536 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 21 45355 -0.208295 0.327205 0.1746630 0.0033404 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 22 45356 -0.207494 0.331106 0.1712927 0.0033797 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 23 45357 -0.206594 0.334906 0.1679259 0.0033529 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 24 45358 -0.205594 0.338706 0.1646172 0.0032463 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 25 45359 -0.204594 0.342506 0.1614335 0.0031099 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 26 45360 -0.203493 0.346207 0.1583904 0.0029847 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 27 45361 -0.202393 0.349907 0.1554486 0.0029252 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 28 45362 -0.201193 0.353607 0.1525037 0.0029729 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 29 45363 -0.199893 0.357307 0.1494700 0.0031174 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 30 45364 -0.198692 0.360908 0.1462532 0.0033080 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 1 31 45365 -0.197392 0.364508 0.1428617 0.0034757 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 1 45366 -0.195992 0.368108 0.1393290 0.0035632 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 2 45367 -0.194691 0.371609 0.1357705 0.0035361 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 3 45368 -0.193491 0.375109 0.1322885 0.0034244 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 4 45369 -0.192011 0.378489 0.1289596 0.0032312 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 5 45370 -0.190281 0.381799 0.1258336 0.0030265 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 6 45371 -0.188530 0.385050 0.1229055 0.0028417 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 7 45372 -0.187210 0.388300 0.1201407 0.0027138 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 8 45373 -0.186400 0.391610 0.1175005 0.0025797 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 9 45374 -0.185839 0.394781 0.1149700 0.0024856 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 10 45375 -0.185199 0.397891 0.1125113 0.0024393 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 11 45376 -0.184289 0.401061 0.1100726 0.0024479 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 12 45377 -0.183029 0.404401 0.1075981 0.0025093 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 13 45378 -0.181618 0.407942 0.1050423 0.0026086 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 14 45379 -0.180218 0.411662 0.1023750 0.0027277 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 15 45380 -0.178908 0.415442 0.0995907 0.0028415 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 16 45381 -0.177608 0.419162 0.0967034 0.0029353 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 17 45382 -0.176317 0.422683 0.0937352 0.0030028 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 18 45383 -0.175067 0.426003 0.0907174 0.0030316 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 19 45384 -0.173927 0.429183 0.0876923 0.0030148 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 20 45385 -0.172916 0.432374 0.0847063 0.0029469 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 21 45386 -0.171886 0.435494 0.0818097 0.0028472 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 22 45387 -0.170716 0.438474 0.0790093 0.0027589 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 23 45388 -0.169096 0.441194 0.0762733 0.0027231 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 24 45389 -0.166965 0.443665 0.0735310 0.0027793 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 25 45390 -0.164705 0.446165 0.0706779 0.0029386 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 26 45391 -0.162465 0.449105 0.0676288 0.0031680 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 27 45392 -0.160365 0.452315 0.0643376 0.0034109 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 2 28 45393 -0.158474 0.455496 0.0608254 0.0035992 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 1 45394 -0.156974 0.458516 0.0571754 0.0036714 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 2 45395 -0.155894 0.461536 0.0535217 0.0036007 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 3 45396 -0.155253 0.464737 0.0500042 0.0034090 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 4 45397 -0.154953 0.468177 0.0467206 0.0031565 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 5 45398 -0.154413 0.471767 0.0436929 0.0029006 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 6 45399 -0.153143 0.475227 0.0409113 0.0026697 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 7 45400 -0.150992 0.478398 0.0383385 0.0024904 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 8 45401 -0.148142 0.481308 0.0359107 0.0023821 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 9 45402 -0.144642 0.483888 0.0335549 0.0023546 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 10 45403 -0.141102 0.486308 0.0311825 0.0024068 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 11 45404 -0.137931 0.488659 0.0287226 0.0025209 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 12 45405 -0.135201 0.491139 0.0261271 0.0026786 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 13 45406 -0.132881 0.493769 0.0233586 0.0028554 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 14 45407 -0.130630 0.496500 0.0204153 0.0030244 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 15 45408 -0.128350 0.499230 0.0173195 0.0031627 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 16 45409 -0.125910 0.501930 0.0141076 0.0032470 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 17 45410 -0.123120 0.504490 0.0108470 0.0032622 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 18 45411 -0.120009 0.506961 0.0076067 0.0031972 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 19 45412 -0.116689 0.509381 0.0044712 0.0030711 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 20 45413 -0.113149 0.511721 0.0014743 0.0029183 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 21 45414 -0.109469 0.514031 -0.0013681 0.0027737 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 22 45415 -0.105658 0.516402 -0.0040875 0.0026802 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 23 45416 -0.101798 0.518912 -0.0067561 0.0026729 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 24 45417 -0.097968 0.521572 -0.0094672 0.0027641 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 25 45418 -0.094207 0.524353 -0.0123155 0.0029438 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 26 45419 -0.090457 0.527233 -0.0153706 0.0031681 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 27 45420 -0.086567 0.530053 -0.0186451 0.0033697 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 28 45421 -0.082337 0.532673 -0.0220837 0.0034975 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 29 45422 -0.077866 0.534994 -0.0256019 0.0035220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 30 45423 -0.073246 0.536874 -0.0290900 0.0034385 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 3 31 45424 -0.068696 0.538134 -0.0324519 0.0032737 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 1 45425 -0.064226 0.539034 -0.0356268 0.0030732 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 2 45426 -0.059975 0.540355 -0.0385999 0.0028764 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 3 45427 -0.055945 0.542105 -0.0413914 0.0027088 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 4 45428 -0.052045 0.544015 -0.0440363 0.0025902 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 5 45429 -0.048214 0.546036 -0.0465923 0.0025317 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 6 45430 -0.044434 0.548066 -0.0491202 0.0025306 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 7 45431 -0.040674 0.549966 -0.0516738 0.0025784 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 8 45432 -0.036764 0.551656 -0.0542924 0.0026533 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 9 45433 -0.032673 0.552987 -0.0569893 0.0027479 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 10 45434 -0.028333 0.554047 -0.0597917 0.0028638 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 11 45435 -0.023623 0.554877 -0.0627125 0.0029743 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 12 45436 -0.018503 0.555547 -0.0657270 0.0030608 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 13 45437 -0.013272 0.556238 -0.0688113 0.0031033 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 14 45438 -0.008162 0.557018 -0.0719069 0.0030764 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 15 45439 -0.003242 0.557868 -0.0749399 0.0029779 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 16 45440 0.001369 0.558809 -0.0778466 0.0028367 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 17 45441 0.005649 0.559769 -0.0806106 0.0026962 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 18 45442 0.009589 0.560539 -0.0832528 0.0025837 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 19 45443 0.013229 0.561069 -0.0858050 0.0025208 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 20 45444 0.016670 0.561290 -0.0883266 0.0025315 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 21 45445 0.020150 0.561220 -0.0908989 0.0026280 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 22 45446 0.023750 0.560910 -0.0936029 0.0027829 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 23 45447 0.027640 0.560570 -0.0964682 0.0029463 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 24 45448 0.031801 0.560291 -0.0994786 0.0030672 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 25 45449 0.036011 0.559991 -0.1025721 0.0031065 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 26 45450 0.040231 0.559661 -0.1056543 0.0030512 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 27 45451 0.044362 0.559392 -0.1086421 0.0029082 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 28 45452 0.048262 0.559182 -0.1114512 0.0026951 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 29 45453 0.052082 0.558962 -0.1140275 0.0024445 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 4 30 45454 0.055932 0.558792 -0.1163480 0.0022149 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 1 45455 0.059723 0.558613 -0.1184737 0.0020511 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 2 45456 0.063483 0.558413 -0.1204711 0.0019628 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 3 45457 0.067173 0.558073 -0.1224207 0.0019583 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 4 45458 0.070714 0.557554 -0.1244086 0.0020103 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 5 45459 0.074124 0.556904 -0.1264583 0.0020884 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 6 45460 0.077494 0.556104 -0.1285981 0.0022016 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 7 45461 0.080834 0.555144 -0.1308660 0.0023403 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 8 45462 0.084365 0.554225 -0.1332768 0.0024890 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 9 45463 0.088285 0.553445 -0.1358366 0.0026293 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 10 45464 0.092535 0.552685 -0.1385196 0.0027322 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 11 45465 0.097075 0.551955 -0.1412763 0.0027786 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 12 45466 0.101556 0.551046 -0.1440478 0.0027480 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 13 45467 0.105996 0.549976 -0.1467500 0.0026396 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 14 45468 0.110396 0.548896 -0.1493171 0.0024932 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 15 45469 0.114747 0.547907 -0.1517448 0.0023597 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 16 45470 0.119037 0.546907 -0.1540603 0.0022797 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 17 45471 0.123267 0.545927 -0.1563364 0.0022734 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 18 45472 0.127387 0.545037 -0.1586395 0.0023433 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 19 45473 0.131498 0.544218 -0.1610444 0.0024749 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 20 45474 0.135688 0.543378 -0.1635937 0.0026168 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 21 45475 0.140008 0.542298 -0.1662661 0.0027254 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 22 45476 0.144378 0.540928 -0.1690196 0.0027742 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 23 45477 0.148809 0.539329 -0.1717842 0.0027462 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 24 45478 0.153249 0.537449 -0.1744822 0.0026483 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 25 45479 0.157549 0.535199 -0.1770601 0.0024834 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 26 45480 0.161710 0.532770 -0.1794382 0.0022663 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 27 45481 0.165730 0.530200 -0.1815952 0.0020547 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 28 45482 0.169640 0.527600 -0.1835600 0.0018881 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 29 45483 0.173250 0.525260 -0.1853901 0.0017825 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 30 45484 0.176631 0.523041 -0.1871457 0.0017367 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 5 31 45485 0.179901 0.520811 -0.1888850 0.0017562 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 1 45486 0.183151 0.518481 -0.1906756 0.0018391 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 2 45487 0.186571 0.515911 -0.1925776 0.0019650 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 3 45488 0.189962 0.513212 -0.1946124 0.0021005 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 4 45489 0.193262 0.510282 -0.1967801 0.0022276 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 5 45490 0.196442 0.507142 -0.1990622 0.0023382 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 6 45491 0.199323 0.503963 -0.2014437 0.0024212 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 7 45492 0.201803 0.500843 -0.2038866 0.0024535 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 8 45493 0.203753 0.497873 -0.2063268 0.0024205 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 9 45494 0.205573 0.494933 -0.2087029 0.0023220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 10 45495 0.207534 0.491944 -0.2109519 0.0021748 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 11 45496 0.209904 0.488734 -0.2130523 0.0020225 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 12 45497 0.212724 0.485454 -0.2150155 0.0019149 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 13 45498 0.215994 0.482224 -0.2169154 0.0019022 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 14 45499 0.219655 0.479175 -0.2188550 0.0019873 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 15 45500 0.223475 0.476435 -0.2209165 0.0021373 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 16 45501 0.227245 0.473995 -0.2231365 0.0023014 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 17 45502 0.230716 0.471776 -0.2255070 0.0024257 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 18 45503 0.233946 0.469556 -0.2279622 0.0024718 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 19 45504 0.236956 0.467116 -0.2304195 0.0024277 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 20 45505 0.239676 0.464156 -0.2327899 0.0023014 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 21 45506 0.242327 0.460927 -0.2350016 0.0021152 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 22 45507 0.245017 0.457487 -0.2370091 0.0018954 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 23 45508 0.247827 0.454067 -0.2387940 0.0016741 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 24 45509 0.250617 0.450737 -0.2403662 0.0014800 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 25 45510 0.253158 0.447708 -0.2417704 0.0013387 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 26 45511 0.255388 0.444878 -0.2430647 0.0012585 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 27 45512 0.257458 0.442008 -0.2443083 0.0012370 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 28 45513 0.259469 0.438959 -0.2455579 0.0012679 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 29 45514 0.261489 0.435499 -0.2468588 0.0013250 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 6 30 45515 0.263519 0.431689 -0.2482162 0.0013972 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 1 45516 0.265649 0.427599 0.7503454 0.0015088 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 2 45517 0.268170 0.423320 0.7487712 0.0016268 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 3 45518 0.270870 0.418880 0.7471018 0.0017049 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 4 45519 0.273660 0.414320 0.7453772 0.0017328 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 5 45520 0.276420 0.409700 0.7436557 0.0016983 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 6 45521 0.279041 0.405131 0.7420043 0.0016014 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 7 45522 0.281201 0.400701 0.7404733 0.0014495 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 8 45523 0.283151 0.396391 0.7391148 0.0012672 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 9 45524 0.284942 0.392272 0.7379310 0.0011089 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 10 45525 0.286612 0.388322 0.7368699 0.0010230 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 11 45526 0.288122 0.384632 0.7358474 0.0010512 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 12 45527 0.289592 0.381072 0.7347332 0.0011916 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 13 45528 0.291043 0.377643 0.7334473 0.0013944 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 14 45529 0.292673 0.374213 0.7319515 0.0015948 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 15 45530 0.294493 0.370693 0.7302855 0.0017361 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 16 45531 0.296613 0.366993 0.7285160 0.0017935 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 17 45532 0.299034 0.363084 0.7267334 0.0017511 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 18 45533 0.301554 0.359084 0.7250372 0.0016297 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 19 45534 0.304054 0.355034 0.7234833 0.0014820 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 20 45535 0.306465 0.350995 0.7220719 0.0013290 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 21 45536 0.308595 0.347145 0.7208153 0.0011842 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 22 45537 0.310385 0.343535 0.7196876 0.0010643 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 23 45538 0.311875 0.340065 0.7186684 0.0009912 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 24 45539 0.313186 0.336686 0.7176849 0.0009849 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 25 45540 0.314306 0.333246 0.7166795 0.0010368 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 26 45541 0.315306 0.329636 0.7155956 0.0011406 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 27 45542 0.316267 0.325927 0.7143883 0.0012752 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 28 45543 0.317297 0.322167 0.7130414 0.0014162 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 29 45544 0.318567 0.318377 0.7115604 0.0015520 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 30 45545 0.319827 0.314447 0.7099479 0.0016728 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 7 31 45546 0.320758 0.310288 0.7082291 0.0017607 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 1 45547 0.321328 0.305978 0.7064435 0.0018026 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 2 45548 0.321758 0.301518 0.7046435 0.0017910 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 3 45549 0.322178 0.296928 0.7028792 0.0017217 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 4 45550 0.322719 0.292279 0.7012119 0.0015979 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 5 45551 0.323309 0.287649 0.6996820 0.0014628 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 6 45552 0.323839 0.282949 0.6982671 0.0013792 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 7 45553 0.324180 0.278100 0.6968878 0.0013961 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 8 45554 0.324340 0.273330 0.6954366 0.0015274 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 9 45555 0.324420 0.268750 0.6938059 0.0017397 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 10 45556 0.324360 0.264660 0.6919539 0.0019675 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 11 45557 0.324221 0.260841 0.6898931 0.0021457 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 12 45558 0.324051 0.257041 0.6877026 0.0022254 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 13 45559 0.324211 0.252681 0.6854847 0.0021816 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 14 45560 0.324291 0.248211 0.6833738 0.0020255 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 15 45561 0.324102 0.243822 0.6814504 0.0018153 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 16 45562 0.323472 0.239732 0.6797436 0.0016125 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 17 45563 0.322362 0.235962 0.6782142 0.0014451 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 18 45564 0.321243 0.232153 0.6768354 0.0013074 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 19 45565 0.320303 0.228003 0.6755786 0.0012288 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 20 45566 0.319383 0.223513 0.6743567 0.0012274 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 21 45567 0.318263 0.218703 0.6731052 0.0012867 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 22 45568 0.316754 0.213604 0.6717679 0.0013970 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 23 45569 0.315344 0.208574 0.6703001 0.0015329 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 24 45570 0.314344 0.203934 0.6686976 0.0016685 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 25 45571 0.314014 0.199944 0.6669660 0.0017942 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 26 45572 0.313665 0.196155 0.6651203 0.0018895 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 27 45573 0.312835 0.192315 0.6632026 0.0019403 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 28 45574 0.311275 0.188305 0.6612571 0.0019472 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 29 45575 0.309266 0.184216 0.6593256 0.0019091 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 30 45576 0.306896 0.179966 0.6574539 0.0018455 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 8 31 45577 0.304236 0.175396 0.6556452 0.0017478 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 1 45578 0.301656 0.170626 0.6539592 0.0016170 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 2 45579 0.299247 0.165977 0.6523992 0.0015094 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 3 45580 0.297057 0.161627 0.6509125 0.0014752 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 4 45581 0.294907 0.157597 0.6494102 0.0015448 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 5 45582 0.292677 0.153887 0.6477877 0.0017207 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 6 45583 0.290348 0.150418 0.6459505 0.0019507 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 7 45584 0.287828 0.147148 0.6438944 0.0021736 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 8 45585 0.285118 0.143928 0.6416356 0.0023418 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 9 45586 0.282299 0.140659 0.6392589 0.0023835 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 10 45587 0.279549 0.137259 0.6369144 0.0022976 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 11 45588 0.277119 0.133469 0.6346932 0.0021211 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 12 45589 0.274909 0.129409 0.6326824 0.0018916 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 13 45590 0.272850 0.125210 0.6309019 0.0016638 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 14 45591 0.270800 0.120950 0.6293371 0.0014879 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 15 45592 0.268600 0.116950 0.6279028 0.0013896 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 16 45593 0.266200 0.113300 0.6265332 0.0013531 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 17 45594 0.263621 0.109961 0.6251761 0.0013762 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 18 45595 0.260841 0.106811 0.6237629 0.0014580 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 19 45596 0.257811 0.103711 0.6222464 0.0015790 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 20 45597 0.254472 0.100492 0.6205975 0.0017283 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 21 45598 0.250882 0.097092 0.6187916 0.0018813 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 22 45599 0.247072 0.093592 0.6168443 0.0020073 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 23 45600 0.243192 0.090132 0.6147933 0.0020889 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 24 45601 0.239413 0.086843 0.6126866 0.0021129 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 25 45602 0.235813 0.083833 0.6105879 0.0020753 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 26 45603 0.232363 0.081123 0.6085536 0.0019836 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 27 45604 0.229063 0.078653 0.6066332 0.0018587 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 28 45605 0.225924 0.076304 0.6048375 0.0017451 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 29 45606 0.222774 0.073714 0.6031320 0.0016796 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 9 30 45607 0.219474 0.070734 0.6014558 0.0016896 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 1 45608 0.216015 0.067415 0.5997207 0.0017986 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 2 45609 0.212515 0.063975 0.5978235 0.0020072 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 3 45610 0.209025 0.060675 0.5956803 0.0022819 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 4 45611 0.205595 0.057725 0.5932548 0.0025628 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 5 45612 0.202266 0.055266 0.5905749 0.0027775 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 6 45613 0.199076 0.053246 0.5877388 0.0028687 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 7 45614 0.195866 0.051366 0.5848843 0.0028062 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 8 45615 0.192526 0.049426 0.5821668 0.0026117 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 9 45616 0.189007 0.047287 0.5796833 0.0023516 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 10 45617 0.185277 0.045027 0.5774653 0.0020872 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 11 45618 0.181387 0.042777 0.5754933 0.0018609 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 12 45619 0.177468 0.040688 0.5737200 0.0017165 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 13 45620 0.173558 0.038748 0.5720344 0.0016886 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 14 45621 0.169678 0.036878 0.5703185 0.0017136 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 15 45622 0.165848 0.035058 0.5685858 0.0017449 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 16 45623 0.161989 0.033379 0.5668136 0.0018095 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 17 45624 0.158099 0.032029 0.5649593 0.0019038 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 18 45625 0.154149 0.031009 0.5630045 0.0020188 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 19 45626 0.150040 0.029990 0.5609264 0.0021420 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 20 45627 0.145670 0.028680 0.5587332 0.0022466 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 21 45628 0.141030 0.026870 0.5564531 0.0023050 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 22 45629 0.136300 0.024800 0.5541459 0.0023007 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 23 45630 0.131601 0.022821 0.5518743 0.0022394 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 24 45631 0.127031 0.021251 0.5496828 0.0021410 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 25 45632 0.122551 0.020201 0.5475987 0.0020301 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 26 45633 0.118041 0.019551 0.5456149 0.0019497 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 27 45634 0.113372 0.019112 0.5436772 0.0019395 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 28 45635 0.108482 0.018722 0.5417047 0.0020184 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 29 45636 0.103502 0.018362 0.5396060 0.0021916 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 30 45637 0.098613 0.018013 0.5372935 0.0024468 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 10 31 45638 0.093963 0.017693 0.5347012 0.0027362 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 1 45639 0.089723 0.017373 0.5318293 0.0029935 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 2 45640 0.085863 0.017023 0.5287424 0.0031573 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 3 45641 0.082104 0.016654 0.5255558 0.0031930 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 4 45642 0.078154 0.016274 0.5223974 0.0031077 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 5 45643 0.073754 0.015864 0.5193714 0.0029162 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 6 45644 0.068824 0.015544 0.5165776 0.0026599 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 7 45645 0.063625 0.015285 0.5140458 0.0023977 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 8 45646 0.058365 0.015185 0.5117632 0.0021733 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 9 45647 0.053645 0.015165 0.5096739 0.0020376 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 10 45648 0.049536 0.015166 0.5076621 0.0020065 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 11 45649 0.045866 0.015086 0.5056380 0.0020469 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 12 45650 0.042286 0.015016 0.5035506 0.0021313 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 13 45651 0.038346 0.015226 0.5013634 0.0022538 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 14 45652 0.033857 0.015767 0.4990392 0.0023929 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 15 45653 0.028987 0.016517 0.4965799 0.0025225 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 16 45654 0.024247 0.017357 0.4940048 0.0026215 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 17 45655 0.019997 0.018167 0.4913533 0.0026715 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 18 45656 0.016098 0.019018 0.4886823 0.0026586 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 19 45657 0.012268 0.019938 0.4860595 0.0025765 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 20 45658 0.008158 0.020968 0.4835504 0.0024329 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 21 45659 0.003849 0.022029 0.4812060 0.0022543 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 22 45660 -0.000631 0.023039 0.4790402 0.0020739 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 23 45661 -0.005091 0.023889 0.4770381 0.0019465 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 24 45662 -0.009541 0.024619 0.4751150 0.0019220 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 25 45663 -0.014010 0.025370 0.4731607 0.0020010 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 26 45664 -0.018450 0.026200 0.4710852 0.0021596 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 27 45665 -0.022810 0.027120 0.4688292 0.0023567 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 28 45666 -0.027030 0.028110 0.4663778 0.0025372 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 29 45667 -0.031079 0.029171 0.4637758 0.0026504 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 11 30 45668 -0.034969 0.030301 0.4611109 0.0026651 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 1 45669 -0.038759 0.031571 0.4584829 0.0025722 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 2 45670 -0.042548 0.033012 0.4559977 0.0023975 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 3 45671 -0.046388 0.034482 0.4537068 0.0021826 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 4 45672 -0.050438 0.035882 0.4516330 0.0019652 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 5 45673 -0.054668 0.037192 0.4497635 0.0017790 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 6 45674 -0.058937 0.038363 0.4480520 0.0016473 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 7 45675 -0.063127 0.039433 0.4464437 0.0015699 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 8 45676 -0.067017 0.040433 0.4448884 0.0015609 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 9 45677 -0.070467 0.041513 0.4433036 0.0016192 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 10 45678 -0.073536 0.042764 0.4416367 0.0017194 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 11 45679 -0.076396 0.044364 0.4398579 0.0018485 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 12 45680 -0.079136 0.046294 0.4379403 0.0019915 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 13 45681 -0.081795 0.048555 0.4358837 0.0021225 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 14 45682 -0.084545 0.050945 0.4337070 0.0022216 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 15 45683 -0.087455 0.053325 0.4314572 0.0022668 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 16 45684 -0.090455 0.055565 0.4291936 0.0022490 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 17 45685 -0.093504 0.057586 0.4269803 0.0021587 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 18 45686 -0.096654 0.059496 0.4248931 0.0020087 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 19 45687 -0.099874 0.061486 0.4229682 0.0018416 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 20 45688 -0.103074 0.063736 0.4211981 0.0017121 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 21 45689 -0.106133 0.066327 0.4195154 0.0016695 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 22 45690 -0.108923 0.068977 0.4178220 0.0017341 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 23 45691 -0.111463 0.071507 0.4160144 0.0018945 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 24 45692 -0.113872 0.073798 0.4140157 0.0021083 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 25 45693 -0.116352 0.075708 0.4118017 0.0023196 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 26 45694 -0.118912 0.077348 0.4094005 0.0024728 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 27 45695 -0.121492 0.078928 0.4068896 0.0025280 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 28 45696 -0.124101 0.080659 0.4043797 0.0024750 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 29 45697 -0.126631 0.082759 0.4019680 0.0023364 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 30 45698 -0.128971 0.085349 0.3997242 0.0021441 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1983 12 31 45699 -0.131161 0.088359 0.3976841 0.0019372 0.000000 0.000000 0.002000 0.002000 0.0004000 0.0001500 0.001193 0.002000 1984 1 1 45700 -0.133568 0.092024 0.3957218 0.0018080 -0.000197 -0.001742 0.021976 0.019971 0.0000416 0.0000831 0.000324 0.000675 1984 1 2 45701 -0.134733 0.095798 0.3939836 0.0016412 -0.000016 -0.001346 0.013073 0.026078 0.0000416 0.0000416 0.000324 0.000675 1984 1 3 45702 -0.136973 0.098671 0.3924143 0.0015107 0.000132 -0.000956 0.007999 0.023448 0.0000416 0.0000416 0.000324 0.000675 1984 1 4 45703 -0.141010 0.100523 0.3909377 0.0014608 0.000206 -0.000685 0.002006 0.009231 0.0000416 0.0000416 0.000324 0.000675 1984 1 5 45704 -0.145629 0.102488 0.3894723 0.0014814 0.000191 -0.000506 0.001069 0.005059 0.0000416 0.0000416 0.000324 0.000675 1984 1 6 45705 -0.148961 0.105628 0.3879607 0.0015499 0.000092 -0.000363 0.001490 0.006549 0.0000416 0.0000415 0.000324 0.000675 1984 1 7 45706 -0.151258 0.109215 0.3863658 0.0016496 -0.000071 -0.000237 0.003102 0.009917 0.0000415 0.0000317 0.000324 0.000674 1984 1 8 45707 -0.153530 0.112197 0.3846630 0.0017661 -0.000262 -0.000157 0.002825 0.002387 0.0000218 0.0000313 0.000502 0.000387 1984 1 9 45708 -0.156238 0.114513 0.3828428 0.0018791 -0.000424 -0.000155 0.001074 0.000799 0.0000212 0.0000215 0.000533 0.000377 1984 1 10 45709 -0.159254 0.116745 0.3809192 0.0019616 -0.000488 -0.000247 0.001078 0.000803 0.0000212 0.0000212 0.000533 0.000377 1984 1 11 45710 -0.162160 0.119344 0.3789361 0.0019870 -0.000401 -0.000415 0.001308 0.000979 0.0000212 0.0000212 0.000533 0.000377 1984 1 12 45711 -0.164694 0.122102 0.3769622 0.0019369 -0.000148 -0.000629 0.003810 0.003500 0.0000212 0.0000455 0.000533 0.000377 1984 1 13 45712 -0.166579 0.124887 0.3750791 0.0018069 0.000224 -0.000846 0.005967 0.008514 0.0000699 0.0000916 0.000871 0.001299 1984 1 14 45713 -0.167365 0.128461 0.3733638 0.0016103 0.000614 -0.001020 0.012957 0.006460 0.0001620 0.0001160 0.000938 0.003930 1984 1 15 45714 -0.167441 0.133113 0.3718680 0.0013846 0.000898 -0.001113 0.010398 0.007261 0.0001620 0.0001620 0.000938 0.003931 1984 1 16 45715 -0.168838 0.137034 0.3705912 0.0011922 0.000973 -0.001111 0.008748 0.008586 0.0001620 0.0001620 0.000938 0.003931 1984 1 17 45716 -0.172462 0.139008 0.3694622 0.0011009 0.000797 -0.001025 0.013223 0.010016 0.0001620 0.0001620 0.000938 0.003931 1984 1 18 45717 -0.176615 0.140385 0.3683525 0.0011495 0.000400 -0.000893 0.015288 0.010065 0.0001620 0.0001620 0.000938 0.003931 1984 1 19 45718 -0.179514 0.142946 0.3671224 0.0013260 -0.000138 -0.000758 0.015617 0.010401 0.0001620 0.0001455 0.000938 0.003931 1984 1 20 45719 -0.181407 0.147061 0.3656721 0.0015753 -0.000713 -0.000655 0.019133 0.015302 0.0001291 0.0000903 0.000926 0.002527 1984 1 21 45720 -0.183782 0.151890 0.3639681 0.0018267 -0.001207 -0.000588 0.019335 0.015685 0.0000187 0.0000739 0.000451 0.000289 1984 1 22 45721 -0.187321 0.156332 0.3620413 0.0020203 -0.001499 -0.000535 0.018851 0.014807 0.0000187 0.0000187 0.000451 0.000289 1984 1 23 45722 -0.190956 0.159626 0.3599679 0.0021178 -0.001487 -0.000452 0.003606 0.002355 0.0000187 0.0000188 0.000451 0.000290 1984 1 24 45723 -0.193173 0.161554 0.3578499 0.0021003 -0.001135 -0.000305 0.001959 0.001358 0.0000189 0.0000195 0.000455 0.000292 1984 1 25 45724 -0.193783 0.162709 0.3558031 0.0019622 -0.000523 -0.000096 0.001334 0.000945 0.0000202 0.0000235 0.000483 0.000314 1984 1 26 45725 -0.194664 0.164364 0.3539458 0.0017180 0.000141 0.000126 0.001595 0.001163 0.0000282 0.0000338 0.000633 0.000440 1984 1 27 45726 -0.197894 0.168367 0.3523711 0.0014168 0.000551 0.000246 0.003403 0.002531 0.0000474 0.0000381 0.000885 0.000757 1984 1 28 45727 -0.201399 0.172718 0.3511021 0.0011369 0.000563 0.000217 0.004743 0.003549 0.0000481 0.0000362 0.000896 0.000910 1984 1 29 45728 -0.203692 0.175796 0.3500772 0.0009468 0.000279 0.000078 0.000922 0.001339 0.0000249 0.0000365 0.000587 0.000673 1984 1 30 45729 -0.205229 0.177871 0.3491832 0.0008725 -0.000066 -0.000102 0.000886 0.001291 0.0000249 0.0000249 0.000586 0.000672 1984 1 31 45730 -0.207154 0.179969 0.3483062 0.0008970 -0.000238 -0.000259 0.000898 0.001309 0.0000249 0.0000249 0.000586 0.000672 1984 2 1 45731 -0.209737 0.182565 0.3473666 0.0009860 -0.000145 -0.000376 0.002462 0.003369 0.0000249 0.0000478 0.000586 0.000672 1984 2 2 45732 -0.212356 0.185571 0.3463176 0.0011139 0.000145 -0.000463 0.005822 0.006082 0.0000707 0.0000642 0.000738 0.000608 1984 2 3 45733 -0.214399 0.189008 0.3451297 0.0012665 0.000481 -0.000520 0.001878 0.002153 0.0001035 0.0000871 0.000755 0.000603 1984 2 4 45734 -0.215989 0.193331 0.3437840 0.0014292 0.000707 -0.000534 0.001387 0.001597 0.0001035 0.0001035 0.000755 0.000603 1984 2 5 45735 -0.217642 0.198253 0.3422790 0.0015804 0.000738 -0.000489 0.001791 0.002045 0.0001035 0.0001034 0.000755 0.000603 1984 2 6 45736 -0.219516 0.201994 0.3406377 0.0016966 0.000579 -0.000381 0.002678 0.002998 0.0001034 0.0000772 0.000755 0.000603 1984 2 7 45737 -0.220782 0.204166 0.3389039 0.0017627 0.000312 -0.000239 0.005373 0.008001 0.0000510 0.0000765 0.000722 0.000554 1984 2 8 45738 -0.220802 0.206011 0.3371302 0.0017778 0.000047 -0.000105 0.004555 0.003400 0.0000495 0.0000503 0.000720 0.000550 1984 2 9 45739 -0.220337 0.209386 0.3353637 0.0017498 -0.000113 -0.000014 0.003358 0.001837 0.0000495 0.0000495 0.000720 0.000550 1984 2 10 45740 -0.221564 0.215357 0.3336427 0.0016857 -0.000109 0.000029 0.004027 0.002104 0.0000495 0.0000495 0.000720 0.000550 1984 2 11 45741 -0.224164 0.221829 0.3320001 0.0015895 0.000060 0.000051 0.010335 0.005986 0.0000495 0.0001024 0.000720 0.000551 1984 2 12 45742 -0.226256 0.226206 0.3304638 0.0014715 0.000340 0.000086 0.014113 0.010050 0.0001552 0.0003500 0.001280 0.001063 1984 2 13 45743 -0.227316 0.228675 0.3290441 0.0013616 0.000645 0.000144 0.005242 0.006404 0.0006505 0.0004030 0.001459 0.001263 1984 2 14 45744 -0.228024 0.231019 0.3277113 0.0013121 0.000892 0.000195 0.005165 0.006371 0.0006507 0.0006506 0.001459 0.001263 1984 2 15 45745 -0.229220 0.234296 0.3263790 0.0013771 0.001020 0.000182 0.005184 0.006405 0.0006507 0.0006498 0.001459 0.001263 1984 2 16 45746 -0.230914 0.237411 0.3249179 0.0015764 0.001005 0.000066 0.009193 0.010503 0.0006488 0.0004126 0.001459 0.001262 1984 2 17 45747 -0.232469 0.238879 0.3232055 0.0018703 0.000841 -0.000132 0.011759 0.011155 0.0001745 0.0004069 0.000912 0.000517 1984 2 18 45748 -0.233406 0.239208 0.3211860 0.0021716 0.000529 -0.000324 0.002888 0.008715 0.0001650 0.0001698 0.000879 0.000492 1984 2 19 45749 -0.233970 0.241780 0.3188989 0.0023844 0.000083 -0.000394 0.001659 0.005584 0.0001650 0.0001650 0.000879 0.000492 1984 2 20 45750 -0.234766 0.248687 0.3164683 0.0024421 -0.000433 -0.000276 0.002357 0.004641 0.0001650 0.0001643 0.000879 0.000492 1984 2 21 45751 -0.235985 0.255905 0.3140625 0.0023273 -0.000871 -0.000022 0.004971 0.004214 0.0001636 0.0000969 0.000878 0.000492 1984 2 22 45752 -0.237347 0.260121 0.3118448 0.0020714 -0.001023 0.000213 0.008419 0.003185 0.0000287 0.0000955 0.000564 0.000473 1984 2 23 45753 -0.238603 0.261965 0.3099295 0.0017413 -0.000736 0.000259 0.003008 0.002000 0.0000274 0.0000277 0.000544 0.000463 1984 2 24 45754 -0.240004 0.263628 0.3083536 0.0014197 -0.000042 0.000043 0.001596 0.001115 0.0000268 0.0000263 0.000513 0.000421 1984 2 25 45755 -0.242180 0.265921 0.3070694 0.0011818 0.000769 -0.000352 0.001797 0.000907 0.0000251 0.0000254 0.000448 0.000344 1984 2 26 45756 -0.244539 0.269329 0.3059635 0.0010669 0.001220 -0.000720 0.002505 0.000862 0.0000241 0.0000250 0.000415 0.000310 1984 2 27 45757 -0.246102 0.273924 0.3049079 0.0010709 0.001054 -0.000893 0.002542 0.000883 0.0000249 0.0000316 0.000429 0.000317 1984 2 28 45758 -0.246451 0.279199 0.3037965 0.0011664 0.000381 -0.000842 0.001636 0.001241 0.0000391 0.0000320 0.000879 0.000540 1984 2 29 45759 -0.245795 0.284453 0.3025552 0.0013214 -0.000450 -0.000650 0.001635 0.001243 0.0000392 0.0000391 0.000883 0.000541 1984 3 1 45760 -0.244890 0.289172 0.3011409 0.0015075 -0.001074 -0.000437 0.001695 0.001294 0.0000392 0.0000392 0.000883 0.000541 1984 3 2 45761 -0.244815 0.293289 0.2995359 0.0016991 -0.001321 -0.000275 0.004093 0.004348 0.0000391 0.0000308 0.000882 0.000541 1984 3 3 45762 -0.246195 0.297058 0.2977471 0.0018733 -0.001232 -0.000166 0.004786 0.007047 0.0000225 0.0000305 0.000424 0.000449 1984 3 4 45763 -0.248288 0.300785 0.2958019 0.0020103 -0.000946 -0.000080 0.001181 0.001017 0.0000219 0.0000222 0.000411 0.000444 1984 3 5 45764 -0.249394 0.304675 0.2937448 0.0020953 -0.000603 0.000014 0.000930 0.000791 0.0000219 0.0000219 0.000411 0.000444 1984 3 6 45765 -0.249003 0.308857 0.2916319 0.0021185 -0.000288 0.000122 0.001370 0.001152 0.0000219 0.0000219 0.000411 0.000444 1984 3 7 45766 -0.249120 0.313421 0.2895263 0.0020781 -0.000019 0.000227 0.003145 0.002430 0.0000219 0.0000343 0.000411 0.000444 1984 3 8 45767 -0.250055 0.317996 0.2874890 0.0019826 0.000214 0.000304 0.005023 0.003979 0.0000467 0.0000387 0.000581 0.000480 1984 3 9 45768 -0.249849 0.322058 0.2855679 0.0018507 0.000414 0.000334 0.002945 0.002282 0.0000555 0.0000511 0.000607 0.000483 1984 3 10 45769 -0.247430 0.325655 0.2837871 0.0017109 0.000567 0.000319 0.001817 0.001365 0.0000555 0.0000555 0.000607 0.000483 1984 3 11 45770 -0.245239 0.329783 0.2821364 0.0016005 0.000648 0.000272 0.001717 0.001291 0.0000555 0.0000555 0.000607 0.000483 1984 3 12 45771 -0.244488 0.334675 0.2805643 0.0015630 0.000621 0.000219 0.004834 0.004665 0.0000555 0.0000448 0.000606 0.000483 1984 3 13 45772 -0.243773 0.339444 0.2789765 0.0016356 0.000460 0.000175 0.005324 0.010350 0.0000341 0.0000445 0.000376 0.000317 1984 3 14 45773 -0.242043 0.343240 0.2772531 0.0018296 0.000174 0.000140 0.000950 0.001626 0.0000336 0.0000351 0.000370 0.000312 1984 3 15 45774 -0.239593 0.345957 0.2752848 0.0021140 -0.000177 0.000102 0.000928 0.001582 0.0000361 0.0000425 0.000396 0.000336 1984 3 16 45775 -0.237582 0.348369 0.2730150 0.0024212 -0.000488 0.000044 0.001335 0.002230 0.0000514 0.0000664 0.000548 0.000489 1984 3 17 45776 -0.236894 0.351912 0.2704628 0.0026643 -0.000634 -0.000049 0.003088 0.004806 0.0000968 0.0000607 0.000904 0.001031 1984 3 18 45777 -0.236449 0.356657 0.2677323 0.0027708 -0.000573 -0.000180 0.006182 0.010707 0.0000700 0.0000610 0.000830 0.000900 1984 3 19 45778 -0.234827 0.361697 0.2649766 0.0027189 -0.000381 -0.000345 0.001313 0.001610 0.0000252 0.0000476 0.000371 0.000322 1984 3 20 45779 -0.232958 0.366932 0.2623403 0.0025398 -0.000199 -0.000528 0.000896 0.001081 0.0000252 0.0000252 0.000370 0.000321 1984 3 21 45780 -0.232549 0.372267 0.2599208 0.0022927 -0.000157 -0.000714 0.001302 0.001479 0.0000252 0.0000252 0.000370 0.000321 1984 3 22 45781 -0.233445 0.376646 0.2577545 0.0020387 -0.000300 -0.000884 0.002840 0.002450 0.0000252 0.0000269 0.000370 0.000321 1984 3 23 45782 -0.233638 0.380027 0.2558253 0.0018217 -0.000588 -0.001011 0.004335 0.005836 0.0000286 0.0000271 0.000498 0.000382 1984 3 24 45783 -0.231462 0.383470 0.2540840 0.0016651 -0.000923 -0.001076 0.002103 0.002183 0.0000290 0.0000288 0.000516 0.000389 1984 3 25 45784 -0.227758 0.387569 0.2524659 0.0015774 -0.001204 -0.001070 0.001082 0.001054 0.0000290 0.0000290 0.000516 0.000389 1984 3 26 45785 -0.225408 0.391789 0.2509024 0.0015588 -0.001366 -0.000998 0.001056 0.001026 0.0000290 0.0000290 0.000516 0.000389 1984 3 27 45786 -0.224916 0.395653 0.2493260 0.0016059 -0.001387 -0.000876 0.003432 0.003837 0.0000290 0.0000290 0.000516 0.000389 1984 3 28 45787 -0.224445 0.399146 0.2476747 0.0017096 -0.001282 -0.000729 0.006216 0.014508 0.0000290 0.0000290 0.000516 0.000389 1984 3 29 45788 -0.222919 0.402320 0.2458989 0.0018510 -0.001082 -0.000576 0.011618 0.016026 0.0000290 0.0000290 0.000516 0.000389 1984 3 30 45789 -0.221069 0.405143 0.2439734 0.0020005 -0.000825 -0.000433 0.016910 0.016081 0.0000290 0.0000322 0.000516 0.000389 1984 3 31 45790 -0.219732 0.407880 0.2419070 0.0021222 -0.000545 -0.000305 0.016805 0.015889 0.0000354 0.0000322 0.000646 0.000533 1984 4 1 45791 -0.218402 0.411275 0.2397451 0.0021850 -0.000273 -0.000194 0.006760 0.006375 0.0000354 0.0000354 0.000646 0.000533 1984 4 2 45792 -0.216033 0.415805 0.2375580 0.0021729 -0.000034 -0.000114 0.005932 0.005118 0.0000354 0.0000354 0.000646 0.000533 1984 4 3 45793 -0.212467 0.420850 0.2354210 0.0020900 0.000152 -0.000085 0.002918 0.001905 0.0000354 0.0000354 0.000646 0.000533 1984 4 4 45794 -0.209380 0.424497 0.2333961 0.0019557 0.000273 -0.000130 0.001625 0.001009 0.0000354 0.0000354 0.000646 0.000533 1984 4 5 45795 -0.208591 0.425749 0.2315201 0.0017971 0.000327 -0.000257 0.002243 0.001366 0.0000354 0.0000354 0.000646 0.000533 1984 4 6 45796 -0.208476 0.428061 0.2298027 0.0016435 0.000331 -0.000432 0.004851 0.002664 0.0000354 0.0000441 0.000647 0.000533 1984 4 7 45797 -0.206306 0.433005 0.2282238 0.0015256 0.000315 -0.000577 0.004325 0.003216 0.0000527 0.0000458 0.001305 0.000695 1984 4 8 45798 -0.201470 0.438319 0.2267324 0.0014753 0.000321 -0.000596 0.002683 0.002361 0.0000562 0.0000545 0.001559 0.000720 1984 4 9 45799 -0.196220 0.441796 0.2252454 0.0015205 0.000382 -0.000436 0.001625 0.001554 0.0000562 0.0000562 0.001559 0.000720 1984 4 10 45800 -0.194391 0.444777 0.2236576 0.0016755 0.000489 -0.000145 0.001611 0.001568 0.0000562 0.0000585 0.001559 0.000720 1984 4 11 45801 -0.193532 0.447857 0.2218618 0.0019283 0.000567 0.000098 0.004076 0.004216 0.0000608 0.0001359 0.001664 0.000762 1984 4 12 45802 -0.189048 0.450593 0.2197808 0.0022337 0.000507 0.000089 0.005876 0.005463 0.0002157 0.0000718 0.002242 0.001270 1984 4 13 45803 -0.183781 0.454478 0.2173975 0.0025196 0.000265 -0.000267 0.002929 0.001857 0.0000829 0.0001294 0.000935 0.000834 1984 4 14 45804 -0.182343 0.460361 0.2147717 0.0027073 -0.000054 -0.000860 0.001509 0.000952 0.0000431 0.0000593 0.000492 0.000498 1984 4 15 45805 -0.181830 0.465405 0.2120325 0.0027427 -0.000204 -0.001362 0.001264 0.000798 0.0000357 0.0000407 0.000409 0.000421 1984 4 16 45806 -0.179188 0.468269 0.2093390 0.0026213 -0.000050 -0.001577 0.002609 0.001828 0.0000383 0.0000792 0.000438 0.000452 1984 4 17 45807 -0.175112 0.470475 0.2068281 0.0023898 0.000295 -0.001502 0.004032 0.003379 0.0001227 0.0000414 0.001682 0.001664 1984 4 18 45808 -0.171716 0.473554 0.2045733 0.0021221 0.000551 -0.001220 0.002266 0.001542 0.0000445 0.0000726 0.000647 0.000650 1984 4 19 45809 -0.169537 0.476764 0.2025743 0.0018843 0.000440 -0.000804 0.001187 0.000803 0.0000224 0.0000314 0.000325 0.000320 1984 4 20 45810 -0.166531 0.479016 0.2007800 0.0017142 -0.000194 -0.000210 0.001101 0.000816 0.0000182 0.0000200 0.000254 0.000226 1984 4 21 45811 -0.162604 0.481216 0.1991160 0.0016257 -0.000777 0.000184 0.000932 0.000749 0.0000176 0.0000180 0.000239 0.000201 1984 4 22 45812 -0.159653 0.484577 0.1975003 0.0016207 -0.000735 0.000079 0.001065 0.000869 0.0000179 0.0000263 0.000242 0.000203 1984 4 23 45813 -0.157905 0.487893 0.1958510 0.0016900 -0.000147 -0.000321 0.002449 0.002262 0.0000349 0.0000269 0.000574 0.000533 1984 4 24 45814 -0.156203 0.489851 0.1941029 0.0018058 0.000546 -0.000610 0.001747 0.001610 0.0000359 0.0000404 0.000596 0.000558 1984 4 25 45815 -0.153300 0.491719 0.1922292 0.0019258 0.000919 -0.000505 0.001703 0.001567 0.0000459 0.0000813 0.000757 0.000711 1984 4 26 45816 -0.149133 0.494800 0.1902493 0.0020154 0.000907 -0.000160 0.003166 0.004176 0.0001267 0.0000632 0.001387 0.001376 1984 4 27 45817 -0.144863 0.498405 0.1882045 0.0020679 0.000687 0.000021 0.001787 0.003211 0.0000805 0.0000864 0.000748 0.000736 1984 4 28 45818 -0.141958 0.501861 0.1861266 0.0020997 0.000347 -0.000211 0.001497 0.001760 0.0000462 0.0000546 0.000566 0.000583 1984 4 29 45819 -0.140135 0.504828 0.1840236 0.0021218 0.000013 -0.000733 0.001459 0.001066 0.0000286 0.0000370 0.000438 0.000483 1984 4 30 45820 -0.137826 0.507505 0.1819045 0.0021168 -0.000175 -0.001194 0.001464 0.001046 0.0000279 0.0000283 0.000431 0.000477 1984 5 1 45821 -0.134096 0.510478 0.1798111 0.0020544 -0.000179 -0.001348 0.003137 0.002239 0.0000279 0.0000502 0.000431 0.000477 1984 5 2 45822 -0.129291 0.514006 0.1778116 0.0019229 -0.000037 -0.001169 0.015961 0.011522 0.0000724 0.0000643 0.001256 0.000888 1984 5 3 45823 -0.124556 0.517538 0.1759713 0.0017408 0.000170 -0.000792 0.016658 0.008562 0.0001006 0.0000865 0.002787 0.001036 1984 5 4 45824 -0.120940 0.519969 0.1743234 0.0015502 0.000328 -0.000401 0.008948 0.006083 0.0001006 0.0001006 0.002788 0.001036 1984 5 5 45825 -0.118380 0.521121 0.1728523 0.0014034 0.000347 -0.000126 0.005457 0.007366 0.0001006 0.0001005 0.002788 0.001036 1984 5 6 45826 -0.115349 0.522592 0.1714895 0.0013467 0.000208 0.000010 0.004621 0.008888 0.0001004 0.0000634 0.002780 0.001035 1984 5 7 45827 -0.110829 0.525269 0.1701282 0.0014064 -0.000026 0.000050 0.007800 0.004043 0.0000261 0.0000625 0.000549 0.000340 1984 5 8 45828 -0.105254 0.528474 0.1686483 0.0015813 -0.000252 0.000052 0.003447 0.001938 0.0000245 0.0000253 0.000504 0.000314 1984 5 9 45829 -0.100067 0.531227 0.1669463 0.0018387 -0.000368 0.000051 0.001685 0.000995 0.0000245 0.0000245 0.000504 0.000314 1984 5 10 45830 -0.096491 0.533644 0.1649674 0.0021161 -0.000319 0.000056 0.001943 0.001155 0.0000245 0.0000245 0.000504 0.000314 1984 5 11 45831 -0.093823 0.535675 0.1627314 0.0023331 -0.000111 0.000060 0.003987 0.002397 0.0000245 0.0000291 0.000504 0.000314 1984 5 12 45832 -0.090851 0.537231 0.1603381 0.0024175 0.000184 0.000051 0.004664 0.004375 0.0000338 0.0000306 0.000398 0.000407 1984 5 13 45833 -0.087477 0.538719 0.1579437 0.0023349 0.000469 0.000026 0.001508 0.001821 0.0000366 0.0000352 0.000386 0.000433 1984 5 14 45834 -0.084289 0.540587 0.1557116 0.0021075 0.000654 -0.000010 0.001504 0.001817 0.0000366 0.0000366 0.000386 0.000433 1984 5 15 45835 -0.081584 0.542866 0.1537544 0.0018071 0.000693 -0.000048 0.001517 0.001832 0.0000366 0.0000366 0.000386 0.000433 1984 5 16 45836 -0.078639 0.544846 0.1520996 0.0015193 0.000596 -0.000081 0.003687 0.004157 0.0000366 0.0000325 0.000386 0.000433 1984 5 17 45837 -0.074506 0.545762 0.1506978 0.0013049 0.000419 -0.000106 0.009702 0.005915 0.0000283 0.0000322 0.000333 0.000385 1984 5 18 45838 -0.069386 0.545932 0.1494611 0.0011834 0.000231 -0.000131 0.002706 0.001244 0.0000278 0.0000281 0.000330 0.000382 1984 5 19 45839 -0.065222 0.547099 0.1483010 0.0011451 0.000091 -0.000177 0.001748 0.000801 0.0000278 0.0000278 0.000330 0.000382 1984 5 20 45840 -0.063227 0.550106 0.1471456 0.0011713 0.000023 -0.000258 0.002299 0.001091 0.0000278 0.0000278 0.000330 0.000382 1984 5 21 45841 -0.061101 0.552742 0.1459398 0.0012458 0.000013 -0.000377 0.003385 0.001779 0.0000278 0.0000283 0.000330 0.000382 1984 5 22 45842 -0.056948 0.553908 0.1446429 0.0013513 0.000022 -0.000513 0.006890 0.004196 0.0000288 0.0000284 0.000385 0.000467 1984 5 23 45843 -0.050967 0.554391 0.1432338 0.0014648 0.000008 -0.000630 0.003460 0.002189 0.0000289 0.0000289 0.000390 0.000477 1984 5 24 45844 -0.045095 0.555228 0.1417177 0.0015600 -0.000058 -0.000688 0.001856 0.001182 0.0000289 0.0000289 0.000390 0.000477 1984 5 25 45845 -0.041435 0.556203 0.1401250 0.0016172 -0.000180 -0.000661 0.002057 0.001314 0.0000289 0.0000289 0.000390 0.000477 1984 5 26 45846 -0.039082 0.556900 0.1384996 0.0016281 -0.000337 -0.000552 0.006454 0.004334 0.0000289 0.0000266 0.000390 0.000477 1984 5 27 45847 -0.035662 0.557354 0.1368879 0.0015923 -0.000487 -0.000394 0.007569 0.004868 0.0000244 0.0000265 0.000331 0.000571 1984 5 28 45848 -0.030605 0.557913 0.1353350 0.0015114 -0.000585 -0.000242 0.001300 0.000765 0.0000241 0.0000242 0.000327 0.000583 1984 5 29 45849 -0.024974 0.558903 0.1338832 0.0013898 -0.000592 -0.000150 0.001264 0.000744 0.0000241 0.0000241 0.000327 0.000583 1984 5 30 45850 -0.019984 0.560274 0.1325669 0.0012403 -0.000497 -0.000148 0.001281 0.000754 0.0000241 0.0000241 0.000327 0.000583 1984 5 31 45851 -0.015682 0.561433 0.1314024 0.0010885 -0.000316 -0.000231 0.003326 0.001994 0.0000241 0.0000249 0.000327 0.000582 1984 6 1 45852 -0.011317 0.561753 0.1303750 0.0009711 -0.000100 -0.000364 0.007552 0.005754 0.0000258 0.0000250 0.000393 0.000465 1984 6 2 45853 -0.006564 0.561359 0.1294327 0.0009247 0.000085 -0.000491 0.001794 0.001673 0.0000260 0.0000259 0.000401 0.000458 1984 6 3 45854 -0.002101 0.561325 0.1284923 0.0009720 0.000176 -0.000573 0.001258 0.001184 0.0000260 0.0000260 0.000401 0.000458 1984 6 4 45855 0.001575 0.562292 0.1274589 0.0011106 0.000138 -0.000599 0.001744 0.001640 0.0000260 0.0000260 0.000401 0.000458 1984 6 5 45856 0.005278 0.563209 0.1262528 0.0013110 -0.000018 -0.000592 0.003066 0.002871 0.0000260 0.0000329 0.000402 0.000458 1984 6 6 45857 0.009748 0.563185 0.1248350 0.0015226 -0.000240 -0.000591 0.007617 0.004683 0.0000399 0.0000341 0.000555 0.000443 1984 6 7 45858 0.014993 0.562276 0.1232230 0.0016872 -0.000451 -0.000631 0.003427 0.002061 0.0000422 0.0000411 0.000576 0.000441 1984 6 8 45859 0.020430 0.561284 0.1214909 0.0017548 -0.000579 -0.000726 0.001861 0.001123 0.0000422 0.0000422 0.000576 0.000441 1984 6 9 45860 0.025363 0.561082 0.1197528 0.0016998 -0.000582 -0.000865 0.001886 0.001139 0.0000422 0.0000422 0.000576 0.000441 1984 6 10 45861 0.029711 0.561180 0.1181308 0.0015307 -0.000469 -0.001017 0.006375 0.003942 0.0000422 0.0000340 0.000576 0.000441 1984 6 11 45862 0.033831 0.560507 0.1167201 0.0012887 -0.000290 -0.001147 0.006195 0.006024 0.0000258 0.0000337 0.000456 0.000440 1984 6 12 45863 0.037857 0.559136 0.1155636 0.0010324 -0.000112 -0.001226 0.000863 0.001015 0.0000252 0.0000255 0.000449 0.000440 1984 6 13 45864 0.041658 0.558023 0.1146455 0.0008175 0.000002 -0.001234 0.000812 0.000955 0.0000252 0.0000252 0.000449 0.000440 1984 6 14 45865 0.045092 0.557847 0.1139042 0.0006793 0.000020 -0.001164 0.000858 0.001010 0.0000252 0.0000252 0.000449 0.000440 1984 6 15 45866 0.048302 0.558087 0.1132567 0.0006283 -0.000053 -0.001025 0.003024 0.003446 0.0000252 0.0000234 0.000449 0.000440 1984 6 16 45867 0.051696 0.557731 0.1126199 0.0006555 -0.000188 -0.000838 0.008083 0.006458 0.0000216 0.0000233 0.000387 0.000329 1984 6 17 45868 0.055677 0.556730 0.1119247 0.0007424 -0.000344 -0.000634 0.001267 0.001014 0.0000214 0.0000215 0.000383 0.000322 1984 6 18 45869 0.060344 0.556185 0.1111225 0.0008660 -0.000488 -0.000452 0.001110 0.000887 0.0000214 0.0000214 0.000383 0.000322 1984 6 19 45870 0.065398 0.556836 0.1101883 0.0010020 -0.000601 -0.000330 0.001539 0.001225 0.0000214 0.0000214 0.000383 0.000322 1984 6 20 45871 0.070326 0.557815 0.1091218 0.0011278 -0.000671 -0.000296 0.002669 0.002096 0.0000214 0.0000260 0.000383 0.000322 1984 6 21 45872 0.074398 0.557822 0.1079431 0.0012253 -0.000691 -0.000359 0.004104 0.003948 0.0000307 0.0000268 0.000510 0.000457 1984 6 22 45873 0.077392 0.556361 0.1066865 0.0012831 -0.000647 -0.000498 0.002370 0.002540 0.0000323 0.0000315 0.000529 0.000478 1984 6 23 45874 0.080004 0.554283 0.1053945 0.0012943 -0.000528 -0.000667 0.001352 0.001503 0.0000323 0.0000323 0.000529 0.000478 1984 6 24 45875 0.083482 0.553331 0.1041155 0.0012540 -0.000331 -0.000808 0.001338 0.001494 0.0000323 0.0000323 0.000529 0.000478 1984 6 25 45876 0.087842 0.553450 0.1029028 0.0011601 -0.000073 -0.000877 0.004861 0.005290 0.0000323 0.0000305 0.000528 0.000478 1984 6 26 45877 0.092147 0.553099 0.1018082 0.0010197 0.000215 -0.000864 0.007039 0.006493 0.0000287 0.0000303 0.000339 0.000691 1984 6 27 45878 0.096084 0.551563 0.1008687 0.0008546 0.000491 -0.000798 0.000970 0.000907 0.0000284 0.0000285 0.000331 0.000725 1984 6 28 45879 0.100188 0.549381 0.1000912 0.0007013 0.000719 -0.000735 0.000890 0.000834 0.0000284 0.0000284 0.000331 0.000725 1984 6 29 45880 0.105032 0.547454 0.0994430 0.0006000 0.000879 -0.000730 0.000929 0.000872 0.0000284 0.0000284 0.000331 0.000725 1984 6 30 45881 0.110518 0.546084 0.0988562 0.0005808 0.000969 -0.000802 0.002952 0.003129 0.0000284 0.0000252 0.000331 0.000724 1984 7 1 45882 0.116006 0.544940 0.0982452 0.0006505 0.000991 -0.000921 0.005303 0.007965 0.0000219 0.0000250 0.000348 0.000300 1984 7 2 45883 0.120859 0.543604 0.0975303 0.0007892 0.000956 -0.001019 0.001355 0.001079 0.0000215 0.0000217 0.000350 0.000290 1984 7 3 45884 0.124841 0.542013 0.0966621 0.0009554 0.000864 -0.001027 0.001177 0.000933 0.0000215 0.0000215 0.000350 0.000290 1984 7 4 45885 0.128334 0.540443 0.0956367 0.0010979 0.000720 -0.000908 0.001471 0.001183 0.0000215 0.0000215 0.000350 0.000290 1984 7 5 45886 0.132227 0.539138 0.0944995 0.0011711 0.000534 -0.000686 0.002158 0.001798 0.0000215 0.0000224 0.000349 0.000290 1984 7 6 45887 0.136724 0.537723 0.0933347 0.0011478 0.000332 -0.000433 0.006913 0.006321 0.0000232 0.0000225 0.000208 0.000167 1984 7 7 45888 0.141405 0.535689 0.0922414 0.0010278 0.000148 -0.000244 0.001739 0.001613 0.0000234 0.0000233 0.000198 0.000158 1984 7 8 45889 0.145638 0.533169 0.0913061 0.0008371 0.000017 -0.000187 0.000744 0.000681 0.0000234 0.0000234 0.000198 0.000158 1984 7 9 45890 0.149132 0.530968 0.0905789 0.0006181 -0.000045 -0.000283 0.000771 0.000705 0.0000234 0.0000234 0.000198 0.000158 1984 7 10 45891 0.152456 0.529303 0.0900645 0.0004145 -0.000053 -0.000488 0.002212 0.002277 0.0000234 0.0000252 0.000198 0.000158 1984 7 11 45892 0.156428 0.527566 0.0897301 0.0002571 -0.000055 -0.000723 0.003705 0.006291 0.0000270 0.0000256 0.000316 0.000275 1984 7 12 45893 0.160864 0.525012 0.0895222 0.0001606 -0.000111 -0.000914 0.001172 0.001036 0.0000278 0.0000274 0.000395 0.000379 1984 7 13 45894 0.164818 0.521367 0.0893800 0.0001315 -0.000262 -0.001018 0.001063 0.000933 0.0000278 0.0000283 0.000395 0.000380 1984 7 14 45895 0.167703 0.517174 0.0892356 0.0001761 -0.000500 -0.001037 0.001103 0.000969 0.0000289 0.0000609 0.000410 0.000394 1984 7 15 45896 0.170267 0.513813 0.0890126 0.0002961 -0.000742 -0.001006 0.003724 0.003266 0.0000940 0.0001528 0.001333 0.001279 1984 7 16 45897 0.173833 0.512328 0.0886371 0.0004766 -0.000872 -0.000949 0.010258 0.007903 0.0002768 0.0000645 0.004300 0.003258 1984 7 17 45898 0.178583 0.511929 0.0880616 0.0006813 -0.000816 -0.000849 0.001850 0.001404 0.0000350 0.0001508 0.000573 0.000412 1984 7 18 45899 0.183391 0.510593 0.0872842 0.0008606 -0.000599 -0.000655 0.000879 0.000666 0.0000249 0.0000299 0.000408 0.000293 1984 7 19 45900 0.187737 0.508075 0.0863557 0.0009648 -0.000321 -0.000365 0.001165 0.000882 0.0000248 0.0000277 0.000407 0.000292 1984 7 20 45901 0.191471 0.505911 0.0853724 0.0009635 -0.000116 -0.000052 0.001895 0.001598 0.0000305 0.0000351 0.000377 0.000303 1984 7 21 45902 0.195035 0.504058 0.0844459 0.0008675 -0.000062 0.000143 0.000825 0.000928 0.0000454 0.0000342 0.000343 0.000307 1984 7 22 45903 0.198914 0.501061 0.0836520 0.0007306 -0.000111 0.000100 0.000833 0.000881 0.0000379 0.0000381 0.000301 0.000256 1984 7 23 45904 0.202782 0.496814 0.0829958 0.0006128 -0.000053 -0.000225 0.000940 0.000867 0.0000308 0.0000437 0.000257 0.000208 1984 7 24 45905 0.205974 0.493124 0.0824328 0.0005410 0.000310 -0.000772 0.001499 0.001296 0.0000496 0.0001143 0.000415 0.000328 1984 7 25 45906 0.209521 0.490448 0.0819119 0.0005072 0.000653 -0.001259 0.007094 0.002877 0.0001978 0.0002844 0.001566 0.000898 1984 7 26 45907 0.214178 0.488216 0.0814032 0.0005023 0.000679 -0.001440 0.013550 0.003148 0.0005191 0.0001614 0.003271 0.001173 1984 7 27 45908 0.218920 0.485893 0.0808772 0.0005445 0.000428 -0.001257 0.003176 0.001842 0.0001250 0.0002951 0.000921 0.001373 1984 7 28 45909 0.222518 0.483230 0.0802750 0.0006672 0.000113 -0.000819 0.002309 0.001124 0.0000711 0.0000819 0.000535 0.000762 1984 7 29 45910 0.225275 0.480290 0.0795075 0.0008863 -0.000055 -0.000332 0.001389 0.000802 0.0000387 0.0000477 0.000360 0.000380 1984 7 30 45911 0.229402 0.477491 0.0784857 0.0011728 -0.000082 -0.000020 0.000939 0.000817 0.0000243 0.0000311 0.000299 0.000225 1984 7 31 45912 0.233112 0.475192 0.0771722 0.0014506 -0.000116 -0.000008 0.001399 0.001353 0.0000236 0.0000347 0.000313 0.000217 1984 8 1 45913 0.236390 0.472758 0.0756194 0.0016300 -0.000121 -0.000229 0.002256 0.002199 0.0000452 0.0000280 0.000810 0.000546 1984 8 2 45914 0.239368 0.469388 0.0739598 0.0016515 -0.000007 -0.000516 0.001454 0.001502 0.0000325 0.0000356 0.000617 0.000435 1984 8 3 45915 0.242109 0.465578 0.0723617 0.0015094 0.000214 -0.000691 0.001519 0.001469 0.0000261 0.0000269 0.000457 0.000346 1984 8 4 45916 0.245257 0.462234 0.0709725 0.0012493 0.000262 -0.000670 0.001022 0.000768 0.0000213 0.0000237 0.000228 0.000224 1984 8 5 45917 0.249209 0.459535 0.0698759 0.0009447 -0.000058 -0.000465 0.000730 0.000533 0.0000213 0.0000215 0.000231 0.000213 1984 8 6 45918 0.253142 0.456695 0.0690780 0.0006698 -0.000279 -0.000124 0.000737 0.000535 0.0000218 0.0000220 0.000273 0.000210 1984 8 7 45919 0.255704 0.452811 0.0685174 0.0004818 0.000544 0.000300 0.000739 0.000628 0.0000227 0.0000271 0.000344 0.000266 1984 8 8 45920 0.257936 0.449411 0.0680875 0.0004076 0.001959 0.000620 0.000876 0.000823 0.0000324 0.0000612 0.000540 0.000443 1984 8 9 45921 0.260643 0.446468 0.0676733 0.0004417 0.002945 0.000712 0.002501 0.002133 0.0000996 0.0000801 0.001632 0.001369 1984 8 10 45922 0.263473 0.442730 0.0671789 0.0005585 0.002859 0.000574 0.003864 0.002808 0.0001278 0.0000615 0.002230 0.001807 1984 8 11 45923 0.266122 0.438567 0.0665384 0.0007276 0.001846 0.000285 0.002502 0.001581 0.0000234 0.0000754 0.000440 0.000344 1984 8 12 45924 0.268707 0.435096 0.0657147 0.0009224 0.000547 -0.000033 0.001350 0.000879 0.0000231 0.0000233 0.000436 0.000341 1984 8 13 45925 0.271433 0.432140 0.0646937 0.0011208 -0.000361 -0.000272 0.001094 0.000716 0.0000231 0.0000231 0.000436 0.000341 1984 8 14 45926 0.274432 0.429016 0.0634814 0.0013020 -0.000592 -0.000379 0.002489 0.001637 0.0000231 0.0000219 0.000436 0.000341 1984 8 15 45927 0.277672 0.425553 0.0621047 0.0014434 -0.000290 -0.000355 0.007807 0.005758 0.0000206 0.0000218 0.000509 0.000308 1984 8 16 45928 0.280863 0.421980 0.0606134 0.0015245 0.000177 -0.000246 0.001527 0.001178 0.0000204 0.0000205 0.000519 0.000305 1984 8 17 45929 0.283488 0.418625 0.0590750 0.0015329 0.000438 -0.000101 0.000870 0.000673 0.0000204 0.0000204 0.000519 0.000305 1984 8 18 45930 0.285212 0.415615 0.0575636 0.0014682 0.000289 0.000037 0.000857 0.000663 0.0000204 0.0000204 0.000519 0.000305 1984 8 19 45931 0.286312 0.412686 0.0561492 0.0013404 -0.000215 0.000138 0.000870 0.000673 0.0000204 0.0000237 0.000519 0.000305 1984 8 20 45932 0.287512 0.409359 0.0548878 0.0011687 -0.000812 0.000171 0.002811 0.002351 0.0000270 0.0000241 0.000562 0.000357 1984 8 21 45933 0.289384 0.405295 0.0538107 0.0009844 -0.001182 0.000106 0.002015 0.001674 0.0000278 0.0000274 0.000566 0.000363 1984 8 22 45934 0.291772 0.400612 0.0529091 0.0008333 -0.001112 -0.000071 0.001412 0.001167 0.0000278 0.0000278 0.000566 0.000363 1984 8 23 45935 0.293397 0.396287 0.0521218 0.0007692 -0.000645 -0.000335 0.001334 0.001096 0.0000278 0.0000222 0.000561 0.000361 1984 8 24 45936 0.293787 0.392343 0.0513359 0.0008366 -0.000138 -0.000603 0.001967 0.002422 0.0000165 0.0000207 0.000202 0.000162 1984 8 25 45937 0.293738 0.388085 0.0504089 0.0010482 -0.000005 -0.000779 0.000785 0.002219 0.0000137 0.0000156 0.000160 0.000130 1984 8 26 45938 0.293757 0.384313 0.0492093 0.0013703 -0.000383 -0.000816 0.000648 0.001293 0.0000147 0.0000183 0.000173 0.000141 1984 8 27 45939 0.293968 0.381114 0.0476624 0.0017249 -0.000879 -0.000769 0.001010 0.000867 0.0000230 0.0000196 0.000285 0.000224 1984 8 28 45940 0.294502 0.377077 0.0457845 0.0020099 -0.000862 -0.000748 0.001285 0.001145 0.0000246 0.0000183 0.000303 0.000215 1984 8 29 45941 0.295712 0.372574 0.0436917 0.0021433 -0.000443 -0.000728 0.000749 0.001001 0.0000136 0.0000148 0.000208 0.000142 1984 8 30 45942 0.297375 0.368657 0.0415544 0.0021047 -0.000212 -0.000620 0.000409 0.000328 0.0000051 0.0000087 0.000148 0.000152 1984 8 31 45943 0.298399 0.365481 0.0395274 0.0019349 -0.000466 -0.000477 0.000259 0.000198 0.0000038 0.0000059 0.000125 0.000186 1984 9 1 45944 0.298329 0.362249 0.0377072 0.0016978 -0.000862 -0.000441 0.000353 0.000289 0.0000067 0.0000046 0.000197 0.000263 1984 9 2 45945 0.298658 0.358971 0.0361303 0.0014483 -0.000628 -0.000571 0.000248 0.000223 0.0000054 0.0000052 0.000167 0.000217 1984 9 3 45946 0.299507 0.355682 0.0347910 0.0012254 0.000031 -0.000739 0.000179 0.000158 0.0000037 0.0000045 0.000123 0.000169 1984 9 4 45947 0.300114 0.352164 0.0336507 0.0010595 0.000407 -0.000771 0.000223 0.000197 0.0000037 0.0000085 0.000122 0.000167 1984 9 5 45948 0.300750 0.348151 0.0326416 0.0009707 0.000315 -0.000634 0.001352 0.001121 0.0000133 0.0000129 0.000291 0.000469 1984 9 6 45949 0.302021 0.343690 0.0316822 0.0009625 -0.000054 -0.000415 0.001328 0.001048 0.0000221 0.0000177 0.000335 0.000585 1984 9 7 45950 0.303697 0.339526 0.0306960 0.0010228 -0.000370 -0.000247 0.001561 0.001231 0.0000222 0.0000221 0.000335 0.000585 1984 9 8 45951 0.305402 0.335751 0.0296246 0.0011298 -0.000454 -0.000206 0.003399 0.002568 0.0000222 0.0000215 0.000335 0.000585 1984 9 9 45952 0.306803 0.332005 0.0284335 0.0012591 -0.000331 -0.000276 0.002432 0.001941 0.0000209 0.0000215 0.000356 0.000482 1984 9 10 45953 0.307507 0.328141 0.0271123 0.0013871 -0.000134 -0.000376 0.000657 0.000548 0.0000208 0.0000208 0.000358 0.000476 1984 9 11 45954 0.307370 0.324139 0.0256728 0.0014933 -0.000008 -0.000401 0.000654 0.000546 0.0000208 0.0000208 0.000358 0.000476 1984 9 12 45955 0.306698 0.320128 0.0241448 0.0015629 -0.000031 -0.000277 0.000665 0.000555 0.0000208 0.0000208 0.000358 0.000476 1984 9 13 45956 0.306408 0.316321 0.0225684 0.0015886 -0.000186 0.000004 0.001951 0.001627 0.0000208 0.0000249 0.000358 0.000475 1984 9 14 45957 0.307329 0.312802 0.0209870 0.0015695 -0.000392 0.000381 0.009515 0.006865 0.0000291 0.0000256 0.000414 0.000421 1984 9 15 45958 0.309149 0.309291 0.0194431 0.0015091 -0.000553 0.000753 0.001950 0.001559 0.0000303 0.0000297 0.000420 0.000417 1984 9 16 45959 0.310276 0.305234 0.0179748 0.0014149 -0.000606 0.001007 0.001239 0.000993 0.0000303 0.0000303 0.000420 0.000417 1984 9 17 45960 0.309881 0.300579 0.0166114 0.0013003 -0.000536 0.001064 0.001666 0.001325 0.0000303 0.0000303 0.000420 0.000417 1984 9 18 45961 0.309599 0.296261 0.0153646 0.0011891 -0.000380 0.000905 0.004010 0.002930 0.0000303 0.0000316 0.000420 0.000417 1984 9 19 45962 0.310648 0.292558 0.0142149 0.0011178 -0.000202 0.000574 0.004168 0.002550 0.0000328 0.0000317 0.000487 0.000374 1984 9 20 45963 0.311591 0.288286 0.0131008 0.0011287 -0.000062 0.000164 0.002483 0.001775 0.0000330 0.0000329 0.000494 0.000371 1984 9 21 45964 0.311278 0.283271 0.0119213 0.0012543 0.000001 -0.000213 0.001553 0.001274 0.0000330 0.0000330 0.000494 0.000371 1984 9 22 45965 0.311225 0.279886 0.0105565 0.0014964 -0.000020 -0.000461 0.001852 0.001539 0.0000330 0.0000330 0.000494 0.000371 1984 9 23 45966 0.311920 0.277563 0.0089071 0.0018134 -0.000116 -0.000535 0.003247 0.002568 0.0000330 0.0000289 0.000494 0.000371 1984 9 24 45967 0.312647 0.274476 0.0069357 0.0021260 -0.000267 -0.000450 0.002522 0.002220 0.0000248 0.0000287 0.000317 0.000469 1984 9 25 45968 0.312962 0.270404 0.0046918 0.0023450 -0.000452 -0.000275 0.000821 0.000824 0.0000244 0.0000246 0.000309 0.000481 1984 9 26 45969 0.312865 0.266095 0.0023029 0.0024083 -0.000653 -0.000103 0.000818 0.000822 0.0000244 0.0000244 0.000309 0.000481 1984 9 27 45970 0.312660 0.262271 -0.0000667 0.0023068 -0.000846 -0.000015 0.000847 0.000852 0.0000244 0.0000244 0.000309 0.000481 1984 9 28 45971 0.312680 0.258719 -0.0022709 0.0020853 -0.001002 -0.000040 0.002847 0.002889 0.0000244 0.0000222 0.000309 0.000481 1984 9 29 45972 0.312985 0.254773 -0.0042259 0.0018196 -0.001093 -0.000153 0.008202 0.007304 0.0000201 0.0000221 0.000403 0.000397 1984 9 30 45973 0.313130 0.250380 -0.0059249 0.0015827 -0.001095 -0.000289 0.001181 0.001047 0.0000198 0.0000199 0.000418 0.000391 1984 10 1 45974 0.312382 0.246339 -0.0074217 0.0014206 -0.001005 -0.000377 0.000841 0.000746 0.0000198 0.0000198 0.000418 0.000391 1984 10 2 45975 0.310628 0.243140 -0.0088006 0.0013482 -0.000839 -0.000375 0.001190 0.001053 0.0000198 0.0000198 0.000418 0.000391 1984 10 3 45976 0.308847 0.239983 -0.0101489 0.0013583 -0.000634 -0.000290 0.003272 0.002815 0.0000198 0.0000202 0.000418 0.000391 1984 10 4 45977 0.307797 0.236194 -0.0115408 0.0014327 -0.000439 -0.000169 0.004291 0.004732 0.0000207 0.0000203 0.000330 0.000311 1984 10 5 45978 0.307078 0.232220 -0.0130296 0.0015483 -0.000299 -0.000082 0.001830 0.001734 0.0000208 0.0000207 0.000324 0.000306 1984 10 6 45979 0.305963 0.228523 -0.0146436 0.0016784 -0.000247 -0.000084 0.000974 0.000889 0.0000208 0.0000208 0.000324 0.000306 1984 10 7 45980 0.304297 0.224699 -0.0163838 0.0017976 -0.000289 -0.000197 0.000945 0.000856 0.0000208 0.0000208 0.000324 0.000306 1984 10 8 45981 0.302960 0.221232 -0.0182281 0.0018882 -0.000400 -0.000398 0.002981 0.002445 0.0000208 0.0000214 0.000324 0.000306 1984 10 9 45982 0.302380 0.218559 -0.0201428 0.0019424 -0.000536 -0.000626 0.004269 0.003276 0.0000221 0.0000215 0.000358 0.000377 1984 10 10 45983 0.301087 0.215034 -0.0220916 0.0019564 -0.000635 -0.000806 0.001437 0.001693 0.0000222 0.0000222 0.000362 0.000387 1984 10 11 45984 0.297793 0.209167 -0.0240337 0.0019220 -0.000645 -0.000874 0.000997 0.001301 0.0000222 0.0000222 0.000362 0.000387 1984 10 12 45985 0.294641 0.203630 -0.0259177 0.0018305 -0.000536 -0.000797 0.000836 0.001131 0.0000222 0.0000222 0.000362 0.000387 1984 10 13 45986 0.293209 0.200710 -0.0276844 0.0016843 -0.000321 -0.000590 0.002043 0.002326 0.0000222 0.0000236 0.000362 0.000387 1984 10 14 45987 0.291506 0.198217 -0.0292859 0.0015072 -0.000052 -0.000309 0.003544 0.002964 0.0000250 0.0000238 0.000327 0.000412 1984 10 15 45988 0.288613 0.194316 -0.0307085 0.0013406 0.000195 -0.000036 0.001593 0.001077 0.0000254 0.0000252 0.000324 0.000414 1984 10 16 45989 0.286705 0.190208 -0.0319857 0.0012303 0.000343 0.000151 0.001269 0.000839 0.0000254 0.0000254 0.000324 0.000414 1984 10 17 45990 0.287289 0.187490 -0.0331950 0.0012136 0.000345 0.000202 0.001747 0.001133 0.0000254 0.0000254 0.000324 0.000414 1984 10 18 45991 0.287762 0.185118 -0.0344446 0.0013145 0.000201 0.000112 0.002951 0.001806 0.0000254 0.0000222 0.000324 0.000414 1984 10 19 45992 0.286147 0.182203 -0.0358572 0.0015369 -0.000037 -0.000072 0.004578 0.004357 0.0000190 0.0000220 0.000278 0.000393 1984 10 20 45993 0.283275 0.179079 -0.0375449 0.0018536 -0.000296 -0.000272 0.001233 0.001450 0.0000186 0.0000188 0.000275 0.000392 1984 10 21 45994 0.280903 0.176053 -0.0395730 0.0021995 -0.000506 -0.000406 0.000590 0.000698 0.0000186 0.0000186 0.000275 0.000392 1984 10 22 45995 0.279697 0.172848 -0.0419258 0.0024844 -0.000625 -0.000427 0.000661 0.000782 0.0000186 0.0000186 0.000275 0.000392 1984 10 23 45996 0.278895 0.169349 -0.0444976 0.0026262 -0.000656 -0.000340 0.002490 0.002856 0.0000186 0.0000180 0.000275 0.000392 1984 10 24 45997 0.277395 0.165798 -0.0471202 0.0025865 -0.000631 -0.000199 0.005085 0.005417 0.0000174 0.0000180 0.000287 0.000313 1984 10 25 45998 0.275105 0.162584 -0.0496183 0.0023868 -0.000588 -0.000077 0.000720 0.000881 0.0000173 0.0000174 0.000288 0.000308 1984 10 26 45999 0.272831 0.159919 -0.0518648 0.0020958 -0.000558 -0.000033 0.000677 0.000830 0.0000173 0.0000173 0.000288 0.000308 1984 10 27 46000 0.271184 0.157618 -0.0538110 0.0017967 -0.000547 -0.000088 0.000679 0.000832 0.0000173 0.0000173 0.000288 0.000308 1984 10 28 46001 0.269650 0.154939 -0.0554838 0.0015570 -0.000542 -0.000211 0.001295 0.001515 0.0000173 0.0000187 0.000288 0.000308 1984 10 29 46002 0.267212 0.151175 -0.0569621 0.0014132 -0.000525 -0.000352 0.003687 0.003116 0.0000201 0.0000188 0.000311 0.000394 1984 10 30 46003 0.263726 0.146517 -0.0583466 0.0013723 -0.000487 -0.000457 0.001248 0.001411 0.0000203 0.0000202 0.000313 0.000404 1984 10 31 46004 0.260615 0.142578 -0.0597350 0.0014192 -0.000431 -0.000500 0.000751 0.000887 0.0000203 0.0000203 0.000313 0.000404 1984 11 1 46005 0.259054 0.140601 -0.0612035 0.0015258 -0.000370 -0.000482 0.000989 0.001189 0.0000203 0.0000204 0.000313 0.000404 1984 11 2 46006 0.257533 0.138792 -0.0627957 0.0016591 -0.000324 -0.000426 0.001714 0.002185 0.0000204 0.0000238 0.000313 0.000404 1984 11 3 46007 0.255105 0.135772 -0.0645221 0.0017901 -0.000307 -0.000366 0.007952 0.007251 0.0000272 0.0000242 0.000444 0.000478 1984 11 4 46008 0.252271 0.131714 -0.0663680 0.0018977 -0.000323 -0.000326 0.002630 0.002202 0.0000280 0.0000276 0.000463 0.000485 1984 11 5 46009 0.250107 0.127912 -0.0683025 0.0019676 -0.000362 -0.000315 0.001293 0.001082 0.0000280 0.0000280 0.000463 0.000485 1984 11 6 46010 0.248962 0.125364 -0.0702834 0.0019876 -0.000409 -0.000328 0.001553 0.001299 0.0000280 0.0000280 0.000463 0.000485 1984 11 7 46011 0.247898 0.123290 -0.0722560 0.0019449 -0.000443 -0.000348 0.005398 0.004368 0.0000280 0.0000254 0.000463 0.000485 1984 11 8 46012 0.245701 0.120315 -0.0741531 0.0018312 -0.000448 -0.000358 0.006183 0.004984 0.0000228 0.0000252 0.000411 0.000513 1984 11 9 46013 0.242272 0.116490 -0.0759039 0.0016538 -0.000424 -0.000347 0.000923 0.000781 0.0000224 0.0000226 0.000407 0.000515 1984 11 10 46014 0.238488 0.112944 -0.0774551 0.0014429 -0.000378 -0.000310 0.000887 0.000751 0.0000224 0.0000224 0.000407 0.000515 1984 11 11 46015 0.235255 0.110530 -0.0787957 0.0012472 -0.000325 -0.000250 0.000896 0.000759 0.0000224 0.0000224 0.000407 0.000515 1984 11 12 46016 0.232691 0.108698 -0.0799673 0.0011162 -0.000280 -0.000172 0.002351 0.001967 0.0000224 0.0000239 0.000407 0.000515 1984 11 13 46017 0.230336 0.106240 -0.0810548 0.0010821 -0.000254 -0.000087 0.008338 0.006019 0.0000253 0.0000240 0.000397 0.000528 1984 11 14 46018 0.227862 0.102905 -0.0821627 0.0011553 -0.000245 -0.000012 0.001409 0.001204 0.0000256 0.0000254 0.000396 0.000529 1984 11 15 46019 0.225465 0.100089 -0.0833958 0.0013297 -0.000245 0.000029 0.000957 0.000820 0.0000256 0.0000256 0.000396 0.000529 1984 11 16 46020 0.223415 0.098853 -0.0848462 0.0015860 -0.000241 0.000017 0.001285 0.001100 0.0000256 0.0000256 0.000396 0.000529 1984 11 17 46021 0.221445 0.098047 -0.0865792 0.0018866 -0.000222 -0.000058 0.002084 0.001773 0.0000255 0.0000216 0.000396 0.000529 1984 11 18 46022 0.218977 0.096424 -0.0886118 0.0021718 -0.000183 -0.000179 0.002172 0.002128 0.0000176 0.0000214 0.000222 0.000584 1984 11 19 46023 0.215830 0.093787 -0.0908933 0.0023713 -0.000128 -0.000314 0.001192 0.001307 0.0000172 0.0000174 0.000216 0.000590 1984 11 20 46024 0.212576 0.090890 -0.0933075 0.0024299 -0.000066 -0.000425 0.000775 0.000879 0.0000172 0.0000172 0.000216 0.000590 1984 11 21 46025 0.210417 0.088915 -0.0957014 0.0023319 -0.000006 -0.000484 0.000835 0.000945 0.0000172 0.0000172 0.000216 0.000590 1984 11 22 46026 0.208667 0.087584 -0.0979318 0.0021106 0.000050 -0.000483 0.002141 0.002157 0.0000172 0.0000178 0.000216 0.000590 1984 11 23 46027 0.205596 0.085787 -0.0999083 0.0018348 0.000105 -0.000438 0.002631 0.002408 0.0000184 0.0000179 0.000254 0.000512 1984 11 24 46028 0.201138 0.083391 -0.1016147 0.0015798 0.000164 -0.000372 0.000650 0.000675 0.0000185 0.0000185 0.000259 0.000506 1984 11 25 46029 0.196484 0.080915 -0.1031009 0.0013999 0.000228 -0.000311 0.000642 0.000667 0.0000185 0.0000185 0.000259 0.000506 1984 11 26 46030 0.192757 0.078835 -0.1044535 0.0013140 0.000291 -0.000272 0.000650 0.000675 0.0000185 0.0000185 0.000259 0.000506 1984 11 27 46031 0.189810 0.076937 -0.1057626 0.0013128 0.000342 -0.000255 0.001741 0.001792 0.0000185 0.0000184 0.000259 0.000506 1984 11 28 46032 0.186620 0.074617 -0.1071016 0.0013745 0.000368 -0.000253 0.005406 0.004986 0.0000183 0.0000184 0.000307 0.000264 1984 11 29 46033 0.182512 0.071661 -0.1085228 0.0014782 0.000358 -0.000254 0.000871 0.000864 0.0000183 0.0000183 0.000313 0.000256 1984 11 30 46034 0.177894 0.068729 -0.1100595 0.0016038 0.000308 -0.000254 0.000507 0.000503 0.0000183 0.0000183 0.000313 0.000256 1984 12 1 46035 0.173631 0.066550 -0.1117238 0.0017277 0.000219 -0.000256 0.000501 0.000497 0.0000183 0.0000182 0.000313 0.000256 1984 12 2 46036 0.170085 0.064851 -0.1135015 0.0018241 0.000100 -0.000267 0.000548 0.000541 0.0000182 0.0000176 0.000313 0.000256 1984 12 3 46037 0.166965 0.062601 -0.1153535 0.0018716 -0.000031 -0.000296 0.003250 0.002127 0.0000170 0.0000176 0.000216 0.000281 1984 12 4 46038 0.163782 0.059163 -0.1172243 0.0018590 -0.000154 -0.000336 0.001285 0.001192 0.0000169 0.0000169 0.000211 0.000284 1984 12 5 46039 0.160294 0.055244 -0.1190520 0.0017847 -0.000249 -0.000366 0.000678 0.000676 0.0000169 0.0000169 0.000211 0.000284 1984 12 6 46040 0.156624 0.052862 -0.1207778 0.0016567 -0.000301 -0.000369 0.000720 0.000724 0.0000169 0.0000169 0.000211 0.000284 1984 12 7 46041 0.152981 0.052000 -0.1223562 0.0014944 -0.000310 -0.000331 0.002541 0.002515 0.0000169 0.0000176 0.000212 0.000284 1984 12 8 46042 0.149365 0.050990 -0.1237675 0.0013300 -0.000289 -0.000269 0.004152 0.004193 0.0000183 0.0000176 0.000262 0.000270 1984 12 9 46043 0.145500 0.049049 -0.1250294 0.0012018 -0.000264 -0.000214 0.000642 0.000695 0.0000184 0.0000183 0.000268 0.000269 1984 12 10 46044 0.141084 0.046491 -0.1261963 0.0011420 -0.000261 -0.000209 0.000619 0.000670 0.0000184 0.0000184 0.000268 0.000269 1984 12 11 46045 0.136090 0.044122 -0.1273462 0.0011665 -0.000297 -0.000282 0.000622 0.000674 0.0000184 0.0000184 0.000268 0.000269 1984 12 12 46046 0.130968 0.042511 -0.1285619 0.0012723 -0.000374 -0.000430 0.001460 0.001613 0.0000184 0.0000189 0.000268 0.000269 1984 12 13 46047 0.126289 0.041690 -0.1299148 0.0014414 -0.000470 -0.000630 0.004324 0.006573 0.0000193 0.0000189 0.000265 0.000367 1984 12 14 46048 0.122136 0.041118 -0.1314540 0.0016443 -0.000549 -0.000834 0.001085 0.001341 0.0000194 0.0000194 0.000265 0.000381 1984 12 15 46049 0.117786 0.039983 -0.1331952 0.0018396 -0.000569 -0.001002 0.000703 0.000861 0.0000194 0.0000194 0.000265 0.000381 1984 12 16 46050 0.112753 0.038028 -0.1351080 0.0019771 -0.000507 -0.001102 0.000927 0.001125 0.0000194 0.0000194 0.000265 0.000381 1984 12 17 46051 0.107894 0.036025 -0.1371108 0.0020102 -0.000368 -0.001130 0.001528 0.001789 0.0000194 0.0000191 0.000265 0.000381 1984 12 18 46052 0.103163 0.034440 -0.1390842 0.0019155 -0.000189 -0.001096 0.003358 0.002867 0.0000189 0.0000191 0.000303 0.000460 1984 12 19 46053 0.097882 0.033123 -0.1409033 0.0017073 -0.000020 -0.001024 0.001451 0.001406 0.0000188 0.0000189 0.000307 0.000470 1984 12 20 46054 0.091835 0.031753 -0.1424774 0.0014362 0.000092 -0.000937 0.000747 0.000743 0.0000188 0.0000188 0.000307 0.000470 1984 12 21 46055 0.085637 0.030346 -0.1437780 0.0011714 0.000131 -0.000850 0.000994 0.000991 0.0000188 0.0000167 0.000307 0.000464 1984 12 22 46056 0.079741 0.029358 -0.1448444 0.0009755 0.000115 -0.000768 0.001117 0.001175 0.0000145 0.0000161 0.000248 0.000200 1984 12 23 46057 0.074839 0.028375 -0.1457656 0.0008848 0.000083 -0.000689 0.000450 0.000480 0.0000134 0.0000140 0.000231 0.000171 1984 12 24 46058 0.071554 0.026368 -0.1466509 0.0009041 0.000072 -0.000614 0.000544 0.000579 0.0000134 0.0000134 0.000231 0.000171 1984 12 25 46059 0.068980 0.023977 -0.1476013 0.0010135 0.000096 -0.000549 0.001287 0.001389 0.0000134 0.0000134 0.000231 0.000171 1984 12 26 46060 0.065509 0.022752 -0.1486925 0.0011817 0.000142 -0.000508 0.003830 0.004682 0.0000134 0.0000168 0.000231 0.000171 1984 12 27 46061 0.060747 0.022821 -0.1499673 0.0013759 0.000185 -0.000501 0.014847 0.010430 0.0000201 0.0000181 0.000369 0.000287 1984 12 28 46062 0.055447 0.023274 -0.1514375 0.0015664 0.000202 -0.000527 0.010394 0.007431 0.0000228 0.0000215 0.000432 0.000347 1984 12 29 46063 0.050669 0.023211 -0.1530864 0.0017275 0.000181 -0.000573 0.001815 0.001369 0.0000228 0.0000228 0.000432 0.000347 1984 12 30 46064 0.046958 0.022601 -0.1548739 0.0018381 0.000124 -0.000611 0.001114 0.000841 0.0000228 0.0000228 0.000432 0.000347 1984 12 31 46065 0.044182 0.021972 -0.1567421 0.0018845 0.000051 -0.000619 0.001104 0.000833 0.0000228 0.0000228 0.000432 0.000347 1985 1 1 46066 0.041690 0.021759 -0.1586237 0.0018628 -0.000007 -0.000580 0.001448 0.001114 0.0000228 0.0000223 0.000432 0.000347 1985 1 2 46067 0.038735 0.022066 -0.1604526 0.0017803 -0.000014 -0.000503 0.003755 0.005413 0.0000217 0.0000222 0.000296 0.000257 1985 1 3 46068 0.035024 0.022699 -0.1621751 0.0016544 0.000051 -0.000411 0.001508 0.001636 0.0000217 0.0000217 0.000289 0.000252 1985 1 4 46069 0.031055 0.023325 -0.1637596 0.0015100 0.000188 -0.000334 0.000749 0.000788 0.0000217 0.0000217 0.000289 0.000252 1985 1 5 46070 0.027598 0.023773 -0.1652035 0.0013790 0.000369 -0.000305 0.000870 0.000915 0.0000217 0.0000216 0.000289 0.000252 1985 1 6 46071 0.024111 0.024238 -0.1665383 0.0012971 0.000544 -0.000336 0.002828 0.003168 0.0000216 0.0000179 0.000289 0.000252 1985 1 7 46072 0.019663 0.024926 -0.1678297 0.0012972 0.000659 -0.000418 0.002693 0.003079 0.0000142 0.0000177 0.000306 0.000356 1985 1 8 46073 0.014642 0.025566 -0.1691691 0.0013962 0.000674 -0.000521 0.000430 0.000463 0.0000139 0.0000140 0.000308 0.000371 1985 1 9 46074 0.010177 0.025813 -0.1706526 0.0015856 0.000577 -0.000601 0.000417 0.000449 0.0000139 0.0000139 0.000308 0.000371 1985 1 10 46075 0.006760 0.025983 -0.1723540 0.0018277 0.000387 -0.000624 0.000468 0.000504 0.0000139 0.0000139 0.000308 0.000371 1985 1 11 46076 0.003335 0.027268 -0.1742997 0.0020654 0.000149 -0.000580 0.001735 0.001971 0.0000139 0.0000211 0.000308 0.000371 1985 1 12 46077 -0.001295 0.030210 -0.1764561 0.0022379 -0.000086 -0.000493 0.004466 0.008414 0.0000283 0.0000234 0.000485 0.000359 1985 1 13 46078 -0.006406 0.033055 -0.1787342 0.0022990 -0.000272 -0.000402 0.002424 0.001718 0.0000329 0.0000306 0.000518 0.000358 1985 1 14 46079 -0.010098 0.033197 -0.1810107 0.0022298 -0.000380 -0.000353 0.002480 0.001698 0.0000329 0.0000329 0.000518 0.000358 1985 1 15 46080 -0.011891 0.030463 -0.1831580 0.0020433 -0.000401 -0.000373 0.003160 0.002127 0.0000329 0.0000329 0.000518 0.000358 1985 1 16 46081 -0.013930 0.028339 -0.1850766 0.0017814 -0.000342 -0.000460 0.004416 0.002880 0.0000329 0.0000310 0.000518 0.000358 1985 1 17 46082 -0.016962 0.029477 -0.1867197 0.0015051 -0.000218 -0.000593 0.007166 0.007921 0.0000291 0.0000308 0.000525 0.000449 1985 1 18 46083 -0.020273 0.033575 -0.1881050 0.0012769 -0.000044 -0.000737 0.005758 0.004319 0.0000288 0.0000289 0.000525 0.000460 1985 1 19 46084 -0.023285 0.037915 -0.1893059 0.0011420 0.000160 -0.000868 0.003862 0.002318 0.0000288 0.0000288 0.000525 0.000460 1985 1 20 46085 -0.026808 0.039852 -0.1904260 0.0011130 0.000367 -0.000963 0.003487 0.002021 0.0000288 0.0000288 0.000525 0.000460 1985 1 21 46086 -0.030369 0.039760 -0.1915637 0.0011702 0.000530 -0.001012 0.005792 0.002891 0.0000288 0.0000419 0.000525 0.000460 1985 1 22 46087 -0.032917 0.040216 -0.1927861 0.0012745 0.000587 -0.001013 0.006092 0.003103 0.0000550 0.0000436 0.000872 0.000694 1985 1 23 46088 -0.035246 0.042671 -0.1941190 0.0013869 0.000492 -0.000968 0.003669 0.003316 0.0000583 0.0000484 0.000927 0.000712 1985 1 24 46089 -0.039779 0.045800 -0.1955546 0.0014836 0.000245 -0.000885 0.002947 0.002323 0.0000419 0.0000424 0.000806 0.000592 1985 1 25 46090 -0.045516 0.046666 -0.1970725 0.0015596 -0.000084 -0.000776 0.002750 0.001594 0.0000265 0.0000320 0.000608 0.000424 1985 1 26 46091 -0.049426 0.046685 -0.1986546 0.0016101 -0.000360 -0.000659 0.003198 0.001593 0.0000222 0.0000241 0.000531 0.000365 1985 1 27 46092 -0.051911 0.048624 -0.2002710 0.0016193 -0.000492 -0.000554 0.006636 0.004932 0.0000217 0.0000234 0.000506 0.000329 1985 1 28 46093 -0.055060 0.051730 -0.2018729 0.0015744 -0.000481 -0.000484 0.001415 0.001963 0.0000246 0.0000232 0.000428 0.000222 1985 1 29 46094 -0.059440 0.053424 -0.2034039 0.0014736 -0.000390 -0.000453 0.000859 0.001193 0.0000246 0.0000246 0.000428 0.000221 1985 1 30 46095 -0.063865 0.052619 -0.2048111 0.0013261 -0.000291 -0.000450 0.001224 0.001659 0.0000246 0.0000246 0.000428 0.000221 1985 1 31 46096 -0.067213 0.052213 -0.2060545 0.0011498 -0.000223 -0.000452 0.002531 0.003017 0.0000246 0.0000269 0.000428 0.000222 1985 2 1 46097 -0.069193 0.053940 -0.2071171 0.0009739 -0.000177 -0.000440 0.007695 0.004895 0.0000292 0.0000271 0.000411 0.000268 1985 2 2 46098 -0.070417 0.056789 -0.2080184 0.0008391 -0.000126 -0.000414 0.002115 0.002056 0.0000296 0.0000294 0.000410 0.000273 1985 2 3 46099 -0.071981 0.059250 -0.2088227 0.0007894 -0.000045 -0.000392 0.001020 0.001037 0.0000296 0.0000296 0.000410 0.000273 1985 2 4 46100 -0.074582 0.061100 -0.2096339 0.0008555 0.000070 -0.000402 0.001077 0.001098 0.0000296 0.0000296 0.000410 0.000273 1985 2 5 46101 -0.077734 0.062571 -0.2105713 0.0010381 0.000203 -0.000453 0.004231 0.004318 0.0000296 0.0000227 0.000409 0.000273 1985 2 6 46102 -0.080399 0.063962 -0.2117357 0.0013024 0.000326 -0.000535 0.003990 0.006390 0.0000157 0.0000224 0.000307 0.000302 1985 2 7 46103 -0.082199 0.065528 -0.2131777 0.0015850 0.000409 -0.000609 0.000456 0.000761 0.0000153 0.0000155 0.000302 0.000305 1985 2 8 46104 -0.083636 0.067368 -0.2148799 0.0018142 0.000435 -0.000632 0.000407 0.000680 0.0000153 0.0000153 0.000302 0.000305 1985 2 9 46105 -0.085430 0.069475 -0.2167598 0.0019334 0.000400 -0.000578 0.000409 0.000682 0.0000153 0.0000153 0.000302 0.000305 1985 2 10 46106 -0.087839 0.071819 -0.2186944 0.0019194 0.000318 -0.000456 0.000859 0.001428 0.0000153 0.0000159 0.000302 0.000305 1985 2 11 46107 -0.090618 0.074350 -0.2205555 0.0017868 0.000209 -0.000307 0.004867 0.005974 0.0000165 0.0000160 0.000286 0.000226 1985 2 12 46108 -0.093385 0.076973 -0.2222442 0.0015798 0.000099 -0.000177 0.000906 0.001155 0.0000167 0.0000166 0.000285 0.000221 1985 2 13 46109 -0.095979 0.079584 -0.2237135 0.0013573 0.000006 -0.000100 0.000465 0.000586 0.0000167 0.0000167 0.000285 0.000221 1985 2 14 46110 -0.098497 0.082113 -0.2249764 0.0011778 -0.000058 -0.000079 0.000451 0.000568 0.0000167 0.0000167 0.000285 0.000221 1985 2 15 46111 -0.101126 0.084523 -0.2260997 0.0010850 -0.000090 -0.000091 0.000573 0.000717 0.0000167 0.0000155 0.000285 0.000221 1985 2 16 46112 -0.104054 0.086789 -0.2271824 0.0010971 -0.000088 -0.000108 0.003387 0.003273 0.0000143 0.0000154 0.000330 0.000138 1985 2 17 46113 -0.107368 0.088852 -0.2283272 0.0012035 -0.000054 -0.000107 0.000995 0.000958 0.0000142 0.0000142 0.000335 0.000135 1985 2 18 46114 -0.110968 0.090661 -0.2296138 0.0013726 0.000011 -0.000091 0.000476 0.000459 0.0000142 0.0000142 0.000335 0.000135 1985 2 19 46115 -0.114666 0.092304 -0.2310843 0.0015646 0.000102 -0.000071 0.000539 0.000519 0.0000142 0.0000142 0.000335 0.000135 1985 2 20 46116 -0.118389 0.094071 -0.2327421 0.0017425 0.000200 -0.000065 0.001915 0.001843 0.0000142 0.0000146 0.000335 0.000135 1985 2 21 46117 -0.122192 0.096194 -0.2345581 0.0018777 0.000281 -0.000080 0.003116 0.003122 0.0000151 0.0000147 0.000336 0.000157 1985 2 22 46118 -0.126110 0.098542 -0.2364792 0.0019512 0.000321 -0.000115 0.000459 0.000463 0.0000152 0.0000152 0.000336 0.000159 1985 2 23 46119 -0.130081 0.100733 -0.2384383 0.0019538 0.000312 -0.000160 0.000442 0.000446 0.0000152 0.0000152 0.000336 0.000159 1985 2 24 46120 -0.133992 0.102552 -0.2403643 0.0018873 0.000259 -0.000207 0.000455 0.000459 0.0000152 0.0000152 0.000336 0.000159 1985 2 25 46121 -0.137724 0.104238 -0.2421943 0.0017651 0.000186 -0.000243 0.001490 0.001503 0.0000152 0.0000144 0.000336 0.000159 1985 2 26 46122 -0.141173 0.106298 -0.2438832 0.0016091 0.000117 -0.000263 0.004949 0.004941 0.0000136 0.0000143 0.000214 0.000144 1985 2 27 46123 -0.144266 0.109045 -0.2454098 0.0014447 0.000065 -0.000253 0.000636 0.000642 0.0000135 0.0000135 0.000209 0.000143 1985 2 28 46124 -0.147030 0.112323 -0.2467781 0.0012953 0.000027 -0.000206 0.000500 0.000504 0.0000135 0.0000135 0.000209 0.000143 1985 3 1 46125 -0.149660 0.115606 -0.2480139 0.0011825 -0.000001 -0.000123 0.000667 0.000674 0.0000135 0.0000135 0.000209 0.000143 1985 3 2 46126 -0.152446 0.118386 -0.2491654 0.0011309 -0.000018 -0.000031 0.001049 0.001066 0.0000135 0.0000162 0.000209 0.000143 1985 3 3 46127 -0.155387 0.120724 -0.2503076 0.0011700 -0.000002 0.000021 0.001275 0.001038 0.0000189 0.0000165 0.000310 0.000224 1985 3 4 46128 -0.158218 0.123146 -0.2515436 0.0013243 0.000070 -0.000026 0.000917 0.000695 0.0000195 0.0000178 0.000325 0.000239 1985 3 5 46129 -0.160713 0.126162 -0.2529912 0.0015944 0.000186 -0.000192 0.000722 0.000624 0.0000168 0.0000147 0.000302 0.000236 1985 3 6 46130 -0.163039 0.129828 -0.2547504 0.0019417 0.000278 -0.000440 0.000372 0.000402 0.0000099 0.0000124 0.000215 0.000214 1985 3 7 46131 -0.165814 0.133632 -0.2568641 0.0022883 0.000243 -0.000674 0.000293 0.000328 0.0000079 0.0000088 0.000181 0.000199 1985 3 8 46132 -0.169505 0.137084 -0.2592868 0.0025407 0.000018 -0.000804 0.000288 0.000324 0.0000078 0.0000103 0.000177 0.000198 1985 3 9 46133 -0.173914 0.140167 -0.2618874 0.0026316 -0.000341 -0.000813 0.001398 0.001567 0.0000126 0.0003150 0.000286 0.000317 1985 3 10 46134 -0.178299 0.143120 -0.2644931 0.0025498 -0.000696 -0.000748 0.025155 0.017142 0.0006222 0.0003950 0.001679 0.001519 1985 3 11 46135 -0.181793 0.146063 -0.2669493 0.0023407 -0.000893 -0.000677 0.026660 0.016713 0.0007775 0.0006854 0.001683 0.001522 1985 3 12 46136 -0.183883 0.148719 -0.2691646 0.0020801 -0.000840 -0.000633 0.021064 0.005350 0.0007487 0.0004496 0.001691 0.001533 1985 3 13 46137 -0.184987 0.151287 -0.2711249 0.0018426 -0.000566 -0.000600 0.009703 0.003251 0.0001217 0.0003947 0.001648 0.001688 1985 3 14 46138 -0.185989 0.154452 -0.2728813 0.0016803 -0.000184 -0.000540 0.002312 0.001660 0.0000408 0.0000714 0.000738 0.000636 1985 3 15 46139 -0.187174 0.158311 -0.2745226 0.0016157 0.000178 -0.000447 0.001048 0.000776 0.0000211 0.0000292 0.000393 0.000330 1985 3 16 46140 -0.188062 0.162287 -0.2761470 0.0016468 0.000455 -0.000365 0.000868 0.000643 0.0000176 0.0000192 0.000330 0.000276 1985 3 17 46141 -0.188810 0.166188 -0.2778424 0.0017537 0.000626 -0.000359 0.000926 0.000686 0.0000172 0.0000186 0.000321 0.000269 1985 3 18 46142 -0.190302 0.170354 -0.2796700 0.0019036 0.000690 -0.000466 0.002936 0.002430 0.0000195 0.0000185 0.000271 0.000211 1985 3 19 46143 -0.193070 0.175013 -0.2816536 0.0020575 0.000674 -0.000661 0.001351 0.001276 0.0000198 0.0000196 0.000267 0.000208 1985 3 20 46144 -0.196369 0.179770 -0.2837783 0.0021797 0.000612 -0.000876 0.000737 0.000716 0.0000198 0.0000198 0.000267 0.000208 1985 3 21 46145 -0.198367 0.183669 -0.2859979 0.0022458 0.000531 -0.001028 0.000868 0.000836 0.0000198 0.0000198 0.000267 0.000208 1985 3 22 46146 -0.198899 0.186920 -0.2882491 0.0022463 0.000453 -0.001064 0.002398 0.002020 0.0000198 0.0000173 0.000267 0.000208 1985 3 23 46147 -0.199019 0.190418 -0.2904676 0.0021860 0.000390 -0.000982 0.001769 0.001576 0.0000149 0.0000172 0.000239 0.000273 1985 3 24 46148 -0.199161 0.194466 -0.2926000 0.0020794 0.000351 -0.000823 0.000397 0.000385 0.0000146 0.0000148 0.000236 0.000281 1985 3 25 46149 -0.199145 0.198772 -0.2946109 0.0019453 0.000343 -0.000649 0.000452 0.000437 0.0000146 0.0000146 0.000236 0.000281 1985 3 26 46150 -0.198777 0.202884 -0.2964838 0.0018021 0.000372 -0.000515 0.000593 0.000572 0.0000146 0.0000146 0.000236 0.000281 1985 3 27 46151 -0.198410 0.206658 -0.2982179 0.0016653 0.000441 -0.000449 0.001346 0.001229 0.0000146 0.0000133 0.000236 0.000281 1985 3 28 46152 -0.198601 0.210608 -0.2998260 0.0015485 0.000537 -0.000442 0.003441 0.002466 0.0000120 0.0000132 0.000215 0.000316 1985 3 29 46153 -0.199399 0.214980 -0.3013340 0.0014673 0.000642 -0.000460 0.000600 0.000772 0.0000118 0.0000119 0.000214 0.000320 1985 3 30 46154 -0.200138 0.219267 -0.3027867 0.0014434 0.000729 -0.000466 0.000405 0.000532 0.0000118 0.0000118 0.000214 0.000320 1985 3 31 46155 -0.200289 0.223107 -0.3042534 0.0015027 0.000773 -0.000436 0.000593 0.000768 0.0000118 0.0000118 0.000214 0.000320 1985 4 1 46156 -0.200237 0.227075 -0.3058271 0.0016628 0.000764 -0.000377 0.001502 0.001714 0.0000118 0.0000137 0.000214 0.000320 1985 4 2 46157 -0.200731 0.231396 -0.3076069 0.0019141 0.000706 -0.000325 0.002907 0.001992 0.0000156 0.0000139 0.000247 0.000237 1985 4 3 46158 -0.202035 0.235522 -0.3096630 0.0022062 0.000623 -0.000317 0.001169 0.001095 0.0000161 0.0000158 0.000250 0.000233 1985 4 4 46159 -0.203614 0.239258 -0.3119972 0.0024543 0.000548 -0.000372 0.000666 0.000673 0.0000161 0.0000161 0.000250 0.000233 1985 4 5 46160 -0.204383 0.243524 -0.3145216 0.0025695 0.000511 -0.000475 0.000831 0.000844 0.0000161 0.0000161 0.000250 0.000233 1985 4 6 46161 -0.204286 0.247852 -0.3170733 0.0024996 0.000520 -0.000584 0.001652 0.001639 0.0000161 0.0000165 0.000250 0.000233 1985 4 7 46162 -0.203722 0.251674 -0.3194663 0.0022573 0.000559 -0.000650 0.001032 0.001173 0.0000169 0.0000165 0.000271 0.000353 1985 4 8 46163 -0.203062 0.255080 -0.3215599 0.0019200 0.000593 -0.000639 0.000426 0.000495 0.0000170 0.0000169 0.000273 0.000375 1985 4 9 46164 -0.202563 0.258469 -0.3233102 0.0015964 0.000583 -0.000551 0.000426 0.000495 0.0000170 0.0000170 0.000273 0.000375 1985 4 10 46165 -0.202250 0.262161 -0.3247815 0.0013806 0.000510 -0.000410 0.000433 0.000504 0.0000170 0.0000170 0.000273 0.000375 1985 4 11 46166 -0.201920 0.266027 -0.3261110 0.0013154 0.000380 -0.000258 0.001280 0.001470 0.0000170 0.0000175 0.000273 0.000375 1985 4 12 46167 -0.201326 0.269764 -0.3274500 0.0013870 0.000230 -0.000146 0.006251 0.005414 0.0000180 0.0000176 0.000282 0.000377 1985 4 13 46168 -0.200459 0.273425 -0.3289132 0.0015454 0.000114 -0.000113 0.000969 0.001034 0.0000182 0.0000181 0.000283 0.000377 1985 4 14 46169 -0.199640 0.277552 -0.3305577 0.0017355 0.000083 -0.000185 0.000694 0.000738 0.0000182 0.0000182 0.000283 0.000377 1985 4 15 46170 -0.199083 0.282203 -0.3323903 0.0019155 0.000164 -0.000362 0.000978 0.001010 0.0000182 0.0000182 0.000283 0.000377 1985 4 16 46171 -0.198510 0.286200 -0.3343855 0.0020611 0.000338 -0.000600 0.001828 0.001677 0.0000181 0.0000149 0.000283 0.000377 1985 4 17 46172 -0.197935 0.289123 -0.3365012 0.0021593 0.000536 -0.000802 0.002863 0.003299 0.0000117 0.0000148 0.000332 0.000204 1985 4 18 46173 -0.197595 0.291634 -0.3386866 0.0022033 0.000659 -0.000837 0.001044 0.001081 0.0000114 0.0000115 0.000338 0.000198 1985 4 19 46174 -0.197481 0.294665 -0.3408867 0.0021904 0.000623 -0.000598 0.000511 0.000521 0.0000114 0.0000114 0.000338 0.000198 1985 4 20 46175 -0.197168 0.298532 -0.3430461 0.0021211 0.000417 -0.000085 0.000560 0.000568 0.0000114 0.0000114 0.000338 0.000198 1985 4 21 46176 -0.196576 0.302397 -0.3451109 0.0019982 0.000151 0.000518 0.001964 0.001805 0.0000114 0.0000125 0.000338 0.000198 1985 4 22 46177 -0.196008 0.305532 -0.3470315 0.0018313 0.000015 0.000896 0.003366 0.002808 0.0000135 0.0000126 0.000214 0.000244 1985 4 23 46178 -0.195712 0.308702 -0.3487721 0.0016430 0.000169 0.000759 0.000494 0.000579 0.0000139 0.0000141 0.000210 0.000252 1985 4 24 46179 -0.195708 0.312959 -0.3503261 0.0014711 0.000624 0.000044 0.000514 0.000601 0.0000148 0.0000164 0.000222 0.000263 1985 4 25 46180 -0.195813 0.318044 -0.3517317 0.0013623 0.001192 -0.000982 0.000774 0.000880 0.0000190 0.0000202 0.000277 0.000307 1985 4 26 46181 -0.195763 0.321641 -0.3530743 0.0013420 0.001521 -0.001756 0.002463 0.002147 0.0000257 0.0000217 0.000354 0.000355 1985 4 27 46182 -0.195773 0.324037 -0.3544436 0.0014041 0.001422 -0.001904 0.005067 0.002958 0.0000243 0.0000198 0.000371 0.000376 1985 4 28 46183 -0.196000 0.326977 -0.3559125 0.0015358 0.000992 -0.001459 0.000591 0.000563 0.0000138 0.0000191 0.000311 0.000463 1985 4 29 46184 -0.196057 0.330661 -0.3575426 0.0017308 0.000501 -0.000750 0.000498 0.000476 0.0000138 0.0000138 0.000311 0.000464 1985 4 30 46185 -0.195549 0.334573 -0.3593902 0.0019834 0.000214 -0.000173 0.000736 0.000702 0.0000138 0.0000144 0.000311 0.000464 1985 5 1 46186 -0.194529 0.338598 -0.3615045 0.0022660 0.000213 0.000033 0.001811 0.001709 0.0000150 0.0000628 0.000340 0.000493 1985 5 2 46187 -0.193343 0.342553 -0.3638903 0.0025116 0.000397 -0.000123 0.005183 0.004936 0.0001118 0.0000308 0.001754 0.000846 1985 5 3 46188 -0.192191 0.346110 -0.3664738 0.0026355 0.000591 -0.000448 0.001919 0.001864 0.0000466 0.0000684 0.000797 0.000711 1985 5 4 46189 -0.190876 0.349453 -0.3691015 0.0025667 0.000680 -0.000689 0.000986 0.000936 0.0000249 0.0000338 0.000434 0.000520 1985 5 5 46190 -0.188912 0.353261 -0.3715626 0.0023017 0.000671 -0.000585 0.000895 0.000871 0.0000209 0.0000381 0.000365 0.000461 1985 5 6 46191 -0.186116 0.357009 -0.3736903 0.0019247 0.000651 -0.000282 0.003794 0.003428 0.0000513 0.0000515 0.000843 0.000844 1985 5 7 46192 -0.183189 0.359868 -0.3754291 0.0015621 0.000673 -0.000147 0.006496 0.002631 0.0000822 0.0000443 0.000801 0.000505 1985 5 8 46193 -0.181736 0.362661 -0.3768524 0.0013380 0.000676 -0.000356 0.002046 0.000998 0.0000373 0.0000518 0.000426 0.000299 1985 5 9 46194 -0.182479 0.367075 -0.3781475 0.0013105 0.000470 -0.000607 0.000967 0.000604 0.0000214 0.0000264 0.000337 0.000349 1985 5 10 46195 -0.180902 0.370972 -0.3795073 0.0014047 0.000205 -0.000548 0.000586 0.000452 0.0000156 0.0000177 0.000304 0.000260 1985 5 11 46196 -0.177926 0.373844 -0.3809769 0.0015061 0.000121 -0.000463 0.000543 0.000446 0.0000140 0.0000195 0.000293 0.000205 1985 5 12 46197 -0.176166 0.376777 -0.3825265 0.0015888 0.000288 -0.000668 0.001466 0.001191 0.0000234 0.0000228 0.000464 0.000343 1985 5 13 46198 -0.174266 0.379982 -0.3841517 0.0016726 0.000577 -0.000993 0.001527 0.001257 0.0000316 0.0000207 0.000458 0.000663 1985 5 14 46199 -0.171937 0.383463 -0.3858618 0.0017569 0.000758 -0.001093 0.000767 0.000635 0.0000180 0.0000255 0.000271 0.000384 1985 5 15 46200 -0.169828 0.387102 -0.3876504 0.0018147 0.000683 -0.000740 0.000697 0.000598 0.0000195 0.0000158 0.000282 0.000320 1985 5 16 46201 -0.167890 0.390456 -0.3894724 0.0018117 0.000376 -0.000111 0.000404 0.000368 0.0000136 0.0000152 0.000185 0.000170 1985 5 17 46202 -0.166217 0.393176 -0.3912539 0.0017334 0.000051 0.000248 0.000494 0.000448 0.0000110 0.0000140 0.000149 0.000136 1985 5 18 46203 -0.164907 0.395631 -0.3929214 0.0015927 -0.000123 0.000061 0.000813 0.000762 0.0000145 0.0000140 0.000202 0.000208 1985 5 19 46204 -0.163273 0.398119 -0.3944266 0.0014175 -0.000139 -0.000476 0.000642 0.000658 0.0000171 0.0000158 0.000243 0.000287 1985 5 20 46205 -0.160473 0.400641 -0.3957515 0.0012374 -0.000080 -0.000986 0.000709 0.000727 0.0000171 0.0000171 0.000244 0.000288 1985 5 21 46206 -0.156662 0.403319 -0.3969063 0.0010788 -0.000016 -0.001216 0.002416 0.002616 0.0000171 0.0000166 0.000244 0.000288 1985 5 22 46207 -0.152746 0.406316 -0.3979242 0.0009643 0.000025 -0.001137 0.003763 0.004306 0.0000162 0.0000166 0.000341 0.000231 1985 5 23 46208 -0.149310 0.409452 -0.3988582 0.0009129 0.000050 -0.000876 0.000629 0.000604 0.0000161 0.0000161 0.000357 0.000227 1985 5 24 46209 -0.146269 0.412289 -0.3997779 0.0009408 0.000067 -0.000598 0.000547 0.000524 0.0000161 0.0000161 0.000357 0.000227 1985 5 25 46210 -0.143259 0.414647 -0.4007679 0.0010608 0.000077 -0.000419 0.000550 0.000527 0.0000161 0.0000161 0.000357 0.000227 1985 5 26 46211 -0.140107 0.416987 -0.4019234 0.0012760 0.000072 -0.000368 0.001283 0.001227 0.0000161 0.0000150 0.000356 0.000227 1985 5 27 46212 -0.136969 0.419899 -0.4033350 0.0015675 0.000053 -0.000410 0.004138 0.004031 0.0000140 0.0000150 0.000188 0.000314 1985 5 28 46213 -0.134189 0.423242 -0.4050590 0.0018845 0.000037 -0.000484 0.000780 0.000809 0.0000139 0.0000139 0.000183 0.000326 1985 5 29 46214 -0.132066 0.425932 -0.4070851 0.0021505 0.000052 -0.000536 0.000488 0.000506 0.0000139 0.0000139 0.000183 0.000326 1985 5 30 46215 -0.130370 0.427568 -0.4093210 0.0022873 0.000117 -0.000526 0.000672 0.000688 0.0000139 0.0000139 0.000183 0.000326 1985 5 31 46216 -0.128110 0.429829 -0.4116083 0.0022484 0.000231 -0.000444 0.001233 0.001206 0.0000139 0.0000139 0.000183 0.000326 1985 6 1 46217 -0.125319 0.432795 -0.4137691 0.0020422 0.000372 -0.000308 0.003538 0.003491 0.0000140 0.0000139 0.000322 0.000232 1985 6 2 46218 -0.122724 0.435257 -0.4156637 0.0017330 0.000499 -0.000156 0.001122 0.001481 0.0000140 0.0000140 0.000358 0.000227 1985 6 3 46219 -0.120536 0.436972 -0.4172360 0.0014166 0.000573 -0.000032 0.000526 0.000716 0.0000140 0.0000140 0.000358 0.000227 1985 6 4 46220 -0.118144 0.439258 -0.4185254 0.0011814 0.000573 0.000023 0.000522 0.000710 0.0000140 0.0000140 0.000358 0.000227 1985 6 5 46221 -0.115314 0.442206 -0.4196416 0.0010754 0.000506 -0.000007 0.001925 0.002540 0.0000140 0.0000134 0.000358 0.000227 1985 6 6 46222 -0.112417 0.444688 -0.4207170 0.0010954 0.000402 -0.000108 0.003903 0.004257 0.0000128 0.0000133 0.000272 0.000350 1985 6 7 46223 -0.109887 0.446265 -0.4218597 0.0011996 0.000296 -0.000246 0.000456 0.000537 0.0000127 0.0000127 0.000267 0.000376 1985 6 8 46224 -0.107853 0.447718 -0.4231271 0.0013337 0.000221 -0.000379 0.000377 0.000443 0.0000127 0.0000127 0.000267 0.000376 1985 6 9 46225 -0.106139 0.449932 -0.4245248 0.0014531 0.000187 -0.000472 0.000377 0.000444 0.0000127 0.0000127 0.000267 0.000376 1985 6 10 46226 -0.104363 0.452753 -0.4260225 0.0015306 0.000192 -0.000511 0.000687 0.000809 0.0000127 0.0000148 0.000267 0.000376 1985 6 11 46227 -0.102207 0.455240 -0.4275706 0.0015531 0.000228 -0.000503 0.003934 0.004707 0.0000168 0.0000151 0.000309 0.000300 1985 6 12 46228 -0.099742 0.456798 -0.4291105 0.0015148 0.000295 -0.000465 0.001125 0.001114 0.0000175 0.0000171 0.000314 0.000295 1985 6 13 46229 -0.097579 0.458028 -0.4305811 0.0014180 0.000397 -0.000417 0.000619 0.000605 0.0000175 0.0000175 0.000314 0.000295 1985 6 14 46230 -0.096127 0.459948 -0.4319292 0.0012772 0.000533 -0.000380 0.000847 0.000809 0.0000175 0.0000174 0.000314 0.000295 1985 6 15 46231 -0.094474 0.462244 -0.4331226 0.0011177 0.000672 -0.000384 0.001553 0.001354 0.0000174 0.0000154 0.000314 0.000295 1985 6 16 46232 -0.092076 0.464293 -0.4341583 0.0009674 0.000758 -0.000455 0.002136 0.002140 0.0000134 0.0000154 0.000192 0.000196 1985 6 17 46233 -0.089231 0.465817 -0.4350597 0.0008463 0.000744 -0.000581 0.000963 0.001044 0.0000133 0.0000137 0.000189 0.000192 1985 6 18 46234 -0.086430 0.466866 -0.4358631 0.0007609 0.000640 -0.000696 0.000588 0.000630 0.0000139 0.0000113 0.000204 0.000195 1985 6 19 46235 -0.083661 0.467616 -0.4366032 0.0007100 0.000534 -0.000695 0.000481 0.000455 0.0000092 0.0000089 0.000242 0.000185 1985 6 20 46236 -0.080432 0.468829 -0.4373119 0.0007009 0.000603 -0.000391 0.000227 0.000209 0.0000038 0.0000061 0.000140 0.000123 1985 6 21 46237 -0.077278 0.470420 -0.4380356 0.0007601 0.000727 -0.000156 0.000176 0.000163 0.0000029 0.0000044 0.000110 0.000102 1985 6 22 46238 -0.074822 0.471837 -0.4388576 0.0009164 0.000727 -0.000354 0.000283 0.000267 0.0000049 0.0000097 0.000169 0.000158 1985 6 23 46239 -0.072762 0.473006 -0.4398826 0.0011644 0.000621 -0.000845 0.000604 0.000642 0.0000164 0.0000109 0.000302 0.000289 1985 6 24 46240 -0.070437 0.474088 -0.4411855 0.0014507 0.000513 -0.001302 0.000614 0.000655 0.0000169 0.0000167 0.000304 0.000291 1985 6 25 46241 -0.067463 0.475099 -0.4427666 0.0016962 0.000493 -0.001489 0.001454 0.001324 0.0000169 0.0000157 0.000304 0.000291 1985 6 26 46242 -0.063902 0.475956 -0.4445457 0.0018304 0.000583 -0.001375 0.004924 0.002200 0.0000145 0.0000156 0.000235 0.000299 1985 6 27 46243 -0.060109 0.476776 -0.4463854 0.0018113 0.000752 -0.001070 0.000884 0.001192 0.0000143 0.0000144 0.000232 0.000300 1985 6 28 46244 -0.056494 0.478076 -0.4481254 0.0016327 0.000928 -0.000729 0.000566 0.000837 0.0000143 0.0000143 0.000232 0.000300 1985 6 29 46245 -0.053238 0.480016 -0.4496190 0.0013282 0.001043 -0.000461 0.000740 0.001061 0.0000143 0.0000143 0.000232 0.000300 1985 6 30 46246 -0.050126 0.481598 -0.4507721 0.0009682 0.001058 -0.000295 0.001132 0.001489 0.0000143 0.0000164 0.000232 0.000300 1985 7 1 46247 -0.047125 0.482621 0.5484282 0.0006424 0.000977 -0.000205 0.002133 0.002027 0.0000185 0.0000167 0.000268 0.000247 1985 7 2 46248 -0.044372 0.483467 0.5479067 0.0004286 0.000834 -0.000156 0.001206 0.001215 0.0000190 0.0000188 0.000272 0.000244 1985 7 3 46249 -0.041953 0.484400 0.5475279 0.0003609 0.000677 -0.000128 0.000783 0.000806 0.0000190 0.0000190 0.000272 0.000244 1985 7 4 46250 -0.039700 0.484922 0.5471498 0.0004144 0.000550 -0.000122 0.000737 0.000757 0.0000190 0.0000189 0.000272 0.000244 1985 7 5 46251 -0.037095 0.485492 0.5466804 0.0005255 0.000480 -0.000155 0.001933 0.001629 0.0000188 0.0000185 0.000243 0.000221 1985 7 6 46252 -0.033834 0.486919 0.5460971 0.0006320 0.000469 -0.000238 0.000897 0.000651 0.0000180 0.0000184 0.000180 0.000167 1985 7 7 46253 -0.030401 0.487988 0.5454271 0.0007020 0.000492 -0.000364 0.000562 0.000432 0.0000179 0.0000178 0.000189 0.000180 1985 7 8 46254 -0.027219 0.487461 0.5447105 0.0007379 0.000510 -0.000505 0.000529 0.000495 0.0000175 0.0000176 0.000229 0.000249 1985 7 9 46255 -0.023762 0.486612 0.5439714 0.0007441 0.000477 -0.000612 0.000519 0.000556 0.0000174 0.0000174 0.000268 0.000361 1985 7 10 46256 -0.019948 0.487042 0.5432425 0.0007106 0.000381 -0.000662 0.001215 0.001248 0.0000173 0.0000161 0.000276 0.000398 1985 7 11 46257 -0.016249 0.488950 0.5425683 0.0006330 0.000254 -0.000663 0.002709 0.002247 0.0000148 0.0000160 0.000239 0.000217 1985 7 12 46258 -0.012774 0.491119 0.5419899 0.0005215 0.000149 -0.000644 0.000815 0.001037 0.0000146 0.0000147 0.000237 0.000212 1985 7 13 46259 -0.008738 0.491784 0.5415321 0.0003946 0.000122 -0.000640 0.000559 0.000740 0.0000146 0.0000146 0.000237 0.000212 1985 7 14 46260 -0.003851 0.490774 0.5411996 0.0002722 0.000199 -0.000684 0.000704 0.000918 0.0000146 0.0000146 0.000237 0.000212 1985 7 15 46261 0.000377 0.490534 0.5409782 0.0001718 0.000353 -0.000775 0.001003 0.001254 0.0000146 0.0000143 0.000237 0.000212 1985 7 16 46262 0.003429 0.491526 0.5408374 0.0001125 0.000520 -0.000885 0.002741 0.001983 0.0000139 0.0000143 0.000399 0.000433 1985 7 17 46263 0.005976 0.492634 0.5407259 0.0001199 0.000622 -0.000963 0.001148 0.001114 0.0000139 0.0000142 0.000427 0.000490 1985 7 18 46264 0.009073 0.492940 0.5405649 0.0002200 0.000616 -0.000967 0.000627 0.000651 0.0000145 0.0000176 0.000447 0.000513 1985 7 19 46265 0.013053 0.493275 0.5402550 0.0004186 0.000516 -0.000886 0.000674 0.000699 0.0000213 0.0000291 0.000651 0.000745 1985 7 20 46266 0.016873 0.494215 0.5397078 0.0006867 0.000407 -0.000757 0.001363 0.001008 0.0000437 0.0000196 0.000489 0.000498 1985 7 21 46267 0.019601 0.495302 0.5388802 0.0009651 0.000363 -0.000624 0.000586 0.000375 0.0000179 0.0000299 0.000152 0.000154 1985 7 22 46268 0.021997 0.495792 0.5377967 0.0011852 0.000390 -0.000512 0.000486 0.000339 0.0000162 0.0000165 0.000153 0.000153 1985 7 23 46269 0.025063 0.495591 0.5365451 0.0012951 0.000451 -0.000410 0.000465 0.000502 0.0000151 0.0000155 0.000245 0.000223 1985 7 24 46270 0.028796 0.495351 0.5352494 0.0012718 0.000507 -0.000296 0.000469 0.000586 0.0000149 0.0000195 0.000297 0.000254 1985 7 25 46271 0.032601 0.495290 0.5340421 0.0011221 0.000521 -0.000197 0.001421 0.001583 0.0000239 0.0001190 0.000442 0.000377 1985 7 26 46272 0.035910 0.495186 0.5330346 0.0008803 0.000486 -0.000170 0.003591 0.002917 0.0002232 0.0000380 0.000841 0.000721 1985 7 27 46273 0.038813 0.495113 0.5322926 0.0006026 0.000423 -0.000253 0.001473 0.001189 0.0000522 0.0001221 0.000479 0.000369 1985 7 28 46274 0.041980 0.495524 0.5318192 0.0003568 0.000360 -0.000407 0.000535 0.000429 0.0000210 0.0000357 0.000196 0.000145 1985 7 29 46275 0.045587 0.495892 0.5315500 0.0002063 0.000330 -0.000531 0.000663 0.000527 0.0000193 0.0000201 0.000179 0.000132 1985 7 30 46276 0.049713 0.495702 0.5313671 0.0001862 0.000333 -0.000562 0.001298 0.000995 0.0000192 0.0000176 0.000179 0.000132 1985 7 31 46277 0.053492 0.495364 0.5311395 0.0002865 0.000339 -0.000513 0.002335 0.001766 0.0000160 0.0000174 0.000257 0.000218 1985 8 1 46278 0.055713 0.495607 0.5307681 0.0004606 0.000308 -0.000445 0.001024 0.001118 0.0000155 0.0000157 0.000330 0.000370 1985 8 2 46279 0.056926 0.496130 0.5302096 0.0006516 0.000208 -0.000431 0.000586 0.000706 0.0000155 0.0000155 0.000330 0.000370 1985 8 3 46280 0.060127 0.495109 0.5294720 0.0008170 0.000033 -0.000520 0.000706 0.000857 0.0000155 0.0000156 0.000330 0.000370 1985 8 4 46281 0.064630 0.493592 0.5285932 0.0009357 -0.000169 -0.000719 0.001404 0.001642 0.0000156 0.0000365 0.000333 0.000373 1985 8 5 46282 0.068500 0.493051 0.5276229 0.0009992 -0.000302 -0.000981 0.001608 0.001589 0.0000576 0.0000264 0.001264 0.000865 1985 8 6 46283 0.071430 0.493361 0.5266176 0.0009998 -0.000258 -0.001222 0.000676 0.000662 0.0000373 0.0000416 0.000887 0.000551 1985 8 7 46284 0.074209 0.493695 0.5256439 0.0009280 0.000016 -0.001343 0.000676 0.000661 0.0000257 0.0000291 0.000629 0.000383 1985 8 8 46285 0.077658 0.493460 0.5247774 0.0007827 0.000506 -0.001227 0.000709 0.000694 0.0000209 0.0000214 0.000515 0.000312 1985 8 9 46286 0.081699 0.492880 0.5240870 0.0005825 0.001009 -0.000880 0.001663 0.001467 0.0000171 0.0000166 0.000277 0.000217 1985 8 10 46287 0.085651 0.492437 0.5236124 0.0003657 0.001184 -0.000471 0.000626 0.000477 0.0000123 0.0000150 0.000138 0.000126 1985 8 11 46288 0.089083 0.492056 0.5233473 0.0001819 0.000833 -0.000195 0.000359 0.000273 0.0000130 0.0000143 0.000148 0.000136 1985 8 12 46289 0.092211 0.491114 0.5232325 0.0000793 0.000077 -0.000158 0.000493 0.000389 0.0000163 0.0000164 0.000206 0.000194 1985 8 13 46290 0.095561 0.489196 0.5231649 0.0000862 -0.000624 -0.000295 0.001033 0.000886 0.0000198 0.0000184 0.000299 0.000302 1985 8 14 46291 0.099218 0.487362 0.5230292 0.0002056 -0.000901 -0.000493 0.002061 0.001698 0.0000206 0.0000173 0.000329 0.000342 1985 8 15 46292 0.102529 0.486412 0.5227199 0.0004245 -0.000686 -0.000666 0.002436 0.003339 0.0000149 0.0000176 0.000316 0.000212 1985 8 16 46293 0.104925 0.485906 0.5221521 0.0007157 -0.000153 -0.000748 0.001306 0.001279 0.0000146 0.0000147 0.000315 0.000207 1985 8 17 46294 0.106944 0.485191 0.5212770 0.0010318 0.000416 -0.000710 0.000692 0.000623 0.0000146 0.0000146 0.000315 0.000207 1985 8 18 46295 0.109934 0.484281 0.5201014 0.0013082 0.000796 -0.000557 0.000701 0.000628 0.0000146 0.0000146 0.000315 0.000207 1985 8 19 46296 0.114029 0.483522 0.5186973 0.0014817 0.000908 -0.000338 0.002697 0.002429 0.0000146 0.0000143 0.000315 0.000207 1985 8 20 46297 0.118179 0.483128 0.5171884 0.0015160 0.000792 -0.000145 0.004746 0.004952 0.0000140 0.0000143 0.000382 0.000295 1985 8 21 46298 0.121580 0.482919 0.5157144 0.0014146 0.000542 -0.000081 0.000638 0.000661 0.0000140 0.0000140 0.000389 0.000307 1985 8 22 46299 0.124347 0.482394 0.5143937 0.0012118 0.000251 -0.000199 0.000558 0.000575 0.0000140 0.0000140 0.000389 0.000307 1985 8 23 46300 0.127096 0.481143 0.5133032 0.0009549 -0.000002 -0.000462 0.000604 0.000623 0.0000140 0.0000130 0.000382 0.000304 1985 8 24 46301 0.130242 0.479184 0.5124741 0.0006946 -0.000168 -0.000730 0.000876 0.001036 0.0000119 0.0000128 0.000193 0.000196 1985 8 25 46302 0.133446 0.477156 0.5118869 0.0004858 -0.000210 -0.000848 0.000561 0.000696 0.0000116 0.0000123 0.000179 0.000184 1985 8 26 46303 0.135404 0.476453 0.5114656 0.0003822 -0.000116 -0.000740 0.000480 0.000586 0.0000126 0.0000149 0.000196 0.000193 1985 8 27 46304 0.137182 0.476268 0.5110853 0.0004148 0.000117 -0.000484 0.000676 0.000729 0.0000183 0.0000159 0.000294 0.000225 1985 8 28 46305 0.141111 0.474519 0.5106071 0.0005732 0.000452 -0.000252 0.000988 0.001007 0.0000191 0.0000187 0.000309 0.000229 1985 8 29 46306 0.145837 0.472202 0.5099242 0.0008093 0.000792 -0.000176 0.001758 0.001566 0.0000191 0.0000287 0.000310 0.000229 1985 8 30 46307 0.149030 0.470416 0.5089896 0.0010597 0.001004 -0.000294 0.002470 0.002267 0.0000382 0.0000314 0.000579 0.000356 1985 8 31 46308 0.150370 0.468817 0.5078190 0.0012670 0.000970 -0.000559 0.001984 0.002031 0.0000437 0.0000422 0.000647 0.000379 1985 9 1 46309 0.151701 0.467033 0.5064778 0.0013927 0.000642 -0.000878 0.001379 0.001563 0.0000462 0.0000560 0.000684 0.000402 1985 9 2 46310 0.155051 0.465473 0.5050586 0.0014226 0.000097 -0.001137 0.001928 0.002213 0.0000684 0.0001066 0.001001 0.000591 1985 9 3 46311 0.158414 0.463834 0.5036562 0.0013642 -0.000486 -0.001285 0.003612 0.003626 0.0001669 0.0000510 0.002180 0.001374 1985 9 4 46312 0.160983 0.460731 0.5023493 0.0012389 -0.000827 -0.001238 0.002479 0.002411 0.0000337 0.0000947 0.000382 0.000270 1985 9 5 46313 0.163499 0.457482 0.5011903 0.0010744 -0.000692 -0.000921 0.000892 0.000985 0.0000225 0.0000276 0.000270 0.000197 1985 9 6 46314 0.165890 0.457101 0.5002030 0.0008972 -0.000084 -0.000373 0.000684 0.000821 0.0000215 0.0000216 0.000284 0.000221 1985 9 7 46315 0.168528 0.457629 0.4993891 0.0007333 0.000676 0.000186 0.000589 0.000737 0.0000207 0.0000209 0.000301 0.000255 1985 9 8 46316 0.171546 0.456155 0.4987216 0.0006133 0.001210 0.000493 0.000867 0.001059 0.0000202 0.0000187 0.000311 0.000282 1985 9 9 46317 0.174339 0.453592 0.4981409 0.0005676 0.001335 0.000409 0.005796 0.002581 0.0000167 0.0000184 0.000337 0.000463 1985 9 10 46318 0.176406 0.451931 0.4975592 0.0006179 0.001085 -0.000051 0.001578 0.001107 0.0000167 0.0000171 0.000337 0.000495 1985 9 11 46319 0.178000 0.450961 0.4968731 0.0007713 0.000637 -0.000725 0.000838 0.000603 0.0000175 0.0000192 0.000328 0.000531 1985 9 12 46320 0.179913 0.448642 0.4959847 0.0010141 0.000200 -0.001360 0.001069 0.000774 0.0000217 0.0000223 0.000302 0.000746 1985 9 13 46321 0.182187 0.445928 0.4948225 0.0013175 -0.000093 -0.001673 0.001693 0.001227 0.0000271 0.0000240 0.000287 0.001278 1985 9 14 46322 0.184239 0.443673 0.4933482 0.0016367 -0.000207 -0.001556 0.004807 0.001950 0.0000264 0.0000222 0.000284 0.001008 1985 9 15 46323 0.185561 0.441240 0.4915755 0.0019033 -0.000187 -0.001117 0.001641 0.001222 0.0000174 0.0000219 0.000283 0.000405 1985 9 16 46324 0.186433 0.438394 0.4895919 0.0020418 -0.000128 -0.000585 0.000800 0.000679 0.0000173 0.0000174 0.000283 0.000404 1985 9 17 46325 0.187661 0.435826 0.4875513 0.0020061 -0.000111 -0.000187 0.000847 0.000722 0.0000173 0.0000173 0.000283 0.000404 1985 9 18 46326 0.189284 0.433741 0.4856286 0.0018096 -0.000158 -0.000041 0.003106 0.002535 0.0000173 0.0000193 0.000283 0.000404 1985 9 19 46327 0.190758 0.431745 0.4839561 0.0015222 -0.000234 -0.000139 0.004923 0.004280 0.0000213 0.0000195 0.000323 0.000300 1985 9 20 46328 0.191998 0.429502 0.4825788 0.0012379 -0.000268 -0.000396 0.000728 0.000916 0.0000217 0.0000215 0.000327 0.000294 1985 9 21 46329 0.193527 0.426981 0.4814519 0.0010347 -0.000199 -0.000696 0.000640 0.000815 0.0000217 0.0000217 0.000327 0.000294 1985 9 22 46330 0.195773 0.424374 0.4804699 0.0009533 -0.000012 -0.000950 0.000643 0.000819 0.0000217 0.0000217 0.000327 0.000294 1985 9 23 46331 0.198431 0.421973 0.4795063 0.0009958 0.000239 -0.001100 0.001467 0.001926 0.0000217 0.0000204 0.000327 0.000294 1985 9 24 46332 0.200767 0.419971 0.4784478 0.0011383 0.000434 -0.001110 0.005795 0.005175 0.0000192 0.0000204 0.000321 0.000299 1985 9 25 46333 0.202439 0.418259 0.4772119 0.0013444 0.000432 -0.000967 0.001285 0.001276 0.0000190 0.0000191 0.000320 0.000299 1985 9 26 46334 0.203951 0.416444 0.4757554 0.0015704 0.000151 -0.000678 0.000790 0.000788 0.0000190 0.0000190 0.000320 0.000299 1985 9 27 46335 0.205914 0.414194 0.4740804 0.0017676 -0.000355 -0.000306 0.001106 0.001100 0.0000190 0.0000183 0.000320 0.000299 1985 9 28 46336 0.208021 0.411516 0.4722391 0.0018910 -0.000866 0.000017 0.001898 0.001904 0.0000175 0.0000137 0.000294 0.000296 1985 9 29 46337 0.209604 0.408585 0.4703225 0.0019166 -0.001091 0.000144 0.000369 0.000440 0.0000083 0.0000132 0.000138 0.000241 1985 9 30 46338 0.210335 0.405546 0.4684308 0.0018534 -0.000855 -0.000016 0.000359 0.000427 0.0000089 0.0000095 0.000148 0.000250 1985 10 1 46339 0.210562 0.402495 0.4666375 0.0017381 -0.000226 -0.000427 0.000424 0.000503 0.0000107 0.0000113 0.000179 0.000275 1985 10 2 46340 0.211030 0.399628 0.4649702 0.0016070 0.000448 -0.000893 0.000658 0.000769 0.0000137 0.0000133 0.000236 0.000304 1985 10 3 46341 0.212312 0.396714 0.4634303 0.0014762 0.000827 -0.001228 0.002190 0.002152 0.0000160 0.0000164 0.000282 0.000320 1985 10 4 46342 0.214044 0.393485 0.4620143 0.0013513 0.000800 -0.001365 0.002941 0.002406 0.0000191 0.0000176 0.000325 0.000553 1985 10 5 46343 0.215031 0.390329 0.4607145 0.0012437 0.000475 -0.001342 0.001373 0.001299 0.0000193 0.0000192 0.000327 0.000596 1985 10 6 46344 0.214914 0.387507 0.4595065 0.0011771 0.000069 -0.001246 0.000935 0.000944 0.0000193 0.0000193 0.000327 0.000596 1985 10 7 46345 0.215389 0.384413 0.4583349 0.0011846 -0.000227 -0.001162 0.000785 0.000810 0.0000193 0.0000193 0.000327 0.000596 1985 10 8 46346 0.217511 0.380927 0.4571085 0.0012953 -0.000342 -0.001115 0.002029 0.002428 0.0000193 0.0000173 0.000327 0.000595 1985 10 9 46347 0.220195 0.377927 0.4557139 0.0015180 -0.000316 -0.001091 0.002981 0.005243 0.0000153 0.0000172 0.000263 0.000341 1985 10 10 46348 0.222071 0.375862 0.4540456 0.0018289 -0.000230 -0.001057 0.000705 0.000867 0.0000151 0.0000152 0.000259 0.000332 1985 10 11 46349 0.222908 0.373970 0.4520419 0.0021697 -0.000151 -0.000995 0.000496 0.000605 0.0000151 0.0000151 0.000259 0.000332 1985 10 12 46350 0.223217 0.371201 0.4497152 0.0024575 -0.000112 -0.000905 0.000494 0.000603 0.0000151 0.0000151 0.000259 0.000332 1985 10 13 46351 0.223437 0.367434 0.4471636 0.0026112 -0.000120 -0.000815 0.000530 0.000644 0.0000151 0.0000144 0.000259 0.000332 1985 10 14 46352 0.223725 0.363501 0.4445504 0.0025851 -0.000176 -0.000756 0.002507 0.001871 0.0000138 0.0000144 0.000246 0.000304 1985 10 15 46353 0.224111 0.360240 0.4420541 0.0023913 -0.000282 -0.000750 0.001066 0.001050 0.0000137 0.0000137 0.000245 0.000302 1985 10 16 46354 0.224592 0.357654 0.4398100 0.0020964 -0.000421 -0.000795 0.000589 0.000617 0.0000137 0.0000137 0.000245 0.000302 1985 10 17 46355 0.225203 0.354840 0.4378713 0.0017921 -0.000540 -0.000858 0.000640 0.000671 0.0000137 0.0000143 0.000245 0.000302 1985 10 18 46356 0.225615 0.351766 0.4362037 0.0015599 -0.000538 -0.000881 0.001953 0.001781 0.0000150 0.0000458 0.000269 0.000329 1985 10 19 46357 0.225721 0.349058 0.4347093 0.0014477 -0.000327 -0.000831 0.003708 0.002968 0.0000779 0.0000226 0.001181 0.000985 1985 10 20 46358 0.226086 0.346727 0.4332627 0.0014632 0.000080 -0.000736 0.001424 0.001410 0.0000301 0.0000469 0.000459 0.000574 1985 10 21 46359 0.226799 0.344393 0.4317467 0.0015823 0.000532 -0.000682 0.000746 0.000741 0.0000158 0.0000217 0.000242 0.000330 1985 10 22 46360 0.226731 0.341876 0.4300773 0.0017619 0.000713 -0.000843 0.000628 0.000624 0.0000133 0.0000244 0.000203 0.000280 1985 10 23 46361 0.225857 0.339108 0.4282172 0.0019549 0.000565 -0.001090 0.001674 0.001669 0.0000329 0.0000708 0.000492 0.000648 1985 10 24 46362 0.225485 0.336032 0.4261738 0.0021227 0.000292 -0.001115 0.004800 0.004148 0.0001283 0.0000265 0.001803 0.001549 1985 10 25 46363 0.226568 0.332689 0.4239869 0.0022404 0.000117 -0.000786 0.000773 0.000760 0.0000201 0.0000698 0.000470 0.000690 1985 10 26 46364 0.228422 0.329308 0.4217137 0.0022946 0.000064 -0.000372 0.000539 0.000538 0.0000113 0.0000167 0.000269 0.000414 1985 10 27 46365 0.229740 0.326146 0.4194210 0.0022774 0.000033 -0.000253 0.000788 0.000787 0.0000134 0.0000272 0.000317 0.000489 1985 10 28 46366 0.230233 0.323302 0.4171811 0.0021857 -0.000017 -0.000488 0.001989 0.001744 0.0000430 0.0000169 0.000776 0.000848 1985 10 29 46367 0.230095 0.320820 0.4150673 0.0020266 -0.000047 -0.000826 0.000907 0.000643 0.0000205 0.0000293 0.000280 0.000270 1985 10 30 46368 0.229623 0.318611 0.4131383 0.0018236 -0.000013 -0.000978 0.000699 0.000508 0.0000157 0.0000190 0.000223 0.000216 1985 10 31 46369 0.229192 0.316258 0.4114208 0.0016138 0.000092 -0.000835 0.000845 0.000730 0.0000176 0.0000171 0.000311 0.000322 1985 11 1 46370 0.229091 0.313356 0.4099010 0.0014344 0.000217 -0.000534 0.001201 0.001131 0.0000185 0.0000326 0.000367 0.000401 1985 11 2 46371 0.228687 0.310609 0.4085333 0.0013108 0.000276 -0.000292 0.002994 0.002450 0.0000476 0.0001392 0.000954 0.001045 1985 11 3 46372 0.227795 0.308400 0.4072545 0.0012555 0.000202 -0.000266 0.006359 0.005083 0.0002600 0.0000448 0.004476 0.005151 1985 11 4 46373 0.227529 0.305707 0.4059947 0.0012727 -0.000001 -0.000483 0.001659 0.001599 0.0000420 0.0001418 0.000734 0.000987 1985 11 5 46374 0.227992 0.302418 0.4046814 0.0013651 -0.000244 -0.000823 0.000929 0.000896 0.0000236 0.0000326 0.000414 0.000558 1985 11 6 46375 0.228393 0.299222 0.4032391 0.0015356 -0.000410 -0.001121 0.000930 0.000896 0.0000232 0.0000234 0.000407 0.000548 1985 11 7 46376 0.228244 0.296411 0.4015922 0.0017767 -0.000437 -0.001274 0.002726 0.002483 0.0000232 0.0000201 0.000406 0.000548 1985 11 8 46377 0.227708 0.293842 0.3996824 0.0020557 -0.000343 -0.001267 0.005362 0.004528 0.0000170 0.0000200 0.000247 0.000325 1985 11 9 46378 0.227321 0.291476 0.3974999 0.0023073 -0.000202 -0.001131 0.000918 0.001078 0.0000167 0.0000168 0.000241 0.000317 1985 11 10 46379 0.227521 0.289664 0.3951110 0.0024485 -0.000098 -0.000915 0.000620 0.000732 0.0000167 0.0000167 0.000241 0.000317 1985 11 11 46380 0.228341 0.288362 0.3926608 0.0024150 -0.000090 -0.000664 0.000910 0.001043 0.0000167 0.0000167 0.000241 0.000317 1985 11 12 46381 0.229329 0.286465 0.3903348 0.0022010 -0.000174 -0.000419 0.002134 0.002022 0.0000167 0.0000184 0.000241 0.000317 1985 11 13 46382 0.229557 0.283595 0.3882884 0.0018737 -0.000288 -0.000231 0.002299 0.003558 0.0000201 0.0000186 0.000301 0.000423 1985 11 14 46383 0.228399 0.280428 0.3865822 0.0015471 -0.000344 -0.000163 0.001527 0.001774 0.0000204 0.0000203 0.000308 0.000436 1985 11 15 46384 0.226397 0.277433 0.3851585 0.0013314 -0.000272 -0.000263 0.000988 0.000974 0.0000204 0.0000204 0.000308 0.000436 1985 11 16 46385 0.225185 0.274100 0.3838696 0.0012857 -0.000064 -0.000520 0.001167 0.001068 0.0000204 0.0000204 0.000308 0.000436 1985 11 17 46386 0.224860 0.270496 0.3825419 0.0014005 0.000191 -0.000817 0.003541 0.001975 0.0000204 0.0000172 0.000308 0.000436 1985 11 18 46387 0.224630 0.267353 0.3810402 0.0016137 0.000353 -0.000967 0.003660 0.001847 0.0000140 0.0000171 0.000231 0.000268 1985 11 19 46388 0.224626 0.265077 0.3793054 0.0018456 0.000322 -0.000832 0.000647 0.000498 0.0000138 0.0000143 0.000228 0.000262 1985 11 20 46389 0.225386 0.263363 0.3773549 0.0020307 0.000111 -0.000436 0.000668 0.000519 0.0000145 0.0000116 0.000245 0.000272 1985 11 21 46390 0.226921 0.261345 0.3752591 0.0021332 -0.000132 0.000000 0.000406 0.000391 0.0000093 0.0000091 0.000274 0.000258 1985 11 22 46391 0.228096 0.258116 0.3731081 0.0021479 -0.000087 -0.000029 0.000163 0.000167 0.0000038 0.0000061 0.000156 0.000144 1985 11 23 46392 0.228374 0.254660 0.3709846 0.0020898 0.000057 -0.000265 0.000126 0.000130 0.0000029 0.0000044 0.000122 0.000115 1985 11 24 46393 0.228084 0.252322 0.3689494 0.0019794 -0.000001 -0.000271 0.000226 0.000230 0.0000051 0.0000099 0.000178 0.000188 1985 11 25 46394 0.227642 0.251037 0.3670435 0.0018329 -0.000221 -0.000068 0.000976 0.000966 0.0000169 0.0000112 0.000261 0.000381 1985 11 26 46395 0.227264 0.249893 0.3652955 0.0016625 -0.000433 0.000146 0.001446 0.001369 0.0000174 0.0000172 0.000261 0.000384 1985 11 27 46396 0.226817 0.248153 0.3637221 0.0014847 -0.000508 0.000214 0.002605 0.002134 0.0000174 0.0000209 0.000261 0.000384 1985 11 28 46397 0.226250 0.245860 0.3623200 0.0013246 -0.000421 0.000093 0.002947 0.003068 0.0000243 0.0000213 0.000453 0.000630 1985 11 29 46398 0.225652 0.243483 0.3610573 0.0012108 -0.000230 -0.000170 0.001933 0.002396 0.0000252 0.0000247 0.000488 0.000670 1985 11 30 46399 0.225075 0.241235 0.3598752 0.0011651 -0.000035 -0.000488 0.001127 0.001542 0.0000252 0.0000252 0.000488 0.000670 1985 12 1 46400 0.224359 0.238787 0.3586997 0.0011972 0.000074 -0.000781 0.001068 0.001478 0.0000252 0.0000251 0.000488 0.000670 1985 12 2 46401 0.223297 0.236142 0.3574534 0.0013070 0.000068 -0.001004 0.003849 0.005027 0.0000251 0.0000215 0.000488 0.000669 1985 12 3 46402 0.221776 0.233619 0.3560626 0.0014875 -0.000022 -0.001135 0.007920 0.005733 0.0000179 0.0000213 0.000280 0.000281 1985 12 4 46403 0.219855 0.231251 0.3544628 0.0017232 -0.000124 -0.001160 0.001233 0.000764 0.0000175 0.0000177 0.000274 0.000273 1985 12 5 46404 0.217804 0.228708 0.3526116 0.0019817 -0.000155 -0.001074 0.000966 0.000599 0.0000175 0.0000175 0.000274 0.000273 1985 12 6 46405 0.216082 0.225935 0.3505103 0.0022106 -0.000078 -0.000891 0.000981 0.000608 0.0000175 0.0000175 0.000274 0.000273 1985 12 7 46406 0.215216 0.223640 0.3482197 0.0023504 0.000049 -0.000645 0.002641 0.001707 0.0000175 0.0000169 0.000274 0.000273 1985 12 8 46407 0.215238 0.222397 0.3458550 0.0023569 0.000089 -0.000385 0.004639 0.003904 0.0000163 0.0000169 0.000264 0.000441 1985 12 9 46408 0.215198 0.221350 0.3435569 0.0022202 -0.000088 -0.000157 0.001174 0.001390 0.0000163 0.0000169 0.000267 0.000475 1985 12 10 46409 0.213577 0.218381 0.3414542 0.0019691 -0.000505 0.000011 0.000824 0.000982 0.0000175 0.0000201 0.000286 0.000495 1985 12 11 46410 0.210486 0.213395 0.3396311 0.0016667 -0.001026 0.000114 0.001188 0.001408 0.0000240 0.0000276 0.000395 0.000576 1985 12 12 46411 0.208841 0.210427 0.3381004 0.0013954 -0.001359 0.000151 0.002520 0.002765 0.0000377 0.0000311 0.000641 0.000662 1985 12 13 46412 0.208631 0.210111 0.3367955 0.0012298 -0.001328 0.000139 0.004454 0.002831 0.0000382 0.0000289 0.000672 0.000551 1985 12 14 46413 0.207489 0.209272 0.3355898 0.0012059 -0.000978 0.000106 0.002857 0.001525 0.0000202 0.0000292 0.000361 0.000269 1985 12 15 46414 0.205213 0.206434 0.3343445 0.0013058 -0.000501 0.000065 0.001603 0.000803 0.0000201 0.0000202 0.000361 0.000268 1985 12 16 46415 0.204120 0.203399 0.3329608 0.0014711 -0.000106 0.000022 0.001701 0.000849 0.0000201 0.0000201 0.000361 0.000268 1985 12 17 46416 0.204676 0.201445 0.3314058 0.0016356 0.000099 -0.000032 0.005661 0.002878 0.0000201 0.0000186 0.000361 0.000268 1985 12 18 46417 0.205237 0.200227 0.3297067 0.0017515 0.000124 -0.000107 0.005233 0.004258 0.0000170 0.0000184 0.000301 0.000275 1985 12 19 46418 0.204647 0.198957 0.3279254 0.0017974 0.000036 -0.000209 0.000658 0.000657 0.0000167 0.0000169 0.000296 0.000275 1985 12 20 46419 0.203169 0.197141 0.3261348 0.0017711 -0.000093 -0.000331 0.000573 0.000572 0.0000167 0.0000167 0.000296 0.000275 1985 12 21 46420 0.201658 0.194679 0.3244043 0.0016801 -0.000215 -0.000458 0.000578 0.000576 0.0000167 0.0000167 0.000296 0.000275 1985 12 22 46421 0.200515 0.191742 0.3227922 0.0015377 -0.000312 -0.000568 0.001456 0.001435 0.0000167 0.0000167 0.000296 0.000275 1985 12 23 46422 0.199591 0.188645 0.3213407 0.0013617 -0.000379 -0.000638 0.014332 0.010914 0.0000167 0.0000167 0.000296 0.000275 1985 12 24 46423 0.198615 0.185716 0.3200731 0.0011725 -0.000409 -0.000654 0.017532 0.012215 0.0000167 0.0000167 0.000296 0.000275 1985 12 25 46424 0.197546 0.183195 0.3189912 0.0009930 -0.000401 -0.000616 0.013241 0.011129 0.0000167 0.0000163 0.000296 0.000275 1985 12 26 46425 0.196436 0.181168 0.3180738 0.0008465 -0.000364 -0.000537 0.012724 0.010951 0.0000158 0.0000163 0.000315 0.000299 1985 12 27 46426 0.195200 0.179527 0.3172767 0.0007547 -0.000315 -0.000432 0.012303 0.010870 0.0000158 0.0000158 0.000315 0.000299 1985 12 28 46427 0.193526 0.177986 0.3165372 0.0007330 -0.000271 -0.000313 0.006658 0.006702 0.0000158 0.0000158 0.000315 0.000299 1985 12 29 46428 0.191197 0.176197 0.3157818 0.0007880 -0.000240 -0.000180 0.001688 0.001701 0.0000158 0.0000158 0.000315 0.000299 1985 12 30 46429 0.188494 0.173931 0.3149363 0.0009154 -0.000221 -0.000024 0.000840 0.000846 0.0000158 0.0000158 0.000315 0.000299 1985 12 31 46430 0.186002 0.171313 0.3139355 0.0010995 -0.000206 0.000145 0.000995 0.001002 0.0000158 0.0000158 0.000315 0.000299 1986 1 1 46431 0.183948 0.169011 0.3127350 0.0013117 -0.000195 0.000293 0.003749 0.003675 0.0000158 0.0000166 0.000315 0.000299 1986 1 2 46432 0.182193 0.167537 0.3113244 0.0015116 -0.000199 0.000345 0.004531 0.005351 0.0000175 0.0000167 0.000283 0.000272 1986 1 3 46433 0.180595 0.166524 0.3097381 0.0016522 -0.000236 0.000219 0.000693 0.000894 0.0000176 0.0000175 0.000282 0.000270 1986 1 4 46434 0.179055 0.165120 0.3080575 0.0016918 -0.000316 -0.000139 0.000663 0.000855 0.0000176 0.0000176 0.000282 0.000270 1986 1 5 46435 0.177431 0.162842 0.3063970 0.0016128 -0.000419 -0.000683 0.000667 0.000859 0.0000176 0.0000176 0.000282 0.000270 1986 1 6 46436 0.175457 0.160204 0.3048690 0.0014362 -0.000490 -0.001247 0.001603 0.002011 0.0000176 0.0000296 0.000282 0.000270 1986 1 7 46437 0.172977 0.158162 0.3035442 0.0012201 -0.000462 -0.001587 0.008437 0.006728 0.0000416 0.0000353 0.000324 0.000299 1986 1 8 46438 0.170253 0.157027 0.3024217 0.0010390 -0.000299 -0.001508 0.002357 0.002976 0.0000530 0.0000439 0.000328 0.000302 1986 1 9 46439 0.167984 0.155868 0.3014327 0.0009472 -0.000038 -0.000992 0.000970 0.000772 0.0000462 0.0000431 0.000318 0.000305 1986 1 10 46440 0.166440 0.153694 0.3004785 0.0009538 0.000207 -0.000251 0.000630 0.000378 0.0000331 0.0000372 0.000287 0.000319 1986 1 11 46441 0.164669 0.151185 0.2994784 0.0010505 0.000293 0.000299 0.000529 0.000301 0.0000281 0.0000295 0.000268 0.000331 1986 1 12 46442 0.162076 0.149231 0.2983483 0.0012377 0.000186 0.000412 0.001039 0.000617 0.0000259 0.0000228 0.000268 0.000324 1986 1 13 46443 0.159378 0.147635 0.2969979 0.0014901 0.000004 0.000194 0.001210 0.001299 0.0000174 0.0000224 0.000331 0.000250 1986 1 14 46444 0.157539 0.145763 0.2953831 0.0017381 -0.000095 -0.000073 0.000715 0.000862 0.0000189 0.0000208 0.000359 0.000271 1986 1 15 46445 0.156523 0.143490 0.2935474 0.0018921 -0.000044 -0.000152 0.000732 0.000565 0.0000241 0.0000184 0.000386 0.000324 1986 1 16 46446 0.155729 0.141162 0.2916269 0.0018955 0.000081 -0.000097 0.000474 0.000281 0.0000179 0.0000194 0.000234 0.000226 1986 1 17 46447 0.154214 0.138902 0.2897812 0.0017640 -0.000014 0.000113 0.000407 0.000239 0.0000148 0.0000183 0.000192 0.000187 1986 1 18 46448 0.151806 0.136934 0.2881185 0.0015613 -0.000293 0.000310 0.001068 0.000718 0.0000188 0.0000172 0.000294 0.000227 1986 1 19 46449 0.149004 0.135520 0.2866716 0.0013554 -0.000433 0.000215 0.000680 0.000442 0.0000196 0.0000182 0.000333 0.000223 1986 1 20 46450 0.145757 0.134713 0.2854126 0.0011899 -0.000237 -0.000211 0.000351 0.000211 0.0000177 0.0000181 0.000285 0.000185 1986 1 21 46451 0.141919 0.133932 0.2842877 0.0010778 0.000010 -0.000546 0.000354 0.000209 0.0000167 0.0000169 0.000262 0.000168 1986 1 22 46452 0.138292 0.132878 0.2832440 0.0010114 0.000070 -0.000504 0.001277 0.000712 0.0000161 0.0000153 0.000269 0.000173 1986 1 23 46453 0.135628 0.131835 0.2822441 0.0009802 -0.000028 -0.000156 0.000922 0.000988 0.0000138 0.0000149 0.000415 0.000273 1986 1 24 46454 0.133490 0.131058 0.2812567 0.0009885 -0.000103 0.000219 0.000677 0.000792 0.0000138 0.0000138 0.000416 0.000274 1986 1 25 46455 0.131067 0.130544 0.2802368 0.0010573 0.000012 0.000350 0.000841 0.000941 0.0000138 0.0000138 0.000416 0.000274 1986 1 26 46456 0.128414 0.130007 0.2791132 0.0012085 0.000298 0.000182 0.001133 0.001160 0.0000138 0.0000140 0.000416 0.000274 1986 1 27 46457 0.125717 0.129335 0.2777989 0.0014439 0.000575 -0.000125 0.001805 0.002626 0.0000143 0.0000141 0.000587 0.000346 1986 1 28 46458 0.123185 0.128406 0.2762194 0.0017302 0.000634 -0.000333 0.001076 0.001246 0.0000143 0.0000144 0.000498 0.000333 1986 1 29 46459 0.120960 0.127071 0.2743510 0.0019997 0.000388 -0.000268 0.000552 0.000441 0.0000146 0.0000148 0.000288 0.000257 1986 1 30 46460 0.118987 0.125162 0.2722497 0.0021726 -0.000058 0.000072 0.000369 0.000241 0.0000153 0.0000152 0.000170 0.000176 1986 1 31 46461 0.116414 0.123439 0.2700463 0.0022095 -0.000415 0.000508 0.000444 0.000279 0.0000159 0.0000156 0.000142 0.000151 1986 2 1 46462 0.112631 0.122816 0.2678728 0.0021305 -0.000526 0.000800 0.000688 0.000442 0.0000160 0.0000157 0.000145 0.000154 1986 2 2 46463 0.108547 0.122836 0.2658198 0.0019735 -0.000462 0.000788 0.000389 0.000453 0.0000154 0.0000158 0.000288 0.000269 1986 2 3 46464 0.105494 0.122440 0.2639444 0.0017638 -0.000395 0.000482 0.000348 0.000270 0.0000156 0.0000157 0.000222 0.000208 1986 2 4 46465 0.103533 0.121249 0.2622892 0.0015197 -0.000463 0.000070 0.000286 0.000160 0.0000159 0.0000158 0.000149 0.000141 1986 2 5 46466 0.100936 0.120264 0.2608797 0.0012929 -0.000633 -0.000141 0.000313 0.000161 0.0000161 0.0000161 0.000127 0.000121 1986 2 6 46467 0.097453 0.120043 0.2596612 0.0011704 -0.000769 -0.000061 0.001116 0.000575 0.0000162 0.0000164 0.000130 0.000122 1986 2 7 46468 0.094451 0.120039 0.2584919 0.0012081 -0.000723 0.000121 0.000825 0.001188 0.0000168 0.0000165 0.000314 0.000196 1986 2 8 46469 0.092426 0.119427 0.2572077 0.0013870 -0.000416 0.000126 0.000468 0.000784 0.0000168 0.0000168 0.000317 0.000197 1986 2 9 46470 0.090824 0.117846 0.2557011 0.0016237 0.000099 -0.000188 0.000461 0.000774 0.0000168 0.0000169 0.000317 0.000197 1986 2 10 46471 0.089019 0.115904 0.2539664 0.0018217 0.000615 -0.000643 0.000478 0.000724 0.0000170 0.0000181 0.000317 0.000207 1986 2 11 46472 0.086769 0.114763 0.2520808 0.0019246 0.000863 -0.000860 0.000730 0.000517 0.0000195 0.0000179 0.000319 0.000407 1986 2 12 46473 0.084148 0.115050 0.2501480 0.0019319 0.000686 -0.000553 0.000677 0.000516 0.0000189 0.0000184 0.000327 0.000337 1986 2 13 46474 0.081407 0.115988 0.2482470 0.0018790 0.000160 0.000228 0.000582 0.000529 0.0000172 0.0000176 0.000354 0.000241 1986 2 14 46475 0.078788 0.115563 0.2464143 0.0017880 -0.000406 0.001022 0.000764 0.000745 0.0000163 0.0000167 0.000376 0.000209 1986 2 15 46476 0.076541 0.114100 0.2446874 0.0016500 -0.000733 0.001415 0.002053 0.001703 0.0000162 0.0000171 0.000381 0.000204 1986 2 16 46477 0.074656 0.113223 0.2431218 0.0014584 -0.000733 0.001306 0.002615 0.001890 0.0000179 0.0000171 0.000398 0.000289 1986 2 17 46478 0.072727 0.113397 0.2417683 0.0012334 -0.000505 0.000862 0.000689 0.000623 0.0000181 0.0000180 0.000399 0.000302 1986 2 18 46479 0.070268 0.114076 0.2406432 0.0010169 -0.000221 0.000375 0.000685 0.000620 0.0000181 0.0000181 0.000399 0.000302 1986 2 19 46480 0.067126 0.114488 0.2397145 0.0008556 -0.000022 0.000075 0.000709 0.000641 0.0000181 0.0000181 0.000399 0.000302 1986 2 20 46481 0.063753 0.114412 0.2389059 0.0007832 0.000040 0.000021 0.002359 0.002101 0.0000181 0.0000163 0.000399 0.000302 1986 2 21 46482 0.060752 0.114125 0.2381180 0.0008129 -0.000015 0.000133 0.005100 0.004793 0.0000144 0.0000162 0.000257 0.000272 1986 2 22 46483 0.058114 0.113965 0.2372491 0.0009401 -0.000136 0.000286 0.000796 0.000826 0.0000143 0.0000144 0.000251 0.000270 1986 2 23 46484 0.055125 0.114061 0.2362108 0.0011470 -0.000273 0.000386 0.000574 0.000597 0.0000143 0.0000143 0.000251 0.000270 1986 2 24 46485 0.051393 0.114372 0.2349398 0.0014012 -0.000386 0.000404 0.000810 0.000852 0.0000143 0.0000143 0.000251 0.000270 1986 2 25 46486 0.047658 0.114764 0.2334126 0.0016547 -0.000457 0.000372 0.002055 0.002537 0.0000143 0.0000151 0.000251 0.000270 1986 2 26 46487 0.044488 0.115232 0.2316572 0.0018509 -0.000483 0.000343 0.002317 0.004323 0.0000160 0.0000152 0.000316 0.000292 1986 2 27 46488 0.041390 0.115787 0.2297552 0.0019412 -0.000483 0.000354 0.001212 0.001524 0.0000162 0.0000161 0.000322 0.000294 1986 2 28 46489 0.037982 0.116001 0.2278251 0.0019033 -0.000488 0.000418 0.000686 0.000793 0.0000162 0.0000162 0.000322 0.000294 1986 3 1 46490 0.034799 0.115265 0.2259905 0.0017508 -0.000533 0.000523 0.000888 0.000994 0.0000162 0.0000162 0.000322 0.000294 1986 3 2 46491 0.032029 0.114308 0.2243459 0.0015280 -0.000622 0.000634 0.002492 0.002166 0.0000162 0.0000175 0.000322 0.000294 1986 3 3 46492 0.029447 0.114179 0.2229330 0.0012938 -0.000724 0.000709 0.002214 0.001757 0.0000189 0.0000177 0.000300 0.000325 1986 3 4 46493 0.026805 0.114946 0.2217347 0.0011056 -0.000775 0.000698 0.000539 0.000496 0.0000191 0.0000190 0.000299 0.000327 1986 3 5 46494 0.023926 0.115946 0.2206833 0.0010063 -0.000705 0.000568 0.000536 0.000494 0.0000191 0.0000192 0.000299 0.000327 1986 3 6 46495 0.020758 0.116563 0.2196782 0.0010169 -0.000486 0.000316 0.000599 0.000551 0.0000191 0.0000191 0.000299 0.000327 1986 3 7 46496 0.017354 0.116826 0.2186111 0.0011311 -0.000196 0.000008 0.002325 0.002123 0.0000191 0.0000175 0.000299 0.000327 1986 3 8 46497 0.013892 0.117170 0.2173923 0.0013166 -0.000005 -0.000224 0.004847 0.004292 0.0000159 0.0000174 0.000293 0.000345 1986 3 9 46498 0.010676 0.117849 0.2159743 0.0015202 -0.000078 -0.000243 0.000678 0.000625 0.0000157 0.0000158 0.000293 0.000346 1986 3 10 46499 0.007986 0.118701 0.2143670 0.0016837 -0.000453 0.000013 0.000630 0.000581 0.0000157 0.0000157 0.000293 0.000346 1986 3 11 46500 0.005806 0.119347 0.2126345 0.0017639 -0.000938 0.000449 0.000926 0.000848 0.0000157 0.0000193 0.000292 0.000347 1986 3 12 46501 0.003798 0.119452 0.2108709 0.0017374 -0.001112 0.000798 0.001712 0.001364 0.0000230 0.0000213 0.000280 0.000416 1986 3 13 46502 0.000931 0.119687 0.2091885 0.0015937 -0.000688 0.000805 0.001212 0.000871 0.0000269 0.0000251 0.000256 0.000387 1986 3 14 46503 -0.003139 0.120702 0.2077048 0.0013288 0.000135 0.000446 0.001041 0.000745 0.0000271 0.0000272 0.000218 0.000298 1986 3 15 46504 -0.006316 0.121259 0.2065431 0.0010245 0.000191 0.000149 0.000885 0.000652 0.0000276 0.0000275 0.000246 0.000299 1986 3 16 46505 -0.008584 0.120893 0.2056579 0.0008021 -0.000077 -0.000022 0.000985 0.000743 0.0000279 0.0000278 0.000317 0.000336 1986 3 17 46506 -0.010946 0.120426 0.2049305 0.0006775 0.000076 -0.000151 0.002711 0.002262 0.0000280 0.0000220 0.000352 0.000350 1986 3 18 46507 -0.013443 0.120648 0.2042855 0.0006141 0.000540 -0.000194 0.002954 0.002758 0.0000161 0.0000219 0.000284 0.000312 1986 3 19 46508 -0.015596 0.121666 0.2036783 0.0005945 0.000846 -0.000091 0.000649 0.000605 0.0000159 0.0000166 0.000281 0.000311 1986 3 20 46509 -0.017001 0.122954 0.2030685 0.0006265 0.000559 0.000198 0.000664 0.000613 0.0000170 0.0000195 0.000288 0.000318 1986 3 21 46510 -0.017948 0.123905 0.2023957 0.0007370 -0.000282 0.000625 0.001008 0.000862 0.0000231 0.0000262 0.000313 0.000346 1986 3 22 46511 -0.019635 0.124362 0.2015660 0.0009477 -0.000891 0.001016 0.003221 0.001870 0.0000354 0.0000246 0.000335 0.000369 1986 3 23 46512 -0.021612 0.124667 0.2004780 0.0012516 -0.000824 0.001193 0.005159 0.003793 0.0000261 0.0000231 0.000324 0.000320 1986 3 24 46513 -0.023252 0.125557 0.1990549 0.0016078 -0.000340 0.001075 0.000636 0.000602 0.0000108 0.0000184 0.000246 0.000178 1986 3 25 46514 -0.025678 0.127683 0.1972766 0.0019452 0.000040 0.000693 0.000548 0.000519 0.0000108 0.0000118 0.000247 0.000179 1986 3 26 46515 -0.029531 0.130764 0.1952028 0.0021822 -0.000006 0.000179 0.000833 0.000786 0.0000129 0.0000307 0.000295 0.000213 1986 3 27 46516 -0.033245 0.133447 0.1929668 0.0022582 -0.000205 -0.000284 0.002631 0.002465 0.0000506 0.0000291 0.001123 0.000751 1986 3 28 46517 -0.035407 0.133683 0.1907406 0.0021597 -0.000118 -0.000536 0.002343 0.003133 0.0000453 0.0000350 0.000821 0.000689 1986 3 29 46518 -0.037099 0.133089 0.1886837 0.0019250 0.000140 -0.000510 0.000894 0.001215 0.0000195 0.0000332 0.000355 0.000320 1986 3 30 46519 -0.040099 0.134584 0.1868984 0.0016265 0.000165 -0.000267 0.000735 0.001000 0.0000210 0.0000386 0.000381 0.000342 1986 3 31 46520 -0.043542 0.137041 0.1854103 0.0013456 -0.000115 0.000005 0.002039 0.002559 0.0000578 0.0000487 0.000893 0.000725 1986 4 1 46521 -0.044937 0.136930 0.1841684 0.0011534 -0.000361 0.000110 0.005552 0.002733 0.0000763 0.0000518 0.000710 0.000556 1986 4 2 46522 -0.045029 0.136257 0.1830591 0.0010986 -0.000296 0.000078 0.003539 0.002048 0.0000458 0.0000541 0.000459 0.000368 1986 4 3 46523 -0.046520 0.138323 0.1819331 0.0011941 0.000026 0.000084 0.001355 0.001294 0.0000319 0.0000308 0.000505 0.000398 1986 4 4 46524 -0.049475 0.141740 0.1806465 0.0014064 0.000150 0.000191 0.000624 0.000617 0.0000158 0.0000221 0.000313 0.000254 1986 4 5 46525 -0.051922 0.143062 0.1791126 0.0016599 -0.000281 0.000359 0.000516 0.000449 0.0000123 0.0000138 0.000260 0.000235 1986 4 6 46526 -0.054292 0.143678 0.1773354 0.0018734 -0.000890 0.000510 0.000569 0.000453 0.0000117 0.0000159 0.000261 0.000262 1986 4 7 46527 -0.057001 0.145588 0.1753871 0.0019989 -0.001134 0.000594 0.001464 0.001133 0.0000194 0.0000170 0.000439 0.000407 1986 4 8 46528 -0.058764 0.147640 0.1733659 0.0020234 -0.000872 0.000611 0.000961 0.000726 0.0000224 0.0000157 0.000777 0.000297 1986 4 9 46529 -0.060019 0.149500 0.1713690 0.0019576 -0.000275 0.000592 0.000468 0.000355 0.0000119 0.0000161 0.000439 0.000160 1986 4 10 46530 -0.061734 0.152003 0.1694746 0.0018238 0.000327 0.000540 0.000559 0.000422 0.0000099 0.0000108 0.000367 0.000133 1986 4 11 46531 -0.063301 0.155254 0.1677375 0.0016492 0.000703 0.000462 0.001143 0.000837 0.0000096 0.0000114 0.000356 0.000129 1986 4 12 46532 -0.064296 0.158204 0.1661828 0.0014660 0.000797 0.000365 0.003788 0.002493 0.0000129 0.0000114 0.000294 0.000217 1986 4 13 46533 -0.065031 0.159977 0.1648019 0.0013064 0.000690 0.000256 0.000786 0.000981 0.0000133 0.0000131 0.000291 0.000233 1986 4 14 46534 -0.066128 0.161343 0.1635567 0.0011951 0.000507 0.000147 0.000404 0.000525 0.0000133 0.0000133 0.000291 0.000233 1986 4 15 46535 -0.067841 0.163670 0.1623907 0.0011443 0.000341 0.000060 0.000537 0.000687 0.0000133 0.0000133 0.000291 0.000233 1986 4 16 46536 -0.069582 0.166373 0.1612426 0.0011550 0.000227 0.000014 0.001578 0.001644 0.0000133 0.0000140 0.000291 0.000233 1986 4 17 46537 -0.070779 0.168299 0.1600540 0.0012236 0.000156 0.000028 0.002438 0.002147 0.0000147 0.0000141 0.000212 0.000197 1986 4 18 46538 -0.071706 0.169721 0.1587693 0.0013492 0.000122 0.000101 0.001089 0.001118 0.0000148 0.0000148 0.000209 0.000196 1986 4 19 46539 -0.073006 0.171566 0.1573325 0.0015329 0.000129 0.000221 0.000713 0.000720 0.0000148 0.0000148 0.000209 0.000196 1986 4 20 46540 -0.075017 0.174102 0.1556885 0.0017664 0.000187 0.000354 0.000582 0.000587 0.0000148 0.0000148 0.000209 0.000196 1986 4 21 46541 -0.077155 0.176470 0.1538003 0.0020167 0.000294 0.000464 0.001249 0.001338 0.0000148 0.0000189 0.000209 0.000196 1986 4 22 46542 -0.078550 0.177746 0.1516780 0.0022212 0.000430 0.000516 0.002672 0.006380 0.0000229 0.0000195 0.000398 0.000253 1986 4 23 46543 -0.079160 0.178220 0.1494036 0.0023056 0.000546 0.000501 0.000914 0.004295 0.0000242 0.0000235 0.000443 0.000260 1986 4 24 46544 -0.080189 0.179658 0.1471245 0.0022229 0.000589 0.000439 0.000612 0.002490 0.0000242 0.0000242 0.000443 0.000260 1986 4 25 46545 -0.082427 0.182998 0.1450086 0.0019868 0.000521 0.000365 0.000810 0.002077 0.0000242 0.0000242 0.000443 0.000260 1986 4 26 46546 -0.084511 0.186340 0.1431764 0.0016746 0.000355 0.000319 0.001248 0.001902 0.0000242 0.0000213 0.000442 0.000260 1986 4 27 46547 -0.085341 0.188431 0.1416513 0.0013940 0.000165 0.000325 0.002764 0.003026 0.0000185 0.0000212 0.000225 0.000212 1986 4 28 46548 -0.085031 0.189564 0.1403524 0.0012354 0.000059 0.000383 0.001475 0.001472 0.0000182 0.0000184 0.000219 0.000210 1986 4 29 46549 -0.084672 0.190792 0.1391323 0.0012341 0.000127 0.000469 0.000870 0.000851 0.0000182 0.0000182 0.000219 0.000210 1986 4 30 46550 -0.085538 0.192754 0.1378410 0.0013603 0.000368 0.000543 0.000961 0.000957 0.0000182 0.0000182 0.000219 0.000210 1986 5 1 46551 -0.086446 0.195229 0.1363848 0.0015453 0.000657 0.000555 0.002108 0.002295 0.0000182 0.0000185 0.000217 0.000211 1986 5 2 46552 -0.086115 0.197939 0.1347425 0.0017253 0.000805 0.000466 0.001241 0.000483 0.0000187 0.0000193 0.000205 0.000221 1986 5 3 46553 -0.085783 0.201001 0.1329423 0.0018698 0.000677 0.000279 0.000987 0.000390 0.0000204 0.0000237 0.000221 0.000239 1986 5 4 46554 -0.086875 0.204182 0.1310216 0.0019883 0.000291 0.000041 0.001100 0.000561 0.0000288 0.0000358 0.000301 0.000335 1986 5 5 46555 -0.088539 0.206455 0.1289900 0.0020759 -0.000144 -0.000151 0.001228 0.001114 0.0000512 0.0000496 0.000467 0.000571 1986 5 6 46556 -0.089804 0.207595 0.1268952 0.0020896 -0.000429 -0.000221 0.003521 0.004515 0.0000705 0.0000319 0.000563 0.000752 1986 5 7 46557 -0.090749 0.208468 0.1248334 0.0020020 -0.000478 -0.000164 0.004848 0.004887 0.0000126 0.0000414 0.000288 0.000253 1986 5 8 46558 -0.091762 0.209917 0.1229081 0.0018220 -0.000311 -0.000031 0.000745 0.000841 0.0000122 0.0000124 0.000280 0.000246 1986 5 9 46559 -0.092807 0.211867 0.1211982 0.0015858 -0.000015 0.000094 0.000457 0.000514 0.0000122 0.0000122 0.000280 0.000246 1986 5 10 46560 -0.093688 0.213798 0.1197361 0.0013461 0.000304 0.000145 0.000453 0.000509 0.0000122 0.0000122 0.000280 0.000246 1986 5 11 46561 -0.094479 0.215586 0.1184963 0.0011550 0.000547 0.000119 0.000481 0.000539 0.0000122 0.0000132 0.000280 0.000246 1986 5 12 46562 -0.095371 0.217475 0.1174082 0.0010438 0.000633 0.000071 0.002292 0.002089 0.0000143 0.0000133 0.000216 0.000443 1986 5 13 46563 -0.096301 0.219549 0.1163853 0.0010121 0.000527 0.000082 0.001268 0.001261 0.0000144 0.0000140 0.000213 0.000477 1986 5 14 46564 -0.096844 0.221479 0.1153587 0.0010292 0.000270 0.000196 0.000712 0.000696 0.0000138 0.0000128 0.000205 0.000405 1986 5 15 46565 -0.096397 0.222493 0.1143029 0.0010543 -0.000017 0.000377 0.000567 0.000467 0.0000111 0.0000120 0.000173 0.000248 1986 5 16 46566 -0.096412 0.224363 0.1132295 0.0010889 -0.000146 0.000550 0.000658 0.000522 0.0000102 0.0000131 0.000162 0.000208 1986 5 17 46567 -0.097878 0.228014 0.1121100 0.0011880 -0.000140 0.000584 0.000523 0.000539 0.0000152 0.0000149 0.000236 0.000254 1986 5 18 46568 -0.099626 0.231286 0.1108479 0.0013838 -0.000256 0.000386 0.000469 0.000506 0.0000197 0.0000347 0.000302 0.000307 1986 5 19 46569 -0.100890 0.233354 0.1093523 0.0016328 -0.000561 0.000150 0.001280 0.001322 0.0000543 0.0001372 0.000728 0.000823 1986 5 20 46570 -0.102052 0.235653 0.1076121 0.0018393 -0.000838 0.000181 0.006762 0.003737 0.0002547 0.0001549 0.001319 0.002635 1986 5 21 46571 -0.103247 0.238568 0.1057214 0.0019079 -0.000870 0.000425 0.016414 0.007550 0.0002554 0.0002072 0.001544 0.003420 1986 5 22 46572 -0.104045 0.241095 0.1038497 0.0017924 -0.000555 0.000583 0.005326 0.005304 0.0001597 0.0001438 0.001438 0.002657 1986 5 23 46573 -0.104068 0.242375 0.1021770 0.0015199 0.000022 0.000419 0.000811 0.000857 0.0000322 0.0000886 0.000509 0.000626 1986 5 24 46574 -0.103543 0.242924 0.1008207 0.0011828 0.000634 -0.000012 0.000456 0.000502 0.0000175 0.0000247 0.000286 0.000343 1986 5 25 46575 -0.103038 0.243845 0.0997878 0.0008981 0.001039 -0.000454 0.000449 0.000496 0.0000172 0.0000174 0.000281 0.000336 1986 5 26 46576 -0.102908 0.245639 0.0989771 0.0007525 0.001114 -0.000722 0.000498 0.000551 0.0000172 0.0000150 0.000281 0.000336 1986 5 27 46577 -0.103145 0.248103 0.0982315 0.0007651 0.000910 -0.000781 0.002500 0.002824 0.0000128 0.0000149 0.000226 0.000356 1986 5 28 46578 -0.103538 0.250747 0.0974101 0.0008907 0.000586 -0.000709 0.001051 0.001093 0.0000125 0.0000126 0.000223 0.000358 1986 5 29 46579 -0.103856 0.253192 0.0964368 0.0010549 0.000310 -0.000610 0.000570 0.000586 0.0000125 0.0000125 0.000223 0.000358 1986 5 30 46580 -0.103931 0.255468 0.0953083 0.0011924 0.000182 -0.000544 0.000697 0.000718 0.0000125 0.0000125 0.000223 0.000358 1986 5 31 46581 -0.103758 0.257479 0.0940732 0.0012647 0.000204 -0.000513 0.001812 0.001956 0.0000125 0.0000124 0.000223 0.000357 1986 6 1 46582 -0.103464 0.259181 0.0928046 0.0012591 0.000314 -0.000493 0.001684 0.001947 0.0000122 0.0000124 0.000215 0.000196 1986 6 2 46583 -0.103234 0.260783 0.0915797 0.0011794 0.000431 -0.000464 0.000431 0.000483 0.0000122 0.0000122 0.000214 0.000191 1986 6 3 46584 -0.103217 0.262562 0.0904668 0.0010384 0.000502 -0.000423 0.000429 0.000480 0.0000122 0.0000122 0.000214 0.000191 1986 6 4 46585 -0.103404 0.264728 0.0895185 0.0008543 0.000509 -0.000377 0.000436 0.000488 0.0000122 0.0000122 0.000214 0.000191 1986 6 5 46586 -0.103587 0.267320 0.0887670 0.0006489 0.000461 -0.000326 0.001277 0.001405 0.0000122 0.0000146 0.000214 0.000191 1986 6 6 46587 -0.103534 0.270183 0.0882214 0.0004455 0.000375 -0.000264 0.004834 0.003971 0.0000169 0.0000149 0.000319 0.000262 1986 6 7 46588 -0.103258 0.273023 0.0878681 0.0002657 0.000256 -0.000169 0.000787 0.000785 0.0000176 0.0000173 0.000335 0.000272 1986 6 8 46589 -0.103061 0.275545 0.0876741 0.0001284 0.000097 -0.000024 0.000493 0.000494 0.0000176 0.0000176 0.000335 0.000272 1986 6 9 46590 -0.103127 0.277593 0.0875893 0.0000504 -0.000094 0.000164 0.000668 0.000665 0.0000176 0.0000176 0.000335 0.000272 1986 6 10 46591 -0.103212 0.279190 0.0875480 0.0000449 -0.000284 0.000354 0.002024 0.001835 0.0000176 0.0000194 0.000335 0.000272 1986 6 11 46592 -0.102698 0.280735 0.0874748 0.0001175 -0.000405 0.000478 0.003041 0.002148 0.0000212 0.0000197 0.000309 0.000307 1986 6 12 46593 -0.101178 0.282746 0.0872926 0.0002640 -0.000383 0.000469 0.001557 0.001248 0.0000218 0.0000222 0.000309 0.000311 1986 6 13 46594 -0.099404 0.284899 0.0869331 0.0004690 -0.000189 0.000303 0.000961 0.000749 0.0000232 0.0000250 0.000321 0.000316 1986 6 14 46595 -0.099075 0.286069 0.0863497 0.0007013 0.000127 0.000029 0.001424 0.000794 0.0000282 0.0000286 0.000355 0.000330 1986 6 15 46596 -0.099251 0.287173 0.0855366 0.0009282 0.000463 -0.000252 0.003817 0.001129 0.0000340 0.0000266 0.000386 0.000341 1986 6 16 46597 -0.098194 0.289407 0.0845131 0.0011202 0.000637 -0.000325 0.003827 0.001615 0.0000249 0.0000269 0.000397 0.000351 1986 6 17 46598 -0.095867 0.292314 0.0833306 0.0012393 0.000540 -0.000068 0.001201 0.000969 0.0000199 0.0000166 0.000354 0.000326 1986 6 18 46599 -0.093247 0.294777 0.0820792 0.0012500 0.000278 0.000321 0.000451 0.000386 0.0000082 0.0000116 0.000265 0.000248 1986 6 19 46600 -0.091102 0.296504 0.0808732 0.0011243 0.000285 0.000184 0.000215 0.000177 0.0000034 0.0000055 0.000202 0.000164 1986 6 20 46601 -0.089728 0.298828 0.0798548 0.0008796 0.000473 -0.000274 0.000234 0.000192 0.0000027 0.0000031 0.000182 0.000141 1986 6 21 46602 -0.088875 0.301645 0.0791078 0.0006108 0.000562 -0.000534 0.000489 0.000395 0.0000027 0.0000094 0.000183 0.000141 1986 6 22 46603 -0.087985 0.303912 0.0785965 0.0004317 0.000489 -0.000458 0.001015 0.000698 0.0000162 0.0000108 0.000263 0.000235 1986 6 23 46604 -0.086678 0.305783 0.0781913 0.0004081 0.000323 -0.000152 0.000971 0.000657 0.0000190 0.0000176 0.000264 0.000237 1986 6 24 46605 -0.085003 0.307703 0.0777318 0.0005349 0.000195 0.000148 0.001366 0.000931 0.0000190 0.0000190 0.000264 0.000237 1986 6 25 46606 -0.083437 0.309484 0.0770949 0.0007497 0.000185 0.000280 0.003183 0.002302 0.0000190 0.0000201 0.000264 0.000237 1986 6 26 46607 -0.082110 0.311289 0.0762331 0.0009704 0.000290 0.000215 0.003692 0.002623 0.0000212 0.0000202 0.000292 0.000274 1986 6 27 46608 -0.080557 0.313909 0.0751758 0.0011288 0.000446 0.000027 0.001399 0.001178 0.0000214 0.0000213 0.000295 0.000277 1986 6 28 46609 -0.078565 0.317126 0.0740063 0.0011899 0.000571 -0.000178 0.000689 0.000599 0.0000214 0.0000214 0.000295 0.000277 1986 6 29 46610 -0.076557 0.319575 0.0728258 0.0011531 0.000606 -0.000308 0.000733 0.000636 0.0000214 0.0000214 0.000295 0.000277 1986 6 30 46611 -0.074790 0.321073 0.0717234 0.0010404 0.000546 -0.000324 0.002754 0.001967 0.0000214 0.0000257 0.000295 0.000277 1986 7 1 46612 -0.073227 0.322591 0.0707609 0.0008799 0.000435 -0.000238 0.005423 0.002732 0.0000300 0.0000264 0.000373 0.000277 1986 7 2 46613 -0.071843 0.324767 0.0699720 0.0006974 0.000333 -0.000096 0.000786 0.000678 0.0000313 0.0000307 0.000382 0.000277 1986 7 3 46614 -0.070651 0.327452 0.0693669 0.0005138 0.000297 0.000048 0.000720 0.000624 0.0000313 0.0000310 0.000382 0.000277 1986 7 4 46615 -0.069619 0.330107 0.0689371 0.0003480 0.000341 0.000145 0.000674 0.000597 0.0000307 0.0000246 0.000367 0.000264 1986 7 5 46616 -0.068639 0.332341 0.0686557 0.0002197 0.000426 0.000173 0.000259 0.000269 0.0000180 0.0000238 0.000169 0.000114 1986 7 6 46617 -0.067574 0.334137 0.0684761 0.0001504 0.000496 0.000135 0.000242 0.000254 0.0000170 0.0000177 0.000159 0.000107 1986 7 7 46618 -0.066310 0.335866 0.0683293 0.0001595 0.000530 0.000047 0.000288 0.000297 0.0000175 0.0000178 0.000182 0.000124 1986 7 8 46619 -0.064729 0.338185 0.0681308 0.0002552 0.000571 -0.000071 0.000798 0.000671 0.0000185 0.0000180 0.000325 0.000260 1986 7 9 46620 -0.062778 0.341481 0.0677960 0.0004267 0.000677 -0.000197 0.001312 0.001055 0.0000186 0.0000185 0.000344 0.000285 1986 7 10 46621 -0.060586 0.345244 0.0672620 0.0006446 0.000843 -0.000299 0.002532 0.002159 0.0000186 0.0000209 0.000342 0.000284 1986 7 11 46622 -0.058853 0.347967 0.0665022 0.0008692 0.000984 -0.000330 0.002336 0.001695 0.0000232 0.0000211 0.000094 0.000094 1986 7 12 46623 -0.058217 0.348588 0.0655311 0.0010592 0.000983 -0.000243 0.000606 0.000470 0.0000236 0.0000234 0.000092 0.000092 1986 7 13 46624 -0.058162 0.348145 0.0644031 0.0011767 0.000770 -0.000019 0.000318 0.000252 0.0000236 0.0000236 0.000092 0.000092 1986 7 14 46625 -0.057308 0.348706 0.0632074 0.0011920 0.000401 0.000295 0.000351 0.000280 0.0000236 0.0000250 0.000092 0.000092 1986 7 15 46626 -0.055541 0.349967 0.0620556 0.0010916 0.000079 0.000567 0.001526 0.001217 0.0000263 0.0000469 0.000103 0.000104 1986 7 16 46627 -0.053593 0.350586 0.0610609 0.0008872 0.000031 0.000649 0.003227 0.002815 0.0000703 0.0000272 0.000554 0.000938 1986 7 17 46628 -0.051915 0.350881 0.0603075 0.0006231 0.000330 0.000473 0.000964 0.001156 0.0000280 0.0000426 0.000458 0.000708 1986 7 18 46629 -0.050359 0.352204 0.0598195 0.0003691 0.000790 0.000127 0.000607 0.000724 0.0000150 0.0000203 0.000323 0.000452 1986 7 19 46630 -0.048567 0.354523 0.0595467 0.0002037 0.000990 -0.000108 0.000494 0.000587 0.0000125 0.0000136 0.000282 0.000387 1986 7 20 46631 -0.046235 0.356912 0.0593670 0.0001858 0.000747 -0.000102 0.000702 0.000829 0.0000122 0.0000138 0.000276 0.000377 1986 7 21 46632 -0.043462 0.358736 0.0591229 0.0003257 0.000248 0.000059 0.004742 0.005126 0.0000151 0.0000143 0.000336 0.000294 1986 7 22 46633 -0.040862 0.359744 0.0586759 0.0005768 -0.000133 0.000202 0.001195 0.001280 0.0000163 0.0000170 0.000361 0.000305 1986 7 23 46634 -0.039216 0.360042 0.0579556 0.0008532 -0.000104 0.000196 0.000667 0.000721 0.0000188 0.0000209 0.000414 0.000344 1986 7 24 46635 -0.038679 0.360189 0.0569835 0.0010657 0.000327 0.000047 0.000887 0.000907 0.0000255 0.0000382 0.000558 0.000436 1986 7 25 46636 -0.037875 0.361288 0.0558562 0.0011571 0.000780 -0.000051 0.001998 0.001820 0.0000577 0.0000214 0.000903 0.000543 1986 7 26 46637 -0.035717 0.363563 0.0547061 0.0011181 0.000934 -0.000007 0.000568 0.000532 0.0000173 0.0000337 0.000218 0.000191 1986 7 27 46638 -0.033123 0.365577 0.0536514 0.0009781 0.000721 0.000030 0.000328 0.000309 0.0000098 0.0000139 0.000127 0.000114 1986 7 28 46639 -0.031618 0.366173 0.0527711 0.0007772 0.000340 -0.000113 0.000396 0.000383 0.0000105 0.0000106 0.000162 0.000139 1986 7 29 46640 -0.030412 0.367031 0.0521079 0.0005530 0.000079 -0.000184 0.000614 0.000618 0.0000114 0.0000114 0.000212 0.000171 1986 7 30 46641 -0.028965 0.368629 0.0516669 0.0003402 0.000103 -0.000018 0.001955 0.002267 0.0000123 0.0000509 0.000240 0.000192 1986 7 31 46642 -0.027615 0.369717 0.0514209 0.0001676 0.000372 0.000300 0.002899 0.002636 0.0000905 0.0000255 0.000643 0.000961 1986 8 1 46643 -0.026552 0.369692 0.0513171 0.0000552 0.000691 0.000545 0.001148 0.001026 0.0000387 0.0000540 0.000433 0.000419 1986 8 2 46644 -0.025693 0.369596 0.0512893 0.0000070 0.000848 0.000503 0.000660 0.000521 0.0000175 0.0000246 0.000199 0.000179 1986 8 3 46645 -0.024741 0.372024 0.0512775 0.0000148 0.000706 0.000122 0.000555 0.000331 0.0000104 0.0000132 0.000107 0.000101 1986 8 4 46646 -0.023582 0.373850 0.0512325 0.0000814 0.000418 -0.000335 0.000645 0.000332 0.0000089 0.0000097 0.000089 0.000085 1986 8 5 46647 -0.022239 0.373550 0.0510893 0.0002271 0.000188 -0.000607 0.002163 0.001027 0.0000090 0.0000106 0.000091 0.000087 1986 8 6 46648 -0.020671 0.373737 0.0507591 0.0004610 0.000100 -0.000604 0.000879 0.000901 0.0000123 0.0000106 0.000325 0.000321 1986 8 7 46649 -0.018811 0.375591 0.0501588 0.0007555 0.000146 -0.000380 0.000577 0.000637 0.0000123 0.0000123 0.000331 0.000328 1986 8 8 46650 -0.016769 0.378057 0.0492542 0.0010476 0.000266 -0.000066 0.000745 0.000818 0.0000123 0.0000123 0.000331 0.000328 1986 8 9 46651 -0.014895 0.379813 0.0480850 0.0012661 0.000404 0.000230 0.001130 0.001215 0.0000123 0.0000132 0.000331 0.000328 1986 8 10 46652 -0.013506 0.380262 0.0467550 0.0013629 0.000522 0.000439 0.003669 0.002404 0.0000140 0.0000133 0.000351 0.000250 1986 8 11 46653 -0.012637 0.379803 0.0453974 0.0013241 0.000587 0.000530 0.001589 0.001271 0.0000142 0.0000141 0.000352 0.000246 1986 8 12 46654 -0.011997 0.379514 0.0441418 0.0011648 0.000563 0.000505 0.000863 0.000723 0.0000142 0.0000142 0.000352 0.000246 1986 8 13 46655 -0.011142 0.380607 0.0430918 0.0009210 0.000433 0.000391 0.000868 0.000727 0.0000142 0.0000142 0.000352 0.000246 1986 8 14 46656 -0.009844 0.382612 0.0423062 0.0006471 0.000243 0.000232 0.003204 0.002171 0.0000142 0.0000137 0.000352 0.000246 1986 8 15 46657 -0.008207 0.384102 0.0417821 0.0004116 0.000096 0.000051 0.004929 0.002854 0.0000132 0.0000137 0.000313 0.000394 1986 8 16 46658 -0.006526 0.384700 0.0414473 0.0002814 0.000107 -0.000158 0.000714 0.000703 0.0000132 0.0000132 0.000311 0.000418 1986 8 17 46659 -0.005071 0.384904 0.0411721 0.0002994 0.000344 -0.000401 0.000672 0.000663 0.0000132 0.0000132 0.000311 0.000418 1986 8 18 46660 -0.003908 0.385277 0.0408042 0.0004648 0.000759 -0.000633 0.000683 0.000673 0.0000132 0.0000144 0.000311 0.000418 1986 8 19 46661 -0.002813 0.385691 0.0402163 0.0007281 0.001161 -0.000744 0.001856 0.001820 0.0000156 0.0000553 0.000359 0.000494 1986 8 20 46662 -0.001408 0.385884 0.0393485 0.0010070 0.001294 -0.000624 0.003965 0.003768 0.0000974 0.0000240 0.000777 0.001771 1986 8 21 46663 0.000564 0.386312 0.0382271 0.0012173 0.000978 -0.000273 0.001963 0.001751 0.0000324 0.0000568 0.000494 0.000656 1986 8 22 46664 0.003018 0.388076 0.0369524 0.0013018 0.000236 0.000164 0.001024 0.000916 0.0000161 0.0000231 0.000285 0.000332 1986 8 23 46665 0.005408 0.389833 0.0356626 0.0012462 -0.000688 0.000432 0.001227 0.001091 0.0000139 0.0000153 0.000249 0.000286 1986 8 24 46666 0.007620 0.390364 0.0344901 0.0010765 -0.001356 0.000374 0.001907 0.001651 0.0000144 0.0000188 0.000259 0.000279 1986 8 25 46667 0.009832 0.390468 0.0335271 0.0008440 -0.001371 0.000023 0.003429 0.001586 0.0000237 0.0000191 0.000438 0.000262 1986 8 26 46668 0.012088 0.391507 0.0328077 0.0006077 -0.000623 -0.000432 0.002100 0.001401 0.0000237 0.0000239 0.000477 0.000279 1986 8 27 46669 0.014014 0.393471 0.0323073 0.0004176 0.000583 -0.000746 0.001265 0.001128 0.0000241 0.0000283 0.000687 0.000358 1986 8 28 46670 0.015123 0.394272 0.0319592 0.0003000 0.001517 -0.000700 0.001270 0.001178 0.0000329 0.0000683 0.001572 0.000604 1986 8 29 46671 0.015965 0.393587 0.0316865 0.0002545 0.001799 -0.000408 0.002314 0.001796 0.0001126 0.0000529 0.003689 0.001317 1986 8 30 46672 0.017513 0.393031 0.0314246 0.0002672 0.001509 -0.000130 0.002312 0.001684 0.0000729 0.0000625 0.001669 0.000913 1986 8 31 46673 0.019639 0.393497 0.0311244 0.0003277 0.000909 0.000041 0.000721 0.000481 0.0000125 0.0000426 0.000307 0.000190 1986 9 1 46674 0.021425 0.394663 0.0307426 0.0004358 0.000331 0.000113 0.000691 0.000461 0.0000123 0.0000124 0.000302 0.000187 1986 9 2 46675 0.022379 0.395752 0.0302304 0.0005966 0.000015 0.000153 0.000712 0.000475 0.0000123 0.0000123 0.000302 0.000187 1986 9 3 46676 0.023330 0.396399 0.0295353 0.0008071 0.000021 0.000191 0.002352 0.001568 0.0000123 0.0000133 0.000302 0.000187 1986 9 4 46677 0.025369 0.396749 0.0286158 0.0010450 0.000250 0.000221 0.006652 0.005517 0.0000144 0.0000135 0.000189 0.000381 1986 9 5 46678 0.028107 0.397152 0.0274627 0.0012688 0.000524 0.000211 0.001054 0.000820 0.0000147 0.0000145 0.000183 0.000470 1986 9 6 46679 0.029712 0.397908 0.0261126 0.0014307 0.000677 0.000134 0.000832 0.000519 0.0000147 0.0000147 0.000183 0.000470 1986 9 7 46680 0.029720 0.399005 0.0246456 0.0014929 0.000623 -0.000022 0.001061 0.000517 0.0000147 0.0000147 0.000183 0.000470 1986 9 8 46681 0.030578 0.399873 0.0231693 0.0014412 0.000388 -0.000208 0.001553 0.000617 0.0000147 0.0000147 0.000183 0.000470 1986 9 9 46682 0.032629 0.399727 0.0217922 0.0012902 0.000085 -0.000328 0.002738 0.003721 0.0000147 0.0000147 0.000242 0.000303 1986 9 10 46683 0.034499 0.398350 0.0205966 0.0010814 -0.000133 -0.000269 0.001578 0.001346 0.0000147 0.0000147 0.000255 0.000293 1986 9 11 46684 0.035566 0.396699 0.0196146 0.0008747 -0.000153 0.000051 0.000925 0.000716 0.0000147 0.0000147 0.000255 0.000293 1986 9 12 46685 0.037104 0.396362 0.0188140 0.0007348 0.000043 0.000604 0.001215 0.000932 0.0000147 0.0000147 0.000255 0.000293 1986 9 13 46686 0.038361 0.396754 0.0181015 0.0007129 0.000337 0.001178 0.002406 0.001841 0.0000147 0.0000156 0.000255 0.000293 1986 9 14 46687 0.038983 0.397033 0.0173455 0.0008292 0.000535 0.001440 0.001558 0.001328 0.0000165 0.0000157 0.000405 0.000282 1986 9 15 46688 0.040069 0.397296 0.0164126 0.0010633 0.000481 0.001128 0.000594 0.000512 0.0000167 0.0000167 0.000401 0.000284 1986 9 16 46689 0.042545 0.397968 0.0152090 0.0013583 0.000168 0.000244 0.000639 0.000541 0.0000169 0.0000175 0.000290 0.000305 1986 9 17 46690 0.045709 0.399030 0.0137097 0.0016379 -0.000223 -0.000842 0.000925 0.000701 0.0000184 0.0000216 0.000192 0.000449 1986 9 18 46691 0.046931 0.399571 0.0119653 0.0018306 -0.000295 -0.001342 0.001467 0.001282 0.0000264 0.0000322 0.000229 0.001069 1986 9 19 46692 0.046838 0.398762 0.0100883 0.0018937 -0.000160 -0.001252 0.001394 0.003006 0.0000460 0.0000217 0.000444 0.001584 1986 9 20 46693 0.047398 0.397209 0.0082143 0.0018267 -0.000046 -0.000942 0.000703 0.000641 0.0000171 0.0000306 0.000378 0.000286 1986 9 21 46694 0.048996 0.396570 0.0064604 0.0016622 0.000024 -0.000609 0.000729 0.000594 0.0000151 0.0000161 0.000343 0.000250 1986 9 22 46695 0.050787 0.397473 0.0049021 0.0014478 0.000087 -0.000348 0.000993 0.000809 0.0000151 0.0000151 0.000343 0.000250 1986 9 23 46696 0.051837 0.398268 0.0035646 0.0012324 0.000169 -0.000168 0.001611 0.001322 0.0000151 0.0000137 0.000342 0.000250 1986 9 24 46697 0.052340 0.397942 0.0024264 0.0010581 0.000271 -0.000035 0.003624 0.003420 0.0000123 0.0000136 0.000272 0.000505 1986 9 25 46698 0.053123 0.396726 0.0014290 0.0009544 0.000366 0.000089 0.001696 0.001668 0.0000122 0.0000122 0.000268 0.000573 1986 9 26 46699 0.054546 0.395500 0.0004923 0.0009337 0.000421 0.000218 0.000937 0.000926 0.0000122 0.0000122 0.000268 0.000573 1986 9 27 46700 0.055746 0.394805 -0.0004665 0.0009926 0.000407 0.000341 0.000881 0.000872 0.0000122 0.0000122 0.000268 0.000573 1986 9 28 46701 0.056498 0.394419 -0.0015203 0.0011198 0.000334 0.000447 0.003327 0.003238 0.0000122 0.0000128 0.000268 0.000572 1986 9 29 46702 0.057459 0.393845 -0.0027302 0.0013049 0.000230 0.000521 0.005013 0.003970 0.0000135 0.0000129 0.000266 0.000304 1986 9 30 46703 0.058922 0.393104 -0.0041479 0.0015370 0.000134 0.000552 0.000661 0.000522 0.0000136 0.0000136 0.000265 0.000297 1986 10 1 46704 0.060545 0.392715 -0.0058119 0.0017951 0.000074 0.000538 0.000591 0.000467 0.0000136 0.0000136 0.000265 0.000297 1986 10 2 46705 0.061874 0.393062 -0.0077304 0.0020380 0.000062 0.000485 0.000627 0.000496 0.0000136 0.0000136 0.000265 0.000297 1986 10 3 46706 0.062887 0.393866 -0.0098611 0.0022087 0.000091 0.000406 0.002353 0.001881 0.0000136 0.0000150 0.000265 0.000297 1986 10 4 46707 0.063892 0.394472 -0.0121041 0.0022547 0.000139 0.000311 0.006010 0.005298 0.0000163 0.0000151 0.000298 0.000335 1986 10 5 46708 0.065049 0.394538 -0.0143204 0.0021552 0.000181 0.000205 0.000986 0.000841 0.0000166 0.0000164 0.000301 0.000339 1986 10 6 46709 0.066197 0.394313 -0.0163734 0.0019352 0.000196 0.000089 0.000839 0.000715 0.0000166 0.0000166 0.000301 0.000339 1986 10 7 46710 0.067192 0.394226 -0.0181726 0.0016583 0.000176 -0.000037 0.001223 0.001041 0.0000166 0.0000165 0.000301 0.000339 1986 10 8 46711 0.068254 0.394343 -0.0197004 0.0014020 0.000132 -0.000168 0.002600 0.002189 0.0000165 0.0000134 0.000301 0.000338 1986 10 9 46712 0.069578 0.394163 -0.0210108 0.0012302 0.000089 -0.000287 0.003913 0.002677 0.0000103 0.0000134 0.000279 0.000204 1986 10 10 46713 0.071099 0.393221 -0.0222066 0.0011757 0.000081 -0.000381 0.001274 0.000855 0.0000102 0.0000102 0.000278 0.000201 1986 10 11 46714 0.072508 0.391851 -0.0234064 0.0012387 0.000130 -0.000439 0.000701 0.000470 0.0000102 0.0000102 0.000278 0.000201 1986 10 12 46715 0.073501 0.391016 -0.0247157 0.0013939 0.000232 -0.000458 0.000725 0.000487 0.0000102 0.0000102 0.000278 0.000201 1986 10 13 46716 0.074215 0.390932 -0.0262073 0.0016002 0.000351 -0.000438 0.003374 0.002335 0.0000102 0.0000105 0.000278 0.000201 1986 10 14 46717 0.075100 0.391091 -0.0279093 0.0018090 0.000427 -0.000376 0.005578 0.004067 0.0000107 0.0000105 0.000307 0.000266 1986 10 15 46718 0.076549 0.390959 -0.0298015 0.0019717 0.000402 -0.000282 0.000802 0.000545 0.0000107 0.0000105 0.000303 0.000266 1986 10 16 46719 0.078612 0.390457 -0.0318186 0.0020488 0.000253 -0.000181 0.000607 0.000446 0.0000103 0.0000096 0.000255 0.000228 1986 10 17 46720 0.080947 0.389945 -0.0338632 0.0020198 0.000004 -0.000133 0.000406 0.000384 0.0000084 0.0000089 0.000148 0.000137 1986 10 18 46721 0.082973 0.389955 -0.0358287 0.0018919 -0.000275 -0.000211 0.000386 0.000400 0.0000075 0.0000102 0.000119 0.000111 1986 10 19 46722 0.084631 0.390143 -0.0376290 0.0016988 -0.000481 -0.000433 0.000989 0.001030 0.0000121 0.0000231 0.000192 0.000179 1986 10 20 46723 0.086344 0.389653 -0.0392211 0.0014890 -0.000512 -0.000705 0.001935 0.001871 0.0000387 0.0000168 0.000738 0.000807 1986 10 21 46724 0.087902 0.389173 -0.0406135 0.0013101 -0.000342 -0.000882 0.001106 0.001032 0.0000215 0.0000282 0.000438 0.000510 1986 10 22 46725 0.088925 0.389406 -0.0418576 0.0011974 -0.000061 -0.000840 0.001251 0.001103 0.0000177 0.0000166 0.000358 0.000412 1986 10 23 46726 0.089548 0.389512 -0.0430317 0.0011633 0.000227 -0.000576 0.000512 0.000454 0.0000118 0.0000144 0.000183 0.000161 1986 10 24 46727 0.090000 0.389141 -0.0442117 0.0011922 0.000433 -0.000224 0.000335 0.000300 0.0000112 0.0000119 0.000171 0.000149 1986 10 25 46728 0.090624 0.388544 -0.0454437 0.0012506 0.000476 0.000015 0.000377 0.000341 0.0000121 0.0000141 0.000195 0.000169 1986 10 26 46729 0.091840 0.388063 -0.0467373 0.0013195 0.000266 -0.000028 0.000715 0.000743 0.0000170 0.0000190 0.000412 0.000332 1986 10 27 46730 0.093547 0.387842 -0.0481018 0.0014196 -0.000196 -0.000372 0.001229 0.001331 0.0000259 0.0000401 0.000679 0.000537 1986 10 28 46731 0.094771 0.387753 -0.0495880 0.0015836 -0.000671 -0.000813 0.003340 0.004022 0.0000631 0.0000782 0.001602 0.001287 1986 10 29 46732 0.095009 0.387402 -0.0512698 0.0018088 -0.000923 -0.001103 0.003656 0.005595 0.0001305 0.0000545 0.004266 0.001399 1986 10 30 46733 0.095260 0.386673 -0.0531910 0.0020396 -0.000875 -0.001116 0.001113 0.001754 0.0000459 0.0000770 0.002152 0.000676 1986 10 31 46734 0.096671 0.385917 -0.0553158 0.0021826 -0.000594 -0.000911 0.000582 0.000872 0.0000235 0.0000334 0.000772 0.000362 1986 11 1 46735 0.098754 0.385587 -0.0575085 0.0021538 -0.000238 -0.000712 0.000584 0.000729 0.0000208 0.0000267 0.000413 0.000304 1986 11 2 46736 0.100520 0.385053 -0.0595739 0.0019344 -0.000031 -0.000573 0.000938 0.001018 0.0000299 0.0000428 0.000494 0.000423 1986 11 3 46737 0.101674 0.383911 -0.0613436 0.0015923 -0.000045 -0.000441 0.002475 0.002326 0.0000649 0.0000316 0.000461 0.000689 1986 11 4 46738 0.102799 0.382575 -0.0627543 0.0012489 -0.000136 -0.000320 0.001250 0.001154 0.0000332 0.0000377 0.000248 0.000383 1986 11 5 46739 0.104411 0.381335 -0.0638689 0.0010171 -0.000126 -0.000279 0.000431 0.000412 0.0000105 0.0000187 0.000185 0.000222 1986 11 6 46740 0.106008 0.379492 -0.0648369 0.0009492 -0.000088 -0.000425 0.000199 0.000177 0.0000041 0.0000071 0.000111 0.000118 1986 11 7 46741 0.107516 0.378539 -0.0658186 0.0010141 0.000305 -0.000668 0.000181 0.000158 0.0000036 0.0000062 0.000099 0.000105 1986 11 8 46742 0.109281 0.378848 -0.0669029 0.0011404 0.000911 -0.000741 0.000493 0.000373 0.0000084 0.0000088 0.000146 0.000160 1986 11 9 46743 0.111395 0.378392 -0.0681151 0.0012984 0.000966 -0.000448 0.001036 0.000681 0.0000140 0.0000110 0.000173 0.000207 1986 11 10 46744 0.113526 0.377041 -0.0694937 0.0014916 0.000407 0.000088 0.000662 0.000522 0.0000136 0.0000138 0.000222 0.000472 1986 11 11 46745 0.115355 0.375958 -0.0710765 0.0016907 -0.000280 0.000555 0.000695 0.000550 0.0000136 0.0000136 0.000226 0.000536 1986 11 12 46746 0.117018 0.375440 -0.0728447 0.0018357 -0.000697 0.000719 0.002593 0.001780 0.0000136 0.0000138 0.000226 0.000538 1986 11 13 46747 0.118760 0.374846 -0.0747157 0.0018783 -0.000730 0.000553 0.004323 0.002437 0.0000140 0.0000138 0.000220 0.000400 1986 11 14 46748 0.120304 0.373693 -0.0765733 0.0018042 -0.000504 0.000186 0.000649 0.000521 0.0000141 0.0000140 0.000220 0.000394 1986 11 15 46749 0.121050 0.371958 -0.0783045 0.0016313 -0.000241 -0.000195 0.000609 0.000489 0.0000141 0.0000141 0.000220 0.000394 1986 11 16 46750 0.120751 0.369999 -0.0798273 0.0014005 -0.000117 -0.000451 0.000615 0.000494 0.0000141 0.0000141 0.000220 0.000394 1986 11 17 46751 0.120048 0.368291 -0.0811082 0.0011625 -0.000165 -0.000544 0.001657 0.001333 0.0000141 0.0000141 0.000220 0.000394 1986 11 18 46752 0.119927 0.367118 -0.0821651 0.0009642 -0.000319 -0.000520 0.005727 0.005133 0.0000141 0.0000141 0.000217 0.000320 1986 11 19 46753 0.120669 0.366312 -0.0830571 0.0008381 -0.000479 -0.000455 0.001018 0.000980 0.0000141 0.0000141 0.000216 0.000316 1986 11 20 46754 0.121367 0.365331 -0.0838667 0.0007983 -0.000566 -0.000421 0.000639 0.000618 0.0000141 0.0000141 0.000216 0.000316 1986 11 21 46755 0.121194 0.363901 -0.0846804 0.0008426 -0.000544 -0.000458 0.000914 0.000900 0.0000141 0.0000141 0.000216 0.000316 1986 11 22 46756 0.120832 0.362494 -0.0855761 0.0009592 -0.000431 -0.000566 0.001817 0.002001 0.0000141 0.0000154 0.000216 0.000316 1986 11 23 46757 0.120873 0.361383 -0.0866174 0.0011325 -0.000270 -0.000713 0.002611 0.002259 0.0000166 0.0000155 0.000287 0.000350 1986 11 24 46758 0.121101 0.360287 -0.0878525 0.0013447 -0.000119 -0.000848 0.001694 0.001191 0.0000168 0.0000167 0.000295 0.000353 1986 11 25 46759 0.121159 0.358891 -0.0893101 0.0015726 -0.000020 -0.000923 0.001210 0.000829 0.0000168 0.0000168 0.000295 0.000353 1986 11 26 46760 0.121345 0.357593 -0.0909904 0.0017813 0.000001 -0.000907 0.001247 0.000849 0.0000168 0.0000168 0.000295 0.000353 1986 11 27 46761 0.121885 0.356553 -0.0928514 0.0019224 -0.000051 -0.000808 0.003625 0.002578 0.0000168 0.0000136 0.000295 0.000353 1986 11 28 46762 0.122521 0.355371 -0.0947990 0.0019439 -0.000143 -0.000665 0.002938 0.002622 0.0000104 0.0000135 0.000313 0.000400 1986 11 29 46763 0.123149 0.353943 -0.0966935 0.0018137 -0.000228 -0.000537 0.000485 0.000447 0.0000102 0.0000103 0.000314 0.000404 1986 11 30 46764 0.123852 0.352387 -0.0983845 0.0015485 -0.000259 -0.000479 0.000470 0.000433 0.0000102 0.0000102 0.000314 0.000404 1986 12 1 46765 0.124793 0.350865 -0.0997694 0.0012269 -0.000214 -0.000511 0.000474 0.000436 0.0000102 0.0000102 0.000314 0.000404 1986 12 2 46766 0.126065 0.349410 -0.1008497 0.0009652 -0.000108 -0.000609 0.001201 0.001103 0.0000102 0.0000104 0.000314 0.000404 1986 12 3 46767 0.127623 0.347998 -0.1017416 0.0008616 0.000005 -0.000717 0.004765 0.003854 0.0000107 0.0000105 0.000268 0.000364 1986 12 4 46768 0.129274 0.346698 -0.1026292 0.0009445 0.000055 -0.000780 0.000946 0.000769 0.0000108 0.0000111 0.000264 0.000352 1986 12 5 46769 0.130733 0.345721 -0.1036796 0.0011552 -0.000020 -0.000766 0.000577 0.000456 0.0000116 0.0000126 0.000259 0.000316 1986 12 6 46770 0.131897 0.345056 -0.1049649 0.0013825 -0.000239 -0.000696 0.000728 0.000507 0.0000143 0.0000147 0.000249 0.000260 1986 12 7 46771 0.133117 0.344167 -0.1064418 0.0015464 -0.000557 -0.000628 0.000969 0.000563 0.0000179 0.0000268 0.000243 0.000237 1986 12 8 46772 0.134534 0.342661 -0.1080335 0.0016348 -0.000751 -0.000599 0.001791 0.001182 0.0000393 0.0000251 0.000310 0.000369 1986 12 9 46773 0.135953 0.340631 -0.1096773 0.0016605 -0.000586 -0.000610 0.001438 0.001150 0.0000324 0.0000297 0.000310 0.000389 1986 12 10 46774 0.137096 0.338519 -0.1113207 0.0016255 -0.000050 -0.000653 0.000961 0.000758 0.0000201 0.0000287 0.000287 0.000347 1986 12 11 46775 0.137878 0.336892 -0.1129011 0.0015273 0.000495 -0.000745 0.001299 0.001034 0.0000251 0.0000389 0.000398 0.000473 1986 12 12 46776 0.138246 0.335882 -0.1143570 0.0013728 0.000727 -0.000843 0.002686 0.002141 0.0000577 0.0000315 0.000920 0.001093 1986 12 13 46777 0.138698 0.334771 -0.1156381 0.0011755 0.000561 -0.000891 0.002316 0.001889 0.0000379 0.0000349 0.000797 0.000710 1986 12 14 46778 0.139367 0.333150 -0.1167092 0.0009568 0.000127 -0.000874 0.000511 0.000434 0.0000120 0.0000249 0.000261 0.000226 1986 12 15 46779 0.139993 0.331084 -0.1175622 0.0007511 -0.000330 -0.000808 0.000499 0.000424 0.0000120 0.0000120 0.000260 0.000226 1986 12 16 46780 0.140318 0.328973 -0.1182299 0.0006016 -0.000599 -0.000724 0.000503 0.000428 0.0000120 0.0000120 0.000260 0.000226 1986 12 17 46781 0.140482 0.327298 -0.1187893 0.0005452 -0.000611 -0.000638 0.001233 0.001089 0.0000120 0.0000123 0.000260 0.000226 1986 12 18 46782 0.140819 0.326328 -0.1193461 0.0005975 -0.000431 -0.000552 0.003217 0.004978 0.0000126 0.0000123 0.000291 0.000220 1986 12 19 46783 0.141400 0.325872 -0.1200084 0.0007491 -0.000183 -0.000454 0.000895 0.000932 0.0000127 0.0000127 0.000294 0.000220 1986 12 20 46784 0.141826 0.325373 -0.1208630 0.0009716 0.000016 -0.000330 0.000605 0.000620 0.0000127 0.0000127 0.000294 0.000220 1986 12 21 46785 0.142001 0.324555 -0.1219624 0.0012267 0.000106 -0.000183 0.000798 0.000816 0.0000127 0.0000121 0.000294 0.000220 1986 12 22 46786 0.142757 0.323828 -0.1233183 0.0014744 0.000089 -0.000037 0.000766 0.000820 0.0000115 0.0000119 0.000312 0.000190 1986 12 23 46787 0.143977 0.323171 -0.1249041 0.0016800 0.000002 0.000073 0.000444 0.000488 0.0000111 0.0000113 0.000322 0.000180 1986 12 24 46788 0.144833 0.322167 -0.1266617 0.0018169 -0.000107 0.000110 0.000441 0.000485 0.0000111 0.0000111 0.000322 0.000180 1986 12 25 46789 0.144870 0.320634 -0.1285109 0.0018663 -0.000205 0.000059 0.000626 0.000688 0.0000111 0.0000111 0.000322 0.000180 1986 12 26 46790 0.144412 0.318896 -0.1303583 0.0018175 -0.000280 -0.000066 0.008202 0.008813 0.0000111 0.0000126 0.000322 0.000180 1986 12 27 46791 0.144082 0.317434 -0.1321075 0.0016735 -0.000329 -0.000231 0.020386 0.019587 0.0000141 0.0000130 0.000283 0.000251 1986 12 28 46792 0.144207 0.316432 -0.1336768 0.0014602 -0.000361 -0.000390 0.001896 0.001823 0.0000148 0.0000144 0.000278 0.000272 1986 12 29 46793 0.144657 0.315671 -0.1350236 0.0012318 -0.000386 -0.000506 0.000482 0.000464 0.0000148 0.0000148 0.000278 0.000272 1986 12 30 46794 0.145125 0.314800 -0.1361672 0.0010605 -0.000415 -0.000562 0.000480 0.000462 0.0000148 0.0000148 0.000278 0.000272 1986 12 31 46795 0.145411 0.313671 -0.1371960 0.0010108 -0.000449 -0.000558 0.000481 0.000462 0.0000148 0.0000148 0.000278 0.000272 1987 1 1 46796 0.145582 0.312506 -0.1382459 0.0011075 -0.000484 -0.000517 0.000834 0.000800 0.0000148 0.0000128 0.000278 0.000271 1987 1 2 46797 0.145822 0.311610 -0.1394517 0.0013186 -0.000512 -0.000472 0.004043 0.003570 0.0000108 0.0000127 0.000257 0.000166 1987 1 3 46798 0.146197 0.310928 -0.1408933 0.0015678 -0.000526 -0.000447 0.000984 0.000952 0.0000107 0.0000108 0.000255 0.000163 1987 1 4 46799 0.146506 0.309874 -0.1425668 0.0017698 -0.000528 -0.000461 0.000495 0.000482 0.0000107 0.0000107 0.000255 0.000163 1987 1 5 46800 0.146521 0.308029 -0.1443938 0.0018666 -0.000522 -0.000511 0.000663 0.000640 0.0000107 0.0000107 0.000255 0.000163 1987 1 6 46801 0.146431 0.306205 -0.1462580 0.0018418 -0.000513 -0.000575 0.001762 0.001570 0.0000107 0.0000110 0.000255 0.000163 1987 1 7 46802 0.146352 0.305095 -0.1480436 0.0017102 -0.000490 -0.000617 0.003245 0.002666 0.0000113 0.0000110 0.000253 0.000160 1987 1 8 46803 0.145982 0.304172 -0.1496575 0.0015007 -0.000426 -0.000600 0.001096 0.000996 0.0000114 0.0000114 0.000252 0.000160 1987 1 9 46804 0.145104 0.302805 -0.1510364 0.0012469 -0.000295 -0.000502 0.000551 0.000504 0.0000114 0.0000114 0.000252 0.000160 1987 1 10 46805 0.143895 0.301269 -0.1521533 0.0009894 -0.000096 -0.000330 0.000696 0.000636 0.0000114 0.0000114 0.000252 0.000160 1987 1 11 46806 0.142226 0.300210 -0.1530261 0.0007739 0.000114 -0.000135 0.001926 0.001710 0.0000114 0.0000134 0.000252 0.000160 1987 1 12 46807 0.140309 0.299553 -0.1537197 0.0006408 0.000242 0.000011 0.002677 0.002042 0.0000153 0.0000136 0.000365 0.000217 1987 1 13 46808 0.139110 0.298297 -0.1543318 0.0006069 0.000199 0.000047 0.000733 0.000548 0.0000158 0.0000154 0.000372 0.000224 1987 1 14 46809 0.139396 0.295776 -0.1549602 0.0006546 -0.000033 -0.000038 0.000677 0.000558 0.0000154 0.0000149 0.000316 0.000223 1987 1 15 46810 0.140784 0.292811 -0.1556667 0.0007451 -0.000369 -0.000187 0.000561 0.000640 0.0000141 0.0000144 0.000220 0.000220 1987 1 16 46811 0.141571 0.291565 -0.1564714 0.0008608 -0.000636 -0.000277 0.000688 0.000921 0.0000134 0.0000137 0.000189 0.000218 1987 1 17 46812 0.141238 0.291674 -0.1574013 0.0010193 -0.000735 -0.000285 0.001726 0.001658 0.0000133 0.0000136 0.000191 0.000220 1987 1 18 46813 0.140582 0.290874 -0.1585126 0.0012319 -0.000694 -0.000295 0.001332 0.000836 0.0000139 0.0000141 0.000400 0.000263 1987 1 19 46814 0.140096 0.288399 -0.1598567 0.0014671 -0.000582 -0.000374 0.000902 0.000615 0.0000150 0.0000181 0.000311 0.000258 1987 1 20 46815 0.139681 0.285355 -0.1614286 0.0016549 -0.000435 -0.000477 0.000667 0.000507 0.0000224 0.0000225 0.000205 0.000236 1987 1 21 46816 0.138926 0.283785 -0.1631403 0.0017298 -0.000122 -0.000319 0.000672 0.000555 0.0000300 0.0000240 0.000195 0.000213 1987 1 22 46817 0.137600 0.282396 -0.1648569 0.0016743 0.000112 -0.000123 0.000948 0.000821 0.0000256 0.0000232 0.000211 0.000204 1987 1 23 46818 0.136607 0.281158 -0.1664568 0.0015139 0.000071 -0.000092 0.000864 0.001063 0.0000164 0.0000205 0.000289 0.000222 1987 1 24 46819 0.136557 0.280861 -0.1678586 0.0012905 -0.000149 -0.000120 0.000441 0.000694 0.0000154 0.0000159 0.000319 0.000227 1987 1 25 46820 0.136398 0.279661 -0.1690275 0.0010551 -0.000359 -0.000047 0.000413 0.000662 0.0000154 0.0000154 0.000319 0.000227 1987 1 26 46821 0.135627 0.277417 -0.1699827 0.0008712 -0.000449 0.000137 0.001526 0.002105 0.0000154 0.0000157 0.000319 0.000228 1987 1 27 46822 0.134840 0.275737 -0.1708095 0.0008060 -0.000423 0.000281 0.006023 0.003223 0.0000160 0.0000157 0.000305 0.000290 1987 1 28 46823 0.134888 0.275508 -0.1716499 0.0008975 -0.000358 0.000216 0.000781 0.000650 0.0000160 0.0000162 0.000296 0.000295 1987 1 29 46824 0.135865 0.275758 -0.1726558 0.0011245 -0.000337 -0.000105 0.000495 0.000359 0.0000165 0.0000171 0.000250 0.000295 1987 1 30 46825 0.136711 0.275305 -0.1739269 0.0014134 -0.000393 -0.000514 0.000366 0.000227 0.0000182 0.0000181 0.000178 0.000293 1987 1 31 46826 0.135665 0.274470 -0.1754773 0.0016778 -0.000447 -0.000623 0.000421 0.000254 0.0000198 0.0000191 0.000154 0.000293 1987 2 1 46827 0.133427 0.273935 -0.1772480 0.0018580 -0.000459 -0.000372 0.001160 0.000740 0.0000199 0.0000192 0.000158 0.000282 1987 2 2 46828 0.131699 0.273332 -0.1791451 0.0019322 -0.000450 -0.000086 0.001097 0.000937 0.0000186 0.0000191 0.000501 0.000222 1987 2 3 46829 0.130248 0.271566 -0.1810674 0.0018997 -0.000442 -0.000096 0.000870 0.000685 0.0000183 0.0000181 0.000502 0.000223 1987 2 4 46830 0.128752 0.268703 -0.1829138 0.0017741 -0.000428 -0.000425 0.000774 0.000435 0.0000176 0.0000177 0.000319 0.000228 1987 2 5 46831 0.128829 0.266974 -0.1846017 0.0015582 -0.000291 -0.000532 0.000410 0.000224 0.0000172 0.0000188 0.000163 0.000226 1987 2 6 46832 0.129085 0.266204 -0.1860306 0.0012964 -0.000169 -0.000250 0.000496 0.000274 0.0000200 0.0000309 0.000153 0.000257 1987 2 7 46833 0.128741 0.265165 -0.1872056 0.0010994 -0.000235 0.000115 0.001304 0.000836 0.0000446 0.0000223 0.000460 0.000423 1987 2 8 46834 0.128822 0.263539 -0.1882486 0.0010205 -0.000461 0.000202 0.000552 0.000383 0.0000245 0.0000313 0.000261 0.000226 1987 2 9 46835 0.129310 0.261774 -0.1892715 0.0010093 -0.000677 -0.000129 0.000297 0.000185 0.0000179 0.0000237 0.000144 0.000196 1987 2 10 46836 0.128298 0.260932 -0.1902956 0.0010009 -0.000686 -0.000578 0.000350 0.000214 0.0000230 0.0000303 0.000171 0.000272 1987 2 11 46837 0.126768 0.260840 -0.1913017 0.0010033 -0.000462 -0.000701 0.000828 0.000520 0.0000428 0.0000198 0.000328 0.000517 1987 2 12 46838 0.126391 0.260521 -0.1923266 0.0010753 -0.000241 -0.000412 0.000781 0.000835 0.0000166 0.0000297 0.000409 0.000217 1987 2 13 46839 0.126391 0.259505 -0.1934694 0.0012506 -0.000275 0.000047 0.000686 0.000663 0.0000166 0.0000197 0.000399 0.000218 1987 2 14 46840 0.125694 0.258081 -0.1948347 0.0015025 -0.000557 0.000360 0.000776 0.000531 0.0000227 0.0000265 0.000442 0.000319 1987 2 15 46841 0.125067 0.257040 -0.1964687 0.0017657 -0.000627 0.000422 0.000910 0.000503 0.0000365 0.0000326 0.000482 0.000693 1987 2 16 46842 0.125136 0.256587 -0.1983476 0.0019738 -0.000320 0.000298 0.002382 0.001467 0.0000426 0.0000341 0.000349 0.000415 1987 2 17 46843 0.125387 0.256164 -0.2003872 0.0020756 0.000057 0.000115 0.001491 0.000961 0.0000318 0.0000360 0.000138 0.000136 1987 2 18 46844 0.125206 0.255282 -0.2024643 0.0020502 0.000118 -0.000021 0.000567 0.000307 0.0000295 0.0000283 0.000134 0.000132 1987 2 19 46845 0.124573 0.254025 -0.2044544 0.0019111 -0.000257 -0.000070 0.000356 0.000180 0.0000248 0.0000260 0.000125 0.000123 1987 2 20 46846 0.123760 0.252630 -0.2062616 0.0017070 -0.000614 -0.000094 0.000313 0.000155 0.0000225 0.0000230 0.000120 0.000118 1987 2 21 46847 0.123009 0.251660 -0.2078581 0.0015078 -0.000603 -0.000100 0.000968 0.000496 0.0000212 0.0000195 0.000125 0.000121 1987 2 22 46848 0.122447 0.251353 -0.2092865 0.0013724 -0.000316 -0.000057 0.001232 0.000935 0.0000164 0.0000187 0.000282 0.000182 1987 2 23 46849 0.122273 0.250683 -0.2106333 0.0013330 -0.000067 0.000027 0.000567 0.000341 0.0000162 0.0000162 0.000181 0.000154 1987 2 24 46850 0.122456 0.248640 -0.2119994 0.0013915 -0.000128 0.000073 0.000419 0.000204 0.0000160 0.0000171 0.000112 0.000117 1987 2 25 46851 0.121546 0.247896 -0.2134677 0.0015688 -0.000469 -0.000152 0.000475 0.000244 0.0000181 0.0000183 0.000130 0.000141 1987 2 26 46852 0.120202 0.247778 -0.2151760 0.0018737 -0.000622 -0.000387 0.000660 0.000490 0.0000205 0.0000152 0.000225 0.000235 1987 2 27 46853 0.119859 0.246538 -0.2172273 0.0022260 -0.000304 -0.000354 0.000767 0.000760 0.0000124 0.0000159 0.000392 0.000175 1987 2 28 46854 0.120544 0.244575 -0.2196086 0.0025138 0.000288 -0.000107 0.000547 0.000541 0.0000112 0.0000118 0.000467 0.000159 1987 3 1 46855 0.120823 0.242723 -0.2222119 0.0026621 0.000764 0.000160 0.000449 0.000444 0.0000112 0.0000112 0.000467 0.000159 1987 3 2 46856 0.120155 0.241411 -0.2248821 0.0026477 0.000881 0.000300 0.000721 0.000697 0.0000112 0.0000159 0.000467 0.000159 1987 3 3 46857 0.119522 0.240639 -0.2274646 0.0024908 0.000649 0.000275 0.006782 0.002535 0.0000206 0.0000170 0.000290 0.000215 1987 3 4 46858 0.119351 0.239868 -0.2298385 0.0022374 0.000253 0.000127 0.001913 0.001639 0.0000227 0.0000217 0.000284 0.000221 1987 3 5 46859 0.118002 0.238360 -0.2319328 0.0019398 -0.000095 -0.000068 0.001085 0.001108 0.0000227 0.0000227 0.000284 0.000221 1987 3 6 46860 0.114212 0.236014 -0.2337259 0.0016427 -0.000270 -0.000248 0.001315 0.001433 0.0000227 0.0000227 0.000284 0.000221 1987 3 7 46861 0.111482 0.233893 -0.2352360 0.0013824 -0.000275 -0.000361 0.001734 0.002186 0.0000227 0.0000170 0.000284 0.000221 1987 3 8 46862 0.111021 0.232481 -0.2365153 0.0011908 -0.000201 -0.000378 0.001247 0.001179 0.0000113 0.0000169 0.000241 0.000171 1987 3 9 46863 0.111251 0.231341 -0.2376464 0.0010944 -0.000153 -0.000282 0.000746 0.000692 0.0000112 0.0000117 0.000239 0.000170 1987 3 10 46864 0.110302 0.229652 -0.2387336 0.0011070 -0.000186 -0.000094 0.000551 0.000510 0.0000120 0.0000138 0.000243 0.000183 1987 3 11 46865 0.108766 0.227451 -0.2398873 0.0012259 -0.000288 0.000119 0.000662 0.000598 0.0000164 0.0000188 0.000253 0.000243 1987 3 12 46866 0.108607 0.225955 -0.2412064 0.0014252 -0.000391 0.000266 0.001426 0.001121 0.0000255 0.0000192 0.000261 0.000352 1987 3 13 46867 0.109115 0.224977 -0.2427497 0.0016607 -0.000429 0.000281 0.002001 0.001362 0.0000219 0.0000180 0.000247 0.000336 1987 3 14 46868 0.109480 0.224211 -0.2445282 0.0018876 -0.000378 0.000164 0.000381 0.000341 0.0000105 0.0000162 0.000184 0.000193 1987 3 15 46869 0.109533 0.223477 -0.2465115 0.0020681 -0.000252 -0.000038 0.000368 0.000329 0.0000105 0.0000105 0.000184 0.000192 1987 3 16 46870 0.109469 0.222778 -0.2486370 0.0021750 -0.000094 -0.000254 0.000379 0.000339 0.0000105 0.0000105 0.000184 0.000192 1987 3 17 46871 0.109338 0.222261 -0.2508237 0.0021924 0.000025 -0.000412 0.001228 0.001148 0.0000105 0.0000109 0.000184 0.000192 1987 3 18 46872 0.109061 0.222036 -0.2529820 0.0021177 0.000026 -0.000452 0.003036 0.003870 0.0000112 0.0000110 0.000228 0.000174 1987 3 19 46873 0.108706 0.222001 -0.2550274 0.0019659 -0.000140 -0.000343 0.000679 0.000631 0.0000114 0.0000118 0.000232 0.000174 1987 3 20 46874 0.108506 0.221858 -0.2568992 0.0017700 -0.000446 -0.000098 0.000488 0.000411 0.0000124 0.0000148 0.000232 0.000188 1987 3 21 46875 0.108363 0.221422 -0.2585743 0.0015727 -0.000760 0.000201 0.000567 0.000361 0.0000182 0.0000295 0.000232 0.000270 1987 3 22 46876 0.107677 0.220920 -0.2600719 0.0014240 -0.000849 0.000419 0.000774 0.000400 0.0000467 0.0000770 0.000275 0.000592 1987 3 23 46877 0.106060 0.220269 -0.2614637 0.0013723 -0.000680 0.000441 0.002936 0.001514 0.0001357 0.0000342 0.000848 0.001742 1987 3 24 46878 0.103775 0.219173 -0.2628626 0.0014443 -0.000439 0.000259 0.001383 0.001692 0.0000218 0.0000744 0.000217 0.000314 1987 3 25 46879 0.101497 0.217736 -0.2643915 0.0016321 -0.000328 -0.000012 0.000731 0.001137 0.0000130 0.0000190 0.000132 0.000190 1987 3 26 46880 0.099194 0.217083 -0.2661475 0.0018914 -0.000412 -0.000191 0.000811 0.001084 0.0000162 0.0000140 0.000187 0.000255 1987 3 27 46881 0.097500 0.216563 -0.2681691 0.0021393 -0.000447 -0.000051 0.000682 0.000745 0.0000151 0.0000145 0.000223 0.000233 1987 3 28 46882 0.096911 0.215995 -0.2703959 0.0022871 -0.000468 0.000167 0.000541 0.000606 0.0000127 0.0000137 0.000187 0.000189 1987 3 29 46883 0.096882 0.215569 -0.2726975 0.0022924 -0.000610 0.000162 0.000590 0.000542 0.0000124 0.0000125 0.000193 0.000203 1987 3 30 46884 0.096497 0.214726 -0.2749337 0.0021673 -0.000811 -0.000031 0.000626 0.000527 0.0000123 0.0000123 0.000199 0.000214 1987 3 31 46885 0.095316 0.213276 -0.2769968 0.0019577 -0.000956 -0.000241 0.000637 0.000538 0.0000123 0.0000123 0.000199 0.000214 1987 4 1 46886 0.094016 0.212113 -0.2788320 0.0017190 -0.000966 -0.000333 0.001398 0.001567 0.0000123 0.0000128 0.000199 0.000214 1987 4 2 46887 0.093594 0.212264 -0.2804353 0.0014952 -0.000833 -0.000268 0.001757 0.003027 0.0000132 0.0000128 0.000228 0.000198 1987 4 3 46888 0.094009 0.213298 -0.2818363 0.0013133 -0.000602 -0.000069 0.000681 0.000608 0.0000133 0.0000132 0.000231 0.000197 1987 4 4 46889 0.093833 0.213159 -0.2830841 0.0011887 -0.000340 0.000221 0.000541 0.000467 0.0000133 0.0000133 0.000231 0.000197 1987 4 5 46890 0.092356 0.211018 -0.2842407 0.0011325 -0.000113 0.000550 0.000690 0.000594 0.0000133 0.0000133 0.000231 0.000197 1987 4 6 46891 0.091110 0.209220 -0.2853779 0.0011522 0.000024 0.000826 0.000983 0.000845 0.0000133 0.0000125 0.000231 0.000197 1987 4 7 46892 0.090400 0.209235 -0.2865723 0.0012469 0.000028 0.000923 0.001529 0.002302 0.0000117 0.0000124 0.000195 0.000179 1987 4 8 46893 0.089525 0.210608 -0.2878940 0.0014032 -0.000115 0.000735 0.000895 0.001163 0.0000116 0.0000116 0.000193 0.000178 1987 4 9 46894 0.087964 0.211670 -0.2893935 0.0015958 -0.000360 0.000279 0.000529 0.000630 0.0000114 0.0000109 0.000193 0.000171 1987 4 10 46895 0.086454 0.211130 -0.2910910 0.0017933 -0.000592 -0.000252 0.000414 0.000413 0.0000102 0.0000104 0.000191 0.000141 1987 4 11 46896 0.085050 0.210415 -0.2929741 0.0019655 -0.000661 -0.000512 0.000393 0.000357 0.0000095 0.0000098 0.000189 0.000126 1987 4 12 46897 0.083366 0.210872 -0.2950024 0.0020859 -0.000546 -0.000327 0.000393 0.000354 0.0000094 0.0000101 0.000189 0.000126 1987 4 13 46898 0.081661 0.211280 -0.2971123 0.0021277 -0.000403 0.000126 0.000452 0.000395 0.0000107 0.0000101 0.000206 0.000238 1987 4 14 46899 0.080332 0.209878 -0.2992154 0.0020656 -0.000404 0.000503 0.000452 0.000413 0.0000108 0.0000109 0.000204 0.000242 1987 4 15 46900 0.079303 0.206908 -0.3012032 0.0018925 -0.000574 0.000528 0.000452 0.000513 0.0000110 0.0000110 0.000197 0.000241 1987 4 16 46901 0.077804 0.205558 -0.3029750 0.0016436 -0.000689 0.000226 0.000569 0.000796 0.0000113 0.0000113 0.000192 0.000240 1987 4 17 46902 0.075984 0.206106 -0.3044892 0.0013952 -0.000563 -0.000167 0.001090 0.001117 0.0000116 0.0000115 0.000232 0.000225 1987 4 18 46903 0.074609 0.206065 -0.3057894 0.0012256 -0.000211 -0.000379 0.000592 0.000522 0.0000118 0.0000117 0.000282 0.000216 1987 4 19 46904 0.073533 0.205158 -0.3069817 0.0011741 0.000201 -0.000274 0.000547 0.000481 0.0000118 0.0000119 0.000282 0.000216 1987 4 20 46905 0.072405 0.204405 -0.3081833 0.0012328 0.000466 0.000052 0.001412 0.001097 0.0000120 0.0000166 0.000276 0.000216 1987 4 21 46906 0.071246 0.204460 -0.3094849 0.0013707 0.000444 0.000322 0.002331 0.001109 0.0000215 0.0000168 0.000208 0.000220 1987 4 22 46907 0.070260 0.204560 -0.3109452 0.0015593 0.000135 0.000292 0.001196 0.000649 0.0000215 0.0000194 0.000207 0.000220 1987 4 23 46908 0.069680 0.203863 -0.3126027 0.0017795 -0.000309 -0.000057 0.000884 0.000670 0.0000173 0.0000170 0.000207 0.000225 1987 4 24 46909 0.069901 0.204844 -0.3144825 0.0020003 -0.000609 -0.000420 0.000492 0.000440 0.0000125 0.0000148 0.000208 0.000237 1987 4 25 46910 0.069482 0.204671 -0.3165666 0.0021596 -0.000534 -0.000412 0.000557 0.000492 0.0000123 0.0000124 0.000208 0.000238 1987 4 26 46911 0.068270 0.203411 -0.3187594 0.0021892 -0.000107 0.000036 0.001795 0.001215 0.0000123 0.0000164 0.000208 0.000238 1987 4 27 46912 0.067274 0.203640 -0.3209078 0.0020608 0.000410 0.000647 0.003584 0.001602 0.0000204 0.0000171 0.000353 0.000356 1987 4 28 46913 0.066564 0.204727 -0.3228575 0.0018065 0.000696 0.001005 0.000956 0.000914 0.0000220 0.0000216 0.000381 0.000376 1987 4 29 46914 0.065516 0.204649 -0.3245141 0.0015073 0.000582 0.000841 0.000893 0.000936 0.0000228 0.0000239 0.000388 0.000397 1987 4 30 46915 0.063691 0.202890 -0.3258804 0.0012565 0.000181 0.000253 0.000787 0.001067 0.0000259 0.0000239 0.000411 0.000480 1987 5 1 46916 0.061591 0.202221 -0.3270461 0.0011040 -0.000064 -0.000245 0.000674 0.000946 0.0000249 0.0000223 0.000381 0.000298 1987 5 2 46917 0.059684 0.202465 -0.3281133 0.0010333 -0.000020 -0.000249 0.000553 0.000686 0.0000188 0.0000202 0.000302 0.000175 1987 5 3 46918 0.058013 0.201705 -0.3291399 0.0010012 0.000075 0.000133 0.000486 0.000631 0.0000155 0.0000155 0.000251 0.000162 1987 5 4 46919 0.056704 0.202074 -0.3301421 0.0009916 -0.000051 0.000145 0.000444 0.000547 0.0000122 0.0000131 0.000185 0.000173 1987 5 5 46920 0.055522 0.202705 -0.3311453 0.0010635 -0.000181 -0.000434 0.000427 0.000423 0.0000108 0.0000118 0.000183 0.000146 1987 5 6 46921 0.054480 0.201750 -0.3322845 0.0012395 -0.000098 -0.000645 0.000462 0.000398 0.0000114 0.0000160 0.000206 0.000137 1987 5 7 46922 0.054063 0.199983 -0.3336316 0.0014165 0.000085 -0.000124 0.000908 0.000579 0.0000212 0.0000166 0.000223 0.000212 1987 5 8 46923 0.054318 0.199692 -0.3351160 0.0015442 0.000065 0.000236 0.001128 0.000772 0.0000219 0.0000185 0.000231 0.000259 1987 5 9 46924 0.053685 0.200604 -0.3367082 0.0016689 -0.000196 0.000136 0.000771 0.000671 0.0000159 0.0000204 0.000247 0.000301 1987 5 10 46925 0.052349 0.201006 -0.3384298 0.0017939 -0.000503 -0.000123 0.000813 0.000740 0.0000189 0.0000463 0.000300 0.000366 1987 5 11 46926 0.050780 0.200556 -0.3402602 0.0018585 -0.000699 -0.000313 0.001701 0.002630 0.0000766 0.0000590 0.001152 0.001225 1987 5 12 46927 0.049107 0.200112 -0.3421052 0.0018034 -0.000721 -0.000358 0.001711 0.003112 0.0000990 0.0000442 0.002207 0.001485 1987 5 13 46928 0.047583 0.200049 -0.3438318 0.0016187 -0.000578 -0.000253 0.000449 0.000472 0.0000118 0.0000555 0.000364 0.000250 1987 5 14 46929 0.046361 0.200061 -0.3453280 0.0013537 -0.000337 -0.000043 0.000470 0.000493 0.0000120 0.0000146 0.000372 0.000255 1987 5 15 46930 0.045217 0.199734 -0.3465533 0.0010947 -0.000094 0.000218 0.000687 0.000721 0.0000173 0.0000236 0.000533 0.000367 1987 5 16 46931 0.043505 0.199228 -0.3475566 0.0009314 0.000063 0.000491 0.001751 0.001963 0.0000351 0.0000278 0.001056 0.000740 1987 5 17 46932 0.041293 0.198635 -0.3484664 0.0009206 0.000114 0.000695 0.002653 0.004275 0.0000382 0.0000256 0.000650 0.000684 1987 5 18 46933 0.039285 0.197966 -0.3494414 0.0010606 0.000105 0.000698 0.000666 0.000686 0.0000161 0.0000272 0.000256 0.000281 1987 5 19 46934 0.037986 0.197409 -0.3506112 0.0012990 0.000110 0.000383 0.000512 0.000520 0.0000161 0.0000161 0.000256 0.000280 1987 5 20 46935 0.037299 0.196992 -0.3520383 0.0015595 0.000171 -0.000262 0.000707 0.000708 0.0000161 0.0000161 0.000256 0.000280 1987 5 21 46936 0.036468 0.196346 -0.3537085 0.0017730 0.000263 -0.001040 0.001220 0.001163 0.0000161 0.0000150 0.000256 0.000280 1987 5 22 46937 0.035765 0.196552 -0.3555499 0.0018960 0.000307 -0.001594 0.002483 0.002173 0.0000140 0.0000150 0.000285 0.000307 1987 5 23 46938 0.035606 0.198502 -0.3574625 0.0019129 0.000235 -0.001591 0.001317 0.001217 0.0000138 0.0000138 0.000283 0.000307 1987 5 24 46939 0.035103 0.200638 -0.3593420 0.0018299 0.000057 -0.000940 0.000657 0.000642 0.0000137 0.0000136 0.000253 0.000284 1987 5 25 46940 0.032568 0.199955 -0.3610990 0.0016706 -0.000120 0.000076 0.000575 0.000642 0.0000134 0.0000135 0.000192 0.000229 1987 5 26 46941 0.029517 0.198194 -0.3626734 0.0014610 -0.000125 0.000841 0.000745 0.000895 0.0000133 0.0000134 0.000168 0.000205 1987 5 27 46942 0.027722 0.197433 -0.3640253 0.0012246 0.000048 0.001003 0.001231 0.001485 0.0000133 0.0000141 0.000169 0.000208 1987 5 28 46943 0.027203 0.197585 -0.3651384 0.0009949 0.000198 0.000710 0.000590 0.000676 0.0000149 0.0000141 0.000282 0.000354 1987 5 29 46944 0.027050 0.197663 -0.3660384 0.0008187 0.000113 0.000358 0.000553 0.000630 0.0000149 0.0000150 0.000285 0.000349 1987 5 30 46945 0.026544 0.197174 -0.3668023 0.0007407 -0.000248 0.000253 0.000531 0.000597 0.0000151 0.0000151 0.000291 0.000330 1987 5 31 46946 0.026037 0.197087 -0.3675459 0.0007671 -0.000646 0.000306 0.000560 0.000624 0.0000152 0.0000150 0.000295 0.000318 1987 6 1 46947 0.025725 0.197594 -0.3683589 0.0008565 -0.000856 0.000341 0.001795 0.001982 0.0000150 0.0000143 0.000293 0.000304 1987 6 2 46948 0.025283 0.197812 -0.3692748 0.0009623 -0.000828 0.000294 0.001078 0.001084 0.0000134 0.0000142 0.000273 0.000240 1987 6 3 46949 0.024605 0.197563 -0.3702915 0.0010660 -0.000648 0.000191 0.000606 0.000607 0.0000134 0.0000134 0.000273 0.000240 1987 6 4 46950 0.023918 0.197573 -0.3714065 0.0011763 -0.000451 0.000108 0.000849 0.000848 0.0000134 0.0000135 0.000273 0.000240 1987 6 5 46951 0.023305 0.198079 -0.3726360 0.0013043 -0.000333 0.000079 0.001053 0.000967 0.0000136 0.0000136 0.000288 0.000273 1987 6 6 46952 0.022848 0.198666 -0.3739984 0.0014351 -0.000326 0.000096 0.000525 0.000466 0.0000137 0.0000137 0.000296 0.000293 1987 6 7 46953 0.022692 0.198765 -0.3754802 0.0015242 -0.000406 0.000128 0.000515 0.000457 0.0000137 0.0000138 0.000296 0.000293 1987 6 8 46954 0.022876 0.198304 -0.3770125 0.0015177 -0.000508 0.000148 0.000529 0.000462 0.0000140 0.0000180 0.000297 0.000289 1987 6 9 46955 0.023170 0.197893 -0.3784798 0.0013875 -0.000539 0.000143 0.001701 0.000571 0.0000222 0.0000182 0.000314 0.000240 1987 6 10 46956 0.023067 0.198215 -0.3797627 0.0011571 -0.000425 0.000105 0.001788 0.000573 0.0000224 0.0000222 0.000315 0.000239 1987 6 11 46957 0.021956 0.199208 -0.3807932 0.0009021 -0.000163 0.000045 0.001726 0.000595 0.0000222 0.0000189 0.000314 0.000240 1987 6 12 46958 0.019459 0.199701 -0.3815955 0.0007193 0.000144 -0.000016 0.001052 0.000899 0.0000155 0.0000185 0.000298 0.000383 1987 6 13 46959 0.016012 0.198787 -0.3822820 0.0006796 0.000334 -0.000045 0.000798 0.000757 0.0000147 0.0000151 0.000296 0.000468 1987 6 14 46960 0.013159 0.197771 -0.3830078 0.0007945 0.000297 -0.000021 0.000678 0.000656 0.0000147 0.0000147 0.000296 0.000469 1987 6 15 46961 0.011890 0.198003 -0.3839067 0.0010150 0.000064 0.000055 0.001330 0.001283 0.0000147 0.0000141 0.000296 0.000468 1987 6 16 46962 0.011579 0.198907 -0.3850441 0.0012600 -0.000212 0.000158 0.004654 0.004001 0.0000135 0.0000141 0.000290 0.000239 1987 6 17 46963 0.011123 0.199527 -0.3864047 0.0014511 -0.000359 0.000258 0.001191 0.001256 0.0000134 0.0000135 0.000290 0.000233 1987 6 18 46964 0.010210 0.200079 -0.3879072 0.0015379 -0.000295 0.000332 0.000633 0.000655 0.0000134 0.0000135 0.000288 0.000231 1987 6 19 46965 0.009251 0.201102 -0.3894381 0.0015080 -0.000086 0.000367 0.000600 0.000562 0.0000136 0.0000135 0.000284 0.000223 1987 6 20 46966 0.008482 0.201561 -0.3908884 0.0013765 0.000063 0.000379 0.000589 0.000523 0.0000136 0.0000136 0.000280 0.000218 1987 6 21 46967 0.007627 0.201362 -0.3921688 0.0011706 0.000054 0.000344 0.000895 0.000781 0.0000137 0.0000141 0.000277 0.000218 1987 6 22 46968 0.006328 0.201849 -0.3932208 0.0009253 -0.000023 0.000221 0.001316 0.001146 0.0000146 0.0000145 0.000255 0.000227 1987 6 23 46969 0.004690 0.203565 -0.3940231 0.0006769 -0.000012 0.000024 0.000894 0.000802 0.0000153 0.0000120 0.000273 0.000244 1987 6 24 46970 0.003380 0.204651 -0.3945887 0.0004577 0.000163 -0.000151 0.000713 0.000649 0.0000094 0.0000094 0.000295 0.000284 1987 6 25 46971 0.002801 0.203912 -0.3949604 0.0002944 0.000386 -0.000088 0.000346 0.000310 0.0000035 0.0000060 0.000140 0.000150 1987 6 26 46972 0.002106 0.203318 -0.3952036 0.0002054 0.000487 0.000078 0.000238 0.000212 0.0000026 0.0000038 0.000107 0.000114 1987 6 27 46973 -0.000101 0.204684 -0.3953980 0.0002008 0.000417 0.000177 0.000295 0.000277 0.0000041 0.0000086 0.000154 0.000161 1987 6 28 46974 -0.002310 0.205604 -0.3956288 0.0002787 0.000259 0.000307 0.000498 0.000581 0.0000145 0.0000111 0.000271 0.000260 1987 6 29 46975 -0.003242 0.204434 -0.3959729 0.0004234 0.000157 0.000508 0.000600 0.000695 0.0000181 0.0000211 0.000298 0.000292 1987 6 30 46976 -0.004605 0.204339 -0.3964848 0.0006048 0.000216 0.000493 0.000976 0.001100 0.0000277 0.0000254 0.000458 0.000460 1987 7 1 46977 -0.006032 0.205899 -0.3971825 0.0007862 0.000392 0.000154 0.001228 0.001402 0.0000328 0.0000271 0.001078 0.000923 1987 7 2 46978 -0.005966 0.207165 -0.3980490 0.0009394 0.000517 -0.000303 0.001060 0.001108 0.0000265 0.0000270 0.000745 0.000503 1987 7 3 46979 -0.006216 0.207651 -0.3990462 0.0010452 0.000610 -0.000598 0.001197 0.001009 0.0000212 0.0000237 0.000418 0.000282 1987 7 4 46980 -0.008773 0.208131 -0.4001183 0.0010847 0.000843 -0.000543 0.001395 0.001154 0.0000209 0.0000211 0.000406 0.000273 1987 7 5 46981 -0.010950 0.208730 -0.4011889 0.0010412 0.001188 -0.000162 0.001653 0.001345 0.0000209 0.0000166 0.000405 0.000273 1987 7 6 46982 -0.011636 0.209153 -0.4021710 0.0009122 0.001408 0.000322 0.002232 0.001506 0.0000122 0.0000164 0.000253 0.000214 1987 7 7 46983 -0.011699 0.209226 -0.4029873 0.0007169 0.001233 0.000639 0.000914 0.000972 0.0000120 0.0000123 0.000244 0.000211 1987 7 8 46984 -0.012356 0.209329 -0.4035937 0.0004973 0.000590 0.000630 0.000501 0.000619 0.0000123 0.0000130 0.000226 0.000204 1987 7 9 46985 -0.013551 0.210492 -0.4039959 0.0003145 -0.000256 0.000358 0.000512 0.000787 0.0000141 0.0000142 0.000181 0.000183 1987 7 10 46986 -0.014850 0.211746 -0.4042631 0.0002317 -0.000684 0.000125 0.000773 0.001577 0.0000160 0.0000235 0.000163 0.000172 1987 7 11 46987 -0.016200 0.211075 -0.4045146 0.0002881 -0.000468 0.000121 0.001301 0.002014 0.0000329 0.0000247 0.000334 0.000347 1987 7 12 46988 -0.018000 0.210062 -0.4048888 0.0004790 0.000013 0.000288 0.001103 0.001186 0.0000333 0.0000253 0.000610 0.000447 1987 7 13 46989 -0.020438 0.211290 -0.4054959 0.0007468 0.000239 0.000457 0.000702 0.000658 0.0000177 0.0000241 0.000337 0.000243 1987 7 14 46990 -0.022713 0.213368 -0.4063709 0.0010038 0.000048 0.000524 0.000605 0.000554 0.0000148 0.0000232 0.000283 0.000203 1987 7 15 46991 -0.024312 0.214710 -0.4074639 0.0011725 -0.000308 0.000493 0.001307 0.000979 0.0000286 0.0000762 0.000384 0.000291 1987 7 16 46992 -0.025353 0.215312 -0.4086648 0.0012138 -0.000434 0.000421 0.005384 0.001856 0.0001376 0.0000287 0.000463 0.000372 1987 7 17 46993 -0.026029 0.215886 -0.4098463 0.0011291 -0.000140 0.000355 0.001180 0.001017 0.0000288 0.0000758 0.000409 0.000326 1987 7 18 46994 -0.026148 0.216652 -0.4108941 0.0009409 0.000250 0.000234 0.000570 0.000538 0.0000140 0.0000199 0.000254 0.000241 1987 7 19 46995 -0.025532 0.217312 -0.4117172 0.0006773 0.000254 0.000033 0.000384 0.000373 0.0000111 0.0000120 0.000130 0.000148 1987 7 20 46996 -0.024712 0.218151 -0.4122529 0.0003853 0.000031 0.000014 0.000323 0.000317 0.0000099 0.0000126 0.000105 0.000127 1987 7 21 46997 -0.024706 0.218998 -0.4125025 0.0001342 -0.000033 0.000237 0.000410 0.000459 0.0000141 0.0000155 0.000155 0.000177 1987 7 22 46998 -0.025948 0.219139 -0.4125429 -0.0000234 0.000164 0.000415 0.000538 0.000744 0.0000211 0.0000147 0.000292 0.000257 1987 7 23 46999 -0.027366 0.219067 -0.4124817 -0.0000817 0.000457 0.000351 0.000507 0.000478 0.0000154 0.0000161 0.000180 0.000180 1987 7 24 47000 -0.026616 0.221081 -0.4124069 -0.0000594 0.000499 0.000406 0.000420 0.000344 0.0000111 0.0000129 0.000109 0.000117 1987 7 25 47001 -0.026615 0.223359 -0.4123883 0.0000308 0.000309 0.000503 0.000563 0.000462 0.0000104 0.0000287 0.000097 0.000106 1987 7 26 47002 -0.027732 0.224280 -0.4124885 0.0001786 0.000123 0.000518 0.001708 0.001192 0.0000464 0.0000232 0.000413 0.000242 1987 7 27 47003 -0.028277 0.224467 -0.4127572 0.0003660 0.000166 0.000457 0.003270 0.001160 0.0000360 0.0000324 0.000693 0.000267 1987 7 28 47004 -0.027539 0.224787 -0.4132225 0.0005658 0.000497 0.000355 0.001593 0.000748 0.0000185 0.0000307 0.000441 0.000273 1987 7 29 47005 -0.026739 0.225236 -0.4138810 0.0007431 0.000942 0.000246 0.002086 0.001040 0.0000254 0.0000374 0.000609 0.000400 1987 7 30 47006 -0.026857 0.226155 -0.4146924 0.0008624 0.001199 0.000172 0.002372 0.001710 0.0000562 0.0000207 0.001305 0.000878 1987 7 31 47007 -0.027346 0.227218 -0.4155836 0.0008995 0.001109 0.000127 0.001346 0.001082 0.0000160 0.0000315 0.000288 0.000146 1987 8 1 47008 -0.027429 0.227874 -0.4164659 0.0008482 0.000740 0.000072 0.000384 0.000309 0.0000069 0.0000115 0.000128 0.000066 1987 8 2 47009 -0.027750 0.228626 -0.4172544 0.0007207 0.000291 -0.000034 0.000265 0.000214 0.0000070 0.0000082 0.000130 0.000067 1987 8 3 47010 -0.028976 0.230035 -0.4178850 0.0005435 -0.000008 -0.000200 0.000377 0.000305 0.0000095 0.0000236 0.000179 0.000093 1987 8 4 47011 -0.030252 0.231504 -0.4183287 0.0003546 -0.000026 -0.000396 0.001543 0.001054 0.0000401 0.0000754 0.000772 0.000413 1987 8 5 47012 -0.030912 0.232395 -0.4185991 0.0002031 0.000231 -0.000583 0.001760 0.001321 0.0001413 0.0000406 0.002610 0.002538 1987 8 6 47013 -0.031763 0.233038 -0.4187624 0.0001455 0.000617 -0.000746 0.001301 0.001054 0.0000411 0.0000815 0.000837 0.001228 1987 8 7 47014 -0.033053 0.233754 -0.4189375 0.0002255 0.000889 -0.000870 0.001160 0.000870 0.0000216 0.0000295 0.000445 0.000653 1987 8 8 47015 -0.033198 0.234112 -0.4192670 0.0004426 0.000784 -0.000902 0.001488 0.001089 0.0000180 0.0000171 0.000368 0.000534 1987 8 9 47016 -0.032625 0.234753 -0.4198619 0.0007404 0.000454 -0.000767 0.000998 0.000799 0.0000126 0.0000146 0.000149 0.000154 1987 8 10 47017 -0.032677 0.235785 -0.4207556 0.0010323 0.000310 -0.000420 0.000356 0.000291 0.0000112 0.0000123 0.000124 0.000126 1987 8 11 47018 -0.033558 0.236270 -0.4218988 0.0012433 0.000619 0.000073 0.000371 0.000302 0.0000121 0.0000148 0.000138 0.000138 1987 8 12 47019 -0.034405 0.236224 -0.4231900 0.0013324 0.001103 0.000492 0.000713 0.000560 0.0000183 0.0000187 0.000343 0.000257 1987 8 13 47020 -0.034491 0.236789 -0.4245066 0.0012866 0.001155 0.000590 0.001198 0.000897 0.0000254 0.0000622 0.001301 0.000394 1987 8 14 47021 -0.034884 0.238298 -0.4257196 0.0011189 0.000865 0.000344 0.003418 0.002364 0.0001060 0.0000892 0.002020 0.000748 1987 8 15 47022 -0.036805 0.240132 -0.4267232 0.0008748 0.000728 -0.000053 0.002914 0.002026 0.0001530 0.0000725 0.002198 0.001246 1987 8 16 47023 -0.039086 0.241688 -0.4274690 0.0006195 0.000866 -0.000365 0.001602 0.001354 0.0000391 0.0000858 0.000857 0.000969 1987 8 17 47024 -0.039505 0.242638 -0.4279766 0.0004144 0.001135 -0.000420 0.000883 0.000726 0.0000186 0.0000271 0.000405 0.000464 1987 8 18 47025 -0.038363 0.243265 -0.4283205 0.0002955 0.001169 -0.000192 0.001075 0.000811 0.0000152 0.0000255 0.000331 0.000380 1987 8 19 47026 -0.037174 0.243694 -0.4285945 0.0002707 0.000874 0.000203 0.002721 0.001399 0.0000324 0.0001041 0.000697 0.000802 1987 8 20 47027 -0.037120 0.244428 -0.4288903 0.0003349 0.000490 0.000560 0.003263 0.004300 0.0001930 0.0000387 0.002855 0.003454 1987 8 21 47028 -0.038284 0.246042 -0.4292914 0.0004764 0.000318 0.000676 0.001786 0.001752 0.0000450 0.0001061 0.000865 0.001029 1987 8 22 47029 -0.039548 0.248026 -0.4298657 0.0006753 0.000430 0.000480 0.000977 0.000747 0.0000192 0.0000304 0.000358 0.000341 1987 8 23 47030 -0.039396 0.249296 -0.4306571 0.0009062 0.000624 0.000057 0.000645 0.000612 0.0000159 0.0000188 0.000253 0.000176 1987 8 24 47031 -0.038614 0.250696 -0.4316834 0.0011353 0.000584 -0.000382 0.000658 0.000732 0.0000184 0.0000393 0.000268 0.000171 1987 8 25 47032 -0.038051 0.253538 -0.4329222 0.0013233 0.000314 -0.000597 0.001854 0.001810 0.0000627 0.0000325 0.000876 0.000592 1987 8 26 47033 -0.037638 0.256754 -0.4343141 0.0014414 0.000101 -0.000481 0.001244 0.000904 0.0000466 0.0000421 0.001123 0.000792 1987 8 27 47034 -0.037718 0.256941 -0.4357808 0.0014830 0.000160 -0.000161 0.000579 0.000506 0.0000216 0.0000314 0.000605 0.000508 1987 8 28 47035 -0.037935 0.255265 -0.4372512 0.0014664 0.000302 -0.000025 0.000507 0.000509 0.0000162 0.0000183 0.000373 0.000463 1987 8 29 47036 -0.038441 0.256462 -0.4386852 0.0014023 0.000360 0.000007 0.000669 0.000745 0.0000150 0.0000151 0.000320 0.000469 1987 8 30 47037 -0.038664 0.259605 -0.4400332 0.0012745 0.000298 0.000110 0.001727 0.001862 0.0000141 0.0000128 0.000297 0.000396 1987 8 31 47038 -0.038173 0.260863 -0.4412224 0.0010790 0.000161 0.000278 0.000627 0.000801 0.0000106 0.0000124 0.000224 0.000217 1987 9 1 47039 -0.038187 0.260950 -0.4421944 0.0008538 0.000063 0.000414 0.000487 0.000623 0.0000106 0.0000106 0.000223 0.000217 1987 9 2 47040 -0.039524 0.262059 -0.4429512 0.0006744 0.000104 0.000393 0.000682 0.000837 0.0000106 0.0000106 0.000223 0.000217 1987 9 3 47041 -0.040828 0.263389 -0.4435816 0.0006208 0.000299 0.000186 0.001220 0.001308 0.0000106 0.0000124 0.000223 0.000217 1987 9 4 47042 -0.041319 0.264315 -0.4442413 0.0007372 0.000572 -0.000097 0.003320 0.002971 0.0000142 0.0000126 0.000282 0.000241 1987 9 5 47043 -0.041368 0.265105 -0.4451006 0.0010091 0.000793 -0.000258 0.000993 0.001009 0.0000146 0.0000144 0.000288 0.000243 1987 9 6 47044 -0.041401 0.265833 -0.4462834 0.0013645 0.000843 -0.000101 0.000479 0.000491 0.0000146 0.0000146 0.000288 0.000243 1987 9 7 47045 -0.041315 0.266130 -0.4478211 0.0016981 0.000676 0.000429 0.000473 0.000485 0.0000146 0.0000146 0.000288 0.000243 1987 9 8 47046 -0.041236 0.266328 -0.4496397 0.0019137 0.000365 0.001144 0.001778 0.001810 0.0000146 0.0000148 0.000288 0.000243 1987 9 9 47047 -0.041495 0.267043 -0.4515907 0.0019622 0.000063 0.001673 0.005449 0.004382 0.0000150 0.0000148 0.000367 0.000285 1987 9 10 47048 -0.042155 0.268120 -0.4535084 0.0018522 -0.000081 0.001671 0.000914 0.000675 0.0000150 0.0000148 0.000370 0.000283 1987 9 11 47049 -0.042897 0.268766 -0.4552579 0.0016298 -0.000009 0.001054 0.000687 0.000564 0.0000146 0.0000142 0.000335 0.000243 1987 9 12 47050 -0.043403 0.268876 -0.4567557 0.0013533 0.000198 0.000106 0.000566 0.000655 0.0000133 0.0000136 0.000257 0.000172 1987 9 13 47051 -0.043631 0.269733 -0.4579736 0.0010744 0.000314 -0.000545 0.000550 0.000808 0.0000126 0.0000129 0.000227 0.000148 1987 9 14 47052 -0.044216 0.271712 -0.4589269 0.0008356 0.000277 -0.000582 0.001407 0.002241 0.0000125 0.0000128 0.000224 0.000150 1987 9 15 47053 -0.045549 0.273856 -0.4596732 0.0006767 0.000246 -0.000207 0.001289 0.001116 0.0000129 0.0000132 0.000248 0.000259 1987 9 16 47054 -0.046501 0.275879 -0.4603106 0.0006296 0.000386 0.000155 0.000806 0.000621 0.0000140 0.0000168 0.000266 0.000280 1987 9 17 47055 -0.045956 0.278006 -0.4609616 0.0007076 0.000691 0.000216 0.001038 0.000876 0.0000206 0.0000302 0.000374 0.000415 1987 9 18 47056 -0.045584 0.279053 -0.4617510 0.0008947 0.000882 0.000146 0.001616 0.001938 0.0000464 0.0000309 0.000648 0.000950 1987 9 19 47057 -0.046588 0.278929 -0.4627696 0.0011491 0.000784 0.000145 0.004549 0.004318 0.0000412 0.0000306 0.000604 0.000905 1987 9 20 47058 -0.048323 0.278916 -0.4640586 0.0014227 0.000495 0.000216 0.001853 0.001334 0.0000147 0.0000279 0.000274 0.000323 1987 9 21 47059 -0.049589 0.279726 -0.4656138 0.0016734 0.000249 0.000262 0.000951 0.000677 0.0000147 0.0000147 0.000274 0.000323 1987 9 22 47060 -0.049889 0.280947 -0.4673931 0.0018655 0.000222 0.000196 0.001091 0.000777 0.0000147 0.0000161 0.000274 0.000323 1987 9 23 47061 -0.049750 0.282034 -0.4693223 0.0019734 0.000365 0.000091 0.002070 0.001398 0.0000175 0.0000166 0.000260 0.000345 1987 9 24 47062 -0.050136 0.283197 -0.4713094 0.0019887 0.000469 0.000073 0.001151 0.000759 0.0000186 0.0000175 0.000257 0.000352 1987 9 25 47063 -0.051453 0.285505 -0.4732664 0.0019214 0.000358 0.000164 0.000804 0.000605 0.0000175 0.0000174 0.000266 0.000348 1987 9 26 47064 -0.052643 0.287716 -0.4751238 0.0017850 0.000046 0.000154 0.000616 0.000570 0.0000161 0.0000193 0.000309 0.000338 1987 9 27 47065 -0.052591 0.288264 -0.4768204 0.0015837 -0.000292 -0.000173 0.000736 0.000676 0.0000210 0.0000228 0.000373 0.000335 1987 9 28 47066 -0.052262 0.289771 -0.4782928 0.0013415 -0.000486 -0.000610 0.001019 0.000885 0.0000295 0.0000251 0.000443 0.000334 1987 9 29 47067 -0.053144 0.293025 -0.4795238 0.0011255 -0.000474 -0.000894 0.003279 0.001677 0.0000291 0.0000237 0.000427 0.000336 1987 9 30 47068 -0.055237 0.295655 -0.4805797 0.0010168 -0.000307 -0.000919 0.001571 0.001147 0.0000179 0.0000235 0.000292 0.000357 1987 10 1 47069 -0.056699 0.296476 -0.4816016 0.0010696 -0.000092 -0.000709 0.000978 0.000811 0.0000179 0.0000179 0.000291 0.000357 1987 10 2 47070 -0.056081 0.296497 -0.4827613 0.0012855 0.000067 -0.000372 0.001361 0.001133 0.0000179 0.0000179 0.000291 0.000357 1987 10 3 47071 -0.054800 0.297278 -0.4842016 0.0016117 0.000122 -0.000014 0.002404 0.002008 0.0000179 0.0000208 0.000291 0.000357 1987 10 4 47072 -0.054503 0.299027 -0.4859897 0.0019613 0.000082 0.000284 0.004049 0.003039 0.0000236 0.0000211 0.000501 0.000704 1987 10 5 47073 -0.055555 0.300795 -0.4881007 0.0022419 -0.000016 0.000456 0.002756 0.001905 0.0000242 0.0000239 0.000538 0.000786 1987 10 6 47074 -0.057152 0.301834 -0.4904269 0.0023822 -0.000133 0.000460 0.001898 0.001286 0.0000242 0.0000242 0.000538 0.000786 1987 10 7 47075 -0.058165 0.302944 -0.4928095 0.0023521 -0.000233 0.000275 0.001754 0.001187 0.0000242 0.0000242 0.000538 0.000786 1987 10 8 47076 -0.058461 0.304439 -0.4950837 0.0021698 -0.000294 -0.000055 0.003682 0.002691 0.0000242 0.0000183 0.000537 0.000786 1987 10 9 47077 -0.058727 0.305548 -0.4971226 0.0018918 -0.000300 -0.000428 0.003854 0.002926 0.0000124 0.0000181 0.000264 0.000363 1987 10 10 47078 -0.059283 0.306213 -0.4988652 0.0015894 -0.000247 -0.000696 0.001006 0.000760 0.0000120 0.0000122 0.000256 0.000352 1987 10 11 47079 -0.059845 0.307154 -0.5003187 0.0013247 -0.000144 -0.000731 0.000915 0.000691 0.0000120 0.0000120 0.000256 0.000352 1987 10 12 47080 -0.060090 0.308936 -0.5015428 0.0011386 -0.000017 -0.000497 0.000924 0.000698 0.0000120 0.0000120 0.000256 0.000352 1987 10 13 47081 -0.060230 0.311125 -0.5026278 0.0010506 0.000097 -0.000108 0.002230 0.001702 0.0000120 0.0000102 0.000256 0.000352 1987 10 14 47082 -0.060807 0.312742 -0.5036751 0.0010641 0.000169 0.000216 0.003371 0.002972 0.0000084 0.0000101 0.000157 0.000321 1987 10 15 47083 -0.062010 0.313368 -0.5047835 0.0011694 0.000191 0.000270 0.000704 0.000700 0.0000083 0.0000084 0.000153 0.000317 1987 10 16 47084 -0.063340 0.313741 -0.5060353 0.0013419 0.000189 0.000000 0.000473 0.000467 0.0000084 0.0000087 0.000151 0.000302 1987 10 17 47085 -0.064114 0.314596 -0.5074802 0.0015437 0.000207 -0.000438 0.000535 0.000492 0.0000092 0.0000092 0.000138 0.000238 1987 10 18 47086 -0.064074 0.315374 -0.5091256 0.0017349 0.000296 -0.000680 0.000477 0.000416 0.0000101 0.0000103 0.000130 0.000208 1987 10 19 47087 -0.063961 0.316168 -0.5109425 0.0018874 0.000431 -0.000586 0.000393 0.000385 0.0000115 0.0000111 0.000172 0.000239 1987 10 20 47088 -0.063808 0.317737 -0.5128829 0.0019890 0.000504 -0.000386 0.000377 0.000407 0.0000121 0.0000113 0.000236 0.000256 1987 10 21 47089 -0.063439 0.319874 -0.5148937 0.0020346 0.000424 -0.000325 0.000388 0.000448 0.0000112 0.0000122 0.000238 0.000227 1987 10 22 47090 -0.062964 0.320397 -0.5169189 0.0020132 0.000193 -0.000327 0.000393 0.000503 0.0000124 0.0000116 0.000239 0.000202 1987 10 23 47091 -0.062580 0.321382 -0.5188864 0.0019156 -0.000011 -0.000101 0.000373 0.000666 0.0000120 0.0000116 0.000190 0.000149 1987 10 24 47092 -0.062587 0.323108 -0.5207254 0.0017475 -0.000044 0.000123 0.000361 0.000949 0.0000109 0.0000127 0.000166 0.000129 1987 10 25 47093 -0.062974 0.324320 -0.5223751 0.0015331 0.000039 0.000076 0.000411 0.000595 0.0000135 0.0000129 0.000215 0.000208 1987 10 26 47094 -0.063343 0.325035 -0.5238082 0.0013265 0.000064 -0.000177 0.000432 0.000547 0.0000150 0.0000143 0.000247 0.000315 1987 10 27 47095 -0.063399 0.325826 -0.5250641 0.0011998 -0.000105 -0.000439 0.000439 0.000555 0.0000151 0.0000252 0.000248 0.000318 1987 10 28 47096 -0.063339 0.327039 -0.5262536 0.0012084 -0.000404 -0.000559 0.001154 0.001580 0.0000354 0.0000759 0.000570 0.000746 1987 10 29 47097 -0.063509 0.328522 -0.5275240 0.0013611 -0.000614 -0.000512 0.002098 0.003801 0.0001367 0.0000290 0.001685 0.003233 1987 10 30 47098 -0.063770 0.329894 -0.5290049 0.0016154 -0.000533 -0.000383 0.000669 0.000763 0.0000225 0.0000744 0.000371 0.000553 1987 10 31 47099 -0.063380 0.330994 -0.5307627 0.0018961 -0.000133 -0.000278 0.000401 0.000452 0.0000121 0.0000172 0.000194 0.000276 1987 11 1 47100 -0.062109 0.332278 -0.5327817 0.0021250 0.000378 -0.000279 0.000345 0.000395 0.0000120 0.0000121 0.000171 0.000225 1987 11 2 47101 -0.061069 0.334695 -0.5349772 0.0022553 0.000622 -0.000437 0.000323 0.000372 0.0000121 0.0000154 0.000162 0.000205 1987 11 3 47102 -0.061135 0.337607 -0.5372451 0.0022779 0.000475 -0.000583 0.000833 0.000895 0.0000187 0.0000146 0.000215 0.000247 1987 11 4 47103 -0.061975 0.339192 -0.5394865 0.0021957 0.000160 -0.000495 0.000963 0.001183 0.0000171 0.0000140 0.000218 0.000249 1987 11 5 47104 -0.062537 0.338881 -0.5416031 0.0020106 0.000006 -0.000225 0.000388 0.000486 0.0000092 0.0000110 0.000179 0.000219 1987 11 6 47105 -0.062024 0.338626 -0.5434949 0.0017474 0.000236 -0.000404 0.000209 0.000244 0.0000049 0.0000066 0.000163 0.000216 1987 11 7 47106 -0.060846 0.339373 -0.5451060 0.0014713 0.000446 -0.000784 0.000172 0.000198 0.0000040 0.0000045 0.000161 0.000224 1987 11 8 47107 -0.059729 0.340950 -0.5464611 0.0012610 0.000304 -0.000869 0.000173 0.000199 0.0000040 0.0000076 0.000165 0.000228 1987 11 9 47108 -0.058864 0.343106 -0.5476592 0.0011681 -0.000005 -0.000624 0.000455 0.000490 0.0000111 0.0000079 0.000286 0.000276 1987 11 10 47109 -0.058115 0.345500 -0.5488293 0.0011962 -0.000120 -0.000247 0.000478 0.000494 0.0000117 0.0000121 0.000261 0.000269 1987 11 11 47110 -0.057442 0.347828 -0.5500803 0.0013096 0.000158 0.000005 0.000535 0.000473 0.0000130 0.0000129 0.000201 0.000244 1987 11 12 47111 -0.057150 0.349759 -0.5514714 0.0014667 0.000549 0.000085 0.000709 0.000561 0.0000142 0.0000137 0.000177 0.000230 1987 11 13 47112 -0.057149 0.351457 -0.5530286 0.0016424 0.000723 0.000039 0.001493 0.001596 0.0000144 0.0000138 0.000175 0.000230 1987 11 14 47113 -0.057049 0.353310 -0.5547615 0.0018175 0.000601 -0.000101 0.000556 0.000858 0.0000134 0.0000139 0.000209 0.000251 1987 11 15 47114 -0.056895 0.355207 -0.5566594 0.0019692 0.000290 -0.000305 0.000384 0.000587 0.0000134 0.0000134 0.000209 0.000251 1987 11 16 47115 -0.056793 0.356804 -0.5586867 0.0020737 -0.000021 -0.000543 0.000558 0.000848 0.0000134 0.0000134 0.000209 0.000251 1987 11 17 47116 -0.056429 0.358039 -0.5607857 0.0021140 -0.000198 -0.000769 0.001232 0.001780 0.0000134 0.0000171 0.000209 0.000251 1987 11 18 47117 -0.055681 0.359181 -0.5628867 0.0020836 -0.000184 -0.000919 0.003442 0.003523 0.0000207 0.0000177 0.000297 0.000608 1987 11 19 47118 -0.054887 0.360515 -0.5649207 0.0019846 0.000035 -0.000938 0.001530 0.002959 0.0000221 0.0000214 0.000310 0.000791 1987 11 20 47119 -0.054452 0.362066 -0.5668264 0.0018264 0.000428 -0.000802 0.000827 0.002164 0.0000221 0.0000221 0.000310 0.000791 1987 11 21 47120 -0.054447 0.363630 -0.5685569 0.0016294 0.000895 -0.000557 0.000989 0.002633 0.0000221 0.0000215 0.000310 0.000791 1987 11 22 47121 -0.054185 0.364950 -0.5700912 0.0014327 0.001246 -0.000319 0.002074 0.003430 0.0000210 0.0000191 0.000288 0.000583 1987 11 23 47122 -0.053715 0.366207 -0.5714530 0.0012911 0.001268 -0.000222 0.000905 0.000533 0.0000161 0.0000185 0.000204 0.000283 1987 11 24 47123 -0.054181 0.367925 -0.5727211 0.0012571 0.000864 -0.000319 0.000741 0.000449 0.0000159 0.0000158 0.000208 0.000297 1987 11 25 47124 -0.056052 0.370283 -0.5740163 0.0013547 0.000150 -0.000534 0.000733 0.000507 0.0000156 0.0000156 0.000223 0.000358 1987 11 26 47125 -0.057837 0.372693 -0.5754648 0.0015641 -0.000525 -0.000656 0.000749 0.000580 0.0000153 0.0000154 0.000236 0.000431 1987 11 27 47126 -0.058603 0.374756 -0.5771542 0.0018293 -0.000884 -0.000559 0.002184 0.001949 0.0000153 0.0000134 0.000239 0.000453 1987 11 28 47127 -0.058881 0.376486 -0.5791076 0.0020803 -0.000871 -0.000288 0.002915 0.003611 0.0000115 0.0000133 0.000149 0.000203 1987 11 29 47128 -0.059530 0.377825 -0.5812801 0.0022528 -0.000616 0.000000 0.000506 0.000634 0.0000114 0.0000118 0.000147 0.000199 1987 11 30 47129 -0.060659 0.378482 -0.5835698 0.0022989 -0.000335 0.000133 0.000375 0.000470 0.0000121 0.0000138 0.000157 0.000212 1987 12 1 47130 -0.061666 0.378614 -0.5858360 0.0021975 -0.000198 0.000032 0.000495 0.000614 0.0000162 0.0000179 0.000209 0.000277 1987 12 2 47131 -0.061821 0.379426 -0.5879328 0.0019730 -0.000239 -0.000241 0.000766 0.000926 0.0000237 0.0000195 0.000304 0.000384 1987 12 3 47132 -0.061160 0.381088 -0.5897658 0.0016946 -0.000326 -0.000487 0.002693 0.002914 0.0000227 0.0000180 0.000315 0.000399 1987 12 4 47133 -0.060321 0.382637 -0.5913240 0.0014404 -0.000260 -0.000496 0.001204 0.001535 0.0000122 0.0000175 0.000207 0.000283 1987 12 5 47134 -0.059606 0.383633 -0.5926645 0.0012564 0.000066 -0.000182 0.000592 0.000777 0.0000122 0.0000122 0.000206 0.000283 1987 12 6 47135 -0.058804 0.384579 -0.5938648 0.0011406 0.000544 0.000321 0.000608 0.000790 0.0000122 0.0000163 0.000207 0.000283 1987 12 7 47136 -0.057896 0.386027 -0.5949772 0.0010695 0.000829 0.000650 0.001600 0.001313 0.0000204 0.0000206 0.000263 0.000350 1987 12 8 47137 -0.057078 0.387849 -0.5960332 0.0010410 0.000648 0.000487 0.001662 0.000995 0.0000289 0.0000207 0.000274 0.000404 1987 12 9 47138 -0.055965 0.388518 -0.5970826 0.0010872 0.000127 -0.000139 0.001508 0.000713 0.0000209 0.0000214 0.000235 0.000408 1987 12 10 47139 -0.055728 0.389598 -0.5982229 0.0012254 0.000199 -0.000479 0.001051 0.000423 0.0000140 0.0000165 0.000211 0.000313 1987 12 11 47140 -0.055561 0.391108 -0.5995394 0.0014234 0.000637 -0.000509 0.000900 0.000358 0.0000122 0.0000130 0.000207 0.000272 1987 12 12 47141 -0.054240 0.392199 -0.6010662 0.0016272 0.000876 -0.000457 0.002402 0.000987 0.0000120 0.0000121 0.000206 0.000266 1987 12 13 47142 -0.052019 0.393299 -0.6027818 0.0017872 0.000770 -0.000371 0.004858 0.004218 0.0000120 0.0000120 0.000231 0.000346 1987 12 14 47143 -0.049757 0.394897 -0.6046225 0.0018751 0.000421 -0.000286 0.000816 0.000972 0.0000121 0.0000124 0.000232 0.000353 1987 12 15 47144 -0.048043 0.396711 -0.6065091 0.0018857 0.000076 -0.000230 0.000516 0.000586 0.0000127 0.0000143 0.000228 0.000332 1987 12 16 47145 -0.046870 0.398152 -0.6083672 0.0018287 -0.000068 -0.000261 0.000656 0.000577 0.0000165 0.0000178 0.000212 0.000277 1987 12 17 47146 -0.045666 0.399085 -0.6101390 0.0017098 -0.000074 -0.000572 0.000888 0.000566 0.0000229 0.0000257 0.000204 0.000252 1987 12 18 47147 -0.044534 0.400012 -0.6117655 0.0015339 -0.000042 -0.000983 0.000678 0.000351 0.0000350 0.0000334 0.000273 0.000297 1987 12 19 47148 -0.044094 0.401388 -0.6132017 0.0013376 0.000004 -0.001035 0.000692 0.000355 0.0000439 0.0000410 0.000339 0.000345 1987 12 20 47149 -0.044191 0.402896 -0.6144597 0.0011939 0.000048 -0.000588 0.000984 0.000560 0.0000470 0.0000373 0.000465 0.000470 1987 12 21 47150 -0.043856 0.403421 -0.6156321 0.0011746 0.000027 -0.000260 0.000852 0.000618 0.0000307 0.0000383 0.000372 0.000359 1987 12 22 47151 -0.040926 0.403076 -0.6168626 0.0013078 -0.000075 -0.000400 0.000637 0.000378 0.0000295 0.0000230 0.000311 0.000297 1987 12 23 47152 -0.039099 0.404070 -0.6182933 0.0015645 -0.000219 -0.000553 0.000567 0.000392 0.0000153 0.0000209 0.000265 0.000253 1987 12 24 47153 -0.038517 0.405242 -0.6200116 0.0018700 -0.000322 -0.000573 0.000696 0.000584 0.0000123 0.0000137 0.000245 0.000234 1987 12 25 47154 -0.037445 0.405658 -0.6220211 0.0021357 -0.000314 -0.000509 0.001504 0.001290 0.0000121 0.0000122 0.000243 0.000232 1987 12 26 47155 -0.035929 0.406260 -0.6242448 0.0022917 -0.000186 -0.000375 0.002597 0.002216 0.0000121 0.0000130 0.000243 0.000232 1987 12 27 47156 -0.034259 0.407074 -0.6265550 0.0023069 0.000017 -0.000215 0.004338 0.008774 0.0000139 0.0000131 0.000280 0.000296 1987 12 28 47157 -0.032735 0.407723 -0.6288126 0.0021868 0.000208 -0.000059 0.003687 0.005726 0.0000142 0.0000140 0.000288 0.000311 1987 12 29 47158 -0.031252 0.408186 -0.6308961 0.0019620 0.000286 0.000090 0.001210 0.001190 0.0000142 0.0000142 0.000288 0.000311 1987 12 30 47159 -0.029247 0.409482 -0.6327214 0.0016803 0.000176 0.000255 0.000733 0.000698 0.0000142 0.0000142 0.000288 0.000311 1987 12 31 47160 -0.026648 0.412200 -0.6342585 0.0014041 -0.000119 0.000450 0.000920 0.000861 0.0000142 0.0000142 0.000288 0.000311 1988 1 1 47161 -0.024903 0.414162 0.3644546 0.0011972 -0.000494 0.000631 0.001335 0.001196 0.0000142 0.0000120 0.000288 0.000311 1988 1 2 47162 -0.023898 0.414888 0.3633214 0.0011011 -0.000766 0.000685 0.001379 0.001356 0.0000099 0.0000120 0.000228 0.000194 1988 1 3 47163 -0.022373 0.415415 0.3622219 0.0011151 -0.000773 0.000486 0.000883 0.000882 0.0000098 0.0000102 0.000226 0.000192 1988 1 4 47164 -0.019440 0.416767 0.3610611 0.0011934 -0.000467 -0.000025 0.000671 0.000672 0.0000104 0.0000121 0.000238 0.000206 1988 1 5 47165 -0.015953 0.418339 0.3598097 0.0012685 0.000027 -0.000747 0.000813 0.000822 0.0000145 0.0000174 0.000304 0.000303 1988 1 6 47166 -0.013576 0.418890 0.3585069 0.0013246 0.000436 -0.001296 0.001618 0.001318 0.0000244 0.0000187 0.000387 0.000569 1988 1 7 47167 -0.012119 0.419145 0.3571532 0.0014160 0.000503 -0.001322 0.000403 0.000301 0.0000229 0.0000234 0.000158 0.000126 1988 1 8 47168 -0.011067 0.419567 0.3556778 0.0015811 0.000175 -0.000780 0.000273 0.000208 0.0000224 0.0000237 0.000155 0.000121 1988 1 9 47169 -0.009827 0.419915 0.3540030 0.0017929 -0.000317 -0.000036 0.000368 0.000301 0.0000245 0.0000257 0.000223 0.000162 1988 1 10 47170 -0.007552 0.419815 0.3521107 0.0019463 -0.000498 -0.000029 0.000589 0.000525 0.0000290 0.0000306 0.000366 0.000252 1988 1 11 47171 -0.005677 0.419641 0.3501327 0.0019427 -0.000255 -0.000575 0.000861 0.000593 0.0000367 0.0000365 0.000362 0.000325 1988 1 12 47172 -0.005130 0.420027 0.3482487 0.0018110 0.000080 -0.000780 0.001075 0.000891 0.0000441 0.0000334 0.000360 0.000231 1988 1 13 47173 -0.003285 0.420912 0.3465335 0.0016425 0.000047 -0.000368 0.000768 0.000707 0.0000301 0.0000302 0.000332 0.000179 1988 1 14 47174 -0.001132 0.422512 0.3449830 0.0014885 -0.000453 0.000290 0.000595 0.000569 0.0000162 0.0000235 0.000273 0.000191 1988 1 15 47175 -0.000165 0.423890 0.3435661 0.0013465 -0.000783 0.000309 0.000787 0.000674 0.0000168 0.0000205 0.000309 0.000247 1988 1 16 47176 0.000175 0.424334 0.3422818 0.0012020 -0.000610 -0.000284 0.000821 0.000602 0.0000248 0.0000163 0.000356 0.000369 1988 1 17 47177 0.001208 0.424448 0.3411308 0.0010861 -0.000156 -0.000711 0.000403 0.000367 0.0000159 0.0000220 0.000190 0.000204 1988 1 18 47178 0.002792 0.424461 0.3400591 0.0010764 0.000184 -0.000477 0.000317 0.000288 0.0000191 0.0000161 0.000173 0.000173 1988 1 19 47179 0.003953 0.425156 0.3389238 0.0012257 0.000096 0.000045 0.000377 0.000366 0.0000162 0.0000173 0.000212 0.000198 1988 1 20 47180 0.005320 0.425032 0.3375708 0.0014894 -0.000257 0.000117 0.000498 0.000547 0.0000156 0.0000166 0.000236 0.000284 1988 1 21 47181 0.006838 0.424706 0.3359416 0.0017426 -0.000371 -0.000365 0.000689 0.000780 0.0000169 0.0000175 0.000230 0.000385 1988 1 22 47182 0.008571 0.425001 0.3341177 0.0018666 -0.000215 -0.000863 0.000379 0.000371 0.0000194 0.0000163 0.000226 0.000179 1988 1 23 47183 0.010352 0.425863 0.3322636 0.0018270 -0.000159 -0.000790 0.000255 0.000251 0.0000157 0.0000150 0.000222 0.000159 1988 1 24 47184 0.012069 0.426884 0.3305218 0.0016841 -0.000446 -0.000110 0.000287 0.000317 0.0000106 0.0000124 0.000214 0.000140 1988 1 25 47185 0.014285 0.427739 0.3289387 0.0015020 -0.000716 0.000256 0.000332 0.000418 0.0000092 0.0000100 0.000209 0.000132 1988 1 26 47186 0.016922 0.428446 0.3275380 0.0012936 -0.000710 -0.000037 0.001013 0.001099 0.0000094 0.0000109 0.000197 0.000137 1988 1 27 47187 0.019288 0.429084 0.3263500 0.0010684 -0.000493 -0.000477 0.000972 0.000977 0.0000126 0.0000116 0.000160 0.000199 1988 1 28 47188 0.021145 0.429250 0.3253839 0.0008588 -0.000287 -0.000356 0.000617 0.000667 0.0000138 0.0000169 0.000173 0.000208 1988 1 29 47189 0.023120 0.428531 0.3246057 0.0007105 -0.000278 0.000568 0.000982 0.001072 0.0000211 0.0000310 0.000237 0.000243 1988 1 30 47190 0.025996 0.428672 0.3239319 0.0006556 -0.000403 0.001562 0.001904 0.002536 0.0000482 0.0000576 0.000344 0.000274 1988 1 31 47191 0.028951 0.429425 0.3232632 0.0006992 -0.000530 0.001954 0.002075 0.003915 0.0000940 0.0000305 0.000384 0.000281 1988 2 1 47192 0.031619 0.430203 0.3225056 0.0008329 -0.000563 0.001598 0.001338 0.001392 0.0000127 0.0000531 0.000300 0.000193 1988 2 2 47193 0.034253 0.430623 0.3215765 0.0010389 -0.000459 0.000771 0.000816 0.000979 0.0000122 0.0000122 0.000292 0.000190 1988 2 3 47194 0.037223 0.430610 0.3204169 0.0012838 -0.000249 -0.000047 0.000494 0.000637 0.0000117 0.0000113 0.000272 0.000198 1988 2 4 47195 0.040513 0.430515 0.3190090 0.0015221 -0.000006 -0.000473 0.000479 0.000618 0.0000105 0.0000108 0.000228 0.000232 1988 2 5 47196 0.042848 0.431327 0.3173832 0.0017161 0.000165 -0.000462 0.000655 0.000793 0.0000098 0.0000102 0.000208 0.000270 1988 2 6 47197 0.045007 0.432252 0.3155959 0.0018513 0.000230 -0.000220 0.000910 0.000980 0.0000099 0.0000108 0.000211 0.000285 1988 2 7 47198 0.047322 0.432898 0.3137046 0.0019297 0.000237 -0.000038 0.000443 0.000538 0.0000117 0.0000108 0.000327 0.000334 1988 2 8 47199 0.049103 0.433624 0.3117615 0.0019528 0.000253 -0.000154 0.000430 0.000524 0.0000117 0.0000117 0.000327 0.000334 1988 2 9 47200 0.049840 0.434633 0.3098217 0.0019137 0.000308 -0.000581 0.000435 0.000529 0.0000117 0.0000118 0.000327 0.000334 1988 2 10 47201 0.050219 0.435224 0.3079517 0.0018056 0.000344 -0.001040 0.000976 0.000836 0.0000119 0.0000124 0.000261 0.000309 1988 2 11 47202 0.051366 0.434727 0.3062199 0.0016391 0.000261 -0.001138 0.000870 0.000684 0.0000132 0.0000125 0.000149 0.000227 1988 2 12 47203 0.053350 0.433877 0.3046698 0.0014552 0.000014 -0.000670 0.000499 0.000447 0.0000131 0.0000134 0.000160 0.000217 1988 2 13 47204 0.054755 0.434798 0.3032880 0.0013212 -0.000315 0.000164 0.000465 0.000469 0.0000136 0.0000172 0.000230 0.000206 1988 2 14 47205 0.054165 0.435419 0.3019866 0.0013133 -0.000517 0.000686 0.000728 0.000787 0.0000213 0.0000422 0.000525 0.000307 1988 2 15 47206 0.053460 0.434007 0.3006088 0.0014801 -0.000460 0.000687 0.002378 0.002127 0.0000709 0.0000508 0.001582 0.000949 1988 2 16 47207 0.054842 0.432244 0.2989783 0.0018070 -0.000212 0.000406 0.002226 0.001696 0.0000804 0.0000467 0.001526 0.001141 1988 2 17 47208 0.057173 0.431679 0.2969711 0.0022087 0.000055 0.000204 0.000888 0.000846 0.0000225 0.0000467 0.000473 0.000519 1988 2 18 47209 0.058739 0.431729 0.2945741 0.0025619 0.000199 0.000175 0.000508 0.000518 0.0000129 0.0000203 0.000274 0.000320 1988 2 19 47210 0.060166 0.430867 0.2918946 0.0027623 0.000175 0.000141 0.000710 0.000765 0.0000181 0.0000157 0.000355 0.000438 1988 2 20 47211 0.062038 0.429955 0.2891140 0.0027661 0.000040 0.000023 0.000618 0.000911 0.0000186 0.0000164 0.000209 0.000336 1988 2 21 47212 0.064133 0.429919 0.2864216 0.0025927 -0.000192 -0.000087 0.000420 0.000630 0.0000146 0.0000151 0.000159 0.000258 1988 2 22 47213 0.065396 0.430856 0.2839648 0.0023030 -0.000424 -0.000130 0.000367 0.000519 0.0000116 0.0000128 0.000208 0.000246 1988 2 23 47214 0.065990 0.430628 0.2818235 0.0019736 -0.000438 -0.000184 0.000383 0.000514 0.0000110 0.0000132 0.000340 0.000246 1988 2 24 47215 0.066498 0.428691 0.2800026 0.0016779 -0.000144 -0.000303 0.000473 0.000607 0.0000147 0.0000164 0.000354 0.000263 1988 2 25 47216 0.066813 0.428721 0.2784396 0.0014655 0.000224 -0.000378 0.000767 0.000867 0.0000217 0.0000178 0.000362 0.000277 1988 2 26 47217 0.067182 0.430468 0.2770387 0.0013563 0.000433 -0.000320 0.002100 0.001348 0.0000209 0.0000165 0.000338 0.000241 1988 2 27 47218 0.068142 0.430822 0.2756942 0.0013535 0.000433 -0.000157 0.000561 0.000540 0.0000112 0.0000160 0.000228 0.000136 1988 2 28 47219 0.069676 0.430176 0.2743019 0.0014483 0.000295 0.000021 0.000421 0.000417 0.0000112 0.0000112 0.000228 0.000136 1988 2 29 47220 0.071522 0.430256 0.2727734 0.0016190 0.000137 0.000120 0.000621 0.000595 0.0000112 0.0000112 0.000228 0.000136 1988 3 1 47221 0.073589 0.430875 0.2710484 0.0018310 0.000018 0.000113 0.001530 0.001182 0.0000112 0.0000118 0.000228 0.000136 1988 3 2 47222 0.075953 0.431392 0.2691066 0.0020407 -0.000083 0.000041 0.003480 0.002988 0.0000124 0.0000119 0.000248 0.000227 1988 3 3 47223 0.078564 0.431895 0.2669735 0.0022065 -0.000223 -0.000024 0.001033 0.001048 0.0000125 0.0000125 0.000250 0.000244 1988 3 4 47224 0.081037 0.432535 0.2647104 0.0023023 -0.000451 -0.000016 0.000505 0.000512 0.0000125 0.0000125 0.000250 0.000244 1988 3 5 47225 0.082869 0.433144 0.2623930 0.0023238 -0.000758 0.000083 0.000620 0.000629 0.0000125 0.0000125 0.000250 0.000244 1988 3 6 47226 0.084056 0.433509 0.2600904 0.0022804 -0.001046 0.000221 0.002048 0.002096 0.0000125 0.0000111 0.000250 0.000244 1988 3 7 47227 0.085215 0.433525 0.2578588 0.0021808 -0.001168 0.000308 0.002278 0.001916 0.0000097 0.0000111 0.000238 0.000122 1988 3 8 47228 0.087162 0.433191 0.2557495 0.0020249 -0.001002 0.000282 0.000396 0.000338 0.0000096 0.0000099 0.000235 0.000120 1988 3 9 47229 0.090170 0.432515 0.2538199 0.0018099 -0.000531 0.000165 0.000414 0.000351 0.0000101 0.0000114 0.000226 0.000127 1988 3 10 47230 0.093598 0.431536 0.2521279 0.0015494 0.000110 0.000069 0.000586 0.000487 0.0000132 0.0000144 0.000199 0.000167 1988 3 11 47231 0.096112 0.430333 0.2507044 0.0012882 0.000663 0.000199 0.001172 0.000933 0.0000186 0.0000173 0.000186 0.000238 1988 3 12 47232 0.098619 0.429569 0.2495193 0.0010979 0.000903 0.000474 0.001604 0.001517 0.0000213 0.0000269 0.000191 0.000263 1988 3 13 47233 0.102035 0.429306 0.2484642 0.0010507 0.000765 0.000571 0.000885 0.001782 0.0000351 0.0000263 0.000450 0.000249 1988 3 14 47234 0.105188 0.428536 0.2473706 0.0011852 0.000345 0.000264 0.000704 0.001372 0.0000314 0.0000297 0.000401 0.000248 1988 3 15 47235 0.107222 0.426720 0.2460589 0.0014815 -0.000154 -0.000328 0.000586 0.000887 0.0000244 0.0000263 0.000307 0.000244 1988 3 16 47236 0.109461 0.424951 0.2444005 0.0018422 -0.000518 -0.000585 0.000525 0.000728 0.0000212 0.0000181 0.000269 0.000240 1988 3 17 47237 0.112382 0.424516 0.2424023 0.0021253 -0.000656 -0.000320 0.000332 0.000346 0.0000119 0.0000164 0.000201 0.000178 1988 3 18 47238 0.114824 0.425291 0.2402062 0.0022315 -0.000615 0.000051 0.000327 0.000339 0.0000116 0.0000133 0.000198 0.000170 1988 3 19 47239 0.116179 0.425561 0.2380049 0.0021552 -0.000489 0.000052 0.000402 0.000442 0.0000147 0.0000182 0.000226 0.000177 1988 3 20 47240 0.117948 0.423169 0.2359488 0.0019527 -0.000310 -0.000376 0.000683 0.000771 0.0000248 0.0000339 0.000288 0.000256 1988 3 21 47241 0.120114 0.420241 0.2341251 0.0016922 -0.000107 -0.000787 0.001915 0.001820 0.0000532 0.0000265 0.000343 0.000512 1988 3 22 47242 0.121630 0.418583 0.2325608 0.0014350 0.000076 -0.000846 0.003085 0.003154 0.0000283 0.0000317 0.000321 0.000384 1988 3 23 47243 0.122372 0.417864 0.2312303 0.0012290 0.000207 -0.000530 0.000400 0.000483 0.0000102 0.0000192 0.000204 0.000147 1988 3 24 47244 0.123100 0.416983 0.2300686 0.0011044 0.000265 -0.000014 0.000357 0.000430 0.0000102 0.0000102 0.000204 0.000147 1988 3 25 47245 0.124576 0.415203 0.2289867 0.0010756 0.000242 0.000457 0.000408 0.000490 0.0000102 0.0000102 0.000204 0.000147 1988 3 26 47246 0.126670 0.413060 0.2278862 0.0011426 0.000156 0.000737 0.001629 0.001833 0.0000102 0.0000108 0.000204 0.000147 1988 3 27 47247 0.128667 0.411554 0.2266761 0.0012897 0.000036 0.000798 0.003789 0.003277 0.0000115 0.0000109 0.000352 0.000171 1988 3 28 47248 0.130110 0.410775 0.2252887 0.0014897 -0.000082 0.000677 0.000513 0.000519 0.0000116 0.0000115 0.000386 0.000174 1988 3 29 47249 0.131032 0.409989 0.2236877 0.0017116 -0.000173 0.000430 0.000522 0.000528 0.0000116 0.0000116 0.000386 0.000174 1988 3 30 47250 0.131682 0.408711 0.2218672 0.0019261 -0.000222 0.000124 0.000704 0.000709 0.0000116 0.0000116 0.000386 0.000174 1988 3 31 47251 0.132214 0.407406 0.2198479 0.0021065 -0.000236 -0.000159 0.001438 0.001423 0.0000117 0.0000127 0.000372 0.000176 1988 4 1 47252 0.132681 0.406453 0.2176753 0.0022279 -0.000233 -0.000315 0.001193 0.001256 0.0000139 0.0000128 0.000219 0.000297 1988 4 2 47253 0.133004 0.405710 0.2154191 0.0022688 -0.000232 -0.000244 0.000477 0.000511 0.0000139 0.0000139 0.000218 0.000299 1988 4 3 47254 0.133007 0.404730 0.2131666 0.0022201 -0.000250 0.000096 0.000386 0.000413 0.0000139 0.0000139 0.000218 0.000299 1988 4 4 47255 0.132668 0.403211 0.2110046 0.0020931 -0.000289 0.000635 0.000639 0.000684 0.0000139 0.0000139 0.000218 0.000299 1988 4 5 47256 0.132236 0.401257 0.2089971 0.0019197 -0.000346 0.001180 0.005474 0.004472 0.0000139 0.0000138 0.000219 0.000298 1988 4 6 47257 0.132089 0.399243 0.2071678 0.0017441 -0.000408 0.001483 0.004962 0.003507 0.0000137 0.0000138 0.000256 0.000256 1988 4 7 47258 0.132515 0.397511 0.2054952 0.0016095 -0.000458 0.001346 0.000789 0.000605 0.0000137 0.0000137 0.000256 0.000256 1988 4 8 47259 0.133577 0.396157 0.2039202 0.0015471 -0.000474 0.000750 0.000716 0.000553 0.0000137 0.0000138 0.000255 0.000256 1988 4 9 47260 0.135069 0.395011 0.2023622 0.0015742 -0.000432 -0.000089 0.000721 0.000541 0.0000138 0.0000139 0.000241 0.000246 1988 4 10 47261 0.136585 0.393756 0.2007303 0.0017015 -0.000307 -0.000766 0.000823 0.000581 0.0000140 0.0000139 0.000214 0.000225 1988 4 11 47262 0.137741 0.392189 0.1989252 0.0019320 -0.000130 -0.000959 0.001143 0.000815 0.0000140 0.0000127 0.000213 0.000225 1988 4 12 47263 0.138501 0.390367 0.1968507 0.0022375 -0.000033 -0.000713 0.000674 0.000716 0.0000114 0.0000122 0.000261 0.000326 1988 4 13 47264 0.139061 0.388482 0.1944618 0.0025388 -0.000117 -0.000348 0.000368 0.000391 0.0000103 0.0000101 0.000202 0.000277 1988 4 14 47265 0.139791 0.386567 0.1918125 0.0027286 -0.000311 -0.000167 0.000290 0.000290 0.0000088 0.0000099 0.000127 0.000174 1988 4 15 47266 0.141024 0.384376 0.1890622 0.0027313 -0.000282 -0.000197 0.000304 0.000297 0.0000095 0.0000201 0.000124 0.000170 1988 4 16 47267 0.142640 0.382092 0.1864079 0.0025440 0.000024 -0.000265 0.001159 0.001137 0.0000313 0.0000174 0.000411 0.000522 1988 4 17 47268 0.144387 0.380317 0.1840143 0.0022227 0.000289 -0.000210 0.001372 0.001459 0.0000254 0.0000235 0.000461 0.000460 1988 4 18 47269 0.146560 0.379319 0.1819748 0.0018516 0.000182 -0.000064 0.000627 0.000659 0.0000156 0.0000231 0.000276 0.000275 1988 4 19 47270 0.149167 0.378897 0.1802968 0.0015122 -0.000353 0.000028 0.000665 0.000658 0.0000208 0.0000197 0.000295 0.000271 1988 4 20 47271 0.150842 0.378100 0.1789193 0.0012661 -0.000901 -0.000022 0.000775 0.000854 0.0000238 0.0000187 0.000332 0.000220 1988 4 21 47272 0.152085 0.376327 0.1777284 0.0011401 -0.001041 -0.000127 0.000511 0.000696 0.0000166 0.0000196 0.000370 0.000168 1988 4 22 47273 0.154159 0.374651 0.1766059 0.0011139 -0.000696 -0.000153 0.000518 0.000608 0.0000154 0.0000152 0.000302 0.000185 1988 4 23 47274 0.154539 0.374654 0.1754739 0.0011700 -0.000190 -0.000160 0.000542 0.000484 0.0000138 0.0000143 0.000227 0.000220 1988 4 24 47275 0.154726 0.375044 0.1742467 0.0012960 0.000051 -0.000214 0.000528 0.000443 0.0000132 0.0000139 0.000205 0.000243 1988 4 25 47276 0.156443 0.373724 0.1728712 0.0014515 -0.000080 -0.000263 0.001633 0.001184 0.0000139 0.0000384 0.000214 0.000262 1988 4 26 47277 0.158912 0.370397 0.1713425 0.0016019 -0.000351 -0.000197 0.003460 0.002141 0.0000636 0.0000270 0.001009 0.001344 1988 4 27 47278 0.160568 0.367126 0.1696758 0.0017393 -0.000433 0.000030 0.001120 0.001639 0.0000401 0.0000439 0.000557 0.000702 1988 4 28 47279 0.160855 0.366561 0.1678809 0.0018702 -0.000184 0.000311 0.000672 0.001116 0.0000242 0.0000321 0.000322 0.000399 1988 4 29 47280 0.160482 0.367222 0.1659588 0.0019729 0.000119 0.000364 0.000884 0.001483 0.0000241 0.0000614 0.000318 0.000394 1988 4 30 47281 0.160316 0.366687 0.1639623 0.0019897 0.000233 0.000137 0.002863 0.004622 0.0000987 0.0000539 0.001150 0.001355 1988 5 1 47282 0.161385 0.364448 0.1620065 0.0018832 0.000116 -0.000144 0.002417 0.002698 0.0000837 0.0000628 0.001006 0.000633 1988 5 2 47283 0.164153 0.362189 0.1602173 0.0016737 -0.000188 -0.000211 0.000738 0.000830 0.0000270 0.0000499 0.000397 0.000280 1988 5 3 47284 0.167800 0.361069 0.1586682 0.0014314 -0.000591 0.000042 0.000427 0.000483 0.0000160 0.0000241 0.000276 0.000244 1988 5 4 47285 0.169862 0.360356 0.1573463 0.0012381 -0.000994 0.000436 0.000585 0.000661 0.0000213 0.0000439 0.000382 0.000372 1988 5 5 47286 0.169947 0.359481 0.1561659 0.0011518 -0.001218 0.000736 0.001691 0.001816 0.0000718 0.0000839 0.001165 0.001043 1988 5 6 47287 0.169619 0.358027 0.1550043 0.0011936 -0.001138 0.000803 0.003437 0.003729 0.0001465 0.0000478 0.001672 0.001375 1988 5 7 47288 0.169650 0.356091 0.1537379 0.0013498 -0.000757 0.000659 0.000869 0.000939 0.0000237 0.0000794 0.000381 0.000401 1988 5 8 47289 0.170026 0.353941 0.1522725 0.0015838 -0.000284 0.000400 0.000464 0.000498 0.0000124 0.0000179 0.000201 0.000214 1988 5 9 47290 0.170439 0.351809 0.1505553 0.0018511 0.000001 0.000117 0.000456 0.000490 0.0000121 0.0000122 0.000197 0.000209 1988 5 10 47291 0.170892 0.349939 0.1485773 0.0021026 -0.000017 -0.000112 0.001106 0.001183 0.0000121 0.0000107 0.000197 0.000209 1988 5 11 47292 0.171726 0.348479 0.1463793 0.0022829 -0.000252 -0.000249 0.003828 0.003807 0.0000093 0.0000106 0.000164 0.000181 1988 5 12 47293 0.173095 0.347232 0.1440573 0.0023411 -0.000498 -0.000278 0.000643 0.000676 0.0000091 0.0000092 0.000162 0.000179 1988 5 13 47294 0.174539 0.345566 0.1417484 0.0022538 -0.000556 -0.000197 0.000343 0.000361 0.0000091 0.0000091 0.000162 0.000179 1988 5 14 47295 0.175418 0.343056 0.1395925 0.0020427 -0.000363 -0.000028 0.000336 0.000354 0.0000091 0.0000094 0.000162 0.000179 1988 5 15 47296 0.175709 0.340304 0.1376856 0.0017681 -0.000049 0.000158 0.000351 0.000367 0.0000096 0.0000115 0.000169 0.000179 1988 5 16 47297 0.175925 0.338529 0.1360537 0.0014997 0.000165 0.000284 0.000507 0.000495 0.0000139 0.0000117 0.000237 0.000177 1988 5 17 47298 0.176419 0.338235 0.1346625 0.0012846 0.000135 0.000312 0.000519 0.000505 0.0000138 0.0000140 0.000239 0.000186 1988 5 18 47299 0.176839 0.338221 0.1334496 0.0011382 -0.000083 0.000283 0.000585 0.000566 0.0000140 0.0000159 0.000257 0.000237 1988 5 19 47300 0.176165 0.336044 0.1323504 0.0010556 -0.000174 0.000343 0.000812 0.000813 0.0000181 0.0000173 0.000346 0.000323 1988 5 20 47301 0.175393 0.333685 0.1313089 0.0010423 -0.000229 0.000463 0.001088 0.001075 0.0000206 0.0000156 0.000399 0.000316 1988 5 21 47302 0.174899 0.331744 0.1302451 0.0011135 -0.000272 0.000434 0.000642 0.000521 0.0000131 0.0000178 0.000230 0.000211 1988 5 22 47303 0.176234 0.329591 0.1290704 0.0012524 -0.000179 0.000128 0.000711 0.000492 0.0000150 0.0000165 0.000217 0.000229 1988 5 23 47304 0.176855 0.327684 0.1277378 0.0014167 -0.000051 -0.000139 0.001215 0.000654 0.0000199 0.0000270 0.000227 0.000276 1988 5 24 47305 0.176221 0.325666 0.1262433 0.0015709 -0.000007 -0.000133 0.001318 0.000535 0.0000390 0.0000310 0.000364 0.000490 1988 5 25 47306 0.176110 0.323813 0.1246100 0.0016898 -0.000022 0.000022 0.001249 0.000525 0.0000421 0.0000322 0.000387 0.000525 1988 5 26 47307 0.176360 0.322333 0.1228835 0.0017545 -0.000047 0.000170 0.001621 0.001654 0.0000255 0.0000259 0.000343 0.000504 1988 5 27 47308 0.175890 0.320633 0.1211241 0.0017536 -0.000040 0.000195 0.000786 0.000976 0.0000097 0.0000176 0.000197 0.000381 1988 5 28 47309 0.174557 0.318627 0.1194007 0.0016818 0.000018 0.000042 0.000482 0.000564 0.0000097 0.0000097 0.000197 0.000380 1988 5 29 47310 0.172947 0.316671 0.1177825 0.0015437 0.000118 -0.000267 0.000476 0.000556 0.0000097 0.0000097 0.000197 0.000380 1988 5 30 47311 0.171508 0.314946 0.1163274 0.0013569 0.000227 -0.000641 0.000521 0.000608 0.0000097 0.0000104 0.000197 0.000380 1988 5 31 47312 0.170318 0.313284 0.1150680 0.0011543 0.000302 -0.000943 0.002275 0.002009 0.0000111 0.0000105 0.000142 0.000187 1988 6 1 47313 0.169299 0.311416 0.1139985 0.0009823 0.000300 -0.001033 0.000930 0.000804 0.0000113 0.0000112 0.000139 0.000181 1988 6 2 47314 0.168451 0.309268 0.1130658 0.0008910 0.000204 -0.000846 0.000513 0.000442 0.0000113 0.0000113 0.000139 0.000181 1988 6 3 47315 0.167969 0.307138 0.1121716 0.0009175 0.000039 -0.000451 0.000627 0.000538 0.0000113 0.0000150 0.000140 0.000182 1988 6 4 47316 0.167389 0.305160 0.1111932 0.0010644 -0.000124 -0.000057 0.001153 0.000936 0.0000188 0.0000176 0.000223 0.000274 1988 6 5 47317 0.166495 0.303407 0.1100250 0.0012891 -0.000209 0.000098 0.000844 0.000671 0.0000239 0.0000190 0.000274 0.000322 1988 6 6 47318 0.165733 0.301895 0.1086222 0.0015172 -0.000178 -0.000092 0.000557 0.000495 0.0000192 0.0000189 0.000246 0.000295 1988 6 7 47319 0.165401 0.300376 0.1070202 0.0016748 -0.000057 -0.000512 0.000361 0.000343 0.0000139 0.0000164 0.000200 0.000249 1988 6 8 47320 0.165414 0.298607 0.1053161 0.0017166 0.000088 -0.000913 0.000361 0.000344 0.0000137 0.0000138 0.000199 0.000246 1988 6 9 47321 0.165436 0.296631 0.1036333 0.0016311 0.000190 -0.001095 0.001095 0.001039 0.0000137 0.0000122 0.000198 0.000246 1988 6 10 47322 0.165154 0.294664 0.1020928 0.0014319 0.000213 -0.000995 0.003832 0.003591 0.0000107 0.0000121 0.000136 0.000245 1988 6 11 47323 0.164621 0.292812 0.1007929 0.0011538 0.000157 -0.000670 0.000580 0.000583 0.0000106 0.0000107 0.000134 0.000245 1988 6 12 47324 0.164305 0.290975 0.0997884 0.0008518 0.000042 -0.000237 0.000374 0.000377 0.0000106 0.0000106 0.000134 0.000245 1988 6 13 47325 0.164499 0.289008 0.0990728 0.0005918 -0.000094 0.000175 0.000515 0.000530 0.0000106 0.0000106 0.000134 0.000245 1988 6 14 47326 0.164789 0.286887 0.0985743 0.0004290 -0.000172 0.000462 0.001197 0.001561 0.0000106 0.0000125 0.000134 0.000245 1988 6 15 47327 0.164932 0.284797 0.0981790 0.0003849 -0.000110 0.000554 0.002350 0.001891 0.0000144 0.0000127 0.000228 0.000246 1988 6 16 47328 0.165291 0.282989 0.0977720 0.0004389 0.000120 0.000447 0.001243 0.001119 0.0000148 0.0000143 0.000247 0.000243 1988 6 17 47329 0.165799 0.281543 0.0972772 0.0005410 0.000446 0.000215 0.000653 0.000652 0.0000143 0.0000130 0.000247 0.000220 1988 6 18 47330 0.165578 0.280230 0.0966763 0.0006378 0.000668 -0.000002 0.000563 0.000440 0.0000113 0.0000104 0.000232 0.000165 1988 6 19 47331 0.163940 0.277585 0.0959978 0.0007172 0.000347 0.000049 0.000284 0.000215 0.0000064 0.0000084 0.000158 0.000126 1988 6 20 47332 0.163015 0.274328 0.0952473 0.0007993 -0.000032 0.000075 0.000237 0.000182 0.0000056 0.0000103 0.000142 0.000123 1988 6 21 47333 0.163856 0.271843 0.0944124 0.0008793 0.000003 -0.000154 0.000599 0.000469 0.0000141 0.0000111 0.000306 0.000302 1988 6 22 47334 0.164406 0.269717 0.0935073 0.0009262 0.000016 -0.000307 0.000715 0.000628 0.0000166 0.0000158 0.000312 0.000313 1988 6 23 47335 0.164418 0.267859 0.0925811 0.0009069 -0.000404 -0.000092 0.000606 0.000570 0.0000174 0.0000197 0.000278 0.000234 1988 6 24 47336 0.165291 0.265526 0.0917147 0.0008087 -0.000860 0.000172 0.000836 0.000807 0.0000229 0.0000191 0.000282 0.000216 1988 6 25 47337 0.166895 0.263470 0.0909831 0.0006466 -0.000892 0.000175 0.001793 0.001454 0.0000208 0.0000170 0.000265 0.000206 1988 6 26 47338 0.168219 0.262305 0.0904361 0.0004440 -0.000439 -0.000055 0.000667 0.000476 0.0000111 0.0000159 0.000191 0.000179 1988 6 27 47339 0.168824 0.260953 0.0900999 0.0002274 0.000293 -0.000305 0.000600 0.000434 0.0000111 0.0000111 0.000191 0.000179 1988 6 28 47340 0.168894 0.258629 0.0899697 0.0000376 0.000980 -0.000350 0.000890 0.000657 0.0000111 0.0000111 0.000191 0.000179 1988 6 29 47341 0.168892 0.256269 0.0899936 -0.0000702 0.001384 -0.000168 0.002232 0.001720 0.0000111 0.0000120 0.000191 0.000179 1988 6 30 47342 0.169033 0.254649 0.0900646 -0.0000470 0.001415 0.000081 0.003383 0.002628 0.0000130 0.0000121 0.000192 0.000220 1988 7 1 47343 0.169117 0.253247 0.0900414 0.0001191 0.001114 0.000178 0.001342 0.001018 0.0000132 0.0000131 0.000192 0.000222 1988 7 2 47344 0.168817 0.251171 0.0897970 0.0003881 0.000619 0.000012 0.000669 0.000502 0.0000133 0.0000146 0.000193 0.000223 1988 7 3 47345 0.168065 0.248378 0.0892648 0.0006853 0.000119 -0.000322 0.000499 0.000456 0.0000159 0.0000373 0.000223 0.000257 1988 7 4 47346 0.167096 0.246704 0.0884560 0.0009289 -0.000180 -0.000515 0.000438 0.000547 0.0000614 0.0000522 0.000541 0.000491 1988 7 5 47347 0.166205 0.246851 0.0874559 0.0010525 -0.000205 -0.000328 0.000696 0.000752 0.0000885 0.0000464 0.000822 0.000610 1988 7 6 47348 0.165403 0.245268 0.0864033 0.0010227 -0.000188 0.000069 0.001217 0.000825 0.0000315 0.0000521 0.000549 0.000502 1988 7 7 47349 0.166770 0.241717 0.0854522 0.0008499 -0.000271 0.000378 0.000679 0.000534 0.0000156 0.0000228 0.000341 0.000279 1988 7 8 47350 0.168288 0.239077 0.0847267 0.0005699 -0.000298 0.000265 0.000511 0.000437 0.0000141 0.0000155 0.000269 0.000223 1988 7 9 47351 0.168067 0.237225 0.0843154 0.0002636 -0.000296 0.000034 0.000605 0.000532 0.0000154 0.0000212 0.000255 0.000217 1988 7 10 47352 0.166209 0.235192 0.0841850 0.0000483 -0.000314 -0.000004 0.001168 0.000993 0.0000282 0.0000251 0.000430 0.000330 1988 7 11 47353 0.165265 0.233244 0.0841916 -0.0000427 -0.000263 0.000014 0.000993 0.000982 0.0000348 0.0000304 0.000422 0.000361 1988 7 12 47354 0.166396 0.231332 0.0842369 -0.0000746 -0.000122 -0.000049 0.000752 0.001193 0.0000326 0.0000373 0.000311 0.000341 1988 7 13 47355 0.164762 0.229239 0.0843076 -0.0000565 0.000043 -0.000140 0.001047 0.001035 0.0000398 0.0000344 0.000425 0.000460 1988 7 14 47356 0.162176 0.226944 0.0843228 0.0000654 0.000208 -0.000242 0.001521 0.000835 0.0000363 0.0000358 0.000557 0.000649 1988 7 15 47357 0.162556 0.224978 0.0841594 0.0002811 0.000320 -0.000201 0.002019 0.001050 0.0000318 0.0000235 0.000519 0.000654 1988 7 16 47358 0.164328 0.223376 0.0837541 0.0005188 0.000313 -0.000002 0.001203 0.000650 0.0000108 0.0000206 0.000138 0.000133 1988 7 17 47359 0.164304 0.221808 0.0831258 0.0007088 0.000149 0.000191 0.000392 0.000213 0.0000094 0.0000101 0.000120 0.000115 1988 7 18 47360 0.162920 0.220150 0.0823490 0.0008165 -0.000156 0.000206 0.000379 0.000207 0.0000094 0.0000094 0.000120 0.000115 1988 7 19 47361 0.162180 0.218385 0.0815114 0.0008429 -0.000510 0.000034 0.000942 0.000519 0.0000094 0.0000189 0.000121 0.000116 1988 7 20 47362 0.162661 0.216407 0.0806848 0.0008079 -0.000766 -0.000151 0.002288 0.001545 0.0000285 0.0000173 0.000418 0.000297 1988 7 21 47363 0.162573 0.213999 0.0799166 0.0007378 -0.000797 -0.000165 0.000882 0.000881 0.0000251 0.0000237 0.000407 0.000339 1988 7 22 47364 0.160369 0.211346 0.0792271 0.0006608 -0.000565 0.000035 0.000635 0.000904 0.0000189 0.0000229 0.000315 0.000404 1988 7 23 47365 0.158354 0.209629 0.0786083 0.0005780 -0.000138 0.000126 0.000681 0.000800 0.0000207 0.0000215 0.000317 0.000518 1988 7 24 47366 0.157398 0.208105 0.0780773 0.0004613 0.000186 0.000063 0.000581 0.000442 0.0000241 0.0000195 0.000229 0.000208 1988 7 25 47367 0.156346 0.206196 0.0776803 0.0003078 0.000105 0.000213 0.000476 0.000382 0.0000182 0.0000211 0.000160 0.000134 1988 7 26 47368 0.154980 0.204438 0.0774400 0.0001665 -0.000277 0.000632 0.000536 0.000547 0.0000182 0.0000187 0.000204 0.000179 1988 7 27 47369 0.153757 0.201469 0.0773083 0.0001380 -0.000318 0.000671 0.000569 0.000592 0.0000192 0.0000210 0.000274 0.000237 1988 7 28 47370 0.151801 0.199398 0.0771154 0.0002991 -0.000035 0.000377 0.000897 0.000722 0.0000238 0.0000259 0.000287 0.000287 1988 7 29 47371 0.149482 0.197575 0.0766682 0.0006139 0.000234 -0.000009 0.001493 0.000837 0.0000326 0.0000232 0.000285 0.000330 1988 7 30 47372 0.148353 0.195702 0.0758706 0.0009570 0.000351 -0.000214 0.000955 0.000625 0.0000226 0.0000219 0.000277 0.000293 1988 7 31 47373 0.148765 0.193792 0.0747720 0.0011963 0.000294 -0.000020 0.000482 0.000303 0.0000112 0.0000154 0.000197 0.000177 1988 8 1 47374 0.148563 0.191759 0.0735265 0.0012756 0.000151 0.000364 0.000335 0.000200 0.0000082 0.0000094 0.000152 0.000157 1988 8 2 47375 0.148122 0.189928 0.0722831 0.0012092 0.000088 0.000568 0.000359 0.000210 0.0000075 0.0000121 0.000139 0.000161 1988 8 3 47376 0.147013 0.188328 0.0711632 0.0010299 0.000165 0.000500 0.001033 0.000667 0.0000159 0.0000246 0.000264 0.000353 1988 8 4 47377 0.144147 0.186569 0.0702561 0.0007863 0.000302 0.000338 0.001749 0.001180 0.0000416 0.0000192 0.000496 0.001397 1988 8 5 47378 0.141819 0.184389 0.0695969 0.0005351 0.000379 0.000272 0.001089 0.000814 0.0000225 0.0000265 0.000395 0.000438 1988 8 6 47379 0.140751 0.182129 0.0691706 0.0003171 0.000349 0.000259 0.000521 0.000457 0.0000115 0.0000151 0.000229 0.000185 1988 8 7 47380 0.140087 0.180152 0.0689344 0.0001495 0.000257 0.000155 0.000279 0.000251 0.0000077 0.0000091 0.000168 0.000110 1988 8 8 47381 0.138955 0.178602 0.0688383 0.0000428 0.000198 0.000012 0.000249 0.000224 0.0000067 0.0000072 0.000152 0.000093 1988 8 9 47382 0.136893 0.177087 0.0688158 0.0000172 0.000236 -0.000047 0.000575 0.000526 0.0000067 0.0000092 0.000151 0.000093 1988 8 10 47383 0.134271 0.175039 0.0687755 0.0000875 0.000353 -0.000001 0.000691 0.000656 0.0000117 0.0000093 0.000180 0.000219 1988 8 11 47384 0.132583 0.172867 0.0686202 0.0002432 0.000482 0.000097 0.000467 0.000437 0.0000119 0.0000118 0.000181 0.000226 1988 8 12 47385 0.132640 0.171332 0.0682788 0.0004464 0.000549 0.000162 0.000617 0.000572 0.0000119 0.0000119 0.000181 0.000226 1988 8 13 47386 0.132787 0.170202 0.0677281 0.0006501 0.000519 0.000154 0.000946 0.000857 0.0000119 0.0000116 0.000181 0.000226 1988 8 14 47387 0.131784 0.169102 0.0669894 0.0008179 0.000402 0.000093 0.001532 0.001513 0.0000112 0.0000115 0.000279 0.000151 1988 8 15 47388 0.129668 0.167859 0.0661108 0.0009291 0.000240 0.000030 0.000786 0.000796 0.0000111 0.0000112 0.000294 0.000148 1988 8 16 47389 0.127174 0.166576 0.0651539 0.0009727 0.000086 0.000009 0.000477 0.000483 0.0000111 0.0000111 0.000294 0.000148 1988 8 17 47390 0.124783 0.165557 0.0641885 0.0009431 -0.000017 0.000041 0.000450 0.000456 0.0000111 0.0000111 0.000294 0.000148 1988 8 18 47391 0.122645 0.164706 0.0632874 0.0008425 -0.000049 0.000106 0.001556 0.001537 0.0000111 0.0000105 0.000294 0.000148 1988 8 19 47392 0.120745 0.163607 0.0625173 0.0006851 -0.000015 0.000172 0.002641 0.002220 0.0000099 0.0000105 0.000203 0.000191 1988 8 20 47393 0.118861 0.162141 0.0619233 0.0004983 0.000060 0.000210 0.000473 0.000374 0.0000099 0.0000099 0.000199 0.000196 1988 8 21 47394 0.116757 0.160514 0.0615173 0.0003183 0.000136 0.000211 0.000435 0.000344 0.0000099 0.0000099 0.000199 0.000196 1988 8 22 47395 0.114431 0.158992 0.0612709 0.0001870 0.000177 0.000179 0.000437 0.000346 0.0000099 0.0000099 0.000199 0.000196 1988 8 23 47396 0.112249 0.157655 0.0611129 0.0001495 0.000165 0.000136 0.000992 0.000794 0.0000099 0.0000100 0.000199 0.000196 1988 8 24 47397 0.110492 0.156410 0.0609289 0.0002449 0.000111 0.000110 0.002790 0.002671 0.0000102 0.0000100 0.000212 0.000175 1988 8 25 47398 0.108779 0.155146 0.0605772 0.0004844 0.000047 0.000130 0.000727 0.000822 0.0000102 0.0000102 0.000214 0.000173 1988 8 26 47399 0.106005 0.153908 0.0599279 0.0008265 0.000008 0.000214 0.000464 0.000536 0.0000102 0.0000102 0.000214 0.000173 1988 8 27 47400 0.102061 0.152872 0.0589216 0.0011747 0.000012 0.000368 0.000586 0.000701 0.0000102 0.0000107 0.000214 0.000173 1988 8 28 47401 0.099164 0.152104 0.0576124 0.0014117 0.000045 0.000565 0.000820 0.001078 0.0000111 0.0000246 0.000232 0.000190 1988 8 29 47402 0.097750 0.151246 0.0561595 0.0014583 0.000076 0.000735 0.000911 0.001080 0.0000389 0.0000174 0.000578 0.001008 1988 8 30 47403 0.096583 0.149969 0.0547634 0.0013139 0.000095 0.000779 0.000698 0.000792 0.0000237 0.0000263 0.000403 0.000434 1988 8 31 47404 0.094511 0.148458 0.0535827 0.0010521 0.000124 0.000608 0.000486 0.000529 0.0000138 0.0000185 0.000248 0.000233 1988 9 1 47405 0.092096 0.147649 0.0526802 0.0007634 0.000241 0.000156 0.000618 0.000601 0.0000132 0.0000142 0.000232 0.000238 1988 9 2 47406 0.089035 0.146150 0.0520468 0.0005177 0.000317 -0.000251 0.001137 0.000912 0.0000145 0.0000140 0.000246 0.000287 1988 9 3 47407 0.086188 0.144371 0.0516153 0.0003632 0.000243 -0.000341 0.001351 0.001137 0.0000149 0.0000146 0.000255 0.000294 1988 9 4 47408 0.084115 0.143493 0.0512833 0.0003154 0.000088 -0.000170 0.000582 0.000613 0.0000148 0.0000148 0.000331 0.000240 1988 9 5 47409 0.082253 0.143545 0.0509488 0.0003583 0.000001 0.000027 0.000554 0.000585 0.0000148 0.0000148 0.000332 0.000239 1988 9 6 47410 0.080037 0.143674 0.0505367 0.0004559 0.000107 0.000024 0.000561 0.000593 0.0000148 0.0000153 0.000332 0.000239 1988 9 7 47411 0.077841 0.142825 0.0500145 0.0005690 0.000394 -0.000193 0.001436 0.001493 0.0000159 0.0000240 0.000321 0.000246 1988 9 8 47412 0.076257 0.140730 0.0493851 0.0006735 0.000708 -0.000420 0.001823 0.002647 0.0000332 0.0000204 0.000278 0.000293 1988 9 9 47413 0.074793 0.138478 0.0486639 0.0007692 0.000847 -0.000399 0.000811 0.001025 0.0000250 0.0000253 0.000275 0.000274 1988 9 10 47414 0.071841 0.138043 0.0478537 0.0008713 0.000683 0.000006 0.000496 0.000525 0.0000174 0.0000235 0.000280 0.000246 1988 9 11 47415 0.067840 0.139054 0.0469374 0.0009888 0.000187 0.000756 0.000631 0.000648 0.0000220 0.0000304 0.000358 0.000331 1988 9 12 47416 0.065396 0.139635 0.0458984 0.0010973 -0.000206 0.001218 0.001320 0.001341 0.0000434 0.0000276 0.000482 0.000644 1988 9 13 47417 0.064725 0.138748 0.0447677 0.0011509 -0.000228 0.001042 0.001071 0.001835 0.0000331 0.0000280 0.000432 0.000604 1988 9 14 47418 0.063672 0.136809 0.0436197 0.0011231 0.000009 0.000438 0.000649 0.000828 0.0000126 0.0000229 0.000230 0.000250 1988 9 15 47419 0.060765 0.135039 0.0425389 0.0010180 0.000237 -0.000149 0.000414 0.000477 0.0000126 0.0000126 0.000230 0.000250 1988 9 16 47420 0.057672 0.134367 0.0415921 0.0008657 0.000267 -0.000366 0.000457 0.000526 0.0000126 0.0000131 0.000229 0.000249 1988 9 17 47421 0.054970 0.134463 0.0408051 0.0007100 0.000189 -0.000267 0.000934 0.000982 0.0000137 0.0000133 0.000183 0.000190 1988 9 18 47422 0.052009 0.134323 0.0401582 0.0005955 0.000212 -0.000166 0.000681 0.000549 0.0000140 0.0000138 0.000175 0.000182 1988 9 19 47423 0.049186 0.133443 0.0395883 0.0005626 0.000388 -0.000288 0.000615 0.000496 0.0000138 0.0000139 0.000188 0.000204 1988 9 20 47424 0.046302 0.132195 0.0389964 0.0006445 0.000410 -0.000449 0.000577 0.000503 0.0000138 0.0000147 0.000242 0.000353 1988 9 21 47425 0.042932 0.131357 0.0382571 0.0008582 0.000010 -0.000347 0.000560 0.000562 0.0000156 0.0000156 0.000258 0.000352 1988 9 22 47426 0.039524 0.131267 0.0372425 0.0011850 -0.000423 -0.000122 0.000645 0.000720 0.0000175 0.0000164 0.000266 0.000338 1988 9 23 47427 0.036182 0.131368 0.0358689 0.0015602 -0.000503 0.000021 0.001190 0.001297 0.0000172 0.0000154 0.000269 0.000307 1988 9 24 47428 0.032584 0.130941 0.0341348 0.0018901 -0.000227 0.000050 0.000554 0.000605 0.0000132 0.0000152 0.000278 0.000193 1988 9 25 47429 0.029023 0.130162 0.0321341 0.0020820 0.000162 0.000039 0.000360 0.000394 0.0000132 0.0000132 0.000278 0.000192 1988 9 26 47430 0.025952 0.129529 0.0300366 0.0020803 0.000373 0.000087 0.000503 0.000550 0.0000132 0.0000132 0.000278 0.000192 1988 9 27 47431 0.023205 0.128946 0.0280378 0.0018907 0.000296 0.000216 0.001498 0.001599 0.0000132 0.0000122 0.000278 0.000192 1988 9 28 47432 0.020309 0.128483 0.0262961 0.0015794 0.000032 0.000353 0.002241 0.002234 0.0000111 0.0000121 0.000211 0.000278 1988 9 29 47433 0.017014 0.128763 0.0248863 0.0012418 -0.000203 0.000384 0.000727 0.000763 0.0000110 0.0000110 0.000208 0.000290 1988 9 30 47434 0.013242 0.129642 0.0237901 0.0009636 -0.000211 0.000211 0.000366 0.000385 0.0000110 0.0000110 0.000208 0.000290 1988 10 1 47435 0.009007 0.129898 0.0229203 0.0007963 0.000080 -0.000170 0.000447 0.000471 0.0000110 0.0000110 0.000208 0.000290 1988 10 2 47436 0.004358 0.129456 0.0221564 0.0007565 0.000537 -0.000610 0.001393 0.001453 0.0000110 0.0000109 0.000208 0.000290 1988 10 3 47437 -0.000152 0.129031 0.0213727 0.0008376 0.000894 -0.000856 0.001765 0.002088 0.0000108 0.0000109 0.000198 0.000180 1988 10 4 47438 -0.003424 0.128849 0.0204559 0.0010167 0.000917 -0.000702 0.000357 0.000452 0.0000108 0.0000109 0.000197 0.000176 1988 10 5 47439 -0.004934 0.128784 0.0193232 0.0012525 0.000559 -0.000151 0.000358 0.000454 0.0000110 0.0000126 0.000200 0.000179 1988 10 6 47440 -0.005556 0.128799 0.0179440 0.0014876 0.000038 0.000521 0.000474 0.000625 0.0000144 0.0000223 0.000255 0.000235 1988 10 7 47441 -0.007731 0.129376 0.0163506 0.0016690 -0.000162 0.000768 0.001041 0.001564 0.0000337 0.0000302 0.000471 0.000563 1988 10 8 47442 -0.010875 0.130195 0.0146180 0.0017733 0.000122 0.000372 0.001137 0.001451 0.0000460 0.0000326 0.000596 0.000702 1988 10 9 47443 -0.012972 0.130887 0.0128238 0.0018123 0.000306 -0.000130 0.000862 0.001050 0.0000315 0.0000319 0.000471 0.000436 1988 10 10 47444 -0.017417 0.132841 0.0110176 0.0018115 -0.000008 -0.000262 0.000612 0.000572 0.0000178 0.0000238 0.000285 0.000242 1988 10 11 47445 -0.021402 0.134036 0.0092256 0.0017777 -0.000439 -0.000176 0.000834 0.000757 0.0000161 0.0000177 0.000259 0.000219 1988 10 12 47446 -0.024752 0.134675 0.0074831 0.0016975 -0.000717 -0.000065 0.001856 0.001655 0.0000175 0.0001114 0.000282 0.000238 1988 10 13 47447 -0.028490 0.135506 0.0058436 0.0015626 -0.000818 -0.000026 0.001663 0.001222 0.0002067 0.0001058 0.002967 0.003654 1988 10 14 47448 -0.032493 0.136174 0.0043596 0.0013881 -0.000829 -0.000086 0.001534 0.001175 0.0001941 0.0001711 0.002671 0.003701 1988 10 15 47449 -0.036419 0.136412 0.0030557 0.0012127 -0.000826 -0.000230 0.001616 0.001505 0.0001354 0.0001827 0.001866 0.002348 1988 10 16 47450 -0.040520 0.136931 0.0019096 0.0010856 -0.000710 -0.000461 0.002492 0.002404 0.0001713 0.0001201 0.002357 0.002775 1988 10 17 47451 -0.044308 0.137337 0.0008502 0.0010514 -0.000451 -0.000705 0.004633 0.001907 0.0001048 0.0000940 0.002539 0.001780 1988 10 18 47452 -0.047539 0.136723 -0.0002319 0.0011387 -0.000064 -0.000776 0.000938 0.001032 0.0000166 0.0000573 0.000443 0.000282 1988 10 19 47453 -0.049976 0.136897 -0.0014628 0.0013508 0.000430 -0.000457 0.000534 0.000709 0.0000098 0.0000153 0.000264 0.000169 1988 10 20 47454 -0.051468 0.139730 -0.0029563 0.0016576 0.000954 0.000260 0.000749 0.001075 0.0000140 0.0000218 0.000406 0.000262 1988 10 21 47455 -0.053085 0.141234 -0.0047786 0.0019914 0.001351 0.000938 0.001743 0.003138 0.0000338 0.0000780 0.001175 0.000883 1988 10 22 47456 -0.055418 0.141331 -0.0069120 0.0022576 0.001500 0.001191 0.005970 0.003206 0.0001420 0.0000648 0.002663 0.004122 1988 10 23 47457 -0.058057 0.142223 -0.0092423 0.0023680 0.001375 0.000940 0.004466 0.001725 0.0000957 0.0000763 0.001917 0.002786 1988 10 24 47458 -0.060565 0.143474 -0.0115859 0.0022795 0.001034 0.000377 0.000707 0.000715 0.0000106 0.0000529 0.000232 0.000337 1988 10 25 47459 -0.063714 0.145066 -0.0137488 0.0020176 0.000600 -0.000190 0.000451 0.000487 0.0000100 0.0000131 0.000220 0.000320 1988 10 26 47460 -0.067939 0.147163 -0.0155951 0.0016679 0.000226 -0.000537 0.000620 0.000631 0.0000156 0.0000318 0.000337 0.000497 1988 10 27 47461 -0.071589 0.148494 -0.0170913 0.0013393 0.000066 -0.000635 0.001525 0.001360 0.0000535 0.0000386 0.001018 0.001623 1988 10 28 47462 -0.074945 0.149743 -0.0183060 0.0011176 0.000156 -0.000561 0.001665 0.001365 0.0000615 0.0000302 0.000927 0.001076 1988 10 29 47463 -0.078425 0.150985 -0.0193698 0.0010372 0.000369 -0.000387 0.000534 0.000563 0.0000068 0.0000340 0.000106 0.000120 1988 10 30 47464 -0.081613 0.151781 -0.0204210 0.0010822 0.000517 -0.000164 0.000280 0.000315 0.0000065 0.0000085 0.000101 0.000114 1988 10 31 47465 -0.084068 0.152679 -0.0215644 0.0012104 0.000491 0.000028 0.000403 0.000455 0.0000101 0.0000202 0.000156 0.000177 1988 11 1 47466 -0.085743 0.154442 -0.0228605 0.0013812 0.000364 0.000036 0.001154 0.001525 0.0000339 0.0000288 0.000490 0.000583 1988 11 2 47467 -0.087382 0.156947 -0.0243354 0.0015691 0.000313 -0.000111 0.001779 0.002599 0.0000474 0.0000268 0.000459 0.000792 1988 11 3 47468 -0.090243 0.159116 -0.0259984 0.0017593 0.000470 -0.000222 0.000651 0.000700 0.0000196 0.0000293 0.000258 0.000320 1988 11 4 47469 -0.094159 0.160664 -0.0278450 0.0019310 0.000740 -0.000050 0.000348 0.000380 0.0000112 0.0000171 0.000166 0.000178 1988 11 5 47470 -0.097609 0.162251 -0.0298437 0.0020487 0.000861 0.000417 0.000414 0.000458 0.0000145 0.0000151 0.000191 0.000197 1988 11 6 47471 -0.099944 0.163854 -0.0319203 0.0020683 0.000681 0.000383 0.000499 0.000577 0.0000190 0.0000147 0.000201 0.000186 1988 11 7 47472 -0.101861 0.165489 -0.0339565 0.0019732 0.000370 -0.000171 0.000469 0.000592 0.0000148 0.0000163 0.000160 0.000134 1988 11 8 47473 -0.104376 0.167557 -0.0358447 0.0018134 0.000250 -0.000433 0.000479 0.000534 0.0000137 0.0000137 0.000168 0.000144 1988 11 9 47474 -0.107556 0.170394 -0.0375668 0.0016613 0.000325 -0.000218 0.000546 0.000456 0.0000126 0.0000121 0.000215 0.000219 1988 11 10 47475 -0.110740 0.173400 -0.0391605 0.0015313 0.000402 0.000045 0.000517 0.000424 0.0000105 0.0000086 0.000237 0.000217 1988 11 11 47476 -0.113484 0.174463 -0.0406362 0.0013943 0.000538 -0.000072 0.000240 0.000212 0.0000046 0.0000070 0.000150 0.000112 1988 11 12 47477 -0.115621 0.175139 -0.0419707 0.0012592 0.000676 -0.000357 0.000200 0.000179 0.0000035 0.0000050 0.000118 0.000087 1988 11 13 47478 -0.117487 0.177467 -0.0431884 0.0011966 0.000687 -0.000409 0.000501 0.000459 0.0000054 0.0000095 0.000161 0.000124 1988 11 14 47479 -0.119602 0.180157 -0.0444031 0.0012708 0.000601 -0.000197 0.000633 0.000648 0.0000156 0.0000107 0.000244 0.000222 1988 11 15 47480 -0.121243 0.182361 -0.0457651 0.0014845 0.000499 0.000103 0.000624 0.000663 0.0000160 0.0000158 0.000245 0.000224 1988 11 16 47481 -0.122336 0.184277 -0.0473941 0.0017859 0.000446 0.000314 0.001174 0.002108 0.0000160 0.0000138 0.000245 0.000224 1988 11 17 47482 -0.123597 0.186457 -0.0493395 0.0020986 0.000453 0.000358 0.001354 0.002667 0.0000116 0.0000137 0.000245 0.000190 1988 11 18 47483 -0.125053 0.189159 -0.0515718 0.0023460 0.000499 0.000247 0.000847 0.000846 0.0000114 0.0000115 0.000245 0.000188 1988 11 19 47484 -0.126328 0.192194 -0.0539920 0.0024668 0.000550 0.000062 0.000532 0.000530 0.0000114 0.0000114 0.000245 0.000188 1988 11 20 47485 -0.127368 0.195287 -0.0564540 0.0024299 0.000580 -0.000110 0.000432 0.000431 0.0000114 0.0000114 0.000245 0.000188 1988 11 21 47486 -0.128713 0.198389 -0.0588014 0.0022447 0.000577 -0.000217 0.001012 0.000998 0.0000114 0.0000107 0.000245 0.000188 1988 11 22 47487 -0.130926 0.201501 -0.0609091 0.0019604 0.000538 -0.000253 0.003143 0.002875 0.0000100 0.0000107 0.000227 0.000157 1988 11 23 47488 -0.133930 0.204380 -0.0627143 0.0016503 0.000457 -0.000255 0.000593 0.000608 0.0000099 0.0000099 0.000226 0.000155 1988 11 24 47489 -0.136839 0.206550 -0.0642293 0.0013896 0.000334 -0.000269 0.000376 0.000387 0.0000099 0.0000099 0.000226 0.000155 1988 11 25 47490 -0.138983 0.208126 -0.0655317 0.0012319 0.000181 -0.000328 0.000519 0.000534 0.0000099 0.0000099 0.000226 0.000155 1988 11 26 47491 -0.140916 0.210401 -0.0667362 0.0011964 0.000029 -0.000410 0.000891 0.000916 0.0000099 0.0000099 0.000226 0.000155 1988 11 27 47492 -0.142999 0.213824 -0.0679604 0.0012674 -0.000073 -0.000454 0.000611 0.000591 0.0000098 0.0000099 0.000163 0.000195 1988 11 28 47493 -0.145029 0.217606 -0.0692942 0.0014076 -0.000082 -0.000391 0.000307 0.000294 0.0000098 0.0000098 0.000161 0.000197 1988 11 29 47494 -0.146797 0.220732 -0.0707858 0.0015750 0.000019 -0.000197 0.000318 0.000304 0.0000097 0.0000096 0.000163 0.000182 1988 11 30 47495 -0.148648 0.223098 -0.0724439 0.0017372 0.000203 0.000073 0.000393 0.000380 0.0000095 0.0000095 0.000172 0.000148 1988 12 1 47496 -0.151395 0.225799 -0.0742515 0.0018697 0.000403 0.000302 0.000580 0.000574 0.0000093 0.0000094 0.000179 0.000134 1988 12 2 47497 -0.154861 0.228804 -0.0761678 0.0019489 0.000567 0.000387 0.000900 0.000970 0.0000094 0.0000106 0.000182 0.000136 1988 12 3 47498 -0.156958 0.231428 -0.0781290 0.0019549 0.000686 0.000291 0.000634 0.001040 0.0000118 0.0000106 0.000191 0.000299 1988 12 4 47499 -0.156398 0.233511 -0.0800551 0.0018781 0.000781 0.000057 0.000423 0.000756 0.0000118 0.0000118 0.000191 0.000302 1988 12 5 47500 -0.155321 0.235907 -0.0818641 0.0017288 0.000869 -0.000233 0.000348 0.000637 0.0000118 0.0000118 0.000191 0.000302 1988 12 6 47501 -0.155993 0.239029 -0.0834958 0.0015379 0.000931 -0.000483 0.000851 0.001429 0.0000118 0.0000134 0.000191 0.000302 1988 12 7 47502 -0.158044 0.242276 -0.0849304 0.0013465 0.000915 -0.000617 0.003414 0.002690 0.0000150 0.0000136 0.000291 0.000310 1988 12 8 47503 -0.160019 0.245166 -0.0861904 0.0011903 0.000775 -0.000597 0.000863 0.000861 0.0000154 0.0000151 0.000309 0.000311 1988 12 9 47504 -0.161292 0.248134 -0.0873269 0.0010881 0.000522 -0.000446 0.000492 0.000487 0.0000153 0.0000136 0.000305 0.000302 1988 12 10 47505 -0.162150 0.251634 -0.0883973 0.0010418 0.000247 -0.000250 0.000368 0.000241 0.0000117 0.0000118 0.000212 0.000178 1988 12 11 47506 -0.162932 0.255067 -0.0894509 0.0010539 0.000109 -0.000144 0.000260 0.000145 0.0000084 0.0000100 0.000142 0.000111 1988 12 12 47507 -0.163739 0.257775 -0.0905444 0.0011428 0.000206 -0.000204 0.000320 0.000180 0.0000082 0.0000092 0.000139 0.000109 1988 12 13 47508 -0.164608 0.260508 -0.0917621 0.0013196 0.000433 -0.000329 0.000610 0.000510 0.0000100 0.0000091 0.000175 0.000205 1988 12 14 47509 -0.165680 0.263911 -0.0931869 0.0015536 0.000575 -0.000361 0.000361 0.000393 0.0000100 0.0000095 0.000179 0.000205 1988 12 15 47510 -0.167143 0.266826 -0.0948486 0.0017698 0.000500 -0.000267 0.000311 0.000316 0.0000089 0.0000109 0.000164 0.000129 1988 12 16 47511 -0.168007 0.268674 -0.0966874 0.0018892 0.000303 -0.000279 0.000429 0.000406 0.0000117 0.0000196 0.000219 0.000153 1988 12 17 47512 -0.167791 0.270840 -0.0985792 0.0018685 0.000148 -0.000465 0.001339 0.001029 0.0000303 0.0000167 0.000705 0.000476 1988 12 18 47513 -0.167317 0.274291 -0.1003790 0.0017060 0.000144 -0.000616 0.000677 0.000715 0.0000216 0.0000214 0.000596 0.000420 1988 12 19 47514 -0.166904 0.277879 -0.1019586 0.0014378 0.000301 -0.000518 0.000330 0.000353 0.0000126 0.0000187 0.000288 0.000209 1988 12 20 47515 -0.166017 0.280416 -0.1032424 0.0011319 0.000518 -0.000147 0.000430 0.000457 0.0000158 0.0000137 0.000335 0.000286 1988 12 21 47516 -0.166136 0.283539 -0.1042331 0.0008628 0.000578 0.000191 0.000663 0.000750 0.0000149 0.0000134 0.000490 0.000719 1988 12 22 47517 -0.167048 0.287285 -0.1049983 0.0006858 0.000479 0.000273 0.000578 0.000699 0.0000111 0.0000127 0.000421 0.000804 1988 12 23 47518 -0.167058 0.290098 -0.1056450 0.0006273 0.000373 0.000110 0.000408 0.000428 0.0000105 0.0000107 0.000169 0.000301 1988 12 24 47519 -0.166086 0.292200 -0.1062917 0.0006799 0.000316 -0.000182 0.000452 0.000461 0.0000104 0.0000104 0.000145 0.000256 1988 12 25 47520 -0.164856 0.294473 -0.1070334 0.0008100 0.000313 -0.000468 0.001132 0.001153 0.0000104 0.0000104 0.000144 0.000254 1988 12 26 47521 -0.163926 0.297444 -0.1079260 0.0009771 0.000351 -0.000667 0.004096 0.004250 0.0000104 0.0000110 0.000144 0.000252 1988 12 27 47522 -0.163524 0.301274 -0.1089888 0.0011478 0.000404 -0.000756 0.001610 0.001733 0.0000116 0.0000110 0.000179 0.000176 1988 12 28 47523 -0.163439 0.305571 -0.1102126 0.0012975 0.000449 -0.000747 0.000768 0.000731 0.0000116 0.0000116 0.000179 0.000176 1988 12 29 47524 -0.163125 0.309435 -0.1115674 0.0014086 0.000473 -0.000674 0.000446 0.000415 0.0000116 0.0000116 0.000179 0.000176 1988 12 30 47525 -0.162036 0.311914 -0.1130088 0.0014701 0.000475 -0.000569 0.000555 0.000520 0.0000116 0.0000116 0.000179 0.000176 1988 12 31 47526 -0.160923 0.313631 -0.1144850 0.0014775 0.000462 -0.000456 0.001181 0.001178 0.0000116 0.0000114 0.000179 0.000176 1989 1 1 47527 -0.160458 0.315608 -0.1159429 0.0014313 0.000441 -0.000345 0.000888 0.000837 0.0000112 0.0000114 0.000173 0.000220 1989 1 2 47528 -0.160331 0.318168 -0.1173313 0.0013347 0.000417 -0.000237 0.000307 0.000278 0.0000112 0.0000112 0.000173 0.000225 1989 1 3 47529 -0.159781 0.321060 -0.1186028 0.0011949 0.000387 -0.000125 0.000307 0.000278 0.0000112 0.0000112 0.000173 0.000225 1989 1 4 47530 -0.158415 0.323850 -0.1197203 0.0010283 0.000350 -0.000009 0.000346 0.000313 0.0000112 0.0000112 0.000173 0.000225 1989 1 5 47531 -0.156727 0.326320 -0.1206703 0.0008666 0.000320 0.000098 0.001330 0.001214 0.0000112 0.0000123 0.000173 0.000225 1989 1 6 47532 -0.155426 0.328529 -0.1214788 0.0007557 0.000326 0.000163 0.003070 0.004168 0.0000134 0.0000124 0.000187 0.000289 1989 1 7 47533 -0.154421 0.330706 -0.1222201 0.0007421 0.000406 0.000140 0.000402 0.000608 0.0000136 0.0000135 0.000189 0.000297 1989 1 8 47534 -0.153053 0.333106 -0.1230066 0.0008534 0.000584 0.000000 0.000363 0.000549 0.0000136 0.0000136 0.000189 0.000297 1989 1 9 47535 -0.151118 0.335861 -0.1239619 0.0010807 0.000835 -0.000246 0.000510 0.000784 0.0000136 0.0000136 0.000189 0.000297 1989 1 10 47536 -0.149504 0.338849 -0.1251806 0.0013739 0.001058 -0.000520 0.001177 0.002149 0.0000136 0.0000115 0.000189 0.000297 1989 1 11 47537 -0.148776 0.341714 -0.1266927 0.0016542 0.001112 -0.000707 0.001200 0.002115 0.0000093 0.0000113 0.000173 0.000152 1989 1 12 47538 -0.148353 0.344138 -0.1284466 0.0018405 0.000905 -0.000712 0.000637 0.000660 0.0000089 0.0000089 0.000175 0.000148 1989 1 13 47539 -0.147789 0.346222 -0.1303194 0.0018773 0.000482 -0.000525 0.000369 0.000311 0.0000084 0.0000083 0.000181 0.000149 1989 1 14 47540 -0.147590 0.348529 -0.1321511 0.0017566 0.000042 -0.000247 0.000417 0.000291 0.0000077 0.0000079 0.000195 0.000149 1989 1 15 47541 -0.147090 0.351375 -0.1337988 0.0015175 -0.000089 -0.000042 0.000661 0.000410 0.0000073 0.0000077 0.000206 0.000149 1989 1 16 47542 -0.145888 0.353922 -0.1351743 0.0012292 0.000116 -0.000020 0.000949 0.000646 0.0000076 0.0000082 0.000193 0.000146 1989 1 17 47543 -0.144584 0.356040 -0.1362672 0.0009668 0.000428 -0.000178 0.000326 0.000312 0.0000091 0.0000084 0.000160 0.000138 1989 1 18 47544 -0.143958 0.358056 -0.1371351 0.0007859 0.000564 -0.000429 0.000324 0.000311 0.0000091 0.0000100 0.000161 0.000139 1989 1 19 47545 -0.143944 0.360321 -0.1378760 0.0007145 0.000399 -0.000656 0.000397 0.000382 0.0000110 0.0000277 0.000192 0.000167 1989 1 20 47546 -0.143107 0.362781 -0.1386027 0.0007565 0.000142 -0.000775 0.001794 0.001732 0.0000462 0.0000655 0.000613 0.000682 1989 1 21 47547 -0.140583 0.365251 -0.1394213 0.0008961 0.000076 -0.000750 0.004054 0.003591 0.0001200 0.0000330 0.000737 0.002115 1989 1 22 47548 -0.138107 0.367779 -0.1404150 0.0011034 0.000150 -0.000603 0.000573 0.000531 0.0000197 0.0000658 0.000352 0.000499 1989 1 23 47549 -0.136900 0.369892 -0.1416339 0.0013391 0.000205 -0.000414 0.000394 0.000381 0.0000117 0.0000177 0.000215 0.000275 1989 1 24 47550 -0.136589 0.371464 -0.1430864 0.0015594 0.000170 -0.000291 0.000489 0.000494 0.0000157 0.0000179 0.000220 0.000265 1989 1 25 47551 -0.135595 0.373489 -0.1447366 0.0017254 0.000179 -0.000324 0.000624 0.000687 0.0000242 0.0000234 0.000227 0.000261 1989 1 26 47552 -0.133686 0.376054 -0.1465151 0.0018120 0.000314 -0.000474 0.001569 0.001689 0.0000311 0.0000225 0.000327 0.000345 1989 1 27 47553 -0.132119 0.378253 -0.1483363 0.0018117 0.000502 -0.000599 0.001247 0.001193 0.0000208 0.0000228 0.000455 0.000334 1989 1 28 47554 -0.131630 0.379733 -0.1501159 0.0017332 0.000603 -0.000546 0.000675 0.000655 0.0000146 0.0000173 0.000320 0.000236 1989 1 29 47555 -0.131060 0.381527 -0.1517852 0.0015968 0.000518 -0.000277 0.000549 0.000534 0.0000138 0.0000317 0.000303 0.000224 1989 1 30 47556 -0.130070 0.383627 -0.1532994 0.0014296 0.000260 0.000084 0.001247 0.001199 0.0000488 0.0000535 0.001069 0.000794 1989 1 31 47557 -0.129271 0.385341 -0.1546430 0.0012617 -0.000060 0.000335 0.001443 0.001403 0.0000932 0.0000304 0.001878 0.002322 1989 2 1 47558 -0.128474 0.387042 -0.1558312 0.0011225 -0.000274 0.000308 0.000686 0.000764 0.0000119 0.0000524 0.000243 0.000320 1989 2 2 47559 -0.126861 0.389607 -0.1569079 0.0010375 -0.000251 -0.000003 0.000510 0.000535 0.0000116 0.0000133 0.000239 0.000299 1989 2 3 47560 -0.124291 0.392393 -0.1579391 0.0010295 0.000027 -0.000404 0.000457 0.000364 0.0000146 0.0000181 0.000324 0.000323 1989 2 4 47561 -0.121827 0.394841 -0.1590095 0.0011200 0.000428 -0.000530 0.000712 0.000494 0.0000245 0.0000291 0.000513 0.000466 1989 2 5 47562 -0.119870 0.397620 -0.1602217 0.0013202 0.000780 -0.000289 0.001535 0.001216 0.0000436 0.0000174 0.000595 0.000740 1989 2 6 47563 -0.117964 0.400858 -0.1616770 0.0016091 0.000908 0.000020 0.000480 0.000660 0.0000103 0.0000267 0.000204 0.000151 1989 2 7 47564 -0.116066 0.403909 -0.1634377 0.0019244 0.000733 0.000038 0.000321 0.000364 0.0000098 0.0000105 0.000191 0.000143 1989 2 8 47565 -0.114273 0.406240 -0.1654906 0.0021778 0.000342 -0.000329 0.000338 0.000250 0.0000107 0.0000107 0.000195 0.000156 1989 2 9 47566 -0.112331 0.408205 -0.1677346 0.0022843 0.000015 -0.000661 0.000360 0.000222 0.0000115 0.0000170 0.000199 0.000169 1989 2 10 47567 -0.110170 0.410171 -0.1699967 0.0021994 -0.000071 -0.000677 0.000815 0.000597 0.0000233 0.0000158 0.000449 0.000379 1989 2 11 47568 -0.108035 0.411958 -0.1720870 0.0019442 0.000061 -0.000482 0.000762 0.000644 0.0000201 0.0000172 0.000423 0.000290 1989 2 12 47569 -0.106038 0.413305 -0.1738661 0.0015962 0.000303 -0.000324 0.000443 0.000351 0.0000110 0.0000147 0.000220 0.000148 1989 2 13 47570 -0.103905 0.414397 -0.1752881 0.0012500 0.000574 -0.000344 0.000544 0.000439 0.0000094 0.0000101 0.000185 0.000125 1989 2 14 47571 -0.101220 0.415780 -0.1763945 0.0009795 0.000808 -0.000496 0.001689 0.001372 0.0000092 0.0000089 0.000182 0.000122 1989 2 15 47572 -0.098012 0.417815 -0.1772850 0.0008251 0.000947 -0.000622 0.002011 0.001896 0.0000085 0.0000088 0.000192 0.000128 1989 2 16 47573 -0.094957 0.420286 -0.1780833 0.0007933 0.000949 -0.000606 0.000403 0.000386 0.0000085 0.0000088 0.000193 0.000129 1989 2 17 47574 -0.092642 0.422728 -0.1789048 0.0008628 0.000810 -0.000443 0.000398 0.000346 0.0000091 0.0000106 0.000192 0.000138 1989 2 18 47575 -0.090935 0.424936 -0.1798326 0.0009968 0.000566 -0.000247 0.000398 0.000258 0.0000126 0.0000104 0.000179 0.000187 1989 2 19 47576 -0.088693 0.427264 -0.1809099 0.0011599 0.000219 -0.000336 0.000393 0.000197 0.0000117 0.0000114 0.000136 0.000206 1989 2 20 47577 -0.087072 0.429005 -0.1821511 0.0013364 0.000113 -0.000444 0.000517 0.000258 0.0000101 0.0000116 0.000132 0.000166 1989 2 21 47578 -0.085830 0.430447 -0.1835701 0.0015121 0.000219 -0.000376 0.000545 0.000469 0.0000114 0.0000099 0.000220 0.000146 1989 2 22 47579 -0.082944 0.432626 -0.1851546 0.0016363 0.000105 -0.000318 0.000428 0.000408 0.0000096 0.0000101 0.000215 0.000172 1989 2 23 47580 -0.079448 0.434353 -0.1868179 0.0016658 -0.000151 -0.000231 0.000583 0.000534 0.0000088 0.0000091 0.000202 0.000200 1989 2 24 47581 -0.076164 0.435852 -0.1884614 0.0016115 -0.000363 -0.000073 0.001457 0.001107 0.0000087 0.0000220 0.000201 0.000206 1989 2 25 47582 -0.073073 0.437960 -0.1900203 0.0015077 -0.000431 0.000109 0.007401 0.004084 0.0000353 0.0000340 0.000855 0.000901 1989 2 26 47583 -0.070220 0.440584 -0.1914636 0.0013822 -0.000307 0.000229 0.003175 0.004317 0.0000592 0.0000374 0.001037 0.001572 1989 2 27 47584 -0.067463 0.443244 -0.1927809 0.0012504 -0.000013 0.000193 0.001038 0.001316 0.0000395 0.0000412 0.000402 0.000762 1989 2 28 47585 -0.064423 0.445670 -0.1939703 0.0011202 0.000367 -0.000045 0.000610 0.000728 0.0000232 0.0000297 0.000203 0.000400 1989 3 1 47586 -0.060991 0.448009 -0.1950373 0.0010094 0.000714 -0.000407 0.000695 0.000816 0.0000199 0.0000193 0.000171 0.000338 1989 3 2 47587 -0.058591 0.449959 -0.1960156 0.0009554 0.000891 -0.000743 0.000999 0.001101 0.0000154 0.0000139 0.000171 0.000307 1989 3 3 47588 -0.057222 0.451598 -0.1969846 0.0010054 0.000787 -0.000894 0.000617 0.000589 0.0000079 0.0000118 0.000212 0.000213 1989 3 4 47589 -0.055662 0.453145 -0.1980683 0.0011942 0.000395 -0.000774 0.000395 0.000356 0.0000081 0.0000085 0.000204 0.000221 1989 3 5 47590 -0.052894 0.454516 -0.1994093 0.0015167 -0.000151 -0.000457 0.000335 0.000254 0.0000092 0.0000091 0.000184 0.000256 1989 3 6 47591 -0.050384 0.455727 -0.2011173 0.0019113 -0.000592 -0.000164 0.000395 0.000269 0.0000101 0.0000098 0.000173 0.000292 1989 3 7 47592 -0.048813 0.457149 -0.2032153 0.0022747 -0.000743 -0.000069 0.001007 0.000763 0.0000104 0.0000105 0.000172 0.000251 1989 3 8 47593 -0.046996 0.458795 -0.2056177 0.0025036 -0.000589 -0.000184 0.000634 0.000599 0.0000109 0.0000106 0.000183 0.000130 1989 3 9 47594 -0.044232 0.459910 -0.2081553 0.0025377 -0.000245 -0.000400 0.000447 0.000430 0.0000109 0.0000109 0.000183 0.000129 1989 3 10 47595 -0.040834 0.460032 -0.2106305 0.0023801 0.000119 -0.000574 0.000583 0.000576 0.0000109 0.0000109 0.000183 0.000129 1989 3 11 47596 -0.037625 0.459986 -0.2128780 0.0020897 0.000387 -0.000628 0.000862 0.000922 0.0000109 0.0000108 0.000183 0.000129 1989 3 12 47597 -0.034653 0.461043 -0.2148064 0.0017527 0.000523 -0.000564 0.001066 0.000708 0.0000107 0.0000108 0.000224 0.000201 1989 3 13 47598 -0.031545 0.463546 -0.2164086 0.0014504 0.000552 -0.000435 0.000560 0.000354 0.0000107 0.0000107 0.000228 0.000214 1989 3 14 47599 -0.028275 0.466404 -0.2177474 0.0012384 0.000526 -0.000304 0.000339 0.000213 0.0000107 0.0000107 0.000228 0.000214 1989 3 15 47600 -0.025776 0.467637 -0.2189270 0.0011418 0.000492 -0.000222 0.000379 0.000238 0.0000107 0.0000107 0.000228 0.000214 1989 3 16 47601 -0.023452 0.467774 -0.2200655 0.0011601 0.000470 -0.000203 0.000937 0.000615 0.0000107 0.0000103 0.000228 0.000214 1989 3 17 47602 -0.020307 0.468761 -0.2212715 0.0012739 0.000454 -0.000225 0.001268 0.001126 0.0000098 0.0000102 0.000140 0.000114 1989 3 18 47603 -0.016952 0.470969 -0.2226269 0.0014515 0.000427 -0.000242 0.000606 0.000751 0.0000097 0.0000098 0.000137 0.000111 1989 3 19 47604 -0.014216 0.473402 -0.2241775 0.0016537 0.000367 -0.000199 0.000414 0.000532 0.0000097 0.0000097 0.000137 0.000111 1989 3 20 47605 -0.011579 0.474951 -0.2259271 0.0018386 0.000271 -0.000068 0.000338 0.000439 0.0000097 0.0000097 0.000137 0.000111 1989 3 21 47606 -0.008411 0.475584 -0.2278383 0.0019677 0.000161 0.000111 0.000628 0.000812 0.0000097 0.0000092 0.000137 0.000111 1989 3 22 47607 -0.005115 0.476074 -0.2298399 0.0020149 0.000085 0.000234 0.002882 0.002463 0.0000087 0.0000092 0.000137 0.000206 1989 3 23 47608 -0.002132 0.476974 -0.2318433 0.0019734 0.000084 0.000182 0.000641 0.000553 0.0000086 0.0000086 0.000137 0.000229 1989 3 24 47609 0.000984 0.477836 -0.2337639 0.0018580 0.000166 -0.000091 0.000326 0.000282 0.0000086 0.0000088 0.000137 0.000229 1989 3 25 47610 0.004888 0.478027 -0.2355424 0.0017004 0.000286 -0.000497 0.000333 0.000288 0.0000090 0.0000118 0.000144 0.000223 1989 3 26 47611 0.008940 0.478195 -0.2371565 0.0015311 0.000356 -0.000801 0.000659 0.000541 0.0000150 0.0000125 0.000234 0.000193 1989 3 27 47612 0.011984 0.479358 -0.2386066 0.0013586 0.000316 -0.000792 0.000687 0.000584 0.0000159 0.0000150 0.000244 0.000193 1989 3 28 47613 0.014249 0.480846 -0.2398861 0.0011856 0.000208 -0.000489 0.000580 0.000549 0.0000149 0.0000151 0.000235 0.000201 1989 3 29 47614 0.017035 0.480929 -0.2409998 0.0010578 0.000144 -0.000145 0.000585 0.000538 0.0000142 0.0000157 0.000251 0.000214 1989 3 30 47615 0.020042 0.480354 -0.2420319 0.0010316 0.000185 -0.000045 0.000659 0.000484 0.0000164 0.0000159 0.000263 0.000269 1989 3 31 47616 0.023326 0.479978 -0.2430988 0.0011220 0.000099 -0.000101 0.000799 0.000598 0.0000176 0.0000153 0.000272 0.000254 1989 4 1 47617 0.027029 0.479998 -0.2443114 0.0013197 -0.000118 -0.000196 0.000510 0.000543 0.0000141 0.0000154 0.000293 0.000165 1989 4 2 47618 0.030337 0.480731 -0.2457628 0.0015989 -0.000210 -0.000290 0.000399 0.000400 0.0000132 0.0000133 0.000275 0.000165 1989 4 3 47619 0.033010 0.481565 -0.2475106 0.0019049 -0.000097 -0.000208 0.000362 0.000321 0.0000125 0.0000158 0.000255 0.000190 1989 4 4 47620 0.035722 0.481704 -0.2495433 0.0021519 0.000117 0.000141 0.000529 0.000468 0.0000184 0.0000280 0.000370 0.000279 1989 4 5 47621 0.039215 0.481602 -0.2517580 0.0022514 0.000318 0.000445 0.001275 0.001110 0.0000434 0.0000288 0.000831 0.000590 1989 4 6 47622 0.043323 0.481789 -0.2539791 0.0021580 0.000446 0.000440 0.001494 0.001094 0.0000393 0.0000281 0.000987 0.000524 1989 4 7 47623 0.047186 0.482159 -0.2560193 0.0018988 0.000490 0.000158 0.000805 0.000636 0.0000128 0.0000260 0.000366 0.000186 1989 4 8 47624 0.050404 0.482522 -0.2577526 0.0015647 0.000473 -0.000204 0.000463 0.000375 0.0000128 0.0000128 0.000366 0.000185 1989 4 9 47625 0.053262 0.482794 -0.2591600 0.0012671 0.000424 -0.000440 0.000449 0.000364 0.0000128 0.0000128 0.000366 0.000185 1989 4 10 47626 0.056065 0.482883 -0.2603235 0.0010869 0.000357 -0.000477 0.000497 0.000403 0.0000128 0.0000105 0.000365 0.000185 1989 4 11 47627 0.058880 0.482742 -0.2613792 0.0010484 0.000280 -0.000389 0.001544 0.001551 0.0000082 0.0000104 0.000161 0.000256 1989 4 12 47628 0.061660 0.482416 -0.2624598 0.0011267 0.000208 -0.000297 0.000568 0.000602 0.0000080 0.0000081 0.000156 0.000265 1989 4 13 47629 0.064436 0.482059 -0.2636593 0.0012766 0.000153 -0.000294 0.000297 0.000316 0.0000080 0.0000080 0.000156 0.000265 1989 4 14 47630 0.067395 0.481947 -0.2650268 0.0014569 0.000127 -0.000397 0.000334 0.000356 0.0000080 0.0000080 0.000156 0.000265 1989 4 15 47631 0.070559 0.482210 -0.2665767 0.0016391 0.000130 -0.000525 0.001117 0.001186 0.0000080 0.0000102 0.000156 0.000265 1989 4 16 47632 0.073773 0.482600 -0.2683001 0.0018035 0.000153 -0.000565 0.002015 0.002238 0.0000123 0.0000105 0.000142 0.000191 1989 4 17 47633 0.076892 0.482579 -0.2701713 0.0019349 0.000176 -0.000454 0.000361 0.000416 0.0000130 0.0000127 0.000142 0.000186 1989 4 18 47634 0.079892 0.481934 -0.2721513 0.0020226 0.000175 -0.000242 0.000369 0.000419 0.0000132 0.0000133 0.000149 0.000181 1989 4 19 47635 0.082873 0.481202 -0.2741942 0.0020623 0.000128 -0.000087 0.000429 0.000459 0.0000135 0.0000133 0.000179 0.000168 1989 4 20 47636 0.085950 0.481600 -0.2762536 0.0020502 0.000004 -0.000266 0.000472 0.000475 0.0000135 0.0000134 0.000197 0.000180 1989 4 21 47637 0.088430 0.482024 -0.2782762 0.0019867 -0.000091 -0.000597 0.000425 0.000427 0.0000133 0.0000136 0.000174 0.000283 1989 4 22 47638 0.089978 0.481144 -0.2802156 0.0018903 0.000003 -0.000647 0.000389 0.000388 0.0000137 0.0000118 0.000187 0.000251 1989 4 23 47639 0.092268 0.481418 -0.2820548 0.0017774 0.000323 -0.000390 0.000341 0.000341 0.0000104 0.0000119 0.000158 0.000177 1989 4 24 47640 0.094286 0.481571 -0.2837791 0.0016583 0.000383 -0.000270 0.000351 0.000362 0.0000100 0.0000121 0.000148 0.000174 1989 4 25 47641 0.095835 0.480565 -0.2853904 0.0015599 0.000088 -0.000335 0.000480 0.000596 0.0000139 0.0000168 0.000181 0.000256 1989 4 26 47642 0.097788 0.479813 -0.2869261 0.0015211 -0.000122 -0.000331 0.000780 0.001076 0.0000236 0.0000191 0.000315 0.000403 1989 4 27 47643 0.099360 0.479350 -0.2884641 0.0015743 -0.000036 -0.000289 0.000851 0.000947 0.0000243 0.0000175 0.000366 0.000466 1989 4 28 47644 0.101344 0.479008 -0.2901056 0.0017294 0.000272 -0.000239 0.000428 0.000448 0.0000114 0.0000169 0.000175 0.000242 1989 4 29 47645 0.103561 0.478614 -0.2919467 0.0019667 0.000415 -0.000093 0.000497 0.000509 0.0000095 0.0000171 0.000146 0.000202 1989 4 30 47646 0.105406 0.477132 -0.2940475 0.0022355 0.000236 0.000076 0.001377 0.001393 0.0000228 0.0000388 0.000362 0.000385 1989 5 1 47647 0.107383 0.474864 -0.2964035 0.0024624 -0.000085 0.000092 0.001337 0.002339 0.0000682 0.0000253 0.001633 0.000544 1989 5 2 47648 0.110381 0.474060 -0.2989332 0.0025728 -0.000260 -0.000133 0.000863 0.000950 0.0000278 0.0000408 0.000467 0.000407 1989 5 3 47649 0.112319 0.475257 -0.3014924 0.0025201 -0.000136 -0.000422 0.000491 0.000466 0.0000134 0.0000194 0.000217 0.000239 1989 5 4 47650 0.114192 0.475478 -0.3039156 0.0023071 0.000211 -0.000687 0.000426 0.000397 0.0000111 0.0000210 0.000180 0.000203 1989 5 5 47651 0.117060 0.473747 -0.3060671 0.0019887 0.000575 -0.000862 0.001217 0.000984 0.0000286 0.0000661 0.000464 0.000524 1989 5 6 47652 0.120347 0.471872 -0.3078853 0.0016526 0.000755 -0.000862 0.002085 0.001463 0.0001211 0.0000285 0.001920 0.002252 1989 5 7 47653 0.123461 0.470979 -0.3093966 0.0013828 0.000636 -0.000647 0.000927 0.001121 0.0000283 0.0000672 0.000421 0.000557 1989 5 8 47654 0.126518 0.470106 -0.3106945 0.0012311 0.000256 -0.000229 0.000540 0.000668 0.0000132 0.0000217 0.000194 0.000255 1989 5 9 47655 0.129050 0.470049 -0.3119042 0.0012095 -0.000234 0.000247 0.000708 0.000823 0.0000150 0.0000186 0.000202 0.000248 1989 5 10 47656 0.131372 0.470297 -0.3131473 0.0012962 -0.000633 0.000558 0.001134 0.001186 0.0000239 0.0000290 0.000258 0.000287 1989 5 11 47657 0.134152 0.469322 -0.3145139 0.0014489 -0.000765 0.000563 0.001369 0.001323 0.0000430 0.0000220 0.000436 0.000528 1989 5 12 47658 0.137018 0.467763 -0.3160485 0.0016202 -0.000568 0.000271 0.000578 0.000535 0.0000201 0.0000271 0.000212 0.000302 1989 5 13 47659 0.139624 0.466483 -0.3177487 0.0017684 -0.000142 -0.000194 0.000317 0.000293 0.0000112 0.0000170 0.000118 0.000168 1989 5 14 47660 0.142411 0.465279 -0.3195737 0.0018637 0.000293 -0.000672 0.000428 0.000394 0.0000139 0.0000247 0.000145 0.000208 1989 5 15 47661 0.145390 0.464273 -0.3214599 0.0018931 0.000525 -0.001016 0.001365 0.001234 0.0000383 0.0000792 0.000391 0.000576 1989 5 16 47662 0.148095 0.463282 -0.3233404 0.0018610 0.000492 -0.001125 0.002759 0.002540 0.0001445 0.0000361 0.001622 0.002001 1989 5 17 47663 0.150449 0.461581 -0.3251615 0.0017831 0.000294 -0.000978 0.000858 0.000982 0.0000340 0.0000799 0.000389 0.000466 1989 5 18 47664 0.152672 0.458989 -0.3268888 0.0016764 0.000101 -0.000657 0.000379 0.000435 0.0000153 0.0000233 0.000174 0.000209 1989 5 19 47665 0.154862 0.456551 -0.3285020 0.0015509 0.000031 -0.000338 0.000344 0.000393 0.0000126 0.0000130 0.000144 0.000171 1989 5 20 47666 0.157318 0.454548 -0.3299864 0.0014146 0.000065 -0.000154 0.000672 0.000623 0.0000106 0.0000115 0.000170 0.000134 1989 5 21 47667 0.160075 0.452590 -0.3313369 0.0012881 0.000095 -0.000131 0.000438 0.000400 0.0000104 0.0000105 0.000180 0.000130 1989 5 22 47668 0.162124 0.451496 -0.3325788 0.0012096 0.000038 -0.000198 0.000364 0.000340 0.0000104 0.0000105 0.000167 0.000143 1989 5 23 47669 0.163614 0.450533 -0.3337819 0.0012164 -0.000066 -0.000240 0.000404 0.000397 0.0000107 0.0000109 0.000151 0.000201 1989 5 24 47670 0.165420 0.448316 -0.3350431 0.0013191 -0.000121 -0.000187 0.000436 0.000419 0.0000114 0.0000109 0.000175 0.000175 1989 5 25 47671 0.166532 0.446631 -0.3364505 0.0014961 -0.000093 -0.000088 0.000405 0.000502 0.0000111 0.0000110 0.000192 0.000167 1989 5 26 47672 0.167901 0.445681 -0.3380576 0.0017197 -0.000094 -0.000062 0.000479 0.000733 0.0000105 0.0000106 0.000189 0.000171 1989 5 27 47673 0.169879 0.444105 -0.3398977 0.0019694 -0.000167 -0.000134 0.000821 0.000907 0.0000100 0.0000102 0.000214 0.000205 1989 5 28 47674 0.171633 0.441763 -0.3419858 0.0022103 -0.000216 -0.000225 0.000540 0.000525 0.0000099 0.0000100 0.000227 0.000224 1989 5 29 47675 0.173719 0.439763 -0.3442887 0.0023807 -0.000136 -0.000269 0.000632 0.000614 0.0000100 0.0000174 0.000228 0.000226 1989 5 30 47676 0.176173 0.438300 -0.3467026 0.0024149 0.000060 -0.000336 0.001730 0.001749 0.0000249 0.0000428 0.000438 0.000493 1989 5 31 47677 0.178433 0.436915 -0.3490685 0.0022793 0.000259 -0.000516 0.002086 0.002333 0.0000757 0.0000265 0.000625 0.000889 1989 6 1 47678 0.180207 0.435722 -0.3512196 0.0019948 0.000327 -0.000764 0.000796 0.000850 0.0000281 0.0000442 0.000360 0.000571 1989 6 2 47679 0.182061 0.434638 -0.3530386 0.0016321 0.000225 -0.000785 0.000360 0.000382 0.0000127 0.0000196 0.000170 0.000266 1989 6 3 47680 0.184538 0.433452 -0.3544933 0.0012860 0.000021 -0.000451 0.000327 0.000316 0.0000111 0.0000126 0.000152 0.000164 1989 6 4 47681 0.186432 0.431403 -0.3556450 0.0010369 -0.000179 -0.000058 0.000391 0.000330 0.0000124 0.0000143 0.000180 0.000139 1989 6 5 47682 0.187083 0.428614 -0.3566128 0.0009187 -0.000267 0.000031 0.000476 0.000437 0.0000175 0.0000148 0.000222 0.000215 1989 6 6 47683 0.188386 0.426910 -0.3575236 0.0009289 -0.000143 -0.000210 0.000495 0.000500 0.0000172 0.0000151 0.000211 0.000275 1989 6 7 47684 0.190138 0.425857 -0.3584962 0.0010428 0.000034 -0.000534 0.000520 0.000527 0.0000127 0.0000176 0.000162 0.000219 1989 6 8 47685 0.190730 0.423673 -0.3596170 0.0012121 0.000041 -0.000648 0.000794 0.000666 0.0000180 0.0000285 0.000210 0.000274 1989 6 9 47686 0.191504 0.421157 -0.3609147 0.0013805 0.000059 -0.000525 0.001291 0.000692 0.0000443 0.0000145 0.000325 0.000382 1989 6 10 47687 0.194345 0.419555 -0.3623646 0.0015050 0.000204 -0.000311 0.000296 0.000269 0.0000110 0.0000268 0.000178 0.000244 1989 6 11 47688 0.197800 0.418213 -0.3639074 0.0015622 0.000254 -0.000142 0.000246 0.000232 0.0000093 0.0000106 0.000147 0.000217 1989 6 12 47689 0.200271 0.416209 -0.3654698 0.0015478 0.000043 -0.000093 0.000261 0.000265 0.0000101 0.0000100 0.000134 0.000231 1989 6 13 47690 0.202797 0.413978 -0.3669836 0.0014689 -0.000212 -0.000137 0.000360 0.000391 0.0000107 0.0000104 0.000127 0.000240 1989 6 14 47691 0.205339 0.411943 -0.3683904 0.0013361 -0.000301 -0.000223 0.001104 0.001320 0.0000108 0.0000112 0.000126 0.000242 1989 6 15 47692 0.206969 0.409916 -0.3696437 0.0011624 -0.000196 -0.000318 0.001883 0.002176 0.0000118 0.0000113 0.000189 0.000317 1989 6 16 47693 0.208095 0.407537 -0.3707103 0.0009643 -0.000016 -0.000414 0.000912 0.000868 0.0000119 0.0000118 0.000199 0.000327 1989 6 17 47694 0.209598 0.404694 -0.3715760 0.0007677 0.000056 -0.000523 0.000638 0.000637 0.0000119 0.0000119 0.000199 0.000327 1989 6 18 47695 0.211597 0.401947 -0.3722592 0.0006122 -0.000096 -0.000649 0.000528 0.000536 0.0000119 0.0000119 0.000199 0.000327 1989 6 19 47696 0.213482 0.399543 -0.3728242 0.0005427 -0.000410 -0.000747 0.001293 0.001321 0.0000119 0.0000125 0.000199 0.000327 1989 6 20 47697 0.214907 0.397015 -0.3733763 0.0005902 -0.000683 -0.000740 0.003814 0.003799 0.0000132 0.0000126 0.000271 0.000379 1989 6 21 47698 0.216221 0.394144 -0.3740382 0.0007568 -0.000709 -0.000580 0.000740 0.000710 0.0000134 0.0000137 0.000280 0.000376 1989 6 22 47699 0.218339 0.391508 -0.3749162 0.0010108 -0.000428 -0.000306 0.000461 0.000448 0.0000142 0.0000154 0.000274 0.000332 1989 6 23 47700 0.221565 0.389581 -0.3760698 0.0012911 -0.000004 -0.000063 0.000518 0.000521 0.0000174 0.0000179 0.000256 0.000257 1989 6 24 47701 0.224610 0.387778 -0.3774875 0.0015194 0.000203 -0.000089 0.000579 0.000607 0.0000216 0.0000195 0.000246 0.000228 1989 6 25 47702 0.226649 0.385181 -0.3790784 0.0016240 0.000043 -0.000332 0.001051 0.001066 0.0000216 0.0000187 0.000252 0.000234 1989 6 26 47703 0.227909 0.381705 -0.3806929 0.0015712 -0.000306 -0.000475 0.001431 0.001079 0.0000159 0.0000191 0.000352 0.000506 1989 6 27 47704 0.228866 0.378409 -0.3821755 0.0013848 -0.000536 -0.000246 0.001075 0.000754 0.0000166 0.0000180 0.000313 0.000511 1989 6 28 47705 0.229300 0.377443 -0.3834250 0.0011367 -0.000454 0.000324 0.001146 0.000949 0.0000201 0.0000206 0.000241 0.000518 1989 6 29 47706 0.232198 0.374832 -0.3844282 0.0008827 -0.000166 0.000721 0.001833 0.002244 0.0000246 0.0000205 0.000212 0.000524 1989 6 30 47707 0.236371 0.370671 -0.3851924 0.0006335 0.000105 0.000659 0.002770 0.002967 0.0000208 0.0000175 0.000207 0.000469 1989 7 1 47708 0.238752 0.367153 -0.3857196 0.0004065 0.000206 0.000319 0.001023 0.000863 0.0000103 0.0000159 0.000204 0.000281 1989 7 2 47709 0.238770 0.364497 -0.3860452 0.0002550 0.000106 0.000044 0.000688 0.000566 0.0000110 0.0000126 0.000213 0.000280 1989 7 3 47710 0.238356 0.362593 -0.3862723 0.0002488 -0.000107 0.000050 0.000763 0.000657 0.0000148 0.0000169 0.000261 0.000279 1989 7 4 47711 0.239662 0.359789 -0.3865760 0.0003986 -0.000285 0.000110 0.001368 0.001326 0.0000228 0.0000215 0.000322 0.000279 1989 7 5 47712 0.242388 0.356042 -0.3870857 0.0006277 -0.000344 0.000024 0.001324 0.001053 0.0000282 0.0000210 0.000324 0.000354 1989 7 6 47713 0.244658 0.352908 -0.3878303 0.0008511 -0.000299 -0.000153 0.000690 0.000648 0.0000191 0.0000204 0.000319 0.000409 1989 7 7 47714 0.245825 0.350029 -0.3887746 0.0010275 -0.000215 -0.000266 0.000494 0.000486 0.0000125 0.0000170 0.000333 0.000511 1989 7 8 47715 0.246194 0.347317 -0.3898656 0.0011384 -0.000144 -0.000269 0.000540 0.000536 0.0000149 0.0000116 0.000353 0.000323 1989 7 9 47716 0.248634 0.344565 -0.3910298 0.0011713 -0.000179 -0.000112 0.000401 0.000403 0.0000108 0.0000104 0.000207 0.000164 1989 7 10 47717 0.249999 0.341361 -0.3921874 0.0011318 -0.000399 0.000249 0.000306 0.000269 0.0000060 0.0000083 0.000158 0.000147 1989 7 11 47718 0.250761 0.338555 -0.3932753 0.0010399 -0.000372 0.000230 0.000413 0.000341 0.0000057 0.0000093 0.000165 0.000167 1989 7 12 47719 0.252448 0.335651 -0.3942542 0.0009208 -0.000121 -0.000177 0.000675 0.000482 0.0000126 0.0000118 0.000297 0.000266 1989 7 13 47720 0.253660 0.332606 -0.3951111 0.0008022 -0.000087 -0.000399 0.000677 0.000460 0.0000179 0.0000227 0.000327 0.000291 1989 7 14 47721 0.253768 0.329604 -0.3958611 0.0007094 -0.000312 -0.000314 0.000798 0.000558 0.0000327 0.0000227 0.000345 0.000315 1989 7 15 47722 0.253923 0.326408 -0.3965412 0.0006577 -0.000490 -0.000158 0.000731 0.000586 0.0000275 0.0000265 0.000409 0.000356 1989 7 16 47723 0.255408 0.323414 -0.3971972 0.0006514 -0.000284 -0.000031 0.000655 0.000590 0.0000203 0.0000205 0.000345 0.000463 1989 7 17 47724 0.257325 0.321223 -0.3978736 0.0006920 0.000224 0.000041 0.000418 0.000430 0.0000136 0.0000149 0.000233 0.000419 1989 7 18 47725 0.258319 0.318938 -0.3986163 0.0007996 0.000259 -0.000064 0.000351 0.000396 0.0000096 0.0000102 0.000208 0.000310 1989 7 19 47726 0.258571 0.316182 -0.3995053 0.0009996 -0.000088 -0.000263 0.000377 0.000510 0.0000069 0.0000082 0.000212 0.000227 1989 7 20 47727 0.258894 0.313372 -0.4006340 0.0012732 -0.000146 -0.000351 0.000496 0.000686 0.0000068 0.0000084 0.000212 0.000223 1989 7 21 47728 0.258910 0.310405 -0.4020470 0.0015504 0.000136 -0.000286 0.000438 0.000440 0.0000099 0.0000092 0.000209 0.000177 1989 7 22 47729 0.259205 0.307086 -0.4037050 0.0017459 0.000310 -0.000177 0.000313 0.000295 0.0000116 0.0000122 0.000210 0.000171 1989 7 23 47730 0.260039 0.303587 -0.4054914 0.0018018 0.000034 -0.000143 0.000391 0.000367 0.0000144 0.0000238 0.000245 0.000206 1989 7 24 47731 0.260032 0.300528 -0.4072574 0.0017084 -0.000349 -0.000163 0.001167 0.001099 0.0000361 0.0000198 0.000357 0.000422 1989 7 25 47732 0.258553 0.297939 -0.4088674 0.0014947 -0.000333 -0.000143 0.000949 0.000815 0.0000252 0.0000264 0.000290 0.000561 1989 7 26 47733 0.257982 0.294570 -0.4102258 0.0012116 -0.000118 -0.000080 0.000718 0.000583 0.0000167 0.0000179 0.000218 0.000361 1989 7 27 47734 0.258847 0.290574 -0.4112920 0.0009165 -0.000074 -0.000008 0.000433 0.000441 0.0000105 0.0000149 0.000182 0.000187 1989 7 28 47735 0.258692 0.286593 -0.4120801 0.0006719 -0.000162 0.000111 0.000398 0.000480 0.0000130 0.0000118 0.000204 0.000196 1989 7 29 47736 0.258740 0.283386 -0.4126707 0.0005232 -0.000087 0.000227 0.000338 0.000375 0.0000131 0.0000111 0.000154 0.000194 1989 7 30 47737 0.259727 0.280520 -0.4131662 0.0004834 0.000108 0.000277 0.000283 0.000275 0.0000092 0.0000133 0.000111 0.000161 1989 7 31 47738 0.260172 0.277155 -0.4136725 0.0005557 0.000140 0.000258 0.000418 0.000404 0.0000136 0.0000122 0.000173 0.000238 1989 8 1 47739 0.259354 0.273956 -0.4143002 0.0007192 -0.000058 0.000196 0.000466 0.000441 0.0000152 0.0000141 0.000290 0.000264 1989 8 2 47740 0.257850 0.271474 -0.4151172 0.0009156 -0.000295 0.000135 0.000508 0.000460 0.0000146 0.0000167 0.000249 0.000258 1989 8 3 47741 0.257613 0.269006 -0.4161226 0.0010794 -0.000197 0.000128 0.000697 0.000572 0.0000181 0.0000169 0.000273 0.000242 1989 8 4 47742 0.257752 0.265694 -0.4172569 0.0011746 0.000123 0.000107 0.000735 0.000540 0.0000191 0.0000154 0.000320 0.000235 1989 8 5 47743 0.258881 0.262833 -0.4184482 0.0012045 0.000309 0.000060 0.000454 0.000347 0.0000126 0.0000138 0.000196 0.000218 1989 8 6 47744 0.258951 0.258599 -0.4196424 0.0011907 0.000009 -0.000182 0.000302 0.000219 0.0000086 0.0000108 0.000159 0.000160 1989 8 7 47745 0.259217 0.255314 -0.4208090 0.0011322 -0.000115 -0.000156 0.000417 0.000301 0.0000090 0.0000132 0.000168 0.000174 1989 8 8 47746 0.259625 0.253225 -0.4218917 0.0010170 0.000161 0.000089 0.000839 0.000761 0.0000179 0.0000141 0.000211 0.000531 1989 8 9 47747 0.258899 0.250529 -0.4228354 0.0008816 0.000403 0.000110 0.000681 0.000769 0.0000192 0.0000181 0.000202 0.000516 1989 8 10 47748 0.257445 0.247683 -0.4236558 0.0007748 0.000322 0.000039 0.000557 0.000624 0.0000183 0.0000175 0.000192 0.000327 1989 8 11 47749 0.259031 0.243647 -0.4243946 0.0006911 0.000074 -0.000013 0.000386 0.000448 0.0000158 0.0000165 0.000204 0.000381 1989 8 12 47750 0.260365 0.240254 -0.4250559 0.0006303 -0.000097 -0.000206 0.000473 0.000562 0.0000148 0.0000152 0.000216 0.000507 1989 8 13 47751 0.260099 0.237925 -0.4256811 0.0006324 -0.000046 -0.000562 0.001225 0.001322 0.0000147 0.0000124 0.000218 0.000544 1989 8 14 47752 0.259799 0.235625 -0.4263533 0.0007236 0.000196 -0.000923 0.001362 0.001344 0.0000099 0.0000122 0.000193 0.000256 1989 8 15 47753 0.259646 0.232924 -0.4271633 0.0009057 0.000452 -0.001067 0.000358 0.000394 0.0000097 0.0000098 0.000192 0.000250 1989 8 16 47754 0.258943 0.229913 -0.4281925 0.0011698 0.000529 -0.000831 0.000355 0.000392 0.0000097 0.0000103 0.000192 0.000250 1989 8 17 47755 0.257187 0.226893 -0.4295113 0.0014954 0.000360 -0.000251 0.000406 0.000442 0.0000110 0.0000148 0.000207 0.000247 1989 8 18 47756 0.255115 0.223829 -0.4311637 0.0018242 0.000062 0.000387 0.000933 0.001560 0.0000198 0.0000162 0.000273 0.000240 1989 8 19 47757 0.253845 0.220462 -0.4331138 0.0020487 -0.000162 0.000748 0.001091 0.002882 0.0000214 0.0000184 0.000281 0.000241 1989 8 20 47758 0.253356 0.216826 -0.4352017 0.0020653 -0.000184 0.000736 0.000796 0.000814 0.0000169 0.0000189 0.000374 0.000336 1989 8 21 47759 0.252792 0.213232 -0.4371910 0.0018549 -0.000048 0.000497 0.000825 0.000766 0.0000163 0.0000176 0.000413 0.000380 1989 8 22 47760 0.251790 0.209915 -0.4388801 0.0015026 0.000074 0.000263 0.001111 0.000938 0.0000183 0.0000218 0.000459 0.000440 1989 8 23 47761 0.251147 0.206489 -0.4401933 0.0011392 -0.000112 0.000161 0.001327 0.001085 0.0000274 0.0000244 0.000629 0.000832 1989 8 24 47762 0.250945 0.203454 -0.4411804 0.0008638 -0.000641 0.000182 0.001202 0.001019 0.0000305 0.0000232 0.000358 0.000583 1989 8 25 47763 0.250690 0.200167 -0.4419573 0.0007112 -0.000840 0.000277 0.000797 0.000789 0.0000189 0.0000205 0.000229 0.000285 1989 8 26 47764 0.250265 0.196202 -0.4426427 0.0006624 -0.000207 0.000333 0.000488 0.000560 0.0000105 0.0000139 0.000204 0.000176 1989 8 27 47765 0.250228 0.193397 -0.4433169 0.0006986 0.000526 0.000157 0.000483 0.000568 0.0000088 0.0000096 0.000193 0.000150 1989 8 28 47766 0.249866 0.191696 -0.4440643 0.0008205 0.000770 -0.000214 0.001355 0.001234 0.0000088 0.0000094 0.000170 0.000156 1989 8 29 47767 0.248231 0.189455 -0.4449691 0.0010084 0.000560 -0.000512 0.000730 0.000552 0.0000100 0.0000096 0.000119 0.000250 1989 8 30 47768 0.246401 0.186490 -0.4460785 0.0012114 0.000254 -0.000464 0.000445 0.000340 0.0000104 0.0000111 0.000128 0.000250 1989 8 31 47769 0.245446 0.183651 -0.4473775 0.0013634 0.000188 -0.000018 0.000504 0.000402 0.0000121 0.0000143 0.000185 0.000250 1989 9 1 47770 0.243332 0.180924 -0.4487834 0.0014441 0.000275 0.000532 0.000774 0.000669 0.0000183 0.0000257 0.000300 0.000264 1989 9 2 47771 0.240757 0.177498 -0.4502410 0.0014721 0.000306 0.000820 0.001702 0.002018 0.0000393 0.0000586 0.000418 0.000359 1989 9 3 47772 0.238710 0.174007 -0.4517044 0.0014333 0.000161 0.000685 0.002704 0.003847 0.0000988 0.0000278 0.001201 0.001057 1989 9 4 47773 0.236902 0.171095 -0.4530894 0.0012988 -0.000104 0.000276 0.000857 0.000583 0.0000163 0.0000550 0.000578 0.000516 1989 9 5 47774 0.235274 0.167646 -0.4542913 0.0010813 -0.000286 -0.000048 0.000715 0.000472 0.0000112 0.0000137 0.000401 0.000357 1989 9 6 47775 0.233545 0.163309 -0.4552502 0.0008525 -0.000234 -0.000043 0.001012 0.000621 0.0000112 0.0000137 0.000397 0.000354 1989 9 7 47776 0.231117 0.160358 -0.4560038 0.0006974 -0.000048 0.000152 0.001941 0.001000 0.0000163 0.0000148 0.000311 0.000287 1989 9 8 47777 0.228325 0.158692 -0.4566610 0.0006510 0.000065 0.000211 0.002173 0.001581 0.0000185 0.0000146 0.000299 0.000275 1989 9 9 47778 0.225909 0.156454 -0.4573289 0.0006828 0.000024 0.000000 0.000907 0.000783 0.0000130 0.0000131 0.000286 0.000231 1989 9 10 47779 0.223845 0.153532 -0.4580559 0.0007523 0.000085 -0.000138 0.000474 0.000407 0.0000077 0.0000095 0.000251 0.000177 1989 9 11 47780 0.221616 0.151010 -0.4588666 0.0008733 0.000465 0.000171 0.000390 0.000322 0.0000059 0.0000074 0.000226 0.000185 1989 9 12 47781 0.219252 0.148521 -0.4598341 0.0010887 0.000740 0.000588 0.000504 0.000407 0.0000070 0.0000160 0.000284 0.000256 1989 9 13 47782 0.216648 0.146077 -0.4610639 0.0014049 0.000610 0.000715 0.001448 0.001031 0.0000260 0.0000264 0.001034 0.000953 1989 9 14 47783 0.213799 0.143835 -0.4626409 0.0017691 0.000216 0.000510 0.001434 0.001376 0.0000457 0.0000230 0.000960 0.000797 1989 9 15 47784 0.211226 0.141563 -0.4645700 0.0020745 -0.000122 0.000164 0.000658 0.000677 0.0000199 0.0000295 0.000414 0.000343 1989 9 16 47785 0.209386 0.139392 -0.4667336 0.0022014 -0.000138 -0.000055 0.000477 0.000458 0.0000132 0.0000149 0.000257 0.000242 1989 9 17 47786 0.207478 0.137532 -0.4689094 0.0020993 0.000078 0.000019 0.000372 0.000347 0.0000098 0.0000123 0.000182 0.000179 1989 9 18 47787 0.204642 0.135732 -0.4708834 0.0018403 0.000242 0.000284 0.000412 0.000403 0.0000115 0.0000109 0.000200 0.000178 1989 9 19 47788 0.201661 0.132998 -0.4725718 0.0015384 0.000233 0.000210 0.000447 0.000439 0.0000119 0.0000109 0.000199 0.000179 1989 9 20 47789 0.199175 0.130092 -0.4739751 0.0012668 0.000144 0.000001 0.000466 0.000415 0.0000103 0.0000126 0.000174 0.000187 1989 9 21 47790 0.196951 0.128304 -0.4751433 0.0010770 0.000116 0.000223 0.000553 0.000484 0.0000133 0.0000145 0.000204 0.000208 1989 9 22 47791 0.194609 0.126349 -0.4761743 0.0010006 0.000082 0.000516 0.000676 0.000584 0.0000186 0.0000147 0.000240 0.000226 1989 9 23 47792 0.191797 0.123676 -0.4771835 0.0010376 0.000011 0.000516 0.001487 0.001422 0.0000161 0.0000132 0.000231 0.000234 1989 9 24 47793 0.188438 0.121163 -0.4782756 0.0011653 -0.000019 0.000283 0.000562 0.000619 0.0000078 0.0000120 0.000154 0.000268 1989 9 25 47794 0.184957 0.119134 -0.4795267 0.0013490 0.000057 0.000045 0.000270 0.000297 0.0000078 0.0000081 0.000153 0.000268 1989 9 26 47795 0.181829 0.116806 -0.4809742 0.0015481 0.000222 0.000005 0.000259 0.000217 0.0000084 0.0000094 0.000140 0.000268 1989 9 27 47796 0.178383 0.114374 -0.4826133 0.0017223 0.000299 0.000079 0.000321 0.000174 0.0000111 0.0000125 0.000128 0.000288 1989 9 28 47797 0.174176 0.112386 -0.4844014 0.0018393 0.000158 0.000085 0.000502 0.000266 0.0000166 0.0000133 0.000183 0.000381 1989 9 29 47798 0.170822 0.110114 -0.4862695 0.0018761 0.000018 0.000133 0.000857 0.000618 0.0000155 0.0000127 0.000224 0.000288 1989 9 30 47799 0.169091 0.106936 -0.4881302 0.0018243 0.000049 0.000356 0.000501 0.000436 0.0000088 0.0000120 0.000145 0.000168 1989 10 1 47800 0.167373 0.103892 -0.4898980 0.0016992 0.000229 0.000741 0.000401 0.000352 0.0000085 0.0000086 0.000142 0.000164 1989 10 2 47801 0.164231 0.102235 -0.4915149 0.0015349 0.000462 0.001128 0.000612 0.000514 0.0000085 0.0000078 0.000142 0.000164 1989 10 3 47802 0.159919 0.101992 -0.4929626 0.0013704 0.000617 0.001277 0.002600 0.001212 0.0000071 0.0000078 0.000137 0.000171 1989 10 4 47803 0.155656 0.102066 -0.4942601 0.0012382 0.000586 0.001026 0.000600 0.000565 0.0000071 0.0000073 0.000138 0.000172 1989 10 5 47804 0.152381 0.100972 -0.4954525 0.0011578 0.000356 0.000432 0.000310 0.000312 0.0000076 0.0000091 0.000148 0.000179 1989 10 6 47805 0.149837 0.098354 -0.4965971 0.0011363 0.000038 -0.000203 0.000432 0.000436 0.0000110 0.0000150 0.000216 0.000211 1989 10 7 47806 0.146640 0.096106 -0.4977520 0.0011800 -0.000137 -0.000345 0.000932 0.000892 0.0000225 0.0000097 0.000434 0.000237 1989 10 8 47807 0.142437 0.095130 -0.4989873 0.0013031 -0.000095 0.000009 0.000269 0.000228 0.0000083 0.0000149 0.000125 0.000092 1989 10 9 47808 0.138328 0.094291 -0.5003884 0.0015159 0.000036 0.000325 0.000240 0.000211 0.0000073 0.0000078 0.000115 0.000087 1989 10 10 47809 0.135207 0.092704 -0.5020433 0.0018077 0.000106 0.000205 0.000250 0.000245 0.0000072 0.0000081 0.000134 0.000111 1989 10 11 47810 0.132515 0.091608 -0.5040133 0.0021400 0.000160 0.000003 0.000346 0.000351 0.0000088 0.0000100 0.000213 0.000189 1989 10 12 47811 0.128736 0.091071 -0.5063091 0.0024390 0.000113 -0.000104 0.000536 0.000446 0.0000127 0.0000145 0.000292 0.000224 1989 10 13 47812 0.124581 0.090324 -0.5088503 0.0026123 -0.000094 -0.000132 0.000693 0.000592 0.0000203 0.0000152 0.000311 0.000265 1989 10 14 47813 0.120773 0.089159 -0.5114742 0.0026040 -0.000314 -0.000110 0.000691 0.000680 0.0000177 0.0000145 0.000278 0.000374 1989 10 15 47814 0.116253 0.087879 -0.5139991 0.0024305 -0.000359 -0.000069 0.000379 0.000352 0.0000088 0.0000123 0.000158 0.000170 1989 10 16 47815 0.110592 0.086765 -0.5162976 0.0021745 -0.000177 -0.000020 0.000254 0.000259 0.0000070 0.0000071 0.000120 0.000097 1989 10 17 47816 0.106757 0.085450 -0.5183452 0.0019282 0.000002 0.000034 0.000190 0.000199 0.0000055 0.0000061 0.000095 0.000070 1989 10 18 47817 0.103366 0.084778 -0.5201838 0.0017545 0.000144 -0.000030 0.000175 0.000185 0.0000053 0.0000057 0.000099 0.000066 1989 10 19 47818 0.100332 0.083605 -0.5219020 0.0016896 0.000135 0.000007 0.000202 0.000230 0.0000059 0.0000067 0.000111 0.000077 1989 10 20 47819 0.096889 0.082994 -0.5236102 0.0017347 0.000097 0.000096 0.000340 0.000400 0.0000081 0.0000091 0.000152 0.000121 1989 10 21 47820 0.092663 0.081939 -0.5254046 0.0018646 0.000096 0.000163 0.000629 0.000714 0.0000122 0.0000078 0.000228 0.000242 1989 10 22 47821 0.088112 0.080257 -0.5273548 0.0020439 0.000103 0.000173 0.000325 0.000359 0.0000075 0.0000094 0.000129 0.000173 1989 10 23 47822 0.083895 0.079021 -0.5294932 0.0022295 0.000092 0.000120 0.000276 0.000285 0.0000067 0.0000086 0.000124 0.000160 1989 10 24 47823 0.080737 0.078468 -0.5318050 0.0023685 0.000029 0.000081 0.000407 0.000360 0.0000097 0.0000079 0.000160 0.000179 1989 10 25 47824 0.077720 0.077658 -0.5342155 0.0024193 -0.000043 0.000171 0.000354 0.000291 0.0000091 0.0000084 0.000121 0.000133 1989 10 26 47825 0.074702 0.077548 -0.5366248 0.0023909 -0.000001 0.000315 0.000240 0.000246 0.0000072 0.0000078 0.000095 0.000096 1989 10 27 47826 0.070825 0.076953 -0.5389764 0.0023307 -0.000005 0.000295 0.000203 0.000243 0.0000065 0.0000064 0.000093 0.000081 1989 10 28 47827 0.067720 0.076601 -0.5412662 0.0022558 -0.000009 0.000175 0.000175 0.000219 0.0000056 0.0000060 0.000098 0.000075 1989 10 29 47828 0.064450 0.076560 -0.5434724 0.0021423 0.000050 0.000172 0.000154 0.000191 0.0000054 0.0000061 0.000103 0.000082 1989 10 30 47829 0.060263 0.076480 -0.5455426 0.0019915 0.000072 0.000243 0.000196 0.000208 0.0000066 0.0000055 0.000110 0.000109 1989 10 31 47830 0.056390 0.075957 -0.5474563 0.0018375 0.000062 0.000208 0.000191 0.000183 0.0000056 0.0000063 0.000076 0.000090 1989 11 1 47831 0.052784 0.075259 -0.5492279 0.0017025 0.000021 0.000052 0.000209 0.000185 0.0000061 0.0000081 0.000078 0.000087 1989 11 2 47832 0.049700 0.075006 -0.5508803 0.0016008 0.000068 0.000000 0.000377 0.000292 0.0000105 0.0000100 0.000129 0.000138 1989 11 3 47833 0.046922 0.074776 -0.5524549 0.0015588 0.000224 0.000157 0.000583 0.000576 0.0000139 0.0000089 0.000226 0.000292 1989 11 4 47834 0.043175 0.074376 -0.5540266 0.0016048 0.000314 0.000368 0.000367 0.000390 0.0000072 0.0000103 0.000134 0.000182 1989 11 5 47835 0.038825 0.074496 -0.5556926 0.0017436 0.000160 0.000355 0.000431 0.000428 0.0000067 0.0000094 0.000112 0.000158 1989 11 6 47836 0.034718 0.074897 -0.5575368 0.0019596 -0.000059 0.000147 0.000624 0.000461 0.0000116 0.0000131 0.000131 0.000200 1989 11 7 47837 0.031045 0.074963 -0.5596243 0.0022371 -0.000060 0.000006 0.000745 0.000621 0.0000196 0.0000131 0.000227 0.000298 1989 11 8 47838 0.025446 0.074965 -0.5620068 0.0025377 0.000075 0.000068 0.000573 0.000525 0.0000145 0.0000136 0.000308 0.000249 1989 11 9 47839 0.020978 0.074513 -0.5646743 0.0027795 0.000159 0.000185 0.000327 0.000317 0.0000076 0.0000116 0.000152 0.000169 1989 11 10 47840 0.017786 0.074620 -0.5675204 0.0028550 0.000050 0.000043 0.000399 0.000415 0.0000086 0.0000108 0.000164 0.000189 1989 11 11 47841 0.014680 0.074815 -0.5703292 0.0027207 -0.000002 -0.000051 0.000734 0.000849 0.0000141 0.0000143 0.000247 0.000259 1989 11 12 47842 0.010957 0.075049 -0.5729147 0.0024488 0.000066 0.000040 0.000864 0.001048 0.0000201 0.0000156 0.000407 0.000358 1989 11 13 47843 0.005736 0.075250 -0.5752052 0.0021471 0.000066 0.000114 0.000770 0.000732 0.0000170 0.0000150 0.000356 0.000403 1989 11 14 47844 0.001654 0.075494 -0.5772212 0.0018944 -0.000011 0.000327 0.000509 0.000422 0.0000099 0.0000127 0.000198 0.000300 1989 11 15 47845 -0.001021 0.076045 -0.5790343 0.0017432 0.000121 0.000492 0.000439 0.000363 0.0000084 0.0000146 0.000166 0.000256 1989 11 16 47846 -0.003958 0.077087 -0.5807588 0.0017219 0.000460 0.000412 0.000611 0.000667 0.0000194 0.0000265 0.000349 0.000309 1989 11 17 47847 -0.008126 0.078411 -0.5825211 0.0018197 0.000693 0.000193 0.000664 0.000784 0.0000447 0.0000179 0.000561 0.000371 1989 11 18 47848 -0.012732 0.079337 -0.5844219 0.0019971 0.000574 0.000064 0.000553 0.000558 0.0000165 0.0000265 0.000271 0.000332 1989 11 19 47849 -0.015582 0.079157 -0.5865186 0.0021998 0.000238 0.000196 0.000371 0.000339 0.0000083 0.0000126 0.000150 0.000181 1989 11 20 47850 -0.020027 0.080766 -0.5888111 0.0023748 -0.000050 0.000459 0.000395 0.000351 0.0000087 0.0000100 0.000179 0.000172 1989 11 21 47851 -0.024013 0.082152 -0.5912514 0.0024930 -0.000188 0.000568 0.000484 0.000438 0.0000117 0.0000119 0.000316 0.000208 1989 11 22 47852 -0.026344 0.082534 -0.5937782 0.0025515 -0.000150 0.000437 0.000497 0.000526 0.0000151 0.0000110 0.000355 0.000307 1989 11 23 47853 -0.029201 0.083794 -0.5963351 0.0025556 0.000022 0.000198 0.000346 0.000367 0.0000104 0.0000109 0.000189 0.000228 1989 11 24 47854 -0.033151 0.085883 -0.5988709 0.0025047 0.000176 0.000035 0.000227 0.000231 0.0000067 0.0000083 0.000112 0.000152 1989 11 25 47855 -0.037129 0.087552 -0.6013291 0.0023927 0.000193 0.000056 0.000213 0.000127 0.0000062 0.0000063 0.000096 0.000125 1989 11 26 47856 -0.040870 0.089246 -0.6036468 0.0022266 0.000172 0.000207 0.000210 0.000089 0.0000060 0.0000071 0.000087 0.000107 1989 11 27 47857 -0.044935 0.091763 -0.6057810 0.0020415 0.000253 0.000348 0.000292 0.000133 0.0000081 0.0000083 0.000131 0.000150 1989 11 28 47858 -0.049310 0.093611 -0.6077375 0.0018861 0.000307 0.000407 0.000405 0.000300 0.0000106 0.0000084 0.000256 0.000242 1989 11 29 47859 -0.053539 0.094232 -0.6095695 0.0017939 0.000309 0.000311 0.000336 0.000330 0.0000088 0.0000096 0.000200 0.000254 1989 11 30 47860 -0.057223 0.094580 -0.6113489 0.0017704 0.000354 0.000029 0.000354 0.000347 0.0000087 0.0000087 0.000196 0.000253 1989 12 1 47861 -0.060415 0.095225 -0.6131383 0.0018062 0.000466 -0.000328 0.001267 0.001233 0.0000087 0.0000086 0.000196 0.000253 1989 12 2 47862 -0.063422 0.096037 -0.6149892 0.0018951 0.000575 -0.000554 0.002496 0.002435 0.0000084 0.0000086 0.000145 0.000177 1989 12 3 47863 -0.066250 0.096884 -0.6169508 0.0020338 0.000572 -0.000458 0.000393 0.000428 0.0000084 0.0000086 0.000144 0.000175 1989 12 4 47864 -0.068569 0.098003 -0.6190684 0.0022093 0.000391 0.000020 0.000336 0.000361 0.0000088 0.0000097 0.000152 0.000182 1989 12 5 47865 -0.070295 0.099630 -0.6213660 0.0023905 0.000073 0.000748 0.000445 0.000429 0.0000109 0.0000111 0.000202 0.000225 1989 12 6 47866 -0.071974 0.101594 -0.6238294 0.0025324 -0.000223 0.001416 0.000626 0.000508 0.0000133 0.0000124 0.000283 0.000277 1989 12 7 47867 -0.073925 0.103721 -0.6263955 0.0025864 -0.000354 0.001772 0.001823 0.001434 0.0000138 0.0000136 0.000307 0.000289 1989 12 8 47868 -0.075982 0.106001 -0.6289572 0.0025171 -0.000281 0.001746 0.005952 0.003880 0.0000139 0.0000119 0.000309 0.000290 1989 12 9 47869 -0.077985 0.108436 -0.6313857 0.0023213 -0.000062 0.001423 0.005998 0.003951 0.0000099 0.0000084 0.000237 0.000232 1989 12 10 47870 -0.080192 0.110910 -0.6335707 0.0020415 0.000189 0.000968 0.002121 0.004180 0.0000030 0.0000064 0.000077 0.000080 1989 12 11 47871 -0.082993 0.113248 -0.6354660 0.0017577 0.000354 0.000538 0.000923 0.001465 0.0000030 0.0000030 0.000077 0.000080 1989 12 12 47872 -0.086423 0.115341 -0.6371123 0.0015532 0.000375 0.000235 0.000254 0.000383 0.0000030 0.0000031 0.000077 0.000080 1989 12 13 47873 -0.089866 0.117275 -0.6386182 0.0014743 0.000280 0.000088 0.000154 0.000230 0.0000032 0.0000038 0.000081 0.000083 1989 12 14 47874 -0.092683 0.119341 -0.6401092 0.0015146 0.000190 0.000046 0.000179 0.000256 0.0000046 0.0000049 0.000100 0.000100 1989 12 15 47875 -0.095163 0.121898 -0.6416817 0.0016360 0.000271 0.000005 0.000208 0.000289 0.0000067 0.0000062 0.000117 0.000113 1989 12 16 47876 -0.097507 0.124958 -0.6433933 0.0017968 0.000488 -0.000057 0.000661 0.000854 0.0000078 0.0000094 0.000127 0.000126 1989 12 17 47877 -0.099576 0.128114 -0.6452672 0.0019616 0.000644 -0.000089 0.000655 0.000607 0.0000122 0.0000078 0.000165 0.000226 1989 12 18 47878 -0.101334 0.130804 -0.6472964 0.0021008 0.000577 -0.000044 0.000261 0.000209 0.0000078 0.0000085 0.000109 0.000153 1989 12 19 47879 -0.103141 0.132810 -0.6494453 0.0021881 0.000325 0.000040 0.000158 0.000115 0.0000047 0.0000060 0.000068 0.000096 1989 12 20 47880 -0.105501 0.134869 -0.6516504 0.0021996 0.000234 -0.000016 0.000160 0.000104 0.0000043 0.0000047 0.000066 0.000093 1989 12 21 47881 -0.107871 0.137456 -0.6538252 0.0021319 0.000206 -0.000105 0.000190 0.000114 0.0000047 0.0000071 0.000078 0.000106 1989 12 22 47882 -0.109779 0.140082 -0.6558987 0.0020065 0.000181 -0.000176 0.000306 0.000237 0.0000100 0.0000071 0.000197 0.000176 1989 12 23 47883 -0.111537 0.142050 -0.6578283 0.0018450 0.000248 -0.000276 0.000315 0.000284 0.0000095 0.0000092 0.000176 0.000153 1989 12 24 47884 -0.113807 0.143632 -0.6595865 0.0016638 0.000291 -0.000272 0.000307 0.000300 0.0000083 0.0000088 0.000145 0.000132 1989 12 25 47885 -0.116819 0.145586 -0.6611623 0.0014861 0.000170 -0.000032 0.000383 0.000382 0.0000081 0.0000119 0.000140 0.000129 1989 12 26 47886 -0.120110 0.148132 -0.6625735 0.0013418 -0.000045 0.000343 0.002717 0.004406 0.0000155 0.0000148 0.000250 0.000281 1989 12 27 47887 -0.123079 0.150996 -0.6638681 0.0012588 -0.000182 0.000631 0.001423 0.001759 0.0000215 0.0000154 0.000337 0.000555 1989 12 28 47888 -0.125653 0.153704 -0.6651187 0.0012557 -0.000089 0.000620 0.000587 0.000610 0.0000154 0.0000156 0.000310 0.000344 1989 12 29 47889 -0.128197 0.155982 -0.6664088 0.0013384 0.000242 0.000231 0.000356 0.000345 0.0000096 0.0000118 0.000255 0.000200 1989 12 30 47890 -0.130560 0.158018 -0.6678206 0.0014991 0.000629 -0.000407 0.000307 0.000294 0.0000082 0.0000088 0.000233 0.000169 1989 12 31 47891 -0.132455 0.160134 -0.6694208 0.0017152 0.000874 -0.001013 0.000553 0.000531 0.0000081 0.0000076 0.000230 0.000165 1990 1 1 47892 -0.133835 0.162671 0.3287520 0.0019497 0.000877 -0.001285 0.002122 0.002187 0.0000071 0.0000076 0.000128 0.000234 1990 1 2 47893 -0.135000 0.165981 0.3267011 0.0021534 0.000651 -0.001044 0.000417 0.000423 0.0000071 0.0000075 0.000128 0.000249 1990 1 3 47894 -0.136457 0.170235 0.3244808 0.0022740 0.000297 -0.000344 0.000228 0.000230 0.0000079 0.0000090 0.000142 0.000267 1990 1 4 47895 -0.138318 0.174875 0.3221953 0.0022715 -0.000032 0.000485 0.000304 0.000304 0.0000108 0.0000125 0.000204 0.000321 1990 1 5 47896 -0.139804 0.178253 0.3199774 0.0021389 -0.000158 0.000914 0.000504 0.000488 0.0000170 0.0000135 0.000389 0.000386 1990 1 6 47897 -0.140950 0.180161 0.3179446 0.0019092 -0.000049 0.000773 0.001318 0.001165 0.0000162 0.0000131 0.000337 0.000318 1990 1 7 47898 -0.142594 0.181797 0.3161662 0.0016392 0.000182 0.000301 0.000894 0.000696 0.0000091 0.0000127 0.000157 0.000190 1990 1 8 47899 -0.145231 0.184134 0.3146497 0.0013928 0.000359 -0.000099 0.000517 0.000392 0.0000091 0.0000090 0.000156 0.000189 1990 1 9 47900 -0.148108 0.186587 0.3133437 0.0012259 0.000355 -0.000166 0.000386 0.000308 0.0000089 0.0000089 0.000132 0.000166 1990 1 10 47901 -0.150386 0.188640 0.3121515 0.0011767 0.000155 -0.000017 0.000313 0.000280 0.0000087 0.0000097 0.000100 0.000130 1990 1 11 47902 -0.152053 0.190715 0.3109493 0.0012563 -0.000099 0.000048 0.000375 0.000353 0.0000104 0.0000096 0.000128 0.000151 1990 1 12 47903 -0.153879 0.193577 0.3096155 0.0014406 -0.000028 -0.000011 0.000449 0.000451 0.0000104 0.0000088 0.000169 0.000166 1990 1 13 47904 -0.156057 0.196856 0.3080671 0.0016701 0.000393 -0.000119 0.000327 0.000325 0.0000071 0.0000087 0.000131 0.000130 1990 1 14 47905 -0.158014 0.199885 0.3062927 0.0018675 0.000754 -0.000239 0.000268 0.000267 0.0000069 0.0000070 0.000127 0.000127 1990 1 15 47906 -0.159531 0.202746 0.3043589 0.0019724 0.000821 -0.000305 0.000404 0.000403 0.0000069 0.0000066 0.000127 0.000127 1990 1 16 47907 -0.160834 0.205530 0.3023757 0.0019677 0.000645 -0.000262 0.002123 0.001922 0.0000063 0.0000066 0.000115 0.000112 1990 1 17 47908 -0.162299 0.208424 0.3004472 0.0018777 0.000416 -0.000117 0.000511 0.000463 0.0000063 0.0000064 0.000114 0.000111 1990 1 18 47909 -0.164074 0.211617 0.2986383 0.0017447 0.000298 0.000050 0.000257 0.000225 0.0000065 0.0000070 0.000115 0.000116 1990 1 19 47910 -0.166211 0.215112 0.2969692 0.0016061 0.000307 0.000121 0.000291 0.000214 0.0000077 0.0000085 0.000116 0.000140 1990 1 20 47911 -0.169173 0.218502 0.2954296 0.0014788 0.000254 -0.000007 0.000401 0.000248 0.0000105 0.0000218 0.000137 0.000196 1990 1 21 47912 -0.172834 0.221731 0.2940062 0.0013651 0.000141 -0.000279 0.001280 0.000740 0.0000359 0.0000126 0.000415 0.000477 1990 1 22 47913 -0.176423 0.224792 0.2926854 0.0012748 0.000149 -0.000498 0.000490 0.000537 0.0000147 0.0000214 0.000237 0.000273 1990 1 23 47914 -0.179521 0.226829 0.2914350 0.0012350 0.000286 -0.000484 0.000260 0.000268 0.0000068 0.0000113 0.000114 0.000131 1990 1 24 47915 -0.181847 0.229111 0.2901881 0.0012793 0.000408 -0.000229 0.000288 0.000310 0.0000079 0.0000118 0.000125 0.000152 1990 1 25 47916 -0.183545 0.232708 0.2888460 0.0014235 0.000361 0.000081 0.000593 0.000594 0.0000168 0.0000247 0.000247 0.000335 1990 1 26 47917 -0.185190 0.236344 0.2873122 0.0016535 0.000270 0.000227 0.001421 0.001225 0.0000416 0.0000145 0.000643 0.000794 1990 1 27 47918 -0.187138 0.239717 0.2855187 0.0019374 0.000322 0.000154 0.000488 0.000449 0.0000123 0.0000236 0.000305 0.000263 1990 1 28 47919 -0.189238 0.243841 0.2834338 0.0022372 0.000494 -0.000036 0.000227 0.000205 0.0000055 0.0000087 0.000153 0.000120 1990 1 29 47920 -0.191675 0.247915 0.2810625 0.0025111 0.000359 -0.000198 0.000196 0.000159 0.0000052 0.0000074 0.000131 0.000115 1990 1 30 47921 -0.193582 0.251103 0.2784492 0.0027123 -0.000006 -0.000262 0.000250 0.000159 0.0000092 0.0000111 0.000151 0.000212 1990 1 31 47922 -0.194210 0.253868 0.2756855 0.0027941 -0.000175 -0.000224 0.000435 0.000275 0.0000169 0.0000134 0.000249 0.000370 1990 2 1 47923 -0.194996 0.257181 0.2729053 0.0027335 -0.000132 -0.000077 0.000587 0.000710 0.0000176 0.0000124 0.000362 0.000370 1990 2 2 47924 -0.197191 0.261346 0.2702475 0.0025507 0.000012 0.000133 0.000303 0.000445 0.0000079 0.0000121 0.000207 0.000208 1990 2 3 47925 -0.199555 0.265763 0.2678112 0.0023074 0.000138 0.000197 0.000384 0.000556 0.0000067 0.0000123 0.000177 0.000181 1990 2 4 47926 -0.200981 0.269773 0.2656179 0.0020850 0.000230 0.000090 0.000992 0.001223 0.0000168 0.0000364 0.000362 0.000429 1990 2 5 47927 -0.201590 0.273138 0.2636088 0.0019529 0.000326 -0.000047 0.002500 0.001273 0.0000661 0.0000160 0.000543 0.000854 1990 2 6 47928 -0.202239 0.276144 0.2616702 0.0019461 0.000382 -0.000108 0.000565 0.000530 0.0000152 0.0000366 0.000290 0.000288 1990 2 7 47929 -0.203626 0.279310 0.2596755 0.0020573 0.000193 -0.000200 0.000273 0.000249 0.0000070 0.0000119 0.000148 0.000138 1990 2 8 47930 -0.205271 0.283325 0.2575260 0.0022433 -0.000229 -0.000378 0.000329 0.000256 0.0000086 0.0000133 0.000168 0.000163 1990 2 9 47931 -0.205673 0.287445 0.2551778 0.0024493 -0.000500 -0.000563 0.000698 0.000413 0.0000196 0.0000358 0.000311 0.000338 1990 2 10 47932 -0.205499 0.291243 0.2526358 0.0026311 -0.000408 -0.000637 0.001739 0.000976 0.0000631 0.0000239 0.000586 0.000793 1990 2 11 47933 -0.205292 0.295200 0.2499388 0.0027577 -0.000113 -0.000535 0.000610 0.000634 0.0000282 0.0000368 0.000357 0.000298 1990 2 12 47934 -0.204871 0.299256 0.2471500 0.0028075 0.000099 -0.000311 0.000262 0.000235 0.0000105 0.0000175 0.000176 0.000131 1990 2 13 47935 -0.203963 0.303320 0.2443524 0.0027660 0.000107 -0.000096 0.000228 0.000145 0.0000068 0.0000090 0.000154 0.000114 1990 2 14 47936 -0.202729 0.307168 0.2416408 0.0026442 0.000081 -0.000066 0.000295 0.000187 0.0000075 0.0000078 0.000197 0.000161 1990 2 15 47937 -0.202353 0.311706 0.2390791 0.0024769 0.000145 -0.000140 0.000313 0.000317 0.0000088 0.0000091 0.000169 0.000185 1990 2 16 47938 -0.201686 0.316007 0.2366935 0.0022965 0.000217 -0.000123 0.000321 0.000266 0.0000108 0.0000090 0.000136 0.000170 1990 2 17 47939 -0.201233 0.320184 0.2344834 0.0021243 0.000312 -0.000169 0.000253 0.000191 0.0000091 0.0000091 0.000149 0.000152 1990 2 18 47940 -0.201328 0.323371 0.2324331 0.0019721 0.000275 -0.000163 0.000223 0.000196 0.0000074 0.0000083 0.000155 0.000170 1990 2 19 47941 -0.201237 0.326715 0.2305194 0.0018340 0.000106 -0.000214 0.000251 0.000219 0.0000075 0.0000083 0.000138 0.000186 1990 2 20 47942 -0.201118 0.330145 0.2287393 0.0017094 -0.000116 -0.000357 0.000298 0.000284 0.0000092 0.0000088 0.000158 0.000214 1990 2 21 47943 -0.202286 0.332905 0.2270710 0.0016491 -0.000124 -0.000391 0.000335 0.000358 0.0000101 0.0000085 0.000140 0.000232 1990 2 22 47944 -0.203591 0.336148 0.2254109 0.0017210 0.000181 -0.000254 0.000337 0.000305 0.0000079 0.0000086 0.000142 0.000225 1990 2 23 47945 -0.203749 0.339745 0.2236031 0.0019341 0.000526 -0.000117 0.000450 0.000381 0.0000071 0.0000074 0.000156 0.000224 1990 2 24 47946 -0.202885 0.343329 0.2215290 0.0022265 0.000683 -0.000109 0.001387 0.001169 0.0000070 0.0000086 0.000159 0.000224 1990 2 25 47947 -0.201565 0.346882 0.2191572 0.0025097 0.000615 -0.000217 0.001434 0.001732 0.0000101 0.0000088 0.000214 0.000227 1990 2 26 47948 -0.199768 0.350351 0.2165410 0.0027061 0.000427 -0.000339 0.000279 0.000371 0.0000105 0.0000103 0.000221 0.000227 1990 2 27 47949 -0.197330 0.353890 0.2137950 0.0027626 0.000271 -0.000364 0.000276 0.000367 0.0000105 0.0000105 0.000220 0.000227 1990 2 28 47950 -0.194711 0.357870 0.2110698 0.0026597 0.000234 -0.000260 0.000298 0.000386 0.0000105 0.0000105 0.000199 0.000215 1990 3 1 47951 -0.193252 0.362767 0.2085163 0.0024236 0.000256 -0.000134 0.000396 0.000478 0.0000105 0.0000105 0.000173 0.000198 1990 3 2 47952 -0.193474 0.368102 0.2062379 0.0021264 0.000232 -0.000112 0.000607 0.000702 0.0000104 0.0000093 0.000172 0.000197 1990 3 3 47953 -0.193775 0.371990 0.2042512 0.0018594 0.000162 -0.000179 0.000463 0.000463 0.0000081 0.0000092 0.000169 0.000281 1990 3 4 47954 -0.193555 0.374537 0.2024864 0.0016918 0.000117 -0.000222 0.000300 0.000299 0.0000079 0.0000080 0.000168 0.000301 1990 3 5 47955 -0.193170 0.377187 0.2008258 0.0016470 0.000155 -0.000146 0.000416 0.000419 0.0000079 0.0000080 0.000168 0.000301 1990 3 6 47956 -0.192611 0.380661 0.1991525 0.0017112 0.000239 0.000019 0.001014 0.001165 0.0000082 0.0000088 0.000156 0.000256 1990 3 7 47957 -0.191788 0.384628 0.1973735 0.0018582 0.000271 0.000142 0.000365 0.000436 0.0000098 0.0000088 0.000127 0.000177 1990 3 8 47958 -0.191036 0.388531 0.1954208 0.0020622 0.000188 0.000093 0.000290 0.000336 0.0000094 0.0000091 0.000130 0.000171 1990 3 9 47959 -0.190528 0.392269 0.1932501 0.0022925 0.000034 -0.000160 0.000273 0.000294 0.0000084 0.0000087 0.000140 0.000156 1990 3 10 47960 -0.189888 0.396298 0.1908515 0.0024978 -0.000004 -0.000501 0.000359 0.000377 0.0000079 0.0000081 0.000147 0.000149 1990 3 11 47961 -0.188501 0.400433 0.1882799 0.0026153 0.000118 -0.000765 0.001067 0.001198 0.0000079 0.0000088 0.000148 0.000148 1990 3 12 47962 -0.186475 0.404203 0.1856494 0.0026081 0.000270 -0.000833 0.001270 0.001526 0.0000097 0.0000089 0.000177 0.000173 1990 3 13 47963 -0.184918 0.407712 0.1830895 0.0024871 0.000284 -0.000683 0.000268 0.000294 0.0000099 0.0000101 0.000180 0.000176 1990 3 14 47964 -0.184748 0.411168 0.1806942 0.0023047 0.000090 -0.000400 0.000280 0.000301 0.0000104 0.0000114 0.000181 0.000181 1990 3 15 47965 -0.185606 0.414288 0.1784904 0.0021267 -0.000203 -0.000143 0.000367 0.000350 0.0000129 0.0000142 0.000189 0.000204 1990 3 16 47966 -0.185561 0.416260 0.1764420 0.0019980 -0.000211 -0.000134 0.000582 0.000422 0.0000179 0.0000168 0.000213 0.000231 1990 3 17 47967 -0.184962 0.418109 0.1744863 0.0019258 -0.000060 -0.000234 0.000730 0.000453 0.0000206 0.0000145 0.000235 0.000239 1990 3 18 47968 -0.184666 0.421014 0.1725740 0.0018981 0.000003 -0.000285 0.000500 0.000496 0.0000111 0.0000152 0.000257 0.000291 1990 3 19 47969 -0.183846 0.424581 0.1706674 0.0019173 0.000009 -0.000342 0.000486 0.000554 0.0000098 0.0000105 0.000265 0.000323 1990 3 20 47970 -0.181716 0.427934 0.1687130 0.0020030 0.000052 -0.000452 0.000639 0.000692 0.0000098 0.0000095 0.000255 0.000315 1990 3 21 47971 -0.179121 0.431048 0.1666334 0.0021665 0.000134 -0.000496 0.000524 0.000528 0.0000092 0.0000086 0.000126 0.000181 1990 3 22 47972 -0.176939 0.434625 0.1643535 0.0023932 0.000168 -0.000342 0.000341 0.000299 0.0000073 0.0000070 0.000100 0.000132 1990 3 23 47973 -0.175048 0.438859 0.1618274 0.0026481 0.000084 -0.000082 0.000219 0.000174 0.0000047 0.0000062 0.000068 0.000081 1990 3 24 47974 -0.172710 0.442891 0.1590522 0.0029128 -0.000072 -0.000224 0.000181 0.000149 0.0000051 0.0000057 0.000079 0.000083 1990 3 25 47975 -0.170242 0.446720 0.1560190 0.0031561 -0.000227 -0.000545 0.000202 0.000179 0.0000066 0.0000057 0.000117 0.000101 1990 3 26 47976 -0.168087 0.450448 0.1527808 0.0032908 -0.000314 -0.000660 0.000613 0.000454 0.0000064 0.0000053 0.000118 0.000106 1990 3 27 47977 -0.166188 0.454077 0.1494931 0.0032387 -0.000290 -0.000560 0.000286 0.000160 0.0000041 0.0000053 0.000068 0.000092 1990 3 28 47978 -0.164391 0.457519 0.1463566 0.0029980 -0.000172 -0.000398 0.000154 0.000088 0.0000043 0.0000047 0.000072 0.000092 1990 3 29 47979 -0.162647 0.460622 0.1435290 0.0026524 -0.000027 -0.000334 0.000188 0.000124 0.0000052 0.0000056 0.000095 0.000094 1990 3 30 47980 -0.160819 0.463103 0.1410519 0.0023046 0.000059 -0.000306 0.000276 0.000252 0.0000070 0.0000066 0.000117 0.000118 1990 3 31 47981 -0.158729 0.465435 0.1388911 0.0020361 0.000085 -0.000327 0.000376 0.000337 0.0000079 0.0000074 0.000115 0.000153 1990 4 1 47982 -0.156692 0.468235 0.1369357 0.0019110 0.000089 -0.000389 0.001051 0.000958 0.0000079 0.0000074 0.000115 0.000166 1990 4 2 47983 -0.154806 0.471554 0.1350258 0.0019433 0.000085 -0.000391 0.000375 0.000367 0.0000068 0.0000076 0.000121 0.000203 1990 4 3 47984 -0.152046 0.474927 0.1330180 0.0020901 0.000071 -0.000254 0.000234 0.000231 0.0000073 0.0000082 0.000130 0.000215 1990 4 4 47985 -0.148153 0.477941 0.1308308 0.0022805 0.000062 0.000000 0.000327 0.000327 0.0000097 0.0000100 0.000177 0.000255 1990 4 5 47986 -0.145480 0.480858 0.1284572 0.0024447 0.000107 0.000216 0.000416 0.000411 0.0000127 0.0000113 0.000175 0.000243 1990 4 6 47987 -0.143183 0.483768 0.1259532 0.0025486 0.000156 0.000212 0.000560 0.000543 0.0000129 0.0000109 0.000152 0.000220 1990 4 7 47988 -0.140073 0.486738 0.1233797 0.0025972 0.000143 0.000041 0.000599 0.000577 0.0000091 0.0000109 0.000278 0.000254 1990 4 8 47989 -0.136229 0.489871 0.1207829 0.0025996 0.000036 -0.000098 0.000292 0.000287 0.0000089 0.0000090 0.000337 0.000260 1990 4 9 47990 -0.132202 0.493134 0.1182047 0.0025546 -0.000141 -0.000053 0.000334 0.000328 0.0000089 0.0000089 0.000337 0.000260 1990 4 10 47991 -0.128429 0.496199 0.1156939 0.0024584 -0.000311 0.000114 0.001034 0.000978 0.0000089 0.0000088 0.000264 0.000213 1990 4 11 47992 -0.125202 0.499039 0.1133009 0.0023183 -0.000380 0.000196 0.000384 0.000360 0.0000088 0.0000088 0.000170 0.000145 1990 4 12 47993 -0.122769 0.502350 0.1110616 0.0021556 -0.000297 0.000047 0.000264 0.000252 0.0000087 0.0000085 0.000161 0.000145 1990 4 13 47994 -0.120738 0.506137 0.1089851 0.0019990 -0.000088 -0.000259 0.000288 0.000275 0.0000082 0.0000082 0.000141 0.000150 1990 4 14 47995 -0.117987 0.508821 0.1070509 0.0018743 0.000148 -0.000388 0.000344 0.000235 0.0000077 0.0000078 0.000147 0.000170 1990 4 15 47996 -0.114929 0.511159 0.1052174 0.0017933 0.000207 -0.000168 0.000407 0.000219 0.0000075 0.0000086 0.000160 0.000188 1990 4 16 47997 -0.112172 0.514014 0.1034410 0.0017640 0.000071 0.000126 0.000527 0.000446 0.0000095 0.0000084 0.000160 0.000148 1990 4 17 47998 -0.109608 0.516774 0.1016647 0.0018110 -0.000074 0.000072 0.000350 0.000376 0.0000094 0.0000086 0.000154 0.000143 1990 4 18 47999 -0.107248 0.518939 0.0997953 0.0019696 -0.000073 -0.000379 0.000227 0.000310 0.0000077 0.0000085 0.000139 0.000157 1990 4 19 48000 -0.105199 0.520753 0.0977059 0.0022288 0.000000 -0.000532 0.000215 0.000304 0.0000075 0.0000080 0.000130 0.000179 1990 4 20 48001 -0.102012 0.523143 0.0953270 0.0025170 0.000153 -0.000306 0.000275 0.000267 0.0000083 0.0000082 0.000126 0.000158 1990 4 21 48002 -0.098901 0.525946 0.0926766 0.0027656 0.000235 0.000054 0.000470 0.000337 0.0000088 0.0000085 0.000125 0.000142 1990 4 22 48003 -0.097000 0.528693 0.0898212 0.0029276 0.000197 0.000256 0.000727 0.000641 0.0000087 0.0000086 0.000144 0.000180 1990 4 23 48004 -0.095734 0.531195 0.0868665 0.0029603 0.000121 0.000103 0.000333 0.000252 0.0000084 0.0000081 0.000144 0.000175 1990 4 24 48005 -0.094114 0.533423 0.0839549 0.0028329 0.000079 -0.000297 0.000262 0.000154 0.0000076 0.0000081 0.000134 0.000140 1990 4 25 48006 -0.092039 0.535095 0.0812458 0.0025539 0.000005 -0.000427 0.000336 0.000196 0.0000078 0.0000084 0.000140 0.000134 1990 4 26 48007 -0.089657 0.536407 0.0788656 0.0021930 -0.000135 -0.000261 0.000347 0.000319 0.0000092 0.0000080 0.000163 0.000128 1990 4 27 48008 -0.087390 0.538190 0.0768448 0.0018642 -0.000264 -0.000209 0.000221 0.000221 0.0000081 0.0000085 0.000128 0.000091 1990 4 28 48009 -0.084880 0.540206 0.0750963 0.0016377 -0.000244 -0.000326 0.000202 0.000230 0.0000078 0.0000080 0.000154 0.000101 1990 4 29 48010 -0.082502 0.542285 0.0735206 0.0015316 -0.000205 -0.000326 0.000206 0.000263 0.0000078 0.0000080 0.000207 0.000125 1990 4 30 48011 -0.080466 0.544080 0.0719945 0.0015573 -0.000239 -0.000139 0.000508 0.000596 0.0000083 0.0000108 0.000220 0.000134 1990 5 1 48012 -0.078390 0.545340 0.0703873 0.0016911 -0.000286 0.000045 0.000918 0.000877 0.0000138 0.0000096 0.000193 0.000153 1990 5 2 48013 -0.075847 0.546480 0.0686132 0.0018713 -0.000252 0.000015 0.000392 0.000509 0.0000110 0.0000108 0.000158 0.000143 1990 5 3 48014 -0.072855 0.548600 0.0666587 0.0020289 -0.000105 -0.000247 0.000227 0.000314 0.0000079 0.0000104 0.000117 0.000127 1990 5 4 48015 -0.069692 0.549680 0.0645754 0.0021312 0.000002 -0.000356 0.000284 0.000369 0.0000098 0.0000128 0.000149 0.000157 1990 5 5 48016 -0.065954 0.550379 0.0624177 0.0021723 0.000098 -0.000347 0.000566 0.000506 0.0000178 0.0000099 0.000296 0.000229 1990 5 6 48017 -0.061447 0.552075 0.0602512 0.0021378 0.000201 -0.000340 0.000375 0.000136 0.0000100 0.0000135 0.000158 0.000162 1990 5 7 48018 -0.056516 0.554398 0.0581600 0.0020254 0.000228 -0.000300 0.000341 0.000132 0.0000091 0.0000091 0.000145 0.000151 1990 5 8 48019 -0.051559 0.556398 0.0562133 0.0018659 0.000146 -0.000207 0.000307 0.000186 0.0000082 0.0000076 0.000142 0.000147 1990 5 9 48020 -0.046542 0.557790 0.0544337 0.0017042 0.000082 -0.000141 0.000275 0.000282 0.0000061 0.0000072 0.000120 0.000136 1990 5 10 48021 -0.042652 0.559639 0.0528020 0.0015690 0.000091 -0.000219 0.000363 0.000404 0.0000063 0.0000141 0.000128 0.000152 1990 5 11 48022 -0.039200 0.562027 0.0512851 0.0014693 0.000165 -0.000376 0.000911 0.000972 0.0000222 0.0000105 0.000414 0.000436 1990 5 12 48023 -0.035308 0.563330 0.0498463 0.0014124 0.000255 -0.000430 0.000420 0.000488 0.0000147 0.0000152 0.000219 0.000394 1990 5 13 48024 -0.031171 0.563650 0.0484389 0.0014159 0.000244 -0.000300 0.000233 0.000276 0.0000082 0.0000113 0.000123 0.000238 1990 5 14 48025 -0.027176 0.564293 0.0469915 0.0015081 0.000053 -0.000068 0.000225 0.000250 0.0000079 0.0000081 0.000115 0.000130 1990 5 15 48026 -0.022763 0.565532 0.0454010 0.0016922 -0.000260 0.000022 0.000225 0.000228 0.0000081 0.0000087 0.000111 0.000087 1990 5 16 48027 -0.017552 0.566680 0.0435895 0.0019105 -0.000510 -0.000148 0.000252 0.000270 0.0000094 0.0000089 0.000139 0.000110 1990 5 17 48028 -0.012857 0.567448 0.0415694 0.0021208 -0.000444 -0.000216 0.000277 0.000276 0.0000096 0.0000086 0.000158 0.000145 1990 5 18 48029 -0.009088 0.568061 0.0393479 0.0023329 -0.000092 -0.000070 0.000290 0.000216 0.0000079 0.0000087 0.000134 0.000168 1990 5 19 48030 -0.005313 0.568875 0.0369185 0.0025281 0.000273 0.000080 0.000291 0.000213 0.0000078 0.0000076 0.000132 0.000169 1990 5 20 48031 -0.000960 0.569912 0.0343233 0.0026487 0.000422 0.000097 0.000248 0.000188 0.0000074 0.0000069 0.000120 0.000151 1990 5 21 48032 0.003657 0.570854 0.0316653 0.0026432 0.000294 -0.000014 0.000158 0.000128 0.0000061 0.0000068 0.000088 0.000106 1990 5 22 48033 0.007872 0.571413 0.0290825 0.0024960 0.000001 -0.000157 0.000163 0.000136 0.0000061 0.0000061 0.000089 0.000108 1990 5 23 48034 0.011434 0.571650 0.0267041 0.0022401 -0.000239 -0.000225 0.000175 0.000164 0.0000061 0.0000055 0.000093 0.000117 1990 5 24 48035 0.014941 0.572014 0.0246049 0.0019437 -0.000180 -0.000230 0.000157 0.000147 0.0000049 0.0000051 0.000091 0.000118 1990 5 25 48036 0.018639 0.572366 0.0227885 0.0016843 -0.000080 -0.000134 0.000143 0.000134 0.0000041 0.0000044 0.000088 0.000097 1990 5 26 48037 0.022519 0.572592 0.0211886 0.0015357 -0.000048 0.000045 0.000141 0.000136 0.0000039 0.0000051 0.000087 0.000086 1990 5 27 48038 0.026343 0.572837 0.0196695 0.0015418 -0.000061 0.000214 0.000187 0.000208 0.0000062 0.0000062 0.000110 0.000138 1990 5 28 48039 0.029837 0.573224 0.0180750 0.0016810 -0.000163 0.000294 0.000213 0.000267 0.0000084 0.0000076 0.000121 0.000197 1990 5 29 48040 0.033114 0.573737 0.0163022 0.0018724 -0.000323 0.000243 0.000239 0.000297 0.0000091 0.0000104 0.000131 0.000201 1990 5 30 48041 0.036678 0.574163 0.0143451 0.0020280 -0.000427 0.000083 0.000454 0.000516 0.0000123 0.0000108 0.000183 0.000210 1990 5 31 48042 0.040824 0.574284 0.0122709 0.0021043 -0.000369 -0.000109 0.000703 0.000727 0.0000125 0.0000100 0.000187 0.000211 1990 6 1 48043 0.045023 0.574101 0.0101616 0.0021044 -0.000177 -0.000253 0.000509 0.000480 0.0000076 0.0000098 0.000116 0.000224 1990 6 2 48044 0.048685 0.574015 0.0080832 0.0020451 0.000020 -0.000302 0.000323 0.000313 0.0000071 0.0000074 0.000108 0.000227 1990 6 3 48045 0.051939 0.574514 0.0060877 0.0019327 0.000108 -0.000284 0.000420 0.000408 0.0000071 0.0000084 0.000109 0.000226 1990 6 4 48046 0.055599 0.575619 0.0042289 0.0017683 0.000088 -0.000287 0.000507 0.000515 0.0000097 0.0000090 0.000162 0.000173 1990 6 5 48047 0.059882 0.575914 0.0025563 0.0015683 0.000048 -0.000386 0.000463 0.000481 0.0000108 0.0000096 0.000188 0.000165 1990 6 6 48048 0.064269 0.574693 0.0010902 0.0013736 0.000059 -0.000556 0.000546 0.000586 0.0000095 0.0000092 0.000169 0.000159 1990 6 7 48049 0.068045 0.573653 -0.0002005 0.0012271 0.000092 -0.000640 0.000384 0.000454 0.0000076 0.0000092 0.000138 0.000147 1990 6 8 48050 0.071422 0.572985 -0.0013803 0.0011457 0.000076 -0.000517 0.000489 0.000580 0.0000088 0.0000144 0.000161 0.000174 1990 6 9 48051 0.074784 0.572389 -0.0025128 0.0011290 0.000011 -0.000356 0.000976 0.001116 0.0000213 0.0000170 0.000370 0.000461 1990 6 10 48052 0.078638 0.571139 -0.0036613 0.0011859 -0.000040 -0.000376 0.000904 0.001018 0.0000252 0.0000186 0.000428 0.000592 1990 6 11 48053 0.082570 0.569722 -0.0049067 0.0013218 -0.000007 -0.000497 0.000479 0.000520 0.0000159 0.0000169 0.000385 0.000297 1990 6 12 48054 0.087157 0.569310 -0.0063227 0.0015146 0.000029 -0.000473 0.000266 0.000287 0.0000085 0.0000125 0.000227 0.000159 1990 6 13 48055 0.092012 0.569023 -0.0079460 0.0017213 -0.000079 -0.000161 0.000296 0.000309 0.0000090 0.0000101 0.000171 0.000174 1990 6 14 48056 0.096532 0.568412 -0.0097648 0.0019030 -0.000126 0.000226 0.000492 0.000480 0.0000116 0.0000101 0.000157 0.000239 1990 6 15 48057 0.100507 0.567683 -0.0117391 0.0020383 0.000002 0.000413 0.001580 0.001564 0.0000112 0.0000092 0.000154 0.000222 1990 6 16 48058 0.104070 0.567032 -0.0138162 0.0021123 0.000150 0.000286 0.000460 0.000554 0.0000068 0.0000090 0.000149 0.000114 1990 6 17 48059 0.107731 0.566555 -0.0159287 0.0021077 0.000122 -0.000075 0.000306 0.000370 0.0000068 0.0000074 0.000150 0.000115 1990 6 18 48060 0.111768 0.566083 -0.0179929 0.0020132 -0.000130 -0.000436 0.000458 0.000553 0.0000080 0.0000135 0.000173 0.000137 1990 6 19 48061 0.115679 0.565308 -0.0199232 0.0018379 -0.000361 -0.000519 0.000721 0.000878 0.0000201 0.0000160 0.000324 0.000402 1990 6 20 48062 0.119190 0.563929 -0.0216556 0.0016141 -0.000308 -0.000248 0.000562 0.000747 0.0000241 0.0000185 0.000371 0.000728 1990 6 21 48063 0.122714 0.562250 -0.0231649 0.0013944 -0.000064 0.000037 0.000427 0.000528 0.0000169 0.0000166 0.000248 0.000375 1990 6 22 48064 0.127153 0.560009 -0.0244821 0.0012402 0.000143 0.000026 0.000303 0.000237 0.0000091 0.0000122 0.000148 0.000151 1990 6 23 48065 0.130349 0.558513 -0.0256941 0.0012093 0.000045 -0.000347 0.000265 0.000128 0.0000076 0.0000082 0.000126 0.000096 1990 6 24 48066 0.132966 0.557502 -0.0269416 0.0013168 -0.000119 -0.000595 0.000350 0.000151 0.0000074 0.0000075 0.000122 0.000084 1990 6 25 48067 0.136493 0.555879 -0.0283463 0.0015069 -0.000115 -0.000459 0.000365 0.000217 0.0000073 0.0000073 0.000099 0.000105 1990 6 26 48068 0.140583 0.553485 -0.0299482 0.0016889 -0.000011 -0.000186 0.000240 0.000167 0.0000073 0.0000072 0.000097 0.000115 1990 6 27 48069 0.144426 0.550853 -0.0316985 0.0017897 0.000050 -0.000088 0.000248 0.000189 0.0000071 0.0000071 0.000108 0.000118 1990 6 28 48070 0.148241 0.548525 -0.0334959 0.0017958 0.000045 -0.000141 0.000220 0.000129 0.0000068 0.0000071 0.000099 0.000090 1990 6 29 48071 0.151787 0.546867 -0.0352623 0.0017441 -0.000012 -0.000211 0.000221 0.000089 0.0000070 0.0000082 0.000086 0.000071 1990 6 30 48072 0.155102 0.545705 -0.0369645 0.0016663 -0.000104 -0.000201 0.000325 0.000140 0.0000096 0.0000092 0.000124 0.000111 1990 7 1 48073 0.159762 0.543960 -0.0385830 0.0015575 -0.000192 -0.000060 0.000371 0.000372 0.0000114 0.0000092 0.000174 0.000229 1990 7 2 48074 0.165168 0.542128 -0.0400741 0.0013997 -0.000227 0.000040 0.000251 0.000316 0.0000088 0.0000105 0.000151 0.000163 1990 7 3 48075 0.169801 0.540552 -0.0413840 0.0012129 -0.000102 -0.000143 0.000297 0.000357 0.0000096 0.0000103 0.000157 0.000187 1990 7 4 48076 0.174306 0.538655 -0.0425086 0.0010538 -0.000100 -0.000249 0.000439 0.000512 0.0000119 0.0000122 0.000174 0.000290 1990 7 5 48077 0.179030 0.536481 -0.0435072 0.0009642 -0.000262 -0.000108 0.000184 0.000315 0.0000148 0.0000122 0.000237 0.000225 1990 7 6 48078 0.183028 0.534683 -0.0444578 0.0009363 -0.000299 0.000027 0.000171 0.000278 0.0000125 0.0000117 0.000210 0.000208 1990 7 7 48079 0.185743 0.533374 -0.0454034 0.0009286 -0.000094 -0.000068 0.000179 0.000242 0.0000086 0.0000100 0.000144 0.000198 1990 7 8 48080 0.188312 0.531498 -0.0463385 0.0009397 -0.000110 -0.000199 0.000201 0.000245 0.0000075 0.0000091 0.000125 0.000193 1990 7 9 48081 0.191516 0.528556 -0.0473031 0.0010212 -0.000352 -0.000252 0.000553 0.000767 0.0000096 0.0000092 0.000139 0.000178 1990 7 10 48082 0.195068 0.525205 -0.0483935 0.0011948 -0.000395 -0.000272 0.000466 0.000748 0.0000108 0.0000108 0.000149 0.000185 1990 7 11 48083 0.198318 0.522321 -0.0496937 0.0014146 -0.000034 -0.000284 0.000335 0.000402 0.0000120 0.0000102 0.000163 0.000207 1990 7 12 48084 0.202495 0.520394 -0.0512097 0.0015959 0.000119 -0.000122 0.000257 0.000254 0.0000095 0.0000113 0.000162 0.000186 1990 7 13 48085 0.206131 0.518706 -0.0528594 0.0016788 -0.000002 0.000050 0.000328 0.000329 0.0000106 0.0000132 0.000187 0.000247 1990 7 14 48086 0.209437 0.515862 -0.0545328 0.0016564 0.000077 0.000060 0.000749 0.000840 0.0000169 0.0000169 0.000308 0.000488 1990 7 15 48087 0.212526 0.512718 -0.0561366 0.0015432 0.000416 -0.000094 0.001381 0.001511 0.0000231 0.0000135 0.000522 0.000544 1990 7 16 48088 0.215527 0.510393 -0.0575904 0.0013523 0.000675 -0.000266 0.000534 0.000504 0.0000101 0.0000161 0.000187 0.000191 1990 7 17 48089 0.218901 0.508335 -0.0588270 0.0011071 0.000505 -0.000275 0.000335 0.000316 0.0000091 0.0000102 0.000167 0.000167 1990 7 18 48090 0.222620 0.505730 -0.0598107 0.0008520 -0.000088 -0.000116 0.000355 0.000362 0.0000103 0.0000105 0.000193 0.000174 1990 7 19 48091 0.225958 0.503222 -0.0605582 0.0006638 -0.000381 -0.000174 0.000359 0.000313 0.0000119 0.0000112 0.000183 0.000173 1990 7 20 48092 0.228816 0.500959 -0.0611803 0.0006203 -0.000224 -0.000329 0.000337 0.000217 0.0000120 0.0000110 0.000147 0.000151 1990 7 21 48093 0.231729 0.498318 -0.0618422 0.0007289 -0.000081 -0.000178 0.000336 0.000202 0.0000102 0.0000113 0.000173 0.000133 1990 7 22 48094 0.234698 0.495700 -0.0626680 0.0009496 0.000118 -0.000169 0.000304 0.000254 0.0000105 0.0000114 0.000190 0.000162 1990 7 23 48095 0.237229 0.492068 -0.0637477 0.0012140 0.000234 -0.000246 0.000330 0.000361 0.0000126 0.0000139 0.000203 0.000203 1990 7 24 48096 0.239925 0.488382 -0.0650785 0.0014246 0.000181 -0.000254 0.000519 0.000464 0.0000173 0.0000167 0.000229 0.000199 1990 7 25 48097 0.243490 0.486093 -0.0665646 0.0015198 0.000022 -0.000194 0.000696 0.000600 0.0000209 0.0000162 0.000211 0.000230 1990 7 26 48098 0.246821 0.483587 -0.0680832 0.0015108 -0.000216 -0.000117 0.000538 0.000618 0.0000151 0.0000154 0.000235 0.000223 1990 7 27 48099 0.249771 0.479740 -0.0695584 0.0014569 -0.000472 -0.000109 0.000384 0.000470 0.0000099 0.0000133 0.000209 0.000152 1990 7 28 48100 0.252599 0.476435 -0.0709795 0.0013906 -0.000407 -0.000059 0.000381 0.000444 0.0000115 0.0000133 0.000251 0.000176 1990 7 29 48101 0.255047 0.473384 -0.0723318 0.0013054 -0.000188 -0.000023 0.000537 0.000560 0.0000167 0.0000114 0.000370 0.000259 1990 7 30 48102 0.257065 0.469851 -0.0735907 0.0011962 -0.000081 -0.000037 0.000751 0.000738 0.0000112 0.0000137 0.000177 0.000206 1990 7 31 48103 0.259279 0.466332 -0.0747317 0.0010656 -0.000104 -0.000012 0.000528 0.000529 0.0000106 0.0000113 0.000171 0.000181 1990 8 1 48104 0.261789 0.462351 -0.0757365 0.0009299 -0.000158 0.000102 0.000395 0.000382 0.0000114 0.0000122 0.000230 0.000158 1990 8 2 48105 0.263432 0.458578 -0.0766120 0.0008330 -0.000140 0.000207 0.000467 0.000474 0.0000138 0.0000142 0.000372 0.000213 1990 8 3 48106 0.264775 0.454858 -0.0774265 0.0008228 -0.000051 0.000176 0.000656 0.000770 0.0000171 0.0000166 0.000403 0.000310 1990 8 4 48107 0.266807 0.451919 -0.0782823 0.0009070 0.000082 -0.000107 0.000682 0.000762 0.0000193 0.0000188 0.000343 0.000318 1990 8 5 48108 0.269544 0.448785 -0.0792629 0.0010658 0.000134 -0.000449 0.000794 0.000839 0.0000204 0.0000191 0.000321 0.000360 1990 8 6 48109 0.272037 0.445632 -0.0804305 0.0012830 0.000039 -0.000597 0.000966 0.000975 0.0000189 0.0000161 0.000288 0.000331 1990 8 7 48110 0.274202 0.442309 -0.0818350 0.0015385 -0.000118 -0.000480 0.000403 0.000439 0.0000119 0.0000159 0.000175 0.000188 1990 8 8 48111 0.276492 0.438388 -0.0834984 0.0017902 -0.000214 -0.000171 0.000424 0.000453 0.0000128 0.0000156 0.000187 0.000199 1990 8 9 48112 0.278968 0.434204 -0.0853897 0.0019760 -0.000192 0.000166 0.000648 0.000599 0.0000192 0.0000187 0.000271 0.000283 1990 8 10 48113 0.280605 0.431193 -0.0874126 0.0020458 -0.000109 0.000405 0.000817 0.000715 0.0000245 0.0000164 0.000468 0.000427 1990 8 11 48114 0.282033 0.428751 -0.0894409 0.0019899 -0.000149 0.000372 0.000428 0.000420 0.0000135 0.0000181 0.000291 0.000253 1990 8 12 48115 0.283428 0.425048 -0.0913604 0.0018389 -0.000425 -0.000032 0.000425 0.000456 0.0000118 0.0000126 0.000242 0.000239 1990 8 13 48116 0.284945 0.422522 -0.0931034 0.0016363 -0.000689 -0.000352 0.000520 0.000539 0.0000118 0.0000116 0.000242 0.000251 1990 8 14 48117 0.286591 0.420752 -0.0946382 0.0014240 -0.000646 -0.000380 0.000577 0.000423 0.0000114 0.0000118 0.000245 0.000215 1990 8 15 48118 0.287911 0.416843 -0.0959753 0.0012602 -0.000267 -0.000318 0.000567 0.000455 0.0000118 0.0000104 0.000240 0.000203 1990 8 16 48119 0.288741 0.413296 -0.0971952 0.0012041 0.000110 -0.000196 0.000442 0.000315 0.0000093 0.0000105 0.000214 0.000144 1990 8 17 48120 0.290370 0.410739 -0.0984237 0.0012783 -0.000068 0.000099 0.000417 0.000307 0.0000092 0.0000098 0.000210 0.000122 1990 8 18 48121 0.292280 0.407962 -0.0997847 0.0014622 -0.000560 0.000353 0.000436 0.000349 0.0000102 0.0000075 0.000216 0.000119 1990 8 19 48122 0.293846 0.404476 -0.1013640 0.0017024 -0.000875 0.000370 0.000544 0.000472 0.0000058 0.0000061 0.000183 0.000115 1990 8 20 48123 0.295620 0.400540 -0.1031838 0.0019316 -0.000824 0.000189 0.000313 0.000290 0.0000020 0.0000039 0.000091 0.000094 1990 8 21 48124 0.297998 0.396712 -0.1052025 0.0020958 -0.000479 -0.000045 0.000188 0.000174 0.0000020 0.0000022 0.000091 0.000094 1990 8 22 48125 0.300184 0.393111 -0.1073406 0.0021699 -0.000083 -0.000185 0.000171 0.000158 0.0000023 0.0000047 0.000102 0.000103 1990 8 23 48126 0.301639 0.389685 -0.1095085 0.0021528 0.000154 -0.000198 0.000360 0.000308 0.0000075 0.0000073 0.000173 0.000149 1990 8 24 48127 0.302740 0.386432 -0.1116210 0.0020544 0.000164 -0.000170 0.000421 0.000349 0.0000122 0.0000095 0.000186 0.000155 1990 8 25 48128 0.303807 0.383154 -0.1136038 0.0018932 0.000014 -0.000203 0.000562 0.000411 0.0000115 0.0000118 0.000220 0.000188 1990 8 26 48129 0.304791 0.379561 -0.1154045 0.0016979 -0.000151 -0.000348 0.000616 0.000429 0.0000113 0.0000114 0.000230 0.000198 1990 8 27 48130 0.305475 0.375593 -0.1170054 0.0015029 -0.000212 -0.000559 0.000613 0.000427 0.0000113 0.0000115 0.000230 0.000198 1990 8 28 48131 0.305761 0.371626 -0.1184236 0.0013373 -0.000159 -0.000697 0.000476 0.000328 0.0000116 0.0000115 0.000222 0.000177 1990 8 29 48132 0.305737 0.368094 -0.1196995 0.0012184 -0.000060 -0.000626 0.000454 0.000313 0.0000117 0.0000114 0.000220 0.000173 1990 8 30 48133 0.305623 0.364921 -0.1208840 0.0011565 0.000035 -0.000318 0.000387 0.000317 0.0000111 0.0000108 0.000214 0.000167 1990 8 31 48134 0.305720 0.361350 -0.1220376 0.0011648 0.000166 0.000084 0.000348 0.000368 0.0000099 0.0000105 0.000199 0.000155 1990 9 1 48135 0.306214 0.356995 -0.1232376 0.0012612 0.000401 0.000368 0.000442 0.000465 0.0000098 0.0000099 0.000199 0.000154 1990 9 2 48136 0.306943 0.352823 -0.1245798 0.0014559 0.000697 0.000455 0.000642 0.000649 0.0000098 0.0000091 0.000199 0.000154 1990 9 3 48137 0.307898 0.349297 -0.1261612 0.0017323 0.000903 0.000417 0.001499 0.002510 0.0000084 0.0000091 0.000205 0.000232 1990 9 4 48138 0.309117 0.346117 -0.1280432 0.0020364 0.000863 0.000390 0.000912 0.001123 0.0000084 0.0000088 0.000208 0.000248 1990 9 5 48139 0.310548 0.342721 -0.1302152 0.0022878 0.000530 0.000456 0.000538 0.000602 0.0000091 0.0000108 0.000223 0.000270 1990 9 6 48140 0.311953 0.339028 -0.1325827 0.0024113 0.000033 0.000568 0.000627 0.000689 0.0000131 0.0000125 0.000279 0.000352 1990 9 7 48141 0.312071 0.335325 -0.1349922 0.0023739 -0.000290 0.000514 0.000520 0.000589 0.0000158 0.0000128 0.000249 0.000248 1990 9 8 48142 0.311984 0.331500 -0.1372889 0.0021989 -0.000414 0.000215 0.000423 0.000336 0.0000124 0.0000130 0.000169 0.000163 1990 9 9 48143 0.312750 0.326963 -0.1393660 0.0019426 -0.000338 0.000021 0.000393 0.000227 0.0000101 0.0000109 0.000126 0.000122 1990 9 10 48144 0.313417 0.321927 -0.1411749 0.0016621 -0.000026 0.000250 0.000353 0.000285 0.0000095 0.0000102 0.000154 0.000131 1990 9 11 48145 0.312738 0.318082 -0.1427139 0.0014281 0.000067 0.000212 0.000385 0.000357 0.0000103 0.0000105 0.000223 0.000128 1990 9 12 48146 0.312361 0.314602 -0.1440690 0.0013276 0.000057 -0.000086 0.000392 0.000376 0.0000115 0.0000111 0.000215 0.000135 1990 9 13 48147 0.312061 0.310131 -0.1454094 0.0013978 0.000060 -0.000267 0.000451 0.000452 0.0000119 0.0000105 0.000186 0.000149 1990 9 14 48148 0.311658 0.305766 -0.1468975 0.0015968 0.000025 -0.000213 0.000404 0.000403 0.0000094 0.0000103 0.000204 0.000185 1990 9 15 48149 0.311325 0.301947 -0.1486216 0.0018477 0.000006 0.000015 0.000281 0.000286 0.0000087 0.0000090 0.000216 0.000204 1990 9 16 48150 0.310784 0.298223 -0.1505942 0.0020850 0.000058 0.000252 0.000279 0.000284 0.0000087 0.0000087 0.000216 0.000204 1990 9 17 48151 0.309926 0.294407 -0.1527759 0.0022647 0.000164 0.000382 0.000317 0.000320 0.0000087 0.0000095 0.000216 0.000204 1990 9 18 48152 0.308956 0.290739 -0.1550956 0.0023606 0.000245 0.000390 0.002344 0.001024 0.0000103 0.0000096 0.000284 0.000172 1990 9 19 48153 0.308195 0.287383 -0.1574644 0.0023628 0.000219 0.000338 0.001012 0.000764 0.0000105 0.0000105 0.000291 0.000171 1990 9 20 48154 0.307745 0.284027 -0.1597920 0.0022806 0.000071 0.000305 0.000517 0.000481 0.0000107 0.0000110 0.000278 0.000177 1990 9 21 48155 0.307440 0.279996 -0.1620059 0.0021378 -0.000114 0.000339 0.000502 0.000476 0.0000115 0.0000114 0.000244 0.000210 1990 9 22 48156 0.307278 0.276788 -0.1640596 0.0019681 -0.000156 0.000420 0.000669 0.000615 0.0000122 0.0000117 0.000226 0.000249 1990 9 23 48157 0.306415 0.274122 -0.1659447 0.0018065 -0.000020 0.000475 0.000836 0.000741 0.0000118 0.0000104 0.000213 0.000230 1990 9 24 48158 0.304499 0.270996 -0.1676839 0.0016780 0.000146 0.000434 0.000223 0.000229 0.0000086 0.0000103 0.000154 0.000130 1990 9 25 48159 0.302025 0.267019 -0.1693188 0.0015978 0.000182 0.000282 0.000226 0.000233 0.0000089 0.0000093 0.000158 0.000133 1990 9 26 48160 0.299840 0.262508 -0.1709024 0.0015751 0.000066 0.000085 0.000278 0.000299 0.0000100 0.0000094 0.000177 0.000148 1990 9 27 48161 0.298473 0.258182 -0.1724940 0.0016180 0.000030 0.000010 0.000299 0.000281 0.0000100 0.0000091 0.000182 0.000183 1990 9 28 48162 0.297793 0.254279 -0.1741628 0.0017348 0.000156 0.000060 0.000232 0.000186 0.0000082 0.0000089 0.000159 0.000329 1990 9 29 48163 0.297283 0.250494 -0.1759848 0.0019248 0.000279 0.000092 0.000235 0.000199 0.0000079 0.0000079 0.000139 0.000328 1990 9 30 48164 0.296623 0.246646 -0.1780279 0.0021694 0.000273 0.000062 0.000265 0.000282 0.0000075 0.0000077 0.000114 0.000271 1990 10 1 48165 0.295866 0.242855 -0.1803295 0.0024270 0.000115 0.000033 0.000378 0.000412 0.0000075 0.0000091 0.000113 0.000267 1990 10 2 48166 0.295205 0.239358 -0.1828735 0.0026430 -0.000107 0.000086 0.000784 0.000858 0.0000106 0.0000097 0.000177 0.000182 1990 10 3 48167 0.294635 0.236383 -0.1855893 0.0027686 -0.000254 0.000242 0.000551 0.000570 0.0000118 0.0000097 0.000214 0.000172 1990 10 4 48168 0.293835 0.233888 -0.1883687 0.0027766 -0.000236 0.000408 0.000577 0.000514 0.0000087 0.0000089 0.000195 0.000174 1990 10 5 48169 0.292414 0.231174 -0.1910950 0.0026621 -0.000097 0.000385 0.000321 0.000213 0.0000059 0.0000072 0.000152 0.000161 1990 10 6 48170 0.290446 0.227644 -0.1936561 0.0024377 0.000038 0.000072 0.000217 0.000114 0.0000058 0.0000063 0.000125 0.000124 1990 10 7 48171 0.287655 0.223997 -0.1959581 0.0021545 0.000076 -0.000279 0.000224 0.000110 0.0000067 0.0000153 0.000133 0.000128 1990 10 8 48172 0.284561 0.220593 -0.1979820 0.0019018 0.000006 -0.000402 0.000827 0.000399 0.0000248 0.0000139 0.000446 0.000458 1990 10 9 48173 0.282357 0.216902 -0.1998005 0.0017552 -0.000111 -0.000259 0.000912 0.000872 0.0000211 0.0000171 0.000411 0.000443 1990 10 10 48174 0.281407 0.212741 -0.2015378 0.0017405 -0.000150 -0.000018 0.000414 0.000427 0.0000095 0.0000151 0.000195 0.000211 1990 10 11 48175 0.280845 0.208490 -0.2033188 0.0018341 -0.000049 0.000097 0.000395 0.000414 0.0000092 0.0000099 0.000180 0.000216 1990 10 12 48176 0.278605 0.204684 -0.2052266 0.0019949 0.000054 -0.000144 0.000332 0.000438 0.0000102 0.0000097 0.000191 0.000207 1990 10 13 48177 0.275677 0.201374 -0.2073109 0.0021778 0.000092 -0.000316 0.000283 0.000415 0.0000101 0.0000091 0.000188 0.000180 1990 10 14 48178 0.273401 0.198093 -0.2095695 0.0023270 0.000073 -0.000103 0.000275 0.000326 0.0000079 0.0000088 0.000140 0.000153 1990 10 15 48179 0.271025 0.194431 -0.2119423 0.0024012 -0.000015 0.000206 0.000301 0.000333 0.0000074 0.0000080 0.000128 0.000147 1990 10 16 48180 0.267968 0.190583 -0.2143445 0.0023921 -0.000156 0.000239 0.000423 0.000486 0.0000081 0.0000094 0.000138 0.000157 1990 10 17 48181 0.265522 0.187310 -0.2166996 0.0023160 -0.000293 -0.000001 0.000429 0.000567 0.0000115 0.0000094 0.000181 0.000202 1990 10 18 48182 0.263315 0.184716 -0.2189552 0.0021979 -0.000335 -0.000208 0.000319 0.000316 0.0000107 0.0000100 0.000192 0.000209 1990 10 19 48183 0.260752 0.181793 -0.2210833 0.0020560 -0.000160 -0.000144 0.000259 0.000217 0.0000086 0.0000091 0.000183 0.000192 1990 10 20 48184 0.257937 0.177988 -0.2230656 0.0018975 0.000199 0.000142 0.000264 0.000259 0.0000076 0.0000086 0.000138 0.000150 1990 10 21 48185 0.254626 0.174620 -0.2248864 0.0017484 0.000291 0.000215 0.000317 0.000339 0.0000085 0.0000139 0.000146 0.000159 1990 10 22 48186 0.251184 0.172122 -0.2265784 0.0016585 0.000119 0.000015 0.000545 0.000535 0.0000202 0.0000110 0.000376 0.000328 1990 10 23 48187 0.248448 0.169542 -0.2282245 0.0016562 0.000055 -0.000152 0.000328 0.000349 0.0000134 0.0000163 0.000255 0.000211 1990 10 24 48188 0.246730 0.166155 -0.2299147 0.0017293 0.000226 -0.000083 0.000336 0.000354 0.0000123 0.0000106 0.000226 0.000218 1990 10 25 48189 0.245418 0.162684 -0.2317070 0.0018482 0.000323 0.000084 0.000247 0.000266 0.0000077 0.0000096 0.000134 0.000159 1990 10 26 48190 0.243778 0.160015 -0.2336322 0.0019986 0.000000 0.000085 0.000255 0.000258 0.0000069 0.0000079 0.000105 0.000145 1990 10 27 48191 0.241357 0.157271 -0.2357203 0.0021944 -0.000277 -0.000044 0.000427 0.000412 0.0000081 0.0000096 0.000116 0.000161 1990 10 28 48192 0.239147 0.154027 -0.2380300 0.0024458 -0.000184 -0.000058 0.000451 0.000554 0.0000124 0.0000093 0.000235 0.000163 1990 10 29 48193 0.237975 0.151254 -0.2406108 0.0027087 0.000060 0.000156 0.000325 0.000378 0.0000106 0.0000103 0.000211 0.000147 1990 10 30 48194 0.235971 0.149498 -0.2434323 0.0029140 0.000156 0.000267 0.000262 0.000277 0.0000082 0.0000108 0.000137 0.000148 1990 10 31 48195 0.233748 0.147520 -0.2464078 0.0030111 0.000099 0.000250 0.000340 0.000347 0.0000110 0.0000116 0.000173 0.000224 1990 11 1 48196 0.232091 0.145156 -0.2494116 0.0029682 -0.000005 0.000195 0.000428 0.000421 0.0000151 0.0000118 0.000199 0.000344 1990 11 2 48197 0.230012 0.142382 -0.2523014 0.0027812 -0.000063 0.000143 0.000496 0.000487 0.0000127 0.0000117 0.000162 0.000292 1990 11 3 48198 0.227534 0.139842 -0.2549470 0.0024843 -0.000035 0.000094 0.000608 0.000649 0.0000083 0.0000101 0.000123 0.000166 1990 11 4 48199 0.225317 0.137892 -0.2572713 0.0021571 0.000042 0.000009 0.000317 0.000371 0.0000076 0.0000085 0.000115 0.000149 1990 11 5 48200 0.222738 0.135573 -0.2592918 0.0019046 0.000113 -0.000128 0.000321 0.000378 0.0000086 0.0000127 0.000131 0.000169 1990 11 6 48201 0.218957 0.133145 -0.2611283 0.0018106 0.000163 -0.000247 0.000510 0.000559 0.0000177 0.0000099 0.000302 0.000384 1990 11 7 48202 0.214116 0.131349 -0.2629592 0.0018942 0.000200 -0.000244 0.000326 0.000350 0.0000111 0.0000125 0.000198 0.000249 1990 11 8 48203 0.209926 0.129238 -0.2649452 0.0021018 0.000202 -0.000080 0.000263 0.000271 0.0000073 0.0000082 0.000134 0.000181 1990 11 9 48204 0.207105 0.126444 -0.2671678 0.0023414 0.000165 0.000158 0.000251 0.000236 0.0000052 0.0000068 0.000099 0.000145 1990 11 10 48205 0.204796 0.123794 -0.2696136 0.0025308 0.000115 0.000329 0.000301 0.000284 0.0000062 0.0000156 0.000117 0.000172 1990 11 11 48206 0.202193 0.121708 -0.2722046 0.0026284 0.000068 0.000335 0.001136 0.001256 0.0000260 0.0000441 0.000487 0.000563 1990 11 12 48207 0.199198 0.119830 -0.2748437 0.0026334 0.000031 0.000192 0.001520 0.002785 0.0000820 0.0000197 0.000860 0.000711 1990 11 13 48208 0.196169 0.117610 -0.2774473 0.0025632 0.000011 0.000054 0.000498 0.000494 0.0000133 0.0000449 0.000178 0.000219 1990 11 14 48209 0.193415 0.115203 -0.2799510 0.0024340 -0.000002 0.000015 0.000221 0.000212 0.0000077 0.0000117 0.000104 0.000130 1990 11 15 48210 0.190525 0.113106 -0.2823030 0.0022569 -0.000025 0.000059 0.000271 0.000259 0.0000101 0.0000113 0.000134 0.000169 1990 11 16 48211 0.187419 0.110871 -0.2844609 0.0020516 -0.000048 0.000098 0.000453 0.000408 0.0000148 0.0000095 0.000191 0.000241 1990 11 17 48212 0.184239 0.108424 -0.2864114 0.0018546 -0.000070 0.000082 0.000488 0.000277 0.0000090 0.0000115 0.000128 0.000189 1990 11 18 48213 0.180998 0.106361 -0.2881835 0.0017072 -0.000074 0.000034 0.000313 0.000192 0.0000081 0.0000083 0.000120 0.000184 1990 11 19 48214 0.177576 0.104988 -0.2898450 0.0016401 -0.000007 0.000018 0.000233 0.000200 0.0000077 0.0000082 0.000118 0.000204 1990 11 20 48215 0.174306 0.103511 -0.2914863 0.0016593 0.000264 0.000076 0.000239 0.000287 0.0000083 0.0000105 0.000131 0.000232 1990 11 21 48216 0.171366 0.101572 -0.2931864 0.0017478 0.000586 0.000211 0.000395 0.000647 0.0000133 0.0000110 0.000237 0.000281 1990 11 22 48217 0.168532 0.099663 -0.2950023 0.0018880 0.000659 0.000358 0.000414 0.000700 0.0000138 0.0000101 0.000253 0.000281 1990 11 23 48218 0.165574 0.098205 -0.2969782 0.0020696 0.000414 0.000391 0.000229 0.000242 0.0000070 0.0000101 0.000129 0.000157 1990 11 24 48219 0.162439 0.097146 -0.2991504 0.0022799 0.000030 0.000229 0.000213 0.000222 0.0000065 0.0000067 0.000119 0.000146 1990 11 25 48220 0.159196 0.096152 -0.3015386 0.0024939 -0.000246 -0.000069 0.000210 0.000216 0.0000065 0.0000063 0.000118 0.000145 1990 11 26 48221 0.155848 0.094932 -0.3041287 0.0026750 -0.000295 -0.000263 0.000158 0.000128 0.0000061 0.0000066 0.000083 0.000123 1990 11 27 48222 0.152269 0.093463 -0.3068671 0.0027883 -0.000174 -0.000144 0.000169 0.000135 0.0000067 0.0000080 0.000088 0.000133 1990 11 28 48223 0.148346 0.092018 -0.3096724 0.0028120 -0.000040 0.000233 0.000275 0.000222 0.0000100 0.0000077 0.000144 0.000201 1990 11 29 48224 0.144119 0.090942 -0.3124526 0.0027356 -0.000027 0.000453 0.000320 0.000315 0.0000087 0.0000083 0.000162 0.000182 1990 11 30 48225 0.139587 0.089708 -0.3151109 0.0025636 -0.000159 0.000290 0.000219 0.000251 0.0000067 0.0000075 0.000095 0.000133 1990 12 1 48226 0.135171 0.088232 -0.3175667 0.0023374 -0.000258 0.000010 0.000193 0.000234 0.0000063 0.0000064 0.000080 0.000121 1990 12 2 48227 0.131418 0.086968 -0.3198010 0.0021367 -0.000191 -0.000089 0.000309 0.000371 0.0000061 0.0000056 0.000081 0.000121 1990 12 3 48228 0.128466 0.086191 -0.3218805 0.0020397 0.000002 0.000051 0.000579 0.000507 0.0000048 0.0000055 0.000190 0.000147 1990 12 4 48229 0.125843 0.085632 -0.3239308 0.0020756 0.000191 0.000305 0.000367 0.000320 0.0000048 0.0000052 0.000193 0.000148 1990 12 5 48230 0.122676 0.084508 -0.3260719 0.0022059 0.000270 0.000484 0.000339 0.000294 0.0000056 0.0000103 0.000213 0.000169 1990 12 6 48231 0.118698 0.082840 -0.3283582 0.0023571 0.000265 0.000501 0.000637 0.000714 0.0000157 0.0000133 0.000331 0.000379 1990 12 7 48232 0.114548 0.081513 -0.3307751 0.0024751 0.000275 0.000401 0.000850 0.001061 0.0000210 0.0000123 0.000341 0.000434 1990 12 8 48233 0.111041 0.080951 -0.3332796 0.0025396 0.000320 0.000284 0.000519 0.000549 0.0000090 0.0000146 0.000169 0.000191 1990 12 9 48234 0.108148 0.080718 -0.3358208 0.0025405 0.000339 0.000232 0.000258 0.000266 0.0000082 0.0000082 0.000157 0.000175 1990 12 10 48235 0.104824 0.080099 -0.3383322 0.0024612 0.000260 0.000250 0.000217 0.000222 0.0000075 0.0000074 0.000156 0.000176 1990 12 11 48236 0.101297 0.078776 -0.3407236 0.0022909 0.000081 0.000246 0.000214 0.000218 0.0000065 0.0000078 0.000151 0.000183 1990 12 12 48237 0.098315 0.077211 -0.3429030 0.0020482 -0.000117 0.000165 0.000266 0.000276 0.0000081 0.0000080 0.000143 0.000214 1990 12 13 48238 0.094939 0.076500 -0.3448166 0.0017933 -0.000232 0.000184 0.000294 0.000300 0.0000096 0.0000079 0.000140 0.000212 1990 12 14 48239 0.090725 0.076034 -0.3464937 0.0015977 -0.000141 0.000372 0.000225 0.000217 0.0000076 0.0000087 0.000131 0.000159 1990 12 15 48240 0.086589 0.074458 -0.3480238 0.0014876 0.000182 0.000604 0.000225 0.000228 0.0000078 0.0000078 0.000098 0.000165 1990 12 16 48241 0.083364 0.072748 -0.3494870 0.0014357 0.000443 0.000795 0.000229 0.000238 0.0000081 0.0000097 0.000086 0.000171 1990 12 17 48242 0.080697 0.071834 -0.3509172 0.0014117 0.000467 0.000795 0.000361 0.000161 0.0000115 0.0000090 0.000136 0.000135 1990 12 18 48243 0.077615 0.071257 -0.3523331 0.0014277 0.000333 0.000482 0.000366 0.000158 0.0000100 0.0000090 0.000148 0.000125 1990 12 19 48244 0.073891 0.070405 -0.3537933 0.0015314 0.000178 -0.000041 0.000260 0.000186 0.0000065 0.0000082 0.000107 0.000115 1990 12 20 48245 0.070751 0.069661 -0.3554118 0.0017321 0.000021 -0.000319 0.000340 0.000314 0.0000064 0.0000150 0.000108 0.000125 1990 12 21 48246 0.068248 0.069293 -0.3572663 0.0019734 -0.000109 -0.000293 0.001176 0.001081 0.0000235 0.0000237 0.000360 0.000363 1990 12 22 48247 0.064898 0.069227 -0.3593586 0.0021928 -0.000147 -0.000252 0.000958 0.001199 0.0000410 0.0000216 0.000465 0.000301 1990 12 23 48248 0.060207 0.069333 -0.3616424 0.0023584 -0.000061 -0.000298 0.000407 0.000651 0.0000197 0.0000301 0.000236 0.000140 1990 12 24 48249 0.055281 0.069404 -0.3640564 0.0024619 0.000126 -0.000325 0.000522 0.000838 0.0000191 0.0000188 0.000230 0.000136 1990 12 25 48250 0.051236 0.069350 -0.3665392 0.0024995 0.000334 -0.000252 0.001046 0.001440 0.0000180 0.0000142 0.000226 0.000138 1990 12 26 48251 0.047946 0.069333 -0.3690238 0.0024614 0.000459 -0.000111 0.000439 0.000240 0.0000094 0.0000139 0.000165 0.000211 1990 12 27 48252 0.044344 0.069615 -0.3714325 0.0023423 0.000432 0.000010 0.000361 0.000198 0.0000099 0.0000106 0.000174 0.000226 1990 12 28 48253 0.039780 0.070181 -0.3736905 0.0021596 0.000269 0.000029 0.000397 0.000265 0.0000119 0.0000095 0.000211 0.000292 1990 12 29 48254 0.034862 0.070528 -0.3757549 0.0019626 0.000081 -0.000029 0.000271 0.000259 0.0000092 0.0000097 0.000171 0.000265 1990 12 30 48255 0.030112 0.070419 -0.3776436 0.0018229 0.000039 -0.000113 0.000217 0.000213 0.0000074 0.0000081 0.000140 0.000217 1990 12 31 48256 0.025545 0.070119 -0.3794463 0.0018047 0.000187 -0.000171 0.000208 0.000204 0.0000070 0.0000071 0.000133 0.000206 1991 1 1 48257 0.021270 0.070078 0.6186998 0.0019320 0.000395 -0.000148 0.000909 0.000883 0.0000067 0.0000069 0.000136 0.000133 1991 1 2 48258 0.017516 0.070628 0.6166596 0.0021703 0.000468 -0.000011 0.000558 0.000583 0.0000068 0.0000070 0.000138 0.000131 1991 1 3 48259 0.014416 0.071687 0.6143571 0.0024353 0.000292 0.000211 0.000379 0.000407 0.0000072 0.0000086 0.000144 0.000139 1991 1 4 48260 0.011808 0.072667 0.6118135 0.0026297 -0.000057 0.000430 0.000378 0.000424 0.0000103 0.0000139 0.000177 0.000183 1991 1 5 48261 0.009047 0.073700 0.6091364 0.0027007 -0.000298 0.000515 0.000493 0.000604 0.0000205 0.0000230 0.000230 0.000272 1991 1 6 48262 0.006048 0.075104 0.6064503 0.0026609 -0.000260 0.000420 0.001015 0.000881 0.0000356 0.0000171 0.000490 0.000464 1991 1 7 48263 0.003346 0.076624 0.6038424 0.0025507 -0.000025 0.000232 0.000485 0.000485 0.0000137 0.0000213 0.000303 0.000231 1991 1 8 48264 0.000927 0.077905 0.6013635 0.0023992 0.000194 0.000105 0.000251 0.000263 0.0000070 0.0000111 0.000163 0.000122 1991 1 9 48265 -0.001995 0.078934 0.5990477 0.0022201 0.000226 0.000150 0.000304 0.000304 0.0000086 0.0000099 0.000198 0.000146 1991 1 10 48266 -0.005362 0.079860 0.5969187 0.0020425 0.000100 0.000171 0.000454 0.000302 0.0000128 0.0000113 0.000220 0.000213 1991 1 11 48267 -0.009013 0.080930 0.5949512 0.0019083 -0.000056 0.000115 0.000525 0.000213 0.0000141 0.0000118 0.000156 0.000269 1991 1 12 48268 -0.012967 0.082169 0.5930843 0.0018271 -0.000104 0.000147 0.000461 0.000231 0.0000108 0.0000109 0.000158 0.000218 1991 1 13 48269 -0.016788 0.083225 0.5912744 0.0017866 0.000103 0.000273 0.000406 0.000367 0.0000077 0.0000092 0.000175 0.000160 1991 1 14 48270 -0.020163 0.083680 0.5894867 0.0017935 0.000538 0.000375 0.000569 0.000532 0.0000076 0.0000106 0.000177 0.000159 1991 1 15 48271 -0.023704 0.083424 0.5876647 0.0018635 0.000836 0.000362 0.000865 0.000763 0.0000136 0.0000116 0.000207 0.000227 1991 1 16 48272 -0.027380 0.083431 0.5857415 0.0019903 0.000651 0.000221 0.000551 0.000403 0.0000155 0.0000118 0.000203 0.000243 1991 1 17 48273 -0.030892 0.084506 0.5836729 0.0021395 0.000065 0.000025 0.000350 0.000272 0.0000101 0.0000113 0.000173 0.000201 1991 1 18 48274 -0.035151 0.085495 0.5814606 0.0022758 0.000024 -0.000087 0.000212 0.000223 0.0000071 0.0000082 0.000146 0.000169 1991 1 19 48275 -0.039645 0.085936 0.5791305 0.0023825 0.000439 -0.000078 0.000237 0.000278 0.0000064 0.0000067 0.000137 0.000160 1991 1 20 48276 -0.043913 0.086191 0.5767156 0.0024514 0.000849 0.000013 0.000775 0.000869 0.0000063 0.0000049 0.000136 0.000158 1991 1 21 48277 -0.048024 0.086654 0.5742556 0.0024734 0.001009 0.000113 0.000858 0.000854 0.0000035 0.0000049 0.000094 0.000080 1991 1 22 48278 -0.051599 0.087464 0.5717996 0.0024366 0.000844 0.000155 0.000143 0.000148 0.0000034 0.0000036 0.000093 0.000079 1991 1 23 48279 -0.054207 0.088491 0.5694096 0.0023296 0.000457 0.000114 0.000147 0.000152 0.0000037 0.0000043 0.000097 0.000083 1991 1 24 48280 -0.055923 0.089629 0.5671572 0.0021531 0.000049 0.000022 0.000201 0.000203 0.0000052 0.0000065 0.000123 0.000107 1991 1 25 48281 -0.057576 0.091019 0.5651038 0.0019467 -0.000242 -0.000048 0.000399 0.000385 0.0000094 0.0000084 0.000160 0.000148 1991 1 26 48282 -0.060070 0.093014 0.5632445 0.0017889 -0.000338 -0.000057 0.000996 0.000935 0.0000117 0.0000090 0.000160 0.000159 1991 1 27 48283 -0.063399 0.095285 0.5614890 0.0017493 -0.000237 -0.000036 0.000347 0.000571 0.0000087 0.0000105 0.000107 0.000135 1991 1 28 48284 -0.066763 0.096751 0.5597006 0.0018467 -0.000015 -0.000046 0.000269 0.000436 0.0000092 0.0000105 0.000113 0.000142 1991 1 29 48285 -0.069986 0.097313 0.5577570 0.0020396 0.000213 -0.000123 0.000323 0.000427 0.0000123 0.0000089 0.000142 0.000176 1991 1 30 48286 -0.074337 0.098901 0.5556038 0.0022663 0.000332 -0.000248 0.000333 0.000355 0.0000087 0.0000085 0.000179 0.000205 1991 1 31 48287 -0.079588 0.101429 0.5532347 0.0024787 0.000328 -0.000305 0.000290 0.000302 0.0000047 0.0000068 0.000168 0.000168 1991 2 1 48288 -0.084243 0.103112 0.5506799 0.0026304 0.000275 -0.000182 0.000363 0.000374 0.0000050 0.0000061 0.000165 0.000158 1991 2 2 48289 -0.088557 0.104446 0.5480172 0.0026815 0.000228 0.000078 0.000344 0.000360 0.0000074 0.0000064 0.000162 0.000142 1991 2 3 48290 -0.092809 0.105630 0.5453553 0.0026189 0.000204 0.000319 0.000347 0.000363 0.0000078 0.0000081 0.000161 0.000141 1991 2 4 48291 -0.096779 0.106662 0.5428039 0.0024614 0.000216 0.000400 0.000649 0.000567 0.0000088 0.0000084 0.000146 0.000158 1991 2 5 48292 -0.100131 0.107692 0.5404417 0.0022529 0.000251 0.000289 0.000441 0.000386 0.0000091 0.0000088 0.000143 0.000162 1991 2 6 48293 -0.103245 0.109326 0.5382953 0.0020465 0.000264 0.000075 0.000294 0.000281 0.0000087 0.0000088 0.000143 0.000157 1991 2 7 48294 -0.106351 0.111033 0.5363375 0.0018846 0.000183 -0.000057 0.000225 0.000236 0.0000085 0.0000100 0.000149 0.000154 1991 2 8 48295 -0.109165 0.111827 0.5345089 0.0017839 0.000014 -0.000001 0.000348 0.000361 0.0000112 0.0000124 0.000189 0.000203 1991 2 9 48296 -0.111655 0.112662 0.5327474 0.0017473 -0.000017 0.000059 0.000822 0.000814 0.0000163 0.0000107 0.000252 0.000298 1991 2 10 48297 -0.114047 0.114720 0.5309889 0.0017763 0.000174 0.000013 0.000953 0.000975 0.0000103 0.0000100 0.000224 0.000274 1991 2 11 48298 -0.116892 0.117633 0.5291698 0.0018656 0.000414 -0.000063 0.000159 0.000167 0.0000036 0.0000069 0.000108 0.000131 1991 2 12 48299 -0.120480 0.120304 0.5272362 0.0020039 0.000487 -0.000067 0.000157 0.000165 0.0000035 0.0000034 0.000108 0.000124 1991 2 13 48300 -0.124374 0.122268 0.5251470 0.0021786 0.000306 0.000002 0.000172 0.000175 0.0000032 0.0000036 0.000103 0.000105 1991 2 14 48301 -0.127376 0.124626 0.5228728 0.0023725 0.000090 -0.000152 0.000202 0.000181 0.0000038 0.0000043 0.000086 0.000092 1991 2 15 48302 -0.130161 0.127359 0.5204072 0.0025545 0.000006 -0.000327 0.000295 0.000240 0.0000055 0.0000057 0.000077 0.000089 1991 2 16 48303 -0.133428 0.130219 0.5177818 0.0026813 0.000030 -0.000254 0.000561 0.000460 0.0000076 0.0000071 0.000123 0.000128 1991 2 17 48304 -0.136868 0.133440 0.5150738 0.0027119 0.000054 -0.000057 0.000459 0.000399 0.0000087 0.0000082 0.000215 0.000172 1991 2 18 48305 -0.140197 0.136799 0.5123928 0.0026280 -0.000006 0.000055 0.000567 0.000488 0.0000087 0.0000107 0.000216 0.000173 1991 2 19 48306 -0.143001 0.139783 0.5098493 0.0024478 -0.000101 0.000021 0.000975 0.000835 0.0000126 0.0000117 0.000187 0.000241 1991 2 20 48307 -0.145384 0.142420 0.5075168 0.0022249 -0.000108 -0.000067 0.000537 0.000503 0.0000146 0.0000114 0.000181 0.000272 1991 2 21 48308 -0.148200 0.145670 0.5054016 0.0020316 0.000036 -0.000093 0.000269 0.000298 0.0000102 0.0000106 0.000154 0.000213 1991 2 22 48309 -0.151538 0.149548 0.5034369 0.0019280 0.000225 -0.000068 0.000159 0.000188 0.0000066 0.0000084 0.000117 0.000149 1991 2 23 48310 -0.154781 0.153092 0.5015136 0.0019349 0.000295 -0.000073 0.000156 0.000182 0.0000065 0.0000070 0.000115 0.000147 1991 2 24 48311 -0.157698 0.155566 0.4995268 0.0020401 0.000233 -0.000108 0.000215 0.000127 0.0000073 0.0000070 0.000115 0.000189 1991 2 25 48312 -0.160495 0.157102 0.4973951 0.0022201 0.000153 -0.000118 0.000239 0.000120 0.0000076 0.0000074 0.000115 0.000202 1991 2 26 48313 -0.163297 0.158674 0.4950614 0.0024492 0.000161 -0.000065 0.000226 0.000137 0.0000075 0.0000077 0.000120 0.000149 1991 2 27 48314 -0.165757 0.161604 0.4924934 0.0026896 0.000236 -0.000009 0.000242 0.000265 0.0000079 0.0000096 0.000143 0.000108 1991 2 28 48315 -0.167608 0.165783 0.4897026 0.0028846 0.000277 -0.000036 0.000369 0.000398 0.0000117 0.0000140 0.000188 0.000145 1991 3 1 48316 -0.169396 0.168294 0.4867618 0.0029784 0.000198 -0.000102 0.000703 0.000539 0.0000201 0.0000151 0.000254 0.000245 1991 3 2 48317 -0.171574 0.170302 0.4837880 0.0029441 0.000109 -0.000126 0.000982 0.000654 0.0000185 0.0000158 0.000263 0.000302 1991 3 3 48318 -0.173782 0.173510 0.4809077 0.0027903 0.000102 -0.000069 0.000794 0.000913 0.0000115 0.0000144 0.000232 0.000248 1991 3 4 48319 -0.175634 0.177033 0.4782264 0.0025511 0.000119 0.000049 0.000394 0.000505 0.0000104 0.0000109 0.000223 0.000232 1991 3 5 48320 -0.177593 0.180246 0.4758092 0.0022703 0.000075 0.000166 0.000449 0.000581 0.0000104 0.0000116 0.000222 0.000231 1991 3 6 48321 -0.179634 0.183228 0.4736778 0.0019922 -0.000013 0.000214 0.000822 0.001261 0.0000128 0.0000120 0.000196 0.000180 1991 3 7 48322 -0.181570 0.186445 0.4718090 0.0017622 -0.000043 0.000167 0.000496 0.000789 0.0000136 0.0000120 0.000190 0.000172 1991 3 8 48323 -0.183803 0.189991 0.4701325 0.0016245 0.000069 0.000051 0.000458 0.000626 0.0000111 0.0000109 0.000143 0.000156 1991 3 9 48324 -0.186244 0.193398 0.4685357 0.0016061 0.000301 -0.000053 0.000275 0.000360 0.0000082 0.0000096 0.000098 0.000130 1991 3 10 48325 -0.188296 0.196737 0.4668951 0.0016985 0.000535 -0.000072 0.000223 0.000293 0.0000081 0.0000099 0.000097 0.000129 1991 3 11 48326 -0.189547 0.200251 0.4651158 0.0018646 0.000642 -0.000007 0.000327 0.000399 0.0000115 0.0000104 0.000149 0.000163 1991 3 12 48327 -0.190165 0.203958 0.4631481 0.0020638 0.000561 0.000076 0.000393 0.000452 0.0000127 0.0000087 0.000180 0.000174 1991 3 13 48328 -0.190833 0.207838 0.4609779 0.0022711 0.000343 0.000099 0.000262 0.000275 0.0000058 0.0000080 0.000161 0.000115 1991 3 14 48329 -0.192336 0.212002 0.4586055 0.0024808 0.000158 0.000017 0.000151 0.000140 0.0000033 0.0000046 0.000117 0.000075 1991 3 15 48330 -0.194547 0.216360 0.4560279 0.0026940 0.000128 -0.000126 0.000122 0.000100 0.0000033 0.0000039 0.000095 0.000084 1991 3 16 48331 -0.195711 0.220103 0.4532425 0.0028687 -0.000002 -0.000108 0.000150 0.000120 0.0000045 0.0000057 0.000118 0.000110 1991 3 17 48332 -0.196541 0.223463 0.4503260 0.0029280 -0.000120 -0.000028 0.000278 0.000243 0.0000081 0.0000063 0.000234 0.000138 1991 3 18 48333 -0.198373 0.227038 0.4474242 0.0028382 -0.000051 -0.000059 0.000514 0.000551 0.0000081 0.0000078 0.000163 0.000163 1991 3 19 48334 -0.200603 0.230691 0.4446780 0.0026330 0.000077 -0.000153 0.000397 0.000435 0.0000075 0.0000081 0.000142 0.000172 1991 3 20 48335 -0.202132 0.234095 0.4421676 0.0023879 0.000119 -0.000205 0.000434 0.000481 0.0000081 0.0000107 0.000152 0.000186 1991 3 21 48336 -0.202783 0.237271 0.4398892 0.0021781 0.000108 -0.000180 0.000532 0.000644 0.0000139 0.0000115 0.000235 0.000341 1991 3 22 48337 -0.203483 0.240683 0.4377807 0.0020435 0.000165 -0.000122 0.000422 0.000516 0.0000148 0.0000123 0.000245 0.000358 1991 3 23 48338 -0.204703 0.244612 0.4357633 0.0019970 0.000259 -0.000103 0.000246 0.000270 0.0000108 0.0000124 0.000165 0.000134 1991 3 24 48339 -0.205916 0.248827 0.4337505 0.0020505 0.000253 -0.000149 0.000240 0.000231 0.0000100 0.0000103 0.000150 0.000120 1991 3 25 48340 -0.207120 0.253064 0.4316376 0.0022151 0.000156 -0.000213 0.000263 0.000210 0.0000099 0.0000095 0.000148 0.000124 1991 3 26 48341 -0.209659 0.257415 0.4293125 0.0024673 0.000371 -0.000151 0.000249 0.000204 0.0000090 0.0000092 0.000156 0.000126 1991 3 27 48342 -0.212824 0.261606 0.4267141 0.0027247 0.000534 -0.000047 0.000339 0.000288 0.0000084 0.0000064 0.000161 0.000125 1991 3 28 48343 -0.215096 0.265763 0.4238905 0.0028864 0.000432 0.000001 0.000289 0.000275 0.0000037 0.0000060 0.000144 0.000099 1991 3 29 48344 -0.216091 0.269720 0.4209777 0.0028992 0.000162 -0.000051 0.000192 0.000187 0.0000035 0.0000036 0.000142 0.000097 1991 3 30 48345 -0.216385 0.273258 0.4181278 0.0027815 -0.000070 -0.000192 0.000190 0.000186 0.0000035 0.0000036 0.000142 0.000097 1991 3 31 48346 -0.216669 0.276596 0.4154405 0.0025970 -0.000137 -0.000365 0.000205 0.000198 0.0000038 0.0000071 0.000146 0.000104 1991 4 1 48347 -0.217278 0.280277 0.4129452 0.0024066 -0.000050 -0.000489 0.000475 0.000353 0.0000108 0.0000058 0.000179 0.000208 1991 4 2 48348 -0.218140 0.284665 0.4106248 0.0022417 0.000098 -0.000495 0.000354 0.000320 0.0000079 0.0000080 0.000170 0.000170 1991 4 3 48349 -0.218897 0.289544 0.4084491 0.0021061 0.000209 -0.000366 0.000239 0.000265 0.0000052 0.0000071 0.000153 0.000121 1991 4 4 48350 -0.219084 0.294038 0.4063936 0.0019997 0.000273 -0.000124 0.000311 0.000344 0.0000063 0.0000081 0.000183 0.000135 1991 4 5 48351 -0.219002 0.298380 0.4044274 0.0019343 0.000349 0.000075 0.000634 0.000605 0.0000110 0.0000095 0.000247 0.000175 1991 4 6 48352 -0.219390 0.302470 0.4025016 0.0019256 0.000443 0.000123 0.000932 0.000817 0.0000126 0.0000091 0.000232 0.000175 1991 4 7 48353 -0.220226 0.306313 0.4005541 0.0019799 0.000488 0.000042 0.000258 0.000257 0.0000072 0.0000099 0.000120 0.000112 1991 4 8 48354 -0.220923 0.310184 0.3985238 0.0020889 0.000424 -0.000082 0.000251 0.000249 0.0000072 0.0000076 0.000120 0.000112 1991 4 9 48355 -0.221022 0.314228 0.3963643 0.0022317 0.000260 -0.000166 0.000277 0.000269 0.0000080 0.0000107 0.000131 0.000120 1991 4 10 48356 -0.220742 0.318252 0.3940562 0.0023836 0.000112 -0.000199 0.000463 0.000393 0.0000143 0.0000154 0.000200 0.000167 1991 4 11 48357 -0.220429 0.322052 0.3916024 0.0025284 0.000097 -0.000212 0.000678 0.000569 0.0000227 0.0000158 0.000312 0.000260 1991 4 12 48358 -0.219730 0.325893 0.3890163 0.0026517 0.000177 -0.000189 0.000639 0.000697 0.0000173 0.0000155 0.000275 0.000270 1991 4 13 48359 -0.218614 0.330030 0.3863281 0.0027264 0.000249 -0.000122 0.000371 0.000426 0.0000083 0.0000119 0.000133 0.000132 1991 4 14 48360 -0.217282 0.334360 0.3836005 0.0027146 0.000215 -0.000037 0.000384 0.000475 0.0000065 0.0000067 0.000104 0.000105 1991 4 15 48361 -0.215885 0.338351 0.3809342 0.0025887 0.000103 0.000003 0.000138 0.000269 0.0000052 0.0000058 0.000084 0.000104 1991 4 16 48362 -0.214555 0.341986 0.3784437 0.0023633 0.000040 -0.000062 0.000111 0.000211 0.0000051 0.0000054 0.000083 0.000105 1991 4 17 48363 -0.213452 0.345663 0.3762046 0.0021050 0.000086 -0.000204 0.000192 0.000312 0.0000057 0.0000052 0.000098 0.000123 1991 4 18 48364 -0.212757 0.349618 0.3742071 0.0019102 0.000134 -0.000301 0.000217 0.000223 0.0000053 0.0000045 0.000138 0.000188 1991 4 19 48365 -0.212638 0.353874 0.3723439 0.0018616 0.000082 -0.000240 0.000129 0.000132 0.0000034 0.0000041 0.000096 0.000128 1991 4 20 48366 -0.212633 0.358062 0.3704445 0.0019774 0.000052 -0.000053 0.000109 0.000112 0.0000028 0.0000034 0.000082 0.000109 1991 4 21 48367 -0.212317 0.361950 0.3683631 0.0022016 0.000124 0.000108 0.000126 0.000128 0.0000033 0.0000059 0.000085 0.000116 1991 4 22 48368 -0.211801 0.365675 0.3660343 0.0024519 0.000236 0.000084 0.000238 0.000220 0.0000089 0.0000059 0.000094 0.000141 1991 4 23 48369 -0.211430 0.369519 0.3634702 0.0026645 0.000292 -0.000142 0.000233 0.000206 0.0000085 0.0000083 0.000099 0.000139 1991 4 24 48370 -0.211346 0.373628 0.3607290 0.0028063 0.000263 -0.000391 0.000230 0.000179 0.0000077 0.0000096 0.000145 0.000139 1991 4 25 48371 -0.211313 0.377816 0.3578879 0.0028560 0.000237 -0.000378 0.000366 0.000282 0.0000107 0.0000109 0.000237 0.000191 1991 4 26 48372 -0.211033 0.381677 0.3550478 0.0027984 0.000248 -0.000119 0.000614 0.000641 0.0000141 0.0000115 0.000234 0.000218 1991 4 27 48373 -0.210525 0.384986 0.3523163 0.0026463 0.000235 0.000060 0.000502 0.000613 0.0000123 0.0000118 0.000193 0.000186 1991 4 28 48374 -0.210034 0.388010 0.3497699 0.0024433 0.000171 0.000017 0.000299 0.000351 0.0000095 0.0000098 0.000144 0.000165 1991 4 29 48375 -0.209651 0.391396 0.3474318 0.0022413 0.000091 -0.000095 0.000200 0.000231 0.0000072 0.0000084 0.000107 0.000142 1991 4 30 48376 -0.209247 0.395549 0.3452781 0.0020763 0.000050 -0.000072 0.000200 0.000232 0.0000072 0.0000083 0.000107 0.000142 1991 5 1 48377 -0.208561 0.400032 0.3432620 0.0019601 0.000067 0.000092 0.000266 0.000300 0.0000094 0.0000144 0.000138 0.000173 1991 5 2 48378 -0.207411 0.403785 0.3413368 0.0018901 0.000101 0.000130 0.000772 0.000623 0.0000215 0.0000140 0.000292 0.000263 1991 5 3 48379 -0.205877 0.406397 0.3394597 0.0018660 0.000101 -0.000112 0.000622 0.000521 0.0000185 0.0000191 0.000257 0.000250 1991 5 4 48380 -0.204278 0.408991 0.3375842 0.0019015 0.000091 -0.000256 0.000647 0.000556 0.0000168 0.0000142 0.000235 0.000241 1991 5 5 48381 -0.202825 0.412497 0.3356395 0.0020152 0.000096 -0.000141 0.001090 0.001033 0.0000099 0.0000117 0.000144 0.000176 1991 5 6 48382 -0.201414 0.416745 0.3335420 0.0022002 0.000109 -0.000020 0.000315 0.000301 0.0000066 0.0000078 0.000098 0.000128 1991 5 7 48383 -0.199769 0.421140 0.3312339 0.0024153 0.000122 -0.000147 0.000210 0.000202 0.0000057 0.0000053 0.000096 0.000115 1991 5 8 48384 -0.197760 0.425162 0.3287136 0.0026055 0.000130 -0.000420 0.000163 0.000159 0.0000040 0.0000049 0.000091 0.000090 1991 5 9 48385 -0.195572 0.428691 0.3260334 0.0027418 0.000138 -0.000329 0.000172 0.000169 0.0000042 0.0000069 0.000102 0.000094 1991 5 10 48386 -0.193502 0.432042 0.3232502 0.0028206 0.000208 0.000000 0.000289 0.000296 0.0000099 0.0000080 0.000212 0.000145 1991 5 11 48387 -0.191704 0.435643 0.3204218 0.0028281 0.000365 0.000089 0.000306 0.000316 0.0000118 0.0000097 0.000233 0.000151 1991 5 12 48388 -0.190037 0.439612 0.3176280 0.0027445 0.000498 -0.000164 0.000242 0.000271 0.0000095 0.0000097 0.000175 0.000147 1991 5 13 48389 -0.188207 0.443696 0.3149606 0.0025752 0.000458 -0.000462 0.000195 0.000220 0.0000077 0.0000084 0.000138 0.000143 1991 5 14 48390 -0.186003 0.447511 0.3124870 0.0023646 0.000216 -0.000467 0.000197 0.000177 0.0000074 0.0000073 0.000141 0.000150 1991 5 15 48391 -0.183454 0.450856 0.3102154 0.0021787 -0.000042 -0.000170 0.000202 0.000138 0.0000070 0.0000077 0.000148 0.000167 1991 5 16 48392 -0.180765 0.453868 0.3080923 0.0020639 -0.000028 0.000036 0.000236 0.000163 0.0000079 0.0000090 0.000164 0.000150 1991 5 17 48393 -0.177993 0.456874 0.3060430 0.0020361 0.000180 0.000060 0.000341 0.000479 0.0000110 0.0000095 0.000193 0.000126 1991 5 18 48394 -0.175090 0.460135 0.3039859 0.0020937 0.000332 0.000001 0.000345 0.000527 0.0000111 0.0000096 0.000194 0.000126 1991 5 19 48395 -0.172031 0.463605 0.3018435 0.0022124 0.000302 -0.000066 0.000256 0.000272 0.0000082 0.0000087 0.000136 0.000114 1991 5 20 48396 -0.168876 0.466991 0.2995725 0.0023399 0.000147 -0.000126 0.000202 0.000190 0.0000062 0.0000064 0.000105 0.000102 1991 5 21 48397 -0.165753 0.470035 0.2971909 0.0024117 0.000003 -0.000183 0.000197 0.000166 0.0000046 0.0000045 0.000099 0.000099 1991 5 22 48398 -0.162790 0.472790 0.2947815 0.0023788 -0.000046 -0.000209 0.000204 0.000137 0.0000028 0.0000038 0.000085 0.000088 1991 5 23 48399 -0.160029 0.475544 0.2924626 0.0022384 -0.000060 -0.000128 0.000294 0.000187 0.0000030 0.0000059 0.000092 0.000093 1991 5 24 48400 -0.157243 0.478260 0.2903267 0.0020322 -0.000091 0.000006 0.000513 0.000304 0.0000091 0.0000084 0.000178 0.000138 1991 5 25 48401 -0.154207 0.481151 0.2884112 0.0018123 -0.000145 0.000063 0.000654 0.000382 0.0000138 0.0000092 0.000197 0.000144 1991 5 26 48402 -0.151104 0.484219 0.2867052 0.0016180 -0.000196 -0.000009 0.001043 0.000876 0.0000094 0.0000105 0.000175 0.000144 1991 5 27 48403 -0.148196 0.487280 0.2851683 0.0014709 -0.000193 -0.000165 0.000315 0.000294 0.0000071 0.0000083 0.000154 0.000145 1991 5 28 48404 -0.145329 0.490273 0.2837483 0.0013789 -0.000093 -0.000312 0.000264 0.000246 0.0000071 0.0000083 0.000155 0.000145 1991 5 29 48405 -0.142305 0.493154 0.2823900 0.0013435 0.000111 -0.000370 0.000535 0.000500 0.0000095 0.0000238 0.000205 0.000194 1991 5 30 48406 -0.139244 0.495805 0.2810391 0.0013613 0.000373 -0.000334 0.001491 0.001243 0.0000404 0.0000181 0.000544 0.000580 1991 5 31 48407 -0.136247 0.498160 0.2796466 0.0014256 0.000579 -0.000259 0.000821 0.000665 0.0000267 0.0000312 0.000329 0.000310 1991 6 1 48408 -0.133470 0.500602 0.2781707 0.0015307 0.000579 -0.000234 0.000649 0.000532 0.0000219 0.0000181 0.000270 0.000250 1991 6 2 48409 -0.130921 0.503449 0.2765735 0.0016734 0.000353 -0.000273 0.000328 0.000223 0.0000094 0.0000131 0.000150 0.000152 1991 6 3 48410 -0.128298 0.506558 0.2748186 0.0018480 0.000051 -0.000305 0.000146 0.000078 0.0000044 0.0000069 0.000068 0.000068 1991 6 4 48411 -0.125198 0.509539 0.2728790 0.0020378 -0.000129 -0.000247 0.000145 0.000078 0.0000044 0.0000044 0.000068 0.000068 1991 6 5 48412 -0.121491 0.512108 0.2707515 0.0022134 -0.000076 -0.000082 0.000146 0.000078 0.0000044 0.0000066 0.000069 0.000068 1991 6 6 48413 -0.117542 0.514352 0.2684676 0.0023425 0.000139 0.000083 0.000302 0.000171 0.0000087 0.0000075 0.000130 0.000151 1991 6 7 48414 -0.113952 0.516624 0.2660888 0.0024017 0.000334 0.000098 0.000391 0.000344 0.0000106 0.0000097 0.000163 0.000244 1991 6 8 48415 -0.111010 0.519234 0.2636917 0.0023832 0.000352 -0.000099 0.000390 0.000345 0.0000106 0.0000098 0.000163 0.000244 1991 6 9 48416 -0.108279 0.522205 0.2613495 0.0022945 0.000185 -0.000391 0.000268 0.000278 0.0000089 0.0000090 0.000159 0.000169 1991 6 10 48417 -0.104940 0.525288 0.2591194 0.0021570 -0.000045 -0.000563 0.000202 0.000224 0.0000073 0.0000076 0.000153 0.000128 1991 6 11 48418 -0.100623 0.528161 0.2570321 0.0020036 -0.000186 -0.000476 0.000196 0.000194 0.0000063 0.0000059 0.000140 0.000126 1991 6 12 48419 -0.095995 0.530609 0.2550850 0.0018765 -0.000170 -0.000209 0.000196 0.000157 0.0000045 0.0000055 0.000115 0.000120 1991 6 13 48420 -0.092253 0.532620 0.2532357 0.0018244 -0.000057 -0.000037 0.000298 0.000232 0.0000048 0.0000076 0.000114 0.000123 1991 6 14 48421 -0.089318 0.534451 0.2513930 0.0018775 0.000081 -0.000043 0.000523 0.000416 0.0000107 0.0000086 0.000127 0.000137 1991 6 15 48422 -0.086048 0.536432 0.2494558 0.0020116 0.000190 -0.000124 0.000680 0.000537 0.0000123 0.0000099 0.000128 0.000138 1991 6 16 48423 -0.082145 0.538452 0.2473726 0.0021572 0.000217 -0.000178 0.000979 0.001033 0.0000091 0.0000097 0.000138 0.000150 1991 6 17 48424 -0.078182 0.540236 0.2451687 0.0022405 0.000133 -0.000167 0.000244 0.000285 0.0000071 0.0000081 0.000156 0.000174 1991 6 18 48425 -0.074556 0.541825 0.2429307 0.0022212 -0.000043 -0.000112 0.000226 0.000265 0.0000071 0.0000071 0.000156 0.000175 1991 6 19 48426 -0.071174 0.543452 0.2407632 0.0021027 -0.000224 -0.000062 0.000438 0.000511 0.0000071 0.0000086 0.000156 0.000173 1991 6 20 48427 -0.067712 0.545220 0.2387510 0.0019136 -0.000270 -0.000066 0.000581 0.000527 0.0000101 0.0000087 0.000157 0.000140 1991 6 21 48428 -0.064280 0.546880 0.2369488 0.0016834 -0.000079 -0.000147 0.000336 0.000297 0.0000103 0.0000102 0.000157 0.000139 1991 6 22 48429 -0.061282 0.548138 0.2353859 0.0014373 0.000314 -0.000283 0.000329 0.000292 0.0000103 0.0000095 0.000157 0.000139 1991 6 23 48430 -0.058828 0.549128 0.2340672 0.0012017 0.000687 -0.000403 0.000251 0.000257 0.0000086 0.0000088 0.000147 0.000121 1991 6 24 48431 -0.056560 0.550335 0.2329685 0.0010051 0.000783 -0.000427 0.000214 0.000238 0.0000072 0.0000082 0.000136 0.000105 1991 6 25 48432 -0.053964 0.552103 0.2320377 0.0008683 0.000513 -0.000336 0.000272 0.000278 0.0000078 0.0000093 0.000146 0.000113 1991 6 26 48433 -0.050798 0.554228 0.2312095 0.0007988 0.000108 -0.000210 0.000443 0.000302 0.0000114 0.0000131 0.000210 0.000164 1991 6 27 48434 -0.047271 0.556258 0.2304182 0.0007967 0.000013 -0.000199 0.000712 0.000394 0.0000185 0.0000098 0.000320 0.000304 1991 6 28 48435 -0.043837 0.558169 0.2295975 0.0008586 0.000087 -0.000260 0.000413 0.000298 0.0000082 0.0000110 0.000204 0.000313 1991 6 29 48436 -0.040535 0.559862 0.2286878 0.0009726 0.000028 -0.000280 0.000187 0.000129 0.0000036 0.0000060 0.000121 0.000148 1991 6 30 48437 -0.036915 0.560850 0.2276460 0.0011154 -0.000069 -0.000204 0.000194 0.000134 0.0000038 0.0000047 0.000133 0.000142 1991 7 1 48438 -0.033115 0.561677 0.2264580 0.0012594 -0.000075 -0.000166 0.000306 0.000215 0.0000059 0.0000044 0.000141 0.000150 1991 7 2 48439 -0.029683 0.562931 0.2251354 0.0013878 -0.000023 -0.000196 0.000282 0.000195 0.0000050 0.0000065 0.000103 0.000121 1991 7 3 48440 -0.026533 0.564049 0.2236972 0.0014936 0.000085 -0.000180 0.000385 0.000309 0.0000071 0.0000070 0.000143 0.000136 1991 7 4 48441 -0.022998 0.564742 0.2221681 0.0015571 0.000287 -0.000221 0.000566 0.000502 0.0000090 0.0000082 0.000180 0.000144 1991 7 5 48442 -0.018946 0.565484 0.2206062 0.0015445 0.000552 -0.000348 0.000857 0.000729 0.0000093 0.0000090 0.000184 0.000145 1991 7 6 48443 -0.014548 0.566525 0.2191022 0.0014371 0.000783 -0.000472 0.002499 0.002412 0.0000090 0.0000089 0.000167 0.000140 1991 7 7 48444 -0.010103 0.567697 0.2177492 0.0012511 0.000870 -0.000477 0.001268 0.001398 0.0000086 0.0000088 0.000145 0.000132 1991 7 8 48445 -0.005886 0.568657 0.2166040 0.0010381 0.000751 -0.000305 0.000402 0.000440 0.0000086 0.0000088 0.000146 0.000132 1991 7 9 48446 -0.001932 0.569308 0.2156573 0.0008711 0.000456 -0.000022 0.000286 0.000273 0.0000090 0.0000081 0.000155 0.000131 1991 7 10 48447 0.001791 0.569662 0.2148270 0.0008195 0.000138 0.000112 0.000234 0.000175 0.0000076 0.0000070 0.000140 0.000118 1991 7 11 48448 0.005340 0.569666 0.2139743 0.0009224 -0.000006 -0.000181 0.000154 0.000121 0.0000051 0.0000071 0.000092 0.000099 1991 7 12 48449 0.009679 0.569876 0.2129458 0.0011602 -0.000053 -0.000366 0.000198 0.000156 0.0000067 0.0000096 0.000115 0.000125 1991 7 13 48450 0.013728 0.569801 0.2116410 0.0014579 -0.000043 -0.000280 0.000405 0.000338 0.0000142 0.0000144 0.000212 0.000205 1991 7 14 48451 0.017192 0.570212 0.2100467 0.0017189 -0.000007 -0.000093 0.000717 0.000606 0.0000222 0.0000134 0.000364 0.000252 1991 7 15 48452 0.021634 0.571115 0.2082423 0.0018636 0.000044 0.000041 0.000505 0.000419 0.0000127 0.0000146 0.000226 0.000158 1991 7 16 48453 0.027015 0.571964 0.2063654 0.0018652 0.000065 0.000022 0.000303 0.000250 0.0000070 0.0000088 0.000144 0.000113 1991 7 17 48454 0.031775 0.572573 0.2045492 0.0017519 0.000006 -0.000115 0.000220 0.000169 0.0000048 0.0000064 0.000121 0.000106 1991 7 18 48455 0.035594 0.572694 0.2028821 0.0015714 -0.000105 -0.000203 0.000201 0.000207 0.0000058 0.0000051 0.000140 0.000130 1991 7 19 48456 0.040812 0.572886 0.2014106 0.0013576 -0.000197 -0.000136 0.000133 0.000188 0.0000053 0.0000060 0.000118 0.000106 1991 7 20 48457 0.045976 0.572086 0.2001597 0.0011297 -0.000181 0.000011 0.000158 0.000218 0.0000061 0.0000072 0.000127 0.000122 1991 7 21 48458 0.050090 0.571563 0.1991370 0.0009309 -0.000062 0.000149 0.000285 0.000332 0.0000091 0.0000074 0.000158 0.000183 1991 7 22 48459 0.054118 0.572322 0.1982791 0.0008208 -0.000009 0.000208 0.000257 0.000303 0.0000086 0.0000105 0.000146 0.000159 1991 7 23 48460 0.058858 0.573121 0.1974736 0.0008026 -0.000172 0.000151 0.000353 0.000402 0.0000119 0.0000125 0.000183 0.000236 1991 7 24 48461 0.064191 0.573141 0.1966512 0.0008352 -0.000403 0.000031 0.000580 0.000610 0.0000163 0.0000139 0.000234 0.000533 1991 7 25 48462 0.068795 0.572463 0.1957825 0.0009013 -0.000366 -0.000165 0.000749 0.000808 0.0000160 0.0000177 0.000246 0.000453 1991 7 26 48463 0.072871 0.571631 0.1948330 0.0010114 -0.000067 -0.000354 0.000656 0.000680 0.0000190 0.0000179 0.000264 0.000280 1991 7 27 48464 0.077660 0.570713 0.1937510 0.0011711 0.000161 -0.000366 0.000552 0.000573 0.0000198 0.0000192 0.000231 0.000250 1991 7 28 48465 0.082143 0.570336 0.1924899 0.0013544 0.000081 -0.000168 0.000497 0.000532 0.0000193 0.0000167 0.000183 0.000217 1991 7 29 48466 0.085230 0.570743 0.1910493 0.0015010 -0.000210 0.000057 0.000459 0.000464 0.0000136 0.0000140 0.000177 0.000199 1991 7 30 48467 0.089332 0.570417 0.1895029 0.0015514 -0.000153 -0.000144 0.000358 0.000324 0.0000088 0.0000118 0.000212 0.000153 1991 7 31 48468 0.092887 0.569720 0.1879675 0.0015074 0.000049 -0.000442 0.000390 0.000379 0.0000101 0.0000118 0.000247 0.000169 1991 8 1 48469 0.095528 0.568656 0.1865121 0.0014193 0.000138 -0.000512 0.000508 0.000591 0.0000149 0.0000125 0.000234 0.000217 1991 8 2 48470 0.098323 0.567693 0.1851514 0.0013174 0.000139 -0.000367 0.000615 0.000705 0.0000149 0.0000135 0.000199 0.000212 1991 8 3 48471 0.101517 0.567296 0.1838935 0.0011925 0.000158 -0.000169 0.000443 0.000601 0.0000122 0.0000121 0.000177 0.000146 1991 8 4 48472 0.104714 0.565596 0.1827716 0.0010391 0.000260 -0.000021 0.000286 0.000397 0.0000094 0.0000103 0.000164 0.000108 1991 8 5 48473 0.107708 0.563970 0.1818054 0.0008968 0.000304 -0.000100 0.000245 0.000288 0.0000084 0.0000079 0.000154 0.000100 1991 8 6 48474 0.111118 0.563048 0.1809518 0.0008292 0.000180 -0.000177 0.000266 0.000252 0.0000065 0.0000063 0.000131 0.000102 1991 8 7 48475 0.115215 0.561628 0.1801090 0.0008785 -0.000031 0.000018 0.000226 0.000190 0.0000042 0.0000055 0.000105 0.000091 1991 8 8 48476 0.118697 0.560350 0.1791557 0.0010474 -0.000151 0.000035 0.000211 0.000178 0.0000045 0.0000080 0.000113 0.000101 1991 8 9 48477 0.121503 0.559265 0.1779887 0.0013002 -0.000116 -0.000149 0.000441 0.000426 0.0000118 0.0000095 0.000181 0.000221 1991 8 10 48478 0.124705 0.557861 0.1765553 0.0015749 0.000012 -0.000253 0.000495 0.000494 0.0000145 0.0000088 0.000187 0.000244 1991 8 11 48479 0.128712 0.556183 0.1748664 0.0018038 0.000101 -0.000148 0.000382 0.000452 0.0000059 0.0000092 0.000124 0.000117 1991 8 12 48480 0.132968 0.554737 0.1729930 0.0019331 0.000034 0.000089 0.000213 0.000255 0.0000040 0.0000049 0.000092 0.000081 1991 8 13 48481 0.136757 0.553725 0.1710470 0.0019374 -0.000210 0.000291 0.000151 0.000180 0.0000040 0.0000040 0.000092 0.000081 1991 8 14 48482 0.140071 0.552637 0.1691520 0.0018259 -0.000509 0.000339 0.000176 0.000209 0.0000040 0.0000061 0.000093 0.000082 1991 8 15 48483 0.143140 0.550916 0.1674095 0.0016389 -0.000643 0.000262 0.000670 0.000690 0.0000082 0.0000068 0.000131 0.000200 1991 8 16 48484 0.146292 0.548574 0.1658711 0.0014314 -0.000462 0.000182 0.000432 0.000488 0.0000096 0.0000110 0.000143 0.000234 1991 8 17 48485 0.149798 0.546412 0.1645325 0.0012525 -0.000026 0.000211 0.000464 0.000662 0.0000138 0.0000174 0.000191 0.000257 1991 8 18 48486 0.152753 0.544474 0.1633467 0.0011291 0.000342 0.000370 0.000700 0.001368 0.0000253 0.0000120 0.000281 0.000260 1991 8 19 48487 0.154720 0.542393 0.1622523 0.0010653 0.000393 0.000517 0.000424 0.000381 0.0000101 0.0000175 0.000206 0.000145 1991 8 20 48488 0.156695 0.540504 0.1611931 0.0010536 0.000163 0.000464 0.000345 0.000277 0.0000098 0.0000079 0.000202 0.000146 1991 8 21 48489 0.159192 0.538889 0.1601230 0.0010880 -0.000088 0.000192 0.000304 0.000202 0.0000057 0.0000064 0.000171 0.000170 1991 8 22 48490 0.161413 0.536952 0.1589986 0.0011746 -0.000057 -0.000091 0.000188 0.000136 0.0000031 0.0000047 0.000115 0.000147 1991 8 23 48491 0.163708 0.534958 0.1577619 0.0013240 0.000182 -0.000185 0.000239 0.000187 0.0000037 0.0000048 0.000127 0.000175 1991 8 24 48492 0.166547 0.532641 0.1563465 0.0015234 0.000185 -0.000059 0.000440 0.000403 0.0000065 0.0000049 0.000164 0.000246 1991 8 25 48493 0.169803 0.530330 0.1547195 0.0017300 -0.000085 0.000097 0.000360 0.000258 0.0000062 0.0000063 0.000099 0.000113 1991 8 26 48494 0.172396 0.528039 0.1528996 0.0019001 -0.000232 0.000040 0.000256 0.000184 0.0000061 0.0000064 0.000099 0.000104 1991 8 27 48495 0.173992 0.525898 0.1509403 0.0020094 -0.000009 -0.000280 0.000280 0.000223 0.0000067 0.0000070 0.000128 0.000110 1991 8 28 48496 0.176402 0.524654 0.1489069 0.0020460 0.000201 -0.000555 0.000350 0.000314 0.0000080 0.0000130 0.000195 0.000128 1991 8 29 48497 0.179609 0.522701 0.1468744 0.0020040 0.000193 -0.000671 0.000805 0.000874 0.0000194 0.0000107 0.000263 0.000289 1991 8 30 48498 0.182294 0.520419 0.1449184 0.0018924 -0.000103 -0.000631 0.000504 0.000630 0.0000135 0.0000151 0.000205 0.000190 1991 8 31 48499 0.184410 0.518218 0.1430966 0.0017436 -0.000367 -0.000460 0.000409 0.000514 0.0000109 0.0000118 0.000181 0.000154 1991 9 1 48500 0.186664 0.516088 0.1414228 0.0016105 -0.000396 -0.000247 0.000620 0.000690 0.0000100 0.0000100 0.000156 0.000171 1991 9 2 48501 0.189444 0.513866 0.1398524 0.0015484 -0.000297 -0.000114 0.000565 0.000544 0.0000092 0.0000095 0.000130 0.000274 1991 9 3 48502 0.192535 0.511529 0.1382925 0.0015938 -0.000265 -0.000115 0.000428 0.000400 0.0000090 0.0000071 0.000130 0.000264 1991 9 4 48503 0.195289 0.509310 0.1366287 0.0017512 -0.000360 -0.000186 0.000248 0.000156 0.0000049 0.0000064 0.000120 0.000117 1991 9 5 48504 0.197899 0.507055 0.1347612 0.0019934 -0.000399 -0.000169 0.000200 0.000118 0.0000038 0.0000048 0.000116 0.000092 1991 9 6 48505 0.200893 0.504693 0.1326306 0.0022697 -0.000239 -0.000019 0.000234 0.000158 0.0000047 0.0000036 0.000133 0.000118 1991 9 7 48506 0.204220 0.502756 0.1302341 0.0025085 -0.000055 0.000012 0.000181 0.000154 0.0000034 0.0000039 0.000114 0.000143 1991 9 8 48507 0.207165 0.500902 0.1276478 0.0026431 0.000015 -0.000048 0.000211 0.000182 0.0000031 0.0000056 0.000111 0.000156 1991 9 9 48508 0.209787 0.498636 0.1249936 0.0026519 -0.000005 0.000014 0.000402 0.000367 0.0000078 0.0000047 0.000205 0.000203 1991 9 10 48509 0.212526 0.496392 0.1223865 0.0025545 -0.000052 0.000256 0.000293 0.000322 0.0000063 0.0000066 0.000127 0.000114 1991 9 11 48510 0.214490 0.494206 0.1199117 0.0023864 -0.000108 0.000554 0.000348 0.000384 0.0000053 0.0000069 0.000106 0.000095 1991 9 12 48511 0.215421 0.491534 0.1176208 0.0021837 -0.000207 0.000680 0.000458 0.000378 0.0000074 0.0000072 0.000152 0.000153 1991 9 13 48512 0.216470 0.489029 0.1155348 0.0019764 -0.000368 0.000483 0.000355 0.000270 0.0000092 0.0000101 0.000185 0.000205 1991 9 14 48513 0.218349 0.487237 0.1136489 0.0017862 -0.000524 0.000048 0.000380 0.000370 0.0000127 0.0000140 0.000217 0.000238 1991 9 15 48514 0.219825 0.484889 0.1119393 0.0016357 -0.000478 -0.000212 0.000388 0.000588 0.0000189 0.0000108 0.000250 0.000273 1991 9 16 48515 0.220764 0.481434 0.1103536 0.0015499 -0.000207 -0.000138 0.000277 0.000353 0.0000089 0.0000136 0.000189 0.000251 1991 9 17 48516 0.222653 0.477886 0.1088163 0.0015405 0.000093 0.000045 0.000323 0.000401 0.0000084 0.0000086 0.000183 0.000247 1991 9 18 48517 0.225617 0.474859 0.1072522 0.0015993 0.000223 0.000097 0.000437 0.000524 0.0000084 0.0000087 0.000183 0.000238 1991 9 19 48518 0.228225 0.471983 0.1056026 0.0017100 0.000145 0.000021 0.000385 0.000328 0.0000091 0.0000088 0.000158 0.000117 1991 9 20 48519 0.230061 0.469083 0.1038246 0.0018586 -0.000053 -0.000037 0.000343 0.000284 0.0000091 0.0000091 0.000157 0.000115 1991 9 21 48520 0.231451 0.466089 0.1018861 0.0020361 -0.000242 0.000050 0.000343 0.000284 0.0000091 0.0000090 0.000157 0.000115 1991 9 22 48521 0.232912 0.463009 0.0997616 0.0022287 -0.000350 0.000222 0.000276 0.000280 0.0000089 0.0000088 0.000148 0.000128 1991 9 23 48522 0.234753 0.459975 0.0974465 0.0024044 -0.000379 0.000299 0.000227 0.000275 0.0000085 0.0000089 0.000137 0.000158 1991 9 24 48523 0.236976 0.457209 0.0949780 0.0025140 -0.000365 0.000168 0.000245 0.000289 0.0000088 0.0000092 0.000147 0.000167 1991 9 25 48524 0.239376 0.454925 0.0924475 0.0025135 -0.000332 -0.000078 0.000397 0.000302 0.0000098 0.0000089 0.000196 0.000214 1991 9 26 48525 0.241806 0.452929 0.0899765 0.0024175 -0.000259 -0.000157 0.000553 0.000218 0.0000090 0.0000099 0.000166 0.000212 1991 9 27 48526 0.244357 0.449193 0.0876260 0.0022655 -0.000320 -0.000046 0.000408 0.000244 0.0000100 0.0000103 0.000169 0.000159 1991 9 28 48527 0.246104 0.445595 0.0854412 0.0020867 -0.000391 -0.000071 0.000490 0.000432 0.0000117 0.0000097 0.000188 0.000142 1991 9 29 48528 0.247466 0.442965 0.0834306 0.0019330 -0.000333 -0.000279 0.000798 0.000735 0.0000093 0.0000095 0.000158 0.000140 1991 9 30 48529 0.249138 0.440306 0.0815415 0.0018582 -0.000179 -0.000407 0.000230 0.000217 0.0000073 0.0000083 0.000128 0.000140 1991 10 1 48530 0.250489 0.437478 0.0796783 0.0018888 -0.000032 -0.000228 0.000221 0.000210 0.0000074 0.0000084 0.000128 0.000141 1991 10 2 48531 0.251094 0.434432 0.0777353 0.0020161 0.000012 0.000162 0.000428 0.000418 0.0000095 0.0000120 0.000159 0.000152 1991 10 3 48532 0.251576 0.430871 0.0756320 0.0022017 -0.000048 0.000286 0.000630 0.000628 0.0000167 0.0000103 0.000240 0.000161 1991 10 4 48533 0.252175 0.426971 0.0733363 0.0023910 -0.000161 -0.000130 0.000373 0.000514 0.0000111 0.0000130 0.000193 0.000136 1991 10 5 48534 0.252717 0.423775 0.0708727 0.0025301 -0.000307 -0.000618 0.000311 0.000495 0.0000093 0.0000094 0.000172 0.000124 1991 10 6 48535 0.253393 0.421276 0.0683126 0.0025808 -0.000420 -0.000724 0.000242 0.000304 0.0000077 0.0000076 0.000124 0.000110 1991 10 7 48536 0.254663 0.418058 0.0657517 0.0025312 -0.000405 -0.000436 0.000156 0.000170 0.0000058 0.0000070 0.000085 0.000088 1991 10 8 48537 0.256661 0.413016 0.0632834 0.0023960 -0.000228 -0.000019 0.000169 0.000185 0.0000064 0.0000086 0.000093 0.000095 1991 10 9 48538 0.258757 0.407075 0.0609772 0.0022066 0.000025 0.000220 0.000282 0.000324 0.0000114 0.0000110 0.000165 0.000155 1991 10 10 48539 0.259695 0.403330 0.0588696 0.0019978 0.000132 0.000199 0.000430 0.000537 0.0000156 0.0000102 0.000329 0.000183 1991 10 11 48540 0.259637 0.401779 0.0569665 0.0017985 0.000076 0.000049 0.000253 0.000324 0.0000089 0.0000122 0.000235 0.000113 1991 10 12 48541 0.259721 0.399947 0.0552497 0.0016292 0.000001 -0.000033 0.000248 0.000317 0.0000087 0.0000082 0.000231 0.000110 1991 10 13 48542 0.260252 0.396788 0.0536831 0.0015042 -0.000026 -0.000013 0.000405 0.000404 0.0000076 0.0000075 0.000129 0.000112 1991 10 14 48543 0.260693 0.392986 0.0522172 0.0014358 -0.000024 0.000024 0.000334 0.000288 0.0000062 0.0000062 0.000093 0.000113 1991 10 15 48544 0.260651 0.389449 0.0507902 0.0014352 -0.000042 -0.000009 0.000216 0.000180 0.0000048 0.0000048 0.000093 0.000105 1991 10 16 48545 0.260593 0.385996 0.0493300 0.0015080 -0.000111 -0.000042 0.000150 0.000122 0.0000034 0.0000040 0.000095 0.000091 1991 10 17 48546 0.261201 0.382622 0.0477639 0.0016420 -0.000197 0.000105 0.000144 0.000121 0.0000033 0.0000040 0.000105 0.000084 1991 10 18 48547 0.261954 0.379290 0.0460434 0.0018131 -0.000202 0.000160 0.000191 0.000170 0.0000046 0.0000036 0.000140 0.000105 1991 10 19 48548 0.262019 0.376171 0.0441432 0.0019941 -0.000142 0.000011 0.000151 0.000135 0.0000038 0.0000036 0.000127 0.000092 1991 10 20 48549 0.261628 0.373060 0.0420684 0.0021516 -0.000113 -0.000127 0.000109 0.000094 0.0000027 0.0000033 0.000086 0.000083 1991 10 21 48550 0.261485 0.370025 0.0398609 0.0022560 -0.000174 -0.000081 0.000115 0.000097 0.0000028 0.0000032 0.000081 0.000103 1991 10 22 48551 0.261419 0.366827 0.0375832 0.0022937 -0.000245 0.000061 0.000175 0.000164 0.0000038 0.0000029 0.000097 0.000119 1991 10 23 48552 0.260957 0.362960 0.0353017 0.0022558 -0.000188 0.000106 0.000156 0.000167 0.0000030 0.0000039 0.000079 0.000095 1991 10 24 48553 0.260682 0.359627 0.0330925 0.0021410 -0.000074 -0.000004 0.000182 0.000217 0.0000041 0.0000058 0.000100 0.000117 1991 10 25 48554 0.260320 0.356109 0.0310245 0.0019859 -0.000072 -0.000111 0.000317 0.000417 0.0000085 0.0000159 0.000184 0.000213 1991 10 26 48555 0.259747 0.352401 0.0291045 0.0018642 -0.000191 -0.000130 0.000836 0.001227 0.0000277 0.0000167 0.000305 0.000602 1991 10 27 48556 0.259175 0.349268 0.0272627 0.0018410 -0.000224 -0.000107 0.000657 0.000828 0.0000250 0.0000173 0.000235 0.000452 1991 10 28 48557 0.258854 0.346763 0.0253830 0.0019374 -0.000104 -0.000065 0.000223 0.000230 0.0000070 0.0000151 0.000103 0.000124 1991 10 29 48558 0.258843 0.344123 0.0233555 0.0021217 0.000016 0.000029 0.000226 0.000187 0.0000052 0.0000052 0.000096 0.000102 1991 10 30 48559 0.258923 0.340890 0.0211239 0.0023338 0.000056 0.000125 0.000183 0.000118 0.0000035 0.0000044 0.000093 0.000078 1991 10 31 48560 0.258881 0.337508 0.0186915 0.0025332 0.000144 0.000074 0.000163 0.000104 0.0000037 0.0000043 0.000102 0.000080 1991 11 1 48561 0.259302 0.334371 0.0160776 0.0026983 0.000160 -0.000043 0.000200 0.000192 0.0000052 0.0000033 0.000136 0.000108 1991 11 2 48562 0.260664 0.331504 0.0133256 0.0027890 -0.000049 -0.000042 0.000131 0.000139 0.0000028 0.0000038 0.000096 0.000102 1991 11 3 48563 0.262069 0.328760 0.0105339 0.0027673 -0.000213 0.000042 0.000111 0.000120 0.0000023 0.0000037 0.000082 0.000097 1991 11 4 48564 0.262726 0.326134 0.0078219 0.0026348 -0.000169 0.000096 0.000173 0.000186 0.0000045 0.0000043 0.000084 0.000100 1991 11 5 48565 0.262859 0.323698 0.0052849 0.0024283 -0.000073 0.000087 0.000206 0.000220 0.0000063 0.0000054 0.000085 0.000101 1991 11 6 48566 0.262853 0.321287 0.0029715 0.0022010 -0.000060 0.000030 0.000344 0.000366 0.0000063 0.0000075 0.000086 0.000101 1991 11 7 48567 0.262600 0.318515 0.0008745 0.0020052 -0.000053 -0.000011 0.000638 0.000730 0.0000088 0.0000071 0.000140 0.000120 1991 11 8 48568 0.262102 0.315498 -0.0010583 0.0018736 0.000073 0.000017 0.000350 0.000388 0.0000080 0.0000074 0.000149 0.000128 1991 11 9 48569 0.261728 0.312821 -0.0028972 0.0018114 0.000326 0.000117 0.000378 0.000334 0.0000061 0.0000067 0.000163 0.000156 1991 11 10 48570 0.261136 0.309781 -0.0047058 0.0018106 0.000413 0.000227 0.000533 0.000416 0.0000054 0.0000088 0.000179 0.000197 1991 11 11 48571 0.259924 0.306148 -0.0065403 0.0018654 0.000269 0.000269 0.000799 0.000587 0.0000115 0.0000064 0.000286 0.000310 1991 11 12 48572 0.258891 0.303034 -0.0084538 0.0019689 0.000127 0.000207 0.000375 0.000236 0.0000075 0.0000077 0.000148 0.000172 1991 11 13 48573 0.258404 0.300822 -0.0104893 0.0021055 0.000106 0.000070 0.000193 0.000122 0.0000039 0.0000057 0.000078 0.000092 1991 11 14 48574 0.257556 0.298350 -0.0126690 0.0022546 0.000025 -0.000065 0.000191 0.000126 0.0000040 0.0000054 0.000080 0.000089 1991 11 15 48575 0.256262 0.295427 -0.0149954 0.0023989 -0.000057 -0.000042 0.000288 0.000285 0.0000070 0.0000049 0.000145 0.000121 1991 11 16 48576 0.255056 0.292508 -0.0174567 0.0025268 0.000028 0.000184 0.000331 0.000259 0.0000058 0.0000061 0.000184 0.000152 1991 11 17 48577 0.253753 0.289063 -0.0200327 0.0026180 0.000216 0.000292 0.000352 0.000233 0.0000052 0.0000064 0.000216 0.000182 1991 11 18 48578 0.252439 0.285349 -0.0226710 0.0026395 0.000305 0.000164 0.000281 0.000274 0.0000071 0.0000063 0.000166 0.000129 1991 11 19 48579 0.251711 0.282391 -0.0252866 0.0025736 0.000171 0.000003 0.000346 0.000241 0.0000075 0.0000072 0.000138 0.000118 1991 11 20 48580 0.251716 0.279860 -0.0277949 0.0024332 -0.000102 -0.000037 0.000533 0.000150 0.0000073 0.0000070 0.000105 0.000108 1991 11 21 48581 0.251830 0.276499 -0.0301400 0.0022432 -0.000230 -0.000049 0.000379 0.000168 0.0000066 0.0000066 0.000131 0.000135 1991 11 22 48582 0.251075 0.273709 -0.0322870 0.0020632 -0.000119 -0.000032 0.000190 0.000270 0.0000058 0.0000060 0.000105 0.000104 1991 11 23 48583 0.249536 0.271733 -0.0342932 0.0019801 0.000060 0.000064 0.000154 0.000272 0.0000055 0.0000057 0.000086 0.000085 1991 11 24 48584 0.247944 0.269647 -0.0362877 0.0020377 0.000153 0.000171 0.000172 0.000236 0.0000056 0.0000057 0.000097 0.000093 1991 11 25 48585 0.246722 0.266776 -0.0384080 0.0022229 0.000149 0.000179 0.000279 0.000202 0.0000060 0.0000060 0.000158 0.000128 1991 11 26 48586 0.245826 0.262958 -0.0407566 0.0024812 0.000124 0.000060 0.000289 0.000214 0.0000063 0.0000073 0.000159 0.000129 1991 11 27 48587 0.244866 0.258720 -0.0433698 0.0027379 0.000145 -0.000022 0.000356 0.000302 0.0000086 0.0000091 0.000171 0.000140 1991 11 28 48588 0.243537 0.254735 -0.0462102 0.0029157 0.000187 0.000213 0.000495 0.000464 0.0000119 0.0000118 0.000230 0.000191 1991 11 29 48589 0.242293 0.250940 -0.0491672 0.0029695 0.000170 0.000460 0.000698 0.000709 0.0000151 0.0000189 0.000339 0.000289 1991 11 30 48590 0.241467 0.247255 -0.0521140 0.0029055 0.000081 0.000495 0.001446 0.001283 0.0000260 0.0000219 0.000499 0.000522 1991 12 1 48591 0.240974 0.243890 -0.0549493 0.0027567 -0.000025 0.000349 0.001272 0.001121 0.0000287 0.0000194 0.000424 0.000471 1991 12 2 48592 0.240540 0.241058 -0.0576091 0.0025635 -0.000074 0.000172 0.000520 0.000535 0.0000129 0.0000197 0.000232 0.000225 1991 12 3 48593 0.240089 0.238640 -0.0600696 0.0023647 -0.000048 0.000081 0.000442 0.000405 0.0000107 0.0000104 0.000197 0.000190 1991 12 4 48594 0.239431 0.236238 -0.0623434 0.0021899 0.000007 0.000077 0.000383 0.000226 0.0000080 0.0000073 0.000153 0.000175 1991 12 5 48595 0.238026 0.233730 -0.0644648 0.0020551 0.000052 0.000134 0.000196 0.000123 0.0000038 0.0000062 0.000077 0.000089 1991 12 6 48596 0.236850 0.231978 -0.0664760 0.0019606 -0.000004 0.000168 0.000247 0.000163 0.0000043 0.0000059 0.000084 0.000099 1991 12 7 48597 0.235270 0.230596 -0.0684109 0.0019089 -0.000075 0.000210 0.000590 0.000451 0.0000080 0.0000056 0.000129 0.000173 1991 12 8 48598 0.231957 0.228246 -0.0703167 0.0019159 -0.000045 0.000255 0.000683 0.000706 0.0000069 0.0000064 0.000159 0.000208 1991 12 9 48599 0.227862 0.224641 -0.0722606 0.0019903 0.000078 0.000214 0.000243 0.000261 0.0000048 0.0000060 0.000179 0.000188 1991 12 10 48600 0.224764 0.220568 -0.0743090 0.0021181 0.000202 0.000044 0.000258 0.000269 0.0000050 0.0000048 0.000180 0.000202 1991 12 11 48601 0.222944 0.217073 -0.0765013 0.0022653 0.000210 -0.000167 0.000250 0.000211 0.0000049 0.0000043 0.000120 0.000143 1991 12 12 48602 0.220848 0.214469 -0.0788370 0.0024027 0.000059 -0.000216 0.000152 0.000126 0.0000036 0.0000046 0.000069 0.000077 1991 12 13 48603 0.219090 0.211689 -0.0812975 0.0025103 -0.000115 0.000010 0.000171 0.000146 0.0000043 0.0000046 0.000077 0.000089 1991 12 14 48604 0.217679 0.209055 -0.0838432 0.0025748 -0.000081 0.000238 0.000259 0.000243 0.0000057 0.0000043 0.000117 0.000150 1991 12 15 48605 0.215805 0.206909 -0.0864288 0.0025954 0.000083 0.000316 0.000359 0.000388 0.0000044 0.0000053 0.000208 0.000194 1991 12 16 48606 0.213277 0.204696 -0.0890133 0.0025712 0.000109 0.000319 0.000281 0.000355 0.0000049 0.0000046 0.000141 0.000168 1991 12 17 48607 0.211152 0.201980 -0.0915507 0.0024893 0.000041 0.000249 0.000160 0.000190 0.0000048 0.0000040 0.000094 0.000136 1991 12 18 48608 0.209939 0.198999 -0.0939768 0.0023378 0.000013 0.000117 0.000104 0.000100 0.0000030 0.0000039 0.000070 0.000097 1991 12 19 48609 0.208367 0.196628 -0.0962240 0.0021391 -0.000083 0.000051 0.000091 0.000079 0.0000030 0.0000038 0.000080 0.000077 1991 12 20 48610 0.207424 0.194692 -0.0982715 0.0019622 -0.000091 0.000037 0.000125 0.000105 0.0000045 0.0000043 0.000119 0.000098 1991 12 21 48611 0.206032 0.193061 -0.1001830 0.0018883 0.000084 0.000034 0.000240 0.000218 0.0000056 0.0000047 0.000174 0.000158 1991 12 22 48612 0.203579 0.191087 -0.1020907 0.0019515 0.000264 -0.000030 0.000260 0.000255 0.0000049 0.0000067 0.000196 0.000161 1991 12 23 48613 0.200731 0.188577 -0.1041202 0.0021188 0.000309 -0.000139 0.000359 0.000303 0.0000077 0.0000068 0.000175 0.000179 1991 12 24 48614 0.197806 0.186359 -0.1063391 0.0023260 0.000243 -0.000150 0.000497 0.000412 0.0000086 0.0000083 0.000173 0.000182 1991 12 25 48615 0.195088 0.184744 -0.1087550 0.0025097 0.000125 0.000012 0.000871 0.000766 0.0000088 0.0000104 0.000173 0.000180 1991 12 26 48616 0.192831 0.183026 -0.1113209 0.0026174 0.000009 0.000284 0.000593 0.000509 0.0000122 0.0000105 0.000177 0.000148 1991 12 27 48617 0.191143 0.180371 -0.1139461 0.0026188 -0.000071 0.000525 0.000602 0.000510 0.0000123 0.0000123 0.000177 0.000148 1991 12 28 48618 0.189924 0.176863 -0.1165226 0.0025171 -0.000104 0.000610 0.000809 0.000674 0.0000123 0.0000112 0.000177 0.000148 1991 12 29 48619 0.188857 0.173800 -0.1189594 0.0023465 -0.000101 0.000491 0.001152 0.000970 0.0000101 0.0000103 0.000209 0.000178 1991 12 30 48620 0.187552 0.171723 -0.1212098 0.0021547 -0.000085 0.000217 0.000692 0.000724 0.0000084 0.0000092 0.000308 0.000285 1991 12 31 48621 0.185716 0.170217 -0.1232749 0.0019810 -0.000074 -0.000105 0.000684 0.000717 0.0000084 0.0000084 0.000308 0.000286 1992 1 1 48622 0.183318 0.168633 -0.1251865 0.0018467 -0.000071 -0.000343 0.000642 0.000679 0.0000084 0.0000092 0.000292 0.000280 1992 1 2 48623 0.180598 0.166756 -0.1269890 0.0017620 -0.000051 -0.000365 0.000262 0.000295 0.0000099 0.0000092 0.000130 0.000169 1992 1 3 48624 0.177883 0.164758 -0.1287347 0.0017370 0.000012 -0.000120 0.000257 0.000290 0.0000100 0.0000100 0.000128 0.000167 1992 1 4 48625 0.175363 0.162863 -0.1304871 0.0017809 0.000118 0.000310 0.000259 0.000292 0.0000100 0.0000080 0.000128 0.000167 1992 1 5 48626 0.172997 0.161078 -0.1323168 0.0018917 0.000220 0.000677 0.000519 0.000540 0.0000061 0.0000072 0.000137 0.000154 1992 1 6 48627 0.170678 0.159216 -0.1342843 0.0020499 0.000254 0.000729 0.000431 0.000402 0.0000044 0.0000050 0.000153 0.000139 1992 1 7 48628 0.168458 0.157115 -0.1364224 0.0022239 0.000196 0.000421 0.000224 0.000207 0.0000038 0.0000035 0.000122 0.000128 1992 1 8 48629 0.166474 0.154873 -0.1387302 0.0023849 0.000095 0.000041 0.000127 0.000116 0.0000027 0.0000033 0.000075 0.000100 1992 1 9 48630 0.163998 0.152960 -0.1411833 0.0025189 0.000062 0.000084 0.000159 0.000147 0.0000028 0.0000047 0.000074 0.000102 1992 1 10 48631 0.160948 0.151625 -0.1437537 0.0026201 0.000119 0.000498 0.000289 0.000307 0.0000066 0.0000057 0.000107 0.000156 1992 1 11 48632 0.158183 0.150579 -0.1464055 0.0026736 0.000195 0.000800 0.000472 0.000577 0.0000087 0.0000057 0.000113 0.000166 1992 1 12 48633 0.155467 0.149442 -0.1490815 0.0026627 0.000217 0.000750 0.000767 0.000911 0.0000048 0.0000061 0.000130 0.000140 1992 1 13 48634 0.152452 0.147926 -0.1517126 0.0025858 0.000153 0.000452 0.000242 0.000259 0.0000035 0.0000043 0.000175 0.000118 1992 1 14 48635 0.149460 0.146004 -0.1542394 0.0024601 0.000020 0.000169 0.000226 0.000237 0.0000037 0.0000044 0.000157 0.000116 1992 1 15 48636 0.146695 0.144094 -0.1566280 0.0023159 -0.000128 0.000067 0.000233 0.000226 0.0000053 0.0000054 0.000120 0.000111 1992 1 16 48637 0.143825 0.142787 -0.1588804 0.0021932 -0.000236 0.000055 0.000253 0.000242 0.0000071 0.0000070 0.000119 0.000125 1992 1 17 48638 0.140731 0.141874 -0.1610406 0.0021434 -0.000241 0.000064 0.000304 0.000314 0.0000087 0.0000073 0.000123 0.000207 1992 1 18 48639 0.137505 0.140836 -0.1632062 0.0022181 -0.000133 0.000082 0.000240 0.000271 0.0000076 0.0000077 0.000089 0.000123 1992 1 19 48640 0.134020 0.139896 -0.1655172 0.0024293 -0.000011 0.000029 0.000207 0.000235 0.0000067 0.0000058 0.000077 0.000096 1992 1 20 48641 0.130263 0.139010 -0.1680901 0.0027223 0.000068 -0.000065 0.000143 0.000143 0.0000041 0.0000053 0.000074 0.000059 1992 1 21 48642 0.126545 0.137704 -0.1709596 0.0030023 0.000129 -0.000074 0.000135 0.000136 0.0000038 0.0000038 0.000074 0.000058 1992 1 22 48643 0.123278 0.135980 -0.1740640 0.0031798 0.000156 0.000057 0.000121 0.000129 0.0000035 0.0000038 0.000078 0.000068 1992 1 23 48644 0.120645 0.134518 -0.1772712 0.0032027 0.000056 0.000242 0.000131 0.000141 0.0000038 0.0000054 0.000089 0.000080 1992 1 24 48645 0.118406 0.133451 -0.1804217 0.0030728 -0.000098 0.000335 0.000258 0.000251 0.0000073 0.0000061 0.000168 0.000126 1992 1 25 48646 0.116087 0.132344 -0.1833841 0.0028429 -0.000141 0.000258 0.000300 0.000280 0.0000084 0.0000060 0.000190 0.000135 1992 1 26 48647 0.113373 0.131044 -0.1860952 0.0025856 -0.000069 0.000088 0.000333 0.000323 0.0000047 0.0000058 0.000088 0.000094 1992 1 27 48648 0.110279 0.129718 -0.1885605 0.0023591 0.000009 -0.000018 0.000201 0.000205 0.0000032 0.0000040 0.000061 0.000072 1992 1 28 48649 0.107055 0.128415 -0.1908295 0.0021940 0.000013 0.000030 0.000145 0.000144 0.0000033 0.0000035 0.000062 0.000071 1992 1 29 48650 0.104022 0.126866 -0.1929700 0.0020988 0.000005 0.000147 0.000162 0.000125 0.0000037 0.0000039 0.000068 0.000068 1992 1 30 48651 0.101337 0.125513 -0.1950510 0.0020748 0.000185 0.000104 0.000267 0.000188 0.0000045 0.0000063 0.000077 0.000074 1992 1 31 48652 0.098486 0.124571 -0.1971441 0.0021166 0.000495 -0.000099 0.000429 0.000370 0.0000088 0.0000071 0.000115 0.000121 1992 2 1 48653 0.095786 0.123820 -0.1993067 0.0022017 0.000692 -0.000272 0.000536 0.000488 0.0000098 0.0000080 0.000121 0.000129 1992 2 2 48654 0.093570 0.123022 -0.2015649 0.0023031 0.000663 -0.000297 0.000863 0.000791 0.0000072 0.0000075 0.000120 0.000133 1992 2 3 48655 0.091643 0.122286 -0.2039226 0.0024076 0.000464 -0.000192 0.000259 0.000233 0.0000052 0.0000051 0.000117 0.000137 1992 2 4 48656 0.089704 0.121972 -0.2063811 0.0025170 0.000241 -0.000054 0.000200 0.000171 0.0000030 0.0000034 0.000095 0.000119 1992 2 5 48657 0.087418 0.122126 -0.2089495 0.0026330 0.000096 0.000020 0.000137 0.000113 0.0000017 0.0000024 0.000063 0.000086 1992 2 6 48658 0.084694 0.122134 -0.2116335 0.0027358 0.000007 0.000015 0.000120 0.000101 0.0000017 0.0000036 0.000065 0.000088 1992 2 7 48659 0.081940 0.121322 -0.2144025 0.0027870 0.000002 -0.000063 0.000252 0.000297 0.0000056 0.0000061 0.000114 0.000139 1992 2 8 48660 0.079412 0.119865 -0.2171867 0.0027588 0.000111 -0.000178 0.000396 0.000560 0.0000105 0.0000084 0.000177 0.000208 1992 2 9 48661 0.076684 0.118855 -0.2199006 0.0026541 0.000255 -0.000251 0.000402 0.000423 0.0000112 0.0000072 0.000222 0.000268 1992 2 10 48662 0.073760 0.118493 -0.2224804 0.0025014 0.000277 -0.000200 0.000126 0.000127 0.0000038 0.0000074 0.000061 0.000080 1992 2 11 48663 0.070993 0.118096 -0.2248976 0.0023315 0.000085 -0.000012 0.000131 0.000133 0.0000037 0.0000041 0.000062 0.000082 1992 2 12 48664 0.068187 0.117344 -0.2271496 0.0021703 -0.000204 0.000204 0.000210 0.000220 0.0000043 0.0000047 0.000098 0.000129 1992 2 13 48665 0.064612 0.116758 -0.2292581 0.0020550 -0.000282 0.000259 0.000344 0.000372 0.0000056 0.0000079 0.000165 0.000214 1992 2 14 48666 0.060752 0.116521 -0.2312919 0.0020334 -0.000101 0.000137 0.000370 0.000290 0.0000114 0.0000064 0.000224 0.000256 1992 2 15 48667 0.057467 0.116377 -0.2333634 0.0021344 0.000131 -0.000025 0.000206 0.000150 0.0000071 0.0000088 0.000115 0.000129 1992 2 16 48668 0.054299 0.116292 -0.2355936 0.0023459 0.000200 -0.000113 0.000218 0.000159 0.0000062 0.0000089 0.000099 0.000110 1992 2 17 48669 0.051083 0.116273 -0.2380688 0.0026131 0.000092 -0.000117 0.000570 0.000507 0.0000107 0.0000096 0.000180 0.000182 1992 2 18 48670 0.048307 0.116261 -0.2408057 0.0028569 -0.000034 -0.000111 0.000526 0.000587 0.0000129 0.0000129 0.000226 0.000219 1992 2 19 48671 0.045954 0.116303 -0.2437431 0.0030031 -0.000070 -0.000175 0.000630 0.000598 0.0000152 0.0000121 0.000263 0.000280 1992 2 20 48672 0.043299 0.116590 -0.2467603 0.0030029 -0.000089 -0.000298 0.000478 0.000546 0.0000113 0.0000110 0.000190 0.000205 1992 2 21 48673 0.040082 0.116896 -0.2497031 0.0028571 -0.000061 -0.000257 0.000237 0.000302 0.0000069 0.0000085 0.000128 0.000136 1992 2 22 48674 0.036256 0.117490 -0.2524478 0.0026296 0.000082 0.000086 0.000235 0.000262 0.0000057 0.0000061 0.000163 0.000169 1992 2 23 48675 0.032351 0.117807 -0.2549584 0.0024083 0.000221 0.000329 0.000260 0.000254 0.0000053 0.0000056 0.000199 0.000210 1992 2 24 48676 0.028877 0.117399 -0.2572777 0.0022466 0.000247 0.000228 0.000151 0.000166 0.0000055 0.0000052 0.000088 0.000118 1992 2 25 48677 0.025858 0.116674 -0.2594737 0.0021403 0.000175 -0.000036 0.000147 0.000143 0.0000052 0.0000050 0.000089 0.000114 1992 2 26 48678 0.023066 0.116191 -0.2615830 0.0020539 0.000088 -0.000195 0.000153 0.000113 0.0000045 0.0000050 0.000113 0.000117 1992 2 27 48679 0.020231 0.116020 -0.2636059 0.0019853 0.000070 -0.000158 0.000159 0.000118 0.0000049 0.0000065 0.000109 0.000111 1992 2 28 48680 0.016922 0.115724 -0.2655764 0.0019728 0.000141 -0.000013 0.000187 0.000192 0.0000084 0.0000069 0.000086 0.000097 1992 2 29 48681 0.013049 0.115125 -0.2675707 0.0020401 0.000254 0.000079 0.000263 0.000277 0.0000089 0.0000078 0.000085 0.000097 1992 3 1 48682 0.009217 0.114950 -0.2696698 0.0021782 0.000335 0.000049 0.000414 0.000452 0.0000073 0.0000074 0.000096 0.000104 1992 3 2 48683 0.005726 0.115557 -0.2719322 0.0023586 0.000331 -0.000047 0.000223 0.000285 0.0000059 0.0000059 0.000121 0.000118 1992 3 3 48684 0.002360 0.116619 -0.2743835 0.0025463 0.000234 -0.000106 0.000173 0.000163 0.0000046 0.0000043 0.000114 0.000110 1992 3 4 48685 -0.001164 0.117596 -0.2770136 0.0027072 0.000097 -0.000062 0.000106 0.000082 0.0000027 0.0000037 0.000095 0.000089 1992 3 5 48686 -0.004863 0.118267 -0.2797805 0.0028105 0.000017 0.000058 0.000108 0.000083 0.0000028 0.0000044 0.000096 0.000091 1992 3 6 48687 -0.008737 0.118887 -0.2826131 0.0028394 -0.000021 0.000094 0.000212 0.000196 0.0000061 0.0000044 0.000121 0.000116 1992 3 7 48688 -0.012711 0.119704 -0.2854371 0.0028076 -0.000074 -0.000046 0.000215 0.000185 0.0000061 0.0000058 0.000113 0.000088 1992 3 8 48689 -0.016431 0.120424 -0.2882101 0.0027276 -0.000033 -0.000061 0.000201 0.000164 0.0000055 0.0000055 0.000107 0.000077 1992 3 9 48690 -0.019656 0.120872 -0.2908828 0.0025990 0.000139 0.000096 0.000181 0.000199 0.0000049 0.0000050 0.000121 0.000079 1992 3 10 48691 -0.022531 0.121308 -0.2934110 0.0024575 0.000320 0.000139 0.000178 0.000176 0.0000045 0.0000044 0.000114 0.000083 1992 3 11 48692 -0.025401 0.122046 -0.2958141 0.0023800 0.000364 -0.000039 0.000184 0.000133 0.0000040 0.0000051 0.000095 0.000098 1992 3 12 48693 -0.028462 0.123106 -0.2981985 0.0024187 0.000212 -0.000147 0.000258 0.000183 0.0000058 0.0000071 0.000140 0.000149 1992 3 13 48694 -0.031972 0.124204 -0.3006851 0.0025686 0.000050 -0.000095 0.000270 0.000335 0.0000103 0.0000064 0.000273 0.000201 1992 3 14 48695 -0.034655 0.125916 -0.3033676 0.0027935 0.000114 0.000045 0.000298 0.000379 0.0000070 0.0000081 0.000230 0.000191 1992 3 15 48696 -0.037404 0.127937 -0.3062923 0.0030561 0.000305 0.000172 0.000505 0.000503 0.0000060 0.0000066 0.000204 0.000188 1992 3 16 48697 -0.041140 0.129732 -0.3094797 0.0033215 0.000414 0.000185 0.000365 0.000370 0.0000063 0.0000063 0.000142 0.000113 1992 3 17 48698 -0.044661 0.131568 -0.3129112 0.0035263 0.000340 0.000048 0.000331 0.000322 0.0000066 0.0000082 0.000143 0.000112 1992 3 18 48699 -0.047278 0.133816 -0.3164894 0.0035936 0.000124 -0.000180 0.000574 0.000337 0.0000100 0.0000092 0.000205 0.000146 1992 3 19 48700 -0.050326 0.135946 -0.3200497 0.0035053 -0.000054 -0.000382 0.000565 0.000285 0.0000117 0.0000088 0.000226 0.000159 1992 3 20 48701 -0.054276 0.137351 -0.3234613 0.0033145 -0.000073 -0.000336 0.000412 0.000368 0.0000076 0.0000086 0.000169 0.000140 1992 3 21 48702 -0.057870 0.139096 -0.3266605 0.0030690 0.000040 0.000080 0.000413 0.000366 0.0000055 0.0000063 0.000165 0.000154 1992 3 22 48703 -0.060949 0.141014 -0.3296029 0.0028159 0.000162 0.000382 0.000351 0.000303 0.0000049 0.0000061 0.000161 0.000172 1992 3 23 48704 -0.063808 0.142768 -0.3323111 0.0026220 0.000217 0.000285 0.000212 0.000209 0.0000067 0.0000061 0.000113 0.000197 1992 3 24 48705 -0.066489 0.144626 -0.3348719 0.0025169 0.000230 -0.000009 0.000203 0.000203 0.0000072 0.0000070 0.000109 0.000201 1992 3 25 48706 -0.068876 0.146852 -0.3373698 0.0024782 0.000260 -0.000201 0.000205 0.000205 0.0000072 0.0000088 0.000110 0.000200 1992 3 26 48707 -0.070861 0.149237 -0.3398505 0.0024754 0.000330 -0.000183 0.000338 0.000336 0.0000104 0.0000089 0.000195 0.000186 1992 3 27 48708 -0.072512 0.151405 -0.3423393 0.0025015 0.000413 -0.000025 0.000352 0.000349 0.0000106 0.0000105 0.000205 0.000185 1992 3 28 48709 -0.074126 0.153304 -0.3448678 0.0025677 0.000451 0.000121 0.000354 0.000352 0.0000106 0.0000108 0.000205 0.000185 1992 3 29 48710 -0.076156 0.155487 -0.3474825 0.0026794 0.000378 0.000166 0.000830 0.000746 0.0000109 0.0000110 0.000159 0.000212 1992 3 30 48711 -0.078770 0.158409 -0.3502265 0.0028196 0.000181 0.000116 0.001226 0.000833 0.0000113 0.0000115 0.000129 0.000281 1992 3 31 48712 -0.081457 0.161580 -0.3531140 0.0029526 -0.000072 0.000034 0.000981 0.000673 0.0000122 0.0000156 0.000140 0.000268 1992 4 1 48713 -0.083203 0.163655 -0.3561174 0.0030390 -0.000223 -0.000017 0.001354 0.000999 0.0000199 0.0000164 0.000237 0.000232 1992 4 2 48714 -0.084527 0.165220 -0.3591728 0.0030553 -0.000117 -0.000019 0.000940 0.000865 0.0000207 0.0000167 0.000279 0.000217 1992 4 3 48715 -0.086411 0.166943 -0.3622060 0.0029977 0.000153 -0.000011 0.000439 0.000443 0.0000136 0.0000170 0.000187 0.000204 1992 4 4 48716 -0.088784 0.168605 -0.3651471 0.0028745 0.000342 -0.000036 0.000484 0.000492 0.0000133 0.0000133 0.000183 0.000203 1992 4 5 48717 -0.091082 0.169997 -0.3679403 0.0027079 0.000336 -0.000054 0.001164 0.001086 0.0000131 0.0000131 0.000160 0.000183 1992 4 6 48718 -0.092828 0.171322 -0.3705603 0.0025369 0.000198 0.000001 0.000366 0.000322 0.0000129 0.0000132 0.000140 0.000164 1992 4 7 48719 -0.094003 0.172997 -0.3730266 0.0024098 0.000072 0.000131 0.000303 0.000267 0.0000134 0.0000158 0.000147 0.000170 1992 4 8 48720 -0.095080 0.175194 -0.3754052 0.0023681 0.000058 0.000220 0.000509 0.000415 0.0000187 0.0000141 0.000231 0.000229 1992 4 9 48721 -0.096614 0.177638 -0.3777944 0.0024287 0.000120 0.000069 0.000618 0.000485 0.0000148 0.0000137 0.000272 0.000208 1992 4 10 48722 -0.098608 0.179888 -0.3802920 0.0025809 0.000235 -0.000270 0.000416 0.000374 0.0000087 0.0000116 0.000193 0.000137 1992 4 11 48723 -0.100565 0.181778 -0.3829758 0.0027998 0.000398 -0.000528 0.000556 0.000496 0.0000083 0.0000079 0.000187 0.000132 1992 4 12 48724 -0.102237 0.183700 -0.3858955 0.0030495 0.000511 -0.000572 0.000819 0.000701 0.0000071 0.0000068 0.000189 0.000155 1992 4 13 48725 -0.103703 0.186003 -0.3890604 0.0032835 0.000467 -0.000446 0.000314 0.000311 0.0000052 0.0000062 0.000188 0.000481 1992 4 14 48726 -0.105216 0.188715 -0.3924315 0.0034542 0.000255 -0.000268 0.000261 0.000245 0.0000053 0.0000055 0.000152 0.000225 1992 4 15 48727 -0.106926 0.191617 -0.3959278 0.0035216 0.000023 -0.000122 0.000194 0.000178 0.0000058 0.0000058 0.000105 0.000114 1992 4 16 48728 -0.108774 0.194435 -0.3994351 0.0034459 0.000057 0.000032 0.000195 0.000213 0.0000063 0.0000061 0.000095 0.000085 1992 4 17 48729 -0.110734 0.197183 -0.4027926 0.0032232 0.000282 0.000113 0.000261 0.000323 0.0000065 0.0000064 0.000093 0.000078 1992 4 18 48730 -0.112669 0.199915 -0.4058738 0.0029188 0.000507 0.000078 0.000393 0.000504 0.0000065 0.0000060 0.000093 0.000077 1992 4 19 48731 -0.114520 0.202460 -0.4086413 0.0026218 0.000587 -0.000017 0.000189 0.000245 0.0000055 0.0000060 0.000066 0.000098 1992 4 20 48732 -0.116323 0.204610 -0.4111402 0.0023979 0.000462 -0.000084 0.000169 0.000216 0.0000055 0.0000051 0.000066 0.000098 1992 4 21 48733 -0.118124 0.206363 -0.4134630 0.0022718 0.000191 -0.000068 0.000160 0.000184 0.0000048 0.0000044 0.000068 0.000097 1992 4 22 48734 -0.119839 0.208091 -0.4157072 0.0022334 -0.000086 -0.000002 0.000144 0.000136 0.0000033 0.0000041 0.000086 0.000091 1992 4 23 48735 -0.121300 0.210321 -0.4179486 0.0022589 -0.000223 -0.000003 0.000195 0.000180 0.0000034 0.0000053 0.000103 0.000099 1992 4 24 48736 -0.122596 0.212942 -0.4202388 0.0023303 -0.000151 -0.000088 0.000243 0.000253 0.0000073 0.0000061 0.000133 0.000192 1992 4 25 48737 -0.124089 0.215713 -0.4226174 0.0024394 0.000074 -0.000180 0.000294 0.000314 0.0000089 0.0000085 0.000137 0.000221 1992 4 26 48738 -0.125885 0.218359 -0.4251194 0.0025741 0.000278 -0.000237 0.000777 0.000747 0.0000097 0.0000099 0.000144 0.000173 1992 4 27 48739 -0.127681 0.220690 -0.4277604 0.0027054 0.000299 -0.000262 0.000275 0.000244 0.0000110 0.0000091 0.000154 0.000139 1992 4 28 48740 -0.129095 0.222781 -0.4305188 0.0027935 0.000113 -0.000271 0.000224 0.000186 0.0000084 0.0000081 0.000150 0.000129 1992 4 29 48741 -0.130128 0.224875 -0.4333315 0.0028057 -0.000108 -0.000250 0.000217 0.000151 0.0000052 0.0000068 0.000136 0.000104 1992 4 30 48742 -0.131257 0.227223 -0.4361111 0.0027357 -0.000083 -0.000149 0.000203 0.000152 0.0000051 0.0000059 0.000128 0.000096 1992 5 1 48743 -0.132862 0.230040 -0.4387830 0.0026028 0.000178 -0.000070 0.000178 0.000185 0.0000066 0.0000059 0.000119 0.000091 1992 5 2 48744 -0.134980 0.233268 -0.4412997 0.0024324 0.000432 -0.000143 0.000177 0.000188 0.0000068 0.0000077 0.000118 0.000090 1992 5 3 48745 -0.137388 0.236368 -0.4436396 0.0022518 0.000500 -0.000314 0.000226 0.000244 0.0000088 0.0000176 0.000149 0.000117 1992 5 4 48746 -0.139737 0.238650 -0.4458096 0.0020937 0.000367 -0.000415 0.000840 0.000660 0.0000285 0.0000092 0.000306 0.000348 1992 5 5 48747 -0.141736 0.239893 -0.4478490 0.0019948 0.000152 -0.000322 0.000346 0.000201 0.0000095 0.0000166 0.000165 0.000158 1992 5 6 48748 -0.143295 0.240780 -0.4498312 0.0019878 0.000009 -0.000118 0.000181 0.000103 0.0000047 0.0000071 0.000091 0.000084 1992 5 7 48749 -0.144499 0.242513 -0.4518564 0.0020909 0.000027 -0.000066 0.000177 0.000108 0.0000046 0.0000058 0.000093 0.000079 1992 5 8 48750 -0.145382 0.245317 -0.4540339 0.0022889 0.000129 -0.000188 0.000245 0.000305 0.0000069 0.0000059 0.000160 0.000091 1992 5 9 48751 -0.145960 0.248529 -0.4564378 0.0025216 0.000176 -0.000324 0.000255 0.000396 0.0000072 0.0000071 0.000169 0.000092 1992 5 10 48752 -0.146417 0.251575 -0.4590632 0.0027098 0.000133 -0.000377 0.000566 0.000670 0.0000074 0.0000073 0.000140 0.000110 1992 5 11 48753 -0.147094 0.254355 -0.4618300 0.0027999 0.000065 -0.000349 0.000489 0.000464 0.0000075 0.0000064 0.000117 0.000175 1992 5 12 48754 -0.148300 0.257142 -0.4646287 0.0027880 0.000058 -0.000272 0.000257 0.000225 0.0000053 0.0000052 0.000114 0.000168 1992 5 13 48755 -0.149967 0.260121 -0.4673722 0.0027037 0.000125 -0.000145 0.000144 0.000118 0.0000030 0.0000042 0.000104 0.000144 1992 5 14 48756 -0.151374 0.262566 -0.4700098 0.0025614 0.000166 0.000071 0.000186 0.000155 0.0000030 0.0000052 0.000109 0.000134 1992 5 15 48757 -0.152415 0.264667 -0.4724823 0.0023607 0.000154 0.000245 0.000273 0.000308 0.0000074 0.0000081 0.000171 0.000132 1992 5 16 48758 -0.153483 0.266919 -0.4747350 0.0021369 0.000142 0.000178 0.000388 0.000497 0.0000132 0.0000142 0.000259 0.000199 1992 5 17 48759 -0.154213 0.269127 -0.4767738 0.0019544 0.000145 -0.000118 0.000867 0.000962 0.0000210 0.0000113 0.000428 0.000446 1992 5 18 48760 -0.154137 0.271074 -0.4786691 0.0018608 0.000177 -0.000436 0.000353 0.000428 0.0000094 0.0000136 0.000174 0.000173 1992 5 19 48761 -0.153921 0.273195 -0.4805210 0.0018631 0.000189 -0.000543 0.000272 0.000330 0.0000063 0.0000085 0.000117 0.000114 1992 5 20 48762 -0.154331 0.275753 -0.4824162 0.0019310 0.000108 -0.000366 0.000483 0.000559 0.0000076 0.0000071 0.000147 0.000142 1992 5 21 48763 -0.154762 0.278191 -0.4843976 0.0020198 -0.000041 -0.000069 0.000392 0.000637 0.0000079 0.0000065 0.000207 0.000207 1992 5 22 48764 -0.154423 0.280721 -0.4864640 0.0020964 -0.000149 0.000120 0.000278 0.000427 0.0000054 0.0000067 0.000143 0.000147 1992 5 23 48765 -0.154681 0.283349 -0.4885923 0.0021747 -0.000050 0.000098 0.000320 0.000253 0.0000055 0.0000058 0.000120 0.000093 1992 5 24 48766 -0.155405 0.286037 -0.4908091 0.0022736 0.000201 0.000031 0.000329 0.000190 0.0000062 0.0000063 0.000117 0.000084 1992 5 25 48767 -0.155983 0.288864 -0.4931297 0.0023607 0.000359 0.000036 0.000318 0.000226 0.0000070 0.0000066 0.000153 0.000144 1992 5 26 48768 -0.156581 0.291502 -0.4955167 0.0023897 0.000224 0.000085 0.000319 0.000239 0.0000070 0.0000062 0.000161 0.000168 1992 5 27 48769 -0.157448 0.293643 -0.4978929 0.0023364 -0.000120 0.000092 0.000353 0.000275 0.0000054 0.0000060 0.000186 0.000174 1992 5 28 48770 -0.158415 0.295396 -0.5001725 0.0022097 -0.000291 0.000001 0.000366 0.000322 0.0000049 0.0000058 0.000204 0.000178 1992 5 29 48771 -0.158981 0.297220 -0.5022965 0.0020457 -0.000050 -0.000158 0.000297 0.000299 0.0000063 0.0000058 0.000160 0.000165 1992 5 30 48772 -0.158701 0.299499 -0.5042534 0.0018722 0.000310 -0.000223 0.000290 0.000386 0.0000067 0.0000066 0.000143 0.000143 1992 5 31 48773 -0.157786 0.301778 -0.5060411 0.0017008 0.000383 -0.000105 0.000364 0.000530 0.0000069 0.0000067 0.000174 0.000157 1992 6 1 48774 -0.156834 0.304339 -0.5076706 0.0015628 0.000108 0.000015 0.000383 0.000338 0.0000067 0.0000061 0.000169 0.000160 1992 6 2 48775 -0.156370 0.307176 -0.5091965 0.0015082 -0.000059 0.000011 0.000289 0.000206 0.0000053 0.0000070 0.000117 0.000127 1992 6 3 48776 -0.156296 0.309784 -0.5107224 0.0015727 0.000189 -0.000071 0.000300 0.000173 0.0000073 0.0000084 0.000107 0.000127 1992 6 4 48777 -0.155833 0.312875 -0.5123698 0.0017420 0.000318 -0.000197 0.000397 0.000256 0.0000114 0.0000144 0.000163 0.000180 1992 6 5 48778 -0.155912 0.315942 -0.5142154 0.0019517 0.000214 -0.000341 0.000549 0.000579 0.0000215 0.0000267 0.000321 0.000252 1992 6 6 48779 -0.156225 0.317757 -0.5162597 0.0021256 0.000102 -0.000499 0.000799 0.000951 0.0000420 0.0000159 0.000358 0.000257 1992 6 7 48780 -0.156064 0.318978 -0.5184363 0.0022091 0.000155 -0.000563 0.001289 0.001112 0.0000102 0.0000243 0.000178 0.000172 1992 6 8 48781 -0.155401 0.320883 -0.5206411 0.0021830 0.000390 -0.000383 0.000381 0.000372 0.0000066 0.0000084 0.000125 0.000130 1992 6 9 48782 -0.154905 0.323338 -0.5227688 0.0020638 0.000700 0.000112 0.000340 0.000333 0.0000066 0.0000066 0.000125 0.000130 1992 6 10 48783 -0.154914 0.325729 -0.5247450 0.0018931 0.000923 0.000798 0.000638 0.000630 0.0000066 0.0000069 0.000125 0.000130 1992 6 11 48784 -0.154897 0.327985 -0.5265438 0.0017165 0.000946 0.001349 0.002032 0.002231 0.0000071 0.0000071 0.000134 0.000143 1992 6 12 48785 -0.154415 0.330284 -0.5281797 0.0015634 0.000746 0.001446 0.000517 0.000403 0.0000076 0.0000062 0.000161 0.000200 1992 6 13 48786 -0.153653 0.332787 -0.5296840 0.0014419 0.000399 0.000994 0.000398 0.000275 0.0000054 0.0000058 0.000156 0.000210 1992 6 14 48787 -0.153056 0.335675 -0.5310856 0.0013489 0.000047 0.000234 0.000367 0.000225 0.0000039 0.0000047 0.000150 0.000234 1992 6 15 48788 -0.152737 0.339224 -0.5324072 0.0013085 -0.000055 -0.000229 0.000352 0.000254 0.0000041 0.0000049 0.000172 0.000246 1992 6 16 48789 -0.152887 0.342819 -0.5337260 0.0013474 -0.000199 -0.000284 0.000361 0.000365 0.0000058 0.0000067 0.000216 0.000216 1992 6 17 48790 -0.153292 0.345984 -0.5351195 0.0014349 -0.000533 -0.000223 0.000378 0.000341 0.0000094 0.0000100 0.000202 0.000175 1992 6 18 48791 -0.153245 0.349117 -0.5366057 0.0015291 -0.000502 -0.000295 0.000413 0.000365 0.0000142 0.0000148 0.000197 0.000183 1992 6 19 48792 -0.153339 0.351770 -0.5381802 0.0016201 -0.000227 -0.000427 0.000552 0.000530 0.0000201 0.0000203 0.000206 0.000276 1992 6 20 48793 -0.153989 0.353431 -0.5398421 0.0017134 -0.000131 -0.000387 0.000744 0.000775 0.0000265 0.0000202 0.000262 0.000371 1992 6 21 48794 -0.153249 0.355107 -0.5415978 0.0018056 -0.000024 -0.000152 0.000753 0.001074 0.0000202 0.0000187 0.000336 0.000276 1992 6 22 48795 -0.151553 0.357510 -0.5434401 0.0018715 0.000239 0.000075 0.000357 0.000420 0.0000108 0.0000132 0.000220 0.000192 1992 6 23 48796 -0.150336 0.360063 -0.5453256 0.0018801 0.000332 0.000129 0.000216 0.000186 0.0000062 0.0000074 0.000122 0.000149 1992 6 24 48797 -0.149566 0.362195 -0.5471850 0.0018194 0.000050 -0.000002 0.000164 0.000113 0.0000040 0.0000052 0.000078 0.000117 1992 6 25 48798 -0.148973 0.364413 -0.5489505 0.0016956 -0.000177 -0.000244 0.000243 0.000165 0.0000042 0.0000068 0.000082 0.000122 1992 6 26 48799 -0.148203 0.367064 -0.5505661 0.0015297 -0.000182 -0.000452 0.000527 0.000421 0.0000097 0.0000079 0.000177 0.000186 1992 6 27 48800 -0.147234 0.369798 -0.5520069 0.0013616 -0.000054 -0.000506 0.000658 0.000565 0.0000116 0.0000117 0.000206 0.000201 1992 6 28 48801 -0.146243 0.372296 -0.5532982 0.0012387 0.000153 -0.000408 0.001250 0.001039 0.0000137 0.0000086 0.000539 0.000446 1992 6 29 48802 -0.145198 0.374609 -0.5545075 0.0011900 0.000399 -0.000260 0.000427 0.000375 0.0000056 0.0000086 0.000308 0.000222 1992 6 30 48803 -0.143870 0.376890 -0.5557123 0.0012148 0.000562 -0.000168 0.000216 0.000184 0.0000035 0.0000042 0.000165 0.000129 1992 7 1 48804 -0.142423 0.379224 0.4430285 0.0012981 0.000446 -0.000168 0.000125 0.000102 0.0000028 0.0000035 0.000095 0.000086 1992 7 2 48805 -0.141548 0.381563 0.4416712 0.0014381 -0.000024 -0.000211 0.000155 0.000130 0.0000035 0.0000046 0.000107 0.000099 1992 7 3 48806 -0.141084 0.384126 0.4401567 0.0016176 -0.000456 -0.000235 0.000347 0.000325 0.0000064 0.0000063 0.000150 0.000140 1992 7 4 48807 -0.140324 0.386983 0.4384647 0.0017671 -0.000449 -0.000220 0.000837 0.000817 0.0000090 0.0000071 0.000168 0.000158 1992 7 5 48808 -0.138920 0.389671 0.4366654 0.0018124 -0.000073 -0.000196 0.000532 0.000581 0.0000079 0.0000084 0.000158 0.000158 1992 7 6 48809 -0.136955 0.391696 0.4348818 0.0017313 0.000346 -0.000206 0.000307 0.000337 0.0000078 0.0000082 0.000158 0.000159 1992 7 7 48810 -0.134789 0.393067 0.4332321 0.0015539 0.000479 -0.000263 0.000307 0.000311 0.0000086 0.0000097 0.000159 0.000163 1992 7 8 48811 -0.132689 0.394552 0.4317862 0.0013365 0.000279 -0.000318 0.000214 0.000184 0.0000116 0.0000087 0.000116 0.000140 1992 7 9 48812 -0.130755 0.397033 0.4305563 0.0011301 0.000038 -0.000285 0.000141 0.000121 0.0000089 0.0000100 0.000077 0.000097 1992 7 10 48813 -0.129468 0.399272 0.4295125 0.0009715 -0.000124 -0.000169 0.000169 0.000153 0.0000084 0.0000089 0.000096 0.000108 1992 7 11 48814 -0.128484 0.401773 0.4285931 0.0008773 -0.000180 -0.000041 0.000244 0.000255 0.0000090 0.0000072 0.000146 0.000134 1992 7 12 48815 -0.127576 0.404810 0.4277344 0.0008415 -0.000134 0.000041 0.000495 0.000457 0.0000060 0.0000066 0.000128 0.000136 1992 7 13 48816 -0.126948 0.407527 0.4268866 0.0008534 -0.000032 0.000067 0.000270 0.000232 0.0000043 0.0000051 0.000099 0.000131 1992 7 14 48817 -0.126658 0.409240 0.4260077 0.0009105 0.000054 0.000046 0.000177 0.000152 0.0000043 0.0000047 0.000099 0.000130 1992 7 15 48818 -0.126234 0.410349 0.4250525 0.0010144 0.000050 -0.000014 0.000168 0.000110 0.0000051 0.0000056 0.000098 0.000105 1992 7 16 48819 -0.124960 0.411916 0.4239738 0.0011527 -0.000097 -0.000126 0.000190 0.000102 0.0000069 0.0000066 0.000102 0.000099 1992 7 17 48820 -0.122820 0.414195 0.4227494 0.0012902 -0.000305 -0.000251 0.000255 0.000144 0.0000082 0.0000077 0.000120 0.000141 1992 7 18 48821 -0.120904 0.415836 0.4214018 0.0014013 -0.000261 -0.000247 0.000355 0.000146 0.0000085 0.0000079 0.000121 0.000156 1992 7 19 48822 -0.118680 0.417442 0.4199595 0.0014845 -0.000061 -0.000136 0.000370 0.000126 0.0000076 0.0000060 0.000115 0.000135 1992 7 20 48823 -0.115655 0.419976 0.4184481 0.0015377 0.000084 -0.000049 0.000239 0.000238 0.0000034 0.0000054 0.000142 0.000152 1992 7 21 48824 -0.112560 0.423099 0.4168999 0.0015520 0.000120 -0.000076 0.000149 0.000232 0.0000032 0.0000033 0.000148 0.000131 1992 7 22 48825 -0.110164 0.425929 0.4153579 0.0015196 0.000077 -0.000194 0.000080 0.000122 0.0000032 0.0000032 0.000100 0.000085 1992 7 23 48826 -0.108227 0.427929 0.4138705 0.0014474 0.000018 -0.000227 0.000073 0.000105 0.0000033 0.0000038 0.000057 0.000074 1992 7 24 48827 -0.106347 0.430331 0.4124670 0.0013589 -0.000011 -0.000176 0.000103 0.000137 0.0000044 0.0000048 0.000065 0.000094 1992 7 25 48828 -0.104054 0.432418 0.4111478 0.0012803 -0.000001 -0.000127 0.000227 0.000233 0.0000064 0.0000050 0.000141 0.000180 1992 7 26 48829 -0.101658 0.433965 0.4098900 0.0012343 0.000043 -0.000130 0.000311 0.000271 0.0000056 0.0000058 0.000204 0.000290 1992 7 27 48830 -0.099653 0.436022 0.4086509 0.0012453 0.000116 -0.000212 0.000298 0.000289 0.0000052 0.0000047 0.000202 0.000173 1992 7 28 48831 -0.097877 0.437978 0.4073648 0.0013383 0.000199 -0.000339 0.000168 0.000156 0.0000038 0.0000039 0.000092 0.000095 1992 7 29 48832 -0.096379 0.439415 0.4059451 0.0015197 0.000222 -0.000408 0.000104 0.000091 0.0000026 0.0000032 0.000056 0.000070 1992 7 30 48833 -0.094601 0.441134 0.4043151 0.0017556 0.000114 -0.000358 0.000090 0.000073 0.0000025 0.0000031 0.000055 0.000088 1992 7 31 48834 -0.092296 0.443136 0.4024507 0.0019812 -0.000075 -0.000221 0.000128 0.000104 0.0000035 0.0000027 0.000078 0.000124 1992 8 1 48835 -0.090298 0.445591 0.4003930 0.0021276 -0.000205 -0.000054 0.000147 0.000112 0.0000029 0.0000030 0.000095 0.000102 1992 8 2 48836 -0.088138 0.448273 0.3982454 0.0021441 -0.000225 -0.000022 0.000130 0.000105 0.0000024 0.0000029 0.000088 0.000093 1992 8 3 48837 -0.085999 0.450657 0.3961469 0.0020306 -0.000147 -0.000055 0.000162 0.000146 0.0000029 0.0000028 0.000097 0.000107 1992 8 4 48838 -0.084149 0.452636 0.3942069 0.0018431 -0.000028 -0.000041 0.000153 0.000140 0.0000032 0.0000025 0.000085 0.000093 1992 8 5 48839 -0.081973 0.454526 0.3924619 0.0016442 0.000026 -0.000104 0.000098 0.000084 0.0000022 0.0000027 0.000055 0.000066 1992 8 6 48840 -0.080106 0.456422 0.3909044 0.0014637 -0.000022 -0.000212 0.000094 0.000082 0.0000022 0.0000027 0.000052 0.000064 1992 8 7 48841 -0.078480 0.458206 0.3895129 0.0013215 -0.000075 -0.000298 0.000136 0.000118 0.0000032 0.0000026 0.000070 0.000095 1992 8 8 48842 -0.076571 0.460632 0.3882381 0.0012329 -0.000129 -0.000336 0.000145 0.000116 0.0000030 0.0000028 0.000072 0.000095 1992 8 9 48843 -0.074536 0.463243 0.3870246 0.0011880 -0.000209 -0.000263 0.000157 0.000104 0.0000023 0.0000026 0.000064 0.000081 1992 8 10 48844 -0.072590 0.465732 0.3858420 0.0011946 -0.000195 -0.000153 0.000144 0.000088 0.0000022 0.0000026 0.000071 0.000082 1992 8 11 48845 -0.070583 0.468448 0.3846198 0.0013025 -0.000088 -0.000155 0.000106 0.000099 0.0000029 0.0000032 0.000094 0.000083 1992 8 12 48846 -0.068441 0.471272 0.3832283 0.0014996 -0.000124 -0.000260 0.000104 0.000134 0.0000042 0.0000041 0.000086 0.000086 1992 8 13 48847 -0.066562 0.473623 0.3816198 0.0017015 -0.000184 -0.000325 0.000151 0.000201 0.0000054 0.0000054 0.000108 0.000115 1992 8 14 48848 -0.064759 0.475289 0.3798318 0.0018427 -0.000249 -0.000392 0.000325 0.000313 0.0000066 0.0000069 0.000124 0.000139 1992 8 15 48849 -0.062749 0.476926 0.3779464 0.0019029 -0.000313 -0.000368 0.000649 0.000489 0.0000084 0.0000066 0.000113 0.000134 1992 8 16 48850 -0.060464 0.478877 0.3760414 0.0018998 -0.000342 -0.000240 0.000665 0.000517 0.0000065 0.0000067 0.000124 0.000153 1992 8 17 48851 -0.057917 0.480825 0.3741633 0.0018642 -0.000322 -0.000146 0.000264 0.000229 0.0000051 0.0000059 0.000148 0.000206 1992 8 18 48852 -0.055118 0.482344 0.3723284 0.0018175 -0.000254 -0.000196 0.000222 0.000203 0.0000054 0.0000059 0.000113 0.000174 1992 8 19 48853 -0.052028 0.483566 0.3705398 0.0017656 -0.000156 -0.000353 0.000141 0.000135 0.0000067 0.0000066 0.000075 0.000127 1992 8 20 48854 -0.048720 0.485016 0.3688023 0.0017033 -0.000054 -0.000421 0.000163 0.000158 0.0000079 0.0000083 0.000079 0.000135 1992 8 21 48855 -0.045645 0.486675 0.3671299 0.0016322 0.000043 -0.000328 0.000405 0.000393 0.0000100 0.0000117 0.000156 0.000253 1992 8 22 48856 -0.043405 0.488373 0.3655249 0.0015779 0.000135 -0.000148 0.000575 0.000563 0.0000154 0.0000184 0.000247 0.000397 1992 8 23 48857 -0.041315 0.489609 0.3639511 0.0015817 0.000207 -0.000026 0.001367 0.001170 0.0000269 0.0000118 0.000530 0.000545 1992 8 24 48858 -0.037840 0.490112 0.3623310 0.0016781 0.000231 -0.000043 0.000575 0.000481 0.0000081 0.0000165 0.000300 0.000266 1992 8 25 48859 -0.033045 0.490763 0.3605639 0.0018767 0.000192 -0.000176 0.000383 0.000318 0.0000061 0.0000078 0.000202 0.000207 1992 8 26 48860 -0.029034 0.492552 0.3585571 0.0021513 0.000131 -0.000262 0.000504 0.000400 0.0000075 0.0000060 0.000193 0.000255 1992 8 27 48861 -0.027097 0.493878 0.3562620 0.0024421 0.000095 -0.000120 0.000385 0.000346 0.0000060 0.0000071 0.000181 0.000220 1992 8 28 48862 -0.024370 0.495362 0.3536998 0.0026654 -0.000068 -0.000031 0.000304 0.000284 0.0000067 0.0000060 0.000126 0.000144 1992 8 29 48863 -0.021331 0.496781 0.3509777 0.0027432 -0.000180 -0.000035 0.000355 0.000335 0.0000059 0.0000058 0.000147 0.000176 1992 8 30 48864 -0.017954 0.498764 0.3482640 0.0026448 -0.000165 -0.000105 0.000452 0.000391 0.0000049 0.0000051 0.000211 0.000282 1992 8 31 48865 -0.014923 0.501032 0.3457259 0.0024037 -0.000196 -0.000164 0.000264 0.000226 0.0000042 0.0000043 0.000175 0.000156 1992 9 1 48866 -0.013062 0.502399 0.3434712 0.0020962 -0.000254 -0.000157 0.000171 0.000146 0.0000037 0.0000039 0.000131 0.000111 1992 9 2 48867 -0.011519 0.502412 0.3415256 0.0018008 -0.000208 -0.000132 0.000148 0.000114 0.0000035 0.0000038 0.000095 0.000118 1992 9 3 48868 -0.009366 0.501767 0.3398477 0.0015669 -0.000163 -0.000155 0.000161 0.000122 0.0000038 0.0000059 0.000095 0.000132 1992 9 4 48869 -0.006674 0.501449 0.3383658 0.0014140 -0.000090 -0.000259 0.000370 0.000293 0.0000084 0.0000074 0.000132 0.000188 1992 9 5 48870 -0.004164 0.501924 0.3369955 0.0013527 0.000129 -0.000411 0.000594 0.000490 0.0000110 0.0000069 0.000140 0.000200 1992 9 6 48871 -0.001909 0.502919 0.3356401 0.0013874 0.000405 -0.000545 0.000567 0.000468 0.0000053 0.0000074 0.000130 0.000165 1992 9 7 48872 0.000458 0.503787 0.3342046 0.0015045 0.000521 -0.000596 0.000224 0.000182 0.0000037 0.0000046 0.000120 0.000137 1992 9 8 48873 0.003209 0.504141 0.3326200 0.0016709 0.000330 -0.000543 0.000236 0.000191 0.0000040 0.0000057 0.000127 0.000145 1992 9 9 48874 0.006110 0.504272 0.3308583 0.0018456 -0.000065 -0.000432 0.000446 0.000359 0.0000076 0.0000111 0.000222 0.000240 1992 9 10 48875 0.008517 0.504903 0.3289318 0.0019940 -0.000305 -0.000348 0.000743 0.000716 0.0000182 0.0000092 0.000335 0.000316 1992 9 11 48876 0.010381 0.506001 0.3268802 0.0020940 -0.000321 -0.000305 0.000427 0.000465 0.0000109 0.0000143 0.000236 0.000227 1992 9 12 48877 0.012271 0.506808 0.3247584 0.0021350 -0.000329 -0.000245 0.000415 0.000452 0.0000104 0.0000084 0.000229 0.000221 1992 9 13 48878 0.014492 0.506926 0.3226271 0.0021164 -0.000364 -0.000165 0.000709 0.000512 0.0000059 0.0000074 0.000150 0.000155 1992 9 14 48879 0.016942 0.506659 0.3205425 0.0020468 -0.000321 -0.000108 0.000501 0.000313 0.0000043 0.0000053 0.000114 0.000120 1992 9 15 48880 0.019420 0.506677 0.3185477 0.0019426 -0.000128 -0.000119 0.000376 0.000237 0.0000047 0.0000059 0.000123 0.000129 1992 9 16 48881 0.021950 0.507276 0.3166656 0.0018262 0.000082 -0.000192 0.000444 0.000353 0.0000074 0.0000043 0.000189 0.000196 1992 9 17 48882 0.024499 0.507515 0.3148947 0.0017223 -0.000007 -0.000245 0.000223 0.000352 0.0000040 0.0000051 0.000135 0.000143 1992 9 18 48883 0.026963 0.507809 0.3132100 0.0016513 -0.000317 -0.000242 0.000166 0.000291 0.0000028 0.0000034 0.000098 0.000104 1992 9 19 48884 0.029309 0.507907 0.3115714 0.0016259 -0.000538 -0.000203 0.000219 0.000322 0.0000028 0.0000032 0.000096 0.000102 1992 9 20 48885 0.031627 0.507460 0.3099307 0.0016574 -0.000536 -0.000165 0.000954 0.000742 0.0000036 0.0000034 0.000105 0.000124 1992 9 21 48886 0.033931 0.506797 0.3082276 0.0017603 -0.000363 -0.000157 0.000344 0.000247 0.0000039 0.0000038 0.000107 0.000134 1992 9 22 48887 0.036051 0.506673 0.3063870 0.0019445 -0.000178 -0.000180 0.000193 0.000126 0.0000039 0.0000039 0.000092 0.000120 1992 9 23 48888 0.037953 0.507068 0.3043295 0.0021953 -0.000115 -0.000196 0.000132 0.000081 0.0000038 0.0000039 0.000070 0.000094 1992 9 24 48889 0.039945 0.506843 0.3020082 0.0024503 -0.000173 -0.000146 0.000152 0.000096 0.0000038 0.0000039 0.000084 0.000109 1992 9 25 48890 0.042096 0.506485 0.2994621 0.0026235 -0.000281 -0.000057 0.000289 0.000243 0.0000039 0.0000039 0.000171 0.000183 1992 9 26 48891 0.044230 0.506788 0.2968080 0.0026616 -0.000358 0.000006 0.000545 0.000475 0.0000039 0.0000038 0.000193 0.000196 1992 9 27 48892 0.046251 0.506944 0.2941845 0.0025671 -0.000370 0.000028 0.000719 0.000552 0.0000036 0.0000037 0.000215 0.000155 1992 9 28 48893 0.048306 0.506455 0.2917032 0.0023848 -0.000334 0.000031 0.000237 0.000193 0.0000035 0.0000036 0.000225 0.000145 1992 9 29 48894 0.050607 0.505441 0.2894207 0.0021755 -0.000289 0.000050 0.000232 0.000189 0.0000035 0.0000035 0.000225 0.000145 1992 9 30 48895 0.053177 0.504303 0.2873370 0.0019902 -0.000259 0.000103 0.000236 0.000196 0.0000036 0.0000043 0.000216 0.000149 1992 10 1 48896 0.055745 0.503378 0.2854138 0.0018579 -0.000233 0.000164 0.000294 0.000357 0.0000052 0.0000044 0.000164 0.000245 1992 10 2 48897 0.058034 0.502859 0.2835934 0.0017894 -0.000187 0.000185 0.000296 0.000367 0.0000052 0.0000052 0.000163 0.000250 1992 10 3 48898 0.060116 0.502753 0.2818119 0.0017849 -0.000116 0.000132 0.000308 0.000381 0.0000052 0.0000047 0.000163 0.000250 1992 10 4 48899 0.062464 0.502856 0.2800065 0.0018398 -0.000054 0.000003 0.000811 0.000709 0.0000041 0.0000045 0.000116 0.000133 1992 10 5 48900 0.065432 0.502893 0.2781204 0.0019458 -0.000050 -0.000173 0.000474 0.000355 0.0000038 0.0000040 0.000106 0.000119 1992 10 6 48901 0.068775 0.502746 0.2761083 0.0020887 -0.000139 -0.000348 0.000328 0.000242 0.0000038 0.0000039 0.000106 0.000119 1992 10 7 48902 0.071904 0.502517 0.2739428 0.0022464 -0.000310 -0.000480 0.000496 0.000366 0.0000039 0.0000051 0.000110 0.000123 1992 10 8 48903 0.074939 0.502163 0.2716222 0.0023891 -0.000502 -0.000533 0.000575 0.000538 0.0000064 0.0000052 0.000200 0.000248 1992 10 9 48904 0.077931 0.501728 0.2691772 0.0024851 -0.000635 -0.000494 0.000377 0.000372 0.0000065 0.0000064 0.000206 0.000258 1992 10 10 48905 0.080494 0.501280 0.2666681 0.0025125 -0.000657 -0.000381 0.000539 0.000524 0.0000065 0.0000054 0.000206 0.000258 1992 10 11 48906 0.082566 0.500471 0.2641694 0.0024693 -0.000571 -0.000238 0.000972 0.000767 0.0000042 0.0000051 0.000152 0.000233 1992 10 12 48907 0.084531 0.499124 0.2617455 0.0023738 -0.000423 -0.000123 0.000247 0.000202 0.0000038 0.0000037 0.000137 0.000212 1992 10 13 48908 0.086925 0.497630 0.2594335 0.0022553 -0.000272 -0.000073 0.000164 0.000149 0.0000032 0.0000030 0.000109 0.000131 1992 10 14 48909 0.089814 0.496461 0.2572387 0.0021442 -0.000158 -0.000087 0.000110 0.000116 0.0000022 0.0000028 0.000071 0.000073 1992 10 15 48910 0.092701 0.495710 0.2551379 0.0020648 -0.000093 -0.000128 0.000121 0.000127 0.0000025 0.0000031 0.000080 0.000082 1992 10 16 48911 0.095490 0.495484 0.2530903 0.0020365 -0.000108 -0.000120 0.000202 0.000195 0.0000039 0.0000033 0.000134 0.000151 1992 10 17 48912 0.098222 0.495590 0.2510379 0.0020774 -0.000208 -0.000028 0.000330 0.000311 0.0000042 0.0000032 0.000145 0.000169 1992 10 18 48913 0.100545 0.495400 0.2489068 0.0021999 -0.000315 0.000066 0.000380 0.000357 0.0000025 0.0000032 0.000080 0.000097 1992 10 19 48914 0.102409 0.494760 0.2466151 0.0024037 -0.000337 0.000064 0.000189 0.000184 0.0000022 0.0000024 0.000070 0.000086 1992 10 20 48915 0.104039 0.493817 0.2440881 0.0026699 -0.000238 -0.000069 0.000214 0.000206 0.0000023 0.0000029 0.000070 0.000086 1992 10 21 48916 0.105819 0.492667 0.2412801 0.0029509 -0.000086 -0.000235 0.000195 0.000183 0.0000037 0.0000035 0.000072 0.000085 1992 10 22 48917 0.107980 0.491365 0.2382083 0.0031638 -0.000023 -0.000250 0.000171 0.000160 0.0000047 0.0000040 0.000081 0.000104 1992 10 23 48918 0.110269 0.490019 0.2349884 0.0032285 -0.000073 -0.000116 0.000193 0.000180 0.0000043 0.0000062 0.000106 0.000191 1992 10 24 48919 0.112457 0.488861 0.2317928 0.0031264 -0.000135 0.000036 0.000339 0.000311 0.0000077 0.0000089 0.000194 0.000361 1992 10 25 48920 0.114798 0.488335 0.2287707 0.0029044 -0.000092 0.000152 0.000747 0.000614 0.0000134 0.0000056 0.000417 0.000635 1992 10 26 48921 0.117102 0.488033 0.2260020 0.0026373 0.000051 0.000213 0.000385 0.000341 0.0000035 0.0000083 0.000123 0.000218 1992 10 27 48922 0.118917 0.487154 0.2234928 0.0023927 0.000168 0.000216 0.000263 0.000239 0.0000032 0.0000034 0.000115 0.000203 1992 10 28 48923 0.120426 0.485777 0.2211960 0.0022137 0.000159 0.000156 0.000344 0.000320 0.0000033 0.0000039 0.000117 0.000199 1992 10 29 48924 0.121730 0.484374 0.2190368 0.0021192 0.000049 0.000026 0.000296 0.000338 0.0000045 0.0000041 0.000143 0.000170 1992 10 30 48925 0.123085 0.482952 0.2169306 0.0021066 -0.000066 -0.000151 0.000197 0.000230 0.0000049 0.0000064 0.000149 0.000175 1992 10 31 48926 0.124901 0.480982 0.2148033 0.0021526 -0.000098 -0.000290 0.000268 0.000330 0.0000083 0.0000082 0.000177 0.000206 1992 11 1 48927 0.127202 0.479146 0.2126124 0.0022185 -0.000038 -0.000265 0.000357 0.000424 0.0000115 0.0000060 0.000182 0.000221 1992 11 2 48928 0.129623 0.477886 0.2103596 0.0022736 0.000051 -0.000143 0.000195 0.000163 0.0000038 0.0000078 0.000109 0.000182 1992 11 3 48929 0.131828 0.476964 0.2080639 0.0023220 0.000090 -0.000110 0.000208 0.000174 0.0000041 0.0000050 0.000120 0.000202 1992 11 4 48930 0.133805 0.475956 0.2057201 0.0023887 0.000052 -0.000222 0.000315 0.000255 0.0000063 0.0000041 0.000142 0.000178 1992 11 5 48931 0.135617 0.474757 0.2032969 0.0024713 -0.000009 -0.000305 0.000222 0.000163 0.0000040 0.0000047 0.000087 0.000096 1992 11 6 48932 0.136891 0.473566 0.2007920 0.0025252 -0.000077 -0.000260 0.000205 0.000122 0.0000031 0.0000034 0.000097 0.000093 1992 11 7 48933 0.138039 0.472317 0.1982628 0.0025126 -0.000142 -0.000229 0.000218 0.000112 0.0000028 0.0000030 0.000126 0.000100 1992 11 8 48934 0.139526 0.470849 0.1957826 0.0024384 -0.000178 -0.000257 0.000186 0.000114 0.0000029 0.0000030 0.000121 0.000091 1992 11 9 48935 0.141265 0.469132 0.1933989 0.0023332 -0.000162 -0.000229 0.000165 0.000128 0.0000031 0.0000031 0.000106 0.000078 1992 11 10 48936 0.143017 0.467238 0.1911235 0.0022277 -0.000097 -0.000062 0.000204 0.000147 0.0000033 0.0000043 0.000110 0.000083 1992 11 11 48937 0.144919 0.465313 0.1889413 0.0021426 -0.000021 0.000139 0.000284 0.000139 0.0000055 0.0000061 0.000130 0.000111 1992 11 12 48938 0.147215 0.463454 0.1868237 0.0020899 0.000005 0.000087 0.000319 0.000133 0.0000088 0.0000073 0.000155 0.000144 1992 11 13 48939 0.149462 0.461838 0.1847359 0.0020861 0.000013 -0.000140 0.000396 0.000335 0.0000090 0.0000072 0.000228 0.000239 1992 11 14 48940 0.151348 0.460623 0.1826213 0.0021596 0.000061 -0.000244 0.000307 0.000308 0.0000055 0.0000068 0.000166 0.000211 1992 11 15 48941 0.153464 0.459536 0.1803910 0.0023275 0.000038 -0.000171 0.000305 0.000295 0.0000045 0.0000045 0.000142 0.000179 1992 11 16 48942 0.155991 0.458319 0.1779538 0.0025660 -0.000072 -0.000030 0.000280 0.000232 0.0000036 0.0000041 0.000132 0.000098 1992 11 17 48943 0.158252 0.457105 0.1752632 0.0028130 -0.000155 0.000068 0.000204 0.000168 0.0000037 0.0000050 0.000134 0.000097 1992 11 18 48944 0.159893 0.456222 0.1723476 0.0029934 -0.000171 0.000028 0.000294 0.000222 0.0000065 0.0000080 0.000163 0.000134 1992 11 19 48945 0.162118 0.455203 0.1693069 0.0030575 -0.000225 -0.000151 0.000495 0.000327 0.0000124 0.0000062 0.000178 0.000180 1992 11 20 48946 0.164809 0.453732 0.1662674 0.0029999 -0.000305 -0.000321 0.000272 0.000202 0.0000059 0.0000077 0.000147 0.000235 1992 11 21 48947 0.166634 0.452014 0.1633388 0.0028500 -0.000297 -0.000311 0.000140 0.000100 0.0000029 0.0000042 0.000099 0.000134 1992 11 22 48948 0.167832 0.450159 0.1605882 0.0026521 -0.000293 -0.000212 0.000116 0.000083 0.0000024 0.0000031 0.000086 0.000112 1992 11 23 48949 0.169048 0.448342 0.1580394 0.0024490 -0.000336 -0.000115 0.000173 0.000136 0.0000032 0.0000029 0.000108 0.000214 1992 11 24 48950 0.170190 0.446632 0.1556781 0.0022776 -0.000341 0.000004 0.000220 0.000181 0.0000034 0.0000033 0.000114 0.000271 1992 11 25 48951 0.170900 0.444751 0.1534600 0.0021626 -0.000226 0.000188 0.000410 0.000331 0.0000034 0.0000034 0.000114 0.000272 1992 11 26 48952 0.171160 0.442347 0.1513247 0.0021122 0.000005 0.000431 0.001223 0.000875 0.0000034 0.0000034 0.000114 0.000272 1992 11 27 48953 0.171437 0.439638 0.1492114 0.0021195 0.000280 0.000671 0.002332 0.002426 0.0000034 0.0000032 0.000113 0.000271 1992 11 28 48954 0.172202 0.437108 0.1470696 0.0021703 0.000490 0.000807 0.002234 0.002317 0.0000031 0.0000032 0.000082 0.000193 1992 11 29 48955 0.173399 0.434941 0.1448630 0.0022507 0.000534 0.000738 0.000351 0.000268 0.0000031 0.0000031 0.000083 0.000193 1992 11 30 48956 0.174478 0.432868 0.1425672 0.0023512 0.000385 0.000432 0.000186 0.000141 0.0000031 0.0000033 0.000084 0.000196 1992 12 1 48957 0.175037 0.430576 0.1401650 0.0024664 0.000111 -0.000004 0.000240 0.000182 0.0000036 0.0000047 0.000096 0.000212 1992 12 2 48958 0.175343 0.428176 0.1376439 0.0025863 -0.000125 -0.000328 0.000246 0.000184 0.0000062 0.0000046 0.000119 0.000125 1992 12 3 48959 0.176175 0.426092 0.1350059 0.0026831 -0.000154 -0.000290 0.000132 0.000099 0.0000056 0.0000063 0.000080 0.000070 1992 12 4 48960 0.178135 0.424471 0.1322932 0.0027180 -0.000051 0.000018 0.000153 0.000123 0.0000063 0.0000049 0.000091 0.000077 1992 12 5 48961 0.179793 0.423075 0.1295848 0.0026851 -0.000070 0.000207 0.000210 0.000165 0.0000042 0.0000043 0.000118 0.000094 1992 12 6 48962 0.180495 0.421370 0.1269354 0.0026137 -0.000242 0.000155 0.000230 0.000122 0.0000022 0.0000033 0.000138 0.000098 1992 12 7 48963 0.181035 0.419132 0.1243653 0.0025239 -0.000389 0.000024 0.000214 0.000127 0.0000024 0.0000026 0.000130 0.000100 1992 12 8 48964 0.182091 0.416931 0.1218883 0.0024261 -0.000347 -0.000021 0.000214 0.000149 0.0000030 0.0000040 0.000129 0.000109 1992 12 9 48965 0.183441 0.415134 0.1195034 0.0023464 -0.000186 0.000024 0.000389 0.000276 0.0000057 0.0000083 0.000193 0.000157 1992 12 10 48966 0.184414 0.413101 0.1171741 0.0023176 -0.000219 0.000019 0.000880 0.000626 0.0000136 0.0000207 0.000259 0.000194 1992 12 11 48967 0.185129 0.410806 0.1148382 0.0023618 -0.000422 -0.000053 0.001078 0.001054 0.0000357 0.0000271 0.000279 0.000194 1992 12 12 48968 0.186139 0.408464 0.1124206 0.0024845 -0.000530 -0.000099 0.001002 0.001134 0.0000407 0.0000201 0.000280 0.000194 1992 12 13 48969 0.187600 0.406354 0.1098508 0.0026669 -0.000458 -0.000077 0.000703 0.000709 0.0000044 0.0000216 0.000113 0.000102 1992 12 14 48970 0.189096 0.404552 0.1070878 0.0028645 -0.000321 -0.000020 0.000218 0.000229 0.0000025 0.0000036 0.000077 0.000072 1992 12 15 48971 0.189990 0.402722 0.1041425 0.0030181 -0.000272 0.000011 0.000174 0.000185 0.0000027 0.0000035 0.000082 0.000074 1992 12 16 48972 0.190182 0.400546 0.1010851 0.0030746 -0.000334 -0.000025 0.000292 0.000281 0.0000045 0.0000058 0.000134 0.000085 1992 12 17 48973 0.190585 0.398244 0.0980295 0.0030097 -0.000329 -0.000098 0.000448 0.000323 0.0000089 0.0000078 0.000204 0.000091 1992 12 18 48974 0.191735 0.396034 0.0950956 0.0028365 -0.000198 -0.000159 0.001280 0.000871 0.0000111 0.0000346 0.000225 0.000097 1992 12 19 48975 0.193071 0.393775 0.0923751 0.0025957 -0.000042 -0.000165 0.002383 0.002467 0.0000603 0.0000164 0.000425 0.000396 1992 12 20 48976 0.193820 0.391228 0.0899093 0.0023425 0.000012 -0.000113 0.000968 0.000904 0.0000217 0.0000331 0.000342 0.000370 1992 12 21 48977 0.193962 0.388415 0.0876817 0.0021311 -0.000065 -0.000041 0.000357 0.000288 0.0000059 0.0000131 0.000139 0.000198 1992 12 22 48978 0.194195 0.383226 0.0855149 0.0019087 -0.000865 -0.000098 0.000368 0.000438 0.0000024 0.0000049 0.000695 0.000833 1992 12 23 48979 0.195472 0.382357 0.0836370 0.0018826 -0.000035 -0.000109 0.000263 0.000333 0.0000025 0.0000023 0.000718 0.000864 1992 12 24 48980 0.196264 0.380250 0.0817237 0.0019524 0.000448 -0.000118 0.000473 0.000544 0.0000022 0.0000022 0.000628 0.000743 1992 12 25 48981 0.197387 0.377354 0.0797120 0.0020758 0.000601 -0.000124 0.000683 0.000756 0.0000020 0.0000020 0.000538 0.000622 1992 12 26 48982 0.198350 0.374586 0.0775607 0.0022267 0.000481 -0.000129 0.000892 0.000967 0.0000018 0.0000018 0.000448 0.000501 1992 12 27 48983 0.200391 0.372102 0.0752561 0.0023787 0.000175 -0.000132 0.001127 0.001111 0.0000016 0.0000016 0.000359 0.000380 1992 12 28 48984 0.202298 0.370025 0.0728080 0.0025129 -0.000071 -0.000131 0.001386 0.001187 0.0000014 0.0000013 0.000430 0.000403 1992 12 29 48985 0.205224 0.367278 0.0702400 0.0026202 -0.000095 -0.000135 0.001052 0.000940 0.0000011 0.0000011 0.000655 0.000596 1992 12 30 48986 0.206463 0.364572 0.0675811 0.0026950 -0.000084 -0.000188 0.000580 0.000620 0.0000008 0.0000016 0.000422 0.000531 1992 12 31 48987 0.207819 0.363277 0.0648654 0.0027273 0.000274 -0.000249 0.000956 0.001043 0.0000021 0.0000010 0.000549 0.000808 1993 1 1 48988 0.208598 0.359592 0.0621419 0.0027101 0.000557 -0.000284 0.000266 0.000295 0.0000041 0.0000052 0.000323 0.000426 1993 1 2 48989 0.207964 0.355645 0.0594571 0.0026550 0.000585 -0.000289 0.000155 0.000183 0.0000035 0.0000035 0.000333 0.000394 1993 1 3 48990 0.208410 0.352628 0.0568394 0.0025807 0.000441 -0.000272 0.000167 0.000228 0.0000030 0.0000030 0.000343 0.000363 1993 1 4 48991 0.208304 0.350310 0.0542969 0.0025057 0.000191 -0.000242 0.000240 0.000250 0.0000025 0.0000025 0.000352 0.000332 1993 1 5 48992 0.208103 0.347287 0.0518212 0.0024447 -0.000053 -0.000209 0.000351 0.000290 0.0000021 0.0000026 0.000341 0.000290 1993 1 6 48993 0.208909 0.344281 0.0493906 0.0024118 -0.000179 -0.000192 0.000318 0.000248 0.0000027 0.0000024 0.000222 0.000192 1993 1 7 48994 0.210391 0.341339 0.0469706 0.0024225 -0.000189 -0.000113 0.000308 0.000208 0.0000027 0.0000027 0.000337 0.000320 1993 1 8 48995 0.210147 0.337942 0.0445135 0.0024898 -0.000143 -0.000016 0.000337 0.000279 0.0000027 0.0000026 0.000465 0.000459 1993 1 9 48996 0.211606 0.335893 0.0419648 0.0026120 -0.000138 0.000067 0.000356 0.000347 0.0000025 0.0000025 0.000500 0.000461 1993 1 10 48997 0.213394 0.333624 0.0392806 0.0027646 -0.000159 0.000126 0.000362 0.000344 0.0000024 0.0000024 0.000536 0.000463 1993 1 11 48998 0.213148 0.331091 0.0364503 0.0029037 -0.000204 0.000147 0.000282 0.000303 0.0000022 0.0000023 0.000572 0.000466 1993 1 12 48999 0.214440 0.328816 0.0335081 0.0029832 -0.000245 0.000127 0.000205 0.000249 0.0000022 0.0000025 0.000588 0.000465 1993 1 13 49000 0.214930 0.326896 0.0305272 0.0029735 -0.000248 0.000074 0.000182 0.000217 0.0000028 0.0000028 0.000505 0.000453 1993 1 14 49001 0.214998 0.324624 0.0275987 0.0028715 -0.000210 0.000012 0.000188 0.000231 0.0000034 0.0000034 0.000422 0.000440 1993 1 15 49002 0.215218 0.321918 0.0248066 0.0026979 -0.000140 -0.000041 0.000163 0.000224 0.0000040 0.0000036 0.000339 0.000427 1993 1 16 49003 0.214025 0.319193 0.0222077 0.0024880 -0.000057 -0.000062 0.000174 0.000262 0.0000037 0.0000035 0.000318 0.000389 1993 1 17 49004 0.213138 0.316098 0.0198211 0.0022828 0.000005 -0.000057 0.000184 0.000273 0.0000030 0.0000030 0.000317 0.000343 1993 1 18 49005 0.212499 0.313186 0.0176233 0.0021232 0.000022 -0.000033 0.000170 0.000215 0.0000024 0.0000024 0.000316 0.000297 1993 1 19 49006 0.212304 0.310832 0.0155509 0.0020408 -0.000011 -0.000004 0.000187 0.000215 0.0000017 0.0000017 0.000301 0.000247 1993 1 20 49007 0.212046 0.307346 0.0135164 0.0020465 -0.000108 0.000001 0.000150 0.000169 0.0000011 0.0000018 0.000211 0.000174 1993 1 21 49008 0.210961 0.304954 0.0114356 0.0021184 -0.000114 0.000050 0.000135 0.000134 0.0000018 0.0000023 0.000212 0.000222 1993 1 22 49009 0.211313 0.301663 0.0092637 0.0022168 -0.000038 0.000116 0.000197 0.000203 0.0000035 0.0000027 0.000280 0.000357 1993 1 23 49010 0.211354 0.299462 0.0069952 0.0023174 0.000013 0.000113 0.000244 0.000251 0.0000035 0.0000032 0.000306 0.000371 1993 1 24 49011 0.211707 0.296802 0.0046309 0.0024202 0.000021 0.000080 0.000273 0.000285 0.0000030 0.0000030 0.000319 0.000344 1993 1 25 49012 0.211850 0.295199 0.0021635 0.0025298 -0.000024 0.000063 0.000194 0.000217 0.0000024 0.0000026 0.000331 0.000317 1993 1 26 49013 0.211682 0.293044 -0.0004154 0.0026381 -0.000114 0.000093 0.000116 0.000124 0.0000023 0.0000033 0.000341 0.000306 1993 1 27 49014 0.211316 0.291258 -0.0030971 0.0027210 -0.000216 0.000184 0.000121 0.000103 0.0000041 0.0000037 0.000333 0.000379 1993 1 28 49015 0.210918 0.289167 -0.0058418 0.0027506 -0.000300 0.000284 0.000190 0.000133 0.0000051 0.0000049 0.000342 0.000434 1993 1 29 49016 0.210306 0.287063 -0.0085851 0.0027139 -0.000322 0.000328 0.000215 0.000155 0.0000056 0.0000051 0.000364 0.000476 1993 1 30 49017 0.209732 0.284184 -0.0112609 0.0026222 -0.000226 0.000198 0.000152 0.000153 0.0000050 0.0000048 0.000380 0.000457 1993 1 31 49018 0.208523 0.281781 -0.0138273 0.0025069 -0.000084 -0.000012 0.000255 0.000336 0.0000039 0.0000039 0.000394 0.000418 1993 2 1 49019 0.206339 0.279079 -0.0162799 0.0024053 0.000025 -0.000197 0.000333 0.000416 0.0000028 0.0000030 0.000407 0.000380 1993 2 2 49020 0.205887 0.276559 -0.0186517 0.0023511 0.000044 -0.000264 0.000470 0.000571 0.0000020 0.0000027 0.000398 0.000325 1993 2 3 49021 0.205062 0.273194 -0.0210048 0.0023683 -0.000076 -0.000073 0.000518 0.000589 0.0000026 0.0000026 0.000271 0.000183 1993 2 4 49022 0.204405 0.270293 -0.0234181 0.0024695 -0.000217 -0.000122 0.000351 0.000368 0.0000031 0.0000031 0.000287 0.000360 1993 2 5 49023 0.205228 0.267459 -0.0259743 0.0026527 -0.000072 -0.000253 0.000284 0.000340 0.0000036 0.0000032 0.000302 0.000409 1993 2 6 49024 0.205431 0.265580 -0.0287434 0.0028945 0.000029 -0.000291 0.000359 0.000407 0.0000034 0.0000032 0.000311 0.000385 1993 2 7 49025 0.205792 0.263437 -0.0317620 0.0031451 0.000059 -0.000245 0.000460 0.000638 0.0000028 0.0000028 0.000319 0.000349 1993 2 8 49026 0.205479 0.261116 -0.0350072 0.0033337 0.000025 -0.000140 0.000328 0.000495 0.0000023 0.0000024 0.000327 0.000313 1993 2 9 49027 0.204169 0.258910 -0.0383849 0.0033925 -0.000073 -0.000012 0.000238 0.000245 0.0000019 0.0000023 0.000329 0.000276 1993 2 10 49028 0.203617 0.255757 -0.0417445 0.0032930 -0.000235 0.000090 0.000218 0.000201 0.0000024 0.0000020 0.000295 0.000236 1993 2 11 49029 0.202377 0.253564 -0.0449360 0.0030849 -0.000228 0.000089 0.000182 0.000171 0.0000020 0.0000030 0.000505 0.000516 1993 2 12 49030 0.201538 0.250846 -0.0479008 0.0028047 -0.000142 0.000035 0.000195 0.000210 0.0000037 0.0000019 0.000375 0.000495 1993 2 13 49031 0.199962 0.248336 -0.0505525 0.0025119 -0.000142 -0.000066 0.000147 0.000158 0.0000018 0.0000023 0.000216 0.000240 1993 2 14 49032 0.198893 0.246019 -0.0529447 0.0023133 -0.000121 -0.000124 0.000231 0.000224 0.0000010 0.0000016 0.000199 0.000164 1993 2 15 49033 0.197872 0.243140 -0.0552040 0.0022257 -0.000065 -0.000125 0.000284 0.000260 0.0000013 0.0000013 0.000245 0.000204 1993 2 16 49034 0.197384 0.240465 -0.0574207 0.0022145 0.000003 -0.000091 0.000231 0.000212 0.0000017 0.0000019 0.000282 0.000244 1993 2 17 49035 0.196786 0.237733 -0.0596547 0.0022594 0.000072 -0.000052 0.000286 0.000250 0.0000024 0.0000024 0.000282 0.000287 1993 2 18 49036 0.196444 0.235396 -0.0619567 0.0023541 0.000109 -0.000017 0.000289 0.000220 0.0000032 0.0000032 0.000281 0.000329 1993 2 19 49037 0.195591 0.233210 -0.0643736 0.0024893 0.000092 0.000004 0.000247 0.000214 0.0000039 0.0000034 0.000281 0.000372 1993 2 20 49038 0.194864 0.231453 -0.0669382 0.0026405 0.000004 0.000008 0.000247 0.000289 0.0000037 0.0000035 0.000296 0.000377 1993 2 21 49039 0.193159 0.230067 -0.0696494 0.0027701 -0.000121 0.000011 0.000303 0.000368 0.0000031 0.0000031 0.000318 0.000370 1993 2 22 49040 0.191296 0.229448 -0.0724670 0.0028448 -0.000238 0.000033 0.000272 0.000308 0.0000026 0.0000027 0.000339 0.000363 1993 2 23 49041 0.188842 0.227597 -0.0753242 0.0028506 -0.000299 0.000083 0.000225 0.000217 0.0000022 0.0000027 0.000354 0.000358 1993 2 24 49042 0.186203 0.225860 -0.0781524 0.0027961 -0.000271 0.000165 0.000300 0.000248 0.0000028 0.0000028 0.000337 0.000366 1993 2 25 49043 0.183434 0.223223 -0.0809018 0.0027014 -0.000169 0.000252 0.000353 0.000284 0.0000033 0.0000033 0.000319 0.000374 1993 2 26 49044 0.182311 0.220991 -0.0835443 0.0025850 -0.000025 0.000320 0.000298 0.000246 0.0000039 0.0000034 0.000302 0.000383 1993 2 27 49045 0.179878 0.219130 -0.0860667 0.0024584 0.000113 0.000343 0.000263 0.000299 0.0000035 0.0000034 0.000297 0.000374 1993 2 28 49046 0.178438 0.217041 -0.0884635 0.0023336 0.000202 0.000330 0.000231 0.000337 0.0000029 0.0000029 0.000296 0.000360 1993 3 1 49047 0.176021 0.214959 -0.0907446 0.0022334 0.000213 0.000297 0.000168 0.000227 0.0000023 0.0000024 0.000294 0.000346 1993 3 2 49048 0.174034 0.212733 -0.0929490 0.0021899 0.000142 0.000259 0.000145 0.000145 0.0000018 0.0000023 0.000287 0.000324 1993 3 3 49049 0.172186 0.211196 -0.0951499 0.0022312 0.000001 0.000231 0.000140 0.000103 0.0000023 0.0000023 0.000245 0.000261 1993 3 4 49050 0.170972 0.209625 -0.0974400 0.0023649 -0.000144 0.000184 0.000139 0.000093 0.0000028 0.0000025 0.000204 0.000198 1993 3 5 49051 0.169553 0.208054 -0.0999043 0.0025727 -0.000206 0.000107 0.000147 0.000104 0.0000026 0.0000026 0.000268 0.000209 1993 3 6 49052 0.168401 0.206780 -0.1025964 0.0028178 -0.000248 -0.000017 0.000183 0.000148 0.0000024 0.0000024 0.000288 0.000238 1993 3 7 49053 0.167070 0.205137 -0.1055288 0.0030520 -0.000252 -0.000140 0.000245 0.000233 0.0000022 0.0000022 0.000294 0.000272 1993 3 8 49054 0.165485 0.203135 -0.1086662 0.0032217 -0.000217 -0.000213 0.000244 0.000252 0.0000020 0.0000020 0.000299 0.000307 1993 3 9 49055 0.164032 0.201982 -0.1119240 0.0032812 -0.000153 -0.000201 0.000220 0.000222 0.0000019 0.0000023 0.000284 0.000309 1993 3 10 49056 0.163182 0.199760 -0.1151825 0.0032138 -0.000059 -0.000086 0.000218 0.000204 0.0000026 0.0000026 0.000167 0.000146 1993 3 11 49057 0.162385 0.198953 -0.1183230 0.0030465 -0.000041 0.000037 0.000211 0.000186 0.0000033 0.0000033 0.000253 0.000224 1993 3 12 49058 0.162582 0.197045 -0.1212712 0.0028407 -0.000055 0.000114 0.000204 0.000193 0.0000039 0.0000035 0.000358 0.000325 1993 3 13 49059 0.161287 0.195906 -0.1240202 0.0026601 -0.000064 0.000078 0.000209 0.000224 0.0000037 0.0000035 0.000366 0.000344 1993 3 14 49060 0.159916 0.194354 -0.1266172 0.0025420 -0.000052 -0.000018 0.000227 0.000244 0.0000031 0.0000031 0.000341 0.000335 1993 3 15 49061 0.157952 0.193064 -0.1291302 0.0024911 -0.000012 -0.000103 0.000221 0.000231 0.0000026 0.0000027 0.000317 0.000325 1993 3 16 49062 0.155472 0.191552 -0.1316207 0.0024957 0.000052 -0.000117 0.000213 0.000208 0.0000022 0.0000026 0.000289 0.000297 1993 3 17 49063 0.153079 0.189831 -0.1341373 0.0025440 0.000109 0.000016 0.000213 0.000173 0.0000027 0.0000027 0.000245 0.000172 1993 3 18 49064 0.150301 0.188702 -0.1367194 0.0026253 0.000210 0.000091 0.000224 0.000174 0.0000031 0.0000031 0.000399 0.000446 1993 3 19 49065 0.148192 0.187097 -0.1393933 0.0027220 0.000209 0.000008 0.000208 0.000178 0.0000036 0.0000032 0.000365 0.000346 1993 3 20 49066 0.145965 0.185963 -0.1421623 0.0028092 0.000132 -0.000015 0.000218 0.000191 0.0000033 0.0000032 0.000333 0.000311 1993 3 21 49067 0.144173 0.184097 -0.1450040 0.0028667 0.000030 0.000016 0.000249 0.000277 0.0000029 0.0000029 0.000315 0.000324 1993 3 22 49068 0.142404 0.182837 -0.1478832 0.0028883 -0.000055 0.000074 0.000244 0.000294 0.0000025 0.0000025 0.000298 0.000337 1993 3 23 49069 0.140479 0.181500 -0.1507657 0.0028755 -0.000088 0.000141 0.000232 0.000265 0.0000020 0.0000020 0.000283 0.000345 1993 3 24 49070 0.138089 0.179893 -0.1536197 0.0028274 0.000001 0.000222 0.000216 0.000251 0.0000015 0.0000015 0.000288 0.000333 1993 3 25 49071 0.135891 0.178951 -0.1564082 0.0027394 -0.000054 0.000082 0.000172 0.000183 0.0000009 0.0000024 0.000213 0.000212 1993 3 26 49072 0.132905 0.177831 -0.1590904 0.0026153 -0.000380 0.000075 0.000152 0.000178 0.0000034 0.0000023 0.000345 0.000356 1993 3 27 49073 0.129896 0.176881 -0.1616375 0.0024781 -0.000445 0.000077 0.000212 0.000248 0.0000037 0.0000032 0.000367 0.000394 1993 3 28 49074 0.126623 0.175356 -0.1640535 0.0023623 -0.000304 0.000077 0.000347 0.000365 0.0000030 0.0000030 0.000337 0.000378 1993 3 29 49075 0.123562 0.174326 -0.1663774 0.0022972 -0.000079 0.000073 0.000337 0.000341 0.0000024 0.0000025 0.000307 0.000363 1993 3 30 49076 0.120243 0.172666 -0.1686697 0.0022995 0.000111 0.000049 0.000227 0.000231 0.0000019 0.0000022 0.000280 0.000343 1993 3 31 49077 0.117866 0.171128 -0.1710015 0.0023774 0.000123 0.000000 0.000210 0.000199 0.0000019 0.0000019 0.000260 0.000304 1993 4 1 49078 0.115376 0.170151 -0.1734479 0.0025314 0.000035 -0.000046 0.000209 0.000184 0.0000019 0.0000019 0.000241 0.000266 1993 4 2 49079 0.112655 0.169418 -0.1760794 0.0027474 -0.000095 -0.000063 0.000236 0.000217 0.0000020 0.0000020 0.000221 0.000227 1993 4 3 49080 0.109894 0.169359 -0.1789426 0.0029886 -0.000155 -0.000026 0.000392 0.000321 0.0000020 0.0000020 0.000242 0.000269 1993 4 4 49081 0.107044 0.168650 -0.1820370 0.0031993 -0.000140 0.000048 0.000395 0.000311 0.0000020 0.0000020 0.000278 0.000339 1993 4 5 49082 0.103410 0.168079 -0.1853037 0.0033238 -0.000079 0.000129 0.000225 0.000208 0.0000021 0.0000022 0.000313 0.000408 1993 4 6 49083 0.100143 0.167361 -0.1886390 0.0033317 -0.000022 0.000179 0.000206 0.000195 0.0000023 0.0000028 0.000350 0.000458 1993 4 7 49084 0.096639 0.167106 -0.1919283 0.0032315 -0.000024 0.000170 0.000212 0.000177 0.0000034 0.0000034 0.000395 0.000409 1993 4 8 49085 0.093585 0.166594 -0.1950827 0.0030633 -0.000073 0.000093 0.000188 0.000154 0.0000046 0.0000039 0.000440 0.000359 1993 4 9 49086 0.090085 0.166321 -0.1980592 0.0028791 -0.000152 -0.000046 0.000211 0.000185 0.0000044 0.0000042 0.000438 0.000369 1993 4 10 49087 0.087544 0.165463 -0.2008628 0.0027241 -0.000211 -0.000171 0.000279 0.000307 0.0000038 0.0000038 0.000419 0.000398 1993 4 11 49088 0.083966 0.165030 -0.2035355 0.0026281 -0.000204 -0.000212 0.000325 0.000399 0.0000032 0.0000032 0.000401 0.000427 1993 4 12 49089 0.081481 0.164830 -0.2061431 0.0026034 -0.000114 -0.000138 0.000240 0.000277 0.0000026 0.0000027 0.000382 0.000457 1993 4 13 49090 0.079335 0.164382 -0.2087585 0.0026460 0.000054 0.000037 0.000132 0.000131 0.0000022 0.0000029 0.000360 0.000468 1993 4 14 49091 0.077219 0.164598 -0.2114442 0.0027368 0.000303 0.000313 0.000114 0.000109 0.0000033 0.0000033 0.000320 0.000387 1993 4 15 49092 0.076091 0.164368 -0.2142362 0.0028453 0.000413 0.000346 0.000106 0.000103 0.0000043 0.0000043 0.000181 0.000193 1993 4 16 49093 0.074060 0.164595 -0.2171347 0.0029371 0.000253 0.000106 0.000111 0.000110 0.0000053 0.0000045 0.000404 0.000311 1993 4 17 49094 0.071969 0.164158 -0.2201057 0.0029832 0.000220 -0.000139 0.000126 0.000128 0.0000048 0.0000045 0.000438 0.000362 1993 4 18 49095 0.069996 0.163657 -0.2230915 0.0029716 0.000240 -0.000314 0.000176 0.000206 0.0000038 0.0000038 0.000395 0.000381 1993 4 19 49096 0.067510 0.163617 -0.2260362 0.0029170 0.000241 -0.000366 0.000181 0.000213 0.0000028 0.0000029 0.000352 0.000399 1993 4 20 49097 0.064716 0.163558 -0.2289120 0.0028527 0.000167 -0.000282 0.000144 0.000141 0.0000020 0.0000027 0.000335 0.000412 1993 4 21 49098 0.061935 0.164385 -0.2317297 0.0028067 -0.000141 -0.000095 0.000138 0.000120 0.0000026 0.0000026 0.000448 0.000393 1993 4 22 49099 0.059247 0.164375 -0.2345166 0.0027760 0.000027 0.000049 0.000131 0.000116 0.0000032 0.0000032 0.000188 0.000165 1993 4 23 49100 0.056552 0.164278 -0.2372781 0.0027311 0.000162 -0.000001 0.000137 0.000131 0.0000038 0.0000034 0.000371 0.000235 1993 4 24 49101 0.053879 0.164250 -0.2399823 0.0026481 0.000252 -0.000165 0.000164 0.000192 0.0000035 0.0000033 0.000411 0.000296 1993 4 25 49102 0.051343 0.163934 -0.2425863 0.0025446 0.000272 -0.000344 0.000235 0.000296 0.0000028 0.0000028 0.000370 0.000333 1993 4 26 49103 0.048200 0.163876 -0.2450911 0.0024827 0.000210 -0.000443 0.000246 0.000288 0.0000022 0.0000029 0.000329 0.000369 1993 4 27 49104 0.045841 0.164074 -0.2475753 0.0025321 0.000092 -0.000385 0.000223 0.000257 0.0000029 0.0000064 0.000331 0.000400 1993 4 28 49105 0.044260 0.164339 -0.2501773 0.0027158 -0.000071 -0.000081 0.000226 0.000254 0.0000107 0.0000029 0.000554 0.000401 1993 4 29 49106 0.041686 0.164343 -0.2530216 0.0029644 -0.000033 0.000042 0.000179 0.000179 0.0000028 0.0000070 0.000289 0.000212 1993 4 30 49107 0.039693 0.164852 -0.2561090 0.0031946 0.000145 0.000046 0.000187 0.000187 0.0000034 0.0000032 0.000441 0.000284 1993 5 1 49108 0.038042 0.165264 -0.2593992 0.0033705 0.000221 0.000114 0.000279 0.000285 0.0000036 0.0000032 0.000408 0.000264 1993 5 2 49109 0.036513 0.165551 -0.2628238 0.0034614 0.000221 0.000181 0.000292 0.000320 0.0000030 0.0000030 0.000282 0.000193 1993 5 3 49110 0.034624 0.165768 -0.2662857 0.0034432 0.000201 0.000176 0.000285 0.000266 0.0000024 0.0000024 0.000181 0.000136 1993 5 4 49111 0.033355 0.166175 -0.2696729 0.0033078 0.000205 0.000069 0.000256 0.000196 0.0000019 0.0000019 0.000145 0.000112 1993 5 5 49112 0.031084 0.166674 -0.2728745 0.0030712 0.000182 0.000009 0.000174 0.000161 0.0000013 0.0000017 0.000271 0.000272 1993 5 6 49113 0.029504 0.166735 -0.2758075 0.0027828 0.000071 -0.000025 0.000173 0.000160 0.0000016 0.0000015 0.000378 0.000346 1993 5 7 49114 0.027509 0.166797 -0.2784526 0.0025241 -0.000066 -0.000018 0.000238 0.000200 0.0000017 0.0000017 0.000306 0.000345 1993 5 8 49115 0.025234 0.166706 -0.2808813 0.0023729 -0.000071 0.000031 0.000354 0.000296 0.0000018 0.0000018 0.000186 0.000233 1993 5 9 49116 0.023414 0.166274 -0.2832261 0.0023493 0.000016 0.000087 0.000363 0.000305 0.0000018 0.0000018 0.000070 0.000071 1993 5 10 49117 0.021104 0.165932 -0.2856007 0.0024014 0.000048 0.000091 0.000265 0.000232 0.0000019 0.0000019 0.000150 0.000147 1993 5 11 49118 0.019313 0.166284 -0.2880398 0.0024532 0.000071 0.000074 0.000206 0.000190 0.0000019 0.0000019 0.000278 0.000281 1993 5 12 49119 0.017522 0.166801 -0.2905101 0.0024684 0.000114 0.000070 0.000179 0.000156 0.0000019 0.0000015 0.000407 0.000416 1993 5 13 49120 0.016500 0.167171 -0.2929748 0.0024700 0.000201 0.000124 0.000137 0.000115 0.0000012 0.0000014 0.000246 0.000265 1993 5 14 49121 0.015193 0.167691 -0.2954450 0.0024978 0.000340 0.000208 0.000149 0.000130 0.0000009 0.0000012 0.000255 0.000297 1993 5 15 49122 0.013742 0.168308 -0.2979622 0.0025563 0.000422 0.000264 0.000230 0.000192 0.0000011 0.0000011 0.000304 0.000347 1993 5 16 49123 0.012918 0.169034 -0.3005466 0.0026090 0.000395 0.000264 0.000237 0.000215 0.0000013 0.0000013 0.000284 0.000309 1993 5 17 49124 0.010941 0.169873 -0.3031679 0.0026116 0.000286 0.000201 0.000210 0.000224 0.0000015 0.0000015 0.000265 0.000270 1993 5 18 49125 0.009795 0.170414 -0.3057586 0.0025481 0.000143 0.000082 0.000179 0.000196 0.0000017 0.0000013 0.000245 0.000231 1993 5 19 49126 0.008634 0.171661 -0.3082558 0.0024391 -0.000060 -0.000046 0.000144 0.000146 0.0000011 0.0000015 0.000208 0.000177 1993 5 20 49127 0.007573 0.172685 -0.3106329 0.0023215 -0.000044 -0.000202 0.000163 0.000142 0.0000013 0.0000015 0.000196 0.000192 1993 5 21 49128 0.006070 0.173854 -0.3129007 0.0022250 0.000092 -0.000316 0.000207 0.000174 0.0000019 0.0000019 0.000195 0.000230 1993 5 22 49129 0.004520 0.174775 -0.3150921 0.0021644 0.000221 -0.000341 0.000209 0.000159 0.0000024 0.0000021 0.000194 0.000268 1993 5 23 49130 0.002910 0.175556 -0.3172470 0.0021427 0.000170 -0.000228 0.000219 0.000177 0.0000023 0.0000022 0.000185 0.000234 1993 5 24 49131 0.000924 0.176307 -0.3194010 0.0021617 0.000041 -0.000074 0.000225 0.000214 0.0000021 0.0000021 0.000175 0.000186 1993 5 25 49132 -0.001528 0.176918 -0.3215938 0.0022352 -0.000070 0.000040 0.000202 0.000168 0.0000018 0.0000018 0.000165 0.000139 1993 5 26 49133 -0.004804 0.177631 -0.3238878 0.0023875 0.000001 -0.000036 0.000189 0.000150 0.0000016 0.0000020 0.000302 0.000248 1993 5 27 49134 -0.007300 0.177952 -0.3263724 0.0026243 0.000165 -0.000107 0.000194 0.000173 0.0000021 0.0000019 0.000422 0.000484 1993 5 28 49135 -0.008891 0.177871 -0.3291253 0.0028817 0.000337 -0.000171 0.000242 0.000212 0.0000022 0.0000021 0.000440 0.000541 1993 5 29 49136 -0.010711 0.178802 -0.3321127 0.0030287 0.000469 -0.000225 0.000293 0.000254 0.0000021 0.0000021 0.000414 0.000492 1993 5 30 49137 -0.011901 0.179075 -0.3351526 0.0029631 0.000528 -0.000259 0.000317 0.000269 0.0000019 0.0000019 0.000389 0.000443 1993 5 31 49138 -0.013149 0.179912 -0.3380077 0.0027057 0.000499 -0.000275 0.000283 0.000241 0.0000018 0.0000018 0.000363 0.000394 1993 6 1 49139 -0.015511 0.180405 -0.3405388 0.0023953 0.000398 -0.000280 0.000235 0.000191 0.0000016 0.0000016 0.000337 0.000345 1993 6 2 49140 -0.017162 0.180641 -0.3427858 0.0021758 0.000263 -0.000268 0.000188 0.000146 0.0000015 0.0000015 0.000312 0.000296 1993 6 3 49141 -0.019394 0.180833 -0.3448944 0.0020817 0.000129 -0.000315 0.000159 0.000141 0.0000014 0.0000015 0.000578 0.000471 1993 6 4 49142 -0.020865 0.181094 -0.3469681 0.0020390 0.000075 -0.000183 0.000171 0.000160 0.0000014 0.0000014 0.000296 0.000253 1993 6 5 49143 -0.023101 0.182254 -0.3489993 0.0019739 0.000058 -0.000088 0.000211 0.000208 0.0000014 0.0000014 0.000258 0.000207 1993 6 6 49144 -0.024806 0.183250 -0.3509413 0.0018985 0.000090 -0.000039 0.000244 0.000282 0.0000014 0.0000014 0.000276 0.000202 1993 6 7 49145 -0.026877 0.183831 -0.3528131 0.0018790 0.000156 -0.000052 0.000218 0.000273 0.0000014 0.0000014 0.000295 0.000196 1993 6 8 49146 -0.028192 0.184801 -0.3547055 0.0019445 0.000221 -0.000131 0.000192 0.000215 0.0000014 0.0000014 0.000313 0.000190 1993 6 9 49147 -0.030304 0.185926 -0.3566999 0.0020555 0.000349 -0.000200 0.000154 0.000156 0.0000014 0.0000014 0.000286 0.000236 1993 6 10 49148 -0.031864 0.186736 -0.3588097 0.0021545 0.000248 -0.000397 0.000169 0.000157 0.0000014 0.0000014 0.000306 0.000385 1993 6 11 49149 -0.033881 0.187771 -0.3609996 0.0022169 0.000149 -0.000428 0.000223 0.000191 0.0000014 0.0000014 0.000298 0.000409 1993 6 12 49150 -0.034644 0.188406 -0.3632325 0.0022452 0.000117 -0.000297 0.000256 0.000218 0.0000014 0.0000014 0.000264 0.000352 1993 6 13 49151 -0.035594 0.189672 -0.3654781 0.0022362 0.000130 -0.000140 0.000262 0.000216 0.0000014 0.0000014 0.000231 0.000296 1993 6 14 49152 -0.036692 0.190973 -0.3676936 0.0021757 0.000179 -0.000055 0.000212 0.000164 0.0000015 0.0000015 0.000198 0.000239 1993 6 15 49153 -0.038089 0.192762 -0.3698211 0.0020620 0.000235 -0.000098 0.000144 0.000124 0.0000015 0.0000016 0.000165 0.000182 1993 6 16 49154 -0.038925 0.194417 -0.3718137 0.0019206 0.000249 -0.000449 0.000120 0.000124 0.0000016 0.0000016 0.000271 0.000303 1993 6 17 49155 -0.041111 0.195403 -0.3736635 0.0017905 0.000226 -0.000604 0.000162 0.000152 0.0000017 0.0000016 0.000406 0.000343 1993 6 18 49156 -0.042477 0.196822 -0.3754022 0.0017026 0.000172 -0.000572 0.000182 0.000170 0.0000016 0.0000016 0.000540 0.000342 1993 6 19 49157 -0.045320 0.197455 -0.3770836 0.0016720 0.000105 -0.000437 0.000181 0.000200 0.0000016 0.0000016 0.000674 0.000341 1993 6 20 49158 -0.047218 0.198389 -0.3787683 0.0017044 0.000054 -0.000276 0.000211 0.000209 0.0000015 0.0000015 0.000808 0.000341 1993 6 21 49159 -0.049645 0.199499 -0.3805178 0.0017993 0.000043 -0.000201 0.000190 0.000184 0.0000015 0.0000015 0.000762 0.000306 1993 6 22 49160 -0.051509 0.200274 -0.3823879 0.0019438 0.000090 -0.000307 0.000160 0.000165 0.0000015 0.0000015 0.000136 0.000164 1993 6 23 49161 -0.053111 0.201044 -0.3844134 0.0021058 0.000116 -0.000318 0.000146 0.000131 0.0000014 0.0000016 0.000243 0.000271 1993 6 24 49162 -0.054683 0.202205 -0.3865903 0.0022409 0.000255 -0.000177 0.000112 0.000097 0.0000017 0.0000017 0.000333 0.000325 1993 6 25 49163 -0.055630 0.203058 -0.3888705 0.0023121 0.000386 0.000015 0.000112 0.000108 0.0000020 0.0000015 0.000412 0.000358 1993 6 26 49164 -0.056378 0.204409 -0.3911821 0.0023059 0.000304 0.000009 0.000122 0.000124 0.0000013 0.0000016 0.000224 0.000242 1993 6 27 49165 -0.057531 0.205497 -0.3934511 0.0022213 0.000188 -0.000019 0.000143 0.000154 0.0000013 0.0000013 0.000210 0.000207 1993 6 28 49166 -0.058718 0.206412 -0.3956016 0.0020650 0.000055 -0.000093 0.000163 0.000161 0.0000013 0.0000013 0.000207 0.000178 1993 6 29 49167 -0.059983 0.207701 -0.3975700 0.0018633 -0.000042 -0.000189 0.000133 0.000117 0.0000013 0.0000013 0.000205 0.000149 1993 6 30 49168 -0.061466 0.208464 -0.3993301 0.0016618 -0.000011 -0.000219 0.000122 0.000111 0.0000014 0.0000014 0.000164 0.000172 1993 7 1 49169 -0.062375 0.210028 0.5990926 0.0015071 0.000014 -0.000305 0.000142 0.000135 0.0000014 0.0000014 0.000159 0.000182 1993 7 2 49170 -0.063928 0.211301 0.5976332 0.0014241 0.000035 -0.000413 0.000150 0.000149 0.0000014 0.0000014 0.000169 0.000184 1993 7 3 49171 -0.065071 0.212387 0.5962191 0.0014081 0.000061 -0.000496 0.000158 0.000158 0.0000014 0.0000014 0.000179 0.000185 1993 7 4 49172 -0.066491 0.214021 0.5947960 0.0014362 0.000099 -0.000522 0.000384 0.000580 0.0000015 0.0000015 0.000189 0.000187 1993 7 5 49173 -0.067069 0.214847 0.5933346 0.0014861 0.000154 -0.000479 0.000589 0.000958 0.0000015 0.0000015 0.000199 0.000188 1993 7 6 49174 -0.067600 0.216433 0.5918221 0.0015428 0.000227 -0.000385 0.000593 0.000957 0.0000015 0.0000015 0.000210 0.000190 1993 7 7 49175 -0.067918 0.217231 0.5902551 0.0015945 0.000302 -0.000276 0.000394 0.000586 0.0000015 0.0000016 0.000220 0.000192 1993 7 8 49176 -0.068365 0.217436 0.5886436 0.0016266 0.000430 -0.000153 0.000365 0.000505 0.0000017 0.0000017 0.000444 0.000528 1993 7 9 49177 -0.067695 0.218352 0.5870140 0.0016273 0.000389 -0.000158 0.000530 0.000757 0.0000018 0.0000018 0.000445 0.000534 1993 7 10 49178 -0.068007 0.219769 0.5854015 0.0015967 0.000347 -0.000209 0.000548 0.000833 0.0000020 0.0000020 0.000369 0.000433 1993 7 11 49179 -0.068569 0.220720 0.5838323 0.0015480 0.000340 -0.000259 0.000370 0.000580 0.0000021 0.0000021 0.000317 0.000369 1993 7 12 49180 -0.068428 0.221046 0.5823147 0.0014936 0.000323 -0.000297 0.000144 0.000163 0.0000023 0.0000023 0.000264 0.000305 1993 7 13 49181 -0.069008 0.223127 0.5808501 0.0014330 0.000295 -0.000305 0.000134 0.000120 0.0000025 0.0000019 0.000211 0.000241 1993 7 14 49182 -0.069701 0.223877 0.5794483 0.0013600 0.000230 -0.000260 0.000116 0.000095 0.0000015 0.0000024 0.000187 0.000215 1993 7 15 49183 -0.070504 0.225968 0.5781239 0.0012890 0.000160 -0.000238 0.000119 0.000090 0.0000024 0.0000021 0.000221 0.000235 1993 7 16 49184 -0.071104 0.226926 0.5768577 0.0012490 0.000172 -0.000239 0.000133 0.000098 0.0000027 0.0000024 0.000395 0.000346 1993 7 17 49185 -0.071925 0.228865 0.5756067 0.0012579 0.000277 -0.000193 0.000112 0.000108 0.0000025 0.0000025 0.000271 0.000219 1993 7 18 49186 -0.072220 0.230219 0.5743174 0.0013294 0.000400 -0.000125 0.000126 0.000124 0.0000023 0.0000023 0.000168 0.000120 1993 7 19 49187 -0.072370 0.232337 0.5729235 0.0014748 0.000457 -0.000098 0.000166 0.000148 0.0000021 0.0000021 0.000282 0.000196 1993 7 20 49188 -0.072861 0.233628 0.5713522 0.0016889 0.000328 -0.000266 0.000149 0.000129 0.0000019 0.0000019 0.000211 0.000162 1993 7 21 49189 -0.073255 0.236008 0.5695471 0.0019365 0.000150 -0.000323 0.000115 0.000094 0.0000017 0.0000019 0.000278 0.000281 1993 7 22 49190 -0.074082 0.237117 0.5675006 0.0021552 0.000045 -0.000120 0.000109 0.000089 0.0000018 0.0000018 0.000359 0.000311 1993 7 23 49191 -0.074467 0.239443 0.5652725 0.0022760 -0.000029 0.000083 0.000142 0.000115 0.0000018 0.0000018 0.000369 0.000300 1993 7 24 49192 -0.075004 0.240967 0.5629869 0.0022546 -0.000066 0.000212 0.000185 0.000142 0.0000018 0.0000018 0.000347 0.000290 1993 7 25 49193 -0.075842 0.242725 0.5607922 0.0020987 -0.000055 0.000259 0.000605 0.000643 0.0000018 0.0000018 0.000325 0.000280 1993 7 26 49194 -0.077374 0.244756 0.5588027 0.0018667 -0.000014 0.000211 0.000836 0.000998 0.0000018 0.0000018 0.000304 0.000270 1993 7 27 49195 -0.077686 0.246021 0.5570563 0.0016397 0.000037 0.000093 0.000662 0.000828 0.0000018 0.0000018 0.000282 0.000260 1993 7 28 49196 -0.079259 0.246681 0.5555092 0.0014853 0.000079 -0.000042 0.000415 0.000502 0.0000018 0.0000019 0.000260 0.000250 1993 7 29 49197 -0.080133 0.249246 0.5540651 0.0014327 0.000127 -0.000185 0.000263 0.000289 0.0000021 0.0000016 0.000468 0.000439 1993 7 30 49198 -0.081425 0.250816 0.5526210 0.0014557 0.000095 -0.000172 0.000245 0.000249 0.0000014 0.0000018 0.000339 0.000311 1993 7 31 49199 -0.082334 0.252165 0.5511327 0.0015081 0.000072 -0.000166 0.000419 0.000497 0.0000015 0.0000018 0.000227 0.000225 1993 8 1 49200 -0.083440 0.254148 0.5495894 0.0015779 0.000095 -0.000219 0.000437 0.000516 0.0000022 0.0000022 0.000252 0.000280 1993 8 2 49201 -0.084447 0.255627 0.5479701 0.0016732 0.000145 -0.000266 0.000136 0.000140 0.0000030 0.0000030 0.000277 0.000334 1993 8 3 49202 -0.085320 0.257353 0.5462452 0.0017920 0.000208 -0.000281 0.000107 0.000108 0.0000037 0.0000026 0.000302 0.000388 1993 8 4 49203 -0.086183 0.259623 0.5443950 0.0019119 0.000249 -0.000211 0.000104 0.000101 0.0000022 0.0000028 0.000262 0.000270 1993 8 5 49204 -0.087521 0.261555 0.5424341 0.0019977 0.000300 -0.000093 0.000109 0.000105 0.0000018 0.0000021 0.000311 0.000262 1993 8 6 49205 -0.089142 0.263653 0.5404131 0.0020218 0.000282 0.000008 0.000121 0.000116 0.0000019 0.0000019 0.000279 0.000265 1993 8 7 49206 -0.091009 0.265560 0.5384031 0.0019765 0.000253 0.000068 0.000130 0.000140 0.0000020 0.0000020 0.000230 0.000243 1993 8 8 49207 -0.092667 0.267680 0.5364703 0.0018772 0.000236 0.000077 0.000153 0.000182 0.0000021 0.0000021 0.000208 0.000216 1993 8 9 49208 -0.094028 0.269363 0.5346552 0.0017503 0.000211 0.000042 0.000162 0.000185 0.0000022 0.0000022 0.000188 0.000189 1993 8 10 49209 -0.094696 0.271523 0.5329710 0.0016184 0.000179 0.000003 0.000137 0.000126 0.0000023 0.0000023 0.000167 0.000162 1993 8 11 49210 -0.095211 0.273895 0.5314137 0.0015011 0.000089 -0.000081 0.000116 0.000096 0.0000024 0.0000023 0.000264 0.000242 1993 8 12 49211 -0.095849 0.276275 0.5299581 0.0014274 0.000092 0.000048 0.000111 0.000099 0.0000023 0.0000023 0.000239 0.000272 1993 8 13 49212 -0.096290 0.278054 0.5285423 0.0014342 0.000121 0.000256 0.000101 0.000097 0.0000022 0.0000022 0.000213 0.000268 1993 8 14 49213 -0.096962 0.280464 0.5270679 0.0015418 0.000145 0.000419 0.000120 0.000112 0.0000020 0.0000020 0.000210 0.000258 1993 8 15 49214 -0.097510 0.282797 0.5254345 0.0017308 0.000158 0.000443 0.000146 0.000158 0.0000019 0.0000019 0.000208 0.000247 1993 8 16 49215 -0.098569 0.284669 0.5235854 0.0019545 0.000148 0.000274 0.000148 0.000165 0.0000017 0.0000017 0.000205 0.000237 1993 8 17 49216 -0.099513 0.286497 0.5215169 0.0021739 0.000112 -0.000049 0.000123 0.000119 0.0000016 0.0000020 0.000203 0.000227 1993 8 18 49217 -0.099779 0.288218 0.5192485 0.0023740 0.000036 -0.000558 0.000098 0.000096 0.0000022 0.0000018 0.000308 0.000305 1993 8 19 49218 -0.100638 0.289762 0.5168001 0.0025302 0.000026 -0.000811 0.000097 0.000088 0.0000019 0.0000018 0.000336 0.000376 1993 8 20 49219 -0.100977 0.291347 0.5142307 0.0025896 -0.000039 -0.000616 0.000085 0.000077 0.0000013 0.0000015 0.000249 0.000268 1993 8 21 49220 -0.101743 0.292608 0.5116606 0.0025115 -0.000069 -0.000254 0.000095 0.000090 0.0000011 0.0000013 0.000238 0.000225 1993 8 22 49221 -0.102063 0.294734 0.5092316 0.0023133 -0.000025 0.000056 0.000126 0.000101 0.0000014 0.0000014 0.000309 0.000290 1993 8 23 49222 -0.102096 0.296352 0.5070371 0.0020667 0.000050 0.000217 0.000123 0.000091 0.0000017 0.0000017 0.000381 0.000354 1993 8 24 49223 -0.102065 0.298654 0.5050843 0.0018476 0.000143 0.000148 0.000117 0.000086 0.0000020 0.0000022 0.000452 0.000419 1993 8 25 49224 -0.101858 0.300237 0.5033194 0.0016930 0.000143 -0.000202 0.000122 0.000080 0.0000027 0.0000026 0.000445 0.000368 1993 8 26 49225 -0.101763 0.302823 0.5016750 0.0016027 0.000301 -0.000567 0.000114 0.000086 0.0000032 0.0000030 0.000574 0.000490 1993 8 27 49226 -0.100942 0.304736 0.5000941 0.0015744 0.000442 -0.000818 0.000111 0.000088 0.0000033 0.0000032 0.000579 0.000517 1993 8 28 49227 -0.100721 0.307739 0.4985114 0.0016150 0.000505 -0.000908 0.000120 0.000108 0.0000032 0.0000032 0.000498 0.000463 1993 8 29 49228 -0.100587 0.309564 0.4968550 0.0017150 0.000495 -0.000844 0.000202 0.000233 0.0000031 0.0000031 0.000416 0.000409 1993 8 30 49229 -0.100500 0.311976 0.4950793 0.0018372 0.000417 -0.000672 0.000258 0.000278 0.0000030 0.0000030 0.000334 0.000355 1993 8 31 49230 -0.099556 0.313974 0.4931855 0.0019426 0.000304 -0.000455 0.000199 0.000192 0.0000029 0.0000028 0.000252 0.000301 1993 9 1 49231 -0.099817 0.315792 0.4912047 0.0020167 0.000204 -0.000324 0.000149 0.000142 0.0000025 0.0000027 0.000283 0.000262 1993 9 2 49232 -0.099721 0.317444 0.4891656 0.0020652 0.000078 -0.000156 0.000158 0.000152 0.0000025 0.0000026 0.000260 0.000186 1993 9 3 49233 -0.099485 0.319429 0.4870877 0.0020870 0.000235 0.000068 0.000185 0.000200 0.0000027 0.0000027 0.000216 0.000175 1993 9 4 49234 -0.099422 0.321110 0.4850031 0.0020655 0.000396 0.000200 0.000215 0.000217 0.0000030 0.0000030 0.000212 0.000189 1993 9 5 49235 -0.099581 0.323249 0.4829649 0.0019948 0.000405 0.000191 0.000243 0.000279 0.0000032 0.0000032 0.000236 0.000192 1993 9 6 49236 -0.099998 0.325561 0.4810171 0.0018993 0.000337 0.000087 0.000218 0.000282 0.0000034 0.0000034 0.000260 0.000195 1993 9 7 49237 -0.100609 0.326483 0.4791639 0.0018167 0.000223 -0.000063 0.000166 0.000177 0.0000036 0.0000031 0.000284 0.000198 1993 9 8 49238 -0.101188 0.328431 0.4773749 0.0017672 0.000149 -0.000205 0.000133 0.000128 0.0000029 0.0000031 0.000276 0.000239 1993 9 9 49239 -0.101324 0.329613 0.4756147 0.0017518 0.000131 -0.000236 0.000138 0.000135 0.0000025 0.0000026 0.000272 0.000249 1993 9 10 49240 -0.101671 0.331544 0.4738517 0.0017772 0.000178 -0.000163 0.000174 0.000172 0.0000024 0.0000024 0.000269 0.000248 1993 9 11 49241 -0.101266 0.332842 0.4720377 0.0018682 0.000269 -0.000031 0.000213 0.000217 0.0000022 0.0000022 0.000266 0.000247 1993 9 12 49242 -0.100832 0.334965 0.4700935 0.0020455 0.000363 0.000093 0.000200 0.000211 0.0000021 0.0000021 0.000263 0.000246 1993 9 13 49243 -0.100095 0.336934 0.4679317 0.0022949 0.000412 0.000140 0.000148 0.000152 0.0000019 0.0000019 0.000260 0.000245 1993 9 14 49244 -0.099252 0.339361 0.4655031 0.0025603 0.000381 0.000081 0.000119 0.000112 0.0000017 0.0000017 0.000257 0.000244 1993 9 15 49245 -0.098475 0.341489 0.4628300 0.0027666 0.000259 -0.000063 0.000098 0.000093 0.0000016 0.0000018 0.000253 0.000243 1993 9 16 49246 -0.097736 0.344254 0.4600066 0.0028518 0.000037 -0.000388 0.000095 0.000101 0.0000018 0.0000018 0.000261 0.000233 1993 9 17 49247 -0.097559 0.346392 0.4571706 0.0027927 -0.000167 -0.000400 0.000110 0.000117 0.0000021 0.0000020 0.000426 0.000393 1993 9 18 49248 -0.097278 0.348521 0.4544579 0.0026157 -0.000343 -0.000304 0.000121 0.000139 0.0000022 0.0000020 0.000488 0.000458 1993 9 19 49249 -0.096954 0.349951 0.4519558 0.0023883 -0.000457 -0.000254 0.000179 0.000209 0.0000019 0.0000019 0.000420 0.000396 1993 9 20 49250 -0.097020 0.351668 0.4496753 0.0021861 -0.000446 -0.000203 0.000201 0.000220 0.0000017 0.0000017 0.000352 0.000334 1993 9 21 49251 -0.097295 0.352672 0.4475615 0.0020586 -0.000298 -0.000171 0.000166 0.000177 0.0000015 0.0000015 0.000283 0.000271 1993 9 22 49252 -0.097471 0.353761 0.4455313 0.0020145 -0.000052 -0.000156 0.000138 0.000142 0.0000013 0.0000016 0.000215 0.000209 1993 9 23 49253 -0.097605 0.355064 0.4435099 0.0020344 0.000272 -0.000132 0.000126 0.000131 0.0000017 0.0000018 0.000327 0.000294 1993 9 24 49254 -0.097598 0.357328 0.4414475 0.0020933 0.000516 -0.000100 0.000135 0.000153 0.0000023 0.0000020 0.000499 0.000429 1993 9 25 49255 -0.096943 0.359004 0.4393151 0.0021746 0.000471 -0.000065 0.000175 0.000200 0.0000023 0.0000023 0.000448 0.000376 1993 9 26 49256 -0.096924 0.360939 0.4370953 0.0022676 0.000283 -0.000048 0.000187 0.000207 0.0000024 0.0000024 0.000395 0.000321 1993 9 27 49257 -0.096531 0.362290 0.4347818 0.0023585 0.000055 -0.000064 0.000146 0.000154 0.0000025 0.0000025 0.000342 0.000267 1993 9 28 49258 -0.095810 0.364856 0.4323852 0.0024258 -0.000110 -0.000110 0.000127 0.000127 0.0000026 0.0000026 0.000289 0.000213 1993 9 29 49259 -0.095921 0.366550 0.4299414 0.0024439 0.000006 -0.000200 0.000114 0.000113 0.0000027 0.0000031 0.000289 0.000271 1993 9 30 49260 -0.095957 0.368739 0.4275107 0.0023964 0.000058 -0.000302 0.000131 0.000118 0.0000037 0.0000023 0.000468 0.000538 1993 10 1 49261 -0.096423 0.370131 0.4251610 0.0023084 0.000067 -0.000241 0.000114 0.000099 0.0000020 0.0000022 0.000288 0.000339 1993 10 2 49262 -0.095734 0.372180 0.4229034 0.0022272 0.000092 -0.000187 0.000155 0.000152 0.0000008 0.0000015 0.000154 0.000170 1993 10 3 49263 -0.095194 0.373616 0.4207122 0.0021685 0.000122 -0.000219 0.000280 0.000262 0.0000010 0.0000010 0.000204 0.000216 1993 10 4 49264 -0.094369 0.375217 0.4185668 0.0021280 0.000130 -0.000278 0.000288 0.000255 0.0000012 0.0000012 0.000253 0.000262 1993 10 5 49265 -0.094054 0.377595 0.4164505 0.0021092 0.000118 -0.000334 0.000216 0.000191 0.0000014 0.0000014 0.000303 0.000308 1993 10 6 49266 -0.093020 0.379588 0.4143359 0.0021282 0.000099 -0.000358 0.000170 0.000161 0.0000016 0.0000017 0.000352 0.000354 1993 10 7 49267 -0.093001 0.381693 0.4121760 0.0022031 0.000013 -0.000289 0.000158 0.000156 0.0000021 0.0000059 0.000408 0.000379 1993 10 8 49268 -0.092498 0.383156 0.4099084 0.0023130 0.000067 -0.000184 0.000177 0.000162 0.0000101 0.0000075 0.000773 0.000651 1993 10 9 49269 -0.091590 0.385083 0.4075288 0.0024274 0.000128 -0.000111 0.000191 0.000195 0.0000130 0.0000099 0.000888 0.000740 1993 10 10 49270 -0.090266 0.386895 0.4050370 0.0025715 0.000115 -0.000076 0.000196 0.000223 0.0000097 0.0000097 0.000717 0.000610 1993 10 11 49271 -0.088658 0.388715 0.4023786 0.0027785 0.000070 -0.000067 0.000201 0.000207 0.0000063 0.0000063 0.000547 0.000481 1993 10 12 49272 -0.087406 0.390783 0.3994876 0.0030251 0.000015 -0.000090 0.000176 0.000168 0.0000029 0.0000040 0.000376 0.000351 1993 10 13 49273 -0.086274 0.393117 0.3963531 0.0032303 -0.000030 -0.000016 0.000147 0.000130 0.0000016 0.0000021 0.000239 0.000233 1993 10 14 49274 -0.084603 0.395506 0.3930649 0.0033086 -0.000022 -0.000158 0.000156 0.000133 0.0000014 0.0000015 0.000274 0.000316 1993 10 15 49275 -0.083947 0.397514 0.3897764 0.0032272 0.000100 -0.000403 0.000193 0.000181 0.0000013 0.0000013 0.000242 0.000281 1993 10 16 49276 -0.082669 0.399541 0.3866397 0.0030166 0.000199 -0.000503 0.000251 0.000294 0.0000013 0.0000013 0.000203 0.000220 1993 10 17 49277 -0.082319 0.401407 0.3837513 0.0027516 0.000205 -0.000440 0.000265 0.000402 0.0000012 0.0000012 0.000203 0.000208 1993 10 18 49278 -0.081398 0.401943 0.3811229 0.0025182 0.000150 -0.000321 0.000206 0.000321 0.0000012 0.0000012 0.000204 0.000195 1993 10 19 49279 -0.081807 0.403359 0.3786882 0.0023779 0.000058 -0.000210 0.000140 0.000159 0.0000011 0.0000012 0.000204 0.000183 1993 10 20 49280 -0.080541 0.404091 0.3763396 0.0023470 -0.000082 -0.000330 0.000136 0.000127 0.0000013 0.0000013 0.000216 0.000211 1993 10 21 49281 -0.080100 0.405841 0.3739748 0.0023959 -0.000049 -0.000305 0.000188 0.000165 0.0000015 0.0000016 0.000308 0.000334 1993 10 22 49282 -0.079265 0.407440 0.3715385 0.0024776 -0.000049 -0.000277 0.000277 0.000214 0.0000019 0.0000020 0.000351 0.000376 1993 10 23 49283 -0.079361 0.409570 0.3690178 0.0025616 -0.000100 -0.000282 0.000352 0.000247 0.0000024 0.0000024 0.000356 0.000363 1993 10 24 49284 -0.078589 0.410552 0.3664178 0.0026389 -0.000138 -0.000284 0.000477 0.000318 0.0000029 0.0000029 0.000360 0.000350 1993 10 25 49285 -0.078022 0.411860 0.3637454 0.0027083 -0.000134 -0.000274 0.000445 0.000305 0.0000033 0.0000033 0.000365 0.000337 1993 10 26 49286 -0.077418 0.413587 0.3610097 0.0027609 -0.000067 -0.000232 0.000261 0.000203 0.0000038 0.0000027 0.000370 0.000323 1993 10 27 49287 -0.076285 0.415374 0.3582349 0.0027770 0.000117 -0.000247 0.000182 0.000162 0.0000021 0.0000028 0.000354 0.000321 1993 10 28 49288 -0.075568 0.417328 0.3554679 0.0027413 0.000255 -0.000028 0.000146 0.000139 0.0000018 0.0000020 0.000556 0.000314 1993 10 29 49289 -0.075670 0.418881 0.3527630 0.0026560 0.000295 0.000093 0.000149 0.000143 0.0000020 0.0000020 0.000592 0.000308 1993 10 30 49290 -0.075128 0.420049 0.3501629 0.0025395 0.000239 0.000058 0.000170 0.000184 0.0000023 0.0000023 0.000508 0.000301 1993 10 31 49291 -0.074839 0.420622 0.3476864 0.0024154 0.000119 -0.000063 0.000220 0.000268 0.0000025 0.0000025 0.000424 0.000295 1993 11 1 49292 -0.074163 0.422157 0.3453290 0.0023047 -0.000019 -0.000213 0.000213 0.000266 0.0000028 0.0000028 0.000340 0.000288 1993 11 2 49293 -0.072496 0.422535 0.3430676 0.0022250 -0.000137 -0.000323 0.000170 0.000170 0.0000031 0.0000023 0.000256 0.000282 1993 11 3 49294 -0.071182 0.423275 0.3408633 0.0021908 -0.000101 -0.000282 0.000151 0.000112 0.0000018 0.0000023 0.000237 0.000256 1993 11 4 49295 -0.068744 0.424269 0.3386655 0.0022110 -0.000149 -0.000185 0.000161 0.000116 0.0000014 0.0000016 0.000215 0.000214 1993 11 5 49296 -0.066955 0.425601 0.3364201 0.0022854 -0.000243 -0.000126 0.000184 0.000136 0.0000014 0.0000014 0.000681 0.000627 1993 11 6 49297 -0.064348 0.427397 0.3340777 0.0024087 -0.000172 -0.000048 0.000249 0.000202 0.0000014 0.0000014 0.000854 0.000779 1993 11 7 49298 -0.062592 0.428979 0.3315940 0.0025759 0.000031 0.000043 0.000266 0.000280 0.0000014 0.0000014 0.000642 0.000581 1993 11 8 49299 -0.060311 0.430700 0.3289289 0.0027748 0.000186 0.000084 0.000236 0.000266 0.0000014 0.0000014 0.000430 0.000383 1993 11 9 49300 -0.058681 0.432531 0.3260604 0.0029704 0.000193 0.000057 0.000228 0.000199 0.0000014 0.0000014 0.000219 0.000186 1993 11 10 49301 -0.056916 0.433653 0.3230160 0.0031022 -0.000154 -0.000081 0.000165 0.000135 0.0000014 0.0000014 0.000189 0.000202 1993 11 11 49302 -0.055077 0.434776 0.3198905 0.0031116 -0.000488 -0.000200 0.000132 0.000143 0.0000014 0.0000014 0.000185 0.000211 1993 11 12 49303 -0.054091 0.436004 0.3168246 0.0029814 -0.000752 -0.000278 0.000172 0.000219 0.0000015 0.0000015 0.000190 0.000219 1993 11 13 49304 -0.052276 0.436638 0.3139462 0.0027538 -0.000886 -0.000304 0.000211 0.000240 0.0000015 0.0000015 0.000194 0.000226 1993 11 14 49305 -0.051163 0.437531 0.3113157 0.0025095 -0.000852 -0.000280 0.000297 0.000333 0.0000016 0.0000016 0.000198 0.000234 1993 11 15 49306 -0.049702 0.438963 0.3089077 0.0023250 -0.000669 -0.000230 0.000282 0.000329 0.0000016 0.0000016 0.000202 0.000241 1993 11 16 49307 -0.048977 0.439522 0.3066375 0.0022366 -0.000394 -0.000183 0.000205 0.000203 0.0000017 0.0000017 0.000206 0.000249 1993 11 17 49308 -0.047759 0.440181 0.3044091 0.0022343 -0.000099 -0.000164 0.000184 0.000175 0.0000017 0.0000017 0.000211 0.000257 1993 11 18 49309 -0.046623 0.441530 0.3021542 0.0022806 0.000136 -0.000196 0.000125 0.000142 0.0000018 0.0000017 0.000308 0.000348 1993 11 19 49310 -0.046160 0.442792 0.2998444 0.0023398 0.000291 -0.000246 0.000111 0.000131 0.0000017 0.0000017 0.000332 0.000368 1993 11 20 49311 -0.046132 0.444114 0.2974787 0.0023931 0.000354 -0.000295 0.000159 0.000156 0.0000017 0.0000017 0.000304 0.000337 1993 11 21 49312 -0.045893 0.445355 0.2950656 0.0024359 0.000328 -0.000331 0.000203 0.000189 0.0000017 0.0000017 0.000275 0.000307 1993 11 22 49313 -0.044807 0.445851 0.2926155 0.0024666 0.000235 -0.000340 0.000202 0.000197 0.0000016 0.0000016 0.000246 0.000277 1993 11 23 49314 -0.043760 0.446579 0.2901423 0.0024791 0.000107 -0.000317 0.000208 0.000174 0.0000016 0.0000016 0.000217 0.000246 1993 11 24 49315 -0.042514 0.447537 0.2876685 0.0024628 -0.000022 -0.000268 0.000175 0.000131 0.0000016 0.0000015 0.000189 0.000216 1993 11 25 49316 -0.041636 0.448504 0.2852273 0.0024077 -0.000123 -0.000201 0.000135 0.000138 0.0000015 0.0000015 0.000178 0.000204 1993 11 26 49317 -0.040864 0.449521 0.2828608 0.0023095 -0.000176 -0.000128 0.000187 0.000231 0.0000014 0.0000014 0.000174 0.000197 1993 11 27 49318 -0.040294 0.450276 0.2806117 0.0021743 -0.000174 -0.000068 0.000251 0.000297 0.0000012 0.0000012 0.000170 0.000191 1993 11 28 49319 -0.039082 0.450935 0.2785104 0.0020220 -0.000126 -0.000034 0.000346 0.000401 0.0000011 0.0000011 0.000167 0.000184 1993 11 29 49320 -0.038472 0.451877 0.2765603 0.0018854 -0.000055 -0.000040 0.000346 0.000422 0.0000010 0.0000010 0.000163 0.000178 1993 11 30 49321 -0.038557 0.451655 0.2747264 0.0018011 0.000011 -0.000093 0.000200 0.000237 0.0000009 0.0000012 0.000159 0.000172 1993 12 1 49322 -0.036471 0.452626 0.2729393 0.0017946 0.000099 -0.000146 0.000150 0.000138 0.0000014 0.0000019 0.000193 0.000201 1993 12 2 49323 -0.035714 0.453238 0.2711158 0.0018546 0.000026 -0.000314 0.000169 0.000150 0.0000028 0.0000023 0.000232 0.000304 1993 12 3 49324 -0.034103 0.454214 0.2692114 0.0019569 -0.000035 -0.000429 0.000185 0.000171 0.0000031 0.0000028 0.000243 0.000325 1993 12 4 49325 -0.032239 0.454853 0.2671920 0.0021014 -0.000052 -0.000449 0.000210 0.000208 0.0000027 0.0000027 0.000240 0.000294 1993 12 5 49326 -0.030459 0.456555 0.2650108 0.0022887 -0.000062 -0.000399 0.000230 0.000233 0.0000023 0.0000023 0.000237 0.000264 1993 12 6 49327 -0.029531 0.457158 0.2626291 0.0024924 -0.000077 -0.000305 0.000201 0.000200 0.0000019 0.0000019 0.000234 0.000233 1993 12 7 49328 -0.027849 0.458307 0.2600501 0.0026588 -0.000109 -0.000210 0.000148 0.000139 0.0000014 0.0000018 0.000232 0.000203 1993 12 8 49329 -0.026786 0.459251 0.2573403 0.0027301 -0.000209 -0.000131 0.000144 0.000119 0.0000017 0.0000020 0.000231 0.000226 1993 12 9 49330 -0.025641 0.460413 0.2546174 0.0026906 -0.000251 -0.000153 0.000152 0.000123 0.0000026 0.0000027 0.000339 0.000280 1993 12 10 49331 -0.024396 0.461322 0.2519784 0.0025762 -0.000233 -0.000203 0.000156 0.000129 0.0000037 0.0000033 0.000484 0.000341 1993 12 11 49332 -0.022260 0.462652 0.2494705 0.0024313 -0.000162 -0.000151 0.000178 0.000148 0.0000041 0.0000038 0.000438 0.000295 1993 12 12 49333 -0.020852 0.462965 0.2471050 0.0022938 -0.000063 -0.000046 0.000219 0.000215 0.0000038 0.0000038 0.000257 0.000172 1993 12 13 49334 -0.020645 0.464231 0.2448596 0.0022035 -0.000005 -0.000088 0.000225 0.000222 0.0000036 0.0000036 0.000222 0.000196 1993 12 14 49335 -0.019439 0.465647 0.2426706 0.0021970 0.000013 -0.000208 0.000189 0.000148 0.0000033 0.0000027 0.000234 0.000269 1993 12 15 49336 -0.018232 0.467235 0.2404440 0.0022861 0.000044 -0.000362 0.000142 0.000114 0.0000018 0.0000029 0.000215 0.000222 1993 12 16 49337 -0.017284 0.468449 0.2380887 0.0024259 0.000002 -0.000346 0.000145 0.000123 0.0000025 0.0000029 0.000299 0.000301 1993 12 17 49338 -0.016018 0.469610 0.2355942 0.0025394 -0.000086 -0.000201 0.000176 0.000135 0.0000040 0.0000033 0.000419 0.000426 1993 12 18 49339 -0.014846 0.470225 0.2330191 0.0025934 -0.000193 -0.000015 0.000207 0.000190 0.0000041 0.0000036 0.000387 0.000378 1993 12 19 49340 -0.013553 0.470756 0.2304191 0.0026101 -0.000269 0.000131 0.000295 0.000262 0.0000032 0.0000032 0.000246 0.000207 1993 12 20 49341 -0.011731 0.471249 0.2278106 0.0026211 -0.000251 0.000156 0.000284 0.000231 0.0000022 0.0000022 0.000169 0.000123 1993 12 21 49342 -0.010733 0.471974 0.2251881 0.0026299 -0.000099 0.000011 0.000172 0.000144 0.0000013 0.0000018 0.000282 0.000294 1993 12 22 49343 -0.007335 0.473126 0.2225613 0.0026100 -0.000044 -0.000111 0.000119 0.000091 0.0000014 0.0000014 0.000216 0.000228 1993 12 23 49344 -0.005368 0.474331 0.2199764 0.0025380 0.000014 -0.000231 0.000132 0.000100 0.0000015 0.0000015 0.000199 0.000211 1993 12 24 49345 -0.002081 0.475108 0.2174892 0.0024198 0.000062 -0.000319 0.000202 0.000139 0.0000015 0.0000015 0.000210 0.000226 1993 12 25 49346 -0.000550 0.476076 0.2151353 0.0022826 0.000086 -0.000355 0.000400 0.000472 0.0000015 0.0000015 0.000222 0.000241 1993 12 26 49347 0.001457 0.477050 0.2129169 0.0021599 0.000091 -0.000344 0.000736 0.000861 0.0000015 0.0000015 0.000232 0.000257 1993 12 27 49348 0.002590 0.476360 0.2108032 0.0020815 0.000083 -0.000305 0.000679 0.000815 0.0000016 0.0000016 0.000243 0.000272 1993 12 28 49349 0.003678 0.476442 0.2087366 0.0020704 0.000069 -0.000257 0.000400 0.000517 0.0000016 0.0000016 0.000255 0.000287 1993 12 29 49350 0.004827 0.476444 0.2066413 0.0021395 0.000056 -0.000216 0.000256 0.000240 0.0000016 0.0000013 0.000266 0.000303 1993 12 30 49351 0.006624 0.475815 0.2044368 0.0022834 0.000039 -0.000202 0.000130 0.000113 0.0000011 0.0000013 0.000175 0.000217 1993 12 31 49352 0.008037 0.476216 0.2020606 0.0024713 0.000057 -0.000185 0.000187 0.000192 0.0000009 0.0000011 0.000145 0.000181 1994 1 1 49353 0.010042 0.476452 0.1994934 0.0026519 0.000105 -0.000164 0.000366 0.000332 0.0000010 0.0000010 0.000161 0.000188 1994 1 2 49354 0.012735 0.476837 0.1967710 0.0027857 0.000157 -0.000149 0.000356 0.000356 0.0000011 0.0000221 0.000177 0.000195 1994 1 3 49355 0.015483 0.477084 0.1939727 0.0027667 0.000186 -0.000146 0.000236 0.000268 0.0000012 0.0000233 0.000194 0.000202 1994 1 4 49356 0.017738 0.477886 0.1911913 0.0026721 0.000165 -0.000159 0.000232 0.000173 0.0000013 0.0000227 0.000210 0.000208 1994 1 5 49357 0.020951 0.478526 0.1885028 0.0026087 0.000081 -0.000185 0.000177 0.000125 0.0000014 0.0000209 0.000227 0.000215 1994 1 6 49358 0.023344 0.479187 0.1859515 0.0024658 -0.000026 -0.000247 0.000145 0.000102 0.0000017 0.0000203 0.000273 0.000205 1994 1 7 49359 0.026408 0.479643 0.1835544 0.0022780 -0.000246 -0.000246 0.000160 0.000117 0.0000021 0.0000203 0.000496 0.000469 1994 1 8 49360 0.029092 0.480143 0.1813129 0.0021293 -0.000410 -0.000219 0.000165 0.000143 0.0000022 0.0000215 0.000580 0.000590 1994 1 9 49361 0.031715 0.479899 0.1792163 0.0020344 -0.000439 -0.000198 0.000252 0.000194 0.0000021 0.0000215 0.000500 0.000504 1994 1 10 49362 0.034090 0.479885 0.1772261 0.0019837 -0.000387 -0.000174 0.000271 0.000187 0.0000021 0.0000203 0.000420 0.000417 1994 1 11 49363 0.036276 0.479861 0.1752648 0.0020033 -0.000289 -0.000152 0.000191 0.000131 0.0000020 0.0000197 0.000341 0.000330 1994 1 12 49364 0.037726 0.479714 0.1732328 0.0021033 -0.000214 -0.000142 0.000152 0.000115 0.0000022 0.0000203 0.000333 0.000278 1994 1 13 49365 0.040704 0.479546 0.1710494 0.0022477 -0.000174 -0.000120 0.000115 0.000098 0.0000013 0.0000197 0.000201 0.000191 1994 1 14 49366 0.043125 0.479073 0.1687363 0.0023644 -0.000145 -0.000071 0.000084 0.000081 0.0000009 0.0000190 0.000138 0.000161 1994 1 15 49367 0.046167 0.478711 0.1663672 0.0023863 -0.000109 -0.000072 0.000073 0.000073 0.0000011 0.0000197 0.000149 0.000177 1994 1 16 49368 0.048248 0.478912 0.1640195 0.0023403 -0.000081 -0.000086 0.000073 0.000068 0.0000011 0.0000197 0.000141 0.000176 1994 1 17 49369 0.050567 0.479010 0.1617283 0.0022820 -0.000080 -0.000079 0.000080 0.000069 0.0000009 0.0000184 0.000130 0.000164 1994 1 18 49370 0.052235 0.479099 0.1594752 0.0022233 -0.000106 -0.000026 0.000075 0.000069 0.0000013 0.0000178 0.000169 0.000202 1994 1 19 49371 0.054156 0.478620 0.1572864 0.0021169 -0.000132 0.000022 0.000077 0.000073 0.0000011 0.0000184 0.000148 0.000161 1994 1 20 49372 0.055465 0.478139 0.1552174 0.0020183 -0.000136 -0.000013 0.000073 0.000067 0.0000010 0.0000197 0.000126 0.000152 1994 1 21 49373 0.057549 0.477595 0.1532319 0.0019729 -0.000138 -0.000108 0.000064 0.000063 0.0000010 0.0000209 0.000124 0.000157 1994 1 22 49374 0.059448 0.477030 0.1512751 0.0019255 -0.000126 -0.000170 0.000067 0.000069 0.0000010 0.0000203 0.000124 0.000157 1994 1 23 49375 0.062117 0.475801 0.1493517 0.0019227 -0.000088 -0.000170 0.000076 0.000079 0.0000011 0.0000203 0.000129 0.000169 1994 1 24 49376 0.064793 0.475976 0.1474182 0.0019482 -0.000048 -0.000176 0.000074 0.000079 0.0000010 0.0000203 0.000128 0.000156 1994 1 25 49377 0.067762 0.476032 0.1454453 0.0020125 -0.000037 -0.000169 0.000066 0.000069 0.0000012 0.0000197 0.000159 0.000175 1994 1 26 49378 0.070343 0.476343 0.1433649 0.0021736 -0.000050 -0.000158 0.000090 0.000086 0.0000014 0.0000190 0.000192 0.000216 1994 1 27 49379 0.073309 0.475306 0.1410890 0.0023920 -0.000069 -0.000172 0.000122 0.000104 0.0000023 0.0000190 0.000241 0.000273 1994 1 28 49380 0.075997 0.474557 0.1385972 0.0026055 -0.000101 -0.000140 0.000129 0.000118 0.0000030 0.0000190 0.000280 0.000309 1994 1 29 49381 0.078848 0.473685 0.1359311 0.0027492 -0.000150 -0.000022 0.000165 0.000147 0.0000027 0.0000203 0.000269 0.000290 1994 1 30 49382 0.080435 0.472838 0.1331565 0.0028096 -0.000197 0.000112 0.000196 0.000187 0.0000024 0.0000227 0.000258 0.000271 1994 1 31 49383 0.083744 0.471732 0.1303492 0.0027911 -0.000233 0.000199 0.000189 0.000203 0.0000021 0.0000246 0.000247 0.000253 1994 2 1 49384 0.086074 0.471323 0.1275914 0.0026701 -0.000255 0.000179 0.000164 0.000164 0.0000018 0.0000270 0.000235 0.000234 1994 2 2 49385 0.089490 0.469970 0.1249678 0.0024823 -0.000270 0.000035 0.000121 0.000112 0.0000015 0.0000276 0.000224 0.000215 1994 2 3 49386 0.091975 0.469581 0.1225452 0.0022888 -0.000256 -0.000278 0.000124 0.000110 0.0000017 0.0000276 0.000202 0.000212 1994 2 4 49387 0.095516 0.468815 0.1203450 0.0021142 -0.000298 -0.000532 0.000153 0.000137 0.0000019 0.0000270 0.000246 0.000247 1994 2 5 49388 0.097046 0.468551 0.1183279 0.0019825 -0.000374 -0.000629 0.000161 0.000159 0.0000022 0.0000264 0.000324 0.000300 1994 2 6 49389 0.099467 0.467274 0.1164086 0.0019084 -0.000424 -0.000565 0.000219 0.000186 0.0000024 0.0000264 0.000403 0.000352 1994 2 7 49390 0.101711 0.466170 0.1144913 0.0019125 -0.000389 -0.000325 0.000219 0.000179 0.0000026 0.0000252 0.000402 0.000394 1994 2 8 49391 0.103449 0.465507 0.1125038 0.0020159 -0.000264 -0.000049 0.000156 0.000146 0.0000029 0.0000246 0.000335 0.000425 1994 2 9 49392 0.105486 0.464566 0.1104130 0.0021359 -0.000092 -0.000117 0.000132 0.000120 0.0000018 0.0000252 0.000258 0.000286 1994 2 10 49393 0.107690 0.463563 0.1082199 0.0022416 0.000067 -0.000304 0.000159 0.000155 0.0000015 0.0000436 0.000304 0.001718 1994 2 11 49394 0.109363 0.462545 0.1059453 0.0023270 0.000180 -0.000447 0.000188 0.000201 0.0000015 0.0000430 0.000391 0.001160 1994 2 12 49395 0.111326 0.461256 0.1036180 0.0023624 0.000235 -0.000450 0.000199 0.000265 0.0000015 0.0000240 0.000409 0.000375 1994 2 13 49396 0.111631 0.460476 0.1012676 0.0023639 0.000215 -0.000348 0.000276 0.000392 0.0000015 0.0000233 0.000378 0.000344 1994 2 14 49397 0.113987 0.459398 0.0989227 0.0023451 0.000122 -0.000220 0.000254 0.000337 0.0000015 0.0000233 0.000346 0.000312 1994 2 15 49398 0.116577 0.457829 0.0966144 0.0022920 -0.000008 -0.000091 0.000169 0.000189 0.0000015 0.0000233 0.000315 0.000281 1994 2 16 49399 0.118386 0.456972 0.0943775 0.0022269 -0.000152 -0.000215 0.000151 0.000136 0.0000015 0.0000240 0.000295 0.000310 1994 2 17 49400 0.120769 0.455325 0.0922379 0.0021346 -0.000209 0.000023 0.000148 0.000117 0.0000021 0.0000246 0.000665 0.000599 1994 2 18 49401 0.122045 0.454569 0.0901902 0.0020667 -0.000074 0.000545 0.000156 0.000131 0.0000021 0.0000246 0.002246 0.003578 1994 2 19 49402 0.123468 0.452678 0.0881852 0.0019940 0.000167 0.001078 0.000187 0.000177 0.0000021 0.0000252 0.003929 0.006800 1994 2 20 49403 0.125327 0.451248 0.0861530 0.0019784 0.000417 0.001379 0.000246 0.000248 0.0000020 0.0000270 0.005611 0.010022 1994 2 21 49404 0.128366 0.449804 0.0840376 0.0020786 0.000563 0.001212 0.000249 0.000293 0.0000019 0.0000283 0.004562 0.008082 1994 2 22 49405 0.131020 0.449989 0.0818022 0.0022175 0.000541 0.000586 0.000208 0.000255 0.0000019 0.0000283 0.000790 0.001001 1994 2 23 49406 0.133663 0.448860 0.0794035 0.0024323 0.000335 -0.000296 0.000196 0.000205 0.0000018 0.0000276 0.000432 0.000360 1994 2 24 49407 0.136359 0.448799 0.0767799 0.0027163 0.000049 -0.001076 0.000206 0.000212 0.0000017 0.0000270 0.001618 0.003026 1994 2 25 49408 0.137987 0.448349 0.0738840 0.0030034 -0.000220 -0.001424 0.000200 0.000210 0.0000017 0.0000276 0.001539 0.002883 1994 2 26 49409 0.139138 0.447740 0.0707328 0.0032274 -0.000415 -0.001383 0.000191 0.000247 0.0000016 0.0000283 0.001303 0.002395 1994 2 27 49410 0.140821 0.446723 0.0674213 0.0033548 -0.000496 -0.001051 0.000202 0.000283 0.0000015 0.0000270 0.001067 0.001907 1994 2 28 49411 0.141806 0.446144 0.0640843 0.0033737 -0.000456 -0.000602 0.000248 0.000274 0.0000015 0.0000252 0.000831 0.001419 1994 3 1 49412 0.143306 0.444479 0.0608400 0.0032701 -0.000323 -0.000196 0.000241 0.000223 0.0000014 0.0000240 0.000595 0.000931 1994 3 2 49413 0.143512 0.443564 0.0577540 0.0030936 -0.000143 0.000074 0.000160 0.000145 0.0000013 0.0000240 0.000359 0.000443 1994 3 3 49414 0.145383 0.441201 0.0548387 0.0028934 0.000034 0.000118 0.000170 0.000146 0.0000013 0.0000246 0.000331 0.000472 1994 3 4 49415 0.145986 0.439756 0.0520748 0.0027106 0.000170 0.000075 0.000187 0.000166 0.0000013 0.0000240 0.000373 0.000673 1994 3 5 49416 0.147103 0.437610 0.0494340 0.0025616 0.000237 0.000175 0.000166 0.000180 0.0000013 0.0000233 0.000388 0.000598 1994 3 6 49417 0.147689 0.436201 0.0468865 0.0025173 0.000243 0.000309 0.000302 0.000296 0.0000013 0.0000240 0.000400 0.000495 1994 3 7 49418 0.149182 0.434297 0.0443943 0.0024948 0.000200 0.000405 0.000360 0.000333 0.0000013 0.0000246 0.000412 0.000393 1994 3 8 49419 0.149580 0.432596 0.0419046 0.0025289 0.000120 0.000402 0.000280 0.000242 0.0000012 0.0000246 0.000424 0.000291 1994 3 9 49420 0.150824 0.430900 0.0393598 0.0025719 0.000069 0.000133 0.000210 0.000174 0.0000012 0.0000252 0.000300 0.000238 1994 3 10 49421 0.151672 0.429508 0.0367270 0.0026289 -0.000071 -0.000058 0.000181 0.000161 0.0000012 0.0000252 0.000342 0.000254 1994 3 11 49422 0.153250 0.427311 0.0340251 0.0026559 -0.000232 -0.000154 0.000217 0.000201 0.0000012 0.0000252 0.000450 0.000289 1994 3 12 49423 0.154015 0.425356 0.0313243 0.0026026 -0.000322 -0.000194 0.000254 0.000226 0.0000012 0.0000252 0.000454 0.000291 1994 3 13 49424 0.156151 0.423881 0.0287092 0.0025343 -0.000321 -0.000171 0.000217 0.000166 0.0000012 0.0000246 0.000383 0.000269 1994 3 14 49425 0.157286 0.422002 0.0262292 0.0024581 -0.000251 -0.000094 0.000117 0.000087 0.0000012 0.0000246 0.000312 0.000247 1994 3 15 49426 0.159105 0.421217 0.0238722 0.0023637 -0.000154 0.000002 0.000082 0.000081 0.0000013 0.0000233 0.000241 0.000225 1994 3 16 49427 0.159632 0.419932 0.0215856 0.0022843 -0.000051 0.000103 0.000079 0.000078 0.0000016 0.0000233 0.000292 0.000279 1994 3 17 49428 0.161755 0.418380 0.0193199 0.0022112 -0.000045 0.000135 0.000071 0.000063 0.0000027 0.0000240 0.000259 0.000291 1994 3 18 49429 0.162419 0.416389 0.0171639 0.0021554 -0.000133 0.000117 0.000107 0.000096 0.0000045 0.0000246 0.000389 0.000329 1994 3 19 49430 0.163627 0.415721 0.0151044 0.0021079 -0.000210 0.000047 0.000144 0.000231 0.0000049 0.0000258 0.000403 0.000325 1994 3 20 49431 0.163283 0.414046 0.0130253 0.0020977 -0.000229 -0.000042 0.000186 0.000267 0.0000041 0.0000276 0.000265 0.000273 1994 3 21 49432 0.164313 0.412039 0.0108451 0.0021752 -0.000191 -0.000064 0.000235 0.000209 0.0000034 0.0000295 0.000224 0.000294 1994 3 22 49433 0.164270 0.410252 0.0085210 0.0023549 -0.000124 -0.000040 0.000251 0.000203 0.0000026 0.0000301 0.000224 0.000344 1994 3 23 49434 0.164033 0.408106 0.0060296 0.0025825 -0.000058 -0.000055 0.000223 0.000161 0.0000018 0.0000295 0.000301 0.000284 1994 3 24 49435 0.165127 0.405722 0.0033376 0.0028257 -0.000088 -0.000039 0.000142 0.000114 0.0000016 0.0000295 0.000288 0.000242 1994 3 25 49436 0.166122 0.404297 0.0004017 0.0030989 -0.000201 -0.000010 0.000122 0.000116 0.0000017 0.0000301 0.000344 0.000336 1994 3 26 49437 0.167585 0.402868 -0.0027491 0.0032762 -0.000312 0.000015 0.000154 0.000166 0.0000017 0.0000283 0.000374 0.000382 1994 3 27 49438 0.168739 0.400628 -0.0060042 0.0032446 -0.000373 0.000031 0.000182 0.000210 0.0000016 0.0000270 0.000347 0.000344 1994 3 28 49439 0.169353 0.398926 -0.0092235 0.0030966 -0.000374 0.000032 0.000236 0.000227 0.0000015 0.0000258 0.000320 0.000306 1994 3 29 49440 0.169928 0.396856 -0.0122859 0.0028981 -0.000315 0.000015 0.000225 0.000227 0.0000015 0.0000240 0.000294 0.000269 1994 3 30 49441 0.170652 0.394938 -0.0151293 0.0027128 -0.000211 -0.000015 0.000159 0.000167 0.0000014 0.0000233 0.000267 0.000231 1994 3 31 49442 0.171743 0.392763 -0.0177605 0.0025402 -0.000099 -0.000051 0.000169 0.000141 0.0000014 0.0000233 0.000274 0.000255 1994 4 1 49443 0.173569 0.391158 -0.0202336 0.0024342 -0.000001 -0.000080 0.000224 0.000169 0.0000016 0.0000240 0.000292 0.000299 1994 4 2 49444 0.174467 0.389967 -0.0226192 0.0023867 0.000067 -0.000093 0.000227 0.000176 0.0000017 0.0000252 0.000311 0.000343 1994 4 3 49445 0.176167 0.388105 -0.0249814 0.0024164 0.000099 -0.000090 0.000199 0.000204 0.0000018 0.0000264 0.000329 0.000387 1994 4 4 49446 0.177343 0.386387 -0.0273719 0.0024895 0.000101 -0.000077 0.000183 0.000198 0.0000019 0.0000270 0.000327 0.000352 1994 4 5 49447 0.178865 0.384562 -0.0298306 0.0025501 0.000073 -0.000072 0.000149 0.000137 0.0000020 0.0000283 0.000322 0.000311 1994 4 6 49448 0.179760 0.382725 -0.0323823 0.0025494 0.000023 -0.000089 0.000122 0.000102 0.0000022 0.0000295 0.000318 0.000271 1994 4 7 49449 0.180783 0.381198 -0.0350222 0.0025649 -0.000048 -0.000137 0.000126 0.000104 0.0000022 0.0000307 0.000319 0.000268 1994 4 8 49450 0.181308 0.379365 -0.0377064 0.0026078 -0.000120 -0.000211 0.000134 0.000108 0.0000021 0.0000313 0.000322 0.000278 1994 4 9 49451 0.182020 0.377482 -0.0403639 0.0026140 -0.000172 -0.000293 0.000161 0.000138 0.0000021 0.0000319 0.000324 0.000289 1994 4 10 49452 0.182511 0.375887 -0.0429342 0.0025762 -0.000194 -0.000348 0.000213 0.000191 0.0000020 0.0000326 0.000327 0.000299 1994 4 11 49453 0.183075 0.374160 -0.0454050 0.0025066 -0.000188 -0.000340 0.000214 0.000217 0.0000020 0.0000313 0.000329 0.000309 1994 4 12 49454 0.183344 0.372814 -0.0478142 0.0024008 -0.000186 -0.000224 0.000231 0.000216 0.0000019 0.0000307 0.000332 0.000319 1994 4 13 49455 0.182991 0.370971 -0.0502068 0.0022905 -0.000230 -0.000043 0.000209 0.000176 0.0000019 0.0000289 0.000321 0.000280 1994 4 14 49456 0.182863 0.368743 -0.0525820 0.0021882 -0.000310 0.000359 0.000183 0.000150 0.0000018 0.0000276 0.000650 0.000457 1994 4 15 49457 0.182555 0.366713 -0.0548866 0.0021196 -0.000678 0.000841 0.000198 0.000153 0.0000017 0.0000276 0.000777 0.000529 1994 4 16 49458 0.183287 0.364234 -0.0570685 0.0021269 -0.001199 0.001239 0.000217 0.000169 0.0000016 0.0000264 0.000745 0.000511 1994 4 17 49459 0.183365 0.362135 -0.0591443 0.0021769 -0.001589 0.001419 0.000243 0.000208 0.0000015 0.0000258 0.000713 0.000493 1994 4 18 49460 0.183461 0.360087 -0.0612148 0.0022479 -0.001639 0.001296 0.000217 0.000215 0.0000014 0.0000252 0.000681 0.000475 1994 4 19 49461 0.183651 0.358142 -0.0634145 0.0023721 -0.001279 0.000896 0.000213 0.000192 0.0000013 0.0000246 0.000649 0.000457 1994 4 20 49462 0.183778 0.356841 -0.0658401 0.0025636 -0.000223 0.000155 0.000179 0.000146 0.0000012 0.0000240 0.000318 0.000268 1994 4 21 49463 0.183938 0.355596 -0.0685168 0.0027456 0.000448 -0.000315 0.000146 0.000128 0.0000013 0.0000240 0.000266 0.000245 1994 4 22 49464 0.183624 0.354255 -0.0714120 0.0029653 0.000676 -0.000474 0.000151 0.000152 0.0000014 0.0000240 0.000315 0.000283 1994 4 23 49465 0.183580 0.352749 -0.0744624 0.0031483 0.000541 -0.000385 0.000173 0.000181 0.0000016 0.0000246 0.000364 0.000320 1994 4 24 49466 0.183084 0.350432 -0.0775852 0.0031691 0.000195 -0.000160 0.000208 0.000259 0.0000017 0.0000264 0.000414 0.000358 1994 4 25 49467 0.182678 0.348921 -0.0806785 0.0030640 -0.000141 0.000051 0.000187 0.000242 0.0000019 0.0000276 0.000463 0.000395 1994 4 26 49468 0.182632 0.346505 -0.0836392 0.0028424 -0.000305 0.000156 0.000157 0.000150 0.0000020 0.0000283 0.000512 0.000433 1994 4 27 49469 0.182848 0.344002 -0.0864039 0.0026433 -0.000068 -0.000014 0.000154 0.000126 0.0000016 0.0000283 0.000316 0.000286 1994 4 28 49470 0.182718 0.341226 -0.0889829 0.0025258 0.000215 -0.000135 0.000179 0.000146 0.0000016 0.0000276 0.000303 0.000228 1994 4 29 49471 0.182861 0.338459 -0.0914577 0.0024622 0.000103 -0.000025 0.000140 0.000120 0.0000016 0.0000270 0.000260 0.000235 1994 4 30 49472 0.183131 0.335994 -0.0939244 0.0024674 -0.000081 0.000102 0.000151 0.000141 0.0000017 0.0000264 0.000223 0.000244 1994 5 1 49473 0.183797 0.334012 -0.0964334 0.0024922 -0.000169 0.000147 0.000195 0.000194 0.0000017 0.0000246 0.000228 0.000247 1994 5 2 49474 0.183814 0.331948 -0.0989828 0.0025508 -0.000213 0.000140 0.000148 0.000155 0.0000016 0.0000227 0.000233 0.000249 1994 5 3 49475 0.184647 0.329943 -0.1015532 0.0026110 -0.000193 0.000079 0.000129 0.000124 0.0000016 0.0000221 0.000237 0.000252 1994 5 4 49476 0.185066 0.327856 -0.1041368 0.0026440 -0.000125 -0.000006 0.000125 0.000112 0.0000016 0.0000227 0.000242 0.000255 1994 5 5 49477 0.185383 0.325857 -0.1067353 0.0026543 -0.000060 -0.000054 0.000168 0.000130 0.0000015 0.0000246 0.000235 0.000249 1994 5 6 49478 0.184995 0.323694 -0.1093406 0.0025836 -0.000020 -0.000053 0.000198 0.000161 0.0000015 0.0000246 0.000225 0.000241 1994 5 7 49479 0.185576 0.321334 -0.1119237 0.0025123 -0.000014 -0.000009 0.000169 0.000183 0.0000014 0.0000246 0.000215 0.000233 1994 5 8 49480 0.185845 0.318264 -0.1144431 0.0024388 -0.000039 0.000054 0.000153 0.000187 0.0000013 0.0000246 0.000204 0.000225 1994 5 9 49481 0.186527 0.316310 -0.1168667 0.0023647 -0.000082 0.000098 0.000145 0.000162 0.0000012 0.0000246 0.000194 0.000217 1994 5 10 49482 0.186939 0.314023 -0.1191869 0.0022884 -0.000115 0.000100 0.000126 0.000120 0.0000011 0.0000258 0.000183 0.000208 1994 5 11 49483 0.188188 0.312374 -0.1214224 0.0022278 -0.000107 0.000065 0.000132 0.000112 0.0000015 0.0000252 0.000279 0.000258 1994 5 12 49484 0.188223 0.310227 -0.1236066 0.0021822 -0.000058 0.000006 0.000118 0.000105 0.0000016 0.0000246 0.000265 0.000262 1994 5 13 49485 0.189046 0.308380 -0.1257751 0.0021565 0.000074 -0.000070 0.000112 0.000107 0.0000020 0.0000240 0.000403 0.000414 1994 5 14 49486 0.189015 0.305910 -0.1279470 0.0021615 0.000288 0.000030 0.000190 0.000174 0.0000022 0.0000258 0.000571 0.000611 1994 5 15 49487 0.188880 0.303968 -0.1301370 0.0021951 0.000492 0.000269 0.000195 0.000170 0.0000020 0.0000264 0.000689 0.000779 1994 5 16 49488 0.187908 0.302122 -0.1323786 0.0023011 0.000570 0.000441 0.000141 0.000121 0.0000018 0.0000240 0.000806 0.000947 1994 5 17 49489 0.187633 0.300167 -0.1347288 0.0024502 0.000471 0.000428 0.000162 0.000120 0.0000016 0.0000227 0.000923 0.001115 1994 5 18 49490 0.187293 0.297856 -0.1372465 0.0025797 0.000114 0.000116 0.000161 0.000110 0.0000014 0.0000221 0.000375 0.000428 1994 5 19 49491 0.187089 0.295925 -0.1399492 0.0026756 -0.000244 -0.000422 0.000136 0.000111 0.0000022 0.0000221 0.000288 0.000220 1994 5 20 49492 0.187328 0.293694 -0.1427814 0.0027624 -0.000427 -0.000677 0.000161 0.000147 0.0000034 0.0000221 0.000322 0.000238 1994 5 21 49493 0.186406 0.291872 -0.1456254 0.0027794 -0.000418 -0.000584 0.000197 0.000153 0.0000045 0.0000227 0.000329 0.000275 1994 5 22 49494 0.186060 0.289925 -0.1483533 0.0027259 -0.000276 -0.000293 0.000214 0.000187 0.0000057 0.0000233 0.000337 0.000312 1994 5 23 49495 0.185324 0.288794 -0.1508833 0.0025532 -0.000087 0.000030 0.000212 0.000197 0.0000069 0.0000240 0.000344 0.000349 1994 5 24 49496 0.184208 0.287173 -0.1532011 0.0022898 0.000064 0.000215 0.000188 0.000152 0.0000080 0.0000264 0.000352 0.000386 1994 5 25 49497 0.182442 0.285573 -0.1553417 0.0020826 0.000007 0.000041 0.000155 0.000130 0.0000028 0.0000276 0.000256 0.000277 1994 5 26 49498 0.181375 0.283326 -0.1573568 0.0019409 0.000039 -0.000255 0.000166 0.000137 0.0000015 0.0000270 0.000284 0.000290 1994 5 27 49499 0.179905 0.281146 -0.1592949 0.0018885 0.000066 -0.000464 0.000196 0.000162 0.0000015 0.0000270 0.000295 0.000300 1994 5 28 49500 0.178733 0.278809 -0.1611979 0.0018695 0.000079 -0.000511 0.000228 0.000171 0.0000015 0.0000270 0.000276 0.000286 1994 5 29 49501 0.177779 0.276670 -0.1631028 0.0019135 0.000096 -0.000408 0.000258 0.000288 0.0000015 0.0000276 0.000258 0.000272 1994 5 30 49502 0.176805 0.274553 -0.1650386 0.0019736 0.000110 -0.000213 0.000244 0.000343 0.0000015 0.0000264 0.000239 0.000258 1994 5 31 49503 0.175675 0.271799 -0.1670186 0.0020051 0.000112 -0.000021 0.000216 0.000252 0.0000015 0.0000252 0.000220 0.000245 1994 6 1 49504 0.174488 0.269462 -0.1690329 0.0020215 0.000095 0.000090 0.000160 0.000164 0.0000015 0.0000258 0.000202 0.000231 1994 6 2 49505 0.173687 0.267249 -0.1710489 0.0020043 0.000060 0.000039 0.000144 0.000134 0.0000041 0.0000252 0.000302 0.000376 1994 6 3 49506 0.172678 0.265279 -0.1730195 0.0019356 0.000006 -0.000094 0.000172 0.000164 0.0000075 0.0000240 0.000443 0.000574 1994 6 4 49507 0.171594 0.263601 -0.1749000 0.0018232 -0.000067 -0.000162 0.000198 0.000184 0.0000064 0.0000233 0.000414 0.000523 1994 6 5 49508 0.170606 0.261417 -0.1766627 0.0017236 -0.000129 -0.000180 0.000234 0.000201 0.0000053 0.0000227 0.000385 0.000471 1994 6 6 49509 0.169230 0.260185 -0.1783034 0.0015785 -0.000158 -0.000143 0.000232 0.000201 0.0000042 0.0000221 0.000356 0.000420 1994 6 7 49510 0.167283 0.257986 -0.1798377 0.0014706 -0.000139 -0.000077 0.000201 0.000189 0.0000030 0.0000221 0.000328 0.000368 1994 6 8 49511 0.165984 0.256544 -0.1812944 0.0014253 -0.000075 -0.000026 0.000168 0.000161 0.0000019 0.0000240 0.000299 0.000317 1994 6 9 49512 0.165780 0.254298 -0.1827095 0.0014594 0.000038 -0.000043 0.000169 0.000140 0.0000016 0.0000264 0.000208 0.000166 1994 6 10 49513 0.164469 0.252206 -0.1841244 0.0014413 0.000128 -0.000103 0.000190 0.000164 0.0000017 0.0000264 0.000183 0.000129 1994 6 11 49514 0.163825 0.250014 -0.1855855 0.0014940 0.000169 -0.000195 0.000203 0.000237 0.0000017 0.0000246 0.000202 0.000164 1994 6 12 49515 0.162653 0.248114 -0.1871401 0.0015959 0.000166 -0.000295 0.000223 0.000263 0.0000017 0.0000227 0.000221 0.000200 1994 6 13 49516 0.161880 0.245684 -0.1888263 0.0017342 0.000137 -0.000363 0.000205 0.000225 0.0000017 0.0000221 0.000239 0.000235 1994 6 14 49517 0.160657 0.243442 -0.1906619 0.0019016 0.000107 -0.000378 0.000184 0.000178 0.0000017 0.0000221 0.000267 0.000279 1994 6 15 49518 0.160032 0.241416 -0.1926386 0.0020569 0.000085 -0.000362 0.000156 0.000127 0.0000018 0.0000221 0.000324 0.000349 1994 6 16 49519 0.159259 0.239661 -0.1947224 0.0021268 0.000200 -0.000078 0.000135 0.000126 0.0000026 0.0000221 0.000652 0.000596 1994 6 17 49520 0.158564 0.237829 -0.1968572 0.0021575 0.000297 0.000154 0.000173 0.000173 0.0000027 0.0000227 0.000705 0.000626 1994 6 18 49521 0.157366 0.235993 -0.1989685 0.0020729 0.000329 0.000249 0.000237 0.000281 0.0000023 0.0000240 0.000571 0.000516 1994 6 19 49522 0.156396 0.234689 -0.2009732 0.0019236 0.000303 0.000238 0.000343 0.000426 0.0000020 0.0000240 0.000438 0.000407 1994 6 20 49523 0.154372 0.232642 -0.2027998 0.0017174 0.000223 0.000150 0.000389 0.000488 0.0000016 0.0000233 0.000304 0.000297 1994 6 21 49524 0.152989 0.230241 -0.2044118 0.0015079 0.000116 0.000051 0.000247 0.000305 0.0000013 0.0000233 0.000171 0.000188 1994 6 22 49525 0.150965 0.227925 -0.2058231 0.0013359 0.000025 0.000009 0.000167 0.000163 0.0000017 0.0000240 0.000261 0.000288 1994 6 23 49526 0.150140 0.225538 -0.2070940 0.0012480 -0.000043 0.000066 0.000300 0.000295 0.0000018 0.0000246 0.000346 0.000361 1994 6 24 49527 0.148376 0.223589 -0.2083064 0.0012049 -0.000078 0.000172 0.000361 0.000390 0.0000018 0.0000252 0.000415 0.000410 1994 6 25 49528 0.146818 0.221705 -0.2095323 0.0012158 -0.000084 0.000265 0.000285 0.000329 0.0000018 0.0000270 0.000483 0.000458 1994 6 26 49529 0.145029 0.220023 -0.2108098 0.0012781 -0.000072 0.000281 0.000233 0.000296 0.0000018 0.0000276 0.000548 0.000492 1994 6 27 49530 0.143597 0.218240 -0.2121363 0.0013338 -0.000045 0.000172 0.000213 0.000278 0.0000022 0.0000270 0.000605 0.000478 1994 6 28 49531 0.141724 0.216209 -0.2134776 0.0013474 -0.000051 0.000052 0.000177 0.000200 0.0000024 0.0000270 0.000625 0.000445 1994 6 29 49532 0.139552 0.214693 -0.2147879 0.0013128 -0.000167 0.000072 0.000154 0.000152 0.0000023 0.0000270 0.000218 0.000189 1994 6 30 49533 0.138211 0.213482 -0.2160316 0.0012100 -0.000168 0.000052 0.000153 0.000145 0.0000022 0.0000270 0.000249 0.000279 1994 7 1 49534 0.136373 0.212078 0.7828033 0.0011036 0.000015 -0.000179 0.000122 0.000114 0.0000021 0.0000270 0.000188 0.000190 1994 7 2 49535 0.134876 0.210604 0.7817088 0.0010443 0.000180 -0.000338 0.000140 0.000124 0.0000020 0.0000252 0.000135 0.000123 1994 7 3 49536 0.133490 0.208904 0.7806723 0.0009942 0.000241 -0.000327 0.000196 0.000232 0.0000019 0.0000240 0.000156 0.000151 1994 7 4 49537 0.131388 0.208612 0.7796907 0.0009354 0.000231 -0.000225 0.000191 0.000302 0.0000018 0.0000240 0.000176 0.000179 1994 7 5 49538 0.129396 0.206936 0.7787682 0.0009084 0.000165 -0.000082 0.000178 0.000242 0.0000016 0.0000233 0.000197 0.000207 1994 7 6 49539 0.127667 0.205133 0.7778983 0.0008844 0.000080 0.000038 0.000152 0.000145 0.0000015 0.0000233 0.000218 0.000235 1994 7 7 49540 0.125759 0.203726 0.7770435 0.0009032 0.000040 0.000046 0.000152 0.000128 0.0000022 0.0000227 0.000277 0.000336 1994 7 8 49541 0.124054 0.201779 0.7761321 0.0009772 0.000034 -0.000018 0.000135 0.000126 0.0000032 0.0000227 0.000350 0.000462 1994 7 9 49542 0.122358 0.200809 0.7750823 0.0011333 0.000010 -0.000057 0.000154 0.000163 0.0000033 0.0000227 0.000332 0.000414 1994 7 10 49543 0.120882 0.199506 0.7738386 0.0013189 -0.000004 -0.000072 0.000214 0.000217 0.0000033 0.0000221 0.000309 0.000352 1994 7 11 49544 0.118671 0.198548 0.7723865 0.0015158 -0.000014 -0.000062 0.000212 0.000217 0.0000033 0.0000227 0.000286 0.000289 1994 7 12 49545 0.116844 0.197113 0.7707474 0.0017018 -0.000031 -0.000054 0.000176 0.000169 0.0000032 0.0000233 0.000262 0.000227 1994 7 13 49546 0.115618 0.196406 0.7689611 0.0018457 -0.000010 0.000010 0.000150 0.000123 0.0000020 0.0000233 0.000235 0.000230 1994 7 14 49547 0.113532 0.195068 0.7670736 0.0019397 -0.000055 -0.000098 0.000123 0.000104 0.0000019 0.0000240 0.000255 0.000279 1994 7 15 49548 0.111658 0.193854 0.7651443 0.0019484 -0.000255 -0.000351 0.000129 0.000117 0.0000019 0.0000252 0.000297 0.000264 1994 7 16 49549 0.109686 0.192752 0.7632385 0.0018706 -0.000371 -0.000410 0.000192 0.000203 0.0000017 0.0000258 0.000295 0.000233 1994 7 17 49550 0.107821 0.191217 0.7614154 0.0017581 -0.000335 -0.000249 0.000210 0.000254 0.0000016 0.0000258 0.000259 0.000215 1994 7 18 49551 0.106062 0.189542 0.7597244 0.0016486 -0.000236 -0.000054 0.000214 0.000236 0.0000014 0.0000246 0.000223 0.000197 1994 7 19 49552 0.103673 0.188050 0.7581893 0.0014707 -0.000112 0.000076 0.000173 0.000163 0.0000013 0.0000233 0.000187 0.000180 1994 7 20 49553 0.102168 0.185270 0.7567870 0.0013422 -0.000076 -0.000172 0.000115 0.000101 0.0000014 0.0000233 0.000244 0.000245 1994 7 21 49554 0.100327 0.184369 0.7554424 0.0012842 0.000012 -0.000321 0.000131 0.000117 0.0000014 0.0000233 0.000328 0.000327 1994 7 22 49555 0.098481 0.182571 0.7540732 0.0013234 0.000163 -0.000235 0.000148 0.000136 0.0000015 0.0000240 0.000270 0.000289 1994 7 23 49556 0.096381 0.181623 0.7526414 0.0014122 0.000423 -0.000241 0.000140 0.000141 0.0000015 0.0000240 0.000318 0.000288 1994 7 24 49557 0.094707 0.179367 0.7511656 0.0014879 0.000697 -0.000373 0.000198 0.000242 0.0000015 0.0000233 0.000494 0.000355 1994 7 25 49558 0.093045 0.178788 0.7496882 0.0015066 0.000826 -0.000470 0.000244 0.000280 0.0000016 0.0000233 0.000671 0.000423 1994 7 26 49559 0.091099 0.177462 0.7482343 0.0015287 0.000759 -0.000486 0.000221 0.000204 0.0000016 0.0000240 0.000847 0.000490 1994 7 27 49560 0.088556 0.176979 0.7468001 0.0015011 0.000181 -0.000129 0.000182 0.000162 0.0000016 0.0000233 0.000416 0.000304 1994 7 28 49561 0.086693 0.176197 0.7453699 0.0014549 0.000003 -0.000030 0.000189 0.000168 0.0000021 0.0000221 0.000247 0.000230 1994 7 29 49562 0.084407 0.175907 0.7439368 0.0014032 0.000100 -0.000053 0.000193 0.000178 0.0000028 0.0000227 0.000211 0.000212 1994 7 30 49563 0.082752 0.175149 0.7425203 0.0013705 0.000109 0.000111 0.000191 0.000200 0.0000031 0.0000227 0.000378 0.000369 1994 7 31 49564 0.080466 0.174956 0.7411694 0.0012904 0.000117 0.000283 0.000231 0.000227 0.0000033 0.0000227 0.000563 0.000542 1994 8 1 49565 0.078448 0.174114 0.7399311 0.0011901 0.000103 0.000380 0.000207 0.000207 0.0000035 0.0000233 0.000749 0.000715 1994 8 2 49566 0.076569 0.173847 0.7388083 0.0011038 0.000066 0.000332 0.000176 0.000181 0.0000037 0.0000227 0.000935 0.000888 1994 8 3 49567 0.074810 0.173190 0.7377365 0.0011004 0.000020 0.000065 0.000159 0.000154 0.0000022 0.0000221 0.000457 0.000485 1994 8 4 49568 0.073124 0.172883 0.7366035 0.0011858 0.000026 -0.000335 0.000159 0.000160 0.0000021 0.0000227 0.000568 0.000477 1994 8 5 49569 0.071656 0.172763 0.7353638 0.0012963 0.000077 -0.000640 0.000155 0.000170 0.0000030 0.0000233 0.000689 0.000647 1994 8 6 49570 0.069917 0.172632 0.7339955 0.0014314 0.000091 -0.000737 0.000189 0.000203 0.0000032 0.0000233 0.000620 0.000641 1994 8 7 49571 0.068326 0.172310 0.7324919 0.0015538 0.000048 -0.000645 0.000206 0.000199 0.0000027 0.0000227 0.000496 0.000507 1994 8 8 49572 0.067072 0.171750 0.7308786 0.0016536 -0.000016 -0.000449 0.000161 0.000160 0.0000022 0.0000221 0.000373 0.000373 1994 8 9 49573 0.065193 0.171879 0.7291892 0.0017159 -0.000054 -0.000235 0.000134 0.000133 0.0000017 0.0000233 0.000249 0.000239 1994 8 10 49574 0.064251 0.171708 0.7274570 0.0017482 -0.000085 -0.000136 0.000109 0.000102 0.0000016 0.0000240 0.000226 0.000201 1994 8 11 49575 0.062876 0.171606 0.7257226 0.0017461 0.000035 -0.000148 0.000138 0.000115 0.0000018 0.0000233 0.000218 0.000232 1994 8 12 49576 0.061884 0.171521 0.7240460 0.0016810 0.000359 0.000050 0.000171 0.000128 0.0000021 0.0000227 0.000152 0.000167 1994 8 13 49577 0.059471 0.171426 0.7224836 0.0015149 0.000540 0.000231 0.000182 0.000127 0.0000024 0.0000215 0.000116 0.000117 1994 8 14 49578 0.057716 0.171028 0.7210532 0.0013520 0.000435 0.000230 0.000209 0.000201 0.0000028 0.0000215 0.000138 0.000138 1994 8 15 49579 0.054312 0.170650 0.7197300 0.0012379 0.000221 0.000142 0.000191 0.000275 0.0000031 0.0000221 0.000161 0.000158 1994 8 16 49580 0.051461 0.169683 0.7184719 0.0012158 0.000008 -0.000009 0.000156 0.000193 0.0000034 0.0000215 0.000183 0.000178 1994 8 17 49581 0.049327 0.168973 0.7172387 0.0012497 0.000037 -0.000134 0.000133 0.000105 0.0000019 0.0000215 0.000211 0.000184 1994 8 18 49582 0.047719 0.168480 0.7159901 0.0013221 0.000111 -0.000254 0.000154 0.000130 0.0000015 0.0000221 0.000219 0.000186 1994 8 19 49583 0.045886 0.168314 0.7146740 0.0014088 0.000225 -0.000340 0.000202 0.000150 0.0000016 0.0000221 0.000219 0.000187 1994 8 20 49584 0.043455 0.168714 0.7132377 0.0015214 0.000339 -0.000380 0.000221 0.000154 0.0000016 0.0000227 0.000219 0.000187 1994 8 21 49585 0.039748 0.169084 0.7116533 0.0016229 0.000402 -0.000371 0.000224 0.000185 0.0000016 0.0000233 0.000220 0.000187 1994 8 22 49586 0.036447 0.169006 0.7099359 0.0017323 0.000386 -0.000317 0.000213 0.000194 0.0000016 0.0000233 0.000220 0.000188 1994 8 23 49587 0.033094 0.168939 0.7081399 0.0017730 0.000297 -0.000231 0.000176 0.000151 0.0000016 0.0000233 0.000220 0.000188 1994 8 24 49588 0.030410 0.168752 0.7063371 0.0017730 0.000165 -0.000125 0.000132 0.000104 0.0000016 0.0000233 0.000220 0.000189 1994 8 25 49589 0.028180 0.167831 0.7045900 0.0017113 0.000022 -0.000032 0.000103 0.000085 0.0000018 0.0000227 0.000250 0.000224 1994 8 26 49590 0.026393 0.168091 0.7029344 0.0016033 -0.000060 0.000069 0.000113 0.000095 0.0000016 0.0000221 0.000330 0.000384 1994 8 27 49591 0.024848 0.168129 0.7013534 0.0015276 -0.000042 0.000114 0.000162 0.000146 0.0000014 0.0000215 0.000349 0.000434 1994 8 28 49592 0.023209 0.168479 0.6998185 0.0015017 0.000048 0.000090 0.000207 0.000183 0.0000014 0.0000209 0.000311 0.000365 1994 8 29 49593 0.021281 0.168781 0.6983259 0.0014559 0.000148 0.000034 0.000203 0.000159 0.0000014 0.0000209 0.000274 0.000296 1994 8 30 49594 0.018370 0.169177 0.6968780 0.0014200 0.000217 -0.000015 0.000153 0.000115 0.0000013 0.0000203 0.000235 0.000227 1994 8 31 49595 0.016219 0.169947 0.6954512 0.0014660 0.000143 -0.000056 0.000118 0.000096 0.0000014 0.0000203 0.000225 0.000196 1994 9 1 49596 0.012859 0.170434 0.6939751 0.0015502 0.000129 0.000056 0.000119 0.000093 0.0000019 0.0000203 0.000227 0.000211 1994 9 2 49597 0.010705 0.170647 0.6923603 0.0017072 0.000174 0.000156 0.000121 0.000091 0.0000025 0.0000197 0.000337 0.000359 1994 9 3 49598 0.008291 0.170751 0.6905384 0.0019205 0.000168 0.000213 0.000193 0.000140 0.0000026 0.0000197 0.000379 0.000393 1994 9 4 49599 0.006356 0.170863 0.6884907 0.0021556 0.000110 0.000229 0.000247 0.000216 0.0000023 0.0000197 0.000333 0.000302 1994 9 5 49600 0.004489 0.171039 0.6862480 0.0023497 0.000060 0.000182 0.000198 0.000248 0.0000020 0.0000203 0.000288 0.000224 1994 9 6 49601 0.002080 0.172459 0.6838664 0.0024539 0.000063 0.000074 0.000187 0.000218 0.0000017 0.0000203 0.000245 0.000205 1994 9 7 49602 -0.000644 0.173529 0.6813988 0.0025180 0.000057 -0.000003 0.000155 0.000137 0.0000014 0.0000203 0.000203 0.000186 1994 9 8 49603 -0.003528 0.174302 0.6788805 0.0025323 -0.000043 0.000051 0.000098 0.000082 0.0000017 0.0000209 0.000251 0.000226 1994 9 9 49604 -0.006290 0.174837 0.6763338 0.0025029 -0.000086 0.000134 0.000131 0.000104 0.0000023 0.0000215 0.000353 0.000383 1994 9 10 49605 -0.008624 0.175725 0.6738427 0.0024158 -0.000061 0.000143 0.000180 0.000194 0.0000028 0.0000227 0.000376 0.000430 1994 9 11 49606 -0.010828 0.176681 0.6714851 0.0022884 -0.000009 0.000071 0.000284 0.000292 0.0000031 0.0000233 0.000332 0.000360 1994 9 12 49607 -0.013569 0.178393 0.6692517 0.0022039 0.000055 -0.000045 0.000332 0.000269 0.0000033 0.0000227 0.000288 0.000290 1994 9 13 49608 -0.015768 0.179079 0.6670694 0.0021872 0.000102 -0.000175 0.000235 0.000175 0.0000036 0.0000227 0.000245 0.000220 1994 9 14 49609 -0.018679 0.179824 0.6648541 0.0022276 0.000129 -0.000204 0.000172 0.000136 0.0000019 0.0000221 0.000218 0.000208 1994 9 15 49610 -0.021929 0.180626 0.6625561 0.0023359 0.000085 -0.000276 0.000222 0.000185 0.0000014 0.0000215 0.000219 0.000205 1994 9 16 49611 -0.025541 0.181689 0.6601533 0.0024630 0.000042 -0.000333 0.000260 0.000228 0.0000014 0.0000221 0.000230 0.000203 1994 9 17 49612 -0.028189 0.182345 0.6576458 0.0025796 0.000097 -0.000312 0.000264 0.000257 0.0000014 0.0000227 0.000218 0.000191 1994 9 18 49613 -0.030494 0.183092 0.6550606 0.0025961 0.000217 -0.000237 0.000279 0.000271 0.0000014 0.0000233 0.000189 0.000170 1994 9 19 49614 -0.033671 0.183759 0.6524484 0.0025814 0.000307 -0.000167 0.000265 0.000220 0.0000014 0.0000215 0.000161 0.000149 1994 9 20 49615 -0.035702 0.185011 0.6498657 0.0025797 0.000314 -0.000126 0.000225 0.000167 0.0000014 0.0000203 0.000132 0.000128 1994 9 21 49616 -0.038592 0.186016 0.6473529 0.0024911 0.000086 -0.000196 0.000154 0.000124 0.0000014 0.0000209 0.000187 0.000183 1994 9 22 49617 -0.040943 0.187693 0.6449276 0.0023906 -0.000051 -0.000189 0.000192 0.000166 0.0000016 0.0000209 0.000250 0.000250 1994 9 23 49618 -0.044461 0.188501 0.6425962 0.0022602 -0.000100 -0.000112 0.000214 0.000209 0.0000019 0.0000203 0.000315 0.000318 1994 9 24 49619 -0.046992 0.189157 0.6403694 0.0021133 -0.000114 -0.000001 0.000188 0.000203 0.0000052 0.0000209 0.000358 0.000321 1994 9 25 49620 -0.049790 0.190654 0.6382608 0.0020153 -0.000076 0.000099 0.000186 0.000189 0.0000087 0.0000215 0.000398 0.000319 1994 9 26 49621 -0.052187 0.191635 0.6362676 0.0019473 -0.000019 0.000125 0.000176 0.000258 0.0000123 0.0000221 0.000438 0.000317 1994 9 27 49622 -0.055278 0.192975 0.6343537 0.0019468 0.000017 0.000034 0.000181 0.000235 0.0000158 0.0000227 0.000478 0.000314 1994 9 28 49623 -0.057452 0.194202 0.6324534 0.0019705 0.000029 -0.000140 0.000155 0.000106 0.0000043 0.0000227 0.000245 0.000207 1994 9 29 49624 -0.060686 0.195814 0.6304933 0.0020279 -0.000068 -0.000499 0.000145 0.000120 0.0000014 0.0000233 0.000328 0.000212 1994 9 30 49625 -0.063183 0.197319 0.6284185 0.0021433 -0.000183 -0.000749 0.000194 0.000166 0.0000016 0.0000233 0.000384 0.000243 1994 10 1 49626 -0.065795 0.198990 0.6261952 0.0022962 -0.000264 -0.000799 0.000258 0.000210 0.0000018 0.0000240 0.000373 0.000266 1994 10 2 49627 -0.067382 0.200742 0.6237997 0.0024830 -0.000285 -0.000675 0.000350 0.000283 0.0000019 0.0000246 0.000361 0.000290 1994 10 3 49628 -0.069478 0.202741 0.6212177 0.0026546 -0.000229 -0.000434 0.000308 0.000250 0.0000021 0.0000246 0.000350 0.000314 1994 10 4 49629 -0.071038 0.204406 0.6184634 0.0028225 -0.000114 -0.000179 0.000172 0.000149 0.0000022 0.0000258 0.000338 0.000337 1994 10 5 49630 -0.073497 0.206585 0.6155991 0.0029002 0.000044 0.000022 0.000124 0.000109 0.0000012 0.0000270 0.000207 0.000220 1994 10 6 49631 -0.076581 0.208073 0.6127300 0.0028243 0.000176 -0.000013 0.000115 0.000100 0.0000020 0.0000252 0.000344 0.000378 1994 10 7 49632 -0.080047 0.209251 0.6099858 0.0026724 0.000156 -0.000193 0.000132 0.000115 0.0000022 0.0000227 0.000401 0.000439 1994 10 8 49633 -0.083580 0.210493 0.6074281 0.0025019 0.000096 -0.000353 0.000228 0.000182 0.0000020 0.0000221 0.000363 0.000398 1994 10 9 49634 -0.086177 0.211941 0.6050313 0.0023544 0.000066 -0.000425 0.000284 0.000321 0.0000018 0.0000215 0.000318 0.000351 1994 10 10 49635 -0.089581 0.213441 0.6027247 0.0022735 0.000060 -0.000413 0.000216 0.000303 0.0000016 0.0000209 0.000273 0.000304 1994 10 11 49636 -0.091747 0.214794 0.6004307 0.0022885 0.000083 -0.000335 0.000171 0.000176 0.0000014 0.0000209 0.000228 0.000258 1994 10 12 49637 -0.093489 0.216025 0.5980953 0.0023486 0.000119 -0.000235 0.000140 0.000125 0.0000012 0.0000209 0.000183 0.000211 1994 10 13 49638 -0.094753 0.217624 0.5956959 0.0024145 0.000149 -0.000185 0.000144 0.000138 0.0000015 0.0000209 0.000171 0.000177 1994 10 14 49639 -0.096211 0.219734 0.5932329 0.0024961 0.000154 -0.000166 0.000132 0.000139 0.0000020 0.0000209 0.000170 0.000148 1994 10 15 49640 -0.096892 0.222111 0.5907204 0.0025435 0.000115 -0.000120 0.000135 0.000173 0.0000021 0.0000203 0.000169 0.000153 1994 10 16 49641 -0.098417 0.224312 0.5881844 0.0025209 0.000074 -0.000079 0.000177 0.000217 0.0000022 0.0000203 0.000169 0.000164 1994 10 17 49642 -0.099423 0.226746 0.5856730 0.0024385 0.000063 -0.000062 0.000165 0.000175 0.0000022 0.0000203 0.000169 0.000175 1994 10 18 49643 -0.101814 0.229020 0.5832529 0.0023175 0.000078 -0.000079 0.000132 0.000140 0.0000023 0.0000197 0.000168 0.000187 1994 10 19 49644 -0.104126 0.231326 0.5809847 0.0021820 0.000227 -0.000157 0.000122 0.000122 0.0000014 0.0000197 0.000183 0.000218 1994 10 20 49645 -0.107182 0.233293 0.5788870 0.0020902 0.000194 -0.000221 0.000180 0.000146 0.0000035 0.0000184 0.000367 0.000339 1994 10 21 49646 -0.110137 0.235431 0.5768219 0.0020168 -0.000026 -0.000262 0.000197 0.000163 0.0000034 0.0000178 0.000261 0.000231 1994 10 22 49647 -0.113028 0.237345 0.5748011 0.0019549 -0.000114 -0.000219 0.000246 0.000218 0.0000029 0.0000190 0.000227 0.000207 1994 10 23 49648 -0.114801 0.239509 0.5728632 0.0019425 -0.000118 -0.000148 0.000287 0.000240 0.0000024 0.0000197 0.000205 0.000192 1994 10 24 49649 -0.117213 0.242108 0.5709657 0.0019609 -0.000030 -0.000091 0.000208 0.000168 0.0000018 0.0000190 0.000182 0.000177 1994 10 25 49650 -0.119246 0.244292 0.5690194 0.0020108 0.000114 -0.000078 0.000117 0.000102 0.0000013 0.0000184 0.000160 0.000162 1994 10 26 49651 -0.121443 0.246035 0.5669529 0.0021151 0.000295 -0.000159 0.000079 0.000067 0.0000012 0.0000184 0.000185 0.000210 1994 10 27 49652 -0.123568 0.248510 0.5647670 0.0022475 0.000352 -0.000222 0.000088 0.000071 0.0000013 0.0000184 0.000209 0.000172 1994 10 28 49653 -0.126064 0.250079 0.5624598 0.0023646 0.000235 -0.000211 0.000078 0.000066 0.0000014 0.0000190 0.000212 0.000211 1994 10 29 49654 -0.128510 0.252326 0.5599929 0.0025401 0.000146 -0.000128 0.000118 0.000083 0.0000015 0.0000203 0.000272 0.000299 1994 10 30 49655 -0.130573 0.254302 0.5573364 0.0027259 0.000141 -0.000018 0.000236 0.000182 0.0000017 0.0000215 0.000377 0.000379 1994 10 31 49656 -0.131714 0.256460 0.5545046 0.0028681 0.000157 0.000057 0.000269 0.000235 0.0000018 0.0000215 0.000481 0.000460 1994 11 1 49657 -0.133053 0.258712 0.5515601 0.0029741 0.000162 0.000057 0.000214 0.000205 0.0000019 0.0000209 0.000586 0.000540 1994 11 2 49658 -0.134448 0.261066 0.5485935 0.0029533 0.000071 -0.000059 0.000164 0.000151 0.0000013 0.0000209 0.000259 0.000271 1994 11 3 49659 -0.136220 0.262805 0.5456929 0.0028536 -0.000028 -0.000239 0.000158 0.000142 0.0000031 0.0000209 0.000524 0.000453 1994 11 4 49660 -0.137571 0.264994 0.5429309 0.0026873 -0.000126 -0.000263 0.000194 0.000194 0.0000037 0.0000209 0.000580 0.000468 1994 11 5 49661 -0.138950 0.266922 0.5403406 0.0025019 -0.000180 -0.000156 0.000227 0.000238 0.0000031 0.0000209 0.000425 0.000316 1994 11 6 49662 -0.140571 0.270025 0.5379056 0.0023865 -0.000163 -0.000028 0.000227 0.000308 0.0000026 0.0000215 0.000269 0.000163 1994 11 7 49663 -0.141574 0.272562 0.5355776 0.0023530 -0.000036 -0.000031 0.000209 0.000263 0.0000021 0.0000215 0.000237 0.000208 1994 11 8 49664 -0.142643 0.274229 0.5332950 0.0023279 0.000112 -0.000121 0.000178 0.000147 0.0000016 0.0000197 0.000267 0.000350 1994 11 9 49665 -0.144633 0.276727 0.5309939 0.0023124 0.000069 -0.000105 0.000141 0.000125 0.0000021 0.0000184 0.000250 0.000366 1994 11 10 49666 -0.145146 0.278955 0.5286184 0.0023498 0.000004 -0.000101 0.000172 0.000137 0.0000026 0.0000178 0.000330 0.000454 1994 11 11 49667 -0.145400 0.281992 0.5261514 0.0024492 -0.000071 -0.000101 0.000213 0.000148 0.0000030 0.0000178 0.000444 0.000570 1994 11 12 49668 -0.145875 0.284694 0.5236224 0.0025236 -0.000129 -0.000101 0.000338 0.000210 0.0000029 0.0000178 0.000456 0.000572 1994 11 13 49669 -0.146039 0.287669 0.5210858 0.0025382 -0.000144 -0.000106 0.000438 0.000337 0.0000026 0.0000178 0.000395 0.000491 1994 11 14 49670 -0.146746 0.290587 0.5185924 0.0024916 -0.000114 -0.000116 0.000308 0.000314 0.0000022 0.0000178 0.000334 0.000410 1994 11 15 49671 -0.147667 0.293214 0.5161712 0.0024252 -0.000048 -0.000129 0.000186 0.000187 0.0000019 0.0000178 0.000272 0.000329 1994 11 16 49672 -0.147894 0.295309 0.5138302 0.0023347 0.000032 -0.000144 0.000162 0.000133 0.0000015 0.0000178 0.000211 0.000247 1994 11 17 49673 -0.148960 0.298107 0.5115689 0.0022356 0.000104 -0.000160 0.000201 0.000158 0.0000016 0.0000178 0.000193 0.000228 1994 11 18 49674 -0.149329 0.300539 0.5093885 0.0021596 0.000154 -0.000180 0.000270 0.000254 0.0000020 0.0000190 0.000189 0.000230 1994 11 19 49675 -0.150449 0.303962 0.5072881 0.0020819 0.000177 -0.000200 0.000281 0.000293 0.0000023 0.0000197 0.000185 0.000231 1994 11 20 49676 -0.151366 0.306257 0.5052525 0.0020056 0.000173 -0.000217 0.000293 0.000320 0.0000026 0.0000190 0.000181 0.000233 1994 11 21 49677 -0.152796 0.308570 0.5032427 0.0020236 0.000146 -0.000227 0.000225 0.000255 0.0000029 0.0000190 0.000177 0.000235 1994 11 22 49678 -0.153607 0.312037 0.5011990 0.0020854 0.000100 -0.000231 0.000134 0.000125 0.0000032 0.0000184 0.000173 0.000236 1994 11 23 49679 -0.154189 0.314632 0.4990565 0.0022073 0.000048 -0.000218 0.000128 0.000097 0.0000022 0.0000178 0.000203 0.000260 1994 11 24 49680 -0.153584 0.317412 0.4967652 0.0023743 -0.000012 -0.000220 0.000166 0.000142 0.0000019 0.0000178 0.000216 0.000260 1994 11 25 49681 -0.153337 0.320036 0.4943080 0.0025397 -0.000066 -0.000234 0.000274 0.000265 0.0000018 0.0000178 0.000223 0.000251 1994 11 26 49682 -0.152399 0.323264 0.4917024 0.0026619 -0.000104 -0.000254 0.000349 0.000343 0.0000018 0.0000178 0.000229 0.000242 1994 11 27 49683 -0.151772 0.325557 0.4889912 0.0027382 -0.000118 -0.000267 0.000461 0.000572 0.0000017 0.0000178 0.000235 0.000232 1994 11 28 49684 -0.151635 0.328975 0.4862293 0.0027420 -0.000110 -0.000267 0.000393 0.000521 0.0000017 0.0000178 0.000242 0.000223 1994 11 29 49685 -0.151341 0.331246 0.4834731 0.0027262 -0.000089 -0.000251 0.000155 0.000161 0.0000016 0.0000184 0.000249 0.000214 1994 11 30 49686 -0.151664 0.334292 0.4807700 0.0026558 -0.000049 -0.000219 0.000097 0.000080 0.0000014 0.0000190 0.000197 0.000205 1994 12 1 49687 -0.151565 0.336658 0.4781485 0.0025777 -0.000051 -0.000190 0.000111 0.000098 0.0000015 0.0000184 0.000153 0.000168 1994 12 2 49688 -0.152383 0.339505 0.4756250 0.0024608 -0.000084 -0.000189 0.000114 0.000109 0.0000016 0.0000190 0.000115 0.000122 1994 12 3 49689 -0.153228 0.341593 0.4732023 0.0023609 -0.000122 -0.000220 0.000095 0.000097 0.0000018 0.0000197 0.000076 0.000075 1994 12 4 49690 -0.153096 0.344034 0.4708631 0.0023158 -0.000138 -0.000284 0.000185 0.000192 0.0000020 0.0000190 0.000098 0.000093 1994 12 5 49691 -0.152974 0.346337 0.4685667 0.0023680 -0.000120 -0.000345 0.000244 0.000261 0.0000022 0.0000184 0.000176 0.000173 1994 12 6 49692 -0.152469 0.347673 0.4662505 0.0024060 -0.000077 -0.000348 0.000176 0.000186 0.0000024 0.0000178 0.000255 0.000252 1994 12 7 49693 -0.152065 0.350285 0.4638481 0.0024495 0.000007 -0.000266 0.000137 0.000126 0.0000020 0.0000172 0.000238 0.000276 1994 12 8 49694 -0.151747 0.352516 0.4613243 0.0024585 0.000018 -0.000073 0.000128 0.000112 0.0000050 0.0000172 0.000428 0.000537 1994 12 9 49695 -0.151883 0.355128 0.4587551 0.0024629 0.000009 0.000095 0.000187 0.000149 0.0000056 0.0000172 0.000473 0.000592 1994 12 10 49696 -0.151280 0.357980 0.4562349 0.0024720 0.000008 0.000181 0.000288 0.000202 0.0000044 0.0000172 0.000408 0.000503 1994 12 11 49697 -0.151744 0.361134 0.4537912 0.0024598 0.000022 0.000177 0.000368 0.000338 0.0000033 0.0000172 0.000343 0.000415 1994 12 12 49698 -0.153290 0.364050 0.4513951 0.0024453 0.000058 0.000090 0.000355 0.000427 0.0000021 0.0000178 0.000278 0.000326 1994 12 13 49699 -0.153577 0.366891 0.4490125 0.0024022 0.000099 -0.000041 0.000234 0.000284 0.0000009 0.0000178 0.000212 0.000237 1994 12 14 49700 -0.154308 0.369105 0.4466531 0.0023171 0.000183 -0.000192 0.000141 0.000141 0.0000008 0.0000184 0.000174 0.000187 1994 12 15 49701 -0.153822 0.371571 0.4443711 0.0022238 0.000133 -0.000253 0.000192 0.000204 0.0000015 0.0000190 0.000167 0.000194 1994 12 16 49702 -0.154843 0.374531 0.4421720 0.0021857 0.000007 -0.000248 0.000231 0.000231 0.0000024 0.0000197 0.000169 0.000218 1994 12 17 49703 -0.154470 0.376679 0.4399926 0.0022110 -0.000076 -0.000257 0.000295 0.000365 0.0000021 0.0000209 0.000168 0.000207 1994 12 18 49704 -0.155546 0.379910 0.4377538 0.0023010 -0.000114 -0.000272 0.000280 0.000408 0.0000017 0.0000209 0.000166 0.000192 1994 12 19 49705 -0.155650 0.382488 0.4353969 0.0024273 -0.000087 -0.000296 0.000160 0.000202 0.0000013 0.0000197 0.000164 0.000178 1994 12 20 49706 -0.157083 0.385578 0.4328968 0.0025575 0.000002 -0.000322 0.000128 0.000126 0.0000010 0.0000184 0.000162 0.000163 1994 12 21 49707 -0.157744 0.387403 0.4302545 0.0027000 0.000129 -0.000338 0.000111 0.000099 0.0000013 0.0000178 0.000177 0.000210 1994 12 22 49708 -0.158344 0.390045 0.4274804 0.0028149 0.000249 -0.000311 0.000136 0.000114 0.0000014 0.0000172 0.000185 0.000224 1994 12 23 49709 -0.158689 0.391987 0.4245894 0.0029132 0.000327 -0.000249 0.000186 0.000173 0.0000013 0.0000178 0.000189 0.000222 1994 12 24 49710 -0.159303 0.394784 0.4216031 0.0029924 0.000344 -0.000176 0.000397 0.000518 0.0000013 0.0000197 0.000193 0.000221 1994 12 25 49711 -0.159334 0.396671 0.4185535 0.0030451 0.000295 -0.000121 0.000710 0.001227 0.0000013 0.0000203 0.000197 0.000220 1994 12 26 49712 -0.158655 0.399057 0.4154852 0.0030577 0.000194 -0.000110 0.000587 0.001073 0.0000012 0.0000190 0.000201 0.000218 1994 12 27 49713 -0.159118 0.402668 0.4124517 0.0030114 0.000074 -0.000153 0.000290 0.000384 0.0000012 0.0000178 0.000205 0.000217 1994 12 28 49714 -0.158770 0.405956 0.4095046 0.0029092 -0.000028 -0.000235 0.000161 0.000166 0.0000011 0.0000172 0.000210 0.000216 1994 12 29 49715 -0.158014 0.409337 0.4066759 0.0027847 -0.000130 -0.000395 0.000132 0.000150 0.0000012 0.0000172 0.000222 0.000202 1994 12 30 49716 -0.157130 0.412166 0.4039628 0.0026793 -0.000069 -0.000415 0.000121 0.000139 0.0000012 0.0000184 0.000198 0.000182 1994 12 31 49717 -0.155656 0.415186 0.4013219 0.0026395 0.000027 -0.000384 0.000121 0.000121 0.0000012 0.0000190 0.000179 0.000172 1995 1 1 49718 -0.153165 0.417896 0.3986810 0.0026491 0.000070 -0.000366 0.000263 0.000320 0.0000012 0.0000190 0.000177 0.000171 1995 1 2 49719 -0.150187 0.420906 0.3959660 0.0027738 0.000075 -0.000336 0.000307 0.000384 0.0000013 0.0000313 0.000175 0.000170 1995 1 3 49720 -0.148866 0.423992 0.3931318 0.0029165 0.000038 -0.000301 0.000249 0.000326 0.0000013 0.0000418 0.000173 0.000169 1995 1 4 49721 -0.146696 0.426796 0.3901814 0.0029952 -0.000022 -0.000262 0.000168 0.000223 0.0000013 0.0000399 0.000171 0.000168 1995 1 5 49722 -0.144834 0.428891 0.3871639 0.0030071 -0.000070 -0.000209 0.000170 0.000180 0.0000016 0.0000375 0.000177 0.000185 1995 1 6 49723 -0.143388 0.431037 0.3841550 0.0029650 -0.000096 -0.000154 0.000240 0.000251 0.0000020 0.0000344 0.000187 0.000207 1995 1 7 49724 -0.141525 0.433518 0.3812301 0.0028813 -0.000098 -0.000110 0.000296 0.000355 0.0000024 0.0000319 0.000197 0.000229 1995 1 8 49725 -0.140591 0.435641 0.3784450 0.0027295 -0.000081 -0.000089 0.000329 0.000419 0.0000028 0.0000307 0.000206 0.000251 1995 1 9 49726 -0.139065 0.437313 0.3758276 0.0025465 -0.000056 -0.000096 0.000263 0.000281 0.0000031 0.0000295 0.000216 0.000273 1995 1 10 49727 -0.137169 0.439252 0.3733802 0.0023532 -0.000029 -0.000116 0.000202 0.000167 0.0000035 0.0000264 0.000226 0.000295 1995 1 11 49728 -0.135704 0.441756 0.3710836 0.0022410 -0.000018 -0.000160 0.000158 0.000130 0.0000017 0.0000246 0.000181 0.000194 1995 1 12 49729 -0.133580 0.444572 0.3689036 0.0021565 0.000022 -0.000144 0.000146 0.000148 0.0000013 0.0000264 0.000174 0.000170 1995 1 13 49730 -0.132170 0.446935 0.3667972 0.0020810 0.000083 -0.000075 0.000182 0.000189 0.0000013 0.0000289 0.000181 0.000174 1995 1 14 49731 -0.131102 0.448996 0.3647200 0.0020670 0.000151 0.000017 0.000189 0.000222 0.0000014 0.0000295 0.000189 0.000178 1995 1 15 49732 -0.129870 0.451326 0.3626302 0.0021181 0.000206 0.000091 0.000216 0.000250 0.0000014 0.0000295 0.000195 0.000182 1995 1 16 49733 -0.128385 0.454425 0.3604904 0.0021759 0.000228 0.000105 0.000195 0.000214 0.0000014 0.0000289 0.000202 0.000185 1995 1 17 49734 -0.128479 0.456771 0.3582658 0.0022671 0.000200 0.000031 0.000132 0.000166 0.0000015 0.0000301 0.000210 0.000189 1995 1 18 49735 -0.127752 0.459000 0.3559257 0.0023932 0.000124 -0.000124 0.000110 0.000130 0.0000015 0.0000319 0.000217 0.000193 1995 1 19 49736 -0.127631 0.461054 0.3534486 0.0025356 -0.000003 -0.000357 0.000123 0.000130 0.0000015 0.0000319 0.000323 0.000286 1995 1 20 49737 -0.125616 0.462831 0.3508318 0.0026832 -0.000106 -0.000533 0.000166 0.000174 0.0000014 0.0000307 0.000348 0.000313 1995 1 21 49738 -0.125081 0.464109 0.3480953 0.0028028 -0.000158 -0.000598 0.000251 0.000225 0.0000014 0.0000307 0.000307 0.000285 1995 1 22 49739 -0.123471 0.465737 0.3452796 0.0028549 -0.000161 -0.000553 0.000372 0.000290 0.0000014 0.0000319 0.000266 0.000257 1995 1 23 49740 -0.122012 0.467491 0.3424342 0.0028626 -0.000127 -0.000427 0.000331 0.000260 0.0000013 0.0000326 0.000224 0.000228 1995 1 24 49741 -0.120989 0.470244 0.3396056 0.0028117 -0.000080 -0.000277 0.000152 0.000138 0.0000013 0.0000326 0.000183 0.000200 1995 1 25 49742 -0.119393 0.472454 0.3368260 0.0027289 -0.000046 -0.000167 0.000087 0.000086 0.0000011 0.0000313 0.000162 0.000154 1995 1 26 49743 -0.117826 0.475312 0.3341069 0.0026700 -0.000050 -0.000140 0.000168 0.000137 0.0000015 0.0000301 0.000193 0.000175 1995 1 27 49744 -0.116743 0.477814 0.3314401 0.0026447 -0.000083 -0.000204 0.000199 0.000165 0.0000021 0.0000289 0.000239 0.000219 1995 1 28 49745 -0.115778 0.479963 0.3287937 0.0026491 -0.000120 -0.000352 0.000221 0.000214 0.0000021 0.0000289 0.000312 0.000297 1995 1 29 49746 -0.115445 0.481511 0.3261154 0.0027146 -0.000150 -0.000483 0.000358 0.000399 0.0000021 0.0000295 0.000387 0.000377 1995 1 30 49747 -0.114643 0.483158 0.3233616 0.0027935 -0.000161 -0.000525 0.000361 0.000440 0.0000021 0.0000301 0.000462 0.000458 1995 1 31 49748 -0.114601 0.484649 0.3205261 0.0028720 -0.000155 -0.000457 0.000256 0.000317 0.0000021 0.0000301 0.000537 0.000539 1995 2 1 49749 -0.115704 0.486310 0.3176454 0.0029136 -0.000104 -0.000188 0.000187 0.000209 0.0000017 0.0000301 0.000288 0.000262 1995 2 2 49750 -0.115783 0.488026 0.3147758 0.0029004 -0.000111 -0.000029 0.000151 0.000162 0.0000070 0.0000301 0.000364 0.000490 1995 2 3 49751 -0.115866 0.489365 0.3119120 0.0028392 -0.000127 -0.000102 0.000106 0.000116 0.0000042 0.0000295 0.000271 0.000330 1995 2 4 49752 -0.115325 0.490817 0.3090713 0.0027606 -0.000107 -0.000220 0.000209 0.000205 0.0000009 0.0000295 0.000172 0.000146 1995 2 5 49753 -0.113992 0.491902 0.3063062 0.0026832 -0.000059 -0.000288 0.000385 0.000380 0.0000010 0.0000289 0.000171 0.000149 1995 2 6 49754 -0.112074 0.493351 0.3036581 0.0025908 -0.000009 -0.000316 0.000307 0.000315 0.0000010 0.0000289 0.000169 0.000151 1995 2 7 49755 -0.109368 0.494972 0.3011464 0.0024779 0.000013 -0.000288 0.000179 0.000196 0.0000010 0.0000295 0.000167 0.000153 1995 2 8 49756 -0.106329 0.497249 0.2987642 0.0023414 -0.000020 -0.000220 0.000131 0.000136 0.0000011 0.0000289 0.000166 0.000156 1995 2 9 49757 -0.102988 0.499695 0.2964859 0.0022194 -0.000124 -0.000154 0.000139 0.000136 0.0000011 0.0000307 0.000193 0.000187 1995 2 10 49758 -0.099444 0.502502 0.2942785 0.0021567 -0.000271 -0.000106 0.000197 0.000186 0.0000012 0.0000350 0.000228 0.000227 1995 2 11 49759 -0.097793 0.504319 0.2921071 0.0021702 -0.000412 -0.000080 0.000256 0.000203 0.0000013 0.0000375 0.000264 0.000267 1995 2 12 49760 -0.096310 0.506734 0.2899339 0.0022024 -0.000497 -0.000076 0.000239 0.000226 0.0000014 0.0000381 0.000299 0.000307 1995 2 13 49761 -0.095181 0.508472 0.2877135 0.0022721 -0.000491 -0.000089 0.000193 0.000212 0.0000014 0.0000375 0.000335 0.000348 1995 2 14 49762 -0.094389 0.509482 0.2853922 0.0024033 -0.000389 -0.000114 0.000172 0.000139 0.0000015 0.0000375 0.000370 0.000388 1995 2 15 49763 -0.092989 0.510777 0.2829189 0.0025722 -0.000141 -0.000085 0.000134 0.000105 0.0000016 0.0000387 0.000234 0.000212 1995 2 16 49764 -0.091029 0.511784 0.2802655 0.0027141 -0.000004 -0.000185 0.000136 0.000110 0.0000027 0.0000418 0.000206 0.000232 1995 2 17 49765 -0.089076 0.513548 0.2774580 0.0028047 0.000130 -0.000241 0.000165 0.000145 0.0000030 0.0000455 0.000212 0.000254 1995 2 18 49766 -0.087209 0.514588 0.2745712 0.0028484 0.000248 -0.000222 0.000214 0.000180 0.0000027 0.0000461 0.000214 0.000241 1995 2 19 49767 -0.085362 0.516724 0.2717003 0.0028230 0.000292 -0.000166 0.000255 0.000202 0.0000024 0.0000436 0.000217 0.000228 1995 2 20 49768 -0.083614 0.517908 0.2689270 0.0027322 0.000237 -0.000098 0.000232 0.000222 0.0000021 0.0000418 0.000220 0.000215 1995 2 21 49769 -0.082237 0.519291 0.2662916 0.0026410 0.000078 -0.000056 0.000182 0.000206 0.0000018 0.0000418 0.000222 0.000202 1995 2 22 49770 -0.080422 0.520076 0.2637818 0.0025256 -0.000158 -0.000061 0.000148 0.000153 0.0000015 0.0000418 0.000225 0.000189 1995 2 23 49771 -0.079374 0.521516 0.2613437 0.0024452 -0.000449 -0.000134 0.000214 0.000170 0.0000016 0.0000430 0.000294 0.000269 1995 2 24 49772 -0.076752 0.522854 0.2589051 0.0024421 -0.000681 -0.000214 0.000261 0.000206 0.0000018 0.0000442 0.000387 0.000382 1995 2 25 49773 -0.074230 0.524671 0.2564026 0.0025094 -0.000718 -0.000204 0.000226 0.000196 0.0000022 0.0000442 0.000382 0.000384 1995 2 26 49774 -0.070639 0.526885 0.2537986 0.0026383 -0.000611 -0.000131 0.000230 0.000233 0.0000027 0.0000430 0.000368 0.000375 1995 2 27 49775 -0.067107 0.528919 0.2510822 0.0027625 -0.000421 -0.000026 0.000211 0.000253 0.0000032 0.0000424 0.000354 0.000366 1995 2 28 49776 -0.063475 0.530287 0.2482599 0.0028460 -0.000233 0.000063 0.000164 0.000235 0.0000036 0.0000467 0.000340 0.000358 1995 3 1 49777 -0.060013 0.532309 0.2453451 0.0029496 -0.000109 0.000096 0.000142 0.000203 0.0000041 0.0000522 0.000326 0.000349 1995 3 2 49778 -0.056016 0.533290 0.2423527 0.0030619 -0.000124 0.000032 0.000155 0.000194 0.0000037 0.0000534 0.000331 0.000316 1995 3 3 49779 -0.053195 0.535243 0.2393031 0.0030584 -0.000192 -0.000084 0.000180 0.000224 0.0000031 0.0000473 0.000342 0.000275 1995 3 4 49780 -0.050053 0.536286 0.2362346 0.0030253 -0.000149 -0.000177 0.000210 0.000269 0.0000025 0.0000412 0.000297 0.000244 1995 3 5 49781 -0.046548 0.537542 0.2332085 0.0029718 -0.000067 -0.000220 0.000213 0.000313 0.0000019 0.0000399 0.000249 0.000213 1995 3 6 49782 -0.042847 0.538526 0.2302876 0.0028711 0.000019 -0.000195 0.000175 0.000259 0.0000013 0.0000387 0.000201 0.000182 1995 3 7 49783 -0.040195 0.540020 0.2275038 0.0027377 0.000066 -0.000112 0.000129 0.000151 0.0000007 0.0000375 0.000154 0.000151 1995 3 8 49784 -0.036995 0.541372 0.2248373 0.0026279 -0.000025 0.000021 0.000103 0.000103 0.0000009 0.0000375 0.000166 0.000156 1995 3 9 49785 -0.034618 0.542500 0.2222206 0.0026257 -0.000096 0.000094 0.000154 0.000150 0.0000011 0.0000387 0.000178 0.000168 1995 3 10 49786 -0.032031 0.543547 0.2195815 0.0026667 -0.000137 0.000093 0.000181 0.000199 0.0000012 0.0000393 0.000188 0.000182 1995 3 11 49787 -0.029802 0.544781 0.2168750 0.0027429 -0.000143 0.000036 0.000206 0.000228 0.0000014 0.0000399 0.000199 0.000195 1995 3 12 49788 -0.027833 0.545026 0.2140876 0.0028261 -0.000114 -0.000046 0.000219 0.000225 0.0000015 0.0000412 0.000208 0.000209 1995 3 13 49789 -0.026050 0.545604 0.2112232 0.0029165 -0.000063 -0.000113 0.000166 0.000181 0.0000017 0.0000424 0.000219 0.000223 1995 3 14 49790 -0.024497 0.545642 0.2082811 0.0030161 -0.000006 -0.000130 0.000130 0.000126 0.0000018 0.0000418 0.000229 0.000236 1995 3 15 49791 -0.022614 0.545742 0.2052455 0.0031065 0.000020 -0.000058 0.000108 0.000088 0.0000018 0.0000399 0.000255 0.000225 1995 3 16 49792 -0.019653 0.546335 0.2020949 0.0031984 0.000068 0.000025 0.000128 0.000113 0.0000017 0.0000387 0.000255 0.000215 1995 3 17 49793 -0.016935 0.547187 0.1988353 0.0032751 0.000125 0.000099 0.000158 0.000146 0.0000016 0.0000381 0.000243 0.000208 1995 3 18 49794 -0.013971 0.547937 0.1955193 0.0033025 0.000174 0.000154 0.000177 0.000153 0.0000015 0.0000375 0.000232 0.000200 1995 3 19 49795 -0.011408 0.548877 0.1922391 0.0032190 0.000197 0.000178 0.000178 0.000138 0.0000014 0.0000375 0.000221 0.000192 1995 3 20 49796 -0.008990 0.549833 0.1890970 0.0030300 0.000179 0.000173 0.000169 0.000147 0.0000013 0.0000381 0.000210 0.000185 1995 3 21 49797 -0.007694 0.550792 0.1861657 0.0028086 0.000115 0.000146 0.000144 0.000141 0.0000012 0.0000381 0.000199 0.000177 1995 3 22 49798 -0.005279 0.551379 0.1834581 0.0026165 0.000021 0.000100 0.000102 0.000102 0.0000011 0.0000375 0.000187 0.000169 1995 3 23 49799 -0.003539 0.552395 0.1809200 0.0025017 -0.000094 0.000053 0.000104 0.000113 0.0000014 0.0000362 0.000173 0.000169 1995 3 24 49800 -0.000964 0.552558 0.1784509 0.0025068 -0.000170 -0.000008 0.000112 0.000107 0.0000019 0.0000362 0.000159 0.000172 1995 3 25 49801 0.002154 0.552953 0.1759459 0.0025648 -0.000147 -0.000101 0.000187 0.000138 0.0000021 0.0000375 0.000177 0.000192 1995 3 26 49802 0.006892 0.553181 0.1733381 0.0026680 -0.000055 -0.000189 0.000225 0.000182 0.0000022 0.0000393 0.000220 0.000224 1995 3 27 49803 0.011800 0.554133 0.1706136 0.0027628 0.000021 -0.000217 0.000151 0.000145 0.0000023 0.0000399 0.000263 0.000257 1995 3 28 49804 0.017674 0.555124 0.1677968 0.0028555 0.000029 -0.000169 0.000125 0.000118 0.0000024 0.0000387 0.000305 0.000289 1995 3 29 49805 0.021521 0.557026 0.1649257 0.0029013 -0.000130 0.000031 0.000108 0.000099 0.0000020 0.0000393 0.000260 0.000236 1995 3 30 49806 0.025632 0.557682 0.1620323 0.0028699 -0.000275 0.000129 0.000101 0.000103 0.0000020 0.0000430 0.000251 0.000242 1995 3 31 49807 0.028468 0.558486 0.1591498 0.0028087 -0.000371 0.000124 0.000109 0.000113 0.0000021 0.0000455 0.000257 0.000270 1995 4 1 49808 0.032070 0.558258 0.1563157 0.0027606 -0.000394 0.000048 0.000164 0.000166 0.0000023 0.0000424 0.000263 0.000297 1995 4 2 49809 0.034454 0.558299 0.1535663 0.0026897 -0.000338 -0.000053 0.000220 0.000209 0.0000024 0.0000381 0.000269 0.000325 1995 4 3 49810 0.038211 0.557847 0.1509256 0.0026045 -0.000232 -0.000126 0.000185 0.000161 0.0000026 0.0000362 0.000274 0.000353 1995 4 4 49811 0.041596 0.558442 0.1483922 0.0025132 -0.000130 -0.000145 0.000137 0.000126 0.0000027 0.0000350 0.000280 0.000380 1995 4 5 49812 0.044408 0.557803 0.1459348 0.0024432 -0.000064 -0.000028 0.000114 0.000103 0.0000014 0.0000344 0.000202 0.000208 1995 4 6 49813 0.047662 0.557714 0.1435010 0.0024216 -0.000122 -0.000025 0.000118 0.000114 0.0000012 0.0000350 0.000191 0.000174 1995 4 7 49814 0.051056 0.557312 0.1410449 0.0024743 -0.000269 -0.000116 0.000158 0.000145 0.0000013 0.0000356 0.000204 0.000190 1995 4 8 49815 0.054035 0.558146 0.1385395 0.0025488 -0.000438 -0.000254 0.000208 0.000211 0.0000015 0.0000362 0.000217 0.000206 1995 4 9 49816 0.057009 0.557468 0.1359673 0.0026175 -0.000551 -0.000374 0.000338 0.000532 0.0000016 0.0000362 0.000230 0.000221 1995 4 10 49817 0.060466 0.557710 0.1333042 0.0027226 -0.000551 -0.000409 0.000412 0.000660 0.0000018 0.0000356 0.000243 0.000237 1995 4 11 49818 0.062691 0.558202 0.1305140 0.0028734 -0.000426 -0.000331 0.000295 0.000357 0.0000019 0.0000356 0.000256 0.000252 1995 4 12 49819 0.065896 0.558012 0.1275638 0.0030226 -0.000163 -0.000085 0.000141 0.000130 0.0000018 0.0000362 0.000221 0.000227 1995 4 13 49820 0.069020 0.557615 0.1244545 0.0031346 0.000075 0.000158 0.000132 0.000136 0.0000023 0.0000369 0.000141 0.000177 1995 4 14 49821 0.071592 0.557066 0.1213008 0.0031648 0.000092 0.000158 0.000195 0.000187 0.0000020 0.0000362 0.000356 0.000407 1995 4 15 49822 0.075405 0.556492 0.1181605 0.0031344 0.000015 0.000126 0.000263 0.000205 0.0000018 0.0000356 0.000415 0.000467 1995 4 16 49823 0.078790 0.556446 0.1150665 0.0030429 -0.000109 0.000081 0.000484 0.000603 0.0000016 0.0000362 0.000362 0.000405 1995 4 17 49824 0.082058 0.555903 0.1120641 0.0029252 -0.000226 0.000025 0.000525 0.000758 0.0000014 0.0000393 0.000309 0.000343 1995 4 18 49825 0.085643 0.555899 0.1091908 0.0028102 -0.000281 -0.000018 0.000329 0.000370 0.0000012 0.0000418 0.000257 0.000281 1995 4 19 49826 0.088587 0.555822 0.1064492 0.0026946 -0.000264 -0.000041 0.000166 0.000139 0.0000010 0.0000412 0.000204 0.000219 1995 4 20 49827 0.091811 0.555975 0.1037914 0.0026577 -0.000116 -0.000062 0.000093 0.000090 0.0000010 0.0000387 0.000263 0.000294 1995 4 21 49828 0.094595 0.555633 0.1011308 0.0026684 -0.000093 -0.000055 0.000083 0.000078 0.0000013 0.0000350 0.000238 0.000260 1995 4 22 49829 0.097914 0.554988 0.0984219 0.0027197 -0.000151 -0.000023 0.000121 0.000095 0.0000015 0.0000338 0.000193 0.000207 1995 4 23 49830 0.101752 0.554385 0.0956561 0.0027945 -0.000206 0.000014 0.000187 0.000158 0.0000017 0.0000350 0.000176 0.000196 1995 4 24 49831 0.105697 0.553001 0.0928272 0.0028879 -0.000240 0.000047 0.000209 0.000160 0.0000019 0.0000362 0.000160 0.000184 1995 4 25 49832 0.109273 0.552724 0.0899379 0.0029358 -0.000225 0.000077 0.000157 0.000106 0.0000021 0.0000369 0.000143 0.000173 1995 4 26 49833 0.113907 0.551357 0.0870132 0.0029219 -0.000095 0.000073 0.000094 0.000067 0.0000019 0.0000369 0.000202 0.000221 1995 4 27 49834 0.117705 0.549979 0.0841101 0.0028530 -0.000037 0.000126 0.000122 0.000082 0.0000020 0.0000362 0.000217 0.000229 1995 4 28 49835 0.121811 0.548851 0.0812946 0.0027422 -0.000050 0.000212 0.000154 0.000123 0.0000021 0.0000356 0.000218 0.000224 1995 4 29 49836 0.125856 0.547747 0.0786152 0.0026003 -0.000118 0.000293 0.000221 0.000145 0.0000023 0.0000356 0.000218 0.000218 1995 4 30 49837 0.130206 0.545307 0.0760838 0.0024673 -0.000208 0.000325 0.000285 0.000231 0.0000024 0.0000350 0.000219 0.000213 1995 5 1 49838 0.132606 0.544560 0.0736729 0.0023994 -0.000275 0.000277 0.000236 0.000262 0.0000025 0.0000338 0.000220 0.000207 1995 5 2 49839 0.136767 0.542655 0.0713293 0.0023521 -0.000285 0.000143 0.000152 0.000169 0.0000027 0.0000332 0.000220 0.000202 1995 5 3 49840 0.140207 0.541879 0.0689967 0.0023409 -0.000188 -0.000095 0.000101 0.000107 0.0000015 0.0000332 0.000209 0.000226 1995 5 4 49841 0.143771 0.540186 0.0666348 0.0023836 -0.000094 -0.000284 0.000097 0.000096 0.0000013 0.0000319 0.000207 0.000235 1995 5 5 49842 0.147175 0.539087 0.0642224 0.0024487 -0.000022 -0.000392 0.000108 0.000102 0.0000013 0.0000301 0.000208 0.000238 1995 5 6 49843 0.150870 0.536874 0.0617495 0.0025253 0.000021 -0.000407 0.000107 0.000105 0.0000014 0.0000283 0.000209 0.000241 1995 5 7 49844 0.154818 0.535614 0.0592038 0.0025999 0.000028 -0.000343 0.000177 0.000159 0.0000015 0.0000184 0.000210 0.000244 1995 5 8 49845 0.159153 0.533804 0.0565642 0.0026674 0.000010 -0.000239 0.000220 0.000217 0.0000015 0.0000098 0.000211 0.000247 1995 5 9 49846 0.163682 0.532983 0.0538074 0.0027801 -0.000019 -0.000143 0.000219 0.000216 0.0000016 0.0000104 0.000212 0.000250 1995 5 10 49847 0.167942 0.531034 0.0509255 0.0029078 -0.000053 -0.000091 0.000199 0.000172 0.0000016 0.0000111 0.000213 0.000253 1995 5 11 49848 0.171197 0.529803 0.0479404 0.0030148 -0.000068 -0.000116 0.000240 0.000227 0.0000016 0.0000111 0.000264 0.000324 1995 5 12 49849 0.174986 0.527841 0.0449059 0.0030424 -0.000125 -0.000160 0.000316 0.000261 0.0000016 0.0000117 0.000276 0.000338 1995 5 13 49850 0.177775 0.526300 0.0418927 0.0029874 -0.000222 -0.000194 0.000319 0.000237 0.0000015 0.0000123 0.000259 0.000312 1995 5 14 49851 0.180677 0.524373 0.0389632 0.0028689 -0.000323 -0.000197 0.000307 0.000261 0.0000015 0.0000129 0.000243 0.000286 1995 5 15 49852 0.183748 0.522725 0.0361509 0.0027490 -0.000388 -0.000153 0.000254 0.000268 0.0000014 0.0000141 0.000227 0.000261 1995 5 16 49853 0.186783 0.521560 0.0334521 0.0026310 -0.000375 -0.000061 0.000194 0.000224 0.0000014 0.0000147 0.000210 0.000235 1995 5 17 49854 0.189739 0.519769 0.0308337 0.0025619 -0.000261 0.000066 0.000149 0.000145 0.0000013 0.0000154 0.000194 0.000210 1995 5 18 49855 0.191538 0.518278 0.0282513 0.0025274 -0.000043 0.000210 0.000176 0.000162 0.0000013 0.0000160 0.000195 0.000211 1995 5 19 49856 0.193625 0.516138 0.0256693 0.0025343 0.000231 0.000344 0.000208 0.000184 0.0000014 0.0000154 0.000202 0.000221 1995 5 20 49857 0.195540 0.514090 0.0230766 0.0025678 0.000487 0.000445 0.000243 0.000191 0.0000015 0.0000147 0.000208 0.000231 1995 5 21 49858 0.196870 0.511767 0.0204900 0.0025895 0.000651 0.000493 0.000293 0.000260 0.0000016 0.0000141 0.000216 0.000241 1995 5 22 49859 0.199145 0.509169 0.0179462 0.0025624 0.000665 0.000475 0.000310 0.000297 0.0000017 0.0000135 0.000222 0.000251 1995 5 23 49860 0.201402 0.506084 0.0154847 0.0024815 0.000511 0.000393 0.000329 0.000278 0.0000018 0.0000135 0.000229 0.000261 1995 5 24 49861 0.203444 0.503899 0.0131298 0.0023537 0.000223 0.000261 0.000241 0.000210 0.0000018 0.0000135 0.000236 0.000270 1995 5 25 49862 0.205496 0.501887 0.0108822 0.0022393 -0.000168 0.000098 0.000150 0.000135 0.0000018 0.0000141 0.000250 0.000253 1995 5 26 49863 0.207455 0.499720 0.0087237 0.0021411 -0.000481 -0.000047 0.000175 0.000169 0.0000017 0.0000135 0.000249 0.000240 1995 5 27 49864 0.209448 0.497127 0.0066353 0.0020552 -0.000639 -0.000141 0.000246 0.000241 0.0000016 0.0000123 0.000238 0.000235 1995 5 28 49865 0.211662 0.494223 0.0046085 0.0019716 -0.000636 -0.000173 0.000280 0.000322 0.0000015 0.0000117 0.000228 0.000229 1995 5 29 49866 0.213293 0.492054 0.0026422 0.0019202 -0.000499 -0.000143 0.000237 0.000398 0.0000014 0.0000111 0.000218 0.000224 1995 5 30 49867 0.215614 0.489223 0.0007306 0.0018795 -0.000294 -0.000070 0.000213 0.000313 0.0000014 0.0000117 0.000208 0.000219 1995 5 31 49868 0.217301 0.485987 -0.0011481 0.0018710 -0.000097 0.000014 0.000167 0.000160 0.0000013 0.0000123 0.000198 0.000214 1995 6 1 49869 0.219754 0.483400 -0.0030345 0.0018860 0.000016 0.000085 0.000094 0.000085 0.0000011 0.0000123 0.000150 0.000178 1995 6 2 49870 0.221996 0.480067 -0.0049782 0.0019717 0.000039 0.000091 0.000133 0.000115 0.0000011 0.0000123 0.000142 0.000175 1995 6 3 49871 0.225190 0.476999 -0.0070208 0.0021112 -0.000013 0.000029 0.000195 0.000172 0.0000012 0.0000123 0.000160 0.000193 1995 6 4 49872 0.227783 0.473940 -0.0091832 0.0022451 -0.000105 -0.000071 0.000265 0.000230 0.0000014 0.0000117 0.000178 0.000211 1995 6 5 49873 0.231583 0.470498 -0.0114643 0.0023334 -0.000194 -0.000168 0.000314 0.000280 0.0000015 0.0000111 0.000196 0.000229 1995 6 6 49874 0.234613 0.467461 -0.0138437 0.0023896 -0.000244 -0.000210 0.000299 0.000280 0.0000017 0.0000111 0.000214 0.000246 1995 6 7 49875 0.237310 0.464222 -0.0162855 0.0024246 -0.000243 -0.000159 0.000245 0.000218 0.0000018 0.0000111 0.000232 0.000264 1995 6 8 49876 0.240223 0.462074 -0.0187432 0.0024587 -0.000136 -0.000045 0.000130 0.000123 0.0000019 0.0000111 0.000151 0.000183 1995 6 9 49877 0.243248 0.459096 -0.0211660 0.0024405 -0.000116 0.000222 0.000156 0.000147 0.0000019 0.0000111 0.000173 0.000204 1995 6 10 49878 0.245705 0.456229 -0.0235108 0.0023488 -0.000075 0.000456 0.000270 0.000243 0.0000018 0.0000111 0.000211 0.000238 1995 6 11 49879 0.248850 0.452984 -0.0257542 0.0022129 0.000021 0.000537 0.000289 0.000254 0.0000017 0.0000111 0.000211 0.000235 1995 6 12 49880 0.250321 0.450730 -0.0279015 0.0020901 0.000092 0.000460 0.000233 0.000193 0.0000016 0.0000117 0.000210 0.000231 1995 6 13 49881 0.251939 0.447265 -0.0299864 0.0020086 0.000109 0.000246 0.000180 0.000143 0.0000016 0.0000123 0.000210 0.000228 1995 6 14 49882 0.253984 0.444131 -0.0320589 0.0020221 0.000065 -0.000034 0.000141 0.000107 0.0000015 0.0000123 0.000210 0.000224 1995 6 15 49883 0.256313 0.440835 -0.0341652 0.0020972 -0.000096 -0.000324 0.000126 0.000104 0.0000020 0.0000123 0.000468 0.000389 1995 6 16 49884 0.258563 0.437306 -0.0363286 0.0021682 -0.000173 -0.000443 0.000160 0.000148 0.0000025 0.0000129 0.000527 0.000435 1995 6 17 49885 0.260833 0.434325 -0.0385433 0.0022148 -0.000142 -0.000386 0.000195 0.000204 0.0000029 0.0000129 0.000443 0.000394 1995 6 18 49886 0.263103 0.430937 -0.0407799 0.0022458 -0.000056 -0.000234 0.000237 0.000217 0.0000034 0.0000123 0.000359 0.000354 1995 6 19 49887 0.265304 0.428062 -0.0430001 0.0022543 0.000037 -0.000077 0.000215 0.000167 0.0000038 0.0000117 0.000275 0.000313 1995 6 20 49888 0.267345 0.424475 -0.0451683 0.0021711 0.000095 0.000015 0.000206 0.000149 0.0000043 0.0000104 0.000192 0.000272 1995 6 21 49889 0.269450 0.421123 -0.0472541 0.0020557 0.000012 -0.000080 0.000248 0.000193 0.0000051 0.0000104 0.000274 0.000277 1995 6 22 49890 0.270960 0.417102 -0.0492269 0.0019118 0.000005 -0.000112 0.000206 0.000172 0.0000049 0.0000104 0.000312 0.000292 1995 6 23 49891 0.272212 0.413668 -0.0510522 0.0017078 0.000058 -0.000075 0.000159 0.000139 0.0000043 0.0000104 0.000335 0.000310 1995 6 24 49892 0.273297 0.410140 -0.0526966 0.0014837 0.000144 0.000027 0.000188 0.000161 0.0000038 0.0000104 0.000357 0.000328 1995 6 25 49893 0.274100 0.406543 -0.0541440 0.0013193 0.000230 0.000165 0.000220 0.000207 0.0000032 0.0000098 0.000379 0.000345 1995 6 26 49894 0.274351 0.403276 -0.0554115 0.0012256 0.000276 0.000283 0.000222 0.000269 0.0000026 0.0000098 0.000401 0.000363 1995 6 27 49895 0.275241 0.399633 -0.0565552 0.0011638 0.000267 0.000329 0.000197 0.000240 0.0000020 0.0000092 0.000424 0.000381 1995 6 28 49896 0.276356 0.396101 -0.0576573 0.0011465 0.000061 0.000272 0.000140 0.000153 0.0000015 0.0000092 0.000278 0.000261 1995 6 29 49897 0.277375 0.392169 -0.0588008 0.0011956 0.000102 0.000105 0.000095 0.000104 0.0000012 0.0000098 0.000161 0.000185 1995 6 30 49898 0.278807 0.388407 -0.0600470 0.0012819 0.000143 -0.000045 0.000117 0.000151 0.0000014 0.0000098 0.000145 0.000174 1995 7 1 49899 0.280249 0.384586 -0.0614260 0.0013849 0.000120 -0.000124 0.000190 0.000215 0.0000019 0.0000098 0.000172 0.000185 1995 7 2 49900 0.281150 0.380827 -0.0629396 0.0015187 0.000059 -0.000126 0.000228 0.000236 0.0000024 0.0000098 0.000199 0.000197 1995 7 3 49901 0.281808 0.376724 -0.0645679 0.0016678 -0.000036 -0.000057 0.000240 0.000260 0.0000028 0.0000098 0.000226 0.000209 1995 7 4 49902 0.282646 0.372314 -0.0662757 0.0017757 -0.000134 0.000040 0.000262 0.000275 0.0000033 0.0000098 0.000252 0.000221 1995 7 5 49903 0.283474 0.368348 -0.0680191 0.0017870 -0.000184 0.000117 0.000257 0.000250 0.0000038 0.0000098 0.000279 0.000232 1995 7 6 49904 0.285112 0.363896 -0.0697529 0.0017407 -0.000146 0.000135 0.000188 0.000171 0.0000042 0.0000098 0.000306 0.000244 1995 7 7 49905 0.285578 0.360324 -0.0714375 0.0016717 0.000008 0.000069 0.000147 0.000137 0.0000040 0.0000092 0.000288 0.000227 1995 7 8 49906 0.286290 0.356305 -0.0730454 0.0015877 0.000223 -0.000045 0.000183 0.000191 0.0000037 0.0000092 0.000255 0.000201 1995 7 9 49907 0.286529 0.352429 -0.0745675 0.0015090 0.000413 -0.000159 0.000207 0.000229 0.0000033 0.0000092 0.000222 0.000175 1995 7 10 49908 0.286792 0.348354 -0.0760182 0.0014234 0.000498 -0.000226 0.000199 0.000209 0.0000029 0.0000092 0.000188 0.000149 1995 7 11 49909 0.287426 0.344276 -0.0774367 0.0013983 0.000439 -0.000233 0.000210 0.000216 0.0000025 0.0000098 0.000155 0.000123 1995 7 12 49910 0.287385 0.340888 -0.0788793 0.0014398 0.000165 -0.000094 0.000183 0.000180 0.0000021 0.0000098 0.000240 0.000204 1995 7 13 49911 0.287706 0.336942 -0.0803999 0.0015354 -0.000062 -0.000092 0.000146 0.000129 0.0000024 0.0000104 0.000199 0.000174 1995 7 14 49912 0.287677 0.333685 -0.0820269 0.0016564 -0.000188 -0.000120 0.000180 0.000139 0.0000029 0.0000111 0.000146 0.000134 1995 7 15 49913 0.287783 0.330225 -0.0837482 0.0017415 -0.000200 -0.000133 0.000209 0.000158 0.0000034 0.0000111 0.000113 0.000109 1995 7 16 49914 0.287878 0.326481 -0.0855138 0.0017673 -0.000119 -0.000130 0.000207 0.000185 0.0000039 0.0000111 0.000080 0.000083 1995 7 17 49915 0.288096 0.322512 -0.0872539 0.0017082 0.000005 -0.000055 0.000242 0.000221 0.0000043 0.0000104 0.000150 0.000203 1995 7 18 49916 0.288085 0.318523 -0.0889029 0.0016068 0.000098 0.000031 0.000251 0.000204 0.0000048 0.0000104 0.000241 0.000350 1995 7 19 49917 0.287940 0.314850 -0.0904150 0.0014742 0.000065 -0.000012 0.000192 0.000150 0.0000028 0.0000104 0.000250 0.000247 1995 7 20 49918 0.287673 0.311173 -0.0917692 0.0013095 -0.000014 0.000001 0.000169 0.000139 0.0000022 0.0000104 0.002389 0.000199 1995 7 21 49919 0.287583 0.307200 -0.0929661 0.0011618 -0.000081 0.000042 0.000172 0.000159 0.0000021 0.0000111 0.003868 0.000170 1995 7 22 49920 0.287607 0.303381 -0.0940231 0.0009984 -0.000091 0.000083 0.000190 0.000198 0.0000020 0.0000111 0.002919 0.000141 1995 7 23 49921 0.286892 0.299332 -0.0949697 0.0008634 -0.000065 0.000104 0.000253 0.000277 0.0000019 0.0000111 0.001970 0.000112 1995 7 24 49922 0.286035 0.295322 -0.0958427 0.0007958 -0.000019 0.000085 0.000214 0.000247 0.0000018 0.0000104 0.001020 0.000083 1995 7 25 49923 0.285511 0.291446 -0.0966789 0.0007984 0.000031 0.000036 0.000157 0.000177 0.0000016 0.0000098 0.000071 0.000054 1995 7 26 49924 0.285308 0.287634 -0.0975102 0.0008565 0.000018 -0.000082 0.000161 0.000168 0.0000015 0.0000098 0.000266 0.000261 1995 7 27 49925 0.284534 0.283706 -0.0983644 0.0009329 0.000074 -0.000061 0.000191 0.000186 0.0000016 0.0000104 0.000317 0.000336 1995 7 28 49926 0.283521 0.279880 -0.0992719 0.0009894 0.000171 0.000079 0.000238 0.000224 0.0000017 0.0000104 0.000320 0.000366 1995 7 29 49927 0.282831 0.276112 -0.1002689 0.0010487 0.000271 0.000279 0.000236 0.000251 0.0000018 0.0000104 0.000322 0.000395 1995 7 30 49928 0.281153 0.273278 -0.1013910 0.0011607 0.000331 0.000459 0.000211 0.000248 0.0000019 0.0000104 0.000325 0.000425 1995 7 31 49929 0.280315 0.268955 -0.1026569 0.0013055 0.000311 0.000536 0.000225 0.000232 0.0000020 0.0000098 0.000327 0.000455 1995 8 1 49930 0.279395 0.264855 -0.1040530 0.0014153 0.000201 0.000465 0.000224 0.000244 0.0000021 0.0000098 0.000330 0.000485 1995 8 2 49931 0.279054 0.260847 -0.1055316 0.0014726 -0.000022 0.000130 0.000166 0.000186 0.0000022 0.0000098 0.000264 0.000272 1995 8 3 49932 0.278144 0.256757 -0.1070265 0.0014697 -0.000217 -0.000111 0.000155 0.000155 0.0000025 0.0000104 0.000272 0.000270 1995 8 4 49933 0.277507 0.252860 -0.1084772 0.0014002 -0.000335 -0.000224 0.000172 0.000179 0.0000030 0.0000111 0.000310 0.000357 1995 8 5 49934 0.276611 0.249247 -0.1098503 0.0013264 -0.000352 -0.000227 0.000191 0.000203 0.0000034 0.0000111 0.000348 0.000444 1995 8 6 49935 0.276046 0.244656 -0.1111495 0.0012869 -0.000271 -0.000146 0.000238 0.000266 0.0000038 0.0000104 0.000386 0.000531 1995 8 7 49936 0.274410 0.241805 -0.1124144 0.0013088 -0.000130 -0.000030 0.000300 0.000280 0.0000043 0.0000098 0.000424 0.000617 1995 8 8 49937 0.273436 0.237661 -0.1137095 0.0013820 0.000010 0.000081 0.000323 0.000262 0.0000047 0.0000104 0.000462 0.000703 1995 8 9 49938 0.272668 0.234035 -0.1151037 0.0014734 0.000170 0.000080 0.000236 0.000202 0.0000021 0.0000104 0.000286 0.000324 1995 8 10 49939 0.270274 0.230705 -0.1166426 0.0016133 0.000085 0.000174 0.000200 0.000191 0.0000059 0.0000104 0.000533 0.000537 1995 8 11 49940 0.269034 0.226746 -0.1183214 0.0017479 -0.000008 0.000230 0.000235 0.000245 0.0000072 0.0000104 0.000619 0.000624 1995 8 12 49941 0.267361 0.223462 -0.1200905 0.0018107 -0.000045 0.000225 0.000249 0.000281 0.0000062 0.0000098 0.000553 0.000548 1995 8 13 49942 0.266302 0.220095 -0.1218797 0.0017711 -0.000046 0.000189 0.000236 0.000283 0.0000051 0.0000098 0.000487 0.000471 1995 8 14 49943 0.264605 0.216424 -0.1236257 0.0016791 -0.000014 0.000135 0.000181 0.000207 0.0000041 0.0000098 0.000420 0.000395 1995 8 15 49944 0.262844 0.212972 -0.1252894 0.0015787 0.000024 0.000087 0.000153 0.000154 0.0000031 0.0000098 0.000354 0.000318 1995 8 16 49945 0.260083 0.209892 -0.1268569 0.0014966 0.000045 0.000058 0.000130 0.000124 0.0000021 0.0000098 0.000288 0.000242 1995 8 17 49946 0.257676 0.206200 -0.1283290 0.0014270 -0.000007 0.000084 0.000111 0.000099 0.0000017 0.0000098 0.000242 0.000222 1995 8 18 49947 0.255108 0.203568 -0.1297146 0.0013658 -0.000030 0.000077 0.000126 0.000121 0.0000016 0.0000098 0.000229 0.000217 1995 8 19 49948 0.253256 0.200177 -0.1310357 0.0013195 -0.000011 0.000027 0.000191 0.000195 0.0000016 0.0000098 0.000228 0.000210 1995 8 20 49949 0.251078 0.197372 -0.1323301 0.0013124 0.000022 -0.000035 0.000193 0.000181 0.0000015 0.0000098 0.000227 0.000203 1995 8 21 49950 0.248904 0.195152 -0.1336425 0.0013443 0.000052 -0.000083 0.000134 0.000135 0.0000014 0.0000092 0.000226 0.000196 1995 8 22 49951 0.247429 0.191983 -0.1350111 0.0013930 0.000059 -0.000088 0.000116 0.000130 0.0000013 0.0000092 0.000226 0.000189 1995 8 23 49952 0.245280 0.189103 -0.1364588 0.0014704 0.000048 -0.000039 0.000112 0.000106 0.0000012 0.0000098 0.000225 0.000182 1995 8 24 49953 0.242789 0.186301 -0.1379981 0.0015922 -0.000046 0.000087 0.000111 0.000097 0.0000011 0.0000098 0.000295 0.000282 1995 8 25 49954 0.240366 0.183600 -0.1396387 0.0017308 -0.000021 0.000191 0.000123 0.000105 0.0000010 0.0000098 0.000288 0.000293 1995 8 26 49955 0.238064 0.180316 -0.1414397 0.0018715 0.000092 0.000216 0.000144 0.000120 0.0000010 0.0000098 0.000317 0.000355 1995 8 27 49956 0.236040 0.177422 -0.1433915 0.0019829 0.000177 0.000198 0.000148 0.000129 0.0000010 0.0000098 0.000280 0.000297 1995 8 28 49957 0.233933 0.174801 -0.1454502 0.0020719 0.000139 0.000160 0.000119 0.000117 0.0000010 0.0000092 0.000241 0.000248 1995 8 29 49958 0.232042 0.172343 -0.1475894 0.0021237 0.000001 0.000092 0.000118 0.000103 0.0000010 0.0000086 0.000331 0.000397 1995 8 30 49959 0.230013 0.169652 -0.1497049 0.0021125 -0.000189 0.000034 0.000114 0.000093 0.0000012 0.0000086 0.000251 0.000256 1995 8 31 49960 0.227411 0.166878 -0.1517248 0.0020664 -0.000385 0.000059 0.000119 0.000090 0.0000101 0.0000092 0.000527 0.000430 1995 9 1 49961 0.224803 0.164180 -0.1536812 0.0019955 -0.000415 0.000164 0.000156 0.000108 0.0000126 0.0000098 0.000399 0.000329 1995 9 2 49962 0.221821 0.161725 -0.1556353 0.0019600 -0.000375 0.000216 0.000165 0.000120 0.0000105 0.0000098 0.000230 0.000200 1995 9 3 49963 0.219562 0.159233 -0.1576220 0.0019721 -0.000329 0.000177 0.000183 0.000177 0.0000083 0.0000098 0.000228 0.000201 1995 9 4 49964 0.217065 0.157152 -0.1596467 0.0020146 -0.000267 0.000097 0.000200 0.000235 0.0000062 0.0000092 0.000225 0.000202 1995 9 5 49965 0.215252 0.154724 -0.1617098 0.0020741 -0.000205 0.000021 0.000201 0.000230 0.0000041 0.0000086 0.000223 0.000204 1995 9 6 49966 0.212666 0.152928 -0.1638254 0.0021638 -0.000147 -0.000005 0.000169 0.000175 0.0000019 0.0000092 0.000220 0.000205 1995 9 7 49967 0.210147 0.151169 -0.1660150 0.0022417 -0.000084 0.000084 0.000139 0.000115 0.0000025 0.0000098 0.000191 0.000216 1995 9 8 49968 0.206621 0.148903 -0.1682883 0.0022976 -0.000017 0.000195 0.000191 0.000184 0.0000030 0.0000098 0.000194 0.000222 1995 9 9 49969 0.203830 0.146158 -0.1706194 0.0023374 0.000044 0.000281 0.000213 0.000241 0.0000029 0.0000098 0.000217 0.000225 1995 9 10 49970 0.200745 0.143492 -0.1729499 0.0023224 0.000093 0.000317 0.000217 0.000275 0.0000028 0.0000098 0.000240 0.000227 1995 9 11 49971 0.197272 0.141032 -0.1752167 0.0022128 0.000117 0.000280 0.000228 0.000281 0.0000026 0.0000098 0.000263 0.000230 1995 9 12 49972 0.193999 0.138363 -0.1773784 0.0020795 0.000111 0.000175 0.000197 0.000241 0.0000025 0.0000098 0.000286 0.000232 1995 9 13 49973 0.190978 0.135038 -0.1794273 0.0019677 0.000075 0.000025 0.000179 0.000221 0.0000024 0.0000098 0.000309 0.000235 1995 9 14 49974 0.188372 0.132960 -0.1813817 0.0018731 0.000018 -0.000130 0.000237 0.000270 0.0000022 0.0000104 0.000292 0.000222 1995 9 15 49975 0.185677 0.131006 -0.1832687 0.0018296 -0.000041 -0.000249 0.000281 0.000327 0.0000019 0.0000104 0.000261 0.000205 1995 9 16 49976 0.182840 0.128882 -0.1851123 0.0018341 -0.000081 -0.000300 0.000302 0.000362 0.0000017 0.0000104 0.000231 0.000187 1995 9 17 49977 0.179717 0.127490 -0.1869324 0.0018411 -0.000088 -0.000274 0.000304 0.000357 0.0000014 0.0000104 0.000200 0.000169 1995 9 18 49978 0.177253 0.126118 -0.1887547 0.0018654 -0.000061 -0.000186 0.000223 0.000241 0.0000011 0.0000104 0.000169 0.000152 1995 9 19 49979 0.174274 0.123476 -0.1906205 0.0019230 -0.000016 -0.000080 0.000134 0.000140 0.0000009 0.0000111 0.000139 0.000134 1995 9 20 49980 0.171205 0.121791 -0.1925848 0.0020450 0.000088 0.000087 0.000115 0.000103 0.0000015 0.0000117 0.000241 0.000225 1995 9 21 49981 0.168637 0.119620 -0.1947009 0.0022233 0.000072 0.000054 0.000134 0.000123 0.0000016 0.0000123 0.000249 0.000264 1995 9 22 49982 0.164803 0.118113 -0.1969888 0.0023963 0.000007 -0.000071 0.000136 0.000131 0.0000016 0.0000123 0.000220 0.000282 1995 9 23 49983 0.161844 0.116543 -0.1994348 0.0025256 0.000036 -0.000079 0.000163 0.000171 0.0000015 0.0000129 0.000213 0.000266 1995 9 24 49984 0.158013 0.114912 -0.2020107 0.0026053 0.000082 -0.000032 0.000198 0.000240 0.0000014 0.0000129 0.000208 0.000247 1995 9 25 49985 0.155274 0.113885 -0.2046752 0.0026608 0.000108 0.000045 0.000210 0.000250 0.0000014 0.0000123 0.000203 0.000227 1995 9 26 49986 0.152807 0.112856 -0.2073697 0.0026664 0.000089 0.000110 0.000191 0.000194 0.0000013 0.0000117 0.000198 0.000207 1995 9 27 49987 0.149581 0.110849 -0.2100208 0.0026032 -0.000060 0.000087 0.000159 0.000152 0.0000021 0.0000111 0.000272 0.000246 1995 9 28 49988 0.146912 0.110146 -0.2125608 0.0024883 -0.000141 0.000040 0.000162 0.000166 0.0000023 0.0000117 0.000278 0.000249 1995 9 29 49989 0.144031 0.109094 -0.2149688 0.0023736 -0.000150 -0.000006 0.000178 0.000190 0.0000022 0.0000117 0.000260 0.000238 1995 9 30 49990 0.140998 0.108119 -0.2172836 0.0023064 -0.000102 -0.000026 0.000215 0.000235 0.0000022 0.0000111 0.000241 0.000227 1995 10 1 49991 0.137704 0.107102 -0.2195805 0.0022990 -0.000023 0.000002 0.000270 0.000265 0.0000021 0.0000111 0.000222 0.000216 1995 10 2 49992 0.134396 0.105974 -0.2219302 0.0023681 0.000047 0.000065 0.000242 0.000248 0.0000020 0.0000111 0.000204 0.000204 1995 10 3 49993 0.130439 0.105089 -0.2243667 0.0024718 0.000076 0.000124 0.000146 0.000166 0.0000020 0.0000111 0.000185 0.000193 1995 10 4 49994 0.126530 0.103985 -0.2268829 0.0025673 0.000008 0.000247 0.000110 0.000105 0.0000015 0.0000111 0.000200 0.000198 1995 10 5 49995 0.122199 0.103226 -0.2294514 0.0026344 -0.000037 0.000105 0.000154 0.000146 0.0000013 0.0000111 0.000200 0.000209 1995 10 6 49996 0.119027 0.101997 -0.2320858 0.0026660 -0.000055 -0.000159 0.000174 0.000161 0.0000013 0.0000111 0.000193 0.000220 1995 10 7 49997 0.114622 0.100398 -0.2347961 0.0026630 -0.000063 -0.000263 0.000238 0.000208 0.0000015 0.0000111 0.000219 0.000248 1995 10 8 49998 0.110945 0.099369 -0.2375079 0.0026044 -0.000053 -0.000254 0.000278 0.000276 0.0000017 0.0000111 0.000248 0.000278 1995 10 9 49999 0.106336 0.097937 -0.2401079 0.0025083 -0.000035 -0.000150 0.000214 0.000244 0.0000018 0.0000098 0.000277 0.000308 1995 10 10 50000 0.102291 0.096084 -0.2425320 0.0024052 -0.000014 -0.000002 0.000195 0.000192 0.0000020 0.0000086 0.000306 0.000338 1995 10 11 50001 0.098190 0.094414 -0.2448095 0.0022580 -0.000011 0.000095 0.000175 0.000165 0.0000023 0.0000080 0.000290 0.000286 1995 10 12 50002 0.093813 0.093042 -0.2470295 0.0021017 0.000007 0.000132 0.000171 0.000169 0.0000056 0.0000080 0.000547 0.000463 1995 10 13 50003 0.090761 0.091379 -0.2490458 0.0019735 0.000042 0.000084 0.000149 0.000148 0.0000020 0.0000086 0.000245 0.000266 1995 10 14 50004 0.087627 0.090808 -0.2508813 0.0019150 0.000063 0.000023 0.000229 0.000324 0.0000013 0.0000086 0.000184 0.000211 1995 10 15 50005 0.084578 0.090684 -0.2526923 0.0019106 0.000072 -0.000036 0.000334 0.000441 0.0000013 0.0000086 0.000176 0.000191 1995 10 16 50006 0.081058 0.089495 -0.2546018 0.0019315 0.000067 -0.000071 0.000258 0.000285 0.0000012 0.0000080 0.000167 0.000171 1995 10 17 50007 0.076649 0.088972 -0.2566595 0.0020164 0.000049 -0.000069 0.000216 0.000227 0.0000012 0.0000074 0.000159 0.000150 1995 10 18 50008 0.073314 0.087413 -0.2588411 0.0021307 0.000024 -0.000034 0.000168 0.000161 0.0000011 0.0000080 0.000150 0.000130 1995 10 19 50009 0.069091 0.087172 -0.2610945 0.0022142 -0.000003 0.000019 0.000136 0.000134 0.0000013 0.0000080 0.000158 0.000133 1995 10 20 50010 0.066609 0.086078 -0.2633877 0.0022973 -0.000023 0.000070 0.000170 0.000174 0.0000015 0.0000074 0.000171 0.000143 1995 10 21 50011 0.064464 0.085861 -0.2657191 0.0024044 -0.000035 0.000103 0.000214 0.000200 0.0000017 0.0000074 0.000183 0.000154 1995 10 22 50012 0.062474 0.085193 -0.2680985 0.0024592 -0.000038 0.000107 0.000218 0.000222 0.0000020 0.0000074 0.000197 0.000164 1995 10 23 50013 0.059005 0.085318 -0.2705238 0.0024575 -0.000032 0.000081 0.000157 0.000176 0.0000022 0.0000074 0.000209 0.000175 1995 10 24 50014 0.055277 0.085523 -0.2729694 0.0024425 -0.000022 0.000034 0.000140 0.000155 0.0000024 0.0000074 0.000222 0.000185 1995 10 25 50015 0.051285 0.085031 -0.2753928 0.0024167 -0.000010 -0.000024 0.000129 0.000147 0.0000026 0.0000080 0.000224 0.000248 1995 10 26 50016 0.047011 0.084242 -0.2777548 0.0023550 -0.000004 -0.000053 0.000140 0.000140 0.0000024 0.0000086 0.000218 0.000253 1995 10 27 50017 0.042032 0.083616 -0.2800460 0.0022801 -0.000002 -0.000044 0.000198 0.000177 0.0000022 0.0000086 0.000209 0.000239 1995 10 28 50018 0.038542 0.082259 -0.2822974 0.0022520 -0.000002 -0.000003 0.000248 0.000222 0.0000019 0.0000086 0.000200 0.000224 1995 10 29 50019 0.034932 0.082379 -0.2845690 0.0022946 0.000001 0.000054 0.000303 0.000322 0.0000017 0.0000080 0.000191 0.000210 1995 10 30 50020 0.031671 0.081862 -0.2869264 0.0023987 0.000011 0.000099 0.000263 0.000301 0.0000014 0.0000074 0.000183 0.000195 1995 10 31 50021 0.028082 0.082723 -0.2894145 0.0025426 0.000032 0.000106 0.000163 0.000167 0.0000012 0.0000080 0.000173 0.000181 1995 11 1 50022 0.024690 0.082749 -0.2920403 0.0026923 0.000064 0.000056 0.000122 0.000110 0.0000010 0.0000092 0.000165 0.000166 1995 11 2 50023 0.021992 0.083071 -0.2947703 0.0027767 0.000104 -0.000057 0.000113 0.000114 0.0000010 0.0000104 0.000167 0.000167 1995 11 3 50024 0.018639 0.083401 -0.2975419 0.0027508 0.000147 -0.000204 0.000163 0.000145 0.0000011 0.0000111 0.000173 0.000173 1995 11 4 50025 0.015101 0.083483 -0.3002830 0.0026521 0.000185 -0.000344 0.000175 0.000156 0.0000012 0.0000111 0.000180 0.000179 1995 11 5 50026 0.011466 0.084109 -0.3029309 0.0025428 0.000212 -0.000425 0.000184 0.000246 0.0000013 0.0000111 0.000186 0.000185 1995 11 6 50027 0.007285 0.084275 -0.3054457 0.0024466 0.000222 -0.000411 0.000238 0.000307 0.0000015 0.0000111 0.000193 0.000191 1995 11 7 50028 0.003809 0.084926 -0.3078133 0.0023426 0.000217 -0.000289 0.000229 0.000257 0.0000016 0.0000111 0.000199 0.000197 1995 11 8 50029 0.000023 0.085188 -0.3100427 0.0022350 0.000198 -0.000082 0.000146 0.000162 0.0000017 0.0000111 0.000205 0.000203 1995 11 9 50030 -0.003797 0.085686 -0.3121589 0.0021142 0.000173 0.000176 0.000157 0.000127 0.0000018 0.0000117 0.000226 0.000196 1995 11 10 50031 -0.007410 0.085694 -0.3141957 0.0020087 0.000149 0.000381 0.000234 0.000180 0.0000018 0.0000117 0.000252 0.000186 1995 11 11 50032 -0.011188 0.085719 -0.3161912 0.0019612 0.000134 0.000423 0.000248 0.000182 0.0000019 0.0000117 0.000255 0.000194 1995 11 12 50033 -0.015297 0.086743 -0.3181868 0.0019997 0.000131 0.000311 0.000280 0.000224 0.0000019 0.0000111 0.000242 0.000215 1995 11 13 50034 -0.018720 0.086762 -0.3202300 0.0020722 0.000139 0.000137 0.000261 0.000253 0.0000020 0.0000098 0.000229 0.000235 1995 11 14 50035 -0.022288 0.087516 -0.3223736 0.0022103 0.000150 -0.000020 0.000216 0.000189 0.0000021 0.0000098 0.000216 0.000256 1995 11 15 50036 -0.025318 0.087994 -0.3246658 0.0024040 0.000173 -0.000025 0.000167 0.000128 0.0000013 0.0000098 0.000170 0.000185 1995 11 16 50037 -0.028737 0.089604 -0.3271341 0.0025773 0.000156 -0.000006 0.000204 0.000164 0.0000013 0.0000098 0.000119 0.000119 1995 11 17 50038 -0.033283 0.090829 -0.3297719 0.0026838 0.000117 0.000030 0.000199 0.000167 0.0000016 0.0000098 0.000066 0.000055 1995 11 18 50039 -0.037285 0.092112 -0.3325422 0.0027716 0.000090 0.000056 0.000169 0.000160 0.0000019 0.0000098 0.000090 0.000087 1995 11 19 50040 -0.041845 0.093423 -0.3353931 0.0028476 0.000065 0.000065 0.000232 0.000268 0.0000022 0.0000098 0.000119 0.000128 1995 11 20 50041 -0.045655 0.094943 -0.3382721 0.0028790 0.000042 0.000056 0.000221 0.000266 0.0000025 0.0000098 0.000150 0.000169 1995 11 21 50042 -0.050110 0.096086 -0.3411329 0.0028408 0.000020 0.000038 0.000163 0.000164 0.0000027 0.0000098 0.000180 0.000210 1995 11 22 50043 -0.054046 0.097167 -0.3439385 0.0027622 -0.000011 0.000039 0.000122 0.000126 0.0000021 0.0000104 0.000196 0.000218 1995 11 23 50044 -0.058799 0.097602 -0.3466689 0.0026796 -0.000017 0.000016 0.000162 0.000159 0.0000019 0.0000111 0.000233 0.000245 1995 11 24 50045 -0.061790 0.098890 -0.3493299 0.0026527 0.000003 -0.000025 0.000237 0.000263 0.0000018 0.0000111 0.000278 0.000279 1995 11 25 50046 -0.065589 0.100798 -0.3519555 0.0026792 0.000042 -0.000082 0.000469 0.000539 0.0000016 0.0000111 0.000323 0.000313 1995 11 26 50047 -0.068360 0.101643 -0.3545944 0.0027031 0.000087 -0.000142 0.000599 0.000686 0.0000015 0.0000111 0.000368 0.000347 1995 11 27 50048 -0.071715 0.103272 -0.3572883 0.0027265 0.000121 -0.000188 0.000365 0.000465 0.0000014 0.0000117 0.000413 0.000381 1995 11 28 50049 -0.076042 0.105983 -0.3600535 0.0027669 0.000126 -0.000195 0.000250 0.000269 0.0000013 0.0000117 0.000457 0.000415 1995 11 29 50050 -0.079804 0.106651 -0.3628755 0.0028088 0.000096 -0.000157 0.000214 0.000169 0.0000012 0.0000111 0.000239 0.000258 1995 11 30 50051 -0.084986 0.109439 -0.3657166 0.0027811 0.000016 -0.000039 0.000232 0.000165 0.0000012 0.0000117 0.000183 0.000216 1995 12 1 50052 -0.090100 0.110284 -0.3685268 0.0026998 -0.000090 0.000133 0.000668 0.000223 0.0000013 0.0000117 0.000181 0.000214 1995 12 2 50053 -0.094799 0.112442 -0.3712530 0.0026134 -0.000188 0.000311 0.001132 0.000286 0.0000014 0.0000111 0.000178 0.000211 1995 12 3 50054 -0.099607 0.113882 -0.3738467 0.0025193 -0.000244 0.000443 0.000817 0.000325 0.0000014 0.0000111 0.000176 0.000209 1995 12 4 50055 -0.104162 0.115633 -0.3762774 0.0024075 -0.000235 0.000487 0.000352 0.000284 0.0000015 0.0000104 0.000174 0.000207 1995 12 5 50056 -0.109099 0.117824 -0.3785471 0.0022862 -0.000163 0.000422 0.000317 0.000210 0.0000016 0.0000098 0.000172 0.000204 1995 12 6 50057 -0.112851 0.119215 -0.3806953 0.0021735 -0.000056 0.000267 0.000213 0.000131 0.0000016 0.0000098 0.000170 0.000202 1995 12 7 50058 -0.116347 0.121754 -0.3827837 0.0021010 0.000119 0.000021 0.000176 0.000153 0.0000018 0.0000098 0.000162 0.000136 1995 12 8 50059 -0.119882 0.123082 -0.3848678 0.0020774 0.000125 -0.000143 0.000163 0.000141 0.0000020 0.0000104 0.000165 0.000175 1995 12 9 50060 -0.122418 0.125905 -0.3869801 0.0021165 0.000073 -0.000201 0.000134 0.000127 0.0000020 0.0000111 0.000165 0.000210 1995 12 10 50061 -0.125565 0.127265 -0.3891389 0.0021944 0.000049 -0.000184 0.000187 0.000184 0.0000017 0.0000111 0.000161 0.000196 1995 12 11 50062 -0.128432 0.129604 -0.3913656 0.0022821 0.000039 -0.000121 0.000188 0.000179 0.0000014 0.0000111 0.000156 0.000182 1995 12 12 50063 -0.132151 0.131247 -0.3936905 0.0023796 0.000053 -0.000061 0.000214 0.000215 0.0000012 0.0000104 0.000150 0.000168 1995 12 13 50064 -0.136076 0.133875 -0.3961360 0.0024919 0.000083 -0.000042 0.000181 0.000185 0.0000009 0.0000098 0.000145 0.000154 1995 12 14 50065 -0.138797 0.136407 -0.3986939 0.0025868 0.000112 -0.000111 0.000135 0.000112 0.0000013 0.0000098 0.000237 0.000260 1995 12 15 50066 -0.140658 0.139319 -0.4013204 0.0026281 0.000112 -0.000169 0.000157 0.000121 0.0000017 0.0000098 0.000268 0.000303 1995 12 16 50067 -0.143315 0.142242 -0.4039688 0.0026299 0.000080 -0.000187 0.000159 0.000130 0.0000021 0.0000098 0.000252 0.000293 1995 12 17 50068 -0.145590 0.145940 -0.4066150 0.0026422 0.000033 -0.000168 0.000257 0.000220 0.0000024 0.0000098 0.000236 0.000284 1995 12 18 50069 -0.147339 0.149203 -0.4092526 0.0026512 -0.000008 -0.000122 0.000351 0.000298 0.0000028 0.0000098 0.000220 0.000274 1995 12 19 50070 -0.150358 0.152454 -0.4118749 0.0026243 -0.000025 -0.000067 0.000297 0.000234 0.0000031 0.0000098 0.000204 0.000265 1995 12 20 50071 -0.152571 0.154522 -0.4144622 0.0025608 0.000007 -0.000040 0.000199 0.000146 0.0000024 0.0000098 0.000222 0.000247 1995 12 21 50072 -0.155302 0.157918 -0.4169915 0.0024487 0.000053 -0.000031 0.000146 0.000128 0.0000021 0.0000104 0.000219 0.000234 1995 12 22 50073 -0.157197 0.160002 -0.4194689 0.0023797 0.000104 -0.000043 0.000191 0.000146 0.0000019 0.0000111 0.000210 0.000223 1995 12 23 50074 -0.159298 0.164221 -0.4219405 0.0024639 0.000147 -0.000071 0.000332 0.000278 0.0000017 0.0000111 0.000200 0.000211 1995 12 24 50075 -0.160613 0.167052 -0.4244700 0.0026256 0.000171 -0.000100 0.000440 0.000553 0.0000016 0.0000104 0.000191 0.000200 1995 12 25 50076 -0.162358 0.171370 -0.4271008 0.0027624 0.000170 -0.000118 0.000537 0.000750 0.0000014 0.0000098 0.000181 0.000188 1995 12 26 50077 -0.164704 0.174752 -0.4298283 0.0028150 0.000144 -0.000114 0.000589 0.000752 0.0000012 0.0000098 0.000172 0.000177 1995 12 27 50078 -0.166496 0.177582 -0.4325980 0.0027693 0.000101 -0.000082 0.000336 0.000405 0.0000011 0.0000092 0.000162 0.000166 1995 12 28 50079 -0.168731 0.180776 -0.4353287 0.0026617 0.000050 -0.000025 0.000126 0.000113 0.0000011 0.0000092 0.000167 0.000169 1995 12 29 50080 -0.170656 0.183428 -0.4379413 0.0025158 0.000001 0.000049 0.000144 0.000153 0.0000012 0.0000098 0.000177 0.000178 1995 12 30 50081 -0.172582 0.185999 -0.4403801 0.0023337 -0.000036 0.000126 0.000192 0.000181 0.0000013 0.0000104 0.000186 0.000187 1995 12 31 50082 -0.174334 0.188903 -0.4426184 0.0021438 -0.000053 0.000193 0.000580 0.000694 0.0000014 0.0000111 0.000196 0.000196 1996 1 1 50083 -0.176546 0.192471 0.5553455 0.0019329 -0.000048 0.000233 0.000891 0.001159 0.0000015 0.0000104 0.000205 0.000205 1996 1 2 50084 -0.177034 0.194573 0.5534949 0.0017638 -0.000020 0.000237 0.000716 0.000670 0.0000016 0.0000098 0.000215 0.000214 1996 1 3 50085 -0.178624 0.197570 0.5517970 0.0016473 0.000025 0.000204 0.000365 0.000175 0.0000017 0.0000092 0.000224 0.000223 1996 1 4 50086 -0.178984 0.200715 0.5502036 0.0015653 0.000082 0.000138 0.000197 0.000163 0.0000017 0.0000092 0.000224 0.000220 1996 1 5 50087 -0.180632 0.203748 0.5486539 0.0015330 0.000138 0.000051 0.000300 0.000202 0.0000016 0.0000098 0.000220 0.000213 1996 1 6 50088 -0.181898 0.207003 0.5470846 0.0015656 0.000184 -0.000039 0.000662 0.000452 0.0000015 0.0000104 0.000216 0.000206 1996 1 7 50089 -0.183809 0.210916 0.5454435 0.0016699 0.000211 -0.000115 0.000624 0.000470 0.0000014 0.0000104 0.000212 0.000200 1996 1 8 50090 -0.185767 0.214131 0.5437029 0.0018008 0.000212 -0.000163 0.000259 0.000205 0.0000013 0.0000098 0.000208 0.000193 1996 1 9 50091 -0.186845 0.216307 0.5418625 0.0019164 0.000185 -0.000172 0.000217 0.000140 0.0000012 0.0000098 0.000204 0.000186 1996 1 10 50092 -0.188927 0.218768 0.5399425 0.0019826 0.000138 -0.000145 0.000159 0.000094 0.0000011 0.0000098 0.000200 0.000179 1996 1 11 50093 -0.190414 0.221089 0.5379688 0.0019994 0.000076 -0.000089 0.000134 0.000083 0.0000012 0.0000098 0.000206 0.000184 1996 1 12 50094 -0.192751 0.224349 0.5359638 0.0019869 0.000015 -0.000023 0.000143 0.000095 0.0000014 0.0000098 0.000215 0.000193 1996 1 13 50095 -0.194850 0.227291 0.5339455 0.0019798 -0.000031 0.000028 0.000168 0.000115 0.0000015 0.0000098 0.000225 0.000202 1996 1 14 50096 -0.196509 0.230438 0.5319353 0.0019615 -0.000048 0.000043 0.000269 0.000292 0.0000017 0.0000092 0.000235 0.000211 1996 1 15 50097 -0.198480 0.232974 0.5299625 0.0019269 -0.000029 0.000006 0.000290 0.000372 0.0000019 0.0000086 0.000244 0.000220 1996 1 16 50098 -0.199886 0.236194 0.5280565 0.0018989 0.000026 -0.000086 0.000220 0.000263 0.0000020 0.0000086 0.000254 0.000229 1996 1 17 50099 -0.200664 0.238369 0.5262274 0.0018524 0.000108 -0.000222 0.000171 0.000190 0.0000022 0.0000086 0.000263 0.000238 1996 1 18 50100 -0.202538 0.241908 0.5244512 0.0017967 0.000202 -0.000380 0.000209 0.000170 0.0000024 0.0000086 0.000271 0.000239 1996 1 19 50101 -0.203559 0.244984 0.5226718 0.0017816 0.000284 -0.000519 0.000352 0.000328 0.0000026 0.0000092 0.000279 0.000236 1996 1 20 50102 -0.205145 0.249442 0.5208248 0.0018338 0.000329 -0.000601 0.000375 0.000378 0.0000028 0.0000098 0.000286 0.000234 1996 1 21 50103 -0.206628 0.252910 0.5188690 0.0019696 0.000326 -0.000597 0.000300 0.000291 0.0000030 0.0000098 0.000294 0.000231 1996 1 22 50104 -0.208034 0.256245 0.5168081 0.0021161 0.000272 -0.000502 0.000246 0.000280 0.0000032 0.0000092 0.000302 0.000229 1996 1 23 50105 -0.210207 0.259819 0.5146879 0.0021621 0.000185 -0.000341 0.000188 0.000205 0.0000034 0.0000086 0.000309 0.000227 1996 1 24 50106 -0.211200 0.262997 0.5125748 0.0021136 0.000053 -0.000123 0.000161 0.000132 0.0000023 0.0000086 0.000264 0.000225 1996 1 25 50107 -0.212290 0.266984 0.5105311 0.0020004 -0.000004 0.000020 0.000182 0.000133 0.0000021 0.0000092 0.000300 0.000244 1996 1 26 50108 -0.213059 0.270332 0.5086021 0.0018564 -0.000010 0.000071 0.000196 0.000146 0.0000021 0.0000092 0.000364 0.000269 1996 1 27 50109 -0.214094 0.274488 0.5068105 0.0017284 -0.000022 0.000047 0.000227 0.000195 0.0000018 0.0000092 0.000313 0.000233 1996 1 28 50110 -0.215107 0.277980 0.5051565 0.0015995 -0.000015 -0.000033 0.000331 0.000345 0.0000015 0.0000092 0.000251 0.000192 1996 1 29 50111 -0.216874 0.281431 0.5036237 0.0014817 0.000016 -0.000132 0.000316 0.000333 0.0000012 0.0000086 0.000190 0.000150 1996 1 30 50112 -0.218582 0.285093 0.5021849 0.0014043 0.000069 -0.000215 0.000172 0.000158 0.0000009 0.0000086 0.000129 0.000109 1996 1 31 50113 -0.220139 0.288640 0.5008028 0.0013717 0.000168 -0.000242 0.000102 0.000115 0.0000014 0.0000086 0.000262 0.000239 1996 2 1 50114 -0.220780 0.291891 0.4994282 0.0013944 0.000241 -0.000261 0.000126 0.000139 0.0000017 0.0000092 0.000311 0.000280 1996 2 2 50115 -0.222039 0.296085 0.4980044 0.0014704 0.000289 -0.000268 0.000147 0.000174 0.0000017 0.0000092 0.000324 0.000285 1996 2 3 50116 -0.222065 0.299700 0.4964796 0.0016000 0.000310 -0.000257 0.000206 0.000267 0.0000018 0.0000086 0.000338 0.000291 1996 2 4 50117 -0.222209 0.304041 0.4948238 0.0017296 0.000304 -0.000229 0.000400 0.000356 0.0000019 0.0000086 0.000352 0.000296 1996 2 5 50118 -0.222439 0.307443 0.4930362 0.0018266 0.000261 -0.000185 0.000432 0.000339 0.0000020 0.0000080 0.000365 0.000302 1996 2 6 50119 -0.222621 0.311514 0.4911334 0.0019346 0.000168 -0.000136 0.000269 0.000243 0.0000021 0.0000074 0.000379 0.000308 1996 2 7 50120 -0.223381 0.314566 0.4891316 0.0020466 0.000101 -0.000055 0.000166 0.000148 0.0000011 0.0000080 0.000218 0.000198 1996 2 8 50121 -0.224426 0.318393 0.4870437 0.0021358 -0.000128 -0.000071 0.000188 0.000166 0.0000012 0.0000092 0.000154 0.000185 1996 2 9 50122 -0.225368 0.321419 0.4848984 0.0021739 -0.000449 -0.000112 0.000246 0.000236 0.0000018 0.0000092 0.000167 0.000206 1996 2 10 50123 -0.225366 0.324103 0.4827486 0.0021385 -0.000632 -0.000162 0.000321 0.000286 0.0000023 0.0000086 0.000211 0.000229 1996 2 11 50124 -0.224651 0.326908 0.4806489 0.0020549 -0.000528 -0.000214 0.000373 0.000277 0.0000028 0.0000080 0.000278 0.000257 1996 2 12 50125 -0.223422 0.329251 0.4786235 0.0019783 -0.000299 -0.000238 0.000286 0.000256 0.0000033 0.0000074 0.000345 0.000284 1996 2 13 50126 -0.221938 0.332461 0.4766586 0.0019323 -0.000021 -0.000217 0.000200 0.000215 0.0000038 0.0000074 0.000412 0.000312 1996 2 14 50127 -0.220627 0.335881 0.4747232 0.0019254 -0.000025 -0.000158 0.000150 0.000136 0.0000026 0.0000074 0.000339 0.000278 1996 2 15 50128 -0.220058 0.339877 0.4727850 0.0019727 0.000228 -0.000037 0.000135 0.000119 0.0000021 0.0000080 0.000376 0.000350 1996 2 16 50129 -0.218910 0.344007 0.4707951 0.0020897 0.000551 0.000094 0.000140 0.000131 0.0000019 0.0000086 0.000454 0.000458 1996 2 17 50130 -0.218903 0.348998 0.4686867 0.0022559 0.000672 0.000173 0.000196 0.000228 0.0000018 0.0000092 0.000421 0.000422 1996 2 18 50131 -0.218681 0.353522 0.4664044 0.0024015 0.000658 0.000197 0.000259 0.000268 0.0000017 0.0000092 0.000379 0.000374 1996 2 19 50132 -0.219989 0.357638 0.4639407 0.0025108 0.000532 0.000171 0.000303 0.000271 0.0000017 0.0000086 0.000336 0.000325 1996 2 20 50133 -0.220785 0.361524 0.4613524 0.0025841 0.000350 0.000113 0.000362 0.000444 0.0000016 0.0000086 0.000293 0.000276 1996 2 21 50134 -0.221025 0.364496 0.4587423 0.0025670 0.000176 0.000048 0.000283 0.000370 0.0000015 0.0000086 0.000250 0.000228 1996 2 22 50135 -0.221442 0.367377 0.4562172 0.0024426 0.000086 0.000005 0.000275 0.000266 0.0000012 0.0000092 0.000182 0.000168 1996 2 23 50136 -0.221111 0.370354 0.4538514 0.0022441 0.000061 -0.000016 0.000228 0.000232 0.0000007 0.0000092 0.000106 0.000104 1996 2 24 50137 -0.221647 0.374846 0.4516730 0.0020474 0.000040 -0.000030 0.000202 0.000199 0.0000010 0.0000092 0.000134 0.000130 1996 2 25 50138 -0.220576 0.378974 0.4496727 0.0019055 0.000023 -0.000044 0.000273 0.000320 0.0000014 0.0000092 0.000171 0.000164 1996 2 26 50139 -0.220712 0.383811 0.4478167 0.0018370 -0.000002 -0.000068 0.000196 0.000290 0.0000018 0.0000086 0.000208 0.000199 1996 2 27 50140 -0.220041 0.387172 0.4460558 0.0017959 -0.000034 -0.000105 0.000161 0.000207 0.0000022 0.0000092 0.000245 0.000233 1996 2 28 50141 -0.219791 0.391103 0.4443312 0.0017646 -0.000063 -0.000152 0.000154 0.000156 0.0000026 0.0000098 0.000282 0.000268 1996 2 29 50142 -0.218901 0.394594 0.4425798 0.0018044 -0.000075 -0.000200 0.000142 0.000138 0.0000027 0.0000098 0.000282 0.000262 1996 3 1 50143 -0.217996 0.398661 0.4407402 0.0019130 -0.000068 -0.000228 0.000186 0.000162 0.0000027 0.0000098 0.000269 0.000242 1996 3 2 50144 -0.215924 0.402316 0.4387624 0.0020328 -0.000051 -0.000225 0.000224 0.000210 0.0000027 0.0000104 0.000257 0.000222 1996 3 3 50145 -0.214580 0.407061 0.4366190 0.0021887 -0.000032 -0.000186 0.000284 0.000295 0.0000027 0.0000104 0.000245 0.000203 1996 3 4 50146 -0.212782 0.411039 0.4343126 0.0023539 -0.000018 -0.000124 0.000327 0.000323 0.0000026 0.0000098 0.000232 0.000183 1996 3 5 50147 -0.210420 0.414899 0.4318754 0.0024760 -0.000012 -0.000070 0.000224 0.000216 0.0000026 0.0000098 0.000220 0.000164 1996 3 6 50148 -0.208746 0.419366 0.4293540 0.0025620 -0.000028 0.000033 0.000133 0.000127 0.0000013 0.0000098 0.000181 0.000157 1996 3 7 50149 -0.206643 0.423285 0.4267843 0.0026027 -0.000007 -0.000083 0.000107 0.000095 0.0000010 0.0000104 0.000162 0.000161 1996 3 8 50150 -0.205738 0.427079 0.4241170 0.0026148 0.000035 -0.000199 0.000148 0.000151 0.0000014 0.0000111 0.000176 0.000180 1996 3 9 50151 -0.203932 0.430513 0.4213794 0.0025996 0.000084 -0.000255 0.000216 0.000220 0.0000020 0.0000111 0.000204 0.000205 1996 3 10 50152 -0.202721 0.434237 0.4187273 0.0025591 0.000115 -0.000267 0.000217 0.000243 0.0000026 0.0000111 0.000232 0.000230 1996 3 11 50153 -0.201704 0.437633 0.4162988 0.0024852 0.000105 -0.000234 0.000165 0.000197 0.0000032 0.0000111 0.000259 0.000256 1996 3 12 50154 -0.199564 0.440931 0.4140621 0.0023607 0.000042 -0.000181 0.000173 0.000168 0.0000036 0.0000111 0.000278 0.000272 1996 3 13 50155 -0.198160 0.444347 0.4117823 0.0022345 -0.000054 -0.000156 0.000161 0.000155 0.0000023 0.0000111 0.000235 0.000219 1996 3 14 50156 -0.196850 0.448171 0.4092119 0.0021742 -0.000235 -0.000107 0.000153 0.000162 0.0053471 0.0000117 0.001336 0.001508 1996 3 15 50157 -0.195148 0.451693 0.4065205 0.0021889 -0.000347 -0.000101 0.000205 0.000203 0.0068415 0.0000117 0.001650 0.001874 1996 3 16 50158 -0.192973 0.454834 0.4040141 0.0022669 -0.000352 -0.000144 0.000220 0.000191 0.0055392 0.0000111 0.001382 0.001559 1996 3 17 50159 -0.191245 0.458532 0.4018052 0.0023550 -0.000280 -0.000202 0.000239 0.000251 0.0042369 0.0000104 0.001115 0.001244 1996 3 18 50160 -0.188217 0.462007 0.3997841 0.0023871 -0.000166 -0.000250 0.000222 0.000251 0.0029346 0.0000104 0.000849 0.000929 1996 3 19 50161 -0.185183 0.465775 0.3977402 0.0024135 -0.000067 -0.000261 0.000171 0.000165 0.0016323 0.0000104 0.000582 0.000614 1996 3 20 50162 -0.181888 0.470358 0.3955291 0.0024325 -0.000034 -0.000221 0.000127 0.000124 0.0003300 0.0000098 0.000315 0.000299 1996 3 21 50163 -0.178862 0.474710 0.3931632 0.0023761 -0.000082 -0.000125 0.000100 0.000107 0.0000018 0.0000092 0.000187 0.000143 1996 3 22 50164 -0.176736 0.478562 0.3907996 0.0022516 -0.000244 -0.000021 0.000156 0.000154 0.0000019 0.0000092 0.000219 0.000157 1996 3 23 50165 -0.174953 0.481863 0.3885834 0.0021199 -0.000450 0.000056 0.000248 0.000232 0.0000020 0.0000092 0.000309 0.000231 1996 3 24 50166 -0.173443 0.484278 0.3865530 0.0020042 -0.000602 0.000086 0.000267 0.000241 0.0000022 0.0000092 0.000399 0.000305 1996 3 25 50167 -0.170912 0.487521 0.3846579 0.0018982 -0.000637 0.000067 0.000203 0.000211 0.0000024 0.0000098 0.000489 0.000378 1996 3 26 50168 -0.168389 0.489758 0.3828157 0.0018510 -0.000552 0.000021 0.000182 0.000228 0.0000025 0.0000092 0.000579 0.000452 1996 3 27 50169 -0.165871 0.493091 0.3809641 0.0018605 -0.000172 -0.000055 0.000172 0.000181 0.0000015 0.0000086 0.000288 0.000249 1996 3 28 50170 -0.162660 0.495501 0.3790825 0.0018987 -0.000169 -0.000031 0.000126 0.000101 0.0000023 0.0000086 0.000190 0.000213 1996 3 29 50171 -0.159794 0.498745 0.3771342 0.0019696 -0.000224 0.000063 0.000177 0.000167 0.0000026 0.0000086 0.000192 0.000224 1996 3 30 50172 -0.156975 0.501551 0.3750814 0.0020446 -0.000248 0.000189 0.000227 0.000228 0.0000024 0.0000086 0.000197 0.000219 1996 3 31 50173 -0.154804 0.504350 0.3729128 0.0021726 -0.000272 0.000305 0.000307 0.000331 0.0000021 0.0000086 0.000201 0.000215 1996 4 1 50174 -0.152069 0.507846 0.3706421 0.0023240 -0.000269 0.000362 0.000363 0.000397 0.0000019 0.0000086 0.000206 0.000211 1996 4 2 50175 -0.149552 0.510488 0.3682962 0.0024400 -0.000245 0.000326 0.000331 0.000363 0.0000016 0.0000080 0.000210 0.000206 1996 4 3 50176 -0.147324 0.513357 0.3658977 0.0024975 -0.000220 0.000194 0.000240 0.000254 0.0000014 0.0000080 0.000215 0.000202 1996 4 4 50177 -0.145606 0.515489 0.3634578 0.0025106 -0.000224 -0.000034 0.000238 0.000224 0.0000068 0.0000086 0.000564 0.000400 1996 4 5 50178 -0.143999 0.517540 0.3609828 0.0024867 -0.000265 -0.000241 0.000356 0.000360 0.0000083 0.0000086 0.000696 0.000488 1996 4 6 50179 -0.141917 0.519547 0.3584963 0.0024289 -0.000326 -0.000374 0.000483 0.000523 0.0000069 0.0000086 0.000661 0.000488 1996 4 7 50180 -0.139919 0.520551 0.3560428 0.0023924 -0.000380 -0.000414 0.000462 0.000523 0.0000055 0.0000086 0.000627 0.000487 1996 4 8 50181 -0.138007 0.522913 0.3536639 0.0023367 -0.000396 -0.000363 0.000290 0.000317 0.0000041 0.0000080 0.000592 0.000486 1996 4 9 50182 -0.135186 0.525205 0.3513688 0.0022768 -0.000359 -0.000250 0.000239 0.000226 0.0000028 0.0000080 0.000558 0.000485 1996 4 10 50183 -0.132135 0.528015 0.3491200 0.0022817 -0.000248 -0.000116 0.000187 0.000170 0.0000014 0.0000086 0.000276 0.000253 1996 4 11 50184 -0.129258 0.530717 0.3468487 0.0023431 -0.000129 -0.000008 0.000185 0.000149 0.0000013 0.0000092 0.000214 0.000208 1996 4 12 50185 -0.126698 0.533707 0.3444892 0.0024291 -0.000025 0.000055 0.000239 0.000191 0.0000017 0.0000092 0.000232 0.000232 1996 4 13 50186 -0.123671 0.536744 0.3420121 0.0025324 0.000044 0.000071 0.000239 0.000209 0.0000020 0.0000092 0.000249 0.000257 1996 4 14 50187 -0.120328 0.539190 0.3394368 0.0025969 0.000067 0.000051 0.000263 0.000293 0.0000024 0.0000092 0.000267 0.000282 1996 4 15 50188 -0.116105 0.541688 0.3368213 0.0025491 0.000046 0.000018 0.000241 0.000288 0.0000028 0.0000086 0.000285 0.000306 1996 4 16 50189 -0.112680 0.544385 0.3342387 0.0025089 -0.000007 -0.000010 0.000175 0.000187 0.0000032 0.0000104 0.000303 0.000331 1996 4 17 50190 -0.109509 0.547018 0.3317546 0.0024273 -0.000073 -0.000008 0.000150 0.000154 0.0000024 0.0000104 0.000265 0.000295 1996 4 18 50191 -0.106474 0.549343 0.3294112 0.0022784 -0.000124 0.000003 0.000154 0.000166 0.0000021 0.0000086 0.000248 0.000274 1996 4 19 50192 -0.103565 0.551722 0.3272195 0.0021301 -0.000148 0.000020 0.000167 0.000204 0.0000020 0.0000086 0.000239 0.000259 1996 4 20 50193 -0.101103 0.553948 0.3251609 0.0020285 -0.000142 0.000037 0.000174 0.000229 0.0000018 0.0000086 0.000230 0.000244 1996 4 21 50194 -0.097776 0.556095 0.3231954 0.0019750 -0.000114 0.000044 0.000201 0.000262 0.0000017 0.0000086 0.000221 0.000229 1996 4 22 50195 -0.094596 0.558032 0.3212770 0.0019213 -0.000078 0.000041 0.000206 0.000242 0.0000015 0.0000086 0.000212 0.000214 1996 4 23 50196 -0.091251 0.559752 0.3193675 0.0018977 -0.000053 0.000030 0.000189 0.000201 0.0000014 0.0000086 0.000203 0.000199 1996 4 24 50197 -0.088007 0.561911 0.3174416 0.0019267 -0.000055 0.000016 0.000144 0.000142 0.0000012 0.0000092 0.000194 0.000184 1996 4 25 50198 -0.084012 0.563345 0.3154805 0.0019871 -0.000045 0.000019 0.000133 0.000123 0.0000015 0.0000098 0.000330 0.000266 1996 4 26 50199 -0.080936 0.564495 0.3134611 0.0020666 -0.000153 0.000006 0.000193 0.000206 0.0000017 0.0000098 0.000266 0.000205 1996 4 27 50200 -0.076705 0.566021 0.3113520 0.0021915 -0.000194 0.000025 0.000249 0.000303 0.0000017 0.0000098 0.000199 0.000157 1996 4 28 50201 -0.072416 0.567387 0.3091220 0.0023079 -0.000123 0.000081 0.000246 0.000274 0.0000017 0.0000098 0.000218 0.000183 1996 4 29 50202 -0.068046 0.569913 0.3067555 0.0024052 -0.000043 0.000127 0.000205 0.000197 0.0000018 0.0000092 0.000238 0.000209 1996 4 30 50203 -0.063903 0.572215 0.3042630 0.0025035 -0.000007 0.000143 0.000250 0.000211 0.0000018 0.0000092 0.000258 0.000235 1996 5 1 50204 -0.059776 0.574531 0.3016796 0.0025904 -0.000031 0.000128 0.000231 0.000182 0.0000019 0.0000098 0.000278 0.000261 1996 5 2 50205 -0.056376 0.576544 0.2990551 0.0026189 -0.000246 0.000023 0.000159 0.000139 0.0000019 0.0000098 0.000375 0.000288 1996 5 3 50206 -0.053417 0.577915 0.2964423 0.0025799 -0.000259 0.000020 0.000207 0.000179 0.0000020 0.0000098 0.000412 0.000303 1996 5 4 50207 -0.049635 0.579902 0.2938871 0.0025025 -0.000061 0.000112 0.000242 0.000241 0.0000022 0.0000098 0.000406 0.000310 1996 5 5 50208 -0.045761 0.580799 0.2914173 0.0024151 0.000185 0.000208 0.000233 0.000250 0.0000024 0.0000092 0.000400 0.000318 1996 5 6 50209 -0.041636 0.581982 0.2890316 0.0023353 0.000343 0.000234 0.000224 0.000233 0.0000025 0.0000086 0.000394 0.000326 1996 5 7 50210 -0.038205 0.583506 0.2866973 0.0023301 0.000306 0.000146 0.000200 0.000208 0.0000027 0.0000086 0.000388 0.000333 1996 5 8 50211 -0.033679 0.584603 0.2843599 0.0023784 -0.000153 -0.000158 0.000179 0.000171 0.0000029 0.0000086 0.000310 0.000369 1996 5 9 50212 -0.029505 0.585987 0.2819638 0.0024541 -0.000530 -0.000378 0.000172 0.000163 0.0000028 0.0000092 0.000286 0.000365 1996 5 10 50213 -0.024742 0.587200 0.2794731 0.0025607 -0.000776 -0.000481 0.000195 0.000171 0.0000026 0.0000098 0.000279 0.000346 1996 5 11 50214 -0.020909 0.588219 0.2768848 0.0026873 -0.000863 -0.000458 0.000241 0.000202 0.0000024 0.0000098 0.000272 0.000328 1996 5 12 50215 -0.016043 0.589187 0.2742284 0.0027130 -0.000791 -0.000332 0.000269 0.000229 0.0000022 0.0000098 0.000266 0.000310 1996 5 13 50216 -0.011924 0.589935 0.2715563 0.0026752 -0.000606 -0.000166 0.000240 0.000199 0.0000020 0.0000098 0.000259 0.000291 1996 5 14 50217 -0.007134 0.591203 0.2689291 0.0025768 -0.000378 -0.000029 0.000199 0.000173 0.0000017 0.0000092 0.000253 0.000273 1996 5 15 50218 -0.003604 0.591727 0.2664034 0.0024300 -0.000174 0.000035 0.000157 0.000156 0.0000015 0.0000086 0.000246 0.000255 1996 5 16 50219 0.000191 0.592632 0.2640214 0.0022479 -0.000039 -0.000029 0.000152 0.000158 0.0000017 0.0000092 0.000128 0.000155 1996 5 17 50220 0.003173 0.593071 0.2618067 0.0020333 -0.000016 -0.000085 0.000209 0.000234 0.0000020 0.0000098 0.000099 0.000138 1996 5 18 50221 0.006775 0.594189 0.2597630 0.0019104 -0.000079 -0.000087 0.000249 0.000287 0.0000023 0.0000104 0.000132 0.000176 1996 5 19 50222 0.009785 0.594326 0.2578750 0.0018504 -0.000165 -0.000044 0.000267 0.000273 0.0000026 0.0000098 0.000165 0.000213 1996 5 20 50223 0.012969 0.595179 0.2561120 0.0017528 -0.000213 0.000033 0.000284 0.000270 0.0000029 0.0000086 0.000199 0.000251 1996 5 21 50224 0.016974 0.595290 0.2544309 0.0016642 -0.000180 0.000111 0.000232 0.000213 0.0000031 0.0000086 0.000232 0.000289 1996 5 22 50225 0.020501 0.595469 0.2527831 0.0016594 -0.000013 0.000141 0.000182 0.000163 0.0000025 0.0000092 0.000317 0.000358 1996 5 23 50226 0.025021 0.595304 0.2511212 0.0016839 0.000180 0.000120 0.000197 0.000180 0.0000024 0.0000098 0.000333 0.000370 1996 5 24 50227 0.029426 0.595342 0.2494091 0.0017366 0.000363 0.000051 0.000216 0.000212 0.0000025 0.0000098 0.000325 0.000362 1996 5 25 50228 0.034670 0.595542 0.2476273 0.0018080 0.000490 -0.000042 0.000254 0.000258 0.0000026 0.0000098 0.000317 0.000354 1996 5 26 50229 0.039451 0.595729 0.2457728 0.0019106 0.000528 -0.000129 0.000315 0.000323 0.0000027 0.0000092 0.000309 0.000346 1996 5 27 50230 0.045137 0.595694 0.2438561 0.0019823 0.000466 -0.000182 0.000314 0.000320 0.0000027 0.0000086 0.000301 0.000338 1996 5 28 50231 0.049983 0.596151 0.2418983 0.0019956 0.000318 -0.000187 0.000259 0.000248 0.0000028 0.0000086 0.000293 0.000329 1996 5 29 50232 0.054062 0.596654 0.2399295 0.0019615 0.000122 -0.000148 0.000198 0.000182 0.0000029 0.0000086 0.000285 0.000321 1996 5 30 50233 0.057654 0.596950 0.2379874 0.0019005 -0.000069 -0.000054 0.000149 0.000118 0.0000031 0.0000086 0.000272 0.000237 1996 5 31 50234 0.061574 0.596617 0.2361105 0.0018211 -0.000232 -0.000008 0.000117 0.000088 0.0000021 0.0000086 0.000206 0.000187 1996 6 1 50235 0.065396 0.596429 0.2343298 0.0017208 -0.000280 -0.000002 0.000173 0.000187 0.0000014 0.0000086 0.000171 0.000185 1996 6 2 50236 0.070047 0.595382 0.2326423 0.0016390 -0.000212 -0.000004 0.000247 0.000284 0.0000014 0.0000092 0.000177 0.000194 1996 6 3 50237 0.074720 0.594773 0.2309989 0.0016189 -0.000098 0.000002 0.000216 0.000243 0.0000015 0.0000098 0.000182 0.000203 1996 6 4 50238 0.078469 0.594147 0.2293297 0.0016813 -0.000005 0.000029 0.000169 0.000166 0.0000015 0.0000098 0.000187 0.000212 1996 6 5 50239 0.082538 0.592504 0.2275791 0.0017826 0.000032 0.000106 0.000142 0.000124 0.0000025 0.0000098 0.000239 0.000288 1996 6 6 50240 0.086756 0.591397 0.2257304 0.0018870 -0.000071 0.000147 0.000160 0.000139 0.0000029 0.0000098 0.000207 0.000252 1996 6 7 50241 0.090919 0.590227 0.2237940 0.0019739 -0.000216 0.000139 0.000179 0.000157 0.0000032 0.0000098 0.000146 0.000177 1996 6 8 50242 0.094459 0.589408 0.2217912 0.0020421 -0.000309 0.000082 0.000171 0.000169 0.0000034 0.0000098 0.000085 0.000101 1996 6 9 50243 0.098086 0.588007 0.2197491 0.0020701 -0.000230 -0.000011 0.000159 0.000168 0.0000036 0.0000098 0.000130 0.000194 1996 6 10 50244 0.101246 0.586552 0.2177049 0.0020541 -0.000074 -0.000094 0.000126 0.000134 0.0000038 0.0000098 0.000228 0.000371 1996 6 11 50245 0.104836 0.585276 0.2157093 0.0019660 0.000027 -0.000123 0.000098 0.000089 0.0000040 0.0000098 0.000326 0.000548 1996 6 12 50246 0.109219 0.583478 0.2138179 0.0018321 -0.000200 -0.000085 0.000089 0.000071 0.0000023 0.0000098 0.000263 0.000318 1996 6 13 50247 0.113429 0.582217 0.2120722 0.0016527 -0.000344 0.000050 0.000084 0.000074 0.0000017 0.0000098 0.000216 0.000242 1996 6 14 50248 0.118178 0.580560 0.2104827 0.0014964 -0.000279 0.000162 0.000068 0.000071 0.0000015 0.0000098 0.000176 0.000188 1996 6 15 50249 0.122009 0.579134 0.2090374 0.0013629 -0.000143 0.000167 0.000087 0.000104 0.0000014 0.0000098 0.000166 0.000157 1996 6 16 50250 0.126519 0.576999 0.2077176 0.0012898 -0.000078 0.000076 0.000164 0.000226 0.0000014 0.0000092 0.000190 0.000185 1996 6 17 50251 0.130315 0.575084 0.2064940 0.0012279 -0.000038 -0.000038 0.000202 0.000266 0.0000015 0.0000092 0.000213 0.000212 1996 6 18 50252 0.134392 0.573736 0.2053133 0.0011881 -0.000036 -0.000103 0.000173 0.000190 0.0000015 0.0000098 0.000237 0.000240 1996 6 19 50253 0.137866 0.571380 0.2041040 0.0012053 -0.000065 -0.000068 0.000148 0.000138 0.0000016 0.0000098 0.000260 0.000267 1996 6 20 50254 0.141681 0.569445 0.2028061 0.0012799 -0.000082 0.000126 0.000176 0.000164 0.0000040 0.0000098 0.000362 0.000433 1996 6 21 50255 0.145495 0.567625 0.2014018 0.0013744 -0.000102 0.000354 0.000227 0.000187 0.0000073 0.0000098 0.000490 0.000645 1996 6 22 50256 0.149141 0.566516 0.1999160 0.0014793 -0.000158 0.000427 0.000237 0.000186 0.0000076 0.0000098 0.000604 0.000732 1996 6 23 50257 0.153230 0.565108 0.1983906 0.0015705 -0.000222 0.000355 0.000229 0.000216 0.0000067 0.0000098 0.000712 0.000769 1996 6 24 50258 0.156194 0.563847 0.1968569 0.0016215 -0.000263 0.000202 0.000201 0.000176 0.0000058 0.0000104 0.000820 0.000806 1996 6 25 50259 0.160151 0.562237 0.1953276 0.0015918 -0.000263 0.000038 0.000181 0.000145 0.0000049 0.0000104 0.000928 0.000842 1996 6 26 50260 0.162933 0.560802 0.1938078 0.0015322 -0.000187 0.000007 0.000159 0.000133 0.0000019 0.0000111 0.000365 0.000336 1996 6 27 50261 0.166555 0.557744 0.1923125 0.0014773 -0.000118 -0.000003 0.000189 0.000143 0.0000009 0.0000111 0.000159 0.000149 1996 6 28 50262 0.169358 0.555400 0.1908731 0.0013923 -0.000073 0.000012 0.000159 0.000133 0.0000007 0.0000098 0.000093 0.000086 1996 6 29 50263 0.172559 0.552501 0.1895225 0.0012725 -0.000067 0.000040 0.000227 0.000189 0.0000010 0.0000098 0.000125 0.000112 1996 6 30 50264 0.175871 0.550042 0.1882705 0.0011738 -0.000102 0.000070 0.000394 0.000299 0.0000014 0.0000098 0.000167 0.000145 1996 7 1 50265 0.179867 0.547115 0.1870893 0.0011324 -0.000166 0.000094 0.000328 0.000276 0.0000018 0.0000104 0.000210 0.000179 1996 7 2 50266 0.182239 0.544937 0.1859196 0.0011603 -0.000238 0.000118 0.000227 0.000221 0.0000022 0.0000111 0.000251 0.000213 1996 7 3 50267 0.185895 0.541864 0.1846966 0.0012919 -0.000293 0.000140 0.000164 0.000147 0.0000026 0.0000104 0.000294 0.000246 1996 7 4 50268 0.188053 0.539038 0.1833814 0.0014305 -0.000309 0.000166 0.000150 0.000126 0.0000026 0.0000098 0.000294 0.000251 1996 7 5 50269 0.192488 0.536014 0.1819792 0.0014860 -0.000283 0.000188 0.000193 0.000169 0.0000024 0.0000092 0.000281 0.000245 1996 7 6 50270 0.195915 0.533126 0.1805349 0.0014692 -0.000226 0.000197 0.000239 0.000202 0.0000022 0.0000086 0.000268 0.000240 1996 7 7 50271 0.200128 0.531021 0.1791101 0.0013841 -0.000159 0.000188 0.000237 0.000216 0.0000020 0.0000086 0.000255 0.000235 1996 7 8 50272 0.203633 0.528873 0.1777576 0.0012842 -0.000105 0.000157 0.000190 0.000203 0.0000018 0.0000086 0.000242 0.000229 1996 7 9 50273 0.208138 0.526783 0.1765091 0.0011677 -0.000085 0.000109 0.000167 0.000163 0.0000016 0.0000086 0.000229 0.000224 1996 7 10 50274 0.211232 0.524542 0.1753765 0.0010336 -0.000106 0.000057 0.000138 0.000119 0.0000014 0.0000086 0.000216 0.000218 1996 7 11 50275 0.215288 0.521585 0.1743600 0.0009152 -0.000168 0.000008 0.000148 0.000123 0.0000028 0.0000092 0.000273 0.000311 1996 7 12 50276 0.218586 0.518872 0.1734501 0.0008397 -0.000240 -0.000020 0.000150 0.000140 0.0000048 0.0000092 0.000355 0.000437 1996 7 13 50277 0.222028 0.515784 0.1726202 0.0008148 -0.000285 -0.000014 0.000216 0.000381 0.0000047 0.0000092 0.000337 0.000415 1996 7 14 50278 0.224765 0.512845 0.1718215 0.0008124 -0.000287 0.000021 0.000274 0.000485 0.0000043 0.0000092 0.000299 0.000363 1996 7 15 50279 0.227686 0.509455 0.1709989 0.0008623 -0.000245 0.000071 0.000217 0.000309 0.0000038 0.0000086 0.000261 0.000311 1996 7 16 50280 0.230501 0.506711 0.1701158 0.0009450 -0.000178 0.000124 0.000184 0.000220 0.0000033 0.0000086 0.000223 0.000259 1996 7 17 50281 0.233153 0.503337 0.1691660 0.0010036 -0.000035 0.000179 0.000151 0.000145 0.0000018 0.0000086 0.000234 0.000218 1996 7 18 50282 0.235308 0.500890 0.1681624 0.0010649 -0.000078 0.000181 0.000166 0.000163 0.0000034 0.0000092 0.000345 0.000317 1996 7 19 50283 0.237319 0.497817 0.1670851 0.0011352 -0.000100 0.000207 0.000200 0.000221 0.0000039 0.0000098 0.000367 0.000345 1996 7 20 50284 0.239122 0.495251 0.1659129 0.0011931 -0.000072 0.000245 0.000216 0.000242 0.0000033 0.0000098 0.000328 0.000314 1996 7 21 50285 0.240282 0.492266 0.1646550 0.0012811 -0.000041 0.000252 0.000208 0.000249 0.0000027 0.0000098 0.000288 0.000283 1996 7 22 50286 0.241538 0.489437 0.1633437 0.0013373 -0.000023 0.000211 0.000176 0.000233 0.0000022 0.0000092 0.000249 0.000252 1996 7 23 50287 0.242853 0.486342 0.1620133 0.0013501 -0.000027 0.000131 0.000138 0.000161 0.0000016 0.0000092 0.000210 0.000221 1996 7 24 50288 0.243982 0.483616 0.1606815 0.0013435 -0.000143 -0.000082 0.000136 0.000134 0.0000024 0.0000092 0.000309 0.000247 1996 7 25 50289 0.245558 0.480934 0.1593486 0.0013319 -0.000156 -0.000086 0.000168 0.000171 0.0000019 0.0000086 0.000244 0.000196 1996 7 26 50290 0.247028 0.478343 0.1580321 0.0012899 -0.000122 0.000028 0.000121 0.000134 0.0000009 0.0000086 0.000119 0.000119 1996 7 27 50291 0.248791 0.474911 0.1567562 0.0012388 -0.000143 0.000082 0.000144 0.000177 0.0000010 0.0000086 0.000145 0.000134 1996 7 28 50292 0.250768 0.471768 0.1555121 0.0012214 -0.000184 0.000103 0.000288 0.000390 0.0000012 0.0000086 0.000186 0.000158 1996 7 29 50293 0.252710 0.468721 0.1542471 0.0012601 -0.000230 0.000090 0.000305 0.000455 0.0000014 0.0000086 0.000227 0.000182 1996 7 30 50294 0.254441 0.466714 0.1528866 0.0013775 -0.000255 0.000061 0.000240 0.000343 0.0000016 0.0000092 0.000269 0.000206 1996 7 31 50295 0.256287 0.463499 0.1513774 0.0015591 -0.000233 0.000051 0.000188 0.000235 0.0000018 0.0000092 0.000309 0.000230 1996 8 1 50296 0.257624 0.460658 0.1497236 0.0017237 -0.000142 0.000100 0.000176 0.000234 0.0000020 0.0000086 0.000320 0.000238 1996 8 2 50297 0.259675 0.457382 0.1479916 0.0017925 -0.000008 0.000199 0.000195 0.000239 0.0000021 0.0000086 0.000321 0.000241 1996 8 3 50298 0.260580 0.454012 0.1462811 0.0017136 0.000126 0.000318 0.000251 0.000337 0.0000022 0.0000086 0.000321 0.000243 1996 8 4 50299 0.262362 0.449695 0.1446843 0.0015289 0.000209 0.000413 0.000241 0.000334 0.0000023 0.0000086 0.000322 0.000245 1996 8 5 50300 0.263332 0.445958 0.1432584 0.0013263 0.000200 0.000445 0.000163 0.000168 0.0000024 0.0000086 0.000323 0.000248 1996 8 6 50301 0.265247 0.441680 0.1420242 0.0011404 0.000089 0.000391 0.000159 0.000146 0.0000025 0.0000086 0.000323 0.000250 1996 8 7 50302 0.267281 0.437702 0.1409779 0.0009423 -0.000095 0.000264 0.000154 0.000134 0.0000026 0.0000092 0.000324 0.000253 1996 8 8 50303 0.269944 0.433417 0.1400997 0.0007990 -0.000352 0.000065 0.000166 0.000140 0.0000034 0.0000092 0.000600 0.000514 1996 8 9 50304 0.272365 0.430203 0.1393525 0.0007138 -0.000481 -0.000068 0.000192 0.000189 0.0000035 0.0000092 0.000570 0.000483 1996 8 10 50305 0.274513 0.426370 0.1386809 0.0006298 -0.000457 -0.000097 0.000224 0.000238 0.0000033 0.0000092 0.000339 0.000262 1996 8 11 50306 0.276239 0.422591 0.1380231 0.0006298 -0.000343 -0.000047 0.000218 0.000225 0.0000030 0.0000086 0.000153 0.000085 1996 8 12 50307 0.277657 0.419881 0.1373313 0.0007168 -0.000212 0.000052 0.000208 0.000190 0.0000027 0.0000086 0.000190 0.000126 1996 8 13 50308 0.279638 0.415981 0.1365805 0.0007819 -0.000113 0.000106 0.000187 0.000150 0.0000024 0.0000086 0.000226 0.000168 1996 8 14 50309 0.282061 0.412678 0.1357613 0.0008595 -0.000124 -0.000025 0.000133 0.000103 0.0000022 0.0000092 0.000267 0.000209 1996 8 15 50310 0.284046 0.408818 0.1348658 0.0009591 -0.000158 -0.000145 0.000132 0.000101 0.0000021 0.0000092 0.000270 0.000214 1996 8 16 50311 0.286170 0.405689 0.1338846 0.0010502 -0.000200 -0.000236 0.000163 0.000145 0.0000019 0.0000092 0.000260 0.000208 1996 8 17 50312 0.287244 0.401761 0.1328161 0.0011257 -0.000228 -0.000277 0.000151 0.000160 0.0000017 0.0000092 0.000249 0.000202 1996 8 18 50313 0.288926 0.397942 0.1316767 0.0011886 -0.000223 -0.000256 0.000194 0.000234 0.0000016 0.0000086 0.000239 0.000195 1996 8 19 50314 0.289984 0.394609 0.1304969 0.0011840 -0.000182 -0.000187 0.000223 0.000288 0.0000014 0.0000086 0.000229 0.000189 1996 8 20 50315 0.291316 0.391439 0.1293079 0.0011706 -0.000112 -0.000105 0.000172 0.000233 0.0000013 0.0000092 0.000219 0.000182 1996 8 21 50316 0.292621 0.387828 0.1281298 0.0011491 -0.000031 -0.000043 0.000145 0.000168 0.0000011 0.0000092 0.000208 0.000176 1996 8 22 50317 0.293791 0.383870 0.1269708 0.0011186 0.000043 -0.000031 0.000157 0.000167 0.0000013 0.0000086 0.000209 0.000187 1996 8 23 50318 0.294983 0.380686 0.1258320 0.0011139 0.000098 -0.000062 0.000200 0.000226 0.0000017 0.0000086 0.000214 0.000204 1996 8 24 50319 0.295955 0.377254 0.1247077 0.0011368 0.000128 -0.000111 0.000224 0.000279 0.0000021 0.0000092 0.000218 0.000221 1996 8 25 50320 0.296752 0.373770 0.1235756 0.0011744 0.000128 -0.000151 0.000220 0.000309 0.0000025 0.0000098 0.000222 0.000237 1996 8 26 50321 0.296867 0.369821 0.1223881 0.0012512 0.000094 -0.000153 0.000182 0.000246 0.0000029 0.0000098 0.000226 0.000254 1996 8 27 50322 0.297386 0.365518 0.1210781 0.0013675 0.000017 -0.000107 0.000137 0.000161 0.0000032 0.0000098 0.000231 0.000271 1996 8 28 50323 0.297408 0.361507 0.1195864 0.0015469 -0.000050 -0.000003 0.000115 0.000124 0.0000022 0.0000098 0.000288 0.000291 1996 8 29 50324 0.298126 0.356985 0.1178993 0.0017568 -0.000244 0.000086 0.000095 0.000097 0.0000013 0.0000098 0.000149 0.000140 1996 8 30 50325 0.298255 0.352447 0.1160864 0.0018513 -0.000420 0.000128 0.000127 0.000106 0.0000010 0.0000098 0.000103 0.000095 1996 8 31 50326 0.297881 0.348211 0.1142679 0.0018126 -0.000514 0.000126 0.000205 0.000156 0.0000010 0.0000098 0.000137 0.000132 1996 9 1 50327 0.297180 0.343648 0.1125570 0.0016541 -0.000508 0.000103 0.000204 0.000162 0.0000010 0.0000098 0.000171 0.000168 1996 9 2 50328 0.297084 0.339291 0.1110239 0.0014387 -0.000399 0.000086 0.000184 0.000153 0.0000010 0.0000098 0.000204 0.000204 1996 9 3 50329 0.296468 0.334532 0.1096843 0.0012440 -0.000223 0.000089 0.000169 0.000147 0.0000010 0.0000098 0.000238 0.000241 1996 9 4 50330 0.295866 0.330375 0.1085143 0.0011012 -0.000012 0.000156 0.000132 0.000116 0.0000010 0.0000098 0.000208 0.000195 1996 9 5 50331 0.295320 0.326474 0.1074696 0.0009973 0.000111 0.000180 0.000107 0.000095 0.0000010 0.0000104 0.000229 0.000216 1996 9 6 50332 0.294964 0.322278 0.1065186 0.0009441 0.000108 0.000145 0.000106 0.000106 0.0000010 0.0000104 0.000259 0.000235 1996 9 7 50333 0.294100 0.318315 0.1055812 0.0009322 0.000031 0.000128 0.000119 0.000115 0.0000009 0.0000104 0.000253 0.000231 1996 9 8 50334 0.293634 0.314226 0.1046228 0.0009612 -0.000110 0.000072 0.000167 0.000166 0.0000011 0.0000104 0.000254 0.000224 1996 9 9 50335 0.292800 0.310606 0.1036271 0.0010348 -0.000241 0.000000 0.000203 0.000197 0.0000014 0.0000098 0.000265 0.000217 1996 9 10 50336 0.292453 0.306681 0.1025294 0.0011941 -0.000285 -0.000035 0.000183 0.000184 0.0000018 0.0000104 0.000275 0.000209 1996 9 11 50337 0.292127 0.303190 0.1012457 0.0014056 -0.000143 0.000043 0.000161 0.000168 0.0000021 0.0000111 0.000277 0.000236 1996 9 12 50338 0.291411 0.299609 0.0997283 0.0016064 0.000028 0.000108 0.000150 0.000132 0.0000022 0.0000117 0.000198 0.000233 1996 9 13 50339 0.290296 0.296038 0.0980183 0.0017189 0.000202 0.000155 0.000195 0.000200 0.0000021 0.0000117 0.000168 0.000226 1996 9 14 50340 0.289192 0.292254 0.0962100 0.0017741 0.000332 0.000175 0.000266 0.000262 0.0000018 0.0000104 0.000177 0.000223 1996 9 15 50341 0.287662 0.288389 0.0943921 0.0017718 0.000374 0.000158 0.000234 0.000225 0.0000015 0.0000098 0.000185 0.000220 1996 9 16 50342 0.286320 0.283910 0.0926171 0.0017511 0.000324 0.000112 0.000176 0.000193 0.0000012 0.0000098 0.000193 0.000217 1996 9 17 50343 0.284735 0.279662 0.0909011 0.0017431 0.000213 0.000053 0.000142 0.000145 0.0000009 0.0000098 0.000202 0.000214 1996 9 18 50344 0.283866 0.275298 0.0892456 0.0016681 0.000023 0.000000 0.000115 0.000102 0.0000010 0.0000092 0.000193 0.000188 1996 9 19 50345 0.282799 0.271256 0.0876496 0.0015959 -0.000021 -0.000018 0.000111 0.000091 0.0000009 0.0000086 0.000201 0.000187 1996 9 20 50346 0.282696 0.267080 0.0860797 0.0015931 0.000030 -0.000020 0.000104 0.000088 0.0000008 0.0000086 0.000201 0.000189 1996 9 21 50347 0.281846 0.263792 0.0844844 0.0016389 0.000049 0.000009 0.000106 0.000085 0.0000008 0.0000086 0.000181 0.000178 1996 9 22 50348 0.281779 0.260698 0.0828108 0.0017329 0.000062 0.000052 0.000158 0.000116 0.0000014 0.0000086 0.000231 0.000215 1996 9 23 50349 0.280580 0.257665 0.0809953 0.0019138 0.000073 0.000086 0.000182 0.000157 0.0000022 0.0000086 0.000319 0.000277 1996 9 24 50350 0.278988 0.253946 0.0789860 0.0021024 0.000065 0.000096 0.000181 0.000156 0.0000028 0.0000086 0.000377 0.000318 1996 9 25 50351 0.277228 0.250341 0.0767840 0.0022509 0.000048 0.000057 0.000170 0.000125 0.0000016 0.0000080 0.000232 0.000213 1996 9 26 50352 0.275925 0.246410 0.0744605 0.0023544 0.000008 0.000057 0.000154 0.000135 0.0000013 0.0000080 0.000169 0.000159 1996 9 27 50353 0.273751 0.242942 0.0721195 0.0023518 -0.000041 0.000079 0.000166 0.000166 0.0000012 0.0000086 0.000133 0.000122 1996 9 28 50354 0.272177 0.238666 0.0698526 0.0022185 -0.000088 0.000103 0.000198 0.000187 0.0000011 0.0000086 0.000097 0.000084 1996 9 29 50355 0.270583 0.234861 0.0677075 0.0020755 -0.000118 0.000124 0.000160 0.000156 0.0000010 0.0000190 0.000061 0.000047 1996 9 30 50356 0.268522 0.231509 0.0656871 0.0019573 -0.000124 0.000105 0.000116 0.000119 0.0000009 0.0000301 0.000100 0.000092 1996 10 1 50357 0.267263 0.227861 0.0637798 0.0018422 -0.000102 0.000083 0.000130 0.000120 0.0000008 0.0000307 0.000176 0.000176 1996 10 2 50358 0.265508 0.224461 0.0619880 0.0017191 -0.000018 0.000149 0.000112 0.000103 0.0000010 0.0000307 0.000196 0.000179 1996 10 3 50359 0.263816 0.220521 0.0603266 0.0016168 0.000043 0.000226 0.000104 0.000094 0.0000009 0.0000307 0.000194 0.000195 1996 10 4 50360 0.261432 0.216770 0.0587570 0.0015705 0.000062 0.000254 0.000093 0.000083 0.0000007 0.0000307 0.000184 0.000180 1996 10 5 50361 0.260080 0.212833 0.0571991 0.0015772 0.000049 0.000204 0.000097 0.000081 0.0000007 0.0000307 0.000170 0.000164 1996 10 6 50362 0.257573 0.209823 0.0555995 0.0016150 0.000036 0.000121 0.000155 0.000135 0.0000016 0.0000307 0.000238 0.000219 1996 10 7 50363 0.255982 0.206198 0.0539391 0.0016731 0.000017 0.000049 0.000198 0.000172 0.0000029 0.0000307 0.000347 0.000305 1996 10 8 50364 0.254014 0.203404 0.0522075 0.0017617 -0.000021 0.000015 0.000183 0.000164 0.0000043 0.0000313 0.000457 0.000391 1996 10 9 50365 0.252060 0.200576 0.0503868 0.0018762 -0.000110 0.000071 0.000164 0.000158 0.0000023 0.0000313 0.000281 0.000251 1996 10 10 50366 0.249531 0.198117 0.0484513 0.0019892 -0.000181 0.000137 0.000156 0.000148 0.0000020 0.0000301 0.000285 0.000253 1996 10 11 50367 0.247156 0.195137 0.0464104 0.0020697 -0.000236 0.000198 0.000167 0.000159 0.0000023 0.0000295 0.000356 0.000308 1996 10 12 50368 0.244663 0.191876 0.0443070 0.0020994 -0.000291 0.000234 0.000174 0.000169 0.0000020 0.0000307 0.000325 0.000287 1996 10 13 50369 0.242169 0.188703 0.0421852 0.0021333 -0.000300 0.000247 0.000158 0.000152 0.0000016 0.0000326 0.000295 0.000266 1996 10 14 50370 0.240139 0.185968 0.0400796 0.0021228 -0.000246 0.000245 0.000135 0.000131 0.0000013 0.0000332 0.000264 0.000245 1996 10 15 50371 0.237181 0.182782 0.0380151 0.0020546 -0.000142 0.000234 0.000122 0.000112 0.0000009 0.0000313 0.000234 0.000224 1996 10 16 50372 0.235295 0.180080 0.0360096 0.0019730 0.000053 0.000258 0.000111 0.000091 0.0000013 0.0000289 0.000219 0.000225 1996 10 17 50373 0.232667 0.177298 0.0340695 0.0019068 0.000140 0.000232 0.000106 0.000086 0.0000010 0.0000283 0.000205 0.000209 1996 10 18 50374 0.230613 0.174860 0.0321838 0.0018982 0.000075 0.000194 0.000104 0.000089 0.0000008 0.0000283 0.000191 0.000199 1996 10 19 50375 0.227725 0.171954 0.0302719 0.0019635 0.000063 0.000164 0.000108 0.000097 0.0000008 0.0000276 0.000193 0.000189 1996 10 20 50376 0.225107 0.169693 0.0282492 0.0020887 0.000027 0.000199 0.000230 0.000212 0.0000018 0.0000264 0.000214 0.000219 1996 10 21 50377 0.222377 0.167356 0.0260921 0.0021941 -0.000026 0.000263 0.000291 0.000306 0.0000032 0.0000252 0.000241 0.000272 1996 10 22 50378 0.220341 0.164976 0.0238253 0.0023031 -0.000036 0.000290 0.000207 0.000241 0.0000046 0.0000240 0.000268 0.000324 1996 10 23 50379 0.217225 0.161839 0.0214880 0.0023950 0.000057 0.000200 0.000157 0.000159 0.0000021 0.0000233 0.000221 0.000235 1996 10 24 50380 0.214137 0.159244 0.0191065 0.0024206 0.000140 0.000058 0.000146 0.000134 0.0000014 0.0000233 0.000211 0.000213 1996 10 25 50381 0.210696 0.156104 0.0167149 0.0024013 0.000200 -0.000105 0.000158 0.000154 0.0000014 0.0000233 0.000214 0.000215 1996 10 26 50382 0.208664 0.153088 0.0143663 0.0023074 0.000223 -0.000243 0.000212 0.000230 0.0000014 0.0000221 0.000216 0.000218 1996 10 27 50383 0.206390 0.149667 0.0121216 0.0021534 0.000208 -0.000307 0.000361 0.000438 0.0000014 0.0000209 0.000220 0.000220 1996 10 28 50384 0.204198 0.146793 0.0100280 0.0019961 0.000166 -0.000272 0.000369 0.000453 0.0000014 0.0000209 0.000222 0.000223 1996 10 29 50385 0.202608 0.144309 0.0081029 0.0018198 0.000120 -0.000147 0.000271 0.000289 0.0000014 0.0000209 0.000225 0.000226 1996 10 30 50386 0.199535 0.141297 0.0063303 0.0016881 0.000091 0.000019 0.000202 0.000195 0.0000014 0.0000203 0.000228 0.000228 1996 10 31 50387 0.197504 0.138256 0.0046689 0.0016334 0.000092 0.000233 0.000099 0.000096 0.0000013 0.0000197 0.000136 0.000136 1996 11 1 50388 0.193878 0.135544 0.0030617 0.0016302 0.000122 0.000283 0.000149 0.000143 0.0000012 0.0000190 0.000112 0.000119 1996 11 2 50389 0.191244 0.132613 0.0014439 0.0016681 0.000157 0.000188 0.000256 0.000301 0.0000011 0.0000184 0.000138 0.000155 1996 11 3 50390 0.188501 0.129413 -0.0002469 0.0017402 0.000175 0.000050 0.000252 0.000309 0.0000010 0.0000184 0.000164 0.000191 1996 11 4 50391 0.185277 0.127170 -0.0020571 0.0018576 0.000165 -0.000056 0.000207 0.000240 0.0000010 0.0000184 0.000190 0.000227 1996 11 5 50392 0.181934 0.124716 -0.0040034 0.0019742 0.000119 0.000049 0.000166 0.000198 0.0000009 0.0000197 0.000223 0.000225 1996 11 6 50393 0.178121 0.122770 -0.0060668 0.0020864 0.000053 0.000101 0.000151 0.000147 0.0000013 0.0000215 0.000206 0.000223 1996 11 7 50394 0.174080 0.121288 -0.0082003 0.0021708 0.000045 0.000096 0.000139 0.000138 0.0000011 0.0000221 0.000221 0.000236 1996 11 8 50395 0.169873 0.119269 -0.0103836 0.0021812 0.000120 0.000089 0.000090 0.000100 0.0000009 0.0000209 0.000225 0.000238 1996 11 9 50396 0.166082 0.117514 -0.0125632 0.0021574 0.000176 0.000122 0.000044 0.000053 0.0000007 0.0000184 0.000176 0.000179 1996 11 10 50397 0.162436 0.114975 -0.0146905 0.0020999 0.000158 0.000148 0.000154 0.000170 0.0000007 0.0000172 0.000158 0.000156 1996 11 11 50398 0.158553 0.113253 -0.0167668 0.0020639 0.000094 0.000137 0.000256 0.000234 0.0000007 0.0000172 0.000165 0.000164 1996 11 12 50399 0.154363 0.112458 -0.0188144 0.0020442 0.000022 0.000095 0.000158 0.000127 0.0000008 0.0000172 0.000171 0.000172 1996 11 13 50400 0.150431 0.110958 -0.0208385 0.0019927 0.000008 -0.000040 0.000098 0.000098 0.0000010 0.0000178 0.000200 0.000218 1996 11 14 50401 0.146107 0.110204 -0.0228106 0.0019259 0.000013 -0.000065 0.000088 0.000086 0.0000009 0.0000184 0.000148 0.000165 1996 11 15 50402 0.141314 0.108357 -0.0246929 0.0018639 0.000037 -0.000005 0.000053 0.000061 0.0000009 0.0000190 0.000126 0.000148 1996 11 16 50403 0.137208 0.106581 -0.0265360 0.0018781 0.000080 0.000063 0.000054 0.000060 0.0000009 0.0000190 0.000110 0.000137 1996 11 17 50404 0.134058 0.104364 -0.0284328 0.0019729 0.000057 0.000137 0.000150 0.000114 0.0000010 0.0000184 0.000121 0.000151 1996 11 18 50405 0.131502 0.102865 -0.0304398 0.0020723 -0.000017 0.000199 0.000203 0.000144 0.0000013 0.0000184 0.000152 0.000183 1996 11 19 50406 0.127997 0.101681 -0.0325567 0.0021140 -0.000087 0.000223 0.000152 0.000106 0.0000016 0.0000184 0.000182 0.000215 1996 11 20 50407 0.124639 0.100780 -0.0347329 0.0021536 -0.000115 0.000209 0.000135 0.000096 0.0000019 0.0000178 0.000213 0.000248 1996 11 21 50408 0.122040 0.099404 -0.0368994 0.0021277 -0.000037 0.000131 0.000117 0.000103 0.0000036 0.0000166 0.000569 0.000398 1996 11 22 50409 0.119316 0.098964 -0.0389991 0.0020477 0.000070 0.000106 0.000080 0.000079 0.0000020 0.0000160 0.000337 0.000231 1996 11 23 50410 0.115948 0.098037 -0.0409865 0.0019089 0.000132 0.000096 0.000105 0.000105 0.0000009 0.0000166 0.000127 0.000107 1996 11 24 50411 0.112681 0.097011 -0.0428391 0.0017914 0.000146 0.000071 0.000244 0.000246 0.0000016 0.0000172 0.000197 0.000149 1996 11 25 50412 0.108926 0.096017 -0.0445682 0.0016899 0.000145 0.000056 0.000253 0.000258 0.0000023 0.0000172 0.000267 0.000191 1996 11 26 50413 0.105177 0.095250 -0.0462095 0.0016230 0.000152 0.000049 0.000168 0.000176 0.0000030 0.0000178 0.000337 0.000233 1996 11 27 50414 0.101445 0.094956 -0.0478061 0.0015980 0.000237 0.000061 0.000144 0.000136 0.0000017 0.0000190 0.000225 0.000203 1996 11 28 50415 0.097441 0.094072 -0.0493929 0.0015953 0.000282 0.000065 0.000168 0.000172 0.0000012 0.0000203 0.000183 0.000190 1996 11 29 50416 0.093646 0.093616 -0.0509908 0.0015764 0.000291 0.000058 0.000184 0.000235 0.0000012 0.0000221 0.000178 0.000188 1996 11 30 50417 0.089336 0.093259 -0.0526091 0.0015921 0.000275 0.000037 0.000222 0.000321 0.0000011 0.0000246 0.000173 0.000185 1996 12 1 50418 0.085715 0.092193 -0.0542501 0.0016601 0.000243 0.000009 0.000236 0.000307 0.0000011 0.0000264 0.000168 0.000182 1996 12 2 50419 0.082100 0.091657 -0.0559153 0.0017038 0.000200 -0.000020 0.000204 0.000173 0.0000010 0.0000270 0.000163 0.000180 1996 12 3 50420 0.079086 0.090728 -0.0576095 0.0017110 0.000142 -0.000037 0.000158 0.000123 0.0000010 0.0000270 0.000158 0.000177 1996 12 4 50421 0.074885 0.090821 -0.0593414 0.0017320 0.000172 -0.000045 0.000100 0.000105 0.0000020 0.0000270 0.000265 0.000277 1996 12 5 50422 0.071086 0.089852 -0.0611178 0.0017852 0.000028 0.000014 0.000079 0.000086 0.0000020 0.0000264 0.000162 0.000192 1996 12 6 50423 0.066266 0.089595 -0.0629258 0.0018254 -0.000252 0.000062 0.000134 0.000150 0.0000020 0.0000258 0.000155 0.000160 1996 12 7 50424 0.062227 0.088622 -0.0647297 0.0018123 -0.000353 0.000115 0.000417 0.000404 0.0000022 0.0000252 0.000199 0.000201 1996 12 8 50425 0.058705 0.088323 -0.0664887 0.0017089 -0.000229 0.000166 0.000611 0.000548 0.0000024 0.0000240 0.000218 0.000248 1996 12 9 50426 0.054636 0.087144 -0.0681824 0.0016633 -0.000023 0.000172 0.000423 0.000340 0.0000026 0.0000227 0.000236 0.000295 1996 12 10 50427 0.050835 0.085716 -0.0698244 0.0016426 0.000167 0.000116 0.000205 0.000137 0.0000028 0.0000215 0.000255 0.000342 1996 12 11 50428 0.046636 0.085370 -0.0714534 0.0016621 0.000132 -0.000031 0.000156 0.000120 0.0000014 0.0000197 0.000199 0.000230 1996 12 12 50429 0.042972 0.085232 -0.0731144 0.0016933 0.000075 -0.000164 0.000249 0.000164 0.0000011 0.0000178 0.000184 0.000201 1996 12 13 50430 0.039601 0.085341 -0.0748475 0.0017809 0.000004 -0.000257 0.000328 0.000194 0.0000012 0.0000166 0.000185 0.000203 1996 12 14 50431 0.036526 0.085288 -0.0766828 0.0018843 -0.000059 -0.000292 0.000250 0.000184 0.0000013 0.0000160 0.000185 0.000205 1996 12 15 50432 0.034106 0.086236 -0.0786365 0.0020253 -0.000084 -0.000260 0.000246 0.000180 0.0000014 0.0000160 0.000187 0.000208 1996 12 16 50433 0.030588 0.086428 -0.0807037 0.0021356 -0.000068 -0.000178 0.000226 0.000164 0.0000014 0.0000160 0.000187 0.000210 1996 12 17 50434 0.027707 0.087468 -0.0828541 0.0021796 -0.000027 -0.000069 0.000164 0.000158 0.0000015 0.0000160 0.000188 0.000212 1996 12 18 50435 0.024610 0.087893 -0.0850345 0.0021706 0.000012 0.000035 0.000158 0.000138 0.0000016 0.0000160 0.000189 0.000214 1996 12 19 50436 0.021473 0.088759 -0.0871824 0.0021361 0.000020 0.000107 0.000146 0.000138 0.0000021 0.0000160 0.000228 0.000231 1996 12 20 50437 0.018028 0.089407 -0.0892451 0.0020378 -0.000011 0.000139 0.000146 0.000133 0.0000026 0.0000160 0.000280 0.000252 1996 12 21 50438 0.015143 0.090024 -0.0911972 0.0019177 -0.000074 0.000135 0.000180 0.000128 0.0000032 0.0000160 0.000331 0.000274 1996 12 22 50439 0.012185 0.090234 -0.0930491 0.0018099 -0.000149 0.000108 0.000210 0.000166 0.0000037 0.0000160 0.000383 0.000295 1996 12 23 50440 0.010542 0.091025 -0.0948390 0.0017396 -0.000211 0.000076 0.000186 0.000179 0.0000043 0.0000160 0.000434 0.000317 1996 12 24 50441 0.007368 0.091577 -0.0966103 0.0017090 -0.000235 0.000054 0.000192 0.000181 0.0000048 0.0000160 0.000486 0.000338 1996 12 25 50442 0.004812 0.092237 -0.0983865 0.0016824 -0.000205 0.000052 0.000284 0.000299 0.0000046 0.0000166 0.000462 0.000329 1996 12 26 50443 0.001746 0.092408 -0.1001618 0.0016881 -0.000130 0.000067 0.000271 0.000353 0.0000042 0.0000166 0.000430 0.000318 1996 12 27 50444 -0.001978 0.092672 -0.1019150 0.0017158 -0.000019 0.000089 0.000840 0.001133 0.0000356 0.0000167 0.000285 0.000299 1996 12 28 50445 -0.005714 0.092649 -0.1036497 0.0017751 0.000083 0.000104 0.000942 0.001432 0.0000393 0.0000160 0.000299 0.000322 1996 12 29 50446 -0.010032 0.092942 -0.1054004 0.0018396 0.000143 0.000097 0.000684 0.001017 0.0000382 0.0000160 0.000295 0.000315 1996 12 30 50447 -0.014631 0.094294 -0.1071951 0.0018932 0.000160 0.000072 0.000323 0.000306 0.0000370 0.0000173 0.000290 0.000308 1996 12 31 50448 -0.019091 0.094752 -0.1090616 0.0019515 0.000134 0.000031 0.000326 0.000312 0.0000359 0.0000180 0.000286 0.000301 1997 1 1 50449 -0.023197 0.095311 -0.1110080 0.0019734 0.000076 -0.000019 0.000335 0.000320 0.0000347 0.0000186 0.000282 0.000294 1997 1 2 50450 -0.026897 0.095777 -0.1130154 0.0019902 0.000003 -0.000065 0.000171 0.000165 0.0000168 0.0000096 0.000111 0.000115 1997 1 3 50451 -0.030416 0.096700 -0.1150426 0.0019487 -0.000061 -0.000096 0.000172 0.000165 0.0000162 0.0000093 0.000109 0.000112 1997 1 4 50452 -0.033641 0.097913 -0.1170440 0.0019349 -0.000094 -0.000106 0.000170 0.000162 0.0000157 0.0000090 0.000107 0.000109 1997 1 5 50453 -0.036691 0.099285 -0.1189857 0.0018959 -0.000080 -0.000097 0.000176 0.000167 0.0000151 0.0000090 0.000106 0.000106 1997 1 6 50454 -0.040164 0.101002 -0.1208588 0.0018426 -0.000020 -0.000074 0.000183 0.000167 0.0000145 0.0000090 0.000104 0.000104 1997 1 7 50455 -0.044064 0.102369 -0.1226852 0.0018399 0.000072 -0.000050 0.000179 0.000166 0.0000139 0.0000090 0.000102 0.000101 1997 1 8 50456 -0.047403 0.103456 -0.1245117 0.0018655 0.000164 -0.000039 0.000162 0.000159 0.0000134 0.0000090 0.000101 0.000098 1997 1 9 50457 -0.050317 0.104434 -0.1263903 0.0019168 0.000248 -0.000035 0.000148 0.000147 0.0000095 0.0000093 0.000093 0.000095 1997 1 10 50458 -0.053168 0.105818 -0.1283568 0.0020124 0.000233 -0.000065 0.000156 0.000158 0.0000081 0.0000096 0.000064 0.000067 1997 1 11 50459 -0.055972 0.107116 -0.1304219 0.0021175 0.000129 -0.000099 0.000153 0.000159 0.0000081 0.0000096 0.000033 0.000038 1997 1 12 50460 -0.058917 0.108082 -0.1325762 0.0021827 -0.000020 -0.000098 0.000148 0.000151 0.0000081 0.0000093 0.000037 0.000043 1997 1 13 50461 -0.061864 0.109472 -0.1347955 0.0022573 -0.000109 -0.000076 0.000146 0.000149 0.0000081 0.0000090 0.000050 0.000054 1997 1 14 50462 -0.063944 0.110641 -0.1370386 0.0022495 -0.000123 -0.000037 0.000139 0.000143 0.0000081 0.0000087 0.000062 0.000065 1997 1 15 50463 -0.066121 0.112435 -0.1392468 0.0021524 -0.000041 0.000004 0.000135 0.000140 0.0000082 0.0000087 0.000075 0.000077 1997 1 16 50464 -0.067984 0.114282 -0.1413542 0.0020367 0.000123 0.000029 0.000136 0.000145 0.0000082 0.0000096 0.000079 0.000080 1997 1 17 50465 -0.069867 0.116474 -0.1433093 0.0019083 0.000327 0.000032 0.000147 0.000152 0.0000083 0.0000103 0.000080 0.000081 1997 1 18 50466 -0.071819 0.118480 -0.1450940 0.0017240 0.000516 0.000018 0.000158 0.000159 0.0000084 0.0000106 0.000081 0.000083 1997 1 19 50467 -0.073958 0.120455 -0.1467285 0.0015782 0.000636 -0.000005 0.000175 0.000174 0.0000084 0.0000112 0.000082 0.000084 1997 1 20 50468 -0.076406 0.122785 -0.1482599 0.0014757 0.000648 -0.000023 0.000191 0.000183 0.0000085 0.0000116 0.000084 0.000085 1997 1 21 50469 -0.079611 0.124896 -0.1497389 0.0014348 0.000544 -0.000025 0.000186 0.000179 0.0000086 0.0000119 0.000085 0.000086 1997 1 22 50470 -0.082246 0.126546 -0.1511994 0.0014210 0.000349 -0.000007 0.000174 0.000171 0.0000087 0.0000132 0.000086 0.000087 1997 1 23 50471 -0.084928 0.128708 -0.1526517 0.0014578 0.000088 0.000032 0.000170 0.000161 0.0000064 0.0000141 0.000093 0.000093 1997 1 24 50472 -0.087471 0.130440 -0.1540977 0.0014980 -0.000116 0.000065 0.000169 0.000162 0.0000058 0.0000141 0.000093 0.000093 1997 1 25 50473 -0.090366 0.132374 -0.1555555 0.0015122 -0.000217 0.000083 0.000174 0.000172 0.0000062 0.0000141 0.000090 0.000091 1997 1 26 50474 -0.093525 0.133949 -0.1570643 0.0015739 -0.000208 0.000079 0.000178 0.000175 0.0000065 0.0000144 0.000088 0.000088 1997 1 27 50475 -0.096737 0.135693 -0.1586577 0.0016317 -0.000112 0.000053 0.000189 0.000177 0.0000068 0.0000148 0.000085 0.000086 1997 1 28 50476 -0.099457 0.137355 -0.1603276 0.0016501 0.000025 0.000007 0.000189 0.000173 0.0000071 0.0000148 0.000082 0.000083 1997 1 29 50477 -0.102635 0.139686 -0.1620162 0.0016558 0.000146 -0.000051 0.000164 0.000155 0.0000074 0.0000144 0.000080 0.000081 1997 1 30 50478 -0.105579 0.141159 -0.1636490 0.0015612 0.000249 -0.000102 0.000163 0.000151 0.0000066 0.0000138 0.000170 0.000239 1997 1 31 50479 -0.108198 0.143328 -0.1651839 0.0015073 0.000181 -0.000170 0.000133 0.000125 0.0000053 0.0000135 0.000100 0.000135 1997 2 1 50480 -0.111062 0.145649 -0.1666240 0.0014077 0.000091 -0.000217 0.000132 0.000124 0.0000051 0.0000132 0.000048 0.000044 1997 2 2 50481 -0.114231 0.147797 -0.1679911 0.0013031 0.000062 -0.000225 0.000159 0.000144 0.0000056 0.0000125 0.000076 0.000072 1997 2 3 50482 -0.117138 0.149821 -0.1693034 0.0012504 0.000066 -0.000204 0.000137 0.000126 0.0000062 0.0000119 0.000103 0.000101 1997 2 4 50483 -0.119827 0.152206 -0.1705865 0.0012782 0.000097 -0.000153 0.000133 0.000124 0.0000067 0.0000112 0.000131 0.000130 1997 2 5 50484 -0.122580 0.154576 -0.1718956 0.0013723 0.000094 -0.000135 0.000131 0.000125 0.0000100 0.0000109 0.000114 0.000113 1997 2 6 50485 -0.124754 0.157068 -0.1733134 0.0015551 0.000117 -0.000001 0.000126 0.000120 0.0000106 0.0000109 0.000080 0.000090 1997 2 7 50486 -0.126807 0.159205 -0.1749053 0.0017080 0.000122 0.000164 0.000127 0.000122 0.0000101 0.0000112 0.000048 0.000071 1997 2 8 50487 -0.128382 0.161460 -0.1766906 0.0019068 0.000060 0.000236 0.000132 0.000126 0.0000096 0.0000116 0.000057 0.000077 1997 2 9 50488 -0.130396 0.164363 -0.1786465 0.0020332 -0.000009 0.000239 0.000136 0.000130 0.0000091 0.0000109 0.000065 0.000084 1997 2 10 50489 -0.132276 0.167177 -0.1807227 0.0020804 -0.000052 0.000178 0.000134 0.000134 0.0000086 0.0000106 0.000074 0.000091 1997 2 11 50490 -0.134236 0.170031 -0.1828464 0.0020799 -0.000042 0.000081 0.000130 0.000134 0.0000081 0.0000109 0.000083 0.000098 1997 2 12 50491 -0.136176 0.172877 -0.1849288 0.0020228 0.000063 -0.000026 0.000129 0.000130 0.0000076 0.0000109 0.000076 0.000093 1997 2 13 50492 -0.138555 0.175460 -0.1868886 0.0018616 0.000149 -0.000079 0.000126 0.000123 0.0000077 0.0000109 0.000055 0.000074 1997 2 14 50493 -0.140394 0.178006 -0.1886879 0.0016973 0.000186 -0.000096 0.000127 0.000126 0.0000080 0.0000109 0.000037 0.000056 1997 2 15 50494 -0.142397 0.181149 -0.1903445 0.0016142 0.000158 -0.000113 0.000127 0.000131 0.0000083 0.0000106 0.000048 0.000066 1997 2 16 50495 -0.144725 0.183935 -0.1919115 0.0015543 0.000085 -0.000115 0.000122 0.000127 0.0000086 0.0000099 0.000060 0.000076 1997 2 17 50496 -0.147302 0.186455 -0.1934446 0.0015202 0.000002 -0.000107 0.000120 0.000122 0.0000089 0.0000096 0.000071 0.000086 1997 2 18 50497 -0.150101 0.188912 -0.1949824 0.0015278 -0.000049 -0.000085 0.000123 0.000124 0.0000092 0.0000099 0.000082 0.000097 1997 2 19 50498 -0.152615 0.191248 -0.1965486 0.0015724 -0.000042 -0.000050 0.000117 0.000119 0.0000095 0.0000106 0.000094 0.000107 1997 2 20 50499 -0.154850 0.193424 -0.1981628 0.0016369 0.000041 -0.000001 0.000119 0.000120 0.0000101 0.0000116 0.000095 0.000120 1997 2 21 50500 -0.157095 0.195719 -0.1998474 0.0017438 0.000152 0.000045 0.000126 0.000125 0.0000109 0.0000125 0.000093 0.000134 1997 2 22 50501 -0.158828 0.198080 -0.2016223 0.0018382 0.000216 0.000057 0.000132 0.000131 0.0000114 0.0000132 0.000101 0.000137 1997 2 23 50502 -0.160462 0.200788 -0.2034939 0.0019290 0.000221 0.000035 0.000136 0.000133 0.0000120 0.0000106 0.000110 0.000138 1997 2 24 50503 -0.161768 0.203660 -0.2054493 0.0020226 0.000163 -0.000023 0.000140 0.000138 0.0000125 0.0000106 0.000119 0.000140 1997 2 25 50504 -0.163086 0.207018 -0.2074606 0.0020357 0.000058 -0.000108 0.000154 0.000147 0.0000131 0.0000138 0.000127 0.000142 1997 2 26 50505 -0.165179 0.210254 -0.2094962 0.0020033 -0.000062 -0.000207 0.000145 0.000139 0.0000136 0.0000153 0.000136 0.000144 1997 2 27 50506 -0.167683 0.213858 -0.2115328 0.0020017 -0.000161 -0.000302 0.000140 0.000140 0.0000133 0.0000145 0.000136 0.000142 1997 2 28 50507 -0.170096 0.217032 -0.2135594 0.0020356 -0.000214 -0.000377 0.000148 0.000148 0.0000127 0.0000111 0.000135 0.000138 1997 3 1 50508 -0.172043 0.220014 -0.2155750 0.0020451 -0.000213 -0.000425 0.000150 0.000152 0.0000122 0.0000109 0.000133 0.000135 1997 3 2 50509 -0.173849 0.223275 -0.2175836 0.0020292 -0.000160 -0.000441 0.000151 0.000158 0.0000116 0.0000142 0.000132 0.000131 1997 3 3 50510 -0.175075 0.226475 -0.2195960 0.0020250 -0.000071 -0.000429 0.000149 0.000159 0.0000111 0.0000168 0.000130 0.000128 1997 3 4 50511 -0.175648 0.229878 -0.2216368 0.0020485 0.000034 -0.000402 0.000152 0.000158 0.0000105 0.0000164 0.000128 0.000124 1997 3 5 50512 -0.176311 0.233073 -0.2237501 0.0021411 0.000130 -0.000371 0.000150 0.000153 0.0000099 0.0000147 0.000127 0.000120 1997 3 6 50513 -0.176972 0.236400 -0.2259936 0.0023127 0.000195 -0.000354 0.000154 0.000152 0.0000098 0.0000144 0.000123 0.000118 1997 3 7 50514 -0.178340 0.239653 -0.2284170 0.0025101 0.000217 -0.000354 0.000155 0.000153 0.0000097 0.0000167 0.000120 0.000115 1997 3 8 50515 -0.180046 0.242888 -0.2310354 0.0027003 0.000194 -0.000368 0.000158 0.000155 0.0000096 0.0000166 0.000117 0.000113 1997 3 9 50516 -0.182116 0.245883 -0.2338138 0.0028503 0.000137 -0.000376 0.000158 0.000155 0.0000096 0.0000138 0.000113 0.000111 1997 3 10 50517 -0.183987 0.248943 -0.2366740 0.0028809 0.000066 -0.000353 0.000146 0.000145 0.0000095 0.0000127 0.000109 0.000108 1997 3 11 50518 -0.185847 0.251860 -0.2395225 0.0028241 0.000008 -0.000269 0.000143 0.000140 0.0000095 0.0000141 0.000106 0.000106 1997 3 12 50519 -0.186537 0.255087 -0.2422825 0.0026865 -0.000011 -0.000108 0.000138 0.000135 0.0000094 0.0000150 0.000103 0.000103 1997 3 13 50520 -0.186600 0.258341 -0.2449140 0.0025352 0.000033 0.000133 0.000142 0.000133 0.0000094 0.0000117 0.000102 0.000104 1997 3 14 50521 -0.186516 0.262011 -0.2474145 0.0024143 0.000125 0.000401 0.000155 0.000141 0.0000095 0.0000069 0.000102 0.000105 1997 3 15 50522 -0.186176 0.265786 -0.2498081 0.0023647 0.000233 0.000624 0.000164 0.000150 0.0000095 0.0000081 0.000103 0.000106 1997 3 16 50523 -0.186406 0.270164 -0.2521329 0.0023370 0.000314 0.000725 0.000164 0.000149 0.0000095 0.0000081 0.000103 0.000106 1997 3 17 50524 -0.187615 0.274276 -0.2544347 0.0023480 0.000335 0.000662 0.000161 0.000146 0.0000096 0.0000105 0.000103 0.000107 1997 3 18 50525 -0.188396 0.277836 -0.2567594 0.0023658 0.000289 0.000450 0.000160 0.000144 0.0000096 0.0000141 0.000103 0.000108 1997 3 19 50526 -0.188697 0.281237 -0.2591407 0.0024028 0.000105 0.000007 0.000146 0.000132 0.0000097 0.0000113 0.000086 0.000082 1997 3 20 50527 -0.188857 0.285084 -0.2615878 0.0024243 0.000062 -0.000185 0.000136 0.000123 0.0000074 0.0000109 0.000089 0.000088 1997 3 21 50528 -0.189304 0.288621 -0.2640833 0.0024663 0.000051 -0.000293 0.000148 0.000130 0.0000069 0.0000192 0.000091 0.000091 1997 3 22 50529 -0.189367 0.292380 -0.2666037 0.0025028 0.000049 -0.000333 0.000160 0.000138 0.0000073 0.0000207 0.000091 0.000090 1997 3 23 50530 -0.189544 0.296181 -0.2691365 0.0025486 0.000052 -0.000298 0.000162 0.000142 0.0000077 0.0000114 0.000090 0.000089 1997 3 24 50531 -0.189513 0.299658 -0.2716819 0.0025806 0.000042 -0.000229 0.000158 0.000142 0.0000082 0.0000116 0.000089 0.000088 1997 3 25 50532 -0.189284 0.303666 -0.2742393 0.0025697 0.000017 -0.000163 0.000160 0.000145 0.0000086 0.0000146 0.000088 0.000086 1997 3 26 50533 -0.189419 0.307776 -0.2767937 0.0025439 -0.000044 -0.000128 0.000158 0.000140 0.0000086 0.0000160 0.000093 0.000083 1997 3 27 50534 -0.189983 0.311592 -0.2793146 0.0024796 -0.000048 -0.000121 0.000156 0.000138 0.0000082 0.0000158 0.000086 0.000076 1997 3 28 50535 -0.190318 0.315414 -0.2817800 0.0024261 -0.000006 -0.000139 0.000164 0.000144 0.0000076 0.0000149 0.000076 0.000068 1997 3 29 50536 -0.190616 0.319256 -0.2841911 0.0024289 0.000055 -0.000169 0.000170 0.000152 0.0000070 0.0000156 0.000066 0.000060 1997 3 30 50537 -0.191016 0.323265 -0.2865730 0.0023904 0.000109 -0.000198 0.000174 0.000153 0.0000064 0.0000163 0.000056 0.000052 1997 3 31 50538 -0.191362 0.326350 -0.2889623 0.0023863 0.000129 -0.000215 0.000164 0.000147 0.0000057 0.0000178 0.000046 0.000044 1997 4 1 50539 -0.191193 0.329507 -0.2913955 0.0024439 0.000112 -0.000220 0.000134 0.000129 0.0000051 0.0000188 0.000036 0.000036 1997 4 2 50540 -0.190354 0.333047 -0.2939037 0.0025653 -0.000009 -0.000194 0.000118 0.000117 0.0000075 0.0000151 0.000082 0.000078 1997 4 3 50541 -0.189316 0.336990 -0.2965122 0.0026676 0.000009 -0.000202 0.000135 0.000131 0.0000101 0.0000133 0.000102 0.000095 1997 4 4 50542 -0.188320 0.340892 -0.2992548 0.0028188 0.000033 -0.000205 0.000143 0.000137 0.0000107 0.0000142 0.000104 0.000096 1997 4 5 50543 -0.187108 0.344409 -0.3021373 0.0029525 0.000043 -0.000191 0.000157 0.000145 0.0000107 0.0000149 0.000103 0.000095 1997 4 6 50544 -0.186300 0.348125 -0.3051094 0.0029631 0.000048 -0.000163 0.000169 0.000154 0.0000107 0.0000181 0.000103 0.000094 1997 4 7 50545 -0.185520 0.351697 -0.3080782 0.0028890 0.000031 -0.000124 0.000167 0.000154 0.0000106 0.0000154 0.000103 0.000093 1997 4 8 50546 -0.184703 0.355074 -0.3109451 0.0027910 -0.000020 -0.000086 0.000154 0.000144 0.0000106 0.0000131 0.000102 0.000092 1997 4 9 50547 -0.183438 0.358488 -0.3136461 0.0026482 -0.000084 -0.000050 0.000135 0.000130 0.0000076 0.0000152 0.000084 0.000081 1997 4 10 50548 -0.182638 0.362048 -0.3161719 0.0024763 -0.000224 -0.000058 0.000144 0.000140 0.0000072 0.0000141 0.000082 0.000080 1997 4 11 50549 -0.181441 0.365781 -0.3185519 0.0023550 -0.000401 -0.000103 0.000163 0.000153 0.0000076 0.0000134 0.000085 0.000082 1997 4 12 50550 -0.180139 0.369887 -0.3208304 0.0022759 -0.000559 -0.000168 0.000155 0.000143 0.0000080 0.0000114 0.000089 0.000083 1997 4 13 50551 -0.179363 0.373662 -0.3230506 0.0021998 -0.000644 -0.000230 0.000144 0.000135 0.0000084 0.0000112 0.000092 0.000085 1997 4 14 50552 -0.179214 0.377420 -0.3252482 0.0021779 -0.000618 -0.000263 0.000142 0.000135 0.0000088 0.0000144 0.000095 0.000087 1997 4 15 50553 -0.179061 0.381137 -0.3274527 0.0021735 -0.000480 -0.000252 0.000140 0.000136 0.0000092 0.0000143 0.000099 0.000089 1997 4 16 50554 -0.178525 0.384245 -0.3296876 0.0022195 -0.000278 -0.000197 0.000134 0.000132 0.0000096 0.0000147 0.000102 0.000091 1997 4 17 50555 -0.177873 0.387259 -0.3319675 0.0022916 0.000000 -0.000091 0.000134 0.000136 0.0000068 0.0000148 0.000119 0.000147 1997 4 18 50556 -0.177050 0.390140 -0.3342942 0.0023416 0.000073 -0.000014 0.000140 0.000144 0.0000074 0.0000119 0.000133 0.000165 1997 4 19 50557 -0.175795 0.393437 -0.3366547 0.0023463 -0.000041 0.000017 0.000141 0.000145 0.0000097 0.0000114 0.000145 0.000162 1997 4 20 50558 -0.174831 0.396976 -0.3390247 0.0023424 -0.000232 0.000012 0.000133 0.000134 0.0000119 0.0000125 0.000158 0.000159 1997 4 21 50559 -0.173876 0.400428 -0.3413760 0.0023666 -0.000383 -0.000021 0.000127 0.000126 0.0000141 0.0000123 0.000169 0.000156 1997 4 22 50560 -0.173147 0.404218 -0.3436818 0.0023046 -0.000396 -0.000064 0.000128 0.000126 0.0000164 0.0000120 0.000182 0.000154 1997 4 23 50561 -0.172585 0.407670 -0.3459200 0.0022061 -0.000126 -0.000085 0.000122 0.000119 0.0000114 0.0000134 0.000138 0.000118 1997 4 24 50562 -0.171856 0.411073 -0.3480768 0.0021281 0.000157 -0.000122 0.000119 0.000116 0.0000100 0.0000142 0.000125 0.000108 1997 4 25 50563 -0.170606 0.414173 -0.3501499 0.0020577 0.000390 -0.000171 0.000125 0.000121 0.0000101 0.0000132 0.000124 0.000107 1997 4 26 50564 -0.168819 0.417303 -0.3521515 0.0020001 0.000519 -0.000222 0.000129 0.000123 0.0000102 0.0000131 0.000123 0.000107 1997 4 27 50565 -0.166827 0.420564 -0.3541100 0.0019604 0.000510 -0.000264 0.000130 0.000127 0.0000104 0.0000133 0.000122 0.000106 1997 4 28 50566 -0.165340 0.423749 -0.3560655 0.0019628 0.000381 -0.000287 0.000129 0.000126 0.0000105 0.0000117 0.000121 0.000105 1997 4 29 50567 -0.164245 0.426912 -0.3580613 0.0020024 0.000182 -0.000283 0.000123 0.000120 0.0000106 0.0000107 0.000120 0.000104 1997 4 30 50568 -0.163434 0.429334 -0.3601352 0.0020987 -0.000020 -0.000254 0.000118 0.000117 0.0000107 0.0000108 0.000119 0.000104 1997 5 1 50569 -0.162404 0.431750 -0.3623115 0.0022160 -0.000161 -0.000195 0.000122 0.000120 0.0000120 0.0000104 0.000136 0.000122 1997 5 2 50570 -0.161087 0.434188 -0.3645977 0.0023254 -0.000222 -0.000157 0.000128 0.000127 0.0000122 0.0000088 0.000136 0.000128 1997 5 3 50571 -0.158900 0.436788 -0.3669859 0.0024396 -0.000208 -0.000146 0.000126 0.000126 0.0000118 0.0000088 0.000130 0.000126 1997 5 4 50572 -0.156575 0.439570 -0.3694516 0.0025254 -0.000145 -0.000150 0.000129 0.000124 0.0000115 0.0000110 0.000123 0.000125 1997 5 5 50573 -0.153481 0.442739 -0.3719523 0.0024979 -0.000074 -0.000159 0.000131 0.000123 0.0000112 0.0000099 0.000116 0.000124 1997 5 6 50574 -0.150637 0.446235 -0.3744323 0.0024369 -0.000034 -0.000166 0.000127 0.000120 0.0000108 0.0000099 0.000109 0.000122 1997 5 7 50575 -0.147899 0.449611 -0.3768359 0.0023219 -0.000052 -0.000146 0.000119 0.000115 0.0000112 0.0000125 0.000137 0.000133 1997 5 8 50576 -0.145333 0.452400 -0.3791226 0.0021965 -0.000130 -0.000157 0.000118 0.000114 0.0000111 0.0000131 0.000140 0.000132 1997 5 9 50577 -0.142192 0.455308 -0.3812825 0.0020937 -0.000244 -0.000195 0.000123 0.000120 0.0000108 0.0000127 0.000135 0.000128 1997 5 10 50578 -0.139241 0.458269 -0.3833348 0.0020245 -0.000358 -0.000246 0.000124 0.000123 0.0000106 0.0000126 0.000130 0.000123 1997 5 11 50579 -0.136205 0.461278 -0.3853139 0.0019679 -0.000433 -0.000295 0.000116 0.000117 0.0000103 0.0000103 0.000125 0.000119 1997 5 12 50580 -0.133681 0.464289 -0.3872542 0.0019565 -0.000439 -0.000320 0.000104 0.000108 0.0000100 0.0000087 0.000120 0.000114 1997 5 13 50581 -0.131502 0.466869 -0.3891826 0.0019456 -0.000370 -0.000309 0.000101 0.000104 0.0000097 0.0000097 0.000115 0.000110 1997 5 14 50582 -0.129561 0.469383 -0.3911173 0.0019512 -0.000245 -0.000264 0.000101 0.000103 0.0000094 0.0000091 0.000109 0.000105 1997 5 15 50583 -0.127481 0.471622 -0.3930710 0.0019668 -0.000072 -0.000176 0.000102 0.000105 0.0000067 0.0000086 0.000099 0.000097 1997 5 16 50584 -0.125095 0.473694 -0.3950524 0.0019924 0.000029 -0.000118 0.000106 0.000108 0.0000058 0.0000090 0.000088 0.000085 1997 5 17 50585 -0.122414 0.475773 -0.3970673 0.0020229 0.000044 -0.000102 0.000112 0.000113 0.0000058 0.0000099 0.000077 0.000073 1997 5 18 50586 -0.119460 0.477841 -0.3991168 0.0020611 -0.000004 -0.000121 0.000109 0.000108 0.0000059 0.0000096 0.000066 0.000061 1997 5 19 50587 -0.116511 0.480560 -0.4011944 0.0020847 -0.000082 -0.000157 0.000105 0.000103 0.0000059 0.0000116 0.000056 0.000048 1997 5 20 50588 -0.113697 0.483115 -0.4032853 0.0020999 -0.000152 -0.000186 0.000097 0.000096 0.0000059 0.0000127 0.000045 0.000036 1997 5 21 50589 -0.110644 0.485829 -0.4053675 0.0020717 -0.000155 -0.000182 0.000094 0.000094 0.0000080 0.0000108 0.000065 0.000072 1997 5 22 50590 -0.108190 0.488552 -0.4074182 0.0020191 -0.000155 -0.000146 0.000103 0.000100 0.0000089 0.0000117 0.000075 0.000085 1997 5 23 50591 -0.105951 0.490841 -0.4094242 0.0019856 -0.000155 -0.000088 0.000105 0.000101 0.0000093 0.0000114 0.000080 0.000090 1997 5 24 50592 -0.103635 0.492983 -0.4113922 0.0019682 -0.000160 -0.000028 0.000107 0.000104 0.0000097 0.0000097 0.000084 0.000095 1997 5 25 50593 -0.101277 0.495362 -0.4133536 0.0019974 -0.000175 0.000006 0.000121 0.000120 0.0000101 0.0000124 0.000090 0.000100 1997 5 26 50594 -0.099112 0.497473 -0.4153581 0.0020725 -0.000195 -0.000006 0.000134 0.000133 0.0000105 0.0000157 0.000094 0.000105 1997 5 27 50595 -0.096770 0.499835 -0.4174588 0.0021639 -0.000210 -0.000079 0.000136 0.000134 0.0000109 0.0000133 0.000099 0.000109 1997 5 28 50596 -0.094165 0.501902 -0.4196937 0.0023053 -0.000210 -0.000209 0.000130 0.000128 0.0000113 0.0000114 0.000104 0.000114 1997 5 29 50597 -0.091594 0.503633 -0.4220711 0.0024434 -0.000189 -0.000378 0.000122 0.000119 0.0000115 0.0000119 0.000108 0.000118 1997 5 30 50598 -0.089458 0.505882 -0.4245631 0.0025203 -0.000152 -0.000547 0.000121 0.000117 0.0000117 0.0000122 0.000111 0.000121 1997 5 31 50599 -0.087332 0.507623 -0.4271102 0.0024993 -0.000114 -0.000670 0.000128 0.000126 0.0000119 0.0000109 0.000114 0.000124 1997 6 1 50600 -0.084875 0.509919 -0.4296336 0.0024634 -0.000089 -0.000704 0.000123 0.000122 0.0000122 0.0000084 0.000117 0.000128 1997 6 2 50601 -0.082575 0.511686 -0.4320536 0.0023445 -0.000085 -0.000623 0.000110 0.000108 0.0000124 0.0000100 0.000119 0.000131 1997 6 3 50602 -0.080141 0.513337 -0.4343075 0.0021589 -0.000105 -0.000429 0.000109 0.000108 0.0000126 0.0000116 0.000122 0.000134 1997 6 4 50603 -0.077336 0.514979 -0.4363626 0.0019463 -0.000151 -0.000136 0.000103 0.000103 0.0000089 0.0000108 0.000087 0.000101 1997 6 5 50604 -0.074855 0.516599 -0.4382196 0.0017560 -0.000172 0.000176 0.000099 0.000101 0.0000084 0.0000108 0.000087 0.000099 1997 6 6 50605 -0.072636 0.517722 -0.4399076 0.0016057 -0.000162 0.000450 0.000105 0.000108 0.0000090 0.0000106 0.000099 0.000109 1997 6 7 50606 -0.070501 0.518855 -0.4414714 0.0015162 -0.000123 0.000635 0.000105 0.000109 0.0000096 0.0000108 0.000110 0.000118 1997 6 8 50607 -0.067947 0.519435 -0.4429606 0.0014642 -0.000065 0.000697 0.000111 0.000115 0.0000102 0.0000103 0.000122 0.000128 1997 6 9 50608 -0.065371 0.519803 -0.4444204 0.0014657 -0.000013 0.000623 0.000121 0.000126 0.0000108 0.0000102 0.000134 0.000137 1997 6 10 50609 -0.061929 0.520159 -0.4458871 0.0015058 0.000011 0.000428 0.000120 0.000123 0.0000114 0.0000096 0.000146 0.000147 1997 6 11 50610 -0.058041 0.521133 -0.4473847 0.0015685 -0.000011 0.000149 0.000119 0.000119 0.0000120 0.0000094 0.000157 0.000156 1997 6 12 50611 -0.054129 0.522169 -0.4489230 0.0016070 -0.000085 -0.000161 0.000118 0.000121 0.0000118 0.0000096 0.000148 0.000146 1997 6 13 50612 -0.050405 0.523798 -0.4504974 0.0016039 -0.000187 -0.000437 0.000119 0.000122 0.0000114 0.0000078 0.000131 0.000129 1997 6 14 50613 -0.046756 0.525470 -0.4520908 0.0015869 -0.000281 -0.000623 0.000121 0.000124 0.0000109 0.0000096 0.000114 0.000113 1997 6 15 50614 -0.043321 0.527038 -0.4536772 0.0015502 -0.000328 -0.000682 0.000120 0.000123 0.0000105 0.0000107 0.000097 0.000096 1997 6 16 50615 -0.039729 0.528062 -0.4552246 0.0014798 -0.000302 -0.000608 0.000116 0.000119 0.0000101 0.0000083 0.000080 0.000079 1997 6 17 50616 -0.036096 0.528745 -0.4566973 0.0013894 -0.000201 -0.000431 0.000114 0.000116 0.0000096 0.0000082 0.000064 0.000062 1997 6 18 50617 -0.032369 0.529689 -0.4580611 0.0012579 -0.000017 -0.000176 0.000108 0.000110 0.0000092 0.0000088 0.000092 0.000089 1997 6 19 50618 -0.028862 0.530344 -0.4592932 0.0011450 0.000139 0.000028 0.000110 0.000112 0.0000093 0.0000100 0.000103 0.000102 1997 6 20 50619 -0.024908 0.531384 -0.4603955 0.0010392 0.000241 0.000143 0.000119 0.000120 0.0000096 0.0000115 0.000107 0.000108 1997 6 21 50620 -0.021216 0.531954 -0.4614026 0.0009675 0.000283 0.000166 0.000117 0.000115 0.0000099 0.0000114 0.000110 0.000115 1997 6 22 50621 -0.017109 0.532640 -0.4623778 0.0009934 0.000272 0.000114 0.000115 0.000111 0.0000102 0.0000095 0.000114 0.000122 1997 6 23 50622 -0.012902 0.533124 -0.4633940 0.0011132 0.000232 0.000028 0.000117 0.000112 0.0000105 0.0000089 0.000117 0.000128 1997 6 24 50623 -0.008664 0.533452 -0.4645080 0.0012149 0.000188 -0.000045 0.000117 0.000111 0.0000108 0.0000100 0.000121 0.000135 1997 6 25 50624 -0.004888 0.533917 -0.4657407 0.0013032 0.000157 -0.000074 0.000114 0.000107 0.0000112 0.0000098 0.000125 0.000142 1997 6 26 50625 -0.001215 0.534608 -0.4670709 0.0013698 0.000147 -0.000050 0.000114 0.000111 0.0000112 0.0000094 0.000125 0.000142 1997 6 27 50626 0.002592 0.534977 -0.4684446 0.0013651 0.000147 0.000009 0.000118 0.000114 0.0000112 0.0000103 0.000123 0.000139 1997 6 28 50627 0.006339 0.535385 -0.4697921 0.0013108 0.000142 0.000070 0.000117 0.000112 0.0000112 0.0000110 0.000122 0.000137 1997 6 29 50628 0.010642 0.535343 -0.4710455 0.0011712 0.000122 0.000100 0.000121 0.000117 0.0000112 0.0000093 0.000120 0.000135 1997 6 30 50629 0.014932 0.535816 -0.4721535 0.0010050 0.000085 0.000081 0.000124 0.000122 0.0000112 0.0000085 0.000119 0.000132 1997 7 1 50630 0.019340 0.536433 0.5269097 0.0008630 0.000039 0.000012 0.000129 0.000128 0.0000112 0.0000092 0.000117 0.000130 1997 7 2 50631 0.023456 0.537042 0.5261387 0.0007066 -0.000001 -0.000085 0.000127 0.000130 0.0000112 0.0000085 0.000116 0.000128 1997 7 3 50632 0.027864 0.537116 0.5254994 0.0005831 -0.000020 -0.000181 0.000120 0.000127 0.0000111 0.0000093 0.000116 0.000128 1997 7 4 50633 0.031305 0.537062 0.5249386 0.0005168 -0.000019 -0.000248 0.000125 0.000128 0.0000109 0.0000112 0.000117 0.000130 1997 7 5 50634 0.035298 0.536740 0.5243985 0.0005230 -0.000009 -0.000271 0.000129 0.000131 0.0000107 0.0000108 0.000117 0.000132 1997 7 6 50635 0.038844 0.536304 0.5238302 0.0005919 -0.000008 -0.000253 0.000125 0.000130 0.0000105 0.0000110 0.000118 0.000133 1997 7 7 50636 0.042671 0.535549 0.5232008 0.0006941 -0.000031 -0.000208 0.000121 0.000124 0.0000104 0.0000126 0.000119 0.000135 1997 7 8 50637 0.046555 0.534975 0.5224910 0.0008101 -0.000083 -0.000161 0.000118 0.000121 0.0000102 0.0000142 0.000120 0.000136 1997 7 9 50638 0.050967 0.534609 0.5216906 0.0008801 -0.000150 -0.000127 0.000112 0.000118 0.0000100 0.0000135 0.000120 0.000138 1997 7 10 50639 0.054916 0.534157 0.5207943 0.0009250 -0.000249 -0.000132 0.000110 0.000116 0.0000104 0.0000135 0.000152 0.000148 1997 7 11 50640 0.058452 0.533941 0.5198047 0.0010008 -0.000247 -0.000131 0.000111 0.000114 0.0000109 0.0000137 0.000158 0.000153 1997 7 12 50641 0.061655 0.533144 0.5187396 0.0010663 -0.000162 -0.000119 0.000115 0.000117 0.0000113 0.0000141 0.000150 0.000153 1997 7 13 50642 0.065424 0.532520 0.5176326 0.0011008 -0.000059 -0.000101 0.000112 0.000115 0.0000117 0.0000108 0.000142 0.000154 1997 7 14 50643 0.068916 0.531562 0.5165230 0.0011179 0.000008 -0.000076 0.000108 0.000108 0.0000121 0.0000096 0.000134 0.000155 1997 7 15 50644 0.072706 0.530815 0.5154397 0.0011037 0.000005 -0.000043 0.000112 0.000111 0.0000125 0.0000121 0.000127 0.000155 1997 7 16 50645 0.075911 0.529931 0.5143876 0.0010375 -0.000146 -0.000030 0.000109 0.000108 0.0000102 0.0000113 0.000107 0.000113 1997 7 17 50646 0.078949 0.529463 0.5133416 0.0010255 -0.000236 0.000025 0.000105 0.000103 0.0000099 0.0000114 0.000107 0.000585 1997 7 18 50647 0.081623 0.528779 0.5122573 0.0011073 -0.000253 0.000095 0.000112 0.000110 0.0000101 0.0000115 0.000116 0.001077 1997 7 19 50648 0.084611 0.527946 0.5110819 0.0012181 -0.000198 0.000151 0.000115 0.000113 0.0000104 0.0000147 0.000124 0.000902 1997 7 20 50649 0.087850 0.526884 0.5097669 0.0014014 -0.000097 0.000177 0.000115 0.000109 0.0000106 0.0000153 0.000132 0.000728 1997 7 21 50650 0.091954 0.525766 0.5082793 0.0016225 -0.000003 0.000162 0.000115 0.000111 0.0000108 0.0000131 0.000140 0.000554 1997 7 22 50651 0.095709 0.524605 0.5066097 0.0017907 0.000031 0.000105 0.000116 0.000115 0.0000111 0.0000092 0.000149 0.000379 1997 7 23 50652 0.099167 0.523566 0.5047751 0.0019132 -0.000021 0.000020 0.000120 0.000117 0.0000113 0.0000103 0.000157 0.000205 1997 7 24 50653 0.102242 0.522464 0.5028174 0.0020018 -0.000176 -0.000123 0.000119 0.000116 0.0000103 0.0000118 0.000841 0.000224 1997 7 25 50654 0.105473 0.521698 0.5007990 0.0020098 -0.000356 -0.000141 0.000106 0.000105 0.0000076 0.0000126 0.000368 0.000108 1997 7 26 50655 0.108113 0.521090 0.4988088 0.0019122 -0.000455 -0.000153 0.000107 0.000103 0.0000070 0.0000172 0.000050 0.000051 1997 7 27 50656 0.110371 0.519959 0.4969340 0.0017756 -0.000455 -0.000178 0.000113 0.000108 0.0000076 0.0000177 0.000062 0.000061 1997 7 28 50657 0.112668 0.518779 0.4952287 0.0016205 -0.000383 -0.000188 0.000106 0.000102 0.0000081 0.0000154 0.000074 0.000070 1997 7 29 50658 0.114958 0.517244 0.4937041 0.0014592 -0.000286 -0.000172 0.000105 0.000101 0.0000087 0.0000127 0.000086 0.000080 1997 7 30 50659 0.117711 0.515757 0.4923325 0.0013300 -0.000219 -0.000116 0.000104 0.000101 0.0000093 0.0000151 0.000098 0.000090 1997 7 31 50660 0.120360 0.514741 0.4910629 0.0012496 -0.000234 -0.000009 0.000105 0.000101 0.0000094 0.0000168 0.000106 0.000097 1997 8 1 50661 0.123449 0.513549 0.4898395 0.0012349 -0.000312 0.000120 0.000104 0.000099 0.0000094 0.0000161 0.000113 0.000104 1997 8 2 50662 0.126385 0.512213 0.4886163 0.0012620 -0.000404 0.000233 0.000103 0.000100 0.0000094 0.0000167 0.000119 0.000110 1997 8 3 50663 0.129681 0.510929 0.4873630 0.0012637 -0.000455 0.000289 0.000120 0.000123 0.0000094 0.0000171 0.000126 0.000117 1997 8 4 50664 0.132427 0.509500 0.4860646 0.0012864 -0.000421 0.000264 0.000138 0.000145 0.0000094 0.0000140 0.000133 0.000124 1997 8 5 50665 0.135259 0.507979 0.4847168 0.0013547 -0.000300 0.000163 0.000136 0.000140 0.0000094 0.0000128 0.000139 0.000130 1997 8 6 50666 0.137878 0.506602 0.4833214 0.0014146 -0.000059 -0.000024 0.000127 0.000131 0.0000094 0.0000132 0.000106 0.000119 1997 8 7 50667 0.140163 0.505456 0.4818846 0.0014477 0.000084 -0.000164 0.000125 0.000132 0.0000096 0.0000110 0.000099 0.000115 1997 8 8 50668 0.142402 0.503814 0.4804201 0.0014637 0.000111 -0.000234 0.000131 0.000139 0.0000099 0.0000081 0.000104 0.000116 1997 8 9 50669 0.144681 0.502297 0.4789498 0.0014749 0.000050 -0.000238 0.000131 0.000138 0.0000102 0.0000075 0.000109 0.000117 1997 8 10 50670 0.147036 0.500393 0.4775020 0.0014478 -0.000056 -0.000198 0.000121 0.000126 0.0000105 0.0000106 0.000115 0.000118 1997 8 11 50671 0.149140 0.498469 0.4761047 0.0013367 -0.000151 -0.000147 0.000114 0.000117 0.0000108 0.0000124 0.000120 0.000119 1997 8 12 50672 0.151293 0.496316 0.4747792 0.0012673 -0.000206 -0.000119 0.000112 0.000114 0.0000111 0.0000117 0.000125 0.000120 1997 8 13 50673 0.153598 0.494199 0.4735326 0.0012132 -0.000137 -0.000158 0.000112 0.000114 0.0000097 0.0000118 0.000105 0.000097 1997 8 14 50674 0.155647 0.492201 0.4723521 0.0011805 -0.000176 -0.000199 0.000112 0.000116 0.0000094 0.0000108 0.000101 0.000094 1997 8 15 50675 0.157814 0.489971 0.4711995 0.0011873 -0.000305 -0.000238 0.000113 0.000116 0.0000096 0.0000121 0.000103 0.000098 1997 8 16 50676 0.159563 0.487993 0.4700122 0.0012675 -0.000476 -0.000267 0.000115 0.000116 0.0000098 0.0000176 0.000105 0.000102 1997 8 17 50677 0.161388 0.485869 0.4687151 0.0013937 -0.000625 -0.000280 0.000120 0.000115 0.0000100 0.0000130 0.000108 0.000105 1997 8 18 50678 0.163139 0.484060 0.4672437 0.0015764 -0.000681 -0.000277 0.000123 0.000116 0.0000102 0.0000100 0.000110 0.000109 1997 8 19 50679 0.165121 0.481673 0.4655729 0.0017180 -0.000604 -0.000262 0.000121 0.000120 0.0000103 0.0000158 0.000112 0.000113 1997 8 20 50680 0.167062 0.479566 0.4637360 0.0018368 -0.000417 -0.000230 0.000114 0.000116 0.0000105 0.0000180 0.000114 0.000116 1997 8 21 50681 0.169180 0.477147 0.4618200 0.0019157 -0.000091 -0.000196 0.000114 0.000116 0.0000086 0.0000114 0.000187 0.000173 1997 8 22 50682 0.171474 0.474828 0.4599358 0.0018568 0.000051 -0.000117 0.000120 0.000122 0.0000083 0.0000084 0.000191 0.000172 1997 8 23 50683 0.174252 0.472410 0.4581735 0.0017074 -0.000012 -0.000007 0.000125 0.000126 0.0000090 0.0000134 0.000161 0.000143 1997 8 24 50684 0.177101 0.470443 0.4565714 0.0015156 -0.000192 0.000101 0.000123 0.000126 0.0000096 0.0000138 0.000131 0.000114 1997 8 25 50685 0.179752 0.468270 0.4551139 0.0013896 -0.000373 0.000164 0.000116 0.000121 0.0000102 0.0000143 0.000102 0.000085 1997 8 26 50686 0.181905 0.466936 0.4537531 0.0013090 -0.000422 0.000138 0.000111 0.000119 0.0000108 0.0000130 0.000072 0.000056 1997 8 27 50687 0.183840 0.465205 0.4524377 0.0012868 -0.000202 0.000010 0.000103 0.000113 0.0000114 0.0000152 0.000110 0.000096 1997 8 28 50688 0.186067 0.463730 0.4511305 0.0013267 0.000208 -0.000246 0.000103 0.000113 0.0000114 0.0000193 0.000119 0.000108 1997 8 29 50689 0.188347 0.461845 0.4498106 0.0013057 0.000713 -0.000566 0.000112 0.000118 0.0000111 0.0000169 0.000117 0.000109 1997 8 30 50690 0.190448 0.459950 0.4484645 0.0013437 0.001169 -0.000861 0.000112 0.000115 0.0000109 0.0000151 0.000115 0.000110 1997 8 31 50691 0.192603 0.458019 0.4470785 0.0013676 0.001426 -0.001038 0.000110 0.000115 0.0000107 0.0000118 0.000113 0.000110 1997 9 1 50692 0.194945 0.456263 0.4456381 0.0014774 0.001383 -0.001029 0.000109 0.000113 0.0000104 0.0000127 0.000111 0.000111 1997 9 2 50693 0.197590 0.454656 0.4441338 0.0015618 0.001024 -0.000820 0.000108 0.000111 0.0000102 0.0000146 0.000109 0.000112 1997 9 3 50694 0.200235 0.452752 0.4425670 0.0016277 0.000444 -0.000466 0.000110 0.000110 0.0000100 0.0000148 0.000107 0.000113 1997 9 4 50695 0.203059 0.450912 0.4409535 0.0016325 -0.000315 0.000022 0.000114 0.000111 0.0000136 0.0000137 0.000176 0.000201 1997 9 5 50696 0.204955 0.448951 0.4393222 0.0016081 -0.000785 0.000313 0.000114 0.000110 0.0000139 0.0000146 0.000175 0.000205 1997 9 6 50697 0.206395 0.446467 0.4377102 0.0015829 -0.000895 0.000375 0.000112 0.000106 0.0000126 0.0000161 0.000140 0.000166 1997 9 7 50698 0.208043 0.443882 0.4361530 0.0015296 -0.000726 0.000276 0.000117 0.000111 0.0000112 0.0000141 0.000105 0.000127 1997 9 8 50699 0.209552 0.441099 0.4346725 0.0014525 -0.000413 0.000103 0.000115 0.000116 0.0000098 0.0000137 0.000070 0.000088 1997 9 9 50700 0.211343 0.438611 0.4332684 0.0014027 -0.000119 -0.000054 0.000107 0.000109 0.0000084 0.0000165 0.000035 0.000049 1997 9 10 50701 0.212854 0.436217 0.4319145 0.0013679 -0.000069 -0.000027 0.000106 0.000107 0.0000090 0.0000166 0.000086 0.000080 1997 9 11 50702 0.214019 0.433372 0.4305614 0.0013873 -0.000120 -0.000056 0.000128 0.000125 0.0000112 0.0000122 0.000108 0.000096 1997 9 12 50703 0.215529 0.430713 0.4291456 0.0015171 -0.000245 -0.000132 0.000132 0.000126 0.0000140 0.0000131 0.000117 0.000105 1997 9 13 50704 0.217055 0.428351 0.4275980 0.0016421 -0.000383 -0.000227 0.000121 0.000115 0.0000167 0.0000132 0.000126 0.000113 1997 9 14 50705 0.217814 0.426483 0.4258564 0.0018153 -0.000457 -0.000312 0.000123 0.000116 0.0000194 0.0000104 0.000135 0.000122 1997 9 15 50706 0.218017 0.424553 0.4238830 0.0020331 -0.000422 -0.000338 0.000118 0.000115 0.0000222 0.0000084 0.000144 0.000130 1997 9 16 50707 0.218023 0.421875 0.4216830 0.0022845 -0.000274 -0.000270 0.000113 0.000112 0.0000249 0.0000084 0.000153 0.000138 1997 9 17 50708 0.218090 0.419101 0.4193133 0.0024114 -0.000022 -0.000061 0.000111 0.000109 0.0000195 0.0000124 0.000157 0.000148 1997 9 18 50709 0.218458 0.416716 0.4168726 0.0024452 0.000219 0.000167 0.000117 0.000111 0.0000171 0.0000181 0.000152 0.000145 1997 9 19 50710 0.219221 0.414234 0.4144728 0.0023686 0.000397 0.000370 0.000123 0.000114 0.0000159 0.0000184 0.000144 0.000138 1997 9 20 50711 0.219878 0.411881 0.4122043 0.0021797 0.000477 0.000508 0.000123 0.000115 0.0000146 0.0000161 0.000136 0.000132 1997 9 21 50712 0.220594 0.409494 0.4101113 0.0020007 0.000448 0.000551 0.000124 0.000115 0.0000134 0.0000144 0.000128 0.000125 1997 9 22 50713 0.221248 0.406904 0.4081870 0.0018665 0.000327 0.000493 0.000118 0.000109 0.0000121 0.0000156 0.000120 0.000118 1997 9 23 50714 0.221591 0.404334 0.4063863 0.0017711 0.000153 0.000355 0.000111 0.000102 0.0000109 0.0000131 0.000112 0.000112 1997 9 24 50715 0.221756 0.401145 0.4046470 0.0017222 -0.000026 0.000169 0.000109 0.000103 0.0000096 0.0000078 0.000104 0.000105 1997 9 25 50716 0.221341 0.398095 0.4029093 0.0017322 -0.000163 -0.000023 0.000116 0.000114 0.0000099 0.0000078 0.000106 0.000107 1997 9 26 50717 0.221066 0.394635 0.4011294 0.0018206 -0.000236 -0.000188 0.000121 0.000116 0.0000106 0.0000129 0.000111 0.000111 1997 9 27 50718 0.221164 0.391480 0.3992853 0.0018792 -0.000237 -0.000303 0.000120 0.000109 0.0000114 0.0000186 0.000117 0.000116 1997 9 28 50719 0.221066 0.388147 0.3973749 0.0019254 -0.000177 -0.000359 0.000117 0.000107 0.0000122 0.0000168 0.000121 0.000121 1997 9 29 50720 0.221097 0.385334 0.3954091 0.0019716 -0.000081 -0.000360 0.000115 0.000106 0.0000129 0.0000148 0.000127 0.000125 1997 9 30 50721 0.221243 0.382258 0.3934029 0.0020208 0.000019 -0.000317 0.000116 0.000105 0.0000137 0.0000151 0.000132 0.000130 1997 10 1 50722 0.221189 0.379640 0.3913707 0.0020488 0.000099 -0.000247 0.000116 0.000107 0.0000145 0.0000162 0.000137 0.000135 1997 10 2 50723 0.221599 0.376432 0.3893270 0.0020924 0.000135 -0.000168 0.000116 0.000106 0.0000150 0.0000111 0.000134 0.000135 1997 10 3 50724 0.221865 0.373521 0.3872900 0.0020552 0.000125 -0.000093 0.000113 0.000105 0.0000155 0.0000087 0.000130 0.000133 1997 10 4 50725 0.221857 0.370157 0.3852812 0.0019698 0.000081 -0.000028 0.000114 0.000104 0.0000160 0.0000115 0.000125 0.000131 1997 10 5 50726 0.222227 0.367288 0.3833192 0.0019030 0.000019 0.000026 0.000117 0.000107 0.0000165 0.0000129 0.000121 0.000129 1997 10 6 50727 0.222295 0.364715 0.3814106 0.0018515 -0.000039 0.000070 0.000116 0.000110 0.0000170 0.0000121 0.000116 0.000127 1997 10 7 50728 0.222791 0.362235 0.3795439 0.0018320 -0.000078 0.000110 0.000113 0.000107 0.0000174 0.0000098 0.000111 0.000125 1997 10 8 50729 0.222699 0.359794 0.3776901 0.0018513 -0.000084 0.000149 0.000112 0.000105 0.0000131 0.0000123 0.000123 0.000124 1997 10 9 50730 0.222750 0.357422 0.3758079 0.0019155 -0.000071 0.000188 0.000115 0.000107 0.0000116 0.0000131 0.000127 0.000126 1997 10 10 50731 0.222314 0.355300 0.3738511 0.0020011 -0.000050 0.000224 0.000116 0.000111 0.0000114 0.0000115 0.000129 0.000128 1997 10 11 50732 0.222434 0.352667 0.3717751 0.0021460 -0.000034 0.000255 0.000117 0.000113 0.0000111 0.0000110 0.000130 0.000130 1997 10 12 50733 0.223054 0.349963 0.3695471 0.0023027 -0.000036 0.000278 0.000119 0.000113 0.0000109 0.0000112 0.000132 0.000132 1997 10 13 50734 0.224073 0.347273 0.3671575 0.0024692 -0.000064 0.000292 0.000118 0.000112 0.0000106 0.0000116 0.000134 0.000134 1997 10 14 50735 0.224584 0.344836 0.3646307 0.0025606 -0.000117 0.000294 0.000115 0.000112 0.0000104 0.0000107 0.000135 0.000136 1997 10 15 50736 0.225122 0.342080 0.3620275 0.0025887 -0.000189 0.000286 0.000112 0.000110 0.0000101 0.0000100 0.000137 0.000138 1997 10 16 50737 0.225533 0.339439 0.3594317 0.0025556 -0.000266 0.000271 0.000115 0.000111 0.0000106 0.0000099 0.000132 0.000140 1997 10 17 50738 0.225813 0.336835 0.3569275 0.0024503 -0.000325 0.000254 0.000119 0.000112 0.0000113 0.0000090 0.000125 0.000141 1997 10 18 50739 0.225762 0.333759 0.3545757 0.0022688 -0.000347 0.000237 0.000117 0.000113 0.0000119 0.0000097 0.000118 0.000141 1997 10 19 50740 0.226092 0.330701 0.3524003 0.0020821 -0.000319 0.000220 0.000114 0.000117 0.0000126 0.0000108 0.000111 0.000142 1997 10 20 50741 0.226633 0.327608 0.3503898 0.0019445 -0.000243 0.000202 0.000115 0.000116 0.0000133 0.0000117 0.000104 0.000143 1997 10 21 50742 0.227635 0.324920 0.3485088 0.0018422 -0.000138 0.000177 0.000112 0.000109 0.0000139 0.0000121 0.000097 0.000144 1997 10 22 50743 0.228165 0.322509 0.3467104 0.0017720 -0.000009 0.000146 0.000106 0.000108 0.0000099 0.0000125 0.000088 0.000100 1997 10 23 50744 0.228171 0.319985 0.3449475 0.0017467 0.000059 0.000094 0.000109 0.000112 0.0000088 0.0000107 0.000083 0.000083 1997 10 24 50745 0.227665 0.317489 0.3431791 0.0017788 0.000063 0.000027 0.000112 0.000115 0.0000091 0.0000084 0.000079 0.000078 1997 10 25 50746 0.227157 0.314739 0.3413754 0.0018396 0.000022 -0.000036 0.000115 0.000114 0.0000093 0.0000088 0.000075 0.000073 1997 10 26 50747 0.226314 0.311786 0.3395191 0.0018992 -0.000034 -0.000077 0.000117 0.000114 0.0000096 0.0000092 0.000071 0.000068 1997 10 27 50748 0.225499 0.308568 0.3376040 0.0019664 -0.000079 -0.000079 0.000118 0.000115 0.0000098 0.0000088 0.000067 0.000063 1997 10 28 50749 0.224390 0.305595 0.3356319 0.0020148 -0.000101 -0.000033 0.000114 0.000112 0.0000101 0.0000072 0.000063 0.000058 1997 10 29 50750 0.222730 0.302421 0.3336080 0.0020479 -0.000050 0.000061 0.000110 0.000110 0.0000103 0.0000091 0.000102 0.000101 1997 10 30 50751 0.220970 0.299050 0.3315410 0.0020801 -0.000085 0.000183 0.000110 0.000108 0.0000073 0.0000129 0.000129 0.000131 1997 10 31 50752 0.219347 0.295714 0.3294447 0.0021167 -0.000153 0.000301 0.000111 0.000108 0.0000064 0.0000123 0.000227 0.000265 1997 11 1 50753 0.218072 0.292445 0.3273393 0.0021343 -0.000226 0.000385 0.000114 0.000112 0.0000067 0.0000120 0.000353 0.000440 1997 11 2 50754 0.217591 0.289402 0.3252457 0.0020875 -0.000279 0.000409 0.000119 0.000119 0.0000070 0.0000102 0.000479 0.000616 1997 11 3 50755 0.217324 0.287293 0.3231740 0.0020597 -0.000279 0.000362 0.000124 0.000126 0.0000073 0.0000081 0.000604 0.000791 1997 11 4 50756 0.216493 0.285170 0.3211142 0.0020536 -0.000202 0.000245 0.000122 0.000125 0.0000076 0.0000074 0.000577 0.000759 1997 11 5 50757 0.215898 0.282809 0.3190349 0.0020705 -0.000045 0.000077 0.000117 0.000120 0.0000079 0.0000098 0.000180 0.000223 1997 11 6 50758 0.215319 0.280457 0.3168931 0.0021648 0.000131 -0.000097 0.000121 0.000123 0.0000081 0.0000147 0.000085 0.000093 1997 11 7 50759 0.214802 0.278158 0.3146479 0.0022973 0.000292 -0.000240 0.000130 0.000131 0.0000084 0.0000128 0.000091 0.000098 1997 11 8 50760 0.213896 0.275966 0.3122734 0.0024195 0.000402 -0.000323 0.000121 0.000124 0.0000086 0.0000078 0.000097 0.000103 1997 11 9 50761 0.213405 0.273564 0.3097675 0.0025404 0.000431 -0.000327 0.000117 0.000118 0.0000089 0.0000083 0.000103 0.000108 1997 11 10 50762 0.212551 0.271242 0.3071571 0.0026659 0.000368 -0.000255 0.000122 0.000123 0.0000091 0.0000096 0.000109 0.000113 1997 11 11 50763 0.211738 0.268904 0.3044993 0.0026962 0.000223 -0.000125 0.000125 0.000127 0.0000094 0.0000110 0.000116 0.000118 1997 11 12 50764 0.210246 0.266338 0.3018742 0.0026125 0.000029 0.000024 0.000125 0.000128 0.0000096 0.0000128 0.000122 0.000123 1997 11 13 50765 0.208767 0.263616 0.2993692 0.0024378 -0.000186 0.000172 0.000125 0.000126 0.0000092 0.0000138 0.000158 0.000121 1997 11 14 50766 0.206995 0.261374 0.2970559 0.0021955 -0.000326 0.000240 0.000126 0.000126 0.0000086 0.0000160 0.000160 0.000112 1997 11 15 50767 0.205494 0.259115 0.2949694 0.0019513 -0.000359 0.000222 0.000130 0.000127 0.0000079 0.0000168 0.000140 0.000101 1997 11 16 50768 0.203839 0.257088 0.2930983 0.0017576 -0.000299 0.000155 0.000132 0.000127 0.0000073 0.0000160 0.000120 0.000089 1997 11 17 50769 0.202622 0.254693 0.2913929 0.0016514 -0.000178 0.000085 0.000129 0.000120 0.0000066 0.0000124 0.000099 0.000078 1997 11 18 50770 0.201672 0.252627 0.2897853 0.0015871 -0.000048 0.000052 0.000120 0.000114 0.0000060 0.0000110 0.000079 0.000067 1997 11 19 50771 0.200817 0.250249 0.2882134 0.0015729 0.000086 0.000103 0.000112 0.000110 0.0000075 0.0000105 0.000086 0.000092 1997 11 20 50772 0.199279 0.248111 0.2866372 0.0015985 0.000086 0.000186 0.000118 0.000115 0.0000079 0.0000096 0.000090 0.000104 1997 11 21 50773 0.197455 0.245593 0.2850403 0.0015850 0.000031 0.000275 0.000125 0.000124 0.0000078 0.0000113 0.000092 0.000112 1997 11 22 50774 0.195661 0.242726 0.2834230 0.0016019 0.000064 0.000332 0.000130 0.000128 0.0000077 0.0000143 0.000098 0.000111 1997 11 23 50775 0.194078 0.239804 0.2817911 0.0016349 0.000120 0.000332 0.000135 0.000131 0.0000076 0.0000146 0.000104 0.000110 1997 11 24 50776 0.192271 0.236980 0.2801511 0.0016702 0.000166 0.000264 0.000129 0.000125 0.0000075 0.0000129 0.000110 0.000108 1997 11 25 50777 0.190302 0.234280 0.2785106 0.0016532 0.000163 0.000137 0.000122 0.000116 0.0000074 0.0000122 0.000116 0.000107 1997 11 26 50778 0.188377 0.232060 0.2768808 0.0016086 0.000031 -0.000024 0.000124 0.000117 0.0000080 0.0000125 0.000064 0.000059 1997 11 27 50779 0.186249 0.230173 0.2752773 0.0015454 -0.000102 -0.000176 0.000127 0.000124 0.0000085 0.0000138 0.000059 0.000057 1997 11 28 50780 0.183518 0.228571 0.2737164 0.0015002 -0.000214 -0.000283 0.000134 0.000139 0.0000091 0.0000115 0.000070 0.000071 1997 11 29 50781 0.180993 0.226602 0.2722107 0.0014525 -0.000284 -0.000323 0.000140 0.000146 0.0000096 0.0000123 0.000081 0.000085 1997 11 30 50782 0.178392 0.225179 0.2707646 0.0014095 -0.000289 -0.000284 0.000145 0.000149 0.0000101 0.0000140 0.000093 0.000098 1997 12 1 50783 0.175764 0.223419 0.2693715 0.0013851 -0.000226 -0.000179 0.000145 0.000152 0.0000107 0.0000106 0.000104 0.000112 1997 12 2 50784 0.173408 0.221392 0.2680103 0.0013922 -0.000106 -0.000040 0.000136 0.000140 0.0000112 0.0000104 0.000115 0.000126 1997 12 3 50785 0.171865 0.219163 0.2666420 0.0014331 0.000052 0.000094 0.000137 0.000136 0.0000118 0.0000109 0.000127 0.000140 1997 12 4 50786 0.170329 0.217143 0.2652098 0.0015102 0.000218 0.000182 0.000132 0.000137 0.0000117 0.0000110 0.000134 0.000132 1997 12 5 50787 0.168637 0.215667 0.2636467 0.0016396 0.000362 0.000210 0.000132 0.000133 0.0000113 0.0000102 0.000140 0.000117 1997 12 6 50788 0.166328 0.213955 0.2618945 0.0018293 0.000455 0.000188 0.000138 0.000139 0.0000110 0.0000096 0.000146 0.000101 1997 12 7 50789 0.163801 0.212229 0.2599281 0.0020473 0.000476 0.000140 0.000140 0.000144 0.0000107 0.0000107 0.000152 0.000085 1997 12 8 50790 0.161484 0.210355 0.2577759 0.0022250 0.000419 0.000096 0.000143 0.000145 0.0000103 0.0000104 0.000159 0.000070 1997 12 9 50791 0.158993 0.208501 0.2555182 0.0022881 0.000297 0.000070 0.000144 0.000145 0.0000100 0.0000103 0.000165 0.000054 1997 12 10 50792 0.156853 0.206715 0.2532609 0.0022288 0.000154 0.000124 0.000146 0.000146 0.0000097 0.0000103 0.000128 0.000112 1997 12 11 50793 0.155310 0.205117 0.2510961 0.0021085 -0.000017 0.000097 0.000144 0.000143 0.0000082 0.0000098 0.000127 0.000124 1997 12 12 50794 0.153794 0.203631 0.2490738 0.0019685 -0.000095 0.000066 0.000141 0.000139 0.0000076 0.0000107 0.000126 0.000120 1997 12 13 50795 0.152239 0.202272 0.2472055 0.0018030 -0.000077 0.000047 0.000141 0.000137 0.0000076 0.0000119 0.000121 0.000117 1997 12 14 50796 0.149623 0.200836 0.2454799 0.0016447 -0.000001 0.000040 0.000137 0.000134 0.0000076 0.0000109 0.000116 0.000113 1997 12 15 50797 0.146675 0.198359 0.2438737 0.0015303 0.000087 0.000046 0.000131 0.000130 0.0000077 0.0000093 0.000111 0.000110 1997 12 16 50798 0.143857 0.195980 0.2423540 0.0014917 0.000142 0.000060 0.000131 0.000128 0.0000077 0.0000088 0.000107 0.000106 1997 12 17 50799 0.140927 0.193878 0.2408769 0.0014829 0.000136 0.000065 0.000128 0.000125 0.0000095 0.0000091 0.000106 0.000104 1997 12 18 50800 0.138675 0.192033 0.2393924 0.0015079 0.000058 0.000048 0.000099 0.000100 0.0000053 0.0000096 0.000046 0.000049 1997 12 19 50801 0.137138 0.191133 0.2378677 0.0015456 0.000064 -0.000050 0.000107 0.000109 0.0000040 0.0000100 0.000023 0.000028 1997 12 20 50802 0.135116 0.190456 0.2362881 0.0015972 0.000153 -0.000194 0.000139 0.000137 0.0000052 0.0000097 0.000031 0.000033 1997 12 21 50803 0.132227 0.189541 0.2346504 0.0016515 0.000253 -0.000311 0.000130 0.000130 0.0000064 0.0000090 0.000038 0.000037 1997 12 22 50804 0.129360 0.188072 0.2329643 0.0017059 0.000304 -0.000335 0.000120 0.000120 0.0000076 0.0000093 0.000045 0.000042 1997 12 23 50805 0.126817 0.186715 0.2312522 0.0017340 0.000261 -0.000232 0.000114 0.000115 0.0000088 0.0000085 0.000053 0.000046 1997 12 24 50806 0.123518 0.185008 0.2295475 0.0016705 0.000018 0.000052 0.000110 0.000110 0.0000100 0.0000070 0.000106 0.000107 1997 12 25 50807 0.120630 0.183026 0.2278885 0.0016101 -0.000153 0.000329 0.000117 0.000116 0.0000098 0.0000085 0.000111 0.000114 1997 12 26 50808 0.117941 0.181651 0.2263086 0.0015241 -0.000249 0.000550 0.000122 0.000122 0.0000094 0.0000099 0.000106 0.000109 1997 12 27 50809 0.115329 0.180006 0.2248283 0.0014015 -0.000258 0.000665 0.000118 0.000119 0.0000089 0.0000096 0.000101 0.000104 1997 12 28 50810 0.112880 0.178568 0.2234478 0.0013069 -0.000189 0.000651 0.000109 0.000113 0.0000084 0.0000091 0.000095 0.000099 1997 12 29 50811 0.110100 0.177271 0.2221439 0.0012814 -0.000076 0.000516 0.000101 0.000105 0.0000080 0.0000073 0.000090 0.000093 1997 12 30 50812 0.107157 0.176409 0.2208688 0.0013120 0.000041 0.000299 0.000108 0.000112 0.0000075 0.0000090 0.000084 0.000088 1997 12 31 50813 0.104551 0.175564 0.2195561 0.0013811 0.000129 0.000052 0.000106 0.000112 0.0000071 0.0000121 0.000079 0.000083 1998 1 1 50814 0.102424 0.174630 0.2181343 0.0015106 0.000166 -0.000169 0.000108 0.000114 0.0000073 0.0000091 0.000082 0.000087 1998 1 2 50815 0.100036 0.173786 0.2165466 0.0016835 0.000161 -0.000331 0.000112 0.000118 0.0000076 0.0000084 0.000086 0.000093 1998 1 3 50816 0.097441 0.172937 0.2147705 0.0018493 0.000130 -0.000417 0.000108 0.000111 0.0000080 0.0000084 0.000090 0.000099 1998 1 4 50817 0.095109 0.172490 0.2128276 0.0020013 0.000094 -0.000424 0.000119 0.000122 0.0000083 0.0000079 0.000095 0.000105 1998 1 5 50818 0.092746 0.172135 0.2107812 0.0020807 0.000074 -0.000370 0.000124 0.000128 0.0000087 0.0000099 0.000099 0.000111 1998 1 6 50819 0.090359 0.171816 0.2087202 0.0020402 0.000081 -0.000281 0.000121 0.000123 0.0000090 0.0000086 0.000103 0.000117 1998 1 7 50820 0.087888 0.171256 0.2067347 0.0019194 0.000120 -0.000182 0.000121 0.000123 0.0000094 0.0000083 0.000108 0.000123 1998 1 8 50821 0.085392 0.170552 0.2048926 0.0017562 0.000185 -0.000098 0.000126 0.000129 0.0000090 0.0000109 0.000107 0.000122 1998 1 9 50822 0.082391 0.169742 0.2032214 0.0015785 0.000258 -0.000040 0.000129 0.000133 0.0000083 0.0000125 0.000105 0.000118 1998 1 10 50823 0.079191 0.169033 0.2017037 0.0014481 0.000317 -0.000004 0.000128 0.000133 0.0000076 0.0000131 0.000103 0.000114 1998 1 11 50824 0.076103 0.168492 0.2002853 0.0014131 0.000340 0.000017 0.000126 0.000131 0.0000070 0.0000112 0.000100 0.000110 1998 1 12 50825 0.072741 0.168409 0.1988948 0.0014242 0.000314 0.000030 0.000122 0.000126 0.0000063 0.0000092 0.000098 0.000106 1998 1 13 50826 0.069316 0.168021 0.1974660 0.0014682 0.000234 0.000047 0.000118 0.000122 0.0000056 0.0000119 0.000096 0.000102 1998 1 14 50827 0.066508 0.167877 0.1959551 0.0015518 0.000104 0.000075 0.000116 0.000119 0.0000083 0.0000145 0.000102 0.000111 1998 1 15 50828 0.063719 0.167628 0.1943480 0.0016233 -0.000053 0.000092 0.000121 0.000125 0.0000091 0.0000139 0.000103 0.000113 1998 1 16 50829 0.060293 0.167565 0.1926559 0.0016731 -0.000206 0.000094 0.000125 0.000128 0.0000090 0.0000123 0.000101 0.000112 1998 1 17 50830 0.057049 0.167627 0.1909088 0.0016961 -0.000324 0.000080 0.000124 0.000125 0.0000089 0.0000103 0.000099 0.000111 1998 1 18 50831 0.054048 0.167610 0.1891460 0.0017291 -0.000373 0.000052 0.000125 0.000122 0.0000089 0.0000109 0.000098 0.000110 1998 1 19 50832 0.051159 0.168030 0.1874039 0.0017771 -0.000330 0.000019 0.000130 0.000126 0.0000088 0.0000116 0.000096 0.000109 1998 1 20 50833 0.048192 0.168591 0.1857022 0.0017837 -0.000189 -0.000007 0.000137 0.000136 0.0000087 0.0000120 0.000095 0.000109 1998 1 21 50834 0.044774 0.168454 0.1840348 0.0017361 0.000018 -0.000015 0.000137 0.000136 0.0000086 0.0000153 0.000093 0.000108 1998 1 22 50835 0.041284 0.168122 0.1823755 0.0016828 0.000326 0.000000 0.000133 0.000133 0.0000083 0.0000134 0.000124 0.000418 1998 1 23 50836 0.037821 0.167649 0.1806989 0.0016986 0.000456 0.000028 0.000138 0.000140 0.0000080 0.0000128 0.000131 0.000467 1998 1 24 50837 0.034625 0.167333 0.1789980 0.0017196 0.000406 0.000058 0.000138 0.000142 0.0000076 0.0000142 0.000126 0.000380 1998 1 25 50838 0.031663 0.166990 0.1772831 0.0017095 0.000259 0.000071 0.000148 0.000151 0.0000072 0.0000137 0.000121 0.000292 1998 1 26 50839 0.028478 0.166941 0.1755543 0.0017275 0.000100 0.000058 0.000156 0.000155 0.0000068 0.0000116 0.000115 0.000205 1998 1 27 50840 0.025666 0.166942 0.1737728 0.0018163 0.000005 0.000012 0.000149 0.000149 0.0000064 0.0000123 0.000109 0.000118 1998 1 28 50841 0.023193 0.167403 0.1718591 0.0020026 0.000096 -0.000051 0.000146 0.000149 0.0000097 0.0000150 0.000137 0.000151 1998 1 29 50842 0.020284 0.167984 0.1697309 0.0022425 0.000188 -0.000135 0.000147 0.000151 0.0000091 0.0000147 0.000119 0.000136 1998 1 30 50843 0.017233 0.168613 0.1673784 0.0024418 0.000248 -0.000195 0.000148 0.000152 0.0000069 0.0000148 0.000082 0.000097 1998 1 31 50844 0.014023 0.169186 0.1648686 0.0025344 0.000256 -0.000167 0.000152 0.000155 0.0000074 0.0000136 0.000075 0.000083 1998 2 1 50845 0.010888 0.169884 0.1622942 0.0025546 0.000208 -0.000101 0.000162 0.000165 0.0000080 0.0000120 0.000068 0.000070 1998 2 2 50846 0.007753 0.170412 0.1597347 0.0025350 0.000118 -0.000026 0.000160 0.000162 0.0000085 0.0000110 0.000061 0.000057 1998 2 3 50847 0.004633 0.171365 0.1572391 0.0024923 0.000012 0.000018 0.000153 0.000155 0.0000091 0.0000106 0.000054 0.000043 1998 2 4 50848 0.001342 0.172078 0.1548268 0.0024068 -0.000026 0.000021 0.000155 0.000161 0.0000096 0.0000093 0.000102 0.000109 1998 2 5 50849 -0.002049 0.172868 0.1524984 0.0023141 -0.000149 -0.000074 0.000162 0.000171 0.0000091 0.0000103 0.000160 0.000155 1998 2 6 50850 -0.005147 0.173473 0.1502468 0.0021925 -0.000219 -0.000104 0.000161 0.000168 0.0000082 0.0000121 0.000159 0.000150 1998 2 7 50851 -0.007866 0.174368 0.1480674 0.0020983 -0.000212 -0.000057 0.000159 0.000162 0.0000072 0.0000128 0.000127 0.000121 1998 2 8 50852 -0.010101 0.174892 0.1459622 0.0020718 -0.000158 0.000014 0.000135 0.000140 0.0000063 0.0000133 0.000095 0.000093 1998 2 9 50853 -0.012440 0.175333 0.1439349 0.0020097 -0.000079 0.000071 0.000103 0.000108 0.0000054 0.0000115 0.000062 0.000065 1998 2 10 50854 -0.015009 0.175420 0.1419767 0.0019468 0.000005 0.000086 0.000091 0.000096 0.0000045 0.0000104 0.000031 0.000036 1998 2 11 50855 -0.018046 0.175424 0.1400565 0.0019275 0.000024 -0.000040 0.000091 0.000095 0.0000091 0.0000115 0.000089 0.000099 1998 2 12 50856 -0.020574 0.175725 0.1381266 0.0019565 0.000078 -0.000065 0.000098 0.000102 0.0000094 0.0000109 0.000099 0.000116 1998 2 13 50857 -0.023226 0.176430 0.1361561 0.0019760 0.000119 -0.000017 0.000100 0.000104 0.0000082 0.0000123 0.000089 0.000114 1998 2 14 50858 -0.025285 0.176907 0.1341455 0.0019838 0.000074 0.000032 0.000101 0.000104 0.0000086 0.0000140 0.000089 0.000108 1998 2 15 50859 -0.026929 0.177409 0.1321204 0.0019963 -0.000006 0.000087 0.000094 0.000096 0.0000090 0.0000114 0.000089 0.000103 1998 2 16 50860 -0.028626 0.178465 0.1301186 0.0019785 -0.000091 0.000121 0.000089 0.000091 0.0000094 0.0000086 0.000088 0.000097 1998 2 17 50861 -0.030210 0.179966 0.1281741 0.0019247 -0.000136 0.000109 0.000091 0.000095 0.0000097 0.0000095 0.000088 0.000091 1998 2 18 50862 -0.032042 0.181351 0.1263032 0.0018523 -0.000107 0.000048 0.000089 0.000093 0.0000101 0.0000110 0.000088 0.000085 1998 2 19 50863 -0.034633 0.182918 0.1244992 0.0017861 0.000024 -0.000058 0.000085 0.000088 0.0000099 0.0000101 0.000774 0.000496 1998 2 20 50864 -0.037894 0.183942 0.1227351 0.0017784 0.000209 -0.000172 0.000080 0.000084 0.0000096 0.0000095 0.001337 0.000836 1998 2 21 50865 -0.041068 0.185207 0.1209726 0.0018032 0.000383 -0.000257 0.000083 0.000085 0.0000092 0.0000098 0.001036 0.000662 1998 2 22 50866 -0.044820 0.186279 0.1191717 0.0018391 0.000492 -0.000292 0.000087 0.000089 0.0000089 0.0000098 0.000735 0.000488 1998 2 23 50867 -0.048068 0.186780 0.1172949 0.0019011 0.000494 -0.000264 0.000089 0.000091 0.0000085 0.0000094 0.000434 0.000314 1998 2 24 50868 -0.050843 0.187818 0.1153078 0.0020317 0.000377 -0.000179 0.000091 0.000091 0.0000082 0.0000095 0.000133 0.000140 1998 2 25 50869 -0.053529 0.188551 0.1131792 0.0021907 0.000136 -0.000052 0.000089 0.000088 0.0000078 0.0000079 0.000079 0.000084 1998 2 26 50870 -0.056005 0.189353 0.1108880 0.0023359 -0.000110 0.000074 0.000088 0.000087 0.0000080 0.0000100 0.000078 0.000077 1998 2 27 50871 -0.057855 0.190132 0.1084362 0.0024918 -0.000310 0.000170 0.000090 0.000088 0.0000082 0.0000135 0.000078 0.000079 1998 2 28 50872 -0.058809 0.191486 0.1058592 0.0026448 -0.000429 0.000225 0.000093 0.000090 0.0000085 0.0000131 0.000077 0.000081 1998 3 1 50873 -0.059516 0.193318 0.1032251 0.0026629 -0.000450 0.000231 0.000092 0.000088 0.0000088 0.0000120 0.000077 0.000083 1998 3 2 50874 -0.060507 0.195012 0.1006201 0.0025908 -0.000382 0.000196 0.000087 0.000084 0.0000091 0.0000097 0.000077 0.000085 1998 3 3 50875 -0.061946 0.196857 0.0981246 0.0024337 -0.000255 0.000133 0.000085 0.000082 0.0000093 0.0000092 0.000077 0.000087 1998 3 4 50876 -0.063671 0.198560 0.0957915 0.0022433 -0.000107 0.000061 0.000088 0.000084 0.0000096 0.0000098 0.000076 0.000089 1998 3 5 50877 -0.065201 0.200550 0.0936358 0.0020883 0.000024 -0.000003 0.000091 0.000088 0.0000097 0.0000098 0.000078 0.000089 1998 3 6 50878 -0.067097 0.202471 0.0916357 0.0019792 0.000114 -0.000045 0.000089 0.000086 0.0000097 0.0000093 0.000080 0.000088 1998 3 7 50879 -0.068465 0.204296 0.0897434 0.0019060 0.000155 -0.000065 0.000090 0.000086 0.0000096 0.0000082 0.000082 0.000088 1998 3 8 50880 -0.070161 0.206507 0.0878986 0.0018446 0.000149 -0.000062 0.000095 0.000090 0.0000096 0.0000111 0.000084 0.000087 1998 3 9 50881 -0.071671 0.208515 0.0860436 0.0018141 0.000109 -0.000046 0.000098 0.000090 0.0000096 0.0000128 0.000086 0.000087 1998 3 10 50882 -0.073288 0.210769 0.0841349 0.0018800 0.000054 -0.000024 0.000100 0.000094 0.0000096 0.0000126 0.000088 0.000086 1998 3 11 50883 -0.074923 0.212645 0.0821511 0.0019892 0.000002 -0.000006 0.000098 0.000093 0.0000096 0.0000132 0.000090 0.000086 1998 3 12 50884 -0.076194 0.214754 0.0800944 0.0020800 -0.000033 0.000002 0.000090 0.000086 0.0000063 0.0000127 0.000088 0.000096 1998 3 13 50885 -0.077308 0.216679 0.0779864 0.0021202 -0.000042 -0.000001 0.000092 0.000089 0.0000059 0.0000139 0.000088 0.000099 1998 3 14 50886 -0.078294 0.218966 0.0758584 0.0021287 -0.000029 -0.000010 0.000099 0.000095 0.0000069 0.0000110 0.000090 0.000100 1998 3 15 50887 -0.080026 0.221002 0.0737433 0.0021082 -0.000003 -0.000022 0.000098 0.000094 0.0000079 0.0000076 0.000092 0.000100 1998 3 16 50888 -0.082358 0.222951 0.0716684 0.0020710 0.000023 -0.000034 0.000092 0.000091 0.0000089 0.0000093 0.000094 0.000101 1998 3 17 50889 -0.084740 0.224382 0.0696513 0.0019962 0.000039 -0.000039 0.000089 0.000088 0.0000099 0.0000104 0.000095 0.000101 1998 3 18 50890 -0.086949 0.226194 0.0676985 0.0019181 0.000035 -0.000036 0.000087 0.000085 0.0000109 0.0000108 0.000097 0.000101 1998 3 19 50891 -0.089023 0.227623 0.0658083 0.0018201 0.000012 -0.000025 0.000087 0.000086 0.0000112 0.0000129 0.000098 0.000101 1998 3 20 50892 -0.090635 0.229363 0.0639769 0.0017620 -0.000021 -0.000010 0.000091 0.000091 0.0000114 0.0000118 0.000097 0.000100 1998 3 21 50893 -0.092769 0.231247 0.0621974 0.0017450 -0.000051 0.000005 0.000095 0.000094 0.0000115 0.0000106 0.000097 0.000100 1998 3 22 50894 -0.094955 0.232889 0.0604495 0.0017823 -0.000063 0.000015 0.000092 0.000091 0.0000116 0.0000088 0.000097 0.000099 1998 3 23 50895 -0.096764 0.234107 0.0586842 0.0018478 -0.000047 0.000017 0.000087 0.000085 0.0000117 0.0000084 0.000097 0.000098 1998 3 24 50896 -0.098128 0.235485 0.0568202 0.0019726 -0.000005 0.000008 0.000083 0.000080 0.0000119 0.0000090 0.000096 0.000097 1998 3 25 50897 -0.099286 0.237026 0.0547647 0.0021708 0.000055 -0.000008 0.000080 0.000079 0.0000092 0.0000078 0.000093 0.000077 1998 3 26 50898 -0.100836 0.239073 0.0524586 0.0024156 0.000120 -0.000040 0.000081 0.000081 0.0000093 0.0000095 0.000105 0.000109 1998 3 27 50899 -0.102229 0.240845 0.0499348 0.0025585 0.000146 -0.000067 0.000087 0.000086 0.0000100 0.0000108 0.000113 0.000125 1998 3 28 50900 -0.103936 0.242945 0.0473008 0.0025808 0.000129 -0.000092 0.000090 0.000090 0.0000105 0.0000096 0.000117 0.000129 1998 3 29 50901 -0.105832 0.245168 0.0446884 0.0025442 0.000083 -0.000122 0.000101 0.000100 0.0000110 0.0000077 0.000121 0.000133 1998 3 30 50902 -0.107868 0.247767 0.0422078 0.0024197 0.000029 -0.000165 0.000110 0.000105 0.0000116 0.0000098 0.000125 0.000136 1998 3 31 50903 -0.109134 0.249733 0.0399157 0.0022388 -0.000010 -0.000225 0.000107 0.000103 0.0000121 0.0000106 0.000130 0.000140 1998 4 1 50904 -0.109956 0.252218 0.0378116 0.0020724 -0.000021 -0.000301 0.000107 0.000105 0.0000126 0.0000089 0.000134 0.000144 1998 4 2 50905 -0.110429 0.254619 0.0358544 0.0019393 0.000011 -0.000383 0.000109 0.000107 0.0000122 0.0000095 0.000130 0.000141 1998 4 3 50906 -0.111015 0.257191 0.0339876 0.0018278 0.000057 -0.000445 0.000108 0.000106 0.0000115 0.0000090 0.000124 0.000135 1998 4 4 50907 -0.111868 0.259347 0.0321591 0.0018060 0.000074 -0.000454 0.000105 0.000104 0.0000107 0.0000083 0.000114 0.000124 1998 4 5 50908 -0.112873 0.261746 0.0303308 0.0018288 0.000077 -0.000410 0.000099 0.000097 0.0000100 0.0000099 0.000105 0.000112 1998 4 6 50909 -0.113836 0.263593 0.0284808 0.0018500 0.000073 -0.000318 0.000093 0.000092 0.0000092 0.0000112 0.000095 0.000100 1998 4 7 50910 -0.114147 0.265619 0.0265994 0.0018778 0.000077 -0.000195 0.000091 0.000091 0.0000085 0.0000106 0.000086 0.000088 1998 4 8 50911 -0.114125 0.268346 0.0246845 0.0019295 0.000100 -0.000067 0.000088 0.000088 0.0000077 0.0000100 0.000076 0.000076 1998 4 9 50912 -0.114002 0.270977 0.0227380 0.0019595 0.000155 0.000040 0.000085 0.000088 0.0000071 0.0000098 0.000085 0.000088 1998 4 10 50913 -0.113823 0.273820 0.0207657 0.0019554 0.000209 0.000103 0.000089 0.000092 0.0000075 0.0000097 0.000092 0.000094 1998 4 11 50914 -0.113714 0.276635 0.0187842 0.0019628 0.000239 0.000115 0.000093 0.000093 0.0000083 0.0000089 0.000097 0.000095 1998 4 12 50915 -0.113730 0.279715 0.0168202 0.0019698 0.000233 0.000085 0.000096 0.000094 0.0000090 0.0000077 0.000101 0.000096 1998 4 13 50916 -0.114130 0.282324 0.0149016 0.0019057 0.000190 0.000028 0.000095 0.000096 0.0000098 0.0000090 0.000105 0.000096 1998 4 14 50917 -0.114669 0.285075 0.0130468 0.0018374 0.000131 -0.000034 0.000092 0.000093 0.0000105 0.0000099 0.000110 0.000097 1998 4 15 50918 -0.114954 0.287646 0.0112588 0.0017759 0.000023 -0.000101 0.000090 0.000091 0.0000110 0.0000090 0.000102 0.000097 1998 4 16 50919 -0.114891 0.290173 0.0095260 0.0017001 0.000067 -0.000110 0.000081 0.000082 0.0000069 0.0000082 0.000056 0.000055 1998 4 17 50920 -0.114681 0.292875 0.0078373 0.0016568 0.000143 -0.000122 0.000083 0.000083 0.0000056 0.0000090 0.000077 0.000046 1998 4 18 50921 -0.113892 0.295717 0.0061697 0.0016674 0.000205 -0.000148 0.000091 0.000089 0.0000064 0.0000086 0.000134 0.000060 1998 4 19 50922 -0.113642 0.298734 0.0044786 0.0017311 0.000241 -0.000173 0.000083 0.000082 0.0000073 0.0000057 0.000192 0.000074 1998 4 20 50923 -0.113712 0.301401 0.0027049 0.0018485 0.000229 -0.000184 0.000075 0.000075 0.0000081 0.0000064 0.000249 0.000088 1998 4 21 50924 -0.113621 0.304136 0.0007911 0.0019986 0.000168 -0.000165 0.000076 0.000076 0.0000090 0.0000091 0.000307 0.000102 1998 4 22 50925 -0.113783 0.306927 -0.0013014 0.0021776 0.000066 -0.000121 0.000075 0.000074 0.0000098 0.0000078 0.000145 0.000119 1998 4 23 50926 -0.113747 0.309821 -0.0035791 0.0023738 -0.000032 0.000003 0.000072 0.000071 0.0000064 0.0000065 0.000088 0.000102 1998 4 24 50927 -0.113629 0.312798 -0.0060082 0.0025341 -0.000097 0.000110 0.000075 0.000076 0.0000057 0.0000070 0.000087 0.000095 1998 4 25 50928 -0.113572 0.315291 -0.0085159 0.0025778 -0.000121 0.000173 0.000076 0.000079 0.0000065 0.0000085 0.000095 0.000097 1998 4 26 50929 -0.113196 0.317032 -0.0110052 0.0024829 -0.000113 0.000185 0.000073 0.000074 0.0000074 0.0000103 0.000103 0.000099 1998 4 27 50930 -0.112700 0.319200 -0.0133839 0.0022781 -0.000088 0.000146 0.000069 0.000070 0.0000082 0.0000095 0.000111 0.000101 1998 4 28 50931 -0.112644 0.321331 -0.0155966 0.0020545 -0.000066 0.000075 0.000067 0.000068 0.0000091 0.0000088 0.000119 0.000103 1998 4 29 50932 -0.113032 0.323867 -0.0176417 0.0018848 -0.000060 -0.000003 0.000068 0.000067 0.0000099 0.0000088 0.000127 0.000105 1998 4 30 50933 -0.113386 0.326158 -0.0195589 0.0018112 -0.000077 -0.000058 0.000068 0.000067 0.0000100 0.0000088 0.000129 0.000108 1998 5 1 50934 -0.113328 0.328268 -0.0213982 0.0017993 -0.000100 -0.000079 0.000067 0.000067 0.0000099 0.0000090 0.000129 0.000111 1998 5 2 50935 -0.113506 0.330281 -0.0231926 0.0017966 -0.000113 -0.000066 0.000071 0.000070 0.0000097 0.0000098 0.000130 0.000114 1998 5 3 50936 -0.113574 0.332171 -0.0249549 0.0017859 -0.000100 -0.000030 0.000071 0.000071 0.0000096 0.0000102 0.000130 0.000118 1998 5 4 50937 -0.114061 0.334312 -0.0266938 0.0017563 -0.000063 0.000009 0.000071 0.000072 0.0000094 0.0000093 0.000131 0.000121 1998 5 5 50938 -0.114154 0.336429 -0.0284323 0.0017593 -0.000016 0.000030 0.000071 0.000072 0.0000093 0.0000087 0.000131 0.000124 1998 5 6 50939 -0.114556 0.338962 -0.0302072 0.0018121 0.000062 0.000017 0.000067 0.000067 0.0000086 0.0000073 0.000097 0.000093 1998 5 7 50940 -0.114540 0.341271 -0.0320472 0.0018524 0.000032 -0.000036 0.000065 0.000066 0.0000057 0.0000088 0.000084 0.000089 1998 5 8 50941 -0.114525 0.343452 -0.0339303 0.0018337 -0.000023 -0.000120 0.000066 0.000069 0.0000054 0.0000106 0.000081 0.000091 1998 5 9 50942 -0.114283 0.345468 -0.0358018 0.0017994 -0.000078 -0.000217 0.000068 0.000070 0.0000062 0.0000092 0.000081 0.000094 1998 5 10 50943 -0.114041 0.347476 -0.0376067 0.0017529 -0.000115 -0.000300 0.000073 0.000075 0.0000071 0.0000090 0.000080 0.000096 1998 5 11 50944 -0.113302 0.349511 -0.0393083 0.0016743 -0.000117 -0.000342 0.000077 0.000078 0.0000080 0.0000081 0.000080 0.000098 1998 5 12 50945 -0.112904 0.351607 -0.0408960 0.0015899 -0.000078 -0.000326 0.000078 0.000078 0.0000089 0.0000095 0.000079 0.000101 1998 5 13 50946 -0.112413 0.353719 -0.0423837 0.0014914 -0.000009 -0.000248 0.000075 0.000075 0.0000097 0.0000100 0.000079 0.000103 1998 5 14 50947 -0.112033 0.356010 -0.0438062 0.0014236 0.000066 -0.000116 0.000072 0.000072 0.0000098 0.0000093 0.000079 0.000102 1998 5 15 50948 -0.111476 0.357817 -0.0452146 0.0014082 0.000128 0.000040 0.000073 0.000073 0.0000096 0.0000093 0.000079 0.000099 1998 5 16 50949 -0.110954 0.359731 -0.0466702 0.0014904 0.000159 0.000180 0.000072 0.000071 0.0000094 0.0000064 0.000080 0.000097 1998 5 17 50950 -0.110619 0.361444 -0.0482341 0.0016342 0.000157 0.000267 0.000072 0.000071 0.0000093 0.0000070 0.000080 0.000094 1998 5 18 50951 -0.110473 0.363302 -0.0499550 0.0017990 0.000129 0.000270 0.000074 0.000073 0.0000091 0.0000086 0.000080 0.000092 1998 5 19 50952 -0.110078 0.364996 -0.0518603 0.0019965 0.000092 0.000181 0.000074 0.000075 0.0000089 0.0000073 0.000081 0.000089 1998 5 20 50953 -0.109944 0.367014 -0.0539513 0.0021678 0.000059 0.000016 0.000071 0.000072 0.0000087 0.0000070 0.000081 0.000086 1998 5 21 50954 -0.110118 0.369315 -0.0562019 0.0022965 0.000046 -0.000204 0.000069 0.000070 0.0000063 0.0000082 0.000074 0.000089 1998 5 22 50955 -0.109610 0.371764 -0.0585586 0.0023842 0.000044 -0.000394 0.000071 0.000073 0.0000060 0.0000096 0.000074 0.000091 1998 5 23 50956 -0.109253 0.374657 -0.0609413 0.0023738 0.000049 -0.000509 0.000076 0.000077 0.0000068 0.0000097 0.000077 0.000092 1998 5 24 50957 -0.108751 0.377328 -0.0632551 0.0022623 0.000055 -0.000530 0.000073 0.000074 0.0000075 0.0000084 0.000080 0.000093 1998 5 25 50958 -0.108132 0.379944 -0.0654122 0.0020594 0.000053 -0.000455 0.000068 0.000069 0.0000082 0.0000073 0.000082 0.000094 1998 5 26 50959 -0.107536 0.382268 -0.0673562 0.0018169 0.000040 -0.000306 0.000066 0.000069 0.0000090 0.0000068 0.000085 0.000095 1998 5 27 50960 -0.107375 0.384645 -0.0690768 0.0016083 0.000016 -0.000119 0.000066 0.000068 0.0000097 0.0000074 0.000088 0.000096 1998 5 28 50961 -0.107450 0.386508 -0.0706071 0.0014534 -0.000014 0.000061 0.000067 0.000069 0.0000098 0.0000078 0.000089 0.000097 1998 5 29 50962 -0.107304 0.387981 -0.0720056 0.0013527 -0.000042 0.000199 0.000068 0.000071 0.0000096 0.0000077 0.000090 0.000099 1998 5 30 50963 -0.106512 0.389409 -0.0733339 0.0013254 -0.000058 0.000273 0.000069 0.000071 0.0000094 0.0000081 0.000091 0.000100 1998 5 31 50964 -0.105860 0.391492 -0.0746390 0.0013273 -0.000055 0.000276 0.000072 0.000072 0.0000093 0.0000077 0.000091 0.000102 1998 6 1 50965 -0.105288 0.393630 -0.0759468 0.0013142 -0.000029 0.000215 0.000076 0.000075 0.0000091 0.0000065 0.000093 0.000104 1998 6 2 50966 -0.104810 0.395687 -0.0772637 0.0013050 0.000018 0.000111 0.000077 0.000076 0.0000089 0.0000064 0.000093 0.000105 1998 6 3 50967 -0.104314 0.397580 -0.0785818 0.0013067 0.000079 -0.000008 0.000073 0.000073 0.0000088 0.0000068 0.000094 0.000107 1998 6 4 50968 -0.104637 0.399299 -0.0798825 0.0012904 0.000142 -0.000113 0.000074 0.000074 0.0000089 0.0000065 0.000092 0.000106 1998 6 5 50969 -0.104770 0.400810 -0.0811403 0.0012495 0.000193 -0.000184 0.000079 0.000079 0.0000091 0.0000070 0.000090 0.000104 1998 6 6 50970 -0.104632 0.402468 -0.0823265 0.0011515 0.000222 -0.000213 0.000081 0.000079 0.0000092 0.0000060 0.000087 0.000102 1998 6 7 50971 -0.104146 0.403880 -0.0834154 0.0010332 0.000224 -0.000203 0.000077 0.000077 0.0000094 0.0000051 0.000085 0.000101 1998 6 8 50972 -0.103623 0.405689 -0.0843913 0.0009064 0.000201 -0.000169 0.000072 0.000074 0.0000096 0.0000055 0.000082 0.000099 1998 6 9 50973 -0.103043 0.407167 -0.0852558 0.0007986 0.000162 -0.000132 0.000070 0.000072 0.0000098 0.0000051 0.000080 0.000097 1998 6 10 50974 -0.102203 0.408846 -0.0860288 0.0007335 0.000125 -0.000111 0.000071 0.000072 0.0000100 0.0000051 0.000077 0.000095 1998 6 11 50975 -0.101205 0.410481 -0.0867454 0.0006819 0.000101 -0.000119 0.000070 0.000071 0.0000101 0.0000057 0.000077 0.000097 1998 6 12 50976 -0.100426 0.412135 -0.0874463 0.0006764 0.000102 -0.000156 0.000070 0.000071 0.0000101 0.0000065 0.000078 0.000099 1998 6 13 50977 -0.100034 0.413423 -0.0881683 0.0007476 0.000126 -0.000207 0.000071 0.000072 0.0000101 0.0000065 0.000079 0.000102 1998 6 14 50978 -0.099490 0.414612 -0.0889379 0.0008297 0.000161 -0.000250 0.000072 0.000072 0.0000101 0.0000053 0.000080 0.000104 1998 6 15 50979 -0.098326 0.415669 -0.0897700 0.0008813 0.000185 -0.000263 0.000071 0.000072 0.0000101 0.0000060 0.000082 0.000106 1998 6 16 50980 -0.097027 0.417280 -0.0906698 0.0009337 0.000171 -0.000235 0.000070 0.000069 0.0000101 0.0000080 0.000082 0.000109 1998 6 17 50981 -0.095388 0.418619 -0.0916315 0.0009891 0.000154 -0.000219 0.000068 0.000067 0.0000090 0.0000079 0.000082 0.000095 1998 6 18 50982 -0.093560 0.420456 -0.0926334 0.0010025 -0.000031 -0.000069 0.000066 0.000066 0.0000061 0.0000076 0.000063 0.000064 1998 6 19 50983 -0.091760 0.422065 -0.0936277 0.0009662 -0.000196 -0.000033 0.000068 0.000068 0.0000059 0.0000077 0.000065 0.000111 1998 6 20 50984 -0.089753 0.423660 -0.0945547 0.0008777 -0.000295 -0.000116 0.000070 0.000070 0.0000069 0.0000077 0.000077 0.000190 1998 6 21 50985 -0.088091 0.425050 -0.0953645 0.0007459 -0.000322 -0.000248 0.000073 0.000073 0.0000080 0.0000080 0.000088 0.000268 1998 6 22 50986 -0.086376 0.426182 -0.0960330 0.0006108 -0.000274 -0.000364 0.000075 0.000077 0.0000091 0.0000077 0.000100 0.000347 1998 6 23 50987 -0.084721 0.427471 -0.0965694 0.0004790 -0.000173 -0.000398 0.000075 0.000076 0.0000101 0.0000062 0.000111 0.000425 1998 6 24 50988 -0.082754 0.428914 -0.0970100 0.0004008 -0.000017 -0.000314 0.000074 0.000074 0.0000112 0.0000060 0.000100 0.000169 1998 6 25 50989 -0.081207 0.430640 -0.0974021 0.0003814 0.000044 -0.000088 0.000070 0.000070 0.0000075 0.0000071 0.000054 0.000062 1998 6 26 50990 -0.079832 0.432083 -0.0977889 0.0003979 0.000137 0.000054 0.000072 0.000073 0.0000078 0.0000077 0.000063 0.000080 1998 6 27 50991 -0.078225 0.433318 -0.0982041 0.0004417 0.000262 0.000064 0.000078 0.000080 0.0000107 0.0000075 0.000103 0.000134 1998 6 28 50992 -0.076273 0.434453 -0.0986707 0.0005007 0.000362 -0.000021 0.000074 0.000075 0.0000136 0.0000066 0.000144 0.000188 1998 6 29 50993 -0.073773 0.435648 -0.0991992 0.0005510 0.000398 -0.000145 0.000069 0.000070 0.0000165 0.0000064 0.000184 0.000242 1998 6 30 50994 -0.071110 0.437050 -0.0997853 0.0005938 0.000329 -0.000230 0.000069 0.000071 0.0000194 0.0000068 0.000225 0.000296 1998 7 1 50995 -0.068273 0.438808 -0.1004071 0.0006234 0.000179 -0.000201 0.000070 0.000072 0.0000124 0.0000079 0.000133 0.000148 1998 7 2 50996 -0.065504 0.440752 -0.1010270 0.0006034 -0.000154 -0.000050 0.000071 0.000071 0.0000078 0.0000082 0.000117 0.000108 1998 7 3 50997 -0.063051 0.442157 -0.1016035 0.0005259 -0.000414 0.000125 0.000073 0.000073 0.0000074 0.0000080 0.000118 0.000108 1998 7 4 50998 -0.060353 0.443783 -0.1020998 0.0004333 -0.000532 0.000270 0.000076 0.000077 0.0000080 0.0000066 0.000112 0.000105 1998 7 5 50999 -0.058120 0.445458 -0.1024894 0.0003383 -0.000504 0.000337 0.000082 0.000082 0.0000085 0.0000064 0.000105 0.000101 1998 7 6 51000 -0.055281 0.447285 -0.1027600 0.0002387 -0.000353 0.000296 0.000087 0.000088 0.0000091 0.0000077 0.000099 0.000098 1998 7 7 51001 -0.052933 0.448887 -0.1029164 0.0001235 -0.000142 0.000152 0.000085 0.000085 0.0000096 0.0000095 0.000093 0.000095 1998 7 8 51002 -0.050208 0.449999 -0.1029841 0.0000438 0.000051 -0.000060 0.000079 0.000078 0.0000102 0.0000105 0.000087 0.000091 1998 7 9 51003 -0.047864 0.451189 -0.1030125 0.0000159 0.000151 -0.000285 0.000081 0.000080 0.0000103 0.0000088 0.000083 0.000091 1998 7 10 51004 -0.045137 0.452422 -0.1030703 0.0000860 0.000148 -0.000457 0.000082 0.000082 0.0000103 0.0000088 0.000080 0.000091 1998 7 11 51005 -0.042817 0.454335 -0.1032309 0.0002446 0.000069 -0.000525 0.000079 0.000079 0.0000102 0.0000091 0.000078 0.000091 1998 7 12 51006 -0.040172 0.456077 -0.1035495 0.0004149 -0.000042 -0.000472 0.000075 0.000075 0.0000102 0.0000093 0.000075 0.000092 1998 7 13 51007 -0.037752 0.457694 -0.1040440 0.0005824 -0.000134 -0.000325 0.000069 0.000070 0.0000101 0.0000102 0.000072 0.000092 1998 7 14 51008 -0.035464 0.459147 -0.1046889 0.0006958 -0.000176 -0.000154 0.000068 0.000068 0.0000101 0.0000096 0.000071 0.000093 1998 7 15 51009 -0.032936 0.460498 -0.1054240 0.0007479 -0.000081 0.000037 0.000069 0.000069 0.0000099 0.0000095 0.000090 0.000096 1998 7 16 51010 -0.030859 0.461641 -0.1061737 0.0007323 -0.000108 -0.000048 0.000068 0.000068 0.0000075 0.0000098 0.000078 0.000073 1998 7 17 51011 -0.028651 0.462490 -0.1068704 0.0006358 -0.000063 -0.000287 0.000069 0.000070 0.0000078 0.0000082 0.000086 0.000087 1998 7 18 51012 -0.026596 0.463311 -0.1074585 0.0005043 0.000040 -0.000577 0.000069 0.000071 0.0000095 0.0000077 0.000104 0.000119 1998 7 19 51013 -0.024583 0.464178 -0.1078992 0.0003671 0.000138 -0.000808 0.000068 0.000069 0.0000112 0.0000081 0.000123 0.000151 1998 7 20 51014 -0.022524 0.465068 -0.1081825 0.0002334 0.000194 -0.000870 0.000067 0.000067 0.0000129 0.0000091 0.000142 0.000183 1998 7 21 51015 -0.020594 0.465934 -0.1083355 0.0001307 0.000183 -0.000713 0.000067 0.000069 0.0000147 0.0000090 0.000160 0.000215 1998 7 22 51016 -0.018702 0.466814 -0.1084201 0.0000911 0.000058 -0.000293 0.000067 0.000069 0.0000163 0.0000078 0.000148 0.000149 1998 7 23 51017 -0.016592 0.467692 -0.1085153 0.0001182 -0.000049 0.000145 0.000071 0.000072 0.0000160 0.0000080 0.000138 0.000122 1998 7 24 51018 -0.014301 0.468502 -0.1086863 0.0001992 -0.000109 0.000500 0.000070 0.000072 0.0000149 0.0000081 0.000130 0.000116 1998 7 25 51019 -0.011944 0.469146 -0.1089629 0.0003260 -0.000117 0.000706 0.000067 0.000069 0.0000139 0.0000067 0.000123 0.000109 1998 7 26 51020 -0.009385 0.469834 -0.1093374 0.0004341 -0.000076 0.000727 0.000071 0.000073 0.0000129 0.0000065 0.000115 0.000102 1998 7 27 51021 -0.006619 0.470978 -0.1097781 0.0004798 -0.000014 0.000584 0.000075 0.000077 0.0000119 0.0000085 0.000107 0.000096 1998 7 28 51022 -0.004223 0.472086 -0.1102492 0.0004690 0.000037 0.000335 0.000074 0.000076 0.0000109 0.0000082 0.000100 0.000089 1998 7 29 51023 -0.001812 0.473235 -0.1107246 0.0004550 0.000053 0.000054 0.000072 0.000074 0.0000099 0.0000070 0.000092 0.000083 1998 7 30 51024 0.000302 0.474381 -0.1111927 0.0004744 0.000007 -0.000178 0.000070 0.000072 0.0000078 0.0000081 0.000110 0.000125 1998 7 31 51025 0.002021 0.475625 -0.1116506 0.0004743 -0.000049 -0.000343 0.000075 0.000077 0.0000077 0.0000092 0.000117 0.000136 1998 8 1 51026 0.003865 0.476509 -0.1120940 0.0004492 -0.000098 -0.000425 0.000077 0.000079 0.0000083 0.0000094 0.000115 0.000129 1998 8 2 51027 0.005994 0.477179 -0.1125126 0.0003899 -0.000125 -0.000422 0.000081 0.000082 0.0000089 0.0000088 0.000114 0.000122 1998 8 3 51028 0.007738 0.477480 -0.1128952 0.0003378 -0.000123 -0.000352 0.000085 0.000087 0.0000095 0.0000082 0.000113 0.000115 1998 8 4 51029 0.009745 0.477687 -0.1132389 0.0003136 -0.000098 -0.000244 0.000086 0.000088 0.0000101 0.0000084 0.000111 0.000108 1998 8 5 51030 0.011900 0.478249 -0.1135584 0.0003235 -0.000061 -0.000127 0.000087 0.000087 0.0000108 0.0000084 0.000110 0.000101 1998 8 6 51031 0.014240 0.478444 -0.1138902 0.0003602 -0.000032 -0.000029 0.000092 0.000093 0.0000102 0.0000079 0.000100 0.000092 1998 8 7 51032 0.016175 0.478774 -0.1142887 0.0004457 -0.000022 0.000032 0.000095 0.000097 0.0000093 0.0000085 0.000088 0.000081 1998 8 8 51033 0.017787 0.478798 -0.1148109 0.0005898 -0.000039 0.000044 0.000092 0.000094 0.0000084 0.0000093 0.000074 0.000071 1998 8 9 51034 0.019845 0.478429 -0.1154960 0.0007747 -0.000077 0.000011 0.000093 0.000094 0.0000074 0.0000083 0.000061 0.000061 1998 8 10 51035 0.022283 0.478485 -0.1163452 0.0009285 -0.000121 -0.000055 0.000092 0.000094 0.0000065 0.0000084 0.000049 0.000050 1998 8 11 51036 0.024663 0.478635 -0.1173138 0.0009914 -0.000151 -0.000128 0.000083 0.000086 0.0000056 0.0000096 0.000035 0.000040 1998 8 12 51037 0.027589 0.478633 -0.1183199 0.0009958 -0.000160 -0.000200 0.000079 0.000082 0.0000092 0.0000101 0.000085 0.000070 1998 8 13 51038 0.030540 0.478748 -0.1192682 0.0009200 -0.000104 -0.000223 0.000085 0.000087 0.0000103 0.0000109 0.000099 0.000078 1998 8 14 51039 0.033343 0.478510 -0.1200802 0.0007600 -0.000005 -0.000203 0.000087 0.000089 0.0000104 0.0000110 0.000101 0.000078 1998 8 15 51040 0.035514 0.478505 -0.1207171 0.0005587 0.000095 -0.000160 0.000087 0.000089 0.0000105 0.0000101 0.000102 0.000077 1998 8 16 51041 0.037214 0.478219 -0.1211843 0.0003819 0.000153 -0.000119 0.000086 0.000089 0.0000106 0.0000094 0.000103 0.000077 1998 8 17 51042 0.039369 0.477753 -0.1215223 0.0002866 0.000136 -0.000106 0.000085 0.000088 0.0000106 0.0000090 0.000105 0.000076 1998 8 18 51043 0.041652 0.477365 -0.1217866 0.0002358 0.000034 -0.000132 0.000086 0.000088 0.0000107 0.0000088 0.000106 0.000076 1998 8 19 51044 0.043892 0.477281 -0.1220298 0.0001978 -0.000161 -0.000213 0.000087 0.000087 0.0000108 0.0000103 0.000109 0.000096 1998 8 20 51045 0.046147 0.477341 -0.1222906 0.0002121 -0.000332 -0.000279 0.000090 0.000089 0.0000107 0.0000099 0.000109 0.000102 1998 8 21 51046 0.048322 0.477476 -0.1225925 0.0003144 -0.000439 -0.000315 0.000091 0.000091 0.0000106 0.0000085 0.000109 0.000103 1998 8 22 51047 0.050332 0.477177 -0.1229489 0.0004283 -0.000457 -0.000317 0.000091 0.000091 0.0000105 0.0000097 0.000108 0.000104 1998 8 23 51048 0.052236 0.476716 -0.1233694 0.0004882 -0.000389 -0.000286 0.000094 0.000093 0.0000104 0.0000112 0.000107 0.000104 1998 8 24 51049 0.054141 0.476613 -0.1238620 0.0005459 -0.000263 -0.000237 0.000098 0.000096 0.0000103 0.0000094 0.000106 0.000105 1998 8 25 51050 0.056047 0.476615 -0.1244294 0.0005996 -0.000129 -0.000188 0.000093 0.000093 0.0000102 0.0000088 0.000105 0.000106 1998 8 26 51051 0.058208 0.476661 -0.1250616 0.0006644 0.000005 -0.000156 0.000086 0.000087 0.0000107 0.0000088 0.000100 0.000083 1998 8 27 51052 0.060377 0.476586 -0.1257312 0.0006535 -0.000016 -0.000137 0.000091 0.000094 0.0000087 0.0000084 0.000095 0.000087 1998 8 28 51053 0.063026 0.476539 -0.1263947 0.0005792 -0.000074 -0.000128 0.000093 0.000096 0.0000082 0.0000120 0.000095 0.000091 1998 8 29 51054 0.065559 0.476380 -0.1270163 0.0005247 -0.000133 -0.000127 0.000094 0.000093 0.0000085 0.0000147 0.000095 0.000091 1998 8 30 51055 0.067535 0.476579 -0.1275867 0.0005575 -0.000173 -0.000126 0.000092 0.000090 0.0000089 0.0000128 0.000097 0.000092 1998 8 31 51056 0.069506 0.476188 -0.1281246 0.0005890 -0.000169 -0.000126 0.000088 0.000086 0.0000093 0.0000094 0.000098 0.000093 1998 9 1 51057 0.071099 0.475846 -0.1286658 0.0006094 -0.000116 -0.000123 0.000089 0.000087 0.0000097 0.0000113 0.000099 0.000094 1998 9 2 51058 0.072867 0.475012 -0.1292507 0.0006586 -0.000026 -0.000118 0.000086 0.000085 0.0000100 0.0000133 0.000100 0.000095 1998 9 3 51059 0.074710 0.473719 -0.1299196 0.0007357 0.000077 -0.000115 0.000084 0.000083 0.0000099 0.0000124 0.000099 0.000093 1998 9 4 51060 0.077034 0.472380 -0.1307121 0.0008593 0.000168 -0.000114 0.000086 0.000084 0.0000097 0.0000117 0.000097 0.000089 1998 9 5 51061 0.079792 0.471216 -0.1316660 0.0010541 0.000227 -0.000117 0.000084 0.000082 0.0000094 0.0000105 0.000095 0.000086 1998 9 6 51062 0.082456 0.470298 -0.1328046 0.0012430 0.000242 -0.000122 0.000087 0.000085 0.0000091 0.0000119 0.000092 0.000082 1998 9 7 51063 0.084926 0.469242 -0.1341198 0.0013878 0.000211 -0.000132 0.000092 0.000089 0.0000089 0.0000144 0.000090 0.000079 1998 9 8 51064 0.087242 0.468500 -0.1355597 0.0014604 0.000143 -0.000142 0.000097 0.000093 0.0000086 0.0000133 0.000088 0.000075 1998 9 9 51065 0.089364 0.467973 -0.1370350 0.0014422 0.000055 -0.000150 0.000095 0.000090 0.0000084 0.0000130 0.000086 0.000072 1998 9 10 51066 0.091378 0.467249 -0.1384423 0.0013288 -0.000036 -0.000155 0.000092 0.000087 0.0000086 0.0000114 0.000088 0.000073 1998 9 11 51067 0.093193 0.466815 -0.1396965 0.0011493 -0.000110 -0.000155 0.000096 0.000091 0.0000090 0.0000090 0.000090 0.000077 1998 9 12 51068 0.094917 0.466240 -0.1407557 0.0009623 -0.000156 -0.000150 0.000100 0.000095 0.0000094 0.0000101 0.000092 0.000080 1998 9 13 51069 0.096750 0.465939 -0.1416303 0.0007907 -0.000167 -0.000142 0.000097 0.000091 0.0000099 0.0000104 0.000095 0.000083 1998 9 14 51070 0.098955 0.465299 -0.1423744 0.0006910 -0.000144 -0.000133 0.000094 0.000089 0.0000103 0.0000113 0.000097 0.000087 1998 9 15 51071 0.101731 0.465152 -0.1430620 0.0006999 -0.000096 -0.000126 0.000094 0.000090 0.0000107 0.0000101 0.000100 0.000090 1998 9 16 51072 0.104166 0.464857 -0.1437595 0.0007637 -0.000037 -0.000125 0.000092 0.000089 0.0000111 0.0000092 0.000103 0.000093 1998 9 17 51073 0.106430 0.464497 -0.1445049 0.0008307 0.000020 -0.000127 0.000093 0.000089 0.0000108 0.0000097 0.000134 0.000139 1998 9 18 51074 0.107906 0.464030 -0.1453070 0.0009057 0.000055 -0.000135 0.000095 0.000091 0.0000103 0.0000080 0.000158 0.000176 1998 9 19 51075 0.109179 0.462759 -0.1461665 0.0010053 0.000055 -0.000147 0.000095 0.000091 0.0000098 0.0000090 0.000143 0.000156 1998 9 20 51076 0.110427 0.461268 -0.1471019 0.0011045 0.000024 -0.000156 0.000093 0.000090 0.0000093 0.0000099 0.000128 0.000136 1998 9 21 51077 0.112006 0.459620 -0.1481564 0.0011464 -0.000028 -0.000156 0.000088 0.000089 0.0000088 0.0000093 0.000114 0.000116 1998 9 22 51078 0.113824 0.458231 -0.1493658 0.0011347 -0.000085 -0.000143 0.000085 0.000087 0.0000083 0.0000103 0.000099 0.000096 1998 9 23 51079 0.115798 0.456628 -0.1507047 0.0010592 -0.000130 -0.000116 0.000083 0.000084 0.0000078 0.0000116 0.000085 0.000076 1998 9 24 51080 0.117547 0.455215 -0.1520598 0.0010081 -0.000152 -0.000075 0.000084 0.000084 0.0000076 0.0000102 0.000081 0.000070 1998 9 25 51081 0.119165 0.453886 -0.1532734 0.0009565 -0.000146 -0.000026 0.000088 0.000088 0.0000075 0.0000072 0.000081 0.000070 1998 9 26 51082 0.120265 0.452728 -0.1542392 0.0009176 -0.000117 0.000022 0.000092 0.000093 0.0000074 0.0000076 0.000082 0.000070 1998 9 27 51083 0.121234 0.451414 -0.1549771 0.0008793 -0.000076 0.000058 0.000095 0.000095 0.0000072 0.0000092 0.000082 0.000069 1998 9 28 51084 0.122144 0.449883 -0.1556197 0.0008244 -0.000038 0.000075 0.000092 0.000091 0.0000071 0.0000094 0.000082 0.000069 1998 9 29 51085 0.123230 0.447977 -0.1563210 0.0008260 -0.000018 0.000066 0.000086 0.000086 0.0000070 0.0000105 0.000082 0.000069 1998 9 30 51086 0.124123 0.446552 -0.1571670 0.0009189 -0.000011 0.000041 0.000085 0.000085 0.0000090 0.0000106 0.000093 0.000095 1998 10 1 51087 0.125225 0.445102 -0.1581676 0.0010775 -0.000048 -0.000019 0.000087 0.000089 0.0000085 0.0000102 0.000074 0.000081 1998 10 2 51088 0.126449 0.444072 -0.1593475 0.0012899 -0.000096 -0.000082 0.000086 0.000086 0.0000072 0.0000107 0.000045 0.000055 1998 10 3 51089 0.127917 0.442585 -0.1607544 0.0015277 -0.000115 -0.000104 0.000085 0.000085 0.0000072 0.0000098 0.000053 0.000058 1998 10 4 51090 0.129823 0.441297 -0.1623949 0.0017306 -0.000095 -0.000108 0.000090 0.000092 0.0000073 0.0000097 0.000064 0.000064 1998 10 5 51091 0.131492 0.439777 -0.1642116 0.0018721 -0.000047 -0.000104 0.000094 0.000096 0.0000074 0.0000097 0.000076 0.000070 1998 10 6 51092 0.132923 0.438101 -0.1661040 0.0018956 -0.000006 -0.000095 0.000093 0.000095 0.0000075 0.0000099 0.000088 0.000076 1998 10 7 51093 0.134298 0.436163 -0.1679758 0.0018180 0.000055 -0.000189 0.000094 0.000095 0.0000113 0.0000104 0.000116 0.000105 1998 10 8 51094 0.135614 0.433970 -0.1697686 0.0017079 -0.000084 -0.000066 0.000095 0.000093 0.0000078 0.0000111 0.000078 0.000095 1998 10 9 51095 0.137090 0.432040 -0.1714367 0.0015905 -0.000319 0.000020 0.000096 0.000093 0.0000066 0.0000117 0.000063 0.000084 1998 10 10 51096 0.138853 0.430574 -0.1729577 0.0014655 -0.000554 0.000037 0.000096 0.000095 0.0000072 0.0000105 0.000064 0.000076 1998 10 11 51097 0.140141 0.429768 -0.1743431 0.0013190 -0.000695 0.000012 0.000093 0.000092 0.0000078 0.0000103 0.000065 0.000069 1998 10 12 51098 0.141367 0.428623 -0.1756310 0.0012583 -0.000663 -0.000045 0.000099 0.000098 0.0000084 0.0000120 0.000066 0.000062 1998 10 13 51099 0.142029 0.427854 -0.1768737 0.0012539 -0.000441 -0.000111 0.000101 0.000100 0.0000090 0.0000126 0.000067 0.000055 1998 10 14 51100 0.142781 0.426150 -0.1781224 0.0013138 0.000018 -0.000136 0.000096 0.000096 0.0000096 0.0000110 0.000087 0.000092 1998 10 15 51101 0.143983 0.424579 -0.1794154 0.0013755 0.000383 -0.000170 0.000097 0.000097 0.0000096 0.0000085 0.000092 0.000102 1998 10 16 51102 0.145158 0.423291 -0.1807707 0.0013843 0.000599 -0.000203 0.000099 0.000099 0.0000095 0.0000092 0.000093 0.000102 1998 10 17 51103 0.146610 0.422183 -0.1821872 0.0014249 0.000653 -0.000233 0.000101 0.000100 0.0000093 0.0000108 0.000094 0.000103 1998 10 18 51104 0.147951 0.421134 -0.1836488 0.0014614 0.000571 -0.000254 0.000104 0.000105 0.0000092 0.0000105 0.000095 0.000103 1998 10 19 51105 0.149169 0.419902 -0.1851320 0.0014723 0.000419 -0.000258 0.000104 0.000107 0.0000091 0.0000099 0.000096 0.000103 1998 10 20 51106 0.150120 0.418572 -0.1866114 0.0014537 0.000269 -0.000238 0.000098 0.000100 0.0000089 0.0000101 0.000097 0.000104 1998 10 21 51107 0.151142 0.417031 -0.1880647 0.0014219 0.000168 -0.000187 0.000092 0.000094 0.0000088 0.0000100 0.000098 0.000104 1998 10 22 51108 0.151753 0.414924 -0.1894758 0.0013638 0.000173 -0.000108 0.000090 0.000092 0.0000071 0.0000085 0.000101 0.000105 1998 10 23 51109 0.152209 0.413092 -0.1908356 0.0012714 0.000189 0.000000 0.000090 0.000092 0.0000070 0.0000070 0.000101 0.000104 1998 10 24 51110 0.152407 0.411067 -0.1921387 0.0012330 0.000194 0.000114 0.000094 0.000094 0.0000077 0.0000080 0.000100 0.000103 1998 10 25 51111 0.152892 0.409613 -0.1933827 0.0012442 0.000188 0.000204 0.000091 0.000090 0.0000084 0.0000085 0.000099 0.000102 1998 10 26 51112 0.153347 0.408126 -0.1945719 0.0012067 0.000170 0.000245 0.000085 0.000087 0.0000091 0.0000099 0.000098 0.000100 1998 10 27 51113 0.154045 0.406354 -0.1957279 0.0011797 0.000146 0.000228 0.000082 0.000086 0.0000098 0.0000104 0.000097 0.000099 1998 10 28 51114 0.154899 0.404677 -0.1969002 0.0012141 0.000119 0.000168 0.000081 0.000082 0.0000105 0.0000092 0.000096 0.000098 1998 10 29 51115 0.155954 0.402817 -0.1981644 0.0013423 0.000112 0.000061 0.000079 0.000077 0.0000113 0.0000113 0.000074 0.000088 1998 10 30 51116 0.157120 0.401369 -0.1996018 0.0015283 0.000075 -0.000010 0.000078 0.000079 0.0000121 0.0000125 0.000061 0.000084 1998 10 31 51117 0.158130 0.399820 -0.2012669 0.0017552 -0.000023 0.000013 0.000080 0.000082 0.0000130 0.0000122 0.000091 0.000100 1998 11 1 51118 0.159319 0.398389 -0.2031589 0.0019863 -0.000126 0.000065 0.000085 0.000086 0.0000138 0.0000107 0.000121 0.000117 1998 11 2 51119 0.160745 0.396949 -0.2052159 0.0021278 -0.000199 0.000104 0.000090 0.000091 0.0000147 0.0000091 0.000150 0.000133 1998 11 3 51120 0.161787 0.395384 -0.2073360 0.0021183 -0.000218 0.000099 0.000091 0.000093 0.0000155 0.0000110 0.000179 0.000150 1998 11 4 51121 0.162821 0.394073 -0.2094121 0.0020136 -0.000123 -0.000011 0.000090 0.000091 0.0000108 0.0000132 0.000128 0.000130 1998 11 5 51122 0.163271 0.392328 -0.2113631 0.0018696 -0.000057 -0.000122 0.000088 0.000089 0.0000057 0.0000132 0.000088 0.000102 1998 11 6 51123 0.163005 0.390673 -0.2131331 0.0017081 -0.000051 -0.000083 0.000091 0.000094 0.0000146 0.0000131 0.000118 0.000111 1998 11 7 51124 0.163118 0.388323 -0.2147314 0.0015676 -0.000057 -0.000008 0.000098 0.000101 0.0000184 0.0000105 0.000267 0.000319 1998 11 8 51125 0.163529 0.385996 -0.2162179 0.0014571 -0.000064 0.000052 0.000105 0.000107 0.0000166 0.0000099 0.000468 0.000628 1998 11 9 51126 0.164239 0.383501 -0.2176606 0.0014470 -0.000069 0.000089 0.000107 0.000107 0.0000147 0.0000107 0.000669 0.000937 1998 11 10 51127 0.164828 0.381368 -0.2191094 0.0014612 -0.000064 0.000081 0.000099 0.000099 0.0000129 0.0000109 0.000676 0.000956 1998 11 11 51128 0.165498 0.378897 -0.2205861 0.0014748 -0.000048 0.000026 0.000089 0.000087 0.0000110 0.0000115 0.000212 0.000274 1998 11 12 51129 0.166126 0.376941 -0.2220893 0.0015038 -0.000057 0.000024 0.000088 0.000088 0.0000108 0.0000108 0.000093 0.000091 1998 11 13 51130 0.166646 0.375065 -0.2236071 0.0015182 -0.000081 0.000054 0.000092 0.000092 0.0000111 0.0000078 0.000088 0.000075 1998 11 14 51131 0.166615 0.372699 -0.2251249 0.0015206 -0.000099 0.000079 0.000095 0.000095 0.0000115 0.0000075 0.000088 0.000074 1998 11 15 51132 0.166172 0.370966 -0.2266275 0.0014843 -0.000104 0.000084 0.000105 0.000103 0.0000119 0.0000098 0.000094 0.000086 1998 11 16 51133 0.165303 0.368715 -0.2281016 0.0014489 -0.000096 0.000073 0.000112 0.000109 0.0000124 0.0000092 0.000100 0.000099 1998 11 17 51134 0.164642 0.366689 -0.2295376 0.0014052 -0.000079 0.000048 0.000109 0.000106 0.0000128 0.0000087 0.000106 0.000111 1998 11 18 51135 0.163987 0.364776 -0.2309310 0.0013823 -0.000057 0.000023 0.000103 0.000102 0.0000132 0.0000082 0.000111 0.000123 1998 11 19 51136 0.163844 0.362806 -0.2322815 0.0013275 -0.000039 0.000014 0.000101 0.000103 0.0000129 0.0000079 0.000109 0.000122 1998 11 20 51137 0.163189 0.361059 -0.2335904 0.0012541 -0.000027 0.000027 0.000106 0.000109 0.0000123 0.0000077 0.000104 0.000117 1998 11 21 51138 0.162137 0.359158 -0.2348596 0.0012246 -0.000019 0.000065 0.000107 0.000109 0.0000118 0.0000073 0.000099 0.000112 1998 11 22 51139 0.160045 0.357478 -0.2360944 0.0012166 -0.000012 0.000118 0.000103 0.000103 0.0000112 0.0000066 0.000094 0.000106 1998 11 23 51140 0.158064 0.355049 -0.2373093 0.0012452 -0.000002 0.000175 0.000101 0.000101 0.0000106 0.0000064 0.000090 0.000101 1998 11 24 51141 0.156390 0.353282 -0.2385341 0.0012724 0.000015 0.000218 0.000105 0.000107 0.0000100 0.0000074 0.000085 0.000096 1998 11 25 51142 0.154757 0.351298 -0.2398133 0.0013221 0.000038 0.000235 0.000106 0.000106 0.0000095 0.0000077 0.000080 0.000090 1998 11 26 51143 0.153780 0.349333 -0.2411976 0.0014533 0.000063 0.000215 0.000106 0.000106 0.0000091 0.0000074 0.000078 0.000089 1998 11 27 51144 0.152805 0.347431 -0.2427257 0.0016211 0.000085 0.000161 0.000109 0.000110 0.0000089 0.0000078 0.000077 0.000088 1998 11 28 51145 0.151871 0.345067 -0.2444061 0.0017657 0.000095 0.000085 0.000107 0.000107 0.0000086 0.0000079 0.000076 0.000088 1998 11 29 51146 0.150825 0.342991 -0.2462063 0.0018528 0.000087 0.000005 0.000108 0.000109 0.0000083 0.0000078 0.000075 0.000088 1998 11 30 51147 0.150208 0.340849 -0.2480575 0.0018502 0.000059 -0.000058 0.000107 0.000111 0.0000081 0.0000080 0.000074 0.000087 1998 12 1 51148 0.149270 0.339659 -0.2498752 0.0017509 0.000012 -0.000085 0.000103 0.000106 0.0000078 0.0000083 0.000074 0.000087 1998 12 2 51149 0.147993 0.337786 -0.2515847 0.0016062 -0.000044 -0.000065 0.000097 0.000099 0.0000075 0.0000083 0.000072 0.000087 1998 12 3 51150 0.146905 0.336292 -0.2531415 0.0014331 -0.000100 0.000002 0.000099 0.000100 0.0000075 0.0000081 0.000074 0.000090 1998 12 4 51151 0.146559 0.335239 -0.2545360 0.0012789 -0.000142 0.000099 0.000107 0.000110 0.0000075 0.0000083 0.000077 0.000094 1998 12 5 51152 0.146011 0.334602 -0.2557852 0.0011706 -0.000159 0.000197 0.000115 0.000117 0.0000075 0.0000083 0.000080 0.000098 1998 12 6 51153 0.144880 0.333621 -0.2569222 0.0011236 -0.000149 0.000265 0.000114 0.000115 0.0000076 0.0000079 0.000083 0.000102 1998 12 7 51154 0.143647 0.332591 -0.2579892 0.0010984 -0.000118 0.000277 0.000106 0.000106 0.0000076 0.0000076 0.000086 0.000106 1998 12 8 51155 0.142304 0.331454 -0.2590335 0.0010759 -0.000085 0.000225 0.000100 0.000100 0.0000076 0.0000080 0.000089 0.000110 1998 12 9 51156 0.140900 0.330021 -0.2601008 0.0010844 -0.000035 0.000158 0.000097 0.000097 0.0000089 0.0000081 0.000084 0.000098 1998 12 10 51157 0.139637 0.328098 -0.2612206 0.0011459 -0.000072 -0.000008 0.000101 0.000101 0.0000091 0.0000082 0.000107 0.000109 1998 12 11 51158 0.138569 0.326089 -0.2623903 0.0011878 -0.000143 -0.000116 0.000106 0.000104 0.0000089 0.0000082 0.000127 0.000119 1998 12 12 51159 0.137848 0.324027 -0.2635785 0.0011867 -0.000193 -0.000051 0.000103 0.000100 0.0000087 0.0000077 0.000113 0.000111 1998 12 13 51160 0.137318 0.322217 -0.2647426 0.0011312 -0.000214 0.000084 0.000091 0.000091 0.0000085 0.0000074 0.000100 0.000103 1998 12 14 51161 0.137140 0.320448 -0.2658454 0.0010471 -0.000196 0.000220 0.000081 0.000082 0.0000083 0.0000081 0.000086 0.000094 1998 12 15 51162 0.137233 0.318578 -0.2668620 0.0009750 -0.000143 0.000291 0.000077 0.000078 0.0000081 0.0000067 0.000073 0.000086 1998 12 16 51163 0.137480 0.317175 -0.2677818 0.0008713 -0.000040 0.000147 0.000073 0.000075 0.0000079 0.0000065 0.000074 0.000091 1998 12 17 51164 0.137902 0.315989 -0.2686077 0.0007881 -0.000008 0.000078 0.000070 0.000071 0.0000057 0.0000079 0.000078 0.000078 1998 12 18 51165 0.138721 0.314743 -0.2693557 0.0007106 0.000022 0.000000 0.000073 0.000074 0.0000048 0.0000073 0.000072 0.000066 1998 12 19 51166 0.139944 0.313534 -0.2700453 0.0006611 0.000053 -0.000074 0.000076 0.000079 0.0000047 0.0000071 0.000062 0.000057 1998 12 20 51167 0.141331 0.312710 -0.2706962 0.0006391 0.000073 -0.000108 0.000081 0.000085 0.0000046 0.0000073 0.000052 0.000047 1998 12 21 51168 0.142507 0.311937 -0.2713342 0.0006400 0.000080 -0.000091 0.000086 0.000090 0.0000045 0.0000070 0.000041 0.000038 1998 12 22 51169 0.142808 0.310416 -0.2719989 0.0006948 0.000067 -0.000026 0.000079 0.000084 0.0000044 0.0000070 0.000031 0.000028 1998 12 23 51170 0.143063 0.308447 -0.2727447 0.0008173 0.000031 0.000071 0.000078 0.000083 0.0000082 0.0000076 0.000067 0.000072 1998 12 24 51171 0.143107 0.306854 -0.2736287 0.0009912 -0.000029 0.000190 0.000086 0.000089 0.0000091 0.0000081 0.000083 0.000090 1998 12 25 51172 0.143091 0.305507 -0.2746850 0.0011934 -0.000099 0.000296 0.000090 0.000093 0.0000088 0.0000088 0.000090 0.000095 1998 12 26 51173 0.142894 0.304015 -0.2759059 0.0013127 -0.000158 0.000356 0.000091 0.000092 0.0000086 0.0000090 0.000097 0.000101 1998 12 27 51174 0.142288 0.302602 -0.2772430 0.0013361 -0.000185 0.000341 0.000094 0.000094 0.0000083 0.0000085 0.000103 0.000107 1998 12 28 51175 0.141712 0.301423 -0.2786222 0.0013296 -0.000166 0.000241 0.000099 0.000100 0.0000080 0.0000098 0.000110 0.000112 1998 12 29 51176 0.141295 0.300315 -0.2799661 0.0012855 -0.000098 0.000072 0.000096 0.000098 0.0000078 0.0000105 0.000117 0.000118 1998 12 30 51177 0.140720 0.298889 -0.2812150 0.0011891 0.000016 -0.000155 0.000091 0.000091 0.0000080 0.0000102 0.000076 0.000071 1998 12 31 51178 0.139816 0.297679 -0.2823394 0.0010543 0.000132 -0.000342 0.000096 0.000094 0.0000082 0.0000095 0.000067 0.000061 1999 1 1 51179 0.138556 0.295932 0.7166593 0.0009431 0.000226 -0.000456 0.000097 0.000097 0.0000085 0.0000095 0.000070 0.000066 1999 1 2 51180 0.137702 0.293717 0.7157548 0.0008776 0.000280 -0.000485 0.000096 0.000095 0.0000088 0.0000114 0.000074 0.000071 1999 1 3 51181 0.137553 0.291797 0.7149073 0.0008616 0.000285 -0.000432 0.000090 0.000091 0.0000090 0.0000119 0.000078 0.000075 1999 1 4 51182 0.137279 0.290386 0.7140725 0.0008692 0.000243 -0.000323 0.000081 0.000080 0.0000093 0.0000112 0.000082 0.000080 1999 1 5 51183 0.136737 0.289080 0.7132094 0.0008862 0.000169 -0.000192 0.000079 0.000077 0.0000096 0.0000096 0.000086 0.000085 1999 1 6 51184 0.136235 0.287929 0.7122861 0.0009623 0.000082 -0.000076 0.000074 0.000074 0.0000099 0.0000090 0.000090 0.000090 1999 1 7 51185 0.136337 0.287264 0.7112876 0.0010610 0.000004 0.000002 0.000071 0.000073 0.0000098 0.0000087 0.000090 0.000091 1999 1 8 51186 0.136058 0.286794 0.7102220 0.0010823 -0.000053 0.000034 0.000073 0.000075 0.0000097 0.0000077 0.000089 0.000090 1999 1 9 51187 0.135915 0.286345 0.7091217 0.0010550 -0.000079 0.000032 0.000076 0.000077 0.0000095 0.0000079 0.000088 0.000089 1999 1 10 51188 0.134956 0.285981 0.7080345 0.0010425 -0.000076 0.000011 0.000081 0.000082 0.0000094 0.0000083 0.000086 0.000088 1999 1 11 51189 0.133677 0.285128 0.7070077 0.0009881 -0.000054 -0.000008 0.000084 0.000085 0.0000092 0.0000079 0.000085 0.000087 1999 1 12 51190 0.131523 0.283832 0.7060726 0.0008842 -0.000024 -0.000011 0.000081 0.000083 0.0000090 0.0000075 0.000084 0.000086 1999 1 13 51191 0.129154 0.281902 0.7052391 0.0007671 0.000000 0.000008 0.000081 0.000083 0.0000089 0.0000074 0.000083 0.000085 1999 1 14 51192 0.126940 0.280251 0.7045006 0.0007044 0.000007 0.000055 0.000081 0.000083 0.0000086 0.0000078 0.000111 0.000121 1999 1 15 51193 0.124938 0.278124 0.7038437 0.0006631 -0.000003 0.000098 0.000081 0.000082 0.0000086 0.0000081 0.000116 0.000128 1999 1 16 51194 0.122821 0.276145 0.7032512 0.0005876 -0.000029 0.000128 0.000083 0.000085 0.0000088 0.0000086 0.000109 0.000120 1999 1 17 51195 0.120631 0.274574 0.7026965 0.0005222 -0.000057 0.000145 0.000081 0.000083 0.0000089 0.0000086 0.000102 0.000111 1999 1 18 51196 0.118832 0.272992 0.7021356 0.0005579 -0.000080 0.000153 0.000077 0.000079 0.0000091 0.0000084 0.000095 0.000103 1999 1 19 51197 0.117717 0.271765 0.7015063 0.0006826 -0.000089 0.000160 0.000079 0.000080 0.0000093 0.0000084 0.000088 0.000095 1999 1 20 51198 0.116362 0.270125 0.7007426 0.0008418 -0.000086 0.000173 0.000081 0.000082 0.0000094 0.0000083 0.000080 0.000086 1999 1 21 51199 0.115994 0.268854 0.6997972 0.0010355 -0.000076 0.000193 0.000083 0.000083 0.0000101 0.0000068 0.000084 0.000089 1999 1 22 51200 0.116052 0.267726 0.6986610 0.0012249 -0.000068 0.000218 0.000084 0.000085 0.0000110 0.0000070 0.000090 0.000095 1999 1 23 51201 0.116516 0.266646 0.6973692 0.0013400 -0.000068 0.000238 0.000085 0.000087 0.0000118 0.0000091 0.000097 0.000101 1999 1 24 51202 0.116090 0.265726 0.6959902 0.0013888 -0.000075 0.000245 0.000089 0.000091 0.0000127 0.0000087 0.000104 0.000107 1999 1 25 51203 0.115235 0.264525 0.6946023 0.0013666 -0.000081 0.000229 0.000091 0.000093 0.0000135 0.0000084 0.000111 0.000113 1999 1 26 51204 0.113848 0.263331 0.6932684 0.0013007 -0.000072 0.000189 0.000090 0.000091 0.0000144 0.0000084 0.000118 0.000119 1999 1 27 51205 0.112829 0.262428 0.6920176 0.0012175 -0.000040 0.000122 0.000092 0.000091 0.0000153 0.0000087 0.000125 0.000125 1999 1 28 51206 0.111573 0.261544 0.6908407 0.0011566 -0.000035 -0.000001 0.000089 0.000088 0.0000123 0.0000092 0.000140 0.000153 1999 1 29 51207 0.110523 0.260776 0.6897006 0.0011455 0.000117 -0.000031 0.000086 0.000088 0.0000087 0.0000085 0.000082 0.000093 1999 1 30 51208 0.109335 0.259822 0.6885608 0.0011761 0.000111 -0.000168 0.000090 0.000090 0.0000102 0.0000082 0.000108 0.000109 1999 1 31 51209 0.108156 0.258846 0.6873896 0.0012053 0.000039 -0.000288 0.000094 0.000094 0.0000119 0.0000076 0.000139 0.000129 1999 2 1 51210 0.106678 0.257585 0.6861653 0.0012514 -0.000063 -0.000329 0.000096 0.000096 0.0000137 0.0000076 0.000169 0.000150 1999 2 2 51211 0.105047 0.256216 0.6848815 0.0012965 -0.000151 -0.000241 0.000094 0.000095 0.0000154 0.0000090 0.000200 0.000170 1999 2 3 51212 0.103532 0.254812 0.6835477 0.0013153 -0.000118 0.000000 0.000094 0.000095 0.0000171 0.0000093 0.000151 0.000154 1999 2 4 51213 0.101783 0.253546 0.6821849 0.0013088 -0.000086 0.000327 0.000093 0.000095 0.0000167 0.0000090 0.000146 0.000163 1999 2 5 51214 0.100769 0.252499 0.6808200 0.0013206 -0.000025 0.000607 0.000095 0.000098 0.0000156 0.0000093 0.000157 0.000181 1999 2 6 51215 0.100539 0.252294 0.6794823 0.0013051 0.000108 0.000656 0.000098 0.000101 0.0000145 0.0000094 0.000209 0.000215 1999 2 7 51216 0.099851 0.252520 0.6782016 0.0012415 0.000222 0.000544 0.000096 0.000097 0.0000133 0.0000091 0.000260 0.000249 1999 2 8 51217 0.098577 0.252343 0.6770038 0.0011769 0.000272 0.000322 0.000093 0.000093 0.0000122 0.0000085 0.000311 0.000284 1999 2 9 51218 0.096610 0.252287 0.6759037 0.0010912 0.000236 0.000066 0.000094 0.000093 0.0000111 0.0000082 0.000363 0.000318 1999 2 10 51219 0.094661 0.252086 0.6748976 0.0009981 0.000049 -0.000051 0.000096 0.000095 0.0000100 0.0000081 0.000159 0.000144 1999 2 11 51220 0.092336 0.251428 0.6739630 0.0009078 -0.000078 -0.000233 0.000097 0.000094 0.0000097 0.0000090 0.000113 0.000101 1999 2 12 51221 0.090687 0.250252 0.6730645 0.0008989 -0.000140 -0.000403 0.000104 0.000097 0.0000097 0.0000103 0.000128 0.000108 1999 2 13 51222 0.089215 0.249601 0.6721597 0.0009358 -0.000170 -0.000460 0.000107 0.000099 0.0000097 0.0000102 0.000120 0.000116 1999 2 14 51223 0.087880 0.248440 0.6712026 0.0010119 -0.000155 -0.000423 0.000109 0.000104 0.0000097 0.0000109 0.000113 0.000124 1999 2 15 51224 0.086802 0.247488 0.6701452 0.0011494 -0.000116 -0.000305 0.000111 0.000107 0.0000097 0.0000121 0.000105 0.000132 1999 2 16 51225 0.085794 0.246935 0.6689444 0.0012738 -0.000075 -0.000147 0.000107 0.000102 0.0000097 0.0000128 0.000097 0.000136 1999 2 17 51226 0.084486 0.246901 0.6675757 0.0014350 -0.000055 0.000058 0.000107 0.000103 0.0000097 0.0000135 0.000090 0.000103 1999 2 18 51227 0.082676 0.246986 0.6660459 0.0015875 -0.000036 0.000046 0.000108 0.000106 0.0000140 0.0000129 0.000106 0.000113 1999 2 19 51228 0.080738 0.246690 0.6643970 0.0016861 -0.000019 -0.000097 0.000109 0.000106 0.0000198 0.0000128 0.000131 0.000138 1999 2 20 51229 0.079269 0.246091 0.6626985 0.0016762 -0.000007 -0.000190 0.000109 0.000102 0.0000182 0.0000128 0.000126 0.000130 1999 2 21 51230 0.078448 0.245630 0.6610308 0.0016144 -0.000005 -0.000251 0.000105 0.000099 0.0000167 0.0000112 0.000121 0.000122 1999 2 22 51231 0.078223 0.245343 0.6594665 0.0015032 -0.000019 -0.000247 0.000110 0.000103 0.0000151 0.0000130 0.000115 0.000114 1999 2 23 51232 0.078169 0.245079 0.6580548 0.0013382 -0.000059 -0.000178 0.000106 0.000101 0.0000136 0.0000124 0.000110 0.000106 1999 2 24 51233 0.077787 0.244851 0.6568126 0.0011506 -0.000126 -0.000070 0.000094 0.000092 0.0000120 0.0000092 0.000105 0.000098 1999 2 25 51234 0.076505 0.244565 0.6557245 0.0010022 -0.000218 0.000036 0.000098 0.000095 0.0000115 0.0000088 0.000103 0.000095 1999 2 26 51235 0.075028 0.244029 0.6547513 0.0009225 -0.000318 0.000116 0.000101 0.000097 0.0000114 0.0000100 0.000102 0.000095 1999 2 27 51236 0.073094 0.243404 0.6538441 0.0008998 -0.000404 0.000162 0.000100 0.000098 0.0000112 0.0000111 0.000102 0.000094 1999 2 28 51237 0.071453 0.242511 0.6529587 0.0009142 -0.000453 0.000170 0.000107 0.000105 0.0000110 0.0000143 0.000101 0.000094 1999 3 1 51238 0.070010 0.242040 0.6520632 0.0009326 -0.000450 0.000156 0.000111 0.000107 0.0000109 0.0000155 0.000101 0.000093 1999 3 2 51239 0.068920 0.241535 0.6511399 0.0009484 -0.000386 0.000133 0.000107 0.000103 0.0000107 0.0000126 0.000100 0.000092 1999 3 3 51240 0.068105 0.241646 0.6501832 0.0009716 -0.000270 0.000116 0.000104 0.000100 0.0000105 0.0000125 0.000099 0.000092 1999 3 4 51241 0.067531 0.241822 0.6491982 0.0010161 -0.000123 0.000115 0.000107 0.000105 0.0000098 0.0000146 0.000091 0.000085 1999 3 5 51242 0.066588 0.242150 0.6482019 0.0010265 0.000020 0.000121 0.000110 0.000107 0.0000089 0.0000136 0.000080 0.000076 1999 3 6 51243 0.065454 0.242609 0.6472224 0.0009207 0.000121 0.000123 0.000110 0.000107 0.0000079 0.0000093 0.000068 0.000067 1999 3 7 51244 0.064356 0.242764 0.6462924 0.0008636 0.000157 0.000111 0.000111 0.000109 0.0000070 0.0000067 0.000056 0.000059 1999 3 8 51245 0.063341 0.242650 0.6454378 0.0008193 0.000124 0.000079 0.000107 0.000106 0.0000060 0.0000065 0.000045 0.000050 1999 3 9 51246 0.062207 0.242531 0.6446656 0.0007243 0.000046 0.000034 0.000093 0.000094 0.0000051 0.0000073 0.000033 0.000041 1999 3 10 51247 0.060978 0.242102 0.6439569 0.0006881 -0.000074 -0.000032 0.000087 0.000087 0.0000087 0.0000065 0.000084 0.000089 1999 3 11 51248 0.059939 0.241665 0.6432708 0.0006841 -0.000103 -0.000039 0.000094 0.000091 0.0000069 0.0000080 0.000082 0.000094 1999 3 12 51249 0.058874 0.241394 0.6425540 0.0007513 -0.000046 -0.000011 0.000100 0.000097 0.0000065 0.0000102 0.000081 0.000089 1999 3 13 51250 0.057525 0.240951 0.6417566 0.0008426 0.000060 0.000041 0.000105 0.000102 0.0000072 0.0000100 0.000088 0.000087 1999 3 14 51251 0.056056 0.240506 0.6408402 0.0009787 0.000160 0.000099 0.000104 0.000102 0.0000079 0.0000107 0.000094 0.000086 1999 3 15 51252 0.054467 0.239970 0.6397777 0.0011525 0.000195 0.000142 0.000099 0.000098 0.0000087 0.0000115 0.000101 0.000084 1999 3 16 51253 0.052925 0.239649 0.6385519 0.0013344 0.000133 0.000150 0.000095 0.000093 0.0000094 0.0000118 0.000108 0.000082 1999 3 17 51254 0.051031 0.239118 0.6371582 0.0014711 -0.000066 0.000112 0.000094 0.000091 0.0000092 0.0000128 0.000092 0.000090 1999 3 18 51255 0.049806 0.238846 0.6356113 0.0015964 -0.000263 0.000040 0.000095 0.000093 0.0000092 0.0000128 0.000088 0.000091 1999 3 19 51256 0.048902 0.238987 0.6339543 0.0016651 -0.000411 -0.000049 0.000099 0.000098 0.0000091 0.0000100 0.000088 0.000091 1999 3 20 51257 0.048263 0.239567 0.6322556 0.0016760 -0.000478 -0.000129 0.000101 0.000099 0.0000091 0.0000097 0.000088 0.000090 1999 3 21 51258 0.047181 0.240113 0.6305933 0.0016300 -0.000446 -0.000175 0.000103 0.000100 0.0000091 0.0000110 0.000088 0.000090 1999 3 22 51259 0.046485 0.240602 0.6290333 0.0015265 -0.000328 -0.000172 0.000103 0.000101 0.0000091 0.0000109 0.000088 0.000089 1999 3 23 51260 0.045661 0.241084 0.6276105 0.0013812 -0.000160 -0.000114 0.000098 0.000097 0.0000091 0.0000096 0.000088 0.000088 1999 3 24 51261 0.044191 0.241527 0.6263200 0.0012489 0.000016 -0.000013 0.000093 0.000092 0.0000091 0.0000076 0.000088 0.000088 1999 3 25 51262 0.041980 0.241389 0.6251218 0.0011670 0.000154 0.000117 0.000089 0.000089 0.0000093 0.0000087 0.000108 0.000106 1999 3 26 51263 0.039260 0.241504 0.6239577 0.0011575 0.000236 0.000223 0.000091 0.000093 0.0000095 0.0000100 0.000113 0.000111 1999 3 27 51264 0.036261 0.241511 0.6227734 0.0012144 0.000258 0.000276 0.000091 0.000093 0.0000097 0.0000097 0.000110 0.000109 1999 3 28 51265 0.033663 0.241362 0.6215346 0.0012611 0.000225 0.000266 0.000088 0.000090 0.0000099 0.0000092 0.000107 0.000107 1999 3 29 51266 0.031779 0.240877 0.6202309 0.0013172 0.000158 0.000192 0.000092 0.000092 0.0000102 0.0000096 0.000103 0.000104 1999 3 30 51267 0.030008 0.240975 0.6188705 0.0013979 0.000080 0.000074 0.000092 0.000092 0.0000104 0.0000093 0.000100 0.000102 1999 3 31 51268 0.028060 0.241134 0.6174712 0.0014055 0.000016 -0.000067 0.000090 0.000091 0.0000106 0.0000099 0.000097 0.000100 1999 4 1 51269 0.026117 0.241013 0.6160552 0.0014149 -0.000018 -0.000197 0.000091 0.000091 0.0000106 0.0000100 0.000097 0.000101 1999 4 2 51270 0.024033 0.240816 0.6146468 0.0014048 -0.000017 -0.000293 0.000090 0.000090 0.0000105 0.0000096 0.000099 0.000103 1999 4 3 51271 0.021806 0.240323 0.6132716 0.0013543 0.000013 -0.000340 0.000091 0.000091 0.0000104 0.0000105 0.000100 0.000105 1999 4 4 51272 0.020132 0.239779 0.6119525 0.0012769 0.000060 -0.000332 0.000090 0.000091 0.0000104 0.0000104 0.000102 0.000107 1999 4 5 51273 0.018714 0.239766 0.6107038 0.0011871 0.000105 -0.000275 0.000086 0.000089 0.0000103 0.0000112 0.000104 0.000109 1999 4 6 51274 0.017546 0.239468 0.6095246 0.0011427 0.000132 -0.000185 0.000083 0.000087 0.0000103 0.0000112 0.000105 0.000111 1999 4 7 51275 0.015927 0.239992 0.6083998 0.0011228 0.000129 -0.000087 0.000081 0.000085 0.0000102 0.0000097 0.000107 0.000113 1999 4 8 51276 0.013851 0.240348 0.6073026 0.0010890 0.000092 0.000005 0.000081 0.000084 0.0000106 0.0000086 0.000105 0.000127 1999 4 9 51277 0.012067 0.240616 0.6061990 0.0011023 0.000030 0.000058 0.000085 0.000086 0.0000112 0.0000089 0.000103 0.000128 1999 4 10 51278 0.010987 0.240748 0.6050463 0.0011852 -0.000043 0.000070 0.000089 0.000090 0.0000118 0.0000101 0.000103 0.000123 1999 4 11 51279 0.010529 0.241202 0.6037935 0.0013054 -0.000107 0.000057 0.000088 0.000088 0.0000124 0.0000109 0.000104 0.000118 1999 4 12 51280 0.010344 0.242166 0.6023896 0.0015074 -0.000148 0.000035 0.000088 0.000088 0.0000131 0.0000108 0.000104 0.000113 1999 4 13 51281 0.009728 0.243190 0.6008006 0.0017201 -0.000154 0.000022 0.000088 0.000088 0.0000137 0.0000111 0.000104 0.000108 1999 4 14 51282 0.008842 0.243964 0.5990302 0.0018853 -0.000125 0.000025 0.000086 0.000085 0.0000143 0.0000100 0.000104 0.000104 1999 4 15 51283 0.008163 0.245116 0.5971306 0.0019333 -0.000062 0.000053 0.000085 0.000086 0.0000103 0.0000100 0.000073 0.000073 1999 4 16 51284 0.007328 0.246420 0.5951918 0.0019128 0.000016 0.000077 0.000081 0.000081 0.0000047 0.0000114 0.000031 0.000033 1999 4 17 51285 0.006417 0.247786 0.5933099 0.0018216 0.000080 0.000046 0.000083 0.000083 0.0000056 0.0000112 0.000040 0.000043 1999 4 18 51286 0.004915 0.248538 0.5915521 0.0016829 0.000132 0.000000 0.000092 0.000091 0.0000072 0.0000112 0.000053 0.000058 1999 4 19 51287 0.003132 0.249100 0.5899438 0.0015368 0.000170 -0.000035 0.000091 0.000089 0.0000087 0.0000110 0.000066 0.000073 1999 4 20 51288 0.001455 0.248958 0.5884778 0.0013922 0.000189 -0.000047 0.000090 0.000088 0.0000103 0.0000106 0.000080 0.000088 1999 4 21 51289 0.000252 0.248896 0.5871300 0.0012823 0.000242 0.000034 0.000087 0.000084 0.0000101 0.0000096 0.000092 0.000102 1999 4 22 51290 -0.001040 0.249034 0.5858698 0.0012290 0.000160 0.000019 0.000084 0.000081 0.0000094 0.0000107 0.000089 0.000109 1999 4 23 51291 -0.002166 0.249326 0.5846445 0.0012461 0.000094 -0.000033 0.000087 0.000082 0.0000098 0.0000106 0.000083 0.000127 1999 4 24 51292 -0.003528 0.250175 0.5833995 0.0012895 0.000056 -0.000092 0.000087 0.000083 0.0000107 0.0000089 0.000079 0.000150 1999 4 25 51293 -0.005284 0.251103 0.5820996 0.0013568 0.000028 -0.000141 0.000082 0.000081 0.0000116 0.0000096 0.000075 0.000172 1999 4 26 51294 -0.006903 0.252059 0.5807310 0.0014044 0.000006 -0.000152 0.000077 0.000079 0.0000125 0.0000111 0.000070 0.000195 1999 4 27 51295 -0.008070 0.252835 0.5792969 0.0014502 -0.000010 -0.000114 0.000073 0.000074 0.0000134 0.0000129 0.000066 0.000218 1999 4 28 51296 -0.008288 0.253910 0.5778167 0.0015005 -0.000077 -0.000036 0.000073 0.000074 0.0000143 0.0000107 0.000122 0.000142 1999 4 29 51297 -0.008364 0.255189 0.5763279 0.0014598 -0.000022 0.000076 0.000073 0.000074 0.0000183 0.0000081 0.000228 0.000191 1999 4 30 51298 -0.008599 0.256595 0.5748823 0.0013927 0.000068 0.000102 0.000072 0.000073 0.0000185 0.0000086 0.000234 0.000199 1999 5 1 51299 -0.009077 0.257968 0.5735242 0.0012986 0.000162 0.000048 0.000074 0.000075 0.0000168 0.0000097 0.000196 0.000176 1999 5 2 51300 -0.010328 0.258911 0.5722776 0.0011881 0.000239 -0.000040 0.000083 0.000082 0.0000152 0.0000101 0.000158 0.000152 1999 5 3 51301 -0.011903 0.259585 0.5711510 0.0010797 0.000267 -0.000119 0.000093 0.000091 0.0000135 0.0000095 0.000119 0.000129 1999 5 4 51302 -0.013454 0.260002 0.5701494 0.0009376 0.000232 -0.000154 0.000092 0.000089 0.0000119 0.0000093 0.000081 0.000106 1999 5 5 51303 -0.014935 0.259989 0.5692780 0.0007962 0.000166 -0.000046 0.000089 0.000086 0.0000116 0.0000087 0.000095 0.000109 1999 5 6 51304 -0.015746 0.260389 0.5685275 0.0007136 0.000002 -0.000032 0.000090 0.000086 0.0000105 0.0000085 0.000121 0.000123 1999 5 7 51305 -0.016397 0.261029 0.5678206 0.0007447 -0.000106 -0.000007 0.000088 0.000086 0.0000091 0.0000090 0.000113 0.000113 1999 5 8 51306 -0.017038 0.261933 0.5670562 0.0008368 -0.000138 0.000018 0.000088 0.000088 0.0000078 0.0000087 0.000092 0.000092 1999 5 9 51307 -0.017912 0.262844 0.5661586 0.0009632 -0.000120 0.000016 0.000085 0.000085 0.0000065 0.0000093 0.000072 0.000071 1999 5 10 51308 -0.018533 0.263480 0.5650890 0.0011267 -0.000079 -0.000019 0.000083 0.000082 0.0000052 0.0000100 0.000051 0.000051 1999 5 11 51309 -0.018869 0.264452 0.5638421 0.0013161 -0.000047 -0.000082 0.000077 0.000078 0.0000039 0.0000084 0.000030 0.000030 1999 5 12 51310 -0.019030 0.265783 0.5624372 0.0014977 -0.000079 -0.000175 0.000074 0.000076 0.0000098 0.0000067 0.000085 0.000096 1999 5 13 51311 -0.019246 0.267156 0.5609154 0.0015941 -0.000119 -0.000242 0.000082 0.000084 0.0000115 0.0000071 0.000101 0.000116 1999 5 14 51312 -0.019207 0.268703 0.5593497 0.0015852 -0.000158 -0.000271 0.000083 0.000085 0.0000116 0.0000076 0.000103 0.000117 1999 5 15 51313 -0.018917 0.270115 0.5578328 0.0014863 -0.000183 -0.000257 0.000080 0.000082 0.0000117 0.0000075 0.000105 0.000118 1999 5 16 51314 -0.018877 0.271757 0.5564433 0.0013152 -0.000180 -0.000208 0.000079 0.000081 0.0000118 0.0000074 0.000107 0.000119 1999 5 17 51315 -0.019350 0.273390 0.5552128 0.0011282 -0.000144 -0.000141 0.000079 0.000081 0.0000119 0.0000068 0.000109 0.000120 1999 5 18 51316 -0.019913 0.275051 0.5541141 0.0010234 -0.000081 -0.000076 0.000081 0.000083 0.0000121 0.0000067 0.000111 0.000122 1999 5 19 51317 -0.020098 0.276203 0.5530781 0.0010283 -0.000001 -0.000031 0.000079 0.000080 0.0000122 0.0000077 0.000113 0.000123 1999 5 20 51318 -0.020373 0.276969 0.5520275 0.0010676 0.000080 -0.000018 0.000077 0.000076 0.0000157 0.0000076 0.000153 0.000160 1999 5 21 51319 -0.020406 0.277546 0.5509071 0.0011381 0.000145 -0.000023 0.000075 0.000075 0.0000163 0.0000054 0.000158 0.000166 1999 5 22 51320 -0.020439 0.278393 0.5497000 0.0012367 0.000185 -0.000036 0.000076 0.000075 0.0000154 0.0000052 0.000144 0.000154 1999 5 23 51321 -0.020384 0.279023 0.5484242 0.0012851 0.000195 -0.000049 0.000079 0.000079 0.0000146 0.0000067 0.000131 0.000143 1999 5 24 51322 -0.020657 0.279877 0.5471192 0.0012881 0.000175 -0.000053 0.000082 0.000081 0.0000137 0.0000077 0.000118 0.000131 1999 5 25 51323 -0.021207 0.280413 0.5458315 0.0012829 0.000129 -0.000043 0.000083 0.000083 0.0000128 0.0000081 0.000104 0.000120 1999 5 26 51324 -0.022037 0.281118 0.5446048 0.0012067 0.000066 -0.000019 0.000080 0.000080 0.0000119 0.0000081 0.000091 0.000108 1999 5 27 51325 -0.023081 0.281463 0.5434740 0.0010627 -0.000004 0.000018 0.000079 0.000079 0.0000119 0.0000078 0.000092 0.000109 1999 5 28 51326 -0.023634 0.282104 0.5424615 0.0009286 -0.000070 0.000058 0.000081 0.000081 0.0000121 0.0000080 0.000099 0.000113 1999 5 29 51327 -0.024064 0.282951 0.5415759 0.0008116 -0.000123 0.000096 0.000081 0.000080 0.0000123 0.0000078 0.000105 0.000117 1999 5 30 51328 -0.024299 0.283449 0.5408113 0.0007202 -0.000151 0.000121 0.000082 0.000080 0.0000126 0.0000074 0.000112 0.000121 1999 5 31 51329 -0.024666 0.283971 0.5401481 0.0006479 -0.000148 0.000126 0.000082 0.000082 0.0000128 0.0000055 0.000119 0.000125 1999 6 1 51330 -0.025052 0.284569 0.5395550 0.0005926 -0.000111 0.000106 0.000080 0.000082 0.0000130 0.0000059 0.000125 0.000130 1999 6 2 51331 -0.025656 0.285361 0.5389929 0.0005554 -0.000044 0.000059 0.000080 0.000081 0.0000133 0.0000075 0.000132 0.000134 1999 6 3 51332 -0.026647 0.286270 0.5384191 0.0005862 0.000044 -0.000009 0.000083 0.000083 0.0000133 0.0000077 0.000131 0.000135 1999 6 4 51333 -0.027315 0.287271 0.5377924 0.0006799 0.000138 -0.000089 0.000086 0.000087 0.0000132 0.0000084 0.000128 0.000136 1999 6 5 51334 -0.027858 0.288428 0.5370755 0.0007913 0.000219 -0.000168 0.000085 0.000086 0.0000131 0.0000081 0.000125 0.000137 1999 6 6 51335 -0.028511 0.290182 0.5362349 0.0009182 0.000273 -0.000234 0.000080 0.000081 0.0000130 0.0000077 0.000122 0.000137 1999 6 7 51336 -0.029331 0.291626 0.5352438 0.0010677 0.000287 -0.000273 0.000078 0.000080 0.0000129 0.0000076 0.000119 0.000138 1999 6 8 51337 -0.029805 0.292865 0.5340913 0.0012259 0.000260 -0.000278 0.000079 0.000081 0.0000128 0.0000076 0.000116 0.000139 1999 6 9 51338 -0.030296 0.293763 0.5327963 0.0013468 0.000197 -0.000248 0.000080 0.000082 0.0000127 0.0000078 0.000113 0.000139 1999 6 10 51339 -0.030855 0.294143 0.5314177 0.0013945 0.000112 -0.000186 0.000080 0.000082 0.0000125 0.0000081 0.000109 0.000135 1999 6 11 51340 -0.030974 0.294513 0.5300496 0.0013204 0.000025 -0.000109 0.000080 0.000083 0.0000123 0.0000080 0.000104 0.000128 1999 6 12 51341 -0.031328 0.295126 0.5287952 0.0011473 -0.000042 -0.000029 0.000079 0.000082 0.0000121 0.0000076 0.000099 0.000122 1999 6 13 51342 -0.031610 0.295794 0.5277288 0.0009339 -0.000074 0.000035 0.000077 0.000079 0.0000119 0.0000081 0.000094 0.000116 1999 6 14 51343 -0.031519 0.296819 0.5268668 0.0007422 -0.000064 0.000075 0.000082 0.000083 0.0000117 0.0000090 0.000090 0.000109 1999 6 15 51344 -0.031891 0.297842 0.5261622 0.0006536 -0.000015 0.000088 0.000082 0.000084 0.0000115 0.0000070 0.000085 0.000103 1999 6 16 51345 -0.032485 0.298878 0.5255300 0.0006287 0.000064 0.000071 0.000078 0.000080 0.0000098 0.0000061 0.000097 0.000097 1999 6 17 51346 -0.033048 0.299261 0.5248878 0.0006515 0.000145 0.000048 0.000079 0.000080 0.0000087 0.0000070 0.000092 0.000088 1999 6 18 51347 -0.032896 0.299969 0.5241950 0.0006963 0.000207 0.000029 0.000081 0.000082 0.0000078 0.0000067 0.000081 0.000077 1999 6 19 51348 -0.032954 0.300421 0.5234601 0.0007223 0.000236 0.000016 0.000080 0.000080 0.0000069 0.0000074 0.000070 0.000066 1999 6 20 51349 -0.032510 0.301168 0.5227188 0.0007519 0.000221 0.000010 0.000078 0.000077 0.0000060 0.0000088 0.000059 0.000055 1999 6 21 51350 -0.032354 0.302046 0.5220036 0.0007428 0.000161 0.000005 0.000076 0.000077 0.0000051 0.0000099 0.000048 0.000044 1999 6 22 51351 -0.032200 0.302984 0.5213285 0.0006863 0.000056 -0.000004 0.000073 0.000074 0.0000043 0.0000109 0.000037 0.000033 1999 6 23 51352 -0.032469 0.303866 0.5207006 0.0005806 -0.000072 -0.000023 0.000073 0.000073 0.0000094 0.0000108 0.000076 0.000087 1999 6 24 51353 -0.032114 0.304527 0.5201428 0.0004496 -0.000229 -0.000046 0.000076 0.000078 0.0000110 0.0000100 0.000464 0.000477 1999 6 25 51354 -0.031973 0.305499 0.5197031 0.0002923 -0.000381 -0.000072 0.000078 0.000080 0.0000112 0.0000095 0.000966 0.000978 1999 6 26 51355 -0.031904 0.306522 0.5194315 0.0001622 -0.000490 -0.000098 0.000080 0.000082 0.0000114 0.0000100 0.000966 0.001005 1999 6 27 51356 -0.032397 0.307491 0.5193436 0.0000489 -0.000529 -0.000113 0.000081 0.000083 0.0000116 0.0000113 0.000666 0.000750 1999 6 28 51357 -0.032644 0.308422 0.5194040 -0.0000631 -0.000483 -0.000109 0.000080 0.000084 0.0000119 0.0000121 0.000366 0.000495 1999 6 29 51358 -0.032598 0.308937 0.5195446 -0.0001298 -0.000359 -0.000080 0.000080 0.000084 0.0000121 0.0000123 0.000066 0.000240 1999 6 30 51359 -0.032486 0.309482 0.5196985 -0.0001328 -0.000165 -0.000031 0.000077 0.000080 0.0000123 0.0000105 0.000105 0.000138 1999 7 1 51360 -0.032251 0.310160 0.5198195 -0.0000768 0.000024 0.000044 0.000079 0.000082 0.0000088 0.0000094 0.000099 0.000099 1999 7 2 51361 -0.032167 0.310826 0.5198761 -0.0000161 0.000173 0.000113 0.000081 0.000085 0.0000083 0.0000090 0.000096 0.000097 1999 7 3 51362 -0.031677 0.311852 0.5198350 0.0000873 0.000260 0.000153 0.000080 0.000084 0.0000094 0.0000079 0.000100 0.000102 1999 7 4 51363 -0.031202 0.313105 0.5196580 0.0002551 0.000282 0.000151 0.000082 0.000086 0.0000104 0.0000074 0.000104 0.000107 1999 7 5 51364 -0.030393 0.314819 0.5193172 0.0004315 0.000249 0.000097 0.000078 0.000085 0.0000115 0.0000078 0.000107 0.000112 1999 7 6 51365 -0.029684 0.316112 0.5188154 0.0005784 0.000185 -0.000003 0.000077 0.000083 0.0000126 0.0000072 0.000111 0.000117 1999 7 7 51366 -0.028871 0.317436 0.5181957 0.0006610 0.000115 -0.000132 0.000077 0.000081 0.0000137 0.0000070 0.000115 0.000122 1999 7 8 51367 -0.028013 0.318442 0.5175332 0.0006439 0.000060 -0.000263 0.000077 0.000080 0.0000135 0.0000086 0.000113 0.000120 1999 7 9 51368 -0.026962 0.319664 0.5169128 0.0005466 0.000027 -0.000368 0.000078 0.000082 0.0000129 0.0000084 0.000109 0.000116 1999 7 10 51369 -0.026250 0.320808 0.5163988 0.0004284 0.000015 -0.000419 0.000076 0.000080 0.0000123 0.0000077 0.000105 0.000111 1999 7 11 51370 -0.025550 0.322051 0.5160128 0.0003307 0.000012 -0.000400 0.000080 0.000084 0.0000116 0.0000079 0.000101 0.000107 1999 7 12 51371 -0.024863 0.323154 0.5157280 0.0002715 0.000012 -0.000313 0.000084 0.000088 0.0000110 0.0000077 0.000097 0.000103 1999 7 13 51372 -0.024618 0.324564 0.5154832 0.0002716 0.000008 -0.000176 0.000080 0.000084 0.0000104 0.0000083 0.000092 0.000099 1999 7 14 51373 -0.024486 0.325672 0.5152103 0.0003289 0.000004 -0.000024 0.000075 0.000079 0.0000098 0.0000087 0.000088 0.000095 1999 7 15 51374 -0.024644 0.326771 0.5148614 0.0004092 -0.000012 0.000130 0.000073 0.000076 0.0000107 0.0000086 0.000127 0.000140 1999 7 16 51375 -0.025245 0.327412 0.5144228 0.0004822 0.000008 0.000201 0.000075 0.000077 0.0000122 0.0000084 0.000140 0.000154 1999 7 17 51376 -0.025712 0.327982 0.5139144 0.0005294 0.000050 0.000195 0.000076 0.000079 0.0000137 0.0000083 0.000140 0.000150 1999 7 18 51377 -0.025778 0.328529 0.5133746 0.0005356 0.000083 0.000149 0.000078 0.000080 0.0000152 0.0000073 0.000140 0.000147 1999 7 19 51378 -0.025686 0.329123 0.5128441 0.0005085 0.000087 0.000094 0.000080 0.000080 0.0000167 0.0000067 0.000140 0.000144 1999 7 20 51379 -0.025332 0.329991 0.5123554 0.0004464 0.000061 0.000050 0.000080 0.000081 0.0000182 0.0000080 0.000140 0.000140 1999 7 21 51380 -0.024730 0.330851 0.5119312 0.0003814 -0.000032 0.000080 0.000080 0.000081 0.0000160 0.0000084 0.000127 0.000116 1999 7 22 51381 -0.024178 0.331517 0.5115884 0.0002874 -0.000028 0.000017 0.000085 0.000085 0.0000150 0.0000084 0.000133 0.000116 1999 7 23 51382 -0.023463 0.332214 0.5113411 0.0001881 0.000061 -0.000116 0.000088 0.000088 0.0000144 0.0000085 0.000146 0.000125 1999 7 24 51383 -0.023279 0.332701 0.5111979 0.0000784 0.000193 -0.000270 0.000089 0.000089 0.0000139 0.0000080 0.000160 0.000134 1999 7 25 51384 -0.023626 0.333114 0.5111525 -0.0000092 0.000310 -0.000391 0.000088 0.000088 0.0000133 0.0000084 0.000173 0.000143 1999 7 26 51385 -0.023879 0.333620 0.5111775 -0.0000477 0.000345 -0.000434 0.000086 0.000088 0.0000128 0.0000095 0.000187 0.000152 1999 7 27 51386 -0.023887 0.334043 0.5112258 -0.0000131 0.000253 -0.000365 0.000089 0.000092 0.0000122 0.0000099 0.000187 0.000153 1999 7 28 51387 -0.023708 0.334614 0.5112412 0.0000478 0.000001 -0.000145 0.000086 0.000088 0.0000117 0.0000100 0.000119 0.000113 1999 7 29 51388 -0.023430 0.335751 0.5111715 0.0001476 -0.000200 -0.000062 0.000082 0.000083 0.0000106 0.0000100 0.000088 0.000084 1999 7 30 51389 -0.022872 0.336590 0.5109749 0.0002748 -0.000270 0.000024 0.000086 0.000087 0.0000094 0.0000098 0.000074 0.000071 1999 7 31 51390 -0.022262 0.337644 0.5106218 0.0004552 -0.000225 0.000093 0.000088 0.000089 0.0000081 0.0000095 0.000064 0.000062 1999 8 1 51391 -0.021443 0.338728 0.5100960 0.0006155 -0.000114 0.000109 0.000084 0.000085 0.0000069 0.0000094 0.000053 0.000053 1999 8 2 51392 -0.020951 0.339810 0.5094030 0.0007484 -0.000009 0.000063 0.000083 0.000087 0.0000057 0.0000093 0.000042 0.000044 1999 8 3 51393 -0.019943 0.340657 0.5085842 0.0008285 0.000039 -0.000033 0.000078 0.000080 0.0000045 0.0000087 0.000031 0.000035 1999 8 4 51394 -0.018568 0.341753 0.5077211 0.0008228 -0.000058 -0.000187 0.000077 0.000078 0.0000098 0.0000086 0.000087 0.000084 1999 8 5 51395 -0.017137 0.342344 0.5069206 0.0007101 -0.000126 -0.000300 0.000081 0.000084 0.0000119 0.0000085 0.000111 0.000105 1999 8 6 51396 -0.015599 0.343540 0.5062736 0.0005321 -0.000146 -0.000349 0.000082 0.000084 0.0000128 0.0000090 0.000123 0.000114 1999 8 7 51397 -0.014840 0.344758 0.5058198 0.0003494 -0.000109 -0.000329 0.000083 0.000086 0.0000136 0.0000099 0.000134 0.000124 1999 8 8 51398 -0.014100 0.345884 0.5055341 0.0002504 -0.000020 -0.000252 0.000078 0.000080 0.0000144 0.0000104 0.000145 0.000134 1999 8 9 51399 -0.013768 0.346732 0.5053402 0.0002104 0.000090 -0.000154 0.000075 0.000076 0.0000153 0.0000116 0.000156 0.000144 1999 8 10 51400 -0.013607 0.347261 0.5051455 0.0002582 0.000183 -0.000078 0.000076 0.000076 0.0000161 0.0000115 0.000168 0.000154 1999 8 11 51401 -0.013220 0.347621 0.5048769 0.0003285 0.000195 -0.000025 0.000074 0.000074 0.0000120 0.0000108 0.000116 0.000106 1999 8 12 51402 -0.012791 0.347958 0.5045017 0.0004284 0.000192 -0.000117 0.000071 0.000070 0.0000120 0.0000108 0.000141 0.000137 1999 8 13 51403 -0.012302 0.348410 0.5040164 0.0005047 0.000074 -0.000221 0.000070 0.000070 0.0000123 0.0000107 0.000142 0.000137 1999 8 14 51404 -0.011808 0.348787 0.5034363 0.0005830 -0.000108 -0.000296 0.000071 0.000071 0.0000122 0.0000112 0.000123 0.000115 1999 8 15 51405 -0.011580 0.349758 0.5027891 0.0006576 -0.000266 -0.000321 0.000078 0.000078 0.0000120 0.0000111 0.000105 0.000092 1999 8 16 51406 -0.011706 0.350838 0.5021122 0.0006952 -0.000334 -0.000277 0.000081 0.000080 0.0000119 0.0000094 0.000087 0.000070 1999 8 17 51407 -0.010962 0.352079 0.5014541 0.0006497 -0.000280 -0.000164 0.000078 0.000076 0.0000118 0.0000098 0.000069 0.000048 1999 8 18 51408 -0.010314 0.353420 0.5008666 0.0005580 -0.000026 -0.000019 0.000076 0.000075 0.0000116 0.0000107 0.000105 0.000090 1999 8 19 51409 -0.009764 0.354606 0.5003857 0.0004588 0.000154 0.000155 0.000077 0.000076 0.0000127 0.0000100 0.000114 0.000104 1999 8 20 51410 -0.009406 0.355812 0.5000125 0.0003473 0.000243 0.000308 0.000082 0.000081 0.0000141 0.0000105 0.000115 0.000109 1999 8 21 51411 -0.008604 0.356815 0.4997129 0.0002845 0.000246 0.000395 0.000083 0.000080 0.0000155 0.0000105 0.000115 0.000114 1999 8 22 51412 -0.008211 0.358228 0.4994384 0.0002696 0.000194 0.000384 0.000086 0.000083 0.0000169 0.0000110 0.000116 0.000119 1999 8 23 51413 -0.008219 0.359155 0.4991522 0.0002903 0.000135 0.000273 0.000094 0.000090 0.0000183 0.0000147 0.000117 0.000124 1999 8 24 51414 -0.008470 0.360198 0.4988316 0.0003327 0.000113 0.000094 0.000092 0.000089 0.0000198 0.0000151 0.000118 0.000129 1999 8 25 51415 -0.008755 0.361049 0.4984437 0.0004509 0.000180 -0.000156 0.000085 0.000083 0.0000134 0.0000139 0.000107 0.000105 1999 8 26 51416 -0.008593 0.361780 0.4979238 0.0006476 0.000268 -0.000289 0.000091 0.000087 0.0000114 0.0000166 0.000519 0.000251 1999 8 27 51417 -0.008286 0.362330 0.4971928 0.0008938 0.000345 -0.000307 0.000096 0.000093 0.0000114 0.0000162 0.001073 0.000455 1999 8 28 51418 -0.008265 0.362950 0.4962104 0.0010734 0.000372 -0.000247 0.000093 0.000090 0.0000114 0.0000128 0.000996 0.000367 1999 8 29 51419 -0.007811 0.363193 0.4950193 0.0011838 0.000359 -0.000204 0.000089 0.000085 0.0000114 0.0000114 0.000786 0.000291 1999 8 30 51420 -0.007278 0.363710 0.4937360 0.0012490 0.000303 -0.000185 0.000081 0.000078 0.0000114 0.0000110 0.000574 0.000229 1999 8 31 51421 -0.006674 0.364160 0.4924925 0.0012077 0.000216 -0.000192 0.000083 0.000081 0.0000115 0.0000114 0.000362 0.000168 1999 9 1 51422 -0.006494 0.364718 0.4913767 0.0010808 0.000115 -0.000214 0.000083 0.000080 0.0000115 0.0000139 0.000151 0.000106 1999 9 2 51423 -0.006377 0.364836 0.4904108 0.0009310 0.000022 -0.000223 0.000079 0.000076 0.0000115 0.0000158 0.000098 0.000092 1999 9 3 51424 -0.006225 0.365425 0.4895708 0.0007929 -0.000048 -0.000211 0.000077 0.000075 0.0000116 0.0000138 0.000099 0.000094 1999 9 4 51425 -0.005846 0.365434 0.4888174 0.0007022 -0.000080 -0.000174 0.000079 0.000076 0.0000116 0.0000120 0.000100 0.000096 1999 9 5 51426 -0.004934 0.366093 0.4881141 0.0006869 -0.000071 -0.000121 0.000085 0.000079 0.0000117 0.0000117 0.000101 0.000098 1999 9 6 51427 -0.003719 0.366632 0.4874290 0.0006882 -0.000020 -0.000061 0.000083 0.000077 0.0000117 0.0000108 0.000101 0.000101 1999 9 7 51428 -0.002453 0.367318 0.4867338 0.0007110 0.000063 -0.000004 0.000083 0.000078 0.0000118 0.0000097 0.000102 0.000103 1999 9 8 51429 -0.001357 0.367731 0.4860067 0.0007260 0.000162 0.000044 0.000083 0.000079 0.0000118 0.0000108 0.000103 0.000105 1999 9 9 51430 -0.000286 0.368497 0.4852409 0.0007493 0.000258 0.000076 0.000083 0.000078 0.0000118 0.0000120 0.000104 0.000105 1999 9 10 51431 0.000015 0.369057 0.4844488 0.0007734 0.000332 0.000088 0.000084 0.000080 0.0000118 0.0000114 0.000104 0.000106 1999 9 11 51432 0.000372 0.369588 0.4836594 0.0007686 0.000369 0.000077 0.000081 0.000077 0.0000118 0.0000123 0.000105 0.000106 1999 9 12 51433 0.000725 0.370161 0.4829093 0.0007169 0.000360 0.000038 0.000080 0.000076 0.0000118 0.0000119 0.000105 0.000106 1999 9 13 51434 0.001720 0.370759 0.4822328 0.0006431 0.000304 -0.000036 0.000079 0.000075 0.0000118 0.0000104 0.000106 0.000106 1999 9 14 51435 0.002557 0.371720 0.4816539 0.0005352 0.000209 -0.000143 0.000076 0.000073 0.0000118 0.0000092 0.000106 0.000107 1999 9 15 51436 0.003119 0.372608 0.4811827 0.0004128 0.000094 -0.000274 0.000075 0.000072 0.0000118 0.0000088 0.000107 0.000107 1999 9 16 51437 0.003487 0.373396 0.4808121 0.0003205 -0.000022 -0.000409 0.000078 0.000075 0.0000120 0.0000086 0.000109 0.000105 1999 9 17 51438 0.003906 0.373798 0.4805157 0.0002808 -0.000111 -0.000518 0.000083 0.000079 0.0000122 0.0000104 0.000111 0.000103 1999 9 18 51439 0.004384 0.374131 0.4802484 0.0002887 -0.000153 -0.000563 0.000080 0.000076 0.0000125 0.0000101 0.000113 0.000101 1999 9 19 51440 0.004331 0.374619 0.4799518 0.0003464 -0.000136 -0.000525 0.000077 0.000075 0.0000127 0.0000082 0.000115 0.000098 1999 9 20 51441 0.004440 0.375169 0.4795649 0.0004456 -0.000062 -0.000406 0.000074 0.000076 0.0000130 0.0000092 0.000117 0.000096 1999 9 21 51442 0.004874 0.375446 0.4790364 0.0006036 0.000051 -0.000239 0.000073 0.000075 0.0000133 0.0000100 0.000119 0.000094 1999 9 22 51443 0.005490 0.375792 0.4783356 0.0007887 0.000188 -0.000031 0.000075 0.000076 0.0000108 0.0000109 0.000100 0.000088 1999 9 23 51444 0.005491 0.376005 0.4774580 0.0009653 0.000281 0.000059 0.000074 0.000076 0.0000105 0.0000123 0.000093 0.000086 1999 9 24 51445 0.005220 0.376117 0.4764255 0.0011056 0.000316 0.000026 0.000075 0.000077 0.0000109 0.0000131 0.000090 0.000087 1999 9 25 51446 0.005012 0.375957 0.4752837 0.0011731 0.000290 -0.000093 0.000076 0.000078 0.0000114 0.0000123 0.000087 0.000087 1999 9 26 51447 0.005118 0.375993 0.4740952 0.0011753 0.000218 -0.000243 0.000081 0.000082 0.0000119 0.0000116 0.000085 0.000087 1999 9 27 51448 0.005341 0.376270 0.4729297 0.0011316 0.000132 -0.000357 0.000084 0.000084 0.0000123 0.0000116 0.000082 0.000088 1999 9 28 51449 0.005659 0.376893 0.4718489 0.0010209 0.000062 -0.000393 0.000084 0.000083 0.0000128 0.0000110 0.000079 0.000088 1999 9 29 51450 0.005796 0.377434 0.4708923 0.0009104 0.000034 -0.000261 0.000081 0.000081 0.0000133 0.0000109 0.000107 0.000113 1999 9 30 51451 0.006180 0.378377 0.4700672 0.0008043 0.000064 -0.000170 0.000081 0.000081 0.0000127 0.0000120 0.001291 0.000314 1999 10 1 51452 0.006631 0.379175 0.4693467 0.0006881 0.000141 -0.000077 0.000088 0.000087 0.0000117 0.0000127 0.001936 0.000419 1999 10 2 51453 0.006596 0.380164 0.4686751 0.0006303 0.000232 0.000039 0.000090 0.000088 0.0000108 0.0000113 0.001492 0.000342 1999 10 3 51454 0.007174 0.380903 0.4679806 0.0007103 0.000298 0.000124 0.000083 0.000081 0.0000099 0.0000108 0.001047 0.000266 1999 10 4 51455 0.007846 0.381784 0.4671914 0.0008684 0.000305 0.000159 0.000080 0.000079 0.0000089 0.0000115 0.000602 0.000189 1999 10 5 51456 0.008451 0.382099 0.4662534 0.0010342 0.000233 0.000118 0.000074 0.000074 0.0000080 0.0000113 0.000158 0.000112 1999 10 6 51457 0.009235 0.382647 0.4651449 0.0012005 0.000081 0.000012 0.000069 0.000067 0.0000097 0.0000113 0.000088 0.000094 1999 10 7 51458 0.009832 0.382873 0.4638841 0.0013002 -0.000105 -0.000189 0.000072 0.000071 0.0000104 0.0000115 0.000086 0.000088 1999 10 8 51459 0.010394 0.382551 0.4625263 0.0013440 -0.000279 -0.000424 0.000077 0.000077 0.0000106 0.0000107 0.000083 0.000081 1999 10 9 51460 0.011283 0.382433 0.4611480 0.0013669 -0.000391 -0.000615 0.000080 0.000078 0.0000108 0.0000095 0.000080 0.000074 1999 10 10 51461 0.012269 0.382791 0.4598229 0.0013138 -0.000407 -0.000695 0.000085 0.000081 0.0000110 0.0000098 0.000076 0.000067 1999 10 11 51462 0.013286 0.382895 0.4585992 0.0011867 -0.000321 -0.000628 0.000088 0.000082 0.0000111 0.0000100 0.000073 0.000061 1999 10 12 51463 0.013896 0.382936 0.4574886 0.0010555 -0.000156 -0.000435 0.000085 0.000079 0.0000113 0.0000091 0.000070 0.000054 1999 10 13 51464 0.014264 0.382859 0.4564751 0.0009574 0.000088 -0.000095 0.000086 0.000081 0.0000115 0.0000103 0.000091 0.000090 1999 10 14 51465 0.013932 0.382737 0.4555377 0.0009012 0.000228 0.000099 0.000085 0.000080 0.0000118 0.0000115 0.000101 0.000108 1999 10 15 51466 0.013739 0.382714 0.4546682 0.0008139 0.000261 0.000138 0.000086 0.000079 0.0000122 0.0000110 0.000108 0.000120 1999 10 16 51467 0.013512 0.382702 0.4538697 0.0007157 0.000217 0.000060 0.000090 0.000082 0.0000126 0.0000115 0.000115 0.000132 1999 10 17 51468 0.014139 0.382567 0.4531317 0.0007297 0.000142 -0.000071 0.000087 0.000080 0.0000130 0.0000114 0.000121 0.000145 1999 10 18 51469 0.014527 0.382484 0.4524033 0.0007964 0.000086 -0.000180 0.000083 0.000078 0.0000134 0.0000114 0.000128 0.000157 1999 10 19 51470 0.015094 0.382511 0.4515927 0.0009162 0.000075 -0.000233 0.000083 0.000078 0.0000138 0.0000110 0.000134 0.000169 1999 10 20 51471 0.015764 0.382773 0.4506004 0.0011197 0.000190 -0.000110 0.000081 0.000075 0.0000123 0.0000113 0.000113 0.000131 1999 10 21 51472 0.016541 0.383046 0.4493631 0.0013663 0.000206 -0.000142 0.000082 0.000077 0.0000118 0.0000116 0.000137 0.000264 1999 10 22 51473 0.016808 0.383224 0.4478736 0.0015984 0.000165 -0.000291 0.000087 0.000081 0.0000118 0.0000102 0.000177 0.000458 1999 10 23 51474 0.017094 0.383232 0.4461704 0.0018097 0.000178 -0.000494 0.000088 0.000082 0.0000118 0.0000105 0.000257 0.000340 1999 10 24 51475 0.017803 0.383415 0.4443190 0.0019148 0.000187 -0.000629 0.000087 0.000082 0.0000118 0.0000090 0.000341 0.000195 1999 10 25 51476 0.018336 0.383778 0.4424049 0.0018973 0.000163 -0.000502 0.000087 0.000083 0.0000118 0.0000093 0.000240 0.000154 1999 10 26 51477 0.018939 0.383913 0.4405318 0.0018029 0.000122 -0.000263 0.000085 0.000082 0.0000118 0.0000119 0.000121 0.000123 1999 10 27 51478 0.019489 0.383773 0.4388017 0.0016171 0.000072 -0.000114 0.000083 0.000082 0.0000129 0.0000128 0.000107 0.000115 1999 10 28 51479 0.020055 0.383497 0.4372773 0.0014035 0.000029 0.000023 0.000084 0.000084 0.0000145 0.0000128 0.000110 0.000121 1999 10 29 51480 0.020403 0.383355 0.4359453 0.0012520 0.000004 0.000108 0.000086 0.000085 0.0000163 0.0000107 0.000116 0.000131 1999 10 30 51481 0.020568 0.383195 0.4347254 0.0012190 0.000002 0.000131 0.000087 0.000086 0.0000181 0.0000088 0.000121 0.000142 1999 10 31 51482 0.020723 0.383050 0.4335150 0.0012853 0.000024 0.000109 0.000091 0.000088 0.0000199 0.0000095 0.000127 0.000152 1999 11 1 51483 0.021369 0.382777 0.4322364 0.0013191 0.000064 0.000066 0.000093 0.000089 0.0000217 0.0000097 0.000132 0.000162 1999 11 2 51484 0.021972 0.382127 0.4308609 0.0013731 0.000105 0.000023 0.000088 0.000085 0.0000235 0.0000081 0.000138 0.000173 1999 11 3 51485 0.022709 0.381655 0.4294045 0.0014797 0.000139 0.000002 0.000082 0.000079 0.0000152 0.0000098 0.000113 0.000128 1999 11 4 51486 0.023199 0.381265 0.4279087 0.0015241 0.000155 -0.000011 0.000080 0.000077 0.0000097 0.0000105 0.000083 0.000096 1999 11 5 51487 0.023767 0.380598 0.4263911 0.0015085 0.000110 -0.000029 0.000083 0.000079 0.0000149 0.0000084 0.000110 0.000105 1999 11 6 51488 0.024209 0.380392 0.4249018 0.0014795 0.000062 -0.000030 0.000087 0.000084 0.0000174 0.0000081 0.000121 0.000121 1999 11 7 51489 0.024519 0.379829 0.4234811 0.0014151 0.000036 -0.000023 0.000094 0.000094 0.0000174 0.0000086 0.000118 0.000136 1999 11 8 51490 0.024527 0.379287 0.4221237 0.0013207 0.000036 -0.000021 0.000095 0.000096 0.0000173 0.0000082 0.000115 0.000152 1999 11 9 51491 0.024902 0.378181 0.4208073 0.0012963 0.000053 -0.000024 0.000092 0.000093 0.0000173 0.0000083 0.000111 0.000167 1999 11 10 51492 0.025704 0.377329 0.4195273 0.0012441 0.000124 -0.000072 0.000093 0.000094 0.0000139 0.0000083 0.000095 0.000112 1999 11 11 51493 0.026775 0.376498 0.4183101 0.0011646 0.000105 -0.000039 0.000094 0.000095 0.0000176 0.0000079 0.000158 0.000147 1999 11 12 51494 0.027951 0.376430 0.4171807 0.0010951 0.000005 -0.000013 0.000094 0.000092 0.0000190 0.0000074 0.000157 0.000162 1999 11 13 51495 0.028435 0.376732 0.4160838 0.0011314 -0.000020 0.000004 0.000098 0.000095 0.0000170 0.0000081 0.000132 0.000143 1999 11 14 51496 0.029055 0.377537 0.4149352 0.0012297 0.000032 0.000010 0.000096 0.000094 0.0000143 0.0000085 0.000115 0.000118 1999 11 15 51497 0.028834 0.378469 0.4136869 0.0012971 0.000108 -0.000009 0.000085 0.000086 0.0000117 0.0000078 0.000097 0.000093 1999 11 16 51498 0.028623 0.378502 0.4123268 0.0013788 0.000171 -0.000056 0.000084 0.000086 0.0000090 0.0000074 0.000080 0.000068 1999 11 17 51499 0.029238 0.378519 0.4108554 0.0015415 0.000138 -0.000130 0.000082 0.000084 0.0000079 0.0000073 0.000087 0.000088 1999 11 18 51500 0.030267 0.378499 0.4092632 0.0016781 0.000098 -0.000215 0.000086 0.000088 0.0000079 0.0000077 0.000090 0.000095 1999 11 19 51501 0.031710 0.378470 0.4075483 0.0017562 0.000059 -0.000292 0.000090 0.000091 0.0000082 0.0000078 0.000091 0.000096 1999 11 20 51502 0.032667 0.378869 0.4057406 0.0018133 0.000034 -0.000350 0.000092 0.000091 0.0000085 0.0000079 0.000092 0.000098 1999 11 21 51503 0.033195 0.378882 0.4039108 0.0018053 0.000037 -0.000374 0.000096 0.000096 0.0000088 0.0000084 0.000093 0.000099 1999 11 22 51504 0.033180 0.378852 0.4021570 0.0016744 0.000072 -0.000358 0.000092 0.000093 0.0000091 0.0000080 0.000093 0.000100 1999 11 23 51505 0.032863 0.378784 0.4005710 0.0014702 0.000128 -0.000306 0.000090 0.000091 0.0000095 0.0000080 0.000094 0.000101 1999 11 24 51506 0.032465 0.378204 0.3992024 0.0012694 0.000190 -0.000226 0.000090 0.000091 0.0000098 0.0000084 0.000095 0.000102 1999 11 25 51507 0.032194 0.377850 0.3980392 0.0011032 0.000240 -0.000132 0.000091 0.000094 0.0000098 0.0000084 0.000096 0.000104 1999 11 26 51508 0.031848 0.377435 0.3970132 0.0009914 0.000266 -0.000042 0.000090 0.000096 0.0000098 0.0000080 0.000097 0.000105 1999 11 27 51509 0.031691 0.377205 0.3960288 0.0009738 0.000266 0.000028 0.000087 0.000091 0.0000098 0.0000071 0.000098 0.000106 1999 11 28 51510 0.031950 0.376915 0.3949964 0.0010564 0.000241 0.000064 0.000085 0.000088 0.0000098 0.0000056 0.000099 0.000107 1999 11 29 51511 0.032693 0.377058 0.3938600 0.0011899 0.000203 0.000063 0.000080 0.000084 0.0000098 0.0000057 0.000100 0.000108 1999 11 30 51512 0.033323 0.377218 0.3926082 0.0013398 0.000163 0.000025 0.000079 0.000083 0.0000098 0.0000075 0.000101 0.000109 1999 12 1 51513 0.033897 0.377752 0.3912704 0.0014088 0.000135 -0.000038 0.000078 0.000082 0.0000098 0.0000079 0.000102 0.000110 1999 12 2 51514 0.034308 0.378416 0.3899013 0.0013712 0.000125 -0.000111 0.000077 0.000080 0.0000101 0.0000077 0.000100 0.000111 1999 12 3 51515 0.034478 0.379184 0.3885616 0.0012847 0.000134 -0.000172 0.000079 0.000083 0.0000105 0.0000080 0.000096 0.000113 1999 12 4 51516 0.034604 0.379382 0.3873005 0.0011911 0.000157 -0.000202 0.000085 0.000089 0.0000109 0.0000087 0.000093 0.000115 1999 12 5 51517 0.034887 0.379663 0.3861459 0.0010870 0.000183 -0.000193 0.000088 0.000090 0.0000113 0.0000090 0.000090 0.000116 1999 12 6 51518 0.034567 0.379447 0.3851031 0.0010033 0.000194 -0.000149 0.000083 0.000086 0.0000117 0.0000082 0.000086 0.000118 1999 12 7 51519 0.034523 0.379288 0.3841606 0.0009031 0.000176 -0.000090 0.000078 0.000081 0.0000121 0.0000078 0.000083 0.000120 1999 12 8 51520 0.034639 0.379050 0.3832954 0.0008139 0.000132 -0.000017 0.000078 0.000082 0.0000100 0.0000071 0.000082 0.000100 1999 12 9 51521 0.035759 0.379354 0.3824776 0.0007787 0.000027 -0.000016 0.000079 0.000084 0.0000090 0.0000066 0.000077 0.000088 1999 12 10 51522 0.036685 0.379846 0.3816719 0.0007971 -0.000108 -0.000075 0.000079 0.000083 0.0000085 0.0000065 0.000070 0.000081 1999 12 11 51523 0.037268 0.380319 0.3808407 0.0008548 -0.000226 -0.000163 0.000082 0.000086 0.0000080 0.0000066 0.000063 0.000073 1999 12 12 51524 0.037283 0.380652 0.3799499 0.0009213 -0.000284 -0.000243 0.000089 0.000092 0.0000075 0.0000080 0.000056 0.000065 1999 12 13 51525 0.037406 0.380786 0.3789744 0.0010252 -0.000251 -0.000281 0.000092 0.000096 0.0000070 0.0000089 0.000049 0.000057 1999 12 14 51526 0.037552 0.381210 0.3778982 0.0011568 -0.000133 -0.000266 0.000092 0.000096 0.0000065 0.0000097 0.000042 0.000050 1999 12 15 51527 0.038263 0.381561 0.3767090 0.0012831 0.000061 -0.000134 0.000085 0.000088 0.0000060 0.0000103 0.000068 0.000072 1999 12 16 51528 0.038421 0.382131 0.3753960 0.0013950 0.000240 -0.000127 0.000085 0.000085 0.0000129 0.0000104 0.000127 0.000147 1999 12 17 51529 0.038317 0.382228 0.3739589 0.0015076 0.000282 -0.000120 0.000092 0.000093 0.0000136 0.0000102 0.000128 0.000150 1999 12 18 51530 0.038095 0.382186 0.3724304 0.0015583 0.000206 -0.000113 0.000094 0.000095 0.0000111 0.0000104 0.000105 0.000120 1999 12 19 51531 0.037925 0.382244 0.3708833 0.0015401 0.000085 -0.000128 0.000098 0.000099 0.0000085 0.0000103 0.000080 0.000090 1999 12 20 51532 0.037748 0.382135 0.3694094 0.0014268 -0.000004 -0.000160 0.000097 0.000101 0.0000060 0.0000082 0.000056 0.000059 1999 12 21 51533 0.037190 0.381677 0.3680786 0.0012650 0.000000 -0.000205 0.000087 0.000180 0.0000035 0.0000083 0.000032 0.000029 1999 12 22 51534 0.036665 0.380976 0.3669051 0.0011184 0.000181 -0.000265 0.000086 0.000179 0.0000112 0.0000085 0.000098 0.000101 1999 12 23 51535 0.036442 0.379874 0.3658421 0.0010445 0.000361 -0.000299 0.000094 0.000098 0.0000131 0.0000076 0.000116 0.000120 1999 12 24 51536 0.037134 0.378793 0.3648138 0.0010483 0.000499 -0.000297 0.000095 0.000098 0.0000127 0.0000084 0.000116 0.000118 1999 12 25 51537 0.038030 0.377920 0.3637482 0.0010872 0.000561 -0.000261 0.000097 0.000099 0.0000124 0.0000080 0.000116 0.000117 1999 12 26 51538 0.039036 0.377609 0.3626008 0.0011681 0.000533 -0.000199 0.000099 0.000102 0.0000120 0.0000057 0.000115 0.000115 1999 12 27 51539 0.040062 0.377973 0.3613675 0.0012560 0.000427 -0.000128 0.000096 0.000101 0.0000117 0.0000059 0.000115 0.000113 1999 12 28 51540 0.041086 0.377926 0.3600826 0.0013136 0.000279 -0.000066 0.000097 0.000103 0.0000113 0.0000072 0.000115 0.000112 1999 12 29 51541 0.042141 0.378431 0.3588036 0.0012699 0.000124 -0.000028 0.000095 0.000099 0.0000109 0.0000070 0.000115 0.000110 1999 12 30 51542 0.042493 0.378512 0.3575881 0.0011631 -0.000001 -0.000022 0.000089 0.000091 0.0000085 0.0000073 0.000097 0.000082 1999 12 31 51543 0.042924 0.378279 0.3564746 0.0010554 -0.000080 -0.000052 0.000093 0.000098 0.0000080 0.0000076 0.000092 0.000075 2000 1 1 51544 0.043242 0.377915 0.3554777 0.0009693 -0.000108 -0.000103 0.000100 0.000105 0.0000084 0.0000076 0.000095 0.000079 2000 1 2 51545 0.043515 0.377753 0.3546065 0.0008322 -0.000087 -0.000159 0.000168 0.000174 0.0000276 0.0000006 0.000108 0.000074 2000 1 3 51546 0.043623 0.377452 0.3538444 0.0006899 -0.000036 -0.000190 0.000163 0.000165 0.0000287 0.0000006 0.000111 0.000078 2000 1 4 51547 0.043420 0.377099 0.3532222 0.0005475 0.000032 -0.000185 0.000158 0.000164 0.0000251 0.0000006 0.000115 0.000082 2000 1 5 51548 0.043120 0.376886 0.3527506 0.0004330 0.000102 -0.000146 0.000154 0.000160 0.0000064 0.0000006 0.000118 0.000086 2000 1 6 51549 0.043099 0.376427 0.3523871 0.0003923 0.000164 -0.000085 0.000154 0.000157 0.0000207 0.0000006 0.000119 0.000090 2000 1 7 51550 0.043519 0.376308 0.3519551 0.0003953 0.000211 -0.000030 0.000160 0.000163 0.0000383 0.0000006 0.000120 0.000095 2000 1 8 51551 0.043788 0.376259 0.3514734 0.0004258 0.000240 -0.000006 0.000167 0.000169 0.0000323 0.0000006 0.000121 0.000099 2000 1 9 51552 0.043793 0.375981 0.3510970 0.0004886 0.000246 -0.000023 0.000159 0.000161 0.0000256 0.0000006 0.000121 0.000103 2000 1 10 51553 0.043601 0.375557 0.3505869 0.0005921 0.000226 -0.000068 0.000145 0.000148 0.0000144 0.0000006 0.000122 0.000108 2000 1 11 51554 0.043717 0.375047 0.3498892 0.0007305 0.000178 -0.000110 0.000146 0.000149 0.0000031 0.0000006 0.000123 0.000112 2000 1 12 51555 0.044260 0.374854 0.3490554 0.0008903 0.000106 -0.000183 0.000142 0.000144 0.0000017 0.0000006 0.000120 0.000105 2000 1 13 51556 0.045053 0.374891 0.3480849 0.0010403 0.000019 -0.000055 0.000135 0.000138 0.0000012 0.0000006 0.000121 0.000103 2000 1 14 51557 0.046573 0.374968 0.3469615 0.0011415 -0.000071 0.000092 0.000141 0.000144 0.0000154 0.0000006 0.000120 0.000102 2000 1 15 51558 0.047592 0.375031 0.3457499 0.0011923 -0.000141 0.000205 0.000147 0.000151 0.0000316 0.0000006 0.000119 0.000101 2000 1 16 51559 0.048569 0.374948 0.3445829 0.0011403 -0.000174 0.000261 0.000168 0.000174 0.0000371 0.0000007 0.000118 0.000100 2000 1 17 51560 0.049452 0.375067 0.3435405 0.0010127 -0.000154 0.000237 0.000176 0.000185 0.0000373 0.0000007 0.000117 0.000098 2000 1 18 51561 0.050696 0.375125 0.3425623 0.0009136 -0.000080 0.000136 0.000163 0.000169 0.0000309 0.0000007 0.000115 0.000097 2000 1 19 51562 0.052066 0.375905 0.3416107 0.0008329 0.000038 -0.000012 0.000154 0.000160 0.0000072 0.0000007 0.000114 0.000096 2000 1 20 51563 0.053162 0.375791 0.3407340 0.0008089 0.000181 -0.000159 0.000153 0.000161 0.0000163 0.0000007 0.000113 0.000094 2000 1 21 51564 0.054272 0.376163 0.3398876 0.0008716 0.000316 -0.000270 0.000156 0.000165 0.0000301 0.0000007 0.000111 0.000093 2000 1 22 51565 0.055128 0.376451 0.3389816 0.0009745 0.000413 -0.000322 0.000166 0.000175 0.0000298 0.0000007 0.000110 0.000092 2000 1 23 51566 0.055827 0.377044 0.3379638 0.0010852 0.000447 -0.000310 0.000177 0.000185 0.0000345 0.0000007 0.000109 0.000091 2000 1 24 51567 0.056228 0.377305 0.3368016 0.0011897 0.000408 -0.000249 0.000173 0.000182 0.0000356 0.0000007 0.000107 0.000090 2000 1 25 51568 0.056528 0.377532 0.3355488 0.0012962 0.000302 -0.000166 0.000162 0.000170 0.0000297 0.0000007 0.000106 0.000089 2000 1 26 51569 0.056581 0.377508 0.3342603 0.0013101 0.000151 -0.000089 0.000152 0.000159 0.0000070 0.0000008 0.000105 0.000088 2000 1 27 51570 0.056929 0.377153 0.3329637 0.0012555 -0.000017 -0.000042 0.000151 0.000158 0.0000173 0.0000008 0.000097 0.000079 2000 1 28 51571 0.057396 0.376868 0.3317513 0.0011311 -0.000160 -0.000030 0.000153 0.000160 0.0000320 0.0000009 0.000086 0.000066 2000 1 29 51572 0.057215 0.376716 0.3306946 0.0009737 -0.000235 -0.000044 0.000165 0.000169 0.0000312 0.0000009 0.000071 0.000055 2000 1 30 51573 0.057044 0.376312 0.3297833 0.0008340 -0.000239 -0.000067 0.000178 0.000180 0.0000277 0.0000009 0.000055 0.000043 2000 1 31 51574 0.057017 0.376203 0.3290018 0.0007182 -0.000182 -0.000083 0.000175 0.000176 0.0000145 0.0000009 0.000040 0.000032 2000 2 1 51575 0.057014 0.375773 0.3283203 0.0006442 -0.000099 -0.000084 0.000147 0.000149 0.0000013 0.0000009 0.000024 0.000020 2000 2 2 51576 0.057184 0.375194 0.3277097 0.0005666 -0.000006 -0.000056 0.000144 0.000145 0.0000014 0.0000010 0.000079 0.000070 2000 2 3 51577 0.057659 0.374549 0.3271394 0.0005106 -0.000004 -0.000053 0.000167 0.000167 0.0000139 0.0000010 0.000080 0.000074 2000 2 4 51578 0.058293 0.374007 0.3266495 0.0005030 -0.000084 -0.000076 0.000167 0.000168 0.0000246 0.0000011 0.000060 0.000061 2000 2 5 51579 0.059048 0.373398 0.3261521 0.0005806 -0.000213 -0.000118 0.000177 0.000178 0.0000247 0.0000011 0.000063 0.000060 2000 2 6 51580 0.060000 0.372912 0.3254717 0.0007357 -0.000328 -0.000165 0.000183 0.000181 0.0000425 0.0000011 0.000066 0.000059 2000 2 7 51581 0.061198 0.372504 0.3246358 0.0008869 -0.000379 -0.000201 0.000169 0.000165 0.0001241 0.0000012 0.000068 0.000057 2000 2 8 51582 0.062204 0.372166 0.3236719 0.0010478 -0.000348 -0.000212 0.000159 0.000154 0.0001434 0.0000012 0.000071 0.000056 2000 2 9 51583 0.063529 0.372065 0.3225795 0.0011814 -0.000148 -0.000177 0.000151 0.000148 0.0000298 0.0000012 0.000112 0.000100 2000 2 10 51584 0.064834 0.371940 0.3213676 0.0012292 -0.000069 -0.000144 0.000151 0.000149 0.0000026 0.0000012 0.000142 0.000128 2000 2 11 51585 0.065837 0.371336 0.3201543 0.0011778 -0.000070 -0.000113 0.000158 0.000153 0.0000040 0.0000012 0.000168 0.000149 2000 2 12 51586 0.066300 0.371018 0.3190715 0.0010372 -0.000045 -0.000080 0.000171 0.000163 0.0000241 0.0000012 0.000148 0.000129 2000 2 13 51587 0.066165 0.370355 0.3181423 0.0008662 -0.000036 -0.000064 0.000183 0.000173 0.0000362 0.0000012 0.000127 0.000110 2000 2 14 51588 0.066145 0.369977 0.3173396 0.0007454 -0.000030 -0.000066 0.000186 0.000175 0.0000194 0.0000011 0.000106 0.000090 2000 2 15 51589 0.066053 0.369474 0.3166403 0.0006812 -0.000024 -0.000079 0.000176 0.000169 0.0000027 0.0000011 0.000086 0.000070 2000 2 16 51590 0.066697 0.369035 0.3159951 0.0006407 -0.000021 -0.000106 0.000166 0.000161 0.0000015 0.0000011 0.000101 0.000084 2000 2 17 51591 0.067436 0.368674 0.3153139 0.0006841 -0.000026 -0.000088 0.000171 0.000168 0.0000132 0.0000011 0.000108 0.000089 2000 2 18 51592 0.068113 0.368610 0.3145981 0.0007850 -0.000037 -0.000026 0.000179 0.000173 0.0000287 0.0000010 0.000111 0.000091 2000 2 19 51593 0.068554 0.368541 0.3138007 0.0009400 -0.000047 0.000059 0.000186 0.000175 0.0000409 0.0000010 0.000113 0.000093 2000 2 20 51594 0.069065 0.368377 0.3128053 0.0011289 -0.000051 0.000138 0.000190 0.000181 0.0000425 0.0000010 0.000116 0.000095 2000 2 21 51595 0.069272 0.368229 0.3116253 0.0012534 -0.000044 0.000173 0.000184 0.000176 0.0000300 0.0000010 0.000118 0.000097 2000 2 22 51596 0.069045 0.367545 0.3103545 0.0012627 -0.000027 0.000139 0.000174 0.000165 0.0000175 0.0000009 0.000121 0.000099 2000 2 23 51597 0.068886 0.367030 0.3091107 0.0011861 -0.000006 0.000029 0.000166 0.000159 0.0000050 0.0000009 0.000123 0.000101 2000 2 24 51598 0.068484 0.366235 0.3079717 0.0010555 0.000012 -0.000140 0.000166 0.000159 0.0000179 0.0000009 0.000294 0.000198 2000 2 25 51599 0.067981 0.365555 0.3069407 0.0009275 0.000019 -0.000324 0.000167 0.000161 0.0000343 0.0000009 0.000520 0.000327 2000 2 26 51600 0.067470 0.364476 0.3060664 0.0007995 0.000013 -0.000470 0.000183 0.000177 0.0000349 0.0000009 0.000747 0.000455 2000 2 27 51601 0.067062 0.363646 0.3053439 0.0006639 -0.000002 -0.000535 0.000190 0.000186 0.0000271 0.0000009 0.000973 0.000583 2000 2 28 51602 0.066601 0.362793 0.3046608 0.0005675 -0.000018 -0.000493 0.000165 0.000168 0.0000321 0.0000009 0.001200 0.000712 2000 2 29 51603 0.066556 0.362106 0.3040878 0.0005479 -0.000027 -0.000352 0.000153 0.000159 0.0000273 0.0000009 0.001127 0.000668 2000 3 1 51604 0.066367 0.361624 0.3036035 0.0005431 -0.000023 -0.000148 0.000160 0.000165 0.0000070 0.0000009 0.000322 0.000204 2000 3 2 51605 0.066616 0.361065 0.3030466 0.0005741 -0.000006 0.000074 0.000158 0.000163 0.0000152 0.0000009 0.000121 0.000603 2000 3 3 51606 0.067106 0.360656 0.3024001 0.0006548 0.000015 0.000254 0.000157 0.000164 0.0000316 0.0000009 0.000123 0.001291 2000 3 4 51607 0.067837 0.360430 0.3016760 0.0008069 0.000031 0.000348 0.000170 0.000178 0.0000399 0.0000009 0.000124 0.001980 2000 3 5 51608 0.067987 0.360515 0.3007802 0.0009760 0.000031 0.000336 0.000164 0.000169 0.0000370 0.0000009 0.000126 0.002669 2000 3 6 51609 0.068116 0.360183 0.2996884 0.0011707 0.000012 0.000229 0.000147 0.000151 0.0000323 0.0000009 0.000127 0.003357 2000 3 7 51610 0.068555 0.360006 0.2984418 0.0013113 -0.000024 0.000064 0.000144 0.000149 0.0000244 0.0000009 0.000128 0.003141 2000 3 8 51611 0.068977 0.359833 0.2970915 0.0013866 -0.000063 -0.000105 0.000145 0.000148 0.0000063 0.0000009 0.000130 0.000702 2000 3 9 51612 0.069301 0.359410 0.2956776 0.0013904 -0.000090 -0.000245 0.000143 0.000148 0.0000255 0.0000009 0.000117 0.000084 2000 3 10 51613 0.070281 0.359070 0.2943150 0.0013224 -0.000092 -0.000321 0.000144 0.000151 0.0000461 0.0000009 0.000099 0.000073 2000 3 11 51614 0.071699 0.358832 0.2930691 0.0012081 -0.000067 -0.000325 0.000150 0.000158 0.0000367 0.0000009 0.000081 0.000061 2000 3 12 51615 0.073113 0.358967 0.2919156 0.0010701 -0.000031 -0.000267 0.000158 0.000164 0.0000371 0.0000009 0.000063 0.000049 2000 3 13 51616 0.073949 0.358611 0.2909084 0.0009384 -0.000013 -0.000175 0.000157 0.000162 0.0000195 0.0000009 0.000045 0.000038 2000 3 14 51617 0.074557 0.358182 0.2900573 0.0008372 -0.000050 -0.000079 0.000135 0.000140 0.0000019 0.0000009 0.000027 0.000026 2000 3 15 51618 0.074763 0.357469 0.2892926 0.0008185 -0.000095 -0.000016 0.000130 0.000134 0.0000018 0.0000009 0.000103 0.000092 2000 3 16 51619 0.074898 0.356404 0.2884868 0.0008643 -0.000327 0.000029 0.000146 0.000151 0.0000132 0.0000009 0.000126 0.000101 2000 3 17 51620 0.074657 0.355825 0.2876152 0.0009373 -0.000610 0.000046 0.000154 0.000159 0.0000233 0.0000009 0.000127 0.000088 2000 3 18 51621 0.074259 0.354966 0.2866990 0.0009932 -0.000727 0.000027 0.000157 0.000160 0.0000233 0.0000009 0.000117 0.000081 2000 3 19 51622 0.073991 0.354111 0.2857282 0.0010216 -0.000711 -0.000008 0.000150 0.000151 0.0000286 0.0000009 0.000105 0.000073 2000 3 20 51623 0.073780 0.353300 0.2847285 0.0010461 -0.000560 -0.000040 0.000141 0.000142 0.0000255 0.0000009 0.000095 0.000066 2000 3 21 51624 0.073888 0.352667 0.2837031 0.0010642 -0.000314 -0.000054 0.000142 0.000144 0.0000192 0.0000009 0.000084 0.000058 2000 3 22 51625 0.074064 0.352407 0.2826490 0.0010412 -0.000031 -0.000038 0.000129 0.000135 0.0000047 0.0000010 0.000072 0.000051 2000 3 23 51626 0.074039 0.351704 0.2816005 0.0009689 0.000223 0.000005 0.000126 0.000130 0.0000147 0.0000010 0.000078 0.000055 2000 3 24 51627 0.074081 0.351156 0.2806981 0.0008410 0.000411 0.000064 0.000142 0.000140 0.0000268 0.0000010 0.000088 0.000062 2000 3 25 51628 0.073844 0.350646 0.2799637 0.0006671 0.000510 0.000116 0.000149 0.000147 0.0000267 0.0000010 0.000098 0.000070 2000 3 26 51629 0.073470 0.349779 0.2793204 0.0005233 0.000508 0.000144 0.000155 0.000156 0.0000309 0.0000010 0.000108 0.000077 2000 3 27 51630 0.073090 0.348869 0.2788533 0.0004113 0.000411 0.000133 0.000158 0.000165 0.0000183 0.0000010 0.000119 0.000085 2000 3 28 51631 0.072865 0.348221 0.2784853 0.0003766 0.000240 0.000081 0.000151 0.000157 0.0000057 0.0000011 0.000129 0.000093 2000 3 29 51632 0.072687 0.347461 0.2780968 0.0004014 0.000018 -0.000011 0.000140 0.000144 0.0000024 0.0000011 0.000114 0.000094 2000 3 30 51633 0.073441 0.346574 0.2776580 0.0004607 -0.000173 -0.000108 0.000139 0.000143 0.0000380 0.0000011 0.000115 0.000098 2000 3 31 51634 0.074424 0.346203 0.2771553 0.0005865 -0.000303 -0.000188 0.000142 0.000146 0.0000577 0.0000011 0.000121 0.000104 2000 4 1 51635 0.075371 0.346138 0.2765191 0.0007576 -0.000354 -0.000238 0.000148 0.000155 0.0000291 0.0000012 0.000127 0.000110 2000 4 2 51636 0.075731 0.346382 0.2756588 0.0009676 -0.000328 -0.000248 0.000154 0.000155 0.0000365 0.0000012 0.000134 0.000115 2000 4 3 51637 0.076439 0.346652 0.2745594 0.0011765 -0.000243 -0.000218 0.000148 0.000143 0.0000439 0.0000012 0.000140 0.000121 2000 4 4 51638 0.077161 0.347068 0.2732848 0.0013070 -0.000124 -0.000162 0.000145 0.000140 0.0000396 0.0000013 0.000147 0.000126 2000 4 5 51639 0.077153 0.347097 0.2719398 0.0013274 0.000000 -0.000095 0.000145 0.000140 0.0000099 0.0000013 0.000153 0.000132 2000 4 6 51640 0.077086 0.346913 0.2706233 0.0012789 0.000105 -0.000039 0.000146 0.000141 0.0000192 0.0000013 0.000153 0.000130 2000 4 7 51641 0.077303 0.346328 0.2694113 0.0011319 0.000179 -0.000009 0.000144 0.000139 0.0000292 0.0000013 0.000151 0.000126 2000 4 8 51642 0.077705 0.345824 0.2683395 0.0009619 0.000218 -0.000010 0.000145 0.000139 0.0000190 0.0000013 0.000148 0.000123 2000 4 9 51643 0.077835 0.345234 0.2674027 0.0008339 0.000224 -0.000042 0.000145 0.000140 0.0000216 0.0000013 0.000146 0.000119 2000 4 10 51644 0.078157 0.344382 0.2665692 0.0007569 0.000199 -0.000092 0.000132 0.000127 0.0000242 0.0000013 0.000144 0.000115 2000 4 11 51645 0.079137 0.343625 0.2657805 0.0007613 0.000150 -0.000145 0.000123 0.000119 0.0000208 0.0000012 0.000142 0.000111 2000 4 12 51646 0.080330 0.343479 0.2649571 0.0008629 0.000084 -0.000184 0.000121 0.000116 0.0000056 0.0000012 0.000140 0.000107 2000 4 13 51647 0.081451 0.343440 0.2640217 0.0009915 0.000010 -0.000198 0.000125 0.000121 0.0000096 0.0000012 0.000132 0.000100 2000 4 14 51648 0.082060 0.343691 0.2629326 0.0011567 -0.000063 -0.000183 0.000128 0.000125 0.0000248 0.0000012 0.000123 0.000093 2000 4 15 51649 0.082108 0.343977 0.2617025 0.0013095 -0.000122 -0.000146 0.000130 0.000127 0.0000357 0.0000012 0.000113 0.000087 2000 4 16 51650 0.082185 0.344305 0.2603437 0.0014326 -0.000157 -0.000096 0.000131 0.000128 0.0000263 0.0000012 0.000104 0.000080 2000 4 17 51651 0.082325 0.344280 0.2588655 0.0014681 -0.000158 -0.000045 0.000125 0.000123 0.0000324 0.0000012 0.000095 0.000073 2000 4 18 51652 0.082500 0.344145 0.2573903 0.0014306 -0.000119 -0.000006 0.000120 0.000118 0.0000287 0.0000011 0.000086 0.000066 2000 4 19 51653 0.082330 0.343943 0.2560229 0.0013357 -0.000045 0.000020 0.000112 0.000112 0.0000067 0.0000011 0.000076 0.000059 2000 4 20 51654 0.082382 0.343209 0.2547778 0.0012229 0.000055 0.000031 0.000112 0.000113 0.0000250 0.0000010 0.000082 0.000069 2000 4 21 51655 0.082664 0.342567 0.2536468 0.0011119 0.000158 0.000032 0.000118 0.000119 0.0000416 0.0000010 0.000091 0.000083 2000 4 22 51656 0.082568 0.341893 0.2526244 0.0009761 0.000237 0.000027 0.000122 0.000123 0.0000321 0.0000010 0.000100 0.000098 2000 4 23 51657 0.082869 0.340978 0.2517107 0.0008445 0.000266 0.000018 0.000129 0.000133 0.0000226 0.0000009 0.000110 0.000113 2000 4 24 51658 0.083437 0.340244 0.2509122 0.0007293 0.000228 0.000006 0.000132 0.000140 0.0000131 0.0000076 0.000119 0.000128 2000 4 25 51659 0.084214 0.339743 0.2502242 0.0006500 0.000119 -0.000011 0.000124 0.000132 0.0000036 0.0000141 0.000129 0.000143 2000 4 26 51660 0.084981 0.339401 0.2496089 0.0006501 -0.000052 -0.000031 0.000116 0.000123 0.0000019 0.0000138 0.000129 0.000104 2000 4 27 51661 0.085859 0.339008 0.2489911 0.0007305 -0.000242 -0.000057 0.000120 0.000127 0.0000150 0.0000072 0.000135 0.000097 2000 4 28 51662 0.086651 0.338734 0.2481708 0.0008660 -0.000410 -0.000077 0.000121 0.000129 0.0000324 0.0000007 0.000142 0.000102 2000 4 29 51663 0.087489 0.338507 0.2471585 0.0010758 -0.000518 -0.000077 0.000123 0.000132 0.0000383 0.0000007 0.000150 0.000107 2000 4 30 51664 0.088312 0.337997 0.2460443 0.0012815 -0.000539 -0.000045 0.000116 0.000122 0.0000291 0.0000007 0.000158 0.000113 2000 5 1 51665 0.089151 0.337562 0.2447085 0.0014181 -0.000465 0.000021 0.000102 0.000105 0.0000273 0.0000007 0.000166 0.000118 2000 5 2 51666 0.089602 0.337197 0.2432394 0.0014957 -0.000309 0.000114 0.000099 0.000102 0.0000223 0.0000007 0.000174 0.000123 2000 5 3 51667 0.090088 0.336838 0.2417459 0.0015082 -0.000107 0.000213 0.000098 0.000101 0.0000062 0.0000007 0.000182 0.000129 2000 5 4 51668 0.089948 0.336129 0.2402516 0.0014411 0.000097 0.000294 0.000096 0.000099 0.0000170 0.0000006 0.000175 0.000131 2000 5 5 51669 0.089540 0.335013 0.2388313 0.0012970 0.000253 0.000330 0.000095 0.000097 0.0000304 0.0000006 0.000163 0.000131 2000 5 6 51670 0.089151 0.333929 0.2375902 0.0011186 0.000327 0.000307 0.000097 0.000099 0.0000235 0.0000006 0.000151 0.000132 2000 5 7 51671 0.088621 0.333125 0.2365709 0.0009548 0.000309 0.000225 0.000098 0.000099 0.0000167 0.0000006 0.000139 0.000133 2000 5 8 51672 0.087976 0.332026 0.2357246 0.0008578 0.000220 0.000106 0.000092 0.000093 0.0000098 0.0000006 0.000128 0.000133 2000 5 9 51673 0.087586 0.331009 0.2349312 0.0008536 0.000108 -0.000016 0.000088 0.000088 0.0000030 0.0000006 0.000116 0.000134 2000 5 10 51674 0.087364 0.330273 0.2340566 0.0009420 -0.000049 -0.000127 0.000095 0.000095 0.0000020 0.0000006 0.000114 0.000106 2000 5 11 51675 0.087447 0.329820 0.2330092 0.0010732 -0.000001 -0.000144 0.000096 0.000097 0.0000456 0.0000006 0.000092 0.000090 2000 5 12 51676 0.088109 0.329759 0.2318809 0.0011696 0.000094 -0.000106 0.000091 0.000092 0.0000761 0.0000006 0.000090 0.000138 2000 5 13 51677 0.088894 0.329713 0.2307296 0.0012306 0.000170 -0.000044 0.000092 0.000092 0.0000337 0.0000006 0.000097 0.000206 2000 5 14 51678 0.089544 0.329822 0.2294638 0.0012672 0.000188 0.000011 0.000089 0.000090 0.0000354 0.0000006 0.000105 0.000274 2000 5 15 51679 0.090121 0.329793 0.2281468 0.0012369 0.000111 0.000029 0.000090 0.000092 0.0000379 0.0000006 0.000112 0.000342 2000 5 16 51680 0.090695 0.329373 0.2269342 0.0011462 -0.000050 -0.000001 0.000089 0.000091 0.0000333 0.0000006 0.000119 0.000411 2000 5 17 51681 0.090985 0.328623 0.2258873 0.0010411 -0.000292 -0.000082 0.000091 0.000094 0.0000087 0.0000006 0.000138 0.000179 2000 5 18 51682 0.091537 0.327824 0.2249182 0.0009326 -0.000441 -0.000161 0.000091 0.000094 0.0000124 0.0000006 0.000129 0.000109 2000 5 19 51683 0.092300 0.327231 0.2240165 0.0008008 -0.000474 -0.000217 0.000091 0.000094 0.0000255 0.0000006 0.000110 0.000093 2000 5 20 51684 0.093319 0.326684 0.2232576 0.0006695 -0.000401 -0.000235 0.000101 0.000103 0.0000454 0.0000006 0.000091 0.000076 2000 5 21 51685 0.094114 0.326309 0.2226583 0.0005672 -0.000261 -0.000218 0.000104 0.000104 0.0000657 0.0000006 0.000073 0.000060 2000 5 22 51686 0.094598 0.325762 0.2221374 0.0005056 -0.000114 -0.000183 0.000102 0.000102 0.0000345 0.0000006 0.000054 0.000044 2000 5 23 51687 0.094734 0.324917 0.2216366 0.0004954 -0.000016 -0.000155 0.000089 0.000090 0.0000033 0.0000006 0.000035 0.000028 2000 5 24 51688 0.094795 0.323589 0.2211184 0.0005242 -0.000025 -0.000156 0.000083 0.000085 0.0000017 0.0000006 0.000100 0.000087 2000 5 25 51689 0.095471 0.322557 0.2205446 0.0005707 -0.000073 -0.000191 0.000087 0.000090 0.0000157 0.0000006 0.000125 0.000110 2000 5 26 51690 0.096171 0.321709 0.2199708 0.0006320 -0.000136 -0.000247 0.000089 0.000091 0.0000350 0.0000007 0.000133 0.000117 2000 5 27 51691 0.097438 0.320964 0.2193300 0.0007321 -0.000183 -0.000302 0.000090 0.000092 0.0000471 0.0000006 0.000142 0.000125 2000 5 28 51692 0.098910 0.320320 0.2185017 0.0008527 -0.000188 -0.000332 0.000101 0.000103 0.0000369 0.0000006 0.000150 0.000132 2000 5 29 51693 0.100786 0.319513 0.2176294 0.0009440 -0.000142 -0.000323 0.000103 0.000106 0.0000274 0.0000006 0.000158 0.000140 2000 5 30 51694 0.102457 0.318892 0.2167218 0.0009687 -0.000055 -0.000279 0.000094 0.000097 0.0000174 0.0000006 0.000167 0.000147 2000 5 31 51695 0.103775 0.318233 0.2157933 0.0009246 0.000050 -0.000220 0.000089 0.000094 0.0000065 0.0000006 0.000175 0.000155 2000 6 1 51696 0.105140 0.317618 0.2149383 0.0008226 0.000142 -0.000174 0.000087 0.000091 0.0000165 0.0000006 0.000171 0.000152 2000 6 2 51697 0.106422 0.316742 0.2141912 0.0006335 0.000198 -0.000160 0.000088 0.000092 0.0000312 0.0000007 0.000162 0.000145 2000 6 3 51698 0.107796 0.315662 0.2135703 0.0004927 0.000208 -0.000179 0.000097 0.000099 0.0000375 0.0000008 0.000154 0.000138 2000 6 4 51699 0.108831 0.314686 0.2130747 0.0004482 0.000174 -0.000216 0.000103 0.000104 0.0000382 0.0000083 0.000146 0.000132 2000 6 5 51700 0.109868 0.313742 0.2126136 0.0004511 0.000108 -0.000235 0.000098 0.000099 0.0000438 0.0000149 0.000137 0.000125 2000 6 6 51701 0.110983 0.312818 0.2121409 0.0005277 0.000032 -0.000200 0.000093 0.000095 0.0000382 0.0000142 0.000128 0.000118 2000 6 7 51702 0.111908 0.312019 0.2115817 0.0006485 -0.000034 -0.000090 0.000092 0.000094 0.0000093 0.0000146 0.000120 0.000111 2000 6 8 51703 0.112583 0.311297 0.2108416 0.0008129 -0.000074 0.000099 0.000093 0.000096 0.0000161 0.0000149 0.000099 0.000109 2000 6 9 51704 0.112582 0.310460 0.2099430 0.0009128 -0.000088 0.000316 0.000093 0.000096 0.0000283 0.0000152 0.000074 0.000108 2000 6 10 51705 0.112548 0.309138 0.2090097 0.0009019 -0.000077 0.000475 0.000097 0.000099 0.0000290 0.0000159 0.000093 0.000119 2000 6 11 51706 0.112688 0.307666 0.2081375 0.0008399 -0.000063 0.000540 0.000104 0.000106 0.0000325 0.0000159 0.000111 0.000131 2000 6 12 51707 0.113259 0.306233 0.2073440 0.0007479 -0.000066 0.000476 0.000100 0.000101 0.0000363 0.0000147 0.000130 0.000142 2000 6 13 51708 0.113497 0.305082 0.2066773 0.0005903 -0.000101 0.000279 0.000090 0.000093 0.0000314 0.0000140 0.000149 0.000153 2000 6 14 51709 0.113674 0.303764 0.2062303 0.0003769 -0.000168 -0.000016 0.000090 0.000093 0.0000096 0.0000140 0.000168 0.000164 2000 6 15 51710 0.113779 0.302613 0.2060634 0.0001528 -0.000274 -0.000360 0.000091 0.000094 0.0000167 0.0000110 0.000576 0.000633 2000 6 16 51711 0.113170 0.301401 0.2060756 -0.0000504 -0.000362 -0.000668 0.000089 0.000092 0.0000333 0.0000079 0.001112 0.001254 2000 6 17 51712 0.112236 0.300376 0.2061158 -0.0001590 -0.000348 -0.000855 0.000091 0.000094 0.0000387 0.0000079 0.001010 0.001140 2000 6 18 51713 0.111060 0.299379 0.2061843 -0.0001903 -0.000266 -0.000879 0.000097 0.000099 0.0000244 0.0000080 0.000740 0.000831 2000 6 19 51714 0.109910 0.297834 0.2063693 -0.0001699 -0.000161 -0.000730 0.000098 0.000099 0.0000141 0.0000080 0.000469 0.000522 2000 6 20 51715 0.108909 0.296250 0.2065954 -0.0001169 -0.000078 -0.000442 0.000094 0.000096 0.0000037 0.0000079 0.000198 0.000214 2000 6 21 51716 0.108224 0.294476 0.2067182 -0.0000461 -0.000085 -0.000060 0.000093 0.000095 0.0000023 0.0000078 0.000132 0.000126 2000 6 22 51717 0.107826 0.292721 0.2066768 0.0000624 -0.000119 0.000297 0.000094 0.000097 0.0000317 0.0000079 0.000116 0.000105 2000 6 23 51718 0.107648 0.290970 0.2065662 0.0001615 -0.000165 0.000562 0.000094 0.000098 0.0000441 0.0000081 0.000111 0.000101 2000 6 24 51719 0.107910 0.289278 0.2064100 0.0002566 -0.000205 0.000693 0.000096 0.000099 0.0000238 0.0000081 0.000107 0.000097 2000 6 25 51720 0.108260 0.288066 0.2061240 0.0003463 -0.000216 0.000676 0.000099 0.000101 0.0000271 0.0000082 0.000102 0.000093 2000 6 26 51721 0.108587 0.286787 0.2057261 0.0004151 -0.000189 0.000528 0.000097 0.000099 0.0000287 0.0000080 0.000097 0.000089 2000 6 27 51722 0.109068 0.285455 0.2052727 0.0004486 -0.000130 0.000289 0.000094 0.000097 0.0000231 0.0000080 0.000093 0.000085 2000 6 28 51723 0.109599 0.284108 0.2048375 0.0004183 -0.000052 0.000014 0.000093 0.000095 0.0000058 0.0000082 0.000088 0.000081 2000 6 29 51724 0.110177 0.283031 0.2044800 0.0003093 0.000023 -0.000240 0.000093 0.000094 0.0000209 0.0000082 0.000093 0.000083 2000 6 30 51725 0.110297 0.281714 0.2042327 0.0001607 0.000079 -0.000434 0.000094 0.000094 0.0000336 0.0000081 0.000101 0.000088 2000 7 1 51726 0.110196 0.280081 0.2041084 0.0000480 0.000106 -0.000541 0.000097 0.000098 0.0000272 0.0000083 0.000109 0.000093 2000 7 2 51727 0.110104 0.278751 0.2040837 0.0000014 0.000103 -0.000554 0.000109 0.000109 0.0000225 0.0000083 0.000117 0.000097 2000 7 3 51728 0.109615 0.277628 0.2040748 0.0000621 0.000076 -0.000484 0.000112 0.000111 0.0000178 0.0000079 0.000125 0.000102 2000 7 4 51729 0.109070 0.276459 0.2039712 0.0002026 0.000040 -0.000353 0.000105 0.000105 0.0000132 0.0000075 0.000133 0.000106 2000 7 5 51730 0.108306 0.275630 0.2036868 0.0003745 0.000007 -0.000193 0.000106 0.000105 0.0000085 0.0000074 0.000141 0.000111 2000 7 6 51731 0.107459 0.274881 0.2032026 0.0005326 -0.000015 -0.000040 0.000106 0.000106 0.0000038 0.0000075 0.000149 0.000115 2000 7 7 51732 0.107042 0.274134 0.2025743 0.0006253 -0.000016 0.000084 0.000098 0.000099 0.0000013 0.0000074 0.000070 0.000060 2000 7 8 51733 0.106968 0.273346 0.2019037 0.0006387 -0.000026 0.000144 0.000105 0.000104 0.0000009 0.0000075 0.000045 0.000044 2000 7 9 51734 0.106336 0.272936 0.2012719 0.0005884 -0.000047 0.000144 0.000123 0.000121 0.0000010 0.0000078 0.000053 0.000051 2000 7 10 51735 0.105541 0.272130 0.2007166 0.0004974 -0.000069 0.000098 0.000121 0.000119 0.0000011 0.0000078 0.000062 0.000058 2000 7 11 51736 0.104468 0.271571 0.2002545 0.0003804 -0.000079 0.000030 0.000112 0.000111 0.0000012 0.0000077 0.000072 0.000065 2000 7 12 51737 0.103706 0.270476 0.1999060 0.0002660 -0.000095 -0.000036 0.000109 0.000108 0.0000018 0.0000076 0.000119 0.000101 2000 7 13 51738 0.102920 0.269438 0.1997066 0.0001386 -0.000019 -0.000077 0.000108 0.000107 0.0000019 0.0000076 0.000141 0.000113 2000 7 14 51739 0.102203 0.268177 0.1996115 0.0000260 0.000045 -0.000100 0.000112 0.000111 0.0000130 0.0000079 0.000139 0.000109 2000 7 15 51740 0.101280 0.267240 0.1996090 -0.0000899 0.000076 -0.000104 0.000122 0.000122 0.0000262 0.0000082 0.000132 0.000102 2000 7 16 51741 0.100097 0.265969 0.1997256 -0.0001638 0.000073 -0.000092 0.000116 0.000116 0.0000253 0.0000083 0.000125 0.000096 2000 7 17 51742 0.099273 0.265008 0.1999310 -0.0001671 0.000042 -0.000070 0.000099 0.000100 0.0000244 0.0000082 0.000117 0.000090 2000 7 18 51743 0.098332 0.264057 0.2001521 -0.0001595 -0.000001 -0.000043 0.000097 0.000098 0.0000214 0.0000081 0.000110 0.000083 2000 7 19 51744 0.097117 0.263063 0.2003241 -0.0001475 -0.000033 -0.000019 0.000098 0.000099 0.0000056 0.0000082 0.000103 0.000077 2000 7 20 51745 0.096042 0.261713 0.2004340 -0.0000848 -0.000032 -0.000002 0.000100 0.000102 0.0000088 0.0000083 0.000107 0.000081 2000 7 21 51746 0.094855 0.260354 0.2005168 -0.0000396 0.000000 0.000004 0.000100 0.000102 0.0000160 0.0000086 0.000113 0.000088 2000 7 22 51747 0.093517 0.259223 0.2005794 -0.0000060 0.000052 -0.000001 0.000104 0.000107 0.0000106 0.0000087 0.000121 0.000096 2000 7 23 51748 0.092105 0.258370 0.2005705 0.0000719 0.000099 -0.000018 0.000108 0.000112 0.0000079 0.0000086 0.000127 0.000103 2000 7 24 51749 0.091314 0.257137 0.2004840 0.0001279 0.000119 -0.000049 0.000101 0.000103 0.0000052 0.0000084 0.000134 0.000111 2000 7 25 51750 0.090836 0.256277 0.2003675 0.0001305 0.000097 -0.000098 0.000097 0.000097 0.0000025 0.0000082 0.000141 0.000118 2000 7 26 51751 0.090476 0.255836 0.2002886 0.0000617 0.000022 -0.000156 0.000094 0.000095 0.0000021 0.0000081 0.000139 0.000112 2000 7 27 51752 0.090278 0.255309 0.2002866 -0.0000410 -0.000069 -0.000247 0.000095 0.000096 0.0000151 0.0000083 0.000139 0.000112 2000 7 28 51753 0.089955 0.254813 0.2003562 -0.0001317 -0.000153 -0.000354 0.000099 0.000100 0.0000294 0.0000086 0.000140 0.000116 2000 7 29 51754 0.089065 0.254158 0.2004796 -0.0001592 -0.000209 -0.000449 0.000103 0.000102 0.0000272 0.0000089 0.000141 0.000119 2000 7 30 51755 0.088394 0.253467 0.2006349 -0.0001423 -0.000222 -0.000504 0.000104 0.000102 0.0000219 0.0000094 0.000142 0.000123 2000 7 31 51756 0.087620 0.252576 0.2007386 -0.0000575 -0.000192 -0.000485 0.000099 0.000097 0.0000166 0.0000098 0.000144 0.000126 2000 8 1 51757 0.087002 0.251981 0.2006970 0.0001118 -0.000136 -0.000373 0.000096 0.000095 0.0000111 0.0000094 0.000145 0.000130 2000 8 2 51758 0.086358 0.251340 0.2004758 0.0002546 -0.000081 -0.000171 0.000095 0.000093 0.0000042 0.0000088 0.000146 0.000134 2000 8 3 51759 0.085943 0.250938 0.2001260 0.0003559 -0.000061 0.000103 0.000096 0.000093 0.0000069 0.0000087 0.000152 0.000132 2000 8 4 51760 0.085347 0.250506 0.1997269 0.0003920 -0.000084 0.000389 0.000098 0.000095 0.0000123 0.0000087 0.000160 0.000130 2000 8 5 51761 0.084672 0.249930 0.1993436 0.0003335 -0.000135 0.000616 0.000104 0.000101 0.0000150 0.0000090 0.000168 0.000127 2000 8 6 51762 0.083948 0.249253 0.1990251 0.0002286 -0.000182 0.000724 0.000110 0.000105 0.0000165 0.0000088 0.000176 0.000124 2000 8 7 51763 0.083283 0.248755 0.1988262 0.0001078 -0.000186 0.000676 0.000103 0.000100 0.0000181 0.0000082 0.000184 0.000122 2000 8 8 51764 0.082364 0.248326 0.1987845 -0.0000399 -0.000128 0.000482 0.000096 0.000094 0.0000170 0.0000079 0.000192 0.000119 2000 8 9 51765 0.081250 0.247983 0.1988923 -0.0001759 0.000016 0.000153 0.000098 0.000095 0.0000049 0.0000079 0.000148 0.000108 2000 8 10 51766 0.080070 0.247674 0.1990952 -0.0002448 0.000151 -0.000149 0.000100 0.000098 0.0000112 0.0000081 0.000183 0.000508 2000 8 11 51767 0.078343 0.247432 0.1993435 -0.0002589 0.000199 -0.000359 0.000103 0.000102 0.0000228 0.0000083 0.000216 0.000757 2000 8 12 51768 0.076657 0.246567 0.1995898 -0.0002479 0.000129 -0.000443 0.000106 0.000103 0.0000275 0.0000083 0.000206 0.000598 2000 8 13 51769 0.075064 0.245851 0.1997856 -0.0001931 0.000002 -0.000410 0.000106 0.000101 0.0000202 0.0000081 0.000196 0.000439 2000 8 14 51770 0.073679 0.245218 0.1999193 -0.0001057 -0.000123 -0.000293 0.000101 0.000097 0.0000129 0.0000078 0.000186 0.000280 2000 8 15 51771 0.072625 0.244791 0.1999769 0.0000058 -0.000194 -0.000137 0.000097 0.000094 0.0000057 0.0000078 0.000176 0.000121 2000 8 16 51772 0.072025 0.244293 0.1999099 0.0001591 -0.000123 -0.000022 0.000094 0.000092 0.0000040 0.0000079 0.000192 0.000132 2000 8 17 51773 0.071365 0.244335 0.1996402 0.0003228 -0.000057 0.000110 0.000095 0.000093 0.0000173 0.0000080 0.000167 0.000142 2000 8 18 51774 0.070402 0.244259 0.1992057 0.0004769 -0.000004 0.000217 0.000097 0.000096 0.0000272 0.0000081 0.000127 0.000146 2000 8 19 51775 0.069192 0.244390 0.1986776 0.0005849 0.000037 0.000253 0.000097 0.000096 0.0000110 0.0000080 0.000107 0.000128 2000 8 20 51776 0.067517 0.244184 0.1980571 0.0006413 0.000057 0.000229 0.000103 0.000101 0.0000079 0.0000080 0.000093 0.000103 2000 8 21 51777 0.065945 0.244032 0.1973730 0.0006522 0.000060 0.000163 0.000102 0.000101 0.0000048 0.0000079 0.000079 0.000077 2000 8 22 51778 0.063923 0.243828 0.1966796 0.0006208 0.000050 0.000079 0.000096 0.000096 0.0000018 0.0000078 0.000066 0.000052 2000 8 23 51779 0.062170 0.243528 0.1960493 0.0005509 0.000017 0.000010 0.000095 0.000096 0.0000015 0.0000079 0.000108 0.000087 2000 8 24 51780 0.060603 0.243308 0.1955768 0.0004725 0.000000 -0.000040 0.000101 0.000101 0.0000206 0.0000081 0.000066 0.000055 2000 8 25 51781 0.059139 0.242866 0.1951726 0.0004048 -0.000091 -0.000081 0.000105 0.000106 0.0000421 0.0000083 0.000060 0.000052 2000 8 26 51782 0.057426 0.242978 0.1946883 0.0003889 -0.000239 -0.000099 0.000108 0.000107 0.0000193 0.0000085 0.000082 0.000071 2000 8 27 51783 0.055665 0.242900 0.1941951 0.0004670 -0.000392 -0.000076 0.000107 0.000106 0.0000233 0.0000084 0.000103 0.000089 2000 8 28 51784 0.053858 0.242612 0.1936664 0.0006015 -0.000498 -0.000008 0.000099 0.000099 0.0000274 0.0000084 0.000125 0.000108 2000 8 29 51785 0.052338 0.242364 0.1929868 0.0007561 -0.000512 0.000102 0.000100 0.000102 0.0000292 0.0000087 0.000146 0.000127 2000 8 30 51786 0.051257 0.241982 0.1921046 0.0008970 -0.000425 0.000227 0.000100 0.000103 0.0000075 0.0000089 0.000167 0.000146 2000 8 31 51787 0.050133 0.241879 0.1911384 0.0009393 -0.000213 0.000377 0.000096 0.000098 0.0000147 0.0000086 0.000114 0.000123 2000 9 1 51788 0.049208 0.242003 0.1902095 0.0008990 -0.000034 0.000420 0.000097 0.000099 0.0000295 0.0000084 0.000095 0.000108 2000 9 2 51789 0.047965 0.242097 0.1893769 0.0007823 0.000052 0.000357 0.000100 0.000102 0.0000244 0.0000087 0.000106 0.000104 2000 9 3 51790 0.046721 0.241981 0.1886698 0.0006254 0.000042 0.000251 0.000100 0.000102 0.0000193 0.0000087 0.000117 0.000100 2000 9 4 51791 0.045229 0.242187 0.1880990 0.0004664 -0.000049 0.000165 0.000093 0.000096 0.0000142 0.0000084 0.000128 0.000095 2000 9 5 51792 0.043361 0.242223 0.1876719 0.0003070 -0.000178 0.000152 0.000090 0.000094 0.0000091 0.0000082 0.000138 0.000091 2000 9 6 51793 0.041446 0.242256 0.1874002 0.0001648 -0.000283 0.000274 0.000096 0.000099 0.0000039 0.0000082 0.000216 0.000199 2000 9 7 51794 0.038987 0.242116 0.1872905 0.0000333 -0.000336 0.000433 0.000098 0.000101 0.0000095 0.0000086 0.000746 0.000511 2000 9 8 51795 0.036693 0.241720 0.1873219 -0.0000476 -0.000322 0.000566 0.000099 0.000101 0.0000166 0.0000089 0.001171 0.000746 2000 9 9 51796 0.034255 0.241319 0.1874119 -0.0000528 -0.000247 0.000613 0.000101 0.000104 0.0000167 0.0000090 0.000976 0.000628 2000 9 10 51797 0.031809 0.240629 0.1874501 0.0000068 -0.000134 0.000568 0.000101 0.000105 0.0000177 0.0000087 0.000782 0.000511 2000 9 11 51798 0.029920 0.240172 0.1874035 0.0000987 -0.000012 0.000441 0.000099 0.000103 0.0000188 0.0000083 0.000587 0.000394 2000 9 12 51799 0.027808 0.239897 0.1872775 0.0002084 0.000088 0.000263 0.000095 0.000099 0.0000172 0.0000081 0.000393 0.000277 2000 9 13 51800 0.025261 0.239610 0.1870481 0.0003534 0.000147 0.000082 0.000094 0.000097 0.0000049 0.0000082 0.000199 0.000160 2000 9 14 51801 0.022124 0.239782 0.1866475 0.0005234 0.000155 -0.000060 0.000094 0.000097 0.0000019 0.0000082 0.000160 0.000131 2000 9 15 51802 0.019277 0.239877 0.1860609 0.0006752 0.000123 -0.000135 0.000094 0.000096 0.0000020 0.0000082 0.000174 0.000132 2000 9 16 51803 0.016867 0.240001 0.1853505 0.0007602 0.000073 -0.000132 0.000097 0.000097 0.0000018 0.0000084 0.000151 0.000114 2000 9 17 51804 0.015290 0.240090 0.1846117 0.0007534 0.000030 -0.000076 0.000105 0.000105 0.0000016 0.0000084 0.000125 0.000095 2000 9 18 51805 0.013724 0.240658 0.1839314 0.0006565 0.000012 -0.000007 0.000103 0.000104 0.0000014 0.0000082 0.000099 0.000075 2000 9 19 51806 0.012402 0.241252 0.1833558 0.0005394 0.000024 0.000036 0.000093 0.000095 0.0000012 0.0000080 0.000073 0.000056 2000 9 20 51807 0.010657 0.242287 0.1828891 0.0004419 0.000077 0.000061 0.000093 0.000094 0.0000016 0.0000079 0.000100 0.000080 2000 9 21 51808 0.008938 0.243209 0.1825196 0.0003875 0.000114 -0.000059 0.000094 0.000095 0.0000126 0.0000078 0.000080 0.000066 2000 9 22 51809 0.006930 0.243760 0.1821540 0.0003975 0.000128 -0.000144 0.000095 0.000096 0.0000242 0.0000077 0.000079 0.000066 2000 9 23 51810 0.005465 0.243621 0.1817031 0.0004470 0.000124 -0.000168 0.000100 0.000100 0.0000229 0.0000076 0.000095 0.000078 2000 9 24 51811 0.004202 0.243619 0.1811877 0.0005493 0.000108 -0.000142 0.000099 0.000098 0.0000163 0.0000076 0.000112 0.000091 2000 9 25 51812 0.003038 0.243613 0.1805918 0.0007157 0.000094 -0.000080 0.000095 0.000093 0.0000098 0.0000075 0.000128 0.000103 2000 9 26 51813 0.001760 0.243731 0.1798456 0.0009107 0.000082 -0.000007 0.000091 0.000089 0.0000032 0.0000075 0.000144 0.000115 2000 9 27 51814 0.000743 0.244110 0.1788874 0.0010598 0.000096 0.000023 0.000089 0.000087 0.0000019 0.0000075 0.000127 0.000101 2000 9 28 51815 -0.000599 0.244666 0.1777456 0.0011150 0.000064 0.000067 0.000093 0.000089 0.0000242 0.0000076 0.000124 0.000104 2000 9 29 51816 -0.002239 0.245647 0.1766106 0.0010897 -0.000005 0.000116 0.000093 0.000090 0.0000449 0.0000076 0.000130 0.000115 2000 9 30 51817 -0.004240 0.246495 0.1756143 0.0009878 -0.000082 0.000155 0.000095 0.000092 0.0000313 0.0000079 0.000135 0.000126 2000 10 1 51818 -0.005802 0.247103 0.1747099 0.0008115 -0.000135 0.000175 0.000098 0.000094 0.0000229 0.0000083 0.000141 0.000136 2000 10 2 51819 -0.007167 0.247768 0.1739381 0.0006237 -0.000131 0.000171 0.000094 0.000091 0.0000145 0.0000082 0.000146 0.000147 2000 10 3 51820 -0.009107 0.248460 0.1733802 0.0004219 -0.000053 0.000149 0.000091 0.000088 0.0000060 0.0000081 0.000152 0.000158 2000 10 4 51821 -0.011205 0.248986 0.1730504 0.0002586 0.000115 0.000100 0.000091 0.000088 0.0000023 0.0000082 0.000125 0.000107 2000 10 5 51822 -0.013032 0.249512 0.1728167 0.0001950 0.000301 0.000105 0.000092 0.000088 0.0000238 0.0000081 0.000134 0.000106 2000 10 6 51823 -0.014609 0.250120 0.1725894 0.0002360 0.000463 0.000163 0.000090 0.000087 0.0000461 0.0000079 0.000158 0.000126 2000 10 7 51824 -0.016083 0.250505 0.1723040 0.0003470 0.000568 0.000253 0.000093 0.000089 0.0000449 0.0000077 0.000181 0.000145 2000 10 8 51825 -0.017572 0.250727 0.1718593 0.0004901 0.000589 0.000337 0.000101 0.000095 0.0000653 0.0000076 0.000205 0.000165 2000 10 9 51826 -0.018965 0.251083 0.1712452 0.0006485 0.000526 0.000374 0.000101 0.000096 0.0000856 0.0000075 0.000229 0.000185 2000 10 10 51827 -0.020498 0.251941 0.1704884 0.0008233 0.000399 0.000329 0.000098 0.000094 0.0000880 0.0000075 0.000253 0.000204 2000 10 11 51828 -0.021770 0.253165 0.1695799 0.0010139 0.000173 0.000202 0.000099 0.000094 0.0000191 0.0000077 0.000159 0.000128 2000 10 12 51829 -0.022873 0.254822 0.1684698 0.0011645 0.000108 -0.000029 0.000098 0.000094 0.0000019 0.0000079 0.000115 0.000118 2000 10 13 51830 -0.024262 0.256520 0.1672125 0.0012514 0.000065 -0.000241 0.000098 0.000094 0.0000447 0.0000080 0.000114 0.000124 2000 10 14 51831 -0.026204 0.258109 0.1658889 0.0012973 0.000036 -0.000379 0.000102 0.000098 0.0000863 0.0000081 0.000120 0.000125 2000 10 15 51832 -0.028134 0.259278 0.1645677 0.0012880 0.000033 -0.000416 0.000114 0.000107 0.0000594 0.0000080 0.000126 0.000127 2000 10 16 51833 -0.030366 0.260466 0.1633226 0.0011973 0.000037 -0.000349 0.000114 0.000108 0.0000326 0.0000075 0.000132 0.000128 2000 10 17 51834 -0.032212 0.261129 0.1621967 0.0010695 0.000031 -0.000211 0.000107 0.000104 0.0000057 0.0000075 0.000138 0.000129 2000 10 18 51835 -0.033928 0.262023 0.1611807 0.0009626 0.000090 0.000012 0.000107 0.000104 0.0000017 0.0000076 0.000113 0.000105 2000 10 19 51836 -0.035655 0.262758 0.1602028 0.0008989 -0.000051 0.000091 0.000108 0.000104 0.0000376 0.0000076 0.000064 0.000059 2000 10 20 51837 -0.037428 0.263640 0.1592989 0.0009141 -0.000098 0.000166 0.000122 0.000115 0.0000781 0.0000074 0.000047 0.000043 2000 10 21 51838 -0.039084 0.264548 0.1584399 0.0010100 -0.000047 0.000237 0.000127 0.000120 0.0000819 0.0000076 0.000044 0.000040 2000 10 22 51839 -0.040572 0.265571 0.1573938 0.0011625 0.000028 0.000272 0.000116 0.000111 0.0000555 0.0000078 0.000041 0.000037 2000 10 23 51840 -0.041965 0.266907 0.1560825 0.0013360 0.000079 0.000254 0.000112 0.000110 0.0000291 0.0000079 0.000039 0.000033 2000 10 24 51841 -0.043341 0.268626 0.1545890 0.0014845 0.000066 0.000170 0.000105 0.000105 0.0000027 0.0000078 0.000036 0.000030 2000 10 25 51842 -0.044247 0.270048 0.1530407 0.0015605 -0.000049 0.000063 0.000103 0.000103 0.0000015 0.0000079 0.000091 0.000077 2000 10 26 51843 -0.045574 0.271824 0.1514785 0.0015592 -0.000219 -0.000203 0.000100 0.000102 0.0000397 0.0000081 0.000219 0.000164 2000 10 27 51844 -0.046935 0.273617 0.1499136 0.0015125 -0.000259 -0.000383 0.000095 0.000098 0.0000746 0.0000083 0.000236 0.000172 2000 10 28 51845 -0.048299 0.275145 0.1484125 0.0013909 -0.000177 -0.000425 0.000104 0.000107 0.0000490 0.0000083 0.000198 0.000145 2000 10 29 51846 -0.049240 0.276473 0.1470790 0.0012426 -0.000040 -0.000350 0.000103 0.000105 0.0000341 0.0000082 0.000160 0.000118 2000 10 30 51847 -0.050060 0.278430 0.1459342 0.0011068 0.000092 -0.000195 0.000092 0.000094 0.0000192 0.0000080 0.000122 0.000091 2000 10 31 51848 -0.051115 0.280763 0.1449370 0.0009835 0.000174 -0.000026 0.000088 0.000089 0.0000044 0.0000077 0.000084 0.000063 2000 11 1 51849 -0.052457 0.282833 0.1440368 0.0008589 0.000091 0.000096 0.000087 0.000088 0.0000014 0.0000076 0.000113 0.000091 2000 11 2 51850 -0.053682 0.284325 0.1432141 0.0008024 0.000063 0.000112 0.000089 0.000090 0.0000015 0.0000076 0.000097 0.000076 2000 11 3 51851 -0.055181 0.286196 0.1424171 0.0008372 0.000170 0.000023 0.000090 0.000091 0.0000014 0.0000077 0.000134 0.000110 2000 11 4 51852 -0.056495 0.287829 0.1415786 0.0008930 0.000211 -0.000055 0.000092 0.000093 0.0000034 0.0000081 0.000163 0.000140 2000 11 5 51853 -0.057688 0.289442 0.1406700 0.0009509 0.000168 -0.000102 0.000099 0.000097 0.0000064 0.0000084 0.000177 0.000158 2000 11 6 51854 -0.059247 0.291269 0.1396870 0.0010230 0.000069 -0.000124 0.000098 0.000097 0.0000094 0.0000083 0.000192 0.000176 2000 11 7 51855 -0.060768 0.293602 0.1386204 0.0011297 -0.000053 -0.000140 0.000094 0.000093 0.0000104 0.0000079 0.000206 0.000194 2000 11 8 51856 -0.062191 0.295856 0.1374512 0.0012349 -0.000143 -0.000173 0.000093 0.000093 0.0000040 0.0000077 0.000221 0.000213 2000 11 9 51857 -0.063772 0.297928 0.1361703 0.0013062 -0.000131 -0.000248 0.000096 0.000096 0.0000060 0.0000077 0.000204 0.000197 2000 11 10 51858 -0.065107 0.299513 0.1348154 0.0013557 -0.000022 -0.000344 0.000097 0.000096 0.0000109 0.0000076 0.000176 0.000170 2000 11 11 51859 -0.066052 0.300782 0.1334728 0.0013295 0.000142 -0.000426 0.000095 0.000095 0.0000158 0.0000076 0.000148 0.000143 2000 11 12 51860 -0.066269 0.301844 0.1322451 0.0011848 0.000290 -0.000452 0.000097 0.000097 0.0000207 0.0000076 0.000121 0.000116 2000 11 13 51861 -0.066468 0.303439 0.1312076 0.0009523 0.000345 -0.000398 0.000095 0.000096 0.0000256 0.0000072 0.000093 0.000089 2000 11 14 51862 -0.067390 0.305420 0.1303744 0.0007576 0.000272 -0.000264 0.000092 0.000092 0.0000259 0.0000069 0.000065 0.000062 2000 11 15 51863 -0.069169 0.307146 0.1296922 0.0006541 -0.000011 -0.000049 0.000092 0.000093 0.0000067 0.0000069 0.000111 0.000096 2000 11 16 51864 -0.071204 0.308664 0.1290712 0.0006058 -0.000233 0.000122 0.000094 0.000095 0.0000109 0.0000072 0.000122 0.000103 2000 11 17 51865 -0.073128 0.309956 0.1284556 0.0006500 -0.000360 0.000218 0.000094 0.000096 0.0000212 0.0000073 0.000119 0.000101 2000 11 18 51866 -0.074727 0.311690 0.1277813 0.0007529 -0.000381 0.000229 0.000097 0.000099 0.0000235 0.0000076 0.000117 0.000099 2000 11 19 51867 -0.075676 0.313602 0.1269566 0.0008971 -0.000305 0.000165 0.000098 0.000099 0.0000226 0.0000080 0.000114 0.000096 2000 11 20 51868 -0.075886 0.315786 0.1259681 0.0010546 -0.000169 0.000065 0.000091 0.000093 0.0000218 0.0000078 0.000112 0.000094 2000 11 21 51869 -0.075851 0.318110 0.1248634 0.0011477 -0.000018 -0.000028 0.000087 0.000091 0.0000184 0.0000077 0.000109 0.000091 2000 11 22 51870 -0.075853 0.320429 0.1237042 0.0011928 0.000108 -0.000075 0.000087 0.000090 0.0000052 0.0000076 0.000107 0.000089 2000 11 23 51871 -0.076149 0.322456 0.1225386 0.0011684 0.000179 -0.000050 0.000086 0.000090 0.0000046 0.0000076 0.000099 0.000082 2000 11 24 51872 -0.076575 0.324244 0.1214275 0.0010250 0.000202 0.000031 0.000089 0.000092 0.0000084 0.0000076 0.000089 0.000073 2000 11 25 51873 -0.077117 0.326019 0.1204435 0.0008614 0.000193 0.000134 0.000093 0.000096 0.0000121 0.0000087 0.000080 0.000065 2000 11 26 51874 -0.077707 0.327831 0.1196407 0.0006901 0.000177 0.000217 0.000095 0.000097 0.0000158 0.0000095 0.000070 0.000056 2000 11 27 51875 -0.078426 0.329837 0.1190223 0.0005545 0.000175 0.000245 0.000089 0.000092 0.0000195 0.0000090 0.000060 0.000047 2000 11 28 51876 -0.079060 0.331688 0.1185282 0.0004907 0.000200 0.000207 0.000086 0.000087 0.0000197 0.0000085 0.000051 0.000038 2000 11 29 51877 -0.079289 0.333492 0.1180552 0.0005043 0.000260 0.000088 0.000085 0.000087 0.0000055 0.0000084 0.000112 0.000090 2000 11 30 51878 -0.079565 0.335339 0.1175145 0.0005694 0.000325 -0.000024 0.000085 0.000087 0.0000129 0.0000086 0.000119 0.000096 2000 12 1 51879 -0.080043 0.337116 0.1169279 0.0006201 0.000373 -0.000102 0.000087 0.000088 0.0000247 0.0000083 0.000101 0.000081 2000 12 2 51880 -0.080636 0.338897 0.1162864 0.0007339 0.000383 -0.000134 0.000091 0.000092 0.0000234 0.0000084 0.000083 0.000066 2000 12 3 51881 -0.080808 0.340609 0.1154763 0.0008908 0.000346 -0.000121 0.000098 0.000098 0.0000159 0.0000089 0.000064 0.000051 2000 12 4 51882 -0.080941 0.342247 0.1144963 0.0010269 0.000271 -0.000078 0.000101 0.000102 0.0000085 0.0000091 0.000046 0.000036 2000 12 5 51883 -0.081209 0.343982 0.1134046 0.0011335 0.000186 -0.000025 0.000091 0.000092 0.0000011 0.0000089 0.000028 0.000021 2000 12 6 51884 -0.081790 0.345579 0.1122283 0.0012436 0.000075 -0.000001 0.000089 0.000088 0.0000014 0.0000087 0.000108 0.000077 2000 12 7 51885 -0.082312 0.347252 0.1109197 0.0013393 0.000085 0.000029 0.000094 0.000093 0.0000315 0.0000085 0.000150 0.000195 2000 12 8 51886 -0.082820 0.349203 0.1096010 0.0013215 0.000238 0.000056 0.000095 0.000095 0.0000445 0.0000084 0.000113 0.000127 2000 12 9 51887 -0.083330 0.351145 0.1083518 0.0012314 0.000340 0.000022 0.000097 0.000097 0.0000368 0.0000084 0.000102 0.000110 2000 12 10 51888 -0.083738 0.352870 0.1071854 0.0011097 0.000417 -0.000023 0.000109 0.000107 0.0000411 0.0000085 0.000091 0.000093 2000 12 11 51889 -0.083732 0.354150 0.1061499 0.0009440 0.000442 -0.000054 0.000118 0.000117 0.0000454 0.0000083 0.000080 0.000076 2000 12 12 51890 -0.083570 0.355655 0.1052885 0.0007741 0.000415 -0.000049 0.000113 0.000114 0.0000425 0.0000082 0.000069 0.000059 2000 12 13 51891 -0.082637 0.357139 0.1045843 0.0006786 0.000306 0.000047 0.000110 0.000111 0.0000102 0.0000080 0.000110 0.000093 2000 12 14 51892 -0.081391 0.359312 0.1039410 0.0006735 0.000277 0.000105 0.000108 0.000108 0.0000013 0.0000077 0.000105 0.000095 2000 12 15 51893 -0.080171 0.361370 0.1032444 0.0007305 0.000212 0.000184 0.000108 0.000109 0.0000091 0.0000075 0.000100 0.000094 2000 12 16 51894 -0.079062 0.363635 0.1024565 0.0008108 0.000125 0.000262 0.000112 0.000114 0.0000169 0.0000075 0.000101 0.000099 2000 12 17 51895 -0.078151 0.365830 0.1015987 0.0009015 0.000056 0.000297 0.000128 0.000130 0.0000121 0.0000077 0.000102 0.000103 2000 12 18 51896 -0.077796 0.368185 0.1006885 0.0009613 0.000030 0.000267 0.000133 0.000135 0.0000073 0.0000079 0.000103 0.000108 2000 12 19 51897 -0.078217 0.369895 0.0997410 0.0009657 0.000060 0.000166 0.000128 0.000128 0.0000024 0.0000079 0.000104 0.000112 2000 12 20 51898 -0.078566 0.371779 0.0987938 0.0009210 0.000177 -0.000016 0.000129 0.000129 0.0000020 0.0000078 0.000107 0.000091 2000 12 21 51899 -0.078727 0.374034 0.0979220 0.0008061 0.000286 -0.000193 0.000131 0.000130 0.0000108 0.0000077 0.000109 0.000088 2000 12 22 51900 -0.078430 0.376478 0.0972020 0.0006711 0.000363 -0.000335 0.000134 0.000134 0.0000258 0.0000080 0.000113 0.000092 2000 12 23 51901 -0.077997 0.379193 0.0966480 0.0005542 0.000394 -0.000422 0.000141 0.000140 0.0000465 0.0000082 0.000115 0.000096 2000 12 24 51902 -0.077551 0.381672 0.0962030 0.0004367 0.000376 -0.000445 0.000149 0.000144 0.0000381 0.0000084 0.000119 0.000099 2000 12 25 51903 -0.077102 0.384316 0.0958166 0.0003317 0.000324 -0.000414 0.000148 0.000144 0.0000297 0.0000088 0.000122 0.000103 2000 12 26 51904 -0.076553 0.386626 0.0954698 0.0002644 0.000262 -0.000348 0.000145 0.000143 0.0000213 0.0000088 0.000125 0.000107 2000 12 27 51905 -0.076262 0.388942 0.0951663 0.0002441 0.000213 -0.000269 0.000144 0.000142 0.0000129 0.0000083 0.000128 0.000111 2000 12 28 51906 -0.076043 0.390932 0.0949008 0.0002589 0.000190 -0.000195 0.000142 0.000140 0.0000046 0.0000078 0.000131 0.000115 2000 12 29 51907 -0.075424 0.392828 0.0946354 0.0003103 0.000198 -0.000139 0.000141 0.000138 0.0000160 0.0000075 0.000127 0.000110 2000 12 30 51908 -0.074842 0.394715 0.0943016 0.0004139 0.000220 -0.000100 0.000146 0.000140 0.0000291 0.0000074 0.000121 0.000103 2000 12 31 51909 -0.074274 0.396467 0.0938387 0.0005602 0.000240 -0.000077 0.000143 0.000142 0.0000225 0.0000072 0.000115 0.000096 2001 1 1 51910 -0.073472 0.398135 0.0932292 0.0006649 0.000240 -0.000066 0.000130 0.000133 0.0000160 0.0000072 0.000109 0.000089 2001 1 2 51911 -0.072640 0.399802 0.0924924 0.0007638 0.000218 -0.000068 0.000124 0.000127 0.0000094 0.0000074 0.000103 0.000082 2001 1 3 51912 -0.071549 0.401814 0.0916637 0.0008557 0.000181 -0.000081 0.000121 0.000121 0.0000029 0.0000077 0.000097 0.000075 2001 1 4 51913 -0.071047 0.403720 0.0907792 0.0009020 0.000145 -0.000109 0.000122 0.000122 0.0000126 0.0000079 0.000096 0.000076 2001 1 5 51914 -0.070716 0.405264 0.0898754 0.0008820 0.000129 -0.000143 0.000127 0.000128 0.0000276 0.0000082 0.000097 0.000080 2001 1 6 51915 -0.070383 0.406694 0.0890198 0.0008021 0.000146 -0.000177 0.000128 0.000128 0.0000372 0.0000082 0.000097 0.000084 2001 1 7 51916 -0.070072 0.408059 0.0882966 0.0006472 0.000193 -0.000200 0.000131 0.000132 0.0000258 0.0000079 0.000097 0.000088 2001 1 8 51917 -0.070203 0.409493 0.0877176 0.0004916 0.000249 -0.000207 0.000130 0.000133 0.0000144 0.0000075 0.000098 0.000092 2001 1 9 51918 -0.070174 0.410820 0.0872401 0.0004382 0.000278 -0.000205 0.000125 0.000127 0.0000029 0.0000074 0.000098 0.000096 2001 1 10 51919 -0.069863 0.412364 0.0868097 0.0004149 0.000296 -0.000196 0.000123 0.000124 0.0000016 0.0000075 0.000096 0.000081 2001 1 11 51920 -0.069294 0.414033 0.0863912 0.0004537 0.000146 -0.000217 0.000123 0.000124 0.0000013 0.0000075 0.000109 0.000099 2001 1 12 51921 -0.068449 0.416159 0.0858993 0.0005918 -0.000061 -0.000310 0.000124 0.000127 0.0000107 0.0000074 0.000113 0.000102 2001 1 13 51922 -0.067456 0.418225 0.0852398 0.0007461 -0.000258 -0.000442 0.000132 0.000136 0.0000201 0.0000078 0.000111 0.000096 2001 1 14 51923 -0.066448 0.420156 0.0843885 0.0008784 -0.000385 -0.000558 0.000130 0.000133 0.0000157 0.0000080 0.000111 0.000090 2001 1 15 51924 -0.065366 0.422039 0.0834209 0.0009395 -0.000386 -0.000600 0.000116 0.000119 0.0000112 0.0000078 0.000110 0.000084 2001 1 16 51925 -0.064000 0.423523 0.0824681 0.0009124 -0.000237 -0.000529 0.000112 0.000115 0.0000067 0.0000078 0.000109 0.000078 2001 1 17 51926 -0.062625 0.425095 0.0816440 0.0007758 0.000032 -0.000352 0.000109 0.000111 0.0000023 0.0000077 0.000108 0.000072 2001 1 18 51927 -0.061464 0.426419 0.0809933 0.0005727 0.000444 -0.000046 0.000106 0.000106 0.0000100 0.0000077 0.000111 0.000086 2001 1 19 51928 -0.060299 0.427982 0.0804913 0.0004021 0.000695 0.000169 0.000110 0.000111 0.0000225 0.0000077 0.000107 0.000089 2001 1 20 51929 -0.059198 0.429305 0.0801274 0.0002551 0.000732 0.000236 0.000118 0.000119 0.0000327 0.0000078 0.000099 0.000083 2001 1 21 51930 -0.058086 0.430408 0.0799407 0.0000798 0.000626 0.000182 0.000118 0.000118 0.0000228 0.0000080 0.000091 0.000077 2001 1 22 51931 -0.056733 0.431217 0.0799247 -0.0000380 0.000444 0.000048 0.000109 0.000108 0.0000129 0.0000081 0.000082 0.000071 2001 1 23 51932 -0.055322 0.432542 0.0800129 -0.0000702 0.000265 -0.000108 0.000107 0.000105 0.0000030 0.0000086 0.000074 0.000065 2001 1 24 51933 -0.054023 0.434316 0.0801043 -0.0000511 0.000217 -0.000180 0.000108 0.000107 0.0000016 0.0000090 0.000097 0.000087 2001 1 25 51934 -0.052217 0.436044 0.0801109 0.0000485 0.000167 -0.000262 0.000107 0.000107 0.0000013 0.0000088 0.000106 0.000091 2001 1 26 51935 -0.050441 0.437996 0.0800062 0.0001770 0.000090 -0.000324 0.000107 0.000105 0.0000272 0.0000084 0.000094 0.000079 2001 1 27 51936 -0.049110 0.439784 0.0797680 0.0002961 0.000015 -0.000351 0.000112 0.000111 0.0000524 0.0000083 0.000078 0.000066 2001 1 28 51937 -0.047525 0.441587 0.0793772 0.0004515 -0.000029 -0.000348 0.000120 0.000119 0.0000355 0.0000083 0.000062 0.000052 2001 1 29 51938 -0.045528 0.443481 0.0788594 0.0005584 -0.000012 -0.000312 0.000120 0.000118 0.0000187 0.0000079 0.000045 0.000038 2001 1 30 51939 -0.043687 0.444913 0.0782764 0.0005977 0.000077 -0.000246 0.000107 0.000108 0.0000018 0.0000079 0.000029 0.000024 2001 1 31 51940 -0.042020 0.446382 0.0777007 0.0005421 0.000272 -0.000153 0.000111 0.000112 0.0000011 0.0000079 0.000092 0.000075 2001 2 1 51941 -0.040691 0.447232 0.0771894 0.0004673 0.000425 -0.000067 0.000121 0.000120 0.0000075 0.0000078 0.000108 0.000087 2001 2 2 51942 -0.039000 0.448056 0.0767753 0.0003683 0.000511 -0.000006 0.000117 0.000116 0.0000190 0.0000077 0.000105 0.000084 2001 2 3 51943 -0.037685 0.448840 0.0764819 0.0002105 0.000522 0.000016 0.000119 0.000118 0.0000370 0.0000077 0.000102 0.000081 2001 2 4 51944 -0.036054 0.449536 0.0763270 0.0000702 0.000468 -0.000002 0.000125 0.000124 0.0000259 0.0000082 0.000099 0.000078 2001 2 5 51945 -0.034031 0.450485 0.0762889 -0.0000011 0.000378 -0.000053 0.000126 0.000128 0.0000147 0.0000085 0.000097 0.000075 2001 2 6 51946 -0.032100 0.451808 0.0762842 0.0000434 0.000289 -0.000116 0.000121 0.000123 0.0000036 0.0000083 0.000094 0.000072 2001 2 7 51947 -0.030369 0.453143 0.0761779 0.0002141 0.000225 -0.000198 0.000119 0.000119 0.0000016 0.0000081 0.000119 0.000093 2001 2 8 51948 -0.028421 0.454715 0.0758341 0.0004657 0.000214 -0.000206 0.000117 0.000117 0.0000012 0.0000079 0.000099 0.000082 2001 2 9 51949 -0.026556 0.456387 0.0751951 0.0007352 0.000189 -0.000199 0.000117 0.000119 0.0000144 0.0000079 0.000090 0.000076 2001 2 10 51950 -0.024722 0.457675 0.0743206 0.0009633 0.000148 -0.000192 0.000128 0.000130 0.0000274 0.0000080 0.000090 0.000076 2001 2 11 51951 -0.023382 0.459171 0.0733052 0.0010824 0.000105 -0.000185 0.000144 0.000145 0.0000190 0.0000081 0.000090 0.000076 2001 2 12 51952 -0.022405 0.459867 0.0721970 0.0011275 0.000073 -0.000178 0.000145 0.000149 0.0000107 0.0000080 0.000091 0.000076 2001 2 13 51953 -0.020845 0.460773 0.0710390 0.0011204 0.000061 -0.000158 0.000133 0.000137 0.0000023 0.0000078 0.000091 0.000076 2001 2 14 51954 -0.019265 0.462082 0.0699199 0.0010201 0.000103 -0.000154 0.000126 0.000130 0.0000015 0.0000077 0.000104 0.000080 2001 2 15 51955 -0.017606 0.463385 0.0689742 0.0008707 0.000131 -0.000034 0.000124 0.000130 0.0000039 0.0000077 0.000163 0.000165 2001 2 16 51956 -0.015935 0.464781 0.0681255 0.0007328 0.000147 0.000079 0.000126 0.000131 0.0000129 0.0000076 0.000183 0.000187 2001 2 17 51957 -0.014018 0.466024 0.0673597 0.0006153 0.000164 0.000151 0.000132 0.000136 0.0000208 0.0000077 0.000181 0.000176 2001 2 18 51958 -0.012285 0.467268 0.0667353 0.0005654 0.000191 0.000168 0.000126 0.000128 0.0000152 0.0000077 0.000180 0.000165 2001 2 19 51959 -0.010511 0.468372 0.0661923 0.0005676 0.000232 0.000128 0.000113 0.000114 0.0000096 0.0000076 0.000179 0.000153 2001 2 20 51960 -0.008296 0.469476 0.0656213 0.0006102 0.000270 0.000053 0.000109 0.000110 0.0000040 0.0000077 0.000178 0.000142 2001 2 21 51961 -0.005512 0.470937 0.0649651 0.0006495 0.000343 -0.000055 0.000109 0.000111 0.0000021 0.0000078 0.000121 0.000097 2001 2 22 51962 -0.002318 0.472197 0.0642684 0.0007252 0.000270 -0.000084 0.000106 0.000108 0.0000011 0.0000079 0.000093 0.000074 2001 2 23 51963 0.001039 0.474119 0.0634734 0.0008643 0.000107 -0.000058 0.000108 0.000110 0.0000097 0.0000081 0.000098 0.000075 2001 2 24 51964 0.004073 0.475879 0.0625094 0.0010232 -0.000084 -0.000011 0.000115 0.000118 0.0000191 0.0000082 0.000112 0.000082 2001 2 25 51965 0.006868 0.477557 0.0613677 0.0011918 -0.000238 0.000019 0.000115 0.000118 0.0000177 0.0000084 0.000127 0.000089 2001 2 26 51966 0.009470 0.478863 0.0600735 0.0013578 -0.000293 -0.000004 0.000108 0.000111 0.0000164 0.0000084 0.000140 0.000096 2001 2 27 51967 0.012011 0.480196 0.0586721 0.0014557 -0.000224 -0.000090 0.000103 0.000107 0.0000134 0.0000086 0.000154 0.000103 2001 2 28 51968 0.014343 0.481211 0.0572139 0.0014576 0.000027 -0.000265 0.000102 0.000106 0.0000043 0.0000089 0.000121 0.000096 2001 3 1 51969 0.016226 0.482317 0.0557613 0.0013799 0.000228 -0.000383 0.000099 0.000104 0.0000118 0.0000088 0.000103 0.000088 2001 3 2 51970 0.017242 0.482825 0.0544303 0.0012362 0.000345 -0.000426 0.000100 0.000104 0.0000215 0.0000084 0.000095 0.000082 2001 3 3 51971 0.018500 0.483352 0.0532772 0.0011056 0.000378 -0.000401 0.000103 0.000106 0.0000180 0.0000082 0.000087 0.000075 2001 3 4 51972 0.020333 0.483910 0.0522394 0.0010075 0.000341 -0.000329 0.000109 0.000110 0.0000126 0.0000083 0.000079 0.000069 2001 3 5 51973 0.022687 0.484671 0.0512777 0.0009344 0.000268 -0.000248 0.000110 0.000112 0.0000073 0.0000084 0.000070 0.000062 2001 3 6 51974 0.024494 0.485404 0.0503440 0.0009578 0.000197 -0.000192 0.000103 0.000105 0.0000019 0.0000082 0.000062 0.000056 2001 3 7 51975 0.026453 0.485540 0.0493423 0.0011173 0.000184 -0.000211 0.000100 0.000101 0.0000014 0.0000080 0.000121 0.000095 2001 3 8 51976 0.028743 0.485675 0.0481255 0.0013205 0.000154 -0.000221 0.000104 0.000103 0.0000013 0.0000080 0.000107 0.000084 2001 3 9 51977 0.031128 0.485598 0.0466939 0.0015275 0.000146 -0.000227 0.000106 0.000104 0.0000085 0.0000079 0.000084 0.000068 2001 3 10 51978 0.033384 0.485457 0.0451293 0.0016333 0.000156 -0.000229 0.000110 0.000108 0.0000157 0.0000079 0.000070 0.000057 2001 3 11 51979 0.035575 0.485617 0.0435097 0.0016401 0.000166 -0.000224 0.000108 0.000105 0.0000107 0.0000080 0.000056 0.000047 2001 3 12 51980 0.038026 0.485670 0.0419177 0.0015395 0.000166 -0.000214 0.000100 0.000100 0.0000058 0.0000078 0.000042 0.000037 2001 3 13 51981 0.040986 0.485851 0.0404506 0.0013387 0.000156 -0.000203 0.000089 0.000090 0.0000009 0.0000078 0.000028 0.000027 2001 3 14 51982 0.043880 0.486198 0.0392174 0.0010917 0.000118 -0.000207 0.000090 0.000089 0.0000012 0.0000076 0.000084 0.000066 2001 3 15 51983 0.046455 0.486616 0.0383017 0.0008282 0.000119 -0.000190 0.000097 0.000095 0.0000113 0.0000075 0.000099 0.000075 2001 3 16 51984 0.048670 0.486688 0.0376010 0.0006412 0.000149 -0.000164 0.000096 0.000095 0.0000201 0.0000076 0.000098 0.000073 2001 3 17 51985 0.051051 0.487249 0.0369914 0.0005325 0.000190 -0.000141 0.000101 0.000098 0.0000125 0.0000075 0.000097 0.000070 2001 3 18 51986 0.053578 0.487501 0.0364868 0.0004545 0.000223 -0.000134 0.000104 0.000100 0.0000090 0.0000075 0.000097 0.000068 2001 3 19 51987 0.056332 0.487927 0.0360629 0.0004238 0.000230 -0.000151 0.000102 0.000098 0.0000055 0.0000076 0.000096 0.000065 2001 3 20 51988 0.059118 0.488602 0.0356496 0.0004596 0.000210 -0.000185 0.000098 0.000094 0.0000020 0.0000076 0.000095 0.000063 2001 3 21 51989 0.061700 0.489097 0.0351654 0.0005434 0.000118 -0.000272 0.000096 0.000092 0.0000019 0.0000078 0.000161 0.000124 2001 3 22 51990 0.064561 0.489235 0.0345710 0.0006455 0.000122 -0.000272 0.000101 0.000096 0.0000013 0.0000078 0.000115 0.000089 2001 3 23 51991 0.067348 0.489619 0.0338844 0.0007452 0.000136 -0.000275 0.000104 0.000100 0.0000083 0.0000077 0.000093 0.000073 2001 3 24 51992 0.070268 0.490170 0.0330955 0.0008443 0.000140 -0.000287 0.000108 0.000103 0.0000153 0.0000078 0.000094 0.000075 2001 3 25 51993 0.073356 0.490646 0.0321738 0.0009687 0.000131 -0.000296 0.000116 0.000108 0.0000110 0.0000080 0.000095 0.000077 2001 3 26 51994 0.076359 0.491037 0.0311327 0.0010798 0.000097 -0.000299 0.000118 0.000108 0.0000066 0.0000078 0.000096 0.000079 2001 3 27 51995 0.079205 0.491296 0.0300312 0.0010954 0.000042 -0.000295 0.000113 0.000105 0.0000023 0.0000077 0.000097 0.000081 2001 3 28 51996 0.081755 0.491313 0.0289474 0.0010336 -0.000021 -0.000264 0.000110 0.000103 0.0000013 0.0000078 0.000101 0.000085 2001 3 29 51997 0.084060 0.491207 0.0279398 0.0009317 -0.000071 -0.000248 0.000110 0.000103 0.0000015 0.0000080 0.000105 0.000092 2001 3 30 51998 0.086315 0.491080 0.0270519 0.0008201 -0.000058 -0.000228 0.000113 0.000106 0.0000048 0.0000083 0.000109 0.000092 2001 3 31 51999 0.088581 0.490434 0.0262799 0.0007103 0.000002 -0.000206 0.000119 0.000112 0.0000080 0.0000084 0.000114 0.000091 2001 4 1 52000 0.090638 0.489890 0.0255821 0.0006471 0.000073 -0.000195 0.000114 0.000109 0.0000061 0.0000084 0.000119 0.000089 2001 4 2 52001 0.092737 0.489289 0.0249092 0.0006564 0.000124 -0.000199 0.000106 0.000103 0.0000043 0.0000083 0.000123 0.000088 2001 4 3 52002 0.094806 0.488997 0.0241941 0.0007449 0.000137 -0.000227 0.000102 0.000099 0.0000024 0.0000081 0.000128 0.000086 2001 4 4 52003 0.096916 0.488394 0.0233503 0.0009312 0.000040 -0.000261 0.000099 0.000097 0.0000017 0.0000084 0.000103 0.000086 2001 4 5 52004 0.099134 0.487461 0.0222918 0.0011549 0.000045 -0.000342 0.000099 0.000097 0.0000013 0.0000085 0.000103 0.000087 2001 4 6 52005 0.101569 0.486809 0.0210325 0.0013462 0.000048 -0.000392 0.000100 0.000099 0.0000036 0.0000084 0.000093 0.000077 2001 4 7 52006 0.104305 0.486579 0.0196181 0.0014775 0.000041 -0.000399 0.000103 0.000101 0.0000058 0.0000084 0.000078 0.000064 2001 4 8 52007 0.106731 0.486478 0.0181285 0.0014593 0.000036 -0.000369 0.000102 0.000099 0.0000041 0.0000083 0.000062 0.000051 2001 4 9 52008 0.108469 0.485905 0.0167115 0.0012858 0.000024 -0.000315 0.000099 0.000097 0.0000024 0.0000079 0.000046 0.000038 2001 4 10 52009 0.110496 0.484949 0.0155032 0.0010632 0.000005 -0.000257 0.000089 0.000090 0.0000007 0.0000079 0.000031 0.000024 2001 4 11 52010 0.112981 0.484061 0.0145570 0.0008208 -0.000009 -0.000222 0.000087 0.000089 0.0000011 0.0000079 0.000073 0.000068 2001 4 12 52011 0.115916 0.483302 0.0138212 0.0006183 -0.000043 -0.000203 0.000094 0.000094 0.0000149 0.0000079 0.000083 0.000077 2001 4 13 52012 0.118630 0.482959 0.0132913 0.0004387 -0.000078 -0.000203 0.000093 0.000093 0.0000281 0.0000079 0.000078 0.000072 2001 4 14 52013 0.120928 0.482197 0.0129429 0.0003128 -0.000096 -0.000219 0.000093 0.000094 0.0000211 0.0000077 0.000072 0.000066 2001 4 15 52014 0.123752 0.481227 0.0126447 0.0003065 -0.000085 -0.000245 0.000092 0.000092 0.0000148 0.0000077 0.000067 0.000060 2001 4 16 52015 0.126567 0.480446 0.0122969 0.0003878 -0.000045 -0.000271 0.000088 0.000089 0.0000084 0.0000076 0.000062 0.000054 2001 4 17 52016 0.129683 0.479426 0.0118367 0.0005398 0.000006 -0.000289 0.000081 0.000084 0.0000021 0.0000075 0.000057 0.000049 2001 4 18 52017 0.132953 0.478718 0.0112257 0.0007086 0.000105 -0.000302 0.000083 0.000087 0.0000013 0.0000075 0.000086 0.000075 2001 4 19 52018 0.136329 0.478227 0.0104306 0.0008589 0.000051 -0.000273 0.000083 0.000086 0.0000012 0.0000076 0.000097 0.000083 2001 4 20 52019 0.139490 0.477809 0.0095287 0.0009571 -0.000028 -0.000242 0.000080 0.000082 0.0000128 0.0000075 0.000097 0.000081 2001 4 21 52020 0.142393 0.477022 0.0085662 0.0010188 -0.000097 -0.000217 0.000085 0.000087 0.0000246 0.0000077 0.000094 0.000080 2001 4 22 52021 0.144997 0.476159 0.0075558 0.0010286 -0.000147 -0.000200 0.000090 0.000092 0.0000200 0.0000080 0.000092 0.000079 2001 4 23 52022 0.147402 0.475449 0.0065669 0.0009523 -0.000160 -0.000189 0.000088 0.000090 0.0000155 0.0000078 0.000090 0.000077 2001 4 24 52023 0.149377 0.474815 0.0056642 0.0008686 -0.000137 -0.000184 0.000083 0.000085 0.0000103 0.0000076 0.000088 0.000076 2001 4 25 52024 0.151128 0.473810 0.0048439 0.0008230 -0.000092 -0.000177 0.000081 0.000083 0.0000030 0.0000075 0.000086 0.000075 2001 4 26 52025 0.153560 0.472384 0.0040552 0.0007335 -0.000051 -0.000167 0.000083 0.000085 0.0000139 0.0000076 0.000086 0.000075 2001 4 27 52026 0.155834 0.471225 0.0033755 0.0006107 -0.000027 -0.000158 0.000085 0.000088 0.0000265 0.0000076 0.000086 0.000075 2001 4 28 52027 0.157896 0.469639 0.0028310 0.0005411 -0.000022 -0.000156 0.000087 0.000089 0.0000224 0.0000079 0.000087 0.000076 2001 4 29 52028 0.159668 0.468194 0.0022593 0.0005824 -0.000030 -0.000165 0.000093 0.000095 0.0000216 0.0000081 0.000088 0.000076 2001 4 30 52029 0.161471 0.466416 0.0015600 0.0007495 -0.000036 -0.000187 0.000095 0.000099 0.0000208 0.0000079 0.000088 0.000077 2001 5 1 52030 0.163387 0.464499 0.0006996 0.0009410 -0.000031 -0.000215 0.000094 0.000097 0.0000183 0.0000077 0.000089 0.000078 2001 5 2 52031 0.165151 0.462674 -0.0003380 0.0011330 -0.000014 -0.000236 0.000090 0.000093 0.0000049 0.0000075 0.000090 0.000078 2001 5 3 52032 0.167198 0.461366 -0.0015879 0.0013264 0.000031 -0.000261 0.000086 0.000089 0.0000013 0.0000075 0.000099 0.000086 2001 5 4 52033 0.169542 0.460287 -0.0030443 0.0014907 0.000026 -0.000231 0.000089 0.000092 0.0000119 0.0000075 0.000109 0.000095 2001 5 5 52034 0.171764 0.458630 -0.0046085 0.0015628 -0.000027 -0.000173 0.000091 0.000094 0.0000223 0.0000075 0.000119 0.000103 2001 5 6 52035 0.173684 0.456706 -0.0061385 0.0014685 -0.000103 -0.000126 0.000087 0.000089 0.0000161 0.0000076 0.000128 0.000112 2001 5 7 52036 0.175734 0.454575 -0.0075314 0.0012751 -0.000177 -0.000117 0.000082 0.000084 0.0000098 0.0000076 0.000138 0.000121 2001 5 8 52037 0.178453 0.452336 -0.0087369 0.0010780 -0.000221 -0.000153 0.000080 0.000082 0.0000036 0.0000077 0.000147 0.000130 2001 5 9 52038 0.181193 0.450185 -0.0097410 0.0008775 -0.000194 -0.000316 0.000080 0.000083 0.0000015 0.0000079 0.000094 0.000088 2001 5 10 52039 0.183890 0.448016 -0.0105414 0.0006976 -0.000151 -0.000317 0.000078 0.000081 0.0000008 0.0000079 0.000047 0.000040 2001 5 11 52040 0.186504 0.445842 -0.0111895 0.0005970 -0.000094 -0.000298 0.000077 0.000081 0.0000084 0.0000077 0.000046 0.000036 2001 5 12 52041 0.189208 0.444164 -0.0117577 0.0005704 -0.000036 -0.000286 0.000081 0.000086 0.0000161 0.0000075 0.000058 0.000046 2001 5 13 52042 0.191399 0.442664 -0.0123193 0.0005950 0.000007 -0.000282 0.000084 0.000089 0.0000115 0.0000073 0.000070 0.000056 2001 5 14 52043 0.193311 0.440929 -0.0129501 0.0006851 0.000026 -0.000300 0.000084 0.000088 0.0000069 0.0000071 0.000083 0.000067 2001 5 15 52044 0.194963 0.438771 -0.0136995 0.0008137 0.000012 -0.000331 0.000080 0.000085 0.0000023 0.0000072 0.000095 0.000077 2001 5 16 52045 0.196814 0.436454 -0.0145740 0.0009352 -0.000025 -0.000381 0.000080 0.000083 0.0000015 0.0000072 0.000096 0.000087 2001 5 17 52046 0.198640 0.433772 -0.0155394 0.0010422 -0.000109 -0.000378 0.000080 0.000083 0.0000012 0.0000072 0.000087 0.000079 2001 5 18 52047 0.200838 0.430864 -0.0165998 0.0011300 -0.000203 -0.000298 0.000080 0.000083 0.0000037 0.0000073 0.000114 0.000104 2001 5 19 52048 0.203241 0.428105 -0.0177336 0.0011698 -0.000287 -0.000190 0.000084 0.000087 0.0000063 0.0000073 0.000155 0.000145 2001 5 20 52049 0.205217 0.425340 -0.0188748 0.0011447 -0.000351 -0.000133 0.000090 0.000093 0.0000048 0.0000074 0.000140 0.000128 2001 5 21 52050 0.206953 0.422665 -0.0199547 0.0010457 -0.000359 -0.000121 0.000091 0.000095 0.0000033 0.0000072 0.000119 0.000106 2001 5 22 52051 0.208880 0.420326 -0.0209088 0.0008940 -0.000299 -0.000144 0.000090 0.000093 0.0000019 0.0000075 0.000099 0.000084 2001 5 23 52052 0.210539 0.418228 -0.0216834 0.0006790 -0.000146 -0.000200 0.000088 0.000091 0.0000012 0.0000080 0.000083 0.000074 2001 5 24 52053 0.211954 0.415694 -0.0222446 0.0004741 -0.000006 -0.000194 0.000089 0.000092 0.0000015 0.0000080 0.000091 0.000087 2001 5 25 52054 0.213383 0.413279 -0.0226059 0.0003016 0.000097 -0.000143 0.000090 0.000093 0.0000020 0.0000077 0.000108 0.000106 2001 5 26 52055 0.214689 0.410533 -0.0228334 0.0001929 0.000162 -0.000097 0.000092 0.000094 0.0000020 0.0000077 0.000107 0.000105 2001 5 27 52056 0.215945 0.407510 -0.0230237 0.0001902 0.000170 -0.000068 0.000104 0.000106 0.0000019 0.0000119 0.000106 0.000103 2001 5 28 52057 0.217377 0.404626 -0.0232714 0.0002942 0.000122 -0.000071 0.000114 0.000114 0.0000019 0.0000151 0.000104 0.000101 2001 5 29 52058 0.219080 0.401974 -0.0236390 0.0004512 0.000034 -0.000115 0.000113 0.000114 0.0000018 0.0000144 0.000102 0.000099 2001 5 30 52059 0.221022 0.399338 -0.0241422 0.0005670 -0.000074 -0.000189 0.000110 0.000112 0.0000018 0.0000141 0.000101 0.000097 2001 5 31 52060 0.222906 0.396795 -0.0247516 0.0006291 -0.000182 -0.000289 0.000106 0.000107 0.0000013 0.0000139 0.000106 0.000093 2001 6 1 52061 0.224490 0.394193 -0.0254055 0.0006326 -0.000262 -0.000348 0.000110 0.000110 0.0000012 0.0000138 0.000109 0.000094 2001 6 2 52062 0.225873 0.391492 -0.0260242 0.0005766 -0.000299 -0.000363 0.000115 0.000115 0.0000013 0.0000143 0.000109 0.000097 2001 6 3 52063 0.227348 0.388590 -0.0265243 0.0004092 -0.000290 -0.000350 0.000105 0.000108 0.0000014 0.0000146 0.000108 0.000099 2001 6 4 52064 0.228771 0.385699 -0.0268353 0.0001800 -0.000240 -0.000324 0.000088 0.000092 0.0000015 0.0000135 0.000108 0.000102 2001 6 5 52065 0.230514 0.382722 -0.0269152 -0.0000293 -0.000162 -0.000294 0.000083 0.000087 0.0000016 0.0000130 0.000108 0.000104 2001 6 6 52066 0.232499 0.380078 -0.0267612 -0.0002457 -0.000082 -0.000315 0.000083 0.000087 0.0000014 0.0000132 0.000093 0.000086 2001 6 7 52067 0.234464 0.377418 -0.0264128 -0.0004197 0.000010 -0.000253 0.000081 0.000087 0.0000088 0.0000130 0.000154 0.000125 2001 6 8 52068 0.236522 0.374864 -0.0259404 -0.0005069 0.000065 -0.000169 0.000085 0.000090 0.0000168 0.0000129 0.000171 0.000135 2001 6 9 52069 0.238005 0.372650 -0.0254397 -0.0004989 0.000075 -0.000099 0.000087 0.000092 0.0000165 0.0000134 0.000156 0.000121 2001 6 10 52070 0.239208 0.370215 -0.0250096 -0.0003947 0.000049 -0.000063 0.000086 0.000091 0.0000122 0.0000140 0.000141 0.000108 2001 6 11 52071 0.240208 0.367568 -0.0247035 -0.0002387 0.000000 -0.000082 0.000086 0.000090 0.0000079 0.0000136 0.000126 0.000095 2001 6 12 52072 0.241085 0.364736 -0.0245360 -0.0001139 -0.000060 -0.000152 0.000086 0.000088 0.0000035 0.0000135 0.000111 0.000082 2001 6 13 52073 0.242040 0.361720 -0.0245002 0.0000095 -0.000146 -0.000306 0.000087 0.000090 0.0000020 0.0000137 0.000111 0.000097 2001 6 14 52074 0.243257 0.358583 -0.0245867 0.0000903 -0.000162 -0.000356 0.000086 0.000088 0.0000014 0.0000134 0.000101 0.000095 2001 6 15 52075 0.244879 0.355436 -0.0247272 0.0001328 -0.000261 -0.000383 0.000086 0.000087 0.0000066 0.0000133 0.000092 0.000090 2001 6 16 52076 0.246352 0.352460 -0.0248864 0.0001792 -0.000408 -0.000384 0.000091 0.000093 0.0000124 0.0000140 0.000085 0.000087 2001 6 17 52077 0.247364 0.349696 -0.0250719 0.0002025 -0.000525 -0.000345 0.000097 0.000099 0.0000123 0.0000144 0.000078 0.000084 2001 6 18 52078 0.248272 0.346689 -0.0252635 0.0001654 -0.000553 -0.000271 0.000096 0.000098 0.0000123 0.0000136 0.000070 0.000081 2001 6 19 52079 0.248636 0.343719 -0.0254059 0.0000758 -0.000459 -0.000180 0.000094 0.000095 0.0000107 0.0000132 0.000063 0.000078 2001 6 20 52080 0.248393 0.340881 -0.0254353 -0.0000535 -0.000164 -0.000056 0.000093 0.000093 0.0000035 0.0000137 0.000108 0.000099 2001 6 21 52081 0.248357 0.337827 -0.0253304 -0.0001397 0.000060 -0.000006 0.000094 0.000095 0.0000015 0.0000141 0.000096 0.000082 2001 6 22 52082 0.248525 0.335053 -0.0251612 -0.0001569 0.000193 0.000021 0.000095 0.000097 0.0000095 0.0000140 0.000095 0.000078 2001 6 23 52083 0.248737 0.332004 -0.0249983 -0.0001679 0.000215 0.000022 0.000097 0.000097 0.0000171 0.0000142 0.000104 0.000084 2001 6 24 52084 0.249023 0.328938 -0.0248961 -0.0000950 0.000140 0.000000 0.000109 0.000107 0.0000123 0.0000145 0.000113 0.000090 2001 6 25 52085 0.249569 0.325933 -0.0249276 0.0000901 0.000018 -0.000033 0.000115 0.000114 0.0000074 0.0000139 0.000122 0.000095 2001 6 26 52086 0.250536 0.322761 -0.0251603 0.0003337 -0.000085 -0.000057 0.000110 0.000109 0.0000026 0.0000134 0.000132 0.000101 2001 6 27 52087 0.251345 0.319894 -0.0256147 0.0005438 -0.000147 -0.000116 0.000112 0.000111 0.0000016 0.0000137 0.000127 0.000103 2001 6 28 52088 0.252048 0.317043 -0.0262343 0.0006020 -0.000043 -0.000043 0.000114 0.000112 0.0000014 0.0000137 0.000116 0.000103 2001 6 29 52089 0.252444 0.314122 -0.0268459 0.0005493 0.000079 0.000011 0.000110 0.000110 0.0000106 0.0000135 0.000111 0.000099 2001 6 30 52090 0.253016 0.310800 -0.0273298 0.0004255 0.000162 0.000018 0.000113 0.000112 0.0000195 0.0000139 0.000110 0.000094 2001 7 1 52091 0.253834 0.307795 -0.0276560 0.0002142 0.000179 -0.000009 0.000110 0.000110 0.0000139 0.0000141 0.000108 0.000090 2001 7 2 52092 0.254061 0.304527 -0.0278067 0.0000462 0.000117 -0.000061 0.000098 0.000098 0.0000084 0.0000131 0.000107 0.000085 2001 7 3 52093 0.253811 0.301314 -0.0277772 -0.0001089 0.000002 -0.000120 0.000091 0.000092 0.0000028 0.0000124 0.000105 0.000080 2001 7 4 52094 0.254233 0.298281 -0.0275909 -0.0002496 -0.000154 -0.000169 0.000089 0.000090 0.0000024 0.0000124 0.000116 0.000084 2001 7 5 52095 0.254350 0.295710 -0.0273144 -0.0003114 -0.000214 -0.000178 0.000090 0.000091 0.0000019 0.0000125 0.000085 0.000061 2001 7 6 52096 0.253849 0.292989 -0.0270114 -0.0002997 -0.000177 -0.000173 0.000088 0.000090 0.0000007 0.0000129 0.000036 0.000027 2001 7 7 52097 0.253566 0.290214 -0.0267265 -0.0002802 -0.000093 -0.000207 0.000089 0.000090 0.0000006 0.0000134 0.000045 0.000034 2001 7 8 52098 0.252752 0.287507 -0.0264982 -0.0002051 -0.000007 -0.000247 0.000099 0.000100 0.0000007 0.0000149 0.000058 0.000045 2001 7 9 52099 0.251678 0.284275 -0.0263527 -0.0000874 0.000028 -0.000275 0.000101 0.000103 0.0000008 0.0000155 0.000072 0.000056 2001 7 10 52100 0.251747 0.280907 -0.0262930 -0.0000186 -0.000015 -0.000277 0.000096 0.000099 0.0000009 0.0000148 0.000086 0.000067 2001 7 11 52101 0.251939 0.277755 -0.0263001 0.0000240 -0.000154 -0.000197 0.000094 0.000096 0.0000015 0.0000148 0.000101 0.000082 2001 7 12 52102 0.251525 0.274882 -0.0263407 0.0000690 -0.000311 -0.000176 0.000095 0.000097 0.0000014 0.0000150 0.000116 0.000098 2001 7 13 52103 0.250911 0.271800 -0.0264405 0.0001362 -0.000373 -0.000148 0.000099 0.000100 0.0000132 0.0000160 0.000141 0.000114 2001 7 14 52104 0.250414 0.269000 -0.0265789 0.0001329 -0.000340 -0.000117 0.000104 0.000104 0.0000247 0.0000175 0.000169 0.000129 2001 7 15 52105 0.249451 0.265840 -0.0266828 0.0000928 -0.000249 -0.000098 0.000107 0.000106 0.0000181 0.0000174 0.000197 0.000143 2001 7 16 52106 0.248484 0.262485 -0.0267027 -0.0000157 -0.000151 -0.000088 0.000104 0.000103 0.0000115 0.0000161 0.000225 0.000158 2001 7 17 52107 0.248006 0.259224 -0.0266086 -0.0001454 -0.000094 -0.000076 0.000099 0.000098 0.0000049 0.0000157 0.000253 0.000173 2001 7 18 52108 0.248016 0.256042 -0.0263789 -0.0002958 -0.000114 -0.000088 0.000095 0.000094 0.0000019 0.0000157 0.000155 0.000113 2001 7 19 52109 0.247896 0.252930 -0.0259954 -0.0004325 -0.000218 -0.000016 0.000095 0.000094 0.0000013 0.0000157 0.000107 0.000085 2001 7 20 52110 0.247645 0.249814 -0.0255058 -0.0005025 -0.000239 0.000089 0.000103 0.000101 0.0000077 0.0000163 0.000105 0.000082 2001 7 21 52111 0.247117 0.246698 -0.0250034 -0.0004789 -0.000182 0.000182 0.000108 0.000106 0.0000141 0.0000172 0.000109 0.000083 2001 7 22 52112 0.246295 0.243673 -0.0245996 -0.0003021 -0.000094 0.000231 0.000111 0.000106 0.0000109 0.0000173 0.000114 0.000084 2001 7 23 52113 0.245274 0.240799 -0.0243960 -0.0000831 -0.000028 0.000209 0.000114 0.000108 0.0000077 0.0000163 0.000119 0.000086 2001 7 24 52114 0.244285 0.238098 -0.0244250 0.0001216 -0.000026 0.000118 0.000111 0.000105 0.0000044 0.0000156 0.000123 0.000087 2001 7 25 52115 0.243610 0.235504 -0.0246234 0.0002297 -0.000129 -0.000064 0.000112 0.000106 0.0000022 0.0000156 0.000129 0.000093 2001 7 26 52116 0.243044 0.232808 -0.0248561 0.0001998 -0.000291 -0.000158 0.000114 0.000107 0.0000014 0.0000157 0.000132 0.000099 2001 7 27 52117 0.242013 0.230003 -0.0250309 0.0001050 -0.000343 -0.000184 0.000116 0.000111 0.0000091 0.0000156 0.000131 0.000098 2001 7 28 52118 0.240697 0.226975 -0.0250667 -0.0000571 -0.000281 -0.000152 0.000120 0.000114 0.0000186 0.0000164 0.000127 0.000095 2001 7 29 52119 0.239050 0.223953 -0.0249002 -0.0002630 -0.000153 -0.000083 0.000119 0.000113 0.0000235 0.0000171 0.000124 0.000093 2001 7 30 52120 0.237314 0.220886 -0.0245264 -0.0004852 -0.000022 -0.000019 0.000119 0.000116 0.0000284 0.0000167 0.000121 0.000090 2001 7 31 52121 0.235853 0.218016 -0.0239815 -0.0006359 0.000046 0.000014 0.000115 0.000112 0.0000279 0.0000159 0.000117 0.000087 2001 8 1 52122 0.234801 0.215835 -0.0233181 -0.0007004 0.000019 0.000010 0.000106 0.000103 0.0000068 0.0000155 0.000114 0.000084 2001 8 2 52123 0.233317 0.213639 -0.0225990 -0.0007039 -0.000180 -0.000061 0.000103 0.000099 0.0000012 0.0000152 0.000098 0.000085 2001 8 3 52124 0.231048 0.211575 -0.0219266 -0.0006402 -0.000295 -0.000059 0.000107 0.000104 0.0000140 0.0000153 0.000099 0.000085 2001 8 4 52125 0.228176 0.208826 -0.0213757 -0.0005124 -0.000307 0.000011 0.000115 0.000113 0.0000263 0.0000167 0.000108 0.000086 2001 8 5 52126 0.225874 0.205902 -0.0209712 -0.0003292 -0.000254 0.000098 0.000115 0.000113 0.0000183 0.0000175 0.000116 0.000087 2001 8 6 52127 0.223892 0.203346 -0.0207172 -0.0002103 -0.000180 0.000156 0.000111 0.000109 0.0000104 0.0000165 0.000125 0.000088 2001 8 7 52128 0.221827 0.200917 -0.0206107 -0.0000604 -0.000131 0.000147 0.000106 0.000105 0.0000025 0.0000156 0.000133 0.000088 2001 8 8 52129 0.219709 0.198726 -0.0206493 0.0000916 -0.000225 0.000032 0.000103 0.000102 0.0000018 0.0000155 0.000124 0.000095 2001 8 9 52130 0.217156 0.196664 -0.0208268 0.0002065 -0.000238 -0.000121 0.000104 0.000102 0.0000015 0.0000156 0.000117 0.000097 2001 8 10 52131 0.214336 0.194212 -0.0211253 0.0002814 -0.000234 -0.000178 0.000105 0.000104 0.0000060 0.0000157 0.000124 0.000099 2001 8 11 52132 0.211293 0.191712 -0.0214949 0.0003679 -0.000215 -0.000142 0.000108 0.000107 0.0000104 0.0000162 0.000136 0.000102 2001 8 12 52133 0.208447 0.188943 -0.0218653 0.0003555 -0.000171 -0.000056 0.000109 0.000109 0.0000077 0.0000168 0.000148 0.000104 2001 8 13 52134 0.206079 0.186354 -0.0221732 0.0002629 -0.000116 0.000029 0.000106 0.000104 0.0000050 0.0000164 0.000160 0.000107 2001 8 14 52135 0.203685 0.183855 -0.0223773 0.0001508 -0.000065 0.000077 0.000104 0.000103 0.0000023 0.0000157 0.000171 0.000110 2001 8 15 52136 0.201265 0.181348 -0.0224717 0.0000490 -0.000032 0.000013 0.000105 0.000106 0.0000013 0.0000157 0.000110 0.000076 2001 8 16 52137 0.198479 0.179250 -0.0224950 0.0000152 -0.000033 -0.000019 0.000105 0.000104 0.0000012 0.0000159 0.000091 0.000084 2001 8 17 52138 0.196032 0.176961 -0.0225412 0.0001012 -0.000049 0.000038 0.000102 0.000103 0.0000087 0.0000162 0.000092 0.000090 2001 8 18 52139 0.193459 0.174798 -0.0227244 0.0002967 -0.000079 0.000153 0.000105 0.000106 0.0000160 0.0000170 0.000092 0.000089 2001 8 19 52140 0.191018 0.172470 -0.0231328 0.0005239 -0.000124 0.000274 0.000106 0.000106 0.0000114 0.0000168 0.000092 0.000088 2001 8 20 52141 0.188848 0.170484 -0.0237964 0.0007596 -0.000176 0.000343 0.000101 0.000103 0.0000068 0.0000152 0.000092 0.000087 2001 8 21 52142 0.186480 0.168342 -0.0246685 0.0009217 -0.000220 0.000313 0.000097 0.000099 0.0000022 0.0000144 0.000092 0.000087 2001 8 22 52143 0.183961 0.166036 -0.0256387 0.0009532 -0.000287 0.000156 0.000094 0.000096 0.0000015 0.0000142 0.000099 0.000074 2001 8 23 52144 0.181220 0.164115 -0.0265697 0.0008501 -0.000242 -0.000081 0.000093 0.000095 0.0000012 0.0000143 0.000102 0.000074 2001 8 24 52145 0.178722 0.162275 -0.0273449 0.0006634 -0.000180 -0.000221 0.000100 0.000102 0.0000072 0.0000148 0.000103 0.000076 2001 8 25 52146 0.176481 0.160389 -0.0278905 0.0004319 -0.000128 -0.000245 0.000104 0.000106 0.0000131 0.0000158 0.000103 0.000077 2001 8 26 52147 0.174510 0.158231 -0.0281864 0.0001912 -0.000092 -0.000179 0.000104 0.000107 0.0000095 0.0000166 0.000102 0.000077 2001 8 27 52148 0.172437 0.156162 -0.0282618 -0.0000397 -0.000080 -0.000072 0.000103 0.000105 0.0000059 0.0000159 0.000102 0.000077 2001 8 28 52149 0.170543 0.154163 -0.0281740 -0.0001358 -0.000082 0.000026 0.000097 0.000102 0.0000023 0.0000151 0.000101 0.000077 2001 8 29 52150 0.168418 0.152613 -0.0279902 -0.0002017 -0.000114 0.000047 0.000096 0.000100 0.0000012 0.0000151 0.000088 0.000066 2001 8 30 52151 0.166034 0.151100 -0.0277758 -0.0002295 -0.000068 0.000024 0.000096 0.000097 0.0000012 0.0000151 0.000087 0.000086 2001 8 31 52152 0.163347 0.150218 -0.0276012 -0.0000996 -0.000019 0.000079 0.000099 0.000101 0.0000203 0.0000152 0.000092 0.000093 2001 9 1 52153 0.160259 0.149256 -0.0275293 0.0000033 0.000013 0.000186 0.000106 0.000109 0.0000391 0.0000160 0.000097 0.000090 2001 9 2 52154 0.157147 0.147985 -0.0275981 0.0001229 0.000022 0.000291 0.000109 0.000109 0.0000302 0.0000182 0.000102 0.000087 2001 9 3 52155 0.153924 0.146417 -0.0278196 0.0002999 0.000001 0.000348 0.000102 0.000102 0.0000214 0.0000190 0.000106 0.000084 2001 9 4 52156 0.150889 0.144947 -0.0281874 0.0004132 -0.000046 0.000339 0.000096 0.000096 0.0000126 0.0000182 0.000111 0.000081 2001 9 5 52157 0.147653 0.143026 -0.0286766 0.0005032 -0.000138 0.000098 0.000101 0.000100 0.0000037 0.0000183 0.000104 0.000077 2001 9 6 52158 0.144485 0.140856 -0.0292248 0.0005285 -0.000161 0.000129 0.000102 0.000101 0.0000013 0.0000185 0.000104 0.000080 2001 9 7 52159 0.141897 0.139384 -0.0297286 0.0004439 -0.000211 0.000183 0.000100 0.000099 0.0000093 0.0000188 0.000100 0.000079 2001 9 8 52160 0.139494 0.137871 -0.0301230 0.0003125 -0.000265 0.000216 0.000106 0.000104 0.0000170 0.0000200 0.000095 0.000077 2001 9 9 52161 0.137281 0.136949 -0.0303956 0.0002033 -0.000284 0.000228 0.000107 0.000105 0.0000120 0.0000191 0.000090 0.000074 2001 9 10 52162 0.134827 0.135759 -0.0305436 0.0000943 -0.000253 0.000197 0.000101 0.000099 0.0000070 0.0000165 0.000084 0.000072 2001 9 11 52163 0.132094 0.134637 -0.0305689 -0.0000193 -0.000187 0.000124 0.000094 0.000091 0.0000020 0.0000155 0.000078 0.000070 2001 9 12 52164 0.128860 0.133396 -0.0304953 -0.0000937 -0.000011 -0.000063 0.000091 0.000088 0.0000013 0.0000154 0.000092 0.000085 2001 9 13 52165 0.125805 0.132304 -0.0303944 -0.0000460 -0.000039 -0.000058 0.000091 0.000088 0.0000013 0.0000153 0.000105 0.000099 2001 9 14 52166 0.122496 0.131188 -0.0303802 0.0000781 -0.000130 -0.000135 0.000097 0.000093 0.0000072 0.0000153 0.000107 0.000099 2001 9 15 52167 0.118906 0.130087 -0.0305686 0.0003154 -0.000235 -0.000283 0.000105 0.000100 0.0000139 0.0000165 0.000106 0.000096 2001 9 16 52168 0.115112 0.129255 -0.0310327 0.0006093 -0.000326 -0.000418 0.000102 0.000097 0.0000150 0.0000171 0.000105 0.000093 2001 9 17 52169 0.111714 0.128318 -0.0317729 0.0008865 -0.000360 -0.000473 0.000094 0.000090 0.0000161 0.0000158 0.000103 0.000090 2001 9 18 52170 0.108316 0.127560 -0.0327055 0.0009656 -0.000318 -0.000394 0.000092 0.000088 0.0000148 0.0000149 0.000102 0.000087 2001 9 19 52171 0.104672 0.126692 -0.0336895 0.0009310 -0.000219 -0.000177 0.000093 0.000089 0.0000043 0.0000149 0.000100 0.000083 2001 9 20 52172 0.101278 0.126149 -0.0345837 0.0008237 -0.000058 0.000221 0.000094 0.000091 0.0000010 0.0000152 0.000090 0.000074 2001 9 21 52173 0.097866 0.125544 -0.0353189 0.0006397 0.000017 0.000497 0.000095 0.000092 0.0000078 0.0000154 0.000092 0.000073 2001 9 22 52174 0.094518 0.125037 -0.0358616 0.0004464 0.000004 0.000578 0.000099 0.000096 0.0000144 0.0000164 0.000099 0.000076 2001 9 23 52175 0.091426 0.124370 -0.0362081 0.0002661 -0.000057 0.000482 0.000104 0.000100 0.0000104 0.0000173 0.000106 0.000078 2001 9 24 52176 0.088604 0.123418 -0.0364009 0.0001384 -0.000119 0.000267 0.000103 0.000098 0.0000063 0.0000163 0.000113 0.000081 2001 9 25 52177 0.085524 0.122197 -0.0365033 0.0000660 -0.000140 0.000046 0.000098 0.000094 0.0000022 0.0000154 0.000120 0.000084 2001 9 26 52178 0.082397 0.121052 -0.0365756 0.0000739 -0.000068 -0.000198 0.000095 0.000092 0.0000014 0.0000152 0.000106 0.000093 2001 9 27 52179 0.078953 0.120069 -0.0366650 0.0001454 0.000038 -0.000005 0.000093 0.000091 0.0000012 0.0000150 0.000092 0.000091 2001 9 28 52180 0.075419 0.119168 -0.0368625 0.0002385 0.000076 0.000153 0.000094 0.000092 0.0000132 0.0000151 0.000091 0.000090 2001 9 29 52181 0.071828 0.118722 -0.0372010 0.0003923 0.000048 0.000204 0.000099 0.000096 0.0000247 0.0000161 0.000095 0.000091 2001 9 30 52182 0.068678 0.118291 -0.0376664 0.0005386 -0.000017 0.000169 0.000099 0.000095 0.0000172 0.0000170 0.000098 0.000092 2001 10 1 52183 0.065466 0.117988 -0.0382725 0.0006445 -0.000080 0.000066 0.000096 0.000092 0.0000097 0.0000163 0.000102 0.000093 2001 10 2 52184 0.061731 0.117771 -0.0390266 0.0007839 -0.000107 -0.000048 0.000093 0.000090 0.0000022 0.0000155 0.000106 0.000094 2001 10 3 52185 0.057890 0.117698 -0.0398892 0.0008457 -0.000025 -0.000117 0.000089 0.000087 0.0000015 0.0000155 0.000091 0.000075 2001 10 4 52186 0.054879 0.117455 -0.0407656 0.0008887 0.000021 -0.000037 0.000090 0.000088 0.0000013 0.0000153 0.000097 0.000082 2001 10 5 52187 0.052111 0.117572 -0.0416605 0.0008625 0.000057 0.000030 0.000094 0.000091 0.0000082 0.0000155 0.000101 0.000088 2001 10 6 52188 0.049035 0.117841 -0.0425240 0.0007589 0.000076 0.000065 0.000097 0.000095 0.0000162 0.0000166 0.000102 0.000089 2001 10 7 52189 0.046033 0.117927 -0.0432525 0.0006211 0.000066 0.000079 0.000102 0.000099 0.0000179 0.0000164 0.000103 0.000090 2001 10 8 52190 0.043128 0.117898 -0.0438250 0.0005234 0.000034 0.000083 0.000100 0.000097 0.0000196 0.0000147 0.000103 0.000091 2001 10 9 52191 0.039795 0.117854 -0.0443045 0.0004966 -0.000006 0.000102 0.000096 0.000094 0.0000182 0.0000140 0.000104 0.000092 2001 10 10 52192 0.036197 0.117732 -0.0447908 0.0005402 -0.000033 0.000157 0.000093 0.000092 0.0000050 0.0000139 0.000104 0.000093 2001 10 11 52193 0.031825 0.117402 -0.0453627 0.0006269 -0.000044 0.000275 0.000097 0.000096 0.0000059 0.0000141 0.000161 0.000190 2001 10 12 52194 0.027487 0.117390 -0.0460476 0.0007838 -0.000008 0.000374 0.000099 0.000099 0.0000139 0.0000144 0.000171 0.000210 2001 10 13 52195 0.023081 0.117712 -0.0469156 0.0010355 0.000057 0.000422 0.000098 0.000099 0.0000199 0.0000148 0.000156 0.000184 2001 10 14 52196 0.019372 0.117802 -0.0480558 0.0013298 0.000118 0.000407 0.000102 0.000103 0.0000147 0.0000152 0.000140 0.000159 2001 10 15 52197 0.015939 0.118462 -0.0494723 0.0015156 0.000147 0.000331 0.000101 0.000102 0.0000096 0.0000145 0.000125 0.000134 2001 10 16 52198 0.012811 0.119026 -0.0510673 0.0016193 0.000133 0.000220 0.000094 0.000097 0.0000044 0.0000138 0.000109 0.000108 2001 10 17 52199 0.009803 0.119625 -0.0526781 0.0015541 0.000045 0.000102 0.000091 0.000094 0.0000020 0.0000136 0.000102 0.000094 2001 10 18 52200 0.006733 0.119989 -0.0541469 0.0013757 -0.000010 -0.000018 0.000094 0.000097 0.0000019 0.0000135 0.000111 0.000107 2001 10 19 52201 0.003128 0.120603 -0.0553710 0.0010733 -0.000038 0.000053 0.000097 0.000100 0.0000020 0.0000139 0.000145 0.000140 2001 10 20 52202 -0.000622 0.121137 -0.0563133 0.0007907 -0.000020 0.000096 0.000098 0.000101 0.0000018 0.0000161 0.000146 0.000136 2001 10 21 52203 -0.004527 0.122021 -0.0570176 0.0006478 0.000035 0.000085 0.000100 0.000101 0.0000016 0.0000169 0.000129 0.000114 2001 10 22 52204 -0.008592 0.122880 -0.0575798 0.0005723 0.000098 0.000055 0.000099 0.000101 0.0000014 0.0000150 0.000112 0.000093 2001 10 23 52205 -0.012669 0.123823 -0.0580919 0.0005321 0.000146 0.000028 0.000092 0.000094 0.0000012 0.0000138 0.000096 0.000072 2001 10 24 52206 -0.016508 0.124749 -0.0586094 0.0005597 0.000140 0.000033 0.000088 0.000089 0.0000016 0.0000132 0.000090 0.000081 2001 10 25 52207 -0.020098 0.125860 -0.0591522 0.0006195 0.000135 0.000116 0.000093 0.000093 0.0000022 0.0000133 0.000103 0.000094 2001 10 26 52208 -0.023537 0.126981 -0.0598020 0.0007520 0.000138 0.000187 0.000098 0.000099 0.0000050 0.0000137 0.000096 0.000087 2001 10 27 52209 -0.026958 0.128294 -0.0606217 0.0009216 0.000145 0.000216 0.000101 0.000102 0.0000074 0.0000145 0.000081 0.000072 2001 10 28 52210 -0.030385 0.129206 -0.0615994 0.0010467 0.000151 0.000200 0.000110 0.000112 0.0000052 0.0000155 0.000065 0.000058 2001 10 29 52211 -0.033395 0.130444 -0.0626788 0.0010989 0.000146 0.000136 0.000110 0.000113 0.0000030 0.0000149 0.000050 0.000044 2001 10 30 52212 -0.036444 0.131489 -0.0637948 0.0011004 0.000122 0.000050 0.000097 0.000099 0.0000007 0.0000139 0.000034 0.000030 2001 10 31 52213 -0.039652 0.132666 -0.0649009 0.0011090 0.000077 -0.000047 0.000094 0.000097 0.0000012 0.0000137 0.000112 0.000086 2001 11 1 52214 -0.042968 0.133836 -0.0659691 0.0010220 0.000013 -0.000063 0.000098 0.000100 0.0000023 0.0000140 0.000133 0.000124 2001 11 2 52215 -0.046548 0.134950 -0.0669078 0.0008577 -0.000027 -0.000027 0.000100 0.000103 0.0000146 0.0000139 0.000127 0.000124 2001 11 3 52216 -0.050396 0.135991 -0.0676791 0.0006738 -0.000033 0.000036 0.000105 0.000109 0.0000260 0.0000142 0.000119 0.000113 2001 11 4 52217 -0.053965 0.136987 -0.0683177 0.0005557 -0.000002 0.000106 0.000107 0.000112 0.0000184 0.0000149 0.000111 0.000101 2001 11 5 52218 -0.056880 0.138019 -0.0688588 0.0005231 0.000053 0.000158 0.000101 0.000105 0.0000107 0.0000144 0.000102 0.000090 2001 11 6 52219 -0.059332 0.139363 -0.0693396 0.0004792 0.000113 0.000188 0.000095 0.000100 0.0000030 0.0000139 0.000094 0.000078 2001 11 7 52220 -0.061652 0.141087 -0.0698201 0.0005239 0.000198 0.000136 0.000095 0.000099 0.0000016 0.0000137 0.000094 0.000086 2001 11 8 52221 -0.063578 0.142891 -0.0703972 0.0006891 0.000164 0.000213 0.000098 0.000101 0.0000019 0.0000137 0.000098 0.000085 2001 11 9 52222 -0.065416 0.145172 -0.0712258 0.0009823 0.000156 0.000269 0.000099 0.000102 0.0000061 0.0000139 0.000107 0.000105 2001 11 10 52223 -0.067837 0.147673 -0.0723412 0.0012731 0.000177 0.000284 0.000099 0.000103 0.0000103 0.0000142 0.000117 0.000134 2001 11 11 52224 -0.069892 0.150053 -0.0736769 0.0014686 0.000197 0.000278 0.000105 0.000108 0.0000086 0.0000148 0.000128 0.000163 2001 11 12 52225 -0.071450 0.152673 -0.0751842 0.0015793 0.000199 0.000249 0.000105 0.000106 0.0000070 0.0000145 0.000139 0.000192 2001 11 13 52226 -0.073301 0.155260 -0.0767913 0.0015800 0.000176 0.000204 0.000102 0.000103 0.0000054 0.0000141 0.000149 0.000221 2001 11 14 52227 -0.075366 0.157383 -0.0783576 0.0014427 0.000054 0.000183 0.000103 0.000105 0.0000022 0.0000143 0.000109 0.000118 2001 11 15 52228 -0.077892 0.159246 -0.0796819 0.0011734 0.000047 0.000102 0.000102 0.000104 0.0000013 0.0000146 0.000099 0.000095 2001 11 16 52229 -0.080503 0.160864 -0.0807193 0.0009091 0.000049 0.000011 0.000100 0.000102 0.0000056 0.0000145 0.000097 0.000094 2001 11 17 52230 -0.082602 0.162794 -0.0815281 0.0007330 0.000053 -0.000068 0.000103 0.000105 0.0000102 0.0000148 0.000094 0.000090 2001 11 18 52231 -0.084522 0.164626 -0.0821837 0.0005985 0.000068 -0.000118 0.000103 0.000104 0.0000100 0.0000148 0.000091 0.000086 2001 11 19 52232 -0.086584 0.166572 -0.0827590 0.0005722 0.000089 -0.000127 0.000097 0.000098 0.0000098 0.0000139 0.000087 0.000082 2001 11 20 52233 -0.088950 0.168693 -0.0833071 0.0005604 0.000109 -0.000082 0.000094 0.000094 0.0000085 0.0000133 0.000084 0.000078 2001 11 21 52234 -0.091580 0.170729 -0.0838685 0.0005842 0.000120 0.000014 0.000093 0.000093 0.0000028 0.0000134 0.000080 0.000074 2001 11 22 52235 -0.094500 0.173100 -0.0844812 0.0006852 0.000114 0.000152 0.000094 0.000094 0.0000060 0.0000136 0.000102 0.000098 2001 11 23 52236 -0.097326 0.175793 -0.0851777 0.0007788 0.000090 0.000297 0.000095 0.000096 0.0000122 0.0000137 0.000133 0.000131 2001 11 24 52237 -0.100631 0.178302 -0.0859758 0.0008102 0.000056 0.000413 0.000101 0.000101 0.0000185 0.0000145 0.000163 0.000164 2001 11 25 52238 -0.103592 0.180703 -0.0868707 0.0009305 0.000021 0.000466 0.000108 0.000109 0.0000247 0.0000165 0.000194 0.000198 2001 11 26 52239 -0.106051 0.183342 -0.0878352 0.0009925 -0.000001 0.000436 0.000108 0.000108 0.0000309 0.0000168 0.000225 0.000231 2001 11 27 52240 -0.108081 0.185690 -0.0888267 0.0009875 -0.000006 0.000332 0.000104 0.000105 0.0000309 0.0000157 0.000255 0.000264 2001 11 28 52241 -0.110203 0.188125 -0.0897933 0.0009232 0.000061 0.000151 0.000105 0.000106 0.0000075 0.0000157 0.000146 0.000133 2001 11 29 52242 -0.112536 0.190415 -0.0906840 0.0008337 0.000031 0.000013 0.000101 0.000102 0.0000012 0.0000155 0.000101 0.000088 2001 11 30 52243 -0.115305 0.192976 -0.0914723 0.0007138 -0.000011 -0.000068 0.000100 0.000102 0.0000042 0.0000153 0.000084 0.000075 2001 12 1 52244 -0.118397 0.195674 -0.0921082 0.0005281 -0.000032 -0.000084 0.000106 0.000109 0.0000089 0.0000156 0.000070 0.000062 2001 12 2 52245 -0.121709 0.198233 -0.0925533 0.0003586 -0.000016 -0.000050 0.000115 0.000118 0.0000149 0.0000155 0.000055 0.000048 2001 12 3 52246 -0.124542 0.200399 -0.0928484 0.0002698 0.000040 0.000010 0.000117 0.000120 0.0000209 0.0000146 0.000041 0.000035 2001 12 4 52247 -0.127121 0.202612 -0.0930950 0.0002623 0.000113 0.000070 0.000109 0.000112 0.0000222 0.0000142 0.000026 0.000022 2001 12 5 52248 -0.129533 0.205438 -0.0934038 0.0003532 0.000265 0.000056 0.000105 0.000109 0.0000056 0.0000141 0.000087 0.000078 2001 12 6 52249 -0.131756 0.208694 -0.0938502 0.0005532 0.000168 0.000121 0.000108 0.000110 0.0000079 0.0000140 0.000056 0.000047 2001 12 7 52250 -0.134515 0.211897 -0.0944816 0.0007622 0.000021 0.000122 0.000109 0.000111 0.0000161 0.0000140 0.000049 0.000052 2001 12 8 52251 -0.137740 0.214596 -0.0953267 0.0009392 -0.000117 0.000071 0.000115 0.000119 0.0000207 0.0000146 0.000066 0.000083 2001 12 9 52252 -0.141044 0.217092 -0.0963789 0.0011388 -0.000222 0.000017 0.000126 0.000130 0.0000162 0.0000143 0.000082 0.000114 2001 12 10 52253 -0.143827 0.219813 -0.0975574 0.0012285 -0.000255 -0.000006 0.000128 0.000133 0.0000116 0.0000128 0.000098 0.000145 2001 12 11 52254 -0.146743 0.222759 -0.0987388 0.0011456 -0.000208 0.000017 0.000130 0.000135 0.0000071 0.0000125 0.000115 0.000176 2001 12 12 52255 -0.149854 0.225537 -0.0998150 0.0009759 -0.000028 0.000114 0.000132 0.000136 0.0000026 0.0000130 0.000092 0.000101 2001 12 13 52256 -0.152724 0.228099 -0.1007187 0.0008011 0.000079 0.000181 0.000131 0.000134 0.0000017 0.0000131 0.000093 0.000087 2001 12 14 52257 -0.155221 0.230618 -0.1014096 0.0005743 0.000153 0.000179 0.000128 0.000130 0.0000020 0.0000128 0.000102 0.000100 2001 12 15 52258 -0.157769 0.233350 -0.1018854 0.0003825 0.000290 0.000084 0.000131 0.000132 0.0000061 0.0000131 0.000100 0.000096 2001 12 16 52259 -0.159980 0.235937 -0.1022174 0.0003031 0.000417 -0.000055 0.000134 0.000134 0.0000105 0.0000142 0.000097 0.000089 2001 12 17 52260 -0.161947 0.238791 -0.1025217 0.0003301 0.000496 -0.000174 0.000123 0.000125 0.0000150 0.0000141 0.000093 0.000083 2001 12 18 52261 -0.163903 0.241672 -0.1028962 0.0004211 0.000489 -0.000211 0.000118 0.000121 0.0000160 0.0000132 0.000090 0.000077 2001 12 19 52262 -0.165882 0.244990 -0.1033720 0.0005238 0.000380 -0.000132 0.000115 0.000117 0.0000042 0.0000131 0.000087 0.000070 2001 12 20 52263 -0.167901 0.248535 -0.1039474 0.0006754 0.000143 0.000100 0.000112 0.000112 0.0000074 0.0000133 0.000051 0.000040 2001 12 21 52264 -0.169231 0.251942 -0.1047259 0.0009018 -0.000103 0.000339 0.000116 0.000117 0.0000143 0.0000136 0.000042 0.000033 2001 12 22 52265 -0.170321 0.255507 -0.1057642 0.0010725 -0.000302 0.000522 0.000121 0.000123 0.0000157 0.0000141 0.000045 0.000036 2001 12 23 52266 -0.171369 0.259096 -0.1069370 0.0011405 -0.000417 0.000612 0.000126 0.000127 0.0000161 0.0000151 0.000049 0.000040 2001 12 24 52267 -0.172108 0.262658 -0.1081237 0.0011692 -0.000425 0.000592 0.000124 0.000127 0.0000164 0.0000156 0.000053 0.000044 2001 12 25 52268 -0.172615 0.266562 -0.1092672 0.0011805 -0.000332 0.000476 0.000123 0.000125 0.0000168 0.0000154 0.000057 0.000047 2001 12 26 52269 -0.173081 0.270618 -0.1103754 0.0011776 -0.000164 0.000307 0.000122 0.000124 0.0000171 0.0000154 0.000061 0.000051 2001 12 27 52270 -0.173489 0.274802 -0.1114672 0.0011040 0.000037 0.000130 0.000121 0.000123 0.0000151 0.0000153 0.000064 0.000055 2001 12 28 52271 -0.174601 0.278753 -0.1125197 0.0009935 0.000229 -0.000017 0.000119 0.000122 0.0000040 0.0000154 0.000068 0.000059 2001 12 29 52272 -0.175343 0.282477 -0.1134723 0.0008577 0.000372 -0.000108 0.000123 0.000126 0.0000037 0.0000160 0.000075 0.000065 2001 12 30 52273 -0.175938 0.286643 -0.1143000 0.0007965 0.000446 -0.000146 0.000127 0.000129 0.0000071 0.0000163 0.000082 0.000072 2001 12 31 52274 -0.176697 0.290417 -0.1150471 0.0007560 0.000448 -0.000149 0.000125 0.000128 0.0000104 0.0000159 0.000089 0.000079 2002 1 1 52275 -0.177019 0.294133 -0.1158072 0.0008132 0.000398 -0.000099 0.000123 0.000127 0.0000067 0.0000155 0.000096 0.000087 2002 1 2 52276 -0.177493 0.297869 -0.1166748 0.0009396 0.000307 -0.000094 0.000117 0.000122 0.0000067 0.0000148 0.000103 0.000094 2002 1 3 52277 -0.178406 0.301028 -0.1177031 0.0011210 0.000211 -0.000100 0.000113 0.000120 0.0000059 0.0000142 0.000110 0.000101 2002 1 4 52278 -0.179023 0.303802 -0.1189005 0.0012883 0.000136 -0.000107 0.000115 0.000119 0.0000018 0.0000142 0.000117 0.000109 2002 1 5 52279 -0.179599 0.306664 -0.1202295 0.0013099 0.000103 -0.000103 0.000117 0.000119 0.0000008 0.0000152 0.000123 0.000113 2002 1 6 52280 -0.180024 0.309680 -0.1215970 0.0013328 0.000112 -0.000080 0.000116 0.000119 0.0000008 0.0000162 0.000129 0.000117 2002 1 7 52281 -0.180669 0.312889 -0.1228797 0.0012457 0.000153 -0.000039 0.000116 0.000117 0.0000008 0.0000161 0.000135 0.000121 2002 1 8 52282 -0.181633 0.315635 -0.1239699 0.0010026 0.000207 0.000003 0.000114 0.000113 0.0000008 0.0000158 0.000141 0.000125 2002 1 9 52283 -0.182726 0.318394 -0.1248119 0.0007250 0.000254 0.000029 0.000111 0.000110 0.0000046 0.0000160 0.000131 0.000113 2002 1 10 52284 -0.183040 0.321343 -0.1254107 0.0004830 0.000288 0.000022 0.000114 0.000114 0.0000073 0.0000167 0.000117 0.000098 2002 1 11 52285 -0.182927 0.324336 -0.1257974 0.0002958 0.000309 -0.000024 0.000113 0.000112 0.0000021 0.0000176 0.000103 0.000083 2002 1 12 52286 -0.182686 0.327539 -0.1259999 0.0001381 0.000321 -0.000103 0.000117 0.000114 0.0000006 0.0000187 0.000096 0.000077 2002 1 13 52287 -0.182300 0.330632 -0.1260640 0.0000218 0.000324 -0.000186 0.000120 0.000116 0.0000006 0.0000190 0.000093 0.000074 2002 1 14 52288 -0.181591 0.333585 -0.1260581 -0.0000329 0.000316 -0.000243 0.000111 0.000108 0.0000005 0.0000178 0.000089 0.000072 2002 1 15 52289 -0.181275 0.336963 -0.1260582 0.0000224 0.000299 -0.000256 0.000108 0.000106 0.0000004 0.0000171 0.000086 0.000070 2002 1 16 52290 -0.180614 0.339860 -0.1261279 0.0001343 0.000276 -0.000201 0.000107 0.000106 0.0000004 0.0000169 0.000063 0.000056 2002 1 17 52291 -0.179790 0.343105 -0.1263012 0.0002335 0.000253 -0.000124 0.000098 0.000098 0.0000004 0.0000161 0.000037 0.000039 2002 1 18 52292 -0.179307 0.346256 -0.1265887 0.0003559 0.000223 -0.000123 0.000094 0.000094 0.0000005 0.0000156 0.000091 0.000075 2002 1 19 52293 -0.178733 0.349377 -0.1269911 0.0004789 0.000229 -0.000097 0.000104 0.000103 0.0000005 0.0000161 0.000104 0.000084 2002 1 20 52294 -0.178367 0.352411 -0.1274971 0.0005400 0.000260 -0.000057 0.000110 0.000109 0.0000005 0.0000178 0.000093 0.000075 2002 1 21 52295 -0.178117 0.355417 -0.1280803 0.0005926 0.000293 -0.000029 0.000111 0.000111 0.0000004 0.0000180 0.000082 0.000067 2002 1 22 52296 -0.177700 0.358579 -0.1287002 0.0005992 0.000307 -0.000024 0.000108 0.000108 0.0000004 0.0000173 0.000070 0.000058 2002 1 23 52297 -0.177004 0.361977 -0.1293065 0.0005793 0.000291 -0.000049 0.000103 0.000104 0.0000003 0.0000170 0.000059 0.000050 2002 1 24 52298 -0.176513 0.365510 -0.1298491 0.0004962 0.000226 -0.000119 0.000104 0.000105 0.0000004 0.0000166 0.000068 0.000056 2002 1 25 52299 -0.175747 0.368867 -0.1302937 0.0003749 0.000151 -0.000186 0.000105 0.000107 0.0000005 0.0000164 0.000082 0.000067 2002 1 26 52300 -0.174998 0.372303 -0.1306445 0.0002978 0.000120 -0.000184 0.000109 0.000110 0.0000005 0.0000171 0.000088 0.000071 2002 1 27 52301 -0.174297 0.375664 -0.1309593 0.0003341 0.000122 -0.000142 0.000115 0.000115 0.0000005 0.0000183 0.000090 0.000071 2002 1 28 52302 -0.173542 0.378913 -0.1313416 0.0004721 0.000139 -0.000100 0.000116 0.000115 0.0000005 0.0000182 0.000092 0.000072 2002 1 29 52303 -0.172934 0.382283 -0.1319065 0.0007090 0.000160 -0.000085 0.000110 0.000110 0.0000005 0.0000174 0.000094 0.000072 2002 1 30 52304 -0.172178 0.385315 -0.1327355 0.0009849 0.000104 -0.000185 0.000106 0.000107 0.0000006 0.0000172 0.000098 0.000084 2002 1 31 52305 -0.170758 0.388410 -0.1338419 0.0012376 0.000148 -0.000211 0.000108 0.000107 0.0000007 0.0000171 0.000107 0.000086 2002 2 1 52306 -0.168939 0.391717 -0.1351758 0.0014017 0.000226 -0.000186 0.000108 0.000106 0.0000009 0.0000172 0.000116 0.000084 2002 2 2 52307 -0.167455 0.394882 -0.1366424 0.0014945 0.000224 -0.000167 0.000109 0.000108 0.0000009 0.0000175 0.000120 0.000086 2002 2 3 52308 -0.166403 0.398051 -0.1381261 0.0014518 0.000181 -0.000129 0.000110 0.000113 0.0000008 0.0000168 0.000123 0.000089 2002 2 4 52309 -0.165619 0.401055 -0.1395163 0.0012706 0.000151 -0.000060 0.000112 0.000115 0.0000008 0.0000156 0.000125 0.000091 2002 2 5 52310 -0.164337 0.403717 -0.1407272 0.0010851 0.000163 0.000016 0.000114 0.000117 0.0000007 0.0000156 0.000127 0.000094 2002 2 6 52311 -0.163270 0.406582 -0.1417109 0.0008853 0.000324 0.000136 0.000112 0.000113 0.0000064 0.0000159 0.000152 0.000114 2002 2 7 52312 -0.162216 0.409616 -0.1424623 0.0006278 0.000486 0.000190 0.000109 0.000110 0.0000135 0.0000157 0.000182 0.000139 2002 2 8 52313 -0.161186 0.412596 -0.1430193 0.0004966 0.000324 -0.000083 0.000110 0.000109 0.0000036 0.0000155 0.000130 0.000107 2002 2 9 52314 -0.159781 0.415599 -0.1434541 0.0003926 0.000194 -0.000217 0.000113 0.000112 0.0000007 0.0000162 0.000122 0.000100 2002 2 10 52315 -0.157947 0.419041 -0.1438508 0.0003627 0.000117 -0.000197 0.000122 0.000124 0.0000007 0.0000177 0.000138 0.000107 2002 2 11 52316 -0.156018 0.422661 -0.1442825 0.0004632 0.000066 -0.000105 0.000124 0.000127 0.0000007 0.0000181 0.000154 0.000115 2002 2 12 52317 -0.154484 0.425959 -0.1447973 0.0005918 0.000056 -0.000003 0.000117 0.000119 0.0000008 0.0000175 0.000170 0.000123 2002 2 13 52318 -0.153250 0.428985 -0.1454162 0.0006744 0.000043 -0.000043 0.000112 0.000115 0.0000012 0.0000175 0.000128 0.000113 2002 2 14 52319 -0.152543 0.431938 -0.1461409 0.0007762 0.000119 -0.000106 0.000115 0.000118 0.0000010 0.0000177 0.000107 0.000096 2002 2 15 52320 -0.151503 0.434689 -0.1469775 0.0008359 0.000226 -0.000180 0.000119 0.000122 0.0000007 0.0000181 0.000097 0.000079 2002 2 16 52321 -0.150136 0.437250 -0.1479275 0.0009253 0.000274 -0.000239 0.000120 0.000121 0.0000087 0.0000190 0.000092 0.000073 2002 2 17 52322 -0.148507 0.439956 -0.1489609 0.0010492 0.000264 -0.000267 0.000116 0.000117 0.0000199 0.0000189 0.000090 0.000071 2002 2 18 52323 -0.146738 0.442526 -0.1500207 0.0010794 0.000220 -0.000267 0.000106 0.000108 0.0000310 0.0000177 0.000088 0.000069 2002 2 19 52324 -0.145213 0.445426 -0.1510479 0.0010011 0.000174 -0.000251 0.000098 0.000100 0.0000339 0.0000168 0.000086 0.000067 2002 2 20 52325 -0.143754 0.448149 -0.1520061 0.0009052 0.000156 -0.000237 0.000098 0.000101 0.0000060 0.0000167 0.000084 0.000065 2002 2 21 52326 -0.141917 0.451007 -0.1528811 0.0008319 0.000203 -0.000244 0.000100 0.000103 0.0000005 0.0000170 0.000093 0.000080 2002 2 22 52327 -0.140252 0.454173 -0.1536537 0.0007279 0.000270 -0.000265 0.000100 0.000100 0.0000006 0.0000172 0.000106 0.000099 2002 2 23 52328 -0.138418 0.457356 -0.1543281 0.0006434 0.000286 -0.000284 0.000101 0.000101 0.0000006 0.0000179 0.000105 0.000096 2002 2 24 52329 -0.136543 0.460897 -0.1549776 0.0007083 0.000253 -0.000287 0.000106 0.000105 0.0000005 0.0000183 0.000097 0.000086 2002 2 25 52330 -0.134099 0.463887 -0.1557317 0.0008517 0.000189 -0.000267 0.000106 0.000105 0.0000004 0.0000178 0.000090 0.000076 2002 2 26 52331 -0.131047 0.467032 -0.1567118 0.0010805 0.000123 -0.000227 0.000103 0.000102 0.0000003 0.0000174 0.000082 0.000065 2002 2 27 52332 -0.128360 0.470417 -0.1579641 0.0013809 0.000095 -0.000171 0.000107 0.000106 0.0000047 0.0000176 0.000083 0.000067 2002 2 28 52333 -0.125985 0.473628 -0.1594304 0.0015618 0.000104 -0.000128 0.000109 0.000107 0.0000078 0.0000177 0.000086 0.000072 2002 3 1 52334 -0.123413 0.476716 -0.1610171 0.0016438 0.000138 -0.000119 0.000103 0.000100 0.0000022 0.0000177 0.000088 0.000077 2002 3 2 52335 -0.120670 0.479874 -0.1626518 0.0016610 0.000172 -0.000159 0.000105 0.000101 0.0000007 0.0000187 0.000089 0.000076 2002 3 3 52336 -0.118455 0.483083 -0.1642329 0.0015141 0.000188 -0.000217 0.000108 0.000104 0.0000006 0.0000194 0.000088 0.000073 2002 3 4 52337 -0.116623 0.486051 -0.1656411 0.0012585 0.000178 -0.000256 0.000106 0.000102 0.0000005 0.0000181 0.000087 0.000070 2002 3 5 52338 -0.114450 0.489078 -0.1667946 0.0009861 0.000151 -0.000256 0.000103 0.000099 0.0000004 0.0000169 0.000086 0.000066 2002 3 6 52339 -0.111840 0.491932 -0.1676925 0.0008091 0.000092 -0.000175 0.000104 0.000100 0.0000005 0.0000171 0.000080 0.000067 2002 3 7 52340 -0.108720 0.494559 -0.1684173 0.0006557 0.000097 -0.000109 0.000101 0.000099 0.0000003 0.0000174 0.000042 0.000035 2002 3 8 52341 -0.105595 0.497255 -0.1690308 0.0005635 0.000197 -0.000150 0.000099 0.000098 0.0000004 0.0000174 0.000068 0.000059 2002 3 9 52342 -0.102276 0.499887 -0.1695767 0.0005287 0.000272 -0.000203 0.000106 0.000102 0.0000004 0.0000182 0.000076 0.000066 2002 3 10 52343 -0.099216 0.502593 -0.1701177 0.0005629 0.000300 -0.000241 0.000103 0.000098 0.0000003 0.0000190 0.000068 0.000059 2002 3 11 52344 -0.096836 0.505342 -0.1707311 0.0006762 0.000284 -0.000252 0.000094 0.000091 0.0000003 0.0000180 0.000059 0.000052 2002 3 12 52345 -0.094966 0.507768 -0.1714785 0.0008270 0.000241 -0.000233 0.000088 0.000087 0.0000003 0.0000166 0.000051 0.000045 2002 3 13 52346 -0.092754 0.510000 -0.1723702 0.0009670 0.000159 -0.000163 0.000089 0.000088 0.0000004 0.0000160 0.000069 0.000062 2002 3 14 52347 -0.090136 0.512400 -0.1733479 0.0010203 0.000165 -0.000129 0.000093 0.000090 0.0000005 0.0000157 0.000135 0.000079 2002 3 15 52348 -0.087609 0.514517 -0.1743455 0.0009716 0.000242 -0.000227 0.000093 0.000090 0.0000005 0.0000158 0.000100 0.000073 2002 3 16 52349 -0.084890 0.516617 -0.1753278 0.0008991 0.000262 -0.000306 0.000100 0.000096 0.0000005 0.0000168 0.000083 0.000069 2002 3 17 52350 -0.081828 0.518718 -0.1762608 0.0008658 0.000241 -0.000328 0.000104 0.000099 0.0000004 0.0000167 0.000086 0.000070 2002 3 18 52351 -0.078696 0.520418 -0.1770930 0.0008268 0.000214 -0.000288 0.000103 0.000099 0.0000004 0.0000157 0.000088 0.000071 2002 3 19 52352 -0.075631 0.522454 -0.1777840 0.0007132 0.000201 -0.000204 0.000100 0.000098 0.0000003 0.0000150 0.000091 0.000072 2002 3 20 52353 -0.072532 0.524204 -0.1783391 0.0005382 0.000271 -0.000064 0.000096 0.000094 0.0000142 0.0000145 0.000177 0.000257 2002 3 21 52354 -0.069253 0.525863 -0.1788038 0.0004284 0.000311 -0.000019 0.000097 0.000093 0.0000317 0.0000144 0.001358 0.000567 2002 3 22 52355 -0.065778 0.527668 -0.1792168 0.0003864 0.000279 -0.000104 0.000097 0.000092 0.0000100 0.0000147 0.000519 0.000226 2002 3 23 52356 -0.062311 0.529373 -0.1796043 0.0003991 0.000247 -0.000218 0.000100 0.000096 0.0000005 0.0000154 0.000082 0.000072 2002 3 24 52357 -0.058845 0.530837 -0.1800432 0.0005327 0.000223 -0.000298 0.000099 0.000095 0.0000005 0.0000167 0.000084 0.000071 2002 3 25 52358 -0.055191 0.532461 -0.1806468 0.0007172 0.000205 -0.000304 0.000091 0.000088 0.0000005 0.0000169 0.000084 0.000070 2002 3 26 52359 -0.051426 0.534221 -0.1815103 0.0010010 0.000192 -0.000238 0.000086 0.000084 0.0000004 0.0000161 0.000086 0.000068 2002 3 27 52360 -0.047902 0.535985 -0.1826762 0.0013060 0.000224 0.000042 0.000083 0.000082 0.0000004 0.0000157 0.000073 0.000084 2002 3 28 52361 -0.044862 0.537462 -0.1841010 0.0015334 0.000159 -0.000029 0.000086 0.000084 0.0000005 0.0000156 0.000090 0.000092 2002 3 29 52362 -0.041724 0.538744 -0.1856485 0.0015477 0.000137 -0.000113 0.000086 0.000086 0.0000020 0.0000156 0.000097 0.000092 2002 3 30 52363 -0.038211 0.539673 -0.1871418 0.0013585 0.000170 -0.000161 0.000088 0.000088 0.0000038 0.0000163 0.000097 0.000090 2002 3 31 52364 -0.034497 0.540440 -0.1884409 0.0011469 0.000235 -0.000203 0.000091 0.000089 0.0000049 0.0000167 0.000096 0.000088 2002 4 1 52365 -0.030707 0.540973 -0.1894848 0.0009528 0.000308 -0.000228 0.000086 0.000085 0.0000060 0.0000158 0.000095 0.000086 2002 4 2 52366 -0.026950 0.541449 -0.1902792 0.0006922 0.000356 -0.000239 0.000082 0.000082 0.0000059 0.0000149 0.000095 0.000085 2002 4 3 52367 -0.022913 0.541970 -0.1908642 0.0004834 0.000349 -0.000244 0.000081 0.000082 0.0000014 0.0000146 0.000094 0.000083 2002 4 4 52368 -0.018870 0.543127 -0.1912972 0.0004052 0.000274 -0.000291 0.000080 0.000081 0.0000005 0.0000144 0.000080 0.000068 2002 4 5 52369 -0.014845 0.544480 -0.1916728 0.0004048 0.000150 -0.000278 0.000084 0.000084 0.0000005 0.0000146 0.000080 0.000070 2002 4 6 52370 -0.011623 0.545938 -0.1920753 0.0004595 0.000017 -0.000207 0.000088 0.000090 0.0000005 0.0000155 0.000080 0.000072 2002 4 7 52371 -0.008757 0.547195 -0.1925570 0.0005529 -0.000072 -0.000133 0.000087 0.000090 0.0000005 0.0000154 0.000078 0.000070 2002 4 8 52372 -0.006144 0.548114 -0.1931425 0.0006249 -0.000086 -0.000098 0.000082 0.000086 0.0000005 0.0000142 0.000075 0.000069 2002 4 9 52373 -0.003820 0.548760 -0.1938382 0.0007487 -0.000030 -0.000118 0.000083 0.000086 0.0000005 0.0000136 0.000073 0.000068 2002 4 10 52374 -0.001789 0.549495 -0.1946416 0.0008562 0.000161 -0.000269 0.000081 0.000082 0.0000005 0.0000136 0.000071 0.000068 2002 4 11 52375 0.000603 0.549856 -0.1955413 0.0009276 0.000203 -0.000316 0.000077 0.000078 0.0000005 0.0000132 0.000079 0.000078 2002 4 12 52376 0.003797 0.550529 -0.1965055 0.0009964 0.000149 -0.000263 0.000077 0.000078 0.0000007 0.0000131 0.000091 0.000091 2002 4 13 52377 0.006802 0.551472 -0.1974708 0.0009156 0.000118 -0.000149 0.000080 0.000081 0.0000006 0.0000137 0.000088 0.000087 2002 4 14 52378 0.009909 0.551995 -0.1983485 0.0007605 0.000122 -0.000039 0.000086 0.000087 0.0000005 0.0000140 0.000081 0.000078 2002 4 15 52379 0.012981 0.552744 -0.1990588 0.0006328 0.000160 0.000000 0.000085 0.000087 0.0000004 0.0000133 0.000073 0.000068 2002 4 16 52380 0.015667 0.553405 -0.1995709 0.0004452 0.000221 -0.000059 0.000085 0.000086 0.0000004 0.0000131 0.000066 0.000058 2002 4 17 52381 0.018838 0.553847 -0.1999207 0.0002935 0.000282 -0.000277 0.000084 0.000085 0.0000029 0.0000134 0.000107 0.000073 2002 4 18 52382 0.022230 0.554364 -0.2001926 0.0002335 0.000304 -0.000486 0.000083 0.000084 0.0000048 0.0000133 0.000160 0.000093 2002 4 19 52383 0.025485 0.554728 -0.2004490 0.0002207 0.000223 -0.000377 0.000082 0.000083 0.0000015 0.0000132 0.000107 0.000088 2002 4 20 52384 0.029039 0.554989 -0.2007073 0.0002111 0.000132 -0.000259 0.000082 0.000084 0.0000006 0.0000134 0.000080 0.000080 2002 4 21 52385 0.032031 0.555165 -0.2010242 0.0003511 0.000060 -0.000180 0.000084 0.000086 0.0000005 0.0000134 0.000077 0.000073 2002 4 22 52386 0.034884 0.555152 -0.2015105 0.0006086 0.000021 -0.000134 0.000080 0.000082 0.0000004 0.0000125 0.000073 0.000066 2002 4 23 52387 0.037844 0.555031 -0.2022648 0.0009072 0.000029 -0.000137 0.000077 0.000078 0.0000004 0.0000118 0.000070 0.000059 2002 4 24 52388 0.041291 0.554800 -0.2033057 0.0011821 0.000085 -0.000192 0.000076 0.000078 0.0000033 0.0000115 0.001536 0.001507 2002 4 25 52389 0.044859 0.554695 -0.2045790 0.0013214 0.000154 -0.000222 0.000079 0.000082 0.0000054 0.0000118 0.001250 0.001228 2002 4 26 52390 0.048726 0.554461 -0.2059906 0.0014079 0.000212 -0.000236 0.000079 0.000081 0.0000015 0.0000119 0.000335 0.000327 2002 4 27 52391 0.052475 0.554142 -0.2073748 0.0013117 0.000234 -0.000259 0.000077 0.000079 0.0000005 0.0000120 0.000088 0.000085 2002 4 28 52392 0.056224 0.553454 -0.2085540 0.0010337 0.000206 -0.000284 0.000078 0.000080 0.0000005 0.0000123 0.000088 0.000086 2002 4 29 52393 0.059904 0.553152 -0.2094279 0.0006894 0.000135 -0.000308 0.000077 0.000079 0.0000005 0.0000120 0.000087 0.000087 2002 4 30 52394 0.063465 0.552800 -0.2100003 0.0004423 0.000046 -0.000326 0.000075 0.000077 0.0000005 0.0000117 0.000086 0.000088 2002 5 1 52395 0.066819 0.552740 -0.2103467 0.0002871 -0.000031 -0.000332 0.000075 0.000077 0.0000071 0.0000119 0.000093 0.000089 2002 5 2 52396 0.069967 0.552463 -0.2105654 0.0001890 -0.000059 -0.000315 0.000078 0.000080 0.0000119 0.0000121 0.000101 0.000088 2002 5 3 52397 0.073389 0.552154 -0.2107535 0.0002021 -0.000024 -0.000273 0.000080 0.000081 0.0000030 0.0000122 0.000109 0.000088 2002 5 4 52398 0.076853 0.552050 -0.2109987 0.0002980 0.000077 -0.000201 0.000080 0.000081 0.0000006 0.0000128 0.000108 0.000090 2002 5 5 52399 0.080684 0.551889 -0.2113705 0.0004434 0.000194 -0.000133 0.000084 0.000085 0.0000006 0.0000135 0.000104 0.000092 2002 5 6 52400 0.084636 0.551822 -0.2119083 0.0006474 0.000270 -0.000097 0.000091 0.000091 0.0000005 0.0000137 0.000100 0.000094 2002 5 7 52401 0.088509 0.551397 -0.2126136 0.0007960 0.000276 -0.000103 0.000089 0.000089 0.0000005 0.0000135 0.000096 0.000095 2002 5 8 52402 0.091552 0.550944 -0.2134515 0.0008904 0.000156 -0.000204 0.000082 0.000083 0.0000006 0.0000133 0.000062 0.000058 2002 5 9 52403 0.094223 0.550145 -0.2143638 0.0009659 0.000057 -0.000232 0.000079 0.000080 0.0000004 0.0000130 0.000041 0.000032 2002 5 10 52404 0.097760 0.549336 -0.2153289 0.0009968 0.000017 -0.000191 0.000081 0.000082 0.0000009 0.0000133 0.000085 0.000081 2002 5 11 52405 0.101140 0.549069 -0.2162946 0.0009557 0.000034 -0.000153 0.000088 0.000088 0.0000010 0.0000142 0.000097 0.000094 2002 5 12 52406 0.103906 0.548625 -0.2172013 0.0008476 0.000093 -0.000139 0.000090 0.000090 0.0000009 0.0000141 0.000089 0.000087 2002 5 13 52407 0.106791 0.547813 -0.2180167 0.0007835 0.000164 -0.000158 0.000087 0.000086 0.0000008 0.0000128 0.000081 0.000079 2002 5 14 52408 0.109695 0.546940 -0.2187296 0.0006753 0.000217 -0.000203 0.000085 0.000084 0.0000006 0.0000121 0.000074 0.000072 2002 5 15 52409 0.112066 0.545764 -0.2193425 0.0005512 0.000210 -0.000281 0.000084 0.000084 0.0000007 0.0000122 0.000088 0.000075 2002 5 16 52410 0.114145 0.544321 -0.2198674 0.0004809 0.000171 -0.000316 0.000083 0.000083 0.0000009 0.0000120 0.000108 0.000080 2002 5 17 52411 0.116426 0.542574 -0.2203491 0.0004846 0.000166 -0.000169 0.000083 0.000082 0.0000006 0.0000117 0.000089 0.000082 2002 5 18 52412 0.119113 0.541470 -0.2208838 0.0005792 0.000141 -0.000042 0.000092 0.000091 0.0000005 0.0000123 0.000078 0.000078 2002 5 19 52413 0.121972 0.540692 -0.2215732 0.0007565 0.000097 0.000020 0.000094 0.000093 0.0000005 0.0000136 0.000075 0.000071 2002 5 20 52414 0.125165 0.540091 -0.2224844 0.0009959 0.000045 0.000014 0.000085 0.000085 0.0000004 0.0000136 0.000072 0.000065 2002 5 21 52415 0.128488 0.539683 -0.2236320 0.0012568 -0.000006 -0.000053 0.000082 0.000083 0.0000004 0.0000128 0.000069 0.000058 2002 5 22 52416 0.131184 0.539025 -0.2249736 0.0013972 -0.000047 -0.000150 0.000081 0.000082 0.0000032 0.0000126 0.000080 0.000067 2002 5 23 52417 0.133609 0.538176 -0.2264148 0.0014061 -0.000058 -0.000227 0.000080 0.000081 0.0000053 0.0000125 0.000094 0.000080 2002 5 24 52418 0.135952 0.537154 -0.2278074 0.0013042 -0.000028 -0.000242 0.000081 0.000082 0.0000017 0.0000123 0.000109 0.000092 2002 5 25 52419 0.138212 0.536191 -0.2289843 0.0010737 0.000046 -0.000158 0.000084 0.000087 0.0000007 0.0000126 0.000239 0.000146 2002 5 26 52420 0.140522 0.535149 -0.2298501 0.0007715 0.000132 -0.000028 0.000092 0.000096 0.0000007 0.0000123 0.000412 0.000215 2002 5 27 52421 0.143130 0.533961 -0.2304169 0.0004414 0.000191 0.000083 0.000093 0.000097 0.0000006 0.0000112 0.000585 0.000283 2002 5 28 52422 0.146236 0.532889 -0.2307649 0.0001869 0.000195 0.000099 0.000088 0.000091 0.0000006 0.0000107 0.000588 0.000286 2002 5 29 52423 0.149086 0.531635 -0.2309689 0.0000564 0.000136 -0.000016 0.000086 0.000089 0.0000006 0.0000107 0.000168 0.000127 2002 5 30 52424 0.151907 0.530240 -0.2310606 0.0000277 0.000045 -0.000127 0.000088 0.000091 0.0000006 0.0000107 0.000418 0.002366 2002 5 31 52425 0.154710 0.528740 -0.2310737 0.0000636 -0.000026 -0.000184 0.000089 0.000091 0.0000007 0.0000108 0.000237 0.000880 2002 6 1 52426 0.157344 0.527242 -0.2310960 0.0000739 -0.000020 -0.000192 0.000092 0.000093 0.0000006 0.0000113 0.000124 0.000087 2002 6 2 52427 0.159849 0.525453 -0.2312081 0.0001207 0.000048 -0.000155 0.000094 0.000095 0.0000006 0.0000116 0.000109 0.000078 2002 6 3 52428 0.162547 0.523562 -0.2314070 0.0001845 0.000134 -0.000102 0.000088 0.000089 0.0000005 0.0000110 0.000095 0.000070 2002 6 4 52429 0.165255 0.521872 -0.2316170 0.0002123 0.000192 -0.000066 0.000085 0.000086 0.0000004 0.0000105 0.000081 0.000062 2002 6 5 52430 0.168414 0.520218 -0.2317805 0.0001726 0.000228 -0.000057 0.000086 0.000087 0.0000180 0.0000107 0.000219 0.000138 2002 6 6 52431 0.171408 0.518626 -0.2319371 0.0000626 0.000123 -0.000140 0.000086 0.000087 0.0000084 0.0000109 0.000202 0.000140 2002 6 7 52432 0.174581 0.516954 -0.2319647 -0.0000425 -0.000018 -0.000249 0.000086 0.000087 0.0000027 0.0000110 0.000128 0.000113 2002 6 8 52433 0.177676 0.515284 -0.2318524 -0.0001820 -0.000046 -0.000278 0.000087 0.000088 0.0000010 0.0000112 0.000102 0.000097 2002 6 9 52434 0.180752 0.513679 -0.2316088 -0.0003242 0.000013 -0.000250 0.000091 0.000093 0.0000009 0.0000119 0.000093 0.000087 2002 6 10 52435 0.183614 0.512010 -0.2312306 -0.0004737 0.000108 -0.000208 0.000092 0.000094 0.0000008 0.0000117 0.000084 0.000076 2002 6 11 52436 0.186147 0.510083 -0.2307221 -0.0006066 0.000185 -0.000186 0.000089 0.000090 0.0000006 0.0000113 0.000074 0.000065 2002 6 12 52437 0.188435 0.508092 -0.2301000 -0.0006905 0.000178 -0.000248 0.000089 0.000091 0.0000007 0.0000114 0.000083 0.000079 2002 6 13 52438 0.190769 0.505948 -0.2294023 -0.0007112 0.000117 -0.000332 0.000089 0.000091 0.0000008 0.0000113 0.000096 0.000099 2002 6 14 52439 0.193280 0.504167 -0.2287121 -0.0006455 0.000044 -0.000321 0.000089 0.000091 0.0000009 0.0000112 0.000113 0.000103 2002 6 15 52440 0.195924 0.502412 -0.2281719 -0.0004388 0.000029 -0.000279 0.000090 0.000092 0.0000008 0.0000115 0.000113 0.000098 2002 6 16 52441 0.199106 0.500325 -0.2278934 -0.0001650 0.000075 -0.000233 0.000091 0.000093 0.0000007 0.0000110 0.000106 0.000093 2002 6 17 52442 0.202340 0.497974 -0.2278923 0.0000878 0.000155 -0.000196 0.000092 0.000094 0.0000007 0.0000098 0.000099 0.000087 2002 6 18 52443 0.204950 0.495546 -0.2280835 0.0002305 0.000226 -0.000187 0.000089 0.000092 0.0000006 0.0000095 0.000093 0.000082 2002 6 19 52444 0.207471 0.493065 -0.2283481 0.0003060 0.000319 -0.000237 0.000087 0.000090 0.0000085 0.0000094 0.000138 0.000282 2002 6 20 52445 0.210271 0.490736 -0.2286516 0.0003178 0.000227 -0.000267 0.000088 0.000091 0.0000142 0.0000094 0.000081 0.000134 2002 6 21 52446 0.212669 0.488968 -0.2289845 0.0002494 0.000024 -0.000229 0.000088 0.000090 0.0000038 0.0000094 0.000101 0.000095 2002 6 22 52447 0.214611 0.486975 -0.2292383 0.0001586 -0.000013 -0.000186 0.000090 0.000091 0.0000009 0.0000098 0.000113 0.000102 2002 6 23 52448 0.216608 0.484575 -0.2293308 0.0000172 0.000066 -0.000155 0.000091 0.000092 0.0000008 0.0000107 0.000106 0.000098 2002 6 24 52449 0.218274 0.482106 -0.2292678 -0.0001209 0.000167 -0.000153 0.000091 0.000093 0.0000007 0.0000109 0.000100 0.000094 2002 6 25 52450 0.219553 0.479470 -0.2291183 -0.0001718 0.000240 -0.000188 0.000087 0.000090 0.0000006 0.0000105 0.000094 0.000089 2002 6 26 52451 0.220870 0.476532 -0.2289633 -0.0001498 0.000040 -0.000263 0.000087 0.000090 0.0000007 0.0000105 0.000105 0.000084 2002 6 27 52452 0.222503 0.473489 -0.2288449 -0.0000921 0.000066 -0.000346 0.000091 0.000094 0.0000007 0.0000104 0.000106 0.000083 2002 6 28 52453 0.224443 0.470323 -0.2287882 -0.0000106 0.000197 -0.000404 0.000091 0.000094 0.0000006 0.0000102 0.000103 0.000084 2002 6 29 52454 0.225975 0.467449 -0.2288166 0.0000865 0.000225 -0.000399 0.000092 0.000094 0.0000006 0.0000105 0.000095 0.000079 2002 6 30 52455 0.227130 0.464683 -0.2289505 0.0001958 0.000180 -0.000353 0.000091 0.000093 0.0000005 0.0000110 0.000087 0.000072 2002 7 1 52456 0.228134 0.461824 -0.2292032 0.0002921 0.000107 -0.000299 0.000089 0.000091 0.0000005 0.0000110 0.000078 0.000065 2002 7 2 52457 0.228825 0.458803 -0.2295684 0.0004165 0.000048 -0.000261 0.000087 0.000089 0.0000004 0.0000110 0.000068 0.000057 2002 7 3 52458 0.229539 0.455775 -0.2300067 0.0004600 0.000078 -0.000299 0.000086 0.000088 0.0000006 0.0000111 0.000108 0.000086 2002 7 4 52459 0.229926 0.452927 -0.2304497 0.0004002 0.000144 -0.000299 0.000089 0.000091 0.0000089 0.0000113 0.000120 0.000098 2002 7 5 52460 0.230384 0.449825 -0.2308053 0.0003343 0.000216 -0.000265 0.000092 0.000093 0.0000109 0.0000116 0.000118 0.000100 2002 7 6 52461 0.230756 0.446646 -0.2310258 0.0001678 0.000265 -0.000224 0.000095 0.000096 0.0000081 0.0000121 0.000116 0.000103 2002 7 7 52462 0.231508 0.442953 -0.2311136 0.0000229 0.000260 -0.000195 0.000096 0.000097 0.0000057 0.0000122 0.000114 0.000106 2002 7 8 52463 0.232389 0.439729 -0.2310752 -0.0000933 0.000199 -0.000201 0.000092 0.000092 0.0000034 0.0000113 0.000112 0.000109 2002 7 9 52464 0.233036 0.436567 -0.2309186 -0.0002081 0.000107 -0.000240 0.000089 0.000090 0.0000011 0.0000110 0.000110 0.000112 2002 7 10 52465 0.234005 0.433447 -0.2306690 -0.0002747 -0.000026 -0.000350 0.000090 0.000091 0.0000009 0.0000112 0.000148 0.000162 2002 7 11 52466 0.235407 0.430580 -0.2303916 -0.0002461 -0.000056 -0.000409 0.000090 0.000090 0.0000007 0.0000109 0.000120 0.000117 2002 7 12 52467 0.236785 0.427659 -0.2301812 -0.0001211 0.000078 -0.000284 0.000096 0.000095 0.0000007 0.0000107 0.000093 0.000079 2002 7 13 52468 0.238053 0.424667 -0.2301700 0.0001039 0.000188 -0.000200 0.000106 0.000104 0.0000007 0.0000112 0.000089 0.000074 2002 7 14 52469 0.239159 0.421597 -0.2304264 0.0003603 0.000240 -0.000182 0.000105 0.000103 0.0000007 0.0000125 0.000090 0.000075 2002 7 15 52470 0.240228 0.418491 -0.2309036 0.0005479 0.000228 -0.000207 0.000100 0.000099 0.0000007 0.0000128 0.000091 0.000077 2002 7 16 52471 0.241157 0.415706 -0.2314813 0.0005852 0.000160 -0.000266 0.000096 0.000096 0.0000007 0.0000122 0.000092 0.000078 2002 7 17 52472 0.241869 0.413002 -0.2320356 0.0005166 0.000073 -0.000298 0.000096 0.000096 0.0000076 0.0000118 0.000098 0.000095 2002 7 18 52473 0.242914 0.410461 -0.2324954 0.0003891 0.000004 -0.000307 0.000098 0.000098 0.0000137 0.0000116 0.000105 0.000115 2002 7 19 52474 0.243940 0.408353 -0.2328001 0.0001605 -0.000012 -0.000345 0.000097 0.000098 0.0000034 0.0000115 0.000115 0.000112 2002 7 20 52475 0.244334 0.405821 -0.2328558 -0.0001477 0.000006 -0.000320 0.000100 0.000102 0.0000006 0.0000119 0.000113 0.000104 2002 7 21 52476 0.244789 0.402984 -0.2326133 -0.0004112 0.000026 -0.000258 0.000101 0.000102 0.0000006 0.0000117 0.000105 0.000098 2002 7 22 52477 0.245521 0.399932 -0.2321022 -0.0005833 0.000029 -0.000207 0.000098 0.000099 0.0000006 0.0000109 0.000097 0.000091 2002 7 23 52478 0.246291 0.397185 -0.2314155 -0.0006641 0.000015 -0.000188 0.000093 0.000095 0.0000005 0.0000106 0.000090 0.000085 2002 7 24 52479 0.246686 0.394298 -0.2306734 -0.0007294 -0.000041 -0.000240 0.000092 0.000093 0.0000005 0.0000105 0.000069 0.000066 2002 7 25 52480 0.246995 0.391279 -0.2299809 -0.0006638 -0.000051 -0.000307 0.000091 0.000093 0.0000004 0.0000106 0.000045 0.000044 2002 7 26 52481 0.246921 0.388106 -0.2294061 -0.0005241 0.000155 -0.000304 0.000092 0.000093 0.0000008 0.0000108 0.000135 0.000129 2002 7 27 52482 0.246846 0.384601 -0.2289772 -0.0004053 0.000327 -0.000275 0.000097 0.000098 0.0000009 0.0000111 0.000163 0.000149 2002 7 28 52483 0.247175 0.380762 -0.2286814 -0.0002516 0.000407 -0.000244 0.000101 0.000102 0.0000009 0.0000117 0.000154 0.000133 2002 7 29 52484 0.247645 0.377033 -0.2284757 -0.0001616 0.000384 -0.000228 0.000100 0.000100 0.0000009 0.0000117 0.000145 0.000117 2002 7 30 52485 0.248473 0.373433 -0.2283032 -0.0001934 0.000264 -0.000244 0.000096 0.000097 0.0000009 0.0000116 0.000135 0.000101 2002 7 31 52486 0.249809 0.370090 -0.2281101 -0.0002350 0.000085 -0.000305 0.000096 0.000097 0.0000053 0.0000118 0.000134 0.000108 2002 8 1 52487 0.251269 0.366999 -0.2278561 -0.0002939 -0.000076 -0.000372 0.000096 0.000097 0.0000084 0.0000119 0.000135 0.000121 2002 8 2 52488 0.252292 0.364419 -0.2275179 -0.0003862 -0.000160 -0.000409 0.000096 0.000097 0.0000024 0.0000121 0.000136 0.000134 2002 8 3 52489 0.252926 0.361775 -0.2270831 -0.0004719 -0.000115 -0.000379 0.000102 0.000103 0.0000008 0.0000127 0.000132 0.000129 2002 8 4 52490 0.253979 0.359107 -0.2265407 -0.0006231 0.000002 -0.000308 0.000105 0.000105 0.0000007 0.0000127 0.000125 0.000118 2002 8 5 52491 0.255033 0.356570 -0.2258907 -0.0007152 0.000117 -0.000237 0.000101 0.000100 0.0000007 0.0000118 0.000118 0.000107 2002 8 6 52492 0.255722 0.353581 -0.2251660 -0.0007398 0.000187 -0.000195 0.000096 0.000096 0.0000006 0.0000113 0.000111 0.000096 2002 8 7 52493 0.256762 0.350451 -0.2244483 -0.0006617 0.000037 -0.000244 0.000093 0.000094 0.0000006 0.0000113 0.000097 0.000083 2002 8 8 52494 0.257990 0.347575 -0.2238604 -0.0004655 0.000060 -0.000265 0.000096 0.000096 0.0000007 0.0000114 0.000113 0.000094 2002 8 9 52495 0.259058 0.345017 -0.2235147 -0.0002169 0.000151 -0.000246 0.000098 0.000098 0.0000008 0.0000116 0.000137 0.000113 2002 8 10 52496 0.259969 0.342432 -0.2234733 0.0000877 0.000130 -0.000184 0.000100 0.000100 0.0000008 0.0000122 0.000141 0.000114 2002 8 11 52497 0.260500 0.339943 -0.2237307 0.0003642 0.000038 -0.000105 0.000104 0.000103 0.0000007 0.0000127 0.000136 0.000109 2002 8 12 52498 0.260517 0.337074 -0.2242132 0.0005547 -0.000073 -0.000047 0.000101 0.000101 0.0000007 0.0000122 0.000132 0.000104 2002 8 13 52499 0.260708 0.333937 -0.2247959 0.0005760 -0.000162 -0.000038 0.000098 0.000099 0.0000006 0.0000119 0.000128 0.000100 2002 8 14 52500 0.260868 0.331078 -0.2253370 0.0004743 -0.000139 -0.000135 0.000100 0.000100 0.0000069 0.0000121 0.000115 0.000090 2002 8 15 52501 0.260803 0.328368 -0.2257137 0.0002580 -0.000072 -0.000265 0.000099 0.000100 0.0000125 0.0000122 0.000100 0.000078 2002 8 16 52502 0.260578 0.325775 -0.2258633 0.0000364 -0.000132 -0.000264 0.000097 0.000098 0.0000033 0.0000121 0.000109 0.000088 2002 8 17 52503 0.260316 0.323193 -0.2257951 -0.0001740 -0.000130 -0.000263 0.000100 0.000100 0.0000008 0.0000125 0.000109 0.000089 2002 8 18 52504 0.259753 0.320484 -0.2255497 -0.0002984 -0.000078 -0.000265 0.000101 0.000101 0.0000008 0.0000123 0.000101 0.000083 2002 8 19 52505 0.259177 0.317805 -0.2251844 -0.0003787 -0.000021 -0.000257 0.000099 0.000098 0.0000007 0.0000109 0.000093 0.000078 2002 8 20 52506 0.258512 0.314876 -0.2247800 -0.0003751 0.000017 -0.000250 0.000093 0.000093 0.0000006 0.0000103 0.000086 0.000072 2002 8 21 52507 0.257886 0.311968 -0.2244377 -0.0002697 0.000000 -0.000248 0.000092 0.000093 0.0000054 0.0000103 0.000091 0.000078 2002 8 22 52508 0.257252 0.308877 -0.2242557 -0.0000893 -0.000043 -0.000257 0.000094 0.000094 0.0000088 0.0000103 0.000099 0.000086 2002 8 23 52509 0.256714 0.305618 -0.2242576 0.0000551 -0.000079 -0.000271 0.000096 0.000094 0.0000023 0.0000106 0.000108 0.000094 2002 8 24 52510 0.256338 0.302295 -0.2243768 0.0001662 -0.000072 -0.000283 0.000101 0.000098 0.0000006 0.0000114 0.000105 0.000091 2002 8 25 52511 0.255560 0.298930 -0.2245663 0.0002296 -0.000032 -0.000289 0.000104 0.000100 0.0000005 0.0000125 0.000099 0.000085 2002 8 26 52512 0.254923 0.295353 -0.2248264 0.0002804 0.000011 -0.000286 0.000105 0.000101 0.0000005 0.0000125 0.000093 0.000079 2002 8 27 52513 0.254608 0.291949 -0.2251563 0.0003273 0.000031 -0.000275 0.000100 0.000096 0.0000004 0.0000117 0.000086 0.000073 2002 8 28 52514 0.254547 0.288564 -0.2255028 0.0002720 -0.000003 -0.000255 0.000098 0.000094 0.0000078 0.0000116 0.000799 0.000232 2002 8 29 52515 0.254615 0.285680 -0.2257527 0.0001662 -0.000067 -0.000222 0.000102 0.000098 0.0000155 0.0000118 0.001699 0.000434 2002 8 30 52516 0.254130 0.282540 -0.2258282 0.0000309 -0.000134 -0.000178 0.000105 0.000101 0.0000037 0.0000122 0.000591 0.000196 2002 8 31 52517 0.253571 0.279401 -0.2257620 -0.0000855 -0.000157 -0.000122 0.000106 0.000102 0.0000005 0.0000130 0.000111 0.000088 2002 9 1 52518 0.252793 0.276305 -0.2256103 -0.0001661 -0.000138 -0.000074 0.000109 0.000103 0.0000005 0.0000131 0.000110 0.000083 2002 9 2 52519 0.251661 0.273049 -0.2254075 -0.0002285 -0.000096 -0.000060 0.000108 0.000102 0.0000005 0.0000120 0.000109 0.000079 2002 9 3 52520 0.250098 0.269936 -0.2251803 -0.0002499 -0.000059 -0.000093 0.000107 0.000102 0.0000005 0.0000117 0.000108 0.000074 2002 9 4 52521 0.249099 0.266794 -0.2249850 -0.0001146 -0.000014 -0.000182 0.000104 0.000100 0.0000005 0.0000118 0.000074 0.000071 2002 9 5 52522 0.248306 0.263823 -0.2249298 0.0000975 -0.000091 -0.000280 0.000102 0.000097 0.0000138 0.0000115 0.000112 0.000123 2002 9 6 52523 0.247472 0.260792 -0.2251566 0.0003678 -0.000148 -0.000382 0.000104 0.000098 0.0000051 0.0000117 0.000092 0.000088 2002 9 7 52524 0.246239 0.258208 -0.2256884 0.0006758 -0.000065 -0.000419 0.000108 0.000101 0.0000049 0.0000127 0.000146 0.000306 2002 9 8 52525 0.244699 0.255847 -0.2265031 0.0009349 0.000051 -0.000396 0.000112 0.000104 0.0000109 0.0000132 0.000237 0.000630 2002 9 9 52526 0.242832 0.253410 -0.2275319 0.0010408 0.000066 -0.000340 0.000110 0.000104 0.0000128 0.0000120 0.000265 0.000736 2002 9 10 52527 0.241004 0.250689 -0.2285829 0.0009388 -0.000102 -0.000280 0.000104 0.000099 0.0000029 0.0000110 0.000103 0.000188 2002 9 11 52528 0.239335 0.248233 -0.2294109 0.0007081 -0.000326 -0.000267 0.000101 0.000097 0.0000035 0.0000109 0.000076 0.000067 2002 9 12 52529 0.237497 0.245705 -0.2299577 0.0004342 -0.000472 -0.000275 0.000101 0.000097 0.0000055 0.0000108 0.000085 0.000063 2002 9 13 52530 0.235855 0.242928 -0.2302889 0.0002378 -0.000180 -0.000273 0.000099 0.000095 0.0000017 0.0000109 0.000091 0.000080 2002 9 14 52531 0.234236 0.239908 -0.2304444 0.0000746 0.000022 -0.000245 0.000104 0.000098 0.0000006 0.0000118 0.000093 0.000082 2002 9 15 52532 0.232936 0.236914 -0.2304679 -0.0000316 0.000088 -0.000202 0.000107 0.000101 0.0000006 0.0000124 0.000094 0.000078 2002 9 16 52533 0.231768 0.234783 -0.2304212 -0.0000352 0.000071 -0.000158 0.000102 0.000097 0.0000005 0.0000114 0.000095 0.000073 2002 9 17 52534 0.230167 0.232842 -0.2303763 0.0000123 -0.000009 -0.000125 0.000098 0.000095 0.0000005 0.0000106 0.000095 0.000068 2002 9 18 52535 0.227986 0.231106 -0.2303973 0.0000858 -0.000113 -0.000162 0.000095 0.000093 0.0000006 0.0000104 0.000076 0.000064 2002 9 19 52536 0.225411 0.229315 -0.2305186 0.0002033 -0.000130 -0.000148 0.000097 0.000093 0.0000006 0.0000105 0.000079 0.000069 2002 9 20 52537 0.222385 0.227433 -0.2307521 0.0002857 -0.000081 -0.000128 0.000098 0.000094 0.0000006 0.0000108 0.000089 0.000076 2002 9 21 52538 0.219462 0.225108 -0.2310917 0.0003659 -0.000014 -0.000177 0.000101 0.000097 0.0000006 0.0000116 0.000089 0.000074 2002 9 22 52539 0.216746 0.222955 -0.2315104 0.0004315 0.000038 -0.000253 0.000106 0.000102 0.0000006 0.0000118 0.000085 0.000068 2002 9 23 52540 0.214430 0.220628 -0.2319628 0.0004682 0.000045 -0.000310 0.000104 0.000099 0.0000005 0.0000107 0.000081 0.000062 2002 9 24 52541 0.212321 0.218075 -0.2323936 0.0004057 0.000008 -0.000315 0.000101 0.000099 0.0000005 0.0000101 0.000076 0.000057 2002 9 25 52542 0.210525 0.215644 -0.2327508 0.0003103 -0.000101 -0.000221 0.000099 0.000097 0.0000004 0.0000099 0.000060 0.000045 2002 9 26 52543 0.208797 0.213312 -0.2329988 0.0001702 -0.000180 -0.000094 0.000092 0.000091 0.0000003 0.0000098 0.000041 0.000031 2002 9 27 52544 0.206817 0.211045 -0.2331203 0.0000774 -0.000022 -0.000038 0.000092 0.000092 0.0000007 0.0000100 0.000073 0.000067 2002 9 28 52545 0.204790 0.208712 -0.2331136 -0.0000335 0.000090 -0.000033 0.000100 0.000098 0.0000007 0.0000107 0.000082 0.000077 2002 9 29 52546 0.202697 0.206099 -0.2330104 -0.0001104 0.000127 -0.000064 0.000100 0.000098 0.0000007 0.0000115 0.000075 0.000071 2002 9 30 52547 0.200616 0.203505 -0.2328744 -0.0001455 0.000112 -0.000108 0.000096 0.000096 0.0000006 0.0000111 0.000068 0.000065 2002 10 1 52548 0.198500 0.200643 -0.2327820 -0.0000577 0.000058 -0.000136 0.000091 0.000092 0.0000005 0.0000106 0.000062 0.000059 2002 10 2 52549 0.196632 0.198420 -0.2328068 0.0001107 0.000013 -0.000120 0.000088 0.000090 0.0000053 0.0000104 0.000064 0.000061 2002 10 3 52550 0.194701 0.195803 -0.2330103 0.0003388 -0.000017 -0.000078 0.000091 0.000093 0.0000065 0.0000105 0.000069 0.000065 2002 10 4 52551 0.192524 0.193706 -0.2334666 0.0006249 -0.000032 -0.000038 0.000090 0.000092 0.0000017 0.0000106 0.000074 0.000070 2002 10 5 52552 0.189949 0.191541 -0.2342356 0.0009248 -0.000044 -0.000034 0.000091 0.000093 0.0000004 0.0000110 0.000072 0.000068 2002 10 6 52553 0.187311 0.189493 -0.2352772 0.0011283 -0.000057 -0.000059 0.000094 0.000096 0.0000005 0.0000116 0.000068 0.000064 2002 10 7 52554 0.184987 0.187381 -0.2364418 0.0011439 -0.000072 -0.000095 0.000093 0.000095 0.0000005 0.0000113 0.000064 0.000060 2002 10 8 52555 0.182500 0.185194 -0.2375352 0.0010029 -0.000087 -0.000122 0.000089 0.000091 0.0000005 0.0000106 0.000059 0.000056 2002 10 9 52556 0.180013 0.182965 -0.2384064 0.0007485 -0.000103 -0.000104 0.000087 0.000088 0.0000010 0.0000104 0.000074 0.000080 2002 10 10 52557 0.177981 0.180866 -0.2390045 0.0004701 -0.000090 -0.000067 0.000088 0.000090 0.0000158 0.0000105 0.000074 0.000060 2002 10 11 52558 0.175559 0.179136 -0.2393636 0.0002461 -0.000064 -0.000045 0.000090 0.000091 0.0000059 0.0000108 0.000091 0.000080 2002 10 12 52559 0.173078 0.177163 -0.2395586 0.0001215 -0.000025 0.000005 0.000094 0.000095 0.0000007 0.0000115 0.000095 0.000087 2002 10 13 52560 0.170964 0.175311 -0.2396870 0.0001249 0.000009 0.000059 0.000095 0.000098 0.0000006 0.0000123 0.000092 0.000083 2002 10 14 52561 0.168546 0.173657 -0.2398435 0.0002284 0.000018 0.000084 0.000095 0.000098 0.0000005 0.0000120 0.000088 0.000078 2002 10 15 52562 0.165868 0.171886 -0.2400977 0.0003425 0.000000 0.000066 0.000094 0.000097 0.0000005 0.0000114 0.000085 0.000074 2002 10 16 52563 0.163458 0.170321 -0.2404881 0.0004590 -0.000079 -0.000012 0.000094 0.000097 0.0000013 0.0000112 0.000093 0.000102 2002 10 17 52564 0.161165 0.169042 -0.2410175 0.0006102 -0.000105 -0.000118 0.000092 0.000094 0.0000007 0.0000111 0.000064 0.000066 2002 10 18 52565 0.158314 0.167961 -0.2417010 0.0007318 -0.000098 -0.000178 0.000089 0.000090 0.0000004 0.0000110 0.000054 0.000050 2002 10 19 52566 0.154577 0.166881 -0.2424338 0.0007471 -0.000067 -0.000196 0.000089 0.000090 0.0000004 0.0000113 0.000051 0.000047 2002 10 20 52567 0.150380 0.165599 -0.2431923 0.0007494 -0.000059 -0.000159 0.000089 0.000089 0.0000004 0.0000119 0.000047 0.000044 2002 10 21 52568 0.146571 0.164148 -0.2439468 0.0007324 -0.000101 -0.000101 0.000086 0.000085 0.0000003 0.0000119 0.000044 0.000041 2002 10 22 52569 0.143239 0.162878 -0.2446799 0.0007057 -0.000132 -0.000067 0.000083 0.000082 0.0000003 0.0000113 0.000046 0.000045 2002 10 23 52570 0.139954 0.161586 -0.2453506 0.0006271 -0.000133 -0.000071 0.000083 0.000082 0.0000004 0.0000114 0.000051 0.000047 2002 10 24 52571 0.136689 0.160223 -0.2459127 0.0004925 -0.000150 -0.000093 0.000085 0.000084 0.0000004 0.0000119 0.000051 0.000049 2002 10 25 52572 0.133052 0.158623 -0.2463383 0.0003615 -0.000138 -0.000150 0.000087 0.000086 0.0000004 0.0000124 0.000053 0.000051 2002 10 26 52573 0.129476 0.156906 -0.2466312 0.0002554 -0.000090 -0.000213 0.000089 0.000088 0.0000005 0.0000130 0.000066 0.000063 2002 10 27 52574 0.125887 0.155508 -0.2468474 0.0002137 -0.000051 -0.000219 0.000091 0.000089 0.0000005 0.0000133 0.000074 0.000068 2002 10 28 52575 0.122324 0.154159 -0.2470319 0.0002032 -0.000046 -0.000186 0.000088 0.000087 0.0000005 0.0000125 0.000067 0.000059 2002 10 29 52576 0.118910 0.153112 -0.2472043 0.0002487 -0.000057 -0.000158 0.000085 0.000083 0.0000004 0.0000116 0.000055 0.000048 2002 10 30 52577 0.115436 0.152303 -0.2475187 0.0004557 -0.000097 -0.000130 0.000084 0.000081 0.0000004 0.0000114 0.000056 0.000049 2002 10 31 52578 0.111562 0.151754 -0.2480849 0.0007353 -0.000130 -0.000107 0.000084 0.000081 0.0000004 0.0000114 0.000051 0.000046 2002 11 1 52579 0.107607 0.150892 -0.2489263 0.0010034 -0.000076 -0.000096 0.000085 0.000082 0.0000004 0.0000116 0.000073 0.000071 2002 11 2 52580 0.103569 0.150269 -0.2500185 0.0012089 -0.000059 -0.000088 0.000092 0.000090 0.0000004 0.0000125 0.000081 0.000079 2002 11 3 52581 0.099932 0.149514 -0.2512621 0.0012881 -0.000076 -0.000088 0.000102 0.000099 0.0000004 0.0000135 0.000079 0.000078 2002 11 4 52582 0.096534 0.149151 -0.2525021 0.0011710 -0.000102 -0.000097 0.000103 0.000099 0.0000004 0.0000128 0.000078 0.000077 2002 11 5 52583 0.092788 0.148522 -0.2535854 0.0009466 -0.000120 -0.000108 0.000098 0.000095 0.0000004 0.0000118 0.000076 0.000076 2002 11 6 52584 0.088853 0.147727 -0.2544165 0.0006991 -0.000102 -0.000136 0.000095 0.000092 0.0000008 0.0000117 0.000074 0.000075 2002 11 7 52585 0.084773 0.147198 -0.2549841 0.0004683 -0.000049 -0.000131 0.000094 0.000091 0.0000006 0.0000117 0.000083 0.000082 2002 11 8 52586 0.080738 0.146313 -0.2553354 0.0002743 -0.000053 -0.000059 0.000093 0.000091 0.0000005 0.0000118 0.000078 0.000071 2002 11 9 52587 0.076680 0.145706 -0.2555239 0.0001531 -0.000061 -0.000007 0.000101 0.000098 0.0000005 0.0000127 0.000076 0.000066 2002 11 10 52588 0.072882 0.145087 -0.2556219 0.0000874 -0.000075 0.000010 0.000103 0.000100 0.0000005 0.0000137 0.000076 0.000065 2002 11 11 52589 0.069248 0.144779 -0.2557238 0.0001342 -0.000103 -0.000004 0.000096 0.000092 0.0000005 0.0000133 0.000076 0.000064 2002 11 12 52590 0.065942 0.144444 -0.2559198 0.0002460 -0.000141 -0.000047 0.000093 0.000090 0.0000005 0.0000125 0.000077 0.000063 2002 11 13 52591 0.062924 0.144047 -0.2562643 0.0004349 -0.000180 -0.000104 0.000091 0.000088 0.0000014 0.0000122 0.000149 0.000127 2002 11 14 52592 0.060084 0.143928 -0.2567518 0.0005540 -0.000239 -0.000143 0.000092 0.000090 0.0000012 0.0000121 0.000073 0.000080 2002 11 15 52593 0.056423 0.143931 -0.2573392 0.0005896 -0.000250 -0.000200 0.000094 0.000092 0.0000007 0.0000120 0.000105 0.000086 2002 11 16 52594 0.053062 0.143846 -0.2579790 0.0006449 -0.000231 -0.000228 0.000094 0.000091 0.0000006 0.0000123 0.000118 0.000093 2002 11 17 52595 0.049816 0.143935 -0.2586293 0.0006412 -0.000196 -0.000220 0.000097 0.000094 0.0000005 0.0000124 0.000106 0.000090 2002 11 18 52596 0.046246 0.143323 -0.2592422 0.0005826 -0.000152 -0.000183 0.000100 0.000097 0.0000005 0.0000117 0.000094 0.000087 2002 11 19 52597 0.042777 0.142843 -0.2597629 0.0004353 -0.000105 -0.000130 0.000093 0.000093 0.0000005 0.0000109 0.000082 0.000084 2002 11 20 52598 0.039023 0.142294 -0.2601493 0.0003082 -0.000101 -0.000076 0.000090 0.000089 0.0000008 0.0000103 0.000082 0.000075 2002 11 21 52599 0.035633 0.141856 -0.2603915 0.0001901 -0.000030 -0.000033 0.000089 0.000089 0.0000010 0.0000101 0.000132 0.000086 2002 11 22 52600 0.032500 0.141732 -0.2605727 0.0001619 0.000076 -0.000073 0.000089 0.000089 0.0000006 0.0000101 0.000089 0.000067 2002 11 23 52601 0.029525 0.141955 -0.2607332 0.0001473 0.000128 -0.000100 0.000091 0.000091 0.0000004 0.0000106 0.000066 0.000056 2002 11 24 52602 0.026285 0.142127 -0.2609032 0.0001846 0.000119 -0.000107 0.000095 0.000094 0.0000004 0.0000110 0.000063 0.000053 2002 11 25 52603 0.023102 0.142345 -0.2611522 0.0003339 0.000062 -0.000104 0.000096 0.000095 0.0000004 0.0000107 0.000060 0.000049 2002 11 26 52604 0.020432 0.142289 -0.2615657 0.0005481 -0.000027 -0.000099 0.000093 0.000093 0.0000004 0.0000106 0.000057 0.000046 2002 11 27 52605 0.017764 0.142206 -0.2622142 0.0007890 -0.000113 -0.000113 0.000093 0.000092 0.0000005 0.0000107 0.000089 0.000073 2002 11 28 52606 0.014590 0.141882 -0.2631202 0.0010513 -0.000177 -0.000129 0.000094 0.000093 0.0000035 0.0000106 0.000095 0.000080 2002 11 29 52607 0.011090 0.141724 -0.2642782 0.0012697 -0.000209 -0.000144 0.000094 0.000093 0.0000043 0.0000105 0.000089 0.000079 2002 11 30 52608 0.007586 0.141601 -0.2656317 0.0014083 -0.000212 -0.000156 0.000098 0.000096 0.0000034 0.0000109 0.000083 0.000077 2002 12 1 52609 0.004178 0.141419 -0.2670587 0.0014169 -0.000194 -0.000158 0.000103 0.000102 0.0000024 0.0000117 0.000077 0.000075 2002 12 2 52610 0.000989 0.141410 -0.2684087 0.0012579 -0.000168 -0.000152 0.000104 0.000103 0.0000015 0.0000116 0.000071 0.000073 2002 12 3 52611 -0.002082 0.141728 -0.2695602 0.0010241 -0.000137 -0.000137 0.000098 0.000098 0.0000006 0.0000109 0.000065 0.000072 2002 12 4 52612 -0.005170 0.142395 -0.2704502 0.0007542 -0.000125 -0.000115 0.000095 0.000095 0.0000004 0.0000109 0.000340 0.000238 2002 12 5 52613 -0.008510 0.143380 -0.2710590 0.0004756 -0.000085 -0.000102 0.000095 0.000095 0.0000005 0.0000111 0.000148 0.000118 2002 12 6 52614 -0.012443 0.144471 -0.2714253 0.0003281 -0.000006 -0.000105 0.000095 0.000094 0.0000006 0.0000112 0.000101 0.000085 2002 12 7 52615 -0.016674 0.145726 -0.2717063 0.0003542 0.000055 -0.000109 0.000101 0.000099 0.0000006 0.0000117 0.000104 0.000087 2002 12 8 52616 -0.020928 0.147009 -0.2720735 0.0004631 0.000077 -0.000108 0.000106 0.000103 0.0000005 0.0000122 0.000090 0.000079 2002 12 9 52617 -0.024244 0.147814 -0.2726153 0.0006010 0.000056 -0.000099 0.000104 0.000102 0.0000004 0.0000120 0.000076 0.000071 2002 12 10 52618 -0.027084 0.149321 -0.2733330 0.0007847 -0.000001 -0.000083 0.000099 0.000099 0.0000004 0.0000115 0.000061 0.000063 2002 12 11 52619 -0.030088 0.150752 -0.2741927 0.0009393 -0.000129 -0.000055 0.000099 0.000099 0.0000152 0.0000115 0.000156 0.000116 2002 12 12 52620 -0.032917 0.152488 -0.2751852 0.0010160 -0.000163 -0.000051 0.000095 0.000094 0.0000051 0.0000116 0.000077 0.000063 2002 12 13 52621 -0.036389 0.153830 -0.2762125 0.0010454 -0.000118 -0.000065 0.000094 0.000093 0.0000006 0.0000117 0.000082 0.000070 2002 12 14 52622 -0.040066 0.155012 -0.2772239 0.0010445 -0.000118 -0.000091 0.000100 0.000098 0.0000007 0.0000120 0.000092 0.000079 2002 12 15 52623 -0.044170 0.156047 -0.2781997 0.0009399 -0.000131 -0.000110 0.000103 0.000101 0.0000006 0.0000116 0.000086 0.000076 2002 12 16 52624 -0.048070 0.156764 -0.2790958 0.0007939 -0.000119 -0.000106 0.000102 0.000102 0.0000005 0.0000108 0.000081 0.000074 2002 12 17 52625 -0.051587 0.157560 -0.2798566 0.0006309 -0.000082 -0.000082 0.000098 0.000099 0.0000004 0.0000106 0.000075 0.000071 2002 12 18 52626 -0.054523 0.158571 -0.2804348 0.0004794 0.000066 0.000001 0.000093 0.000094 0.0000006 0.0000106 0.000090 0.000072 2002 12 19 52627 -0.056921 0.160012 -0.2808194 0.0002843 0.000064 -0.000006 0.000094 0.000094 0.0000006 0.0000106 0.000090 0.000073 2002 12 20 52628 -0.059130 0.161906 -0.2810416 0.0001688 -0.000059 -0.000073 0.000096 0.000097 0.0000005 0.0000107 0.000086 0.000073 2002 12 21 52629 -0.061559 0.164234 -0.2811737 0.0001803 -0.000218 -0.000135 0.000100 0.000101 0.0000025 0.0000109 0.000084 0.000073 2002 12 22 52630 -0.064280 0.166642 -0.2813180 0.0002031 -0.000383 -0.000174 0.000100 0.000101 0.0000052 0.0000110 0.000084 0.000073 2002 12 23 52631 -0.066815 0.168811 -0.2815845 0.0003304 -0.000517 -0.000168 0.000098 0.000099 0.0000079 0.0000111 0.000084 0.000072 2002 12 24 52632 -0.069048 0.171025 -0.2820632 0.0005534 -0.000585 -0.000106 0.000097 0.000096 0.0000100 0.0000113 0.000083 0.000072 2002 12 25 52633 -0.071607 0.173381 -0.2827974 0.0008449 -0.000578 -0.000002 0.000094 0.000093 0.0000096 0.0000116 0.000083 0.000072 2002 12 26 52634 -0.074221 0.175390 -0.2837687 0.0010848 -0.000503 0.000122 0.000094 0.000093 0.0000092 0.0000118 0.000082 0.000072 2002 12 27 52635 -0.076460 0.177046 -0.2849012 0.0012034 -0.000386 0.000231 0.000095 0.000092 0.0000086 0.0000121 0.000082 0.000072 2002 12 28 52636 -0.078727 0.179021 -0.2860832 0.0011915 -0.000258 0.000297 0.000096 0.000093 0.0000071 0.0000129 0.000082 0.000071 2002 12 29 52637 -0.081122 0.181369 -0.2871982 0.0010845 -0.000146 0.000303 0.000101 0.000098 0.0000052 0.0000135 0.000082 0.000071 2002 12 30 52638 -0.083457 0.183430 -0.2881549 0.0008553 -0.000067 0.000251 0.000103 0.000099 0.0000033 0.0000132 0.000081 0.000071 2002 12 31 52639 -0.085668 0.185680 -0.2889044 0.0006327 -0.000026 0.000158 0.000098 0.000096 0.0000014 0.0000128 0.000081 0.000071 2003 1 1 52640 -0.088455 0.188143 -0.2894462 0.0004478 -0.000020 0.000051 0.000100 0.000098 0.0000009 0.0000129 0.000080 0.000069 2003 1 2 52641 -0.091534 0.190448 -0.2898229 0.0003297 -0.000030 -0.000037 0.000102 0.000100 0.0000007 0.0000129 0.000079 0.000067 2003 1 3 52642 -0.094435 0.192852 -0.2901104 0.0003144 -0.000041 -0.000083 0.000099 0.000097 0.0000006 0.0000129 0.000078 0.000065 2003 1 4 52643 -0.097562 0.195410 -0.2904026 0.0003740 -0.000038 -0.000075 0.000102 0.000099 0.0000005 0.0000133 0.000072 0.000059 2003 1 5 52644 -0.100609 0.197600 -0.2907892 0.0004474 -0.000029 -0.000036 0.000112 0.000108 0.0000004 0.0000138 0.000063 0.000053 2003 1 6 52645 -0.103513 0.199545 -0.2913281 0.0005883 -0.000024 -0.000001 0.000113 0.000111 0.0000004 0.0000131 0.000054 0.000046 2003 1 7 52646 -0.105933 0.201451 -0.2920264 0.0007777 -0.000029 0.000011 0.000103 0.000103 0.0000003 0.0000120 0.000046 0.000039 2003 1 8 52647 -0.108553 0.203596 -0.2928461 0.0008565 -0.000061 -0.000032 0.000099 0.000100 0.0000041 0.0000114 0.000051 0.000060 2003 1 9 52648 -0.111054 0.205660 -0.2937305 0.0008758 -0.000093 -0.000086 0.000100 0.000100 0.0000069 0.0000111 0.000058 0.000088 2003 1 10 52649 -0.113141 0.208140 -0.2946344 0.0009208 -0.000063 -0.000082 0.000101 0.000101 0.0000018 0.0000114 0.000076 0.000075 2003 1 11 52650 -0.115221 0.210551 -0.2955339 0.0009051 -0.000050 -0.000054 0.000104 0.000104 0.0000005 0.0000120 0.000078 0.000065 2003 1 12 52651 -0.117280 0.212885 -0.2964079 0.0008349 -0.000053 -0.000015 0.000108 0.000108 0.0000005 0.0000120 0.000074 0.000061 2003 1 13 52652 -0.118980 0.214962 -0.2972175 0.0007167 -0.000060 0.000020 0.000108 0.000107 0.0000004 0.0000113 0.000069 0.000058 2003 1 14 52653 -0.120344 0.217095 -0.2979055 0.0005744 -0.000065 0.000033 0.000102 0.000103 0.0000004 0.0000109 0.000065 0.000054 2003 1 15 52654 -0.121680 0.219400 -0.2984238 0.0004224 -0.000051 0.000006 0.000103 0.000104 0.0000004 0.0000108 0.000064 0.000055 2003 1 16 52655 -0.122915 0.221760 -0.2987682 0.0002878 -0.000033 -0.000035 0.000103 0.000104 0.0000004 0.0000108 0.000065 0.000057 2003 1 17 52656 -0.124248 0.224294 -0.2989957 0.0001778 -0.000044 -0.000029 0.000099 0.000101 0.0000004 0.0000109 0.000070 0.000055 2003 1 18 52657 -0.126081 0.226712 -0.2992097 0.0002175 -0.000047 -0.000037 0.000104 0.000105 0.0000008 0.0000112 0.000120 0.000099 2003 1 19 52658 -0.127691 0.229002 -0.2995015 0.0003663 -0.000051 -0.000049 0.000113 0.000113 0.0000013 0.0000116 0.000185 0.000160 2003 1 20 52659 -0.128823 0.231200 -0.2999192 0.0004924 -0.000064 -0.000044 0.000115 0.000115 0.0000018 0.0000113 0.000251 0.000221 2003 1 21 52660 -0.129910 0.233699 -0.3004748 0.0006204 -0.000080 -0.000018 0.000115 0.000115 0.0000023 0.0000111 0.000317 0.000282 2003 1 22 52661 -0.130982 0.236530 -0.3011631 0.0007517 -0.000142 0.000047 0.000112 0.000113 0.0000008 0.0000113 0.000138 0.000117 2003 1 23 52662 -0.132184 0.239939 -0.3019734 0.0008727 -0.000127 0.000099 0.000112 0.000112 0.0000012 0.0000113 0.000152 0.000133 2003 1 24 52663 -0.133613 0.242580 -0.3028622 0.0009091 -0.000031 0.000140 0.000115 0.000114 0.0000009 0.0000115 0.000148 0.000116 2003 1 25 52664 -0.135124 0.245034 -0.3037480 0.0008199 0.000012 0.000129 0.000118 0.000117 0.0000006 0.0000120 0.000125 0.000094 2003 1 26 52665 -0.136838 0.247223 -0.3045142 0.0006262 0.000004 0.000081 0.000120 0.000118 0.0000005 0.0000120 0.000103 0.000079 2003 1 27 52666 -0.138125 0.249554 -0.3050537 0.0004358 -0.000034 0.000023 0.000118 0.000116 0.0000004 0.0000114 0.000082 0.000063 2003 1 28 52667 -0.138993 0.252302 -0.3053298 0.0001829 -0.000087 -0.000024 0.000113 0.000111 0.0000003 0.0000112 0.000060 0.000048 2003 1 29 52668 -0.139327 0.255308 -0.3054006 0.0000126 -0.000109 -0.000001 0.000108 0.000106 0.0000007 0.0000114 0.000066 0.000059 2003 1 30 52669 -0.139385 0.258390 -0.3053955 -0.0000381 -0.000182 -0.000004 0.000112 0.000109 0.0000098 0.0000117 0.000083 0.000079 2003 1 31 52670 -0.139852 0.261504 -0.3053579 -0.0000247 -0.000168 -0.000066 0.000113 0.000110 0.0000039 0.0000116 0.000102 0.000079 2003 2 1 52671 -0.141145 0.264256 -0.3053316 0.0000212 -0.000179 -0.000072 0.000117 0.000114 0.0000007 0.0000120 0.000100 0.000073 2003 2 2 52672 -0.142590 0.266951 -0.3054052 0.0001835 -0.000198 -0.000027 0.000125 0.000121 0.0000006 0.0000128 0.000088 0.000068 2003 2 3 52673 -0.144065 0.269912 -0.3056708 0.0003703 -0.000184 0.000038 0.000122 0.000119 0.0000005 0.0000128 0.000077 0.000063 2003 2 4 52674 -0.145347 0.272789 -0.3061757 0.0005832 -0.000130 0.000099 0.000116 0.000116 0.0000004 0.0000125 0.000066 0.000059 2003 2 5 52675 -0.146068 0.275576 -0.3068739 0.0007737 -0.000003 0.000111 0.000111 0.000112 0.0000008 0.0000124 0.000064 0.000052 2003 2 6 52676 -0.147310 0.278286 -0.3076090 0.0007962 0.000108 0.000106 0.000116 0.000116 0.0000530 0.0000123 0.000124 0.000101 2003 2 7 52677 -0.148371 0.280624 -0.3084107 0.0007390 0.000061 0.000071 0.000120 0.000121 0.0000187 0.0000123 0.000097 0.000081 2003 2 8 52678 -0.149577 0.283473 -0.3091843 0.0006674 -0.000033 0.000040 0.000122 0.000122 0.0000005 0.0000132 0.000081 0.000067 2003 2 9 52679 -0.151319 0.286158 -0.3098126 0.0005526 -0.000121 0.000022 0.000124 0.000124 0.0000005 0.0000138 0.000081 0.000066 2003 2 10 52680 -0.152938 0.288824 -0.3102739 0.0004275 -0.000164 0.000013 0.000124 0.000125 0.0000005 0.0000131 0.000082 0.000064 2003 2 11 52681 -0.154236 0.291603 -0.3105941 0.0002965 -0.000138 0.000006 0.000118 0.000119 0.0000005 0.0000125 0.000082 0.000063 2003 2 12 52682 -0.155346 0.294264 -0.3108365 0.0002219 -0.000014 -0.000002 0.000110 0.000112 0.0000004 0.0000123 0.000075 0.000059 2003 2 13 52683 -0.155873 0.297061 -0.3110784 0.0002679 0.000113 -0.000022 0.000108 0.000109 0.0000004 0.0000122 0.000066 0.000054 2003 2 14 52684 -0.156220 0.299682 -0.3113769 0.0003343 0.000072 -0.000098 0.000105 0.000106 0.0000005 0.0000126 0.000082 0.000061 2003 2 15 52685 -0.156334 0.302331 -0.3117503 0.0003876 0.000002 -0.000113 0.000112 0.000112 0.0000042 0.0000135 0.000083 0.000060 2003 2 16 52686 -0.156311 0.304810 -0.3122332 0.0005503 -0.000066 -0.000071 0.000120 0.000117 0.0000092 0.0000136 0.000075 0.000055 2003 2 17 52687 -0.155761 0.307222 -0.3128966 0.0008339 -0.000118 -0.000006 0.000122 0.000118 0.0000142 0.0000129 0.000066 0.000050 2003 2 18 52688 -0.155213 0.310284 -0.3138018 0.0010638 -0.000132 0.000054 0.000121 0.000118 0.0000155 0.0000125 0.000058 0.000045 2003 2 19 52689 -0.154942 0.313790 -0.3149378 0.0012233 -0.000103 0.000080 0.000112 0.000111 0.0000029 0.0000126 0.000051 0.000040 2003 2 20 52690 -0.154645 0.317715 -0.3161980 0.0012659 -0.000043 0.000037 0.000110 0.000108 0.0000004 0.0000124 0.000068 0.000053 2003 2 21 52691 -0.155073 0.321669 -0.3174328 0.0011801 0.000019 -0.000031 0.000113 0.000109 0.0000005 0.0000121 0.000092 0.000070 2003 2 22 52692 -0.155469 0.324610 -0.3185104 0.0009762 0.000050 -0.000048 0.000115 0.000110 0.0000005 0.0000127 0.000092 0.000070 2003 2 23 52693 -0.155413 0.327551 -0.3193548 0.0007053 0.000045 -0.000032 0.000117 0.000111 0.0000005 0.0000137 0.000082 0.000063 2003 2 24 52694 -0.155053 0.330611 -0.3199551 0.0004757 0.000013 -0.000012 0.000113 0.000106 0.0000004 0.0000132 0.000072 0.000056 2003 2 25 52695 -0.154647 0.333616 -0.3203499 0.0003251 -0.000024 0.000000 0.000106 0.000102 0.0000003 0.0000125 0.000062 0.000049 2003 2 26 52696 -0.154558 0.336616 -0.3206078 0.0002359 -0.000057 -0.000063 0.000104 0.000101 0.0000067 0.0000124 0.000067 0.000063 2003 2 27 52697 -0.154642 0.339451 -0.3208162 0.0002062 -0.000054 -0.000115 0.000111 0.000107 0.0000113 0.0000128 0.000076 0.000081 2003 2 28 52698 -0.154302 0.342331 -0.3210511 0.0002552 0.000049 0.000038 0.000109 0.000105 0.0000031 0.0000129 0.000100 0.000087 2003 3 1 52699 -0.153838 0.344827 -0.3213569 0.0003317 0.000109 0.000130 0.000111 0.000106 0.0000008 0.0000135 0.000097 0.000078 2003 3 2 52700 -0.153118 0.347346 -0.3217675 0.0004730 0.000105 0.000140 0.000116 0.000108 0.0000006 0.0000139 0.000082 0.000066 2003 3 3 52701 -0.152823 0.350457 -0.3222985 0.0006105 0.000052 0.000105 0.000115 0.000106 0.0000004 0.0000132 0.000067 0.000054 2003 3 4 52702 -0.153085 0.353379 -0.3229326 0.0006633 -0.000032 0.000048 0.000104 0.000100 0.0000003 0.0000125 0.000053 0.000042 2003 3 5 52703 -0.153359 0.356029 -0.3236255 0.0006950 -0.000122 0.000003 0.000098 0.000094 0.0000618 0.0000120 0.000959 0.003749 2003 3 6 52704 -0.153775 0.358552 -0.3243252 0.0006944 -0.000162 0.000028 0.000105 0.000099 0.0000488 0.0000121 0.000789 0.003018 2003 3 7 52705 -0.154111 0.360925 -0.3249974 0.0006687 -0.000158 0.000090 0.000107 0.000101 0.0000108 0.0000127 0.000232 0.000697 2003 3 8 52706 -0.154509 0.363735 -0.3256257 0.0006161 -0.000137 0.000133 0.000111 0.000104 0.0000004 0.0000134 0.000076 0.000064 2003 3 9 52707 -0.154807 0.366534 -0.3261966 0.0005412 -0.000104 0.000152 0.000113 0.000106 0.0000004 0.0000138 0.000069 0.000057 2003 3 10 52708 -0.154874 0.369534 -0.3266955 0.0004371 -0.000064 0.000151 0.000111 0.000104 0.0000003 0.0000132 0.000062 0.000051 2003 3 11 52709 -0.155595 0.372651 -0.3271133 0.0003377 -0.000024 0.000138 0.000101 0.000098 0.0000003 0.0000125 0.000055 0.000044 2003 3 12 52710 -0.156473 0.375689 -0.3274591 0.0003116 0.000017 0.000132 0.000099 0.000096 0.0000003 0.0000123 0.000050 0.000039 2003 3 13 52711 -0.157015 0.378795 -0.3277714 0.0003277 0.000053 0.000138 0.000099 0.000097 0.0000003 0.0000125 0.000046 0.000034 2003 3 14 52712 -0.157399 0.381645 -0.3281226 0.0004167 0.000067 0.000146 0.000098 0.000097 0.0000006 0.0000128 0.000081 0.000072 2003 3 15 52713 -0.157178 0.384143 -0.3286105 0.0005821 0.000093 0.000166 0.000107 0.000104 0.0000006 0.0000134 0.000086 0.000079 2003 3 16 52714 -0.156928 0.387120 -0.3293381 0.0008402 0.000111 0.000175 0.000106 0.000103 0.0000005 0.0000133 0.000075 0.000069 2003 3 17 52715 -0.156690 0.389903 -0.3303731 0.0011897 0.000101 0.000154 0.000098 0.000097 0.0000004 0.0000123 0.000064 0.000059 2003 3 18 52716 -0.155993 0.392872 -0.3317047 0.0014471 0.000064 0.000102 0.000091 0.000091 0.0000003 0.0000116 0.000053 0.000048 2003 3 19 52717 -0.154949 0.395930 -0.3332275 0.0015439 -0.000068 -0.000020 0.000088 0.000089 0.0000011 0.0000113 0.000127 0.000090 2003 3 20 52718 -0.153801 0.399810 -0.3347681 0.0014733 -0.000077 -0.000064 0.000093 0.000093 0.0000010 0.0000115 0.000117 0.000088 2003 3 21 52719 -0.153144 0.403651 -0.3361580 0.0012510 -0.000020 -0.000051 0.000092 0.000092 0.0000005 0.0000117 0.000077 0.000070 2003 3 22 52720 -0.152319 0.406781 -0.3372859 0.0009586 -0.000005 -0.000024 0.000094 0.000095 0.0000004 0.0000122 0.000065 0.000061 2003 3 23 52721 -0.151488 0.409790 -0.3381106 0.0006414 -0.000009 0.000000 0.000095 0.000097 0.0000004 0.0000125 0.000063 0.000056 2003 3 24 52722 -0.150545 0.412605 -0.3386578 0.0004087 -0.000006 0.000009 0.000087 0.000089 0.0000004 0.0000117 0.000062 0.000051 2003 3 25 52723 -0.149047 0.415556 -0.3390036 0.0002579 0.000012 0.000001 0.000084 0.000086 0.0000004 0.0000113 0.000060 0.000047 2003 3 26 52724 -0.147561 0.418506 -0.3392554 0.0002225 0.000113 -0.000062 0.000084 0.000086 0.0000004 0.0000113 0.000055 0.000060 2003 3 27 52725 -0.145727 0.421293 -0.3395330 0.0003188 0.000145 -0.000042 0.000083 0.000087 0.0000005 0.0000112 0.000071 0.000055 2003 3 28 52726 -0.143330 0.424216 -0.3399321 0.0004704 0.000087 0.000011 0.000085 0.000089 0.0000006 0.0000111 0.000074 0.000064 2003 3 29 52727 -0.140608 0.427064 -0.3404846 0.0005943 0.000021 0.000024 0.000091 0.000095 0.0000006 0.0000117 0.000072 0.000066 2003 3 30 52728 -0.137797 0.430046 -0.3411819 0.0007770 -0.000026 0.000004 0.000090 0.000094 0.0000005 0.0000121 0.000070 0.000064 2003 3 31 52729 -0.135357 0.433063 -0.3420030 0.0008842 -0.000038 -0.000029 0.000081 0.000084 0.0000005 0.0000113 0.000068 0.000061 2003 4 1 52730 -0.133311 0.435808 -0.3429200 0.0009437 -0.000005 -0.000056 0.000077 0.000079 0.0000005 0.0000106 0.000065 0.000059 2003 4 2 52731 -0.131262 0.438768 -0.3438931 0.0010055 0.000071 -0.000046 0.000077 0.000079 0.0000025 0.0000103 0.000070 0.000065 2003 4 3 52732 -0.129043 0.441939 -0.3448663 0.0009912 0.000153 -0.000004 0.000078 0.000080 0.0000039 0.0000103 0.000077 0.000074 2003 4 4 52733 -0.126962 0.444910 -0.3457859 0.0008673 0.000207 0.000056 0.000080 0.000082 0.0000013 0.0000106 0.000084 0.000082 2003 4 5 52734 -0.124658 0.447705 -0.3466162 0.0007951 0.000200 0.000113 0.000082 0.000085 0.0000005 0.0000111 0.000080 0.000077 2003 4 6 52735 -0.122092 0.450925 -0.3473313 0.0006786 0.000156 0.000152 0.000085 0.000087 0.0000005 0.0000114 0.000072 0.000067 2003 4 7 52736 -0.119780 0.454294 -0.3479135 0.0005145 0.000111 0.000170 0.000084 0.000087 0.0000004 0.0000111 0.000063 0.000056 2003 4 8 52737 -0.117692 0.457169 -0.3483630 0.0003801 0.000093 0.000164 0.000081 0.000084 0.0000004 0.0000107 0.000055 0.000046 2003 4 9 52738 -0.116129 0.459931 -0.3487095 0.0003100 0.000155 0.000139 0.000080 0.000082 0.0000018 0.0000107 0.000163 0.000163 2003 4 10 52739 -0.114690 0.462574 -0.3490183 0.0003487 0.000203 0.000113 0.000083 0.000085 0.0000026 0.0000107 0.000175 0.000140 2003 4 11 52740 -0.113298 0.465081 -0.3494070 0.0004555 0.000172 0.000079 0.000083 0.000085 0.0000012 0.0000110 0.000101 0.000092 2003 4 12 52741 -0.111392 0.467662 -0.3499629 0.0006547 0.000136 0.000053 0.000086 0.000086 0.0000037 0.0000117 0.000072 0.000075 2003 4 13 52742 -0.109344 0.470584 -0.3507637 0.0009339 0.000105 0.000039 0.000088 0.000087 0.0000040 0.0000123 0.000067 0.000065 2003 4 14 52743 -0.107196 0.473001 -0.3518609 0.0012427 0.000079 0.000038 0.000087 0.000086 0.0000023 0.0000120 0.000062 0.000056 2003 4 15 52744 -0.105321 0.475535 -0.3532216 0.0014564 0.000067 0.000044 0.000084 0.000084 0.0000006 0.0000114 0.000058 0.000046 2003 4 16 52745 -0.103936 0.477620 -0.3547132 0.0014975 0.000066 0.000057 0.000082 0.000082 0.0000004 0.0000114 0.000059 0.000051 2003 4 17 52746 -0.102297 0.479472 -0.3561307 0.0012933 0.000075 0.000064 0.000083 0.000082 0.0000005 0.0000115 0.000061 0.000058 2003 4 18 52747 -0.100311 0.481377 -0.3572944 0.0010105 0.000092 0.000056 0.000084 0.000083 0.0000049 0.0000117 0.000062 0.000059 2003 4 19 52748 -0.098112 0.483633 -0.3581541 0.0006524 0.000106 0.000036 0.000091 0.000088 0.0000078 0.0000124 0.000062 0.000057 2003 4 20 52749 -0.095480 0.485850 -0.3586520 0.0003243 0.000113 0.000011 0.000094 0.000090 0.0000038 0.0000128 0.000062 0.000055 2003 4 21 52750 -0.093112 0.487984 -0.3588084 0.0000895 0.000109 -0.000009 0.000085 0.000082 0.0000022 0.0000118 0.000062 0.000053 2003 4 22 52751 -0.090742 0.489870 -0.3588676 0.0000106 0.000100 -0.000016 0.000079 0.000077 0.0000006 0.0000113 0.000062 0.000051 2003 4 23 52752 -0.088581 0.491983 -0.3589906 0.0000666 0.000078 0.000002 0.000078 0.000076 0.0000441 0.0000113 0.000145 0.000130 2003 4 24 52753 -0.085992 0.493957 -0.3590500 0.0001634 0.000083 0.000010 0.000077 0.000076 0.0000140 0.0000113 0.000078 0.000072 2003 4 25 52754 -0.082804 0.495924 -0.3592751 0.0003364 0.000104 0.000038 0.000075 0.000075 0.0000004 0.0000115 0.000053 0.000050 2003 4 26 52755 -0.080028 0.498257 -0.3597168 0.0004744 0.000121 0.000047 0.000080 0.000079 0.0000004 0.0000121 0.000056 0.000052 2003 4 27 52756 -0.077688 0.500314 -0.3602786 0.0006109 0.000128 0.000038 0.000083 0.000081 0.0000004 0.0000126 0.000058 0.000053 2003 4 28 52757 -0.075214 0.502657 -0.3609274 0.0007140 0.000123 0.000024 0.000079 0.000076 0.0000003 0.0000117 0.000060 0.000054 2003 4 29 52758 -0.072893 0.504640 -0.3616483 0.0007629 0.000106 0.000017 0.000075 0.000073 0.0000003 0.0000110 0.000062 0.000054 2003 4 30 52759 -0.070318 0.506411 -0.3624052 0.0007557 0.000083 0.000036 0.000075 0.000072 0.0000004 0.0000111 0.000066 0.000060 2003 5 1 52760 -0.066919 0.508209 -0.3631011 0.0006286 0.000072 0.000063 0.000077 0.000075 0.0000039 0.0000114 0.000065 0.000061 2003 5 2 52761 -0.063124 0.510122 -0.3636396 0.0004537 0.000082 0.000091 0.000080 0.000078 0.0000075 0.0000114 0.000062 0.000059 2003 5 3 52762 -0.059465 0.511755 -0.3639692 0.0002728 0.000110 0.000110 0.000080 0.000077 0.0000062 0.0000116 0.000059 0.000057 2003 5 4 52763 -0.056127 0.513660 -0.3641007 0.0000792 0.000150 0.000114 0.000078 0.000076 0.0000044 0.0000117 0.000056 0.000055 2003 5 5 52764 -0.053264 0.515650 -0.3641000 -0.0000836 0.000186 0.000104 0.000077 0.000075 0.0000026 0.0000109 0.000053 0.000053 2003 5 6 52765 -0.050200 0.517731 -0.3640270 -0.0001263 0.000198 0.000087 0.000074 0.000072 0.0000007 0.0000104 0.000050 0.000051 2003 5 7 52766 -0.047207 0.519928 -0.3639106 -0.0001099 0.000185 0.000055 0.000074 0.000073 0.0000004 0.0000104 0.000057 0.000054 2003 5 8 52767 -0.044717 0.521795 -0.3638256 -0.0000199 0.000124 0.000072 0.000073 0.000073 0.0000004 0.0000103 0.000046 0.000042 2003 5 9 52768 -0.042161 0.523521 -0.3639063 0.0001666 0.000038 0.000103 0.000070 0.000071 0.0000005 0.0000102 0.000061 0.000057 2003 5 10 52769 -0.039746 0.525308 -0.3642098 0.0003945 -0.000010 0.000123 0.000074 0.000074 0.0000050 0.0000106 0.000065 0.000061 2003 5 11 52770 -0.037732 0.526854 -0.3647162 0.0006286 -0.000008 0.000118 0.000078 0.000077 0.0000054 0.0000108 0.000060 0.000056 2003 5 12 52771 -0.036073 0.528114 -0.3654717 0.0009193 0.000038 0.000083 0.000079 0.000078 0.0000031 0.0000099 0.000056 0.000052 2003 5 13 52772 -0.034453 0.529539 -0.3665384 0.0011472 0.000108 0.000026 0.000075 0.000075 0.0000008 0.0000093 0.000051 0.000048 2003 5 14 52773 -0.032602 0.530797 -0.3678257 0.0012075 0.000178 -0.000045 0.000073 0.000073 0.0000703 0.0000090 0.000219 0.000474 2003 5 15 52774 -0.030447 0.532070 -0.3690148 0.0011075 0.000217 -0.000083 0.000075 0.000075 0.0000570 0.0000090 0.000196 0.000399 2003 5 16 52775 -0.028213 0.533348 -0.3699162 0.0008399 0.000222 -0.000071 0.000074 0.000075 0.0000125 0.0000093 0.000101 0.000135 2003 5 17 52776 -0.025899 0.534510 -0.3705407 0.0004880 0.000207 0.000001 0.000078 0.000078 0.0000027 0.0000097 0.000074 0.000063 2003 5 18 52777 -0.023603 0.535697 -0.3709082 0.0002263 0.000185 0.000093 0.000083 0.000083 0.0000030 0.0000096 0.000072 0.000062 2003 5 19 52778 -0.021298 0.536748 -0.3710913 0.0001343 0.000172 0.000155 0.000081 0.000080 0.0000018 0.0000088 0.000071 0.000061 2003 5 20 52779 -0.018574 0.537664 -0.3712252 0.0001703 0.000172 0.000159 0.000077 0.000076 0.0000007 0.0000086 0.000069 0.000060 2003 5 21 52780 -0.015426 0.538871 -0.3714275 0.0002529 0.000190 0.000054 0.000076 0.000076 0.0000006 0.0000089 0.000082 0.000085 2003 5 22 52781 -0.012516 0.539877 -0.3717470 0.0003836 0.000207 -0.000049 0.000077 0.000077 0.0000006 0.0000090 0.000079 0.000074 2003 5 23 52782 -0.009829 0.540805 -0.3721988 0.0005056 0.000161 -0.000062 0.000076 0.000076 0.0000005 0.0000090 0.000067 0.000060 2003 5 24 52783 -0.006947 0.541147 -0.3727707 0.0006139 0.000097 -0.000048 0.000081 0.000080 0.0000046 0.0000094 0.000061 0.000056 2003 5 25 52784 -0.003995 0.541445 -0.3734042 0.0006703 0.000037 -0.000028 0.000086 0.000085 0.0000054 0.0000101 0.000058 0.000054 2003 5 26 52785 -0.000956 0.541742 -0.3740389 0.0006466 -0.000004 -0.000018 0.000083 0.000082 0.0000038 0.0000100 0.000055 0.000052 2003 5 27 52786 0.002439 0.542257 -0.3746354 0.0005586 -0.000008 -0.000031 0.000080 0.000079 0.0000023 0.0000096 0.000053 0.000049 2003 5 28 52787 0.005904 0.542919 -0.3751569 0.0004577 0.000029 -0.000049 0.000078 0.000077 0.0000007 0.0000097 0.000049 0.000047 2003 5 29 52788 0.009373 0.543923 -0.3755548 0.0003288 0.000103 -0.000149 0.000079 0.000079 0.0000004 0.0000098 0.000060 0.000075 2003 5 30 52789 0.012530 0.544857 -0.3757788 0.0001416 0.000198 -0.000014 0.000080 0.000080 0.0000003 0.0000099 0.000067 0.000062 2003 5 31 52790 0.015657 0.545757 -0.3758075 -0.0000628 0.000268 0.000116 0.000080 0.000080 0.0000003 0.0000101 0.000065 0.000053 2003 6 1 52791 0.018465 0.546680 -0.3756590 -0.0002017 0.000303 0.000185 0.000084 0.000083 0.0000003 0.0000105 0.000062 0.000051 2003 6 2 52792 0.021347 0.547220 -0.3753692 -0.0003463 0.000304 0.000193 0.000084 0.000083 0.0000003 0.0000102 0.000059 0.000049 2003 6 3 52793 0.024365 0.547808 -0.3749753 -0.0004546 0.000276 0.000135 0.000079 0.000078 0.0000003 0.0000098 0.000055 0.000047 2003 6 4 52794 0.027770 0.547979 -0.3745220 -0.0004735 0.000235 0.000033 0.000077 0.000076 0.0000062 0.0000097 0.000060 0.000052 2003 6 5 52795 0.031554 0.548099 -0.3740751 -0.0004086 0.000177 -0.000061 0.000081 0.000080 0.0000105 0.0000098 0.000068 0.000059 2003 6 6 52796 0.035026 0.548086 -0.3737483 -0.0002281 0.000106 -0.000104 0.000081 0.000080 0.0000027 0.0000100 0.000076 0.000067 2003 6 7 52797 0.038188 0.548081 -0.3736725 0.0000337 0.000026 -0.000065 0.000080 0.000080 0.0000125 0.0000103 0.000078 0.000068 2003 6 8 52798 0.041400 0.548065 -0.3738620 0.0002827 -0.000030 0.000021 0.000082 0.000081 0.0000141 0.0000103 0.000079 0.000066 2003 6 9 52799 0.044823 0.548146 -0.3742579 0.0004761 -0.000029 0.000096 0.000080 0.000080 0.0000079 0.0000098 0.000080 0.000065 2003 6 10 52800 0.048347 0.548216 -0.3747715 0.0005186 0.000044 0.000113 0.000079 0.000079 0.0000017 0.0000094 0.000081 0.000064 2003 6 11 52801 0.051780 0.548398 -0.3752737 0.0004039 0.000191 0.000027 0.000079 0.000078 0.0000062 0.0000092 0.000134 0.000099 2003 6 12 52802 0.055249 0.547937 -0.3756025 0.0001911 0.000352 -0.000118 0.000077 0.000077 0.0000105 0.0000092 0.000200 0.000145 2003 6 13 52803 0.058745 0.547521 -0.3756279 -0.0001192 0.000464 -0.000261 0.000078 0.000079 0.0000038 0.0000091 0.000266 0.000190 2003 6 14 52804 0.062105 0.546872 -0.3753199 -0.0004257 0.000468 -0.000332 0.000080 0.000080 0.0000083 0.0000091 0.000244 0.000178 2003 6 15 52805 0.065872 0.546382 -0.3747472 -0.0006377 0.000369 -0.000319 0.000078 0.000079 0.0000088 0.0000091 0.000190 0.000144 2003 6 16 52806 0.069747 0.545830 -0.3740622 -0.0007176 0.000212 -0.000245 0.000075 0.000076 0.0000051 0.0000089 0.000135 0.000110 2003 6 17 52807 0.074108 0.545252 -0.3734221 -0.0006453 0.000065 -0.000153 0.000074 0.000075 0.0000014 0.0000090 0.000081 0.000076 2003 6 18 52808 0.078579 0.545143 -0.3729028 -0.0004977 -0.000042 -0.000080 0.000075 0.000076 0.0000015 0.0000094 0.000204 0.000186 2003 6 19 52809 0.083048 0.544892 -0.3724763 -0.0003270 0.000001 -0.000096 0.000074 0.000075 0.0000009 0.0000097 0.000096 0.000089 2003 6 20 52810 0.087733 0.544759 -0.3722287 -0.0001619 0.000224 -0.000200 0.000074 0.000074 0.0000008 0.0000098 0.000113 0.000114 2003 6 21 52811 0.092004 0.544704 -0.3721830 -0.0000824 0.000400 -0.000305 0.000077 0.000076 0.0000008 0.0000101 0.000125 0.000124 2003 6 22 52812 0.095894 0.544296 -0.3722095 -0.0000379 0.000464 -0.000342 0.000079 0.000077 0.0000007 0.0000105 0.000110 0.000105 2003 6 23 52813 0.099868 0.543828 -0.3721350 -0.0000899 0.000409 -0.000272 0.000077 0.000076 0.0000006 0.0000101 0.000094 0.000085 2003 6 24 52814 0.103533 0.543340 -0.3718510 -0.0002115 0.000260 -0.000110 0.000075 0.000075 0.0000005 0.0000097 0.000079 0.000066 2003 6 25 52815 0.107291 0.542669 -0.3714199 -0.0003197 -0.000034 0.000236 0.000075 0.000075 0.0000456 0.0000097 0.000121 0.000109 2003 6 26 52816 0.110962 0.542300 -0.3711191 -0.0004742 -0.000095 0.000320 0.000076 0.000076 0.0000060 0.0000098 0.000133 0.000113 2003 6 27 52817 0.114764 0.541689 -0.3705716 -0.0006053 0.000001 0.000211 0.000078 0.000077 0.0000020 0.0000099 0.000132 0.000100 2003 6 28 52818 0.118653 0.541251 -0.3698659 -0.0007634 0.000092 0.000082 0.000080 0.000079 0.0000037 0.0000103 0.000121 0.000089 2003 6 29 52819 0.122652 0.540605 -0.3690520 -0.0008735 0.000166 -0.000042 0.000086 0.000085 0.0000040 0.0000107 0.000106 0.000080 2003 6 30 52820 0.126785 0.540072 -0.3681448 -0.0008997 0.000217 -0.000127 0.000087 0.000087 0.0000023 0.0000100 0.000091 0.000070 2003 7 1 52821 0.130443 0.539525 -0.3672291 -0.0008814 0.000236 -0.000151 0.000083 0.000083 0.0000007 0.0000093 0.000076 0.000060 2003 7 2 52822 0.133949 0.538798 -0.3663916 -0.0007761 0.000231 -0.000122 0.000083 0.000083 0.0000005 0.0000090 0.000083 0.000067 2003 7 3 52823 0.136997 0.537743 -0.3656859 -0.0006336 0.000225 -0.000063 0.000085 0.000084 0.0000006 0.0000089 0.000094 0.000078 2003 7 4 52824 0.139958 0.536091 -0.3651353 -0.0004750 0.000250 -0.000011 0.000086 0.000085 0.0000006 0.0000091 0.000095 0.000080 2003 7 5 52825 0.143100 0.534301 -0.3647496 -0.0003113 0.000286 0.000008 0.000087 0.000087 0.0000006 0.0000096 0.000091 0.000080 2003 7 6 52826 0.146590 0.532819 -0.3645169 -0.0001739 0.000307 -0.000015 0.000088 0.000088 0.0000006 0.0000100 0.000087 0.000080 2003 7 7 52827 0.149627 0.531438 -0.3643852 -0.0001411 0.000295 -0.000073 0.000087 0.000087 0.0000006 0.0000097 0.000084 0.000080 2003 7 8 52828 0.153133 0.529941 -0.3642563 -0.0002059 0.000251 -0.000142 0.000084 0.000085 0.0000006 0.0000093 0.000080 0.000080 2003 7 9 52829 0.156679 0.528485 -0.3640067 -0.0003746 0.000153 -0.000200 0.000083 0.000084 0.0000005 0.0000091 0.000062 0.000062 2003 7 10 52830 0.160532 0.526820 -0.3635326 -0.0005924 0.000091 -0.000212 0.000081 0.000082 0.0000003 0.0000091 0.000041 0.000040 2003 7 11 52831 0.164039 0.525602 -0.3628087 -0.0008363 0.000238 -0.000148 0.000081 0.000082 0.0000007 0.0000092 0.000099 0.000074 2003 7 12 52832 0.167568 0.524121 -0.3619186 -0.0009651 0.000358 -0.000046 0.000087 0.000088 0.0000061 0.0000096 0.000109 0.000081 2003 7 13 52833 0.170631 0.522929 -0.3609610 -0.0009781 0.000412 0.000045 0.000090 0.000091 0.0000066 0.0000095 0.000093 0.000071 2003 7 14 52834 0.173188 0.521418 -0.3600304 -0.0008770 0.000407 0.000082 0.000088 0.000089 0.0000037 0.0000088 0.000077 0.000062 2003 7 15 52835 0.175717 0.519921 -0.3592229 -0.0007371 0.000341 0.000041 0.000084 0.000085 0.0000009 0.0000087 0.000061 0.000052 2003 7 16 52836 0.178249 0.518320 -0.3586135 -0.0005244 0.000245 -0.000103 0.000085 0.000086 0.0000008 0.0000091 0.000112 0.000105 2003 7 17 52837 0.181032 0.516798 -0.3582355 -0.0002982 0.000141 -0.000255 0.000089 0.000090 0.0000006 0.0000092 0.000086 0.000084 2003 7 18 52838 0.183603 0.514937 -0.3580241 -0.0001784 0.000022 -0.000345 0.000087 0.000088 0.0000005 0.0000091 0.000074 0.000067 2003 7 19 52839 0.186365 0.512850 -0.3578906 -0.0001299 -0.000095 -0.000378 0.000090 0.000089 0.0000005 0.0000094 0.000076 0.000067 2003 7 20 52840 0.189423 0.510847 -0.3577702 -0.0001355 -0.000155 -0.000371 0.000093 0.000092 0.0000005 0.0000098 0.000078 0.000069 2003 7 21 52841 0.192108 0.508782 -0.3576181 -0.0001999 -0.000117 -0.000343 0.000089 0.000089 0.0000005 0.0000096 0.000080 0.000071 2003 7 22 52842 0.194390 0.506512 -0.3573965 -0.0003019 0.000015 -0.000307 0.000084 0.000085 0.0000005 0.0000093 0.000082 0.000073 2003 7 23 52843 0.197261 0.504048 -0.3570674 -0.0004012 0.000304 -0.000326 0.000083 0.000083 0.0000036 0.0000092 0.000097 0.000090 2003 7 24 52844 0.200013 0.501824 -0.3565978 -0.0005186 0.000559 -0.000320 0.000084 0.000084 0.0000058 0.0000092 0.000114 0.000112 2003 7 25 52845 0.202563 0.499769 -0.3560295 -0.0006179 0.000418 -0.000065 0.000085 0.000085 0.0000018 0.0000094 0.000105 0.000088 2003 7 26 52846 0.204786 0.497446 -0.3554746 -0.0006602 0.000254 0.000041 0.000089 0.000089 0.0000007 0.0000101 0.000096 0.000076 2003 7 27 52847 0.206903 0.494993 -0.3549295 -0.0006314 0.000136 0.000000 0.000091 0.000091 0.0000007 0.0000106 0.000090 0.000075 2003 7 28 52848 0.209014 0.492343 -0.3543164 -0.0005868 0.000074 -0.000108 0.000088 0.000088 0.0000007 0.0000100 0.000084 0.000073 2003 7 29 52849 0.211377 0.489443 -0.3536463 -0.0005027 0.000092 -0.000230 0.000085 0.000085 0.0000008 0.0000094 0.000078 0.000072 2003 7 30 52850 0.213843 0.486665 -0.3531171 -0.0002956 0.000295 -0.000210 0.000083 0.000083 0.0000392 0.0000094 0.000142 0.000104 2003 7 31 52851 0.216600 0.484096 -0.3530723 -0.0000692 0.000327 -0.000245 0.000084 0.000084 0.0000075 0.0000095 0.000131 0.000095 2003 8 1 52852 0.219180 0.481784 -0.3531154 0.0001208 0.000253 -0.000297 0.000084 0.000085 0.0000021 0.0000098 0.000093 0.000071 2003 8 2 52853 0.221509 0.479730 -0.3532677 0.0002825 0.000203 -0.000309 0.000086 0.000087 0.0000006 0.0000102 0.000080 0.000065 2003 8 3 52854 0.223035 0.477488 -0.3535927 0.0003652 0.000178 -0.000293 0.000086 0.000086 0.0000007 0.0000101 0.000076 0.000065 2003 8 4 52855 0.224884 0.474941 -0.3539993 0.0003415 0.000178 -0.000266 0.000082 0.000082 0.0000007 0.0000094 0.000071 0.000065 2003 8 5 52856 0.226452 0.472621 -0.3543110 0.0001589 0.000199 -0.000240 0.000079 0.000079 0.0000007 0.0000090 0.000067 0.000065 2003 8 6 52857 0.228223 0.469798 -0.3543725 -0.0000720 0.000255 -0.000232 0.000079 0.000079 0.0000027 0.0000090 0.000074 0.000068 2003 8 7 52858 0.230166 0.466828 -0.3541592 -0.0002947 0.000273 -0.000254 0.000081 0.000081 0.0000042 0.0000092 0.000084 0.000072 2003 8 8 52859 0.232270 0.463887 -0.3537373 -0.0005087 0.000214 -0.000301 0.000081 0.000081 0.0000016 0.0000094 0.000095 0.000076 2003 8 9 52860 0.234068 0.461311 -0.3531838 -0.0006067 -0.000079 -0.000380 0.000084 0.000083 0.0000044 0.0000100 0.000097 0.000235 2003 8 10 52861 0.235967 0.459010 -0.3525975 -0.0005485 -0.000280 -0.000436 0.000087 0.000085 0.0000068 0.0000106 0.000099 0.000346 2003 8 11 52862 0.237731 0.457035 -0.3520934 -0.0003888 -0.000128 -0.000429 0.000087 0.000085 0.0000040 0.0000104 0.000101 0.000234 2003 8 12 52863 0.239609 0.454650 -0.3517699 -0.0002047 0.000127 -0.000388 0.000084 0.000082 0.0000012 0.0000100 0.000105 0.000121 2003 8 13 52864 0.241355 0.452374 -0.3516699 0.0000005 0.000272 -0.000287 0.000084 0.000082 0.0000074 0.0000100 0.000211 0.000212 2003 8 14 52865 0.243125 0.449924 -0.3517717 0.0001716 0.000364 -0.000275 0.000086 0.000084 0.0000076 0.0000102 0.000193 0.000185 2003 8 15 52866 0.244730 0.447662 -0.3519912 0.0002666 0.000386 -0.000293 0.000085 0.000083 0.0000021 0.0000102 0.000131 0.000108 2003 8 16 52867 0.245997 0.444967 -0.3522878 0.0003060 0.000340 -0.000237 0.000088 0.000085 0.0000006 0.0000106 0.000106 0.000082 2003 8 17 52868 0.247584 0.441934 -0.3526011 0.0003022 0.000253 -0.000162 0.000090 0.000088 0.0000006 0.0000109 0.000095 0.000076 2003 8 18 52869 0.249183 0.438859 -0.3528368 0.0001760 0.000158 -0.000130 0.000087 0.000086 0.0000006 0.0000103 0.000084 0.000069 2003 8 19 52870 0.250634 0.435653 -0.3529003 -0.0000456 0.000089 -0.000166 0.000084 0.000084 0.0000005 0.0000099 0.000073 0.000063 2003 8 20 52871 0.252320 0.432631 -0.3527362 -0.0002641 0.000067 -0.000343 0.000084 0.000083 0.0000019 0.0000098 0.000448 0.000104 2003 8 21 52872 0.253765 0.429949 -0.3523526 -0.0004469 0.000086 -0.000519 0.000085 0.000084 0.0000029 0.0000098 0.000922 0.000158 2003 8 22 52873 0.255074 0.427463 -0.3518304 -0.0005622 0.000131 -0.000470 0.000086 0.000084 0.0000012 0.0000100 0.000362 0.000117 2003 8 23 52874 0.255918 0.425174 -0.3512715 -0.0006186 0.000152 -0.000365 0.000088 0.000086 0.0000076 0.0000105 0.000115 0.000094 2003 8 24 52875 0.256985 0.422257 -0.3506570 -0.0006270 0.000135 -0.000259 0.000093 0.000089 0.0000085 0.0000114 0.000111 0.000089 2003 8 25 52876 0.258268 0.419030 -0.3500233 -0.0005385 0.000088 -0.000187 0.000094 0.000088 0.0000050 0.0000113 0.000107 0.000084 2003 8 26 52877 0.259383 0.415883 -0.3495284 -0.0003590 0.000036 -0.000180 0.000088 0.000084 0.0000014 0.0000106 0.000103 0.000079 2003 8 27 52878 0.260105 0.412555 -0.3493231 -0.0000645 -0.000041 -0.000260 0.000087 0.000083 0.0000306 0.0000106 0.000116 0.000108 2003 8 28 52879 0.261258 0.409204 -0.3494335 0.0003019 -0.000002 -0.000349 0.000088 0.000084 0.0000099 0.0000107 0.000100 0.000084 2003 8 29 52880 0.262390 0.406388 -0.3498553 0.0005523 0.000149 -0.000314 0.000087 0.000083 0.0000005 0.0000105 0.000092 0.000074 2003 8 30 52881 0.263393 0.403442 -0.3505586 0.0007327 0.000241 -0.000223 0.000090 0.000085 0.0000107 0.0000109 0.000086 0.000614 2003 8 31 52882 0.264458 0.400706 -0.3512691 0.0007558 0.000266 -0.000112 0.000093 0.000088 0.0000127 0.0000113 0.000078 0.001352 2003 9 1 52883 0.265302 0.397654 -0.3518278 0.0005789 0.000248 -0.000021 0.000092 0.000088 0.0000088 0.0000106 0.000070 0.002091 2003 9 2 52884 0.265637 0.394622 -0.3522933 0.0003343 0.000209 0.000018 0.000089 0.000085 0.0000050 0.0000100 0.000063 0.002829 2003 9 3 52885 0.265422 0.391429 -0.3526168 0.0000745 0.000180 -0.000050 0.000083 0.000081 0.0000011 0.0000099 0.000055 0.000564 2003 9 4 52886 0.265441 0.388134 -0.3526280 -0.0001278 0.000195 -0.000140 0.000084 0.000082 0.0000004 0.0000100 0.000190 0.000168 2003 9 5 52887 0.265286 0.384705 -0.3523737 -0.0002654 0.000247 -0.000197 0.000086 0.000083 0.0000004 0.0000100 0.000119 0.000109 2003 9 6 52888 0.265176 0.381022 -0.3520714 -0.0003051 0.000265 -0.000240 0.000088 0.000085 0.0000067 0.0000105 0.000074 0.000070 2003 9 7 52889 0.265109 0.377690 -0.3518035 -0.0002703 0.000252 -0.000263 0.000095 0.000090 0.0000074 0.0000107 0.000068 0.000064 2003 9 8 52890 0.264970 0.374399 -0.3516077 -0.0001068 0.000221 -0.000266 0.000096 0.000090 0.0000042 0.0000102 0.000063 0.000058 2003 9 9 52891 0.264757 0.371372 -0.3515630 0.0000911 0.000180 -0.000258 0.000090 0.000087 0.0000010 0.0000098 0.000058 0.000052 2003 9 10 52892 0.264466 0.368046 -0.3517232 0.0002522 0.000167 -0.000254 0.000089 0.000085 0.0000004 0.0000097 0.000066 0.000055 2003 9 11 52893 0.264759 0.364676 -0.3520560 0.0003760 0.000145 -0.000253 0.000088 0.000085 0.0000004 0.0000096 0.000079 0.000060 2003 9 12 52894 0.264519 0.361525 -0.3524596 0.0003765 0.000034 -0.000237 0.000086 0.000085 0.0000005 0.0000096 0.000086 0.000059 2003 9 13 52895 0.264285 0.358118 -0.3528330 0.0003117 -0.000052 -0.000242 0.000092 0.000090 0.0000072 0.0000102 0.000087 0.000061 2003 9 14 52896 0.264268 0.354946 -0.3531112 0.0002404 -0.000096 -0.000246 0.000091 0.000088 0.0000081 0.0000109 0.000087 0.000064 2003 9 15 52897 0.264287 0.351925 -0.3533030 0.0001655 -0.000100 -0.000228 0.000083 0.000081 0.0000046 0.0000105 0.000087 0.000067 2003 9 16 52898 0.264194 0.349070 -0.3534408 0.0000686 -0.000061 -0.000186 0.000080 0.000079 0.0000012 0.0000102 0.000088 0.000071 2003 9 17 52899 0.264066 0.346120 -0.3534944 -0.0000483 -0.000016 -0.000069 0.000080 0.000080 0.0000133 0.0000103 0.000210 0.000223 2003 9 18 52900 0.263969 0.343182 -0.3533537 -0.0001980 0.000082 -0.000030 0.000077 0.000078 0.0000044 0.0000103 0.000095 0.000091 2003 9 19 52901 0.263775 0.339969 -0.3530925 -0.0002884 0.000186 -0.000128 0.000076 0.000078 0.0000006 0.0000103 0.000078 0.000067 2003 9 20 52902 0.263106 0.336659 -0.3528078 -0.0002925 0.000259 -0.000178 0.000081 0.000082 0.0000063 0.0000107 0.000090 0.000079 2003 9 21 52903 0.262506 0.333050 -0.3525538 -0.0002327 0.000280 -0.000193 0.000083 0.000085 0.0000070 0.0000111 0.000089 0.000079 2003 9 22 52904 0.262611 0.329842 -0.3524116 -0.0000361 0.000242 -0.000218 0.000082 0.000086 0.0000040 0.0000108 0.000088 0.000078 2003 9 23 52905 0.262612 0.327199 -0.3524777 0.0002180 0.000166 -0.000256 0.000080 0.000083 0.0000011 0.0000103 0.000087 0.000077 2003 9 24 52906 0.261881 0.324339 -0.3528142 0.0004699 0.000007 -0.000421 0.000078 0.000082 0.0000059 0.0000103 0.000093 0.000104 2003 9 25 52907 0.260956 0.321030 -0.3534170 0.0007213 -0.000008 -0.000434 0.000078 0.000083 0.0000097 0.0000103 0.000082 0.000090 2003 9 26 52908 0.260037 0.317597 -0.3542383 0.0008983 0.000056 -0.000351 0.000078 0.000082 0.0000023 0.0000104 0.000066 0.000061 2003 9 27 52909 0.259608 0.314188 -0.3551839 0.0009097 0.000073 -0.000286 0.000080 0.000084 0.0000036 0.0000109 0.000060 0.000053 2003 9 28 52910 0.259437 0.311347 -0.3560839 0.0007794 0.000059 -0.000242 0.000086 0.000089 0.0000040 0.0000111 0.000057 0.000053 2003 9 29 52911 0.259217 0.308619 -0.3567954 0.0006137 0.000036 -0.000225 0.000088 0.000089 0.0000023 0.0000105 0.000055 0.000052 2003 9 30 52912 0.259108 0.306437 -0.3572646 0.0003988 0.000025 -0.000232 0.000085 0.000086 0.0000007 0.0000101 0.000052 0.000052 2003 10 1 52913 0.258454 0.304341 -0.3575054 0.0001466 0.000095 -0.000233 0.000084 0.000085 0.0000105 0.0000100 0.000122 0.000111 2003 10 2 52914 0.257368 0.301606 -0.3575639 -0.0000244 0.000186 -0.000224 0.000086 0.000087 0.0000177 0.0000100 0.000210 0.000185 2003 10 3 52915 0.256215 0.298911 -0.3575334 -0.0000212 0.000141 -0.000263 0.000086 0.000086 0.0000043 0.0000100 0.000136 0.000121 2003 10 4 52916 0.254915 0.296396 -0.3575515 0.0000710 0.000129 -0.000203 0.000089 0.000088 0.0000030 0.0000103 0.000094 0.000086 2003 10 5 52917 0.253566 0.293704 -0.3577127 0.0002585 0.000144 -0.000091 0.000092 0.000093 0.0000032 0.0000108 0.000084 0.000078 2003 10 6 52918 0.252293 0.290663 -0.3580655 0.0004424 0.000153 -0.000006 0.000089 0.000092 0.0000020 0.0000104 0.000074 0.000069 2003 10 7 52919 0.250868 0.287602 -0.3586150 0.0006232 0.000148 0.000005 0.000086 0.000088 0.0000008 0.0000098 0.000065 0.000061 2003 10 8 52920 0.249636 0.284860 -0.3593117 0.0007264 0.000109 -0.000132 0.000087 0.000088 0.0000008 0.0000097 0.000069 0.000072 2003 10 9 52921 0.248015 0.282258 -0.3600591 0.0007004 0.000057 -0.000311 0.000087 0.000088 0.0000010 0.0000097 0.000077 0.000088 2003 10 10 52922 0.246542 0.279458 -0.3607649 0.0006825 0.000023 -0.000361 0.000089 0.000090 0.0000006 0.0000100 0.000078 0.000072 2003 10 11 52923 0.244445 0.276720 -0.3613899 0.0005865 0.000002 -0.000334 0.000092 0.000093 0.0000004 0.0000105 0.000073 0.000062 2003 10 12 52924 0.242045 0.273878 -0.3619185 0.0004434 0.000003 -0.000254 0.000091 0.000089 0.0000004 0.0000106 0.000066 0.000057 2003 10 13 52925 0.239823 0.270901 -0.3623296 0.0003112 0.000027 -0.000157 0.000086 0.000083 0.0000004 0.0000099 0.000060 0.000052 2003 10 14 52926 0.237735 0.267713 -0.3625979 0.0001711 0.000068 -0.000092 0.000082 0.000081 0.0000003 0.0000094 0.000053 0.000047 2003 10 15 52927 0.235756 0.264412 -0.3627110 0.0000530 0.000131 -0.000088 0.000081 0.000079 0.0000005 0.0000093 0.000103 0.000088 2003 10 16 52928 0.233902 0.261255 -0.3626914 -0.0000554 0.000169 -0.000161 0.000082 0.000080 0.0000006 0.0000093 0.000105 0.000094 2003 10 17 52929 0.231794 0.258222 -0.3625975 -0.0000919 0.000186 -0.000256 0.000083 0.000080 0.0000007 0.0000095 0.000089 0.000084 2003 10 18 52930 0.229807 0.255198 -0.3625192 -0.0000378 0.000195 -0.000296 0.000084 0.000081 0.0000038 0.0000101 0.000078 0.000075 2003 10 19 52931 0.227930 0.252680 -0.3625663 0.0001456 0.000197 -0.000278 0.000092 0.000087 0.0000041 0.0000107 0.000070 0.000065 2003 10 20 52932 0.225996 0.250290 -0.3628362 0.0004307 0.000191 -0.000227 0.000095 0.000090 0.0000024 0.0000103 0.000061 0.000056 2003 10 21 52933 0.223984 0.247583 -0.3633886 0.0006991 0.000175 -0.000172 0.000089 0.000086 0.0000007 0.0000098 0.000052 0.000046 2003 10 22 52934 0.221934 0.244964 -0.3642329 0.0009756 0.000154 -0.000156 0.000090 0.000087 0.0000013 0.0000101 0.000105 0.000120 2003 10 23 52935 0.220226 0.242409 -0.3653239 0.0012246 0.000106 -0.000187 0.000093 0.000090 0.0000008 0.0000104 0.000076 0.000085 2003 10 24 52936 0.219315 0.240127 -0.3666086 0.0013381 0.000044 -0.000260 0.000092 0.000090 0.0000005 0.0000104 0.000072 0.000074 2003 10 25 52937 0.218576 0.237982 -0.3679116 0.0012658 -0.000017 -0.000308 0.000097 0.000092 0.0000054 0.0000109 0.000074 0.000074 2003 10 26 52938 0.218137 0.235924 -0.3691194 0.0010369 -0.000050 -0.000316 0.000098 0.000091 0.0000059 0.0000117 0.000072 0.000069 2003 10 27 52939 0.217139 0.233983 -0.3700383 0.0006784 -0.000041 -0.000298 0.000096 0.000089 0.0000034 0.0000115 0.000070 0.000064 2003 10 28 52940 0.215476 0.231809 -0.3704599 0.0003188 0.000005 -0.000275 0.000092 0.000086 0.0000009 0.0000111 0.000069 0.000059 2003 10 29 52941 0.213767 0.229474 -0.3704668 0.0000418 0.000122 -0.000227 0.000091 0.000086 0.0000336 0.0000114 0.000104 0.000121 2003 10 30 52942 0.212463 0.227162 -0.3705436 -0.0000697 0.000147 -0.000296 0.000097 0.000091 0.0000099 0.0000117 0.000109 0.000129 2003 10 31 52943 0.211064 0.225307 -0.3704398 -0.0000779 0.000106 -0.000401 0.000096 0.000090 0.0000028 0.0000114 0.000102 0.000115 2003 11 1 52944 0.209223 0.223595 -0.3703540 -0.0000288 0.000071 -0.000413 0.000096 0.000089 0.0000027 0.0000114 0.000093 0.000103 2003 11 2 52945 0.207245 0.221869 -0.3704315 0.0001444 0.000041 -0.000355 0.000094 0.000088 0.0000028 0.0000116 0.000084 0.000092 2003 11 3 52946 0.205027 0.219789 -0.3706861 0.0003496 0.000015 -0.000275 0.000087 0.000082 0.0000018 0.0000108 0.000074 0.000081 2003 11 4 52947 0.202748 0.217227 -0.3711034 0.0005151 0.000000 -0.000212 0.000081 0.000079 0.0000007 0.0000103 0.000065 0.000070 2003 11 5 52948 0.200257 0.214330 -0.3716365 0.0005724 -0.000079 -0.000236 0.000080 0.000079 0.0000486 0.0000103 0.000119 0.000121 2003 11 6 52949 0.198239 0.211366 -0.3722202 0.0005533 -0.000056 -0.000307 0.000080 0.000079 0.0000157 0.0000102 0.000134 0.000135 2003 11 7 52950 0.196268 0.208507 -0.3727460 0.0004749 0.000042 -0.000308 0.000078 0.000078 0.0000005 0.0000101 0.000081 0.000078 2003 11 8 52951 0.194592 0.205961 -0.3731734 0.0003828 0.000055 -0.000265 0.000082 0.000081 0.0000030 0.0000104 0.000062 0.000058 2003 11 9 52952 0.192682 0.203664 -0.3735105 0.0002636 0.000009 -0.000211 0.000084 0.000084 0.0000033 0.0000108 0.000061 0.000059 2003 11 10 52953 0.190270 0.201446 -0.3737330 0.0001324 -0.000046 -0.000171 0.000080 0.000081 0.0000020 0.0000103 0.000061 0.000059 2003 11 11 52954 0.187139 0.198913 -0.3738035 0.0000343 -0.000075 -0.000164 0.000079 0.000078 0.0000007 0.0000098 0.000061 0.000059 2003 11 12 52955 0.184454 0.196343 -0.3737411 -0.0000409 -0.000036 -0.000256 0.000077 0.000077 0.0000065 0.0000099 0.000177 0.000399 2003 11 13 52956 0.182103 0.194039 -0.3736721 -0.0000324 0.000052 -0.000317 0.000078 0.000078 0.0000111 0.0000101 0.000138 0.000290 2003 11 14 52957 0.179805 0.191613 -0.3736869 0.0000241 0.000165 -0.000221 0.000080 0.000079 0.0000029 0.0000103 0.000088 0.000084 2003 11 15 52958 0.177362 0.189382 -0.3737480 0.0001105 0.000187 -0.000174 0.000085 0.000083 0.0000043 0.0000106 0.000091 0.000080 2003 11 16 52959 0.175095 0.187273 -0.3739166 0.0002596 0.000143 -0.000170 0.000088 0.000086 0.0000047 0.0000104 0.000082 0.000071 2003 11 17 52960 0.172860 0.185725 -0.3742815 0.0004909 0.000088 -0.000186 0.000087 0.000084 0.0000028 0.0000097 0.000074 0.000063 2003 11 18 52961 0.170036 0.184049 -0.3748724 0.0006889 0.000057 -0.000211 0.000084 0.000082 0.0000009 0.0000095 0.000065 0.000054 2003 11 19 52962 0.167287 0.182050 -0.3756732 0.0008730 0.000144 -0.000217 0.000081 0.000079 0.0000058 0.0000095 0.000065 0.000048 2003 11 20 52963 0.164411 0.180709 -0.3766412 0.0010128 0.000222 -0.000191 0.000083 0.000080 0.0000172 0.0000095 0.000103 0.000082 2003 11 21 52964 0.161763 0.179438 -0.3776688 0.0010855 0.000187 -0.000220 0.000082 0.000080 0.0000040 0.0000095 0.000079 0.000072 2003 11 22 52965 0.159411 0.178624 -0.3787612 0.0010460 0.000173 -0.000247 0.000086 0.000083 0.0000021 0.0000098 0.000063 0.000062 2003 11 23 52966 0.156536 0.178018 -0.3797365 0.0007989 0.000164 -0.000260 0.000094 0.000090 0.0000023 0.0000104 0.000060 0.000058 2003 11 24 52967 0.153500 0.176967 -0.3803940 0.0004962 0.000128 -0.000261 0.000095 0.000091 0.0000014 0.0000100 0.000056 0.000055 2003 11 25 52968 0.149565 0.175831 -0.3807044 0.0002096 0.000060 -0.000251 0.000090 0.000088 0.0000006 0.0000096 0.000053 0.000052 2003 11 26 52969 0.145256 0.174384 -0.3807712 0.0000045 -0.000066 -0.000226 0.000088 0.000086 0.0000006 0.0000096 0.000089 0.000074 2003 11 27 52970 0.141130 0.173153 -0.3807317 -0.0000589 -0.000188 -0.000254 0.000090 0.000088 0.0000031 0.0000096 0.000943 0.000311 2003 11 28 52971 0.137947 0.171986 -0.3807100 0.0000423 -0.000267 -0.000290 0.000090 0.000088 0.0000066 0.0000097 0.002093 0.000625 2003 11 29 52972 0.134285 0.170890 -0.3807945 0.0002129 -0.000263 -0.000236 0.000092 0.000090 0.0000100 0.0000099 0.001718 0.000518 2003 11 30 52973 0.130388 0.169228 -0.3810300 0.0003477 -0.000202 -0.000171 0.000090 0.000089 0.0000087 0.0000099 0.001200 0.000372 2003 12 1 52974 0.126370 0.168059 -0.3814081 0.0004315 -0.000076 -0.000053 0.000344 0.000109 0.0000009 0.0000093 0.000053 0.000048 2003 12 2 52975 0.123154 0.166823 -0.3819303 0.0005232 -0.000036 -0.000112 0.000224 0.000108 0.0000006 0.0000094 0.000046 0.000041 2003 12 3 52976 0.120096 0.165623 -0.3824692 0.0005165 0.000006 -0.000166 0.000104 0.000106 0.0000022 0.0000095 0.000078 0.000075 2003 12 4 52977 0.116989 0.164656 -0.3829707 0.0004472 0.000018 -0.000209 0.000110 0.000111 0.0000023 0.0000095 0.000127 0.000101 2003 12 5 52978 0.114059 0.164079 -0.3833484 0.0003228 -0.000022 -0.000197 0.000112 0.000114 0.0000014 0.0000097 0.000079 0.000072 2003 12 6 52979 0.111358 0.163757 -0.3836324 0.0002229 -0.000038 -0.000191 0.000111 0.000114 0.0000209 0.0000105 0.000091 0.000103 2003 12 7 52980 0.108469 0.163268 -0.3838002 0.0000761 -0.000034 -0.000191 0.000117 0.000120 0.0000251 0.0000116 0.000136 0.000163 2003 12 8 52981 0.105435 0.162707 -0.3837880 -0.0001181 -0.000023 -0.000190 0.000122 0.000125 0.0000178 0.0000114 0.000183 0.000222 2003 12 9 52982 0.102491 0.162207 -0.3835742 -0.0003086 -0.000006 -0.000190 0.000117 0.000120 0.0000104 0.0000104 0.000228 0.000282 2003 12 10 52983 0.099761 0.161795 -0.3832055 -0.0004165 0.000064 -0.000162 0.000107 0.000111 0.0000024 0.0000103 0.000080 0.000088 2003 12 11 52984 0.096791 0.161253 -0.3828052 -0.0003892 0.000169 -0.000174 0.000108 0.000111 0.0000008 0.0000104 0.000051 0.000071 2003 12 12 52985 0.093380 0.160599 -0.3824388 -0.0003217 0.000293 -0.000238 0.000111 0.000112 0.0000011 0.0000105 0.000068 0.000067 2003 12 13 52986 0.089724 0.159745 -0.3821347 -0.0002065 0.000290 -0.000257 0.000114 0.000114 0.0000094 0.0000110 0.000070 0.000062 2003 12 14 52987 0.086419 0.158961 -0.3819601 -0.0000613 0.000229 -0.000251 0.000116 0.000116 0.0000104 0.0000108 0.000068 0.000064 2003 12 15 52988 0.083534 0.158775 -0.3819852 0.0001642 0.000156 -0.000241 0.000113 0.000112 0.0000062 0.0000093 0.000065 0.000065 2003 12 16 52989 0.080589 0.158714 -0.3822511 0.0003817 0.000077 -0.000224 0.000109 0.000108 0.0000020 0.0000086 0.000062 0.000066 2003 12 17 52990 0.077647 0.158345 -0.3827602 0.0006316 0.000042 -0.000210 0.000109 0.000108 0.0000009 0.0000087 0.000048 0.000052 2003 12 18 52991 0.074464 0.157968 -0.3834527 0.0007717 0.000025 -0.000195 0.000104 0.000104 0.0000007 0.0000088 0.000031 0.000033 2003 12 19 52992 0.071494 0.157459 -0.3842278 0.0008104 0.000027 -0.000149 0.000103 0.000103 0.0000009 0.0000089 0.000044 0.000042 2003 12 20 52993 0.068882 0.157150 -0.3850167 0.0007622 0.000050 -0.000124 0.000121 0.000122 0.0000092 0.0000097 0.000048 0.000046 2003 12 21 52994 0.066367 0.156661 -0.3856702 0.0005748 0.000083 -0.000112 0.000130 0.000129 0.0000102 0.0000106 0.000047 0.000046 2003 12 22 52995 0.063518 0.156089 -0.3860857 0.0002744 0.000118 -0.000105 0.000124 0.000120 0.0000060 0.0000103 0.000047 0.000047 2003 12 23 52996 0.060393 0.155668 -0.3862870 0.0000791 0.000151 -0.000104 0.000116 0.000115 0.0000018 0.0000097 0.000046 0.000047 2003 12 24 52997 0.056627 0.155292 -0.3863766 0.0000533 0.000148 -0.000107 0.000116 0.000115 0.0000009 0.0000095 0.000045 0.000047 2003 12 25 52998 0.052661 0.154984 -0.3864777 0.0001149 0.000130 -0.000116 0.000119 0.000119 0.0000009 0.0000093 0.000045 0.000046 2003 12 26 52999 0.048884 0.154722 -0.3866826 0.0002618 0.000105 -0.000125 0.000121 0.000120 0.0000009 0.0000096 0.000045 0.000046 2003 12 27 53000 0.045898 0.154702 -0.3870242 0.0003904 0.000076 -0.000136 0.000124 0.000123 0.0000009 0.0000102 0.000045 0.000045 2003 12 28 53001 0.042911 0.154946 -0.3874793 0.0005125 0.000045 -0.000144 0.000123 0.000122 0.0000009 0.0000104 0.000045 0.000045 2003 12 29 53002 0.039893 0.155003 -0.3879975 0.0005853 0.000016 -0.000150 0.000121 0.000120 0.0000009 0.0000097 0.000045 0.000044 2003 12 30 53003 0.036967 0.154668 -0.3885330 0.0005882 -0.000007 -0.000154 0.000115 0.000115 0.0000009 0.0000091 0.000045 0.000044 2003 12 31 53004 0.034089 0.154381 -0.3890596 0.0005435 -0.000002 -0.000145 0.000114 0.000116 0.0000352 0.0000091 0.000044 0.000043 2004 1 1 53005 0.031236 0.154053 -0.3895824 0.0004715 0.000016 -0.000132 0.000119 0.000120 0.0000641 0.0000093 0.000043 0.000042 2004 1 2 53006 0.028865 0.153841 -0.3900752 0.0004016 0.000041 -0.000121 0.000122 0.000124 0.0000389 0.0000093 0.000042 0.000042 2004 1 3 53007 0.026700 0.154032 -0.3904395 0.0002578 0.000070 -0.000113 0.000124 0.000127 0.0000188 0.0000097 0.000041 0.000041 2004 1 4 53008 0.024224 0.154461 -0.3906070 0.0000837 0.000101 -0.000107 0.000125 0.000128 0.0000200 0.0000106 0.000039 0.000040 2004 1 5 53009 0.021576 0.155071 -0.3906044 -0.0000612 0.000132 -0.000107 0.000123 0.000127 0.0000212 0.0000107 0.000038 0.000039 2004 1 6 53010 0.018733 0.155682 -0.3905153 -0.0001252 0.000159 -0.000111 0.000117 0.000121 0.0000220 0.0000104 0.000037 0.000039 2004 1 7 53011 0.015930 0.156348 -0.3904412 -0.0000383 0.000130 -0.000158 0.000115 0.000118 0.0000203 0.0000102 0.000042 0.000055 2004 1 8 53012 0.012987 0.157133 -0.3904554 0.0000835 0.000081 -0.000214 0.000116 0.000119 0.0000147 0.0000099 0.000048 0.000077 2004 1 9 53013 0.010028 0.157613 -0.3906134 0.0002495 0.000123 -0.000206 0.000118 0.000120 0.0000043 0.0000102 0.000082 0.000082 2004 1 10 53014 0.007678 0.157895 -0.3909799 0.0004889 0.000139 -0.000207 0.000123 0.000123 0.0000123 0.0000109 0.000085 0.000075 2004 1 11 53015 0.005344 0.158097 -0.3915956 0.0007437 0.000130 -0.000213 0.000130 0.000129 0.0000135 0.0000113 0.000074 0.000066 2004 1 12 53016 0.003079 0.158589 -0.3924711 0.0010234 0.000117 -0.000211 0.000132 0.000131 0.0000077 0.0000108 0.000062 0.000057 2004 1 13 53017 0.000854 0.159336 -0.3935791 0.0012004 0.000102 -0.000203 0.000127 0.000126 0.0000020 0.0000106 0.000051 0.000048 2004 1 14 53018 -0.001054 0.160190 -0.3948402 0.0012756 0.000065 0.000010 0.000128 0.000128 0.0000024 0.0000108 0.000140 0.000099 2004 1 15 53019 -0.003313 0.161664 -0.3961012 0.0012317 0.000017 -0.000008 0.000132 0.000129 0.0000022 0.0000108 0.000125 0.000092 2004 1 16 53020 -0.005434 0.162911 -0.3972551 0.0010767 -0.000031 -0.000112 0.000130 0.000129 0.0000015 0.0000108 0.000073 0.000062 2004 1 17 53021 -0.007643 0.163977 -0.3982400 0.0008194 -0.000025 -0.000106 0.000133 0.000131 0.0000179 0.0000113 0.000058 0.000054 2004 1 18 53022 -0.010167 0.165272 -0.3989700 0.0005701 0.000002 -0.000066 0.000139 0.000134 0.0000216 0.0000117 0.000058 0.000053 2004 1 19 53023 -0.013266 0.166644 -0.3994220 0.0003515 0.000032 -0.000033 0.000139 0.000136 0.0000152 0.0000112 0.000058 0.000053 2004 1 20 53024 -0.016187 0.167452 -0.3996693 0.0001903 0.000062 -0.000009 0.000139 0.000136 0.0000087 0.0000107 0.000057 0.000052 2004 1 21 53025 -0.018721 0.168613 -0.3998414 0.0001864 0.000089 0.000008 0.000133 0.000133 0.0000020 0.0000109 0.000056 0.000052 2004 1 22 53026 -0.021163 0.170309 -0.4000744 0.0003027 0.000057 -0.000070 0.000134 0.000134 0.0000009 0.0000111 0.000073 0.000063 2004 1 23 53027 -0.023865 0.172129 -0.4004427 0.0004388 0.000009 -0.000173 0.000141 0.000140 0.0000013 0.0000111 0.000094 0.000077 2004 1 24 53028 -0.026296 0.173438 -0.4009611 0.0006119 -0.000017 -0.000197 0.000141 0.000139 0.0000107 0.0000114 0.000093 0.000076 2004 1 25 53029 -0.027898 0.174755 -0.4016448 0.0007721 -0.000032 -0.000188 0.000143 0.000141 0.0000117 0.0000124 0.000083 0.000069 2004 1 26 53030 -0.029133 0.176148 -0.4024566 0.0008425 -0.000042 -0.000172 0.000140 0.000139 0.0000067 0.0000123 0.000073 0.000063 2004 1 27 53031 -0.030213 0.177690 -0.4033032 0.0008082 -0.000047 -0.000150 0.000130 0.000131 0.0000017 0.0000116 0.000062 0.000057 2004 1 28 53032 -0.031610 0.179457 -0.4040772 0.0007069 -0.000027 -0.000170 0.000128 0.000130 0.0000063 0.0000116 0.000060 0.000055 2004 1 29 53033 -0.033479 0.181298 -0.4046737 0.0004852 0.000002 -0.000196 0.000133 0.000134 0.0000105 0.0000115 0.000060 0.000055 2004 1 30 53034 -0.035908 0.183176 -0.4050364 0.0002490 0.000035 -0.000219 0.000132 0.000132 0.0000031 0.0000114 0.000060 0.000055 2004 1 31 53035 -0.038945 0.184868 -0.4051870 0.0000284 0.000060 -0.000187 0.000134 0.000132 0.0000294 0.0000120 0.000064 0.000059 2004 2 1 53036 -0.042094 0.186116 -0.4051590 -0.0001095 0.000081 -0.000136 0.000135 0.000133 0.0000329 0.0000135 0.000071 0.000065 2004 2 2 53037 -0.044894 0.187257 -0.4049868 -0.0002022 0.000096 -0.000087 0.000129 0.000127 0.0000186 0.0000138 0.000078 0.000071 2004 2 3 53038 -0.047999 0.188302 -0.4047162 -0.0002583 0.000104 -0.000042 0.000127 0.000125 0.0000043 0.0000131 0.000085 0.000077 2004 2 4 53039 -0.051183 0.189242 -0.4044127 -0.0002474 0.000096 -0.000069 0.000125 0.000123 0.0000122 0.0000131 0.000235 0.000248 2004 2 5 53040 -0.054207 0.190061 -0.4041840 -0.0001480 0.000093 -0.000117 0.000124 0.000123 0.0000198 0.0000131 0.000179 0.000190 2004 2 6 53041 -0.056523 0.190969 -0.4041205 0.0000493 0.000099 -0.000174 0.000123 0.000122 0.0000050 0.0000133 0.000072 0.000063 2004 2 7 53042 -0.058852 0.192254 -0.4042429 0.0002838 0.000055 -0.000173 0.000127 0.000124 0.0000352 0.0000142 0.000069 0.000057 2004 2 8 53043 -0.060587 0.193745 -0.4046175 0.0005600 -0.000004 -0.000145 0.000130 0.000125 0.0000395 0.0000133 0.000067 0.000058 2004 2 9 53044 -0.062527 0.195620 -0.4052639 0.0007410 -0.000058 -0.000114 0.000125 0.000122 0.0000222 0.0000110 0.000066 0.000059 2004 2 10 53045 -0.064895 0.197407 -0.4061156 0.0008908 -0.000105 -0.000079 0.000120 0.000116 0.0000049 0.0000103 0.000064 0.000060 2004 2 11 53046 -0.067650 0.199375 -0.4070604 0.0009446 -0.000033 -0.000093 0.000118 0.000115 0.0000037 0.0000101 0.000187 0.000166 2004 2 12 53047 -0.070743 0.201154 -0.4079712 0.0008583 0.000039 -0.000081 0.000121 0.000118 0.0000033 0.0000102 0.000154 0.000154 2004 2 13 53048 -0.073736 0.202878 -0.4087533 0.0006698 0.000055 -0.000041 0.000120 0.000117 0.0000018 0.0000104 0.000096 0.000088 2004 2 14 53049 -0.076724 0.204734 -0.4093509 0.0004503 0.000065 -0.000016 0.000124 0.000120 0.0000182 0.0000111 0.000065 0.000058 2004 2 15 53050 -0.079519 0.206457 -0.4097180 0.0002328 0.000076 -0.000004 0.000126 0.000121 0.0000200 0.0000121 0.000041 0.000042 2004 2 16 53051 -0.081462 0.208292 -0.4098826 0.0001072 0.000071 -0.000021 0.000122 0.000117 0.0000112 0.0000116 0.000032 0.000037 2004 2 17 53052 -0.082989 0.210420 -0.4099540 0.0000519 0.000045 -0.000075 0.000113 0.000111 0.0000023 0.0000108 0.000047 0.000045 2004 2 18 53053 -0.084267 0.212485 -0.4100691 0.0001823 0.000055 -0.000173 0.000112 0.000109 0.0000037 0.0000108 0.000161 0.000097 2004 2 19 53054 -0.086542 0.215211 -0.4103336 0.0003906 0.000069 -0.000248 0.000117 0.000113 0.0000034 0.0000107 0.000140 0.000141 2004 2 20 53055 -0.089877 0.217394 -0.4108216 0.0006096 0.000035 -0.000245 0.000116 0.000112 0.0000018 0.0000108 0.000089 0.000093 2004 2 21 53056 -0.093035 0.219789 -0.4115565 0.0008224 0.000008 -0.000239 0.000117 0.000114 0.0000012 0.0000114 0.000073 0.000068 2004 2 22 53057 -0.095686 0.222202 -0.4124948 0.0010220 -0.000010 -0.000237 0.000118 0.000114 0.0000010 0.0000119 0.000069 0.000063 2004 2 23 53058 -0.097893 0.224529 -0.4135467 0.0010946 -0.000025 -0.000225 0.000112 0.000109 0.0000008 0.0000112 0.000064 0.000058 2004 2 24 53059 -0.099929 0.226640 -0.4146059 0.0010276 -0.000037 -0.000206 0.000105 0.000105 0.0000006 0.0000108 0.000060 0.000053 2004 2 25 53060 -0.101237 0.228886 -0.4155745 0.0008831 -0.000033 -0.000219 0.000105 0.000105 0.0000158 0.0000106 0.000062 0.000055 2004 2 26 53061 -0.102578 0.231245 -0.4163724 0.0006681 -0.000020 -0.000236 0.000108 0.000106 0.0000268 0.0000105 0.000065 0.000059 2004 2 27 53062 -0.103905 0.233609 -0.4169678 0.0005151 -0.000003 -0.000248 0.000108 0.000106 0.0000068 0.0000108 0.000068 0.000063 2004 2 28 53063 -0.106020 0.236184 -0.4173886 0.0002629 -0.000006 -0.000214 0.000113 0.000110 0.0000160 0.0000116 0.000067 0.000060 2004 2 29 53064 -0.108375 0.238064 -0.4175723 0.0000164 -0.000014 -0.000162 0.000119 0.000115 0.0000177 0.0000119 0.000063 0.000054 2004 3 1 53065 -0.110504 0.240170 -0.4175213 -0.0001005 -0.000021 -0.000112 0.000117 0.000112 0.0000100 0.0000108 0.000060 0.000048 2004 3 2 53066 -0.112334 0.242278 -0.4173489 -0.0001544 -0.000028 -0.000067 0.000109 0.000108 0.0000024 0.0000102 0.000056 0.000043 2004 3 3 53067 -0.113956 0.244491 -0.4171975 -0.0001127 0.000014 -0.000074 0.000109 0.000107 0.0000008 0.0000101 0.000049 0.000038 2004 3 4 53068 -0.115486 0.246521 -0.4171776 0.0000846 0.000065 -0.000098 0.000107 0.000105 0.0000007 0.0000102 0.000040 0.000034 2004 3 5 53069 -0.117248 0.249180 -0.4173509 0.0002714 0.000078 -0.000173 0.000106 0.000105 0.0000011 0.0000103 0.000071 0.000065 2004 3 6 53070 -0.119039 0.251636 -0.4177038 0.0005031 0.000065 -0.000166 0.000113 0.000110 0.0000243 0.0000106 0.000076 0.000070 2004 3 7 53071 -0.120237 0.254379 -0.4183049 0.0007401 0.000042 -0.000123 0.000111 0.000108 0.0000270 0.0000112 0.000068 0.000061 2004 3 8 53072 -0.121667 0.256555 -0.4191532 0.0009172 0.000016 -0.000081 0.000104 0.000101 0.0000151 0.0000107 0.000059 0.000053 2004 3 9 53073 -0.122322 0.258221 -0.4201178 0.0009393 -0.000009 -0.000036 0.000098 0.000098 0.0000032 0.0000105 0.000050 0.000044 2004 3 10 53074 -0.123038 0.260322 -0.4210283 0.0008225 -0.000150 -0.000215 0.000096 0.000096 0.0000013 0.0000106 0.000054 0.000061 2004 3 11 53075 -0.123780 0.262269 -0.4217297 0.0005868 -0.000162 -0.000233 0.000097 0.000097 0.0000014 0.0000105 0.000062 0.000071 2004 3 12 53076 -0.124434 0.264400 -0.4221904 0.0003200 -0.000119 -0.000180 0.000095 0.000098 0.0000014 0.0000105 0.000071 0.000077 2004 3 13 53077 -0.125156 0.266407 -0.4224645 0.0001182 -0.000068 -0.000134 0.000096 0.000100 0.0000101 0.0000110 0.000073 0.000075 2004 3 14 53078 -0.126050 0.268763 -0.4225474 -0.0000146 -0.000012 -0.000087 0.000101 0.000104 0.0000113 0.0000116 0.000072 0.000070 2004 3 15 53079 -0.126919 0.270805 -0.4224975 -0.0000226 0.000041 -0.000041 0.000098 0.000103 0.0000071 0.0000111 0.000071 0.000065 2004 3 16 53080 -0.128074 0.273030 -0.4224582 0.0000635 0.000087 0.000003 0.000094 0.000098 0.0000029 0.0000103 0.000070 0.000060 2004 3 17 53081 -0.129231 0.275012 -0.4225716 0.0002352 0.000066 -0.000015 0.000095 0.000099 0.0000098 0.0000103 0.000073 0.000062 2004 3 18 53082 -0.130034 0.277263 -0.4229025 0.0004773 0.000022 -0.000052 0.000097 0.000102 0.0000154 0.0000106 0.000078 0.000065 2004 3 19 53083 -0.131151 0.279797 -0.4234890 0.0007449 -0.000046 -0.000044 0.000098 0.000101 0.0000047 0.0000107 0.000084 0.000088 2004 3 20 53084 -0.131758 0.282096 -0.4243894 0.0009899 -0.000096 -0.000038 0.000103 0.000105 0.0000144 0.0000112 0.000081 0.000088 2004 3 21 53085 -0.131801 0.284914 -0.4254742 0.0011469 -0.000133 -0.000041 0.000106 0.000108 0.0000158 0.0000118 0.000076 0.000077 2004 3 22 53086 -0.131909 0.288103 -0.4266064 0.0011597 -0.000161 -0.000045 0.000099 0.000103 0.0000092 0.0000113 0.000070 0.000067 2004 3 23 53087 -0.131921 0.291482 -0.4277263 0.0011365 -0.000179 -0.000047 0.000097 0.000101 0.0000025 0.0000107 0.000064 0.000056 2004 3 24 53088 -0.132033 0.295183 -0.4287960 0.0010296 -0.000117 -0.000060 0.000097 0.000100 0.0000013 0.0000106 0.000068 0.000063 2004 3 25 53089 -0.132913 0.298572 -0.4297679 0.0008762 -0.000030 -0.000073 0.000097 0.000098 0.0000014 0.0000106 0.000074 0.000073 2004 3 26 53090 -0.134037 0.302003 -0.4305939 0.0007541 0.000059 -0.000086 0.000098 0.000099 0.0000016 0.0000108 0.000081 0.000084 2004 3 27 53091 -0.135574 0.305520 -0.4312464 0.0005668 0.000063 -0.000062 0.000100 0.000100 0.0000065 0.0000112 0.000078 0.000080 2004 3 28 53092 -0.136949 0.308548 -0.4317354 0.0004212 0.000030 -0.000026 0.000104 0.000102 0.0000068 0.0000116 0.000072 0.000072 2004 3 29 53093 -0.137899 0.311751 -0.4321220 0.0003438 -0.000009 0.000006 0.000103 0.000101 0.0000040 0.0000111 0.000066 0.000063 2004 3 30 53094 -0.138764 0.314968 -0.4325020 0.0004125 -0.000055 0.000031 0.000098 0.000097 0.0000012 0.0000106 0.000060 0.000054 2004 3 31 53095 -0.139493 0.317994 -0.4329756 0.0005571 -0.000017 -0.000014 0.000098 0.000096 0.0000084 0.0000104 0.000061 0.000058 2004 4 1 53096 -0.140183 0.320818 -0.4336240 0.0007446 0.000038 -0.000080 0.000101 0.000097 0.0000140 0.0000103 0.000063 0.000065 2004 4 2 53097 -0.140735 0.323573 -0.4344826 0.0009505 0.000085 -0.000145 0.000102 0.000098 0.0000039 0.0000104 0.000065 0.000072 2004 4 3 53098 -0.140779 0.326225 -0.4355321 0.0012107 0.000037 -0.000167 0.000106 0.000102 0.0000092 0.0000113 0.000064 0.000069 2004 4 4 53099 -0.140925 0.328893 -0.4368342 0.0014525 -0.000046 -0.000166 0.000111 0.000106 0.0000101 0.0000119 0.000062 0.000063 2004 4 5 53100 -0.141217 0.331219 -0.4383618 0.0015537 -0.000129 -0.000155 0.000109 0.000105 0.0000060 0.0000110 0.000059 0.000057 2004 4 6 53101 -0.140842 0.333468 -0.4399545 0.0015310 -0.000205 -0.000136 0.000102 0.000100 0.0000019 0.0000102 0.000057 0.000050 2004 4 7 53102 -0.140150 0.336390 -0.4414207 0.0013486 -0.000211 -0.000070 0.000102 0.000100 0.0000012 0.0000101 0.000079 0.000088 2004 4 8 53103 -0.139912 0.339581 -0.4426219 0.0010606 -0.000088 -0.000037 0.000103 0.000100 0.0000014 0.0000102 0.000070 0.000068 2004 4 9 53104 -0.139784 0.342735 -0.4435121 0.0007633 -0.000050 -0.000016 0.000103 0.000100 0.0000084 0.0000102 0.000062 0.000055 2004 4 10 53105 -0.139249 0.345954 -0.4441857 0.0005247 -0.000052 0.000006 0.000107 0.000103 0.0000163 0.0000108 0.000058 0.000050 2004 4 11 53106 -0.138722 0.349394 -0.4446718 0.0003581 -0.000049 0.000028 0.000108 0.000105 0.0000130 0.0000118 0.000056 0.000046 2004 4 12 53107 -0.138931 0.352543 -0.4449852 0.0003142 -0.000044 0.000049 0.000104 0.000101 0.0000077 0.0000114 0.000053 0.000042 2004 4 13 53108 -0.139128 0.355477 -0.4453479 0.0004583 -0.000037 0.000069 0.000100 0.000098 0.0000023 0.0000108 0.000050 0.000038 2004 4 14 53109 -0.139108 0.358216 -0.4459400 0.0006871 -0.000012 0.000044 0.000096 0.000094 0.0000009 0.0000107 0.000043 0.000042 2004 4 15 53110 -0.138608 0.361055 -0.4467435 0.0008863 0.000039 0.000086 0.000096 0.000094 0.0000009 0.0000104 0.000072 0.000063 2004 4 16 53111 -0.137409 0.363875 -0.4476939 0.0010075 0.000007 0.000164 0.000100 0.000098 0.0000012 0.0000107 0.000078 0.000079 2004 4 17 53112 -0.135909 0.367269 -0.4487286 0.0010624 0.000032 0.000193 0.000104 0.000100 0.0000082 0.0000115 0.000074 0.000081 2004 4 18 53113 -0.134759 0.370676 -0.4497727 0.0010033 0.000088 0.000197 0.000103 0.000099 0.0000091 0.0000111 0.000071 0.000078 2004 4 19 53114 -0.133484 0.373922 -0.4507417 0.0009077 0.000141 0.000196 0.000097 0.000093 0.0000055 0.0000099 0.000068 0.000076 2004 4 20 53115 -0.132771 0.377476 -0.4515546 0.0007462 0.000191 0.000188 0.000093 0.000090 0.0000020 0.0000094 0.000064 0.000073 2004 4 21 53116 -0.132974 0.380609 -0.4521512 0.0004679 0.000203 0.000178 0.000092 0.000090 0.0000081 0.0000093 0.000063 0.000072 2004 4 22 53117 -0.133186 0.382934 -0.4525059 0.0002311 0.000200 0.000166 0.000093 0.000091 0.0000132 0.0000094 0.000062 0.000071 2004 4 23 53118 -0.132942 0.385435 -0.4526250 0.0000171 0.000191 0.000153 0.000094 0.000092 0.0000039 0.0000097 0.000062 0.000071 2004 4 24 53119 -0.132812 0.387501 -0.4525425 -0.0001444 0.000174 0.000125 0.000096 0.000094 0.0000154 0.0000103 0.000064 0.000072 2004 4 25 53120 -0.132093 0.389267 -0.4523369 -0.0002440 0.000154 0.000094 0.000097 0.000096 0.0000171 0.0000119 0.000066 0.000073 2004 4 26 53121 -0.130597 0.391103 -0.4521117 -0.0002149 0.000133 0.000067 0.000095 0.000096 0.0000097 0.0000123 0.000068 0.000075 2004 4 27 53122 -0.128513 0.393108 -0.4519686 -0.0000708 0.000113 0.000042 0.000091 0.000092 0.0000023 0.0000115 0.000071 0.000077 2004 4 28 53123 -0.126798 0.395377 -0.4519906 0.0001167 0.000186 0.000099 0.000088 0.000089 0.0000139 0.0000114 0.000202 0.000277 2004 4 29 53124 -0.125025 0.398212 -0.4522198 0.0003354 0.000281 0.000174 0.000089 0.000090 0.0000255 0.0000114 0.000368 0.000528 2004 4 30 53125 -0.123514 0.401310 -0.4526838 0.0006074 0.000226 0.000156 0.000089 0.000090 0.0000065 0.0000116 0.000139 0.000177 2004 5 1 53126 -0.121397 0.404515 -0.4534163 0.0009002 0.000185 0.000126 0.000092 0.000095 0.0000013 0.0000125 0.000068 0.000072 2004 5 2 53127 -0.119730 0.407684 -0.4543961 0.0010628 0.000147 0.000088 0.000101 0.000102 0.0000012 0.0000138 0.000057 0.000060 2004 5 3 53128 -0.118432 0.410767 -0.4555360 0.0011630 0.000109 0.000042 0.000106 0.000106 0.0000011 0.0000139 0.000047 0.000048 2004 5 4 53129 -0.117112 0.413777 -0.4567035 0.0011209 0.000072 -0.000005 0.000102 0.000103 0.0000010 0.0000133 0.000036 0.000036 2004 5 5 53130 -0.115833 0.416640 -0.4577591 0.0009618 0.000141 -0.000054 0.000101 0.000102 0.0000011 0.0000131 0.000038 0.000034 2004 5 6 53131 -0.115013 0.419413 -0.4586116 0.0007329 0.000237 -0.000096 0.000100 0.000100 0.0000013 0.0000128 0.000043 0.000036 2004 5 7 53132 -0.114004 0.421820 -0.4592406 0.0005090 0.000213 -0.000108 0.000100 0.000100 0.0000016 0.0000127 0.000072 0.000068 2004 5 8 53133 -0.112510 0.424116 -0.4596743 0.0003562 0.000124 -0.000116 0.000106 0.000105 0.0000140 0.0000135 0.000065 0.000068 2004 5 9 53134 -0.111186 0.426459 -0.4600106 0.0003167 0.000029 -0.000119 0.000106 0.000105 0.0000154 0.0000125 0.000043 0.000052 2004 5 10 53135 -0.109673 0.428919 -0.4603775 0.0004221 0.000062 -0.000091 0.000103 0.000102 0.0000089 0.0000103 0.000038 0.000043 2004 5 11 53136 -0.107978 0.431882 -0.4608773 0.0005816 0.000100 -0.000055 0.000096 0.000096 0.0000024 0.0000098 0.000033 0.000034 2004 5 12 53137 -0.106054 0.434693 -0.4615559 0.0007454 0.000082 -0.000057 0.000094 0.000094 0.0000010 0.0000098 0.000041 0.000040 2004 5 13 53138 -0.103977 0.437430 -0.4623717 0.0008943 0.000088 0.000001 0.000097 0.000096 0.0000012 0.0000097 0.000069 0.000068 2004 5 14 53139 -0.102274 0.440204 -0.4633318 0.0010073 0.000142 0.000090 0.000098 0.000096 0.0000015 0.0000097 0.000086 0.000086 2004 5 15 53140 -0.101268 0.442603 -0.4643717 0.0010384 0.000132 0.000102 0.000100 0.000100 0.0000167 0.0000103 0.000080 0.000080 2004 5 16 53141 -0.100611 0.444298 -0.4653997 0.0009904 0.000095 0.000074 0.000103 0.000103 0.0000185 0.0000106 0.000066 0.000066 2004 5 17 53142 -0.100163 0.445880 -0.4663457 0.0008747 0.000059 0.000036 0.000099 0.000099 0.0000106 0.0000096 0.000053 0.000052 2004 5 18 53143 -0.099700 0.447069 -0.4671497 0.0007156 0.000026 -0.000010 0.000091 0.000092 0.0000027 0.0000089 0.000039 0.000038 2004 5 19 53144 -0.098912 0.448511 -0.4677699 0.0004937 0.000031 -0.000127 0.000091 0.000091 0.0000014 0.0000089 0.000049 0.000050 2004 5 20 53145 -0.097705 0.449690 -0.4681716 0.0003048 0.000051 -0.000256 0.000094 0.000094 0.0000019 0.0000089 0.000064 0.000070 2004 5 21 53146 -0.096281 0.451349 -0.4683548 0.0001260 0.000073 -0.000250 0.000096 0.000097 0.0000082 0.0000091 0.000068 0.000076 2004 5 22 53147 -0.095199 0.452541 -0.4684405 -0.0000319 0.000099 -0.000186 0.000099 0.000098 0.0000218 0.0000097 0.000069 0.000077 2004 5 23 53148 -0.094216 0.453797 -0.4684660 -0.0000886 0.000129 -0.000111 0.000098 0.000098 0.0000264 0.0000098 0.000069 0.000078 2004 5 24 53149 -0.093254 0.455275 -0.4683798 -0.0000992 0.000160 -0.000032 0.000095 0.000096 0.0000149 0.0000092 0.000069 0.000080 2004 5 25 53150 -0.091852 0.456856 -0.4682820 -0.0000138 0.000187 0.000048 0.000091 0.000093 0.0000035 0.0000088 0.000069 0.000081 2004 5 26 53151 -0.090913 0.458607 -0.4682880 0.0001051 0.000274 0.000058 0.000089 0.000092 0.0000096 0.0000088 0.000155 0.000130 2004 5 27 53152 -0.090113 0.460087 -0.4684777 0.0002508 0.000308 0.000024 0.000091 0.000093 0.0000159 0.0000089 0.000105 0.000106 2004 5 28 53153 -0.089402 0.461682 -0.4688547 0.0004265 0.000253 -0.000114 0.000091 0.000094 0.0000047 0.0000089 0.000082 0.000087 2004 5 29 53154 -0.088273 0.463300 -0.4693341 0.0005069 0.000211 -0.000142 0.000092 0.000095 0.0000113 0.0000093 0.000082 0.000085 2004 5 30 53155 -0.087156 0.464695 -0.4698789 0.0005491 0.000179 -0.000113 0.000102 0.000105 0.0000132 0.0000105 0.000080 0.000084 2004 5 31 53156 -0.085578 0.465943 -0.4704303 0.0005422 0.000143 -0.000079 0.000107 0.000110 0.0000094 0.0000107 0.000078 0.000083 2004 6 1 53157 -0.083867 0.467378 -0.4708845 0.0004187 0.000107 -0.000042 0.000107 0.000109 0.0000056 0.0000102 0.000077 0.000082 2004 6 2 53158 -0.081972 0.469301 -0.4711493 0.0001795 0.000074 -0.000003 0.000105 0.000107 0.0000019 0.0000102 0.000075 0.000081 2004 6 3 53159 -0.079980 0.470901 -0.4711810 -0.0000774 0.000117 0.000033 0.000105 0.000105 0.0000013 0.0000104 0.000074 0.000080 2004 6 4 53160 -0.077638 0.472447 -0.4710105 -0.0002549 0.000183 0.000065 0.000108 0.000107 0.0000016 0.0000106 0.000072 0.000079 2004 6 5 53161 -0.075911 0.473978 -0.4707334 -0.0003268 0.000164 0.000080 0.000111 0.000110 0.0000197 0.0000113 0.000077 0.000082 2004 6 6 53162 -0.074510 0.475662 -0.4704687 -0.0002434 0.000117 0.000083 0.000110 0.000108 0.0000218 0.0000109 0.000084 0.000086 2004 6 7 53163 -0.073404 0.477212 -0.4703246 -0.0000638 0.000075 0.000081 0.000104 0.000103 0.0000124 0.0000095 0.000092 0.000090 2004 6 8 53164 -0.071878 0.478524 -0.4703677 0.0001658 0.000039 0.000075 0.000100 0.000099 0.0000030 0.0000089 0.000099 0.000094 2004 6 9 53165 -0.069999 0.480175 -0.4706060 0.0003355 0.000043 -0.000166 0.000101 0.000099 0.0000088 0.0000089 0.000136 0.000113 2004 6 10 53166 -0.068441 0.481811 -0.4709852 0.0004234 0.000114 -0.000155 0.000103 0.000101 0.0000144 0.0000090 0.000143 0.000130 2004 6 11 53167 -0.066774 0.483220 -0.4714339 0.0004689 0.000202 -0.000043 0.000103 0.000101 0.0000045 0.0000090 0.000138 0.000144 2004 6 12 53168 -0.064962 0.484730 -0.4719015 0.0004339 0.000240 -0.000003 0.000104 0.000102 0.0000201 0.0000096 0.000125 0.000133 2004 6 13 53169 -0.062795 0.486101 -0.4723101 0.0003626 0.000255 0.000013 0.000110 0.000108 0.0000222 0.0000116 0.000108 0.000113 2004 6 14 53170 -0.060405 0.487507 -0.4725737 0.0001929 0.000261 0.000030 0.000111 0.000110 0.0000129 0.0000124 0.000091 0.000093 2004 6 15 53171 -0.057911 0.488793 -0.4726258 -0.0000613 0.000262 0.000042 0.000106 0.000106 0.0000036 0.0000118 0.000074 0.000073 2004 6 16 53172 -0.054886 0.490131 -0.4724345 -0.0003001 0.000086 0.000079 0.000105 0.000106 0.0000017 0.0000116 0.000100 0.000100 2004 6 17 53173 -0.051569 0.491778 -0.4720076 -0.0004949 -0.000020 0.000067 0.000106 0.000107 0.0000026 0.0000116 0.000156 0.000142 2004 6 18 53174 -0.048266 0.493533 -0.4714566 -0.0005541 0.000018 0.000027 0.000106 0.000108 0.0000023 0.0000116 0.000103 0.000101 2004 6 19 53175 -0.045138 0.495631 -0.4708641 -0.0005635 0.000092 0.000000 0.000110 0.000112 0.0000020 0.0000123 0.000087 0.000087 2004 6 20 53176 -0.041912 0.497183 -0.4702864 -0.0005647 0.000168 -0.000024 0.000112 0.000113 0.0000018 0.0000127 0.000098 0.000093 2004 6 21 53177 -0.038487 0.498594 -0.4697775 -0.0004933 0.000243 -0.000048 0.000108 0.000110 0.0000017 0.0000119 0.000109 0.000100 2004 6 22 53178 -0.035192 0.499899 -0.4693786 -0.0003567 0.000313 -0.000070 0.000104 0.000105 0.0000016 0.0000113 0.000120 0.000107 2004 6 23 53179 -0.031822 0.501183 -0.4691219 -0.0001859 0.000230 -0.000173 0.000100 0.000102 0.0000259 0.0000110 0.000109 0.000115 2004 6 24 53180 -0.028563 0.502347 -0.4690428 -0.0000074 0.000105 -0.000285 0.000100 0.000103 0.0000432 0.0000111 0.000091 0.000122 2004 6 25 53181 -0.024999 0.503489 -0.4691384 0.0001629 0.000024 -0.000265 0.000101 0.000104 0.0000103 0.0000114 0.000076 0.000084 2004 6 26 53182 -0.022003 0.505061 -0.4693338 0.0002064 0.000023 -0.000180 0.000104 0.000107 0.0000013 0.0000120 0.000076 0.000072 2004 6 27 53183 -0.019131 0.506236 -0.4695455 0.0001785 0.000049 -0.000084 0.000105 0.000106 0.0000012 0.0000121 0.000082 0.000076 2004 6 28 53184 -0.016249 0.507400 -0.4696878 0.0000699 0.000082 0.000010 0.000101 0.000103 0.0000011 0.0000114 0.000088 0.000080 2004 6 29 53185 -0.013141 0.508225 -0.4696775 -0.0000938 0.000121 0.000094 0.000099 0.000101 0.0000010 0.0000110 0.000093 0.000084 2004 6 30 53186 -0.010316 0.509310 -0.4694562 -0.0003210 0.000158 0.000046 0.000099 0.000099 0.0000121 0.0000110 0.000087 0.000082 2004 7 1 53187 -0.007566 0.510369 -0.4690074 -0.0005347 0.000194 -0.000045 0.000098 0.000099 0.0000203 0.0000108 0.000078 0.000078 2004 7 2 53188 -0.004628 0.511226 -0.4683713 -0.0007058 0.000226 -0.000144 0.000098 0.000098 0.0000059 0.0000108 0.000069 0.000074 2004 7 3 53189 -0.001868 0.511853 -0.4676385 -0.0007835 0.000207 -0.000195 0.000101 0.000100 0.0000242 0.0000113 0.000103 0.000125 2004 7 4 53190 0.000433 0.512586 -0.4669550 -0.0006641 0.000168 -0.000224 0.000108 0.000106 0.0000286 0.0000125 0.000152 0.000195 2004 7 5 53191 0.002696 0.513273 -0.4664356 -0.0004111 0.000126 -0.000242 0.000109 0.000108 0.0000199 0.0000125 0.000201 0.000266 2004 7 6 53192 0.005078 0.513953 -0.4661140 -0.0002016 0.000085 -0.000248 0.000106 0.000106 0.0000113 0.0000119 0.000251 0.000336 2004 7 7 53193 0.007320 0.514476 -0.4659529 -0.0001054 0.000081 -0.000130 0.000104 0.000104 0.0000027 0.0000119 0.000095 0.000111 2004 7 8 53194 0.009511 0.515027 -0.4658669 -0.0000997 0.000143 -0.000056 0.000102 0.000103 0.0000021 0.0000120 0.000127 0.000117 2004 7 9 53195 0.012280 0.515392 -0.4657512 -0.0001583 0.000273 -0.000027 0.000103 0.000103 0.0000020 0.0000119 0.000114 0.000104 2004 7 10 53196 0.015400 0.516397 -0.4655303 -0.0003192 0.000275 -0.000009 0.000106 0.000105 0.0000288 0.0000123 0.000097 0.000088 2004 7 11 53197 0.018199 0.517219 -0.4651616 -0.0004797 0.000220 0.000002 0.000110 0.000109 0.0000320 0.0000122 0.000090 0.000081 2004 7 12 53198 0.021474 0.517974 -0.4646149 -0.0006160 0.000162 0.000006 0.000109 0.000107 0.0000183 0.0000111 0.000082 0.000073 2004 7 13 53199 0.024231 0.518926 -0.4638766 -0.0008178 0.000103 0.000000 0.000105 0.000103 0.0000047 0.0000107 0.000075 0.000065 2004 7 14 53200 0.026252 0.519444 -0.4629642 -0.0010086 0.000033 -0.000073 0.000104 0.000102 0.0000015 0.0000110 0.000100 0.000089 2004 7 15 53201 0.028267 0.520122 -0.4619315 -0.0010681 0.000043 -0.000122 0.000102 0.000100 0.0000014 0.0000112 0.000060 0.000061 2004 7 16 53202 0.030304 0.520614 -0.4608642 -0.0010610 0.000130 -0.000141 0.000104 0.000103 0.0000015 0.0000112 0.000064 0.000055 2004 7 17 53203 0.032697 0.520890 -0.4599030 -0.0009802 0.000159 -0.000113 0.000108 0.000107 0.0000376 0.0000118 0.000068 0.000055 2004 7 18 53204 0.035713 0.521020 -0.4590341 -0.0008435 0.000159 -0.000066 0.000111 0.000111 0.0000418 0.0000125 0.000064 0.000052 2004 7 19 53205 0.038737 0.520977 -0.4582611 -0.0006736 0.000156 -0.000018 0.000110 0.000112 0.0000234 0.0000120 0.000060 0.000049 2004 7 20 53206 0.041355 0.520718 -0.4576707 -0.0004627 0.000151 0.000032 0.000105 0.000107 0.0000050 0.0000112 0.000056 0.000046 2004 7 21 53207 0.043957 0.520425 -0.4573271 -0.0002295 0.000067 -0.000024 0.000102 0.000104 0.0000019 0.0000110 0.000113 0.000094 2004 7 22 53208 0.046958 0.519989 -0.4571910 -0.0000477 0.000045 -0.000104 0.000103 0.000105 0.0000023 0.0000110 0.000142 0.000112 2004 7 23 53209 0.050034 0.519685 -0.4572116 0.0000483 0.000052 -0.000180 0.000105 0.000106 0.0000026 0.0000112 0.000160 0.000118 2004 7 24 53210 0.052997 0.519406 -0.4573261 0.0000608 0.000047 -0.000140 0.000107 0.000108 0.0000247 0.0000119 0.000152 0.000110 2004 7 25 53211 0.056056 0.519293 -0.4574037 0.0000139 0.000044 -0.000057 0.000115 0.000116 0.0000273 0.0000123 0.000133 0.000099 2004 7 26 53212 0.059062 0.519302 -0.4573199 -0.0001500 0.000048 0.000022 0.000116 0.000117 0.0000158 0.0000114 0.000115 0.000087 2004 7 27 53213 0.061506 0.519278 -0.4570060 -0.0003827 0.000057 0.000094 0.000114 0.000114 0.0000044 0.0000107 0.000097 0.000075 2004 7 28 53214 0.063944 0.518873 -0.4564600 -0.0006107 0.000138 0.000091 0.000115 0.000114 0.0000105 0.0000106 0.000105 0.000088 2004 7 29 53215 0.066432 0.518564 -0.4557631 -0.0007491 0.000232 0.000063 0.000111 0.000110 0.0000166 0.0000105 0.000121 0.000108 2004 7 30 53216 0.068375 0.517937 -0.4550338 -0.0007178 0.000305 -0.000120 0.000110 0.000108 0.0000048 0.0000106 0.000108 0.000078 2004 7 31 53217 0.070358 0.517194 -0.4543704 -0.0005791 0.000283 -0.000179 0.000114 0.000111 0.0000187 0.0000113 0.000093 0.000062 2004 8 1 53218 0.072793 0.516438 -0.4539280 -0.0003023 0.000220 -0.000167 0.000117 0.000115 0.0000208 0.0000115 0.000080 0.000058 2004 8 2 53219 0.075525 0.515881 -0.4537878 -0.0000144 0.000149 -0.000144 0.000115 0.000113 0.0000120 0.0000106 0.000068 0.000053 2004 8 3 53220 0.078280 0.515544 -0.4539048 0.0001841 0.000079 -0.000107 0.000111 0.000111 0.0000032 0.0000101 0.000055 0.000049 2004 8 4 53221 0.081085 0.515455 -0.4541612 0.0002655 0.000070 -0.000065 0.000111 0.000111 0.0000085 0.0000099 0.000074 0.000061 2004 8 5 53222 0.083847 0.515328 -0.4544189 0.0002167 0.000087 -0.000015 0.000114 0.000112 0.0000137 0.0000099 0.000102 0.000078 2004 8 6 53223 0.086464 0.515212 -0.4545780 0.0001087 0.000119 0.000037 0.000113 0.000112 0.0000047 0.0000100 0.000130 0.000095 2004 8 7 53224 0.088798 0.515056 -0.4546054 -0.0000089 0.000130 0.000077 0.000114 0.000113 0.0000021 0.0000105 0.000124 0.000091 2004 8 8 53225 0.091688 0.514374 -0.4544897 -0.0001569 0.000144 0.000104 0.000117 0.000116 0.0000018 0.0000110 0.000105 0.000080 2004 8 9 53226 0.094789 0.513927 -0.4542261 -0.0003397 0.000167 0.000123 0.000115 0.000116 0.0000016 0.0000106 0.000086 0.000068 2004 8 10 53227 0.097240 0.513535 -0.4538171 -0.0005318 0.000196 0.000128 0.000111 0.000112 0.0000014 0.0000100 0.000066 0.000056 2004 8 11 53228 0.099763 0.513021 -0.4532763 -0.0006057 0.000407 0.000120 0.000111 0.000111 0.0000120 0.0000100 0.000119 0.000090 2004 8 12 53229 0.102655 0.513132 -0.4526212 -0.0006267 0.000659 0.000100 0.000113 0.000114 0.0000245 0.0000102 0.000191 0.000136 2004 8 13 53230 0.105716 0.513401 -0.4519484 -0.0006205 0.000614 0.000059 0.000117 0.000117 0.0000282 0.0000104 0.000338 0.000278 2004 8 14 53231 0.108711 0.513798 -0.4514005 -0.0005277 0.000526 0.000009 0.000121 0.000121 0.0000174 0.0000108 0.000325 0.000275 2004 8 15 53232 0.111509 0.513938 -0.4509623 -0.0003714 0.000449 -0.000043 0.000125 0.000123 0.0000123 0.0000116 0.000242 0.000204 2004 8 16 53233 0.114563 0.513715 -0.4507012 -0.0001444 0.000355 -0.000094 0.000123 0.000121 0.0000073 0.0000113 0.000160 0.000133 2004 8 17 53234 0.117186 0.513301 -0.4506826 0.0000988 0.000252 -0.000141 0.000116 0.000117 0.0000023 0.0000106 0.000076 0.000062 2004 8 18 53235 0.119720 0.512545 -0.4509265 0.0003341 0.000193 -0.000158 0.000115 0.000115 0.0000021 0.0000105 0.000128 0.000102 2004 8 19 53236 0.121957 0.512006 -0.4513588 0.0004791 0.000159 -0.000125 0.000116 0.000116 0.0000022 0.0000106 0.000128 0.000121 2004 8 20 53237 0.124247 0.511298 -0.4518805 0.0005547 0.000160 -0.000133 0.000116 0.000116 0.0000021 0.0000106 0.000116 0.000109 2004 8 21 53238 0.126452 0.510616 -0.4523912 0.0004864 0.000150 -0.000150 0.000118 0.000119 0.0000020 0.0000112 0.000104 0.000095 2004 8 22 53239 0.128266 0.509529 -0.4527905 0.0003135 0.000141 -0.000161 0.000122 0.000121 0.0000018 0.0000119 0.000091 0.000084 2004 8 23 53240 0.130152 0.508212 -0.4530017 0.0000819 0.000145 -0.000168 0.000119 0.000118 0.0000016 0.0000115 0.000078 0.000072 2004 8 24 53241 0.132227 0.506548 -0.4529924 -0.0001213 0.000159 -0.000170 0.000117 0.000115 0.0000014 0.0000109 0.000066 0.000060 2004 8 25 53242 0.134385 0.505142 -0.4527844 -0.0002732 0.000179 -0.000180 0.000127 0.000123 0.0000012 0.0000108 0.000054 0.000050 2004 8 26 53243 0.136114 0.504083 -0.4524491 -0.0003393 0.000202 -0.000192 0.000128 0.000125 0.0000010 0.0000108 0.000042 0.000039 2004 8 27 53244 0.138465 0.502715 -0.4520989 -0.0003058 0.000207 -0.000141 0.000125 0.000126 0.0000022 0.0000111 0.000078 0.000074 2004 8 28 53245 0.141047 0.501617 -0.4518685 -0.0001646 0.000235 -0.000107 0.000135 0.000134 0.0000210 0.0000117 0.000096 0.000088 2004 8 29 53246 0.143682 0.500207 -0.4518210 0.0000910 0.000268 -0.000088 0.000127 0.000125 0.0000268 0.0000121 0.000101 0.000089 2004 8 30 53247 0.146820 0.498934 -0.4520629 0.0003963 0.000291 -0.000076 0.000116 0.000115 0.0000168 0.0000115 0.000105 0.000091 2004 8 31 53248 0.149574 0.497666 -0.4525745 0.0005538 0.000303 -0.000068 0.000112 0.000112 0.0000039 0.0000109 0.000110 0.000092 2004 9 1 53249 0.152177 0.495874 -0.4531788 0.0005763 0.000277 -0.000102 0.000109 0.000111 0.0000099 0.0000107 0.000113 0.000099 2004 9 2 53250 0.154828 0.494259 -0.4537152 0.0004730 0.000234 -0.000148 0.000109 0.000111 0.0000161 0.0000106 0.000115 0.000106 2004 9 3 53251 0.157011 0.492217 -0.4540895 0.0002922 0.000185 -0.000193 0.000108 0.000110 0.0000048 0.0000106 0.000116 0.000114 2004 9 4 53252 0.159233 0.490022 -0.4542818 0.0000366 0.000137 -0.000194 0.000111 0.000114 0.0000170 0.0000114 0.000152 0.000143 2004 9 5 53253 0.161633 0.487629 -0.4541877 -0.0002571 0.000093 -0.000175 0.000112 0.000116 0.0000182 0.0000121 0.000201 0.000180 2004 9 6 53254 0.163687 0.485098 -0.4537967 -0.0004929 0.000058 -0.000150 0.000108 0.000112 0.0000119 0.0000115 0.000250 0.000217 2004 9 7 53255 0.165373 0.482916 -0.4531664 -0.0007031 0.000035 -0.000121 0.000105 0.000109 0.0000291 0.0000109 0.000298 0.000254 2004 9 8 53256 0.167381 0.481044 -0.4524236 -0.0007962 -0.000015 -0.000165 0.000102 0.000107 0.0000058 0.0000108 0.000139 0.000114 2004 9 9 53257 0.169422 0.479164 -0.4516256 -0.0007972 0.000006 -0.000130 0.000103 0.000107 0.0000013 0.0000109 0.000232 0.000176 2004 9 10 53258 0.171679 0.477285 -0.4508865 -0.0006564 0.000133 -0.000010 0.000103 0.000108 0.0000016 0.0000111 0.000141 0.000117 2004 9 11 53259 0.173927 0.475597 -0.4503487 -0.0004666 0.000191 -0.000007 0.000104 0.000109 0.0000091 0.0000117 0.000092 0.000086 2004 9 12 53260 0.176102 0.473339 -0.4500652 -0.0001240 0.000210 -0.000059 0.000108 0.000112 0.0000143 0.0000118 0.000090 0.000088 2004 9 13 53261 0.178026 0.471094 -0.4500956 0.0002153 0.000222 -0.000111 0.000107 0.000111 0.0000104 0.0000108 0.000087 0.000091 2004 9 14 53262 0.179628 0.468705 -0.4504294 0.0004255 0.000226 -0.000165 0.000104 0.000107 0.0000033 0.0000104 0.000085 0.000093 2004 9 15 53263 0.181035 0.466403 -0.4509675 0.0005976 0.000187 -0.000125 0.000105 0.000107 0.0000026 0.0000103 0.000147 0.000169 2004 9 16 53264 0.182158 0.464077 -0.4516560 0.0006853 0.000140 -0.000048 0.000107 0.000107 0.0000035 0.0000102 0.000109 0.000130 2004 9 17 53265 0.183641 0.461630 -0.4523211 0.0006233 0.000116 -0.000037 0.000106 0.000105 0.0000022 0.0000102 0.000093 0.000096 2004 9 18 53266 0.184965 0.459410 -0.4528376 0.0004265 0.000110 -0.000037 0.000108 0.000108 0.0000052 0.0000107 0.000090 0.000088 2004 9 19 53267 0.186460 0.457059 -0.4531392 0.0001570 0.000111 -0.000036 0.000113 0.000112 0.0000100 0.0000112 0.000084 0.000084 2004 9 20 53268 0.187882 0.454796 -0.4531943 -0.0000539 0.000118 -0.000042 0.000110 0.000108 0.0000081 0.0000107 0.000079 0.000080 2004 9 21 53269 0.189722 0.452301 -0.4530374 -0.0002170 0.000129 -0.000052 0.000104 0.000103 0.0000027 0.0000100 0.000074 0.000076 2004 9 22 53270 0.191635 0.450177 -0.4527570 -0.0003198 0.000172 -0.000122 0.000105 0.000103 0.0000201 0.0000099 0.000086 0.000090 2004 9 23 53271 0.193387 0.448245 -0.4524541 -0.0002411 0.000222 -0.000204 0.000106 0.000104 0.0000335 0.0000100 0.000103 0.000110 2004 9 24 53272 0.194864 0.446809 -0.4522588 -0.0000529 0.000266 -0.000279 0.000105 0.000102 0.0000090 0.0000098 0.000121 0.000129 2004 9 25 53273 0.195530 0.445005 -0.4523255 0.0002056 0.000248 -0.000266 0.000110 0.000105 0.0000104 0.0000102 0.000114 0.000122 2004 9 26 53274 0.195799 0.443063 -0.4526402 0.0004369 0.000203 -0.000215 0.000108 0.000105 0.0000142 0.0000105 0.000098 0.000105 2004 9 27 53275 0.196234 0.441043 -0.4531978 0.0006640 0.000153 -0.000159 0.000100 0.000097 0.0000098 0.0000097 0.000083 0.000088 2004 9 28 53276 0.197100 0.438843 -0.4539481 0.0008068 0.000099 -0.000100 0.000097 0.000094 0.0000031 0.0000091 0.000067 0.000071 2004 9 29 53277 0.197832 0.436695 -0.4547487 0.0007711 0.000111 -0.000071 0.000097 0.000094 0.0000021 0.0000089 0.000068 0.000080 2004 9 30 53278 0.198081 0.434217 -0.4554559 0.0006285 0.000144 -0.000052 0.000097 0.000094 0.0000026 0.0000089 0.000074 0.000096 2004 10 1 53279 0.198394 0.431824 -0.4559773 0.0004511 0.000097 -0.000224 0.000099 0.000096 0.0000020 0.0000092 0.000082 0.000089 2004 10 2 53280 0.199015 0.429398 -0.4563437 0.0002969 0.000085 -0.000252 0.000104 0.000101 0.0000157 0.0000099 0.000079 0.000077 2004 10 3 53281 0.199859 0.426875 -0.4565552 0.0001340 0.000101 -0.000206 0.000110 0.000106 0.0000172 0.0000104 0.000072 0.000066 2004 10 4 53282 0.200638 0.424390 -0.4566325 0.0000373 0.000125 -0.000162 0.000106 0.000104 0.0000100 0.0000099 0.000064 0.000056 2004 10 5 53283 0.201304 0.422047 -0.4566480 0.0000152 0.000154 -0.000119 0.000099 0.000099 0.0000027 0.0000093 0.000057 0.000045 2004 10 6 53284 0.201802 0.419552 -0.4566722 0.0000480 0.000130 -0.000101 0.000099 0.000098 0.0000010 0.0000092 0.000071 0.000065 2004 10 7 53285 0.202596 0.416982 -0.4567467 0.0001321 0.000189 -0.000173 0.000098 0.000097 0.0000010 0.0000091 0.000051 0.000045 2004 10 8 53286 0.203079 0.414636 -0.4569037 0.0002048 0.000323 -0.000250 0.000103 0.000101 0.0000018 0.0000095 0.000081 0.000081 2004 10 9 53287 0.203492 0.412307 -0.4571780 0.0003469 0.000336 -0.000263 0.000111 0.000107 0.0000019 0.0000104 0.000085 0.000086 2004 10 10 53288 0.203411 0.410309 -0.4576124 0.0005341 0.000292 -0.000249 0.000115 0.000109 0.0000017 0.0000111 0.000073 0.000072 2004 10 11 53289 0.203235 0.407838 -0.4582481 0.0007580 0.000240 -0.000225 0.000116 0.000108 0.0000014 0.0000106 0.000061 0.000058 2004 10 12 53290 0.203416 0.405426 -0.4591022 0.0009583 0.000182 -0.000193 0.000109 0.000103 0.0000012 0.0000099 0.000049 0.000044 2004 10 13 53291 0.203580 0.402898 -0.4601432 0.0010982 0.000164 -0.000143 0.000108 0.000103 0.0000123 0.0000099 0.000068 0.000059 2004 10 14 53292 0.203844 0.400069 -0.4612702 0.0011324 0.000158 -0.000092 0.000112 0.000105 0.0000202 0.0000099 0.000096 0.000081 2004 10 15 53293 0.204515 0.397284 -0.4623568 0.0009906 0.000178 0.000056 0.000111 0.000105 0.0000056 0.0000099 0.000105 0.000101 2004 10 16 53294 0.205361 0.395005 -0.4633015 0.0007607 0.000188 0.000061 0.000113 0.000107 0.0000092 0.0000106 0.000095 0.000094 2004 10 17 53295 0.205761 0.392848 -0.4639006 0.0004587 0.000195 -0.000005 0.000116 0.000107 0.0000105 0.0000109 0.000081 0.000078 2004 10 18 53296 0.206043 0.390648 -0.4641681 0.0001678 0.000205 -0.000080 0.000113 0.000104 0.0000066 0.0000102 0.000066 0.000062 2004 10 19 53297 0.205959 0.388832 -0.4642332 -0.0000011 0.000217 -0.000162 0.000108 0.000102 0.0000023 0.0000099 0.000052 0.000045 2004 10 20 53298 0.205890 0.386641 -0.4642090 0.0000139 0.000241 -0.000146 0.000109 0.000104 0.0000222 0.0000101 0.000061 0.000055 2004 10 21 53299 0.206042 0.384745 -0.4642559 0.0001309 0.000265 -0.000104 0.000111 0.000105 0.0000371 0.0000100 0.000076 0.000071 2004 10 22 53300 0.206000 0.382781 -0.4644997 0.0003309 0.000283 -0.000061 0.000114 0.000109 0.0000098 0.0000101 0.000091 0.000087 2004 10 23 53301 0.205941 0.380904 -0.4649691 0.0005367 0.000268 -0.000085 0.000117 0.000111 0.0000089 0.0000107 0.000093 0.000092 2004 10 24 53302 0.205527 0.379159 -0.4656215 0.0007380 0.000238 -0.000132 0.000120 0.000115 0.0000148 0.0000115 0.000091 0.000093 2004 10 25 53303 0.205063 0.377027 -0.4664233 0.0008737 0.000203 -0.000174 0.000119 0.000116 0.0000109 0.0000112 0.000089 0.000094 2004 10 26 53304 0.205355 0.374889 -0.4673210 0.0008792 0.000166 -0.000212 0.000113 0.000111 0.0000029 0.0000104 0.000086 0.000095 2004 10 27 53305 0.205857 0.372691 -0.4682244 0.0008674 0.000185 -0.000125 0.000112 0.000111 0.0000013 0.0000104 0.000269 0.000116 2004 10 28 53306 0.206658 0.370348 -0.4690431 0.0007413 0.000167 -0.000116 0.000112 0.000111 0.0000016 0.0000104 0.000150 0.000102 2004 10 29 53307 0.207105 0.368112 -0.4696968 0.0005183 0.000117 -0.000148 0.000112 0.000111 0.0000017 0.0000106 0.000125 0.000110 2004 10 30 53308 0.207227 0.365994 -0.4701014 0.0002667 0.000109 -0.000138 0.000117 0.000115 0.0000147 0.0000115 0.000133 0.000117 2004 10 31 53309 0.206964 0.363862 -0.4702852 0.0000909 0.000122 -0.000113 0.000120 0.000119 0.0000160 0.0000114 0.000129 0.000120 2004 11 1 53310 0.207264 0.361561 -0.4703251 0.0000004 0.000139 -0.000099 0.000116 0.000115 0.0000094 0.0000101 0.000126 0.000123 2004 11 2 53311 0.208076 0.359483 -0.4702937 -0.0000265 0.000157 -0.000095 0.000112 0.000111 0.0000030 0.0000094 0.000123 0.000126 2004 11 3 53312 0.208145 0.357325 -0.4702661 -0.0000058 0.000218 -0.000158 0.000112 0.000112 0.0000071 0.0000094 0.000108 0.000113 2004 11 4 53313 0.208082 0.355054 -0.4702980 0.0000985 0.000286 -0.000244 0.000114 0.000114 0.0000109 0.0000095 0.000089 0.000094 2004 11 5 53314 0.207743 0.352400 -0.4704587 0.0002604 0.000200 -0.000249 0.000114 0.000114 0.0000037 0.0000097 0.000070 0.000077 2004 11 6 53315 0.207843 0.349626 -0.4708535 0.0005229 0.000150 -0.000293 0.000119 0.000117 0.0000122 0.0000102 0.000071 0.000076 2004 11 7 53316 0.207889 0.347062 -0.4715132 0.0007814 0.000132 -0.000356 0.000122 0.000119 0.0000145 0.0000108 0.000080 0.000083 2004 11 8 53317 0.208030 0.344784 -0.4724223 0.0010360 0.000117 -0.000409 0.000120 0.000117 0.0000089 0.0000106 0.000088 0.000089 2004 11 9 53318 0.208014 0.343012 -0.4735571 0.0012259 0.000107 -0.000446 0.000117 0.000116 0.0000023 0.0000102 0.000097 0.000096 2004 11 10 53319 0.208006 0.341212 -0.4748537 0.0013179 0.000144 -0.000641 0.000117 0.000117 0.0000059 0.0000099 0.000718 0.000179 2004 11 11 53320 0.207929 0.339246 -0.4761582 0.0012696 0.000177 -0.000524 0.000116 0.000116 0.0000095 0.0000097 0.000604 0.000169 2004 11 12 53321 0.207788 0.336861 -0.4773374 0.0010920 0.000209 -0.000295 0.000114 0.000112 0.0000036 0.0000096 0.000231 0.000126 2004 11 13 53322 0.208010 0.334483 -0.4783719 0.0008456 0.000231 -0.000228 0.000116 0.000115 0.0000123 0.0000102 0.000128 0.000117 2004 11 14 53323 0.207862 0.332191 -0.4790694 0.0005609 0.000247 -0.000226 0.000122 0.000121 0.0000147 0.0000120 0.000125 0.000121 2004 11 15 53324 0.207653 0.329470 -0.4794926 0.0003777 0.000259 -0.000231 0.000123 0.000120 0.0000094 0.0000125 0.000123 0.000125 2004 11 16 53325 0.207411 0.327020 -0.4798295 0.0003422 0.000266 -0.000244 0.000117 0.000116 0.0000031 0.0000116 0.000121 0.000129 2004 11 17 53326 0.207141 0.324562 -0.4801942 0.0004205 0.000302 -0.000228 0.000115 0.000115 0.0000028 0.0000114 0.000113 0.000105 2004 11 18 53327 0.206883 0.322250 -0.4806853 0.0005952 0.000336 -0.000219 0.000116 0.000117 0.0000028 0.0000114 0.000102 0.000113 2004 11 19 53328 0.206625 0.319967 -0.4813817 0.0008242 0.000227 -0.000279 0.000117 0.000118 0.0000023 0.0000117 0.000085 0.000089 2004 11 20 53329 0.205985 0.317999 -0.4823076 0.0010115 0.000180 -0.000302 0.000119 0.000120 0.0000085 0.0000127 0.000082 0.000079 2004 11 21 53330 0.205595 0.315698 -0.4834000 0.0011251 0.000177 -0.000295 0.000119 0.000121 0.0000120 0.0000124 0.000084 0.000080 2004 11 22 53331 0.204989 0.313564 -0.4845426 0.0011441 0.000181 -0.000276 0.000115 0.000118 0.0000092 0.0000107 0.000086 0.000081 2004 11 23 53332 0.204223 0.311353 -0.4856366 0.0010698 0.000190 -0.000246 0.000111 0.000116 0.0000045 0.0000101 0.000088 0.000082 2004 11 24 53333 0.203060 0.309241 -0.4866095 0.0008874 0.000304 -0.000112 0.000109 0.000114 0.0000039 0.0000100 0.000193 0.000158 2004 11 25 53334 0.201798 0.306886 -0.4873811 0.0006769 0.000379 0.000001 0.000109 0.000114 0.0000723 0.0000100 0.001621 0.002239 2004 11 26 53335 0.200576 0.304577 -0.4879173 0.0004635 0.000426 0.000087 0.000109 0.000113 0.0001658 0.0000102 0.003530 0.005058 2004 11 27 53336 0.199864 0.302120 -0.4882345 0.0001918 0.000385 0.000091 0.000113 0.000116 0.0001290 0.0000107 0.002747 0.003924 2004 11 28 53337 0.199470 0.300057 -0.4883720 0.0000532 0.000336 0.000071 0.000119 0.000122 0.0000893 0.0000115 0.001914 0.002719 2004 11 29 53338 0.199176 0.298064 -0.4883892 -0.0000002 0.000280 0.000027 0.000118 0.000120 0.0000497 0.0000112 0.001082 0.001514 2004 11 30 53339 0.198466 0.296016 -0.4883589 -0.0000346 0.000222 -0.000037 0.000113 0.000116 0.0000100 0.0000107 0.000249 0.000309 2004 12 1 53340 0.197427 0.293643 -0.4883571 0.0000561 0.000224 -0.000091 0.000115 0.000117 0.0000041 0.0000108 0.000234 0.000201 2004 12 2 53341 0.195911 0.291474 -0.4884575 0.0002068 0.000229 -0.000215 0.000109 0.000113 0.0000019 0.0000108 0.000093 0.000084 2004 12 3 53342 0.193961 0.288954 -0.4887353 0.0003641 0.000234 -0.000421 0.000106 0.000111 0.0000017 0.0000108 0.000070 0.000071 2004 12 4 53343 0.192170 0.286645 -0.4891657 0.0005640 0.000258 -0.000469 0.000117 0.000120 0.0000173 0.0000114 0.000088 0.000086 2004 12 5 53344 0.190508 0.284634 -0.4898410 0.0007695 0.000289 -0.000440 0.000125 0.000127 0.0000181 0.0000120 0.000095 0.000088 2004 12 6 53345 0.188857 0.282775 -0.4907231 0.0009376 0.000319 -0.000399 0.000125 0.000125 0.0000105 0.0000114 0.000101 0.000091 2004 12 7 53346 0.187381 0.280586 -0.4917301 0.0010778 0.000347 -0.000345 0.000119 0.000119 0.0000037 0.0000106 0.000108 0.000093 2004 12 8 53347 0.186293 0.278700 -0.4928236 0.0010921 0.000179 -0.000342 0.000117 0.000118 0.0000022 0.0000106 0.000086 0.000079 2004 12 9 53348 0.184270 0.277094 -0.4938741 0.0009575 0.000091 -0.000423 0.000118 0.000119 0.0000028 0.0000106 0.000126 0.000124 2004 12 10 53349 0.182241 0.274795 -0.4946845 0.0007150 0.000224 -0.000553 0.000118 0.000120 0.0000037 0.0000107 0.000204 0.000177 2004 12 11 53350 0.180323 0.272813 -0.4953205 0.0004686 0.000259 -0.000550 0.000120 0.000122 0.0000095 0.0000114 0.000193 0.000164 2004 12 12 53351 0.178439 0.270889 -0.4957260 0.0002776 0.000234 -0.000491 0.000127 0.000127 0.0000095 0.0000122 0.000148 0.000128 2004 12 13 53352 0.176634 0.268811 -0.4959197 0.0001852 0.000209 -0.000429 0.000131 0.000130 0.0000055 0.0000117 0.000102 0.000093 2004 12 14 53353 0.174740 0.266780 -0.4961043 0.0002738 0.000183 -0.000364 0.000124 0.000127 0.0000016 0.0000110 0.000057 0.000057 2004 12 15 53354 0.173193 0.264500 -0.4964766 0.0005069 0.000146 -0.000339 0.000122 0.000126 0.0000040 0.0000108 0.000133 0.000101 2004 12 16 53355 0.171789 0.262458 -0.4970869 0.0007166 0.000170 -0.000331 0.000127 0.000129 0.0000063 0.0000107 0.000086 0.000086 2004 12 17 53356 0.170284 0.260675 -0.4979040 0.0009222 0.000222 -0.000329 0.000124 0.000127 0.0000023 0.0000106 0.000060 0.000062 2004 12 18 53357 0.169284 0.259034 -0.4989080 0.0010374 0.000202 -0.000349 0.000125 0.000128 0.0000084 0.0000110 0.000064 0.000062 2004 12 19 53358 0.168650 0.257510 -0.4999712 0.0010696 0.000152 -0.000374 0.000131 0.000135 0.0000113 0.0000122 0.000070 0.000070 2004 12 20 53359 0.167464 0.256089 -0.5010074 0.0009937 0.000101 -0.000390 0.000129 0.000134 0.0000075 0.0000122 0.000076 0.000077 2004 12 21 53360 0.165934 0.254214 -0.5019299 0.0007937 0.000051 -0.000399 0.000123 0.000129 0.0000021 0.0000116 0.000083 0.000085 2004 12 22 53361 0.164489 0.252391 -0.5026341 0.0005509 0.000084 -0.000261 0.000122 0.000127 0.0000012 0.0000119 0.000083 0.000081 2004 12 23 53362 0.163011 0.250382 -0.5030920 0.0003715 0.000139 -0.000089 0.000124 0.000126 0.0000014 0.0000123 0.000083 0.000076 2004 12 24 53363 0.161477 0.248876 -0.5033307 0.0001551 0.000127 -0.000027 0.000126 0.000128 0.0000016 0.0000125 0.000085 0.000075 2004 12 25 53364 0.159792 0.247485 -0.5033896 -0.0000889 0.000092 -0.000021 0.000134 0.000135 0.0000017 0.0000129 0.000089 0.000076 2004 12 26 53365 0.158235 0.246637 -0.5033163 -0.0001485 0.000059 -0.000035 0.000139 0.000141 0.0000019 0.0000131 0.000093 0.000076 2004 12 27 53366 0.156308 0.245752 -0.5031687 -0.0001335 0.000027 -0.000071 0.000138 0.000140 0.0000020 0.0000121 0.000097 0.000077 2004 12 28 53367 0.154492 0.244018 -0.5030134 -0.0001121 -0.000002 -0.000125 0.000135 0.000138 0.0000022 0.0000118 0.000101 0.000078 2004 12 29 53368 0.152858 0.242510 -0.5029212 -0.0000321 0.000042 -0.000237 0.000134 0.000137 0.0000019 0.0000120 0.000088 0.000071 2004 12 30 53369 0.151067 0.241137 -0.5029636 0.0001021 0.000108 -0.000364 0.000131 0.000133 0.0000015 0.0000117 0.000070 0.000061 2004 12 31 53370 0.150010 0.239424 -0.5031956 0.0003405 0.000107 -0.000428 0.000134 0.000137 0.0000044 0.0000118 0.000063 0.000056 2005 1 1 53371 0.149127 0.238253 -0.5036372 0.0005341 0.000080 -0.000455 0.000141 0.000142 0.0000085 0.0000127 0.000059 0.000053 2005 1 2 53372 0.148627 0.236995 -0.5042718 0.0006838 0.000051 -0.000466 0.000141 0.000141 0.0000127 0.0000127 0.000055 0.000050 2005 1 3 53373 0.148662 0.235979 -0.5050501 0.0008067 0.000023 -0.000458 0.000137 0.000137 0.0000348 0.0000111 0.000052 0.000047 2005 1 4 53374 0.148363 0.234958 -0.5058960 0.0008421 -0.000004 -0.000435 0.000131 0.000131 0.0000660 0.0000104 0.000048 0.000044 2005 1 5 53375 0.147950 0.233535 -0.5067148 0.0007742 0.000000 -0.000381 0.000128 0.000128 0.0000793 0.0000104 0.000065 0.000059 2005 1 6 53376 0.146804 0.231967 -0.5074019 0.0005978 0.000016 -0.000318 0.000132 0.000131 0.0000304 0.0000106 0.000087 0.000078 2005 1 7 53377 0.145045 0.230109 -0.5078778 0.0003581 0.000038 -0.000258 0.000132 0.000132 0.0000081 0.0000108 0.000110 0.000097 2005 1 8 53378 0.143382 0.228233 -0.5081568 0.0001909 0.000048 -0.000253 0.000133 0.000131 0.0000088 0.0000113 0.000106 0.000094 2005 1 9 53379 0.141822 0.227054 -0.5083525 0.0001380 0.000056 -0.000275 0.000137 0.000136 0.0000150 0.0000119 0.000093 0.000083 2005 1 10 53380 0.139790 0.225819 -0.5085048 0.0002192 0.000065 -0.000307 0.000134 0.000136 0.0000113 0.0000116 0.000081 0.000072 2005 1 11 53381 0.137273 0.224654 -0.5087751 0.0004279 0.000074 -0.000348 0.000126 0.000130 0.0000033 0.0000110 0.000068 0.000061 2005 1 12 53382 0.135164 0.223346 -0.5093768 0.0007228 0.000110 -0.000410 0.000124 0.000129 0.0000281 0.0000108 0.000333 0.000318 2005 1 13 53383 0.133509 0.222220 -0.5101781 0.0009927 0.000154 -0.000428 0.000127 0.000131 0.0000170 0.0000107 0.000152 0.000166 2005 1 14 53384 0.131818 0.221169 -0.5112636 0.0011871 0.000164 -0.000385 0.000127 0.000131 0.0000051 0.0000108 0.000090 0.000085 2005 1 15 53385 0.129979 0.220018 -0.5124684 0.0012163 0.000142 -0.000395 0.000132 0.000135 0.0000082 0.0000116 0.000162 0.000137 2005 1 16 53386 0.128585 0.218677 -0.5136702 0.0011684 0.000108 -0.000424 0.000130 0.000132 0.0000122 0.0000124 0.000248 0.000212 2005 1 17 53387 0.127324 0.217577 -0.5147706 0.0010243 0.000072 -0.000446 0.000121 0.000123 0.0000197 0.0000121 0.000335 0.000288 2005 1 18 53388 0.125800 0.216488 -0.5156937 0.0008176 0.000036 -0.000462 0.000117 0.000120 0.0000301 0.0000116 0.000422 0.000363 2005 1 19 53389 0.124033 0.215928 -0.5164140 0.0006007 -0.000032 -0.000367 0.000114 0.000115 0.0000060 0.0000115 0.000131 0.000114 2005 1 20 53390 0.121564 0.215338 -0.5169088 0.0003943 -0.000012 -0.000338 0.000113 0.000112 0.0000014 0.0000115 0.000047 0.000046 2005 1 21 53391 0.119227 0.214304 -0.5172220 0.0002538 0.000124 -0.000340 0.000116 0.000115 0.0000019 0.0000116 0.000097 0.000087 2005 1 22 53392 0.117095 0.213449 -0.5174234 0.0001342 0.000134 -0.000337 0.000120 0.000119 0.0000086 0.0000121 0.000107 0.000097 2005 1 23 53393 0.114619 0.212625 -0.5175168 0.0000639 0.000086 -0.000331 0.000138 0.000136 0.0000133 0.0000134 0.000092 0.000088 2005 1 24 53394 0.112391 0.211615 -0.5175422 0.0000399 0.000041 -0.000326 0.000148 0.000146 0.0000096 0.0000136 0.000078 0.000078 2005 1 25 53395 0.110020 0.210797 -0.5175828 0.0000436 -0.000004 -0.000320 0.000138 0.000136 0.0000028 0.0000127 0.000063 0.000069 2005 1 26 53396 0.107620 0.209791 -0.5177146 0.0001803 0.000048 -0.000363 0.000135 0.000133 0.0000210 0.0000125 0.000173 0.000156 2005 1 27 53397 0.105428 0.209443 -0.5179914 0.0003989 0.000111 -0.000375 0.000137 0.000135 0.0000352 0.0000127 0.000136 0.000141 2005 1 28 53398 0.103169 0.209155 -0.5184413 0.0005579 0.000116 -0.000304 0.000136 0.000134 0.0000091 0.0000129 0.000119 0.000127 2005 1 29 53399 0.100685 0.209161 -0.5190618 0.0006647 0.000104 -0.000259 0.000142 0.000139 0.0000105 0.0000138 0.000114 0.000118 2005 1 30 53400 0.097510 0.208962 -0.5197072 0.0007052 0.000091 -0.000235 0.000148 0.000145 0.0000155 0.0000142 0.000103 0.000106 2005 1 31 53401 0.094677 0.208529 -0.5204143 0.0007241 0.000075 -0.000214 0.000144 0.000141 0.0000110 0.0000130 0.000092 0.000093 2005 2 1 53402 0.091968 0.208520 -0.5211910 0.0007078 0.000056 -0.000198 0.000137 0.000133 0.0000034 0.0000122 0.000081 0.000081 2005 2 2 53403 0.089165 0.207865 -0.5219008 0.0006168 0.000075 -0.000160 0.000135 0.000132 0.0000390 0.0000121 0.000070 0.000065 2005 2 3 53404 0.086541 0.207079 -0.5224427 0.0004204 0.000074 -0.000155 0.000137 0.000134 0.0000657 0.0000121 0.000103 0.000112 2005 2 4 53405 0.083854 0.206451 -0.5227709 0.0002340 0.000056 -0.000270 0.000137 0.000134 0.0000153 0.0000121 0.000127 0.000119 2005 2 5 53406 0.081472 0.206087 -0.5229198 0.0001845 0.000039 -0.000310 0.000139 0.000136 0.0000115 0.0000127 0.000119 0.000104 2005 2 6 53407 0.078845 0.206043 -0.5231870 0.0002636 0.000024 -0.000307 0.000143 0.000140 0.0000144 0.0000134 0.000104 0.000089 2005 2 7 53408 0.076052 0.206006 -0.5235658 0.0004259 0.000012 -0.000304 0.000140 0.000138 0.0000093 0.0000129 0.000088 0.000073 2005 2 8 53409 0.073083 0.205704 -0.5240690 0.0006717 0.000001 -0.000300 0.000131 0.000130 0.0000027 0.0000125 0.000072 0.000057 2005 2 9 53410 0.069957 0.205217 -0.5248846 0.0010017 -0.000028 -0.000194 0.000127 0.000127 0.0000101 0.0000125 0.000050 0.000044 2005 2 10 53411 0.066760 0.204537 -0.5260404 0.0012922 0.000034 -0.000229 0.000128 0.000128 0.0000163 0.0000125 0.000036 0.000034 2005 2 11 53412 0.064102 0.203869 -0.5274561 0.0015365 0.000056 -0.000286 0.000129 0.000128 0.0000047 0.0000124 0.000072 0.000074 2005 2 12 53413 0.061531 0.203510 -0.5290253 0.0015783 0.000046 -0.000307 0.000139 0.000138 0.0000093 0.0000134 0.000084 0.000084 2005 2 13 53414 0.059241 0.203203 -0.5305623 0.0014233 0.000032 -0.000320 0.000139 0.000138 0.0000112 0.0000140 0.000080 0.000077 2005 2 14 53415 0.057231 0.203388 -0.5319093 0.0011982 0.000020 -0.000332 0.000128 0.000128 0.0000072 0.0000130 0.000077 0.000070 2005 2 15 53416 0.054666 0.203526 -0.5329792 0.0009317 0.000010 -0.000340 0.000121 0.000121 0.0000026 0.0000122 0.000073 0.000062 2005 2 16 53417 0.051753 0.203329 -0.5337540 0.0006397 -0.000027 -0.000421 0.000120 0.000121 0.0000163 0.0000121 0.000216 0.000157 2005 2 17 53418 0.048481 0.203151 -0.5342868 0.0004199 -0.000008 -0.000469 0.000122 0.000123 0.0000267 0.0000123 0.000147 0.000142 2005 2 18 53419 0.045526 0.203389 -0.5346942 0.0003913 0.000088 -0.000414 0.000120 0.000122 0.0000069 0.0000127 0.000105 0.000100 2005 2 19 53420 0.042593 0.204048 -0.5351309 0.0004656 0.000113 -0.000363 0.000122 0.000124 0.0000079 0.0000134 0.000100 0.000086 2005 2 20 53421 0.040200 0.204674 -0.5356545 0.0005882 0.000097 -0.000321 0.000128 0.000129 0.0000100 0.0000131 0.000096 0.000081 2005 2 21 53422 0.037694 0.205453 -0.5363012 0.0007287 0.000072 -0.000278 0.000127 0.000128 0.0000065 0.0000118 0.000091 0.000075 2005 2 22 53423 0.035448 0.205934 -0.5371104 0.0009185 0.000038 -0.000240 0.000119 0.000122 0.0000020 0.0000111 0.000087 0.000070 2005 2 23 53424 0.033304 0.206323 -0.5381046 0.0011003 -0.000001 -0.000039 0.000119 0.000122 0.0000111 0.0000110 0.000608 0.000216 2005 2 24 53425 0.031512 0.206353 -0.5392994 0.0013194 -0.000037 0.000008 0.000125 0.000126 0.0000184 0.0000112 0.000775 0.000268 2005 2 25 53426 0.030353 0.206862 -0.5407028 0.0015306 -0.000063 -0.000221 0.000124 0.000125 0.0000052 0.0000112 0.000256 0.000136 2005 2 26 53427 0.029219 0.207726 -0.5423075 0.0016880 -0.000103 -0.000297 0.000128 0.000128 0.0000099 0.0000121 0.000113 0.000097 2005 2 27 53428 0.027655 0.208813 -0.5440295 0.0017172 -0.000142 -0.000320 0.000124 0.000126 0.0000164 0.0000123 0.000109 0.000092 2005 2 28 53429 0.025823 0.209996 -0.5457403 0.0016447 -0.000168 -0.000346 0.000113 0.000116 0.0000118 0.0000111 0.000104 0.000088 2005 3 1 53430 0.024052 0.211444 -0.5473513 0.0015478 -0.000182 -0.000370 0.000107 0.000111 0.0000029 0.0000105 0.000100 0.000083 2005 3 2 53431 0.021817 0.213060 -0.5488190 0.0013677 -0.000140 -0.000398 0.000105 0.000109 0.0000176 0.0000105 0.000099 0.000086 2005 3 3 53432 0.019381 0.214308 -0.5501005 0.0011815 -0.000076 -0.000419 0.000106 0.000110 0.0000295 0.0000105 0.000100 0.000091 2005 3 4 53433 0.017101 0.215244 -0.5512075 0.0010290 -0.000009 -0.000426 0.000106 0.000109 0.0000073 0.0000105 0.000100 0.000096 2005 3 5 53434 0.015127 0.216059 -0.5522380 0.0009429 0.000028 -0.000416 0.000111 0.000113 0.0000065 0.0000112 0.000097 0.000094 2005 3 6 53435 0.012718 0.216748 -0.5531762 0.0009327 0.000049 -0.000392 0.000116 0.000118 0.0000103 0.0000118 0.000094 0.000089 2005 3 7 53436 0.010573 0.217180 -0.5541318 0.0010298 0.000061 -0.000359 0.000113 0.000115 0.0000075 0.0000112 0.000090 0.000083 2005 3 8 53437 0.008774 0.217971 -0.5552331 0.0011929 0.000065 -0.000319 0.000109 0.000110 0.0000022 0.0000105 0.000087 0.000078 2005 3 9 53438 0.006792 0.218809 -0.5565011 0.0013538 0.000050 -0.000275 0.000110 0.000110 0.0000142 0.0000105 0.000092 0.000087 2005 3 10 53439 0.004739 0.219654 -0.5578996 0.0014772 0.000027 -0.000233 0.000114 0.000113 0.0000236 0.0000105 0.000100 0.000100 2005 3 11 53440 0.002476 0.220477 -0.5593777 0.0015274 0.000001 -0.000198 0.000114 0.000112 0.0000062 0.0000104 0.000108 0.000113 2005 3 12 53441 0.000500 0.221380 -0.5609070 0.0014737 -0.000020 -0.000172 0.000116 0.000114 0.0000075 0.0000111 0.000103 0.000109 2005 3 13 53442 -0.001461 0.222231 -0.5622918 0.0012550 -0.000035 -0.000157 0.000116 0.000114 0.0000082 0.0000114 0.000092 0.000099 2005 3 14 53443 -0.002597 0.222633 -0.5633800 0.0009517 -0.000045 -0.000153 0.000111 0.000111 0.0000052 0.0000106 0.000082 0.000088 2005 3 15 53444 -0.003790 0.223284 -0.5641513 0.0005699 -0.000049 -0.000157 0.000108 0.000108 0.0000021 0.0000101 0.000072 0.000078 2005 3 16 53445 -0.005604 0.223507 -0.5646263 0.0002770 -0.000045 -0.000287 0.000108 0.000109 0.0000376 0.0000102 0.001498 0.001429 2005 3 17 53446 -0.006865 0.223789 -0.5647499 0.0000988 -0.000002 -0.000347 0.000107 0.000109 0.0000195 0.0000101 0.000540 0.000499 2005 3 18 53447 -0.008051 0.224235 -0.5648070 0.0000282 0.000085 -0.000256 0.000105 0.000105 0.0000053 0.0000100 0.000101 0.000089 2005 3 19 53448 -0.008981 0.224977 -0.5648581 0.0000611 0.000083 -0.000226 0.000108 0.000106 0.0000065 0.0000105 0.000094 0.000088 2005 3 20 53449 -0.009838 0.226012 -0.5649492 0.0001478 0.000039 -0.000234 0.000112 0.000110 0.0000122 0.0000112 0.000084 0.000079 2005 3 21 53450 -0.010707 0.227071 -0.5651197 0.0002459 -0.000010 -0.000241 0.000112 0.000110 0.0000094 0.0000111 0.000075 0.000069 2005 3 22 53451 -0.011789 0.228416 -0.5654449 0.0004318 -0.000064 -0.000246 0.000107 0.000105 0.0000026 0.0000108 0.000065 0.000059 2005 3 23 53452 -0.013284 0.230378 -0.5660244 0.0007294 0.000013 -0.000457 0.000107 0.000105 0.0000015 0.0000108 0.000102 0.000129 2005 3 24 53453 -0.015256 0.231950 -0.5668728 0.0009882 0.000022 -0.000388 0.000108 0.000107 0.0000019 0.0000105 0.000124 0.000120 2005 3 25 53454 -0.016567 0.233198 -0.5679314 0.0011630 -0.000010 -0.000333 0.000109 0.000107 0.0000019 0.0000106 0.000120 0.000105 2005 3 26 53455 -0.017806 0.234663 -0.5691134 0.0012079 -0.000045 -0.000314 0.000113 0.000110 0.0000018 0.0000114 0.000111 0.000097 2005 3 27 53456 -0.019261 0.236339 -0.5703131 0.0011523 -0.000077 -0.000291 0.000107 0.000103 0.0000017 0.0000108 0.000101 0.000089 2005 3 28 53457 -0.020793 0.238043 -0.5714170 0.0010145 -0.000105 -0.000265 0.000098 0.000094 0.0000016 0.0000091 0.000091 0.000081 2005 3 29 53458 -0.022650 0.239326 -0.5723277 0.0007985 -0.000126 -0.000239 0.000095 0.000091 0.0000014 0.0000085 0.000082 0.000073 2005 3 30 53459 -0.024693 0.240412 -0.5729848 0.0005165 -0.000134 -0.000272 0.000094 0.000090 0.0000059 0.0000084 0.000065 0.000061 2005 3 31 53460 -0.026863 0.241401 -0.5733644 0.0002467 -0.000135 -0.000321 0.000093 0.000089 0.0000091 0.0000084 0.000047 0.000048 2005 4 1 53461 -0.028745 0.242820 -0.5735309 0.0000816 -0.000007 -0.000255 0.000094 0.000091 0.0000031 0.0000086 0.000092 0.000088 2005 4 2 53462 -0.030723 0.244101 -0.5736586 0.0001183 0.000024 -0.000214 0.000099 0.000095 0.0000015 0.0000091 0.000104 0.000100 2005 4 3 53463 -0.032354 0.245090 -0.5739023 0.0003283 0.000000 -0.000204 0.000104 0.000099 0.0000015 0.0000107 0.000097 0.000095 2005 4 4 53464 -0.033433 0.245782 -0.5743640 0.0006111 -0.000029 -0.000203 0.000102 0.000097 0.0000016 0.0000114 0.000090 0.000091 2005 4 5 53465 -0.034454 0.246157 -0.5750895 0.0008783 -0.000063 -0.000208 0.000097 0.000093 0.0000017 0.0000106 0.000083 0.000086 2005 4 6 53466 -0.034996 0.246631 -0.5760644 0.0010893 -0.000102 -0.000261 0.000096 0.000092 0.0000057 0.0000104 0.000052 0.000051 2005 4 7 53467 -0.035563 0.248140 -0.5772348 0.0012235 -0.000141 -0.000341 0.000097 0.000094 0.0000086 0.0000104 0.000057 0.000056 2005 4 8 53468 -0.036664 0.250298 -0.5785151 0.0012943 -0.000125 -0.000360 0.000096 0.000094 0.0000031 0.0000105 0.000083 0.000083 2005 4 9 53469 -0.038460 0.252496 -0.5797960 0.0011768 -0.000107 -0.000369 0.000098 0.000095 0.0000059 0.0000111 0.000088 0.000088 2005 4 10 53470 -0.040646 0.254062 -0.5808678 0.0008996 -0.000094 -0.000370 0.000095 0.000093 0.0000063 0.0000111 0.000086 0.000084 2005 4 11 53471 -0.042510 0.255449 -0.5816150 0.0005758 -0.000080 -0.000358 0.000087 0.000087 0.0000038 0.0000101 0.000082 0.000079 2005 4 12 53472 -0.044162 0.256959 -0.5820762 0.0003361 -0.000066 -0.000333 0.000084 0.000084 0.0000013 0.0000097 0.000080 0.000074 2005 4 13 53473 -0.045403 0.258772 -0.5823624 0.0002254 -0.000103 -0.000260 0.000084 0.000085 0.0000077 0.0000097 0.000086 0.000082 2005 4 14 53474 -0.046132 0.260564 -0.5825931 0.0002095 -0.000151 -0.000173 0.000086 0.000086 0.0000126 0.0000097 0.000095 0.000093 2005 4 15 53475 -0.046747 0.262527 -0.5828515 0.0002604 -0.000195 -0.000089 0.000084 0.000085 0.0000037 0.0000097 0.000104 0.000104 2005 4 16 53476 -0.047881 0.264961 -0.5831727 0.0003784 -0.000173 -0.000052 0.000085 0.000086 0.0000113 0.0000102 0.000096 0.000097 2005 4 17 53477 -0.049349 0.267371 -0.5836554 0.0005368 -0.000124 -0.000042 0.000087 0.000087 0.0000164 0.0000116 0.000083 0.000083 2005 4 18 53478 -0.050960 0.269652 -0.5843187 0.0007260 -0.000072 -0.000045 0.000087 0.000086 0.0000111 0.0000119 0.000069 0.000069 2005 4 19 53479 -0.052440 0.271916 -0.5851537 0.0009532 -0.000019 -0.000059 0.000084 0.000084 0.0000028 0.0000114 0.000056 0.000055 2005 4 20 53480 -0.053865 0.274283 -0.5861801 0.0011395 -0.000029 -0.000098 0.000083 0.000084 0.0000082 0.0000115 0.000093 0.000075 2005 4 21 53481 -0.054930 0.276508 -0.5873931 0.0013044 -0.000058 -0.000145 0.000083 0.000084 0.0000133 0.0000116 0.000143 0.000105 2005 4 22 53482 -0.055752 0.278712 -0.5887543 0.0014066 -0.000072 -0.000198 0.000083 0.000084 0.0000040 0.0000116 0.000104 0.000095 2005 4 23 53483 -0.056823 0.280981 -0.5901870 0.0014591 -0.000063 -0.000198 0.000086 0.000087 0.0000112 0.0000123 0.000080 0.000081 2005 4 24 53484 -0.057699 0.283370 -0.5915980 0.0013963 -0.000048 -0.000174 0.000094 0.000095 0.0000185 0.0000131 0.000071 0.000070 2005 4 25 53485 -0.058417 0.285254 -0.5929147 0.0012270 -0.000031 -0.000146 0.000099 0.000098 0.0000132 0.0000126 0.000063 0.000059 2005 4 26 53486 -0.058775 0.286963 -0.5940472 0.0009727 -0.000015 -0.000115 0.000094 0.000094 0.0000031 0.0000117 0.000055 0.000048 2005 4 27 53487 -0.058868 0.288622 -0.5949169 0.0006979 0.000021 -0.000088 0.000093 0.000093 0.0000127 0.0000116 0.000043 0.000036 2005 4 28 53488 -0.058469 0.290477 -0.5955257 0.0005097 0.000057 -0.000063 0.000093 0.000094 0.0000212 0.0000114 0.000030 0.000024 2005 4 29 53489 -0.057882 0.292558 -0.5959727 0.0004359 0.000060 -0.000127 0.000092 0.000093 0.0000057 0.0000114 0.000072 0.000075 2005 4 30 53490 -0.057267 0.294864 -0.5964331 0.0005237 0.000051 -0.000153 0.000096 0.000096 0.0000015 0.0000121 0.000081 0.000085 2005 5 1 53491 -0.057311 0.297688 -0.5970633 0.0007283 0.000040 -0.000152 0.000093 0.000093 0.0000014 0.0000129 0.000070 0.000072 2005 5 2 53492 -0.057821 0.300144 -0.5979525 0.0010104 0.000026 -0.000148 0.000084 0.000084 0.0000013 0.0000123 0.000060 0.000059 2005 5 3 53493 -0.059068 0.302228 -0.5991066 0.0012406 0.000013 -0.000139 0.000080 0.000081 0.0000012 0.0000114 0.000050 0.000045 2005 5 4 53494 -0.059957 0.304043 -0.6004520 0.0013756 -0.000020 -0.000153 0.000079 0.000080 0.0000074 0.0000113 0.000054 0.000054 2005 5 5 53495 -0.060615 0.306104 -0.6018569 0.0013816 -0.000054 -0.000165 0.000080 0.000081 0.0000119 0.0000115 0.000063 0.000068 2005 5 6 53496 -0.060897 0.307876 -0.6031970 0.0012961 -0.000081 -0.000170 0.000079 0.000081 0.0000040 0.0000117 0.000071 0.000081 2005 5 7 53497 -0.060760 0.309849 -0.6044076 0.0011477 -0.000035 -0.000110 0.000081 0.000083 0.0000017 0.0000123 0.000082 0.000090 2005 5 8 53498 -0.060635 0.311571 -0.6054316 0.0009241 0.000038 -0.000027 0.000086 0.000088 0.0000016 0.0000123 0.000095 0.000097 2005 5 9 53499 -0.060641 0.313179 -0.6062294 0.0006612 0.000110 0.000052 0.000086 0.000089 0.0000014 0.0000110 0.000107 0.000104 2005 5 10 53500 -0.060913 0.314771 -0.6067983 0.0004318 0.000176 0.000121 0.000083 0.000087 0.0000012 0.0000106 0.000120 0.000110 2005 5 11 53501 -0.061328 0.316228 -0.6071747 0.0002892 0.000103 0.000123 0.000082 0.000086 0.0000013 0.0000106 0.000205 0.000241 2005 5 12 53502 -0.062110 0.317589 -0.6074352 0.0002491 0.000048 0.000072 0.000081 0.000085 0.0000014 0.0000104 0.000200 0.000245 2005 5 13 53503 -0.063071 0.319000 -0.6076723 0.0002596 0.000032 -0.000012 0.000082 0.000086 0.0000016 0.0000103 0.000109 0.000126 2005 5 14 53504 -0.064631 0.320398 -0.6079686 0.0003055 0.000016 -0.000045 0.000084 0.000088 0.0000018 0.0000108 0.000082 0.000091 2005 5 15 53505 -0.065761 0.321768 -0.6083754 0.0004499 -0.000003 -0.000064 0.000089 0.000092 0.0000022 0.0000113 0.000079 0.000088 2005 5 16 53506 -0.066800 0.323634 -0.6089162 0.0006394 -0.000022 -0.000083 0.000090 0.000092 0.0000025 0.0000108 0.000076 0.000084 2005 5 17 53507 -0.067524 0.325104 -0.6095964 0.0008206 -0.000038 -0.000100 0.000087 0.000090 0.0000029 0.0000104 0.000072 0.000081 2005 5 18 53508 -0.068354 0.326519 -0.6104106 0.0009428 -0.000115 -0.000170 0.000087 0.000089 0.0000124 0.0000104 0.000062 0.000068 2005 5 19 53509 -0.069217 0.327831 -0.6113617 0.0010041 -0.000201 -0.000247 0.000087 0.000088 0.0000191 0.0000103 0.000051 0.000053 2005 5 20 53510 -0.070063 0.329315 -0.6123921 0.0010101 -0.000059 -0.000224 0.000086 0.000087 0.0000054 0.0000104 0.000066 0.000070 2005 5 21 53511 -0.070696 0.330702 -0.6133429 0.0009458 -0.000021 -0.000189 0.000089 0.000090 0.0000132 0.0000112 0.000074 0.000075 2005 5 22 53512 -0.071013 0.332316 -0.6142091 0.0007821 -0.000045 -0.000156 0.000091 0.000091 0.0000181 0.0000119 0.000077 0.000073 2005 5 23 53513 -0.071279 0.334016 -0.6148453 0.0004865 -0.000065 -0.000115 0.000087 0.000088 0.0000119 0.0000115 0.000080 0.000071 2005 5 24 53514 -0.071473 0.335642 -0.6151352 0.0001199 -0.000083 -0.000070 0.000085 0.000085 0.0000030 0.0000108 0.000083 0.000069 2005 5 25 53515 -0.071407 0.337355 -0.6151314 -0.0001653 -0.000081 -0.000066 0.000086 0.000085 0.0000137 0.0000109 0.000106 0.000092 2005 5 26 53516 -0.070530 0.339319 -0.6148985 -0.0002952 -0.000076 -0.000073 0.000086 0.000086 0.0000227 0.0000109 0.000134 0.000123 2005 5 27 53517 -0.069019 0.341574 -0.6145757 -0.0002512 0.000045 -0.000161 0.000086 0.000086 0.0000061 0.0000109 0.000125 0.000120 2005 5 28 53518 -0.068114 0.343783 -0.6144008 -0.0000582 0.000073 -0.000089 0.000088 0.000088 0.0000110 0.0000116 0.000206 0.000196 2005 5 29 53519 -0.067160 0.345842 -0.6144881 0.0001982 0.000047 0.000045 0.000087 0.000086 0.0000238 0.0000116 0.000325 0.000305 2005 5 30 53520 -0.066006 0.348020 -0.6148256 0.0004461 0.000012 0.000173 0.000084 0.000084 0.0000427 0.0000106 0.000444 0.000413 2005 5 31 53521 -0.064567 0.349800 -0.6153906 0.0006725 -0.000049 0.000036 0.000081 0.000081 0.0000283 0.0000099 0.000320 0.000304 2005 6 1 53522 -0.062985 0.351196 -0.6160988 0.0007315 -0.000118 -0.000167 0.000077 0.000077 0.0000057 0.0000095 0.000136 0.000142 2005 6 2 53523 -0.061658 0.352698 -0.6168112 0.0006440 -0.000090 -0.000197 0.000076 0.000077 0.0000014 0.0000094 0.000096 0.000107 2005 6 3 53524 -0.060515 0.354504 -0.6173678 0.0004551 -0.000035 -0.000178 0.000077 0.000079 0.0000017 0.0000095 0.000092 0.000106 2005 6 4 53525 -0.059993 0.356545 -0.6176596 0.0001878 -0.000065 -0.000127 0.000079 0.000081 0.0000122 0.0000102 0.000087 0.000098 2005 6 5 53526 -0.059573 0.358275 -0.6177904 -0.0000324 -0.000124 -0.000063 0.000086 0.000087 0.0000252 0.0000113 0.000081 0.000088 2005 6 6 53527 -0.059163 0.359842 -0.6176885 -0.0002168 -0.000175 0.000003 0.000087 0.000089 0.0000192 0.0000114 0.000075 0.000078 2005 6 7 53528 -0.058672 0.361170 -0.6173202 -0.0004090 -0.000219 0.000064 0.000083 0.000085 0.0000042 0.0000108 0.000070 0.000068 2005 6 8 53529 -0.058184 0.362400 -0.6168170 -0.0005549 -0.000006 0.000059 0.000083 0.000086 0.0000150 0.0000108 0.000168 0.000131 2005 6 9 53530 -0.057674 0.363385 -0.6162652 -0.0005770 0.000022 -0.000040 0.000085 0.000087 0.0000249 0.0000106 0.000181 0.000151 2005 6 10 53531 -0.056587 0.364853 -0.6157433 -0.0004866 -0.000029 -0.000161 0.000085 0.000089 0.0000066 0.0000108 0.000160 0.000151 2005 6 11 53532 -0.055492 0.366982 -0.6153516 -0.0003859 -0.000033 -0.000176 0.000087 0.000090 0.0000160 0.0000115 0.000140 0.000135 2005 6 12 53533 -0.054401 0.369007 -0.6150527 -0.0002312 -0.000024 -0.000148 0.000085 0.000088 0.0000168 0.0000121 0.000119 0.000113 2005 6 13 53534 -0.053278 0.371104 -0.6148896 -0.0000830 -0.000018 -0.000114 0.000080 0.000083 0.0000095 0.0000116 0.000099 0.000092 2005 6 14 53535 -0.052484 0.373233 -0.6149074 0.0000729 -0.000013 -0.000074 0.000078 0.000080 0.0000029 0.0000109 0.000078 0.000070 2005 6 15 53536 -0.052029 0.374995 -0.6150766 0.0002299 -0.000086 -0.000078 0.000078 0.000080 0.0000319 0.0000108 0.000101 0.000121 2005 6 16 53537 -0.051427 0.376434 -0.6153840 0.0003589 -0.000175 -0.000091 0.000080 0.000081 0.0000537 0.0000109 0.000134 0.000190 2005 6 17 53538 -0.050514 0.377957 -0.6157761 0.0004037 -0.000040 -0.000043 0.000078 0.000080 0.0000128 0.0000108 0.000092 0.000117 2005 6 18 53539 -0.049555 0.379514 -0.6161183 0.0002909 0.000013 -0.000015 0.000079 0.000081 0.0000099 0.0000113 0.000072 0.000080 2005 6 19 53540 -0.048285 0.381104 -0.6162920 0.0000712 0.000010 -0.000004 0.000083 0.000085 0.0000142 0.0000119 0.000070 0.000075 2005 6 20 53541 -0.047196 0.382881 -0.6162368 -0.0001899 0.000008 0.000004 0.000081 0.000084 0.0000097 0.0000114 0.000068 0.000070 2005 6 21 53542 -0.046270 0.384319 -0.6159441 -0.0003791 0.000005 0.000007 0.000078 0.000081 0.0000025 0.0000109 0.000066 0.000065 2005 6 22 53543 -0.045619 0.386010 -0.6154740 -0.0005034 0.000046 -0.000054 0.000078 0.000080 0.0000149 0.0000110 0.000047 0.000050 2005 6 23 53544 -0.045014 0.387249 -0.6149714 -0.0004800 0.000072 -0.000109 0.000080 0.000081 0.0000249 0.0000110 0.000475 0.000323 2005 6 24 53545 -0.044492 0.388460 -0.6145893 -0.0003222 0.000060 -0.000118 0.000080 0.000082 0.0000065 0.0000111 0.000167 0.000142 2005 6 25 53546 -0.043687 0.389652 -0.6144113 -0.0000561 0.000050 -0.000086 0.000082 0.000083 0.0000099 0.0000118 0.000079 0.000087 2005 6 26 53547 -0.042834 0.390880 -0.6145227 0.0001760 0.000038 -0.000040 0.000083 0.000084 0.0000158 0.0000119 0.000072 0.000079 2005 6 27 53548 -0.041507 0.391906 -0.6148130 0.0003185 0.000019 0.000001 0.000079 0.000081 0.0000113 0.0000108 0.000064 0.000071 2005 6 28 53549 -0.040396 0.393473 -0.6151308 0.0003202 -0.000002 0.000037 0.000077 0.000079 0.0000032 0.0000102 0.000056 0.000063 2005 6 29 53550 -0.039885 0.394803 -0.6153949 0.0002179 -0.000008 0.000023 0.000078 0.000080 0.0000090 0.0000103 0.000063 0.000055 2005 6 30 53551 -0.039895 0.396165 -0.6155237 0.0000195 -0.000077 -0.000069 0.000078 0.000079 0.0000144 0.0000103 0.000031 0.000032 2005 7 1 53552 -0.039940 0.396997 -0.6154455 -0.0002243 -0.000096 -0.000185 0.000078 0.000079 0.0000049 0.0000104 0.000095 0.000089 2005 7 2 53553 -0.039290 0.398043 -0.6151008 -0.0004883 -0.000090 -0.000223 0.000081 0.000082 0.0000251 0.0000112 0.000139 0.000149 2005 7 3 53554 -0.038486 0.399034 -0.6144287 -0.0008044 -0.000077 -0.000221 0.000086 0.000087 0.0000191 0.0000119 0.000162 0.000199 2005 7 4 53555 -0.037429 0.399917 -0.6135724 -0.0010064 -0.000055 -0.000200 0.000085 0.000087 0.0000212 0.0000114 0.000185 0.000250 2005 7 5 53556 -0.036183 0.401353 -0.6125838 -0.0010737 -0.000025 -0.000164 0.000082 0.000083 0.0000314 0.0000108 0.000207 0.000299 2005 7 6 53557 -0.034475 0.402825 -0.6114674 -0.0010214 0.000032 -0.000090 0.000080 0.000082 0.0000063 0.0000108 0.000117 0.000132 2005 7 7 53558 -0.032747 0.404697 -0.6104678 -0.0009232 -0.000010 0.000064 0.000081 0.000082 0.0000012 0.0000108 0.000098 0.000098 2005 7 8 53559 -0.031271 0.406333 -0.6096254 -0.0008266 -0.000077 0.000227 0.000083 0.000084 0.0000014 0.0000109 0.000098 0.000098 2005 7 9 53560 -0.029862 0.407494 -0.6088712 -0.0006537 -0.000090 0.000391 0.000084 0.000085 0.0000162 0.0000116 0.000069 0.000073 2005 7 10 53561 -0.028568 0.408168 -0.6083252 -0.0004455 0.000193 0.000257 0.000084 0.000085 0.0000171 0.0000130 0.000051 0.000064 2005 7 11 53562 -0.027617 0.408808 -0.6080178 -0.0002567 0.000327 0.000055 0.000081 0.000082 0.0000096 0.0000129 0.000066 0.000076 2005 7 12 53563 -0.026723 0.409497 -0.6078476 -0.0000925 0.000299 -0.000113 0.000077 0.000079 0.0000027 0.0000121 0.000095 0.000092 2005 7 13 53564 -0.025721 0.410287 -0.6077368 -0.0000170 0.000164 -0.000176 0.000077 0.000078 0.0000950 0.0000120 0.000078 0.000076 2005 7 14 53565 -0.024353 0.411353 -0.6077506 -0.0000320 0.000023 -0.000138 0.000077 0.000079 0.0000232 0.0000119 0.000129 0.000487 2005 7 15 53566 -0.023036 0.412652 -0.6076704 -0.0001354 0.000008 -0.000043 0.000076 0.000078 0.0000063 0.0000119 0.000107 0.000223 2005 7 16 53567 -0.021702 0.413755 -0.6074810 -0.0002743 0.000086 -0.000002 0.000079 0.000079 0.0000176 0.0000128 0.000123 0.000122 2005 7 17 53568 -0.020439 0.414477 -0.6070986 -0.0004930 0.000185 0.000018 0.000084 0.000083 0.0000213 0.0000131 0.000166 0.000180 2005 7 18 53569 -0.019723 0.414953 -0.6064795 -0.0006806 0.000211 0.000007 0.000084 0.000084 0.0000132 0.0000119 0.000158 0.000177 2005 7 19 53570 -0.019195 0.415354 -0.6056911 -0.0008020 0.000115 -0.000055 0.000080 0.000079 0.0000036 0.0000111 0.000066 0.000077 2005 7 20 53571 -0.018409 0.415391 -0.6048506 -0.0008376 0.000111 -0.000068 0.000080 0.000079 0.0000110 0.0000110 0.000056 0.000060 2005 7 21 53572 -0.016870 0.415672 -0.6040478 -0.0007465 0.000129 -0.000067 0.000083 0.000081 0.0000175 0.0000111 0.000067 0.000064 2005 7 22 53573 -0.015389 0.416373 -0.6034088 -0.0004541 0.000144 -0.000065 0.000082 0.000081 0.0000047 0.0000112 0.000078 0.000068 2005 7 23 53574 -0.013983 0.417154 -0.6031296 -0.0000725 0.000127 -0.000067 0.000084 0.000083 0.0000170 0.0000118 0.000076 0.000067 2005 7 24 53575 -0.013023 0.418019 -0.6032282 0.0002526 0.000097 -0.000068 0.000091 0.000091 0.0000264 0.0000127 0.000070 0.000063 2005 7 25 53576 -0.012098 0.418777 -0.6036189 0.0004559 0.000067 -0.000065 0.000095 0.000094 0.0000184 0.0000125 0.000063 0.000060 2005 7 26 53577 -0.011297 0.419328 -0.6041334 0.0004946 0.000039 -0.000057 0.000090 0.000090 0.0000046 0.0000119 0.000056 0.000057 2005 7 27 53578 -0.010329 0.419704 -0.6045678 0.0003750 0.000028 -0.000031 0.000089 0.000088 0.0000210 0.0000117 0.000068 0.000068 2005 7 28 53579 -0.009331 0.420180 -0.6048209 0.0001537 0.000028 0.000000 0.000090 0.000089 0.0000348 0.0000117 0.000085 0.000083 2005 7 29 53580 -0.008195 0.420289 -0.6048528 -0.0000877 0.000037 0.000033 0.000089 0.000089 0.0000093 0.0000118 0.000101 0.000098 2005 7 30 53581 -0.006436 0.420565 -0.6046213 -0.0003191 0.000044 0.000050 0.000092 0.000092 0.0000104 0.0000125 0.000101 0.000100 2005 7 31 53582 -0.004563 0.420906 -0.6041795 -0.0005292 0.000056 0.000058 0.000093 0.000092 0.0000213 0.0000125 0.000095 0.000097 2005 8 1 53583 -0.002915 0.421365 -0.6036282 -0.0006126 0.000075 0.000062 0.000090 0.000089 0.0000169 0.0000115 0.000089 0.000094 2005 8 2 53584 -0.001301 0.421599 -0.6030210 -0.0006635 0.000097 0.000059 0.000088 0.000088 0.0000046 0.0000109 0.000083 0.000091 2005 8 3 53585 0.000715 0.421780 -0.6023817 -0.0006566 0.000171 0.000072 0.000087 0.000086 0.0000093 0.0000108 0.000087 0.000093 2005 8 4 53586 0.002989 0.422008 -0.6017676 -0.0005708 0.000253 0.000081 0.000086 0.000086 0.0000143 0.0000106 0.000093 0.000095 2005 8 5 53587 0.004797 0.422428 -0.6012591 -0.0004209 0.000323 0.000081 0.000085 0.000084 0.0000043 0.0000107 0.000100 0.000097 2005 8 6 53588 0.006600 0.422607 -0.6009351 -0.0002124 0.000312 0.000053 0.000088 0.000086 0.0000197 0.0000115 0.000102 0.000093 2005 8 7 53589 0.008652 0.423093 -0.6008782 0.0000445 0.000263 0.000011 0.000097 0.000095 0.0000253 0.0000119 0.000102 0.000087 2005 8 8 53590 0.010988 0.423533 -0.6010525 0.0002680 0.000205 -0.000031 0.000098 0.000096 0.0000163 0.0000109 0.000102 0.000081 2005 8 9 53591 0.013776 0.424304 -0.6013884 0.0003954 0.000145 -0.000072 0.000092 0.000091 0.0000048 0.0000103 0.000102 0.000075 2005 8 10 53592 0.016175 0.425348 -0.6018267 0.0004171 0.000043 -0.000191 0.000091 0.000092 0.0000061 0.0000104 0.000114 0.000095 2005 8 11 53593 0.018333 0.426438 -0.6022549 0.0003763 -0.000062 -0.000323 0.000094 0.000095 0.0000088 0.0000105 0.000129 0.000123 2005 8 12 53594 0.019995 0.427256 -0.6025566 0.0002313 0.000111 -0.000080 0.000094 0.000095 0.0000036 0.0000107 0.000144 0.000119 2005 8 13 53595 0.021630 0.427887 -0.6026629 -0.0000107 0.000189 -0.000021 0.000095 0.000096 0.0000188 0.0000112 0.000140 0.000111 2005 8 14 53596 0.022766 0.428505 -0.6025504 -0.0002376 0.000201 -0.000071 0.000096 0.000096 0.0000210 0.0000122 0.000127 0.000105 2005 8 15 53597 0.023866 0.429033 -0.6022257 -0.0003841 0.000216 -0.000120 0.000092 0.000092 0.0000124 0.0000123 0.000115 0.000099 2005 8 16 53598 0.024903 0.429385 -0.6017695 -0.0004241 0.000230 -0.000167 0.000090 0.000091 0.0000037 0.0000117 0.000103 0.000093 2005 8 17 53599 0.026050 0.429491 -0.6013252 -0.0003921 0.000136 -0.000068 0.000089 0.000091 0.0000115 0.0000116 0.000253 0.000238 2005 8 18 53600 0.027134 0.429401 -0.6010050 -0.0002413 0.000078 0.000028 0.000089 0.000091 0.0000184 0.0000116 0.000165 0.000157 2005 8 19 53601 0.028497 0.429137 -0.6009042 0.0000522 0.000215 -0.000003 0.000088 0.000089 0.0000050 0.0000116 0.000081 0.000067 2005 8 20 53602 0.029806 0.429044 -0.6011142 0.0003956 0.000253 -0.000045 0.000091 0.000092 0.0000192 0.0000123 0.000101 0.000081 2005 8 21 53603 0.031345 0.429076 -0.6016952 0.0006700 0.000238 -0.000081 0.000099 0.000100 0.0000280 0.0000129 0.000111 0.000090 2005 8 22 53604 0.032729 0.429079 -0.6024367 0.0006968 0.000220 -0.000112 0.000102 0.000103 0.0000188 0.0000123 0.000121 0.000099 2005 8 23 53605 0.034152 0.428794 -0.6030815 0.0005415 0.000201 -0.000138 0.000097 0.000100 0.0000045 0.0000114 0.000132 0.000109 2005 8 24 53606 0.035589 0.428702 -0.6034999 0.0002927 0.000136 -0.000083 0.000096 0.000099 0.0000089 0.0000115 0.000090 0.000077 2005 8 25 53607 0.036959 0.428423 -0.6036575 0.0000229 0.000063 -0.000005 0.000095 0.000098 0.0000143 0.0000116 0.000035 0.000036 2005 8 26 53608 0.038261 0.428011 -0.6035336 -0.0002739 0.000119 0.000007 0.000094 0.000097 0.0000045 0.0000115 0.000072 0.000059 2005 8 27 53609 0.039392 0.427098 -0.6030514 -0.0005651 0.000166 0.000036 0.000099 0.000101 0.0000213 0.0000122 0.000096 0.000077 2005 8 28 53610 0.040619 0.426169 -0.6023961 -0.0007728 0.000193 0.000072 0.000100 0.000103 0.0000312 0.0000129 0.000103 0.000086 2005 8 29 53611 0.041394 0.425697 -0.6015933 -0.0008798 0.000221 0.000095 0.000097 0.000101 0.0000210 0.0000123 0.000111 0.000094 2005 8 30 53612 0.041802 0.425372 -0.6006600 -0.0008721 0.000248 0.000102 0.000093 0.000097 0.0000048 0.0000115 0.000118 0.000102 2005 8 31 53613 0.041847 0.425077 -0.5997614 -0.0007670 0.000247 0.000078 0.000093 0.000097 0.0000014 0.0000113 0.000115 0.000099 2005 9 1 53614 0.042068 0.425193 -0.5990504 -0.0005933 0.000237 0.000035 0.000095 0.000099 0.0000014 0.0000113 0.000108 0.000092 2005 9 2 53615 0.042074 0.425599 -0.5986310 -0.0003227 0.000227 -0.000016 0.000094 0.000098 0.0000013 0.0000113 0.000102 0.000085 2005 9 3 53616 0.042303 0.425396 -0.5985273 -0.0000337 0.000195 -0.000140 0.000097 0.000099 0.0000145 0.0000119 0.000115 0.000092 2005 9 4 53617 0.042754 0.424840 -0.5986108 0.0001825 0.000158 -0.000280 0.000103 0.000104 0.0000229 0.0000130 0.000134 0.000105 2005 9 5 53618 0.043599 0.424215 -0.5988496 0.0003320 0.000128 -0.000405 0.000102 0.000104 0.0000262 0.0000127 0.000153 0.000117 2005 9 6 53619 0.044733 0.423694 -0.5992263 0.0004180 0.000102 -0.000509 0.000099 0.000101 0.0000294 0.0000117 0.000172 0.000129 2005 9 7 53620 0.045922 0.423287 -0.5996666 0.0004567 0.000335 -0.000169 0.000099 0.000100 0.0000072 0.0000116 0.000203 0.000163 2005 9 8 53621 0.047268 0.422918 -0.6001315 0.0004374 0.000450 0.000018 0.000099 0.000101 0.0000022 0.0000119 0.000163 0.000143 2005 9 9 53622 0.048497 0.422961 -0.6005183 0.0003139 0.000320 -0.000054 0.000100 0.000101 0.0000019 0.0000120 0.000114 0.000096 2005 9 10 53623 0.049410 0.423114 -0.6007146 0.0001167 0.000280 -0.000090 0.000105 0.000105 0.0000121 0.0000130 0.000090 0.000074 2005 9 11 53624 0.050077 0.423289 -0.6007239 -0.0001031 0.000295 -0.000087 0.000110 0.000109 0.0000138 0.0000133 0.000076 0.000062 2005 9 12 53625 0.050492 0.423188 -0.6005781 -0.0002058 0.000301 -0.000090 0.000106 0.000105 0.0000081 0.0000117 0.000061 0.000051 2005 9 13 53626 0.050341 0.422582 -0.6003989 -0.0001020 0.000300 -0.000100 0.000099 0.000098 0.0000019 0.0000108 0.000047 0.000039 2005 9 14 53627 0.050130 0.421598 -0.6003794 0.0001037 0.000280 -0.000050 0.000096 0.000095 0.0000007 0.0000108 0.000054 0.000052 2005 9 15 53628 0.050138 0.421216 -0.6005956 0.0003667 0.000213 -0.000054 0.000096 0.000096 0.0000007 0.0000108 0.000051 0.000044 2005 9 16 53629 0.050914 0.421297 -0.6011442 0.0007402 0.000159 -0.000076 0.000096 0.000095 0.0000007 0.0000109 0.000047 0.000043 2005 9 17 53630 0.051877 0.421558 -0.6020713 0.0010809 0.000137 -0.000076 0.000095 0.000094 0.0000006 0.0000113 0.000043 0.000035 2005 9 18 53631 0.052502 0.421860 -0.6032782 0.0012563 0.000136 -0.000061 0.000093 0.000091 0.0000006 0.0000118 0.000039 0.000033 2005 9 19 53632 0.052625 0.421831 -0.6045730 0.0012723 0.000158 -0.000041 0.000091 0.000090 0.0000006 0.0000114 0.000039 0.000033 2005 9 20 53633 0.052664 0.421084 -0.6057816 0.0011059 0.000178 -0.000038 0.000090 0.000089 0.0000007 0.0000108 0.000044 0.000035 2005 9 21 53634 0.053004 0.420292 -0.6067479 0.0008191 0.000213 -0.000057 0.000090 0.000088 0.0000007 0.0000107 0.000058 0.000049 2005 9 22 53635 0.053622 0.419471 -0.6073916 0.0005039 0.000270 -0.000059 0.000088 0.000087 0.0000006 0.0000107 0.000043 0.000037 2005 9 23 53636 0.054357 0.418920 -0.6077240 0.0002018 0.000296 -0.000032 0.000088 0.000087 0.0000006 0.0000107 0.000043 0.000037 2005 9 24 53637 0.055284 0.418344 -0.6077812 -0.0000394 0.000284 -0.000008 0.000091 0.000089 0.0000007 0.0000113 0.000048 0.000040 2005 9 25 53638 0.056133 0.417773 -0.6076526 -0.0001723 0.000260 -0.000036 0.000094 0.000092 0.0000006 0.0000121 0.000045 0.000038 2005 9 26 53639 0.056677 0.417374 -0.6074639 -0.0001616 0.000228 -0.000072 0.000095 0.000094 0.0000006 0.0000117 0.000044 0.000037 2005 9 27 53640 0.057071 0.417068 -0.6073137 -0.0001204 0.000189 -0.000032 0.000094 0.000093 0.0000006 0.0000109 0.000050 0.000042 2005 9 28 53641 0.057873 0.416826 -0.6072222 -0.0000052 0.000165 0.000002 0.000100 0.000098 0.0000163 0.0000109 0.000041 0.000035 2005 9 29 53642 0.058579 0.417012 -0.6072828 0.0001920 0.000147 0.000027 0.000102 0.000099 0.0000275 0.0000109 0.000029 0.000025 2005 9 30 53643 0.058841 0.417293 -0.6075862 0.0003786 0.000225 0.000023 0.000100 0.000098 0.0000070 0.0000110 0.000101 0.000087 2005 10 1 53644 0.058690 0.417226 -0.6081126 0.0005517 0.000241 0.000010 0.000105 0.000101 0.0000015 0.0000119 0.000128 0.000111 2005 10 2 53645 0.058662 0.416986 -0.6087928 0.0007151 0.000227 -0.000004 0.000112 0.000107 0.0000014 0.0000124 0.000128 0.000111 2005 10 3 53646 0.058892 0.416480 -0.6095324 0.0007690 0.000217 -0.000021 0.000113 0.000108 0.0000014 0.0000118 0.000128 0.000112 2005 10 4 53647 0.059821 0.415782 -0.6102366 0.0007061 0.000209 -0.000039 0.000109 0.000105 0.0000013 0.0000111 0.000129 0.000113 2005 10 5 53648 0.060857 0.415439 -0.6108370 0.0005513 0.000232 -0.000044 0.000107 0.000104 0.0000287 0.0000110 0.000135 0.000126 2005 10 6 53649 0.062153 0.415361 -0.6113220 0.0004262 0.000262 -0.000043 0.000107 0.000103 0.0000486 0.0000110 0.000143 0.000142 2005 10 7 53650 0.063329 0.415708 -0.6116957 0.0002864 0.000308 -0.000025 0.000105 0.000101 0.0000121 0.0000112 0.000097 0.000094 2005 10 8 53651 0.063987 0.415741 -0.6119368 0.0001175 0.000316 -0.000026 0.000109 0.000104 0.0000089 0.0000129 0.000086 0.000083 2005 10 9 53652 0.064457 0.415232 -0.6120248 0.0000312 0.000305 -0.000032 0.000119 0.000115 0.0000145 0.0000134 0.000093 0.000093 2005 10 10 53653 0.065059 0.414458 -0.6120247 0.0000253 0.000290 -0.000028 0.000122 0.000118 0.0000109 0.0000118 0.000101 0.000102 2005 10 11 53654 0.065190 0.413759 -0.6120541 0.0000821 0.000270 -0.000016 0.000118 0.000114 0.0000036 0.0000110 0.000109 0.000112 2005 10 12 53655 0.065325 0.412863 -0.6122316 0.0002781 0.000321 -0.000010 0.000114 0.000111 0.0000192 0.0000109 0.000053 0.000065 2005 10 13 53656 0.065722 0.412317 -0.6126448 0.0005572 0.000354 0.000052 0.000117 0.000115 0.0000313 0.0000111 0.000060 0.000065 2005 10 14 53657 0.066317 0.411150 -0.6133547 0.0008769 0.000371 0.000123 0.000117 0.000117 0.0000076 0.0000113 0.000090 0.000082 2005 10 15 53658 0.066956 0.409975 -0.6143935 0.0011063 0.000322 0.000202 0.000118 0.000118 0.0000074 0.0000120 0.000103 0.000093 2005 10 16 53659 0.067919 0.408778 -0.6155580 0.0011757 0.000249 0.000267 0.000128 0.000128 0.0000106 0.0000128 0.000109 0.000101 2005 10 17 53660 0.069310 0.408189 -0.6167040 0.0011133 0.000182 0.000308 0.000129 0.000129 0.0000074 0.0000122 0.000115 0.000109 2005 10 18 53661 0.070336 0.408067 -0.6177432 0.0009424 0.000125 0.000327 0.000122 0.000123 0.0000023 0.0000113 0.000121 0.000117 2005 10 19 53662 0.070956 0.407792 -0.6185777 0.0007127 0.000120 -0.000024 0.000120 0.000119 0.0000125 0.0000112 0.000092 0.000090 2005 10 20 53663 0.070947 0.407406 -0.6191550 0.0004777 0.000198 -0.000170 0.000122 0.000121 0.0000206 0.0000113 0.000088 0.000086 2005 10 21 53664 0.071052 0.407043 -0.6195043 0.0002865 0.000304 -0.000225 0.000123 0.000122 0.0000059 0.0000114 0.000095 0.000092 2005 10 22 53665 0.071004 0.406480 -0.6197400 0.0001597 0.000351 -0.000250 0.000126 0.000124 0.0000114 0.0000122 0.000097 0.000093 2005 10 23 53666 0.070955 0.405793 -0.6198702 0.0001524 0.000374 -0.000250 0.000126 0.000124 0.0000146 0.0000132 0.000097 0.000093 2005 10 24 53667 0.070873 0.405134 -0.6200166 0.0002123 0.000390 -0.000230 0.000121 0.000118 0.0000094 0.0000127 0.000097 0.000094 2005 10 25 53668 0.070859 0.404586 -0.6202482 0.0002553 0.000396 -0.000192 0.000116 0.000114 0.0000024 0.0000119 0.000096 0.000094 2005 10 26 53669 0.070582 0.403847 -0.6205327 0.0003768 0.000401 -0.000172 0.000114 0.000112 0.0000115 0.0000118 0.000095 0.000091 2005 10 27 53670 0.070077 0.402997 -0.6209629 0.0005349 0.000396 -0.000150 0.000114 0.000112 0.0000191 0.0000117 0.000093 0.000087 2005 10 28 53671 0.069788 0.402210 -0.6216315 0.0007187 0.000383 -0.000126 0.000114 0.000112 0.0000050 0.0000118 0.000091 0.000083 2005 10 29 53672 0.069519 0.401693 -0.6225010 0.0009088 0.000343 -0.000090 0.000117 0.000115 0.0000012 0.0000126 0.000089 0.000083 2005 10 30 53673 0.069378 0.400616 -0.6235120 0.0010527 0.000296 -0.000056 0.000112 0.000111 0.0000012 0.0000124 0.000085 0.000084 2005 10 31 53674 0.070086 0.399749 -0.6245903 0.0010938 0.000251 -0.000031 0.000102 0.000102 0.0000012 0.0000112 0.000082 0.000086 2005 11 1 53675 0.071283 0.399024 -0.6256438 0.0009933 0.000214 -0.000017 0.000100 0.000100 0.0000012 0.0000110 0.000078 0.000087 2005 11 2 53676 0.072283 0.398464 -0.6265776 0.0008305 0.000184 -0.000071 0.000101 0.000101 0.0000102 0.0000110 0.000103 0.000094 2005 11 3 53677 0.072910 0.397765 -0.6273045 0.0006041 0.000166 -0.000145 0.000102 0.000103 0.0000168 0.0000110 0.000136 0.000102 2005 11 4 53678 0.073090 0.397175 -0.6277935 0.0003794 0.000260 -0.000225 0.000100 0.000102 0.0000052 0.0000112 0.000123 0.000112 2005 11 5 53679 0.073046 0.396600 -0.6281021 0.0002020 0.000313 -0.000209 0.000103 0.000105 0.0000096 0.0000118 0.000113 0.000112 2005 11 6 53680 0.072889 0.396170 -0.6282757 0.0001449 0.000338 -0.000154 0.000105 0.000108 0.0000102 0.0000119 0.000108 0.000110 2005 11 7 53681 0.072663 0.395576 -0.6284273 0.0002397 0.000359 -0.000096 0.000101 0.000104 0.0000061 0.0000109 0.000104 0.000107 2005 11 8 53682 0.072471 0.395201 -0.6287305 0.0004353 0.000373 -0.000034 0.000096 0.000100 0.0000020 0.0000101 0.000099 0.000104 2005 11 9 53683 0.072468 0.394995 -0.6293320 0.0007833 0.000372 -0.000140 0.000095 0.000098 0.0000012 0.0000099 0.000093 0.000085 2005 11 10 53684 0.072165 0.394729 -0.6302874 0.0011357 0.000328 -0.000212 0.000097 0.000098 0.0000012 0.0000100 0.000098 0.000075 2005 11 11 53685 0.071508 0.394033 -0.6315504 0.0013616 0.000314 -0.000195 0.000097 0.000098 0.0000013 0.0000102 0.000124 0.000109 2005 11 12 53686 0.070799 0.393440 -0.6329956 0.0014789 0.000292 -0.000159 0.000100 0.000101 0.0000129 0.0000108 0.000121 0.000113 2005 11 13 53687 0.070052 0.393173 -0.6344626 0.0014214 0.000264 -0.000124 0.000104 0.000105 0.0000119 0.0000118 0.000105 0.000101 2005 11 14 53688 0.069269 0.392797 -0.6358033 0.0012572 0.000242 -0.000090 0.000101 0.000102 0.0000060 0.0000116 0.000089 0.000089 2005 11 15 53689 0.069004 0.392265 -0.6369069 0.0009585 0.000225 -0.000057 0.000096 0.000097 0.0000018 0.0000108 0.000074 0.000077 2005 11 16 53690 0.069560 0.392123 -0.6377215 0.0006865 0.000235 -0.000150 0.000094 0.000095 0.0000082 0.0000105 0.000047 0.000047 2005 11 17 53691 0.069753 0.392771 -0.6382643 0.0004600 0.000312 -0.000160 0.000095 0.000096 0.0000138 0.0000104 0.000067 0.000064 2005 11 18 53692 0.069317 0.392820 -0.6385943 0.0002500 0.000397 -0.000109 0.000094 0.000095 0.0000042 0.0000105 0.000072 0.000070 2005 11 19 53693 0.068925 0.392331 -0.6387834 0.0001957 0.000399 -0.000098 0.000098 0.000098 0.0000069 0.0000111 0.000071 0.000072 2005 11 20 53694 0.068060 0.392155 -0.6390013 0.0002951 0.000364 -0.000108 0.000114 0.000114 0.0000108 0.0000116 0.000071 0.000076 2005 11 21 53695 0.066890 0.391593 -0.6393414 0.0004165 0.000321 -0.000123 0.000123 0.000123 0.0000081 0.0000111 0.000071 0.000080 2005 11 22 53696 0.065903 0.390725 -0.6398116 0.0005476 0.000272 -0.000141 0.000117 0.000117 0.0000030 0.0000105 0.000072 0.000084 2005 11 23 53697 0.065250 0.389481 -0.6404090 0.0006808 0.000274 -0.000190 0.000114 0.000114 0.0000013 0.0000104 0.000076 0.000077 2005 11 24 53698 0.065333 0.388532 -0.6411463 0.0007866 0.000280 -0.000261 0.000116 0.000116 0.0000027 0.0000104 0.000184 0.000168 2005 11 25 53699 0.066146 0.388094 -0.6420246 0.0009315 0.000284 -0.000333 0.000118 0.000118 0.0000050 0.0000104 0.000329 0.000297 2005 11 26 53700 0.067036 0.388250 -0.6430174 0.0010409 0.000223 -0.000293 0.000121 0.000121 0.0000073 0.0000111 0.000283 0.000255 2005 11 27 53701 0.067659 0.388214 -0.6440685 0.0010316 0.000170 -0.000248 0.000126 0.000125 0.0000107 0.0000119 0.000237 0.000213 2005 11 28 53702 0.068504 0.388127 -0.6450775 0.0009387 0.000128 -0.000199 0.000125 0.000123 0.0000086 0.0000115 0.000191 0.000171 2005 11 29 53703 0.068943 0.388623 -0.6459525 0.0007693 0.000095 -0.000149 0.000121 0.000120 0.0000036 0.0000109 0.000146 0.000129 2005 11 30 53704 0.069162 0.389116 -0.6466359 0.0005623 0.000239 -0.000138 0.000117 0.000116 0.0000087 0.0000108 0.000064 0.000058 2005 12 1 53705 0.068901 0.389507 -0.6470961 0.0003264 0.000307 -0.000195 0.000117 0.000116 0.0000128 0.0000109 0.000053 0.000051 2005 12 2 53706 0.068522 0.389806 -0.6473551 0.0001954 0.000334 -0.000269 0.000118 0.000117 0.0000037 0.0000110 0.000068 0.000066 2005 12 3 53707 0.067711 0.390299 -0.6475013 0.0001201 0.000351 -0.000276 0.000124 0.000123 0.0000075 0.0000116 0.000073 0.000072 2005 12 4 53708 0.066998 0.390639 -0.6476272 0.0001053 0.000358 -0.000255 0.000132 0.000132 0.0000113 0.0000140 0.000074 0.000074 2005 12 5 53709 0.066351 0.391019 -0.6477629 0.0001902 0.000353 -0.000231 0.000130 0.000132 0.0000079 0.0000146 0.000075 0.000077 2005 12 6 53710 0.066103 0.391118 -0.6480157 0.0004018 0.000339 -0.000204 0.000122 0.000126 0.0000021 0.0000138 0.000076 0.000079 2005 12 7 53711 0.066112 0.391130 -0.6485314 0.0006873 0.000218 -0.000140 0.000120 0.000123 0.0000105 0.0000138 0.000044 0.000045 2005 12 8 53712 0.066162 0.390980 -0.6493129 0.0008586 0.000140 -0.000098 0.000120 0.000121 0.0000174 0.0000139 0.000041 0.000040 2005 12 9 53713 0.065957 0.390598 -0.6502607 0.0009605 0.000181 -0.000154 0.000120 0.000120 0.0000045 0.0000139 0.000074 0.000066 2005 12 10 53714 0.065308 0.389980 -0.6512478 0.0009365 0.000200 -0.000166 0.000126 0.000128 0.0000056 0.0000149 0.000084 0.000075 2005 12 11 53715 0.064264 0.389266 -0.6521310 0.0008287 0.000207 -0.000154 0.000129 0.000131 0.0000092 0.0000157 0.000084 0.000075 2005 12 12 53716 0.063441 0.388398 -0.6528808 0.0006640 0.000224 -0.000148 0.000123 0.000125 0.0000072 0.0000148 0.000082 0.000076 2005 12 13 53717 0.063063 0.388017 -0.6534581 0.0004528 0.000251 -0.000145 0.000117 0.000120 0.0000030 0.0000140 0.000082 0.000076 2005 12 14 53718 0.063336 0.387701 -0.6537988 0.0002386 0.000224 -0.000178 0.000116 0.000118 0.0000105 0.0000138 0.000102 0.000081 2005 12 15 53719 0.064093 0.387877 -0.6539467 0.0000899 0.000243 -0.000225 0.000115 0.000116 0.0000164 0.0000138 0.000050 0.000045 2005 12 16 53720 0.064696 0.388285 -0.6539997 0.0000240 0.000324 -0.000167 0.000114 0.000114 0.0000048 0.0000139 0.000067 0.000057 2005 12 17 53721 0.064980 0.388962 -0.6540436 0.0000578 0.000376 -0.000179 0.000120 0.000120 0.0000086 0.0000147 0.000084 0.000071 2005 12 18 53722 0.065073 0.389386 -0.6541256 0.0001440 0.000404 -0.000230 0.000135 0.000134 0.0000101 0.0000136 0.000088 0.000079 2005 12 19 53723 0.064785 0.389446 -0.6543042 0.0002568 0.000420 -0.000279 0.000144 0.000142 0.0000067 0.0000112 0.000093 0.000087 2005 12 20 53724 0.063821 0.389425 -0.6546562 0.0004442 0.000423 -0.000323 0.000141 0.000140 0.0000029 0.0000106 0.000097 0.000095 2005 12 21 53725 0.062720 0.388692 -0.6552276 0.0006557 0.000336 -0.000236 0.000139 0.000141 0.0000140 0.0000107 0.000081 0.000086 2005 12 22 53726 0.062383 0.387971 -0.6559753 0.0008231 0.000284 -0.000217 0.000141 0.000143 0.0000224 0.0000106 0.000107 0.000104 2005 12 23 53727 0.061756 0.387773 -0.6568284 0.0008985 0.000248 -0.000229 0.000143 0.000144 0.0000060 0.0000107 0.000147 0.000132 2005 12 24 53728 0.061155 0.387403 -0.6577519 0.0009212 0.000218 -0.000242 0.000148 0.000148 0.0000016 0.0000115 0.000154 0.000139 2005 12 25 53729 0.060571 0.387327 -0.6586876 0.0008758 0.000195 -0.000254 0.000150 0.000147 0.0000017 0.0000130 0.000149 0.000137 2005 12 26 53730 0.059437 0.387400 -0.6595567 0.0008211 0.000180 -0.000269 0.000143 0.000140 0.0000017 0.0000133 0.000144 0.000136 2005 12 27 53731 0.058120 0.387252 -0.6602773 0.0006399 0.000174 -0.000283 0.000139 0.000136 0.0000018 0.0000126 0.000138 0.000134 2005 12 28 53732 0.057008 0.386666 -0.6607830 0.0003740 0.000177 -0.000297 0.000134 0.000134 0.0000019 0.0000125 0.000133 0.000133 2005 12 29 53733 0.055866 0.385859 -0.6610506 0.0001553 0.000188 -0.000296 0.000134 0.000134 0.0000018 0.0000125 0.000120 0.000118 2005 12 30 53734 0.054812 0.385047 -0.6611296 0.0000123 0.000205 -0.000288 0.000135 0.000134 0.0000017 0.0000126 0.000105 0.000100 2005 12 31 53735 0.053717 0.384245 -0.6611333 -0.0000016 0.000228 -0.000287 0.000140 0.000141 0.0000017 0.0000135 0.000098 0.000091 2006 1 1 53736 0.052622 0.383685 0.3388053 0.0001436 0.000252 -0.000287 0.000078 0.000077 0.0000013 0.0000154 0.000063 0.000057 2006 1 2 53737 0.051697 0.383326 0.3385714 0.0003772 0.000274 -0.000284 0.000079 0.000078 0.0000013 0.0000151 0.000061 0.000054 2006 1 3 53738 0.050889 0.383056 0.3381013 0.0006253 0.000291 -0.000277 0.000076 0.000075 0.0000013 0.0000138 0.000059 0.000050 2006 1 4 53739 0.050099 0.382780 0.3374012 0.0008031 0.000303 -0.000267 0.000073 0.000073 0.0000014 0.0000136 0.000056 0.000047 2006 1 5 53740 0.049501 0.382403 0.3365369 0.0009315 0.000234 -0.000271 0.000071 0.000072 0.0000020 0.0000136 0.000076 0.000057 2006 1 6 53741 0.049406 0.382135 0.3355853 0.0009404 0.000218 -0.000251 0.000074 0.000074 0.0000032 0.0000138 0.000080 0.000059 2006 1 7 53742 0.049533 0.382004 0.3346744 0.0008423 0.000227 -0.000223 0.000077 0.000075 0.0000047 0.0000146 0.000076 0.000057 2006 1 8 53743 0.049461 0.381963 0.3339456 0.0005844 0.000232 -0.000199 0.000076 0.000074 0.0000043 0.0000158 0.000072 0.000055 2006 1 9 53744 0.049453 0.381659 0.3334776 0.0003337 0.000235 -0.000181 0.000070 0.000069 0.0000029 0.0000155 0.000068 0.000053 2006 1 10 53745 0.049529 0.381488 0.3332791 0.0000867 0.000236 -0.000170 0.000066 0.000065 0.0000016 0.0000146 0.000064 0.000051 2006 1 11 53746 0.049196 0.381420 0.3333079 -0.0001256 0.000204 -0.000189 0.000065 0.000064 0.0000065 0.0000143 0.000064 0.000052 2006 1 12 53747 0.048702 0.381000 0.3335044 -0.0002383 0.000165 -0.000219 0.000066 0.000064 0.0000103 0.0000144 0.000064 0.000053 2006 1 13 53748 0.048506 0.380732 0.3337777 -0.0002628 0.000129 -0.000252 0.000065 0.000064 0.0000034 0.0000146 0.000065 0.000055 2006 1 14 53749 0.048645 0.380272 0.3339995 -0.0001406 0.000105 -0.000288 0.000067 0.000066 0.0000063 0.0000159 0.000088 0.000064 2006 1 15 53750 0.049186 0.380122 0.3340951 -0.0000166 0.000090 -0.000323 0.000070 0.000068 0.0000074 0.0000156 0.000120 0.000077 2006 1 16 53751 0.049940 0.380001 0.3340757 0.0000643 0.000081 -0.000348 0.000068 0.000066 0.0000055 0.0000136 0.000152 0.000089 2006 1 17 53752 0.050391 0.380281 0.3339359 0.0002024 0.000076 -0.000365 0.000067 0.000064 0.0000034 0.0000129 0.000184 0.000102 2006 1 18 53753 0.050545 0.380722 0.3336386 0.0004290 0.000209 -0.000313 0.000064 0.000062 0.0000014 0.0000128 0.000072 0.000049 2006 1 19 53754 0.050709 0.380983 0.3331652 0.0005728 0.000291 -0.000266 0.000063 0.000062 0.0000011 0.0000125 0.000056 0.000064 2006 1 20 53755 0.050413 0.381349 0.3325532 0.0005883 0.000195 -0.000183 0.000065 0.000063 0.0000012 0.0000126 0.000076 0.000066 2006 1 21 53756 0.050196 0.381449 0.3318738 0.0006500 0.000143 -0.000164 0.000065 0.000063 0.0000014 0.0000135 0.000079 0.000062 2006 1 22 53757 0.050135 0.381682 0.3311910 0.0006579 0.000126 -0.000179 0.000071 0.000068 0.0000016 0.0000144 0.000076 0.000060 2006 1 23 53758 0.050181 0.381064 0.3305532 0.0006163 0.000109 -0.000205 0.000073 0.000072 0.0000019 0.0000140 0.000074 0.000058 2006 1 24 53759 0.050251 0.380585 0.3299926 0.0005058 0.000094 -0.000239 0.000071 0.000070 0.0000021 0.0000133 0.000070 0.000056 2006 1 25 53760 0.050138 0.380668 0.3295201 0.0004054 0.000035 -0.000283 0.000070 0.000069 0.0000113 0.0000130 0.000079 0.000075 2006 1 26 53761 0.050081 0.380913 0.3291130 0.0003900 0.000050 -0.000338 0.000071 0.000069 0.0000177 0.0000130 0.000052 0.000049 2006 1 27 53762 0.050282 0.381029 0.3287214 0.0004101 0.000169 -0.000367 0.000069 0.000068 0.0000047 0.0000131 0.000056 0.000043 2006 1 28 53763 0.050671 0.381352 0.3282799 0.0005002 0.000201 -0.000372 0.000070 0.000069 0.0000051 0.0000138 0.000057 0.000043 2006 1 29 53764 0.051114 0.381721 0.3277077 0.0006900 0.000190 -0.000368 0.000074 0.000071 0.0000093 0.0000145 0.000052 0.000041 2006 1 30 53765 0.051452 0.382021 0.3268814 0.0010016 0.000175 -0.000356 0.000072 0.000070 0.0000071 0.0000140 0.000047 0.000038 2006 1 31 53766 0.051536 0.382576 0.3257300 0.0013221 0.000157 -0.000339 0.000067 0.000066 0.0000020 0.0000133 0.000042 0.000036 2006 2 1 53767 0.051300 0.383349 0.3242966 0.0015259 0.000071 -0.000267 0.000065 0.000064 0.0000044 0.0000131 0.000049 0.000047 2006 2 2 53768 0.050685 0.384036 0.3227220 0.0015760 0.000013 -0.000258 0.000063 0.000063 0.0000069 0.0000131 0.000022 0.000022 2006 2 3 53769 0.050150 0.384489 0.3211761 0.0014871 0.000032 -0.000304 0.000062 0.000062 0.0000025 0.0000131 0.000051 0.000039 2006 2 4 53770 0.050106 0.384822 0.3197823 0.0012803 0.000073 -0.000317 0.000068 0.000068 0.0000047 0.0000138 0.000058 0.000044 2006 2 5 53771 0.050253 0.384878 0.3186417 0.0009740 0.000118 -0.000314 0.000068 0.000067 0.0000094 0.0000142 0.000049 0.000039 2006 2 6 53772 0.050916 0.384684 0.3178029 0.0006942 0.000168 -0.000311 0.000063 0.000062 0.0000073 0.0000132 0.000040 0.000034 2006 2 7 53773 0.051152 0.384790 0.3172219 0.0004507 0.000219 -0.000307 0.000058 0.000058 0.0000019 0.0000129 0.000031 0.000029 2006 2 8 53774 0.051417 0.384591 0.3167977 0.0003548 0.000172 -0.000286 0.000056 0.000057 0.0000009 0.0000127 0.000027 0.000026 2006 2 9 53775 0.052648 0.384563 0.3164374 0.0003725 0.000170 -0.000236 0.000059 0.000059 0.0000010 0.0000125 0.000052 0.000049 2006 2 10 53776 0.053795 0.384748 0.3160645 0.0004150 0.000274 -0.000243 0.000060 0.000060 0.0000011 0.0000127 0.000059 0.000051 2006 2 11 53777 0.055017 0.384848 0.3156139 0.0005636 0.000285 -0.000248 0.000062 0.000061 0.0000076 0.0000134 0.000054 0.000046 2006 2 12 53778 0.056346 0.384750 0.3150006 0.0007010 0.000248 -0.000251 0.000063 0.000062 0.0000114 0.0000135 0.000049 0.000042 2006 2 13 53779 0.057302 0.384409 0.3142256 0.0008254 0.000207 -0.000261 0.000060 0.000060 0.0000079 0.0000123 0.000043 0.000038 2006 2 14 53780 0.058101 0.384120 0.3133388 0.0009065 0.000166 -0.000275 0.000057 0.000057 0.0000021 0.0000116 0.000038 0.000034 2006 2 15 53781 0.058961 0.383929 0.3123758 0.0009811 0.000105 -0.000324 0.000057 0.000057 0.0000124 0.0000118 0.000051 0.000047 2006 2 16 53782 0.060350 0.383891 0.3113446 0.0010617 0.000147 -0.000359 0.000058 0.000058 0.0000207 0.0000118 0.000065 0.000057 2006 2 17 53783 0.061976 0.384296 0.3102551 0.0011003 0.000221 -0.000384 0.000057 0.000058 0.0000056 0.0000118 0.000078 0.000065 2006 2 18 53784 0.064191 0.384840 0.3091543 0.0011023 0.000239 -0.000416 0.000059 0.000060 0.0000051 0.0000128 0.000075 0.000063 2006 2 19 53785 0.065779 0.385239 0.3080913 0.0010044 0.000234 -0.000443 0.000065 0.000065 0.0000082 0.0000137 0.000067 0.000058 2006 2 20 53786 0.066769 0.385083 0.3071404 0.0008445 0.000226 -0.000459 0.000067 0.000066 0.0000061 0.0000129 0.000058 0.000052 2006 2 21 53787 0.067402 0.384872 0.3063748 0.0006312 0.000214 -0.000466 0.000063 0.000063 0.0000019 0.0000121 0.000050 0.000046 2006 2 22 53788 0.067385 0.384547 0.3058200 0.0004554 0.000203 -0.000354 0.000064 0.000065 0.0000102 0.0000121 0.000057 0.000056 2006 2 23 53789 0.067629 0.384092 0.3054214 0.0003624 0.000190 -0.000210 0.000066 0.000065 0.0000167 0.0000121 0.000068 0.000069 2006 2 24 53790 0.068008 0.383822 0.3050461 0.0004344 0.000220 -0.000285 0.000065 0.000064 0.0000046 0.0000122 0.000058 0.000054 2006 2 25 53791 0.068856 0.383343 0.3045182 0.0006563 0.000187 -0.000303 0.000067 0.000065 0.0000063 0.0000127 0.000052 0.000045 2006 2 26 53792 0.070143 0.383046 0.3037164 0.0010180 0.000126 -0.000278 0.000066 0.000063 0.0000170 0.0000139 0.000050 0.000042 2006 2 27 53793 0.071359 0.383031 0.3025213 0.0014250 0.000069 -0.000259 0.000061 0.000058 0.0000141 0.0000140 0.000048 0.000038 2006 2 28 53794 0.071987 0.383274 0.3009021 0.0017759 0.000018 -0.000245 0.000058 0.000056 0.0000034 0.0000134 0.000046 0.000035 2006 3 1 53795 0.072352 0.383164 0.2989804 0.0019722 0.000058 -0.000256 0.000057 0.000056 0.0000065 0.0000133 0.000053 0.000042 2006 3 2 53796 0.073599 0.383385 0.2970019 0.0019288 0.000131 -0.000277 0.000058 0.000056 0.0000107 0.0000130 0.000063 0.000052 2006 3 3 53797 0.074878 0.383503 0.2951869 0.0016972 0.000208 -0.000300 0.000059 0.000057 0.0000035 0.0000132 0.000073 0.000062 2006 3 4 53798 0.076839 0.383254 0.2936031 0.0014114 0.000199 -0.000303 0.000061 0.000058 0.0000052 0.0000140 0.000067 0.000058 2006 3 5 53799 0.078668 0.383598 0.2923287 0.0010613 0.000157 -0.000298 0.000065 0.000061 0.0000088 0.0000145 0.000056 0.000049 2006 3 6 53800 0.079905 0.383722 0.2914006 0.0007676 0.000117 -0.000293 0.000065 0.000063 0.0000065 0.0000138 0.000044 0.000041 2006 3 7 53801 0.080675 0.383571 0.2907607 0.0005568 0.000076 -0.000288 0.000061 0.000059 0.0000017 0.0000129 0.000033 0.000032 2006 3 8 53802 0.081177 0.383055 0.2903052 0.0004375 0.000139 -0.000295 0.000061 0.000059 0.0000065 0.0000127 0.000042 0.000039 2006 3 9 53803 0.081083 0.382680 0.2899324 0.0003389 0.000224 -0.000305 0.000064 0.000061 0.0000108 0.0000125 0.000056 0.000050 2006 3 10 53804 0.080480 0.382528 0.2895677 0.0003606 0.000300 -0.000318 0.000064 0.000062 0.0000035 0.0000127 0.000071 0.000061 2006 3 11 53805 0.080381 0.382603 0.2891726 0.0004661 0.000281 -0.000325 0.000066 0.000064 0.0000044 0.0000138 0.000068 0.000059 2006 3 12 53806 0.080638 0.382580 0.2886730 0.0006049 0.000218 -0.000332 0.000070 0.000067 0.0000059 0.0000148 0.000060 0.000053 2006 3 13 53807 0.081243 0.381767 0.2879919 0.0007827 0.000147 -0.000338 0.000068 0.000066 0.0000043 0.0000142 0.000051 0.000046 2006 3 14 53808 0.082286 0.380999 0.2871208 0.0009276 0.000071 -0.000344 0.000064 0.000062 0.0000018 0.0000134 0.000043 0.000039 2006 3 15 53809 0.083525 0.380434 0.2861154 0.0010413 0.000041 -0.000376 0.000064 0.000063 0.0000106 0.0000135 0.000058 0.000053 2006 3 16 53810 0.085443 0.379751 0.2850597 0.0010519 0.000025 -0.000411 0.000067 0.000065 0.0000175 0.0000135 0.000080 0.000073 2006 3 17 53811 0.087944 0.379390 0.2840359 0.0010028 0.000015 -0.000441 0.000067 0.000065 0.0000059 0.0000135 0.000102 0.000092 2006 3 18 53812 0.089769 0.379215 0.2830951 0.0009228 0.000013 -0.000404 0.000069 0.000066 0.0000078 0.0000143 0.000099 0.000088 2006 3 19 53813 0.091273 0.378852 0.2822202 0.0008144 0.000018 -0.000341 0.000066 0.000063 0.0000100 0.0000138 0.000086 0.000074 2006 3 20 53814 0.092703 0.378461 0.2814736 0.0006529 0.000031 -0.000278 0.000059 0.000056 0.0000069 0.0000119 0.000073 0.000061 2006 3 21 53815 0.093839 0.378145 0.2808846 0.0005076 0.000051 -0.000216 0.000055 0.000054 0.0000023 0.0000112 0.000060 0.000048 2006 3 22 53816 0.095104 0.378009 0.2803873 0.0004682 -0.000211 -0.000381 0.000055 0.000053 0.0000077 0.0000110 0.000053 0.000066 2006 3 23 53817 0.096129 0.377847 0.2799038 0.0005042 -0.000086 -0.000373 0.000056 0.000054 0.0000122 0.0000110 0.000056 0.000066 2006 3 24 53818 0.097254 0.377327 0.2793266 0.0006643 0.000169 -0.000296 0.000055 0.000053 0.0000037 0.0000112 0.000061 0.000059 2006 3 25 53819 0.097957 0.377152 0.2785150 0.0009774 0.000201 -0.000301 0.000057 0.000054 0.0000055 0.0000117 0.000057 0.000053 2006 3 26 53820 0.098552 0.376947 0.2773368 0.0013838 0.000145 -0.000332 0.000057 0.000054 0.0000065 0.0000122 0.000050 0.000047 2006 3 27 53821 0.099233 0.376735 0.2758044 0.0016900 0.000079 -0.000360 0.000055 0.000052 0.0000042 0.0000116 0.000043 0.000041 2006 3 28 53822 0.099964 0.376213 0.2739669 0.0019627 0.000008 -0.000386 0.000051 0.000049 0.0000013 0.0000108 0.000036 0.000035 2006 3 29 53823 0.100822 0.375833 0.2719036 0.0021102 -0.000110 -0.000292 0.000050 0.000048 0.0000207 0.0000105 0.000880 0.000184 2006 3 30 53824 0.101412 0.375321 0.2698537 0.0019671 -0.000140 -0.000214 0.000051 0.000048 0.0000054 0.0000105 0.000302 0.000084 2006 3 31 53825 0.101958 0.374866 0.2680116 0.0016735 -0.000035 -0.000265 0.000050 0.000048 0.0000020 0.0000106 0.000060 0.000067 2006 4 1 53826 0.102675 0.374360 0.2665139 0.0012983 0.000000 -0.000271 0.000052 0.000050 0.0000057 0.0000112 0.000064 0.000071 2006 4 2 53827 0.103267 0.373786 0.2653628 0.0009307 0.000004 -0.000253 0.000057 0.000054 0.0000128 0.0000116 0.000057 0.000060 2006 4 3 53828 0.103592 0.373292 0.2645438 0.0006716 0.000014 -0.000241 0.000059 0.000058 0.0000103 0.0000111 0.000050 0.000049 2006 4 4 53829 0.104006 0.372993 0.2639552 0.0005566 0.000029 -0.000235 0.000056 0.000055 0.0000027 0.0000107 0.000043 0.000039 2006 4 5 53830 0.104443 0.372679 0.2634220 0.0005466 0.000064 -0.000285 0.000056 0.000055 0.0000052 0.0000107 0.000048 0.000045 2006 4 6 53831 0.104431 0.372190 0.2628447 0.0006028 0.000101 -0.000349 0.000057 0.000057 0.0000080 0.0000107 0.000055 0.000055 2006 4 7 53832 0.104268 0.372022 0.2621860 0.0006993 0.000132 -0.000408 0.000056 0.000056 0.0000029 0.0000110 0.000063 0.000065 2006 4 8 53833 0.104031 0.371765 0.2614275 0.0008731 0.000137 -0.000411 0.000057 0.000058 0.0000043 0.0000117 0.000065 0.000066 2006 4 9 53834 0.104244 0.371135 0.2604346 0.0011002 0.000125 -0.000388 0.000055 0.000056 0.0000048 0.0000116 0.000065 0.000064 2006 4 10 53835 0.104468 0.370664 0.2592682 0.0012334 0.000104 -0.000355 0.000049 0.000049 0.0000030 0.0000103 0.000066 0.000062 2006 4 11 53836 0.103946 0.369820 0.2580344 0.0012497 0.000074 -0.000316 0.000047 0.000048 0.0000011 0.0000097 0.000066 0.000059 2006 4 12 53837 0.103560 0.368858 0.2567630 0.0012503 0.000044 -0.000251 0.000047 0.000047 0.0000010 0.0000097 0.000144 0.000187 2006 4 13 53838 0.103346 0.368344 0.2555255 0.0012388 0.000059 -0.000267 0.000046 0.000047 0.0000012 0.0000096 0.000107 0.000124 2006 4 14 53839 0.103194 0.367755 0.2543967 0.0011070 0.000031 -0.000259 0.000047 0.000048 0.0000012 0.0000098 0.000083 0.000083 2006 4 15 53840 0.102485 0.367269 0.2534155 0.0008954 -0.000017 -0.000236 0.000049 0.000050 0.0000012 0.0000104 0.000081 0.000079 2006 4 16 53841 0.101840 0.366588 0.2525885 0.0007074 -0.000061 -0.000222 0.000049 0.000049 0.0000011 0.0000112 0.000078 0.000075 2006 4 17 53842 0.101904 0.366266 0.2519039 0.0005789 -0.000097 -0.000216 0.000047 0.000047 0.0000010 0.0000108 0.000076 0.000070 2006 4 18 53843 0.102052 0.366087 0.2513337 0.0005090 -0.000124 -0.000218 0.000046 0.000046 0.0000009 0.0000101 0.000073 0.000066 2006 4 19 53844 0.102150 0.365566 0.2508270 0.0004963 -0.000142 -0.000225 0.000045 0.000046 0.0000008 0.0000101 0.000071 0.000061 2006 4 20 53845 0.102860 0.364870 0.2503026 0.0005620 -0.000067 -0.000276 0.000045 0.000046 0.0000010 0.0000102 0.000070 0.000071 2006 4 21 53846 0.103707 0.364410 0.2496572 0.0007299 0.000035 -0.000336 0.000046 0.000047 0.0000013 0.0000102 0.000071 0.000085 2006 4 22 53847 0.104288 0.364090 0.2487812 0.0010355 0.000050 -0.000359 0.000048 0.000048 0.0000059 0.0000109 0.000065 0.000081 2006 4 23 53848 0.105026 0.363735 0.2475627 0.0013830 0.000030 -0.000360 0.000048 0.000049 0.0000160 0.0000116 0.000058 0.000072 2006 4 24 53849 0.105594 0.363167 0.2460152 0.0016766 0.000008 -0.000350 0.000046 0.000047 0.0000137 0.0000110 0.000051 0.000062 2006 4 25 53850 0.105968 0.362594 0.2442573 0.0018189 -0.000016 -0.000331 0.000044 0.000045 0.0000042 0.0000105 0.000044 0.000052 2006 4 26 53851 0.106189 0.362214 0.2424380 0.0018348 -0.000084 -0.000257 0.000043 0.000044 0.0000102 0.0000104 0.000021 0.000024 2006 4 27 53852 0.106475 0.362016 0.2406671 0.0017278 -0.000053 -0.000151 0.000043 0.000045 0.0000157 0.0000104 0.000028 0.000033 2006 4 28 53853 0.107224 0.361783 0.2390454 0.0014816 0.000043 -0.000067 0.000045 0.000046 0.0000045 0.0000105 0.000057 0.000069 2006 4 29 53854 0.108503 0.361525 0.2377003 0.0011399 0.000072 -0.000074 0.000046 0.000047 0.0000049 0.0000109 0.000062 0.000073 2006 4 30 53855 0.109362 0.361060 0.2367177 0.0008445 0.000071 -0.000120 0.000047 0.000049 0.0000080 0.0000112 0.000056 0.000064 2006 5 1 53856 0.109747 0.360462 0.2359575 0.0006891 0.000068 -0.000174 0.000047 0.000048 0.0000071 0.0000106 0.000050 0.000055 2006 5 2 53857 0.109810 0.359924 0.2352410 0.0007284 0.000062 -0.000236 0.000046 0.000048 0.0000045 0.0000104 0.000043 0.000046 2006 5 3 53858 0.109911 0.359300 0.2344782 0.0008193 0.000054 -0.000300 0.000046 0.000047 0.0000018 0.0000104 0.000037 0.000037 2006 5 4 53859 0.109585 0.358326 0.2336196 0.0009251 0.000049 -0.000243 0.000046 0.000047 0.0000016 0.0000102 0.000052 0.000057 2006 5 5 53860 0.109191 0.357200 0.2326270 0.0010730 0.000046 -0.000156 0.000047 0.000048 0.0000019 0.0000104 0.000071 0.000085 2006 5 6 53861 0.108617 0.355950 0.2314821 0.0012090 0.000047 -0.000165 0.000049 0.000049 0.0000046 0.0000108 0.000070 0.000084 2006 5 7 53862 0.108592 0.354651 0.2302290 0.0013450 0.000050 -0.000210 0.000048 0.000048 0.0000225 0.0000113 0.000060 0.000071 2006 5 8 53863 0.108246 0.353834 0.2288625 0.0014268 0.000053 -0.000257 0.000045 0.000046 0.0000205 0.0000114 0.000051 0.000059 2006 5 9 53864 0.107918 0.353138 0.2273940 0.0015040 0.000057 -0.000303 0.000043 0.000044 0.0000044 0.0000111 0.000041 0.000046 2006 5 10 53865 0.107674 0.352495 0.2258875 0.0015109 0.000057 -0.000324 0.000042 0.000043 0.0000100 0.0000110 0.000047 0.000054 2006 5 11 53866 0.107412 0.352068 0.2243899 0.0014986 0.000056 -0.000336 0.000043 0.000043 0.0000165 0.0000110 0.000058 0.000068 2006 5 12 53867 0.107460 0.351837 0.2229480 0.0014102 0.000055 -0.000342 0.000044 0.000044 0.0000047 0.0000110 0.000068 0.000082 2006 5 13 53868 0.107747 0.351053 0.2216247 0.0012342 0.000052 -0.000336 0.000045 0.000045 0.0000072 0.0000115 0.000074 0.000082 2006 5 14 53869 0.108489 0.350225 0.2204976 0.0010355 0.000048 -0.000322 0.000043 0.000043 0.0000100 0.0000116 0.000078 0.000078 2006 5 15 53870 0.109631 0.349500 0.2195420 0.0008706 0.000043 -0.000306 0.000040 0.000040 0.0000075 0.0000108 0.000083 0.000074 2006 5 16 53871 0.110700 0.348957 0.2187124 0.0007623 0.000037 -0.000286 0.000039 0.000040 0.0000037 0.0000106 0.000087 0.000070 2006 5 17 53872 0.111008 0.348240 0.2179695 0.0007431 0.000052 -0.000288 0.000039 0.000039 0.0000065 0.0000106 0.000078 0.000066 2006 5 18 53873 0.111125 0.347418 0.2172021 0.0008228 0.000069 -0.000295 0.000039 0.000039 0.0000089 0.0000104 0.000065 0.000063 2006 5 19 53874 0.111323 0.346563 0.2162847 0.0009928 0.000080 -0.000303 0.000038 0.000039 0.0000031 0.0000105 0.000052 0.000060 2006 5 20 53875 0.111510 0.345799 0.2151432 0.0012271 0.000055 -0.000307 0.000039 0.000040 0.0000128 0.0000108 0.000046 0.000055 2006 5 21 53876 0.111859 0.345404 0.2137951 0.0014204 0.000012 -0.000310 0.000039 0.000040 0.0000134 0.0000114 0.000043 0.000048 2006 5 22 53877 0.112243 0.344956 0.2122860 0.0015591 -0.000033 -0.000316 0.000037 0.000038 0.0000075 0.0000113 0.000039 0.000042 2006 5 23 53878 0.112879 0.344427 0.2107028 0.0015633 -0.000081 -0.000326 0.000036 0.000036 0.0000021 0.0000109 0.000036 0.000036 2006 5 24 53879 0.113553 0.343639 0.2091740 0.0014557 -0.000125 -0.000231 0.000035 0.000036 0.0000045 0.0000108 0.000036 0.000033 2006 5 25 53880 0.114386 0.342588 0.2078000 0.0012496 -0.000090 -0.000220 0.000036 0.000037 0.0000071 0.0000108 0.000048 0.000046 2006 5 26 53881 0.115176 0.341484 0.2066796 0.0009378 -0.000029 -0.000244 0.000036 0.000037 0.0000025 0.0000109 0.000062 0.000062 2006 5 27 53882 0.115902 0.340422 0.2059249 0.0005762 -0.000074 -0.000311 0.000036 0.000037 0.0000097 0.0000115 0.000070 0.000074 2006 5 28 53883 0.117127 0.339225 0.2054956 0.0002881 -0.000154 -0.000391 0.000038 0.000039 0.0000165 0.0000110 0.000074 0.000083 2006 5 29 53884 0.118372 0.338287 0.2052694 0.0001511 -0.000225 -0.000463 0.000038 0.000039 0.0000140 0.0000097 0.000078 0.000093 2006 5 30 53885 0.119346 0.337278 0.2051144 0.0001572 -0.000284 -0.000522 0.000038 0.000038 0.0000080 0.0000093 0.000082 0.000102 2006 5 31 53886 0.120003 0.336556 0.2049118 0.0002469 -0.000081 -0.000261 0.000037 0.000038 0.0000020 0.0000092 0.000045 0.000046 2006 6 1 53887 0.120533 0.335721 0.2045854 0.0003796 -0.000038 -0.000252 0.000037 0.000038 0.0000010 0.0000092 0.000044 0.000044 2006 6 2 53888 0.121148 0.334961 0.2041148 0.0005529 -0.000035 -0.000305 0.000037 0.000039 0.0000014 0.0000094 0.000053 0.000056 2006 6 3 53889 0.121558 0.334044 0.2035169 0.0007050 -0.000012 -0.000275 0.000038 0.000040 0.0000013 0.0000100 0.000056 0.000059 2006 6 4 53890 0.122252 0.332780 0.2028150 0.0007793 0.000016 -0.000215 0.000038 0.000039 0.0000012 0.0000107 0.000057 0.000059 2006 6 5 53891 0.122572 0.331504 0.2020396 0.0007776 0.000040 -0.000164 0.000036 0.000037 0.0000011 0.0000104 0.000058 0.000060 2006 6 6 53892 0.122540 0.330143 0.2012404 0.0007382 0.000058 -0.000123 0.000035 0.000036 0.0000010 0.0000099 0.000058 0.000060 2006 6 7 53893 0.122701 0.328749 0.2004886 0.0006611 0.000071 -0.000097 0.000035 0.000036 0.0000008 0.0000100 0.000060 0.000060 2006 6 8 53894 0.123160 0.327376 0.1998782 0.0004826 -0.000033 -0.000123 0.000035 0.000036 0.0000098 0.0000102 0.000150 0.000177 2006 6 9 53895 0.123367 0.326099 0.1995504 0.0002138 -0.000064 -0.000236 0.000035 0.000036 0.0000044 0.0000102 0.000081 0.000098 2006 6 10 53896 0.123405 0.324843 0.1994827 -0.0000416 -0.000003 -0.000269 0.000036 0.000037 0.0000124 0.0000105 0.000047 0.000057 2006 6 11 53897 0.123590 0.323358 0.1996437 -0.0002519 0.000074 -0.000267 0.000037 0.000037 0.0000122 0.0000109 0.000049 0.000057 2006 6 12 53898 0.123952 0.321591 0.1999834 -0.0003932 0.000144 -0.000265 0.000036 0.000037 0.0000065 0.0000104 0.000051 0.000057 2006 6 13 53899 0.124405 0.319871 0.2003693 -0.0003714 0.000205 -0.000258 0.000035 0.000036 0.0000017 0.0000099 0.000053 0.000057 2006 6 14 53900 0.125141 0.318355 0.2006541 -0.0002089 -0.000034 -0.000454 0.000035 0.000036 0.0000014 0.0000100 0.000055 0.000062 2006 6 15 53901 0.125710 0.317375 0.2007945 0.0000005 -0.000133 -0.000497 0.000035 0.000036 0.0000081 0.0000100 0.000057 0.000064 2006 6 16 53902 0.125989 0.316472 0.2006739 0.0002784 -0.000147 -0.000450 0.000035 0.000036 0.0000170 0.0000101 0.000058 0.000064 2006 6 17 53903 0.126143 0.315672 0.2001596 0.0005777 -0.000153 -0.000388 0.000036 0.000036 0.0000205 0.0000106 0.000060 0.000064 2006 6 18 53904 0.126316 0.314609 0.1993772 0.0008037 -0.000149 -0.000312 0.000035 0.000036 0.0000196 0.0000110 0.000061 0.000064 2006 6 19 53905 0.126381 0.313380 0.1985308 0.0008969 -0.000134 -0.000232 0.000039 0.000039 0.0000146 0.0000109 0.000062 0.000064 2006 6 20 53906 0.126200 0.312331 0.1976979 0.0007934 -0.000107 -0.000151 0.000038 0.000038 0.0000032 0.0000104 0.000064 0.000065 2006 6 21 53907 0.125986 0.311193 0.1969856 0.0006126 -0.000074 -0.000122 0.000033 0.000033 0.0000106 0.0000102 0.000085 0.000088 2006 6 22 53908 0.125524 0.310405 0.1964795 0.0003853 -0.000035 -0.000114 0.000033 0.000033 0.0000227 0.0000104 0.000111 0.000118 2006 6 23 53909 0.124906 0.309549 0.1962099 0.0001886 0.000004 -0.000142 0.000033 0.000034 0.0000065 0.0000103 0.000074 0.000081 2006 6 24 53910 0.124818 0.308483 0.1961123 0.0000138 0.000008 -0.000150 0.000033 0.000034 0.0000060 0.0000106 0.000061 0.000066 2006 6 25 53911 0.125196 0.307244 0.1962061 -0.0000945 -0.000004 -0.000149 0.000037 0.000038 0.0000111 0.0000110 0.000066 0.000069 2006 6 26 53912 0.125623 0.306071 0.1963287 -0.0000897 -0.000018 -0.000151 0.000040 0.000040 0.0000085 0.0000108 0.000071 0.000072 2006 6 27 53913 0.125989 0.304909 0.1963198 0.0000631 -0.000038 -0.000152 0.000038 0.000039 0.0000024 0.0000105 0.000075 0.000075 2006 6 28 53914 0.126243 0.303885 0.1961524 0.0002359 0.000020 -0.000140 0.000038 0.000039 0.0000013 0.0000105 0.000045 0.000040 2006 6 29 53915 0.126713 0.302630 0.1958023 0.0004465 0.000130 -0.000069 0.000038 0.000039 0.0000015 0.0000104 0.000033 0.000033 2006 6 30 53916 0.127526 0.301290 0.1952571 0.0006307 0.000135 -0.000108 0.000038 0.000039 0.0000017 0.0000104 0.000062 0.000059 2006 7 1 53917 0.128382 0.299916 0.1945240 0.0008237 0.000075 -0.000102 0.000038 0.000040 0.0000094 0.0000108 0.000075 0.000075 2006 7 2 53918 0.128778 0.298878 0.1936066 0.0009564 0.000003 -0.000067 0.000039 0.000040 0.0000119 0.0000111 0.000080 0.000085 2006 7 3 53919 0.128911 0.297710 0.1926335 0.0009924 -0.000067 -0.000040 0.000039 0.000040 0.0000131 0.0000106 0.000084 0.000094 2006 7 4 53920 0.128828 0.296536 0.1916725 0.0009673 -0.000131 -0.000020 0.000038 0.000039 0.0000138 0.0000102 0.000088 0.000104 2006 7 5 53921 0.128824 0.295376 0.1907315 0.0009090 -0.000092 -0.000094 0.000038 0.000039 0.0000082 0.0000103 0.000078 0.000083 2006 7 6 53922 0.128711 0.294520 0.1899088 0.0007662 -0.000048 -0.000173 0.000038 0.000039 0.0000025 0.0000104 0.000066 0.000063 2006 7 7 53923 0.128379 0.293675 0.1892969 0.0005256 0.000091 -0.000254 0.000038 0.000039 0.0000021 0.0000105 0.000076 0.000075 2006 7 8 53924 0.128126 0.292414 0.1888874 0.0002595 0.000118 -0.000271 0.000040 0.000041 0.0000097 0.0000111 0.000075 0.000074 2006 7 9 53925 0.127490 0.291128 0.1887598 0.0000634 0.000091 -0.000262 0.000042 0.000042 0.0000112 0.0000114 0.000068 0.000065 2006 7 10 53926 0.126859 0.289754 0.1887717 -0.0000110 0.000056 -0.000248 0.000041 0.000041 0.0000069 0.0000108 0.000060 0.000056 2006 7 11 53927 0.126168 0.288343 0.1887671 0.0000369 0.000014 -0.000229 0.000039 0.000040 0.0000020 0.0000102 0.000054 0.000047 2006 7 12 53928 0.125970 0.286918 0.1886950 0.0001552 -0.000123 -0.000173 0.000038 0.000039 0.0000042 0.0000101 0.000026 0.000025 2006 7 13 53929 0.125482 0.285746 0.1884080 0.0004075 -0.000148 -0.000167 0.000039 0.000039 0.0000066 0.0000102 0.000117 0.000211 2006 7 14 53930 0.124580 0.284874 0.1877945 0.0007491 -0.000017 -0.000243 0.000039 0.000039 0.0000026 0.0000101 0.000087 0.000098 2006 7 15 53931 0.123406 0.284190 0.1868959 0.0010147 -0.000005 -0.000284 0.000039 0.000040 0.0000092 0.0000104 0.000062 0.000054 2006 7 16 53932 0.122686 0.283217 0.1858028 0.0011158 -0.000042 -0.000304 0.000040 0.000040 0.0000101 0.0000109 0.000056 0.000050 2006 7 17 53933 0.122114 0.282120 0.1847076 0.0010318 -0.000069 -0.000319 0.000040 0.000040 0.0000060 0.0000109 0.000049 0.000046 2006 7 18 53934 0.121603 0.281087 0.1837808 0.0008295 -0.000086 -0.000329 0.000038 0.000038 0.0000019 0.0000104 0.000043 0.000042 2006 7 19 53935 0.121172 0.280270 0.1830972 0.0005615 -0.000064 -0.000187 0.000036 0.000037 0.0000076 0.0000101 0.000043 0.000042 2006 7 20 53936 0.120690 0.279487 0.1826737 0.0002957 -0.000027 -0.000010 0.000037 0.000037 0.0000124 0.0000102 0.000046 0.000043 2006 7 21 53937 0.120077 0.278716 0.1825049 0.0000358 0.000068 -0.000103 0.000038 0.000038 0.0000036 0.0000104 0.000078 0.000062 2006 7 22 53938 0.119367 0.277846 0.1825903 -0.0001651 0.000145 -0.000159 0.000039 0.000039 0.0000095 0.0000110 0.000081 0.000064 2006 7 23 53939 0.118782 0.276900 0.1828221 -0.0002581 0.000200 -0.000172 0.000039 0.000039 0.0000104 0.0000114 0.000070 0.000057 2006 7 24 53940 0.117953 0.275947 0.1830671 -0.0002342 0.000240 -0.000192 0.000037 0.000038 0.0000063 0.0000110 0.000058 0.000050 2006 7 25 53941 0.117342 0.274688 0.1832291 -0.0001007 0.000263 -0.000215 0.000036 0.000037 0.0000021 0.0000106 0.000046 0.000043 2006 7 26 53942 0.116946 0.273610 0.1832515 0.0000525 0.000188 -0.000216 0.000036 0.000036 0.0000078 0.0000106 0.000052 0.000048 2006 7 27 53943 0.116447 0.272925 0.1831289 0.0001542 0.000080 -0.000212 0.000036 0.000037 0.0000127 0.0000108 0.000062 0.000056 2006 7 28 53944 0.116222 0.272509 0.1828883 0.0002659 -0.000035 -0.000207 0.000036 0.000037 0.0000047 0.0000108 0.000072 0.000065 2006 7 29 53945 0.116053 0.272509 0.1825617 0.0003811 -0.000061 -0.000217 0.000037 0.000038 0.0000118 0.0000113 0.000075 0.000066 2006 7 30 53946 0.115047 0.272491 0.1821306 0.0004690 -0.000052 -0.000233 0.000038 0.000038 0.0000179 0.0000120 0.000075 0.000064 2006 7 31 53947 0.113803 0.271790 0.1816326 0.0004714 -0.000036 -0.000248 0.000037 0.000037 0.0000132 0.0000116 0.000075 0.000063 2006 8 1 53948 0.112516 0.271155 0.1811646 0.0004055 -0.000014 -0.000260 0.000036 0.000036 0.0000048 0.0000110 0.000074 0.000061 2006 8 2 53949 0.111311 0.270611 0.1808130 0.0003019 -0.000039 -0.000233 0.000036 0.000036 0.0000077 0.0000110 0.000040 0.000037 2006 8 3 53950 0.110271 0.269917 0.1805945 0.0001649 -0.000064 -0.000213 0.000036 0.000036 0.0000109 0.0000111 0.000064 0.000071 2006 8 4 53951 0.109363 0.268990 0.1804994 -0.0000024 -0.000093 -0.000277 0.000037 0.000037 0.0000036 0.0000112 0.000070 0.000060 2006 8 5 53952 0.108792 0.267829 0.1805367 -0.0001256 -0.000102 -0.000280 0.000038 0.000038 0.0000116 0.0000116 0.000065 0.000051 2006 8 6 53953 0.108544 0.266507 0.1807052 -0.0001708 -0.000100 -0.000248 0.000041 0.000041 0.0000188 0.0000119 0.000060 0.000050 2006 8 7 53954 0.108346 0.265253 0.1809052 -0.0001485 -0.000097 -0.000214 0.000043 0.000043 0.0000136 0.0000113 0.000055 0.000049 2006 8 8 53955 0.108457 0.264180 0.1809912 0.0000306 -0.000093 -0.000177 0.000041 0.000042 0.0000036 0.0000109 0.000050 0.000048 2006 8 9 53956 0.108439 0.263500 0.1808337 0.0003291 -0.000100 -0.000186 0.000040 0.000041 0.0000106 0.0000109 0.000051 0.000050 2006 8 10 53957 0.107819 0.262804 0.1803360 0.0006416 -0.000107 -0.000205 0.000040 0.000041 0.0000171 0.0000107 0.000053 0.000052 2006 8 11 53958 0.106947 0.261775 0.1794967 0.0009422 -0.000113 -0.000223 0.000040 0.000040 0.0000047 0.0000105 0.000056 0.000055 2006 8 12 53959 0.106018 0.260870 0.1784355 0.0010794 -0.000107 -0.000200 0.000041 0.000041 0.0000136 0.0000110 0.000054 0.000053 2006 8 13 53960 0.105140 0.260032 0.1773244 0.0010715 -0.000096 -0.000162 0.000041 0.000041 0.0000153 0.0000116 0.000051 0.000049 2006 8 14 53961 0.104425 0.259465 0.1763605 0.0008605 -0.000084 -0.000128 0.000039 0.000039 0.0000136 0.0000111 0.000049 0.000045 2006 8 15 53962 0.103461 0.258916 0.1756550 0.0005776 -0.000070 -0.000099 0.000039 0.000039 0.0000128 0.0000107 0.000045 0.000041 2006 8 16 53963 0.102133 0.258702 0.1752239 0.0002944 -0.000056 -0.000076 0.000038 0.000039 0.0000074 0.0000107 0.000043 0.000038 2006 8 17 53964 0.100652 0.258082 0.1750530 0.0000437 -0.000041 -0.000059 0.000037 0.000038 0.0000021 0.0000108 0.000039 0.000034 2006 8 18 53965 0.099403 0.257397 0.1750900 -0.0000994 -0.000048 -0.000162 0.000037 0.000038 0.0000019 0.0000108 0.000071 0.000054 2006 8 19 53966 0.098092 0.256587 0.1752654 -0.0001699 -0.000051 -0.000198 0.000039 0.000039 0.0000094 0.0000112 0.000074 0.000057 2006 8 20 53967 0.096592 0.255897 0.1754441 -0.0001397 -0.000051 -0.000199 0.000039 0.000040 0.0000146 0.0000121 0.000063 0.000053 2006 8 21 53968 0.095112 0.255499 0.1754850 0.0000204 -0.000053 -0.000198 0.000038 0.000038 0.0000104 0.0000116 0.000053 0.000048 2006 8 22 53969 0.093980 0.255277 0.1753401 0.0002357 -0.000059 -0.000192 0.000037 0.000037 0.0000027 0.0000110 0.000041 0.000043 2006 8 23 53970 0.092967 0.254958 0.1750285 0.0003915 0.000014 -0.000219 0.000037 0.000037 0.0000159 0.0000109 0.000042 0.000043 2006 8 24 53971 0.091579 0.254447 0.1745292 0.0005624 0.000106 -0.000251 0.000038 0.000038 0.0000266 0.0000108 0.000047 0.000043 2006 8 25 53972 0.090538 0.254031 0.1738726 0.0006932 -0.000016 -0.000202 0.000038 0.000038 0.0000067 0.0000110 0.000056 0.000056 2006 8 26 53973 0.089647 0.254059 0.1732041 0.0007234 -0.000080 -0.000167 0.000039 0.000039 0.0000144 0.0000116 0.000055 0.000055 2006 8 27 53974 0.088518 0.254176 0.1724687 0.0007010 -0.000096 -0.000144 0.000042 0.000042 0.0000136 0.0000126 0.000050 0.000048 2006 8 28 53975 0.087099 0.254264 0.1717349 0.0006542 -0.000110 -0.000120 0.000043 0.000043 0.0000069 0.0000126 0.000044 0.000042 2006 8 29 53976 0.085816 0.254129 0.1711155 0.0005824 -0.000120 -0.000096 0.000042 0.000042 0.0000019 0.0000120 0.000039 0.000035 2006 8 30 53977 0.084573 0.254175 0.1706373 0.0004190 -0.000136 -0.000071 0.000042 0.000041 0.0000011 0.0000118 0.000029 0.000026 2006 8 31 53978 0.083394 0.254136 0.1703254 0.0002298 -0.000151 -0.000047 0.000041 0.000041 0.0000014 0.0000118 0.000018 0.000017 2006 9 1 53979 0.082474 0.254226 0.1701817 0.0000769 -0.000024 -0.000059 0.000041 0.000042 0.0000017 0.0000123 0.000053 0.000055 2006 9 2 53980 0.081266 0.254310 0.1701625 0.0000003 -0.000008 -0.000063 0.000044 0.000043 0.0000088 0.0000129 0.000064 0.000063 2006 9 3 53981 0.079766 0.254401 0.1701576 0.0000318 -0.000053 -0.000059 0.000046 0.000045 0.0000101 0.0000129 0.000060 0.000055 2006 9 4 53982 0.078285 0.254457 0.1700338 0.0002184 -0.000100 -0.000057 0.000045 0.000044 0.0000073 0.0000119 0.000056 0.000047 2006 9 5 53983 0.077227 0.254444 0.1696653 0.0005476 -0.000147 -0.000056 0.000044 0.000043 0.0000044 0.0000112 0.000051 0.000039 2006 9 6 53984 0.076809 0.254543 0.1689570 0.0009317 -0.000047 -0.000121 0.000043 0.000042 0.0000016 0.0000112 0.000043 0.000038 2006 9 7 53985 0.076159 0.254827 0.1678808 0.0012555 -0.000050 -0.000051 0.000043 0.000042 0.0000012 0.0000111 0.000078 0.000067 2006 9 8 53986 0.075066 0.255126 0.1664788 0.0014850 -0.000080 0.000052 0.000044 0.000043 0.0000014 0.0000112 0.000124 0.000104 2006 9 9 53987 0.073784 0.254908 0.1648857 0.0015684 -0.000095 0.000054 0.000045 0.000043 0.0000333 0.0000119 0.000121 0.000102 2006 9 10 53988 0.072438 0.254595 0.1633746 0.0014362 -0.000103 0.000014 0.000047 0.000045 0.0000214 0.0000121 0.000100 0.000083 2006 9 11 53989 0.070767 0.254187 0.1620949 0.0011667 -0.000107 -0.000029 0.000047 0.000045 0.0000060 0.0000112 0.000079 0.000065 2006 9 12 53990 0.069105 0.253856 0.1610845 0.0008685 -0.000108 -0.000071 0.000045 0.000043 0.0000016 0.0000106 0.000058 0.000047 2006 9 13 53991 0.067317 0.253397 0.1603426 0.0006282 -0.000065 -0.000050 0.000043 0.000042 0.0000059 0.0000105 0.000031 0.000028 2006 9 14 53992 0.065839 0.252653 0.1598301 0.0004458 -0.000024 -0.000065 0.000044 0.000042 0.0000099 0.0000106 0.000019 0.000018 2006 9 15 53993 0.064582 0.252241 0.1594782 0.0003034 0.000038 -0.000114 0.000045 0.000044 0.0000041 0.0000108 0.000087 0.000089 2006 9 16 53994 0.063344 0.252160 0.1591900 0.0003160 0.000045 -0.000101 0.000047 0.000045 0.0000073 0.0000114 0.000101 0.000104 2006 9 17 53995 0.061819 0.252255 0.1588530 0.0003837 0.000026 -0.000053 0.000048 0.000046 0.0000133 0.0000113 0.000086 0.000087 2006 9 18 53996 0.060235 0.252281 0.1583728 0.0005482 0.000005 0.000005 0.000047 0.000045 0.0000102 0.0000102 0.000071 0.000070 2006 9 19 53997 0.058521 0.252734 0.1577206 0.0007474 -0.000013 0.000064 0.000044 0.000043 0.0000027 0.0000096 0.000056 0.000054 2006 9 20 53998 0.056461 0.253042 0.1569103 0.0009147 -0.000169 0.000359 0.000044 0.000042 0.0000088 0.0000095 0.000039 0.000036 2006 9 21 53999 0.054216 0.253157 0.1559205 0.0010752 -0.000104 0.000414 0.000044 0.000043 0.0000144 0.0000094 0.000056 0.000056 2006 9 22 54000 0.051760 0.253334 0.1547697 0.0011309 0.000043 0.000363 0.000044 0.000043 0.0000045 0.0000095 0.000083 0.000087 2006 9 23 54001 0.049186 0.253098 0.1535766 0.0011311 0.000097 0.000292 0.000045 0.000044 0.0000017 0.0000102 0.000082 0.000086 2006 9 24 54002 0.047186 0.252898 0.1524272 0.0011102 0.000114 0.000202 0.000047 0.000045 0.0000014 0.0000108 0.000069 0.000072 2006 9 25 54003 0.045057 0.252737 0.1513627 0.0010235 0.000128 0.000099 0.000048 0.000046 0.0000012 0.0000104 0.000057 0.000059 2006 9 26 54004 0.043274 0.252331 0.1503998 0.0008920 0.000134 -0.000010 0.000046 0.000044 0.0000010 0.0000098 0.000045 0.000046 2006 9 27 54005 0.041647 0.252148 0.1495421 0.0007627 0.000130 -0.000031 0.000045 0.000043 0.0000103 0.0000097 0.000049 0.000048 2006 9 28 54006 0.039851 0.252190 0.1488242 0.0006711 0.000116 -0.000022 0.000045 0.000044 0.0000172 0.0000096 0.000056 0.000054 2006 9 29 54007 0.037436 0.252344 0.1482227 0.0006111 0.000095 -0.000002 0.000044 0.000043 0.0000051 0.0000097 0.000064 0.000060 2006 9 30 54008 0.035066 0.252342 0.1475874 0.0006492 0.000072 -0.000015 0.000045 0.000044 0.0000077 0.0000106 0.000062 0.000058 2006 10 1 54009 0.032599 0.252689 0.1468605 0.0007744 0.000049 -0.000033 0.000049 0.000048 0.0000108 0.0000114 0.000055 0.000052 2006 10 2 54010 0.030362 0.252848 0.1459954 0.0009952 0.000025 -0.000042 0.000050 0.000049 0.0000073 0.0000110 0.000049 0.000047 2006 10 3 54011 0.028360 0.253106 0.1448803 0.0012835 0.000003 -0.000044 0.000048 0.000048 0.0000018 0.0000107 0.000042 0.000042 2006 10 4 54012 0.026981 0.253436 0.1434084 0.0016365 -0.000057 -0.000088 0.000047 0.000047 0.0000114 0.0000106 0.000664 0.001485 2006 10 5 54013 0.026096 0.253970 0.1415683 0.0019940 -0.000083 -0.000082 0.000046 0.000047 0.0000192 0.0000105 0.000289 0.000622 2006 10 6 54014 0.025261 0.254239 0.1394438 0.0022337 -0.000033 0.000030 0.000046 0.000046 0.0000053 0.0000104 0.000066 0.000069 2006 10 7 54015 0.024273 0.254685 0.1371810 0.0022128 -0.000010 0.000061 0.000047 0.000048 0.0000060 0.0000115 0.000074 0.000080 2006 10 8 54016 0.023515 0.255273 0.1350111 0.0020469 0.000000 0.000047 0.000049 0.000050 0.0000089 0.0000118 0.000068 0.000075 2006 10 9 54017 0.022261 0.256205 0.1331249 0.0017371 0.000012 0.000030 0.000047 0.000048 0.0000064 0.0000104 0.000062 0.000070 2006 10 10 54018 0.020335 0.257263 0.1315855 0.0013864 0.000026 0.000007 0.000046 0.000046 0.0000022 0.0000098 0.000056 0.000066 2006 10 11 54019 0.018214 0.257926 0.1303482 0.0011313 -0.000033 0.000087 0.000045 0.000046 0.0000097 0.0000099 0.000033 0.000042 2006 10 12 54020 0.015684 0.258256 0.1293205 0.0009825 -0.000022 0.000058 0.000046 0.000047 0.0000160 0.0000102 0.000044 0.000049 2006 10 13 54021 0.013018 0.258061 0.1284057 0.0008637 0.000020 -0.000013 0.000047 0.000048 0.0000046 0.0000104 0.000066 0.000065 2006 10 14 54022 0.011213 0.257728 0.1275294 0.0008581 0.000041 -0.000031 0.000048 0.000049 0.0000014 0.0000110 0.000066 0.000064 2006 10 15 54023 0.009829 0.257979 0.1266235 0.0009135 0.000054 -0.000025 0.000049 0.000050 0.0000012 0.0000114 0.000057 0.000056 2006 10 16 54024 0.008416 0.258812 0.1256280 0.0010665 0.000069 -0.000016 0.000048 0.000049 0.0000011 0.0000110 0.000048 0.000048 2006 10 17 54025 0.007210 0.259877 0.1244994 0.0012407 0.000083 -0.000001 0.000046 0.000047 0.0000009 0.0000104 0.000039 0.000040 2006 10 18 54026 0.006152 0.260601 0.1232189 0.0013636 0.000132 0.000038 0.000045 0.000046 0.0000062 0.0000102 0.000049 0.000046 2006 10 19 54027 0.005230 0.261565 0.1218039 0.0014307 0.000185 0.000082 0.000046 0.000047 0.0000100 0.0000102 0.000063 0.000056 2006 10 20 54028 0.004195 0.262281 0.1203095 0.0014735 0.000231 0.000120 0.000046 0.000048 0.0000032 0.0000102 0.000078 0.000066 2006 10 21 54029 0.003455 0.263118 0.1188169 0.0014498 0.000210 0.000112 0.000046 0.000048 0.0000057 0.0000107 0.000080 0.000070 2006 10 22 54030 0.002940 0.264083 0.1173815 0.0013803 0.000161 0.000081 0.000046 0.000048 0.0000102 0.0000110 0.000077 0.000070 2006 10 23 54031 0.002204 0.265079 0.1160221 0.0012901 0.000108 0.000042 0.000044 0.000045 0.0000077 0.0000104 0.000074 0.000071 2006 10 24 54032 0.000998 0.266278 0.1147909 0.0011506 0.000053 -0.000001 0.000043 0.000044 0.0000023 0.0000100 0.000072 0.000072 2006 10 25 54033 -0.000534 0.267387 0.1137475 0.0009508 0.000051 -0.000042 0.000044 0.000045 0.0000086 0.0000102 0.000075 0.000073 2006 10 26 54034 -0.001968 0.267970 0.1128532 0.0008468 0.000068 -0.000078 0.000044 0.000044 0.0000140 0.0000102 0.000080 0.000074 2006 10 27 54035 -0.002445 0.268613 0.1120463 0.0007727 0.000089 -0.000107 0.000043 0.000043 0.0000043 0.0000099 0.000086 0.000075 2006 10 28 54036 -0.002944 0.269084 0.1113101 0.0007405 0.000095 -0.000100 0.000044 0.000045 0.0000044 0.0000104 0.000078 0.000068 2006 10 29 54037 -0.003161 0.269656 0.1105186 0.0008962 0.000097 -0.000074 0.000049 0.000049 0.0000045 0.0000108 0.000066 0.000058 2006 10 30 54038 -0.003300 0.270722 0.1095361 0.0011312 0.000102 -0.000040 0.000052 0.000052 0.0000029 0.0000102 0.000054 0.000048 2006 10 31 54039 -0.003843 0.271751 0.1082817 0.0013882 0.000107 -0.000002 0.000049 0.000049 0.0000012 0.0000097 0.000042 0.000037 2006 11 1 54040 -0.004141 0.272896 0.1067256 0.0017057 0.000112 0.000032 0.000049 0.000049 0.0000010 0.0000096 0.000063 0.000056 2006 11 2 54041 -0.004279 0.274145 0.1048958 0.0019635 0.000115 0.000063 0.000050 0.000050 0.0000012 0.0000096 0.000092 0.000081 2006 11 3 54042 -0.004586 0.275345 0.1028968 0.0020240 0.000118 0.000090 0.000050 0.000050 0.0000014 0.0000096 0.000121 0.000107 2006 11 4 54043 -0.005150 0.276057 0.1009011 0.0019070 0.000120 0.000071 0.000052 0.000051 0.0000086 0.0000102 0.000111 0.000098 2006 11 5 54044 -0.005799 0.276890 0.0991355 0.0016085 0.000122 0.000033 0.000051 0.000051 0.0000101 0.0000108 0.000087 0.000077 2006 11 6 54045 -0.006508 0.277806 0.0977111 0.0012447 0.000123 -0.000005 0.000047 0.000047 0.0000062 0.0000104 0.000062 0.000056 2006 11 7 54046 -0.007328 0.279329 0.0966354 0.0009546 0.000124 -0.000044 0.000045 0.000045 0.0000016 0.0000101 0.000038 0.000034 2006 11 8 54047 -0.008838 0.281199 0.0958459 0.0007450 0.000083 0.000024 0.000045 0.000045 0.0000053 0.0000104 0.000084 0.000097 2006 11 9 54048 -0.010684 0.282312 0.0951763 0.0006748 0.000105 0.000086 0.000045 0.000046 0.0000088 0.0000106 0.000033 0.000036 2006 11 10 54049 -0.012334 0.283296 0.0944835 0.0006947 0.000164 0.000103 0.000045 0.000046 0.0000030 0.0000108 0.000049 0.000053 2006 11 11 54050 -0.013948 0.284008 0.0937408 0.0008120 0.000171 0.000095 0.000048 0.000048 0.0000055 0.0000110 0.000059 0.000062 2006 11 12 54051 -0.014774 0.284797 0.0928158 0.0010127 0.000154 0.000079 0.000052 0.000052 0.0000071 0.0000112 0.000053 0.000054 2006 11 13 54052 -0.015750 0.285830 0.0917215 0.0011121 0.000136 0.000062 0.000054 0.000053 0.0000048 0.0000107 0.000048 0.000046 2006 11 14 54053 -0.016805 0.286780 0.0905472 0.0012242 0.000117 0.000042 0.000051 0.000051 0.0000015 0.0000102 0.000042 0.000038 2006 11 15 54054 -0.017800 0.287569 0.0893317 0.0012261 0.000081 0.000055 0.000049 0.000050 0.0000027 0.0000100 0.000099 0.000081 2006 11 16 54055 -0.018540 0.288284 0.0880888 0.0012161 0.000080 0.000068 0.000049 0.000049 0.0000041 0.0000100 0.000054 0.000048 2006 11 17 54056 -0.019723 0.289446 0.0868427 0.0012022 0.000103 0.000024 0.000049 0.000049 0.0000018 0.0000102 0.000054 0.000052 2006 11 18 54057 -0.021255 0.290376 0.0856604 0.0011087 0.000115 0.000021 0.000051 0.000051 0.0000051 0.0000106 0.000056 0.000053 2006 11 19 54058 -0.022714 0.291081 0.0845815 0.0009993 0.000126 0.000040 0.000053 0.000052 0.0000067 0.0000109 0.000048 0.000046 2006 11 20 54059 -0.024134 0.291571 0.0836158 0.0008946 0.000142 0.000060 0.000052 0.000051 0.0000045 0.0000106 0.000041 0.000038 2006 11 21 54060 -0.025746 0.292294 0.0827757 0.0007490 0.000161 0.000080 0.000048 0.000048 0.0000013 0.0000102 0.000033 0.000031 2006 11 22 54061 -0.026821 0.293164 0.0820689 0.0006520 0.000254 0.000026 0.000048 0.000048 0.0000011 0.0000102 0.000064 0.000064 2006 11 23 54062 -0.028120 0.294634 0.0814799 0.0005828 0.000296 0.000007 0.000050 0.000050 0.0000023 0.0000104 0.000072 0.000071 2006 11 24 54063 -0.029650 0.296103 0.0809369 0.0005435 0.000304 0.000006 0.000051 0.000052 0.0000037 0.0000104 0.000067 0.000065 2006 11 25 54064 -0.031269 0.297619 0.0803224 0.0006878 0.000303 0.000005 0.000052 0.000053 0.0000050 0.0000108 0.000062 0.000059 2006 11 26 54065 -0.032908 0.299121 0.0795126 0.0009488 0.000292 0.000004 0.000054 0.000054 0.0000043 0.0000110 0.000058 0.000053 2006 11 27 54066 -0.034528 0.300454 0.0784153 0.0012573 0.000272 0.000002 0.000053 0.000054 0.0000028 0.0000104 0.000053 0.000047 2006 11 28 54067 -0.035801 0.301491 0.0770191 0.0015215 0.000245 -0.000001 0.000051 0.000052 0.0000013 0.0000101 0.000048 0.000041 2006 11 29 54068 -0.036694 0.302133 0.0753890 0.0017218 0.000188 0.000040 0.000050 0.000051 0.0000065 0.0000102 0.000034 0.000026 2006 11 30 54069 -0.037430 0.303212 0.0736081 0.0018101 0.000142 0.000022 0.000051 0.000051 0.0000104 0.0000100 0.000056 0.000052 2006 12 1 54070 -0.038219 0.304196 0.0717985 0.0017521 0.000115 -0.000034 0.000052 0.000053 0.0000033 0.0000100 0.000101 0.000085 2006 12 2 54071 -0.038563 0.305211 0.0701293 0.0015333 0.000123 -0.000053 0.000055 0.000056 0.0000048 0.0000107 0.000102 0.000083 2006 12 3 54072 -0.038642 0.306802 0.0687467 0.0012273 0.000142 -0.000051 0.000058 0.000058 0.0000053 0.0000116 0.000086 0.000070 2006 12 4 54073 -0.038707 0.308695 0.0676407 0.0009872 0.000161 -0.000040 0.000057 0.000057 0.0000035 0.0000112 0.000069 0.000056 2006 12 5 54074 -0.038830 0.310460 0.0667491 0.0008196 0.000181 -0.000022 0.000053 0.000054 0.0000014 0.0000103 0.000053 0.000043 2006 12 6 54075 -0.039323 0.312305 0.0660089 0.0006944 0.000163 0.000029 0.000051 0.000052 0.0000070 0.0000102 0.000032 0.000032 2006 12 7 54076 -0.040296 0.314267 0.0653087 0.0007393 0.000080 0.000109 0.000051 0.000051 0.0000119 0.0000102 0.000017 0.000017 2006 12 8 54077 -0.041530 0.316207 0.0645224 0.0008624 -0.000010 0.000176 0.000052 0.000052 0.0000063 0.0000104 0.000087 0.000108 2006 12 9 54078 -0.042607 0.317701 0.0635611 0.0010486 -0.000020 0.000194 0.000055 0.000054 0.0000077 0.0000108 0.000102 0.000125 2006 12 10 54079 -0.043385 0.318852 0.0624570 0.0012263 0.000013 0.000182 0.000058 0.000057 0.0000043 0.0000119 0.000083 0.000097 2006 12 11 54080 -0.044239 0.319811 0.0611745 0.0013483 0.000063 0.000155 0.000059 0.000058 0.0000028 0.0000125 0.000064 0.000068 2006 12 12 54081 -0.044869 0.320731 0.0597619 0.0014344 0.000125 0.000116 0.000056 0.000055 0.0000013 0.0000121 0.000045 0.000040 2006 12 13 54082 -0.045634 0.322286 0.0582986 0.0014211 0.000329 -0.000030 0.000054 0.000054 0.0000045 0.0000118 0.000039 0.000032 2006 12 14 54083 -0.046657 0.323811 0.0569069 0.0013247 0.000420 -0.000107 0.000055 0.000055 0.0000071 0.0000116 0.000073 0.000067 2006 12 15 54084 -0.047953 0.325210 0.0556449 0.0012111 0.000457 -0.000149 0.000056 0.000056 0.0000030 0.0000119 0.000119 0.000113 2006 12 16 54085 -0.048963 0.326578 0.0544378 0.0010994 0.000464 -0.000153 0.000058 0.000058 0.0000058 0.0000125 0.000115 0.000109 2006 12 17 54086 -0.049588 0.328007 0.0533941 0.0009256 0.000447 -0.000133 0.000056 0.000056 0.0000083 0.0000122 0.000092 0.000085 2006 12 18 54087 -0.050172 0.329495 0.0525566 0.0007535 0.000415 -0.000102 0.000051 0.000051 0.0000059 0.0000109 0.000069 0.000062 2006 12 19 54088 -0.050521 0.331028 0.0518653 0.0006496 0.000368 -0.000061 0.000050 0.000050 0.0000019 0.0000106 0.000046 0.000039 2006 12 20 54089 -0.051147 0.332198 0.0512634 0.0005641 0.000350 -0.000030 0.000049 0.000050 0.0000061 0.0000107 0.000045 0.000039 2006 12 21 54090 -0.051962 0.333136 0.0507247 0.0005098 0.000334 -0.000004 0.000049 0.000050 0.0000098 0.0000107 0.000049 0.000045 2006 12 22 54091 -0.052612 0.333549 0.0501871 0.0006220 0.000316 0.000017 0.000048 0.000050 0.0000033 0.0000106 0.000054 0.000051 2006 12 23 54092 -0.052596 0.334182 0.0495056 0.0008265 0.000286 0.000004 0.000049 0.000050 0.0000016 0.0000109 0.000056 0.000052 2006 12 24 54093 -0.052078 0.335245 0.0485723 0.0011188 0.000253 -0.000025 0.000057 0.000058 0.0000017 0.0000122 0.000058 0.000050 2006 12 25 54094 -0.051303 0.336874 0.0473502 0.0013588 0.000221 -0.000062 0.000061 0.000063 0.0000018 0.0000125 0.000060 0.000049 2006 12 26 54095 -0.050740 0.338633 0.0458742 0.0015393 0.000189 -0.000104 0.000060 0.000061 0.0000018 0.0000121 0.000062 0.000047 2006 12 27 54096 -0.050402 0.340392 0.0442409 0.0016459 0.000159 -0.000147 0.000060 0.000061 0.0000019 0.0000123 0.000063 0.000045 2006 12 28 54097 -0.050256 0.342160 0.0425803 0.0016123 0.000129 -0.000189 0.000060 0.000060 0.0000020 0.0000123 0.000065 0.000044 2006 12 29 54098 -0.049861 0.343830 0.0410201 0.0014758 0.000118 -0.000127 0.000059 0.000059 0.0000021 0.0000123 0.000111 0.000109 2006 12 30 54099 -0.049470 0.345463 0.0396448 0.0012837 0.000088 -0.000121 0.000063 0.000062 0.0000020 0.0000130 0.000122 0.000124 2006 12 31 54100 -0.049436 0.346448 0.0385073 0.0010070 0.000055 -0.000144 0.000064 0.000062 0.0000019 0.0000132 0.000115 0.000114 2007 1 1 54101 -0.049392 0.347341 0.0376212 0.0007488 0.000031 -0.000162 0.000061 0.000059 0.0000018 0.0000125 0.000108 0.000105 2007 1 2 54102 -0.049985 0.348602 0.0369474 0.0005811 0.000018 -0.000179 0.000059 0.000057 0.0000017 0.0000120 0.000101 0.000095 2007 1 3 54103 -0.051126 0.349937 0.0364030 0.0005093 0.000017 -0.000192 0.000059 0.000057 0.0000016 0.0000121 0.000095 0.000085 2007 1 4 54104 -0.052992 0.351314 0.0358810 0.0005500 0.000031 -0.000198 0.000059 0.000057 0.0000014 0.0000121 0.000096 0.000095 2007 1 5 54105 -0.054455 0.352666 0.0352680 0.0007190 0.000057 -0.000202 0.000058 0.000057 0.0000012 0.0000120 0.000100 0.000109 2007 1 6 54106 -0.055965 0.354249 0.0344796 0.0009105 0.000137 -0.000182 0.000060 0.000058 0.0000052 0.0000125 0.000091 0.000102 2007 1 7 54107 -0.056673 0.355564 0.0334938 0.0010634 0.000237 -0.000154 0.000064 0.000063 0.0000107 0.0000123 0.000079 0.000086 2007 1 8 54108 -0.057181 0.357183 0.0323393 0.0012030 0.000335 -0.000129 0.000064 0.000064 0.0000143 0.0000111 0.000066 0.000070 2007 1 9 54109 -0.057577 0.359010 0.0310617 0.0013296 0.000425 -0.000106 0.000061 0.000062 0.0000140 0.0000106 0.000053 0.000055 2007 1 10 54110 -0.058094 0.361234 0.0297189 0.0013541 0.000286 -0.000221 0.000059 0.000059 0.0000028 0.0000106 0.000038 0.000035 2007 1 11 54111 -0.059000 0.363122 0.0283807 0.0013116 0.000292 -0.000197 0.000059 0.000060 0.0000007 0.0000106 0.000039 0.000036 2007 1 12 54112 -0.059180 0.364649 0.0270882 0.0012352 0.000331 -0.000137 0.000060 0.000061 0.0000009 0.0000106 0.000044 0.000043 2007 1 13 54113 -0.058667 0.366455 0.0258685 0.0011297 0.000347 -0.000156 0.000061 0.000062 0.0000066 0.0000110 0.000043 0.000042 2007 1 14 54114 -0.058361 0.368175 0.0247776 0.0009970 0.000352 -0.000202 0.000064 0.000065 0.0000106 0.0000116 0.000039 0.000038 2007 1 15 54115 -0.058004 0.369715 0.0238455 0.0008712 0.000355 -0.000241 0.000064 0.000065 0.0000076 0.0000116 0.000034 0.000035 2007 1 16 54116 -0.057362 0.371419 0.0230239 0.0007991 0.000355 -0.000275 0.000060 0.000062 0.0000020 0.0000115 0.000030 0.000031 2007 1 17 54117 -0.056963 0.373242 0.0222216 0.0007943 0.000392 -0.000183 0.000060 0.000062 0.0000055 0.0000116 0.000070 0.000093 2007 1 18 54118 -0.056506 0.375001 0.0213968 0.0008858 0.000434 -0.000060 0.000063 0.000064 0.0000090 0.0000116 0.000120 0.000172 2007 1 19 54119 -0.055889 0.377209 0.0204630 0.0010846 0.000427 -0.000010 0.000064 0.000066 0.0000035 0.0000117 0.000119 0.000119 2007 1 20 54120 -0.055674 0.379806 0.0192287 0.0013788 0.000390 -0.000029 0.000065 0.000066 0.0000098 0.0000121 0.000095 0.000079 2007 1 21 54121 -0.055641 0.381674 0.0176808 0.0016897 0.000343 -0.000070 0.000068 0.000068 0.0000136 0.0000125 0.000070 0.000059 2007 1 22 54122 -0.055277 0.383371 0.0158620 0.0019796 0.000294 -0.000119 0.000069 0.000069 0.0000109 0.0000121 0.000045 0.000039 2007 1 23 54123 -0.055091 0.385137 0.0138195 0.0021356 0.000245 -0.000173 0.000064 0.000065 0.0000076 0.0000115 0.000020 0.000020 2007 1 24 54124 -0.054798 0.386974 0.0116755 0.0021065 0.000187 -0.000199 0.000063 0.000064 0.0000080 0.0000114 0.000344 0.000231 2007 1 25 54125 -0.054651 0.388941 0.0096211 0.0019300 0.000177 -0.000206 0.000063 0.000064 0.0000073 0.0000114 0.000081 0.000061 2007 1 26 54126 -0.054345 0.390536 0.0077936 0.0016970 0.000212 -0.000189 0.000063 0.000064 0.0000026 0.0000113 0.000075 0.000066 2007 1 27 54127 -0.053708 0.392256 0.0062105 0.0014270 0.000216 -0.000187 0.000068 0.000068 0.0000082 0.0000120 0.000082 0.000071 2007 1 28 54128 -0.052936 0.393886 0.0048979 0.0011618 0.000207 -0.000192 0.000066 0.000066 0.0000104 0.0000132 0.000062 0.000054 2007 1 29 54129 -0.051896 0.395808 0.0038247 0.0010191 0.000200 -0.000192 0.000060 0.000060 0.0000174 0.0000137 0.000042 0.000037 2007 1 30 54130 -0.050889 0.397755 0.0028487 0.0009795 0.000196 -0.000189 0.000057 0.000057 0.0000255 0.0000136 0.000022 0.000020 2007 1 31 54131 -0.050254 0.399606 0.0018318 0.0010337 0.000189 -0.000194 0.000056 0.000057 0.0000216 0.0000136 0.000031 0.000027 2007 2 1 54132 -0.049833 0.401078 0.0007270 0.0011779 0.000182 -0.000200 0.000058 0.000059 0.0000163 0.0000137 0.000047 0.000040 2007 2 2 54133 -0.049187 0.402238 -0.0005219 0.0013550 0.000176 -0.000201 0.000058 0.000058 0.0000044 0.0000136 0.000063 0.000053 2007 2 3 54134 -0.047727 0.403062 -0.0019552 0.0015252 0.000187 -0.000200 0.000059 0.000059 0.0000065 0.0000136 0.000060 0.000051 2007 2 4 54135 -0.045644 0.404292 -0.0035315 0.0016333 0.000206 -0.000196 0.000061 0.000061 0.0000087 0.0000135 0.000051 0.000044 2007 2 5 54136 -0.043551 0.405868 -0.0052017 0.0016932 0.000226 -0.000190 0.000059 0.000059 0.0000057 0.0000129 0.000041 0.000037 2007 2 6 54137 -0.041285 0.407827 -0.0069194 0.0017208 0.000249 -0.000187 0.000055 0.000055 0.0000013 0.0000123 0.000031 0.000030 2007 2 7 54138 -0.039557 0.410237 -0.0086209 0.0016372 0.000188 -0.000129 0.000055 0.000055 0.0000044 0.0000123 0.000035 0.000028 2007 2 8 54139 -0.038573 0.412621 -0.0102233 0.0015400 0.000198 -0.000077 0.000058 0.000058 0.0000074 0.0000126 0.000056 0.000060 2007 2 9 54140 -0.037769 0.414988 -0.0116624 0.0013509 0.000208 -0.000107 0.000058 0.000058 0.0000024 0.0000127 0.000064 0.000058 2007 2 10 54141 -0.036850 0.416808 -0.0129258 0.0011706 0.000245 -0.000143 0.000058 0.000058 0.0000073 0.0000128 0.000063 0.000055 2007 2 11 54142 -0.036046 0.418466 -0.0140475 0.0010248 0.000292 -0.000179 0.000061 0.000061 0.0000109 0.0000133 0.000060 0.000058 2007 2 12 54143 -0.035008 0.420122 -0.0150036 0.0008793 0.000337 -0.000220 0.000061 0.000061 0.0000076 0.0000129 0.000058 0.000060 2007 2 13 54144 -0.033834 0.421952 -0.0158062 0.0007424 0.000373 -0.000264 0.000058 0.000058 0.0000021 0.0000123 0.000055 0.000062 2007 2 14 54145 -0.032722 0.423531 -0.0165401 0.0007488 0.000430 -0.000261 0.000058 0.000058 0.0000055 0.0000125 0.000045 0.000050 2007 2 15 54146 -0.031507 0.425205 -0.0172906 0.0008278 0.000422 -0.000250 0.000060 0.000059 0.0000088 0.0000125 0.000047 0.000047 2007 2 16 54147 -0.030848 0.426759 -0.0181312 0.0009470 0.000348 -0.000262 0.000059 0.000057 0.0000027 0.0000123 0.000053 0.000047 2007 2 17 54148 -0.030344 0.427889 -0.0191112 0.0011395 0.000280 -0.000309 0.000062 0.000059 0.0000082 0.0000129 0.000060 0.000050 2007 2 18 54149 -0.029479 0.429159 -0.0203506 0.0014120 0.000224 -0.000356 0.000067 0.000063 0.0000156 0.0000135 0.000068 0.000053 2007 2 19 54150 -0.028623 0.430605 -0.0218575 0.0015965 0.000174 -0.000392 0.000067 0.000063 0.0000162 0.0000129 0.000077 0.000056 2007 2 20 54151 -0.027676 0.431916 -0.0234784 0.0015778 0.000134 -0.000414 0.000065 0.000062 0.0000143 0.0000123 0.000085 0.000059 2007 2 21 54152 -0.026996 0.433386 -0.0250114 0.0013883 0.000239 -0.000303 0.000060 0.000058 0.0000130 0.0000123 0.000023 0.000019 2007 2 22 54153 -0.025600 0.434557 -0.0262959 0.0011185 0.000332 -0.000168 0.000059 0.000056 0.0000104 0.0000123 0.000018 0.000021 2007 2 23 54154 -0.023482 0.435974 -0.0272778 0.0008440 0.000390 -0.000065 0.000062 0.000058 0.0000030 0.0000124 0.000046 0.000042 2007 2 24 54155 -0.021353 0.437133 -0.0280280 0.0006179 0.000392 -0.000058 0.000065 0.000061 0.0000055 0.0000129 0.000053 0.000045 2007 2 25 54156 -0.019157 0.438074 -0.0285732 0.0004733 0.000373 -0.000088 0.000072 0.000067 0.0000080 0.0000130 0.000048 0.000042 2007 2 26 54157 -0.017570 0.439308 -0.0290049 0.0004207 0.000348 -0.000129 0.000073 0.000069 0.0000056 0.0000123 0.000043 0.000038 2007 2 27 54158 -0.015980 0.440448 -0.0294330 0.0004535 0.000318 -0.000178 0.000068 0.000065 0.0000016 0.0000119 0.000039 0.000035 2007 2 28 54159 -0.014654 0.442081 -0.0299220 0.0005618 0.000317 -0.000167 0.000068 0.000065 0.0000071 0.0000119 0.000046 0.000041 2007 3 1 54160 -0.013858 0.443738 -0.0305283 0.0007035 0.000320 -0.000142 0.000071 0.000067 0.0000117 0.0000122 0.000055 0.000051 2007 3 2 54161 -0.013131 0.445606 -0.0312976 0.0008574 0.000319 -0.000118 0.000071 0.000068 0.0000035 0.0000125 0.000064 0.000060 2007 3 3 54162 -0.012814 0.447482 -0.0322545 0.0010395 0.000319 -0.000136 0.000072 0.000069 0.0000074 0.0000129 0.000061 0.000057 2007 3 4 54163 -0.012370 0.448807 -0.0333362 0.0011686 0.000317 -0.000167 0.000070 0.000066 0.0000077 0.0000136 0.000052 0.000049 2007 3 5 54164 -0.011637 0.450123 -0.0345252 0.0012361 0.000312 -0.000196 0.000063 0.000060 0.0000044 0.0000135 0.000043 0.000041 2007 3 6 54165 -0.011198 0.451306 -0.0357730 0.0012278 0.000307 -0.000221 0.000059 0.000057 0.0000013 0.0000129 0.000035 0.000033 2007 3 7 54166 -0.010637 0.452361 -0.0369830 0.0011983 0.000234 -0.000161 0.000058 0.000055 0.0000016 0.0000128 0.000062 0.000063 2007 3 8 54167 -0.009885 0.453868 -0.0381375 0.0011530 0.000191 -0.000146 0.000059 0.000056 0.0000047 0.0000127 0.000067 0.000069 2007 3 9 54168 -0.009123 0.455048 -0.0392029 0.0009616 0.000172 -0.000155 0.000060 0.000057 0.0000087 0.0000126 0.000060 0.000062 2007 3 10 54169 -0.008195 0.455973 -0.0401231 0.0007738 0.000165 -0.000162 0.000062 0.000059 0.0000120 0.0000134 0.000054 0.000055 2007 3 11 54170 -0.007364 0.456904 -0.0408734 0.0006509 0.000169 -0.000170 0.000062 0.000060 0.0000132 0.0000144 0.000047 0.000048 2007 3 12 54171 -0.006457 0.457682 -0.0414853 0.0005573 0.000183 -0.000179 0.000059 0.000056 0.0000090 0.0000144 0.000041 0.000041 2007 3 13 54172 -0.005802 0.458727 -0.0420259 0.0005269 0.000202 -0.000190 0.000055 0.000053 0.0000022 0.0000140 0.000035 0.000034 2007 3 14 54173 -0.005310 0.459890 -0.0425913 0.0006152 0.000423 -0.000100 0.000055 0.000053 0.0000062 0.0000139 0.000065 0.000098 2007 3 15 54174 -0.004491 0.461006 -0.0432784 0.0007796 0.000473 -0.000077 0.000057 0.000055 0.0000102 0.0000140 0.000073 0.000100 2007 3 16 54175 -0.002881 0.462135 -0.0442090 0.0011234 0.000442 -0.000087 0.000057 0.000055 0.0000035 0.0000141 0.000072 0.000076 2007 3 17 54176 -0.000920 0.463456 -0.0455277 0.0015505 0.000397 -0.000138 0.000057 0.000056 0.0000068 0.0000145 0.000068 0.000065 2007 3 18 54177 0.001242 0.464715 -0.0472617 0.0018919 0.000340 -0.000205 0.000061 0.000058 0.0000078 0.0000144 0.000064 0.000060 2007 3 19 54178 0.003339 0.466571 -0.0492680 0.0020625 0.000278 -0.000268 0.000060 0.000058 0.0000048 0.0000135 0.000059 0.000054 2007 3 20 54179 0.005066 0.468923 -0.0513695 0.0020932 0.000215 -0.000325 0.000056 0.000055 0.0000014 0.0000132 0.000055 0.000049 2007 3 21 54180 0.006386 0.470673 -0.0533968 0.0018854 0.000224 -0.000280 0.000056 0.000055 0.0000047 0.0000133 0.000055 0.000051 2007 3 22 54181 0.006928 0.471681 -0.0551233 0.0014713 0.000256 -0.000202 0.000058 0.000057 0.0000076 0.0000133 0.000056 0.000056 2007 3 23 54182 0.007424 0.472326 -0.0564148 0.0010635 0.000294 -0.000123 0.000057 0.000057 0.0000027 0.0000134 0.000057 0.000060 2007 3 24 54183 0.008272 0.472986 -0.0573401 0.0008047 0.000302 -0.000118 0.000058 0.000058 0.0000112 0.0000139 0.000055 0.000059 2007 3 25 54184 0.009515 0.473499 -0.0581059 0.0007138 0.000301 -0.000143 0.000061 0.000060 0.0000163 0.0000140 0.000053 0.000056 2007 3 26 54185 0.010691 0.474053 -0.0588115 0.0007164 0.000301 -0.000173 0.000059 0.000060 0.0000110 0.0000133 0.000049 0.000053 2007 3 27 54186 0.011695 0.474840 -0.0595390 0.0007956 0.000299 -0.000208 0.000056 0.000057 0.0000025 0.0000130 0.000047 0.000051 2007 3 28 54187 0.013503 0.475563 -0.0603999 0.0009529 0.000296 -0.000218 0.000053 0.000054 0.0000051 0.0000130 0.000021 0.000020 2007 3 29 54188 0.015718 0.476279 -0.0614417 0.0011388 0.000286 -0.000218 0.000052 0.000053 0.0000083 0.0000129 0.000015 0.000017 2007 3 30 54189 0.018184 0.477142 -0.0626499 0.0012790 0.000288 -0.000240 0.000053 0.000055 0.0000030 0.0000129 0.000058 0.000062 2007 3 31 54190 0.020398 0.478082 -0.0639645 0.0013597 0.000282 -0.000249 0.000055 0.000057 0.0000063 0.0000135 0.000067 0.000070 2007 4 1 54191 0.022670 0.478818 -0.0653639 0.0014826 0.000273 -0.000251 0.000054 0.000056 0.0000093 0.0000135 0.000056 0.000059 2007 4 2 54192 0.025242 0.479676 -0.0668704 0.0015526 0.000264 -0.000253 0.000050 0.000052 0.0000064 0.0000127 0.000047 0.000048 2007 4 3 54193 0.027971 0.480733 -0.0684405 0.0015687 0.000255 -0.000255 0.000047 0.000049 0.0000016 0.0000124 0.000037 0.000038 2007 4 4 54194 0.030694 0.482079 -0.0699774 0.0015070 0.000250 -0.000266 0.000047 0.000049 0.0000013 0.0000124 0.000063 0.000074 2007 4 5 54195 0.033227 0.483135 -0.0714209 0.0013774 0.000247 -0.000280 0.000048 0.000050 0.0000021 0.0000123 0.000099 0.000122 2007 4 6 54196 0.035739 0.484209 -0.0727562 0.0012824 0.000252 -0.000294 0.000047 0.000049 0.0000039 0.0000123 0.000100 0.000122 2007 4 7 54197 0.038133 0.485188 -0.0740162 0.0012154 0.000260 -0.000306 0.000049 0.000051 0.0000059 0.0000125 0.000088 0.000105 2007 4 8 54198 0.040104 0.485964 -0.0752503 0.0012231 0.000267 -0.000313 0.000049 0.000051 0.0000087 0.0000116 0.000075 0.000088 2007 4 9 54199 0.041475 0.486690 -0.0764626 0.0012079 0.000271 -0.000314 0.000046 0.000048 0.0000076 0.0000103 0.000063 0.000071 2007 4 10 54200 0.042605 0.487335 -0.0776617 0.0011898 0.000273 -0.000310 0.000046 0.000047 0.0000044 0.0000102 0.000050 0.000054 2007 4 11 54201 0.044067 0.487743 -0.0788988 0.0012841 0.000272 -0.000302 0.000044 0.000046 0.0000012 0.0000101 0.000038 0.000037 2007 4 12 54202 0.045538 0.488424 -0.0802589 0.0014526 0.000228 -0.000307 0.000043 0.000044 0.0000011 0.0000101 0.000355 0.000263 2007 4 13 54203 0.046991 0.488844 -0.0818511 0.0017582 0.000187 -0.000235 0.000044 0.000045 0.0000017 0.0000103 0.000183 0.000157 2007 4 14 54204 0.048753 0.489248 -0.0837457 0.0020379 0.000187 -0.000185 0.000046 0.000046 0.0000066 0.0000106 0.000114 0.000116 2007 4 15 54205 0.050412 0.489652 -0.0858758 0.0022216 0.000203 -0.000158 0.000048 0.000047 0.0000083 0.0000109 0.000149 0.000144 2007 4 16 54206 0.052293 0.490083 -0.0881621 0.0023217 0.000221 -0.000137 0.000047 0.000047 0.0000092 0.0000105 0.000184 0.000172 2007 4 17 54207 0.054284 0.490405 -0.0904234 0.0021391 0.000243 -0.000125 0.000046 0.000045 0.0000090 0.0000101 0.000218 0.000200 2007 4 18 54208 0.056324 0.490410 -0.0924264 0.0018336 0.000150 -0.000275 0.000045 0.000044 0.0000027 0.0000101 0.000074 0.000068 2007 4 19 54209 0.058146 0.490328 -0.0940600 0.0014215 0.000162 -0.000313 0.000045 0.000044 0.0000014 0.0000100 0.000051 0.000053 2007 4 20 54210 0.059799 0.490366 -0.0953088 0.0010390 0.000206 -0.000315 0.000046 0.000044 0.0000014 0.0000099 0.000064 0.000072 2007 4 21 54211 0.061260 0.490390 -0.0962538 0.0008347 0.000229 -0.000297 0.000047 0.000046 0.0000050 0.0000102 0.000063 0.000070 2007 4 22 54212 0.062618 0.490349 -0.0970535 0.0007949 0.000244 -0.000269 0.000052 0.000051 0.0000079 0.0000108 0.000056 0.000060 2007 4 23 54213 0.063804 0.490397 -0.0978740 0.0008611 0.000256 -0.000238 0.000054 0.000053 0.0000058 0.0000106 0.000050 0.000050 2007 4 24 54214 0.065283 0.490414 -0.0987975 0.0009719 0.000265 -0.000208 0.000052 0.000051 0.0000015 0.0000103 0.000043 0.000041 2007 4 25 54215 0.066868 0.490405 -0.0998347 0.0011060 0.000241 -0.000246 0.000051 0.000050 0.0000059 0.0000102 0.000033 0.000033 2007 4 26 54216 0.068904 0.490537 -0.1010071 0.0012676 0.000207 -0.000302 0.000051 0.000049 0.0000100 0.0000099 0.000021 0.000025 2007 4 27 54217 0.071034 0.490958 -0.1023285 0.0014144 0.000212 -0.000333 0.000051 0.000049 0.0000046 0.0000100 0.000092 0.000123 2007 4 28 54218 0.073084 0.491195 -0.1037705 0.0014895 0.000213 -0.000330 0.000054 0.000051 0.0000084 0.0000106 0.000109 0.000146 2007 4 29 54219 0.075218 0.491176 -0.1052440 0.0014927 0.000211 -0.000315 0.000052 0.000050 0.0000098 0.0000108 0.000097 0.000128 2007 4 30 54220 0.077167 0.491128 -0.1066901 0.0014344 0.000214 -0.000301 0.000047 0.000046 0.0000098 0.0000102 0.000084 0.000110 2007 5 1 54221 0.079116 0.491034 -0.1080602 0.0013162 0.000221 -0.000287 0.000046 0.000045 0.0000096 0.0000099 0.000071 0.000092 2007 5 2 54222 0.080886 0.490906 -0.1093027 0.0011609 0.000232 -0.000274 0.000047 0.000046 0.0000061 0.0000101 0.000058 0.000074 2007 5 3 54223 0.082777 0.490502 -0.1103965 0.0010039 0.000245 -0.000262 0.000047 0.000046 0.0000025 0.0000102 0.000046 0.000056 2007 5 4 54224 0.085104 0.489868 -0.1113418 0.0009060 0.000296 -0.000344 0.000046 0.000045 0.0000022 0.0000100 0.000123 0.000116 2007 5 5 54225 0.087426 0.489225 -0.1121560 0.0007487 0.000319 -0.000369 0.000048 0.000046 0.0000067 0.0000104 0.000132 0.000121 2007 5 6 54226 0.089574 0.488240 -0.1128759 0.0006517 0.000325 -0.000362 0.000048 0.000047 0.0000102 0.0000107 0.000109 0.000099 2007 5 7 54227 0.091642 0.487271 -0.1135281 0.0006450 0.000323 -0.000353 0.000047 0.000046 0.0000074 0.0000104 0.000085 0.000076 2007 5 8 54228 0.093619 0.486493 -0.1142216 0.0007994 0.000313 -0.000341 0.000045 0.000044 0.0000021 0.0000100 0.000061 0.000054 2007 5 9 54229 0.095464 0.485848 -0.1151243 0.0010374 0.000292 -0.000332 0.000044 0.000043 0.0000072 0.0000099 0.000068 0.000064 2007 5 10 54230 0.097408 0.484953 -0.1163124 0.0013453 0.000262 -0.000324 0.000045 0.000045 0.0000118 0.0000102 0.000084 0.000082 2007 5 11 54231 0.099638 0.484423 -0.1178165 0.0016518 0.000227 -0.000320 0.000045 0.000045 0.0000042 0.0000104 0.000100 0.000101 2007 5 12 54232 0.101520 0.483871 -0.1196670 0.0020123 0.000196 -0.000317 0.000045 0.000045 0.0000095 0.0000106 0.000089 0.000090 2007 5 13 54233 0.103916 0.483180 -0.1218019 0.0022292 0.000166 -0.000318 0.000045 0.000044 0.0000099 0.0000107 0.000069 0.000067 2007 5 14 54234 0.106519 0.482452 -0.1240286 0.0021776 0.000137 -0.000325 0.000043 0.000043 0.0000057 0.0000104 0.000049 0.000045 2007 5 15 54235 0.109470 0.481629 -0.1261026 0.0019404 0.000112 -0.000336 0.000040 0.000041 0.0000015 0.0000101 0.000028 0.000023 2007 5 16 54236 0.112286 0.480880 -0.1278400 0.0015543 0.000191 -0.000426 0.000040 0.000040 0.0000048 0.0000100 0.000026 0.000026 2007 5 17 54237 0.114864 0.479914 -0.1292302 0.0012185 0.000120 -0.000487 0.000041 0.000041 0.0000079 0.0000101 0.000054 0.000047 2007 5 18 54238 0.117150 0.479048 -0.1303365 0.0009622 0.000008 -0.000527 0.000041 0.000042 0.0000027 0.0000102 0.000089 0.000072 2007 5 19 54239 0.119156 0.477913 -0.1311851 0.0008483 0.000001 -0.000509 0.000044 0.000044 0.0000111 0.0000104 0.000086 0.000069 2007 5 20 54240 0.120914 0.476831 -0.1320881 0.0008590 0.000041 -0.000464 0.000044 0.000044 0.0000137 0.0000111 0.000068 0.000055 2007 5 21 54241 0.122494 0.475463 -0.1330325 0.0009079 0.000089 -0.000410 0.000042 0.000043 0.0000085 0.0000112 0.000050 0.000041 2007 5 22 54242 0.124366 0.473998 -0.1339405 0.0009635 0.000140 -0.000351 0.000042 0.000043 0.0000021 0.0000108 0.000032 0.000027 2007 5 23 54243 0.126752 0.473117 -0.1349096 0.0010693 0.000318 -0.000361 0.000042 0.000043 0.0000051 0.0000108 0.000060 0.000049 2007 5 24 54244 0.129024 0.472693 -0.1360379 0.0012192 0.000370 -0.000367 0.000044 0.000045 0.0000089 0.0000109 0.000137 0.000148 2007 5 25 54245 0.131420 0.471865 -0.1373290 0.0013079 0.000367 -0.000369 0.000044 0.000045 0.0000062 0.0000110 0.000225 0.000267 2007 5 26 54246 0.133724 0.470996 -0.1386277 0.0012819 0.000312 -0.000341 0.000045 0.000045 0.0000087 0.0000113 0.000414 0.000289 2007 5 27 54247 0.135545 0.470167 -0.1398771 0.0011904 0.000235 -0.000306 0.000046 0.000047 0.0000140 0.0000114 0.000640 0.000275 2007 5 28 54248 0.137191 0.468892 -0.1410219 0.0010942 0.000156 -0.000278 0.000045 0.000045 0.0000126 0.0000108 0.000866 0.000262 2007 5 29 54249 0.138874 0.467418 -0.1420078 0.0009362 0.000079 -0.000255 0.000044 0.000044 0.0000077 0.0000105 0.001092 0.000248 2007 5 30 54250 0.140842 0.465684 -0.1428215 0.0007636 0.000106 -0.000327 0.000042 0.000043 0.0000028 0.0000106 0.000282 0.000097 2007 5 31 54251 0.143479 0.463805 -0.1434626 0.0005842 0.000223 -0.000352 0.000042 0.000043 0.0000016 0.0000108 0.000065 0.000059 2007 6 1 54252 0.146330 0.462120 -0.1439305 0.0003281 0.000356 -0.000360 0.000043 0.000044 0.0000013 0.0000108 0.000065 0.000057 2007 6 2 54253 0.149186 0.460407 -0.1442362 0.0001903 0.000347 -0.000368 0.000045 0.000045 0.0000099 0.0000110 0.000069 0.000059 2007 6 3 54254 0.151589 0.458925 -0.1443769 0.0001479 0.000280 -0.000374 0.000046 0.000047 0.0000105 0.0000120 0.000074 0.000061 2007 6 4 54255 0.153876 0.457275 -0.1445574 0.0002447 0.000206 -0.000376 0.000045 0.000046 0.0000063 0.0000123 0.000080 0.000064 2007 6 5 54256 0.156430 0.455894 -0.1449320 0.0004494 0.000127 -0.000374 0.000043 0.000043 0.0000025 0.0000121 0.000085 0.000066 2007 6 6 54257 0.158771 0.454676 -0.1454980 0.0006767 0.000116 -0.000362 0.000042 0.000043 0.0000081 0.0000121 0.000095 0.000084 2007 6 7 54258 0.160571 0.453114 -0.1462691 0.0008606 0.000124 -0.000344 0.000043 0.000043 0.0000128 0.0000121 0.000106 0.000107 2007 6 8 54259 0.162447 0.451431 -0.1472370 0.0010236 0.000134 -0.000321 0.000043 0.000044 0.0000049 0.0000123 0.000116 0.000129 2007 6 9 54260 0.164436 0.449962 -0.1483320 0.0011213 0.000119 -0.000332 0.000044 0.000045 0.0000089 0.0000125 0.000104 0.000116 2007 6 10 54261 0.166783 0.448608 -0.1494456 0.0011412 0.000098 -0.000353 0.000043 0.000044 0.0000091 0.0000127 0.000084 0.000090 2007 6 11 54262 0.169184 0.447154 -0.1505327 0.0010287 0.000082 -0.000371 0.000040 0.000041 0.0000057 0.0000126 0.000064 0.000064 2007 6 12 54263 0.171325 0.445421 -0.1514622 0.0007726 0.000069 -0.000390 0.000038 0.000039 0.0000025 0.0000126 0.000043 0.000038 2007 6 13 54264 0.173345 0.443182 -0.1520558 0.0004327 0.000113 -0.000177 0.000038 0.000039 0.0000089 0.0000127 0.000083 0.000068 2007 6 14 54265 0.175073 0.441187 -0.1523173 0.0001553 0.000099 -0.000130 0.000039 0.000040 0.0000140 0.0000127 0.000105 0.000088 2007 6 15 54266 0.176633 0.439048 -0.1523591 -0.0000367 0.000066 -0.000161 0.000039 0.000040 0.0000050 0.0000125 0.000118 0.000101 2007 6 16 54267 0.178378 0.437120 -0.1522916 -0.0000378 0.000080 -0.000206 0.000039 0.000040 0.0000068 0.0000125 0.000112 0.000096 2007 6 17 54268 0.180311 0.435275 -0.1523014 0.0001058 0.000111 -0.000260 0.000039 0.000040 0.0000089 0.0000126 0.000099 0.000085 2007 6 18 54269 0.182523 0.433614 -0.1524924 0.0002618 0.000142 -0.000321 0.000038 0.000039 0.0000069 0.0000121 0.000087 0.000074 2007 6 19 54270 0.184792 0.431904 -0.1528766 0.0004641 0.000170 -0.000384 0.000037 0.000037 0.0000039 0.0000118 0.000074 0.000063 2007 6 20 54271 0.187187 0.430635 -0.1534303 0.0006458 0.000164 -0.000395 0.000037 0.000038 0.0000054 0.0000119 0.000067 0.000060 2007 6 21 54272 0.189378 0.429214 -0.1541236 0.0007432 0.000147 -0.000387 0.000038 0.000039 0.0000071 0.0000120 0.000060 0.000060 2007 6 22 54273 0.191573 0.427172 -0.1548873 0.0007568 0.000127 -0.000371 0.000038 0.000039 0.0000045 0.0000121 0.000054 0.000060 2007 6 23 54274 0.193638 0.424888 -0.1555884 0.0006878 0.000116 -0.000381 0.000039 0.000040 0.0000058 0.0000125 0.000054 0.000058 2007 6 24 54275 0.195722 0.422830 -0.1562037 0.0005820 0.000107 -0.000395 0.000042 0.000042 0.0000073 0.0000127 0.000058 0.000056 2007 6 25 54276 0.197993 0.420792 -0.1567183 0.0004709 0.000098 -0.000403 0.000042 0.000042 0.0000060 0.0000123 0.000060 0.000055 2007 6 26 54277 0.200756 0.419099 -0.1570982 0.0003262 0.000089 -0.000408 0.000040 0.000040 0.0000037 0.0000119 0.000064 0.000053 2007 6 27 54278 0.203282 0.417718 -0.1573300 0.0001656 0.000150 -0.000389 0.000039 0.000039 0.0000076 0.0000118 0.000029 0.000027 2007 6 28 54279 0.205231 0.416353 -0.1574184 0.0000412 0.000167 -0.000318 0.000039 0.000039 0.0000111 0.0000120 0.000032 0.000027 2007 6 29 54280 0.206743 0.414851 -0.1574081 -0.0000296 0.000140 -0.000256 0.000039 0.000040 0.0000071 0.0000121 0.000088 0.000132 2007 6 30 54281 0.207955 0.413277 -0.1573874 -0.0000640 0.000102 -0.000279 0.000040 0.000041 0.0000081 0.0000123 0.000093 0.000146 2007 7 1 54282 0.208667 0.411591 -0.1573282 0.0000114 0.000063 -0.000335 0.000040 0.000041 0.0000107 0.0000122 0.000076 0.000113 2007 7 2 54283 0.209148 0.409503 -0.1573954 0.0001748 0.000027 -0.000397 0.000038 0.000039 0.0000078 0.0000119 0.000057 0.000081 2007 7 3 54284 0.209776 0.407201 -0.1577279 0.0004324 -0.000006 -0.000459 0.000036 0.000037 0.0000023 0.0000116 0.000039 0.000048 2007 7 4 54285 0.210733 0.405063 -0.1582992 0.0006640 0.000020 -0.000546 0.000036 0.000037 0.0000019 0.0000117 0.000098 0.000073 2007 7 5 54286 0.211810 0.403024 -0.1590736 0.0008312 0.000059 -0.000526 0.000037 0.000038 0.0000029 0.0000116 0.000113 0.000103 2007 7 6 54287 0.213132 0.400819 -0.1599885 0.0009343 0.000099 -0.000465 0.000036 0.000038 0.0000039 0.0000116 0.000108 0.000129 2007 7 7 54288 0.214347 0.398611 -0.1609436 0.0009481 0.000093 -0.000433 0.000037 0.000039 0.0000084 0.0000119 0.000094 0.000117 2007 7 8 54289 0.215167 0.396254 -0.1618176 0.0007583 0.000068 -0.000411 0.000038 0.000039 0.0000088 0.0000114 0.000076 0.000090 2007 7 9 54290 0.215843 0.393704 -0.1624499 0.0004980 0.000039 -0.000387 0.000037 0.000038 0.0000057 0.0000107 0.000057 0.000063 2007 7 10 54291 0.216686 0.391045 -0.1627729 0.0002170 0.000008 -0.000363 0.000035 0.000036 0.0000020 0.0000104 0.000038 0.000036 2007 7 11 54292 0.217696 0.388252 -0.1628350 -0.0000258 0.000022 -0.000488 0.000034 0.000035 0.0000051 0.0000106 0.000024 0.000025 2007 7 12 54293 0.218496 0.385721 -0.1627151 -0.0001966 0.000036 -0.000448 0.000035 0.000036 0.0000095 0.0000107 0.000025 0.000027 2007 7 13 54294 0.219487 0.383102 -0.1624652 -0.0002842 0.000046 -0.000352 0.000035 0.000036 0.0000113 0.0000106 0.000031 0.000031 2007 7 14 54295 0.220791 0.380447 -0.1621636 -0.0002555 0.000024 -0.000357 0.000035 0.000037 0.0000101 0.0000108 0.000040 0.000037 2007 7 15 54296 0.222027 0.377823 -0.1619942 -0.0000967 -0.000008 -0.000403 0.000035 0.000037 0.0000084 0.0000101 0.000049 0.000044 2007 7 16 54297 0.223201 0.375355 -0.1619810 0.0000812 -0.000039 -0.000451 0.000034 0.000035 0.0000062 0.0000091 0.000058 0.000050 2007 7 17 54298 0.224564 0.372907 -0.1621530 0.0002454 -0.000065 -0.000501 0.000033 0.000035 0.0000022 0.0000091 0.000068 0.000057 2007 7 18 54299 0.225900 0.370451 -0.1624808 0.0003499 -0.000057 -0.000482 0.000033 0.000035 0.0000071 0.0000091 0.000078 0.000065 2007 7 19 54300 0.227087 0.367946 -0.1628825 0.0004093 -0.000034 -0.000444 0.000033 0.000035 0.0000113 0.0000091 0.000089 0.000074 2007 7 20 54301 0.227877 0.365360 -0.1632633 0.0003360 -0.000005 -0.000406 0.000034 0.000035 0.0000045 0.0000092 0.000099 0.000083 2007 7 21 54302 0.228543 0.362509 -0.1635526 0.0002363 0.000001 -0.000419 0.000035 0.000036 0.0000057 0.0000094 0.000093 0.000078 2007 7 22 54303 0.229147 0.359686 -0.1637170 0.0000873 0.000000 -0.000453 0.000036 0.000036 0.0000090 0.0000097 0.000081 0.000068 2007 7 23 54304 0.229727 0.356968 -0.1637157 -0.0000895 0.000004 -0.000484 0.000035 0.000035 0.0000071 0.0000097 0.000069 0.000059 2007 7 24 54305 0.230153 0.355035 -0.1635162 -0.0002743 0.000009 -0.000512 0.000033 0.000034 0.0000030 0.0000095 0.000057 0.000049 2007 7 25 54306 0.230252 0.352870 -0.1631221 -0.0004747 0.000057 -0.000508 0.000033 0.000035 0.0000065 0.0000095 0.000261 0.000538 2007 7 26 54307 0.230271 0.350603 -0.1625766 -0.0005957 0.000142 -0.000487 0.000034 0.000035 0.0000096 0.0000095 0.000234 0.000453 2007 7 27 54308 0.230082 0.348410 -0.1619543 -0.0006186 0.000228 -0.000459 0.000034 0.000036 0.0000036 0.0000096 0.000119 0.000154 2007 7 28 54309 0.229186 0.345796 -0.1613507 -0.0005467 0.000217 -0.000435 0.000035 0.000037 0.0000060 0.0000097 0.000082 0.000069 2007 7 29 54310 0.228567 0.342828 -0.1609283 -0.0003271 0.000161 -0.000414 0.000036 0.000038 0.0000090 0.0000104 0.000074 0.000062 2007 7 30 54311 0.228168 0.339979 -0.1607478 -0.0000737 0.000094 -0.000393 0.000035 0.000036 0.0000070 0.0000106 0.000066 0.000055 2007 7 31 54312 0.227612 0.337021 -0.1608235 0.0002135 0.000020 -0.000374 0.000033 0.000035 0.0000031 0.0000103 0.000058 0.000048 2007 8 1 54313 0.227077 0.334164 -0.1611753 0.0004761 0.000001 -0.000269 0.000033 0.000034 0.0000071 0.0000105 0.000043 0.000040 2007 8 2 54314 0.226656 0.331463 -0.1618072 0.0007015 -0.000040 -0.000294 0.000033 0.000034 0.0000107 0.0000104 0.000028 0.000028 2007 8 3 54315 0.226343 0.329080 -0.1626141 0.0008066 -0.000090 -0.000419 0.000033 0.000034 0.0000046 0.0000103 0.000084 0.000074 2007 8 4 54316 0.225970 0.326461 -0.1633424 0.0006911 -0.000101 -0.000433 0.000034 0.000035 0.0000081 0.0000106 0.000105 0.000091 2007 8 5 54317 0.225377 0.323593 -0.1639504 0.0004874 -0.000089 -0.000399 0.000034 0.000035 0.0000128 0.0000110 0.000107 0.000090 2007 8 6 54318 0.224141 0.320914 -0.1643159 0.0001968 -0.000065 -0.000364 0.000033 0.000034 0.0000102 0.0000108 0.000108 0.000089 2007 8 7 54319 0.222876 0.318462 -0.1643529 -0.0000851 -0.000034 -0.000329 0.000031 0.000032 0.0000045 0.0000107 0.000109 0.000088 2007 8 8 54320 0.221439 0.316022 -0.1641321 -0.0003133 0.000056 -0.000259 0.000031 0.000032 0.0000096 0.0000106 0.000088 0.000069 2007 8 9 54321 0.219705 0.313369 -0.1637396 -0.0004315 0.000156 -0.000185 0.000032 0.000033 0.0000138 0.0000106 0.000062 0.000046 2007 8 10 54322 0.218139 0.310856 -0.1632841 -0.0004433 0.000133 -0.000331 0.000032 0.000033 0.0000042 0.0000107 0.000054 0.000045 2007 8 11 54323 0.217302 0.308214 -0.1628999 -0.0003051 0.000093 -0.000380 0.000033 0.000034 0.0000064 0.0000110 0.000054 0.000048 2007 8 12 54324 0.216949 0.305710 -0.1627255 -0.0000721 0.000054 -0.000364 0.000036 0.000036 0.0000088 0.0000112 0.000055 0.000050 2007 8 13 54325 0.216685 0.303255 -0.1627401 0.0000741 0.000006 -0.000345 0.000036 0.000036 0.0000064 0.0000110 0.000056 0.000051 2007 8 14 54326 0.216284 0.301048 -0.1628867 0.0001795 -0.000046 -0.000323 0.000035 0.000036 0.0000025 0.0000110 0.000057 0.000052 2007 8 15 54327 0.215428 0.299030 -0.1631384 0.0002495 -0.000071 -0.000300 0.000036 0.000037 0.0000066 0.0000112 0.000068 0.000062 2007 8 16 54328 0.214172 0.297344 -0.1634081 0.0002541 -0.000084 -0.000278 0.000036 0.000037 0.0000103 0.0000112 0.000083 0.000073 2007 8 17 54329 0.212729 0.295461 -0.1636358 0.0002284 -0.000090 -0.000257 0.000036 0.000036 0.0000042 0.0000111 0.000097 0.000085 2007 8 18 54330 0.211570 0.292755 -0.1638501 0.0001897 -0.000088 -0.000252 0.000037 0.000037 0.0000062 0.0000114 0.000089 0.000077 2007 8 19 54331 0.210920 0.289907 -0.1639851 0.0000945 -0.000078 -0.000256 0.000036 0.000036 0.0000097 0.0000114 0.000071 0.000063 2007 8 20 54332 0.210428 0.286899 -0.1639883 -0.0000488 -0.000064 -0.000268 0.000033 0.000033 0.0000072 0.0000109 0.000053 0.000048 2007 8 21 54333 0.210284 0.284219 -0.1638460 -0.0002093 -0.000048 -0.000285 0.000031 0.000032 0.0000020 0.0000106 0.000036 0.000033 2007 8 22 54334 0.209624 0.282027 -0.1635525 -0.0003649 -0.000049 -0.000315 0.000032 0.000032 0.0000071 0.0000106 0.000039 0.000035 2007 8 23 54335 0.208382 0.279627 -0.1631162 -0.0004481 -0.000057 -0.000349 0.000032 0.000032 0.0000116 0.0000106 0.000048 0.000041 2007 8 24 54336 0.206603 0.277322 -0.1626067 -0.0004860 -0.000069 -0.000381 0.000033 0.000033 0.0000040 0.0000106 0.000056 0.000047 2007 8 25 54337 0.204784 0.274940 -0.1621772 -0.0003663 -0.000068 -0.000396 0.000034 0.000035 0.0000080 0.0000111 0.000056 0.000049 2007 8 26 54338 0.203039 0.272523 -0.1618969 -0.0001535 -0.000066 -0.000400 0.000037 0.000036 0.0000148 0.0000114 0.000054 0.000047 2007 8 27 54339 0.201826 0.270315 -0.1618765 0.0001493 -0.000070 -0.000395 0.000037 0.000036 0.0000119 0.0000109 0.000051 0.000046 2007 8 28 54340 0.200964 0.268564 -0.1621998 0.0004572 -0.000078 -0.000381 0.000035 0.000034 0.0000047 0.0000105 0.000048 0.000045 2007 8 29 54341 0.200102 0.266958 -0.1628430 0.0007434 -0.000120 -0.000363 0.000035 0.000034 0.0000091 0.0000105 0.000062 0.000056 2007 8 30 54342 0.199408 0.265438 -0.1637193 0.0009405 -0.000169 -0.000340 0.000035 0.000034 0.0000133 0.0000106 0.000081 0.000071 2007 8 31 54343 0.198692 0.263764 -0.1646950 0.0009827 -0.000211 -0.000315 0.000036 0.000035 0.0000047 0.0000107 0.000100 0.000085 2007 9 1 54344 0.197889 0.261802 -0.1656257 0.0008779 -0.000229 -0.000274 0.000037 0.000036 0.0000089 0.0000109 0.000113 0.000090 2007 9 2 54345 0.196728 0.259809 -0.1663916 0.0006356 -0.000228 -0.000233 0.000038 0.000036 0.0000098 0.0000101 0.000125 0.000091 2007 9 3 54346 0.195372 0.257715 -0.1668880 0.0003654 -0.000214 -0.000196 0.000036 0.000034 0.0000065 0.0000087 0.000136 0.000093 2007 9 4 54347 0.194058 0.255859 -0.1671151 0.0001322 -0.000189 -0.000168 0.000035 0.000034 0.0000037 0.0000085 0.000146 0.000094 2007 9 5 54348 0.192607 0.253720 -0.1671802 0.0000259 -0.000089 -0.000226 0.000034 0.000034 0.0000012 0.0000088 0.000047 0.000038 2007 9 6 54349 0.190661 0.251812 -0.1672233 0.0000563 -0.000025 -0.000224 0.000034 0.000034 0.0000011 0.0000087 0.000039 0.000036 2007 9 7 54350 0.188489 0.249659 -0.1673534 0.0001966 0.000025 -0.000206 0.000034 0.000034 0.0000016 0.0000086 0.000054 0.000050 2007 9 8 54351 0.186962 0.247674 -0.1676392 0.0004029 0.000047 -0.000217 0.000036 0.000035 0.0000082 0.0000089 0.000052 0.000048 2007 9 9 54352 0.185578 0.245984 -0.1681456 0.0005962 0.000050 -0.000235 0.000035 0.000034 0.0000103 0.0000093 0.000044 0.000040 2007 9 10 54353 0.184334 0.244362 -0.1688568 0.0007598 0.000036 -0.000246 0.000031 0.000031 0.0000141 0.0000094 0.000035 0.000033 2007 9 11 54354 0.182894 0.242540 -0.1697096 0.0008647 0.000010 -0.000249 0.000030 0.000030 0.0000185 0.0000093 0.000027 0.000026 2007 9 12 54355 0.181069 0.240476 -0.1706217 0.0009202 0.000024 -0.000239 0.000030 0.000030 0.0000187 0.0000093 0.000021 0.000021 2007 9 13 54356 0.179307 0.238380 -0.1715315 0.0009282 -0.000044 -0.000175 0.000030 0.000030 0.0000157 0.0000093 0.000017 0.000020 2007 9 14 54357 0.177356 0.236321 -0.1724365 0.0008207 -0.000163 -0.000087 0.000030 0.000030 0.0000050 0.0000093 0.000079 0.000094 2007 9 15 54358 0.175171 0.234163 -0.1732356 0.0007118 -0.000205 -0.000050 0.000031 0.000030 0.0000105 0.0000096 0.000091 0.000107 2007 9 16 54359 0.172387 0.232226 -0.1738623 0.0005471 -0.000206 -0.000040 0.000032 0.000032 0.0000124 0.0000105 0.000076 0.000088 2007 9 17 54360 0.169684 0.230225 -0.1743491 0.0004297 -0.000192 -0.000041 0.000032 0.000032 0.0000077 0.0000110 0.000061 0.000068 2007 9 18 54361 0.167291 0.228502 -0.1747133 0.0002933 -0.000164 -0.000056 0.000030 0.000031 0.0000022 0.0000109 0.000046 0.000049 2007 9 19 54362 0.165214 0.226588 -0.1749552 0.0002279 -0.000177 -0.000029 0.000030 0.000030 0.0000090 0.0000108 0.000135 0.000176 2007 9 20 54363 0.163178 0.224739 -0.1751740 0.0002690 -0.000092 -0.000092 0.000030 0.000030 0.0000148 0.0000106 0.000125 0.000159 2007 9 21 54364 0.160541 0.222912 -0.1754809 0.0003503 0.000021 -0.000190 0.000030 0.000031 0.0000043 0.0000108 0.000077 0.000086 2007 9 22 54365 0.157614 0.221033 -0.1759207 0.0005468 0.000054 -0.000237 0.000030 0.000031 0.0000093 0.0000112 0.000062 0.000063 2007 9 23 54366 0.154794 0.219556 -0.1766020 0.0008170 0.000047 -0.000261 0.000034 0.000035 0.0000105 0.0000112 0.000058 0.000057 2007 9 24 54367 0.151731 0.217971 -0.1775422 0.0010805 0.000026 -0.000277 0.000036 0.000037 0.0000065 0.0000108 0.000054 0.000051 2007 9 25 54368 0.149038 0.216233 -0.1787880 0.0014439 -0.000007 -0.000283 0.000034 0.000035 0.0000024 0.0000106 0.000051 0.000045 2007 9 26 54369 0.146593 0.214832 -0.1803858 0.0016875 -0.000083 -0.000275 0.000034 0.000035 0.0000131 0.0000106 0.000072 0.000065 2007 9 27 54370 0.144021 0.212963 -0.1821284 0.0017032 -0.000167 -0.000257 0.000034 0.000035 0.0000217 0.0000107 0.000101 0.000090 2007 9 28 54371 0.141570 0.211104 -0.1837531 0.0015425 -0.000243 -0.000232 0.000034 0.000036 0.0000070 0.0000110 0.000130 0.000116 2007 9 29 54372 0.138668 0.209499 -0.1851632 0.0012827 -0.000240 -0.000208 0.000035 0.000037 0.0000084 0.0000112 0.000119 0.000107 2007 9 30 54373 0.136108 0.207710 -0.1862953 0.0009820 -0.000196 -0.000184 0.000032 0.000033 0.0000153 0.0000111 0.000094 0.000085 2007 10 1 54374 0.133642 0.206412 -0.1871188 0.0007047 -0.000138 -0.000161 0.000027 0.000029 0.0000117 0.0000107 0.000068 0.000064 2007 10 2 54375 0.130549 0.205211 -0.1877115 0.0005482 -0.000070 -0.000139 0.000027 0.000028 0.0000029 0.0000106 0.000043 0.000042 2007 10 3 54376 0.127579 0.203917 -0.1882182 0.0005268 -0.000022 -0.000133 0.000027 0.000028 0.0000020 0.0000106 0.000097 0.000092 2007 10 4 54377 0.124559 0.202842 -0.1887492 0.0005553 0.000018 -0.000131 0.000027 0.000028 0.0000030 0.0000102 0.000173 0.000160 2007 10 5 54378 0.121552 0.201577 -0.1893653 0.0006597 0.000049 -0.000132 0.000027 0.000028 0.0000041 0.0000101 0.000249 0.000229 2007 10 6 54379 0.118617 0.200468 -0.1900915 0.0007850 0.000062 -0.000125 0.000027 0.000029 0.0000074 0.0000103 0.000235 0.000215 2007 10 7 54380 0.115677 0.199296 -0.1909558 0.0009177 0.000058 -0.000114 0.000026 0.000027 0.0000139 0.0000099 0.000189 0.000172 2007 10 8 54381 0.112855 0.198178 -0.1919415 0.0010329 0.000041 -0.000105 0.000023 0.000024 0.0000117 0.0000093 0.000142 0.000128 2007 10 9 54382 0.109772 0.197509 -0.1929873 0.0010574 0.000013 -0.000096 0.000023 0.000023 0.0000065 0.0000093 0.000095 0.000084 2007 10 10 54383 0.106664 0.196705 -0.1940611 0.0011008 -0.000021 -0.000089 0.000022 0.000023 0.0000021 0.0000093 0.000049 0.000040 2007 10 11 54384 0.103301 0.195917 -0.1951414 0.0010532 -0.000122 -0.000080 0.000022 0.000023 0.0000017 0.0000091 0.000021 0.000022 2007 10 12 54385 0.100231 0.194948 -0.1961571 0.0009275 -0.000167 -0.000040 0.000022 0.000023 0.0000024 0.0000089 0.000101 0.000102 2007 10 13 54386 0.097534 0.194249 -0.1970241 0.0007821 -0.000171 -0.000042 0.000022 0.000023 0.0000062 0.0000090 0.000117 0.000116 2007 10 14 54387 0.094890 0.193508 -0.1976945 0.0005905 -0.000159 -0.000067 0.000026 0.000026 0.0000106 0.0000091 0.000099 0.000097 2007 10 15 54388 0.092057 0.192906 -0.1982262 0.0004630 -0.000137 -0.000096 0.000028 0.000029 0.0000113 0.0000092 0.000080 0.000078 2007 10 16 54389 0.088965 0.192523 -0.1986575 0.0004006 -0.000108 -0.000129 0.000028 0.000029 0.0000085 0.0000091 0.000061 0.000058 2007 10 17 54390 0.085864 0.192080 -0.1990340 0.0004275 -0.000073 -0.000161 0.000028 0.000028 0.0000024 0.0000089 0.000043 0.000039 2007 10 18 54391 0.083020 0.191808 -0.1994751 0.0005046 -0.000049 -0.000205 0.000028 0.000028 0.0000020 0.0000091 0.000070 0.000083 2007 10 19 54392 0.079872 0.191411 -0.2000378 0.0006465 -0.000051 -0.000208 0.000028 0.000029 0.0000032 0.0000092 0.000150 0.000153 2007 10 20 54393 0.076682 0.190963 -0.2007483 0.0008548 -0.000054 -0.000206 0.000029 0.000030 0.0000077 0.0000093 0.000150 0.000148 2007 10 21 54394 0.073409 0.190477 -0.2016753 0.0010285 -0.000056 -0.000202 0.000032 0.000033 0.0000121 0.0000096 0.000117 0.000115 2007 10 22 54395 0.070790 0.190068 -0.2028272 0.0012591 -0.000064 -0.000191 0.000033 0.000033 0.0000090 0.0000096 0.000084 0.000081 2007 10 23 54396 0.068615 0.190111 -0.2042169 0.0015281 -0.000076 -0.000176 0.000032 0.000032 0.0000026 0.0000096 0.000051 0.000048 2007 10 24 54397 0.066464 0.190334 -0.2058375 0.0016937 -0.000056 -0.000120 0.000032 0.000032 0.0000069 0.0000096 0.000039 0.000036 2007 10 25 54398 0.064097 0.190374 -0.2075312 0.0016209 -0.000027 -0.000056 0.000032 0.000031 0.0000113 0.0000094 0.000032 0.000030 2007 10 26 54399 0.061621 0.190035 -0.2090619 0.0013830 -0.000089 -0.000100 0.000032 0.000032 0.0000047 0.0000095 0.000108 0.000109 2007 10 27 54400 0.058847 0.190141 -0.2102336 0.0009955 -0.000120 -0.000116 0.000033 0.000033 0.0000063 0.0000097 0.000116 0.000118 2007 10 28 54401 0.056248 0.190150 -0.2110456 0.0006981 -0.000124 -0.000111 0.000043 0.000043 0.0000111 0.0000094 0.000089 0.000089 2007 10 29 54402 0.053450 0.190374 -0.2116465 0.0005284 -0.000122 -0.000112 0.000050 0.000051 0.0000084 0.0000086 0.000062 0.000061 2007 10 30 54403 0.050657 0.190593 -0.2121547 0.0004864 -0.000114 -0.000115 0.000047 0.000048 0.0000020 0.0000084 0.000035 0.000033 2007 10 31 54404 0.047807 0.190934 -0.2126391 0.0005239 -0.000013 -0.000110 0.000047 0.000048 0.0000021 0.0000083 0.000093 0.000090 2007 11 1 54405 0.044802 0.190968 -0.2132007 0.0006015 0.000024 -0.000129 0.000048 0.000049 0.0000032 0.0000082 0.000105 0.000102 2007 11 2 54406 0.042326 0.191031 -0.2138986 0.0007602 0.000025 -0.000152 0.000049 0.000050 0.0000042 0.0000086 0.000092 0.000088 2007 11 3 54407 0.040299 0.191393 -0.2147339 0.0009140 0.000022 -0.000166 0.000050 0.000051 0.0000053 0.0000087 0.000079 0.000075 2007 11 4 54408 0.038287 0.192083 -0.2157192 0.0010045 0.000011 -0.000168 0.000055 0.000056 0.0000064 0.0000094 0.000066 0.000061 2007 11 5 54409 0.035913 0.192542 -0.2167596 0.0010192 -0.000005 -0.000161 0.000057 0.000057 0.0000046 0.0000101 0.000053 0.000048 2007 11 6 54410 0.034034 0.192710 -0.2177909 0.0010379 -0.000027 -0.000147 0.000052 0.000052 0.0000016 0.0000097 0.000039 0.000034 2007 11 7 54411 0.032337 0.193084 -0.2188507 0.0010592 -0.000017 0.000099 0.000051 0.000051 0.0000042 0.0000095 0.000042 0.000039 2007 11 8 54412 0.030201 0.193182 -0.2199011 0.0009943 -0.000034 0.000224 0.000053 0.000054 0.0000067 0.0000097 0.000046 0.000041 2007 11 9 54413 0.027845 0.193415 -0.2208470 0.0008504 -0.000057 0.000144 0.000054 0.000055 0.0000034 0.0000099 0.000097 0.000088 2007 11 10 54414 0.025297 0.193403 -0.2215897 0.0006381 -0.000071 0.000097 0.000056 0.000056 0.0000078 0.0000099 0.000096 0.000089 2007 11 11 54415 0.022788 0.193494 -0.2221694 0.0004914 -0.000080 0.000075 0.000055 0.000056 0.0000124 0.0000096 0.000072 0.000066 2007 11 12 54416 0.020048 0.194093 -0.2225887 0.0003641 -0.000083 0.000044 0.000051 0.000053 0.0000099 0.0000091 0.000047 0.000044 2007 11 13 54417 0.016992 0.194641 -0.2229075 0.0003289 -0.000083 0.000011 0.000049 0.000050 0.0000062 0.0000091 0.000023 0.000021 2007 11 14 54418 0.014110 0.194867 -0.2232626 0.0003912 -0.000080 0.000045 0.000049 0.000049 0.0000068 0.0000091 0.000039 0.000039 2007 11 15 54419 0.011131 0.195417 -0.2237498 0.0005860 -0.000029 0.000100 0.000049 0.000050 0.0000051 0.0000090 0.000043 0.000044 2007 11 16 54420 0.007934 0.196021 -0.2244471 0.0008663 0.000042 0.000130 0.000049 0.000051 0.0000035 0.0000089 0.000164 0.000151 2007 11 17 54421 0.004603 0.196329 -0.2254121 0.0011235 0.000038 0.000104 0.000051 0.000052 0.0000075 0.0000089 0.000171 0.000157 2007 11 18 54422 0.001420 0.196935 -0.2266925 0.0014098 0.000003 0.000063 0.000055 0.000055 0.0000112 0.0000088 0.000123 0.000112 2007 11 19 54423 -0.001540 0.198092 -0.2282755 0.0017007 -0.000033 0.000023 0.000057 0.000057 0.0000090 0.0000087 0.000073 0.000067 2007 11 20 54424 -0.004170 0.199343 -0.2301000 0.0019269 -0.000068 -0.000014 0.000054 0.000054 0.0000051 0.0000087 0.000024 0.000023 2007 11 21 54425 -0.006931 0.200727 -0.2320770 0.0019880 -0.000061 0.000019 0.000053 0.000054 0.0000033 0.0000087 0.000170 0.000139 2007 11 22 54426 -0.009434 0.202194 -0.2340882 0.0019235 -0.000012 0.000073 0.000055 0.000055 0.0000042 0.0000086 0.000185 0.000181 2007 11 23 54427 -0.011855 0.203741 -0.2359611 0.0017155 0.000052 0.000127 0.000056 0.000056 0.0000061 0.0000085 0.000133 0.000178 2007 11 24 54428 -0.014831 0.204426 -0.2375404 0.0014174 0.000057 0.000106 0.000058 0.000058 0.0000080 0.0000085 0.000111 0.000145 2007 11 25 54429 -0.018109 0.204807 -0.2387708 0.0011084 0.000065 0.000079 0.000062 0.000061 0.0000128 0.0000087 0.000088 0.000112 2007 11 26 54430 -0.020854 0.205098 -0.2397656 0.0009360 0.000074 0.000048 0.000062 0.000062 0.0000099 0.0000087 0.000066 0.000079 2007 11 27 54431 -0.022937 0.205827 -0.2406821 0.0009137 0.000080 0.000012 0.000058 0.000058 0.0000023 0.0000085 0.000043 0.000046 2007 11 28 54432 -0.025292 0.206908 -0.2416430 0.0010341 0.000073 0.000006 0.000056 0.000056 0.0000009 0.0000084 0.000023 0.000021 2007 11 29 54433 -0.027238 0.208121 -0.2427518 0.0012234 0.000147 -0.000015 0.000058 0.000058 0.0000011 0.0000084 0.000066 0.000054 2007 11 30 54434 -0.028654 0.209483 -0.2440575 0.0014141 0.000239 -0.000040 0.000060 0.000060 0.0000013 0.0000082 0.000126 0.000104 2007 12 1 54435 -0.029571 0.211038 -0.2455426 0.0015403 0.000220 -0.000055 0.000062 0.000062 0.0000057 0.0000084 0.000121 0.000100 2007 12 2 54436 -0.030665 0.212616 -0.2471207 0.0015981 0.000154 -0.000062 0.000061 0.000060 0.0000088 0.0000094 0.000091 0.000075 2007 12 3 54437 -0.032011 0.214108 -0.2487223 0.0015768 0.000081 -0.000062 0.000057 0.000057 0.0000063 0.0000101 0.000062 0.000051 2007 12 4 54438 -0.033982 0.215819 -0.2502501 0.0014303 0.000005 -0.000057 0.000054 0.000055 0.0000017 0.0000100 0.000033 0.000027 2007 12 5 54439 -0.036745 0.217099 -0.2515831 0.0012072 -0.000037 0.000004 0.000054 0.000054 0.0000078 0.0000101 0.000188 0.000198 2007 12 6 54440 -0.039638 0.218546 -0.2526674 0.0009601 -0.000035 0.000035 0.000055 0.000054 0.0000135 0.0000101 0.000072 0.000074 2007 12 7 54441 -0.042381 0.219779 -0.2534954 0.0006958 -0.000013 0.000018 0.000054 0.000054 0.0000066 0.0000102 0.000251 0.000218 2007 12 8 54442 -0.044496 0.221118 -0.2540766 0.0004568 -0.000014 0.000003 0.000057 0.000057 0.0000063 0.0000103 0.000278 0.000243 2007 12 9 54443 -0.046267 0.222350 -0.2544414 0.0002763 -0.000021 -0.000005 0.000052 0.000052 0.0000065 0.0000105 0.000202 0.000177 2007 12 10 54444 -0.047646 0.223936 -0.2546488 0.0001917 -0.000026 -0.000017 0.000044 0.000045 0.0000043 0.0000103 0.000126 0.000111 2007 12 11 54445 -0.049102 0.225443 -0.2548073 0.0001863 -0.000031 -0.000029 0.000042 0.000043 0.0000014 0.0000100 0.000050 0.000045 2007 12 12 54446 -0.050276 0.226607 -0.2550371 0.0003122 0.000014 0.000053 0.000043 0.000043 0.0000054 0.0000102 0.000106 0.000152 2007 12 13 54447 -0.051597 0.227743 -0.2553923 0.0004504 0.000051 0.000082 0.000044 0.000045 0.0000089 0.0000104 0.000053 0.000062 2007 12 14 54448 -0.053127 0.228791 -0.2559056 0.0006382 -0.000018 -0.000005 0.000044 0.000045 0.0000035 0.0000105 0.000087 0.000073 2007 12 15 54449 -0.054631 0.230211 -0.2566352 0.0008512 -0.000067 -0.000027 0.000046 0.000046 0.0000068 0.0000107 0.000094 0.000079 2007 12 16 54450 -0.056161 0.231783 -0.2576207 0.0011189 -0.000095 -0.000014 0.000043 0.000043 0.0000070 0.0000108 0.000075 0.000063 2007 12 17 54451 -0.057527 0.233337 -0.2588261 0.0012931 -0.000119 -0.000004 0.000038 0.000038 0.0000041 0.0000105 0.000056 0.000046 2007 12 18 54452 -0.058887 0.235019 -0.2601477 0.0013436 -0.000136 0.000004 0.000036 0.000036 0.0000012 0.0000102 0.000037 0.000030 2007 12 19 54453 -0.060001 0.236260 -0.2614623 0.0013230 -0.000121 0.000003 0.000036 0.000036 0.0000056 0.0000103 0.000076 0.000070 2007 12 20 54454 -0.060997 0.237697 -0.2627168 0.0011910 -0.000093 0.000000 0.000038 0.000037 0.0000096 0.0000106 0.000132 0.000125 2007 12 21 54455 -0.061813 0.239239 -0.2638291 0.0009286 -0.000060 0.000001 0.000037 0.000037 0.0000055 0.0000108 0.000187 0.000180 2007 12 22 54456 -0.062729 0.241028 -0.2646238 0.0006512 -0.000029 -0.000059 0.000038 0.000038 0.0000093 0.0000106 0.000185 0.001348 2007 12 23 54457 -0.063814 0.242618 -0.2651969 0.0005112 -0.000002 -0.000119 0.000087 0.000086 0.0000107 0.0000110 0.000162 0.002605 2007 12 24 54458 -0.065266 0.244465 -0.2656808 0.0004976 0.000019 -0.000093 0.000131 0.000131 0.0000087 0.0000112 0.000139 0.002002 2007 12 25 54459 -0.067300 0.246084 -0.2661803 0.0005863 0.000032 -0.000054 0.000129 0.000132 0.0000064 0.0000110 0.000116 0.001398 2007 12 26 54460 -0.069525 0.247633 -0.2668077 0.0007409 0.000036 -0.000005 0.000129 0.000131 0.0000040 0.0000107 0.000093 0.000794 2007 12 27 54461 -0.071270 0.249064 -0.2676214 0.0009187 0.000034 0.000049 0.000116 0.000121 0.0000017 0.0000106 0.000070 0.000190 2007 12 28 54462 -0.072908 0.250944 -0.2686186 0.0010875 -0.000102 0.000232 0.000111 0.000117 0.0000030 0.0000106 0.000134 0.000132 2007 12 29 54463 -0.074778 0.252711 -0.2697525 0.0012129 -0.000146 0.000300 0.000125 0.000127 0.0000033 0.0000108 0.000143 0.000141 2007 12 30 54464 -0.076381 0.254725 -0.2709529 0.0012347 -0.000136 0.000300 0.000102 0.000104 0.0000028 0.0000110 0.000123 0.000122 2007 12 31 54465 -0.078586 0.256918 -0.2721477 0.0011248 -0.000117 0.000280 0.000068 0.000071 0.0000023 0.0000104 0.000103 0.000103 2008 1 1 54466 -0.080464 0.258320 -0.2732775 0.0010367 -0.000088 0.000240 0.000064 0.000068 0.0000018 0.0000101 0.000082 0.000084 2008 1 2 54467 -0.081856 0.260081 -0.2742999 0.0009216 -0.000049 0.000189 0.000064 0.000068 0.0000013 0.0000102 0.000062 0.000065 2008 1 3 54468 -0.083358 0.261871 -0.2751926 0.0008036 -0.000006 0.000131 0.000062 0.000066 0.0000008 0.0000104 0.000042 0.000046 2008 1 4 54469 -0.085518 0.263835 -0.2759536 0.0006877 0.000066 -0.000067 0.000064 0.000068 0.0000016 0.0000108 0.000141 0.000121 2008 1 5 54470 -0.087890 0.265471 -0.2766053 0.0006129 0.000086 -0.000102 0.000070 0.000073 0.0000058 0.0000110 0.000154 0.000129 2008 1 6 54471 -0.090223 0.267150 -0.2772051 0.0005506 0.000080 -0.000050 0.000067 0.000070 0.0000089 0.0000112 0.000124 0.000103 2008 1 7 54472 -0.092581 0.268748 -0.2777451 0.0005309 0.000068 0.000017 0.000060 0.000064 0.0000065 0.0000110 0.000093 0.000076 2008 1 8 54473 -0.094394 0.270626 -0.2782570 0.0005583 0.000048 0.000095 0.000057 0.000060 0.0000020 0.0000108 0.000062 0.000049 2008 1 9 54474 -0.096001 0.272571 -0.2788396 0.0006528 0.000061 0.000160 0.000058 0.000061 0.0000021 0.0000110 0.000084 0.000815 2008 1 10 54475 -0.097620 0.274912 -0.2795634 0.0008238 0.000077 0.000156 0.000059 0.000062 0.0000034 0.0000109 0.000121 0.000710 2008 1 11 54476 -0.099539 0.277459 -0.2804686 0.0009786 0.000086 0.000125 0.000057 0.000060 0.0000047 0.0000107 0.000158 0.000267 2008 1 12 54477 -0.101583 0.280079 -0.2815661 0.0011675 0.000073 0.000108 0.000058 0.000061 0.0000070 0.0000108 0.000146 0.000127 2008 1 13 54478 -0.103393 0.282793 -0.2828298 0.0013311 0.000050 0.000093 0.000066 0.000069 0.0000097 0.0000120 0.000117 0.000098 2008 1 14 54479 -0.104962 0.285707 -0.2841949 0.0014106 0.000025 0.000073 0.000068 0.000071 0.0000077 0.0000128 0.000087 0.000070 2008 1 15 54480 -0.106900 0.288630 -0.2855842 0.0013662 0.000002 0.000050 0.000064 0.000066 0.0000032 0.0000125 0.000057 0.000042 2008 1 16 54481 -0.108869 0.290995 -0.2869051 0.0011957 -0.000046 0.000045 0.000065 0.000066 0.0000053 0.0000127 0.000054 0.000048 2008 1 17 54482 -0.110421 0.292914 -0.2880052 0.0009305 -0.000093 0.000045 0.000067 0.000069 0.0000078 0.0000130 0.000058 0.000063 2008 1 18 54483 -0.112149 0.294952 -0.2887974 0.0006619 -0.000094 0.000061 0.000067 0.000070 0.0000049 0.0000131 0.000194 0.000161 2008 1 19 54484 -0.113954 0.297067 -0.2893639 0.0004639 -0.000064 0.000061 0.000069 0.000072 0.0000064 0.0000134 0.000234 0.000245 2008 1 20 54485 -0.115065 0.299162 -0.2898046 0.0004241 -0.000020 0.000056 0.000070 0.000072 0.0000065 0.0000124 0.000221 0.000314 2008 1 21 54486 -0.115072 0.301583 -0.2902450 0.0005264 0.000029 0.000052 0.000066 0.000068 0.0000051 0.0000112 0.000208 0.000383 2008 1 22 54487 -0.115070 0.304414 -0.2908253 0.0007038 0.000080 0.000050 0.000064 0.000066 0.0000036 0.0000110 0.000176 0.000425 2008 1 23 54488 -0.115364 0.306728 -0.2916465 0.0009749 0.000126 0.000016 0.000063 0.000064 0.0000022 0.0000110 0.000073 0.000101 2008 1 24 54489 -0.115870 0.308978 -0.2927443 0.0012242 0.000156 0.000016 0.000060 0.000063 0.0000017 0.0000111 0.000024 0.000022 2008 1 25 54490 -0.116616 0.311492 -0.2940869 0.0014188 0.000192 0.000055 0.000060 0.000063 0.0000016 0.0000110 0.000054 0.000043 2008 1 26 54491 -0.117458 0.313844 -0.2955879 0.0015124 0.000185 0.000077 0.000064 0.000066 0.0000066 0.0000110 0.000062 0.000048 2008 1 27 54492 -0.117809 0.316452 -0.2971151 0.0015010 0.000158 0.000091 0.000060 0.000062 0.0000083 0.0000103 0.000055 0.000043 2008 1 28 54493 -0.117978 0.319295 -0.2985989 0.0014300 0.000128 0.000102 0.000054 0.000056 0.0000054 0.0000093 0.000048 0.000037 2008 1 29 54494 -0.118459 0.321778 -0.2999606 0.0012439 0.000098 0.000112 0.000052 0.000054 0.0000016 0.0000093 0.000040 0.000032 2008 1 30 54495 -0.119136 0.324037 -0.3011051 0.0010320 0.000134 0.000152 0.000053 0.000055 0.0000196 0.0000095 0.000465 0.000112 2008 1 31 54496 -0.119602 0.326446 -0.3020167 0.0007998 0.000187 0.000189 0.000053 0.000056 0.0000332 0.0000094 0.000902 0.000196 2008 2 1 54497 -0.119665 0.329120 -0.3027490 0.0006553 0.000245 0.000150 0.000053 0.000055 0.0000079 0.0000093 0.000241 0.000082 2008 2 2 54498 -0.119511 0.332313 -0.3033921 0.0005975 0.000245 0.000126 0.000054 0.000056 0.0000080 0.0000095 0.000056 0.000047 2008 2 3 54499 -0.119824 0.335573 -0.3039673 0.0005629 0.000219 0.000106 0.000058 0.000059 0.0000080 0.0000092 0.000050 0.000042 2008 2 4 54500 -0.120509 0.338316 -0.3045363 0.0006231 0.000187 0.000083 0.000059 0.000060 0.0000044 0.0000087 0.000043 0.000036 2008 2 5 54501 -0.120816 0.341137 -0.3052072 0.0007868 0.000150 0.000062 0.000057 0.000057 0.0000014 0.0000087 0.000037 0.000031 2008 2 6 54502 -0.121269 0.343992 -0.3060684 0.0009843 0.000113 0.000059 0.000056 0.000056 0.0000108 0.0000087 0.000026 0.000024 2008 2 7 54503 -0.122031 0.346859 -0.3071557 0.0012057 0.000113 0.000081 0.000057 0.000058 0.0000181 0.0000087 0.000070 0.000085 2008 2 8 54504 -0.122812 0.349411 -0.3084654 0.0014344 0.000168 0.000024 0.000057 0.000057 0.0000046 0.0000087 0.000067 0.000063 2008 2 9 54505 -0.123509 0.351951 -0.3099706 0.0015576 0.000130 0.000012 0.000058 0.000058 0.0000063 0.0000088 0.000061 0.000048 2008 2 10 54506 -0.123951 0.354818 -0.3115566 0.0016313 0.000059 0.000027 0.000059 0.000058 0.0000083 0.0000087 0.000062 0.000047 2008 2 11 54507 -0.124725 0.357627 -0.3131968 0.0016260 -0.000005 0.000039 0.000057 0.000056 0.0000060 0.0000083 0.000063 0.000046 2008 2 12 54508 -0.125594 0.359896 -0.3148087 0.0014471 -0.000059 0.000048 0.000054 0.000053 0.0000028 0.0000080 0.000063 0.000045 2008 2 13 54509 -0.126082 0.361878 -0.3162252 0.0012312 0.000005 0.000068 0.000054 0.000053 0.0000018 0.0000079 0.000049 0.000049 2008 2 14 54510 -0.125701 0.364387 -0.3173649 0.0010159 0.000110 0.000050 0.000055 0.000054 0.0000015 0.0000079 0.000045 0.000050 2008 2 15 54511 -0.125289 0.367099 -0.3182364 0.0007625 0.000183 -0.000029 0.000056 0.000055 0.0000011 0.0000081 0.000043 0.000045 2008 2 16 54512 -0.125246 0.369414 -0.3189132 0.0005954 0.000198 -0.000092 0.000056 0.000055 0.0000068 0.0000082 0.000080 0.000097 2008 2 17 54513 -0.125705 0.371378 -0.3194692 0.0005554 0.000195 -0.000136 0.000055 0.000054 0.0000083 0.0000080 0.000131 0.000171 2008 2 18 54514 -0.126424 0.373941 -0.3200716 0.0006872 0.000190 -0.000169 0.000053 0.000052 0.0000093 0.0000078 0.000182 0.000244 2008 2 19 54515 -0.126916 0.376709 -0.3208759 0.0009386 0.000184 -0.000189 0.000052 0.000051 0.0000082 0.0000075 0.000234 0.000318 2008 2 20 54516 -0.127148 0.379552 -0.3219231 0.0011466 0.000204 -0.000070 0.000051 0.000050 0.0000025 0.0000076 0.000084 0.000090 2008 2 21 54517 -0.127387 0.382093 -0.3231638 0.0013094 0.000292 0.000020 0.000050 0.000049 0.0000012 0.0000075 0.000028 0.000020 2008 2 22 54518 -0.127355 0.384908 -0.3244993 0.0013403 0.000335 0.000025 0.000050 0.000050 0.0000011 0.0000073 0.000062 0.000057 2008 2 23 54519 -0.127480 0.387795 -0.3258270 0.0013149 0.000332 0.000047 0.000053 0.000052 0.0000075 0.0000075 0.000073 0.000068 2008 2 24 54520 -0.127168 0.390874 -0.3271058 0.0012099 0.000318 0.000078 0.000049 0.000048 0.0000082 0.0000070 0.000069 0.000062 2008 2 25 54521 -0.126884 0.393793 -0.3282805 0.0010914 0.000301 0.000103 0.000043 0.000042 0.0000049 0.0000063 0.000065 0.000057 2008 2 26 54522 -0.126302 0.396414 -0.3292794 0.0008783 0.000282 0.000114 0.000041 0.000040 0.0000017 0.0000063 0.000061 0.000052 2008 2 27 54523 -0.125445 0.398929 -0.3300562 0.0006495 0.000293 0.000175 0.000041 0.000040 0.0000075 0.0000063 0.000066 0.000067 2008 2 28 54524 -0.124110 0.401583 -0.3306091 0.0004546 0.000313 0.000143 0.000041 0.000041 0.0000121 0.0000062 0.000062 0.000064 2008 2 29 54525 -0.122871 0.404034 -0.3309693 0.0002955 0.000333 0.000072 0.000041 0.000041 0.0000035 0.0000061 0.000056 0.000054 2008 3 1 54526 -0.121291 0.406701 -0.3311906 0.0002267 0.000338 0.000024 0.000042 0.000042 0.0000102 0.0000063 0.000049 0.000046 2008 3 2 54527 -0.120139 0.409775 -0.3314318 0.0002654 0.000335 -0.000014 0.000045 0.000045 0.0000126 0.0000069 0.000041 0.000038 2008 3 3 54528 -0.119076 0.412662 -0.3317575 0.0003873 0.000328 -0.000050 0.000045 0.000044 0.0000076 0.0000070 0.000032 0.000030 2008 3 4 54529 -0.118104 0.415893 -0.3322327 0.0005993 0.000319 -0.000081 0.000042 0.000041 0.0000016 0.0000068 0.000024 0.000022 2008 3 5 54530 -0.117007 0.418921 -0.3329699 0.0008901 0.000285 -0.000093 0.000041 0.000041 0.0000072 0.0000069 0.000039 0.000039 2008 3 6 54531 -0.115685 0.421738 -0.3339936 0.0011628 0.000245 -0.000095 0.000042 0.000042 0.0000123 0.0000068 0.000059 0.000062 2008 3 7 54532 -0.114749 0.424319 -0.3352698 0.0013862 0.000209 -0.000087 0.000042 0.000042 0.0000034 0.0000067 0.000079 0.000085 2008 3 8 54533 -0.113392 0.426650 -0.3367452 0.0015509 0.000207 -0.000074 0.000043 0.000043 0.0000043 0.0000069 0.000084 0.000089 2008 3 9 54534 -0.111916 0.429344 -0.3383403 0.0015335 0.000221 -0.000056 0.000047 0.000048 0.0000069 0.0000076 0.000082 0.000085 2008 3 10 54535 -0.110675 0.431737 -0.3398162 0.0013618 0.000241 -0.000036 0.000048 0.000049 0.0000128 0.0000078 0.000080 0.000081 2008 3 11 54536 -0.109319 0.434414 -0.3410668 0.0010982 0.000265 -0.000017 0.000046 0.000047 0.0000129 0.0000078 0.000079 0.000078 2008 3 12 54537 -0.107996 0.437534 -0.3420810 0.0008107 0.000292 0.000000 0.000045 0.000046 0.0000034 0.0000079 0.000077 0.000074 2008 3 13 54538 -0.106512 0.440356 -0.3428102 0.0005875 0.000285 -0.000025 0.000044 0.000045 0.0000014 0.0000078 0.000075 0.000068 2008 3 14 54539 -0.104859 0.443226 -0.3433280 0.0004567 0.000268 -0.000063 0.000044 0.000046 0.0000014 0.0000078 0.000074 0.000062 2008 3 15 54540 -0.102974 0.445965 -0.3437782 0.0004543 0.000286 -0.000050 0.000045 0.000047 0.0000056 0.0000080 0.000066 0.000055 2008 3 16 54541 -0.100911 0.448907 -0.3442873 0.0005647 0.000314 -0.000019 0.000047 0.000049 0.0000113 0.0000086 0.000056 0.000047 2008 3 17 54542 -0.098561 0.452025 -0.3449408 0.0007805 0.000338 0.000009 0.000047 0.000049 0.0000087 0.0000088 0.000045 0.000040 2008 3 18 54543 -0.096304 0.455083 -0.3458127 0.0010119 0.000356 0.000037 0.000045 0.000047 0.0000019 0.0000087 0.000035 0.000032 2008 3 19 54544 -0.094077 0.457881 -0.3469423 0.0012563 0.000298 -0.000047 0.000045 0.000047 0.0000012 0.0000087 0.000092 0.000088 2008 3 20 54545 -0.091520 0.460880 -0.3482850 0.0013871 0.000221 -0.000157 0.000046 0.000048 0.0000022 0.0000085 0.000166 0.000162 2008 3 21 54546 -0.088876 0.463828 -0.3497449 0.0014614 0.000208 -0.000154 0.000047 0.000048 0.0000110 0.0000084 0.000167 0.000162 2008 3 22 54547 -0.086130 0.466983 -0.3512218 0.0014647 0.000222 -0.000104 0.000049 0.000049 0.0000154 0.0000084 0.000140 0.000137 2008 3 23 54548 -0.083345 0.470167 -0.3526689 0.0014229 0.000243 -0.000048 0.000049 0.000049 0.0000072 0.0000080 0.000113 0.000111 2008 3 24 54549 -0.080724 0.473076 -0.3540434 0.0013039 0.000268 0.000008 0.000047 0.000048 0.0000055 0.0000076 0.000087 0.000085 2008 3 25 54550 -0.078457 0.475805 -0.3552779 0.0011495 0.000296 0.000060 0.000046 0.000047 0.0000033 0.0000076 0.000060 0.000059 2008 3 26 54551 -0.076227 0.478331 -0.3563397 0.0009724 0.000324 0.000104 0.000046 0.000046 0.0000011 0.0000078 0.000033 0.000033 2008 3 27 54552 -0.074097 0.480640 -0.3572232 0.0007870 0.000342 0.000067 0.000047 0.000047 0.0000007 0.0000078 0.000037 0.000034 2008 3 28 54553 -0.072199 0.482839 -0.3579581 0.0006765 0.000354 0.000003 0.000047 0.000047 0.0000009 0.0000076 0.000048 0.000043 2008 3 29 54554 -0.070620 0.484919 -0.3586079 0.0006372 0.000336 -0.000036 0.000047 0.000048 0.0000042 0.0000074 0.000048 0.000044 2008 3 30 54555 -0.068717 0.486641 -0.3592635 0.0007176 0.000305 -0.000064 0.000048 0.000048 0.0000088 0.0000074 0.000043 0.000041 2008 3 31 54556 -0.066551 0.488146 -0.3600245 0.0008740 0.000271 -0.000091 0.000047 0.000046 0.0000072 0.0000074 0.000038 0.000038 2008 4 1 54557 -0.064468 0.489792 -0.3609839 0.0010918 0.000234 -0.000110 0.000045 0.000044 0.0000026 0.0000075 0.000033 0.000035 2008 4 2 54558 -0.061974 0.491627 -0.3622033 0.0013290 0.000226 -0.000134 0.000045 0.000045 0.0000073 0.0000076 0.000036 0.000037 2008 4 3 54559 -0.058983 0.493543 -0.3636564 0.0015670 0.000323 -0.000153 0.000045 0.000044 0.0000115 0.0000074 0.000022 0.000019 2008 4 4 54560 -0.056078 0.495357 -0.3652961 0.0017566 0.000369 -0.000121 0.000044 0.000043 0.0000046 0.0000072 0.000049 0.000045 2008 4 5 54561 -0.053614 0.497006 -0.3671146 0.0019060 0.000316 -0.000060 0.000047 0.000046 0.0000076 0.0000072 0.000056 0.000053 2008 4 6 54562 -0.050867 0.498708 -0.3690460 0.0018726 0.000232 0.000008 0.000048 0.000046 0.0000084 0.0000070 0.000050 0.000050 2008 4 7 54563 -0.047905 0.500439 -0.3708044 0.0015946 0.000147 0.000071 0.000046 0.000045 0.0000052 0.0000067 0.000044 0.000046 2008 4 8 54564 -0.045139 0.502386 -0.3722037 0.0012151 0.000066 0.000126 0.000045 0.000044 0.0000014 0.0000069 0.000038 0.000043 2008 4 9 54565 -0.042916 0.504707 -0.3732681 0.0008793 0.000073 0.000071 0.000045 0.000044 0.0000051 0.0000070 0.000032 0.000035 2008 4 10 54566 -0.041098 0.506791 -0.3740470 0.0006449 0.000112 -0.000019 0.000046 0.000045 0.0000086 0.0000072 0.000025 0.000026 2008 4 11 54567 -0.038873 0.508632 -0.3746331 0.0005315 0.000177 -0.000093 0.000045 0.000045 0.0000048 0.0000070 0.000097 0.000108 2008 4 12 54568 -0.036620 0.510326 -0.3751669 0.0005562 0.000178 -0.000097 0.000047 0.000046 0.0000061 0.0000068 0.000108 0.000120 2008 4 13 54569 -0.034173 0.511826 -0.3757777 0.0006938 0.000162 -0.000075 0.000046 0.000045 0.0000062 0.0000068 0.000087 0.000095 2008 4 14 54570 -0.031611 0.512934 -0.3765941 0.0009378 0.000156 -0.000049 0.000042 0.000042 0.0000039 0.0000069 0.000066 0.000071 2008 4 15 54571 -0.029051 0.513786 -0.3776537 0.0011881 0.000159 -0.000020 0.000041 0.000041 0.0000012 0.0000071 0.000045 0.000046 2008 4 16 54572 -0.026479 0.514565 -0.3788957 0.0013015 0.000232 -0.000017 0.000042 0.000041 0.0000015 0.0000072 0.000083 0.000081 2008 4 17 54573 -0.023651 0.515642 -0.3802413 0.0013615 0.000323 -0.000023 0.000042 0.000042 0.0000027 0.0000071 0.000137 0.000131 2008 4 18 54574 -0.020373 0.517318 -0.3816110 0.0013470 0.000410 -0.000030 0.000042 0.000042 0.0000038 0.0000069 0.000191 0.000181 2008 4 19 54575 -0.016974 0.519358 -0.3829349 0.0012940 0.000469 -0.000036 0.000043 0.000042 0.0000060 0.0000069 0.000224 0.000213 2008 4 20 54576 -0.013709 0.521578 -0.3841750 0.0011662 0.000507 -0.000044 0.000043 0.000042 0.0000082 0.0000067 0.000249 0.000237 2008 4 21 54577 -0.010975 0.523806 -0.3852545 0.0009865 0.000529 -0.000055 0.000041 0.000041 0.0000122 0.0000065 0.000274 0.000261 2008 4 22 54578 -0.008238 0.525766 -0.3861534 0.0008394 0.000534 -0.000067 0.000040 0.000039 0.0000115 0.0000064 0.000298 0.000286 2008 4 23 54579 -0.005766 0.527452 -0.3869167 0.0007050 0.000331 -0.000165 0.000039 0.000039 0.0000052 0.0000065 0.000097 0.000103 2008 4 24 54580 -0.003068 0.528386 -0.3875894 0.0006197 0.000298 -0.000159 0.000039 0.000039 0.0000030 0.0000065 0.000069 0.000066 2008 4 25 54581 -0.000058 0.529141 -0.3881977 0.0005757 0.000310 -0.000125 0.000039 0.000039 0.0000019 0.0000066 0.000086 0.000067 2008 4 26 54582 0.003089 0.529880 -0.3887732 0.0006051 0.000305 -0.000122 0.000040 0.000041 0.0000048 0.0000068 0.000080 0.000060 2008 4 27 54583 0.006191 0.530721 -0.3894057 0.0006927 0.000298 -0.000130 0.000043 0.000043 0.0000075 0.0000067 0.000064 0.000051 2008 4 28 54584 0.009563 0.531744 -0.3901920 0.0008897 0.000299 -0.000137 0.000044 0.000044 0.0000054 0.0000065 0.000048 0.000041 2008 4 29 54585 0.012909 0.533159 -0.3912119 0.0011471 0.000309 -0.000143 0.000041 0.000042 0.0000015 0.0000064 0.000032 0.000031 2008 4 30 54586 0.015977 0.534667 -0.3925137 0.0014521 0.000306 -0.000177 0.000040 0.000041 0.0000020 0.0000064 0.000067 0.000074 2008 5 1 54587 0.018971 0.535985 -0.3940594 0.0016488 0.000313 -0.000192 0.000040 0.000041 0.0000076 0.0000063 0.000076 0.000085 2008 5 2 54588 0.021731 0.536992 -0.3957746 0.0017830 0.000327 -0.000195 0.000040 0.000041 0.0000124 0.0000063 0.000070 0.000079 2008 5 3 54589 0.024426 0.537677 -0.3976140 0.0018589 0.000344 -0.000191 0.000041 0.000042 0.0000092 0.0000063 0.000064 0.000073 2008 5 4 54590 0.027091 0.538292 -0.3994714 0.0018074 0.000360 -0.000182 0.000042 0.000043 0.0000086 0.0000064 0.000058 0.000068 2008 5 5 54591 0.030019 0.538534 -0.4011573 0.0015731 0.000376 -0.000169 0.000042 0.000043 0.0000062 0.0000063 0.000052 0.000062 2008 5 6 54592 0.033509 0.538757 -0.4025728 0.0012535 0.000389 -0.000154 0.000040 0.000041 0.0000025 0.0000062 0.000046 0.000056 2008 5 7 54593 0.036909 0.539259 -0.4036636 0.0009529 0.000390 -0.000094 0.000040 0.000041 0.0000015 0.0000062 0.000724 0.000195 2008 5 8 54594 0.039750 0.539887 -0.4045533 0.0008147 0.000385 -0.000017 0.000040 0.000041 0.0000013 0.0000062 0.000272 0.000100 2008 5 9 54595 0.042502 0.540615 -0.4054417 0.0008751 0.000387 -0.000011 0.000041 0.000042 0.0000076 0.0000063 0.000042 0.000048 2008 5 10 54596 0.044821 0.541474 -0.4063632 0.0010249 0.000389 -0.000038 0.000043 0.000044 0.0000133 0.0000064 0.000038 0.000041 2008 5 11 54597 0.047326 0.541774 -0.4074716 0.0012695 0.000387 -0.000068 0.000046 0.000046 0.0000087 0.0000065 0.000033 0.000034 2008 5 12 54598 0.050034 0.542274 -0.4088849 0.0014996 0.000382 -0.000101 0.000046 0.000047 0.0000050 0.0000065 0.000029 0.000027 2008 5 13 54599 0.052844 0.542516 -0.4104670 0.0016295 0.000374 -0.000134 0.000044 0.000045 0.0000014 0.0000065 0.000025 0.000020 2008 5 14 54600 0.056399 0.542631 -0.4121296 0.0016876 0.000374 -0.000111 0.000043 0.000044 0.0000050 0.0000065 0.000021 0.000017 2008 5 15 54601 0.060248 0.542608 -0.4138039 0.0016267 0.000376 -0.000076 0.000043 0.000044 0.0000082 0.0000065 0.000016 0.000015 2008 5 16 54602 0.064150 0.542640 -0.4154114 0.0015288 0.000286 -0.000069 0.000043 0.000044 0.0000025 0.0000065 0.000045 0.000044 2008 5 17 54603 0.067966 0.542625 -0.4168329 0.0013170 0.000252 -0.000064 0.000045 0.000046 0.0000081 0.0000065 0.000063 0.000059 2008 5 18 54604 0.071429 0.542680 -0.4180149 0.0010979 0.000252 -0.000061 0.000046 0.000046 0.0000115 0.0000067 0.000074 0.000064 2008 5 19 54605 0.074615 0.542673 -0.4189975 0.0008927 0.000253 -0.000069 0.000045 0.000046 0.0000088 0.0000069 0.000084 0.000070 2008 5 20 54606 0.077668 0.542655 -0.4197929 0.0006429 0.000254 -0.000087 0.000044 0.000045 0.0000046 0.0000068 0.000094 0.000075 2008 5 21 54607 0.080938 0.542330 -0.4203777 0.0004543 0.000302 -0.000111 0.000043 0.000044 0.0000076 0.0000069 0.000075 0.000062 2008 5 22 54608 0.084350 0.541892 -0.4207677 0.0003282 0.000360 -0.000139 0.000043 0.000044 0.0000100 0.0000069 0.000049 0.000045 2008 5 23 54609 0.088203 0.541497 -0.4210388 0.0002795 0.000262 -0.000323 0.000043 0.000044 0.0000029 0.0000070 0.000055 0.000052 2008 5 24 54610 0.092259 0.541472 -0.4213245 0.0003407 0.000190 -0.000413 0.000045 0.000046 0.0000083 0.0000072 0.000064 0.000066 2008 5 25 54611 0.096093 0.541313 -0.4217165 0.0004956 0.000154 -0.000437 0.000046 0.000047 0.0000122 0.0000072 0.000069 0.000078 2008 5 26 54612 0.100047 0.541262 -0.4222929 0.0006966 0.000127 -0.000442 0.000045 0.000046 0.0000124 0.0000069 0.000074 0.000091 2008 5 27 54613 0.103790 0.541508 -0.4230677 0.0008568 0.000112 -0.000427 0.000043 0.000044 0.0000085 0.0000068 0.000079 0.000103 2008 5 28 54614 0.107553 0.541418 -0.4240211 0.0010180 0.000152 -0.000247 0.000042 0.000044 0.0000030 0.0000068 0.000078 0.000075 2008 5 29 54615 0.111245 0.541189 -0.4251299 0.0011774 0.000277 -0.000158 0.000042 0.000044 0.0000028 0.0000068 0.000167 0.000172 2008 5 30 54616 0.114501 0.540674 -0.4263538 0.0012736 0.000421 -0.000095 0.000042 0.000044 0.0000040 0.0000069 0.000279 0.000302 2008 5 31 54617 0.117312 0.540075 -0.4276134 0.0012272 0.000439 -0.000097 0.000043 0.000045 0.0000155 0.0000069 0.000259 0.000281 2008 6 1 54618 0.119994 0.539764 -0.4287414 0.0010419 0.000400 -0.000131 0.000045 0.000046 0.0000129 0.0000069 0.000187 0.000201 2008 6 2 54619 0.122626 0.539234 -0.4296538 0.0008151 0.000350 -0.000175 0.000044 0.000045 0.0000056 0.0000068 0.000115 0.000122 2008 6 3 54620 0.125654 0.538441 -0.4303260 0.0005619 0.000292 -0.000230 0.000042 0.000043 0.0000014 0.0000068 0.000043 0.000042 2008 6 4 54621 0.129052 0.537384 -0.4307664 0.0003694 0.000304 -0.000057 0.000042 0.000044 0.0000130 0.0000068 0.000085 0.000078 2008 6 5 54622 0.132824 0.536074 -0.4310806 0.0002988 0.000262 -0.000008 0.000043 0.000044 0.0000220 0.0000069 0.000088 0.000083 2008 6 6 54623 0.136479 0.534934 -0.4314278 0.0003550 0.000200 -0.000019 0.000044 0.000045 0.0000055 0.0000072 0.000070 0.000069 2008 6 7 54624 0.139895 0.533758 -0.4319488 0.0005273 0.000223 -0.000107 0.000045 0.000046 0.0000143 0.0000074 0.000063 0.000063 2008 6 8 54625 0.143294 0.532751 -0.4325483 0.0007227 0.000279 -0.000224 0.000047 0.000048 0.0000147 0.0000071 0.000060 0.000058 2008 6 9 54626 0.146564 0.531708 -0.4333015 0.0008459 0.000338 -0.000335 0.000048 0.000048 0.0000080 0.0000069 0.000056 0.000054 2008 6 10 54627 0.150193 0.530480 -0.4342535 0.0009854 0.000397 -0.000439 0.000046 0.000046 0.0000022 0.0000067 0.000053 0.000050 2008 6 11 54628 0.153714 0.529231 -0.4352674 0.0009857 0.000296 -0.000214 0.000045 0.000045 0.0000012 0.0000067 0.000065 0.000072 2008 6 12 54629 0.157106 0.527650 -0.4361767 0.0008407 0.000253 -0.000142 0.000045 0.000046 0.0000094 0.0000067 0.000065 0.000074 2008 6 13 54630 0.160609 0.526081 -0.4369257 0.0006520 0.000251 -0.000160 0.000046 0.000046 0.0000173 0.0000068 0.000060 0.000065 2008 6 14 54631 0.163908 0.524688 -0.4375009 0.0004639 0.000254 -0.000180 0.000046 0.000047 0.0000116 0.0000068 0.000054 0.000057 2008 6 15 54632 0.166807 0.523332 -0.4378275 0.0002475 0.000261 -0.000204 0.000046 0.000046 0.0000145 0.0000065 0.000049 0.000049 2008 6 16 54633 0.169564 0.521916 -0.4379854 0.0001296 0.000275 -0.000233 0.000043 0.000043 0.0000111 0.0000063 0.000043 0.000041 2008 6 17 54634 0.172466 0.520600 -0.4380544 0.0000302 0.000291 -0.000266 0.000042 0.000041 0.0000025 0.0000063 0.000037 0.000033 2008 6 18 54635 0.175182 0.519058 -0.4380463 -0.0000470 0.000341 -0.000275 0.000040 0.000041 0.0000008 0.0000061 0.000037 0.000033 2008 6 19 54636 0.177811 0.517434 -0.4379837 -0.0000699 0.000395 -0.000277 0.000041 0.000042 0.0000010 0.0000061 0.000038 0.000037 2008 6 20 54637 0.180450 0.515845 -0.4379106 -0.0000460 0.000441 -0.000277 0.000041 0.000042 0.0000012 0.0000061 0.000039 0.000040 2008 6 21 54638 0.183626 0.514356 -0.4379012 0.0000902 0.000436 -0.000308 0.000041 0.000042 0.0000076 0.0000061 0.000041 0.000041 2008 6 22 54639 0.187026 0.512892 -0.4381024 0.0002894 0.000403 -0.000343 0.000044 0.000045 0.0000097 0.0000065 0.000045 0.000041 2008 6 23 54640 0.190275 0.511333 -0.4385451 0.0005451 0.000360 -0.000372 0.000045 0.000045 0.0000066 0.0000067 0.000049 0.000042 2008 6 24 54641 0.193454 0.509895 -0.4392010 0.0007707 0.000311 -0.000394 0.000043 0.000044 0.0000025 0.0000067 0.000052 0.000042 2008 6 25 54642 0.196488 0.508394 -0.4400492 0.0009336 0.000284 -0.000287 0.000043 0.000044 0.0000062 0.0000067 0.000049 0.000045 2008 6 26 54643 0.199498 0.507083 -0.4410415 0.0010323 0.000256 -0.000213 0.000044 0.000045 0.0000093 0.0000067 0.000059 0.000052 2008 6 27 54644 0.201837 0.505801 -0.4420704 0.0009939 0.000213 -0.000280 0.000044 0.000045 0.0000031 0.0000068 0.000116 0.000102 2008 6 28 54645 0.204237 0.503973 -0.4429678 0.0008817 0.000175 -0.000265 0.000045 0.000046 0.0000081 0.0000068 0.000118 0.000104 2008 6 29 54646 0.206571 0.502101 -0.4437744 0.0007007 0.000151 -0.000215 0.000047 0.000049 0.0000106 0.0000071 0.000094 0.000083 2008 6 30 54647 0.208772 0.499818 -0.4443989 0.0004938 0.000141 -0.000178 0.000048 0.000049 0.0000070 0.0000074 0.000070 0.000061 2008 7 1 54648 0.211236 0.497510 -0.4447531 0.0002776 0.000142 -0.000151 0.000047 0.000048 0.0000021 0.0000074 0.000047 0.000039 2008 7 2 54649 0.213615 0.495313 -0.4449201 0.0001468 0.000305 -0.000365 0.000047 0.000048 0.0000029 0.0000073 0.000084 0.000070 2008 7 3 54650 0.216146 0.493237 -0.4450637 0.0001733 0.000505 -0.000634 0.000048 0.000048 0.0000053 0.0000072 0.000138 0.000114 2008 7 4 54651 0.218883 0.491176 -0.4453513 0.0003442 0.000521 -0.000669 0.000048 0.000048 0.0000083 0.0000072 0.000140 0.000114 2008 7 5 54652 0.221736 0.489077 -0.4458350 0.0005432 0.000458 -0.000602 0.000049 0.000049 0.0000114 0.0000072 0.000123 0.000098 2008 7 6 54653 0.224688 0.487207 -0.4464670 0.0007107 0.000381 -0.000513 0.000050 0.000050 0.0000131 0.0000073 0.000106 0.000081 2008 7 7 54654 0.227277 0.485448 -0.4472413 0.0008080 0.000297 -0.000407 0.000048 0.000048 0.0000093 0.0000072 0.000090 0.000064 2008 7 8 54655 0.229631 0.483216 -0.4480581 0.0007593 0.000212 -0.000293 0.000046 0.000046 0.0000031 0.0000072 0.000072 0.000048 2008 7 9 54656 0.231938 0.481146 -0.4487504 0.0006402 0.000098 -0.000151 0.000046 0.000046 0.0000057 0.0000071 0.000153 0.000117 2008 7 10 54657 0.234163 0.479143 -0.4493073 0.0004898 0.000110 -0.000091 0.000046 0.000047 0.0000084 0.0000071 0.000058 0.000049 2008 7 11 54658 0.236536 0.477271 -0.4497255 0.0002736 0.000246 -0.000189 0.000047 0.000048 0.0000031 0.0000072 0.000051 0.000050 2008 7 12 54659 0.238797 0.474930 -0.4498737 0.0000324 0.000319 -0.000249 0.000048 0.000049 0.0000090 0.0000072 0.000058 0.000055 2008 7 13 54660 0.241245 0.472463 -0.4497825 -0.0001689 0.000357 -0.000288 0.000048 0.000048 0.0000143 0.0000070 0.000051 0.000047 2008 7 14 54661 0.243378 0.469876 -0.4495385 -0.0003057 0.000388 -0.000333 0.000045 0.000046 0.0000101 0.0000068 0.000045 0.000038 2008 7 15 54662 0.245346 0.466955 -0.4491865 -0.0003880 0.000409 -0.000381 0.000044 0.000044 0.0000024 0.0000068 0.000038 0.000030 2008 7 16 54663 0.247878 0.464059 -0.4487742 -0.0003966 0.000368 -0.000309 0.000043 0.000044 0.0000072 0.0000067 0.000068 0.000053 2008 7 17 54664 0.250617 0.461559 -0.4484004 -0.0003318 0.000304 -0.000206 0.000044 0.000045 0.0000120 0.0000067 0.000107 0.000085 2008 7 18 54665 0.252942 0.459084 -0.4481566 -0.0001972 0.000175 -0.000305 0.000044 0.000045 0.0000043 0.0000067 0.000089 0.000085 2008 7 19 54666 0.254996 0.456584 -0.4480724 0.0000019 0.000116 -0.000345 0.000045 0.000046 0.0000123 0.0000067 0.000070 0.000073 2008 7 20 54667 0.257213 0.453746 -0.4481916 0.0002643 0.000094 -0.000338 0.000046 0.000047 0.0000178 0.0000067 0.000060 0.000059 2008 7 21 54668 0.259658 0.450866 -0.4485842 0.0005109 0.000080 -0.000329 0.000046 0.000047 0.0000121 0.0000069 0.000049 0.000045 2008 7 22 54669 0.262234 0.447604 -0.4492214 0.0006832 0.000078 -0.000321 0.000044 0.000046 0.0000029 0.0000069 0.000039 0.000032 2008 7 23 54670 0.265121 0.444113 -0.4499824 0.0007565 0.000051 -0.000281 0.000044 0.000045 0.0000011 0.0000069 0.000221 0.000303 2008 7 24 54671 0.267781 0.440700 -0.4507634 0.0007706 0.000075 -0.000338 0.000044 0.000046 0.0000013 0.0000069 0.000201 0.000268 2008 7 25 54672 0.270317 0.437376 -0.4514821 0.0007085 0.000121 -0.000426 0.000044 0.000046 0.0000014 0.0000068 0.000104 0.000119 2008 7 26 54673 0.272843 0.434775 -0.4520725 0.0005424 0.000153 -0.000423 0.000045 0.000047 0.0000013 0.0000069 0.000070 0.000070 2008 7 27 54674 0.275004 0.432353 -0.4524845 0.0003228 0.000178 -0.000389 0.000049 0.000050 0.0000011 0.0000074 0.000060 0.000058 2008 7 28 54675 0.276764 0.429622 -0.4527027 0.0001030 0.000198 -0.000353 0.000050 0.000050 0.0000009 0.0000078 0.000050 0.000047 2008 7 29 54676 0.278260 0.426810 -0.4527644 0.0000048 0.000213 -0.000319 0.000048 0.000049 0.0000007 0.0000078 0.000039 0.000035 2008 7 30 54677 0.279472 0.424017 -0.4527576 0.0000129 0.000015 -0.000315 0.000048 0.000048 0.0000087 0.0000078 0.000040 0.000045 2008 7 31 54678 0.280212 0.421324 -0.4528058 0.0001129 0.000021 -0.000367 0.000049 0.000049 0.0000147 0.0000076 0.000058 0.000056 2008 8 1 54679 0.281095 0.418220 -0.4530164 0.0002879 0.000098 -0.000431 0.000048 0.000048 0.0000048 0.0000074 0.000080 0.000065 2008 8 2 54680 0.282278 0.415059 -0.4534334 0.0005151 0.000123 -0.000439 0.000049 0.000049 0.0000083 0.0000074 0.000078 0.000060 2008 8 3 54681 0.283698 0.411558 -0.4540488 0.0006875 0.000122 -0.000423 0.000050 0.000049 0.0000112 0.0000074 0.000065 0.000051 2008 8 4 54682 0.285294 0.408055 -0.4548080 0.0007946 0.000114 -0.000400 0.000048 0.000048 0.0000077 0.0000072 0.000053 0.000041 2008 8 5 54683 0.286947 0.404612 -0.4556099 0.0007402 0.000103 -0.000372 0.000046 0.000046 0.0000022 0.0000072 0.000041 0.000031 2008 8 6 54684 0.288561 0.401288 -0.4563356 0.0005971 -0.000014 -0.000337 0.000046 0.000046 0.0000012 0.0000074 0.000228 0.000211 2008 8 7 54685 0.290013 0.398361 -0.4568748 0.0004084 -0.000130 -0.000308 0.000048 0.000048 0.0000014 0.0000074 0.000211 0.000197 2008 8 8 54686 0.290735 0.395540 -0.4571656 0.0002168 -0.000226 -0.000284 0.000048 0.000047 0.0000015 0.0000072 0.000118 0.000109 2008 8 9 54687 0.291462 0.392590 -0.4572240 0.0000861 -0.000208 -0.000270 0.000048 0.000048 0.0000210 0.0000072 0.000079 0.000072 2008 8 10 54688 0.291934 0.389506 -0.4572517 -0.0000638 -0.000135 -0.000264 0.000049 0.000048 0.0000171 0.0000072 0.000060 0.000055 2008 8 11 54689 0.292397 0.385923 -0.4571806 -0.0001666 -0.000046 -0.000266 0.000047 0.000047 0.0000157 0.0000070 0.000041 0.000038 2008 8 12 54690 0.292798 0.382712 -0.4569391 -0.0002300 0.000052 -0.000274 0.000045 0.000045 0.0000198 0.0000070 0.000022 0.000021 2008 8 13 54691 0.292964 0.379288 -0.4566923 -0.0001714 0.000158 -0.000316 0.000045 0.000045 0.0000166 0.0000072 0.000011 0.000011 2008 8 14 54692 0.293094 0.376362 -0.4565936 -0.0000605 0.000218 -0.000358 0.000044 0.000044 0.0000175 0.0000072 0.000010 0.000010 2008 8 15 54693 0.292938 0.373377 -0.4566194 0.0000866 0.000220 -0.000360 0.000045 0.000045 0.0000146 0.0000071 0.000011 0.000011 2008 8 16 54694 0.293647 0.370583 -0.4568158 0.0002606 0.000209 -0.000363 0.000048 0.000048 0.0000120 0.0000071 0.000013 0.000012 2008 8 17 54695 0.294227 0.368032 -0.4571434 0.0004320 0.000183 -0.000362 0.000049 0.000050 0.0000129 0.0000072 0.000014 0.000013 2008 8 18 54696 0.294488 0.365068 -0.4576976 0.0006539 0.000147 -0.000348 0.000048 0.000048 0.0000138 0.0000072 0.000014 0.000013 2008 8 19 54697 0.294829 0.361866 -0.4584531 0.0008180 0.000120 -0.000333 0.000047 0.000046 0.0000164 0.0000071 0.000013 0.000012 2008 8 20 54698 0.295383 0.358688 -0.4592786 0.0008574 0.000114 -0.000334 0.000047 0.000047 0.0000264 0.0000071 0.000014 0.000013 2008 8 21 54699 0.296152 0.355625 -0.4600868 0.0007437 0.000129 -0.000337 0.000045 0.000045 0.0000228 0.0000072 0.000013 0.000012 2008 8 22 54700 0.297042 0.352272 -0.4607807 0.0005566 0.000152 -0.000308 0.000045 0.000045 0.0000200 0.0000073 0.000010 0.000010 2008 8 23 54701 0.298078 0.349065 -0.4612562 0.0003478 0.000158 -0.000264 0.000047 0.000047 0.0000185 0.0000072 0.000010 0.000010 2008 8 24 54702 0.298570 0.346086 -0.4614921 0.0001692 0.000154 -0.000256 0.000050 0.000049 0.0000156 0.0000073 0.000010 0.000011 2008 8 25 54703 0.298251 0.343028 -0.4615948 0.0000471 0.000160 -0.000278 0.000048 0.000048 0.0000130 0.0000074 0.000010 0.000011 2008 8 26 54704 0.297860 0.339459 -0.4616488 0.0000745 0.000157 -0.000273 0.000048 0.000047 0.0000101 0.0000076 0.000010 0.000010 2008 8 27 54705 0.298121 0.335855 -0.4617752 0.0002197 0.000131 -0.000231 0.000049 0.000049 0.0000102 0.0000078 0.001338 0.000237 2008 8 28 54706 0.298233 0.332587 -0.4620588 0.0003713 0.000107 -0.000203 0.000050 0.000049 0.0000122 0.0000077 0.000623 0.000335 2008 8 29 54707 0.298333 0.329453 -0.4625377 0.0006048 0.000093 -0.000215 0.000049 0.000050 0.0000042 0.0000076 0.000110 0.000138 2008 8 30 54708 0.298464 0.326158 -0.4633047 0.0008746 0.000082 -0.000261 0.000050 0.000051 0.0000121 0.0000076 0.000079 0.000071 2008 8 31 54709 0.298665 0.322331 -0.4642797 0.0010136 0.000073 -0.000318 0.000051 0.000051 0.0000155 0.0000076 0.000088 0.000072 2008 9 1 54710 0.298707 0.318525 -0.4653344 0.0010423 0.000068 -0.000375 0.000047 0.000047 0.0000127 0.0000072 0.000097 0.000074 2008 9 2 54711 0.298957 0.314645 -0.4663634 0.0009687 0.000067 -0.000428 0.000045 0.000046 0.0000077 0.0000072 0.000107 0.000075 2008 9 3 54712 0.299224 0.310818 -0.4672659 0.0007928 0.000073 -0.000374 0.000044 0.000045 0.0000019 0.0000073 0.000050 0.000039 2008 9 4 54713 0.299112 0.307217 -0.4679755 0.0005900 0.000070 -0.000354 0.000042 0.000043 0.0000012 0.0000073 0.000018 0.000016 2008 9 5 54714 0.298674 0.303494 -0.4684776 0.0003882 0.000070 -0.000397 0.000042 0.000043 0.0000017 0.0000073 0.000046 0.000057 2008 9 6 54715 0.298312 0.299890 -0.4687960 0.0002316 0.000099 -0.000406 0.000044 0.000044 0.0000089 0.0000072 0.000057 0.000068 2008 9 7 54716 0.297902 0.296395 -0.4689500 0.0001238 0.000139 -0.000395 0.000044 0.000045 0.0000171 0.0000071 0.000055 0.000061 2008 9 8 54717 0.297581 0.292998 -0.4690528 0.0001195 0.000175 -0.000387 0.000043 0.000044 0.0000129 0.0000070 0.000053 0.000054 2008 9 9 54718 0.297297 0.289776 -0.4692073 0.0002013 0.000206 -0.000382 0.000041 0.000043 0.0000030 0.0000071 0.000051 0.000047 2008 9 10 54719 0.296925 0.286632 -0.4694590 0.0003153 0.000156 -0.000300 0.000041 0.000043 0.0000080 0.0000072 0.000031 0.000031 2008 9 11 54720 0.296493 0.283729 -0.4698566 0.0004891 0.000142 -0.000256 0.000042 0.000044 0.0000131 0.0000072 0.000039 0.000031 2008 9 12 54721 0.295831 0.280756 -0.4704753 0.0007665 0.000123 -0.000335 0.000041 0.000043 0.0000040 0.0000070 0.000074 0.000067 2008 9 13 54722 0.294494 0.277695 -0.4714153 0.0010890 0.000074 -0.000464 0.000043 0.000044 0.0000108 0.0000070 0.000134 0.000108 2008 9 14 54723 0.292846 0.274536 -0.4726389 0.0013376 0.000016 -0.000591 0.000046 0.000047 0.0000142 0.0000072 0.000203 0.000148 2008 9 15 54724 0.291504 0.271284 -0.4740971 0.0015307 0.000060 -0.000597 0.000046 0.000047 0.0000093 0.0000072 0.000172 0.000126 2008 9 16 54725 0.290494 0.268142 -0.4757079 0.0016192 0.000156 -0.000531 0.000046 0.000047 0.0000026 0.0000072 0.000087 0.000073 2008 9 17 54726 0.289411 0.265031 -0.4773215 0.0015687 0.000228 -0.000466 0.000046 0.000047 0.0000196 0.0000072 0.000256 0.000197 2008 9 18 54727 0.287882 0.261652 -0.4787871 0.0013736 0.000139 -0.000362 0.000047 0.000047 0.0000160 0.0000071 0.000222 0.000172 2008 9 19 54728 0.286010 0.258160 -0.4800163 0.0010884 0.000002 -0.000245 0.000046 0.000046 0.0000044 0.0000071 0.000106 0.000088 2008 9 20 54729 0.284188 0.254608 -0.4809879 0.0008478 -0.000027 -0.000198 0.000048 0.000047 0.0000096 0.0000072 0.000070 0.000063 2008 9 21 54730 0.282235 0.251208 -0.4816744 0.0006457 -0.000014 -0.000187 0.000046 0.000045 0.0000133 0.0000067 0.000065 0.000062 2008 9 22 54731 0.280210 0.247796 -0.4822542 0.0005656 0.000001 -0.000190 0.000043 0.000042 0.0000089 0.0000061 0.000060 0.000060 2008 9 23 54732 0.278340 0.244288 -0.4828562 0.0006039 0.000018 -0.000210 0.000041 0.000040 0.0000024 0.0000061 0.000054 0.000059 2008 9 24 54733 0.276571 0.240884 -0.4834873 0.0007108 0.000108 -0.000318 0.000041 0.000040 0.0000097 0.0000062 0.000031 0.000032 2008 9 25 54734 0.274761 0.237613 -0.4842903 0.0009274 0.000074 -0.000318 0.000042 0.000040 0.0000159 0.0000063 0.000043 0.000036 2008 9 26 54735 0.273056 0.234359 -0.4853649 0.0011686 -0.000001 -0.000282 0.000042 0.000041 0.0000046 0.0000062 0.000065 0.000050 2008 9 27 54736 0.271340 0.231030 -0.4866091 0.0013156 -0.000034 -0.000318 0.000042 0.000041 0.0000113 0.0000061 0.000066 0.000053 2008 9 28 54737 0.269819 0.227894 -0.4879763 0.0014186 -0.000047 -0.000376 0.000045 0.000044 0.0000130 0.0000063 0.000058 0.000051 2008 9 29 54738 0.268314 0.225378 -0.4894044 0.0014005 -0.000053 -0.000427 0.000046 0.000046 0.0000078 0.0000067 0.000051 0.000049 2008 9 30 54739 0.266487 0.222774 -0.4907782 0.0012862 -0.000053 -0.000469 0.000045 0.000044 0.0000020 0.0000067 0.000043 0.000047 2008 10 1 54740 0.264615 0.220275 -0.4919908 0.0011052 0.000028 -0.000434 0.000045 0.000044 0.0000109 0.0000068 0.000051 0.000059 2008 10 2 54741 0.262467 0.217657 -0.4929841 0.0008630 0.000131 -0.000372 0.000046 0.000046 0.0000183 0.0000069 0.000064 0.000074 2008 10 3 54742 0.259847 0.214951 -0.4937430 0.0006426 0.000102 -0.000377 0.000046 0.000046 0.0000051 0.0000070 0.000074 0.000068 2008 10 4 54743 0.256867 0.212303 -0.4942830 0.0004496 0.000087 -0.000363 0.000047 0.000047 0.0000068 0.0000071 0.000077 0.000067 2008 10 5 54744 0.254355 0.209700 -0.4946710 0.0003660 0.000089 -0.000335 0.000046 0.000045 0.0000078 0.0000067 0.000077 0.000070 2008 10 6 54745 0.252117 0.207562 -0.4949901 0.0003366 0.000084 -0.000312 0.000041 0.000040 0.0000050 0.0000059 0.000077 0.000073 2008 10 7 54746 0.249687 0.205508 -0.4953480 0.0003966 0.000070 -0.000297 0.000040 0.000039 0.0000019 0.0000057 0.000077 0.000076 2008 10 8 54747 0.247214 0.203439 -0.4958532 0.0005666 0.000125 -0.000250 0.000040 0.000039 0.0000097 0.0000058 0.000065 0.000078 2008 10 9 54748 0.244818 0.200748 -0.4965390 0.0007787 0.000130 -0.000283 0.000040 0.000039 0.0000158 0.0000059 0.000030 0.000038 2008 10 10 54749 0.242388 0.197804 -0.4974203 0.0010095 0.000024 -0.000466 0.000040 0.000039 0.0000044 0.0000061 0.000041 0.000044 2008 10 11 54750 0.239638 0.194665 -0.4985465 0.0012476 -0.000036 -0.000503 0.000041 0.000040 0.0000044 0.0000062 0.000054 0.000054 2008 10 12 54751 0.237156 0.191669 -0.4999131 0.0014551 -0.000066 -0.000463 0.000046 0.000044 0.0000085 0.0000065 0.000060 0.000059 2008 10 13 54752 0.234757 0.189135 -0.5014520 0.0015640 -0.000092 -0.000416 0.000046 0.000044 0.0000134 0.0000065 0.000067 0.000064 2008 10 14 54753 0.232560 0.186753 -0.5030265 0.0015747 -0.000111 -0.000361 0.000044 0.000042 0.0000117 0.0000063 0.000074 0.000069 2008 10 15 54754 0.229752 0.184696 -0.5045302 0.0014595 -0.000122 -0.000299 0.000044 0.000043 0.0000030 0.0000065 0.000080 0.000073 2008 10 16 54755 0.227078 0.182441 -0.5059278 0.0012953 -0.000117 -0.000307 0.000044 0.000044 0.0000016 0.0000067 0.000089 0.000088 2008 10 17 54756 0.224416 0.180265 -0.5071454 0.0011354 -0.000104 -0.000333 0.000044 0.000043 0.0000021 0.0000065 0.000098 0.000104 2008 10 18 54757 0.221646 0.177803 -0.5081474 0.0009747 -0.000088 -0.000314 0.000044 0.000043 0.0000067 0.0000065 0.000088 0.000096 2008 10 19 54758 0.218910 0.175146 -0.5090496 0.0009588 -0.000071 -0.000283 0.000046 0.000044 0.0000083 0.0000067 0.000072 0.000078 2008 10 20 54759 0.216266 0.172770 -0.5100037 0.0010169 -0.000055 -0.000259 0.000045 0.000043 0.0000054 0.0000065 0.000054 0.000059 2008 10 21 54760 0.213672 0.170521 -0.5111015 0.0011584 -0.000040 -0.000242 0.000042 0.000041 0.0000015 0.0000063 0.000037 0.000041 2008 10 22 54761 0.211332 0.168672 -0.5123738 0.0013182 -0.000047 -0.000264 0.000041 0.000041 0.0000010 0.0000063 0.000050 0.000052 2008 10 23 54762 0.208404 0.166818 -0.5138042 0.0014820 -0.000063 -0.000299 0.000042 0.000042 0.0000014 0.0000063 0.000071 0.000071 2008 10 24 54763 0.205017 0.164847 -0.5153474 0.0016242 -0.000081 -0.000336 0.000043 0.000043 0.0000018 0.0000065 0.000091 0.000090 2008 10 25 54764 0.201236 0.162477 -0.5169512 0.0016531 -0.000082 -0.000355 0.000044 0.000044 0.0000155 0.0000065 0.000092 0.000092 2008 10 26 54765 0.197797 0.159866 -0.5185921 0.0016022 -0.000077 -0.000365 0.000046 0.000046 0.0000287 0.0000067 0.000085 0.000088 2008 10 27 54766 0.195294 0.157921 -0.5202037 0.0015495 -0.000072 -0.000369 0.000046 0.000046 0.0000214 0.0000067 0.000078 0.000085 2008 10 28 54767 0.193293 0.156636 -0.5216944 0.0014209 -0.000066 -0.000366 0.000045 0.000045 0.0000053 0.0000066 0.000071 0.000081 2008 10 29 54768 0.191198 0.155805 -0.5229960 0.0011831 -0.000077 -0.000341 0.000046 0.000046 0.0000063 0.0000068 0.000084 0.000088 2008 10 30 54769 0.188446 0.154341 -0.5240779 0.0009573 -0.000092 -0.000306 0.000046 0.000046 0.0000095 0.0000067 0.000101 0.000098 2008 10 31 54770 0.185699 0.152912 -0.5249567 0.0008156 -0.000107 -0.000267 0.000045 0.000046 0.0000041 0.0000067 0.000119 0.000109 2008 11 1 54771 0.182606 0.151445 -0.5256874 0.0006669 -0.000102 -0.000264 0.000046 0.000047 0.0000046 0.0000068 0.000109 0.000097 2008 11 2 54772 0.179447 0.149645 -0.5263055 0.0006240 -0.000091 -0.000273 0.000049 0.000049 0.0000085 0.0000072 0.000088 0.000078 2008 11 3 54773 0.176517 0.148447 -0.5269205 0.0006352 -0.000083 -0.000284 0.000050 0.000050 0.0000069 0.0000075 0.000067 0.000059 2008 11 4 54774 0.173275 0.147705 -0.5275902 0.0006640 -0.000080 -0.000296 0.000047 0.000048 0.0000022 0.0000074 0.000046 0.000039 2008 11 5 54775 0.169828 0.146657 -0.5283051 0.0007806 -0.000094 -0.000196 0.000047 0.000047 0.0000025 0.0000072 0.000066 0.000061 2008 11 6 54776 0.166521 0.145613 -0.5291430 0.0009370 -0.000116 -0.000073 0.000048 0.000048 0.0000035 0.0000070 0.000096 0.000093 2008 11 7 54777 0.163837 0.144675 -0.5301825 0.0011358 -0.000103 -0.000184 0.000048 0.000048 0.0000024 0.0000070 0.000093 0.000103 2008 11 8 54778 0.160902 0.143866 -0.5314144 0.0013463 -0.000136 -0.000218 0.000049 0.000049 0.0000069 0.0000072 0.000081 0.000093 2008 11 9 54779 0.157716 0.142924 -0.5328725 0.0015621 -0.000187 -0.000199 0.000052 0.000051 0.0000083 0.0000075 0.000070 0.000079 2008 11 10 54780 0.154105 0.142229 -0.5344983 0.0016572 -0.000226 -0.000183 0.000052 0.000052 0.0000054 0.0000076 0.000060 0.000066 2008 11 11 54781 0.150285 0.141073 -0.5361754 0.0016335 -0.000249 -0.000168 0.000049 0.000049 0.0000016 0.0000074 0.000050 0.000052 2008 11 12 54782 0.146769 0.140248 -0.5377860 0.0015145 -0.000296 -0.000316 0.000048 0.000048 0.0000030 0.0000073 0.000041 0.000044 2008 11 13 54783 0.142562 0.139302 -0.5391944 0.0012609 -0.000222 -0.000397 0.000050 0.000050 0.0000045 0.0000073 0.000064 0.000062 2008 11 14 54784 0.138365 0.137929 -0.5403113 0.0009955 -0.000158 -0.000330 0.000050 0.000050 0.0000022 0.0000072 0.000067 0.000067 2008 11 15 54785 0.134511 0.136814 -0.5411472 0.0007951 -0.000036 -0.000255 0.000052 0.000051 0.0000072 0.0000075 0.000092 0.000091 2008 11 16 54786 0.130906 0.136127 -0.5419075 0.0008257 0.000103 -0.000193 0.000054 0.000054 0.0000111 0.0000080 0.000129 0.000126 2008 11 17 54787 0.126966 0.135714 -0.5427707 0.0009634 0.000221 -0.000134 0.000052 0.000053 0.0000090 0.0000079 0.000167 0.000160 2008 11 18 54788 0.123297 0.135415 -0.5438640 0.0012240 0.000311 -0.000078 0.000049 0.000050 0.0000049 0.0000074 0.000204 0.000195 2008 11 19 54789 0.120597 0.135063 -0.5452676 0.0015684 0.000223 -0.000237 0.000049 0.000050 0.0000070 0.0000073 0.000094 0.000079 2008 11 20 54790 0.118530 0.135164 -0.5469401 0.0017586 -0.000037 -0.000413 0.000049 0.000050 0.0000088 0.0000074 0.000060 0.000048 2008 11 21 54791 0.116978 0.135458 -0.5487677 0.0018525 -0.000216 -0.000382 0.000049 0.000050 0.0000036 0.0000074 0.000121 0.000122 2008 11 22 54792 0.115406 0.135972 -0.5506306 0.0018681 -0.000285 -0.000327 0.000050 0.000052 0.0000078 0.0000076 0.000130 0.000133 2008 11 23 54793 0.113355 0.136259 -0.5524483 0.0017576 -0.000319 -0.000282 0.000053 0.000053 0.0000202 0.0000077 0.000112 0.000113 2008 11 24 54794 0.110904 0.136602 -0.5541538 0.0016109 -0.000336 -0.000235 0.000051 0.000052 0.0000167 0.0000075 0.000094 0.000093 2008 11 25 54795 0.107891 0.137304 -0.5557001 0.0014598 -0.000332 -0.000187 0.000049 0.000050 0.0000040 0.0000074 0.000077 0.000072 2008 11 26 54796 0.104408 0.137118 -0.5570732 0.0013085 -0.000279 -0.000130 0.000049 0.000050 0.0000022 0.0000074 0.000149 0.000139 2008 11 27 54797 0.101267 0.136557 -0.5582948 0.0011541 -0.000270 -0.000188 0.000049 0.000051 0.0000045 0.0000075 0.000133 0.000144 2008 11 28 54798 0.098307 0.136187 -0.5593760 0.0010221 -0.000273 -0.000289 0.000050 0.000051 0.0000073 0.0000075 0.000075 0.000119 2008 11 29 54799 0.095151 0.135897 -0.5603261 0.0009246 -0.000232 -0.000289 0.000051 0.000051 0.0000102 0.0000075 0.000070 0.000102 2008 11 30 54800 0.091663 0.135558 -0.5611835 0.0008753 -0.000190 -0.000285 0.000052 0.000052 0.0000085 0.0000074 0.000065 0.000085 2008 12 1 54801 0.088253 0.135332 -0.5620766 0.0009266 -0.000151 -0.000280 0.000050 0.000050 0.0000049 0.0000073 0.000060 0.000069 2008 12 2 54802 0.084620 0.135160 -0.5630619 0.0010400 -0.000122 -0.000271 0.000046 0.000047 0.0000015 0.0000072 0.000055 0.000052 2008 12 3 54803 0.080528 0.135129 -0.5641160 0.0011004 -0.000068 -0.000094 0.000046 0.000046 0.0000042 0.0000071 0.000049 0.000052 2008 12 4 54804 0.075992 0.135019 -0.5652934 0.0012470 -0.000098 -0.000104 0.000048 0.000048 0.0000068 0.0000071 0.000072 0.000072 2008 12 5 54805 0.071818 0.135231 -0.5666526 0.0014663 -0.000162 -0.000184 0.000048 0.000049 0.0000028 0.0000072 0.000102 0.000097 2008 12 6 54806 0.068107 0.135290 -0.5681726 0.0016033 -0.000198 -0.000206 0.000050 0.000050 0.0000053 0.0000073 0.000104 0.000097 2008 12 7 54807 0.064635 0.135129 -0.5698184 0.0016904 -0.000222 -0.000207 0.000052 0.000052 0.0000069 0.0000076 0.000095 0.000088 2008 12 8 54808 0.061520 0.134581 -0.5715201 0.0016471 -0.000244 -0.000208 0.000051 0.000051 0.0000085 0.0000077 0.000086 0.000079 2008 12 9 54809 0.059070 0.134298 -0.5731197 0.0014799 -0.000262 -0.000209 0.000049 0.000049 0.0000082 0.0000076 0.000076 0.000070 2008 12 10 54810 0.056696 0.134800 -0.5744866 0.0012630 -0.000273 -0.000211 0.000048 0.000048 0.0000025 0.0000075 0.000067 0.000061 2008 12 11 54811 0.053621 0.134989 -0.5756155 0.0009852 -0.000227 -0.000170 0.000048 0.000048 0.0000014 0.0000075 0.000076 0.000076 2008 12 12 54812 0.050488 0.134504 -0.5764881 0.0007579 -0.000162 -0.000119 0.000049 0.000049 0.0000014 0.0000075 0.000090 0.000097 2008 12 13 54813 0.047268 0.134451 -0.5771492 0.0006777 -0.000169 -0.000127 0.000049 0.000049 0.0000032 0.0000074 0.000087 0.000092 2008 12 14 54814 0.044769 0.134277 -0.5778480 0.0008061 -0.000201 -0.000158 0.000052 0.000052 0.0000058 0.0000076 0.000076 0.000079 2008 12 15 54815 0.042802 0.134492 -0.5787628 0.0010580 -0.000232 -0.000188 0.000054 0.000053 0.0000046 0.0000077 0.000066 0.000066 2008 12 16 54816 0.040093 0.134857 -0.5799178 0.0012699 -0.000263 -0.000214 0.000050 0.000050 0.0000014 0.0000077 0.000056 0.000052 2008 12 17 54817 0.036876 0.135056 -0.5812563 0.0013812 -0.000210 -0.000233 0.000049 0.000050 0.0000060 0.0000078 0.000035 0.000031 2008 12 18 54818 0.033694 0.135446 -0.5826892 0.0014472 -0.000144 -0.000176 0.000050 0.000051 0.0000099 0.0000076 0.000017 0.000017 2008 12 19 54819 0.030543 0.136015 -0.5841296 0.0014449 -0.000099 -0.000097 0.000050 0.000052 0.0000034 0.0000076 0.000086 0.000094 2008 12 20 54820 0.027496 0.136544 -0.5855073 0.0013360 -0.000114 -0.000087 0.000052 0.000053 0.0000058 0.0000077 0.000104 0.000112 2008 12 21 54821 0.024489 0.137342 -0.5867205 0.0011124 -0.000152 -0.000102 0.000055 0.000056 0.0000086 0.0000078 0.000093 0.000097 2008 12 22 54822 0.021190 0.138117 -0.5877442 0.0009131 -0.000194 -0.000119 0.000055 0.000056 0.0000062 0.0000080 0.000082 0.000081 2008 12 23 54823 0.017962 0.138639 -0.5885815 0.0007357 -0.000237 -0.000142 0.000052 0.000054 0.0000019 0.0000081 0.000071 0.000066 2008 12 24 54824 0.014481 0.139008 -0.5892146 0.0005241 -0.000277 -0.000028 0.000053 0.000054 0.0000093 0.0000081 0.000090 0.000075 2008 12 25 54825 0.010872 0.139410 -0.5896284 0.0003418 -0.000281 0.000000 0.000054 0.000056 0.0000170 0.0000080 0.000095 0.000079 2008 12 26 54826 0.006688 0.139931 -0.5898619 0.0002136 -0.000266 -0.000028 0.000055 0.000057 0.0000137 0.0000080 0.000094 0.000079 2008 12 27 54827 0.002880 0.140413 -0.5900443 0.0002402 -0.000245 -0.000067 0.000056 0.000059 0.0000103 0.0000081 0.000093 0.000079 2008 12 28 54828 -0.001070 0.141761 -0.5903085 0.0002777 -0.000219 -0.000117 0.000056 0.000057 0.0000093 0.0000078 0.000091 0.000079 2008 12 29 54829 -0.005267 0.143011 -0.5906606 0.0003875 -0.000191 -0.000170 0.000052 0.000053 0.0000064 0.0000074 0.000090 0.000079 2008 12 30 54830 -0.009633 0.144173 -0.5911461 0.0005700 -0.000163 -0.000219 0.000051 0.000052 0.0000021 0.0000074 0.000088 0.000079 2008 12 31 54831 -0.013422 0.144978 -0.5918700 0.0008303 -0.000161 -0.000389 0.000051 0.000053 0.0000031 0.0000076 0.000183 0.000228 2009 1 1 54832 -0.017026 0.146233 0.4071532 0.0010604 -0.000164 -0.000422 0.000052 0.000053 0.0000054 0.0000076 0.000197 0.000254 2009 1 2 54833 -0.020388 0.147429 0.4059738 0.0012279 -0.000172 -0.000373 0.000052 0.000053 0.0000077 0.0000076 0.000167 0.000214 2009 1 3 54834 -0.023244 0.149064 0.4046741 0.0013014 -0.000185 -0.000307 0.000053 0.000054 0.0000091 0.0000076 0.000138 0.000173 2009 1 4 54835 -0.025738 0.150615 0.4033460 0.0013085 -0.000202 -0.000230 0.000058 0.000058 0.0000065 0.0000077 0.000108 0.000133 2009 1 5 54836 -0.029045 0.152715 0.4020677 0.0012157 -0.000221 -0.000149 0.000060 0.000059 0.0000039 0.0000077 0.000078 0.000093 2009 1 6 54837 -0.033356 0.154434 0.4009121 0.0010530 -0.000239 -0.000070 0.000058 0.000057 0.0000013 0.0000077 0.000048 0.000052 2009 1 7 54838 -0.037535 0.156207 0.3999393 0.0008132 -0.000257 -0.000067 0.000058 0.000058 0.0000072 0.0000079 0.000046 0.000045 2009 1 8 54839 -0.041695 0.157963 0.3992078 0.0005971 -0.000272 -0.000091 0.000059 0.000059 0.0000119 0.0000080 0.000052 0.000045 2009 1 9 54840 -0.045888 0.159630 0.3986770 0.0005392 -0.000283 -0.000125 0.000060 0.000060 0.0000035 0.0000081 0.000057 0.000046 2009 1 10 54841 -0.049557 0.161119 0.3981529 0.0006209 -0.000271 -0.000155 0.000061 0.000061 0.0000072 0.0000081 0.000058 0.000048 2009 1 11 54842 -0.053093 0.162708 0.3974749 0.0008066 -0.000251 -0.000183 0.000062 0.000063 0.0000096 0.0000085 0.000058 0.000051 2009 1 12 54843 -0.056477 0.164329 0.3965287 0.0011128 -0.000230 -0.000210 0.000062 0.000063 0.0000066 0.0000089 0.000058 0.000054 2009 1 13 54844 -0.059584 0.166087 0.3952896 0.0013444 -0.000210 -0.000236 0.000060 0.000061 0.0000022 0.0000088 0.000057 0.000056 2009 1 14 54845 -0.062423 0.167618 0.3938420 0.0015018 -0.000167 -0.000143 0.000060 0.000061 0.0000014 0.0000090 0.000047 0.000046 2009 1 15 54846 -0.065311 0.169251 0.3923252 0.0015090 -0.000198 -0.000081 0.000060 0.000062 0.0000014 0.0000091 0.000058 0.000060 2009 1 16 54847 -0.068177 0.170273 0.3908856 0.0013764 -0.000251 -0.000038 0.000060 0.000061 0.0000014 0.0000089 0.000076 0.000082 2009 1 17 54848 -0.070698 0.171383 0.3896308 0.0011817 -0.000259 -0.000050 0.000061 0.000062 0.0000085 0.0000089 0.000093 0.000099 2009 1 18 54849 -0.073253 0.173035 0.3885626 0.0009515 -0.000245 -0.000082 0.000062 0.000062 0.0000122 0.0000089 0.000108 0.000114 2009 1 19 54850 -0.075679 0.174869 0.3877573 0.0006397 -0.000224 -0.000116 0.000062 0.000063 0.0000098 0.0000091 0.000124 0.000130 2009 1 20 54851 -0.078305 0.177004 0.3872517 0.0003783 -0.000195 -0.000150 0.000063 0.000063 0.0000058 0.0000093 0.000139 0.000145 2009 1 21 54852 -0.081110 0.179475 0.3869773 0.0002359 -0.000171 -0.000108 0.000063 0.000062 0.0000018 0.0000093 0.000063 0.000060 2009 1 22 54853 -0.084382 0.181843 0.3868427 0.0000944 -0.000142 -0.000118 0.000063 0.000062 0.0000012 0.0000092 0.000021 0.000021 2009 1 23 54854 -0.087489 0.184163 0.3867854 0.0000560 -0.000121 -0.000148 0.000064 0.000063 0.0000014 0.0000093 0.000077 0.000076 2009 1 24 54855 -0.090118 0.186680 0.3867486 0.0000907 -0.000086 -0.000114 0.000064 0.000063 0.0000055 0.0000093 0.000137 0.000126 2009 1 25 54856 -0.091529 0.189284 0.3866253 0.0002202 -0.000051 -0.000055 0.000062 0.000060 0.0000065 0.0000086 0.000187 0.000163 2009 1 26 54857 -0.093220 0.192201 0.3863484 0.0003723 -0.000028 0.000005 0.000057 0.000056 0.0000055 0.0000078 0.000237 0.000200 2009 1 27 54858 -0.094450 0.194730 0.3858794 0.0005532 -0.000017 0.000059 0.000056 0.000055 0.0000045 0.0000077 0.000288 0.000237 2009 1 28 54859 -0.095950 0.197451 0.3851993 0.0007342 -0.000043 0.000056 0.000056 0.000055 0.0000119 0.0000076 0.000228 0.000188 2009 1 29 54860 -0.098095 0.199963 0.3843660 0.0009029 -0.000085 0.000030 0.000057 0.000056 0.0000186 0.0000077 0.000139 0.000116 2009 1 30 54861 -0.100263 0.202563 0.3834176 0.0009660 -0.000133 -0.000002 0.000057 0.000056 0.0000137 0.0000078 0.000049 0.000044 2009 1 31 54862 -0.102853 0.205265 0.3824425 0.0009531 -0.000184 -0.000029 0.000057 0.000056 0.0000076 0.0000079 0.000039 0.000038 2009 2 1 54863 -0.105436 0.207970 0.3815574 0.0008615 -0.000230 -0.000055 0.000059 0.000059 0.0000078 0.0000080 0.000058 0.000057 2009 2 2 54864 -0.107468 0.210576 0.3807161 0.0007138 -0.000270 -0.000081 0.000059 0.000058 0.0000057 0.0000078 0.000078 0.000076 2009 2 3 54865 -0.108392 0.213529 0.3800434 0.0005599 -0.000300 -0.000106 0.000058 0.000057 0.0000022 0.0000076 0.000097 0.000096 2009 2 4 54866 -0.109017 0.216924 0.3795276 0.0004487 -0.000294 -0.000072 0.000058 0.000058 0.0000071 0.0000077 0.000051 0.000050 2009 2 5 54867 -0.110062 0.220680 0.3790909 0.0004244 -0.000235 -0.000018 0.000058 0.000057 0.0000111 0.0000078 0.000054 0.000068 2009 2 6 54868 -0.111650 0.224346 0.3786355 0.0004656 -0.000148 -0.000020 0.000058 0.000057 0.0000033 0.0000080 0.000077 0.000069 2009 2 7 54869 -0.113828 0.227919 0.3780940 0.0006428 -0.000146 -0.000060 0.000060 0.000059 0.0000051 0.0000081 0.000084 0.000070 2009 2 8 54870 -0.115884 0.231338 0.3773345 0.0008963 -0.000180 -0.000101 0.000061 0.000060 0.0000088 0.0000082 0.000085 0.000075 2009 2 9 54871 -0.118083 0.234383 0.3763042 0.0011683 -0.000215 -0.000138 0.000061 0.000060 0.0000068 0.0000082 0.000086 0.000080 2009 2 10 54872 -0.119683 0.237157 0.3750251 0.0013946 -0.000250 -0.000167 0.000059 0.000058 0.0000023 0.0000080 0.000088 0.000085 2009 2 11 54873 -0.120548 0.240364 0.3735715 0.0014568 -0.000305 -0.000052 0.000059 0.000058 0.0000014 0.0000080 0.000060 0.000072 2009 2 12 54874 -0.121362 0.244045 0.3721214 0.0013792 -0.000322 0.000087 0.000059 0.000059 0.0000015 0.0000081 0.000048 0.000060 2009 2 13 54875 -0.122391 0.247675 0.3708727 0.0011380 -0.000194 0.000064 0.000059 0.000058 0.0000015 0.0000081 0.000086 0.000071 2009 2 14 54876 -0.123653 0.251172 0.3699438 0.0008407 -0.000148 0.000048 0.000059 0.000058 0.0000093 0.0000082 0.000094 0.000072 2009 2 15 54877 -0.125278 0.254913 0.3692238 0.0006171 -0.000148 0.000048 0.000065 0.000064 0.0000106 0.0000091 0.000087 0.000068 2009 2 16 54878 -0.126776 0.258683 0.3686771 0.0004182 -0.000152 0.000044 0.000068 0.000068 0.0000107 0.0000097 0.000079 0.000064 2009 2 17 54879 -0.128643 0.262097 0.3683074 0.0003025 -0.000158 0.000037 0.000067 0.000066 0.0000100 0.0000095 0.000072 0.000060 2009 2 18 54880 -0.130462 0.264992 0.3680657 0.0001881 -0.000165 0.000030 0.000067 0.000067 0.0000028 0.0000095 0.000064 0.000056 2009 2 19 54881 -0.132327 0.267942 0.3679031 0.0001367 -0.000196 -0.000213 0.000066 0.000067 0.0000014 0.0000097 0.000064 0.000063 2009 2 20 54882 -0.133348 0.270364 0.3677703 0.0001833 -0.000228 -0.000054 0.000065 0.000066 0.0000016 0.0000099 0.000066 0.000065 2009 2 21 54883 -0.133721 0.273036 0.3676093 0.0002297 -0.000216 0.000044 0.000066 0.000067 0.0000106 0.0000099 0.000066 0.000062 2009 2 22 54884 -0.134150 0.275757 0.3673502 0.0003481 -0.000185 0.000065 0.000064 0.000065 0.0000124 0.0000093 0.000066 0.000059 2009 2 23 54885 -0.133799 0.278669 0.3668739 0.0005866 -0.000149 0.000085 0.000061 0.000062 0.0000188 0.0000085 0.000066 0.000055 2009 2 24 54886 -0.133128 0.282083 0.3661528 0.0008416 -0.000111 0.000102 0.000059 0.000060 0.0000186 0.0000083 0.000065 0.000051 2009 2 25 54887 -0.133353 0.285612 0.3652169 0.0009993 -0.000087 0.000110 0.000060 0.000062 0.0000042 0.0000085 0.000057 0.000067 2009 2 26 54888 -0.133537 0.288912 0.3640776 0.0011746 -0.000067 0.000099 0.000061 0.000063 0.0000018 0.0000087 0.000078 0.000100 2009 2 27 54889 -0.133619 0.292518 0.3628267 0.0012627 -0.000050 0.000077 0.000061 0.000063 0.0000027 0.0000087 0.000108 0.000136 2009 2 28 54890 -0.133962 0.296136 0.3615821 0.0012302 -0.000045 0.000057 0.000061 0.000063 0.0000074 0.0000088 0.000101 0.000129 2009 3 1 54891 -0.134376 0.299803 0.3603504 0.0011620 -0.000047 0.000037 0.000058 0.000059 0.0000075 0.0000084 0.000081 0.000107 2009 3 2 54892 -0.134761 0.303218 0.3592008 0.0010409 -0.000054 0.000017 0.000052 0.000053 0.0000046 0.0000080 0.000061 0.000084 2009 3 3 54893 -0.134758 0.306334 0.3581947 0.0009295 -0.000064 -0.000003 0.000052 0.000052 0.0000016 0.0000078 0.000041 0.000062 2009 3 4 54894 -0.134163 0.309625 0.3573129 0.0007949 -0.000015 0.000104 0.000051 0.000052 0.0000164 0.0000076 0.000049 0.000055 2009 3 5 54895 -0.133708 0.313199 0.3565351 0.0007200 -0.000017 0.000076 0.000051 0.000052 0.0000276 0.0000077 0.000063 0.000069 2009 3 6 54896 -0.133424 0.316779 0.3557782 0.0008478 -0.000043 0.000004 0.000052 0.000053 0.0000073 0.0000081 0.000075 0.000089 2009 3 7 54897 -0.133142 0.320718 0.3548753 0.0010233 -0.000064 -0.000004 0.000053 0.000054 0.0000074 0.0000082 0.000076 0.000090 2009 3 8 54898 -0.132980 0.324564 0.3537909 0.0012236 -0.000087 0.000015 0.000054 0.000054 0.0000096 0.0000080 0.000074 0.000084 2009 3 9 54899 -0.132804 0.328801 0.3524025 0.0015402 -0.000112 0.000041 0.000053 0.000054 0.0000137 0.0000076 0.000071 0.000078 2009 3 10 54900 -0.132483 0.332889 0.3507512 0.0017412 -0.000137 0.000071 0.000052 0.000053 0.0000111 0.0000075 0.000068 0.000072 2009 3 11 54901 -0.132168 0.336768 0.3490103 0.0017690 -0.000160 0.000103 0.000053 0.000053 0.0000031 0.0000075 0.000066 0.000066 2009 3 12 54902 -0.131939 0.340558 0.3473088 0.0016650 -0.000202 0.000136 0.000053 0.000054 0.0000015 0.0000076 0.000064 0.000062 2009 3 13 54903 -0.131766 0.343848 0.3457145 0.0014812 -0.000242 0.000166 0.000053 0.000054 0.0000016 0.0000076 0.000063 0.000059 2009 3 14 54904 -0.130842 0.346662 0.3442688 0.0012540 -0.000245 0.000182 0.000054 0.000054 0.0000513 0.0000078 0.000060 0.000056 2009 3 15 54905 -0.130339 0.350164 0.3431809 0.0010070 -0.000230 0.000190 0.000054 0.000054 0.0000343 0.0000078 0.000056 0.000053 2009 3 16 54906 -0.129449 0.353234 0.3423226 0.0008176 -0.000207 0.000190 0.000053 0.000053 0.0000096 0.0000076 0.000052 0.000050 2009 3 17 54907 -0.128487 0.356583 0.3415509 0.0006310 -0.000178 0.000185 0.000052 0.000053 0.0000023 0.0000074 0.000048 0.000046 2009 3 18 54908 -0.127700 0.359829 0.3408992 0.0005676 -0.000148 0.000148 0.000053 0.000054 0.0000009 0.0000072 0.000060 0.000057 2009 3 19 54909 -0.127283 0.363318 0.3403170 0.0006039 -0.000119 0.000102 0.000053 0.000054 0.0000011 0.0000072 0.000076 0.000070 2009 3 20 54910 -0.126833 0.366763 0.3396996 0.0006829 -0.000094 0.000057 0.000053 0.000053 0.0000013 0.0000074 0.000092 0.000084 2009 3 21 54911 -0.125981 0.370089 0.3389350 0.0008860 -0.000082 0.000077 0.000054 0.000053 0.0000071 0.0000076 0.000096 0.000085 2009 3 22 54912 -0.124870 0.373599 0.3379291 0.0011442 -0.000078 0.000124 0.000053 0.000051 0.0000129 0.0000074 0.000095 0.000081 2009 3 23 54913 -0.123472 0.376826 0.3366747 0.0013601 -0.000078 0.000170 0.000050 0.000049 0.0000098 0.0000069 0.000095 0.000078 2009 3 24 54914 -0.122080 0.380434 0.3352183 0.0015474 -0.000080 0.000218 0.000050 0.000049 0.0000027 0.0000067 0.000094 0.000075 2009 3 25 54915 -0.120928 0.384333 0.3336227 0.0016415 -0.000139 0.000079 0.000050 0.000049 0.0000066 0.0000067 0.000084 0.000074 2009 3 26 54916 -0.119883 0.387858 0.3319554 0.0016680 -0.000209 -0.000102 0.000051 0.000049 0.0000106 0.0000068 0.000070 0.000075 2009 3 27 54917 -0.119193 0.391571 0.3302926 0.0016216 -0.000153 -0.000010 0.000050 0.000049 0.0000037 0.0000068 0.000111 0.000092 2009 3 28 54918 -0.118481 0.394864 0.3287241 0.0014864 -0.000110 0.000048 0.000051 0.000049 0.0000058 0.0000069 0.000112 0.000089 2009 3 29 54919 -0.118058 0.398167 0.3273515 0.0012536 -0.000067 0.000096 0.000052 0.000050 0.0000096 0.0000069 0.000098 0.000078 2009 3 30 54920 -0.118377 0.400766 0.3262199 0.0009980 -0.000020 0.000147 0.000051 0.000050 0.0000071 0.0000068 0.000084 0.000068 2009 3 31 54921 -0.118902 0.403571 0.3252903 0.0008295 0.000025 0.000198 0.000051 0.000050 0.0000019 0.0000069 0.000070 0.000057 2009 4 1 54922 -0.118802 0.405888 0.3244726 0.0007745 0.000075 0.000184 0.000051 0.000051 0.0000011 0.0000068 0.000089 0.000074 2009 4 2 54923 -0.117776 0.408352 0.3236769 0.0008241 0.000119 0.000150 0.000051 0.000050 0.0000014 0.0000067 0.000117 0.000097 2009 4 3 54924 -0.116440 0.410919 0.3228212 0.0009341 0.000155 0.000112 0.000052 0.000051 0.0000018 0.0000067 0.000144 0.000120 2009 4 4 54925 -0.115139 0.413656 0.3218308 0.0011101 0.000116 0.000130 0.000052 0.000051 0.0000058 0.0000068 0.000140 0.000117 2009 4 5 54926 -0.113249 0.416429 0.3206205 0.0013241 0.000048 0.000167 0.000051 0.000050 0.0000062 0.0000069 0.000125 0.000104 2009 4 6 54927 -0.110787 0.419496 0.3191573 0.0015817 -0.000020 0.000201 0.000050 0.000048 0.0000041 0.0000068 0.000109 0.000092 2009 4 7 54928 -0.108458 0.423066 0.3174875 0.0017420 -0.000085 0.000233 0.000049 0.000047 0.0000020 0.0000067 0.000094 0.000079 2009 4 8 54929 -0.106894 0.426086 0.3157162 0.0017759 0.000039 0.000176 0.000048 0.000048 0.0000021 0.0000066 0.000047 0.000038 2009 4 9 54930 -0.105304 0.428851 0.3139800 0.0016366 0.000090 0.000083 0.000049 0.000048 0.0000028 0.0000066 0.000126 0.000092 2009 4 10 54931 -0.103774 0.431642 0.3123980 0.0014649 0.000103 0.000073 0.000049 0.000048 0.0000074 0.0000066 0.000147 0.000110 2009 4 11 54932 -0.102264 0.434586 0.3110250 0.0012832 0.000114 0.000098 0.000049 0.000048 0.0000107 0.0000066 0.000134 0.000104 2009 4 12 54933 -0.100728 0.437077 0.3098687 0.0010353 0.000120 0.000124 0.000050 0.000049 0.0000122 0.0000068 0.000120 0.000097 2009 4 13 54934 -0.098550 0.439504 0.3089350 0.0008141 0.000121 0.000151 0.000050 0.000049 0.0000112 0.0000070 0.000107 0.000091 2009 4 14 54935 -0.096546 0.442421 0.3081615 0.0007093 0.000115 0.000173 0.000049 0.000049 0.0000066 0.0000072 0.000093 0.000084 2009 4 15 54936 -0.094045 0.445592 0.3074332 0.0007456 0.000102 0.000192 0.000049 0.000048 0.0000020 0.0000072 0.000080 0.000078 2009 4 16 54937 -0.091460 0.449119 0.3066438 0.0008242 0.000065 0.000174 0.000049 0.000049 0.0000015 0.0000071 0.000046 0.000048 2009 4 17 54938 -0.088941 0.452397 0.3057452 0.0009583 0.000028 0.000142 0.000049 0.000049 0.0000019 0.0000069 0.000070 0.000066 2009 4 18 54939 -0.086883 0.455329 0.3047251 0.0011086 0.000005 0.000095 0.000049 0.000049 0.0000076 0.0000069 0.000078 0.000074 2009 4 19 54940 -0.084807 0.458177 0.3035589 0.0012720 -0.000010 0.000048 0.000050 0.000049 0.0000095 0.0000069 0.000072 0.000071 2009 4 20 54941 -0.082726 0.460810 0.3021841 0.0014870 -0.000021 0.000007 0.000049 0.000049 0.0000064 0.0000069 0.000066 0.000068 2009 4 21 54942 -0.080436 0.463483 0.3005850 0.0016957 -0.000027 -0.000024 0.000049 0.000049 0.0000021 0.0000071 0.000061 0.000065 2009 4 22 54943 -0.078554 0.466315 0.2988224 0.0018210 0.000021 0.000007 0.000048 0.000049 0.0000052 0.0000071 0.000024 0.000024 2009 4 23 54944 -0.076920 0.469205 0.2970066 0.0017976 0.000015 0.000086 0.000048 0.000049 0.0000082 0.0000069 0.000054 0.000055 2009 4 24 54945 -0.075944 0.471575 0.2952532 0.0016793 -0.000010 0.000178 0.000047 0.000048 0.0000036 0.0000067 0.000107 0.000109 2009 4 25 54946 -0.074955 0.473791 0.2936377 0.0015093 -0.000010 0.000209 0.000047 0.000049 0.0000076 0.0000067 0.000113 0.000116 2009 4 26 54947 -0.073736 0.476110 0.2922383 0.0012948 -0.000001 0.000214 0.000048 0.000049 0.0000103 0.0000067 0.000103 0.000104 2009 4 27 54948 -0.071956 0.478032 0.2910394 0.0011022 0.000011 0.000213 0.000046 0.000048 0.0000074 0.0000067 0.000092 0.000093 2009 4 28 54949 -0.069798 0.480081 0.2899723 0.0010164 0.000022 0.000207 0.000046 0.000047 0.0000026 0.0000067 0.000082 0.000082 2009 4 29 54950 -0.067611 0.482239 0.2889584 0.0010102 0.000071 0.000223 0.000046 0.000047 0.0000018 0.0000067 0.000107 0.000099 2009 4 30 54951 -0.065195 0.484330 0.2878976 0.0010917 0.000127 0.000240 0.000047 0.000048 0.0000019 0.0000068 0.000140 0.000123 2009 5 1 54952 -0.062325 0.486405 0.2866991 0.0013182 0.000124 0.000232 0.000047 0.000047 0.0000061 0.0000066 0.000150 0.000135 2009 5 2 54953 -0.059549 0.488641 0.2853024 0.0015137 0.000095 0.000213 0.000046 0.000047 0.0000118 0.0000065 0.000152 0.000141 2009 5 3 54954 -0.056722 0.490422 0.2836978 0.0017137 0.000063 0.000192 0.000047 0.000047 0.0000135 0.0000065 0.000153 0.000148 2009 5 4 54955 -0.053893 0.492381 0.2819388 0.0018121 0.000029 0.000170 0.000045 0.000047 0.0000099 0.0000066 0.000154 0.000154 2009 5 5 54956 -0.051521 0.494268 0.2801350 0.0017550 -0.000004 0.000147 0.000045 0.000047 0.0000046 0.0000067 0.000156 0.000161 2009 5 6 54957 -0.048951 0.495831 0.2784187 0.0016525 0.000022 0.000154 0.000045 0.000047 0.0000027 0.0000067 0.000143 0.000144 2009 5 7 54958 -0.045745 0.497692 0.2768967 0.0014173 0.000067 0.000169 0.000045 0.000047 0.0000017 0.0000066 0.000126 0.000120 2009 5 8 54959 -0.042774 0.499752 0.2756332 0.0011192 0.000071 0.000159 0.000046 0.000047 0.0000057 0.0000065 0.000112 0.000104 2009 5 9 54960 -0.039632 0.502103 0.2746751 0.0008689 0.000061 0.000142 0.000046 0.000048 0.0000116 0.0000067 0.000099 0.000092 2009 5 10 54961 -0.036649 0.504331 0.2739520 0.0006759 0.000054 0.000124 0.000047 0.000049 0.0000108 0.0000067 0.000086 0.000079 2009 5 11 54962 -0.033652 0.506087 0.2733315 0.0005509 0.000049 0.000107 0.000046 0.000047 0.0000063 0.0000066 0.000073 0.000067 2009 5 12 54963 -0.031115 0.507823 0.2727717 0.0005195 0.000046 0.000091 0.000045 0.000046 0.0000019 0.0000065 0.000060 0.000054 2009 5 13 54964 -0.028533 0.509858 0.2722377 0.0005396 0.000078 0.000080 0.000045 0.000047 0.0000045 0.0000066 0.000040 0.000036 2009 5 14 54965 -0.025754 0.511783 0.2716476 0.0006260 0.000118 0.000072 0.000045 0.000047 0.0000071 0.0000067 0.000018 0.000017 2009 5 15 54966 -0.023085 0.513823 0.2709334 0.0007723 0.000138 0.000103 0.000045 0.000047 0.0000026 0.0000066 0.000063 0.000056 2009 5 16 54967 -0.020160 0.515387 0.2700967 0.0009203 0.000136 0.000108 0.000046 0.000047 0.0000116 0.0000065 0.000075 0.000067 2009 5 17 54968 -0.016638 0.516867 0.2691096 0.0010499 0.000128 0.000098 0.000045 0.000047 0.0000140 0.0000061 0.000067 0.000060 2009 5 18 54969 -0.013014 0.518493 0.2679802 0.0012090 0.000119 0.000088 0.000044 0.000046 0.0000086 0.0000058 0.000058 0.000052 2009 5 19 54970 -0.009424 0.520156 0.2666974 0.0013901 0.000111 0.000079 0.000044 0.000045 0.0000022 0.0000059 0.000050 0.000045 2009 5 20 54971 -0.005985 0.521612 0.2652524 0.0014993 0.000099 0.000032 0.000044 0.000046 0.0000010 0.0000059 0.000065 0.000074 2009 5 21 54972 -0.002666 0.522672 0.2637560 0.0014593 0.000118 0.000017 0.000044 0.000046 0.0000013 0.0000059 0.000074 0.000079 2009 5 22 54973 0.000620 0.523974 0.2623645 0.0013205 0.000148 0.000016 0.000044 0.000046 0.0000016 0.0000059 0.000078 0.000074 2009 5 23 54974 0.003594 0.525267 0.2611852 0.0011381 0.000169 0.000048 0.000045 0.000046 0.0000093 0.0000059 0.000079 0.000078 2009 5 24 54975 0.007038 0.526202 0.2601485 0.0009745 0.000186 0.000092 0.000046 0.000046 0.0000114 0.0000062 0.000078 0.000086 2009 5 25 54976 0.010778 0.527475 0.2592689 0.0008006 0.000198 0.000132 0.000045 0.000045 0.0000106 0.0000063 0.000078 0.000093 2009 5 26 54977 0.013818 0.528760 0.2585174 0.0007101 0.000206 0.000168 0.000044 0.000044 0.0000075 0.0000063 0.000077 0.000101 2009 5 27 54978 0.016539 0.530081 0.2577756 0.0007570 0.000197 0.000155 0.000044 0.000044 0.0000030 0.0000062 0.000069 0.000072 2009 5 28 54979 0.019348 0.531510 0.2569233 0.0009230 0.000157 0.000090 0.000043 0.000043 0.0000021 0.0000063 0.000082 0.000088 2009 5 29 54980 0.021764 0.532668 0.2558760 0.0011795 0.000107 0.000008 0.000043 0.000043 0.0000021 0.0000063 0.000101 0.000116 2009 5 30 54981 0.024565 0.533316 0.2546206 0.0014001 0.000099 -0.000006 0.000043 0.000044 0.0000094 0.0000061 0.000099 0.000115 2009 5 31 54982 0.027812 0.533683 0.2531717 0.0014742 0.000108 0.000008 0.000045 0.000044 0.0000142 0.0000063 0.000091 0.000102 2009 6 1 54983 0.031535 0.533537 0.2516920 0.0014088 0.000118 0.000023 0.000045 0.000044 0.0000118 0.0000065 0.000082 0.000089 2009 6 2 54984 0.035464 0.533702 0.2503358 0.0013081 0.000131 0.000041 0.000044 0.000043 0.0000071 0.0000065 0.000073 0.000076 2009 6 3 54985 0.039537 0.534397 0.2491572 0.0011076 0.000147 0.000060 0.000044 0.000043 0.0000024 0.0000066 0.000064 0.000063 2009 6 4 54986 0.043736 0.535186 0.2481729 0.0008673 0.000121 0.000008 0.000044 0.000043 0.0000026 0.0000066 0.000130 0.000129 2009 6 5 54987 0.048062 0.536525 0.2474159 0.0006185 0.000087 -0.000062 0.000044 0.000044 0.0000041 0.0000066 0.000214 0.000215 2009 6 6 54988 0.051732 0.537781 0.2468993 0.0004565 0.000085 -0.000054 0.000045 0.000045 0.0000096 0.0000067 0.000205 0.000205 2009 6 7 54989 0.055268 0.538780 0.2465075 0.0003309 0.000096 -0.000018 0.000046 0.000046 0.0000137 0.0000069 0.000162 0.000159 2009 6 8 54990 0.058578 0.539462 0.2462060 0.0002418 0.000110 0.000018 0.000046 0.000046 0.0000097 0.0000069 0.000119 0.000113 2009 6 9 54991 0.061730 0.540018 0.2459633 0.0002549 0.000125 0.000053 0.000045 0.000045 0.0000025 0.0000067 0.000076 0.000067 2009 6 10 54992 0.064314 0.540476 0.2456803 0.0003423 0.000156 0.000032 0.000044 0.000045 0.0000011 0.0000067 0.000068 0.000057 2009 6 11 54993 0.067535 0.540332 0.2452545 0.0004712 0.000189 -0.000005 0.000044 0.000046 0.0000013 0.0000068 0.000069 0.000056 2009 6 12 54994 0.071053 0.540545 0.2446278 0.0006675 0.000196 -0.000027 0.000044 0.000045 0.0000091 0.0000068 0.000071 0.000058 2009 6 13 54995 0.074727 0.541057 0.2439131 0.0008190 0.000190 -0.000041 0.000045 0.000046 0.0000174 0.0000069 0.000073 0.000062 2009 6 14 54996 0.078517 0.541492 0.2430881 0.0008913 0.000177 -0.000053 0.000044 0.000045 0.0000177 0.0000064 0.000075 0.000066 2009 6 15 54997 0.082228 0.541830 0.2421333 0.0009555 0.000161 -0.000060 0.000041 0.000042 0.0000122 0.0000056 0.000077 0.000070 2009 6 16 54998 0.085567 0.541783 0.2411510 0.0010437 0.000142 -0.000064 0.000039 0.000041 0.0000035 0.0000053 0.000079 0.000075 2009 6 17 54999 0.088599 0.541716 0.2401387 0.0010327 0.000113 -0.000030 0.000039 0.000041 0.0000018 0.0000053 0.000083 0.000080 2009 6 18 55000 0.091196 0.541130 0.2391674 0.0008946 0.000084 0.000012 0.000040 0.000041 0.0000017 0.0000054 0.000087 0.000087 2009 6 19 55001 0.094095 0.540663 0.2383457 0.0007265 0.000062 0.000054 0.000040 0.000041 0.0000017 0.0000055 0.000091 0.000093 2009 6 20 55002 0.097209 0.540446 0.2377553 0.0005304 0.000073 0.000054 0.000041 0.000041 0.0000105 0.0000055 0.000086 0.000087 2009 6 21 55003 0.100328 0.540313 0.2373540 0.0003335 0.000101 0.000035 0.000043 0.000043 0.0000150 0.0000058 0.000076 0.000078 2009 6 22 55004 0.103112 0.539769 0.2371243 0.0001630 0.000134 0.000012 0.000044 0.000045 0.0000104 0.0000061 0.000066 0.000068 2009 6 23 55005 0.105991 0.539071 0.2369988 0.0001071 0.000169 -0.000015 0.000044 0.000045 0.0000030 0.0000061 0.000057 0.000058 2009 6 24 55006 0.109206 0.538389 0.2368338 0.0002076 0.000198 -0.000019 0.000044 0.000045 0.0000055 0.0000061 0.000072 0.000079 2009 6 25 55007 0.112448 0.537943 0.2365280 0.0003864 0.000232 -0.000007 0.000044 0.000045 0.0000085 0.0000061 0.000082 0.000086 2009 6 26 55008 0.115387 0.537508 0.2360354 0.0005628 0.000264 0.000010 0.000044 0.000045 0.0000037 0.0000062 0.000089 0.000087 2009 6 27 55009 0.118040 0.537241 0.2353693 0.0007108 0.000235 -0.000009 0.000045 0.000045 0.0000121 0.0000063 0.000089 0.000086 2009 6 28 55010 0.120853 0.536607 0.2346512 0.0007477 0.000180 -0.000038 0.000048 0.000049 0.0000210 0.0000067 0.000088 0.000083 2009 6 29 55011 0.123684 0.535899 0.2339571 0.0006267 0.000121 -0.000063 0.000051 0.000051 0.0000155 0.0000070 0.000086 0.000081 2009 6 30 55012 0.126851 0.534671 0.2333904 0.0004070 0.000059 -0.000085 0.000054 0.000055 0.0000038 0.0000069 0.000084 0.000078 2009 7 1 55013 0.130423 0.533636 0.2330772 0.0001644 0.000147 -0.000012 0.000059 0.000061 0.0000017 0.0000069 0.000091 0.000089 2009 7 2 55014 0.134330 0.532557 0.2330230 -0.0000389 0.000274 0.000085 0.000058 0.000059 0.0000020 0.0000067 0.000101 0.000102 2009 7 3 55015 0.138470 0.531598 0.2331606 -0.0001930 0.000252 0.000091 0.000057 0.000058 0.0000061 0.0000067 0.000100 0.000102 2009 7 4 55016 0.142489 0.531005 0.2334340 -0.0003033 0.000176 0.000059 0.000057 0.000058 0.0000116 0.0000067 0.000095 0.000096 2009 7 5 55017 0.146001 0.530399 0.2337840 -0.0004276 0.000044 -0.000009 0.000031 0.000033 0.0000035 0.0000075 0.000062 0.000067 2009 7 6 55018 0.149173 0.529511 0.2342126 -0.0004424 -0.000010 -0.000038 0.000030 0.000030 0.0000024 0.0000069 0.000058 0.000063 2009 7 7 55019 0.152128 0.528739 0.2346211 -0.0003852 -0.000042 -0.000060 0.000029 0.000029 0.0000008 0.0000069 0.000055 0.000058 2009 7 8 55020 0.154863 0.527582 0.2349410 -0.0002750 0.000054 0.000014 0.000029 0.000029 0.0000041 0.0000069 0.000056 0.000054 2009 7 9 55021 0.157258 0.526742 0.2351319 -0.0001313 0.000189 0.000116 0.000029 0.000029 0.0000048 0.0000070 0.000057 0.000051 2009 7 10 55022 0.159892 0.525679 0.2351873 -0.0000108 0.000166 -0.000055 0.000030 0.000030 0.0000018 0.0000071 0.000103 0.000106 2009 7 11 55023 0.162796 0.524951 0.2351208 0.0001419 0.000152 -0.000093 0.000030 0.000032 0.0000026 0.0000072 0.000111 0.000117 2009 7 12 55024 0.165855 0.524105 0.2349017 0.0003022 0.000158 -0.000050 0.000033 0.000034 0.0000037 0.0000077 0.000101 0.000104 2009 7 13 55025 0.169046 0.523415 0.2345945 0.0003194 0.000158 -0.000010 0.000034 0.000035 0.0000029 0.0000082 0.000091 0.000091 2009 7 14 55026 0.171976 0.522268 0.2342887 0.0003109 0.000153 0.000028 0.000033 0.000035 0.0000011 0.0000082 0.000080 0.000078 2009 7 15 55027 0.175583 0.521216 0.2339906 0.0002704 0.000161 0.000002 0.000033 0.000034 0.0000019 0.0000081 0.000089 0.000089 2009 7 16 55028 0.179216 0.520084 0.2337893 0.0001054 0.000172 -0.000043 0.000033 0.000034 0.0000022 0.0000082 0.000103 0.000106 2009 7 17 55029 0.182712 0.518884 0.2337383 -0.0000025 0.000183 -0.000089 0.000033 0.000034 0.0000013 0.0000083 0.000117 0.000123 2009 7 18 55030 0.185928 0.518288 0.2338017 -0.0001015 0.000172 -0.000108 0.000034 0.000034 0.0000026 0.0000084 0.000135 0.000128 2009 7 19 55031 0.188851 0.517302 0.2339424 -0.0001601 0.000154 -0.000117 0.000034 0.000034 0.0000037 0.0000080 0.000156 0.000130 2009 7 20 55032 0.191912 0.515932 0.2340881 -0.0001175 0.000141 -0.000122 0.000033 0.000033 0.0000070 0.0000075 0.000176 0.000131 2009 7 21 55033 0.194980 0.514829 0.2341632 -0.0000162 0.000130 -0.000124 0.000033 0.000033 0.0000075 0.0000076 0.000197 0.000132 2009 7 22 55034 0.197932 0.513566 0.2340957 0.0001457 0.000260 -0.000068 0.000033 0.000033 0.0000017 0.0000078 0.000071 0.000057 2009 7 23 55035 0.200684 0.512191 0.2338050 0.0003733 0.000290 -0.000046 0.000033 0.000033 0.0000008 0.0000078 0.000121 0.000088 2009 7 24 55036 0.203114 0.510605 0.2332777 0.0006050 0.000274 -0.000048 0.000033 0.000033 0.0000012 0.0000076 0.000099 0.000089 2009 7 25 55037 0.205442 0.508752 0.2325739 0.0007691 0.000262 -0.000076 0.000033 0.000033 0.0000021 0.0000077 0.000085 0.000083 2009 7 26 55038 0.207845 0.506883 0.2318094 0.0007433 0.000250 -0.000110 0.000032 0.000032 0.0000032 0.0000079 0.000088 0.000082 2009 7 27 55039 0.210591 0.504746 0.2311011 0.0006427 0.000237 -0.000146 0.000031 0.000031 0.0000029 0.0000076 0.000091 0.000081 2009 7 28 55040 0.213268 0.502760 0.2305498 0.0004626 0.000223 -0.000180 0.000031 0.000031 0.0000013 0.0000073 0.000093 0.000079 2009 7 29 55041 0.215576 0.500227 0.2302332 0.0001998 0.000206 -0.000161 0.000031 0.000031 0.0000048 0.0000071 0.000066 0.000055 2009 7 30 55042 0.217632 0.497830 0.2301654 -0.0000381 0.000191 -0.000127 0.000031 0.000032 0.0000055 0.0000074 0.000030 0.000025 2009 7 31 55043 0.219531 0.495524 0.2303055 -0.0002025 0.000216 -0.000029 0.000031 0.000032 0.0000019 0.0000076 0.000058 0.000050 2009 8 1 55044 0.221792 0.492923 0.2305787 -0.0003097 0.000248 -0.000037 0.000031 0.000031 0.0000026 0.0000075 0.000070 0.000065 2009 8 2 55045 0.223944 0.490345 0.2309104 -0.0003274 0.000280 -0.000090 0.000031 0.000031 0.0000037 0.0000077 0.000069 0.000071 2009 8 3 55046 0.225966 0.487592 0.2312048 -0.0002444 0.000311 -0.000141 0.000031 0.000031 0.0000029 0.0000076 0.000067 0.000077 2009 8 4 55047 0.227933 0.485019 0.2313918 -0.0001239 0.000338 -0.000190 0.000031 0.000031 0.0000012 0.0000076 0.000065 0.000083 2009 8 5 55048 0.230050 0.482345 0.2314553 0.0000116 0.000321 -0.000169 0.000031 0.000031 0.0000049 0.0000076 0.000060 0.000074 2009 8 6 55049 0.232024 0.479957 0.2313484 0.0001927 0.000287 -0.000129 0.000031 0.000031 0.0000055 0.0000075 0.000054 0.000061 2009 8 7 55050 0.234228 0.477553 0.2310498 0.0003811 0.000246 -0.000084 0.000031 0.000031 0.0000017 0.0000074 0.000048 0.000048 2009 8 8 55051 0.236336 0.475320 0.2305894 0.0005315 0.000256 -0.000040 0.000031 0.000031 0.0000025 0.0000074 0.000056 0.000053 2009 8 9 55052 0.238383 0.473143 0.2300025 0.0006263 0.000281 -0.000001 0.000031 0.000032 0.0000037 0.0000074 0.000068 0.000065 2009 8 10 55053 0.240424 0.470729 0.2293462 0.0006562 0.000301 0.000031 0.000031 0.000032 0.0000030 0.0000073 0.000080 0.000076 2009 8 11 55054 0.242407 0.468239 0.2287030 0.0006052 0.000317 0.000052 0.000031 0.000031 0.0000017 0.0000073 0.000093 0.000088 2009 8 12 55055 0.244502 0.465695 0.2281579 0.0004723 0.000210 -0.000007 0.000031 0.000031 0.0000022 0.0000076 0.000093 0.000088 2009 8 13 55056 0.246661 0.463298 0.2277799 0.0002665 0.000075 -0.000090 0.000031 0.000032 0.0000021 0.0000075 0.000089 0.000084 2009 8 14 55057 0.248526 0.461311 0.2275979 0.0000965 -0.000053 -0.000176 0.000031 0.000032 0.0000010 0.0000074 0.000086 0.000081 2009 8 15 55058 0.249925 0.459130 0.2275859 -0.0000438 -0.000013 -0.000185 0.000031 0.000032 0.0000025 0.0000075 0.000081 0.000077 2009 8 16 55059 0.251517 0.456834 0.2276722 -0.0001012 0.000094 -0.000161 0.000032 0.000034 0.0000037 0.0000081 0.000076 0.000073 2009 8 17 55060 0.252845 0.454384 0.2277355 0.0000032 0.000203 -0.000131 0.000032 0.000034 0.0000029 0.0000082 0.000070 0.000068 2009 8 18 55061 0.253997 0.452002 0.2276255 0.0002454 0.000313 -0.000095 0.000032 0.000033 0.0000012 0.0000080 0.000065 0.000064 2009 8 19 55062 0.254997 0.449598 0.2272283 0.0005222 0.000239 -0.000112 0.000033 0.000033 0.0000048 0.0000081 0.000089 0.000077 2009 8 20 55063 0.256243 0.447094 0.2265517 0.0007535 0.000116 -0.000140 0.000033 0.000034 0.0000058 0.0000081 0.000119 0.000095 2009 8 21 55064 0.257976 0.444758 0.2256682 0.0009403 -0.000004 -0.000168 0.000033 0.000035 0.0000026 0.0000082 0.000150 0.000112 2009 8 22 55065 0.259756 0.442490 0.2246725 0.0010055 -0.000008 -0.000146 0.000034 0.000035 0.0000029 0.0000083 0.000141 0.000107 2009 8 23 55066 0.260862 0.440344 0.2237111 0.0008776 0.000038 -0.000110 0.000034 0.000034 0.0000037 0.0000083 0.000117 0.000094 2009 8 24 55067 0.261931 0.438015 0.2229052 0.0006860 0.000096 -0.000077 0.000033 0.000033 0.0000029 0.0000080 0.000092 0.000081 2009 8 25 55068 0.263063 0.435816 0.2223086 0.0004776 0.000161 -0.000050 0.000033 0.000033 0.0000013 0.0000080 0.000068 0.000067 2009 8 26 55069 0.264246 0.433528 0.2219229 0.0002829 0.000286 -0.000039 0.000033 0.000033 0.0000049 0.0000080 0.000070 0.000059 2009 8 27 55070 0.265376 0.431155 0.2217158 0.0001287 0.000306 -0.000116 0.000032 0.000033 0.0000064 0.0000079 0.000133 0.000093 2009 8 28 55071 0.266423 0.428725 0.2216264 0.0000463 0.000285 -0.000218 0.000031 0.000033 0.0000042 0.0000078 0.000212 0.000140 2009 8 29 55072 0.267604 0.426162 0.2215794 0.0000492 0.000303 -0.000234 0.000031 0.000033 0.0000037 0.0000078 0.000202 0.000135 2009 8 30 55073 0.268851 0.423540 0.2215106 0.0000916 0.000330 -0.000210 0.000032 0.000034 0.0000037 0.0000081 0.000156 0.000109 2009 8 31 55074 0.269882 0.420780 0.2213846 0.0001701 0.000347 -0.000180 0.000032 0.000034 0.0000028 0.0000082 0.000109 0.000083 2009 9 1 55075 0.270459 0.417975 0.2211624 0.0002869 0.000355 -0.000142 0.000032 0.000033 0.0000010 0.0000080 0.000063 0.000057 2009 9 2 55076 0.270935 0.414840 0.2207856 0.0004648 0.000322 -0.000150 0.000033 0.000034 0.0000048 0.0000081 0.000046 0.000043 2009 9 3 55077 0.271354 0.411714 0.2202289 0.0006418 0.000277 -0.000167 0.000033 0.000034 0.0000056 0.0000081 0.000037 0.000031 2009 9 4 55078 0.272163 0.408816 0.2194976 0.0008180 0.000238 -0.000225 0.000033 0.000033 0.0000019 0.0000080 0.000074 0.000066 2009 9 5 55079 0.272701 0.406249 0.2186242 0.0009346 0.000227 -0.000173 0.000033 0.000034 0.0000026 0.0000080 0.000095 0.000082 2009 9 6 55080 0.272833 0.403537 0.2176658 0.0009869 0.000226 -0.000078 0.000034 0.000035 0.0000037 0.0000080 0.000104 0.000086 2009 9 7 55081 0.272462 0.400599 0.2167135 0.0009255 0.000227 0.000009 0.000034 0.000034 0.0000037 0.0000080 0.000113 0.000090 2009 9 8 55082 0.272373 0.397444 0.2158568 0.0007957 0.000230 0.000087 0.000033 0.000033 0.0000028 0.0000080 0.000123 0.000093 2009 9 9 55083 0.272124 0.394524 0.2151561 0.0006167 0.000229 -0.000124 0.000033 0.000034 0.0000009 0.0000082 0.000054 0.000047 2009 9 10 55084 0.271906 0.391746 0.2146433 0.0004433 0.000201 -0.000198 0.000034 0.000035 0.0000008 0.0000081 0.000065 0.000064 2009 9 11 55085 0.271502 0.388949 0.2142932 0.0003043 0.000165 -0.000233 0.000035 0.000035 0.0000011 0.0000078 0.000097 0.000097 2009 9 12 55086 0.271629 0.385881 0.2140291 0.0002678 0.000160 -0.000229 0.000035 0.000035 0.0000027 0.0000079 0.000093 0.000093 2009 9 13 55087 0.271947 0.382744 0.2137366 0.0003579 0.000165 -0.000207 0.000035 0.000035 0.0000037 0.0000081 0.000076 0.000076 2009 9 14 55088 0.272512 0.379736 0.2133134 0.0005316 0.000170 -0.000177 0.000034 0.000034 0.0000028 0.0000081 0.000060 0.000059 2009 9 15 55089 0.273197 0.376527 0.2126861 0.0007459 0.000174 -0.000144 0.000033 0.000033 0.0000009 0.0000081 0.000043 0.000042 2009 9 16 55090 0.274191 0.373662 0.2118060 0.0009970 0.000139 -0.000117 0.000034 0.000033 0.0000018 0.0000079 0.000060 0.000066 2009 9 17 55091 0.275194 0.370984 0.2106584 0.0012598 0.000097 -0.000092 0.000034 0.000033 0.0000022 0.0000077 0.000086 0.000101 2009 9 18 55092 0.275613 0.368385 0.2093245 0.0013574 0.000060 -0.000070 0.000034 0.000034 0.0000014 0.0000075 0.000113 0.000136 2009 9 19 55093 0.275553 0.365755 0.2079675 0.0013206 0.000061 -0.000101 0.000035 0.000034 0.0000027 0.0000075 0.000109 0.000131 2009 9 20 55094 0.274916 0.363265 0.2066982 0.0011871 0.000080 -0.000152 0.000036 0.000034 0.0000040 0.0000078 0.000095 0.000111 2009 9 21 55095 0.274102 0.360494 0.2056254 0.0009377 0.000106 -0.000200 0.000036 0.000035 0.0000033 0.0000082 0.000081 0.000091 2009 9 22 55096 0.273437 0.357593 0.2048303 0.0006430 0.000135 -0.000246 0.000036 0.000035 0.0000014 0.0000083 0.000066 0.000070 2009 9 23 55097 0.272770 0.354482 0.2042914 0.0004419 0.000200 -0.000201 0.000036 0.000035 0.0000056 0.0000078 0.000066 0.000060 2009 9 24 55098 0.272000 0.351347 0.2039125 0.0003375 0.000271 -0.000131 0.000035 0.000035 0.0000063 0.0000075 0.000068 0.000052 2009 9 25 55099 0.271198 0.347963 0.2036100 0.0002875 0.000298 -0.000060 0.000035 0.000035 0.0000018 0.0000081 0.000064 0.000055 2009 9 26 55100 0.270262 0.345017 0.2033428 0.0002726 0.000266 -0.000051 0.000036 0.000035 0.0000025 0.0000086 0.000058 0.000055 2009 9 27 55101 0.269160 0.341956 0.2030644 0.0003044 0.000210 -0.000072 0.000037 0.000035 0.0000037 0.0000086 0.000052 0.000054 2009 9 28 55102 0.268277 0.338955 0.2026854 0.0004693 0.000151 -0.000102 0.000036 0.000035 0.0000028 0.0000085 0.000047 0.000052 2009 9 29 55103 0.267575 0.336639 0.2020959 0.0007184 0.000089 -0.000140 0.000036 0.000036 0.0000008 0.0000084 0.000042 0.000050 2009 9 30 55104 0.266535 0.334075 0.2012333 0.0009770 0.000104 -0.000162 0.000035 0.000036 0.0000047 0.0000082 0.000051 0.000056 2009 10 1 55105 0.265675 0.331321 0.2001343 0.0011874 0.000141 -0.000184 0.000033 0.000034 0.0000056 0.0000076 0.000065 0.000064 2009 10 2 55106 0.265022 0.328386 0.1988914 0.0012589 0.000180 -0.000206 0.000034 0.000034 0.0000021 0.0000075 0.000079 0.000073 2009 10 3 55107 0.264676 0.325631 0.1975984 0.0013031 0.000187 -0.000257 0.000035 0.000035 0.0000027 0.0000080 0.000082 0.000080 2009 10 4 55108 0.264198 0.322972 0.1962804 0.0013134 0.000181 -0.000312 0.000035 0.000035 0.0000037 0.0000071 0.000081 0.000086 2009 10 5 55109 0.263722 0.320331 0.1950163 0.0012087 0.000176 -0.000357 0.000035 0.000035 0.0000030 0.0000070 0.000080 0.000092 2009 10 6 55110 0.263126 0.317878 0.1939101 0.0010064 0.000173 -0.000390 0.000034 0.000034 0.0000015 0.0000076 0.000080 0.000099 2009 10 7 55111 0.262443 0.315500 0.1929824 0.0008438 0.000074 -0.000338 0.000033 0.000033 0.0000050 0.0000076 0.000125 0.000121 2009 10 8 55112 0.261957 0.313379 0.1922225 0.0006954 0.000025 -0.000235 0.000034 0.000034 0.0000055 0.0000079 0.000048 0.000041 2009 10 9 55113 0.261996 0.310883 0.1915873 0.0006141 0.000105 -0.000183 0.000034 0.000034 0.0000016 0.0000080 0.000054 0.000052 2009 10 10 55114 0.261775 0.308539 0.1910048 0.0005874 0.000156 -0.000172 0.000034 0.000033 0.0000025 0.0000080 0.000065 0.000063 2009 10 11 55115 0.261108 0.305922 0.1903993 0.0006563 0.000183 -0.000170 0.000035 0.000033 0.0000037 0.0000079 0.000062 0.000059 2009 10 12 55116 0.260139 0.303650 0.1896713 0.0008256 0.000206 -0.000170 0.000034 0.000033 0.0000070 0.0000073 0.000058 0.000055 2009 10 13 55117 0.258821 0.301333 0.1887291 0.0010772 0.000223 -0.000175 0.000033 0.000033 0.0000075 0.0000074 0.000054 0.000050 2009 10 14 55118 0.257125 0.299087 0.1875474 0.0012913 0.000233 -0.000183 0.000033 0.000033 0.0000017 0.0000080 0.000051 0.000046 2009 10 15 55119 0.254964 0.296167 0.1861674 0.0014304 0.000128 -0.000154 0.000034 0.000033 0.0000006 0.0000080 0.000043 0.000040 2009 10 16 55120 0.253558 0.293040 0.1846803 0.0014844 0.000067 -0.000187 0.000034 0.000033 0.0000007 0.0000081 0.000067 0.000064 2009 10 17 55121 0.252771 0.290508 0.1832068 0.0014297 0.000068 -0.000173 0.000035 0.000034 0.0000025 0.0000081 0.000088 0.000081 2009 10 18 55122 0.251873 0.287923 0.1818745 0.0012198 0.000083 -0.000136 0.000036 0.000036 0.0000037 0.0000082 0.000103 0.000090 2009 10 19 55123 0.250974 0.285545 0.1807696 0.0009736 0.000100 -0.000103 0.000036 0.000036 0.0000031 0.0000084 0.000117 0.000100 2009 10 20 55124 0.249980 0.283393 0.1798943 0.0007846 0.000119 -0.000077 0.000035 0.000035 0.0000020 0.0000084 0.000132 0.000110 2009 10 21 55125 0.249101 0.281490 0.1791843 0.0006445 -0.000030 -0.000025 0.000035 0.000035 0.0000057 0.0000078 0.000081 0.000062 2009 10 22 55126 0.247976 0.279230 0.1785729 0.0005697 -0.000027 -0.000131 0.000035 0.000036 0.0000063 0.0000081 0.000086 0.000073 2009 10 23 55127 0.247296 0.276612 0.1780188 0.0005598 0.000037 -0.000284 0.000035 0.000037 0.0000021 0.0000088 0.000113 0.000106 2009 10 24 55128 0.246089 0.273910 0.1774942 0.0005405 0.000052 -0.000308 0.000036 0.000037 0.0000029 0.0000085 0.000108 0.000103 2009 10 25 55129 0.244790 0.271020 0.1769243 0.0006314 0.000048 -0.000279 0.000037 0.000038 0.0000040 0.0000084 0.000090 0.000087 2009 10 26 55130 0.243954 0.268768 0.1762193 0.0008043 0.000044 -0.000243 0.000037 0.000039 0.0000027 0.0000084 0.000073 0.000070 2009 10 27 55131 0.242999 0.266601 0.1753322 0.0009887 0.000041 -0.000205 0.000037 0.000038 0.0000008 0.0000081 0.000055 0.000054 2009 10 28 55132 0.241819 0.264243 0.1742713 0.0011316 0.000019 -0.000190 0.000037 0.000037 0.0000020 0.0000083 0.000057 0.000059 2009 10 29 55133 0.240682 0.262163 0.1730948 0.0012121 -0.000006 -0.000182 0.000036 0.000037 0.0000024 0.0000087 0.000064 0.000069 2009 10 30 55134 0.239407 0.259767 0.1718509 0.0012519 -0.000026 -0.000181 0.000035 0.000037 0.0000010 0.0000080 0.000070 0.000079 2009 10 31 55135 0.237654 0.257600 0.1705661 0.0012937 -0.000013 -0.000217 0.000037 0.000038 0.0000028 0.0000081 0.000069 0.000078 2009 11 1 55136 0.235685 0.255643 0.1693264 0.0011763 0.000015 -0.000269 0.000038 0.000038 0.0000040 0.0000087 0.000065 0.000072 2009 11 2 55137 0.234532 0.253364 0.1682011 0.0010440 0.000046 -0.000324 0.000036 0.000037 0.0000028 0.0000085 0.000061 0.000066 2009 11 3 55138 0.234399 0.251609 0.1672180 0.0009272 0.000075 -0.000379 0.000036 0.000036 0.0000010 0.0000084 0.000057 0.000061 2009 11 4 55139 0.233955 0.250083 0.1663897 0.0007541 0.000104 -0.000381 0.000035 0.000036 0.0000054 0.0000085 0.000056 0.000059 2009 11 5 55140 0.233327 0.248236 0.1656813 0.0006720 0.000128 -0.000366 0.000035 0.000037 0.0000062 0.0000088 0.000056 0.000057 2009 11 6 55141 0.231948 0.246238 0.1650281 0.0006786 0.000144 -0.000342 0.000035 0.000037 0.0000017 0.0000089 0.000056 0.000056 2009 11 7 55142 0.229755 0.243695 0.1643564 0.0007271 0.000117 -0.000336 0.000035 0.000037 0.0000027 0.0000089 0.000061 0.000060 2009 11 8 55143 0.227157 0.241061 0.1635998 0.0008317 0.000073 -0.000332 0.000037 0.000039 0.0000042 0.0000093 0.000067 0.000066 2009 11 9 55144 0.224981 0.238631 0.1627213 0.0009749 0.000027 -0.000319 0.000039 0.000041 0.0000032 0.0000093 0.000073 0.000071 2009 11 10 55145 0.222837 0.236396 0.1616847 0.0011436 -0.000017 -0.000298 0.000040 0.000041 0.0000012 0.0000093 0.000079 0.000077 2009 11 11 55146 0.220643 0.234356 0.1604640 0.0012830 -0.000048 -0.000369 0.000040 0.000041 0.0000052 0.0000096 0.000136 0.000109 2009 11 12 55147 0.218065 0.232236 0.1591258 0.0013386 -0.000014 -0.000319 0.000037 0.000040 0.0000063 0.0000096 0.000170 0.000128 2009 11 13 55148 0.215700 0.230219 0.1578047 0.0012875 0.000081 -0.000151 0.000037 0.000040 0.0000024 0.0000095 0.000103 0.000109 2009 11 14 55149 0.212865 0.228335 0.1566409 0.0010714 0.000100 -0.000091 0.000039 0.000041 0.0000031 0.0000096 0.000072 0.000092 2009 11 15 55150 0.209699 0.226629 0.1556948 0.0008398 0.000085 -0.000086 0.000041 0.000042 0.0000042 0.0000094 0.000065 0.000080 2009 11 16 55151 0.206224 0.225135 0.1549652 0.0006431 0.000071 -0.000093 0.000041 0.000042 0.0000031 0.0000091 0.000058 0.000068 2009 11 17 55152 0.203234 0.223707 0.1544069 0.0005016 0.000054 -0.000113 0.000040 0.000042 0.0000009 0.0000091 0.000051 0.000055 2009 11 18 55153 0.200528 0.222344 0.1539458 0.0004313 0.000116 -0.000032 0.000041 0.000042 0.0000038 0.0000094 0.000065 0.000057 2009 11 19 55154 0.198074 0.220896 0.1535646 0.0003452 0.000164 -0.000054 0.000040 0.000041 0.0000071 0.0000093 0.000032 0.000023 2009 11 20 55155 0.195719 0.219416 0.1532142 0.0003623 0.000068 -0.000158 0.000040 0.000041 0.0000086 0.0000094 0.000091 0.000060 2009 11 21 55156 0.193596 0.218018 0.1527721 0.0005224 0.000044 -0.000220 0.000041 0.000041 0.0000067 0.0000097 0.000107 0.000075 2009 11 22 55157 0.191473 0.216755 0.1521420 0.0007244 0.000059 -0.000257 0.000039 0.000039 0.0000040 0.0000092 0.000093 0.000072 2009 11 23 55158 0.189707 0.215259 0.1513051 0.0009319 0.000068 -0.000285 0.000037 0.000037 0.0000028 0.0000085 0.000079 0.000069 2009 11 24 55159 0.187816 0.214006 0.1502920 0.0010631 0.000073 -0.000303 0.000037 0.000037 0.0000010 0.0000083 0.000065 0.000066 2009 11 25 55160 0.185876 0.212822 0.1491494 0.0011856 0.000006 -0.000303 0.000037 0.000037 0.0000047 0.0000082 0.000213 0.000129 2009 11 26 55161 0.183584 0.212417 0.1478948 0.0012834 -0.000064 -0.000251 0.000037 0.000037 0.0000052 0.0000084 0.000192 0.000130 2009 11 27 55162 0.180912 0.211904 0.1465551 0.0013498 -0.000124 -0.000179 0.000036 0.000037 0.0000030 0.0000086 0.000093 0.000102 2009 11 28 55163 0.178024 0.211051 0.1452079 0.0013069 -0.000129 -0.000158 0.000036 0.000038 0.0000036 0.0000088 0.000080 0.000088 2009 11 29 55164 0.174969 0.210078 0.1439482 0.0011818 -0.000125 -0.000141 0.000037 0.000038 0.0000040 0.0000086 0.000068 0.000075 2009 11 30 55165 0.172186 0.209479 0.1428495 0.0010013 -0.000111 -0.000132 0.000036 0.000036 0.0000027 0.0000083 0.000055 0.000062 2009 12 1 55166 0.168820 0.208712 0.1419521 0.0007969 -0.000087 -0.000132 0.000035 0.000035 0.0000008 0.0000076 0.000043 0.000049 2009 12 2 55167 0.165198 0.207651 0.1412390 0.0006561 -0.000050 -0.000174 0.000034 0.000035 0.0000046 0.0000074 0.000031 0.000034 2009 12 3 55168 0.161827 0.206174 0.1406117 0.0006345 -0.000007 -0.000228 0.000033 0.000035 0.0000059 0.0000078 0.000018 0.000018 2009 12 4 55169 0.158982 0.204743 0.1399516 0.0007337 0.000011 -0.000296 0.000033 0.000035 0.0000030 0.0000079 0.000136 0.000178 2009 12 5 55170 0.156642 0.203291 0.1391706 0.0008865 0.000021 -0.000309 0.000034 0.000036 0.0000034 0.0000083 0.000155 0.000200 2009 12 6 55171 0.154450 0.202123 0.1382308 0.0010321 0.000030 -0.000293 0.000038 0.000040 0.0000045 0.0000092 0.000120 0.000151 2009 12 7 55172 0.152197 0.201226 0.1371163 0.0012208 0.000035 -0.000270 0.000041 0.000043 0.0000035 0.0000098 0.000084 0.000101 2009 12 8 55173 0.149703 0.200522 0.1358307 0.0013625 0.000038 -0.000241 0.000040 0.000043 0.0000009 0.0000087 0.000049 0.000052 2009 12 9 55174 0.147236 0.199623 0.1344300 0.0014239 0.000089 -0.000102 0.000040 0.000043 0.0000020 0.0000085 0.000084 0.000069 2009 12 10 55175 0.145104 0.198562 0.1330319 0.0013527 0.000111 -0.000104 0.000040 0.000042 0.0000023 0.0000087 0.000089 0.000078 2009 12 11 55176 0.142583 0.197687 0.1317700 0.0011580 0.000119 -0.000156 0.000041 0.000042 0.0000010 0.0000088 0.000080 0.000078 2009 12 12 55177 0.140327 0.196743 0.1307345 0.0009203 0.000105 -0.000187 0.000041 0.000043 0.0000031 0.0000096 0.000070 0.000071 2009 12 13 55178 0.138305 0.196159 0.1298967 0.0007620 0.000083 -0.000211 0.000041 0.000043 0.0000047 0.0000098 0.000062 0.000062 2009 12 14 55179 0.136196 0.195912 0.1292026 0.0006489 0.000060 -0.000231 0.000041 0.000043 0.0000035 0.0000099 0.000053 0.000052 2009 12 15 55180 0.133234 0.195621 0.1286057 0.0005608 0.000037 -0.000252 0.000041 0.000043 0.0000010 0.0000095 0.000044 0.000042 2009 12 16 55181 0.130516 0.195108 0.1280351 0.0005798 0.000122 -0.000084 0.000041 0.000042 0.0000051 0.0000094 0.000051 0.000050 2009 12 17 55182 0.127836 0.194647 0.1274354 0.0006311 0.000156 0.000012 0.000042 0.000040 0.0000063 0.0000095 0.000054 0.000051 2009 12 18 55183 0.125412 0.193979 0.1267714 0.0007050 0.000064 -0.000006 0.000042 0.000041 0.0000024 0.0000095 0.000108 0.000119 2009 12 19 55184 0.123406 0.193670 0.1260170 0.0008202 0.000037 -0.000054 0.000042 0.000042 0.0000030 0.0000095 0.000113 0.000128 2009 12 20 55185 0.121745 0.193592 0.1251151 0.0009917 0.000046 -0.000111 0.000042 0.000041 0.0000042 0.0000093 0.000093 0.000108 2009 12 21 55186 0.120039 0.193554 0.1240491 0.0011416 0.000054 -0.000172 0.000039 0.000040 0.0000031 0.0000091 0.000074 0.000087 2009 12 22 55187 0.118103 0.193169 0.1228445 0.0012610 0.000058 -0.000233 0.000038 0.000041 0.0000010 0.0000092 0.000054 0.000066 2009 12 23 55188 0.116014 0.192900 0.1215344 0.0013331 0.000094 -0.000216 0.000039 0.000041 0.0000009 0.0000091 0.000090 0.000102 2009 12 24 55189 0.113872 0.192455 0.1202182 0.0012784 0.000069 -0.000214 0.000038 0.000041 0.0000022 0.0000090 0.000100 0.000112 2009 12 25 55190 0.112080 0.192049 0.1189566 0.0012219 0.000019 -0.000219 0.000039 0.000041 0.0000030 0.0000091 0.000095 0.000106 2009 12 26 55191 0.110403 0.191817 0.1177904 0.0010946 -0.000027 -0.000214 0.000041 0.000041 0.0000036 0.0000092 0.000090 0.000100 2009 12 27 55192 0.108657 0.191751 0.1167661 0.0009457 -0.000065 -0.000200 0.000041 0.000042 0.0000045 0.0000097 0.000085 0.000094 2009 12 28 55193 0.106800 0.191802 0.1159196 0.0007594 -0.000095 -0.000181 0.000042 0.000042 0.0000036 0.0000100 0.000080 0.000088 2009 12 29 55194 0.104835 0.191866 0.1152888 0.0005220 -0.000116 -0.000160 0.000042 0.000042 0.0000012 0.0000100 0.000076 0.000082 2009 12 30 55195 0.102809 0.191975 0.1148664 0.0003730 0.000052 -0.000060 0.000043 0.000042 0.0000020 0.0000096 0.000135 0.000140 2009 12 31 55196 0.100710 0.192257 0.1145165 0.0003994 0.000115 -0.000032 0.000043 0.000042 0.0000067 0.0000093 0.000141 0.000145 2010 1 1 55197 0.098726 0.192809 0.1140749 0.0005533 0.000117 -0.000045 0.000043 0.000044 0.0000065 0.0000092 0.000121 0.000124 2010 1 2 55198 0.096636 0.193215 0.1134294 0.0007800 0.000112 -0.000066 0.000043 0.000044 0.0000043 0.0000096 0.000100 0.000102 2010 1 3 55199 0.094705 0.193068 0.1125216 0.0010638 0.000098 -0.000095 0.000045 0.000047 0.0000053 0.0000107 0.000079 0.000081 2010 1 4 55200 0.092758 0.193452 0.1113549 0.0012663 0.000074 -0.000128 0.000047 0.000049 0.0000038 0.0000113 0.000058 0.000059 2010 1 5 55201 0.090532 0.193699 0.1100120 0.0014130 0.000041 -0.000165 0.000046 0.000047 0.0000009 0.0000113 0.000037 0.000038 2010 1 6 55202 0.087633 0.194129 0.1086246 0.0013311 0.000023 -0.000179 0.000045 0.000047 0.0000066 0.0000113 0.000040 0.000044 2010 1 7 55203 0.084315 0.194241 0.1073367 0.0011626 0.000007 -0.000185 0.000046 0.000045 0.0000078 0.0000110 0.000049 0.000057 2010 1 8 55204 0.081227 0.194421 0.1062509 0.0009768 -0.000008 -0.000189 0.000046 0.000045 0.0000022 0.0000111 0.000058 0.000071 2010 1 9 55205 0.077930 0.194474 0.1054075 0.0007348 -0.000033 -0.000193 0.000047 0.000049 0.0000034 0.0000115 0.000057 0.000068 2010 1 10 55206 0.074247 0.194381 0.1048094 0.0004836 -0.000054 -0.000198 0.000047 0.000048 0.0000053 0.0000112 0.000052 0.000060 2010 1 11 55207 0.070533 0.194261 0.1044109 0.0003317 -0.000065 -0.000204 0.000046 0.000047 0.0000038 0.0000106 0.000047 0.000052 2010 1 12 55208 0.067640 0.194353 0.1041315 0.0002611 -0.000064 -0.000215 0.000045 0.000046 0.0000009 0.0000106 0.000041 0.000043 2010 1 13 55209 0.064905 0.194508 0.1038922 0.0002492 -0.000057 -0.000221 0.000046 0.000048 0.0000064 0.0000098 0.000253 0.000159 2010 1 14 55210 0.062152 0.194910 0.1036422 0.0002665 -0.000041 -0.000229 0.000049 0.000048 0.0000076 0.0000095 0.000521 0.000306 2010 1 15 55211 0.059170 0.195186 0.1033214 0.0003838 0.000014 -0.000238 0.000049 0.000048 0.0000020 0.0000103 0.000195 0.000133 2010 1 16 55212 0.055833 0.195619 0.1028545 0.0005693 0.000096 -0.000302 0.000048 0.000047 0.0000036 0.0000109 0.000064 0.000067 2010 1 17 55213 0.052404 0.195718 0.1021960 0.0007534 0.000178 -0.000380 0.000057 0.000057 0.0000063 0.0000125 0.000078 0.000079 2010 1 18 55214 0.048883 0.195984 0.1013583 0.0009027 0.000248 -0.000443 0.000065 0.000065 0.0000069 0.0000138 0.000092 0.000091 2010 1 19 55215 0.044990 0.196117 0.1004125 0.0009708 0.000304 -0.000488 0.000065 0.000066 0.0000049 0.0000138 0.000106 0.000102 2010 1 20 55216 0.041033 0.196439 0.0994206 0.0009742 0.000112 -0.000307 0.000065 0.000066 0.0000012 0.0000138 0.000049 0.000049 2010 1 21 55217 0.037040 0.196811 0.0984061 0.0009853 0.000037 -0.000228 0.000064 0.000065 0.0000005 0.0000131 0.000047 0.000050 2010 1 22 55218 0.033601 0.197097 0.0973884 0.0010025 -0.000011 -0.000173 0.000064 0.000067 0.0000006 0.0000129 0.000059 0.000065 2010 1 23 55219 0.030616 0.197155 0.0963973 0.0009631 -0.000014 -0.000119 0.000065 0.000068 0.0000040 0.0000134 0.000056 0.000061 2010 1 24 55220 0.028163 0.197354 0.0954881 0.0008425 0.000000 -0.000074 0.000067 0.000064 0.0000063 0.0000134 0.000048 0.000050 2010 1 25 55221 0.025557 0.197986 0.0947211 0.0006827 0.000016 -0.000046 0.000063 0.000059 0.0000094 0.0000129 0.000040 0.000040 2010 1 26 55222 0.023080 0.198517 0.0940925 0.0005822 0.000030 -0.000034 0.000062 0.000063 0.0000125 0.0000120 0.000031 0.000029 2010 1 27 55223 0.020666 0.199248 0.0935333 0.0005661 0.000054 -0.000033 0.000064 0.000065 0.0000108 0.0000115 0.000043 0.000036 2010 1 28 55224 0.018929 0.200317 0.0929144 0.0006996 0.000077 -0.000045 0.000063 0.000063 0.0000067 0.0000113 0.000060 0.000049 2010 1 29 55225 0.017858 0.201863 0.0920944 0.0009557 -0.000079 -0.000233 0.000064 0.000063 0.0000022 0.0000108 0.000064 0.000053 2010 1 30 55226 0.016392 0.204026 0.0909960 0.0012788 -0.000156 -0.000305 0.000063 0.000065 0.0000042 0.0000116 0.000063 0.000052 2010 1 31 55227 0.014096 0.206323 0.0895595 0.0016029 -0.000177 -0.000309 0.000065 0.000065 0.0000066 0.0000131 0.000060 0.000050 2010 2 1 55228 0.011566 0.207960 0.0878374 0.0018304 -0.000188 -0.000307 0.000066 0.000066 0.0000050 0.0000130 0.000057 0.000047 2010 2 2 55229 0.008713 0.209262 0.0859774 0.0018631 -0.000187 -0.000298 0.000065 0.000068 0.0000012 0.0000134 0.000055 0.000045 2010 2 3 55230 0.006056 0.210320 0.0841301 0.0017921 -0.000211 -0.000236 0.000065 0.000069 0.0000085 0.0000139 0.000074 0.000059 2010 2 4 55231 0.003314 0.211845 0.0824540 0.0015370 -0.000157 -0.000249 0.000064 0.000065 0.0000130 0.0000136 0.000233 0.000209 2010 2 5 55232 0.000906 0.212744 0.0810372 0.0012743 -0.000005 -0.000346 0.000064 0.000052 0.0000129 0.0000129 0.000185 0.000184 2010 2 6 55233 -0.001071 0.213357 0.0798676 0.0010554 0.000031 -0.000374 0.000066 0.000052 0.0000101 0.0000132 0.000130 0.000137 2010 2 7 55234 -0.002842 0.214081 0.0789184 0.0008431 0.000011 -0.000364 0.000067 0.000061 0.0000065 0.0000134 0.000103 0.000107 2010 2 8 55235 -0.004825 0.215039 0.0781611 0.0006788 -0.000017 -0.000348 0.000064 0.000064 0.0000045 0.0000132 0.000076 0.000078 2010 2 9 55236 -0.006459 0.216232 0.0775394 0.0005773 -0.000054 -0.000327 0.000064 0.000060 0.0000010 0.0000140 0.000049 0.000049 2010 2 10 55237 -0.008312 0.217846 0.0769841 0.0005652 0.000016 -0.000184 0.000065 0.000060 0.0000031 0.0000137 0.000060 0.000061 2010 2 11 55238 -0.010818 0.219449 0.0763377 0.0006661 -0.000285 0.000284 0.000058 0.000061 0.0000006 0.0000135 0.000086 0.000083 2010 2 12 55239 -0.013636 0.221032 0.0756465 0.0008070 -0.000103 -0.000143 0.000057 0.000061 0.0000015 0.0000129 0.000053 0.000047 2010 2 13 55240 -0.015907 0.222555 0.0747605 0.0009935 -0.000046 -0.000300 0.000057 0.000059 0.0000064 0.0000129 0.000039 0.000033 2010 2 14 55241 -0.017850 0.224413 0.0736913 0.0011551 -0.000045 -0.000333 0.000054 0.000054 0.0000085 0.0000122 0.000037 0.000032 2010 2 15 55242 -0.019530 0.226286 0.0724428 0.0013146 -0.000055 -0.000332 0.000050 0.000048 0.0000120 0.0000112 0.000036 0.000031 2010 2 16 55243 -0.021171 0.228558 0.0710554 0.0014275 -0.000075 -0.000303 0.000049 0.000049 0.0000107 0.0000116 0.000034 0.000030 2010 2 17 55244 -0.022536 0.230871 0.0695809 0.0014932 -0.000100 -0.000254 0.000048 0.000051 0.0000020 0.0000115 0.000032 0.000029 2010 2 18 55245 -0.023438 0.232931 0.0680581 0.0014967 -0.000063 -0.000346 0.000048 0.000051 0.0000003 0.0000108 0.000045 0.000030 2010 2 19 55246 -0.024196 0.235179 0.0665725 0.0014156 -0.000112 -0.000179 0.000048 0.000051 0.0000003 0.0000106 0.000043 0.000037 2010 2 20 55247 -0.025097 0.237254 0.0652119 0.0012956 -0.000111 -0.000148 0.000049 0.000052 0.0000061 0.0000113 0.000039 0.000037 2010 2 21 55248 -0.026340 0.239158 0.0639713 0.0011756 -0.000081 -0.000200 0.000052 0.000056 0.0000082 0.0000113 0.000035 0.000034 2010 2 22 55249 -0.027511 0.240850 0.0628411 0.0010699 -0.000051 -0.000256 0.000054 0.000054 0.0000051 0.0000117 0.000032 0.000030 2010 2 23 55250 -0.028336 0.242578 0.0618202 0.0009803 -0.000021 -0.000313 0.000053 0.000053 0.0000011 0.0000122 0.000029 0.000027 2010 2 24 55251 -0.029175 0.244479 0.0608519 0.0010008 -0.000054 -0.000283 0.000052 0.000057 0.0000053 0.0000122 0.000038 0.000034 2010 2 25 55252 -0.030407 0.246621 0.0597762 0.0011880 -0.000102 -0.000230 0.000053 0.000058 0.0000088 0.0000120 0.000051 0.000044 2010 2 26 55253 -0.031553 0.248674 0.0584561 0.0014609 -0.000146 -0.000181 0.000053 0.000056 0.0000025 0.0000116 0.000064 0.000054 2010 2 27 55254 -0.032498 0.251011 0.0568957 0.0017301 -0.000169 -0.000139 0.000054 0.000057 0.0000090 0.0000119 0.000063 0.000052 2010 2 28 55255 -0.034051 0.253388 0.0550421 0.0019727 -0.000179 -0.000107 0.000054 0.000057 0.0000122 0.0000123 0.000056 0.000047 2010 3 1 55256 -0.035022 0.255572 0.0529799 0.0020920 -0.000185 -0.000083 0.000053 0.000054 0.0000076 0.0000120 0.000050 0.000042 2010 3 2 55257 -0.035928 0.257692 0.0509183 0.0019988 -0.000189 -0.000064 0.000051 0.000053 0.0000016 0.0000119 0.000043 0.000037 2010 3 3 55258 -0.036883 0.259829 0.0490364 0.0017576 0.000261 -0.000283 0.000051 0.000054 0.0000073 0.0000120 0.000078 0.000090 2010 3 4 55259 -0.038271 0.261877 0.0474024 0.0014769 0.000219 -0.000307 0.000049 0.000054 0.0000120 0.0000119 0.000076 0.000090 2010 3 5 55260 -0.039059 0.263869 0.0460255 0.0012084 -0.000013 -0.000249 0.000050 0.000054 0.0000032 0.0000120 0.000060 0.000069 2010 3 6 55261 -0.039936 0.265978 0.0449255 0.0009630 -0.000104 -0.000234 0.000052 0.000054 0.0000070 0.0000123 0.000053 0.000060 2010 3 7 55262 -0.041314 0.267682 0.0440378 0.0008250 -0.000141 -0.000228 0.000052 0.000052 0.0000093 0.0000120 0.000047 0.000054 2010 3 8 55263 -0.042948 0.269473 0.0432550 0.0007611 -0.000173 -0.000210 0.000052 0.000052 0.0000059 0.0000114 0.000042 0.000048 2010 3 9 55264 -0.044802 0.270946 0.0424560 0.0008369 -0.000198 -0.000184 0.000051 0.000051 0.0000013 0.0000113 0.000037 0.000043 2010 3 10 55265 -0.046157 0.272476 0.0415468 0.0009236 -0.000110 -0.000110 0.000051 0.000041 0.0000109 0.0000111 0.000040 0.000045 2010 3 11 55266 -0.047062 0.273908 0.0405758 0.0009821 0.000009 -0.000027 0.000051 0.000042 0.0000158 0.0000105 0.000044 0.000049 2010 3 12 55267 -0.048035 0.275747 0.0395810 0.0010905 0.000127 0.000050 0.000051 0.000050 0.0000037 0.0000108 0.000049 0.000054 2010 3 13 55268 -0.048704 0.277641 0.0384942 0.0011360 0.000113 0.000062 0.000052 0.000052 0.0000078 0.0000116 0.000048 0.000052 2010 3 14 55269 -0.049656 0.280122 0.0373805 0.0011206 0.000045 0.000043 0.000050 0.000052 0.0000094 0.0000112 0.000045 0.000048 2010 3 15 55270 -0.050821 0.282708 0.0362458 0.0011670 -0.000031 0.000012 0.000046 0.000050 0.0000055 0.0000103 0.000042 0.000045 2010 3 16 55271 -0.051856 0.285419 0.0350490 0.0012104 -0.000114 -0.000026 0.000045 0.000050 0.0000014 0.0000095 0.000039 0.000041 2010 3 17 55272 -0.052544 0.287660 0.0338086 0.0012363 -0.000110 -0.000066 0.000045 0.000046 0.0000085 0.0000097 0.000043 0.000043 2010 3 18 55273 -0.053205 0.289659 0.0325901 0.0011787 -0.000085 -0.000107 0.000045 0.000046 0.0000100 0.0000104 0.000047 0.000048 2010 3 19 55274 -0.053905 0.291101 0.0314869 0.0009786 -0.000060 -0.000147 0.000044 0.000049 0.0000027 0.0000105 0.000053 0.000052 2010 3 20 55275 -0.054397 0.292482 0.0305739 0.0008219 -0.000073 -0.000110 0.000044 0.000048 0.0000084 0.0000104 0.000049 0.000049 2010 3 21 55276 -0.054487 0.294094 0.0298260 0.0006704 -0.000100 -0.000045 0.000046 0.000045 0.0000129 0.0000101 0.000043 0.000044 2010 3 22 55277 -0.054452 0.296079 0.0292010 0.0005599 -0.000126 0.000019 0.000044 0.000044 0.0000088 0.0000097 0.000036 0.000039 2010 3 23 55278 -0.054665 0.298261 0.0286539 0.0005362 -0.000150 0.000084 0.000043 0.000046 0.0000018 0.0000097 0.000030 0.000034 2010 3 24 55279 -0.055173 0.300826 0.0280713 0.0006614 -0.000228 -0.000098 0.000043 0.000044 0.0000031 0.0000100 0.000072 0.000043 2010 3 25 55280 -0.055966 0.303553 0.0272732 0.0009548 -0.000294 -0.000306 0.000043 0.000044 0.0000051 0.0000101 0.000114 0.000053 2010 3 26 55281 -0.057001 0.306182 0.0261316 0.0013048 -0.000178 -0.000208 0.000043 0.000045 0.0000013 0.0000099 0.000045 0.000033 2010 3 27 55282 -0.057609 0.308208 0.0246740 0.0016149 -0.000160 -0.000157 0.000044 0.000045 0.0000044 0.0000097 0.000025 0.000027 2010 3 28 55283 -0.058274 0.310491 0.0229522 0.0018541 -0.000176 -0.000120 0.000045 0.000046 0.0000061 0.0000099 0.000025 0.000026 2010 3 29 55284 -0.058899 0.312631 0.0210233 0.0019777 -0.000191 -0.000081 0.000045 0.000046 0.0000040 0.0000101 0.000024 0.000026 2010 3 30 55285 -0.059896 0.314902 0.0190459 0.0019103 -0.000205 -0.000043 0.000043 0.000045 0.0000010 0.0000099 0.000024 0.000026 2010 3 31 55286 -0.060789 0.316838 0.0172333 0.0016406 -0.000179 -0.000032 0.000043 0.000044 0.0000005 0.0000098 0.000026 0.000029 2010 4 1 55287 -0.061070 0.319217 0.0157299 0.0013097 -0.000144 -0.000032 0.000042 0.000043 0.0000007 0.0000099 0.000029 0.000032 2010 4 2 55288 -0.061595 0.322004 0.0145719 0.0010220 -0.000147 -0.000049 0.000042 0.000043 0.0000035 0.0000098 0.000033 0.000035 2010 4 3 55289 -0.062106 0.324581 0.0136532 0.0008362 -0.000165 -0.000074 0.000042 0.000045 0.0000077 0.0000099 0.000036 0.000037 2010 4 4 55290 -0.062950 0.327269 0.0128560 0.0007609 -0.000184 -0.000101 0.000046 0.000048 0.0000110 0.0000103 0.000039 0.000039 2010 4 5 55291 -0.064115 0.329423 0.0120637 0.0008052 -0.000202 -0.000125 0.000050 0.000052 0.0000135 0.0000110 0.000043 0.000041 2010 4 6 55292 -0.065848 0.331314 0.0112002 0.0008983 -0.000221 -0.000143 0.000050 0.000050 0.0000107 0.0000115 0.000046 0.000043 2010 4 7 55293 -0.067063 0.332875 0.0102386 0.0010387 -0.000241 -0.000151 0.000049 0.000049 0.0000021 0.0000114 0.000049 0.000046 2010 4 8 55294 -0.067829 0.334913 0.0091217 0.0011833 -0.000054 -0.000207 0.000048 0.000050 0.0000004 0.0000111 0.000056 0.000043 2010 4 9 55295 -0.068175 0.337168 0.0078644 0.0013248 -0.000132 -0.000127 0.000049 0.000052 0.0000005 0.0000111 0.000041 0.000034 2010 4 10 55296 -0.068462 0.339673 0.0065117 0.0014156 -0.000183 -0.000039 0.000049 0.000052 0.0000049 0.0000113 0.000040 0.000035 2010 4 11 55297 -0.068303 0.342213 0.0050623 0.0014964 -0.000189 0.000035 0.000047 0.000051 0.0000077 0.0000111 0.000047 0.000039 2010 4 12 55298 -0.068121 0.345080 0.0035314 0.0015574 -0.000192 0.000103 0.000046 0.000049 0.0000055 0.0000108 0.000054 0.000044 2010 4 13 55299 -0.068125 0.347953 0.0019636 0.0015914 -0.000192 0.000160 0.000046 0.000049 0.0000016 0.0000101 0.000060 0.000048 2010 4 14 55300 -0.068413 0.350711 0.0004089 0.0015243 -0.000294 0.000108 0.000046 0.000048 0.0000056 0.0000099 0.000052 0.000039 2010 4 15 55301 -0.068870 0.353083 -0.0010886 0.0014133 -0.000213 0.000049 0.000046 0.000048 0.0000089 0.0000103 0.000053 0.000045 2010 4 16 55302 -0.068868 0.355239 -0.0024745 0.0012906 -0.000070 -0.000013 0.000046 0.000048 0.0000028 0.0000103 0.000058 0.000057 2010 4 17 55303 -0.069024 0.357448 -0.0036825 0.0011497 -0.000058 -0.000039 0.000046 0.000045 0.0000048 0.0000100 0.000055 0.000056 2010 4 18 55304 -0.069204 0.359706 -0.0047679 0.0010549 -0.000098 -0.000053 0.000045 0.000045 0.0000072 0.0000100 0.000049 0.000049 2010 4 19 55305 -0.068972 0.362012 -0.0058021 0.0010203 -0.000143 -0.000064 0.000044 0.000045 0.0000051 0.0000102 0.000044 0.000042 2010 4 20 55306 -0.068843 0.364650 -0.0068524 0.0010916 -0.000192 -0.000070 0.000045 0.000045 0.0000013 0.0000103 0.000039 0.000035 2010 4 21 55307 -0.068894 0.366970 -0.0080089 0.0012691 -0.000194 -0.000066 0.000045 0.000047 0.0000072 0.0000103 0.000039 0.000036 2010 4 22 55308 -0.069333 0.369362 -0.0093709 0.0014918 -0.000185 -0.000053 0.000045 0.000048 0.0000114 0.0000104 0.000041 0.000039 2010 4 23 55309 -0.069943 0.371851 -0.0109733 0.0016918 -0.000178 -0.000038 0.000044 0.000048 0.0000030 0.0000100 0.000043 0.000042 2010 4 24 55310 -0.070312 0.374060 -0.0127411 0.0018479 -0.000182 -0.000039 0.000045 0.000048 0.0000053 0.0000096 0.000043 0.000043 2010 4 25 55311 -0.070707 0.376344 -0.0146136 0.0019225 -0.000191 -0.000044 0.000046 0.000048 0.0000086 0.0000099 0.000041 0.000042 2010 4 26 55312 -0.071107 0.378575 -0.0165046 0.0018475 -0.000199 -0.000048 0.000045 0.000049 0.0000063 0.0000106 0.000040 0.000042 2010 4 27 55313 -0.070784 0.380913 -0.0183068 0.0017313 -0.000205 -0.000053 0.000045 0.000050 0.0000016 0.0000110 0.000039 0.000041 2010 4 28 55314 -0.070789 0.383505 -0.0199301 0.0014949 -0.000233 -0.000052 0.000046 0.000050 0.0000094 0.0000112 0.000044 0.000046 2010 4 29 55315 -0.071053 0.385470 -0.0212899 0.0011968 -0.000262 -0.000048 0.000047 0.000050 0.0000110 0.0000111 0.000050 0.000053 2010 4 30 55316 -0.071084 0.387524 -0.0223517 0.0009168 -0.000281 -0.000045 0.000046 0.000050 0.0000029 0.0000105 0.000056 0.000060 2010 5 1 55317 -0.070832 0.389504 -0.0231518 0.0007061 -0.000280 -0.000034 0.000046 0.000050 0.0000099 0.0000102 0.000055 0.000059 2010 5 2 55318 -0.070276 0.391405 -0.0238060 0.0006139 -0.000265 -0.000021 0.000052 0.000054 0.0000122 0.0000109 0.000051 0.000054 2010 5 3 55319 -0.069533 0.393386 -0.0243796 0.0005487 -0.000245 -0.000010 0.000055 0.000058 0.0000062 0.0000107 0.000047 0.000048 2010 5 4 55320 -0.068356 0.395410 -0.0249120 0.0005428 -0.000224 -0.000004 0.000052 0.000054 0.0000014 0.0000088 0.000043 0.000043 2010 5 5 55321 -0.066683 0.397377 -0.0254737 0.0005986 0.000104 0.000024 0.000051 0.000052 0.0000047 0.0000087 0.000056 0.000062 2010 5 6 55322 -0.064912 0.399829 -0.0261043 0.0006727 0.000089 0.000013 0.000051 0.000054 0.0000078 0.0000103 0.000059 0.000064 2010 5 7 55323 -0.062943 0.402390 -0.0268355 0.0007951 -0.000062 -0.000014 0.000052 0.000055 0.0000022 0.0000116 0.000058 0.000059 2010 5 8 55324 -0.060503 0.405204 -0.0277073 0.0009605 -0.000124 -0.000043 0.000053 0.000056 0.0000079 0.0000126 0.000053 0.000053 2010 5 9 55325 -0.058914 0.408068 -0.0287427 0.0011273 -0.000154 -0.000070 0.000051 0.000054 0.0000090 0.0000123 0.000047 0.000047 2010 5 10 55326 -0.057852 0.410644 -0.0299152 0.0012332 -0.000183 -0.000093 0.000048 0.000050 0.0000050 0.0000115 0.000041 0.000041 2010 5 11 55327 -0.056599 0.413093 -0.0311473 0.0012321 -0.000207 -0.000109 0.000046 0.000049 0.0000011 0.0000112 0.000035 0.000034 2010 5 12 55328 -0.055558 0.415348 -0.0323395 0.0011380 -0.000181 -0.000087 0.000046 0.000048 0.0000093 0.0000109 0.000032 0.000032 2010 5 13 55329 -0.054473 0.417510 -0.0334105 0.0009681 -0.000137 -0.000050 0.000043 0.000045 0.0000109 0.0000109 0.000031 0.000030 2010 5 14 55330 -0.053355 0.419462 -0.0342972 0.0007874 -0.000091 -0.000011 0.000044 0.000047 0.0000028 0.0000110 0.000029 0.000028 2010 5 15 55331 -0.051882 0.421506 -0.0349867 0.0006400 -0.000064 0.000014 0.000047 0.000051 0.0000060 0.0000105 0.000029 0.000027 2010 5 16 55332 -0.050583 0.423401 -0.0356390 0.0006344 -0.000050 0.000031 0.000046 0.000050 0.0000104 0.0000098 0.000031 0.000028 2010 5 17 55333 -0.049099 0.424992 -0.0363365 0.0007436 -0.000048 0.000041 0.000043 0.000046 0.0000078 0.0000092 0.000032 0.000028 2010 5 18 55334 -0.047442 0.426299 -0.0371562 0.0009165 -0.000060 0.000043 0.000041 0.000044 0.0000017 0.0000092 0.000033 0.000029 2010 5 19 55335 -0.045408 0.427774 -0.0382255 0.0011612 -0.000064 0.000062 0.000041 0.000043 0.0000089 0.0000092 0.000040 0.000032 2010 5 20 55336 -0.043492 0.429582 -0.0395343 0.0014010 -0.000116 0.000037 0.000041 0.000043 0.0000137 0.0000092 0.000132 0.000076 2010 5 21 55337 -0.041560 0.431458 -0.0410244 0.0015981 -0.000252 -0.000036 0.000042 0.000045 0.0000033 0.0000097 0.000091 0.000060 2010 5 22 55338 -0.039432 0.433357 -0.0426714 0.0017008 -0.000337 -0.000069 0.000043 0.000046 0.0000064 0.0000102 0.000062 0.000049 2010 5 23 55339 -0.037522 0.435497 -0.0443585 0.0016489 -0.000386 -0.000080 0.000040 0.000043 0.0000113 0.0000096 0.000058 0.000049 2010 5 24 55340 -0.035657 0.437514 -0.0459009 0.0014401 -0.000418 -0.000085 0.000037 0.000039 0.0000117 0.0000089 0.000054 0.000049 2010 5 25 55341 -0.034043 0.439624 -0.0471966 0.0011883 -0.000429 -0.000082 0.000036 0.000038 0.0000078 0.0000086 0.000049 0.000049 2010 5 26 55342 -0.032550 0.441675 -0.0482544 0.0009493 -0.000421 -0.000073 0.000036 0.000038 0.0000017 0.0000084 0.000045 0.000049 2010 5 27 55343 -0.031427 0.443742 -0.0491160 0.0007630 -0.000314 -0.000031 0.000036 0.000038 0.0000005 0.0000084 0.000567 0.001275 2010 5 28 55344 -0.030425 0.445365 -0.0498072 0.0006252 -0.000197 0.000013 0.000038 0.000040 0.0000006 0.0000087 0.000216 0.000461 2010 5 29 55345 -0.028977 0.446704 -0.0503449 0.0004691 -0.000144 0.000031 0.000039 0.000041 0.0000063 0.0000089 0.000031 0.000030 2010 5 30 55346 -0.027330 0.448101 -0.0507473 0.0003693 -0.000116 0.000038 0.000040 0.000043 0.0000091 0.0000092 0.000033 0.000031 2010 5 31 55347 -0.025941 0.450080 -0.0511163 0.0004030 -0.000093 0.000042 0.000041 0.000045 0.0000103 0.0000095 0.000036 0.000032 2010 6 1 55348 -0.024105 0.451851 -0.0515738 0.0005185 -0.000079 0.000045 0.000039 0.000044 0.0000076 0.0000094 0.000038 0.000033 2010 6 2 55349 -0.022387 0.453656 -0.0521586 0.0006414 -0.000073 0.000047 0.000039 0.000043 0.0000017 0.0000096 0.000040 0.000034 2010 6 3 55350 -0.020816 0.454969 -0.0528448 0.0007272 -0.000049 0.000047 0.000039 0.000043 0.0000006 0.0000097 0.000037 0.000033 2010 6 4 55351 -0.019305 0.456478 -0.0535790 0.0007203 -0.000024 0.000047 0.000039 0.000044 0.0000006 0.0000093 0.000032 0.000033 2010 6 5 55352 -0.017327 0.457776 -0.0543059 0.0007406 -0.000027 0.000066 0.000040 0.000045 0.0000072 0.0000091 0.000037 0.000036 2010 6 6 55353 -0.014569 0.459303 -0.0550206 0.0007082 -0.000043 0.000091 0.000042 0.000046 0.0000095 0.0000098 0.000045 0.000040 2010 6 7 55354 -0.011921 0.461098 -0.0556747 0.0006091 -0.000060 0.000116 0.000042 0.000045 0.0000059 0.0000101 0.000054 0.000045 2010 6 8 55355 -0.009543 0.462681 -0.0562189 0.0005007 -0.000077 0.000138 0.000041 0.000045 0.0000013 0.0000097 0.000062 0.000049 2010 6 9 55356 -0.006576 0.464239 -0.0566479 0.0003832 -0.000058 0.000130 0.000041 0.000040 0.0000135 0.0000098 0.000060 0.000052 2010 6 10 55357 -0.003767 0.466092 -0.0569665 0.0002542 -0.000033 0.000116 0.000041 0.000039 0.0000188 0.0000099 0.000058 0.000054 2010 6 11 55358 -0.001155 0.467668 -0.0571681 0.0001225 -0.000008 0.000097 0.000041 0.000042 0.0000045 0.0000095 0.000055 0.000056 2010 6 12 55359 0.001673 0.469309 -0.0572418 0.0000284 -0.000016 0.000099 0.000043 0.000042 0.0000074 0.0000097 0.000052 0.000054 2010 6 13 55360 0.004960 0.470811 -0.0572942 0.0000699 -0.000035 0.000106 0.000042 0.000043 0.0000100 0.0000095 0.000049 0.000050 2010 6 14 55361 0.007774 0.472326 -0.0574002 0.0001512 -0.000053 0.000112 0.000039 0.000041 0.0000061 0.0000090 0.000045 0.000046 2010 6 15 55362 0.010304 0.473358 -0.0576016 0.0002555 -0.000069 0.000115 0.000038 0.000041 0.0000010 0.0000089 0.000042 0.000042 2010 6 16 55363 0.012923 0.474408 -0.0579511 0.0004144 -0.000060 0.000078 0.000038 0.000041 0.0000071 0.0000086 0.000045 0.000043 2010 6 17 55364 0.015962 0.475372 -0.0584630 0.0005659 -0.000045 0.000037 0.000038 0.000040 0.0000079 0.0000085 0.000048 0.000045 2010 6 18 55365 0.019152 0.476452 -0.0590938 0.0006472 -0.000026 0.000003 0.000038 0.000040 0.0000019 0.0000087 0.000051 0.000047 2010 6 19 55366 0.022351 0.477546 -0.0597379 0.0005848 -0.000015 0.000015 0.000039 0.000042 0.0000064 0.0000092 0.000051 0.000047 2010 6 20 55367 0.024873 0.478505 -0.0601979 0.0003505 -0.000004 0.000045 0.000039 0.000041 0.0000091 0.0000088 0.000051 0.000046 2010 6 21 55368 0.027630 0.478734 -0.0604142 0.0000987 0.000006 0.000079 0.000038 0.000040 0.0000060 0.0000077 0.000050 0.000044 2010 6 22 55369 0.030637 0.478928 -0.0604056 -0.0001476 0.000013 0.000117 0.000037 0.000041 0.0000010 0.0000076 0.000050 0.000043 2010 6 23 55370 0.034115 0.478831 -0.0601735 -0.0003677 0.000011 0.000132 0.000037 0.000039 0.0000071 0.0000082 0.000368 0.000727 2010 6 24 55371 0.037827 0.479095 -0.0597300 -0.0005401 0.000061 0.000144 0.000038 0.000036 0.0000106 0.0000085 0.000304 0.000584 2010 6 25 55372 0.041375 0.479703 -0.0591346 -0.0006183 0.000119 0.000152 0.000038 0.000037 0.0000026 0.0000090 0.000114 0.000172 2010 6 26 55373 0.044200 0.480400 -0.0585110 -0.0005900 0.000085 0.000168 0.000039 0.000042 0.0000077 0.0000092 0.000071 0.000082 2010 6 27 55374 0.047215 0.481201 -0.0579359 -0.0005444 0.000024 0.000180 0.000038 0.000041 0.0000083 0.0000090 0.000062 0.000067 2010 6 28 55375 0.050173 0.481898 -0.0574497 -0.0004355 -0.000044 0.000187 0.000036 0.000039 0.0000045 0.0000087 0.000053 0.000053 2010 6 29 55376 0.053607 0.482441 -0.0571065 -0.0002741 -0.000113 0.000187 0.000036 0.000037 0.0000010 0.0000082 0.000045 0.000038 2010 6 30 55377 0.056963 0.482897 -0.0569425 -0.0001395 -0.000284 0.000094 0.000036 0.000038 0.0000084 0.0000077 0.000071 0.000076 2010 7 1 55378 0.060852 0.483107 -0.0568717 -0.0000346 -0.000240 0.000048 0.000036 0.000039 0.0000124 0.0000080 0.000091 0.000100 2010 7 2 55379 0.064590 0.483583 -0.0568314 0.0000234 -0.000121 0.000021 0.000036 0.000039 0.0000036 0.0000085 0.000110 0.000118 2010 7 3 55380 0.067989 0.483868 -0.0568679 0.0000497 -0.000114 0.000037 0.000036 0.000038 0.0000068 0.0000081 0.000121 0.000120 2010 7 4 55381 0.071021 0.483998 -0.0568966 0.0000205 -0.000146 0.000071 0.000038 0.000040 0.0000102 0.0000079 0.000129 0.000116 2010 7 5 55382 0.074426 0.484080 -0.0568556 -0.0001057 -0.000172 0.000104 0.000039 0.000041 0.0000112 0.0000077 0.000138 0.000113 2010 7 6 55383 0.077816 0.484027 -0.0566833 -0.0002521 -0.000195 0.000135 0.000038 0.000040 0.0000078 0.0000083 0.000146 0.000109 2010 7 7 55384 0.080981 0.484337 -0.0563325 -0.0004187 -0.000157 0.000056 0.000038 0.000041 0.0000015 0.0000090 0.000088 0.000072 2010 7 8 55385 0.083756 0.484229 -0.0558318 -0.0005672 -0.000156 0.000046 0.000038 0.000042 0.0000007 0.0000089 0.000075 0.000069 2010 7 9 55386 0.086311 0.484011 -0.0552295 -0.0006141 -0.000162 0.000049 0.000039 0.000043 0.0000006 0.0000089 0.000067 0.000071 2010 7 10 55387 0.088555 0.483888 -0.0546013 -0.0005838 -0.000150 0.000014 0.000040 0.000043 0.0000062 0.0000090 0.000062 0.000064 2010 7 11 55388 0.090810 0.483801 -0.0540619 -0.0004737 -0.000138 -0.000018 0.000040 0.000044 0.0000095 0.0000093 0.000056 0.000055 2010 7 12 55389 0.093165 0.483707 -0.0536747 -0.0003198 -0.000132 -0.000035 0.000040 0.000043 0.0000065 0.0000095 0.000051 0.000046 2010 7 13 55390 0.095450 0.483748 -0.0534865 -0.0000957 -0.000135 -0.000034 0.000039 0.000042 0.0000010 0.0000093 0.000045 0.000037 2010 7 14 55391 0.098128 0.483709 -0.0535317 0.0001312 -0.000136 0.000082 0.000039 0.000042 0.0000100 0.0000092 0.000157 0.000148 2010 7 15 55392 0.100375 0.483835 -0.0537556 0.0002661 -0.000142 0.000216 0.000039 0.000042 0.0000147 0.0000091 0.000285 0.000276 2010 7 16 55393 0.102295 0.483329 -0.0540669 0.0003248 -0.000153 0.000347 0.000040 0.000043 0.0000039 0.0000092 0.000414 0.000404 2010 7 17 55394 0.104190 0.482872 -0.0543856 0.0002769 -0.000224 0.000414 0.000040 0.000043 0.0000088 0.0000095 0.000386 0.000382 2010 7 18 55395 0.106473 0.481682 -0.0545841 0.0001395 -0.000301 0.000447 0.000040 0.000043 0.0000117 0.0000093 0.000322 0.000325 2010 7 19 55396 0.109448 0.480580 -0.0545988 -0.0000795 -0.000366 0.000454 0.000039 0.000042 0.0000080 0.0000087 0.000258 0.000268 2010 7 20 55397 0.112146 0.479428 -0.0544174 -0.0003120 -0.000413 0.000436 0.000038 0.000041 0.0000023 0.0000084 0.000194 0.000212 2010 7 21 55398 0.114595 0.478610 -0.0540278 -0.0005405 -0.000329 0.000324 0.000039 0.000042 0.0000055 0.0000086 0.000155 0.000171 2010 7 22 55399 0.117032 0.477863 -0.0534070 -0.0007245 -0.000211 0.000190 0.000039 0.000042 0.0000077 0.0000088 0.000119 0.000133 2010 7 23 55400 0.119516 0.477129 -0.0526178 -0.0007720 -0.000078 0.000052 0.000038 0.000040 0.0000024 0.0000087 0.000083 0.000095 2010 7 24 55401 0.121733 0.476362 -0.0518601 -0.0007264 -0.000021 0.000013 0.000038 0.000040 0.0000075 0.0000088 0.000068 0.000078 2010 7 25 55402 0.123759 0.474958 -0.0511580 -0.0006463 0.000007 0.000019 0.000037 0.000041 0.0000105 0.0000089 0.000060 0.000068 2010 7 26 55403 0.126236 0.473573 -0.0505794 -0.0004812 0.000032 0.000038 0.000036 0.000040 0.0000067 0.0000088 0.000053 0.000058 2010 7 27 55404 0.128864 0.472279 -0.0501920 -0.0003135 0.000051 0.000072 0.000036 0.000040 0.0000014 0.0000086 0.000045 0.000048 2010 7 28 55405 0.131255 0.471277 -0.0499513 -0.0001918 0.000136 0.000046 0.000036 0.000040 0.0000073 0.0000084 0.000065 0.000061 2010 7 29 55406 0.133376 0.470430 -0.0498338 -0.0000873 0.000214 0.000020 0.000036 0.000041 0.0000079 0.0000086 0.000089 0.000078 2010 7 30 55407 0.135281 0.469477 -0.0497783 -0.0000460 0.000274 0.000001 0.000036 0.000041 0.0000021 0.0000086 0.000112 0.000094 2010 7 31 55408 0.137272 0.467988 -0.0496918 -0.0000971 0.000267 0.000019 0.000035 0.000038 0.0000071 0.0000083 0.000108 0.000091 2010 8 1 55409 0.139468 0.466696 -0.0495352 -0.0001951 0.000231 0.000044 0.000037 0.000039 0.0000116 0.0000087 0.000098 0.000084 2010 8 2 55410 0.141635 0.465533 -0.0492834 -0.0002834 0.000179 0.000068 0.000039 0.000040 0.0000087 0.0000087 0.000088 0.000077 2010 8 3 55411 0.143835 0.464540 -0.0489455 -0.0003613 0.000118 0.000089 0.000039 0.000041 0.0000015 0.0000086 0.000078 0.000070 2010 8 4 55412 0.145939 0.463660 -0.0485718 -0.0004303 -0.000017 0.000056 0.000039 0.000042 0.0000103 0.0000088 0.000601 0.000234 2010 8 5 55413 0.147713 0.462520 -0.0481466 -0.0004490 -0.000093 0.000058 0.000038 0.000041 0.0000150 0.0000088 0.000195 0.000080 2010 8 6 55414 0.149642 0.461386 -0.0476840 -0.0004207 -0.000067 0.000131 0.000038 0.000041 0.0000037 0.0000086 0.000055 0.000051 2010 8 7 55415 0.151728 0.460002 -0.0472925 -0.0003219 -0.000061 0.000111 0.000039 0.000040 0.0000076 0.0000088 0.000068 0.000064 2010 8 8 55416 0.153885 0.458940 -0.0470567 -0.0001416 -0.000063 0.000053 0.000041 0.000042 0.0000122 0.0000090 0.000067 0.000064 2010 8 9 55417 0.156184 0.457790 -0.0470509 0.0001382 -0.000051 -0.000001 0.000041 0.000043 0.0000087 0.0000090 0.000066 0.000064 2010 8 10 55418 0.158482 0.456716 -0.0473484 0.0004451 -0.000028 -0.000046 0.000040 0.000043 0.0000016 0.0000089 0.000066 0.000063 2010 8 11 55419 0.161130 0.455342 -0.0479526 0.0006765 0.000001 0.000007 0.000041 0.000043 0.0000077 0.0000091 0.000070 0.000064 2010 8 12 55420 0.164099 0.454289 -0.0487082 0.0007462 0.000035 0.000081 0.000041 0.000044 0.0000112 0.0000095 0.000075 0.000065 2010 8 13 55421 0.166609 0.452938 -0.0494342 0.0006678 0.000069 0.000156 0.000041 0.000045 0.0000021 0.0000092 0.000080 0.000066 2010 8 14 55422 0.169005 0.451439 -0.0500413 0.0005246 0.000088 0.000181 0.000041 0.000044 0.0000080 0.0000089 0.000078 0.000068 2010 8 15 55423 0.171390 0.449639 -0.0504516 0.0002868 0.000101 0.000189 0.000042 0.000045 0.0000122 0.0000093 0.000075 0.000069 2010 8 16 55424 0.174497 0.447967 -0.0506159 0.0000504 0.000109 0.000186 0.000042 0.000044 0.0000086 0.0000084 0.000072 0.000070 2010 8 17 55425 0.177723 0.447071 -0.0505325 -0.0001865 0.000111 0.000172 0.000042 0.000045 0.0000014 0.0000086 0.000069 0.000072 2010 8 18 55426 0.180192 0.445942 -0.0502496 -0.0003428 0.000124 0.000137 0.000042 0.000047 0.0000091 0.0000096 0.000086 0.000075 2010 8 19 55427 0.182554 0.444847 -0.0498584 -0.0003959 0.000132 0.000092 0.000042 0.000046 0.0000100 0.0000089 0.000105 0.000078 2010 8 20 55428 0.184480 0.443034 -0.0494586 -0.0003668 0.000136 0.000042 0.000042 0.000046 0.0000028 0.0000084 0.000125 0.000082 2010 8 21 55429 0.186797 0.441230 -0.0491341 -0.0002535 0.000123 -0.000002 0.000040 0.000044 0.0000102 0.0000085 0.000114 0.000077 2010 8 22 55430 0.189132 0.439198 -0.0489380 -0.0001160 0.000107 -0.000043 0.000042 0.000046 0.0000147 0.0000091 0.000098 0.000071 2010 8 23 55431 0.192067 0.437223 -0.0489113 0.0000484 0.000090 -0.000077 0.000044 0.000048 0.0000099 0.0000095 0.000082 0.000066 2010 8 24 55432 0.194838 0.435772 -0.0490425 0.0001714 0.000074 -0.000104 0.000044 0.000049 0.0000016 0.0000097 0.000066 0.000060 2010 8 25 55433 0.197377 0.434488 -0.0492760 0.0002790 0.000061 -0.000101 0.000044 0.000049 0.0000090 0.0000092 0.000078 0.000074 2010 8 26 55434 0.199349 0.433260 -0.0496151 0.0003657 0.000055 -0.000087 0.000043 0.000048 0.0000100 0.0000094 0.000094 0.000091 2010 8 27 55435 0.201118 0.431695 -0.0500062 0.0003893 0.000057 -0.000065 0.000044 0.000048 0.0000029 0.0000097 0.000109 0.000108 2010 8 28 55436 0.202338 0.429962 -0.0503339 0.0003335 0.000071 -0.000057 0.000044 0.000048 0.0000082 0.0000096 0.000097 0.000097 2010 8 29 55437 0.203377 0.428398 -0.0506125 0.0002374 0.000094 -0.000052 0.000045 0.000047 0.0000126 0.0000102 0.000076 0.000075 2010 8 30 55438 0.204408 0.427159 -0.0508174 0.0001454 0.000125 -0.000044 0.000045 0.000048 0.0000085 0.0000102 0.000053 0.000054 2010 8 31 55439 0.205651 0.425668 -0.0509049 0.0000401 0.000160 -0.000031 0.000045 0.000048 0.0000011 0.0000101 0.000031 0.000032 2010 9 1 55440 0.206955 0.424607 -0.0508948 -0.0000422 0.000213 -0.000007 0.000044 0.000046 0.0000088 0.0000100 0.000071 0.000067 2010 9 2 55441 0.207612 0.423031 -0.0508176 -0.0000929 0.000265 0.000019 0.000044 0.000047 0.0000100 0.0000099 0.000119 0.000108 2010 9 3 55442 0.208791 0.421266 -0.0507263 -0.0000764 0.000307 0.000045 0.000045 0.000048 0.0000028 0.0000098 0.000166 0.000150 2010 9 4 55443 0.210037 0.419366 -0.0507022 0.0000488 0.000324 0.000079 0.000045 0.000050 0.0000093 0.0000094 0.000159 0.000135 2010 9 5 55444 0.211558 0.417763 -0.0508462 0.0002723 0.000322 0.000111 0.000045 0.000050 0.0000147 0.0000099 0.000142 0.000110 2010 9 6 55445 0.212727 0.416241 -0.0512398 0.0005157 0.000306 0.000137 0.000047 0.000046 0.0000169 0.0000108 0.000125 0.000086 2010 9 7 55446 0.214116 0.414408 -0.0519117 0.0007970 0.000276 0.000159 0.000047 0.000045 0.0000126 0.0000103 0.000108 0.000061 2010 9 8 55447 0.215817 0.412621 -0.0528409 0.0010196 0.000234 0.000145 0.000047 0.000049 0.0000029 0.0000103 0.000109 0.000113 2010 9 9 55448 0.217144 0.410820 -0.0539347 0.0010630 0.000166 0.000138 0.000047 0.000048 0.0000009 0.0000110 0.000075 0.000093 2010 9 10 55449 0.218743 0.408731 -0.0549747 0.0009220 0.000094 0.000132 0.000047 0.000048 0.0000008 0.0000108 0.000031 0.000054 2010 9 11 55450 0.220295 0.406567 -0.0557445 0.0006629 0.000036 0.000118 0.000048 0.000050 0.0000107 0.0000110 0.000026 0.000046 2010 9 12 55451 0.221830 0.404381 -0.0562742 0.0004165 -0.000007 0.000101 0.000048 0.000048 0.0000134 0.0000106 0.000035 0.000048 2010 9 13 55452 0.222777 0.402204 -0.0565320 0.0001252 -0.000037 0.000084 0.000046 0.000046 0.0000076 0.0000100 0.000044 0.000050 2010 9 14 55453 0.223737 0.399851 -0.0565273 -0.0000867 -0.000054 0.000068 0.000045 0.000047 0.0000019 0.0000103 0.000052 0.000052 2010 9 15 55454 0.224862 0.397004 -0.0564294 -0.0001517 0.000020 0.000141 0.000046 0.000049 0.0000062 0.0000104 0.000022 0.000022 2010 9 16 55455 0.226622 0.394737 -0.0562980 -0.0001316 0.000131 0.000159 0.000046 0.000048 0.0000097 0.0000102 0.000030 0.000062 2010 9 17 55456 0.228009 0.392870 -0.0561720 -0.0000726 0.000243 0.000149 0.000045 0.000047 0.0000032 0.0000102 0.000051 0.000126 2010 9 18 55457 0.229354 0.391111 -0.0561567 0.0000573 0.000222 0.000117 0.000044 0.000048 0.0000101 0.0000102 0.000049 0.000122 2010 9 19 55458 0.230610 0.389436 -0.0562887 0.0001826 0.000146 0.000073 0.000044 0.000045 0.0000145 0.0000098 0.000039 0.000093 2010 9 20 55459 0.231523 0.387950 -0.0565558 0.0003095 0.000067 0.000028 0.000043 0.000043 0.0000096 0.0000095 0.000027 0.000065 2010 9 21 55460 0.231996 0.386059 -0.0569152 0.0003860 -0.000010 -0.000015 0.000042 0.000045 0.0000018 0.0000097 0.000016 0.000036 2010 9 22 55461 0.232370 0.384119 -0.0573153 0.0004217 -0.000005 -0.000002 0.000043 0.000046 0.0000129 0.0000098 0.000018 0.000043 2010 9 23 55462 0.233106 0.381839 -0.0577741 0.0004806 0.000023 0.000021 0.000045 0.000045 0.0000179 0.0000096 0.000021 0.000056 2010 9 24 55463 0.234233 0.380165 -0.0582763 0.0005074 0.000066 0.000047 0.000045 0.000045 0.0000032 0.0000087 0.000024 0.000069 2010 9 25 55464 0.234711 0.378535 -0.0587281 0.0004663 0.000135 0.000021 0.000045 0.000045 0.0000088 0.0000085 0.000023 0.000067 2010 9 26 55465 0.235200 0.376707 -0.0591462 0.0003924 0.000216 -0.000014 0.000045 0.000046 0.0000128 0.0000091 0.000022 0.000062 2010 9 27 55466 0.235288 0.374886 -0.0594707 0.0002591 0.000298 -0.000044 0.000044 0.000047 0.0000088 0.0000093 0.000021 0.000058 2010 9 28 55467 0.235341 0.372716 -0.0596557 0.0001386 0.000377 -0.000072 0.000045 0.000048 0.0000019 0.0000093 0.000020 0.000053 2010 9 29 55468 0.235135 0.370386 -0.0597680 0.0000845 0.000408 -0.000042 0.000046 0.000049 0.0000068 0.0000091 0.000044 0.000059 2010 9 30 55469 0.234786 0.368062 -0.0598920 0.0001357 0.000415 0.000006 0.000045 0.000047 0.0000150 0.0000096 0.000074 0.000066 2010 10 1 55470 0.234246 0.365773 -0.0600893 0.0002400 0.000405 0.000053 0.000045 0.000047 0.0000213 0.0000097 0.000104 0.000074 2010 10 2 55471 0.234063 0.363465 -0.0604302 0.0004630 0.000391 0.000053 0.000046 0.000050 0.0000171 0.0000102 0.000094 0.000071 2010 10 3 55472 0.234016 0.360956 -0.0610840 0.0008301 0.000366 0.000032 0.000047 0.000050 0.0000135 0.0000108 0.000069 0.000064 2010 10 4 55473 0.234024 0.358493 -0.0621062 0.0011838 0.000330 0.000012 0.000045 0.000049 0.0000098 0.0000107 0.000045 0.000058 2010 10 5 55474 0.234204 0.356216 -0.0634704 0.0014808 0.000287 -0.000009 0.000045 0.000049 0.0000017 0.0000106 0.000019 0.000051 2010 10 6 55475 0.234839 0.353756 -0.0650993 0.0016532 0.000231 -0.000015 0.000044 0.000048 0.0000134 0.0000106 0.000020 0.000055 2010 10 7 55476 0.234980 0.351599 -0.0668114 0.0016703 0.000176 -0.000017 0.000044 0.000048 0.0000188 0.0000101 0.000025 0.000062 2010 10 8 55477 0.234874 0.349070 -0.0684221 0.0015335 0.000126 -0.000015 0.000045 0.000048 0.0000046 0.0000100 0.000029 0.000068 2010 10 9 55478 0.234457 0.346610 -0.0698321 0.0013040 0.000104 0.000016 0.000045 0.000048 0.0000073 0.0000101 0.000028 0.000064 2010 10 10 55479 0.234164 0.344120 -0.0710272 0.0010749 0.000098 0.000057 0.000043 0.000046 0.0000084 0.0000099 0.000024 0.000055 2010 10 11 55480 0.233964 0.341957 -0.0720036 0.0009084 0.000103 0.000096 0.000041 0.000045 0.0000138 0.0000102 0.000020 0.000046 2010 10 12 55481 0.233786 0.339416 -0.0728214 0.0007989 0.000118 0.000129 0.000041 0.000047 0.0000146 0.0000108 0.000016 0.000038 2010 10 13 55482 0.233883 0.337253 -0.0735901 0.0007578 0.000142 0.000156 0.000040 0.000044 0.0000029 0.0000106 0.000013 0.000029 2010 10 14 55483 0.234122 0.335520 -0.0743862 0.0007895 0.000166 0.000023 0.000041 0.000044 0.0000006 0.0000102 0.000014 0.000015 2010 10 15 55484 0.234342 0.333917 -0.0752251 0.0008858 0.000079 -0.000020 0.000043 0.000046 0.0000009 0.0000107 0.000032 0.000065 2010 10 16 55485 0.234076 0.332454 -0.0760990 0.0009453 0.000101 -0.000013 0.000042 0.000045 0.0000054 0.0000106 0.000033 0.000073 2010 10 17 55486 0.233539 0.330783 -0.0770797 0.0010245 0.000175 0.000000 0.000041 0.000044 0.0000080 0.0000100 0.000027 0.000058 2010 10 18 55487 0.233246 0.328906 -0.0781683 0.0011280 0.000247 0.000016 0.000041 0.000045 0.0000055 0.0000097 0.000020 0.000044 2010 10 19 55488 0.232903 0.326972 -0.0793432 0.0012355 0.000312 0.000036 0.000041 0.000045 0.0000014 0.0000088 0.000014 0.000029 2010 10 20 55489 0.232474 0.324968 -0.0805992 0.0012498 0.000317 0.000039 0.000042 0.000047 0.0000083 0.0000092 0.000020 0.000051 2010 10 21 55490 0.231849 0.323027 -0.0818382 0.0011813 0.000298 0.000040 0.000041 0.000046 0.0000133 0.0000099 0.000029 0.000083 2010 10 22 55491 0.231372 0.320597 -0.0829554 0.0010882 0.000273 0.000040 0.000042 0.000045 0.0000049 0.0000091 0.000039 0.000114 2010 10 23 55492 0.230630 0.318388 -0.0839225 0.0009438 0.000238 0.000049 0.000043 0.000047 0.0000094 0.0000086 0.000039 0.000112 2010 10 24 55493 0.230112 0.316429 -0.0847870 0.0008044 0.000201 0.000061 0.000050 0.000053 0.0000164 0.0000109 0.000035 0.000095 2010 10 25 55494 0.229017 0.314983 -0.0855244 0.0006664 0.000170 0.000071 0.000056 0.000059 0.0000132 0.0000133 0.000032 0.000078 2010 10 26 55495 0.227483 0.312919 -0.0861212 0.0005770 0.000149 0.000081 0.000056 0.000060 0.0000015 0.0000130 0.000028 0.000061 2010 10 27 55496 0.226329 0.310745 -0.0866614 0.0005376 0.000200 0.000064 0.000055 0.000060 0.0000125 0.0000123 0.000036 0.000076 2010 10 28 55497 0.225432 0.308277 -0.0872115 0.0005690 0.000266 0.000046 0.000056 0.000057 0.0000145 0.0000128 0.000045 0.000093 2010 10 29 55498 0.224665 0.306053 -0.0878459 0.0007096 0.000337 0.000029 0.000056 0.000057 0.0000054 0.0000129 0.000054 0.000110 2010 10 30 55499 0.224146 0.303517 -0.0886511 0.0009475 0.000378 0.000040 0.000058 0.000060 0.0000069 0.0000126 0.000051 0.000104 2010 10 31 55500 0.223352 0.301668 -0.0897345 0.0012198 0.000404 0.000061 0.000054 0.000058 0.0000104 0.0000125 0.000043 0.000090 2010 11 1 55501 0.222599 0.299463 -0.0911107 0.0014780 0.000422 0.000082 0.000051 0.000056 0.0000139 0.0000116 0.000035 0.000075 2010 11 2 55502 0.221524 0.297244 -0.0927210 0.0016794 0.000431 0.000101 0.000051 0.000051 0.0000132 0.0000115 0.000027 0.000061 2010 11 3 55503 0.221000 0.294236 -0.0944569 0.0017646 0.000429 0.000117 0.000050 0.000050 0.0000016 0.0000111 0.000019 0.000046 2010 11 4 55504 0.220666 0.291898 -0.0961571 0.0016431 0.000381 0.000112 0.000051 0.000053 0.0000007 0.0000111 0.000021 0.000048 2010 11 5 55505 0.220476 0.289516 -0.0977127 0.0014366 0.000324 0.000098 0.000052 0.000053 0.0000008 0.0000119 0.000024 0.000052 2010 11 6 55506 0.220257 0.287284 -0.0990644 0.0012300 0.000317 0.000082 0.000053 0.000054 0.0000060 0.0000121 0.000024 0.000053 2010 11 7 55507 0.219535 0.285382 -0.1001451 0.0009719 0.000329 0.000062 0.000050 0.000052 0.0000085 0.0000115 0.000023 0.000053 2010 11 8 55508 0.217665 0.283070 -0.1009900 0.0007620 0.000342 0.000039 0.000047 0.000050 0.0000059 0.0000107 0.000023 0.000052 2010 11 9 55509 0.216263 0.280656 -0.1016732 0.0006230 0.000356 0.000015 0.000047 0.000049 0.0000017 0.0000108 0.000023 0.000052 2010 11 10 55510 0.215000 0.278753 -0.1022543 0.0005785 0.000326 -0.000033 0.000047 0.000049 0.0000095 0.0000109 0.000025 0.000054 2010 11 11 55511 0.213846 0.276852 -0.1028423 0.0006321 0.000287 -0.000081 0.000047 0.000050 0.0000110 0.0000101 0.000027 0.000056 2010 11 12 55512 0.212739 0.275090 -0.1035271 0.0007532 0.000252 -0.000121 0.000047 0.000048 0.0000030 0.0000101 0.000030 0.000059 2010 11 13 55513 0.212001 0.273500 -0.1043467 0.0009055 0.000250 -0.000113 0.000047 0.000049 0.0000072 0.0000107 0.000027 0.000053 2010 11 14 55514 0.211006 0.272296 -0.1053250 0.0010336 0.000262 -0.000081 0.000049 0.000051 0.0000096 0.0000110 0.000022 0.000044 2010 11 15 55515 0.210033 0.270614 -0.1064262 0.0011437 0.000277 -0.000044 0.000048 0.000049 0.0000059 0.0000105 0.000018 0.000035 2010 11 16 55516 0.208873 0.268602 -0.1075900 0.0011851 0.000293 -0.000006 0.000047 0.000049 0.0000010 0.0000105 0.000013 0.000026 2010 11 17 55517 0.208002 0.266045 -0.1087635 0.0011375 0.000318 0.000000 0.000047 0.000050 0.0000098 0.0000110 0.000011 0.000018 2010 11 18 55518 0.207142 0.263503 -0.1098924 0.0010667 0.000342 -0.000009 0.000046 0.000050 0.0000111 0.0000106 0.000010 0.000010 2010 11 19 55519 0.206475 0.260900 -0.1109050 0.0009321 0.000329 -0.000005 0.000046 0.000049 0.0000034 0.0000106 0.000023 0.000050 2010 11 20 55520 0.205585 0.258358 -0.1117330 0.0007720 0.000301 -0.000004 0.000045 0.000047 0.0000072 0.0000105 0.000026 0.000062 2010 11 21 55521 0.205156 0.256116 -0.1124050 0.0006179 0.000270 -0.000022 0.000045 0.000048 0.0000105 0.0000107 0.000024 0.000058 2010 11 22 55522 0.204803 0.254194 -0.1129652 0.0005255 0.000239 -0.000055 0.000046 0.000050 0.0000073 0.0000112 0.000022 0.000054 2010 11 23 55523 0.204244 0.252294 -0.1134560 0.0004861 0.000209 -0.000095 0.000046 0.000049 0.0000018 0.0000110 0.000020 0.000050 2010 11 24 55524 0.202828 0.250678 -0.1139461 0.0005054 0.000245 -0.000299 0.000045 0.000048 0.0000104 0.0000111 0.000053 0.000044 2010 11 25 55525 0.201243 0.248737 -0.1145016 0.0006277 0.000278 -0.000492 0.000045 0.000048 0.0000179 0.0000111 0.001548 0.000963 2010 11 26 55526 0.199938 0.246974 -0.1152128 0.0008123 0.000296 -0.000607 0.000046 0.000050 0.0000150 0.0000110 0.003006 0.001869 2010 11 27 55527 0.198781 0.245548 -0.1161367 0.0010471 0.000275 -0.000551 0.000047 0.000051 0.0000103 0.0000110 0.002295 0.001434 2010 11 28 55528 0.197273 0.244395 -0.1173209 0.0012872 0.000259 -0.000461 0.000050 0.000055 0.0000080 0.0000107 0.001584 0.000998 2010 11 29 55529 0.195833 0.242774 -0.1186708 0.0013707 0.000248 -0.000342 0.000051 0.000056 0.0000058 0.0000108 0.000873 0.000563 2010 11 30 55530 0.194732 0.241084 -0.1200603 0.0013660 0.000241 -0.000205 0.000050 0.000053 0.0000015 0.0000111 0.000162 0.000127 2010 12 1 55531 0.193555 0.239689 -0.1214417 0.0012927 0.000305 -0.000069 0.000048 0.000051 0.0000115 0.0000108 0.000020 0.000050 2010 12 2 55532 0.192131 0.238425 -0.1226821 0.0011207 0.000385 0.000054 0.000049 0.000053 0.0000176 0.0000109 0.000028 0.000066 2010 12 3 55533 0.191007 0.236894 -0.1236694 0.0008973 0.000461 0.000155 0.000050 0.000056 0.0000045 0.0000113 0.000035 0.000083 2010 12 4 55534 0.190021 0.235420 -0.1244059 0.0006332 0.000454 0.000158 0.000051 0.000055 0.0000054 0.0000114 0.000033 0.000075 2010 12 5 55535 0.188308 0.234024 -0.1249405 0.0004592 0.000412 0.000104 0.000051 0.000055 0.0000085 0.0000110 0.000026 0.000059 2010 12 6 55536 0.186406 0.232393 -0.1253669 0.0004128 0.000365 0.000025 0.000049 0.000053 0.0000060 0.0000109 0.000019 0.000043 2010 12 7 55537 0.184913 0.230861 -0.1257788 0.0004489 0.000315 -0.000071 0.000048 0.000051 0.0000013 0.0000103 0.000013 0.000027 2010 12 8 55538 0.183783 0.229501 -0.1262382 0.0005104 0.000287 -0.000134 0.000048 0.000051 0.0000067 0.0000101 0.000010 0.000011 2010 12 9 55539 0.183045 0.228407 -0.1268013 0.0006240 0.000330 -0.000204 0.000049 0.000050 0.0000109 0.0000108 0.000015 0.000027 2010 12 10 55540 0.181802 0.227737 -0.1274716 0.0006903 0.000394 -0.000267 0.000049 0.000051 0.0000028 0.0000112 0.000022 0.000053 2010 12 11 55541 0.179880 0.226787 -0.1281778 0.0007133 0.000399 -0.000263 0.000049 0.000052 0.0000075 0.0000114 0.000022 0.000056 2010 12 12 55542 0.177757 0.225752 -0.1288967 0.0007287 0.000381 -0.000223 0.000048 0.000049 0.0000087 0.0000113 0.000020 0.000050 2010 12 13 55543 0.175140 0.225140 -0.1296359 0.0007241 0.000360 -0.000170 0.000047 0.000050 0.0000050 0.0000112 0.000017 0.000044 2010 12 14 55544 0.171858 0.223981 -0.1303511 0.0006843 0.000337 -0.000111 0.000048 0.000051 0.0000012 0.0000111 0.000015 0.000038 2010 12 15 55545 0.168408 0.222455 -0.1309761 0.0005823 0.000290 -0.000062 0.000047 0.000051 0.0000073 0.0000109 0.000118 0.000080 2010 12 16 55546 0.166006 0.220789 -0.1315322 0.0005209 0.000257 -0.000042 0.000048 0.000052 0.0000114 0.0000110 0.000101 0.000083 2010 12 17 55547 0.164906 0.219736 -0.1320332 0.0004508 0.000232 -0.000039 0.000049 0.000055 0.0000031 0.0000114 0.000038 0.000070 2010 12 18 55548 0.164103 0.218821 -0.1324155 0.0003275 0.000239 -0.000066 0.000051 0.000056 0.0000100 0.0000116 0.000019 0.000059 2010 12 19 55549 0.163200 0.217756 -0.1326793 0.0002047 0.000260 -0.000112 0.000054 0.000057 0.0000145 0.0000111 0.000017 0.000049 2010 12 20 55550 0.161409 0.216705 -0.1328209 0.0001020 0.000283 -0.000166 0.000054 0.000059 0.0000088 0.0000111 0.000015 0.000038 2010 12 21 55551 0.159204 0.215481 -0.1329024 0.0001007 0.000305 -0.000221 0.000053 0.000057 0.0000017 0.0000119 0.000012 0.000028 2010 12 22 55552 0.157025 0.214415 -0.1330783 0.0002613 0.000279 -0.000245 0.000054 0.000057 0.0000004 0.0000125 0.000021 0.000044 2010 12 23 55553 0.154838 0.213230 -0.1334320 0.0004661 0.000238 -0.000255 0.000054 0.000058 0.0000005 0.0000120 0.000031 0.000067 2010 12 24 55554 0.153143 0.212299 -0.1339861 0.0006686 0.000227 -0.000256 0.000053 0.000057 0.0000099 0.0000114 0.000033 0.000073 2010 12 25 55555 0.151470 0.211557 -0.1347324 0.0008440 0.000226 -0.000247 0.000054 0.000058 0.0000177 0.0000121 0.000031 0.000072 2010 12 26 55556 0.149598 0.210603 -0.1357018 0.0010719 0.000224 -0.000228 0.000056 0.000063 0.0000140 0.0000143 0.000030 0.000072 2010 12 27 55557 0.147329 0.209353 -0.1368307 0.0011511 0.000221 -0.000200 0.000052 0.000070 0.0000070 0.0000155 0.000029 0.000072 2010 12 28 55558 0.144572 0.207791 -0.1379451 0.0010534 0.000217 -0.000168 0.000056 0.000072 0.0000017 0.0000150 0.000027 0.000071 2010 12 29 55559 0.141007 0.206567 -0.1389107 0.0008467 0.000184 -0.000110 0.000067 0.000071 0.0000007 0.0000153 0.000029 0.000072 2010 12 30 55560 0.137314 0.205262 -0.1396578 0.0006531 0.000144 -0.000051 0.000066 0.000071 0.0000008 0.0000146 0.000031 0.000074 2010 12 31 55561 0.134060 0.204158 -0.1401867 0.0004628 0.000143 -0.000040 0.000068 0.000068 0.0000029 0.0000129 0.000029 0.000068 2011 1 1 55562 0.130780 0.203060 -0.1405590 0.0003001 0.000313 -0.000047 0.000144 0.000141 0.0000129 0.0000218 0.000006 0.000020 2011 1 2 55563 0.127352 0.202170 -0.1408005 0.0002060 0.000343 -0.000074 0.000139 0.000144 0.0000013 0.0000209 0.000000 0.000002 2011 1 3 55564 0.124663 0.201341 -0.1409736 0.0001672 0.000299 -0.000119 0.000123 0.000130 0.0000015 0.0000251 0.000007 0.000016 2011 1 4 55565 0.121413 0.200758 -0.1411296 0.0001977 0.000239 -0.000159 0.000121 0.000134 0.0000004 0.0000279 0.000014 0.000033 2011 1 5 55566 0.117765 0.200098 -0.1413483 0.0002535 0.000210 -0.000224 0.000125 0.000137 0.0000017 0.0000294 0.000043 0.000058 2011 1 6 55567 0.113935 0.199864 -0.1416403 0.0003698 0.000215 -0.000261 0.000135 0.000292 0.0000160 0.0000295 0.000090 0.000121 2011 1 7 55568 0.109984 0.199410 -0.1420670 0.0004851 0.000186 -0.000258 0.000131 0.000145 0.0000054 0.0000277 0.000076 0.000100 2011 1 8 55569 0.106068 0.198759 -0.1425991 0.0005498 0.000189 -0.000238 0.000136 0.000146 0.0000029 0.0000225 0.000066 0.000086 2011 1 9 55570 0.102803 0.197486 -0.1431333 0.0005877 -0.000240 -0.000303 0.000145 0.000142 0.0000010 0.0000222 0.000015 0.000019 2011 1 10 55571 0.101064 0.196439 -0.1437230 0.0005867 -0.000116 -0.000267 0.000146 0.000137 0.0000011 0.0000272 0.000006 0.000009 2011 1 11 55572 0.099677 0.196083 -0.1443239 0.0005863 0.000148 -0.000208 0.000145 0.000139 0.0000006 0.0000282 0.000028 0.000037 2011 1 12 55573 0.098924 0.195678 -0.1449071 0.0005596 0.000353 -0.000165 0.000145 0.000138 0.0000178 0.0000300 0.000049 0.000064 2011 1 13 55574 0.097784 0.195955 -0.1454671 0.0005228 0.000817 -0.000126 0.000157 0.000150 0.0000246 0.0000335 0.000054 0.000130 2011 1 14 55575 0.095478 0.196087 -0.1459359 0.0004222 0.000713 -0.000119 0.000156 0.000150 0.0000014 0.0000338 0.000087 0.000124 2011 1 15 55576 0.092346 0.195875 -0.1463947 0.0003470 0.000510 -0.000133 0.000157 0.000142 0.0000269 0.0000258 0.000121 0.000121 2011 1 16 55577 0.088836 0.195929 -0.1466375 0.0002847 0.000271 0.000352 0.000151 0.000135 0.0000013 0.0000213 0.000535 0.000227 2011 1 17 55578 0.085077 0.195548 -0.1468916 0.0002530 0.000164 0.000146 0.000140 0.000137 0.0000013 0.0000250 0.000382 0.000170 2011 1 18 55579 0.081199 0.195268 -0.1471788 0.0003525 0.000115 -0.000129 0.000137 0.000139 0.0000125 0.0000249 0.000223 0.000111 2011 1 19 55580 0.077814 0.194802 -0.1475593 0.0004249 0.000059 -0.000418 0.000136 0.000138 0.0000037 0.0000269 0.000023 0.000037 2011 1 20 55581 0.074547 0.194696 -0.1480420 0.0006156 0.000135 -0.000341 0.000150 0.000151 0.0000081 0.0000308 0.000037 0.000045 2011 1 21 55582 0.071277 0.194666 -0.1487934 0.0008446 0.000227 -0.000272 0.000146 0.000146 0.0000051 0.0000310 0.000057 0.000056 2011 1 22 55583 0.067767 0.194591 -0.1497052 0.0010434 0.000205 -0.000239 0.000146 0.000143 0.0000017 0.0000259 0.000051 0.000053 2011 1 23 55584 0.064823 0.194616 -0.1508298 0.0010992 0.000045 -0.000145 0.000137 0.000133 0.0000009 0.0000226 0.000016 0.000015 2011 1 24 55585 0.060700 0.194896 -0.1519858 0.0011153 0.000063 -0.000145 0.000382 0.000118 0.0000151 0.0000273 0.000023 0.000027 2011 1 25 55586 0.058225 0.195809 -0.1530855 0.0009803 0.000133 -0.000185 0.000252 0.000116 0.0000050 0.0000284 0.000031 0.000040 2011 1 26 55587 0.055061 0.196351 -0.1540053 0.0008141 0.000190 -0.000227 0.000123 0.000117 0.0000076 0.0000276 0.000039 0.000053 2011 1 27 55588 0.052221 0.197284 -0.1547069 0.0005623 0.000266 -0.000160 0.000133 0.000136 0.0000014 0.0000313 0.000064 0.000095 2011 1 28 55589 0.049422 0.198105 -0.1552193 0.0003172 0.000264 -0.000231 0.000133 0.000136 0.0000059 0.0000293 0.000058 0.000084 2011 1 29 55590 0.047540 0.198580 -0.1555719 0.0003250 0.000238 -0.000294 0.000140 0.000131 0.0000176 0.0000225 0.000052 0.000073 2011 1 30 55591 0.046065 0.199346 -0.1558688 0.0002940 0.000213 -0.000335 0.000135 0.000125 0.0000116 0.0000224 0.000045 0.000062 2011 1 31 55592 0.045103 0.199784 -0.1561855 0.0003321 0.000191 -0.000356 0.000123 0.000126 0.0000135 0.0000257 0.000039 0.000051 2011 2 1 55593 0.044436 0.200675 -0.1565698 0.0004055 0.000174 -0.000361 0.000121 0.000119 0.0000047 0.0000265 0.000032 0.000039 2011 2 2 55594 0.043649 0.201453 -0.1570371 0.0005670 0.000057 -0.000130 0.000121 0.000121 0.0000157 0.0000275 0.000070 0.000040 2011 2 3 55595 0.042813 0.202275 -0.1576789 0.0006853 0.000005 -0.000002 0.000121 0.000130 0.0000137 0.0000279 0.000166 0.000267 2011 2 4 55596 0.041536 0.202581 -0.1584075 0.0007822 0.000052 -0.000060 0.000119 0.000128 0.0000048 0.0000284 0.000089 0.000144 2011 2 5 55597 0.040230 0.202910 -0.1592646 0.0008051 0.000087 -0.000068 0.000119 0.000127 0.0000114 0.0000243 0.000049 0.000070 2011 2 6 55598 0.039049 0.203388 -0.1599922 0.0007784 0.000115 -0.000053 0.000117 0.000119 0.0000115 0.0000222 0.000046 0.000066 2011 2 7 55599 0.038221 0.204330 -0.1607544 0.0007339 0.000148 -0.000058 0.000114 0.000115 0.0000133 0.0000254 0.000043 0.000062 2011 2 8 55600 0.037485 0.205738 -0.1614656 0.0006664 0.000182 -0.000081 0.000111 0.000115 0.0000046 0.0000265 0.000040 0.000058 2011 2 9 55601 0.036206 0.207276 -0.1620482 0.0005868 0.000203 -0.000128 0.000106 0.000110 0.0000133 0.0000266 0.000132 0.000083 2011 2 10 55602 0.034269 0.208614 -0.1626196 0.0005121 0.000204 -0.000190 0.000106 0.000109 0.0000103 0.0000265 0.000532 0.000388 2011 2 11 55603 0.032119 0.209566 -0.1630886 0.0004233 0.000188 -0.000257 0.000110 0.000114 0.0000046 0.0000274 0.000234 0.000210 2011 2 12 55604 0.030689 0.210486 -0.1634603 0.0003795 0.000195 -0.000335 0.000113 0.000115 0.0000240 0.0000239 0.000076 0.000102 2011 2 13 55605 0.029403 0.211574 -0.1638137 0.0003605 0.000209 -0.000411 0.000116 0.000122 0.0000139 0.0000229 0.000064 0.000088 2011 2 14 55606 0.027761 0.212381 -0.1641831 0.0004157 0.000215 -0.000474 0.000119 0.000128 0.0000148 0.0000271 0.000053 0.000074 2011 2 15 55607 0.026137 0.213128 -0.1646698 0.0005830 0.000214 -0.000522 0.000122 0.000123 0.0000047 0.0000287 0.000042 0.000059 2011 2 16 55608 0.024915 0.214465 -0.1653758 0.0008704 0.000189 -0.000531 0.000124 0.000104 0.0000153 0.0000300 0.000042 0.000064 2011 2 17 55609 0.023426 0.216252 -0.1663731 0.0011596 0.000154 -0.000517 0.000123 0.000106 0.0000121 0.0000287 0.000044 0.000074 2011 2 18 55610 0.021780 0.217873 -0.1676468 0.0013994 0.000117 -0.000489 0.000123 0.000124 0.0000052 0.0000287 0.000046 0.000083 2011 2 19 55611 0.020056 0.218880 -0.1691641 0.0015993 0.000085 -0.000439 0.000125 0.000126 0.0000193 0.0000258 0.000044 0.000078 2011 2 20 55612 0.018540 0.220039 -0.1707634 0.0016580 0.000057 -0.000382 0.000128 0.000132 0.0000130 0.0000246 0.000041 0.000068 2011 2 21 55613 0.016811 0.220720 -0.1723944 0.0015231 0.000034 -0.000328 0.000128 0.000133 0.0000158 0.0000280 0.000038 0.000057 2011 2 22 55614 0.015213 0.221285 -0.1738294 0.0012933 0.000017 -0.000279 0.000125 0.000087 0.0000057 0.0000280 0.000035 0.000047 2011 2 23 55615 0.013800 0.221985 -0.1750012 0.0010086 0.000004 -0.000220 0.000127 0.000085 0.0000152 0.0000293 0.000027 0.000020 2011 2 24 55616 0.012264 0.222922 -0.1758420 0.0007092 -0.000011 -0.000317 0.000127 0.000126 0.0000157 0.0000306 0.000030 0.000013 2011 2 25 55617 0.010174 0.223972 -0.1764703 0.0005428 -0.000049 -0.000415 0.000126 0.000128 0.0000052 0.0000305 0.000050 0.000060 2011 2 26 55618 0.007618 0.224746 -0.1769626 0.0004502 -0.000011 -0.000426 0.000130 0.000132 0.0000334 0.0000255 0.000055 0.000073 2011 2 27 55619 0.004972 0.225677 -0.1773799 0.0004291 0.000057 -0.000407 0.000125 0.000127 0.0000123 0.0000231 0.000054 0.000070 2011 2 28 55620 0.002596 0.226932 -0.1778458 0.0005176 0.000124 -0.000383 0.000116 0.000118 0.0000137 0.0000264 0.000052 0.000066 2011 3 1 55621 0.000849 0.228229 -0.1784542 0.0006837 0.000186 -0.000357 0.000114 0.000115 0.0000048 0.0000272 0.000050 0.000062 2011 3 2 55622 -0.000719 0.229390 -0.1791927 0.0008052 0.000134 -0.000300 0.000113 0.000114 0.0000142 0.0000275 0.000063 0.000076 2011 3 3 55623 -0.001804 0.230504 -0.1800832 0.0009735 0.000051 -0.000239 0.000112 0.000115 0.0000125 0.0000280 0.000080 0.000096 2011 3 4 55624 -0.002634 0.231982 -0.1811519 0.0011134 -0.000032 -0.000185 0.000114 0.000114 0.0000050 0.0000283 0.000097 0.000115 2011 3 5 55625 -0.003062 0.233502 -0.1823339 0.0012007 -0.000034 -0.000209 0.000114 0.000114 0.0000438 0.0000239 0.000088 0.000105 2011 3 6 55626 -0.003432 0.235531 -0.1835158 0.0011817 -0.000003 -0.000267 0.000116 0.000117 0.0000124 0.0000223 0.000069 0.000083 2011 3 7 55627 -0.004495 0.237507 -0.1846894 0.0010801 0.000032 -0.000329 0.000117 0.000120 0.0000151 0.0000261 0.000050 0.000062 2011 3 8 55628 -0.005808 0.238965 -0.1857505 0.0009939 0.000068 -0.000389 0.000116 0.000121 0.0000051 0.0000257 0.000031 0.000041 2011 3 9 55629 -0.006946 0.240519 -0.1867278 0.0009051 0.000113 -0.000410 0.000117 0.000120 0.0000185 0.0000254 0.000045 0.000048 2011 3 10 55630 -0.007854 0.242336 -0.1876086 0.0008218 0.000153 -0.000412 0.000119 0.000123 0.0000121 0.0000274 0.000067 0.000063 2011 3 11 55631 -0.008868 0.244260 -0.1884053 0.0007477 0.000184 -0.000403 0.000119 0.000119 0.0000051 0.0000289 0.000089 0.000078 2011 3 12 55632 -0.010372 0.246245 -0.1891228 0.0006379 0.000129 -0.000359 0.000119 0.000119 0.0000130 0.0000248 0.000096 0.000087 2011 3 13 55633 -0.011723 0.247995 -0.1897033 0.0005735 0.000038 -0.000299 0.000114 0.000117 0.0000110 0.0000222 0.000098 0.000095 2011 3 14 55634 -0.013539 0.249713 -0.1903008 0.0006398 -0.000054 -0.000241 0.000107 0.000109 0.0000113 0.0000229 0.000100 0.000104 2011 3 15 55635 -0.015244 0.250602 -0.1910293 0.0008489 -0.000143 -0.000188 0.000107 0.000106 0.0000115 0.0000239 0.000101 0.000112 2011 3 16 55636 -0.016841 0.251710 -0.1919961 0.0010872 -0.000223 -0.000146 0.000109 0.000108 0.0000045 0.0000266 0.000103 0.000120 2011 3 17 55637 -0.018318 0.253073 -0.1932309 0.0013543 -0.000141 -0.000190 0.000109 0.000107 0.0000206 0.0000267 0.000089 0.000109 2011 3 18 55638 -0.019584 0.254456 -0.1946490 0.0015284 -0.000009 -0.000265 0.000107 0.000104 0.0000055 0.0000264 0.000070 0.000094 2011 3 19 55639 -0.020632 0.256005 -0.1962163 0.0016169 0.000015 -0.000307 0.000107 0.000107 0.0000180 0.0000227 0.000064 0.000087 2011 3 20 55640 -0.021711 0.257728 -0.1978506 0.0015894 0.000000 -0.000337 0.000109 0.000111 0.0000131 0.0000220 0.000062 0.000084 2011 3 21 55641 -0.022765 0.259764 -0.1993866 0.0014600 -0.000013 -0.000362 0.000110 0.000111 0.0000131 0.0000250 0.000060 0.000080 2011 3 22 55642 -0.024491 0.261832 -0.2007339 0.0012211 -0.000028 -0.000382 0.000110 0.000109 0.0000044 0.0000255 0.000059 0.000077 2011 3 23 55643 -0.025721 0.263444 -0.2018290 0.0009585 -0.000067 -0.000363 0.000110 0.000111 0.0000205 0.0000254 0.000202 0.000228 2011 3 24 55644 -0.026882 0.265329 -0.2027557 0.0008172 -0.000077 -0.000330 0.000108 0.000106 0.0000155 0.0000255 0.000500 0.000244 2011 3 25 55645 -0.027215 0.267034 -0.2035687 0.0008378 -0.000042 -0.000292 0.000107 0.000106 0.0000052 0.0000265 0.000197 0.000113 2011 3 26 55646 -0.027499 0.268987 -0.2044373 0.0008691 -0.000006 -0.000269 0.000107 0.000107 0.0000166 0.0000223 0.000058 0.000068 2011 3 27 55647 -0.028466 0.270774 -0.2053410 0.0009447 0.000021 -0.000250 0.000108 0.000106 0.0000132 0.0000209 0.000057 0.000067 2011 3 28 55648 -0.029378 0.272664 -0.2063703 0.0010944 0.000044 -0.000230 0.000108 0.000109 0.0000132 0.0000247 0.000056 0.000065 2011 3 29 55649 -0.030329 0.274325 -0.2075344 0.0012436 0.000060 -0.000212 0.000107 0.000107 0.0000041 0.0000257 0.000055 0.000064 2011 3 30 55650 -0.030949 0.275765 -0.2088540 0.0013641 -0.000030 -0.000229 0.000107 0.000109 0.0000214 0.0000258 0.000033 0.000024 2011 3 31 55651 -0.031758 0.277492 -0.2102391 0.0014329 -0.000064 -0.000187 0.000109 0.000110 0.0000140 0.0000265 0.000041 0.000036 2011 4 1 55652 -0.033083 0.279070 -0.2117114 0.0014790 -0.000070 -0.000134 0.000108 0.000111 0.0000049 0.0000267 0.000059 0.000065 2011 4 2 55653 -0.034720 0.280652 -0.2131919 0.0014909 -0.000091 -0.000132 0.000108 0.000113 0.0000117 0.0000227 0.000060 0.000063 2011 4 3 55654 -0.036213 0.281938 -0.2146784 0.0014369 -0.000111 -0.000157 0.000100 0.000106 0.0000135 0.0000215 0.000056 0.000050 2011 4 4 55655 -0.037479 0.283617 -0.2160500 0.0013019 -0.000122 -0.000191 0.000091 0.000098 0.0000156 0.0000239 0.000053 0.000037 2011 4 5 55656 -0.039369 0.285435 -0.2172563 0.0011320 -0.000126 -0.000231 0.000093 0.000100 0.0000183 0.0000252 0.000048 0.000023 2011 4 6 55657 -0.041399 0.287004 -0.2183240 0.0009752 -0.000058 -0.000301 0.000097 0.000102 0.0000188 0.0000262 0.000032 0.000014 2011 4 7 55658 -0.042423 0.288704 -0.2192422 0.0008173 0.000006 -0.000355 0.000097 0.000101 0.0000185 0.0000263 0.000051 0.000047 2011 4 8 55659 -0.042939 0.290931 -0.2199830 0.0007270 0.000059 -0.000394 0.000094 0.000101 0.0000043 0.0000261 0.000082 0.000091 2011 4 9 55660 -0.043389 0.293415 -0.2207433 0.0007569 0.000068 -0.000401 0.000097 0.000100 0.0000216 0.0000224 0.000082 0.000095 2011 4 10 55661 -0.043308 0.295695 -0.2214928 0.0008207 0.000051 -0.000387 0.000096 0.000098 0.0000130 0.0000208 0.000070 0.000084 2011 4 11 55662 -0.043620 0.297675 -0.2223469 0.0009105 0.000022 -0.000360 0.000092 0.000097 0.0000115 0.0000231 0.000058 0.000073 2011 4 12 55663 -0.043919 0.299584 -0.2233100 0.0010863 -0.000018 -0.000323 0.000094 0.000099 0.0000035 0.0000239 0.000046 0.000063 2011 4 13 55664 -0.044062 0.301844 -0.2244795 0.0012662 -0.000117 -0.000291 0.000092 0.000098 0.0000204 0.0000239 0.000040 0.000044 2011 4 14 55665 -0.044180 0.304194 -0.2258048 0.0014164 -0.000230 -0.000262 0.000088 0.000094 0.0000124 0.0000233 0.000035 0.000023 2011 4 15 55666 -0.044083 0.306683 -0.2273032 0.0015810 -0.000254 -0.000200 0.000090 0.000096 0.0000044 0.0000233 0.000058 0.000071 2011 4 16 55667 -0.043869 0.309390 -0.2289176 0.0016684 -0.000241 -0.000172 0.000092 0.000096 0.0000190 0.0000206 0.000063 0.000084 2011 4 17 55668 -0.044070 0.311932 -0.2305894 0.0016129 -0.000217 -0.000170 0.000057 0.000059 0.0000059 0.0000119 0.000057 0.000075 2011 4 18 55669 -0.044240 0.314342 -0.2321225 0.0014380 -0.000184 -0.000182 0.000022 0.000024 0.0000031 0.0000060 0.000052 0.000066 2011 4 19 55670 -0.044562 0.316350 -0.2334574 0.0012217 -0.000143 -0.000205 0.000022 0.000024 0.0000022 0.0000062 0.000047 0.000057 2011 4 20 55671 -0.044636 0.318394 -0.2345634 0.0009749 -0.000155 -0.000217 0.000022 0.000024 0.0000014 0.0000062 0.000073 0.000081 2011 4 21 55672 -0.044958 0.320435 -0.2354477 0.0007911 -0.000156 -0.000256 0.000022 0.000024 0.0000018 0.0000062 0.000080 0.000089 2011 4 22 55673 -0.045062 0.322209 -0.2361869 0.0007037 -0.000149 -0.000306 0.000022 0.000024 0.0000039 0.0000062 0.000077 0.000088 2011 4 23 55674 -0.045243 0.323933 -0.2368997 0.0007210 -0.000143 -0.000349 0.000022 0.000024 0.0000045 0.0000061 0.000074 0.000088 2011 4 24 55675 -0.045844 0.325797 -0.2376781 0.0008317 -0.000139 -0.000380 0.000022 0.000024 0.0000031 0.0000059 0.000071 0.000087 2011 4 25 55676 -0.046184 0.327511 -0.2385535 0.0009187 -0.000138 -0.000396 0.000022 0.000022 0.0000027 0.0000058 0.000068 0.000086 2011 4 26 55677 -0.046002 0.329180 -0.2395074 0.0010004 -0.000140 -0.000395 0.000022 0.000020 0.0000022 0.0000058 0.000065 0.000085 2011 4 27 55678 -0.045781 0.331332 -0.2405596 0.0010769 -0.000145 -0.000379 0.000022 0.000020 0.0000014 0.0000058 0.000062 0.000085 2011 4 28 55679 -0.045320 0.333581 -0.2416176 0.0011120 -0.000149 -0.000246 0.000022 0.000022 0.0000130 0.0000060 0.000071 0.000094 2011 4 29 55680 -0.045127 0.336151 -0.2427746 0.0011374 -0.000156 -0.000079 0.000022 0.000024 0.0000016 0.0000062 0.000083 0.000106 2011 4 30 55681 -0.044682 0.338518 -0.2438692 0.0010795 -0.000147 -0.000041 0.000022 0.000024 0.0000226 0.0000061 0.000079 0.000101 2011 5 1 55682 -0.044021 0.341134 -0.2449135 0.0009989 -0.000136 -0.000057 0.000022 0.000024 0.0000027 0.0000061 0.000070 0.000090 2011 5 2 55683 -0.043223 0.344033 -0.2458811 0.0009553 -0.000132 -0.000082 0.000020 0.000022 0.0000027 0.0000060 0.000061 0.000078 2011 5 3 55684 -0.042670 0.346724 -0.2468522 0.0009179 -0.000133 -0.000118 0.000019 0.000020 0.0000018 0.0000058 0.000052 0.000067 2011 5 4 55685 -0.042430 0.349103 -0.2476853 0.0008825 -0.000340 -0.000066 0.000019 0.000020 0.0000122 0.0000058 0.000068 0.000044 2011 5 5 55686 -0.041887 0.351228 -0.2485910 0.0008160 -0.000412 -0.000027 0.000019 0.000020 0.0000042 0.0000058 0.000142 0.000146 2011 5 6 55687 -0.041664 0.353483 -0.2494025 0.0007895 -0.000421 -0.000004 0.000019 0.000020 0.0000032 0.0000056 0.000232 0.000286 2011 5 7 55688 -0.041474 0.355308 -0.2502068 0.0008451 -0.000398 -0.000017 0.000019 0.000020 0.0000162 0.0000055 0.000219 0.000279 2011 5 8 55689 -0.041731 0.357342 -0.2510832 0.0009153 -0.000358 -0.000044 0.000020 0.000022 0.0000022 0.0000059 0.000168 0.000217 2011 5 9 55690 -0.041753 0.358940 -0.2521129 0.0011320 -0.000311 -0.000074 0.000022 0.000022 0.0000022 0.0000062 0.000117 0.000155 2011 5 10 55691 -0.041194 0.360775 -0.2533249 0.0013621 -0.000262 -0.000104 0.000022 0.000020 0.0000019 0.0000062 0.000066 0.000094 2011 5 11 55692 -0.039836 0.362864 -0.2548237 0.0015346 -0.000298 -0.000133 0.000020 0.000020 0.0000191 0.0000060 0.000055 0.000076 2011 5 12 55693 -0.038488 0.365452 -0.2564082 0.0017001 -0.000355 -0.000157 0.000019 0.000020 0.0000022 0.0000058 0.000054 0.000070 2011 5 13 55694 -0.036560 0.368175 -0.2581659 0.0018043 -0.000410 -0.000173 0.000020 0.000020 0.0000014 0.0000060 0.000053 0.000064 2011 5 14 55695 -0.034785 0.371189 -0.2599846 0.0018232 -0.000393 -0.000155 0.000022 0.000020 0.0000022 0.0000061 0.000055 0.000070 2011 5 15 55696 -0.033370 0.374018 -0.2617832 0.0017442 -0.000346 -0.000119 0.000020 0.000020 0.0000031 0.0000059 0.000058 0.000080 2011 5 16 55697 -0.032609 0.376432 -0.2634219 0.0015323 -0.000295 -0.000081 0.000019 0.000020 0.0000031 0.0000056 0.000062 0.000091 2011 5 17 55698 -0.031902 0.377941 -0.2648388 0.0012892 -0.000242 -0.000043 0.000019 0.000020 0.0000022 0.0000056 0.000066 0.000101 2011 5 18 55699 -0.031294 0.380008 -0.2659941 0.0010607 -0.000221 -0.000035 0.000019 0.000020 0.0000098 0.0000056 0.000062 0.000092 2011 5 19 55700 -0.030682 0.381597 -0.2669714 0.0008851 -0.000209 -0.000039 0.000019 0.000020 0.0000042 0.0000054 0.000056 0.000077 2011 5 20 55701 -0.029859 0.383254 -0.2677925 0.0007776 -0.000197 -0.000052 0.000019 0.000020 0.0000015 0.0000054 0.000050 0.000062 2011 5 21 55702 -0.028955 0.384760 -0.2685662 0.0007794 -0.000181 -0.000073 0.000019 0.000020 0.0000023 0.0000053 0.000053 0.000064 2011 5 22 55703 -0.028093 0.386195 -0.2693607 0.0008255 -0.000163 -0.000099 0.000019 0.000020 0.0000031 0.0000053 0.000059 0.000072 2011 5 23 55704 -0.026753 0.387690 -0.2702027 0.0008670 -0.000146 -0.000129 0.000019 0.000020 0.0000026 0.0000052 0.000066 0.000080 2011 5 24 55705 -0.025454 0.389209 -0.2710964 0.0009167 -0.000129 -0.000159 0.000019 0.000020 0.0000048 0.0000050 0.000072 0.000087 2011 5 25 55706 -0.023642 0.390864 -0.2719881 0.0008934 -0.000093 -0.000126 0.000019 0.000020 0.0000114 0.0000050 0.000679 0.000099 2011 5 26 55707 -0.021999 0.393072 -0.2729066 0.0009495 -0.000056 -0.000155 0.000013 0.000013 0.0000081 0.0000033 0.000486 0.000100 2011 5 27 55708 -0.020279 0.395562 -0.2739026 0.0009960 -0.000026 -0.000201 0.000019 0.000020 0.0000018 0.0000050 0.000202 0.000111 2011 5 28 55709 -0.019072 0.397323 -0.2748716 0.0009335 -0.000027 -0.000205 0.000019 0.000020 0.0000025 0.0000049 0.000111 0.000127 2011 5 29 55710 -0.017910 0.398904 -0.2757827 0.0008814 -0.000046 -0.000189 0.000019 0.000020 0.0000031 0.0000049 0.000125 0.000147 2011 5 30 55711 -0.017306 0.400662 -0.2766035 0.0007456 -0.000076 -0.000163 0.000019 0.000020 0.0000027 0.0000050 0.000138 0.000168 2011 5 31 55712 -0.016447 0.401974 -0.2772920 0.0006203 -0.000118 -0.000131 0.000019 0.000020 0.0000022 0.0000050 0.000152 0.000188 2011 6 1 55713 -0.015294 0.403217 -0.2778905 0.0005571 -0.000168 -0.000097 0.000019 0.000020 0.0000032 0.0000050 0.000165 0.000208 2011 6 2 55714 -0.014217 0.404443 -0.2784168 0.0005053 -0.000161 -0.000035 0.000019 0.000020 0.0000150 0.0000050 0.000123 0.000166 2011 6 3 55715 -0.013071 0.405691 -0.2789094 0.0004653 -0.000139 0.000029 0.000019 0.000020 0.0000017 0.0000050 0.000067 0.000108 2011 6 4 55716 -0.011585 0.407428 -0.2794204 0.0005558 -0.000227 0.000038 0.000019 0.000020 0.0000024 0.0000049 0.000044 0.000077 2011 6 5 55717 -0.009834 0.409290 -0.2800650 0.0007423 -0.000346 0.000018 0.000019 0.000020 0.0000031 0.0000049 0.000033 0.000056 2011 6 6 55718 -0.007666 0.410741 -0.2808916 0.0008968 -0.000449 -0.000012 0.000019 0.000020 0.0000027 0.0000049 0.000021 0.000035 2011 6 7 55719 -0.005625 0.412262 -0.2818600 0.0010641 -0.000533 -0.000048 0.000019 0.000018 0.0000008 0.0000048 0.000010 0.000013 2011 6 8 55720 -0.003178 0.413950 -0.2830058 0.0011670 -0.000452 -0.000078 0.000019 0.000018 0.0000132 0.0000048 0.000018 0.000023 2011 6 9 55721 -0.000953 0.415650 -0.2841649 0.0011594 -0.000316 -0.000105 0.000019 0.000020 0.0000022 0.0000050 0.000031 0.000041 2011 6 10 55722 0.001798 0.416826 -0.2853045 0.0010993 -0.000173 -0.000126 0.000019 0.000020 0.0000014 0.0000050 0.000044 0.000059 2011 6 11 55723 0.004988 0.418167 -0.2863554 0.0009883 -0.000120 -0.000121 0.000019 0.000020 0.0000022 0.0000049 0.000056 0.000072 2011 6 12 55724 0.008078 0.419791 -0.2872450 0.0007870 -0.000109 -0.000098 0.000017 0.000018 0.0000031 0.0000047 0.000066 0.000081 2011 6 13 55725 0.010611 0.421080 -0.2879301 0.0005849 -0.000113 -0.000069 0.000015 0.000016 0.0000027 0.0000045 0.000078 0.000091 2011 6 14 55726 0.013218 0.422139 -0.2884258 0.0004360 -0.000135 -0.000035 0.000015 0.000016 0.0000022 0.0000046 0.000089 0.000101 2011 6 15 55727 0.015169 0.422939 -0.2887931 0.0002739 -0.000171 0.000002 0.000015 0.000016 0.0000030 0.0000046 0.000100 0.000111 2011 6 16 55728 0.017119 0.423499 -0.2889809 0.0001888 -0.000206 0.000009 0.000015 0.000016 0.0000144 0.0000046 0.000081 0.000094 2011 6 17 55729 0.018914 0.424432 -0.2891890 0.0001954 -0.000244 0.000004 0.000015 0.000016 0.0000015 0.0000045 0.000053 0.000070 2011 6 18 55730 0.020900 0.425358 -0.2894192 0.0002686 -0.000291 0.000020 0.000017 0.000018 0.0000023 0.0000047 0.000056 0.000075 2011 6 19 55731 0.022796 0.426422 -0.2897293 0.0003441 -0.000336 0.000036 0.000019 0.000020 0.0000031 0.0000049 0.000069 0.000090 2011 6 20 55732 0.025033 0.427005 -0.2901017 0.0003777 -0.000367 0.000042 0.000017 0.000018 0.0000031 0.0000049 0.000082 0.000105 2011 6 21 55733 0.027123 0.427744 -0.2904809 0.0003988 -0.000384 0.000038 0.000015 0.000016 0.0000026 0.0000049 0.000095 0.000120 2011 6 22 55734 0.029126 0.428426 -0.2909052 0.0003713 -0.000349 0.000027 0.000017 0.000018 0.0000195 0.0000050 0.000050 0.000041 2011 6 23 55735 0.031053 0.429227 -0.2912266 0.0003309 -0.000250 -0.000038 0.000019 0.000020 0.0000042 0.0000050 0.000038 0.000034 2011 6 24 55736 0.032729 0.430135 -0.2915129 0.0002421 -0.000130 -0.000118 0.000019 0.000020 0.0000014 0.0000050 0.000041 0.000054 2011 6 25 55737 0.033651 0.430754 -0.2916816 0.0001193 -0.000103 -0.000165 0.000019 0.000020 0.0000023 0.0000049 0.000048 0.000070 2011 6 26 55738 0.034690 0.431491 -0.2917365 0.0000110 -0.000111 -0.000188 0.000019 0.000018 0.0000031 0.0000049 0.000056 0.000084 2011 6 27 55739 0.036618 0.432144 -0.2917016 -0.0000566 -0.000124 -0.000198 0.000019 0.000018 0.0000027 0.0000050 0.000065 0.000098 2011 6 28 55740 0.038496 0.433073 -0.2915946 -0.0001300 -0.000143 -0.000191 0.000019 0.000018 0.0000031 0.0000050 0.000074 0.000112 2011 6 29 55741 0.040170 0.433745 -0.2914117 -0.0002026 -0.000089 -0.000133 0.000019 0.000018 0.0000181 0.0000050 0.000072 0.000105 2011 6 30 55742 0.042129 0.434646 -0.2911762 -0.0002886 -0.000026 -0.000057 0.000019 0.000020 0.0000042 0.0000050 0.000068 0.000093 2011 7 1 55743 0.043686 0.435522 -0.2908906 -0.0002954 0.000025 0.000024 0.000019 0.000020 0.0000013 0.0000050 0.000064 0.000081 2011 7 2 55744 0.045231 0.436353 -0.2906550 -0.0001822 0.000012 0.000074 0.000019 0.000020 0.0000022 0.0000049 0.000214 0.000090 2011 7 3 55745 0.046685 0.437092 -0.2905671 0.0000021 -0.000032 0.000105 0.000019 0.000020 0.0000031 0.0000049 0.000420 0.000108 2011 7 4 55746 0.048254 0.437857 -0.2907147 0.0002695 -0.000087 0.000127 0.000019 0.000018 0.0000031 0.0000050 0.000625 0.000126 2011 7 5 55747 0.050467 0.438911 -0.2910940 0.0004507 -0.000147 0.000135 0.000019 0.000016 0.0000027 0.0000050 0.000830 0.000143 2011 7 6 55748 0.052446 0.440119 -0.2915636 0.0004987 -0.000211 0.000128 0.000019 0.000016 0.0000009 0.0000050 0.000150 0.000033 2011 7 7 55749 0.055156 0.440700 -0.2920977 0.0004628 -0.000253 0.000093 0.000019 0.000018 0.0000161 0.0000050 0.000018 0.000021 2011 7 8 55750 0.057624 0.441317 -0.2924874 0.0003625 -0.000281 0.000047 0.000019 0.000018 0.0000015 0.0000048 0.000030 0.000034 2011 7 9 55751 0.059897 0.441678 -0.2927692 0.0001827 -0.000301 0.000036 0.000019 0.000018 0.0000023 0.0000047 0.000051 0.000060 2011 7 10 55752 0.062117 0.442125 -0.2928465 -0.0000259 -0.000310 0.000040 0.000019 0.000020 0.0000031 0.0000049 0.000076 0.000092 2011 7 11 55753 0.064391 0.442929 -0.2927417 -0.0001729 -0.000304 0.000049 0.000017 0.000018 0.0000031 0.0000048 0.000100 0.000124 2011 7 12 55754 0.065789 0.443820 -0.2924942 -0.0002972 -0.000288 0.000064 0.000015 0.000016 0.0000079 0.0000046 0.000125 0.000155 2011 7 13 55755 0.067199 0.444322 -0.2921737 -0.0003452 -0.000210 0.000040 0.000017 0.000016 0.0000150 0.0000048 0.000073 0.000062 2011 7 14 55756 0.068763 0.444776 -0.2918420 -0.0002972 -0.000139 0.000026 0.000017 0.000016 0.0000042 0.0000050 0.000053 0.000040 2011 7 15 55757 0.070662 0.445100 -0.2915728 -0.0002387 -0.000076 0.000020 0.000015 0.000016 0.0000012 0.0000048 0.000047 0.000048 2011 7 16 55758 0.072292 0.445591 -0.2913894 -0.0001394 -0.000079 0.000066 0.000015 0.000018 0.0000021 0.0000047 0.000043 0.000049 2011 7 17 55759 0.074474 0.446289 -0.2913305 -0.0000028 -0.000112 0.000126 0.000017 0.000020 0.0000031 0.0000049 0.000040 0.000047 2011 7 18 55760 0.076551 0.447190 -0.2914163 0.0001291 -0.000153 0.000178 0.000019 0.000020 0.0000031 0.0000049 0.000037 0.000045 2011 7 19 55761 0.078703 0.447576 -0.2915775 0.0002231 -0.000200 0.000221 0.000019 0.000020 0.0000019 0.0000049 0.000034 0.000043 2011 7 20 55762 0.081144 0.447863 -0.2918752 0.0002359 -0.000135 0.000177 0.000019 0.000020 0.0000094 0.0000050 0.000069 0.000080 2011 7 21 55763 0.083804 0.448189 -0.2920334 0.0001492 -0.000041 0.000105 0.000019 0.000020 0.0000022 0.0000050 0.000115 0.000128 2011 7 22 55764 0.086581 0.448640 -0.2921619 0.0000900 -0.000167 0.000035 0.000019 0.000020 0.0000015 0.0000050 0.000086 0.000119 2011 7 23 55765 0.089073 0.449385 -0.2922196 0.0000261 -0.000221 -0.000009 0.000019 0.000020 0.0000023 0.0000049 0.000091 0.000131 2011 7 24 55766 0.090995 0.449731 -0.2922105 -0.0000490 -0.000218 -0.000035 0.000019 0.000020 0.0000031 0.0000049 0.000118 0.000158 2011 7 25 55767 0.093168 0.449634 -0.2921039 -0.0001560 -0.000208 -0.000045 0.000019 0.000020 0.0000031 0.0000050 0.000144 0.000184 2011 7 26 55768 0.094899 0.449557 -0.2918645 -0.0002724 -0.000193 -0.000038 0.000019 0.000020 0.0000039 0.0000050 0.000171 0.000211 2011 7 27 55769 0.096255 0.448675 -0.2915892 -0.0003227 -0.000152 0.000086 0.000019 0.000020 0.0000169 0.0000050 0.000147 0.000183 2011 7 28 55770 0.097856 0.447303 -0.2912258 -0.0003105 -0.000106 0.000241 0.000019 0.000020 0.0000041 0.0000050 0.000110 0.000141 2011 7 29 55771 0.099919 0.446308 -0.2909298 -0.0002397 -0.000061 0.000391 0.000019 0.000020 0.0000016 0.0000050 0.000073 0.000099 2011 7 30 55772 0.101604 0.445878 -0.2907622 -0.0000763 -0.000066 0.000399 0.000019 0.000020 0.0000023 0.0000049 0.000069 0.000095 2011 7 31 55773 0.103137 0.445717 -0.2908183 0.0001737 -0.000094 0.000340 0.000019 0.000020 0.0000031 0.0000051 0.000077 0.000106 2011 8 1 55774 0.104874 0.445634 -0.2911245 0.0004199 -0.000127 0.000268 0.000019 0.000020 0.0000031 0.0000051 0.000086 0.000117 2011 8 2 55775 0.106979 0.444957 -0.2916487 0.0006106 -0.000163 0.000182 0.000019 0.000020 0.0000027 0.0000049 0.000094 0.000128 2011 8 3 55776 0.109328 0.444442 -0.2923332 0.0006809 -0.000163 0.000169 0.000018 0.000020 0.0000170 0.0000052 0.000098 0.000120 2011 8 4 55777 0.111763 0.443806 -0.2929965 0.0006461 -0.000153 0.000175 0.000018 0.000020 0.0000042 0.0000054 0.000101 0.000108 2011 8 5 55778 0.114570 0.443243 -0.2935922 0.0005097 -0.000140 0.000178 0.000019 0.000020 0.0000018 0.0000054 0.000105 0.000095 2011 8 6 55779 0.117274 0.442796 -0.2939787 0.0002614 -0.000144 0.000171 0.000019 0.000020 0.0000025 0.0000053 0.000101 0.000096 2011 8 7 55780 0.119277 0.442391 -0.2941329 0.0000634 -0.000151 0.000162 0.000019 0.000019 0.0000031 0.0000051 0.000096 0.000101 2011 8 8 55781 0.121144 0.441836 -0.2941217 -0.0000771 -0.000156 0.000155 0.000019 0.000019 0.0000027 0.0000049 0.000090 0.000106 2011 8 9 55782 0.123254 0.441142 -0.2939619 -0.0001689 -0.000157 0.000154 0.000019 0.000020 0.0000041 0.0000049 0.000085 0.000111 2011 8 10 55783 0.125592 0.440520 -0.2938027 -0.0001955 -0.000136 0.000113 0.000019 0.000020 0.0000198 0.0000051 0.000089 0.000114 2011 8 11 55784 0.127820 0.440072 -0.2935996 -0.0001561 -0.000108 0.000069 0.000019 0.000020 0.0000022 0.0000054 0.000096 0.000117 2011 8 12 55785 0.129628 0.439533 -0.2934816 -0.0000682 -0.000080 0.000035 0.000019 0.000020 0.0000018 0.0000054 0.000103 0.000119 2011 8 13 55786 0.131524 0.438997 -0.2934636 0.0000275 -0.000078 0.000065 0.000019 0.000020 0.0000025 0.0000053 0.000098 0.000106 2011 8 14 55787 0.133078 0.438523 -0.2935486 0.0001144 -0.000086 0.000124 0.000019 0.000020 0.0000031 0.0000051 0.000088 0.000087 2011 8 15 55788 0.134792 0.437408 -0.2937175 0.0002102 -0.000095 0.000190 0.000019 0.000020 0.0000044 0.0000050 0.000078 0.000068 2011 8 16 55789 0.136683 0.436704 -0.2939462 0.0002297 -0.000104 0.000259 0.000019 0.000020 0.0000041 0.0000050 0.000068 0.000050 2011 8 17 55790 0.138514 0.435947 -0.2941881 0.0002309 -0.000113 0.000323 0.000019 0.000020 0.0000022 0.0000050 0.000058 0.000031 2011 8 18 55791 0.140347 0.435419 -0.2944273 0.0002307 -0.000068 0.000369 0.000019 0.000020 0.0000022 0.0000050 0.000066 0.000038 2011 8 19 55792 0.141882 0.434610 -0.2946153 0.0001345 -0.000010 0.000399 0.000019 0.000020 0.0000022 0.0000050 0.000080 0.000051 2011 8 20 55793 0.143261 0.433771 -0.2946921 0.0000121 -0.000012 0.000385 0.000019 0.000020 0.0000027 0.0000049 0.000070 0.000049 2011 8 21 55794 0.144155 0.432791 -0.2946572 -0.0000865 -0.000038 0.000346 0.000019 0.000020 0.0000026 0.0000051 0.000053 0.000040 2011 8 22 55795 0.145499 0.431463 -0.2945413 -0.0001353 -0.000064 0.000296 0.000019 0.000020 0.0000022 0.0000052 0.000035 0.000031 2011 8 23 55796 0.146652 0.430487 -0.2943994 -0.0001557 -0.000092 0.000242 0.000019 0.000020 0.0000011 0.0000052 0.000018 0.000023 2011 8 24 55797 0.147662 0.429169 -0.2942385 -0.0001262 -0.000067 0.000224 0.000019 0.000020 0.0000096 0.0000052 0.000015 0.000021 2011 8 25 55798 0.148853 0.428107 -0.2941519 -0.0000405 -0.000029 0.000219 0.000019 0.000020 0.0000042 0.0000051 0.000016 0.000020 2011 8 26 55799 0.150211 0.427048 -0.2942084 0.0001760 0.000006 0.000220 0.000019 0.000020 0.0000013 0.0000054 0.000017 0.000020 2011 8 27 55800 0.151933 0.426025 -0.2945206 0.0004487 -0.000002 0.000209 0.000019 0.000020 0.0000022 0.0000053 0.000014 0.000017 2011 8 28 55801 0.153571 0.424842 -0.2951017 0.0006907 -0.000026 0.000200 0.000019 0.000020 0.0000031 0.0000051 0.000011 0.000013 2011 8 29 55802 0.155607 0.423520 -0.2959149 0.0009093 -0.000051 0.000200 0.000019 0.000020 0.0000031 0.0000052 0.000007 0.000009 2011 8 30 55803 0.157454 0.422664 -0.2968974 0.0009949 -0.000076 0.000207 0.000019 0.000020 0.0000012 0.0000054 0.000004 0.000005 2011 8 31 55804 0.159193 0.421606 -0.2979044 0.0009989 -0.000090 0.000209 0.000019 0.000020 0.0000122 0.0000054 0.000006 0.000007 2011 9 1 55805 0.161067 0.420835 -0.2988856 0.0009060 -0.000098 0.000212 0.000019 0.000020 0.0000040 0.0000054 0.000009 0.000009 2011 9 2 55806 0.162527 0.419760 -0.2997147 0.0007088 -0.000102 0.000219 0.000019 0.000020 0.0000010 0.0000052 0.000012 0.000012 2011 9 3 55807 0.163910 0.418660 -0.3002971 0.0004585 -0.000072 0.000264 0.000019 0.000020 0.0000020 0.0000051 0.000133 0.000052 2011 9 4 55808 0.165290 0.417086 -0.3006470 0.0002685 -0.000029 0.000320 0.000019 0.000020 0.0000031 0.0000053 0.000298 0.000106 2011 9 5 55809 0.166560 0.415666 -0.3008624 0.0001830 0.000012 0.000369 0.000019 0.000020 0.0000031 0.0000053 0.000463 0.000160 2011 9 6 55810 0.167468 0.414368 -0.3010333 0.0001785 0.000050 0.000409 0.000019 0.000020 0.0000027 0.0000054 0.000627 0.000214 2011 9 7 55811 0.168600 0.413222 -0.3012190 0.0002391 0.000031 0.000394 0.000019 0.000020 0.0000008 0.0000052 0.000115 0.000046 2011 9 8 55812 0.170152 0.411886 -0.3014901 0.0003147 -0.000023 0.000333 0.000019 0.000020 0.0000015 0.0000051 0.000014 0.000022 2011 9 9 55813 0.172119 0.410667 -0.3018697 0.0004115 -0.000086 0.000258 0.000019 0.000020 0.0000014 0.0000054 0.000022 0.000035 2011 9 10 55814 0.174341 0.409372 -0.3023100 0.0004731 -0.000090 0.000226 0.000019 0.000020 0.0000022 0.0000053 0.000025 0.000038 2011 9 11 55815 0.176190 0.408100 -0.3028281 0.0005621 -0.000070 0.000214 0.000019 0.000020 0.0000031 0.0000053 0.000027 0.000036 2011 9 12 55816 0.177574 0.406829 -0.3034262 0.0006229 -0.000045 0.000208 0.000019 0.000020 0.0000031 0.0000053 0.000028 0.000035 2011 9 13 55817 0.178644 0.405686 -0.3040903 0.0006776 -0.000014 0.000210 0.000019 0.000020 0.0000013 0.0000053 0.000029 0.000034 2011 9 14 55818 0.179737 0.404563 -0.3047790 0.0007271 0.000004 0.000231 0.000019 0.000020 0.0000354 0.0000054 0.000026 0.000026 2011 9 15 55819 0.180619 0.403685 -0.3055068 0.0006719 0.000020 0.000262 0.000019 0.000020 0.0000061 0.0000054 0.000023 0.000016 2011 9 16 55820 0.181465 0.402535 -0.3061267 0.0005652 0.000039 0.000286 0.000019 0.000020 0.0000052 0.0000054 0.000021 0.000011 2011 9 17 55821 0.182140 0.401458 -0.3066386 0.0004443 0.000057 0.000304 0.000019 0.000020 0.0000037 0.0000053 0.000021 0.000011 2011 9 18 55822 0.182331 0.400185 -0.3070730 0.0004198 0.000070 0.000321 0.000019 0.000020 0.0000031 0.0000055 0.000022 0.000011 2011 9 19 55823 0.182159 0.399096 -0.3074859 0.0004071 0.000077 0.000335 0.000019 0.000020 0.0000045 0.0000056 0.000023 0.000011 2011 9 20 55824 0.181978 0.397125 -0.3079043 0.0004333 0.000072 0.000334 0.000019 0.000020 0.0000060 0.0000056 0.000024 0.000012 2011 9 21 55825 0.182277 0.394953 -0.3084007 0.0005729 0.000056 0.000318 0.000019 0.000020 0.0000061 0.0000058 0.000025 0.000013 2011 9 22 55826 0.182369 0.393000 -0.3090513 0.0007381 0.000035 0.000299 0.000019 0.000020 0.0000061 0.0000058 0.000027 0.000013 2011 9 23 55827 0.182344 0.391231 -0.3099061 0.0009799 0.000016 0.000296 0.000019 0.000020 0.0000060 0.0000058 0.000027 0.000014 2011 9 24 55828 0.182598 0.389574 -0.3110223 0.0012520 0.000000 0.000307 0.000019 0.000020 0.0000045 0.0000057 0.000026 0.000013 2011 9 25 55829 0.182542 0.388045 -0.3124062 0.0014978 -0.000013 0.000318 0.000019 0.000020 0.0000031 0.0000057 0.000025 0.000013 2011 9 26 55830 0.181995 0.386278 -0.3140084 0.0016816 -0.000022 0.000328 0.000019 0.000020 0.0000043 0.0000060 0.000024 0.000012 2011 9 27 55831 0.181326 0.384430 -0.3157567 0.0017894 -0.000023 0.000328 0.000019 0.000020 0.0000059 0.0000060 0.000024 0.000012 2011 9 28 55832 0.180478 0.382530 -0.3175180 0.0017158 -0.000015 0.000320 0.000019 0.000020 0.0000061 0.0000058 0.000025 0.000013 2011 9 29 55833 0.179884 0.380493 -0.3191195 0.0014792 0.000001 0.000309 0.000019 0.000020 0.0000058 0.0000058 0.000026 0.000013 2011 9 30 55834 0.179848 0.378710 -0.3204764 0.0012468 0.000017 0.000296 0.000019 0.000020 0.0000057 0.0000060 0.000028 0.000020 2011 10 1 55835 0.179959 0.376801 -0.3216220 0.0010753 0.000030 0.000281 0.000019 0.000020 0.0000045 0.0000061 0.000032 0.000033 2011 10 2 55836 0.180046 0.374966 -0.3226186 0.0009549 0.000048 0.000266 0.000019 0.000020 0.0000031 0.0000058 0.000036 0.000047 2011 10 3 55837 0.180168 0.373161 -0.3235295 0.0009171 0.000070 0.000254 0.000019 0.000020 0.0000031 0.0000057 0.000040 0.000060 2011 10 4 55838 0.180796 0.371281 -0.3244655 0.0009632 0.000092 0.000247 0.000019 0.000020 0.0000058 0.0000058 0.000043 0.000074 2011 10 5 55839 0.181805 0.369386 -0.3254545 0.0010910 0.000170 0.000227 0.000019 0.000020 0.0000449 0.0000058 0.000066 0.000106 2011 10 6 55840 0.183038 0.367931 -0.3266240 0.0012202 0.000256 0.000210 0.000019 0.000020 0.0000041 0.0000058 0.000093 0.000142 2011 10 7 55841 0.183849 0.366623 -0.3278836 0.0013039 0.000330 0.000197 0.000019 0.000020 0.0000022 0.0000058 0.000120 0.000178 2011 10 8 55842 0.184914 0.365350 -0.3292239 0.0013681 0.000302 0.000235 0.000019 0.000020 0.0000027 0.0000057 0.000109 0.000159 2011 10 9 55843 0.185843 0.364146 -0.3306031 0.0013871 0.000229 0.000288 0.000019 0.000020 0.0000031 0.0000055 0.000084 0.000119 2011 10 10 55844 0.186335 0.362751 -0.3319938 0.0013744 0.000151 0.000335 0.000019 0.000020 0.0000031 0.0000054 0.000058 0.000079 2011 10 11 55845 0.186283 0.361240 -0.3333521 0.0013458 0.000074 0.000372 0.000019 0.000020 0.0000014 0.0000054 0.000033 0.000040 2011 10 12 55846 0.186172 0.359868 -0.3346526 0.0012322 0.000065 0.000345 0.000019 0.000020 0.0000316 0.0000054 0.000036 0.000046 2011 10 13 55847 0.185875 0.358428 -0.3357966 0.0010538 0.000083 0.000292 0.000019 0.000020 0.0000042 0.0000054 0.000047 0.000065 2011 10 14 55848 0.185584 0.356848 -0.3367601 0.0008592 0.000112 0.000231 0.000019 0.000020 0.0000018 0.0000054 0.000058 0.000084 2011 10 15 55849 0.185118 0.354989 -0.3375216 0.0006866 0.000158 0.000168 0.000019 0.000020 0.0000025 0.0000055 0.000054 0.000079 2011 10 16 55850 0.184585 0.353028 -0.3381282 0.0005690 0.000214 0.000108 0.000019 0.000020 0.0000031 0.0000055 0.000047 0.000065 2011 10 17 55851 0.184489 0.351154 -0.3386577 0.0005244 0.000271 0.000056 0.000019 0.000020 0.0000031 0.0000054 0.000039 0.000052 2011 10 18 55852 0.184678 0.349635 -0.3391626 0.0005278 0.000326 0.000017 0.000019 0.000020 0.0000014 0.0000054 0.000030 0.000038 2011 10 19 55853 0.185409 0.348154 -0.3397202 0.0006278 0.000267 0.000056 0.000019 0.000020 0.0000013 0.0000054 0.000054 0.000080 2011 10 20 55854 0.186175 0.346913 -0.3404140 0.0007852 0.000256 0.000092 0.000019 0.000020 0.0000019 0.0000054 0.000059 0.000087 2011 10 21 55855 0.186835 0.345228 -0.3412907 0.0009790 0.000268 0.000128 0.000019 0.000020 0.0000022 0.0000054 0.000052 0.000077 2011 10 22 55856 0.186987 0.343892 -0.3423730 0.0011882 0.000272 0.000171 0.000019 0.000020 0.0000022 0.0000053 0.000045 0.000066 2011 10 23 55857 0.187069 0.342621 -0.3436760 0.0014037 0.000269 0.000215 0.000019 0.000020 0.0000027 0.0000055 0.000039 0.000056 2011 10 24 55858 0.187276 0.341667 -0.3451673 0.0015571 0.000260 0.000257 0.000019 0.000020 0.0000027 0.0000058 0.000032 0.000045 2011 10 25 55859 0.187703 0.340368 -0.3467517 0.0015717 0.000248 0.000291 0.000019 0.000020 0.0000012 0.0000058 0.000025 0.000035 2011 10 26 55860 0.187687 0.338859 -0.3482743 0.0014618 0.000204 0.000289 0.000019 0.000020 0.0000144 0.0000056 0.000063 0.000080 2011 10 27 55861 0.187584 0.336921 -0.3496496 0.0012730 0.000154 0.000270 0.000019 0.000020 0.0000040 0.0000054 0.000111 0.000140 2011 10 28 55862 0.187494 0.334921 -0.3508079 0.0010517 0.000109 0.000244 0.000019 0.000020 0.0000046 0.0000054 0.000160 0.000200 2011 10 29 55863 0.187633 0.332685 -0.3517657 0.0008819 0.000110 0.000239 0.000019 0.000020 0.0000042 0.0000053 0.000162 0.000203 2011 10 30 55864 0.187589 0.330331 -0.3525982 0.0008057 0.000133 0.000240 0.000019 0.000020 0.0000031 0.0000051 0.000145 0.000184 2011 10 31 55865 0.187330 0.328167 -0.3534127 0.0008428 0.000161 0.000243 0.000019 0.000018 0.0000058 0.0000049 0.000128 0.000166 2011 11 1 55866 0.186888 0.326392 -0.3543012 0.0009470 0.000191 0.000245 0.000019 0.000016 0.0000073 0.0000050 0.000111 0.000147 2011 11 2 55867 0.186822 0.324831 -0.3553032 0.0010624 0.000221 0.000250 0.000019 0.000016 0.0000041 0.0000050 0.000094 0.000128 2011 11 3 55868 0.187040 0.323848 -0.3564137 0.0011722 0.000252 0.000256 0.000019 0.000018 0.0000019 0.0000050 0.000077 0.000110 2011 11 4 55869 0.187158 0.322986 -0.3576742 0.0013400 0.000188 0.000207 0.000019 0.000018 0.0000013 0.0000050 0.000051 0.000075 2011 11 5 55870 0.186865 0.321874 -0.3590589 0.0014143 0.000163 0.000212 0.000019 0.000016 0.0000023 0.0000049 0.000047 0.000071 2011 11 6 55871 0.186241 0.320274 -0.3604797 0.0014107 0.000164 0.000242 0.000019 0.000016 0.0000031 0.0000049 0.000054 0.000080 2011 11 7 55872 0.185529 0.318315 -0.3618695 0.0013685 0.000171 0.000271 0.000017 0.000016 0.0000031 0.0000050 0.000060 0.000090 2011 11 8 55873 0.184851 0.316125 -0.3632047 0.0012673 0.000185 0.000298 0.000015 0.000016 0.0000026 0.0000050 0.000066 0.000100 2011 11 9 55874 0.184737 0.314192 -0.3643687 0.0010937 0.000245 0.000281 0.000015 0.000018 0.0000173 0.0000050 0.000066 0.000095 2011 11 10 55875 0.184847 0.312700 -0.3653718 0.0009152 0.000320 0.000249 0.000015 0.000018 0.0000042 0.0000050 0.000064 0.000087 2011 11 11 55876 0.184311 0.310976 -0.3662312 0.0008048 0.000396 0.000215 0.000015 0.000016 0.0000017 0.0000050 0.000062 0.000078 2011 11 12 55877 0.183239 0.309272 -0.3669630 0.0007041 0.000410 0.000197 0.000015 0.000018 0.0000158 0.0000051 0.000056 0.000070 2011 11 13 55878 0.181724 0.307496 -0.3676449 0.0006600 0.000397 0.000185 0.000015 0.000018 0.0000027 0.0000051 0.000049 0.000062 2011 11 14 55879 0.180539 0.305731 -0.3683014 0.0006752 0.000379 0.000172 0.000015 0.000016 0.0000031 0.0000049 0.000041 0.000055 2011 11 15 55880 0.179414 0.304534 -0.3689980 0.0007475 0.000353 0.000158 0.000015 0.000016 0.0000017 0.0000049 0.000033 0.000047 2011 11 16 55881 0.178356 0.303216 -0.3698090 0.0008567 0.000485 0.000240 0.000015 0.000016 0.0000106 0.0000050 0.000050 0.000034 2011 11 17 55882 0.177458 0.302301 -0.3707386 0.0010369 0.000541 0.000257 0.000015 0.000016 0.0000042 0.0000050 0.001385 0.000489 2011 11 18 55883 0.176776 0.301593 -0.3718716 0.0012226 0.000462 0.000169 0.000015 0.000016 0.0000012 0.0000050 0.000503 0.000200 2011 11 19 55884 0.176069 0.300681 -0.3731938 0.0014173 0.000412 0.000117 0.000017 0.000018 0.0000021 0.0000049 0.000027 0.000039 2011 11 20 55885 0.175325 0.299566 -0.3746757 0.0015367 0.000376 0.000089 0.000019 0.000020 0.0000031 0.0000051 0.000025 0.000034 2011 11 21 55886 0.174424 0.298706 -0.3762212 0.0015311 0.000334 0.000065 0.000019 0.000020 0.0000031 0.0000054 0.000022 0.000029 2011 11 22 55887 0.173153 0.297495 -0.3777325 0.0014802 0.000291 0.000046 0.000019 0.000020 0.0000013 0.0000052 0.000019 0.000024 2011 11 23 55888 0.171564 0.296098 -0.3791574 0.0013413 0.000174 0.000093 0.000019 0.000020 0.0000010 0.0000052 0.000033 0.000052 2011 11 24 55889 0.170136 0.294421 -0.3804025 0.0011359 0.000124 0.000112 0.000019 0.000020 0.0000093 0.0000054 0.000036 0.000058 2011 11 25 55890 0.168429 0.292625 -0.3814249 0.0009227 0.000117 0.000117 0.000019 0.000020 0.0000022 0.0000052 0.000033 0.000051 2011 11 26 55891 0.166974 0.290798 -0.3822708 0.0007756 0.000125 0.000124 0.000019 0.000020 0.0000022 0.0000051 0.000030 0.000045 2011 11 27 55892 0.166229 0.289484 -0.3830272 0.0007467 0.000147 0.000131 0.000019 0.000020 0.0000022 0.0000051 0.000026 0.000039 2011 11 28 55893 0.165659 0.288717 -0.3837946 0.0007875 0.000183 0.000137 0.000017 0.000020 0.0000027 0.0000049 0.000023 0.000033 2011 11 29 55894 0.164062 0.287855 -0.3846123 0.0008545 0.000227 0.000143 0.000017 0.000020 0.0000017 0.0000050 0.000020 0.000026 2011 11 30 55895 0.162515 0.286555 -0.3855442 0.0009721 0.000255 0.000143 0.000018 0.000020 0.0000071 0.0000050 0.000021 0.000028 2011 12 1 55896 0.161065 0.285213 -0.3865785 0.0010984 0.000277 0.000142 0.000017 0.000018 0.0000022 0.0000050 0.000024 0.000032 2011 12 2 55897 0.160523 0.284037 -0.3877325 0.0011892 0.000297 0.000139 0.000017 0.000018 0.0000013 0.0000050 0.000027 0.000036 2011 12 3 55898 0.160126 0.283224 -0.3889094 0.0011487 0.000332 0.000148 0.000017 0.000020 0.0000022 0.0000049 0.000027 0.000036 2011 12 4 55899 0.159780 0.282234 -0.3900109 0.0010352 0.000366 0.000160 0.000017 0.000020 0.0000031 0.0000051 0.000026 0.000034 2011 12 5 55900 0.159498 0.281546 -0.3910159 0.0009634 0.000392 0.000172 0.000019 0.000020 0.0000031 0.0000054 0.000025 0.000032 2011 12 6 55901 0.158879 0.281124 -0.3919309 0.0008532 0.000408 0.000182 0.000018 0.000020 0.0000014 0.0000052 0.000024 0.000030 2011 12 7 55902 0.157695 0.280548 -0.3926990 0.0006886 0.000365 0.000165 0.000018 0.000020 0.0000188 0.0000050 0.000033 0.000040 2011 12 8 55903 0.156075 0.279858 -0.3933303 0.0005762 0.000303 0.000142 0.000018 0.000020 0.0000042 0.0000049 0.000043 0.000051 2011 12 9 55904 0.154586 0.279027 -0.3939013 0.0005734 0.000239 0.000121 0.000018 0.000020 0.0000017 0.0000051 0.000054 0.000063 2011 12 10 55905 0.153975 0.278268 -0.3944609 0.0005679 0.000253 0.000131 0.000019 0.000020 0.0000024 0.0000053 0.000066 0.000086 2011 12 11 55906 0.152946 0.277793 -0.3950130 0.0005617 0.000297 0.000154 0.000019 0.000020 0.0000031 0.0000053 0.000079 0.000113 2011 12 12 55907 0.152122 0.277134 -0.3955934 0.0006209 0.000342 0.000176 0.000019 0.000020 0.0000031 0.0000053 0.000092 0.000140 2011 12 13 55908 0.151257 0.276507 -0.3962759 0.0007756 0.000387 0.000197 0.000019 0.000020 0.0000028 0.0000054 0.000104 0.000167 2011 12 14 55909 0.149943 0.276031 -0.3971234 0.0009411 0.000327 0.000190 0.000019 0.000020 0.0000200 0.0000054 0.000092 0.000146 2011 12 15 55910 0.148412 0.275427 -0.3981620 0.0011186 0.000242 0.000172 0.000019 0.000020 0.0000022 0.0000054 0.000073 0.000112 2011 12 16 55911 0.147197 0.274874 -0.3993830 0.0013247 0.000159 0.000149 0.000019 0.000020 0.0000013 0.0000054 0.000053 0.000079 2011 12 17 55912 0.145681 0.274731 -0.4007753 0.0014372 0.000187 0.000128 0.000019 0.000020 0.0000022 0.0000053 0.000046 0.000066 2011 12 18 55913 0.144383 0.274584 -0.4022345 0.0014914 0.000258 0.000104 0.000019 0.000020 0.0000031 0.0000055 0.000043 0.000060 2011 12 19 55914 0.142680 0.274384 -0.4037276 0.0014690 0.000332 0.000076 0.000019 0.000020 0.0000031 0.0000058 0.000039 0.000055 2011 12 20 55915 0.140327 0.273271 -0.4051147 0.0013238 0.000407 0.000044 0.000019 0.000020 0.0000017 0.0000057 0.000036 0.000049 2011 12 21 55916 0.138124 0.271971 -0.4063581 0.0011456 0.000334 0.000025 0.000019 0.000020 0.0000310 0.0000057 0.000064 0.000099 2011 12 22 55917 0.135795 0.270784 -0.4073918 0.0009061 0.000226 0.000009 0.000019 0.000020 0.0000029 0.0000058 0.000100 0.000164 2011 12 23 55918 0.134133 0.269652 -0.4082160 0.0007472 0.000231 -0.000033 0.000019 0.000020 0.0000026 0.0000058 0.000118 0.000191 2011 12 24 55919 0.132693 0.268659 -0.4089480 0.0007486 0.000282 -0.000082 0.000019 0.000020 0.0000022 0.0000057 0.000128 0.000203 2011 12 25 55920 0.131411 0.267980 -0.4097440 0.0008731 0.000340 -0.000126 0.000019 0.000020 0.0000022 0.0000055 0.000140 0.000215 2011 12 26 55921 0.129575 0.267432 -0.4107022 0.0010590 0.000402 -0.000161 0.000019 0.000020 0.0000022 0.0000052 0.000151 0.000227 2011 12 27 55922 0.127687 0.266757 -0.4118681 0.0012761 0.000465 -0.000187 0.000019 0.000020 0.0000022 0.0000050 0.000162 0.000239 2011 12 28 55923 0.126148 0.266352 -0.4132189 0.0014129 0.000526 -0.000202 0.000019 0.000020 0.0000038 0.0000050 0.000173 0.000252 2011 12 29 55924 0.124444 0.265677 -0.4146747 0.0014905 0.000537 -0.000169 0.000019 0.000021 0.0000238 0.0000052 0.000176 0.000268 2011 12 30 55925 0.122715 0.264897 -0.4162016 0.0015042 0.000527 -0.000119 0.000019 0.000021 0.0000034 0.0000052 0.000179 0.000283 2011 12 31 55926 0.120760 0.264166 -0.4176734 0.0014123 0.000525 -0.000087 0.000019 0.000021 0.0000065 0.0000053 0.000160 0.000257 2012 1 1 55927 0.118700 0.263209 -0.4190307 0.0012643 0.000520 -0.000064 0.000019 0.000021 0.0000070 0.0000055 0.000134 0.000215 2012 1 2 55928 0.117478 0.262407 -0.4202660 0.0011668 0.000506 -0.000044 0.000018 0.000020 0.0000043 0.0000055 0.000107 0.000169 2012 1 3 55929 0.115947 0.261649 -0.4213914 0.0010732 0.000487 -0.000035 0.000018 0.000020 0.0000046 0.0000055 0.000080 0.000127 2012 1 4 55930 0.114546 0.260620 -0.4223894 0.0009431 0.000464 -0.000036 0.000018 0.000019 0.0000024 0.0000054 0.000056 0.000088 2012 1 5 55931 0.113261 0.260200 -0.4232747 0.0008274 0.000424 -0.000073 0.000018 0.000019 0.0000140 0.0000054 0.000076 0.000121 2012 1 6 55932 0.111438 0.259932 -0.4240546 0.0007439 0.000381 -0.000125 0.000018 0.000019 0.0000031 0.0000054 0.000109 0.000174 2012 1 7 55933 0.108883 0.259664 -0.4247816 0.0007242 0.000348 -0.000141 0.000018 0.000019 0.0000036 0.0000053 0.000109 0.000170 2012 1 8 55934 0.106429 0.258874 -0.4255338 0.0007866 0.000325 -0.000147 0.000018 0.000019 0.0000056 0.0000055 0.000096 0.000144 2012 1 9 55935 0.104225 0.258041 -0.4263648 0.0009020 0.000308 -0.000153 0.000019 0.000021 0.0000066 0.0000055 0.000083 0.000118 2012 1 10 55936 0.101787 0.257252 -0.4272859 0.0009794 0.000299 -0.000161 0.000019 0.000021 0.0000030 0.0000055 0.000071 0.000092 2012 1 11 55937 0.099783 0.256002 -0.4283517 0.0011310 0.000296 -0.000196 0.000019 0.000020 0.0000152 0.0000055 0.000082 0.000108 2012 1 12 55938 0.098374 0.255057 -0.4295936 0.0013295 0.000299 -0.000236 0.000019 0.000020 0.0000041 0.0000053 0.000097 0.000135 2012 1 13 55939 0.097330 0.254481 -0.4310036 0.0014854 0.000308 -0.000272 0.000019 0.000020 0.0000029 0.0000053 0.000113 0.000162 2012 1 14 55940 0.096133 0.254325 -0.4325201 0.0015230 0.000307 -0.000270 0.000019 0.000020 0.0000058 0.0000052 0.000109 0.000157 2012 1 15 55941 0.094902 0.254379 -0.4340233 0.0014555 0.000303 -0.000252 0.000019 0.000020 0.0000076 0.0000033 0.000098 0.000139 2012 1 16 55942 0.093576 0.254528 -0.4354233 0.0013370 0.000298 -0.000223 0.000020 0.000020 0.0000063 0.0000014 0.000031 0.000043 2012 1 17 55943 0.091710 0.254906 -0.4366664 0.0011580 0.000295 -0.000201 0.000020 0.000020 0.0000040 0.0000014 0.000029 0.000041 2012 1 18 55944 0.089569 0.254798 -0.4377220 0.0009552 0.000292 -0.000183 0.000019 0.000020 0.0000012 0.0000014 0.000028 0.000040 2012 1 19 55945 0.087373 0.254461 -0.4385853 0.0007743 0.000356 -0.000209 0.000019 0.000020 0.0000219 0.0000014 0.000040 0.000049 2012 1 20 55946 0.085428 0.254180 -0.4393168 0.0006897 0.000431 -0.000250 0.000019 0.000020 0.0000042 0.0000014 0.000056 0.000062 2012 1 21 55947 0.083249 0.254651 -0.4400245 0.0007410 0.000439 -0.000289 0.000019 0.000020 0.0000024 0.0000014 0.000063 0.000071 2012 1 22 55948 0.080627 0.254924 -0.4408023 0.0008370 0.000401 -0.000323 0.000019 0.000020 0.0000042 0.0000011 0.000065 0.000077 2012 1 23 55949 0.078598 0.255078 -0.4416951 0.0009573 0.000353 -0.000351 0.000019 0.000020 0.0000056 0.0000010 0.000068 0.000085 2012 1 24 55950 0.076541 0.255624 -0.4427049 0.0010539 0.000302 -0.000373 0.000019 0.000020 0.0000028 0.0000010 0.000070 0.000091 2012 1 25 55951 0.074227 0.255806 -0.4437962 0.0011148 0.000253 -0.000351 0.000018 0.000019 0.0000151 0.0000010 0.000079 0.000101 2012 1 26 55952 0.071900 0.256092 -0.4449204 0.0011189 0.000212 -0.000312 0.000018 0.000019 0.0000071 0.0000010 0.000088 0.000111 2012 1 27 55953 0.069358 0.256156 -0.4460334 0.0010883 0.000181 -0.000266 0.000018 0.000019 0.0000025 0.0000010 0.000098 0.000120 2012 1 28 55954 0.066770 0.256221 -0.4470732 0.0010003 0.000207 -0.000237 0.000018 0.000019 0.0000154 0.0000010 0.000089 0.000109 2012 1 29 55955 0.064294 0.256203 -0.4479982 0.0008641 0.000260 -0.000216 0.000018 0.000019 0.0000049 0.0000012 0.000073 0.000090 2012 1 30 55956 0.061824 0.255972 -0.4487993 0.0007511 0.000316 -0.000195 0.000019 0.000021 0.0000048 0.0000017 0.000056 0.000071 2012 1 31 55957 0.059292 0.255822 -0.4494656 0.0006002 0.000376 -0.000179 0.000019 0.000021 0.0000020 0.0000017 0.000041 0.000052 2012 2 1 55958 0.056906 0.255521 -0.4499897 0.0004580 0.000404 -0.000155 0.000019 0.000020 0.0000026 0.0000015 0.000036 0.000046 2012 2 2 55959 0.054725 0.255253 -0.4504155 0.0003937 0.000416 -0.000138 0.000019 0.000020 0.0000040 0.0000015 0.000035 0.000045 2012 2 3 55960 0.052998 0.254824 -0.4508189 0.0004269 0.000416 -0.000134 0.000019 0.000018 0.0000018 0.0000015 0.000034 0.000044 2012 2 4 55961 0.051408 0.254365 -0.4512567 0.0004943 0.000404 -0.000161 0.000019 0.000018 0.0000196 0.0000015 0.000038 0.000041 2012 2 5 55962 0.049333 0.254085 -0.4517747 0.0005607 0.000378 -0.000204 0.000019 0.000020 0.0000080 0.0000015 0.000043 0.000037 2012 2 6 55963 0.047368 0.254001 -0.4524402 0.0007546 0.000308 -0.000278 0.000022 0.000023 0.0000070 0.0000017 0.000030 0.000040 2012 2 7 55964 0.045706 0.254220 -0.4533091 0.0009995 0.000258 -0.000330 0.000022 0.000023 0.0000023 0.0000017 0.000028 0.000038 2012 2 8 55965 0.044328 0.254546 -0.4544131 0.0012229 0.000299 -0.000339 0.000021 0.000022 0.0000350 0.0000016 0.000034 0.000046 2012 2 9 55966 0.043192 0.255056 -0.4557227 0.0013892 0.000362 -0.000331 0.000021 0.000022 0.0000087 0.0000016 0.000042 0.000056 2012 2 10 55967 0.042172 0.255797 -0.4571640 0.0014757 0.000422 -0.000316 0.000021 0.000022 0.0000028 0.0000016 0.000050 0.000067 2012 2 11 55968 0.041276 0.256690 -0.4586395 0.0014643 0.000361 -0.000304 0.000021 0.000022 0.0000103 0.0000016 0.000049 0.000067 2012 2 12 55969 0.040311 0.257438 -0.4600560 0.0013481 0.000255 -0.000290 0.000021 0.000022 0.0000090 0.0000014 0.000046 0.000063 2012 2 13 55970 0.038861 0.258102 -0.4613256 0.0011742 0.000149 -0.000272 0.000022 0.000025 0.0000081 0.0000012 0.000043 0.000061 2012 2 14 55971 0.037082 0.258631 -0.4623763 0.0009157 0.000050 -0.000258 0.000022 0.000025 0.0000030 0.0000012 0.000041 0.000057 2012 2 15 55972 0.035700 0.259565 -0.4631795 0.0006923 0.000089 -0.000259 0.000021 0.000024 0.0000638 0.0000012 0.000040 0.000057 2012 2 16 55973 0.034328 0.260928 -0.4637969 0.0005548 0.000168 -0.000266 0.000021 0.000024 0.0000067 0.0000012 0.000040 0.000057 2012 2 17 55974 0.033052 0.261952 -0.4643422 0.0005356 0.000251 -0.000278 0.000021 0.000024 0.0000019 0.0000012 0.000040 0.000057 2012 2 18 55975 0.031627 0.263077 -0.4649159 0.0006173 0.000243 -0.000280 0.000021 0.000024 0.0000033 0.0000012 0.000052 0.000074 2012 2 19 55976 0.030595 0.263990 -0.4655836 0.0007289 0.000201 -0.000280 0.000021 0.000024 0.0000052 0.0000014 0.000068 0.000096 2012 2 20 55977 0.029688 0.265055 -0.4663655 0.0008446 0.000148 -0.000275 0.000023 0.000028 0.0000060 0.0000018 0.000085 0.000120 2012 2 21 55978 0.028345 0.265672 -0.4672390 0.0008971 0.000106 -0.000277 0.000023 0.000028 0.0000052 0.0000018 0.000101 0.000142 2012 2 22 55979 0.026675 0.266316 -0.4681516 0.0009304 0.000069 -0.000276 0.000022 0.000027 0.0000027 0.0000018 0.000116 0.000160 2012 2 23 55980 0.024689 0.267060 -0.4690540 0.0008475 0.000138 -0.000287 0.000022 0.000027 0.0000198 0.0000018 0.000091 0.000126 2012 2 24 55981 0.022814 0.267829 -0.4698906 0.0007513 0.000232 -0.000299 0.000022 0.000027 0.0000016 0.0000018 0.000055 0.000076 2012 2 25 55982 0.021568 0.268920 -0.4706253 0.0006815 0.000242 -0.000344 0.000022 0.000027 0.0000028 0.0000018 0.000049 0.000068 2012 2 26 55983 0.020597 0.270273 -0.4712585 0.0005631 0.000213 -0.000396 0.000022 0.000027 0.0000063 0.0000018 0.000055 0.000076 2012 2 27 55984 0.020119 0.271192 -0.4718084 0.0005016 0.000167 -0.000441 0.000027 0.000030 0.0000069 0.0000019 0.000061 0.000083 2012 2 28 55985 0.019720 0.271968 -0.4722734 0.0004154 0.000125 -0.000477 0.000027 0.000030 0.0000024 0.0000019 0.000067 0.000091 2012 2 29 55986 0.019069 0.273018 -0.4726379 0.0003138 0.000115 -0.000438 0.000026 0.000030 0.0000356 0.0000019 0.000085 0.000127 2012 3 1 55987 0.018798 0.274244 -0.4729194 0.0002463 0.000113 -0.000373 0.000023 0.000025 0.0000086 0.0000022 0.000113 0.000171 2012 3 2 55988 0.018937 0.275646 -0.4731884 0.0002932 0.000111 -0.000303 0.000023 0.000025 0.0000040 0.0000022 0.000141 0.000216 2012 3 3 55989 0.018563 0.277173 -0.4735285 0.0003928 0.000089 -0.000259 0.000023 0.000025 0.0000039 0.0000022 0.000136 0.000192 2012 3 4 55990 0.017782 0.278172 -0.4739946 0.0005434 0.000063 -0.000232 0.000023 0.000025 0.0000043 0.0000022 0.000120 0.000144 2012 3 5 55991 0.017387 0.279057 -0.4746191 0.0007031 0.000063 -0.000317 0.000021 0.000024 0.0000040 0.0000021 0.000114 0.000146 2012 3 6 55992 0.016938 0.279996 -0.4754440 0.0009276 0.000053 -0.000354 0.000021 0.000024 0.0000023 0.0000021 0.000103 0.000126 2012 3 7 55993 0.015713 0.280781 -0.4764778 0.0011170 0.000055 -0.000372 0.000021 0.000023 0.0000253 0.0000021 0.000089 0.000107 2012 3 8 55994 0.014414 0.281463 -0.4776973 0.0012909 0.000064 -0.000383 0.000021 0.000023 0.0000110 0.0000021 0.000072 0.000087 2012 3 9 55995 0.013219 0.282526 -0.4790665 0.0014230 0.000076 -0.000390 0.000021 0.000023 0.0000027 0.0000021 0.000056 0.000068 2012 3 10 55996 0.012112 0.283779 -0.4805270 0.0014563 0.000089 -0.000393 0.000021 0.000023 0.0000048 0.0000021 0.000054 0.000065 2012 3 11 55997 0.011081 0.285000 -0.4819953 0.0014503 0.000101 -0.000387 0.000021 0.000023 0.0000064 0.0000021 0.000056 0.000069 2012 3 12 55998 0.009693 0.286339 -0.4833724 0.0012916 0.000111 -0.000366 0.000022 0.000024 0.0000076 0.0000023 0.000060 0.000074 2012 3 13 55999 0.008716 0.287402 -0.4846160 0.0011775 0.000115 -0.000333 0.000022 0.000024 0.0000076 0.0000023 0.000062 0.000077 2012 3 14 56000 0.007787 0.288851 -0.4857658 0.0011305 0.000113 -0.000287 0.000021 0.000023 0.0000023 0.0000022 0.000066 0.000081 2012 3 15 56001 0.006396 0.290088 -0.4868843 0.0011365 0.000123 -0.000261 0.000021 0.000023 0.0000239 0.0000022 0.000051 0.000067 2012 3 16 56002 0.004961 0.291305 -0.4880525 0.0012366 0.000131 -0.000237 0.000021 0.000023 0.0000022 0.0000022 0.000033 0.000048 2012 3 17 56003 0.003408 0.292453 -0.4893520 0.0013827 0.000134 -0.000231 0.000021 0.000023 0.0000060 0.0000022 0.000032 0.000048 2012 3 18 56004 0.001664 0.293818 -0.4907959 0.0014974 0.000132 -0.000232 0.000021 0.000023 0.0000098 0.0000022 0.000039 0.000056 2012 3 19 56005 -0.000066 0.295068 -0.4923400 0.0015768 0.000127 -0.000233 0.000021 0.000024 0.0000088 0.0000023 0.000045 0.000064 2012 3 20 56006 -0.001503 0.295981 -0.4939230 0.0015941 0.000118 -0.000230 0.000021 0.000024 0.0000033 0.0000023 0.000052 0.000071 2012 3 21 56007 -0.002628 0.296959 -0.4954831 0.0015507 0.000104 -0.000200 0.000020 0.000023 0.0000308 0.0000022 0.000047 0.000066 2012 3 22 56008 -0.003668 0.298210 -0.4969786 0.0014646 0.000091 -0.000163 0.000020 0.000023 0.0000074 0.0000022 0.000040 0.000057 2012 3 23 56009 -0.004461 0.299582 -0.4983959 0.0013760 0.000078 -0.000125 0.000020 0.000023 0.0000032 0.0000022 0.000033 0.000048 2012 3 24 56010 -0.004601 0.300921 -0.4997354 0.0013061 0.000129 -0.000121 0.000020 0.000023 0.0000040 0.0000022 0.000031 0.000045 2012 3 25 56011 -0.005048 0.302625 -0.5009856 0.0012063 0.000203 -0.000130 0.000020 0.000023 0.0000065 0.0000018 0.000031 0.000045 2012 3 26 56012 -0.005769 0.303991 -0.5021345 0.0011041 0.000295 -0.000150 0.000020 0.000024 0.0000060 0.0000015 0.000030 0.000043 2012 3 27 56013 -0.006669 0.305064 -0.5031977 0.0010361 0.000361 -0.000174 0.000020 0.000024 0.0000022 0.0000015 0.000030 0.000042 2012 3 28 56014 -0.007584 0.305823 -0.5042043 0.0010024 0.000324 -0.000259 0.000019 0.000023 0.0000037 0.0000015 0.000043 0.000058 2012 3 29 56015 -0.008111 0.307058 -0.5051893 0.0009960 0.000254 -0.000355 0.000019 0.000023 0.0000051 0.0000015 0.000057 0.000076 2012 3 30 56016 -0.008824 0.308790 -0.5061999 0.0010312 0.000176 -0.000439 0.000019 0.000023 0.0000024 0.0000015 0.000072 0.000093 2012 3 31 56017 -0.009569 0.310658 -0.5072863 0.0011621 0.000149 -0.000438 0.000019 0.000023 0.0000018 0.0000015 0.000076 0.000103 2012 4 1 56018 -0.010272 0.312753 -0.5085085 0.0013212 0.000142 -0.000392 0.000019 0.000023 0.0000044 0.0000018 0.000077 0.000111 2012 4 2 56019 -0.011351 0.314853 -0.5098935 0.0014645 0.000136 -0.000317 0.000020 0.000023 0.0000059 0.0000023 0.000068 0.000114 2012 4 3 56020 -0.012264 0.316855 -0.5114393 0.0016464 0.000140 -0.000253 0.000020 0.000023 0.0000029 0.0000023 0.000068 0.000121 2012 4 4 56021 -0.012896 0.318655 -0.5131549 0.0017876 0.000264 -0.000234 0.000019 0.000022 0.0000241 0.0000023 0.000072 0.000128 2012 4 5 56022 -0.013364 0.320312 -0.5149928 0.0018599 0.000415 -0.000232 0.000019 0.000022 0.0000019 0.0000023 0.000076 0.000134 2012 4 6 56023 -0.013715 0.322168 -0.5168595 0.0018563 0.000421 -0.000251 0.000019 0.000022 0.0000202 0.0000023 0.000072 0.000129 2012 4 7 56024 -0.013652 0.324149 -0.5186314 0.0016680 0.000362 -0.000280 0.000021 0.000022 0.0000088 0.0000023 0.000066 0.000120 2012 4 8 56025 -0.013097 0.325975 -0.5202021 0.0014264 0.000289 -0.000309 0.000021 0.000022 0.0000079 0.0000023 0.000060 0.000110 2012 4 9 56026 -0.012284 0.327886 -0.5215395 0.0012179 0.000207 -0.000296 0.000020 0.000023 0.0000069 0.0000023 0.000053 0.000102 2012 4 10 56027 -0.011627 0.330100 -0.5226753 0.0010577 0.000112 -0.000322 0.000020 0.000023 0.0000046 0.0000023 0.000047 0.000093 2012 4 11 56028 -0.010886 0.332532 -0.5236983 0.0009927 0.000018 -0.000346 0.000020 0.000022 0.0000028 0.0000022 0.000038 0.000083 2012 4 12 56029 -0.009896 0.334821 -0.5247296 0.0010518 -0.000003 -0.000367 0.000020 0.000022 0.0000184 0.0000022 0.000027 0.000058 2012 4 13 56030 -0.008876 0.337102 -0.5258404 0.0011597 0.000004 -0.000382 0.000020 0.000022 0.0000026 0.0000022 0.000014 0.000029 2012 4 14 56031 -0.008011 0.339146 -0.5270311 0.0012156 0.000001 -0.000389 0.000020 0.000022 0.0000041 0.0000022 0.000014 0.000028 2012 4 15 56032 -0.007230 0.341115 -0.5282793 0.0012592 0.000002 -0.000387 0.000020 0.000022 0.0000066 0.0000022 0.000019 0.000037 2012 4 16 56033 -0.006329 0.342951 -0.5295673 0.0013069 0.000012 -0.000375 0.000020 0.000023 0.0000048 0.0000024 0.000027 0.000047 2012 4 17 56034 -0.005199 0.344926 -0.5308783 0.0013224 0.000030 -0.000365 0.000020 0.000023 0.0000015 0.0000024 0.000033 0.000056 2012 4 18 56035 -0.004236 0.347145 -0.5321965 0.0013050 0.000049 -0.000340 0.000022 0.000024 0.0000216 0.0000024 0.000035 0.000059 2012 4 19 56036 -0.003430 0.349499 -0.5334911 0.0012692 0.000068 -0.000312 0.000022 0.000024 0.0000034 0.0000024 0.000036 0.000061 2012 4 20 56037 -0.002859 0.351929 -0.5347248 0.0011976 0.000088 -0.000285 0.000022 0.000024 0.0000015 0.0000024 0.000038 0.000064 2012 4 21 56038 -0.002364 0.354154 -0.5358613 0.0010735 0.000084 -0.000298 0.000022 0.000024 0.0000184 0.0000024 0.000034 0.000058 2012 4 22 56039 -0.001494 0.356002 -0.5368881 0.0009847 0.000070 -0.000325 0.000022 0.000024 0.0000048 0.0000024 0.000029 0.000048 2012 4 23 56040 -0.000272 0.357958 -0.5378074 0.0008768 0.000053 -0.000345 0.000022 0.000026 0.0000056 0.0000102 0.000024 0.000040 2012 4 24 56041 0.000653 0.359920 -0.5386339 0.0007777 0.000033 -0.000357 0.000022 0.000026 0.0000020 0.0000102 0.000018 0.000030 2012 4 25 56042 0.001379 0.361760 -0.5394047 0.0007599 0.000097 -0.000332 0.000021 0.000026 0.0000238 0.0000100 0.000051 0.000046 2012 4 26 56043 0.002156 0.363391 -0.5401645 0.0007562 0.000179 -0.000290 0.000021 0.000026 0.0000078 0.0000100 0.000095 0.000069 2012 4 27 56044 0.003382 0.364806 -0.5409514 0.0008113 0.000255 -0.000242 0.000021 0.000026 0.0000102 0.0000100 0.000138 0.000091 2012 4 28 56045 0.004355 0.366218 -0.5417935 0.0008890 0.000002 0.000002 0.000021 0.000026 0.0000085 0.0000099 0.000087 0.000081 2012 4 29 56046 0.005295 0.367419 -0.5427026 0.0009543 0.000002 0.000002 0.000021 0.000026 0.0000075 0.0000099 0.000065 0.000075 2012 4 30 56047 0.006321 0.368720 -0.5436860 0.0010777 -0.000016 -0.000254 0.000022 0.000027 0.0000081 0.0000104 0.000034 0.000061 2012 5 1 56048 0.007701 0.369896 -0.5448627 0.0012836 -0.000072 -0.000241 0.000022 0.000027 0.0000060 0.0000104 0.000034 0.000061 2012 5 2 56049 0.009214 0.370867 -0.5462259 0.0014206 -0.000130 -0.000252 0.000021 0.000026 0.0000038 0.0000099 0.000039 0.000071 2012 5 3 56050 0.010546 0.371897 -0.5476981 0.0014781 -0.000174 -0.000257 0.000021 0.000026 0.0000011 0.0000095 0.000042 0.000076 2012 5 4 56051 0.011863 0.373233 -0.5491911 0.0014524 -0.000124 -0.000430 0.000021 0.000026 0.0000003 0.0000099 0.000029 0.000053 2012 5 5 56052 0.013328 0.374713 -0.5505806 0.0013560 -0.000128 -0.000496 0.000021 0.000026 0.0000124 0.0000101 0.000029 0.000050 2012 5 6 56053 0.015115 0.376289 -0.5519143 0.0011972 -0.000156 -0.000490 0.000021 0.000026 0.0000108 0.0000097 0.000035 0.000058 2012 5 7 56054 0.016308 0.378006 -0.5529813 0.0009654 -0.000176 -0.000452 0.000021 0.000029 0.0000082 0.0000099 0.000039 0.000065 2012 5 8 56055 0.016994 0.379387 -0.5538805 0.0008582 -0.000188 -0.000415 0.000021 0.000029 0.0000023 0.0000095 0.000045 0.000072 2012 5 9 56056 0.017569 0.380756 -0.5546775 0.0008585 -0.000164 -0.000381 0.000020 0.000027 0.0000084 0.0000087 0.000039 0.000065 2012 5 10 56057 0.017690 0.381913 -0.5555654 0.0008893 -0.000129 -0.000348 0.000020 0.000027 0.0000094 0.0000087 0.000032 0.000055 2012 5 11 56058 0.017780 0.382703 -0.5564987 0.0009321 -0.000094 -0.000313 0.000020 0.000027 0.0000021 0.0000090 0.000024 0.000045 2012 5 12 56059 0.018358 0.383365 -0.5574634 0.0009890 -0.000051 -0.000324 0.000020 0.000027 0.0000147 0.0000093 0.000022 0.000042 2012 5 13 56060 0.019698 0.384038 -0.5584999 0.0010488 -0.000011 -0.000353 0.000020 0.000027 0.0000130 0.0000089 0.000021 0.000041 2012 5 14 56061 0.021579 0.384748 -0.5595554 0.0010784 0.000021 -0.000379 0.000018 0.000021 0.0000075 0.0000086 0.000021 0.000041 2012 5 15 56062 0.023673 0.385619 -0.5606062 0.0010969 0.000040 -0.000404 0.000016 0.000018 0.0000026 0.0000086 0.000021 0.000041 2012 5 16 56063 0.025895 0.386691 -0.5617379 0.0010618 -0.000032 -0.000384 0.000015 0.000020 0.0000114 0.0000082 0.000029 0.000040 2012 5 17 56064 0.027811 0.387502 -0.5626890 0.0009536 -0.000129 -0.000346 0.000015 0.000020 0.0000068 0.0000079 0.000041 0.000040 2012 5 18 56065 0.029234 0.388335 -0.5636053 0.0008258 -0.000223 -0.000299 0.000017 0.000022 0.0000037 0.0000078 0.000053 0.000040 2012 5 19 56066 0.030346 0.388884 -0.5643392 0.0006682 -0.000226 -0.000250 0.000019 0.000025 0.0000060 0.0000080 0.000053 0.000037 2012 5 20 56067 0.031434 0.389058 -0.5649455 0.0005017 -0.000186 -0.000199 0.000017 0.000022 0.0000061 0.0000078 0.000047 0.000034 2012 5 21 56068 0.032275 0.389282 -0.5653980 0.0004082 -0.000137 -0.000147 0.000016 0.000022 0.0000118 0.0000074 0.000042 0.000031 2012 5 22 56069 0.033210 0.389771 -0.5657928 0.0004042 -0.000078 -0.000097 0.000016 0.000022 0.0000061 0.0000074 0.000037 0.000027 2012 5 23 56070 0.034221 0.390526 -0.5661696 0.0004037 -0.000073 -0.000096 0.000015 0.000021 0.0000111 0.0000074 0.000035 0.000029 2012 5 24 56071 0.035455 0.391205 -0.5665821 0.0004431 -0.000082 -0.000117 0.000015 0.000021 0.0000075 0.0000074 0.000040 0.000033 2012 5 25 56072 0.037074 0.391898 -0.5670903 0.0005170 -0.000093 -0.000149 0.000015 0.000021 0.0000039 0.0000074 0.000045 0.000037 2012 5 26 56073 0.039082 0.392483 -0.5677077 0.0006670 -0.000100 -0.000185 0.000015 0.000021 0.0000159 0.0000073 0.000046 0.000038 2012 5 27 56074 0.041109 0.393177 -0.5684351 0.0008057 -0.000108 -0.000221 0.000015 0.000021 0.0000142 0.0000073 0.000045 0.000038 2012 5 28 56075 0.042920 0.393837 -0.5693419 0.0009406 -0.000102 -0.000231 0.000016 0.000022 0.0000129 0.0000072 0.000054 0.000039 2012 5 29 56076 0.044706 0.394674 -0.5703691 0.0010727 -0.000112 -0.000261 0.000016 0.000022 0.0000088 0.0000072 0.000053 0.000039 2012 5 30 56077 0.045635 0.395458 -0.5714640 0.0011683 -0.000124 -0.000283 0.000015 0.000021 0.0000045 0.0000071 0.000050 0.000038 2012 5 31 56078 0.046295 0.395962 -0.5726044 0.0012286 -0.000105 -0.000410 0.000018 0.000022 0.0000062 0.0000077 0.000029 0.000057 2012 6 1 56079 0.046904 0.396529 -0.5738579 0.0011900 -0.000126 -0.000424 0.000018 0.000022 0.0000020 0.0000077 0.000023 0.000038 2012 6 2 56080 0.047752 0.397169 -0.5750136 0.0010731 -0.000151 -0.000414 0.000018 0.000022 0.0000048 0.0000077 0.000023 0.000035 2012 6 3 56081 0.048883 0.397593 -0.5759777 0.0008980 -0.000177 -0.000388 0.000018 0.000022 0.0000064 0.0000080 0.000024 0.000037 2012 6 4 56082 0.050164 0.397885 -0.5768206 0.0007145 -0.000202 -0.000346 0.000016 0.000021 0.0000066 0.0000082 0.000026 0.000041 2012 6 5 56083 0.051748 0.398092 -0.5774835 0.0006022 -0.000224 -0.000306 0.000016 0.000021 0.0000049 0.0000082 0.000027 0.000043 2012 6 6 56084 0.053303 0.398675 -0.5780250 0.0006101 -0.000244 -0.000266 0.000015 0.000021 0.0000020 0.0000077 0.000028 0.000046 2012 6 7 56085 0.054801 0.398944 -0.5786822 0.0007000 -0.000230 -0.000265 0.000015 0.000021 0.0000117 0.0000074 0.000028 0.000046 2012 6 8 56086 0.056559 0.399505 -0.5794676 0.0008186 -0.000203 -0.000275 0.000015 0.000021 0.0000033 0.0000071 0.000028 0.000045 2012 6 9 56087 0.058236 0.400027 -0.5803155 0.0008893 -0.000203 -0.000290 0.000015 0.000021 0.0000142 0.0000074 0.000028 0.000046 2012 6 10 56088 0.059975 0.400443 -0.5812728 0.0008809 -0.000211 -0.000305 0.000015 0.000021 0.0000086 0.0000071 0.000028 0.000047 2012 6 11 56089 0.061732 0.401401 -0.5820705 0.0008119 -0.000212 -0.000315 0.000017 0.000022 0.0000092 0.0000067 0.000029 0.000048 2012 6 12 56090 0.063526 0.402509 -0.5828366 0.0007430 -0.000207 -0.000316 0.000017 0.000022 0.0000080 0.0000067 0.000029 0.000049 2012 6 13 56091 0.064962 0.403874 -0.5835287 0.0006265 -0.000191 -0.000301 0.000017 0.000021 0.0000021 0.0000065 0.000031 0.000053 2012 6 14 56092 0.065967 0.404715 -0.5840927 0.0004785 -0.000165 -0.000228 0.000017 0.000021 0.0000055 0.0000065 0.000032 0.000057 2012 6 15 56093 0.066912 0.405172 -0.5844996 0.0003328 -0.000133 -0.000135 0.000017 0.000021 0.0000019 0.0000062 0.000034 0.000063 2012 6 16 56094 0.067613 0.405417 -0.5847645 0.0002061 -0.000137 -0.000153 0.000017 0.000021 0.0000080 0.0000065 0.000043 0.000076 2012 6 17 56095 0.068671 0.405618 -0.5849684 0.0001149 -0.000158 -0.000216 0.000017 0.000021 0.0000088 0.0000071 0.000056 0.000091 2012 6 18 56096 0.070078 0.405863 -0.5850269 0.0000151 -0.000188 -0.000289 0.000018 0.000022 0.0000090 0.0000077 0.000065 0.000103 2012 6 19 56097 0.071947 0.406222 -0.5849518 -0.0000577 -0.000219 -0.000356 0.000018 0.000022 0.0000044 0.0000077 0.000075 0.000115 2012 6 20 56098 0.073719 0.406799 -0.5848340 -0.0000932 -0.000227 -0.000336 0.000016 0.000022 0.0000025 0.0000079 0.000060 0.000099 2012 6 21 56099 0.075527 0.407342 -0.5847583 -0.0000777 -0.000228 -0.000283 0.000016 0.000022 0.0000019 0.0000079 0.000047 0.000079 2012 6 22 56100 0.077422 0.407945 -0.5847443 -0.0000077 -0.000231 -0.000226 0.000016 0.000022 0.0000013 0.0000076 0.000033 0.000059 2012 6 23 56101 0.078904 0.408461 -0.5848059 0.0001223 -0.000278 -0.000220 0.000016 0.000022 0.0000160 0.0000075 0.000033 0.000057 2012 6 24 56102 0.080862 0.408502 -0.5850064 0.0002569 -0.000337 -0.000230 0.000016 0.000022 0.0000086 0.0000075 0.000037 0.000061 2012 6 25 56103 0.083114 0.408517 -0.5853030 0.0003872 -0.000388 -0.000240 0.000017 0.000022 0.0000104 0.0000074 0.000041 0.000065 2012 6 26 56104 0.085285 0.408564 -0.5857136 0.0004553 -0.000429 -0.000250 0.000015 0.000019 0.0000044 0.0000073 0.000045 0.000068 2012 6 27 56105 0.087439 0.408651 -0.5861801 0.0004176 -0.000400 -0.000254 0.000014 0.000018 0.0000136 0.0000073 0.000037 0.000055 2012 6 28 56106 0.089473 0.409002 -0.5865662 0.0003057 -0.000345 -0.000256 0.000014 0.000018 0.0000077 0.0000073 0.000025 0.000038 2012 6 29 56107 0.091346 0.409225 -0.5867776 0.0001678 -0.000281 -0.000255 0.000014 0.000018 0.0000018 0.0000073 0.000013 0.000021 2012 6 30 56108 0.092800 0.409392 -0.5868238 0.0000012 -0.000256 -0.000237 0.000014 0.000018 0.0000449 0.0000076 0.000014 0.000021 2012 7 1 56109 0.094064 0.409151 0.4131816 -0.0001241 -0.000242 -0.000210 0.000014 0.000018 0.0000122 0.0000075 0.000019 0.000029 2012 7 2 56110 0.095640 0.408939 0.4133963 -0.0002276 -0.000216 -0.000170 0.000019 0.000022 0.0000087 0.0000073 0.000024 0.000037 2012 7 3 56111 0.097268 0.408650 0.4136688 -0.0002157 -0.000206 -0.000143 0.000019 0.000022 0.0000024 0.0000073 0.000029 0.000044 2012 7 4 56112 0.098946 0.408274 0.4137809 -0.0001348 -0.000183 -0.000148 0.000018 0.000023 0.0000153 0.0000072 0.000030 0.000046 2012 7 5 56113 0.100502 0.407981 0.4138739 -0.0000409 -0.000162 -0.000166 0.000018 0.000023 0.0000091 0.0000072 0.000031 0.000046 2012 7 6 56114 0.102491 0.407531 0.4138922 0.0000899 -0.000148 -0.000186 0.000018 0.000023 0.0000028 0.0000072 0.000031 0.000046 2012 7 7 56115 0.105059 0.407518 0.4137229 0.0002019 -0.000176 -0.000200 0.000018 0.000023 0.0000161 0.0000072 0.000029 0.000044 2012 7 8 56116 0.107683 0.407590 0.4134589 0.0002824 -0.000218 -0.000209 0.000018 0.000023 0.0000124 0.0000072 0.000027 0.000042 2012 7 9 56117 0.110089 0.407731 0.4131662 0.0002979 -0.000255 -0.000213 0.000017 0.000020 0.0000076 0.0000075 0.000026 0.000040 2012 7 10 56118 0.111864 0.407792 0.4128977 0.0002350 -0.000282 -0.000210 0.000015 0.000018 0.0000019 0.0000074 0.000023 0.000037 2012 7 11 56119 0.113448 0.407539 0.4127029 0.0001164 -0.000265 -0.000220 0.000018 0.000021 0.0000126 0.0000070 0.000021 0.000034 2012 7 12 56120 0.114869 0.407288 0.4126306 -0.0000738 -0.000230 -0.000229 0.000018 0.000021 0.0000106 0.0000070 0.000019 0.000031 2012 7 13 56121 0.116662 0.407013 0.4128536 -0.0002246 -0.000191 -0.000231 0.000018 0.000021 0.0000027 0.0000070 0.000017 0.000028 2012 7 14 56122 0.118293 0.407111 0.4131009 -0.0002932 -0.000196 -0.000193 0.000022 0.000023 0.0000082 0.0000075 0.000018 0.000031 2012 7 15 56123 0.119936 0.407332 0.4133776 -0.0003112 -0.000214 -0.000137 0.000022 0.000023 0.0000052 0.0000078 0.000021 0.000035 2012 7 16 56124 0.121393 0.407270 0.4137799 -0.0003142 -0.000219 -0.000077 0.000020 0.000023 0.0000117 0.0000075 0.000024 0.000040 2012 7 17 56125 0.122814 0.407047 0.4140680 -0.0002586 -0.000231 -0.000023 0.000020 0.000023 0.0000040 0.0000072 0.000027 0.000044 2012 7 18 56126 0.124435 0.406840 0.4141897 -0.0001211 -0.000188 -0.000023 0.000019 0.000021 0.0000055 0.0000072 0.000026 0.000042 2012 7 19 56127 0.126239 0.406643 0.4142080 0.0000848 -0.000135 -0.000040 0.000019 0.000021 0.0000034 0.0000072 0.000024 0.000038 2012 7 20 56128 0.127745 0.406264 0.4140650 0.0002780 -0.000089 -0.000063 0.000019 0.000021 0.0000013 0.0000072 0.000023 0.000035 2012 7 21 56129 0.129227 0.405785 0.4137358 0.0003926 -0.000102 -0.000089 0.000019 0.000021 0.0000051 0.0000072 0.000030 0.000035 2012 7 22 56130 0.130787 0.405125 0.4132710 0.0004882 -0.000138 -0.000117 0.000019 0.000021 0.0000047 0.0000072 0.000041 0.000037 2012 7 23 56131 0.132387 0.404523 0.4127181 0.0005677 -0.000169 -0.000247 0.000018 0.000021 0.0000041 0.0000069 0.000023 0.000033 2012 7 24 56132 0.133932 0.404018 0.4121307 0.0005665 -0.000200 -0.000303 0.000018 0.000021 0.0000014 0.0000069 0.000022 0.000033 2012 7 25 56133 0.135614 0.403272 0.4115946 0.0005071 -0.000246 -0.000239 0.000017 0.000020 0.0000139 0.0000066 0.000018 0.000028 2012 7 26 56134 0.137280 0.402524 0.4110659 0.0004115 -0.000296 -0.000133 0.000017 0.000020 0.0000084 0.0000066 0.000017 0.000024 2012 7 27 56135 0.138993 0.401814 0.4107666 0.0002750 -0.000338 -0.000018 0.000017 0.000020 0.0000020 0.0000066 0.000015 0.000019 2012 7 28 56136 0.140920 0.401178 0.4105485 0.0001827 -0.000365 0.000037 0.000017 0.000020 0.0000078 0.0000069 0.000016 0.000019 2012 7 29 56137 0.142506 0.401049 0.4104218 0.0001033 -0.000378 0.000066 0.000223 0.000101 0.0000051 0.0000270 0.000016 0.000021 2012 7 30 56138 0.143480 0.400692 0.4103389 0.0000898 -0.000352 0.000113 0.000020 0.000022 0.0000102 0.0000081 0.000095 0.000050 2012 7 31 56139 0.144625 0.400215 0.4102122 0.0001944 -0.000361 0.000129 0.000020 0.000022 0.0000100 0.0000081 0.000095 0.000052 2012 8 1 56140 0.145946 0.399829 0.4099390 0.0003125 -0.000243 -0.000097 0.000020 0.000023 0.0000101 0.0000079 0.000013 0.000017 2012 8 2 56141 0.147315 0.399345 0.4095109 0.0004448 -0.000259 -0.000018 0.000020 0.000023 0.0000248 0.0000080 0.000018 0.000023 2012 8 3 56142 0.148473 0.398802 0.4090457 0.0005349 -0.000267 0.000054 0.000020 0.000023 0.0000056 0.0000080 0.000024 0.000030 2012 8 4 56143 0.149249 0.398140 0.4084970 0.0005555 -0.000253 0.000091 0.000020 0.000023 0.0000047 0.0000079 0.000027 0.000034 2012 8 5 56144 0.149979 0.397590 0.4078980 0.0005695 -0.000229 0.000114 0.000020 0.000023 0.0000052 0.0000076 0.000029 0.000037 2012 8 6 56145 0.150671 0.397024 0.4074006 0.0005046 -0.000323 0.000025 0.000020 0.000023 0.0000178 0.0000075 0.000028 0.000035 2012 8 7 56146 0.151467 0.396333 0.4069557 0.0003400 -0.000340 -0.000001 0.000020 0.000023 0.0000060 0.0000075 0.000029 0.000036 2012 8 8 56147 0.152500 0.395877 0.4066848 0.0001660 -0.000288 0.000044 0.000019 0.000022 0.0000130 0.0000079 0.000032 0.000041 2012 8 9 56148 0.153731 0.395218 0.4065725 0.0000398 -0.000217 0.000103 0.000019 0.000022 0.0000146 0.0000079 0.000036 0.000046 2012 8 10 56149 0.155332 0.394230 0.4065859 -0.0000282 -0.000147 0.000157 0.000019 0.000022 0.0000036 0.0000076 0.000039 0.000052 2012 8 11 56150 0.156948 0.393425 0.4066744 -0.0000903 -0.000136 0.000116 0.000019 0.000022 0.0000088 0.0000079 0.000038 0.000050 2012 8 12 56151 0.158540 0.392912 0.4068334 -0.0001849 -0.000149 0.000040 0.000019 0.000022 0.0000101 0.0000078 0.000035 0.000045 2012 8 13 56152 0.160221 0.392335 0.4070462 -0.0001930 -0.000153 -0.000034 0.000020 0.000023 0.0000134 0.0000075 0.000033 0.000040 2012 8 14 56153 0.162134 0.391867 0.4071880 -0.0000865 -0.000175 -0.000110 0.000020 0.000023 0.0000041 0.0000075 0.000030 0.000035 2012 8 15 56154 0.163362 0.391425 0.4072338 0.0000221 -0.000192 -0.000108 0.000019 0.000022 0.0000178 0.0000073 0.000027 0.000031 2012 8 16 56155 0.164337 0.390714 0.4071029 0.0001697 -0.000213 -0.000081 0.000019 0.000022 0.0000102 0.0000073 0.000023 0.000028 2012 8 17 56156 0.165627 0.389979 0.4068344 0.0003544 -0.000237 -0.000049 0.000019 0.000022 0.0000025 0.0000073 0.000019 0.000025 2012 8 18 56157 0.167118 0.389033 0.4064603 0.0005000 -0.000252 -0.000046 0.000019 0.000022 0.0000222 0.0000073 0.000017 0.000022 2012 8 19 56158 0.168597 0.387928 0.4058641 0.0006231 -0.000264 -0.000053 0.000024 0.000027 0.0000098 0.0000069 0.000014 0.000019 2012 8 20 56159 0.169942 0.386763 0.4051827 0.0006640 -0.000273 -0.000058 0.000023 0.000026 0.0000150 0.0000059 0.000012 0.000016 2012 8 21 56160 0.171298 0.385398 0.4044970 0.0006236 -0.000283 -0.000061 0.000023 0.000026 0.0000044 0.0000059 0.000010 0.000013 2012 8 22 56161 0.172368 0.384295 0.4039089 0.0005211 -0.000301 -0.000077 0.000023 0.000027 0.0000107 0.0000060 0.000014 0.000019 2012 8 23 56162 0.173431 0.383057 0.4034457 0.0003728 -0.000321 -0.000093 0.000021 0.000025 0.0000130 0.0000060 0.000021 0.000028 2012 8 24 56163 0.174105 0.382028 0.4031042 0.0002330 -0.000337 -0.000107 0.000025 0.000025 0.0000031 0.0000066 0.000028 0.000037 2012 8 25 56164 0.174644 0.380911 0.4029126 0.0001327 -0.000362 -0.000095 0.000027 0.000025 0.0000127 0.0000066 0.000035 0.000047 2012 8 26 56165 0.175245 0.379956 0.4027897 0.0001302 -0.000384 -0.000070 0.000219 0.000124 0.0000091 0.0000255 0.000041 0.000058 2012 8 27 56166 0.175637 0.378763 0.4025922 0.0002565 -0.000394 -0.000041 0.000029 0.000030 0.0000075 0.0000065 0.000049 0.000065 2012 8 28 56167 0.176051 0.377272 0.4022464 0.0004426 -0.000394 -0.000012 0.000029 0.000030 0.0000023 0.0000061 0.000055 0.000075 2012 8 29 56168 0.176396 0.375751 0.4017502 0.0006084 -0.000357 -0.000015 0.000029 0.000029 0.0000144 0.0000069 0.000047 0.000066 2012 8 30 56169 0.176738 0.374268 0.4010153 0.0007421 -0.000303 -0.000027 0.000029 0.000029 0.0000074 0.0000069 0.000034 0.000046 2012 8 31 56170 0.177099 0.373095 0.4002225 0.0008255 -0.000245 -0.000040 0.000027 0.000029 0.0000018 0.0000066 0.000020 0.000025 2012 9 1 56171 0.177275 0.371957 0.3993713 0.0008531 -0.000176 -0.000026 0.000025 0.000026 0.0000068 0.0000063 0.000018 0.000021 2012 9 2 56172 0.176992 0.370856 0.3985346 0.0008164 -0.000110 -0.000004 0.000025 0.000026 0.0000062 0.0000060 0.000019 0.000024 2012 9 3 56173 0.176650 0.369576 0.3977350 0.0007865 -0.000057 0.000019 0.000022 0.000025 0.0000038 0.0000060 0.000021 0.000027 2012 9 4 56174 0.176375 0.368337 0.3969768 0.0006557 -0.000013 0.000037 0.000022 0.000025 0.0000021 0.0000060 0.000022 0.000030 2012 9 5 56175 0.176227 0.366835 0.3964221 0.0004809 0.000018 0.000054 0.000024 0.000024 0.0000010 0.0000068 0.000024 0.000033 2012 9 6 56176 0.176079 0.365318 0.3960766 0.0003651 -0.000030 0.000018 0.000024 0.000024 0.0000127 0.0000078 0.000026 0.000038 2012 9 7 56177 0.175947 0.363610 0.3957532 0.0002873 -0.000106 -0.000029 0.000024 0.000026 0.0000033 0.0000085 0.000029 0.000042 2012 9 8 56178 0.175877 0.362235 0.3954737 0.0001969 -0.000136 -0.000033 0.000022 0.000024 0.0000111 0.0000071 0.000027 0.000040 2012 9 9 56179 0.175770 0.360924 0.3953274 0.0002235 -0.000150 -0.000016 0.000020 0.000022 0.0000063 0.0000065 0.000024 0.000036 2012 9 10 56180 0.175594 0.359634 0.3950609 0.0003344 -0.000162 0.000006 0.000019 0.000024 0.0000054 0.0000067 0.000021 0.000031 2012 9 11 56181 0.175696 0.358288 0.3946589 0.0004786 -0.000174 0.000033 0.000019 0.000024 0.0000015 0.0000070 0.000018 0.000026 2012 9 12 56182 0.176007 0.357211 0.3940966 0.0006534 -0.000177 0.000074 0.000017 0.000025 0.0000098 0.0000072 0.000021 0.000031 2012 9 13 56183 0.176196 0.356139 0.3933510 0.0008391 -0.000176 0.000117 0.000017 0.000025 0.0000047 0.0000069 0.000025 0.000036 2012 9 14 56184 0.176741 0.355007 0.3923733 0.0010866 -0.000168 0.000155 0.000017 0.000023 0.0000017 0.0000065 0.000029 0.000041 2012 9 15 56185 0.177425 0.353913 0.3911818 0.0013191 -0.000191 0.000147 0.000017 0.000023 0.0000124 0.0000193 0.000031 0.000042 2012 9 16 56186 0.177784 0.352812 0.3897334 0.0014194 -0.000218 0.000119 0.000017 0.000023 0.0000065 0.0000233 0.000031 0.000043 2012 9 17 56187 0.177802 0.351932 0.3883459 0.0014015 -0.000241 0.000068 0.000017 0.000023 0.0000066 0.0000234 0.000031 0.000042 2012 9 18 56188 0.177737 0.350812 0.3869787 0.0012928 -0.000246 0.000034 0.000017 0.000023 0.0000022 0.0000335 0.000027 0.000036 2012 9 19 56189 0.177452 0.349704 0.3857794 0.0011324 -0.000193 0.000041 0.000017 0.000026 0.0000089 0.0000326 0.000027 0.000040 2012 9 20 56190 0.177149 0.348196 0.3847136 0.0009374 -0.000120 0.000064 0.000017 0.000026 0.0000054 0.0000272 0.000029 0.000044 2012 9 21 56191 0.176564 0.346359 0.3838781 0.0007399 -0.000049 0.000094 0.000017 0.000026 0.0000020 0.0000059 0.000032 0.000049 2012 9 22 56192 0.176120 0.344589 0.3832650 0.0006562 -0.000048 0.000110 0.000017 0.000026 0.0000213 0.0000694 0.000030 0.000046 2012 9 23 56193 0.175882 0.343246 0.3825801 0.0006935 -0.000078 0.000122 0.000015 0.000026 0.0000082 0.0000825 0.000025 0.000040 2012 9 24 56194 0.175608 0.342116 0.3818287 0.0007769 -0.000112 0.000136 0.000016 0.000032 0.0000050 0.0000066 0.000022 0.000035 2012 9 25 56195 0.174962 0.341530 0.3810195 0.0009283 -0.000151 0.000149 0.000018 0.000032 0.0000013 0.0000072 0.000018 0.000029 2012 9 26 56196 0.173929 0.341108 0.3799844 0.0011293 -0.000145 0.000177 0.000018 0.000029 0.0000145 0.0000070 0.000018 0.000031 2012 9 27 56197 0.173095 0.340541 0.3787985 0.0012887 -0.000128 0.000206 0.000018 0.000029 0.0000066 0.0000064 0.000021 0.000034 2012 9 28 56198 0.172110 0.339831 0.3774630 0.0013459 -0.000112 0.000229 0.000018 0.000027 0.0000018 0.0000057 0.000024 0.000037 2012 9 29 56199 0.170690 0.338621 0.3761286 0.0013303 -0.000110 0.000207 0.000018 0.000029 0.0000067 0.0000061 0.000025 0.000041 2012 9 30 56200 0.169484 0.336658 0.3748316 0.0012338 -0.000112 0.000169 0.000018 0.000029 0.0000106 0.0000061 0.000026 0.000045 2012 10 1 56201 0.168893 0.334488 0.3736748 0.0010666 -0.000113 0.000127 0.000020 0.000029 0.0000062 0.0000061 0.000028 0.000049 2012 10 2 56202 0.168556 0.332869 0.3726886 0.0008843 -0.000118 0.000091 0.000017 0.000027 0.0000021 0.0000064 0.000029 0.000054 2012 10 3 56203 0.168261 0.331527 0.3719108 0.0007204 -0.000140 0.000111 0.000019 0.000027 0.0000085 0.0000059 0.000029 0.000050 2012 10 4 56204 0.168218 0.330668 0.3712561 0.0006217 -0.000165 0.000148 0.000019 0.000027 0.0000187 0.0000056 0.000027 0.000044 2012 10 5 56205 0.167775 0.329688 0.3706736 0.0005530 -0.000188 0.000189 0.000019 0.000027 0.0000043 0.0000053 0.000025 0.000038 2012 10 6 56206 0.166829 0.328457 0.3701593 0.0005139 -0.000180 0.000203 0.000019 0.000027 0.0000253 0.0000053 0.000028 0.000043 2012 10 7 56207 0.165776 0.327262 0.3696645 0.0005181 -0.000157 0.000207 0.000019 0.000027 0.0000081 0.0000059 0.000034 0.000053 2012 10 8 56208 0.164811 0.326195 0.3691114 0.0006293 -0.000128 0.000192 0.000019 0.000033 0.0000027 0.0000060 0.000038 0.000064 2012 10 9 56209 0.163850 0.325275 0.3684334 0.0007981 -0.000105 0.000184 0.000016 0.000030 0.0000205 0.0000053 0.000045 0.000075 2012 10 10 56210 0.162665 0.324057 0.3675127 0.0009569 -0.000086 0.000176 0.000015 0.000030 0.0000296 0.0000053 0.000051 0.000085 2012 10 11 56211 0.161680 0.322876 0.3664814 0.0011412 -0.000070 0.000166 0.000017 0.000030 0.0000053 0.0000059 0.000056 0.000095 2012 10 12 56212 0.160551 0.322152 0.3652754 0.0013041 -0.000107 0.000125 0.000019 0.000030 0.0000001 0.0000059 0.000023 0.000038 2012 10 13 56213 0.159093 0.321446 0.3638545 0.0014383 -0.000146 0.000121 0.000017 0.000030 0.0000110 0.0000056 0.000010 0.000017 2012 10 14 56214 0.157601 0.320568 0.3623838 0.0015090 -0.000178 0.000136 0.000017 0.000030 0.0000069 0.0000060 0.000010 0.000016 2012 10 15 56215 0.156054 0.319968 0.3608963 0.0014698 -0.000204 0.000141 0.000022 0.000032 0.0000087 0.0000066 0.000009 0.000015 2012 10 16 56216 0.154180 0.319360 0.3594887 0.0013351 -0.000221 0.000160 0.000020 0.000032 0.0000017 0.0000063 0.000008 0.000014 2012 10 17 56217 0.152154 0.318297 0.3582199 0.0011582 -0.000164 0.000188 0.000018 0.000032 0.0000113 0.0000060 0.000008 0.000014 2012 10 18 56218 0.150678 0.317253 0.3571501 0.0009695 -0.000085 0.000219 0.000016 0.000030 0.0000201 0.0000058 0.000008 0.000013 2012 10 19 56219 0.149569 0.316662 0.3562671 0.0008218 -0.000007 0.000251 0.000018 0.000033 0.0000044 0.0000061 0.000008 0.000013 2012 10 20 56220 0.148043 0.316131 0.3554928 0.0007675 0.000026 0.000253 0.000020 0.000033 0.0000085 0.0000061 0.000013 0.000024 2012 10 21 56221 0.146608 0.315322 0.3547440 0.0007928 0.000035 0.000246 0.000020 0.000033 0.0000061 0.0000067 0.000021 0.000039 2012 10 22 56222 0.145543 0.314380 0.3538588 0.0008641 0.000032 0.000236 0.000021 0.000033 0.0000060 0.0000069 0.000029 0.000055 2012 10 23 56223 0.145007 0.313268 0.3530058 0.0009556 0.000020 0.000224 0.000021 0.000030 0.0000018 0.0000059 0.000037 0.000071 2012 10 24 56224 0.145213 0.312435 0.3519872 0.0010597 -0.000030 0.000219 0.000022 0.000029 0.0000066 0.0000057 0.000043 0.000080 2012 10 25 56225 0.145615 0.311852 0.3509033 0.0011278 -0.000092 0.000220 0.000020 0.000030 0.0000041 0.0000054 0.000049 0.000087 2012 10 26 56226 0.145955 0.311525 0.3497695 0.0011597 -0.000150 0.000221 0.000017 0.000030 0.0000016 0.0000051 0.000054 0.000095 2012 10 27 56227 0.146089 0.311350 0.3485935 0.0011237 -0.000144 0.000245 0.000017 0.000027 0.0000118 0.0000051 0.000052 0.000092 2012 10 28 56228 0.145902 0.311464 0.3474828 0.0010661 -0.000109 0.000273 0.000017 0.000027 0.0000142 0.0000051 0.000046 0.000084 2012 10 29 56229 0.144985 0.311623 0.3464489 0.0009639 -0.000067 0.000294 0.000018 0.000028 0.0000077 0.0000058 0.000040 0.000075 2012 10 30 56230 0.144143 0.311322 0.3455521 0.0008863 -0.000020 0.000307 0.000018 0.000028 0.0000012 0.0000058 0.000034 0.000068 2012 10 31 56231 0.143952 0.311344 0.3446854 0.0008094 -0.000003 0.000307 0.000018 0.000027 0.0000110 0.0000060 0.000029 0.000057 2012 11 1 56232 0.143335 0.311322 0.3439558 0.0007282 0.000011 0.000307 0.000018 0.000027 0.0000078 0.0000060 0.000025 0.000045 2012 11 2 56233 0.142496 0.311202 0.3432281 0.0007022 0.000026 0.000308 0.000018 0.000027 0.0000018 0.0000056 0.000020 0.000033 2012 11 3 56234 0.141501 0.311090 0.3425405 0.0007021 0.000075 0.000329 0.000018 0.000027 0.0000043 0.0000056 0.000031 0.000053 2012 11 4 56235 0.140655 0.310338 0.3417878 0.0008071 0.000132 0.000359 0.000018 0.000024 0.0000070 0.0000056 0.000047 0.000086 2012 11 5 56236 0.139661 0.309499 0.3409540 0.0008889 0.000173 0.000366 0.000018 0.000023 0.0000056 0.0000058 0.000063 0.000121 2012 11 6 56237 0.138701 0.308399 0.3400027 0.0010174 0.000208 0.000380 0.000018 0.000026 0.0000016 0.0000058 0.000079 0.000154 2012 11 7 56238 0.138146 0.307641 0.3389408 0.0011536 0.000179 0.000341 0.000017 0.000026 0.0000081 0.0000061 0.000066 0.000128 2012 11 8 56239 0.137681 0.306960 0.3377096 0.0012756 0.000113 0.000267 0.000017 0.000026 0.0000151 0.0000061 0.000046 0.000087 2012 11 9 56240 0.137470 0.306697 0.3363673 0.0013616 0.000042 0.000190 0.000019 0.000026 0.0000035 0.0000065 0.000025 0.000047 2012 11 10 56241 0.136415 0.306862 0.3349822 0.0014158 0.000013 0.000190 0.000019 0.000026 0.0000117 0.0000065 0.000021 0.000038 2012 11 11 56242 0.135140 0.306608 0.3335328 0.0014946 0.000001 0.000216 0.000017 0.000026 0.0000114 0.0000057 0.000023 0.000042 2012 11 12 56243 0.134281 0.306265 0.3320174 0.0015146 -0.000006 0.000233 0.000018 0.000027 0.0000078 0.0000060 0.000026 0.000045 2012 11 13 56244 0.133366 0.305787 0.3305276 0.0014486 -0.000004 0.000257 0.000018 0.000027 0.0000017 0.0000060 0.000028 0.000049 2012 11 14 56245 0.132333 0.305606 0.3291377 0.0013427 0.000034 0.000230 0.000017 0.000026 0.0000061 0.0000060 0.000031 0.000054 2012 11 15 56246 0.131284 0.305387 0.3278387 0.0012898 0.000085 0.000191 0.000017 0.000026 0.0000094 0.0000060 0.000035 0.000060 2012 11 16 56247 0.130376 0.305026 0.3265250 0.0012852 0.000137 0.000156 0.000017 0.000026 0.0000022 0.0000060 0.000039 0.000066 2012 11 17 56248 0.129972 0.304514 0.3252155 0.0013455 0.000130 0.000153 0.000017 0.000026 0.0000050 0.0000060 0.000035 0.000059 2012 11 18 56249 0.129616 0.304629 0.3237804 0.0015122 0.000098 0.000164 0.000017 0.000026 0.0000057 0.0000060 0.000028 0.000048 2012 11 19 56250 0.128850 0.304488 0.3221868 0.0016714 0.000064 0.000177 0.000020 0.000036 0.0000111 0.0000063 0.000022 0.000037 2012 11 20 56251 0.127719 0.304116 0.3204734 0.0017408 0.000031 0.000198 0.000020 0.000036 0.0000033 0.0000063 0.000016 0.000025 2012 11 21 56252 0.126270 0.303725 0.3187318 0.0017465 0.000117 0.000183 0.000017 0.000030 0.0000002 0.0000058 0.000025 0.000045 2012 11 22 56253 0.124830 0.303039 0.3170010 0.0017007 0.000157 0.000215 0.000017 0.000030 0.0000085 0.0000058 0.000026 0.000048 2012 11 23 56254 0.123682 0.302270 0.3153139 0.0016361 0.000166 0.000263 0.000017 0.000030 0.0000077 0.0000058 0.000023 0.000041 2012 11 24 56255 0.122815 0.301758 0.3137377 0.0015098 0.000168 0.000299 0.000017 0.000030 0.0000068 0.0000061 0.000020 0.000035 2012 11 25 56256 0.121446 0.301305 0.3123183 0.0013572 0.000163 0.000323 0.000017 0.000030 0.0000058 0.0000061 0.000017 0.000028 2012 11 26 56257 0.120330 0.300698 0.3110089 0.0012209 0.000138 0.000319 0.000018 0.000035 0.0000068 0.0000059 0.000014 0.000022 2012 11 27 56258 0.120111 0.300372 0.3098756 0.0010843 0.000131 0.000330 0.000018 0.000035 0.0000017 0.0000059 0.000010 0.000016 2012 11 28 56259 0.119773 0.300632 0.3088455 0.0009915 0.000130 0.000313 0.000017 0.000036 0.0000170 0.0000060 0.000010 0.000014 2012 11 29 56260 0.119249 0.300583 0.3079206 0.0009233 0.000132 0.000285 0.000017 0.000036 0.0000051 0.0000060 0.000009 0.000013 2012 11 30 56261 0.118883 0.300539 0.3070117 0.0008703 0.000135 0.000252 0.000017 0.000036 0.0000011 0.0000060 0.000009 0.000013 2012 12 1 56262 0.118435 0.300220 0.3061411 0.0009115 0.000149 0.000219 0.000017 0.000036 0.0000048 0.0000060 0.000012 0.000018 2012 12 2 56263 0.117747 0.299784 0.3051720 0.0010053 0.000166 0.000188 0.000017 0.000032 0.0000059 0.0000060 0.000017 0.000025 2012 12 3 56264 0.116649 0.299475 0.3041420 0.0010707 0.000179 0.000159 0.000019 0.000031 0.0000051 0.0000062 0.000022 0.000031 2012 12 4 56265 0.115800 0.299221 0.3030426 0.0011420 0.000189 0.000137 0.000019 0.000035 0.0000013 0.0000062 0.000027 0.000038 2012 12 5 56266 0.115161 0.299515 0.3018303 0.0012547 0.000172 0.000142 0.000018 0.000034 0.0000154 0.0000060 0.000024 0.000039 2012 12 6 56267 0.114070 0.299438 0.3005523 0.0013252 0.000143 0.000154 0.000018 0.000034 0.0000087 0.0000060 0.000020 0.000039 2012 12 7 56268 0.112562 0.299270 0.2991894 0.0013649 0.000111 0.000168 0.000020 0.000034 0.0000020 0.0000064 0.000017 0.000038 2012 12 8 56269 0.110757 0.299082 0.2977818 0.0013447 0.000094 0.000184 0.000020 0.000034 0.0000138 0.0000064 0.000015 0.000034 2012 12 9 56270 0.109587 0.298335 0.2964589 0.0013415 0.000082 0.000195 0.000018 0.000034 0.0000101 0.0000056 0.000013 0.000028 2012 12 10 56271 0.108678 0.297733 0.2951313 0.0013011 0.000070 0.000200 0.000018 0.000034 0.0000070 0.0000055 0.000012 0.000022 2012 12 11 56272 0.107369 0.297098 0.2938971 0.0011538 0.000060 0.000199 0.000018 0.000034 0.0000013 0.0000059 0.000010 0.000016 2012 12 12 56273 0.106168 0.296689 0.2928453 0.0010051 0.000076 0.000244 0.000018 0.000031 0.0000203 0.0000059 0.000012 0.000024 2012 12 13 56274 0.104749 0.296358 0.2919197 0.0009091 0.000103 0.000299 0.000018 0.000031 0.0000348 0.0000062 0.000016 0.000035 2012 12 14 56275 0.103055 0.295597 0.2909741 0.0009133 0.000136 0.000349 0.000020 0.000033 0.0000075 0.0000069 0.000020 0.000045 2012 12 15 56276 0.101061 0.294850 0.2899782 0.0009629 0.000165 0.000367 0.000020 0.000033 0.0000119 0.0000066 0.000023 0.000054 2012 12 16 56277 0.098998 0.293924 0.2890035 0.0010471 0.000142 0.000299 0.000020 0.000033 0.0000090 0.0000062 0.000023 0.000048 2012 12 17 56278 0.096862 0.293381 0.2879406 0.0010959 0.000142 0.000244 0.000021 0.000035 0.0000086 0.0000073 0.000023 0.000046 2012 12 18 56279 0.094647 0.292659 0.2868441 0.0011422 0.000143 0.000193 0.000023 0.000035 0.0000050 0.0000076 0.000024 0.000044 2012 12 19 56280 0.093111 0.291768 0.2857065 0.0011148 0.000145 0.000134 0.000019 0.000032 0.0000014 0.0000062 0.000025 0.000045 2012 12 20 56281 0.091472 0.291349 0.2846565 0.0009436 0.000172 0.000145 0.000019 0.000032 0.0000084 0.0000059 0.000027 0.000046 2012 12 21 56282 0.090028 0.291117 0.2837893 0.0007936 0.000205 0.000170 0.000022 0.000032 0.0000020 0.0000062 0.000034 0.000059 2012 12 22 56283 0.088588 0.291159 0.2830603 0.0007287 0.000222 0.000170 0.000019 0.000032 0.0000111 0.0000062 0.000039 0.000072 2012 12 23 56284 0.087501 0.290712 0.2823224 0.0006926 0.000234 0.000163 0.000019 0.000032 0.0000088 0.0000062 0.000044 0.000084 2012 12 24 56285 0.086882 0.290363 0.2816902 0.0006156 0.000225 0.000157 0.000021 0.000030 0.0000068 0.0000064 0.000050 0.000098 2012 12 25 56286 0.086339 0.290236 0.2811304 0.0005151 0.000234 0.000161 0.000018 0.000030 0.0000050 0.0000060 0.000054 0.000111 2012 12 26 56287 0.085694 0.290416 0.2806345 0.0004547 0.000245 0.000166 0.000018 0.000029 0.0000032 0.0000059 0.000058 0.000124 2012 12 27 56288 0.084727 0.290487 0.2801731 0.0004607 0.000254 0.000175 0.000020 0.000032 0.0000015 0.0000063 0.000062 0.000136 2012 12 28 56289 0.082947 0.290475 0.2797111 0.0004567 0.000220 0.000199 0.000020 0.000032 0.0000003 0.0000063 0.000021 0.000044 2012 12 29 56290 0.080756 0.290205 0.2792361 0.0005094 0.000233 0.000215 0.000018 0.000029 0.0000070 0.0000059 0.000010 0.000016 2012 12 30 56291 0.079007 0.289959 0.2786180 0.0006577 0.000265 0.000224 0.000018 0.000029 0.0000093 0.0000059 0.000015 0.000023 2012 12 31 56292 0.077238 0.289933 0.2778751 0.0007788 0.000286 0.000226 0.000018 0.000028 0.0000082 0.0000061 0.000019 0.000029 2013 1 1 56293 0.075310 0.289856 0.2770907 0.0008953 0.000305 0.000222 0.000018 0.000028 0.0000053 0.0000061 0.000024 0.000036 2013 1 2 56294 0.073304 0.289898 0.2761366 0.0010388 0.000311 0.000209 0.000017 0.000027 0.0000030 0.0000058 0.000029 0.000042 2013 1 3 56295 0.071432 0.289699 0.2750374 0.0011460 0.000319 0.000191 0.000019 0.000027 0.0000008 0.0000058 0.000033 0.000048 2013 1 4 56296 0.070098 0.289581 0.2738579 0.0012008 0.000213 0.000153 0.000017 0.000027 0.0000002 0.0000058 0.000016 0.000026 2013 1 5 56297 0.069042 0.289567 0.2726572 0.0012058 0.000165 0.000115 0.000015 0.000027 0.0000120 0.0000058 0.000014 0.000027 2013 1 6 56298 0.068196 0.289667 0.2714547 0.0011330 0.000149 0.000080 0.000015 0.000027 0.0000105 0.0000058 0.000020 0.000038 2013 1 7 56299 0.067202 0.290066 0.2703787 0.0009866 0.000134 0.000048 0.000018 0.000029 0.0000061 0.0000060 0.000026 0.000050 2013 1 8 56300 0.066292 0.290535 0.2694610 0.0008848 0.000121 0.000019 0.000020 0.000029 0.0000013 0.0000060 0.000032 0.000061 2013 1 9 56301 0.065345 0.291314 0.2686011 0.0008299 0.000155 0.000022 0.000018 0.000028 0.0000093 0.0000058 0.000043 0.000074 2013 1 10 56302 0.064410 0.292185 0.2677166 0.0008850 0.000206 0.000037 0.000016 0.000028 0.0000055 0.0000058 0.000056 0.000090 2013 1 11 56303 0.063228 0.293001 0.2667804 0.0010202 0.000259 0.000058 0.000018 0.000028 0.0000017 0.0000058 0.000070 0.000106 2013 1 12 56304 0.062007 0.293634 0.2657273 0.0011708 0.000285 0.000069 0.000020 0.000028 0.0000073 0.0000058 0.000067 0.000102 2013 1 13 56305 0.060558 0.294295 0.2644642 0.0013139 0.000296 0.000074 0.000020 0.000031 0.0000051 0.0000065 0.000058 0.000091 2013 1 14 56306 0.059312 0.295115 0.2630661 0.0014745 0.000297 0.000110 0.000018 0.000034 0.0000061 0.0000069 0.000051 0.000085 2013 1 15 56307 0.058302 0.295904 0.2615439 0.0015341 0.000287 0.000095 0.000016 0.000031 0.0000067 0.0000061 0.000042 0.000073 2013 1 16 56308 0.057049 0.296543 0.2600685 0.0014583 0.000263 0.000077 0.000016 0.000033 0.0000014 0.0000058 0.000022 0.000060 2013 1 17 56309 0.055439 0.297309 0.2586723 0.0013456 0.000229 0.000066 0.000016 0.000068 0.0000098 0.0000058 0.000023 0.000060 2013 1 18 56310 0.053948 0.298279 0.2573663 0.0012650 0.000190 0.000056 0.000016 0.000068 0.0000024 0.0000058 0.000027 0.000063 2013 1 19 56311 0.052961 0.299392 0.2561193 0.0011997 0.000194 0.000064 0.000018 0.000033 0.0000077 0.0000062 0.000025 0.000059 2013 1 20 56312 0.051723 0.300681 0.2549468 0.0011070 0.000215 0.000076 0.000021 0.000039 0.0000089 0.0000072 0.000021 0.000051 2013 1 21 56313 0.050316 0.301866 0.2538462 0.0010660 0.000234 0.000086 0.000021 0.000039 0.0000078 0.0000072 0.000034 0.000045 2013 1 22 56314 0.049409 0.302778 0.2527747 0.0010632 0.000254 0.000094 0.000017 0.000033 0.0000045 0.0000061 0.000027 0.000037 2013 1 23 56315 0.048658 0.304062 0.2517351 0.0010777 0.000271 0.000100 0.000017 0.000031 0.0000010 0.0000059 0.000020 0.000030 2013 1 24 56316 0.047848 0.305129 0.2506394 0.0011155 0.000190 0.000068 0.000017 0.000031 0.0000130 0.0000059 0.000078 0.000120 2013 1 25 56317 0.047084 0.305881 0.2495234 0.0011164 0.000088 0.000024 0.000019 0.000034 0.0000021 0.0000063 0.000154 0.000236 2013 1 26 56318 0.046371 0.306470 0.2483765 0.0011738 0.000088 0.000013 0.000021 0.000037 0.0000123 0.0000066 0.000148 0.000225 2013 1 27 56319 0.045599 0.306874 0.2471377 0.0013068 0.000131 0.000012 0.000021 0.000034 0.0000038 0.0000066 0.000112 0.000168 2013 1 28 56320 0.044918 0.307151 0.2457751 0.0014177 0.000178 0.000008 0.000020 0.000033 0.0000040 0.0000069 0.000079 0.000115 2013 1 29 56321 0.044014 0.307627 0.2443075 0.0014914 0.000230 0.000004 0.000020 0.000033 0.0000016 0.0000069 0.000042 0.000056 2013 1 30 56322 0.043132 0.308172 0.2427764 0.0015553 0.000260 -0.000025 0.000019 0.000033 0.0000141 0.0000071 0.000043 0.000054 2013 1 31 56323 0.042804 0.309225 0.2412309 0.0015468 0.000282 -0.000061 0.000019 0.000036 0.0000052 0.0000071 0.000054 0.000066 2013 2 1 56324 0.042402 0.310532 0.2397409 0.0014332 0.000298 -0.000099 0.000019 0.000033 0.0000015 0.0000071 0.000064 0.000079 2013 2 2 56325 0.042573 0.311892 0.2383674 0.0012980 0.000286 -0.000135 0.000017 0.000030 0.0000095 0.0000067 0.000060 0.000074 2013 2 3 56326 0.042527 0.313519 0.2371341 0.0011515 0.000261 -0.000167 0.000015 0.000030 0.0000039 0.0000060 0.000051 0.000064 2013 2 4 56327 0.041943 0.314696 0.2360251 0.0010576 0.000228 -0.000193 0.000017 0.000031 0.0000039 0.0000066 0.000043 0.000054 2013 2 5 56328 0.041026 0.315632 0.2350277 0.0009339 0.000195 -0.000211 0.000019 0.000031 0.0000015 0.0000070 0.000033 0.000043 2013 2 6 56329 0.039925 0.316871 0.2341112 0.0009146 0.000182 -0.000204 0.000017 0.000029 0.0000103 0.0000068 0.000040 0.000050 2013 2 7 56330 0.038904 0.318468 0.2331814 0.0009866 0.000177 -0.000184 0.000017 0.000029 0.0000027 0.0000068 0.000051 0.000061 2013 2 8 56331 0.037461 0.319742 0.2321391 0.0011251 0.000177 -0.000157 0.000017 0.000032 0.0000015 0.0000068 0.000062 0.000073 2013 2 9 56332 0.036213 0.320493 0.2309424 0.0012819 0.000175 -0.000138 0.000017 0.000035 0.0000131 0.0000069 0.000064 0.000075 2013 2 10 56333 0.035528 0.321217 0.2296106 0.0013781 0.000173 -0.000119 0.000018 0.000034 0.0000037 0.0000074 0.000062 0.000075 2013 2 11 56334 0.035202 0.322110 0.2281932 0.0014360 0.000177 -0.000098 0.000022 0.000033 0.0000058 0.0000071 0.000061 0.000074 2013 2 12 56335 0.034936 0.323155 0.2267687 0.0013864 0.000187 -0.000076 0.000022 0.000030 0.0000059 0.0000067 0.000059 0.000073 2013 2 13 56336 0.034437 0.324038 0.2254403 0.0012154 0.000197 -0.000057 0.000021 0.000035 0.0000012 0.0000066 0.000058 0.000072 2013 2 14 56337 0.033839 0.324559 0.2242863 0.0010507 0.000219 -0.000002 0.000021 0.000038 0.0000162 0.0000070 0.000049 0.000063 2013 2 15 56338 0.033897 0.325100 0.2232824 0.0009415 0.000245 0.000057 0.000019 0.000035 0.0000011 0.0000066 0.000037 0.000052 2013 2 16 56339 0.033941 0.325933 0.2223836 0.0008336 0.000265 0.000057 0.000017 0.000032 0.0000189 0.0000062 0.000038 0.000053 2013 2 17 56340 0.033665 0.326909 0.2215868 0.0007367 0.000282 0.000029 0.000019 0.000032 0.0000032 0.0000066 0.000042 0.000059 2013 2 18 56341 0.033343 0.327848 0.2208980 0.0006401 0.000293 -0.000004 0.000019 0.000031 0.0000036 0.0000073 0.000049 0.000064 2013 2 19 56342 0.033016 0.329142 0.2202777 0.0005919 0.000305 -0.000047 0.000019 0.000031 0.0000017 0.0000073 0.000053 0.000070 2013 2 20 56343 0.032971 0.330293 0.2196491 0.0006588 0.000325 -0.000058 0.000020 0.000030 0.0000208 0.0000068 0.000056 0.000068 2013 2 21 56344 0.032764 0.331394 0.2189361 0.0007661 0.000343 -0.000062 0.000020 0.000033 0.0000063 0.0000068 0.000059 0.000066 2013 2 22 56345 0.032560 0.332411 0.2180799 0.0009389 0.000356 -0.000067 0.000022 0.000035 0.0000013 0.0000076 0.000062 0.000065 2013 2 23 56346 0.032021 0.333397 0.2170537 0.0011245 0.000351 -0.000100 0.000022 0.000035 0.0000360 0.0000080 0.000061 0.000063 2013 2 24 56347 0.031547 0.334330 0.2158533 0.0012915 0.000334 -0.000139 0.000022 0.000033 0.0000035 0.0000076 0.000060 0.000061 2013 2 25 56348 0.030709 0.334905 0.2144766 0.0014607 0.000295 -0.000159 0.000023 0.000032 0.0000033 0.0000073 0.000057 0.000059 2013 2 26 56349 0.029709 0.335104 0.2129240 0.0016352 0.000270 -0.000190 0.000023 0.000032 0.0000013 0.0000073 0.000056 0.000057 2013 2 27 56350 0.029307 0.335794 0.2112407 0.0017303 0.000283 -0.000207 0.000028 0.000037 0.0000210 0.0000076 0.000064 0.000063 2013 2 28 56351 0.029597 0.336794 0.2094895 0.0017399 0.000305 -0.000217 0.000028 0.000037 0.0000062 0.0000076 0.000074 0.000071 2013 3 1 56352 0.030243 0.338132 0.2077371 0.0017242 0.000325 -0.000220 0.000028 0.000041 0.0000015 0.0000076 0.000084 0.000080 2013 3 2 56353 0.030488 0.339745 0.2060790 0.0015855 0.000322 -0.000235 0.000026 0.000041 0.0000141 0.0000072 0.000100 0.000105 2013 3 3 56354 0.030848 0.341230 0.2045416 0.0014922 0.000305 -0.000248 0.000026 0.000041 0.0000035 0.0000080 0.000118 0.000136 2013 3 4 56355 0.031163 0.342793 0.2030631 0.0014730 0.000280 -0.000253 0.000023 0.000039 0.0000035 0.0000086 0.000138 0.000171 2013 3 5 56356 0.031611 0.343977 0.2015976 0.0014735 0.000249 -0.000247 0.000023 0.000036 0.0000022 0.0000082 0.000156 0.000203 2013 3 6 56357 0.032058 0.344980 0.2001138 0.0015136 0.000208 -0.000183 0.000021 0.000036 0.0000104 0.0000083 0.000134 0.000179 2013 3 7 56358 0.032962 0.345676 0.1985635 0.0016159 0.000164 -0.000104 0.000021 0.000040 0.0000040 0.0000087 0.000103 0.000142 2013 3 8 56359 0.034232 0.346404 0.1969090 0.0017065 0.000121 -0.000025 0.000021 0.000036 0.0000016 0.0000087 0.000072 0.000106 2013 3 9 56360 0.035551 0.347362 0.1951480 0.0018239 0.000115 0.000018 0.000019 0.000033 0.0000151 0.0000083 0.000065 0.000095 2013 3 10 56361 0.036634 0.348518 0.1932916 0.0019075 0.000127 0.000042 0.000019 0.000036 0.0000029 0.0000083 0.000067 0.000094 2013 3 11 56362 0.037679 0.349957 0.1913827 0.0019055 0.000170 0.000068 0.000020 0.000037 0.0000062 0.0000084 0.000069 0.000094 2013 3 12 56363 0.038791 0.351869 0.1894875 0.0018686 0.000194 0.000074 0.000018 0.000033 0.0000067 0.0000077 0.000071 0.000092 2013 3 13 56364 0.039884 0.354087 0.1876517 0.0017802 0.000210 0.000075 0.000018 0.000034 0.0000012 0.0000075 0.000074 0.000092 2013 3 14 56365 0.040481 0.355956 0.1859185 0.0016696 0.000240 0.000018 0.000018 0.000034 0.0000145 0.0000075 0.000066 0.000081 2013 3 15 56366 0.040942 0.357387 0.1843097 0.0015444 0.000265 -0.000054 0.000016 0.000034 0.0000013 0.0000075 0.000056 0.000068 2013 3 16 56367 0.040901 0.358605 0.1828274 0.0014094 0.000286 -0.000105 0.000018 0.000034 0.0000139 0.0000079 0.000059 0.000072 2013 3 17 56368 0.041061 0.359554 0.1814609 0.0013064 0.000298 -0.000144 0.000020 0.000037 0.0000031 0.0000082 0.000067 0.000083 2013 3 18 56369 0.041602 0.360244 0.1801933 0.0012257 0.000292 -0.000172 0.000022 0.000046 0.0000032 0.0000084 0.000075 0.000095 2013 3 19 56370 0.042509 0.360690 0.1790038 0.0011488 0.000286 -0.000190 0.000022 0.000046 0.0000016 0.0000085 0.000083 0.000106 2013 3 20 56371 0.043558 0.361269 0.1778524 0.0011518 0.000259 -0.000174 0.000021 0.000042 0.0000182 0.0000087 0.000074 0.000093 2013 3 21 56372 0.044679 0.362180 0.1766940 0.0011941 0.000224 -0.000143 0.000021 0.000042 0.0000076 0.0000087 0.000062 0.000077 2013 3 22 56373 0.045142 0.363185 0.1754806 0.0012650 0.000190 -0.000108 0.000021 0.000042 0.0000011 0.0000084 0.000050 0.000061 2013 3 23 56374 0.045731 0.364433 0.1741466 0.0014234 0.000183 -0.000078 0.000021 0.000039 0.0000124 0.0000084 0.000044 0.000055 2013 3 24 56375 0.046501 0.365546 0.1726579 0.0015763 0.000190 -0.000055 0.000021 0.000039 0.0000033 0.0000084 0.000041 0.000053 2013 3 25 56376 0.047553 0.366900 0.1710171 0.0017087 0.000199 -0.000040 0.000024 0.000040 0.0000034 0.0000082 0.000032 0.000047 2013 3 26 56377 0.048035 0.368190 0.1692350 0.0018537 0.000216 -0.000038 0.000024 0.000036 0.0000012 0.0000082 0.000030 0.000045 2013 3 27 56378 0.048658 0.369461 0.1673193 0.0019571 0.000193 -0.000101 0.000024 0.000032 0.0000003 0.0000081 0.000035 0.000051 2013 3 28 56379 0.049532 0.370878 0.1653462 0.0019493 0.000200 -0.000151 0.000021 0.000032 0.0000132 0.0000081 0.000035 0.000052 2013 3 29 56380 0.050475 0.372076 0.1634083 0.0018880 0.000223 -0.000192 0.000021 0.000032 0.0000098 0.0000081 0.000034 0.000049 2013 3 30 56381 0.051030 0.373287 0.1615621 0.0017866 0.000244 -0.000229 0.000021 0.000032 0.0000066 0.0000081 0.000032 0.000047 2013 3 31 56382 0.051422 0.374395 0.1598229 0.0016822 0.000261 -0.000258 0.000021 0.000032 0.0000034 0.0000081 0.000031 0.000045 2013 4 1 56383 0.051214 0.375299 0.1581763 0.0016152 0.000265 -0.000273 0.000023 0.000033 0.0000032 0.0000089 0.000029 0.000044 2013 4 2 56384 0.050902 0.376037 0.1565882 0.0015642 0.000270 -0.000279 0.000023 0.000033 0.0000026 0.0000089 0.000028 0.000042 2013 4 3 56385 0.051000 0.376745 0.1550193 0.0015665 0.000269 -0.000274 0.000020 0.000029 0.0000009 0.0000079 0.000027 0.000039 2013 4 4 56386 0.051505 0.377383 0.1534214 0.0016313 0.000196 -0.000196 0.000020 0.000029 0.0000126 0.0000083 0.000029 0.000039 2013 4 5 56387 0.052276 0.378082 0.1517328 0.0017658 0.000107 -0.000098 0.000020 0.000029 0.0000010 0.0000083 0.000033 0.000039 2013 4 6 56388 0.052845 0.378754 0.1499249 0.0018676 0.000119 -0.000077 0.000018 0.000029 0.0000128 0.0000079 0.000030 0.000034 2013 4 7 56389 0.053129 0.379352 0.1480361 0.0019019 0.000172 -0.000088 0.000018 0.000029 0.0000034 0.0000080 0.000023 0.000027 2013 4 8 56390 0.053558 0.380052 0.1461365 0.0018727 0.000211 -0.000095 0.000023 0.000031 0.0000034 0.0000084 0.000017 0.000021 2013 4 9 56391 0.054118 0.381208 0.1442935 0.0018016 0.000268 -0.000118 0.000026 0.000031 0.0000010 0.0000088 0.000010 0.000014 2013 4 10 56392 0.054958 0.382367 0.1425544 0.0016754 0.000296 -0.000136 0.000023 0.000035 0.0000162 0.0000093 0.000017 0.000026 2013 4 11 56393 0.055463 0.383473 0.1409548 0.0015061 0.000316 -0.000154 0.000023 0.000035 0.0000078 0.0000087 0.000027 0.000043 2013 4 12 56394 0.055503 0.384248 0.1395110 0.0013579 0.000331 -0.000175 0.000023 0.000032 0.0000012 0.0000079 0.000037 0.000060 2013 4 13 56395 0.055466 0.385068 0.1382134 0.0012326 0.000331 -0.000180 0.000023 0.000031 0.0000235 0.0000081 0.000048 0.000076 2013 4 14 56396 0.055484 0.385646 0.1370305 0.0011411 0.000322 -0.000178 0.000023 0.000031 0.0000040 0.0000085 0.000060 0.000092 2013 4 15 56397 0.055607 0.386035 0.1359184 0.0010907 0.000303 -0.000168 0.000025 0.000034 0.0000037 0.0000092 0.000072 0.000108 2013 4 16 56398 0.055929 0.386392 0.1348169 0.0011174 0.000284 -0.000162 0.000025 0.000034 0.0000026 0.0000087 0.000084 0.000124 2013 4 17 56399 0.056522 0.386975 0.1336791 0.0011618 0.000261 -0.000156 0.000022 0.000034 0.0000017 0.0000082 0.000105 0.000143 2013 4 18 56400 0.057528 0.387547 0.1325125 0.0011964 0.000282 -0.000164 0.000019 0.000034 0.0000119 0.0000082 0.000080 0.000106 2013 4 19 56401 0.058638 0.388699 0.1312775 0.0013092 0.000313 -0.000175 0.000019 0.000034 0.0000011 0.0000078 0.000045 0.000055 2013 4 20 56402 0.059400 0.389916 0.1298980 0.0014732 0.000321 -0.000214 0.000022 0.000034 0.0000146 0.0000078 0.000037 0.000043 2013 4 21 56403 0.060039 0.390944 0.1283636 0.0015956 0.000316 -0.000260 0.000022 0.000034 0.0000033 0.0000078 0.000039 0.000046 2013 4 22 56404 0.061024 0.391927 0.1267085 0.0017050 0.000300 -0.000284 0.000018 0.000033 0.0000031 0.0000082 0.000040 0.000050 2013 4 23 56405 0.062011 0.392789 0.1249559 0.0018000 0.000282 -0.000319 0.000016 0.000031 0.0000010 0.0000086 0.000042 0.000053 2013 4 24 56406 0.062979 0.393349 0.1231388 0.0018280 0.000248 -0.000337 0.000019 0.000029 0.0000225 0.0000081 0.000094 0.000134 2013 4 25 56407 0.063907 0.393885 0.1213194 0.0017907 0.000207 -0.000347 0.000022 0.000029 0.0000051 0.0000077 0.000160 0.000234 2013 4 26 56408 0.064780 0.394217 0.1195726 0.0016971 0.000164 -0.000350 0.000024 0.000029 0.0000029 0.0000081 0.000226 0.000335 2013 4 27 56409 0.065690 0.394751 0.1179550 0.0015370 0.000139 -0.000354 0.000024 0.000029 0.0000110 0.0000089 0.000206 0.000306 2013 4 28 56410 0.066110 0.395232 0.1164902 0.0013879 0.000123 -0.000354 0.000024 0.000029 0.0000036 0.0000089 0.000156 0.000229 2013 4 29 56411 0.066926 0.395496 0.1151226 0.0013580 0.000082 -0.000312 0.000022 0.000033 0.0000031 0.0000086 0.000103 0.000153 2013 4 30 56412 0.067935 0.395987 0.1137639 0.0013742 0.000071 -0.000293 0.000020 0.000033 0.0000012 0.0000081 0.000051 0.000077 2013 5 1 56413 0.069079 0.396187 0.1123734 0.0014241 0.000058 -0.000278 0.000018 0.000031 0.0000133 0.0000077 0.000042 0.000066 2013 5 2 56414 0.070601 0.396865 0.1108968 0.0015399 0.000051 -0.000261 0.000020 0.000031 0.0000025 0.0000081 0.000044 0.000072 2013 5 3 56415 0.072194 0.397607 0.1092979 0.0016617 0.000051 -0.000241 0.000022 0.000031 0.0000013 0.0000081 0.000046 0.000078 2013 5 4 56416 0.073934 0.398142 0.1076280 0.0017014 0.000062 -0.000202 0.000020 0.000031 0.0000133 0.0000077 0.000047 0.000077 2013 5 5 56417 0.075382 0.398690 0.1059460 0.0016757 0.000080 -0.000156 0.000020 0.000031 0.0000024 0.0000077 0.000047 0.000073 2013 5 6 56418 0.076726 0.399162 0.1042827 0.0016511 0.000098 -0.000109 0.000021 0.000033 0.0000053 0.0000084 0.000047 0.000069 2013 5 7 56419 0.077727 0.399520 0.1026651 0.0015729 0.000123 -0.000072 0.000021 0.000033 0.0000059 0.0000084 0.000047 0.000065 2013 5 8 56420 0.078782 0.399676 0.1011258 0.0014570 0.000147 -0.000041 0.000020 0.000032 0.0000013 0.0000077 0.000045 0.000059 2013 5 9 56421 0.080212 0.400159 0.0997499 0.0012809 0.000097 -0.000090 0.000017 0.000032 0.0000136 0.0000073 0.000084 0.000101 2013 5 10 56422 0.081756 0.400479 0.0985505 0.0011247 0.000028 -0.000164 0.000020 0.000032 0.0000021 0.0000077 0.000131 0.000156 2013 5 11 56423 0.084245 0.400858 0.0974696 0.0010228 0.000054 -0.000180 0.000022 0.000032 0.0000131 0.0000081 0.000127 0.000151 2013 5 12 56424 0.086309 0.401440 0.0964810 0.0009413 0.000114 -0.000173 0.000020 0.000032 0.0000031 0.0000077 0.000102 0.000123 2013 5 13 56425 0.088337 0.402161 0.0955606 0.0009037 0.000166 -0.000149 0.000022 0.000032 0.0000034 0.0000079 0.000082 0.000103 2013 5 14 56426 0.089451 0.403203 0.0946677 0.0009035 0.000218 -0.000142 0.000024 0.000032 0.0000015 0.0000078 0.000056 0.000073 2013 5 15 56427 0.090741 0.403960 0.0937434 0.0009546 0.000183 -0.000224 0.000022 0.000033 0.0000164 0.0000073 0.000054 0.000075 2013 5 16 56428 0.091099 0.404564 0.0927334 0.0010329 0.000124 -0.000325 0.000022 0.000033 0.0000061 0.0000077 0.000059 0.000088 2013 5 17 56429 0.091665 0.404720 0.0916057 0.0011913 0.000062 -0.000418 0.000022 0.000033 0.0000013 0.0000077 0.000063 0.000101 2013 5 18 56430 0.092279 0.404886 0.0903432 0.0013154 0.000089 -0.000442 0.000022 0.000033 0.0000170 0.0000077 0.000063 0.000100 2013 5 19 56431 0.093382 0.404814 0.0889580 0.0014222 0.000152 -0.000430 0.000024 0.000033 0.0000031 0.0000077 0.000062 0.000093 2013 5 20 56432 0.094812 0.404856 0.0874807 0.0015032 0.000109 -0.000393 0.000020 0.000030 0.0000031 0.0000070 0.000128 0.000171 2013 5 21 56433 0.096671 0.405103 0.0859534 0.0015170 0.000129 -0.000354 0.000020 0.000030 0.0000026 0.0000070 0.000152 0.000195 2013 5 22 56434 0.098090 0.405783 0.0844501 0.0014488 0.000145 -0.000310 0.000021 0.000027 0.0000040 0.0000072 0.000171 0.000218 2013 5 23 56435 0.099439 0.406575 0.0830146 0.0013755 0.000149 -0.000249 0.000021 0.000027 0.0001122 0.0000072 0.000146 0.000196 2013 5 24 56436 0.100665 0.407104 0.0817241 0.0012537 0.000145 -0.000186 0.000019 0.000027 0.0000018 0.0000069 0.000109 0.000162 2013 5 25 56437 0.101494 0.407171 0.0805331 0.0011307 0.000106 -0.000193 0.000017 0.000027 0.0000250 0.0000069 0.000101 0.000154 2013 5 26 56438 0.102303 0.407199 0.0794448 0.0010336 0.000053 -0.000224 0.000304 0.000234 0.0000054 0.0000236 0.000105 0.000156 2013 5 27 56439 0.102856 0.407246 0.0784812 0.0009137 -0.000009 -0.000245 0.000026 0.000030 0.0000031 0.0000075 0.000114 0.000159 2013 5 28 56440 0.103519 0.407139 0.0775747 0.0009094 -0.000057 -0.000278 0.000026 0.000034 0.0000026 0.0000075 0.000118 0.000161 2013 5 29 56441 0.104126 0.407196 0.0766735 0.0009130 -0.000094 -0.000310 0.000025 0.000032 0.0000019 0.0000073 0.000118 0.000153 2013 5 30 56442 0.104903 0.407053 0.0757525 0.0009351 -0.000087 -0.000262 0.000028 0.000031 0.0000112 0.0000077 0.000107 0.000133 2013 5 31 56443 0.106365 0.406900 0.0748141 0.0009118 -0.000059 -0.000192 0.000028 0.000031 0.0000016 0.0000077 0.000092 0.000107 2013 6 1 56444 0.108299 0.406628 0.0739569 0.0008131 -0.000001 -0.000158 0.000028 0.000031 0.0000081 0.0000077 0.000084 0.000096 2013 6 2 56445 0.110240 0.406481 0.0732060 0.0007016 0.000068 -0.000139 0.000028 0.000031 0.0000030 0.0000077 0.000077 0.000091 2013 6 3 56446 0.111834 0.406343 0.0725254 0.0006471 0.000136 -0.000127 0.000023 0.000030 0.0000029 0.0000074 0.000071 0.000086 2013 6 4 56447 0.113268 0.405956 0.0719147 0.0005507 0.000197 -0.000121 0.000023 0.000030 0.0000013 0.0000074 0.000064 0.000081 2013 6 5 56448 0.114167 0.405386 0.0714299 0.0004190 0.000151 -0.000152 0.000022 0.000028 0.0000174 0.0000072 0.000062 0.000085 2013 6 6 56449 0.114617 0.404595 0.0710683 0.0003198 0.000072 -0.000194 0.000022 0.000028 0.0000059 0.0000072 0.000062 0.000092 2013 6 7 56450 0.115025 0.403767 0.0707839 0.0002307 -0.000011 -0.000236 0.000022 0.000028 0.0000014 0.0000072 0.000062 0.000100 2013 6 8 56451 0.115680 0.402894 0.0706110 0.0001381 -0.000001 -0.000257 0.000022 0.000028 0.0000279 0.0000071 0.000060 0.000096 2013 6 9 56452 0.116312 0.402086 0.0705071 0.0000830 0.000043 -0.000264 0.000307 0.000144 0.0000033 0.0000201 0.000057 0.000089 2013 6 10 56453 0.117352 0.401350 0.0704022 0.0000989 0.000086 -0.000262 0.000032 0.000025 0.0000027 0.0000082 0.000054 0.000081 2013 6 11 56454 0.118269 0.401044 0.0702341 0.0001960 0.000126 -0.000255 0.000032 0.000028 0.0000013 0.0000078 0.000051 0.000074 2013 6 12 56455 0.119218 0.400606 0.0699942 0.0002892 0.000090 -0.000217 0.000034 0.000030 0.0000187 0.0000080 0.000055 0.000075 2013 6 13 56456 0.120723 0.399987 0.0696499 0.0004153 0.000031 -0.000173 0.000034 0.000030 0.0000028 0.0000084 0.000060 0.000079 2013 6 14 56457 0.122404 0.399512 0.0691558 0.0005602 -0.000029 -0.000132 0.000031 0.000030 0.0000016 0.0000080 0.000066 0.000083 2013 6 15 56458 0.123927 0.398878 0.0685337 0.0006864 -0.000064 -0.000161 0.000027 0.000030 0.0000217 0.0000076 0.000076 0.000091 2013 6 16 56459 0.125694 0.398557 0.0678080 0.0007759 -0.000085 -0.000216 0.000027 0.000027 0.0000034 0.0000076 0.000090 0.000101 2013 6 17 56460 0.127398 0.398251 0.0669948 0.0008524 -0.000096 -0.000257 0.000029 0.000024 0.0000034 0.0000082 0.000101 0.000110 2013 6 18 56461 0.129288 0.397823 0.0661280 0.0008752 -0.000105 -0.000310 0.000032 0.000027 0.0000018 0.0000087 0.000114 0.000120 2013 6 19 56462 0.131187 0.397852 0.0652819 0.0008272 -0.000095 -0.000318 0.000032 0.000063 0.0000246 0.0000085 0.000091 0.000097 2013 6 20 56463 0.132607 0.397704 0.0644927 0.0007700 -0.000077 -0.000312 0.000029 0.000063 0.0000027 0.0000081 0.000060 0.000066 2013 6 21 56464 0.134163 0.397002 0.0637729 0.0006587 -0.000058 -0.000298 0.000029 0.000030 0.0000011 0.0000081 0.000029 0.000035 2013 6 22 56465 0.135302 0.396487 0.0631683 0.0005846 -0.000068 -0.000297 0.000032 0.000030 0.0000159 0.0000085 0.000029 0.000034 2013 6 23 56466 0.136143 0.395919 0.0626275 0.0005627 -0.000089 -0.000296 0.000029 0.000030 0.0000026 0.0000085 0.000041 0.000045 2013 6 24 56467 0.136415 0.395594 0.0620426 0.0005992 -0.000103 -0.000278 0.000029 0.000030 0.0000030 0.0000083 0.000052 0.000055 2013 6 25 56468 0.136974 0.394965 0.0613753 0.0007043 -0.000122 -0.000264 0.000029 0.000030 0.0000016 0.0000079 0.000063 0.000065 2013 6 26 56469 0.137552 0.394336 0.0606312 0.0007642 -0.000127 -0.000281 0.000027 0.000030 0.0000155 0.0000078 0.000061 0.000064 2013 6 27 56470 0.138002 0.393733 0.0598411 0.0007937 -0.000127 -0.000300 0.000027 0.000030 0.0000051 0.0000077 0.000054 0.000061 2013 6 28 56471 0.138767 0.392827 0.0590512 0.0007557 -0.000126 -0.000315 0.000027 0.000030 0.0000010 0.0000077 0.000047 0.000058 2013 6 29 56472 0.140194 0.391993 0.0583348 0.0006506 -0.000124 -0.000272 0.000031 0.000030 0.0000299 0.0000082 0.000055 0.000055 2013 6 30 56473 0.141516 0.391422 0.0577584 0.0004939 -0.000119 -0.000206 0.000031 0.000030 0.0000032 0.0000082 0.000070 0.000052 2013 7 1 56474 0.142616 0.390794 0.0573666 0.0002946 -0.000050 -0.000215 0.000026 0.000031 0.0000036 0.0000072 0.000025 0.000031 2013 7 2 56475 0.144079 0.390119 0.0571657 0.0001138 -0.000026 -0.000181 0.000026 0.000030 0.0000026 0.0000088 0.000017 0.000021 2013 7 3 56476 0.145665 0.389520 0.0571564 -0.0000670 -0.000074 -0.000169 0.000025 0.000030 0.0000015 0.0000084 0.000063 0.000073 2013 7 4 56477 0.146711 0.388729 0.0572832 -0.0002368 -0.000109 -0.000193 0.000025 0.000030 0.0000094 0.0000084 0.000090 0.000089 2013 7 5 56478 0.147713 0.387541 0.0575537 -0.0003000 -0.000132 -0.000226 0.000025 0.000030 0.0000087 0.0000087 0.000105 0.000086 2013 7 6 56479 0.148953 0.386151 0.0579280 -0.0003526 -0.000150 -0.000255 0.000025 0.000030 0.0000096 0.0000090 0.000119 0.000083 2013 7 7 56480 0.150376 0.384903 0.0583167 -0.0003661 -0.000163 -0.000275 0.000107 0.000099 0.0000163 0.0000110 0.000134 0.000080 2013 7 8 56481 0.151569 0.383539 0.0585779 -0.0002537 -0.000127 -0.000261 0.000032 0.000032 0.0000125 0.0000085 0.000042 0.000052 2013 7 9 56482 0.153050 0.382250 0.0587683 -0.0001194 -0.000132 -0.000271 0.000032 0.000032 0.0000044 0.0000085 0.000034 0.000043 2013 7 10 56483 0.154493 0.381145 0.0588276 0.0000078 -0.000113 -0.000234 0.000030 0.000036 0.0000109 0.0000085 0.000066 0.000078 2013 7 11 56484 0.156082 0.380732 0.0587437 0.0001635 -0.000091 -0.000208 0.000034 0.000036 0.0000068 0.0000087 0.000099 0.000114 2013 7 12 56485 0.156863 0.380599 0.0585248 0.0002568 -0.000066 -0.000186 0.000034 0.000036 0.0000038 0.0000087 0.000132 0.000149 2013 7 13 56486 0.158069 0.380042 0.0582255 0.0003536 -0.000073 -0.000194 0.000030 0.000036 0.0000181 0.0000087 0.000127 0.000144 2013 7 14 56487 0.159076 0.379385 0.0578480 0.0003991 -0.000087 -0.000215 0.000030 0.000036 0.0000085 0.0000089 0.000108 0.000124 2013 7 15 56488 0.159931 0.378229 0.0574290 0.0004241 -0.000082 -0.000236 0.000028 0.000035 0.0000093 0.0000087 0.000088 0.000100 2013 7 16 56489 0.160905 0.377171 0.0569832 0.0004291 -0.000090 -0.000247 0.000031 0.000035 0.0000109 0.0000088 0.000068 0.000080 2013 7 17 56490 0.161815 0.376243 0.0565385 0.0003878 -0.000092 -0.000249 0.000036 0.000034 0.0000048 0.0000091 0.000049 0.000059 2013 7 18 56491 0.162565 0.375422 0.0561746 0.0003214 -0.000096 -0.000180 0.000036 0.000034 0.0000094 0.0000091 0.000060 0.000077 2013 7 19 56492 0.162945 0.374696 0.0558663 0.0002716 -0.000096 -0.000091 0.000033 0.000034 0.0000029 0.0000090 0.000079 0.000105 2013 7 20 56493 0.163846 0.373849 0.0556151 0.0002333 -0.000127 -0.000085 0.000029 0.000034 0.0000178 0.0000090 0.000078 0.000103 2013 7 21 56494 0.164553 0.373090 0.0554059 0.0002098 -0.000167 -0.000112 0.000032 0.000034 0.0000067 0.0000090 0.000069 0.000089 2013 7 22 56495 0.164789 0.371800 0.0551523 0.0002812 -0.000200 -0.000142 0.000034 0.000036 0.0000069 0.0000095 0.000059 0.000075 2013 7 23 56496 0.165291 0.370338 0.0547829 0.0004291 -0.000224 -0.000176 0.000031 0.000036 0.0000028 0.0000093 0.000051 0.000061 2013 7 24 56497 0.166002 0.368999 0.0542810 0.0005603 -0.000168 -0.000170 0.000031 0.000033 0.0000166 0.0000089 0.000049 0.000065 2013 7 25 56498 0.166346 0.367911 0.0536717 0.0006255 -0.000090 -0.000152 0.000034 0.000033 0.0000105 0.0000092 0.000060 0.000084 2013 7 26 56499 0.166811 0.366676 0.0530071 0.0006567 -0.000012 -0.000130 0.000034 0.000033 0.0000035 0.0000095 0.000072 0.000102 2013 7 27 56500 0.167707 0.365549 0.0523630 0.0006006 0.000015 -0.000119 0.000034 0.000033 0.0000121 0.0000098 0.000088 0.000126 2013 7 28 56501 0.168765 0.364738 0.0518197 0.0004764 0.000017 -0.000109 0.000031 0.000033 0.0000108 0.0000098 0.000104 0.000151 2013 7 29 56502 0.169700 0.363977 0.0513965 0.0003449 0.000011 -0.000085 0.000027 0.000032 0.0000105 0.0000102 0.000125 0.000182 2013 7 30 56503 0.170594 0.362929 0.0510988 0.0002185 0.000006 -0.000072 0.000028 0.000033 0.0000065 0.0000088 0.000142 0.000208 2013 7 31 56504 0.171158 0.361742 0.0509293 0.0001075 -0.000047 -0.000055 0.000029 0.000032 0.0000126 0.0000085 0.000098 0.000152 2013 8 1 56505 0.171614 0.360801 0.0508664 0.0000354 -0.000115 -0.000041 0.000029 0.000032 0.0000116 0.0000088 0.000061 0.000092 2013 8 2 56506 0.171449 0.359906 0.0508698 -0.0000262 -0.000184 -0.000031 0.000029 0.000032 0.0000021 0.0000088 0.000024 0.000033 2013 8 3 56507 0.171812 0.358758 0.0508896 -0.0000357 -0.000185 -0.000041 0.000029 0.000032 0.0000159 0.0000088 0.000015 0.000019 2013 8 4 56508 0.172184 0.357514 0.0508920 -0.0000184 -0.000157 -0.000058 0.000029 0.000029 0.0000092 0.0000091 0.000017 0.000021 2013 8 5 56509 0.172401 0.356273 0.0508653 0.0000659 -0.000111 -0.000073 0.000033 0.000029 0.0000153 0.0000097 0.000019 0.000026 2013 8 6 56510 0.172554 0.355256 0.0507705 0.0001743 -0.000076 -0.000090 0.000033 0.000032 0.0000055 0.0000096 0.000021 0.000028 2013 8 7 56511 0.172778 0.354263 0.0505584 0.0002672 -0.000114 -0.000073 0.000030 0.000031 0.0000125 0.0000098 0.000031 0.000044 2013 8 8 56512 0.173427 0.353372 0.0502377 0.0003265 -0.000172 -0.000048 0.000030 0.000028 0.0000059 0.0000098 0.000043 0.000062 2013 8 9 56513 0.173697 0.352904 0.0498320 0.0004346 -0.000232 -0.000025 0.000030 0.000028 0.0000021 0.0000099 0.000054 0.000079 2013 8 10 56514 0.173888 0.352080 0.0493378 0.0005192 -0.000260 -0.000042 0.000030 0.000028 0.0000104 0.0000101 0.000053 0.000076 2013 8 11 56515 0.173994 0.351257 0.0487936 0.0005298 -0.000274 -0.000075 0.000030 0.000028 0.0000082 0.0000101 0.000047 0.000064 2013 8 12 56516 0.173765 0.350190 0.0482710 0.0004758 -0.000286 -0.000107 0.000033 0.000032 0.0000091 0.0000098 0.000041 0.000053 2013 8 13 56517 0.173651 0.348912 0.0477934 0.0004126 -0.000288 -0.000146 0.000033 0.000032 0.0000033 0.0000099 0.000035 0.000042 2013 8 14 56518 0.173705 0.347770 0.0473953 0.0003477 -0.000236 -0.000091 0.000031 0.000030 0.0000013 0.0000103 0.000053 0.000067 2013 8 15 56519 0.173741 0.346387 0.0470610 0.0002979 -0.000223 -0.000112 0.000034 0.000033 0.0000087 0.0000105 0.000058 0.000074 2013 8 16 56520 0.173646 0.345159 0.0467545 0.0002797 -0.000226 -0.000167 0.000034 0.000033 0.0000096 0.0000108 0.000055 0.000071 2013 8 17 56521 0.173383 0.343912 0.0464163 0.0003744 -0.000223 -0.000214 0.000031 0.000033 0.0000089 0.0000111 0.000052 0.000067 2013 8 18 56522 0.173288 0.342890 0.0459741 0.0005323 -0.000213 -0.000249 0.000034 0.000033 0.0000088 0.0000111 0.000049 0.000064 2013 8 19 56523 0.173168 0.341865 0.0453977 0.0006168 -0.000174 -0.000272 0.000033 0.000034 0.0000079 0.0000104 0.000044 0.000057 2013 8 20 56524 0.173063 0.340726 0.0446799 0.0007632 -0.000177 -0.000287 0.000029 0.000034 0.0000025 0.0000104 0.000042 0.000054 2013 8 21 56525 0.172398 0.339375 0.0438305 0.0008525 -0.000179 -0.000249 0.000028 0.000031 0.0000139 0.0000103 0.000051 0.000063 2013 8 22 56526 0.171684 0.337844 0.0429512 0.0008717 -0.000185 -0.000190 0.000031 0.000031 0.0000092 0.0000097 0.000064 0.000076 2013 8 23 56527 0.170625 0.336442 0.0420842 0.0008230 -0.000194 -0.000127 0.000031 0.000031 0.0000041 0.0000097 0.000076 0.000089 2013 8 24 56528 0.169798 0.334944 0.0412703 0.0007489 -0.000217 -0.000093 0.000031 0.000031 0.0000090 0.0000099 0.000118 0.000146 2013 8 25 56529 0.169189 0.333577 0.0405795 0.0006309 -0.000243 -0.000073 0.000031 0.000034 0.0000072 0.0000099 0.000169 0.000220 2013 8 26 56530 0.168893 0.332209 0.0400021 0.0005207 -0.000239 -0.000063 0.000028 0.000034 0.0000114 0.0000100 0.000282 0.000295 2013 8 27 56531 0.168519 0.330738 0.0395337 0.0003777 -0.000247 -0.000057 0.000028 0.000031 0.0000100 0.0000100 0.000348 0.000369 2013 8 28 56532 0.168415 0.329414 0.0391717 0.0002806 -0.000228 -0.000070 0.000029 0.000030 0.0000139 0.0000093 0.000235 0.000293 2013 8 29 56533 0.168163 0.328251 0.0388973 0.0002473 -0.000196 -0.000082 0.000029 0.000033 0.0000142 0.0000093 0.000138 0.000172 2013 8 30 56534 0.167661 0.327082 0.0386768 0.0002367 -0.000168 -0.000096 0.000029 0.000033 0.0000058 0.0000095 0.000041 0.000051 2013 8 31 56535 0.166593 0.325700 0.0384634 0.0002152 -0.000155 -0.000089 0.000029 0.000033 0.0000122 0.0000095 0.000023 0.000028 2013 9 1 56536 0.165860 0.324084 0.0382068 0.0002970 -0.000152 -0.000074 0.000029 0.000033 0.0000084 0.0000093 0.000035 0.000041 2013 9 2 56537 0.165573 0.322684 0.0378617 0.0004198 -0.000142 -0.000047 0.000035 0.000036 0.0000102 0.0000109 0.000043 0.000053 2013 9 3 56538 0.165314 0.321419 0.0373927 0.0005024 -0.000149 -0.000031 0.000039 0.000036 0.0000127 0.0000114 0.000053 0.000066 2013 9 4 56539 0.164827 0.320456 0.0367879 0.0006379 -0.000156 -0.000014 0.000034 0.000034 0.0000049 0.0000106 0.000062 0.000077 2013 9 5 56540 0.164368 0.319491 0.0360450 0.0008060 -0.000259 -0.000088 0.000034 0.000034 0.0000114 0.0000104 0.000058 0.000072 2013 9 6 56541 0.164310 0.318349 0.0351748 0.0009072 -0.000380 -0.000180 0.000038 0.000034 0.0000046 0.0000104 0.000051 0.000064 2013 9 7 56542 0.163910 0.317351 0.0342240 0.0009627 -0.000400 -0.000187 0.000034 0.000034 0.0000118 0.0000101 0.000061 0.000083 2013 9 8 56543 0.163508 0.316383 0.0332626 0.0009316 -0.000371 -0.000155 0.000034 0.000031 0.0000085 0.0000098 0.000077 0.000112 2013 9 9 56544 0.162948 0.315306 0.0323533 0.0008653 -0.000327 -0.000098 0.000033 0.000031 0.0000085 0.0000101 0.000094 0.000145 2013 9 10 56545 0.162052 0.314146 0.0315245 0.0007584 -0.000269 -0.000045 0.000033 0.000035 0.0000075 0.0000101 0.000110 0.000176 2013 9 11 56546 0.161094 0.312773 0.0307834 0.0006948 -0.000268 0.000120 0.000031 0.000029 0.0000096 0.0000100 0.000092 0.000145 2013 9 12 56547 0.159937 0.311450 0.0301155 0.0006528 -0.000286 0.000308 0.000027 0.000026 0.0000070 0.0000100 0.000066 0.000100 2013 9 13 56548 0.158737 0.309930 0.0294762 0.0006294 -0.000305 0.000479 0.000027 0.000026 0.0000030 0.0000100 0.000039 0.000055 2013 9 14 56549 0.157790 0.308431 0.0288025 0.0007154 -0.000342 0.000490 0.000031 0.000029 0.0000144 0.0000103 0.000044 0.000057 2013 9 15 56550 0.157350 0.306944 0.0280242 0.0008645 -0.000383 0.000421 0.000031 0.000029 0.0000071 0.0000105 0.000060 0.000077 2013 9 16 56551 0.157106 0.305976 0.0270896 0.0010175 -0.000419 0.000334 0.000030 0.000030 0.0000068 0.0000099 0.000071 0.000091 2013 9 17 56552 0.156504 0.305514 0.0259668 0.0011926 -0.000437 0.000221 0.000030 0.000034 0.0000079 0.0000099 0.000085 0.000109 2013 9 18 56553 0.155377 0.305349 0.0246770 0.0013240 -0.000434 0.000094 0.000029 0.000032 0.0000056 0.0000102 0.000099 0.000127 2013 9 19 56554 0.153947 0.304766 0.0232973 0.0013738 -0.000357 0.000099 0.000043 0.000045 0.0000129 0.0000102 0.000074 0.000097 2013 9 20 56555 0.152824 0.303963 0.0219443 0.0012905 -0.000246 0.000155 0.000043 0.000045 0.0000038 0.0000102 0.000037 0.000054 2013 9 21 56556 0.151406 0.303196 0.0207179 0.0011330 -0.000223 0.000123 0.000048 0.000045 0.0000082 0.0000108 0.000028 0.000043 2013 9 22 56557 0.149281 0.302354 0.0196438 0.0010117 -0.000233 0.000067 0.000054 0.000050 0.0000083 0.0000111 0.000031 0.000045 2013 9 23 56558 0.146735 0.301442 0.0186897 0.0008985 -0.000242 0.000020 0.000033 0.000048 0.0000096 0.0000092 0.000033 0.000047 2013 9 24 56559 0.144871 0.300344 0.0178077 0.0008517 -0.000255 -0.000012 0.000033 0.000047 0.0000100 0.0000092 0.000035 0.000048 2013 9 25 56560 0.143566 0.299610 0.0169717 0.0008146 -0.000269 -0.000032 0.000033 0.000045 0.0000028 0.0000092 0.000035 0.000044 2013 9 26 56561 0.142079 0.298821 0.0161801 0.0007604 -0.000214 0.000000 0.000033 0.000045 0.0000090 0.0000089 0.000030 0.000037 2013 9 27 56562 0.140889 0.297939 0.0154371 0.0007188 -0.000141 0.000048 0.000033 0.000046 0.0000036 0.0000092 0.000023 0.000027 2013 9 28 56563 0.139500 0.297257 0.0147280 0.0007030 -0.000128 0.000090 0.000033 0.000046 0.0000080 0.0000095 0.000028 0.000036 2013 9 29 56564 0.137657 0.296237 0.0140048 0.0007466 -0.000136 0.000126 0.000033 0.000046 0.0000106 0.0000095 0.000037 0.000051 2013 9 30 56565 0.135490 0.295144 0.0131976 0.0008856 -0.000134 0.000152 0.000036 0.000048 0.0000104 0.0000103 0.000050 0.000080 2013 10 1 56566 0.133064 0.294137 0.0122633 0.0009920 -0.000149 0.000174 0.000036 0.000048 0.0000043 0.0000100 0.000059 0.000099 2013 10 2 56567 0.131082 0.292889 0.0112038 0.0011247 -0.000154 0.000132 0.000035 0.000048 0.0000049 0.0000099 0.000058 0.000093 2013 10 3 56568 0.129546 0.292015 0.0100389 0.0011865 -0.000159 0.000071 0.000035 0.000043 0.0000070 0.0000099 0.000053 0.000080 2013 10 4 56569 0.128542 0.291032 0.0088032 0.0012562 -0.000167 0.000009 0.000035 0.000043 0.0000040 0.0000096 0.000048 0.000067 2013 10 5 56570 0.127903 0.290154 0.0075119 0.0012920 -0.000179 0.000008 0.000035 0.000048 0.0000064 0.0000099 0.000054 0.000072 2013 10 6 56571 0.126726 0.289547 0.0062221 0.0012702 -0.000191 0.000032 0.000032 0.000043 0.0000055 0.0000101 0.000064 0.000083 2013 10 7 56572 0.124819 0.289094 0.0049648 0.0012181 -0.000199 0.000060 0.000025 0.000039 0.0000101 0.0000103 0.000073 0.000094 2013 10 8 56573 0.123190 0.288137 0.0037538 0.0011662 -0.000197 0.000089 0.000025 0.000039 0.0000053 0.0000107 0.000083 0.000106 2013 10 9 56574 0.121832 0.287286 0.0025855 0.0011269 -0.000069 -0.000034 0.000023 0.000040 0.0000143 0.0000106 0.000213 0.000162 2013 10 10 56575 0.120512 0.286733 0.0014693 0.0010983 -0.000080 -0.000006 0.000023 0.000040 0.0000103 0.0000103 0.000179 0.000140 2013 10 11 56576 0.118663 0.286056 0.0003773 0.0011016 -0.000145 0.000057 0.000023 0.000040 0.0000038 0.0000103 0.000081 0.000083 2013 10 12 56577 0.116817 0.285276 -0.0007606 0.0011490 -0.000173 0.000121 0.000023 0.000040 0.0000094 0.0000107 0.000066 0.000067 2013 10 13 56578 0.115102 0.284800 -0.0019609 0.0012373 -0.000186 0.000183 0.000023 0.000040 0.0000082 0.0000103 0.000080 0.000065 2013 10 14 56579 0.113868 0.284527 -0.0032639 0.0013714 -0.000193 0.000188 0.000028 0.000040 0.0000065 0.0000094 0.000112 0.000144 2013 10 15 56580 0.112808 0.284046 -0.0047073 0.0014833 -0.000203 0.000223 0.000028 0.000040 0.0000070 0.0000098 0.000134 0.000171 2013 10 16 56581 0.111727 0.283791 -0.0062374 0.0015257 -0.000208 0.000248 0.000025 0.000039 0.0000055 0.0000112 0.000158 0.000209 2013 10 17 56582 0.110185 0.283609 -0.0077677 0.0014962 -0.000211 0.000231 0.000025 0.000039 0.0000072 0.0000110 0.000117 0.000158 2013 10 18 56583 0.108331 0.283369 -0.0092485 0.0014182 -0.000209 0.000198 0.000025 0.000039 0.0000038 0.0000108 0.000062 0.000087 2013 10 19 56584 0.105962 0.283145 -0.0106017 0.0012698 -0.000213 0.000212 0.000025 0.000039 0.0000057 0.0000108 0.000044 0.000065 2013 10 20 56585 0.103739 0.282664 -0.0117696 0.0010868 -0.000214 0.000241 0.000025 0.000039 0.0000070 0.0000105 0.000041 0.000060 2013 10 21 56586 0.101756 0.282519 -0.0127744 0.0008939 -0.000094 0.000347 0.000025 0.000041 0.0000096 0.0000092 0.000053 0.000079 2013 10 22 56587 0.099947 0.282314 -0.0136435 0.0007831 -0.000040 0.000389 0.000025 0.000041 0.0000045 0.0000092 0.000056 0.000084 2013 10 23 56588 0.098496 0.282252 -0.0144146 0.0007482 -0.000052 0.000370 0.000025 0.000039 0.0000084 0.0000089 0.000034 0.000051 2013 10 24 56589 0.096884 0.282500 -0.0151819 0.0007967 -0.000087 0.000329 0.000025 0.000039 0.0000084 0.0000088 0.000029 0.000044 2013 10 25 56590 0.095045 0.282628 -0.0160382 0.0009378 -0.000127 0.000282 0.000025 0.000039 0.0000034 0.0000091 0.000023 0.000037 2013 10 26 56591 0.093453 0.282516 -0.0170097 0.0010264 -0.000138 0.000290 0.000028 0.000043 0.0000094 0.0000090 0.000029 0.000046 2013 10 27 56592 0.092408 0.282377 -0.0180777 0.0010975 -0.000137 0.000313 0.000028 0.000048 0.0000081 0.0000087 0.000039 0.000060 2013 10 28 56593 0.091832 0.282935 -0.0192744 0.0012683 -0.000126 0.000308 0.000042 0.000044 0.0000121 0.0000103 0.000049 0.000073 2013 10 29 56594 0.091210 0.283632 -0.0206159 0.0014075 -0.000125 0.000323 0.000043 0.000038 0.0000047 0.0000103 0.000058 0.000088 2013 10 30 56595 0.090411 0.284092 -0.0220701 0.0015026 -0.000151 0.000247 0.000043 0.000037 0.0000059 0.0000099 0.000053 0.000081 2013 10 31 56596 0.089550 0.284177 -0.0235933 0.0015306 -0.000182 0.000157 0.000043 0.000038 0.0000041 0.0000096 0.000043 0.000070 2013 11 1 56597 0.088052 0.284261 -0.0251053 0.0014742 -0.000191 0.000161 0.000043 0.000044 0.0000047 0.0000099 0.000039 0.000064 2013 11 2 56598 0.086815 0.284330 -0.0265342 0.0013825 -0.000188 0.000203 0.000048 0.000048 0.0000073 0.0000101 0.000038 0.000060 2013 11 3 56599 0.085515 0.284793 -0.0278983 0.0013090 -0.000178 0.000249 0.000058 0.000056 0.0000087 0.0000101 0.000037 0.000056 2013 11 4 56600 0.084395 0.284876 -0.0292178 0.0013031 -0.000152 0.000247 0.000061 0.000064 0.0000114 0.0000106 0.000028 0.000041 2013 11 5 56601 0.083174 0.285500 -0.0305056 0.0012640 -0.000136 0.000285 0.000060 0.000058 0.0000121 0.0000108 0.000026 0.000036 2013 11 6 56602 0.081816 0.285783 -0.0317375 0.0012043 -0.000120 0.000318 0.000058 0.000057 0.0000039 0.0000105 0.000023 0.000033 2013 11 7 56603 0.081089 0.286143 -0.0328981 0.0011348 -0.000118 0.000322 0.000059 0.000065 0.0000087 0.0000103 0.000039 0.000061 2013 11 8 56604 0.079839 0.286639 -0.0340371 0.0011551 -0.000121 0.000309 0.000059 0.000071 0.0000068 0.0000103 0.000058 0.000098 2013 11 9 56605 0.077895 0.286644 -0.0352054 0.0012086 -0.000133 0.000315 0.000059 0.000067 0.0000084 0.0000103 0.000058 0.000097 2013 11 10 56606 0.076242 0.286099 -0.0364510 0.0013029 -0.000147 0.000321 0.000053 0.000062 0.0000076 0.0000101 0.000050 0.000082 2013 11 11 56607 0.074842 0.285789 -0.0377943 0.0013823 -0.000149 0.000282 0.000053 0.000062 0.0000050 0.0000101 0.000021 0.000033 2013 11 12 56608 0.073684 0.285213 -0.0392306 0.0014468 -0.000159 0.000276 0.000057 0.000061 0.0000057 0.0000101 0.000023 0.000034 2013 11 13 56609 0.073102 0.284968 -0.0407210 0.0015014 -0.000178 0.000239 0.000054 0.000060 0.0000027 0.0000096 0.000026 0.000035 2013 11 14 56610 0.072468 0.284950 -0.0421969 0.0014397 -0.000233 0.000251 0.000049 0.000059 0.0000059 0.0000099 0.000024 0.000031 2013 11 15 56611 0.071816 0.285149 -0.0435710 0.0012753 -0.000292 0.000267 0.000054 0.000060 0.0000031 0.0000103 0.000022 0.000026 2013 11 16 56612 0.070240 0.285498 -0.0447887 0.0011467 -0.000224 0.000298 0.000059 0.000062 0.0000073 0.0000103 0.000023 0.000028 2013 11 17 56613 0.068372 0.285979 -0.0458782 0.0010639 -0.000106 0.000327 0.000054 0.000059 0.0000076 0.0000103 0.000026 0.000032 2013 11 18 56614 0.066653 0.286810 -0.0468692 0.0009610 0.000021 0.000332 0.000052 0.000058 0.0000056 0.0000100 0.000030 0.000038 2013 11 19 56615 0.065169 0.287571 -0.0477974 0.0009047 0.000133 0.000353 0.000057 0.000061 0.0000026 0.0000102 0.000033 0.000042 2013 11 20 56616 0.063703 0.288165 -0.0486896 0.0008702 0.000074 0.000352 0.000056 0.000060 0.0000060 0.0000105 0.000037 0.000039 2013 11 21 56617 0.062361 0.288725 -0.0495709 0.0008757 0.000005 0.000293 0.000058 0.000061 0.0000069 0.0000107 0.000051 0.000075 2013 11 22 56618 0.061418 0.289168 -0.0504526 0.0009166 -0.000092 0.000253 0.000076 0.000080 0.0000052 0.0000107 0.000062 0.000094 2013 11 23 56619 0.060913 0.289509 -0.0514100 0.0010386 -0.000114 0.000231 0.000078 0.000082 0.0000062 0.0000107 0.000147 0.000201 2013 11 24 56620 0.060152 0.290186 -0.0525353 0.0011651 -0.000106 0.000223 0.000054 0.000065 0.0000099 0.0000105 0.000260 0.000341 2013 11 25 56621 0.059490 0.290704 -0.0537384 0.0012346 -0.000111 0.000207 0.000055 0.000065 0.0000081 0.0000101 0.000370 0.000475 2013 11 26 56622 0.059061 0.291555 -0.0550059 0.0013008 -0.000097 0.000216 0.000054 0.000065 0.0000121 0.0000099 0.000487 0.000622 2013 11 27 56623 0.058500 0.292168 -0.0563624 0.0013913 -0.000092 0.000235 0.000070 0.000077 0.0000085 0.0000099 0.000454 0.000579 2013 11 28 56624 0.057886 0.292791 -0.0577845 0.0014574 -0.000082 0.000262 0.000075 0.000078 0.0000056 0.0000101 0.000385 0.000492 2013 11 29 56625 0.057502 0.293295 -0.0592309 0.0014060 -0.000070 0.000294 0.000057 0.000063 0.0000095 0.0000104 0.000315 0.000404 2013 11 30 56626 0.057586 0.293748 -0.0606302 0.0013599 -0.000054 0.000325 0.000058 0.000066 0.0000076 0.0000103 0.000246 0.000317 2013 12 1 56627 0.057869 0.294172 -0.0619823 0.0013422 -0.000039 0.000349 0.000059 0.000070 0.0000075 0.0000103 0.000177 0.000230 2013 12 2 56628 0.057812 0.294877 -0.0632813 0.0012444 -0.000025 0.000364 0.000058 0.000067 0.0000117 0.0000103 0.000106 0.000143 2013 12 3 56629 0.057215 0.295605 -0.0644885 0.0011523 -0.000011 0.000364 0.000058 0.000064 0.0000044 0.0000101 0.000037 0.000056 2013 12 4 56630 0.056964 0.296397 -0.0656052 0.0011449 -0.000025 0.000400 0.000065 0.000066 0.0000038 0.0000101 0.000045 0.000041 2013 12 5 56631 0.057134 0.297390 -0.0667424 0.0011605 -0.000046 0.000431 0.000065 0.000069 0.0000052 0.0000104 0.000072 0.000045 2013 12 6 56632 0.057086 0.298647 -0.0679462 0.0012484 -0.000069 0.000448 0.000059 0.000067 0.0000064 0.0000101 0.000099 0.000049 2013 12 7 56633 0.057007 0.300398 -0.0692497 0.0013630 0.000005 0.000002 0.000076 0.000082 0.0000074 0.0000101 0.000082 0.000070 2013 12 8 56634 0.056973 0.301531 -0.0706396 0.0014153 0.000005 0.000002 0.000072 0.000082 0.0000109 0.0000101 0.000074 0.000078 2013 12 9 56635 0.057200 0.302531 -0.0720708 0.0014258 -0.000009 0.000166 0.000048 0.000061 0.0000107 0.0000096 0.000046 0.000030 2013 12 10 56636 0.057065 0.303856 -0.0734731 0.0013519 -0.000010 0.000191 0.000056 0.000067 0.0000049 0.0000094 0.000021 0.000029 2013 12 11 56637 0.056879 0.305162 -0.0747678 0.0012529 0.000001 0.000212 0.000056 0.000068 0.0000082 0.0000092 0.000019 0.000026 2013 12 12 56638 0.056870 0.306250 -0.0759664 0.0011467 0.000023 0.000233 0.000092 0.000085 0.0000130 0.0000088 0.000019 0.000027 2013 12 13 56639 0.056510 0.307277 -0.0770616 0.0010506 0.000043 0.000253 0.000095 0.000086 0.0000039 0.0000090 0.000019 0.000028 2013 12 14 56640 0.055709 0.308232 -0.0780346 0.0009162 0.000036 0.000273 0.000064 0.000071 0.0000080 0.0000099 0.000043 0.000061 2013 12 15 56641 0.054570 0.308614 -0.0788823 0.0007751 0.000019 0.000287 0.000063 0.000070 0.0000099 0.0000100 0.000076 0.000106 2013 12 16 56642 0.053198 0.308546 -0.0796017 0.0006761 0.000027 0.000306 0.000056 0.000063 0.0000078 0.0000098 0.000144 0.000170 2013 12 17 56643 0.051716 0.308102 -0.0802450 0.0006113 0.000021 0.000310 0.000056 0.000061 0.0000055 0.0000098 0.000188 0.000221 2013 12 18 56644 0.049959 0.308079 -0.0808446 0.0006039 0.000039 0.000311 0.000086 0.000087 0.0000048 0.0000096 0.000151 0.000179 2013 12 19 56645 0.048338 0.308156 -0.0814731 0.0006730 0.000058 0.000302 0.000090 0.000093 0.0000065 0.0000099 0.000089 0.000106 2013 12 20 56646 0.047108 0.308654 -0.0821956 0.0007626 0.000075 0.000283 0.000094 0.000097 0.0000030 0.0000097 0.000028 0.000033 2013 12 21 56647 0.046064 0.309102 -0.0830489 0.0009298 0.000077 0.000229 0.000098 0.000098 0.0000065 0.0000097 0.000013 0.000016 2013 12 22 56648 0.045176 0.309738 -0.0840445 0.0010657 0.000070 0.000163 0.000069 0.000070 0.0000060 0.0000094 0.000015 0.000019 2013 12 23 56649 0.044293 0.310448 -0.0851722 0.0011703 0.000062 0.000101 0.000056 0.000062 0.0000095 0.0000094 0.000017 0.000023 2013 12 24 56650 0.043537 0.311200 -0.0864091 0.0012775 0.000050 0.000045 0.000053 0.000059 0.0000037 0.0000096 0.000019 0.000026 2013 12 25 56651 0.042686 0.312361 -0.0877291 0.0013395 0.000045 0.000040 0.000078 0.000079 0.0000075 0.0000100 0.000018 0.000025 2013 12 26 56652 0.041808 0.313435 -0.0891107 0.0014002 0.000040 0.000058 0.000081 0.000083 0.0000111 0.0000104 0.000016 0.000022 2013 12 27 56653 0.041068 0.314844 -0.0905322 0.0014365 0.000032 0.000087 0.000113 0.000099 0.0000036 0.0000102 0.000014 0.000020 2013 12 28 56654 0.040491 0.315949 -0.0919602 0.0013981 0.000026 0.000104 0.000114 0.000101 0.0000090 0.0000105 0.000016 0.000021 2013 12 29 56655 0.040099 0.316820 -0.0933502 0.0013767 0.000021 0.000120 0.000079 0.000077 0.0000103 0.0000104 0.000018 0.000025 2013 12 30 56656 0.039588 0.317646 -0.0946605 0.0012598 0.000013 0.000141 0.000074 0.000070 0.0000060 0.0000097 0.000021 0.000028 2013 12 31 56657 0.038987 0.318247 -0.0958816 0.0011687 0.000007 0.000162 0.000060 0.000069 0.0000013 0.0000096 0.000023 0.000031 2014 1 1 56658 0.038635 0.318873 -0.0970509 0.0011868 -0.000027 0.000194 0.000061 0.000072 0.0000062 0.0000101 0.000038 0.000050 2014 1 2 56659 0.038392 0.319560 -0.0982417 0.0012244 -0.000064 0.000224 0.000066 0.000069 0.0000100 0.0000103 0.000058 0.000075 2014 1 3 56660 0.037782 0.320363 -0.0995045 0.0012891 -0.000095 0.000243 0.000074 0.000074 0.0000044 0.0000106 0.000078 0.000099 2014 1 4 56661 0.037125 0.320762 -0.1008534 0.0013700 -0.000075 0.000256 0.000077 0.000080 0.0000090 0.0000108 0.000073 0.000092 2014 1 5 56662 0.036686 0.321192 -0.1022594 0.0014069 -0.000033 0.000258 0.000062 0.000073 0.0000084 0.0000105 0.000058 0.000074 2014 1 6 56663 0.036107 0.321881 -0.1036670 0.0013719 0.000013 0.000248 0.000050 0.000063 0.0000060 0.0000105 0.000050 0.000061 2014 1 7 56664 0.035279 0.322794 -0.1049941 0.0012600 0.000056 0.000231 0.000062 0.000064 0.0000015 0.0000101 0.000033 0.000041 2014 1 8 56665 0.034294 0.323912 -0.1061719 0.0010866 0.000057 0.000229 0.000075 0.000068 0.0000053 0.0000095 0.000028 0.000034 2014 1 9 56666 0.033907 0.324957 -0.1072008 0.0009609 0.000045 0.000233 0.000070 0.000071 0.0000107 0.0000099 0.000026 0.000031 2014 1 10 56667 0.033546 0.326433 -0.1080952 0.0008228 0.000031 0.000235 0.000063 0.000072 0.0000060 0.0000104 0.000024 0.000027 2014 1 11 56668 0.032776 0.327841 -0.1088510 0.0006595 0.000033 0.000249 0.000066 0.000071 0.0000073 0.0000104 0.000030 0.000034 2014 1 12 56669 0.031632 0.328925 -0.1094762 0.0005864 0.000040 0.000265 0.000066 0.000071 0.0000066 0.0000104 0.000038 0.000045 2014 1 13 56670 0.030272 0.329986 -0.1100333 0.0005443 0.000047 0.000274 0.000063 0.000063 0.0000076 0.0000104 0.000046 0.000056 2014 1 14 56671 0.029421 0.330656 -0.1105752 0.0005506 0.000050 0.000275 0.000076 0.000085 0.0000026 0.0000103 0.000054 0.000067 2014 1 15 56672 0.028546 0.331742 -0.1111690 0.0006303 0.000118 0.000199 0.000123 0.000120 0.0000096 0.0000102 0.000041 0.000051 2014 1 16 56673 0.027457 0.332608 -0.1118389 0.0007078 0.000152 0.000183 0.000115 0.000097 0.0000148 0.0000104 0.000035 0.000043 2014 1 17 56674 0.026580 0.333728 -0.1126043 0.0008222 0.000183 0.000167 0.000066 0.000060 0.0000060 0.0000104 0.000028 0.000036 2014 1 18 56675 0.025855 0.335069 -0.1134933 0.0009783 0.000181 0.000156 0.000066 0.000060 0.0000069 0.0000104 0.000029 0.000037 2014 1 19 56676 0.024806 0.336353 -0.1145454 0.0011223 0.000164 0.000148 0.000070 0.000066 0.0000081 0.0000104 0.000034 0.000042 2014 1 20 56677 0.023812 0.337368 -0.1157127 0.0012096 0.000127 0.000141 0.000063 0.000065 0.0000073 0.0000110 0.000038 0.000046 2014 1 21 56678 0.023712 0.338243 -0.1169561 0.0012609 0.000104 0.000132 0.000059 0.000068 0.0000109 0.0000109 0.000042 0.000050 2014 1 22 56679 0.024082 0.338997 -0.1182377 0.0012905 0.000080 0.000121 0.000061 0.000068 0.0000046 0.0000105 0.000046 0.000054 2014 1 23 56680 0.024329 0.339927 -0.1195135 0.0012530 0.000166 0.000120 0.000060 0.000063 0.0000084 0.0000109 0.000034 0.000040 2014 1 24 56681 0.024480 0.340703 -0.1207234 0.0011452 0.000277 0.000119 0.000063 0.000066 0.0000050 0.0000115 0.000018 0.000021 2014 1 25 56682 0.024339 0.341338 -0.1218334 0.0010877 0.000304 0.000101 0.000072 0.000071 0.0000059 0.0000117 0.000029 0.000036 2014 1 26 56683 0.024143 0.341833 -0.1228609 0.0010070 0.000292 0.000075 0.000068 0.000072 0.0000108 0.0000114 0.000051 0.000064 2014 1 27 56684 0.024219 0.342592 -0.1238269 0.0009428 0.000247 0.000063 0.000067 0.000076 0.0000106 0.0000111 0.000025 0.000031 2014 1 28 56685 0.024393 0.343907 -0.1247856 0.0009563 0.000206 0.000042 0.000063 0.000071 0.0000105 0.0000107 0.000030 0.000037 2014 1 29 56686 0.024500 0.345495 -0.1258104 0.0010692 0.000153 0.000023 0.000052 0.000058 0.0000039 0.0000106 0.000031 0.000042 2014 1 30 56687 0.024526 0.346902 -0.1269629 0.0012370 0.000185 0.000030 0.000056 0.000057 0.0000083 0.0000107 0.000037 0.000048 2014 1 31 56688 0.024216 0.347929 -0.1282635 0.0013411 0.000234 0.000048 0.000056 0.000053 0.0000041 0.0000106 0.000044 0.000055 2014 2 1 56689 0.023746 0.348777 -0.1296531 0.0014023 0.000200 0.000066 0.000057 0.000052 0.0000094 0.0000105 0.000043 0.000053 2014 2 2 56690 0.023546 0.349472 -0.1310704 0.0013911 0.000134 0.000089 0.000054 0.000053 0.0000063 0.0000106 0.000038 0.000047 2014 2 3 56691 0.023587 0.350099 -0.1324575 0.0013340 0.000070 0.000115 0.000055 0.000051 0.0000069 0.0000102 0.000034 0.000041 2014 2 4 56692 0.023731 0.351001 -0.1337438 0.0012028 0.000011 0.000143 0.000053 0.000052 0.0000023 0.0000102 0.000030 0.000035 2014 2 5 56693 0.023882 0.352327 -0.1348635 0.0010018 0.000059 0.000153 0.000052 0.000053 0.0000108 0.0000107 0.000053 0.000039 2014 2 6 56694 0.024326 0.353693 -0.1357882 0.0008236 0.000141 0.000158 0.000052 0.000052 0.0000146 0.0000107 0.000085 0.000045 2014 2 7 56695 0.024504 0.355291 -0.1365502 0.0007000 0.000228 0.000157 0.000052 0.000053 0.0000086 0.0000107 0.000116 0.000051 2014 2 8 56696 0.024453 0.356675 -0.1372079 0.0006189 0.000224 0.000179 0.000051 0.000050 0.0000090 0.0000107 0.000107 0.000050 2014 2 9 56697 0.024378 0.358195 -0.1378092 0.0005558 0.000185 0.000204 0.000052 0.000051 0.0000125 0.0000107 0.000082 0.000046 2014 2 10 56698 0.024167 0.359775 -0.1383968 0.0005869 0.000141 0.000219 0.000051 0.000053 0.0000097 0.0000108 0.000057 0.000042 2014 2 11 56699 0.024019 0.361757 -0.1390051 0.0006671 0.000093 0.000227 0.000055 0.000057 0.0000021 0.0000105 0.000033 0.000039 2014 2 12 56700 0.023525 0.363716 -0.1396693 0.0007379 0.000160 0.000178 0.000062 0.000059 0.0000058 0.0000100 0.000036 0.000048 2014 2 13 56701 0.022797 0.365376 -0.1404604 0.0008575 0.000255 0.000115 0.000067 0.000062 0.0000067 0.0000103 0.000045 0.000061 2014 2 14 56702 0.022064 0.367071 -0.1413986 0.0009859 0.000344 0.000053 0.000076 0.000071 0.0000049 0.0000108 0.000054 0.000074 2014 2 15 56703 0.021480 0.368624 -0.1424512 0.0011128 0.000330 0.000044 0.000066 0.000072 0.0000060 0.0000102 0.000079 0.000098 2014 2 16 56704 0.021005 0.370370 -0.1436581 0.0012658 0.000273 0.000057 0.000058 0.000065 0.0000086 0.0000103 0.000109 0.000126 2014 2 17 56705 0.020488 0.372132 -0.1449610 0.0013315 0.000211 0.000066 0.000061 0.000060 0.0000077 0.0000104 0.000139 0.000153 2014 2 18 56706 0.019812 0.373408 -0.1463208 0.0013559 0.000138 0.000082 0.000061 0.000063 0.0000042 0.0000103 0.000169 0.000181 2014 2 19 56707 0.019886 0.374810 -0.1477070 0.0013818 0.000153 0.000041 0.000068 0.000064 0.0000071 0.0000106 0.000141 0.000153 2014 2 20 56708 0.020101 0.376100 -0.1490550 0.0013295 0.000200 0.000009 0.000068 0.000059 0.0000076 0.0000106 0.000095 0.000107 2014 2 21 56709 0.020333 0.377353 -0.1503430 0.0012159 0.000245 -0.000020 0.000064 0.000059 0.0000046 0.0000108 0.000051 0.000062 2014 2 22 56710 0.020503 0.378514 -0.1515427 0.0011412 0.000272 0.000003 0.000063 0.000060 0.0000115 0.0000109 0.000035 0.000046 2014 2 23 56711 0.020667 0.379942 -0.1526833 0.0011363 0.000287 0.000043 0.000063 0.000060 0.0000081 0.0000109 0.000031 0.000042 2014 2 24 56712 0.020406 0.381353 -0.1538325 0.0011823 0.000287 0.000079 0.000061 0.000060 0.0000072 0.0000110 0.000027 0.000036 2014 2 25 56713 0.019586 0.382709 -0.1550436 0.0012766 0.000291 0.000120 0.000063 0.000063 0.0000022 0.0000115 0.000023 0.000032 2014 2 26 56714 0.018776 0.383582 -0.1563845 0.0014431 0.000271 0.000114 0.000068 0.000063 0.0000054 0.0000114 0.000029 0.000038 2014 2 27 56715 0.018820 0.384179 -0.1579347 0.0016747 0.000244 0.000094 0.000074 0.000066 0.0000048 0.0000104 0.000037 0.000046 2014 2 28 56716 0.019274 0.385242 -0.1597391 0.0018881 0.000216 0.000068 0.000074 0.000067 0.0000029 0.0000101 0.000045 0.000053 2014 3 1 56717 0.019841 0.386558 -0.1616963 0.0019819 0.000223 0.000068 0.000070 0.000063 0.0000075 0.0000107 0.000045 0.000053 2014 3 2 56718 0.020229 0.387859 -0.1637004 0.0019764 0.000241 0.000076 0.000070 0.000063 0.0000067 0.0000111 0.000041 0.000051 2014 3 3 56719 0.020440 0.389343 -0.1656640 0.0019105 0.000255 0.000080 0.000123 0.000123 0.0000078 0.0000180 0.000038 0.000047 2014 3 4 56720 0.020479 0.390843 -0.1675271 0.0017869 0.000260 0.000082 0.000065 0.000056 0.0000026 0.0000110 0.000034 0.000044 2014 3 5 56721 0.020391 0.391998 -0.1692176 0.0015938 0.000287 0.000070 0.000063 0.000054 0.0000074 0.0000109 0.000042 0.000060 2014 3 6 56722 0.020407 0.392940 -0.1707396 0.0014224 0.000317 0.000054 0.000059 0.000054 0.0000080 0.0000109 0.000056 0.000081 2014 3 7 56723 0.020307 0.393997 -0.1721130 0.0013004 0.000348 0.000039 0.000068 0.000061 0.0000058 0.0000109 0.000071 0.000102 2014 3 8 56724 0.020124 0.395068 -0.1733490 0.0011717 0.000360 0.000020 0.000077 0.000067 0.0000097 0.0000114 0.000071 0.000095 2014 3 9 56725 0.019881 0.396125 -0.1744791 0.0010656 0.000364 0.000002 0.000067 0.000063 0.0000053 0.0000081 0.000064 0.000078 2014 3 10 56726 0.019532 0.396915 -0.1755600 0.0010786 0.000333 -0.000009 0.000054 0.000059 0.0000050 0.0000075 0.000049 0.000064 2014 3 11 56727 0.019307 0.397995 -0.1766225 0.0010647 0.000312 -0.000015 0.000049 0.000059 0.0000055 0.0000105 0.000036 0.000047 2014 3 12 56728 0.019487 0.399097 -0.1776624 0.0010541 0.000281 -0.000020 0.000048 0.000066 0.0000026 0.0000102 0.000029 0.000038 2014 3 13 56729 0.020326 0.400186 -0.1787710 0.0011566 0.000276 0.000030 0.000059 0.000069 0.0000041 0.0000102 0.000033 0.000043 2014 3 14 56730 0.021470 0.401233 -0.1799750 0.0012344 0.000274 0.000091 0.000066 0.000072 0.0000027 0.0000102 0.000041 0.000054 2014 3 15 56731 0.022536 0.402424 -0.1812403 0.0012801 0.000255 0.000118 0.000067 0.000075 0.0000062 0.0000107 0.000044 0.000058 2014 3 16 56732 0.023611 0.403661 -0.1825144 0.0012767 0.000228 0.000127 0.000067 0.000076 0.0000089 0.0000117 0.000045 0.000060 2014 3 17 56733 0.024471 0.404936 -0.1837860 0.0012374 0.000189 0.000133 0.000073 0.000086 0.0000083 0.0000114 0.000045 0.000060 2014 3 18 56734 0.024892 0.405583 -0.1850368 0.0012226 0.000168 0.000128 0.000070 0.000086 0.0000037 0.0000110 0.000046 0.000062 2014 3 19 56735 0.025396 0.405970 -0.1862549 0.0011946 0.000267 0.000307 0.000061 0.000077 0.0000088 0.0000109 0.000088 0.000076 2014 3 20 56736 0.026182 0.406487 -0.1874422 0.0011525 0.000394 0.000514 0.000064 0.000076 0.0000087 0.0000110 0.000141 0.000091 2014 3 21 56737 0.027434 0.407106 -0.1885777 0.0011114 0.000510 0.000693 0.000073 0.000077 0.0000118 0.0000108 0.000193 0.000106 2014 3 22 56738 0.028319 0.408424 -0.1896834 0.0010993 0.000529 0.000615 0.000064 0.000069 0.0000133 0.0000098 0.000172 0.000094 2014 3 23 56739 0.029456 0.409785 -0.1908270 0.0011587 0.000496 0.000424 0.000062 0.000063 0.0000080 0.0000100 0.000124 0.000072 2014 3 24 56740 0.030870 0.411294 -0.1920415 0.0012512 0.000408 -0.000027 0.000049 0.000051 0.0000078 0.0000100 0.000039 0.000053 2014 3 25 56741 0.032294 0.412629 -0.1933480 0.0013671 0.000364 -0.000046 0.000046 0.000045 0.0000022 0.0000099 0.000022 0.000028 2014 3 26 56742 0.033618 0.414145 -0.1947922 0.0015336 0.000334 -0.000032 0.000059 0.000052 0.0000086 0.0000110 0.000016 0.000023 2014 3 27 56743 0.035069 0.415154 -0.1963878 0.0016663 0.000300 0.000002 0.000059 0.000056 0.0000075 0.0000104 0.000015 0.000023 2014 3 28 56744 0.036794 0.415987 -0.1980989 0.0017386 0.000262 0.000051 0.000064 0.000056 0.0000023 0.0000099 0.000013 0.000023 2014 3 29 56745 0.038524 0.416876 -0.1998809 0.0017997 0.000210 0.000074 0.000069 0.000059 0.0000063 0.0000103 0.000023 0.000023 2014 3 30 56746 0.040416 0.418052 -0.2016754 0.0017886 0.000158 0.000095 0.000064 0.000062 0.0000102 0.0000111 0.000036 0.000024 2014 3 31 56747 0.042240 0.419457 -0.2034060 0.0016529 0.000171 0.000083 0.000053 0.000057 0.0000095 0.0000116 0.000029 0.000039 2014 4 1 56748 0.043607 0.420940 -0.2050077 0.0014833 0.000165 0.000100 0.000058 0.000056 0.0000023 0.0000111 0.000033 0.000044 2014 4 2 56749 0.044731 0.422505 -0.2064734 0.0014041 0.000149 0.000156 0.000064 0.000065 0.0000053 0.0000113 0.000069 0.000033 2014 4 3 56750 0.045490 0.423828 -0.2078192 0.0013026 0.000180 0.000166 0.000064 0.000065 0.0000092 0.0000116 0.000334 0.000142 2014 4 4 56751 0.045979 0.424932 -0.2090728 0.0012096 0.000254 0.000110 0.000065 0.000061 0.0000069 0.0000115 0.000174 0.000076 2014 4 5 56752 0.046374 0.425656 -0.2102805 0.0012037 0.000322 0.000091 0.000068 0.000060 0.0000079 0.0000117 0.000070 0.000035 2014 4 6 56753 0.046842 0.426321 -0.2114745 0.0011918 0.000377 0.000088 0.000071 0.000065 0.0000079 0.0000113 0.000055 0.000033 2014 4 7 56754 0.047736 0.426413 -0.2126716 0.0011774 0.000403 0.000081 0.000067 0.000070 0.0000068 0.0000109 0.000039 0.000031 2014 4 8 56755 0.049174 0.427200 -0.2138681 0.0011797 0.000434 0.000071 0.000063 0.000067 0.0000018 0.0000110 0.000024 0.000029 2014 4 9 56756 0.050711 0.428221 -0.2150826 0.0012402 0.000430 0.000044 0.000066 0.000066 0.0000071 0.0000114 0.000039 0.000033 2014 4 10 56757 0.052168 0.429049 -0.2163479 0.0012906 0.000407 0.000016 0.000069 0.000066 0.0000050 0.0000115 0.000062 0.000039 2014 4 11 56758 0.053250 0.429803 -0.2176742 0.0013679 0.000369 -0.000010 0.000068 0.000063 0.0000066 0.0000110 0.000086 0.000045 2014 4 12 56759 0.054234 0.430495 -0.2190704 0.0014091 0.000361 -0.000029 0.000068 0.000066 0.0000055 0.0000109 0.000078 0.000041 2014 4 13 56760 0.054922 0.430829 -0.2205171 0.0014478 0.000356 -0.000041 0.000064 0.000069 0.0000059 0.0000114 0.000058 0.000034 2014 4 14 56761 0.055815 0.431117 -0.2219822 0.0014663 0.000362 -0.000059 0.000062 0.000069 0.0000064 0.0000116 0.000060 0.000077 2014 4 15 56762 0.056685 0.432066 -0.2234228 0.0013816 0.000324 -0.000051 0.000063 0.000067 0.0000019 0.0000114 0.000022 0.000028 2014 4 16 56763 0.057372 0.432707 -0.2247319 0.0012503 0.000190 -0.000073 0.000059 0.000060 0.0000008 0.0000116 0.000022 0.000033 2014 4 17 56764 0.058285 0.433345 -0.2259407 0.0011767 0.000134 -0.000076 0.000059 0.000053 0.0000082 0.0000117 0.000025 0.000038 2014 4 18 56765 0.059603 0.434397 -0.2271293 0.0012051 0.000121 -0.000069 0.000062 0.000064 0.0000066 0.0000110 0.000025 0.000037 2014 4 19 56766 0.060277 0.435889 -0.2283317 0.0012007 0.000120 -0.000061 0.000062 0.000071 0.0000073 0.0000109 0.000025 0.000037 2014 4 20 56767 0.061059 0.436854 -0.2295651 0.0012686 0.000129 -0.000053 0.000071 0.000067 0.0000071 0.0000111 0.000025 0.000036 2014 4 21 56768 0.062226 0.437949 -0.2308723 0.0013612 0.000171 -0.000056 0.000067 0.000064 0.0000089 0.0000106 0.000032 0.000034 2014 4 22 56769 0.063815 0.438636 -0.2323122 0.0015154 0.000188 -0.000046 0.000060 0.000064 0.0000086 0.0000105 0.000032 0.000033 2014 4 23 56770 0.065292 0.439387 -0.2339073 0.0016655 0.000398 -0.000026 0.000061 0.000064 0.0000035 0.0000104 0.000039 0.000051 2014 4 24 56771 0.066921 0.439872 -0.2356245 0.0017816 0.000336 -0.000021 0.000056 0.000064 0.0000095 0.0000109 0.000034 0.000045 2014 4 25 56772 0.068585 0.440441 -0.2374787 0.0019279 0.000243 -0.000017 0.000055 0.000068 0.0000052 0.0000113 0.000027 0.000037 2014 4 26 56773 0.070307 0.441005 -0.2394521 0.0020154 0.000232 -0.000013 0.000064 0.000071 0.0000081 0.0000111 0.000033 0.000035 2014 4 27 56774 0.071805 0.441748 -0.2414476 0.0019383 0.000253 -0.000008 0.000059 0.000067 0.0000087 0.0000111 0.000043 0.000037 2014 4 28 56775 0.072999 0.442322 -0.2433329 0.0017859 0.000238 -0.000026 0.000059 0.000066 0.0000080 0.0000114 0.000041 0.000028 2014 4 29 56776 0.074344 0.442647 -0.2450400 0.0016137 0.000226 -0.000030 0.000060 0.000066 0.0000057 0.0000111 0.000046 0.000026 2014 4 30 56777 0.076138 0.442770 -0.2465381 0.0014115 0.000330 -0.000006 0.000063 0.000057 0.0000050 0.0000106 0.000062 0.000040 2014 5 1 56778 0.078006 0.443141 -0.2478474 0.0012234 0.000005 0.000001 0.000057 0.000053 0.0000095 0.0000095 0.000092 0.000075 2014 5 2 56779 0.079752 0.443556 -0.2490245 0.0011077 0.000005 0.000001 0.000054 0.000060 0.0000073 0.0000095 0.000099 0.000087 2014 5 3 56780 0.081711 0.443986 -0.2501213 0.0010993 0.000005 0.000001 0.000053 0.000059 0.0000072 0.0000101 0.000099 0.000087 2014 5 4 56781 0.083804 0.444551 -0.2512088 0.0011093 0.000005 0.000001 0.000049 0.000052 0.0000081 0.0000102 0.000099 0.000087 2014 5 5 56782 0.085264 0.444867 -0.2523436 0.0011428 0.000005 0.000001 0.000053 0.000055 0.0000064 0.0000104 0.000098 0.000087 2014 5 6 56783 0.086218 0.444993 -0.2535523 0.0012141 0.000005 0.000001 0.000052 0.000058 0.0000057 0.0000099 0.000098 0.000087 2014 5 7 56784 0.087407 0.445508 -0.2548052 0.0012887 0.000318 -0.000053 0.000049 0.000058 0.0000073 0.0000095 0.000036 0.000016 2014 5 8 56785 0.088971 0.446127 -0.2561005 0.0013728 0.000217 -0.000046 0.000054 0.000059 0.0000044 0.0000101 0.000035 0.000016 2014 5 9 56786 0.090412 0.446742 -0.2575155 0.0014254 0.000005 0.000001 0.000054 0.000056 0.0000051 0.0000100 0.000067 0.000052 2014 5 10 56787 0.091516 0.446842 -0.2589546 0.0014420 0.000005 0.000001 0.000051 0.000053 0.0000053 0.0000094 0.000098 0.000087 2014 5 11 56788 0.093120 0.446733 -0.2604017 0.0014287 0.000005 0.000001 0.000051 0.000055 0.0000069 0.0000092 0.000098 0.000087 2014 5 12 56789 0.095450 0.446666 -0.2618137 0.0013658 0.000226 -0.000102 0.000049 0.000059 0.0000063 0.0000092 0.000037 0.000016 2014 5 13 56790 0.097759 0.447045 -0.2631202 0.0012409 0.000005 0.000001 0.000048 0.000057 0.0000053 0.0000090 0.000068 0.000052 2014 5 14 56791 0.099823 0.447537 -0.2642922 0.0011385 0.000212 -0.000125 0.000052 0.000055 0.0000048 0.0000093 0.000037 0.000016 2014 5 15 56792 0.101336 0.447890 -0.2654011 0.0010596 0.000199 -0.000135 0.000064 0.000062 0.0000065 0.0000101 0.000038 0.000016 2014 5 16 56793 0.102754 0.448019 -0.2664293 0.0010081 0.000189 -0.000145 0.000060 0.000062 0.0000043 0.0000097 0.000038 0.000016 2014 5 17 56794 0.103945 0.448045 -0.2674262 0.0010066 0.000182 -0.000155 0.000053 0.000058 0.0000062 0.0000091 0.000038 0.000016 2014 5 18 56795 0.104918 0.447989 -0.2684641 0.0010694 0.000178 -0.000166 0.000052 0.000057 0.0000082 0.0000093 0.000039 0.000016 2014 5 19 56796 0.105841 0.447812 -0.2696075 0.0012001 0.000192 -0.000189 0.000053 0.000058 0.0000069 0.0000099 0.000039 0.000016 2014 5 20 56797 0.107248 0.447607 -0.2708827 0.0013548 0.000180 -0.000172 0.000049 0.000051 0.0000054 0.0000099 0.000041 0.000018 2014 5 21 56798 0.108980 0.447694 -0.2722910 0.0014502 0.000202 -0.000165 0.000049 0.000050 0.0000088 0.0000099 0.000045 0.000021 2014 5 22 56799 0.110853 0.448038 -0.2737805 0.0014633 0.000209 -0.000144 0.000056 0.000058 0.0000080 0.0000105 0.000049 0.000024 2014 5 23 56800 0.112172 0.448263 -0.2752375 0.0014086 0.000213 -0.000121 0.000055 0.000061 0.0000094 0.0000106 0.000053 0.000028 2014 5 24 56801 0.113669 0.448048 -0.2766382 0.0013575 0.000005 0.000001 0.000054 0.000066 0.0000109 0.0000106 0.000087 0.000072 2014 5 25 56802 0.115160 0.447700 -0.2779007 0.0011867 0.000005 0.000001 0.000047 0.000054 0.0000091 0.0000102 0.000099 0.000088 2014 5 26 56803 0.116710 0.446966 -0.2790132 0.0010368 0.000005 0.000001 0.000043 0.000046 0.0000079 0.0000097 0.000098 0.000088 2014 5 27 56804 0.118078 0.446334 -0.2799330 0.0008506 0.000005 0.000001 0.000047 0.000052 0.0000074 0.0000096 0.000098 0.000088 2014 5 28 56805 0.120155 0.445401 -0.2807038 0.0006872 0.000332 -0.000116 0.000055 0.000056 0.0000071 0.0000101 0.000064 0.000031 2014 5 29 56806 0.122767 0.444962 -0.2813650 0.0005649 0.000373 -0.000130 0.000059 0.000058 0.0000081 0.0000106 0.000066 0.000031 2014 5 30 56807 0.125428 0.444159 -0.2818336 0.0004223 0.000418 -0.000148 0.000055 0.000053 0.0000068 0.0000102 0.000068 0.000032 2014 5 31 56808 0.127751 0.443535 -0.2822270 0.0003843 0.000006 0.000001 0.000051 0.000046 0.0000111 0.0000101 0.000090 0.000071 2014 6 1 56809 0.129382 0.442901 -0.2826153 0.0003849 0.000005 0.000001 0.000047 0.000041 0.0000105 0.0000101 0.000098 0.000085 2014 6 2 56810 0.130672 0.441904 -0.2830498 0.0004223 0.000005 0.000001 0.000046 0.000046 0.0000105 0.0000098 0.000097 0.000087 2014 6 3 56811 0.131670 0.440946 -0.2834950 0.0004593 0.000005 0.000001 0.000048 0.000055 0.0000101 0.0000098 0.000097 0.000087 2014 6 4 56812 0.133002 0.439682 -0.2839822 0.0005677 0.000005 0.000001 0.000049 0.000052 0.0000102 0.0000097 0.000083 0.000071 2014 6 5 56813 0.134479 0.438899 -0.2845849 0.0006133 0.000005 0.000001 0.000056 0.000052 0.0000097 0.0000097 0.000097 0.000085 2014 6 6 56814 0.136334 0.437847 -0.2852332 0.0006729 0.000005 0.000001 0.000055 0.000055 0.0000087 0.0000096 0.000097 0.000085 2014 6 7 56815 0.138475 0.437411 -0.2859436 0.0007130 0.000005 0.000001 0.000055 0.000057 0.0000082 0.0000100 0.000097 0.000085 2014 6 8 56816 0.140267 0.436583 -0.2866815 0.0007447 0.000005 0.000001 0.000060 0.000061 0.0000094 0.0000102 0.000097 0.000085 2014 6 9 56817 0.142193 0.435883 -0.2874153 0.0007165 0.000005 0.000001 0.000054 0.000053 0.0000122 0.0000096 0.000096 0.000084 2014 6 10 56818 0.143900 0.435273 -0.2880883 0.0006780 0.000005 0.000001 0.000045 0.000045 0.0000106 0.0000096 0.000096 0.000084 2014 6 11 56819 0.145742 0.434729 -0.2887605 0.0006599 0.000180 -0.000179 0.000045 0.000045 0.0000063 0.0000095 0.000038 0.000042 2014 6 12 56820 0.147475 0.434263 -0.2893970 0.0006322 0.000005 0.000001 0.000048 0.000046 0.0000064 0.0000095 0.000082 0.000085 2014 6 13 56821 0.149117 0.433486 -0.2900595 0.0006226 0.000006 0.000001 0.000049 0.000045 0.0000056 0.0000099 0.000094 0.000097 2014 6 14 56822 0.150723 0.432699 -0.2906988 0.0006710 0.000006 0.000001 0.000054 0.000050 0.0000100 0.0000099 0.000094 0.000097 2014 6 15 56823 0.152515 0.431573 -0.2914264 0.0007739 0.000005 0.000001 0.000064 0.000070 0.0000104 0.0000153 0.000094 0.000097 2014 6 16 56824 0.154208 0.430685 -0.2922607 0.0008929 0.000006 0.000001 0.000046 0.000056 0.0000085 0.0000101 0.000097 0.000085 2014 6 17 56825 0.155920 0.430008 -0.2932405 0.0010466 0.000006 0.000001 0.000049 0.000058 0.0000067 0.0000099 0.000097 0.000085 2014 6 18 56826 0.157288 0.429487 -0.2943619 0.0011381 0.000095 -0.000091 0.000057 0.000057 0.0000068 0.0000100 0.000045 0.000019 2014 6 19 56827 0.158508 0.428886 -0.2955058 0.0011686 0.000006 0.000002 0.000058 0.000056 0.0000079 0.0000100 0.000086 0.000070 2014 6 20 56828 0.159865 0.428145 -0.2966766 0.0011275 0.000006 0.000002 0.000052 0.000057 0.0000153 0.0000099 0.000097 0.000083 2014 6 21 56829 0.160944 0.427272 -0.2977464 0.0009917 0.000006 0.000001 0.000051 0.000062 0.0000075 0.0000096 0.000097 0.000083 2014 6 22 56830 0.161869 0.426250 -0.2986589 0.0008190 0.000006 0.000002 0.000053 0.000061 0.0000098 0.0000095 0.000097 0.000083 2014 6 23 56831 0.163248 0.425126 -0.2994144 0.0006490 0.000006 0.000001 0.000047 0.000046 0.0000083 0.0000089 0.000097 0.000084 2014 6 24 56832 0.164735 0.423900 -0.2999730 0.0004955 0.000006 0.000001 0.000046 0.000049 0.0000068 0.0000082 0.000097 0.000084 2014 6 25 56833 0.166018 0.422594 -0.3003881 0.0003608 0.000139 -0.000190 0.000047 0.000055 0.0000054 0.0000085 0.000025 0.000033 2014 6 26 56834 0.166820 0.421456 -0.3007136 0.0002264 0.000142 -0.000200 0.000046 0.000052 0.0000075 0.0000092 0.000025 0.000033 2014 6 27 56835 0.167441 0.420226 -0.3008724 0.0001335 0.000145 -0.000210 0.000045 0.000054 0.0000071 0.0000096 0.000025 0.000033 2014 6 28 56836 0.168132 0.419090 -0.3010209 0.0001572 0.000148 -0.000220 0.000045 0.000054 0.0000071 0.0000096 0.000024 0.000032 2014 6 29 56837 0.168884 0.417834 -0.3012590 0.0002378 0.000152 -0.000229 0.000046 0.000049 0.0000122 0.0000096 0.000024 0.000032 2014 6 30 56838 0.169659 0.416477 -0.3015202 0.0003181 0.000235 -0.000362 0.000046 0.000039 0.0000099 0.0000097 0.000023 0.000031 2014 7 1 56839 0.170584 0.414989 -0.3018256 0.0003530 0.000221 -0.000347 0.000047 0.000037 0.0000065 0.0000097 0.000023 0.000030 2014 7 2 56840 0.171897 0.413791 -0.3022262 0.0004064 0.000203 -0.000318 0.000050 0.000048 0.0000091 0.0000098 0.000023 0.000032 2014 7 3 56841 0.173223 0.412770 -0.3026986 0.0004903 0.000171 -0.000272 0.000049 0.000055 0.0000049 0.0000102 0.000022 0.000031 2014 7 4 56842 0.174571 0.411718 -0.3032319 0.0005509 0.000145 -0.000247 0.000048 0.000055 0.0000097 0.0000106 0.000022 0.000031 2014 7 5 56843 0.175531 0.410939 -0.3037737 0.0005212 0.000124 -0.000234 0.000047 0.000055 0.0000136 0.0000102 0.000022 0.000030 2014 7 6 56844 0.176357 0.409851 -0.3042749 0.0004462 0.000108 -0.000226 0.000048 0.000054 0.0000143 0.0000102 0.000022 0.000029 2014 7 7 56845 0.177000 0.408770 -0.3047022 0.0003692 0.000097 -0.000245 0.000046 0.000054 0.0000130 0.0000101 0.000022 0.000028 2014 7 8 56846 0.177602 0.407704 -0.3050522 0.0003207 0.000093 -0.000245 0.000043 0.000051 0.0000036 0.0000102 0.000023 0.000029 2014 7 9 56847 0.178395 0.406780 -0.3053516 0.0002802 0.000119 -0.000230 0.000043 0.000050 0.0000088 0.0000104 0.000027 0.000034 2014 7 10 56848 0.179056 0.405874 -0.3056398 0.0002773 0.000153 -0.000213 0.000043 0.000047 0.0000084 0.0000102 0.000033 0.000039 2014 7 11 56849 0.180057 0.404783 -0.3059670 0.0003448 0.000189 -0.000199 0.000044 0.000046 0.0000032 0.0000103 0.000037 0.000045 2014 7 12 56850 0.181119 0.403702 -0.3063817 0.0004355 0.000195 -0.000203 0.000043 0.000047 0.0000086 0.0000099 0.000037 0.000046 2014 7 13 56851 0.182012 0.402757 -0.3069373 0.0006108 0.000187 -0.000214 0.000043 0.000042 0.0000108 0.0000099 0.000036 0.000045 2014 7 14 56852 0.182718 0.401707 -0.3076573 0.0007967 0.000175 -0.000226 0.000044 0.000038 0.0000127 0.0000105 0.000034 0.000044 2014 7 15 56853 0.183180 0.400689 -0.3085126 0.0008907 0.000160 -0.000236 0.000044 0.000040 0.0000038 0.0000101 0.000032 0.000043 2014 7 16 56854 0.183580 0.399238 -0.3094304 0.0009331 0.000158 -0.000217 0.000045 0.000048 0.0000105 0.0000104 0.000023 0.000033 2014 7 17 56855 0.184079 0.397872 -0.3103323 0.0008697 0.000158 -0.000190 0.000045 0.000051 0.0000137 0.0000108 0.000023 0.000034 2014 7 18 56856 0.184391 0.396246 -0.3111578 0.0007346 0.000159 -0.000165 0.000048 0.000054 0.0000049 0.0000106 0.000024 0.000034 2014 7 19 56857 0.185390 0.394567 -0.3118721 0.0006134 0.000147 -0.000169 0.000048 0.000055 0.0000062 0.0000107 0.000022 0.000031 2014 7 20 56858 0.186474 0.393185 -0.3124308 0.0004603 0.000132 -0.000187 0.000045 0.000054 0.0000105 0.0000104 0.000019 0.000027 2014 7 21 56859 0.187769 0.391873 -0.3128070 0.0002960 0.000122 -0.000207 0.000043 0.000053 0.0000088 0.0000099 0.000016 0.000023 2014 7 22 56860 0.188753 0.391086 -0.3130140 0.0001491 0.000115 -0.000226 0.000043 0.000050 0.0000022 0.0000104 0.000013 0.000019 2014 7 23 56861 0.189334 0.390032 -0.3131058 0.0000607 0.000139 -0.000245 0.000044 0.000049 0.0000068 0.0000103 0.000019 0.000029 2014 7 24 56862 0.189640 0.389271 -0.3131380 0.0000216 0.000170 -0.000261 0.000044 0.000049 0.0000098 0.0000103 0.000029 0.000043 2014 7 25 56863 0.190008 0.388135 -0.3131560 0.0000270 0.000199 -0.000275 0.000048 0.000050 0.0000056 0.0000104 0.000039 0.000057 2014 7 26 56864 0.190391 0.387076 -0.3131850 0.0000236 0.000203 -0.000266 0.000049 0.000055 0.0000065 0.0000104 0.000037 0.000055 2014 7 27 56865 0.190974 0.385960 -0.3132612 0.0000772 0.000193 -0.000248 0.000052 0.000058 0.0000075 0.0000108 0.000032 0.000047 2014 7 28 56866 0.191997 0.384965 -0.3134196 0.0001990 0.000175 -0.000230 0.000055 0.000058 0.0000085 0.0000110 0.000027 0.000039 2014 7 29 56867 0.193138 0.383991 -0.3136734 0.0003114 0.000150 -0.000214 0.000051 0.000058 0.0000024 0.0000112 0.000021 0.000031 2014 7 30 56868 0.194141 0.382918 -0.3140315 0.0004025 0.000100 -0.000209 0.000052 0.000058 0.0000063 0.0000112 0.000033 0.000042 2014 7 31 56869 0.194699 0.381742 -0.3144677 0.0004273 0.000043 -0.000210 0.000052 0.000053 0.0000080 0.0000111 0.000050 0.000058 2014 8 1 56870 0.195488 0.380228 -0.3149194 0.0004133 -0.000012 -0.000215 0.000052 0.000060 0.0000047 0.0000106 0.000066 0.000074 2014 8 2 56871 0.196059 0.379053 -0.3153221 0.0003478 -0.000026 -0.000244 0.000050 0.000064 0.0000091 0.0000106 0.000094 0.000120 2014 8 3 56872 0.196656 0.377635 -0.3156532 0.0002844 -0.000020 -0.000282 0.000050 0.000057 0.0000122 0.0000105 0.000125 0.000176 2014 8 4 56873 0.197587 0.376138 -0.3159237 0.0002234 -0.000008 -0.000314 0.000032 0.000051 0.0000120 0.0000101 0.000157 0.000232 2014 8 5 56874 0.198589 0.374538 -0.3161087 0.0001660 0.000009 -0.000340 0.000028 0.000052 0.0000058 0.0000102 0.000189 0.000288 2014 8 6 56875 0.199846 0.373215 -0.3162337 0.0000981 0.000012 -0.000319 0.000040 0.000054 0.0000101 0.0000106 0.000159 0.000244 2014 8 7 56876 0.201159 0.372190 -0.3162889 0.0000444 0.000008 -0.000285 0.000044 0.000053 0.0000124 0.0000109 0.000117 0.000170 2014 8 8 56877 0.202153 0.371221 -0.3164059 0.0001436 0.000004 -0.000244 0.000052 0.000053 0.0000052 0.0000103 0.000074 0.000097 2014 8 9 56878 0.203137 0.370129 -0.3166604 0.0003298 0.000002 -0.000206 0.000053 0.000051 0.0000155 0.0000098 0.000299 0.000414 2014 8 10 56879 0.204271 0.369117 -0.3170662 0.0004803 -0.000002 -0.000167 0.000049 0.000052 0.0000096 0.0000099 0.000621 0.000876 2014 8 11 56880 0.205468 0.368306 -0.3176599 0.0006307 -0.000047 -0.000138 0.000043 0.000052 0.0000081 0.0000097 0.000992 0.001355 2014 8 12 56881 0.206550 0.367611 -0.3183990 0.0007513 -0.000065 -0.000107 0.000046 0.000045 0.0000203 0.0000093 0.001331 0.001822 2014 8 13 56882 0.207368 0.366875 -0.3192062 0.0008270 -0.000084 -0.000095 0.000045 0.000042 0.0000110 0.0000092 0.001038 0.001446 2014 8 14 56883 0.207974 0.366035 -0.3200319 0.0008146 -0.000093 -0.000103 0.000042 0.000045 0.0000084 0.0000093 0.000603 0.000837 2014 8 15 56884 0.208833 0.364879 -0.3207940 0.0006881 -0.000096 -0.000121 0.000038 0.000045 0.0000045 0.0000095 0.000167 0.000229 2014 8 16 56885 0.209661 0.363515 -0.3214326 0.0005603 -0.000074 -0.000160 0.000037 0.000047 0.0000088 0.0000099 0.000043 0.000056 2014 8 17 56886 0.210175 0.362120 -0.3219427 0.0004528 -0.000040 -0.000207 0.000039 0.000050 0.0000068 0.0000099 0.000034 0.000044 2014 8 18 56887 0.210355 0.360764 -0.3223478 0.0003616 -0.000004 -0.000253 0.000043 0.000050 0.0000052 0.0000104 0.000024 0.000032 2014 8 19 56888 0.210028 0.359301 -0.3226678 0.0002524 0.000032 -0.000293 0.000044 0.000050 0.0000014 0.0000106 0.000015 0.000021 2014 8 20 56889 0.209735 0.357770 -0.3228885 0.0001935 0.000032 -0.000272 0.000044 0.000043 0.0000064 0.0000091 0.000023 0.000035 2014 8 21 56890 0.209563 0.356134 -0.3230546 0.0001592 0.000017 -0.000229 0.000044 0.000040 0.0000131 0.0000087 0.000035 0.000056 2014 8 22 56891 0.209708 0.354414 -0.3232201 0.0001612 -0.000001 -0.000178 0.000041 0.000040 0.0000077 0.0000095 0.000048 0.000078 2014 8 23 56892 0.209551 0.352545 -0.3234237 0.0002217 0.000002 -0.000161 0.000040 0.000038 0.0000074 0.0000102 0.000044 0.000071 2014 8 24 56893 0.209543 0.350682 -0.3236530 0.0002419 0.000006 -0.000147 0.000044 0.000046 0.0000104 0.0000108 0.000035 0.000055 2014 8 25 56894 0.209475 0.348842 -0.3239004 0.0002416 0.000015 -0.000140 0.000045 0.000049 0.0000080 0.0000101 0.000025 0.000039 2014 8 26 56895 0.209267 0.346963 -0.3242013 0.0003364 0.000023 -0.000138 0.000045 0.000055 0.0000019 0.0000105 0.000016 0.000023 2014 8 27 56896 0.209107 0.344999 -0.3245978 0.0004450 0.000043 -0.000110 0.000045 0.000056 0.0000091 0.0000106 0.000032 0.000048 2014 8 28 56897 0.208963 0.342830 -0.3250736 0.0004697 0.000063 -0.000082 0.000045 0.000047 0.0000061 0.0000105 0.000056 0.000085 2014 8 29 56898 0.209048 0.340905 -0.3255686 0.0004805 0.000079 -0.000068 0.000093 0.000037 0.0000031 0.0000102 0.000080 0.000122 2014 8 30 56899 0.209434 0.339465 -0.3260477 0.0004905 0.000079 -0.000093 0.000141 0.000040 0.0000068 0.0000100 0.000075 0.000115 2014 8 31 56900 0.209548 0.338221 -0.3265573 0.0004982 0.000069 -0.000137 0.000092 0.000049 0.0000066 0.0000106 0.000059 0.000091 2014 9 1 56901 0.209607 0.336852 -0.3270923 0.0005358 0.000054 -0.000184 0.000045 0.000049 0.0000071 0.0000105 0.000048 0.000067 2014 9 2 56902 0.209660 0.335219 -0.3276247 0.0005220 0.000034 -0.000240 0.000045 0.000046 0.0000081 0.0000101 0.000031 0.000043 2014 9 3 56903 0.209254 0.333379 -0.3281455 0.0005160 0.000011 -0.000293 0.000046 0.000050 0.0000025 0.0000098 0.000014 0.000019 2014 9 4 56904 0.209037 0.331518 -0.3286822 0.0005560 -0.000023 -0.000355 0.000050 0.000053 0.0000089 0.0000108 0.000021 0.000030 2014 9 5 56905 0.209082 0.329809 -0.3292906 0.0006680 -0.000059 -0.000410 0.000054 0.000053 0.0000053 0.0000111 0.000036 0.000050 2014 9 6 56906 0.209238 0.328265 -0.3300434 0.0008406 -0.000078 -0.000440 0.000050 0.000050 0.0000118 0.0000107 0.000037 0.000054 2014 9 7 56907 0.209075 0.326903 -0.3309869 0.0010189 -0.000089 -0.000448 0.000050 0.000050 0.0000100 0.0000107 0.000034 0.000051 2014 9 8 56908 0.208594 0.325623 -0.3321229 0.0011916 -0.000076 -0.000421 0.000051 0.000050 0.0000101 0.0000105 0.000029 0.000048 2014 9 9 56909 0.207951 0.324033 -0.3333963 0.0013135 -0.000087 -0.000403 0.000047 0.000050 0.0000035 0.0000110 0.000026 0.000045 2014 9 10 56910 0.207098 0.322101 -0.3346955 0.0012470 -0.000194 -0.000425 0.000050 0.000052 0.0000057 0.0000113 0.000026 0.000045 2014 9 11 56911 0.205714 0.319840 -0.3358990 0.0011095 -0.000318 -0.000445 0.000054 0.000052 0.0000080 0.0000106 0.000027 0.000045 2014 9 12 56912 0.204830 0.317418 -0.3369328 0.0009286 -0.000427 -0.000456 0.000054 0.000051 0.0000031 0.0000110 0.000029 0.000044 2014 9 13 56913 0.203746 0.315472 -0.3377885 0.0007454 -0.000426 -0.000412 0.000050 0.000048 0.0000097 0.0000113 0.000031 0.000044 2014 9 14 56914 0.203351 0.313633 -0.3384975 0.0006390 -0.000371 -0.000343 0.000047 0.000039 0.0000123 0.0000111 0.000032 0.000042 2014 9 15 56915 0.203062 0.312329 -0.3391027 0.0005878 -0.000294 -0.000265 0.000046 0.000040 0.0000107 0.0000100 0.000035 0.000044 2014 9 16 56916 0.202703 0.310813 -0.3396742 0.0005895 -0.000207 -0.000192 0.000048 0.000049 0.0000033 0.0000104 0.000036 0.000043 2014 9 17 56917 0.201975 0.309541 -0.3402700 0.0006144 -0.000129 -0.000175 0.000049 0.000047 0.0000096 0.0000104 0.000059 0.000086 2014 9 18 56918 0.201157 0.308055 -0.3409300 0.0006713 -0.000056 -0.000175 0.000043 0.000043 0.0000067 0.0000098 0.000088 0.000142 2014 9 19 56919 0.200493 0.306730 -0.3416089 0.0007017 0.000010 -0.000178 0.000047 0.000043 0.0000033 0.0000096 0.000117 0.000198 2014 9 20 56920 0.199681 0.304945 -0.3423237 0.0007115 0.000012 -0.000179 0.000048 0.000048 0.0000170 0.0000097 0.000107 0.000180 2014 9 21 56921 0.198904 0.303294 -0.3430803 0.0007730 -0.000016 -0.000178 0.000095 0.000097 0.0000081 0.0000126 0.000082 0.000135 2014 9 22 56922 0.198190 0.301444 -0.3439067 0.0008664 -0.000051 -0.000184 0.000054 0.000042 0.0000050 0.0000109 0.000054 0.000087 2014 9 23 56923 0.197758 0.299623 -0.3448263 0.0009065 -0.000093 -0.000182 0.000054 0.000045 0.0000014 0.0000105 0.000027 0.000039 2014 9 24 56924 0.196669 0.297934 -0.3457492 0.0009076 -0.000114 -0.000175 0.000049 0.000048 0.0000075 0.0000104 0.000031 0.000035 2014 9 25 56925 0.196285 0.296429 -0.3466943 0.0009157 -0.000128 -0.000164 0.000049 0.000044 0.0000093 0.0000107 0.000040 0.000035 2014 9 26 56926 0.195452 0.295342 -0.3475866 0.0008377 -0.000138 -0.000149 0.000051 0.000045 0.0000142 0.0000108 0.000049 0.000036 2014 9 27 56927 0.194323 0.294143 -0.3483859 0.0007754 -0.000142 -0.000132 0.000051 0.000047 0.0000198 0.0000105 0.000058 0.000036 2014 9 28 56928 0.193133 0.293124 -0.3491545 0.0007088 -0.000139 -0.000113 0.000051 0.000048 0.0000097 0.0000102 0.000067 0.000037 2014 9 29 56929 0.192130 0.291847 -0.3498679 0.0006806 -0.000128 -0.000094 0.000051 0.000048 0.0000089 0.0000109 0.000076 0.000037 2014 9 30 56930 0.190874 0.290408 -0.3505605 0.0006997 -0.000113 -0.000074 0.000047 0.000045 0.0000059 0.0000110 0.000085 0.000037 2014 10 1 56931 0.189318 0.288872 -0.3513037 0.0007266 -0.000112 -0.000090 0.000044 0.000045 0.0000166 0.0000112 0.000081 0.000040 2014 10 2 56932 0.187956 0.287386 -0.3520541 0.0008158 -0.000115 -0.000116 0.000044 0.000045 0.0000082 0.0000113 0.000074 0.000043 2014 10 3 56933 0.186389 0.286356 -0.3529071 0.0009631 -0.000121 -0.000146 0.000047 0.000044 0.0000103 0.0000117 0.000067 0.000046 2014 10 4 56934 0.184585 0.285100 -0.3540090 0.0011566 -0.000130 -0.000180 0.000046 0.000047 0.0000068 0.0000120 0.000060 0.000048 2014 10 5 56935 0.182947 0.283920 -0.3553203 0.0013443 -0.000144 -0.000217 0.000117 0.000120 0.0000075 0.0000147 0.000053 0.000051 2014 10 6 56936 0.180779 0.282637 -0.3567873 0.0014802 -0.000161 -0.000256 0.000166 0.000156 0.0000072 0.0000178 0.000046 0.000054 2014 10 7 56937 0.178546 0.281129 -0.3583098 0.0015691 -0.000181 -0.000296 0.000152 0.000093 0.0000023 0.0000183 0.000039 0.000057 2014 10 8 56938 0.176423 0.279499 -0.3599090 0.0015736 0.000006 0.000001 0.000156 0.000093 0.0000062 0.0000211 0.000084 0.000082 2014 10 9 56939 0.174485 0.277995 -0.3614646 0.0014499 0.000006 0.000001 0.000155 0.000127 0.0000104 0.0000255 0.000096 0.000088 2014 10 10 56940 0.172103 0.276889 -0.3628205 0.0012442 0.000006 0.000001 0.000121 0.000133 0.0000089 0.0000251 0.000096 0.000088 2014 10 11 56941 0.169489 0.275710 -0.3639987 0.0011122 0.000006 0.000001 0.000065 0.000153 0.0000142 0.0000185 0.000096 0.000088 2014 10 12 56942 0.167093 0.274277 -0.3650981 0.0010341 0.000006 0.000001 0.000078 0.000143 0.0000077 0.0000230 0.000096 0.000088 2014 10 13 56943 0.164890 0.272948 -0.3660845 0.0009275 -0.000255 -0.000206 0.000040 0.000045 0.0000077 0.0000111 0.000090 0.000054 2014 10 14 56944 0.163203 0.271598 -0.3670167 0.0008701 -0.000280 -0.000207 0.000037 0.000045 0.0000075 0.0000109 0.000099 0.000053 2014 10 15 56945 0.161813 0.270633 -0.3679266 0.0009070 -0.000230 -0.000181 0.000038 0.000042 0.0000262 0.0000104 0.000046 0.000068 2014 10 16 56946 0.160357 0.269562 -0.3688523 0.0009337 -0.000254 -0.000169 0.000041 0.000039 0.0000105 0.0000100 0.000040 0.000059 2014 10 17 56947 0.158884 0.268422 -0.3698265 0.0009569 -0.000264 -0.000149 0.000041 0.000040 0.0000127 0.0000102 0.000034 0.000050 2014 10 18 56948 0.157651 0.267426 -0.3707948 0.0010416 -0.000259 -0.000123 0.000042 0.000047 0.0000085 0.0000103 0.000028 0.000041 2014 10 19 56949 0.156177 0.266392 -0.3718466 0.0011161 -0.000242 -0.000094 0.000043 0.000051 0.0000052 0.0000105 0.000022 0.000032 2014 10 20 56950 0.154958 0.265161 -0.3730119 0.0011923 -0.000200 -0.000064 0.000041 0.000050 0.0000051 0.0000108 0.000017 0.000027 2014 10 21 56951 0.153574 0.264153 -0.3742853 0.0012885 -0.000180 -0.000036 0.000040 0.000048 0.0000013 0.0000104 0.000010 0.000017 2014 10 22 56952 0.152558 0.263215 -0.3756440 0.0013639 -0.000193 -0.000039 0.000040 0.000043 0.0000130 0.0000099 0.000015 0.000024 2014 10 23 56953 0.151228 0.262577 -0.3770165 0.0013355 -0.000214 -0.000052 0.000041 0.000043 0.0000087 0.0000105 0.000022 0.000036 2014 10 24 56954 0.149374 0.261563 -0.3783068 0.0012539 -0.000234 -0.000069 0.000042 0.000040 0.0000094 0.0000109 0.000029 0.000047 2014 10 25 56955 0.147315 0.260313 -0.3794935 0.0011371 -0.000249 -0.000087 0.000041 0.000042 0.0000154 0.0000108 0.000037 0.000058 2014 10 26 56956 0.144800 0.259081 -0.3805876 0.0010363 -0.000257 -0.000103 0.000041 0.000049 0.0000343 0.0000107 0.000044 0.000070 2014 10 27 56957 0.142599 0.257845 -0.3816146 0.0009852 -0.000257 -0.000140 0.000092 0.000040 0.0000168 0.0000106 0.000068 0.000110 2014 10 28 56958 0.140679 0.257127 -0.3825948 0.0009811 -0.000253 -0.000132 0.000160 0.000043 0.0000025 0.0000106 0.000064 0.000098 2014 10 29 56959 0.138887 0.256743 -0.3836041 0.0010379 -0.000248 -0.000132 0.000054 0.000051 0.0000067 0.0000111 0.000055 0.000084 2014 10 30 56960 0.137040 0.256321 -0.3846753 0.0011158 -0.000245 -0.000130 0.000052 0.000045 0.0000117 0.0000110 0.000051 0.000076 2014 10 31 56961 0.134912 0.256031 -0.3858180 0.0011950 -0.000238 -0.000123 0.000053 0.000048 0.0000147 0.0000107 0.000046 0.000068 2014 11 1 56962 0.132543 0.255442 -0.3871212 0.0013869 -0.000226 -0.000113 0.000051 0.000050 0.0000091 0.0000093 0.000041 0.000060 2014 11 2 56963 0.130232 0.254603 -0.3886438 0.0016138 -0.000210 -0.000100 0.000052 0.000049 0.0000048 0.0000093 0.000037 0.000053 2014 11 3 56964 0.128111 0.253639 -0.3903200 0.0016976 -0.000164 -0.000106 0.000054 0.000054 0.0000065 0.0000118 0.000031 0.000043 2014 11 4 56965 0.126579 0.253032 -0.3920232 0.0016614 -0.000167 -0.000073 0.000054 0.000055 0.0000020 0.0000115 0.000028 0.000037 2014 11 5 56966 0.125141 0.253027 -0.3936596 0.0015815 -0.000159 -0.000058 0.000051 0.000046 0.0000061 0.0000104 0.000036 0.000038 2014 11 6 56967 0.123815 0.253026 -0.3951745 0.0014250 -0.000152 -0.000049 0.000048 0.000042 0.0000104 0.0000104 0.000047 0.000040 2014 11 7 56968 0.122208 0.252696 -0.3965413 0.0012620 -0.000152 -0.000043 0.000045 0.000040 0.0000069 0.0000102 0.000057 0.000041 2014 11 8 56969 0.120656 0.252119 -0.3977463 0.0011065 -0.000160 -0.000042 0.000047 0.000043 0.0000071 0.0000100 0.000068 0.000043 2014 11 9 56970 0.118629 0.251863 -0.3987699 0.0009636 -0.000174 -0.000044 0.000047 0.000051 0.0000085 0.0000103 0.000078 0.000045 2014 11 10 56971 0.116099 0.251414 -0.3996746 0.0008574 -0.000161 -0.000002 0.000046 0.000053 0.0000086 0.0000102 0.000051 0.000050 2014 11 11 56972 0.113500 0.251104 -0.4005178 0.0008228 -0.000151 -0.000007 0.000050 0.000051 0.0000024 0.0000099 0.000041 0.000054 2014 11 12 56973 0.111312 0.251020 -0.4013658 0.0008665 -0.000162 -0.000024 0.000048 0.000043 0.0000046 0.0000100 0.000039 0.000054 2014 11 13 56974 0.110003 0.251216 -0.4022707 0.0009353 -0.000177 -0.000044 0.000048 0.000042 0.0000055 0.0000097 0.000038 0.000052 2014 11 14 56975 0.108964 0.251454 -0.4032264 0.0009816 -0.000186 -0.000065 0.000049 0.000045 0.0000037 0.0000100 0.000037 0.000050 2014 11 15 56976 0.107343 0.251845 -0.4042241 0.0010274 -0.000188 -0.000083 0.000045 0.000045 0.0000062 0.0000097 0.000036 0.000048 2014 11 16 56977 0.105169 0.252103 -0.4052751 0.0010661 -0.000184 -0.000098 0.000048 0.000045 0.0000058 0.0000095 0.000035 0.000046 2014 11 17 56978 0.103098 0.252264 -0.4064355 0.0011845 -0.000152 -0.000102 0.000048 0.000044 0.0000044 0.0000100 0.000035 0.000044 2014 11 18 56979 0.101176 0.252904 -0.4076894 0.0012749 -0.000153 -0.000110 0.000045 0.000045 0.0000016 0.0000095 0.000035 0.000042 2014 11 19 56980 0.098823 0.253529 -0.4089491 0.0012414 -0.000169 -0.000115 0.000044 0.000045 0.0000065 0.0000093 0.000044 0.000057 2014 11 20 56981 0.096626 0.253739 -0.4101760 0.0011773 -0.000188 -0.000116 0.000042 0.000043 0.0000082 0.0000097 0.000058 0.000076 2014 11 21 56982 0.094796 0.254068 -0.4113379 0.0011179 -0.000202 -0.000111 0.000039 0.000039 0.0000072 0.0000099 0.000071 0.000094 2014 11 22 56983 0.093033 0.254309 -0.4124443 0.0010844 -0.000210 -0.000102 0.000041 0.000041 0.0000066 0.0000102 0.000085 0.000113 2014 11 23 56984 0.091069 0.254329 -0.4135151 0.0010236 -0.000210 -0.000090 0.000041 0.000041 0.0000080 0.0000102 0.000098 0.000132 2014 11 24 56985 0.089517 0.254009 -0.4145452 0.0009802 -0.000188 -0.000085 0.000038 0.000041 0.0000068 0.0000094 0.000111 0.000152 2014 11 25 56986 0.088570 0.253867 -0.4155369 0.0009914 -0.000187 -0.000063 0.000038 0.000041 0.0000023 0.0000095 0.000124 0.000171 2014 11 26 56987 0.087552 0.254012 -0.4165109 0.0009976 -0.000183 -0.000036 0.000041 0.000041 0.0000047 0.0000098 0.000120 0.000161 2014 11 27 56988 0.086952 0.254412 -0.4175503 0.0010687 -0.000178 -0.000006 0.000041 0.000041 0.0000117 0.0000099 0.000112 0.000140 2014 11 28 56989 0.086367 0.255252 -0.4187293 0.0012598 -0.000175 0.000026 0.000037 0.000037 0.0000138 0.0000094 0.000104 0.000120 2014 11 29 56990 0.085070 0.256037 -0.4200746 0.0014142 -0.000175 0.000058 0.000032 0.000033 0.0000103 0.0000093 0.000097 0.000100 2014 11 30 56991 0.083120 0.256681 -0.4215228 0.0014855 -0.000177 0.000089 0.000032 0.000033 0.0000085 0.0000097 0.000089 0.000079 2014 12 1 56992 0.080978 0.257672 -0.4230186 0.0014738 -0.000181 0.000114 0.000040 0.000042 0.0000066 0.0000092 0.000081 0.000059 2014 12 2 56993 0.078981 0.258716 -0.4244887 0.0014182 -0.000189 0.000140 0.000044 0.000045 0.0000055 0.0000088 0.000073 0.000038 2014 12 3 56994 0.076898 0.259439 -0.4258803 0.0013632 -0.000208 0.000163 0.000041 0.000040 0.0000071 0.0000094 0.000074 0.000035 2014 12 4 56995 0.074791 0.259882 -0.4272193 0.0012881 -0.000228 0.000181 0.000037 0.000037 0.0000105 0.0000086 0.000078 0.000036 2014 12 5 56996 0.073083 0.260106 -0.4284417 0.0011536 -0.000242 0.000190 0.000037 0.000035 0.0000115 0.0000081 0.000081 0.000037 2014 12 6 56997 0.072034 0.260884 -0.4295356 0.0010319 -0.000249 0.000191 0.000034 0.000035 0.0000045 0.0000088 0.000084 0.000038 2014 12 7 56998 0.070757 0.261940 -0.4305244 0.0009414 -0.000246 0.000182 0.000034 0.000037 0.0000060 0.0000092 0.000088 0.000039 2014 12 8 56999 0.069469 0.262554 -0.4314891 0.0009521 -0.000267 0.000035 0.000037 0.000039 0.0000055 0.0000092 0.000105 0.000138 2014 12 9 57000 0.067567 0.263597 -0.4324693 0.0010019 -0.000256 0.000006 0.000033 0.000036 0.0000070 0.0000089 0.000118 0.000154 2014 12 10 57001 0.065145 0.264300 -0.4334848 0.0010511 -0.000233 -0.000030 0.000034 0.000036 0.0000035 0.0000088 0.000125 0.000167 2014 12 11 57002 0.062825 0.265096 -0.4345401 0.0011038 -0.000198 0.000007 0.000041 0.000039 0.0000098 0.0000088 0.000133 0.000168 2014 12 12 57003 0.060561 0.266065 -0.4357065 0.0011858 -0.000160 0.000063 0.000041 0.000039 0.0000055 0.0000083 0.000142 0.000164 2014 12 13 57004 0.058293 0.267322 -0.4369431 0.0012466 -0.000128 0.000123 0.000037 0.000040 0.0000068 0.0000083 0.000151 0.000159 2014 12 14 57005 0.055679 0.268340 -0.4381812 0.0012168 -0.000103 0.000190 0.000037 0.000040 0.0000064 0.0000089 0.000160 0.000155 2014 12 15 57006 0.052986 0.269413 -0.4393885 0.0012053 -0.000122 0.000214 0.000038 0.000037 0.0000084 0.0000093 0.000093 0.000161 2014 12 16 57007 0.050226 0.270617 -0.4406630 0.0012952 -0.000100 0.000248 0.000038 0.000033 0.0000036 0.0000094 0.000084 0.000159 2014 12 17 57008 0.047395 0.271695 -0.4419529 0.0012994 -0.000120 0.000242 0.000038 0.000036 0.0000136 0.0000093 0.000037 0.000069 astropy-1.1.1/astropy/utils/iers/data/ReadMe.eopc04_IAU20000000644001134200020070000000417212602615530024010 0ustar embrayscience00000000000000Table: eopc04_iau2000 ================================================================================ from http://hpiers.obspm.fr/iers/eop/eopc04/eopc04_IAU2000.62-now INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE EARTH ORIENTATION PARAMETERS EOP (IERS) 08 C04 ================================================================================ File Summary: -------------------------------------------------------------------------------- FileName Lrecl Records Explanations -------------------------------------------------------------------------------- ReadMe 80 . This file, made using header eopc04_IAU2000.62-now 155 18279 all EOP values since 01 January 1962 -------------------------------------------------------------------------------- ================================================================================ Byte-by-byte Description of file: * -------------------------------------------------------------------------------- Bytes Format Units Label Explanations -------------------------------------------------------------------------------- 1- 4 I4 --- year Calendar year 5- 8 I4 --- month Month 9- 12 I4 --- day day of month (0 hr UTC) 13- 19 I7 d MJD Modified Julian Date (MJD, 0 hr UTC) 20- 30 F11.6 arcsec PM_x polar motion x 31- 41 F11.6 arcsec PM_y polar motion y 42- 53 F12.7 s UT1_UTC Difference UT1-UTC 54- 65 F12.7 s LOD length of day 66- 76 F11.6 arcsec dX_2000A dX wrt IAU2000A Nutation 77- 87 F11.6 arcsec dY_2000A dY wrt IAU2000A Nutation 88- 98 F11.6 arcsec e_PM_x error in PM_x 99-109 F11.6 arcsec e_PM_y error in PM_y 110-120 F11.7 s e_UT1_UTC error in UT1_UTC 121-131 F11.7 s e_LOD error in length of day 132-143 F12.6 arcsec e_dX_2000A error in dX_2000A 144-155 F12.6 arcsec e_dY_2000A error in dY_2000A -------------------------------------------------------------------------------- astropy-1.1.1/astropy/utils/iers/data/ReadMe.finals2000A0000644001134200020070000000654512602615530023603 0ustar embrayscience00000000000000Table: finals2000A ================================================================================ from http://maia.usno.navy.mil/ finals2000A.all -- all EOP values since 02 January 1973 with dX & dY using IAU2000A Nutation/Precession Theory (with 1 year of predic tions) ================================================================================ File Summary: -------------------------------------------------------------------------------- FileName Lrecl Records Explanations -------------------------------------------------------------------------------- ReadMe 80 . This file, adapted from readme.finals2000A finals2000A.all 187 15182 all EOP values since 02 January 1973 -------------------------------------------------------------------------------- ================================================================================ Byte-by-byte Description of file: * -------------------------------------------------------------------------------- Bytes Format Units Label Explanations -------------------------------------------------------------------------------- 1- 2 I2 --- year To get true calendar year, add 1900 for MJD<=51543 or add 2000 for MJD>=51544) 3- 4 I2 --- month 5- 6 I2 --- day of month 8- 15 F8.2 d MJD fractional Modified Julian Date (MJD UTC) 17 A1 --- PolPMFlag_A IERS (I) or Prediction (P) flag for Bull. A polar motion values 19- 27 F9.6 arcsec PM_x_A Bull. A PM-x 28- 36 F9.6 arcsec e_PM_x_A error in PM-x (sec. of arc) 38- 46 F9.6 arcsec PM_y_A Bull. A PM-y (sec. of arc) 47- 55 F9.6 arcsec e_PM_y_A error in PM-y (sec. of arc) 58 A1 --- UT1Flag_A IERS (I) or Prediction (P) flag for Bull. A UT1-UTC values 59- 68 F10.7 s UT1_UTC_A Bull. A UT1-UTC (sec. of time) 69- 78 F10.7 s e_UT1_UTC_A error in UT1-UTC (sec. of time) 80- 86 F7.4 ms LOD_A Bull. A LOD (msec. of time) -- NOT ALWAYS FILLED 87- 93 F7.4 ms e_LOD_A error in LOD (msec. of time) -- NOT ALWAYS FILLED 96 A1 --- NutFlag_A IERS (I) or Prediction (P) flag for Bull. A nutation values 98- 106 F9.3 marcsec dX_2000A_A Bull. A dX wrt IAU2000A Nutation Free Core Nutation NOT Removed 107- 115 F9.3 marcsec e_dX_2000A_A error in dX (msec. of arc) 117- 125 F9.3 marcsec dY_2000A_A Bull. A dY wrt IAU2000A Nutation Free Core Nutation NOT Removed 126- 134 F9.3 marcsec e_dY_2000A_A error in dY (msec. of arc) 135- 144 F10.6 arcsec PM_X_B Bull. B PM-x (sec. of arc) 145- 154 F10.6 arcsec PM_Y_B Bull. B PM-y (sec. of arc) 155- 165 F11.7 s UT1_UTC_B Bull. B UT1-UTC (sec. of time) 166- 175 F10.3 marcsec dX_2000A_B Bull. B dX wrt IAU2000A Nutation 176- 185 F10.3 marcsec dY_2000A_B Bull. B dY wrt IAU2000A Nutation -------------------------------------------------------------------------------- Notes: The same format is used for finals2000A.data, finals2000A.daily, and finals2000A.all astropy-1.1.1/astropy/utils/iers/tests/0000755001134200020070000000000012644022135021063 5ustar embrayscience00000000000000astropy-1.1.1/astropy/utils/iers/tests/iers_a_excerpt0000644001134200020070000002602012644017723024011 0ustar embrayscience0000000000000015 126 57048.00 I 0.002902 0.000024 0.302160 0.000040 I-0.4867876 0.0000073 1.2748 0.0071 I -0.155 0.119 -0.040 0.034 0.002890 0.302200 -0.4867861 -0.194 -0.055 15 127 57049.00 I 0.002371 0.000039 0.303081 0.000035 I-0.4880090 0.0000121 1.1461 0.0051 I -0.148 0.049 -0.021 0.073 0.002389 0.303074 -0.4880195 -0.193 -0.060 15 128 57050.00 I 0.002261 0.000048 0.304429 0.000038 I-0.4890652 0.0000071 0.9738 0.0068 I -0.144 0.119 0.011 0.055 0.002280 0.304472 -0.4890627 -0.166 -0.016 15 129 57051.00 I 0.002244 0.000048 0.306179 0.000035 I-0.4899792 0.0000060 0.8694 0.0047 I -0.133 0.119 0.034 0.055 0.002250 0.306164 -0.4899632 -0.132 0.035 15 130 57052.00 I 0.002854 0.000048 0.308403 0.000035 I-0.4908258 0.0000062 0.8305 0.0039 I -0.115 0.119 0.040 0.055 0.002907 0.308446 -0.4908208 -0.089 0.086 15 131 57053.00 I 0.003759 0.000045 0.310804 0.000024 I-0.4916596 0.0000051 0.8499 0.0043 I -0.101 0.119 0.042 0.054 0.003734 0.310824 -0.4916557 -0.086 0.094 15 2 1 57054.00 I 0.004544 0.000061 0.313148 0.000030 I-0.4925306 0.0000060 0.8845 0.0039 I -0.094 0.119 0.052 0.059 0.004581 0.313150 -0.4925323 -0.093 0.081 15 2 2 57055.00 I 0.004623 0.000051 0.315517 0.000029 I-0.4934373 0.0000058 0.9452 0.0061 I -0.087 0.119 0.072 0.053 15 2 3 57056.00 I 0.004190 0.000042 0.317761 0.000025 I-0.4944317 0.0000107 1.0378 0.0041 I -0.082 0.119 0.089 0.075 15 2 4 57057.00 I 0.003858 0.000052 0.319727 0.000027 I-0.4955079 0.0000059 1.1152 0.0061 I -0.075 0.119 0.103 0.048 15 2 5 57058.00 I 0.003203 0.000052 0.321256 0.000026 I-0.4966586 0.0000058 1.1820 0.0040 I -0.063 0.119 0.126 0.048 15 2 6 57059.00 I 0.002604 0.000052 0.322746 0.000026 I-0.4978678 0.0000053 1.2367 0.0033 I -0.053 0.119 0.163 0.048 15 2 7 57060.00 I 0.002144 0.000032 0.324351 0.000019 I-0.4991451 0.0000033 1.3309 0.0034 I -0.056 0.119 0.201 0.024 15 2 8 57061.00 I 0.001898 0.000037 0.325746 0.000023 I-0.5005174 0.0000043 1.3884 0.0027 I -0.071 0.119 0.225 0.052 15 2 9 57062.00 I 0.002025 0.000037 0.327045 0.000021 I-0.5018830 0.0000043 1.3290 0.0036 I -0.086 0.119 0.228 0.052 15 210 57063.00 I 0.002138 0.000021 0.328333 0.000019 I-0.5031643 0.0000058 1.2363 0.0030 I -0.098 0.119 0.202 0.062 15 211 57064.00 I 0.002223 0.000032 0.329713 0.000023 I-0.5043650 0.0000043 1.1720 0.0036 I -0.100 0.119 0.149 0.047 15 212 57065.00 I 0.002256 0.000032 0.331138 0.000024 I-0.5055269 0.0000042 1.1636 0.0030 I -0.079 0.119 0.095 0.047 15 213 57066.00 I 0.002424 0.000032 0.332371 0.000024 I-0.5067041 0.0000042 1.1909 0.0026 I -0.036 0.119 0.066 0.047 15 214 57067.00 I 0.002704 0.000026 0.333462 0.000020 I-0.5078936 0.0000030 1.1728 0.0027 I 0.003 0.119 0.045 0.027 15 215 57068.00 I 0.002772 0.000033 0.334534 0.000024 I-0.5090570 0.0000033 1.1764 0.0023 I 0.027 0.045 0.008 0.037 15 216 57069.00 I 0.002854 0.000033 0.335722 0.000025 I-0.5102715 0.0000035 1.2552 0.0033 I 0.045 0.045 -0.015 0.037 15 217 57070.00 I 0.002844 0.000023 0.337156 0.000022 I-0.5115860 0.0000058 1.3897 0.0024 I 0.055 0.066 0.003 0.050 15 218 57071.00 I 0.002756 0.000033 0.338410 0.000025 I-0.5130736 0.0000033 1.5925 0.0034 I 0.043 0.040 0.046 0.036 15 219 57072.00 I 0.002769 0.000032 0.339609 0.000025 I-0.5147512 0.0000034 1.7361 0.0025 I 0.012 0.040 0.080 0.036 15 220 57073.00 I 0.002580 0.000032 0.341034 0.000026 I-0.5165088 0.0000037 1.7687 0.0027 I -0.024 0.040 0.101 0.036 15 221 57074.00 I 0.002345 0.000025 0.342662 0.000021 I-0.5182664 0.0000042 1.7345 0.0024 I -0.052 0.119 0.114 0.023 15 222 57075.00 I 0.002461 0.000030 0.344425 0.000024 I-0.5199568 0.0000031 1.6371 0.0026 I -0.059 0.119 0.108 0.036 15 223 57076.00 I 0.003021 0.000030 0.346361 0.000024 I-0.5215198 0.0000029 1.4774 0.0026 I -0.043 0.119 0.092 0.036 15 224 57077.00 I 0.003313 0.000020 0.348467 0.000020 I-0.5228871 0.0000042 1.2443 0.0026 I -0.020 0.119 0.100 0.044 15 225 57078.00 I 0.003151 0.000020 0.350293 0.000019 I-0.5240195 0.0000044 1.0446 0.0031 I -0.004 0.119 0.151 0.045 15 226 57079.00 I 0.003153 0.000020 0.351720 0.000019 I-0.5250116 0.0000045 0.9509 0.0033 I 0.012 0.119 0.220 0.045 15 227 57080.00 I 0.003288 0.000021 0.353151 0.000021 I-0.5259330 0.0000050 0.8925 0.0063 I 0.041 0.119 0.284 0.045 15 228 57081.00 I 0.003184 0.000011 0.354780 0.000015 I-0.5268057 0.0000118 0.8616 0.0064 P -0.006 0.239 0.108 0.600 15 3 1 57082.00 I 0.003159 0.000012 0.356592 0.000017 I-0.5276758 0.0000118 0.8894 0.0080 P 0.007 0.239 0.093 0.600 15 3 2 57083.00 I 0.003484 0.000091 0.358608 0.000092 I-0.5285954 0.0000109 0.9498 0.0107 P 0.017 0.239 0.086 0.600 15 3 3 57084.00 I 0.003836 0.000092 0.360558 0.000092 I-0.5295768 0.0000179 1.0144 0.0094 P 0.025 0.239 0.094 0.600 15 3 4 57085.00 I 0.003961 0.000092 0.362222 0.000093 I-0.5306268 0.0000154 1.0866 0.0108 P 0.027 0.239 0.117 0.600 15 3 5 57086.00 I 0.004269 0.000093 0.363666 0.000093 I-0.5317409 0.0000122 1.1313 0.0089 P 0.027 0.239 0.139 0.600 15 3 6 57087.00 I 0.004778 0.000092 0.364949 0.000092 I-0.5328903 0.0000088 1.1785 0.0079 P 0.027 0.239 0.149 0.600 15 3 7 57088.00 I 0.004988 0.000092 0.366147 0.000092 I-0.5340985 0.0000100 1.2274 0.0066 P 0.015 0.239 0.146 0.600 15 3 8 57089.00 I 0.004638 0.000091 0.367236 0.000093 I-0.5353452 0.0000099 1.2765 0.0070 P -0.009 0.239 0.142 0.600 15 3 9 57090.00 I 0.004036 0.000092 0.368200 0.000093 I-0.5366619 0.0000099 1.3567 0.0070 P -0.033 0.239 0.135 0.600 15 310 57091.00 I 0.003585 0.000091 0.369259 0.000092 I-0.5380421 0.0000098 1.3875 0.0070 P -0.045 0.239 0.117 0.600 15 311 57092.00 I 0.003343 0.000092 0.370447 0.000093 I-0.5394314 0.0000100 1.4018 0.0068 P -0.040 0.239 0.091 0.600 15 312 57093.00 I 0.003194 0.000092 0.371602 0.000093 I-0.5408469 0.0000094 1.4197 0.0068 P -0.015 0.239 0.085 0.600 15 313 57094.00 I 0.002917 0.000091 0.372658 0.000092 I-0.5422589 0.0000091 1.4020 0.0065 P 0.019 0.239 0.117 0.600 15 314 57095.00 I 0.002739 0.000092 0.373613 0.000092 I-0.5436785 0.0000090 1.4673 0.0056 P 0.029 0.239 0.148 0.600 15 315 57096.00 I 0.002778 0.000091 0.374548 0.000091 I-0.5452040 0.0000066 1.5642 0.0053 P 0.008 0.239 0.132 0.600 15 316 57097.00 I 0.002789 0.000091 0.375473 0.000093 I-0.5468035 0.0000056 1.6509 0.0042 P -0.012 0.239 0.085 0.600 15 317 57098.00 I 0.002799 0.000091 0.376430 0.000094 I-0.5485481 0.0000051 1.8644 0.0326 P -0.009 0.239 0.068 0.600 15 318 57099.00 I 0.002880 0.000091 0.377429 0.000094 I-0.5504555 0.0000650 1.8477 0.0277 P 0.007 0.239 0.099 0.600 15 319 57100.00 I 0.003450 0.000091 0.378351 0.000091 I-0.5525515 0.0000552 P 0.014 0.239 0.137 0.600 15 320 57101.00 P 0.004024 0.000697 0.379498 0.000414 P-0.5547450 0.0001080 P 0.011 0.239 0.163 0.600 15 321 57102.00 P 0.004848 0.001034 0.380682 0.000681 P-0.5569577 0.0002041 P 0.005 0.239 0.177 0.600 15 322 57103.00 P 0.005564 0.001303 0.381927 0.000912 P-0.5590933 0.0003028 P -0.001 0.239 0.180 0.600 15 323 57104.00 P 0.006227 0.001536 0.383232 0.001122 P-0.5610707 0.0004021 P -0.006 0.239 0.167 0.600 15 324 57105.00 P 0.006860 0.001744 0.384571 0.001318 P-0.5628741 0.0005017 P -0.012 0.239 0.152 0.600 15 325 57106.00 P 0.007427 0.001935 0.385947 0.001503 P-0.5645205 0.0006014 P -0.015 0.239 0.145 0.600 15 326 57107.00 P 0.007984 0.002113 0.387309 0.001679 P-0.5660324 0.0007012 P -0.010 0.239 0.143 0.600 astropy-1.1.1/astropy/utils/iers/tests/test_iers.py0000644001134200020070000001313112644017723023444 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import os import numpy as np from ....tests.helper import pytest, assert_quantity_allclose from .. import iers from .... import units as u from ....table import QTable from ....time import Time from ....extern.six.moves import urllib FILE_NOT_FOUND_ERROR = getattr(__builtins__, 'FileNotFoundError', IOError) try: iers.IERS_A.open() # check if IERS_A is available except IOError: HAS_IERS_A = False else: HAS_IERS_A = True IERS_A_EXCERPT = os.path.join(os.path.dirname(__file__), 'iers_a_excerpt') class TestBasic(): """Basic tests that IERS_B returns correct values""" def test_simple(self): iers.IERS.close() assert iers.IERS.iers_table is None iers_tab = iers.IERS.open() assert iers.IERS.iers_table is not None assert isinstance(iers.IERS.iers_table, QTable) assert iers_tab['UT1_UTC'].unit is u.second assert iers_tab['PM_x'].unit is u.arcsecond assert iers_tab['PM_y'].unit is u.arcsecond jd1 = np.array([2456108.5, 2456108.5, 2456108.5, 2456109.5, 2456109.5]) jd2 = np.array([0.49999421, 0.99997685, 0.99998843, 0., 0.5]) ut1_utc = iers_tab.ut1_utc(jd1, jd2) assert isinstance(ut1_utc, u.Quantity) assert ut1_utc.unit is u.second assert_quantity_allclose(ut1_utc, [-0.5868211, -0.5868184, -0.5868184, 0.4131816, 0.41328895] * u.s, atol=1.*u.ns) # should be future-proof; surely we've moved to another planet by then with pytest.raises(IndexError): ut1_utc2, status2 = iers_tab.ut1_utc(1e11, 0.) # also check it returns the right status ut1_utc2, status2 = iers_tab.ut1_utc(jd1, jd2, return_status=True) assert np.all(status2 == iers.FROM_IERS_B) ut1_utc4, status4 = iers_tab.ut1_utc(1e11, 0., return_status=True) assert status4 == iers.TIME_BEYOND_IERS_RANGE # check it works via Time too t = Time(jd1, jd2, format='jd', scale='utc') ut1_utc3 = iers_tab.ut1_utc(t) assert_quantity_allclose(ut1_utc3, [-0.5868211, -0.5868184, -0.5868184, 0.4131816, 0.41328895] *u.s, atol=1.*u.ns) def test_open_filename(self): iers.IERS.close() iers.IERS.open(iers.IERS_B_FILE) assert iers.IERS.iers_table is not None assert isinstance(iers.IERS.iers_table, QTable) iers.IERS.close() with pytest.raises(FILE_NOT_FOUND_ERROR): iers.IERS.open('surely this does not exist') def test_open_network_url(self): iers.IERS_A.close() iers.IERS_A.open("file:" + urllib.request.pathname2url(IERS_A_EXCERPT)) assert iers.IERS_A.iers_table is not None assert isinstance(iers.IERS_A.iers_table, QTable) iers.IERS_A.close() class TestIERS_AExcerpt(): def test_simple(self): iers_tab = iers.IERS_A.open(IERS_A_EXCERPT) assert iers_tab['UT1_UTC'].unit is u.second assert 'P' in iers_tab['UT1Flag'] assert 'I' in iers_tab['UT1Flag'] assert 'B' in iers_tab['UT1Flag'] assert np.all((iers_tab['UT1Flag'] == 'I') | (iers_tab['UT1Flag'] == 'P') | (iers_tab['UT1Flag'] == 'B')) assert iers_tab['PM_x'].unit is u.arcsecond assert iers_tab['PM_y'].unit is u.arcsecond assert 'P' in iers_tab['PolPMFlag'] assert 'I' in iers_tab['PolPMFlag'] assert 'B' in iers_tab['PolPMFlag'] assert np.all((iers_tab['PolPMFlag'] == 'P') | (iers_tab['PolPMFlag'] == 'I') | (iers_tab['PolPMFlag'] == 'B')) t = Time([57053., 57054., 57055.], format='mjd') ut1_utc, status = iers_tab.ut1_utc(t, return_status=True) assert status[0] == iers.FROM_IERS_B assert np.all(status[1:] == iers.FROM_IERS_A) assert_quantity_allclose(ut1_utc, [-0.4916557, -0.4925323, -0.4934373] * u.s, atol=1.*u.ns) pm_x, pm_y, status = iers_tab.pm_xy(t, return_status=True) assert status[0] == iers.FROM_IERS_B assert np.all(status[1:] == iers.FROM_IERS_A) assert_quantity_allclose(pm_x, [0.003734, 0.004581, 0.004623] * u.arcsec, atol=1.*u.narcsec) assert_quantity_allclose(pm_y, [0.310824, 0.313150, 0.315517] * u.arcsec, atol=1.*u.narcsec) @pytest.mark.skipif(str('not HAS_IERS_A')) class TestIERS_A(): def test_simple(self): iers_tab = iers.IERS_A.open() jd1 = np.array([2456108.5, 2456108.5, 2456108.5, 2456109.5, 2456109.5]) jd2 = np.array([0.49999421, 0.99997685, 0.99998843, 0., 0.5]) ut1_utc, status = iers_tab.ut1_utc(jd1, jd2, return_status=True) assert np.all(status == iers.FROM_IERS_B) assert_quantity_allclose(ut1_utc, [-0.5868211, -0.5868184, -0.5868184, 0.4131816, 0.41328895] * u.s, atol=1.*u.ns) ut1_utc2, status2 = iers_tab.ut1_utc(1e11, 0., return_status=True) assert status2 == iers.TIME_BEYOND_IERS_RANGE tnow = Time.now() ut1_utc3, status3 = iers_tab.ut1_utc(tnow, return_status=True) assert status3 == iers.FROM_IERS_A_PREDICTION assert ut1_utc3 != 0. astropy-1.1.1/astropy/utils/iers/tests/__init__.py0000644001134200020070000000015512602615530023176 0ustar embrayscience00000000000000from __future__ import (absolute_import, division, print_function, unicode_literals) astropy-1.1.1/astropy/utils/iers/iers.py0000644001134200020070000004152112644017723021247 0ustar embrayscience00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ The astropy.utils.iers package provides access to the tables provided by the International Earth Rotation and Reference Systems Service, in particular allowing interpolation of published UT1-UTC values for given times. These are used in `astropy.time` to provide UT1 values. The polar motions are also used for determining earth orientation for celestional-to-terrestrial coordinate transformations (in `astropy.coordinates`). By default, IERS B values provided as part of astropy are used, but user-downloaded files can be substituted. Generally, there is no need to invoke the iers classes oneself. E.g., the default IERS B table is loaded as necessary in `Time`:: >>> from astropy.time import Time >>> t = Time(['2012-06-30 12:00:00', '2012-06-30 23:59:59', ... '2012-06-30 23:59:60', '2012-07-01 00:00:00', ... '2012-07-01 12:00:00'], scale='utc') >>> t.ut1